commit 7839475334f163ecb148072e714e98431106b04f Author: Fish <> Date: Wed Dec 29 16:01:33 2010 +0000 add initial files for Tinjac diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fc264eb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3845 @@ +* text=auto !eol +cronie-1.4.6/AUTHORS -text +cronie-1.4.6/COPYING -text +cronie-1.4.6/ChangeLog -text +cronie-1.4.6/INSTALL -text +cronie-1.4.6/Makefile.am -text +cronie-1.4.6/Makefile.in -text +cronie-1.4.6/NEWS -text +cronie-1.4.6/README -text +cronie-1.4.6/aclocal.m4 -text +cronie-1.4.6/anacron/Makefile.am -text +cronie-1.4.6/anacron/Makefile.in -text +cronie-1.4.6/anacron/global.h -text +cronie-1.4.6/anacron/gregor.c -text +cronie-1.4.6/anacron/gregor.h -text +cronie-1.4.6/anacron/lock.c -text +cronie-1.4.6/anacron/log.c -text +cronie-1.4.6/anacron/main.c -text +cronie-1.4.6/anacron/matchrx.c -text +cronie-1.4.6/anacron/matchrx.h -text +cronie-1.4.6/anacron/readtab.c -text +cronie-1.4.6/anacron/runjob.c -text +cronie-1.4.6/config.guess -text +cronie-1.4.6/config.h.in -text +cronie-1.4.6/config.sub -text +cronie-1.4.6/configure -text +cronie-1.4.6/configure.ac -text +cronie-1.4.6/contrib/0anacron -text +cronie-1.4.6/contrib/0hourly -text +cronie-1.4.6/contrib/anacrontab -text +cronie-1.4.6/contrib/dailyjobs -text +cronie-1.4.6/crond.sysconfig -text +cronie-1.4.6/cronie.init -text +cronie-1.4.6/depcomp -text +cronie-1.4.6/install-sh -text +cronie-1.4.6/man/Makefile.am -text +cronie-1.4.6/man/Makefile.in -text +cronie-1.4.6/man/anacron.8 -text +cronie-1.4.6/man/anacrontab.5 -text +cronie-1.4.6/man/cron.8 -text +cronie-1.4.6/man/crond.8 -text +cronie-1.4.6/man/crontab.1 -text +cronie-1.4.6/man/crontab.5 -text +cronie-1.4.6/missing -text +cronie-1.4.6/pam/crond -text +cronie-1.4.6/src/Makefile.am -text +cronie-1.4.6/src/Makefile.in -text +cronie-1.4.6/src/bitstring.h -text +cronie-1.4.6/src/cron.c -text +cronie-1.4.6/src/cron.h -text +cronie-1.4.6/src/crontab.c -text +cronie-1.4.6/src/database.c -text +cronie-1.4.6/src/do_command.c -text +cronie-1.4.6/src/entry.c -text +cronie-1.4.6/src/env.c -text +cronie-1.4.6/src/externs.h -text +cronie-1.4.6/src/funcs.h -text +cronie-1.4.6/src/globals.h -text +cronie-1.4.6/src/job.c -text +cronie-1.4.6/src/macros.h -text +cronie-1.4.6/src/misc.c -text +cronie-1.4.6/src/pathnames.h -text +cronie-1.4.6/src/popen.c -text +cronie-1.4.6/src/pw_dup.c -text +cronie-1.4.6/src/security.c -text +cronie-1.4.6/src/structs.h -text +cronie-1.4.6/src/user.c -text +wt-3.1.7a/AUTHORS -text +wt-3.1.7a/CMakeLists.txt -text +wt-3.1.7a/Changelog -text +wt-3.1.7a/Doxyfile -text +wt-3.1.7a/INSTALL -text +wt-3.1.7a/INSTALL.html -text +wt-3.1.7a/INSTALL.win32.html -text +wt-3.1.7a/LICENSE -text +wt-3.1.7a/ReleaseNotes.html -text +wt-3.1.7a/WConfig.h.in -text +wt-3.1.7a/WtInstall.cmake -text +wt-3.1.7a/cmake/FindSqlite3.cmake -text +wt-3.1.7a/cmake/FindWt.cmake -text +wt-3.1.7a/cmake/WtFindAsciidoc.txt -text +wt-3.1.7a/cmake/WtFindAsio.txt -text +wt-3.1.7a/cmake/WtFindBoost-cmake.txt -text +wt-3.1.7a/cmake/WtFindBoost-vintage.txt -text +wt-3.1.7a/cmake/WtFindBoost.txt -text +wt-3.1.7a/cmake/WtFindFcgi.txt -text +wt-3.1.7a/cmake/WtFindGm.txt -text +wt-3.1.7a/cmake/WtFindHaru.txt -text +wt-3.1.7a/cmake/WtFindMysqlpp.txt -text +wt-3.1.7a/cmake/WtFindPostgresql.txt -text +wt-3.1.7a/cmake/WtFindSsl.txt -text +wt-3.1.7a/cmake/WtFindZlib.txt -text +wt-3.1.7a/doc/examples/html/AddresseeEdit_8C.html -text +wt-3.1.7a/doc/examples/html/AddresseeEdit_8C_source.html -text +wt-3.1.7a/doc/examples/html/AddresseeEdit_8h.html -text +wt-3.1.7a/doc/examples/html/AddresseeEdit_8h_source.html -text +wt-3.1.7a/doc/examples/html/AttachmentEdit_8C.html -text +wt-3.1.7a/doc/examples/html/AttachmentEdit_8C_source.html -text +wt-3.1.7a/doc/examples/html/AttachmentEdit_8h.html -text +wt-3.1.7a/doc/examples/html/AttachmentEdit_8h_source.html -text +wt-3.1.7a/doc/examples/html/Attachment_8h.html -text +wt-3.1.7a/doc/examples/html/Attachment_8h_source.html -text +wt-3.1.7a/doc/examples/html/Character_8C.html -text +wt-3.1.7a/doc/examples/html/Character_8C_source.html -text +wt-3.1.7a/doc/examples/html/Character_8h.html -text +wt-3.1.7a/doc/examples/html/Character_8h_source.html -text +wt-3.1.7a/doc/examples/html/ChartConfig_8C.html -text +wt-3.1.7a/doc/examples/html/ChartConfig_8C_source.html -text +wt-3.1.7a/doc/examples/html/ChartConfig_8h.html -text +wt-3.1.7a/doc/examples/html/ChartConfig_8h_source.html -text +wt-3.1.7a/doc/examples/html/ChartsApplication_8C.html -text +wt-3.1.7a/doc/examples/html/ChartsApplication_8C_source.html -text +wt-3.1.7a/doc/examples/html/ChartsExample_8C.html -text +wt-3.1.7a/doc/examples/html/ChartsExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/ChartsExample_8h.html -text +wt-3.1.7a/doc/examples/html/ChartsExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/ComposeExample_8C.html -text +wt-3.1.7a/doc/examples/html/ComposeExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/ComposeExample_8h.html -text +wt-3.1.7a/doc/examples/html/ComposeExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/Composer_8C.html -text +wt-3.1.7a/doc/examples/html/Composer_8C_source.html -text +wt-3.1.7a/doc/examples/html/Composer_8h.html -text +wt-3.1.7a/doc/examples/html/Composer_8h_source.html -text +wt-3.1.7a/doc/examples/html/ContactSuggestions_8C.html -text +wt-3.1.7a/doc/examples/html/ContactSuggestions_8C_source.html -text +wt-3.1.7a/doc/examples/html/ContactSuggestions_8h.html -text +wt-3.1.7a/doc/examples/html/ContactSuggestions_8h_source.html -text +wt-3.1.7a/doc/examples/html/Contact_8h.html -text +wt-3.1.7a/doc/examples/html/Contact_8h_source.html -text +wt-3.1.7a/doc/examples/html/CountDownWidget_8C.html -text +wt-3.1.7a/doc/examples/html/CountDownWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/CountDownWidget_8h.html -text +wt-3.1.7a/doc/examples/html/CountDownWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/DemoTreeList_8C.html -text +wt-3.1.7a/doc/examples/html/DemoTreeList_8C_source.html -text +wt-3.1.7a/doc/examples/html/DemoTreeList_8h.html -text +wt-3.1.7a/doc/examples/html/DemoTreeList_8h_source.html -text +wt-3.1.7a/doc/examples/html/Dictionary_8C.html -text +wt-3.1.7a/doc/examples/html/Dictionary_8C_source.html -text +wt-3.1.7a/doc/examples/html/Dictionary_8h.html -text +wt-3.1.7a/doc/examples/html/Dictionary_8h_source.html -text +wt-3.1.7a/doc/examples/html/DragApplication_8C.html -text +wt-3.1.7a/doc/examples/html/DragApplication_8C_source.html -text +wt-3.1.7a/doc/examples/html/DragExample_8C.html -text +wt-3.1.7a/doc/examples/html/DragExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/DragExample_8h.html -text +wt-3.1.7a/doc/examples/html/DragExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/ExampleSourceViewer_8C.html -text +wt-3.1.7a/doc/examples/html/ExampleSourceViewer_8C_source.html -text +wt-3.1.7a/doc/examples/html/ExampleSourceViewer_8h.html -text +wt-3.1.7a/doc/examples/html/ExampleSourceViewer_8h_source.html -text +wt-3.1.7a/doc/examples/html/FileItem_8C.html -text +wt-3.1.7a/doc/examples/html/FileItem_8C_source.html -text +wt-3.1.7a/doc/examples/html/FileItem_8h.html -text +wt-3.1.7a/doc/examples/html/FileItem_8h_source.html -text +wt-3.1.7a/doc/examples/html/FileTreeExample_8C.html -text +wt-3.1.7a/doc/examples/html/FileTreeExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/FileTreeTableNode_8C.html -text +wt-3.1.7a/doc/examples/html/FileTreeTableNode_8C_source.html -text +wt-3.1.7a/doc/examples/html/FileTreeTableNode_8h.html -text +wt-3.1.7a/doc/examples/html/FileTreeTableNode_8h_source.html -text +wt-3.1.7a/doc/examples/html/FileTreeTable_8C.html -text +wt-3.1.7a/doc/examples/html/FileTreeTable_8C_source.html -text +wt-3.1.7a/doc/examples/html/FileTreeTable_8h.html -text +wt-3.1.7a/doc/examples/html/FileTreeTable_8h_source.html -text +wt-3.1.7a/doc/examples/html/FolderView_8C.html -text +wt-3.1.7a/doc/examples/html/FolderView_8C_source.html -text +wt-3.1.7a/doc/examples/html/FolderView_8h.html -text +wt-3.1.7a/doc/examples/html/FolderView_8h_source.html -text +wt-3.1.7a/doc/examples/html/FormExample_8C.html -text +wt-3.1.7a/doc/examples/html/FormExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/FormExample_8h.html -text +wt-3.1.7a/doc/examples/html/FormExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/Form_8C.html -text +wt-3.1.7a/doc/examples/html/Form_8C_source.html -text +wt-3.1.7a/doc/examples/html/Form_8h.html -text +wt-3.1.7a/doc/examples/html/Form_8h_source.html -text +wt-3.1.7a/doc/examples/html/GitModel_8C.html -text +wt-3.1.7a/doc/examples/html/GitModel_8C_source.html -text +wt-3.1.7a/doc/examples/html/GitModel_8h.html -text +wt-3.1.7a/doc/examples/html/GitModel_8h_source.html -text +wt-3.1.7a/doc/examples/html/GitView_8C.html -text +wt-3.1.7a/doc/examples/html/GitView_8C_source.html -text +wt-3.1.7a/doc/examples/html/Git_8C.html -text +wt-3.1.7a/doc/examples/html/Git_8C_source.html -text +wt-3.1.7a/doc/examples/html/Git_8h.html -text +wt-3.1.7a/doc/examples/html/Git_8h_source.html -text +wt-3.1.7a/doc/examples/html/HangmanDb_8C.html -text +wt-3.1.7a/doc/examples/html/HangmanDb_8C_source.html -text +wt-3.1.7a/doc/examples/html/HangmanDb_8h.html -text +wt-3.1.7a/doc/examples/html/HangmanDb_8h_source.html -text +wt-3.1.7a/doc/examples/html/HangmanGame_8C.html -text +wt-3.1.7a/doc/examples/html/HangmanGame_8C_source.html -text +wt-3.1.7a/doc/examples/html/HangmanGame_8h.html -text +wt-3.1.7a/doc/examples/html/HangmanGame_8h_source.html -text +wt-3.1.7a/doc/examples/html/HangmanWidget_8C.html -text +wt-3.1.7a/doc/examples/html/HangmanWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/HangmanWidget_8h.html -text +wt-3.1.7a/doc/examples/html/HangmanWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/HighScoresWidget_8C.html -text +wt-3.1.7a/doc/examples/html/HighScoresWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/HighScoresWidget_8h.html -text +wt-3.1.7a/doc/examples/html/HighScoresWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/Home_8C.html -text +wt-3.1.7a/doc/examples/html/Home_8C_source.html -text +wt-3.1.7a/doc/examples/html/Home_8h.html -text +wt-3.1.7a/doc/examples/html/Home_8h_source.html -text +wt-3.1.7a/doc/examples/html/IconPair_8C.html -text +wt-3.1.7a/doc/examples/html/IconPair_8C_source.html -text +wt-3.1.7a/doc/examples/html/IconPair_8h.html -text +wt-3.1.7a/doc/examples/html/IconPair_8h_source.html -text +wt-3.1.7a/doc/examples/html/JWtHome_8C.html -text +wt-3.1.7a/doc/examples/html/JWtHome_8C_source.html -text +wt-3.1.7a/doc/examples/html/JWtHome_8h.html -text +wt-3.1.7a/doc/examples/html/JWtHome_8h_source.html -text +wt-3.1.7a/doc/examples/html/JavascriptExample_8C.html -text +wt-3.1.7a/doc/examples/html/JavascriptExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/JavascriptExample_8h.html -text +wt-3.1.7a/doc/examples/html/JavascriptExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/Label_8C.html -text +wt-3.1.7a/doc/examples/html/Label_8C_source.html -text +wt-3.1.7a/doc/examples/html/Label_8h.html -text +wt-3.1.7a/doc/examples/html/Label_8h_source.html -text +wt-3.1.7a/doc/examples/html/LoginWidget_8C.html -text +wt-3.1.7a/doc/examples/html/LoginWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/LoginWidget_8h.html -text +wt-3.1.7a/doc/examples/html/LoginWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/OptionList_8C.html -text +wt-3.1.7a/doc/examples/html/OptionList_8C_source.html -text +wt-3.1.7a/doc/examples/html/OptionList_8h.html -text +wt-3.1.7a/doc/examples/html/OptionList_8h_source.html -text +wt-3.1.7a/doc/examples/html/Option_8C.html -text +wt-3.1.7a/doc/examples/html/Option_8C_source.html -text +wt-3.1.7a/doc/examples/html/Option_8h.html -text +wt-3.1.7a/doc/examples/html/Option_8h_source.html -text +wt-3.1.7a/doc/examples/html/PaintApplication_8C.html -text +wt-3.1.7a/doc/examples/html/PaintApplication_8C_source.html -text +wt-3.1.7a/doc/examples/html/PaintExample_8C.html -text +wt-3.1.7a/doc/examples/html/PaintExample_8C_source.html -text +wt-3.1.7a/doc/examples/html/PaintExample_8h.html -text +wt-3.1.7a/doc/examples/html/PaintExample_8h_source.html -text +wt-3.1.7a/doc/examples/html/PanelList_8C.html -text +wt-3.1.7a/doc/examples/html/PanelList_8C_source.html -text +wt-3.1.7a/doc/examples/html/PanelList_8h.html -text +wt-3.1.7a/doc/examples/html/PanelList_8h_source.html -text +wt-3.1.7a/doc/examples/html/Popup_8C.html -text +wt-3.1.7a/doc/examples/html/Popup_8C_source.html -text +wt-3.1.7a/doc/examples/html/Popup_8h.html -text +wt-3.1.7a/doc/examples/html/Popup_8h_source.html -text +wt-3.1.7a/doc/examples/html/ShapesWidget_8C.html -text +wt-3.1.7a/doc/examples/html/ShapesWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/ShapesWidget_8h.html -text +wt-3.1.7a/doc/examples/html/ShapesWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/SimpleChatServer_8C.html -text +wt-3.1.7a/doc/examples/html/SimpleChatServer_8C_source.html -text +wt-3.1.7a/doc/examples/html/SimpleChatServer_8h.html -text +wt-3.1.7a/doc/examples/html/SimpleChatServer_8h_source.html -text +wt-3.1.7a/doc/examples/html/SimpleChatWidget_8C.html -text +wt-3.1.7a/doc/examples/html/SimpleChatWidget_8C_source.html -text +wt-3.1.7a/doc/examples/html/SimpleChatWidget_8h.html -text +wt-3.1.7a/doc/examples/html/SimpleChatWidget_8h_source.html -text +wt-3.1.7a/doc/examples/html/SourceView_8C.html -text +wt-3.1.7a/doc/examples/html/SourceView_8C_source.html -text +wt-3.1.7a/doc/examples/html/SourceView_8h.html -text +wt-3.1.7a/doc/examples/html/SourceView_8h_source.html -text +wt-3.1.7a/doc/examples/html/TreeNode_8C.html -text +wt-3.1.7a/doc/examples/html/TreeNode_8C_source.html -text +wt-3.1.7a/doc/examples/html/TreeNode_8h.html -text +wt-3.1.7a/doc/examples/html/TreeNode_8h_source.html -text +wt-3.1.7a/doc/examples/html/TreeViewDragDrop_8C.html -text +wt-3.1.7a/doc/examples/html/TreeViewDragDrop_8C_source.html -text +wt-3.1.7a/doc/examples/html/WtHome_8C.html -text +wt-3.1.7a/doc/examples/html/WtHome_8C_source.html -text +wt-3.1.7a/doc/examples/html/WtHome_8h.html -text +wt-3.1.7a/doc/examples/html/WtHome_8h_source.html -text +wt-3.1.7a/doc/examples/html/annotated.html -text +wt-3.1.7a/doc/examples/html/bc_s.png -text +wt-3.1.7a/doc/examples/html/charts_2CsvUtil_8C.html -text +wt-3.1.7a/doc/examples/html/charts_2CsvUtil_8C_source.html -text +wt-3.1.7a/doc/examples/html/charts_2CsvUtil_8h.html -text +wt-3.1.7a/doc/examples/html/charts_2CsvUtil_8h_source.html -text +wt-3.1.7a/doc/examples/html/classAddresseeEdit-members.html -text +wt-3.1.7a/doc/examples/html/classAddresseeEdit.html -text +wt-3.1.7a/doc/examples/html/classAddresseeEdit__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classAddresseeEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classAddresseeEdit__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classAttachment-members.html -text +wt-3.1.7a/doc/examples/html/classAttachment.html -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit-members.html -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit.html -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit_1_1UploadInfo-members.html -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit_1_1UploadInfo.html -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit_1_1UploadInfo__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit_1_1UploadInfo__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit_1_1UploadInfo__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classAttachmentEdit__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classCategoryExample-members.html -text +wt-3.1.7a/doc/examples/html/classCategoryExample.html -text +wt-3.1.7a/doc/examples/html/classCategoryExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classCategoryExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classCategoryExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classCharacter-members.html -text +wt-3.1.7a/doc/examples/html/classCharacter.html -text +wt-3.1.7a/doc/examples/html/classCharacter__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classCharacter__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classCharacter__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classChartConfig-members.html -text +wt-3.1.7a/doc/examples/html/classChartConfig.html -text +wt-3.1.7a/doc/examples/html/classChartConfig__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classChartConfig__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classChartConfig__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classChartsApplication-members.html -text +wt-3.1.7a/doc/examples/html/classChartsApplication.html -text +wt-3.1.7a/doc/examples/html/classChartsApplication__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classChartsApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classChartsApplication__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classChartsExample-members.html -text +wt-3.1.7a/doc/examples/html/classChartsExample.html -text +wt-3.1.7a/doc/examples/html/classChartsExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classChartsExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classChartsExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classChatApplication-members.html -text +wt-3.1.7a/doc/examples/html/classChatApplication.html -text +wt-3.1.7a/doc/examples/html/classChatApplication__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classChatApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classChatApplication__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classChatEvent-members.html -text +wt-3.1.7a/doc/examples/html/classChatEvent.html -text +wt-3.1.7a/doc/examples/html/classComposeExample-members.html -text +wt-3.1.7a/doc/examples/html/classComposeExample.html -text +wt-3.1.7a/doc/examples/html/classComposer-members.html -text +wt-3.1.7a/doc/examples/html/classComposer.html -text +wt-3.1.7a/doc/examples/html/classComposer__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classComposer__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classComposer__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classContactSuggestions-members.html -text +wt-3.1.7a/doc/examples/html/classContactSuggestions.html -text +wt-3.1.7a/doc/examples/html/classContactSuggestions__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classContactSuggestions__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classContactSuggestions__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classCountDownWidget-members.html -text +wt-3.1.7a/doc/examples/html/classCountDownWidget.html -text +wt-3.1.7a/doc/examples/html/classCountDownWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classCountDownWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classCountDownWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classDeferredWidget-members.html -text +wt-3.1.7a/doc/examples/html/classDeferredWidget.html -text +wt-3.1.7a/doc/examples/html/classDeferredWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classDeferredWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classDeferredWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classDemoTreeList-members.html -text +wt-3.1.7a/doc/examples/html/classDemoTreeList.html -text +wt-3.1.7a/doc/examples/html/classDemoTreeList__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classDemoTreeList__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classDemoTreeList__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classDiv-members.html -text +wt-3.1.7a/doc/examples/html/classDiv.html -text +wt-3.1.7a/doc/examples/html/classDiv__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classDiv__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classDiv__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classDragExample-members.html -text +wt-3.1.7a/doc/examples/html/classDragExample.html -text +wt-3.1.7a/doc/examples/html/classDragExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classDragExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classDragExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classExampleSourceViewer-members.html -text +wt-3.1.7a/doc/examples/html/classExampleSourceViewer.html -text +wt-3.1.7a/doc/examples/html/classExampleSourceViewer__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classExampleSourceViewer__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classExampleSourceViewer__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFileEditDialog-members.html -text +wt-3.1.7a/doc/examples/html/classFileEditDialog.html -text +wt-3.1.7a/doc/examples/html/classFileEditDialog__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFileEditDialog__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFileEditDialog__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFileItem-members.html -text +wt-3.1.7a/doc/examples/html/classFileItem.html -text +wt-3.1.7a/doc/examples/html/classFileItem__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFileItem__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFileItem__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFileModel-members.html -text +wt-3.1.7a/doc/examples/html/classFileModel.html -text +wt-3.1.7a/doc/examples/html/classFileModel__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFileModel__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFileModel__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFileTreeTable-members.html -text +wt-3.1.7a/doc/examples/html/classFileTreeTable.html -text +wt-3.1.7a/doc/examples/html/classFileTreeTableNode-members.html -text +wt-3.1.7a/doc/examples/html/classFileTreeTableNode.html -text +wt-3.1.7a/doc/examples/html/classFileTreeTableNode__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFileTreeTableNode__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFileTreeTableNode__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFileTreeTable__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFileTreeTable__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFileTreeTable__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classFolderView-members.html -text +wt-3.1.7a/doc/examples/html/classFolderView.html -text +wt-3.1.7a/doc/examples/html/classFolderView__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFolderView__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFolderView__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classForm-members.html -text +wt-3.1.7a/doc/examples/html/classForm.html -text +wt-3.1.7a/doc/examples/html/classFormExample-members.html -text +wt-3.1.7a/doc/examples/html/classFormExample.html -text +wt-3.1.7a/doc/examples/html/classFormExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classFormExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classFormExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classForm__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classForm__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classForm__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classGit-members.html -text +wt-3.1.7a/doc/examples/html/classGit.html -text +wt-3.1.7a/doc/examples/html/classGitModel-members.html -text +wt-3.1.7a/doc/examples/html/classGitModel.html -text +wt-3.1.7a/doc/examples/html/classGitModel_1_1ChildIndex-members.html -text +wt-3.1.7a/doc/examples/html/classGitModel_1_1Tree-members.html -text +wt-3.1.7a/doc/examples/html/classGitModel_1_1Tree.html -text +wt-3.1.7a/doc/examples/html/classGitModel__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classGitModel__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classGitModel__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classGitViewApplication-members.html -text +wt-3.1.7a/doc/examples/html/classGitViewApplication.html -text +wt-3.1.7a/doc/examples/html/classGitViewApplication__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classGitViewApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classGitViewApplication__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classGit_1_1Exception-members.html -text +wt-3.1.7a/doc/examples/html/classGit_1_1Exception.html -text +wt-3.1.7a/doc/examples/html/classGit_1_1ObjectId-members.html -text +wt-3.1.7a/doc/examples/html/classGit_1_1ObjectId.html -text +wt-3.1.7a/doc/examples/html/classHangmanDb-members.html -text +wt-3.1.7a/doc/examples/html/classHangmanDb.html -text +wt-3.1.7a/doc/examples/html/classHangmanGame-members.html -text +wt-3.1.7a/doc/examples/html/classHangmanGame.html -text +wt-3.1.7a/doc/examples/html/classHangmanGame__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classHangmanGame__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classHangmanGame__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classHangmanWidget-members.html -text +wt-3.1.7a/doc/examples/html/classHangmanWidget.html -text +wt-3.1.7a/doc/examples/html/classHangmanWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classHangmanWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classHangmanWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classHelloApplication-members.html -text +wt-3.1.7a/doc/examples/html/classHelloApplication.html -text +wt-3.1.7a/doc/examples/html/classHelloApplication__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classHelloApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classHelloApplication__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classHighScoresWidget-members.html -text +wt-3.1.7a/doc/examples/html/classHighScoresWidget.html -text +wt-3.1.7a/doc/examples/html/classHighScoresWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classHighScoresWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classHighScoresWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classHome-members.html -text +wt-3.1.7a/doc/examples/html/classHome.html -text +wt-3.1.7a/doc/examples/html/classHome__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classHome__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classHome__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classIconPair-members.html -text +wt-3.1.7a/doc/examples/html/classIconPair.html -text +wt-3.1.7a/doc/examples/html/classIconPair__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classIconPair__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classIconPair__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classJWtHome-members.html -text +wt-3.1.7a/doc/examples/html/classJWtHome.html -text +wt-3.1.7a/doc/examples/html/classJWtHome__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classJWtHome__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classJWtHome__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classJavascriptExample-members.html -text +wt-3.1.7a/doc/examples/html/classJavascriptExample.html -text +wt-3.1.7a/doc/examples/html/classJavascriptExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classJavascriptExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classJavascriptExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classLabel-members.html -text +wt-3.1.7a/doc/examples/html/classLabel.html -text +wt-3.1.7a/doc/examples/html/classLabel__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classLabel__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classLabel__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classLoginWidget-members.html -text +wt-3.1.7a/doc/examples/html/classLoginWidget.html -text +wt-3.1.7a/doc/examples/html/classLoginWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classLoginWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classLoginWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classOption-members.html -text +wt-3.1.7a/doc/examples/html/classOption.html -text +wt-3.1.7a/doc/examples/html/classOptionList-members.html -text +wt-3.1.7a/doc/examples/html/classOptionList.html -text +wt-3.1.7a/doc/examples/html/classOptionList__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classOptionList__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classOptionList__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classOption__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classOption__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classOption__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classPaintApplication-members.html -text +wt-3.1.7a/doc/examples/html/classPaintApplication.html -text +wt-3.1.7a/doc/examples/html/classPaintApplication__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classPaintApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classPaintApplication__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classPaintExample-members.html -text +wt-3.1.7a/doc/examples/html/classPaintExample.html -text +wt-3.1.7a/doc/examples/html/classPaintExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classPaintExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classPaintExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classPanelList-members.html -text +wt-3.1.7a/doc/examples/html/classPanelList.html -text +wt-3.1.7a/doc/examples/html/classPanelList__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classPanelList__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classPanelList__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classPieExample-members.html -text +wt-3.1.7a/doc/examples/html/classPieExample.html -text +wt-3.1.7a/doc/examples/html/classPieExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classPieExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classPieExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classPopup-members.html -text +wt-3.1.7a/doc/examples/html/classPopup.html -text +wt-3.1.7a/doc/examples/html/classPopup__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classPopup__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classPopup__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classScatterPlotExample-members.html -text +wt-3.1.7a/doc/examples/html/classScatterPlotExample.html -text +wt-3.1.7a/doc/examples/html/classScatterPlotExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classScatterPlotExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classScatterPlotExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classShapesWidget-members.html -text +wt-3.1.7a/doc/examples/html/classShapesWidget.html -text +wt-3.1.7a/doc/examples/html/classShapesWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classShapesWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classShapesWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classSimpleChatServer-members.html -text +wt-3.1.7a/doc/examples/html/classSimpleChatServer.html -text +wt-3.1.7a/doc/examples/html/classSimpleChatServer__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classSimpleChatServer__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classSimpleChatServer__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classSimpleChatWidget-members.html -text +wt-3.1.7a/doc/examples/html/classSimpleChatWidget.html -text +wt-3.1.7a/doc/examples/html/classSimpleChatWidget__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classSimpleChatWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classSimpleChatWidget__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classSourceView-members.html -text +wt-3.1.7a/doc/examples/html/classSourceView.html -text +wt-3.1.7a/doc/examples/html/classSourceView__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classSourceView__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classSourceView__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classTimeSeriesExample-members.html -text +wt-3.1.7a/doc/examples/html/classTimeSeriesExample.html -text +wt-3.1.7a/doc/examples/html/classTimeSeriesExample__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classTimeSeriesExample__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classTimeSeriesExample__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classTreeNode-members.html -text +wt-3.1.7a/doc/examples/html/classTreeNode.html -text +wt-3.1.7a/doc/examples/html/classTreeNode__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classTreeNode__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classTreeNode__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classTreeViewDragDrop-members.html -text +wt-3.1.7a/doc/examples/html/classTreeViewDragDrop.html -text +wt-3.1.7a/doc/examples/html/classTreeViewDragDrop__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classTreeViewDragDrop__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classTreeViewDragDrop__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classWtHome-members.html -text +wt-3.1.7a/doc/examples/html/classWtHome.html -text +wt-3.1.7a/doc/examples/html/classWtHome__inherit__graph.map -text +wt-3.1.7a/doc/examples/html/classWtHome__inherit__graph.md5 -text +wt-3.1.7a/doc/examples/html/classWtHome__inherit__graph.png -text +wt-3.1.7a/doc/examples/html/classes.html -text +wt-3.1.7a/doc/examples/html/closed.png -text +wt-3.1.7a/doc/examples/html/doxygen.css -text +wt-3.1.7a/doc/examples/html/doxygen.png -text +wt-3.1.7a/doc/examples/html/files.html -text +wt-3.1.7a/doc/examples/html/functions.html -text +wt-3.1.7a/doc/examples/html/functions_0x62.html -text +wt-3.1.7a/doc/examples/html/functions_0x63.html -text +wt-3.1.7a/doc/examples/html/functions_0x64.html -text +wt-3.1.7a/doc/examples/html/functions_0x65.html -text +wt-3.1.7a/doc/examples/html/functions_0x66.html -text +wt-3.1.7a/doc/examples/html/functions_0x67.html -text +wt-3.1.7a/doc/examples/html/functions_0x68.html -text +wt-3.1.7a/doc/examples/html/functions_0x69.html -text +wt-3.1.7a/doc/examples/html/functions_0x6a.html -text +wt-3.1.7a/doc/examples/html/functions_0x6b.html -text +wt-3.1.7a/doc/examples/html/functions_0x6c.html -text +wt-3.1.7a/doc/examples/html/functions_0x6d.html -text +wt-3.1.7a/doc/examples/html/functions_0x6e.html -text +wt-3.1.7a/doc/examples/html/functions_0x6f.html -text +wt-3.1.7a/doc/examples/html/functions_0x70.html -text +wt-3.1.7a/doc/examples/html/functions_0x72.html -text +wt-3.1.7a/doc/examples/html/functions_0x73.html -text +wt-3.1.7a/doc/examples/html/functions_0x74.html -text +wt-3.1.7a/doc/examples/html/functions_0x75.html -text +wt-3.1.7a/doc/examples/html/functions_0x76.html -text +wt-3.1.7a/doc/examples/html/functions_0x77.html -text +wt-3.1.7a/doc/examples/html/functions_0x7e.html -text +wt-3.1.7a/doc/examples/html/functions_enum.html -text +wt-3.1.7a/doc/examples/html/functions_eval.html -text +wt-3.1.7a/doc/examples/html/functions_func.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x62.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x63.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x64.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x65.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x66.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x67.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x68.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x69.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x6a.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x6c.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x6d.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x6e.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x6f.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x70.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x72.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x73.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x74.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x75.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x76.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x77.html -text +wt-3.1.7a/doc/examples/html/functions_func_0x7e.html -text +wt-3.1.7a/doc/examples/html/functions_rela.html -text +wt-3.1.7a/doc/examples/html/functions_type.html -text +wt-3.1.7a/doc/examples/html/functions_vars.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x62.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x63.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x64.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x65.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x66.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x67.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x68.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x69.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6a.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6b.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6c.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6d.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6e.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x6f.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x70.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x72.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x73.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x74.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x75.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x76.html -text +wt-3.1.7a/doc/examples/html/functions_vars_0x77.html -text +wt-3.1.7a/doc/examples/html/globals.html -text +wt-3.1.7a/doc/examples/html/globals_enum.html -text +wt-3.1.7a/doc/examples/html/globals_eval.html -text +wt-3.1.7a/doc/examples/html/globals_func.html -text +wt-3.1.7a/doc/examples/html/globals_vars.html -text +wt-3.1.7a/doc/examples/html/graph_legend.html -text +wt-3.1.7a/doc/examples/html/graph_legend.md5 -text +wt-3.1.7a/doc/examples/html/graph_legend.png -text +wt-3.1.7a/doc/examples/html/group__chartsexample.html -text +wt-3.1.7a/doc/examples/html/group__chatexample.html -text +wt-3.1.7a/doc/examples/html/group__composerexample.html -text +wt-3.1.7a/doc/examples/html/group__dragexample.html -text +wt-3.1.7a/doc/examples/html/group__fileexplorer.html -text +wt-3.1.7a/doc/examples/html/group__formexample.html -text +wt-3.1.7a/doc/examples/html/group__gitmodelexample.html -text +wt-3.1.7a/doc/examples/html/group__javascript.html -text +wt-3.1.7a/doc/examples/html/group__missionexample.html -text +wt-3.1.7a/doc/examples/html/group__treelist.html -text +wt-3.1.7a/doc/examples/html/group__treeviewdragdrop.html -text +wt-3.1.7a/doc/examples/html/hangman_8C.html -text +wt-3.1.7a/doc/examples/html/hangman_8C_source.html -text +wt-3.1.7a/doc/examples/html/hello_8C.html -text +wt-3.1.7a/doc/examples/html/hello_8C_source.html -text +wt-3.1.7a/doc/examples/html/hierarchy.html -text +wt-3.1.7a/doc/examples/html/impossible_8C.html -text +wt-3.1.7a/doc/examples/html/impossible_8C_source.html -text +wt-3.1.7a/doc/examples/html/index.html -text +wt-3.1.7a/doc/examples/html/inherit__graph__0.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__0.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__0.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__1.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__1.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__1.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__10.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__10.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__10.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__11.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__11.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__11.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__12.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__12.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__12.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__13.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__13.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__13.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__14.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__14.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__14.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__15.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__15.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__15.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__16.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__16.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__16.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__2.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__2.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__2.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__3.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__3.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__3.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__4.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__4.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__4.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__5.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__5.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__5.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__6.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__6.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__6.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__7.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__7.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__7.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__8.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__8.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__8.png -text +wt-3.1.7a/doc/examples/html/inherit__graph__9.map -text +wt-3.1.7a/doc/examples/html/inherit__graph__9.md5 -text +wt-3.1.7a/doc/examples/html/inherit__graph__9.png -text +wt-3.1.7a/doc/examples/html/inherits.html -text +wt-3.1.7a/doc/examples/html/installdox -text +wt-3.1.7a/doc/examples/html/main_8C.html -text +wt-3.1.7a/doc/examples/html/main_8C_source.html -text +wt-3.1.7a/doc/examples/html/modules.html -text +wt-3.1.7a/doc/examples/html/namespaceWt_1_1Dbo_1_1backend.html -text +wt-3.1.7a/doc/examples/html/namespaceWt_1_1Test.html -text +wt-3.1.7a/doc/examples/html/namespaces.html -text +wt-3.1.7a/doc/examples/html/nav_f.png -text +wt-3.1.7a/doc/examples/html/nav_h.png -text +wt-3.1.7a/doc/examples/html/open.png -text +wt-3.1.7a/doc/examples/html/simpleChat_8C.html -text +wt-3.1.7a/doc/examples/html/simpleChat_8C_source.html -text +wt-3.1.7a/doc/examples/html/structChartConfig_1_1AxisControl-members.html -text +wt-3.1.7a/doc/examples/html/structChartConfig_1_1AxisControl.html -text +wt-3.1.7a/doc/examples/html/structChartConfig_1_1SeriesControl-members.html -text +wt-3.1.7a/doc/examples/html/structChartConfig_1_1SeriesControl.html -text +wt-3.1.7a/doc/examples/html/structContact-members.html -text +wt-3.1.7a/doc/examples/html/structContact.html -text +wt-3.1.7a/doc/examples/html/structGitModel_1_1ChildIndex.html -text +wt-3.1.7a/doc/examples/html/structGit_1_1Object-members.html -text +wt-3.1.7a/doc/examples/html/structGit_1_1Object.html -text +wt-3.1.7a/doc/examples/html/structHangmanDb_1_1Score-members.html -text +wt-3.1.7a/doc/examples/html/structHangmanDb_1_1Score.html -text +wt-3.1.7a/doc/examples/html/structLang-members.html -text +wt-3.1.7a/doc/examples/html/structLang.html -text +wt-3.1.7a/doc/examples/html/tab_a.png -text +wt-3.1.7a/doc/examples/html/tab_b.png -text +wt-3.1.7a/doc/examples/html/tab_h.png -text +wt-3.1.7a/doc/examples/html/tab_s.png -text +wt-3.1.7a/doc/examples/html/tabs.css -text +wt-3.1.7a/doc/examples/html/treeview-dragdrop_2CsvUtil_8C.html -text +wt-3.1.7a/doc/examples/html/treeview-dragdrop_2CsvUtil_8C_source.html -text +wt-3.1.7a/doc/examples/html/treeview-dragdrop_2CsvUtil_8h.html -text +wt-3.1.7a/doc/examples/html/treeview-dragdrop_2CsvUtil_8h_source.html -text +wt-3.1.7a/doc/footer.html -text +wt-3.1.7a/doc/images/ChartWCartesianChart-1.png -text +wt-3.1.7a/doc/images/ChartWCartesianChart-2.png -text +wt-3.1.7a/doc/images/ChartWDataSeries-1.png -text +wt-3.1.7a/doc/images/ChartWPieChart-1.png -text +wt-3.1.7a/doc/images/ExtBorderLayout-1.png -text +wt-3.1.7a/doc/images/ExtBorderLayout-2.png -text +wt-3.1.7a/doc/images/ExtButton-1.png -text +wt-3.1.7a/doc/images/ExtButton-1a.png -text +wt-3.1.7a/doc/images/ExtButton-2.png -text +wt-3.1.7a/doc/images/ExtButton-3.png -text +wt-3.1.7a/doc/images/ExtButton-4.png -text +wt-3.1.7a/doc/images/ExtButton-5.png -text +wt-3.1.7a/doc/images/ExtButton-6.png -text +wt-3.1.7a/doc/images/ExtCalendar-1.png -text +wt-3.1.7a/doc/images/ExtComboBox-1.png -text +wt-3.1.7a/doc/images/ExtDateField-1.png -text +wt-3.1.7a/doc/images/ExtDialog-1.png -text +wt-3.1.7a/doc/images/ExtMenu-1.png -text +wt-3.1.7a/doc/images/ExtMenuItem-1.png -text +wt-3.1.7a/doc/images/ExtMenuItem-2.png -text +wt-3.1.7a/doc/images/ExtMenuItem-3.png -text +wt-3.1.7a/doc/images/ExtMenuItem-4.png -text +wt-3.1.7a/doc/images/ExtMenuItem-5.png -text +wt-3.1.7a/doc/images/ExtMessageBox-1.png -text +wt-3.1.7a/doc/images/ExtProgressDialog-1.png -text +wt-3.1.7a/doc/images/ExtTabWidget-1.png -text +wt-3.1.7a/doc/images/ExtTableView-1.png -text +wt-3.1.7a/doc/images/ExtTableView-2.png -text +wt-3.1.7a/doc/images/ExtTextEdit-1.png -text +wt-3.1.7a/doc/images/ExtToolBar-1.png -text +wt-3.1.7a/doc/images/WAggregateProxyModel-1.png -text +wt-3.1.7a/doc/images/WCalendar-default-1.png -text +wt-3.1.7a/doc/images/WCalendar-polished-1.png -text +wt-3.1.7a/doc/images/WDatePicker-default-1.png -text +wt-3.1.7a/doc/images/WDatePicker-polished-1.png -text +wt-3.1.7a/doc/images/WDialog-default-1.png -text +wt-3.1.7a/doc/images/WDialog-polished-1.png -text +wt-3.1.7a/doc/images/WGroupBox-1.png -text +wt-3.1.7a/doc/images/WInPlaceEdit-1.png -text +wt-3.1.7a/doc/images/WInPlaceEdit-2.png -text +wt-3.1.7a/doc/images/WMessageBox-default-1.png -text +wt-3.1.7a/doc/images/WMessageBox-polished-1.png -text +wt-3.1.7a/doc/images/WOverlayLoadingIndicator.png -text +wt-3.1.7a/doc/images/WPainter.png -text +wt-3.1.7a/doc/images/WPanel-default-1.png -text +wt-3.1.7a/doc/images/WPanel-polished-1.png -text +wt-3.1.7a/doc/images/WPopupMenu-default-1.png -text +wt-3.1.7a/doc/images/WPopupMenu-polished-1.png -text +wt-3.1.7a/doc/images/WSlider-1.png -text +wt-3.1.7a/doc/images/WSuggestionPopup-default-1.png -text +wt-3.1.7a/doc/images/WSuggestionPopup-polished-1.png -text +wt-3.1.7a/doc/images/WTabWidget-default-1.png -text +wt-3.1.7a/doc/images/WTabWidget-polished-1.png -text +wt-3.1.7a/doc/images/WTextEdit-1.png -text +wt-3.1.7a/doc/images/WTree-default-1.png -text +wt-3.1.7a/doc/images/WTree-polished-1.png -text +wt-3.1.7a/doc/images/WTreeTable-default-1.png -text +wt-3.1.7a/doc/images/WTreeTable-polished-1.png -text +wt-3.1.7a/doc/images/WTreeView-default-1.png -text +wt-3.1.7a/doc/images/WTreeView-polished-1.png -text +wt-3.1.7a/doc/images/stripe-30px.gif -text +wt-3.1.7a/doc/main -text +wt-3.1.7a/doc/reference/html/ChartWCartesianChart-1.png -text +wt-3.1.7a/doc/reference/html/ChartWCartesianChart-2.png -text +wt-3.1.7a/doc/reference/html/ChartWDataSeries-1.png -text +wt-3.1.7a/doc/reference/html/ChartWPieChart-1.png -text +wt-3.1.7a/doc/reference/html/ExtButton-1.png -text +wt-3.1.7a/doc/reference/html/ExtButton-1a.png -text +wt-3.1.7a/doc/reference/html/ExtButton-2.png -text +wt-3.1.7a/doc/reference/html/ExtButton-3.png -text +wt-3.1.7a/doc/reference/html/ExtButton-4.png -text +wt-3.1.7a/doc/reference/html/ExtButton-5.png -text +wt-3.1.7a/doc/reference/html/ExtButton-6.png -text +wt-3.1.7a/doc/reference/html/ExtCalendar-1.png -text +wt-3.1.7a/doc/reference/html/ExtComboBox-1.png -text +wt-3.1.7a/doc/reference/html/ExtDateField-1.png -text +wt-3.1.7a/doc/reference/html/ExtDialog-1.png -text +wt-3.1.7a/doc/reference/html/ExtMenu-1.png -text +wt-3.1.7a/doc/reference/html/ExtMenuItem-1.png -text +wt-3.1.7a/doc/reference/html/ExtMenuItem-2.png -text +wt-3.1.7a/doc/reference/html/ExtMenuItem-3.png -text +wt-3.1.7a/doc/reference/html/ExtMenuItem-4.png -text +wt-3.1.7a/doc/reference/html/ExtMenuItem-5.png -text +wt-3.1.7a/doc/reference/html/ExtMessageBox-1.png -text +wt-3.1.7a/doc/reference/html/ExtProgressDialog-1.png -text +wt-3.1.7a/doc/reference/html/ExtTabWidget-1.png -text +wt-3.1.7a/doc/reference/html/ExtTableView-1.png -text +wt-3.1.7a/doc/reference/html/ExtTableView-2.png -text +wt-3.1.7a/doc/reference/html/ExtTextEdit-1.png -text +wt-3.1.7a/doc/reference/html/ExtToolBar-1.png -text +wt-3.1.7a/doc/reference/html/InstallationUnix.html -text +wt-3.1.7a/doc/reference/html/InstallationWindows.html -text +wt-3.1.7a/doc/reference/html/Releasenotes.html -text +wt-3.1.7a/doc/reference/html/WAggregateProxyModel-1.png -text +wt-3.1.7a/doc/reference/html/WCalendar-default-1.png -text +wt-3.1.7a/doc/reference/html/WCalendar-polished-1.png -text +wt-3.1.7a/doc/reference/html/WDatePicker-default-1.png -text +wt-3.1.7a/doc/reference/html/WDatePicker-polished-1.png -text +wt-3.1.7a/doc/reference/html/WDialog-default-1.png -text +wt-3.1.7a/doc/reference/html/WDialog-polished-1.png -text +wt-3.1.7a/doc/reference/html/WGroupBox-1.png -text +wt-3.1.7a/doc/reference/html/WInPlaceEdit-1.png -text +wt-3.1.7a/doc/reference/html/WInPlaceEdit-2.png -text +wt-3.1.7a/doc/reference/html/WMessageBox-default-1.png -text +wt-3.1.7a/doc/reference/html/WMessageBox-polished-1.png -text +wt-3.1.7a/doc/reference/html/WOverlayLoadingIndicator.png -text +wt-3.1.7a/doc/reference/html/WPainter.png -text +wt-3.1.7a/doc/reference/html/WPanel-default-1.png -text +wt-3.1.7a/doc/reference/html/WPanel-polished-1.png -text +wt-3.1.7a/doc/reference/html/WPopupMenu-default-1.png -text +wt-3.1.7a/doc/reference/html/WPopupMenu-polished-1.png -text +wt-3.1.7a/doc/reference/html/WSlider-1.png -text +wt-3.1.7a/doc/reference/html/WSuggestionPopup-default-1.png -text +wt-3.1.7a/doc/reference/html/WSuggestionPopup-polished-1.png -text +wt-3.1.7a/doc/reference/html/WTabWidget-default-1.png -text +wt-3.1.7a/doc/reference/html/WTabWidget-polished-1.png -text +wt-3.1.7a/doc/reference/html/WTextEdit-1.png -text +wt-3.1.7a/doc/reference/html/WTree-default-1.png -text +wt-3.1.7a/doc/reference/html/WTree-polished-1.png -text +wt-3.1.7a/doc/reference/html/WTreeTable-default-1.png -text +wt-3.1.7a/doc/reference/html/WTreeTable-polished-1.png -text +wt-3.1.7a/doc/reference/html/WTreeView-default-1.png -text +wt-3.1.7a/doc/reference/html/WTreeView-polished-1.png -text +wt-3.1.7a/doc/reference/html/annotated.html -text +wt-3.1.7a/doc/reference/html/bc_s.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__default__traits-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__traits-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1query__result__traits-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1sql__value__traits-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSignal-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSignal.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSlot-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1JSlot.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Signal-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Signal.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1Touch-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1Touch.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorder-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorder.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBreak-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBreak.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBrush-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WBrush.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WColor-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WColor.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDate-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDate.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDialog-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDialog.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFont-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFont.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLabel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLabel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLength-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLength.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineF-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLineF.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogger-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogger.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenu-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenu.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WObject-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WObject.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainter-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainter.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPanel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPanel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPen-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPen.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPoint-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPoint.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPointF-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPointF.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectF-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRectF.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WResource-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WResource.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WServer-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WServer.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WShadow-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WShadow.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSlider-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSlider.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSound-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSound.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WString-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WString.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTable-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTable.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableView-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableView.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WText-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WText.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTime-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTime.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTimer-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTimer.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTransform-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTransform.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTree-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTree.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidator-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidator.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidget-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidget.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem-members.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem.html -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/classes.html -text +wt-3.1.7a/doc/reference/html/closed.png -text +wt-3.1.7a/doc/reference/html/deprecated.html -text +wt-3.1.7a/doc/reference/html/doxygen.css -text +wt-3.1.7a/doc/reference/html/doxygen.png -text +wt-3.1.7a/doc/reference/html/example.html -text +wt-3.1.7a/doc/reference/html/functions.html -text +wt-3.1.7a/doc/reference/html/functions_0x62.html -text +wt-3.1.7a/doc/reference/html/functions_0x63.html -text +wt-3.1.7a/doc/reference/html/functions_0x64.html -text +wt-3.1.7a/doc/reference/html/functions_0x65.html -text +wt-3.1.7a/doc/reference/html/functions_0x66.html -text +wt-3.1.7a/doc/reference/html/functions_0x67.html -text +wt-3.1.7a/doc/reference/html/functions_0x68.html -text +wt-3.1.7a/doc/reference/html/functions_0x69.html -text +wt-3.1.7a/doc/reference/html/functions_0x6a.html -text +wt-3.1.7a/doc/reference/html/functions_0x6b.html -text +wt-3.1.7a/doc/reference/html/functions_0x6c.html -text +wt-3.1.7a/doc/reference/html/functions_0x6d.html -text +wt-3.1.7a/doc/reference/html/functions_0x6e.html -text +wt-3.1.7a/doc/reference/html/functions_0x6f.html -text +wt-3.1.7a/doc/reference/html/functions_0x70.html -text +wt-3.1.7a/doc/reference/html/functions_0x71.html -text +wt-3.1.7a/doc/reference/html/functions_0x72.html -text +wt-3.1.7a/doc/reference/html/functions_0x73.html -text +wt-3.1.7a/doc/reference/html/functions_0x74.html -text +wt-3.1.7a/doc/reference/html/functions_0x75.html -text +wt-3.1.7a/doc/reference/html/functions_0x76.html -text +wt-3.1.7a/doc/reference/html/functions_0x77.html -text +wt-3.1.7a/doc/reference/html/functions_0x78.html -text +wt-3.1.7a/doc/reference/html/functions_0x79.html -text +wt-3.1.7a/doc/reference/html/functions_0x7a.html -text +wt-3.1.7a/doc/reference/html/functions_0x7e.html -text +wt-3.1.7a/doc/reference/html/functions_enum.html -text +wt-3.1.7a/doc/reference/html/functions_eval.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x62.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x63.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x64.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x65.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x66.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x67.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x68.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x69.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6a.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6b.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6c.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6d.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6e.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x6f.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x70.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x72.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x73.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x74.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x75.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x76.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x77.html -text +wt-3.1.7a/doc/reference/html/functions_eval_0x78.html -text +wt-3.1.7a/doc/reference/html/functions_func.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x62.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x63.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x64.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x65.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x66.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x67.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x68.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x69.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6a.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6b.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6c.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6d.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6e.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x6f.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x70.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x71.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x72.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x73.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x74.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x75.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x76.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x77.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x78.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x79.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x7a.html -text +wt-3.1.7a/doc/reference/html/functions_func_0x7e.html -text +wt-3.1.7a/doc/reference/html/functions_type.html -text +wt-3.1.7a/doc/reference/html/functions_vars.html -text +wt-3.1.7a/doc/reference/html/graph_legend.html -text +wt-3.1.7a/doc/reference/html/graph_legend.md5 -text +wt-3.1.7a/doc/reference/html/graph_legend.png -text +wt-3.1.7a/doc/reference/html/group__charts.html -text +wt-3.1.7a/doc/reference/html/group__dbo.html -text +wt-3.1.7a/doc/reference/html/group__ext.html -text +wt-3.1.7a/doc/reference/html/group__modelview.html -text +wt-3.1.7a/doc/reference/html/group__painting.html -text +wt-3.1.7a/doc/reference/html/group__signalslot.html -text +wt-3.1.7a/doc/reference/html/group__style.html -text +wt-3.1.7a/doc/reference/html/hierarchy.html -text +wt-3.1.7a/doc/reference/html/index.html -text +wt-3.1.7a/doc/reference/html/inherit__graph__0.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__0.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__0.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__1.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__1.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__1.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__10.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__10.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__10.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__11.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__11.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__11.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__12.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__12.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__12.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__13.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__13.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__13.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__14.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__14.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__14.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__15.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__15.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__15.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__16.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__16.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__16.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__17.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__17.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__17.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__18.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__18.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__18.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__19.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__19.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__19.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__2.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__2.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__2.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__20.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__20.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__20.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__21.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__21.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__21.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__22.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__22.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__22.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__23.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__23.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__23.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__24.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__24.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__24.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__25.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__25.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__25.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__26.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__26.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__26.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__27.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__27.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__27.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__28.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__28.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__28.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__29.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__29.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__29.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__3.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__3.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__3.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__30.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__30.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__30.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__31.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__31.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__31.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__32.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__32.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__32.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__33.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__33.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__33.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__34.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__34.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__34.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__35.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__35.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__35.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__36.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__36.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__36.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__37.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__37.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__37.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__38.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__38.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__38.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__39.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__39.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__39.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__4.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__4.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__4.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__40.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__40.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__40.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__41.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__41.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__41.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__42.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__42.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__42.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__43.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__43.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__43.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__44.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__44.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__44.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__45.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__45.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__45.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__46.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__46.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__46.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__47.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__47.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__47.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__48.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__48.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__48.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__49.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__49.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__49.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__5.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__5.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__5.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__50.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__50.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__50.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__51.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__51.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__51.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__52.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__52.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__52.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__53.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__53.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__53.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__54.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__54.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__54.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__55.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__55.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__55.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__56.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__56.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__56.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__57.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__57.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__57.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__58.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__58.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__58.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__59.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__59.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__59.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__6.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__6.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__6.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__60.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__60.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__60.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__61.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__61.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__61.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__62.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__62.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__62.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__63.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__63.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__63.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__64.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__64.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__64.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__65.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__65.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__65.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__66.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__66.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__66.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__67.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__67.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__67.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__68.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__68.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__68.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__69.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__69.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__69.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__7.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__7.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__7.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__70.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__70.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__70.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__71.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__71.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__71.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__72.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__72.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__72.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__73.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__73.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__73.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__74.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__74.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__74.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__75.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__75.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__75.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__76.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__76.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__76.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__77.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__77.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__77.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__78.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__78.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__78.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__79.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__79.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__79.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__8.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__8.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__8.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__80.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__80.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__80.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__81.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__81.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__81.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__82.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__82.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__82.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__83.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__83.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__83.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__84.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__84.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__84.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__85.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__85.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__85.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__86.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__86.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__86.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__87.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__87.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__87.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__88.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__88.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__88.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__89.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__89.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__89.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__9.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__9.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__9.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__90.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__90.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__90.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__91.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__91.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__91.png -text +wt-3.1.7a/doc/reference/html/inherit__graph__92.map -text +wt-3.1.7a/doc/reference/html/inherit__graph__92.md5 -text +wt-3.1.7a/doc/reference/html/inherit__graph__92.png -text +wt-3.1.7a/doc/reference/html/inherits.html -text +wt-3.1.7a/doc/reference/html/installdox -text +wt-3.1.7a/doc/reference/html/modules.html -text +wt-3.1.7a/doc/reference/html/namespaceWt.html -text +wt-3.1.7a/doc/reference/html/namespaceWt_1_1Chart.html -text +wt-3.1.7a/doc/reference/html/namespaceWt_1_1Dbo.html -text +wt-3.1.7a/doc/reference/html/namespaceWt_1_1Ext.html -text +wt-3.1.7a/doc/reference/html/namespaceWt_1_1Http.html -text +wt-3.1.7a/doc/reference/html/namespacemembers.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x62.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x63.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x64.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x65.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x66.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x67.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x68.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x69.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x6b.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x6c.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x6d.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x6e.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x6f.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x70.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x71.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x72.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x73.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x74.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x75.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x76.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x77.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x78.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x79.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_0x7a.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_enum.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x62.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x63.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x64.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x65.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x66.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x67.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x68.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x69.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6b.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6c.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6d.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6e.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6f.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x70.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x71.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x72.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x73.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x74.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x75.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x76.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x77.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x78.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x79.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x7a.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_func.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_type.html -text +wt-3.1.7a/doc/reference/html/namespacemembers_vars.html -text +wt-3.1.7a/doc/reference/html/namespaces.html -text +wt-3.1.7a/doc/reference/html/nav_f.png -text +wt-3.1.7a/doc/reference/html/nav_h.png -text +wt-3.1.7a/doc/reference/html/open.png -text +wt-3.1.7a/doc/reference/html/overview.html -text +wt-3.1.7a/doc/reference/html/pages.html -text +wt-3.1.7a/doc/reference/html/search/all_61.html -text +wt-3.1.7a/doc/reference/html/search/all_62.html -text +wt-3.1.7a/doc/reference/html/search/all_63.html -text +wt-3.1.7a/doc/reference/html/search/all_64.html -text +wt-3.1.7a/doc/reference/html/search/all_65.html -text +wt-3.1.7a/doc/reference/html/search/all_66.html -text +wt-3.1.7a/doc/reference/html/search/all_67.html -text +wt-3.1.7a/doc/reference/html/search/all_68.html -text +wt-3.1.7a/doc/reference/html/search/all_69.html -text +wt-3.1.7a/doc/reference/html/search/all_6a.html -text +wt-3.1.7a/doc/reference/html/search/all_6b.html -text +wt-3.1.7a/doc/reference/html/search/all_6c.html -text +wt-3.1.7a/doc/reference/html/search/all_6d.html -text +wt-3.1.7a/doc/reference/html/search/all_6e.html -text +wt-3.1.7a/doc/reference/html/search/all_6f.html -text +wt-3.1.7a/doc/reference/html/search/all_70.html -text +wt-3.1.7a/doc/reference/html/search/all_71.html -text +wt-3.1.7a/doc/reference/html/search/all_72.html -text +wt-3.1.7a/doc/reference/html/search/all_73.html -text +wt-3.1.7a/doc/reference/html/search/all_74.html -text +wt-3.1.7a/doc/reference/html/search/all_75.html -text +wt-3.1.7a/doc/reference/html/search/all_76.html -text +wt-3.1.7a/doc/reference/html/search/all_77.html -text +wt-3.1.7a/doc/reference/html/search/all_78.html -text +wt-3.1.7a/doc/reference/html/search/all_79.html -text +wt-3.1.7a/doc/reference/html/search/all_7a.html -text +wt-3.1.7a/doc/reference/html/search/all_7e.html -text +wt-3.1.7a/doc/reference/html/search/classes_61.html -text +wt-3.1.7a/doc/reference/html/search/classes_62.html -text +wt-3.1.7a/doc/reference/html/search/classes_63.html -text +wt-3.1.7a/doc/reference/html/search/classes_64.html -text +wt-3.1.7a/doc/reference/html/search/classes_65.html -text +wt-3.1.7a/doc/reference/html/search/classes_66.html -text +wt-3.1.7a/doc/reference/html/search/classes_69.html -text +wt-3.1.7a/doc/reference/html/search/classes_6a.html -text +wt-3.1.7a/doc/reference/html/search/classes_6c.html -text +wt-3.1.7a/doc/reference/html/search/classes_6d.html -text +wt-3.1.7a/doc/reference/html/search/classes_6e.html -text +wt-3.1.7a/doc/reference/html/search/classes_6f.html -text +wt-3.1.7a/doc/reference/html/search/classes_70.html -text +wt-3.1.7a/doc/reference/html/search/classes_71.html -text +wt-3.1.7a/doc/reference/html/search/classes_72.html -text +wt-3.1.7a/doc/reference/html/search/classes_73.html -text +wt-3.1.7a/doc/reference/html/search/classes_74.html -text +wt-3.1.7a/doc/reference/html/search/classes_75.html -text +wt-3.1.7a/doc/reference/html/search/classes_77.html -text +wt-3.1.7a/doc/reference/html/search/close.png -text +wt-3.1.7a/doc/reference/html/search/enums_61.html -text +wt-3.1.7a/doc/reference/html/search/enums_62.html -text +wt-3.1.7a/doc/reference/html/search/enums_63.html -text +wt-3.1.7a/doc/reference/html/search/enums_64.html -text +wt-3.1.7a/doc/reference/html/search/enums_65.html -text +wt-3.1.7a/doc/reference/html/search/enums_66.html -text +wt-3.1.7a/doc/reference/html/search/enums_67.html -text +wt-3.1.7a/doc/reference/html/search/enums_68.html -text +wt-3.1.7a/doc/reference/html/search/enums_69.html -text +wt-3.1.7a/doc/reference/html/search/enums_6b.html -text +wt-3.1.7a/doc/reference/html/search/enums_6c.html -text +wt-3.1.7a/doc/reference/html/search/enums_6d.html -text +wt-3.1.7a/doc/reference/html/search/enums_6f.html -text +wt-3.1.7a/doc/reference/html/search/enums_70.html -text +wt-3.1.7a/doc/reference/html/search/enums_72.html -text +wt-3.1.7a/doc/reference/html/search/enums_73.html -text +wt-3.1.7a/doc/reference/html/search/enums_74.html -text +wt-3.1.7a/doc/reference/html/search/enums_75.html -text +wt-3.1.7a/doc/reference/html/search/enums_76.html -text +wt-3.1.7a/doc/reference/html/search/enums_77.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_61.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_62.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_63.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_64.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_65.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_66.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_67.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_68.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_69.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6a.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6b.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6c.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6d.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6e.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_6f.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_70.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_71.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_72.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_73.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_74.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_75.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_76.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_77.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_78.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_79.html -text +wt-3.1.7a/doc/reference/html/search/enumvalues_7a.html -text +wt-3.1.7a/doc/reference/html/search/functions_61.html -text +wt-3.1.7a/doc/reference/html/search/functions_62.html -text +wt-3.1.7a/doc/reference/html/search/functions_63.html -text +wt-3.1.7a/doc/reference/html/search/functions_64.html -text +wt-3.1.7a/doc/reference/html/search/functions_65.html -text +wt-3.1.7a/doc/reference/html/search/functions_66.html -text +wt-3.1.7a/doc/reference/html/search/functions_67.html -text +wt-3.1.7a/doc/reference/html/search/functions_68.html -text +wt-3.1.7a/doc/reference/html/search/functions_69.html -text +wt-3.1.7a/doc/reference/html/search/functions_6a.html -text +wt-3.1.7a/doc/reference/html/search/functions_6b.html -text +wt-3.1.7a/doc/reference/html/search/functions_6c.html -text +wt-3.1.7a/doc/reference/html/search/functions_6d.html -text +wt-3.1.7a/doc/reference/html/search/functions_6e.html -text +wt-3.1.7a/doc/reference/html/search/functions_6f.html -text +wt-3.1.7a/doc/reference/html/search/functions_70.html -text +wt-3.1.7a/doc/reference/html/search/functions_71.html -text +wt-3.1.7a/doc/reference/html/search/functions_72.html -text +wt-3.1.7a/doc/reference/html/search/functions_73.html -text +wt-3.1.7a/doc/reference/html/search/functions_74.html -text +wt-3.1.7a/doc/reference/html/search/functions_75.html -text +wt-3.1.7a/doc/reference/html/search/functions_76.html -text +wt-3.1.7a/doc/reference/html/search/functions_77.html -text +wt-3.1.7a/doc/reference/html/search/functions_78.html -text +wt-3.1.7a/doc/reference/html/search/functions_79.html -text +wt-3.1.7a/doc/reference/html/search/functions_7a.html -text +wt-3.1.7a/doc/reference/html/search/functions_7e.html -text +wt-3.1.7a/doc/reference/html/search/mag_sel.png -text +wt-3.1.7a/doc/reference/html/search/namespaces_77.html -text +wt-3.1.7a/doc/reference/html/search/nomatches.html -text +wt-3.1.7a/doc/reference/html/search/search.css -text +wt-3.1.7a/doc/reference/html/search/search.js -text +wt-3.1.7a/doc/reference/html/search/search_l.png -text +wt-3.1.7a/doc/reference/html/search/search_m.png -text +wt-3.1.7a/doc/reference/html/search/search_r.png -text +wt-3.1.7a/doc/reference/html/search/typedefs_61.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_63.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_64.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_69.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_6d.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_70.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_74.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_75.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_76.html -text +wt-3.1.7a/doc/reference/html/search/typedefs_77.html -text +wt-3.1.7a/doc/reference/html/search/variables_61.html -text +wt-3.1.7a/doc/reference/html/search/variables_63.html -text +wt-3.1.7a/doc/reference/html/search/variables_64.html -text +wt-3.1.7a/doc/reference/html/search/variables_65.html -text +wt-3.1.7a/doc/reference/html/search/variables_68.html -text +wt-3.1.7a/doc/reference/html/search/variables_69.html -text +wt-3.1.7a/doc/reference/html/search/variables_6c.html -text +wt-3.1.7a/doc/reference/html/search/variables_6d.html -text +wt-3.1.7a/doc/reference/html/search/variables_6e.html -text +wt-3.1.7a/doc/reference/html/search/variables_73.html -text +wt-3.1.7a/doc/reference/html/search/variables_74.html -text +wt-3.1.7a/doc/reference/html/search/variables_76.html -text +wt-3.1.7a/doc/reference/html/search/variables_77.html -text +wt-3.1.7a/doc/reference/html/search/variables_78.html -text +wt-3.1.7a/doc/reference/html/search/variables_79.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DirectBinding.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DynamicBinding.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.map -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.md5 -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.png -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1query__result__traits.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1sql__value__traits.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1Sep.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1TimeStamp.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits-members.html -text +wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits.html -text +wt-3.1.7a/doc/reference/html/tab_a.png -text +wt-3.1.7a/doc/reference/html/tab_b.png -text +wt-3.1.7a/doc/reference/html/tab_h.png -text +wt-3.1.7a/doc/reference/html/tab_s.png -text +wt-3.1.7a/doc/reference/html/tabs.css -text +wt-3.1.7a/doc/tutorial/dbo/tutorial.doc -text +wt-3.1.7a/doc/tutorial/dbo/tutorial.html -text +wt-3.1.7a/doc/tutorial/wt/wt-sdj-action.png -text +wt-3.1.7a/doc/tutorial/wt/wt-sdj-login.png -text +wt-3.1.7a/doc/tutorial/wt/wt-sdj-models.png -text +wt-3.1.7a/doc/tutorial/wt/wt-sdj.pdf -text +wt-3.1.7a/doc/tutorial/wt/wt-sdj.xhtml -text +wt-3.1.7a/examples/CMakeLists.txt -text +wt-3.1.7a/examples/Doxyfile -text +wt-3.1.7a/examples/blog/BlogRSSFeed.C -text +wt-3.1.7a/examples/blog/BlogRSSFeed.h -text +wt-3.1.7a/examples/blog/BlogSession.C -text +wt-3.1.7a/examples/blog/BlogSession.h -text +wt-3.1.7a/examples/blog/CMakeLists.txt -text +wt-3.1.7a/examples/blog/asciidoc/asciidoc.C -text +wt-3.1.7a/examples/blog/asciidoc/asciidoc.h -text +wt-3.1.7a/examples/blog/blog.C -text +wt-3.1.7a/examples/blog/blog.xml -text +wt-3.1.7a/examples/blog/css/asciidoc.css -text +wt-3.1.7a/examples/blog/css/blog.css -text +wt-3.1.7a/examples/blog/css/blogexample.css -text +wt-3.1.7a/examples/blog/css/comment.png -text +wt-3.1.7a/examples/blog/css/comment_edit.png -text +wt-3.1.7a/examples/blog/css/rss.png -text +wt-3.1.7a/examples/blog/model/Comment.C -text +wt-3.1.7a/examples/blog/model/Comment.h -text +wt-3.1.7a/examples/blog/model/Post.C -text +wt-3.1.7a/examples/blog/model/Post.h -text +wt-3.1.7a/examples/blog/model/Tag.C -text +wt-3.1.7a/examples/blog/model/Tag.h -text +wt-3.1.7a/examples/blog/model/User.C -text +wt-3.1.7a/examples/blog/model/User.h -text +wt-3.1.7a/examples/blog/view/BlogView.C -text +wt-3.1.7a/examples/blog/view/BlogView.h -text +wt-3.1.7a/examples/blog/view/CommentView.C -text +wt-3.1.7a/examples/blog/view/CommentView.h -text +wt-3.1.7a/examples/blog/view/EditUsers.C -text +wt-3.1.7a/examples/blog/view/EditUsers.h -text +wt-3.1.7a/examples/blog/view/PostView.C -text +wt-3.1.7a/examples/blog/view/PostView.h -text +wt-3.1.7a/examples/bobsmith/CMakeLists.txt -text +wt-3.1.7a/examples/bobsmith/bobsmith.C -text +wt-3.1.7a/examples/charts/CMakeLists.txt -text +wt-3.1.7a/examples/charts/ChartConfig.C -text +wt-3.1.7a/examples/charts/ChartConfig.h -text +wt-3.1.7a/examples/charts/ChartsApplication.C -text +wt-3.1.7a/examples/charts/ChartsExample.C -text +wt-3.1.7a/examples/charts/ChartsExample.h -text +wt-3.1.7a/examples/charts/CsvUtil.C -text +wt-3.1.7a/examples/charts/CsvUtil.h -text +wt-3.1.7a/examples/charts/PanelList.C -text +wt-3.1.7a/examples/charts/PanelList.h -text +wt-3.1.7a/examples/charts/category.csv -text +wt-3.1.7a/examples/charts/charts.css -text +wt-3.1.7a/examples/charts/charts.xml -text +wt-3.1.7a/examples/charts/timeseries.csv -text +wt-3.1.7a/examples/codeview/CMakeLists.txt -text +wt-3.1.7a/examples/codeview/CodeSession.C -text +wt-3.1.7a/examples/codeview/CodeSession.h -text +wt-3.1.7a/examples/codeview/CoderApplication.C -text +wt-3.1.7a/examples/codeview/CoderApplication.h -text +wt-3.1.7a/examples/codeview/CoderWidget.C -text +wt-3.1.7a/examples/codeview/CoderWidget.h -text +wt-3.1.7a/examples/codeview/ObserverWidget.C -text +wt-3.1.7a/examples/codeview/ObserverWidget.h -text +wt-3.1.7a/examples/codeview/coder.css -text +wt-3.1.7a/examples/codeview/prettify/prettify.css -text +wt-3.1.7a/examples/codeview/prettify/prettify.js -text +wt-3.1.7a/examples/codeview/prettify/prettify.min.js -text +wt-3.1.7a/examples/composer/AddresseeEdit.C -text +wt-3.1.7a/examples/composer/AddresseeEdit.h -text +wt-3.1.7a/examples/composer/Attachment.h -text +wt-3.1.7a/examples/composer/AttachmentEdit.C -text +wt-3.1.7a/examples/composer/AttachmentEdit.h -text +wt-3.1.7a/examples/composer/CMakeLists.txt -text +wt-3.1.7a/examples/composer/ComposeExample.C -text +wt-3.1.7a/examples/composer/ComposeExample.h -text +wt-3.1.7a/examples/composer/Composer.C -text +wt-3.1.7a/examples/composer/Composer.h -text +wt-3.1.7a/examples/composer/Contact.h -text +wt-3.1.7a/examples/composer/ContactSuggestions.C -text +wt-3.1.7a/examples/composer/ContactSuggestions.h -text +wt-3.1.7a/examples/composer/Label.C -text +wt-3.1.7a/examples/composer/Label.h -text +wt-3.1.7a/examples/composer/Option.C -text +wt-3.1.7a/examples/composer/Option.h -text +wt-3.1.7a/examples/composer/OptionList.C -text +wt-3.1.7a/examples/composer/OptionList.h -text +wt-3.1.7a/examples/composer/composer.css -text +wt-3.1.7a/examples/composer/composer.xml -text +wt-3.1.7a/examples/composer/icons/paperclip.png -text +wt-3.1.7a/examples/dialog/CMakeLists.txt -text +wt-3.1.7a/examples/dialog/DialogExample.C -text +wt-3.1.7a/examples/dialog/DialogExample.h -text +wt-3.1.7a/examples/dragdrop/CMakeLists.txt -text +wt-3.1.7a/examples/dragdrop/Character.C -text +wt-3.1.7a/examples/dragdrop/Character.h -text +wt-3.1.7a/examples/dragdrop/DragApplication.C -text +wt-3.1.7a/examples/dragdrop/DragExample.C -text +wt-3.1.7a/examples/dragdrop/DragExample.h -text +wt-3.1.7a/examples/dragdrop/dragdrop.css -text +wt-3.1.7a/examples/dragdrop/icons/blue-pill-small.png -text +wt-3.1.7a/examples/dragdrop/icons/blue-pill.jpg -text +wt-3.1.7a/examples/dragdrop/icons/red-pill-small.png -text +wt-3.1.7a/examples/dragdrop/icons/red-pill.jpg -text +wt-3.1.7a/examples/extkitchen/CMakeLists.txt -text +wt-3.1.7a/examples/extkitchen/CsvUtil.C -text +wt-3.1.7a/examples/extkitchen/CsvUtil.h -text +wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.C -text +wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.h -text +wt-3.1.7a/examples/extkitchen/compare.csv -text +wt-3.1.7a/examples/extkitchen/extkitchen.css -text +wt-3.1.7a/examples/extkitchen/extkitchen.xml -text +wt-3.1.7a/examples/feature/CMakeLists.txt -text +wt-3.1.7a/examples/feature/dbo/CMakeLists.txt -text +wt-3.1.7a/examples/feature/dbo/tutorial1.C -text +wt-3.1.7a/examples/feature/dbo/tutorial2.C -text +wt-3.1.7a/examples/feature/dbo/tutorial3.C -text +wt-3.1.7a/examples/feature/dbo/tutorial4.C -text +wt-3.1.7a/examples/feature/dbo/tutorial5.C -text +wt-3.1.7a/examples/feature/serverpush/CMakeLists.txt -text +wt-3.1.7a/examples/feature/serverpush/ServerPush.C -text +wt-3.1.7a/examples/feature/socketnotifier/CMakeLists.txt -text +wt-3.1.7a/examples/feature/socketnotifier/SocketNotifier.C -text +wt-3.1.7a/examples/feature/suggestionpopup/CMakeLists.txt -text +wt-3.1.7a/examples/feature/suggestionpopup/SuggestionPopup.C -text +wt-3.1.7a/examples/feature/suggestionpopup/text.xml -text +wt-3.1.7a/examples/feature/video/CMakeLists.txt -text +wt-3.1.7a/examples/feature/video/sintel_trailer.jpg -text +wt-3.1.7a/examples/feature/video/text.xml -text +wt-3.1.7a/examples/feature/video/video.C -text +wt-3.1.7a/examples/feature/widgetset/CMakeLists.txt -text +wt-3.1.7a/examples/feature/widgetset/hello.C -text +wt-3.1.7a/examples/feature/widgetset/hello.html -text +wt-3.1.7a/examples/filetreetable/CMakeLists.txt -text +wt-3.1.7a/examples/filetreetable/FileTreeExample.C -text +wt-3.1.7a/examples/filetreetable/FileTreeTable.C -text +wt-3.1.7a/examples/filetreetable/FileTreeTable.h -text +wt-3.1.7a/examples/filetreetable/FileTreeTableNode.C -text +wt-3.1.7a/examples/filetreetable/FileTreeTableNode.h -text +wt-3.1.7a/examples/filetreetable/filetree.css -text +wt-3.1.7a/examples/filetreetable/icons/document.png -text +wt-3.1.7a/examples/filetreetable/icons/yellow-folder-closed.png -text +wt-3.1.7a/examples/filetreetable/icons/yellow-folder-open.png -text +wt-3.1.7a/examples/form/CMakeLists.txt -text +wt-3.1.7a/examples/form/Form.C -text +wt-3.1.7a/examples/form/Form.h -text +wt-3.1.7a/examples/form/FormExample.C -text +wt-3.1.7a/examples/form/FormExample.h -text +wt-3.1.7a/examples/form/form-example.xml -text +wt-3.1.7a/examples/form/form-example_nl.xml -text +wt-3.1.7a/examples/form/icons/invalid.png -text +wt-3.1.7a/examples/gitmodel/CMakeLists.txt -text +wt-3.1.7a/examples/gitmodel/Git.C -text +wt-3.1.7a/examples/gitmodel/Git.h -text +wt-3.1.7a/examples/gitmodel/GitModel.C -text +wt-3.1.7a/examples/gitmodel/GitModel.h -text +wt-3.1.7a/examples/gitmodel/GitView.C -text +wt-3.1.7a/examples/gitmodel/gitview.css -text +wt-3.1.7a/examples/gitmodel/icons/git-blob.png -text +wt-3.1.7a/examples/gitmodel/icons/git-tree.png -text +wt-3.1.7a/examples/hangman/.htaccess -text +wt-3.1.7a/examples/hangman/CMakeLists.txt -text +wt-3.1.7a/examples/hangman/Dictionary.C -text +wt-3.1.7a/examples/hangman/Dictionary.h -text +wt-3.1.7a/examples/hangman/HangmanDb.C -text +wt-3.1.7a/examples/hangman/HangmanDb.h -text +wt-3.1.7a/examples/hangman/HangmanGame.C -text +wt-3.1.7a/examples/hangman/HangmanGame.h -text +wt-3.1.7a/examples/hangman/HangmanWidget.C -text +wt-3.1.7a/examples/hangman/HangmanWidget.h -text +wt-3.1.7a/examples/hangman/HighScoresWidget.C -text +wt-3.1.7a/examples/hangman/HighScoresWidget.h -text +wt-3.1.7a/examples/hangman/LoginWidget.C -text +wt-3.1.7a/examples/hangman/LoginWidget.h -text +wt-3.1.7a/examples/hangman/dbscript -text +wt-3.1.7a/examples/hangman/dict-nl.txt -text +wt-3.1.7a/examples/hangman/dict.txt -text +wt-3.1.7a/examples/hangman/hangman.C -text +wt-3.1.7a/examples/hangman/icons/hangman0.png -text +wt-3.1.7a/examples/hangman/icons/hangman1.png -text +wt-3.1.7a/examples/hangman/icons/hangman2.png -text +wt-3.1.7a/examples/hangman/icons/hangman3.png -text +wt-3.1.7a/examples/hangman/icons/hangman4.png -text +wt-3.1.7a/examples/hangman/icons/hangman5.png -text +wt-3.1.7a/examples/hangman/icons/hangman6.png -text +wt-3.1.7a/examples/hangman/icons/hangman7.png -text +wt-3.1.7a/examples/hangman/icons/hangman8.png -text +wt-3.1.7a/examples/hangman/icons/hangman9.png -text +wt-3.1.7a/examples/hangman/icons/hangmanhurray.png -text +wt-3.1.7a/examples/hello/CMakeLists.txt -text +wt-3.1.7a/examples/hello/hello.C -text +wt-3.1.7a/examples/javascript/CMakeLists.txt -text +wt-3.1.7a/examples/javascript/JavascriptExample.C -text +wt-3.1.7a/examples/javascript/JavascriptExample.h -text +wt-3.1.7a/examples/javascript/Popup.C -text +wt-3.1.7a/examples/javascript/Popup.h -text +wt-3.1.7a/examples/mandelbrot/CMakeLists.txt -text +wt-3.1.7a/examples/mandelbrot/MandelbrotExample.C -text +wt-3.1.7a/examples/mandelbrot/MandelbrotExample.h -text +wt-3.1.7a/examples/mandelbrot/MandelbrotImage.C -text +wt-3.1.7a/examples/mandelbrot/MandelbrotImage.h -text +wt-3.1.7a/examples/mission/CMakeLists.txt -text +wt-3.1.7a/examples/mission/CountDownWidget.C -text +wt-3.1.7a/examples/mission/CountDownWidget.h -text +wt-3.1.7a/examples/mission/impossible.C -text +wt-3.1.7a/examples/painting/CMakeLists.txt -text +wt-3.1.7a/examples/painting/PaintApplication.C -text +wt-3.1.7a/examples/painting/PaintExample.C -text +wt-3.1.7a/examples/painting/PaintExample.h -text +wt-3.1.7a/examples/painting/ShapesWidget.C -text +wt-3.1.7a/examples/painting/ShapesWidget.h -text +wt-3.1.7a/examples/painting/painting.css -text +wt-3.1.7a/examples/planner/AllEntriesDialog.C -text +wt-3.1.7a/examples/planner/AllEntriesDialog.h -text +wt-3.1.7a/examples/planner/CMakeLists.txt -text +wt-3.1.7a/examples/planner/CalendarCell.C -text +wt-3.1.7a/examples/planner/CalendarCell.h -text +wt-3.1.7a/examples/planner/Entry.h -text +wt-3.1.7a/examples/planner/EntryDialog.C -text +wt-3.1.7a/examples/planner/EntryDialog.h -text +wt-3.1.7a/examples/planner/Login.C -text +wt-3.1.7a/examples/planner/Login.h -text +wt-3.1.7a/examples/planner/MyCaptcha.C -text +wt-3.1.7a/examples/planner/MyCaptcha.h -text +wt-3.1.7a/examples/planner/PlannerApplication.C -text +wt-3.1.7a/examples/planner/PlannerApplication.h -text +wt-3.1.7a/examples/planner/PlannerCalendar.C -text +wt-3.1.7a/examples/planner/PlannerCalendar.h -text +wt-3.1.7a/examples/planner/Shape.C -text +wt-3.1.7a/examples/planner/Shape.h -text +wt-3.1.7a/examples/planner/ShapesWidget.C -text +wt-3.1.7a/examples/planner/ShapesWidget.h -text +wt-3.1.7a/examples/planner/TimeSuggestions.C -text +wt-3.1.7a/examples/planner/TimeSuggestions.h -text +wt-3.1.7a/examples/planner/UserAccount.C -text +wt-3.1.7a/examples/planner/UserAccount.h -text +wt-3.1.7a/examples/planner/calendar.xml -text +wt-3.1.7a/examples/planner/captcha.xml -text +wt-3.1.7a/examples/planner/planner.C -text +wt-3.1.7a/examples/planner/planner.css -text +wt-3.1.7a/examples/planner/planner.xml -text +wt-3.1.7a/examples/simplechat/CMakeLists.txt -text +wt-3.1.7a/examples/simplechat/SimpleChatServer.C -text +wt-3.1.7a/examples/simplechat/SimpleChatServer.h -text +wt-3.1.7a/examples/simplechat/SimpleChatWidget.C -text +wt-3.1.7a/examples/simplechat/SimpleChatWidget.h -text +wt-3.1.7a/examples/simplechat/simpleChat.C -text +wt-3.1.7a/examples/simplechat/simplechat.css -text +wt-3.1.7a/examples/simplechat/simplechat.xml -text +wt-3.1.7a/examples/simplechat/simplechat_ru.xml -text +wt-3.1.7a/examples/simplechat/sounds/message_received.mp3 -text +wt-3.1.7a/examples/style/CMakeLists.txt -text +wt-3.1.7a/examples/style/CornerImage.C -text +wt-3.1.7a/examples/style/CornerImage.h -text +wt-3.1.7a/examples/style/RoundedWidget.C -text +wt-3.1.7a/examples/style/RoundedWidget.h -text +wt-3.1.7a/examples/style/StyleExample.C -text +wt-3.1.7a/examples/style/StyleExample.h -text +wt-3.1.7a/examples/treelist/CMakeLists.txt -text +wt-3.1.7a/examples/treelist/DemoTreeList.C -text +wt-3.1.7a/examples/treelist/DemoTreeList.h -text +wt-3.1.7a/examples/treelist/IconPair.C -text +wt-3.1.7a/examples/treelist/IconPair.h -text +wt-3.1.7a/examples/treelist/TreeNode.C -text +wt-3.1.7a/examples/treelist/TreeNode.h -text +wt-3.1.7a/examples/treelist/icons/document.png -text +wt-3.1.7a/examples/treelist/icons/line-last.gif -text +wt-3.1.7a/examples/treelist/icons/line-middle.gif -text +wt-3.1.7a/examples/treelist/icons/line-trunk.gif -text +wt-3.1.7a/examples/treelist/icons/nav-minus-line-last.gif -text +wt-3.1.7a/examples/treelist/icons/nav-minus-line-middle.gif -text +wt-3.1.7a/examples/treelist/icons/nav-plus-line-last.gif -text +wt-3.1.7a/examples/treelist/icons/nav-plus-line-middle.gif -text +wt-3.1.7a/examples/treelist/icons/yellow-folder-closed.png -text +wt-3.1.7a/examples/treelist/icons/yellow-folder-open.png -text +wt-3.1.7a/examples/treeview-dragdrop/CMakeLists.txt -text +wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.C -text +wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.h -text +wt-3.1.7a/examples/treeview-dragdrop/FolderView.C -text +wt-3.1.7a/examples/treeview-dragdrop/FolderView.h -text +wt-3.1.7a/examples/treeview-dragdrop/TreeViewDragDrop.C -text +wt-3.1.7a/examples/treeview-dragdrop/about.xml -text +wt-3.1.7a/examples/treeview-dragdrop/data/files.csv -text +wt-3.1.7a/examples/treeview-dragdrop/icons/file.gif -text +wt-3.1.7a/examples/treeview-dragdrop/icons/folder.gif -text +wt-3.1.7a/examples/treeview-dragdrop/styles.css -text +wt-3.1.7a/examples/treeview/CMakeLists.txt -text +wt-3.1.7a/examples/treeview/TreeViewApplication.C -text +wt-3.1.7a/examples/treeview/TreeViewExample.C -text +wt-3.1.7a/examples/treeview/TreeViewExample.h -text +wt-3.1.7a/examples/treeview/drinks.xml -text +wt-3.1.7a/examples/treeview/icons/cloudy01.png -text +wt-3.1.7a/examples/treeview/icons/flag_be.png -text +wt-3.1.7a/examples/treeview/icons/flag_fr.png -text +wt-3.1.7a/examples/treeview/icons/flag_ma.png -text +wt-3.1.7a/examples/treeview/icons/flag_sp.png -text +wt-3.1.7a/examples/treeview/icons/rain.png -text +wt-3.1.7a/examples/treeview/icons/snow.png -text +wt-3.1.7a/examples/treeview/icons/storm.png -text +wt-3.1.7a/examples/treeview/icons/sun01.png -text +wt-3.1.7a/examples/treeview/icons/w_cloud.png -text +wt-3.1.7a/examples/webgl/CMakeLists.txt -text +wt-3.1.7a/examples/webgl/PaintWidget.C -text +wt-3.1.7a/examples/webgl/PaintWidget.h -text +wt-3.1.7a/examples/webgl/README -text +wt-3.1.7a/examples/webgl/nowebgl.png -text +wt-3.1.7a/examples/webgl/readObj.C -text +wt-3.1.7a/examples/webgl/readObj.h -text +wt-3.1.7a/examples/webgl/teapot.C -text +wt-3.1.7a/examples/webgl/teapot.obj -text +wt-3.1.7a/examples/webgl/texture.jpg -text +wt-3.1.7a/examples/webgl/webgl.C -text +wt-3.1.7a/examples/widgetgallery/BasicControls.C -text +wt-3.1.7a/examples/widgetgallery/BasicControls.h -text +wt-3.1.7a/examples/widgetgallery/CMakeLists.txt -text +wt-3.1.7a/examples/widgetgallery/ChartWidgets.C -text +wt-3.1.7a/examples/widgetgallery/ChartWidgets.h -text +wt-3.1.7a/examples/widgetgallery/ControlsWidget.C -text +wt-3.1.7a/examples/widgetgallery/ControlsWidget.h -text +wt-3.1.7a/examples/widgetgallery/DeferredWidget.h -text +wt-3.1.7a/examples/widgetgallery/DialogWidgets.C -text +wt-3.1.7a/examples/widgetgallery/DialogWidgets.h -text +wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.C -text +wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.h -text +wt-3.1.7a/examples/widgetgallery/EventDisplayer.C -text +wt-3.1.7a/examples/widgetgallery/EventDisplayer.h -text +wt-3.1.7a/examples/widgetgallery/EventsDemo.C -text +wt-3.1.7a/examples/widgetgallery/EventsDemo.h -text +wt-3.1.7a/examples/widgetgallery/ExtWidgets.C -text +wt-3.1.7a/examples/widgetgallery/ExtWidgets.h -text +wt-3.1.7a/examples/widgetgallery/FormWidgets.C -text +wt-3.1.7a/examples/widgetgallery/FormWidgets.h -text +wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.C -text +wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.h -text +wt-3.1.7a/examples/widgetgallery/MvcWidgets.C -text +wt-3.1.7a/examples/widgetgallery/MvcWidgets.h -text +wt-3.1.7a/examples/widgetgallery/PaintBrush.C -text +wt-3.1.7a/examples/widgetgallery/PaintBrush.h -text +wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.C -text +wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.h -text +wt-3.1.7a/examples/widgetgallery/StyleLayout.C -text +wt-3.1.7a/examples/widgetgallery/StyleLayout.h -text +wt-3.1.7a/examples/widgetgallery/Validators.C -text +wt-3.1.7a/examples/widgetgallery/Validators.h -text +wt-3.1.7a/examples/widgetgallery/WidgetGallery.C -text +wt-3.1.7a/examples/widgetgallery/WidgetGallery.h -text +wt-3.1.7a/examples/widgetgallery/category.csv -text +wt-3.1.7a/examples/widgetgallery/charts.xml -text +wt-3.1.7a/examples/widgetgallery/icons/Papa.png -text +wt-3.1.7a/examples/widgetgallery/icons/Pennant_One.png -text +wt-3.1.7a/examples/widgetgallery/icons/blue-pill-small.png -text +wt-3.1.7a/examples/widgetgallery/icons/blue-pill.jpg -text +wt-3.1.7a/examples/widgetgallery/icons/cloudy01.png -text +wt-3.1.7a/examples/widgetgallery/icons/emweb.jpg -text +wt-3.1.7a/examples/widgetgallery/icons/flag_be.png -text +wt-3.1.7a/examples/widgetgallery/icons/flag_fr.png -text +wt-3.1.7a/examples/widgetgallery/icons/flag_ma.png -text +wt-3.1.7a/examples/widgetgallery/icons/flag_sp.png -text +wt-3.1.7a/examples/widgetgallery/icons/house.png -text +wt-3.1.7a/examples/widgetgallery/icons/pencil.cur -text +wt-3.1.7a/examples/widgetgallery/icons/rain.png -text +wt-3.1.7a/examples/widgetgallery/icons/red-pill-small.png -text +wt-3.1.7a/examples/widgetgallery/icons/red-pill.jpg -text +wt-3.1.7a/examples/widgetgallery/icons/snow.png -text +wt-3.1.7a/examples/widgetgallery/icons/storm.png -text +wt-3.1.7a/examples/widgetgallery/icons/sun01.png -text +wt-3.1.7a/examples/widgetgallery/icons/w_cloud.png -text +wt-3.1.7a/examples/widgetgallery/icons/wt_powered.jpg -text +wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-closed.png -text +wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-open.png -text +wt-3.1.7a/examples/widgetgallery/main.C -text +wt-3.1.7a/examples/widgetgallery/pics/sintel_trailer.jpg -text +wt-3.1.7a/examples/widgetgallery/pie.csv -text +wt-3.1.7a/examples/widgetgallery/sounds/beep.mp3 -text +wt-3.1.7a/examples/widgetgallery/style/combostyle.css -text +wt-3.1.7a/examples/widgetgallery/style/dragdrop.css -text +wt-3.1.7a/examples/widgetgallery/style/everywidget.css -text +wt-3.1.7a/examples/widgetgallery/text.xml -text +wt-3.1.7a/examples/widgetgallery/timeseries.csv -text +wt-3.1.7a/examples/widgetgallery/treeview.xml -text +wt-3.1.7a/examples/wt-homepage/CMakeLists.txt -text +wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.C -text +wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.h -text +wt-3.1.7a/examples/wt-homepage/FileItem.C -text +wt-3.1.7a/examples/wt-homepage/FileItem.h -text +wt-3.1.7a/examples/wt-homepage/Home.C -text +wt-3.1.7a/examples/wt-homepage/Home.h -text +wt-3.1.7a/examples/wt-homepage/JWtHome.C -text +wt-3.1.7a/examples/wt-homepage/JWtHome.h -text +wt-3.1.7a/examples/wt-homepage/SourceView.C -text +wt-3.1.7a/examples/wt-homepage/SourceView.h -text +wt-3.1.7a/examples/wt-homepage/WtHome.C -text +wt-3.1.7a/examples/wt-homepage/WtHome.h -text +wt-3.1.7a/examples/wt-homepage/css/home.css -text +wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_large.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_powered.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_small.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/favicon.ico -text +wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small2.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/old_wt_banner.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/wt.css -text +wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner_right.jpg -text +wt-3.1.7a/examples/wt-homepage/css/jwt/wt_ie.css -text +wt-3.1.7a/examples/wt-homepage/css/reset.css -text +wt-3.1.7a/examples/wt-homepage/css/sourceview.css -text +wt-3.1.7a/examples/wt-homepage/css/wt/emweb_large.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/emweb_powered.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/emweb_small.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/favicon.ico -text +wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small2.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/uiloog.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/wt.css -text +wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner_right.jpg -text +wt-3.1.7a/examples/wt-homepage/css/wt/wt_ie.css -text +wt-3.1.7a/examples/wt-homepage/css/wt/wt_powered.jpg -text +wt-3.1.7a/examples/wt-homepage/icons/clojure-logo.png -text +wt-3.1.7a/examples/wt-homepage/icons/cpp-logo.jpg -text +wt-3.1.7a/examples/wt-homepage/icons/cppclass.png -text +wt-3.1.7a/examples/wt-homepage/icons/document.png -text +wt-3.1.7a/examples/wt-homepage/icons/green-play.png -text +wt-3.1.7a/examples/wt-homepage/icons/invalid.png -text +wt-3.1.7a/examples/wt-homepage/icons/java-logo.png -text +wt-3.1.7a/examples/wt-homepage/icons/javaclass.png -text +wt-3.1.7a/examples/wt-homepage/icons/orange-play.png -text +wt-3.1.7a/examples/wt-homepage/icons/package-folder-open.png -text +wt-3.1.7a/examples/wt-homepage/icons/package.png -text +wt-3.1.7a/examples/wt-homepage/icons/rss.png -text +wt-3.1.7a/examples/wt-homepage/icons/ruby-logo-R.png -text +wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-closed.png -text +wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-open.png -text +wt-3.1.7a/examples/wt-homepage/jwt-home.xml -text +wt-3.1.7a/examples/wt-homepage/main.C -text +wt-3.1.7a/examples/wt-homepage/wt-home.xml -text +wt-3.1.7a/examples/wt-homepage/wt-home_cn.xml -text +wt-3.1.7a/examples/wtwithqt/CMakeLists.txt -text +wt-3.1.7a/examples/wtwithqt/HelloApplication.h -text +wt-3.1.7a/examples/wtwithqt/LICENSE -text +wt-3.1.7a/examples/wtwithqt/QtObject.C -text +wt-3.1.7a/examples/wtwithqt/QtObject.h -text +wt-3.1.7a/examples/wtwithqt/README.txt -text +wt-3.1.7a/examples/wtwithqt/hello.C -text +wt-3.1.7a/examples/wtwithqt/lib/CMakeLists.txt -text +wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.C -text +wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.h -text +wt-3.1.7a/examples/wtwithqt/lib/LICENSE -text +wt-3.1.7a/examples/wtwithqt/lib/README.txt -text +wt-3.1.7a/examples/wtwithqt/lib/WQApplication -text +wt-3.1.7a/examples/wtwithqt/lib/WQApplication.C -text +wt-3.1.7a/resources/WtSoundManager.swf -text +wt-3.1.7a/resources/ajax-loading.gif -text +wt-3.1.7a/resources/calendar_edit.png -text +wt-3.1.7a/resources/closeicons-mi.png -text +wt-3.1.7a/resources/closeicons-tab.png -text +wt-3.1.7a/resources/collapse.gif -text +wt-3.1.7a/resources/expand.gif -text +wt-3.1.7a/resources/items-not-ok.gif -text +wt-3.1.7a/resources/items-ok.gif -text +wt-3.1.7a/resources/items.gif -text +wt-3.1.7a/resources/line-last.gif -text +wt-3.1.7a/resources/line-middle.gif -text +wt-3.1.7a/resources/line-trunk.gif -text +wt-3.1.7a/resources/loading.png -text +wt-3.1.7a/resources/minus.gif -text +wt-3.1.7a/resources/plus.gif -text +wt-3.1.7a/resources/right-arrow.gif -text +wt-3.1.7a/resources/tab_b.gif -text +wt-3.1.7a/resources/tab_l.gif -text +wt-3.1.7a/resources/tab_r.gif -text +wt-3.1.7a/resources/themes/default/dropdown.png -text +wt-3.1.7a/resources/themes/default/nav-minus.gif -text +wt-3.1.7a/resources/themes/default/nav-plus.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/generate.sh -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-10px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-11px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-12px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-13px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-14px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-15px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-16px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-17px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-18px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-19px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-20px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-21px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-22px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-23px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-24px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-25px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-26px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-27px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-28px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-29px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-30px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-31px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-32px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-33px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-34px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-35px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-36px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-37px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-38px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-39px.gif -text +wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-40px.gif -text +wt-3.1.7a/resources/themes/default/slider-thumb-h.gif -text +wt-3.1.7a/resources/themes/default/slider-thumb-v.gif -text +wt-3.1.7a/resources/themes/default/sort-arrow-down.gif -text +wt-3.1.7a/resources/themes/default/sort-arrow-none.gif -text +wt-3.1.7a/resources/themes/default/sort-arrow-up.gif -text +wt-3.1.7a/resources/themes/default/spin-buttons-dn.png -text +wt-3.1.7a/resources/themes/default/spin-buttons-up.png -text +wt-3.1.7a/resources/themes/default/spin-buttons.png -text +wt-3.1.7a/resources/themes/default/splitter-h.png -text +wt-3.1.7a/resources/themes/default/splitter-v.png -text +wt-3.1.7a/resources/themes/default/stripes/generate.sh -text +wt-3.1.7a/resources/themes/default/stripes/stripe-10px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-11px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-12px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-13px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-14px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-15px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-16px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-17px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-18px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-19px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-20px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-21px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-22px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-23px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-24px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-25px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-26px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-27px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-28px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-29px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-30px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-31px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-32px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-33px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-34px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-35px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-36px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-37px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-38px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-39px.gif -text +wt-3.1.7a/resources/themes/default/stripes/stripe-40px.gif -text +wt-3.1.7a/resources/themes/default/wt.css -text +wt-3.1.7a/resources/themes/default/wt_ie.css -text +wt-3.1.7a/resources/themes/default/wt_ie6.css -text +wt-3.1.7a/resources/themes/polished/closeicons-tab.png -text +wt-3.1.7a/resources/themes/polished/dropdown.png -text +wt-3.1.7a/resources/themes/polished/dropshadow.png -text +wt-3.1.7a/resources/themes/polished/gradient.png -text +wt-3.1.7a/resources/themes/polished/nav-minus.gif -text +wt-3.1.7a/resources/themes/polished/nav-minus.png -text +wt-3.1.7a/resources/themes/polished/nav-plus.gif -text +wt-3.1.7a/resources/themes/polished/nav-plus.png -text +wt-3.1.7a/resources/themes/polished/no-stripes/generate.sh -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-10px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-11px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-12px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-13px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-14px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-15px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-16px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-17px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-18px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-19px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-20px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-21px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-22px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-23px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-24px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-25px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-26px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-27px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-28px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-29px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-30px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-31px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-32px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-33px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-34px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-35px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-36px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-37px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-38px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-39px.gif -text +wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-40px.gif -text +wt-3.1.7a/resources/themes/polished/slider-thumb-h.gif -text +wt-3.1.7a/resources/themes/polished/slider-thumb-v.gif -text +wt-3.1.7a/resources/themes/polished/sort-arrow-down.gif -text +wt-3.1.7a/resources/themes/polished/sort-arrow-none.gif -text +wt-3.1.7a/resources/themes/polished/sort-arrow-up.gif -text +wt-3.1.7a/resources/themes/polished/splitter-h.png -text +wt-3.1.7a/resources/themes/polished/splitter-v.png -text +wt-3.1.7a/resources/themes/polished/stripes/generate.sh -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-10px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-11px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-12px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-13px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-14px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-15px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-16px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-17px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-18px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-19px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-20px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-21px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-22px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-23px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-24px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-25px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-26px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-27px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-28px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-29px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-30px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-31px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-32px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-33px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-34px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-35px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-36px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-37px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-38px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-39px.gif -text +wt-3.1.7a/resources/themes/polished/stripes/stripe-40px.gif -text +wt-3.1.7a/resources/themes/polished/suggest-dropdown.png -text +wt-3.1.7a/resources/themes/polished/title-gradient.png -text +wt-3.1.7a/resources/themes/polished/wt.css -text +wt-3.1.7a/resources/themes/polished/wt_ie.css -text +wt-3.1.7a/resources/themes/polished/wt_ie6.css -text +wt-3.1.7a/resources/tv-line-last.gif -text +wt-3.1.7a/src/CMakeLists.txt -text +wt-3.1.7a/src/Wt/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Chart/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Chart/WAbstractChart -text +wt-3.1.7a/src/Wt/Chart/WAbstractChart.C -text +wt-3.1.7a/src/Wt/Chart/WAxis -text +wt-3.1.7a/src/Wt/Chart/WAxis.C -text +wt-3.1.7a/src/Wt/Chart/WCartesianChart -text +wt-3.1.7a/src/Wt/Chart/WCartesianChart.C -text +wt-3.1.7a/src/Wt/Chart/WChart2DRenderer -text +wt-3.1.7a/src/Wt/Chart/WChart2DRenderer.C -text +wt-3.1.7a/src/Wt/Chart/WChartGlobal -text +wt-3.1.7a/src/Wt/Chart/WChartPalette -text +wt-3.1.7a/src/Wt/Chart/WChartPalette.C -text +wt-3.1.7a/src/Wt/Chart/WDataSeries -text +wt-3.1.7a/src/Wt/Chart/WDataSeries.C -text +wt-3.1.7a/src/Wt/Chart/WPieChart -text +wt-3.1.7a/src/Wt/Chart/WPieChart.C -text +wt-3.1.7a/src/Wt/Chart/WStandardPalette -text +wt-3.1.7a/src/Wt/Chart/WStandardPalette.C -text +wt-3.1.7a/src/Wt/Dbo/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Dbo/Call -text +wt-3.1.7a/src/Wt/Dbo/Call.C -text +wt-3.1.7a/src/Wt/Dbo/Call_impl.h -text +wt-3.1.7a/src/Wt/Dbo/DbAction -text +wt-3.1.7a/src/Wt/Dbo/DbAction.C -text +wt-3.1.7a/src/Wt/Dbo/DbAction_impl.h -text +wt-3.1.7a/src/Wt/Dbo/Dbo -text +wt-3.1.7a/src/Wt/Dbo/Exception -text +wt-3.1.7a/src/Wt/Dbo/Exception.C -text +wt-3.1.7a/src/Wt/Dbo/Field -text +wt-3.1.7a/src/Wt/Dbo/Field_impl.h -text +wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool -text +wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool.C -text +wt-3.1.7a/src/Wt/Dbo/Impl -text +wt-3.1.7a/src/Wt/Dbo/Query -text +wt-3.1.7a/src/Wt/Dbo/Query.C -text +wt-3.1.7a/src/Wt/Dbo/QueryColumn -text +wt-3.1.7a/src/Wt/Dbo/QueryColumn.C -text +wt-3.1.7a/src/Wt/Dbo/QueryModel -text +wt-3.1.7a/src/Wt/Dbo/QueryModel_impl.h -text +wt-3.1.7a/src/Wt/Dbo/Query_impl.h -text +wt-3.1.7a/src/Wt/Dbo/Session -text +wt-3.1.7a/src/Wt/Dbo/Session.C -text +wt-3.1.7a/src/Wt/Dbo/Session_impl.h -text +wt-3.1.7a/src/Wt/Dbo/SqlConnection -text +wt-3.1.7a/src/Wt/Dbo/SqlConnection.C -text +wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool -text +wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool.C -text +wt-3.1.7a/src/Wt/Dbo/SqlQueryParse.C -text +wt-3.1.7a/src/Wt/Dbo/SqlStatement -text +wt-3.1.7a/src/Wt/Dbo/SqlStatement.C -text +wt-3.1.7a/src/Wt/Dbo/SqlTraits -text +wt-3.1.7a/src/Wt/Dbo/SqlTraits.C -text +wt-3.1.7a/src/Wt/Dbo/SqlTraits_impl.h -text +wt-3.1.7a/src/Wt/Dbo/StdSqlTraits -text +wt-3.1.7a/src/Wt/Dbo/StdSqlTraits.C -text +wt-3.1.7a/src/Wt/Dbo/Transaction -text +wt-3.1.7a/src/Wt/Dbo/Transaction.C -text +wt-3.1.7a/src/Wt/Dbo/Types -text +wt-3.1.7a/src/Wt/Dbo/WDboDllDefs.h -text +wt-3.1.7a/src/Wt/Dbo/WtSqlTraits -text +wt-3.1.7a/src/Wt/Dbo/WtSqlTraits.C -text +wt-3.1.7a/src/Wt/Dbo/backend/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Dbo/backend/MySQL.txt -text +wt-3.1.7a/src/Wt/Dbo/backend/Postgres -text +wt-3.1.7a/src/Wt/Dbo/backend/Postgres.C -text +wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3 -text +wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3.C -text +wt-3.1.7a/src/Wt/Dbo/backend/WDboPostgresDllDefs.h -text +wt-3.1.7a/src/Wt/Dbo/backend/WDboSqlite3DllDefs.h -text +wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.c -text +wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.h -text +wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3ext.h -text +wt-3.1.7a/src/Wt/Dbo/collection -text +wt-3.1.7a/src/Wt/Dbo/collection_impl.h -text +wt-3.1.7a/src/Wt/Dbo/ptr -text +wt-3.1.7a/src/Wt/Dbo/ptr.C -text +wt-3.1.7a/src/Wt/Dbo/ptr_impl.h -text +wt-3.1.7a/src/Wt/Dbo/ptr_tuple -text +wt-3.1.7a/src/Wt/Ext/AbstractButton -text +wt-3.1.7a/src/Wt/Ext/AbstractButton.C -text +wt-3.1.7a/src/Wt/Ext/AbstractToggleButton -text +wt-3.1.7a/src/Wt/Ext/AbstractToggleButton.C -text +wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.C -text +wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.h -text +wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.C -text +wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.h -text +wt-3.1.7a/src/Wt/Ext/Button -text +wt-3.1.7a/src/Wt/Ext/Button.C -text +wt-3.1.7a/src/Wt/Ext/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Ext/Calendar -text +wt-3.1.7a/src/Wt/Ext/Calendar.C -text +wt-3.1.7a/src/Wt/Ext/CheckBox -text +wt-3.1.7a/src/Wt/Ext/CheckBox.C -text +wt-3.1.7a/src/Wt/Ext/ComboBox -text +wt-3.1.7a/src/Wt/Ext/ComboBox.C -text +wt-3.1.7a/src/Wt/Ext/Component -text +wt-3.1.7a/src/Wt/Ext/Component.C -text +wt-3.1.7a/src/Wt/Ext/Container -text +wt-3.1.7a/src/Wt/Ext/Container.C -text +wt-3.1.7a/src/Wt/Ext/DataStore -text +wt-3.1.7a/src/Wt/Ext/DataStore.C -text +wt-3.1.7a/src/Wt/Ext/DateField -text +wt-3.1.7a/src/Wt/Ext/DateField.C -text +wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.C -text +wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.h -text +wt-3.1.7a/src/Wt/Ext/Dialog -text +wt-3.1.7a/src/Wt/Ext/Dialog.C -text +wt-3.1.7a/src/Wt/Ext/ExtDllDefs.h -text +wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.C -text +wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.h -text +wt-3.1.7a/src/Wt/Ext/FormField -text +wt-3.1.7a/src/Wt/Ext/FormField.C -text +wt-3.1.7a/src/Wt/Ext/LayoutImpl.C -text +wt-3.1.7a/src/Wt/Ext/LayoutImpl.h -text +wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.C -text +wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.h -text +wt-3.1.7a/src/Wt/Ext/LineEdit -text +wt-3.1.7a/src/Wt/Ext/LineEdit.C -text +wt-3.1.7a/src/Wt/Ext/Menu -text +wt-3.1.7a/src/Wt/Ext/Menu.C -text +wt-3.1.7a/src/Wt/Ext/MenuItem -text +wt-3.1.7a/src/Wt/Ext/MenuItem.C -text +wt-3.1.7a/src/Wt/Ext/MessageBox -text +wt-3.1.7a/src/Wt/Ext/MessageBox.C -text +wt-3.1.7a/src/Wt/Ext/NumberField -text +wt-3.1.7a/src/Wt/Ext/NumberField.C -text +wt-3.1.7a/src/Wt/Ext/PagingToolBar -text +wt-3.1.7a/src/Wt/Ext/PagingToolBar.C -text +wt-3.1.7a/src/Wt/Ext/Panel -text +wt-3.1.7a/src/Wt/Ext/Panel.C -text +wt-3.1.7a/src/Wt/Ext/ProgressDialog -text +wt-3.1.7a/src/Wt/Ext/ProgressDialog.C -text +wt-3.1.7a/src/Wt/Ext/RadioButton -text +wt-3.1.7a/src/Wt/Ext/RadioButton.C -text +wt-3.1.7a/src/Wt/Ext/Splitter -text +wt-3.1.7a/src/Wt/Ext/Splitter.C -text +wt-3.1.7a/src/Wt/Ext/SplitterHandle -text +wt-3.1.7a/src/Wt/Ext/SplitterHandle.C -text +wt-3.1.7a/src/Wt/Ext/TabWidget -text +wt-3.1.7a/src/Wt/Ext/TabWidget.C -text +wt-3.1.7a/src/Wt/Ext/TableView -text +wt-3.1.7a/src/Wt/Ext/TableView.C -text +wt-3.1.7a/src/Wt/Ext/TextEdit -text +wt-3.1.7a/src/Wt/Ext/TextEdit.C -text +wt-3.1.7a/src/Wt/Ext/ToolBar -text +wt-3.1.7a/src/Wt/Ext/ToolBar.C -text +wt-3.1.7a/src/Wt/Ext/ToolTipConfig -text +wt-3.1.7a/src/Wt/Ext/ToolTipConfig.C -text +wt-3.1.7a/src/Wt/Ext/WExtGlobal -text +wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.C -text +wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.h -text +wt-3.1.7a/src/Wt/Ext/Widget -text +wt-3.1.7a/src/Wt/Ext/Widget.C -text +wt-3.1.7a/src/Wt/Http/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Http/Client -text +wt-3.1.7a/src/Wt/Http/Client.C -text +wt-3.1.7a/src/Wt/Http/Request -text +wt-3.1.7a/src/Wt/Http/Request.C -text +wt-3.1.7a/src/Wt/Http/Response -text +wt-3.1.7a/src/Wt/Http/Response.C -text +wt-3.1.7a/src/Wt/Http/ResponseContinuation -text +wt-3.1.7a/src/Wt/Http/ResponseContinuation.C -text +wt-3.1.7a/src/Wt/JavaScriptLoader.h -text +wt-3.1.7a/src/Wt/SizeHandle.C -text +wt-3.1.7a/src/Wt/SizeHandle.h -text +wt-3.1.7a/src/Wt/StdGridLayoutImpl.C -text +wt-3.1.7a/src/Wt/StdGridLayoutImpl.h -text +wt-3.1.7a/src/Wt/StdLayoutImpl.C -text +wt-3.1.7a/src/Wt/StdLayoutImpl.h -text +wt-3.1.7a/src/Wt/StdLayoutItemImpl.C -text +wt-3.1.7a/src/Wt/StdLayoutItemImpl.h -text +wt-3.1.7a/src/Wt/StdWidgetItemImpl.C -text +wt-3.1.7a/src/Wt/StdWidgetItemImpl.h -text +wt-3.1.7a/src/Wt/SyncLock -text +wt-3.1.7a/src/Wt/Test/CMakeLists.txt -text +wt-3.1.7a/src/Wt/Test/WTestEnvironment -text +wt-3.1.7a/src/Wt/Test/WTestEnvironment.C -text +wt-3.1.7a/src/Wt/WAbstractArea -text +wt-3.1.7a/src/Wt/WAbstractArea.C -text +wt-3.1.7a/src/Wt/WAbstractItemDelegate -text +wt-3.1.7a/src/Wt/WAbstractItemDelegate.C -text +wt-3.1.7a/src/Wt/WAbstractItemModel -text +wt-3.1.7a/src/Wt/WAbstractItemModel.C -text +wt-3.1.7a/src/Wt/WAbstractItemView -text +wt-3.1.7a/src/Wt/WAbstractItemView.C -text +wt-3.1.7a/src/Wt/WAbstractListModel -text +wt-3.1.7a/src/Wt/WAbstractListModel.C -text +wt-3.1.7a/src/Wt/WAbstractProxyModel -text +wt-3.1.7a/src/Wt/WAbstractProxyModel.C -text +wt-3.1.7a/src/Wt/WAbstractServer -text +wt-3.1.7a/src/Wt/WAbstractServer.C -text +wt-3.1.7a/src/Wt/WAbstractTableModel -text +wt-3.1.7a/src/Wt/WAbstractTableModel.C -text +wt-3.1.7a/src/Wt/WAbstractToggleButton -text +wt-3.1.7a/src/Wt/WAbstractToggleButton.C -text +wt-3.1.7a/src/Wt/WAccordionLayout -text +wt-3.1.7a/src/Wt/WAccordionLayout.C -text +wt-3.1.7a/src/Wt/WAggregateProxyModel -text +wt-3.1.7a/src/Wt/WAggregateProxyModel.C -text +wt-3.1.7a/src/Wt/WAnchor -text +wt-3.1.7a/src/Wt/WAnchor.C -text +wt-3.1.7a/src/Wt/WApplication -text +wt-3.1.7a/src/Wt/WApplication.C -text +wt-3.1.7a/src/Wt/WBatchEditProxyModel -text +wt-3.1.7a/src/Wt/WBatchEditProxyModel.C -text +wt-3.1.7a/src/Wt/WBoostAny -text +wt-3.1.7a/src/Wt/WBoostAny.C -text +wt-3.1.7a/src/Wt/WBorder -text +wt-3.1.7a/src/Wt/WBorder.C -text +wt-3.1.7a/src/Wt/WBorderLayout -text +wt-3.1.7a/src/Wt/WBorderLayout.C -text +wt-3.1.7a/src/Wt/WBoxLayout -text +wt-3.1.7a/src/Wt/WBoxLayout.C -text +wt-3.1.7a/src/Wt/WBreak -text +wt-3.1.7a/src/Wt/WBreak.C -text +wt-3.1.7a/src/Wt/WBrush -text +wt-3.1.7a/src/Wt/WBrush.C -text +wt-3.1.7a/src/Wt/WButtonGroup -text +wt-3.1.7a/src/Wt/WButtonGroup.C -text +wt-3.1.7a/src/Wt/WCalendar -text +wt-3.1.7a/src/Wt/WCalendar.C -text +wt-3.1.7a/src/Wt/WCanvasPaintDevice -text +wt-3.1.7a/src/Wt/WCanvasPaintDevice.C -text +wt-3.1.7a/src/Wt/WCheckBox -text +wt-3.1.7a/src/Wt/WCheckBox.C -text +wt-3.1.7a/src/Wt/WCircleArea -text +wt-3.1.7a/src/Wt/WCircleArea.C -text +wt-3.1.7a/src/Wt/WColor -text +wt-3.1.7a/src/Wt/WColor.C -text +wt-3.1.7a/src/Wt/WCombinedLocalizedStrings -text +wt-3.1.7a/src/Wt/WCombinedLocalizedStrings.C -text +wt-3.1.7a/src/Wt/WComboBox -text +wt-3.1.7a/src/Wt/WComboBox.C -text +wt-3.1.7a/src/Wt/WCompositeWidget -text +wt-3.1.7a/src/Wt/WCompositeWidget.C -text +wt-3.1.7a/src/Wt/WContainerWidget -text +wt-3.1.7a/src/Wt/WContainerWidget.C -text +wt-3.1.7a/src/Wt/WCssDecorationStyle -text +wt-3.1.7a/src/Wt/WCssDecorationStyle.C -text +wt-3.1.7a/src/Wt/WCssStyleSheet -text +wt-3.1.7a/src/Wt/WCssStyleSheet.C -text +wt-3.1.7a/src/Wt/WDate -text +wt-3.1.7a/src/Wt/WDate.C -text +wt-3.1.7a/src/Wt/WDatePicker -text +wt-3.1.7a/src/Wt/WDatePicker.C -text +wt-3.1.7a/src/Wt/WDateTime -text +wt-3.1.7a/src/Wt/WDateTime.C -text +wt-3.1.7a/src/Wt/WDateValidator -text +wt-3.1.7a/src/Wt/WDateValidator.C -text +wt-3.1.7a/src/Wt/WDefaultLayout -text +wt-3.1.7a/src/Wt/WDefaultLayout.C -text +wt-3.1.7a/src/Wt/WDefaultLoadingIndicator -text +wt-3.1.7a/src/Wt/WDefaultLoadingIndicator.C -text +wt-3.1.7a/src/Wt/WDialog -text +wt-3.1.7a/src/Wt/WDialog.C -text +wt-3.1.7a/src/Wt/WDllDefs.h -text +wt-3.1.7a/src/Wt/WDoubleValidator -text +wt-3.1.7a/src/Wt/WDoubleValidator.C -text +wt-3.1.7a/src/Wt/WEnvironment -text +wt-3.1.7a/src/Wt/WEnvironment.C -text +wt-3.1.7a/src/Wt/WEvent -text +wt-3.1.7a/src/Wt/WEvent.C -text +wt-3.1.7a/src/Wt/WFileResource -text +wt-3.1.7a/src/Wt/WFileResource.C -text +wt-3.1.7a/src/Wt/WFileUpload -text +wt-3.1.7a/src/Wt/WFileUpload.C -text +wt-3.1.7a/src/Wt/WFitLayout -text +wt-3.1.7a/src/Wt/WFitLayout.C -text +wt-3.1.7a/src/Wt/WFlags -text +wt-3.1.7a/src/Wt/WFlashObject -text +wt-3.1.7a/src/Wt/WFlashObject.C -text +wt-3.1.7a/src/Wt/WFont -text +wt-3.1.7a/src/Wt/WFont.C -text +wt-3.1.7a/src/Wt/WFormWidget -text +wt-3.1.7a/src/Wt/WFormWidget.C -text +wt-3.1.7a/src/Wt/WGLWidget -text +wt-3.1.7a/src/Wt/WGLWidget.C -text +wt-3.1.7a/src/Wt/WGenericMatrix -text +wt-3.1.7a/src/Wt/WGlobal -text +wt-3.1.7a/src/Wt/WGoogleMap -text +wt-3.1.7a/src/Wt/WGoogleMap.C -text +wt-3.1.7a/src/Wt/WGridLayout -text +wt-3.1.7a/src/Wt/WGridLayout.C -text +wt-3.1.7a/src/Wt/WGroupBox -text +wt-3.1.7a/src/Wt/WGroupBox.C -text +wt-3.1.7a/src/Wt/WHBoxLayout -text +wt-3.1.7a/src/Wt/WHBoxLayout.C -text +wt-3.1.7a/src/Wt/WHTML5Audio -text +wt-3.1.7a/src/Wt/WHTML5Audio.C -text +wt-3.1.7a/src/Wt/WHTML5Media -text +wt-3.1.7a/src/Wt/WHTML5Media.C -text +wt-3.1.7a/src/Wt/WHTML5Video -text +wt-3.1.7a/src/Wt/WHTML5Video.C -text +wt-3.1.7a/src/Wt/WIconPair -text +wt-3.1.7a/src/Wt/WIconPair.C -text +wt-3.1.7a/src/Wt/WImage -text +wt-3.1.7a/src/Wt/WImage.C -text +wt-3.1.7a/src/Wt/WInPlaceEdit -text +wt-3.1.7a/src/Wt/WInPlaceEdit.C -text +wt-3.1.7a/src/Wt/WIntValidator -text +wt-3.1.7a/src/Wt/WIntValidator.C -text +wt-3.1.7a/src/Wt/WInteractWidget -text +wt-3.1.7a/src/Wt/WInteractWidget.C -text +wt-3.1.7a/src/Wt/WItemDelegate -text +wt-3.1.7a/src/Wt/WItemDelegate.C -text +wt-3.1.7a/src/Wt/WItemSelectionModel -text +wt-3.1.7a/src/Wt/WItemSelectionModel.C -text +wt-3.1.7a/src/Wt/WJavaScript -text +wt-3.1.7a/src/Wt/WJavaScript.C -text +wt-3.1.7a/src/Wt/WJavaScriptSlot -text +wt-3.1.7a/src/Wt/WJavaScriptSlot.C -text +wt-3.1.7a/src/Wt/WLabel -text +wt-3.1.7a/src/Wt/WLabel.C -text +wt-3.1.7a/src/Wt/WLayout -text +wt-3.1.7a/src/Wt/WLayout.C -text +wt-3.1.7a/src/Wt/WLayoutItem -text +wt-3.1.7a/src/Wt/WLayoutItem.C -text +wt-3.1.7a/src/Wt/WLayoutItemImpl -text +wt-3.1.7a/src/Wt/WLayoutItemImpl.C -text +wt-3.1.7a/src/Wt/WLength -text +wt-3.1.7a/src/Wt/WLength.C -text +wt-3.1.7a/src/Wt/WLengthValidator -text +wt-3.1.7a/src/Wt/WLengthValidator.C -text +wt-3.1.7a/src/Wt/WLineEdit -text +wt-3.1.7a/src/Wt/WLineEdit.C -text +wt-3.1.7a/src/Wt/WLineF -text +wt-3.1.7a/src/Wt/WLineF.C -text +wt-3.1.7a/src/Wt/WLoadingIndicator -text +wt-3.1.7a/src/Wt/WLoadingIndicator.C -text +wt-3.1.7a/src/Wt/WLocalizedStrings -text +wt-3.1.7a/src/Wt/WLocalizedStrings.C -text +wt-3.1.7a/src/Wt/WLogger -text +wt-3.1.7a/src/Wt/WLogger.C -text +wt-3.1.7a/src/Wt/WMatrix4x4 -text +wt-3.1.7a/src/Wt/WMatrix4x4.C -text +wt-3.1.7a/src/Wt/WMemoryResource -text +wt-3.1.7a/src/Wt/WMemoryResource.C -text +wt-3.1.7a/src/Wt/WMenu -text +wt-3.1.7a/src/Wt/WMenu.C -text +wt-3.1.7a/src/Wt/WMenuItem -text +wt-3.1.7a/src/Wt/WMenuItem.C -text +wt-3.1.7a/src/Wt/WMessageBox -text +wt-3.1.7a/src/Wt/WMessageBox.C -text +wt-3.1.7a/src/Wt/WMessageResourceBundle -text +wt-3.1.7a/src/Wt/WMessageResourceBundle.C -text +wt-3.1.7a/src/Wt/WMessageResources -text +wt-3.1.7a/src/Wt/WMessageResources.C -text +wt-3.1.7a/src/Wt/WModelIndex -text +wt-3.1.7a/src/Wt/WModelIndex.C -text +wt-3.1.7a/src/Wt/WObject -text +wt-3.1.7a/src/Wt/WObject.C -text +wt-3.1.7a/src/Wt/WOverlayLoadingIndicator -text +wt-3.1.7a/src/Wt/WOverlayLoadingIndicator.C -text +wt-3.1.7a/src/Wt/WPaintDevice -text +wt-3.1.7a/src/Wt/WPaintDevice.C -text +wt-3.1.7a/src/Wt/WPaintedWidget -text +wt-3.1.7a/src/Wt/WPaintedWidget.C -text +wt-3.1.7a/src/Wt/WPainter -text +wt-3.1.7a/src/Wt/WPainter.C -text +wt-3.1.7a/src/Wt/WPainterPath -text +wt-3.1.7a/src/Wt/WPainterPath.C -text +wt-3.1.7a/src/Wt/WPanel -text +wt-3.1.7a/src/Wt/WPanel.C -text +wt-3.1.7a/src/Wt/WPdfImage -text +wt-3.1.7a/src/Wt/WPdfImage.C -text +wt-3.1.7a/src/Wt/WPen -text +wt-3.1.7a/src/Wt/WPen.C -text +wt-3.1.7a/src/Wt/WPoint -text +wt-3.1.7a/src/Wt/WPoint.C -text +wt-3.1.7a/src/Wt/WPointF -text +wt-3.1.7a/src/Wt/WPointF.C -text +wt-3.1.7a/src/Wt/WPolygonArea -text +wt-3.1.7a/src/Wt/WPolygonArea.C -text +wt-3.1.7a/src/Wt/WPopupMenu -text +wt-3.1.7a/src/Wt/WPopupMenu.C -text +wt-3.1.7a/src/Wt/WPopupMenuItem -text +wt-3.1.7a/src/Wt/WPopupMenuItem.C -text +wt-3.1.7a/src/Wt/WProgressBar -text +wt-3.1.7a/src/Wt/WProgressBar.C -text +wt-3.1.7a/src/Wt/WPushButton -text +wt-3.1.7a/src/Wt/WPushButton.C -text +wt-3.1.7a/src/Wt/WRadioButton -text +wt-3.1.7a/src/Wt/WRadioButton.C -text +wt-3.1.7a/src/Wt/WRasterImage -text +wt-3.1.7a/src/Wt/WRasterImage.C -text +wt-3.1.7a/src/Wt/WRectArea -text +wt-3.1.7a/src/Wt/WRectArea.C -text +wt-3.1.7a/src/Wt/WRectF -text +wt-3.1.7a/src/Wt/WRectF.C -text +wt-3.1.7a/src/Wt/WRegExp -text +wt-3.1.7a/src/Wt/WRegExp.C -text +wt-3.1.7a/src/Wt/WRegExpValidator -text +wt-3.1.7a/src/Wt/WRegExpValidator.C -text +wt-3.1.7a/src/Wt/WResource -text +wt-3.1.7a/src/Wt/WResource.C -text +wt-3.1.7a/src/Wt/WScrollArea -text +wt-3.1.7a/src/Wt/WScrollArea.C -text +wt-3.1.7a/src/Wt/WScrollBar -text +wt-3.1.7a/src/Wt/WScrollBar.C -text +wt-3.1.7a/src/Wt/WSelectionBox -text +wt-3.1.7a/src/Wt/WSelectionBox.C -text +wt-3.1.7a/src/Wt/WServer -text +wt-3.1.7a/src/Wt/WShadow -text +wt-3.1.7a/src/Wt/WShadow.C -text +wt-3.1.7a/src/Wt/WSignal -text +wt-3.1.7a/src/Wt/WSignal.C -text +wt-3.1.7a/src/Wt/WSignalMapper -text +wt-3.1.7a/src/Wt/WSlider -text +wt-3.1.7a/src/Wt/WSlider.C -text +wt-3.1.7a/src/Wt/WSocketNotifier -text +wt-3.1.7a/src/Wt/WSocketNotifier.C -text +wt-3.1.7a/src/Wt/WSortFilterProxyModel -text +wt-3.1.7a/src/Wt/WSortFilterProxyModel.C -text +wt-3.1.7a/src/Wt/WSound -text +wt-3.1.7a/src/Wt/WSound.C -text +wt-3.1.7a/src/Wt/WSpinBox -text +wt-3.1.7a/src/Wt/WSpinBox.C -text +wt-3.1.7a/src/Wt/WStackedWidget -text +wt-3.1.7a/src/Wt/WStackedWidget.C -text +wt-3.1.7a/src/Wt/WStandardItem -text +wt-3.1.7a/src/Wt/WStandardItem.C -text +wt-3.1.7a/src/Wt/WStandardItemModel -text +wt-3.1.7a/src/Wt/WStandardItemModel.C -text +wt-3.1.7a/src/Wt/WStatelessSlot -text +wt-3.1.7a/src/Wt/WStatelessSlot.C -text +wt-3.1.7a/src/Wt/WString -text +wt-3.1.7a/src/Wt/WString.C -text +wt-3.1.7a/src/Wt/WStringListModel -text +wt-3.1.7a/src/Wt/WStringListModel.C -text +wt-3.1.7a/src/Wt/WStringUtil -text +wt-3.1.7a/src/Wt/WStringUtil.C -text +wt-3.1.7a/src/Wt/WSubMenuItem -text +wt-3.1.7a/src/Wt/WSubMenuItem.C -text +wt-3.1.7a/src/Wt/WSuggestionPopup -text +wt-3.1.7a/src/Wt/WSuggestionPopup.C -text +wt-3.1.7a/src/Wt/WSvgImage -text +wt-3.1.7a/src/Wt/WSvgImage.C -text +wt-3.1.7a/src/Wt/WTabWidget -text +wt-3.1.7a/src/Wt/WTabWidget.C -text +wt-3.1.7a/src/Wt/WTable -text +wt-3.1.7a/src/Wt/WTable.C -text +wt-3.1.7a/src/Wt/WTableCell -text +wt-3.1.7a/src/Wt/WTableCell.C -text +wt-3.1.7a/src/Wt/WTableColumn -text +wt-3.1.7a/src/Wt/WTableColumn.C -text +wt-3.1.7a/src/Wt/WTableRow -text +wt-3.1.7a/src/Wt/WTableRow.C -text +wt-3.1.7a/src/Wt/WTableView -text +wt-3.1.7a/src/Wt/WTableView.C -text +wt-3.1.7a/src/Wt/WTemplate -text +wt-3.1.7a/src/Wt/WTemplate.C -text +wt-3.1.7a/src/Wt/WText -text +wt-3.1.7a/src/Wt/WText.C -text +wt-3.1.7a/src/Wt/WTextArea -text +wt-3.1.7a/src/Wt/WTextArea.C -text +wt-3.1.7a/src/Wt/WTextEdit -text +wt-3.1.7a/src/Wt/WTextEdit.C -text +wt-3.1.7a/src/Wt/WTime -text +wt-3.1.7a/src/Wt/WTime.C -text +wt-3.1.7a/src/Wt/WTimer -text +wt-3.1.7a/src/Wt/WTimer.C -text +wt-3.1.7a/src/Wt/WTimerWidget -text +wt-3.1.7a/src/Wt/WTimerWidget.C -text +wt-3.1.7a/src/Wt/WTransform -text +wt-3.1.7a/src/Wt/WTransform.C -text +wt-3.1.7a/src/Wt/WTree -text +wt-3.1.7a/src/Wt/WTree.C -text +wt-3.1.7a/src/Wt/WTreeNode -text +wt-3.1.7a/src/Wt/WTreeNode.C -text +wt-3.1.7a/src/Wt/WTreeTable -text +wt-3.1.7a/src/Wt/WTreeTable.C -text +wt-3.1.7a/src/Wt/WTreeTableNode -text +wt-3.1.7a/src/Wt/WTreeTableNode.C -text +wt-3.1.7a/src/Wt/WTreeView -text +wt-3.1.7a/src/Wt/WTreeView.C -text +wt-3.1.7a/src/Wt/WVBoxLayout -text +wt-3.1.7a/src/Wt/WVBoxLayout.C -text +wt-3.1.7a/src/Wt/WValidationStatus -text +wt-3.1.7a/src/Wt/WValidationStatus.C -text +wt-3.1.7a/src/Wt/WValidator -text +wt-3.1.7a/src/Wt/WValidator.C -text +wt-3.1.7a/src/Wt/WVectorImage -text +wt-3.1.7a/src/Wt/WVectorImage.C -text +wt-3.1.7a/src/Wt/WViewWidget -text +wt-3.1.7a/src/Wt/WViewWidget.C -text +wt-3.1.7a/src/Wt/WVirtualImage -text +wt-3.1.7a/src/Wt/WVirtualImage.C -text +wt-3.1.7a/src/Wt/WVmlImage -text +wt-3.1.7a/src/Wt/WVmlImage.C -text +wt-3.1.7a/src/Wt/WWebWidget -text +wt-3.1.7a/src/Wt/WWebWidget.C -text +wt-3.1.7a/src/Wt/WWidget -text +wt-3.1.7a/src/Wt/WWidget.C -text +wt-3.1.7a/src/Wt/WWidgetItem -text +wt-3.1.7a/src/Wt/WWidgetItem.C -text +wt-3.1.7a/src/fcgi/CMakeLists.txt -text +wt-3.1.7a/src/fcgi/FCGIRecord.C -text +wt-3.1.7a/src/fcgi/FCGIRecord.h -text +wt-3.1.7a/src/fcgi/FCGIStream.C -text +wt-3.1.7a/src/fcgi/FCGIStream.h -text +wt-3.1.7a/src/fcgi/Server.C -text +wt-3.1.7a/src/fcgi/Server.h -text +wt-3.1.7a/src/fcgi/SessionInfo.C -text +wt-3.1.7a/src/fcgi/SessionInfo.h -text +wt-3.1.7a/src/filetostring.cmake -text +wt-3.1.7a/src/flash/WtSoundManager.as -text +wt-3.1.7a/src/http/Buffer.h -text +wt-3.1.7a/src/http/CMakeLists.txt -text +wt-3.1.7a/src/http/Configuration.C -text +wt-3.1.7a/src/http/Configuration.h -text +wt-3.1.7a/src/http/Connection.C -text +wt-3.1.7a/src/http/Connection.h -text +wt-3.1.7a/src/http/ConnectionManager.C -text +wt-3.1.7a/src/http/ConnectionManager.h -text +wt-3.1.7a/src/http/HTTPRequest.C -text +wt-3.1.7a/src/http/HTTPRequest.h -text +wt-3.1.7a/src/http/HTTPStream.C -text +wt-3.1.7a/src/http/HTTPStream.h -text +wt-3.1.7a/src/http/LICENSE_1_0.txt -text +wt-3.1.7a/src/http/MimeTypes.C -text +wt-3.1.7a/src/http/MimeTypes.h -text +wt-3.1.7a/src/http/Reply.C -text +wt-3.1.7a/src/http/Reply.h -text +wt-3.1.7a/src/http/Request.C -text +wt-3.1.7a/src/http/Request.h -text +wt-3.1.7a/src/http/RequestHandler.C -text +wt-3.1.7a/src/http/RequestHandler.h -text +wt-3.1.7a/src/http/RequestParser.C -text +wt-3.1.7a/src/http/RequestParser.h -text +wt-3.1.7a/src/http/Server.C -text +wt-3.1.7a/src/http/Server.h -text +wt-3.1.7a/src/http/SslConnection.C -text +wt-3.1.7a/src/http/SslConnection.h -text +wt-3.1.7a/src/http/StaticReply.C -text +wt-3.1.7a/src/http/StaticReply.h -text +wt-3.1.7a/src/http/StockReply.C -text +wt-3.1.7a/src/http/StockReply.h -text +wt-3.1.7a/src/http/TcpConnection.C -text +wt-3.1.7a/src/http/TcpConnection.h -text +wt-3.1.7a/src/http/WHttpDllDefs.h -text +wt-3.1.7a/src/http/WServer.C -text +wt-3.1.7a/src/http/WtReply.C -text +wt-3.1.7a/src/http/WtReply.h -text +wt-3.1.7a/src/http/md5.c -text +wt-3.1.7a/src/http/md5.h -text +wt-3.1.7a/src/isapi/CMakeLists.txt -text +wt-3.1.7a/src/isapi/Isapi.C -text +wt-3.1.7a/src/isapi/Isapi.def -text +wt-3.1.7a/src/isapi/IsapiRequest.C -text +wt-3.1.7a/src/isapi/IsapiRequest.h -text +wt-3.1.7a/src/isapi/IsapiStream.C -text +wt-3.1.7a/src/isapi/IsapiStream.h -text +wt-3.1.7a/src/isapi/Server.C -text +wt-3.1.7a/src/isapi/Server.h -text +wt-3.1.7a/src/js/SizeHandle.js -text +wt-3.1.7a/src/js/SizeHandle.min.js -text +wt-3.1.7a/src/js/StdGridLayoutImpl.js -text +wt-3.1.7a/src/js/StdGridLayoutImpl.min.js -text +wt-3.1.7a/src/js/WDialog.js -text +wt-3.1.7a/src/js/WDialog.min.js -text +wt-3.1.7a/src/js/WFormWidget.js -text +wt-3.1.7a/src/js/WFormWidget.min.js -text +wt-3.1.7a/src/js/WGLWidget.js -text +wt-3.1.7a/src/js/WGLWidget.min.js -text +wt-3.1.7a/src/js/WHTML5Media.js -text +wt-3.1.7a/src/js/WHTML5Media.min.js -text +wt-3.1.7a/src/js/WSpinBox.js -text +wt-3.1.7a/src/js/WSpinBox.min.js -text +wt-3.1.7a/src/js/WSuggestionPopup.js -text +wt-3.1.7a/src/js/WSuggestionPopup.min.js -text +wt-3.1.7a/src/js/WTableView.js -text +wt-3.1.7a/src/js/WTableView.min.js -text +wt-3.1.7a/src/js/WTreeView.js -text +wt-3.1.7a/src/js/WTreeView.min.js -text +wt-3.1.7a/src/js/WtGlMatrix.js -text +wt-3.1.7a/src/js/WtGlMatrix.min.js -text +wt-3.1.7a/src/js/WtResize.js -text +wt-3.1.7a/src/js/WtResize.min.js -text +wt-3.1.7a/src/rapidxml/license.txt -text +wt-3.1.7a/src/rapidxml/manual.html -text +wt-3.1.7a/src/rapidxml/rapidxml.hpp -text +wt-3.1.7a/src/rapidxml/rapidxml_iterators.hpp -text +wt-3.1.7a/src/rapidxml/rapidxml_print.hpp -text +wt-3.1.7a/src/rapidxml/rapidxml_utils.hpp -text +wt-3.1.7a/src/rapidxml/rapidxml_xhtml.hpp -text +wt-3.1.7a/src/threadpool/COPYING -text +wt-3.1.7a/src/threadpool/LICENSE_1_0.txt -text +wt-3.1.7a/src/threadpool/README -text +wt-3.1.7a/src/threadpool/threadpool.hpp -text +wt-3.1.7a/src/threadpool/threadpool/detail/future.hpp -text +wt-3.1.7a/src/threadpool/threadpool/detail/locking_ptr.hpp -text +wt-3.1.7a/src/threadpool/threadpool/detail/pool_core.hpp -text +wt-3.1.7a/src/threadpool/threadpool/detail/scope_guard.hpp -text +wt-3.1.7a/src/threadpool/threadpool/detail/worker_thread.hpp -text +wt-3.1.7a/src/threadpool/threadpool/future.hpp -text +wt-3.1.7a/src/threadpool/threadpool/pool.hpp -text +wt-3.1.7a/src/threadpool/threadpool/pool_adaptors.hpp -text +wt-3.1.7a/src/threadpool/threadpool/scheduling_policies.hpp -text +wt-3.1.7a/src/threadpool/threadpool/shutdown_policies.hpp -text +wt-3.1.7a/src/threadpool/threadpool/size_policies.hpp -text +wt-3.1.7a/src/threadpool/threadpool/task_adaptors.hpp -text +wt-3.1.7a/src/web/CMakeLists.txt -text +wt-3.1.7a/src/web/CgiParser.C -text +wt-3.1.7a/src/web/CgiParser.h -text +wt-3.1.7a/src/web/Configuration.C -text +wt-3.1.7a/src/web/Configuration.h -text +wt-3.1.7a/src/web/DomElement.C -text +wt-3.1.7a/src/web/DomElement.h -text +wt-3.1.7a/src/web/EscapeOStream.C -text +wt-3.1.7a/src/web/EscapeOStream.h -text +wt-3.1.7a/src/web/FileServe.C -text +wt-3.1.7a/src/web/FileServe.h -text +wt-3.1.7a/src/web/SocketNotifier.C -text +wt-3.1.7a/src/web/SocketNotifier.h -text +wt-3.1.7a/src/web/SoundManager.C -text +wt-3.1.7a/src/web/SoundManager.h -text +wt-3.1.7a/src/web/TimeUtil.C -text +wt-3.1.7a/src/web/TimeUtil.h -text +wt-3.1.7a/src/web/Utils.C -text +wt-3.1.7a/src/web/Utils.h -text +wt-3.1.7a/src/web/WebController.C -text +wt-3.1.7a/src/web/WebController.h -text +wt-3.1.7a/src/web/WebRenderer.C -text +wt-3.1.7a/src/web/WebRenderer.h -text +wt-3.1.7a/src/web/WebRequest.C -text +wt-3.1.7a/src/web/WebRequest.h -text +wt-3.1.7a/src/web/WebSession.C -text +wt-3.1.7a/src/web/WebSession.h -text +wt-3.1.7a/src/web/WebSocketMessage.C -text +wt-3.1.7a/src/web/WebSocketMessage.h -text +wt-3.1.7a/src/web/WebStream.C -text +wt-3.1.7a/src/web/WebStream.h -text +wt-3.1.7a/src/web/WtException.C -text +wt-3.1.7a/src/web/WtException.h -text +wt-3.1.7a/src/web/WtRandom.C -text +wt-3.1.7a/src/web/WtRandom.h -text +wt-3.1.7a/src/web/XSSFilter.C -text +wt-3.1.7a/src/web/XSSFilter.h -text +wt-3.1.7a/src/web/XSSUtils.C -text +wt-3.1.7a/src/web/XSSUtils.h -text +wt-3.1.7a/src/web/random_device.cpp -text +wt-3.1.7a/src/web/skeleton/Boot.html -text +wt-3.1.7a/src/web/skeleton/CommAjax.js -text +wt-3.1.7a/src/web/skeleton/CommScript.js -text +wt-3.1.7a/src/web/skeleton/Hybrid.html -text +wt-3.1.7a/src/web/skeleton/Plain.html -text +wt-3.1.7a/src/web/skeleton/Wt.js -text +wt-3.1.7a/src/web/skeleton/Wt.min.js -text +wt-3.1.7a/src/web/skeleton/jquery.min.js -text +wt-3.1.7a/src/xml/wt.xml -text +wt-3.1.7a/test/CMakeLists.txt -text +wt-3.1.7a/test/chart/WChartTest.C -text +wt-3.1.7a/test/chart/WChartTest.h -text +wt-3.1.7a/test/dbo/DboTest.C -text +wt-3.1.7a/test/dbo/DboTest.h -text +wt-3.1.7a/test/dbo/DboTest2.C -text +wt-3.1.7a/test/dbo/DboTest2.h -text +wt-3.1.7a/test/models/WBatchEditProxyModelTest.C -text +wt-3.1.7a/test/models/WBatchEditProxyModelTest.h -text +wt-3.1.7a/test/private/DboImplTest.C -text +wt-3.1.7a/test/private/DboImplTest.h -text +wt-3.1.7a/test/private/HttpTest.C -text +wt-3.1.7a/test/private/HttpTest.h -text +wt-3.1.7a/test/test.C -text +wt-3.1.7a/test/utf8/Utf8Test.C -text +wt-3.1.7a/test/utf8/Utf8Test.h -text +wt-3.1.7a/test/utf8/XmlTest.C -text +wt-3.1.7a/test/utf8/XmlTest.h -text +wt-3.1.7a/test/wdatetime/WDateTimeTest.C -text +wt-3.1.7a/test/wdatetime/WDateTimeTest.h -text +wt-3.1.7a/wt.tags -text +wt-3.1.7a/wt_config.xml.in -text diff --git a/cronie-1.4.6/AUTHORS b/cronie-1.4.6/AUTHORS new file mode 100644 index 0000000..1cbd2b5 --- /dev/null +++ b/cronie-1.4.6/AUTHORS @@ -0,0 +1,2 @@ +Original vixie-cron was written by Paul Vixie. + diff --git a/cronie-1.4.6/COPYING b/cronie-1.4.6/COPYING new file mode 100644 index 0000000..53b06f6 --- /dev/null +++ b/cronie-1.4.6/COPYING @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +/* + * Copyright (c) 1988, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software written by Ken Arnold and + * published in UNIX Review, Vol. 6, No. 8. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ diff --git a/cronie-1.4.6/ChangeLog b/cronie-1.4.6/ChangeLog new file mode 100644 index 0000000..15979c5 --- /dev/null +++ b/cronie-1.4.6/ChangeLog @@ -0,0 +1,1344 @@ +2010-10-21 Martin PrpiÄ + + * man/anacron.8, man/anacrontab.5, man/cron.8, man/crontab.1, + man/crontab.5: Rewrite of man pages & correction. Signed-off-by: Marcela MaÅ¡láňová + +2010-10-21 Marcela MaÅ¡láňová + + * man/bitstring.3: Remove useless man page. Thanks to Colin Dean. + +2010-10-21 Marcela MaÅ¡láňová + + * src/cron.c: Apply previous patch correctly. + +2010-10-20 Colin Dean + + * src/cron.c: Check clustering before un/watch function Signed-off-by: Marcela MaÅ¡láňová + +2010-10-13 Marcela MaÅ¡láňová + + * : commit 2d3a872e9c66d9550a5b3cc97fa78ff9d7708cce Author: Marcela + MaÅ¡láňová Date: Fri Oct 8 12:17:15 2010 + +0200 + +2010-10-07 Marcela MaÅ¡láňová + + * man/cron.8: man page typo: change to correct option + +2010-10-06 Marcela MaÅ¡láňová + + * src/database.c: Remove cluster support from inotify_database check_inotify_database is called only when inotify is on, which is + not with cluster support. + +2010-10-06 Colin Dean + + * man/crontab.1, src/crontab.c: The crontab command uses "-c" and + "-n" instead of "-h". Signed-off-by: Marcela MaÅ¡láňová + +2010-10-04 Marcela MaÅ¡láňová + + * src/crontab.c: Correct ifdef HAVE_FCHOWN Based on https://fedorahosted.org/cronie/ticket/7 Thanks to + crrodriguez + +2010-10-04 Marcela MaÅ¡láňová + + * .gitignore, src/database.c: is_local set to zero + +2010-10-04 Colin Dean + + * man/cron.8, man/crontab.1, src/Makefile.am, src/cron.c, + src/crontab.c, src/database.c, src/globals.h: cronie on cluster On issue we have is that although we've made our services very + resilient, by employing HA failover, load balancing and round robin + DNS, the one service that's difficult to do anything with is cron, + because it has traditionally been tied to a single machine. For instance, we have a cluster of 4 Fedora servers which our end + users use as timeshare systems, using round robin DNS, and if one of + the servers is down it doesn't really matter too much. We don't even + backup the servers, relying on NFS home directories and rebuilding + from scratch using kickstart + cfengine if a server fails and can't + be restarted. However, the users have scattered crontab files around the 4 + servers, so that if the particular server a cron job is meant to run + on dies, the job doesn't run any more, and the crontab file may be + permanently lost. What we needed was a facility to allow crontabs in /var/spool/cron + on these 4 servers be NFS mounted from a single directory on our + NetApp filers (so giving us backups and snapshots), with any user + able to run "crontab -e" from any of the servers to manage a single + shared crontab, and for us in the IT Service to be able to set just + one of the 4 servers to run user crontab jobs at any time. However, + we needed to keep /etc/crontab and the files in /etc/cron.d/ + specific to each individual server still, and keep crond running on + all 4 servers. Signed-off-by: Marcela MaÅ¡láňová + +2010-08-30 Marcela MaÅ¡láňová + + * anacron/runjob.c: Typo in log message Based on Tom London report + https://bugzilla.redhat.com/show_bug.cgi?id=626947 + +2010-08-23 Marcela MaÅ¡láňová + + * anacron/main.c: Close leaking file descriptor anacron was leaking fd, which caused denial of jobs by selinux. + +2010-08-02 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: New minor release 1.4.5. + +2010-08-02 Marcela MaÅ¡láňová + + * cronie.init: OK value printed twice Fix based on 615107. There were too many OK's messages. + +2010-07-21 Marcela MaÅ¡láňová + + * src/cron.c: Help and usage fix Option -h was added. Also details about options were added into + usage. + +2010-07-21 Marcela MaÅ¡láňová + + * man/cron.8: man crond -i Document missing option. + +2010-07-12 Marcela MaÅ¡láňová + + * man/cron.8, src/cron.c: Syslog output will be used instead of mail If sendmail isn't installed, syslog is used. This patch should also + solve problem with RPM requirements of sendmail (and which mail + should be installed by default). Based on: https://bugzilla.redhat.com/show_bug.cgi?id=472710#c42 + +2010-04-14 Marcela MaÅ¡láňová + + * src/entry.c: Remove the whole unused part. + +2010-04-14 Marcela MaÅ¡láňová + + * src/entry.c: Remove 'dont log' part which probably never worked. + +2010-04-14 Marcela MaÅ¡láňová + + * src/do_command.c, src/entry.c: Beautify error outputs. + +2010-04-14 Michal Seben + + * man/crontab.5, src/entry.c: Option "-" don't log jobs as root If the uid of the owner is 0 (root), he can put a "-" as first + character of a crontab entry. This will prevent cron from writing a + syslog message about this command getting executed. Signed-off-by: Marcela MaÅ¡láňová + +2010-04-14 Michal Seben + + * src/security.c: Correctly reported PAM errors cron_conv could be helpfull for debug purposes, when something bad + happens with pam e.g. : expired user password - without cron_conv + cronie doesn't report usefull info in syslog messages (it just + write no conversation function error to messages file),if you want + to do quick test of pam conversation function, you could set + PASS_MAX_DAYS and PASS_WARN_AGE in etc/login.defs , add new user and + for this user create cron rule (crontab -e) Signed-off-by: Marcela MaÅ¡láňová + +2010-03-25 Andrew Man-Hon Lau + + * contrib/0anacron: 0anacron should check only readability. Signed-off-by: Marcela MaÅ¡láňová + +2010-03-23 Marcela MaÅ¡láňová + + * src/security.c: Revert previous change. The code which control the + input entry should be sufficient. Only "/" are removed from scripts. + +2010-03-22 Marcela MaÅ¡láňová + + * contrib/0hourly, contrib/dailyjobs, src/security.c: In system + tables was hardcoded home directory to "/". This was changed to + switching to "/" only when home for user isn't defined. Based on rhbz#575419 + +2010-02-23 Marcela MaÅ¡láňová + + * man/crontab.5: Definition of system crontables. + +2010-02-18 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: New release + +2010-02-17 Marcela MaÅ¡láňová + + * src/crontab.c: CVE-2010-0424 -- crontab -e crontab file timestamp + race condition When run as "crontab -e", crontab creates a temporary file in /tmp, + copies the contents of an existing crontab to this file, and then + calls utime() on the temporary file name to set its mtime and atime + to 0, in order to check after editing whether or not the file has + been modified. Since the file is created with the user's euid, and + because utime is called on the file as root, an attacker can replace + the temporary file after it is created with a symlink to any file or + folder on disk, which will then have its atime and mtime set to 0. + This is certainly not a critical issue, but this action can be used + to deny service in many scenarios. For example, the cron daemon + checks the mtime of the crontab spool folder and its contents to + determine whether or not it needs to update its database of + cronjobs, and if these times are reset to 0, no new cronjobs will be + added. Other daemons relying on accurate timestamps may be similarly + affected. Finally, build tools such as make could be tricked into + not re-compiling source, based on an old timestamp. Thanks to: Dan + Rosenberg + +2010-02-16 Marcela MaÅ¡láňová + + * configure.ac: Dynamic shared libraries -laudit There is need to add -laudit into gcc options because now it's not + found automatically. Based on: + http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking + +2010-02-12 Marcela MaÅ¡láňová + + * man/anacrontab.5: Make man page more readable based on #564206. + +2010-01-25 Marcela MaÅ¡láňová + + * crond.sysconfig, cronie.init: CRON_VALIDATE_MAILRCPTS was removed, + because it was not used anyway. + +2010-01-13 Marcela MaÅ¡láňová + + * src/do_command.c, src/funcs.h, src/security.c: With NFS homes + can't be job executed, because root can't access this directory. + +2010-01-05 Will Woods + + * man/cron.8, src/do_command.c: Disable mailing output. Signed-off-by: Marcela MaÅ¡láňová + +2010-01-05 Will Woods + + * man/cron.8, src/cron.c, src/do_command.c, src/globals.h: Output + could be redirectered to syslog. Signed-off-by: Marcela MaÅ¡láňová + +2009-12-21 Marcela MaÅ¡láňová + + * src/security.c: Cron doesn't use environment values from + /etc/security/pam_env.conf. This was fixed by moving pam_setcred + into first part of authentication of pam. + +2009-11-27 Marcela MaÅ¡láňová + + * cronie.init: Initscript: if unprivileged user stop deamon, it + should return 4. + +2009-11-27 Marcela MaÅ¡láňová + + * cronie.init: Initscript: if unprivileged user restart deamon, it + should return 4. + +2009-11-05 Guido Trentalancia + + * src/security.c: This function will be probably removed from + libselinux, so it is added into source code here. Signed-off-by: Marcela MaÅ¡láňová + +2009-11-05 Marcela MaÅ¡láňová + + * pam/crond: One line was missing in pam authentication. rhbz#533189 + +2009-11-03 Marcela MaÅ¡láňová + + * Makefile.am, configure.ac: Autotools - Makefile includes + dailyjobs, configure has new version. + +2009-11-03 Marcela MaÅ¡láňová + + * ChangeLog: New release 1.4.3. + +2009-11-03 SATOH Fumiyasu + + * src/misc.c: Fix "warning: unused variable" if LOG_FILE is not + defined Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * src/crontab.c: Portability: Use swap_uids() instead of setreuid() + directly Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * src/externs.h: Portability: Solaris and AIX support saved UID/GID Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * configure.ac, src/externs.h: Portability: Check if fchown() and + fchgrp() exist by configure. Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * src/crontab.c: Security: Ignore $TMPDIR if ruid!=euid and/or + rgid!=egid A setuid/setgid process with GNU C library does NOT + inherit $TMPDIR from the parent process for security reason, but + this behavior is NOT standard feature. Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * configure.ac: Portability: pam_misc.so is the Linux-PAM specific + library Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 SATOH Fumiyasu + + * configure.ac, src/externs.h: Portability: Check if sys/fcntl.h + exists or not Signed-off-by: Marcela MaÅ¡láňová + +2009-11-03 Marcela MaÅ¡láňová + + * contrib/dailyjobs: Dailyjobs are here for users who don't like + anacron. 0hourly executes cron.hourly scripts and other will be + executed by dailyjobs. + +2009-10-19 HONDA Hirofumi + + * cronie.init: When parent crond is stopped and child crond + (executing program) is running,"service crond status" reports "crond + (pid XXX) is running...". Signed-off-by: Marcela MaÅ¡láňová + +2009-10-12 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: New release with few bugfixes. + +2009-09-25 Marcela MaÅ¡láňová + + * src/database.c: Symlinks were not followed. This is a limitation + of inotify API. rhbz#477100 + +2009-09-18 Tomas Mraz + + * src/do_command.c: Do not segfault if mailto does not pass safe_p + test. + +2009-09-16 Tomas Mraz + + * pam/crond: Use password-auth common PAM configuration. + +2009-08-17 Marcela MaÅ¡láňová + + * anacron/lock.c, anacron/readtab.c, man/anacrontab.5: Add daily, + weekly as a possibility of anacrontab configuration. + +2009-08-11 Marcela MaÅ¡láňová + + * contrib/anacrontab: Add anacrontab configuration file. + +2009-08-11 Marcela MaÅ¡láňová + + * man/anacron.8, man/anacrontab.5, man/cron.8, man/crontab.1, + man/regularly-jobs.5: Polish manual pages. + +2009-07-30 Marcela MaÅ¡láňová + + * Makefile.am, anacron/Makefile, configure.ac, man/Makefile.am, + man/anacron.8, man/anacrontab.5, man/cron.8, man/crontab.5: Revert + configuration file regularly-file back to anacrontab. + +2009-07-29 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: Start minor releases cronie-1.4.1. + +2009-07-29 Marcela MaÅ¡láňová + + * contrib/regularly-jobs: Revert configure file for anacrontab. + +2009-07-29 Rocco Iannacci + + * anacron/readtab.c: Segfault on ppc64 was caused by parsing random + delay from anacrontab. Signed-off-by: Marcela MaÅ¡láňová + +2009-07-21 Marcela MaÅ¡láňová + + * configure.ac: New release cronie1.4. + +2009-07-20 Marcela MaÅ¡láňová + + * ChangeLog, Makefile.am, anacron/Makefile.am, man/Makefile.am, + man/anacron.8, man/anacrontab.5, man/cron.8, man/crontab.1, + man/crontab.5, man/regularly-jobs.5: New option: enable-anacron in + configure which can set compilation with or without anacron part. + Also there were changes in manual pages. Updated ChangeLog. + +2009-07-17 Å tÄ›pán Kasal + + * .gitignore, Makefile.am, anacron/Makefile.am, configure.ac: Fix of + autotools stuff for anacron. Signed-off-by: Marcela MaÅ¡láňová + +2009-07-16 Marcela MaÅ¡láňová + + * Makefile.am, anacron/Makefile.am, configure.ac, man/Makefile.am: + Make anacron configurable. The option --enable-anacron in configure + can switch on/off compilation of this part of the package. + +2009-07-16 Marcela MaÅ¡láňová + + * anacron/Makefile.am: Put anacron binary into proper location. + +2009-07-16 Marcela MaÅ¡láňová + + * .gitignore, Makefile.am, anacron/anacron.8, anacron/anacrontab.5, + contrib/0anacron, contrib/0hourly, contrib/regularly-jobs, + man/Makefile.am, man/anacron.8, man/anacrontab.5, regularly-jobs: + Add configuration scripts into contrib. Cleaning/adding man pages + into Makefile/directories. + +2009-07-14 Marcela MaÅ¡láňová + + * COPYING.anacron, ChangeLog.anacron, README.anacron, + anacron/COPYING, anacron/ChangeLog, anacron/README, anacron/TODO, + anacron/anacron.apm, anacron/debian/0anacron.daily, + anacron/debian/0anacron.monthly, anacron/debian/0anacron.weekly, + anacron/debian/README.debian, anacron/debian/anacron.postinst, + anacron/debian/anacron.postrm, anacron/debian/anacrontab, + anacron/debian/apm.d, anacron/debian/changelog, + anacron/debian/compat, anacron/debian/control, + anacron/debian/copyright, anacron/debian/cron.d, + anacron/debian/dirs, anacron/debian/docs, anacron/debian/init.d, + anacron/debian/rules: Cleaning useless files. + +2009-07-14 Marcela MaÅ¡láňová + + * Makefile.am, anacron/Makefile, anacron/Makefile.am, + anacron/global.h, anacron/main.c, configure.ac, regularly-jobs: + Anacron makefile was rewritten according to the rest of autotools + makefiles in this project. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/global.h, anacron/log.c, anacron/main.c, + anacron/readtab.c: New options: random delay could be set from + anacrontab instead of sysconfig file, range of hours when should be + jobs started. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/anacron.8, anacron/anacrontab.5: Update manual pages. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/readtab.c: Fix error message for wrong spooldir. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/global.h, anacron/gregor.c, anacron/log.c, + anacron/matchrx.c, anacron/runjob.c: Memory leaks should be fixed. + Instead of log is used slog function. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/global.h, anacron/runjob.c: The temporary file has file + descriptors for input and output instead of one descriptor. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/runjob.c: Mail langinfo was fixed. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/ChangeLog, anacron/README, anacron/TODO, + anacron/anacron.8, anacron/anacron.apm, anacron/anacrontab.5, + anacron/debian/0anacron.daily, anacron/debian/0anacron.monthly, + anacron/debian/0anacron.weekly, anacron/debian/README.debian, + anacron/debian/anacron.postinst, anacron/debian/anacron.postrm, + anacron/debian/anacrontab, anacron/debian/apm.d, + anacron/debian/changelog, anacron/debian/compat, + anacron/debian/control, anacron/debian/copyright, + anacron/debian/cron.d, anacron/debian/dirs, anacron/debian/docs, + anacron/debian/init.d, anacron/debian/rules, anacron/global.h, + anacron/gregor.c, anacron/gregor.h, anacron/lock.c, anacron/log.c, + anacron/main.c, anacron/readtab.c, anacron/runjob.c: Minor debian + release anacron-2.3.1 which adds this features: -anacron runs jobs + twice in a 31 day month -add hostname to emails sent to admin -allow + user anacrontabs and some debian scripts for apm support. + +2009-07-13 Marcela MaÅ¡láňová + + * anacron/COPYING, anacron/ChangeLog, anacron/Makefile, + anacron/README, anacron/TODO, anacron/anacron.8, + anacron/anacrontab.5, anacron/global.h, anacron/gregor.c, + anacron/gregor.h, anacron/lock.c, anacron/log.c, anacron/main.c, + anacron/matchrx.c, anacron/matchrx.h, anacron/readtab.c, + anacron/runjob.c: Initial upload of anacron-2.3 which should be + optimized for better cooperation with cronie. However, cronie should + be working with or without anacron, which should be configurable. + +2009-06-19 Tomas Mraz + + * src/cron.c: Fix the disable inotify functionality. + +2009-06-19 Marcela MaÅ¡láňová + + * src/cron.c: Option -i for disabling inotify support. This option + was based on email by user who can't set up daemon when they have + mounted from NFS /var/spool/cron for a number of identical machines. + Inotify pass the test because it find the directory, but didn't + notice changes. + http://linux-nfs.org/pipermail/nfsv4/2007-November/007127.html + Thanks to: Alex Bame + +2009-06-05 Marcela MaÅ¡láňová + + * src/cron.c, src/do_command.c, src/globals.h: ValidateMailRcpts + removed for problems when could be enviromental settings exported + under wrong user. + +2009-05-29 Marcela MaÅ¡láňová + + * src/.indent.pro, src/cron.c, src/crontab.c, src/database.c, + src/do_command.c, src/entry.c, src/env.c, src/job.c, src/misc.c, + src/popen.c, src/security.c, src/user.c: Beautify the code with + indent. Thanks for .indent.pro to Martin Klozik. + +2009-05-29 Marcela MaÅ¡láňová + + * configure.ac, src/Makefile.am, src/misc.c: CRON_DIR became + obsolete. SPOOL_DIR is enough for work with user crontables. + +2009-05-22 Marcela MaÅ¡láňová + + * : commit b96c9b94317b31c6bb7e1335a4c7ba7a7dca7e4a Author: + Å tÄ›pán Kasal Date: Fri May 22 + 09:05:10 2009 +0200 + +2009-05-22 Å tÄ›pán Kasal + + * src/cron.c, src/database.c, src/pathnames.h: Rename RH_CRON_DIR to + SYS_CRON_DIR. + +2009-05-22 Å tÄ›pán Kasal + + * configure.ac: Drop uselles part of configure. + +2009-05-22 Marcela MaÅ¡láňová + + * man/cron.8, src/funcs.h, src/security.c: Remove unused function + cron_get_job_context. + +2009-05-20 Marcela MaÅ¡láňová + + * src/do_command.c, src/funcs.h, src/security.c: PAM logging was + incorrect bz#249870. The jobs is setuid to user before exec. Mail + runs under root permissions. + +2009-05-14 Vlad Glagolev + + * src/cron.c: @reboot alias check the return value. Signed-off-by: Marcela MaÅ¡láňová + +2009-05-14 Marcela MaÅ¡láňová + + * src/do_command.c: Save delimiters need more characters f.e. '_'. + Fix based on: http://bugs.gentoo.org/show_bug.cgi?id=197625 + +2009-05-13 Marcela MaÅ¡láňová + + * configure.ac, man/crontab.5, src/do_command.c: MAILFROM, if set, + will be used as the envelope sender address when cron mails the + output of commands in that crontab. The initial patch was written + by: Heath Caldwell + +2009-04-28 Marcela MaÅ¡láňová + + * src/globals.h: No need to initialize globals, which are set by + default to zero. + +2009-04-28 StÄ›pán Kasal + + * configure.ac: Fix with(out)-pam in configure. Signed-off-by: Marcela MaÅ¡láňová + +2009-04-27 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: Update ChangeLog for new release. + +2009-04-23 Marcela MaÅ¡láňová + + * src/cron.c: Inotify initialization left open file descriptors + which are leaking and annoying SElinux. This could be once fixed by + inotify_init1, but that's supported from kernel 2.6.27. + +2009-04-15 Willy Tarreua + + * src/cron.c, src/crontab.c, src/globals.h: I have noticed that with + cronie-1.2, my binaries have seen their \ size grow by 10x (from + 28kB to 290kB). After searching a bit, I found that the responsible + was the INIT() macro in globals.h \ which initializes huge strings + MailCmd and cron_default_mail_charset both of which are 128 kB. Due + to this initialization, the memory \ areas are stored for real in + the binary, resulting in larger sizes Signed-off-by: Marcela MaÅ¡láňová + +2009-02-12 Marcela MaÅ¡láňová + + * configure.ac: Cronie could be build as Position Independent + Executable when the configure is executed with --enable-pie. Erased + commented unused stuff from configure. + +2009-02-12 Marcela MaÅ¡láňová + + * crond.sysconfig: Fix typo in sysconfig. + +2008-12-23 Marcela MaÅ¡láňová + + * ChangeLog: After long time update ChangeLog file. + +2008-12-23 Tomas Mraz + + * man/cron.8, man/crontab.5: Update man pages to reflect the + reality. + +2008-12-22 Tomas Mraz + + * src/cron.c, src/database.c, src/funcs.h, src/structs.h: Fix + handling of HUP signal with inotify enabled. + +2008-12-02 Marcela MaÅ¡láňová + + * configure.ac: Configure can't be run without pam-devel libraries. + (rhbz#473893) + +2008-10-24 Marcela MaÅ¡láňová + + * cronie.init: Init script is according to SysVInitScript + guidelines. + +2008-08-11 Marcela MaÅ¡láňová + + * src/cron.c: Check user before job is run. + +2008-07-28 Marcela MaÅ¡láňová + + * src/pathnames.h: Clean hardwired pathnames. + +2008-07-28 Marcela MaÅ¡láňová + + * man/crontab.5, src/cron.c, src/pathnames.h: @reboot jobs should be + run only after reboot instead of every daemon's restart. Patch + inspired by debian. + +2008-06-26 Marcela MaÅ¡láňová + + * ChangeLog, configure.ac: Release 1.2 + +2008-06-26 Marcela MaÅ¡láňová + + * man/cron.8, man/crontab.1: Updated manuals - diffent typos and + inotify support mentioned. + +2008-06-26 SATOH Fumiyasu + + * configure.ac, src/misc.c: Portability: File locking by fcntl, + lockf or flock Signed-off-by: Marcela MaÅ¡láňová + +2008-06-26 SATOH Fumiyasu + + * src/macros.h, src/misc.c: Bugfix: PATH_MAX is defined in limits.h Signed-off-by: Marcela MaÅ¡láňová + +2008-06-26 SATOH Fumiyasu + + * configure.ac, src/popen.c: Portability: Check if sys/cdefs.h is + there on the platform Signed-off-by: Marcela MaÅ¡láňová + +2008-06-23 SATOH Fumiyasu + + * configure.ac, src/funcs.h, src/macros.h, src/misc.c: Portability: + Check for struct tm.tm_gmtoff by AC_CHECK_MEMBERS Signed-off-by: Marcela MaÅ¡láňová + +2008-06-26 SATOH Fumiyasu + + * src/funcs.h: Bugfix: Correct log_it() prototype Signed-off-by: Marcela MaÅ¡láňová + +2008-06-26 Marcela MaÅ¡láňová + + * src/database.c: Add missing endif. + +2008-06-23 Tomas Mraz + + * src/cron.c, src/database.c: Fix the inotify support. + +2008-06-23 Tomas Mraz + + * src/crontab.c, src/database.c, src/do_command.c, src/entry.c, + src/env.c, src/job.c, src/misc.c, src/popen.c, src/pw_dup.c, + src/user.c: Remove rcsid tags. + +2008-06-23 Tomas Mraz + + * src/cron.h, src/security.c: Move macros and static declarations + where they are needed. + +2008-06-23 Tomas Mraz + + * configure.ac: Add check for _GNU_SOURCE. + +2008-06-23 Tomas Mraz + + * src/cron.c: Fix wrong declaration of orig_tz. + +2008-06-23 Tomas Mraz + + * src/cron.c, src/crontab.c, src/database.c, src/do_command.c, + src/entry.c, src/funcs.h, src/misc.c, src/popen.c, src/security.c, + src/user.c: Unification of logging (syslog->log_it). + +2008-06-23 Tomas Mraz + + * src/security.c: Fixed call to setkeycreatecon. + +2008-05-30 Marcela MaÅ¡láňová + + * configure.ac: Update version also in configure. + +2008-05-30 Marcela MaÅ¡láňová + + * ChangeLog: cronie-1.1 released. Updated Changelog. + +2008-05-30 Marcela MaÅ¡láňová + + * cronie.init: Init script die faster, if the sysconfig script is + missing. Patch from scop. + +2008-05-29 Marcela MaÅ¡láňová + + * src/database.c: Function instead of macro. Code cleaning. + +2008-05-27 Marcela + + * man/crontab.1: Man: crontab.1 TMP directory could be set in + eviroment instead of /tmp. + +2008-05-27 Marcela + + * src/security.c: Keyring will be created after restart of computer + and services won't be dying on selinux denial. The reason for this + change was pam-devels update. + +2008-05-27 Marcela + + * src/funcs.h, src/security.c: Remove unused function. + +2008-05-27 Marcela + + * src/cron.c, src/database.c: Permission of crontabs are checked in + case we AREN'T using -p option. + +2008-03-14 Marcela MaÅ¡láňová + + * src/cron.c: Better testing, when we are closing watches. + +2008-03-14 Marcela MaÅ¡láňová + + * configure.ac, src/cron.c, src/cron.h, src/crontab.c, + src/database.c, src/externs.h, src/funcs.h, src/structs.h: Rewrited + inotify support. + +2008-01-31 Marcela MaÅ¡láňová + + * src/security.c, src/user.c: Using get_default_context() for name = + NULL instead of getseuserbyname because files created in + /var/spool/cron hadn't wrong context. rhbz#426704 + +2008-01-31 Marcela MaÅ¡láňová + + * .gitignore, Makefile.am, crond.pam, man/bitstring.3, man/cron.8, + man/crontab.1, man/crontab.5, pam/crond: Stepan Kasal: create pam's + own directory for pam configure. Create correct man pages in man + directory. Add .gitignore file. + +2008-01-30 Marcela MaÅ¡láňová + + * Makefile.am, config.h, config.h.in, configure.ac, + man/Makefile.am, man/bitstring.3.in, man/cron.8.in, man/crond.8.in, + man/crontab.1.in, man/crontab.5.in, src/.deps/cron.Po, + src/.deps/crontab.Po, src/.deps/database.Po, src/.deps/debug.Po, + src/.deps/do_command.Po, src/.deps/entry.Po, src/.deps/env.Po, + src/.deps/job.Po, src/.deps/misc.Po, src/.deps/popen.Po, + src/.deps/pw_dup.Po, src/.deps/security.Po, src/.deps/user.Po, + src/Makefile.am, src/cron.c, src/crontab.c, src/database.c, + src/do_command.c, src/entry.c, src/env.c, src/job.c, src/misc.c, + src/popen.c, src/pw_dup.c, src/security.c, src/user.c, stamp-h1: + Added patch from Stepan Kasal, which fixed all autotools issues. + Also the pam's configure file is now installed directly into correct + path, if it's configure runned with pam. + +2008-01-17 Marcela MaÅ¡láňová + + * CHANGES, COPYING, ChangeLog, INSTALL, LICENSE, Makefile, + Makefile.am, Makefile.in, NEWS, README, aclocal.m4, + autom4te.cache/output.0, autom4te.cache/output.1, + autom4te.cache/requests, autom4te.cache/traces.0, + autom4te.cache/traces.1, config.guess, config.h, config.log, + config.status, config.sub, configure, configure.ac, cronie.init, + depcomp, install-sh, man/Makefile, man/Makefile.am, + man/Makefile.in, man/bitstring.3, man/cron.8, man/crond.8, + man/crontab.1, man/crontab.5, missing, src/Makefile, + src/Makefile.am, src/Makefile.in, vixie-cron.init: Cleaning git from + unnecessary files, which were generated from autotools. Add files or + rename according to autotools custom practice. There were also alternation of configure and makefiles. + +2008-01-09 Marcela Maslanova + + * Makefile, config.h, config.log, config.status, man/Makefile, + man/bitstring.3, man/cron.8, man/crontab.1, man/crontab.5, + src/.deps/cron.Po, src/.deps/crontab.Po, src/.deps/database.Po, + src/.deps/debug.Po, src/.deps/do_command.Po, src/.deps/entry.Po, + src/.deps/env.Po, src/.deps/job.Po, src/.deps/misc.Po, + src/.deps/popen.Po, src/.deps/pw_dup.Po, src/.deps/security.Po, + src/.deps/user.Po, src/Makefile: Add missing files generated after + running ./configure + +2008-01-09 Marcela Maslanova + + * CHANGES: In CHANGES could be found git-log with last changes. + +2008-01-09 Marcela Maslanova + + * Makefile.in, aclocal.m4, autom4te.cache/output.0, + autom4te.cache/output.1, autom4te.cache/requests, + autom4te.cache/traces.0, autom4te.cache/traces.1, config.guess, + config.sub, configure, depcomp, install-sh, man/Makefile.in, + missing, src/Makefile.in: Now really add all files generated by + autotools. + +2008-01-09 Marcela Maslanova + + * config.h.in: Add binary configure. + +2008-01-03 Marcela Maslanova + + * vixie-cron.spec: Use changelog instead of spec. + +2007-11-30 Marcela Maslanova + + * configure.ac: Don't set up MAIL_DATE, because if the user doesn't + use sendmail, then he has incorrect time format. + +2007-11-19 Marcela Maslanova + + * vixie-cron.spec: Upload spec file with fixed bcond macro. + +2007-11-12 Marcela Maslanova + + * man/cron.8.in, man/crond.8.in, man/crontab.5.in: Man pages are + updated for time zone and some small changes. + +2007-11-12 Marcela Maslanova + + * src/cron.c, src/misc.c: Time zones are now supported. Setting in + cron table CRON_TZ=SomeTimeZone does jobs in this time zone. There + was problem with syslog, because it print local time into log only, + when I remove ifdef parts from misc.c. With ifdef parts print out + the time of 'highest' time zone, which could be bug of rsyslog. + +2007-11-12 Marcela Maslanova + + * configure.ac: In configure was incorrect path for sendmail. The + error occured only when sendmail wasn't set up like default MTA. + +2007-11-05 Marcela Maslanova + + * src/security.c: Opening credentials is really needed for cron + jobs, but not for crontab. Crontab doesn't use credentials from file + security.c so we can leave it as it was. + +2007-10-30 Marcela Maslanova + + * configure.ac: Change version of cron in configure. + +2007-10-29 Marcela Maslanova + + * vixie-cron.spec: Update spec file - new bcond macro. + +2007-10-29 Marcela Maslanova + + * src/popen.c: Some cron jobs failed without error message. If the + job had too "big" output and no mail client set, then only a part + from job was done. The reason was pipe, which has restricted size. + rh bugzilla #247228 + +2007-10-03 Marcela Maslanova + + * LICENSE: The file LICENSE is used instead of COPYING. + +2007-10-03 Marcela Maslanova + + * vixie-cron.spec: Add spec file from rpm package, because there is + changelog. + +2007-10-03 Marcela Maslanova + + * COPYING, ChangeLog, INSTALL, Makefile.am, NEWS, README, + configure.ac, doc/CHANGES, doc/CONVERSION, doc/FEATURES, + doc/INSTALL, doc/MAIL, doc/Makefile.am, doc/README, doc/THANKS, + src/Makefile.am: Deleting and modyfing files with license etc. The + compilation with selinux and audit is optional. + +2007-10-02 Marcela Maslanova + + * src/user.c: The jobs in RH_CROND_DIR weren't syntactically + checked. Also SYSCRON wasn't checked. The problem is reported into + log. + +2007-08-28 Marcela MaÅ¡láňová + + * vixie-cron.init: Fix reading arguments from configure file. + +2007-08-27 Tomas Janousek + + * src/security.c: Commented out cron_open_pam_session, it's unused. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/security.c: Protect the call to setexeccon with WITH_SELINUX. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/misc.c: Compile fix in misc.c. (I have no f*cking idea why do I do this change now...) Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/crontab.c, src/funcs.h: Kill a few warnings. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * config.h.in, configure.ac: Fix the MAILARG and MAILFMT definitions + and regenerate config.h.in. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * configure.ac, src/security.c: Move #define _GNU_SOURCE from + security.c to CFLAGS. (it's needed for HAVE_SELINUX as well) Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/pathnames.h: Don't define SYSLOG in pathnames.h. It's in configure.ac and gets defined in config.h. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * configure.ac: CRON_GROUP shall not be defined at all. (also filled in a sensible default in case someone enables it again) Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/Makefile.am: Added -laudit to LDADD. Signed-off-by: Tomas Janousek + +2007-08-27 mmaslano + + * configure.ac, src/cron.c, src/cron.h: Version of cron is used from + configure. + +2007-08-27 mmaslano + + * configure.ac: Correct setting of path to mail program. + +2007-08-27 mmaslano + + * src/config.h, src/cron.h, src/pw_dup.c: Use config.h generated by + autotools. + +2007-08-27 mmaslano + + * src/security.c: Added missing #ifdef WITH_PAM. + +2007-08-27 mmaslano + + * src/funcs.h: Correct definition of cron_popen in .h file. + +2007-08-27 Tomas Janousek + + * src/crontab.c: Added missing #ifdef WITH_PAM. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/funcs.h, src/security.c: Make + cron_restore_default_security_context return void. Signed-off-by: Tomas Janousek + +2007-08-27 Tomas Janousek + + * src/misc.c: Revert "System table wasn't sometimes checked for + changes." This reverts commit b18c0c9a01bef691c7b696709cd2f9736ba98a82. Signed-off-by: Tomas Janousek + +2007-08-24 mmaslano + + * src/popen.c: rhbz#247228 cron jobs fail semi-randomly if sendmail + (or other mail) isn't set. The jobs aren't "sometimes" run, because output, which + has to be sent isn't set and the stdin pipe, which is used haven't + enough capacity. The problem is at least reported in log. + +2007-08-24 mmaslano + + * man/crond.8.in, man/crontab.1.in, man/crontab.5.in: Add crond.8 + (the same as cron.8) manual page and other man pages were updated. + +2007-08-24 mmaslano + + * src/funcs.h: Change definiton from popen.c in header file. + +2007-08-24 mmaslano + + * src/bitstring.h, src/popen.c: For the same license for whole cron, + I've removed two files and found almost the same with correct license. + +2007-08-24 mmaslano + + * AUTHORS, CHANGES, CONVERSION, COPYING, ChangeLog, FEATURES, + INSTALL, MAIL, Makefile, Makefile.am, NEWS, README, THANKS, + bitstring.3, bitstring.h, config.h, config.h.in, configure.ac, + cron.8, cron.c, cron.h, crond.sysconfig, crontab.1, crontab.5, + crontab.c, database.c, do_command.c, doc/CHANGES, doc/CONVERSION, + doc/FEATURES, doc/INSTALL, doc/MAIL, doc/Makefile.am, doc/README, + doc/THANKS, entry.c, env.c, externs.h, funcs.h, globals.h, job.c, + macros.h, man/Makefile.am, man/bitstring.3.in, man/cron.8.in, + man/crontab.1.in, man/crontab.5.in, misc.c, pathnames.h, popen.c, + putman.sh, pw_dup.c, security.c, src/Makefile.am, src/bitstring.h, + src/config.h, src/cron.c, src/cron.h, src/crontab.c, + src/database.c, src/do_command.c, src/entry.c, src/env.c, + src/externs.h, src/funcs.h, src/globals.h, src/job.c, src/macros.h, + src/misc.c, src/pathnames.h, src/popen.c, src/pw_dup.c, + src/security.c, src/structs.h, src/user.c, stamp-h1, structs.h, + user.c, vixie-cron.init: Cron source was ready for merge with + patches. After the merge I used autotools (files were copied to new dirs and configure.ac and + Makefile.am were written). + +2007-08-24 mmaslano + + * cron.h, crontab.c, do_command.c, security.c: Pam authentication + wasn't used wise. User's crontab didn't use pam and functions, which were for pam opening etc. were + incorrect (wrong credetials). + +2007-08-24 mmaslano + + * crontab.1, security.c: Checking homedir is last, because we need + at first set up gid and uid. + +2007-08-24 mmaslano + + * crontab.c: It's possible to use your own tmp dir. Before was /tmp + hardwired. + +2007-08-24 mmaslano + + * crontab.5: System table in manual page is mentioned. + +2007-08-24 mmaslano + + * database.c: Hard links on system table break doing jobs. + +2007-08-24 mmaslano + + * misc.c: System table wasn't sometimes checked for changes. + +2007-08-24 mmaslano + + * security.c: Audit: new auditing message is print, when the user + isn't allowed to use mls range. Job wasn't runned without warning message. + +2007-08-24 mmaslano + + * misc.c: Because there was typo (- instead of +) jobs wasn't runned + after new year. + +2007-08-24 mmaslano + + * cron.8, crontab.1, crontab.5: Errors in manual was fixed and mls + range was mentioned. + +2007-08-17 mmaslano + + * cron.c, database.c: Force reload of database when SIGGUP is + received. max_mtime uses dir_name instead of SPOOL_DIR now. (which + caused a bug preventing correct detection of changes in + RH_CROND_DIR) (comment updated by ) + +2007-08-17 mmaslano + + * crontab.c, do_command.c, funcs.h, security.c: Selinux ranges: for + every selinux operation are now checked the ranges of user. Now is set not only context for user, but even + ranges(enabled selinux or selinux in mls mode). + +2007-08-17 mmaslano + + * crontab.c: It's possible to change file without changing mtime of + file. So we're stat'ing files for the changes of files. The detection of + not_a_crontab files was added: files started with dot aren't + crontabs etc. + +2007-08-17 mmaslano + + * crond.pam: pam.limits.so was substitued by system-auth (pam + progress). + +2007-08-17 mmaslano + + * security.c: Part with_selinux now include even the testing of + linux context. + +2007-08-17 mmaslano + + * cron.c: Loading database before reaping the child take up time of running the jobs. + +2007-08-17 mmaslano + + * do_command.c: The Auto-Submitted header is defined (and suggested + by) RFC3834. Added into mail header: 'Auto-Submitted: auto-generated' + +2007-08-17 mmaslano + + * cron.8: Fix typo in man pages. + +2007-08-17 mmaslano + + * database.c: It's possible to change file without changing mtime of + file. So we're stat'ing files for the changes of files. The detection of + not_a_crontab files was added: files started with dot aren't + crontabs etc. + +2007-08-17 mmaslano + + * crontab.1, crontab.5, crontab.c, funcs.h, security.c: Selinux: + option -s added. Header from crontab was removed and now is print into crontab the SELINUX_ROLE_TYPE which specify the + permission of user. With mls could one user run some jobs with + different roles and security level. + +2007-08-17 mmaslano + + * Makefile, security.c, structs.h: Into with_selinux and with_pam + part was added variables used only there. In Makefile are libs set by variables. + +2007-08-17 mmaslano + + * cron.c, crontab.5, do_command.c, externs.h, globals.h: Now is + possible to use different character encodings for mailed cron job + output by setting the CONTENT_TYPE and CONTENT_TRANSFER_ENCODING variables in + crontabs, to the correct values of the mail headers of those names. + +2007-08-17 mmaslano + + * crond.pam: Module pam_limit.so was added to default configuration. + +2007-08-17 mmaslano + + * security.c: Fixing "security": minutely job are made realy only + one time per minute. If the job is delayed into next minute, then it's skipped + for this minute. + +2007-08-17 mmaslano + + * Makefile, crontab.c, do_command.c, funcs.h, popen.c, security.c, + user.c: The security.c file was filled with selinux and pam often used functions, which were removed from other files. + +2007-08-17 mmaslano + + * cron.8, cron.c, do_command.c, globals.h: Option -m was added: it's + possible to use something else then sendmail. + +2007-08-17 mmaslano + + * Makefile, misc.c: Now is cron with audit. Complaining about + denying users. + +2007-08-17 mmaslano + + * crontab.c, do_command.c, env.c, misc.c, pw_dup.c: The return value + were added because of too many warning messages from compiler. Also the variables were initialized. + +2007-08-17 mmaslano + + * do_command.c: 'Build enviroment' is set in pam section for better + security. + +2007-08-17 mmaslano + + * config.h: Comments were changed. + +2007-08-17 mmaslano + + * user.c: Selinux: Instead of getting context and then the username + is used function getuserbyname. + +2007-08-17 mmaslano + + * crontab.c: Too many flags was set for lstating crontab. Time of + change is checked and uids for reading new crontab are ok. + +2007-08-17 mmaslano + + * database.c, funcs.h, structs.h, user.c: List corruption when items + are removed from /etc/cron.d. Variable tabname is filled with file or NULL and checked when + crontab is changed. + +2007-08-17 mmaslano + + * crond.pam: Crond.pam was changed according to pam modules. The pam_limits.so could be used. + +2007-08-17 mmaslano + + * crontab.c: lstat instead of stat can stat even symlink itself, not + the file that it refers to. + +2007-08-17 mmaslano + + * macros.h: Redefined limits of macros. + +2007-08-17 mmaslano + + * do_command.c: If fork fails, pam has to close session. + +2007-08-17 mmaslano + + * crontab.c: fix of bug rhbz#154065: crontab should not use + waitpid(...,WUNTRACED) and stop itself if its child is stopped + +2007-08-17 mmaslano + + * do_command.c: PAM hadn't closed session. + +2007-08-17 mmaslano + + * do_command.c, user.c: Selinux doesn't segfault, because of: + permissive mode returns 0 and selinux enabled is also check context. + +2007-08-17 mmaslano + + * cron.c, do_command.c, globals.h: Cron validate the recipient only + when CRON_VALIDATE_MAILRCPTS isn't null. Validating of email + recipient is default off. + +2007-08-17 mmaslano + + * do_command.c: Set item in pam - "cron". + +2007-08-17 mmaslano + + * do_command.c, misc.c, pw_dup.c: Initialize some important + variables. + +2007-08-17 mmaslano + + * cron.8, cron.c, database.c, globals.h: Add -p option for crontab. Without the -p option /etc/crontab must not be writable by any user + other than root, no crontab files may be links, or linked to by any + other file, and no crontab files may be executable, or be writable + by any user other than their owner + +2007-08-17 mmaslano + + * Makefile, crontab.c: Fix for ppc: int ch='\0' is initialized. + +2007-08-17 mmaslano + + * crontab.c: Don't read the header of crontab. + +2007-08-17 mmaslano + + * misc.c: For setegid are used saved gid instead of getgid(). Now are swaped back the correct gid. + +2007-08-17 mmaslano + + * misc.c: Allow root's crontab (check with getuid). + +2007-08-17 mmaslano + + * crontab.c: According to changes in selinux + selinux_check_passwd_access is now enough for examinitaion of user's password. + +2007-08-17 mmaslano + + * user.c: Context in selinux is now correctly undone. + +2007-08-17 mmaslano + + * cron.8, crontab.5, database.c: /etc/crontab is now writable only + by root. No links on this file are allowed. + +2007-08-17 mmaslano + + * crontab.1, crontab.c: Add -i option to crontab, which print prompt + before removing crontab. + +2007-08-17 mmaslano + + * crontab.5: Nicknames were mentioned in man pages (@yearly, + @hourly, etc). + +2007-08-17 mmaslano + + * crontab.c: Crontab is stat instead of fstat and crontab is + reopened for reading new stdin. This change should: Allowed editors + such as 'gedit' which do not modify original file, but which + rename(2) a temp file to original, to be used by crontab -e (bug + 129170). + +2007-08-17 mmaslano + + * do_command.c: In lower version of pam was re-open log needed + (rhel-4 and lower). + +2007-08-17 mmaslano + + * crond.pam: Change in pam configuration file (auth sufficient is + now used). + +2007-08-17 mmaslano + + * crontab.c, user.c: Selinux for crontab: checking users with + selinux. User is fixed from char to const char. + +2007-08-17 mmaslano + + * database.c: Hardwired 'system' wasn't needed. + +2007-08-17 mmaslano + + * Makefile, crond.pam: Add file crond.pam, which has rules for pam + sessions. In Makefile is now crond.pam installed. + +2007-08-17 mmaslano + + * Makefile: Now we compile with pam flags and libs. + +2007-08-17 mmaslano + + * cron.8, cron.h, do_command.c: PAM support was added: open sessions + and set credentials for users. + +2007-08-17 mmaslano + + * Makefile: In Makefile are now LIB = -lselinux and -DWITH_SELINUX flags. + +2007-08-17 mmaslano + + * FEATURES, cron.8, crontab.1, crontab.5: Features was added into + manual. + +2007-08-17 mmaslano + + * crontab.c: Remove header in user's crontab. + +2007-08-17 mmaslano + + * misc.c: Logs now inform about creating crontabs for users, which + aren't allowed to use crontab. It's for user in cron.{allow,deny} + +2007-08-17 mmaslano + + * crontab.c: Change behavior to allow crontab to take stdin with no + '-'. + +2007-08-17 mmaslano + + * database.c: RH_CROND was added in programme - stating directory. + In RH_CROND are system crontables. + +2007-08-17 mmaslano + + * misc.c: Use snprintf instead of sprintf. + +2007-08-17 mmaslano + + * do_command.c, popen.c: Use fork instead of vfork. Add signal: Our grandparent is watching for our parent's death + by catching SIGCHLD. Meanwhile, our parent will use wait explicitly and so has disabled SIGCHLD. So now it's time to reset SIGCHLD handling. + +2007-08-17 mmaslano + + * cron.h, database.c, do_command.c, funcs.h, structs.h, user.c: Add first selinux patch. Loading users through selinux scontext. + +2007-08-17 mmaslano + + * config.h: Redefine sendmail options. + +2007-08-17 mmaslano + + * pathnames.h: Change path names for redhat/fedora system. + +2007-08-17 mmaslano + + * Makefile: Changes in Makefile: flags, -pie option, permission and + installation paths for redhat/fedora system. + +2007-08-17 mmaslano + + * Source files of vixie-cron-4.1. + diff --git a/cronie-1.4.6/INSTALL b/cronie-1.4.6/INSTALL new file mode 100644 index 0000000..9f40603 --- /dev/null +++ b/cronie-1.4.6/INSTALL @@ -0,0 +1,22 @@ +Basic Installation +================== + +In the vixie-cron directory run: +autoreconf +These commands create from configure.ac executable ./configure + +Then you can start installation: +make +make install + +The executable files will be installed in /usr/local/* + +Options +======= +In the default package are used configure options: +--with-pam +--with-selinux +--with-audit + + + diff --git a/cronie-1.4.6/Makefile.am b/cronie-1.4.6/Makefile.am new file mode 100644 index 0000000..05c541a --- /dev/null +++ b/cronie-1.4.6/Makefile.am @@ -0,0 +1,13 @@ +SUBDIRS = src man +if ANACRON +SUBDIRS += anacron +endif + +if PAM +pamdir = $(sysconfdir)/pam.d +dist_pam_DATA = pam/crond +endif + +EXTRA_DIST = cronie.init crond.sysconfig contrib/anacrontab \ + contrib/0anacron contrib/0hourly \ + contrib/dailyjobs diff --git a/cronie-1.4.6/Makefile.in b/cronie-1.4.6/Makefile.in new file mode 100644 index 0000000..93bc9f3 --- /dev/null +++ b/cronie-1.4.6/Makefile.in @@ -0,0 +1,753 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ANACRON_TRUE@am__append_1 = anacron +subdir = . +DIST_COMMON = README $(am__configure_deps) $(am__dist_pam_DATA_DIST) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__dist_pam_DATA_DIST = pam/crond +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pamdir)" +DATA = $(dist_pam_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src man anacron +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANACRONTAB = @ANACRONTAB@ +ANACRON_SPOOL_DIR = @ANACRON_SPOOL_DIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAEMON_GROUPNAME = @DAEMON_GROUPNAME@ +DAEMON_USERNAME = @DAEMON_USERNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBAUDIT = @LIBAUDIT@ +LIBOBJS = @LIBOBJS@ +LIBPAM = @LIBPAM@ +LIBS = @LIBS@ +LIBSELINUX = @LIBSELINUX@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPOOL_DIR = @SPOOL_DIR@ +STRIP = @STRIP@ +SYSCRONTAB = @SYSCRONTAB@ +SYS_CROND_DIR = @SYS_CROND_DIR@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src man $(am__append_1) +@PAM_TRUE@pamdir = $(sysconfdir)/pam.d +@PAM_TRUE@dist_pam_DATA = pam/crond +EXTRA_DIST = cronie.init crond.sysconfig contrib/anacrontab \ + contrib/0anacron contrib/0hourly \ + contrib/dailyjobs + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-dist_pamDATA: $(dist_pam_DATA) + @$(NORMAL_INSTALL) + test -z "$(pamdir)" || $(MKDIR_P) "$(DESTDIR)$(pamdir)" + @list='$(dist_pam_DATA)'; test -n "$(pamdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pamdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pamdir)" || exit $$?; \ + done + +uninstall-dist_pamDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_pam_DATA)'; test -n "$(pamdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pamdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pamdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pamdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-dist_pamDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-dist_pamDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dist_pamDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-dist_pamDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cronie-1.4.6/NEWS b/cronie-1.4.6/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/cronie-1.4.6/README b/cronie-1.4.6/README new file mode 100644 index 0000000..c298ffe --- /dev/null +++ b/cronie-1.4.6/README @@ -0,0 +1,11 @@ +17. January 2008 mmaslano (at) redhat (dot) com +Rename the fork on cronie. The source code could be found here: +http://mmaslano.fedorapeople.org/cronie/ or git archive here: +git://git.fedorahosted.org/git/cronie.git + +3. October 2007 mmaslano (at) redhat (dot) com +This is a clone of 'original' vixie-cron. It was used in Red Hat|Fedora +system and patched for a long time. Now was made clone tagged with +version 4.2. +Changes are mainly in git commit messages, some older changes could be +found in spec changelog (contrib/vixie-cron.spec). diff --git a/cronie-1.4.6/aclocal.m4 b/cronie-1.4.6/aclocal.m4 new file mode 100644 index 0000000..e9b7b28 --- /dev/null +++ b/cronie-1.4.6/aclocal.m4 @@ -0,0 +1,951 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/cronie-1.4.6/anacron/Makefile.am b/cronie-1.4.6/anacron/Makefile.am new file mode 100644 index 0000000..1a2ab5e --- /dev/null +++ b/cronie-1.4.6/anacron/Makefile.am @@ -0,0 +1,28 @@ +# Makefile.am - two binaries crond and crontab +sbin_PROGRAMS = anacron + +anacron_SOURCES = \ + gregor.c lock.c log.c main.c matchrx.c readtab.c runjob.c \ + $(common_src) +common_src = global.h gregor.h matchrx.h +common_nodist = anacron-paths.h +nodist_anacron_SOURCES = $(common_nodist) +BUILT_SOURCES = $(common_nodist) + + +LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) + +# This header contains all the paths. +# If they are configurable, they are declared in configure script. +# Depends on this Makefile, because it uses make variables. +anacron-paths.h: Makefile + @echo 'creating $@' + @sed >$@ 's/ *\\$$//' <<\END #\ + /* This file has been automatically generated. Do not edit. */ \ + \ + #ifndef _ANACRON_PATHS_H_ \ + #define _ANACRON_PATHS_H_ \ + #define ANACRON_SPOOL_DIR "$(ANACRON_SPOOL_DIR)" \ + #define ANACRONTAB "$(ANACRONTAB)" \ + #endif /* _ANACRON_PATHS_H_ */ \ + END diff --git a/cronie-1.4.6/anacron/Makefile.in b/cronie-1.4.6/anacron/Makefile.in new file mode 100644 index 0000000..a88aa34 --- /dev/null +++ b/cronie-1.4.6/anacron/Makefile.in @@ -0,0 +1,510 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = anacron$(EXEEXT) +subdir = anacron +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" +PROGRAMS = $(sbin_PROGRAMS) +am__objects_1 = +am_anacron_OBJECTS = gregor.$(OBJEXT) lock.$(OBJEXT) log.$(OBJEXT) \ + main.$(OBJEXT) matchrx.$(OBJEXT) readtab.$(OBJEXT) \ + runjob.$(OBJEXT) $(am__objects_1) +nodist_anacron_OBJECTS = $(am__objects_1) +anacron_OBJECTS = $(am_anacron_OBJECTS) $(nodist_anacron_OBJECTS) +anacron_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +anacron_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(anacron_SOURCES) $(nodist_anacron_SOURCES) +DIST_SOURCES = $(anacron_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANACRONTAB = @ANACRONTAB@ +ANACRON_SPOOL_DIR = @ANACRON_SPOOL_DIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAEMON_GROUPNAME = @DAEMON_GROUPNAME@ +DAEMON_USERNAME = @DAEMON_USERNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBAUDIT = @LIBAUDIT@ +LIBOBJS = @LIBOBJS@ +LIBPAM = @LIBPAM@ +LIBS = @LIBS@ +LIBSELINUX = @LIBSELINUX@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPOOL_DIR = @SPOOL_DIR@ +STRIP = @STRIP@ +SYSCRONTAB = @SYSCRONTAB@ +SYS_CROND_DIR = @SYS_CROND_DIR@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +anacron_SOURCES = \ + gregor.c lock.c log.c main.c matchrx.c readtab.c runjob.c \ + $(common_src) + +common_src = global.h gregor.h matchrx.h +common_nodist = anacron-paths.h +nodist_anacron_SOURCES = $(common_nodist) +BUILT_SOURCES = $(common_nodist) +LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu anacron/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu anacron/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +anacron$(EXEEXT): $(anacron_OBJECTS) $(anacron_DEPENDENCIES) + @rm -f anacron$(EXEEXT) + $(LINK) $(anacron_OBJECTS) $(anacron_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gregor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matchrx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtab.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runjob.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-sbinPROGRAMS + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-sbinPROGRAMS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sbinPROGRAMS + + +# This header contains all the paths. +# If they are configurable, they are declared in configure script. +# Depends on this Makefile, because it uses make variables. +anacron-paths.h: Makefile + @echo 'creating $@' + @sed >$@ 's/ *\\$$//' <<\END #\ + /* This file has been automatically generated. Do not edit. */ \ + \ + #ifndef _ANACRON_PATHS_H_ \ + #define _ANACRON_PATHS_H_ \ + #define ANACRON_SPOOL_DIR "$(ANACRON_SPOOL_DIR)" \ + #define ANACRONTAB "$(ANACRONTAB)" \ + #endif /* _ANACRON_PATHS_H_ */ \ + END + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cronie-1.4.6/anacron/global.h b/cronie-1.4.6/anacron/global.h new file mode 100644 index 0000000..91963a7 --- /dev/null +++ b/cronie-1.4.6/anacron/global.h @@ -0,0 +1,156 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + +#ifndef _ANACRON_GLOBAL_H +#define _ANACRON_GLOBAL_H + +/* Syslog facility and priorities messages will be logged to (see syslog(3)). + * If you change these, please update the man page. */ +#define SYSLOG_FACILITY LOG_CRON +#define EXPLAIN_LEVEL LOG_NOTICE /* informational messages */ +#define COMPLAIN_LEVEL LOG_ERR /* error messages */ +#define DEBUG_LEVEL LOG_DEBUG /* only used when DEBUG is defined */ + +/* Mail interface. (All MTAs should supply this command) */ +#define SENDMAIL "/usr/sbin/sendmail" + +/* End of user-configurable section */ + + +#define FAILURE_EXIT 1 +#define MAX_MSG 150 + +#include +#include "anacron-paths.h" + +/* Some declarations */ + +struct env_rec1 { + char *assign; + + struct env_rec1 *next; +}; +typedef struct env_rec1 env_rec; + +struct job_rec1 { + int period; + int named_period; + int delay; + char *ident; + char *command; + char *mailto; + + int tab_line; + int arg_num; + int timestamp_fd; + int input_fd; + int output_fd; + int mail_header_size; + pid_t job_pid; + pid_t mailer_pid; + int drop_job; + + struct job_rec1 *next; + env_rec *prev_env_rec; +}; +typedef struct job_rec1 job_rec; + +/* Global variables */ + +extern pid_t primary_pid; +extern char *program_name; +extern char *anacrontab; +extern char *spooldir; +extern int old_umask; +extern sigset_t old_sigmask; +extern int serialize,force,update_only,now,no_daemon,quiet,testing_only; +extern int day_now; +extern int year,month,day_of_month; +extern int in_background; + +extern job_rec *first_job_rec; +extern env_rec *first_env_rec; + +extern char **args; +extern int nargs; + +extern int njobs; +extern job_rec **job_array; + +extern int running_jobs,running_mailers; + +extern int complaints; + +/* time ranges for START_HOURS_RANGE */ +extern int range_start; +extern int range_stop; + +/* Function prototypes */ + +/* main.c */ +int xopen(int fd, const char *file_name, int flags); +void xclose(int fd); +pid_t xfork(void); + +#ifdef __GNUC__ +#define PRINTF_FORMAT(n, m) \ + __attribute__ ((format (printf, n, m))) +#else +#define PRINTF_FORMAT(n, m) +#endif + +/* log.c */ +void explain(const char *fmt, ...)PRINTF_FORMAT(1,2); +void explain_e(const char *fmt, ...)PRINTF_FORMAT(1,2); +void complain(const char *fmt, ...)PRINTF_FORMAT(1,2); +void complain_e(const char *fmt, ...)PRINTF_FORMAT(1,2); +void die(const char *fmt, ...)PRINTF_FORMAT(1,2); +void die_e(const char *fmt, ...)PRINTF_FORMAT(1,2); +void xdebug(const char *fmt, ...)PRINTF_FORMAT(1,2); +void xdebug_e(const char *fmt, ...)PRINTF_FORMAT(1,2); +void xcloselog(void); + +#ifdef DEBUG +#define Debug(args) xdebug args +#define Debug_e(args) xdebug_e args +#else /* not DEBUG */ +#define Debug(args) (void)(0) +#define Debug_e(args) (void)(0) +#endif /* not DEBUG */ + +/* readtab.c */ +void read_tab(int cwd); +void arrange_jobs(void); + +/* lock.c */ +int consider_job(job_rec *jr); +void unlock(job_rec *jr); +void update_timestamp(job_rec *jr); +void fake_job(job_rec *jr); + +/* runjob.c */ +void tend_children(); +void launch_job(job_rec *jr); + +#endif diff --git a/cronie-1.4.6/anacron/gregor.c b/cronie-1.4.6/anacron/gregor.c new file mode 100644 index 0000000..91e4173 --- /dev/null +++ b/cronie-1.4.6/anacron/gregor.c @@ -0,0 +1,181 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +#include +#include +#include "gregor.h" + +static const int +days_in_month[] = { + 31, /* Jan */ + 28, /* Feb (non-leap) */ + 31, /* Mar */ + 30, /* Apr */ + 31, /* May */ + 30, /* Jun */ + 31, /* Jul */ + 31, /* Aug */ + 30, /* Sep */ + 31, /* Oct */ + 30, /* Nov */ + 31 /* Dec */ +}; + +static int leap(int year); + +int +day_num(int year, int month, int day) +/* Return the "day number" of the date year-month-day according to the + * "proleptic Gregorian calendar". + * If the given date is invalid, return -1. + * + * Here, "day number" is defined as the number of days since December 31, + * 1 B.C. (Gregorian). (January 1, 1 A.D. is day number 1 etc...) + * + * The Gregorian calendar was instituted by Pope Gregory XIII in 1582, + * and has gradually spread to become the international standard calendar. + * The proleptic Gregorian calendar is formed by projecting the date system + * of the Gregorian calendar to dates before its adoption. + * + * For more details, see: + * http://astro.nmsu.edu/~lhuber/leaphist.html + * http://www.magnet.ch/serendipity/hermetic/cal_stud/cal_art.htm + * and your local library. + */ +{ + int dn; + int i; + int isleap; /* save three calls to leap() */ + + /* Some validity checks */ + + /* we don't deal with B.C. years here */ + if (year < 1) return - 1; + /* conservative overflow estimate */ + if (year > (INT_MAX / 366)) return - 1; + if (month > 12 || month < 1) return - 1; + if (day < 1) return - 1; + + isleap = leap(year); + + if (month != 2) { + if(day > days_in_month[month - 1]) return - 1; + } + else if ((isleap && day > 29) || (!isleap && day > 28)) + return - 1; + + /* First calculate the day number of December 31 last year */ + + /* save us from doing (year - 1) over and over */ + i = year - 1; + /* 365 days in a "regular" year + number of leap days */ + dn = (i * 365) + ((i / 4) - (i / 100) + (i / 400)); + + /* Now, day number of the last day of the previous month */ + + for (i = month - 1; i > 0; --i) + dn += days_in_month[i - 1]; + /* Add 29 February ? */ + if (month > 2 && isleap) ++dn; + + /* How many days into month are we */ + + dn += day; + + return dn; +} + +static int +leap(int year) +/* Is this a leap year ? */ +{ + /* every year exactly divisible by 4 is "leap" */ + /* unless it is exactly divisible by 100 */ + /* but not by 400 */ + return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); +} + +int +days_last_month (void) +/* How many days did last month have? */ +{ + struct tm time_record; + time_t current_time; + time (¤t_time); + localtime_r (¤t_time, &time_record); + + switch (time_record.tm_mon) { + case 0: return days_in_month[11]; + case 2: return days_in_month[1] + (leap (time_record.tm_year + 1900) ? 1 : 0); + default: return days_in_month[time_record.tm_mon - 1]; + } +} + +int +days_this_month (void) +/* How many days does this month have? */ +{ + struct tm time_record; + time_t current_time; + time (¤t_time); + localtime_r (¤t_time, &time_record); + + switch (time_record.tm_mon) { + case 1: return days_in_month[1] + (leap (time_record.tm_year + 1900) ? 1 : 0); + default: return days_in_month[time_record.tm_mon]; + } +} + +int +days_last_year (void) +/* How many days this last year have? */ +{ + struct tm time_record; + time_t current_time; + time (¤t_time); + localtime_r (¤t_time, &time_record); + + if (leap(time_record.tm_year - 1 + 1900)) { + return 366; + } + + return 365; +} + +int +days_this_year (void) +/* How many days does this year have */ +{ + struct tm time_record; + time_t current_time; + time (¤t_time); + localtime_r (¤t_time, &time_record); + + if (leap(time_record.tm_year + 1900)) { + return 366; + } + + return 365; +} diff --git a/cronie-1.4.6/anacron/gregor.h b/cronie-1.4.6/anacron/gregor.h new file mode 100644 index 0000000..842c54d --- /dev/null +++ b/cronie-1.4.6/anacron/gregor.h @@ -0,0 +1,30 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +int day_num(int year, int month, int day); +int days_last_month (void); +int days_this_month (void); +int days_last_year (void); +int days_this_year (void); diff --git a/cronie-1.4.6/anacron/lock.c b/cronie-1.4.6/anacron/lock.c new file mode 100644 index 0000000..68fd252 --- /dev/null +++ b/cronie-1.4.6/anacron/lock.c @@ -0,0 +1,196 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyirght (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +/* Lock and timestamp management + */ + +#include +#include +#include +#include +#include +#include +#include +#include "global.h" +#include "gregor.h" + +static void +open_tsfile(job_rec *jr) +/* Open the timestamp file for job jr */ +{ + jr->timestamp_fd = open(jr->ident, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); + if (jr->timestamp_fd == -1) + die_e("Can't open timestamp file for job %s", jr->ident); + fcntl(jr->timestamp_fd, F_SETFD, 1); /* set close-on-exec flag */ + /* We want to own this file, and set its mode to 0600. This is necessary + * in order to prevent other users from putting locks on it. */ + if (fchown(jr->timestamp_fd, getuid(), getgid())) + die_e("Can't chown timestamp file %s", jr->ident); + if (fchmod(jr->timestamp_fd, S_IRUSR | S_IWUSR)) + die_e("Can't chmod timestamp file %s", jr->ident); +} + +static int +lock_file(int fd) +/* Attempt to put an exclusive fcntl() lock on file "fd" + * Return 1 on success, 0 on failure. + */ +{ + int r; + struct flock sfl; + + sfl.l_type = F_WRLCK; + sfl.l_start = 0; + sfl.l_whence = SEEK_SET; + sfl.l_len = 0; /* we lock all the file */ + errno = 0; + r = fcntl(fd, F_SETLK, &sfl); + if (r != -1) return 1; + if (errno != EACCES && errno != EAGAIN) + die_e("fcntl() error"); + return 0; +} + +int +consider_job(job_rec *jr) +/* Check the timestamp of the job. If "its time has come", lock the job + * and return 1, if it's too early, or we can't get the lock, return 0. + */ +{ + char timestamp[9]; + int ts_year, ts_month, ts_day, dn; + ssize_t b; + + open_tsfile(jr); + + /* read timestamp */ + b = read(jr->timestamp_fd, timestamp, 8); + if (b == -1) die_e("Error reading timestamp file %s", jr->ident); + timestamp[8] = 0; + + /* is it too early? */ + if (!force && b == 8) + { + int day_delta; + if (sscanf(timestamp, "%4d%2d%2d", &ts_year, &ts_month, &ts_day) == 3) + dn = day_num(ts_year, ts_month, ts_day); + else + dn = 0; + + day_delta = day_now - dn; + + /* + * if day_delta is negative, we assume there was a clock skew + * and re-run any affected jobs + * otherwise we check if the job's time has come + */ + if (day_delta >= 0 && day_delta < jr->period) + { + /* yes, skip job */ + xclose(jr->timestamp_fd); + return 0; + } + + /* + * Check to see if it's a named period, in which case we need + * to figure it out. + */ + if (jr->named_period) + { + int period = 0, bypass = 0; + switch (jr->named_period) + { + case 1: /* monthly */ + period = days_last_month (); + bypass = days_this_month (); + break; + case 2: /* yearly, annualy */ + period = days_last_year (); + bypass = days_this_year (); + break; + case 3: /* daily */ + period = 1; + bypass = 1; + break; + case 4: /* weekly */ + period = 7; + bypass = 7; + break; + default: + die ("Unknown named period for %s (%d)", jr->ident, jr->named_period); + } + printf ("Checking against %d with %d\n", day_delta, period); + if (day_delta < period && day_delta != bypass) + { + /* Job is still too young */ + xclose (jr->timestamp_fd); + return 0; + } + } + } + + /* no! try to grab the lock */ + if (lock_file(jr->timestamp_fd)) return 1; /* success */ + + /* didn't get lock */ + xclose(jr->timestamp_fd); + explain("Job `%s' locked by another anacron - skipping", jr->ident); + return 0; +} + +void +unlock(job_rec *jr) +{ + xclose(jr->timestamp_fd); +} + +void +update_timestamp(job_rec *jr) +/* We write the date "now". "Now" can be either the time when anacron + * started, or the time when the job finished. + * I'm not quite sure which is more "right", but I've decided on the first + * option. + * Note that this is not the way it was with anacron 1.0.3 to 1.0.7. + */ +{ + char stamp[10]; + + snprintf(stamp, 10, "%04d%02d%02d\n", year, month, day_of_month); + if (lseek(jr->timestamp_fd, 0, SEEK_SET)) + die_e("Can't lseek timestamp file for job %s", jr->ident); + if (write(jr->timestamp_fd, stamp, 9) != 9) + die_e("Can't write timestamp file for job %s", jr->ident); + if (ftruncate(jr->timestamp_fd, 9)) + die_e("ftruncate error"); +} + +void +fake_job(job_rec *jr) +/* We don't bother with any locking here. There's no point. */ +{ + open_tsfile(jr); + update_timestamp(jr); + xclose(jr->timestamp_fd); +} diff --git a/cronie-1.4.6/anacron/log.c b/cronie-1.4.6/anacron/log.c new file mode 100644 index 0000000..6f4be63 --- /dev/null +++ b/cronie-1.4.6/anacron/log.c @@ -0,0 +1,225 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +/* Error logging + * + * We have two levels of logging (plus debugging if DEBUG is defined): + * "explain" level for informational messages, and "complain" level for errors. + * + * We log everything to syslog, see the top of global.h for relevant + * definitions. + * + * Stderr gets "complain" messages when we're in the foreground, + * and "explain" messages when we're in the foreground, and not "quiet". + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "global.h" + +static char truncated[] = " (truncated)"; +static char msg[MAX_MSG + 1]; +static int log_open = 0; + +/* Number of complaints that we've seen */ +int complaints = 0; + +static void +xopenlog() +{ + if (!log_open) + { + openlog(program_name, LOG_PID, SYSLOG_FACILITY); + log_open = 1; + } +} + +void +xcloselog() +{ + if (log_open) closelog(); + log_open = 0; +} + +static void +make_msg(const char *fmt, va_list args) +/* Construct the message string from its parts */ +{ + int len; + + /* There's some confusion in the documentation about what vsnprintf + * returns when the buffer overflows. Hmmm... */ + len = vsnprintf(msg, sizeof(msg), fmt, args); + if (len >= sizeof(msg) - 1) + strcpy(msg + sizeof(msg) - sizeof(truncated), truncated); +} + +static void +slog(int priority, const char *fmt, va_list args) +/* Log a message, described by "fmt" and "args", with the specified + * "priority". */ +{ + make_msg(fmt, args); + xopenlog(); + syslog(priority, "%s", msg); + if (!in_background) + { + if (priority == EXPLAIN_LEVEL && !quiet) + fprintf(stderr, "%s\n", msg); + else if (priority == COMPLAIN_LEVEL) + fprintf(stderr, "%s: %s\n", program_name, msg); + } +} + +static void +log_e(int priority, const char *fmt, va_list args) +/* Same as slog(), but also appends an error description corresponding + * to "errno". */ +{ + int saved_errno; + + saved_errno = errno; + make_msg(fmt, args); + xopenlog(); + syslog(priority, "%s: %s", msg, strerror(saved_errno)); + if (!in_background) + { + if (priority == EXPLAIN_LEVEL && !quiet) + fprintf(stderr, "%s: %s\n", msg, strerror(saved_errno)); + else if (priority == COMPLAIN_LEVEL) + fprintf(stderr, "%s: %s: %s\n", + program_name, msg, strerror(saved_errno)); + } +} + +void +explain(const char *fmt, ...) +/* Log an "explain" level message */ +{ + va_list args; + + va_start(args, fmt); + slog(EXPLAIN_LEVEL, fmt, args); + va_end(args); +} + +void +explain_e(const char *fmt, ...) +/* Log an "explain" level message, with an error description */ +{ + va_list args; + + va_start(args, fmt); + log_e(EXPLAIN_LEVEL, fmt, args); + va_end(args); +} + +void +complain(const char *fmt, ...) +/* Log a "complain" level message */ +{ + va_list args; + + va_start(args, fmt); + slog(COMPLAIN_LEVEL, fmt, args); + va_end(args); + + complaints += 1; +} + +void +complain_e(const char *fmt, ...) +/* Log a "complain" level message, with an error description */ +{ + va_list args; + + va_start(args, fmt); + log_e(COMPLAIN_LEVEL, fmt, args); + va_end(args); + + complaints += 1; +} + +void +die(const char *fmt, ...) +/* Log a "complain" level message, and exit */ +{ + va_list args; + + va_start(args, fmt); + slog(COMPLAIN_LEVEL, fmt, args); + va_end(args); + if (getpid() == primary_pid) complain("Aborted"); + + exit(FAILURE_EXIT); +} + +void +die_e(const char *fmt, ...) +/* Log a "complain" level message, with an error description, and exit */ +{ + va_list args; + + va_start(args, fmt); + log_e(COMPLAIN_LEVEL, fmt, args); + va_end(args); + if (getpid() == primary_pid) complain("Aborted"); + + exit(FAILURE_EXIT); +} + +#ifdef DEBUG + +/* These are called through the Debug() and Debug_e() macros, defined + * in global.h */ + +void +xdebug(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + slog(DEBUG_LEVEL, fmt, args); + va_end(args); +} + +void +xdebug_e(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + log_e(DEBUG_LEVEL, fmt, args); + va_end(args); +} + +#endif /* DEBUG */ diff --git a/cronie-1.4.6/anacron/main.c b/cronie-1.4.6/anacron/main.c new file mode 100644 index 0000000..2fd3ed5 --- /dev/null +++ b/cronie-1.4.6/anacron/main.c @@ -0,0 +1,529 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "global.h" +#include "gregor.h" + +pid_t primary_pid; +int day_now; +int year, month, day_of_month; /* date anacron started */ + +char *program_name; +char *anacrontab; +char *spooldir; +int serialize, force, update_only, now, + no_daemon, quiet, testing_only; /* command-line options */ +char **args; /* vector of "job" command-line arguments */ +int nargs; /* number of these */ +char *defarg = "*"; +int in_background; /* are we in the background? */ +int old_umask; /* umask when started */ +sigset_t old_sigmask; /* signal mask when started */ + +job_rec *first_job_rec; +env_rec *first_env_rec; + +static time_t start_sec; /* time anacron started */ +static volatile int got_sigalrm, got_sigchld, got_sigusr1; +int running_jobs, running_mailers; /* , number of */ +int range_start = -1; +int range_stop = -1; + +static void +print_version() +{ + printf("Anacron \n" + "Copyright (C) 1998 Itai Tzur \n" + "Copyright (C) 1999 Sean 'Shaleh' Perry \n" + "Copyright (C) 2004 Pascal Hakim \n" + "\n" + "Mail comments, suggestions and bug reports to ." + "\n\n"); +} + +static void +print_usage() +{ + printf("Usage: anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...\n" + " anacron [-S spooldir] -u [job] ...\n" + " anacron [-V|-h]\n" + " anacron -T [-t anacrontab]\n" + "\n" + " -s Serialize execution of jobs\n" + " -f Force execution of jobs, even before their time\n" + " -n Run jobs with no delay, implies -s\n" + " -d Don't fork to the background\n" + " -q Suppress stderr messages, only applicable with -d\n" + " -u Update the timestamps without actually running anything\n" + " -t Use this anacrontab\n" + " -V Print version information\n" + " -h Print this message\n" + " -T Test an anacrontab\n" + " -S Select a different spool directory\n" + "\n" + "See the manpage for more details.\n" + "\n"); +} + +static void +parse_opts(int argc, char *argv[]) +/* Parse command-line options */ +{ + int opt; + + quiet = no_daemon = serialize = force = update_only = now = 0; + opterr = 0; + while ((opt = getopt(argc, argv, "sfundqt:TS:Vh")) != EOF) + { + switch (opt) + { + case 's': + serialize = 1; + break; + case 'f': + force = 1; + break; + case 'u': + update_only = 1; + break; + case 'n': + now = serialize = 1; + break; + case 'd': + no_daemon = 1; + break; + case 'q': + quiet = 1; + break; + case 't': + anacrontab = strdup(optarg); + break; + case 'T': + testing_only = 1; + break; + case 'S': + spooldir = strdup(optarg); + break; + case 'V': + print_version(); + exit(0); + case 'h': + print_usage(); + exit(0); + case '?': + fprintf(stderr, "%s: invalid option: %c\n", + program_name, optopt); + fprintf(stderr, "type: `%s -h' for more information\n", + program_name); + exit(FAILURE_EXIT); + } + } + if (optind == argc) + { + /* no arguments. Equivalent to: `*' */ + nargs = 1; + args = &defarg; + } + else + { + nargs = argc - optind; + args = argv + optind; + } +} + +pid_t +xfork() +/* Like fork(), only never returns on failure */ +{ + pid_t pid; + + pid = fork(); + if (pid == -1) die_e("Can't fork"); + return pid; +} + +int +xopen(int fd, const char *file_name, int flags) +/* Like open, only it: + * a) never returns on failure, and + * b) if "fd" is non-negative, expect the file to open + * on file-descriptor "fd". + */ +{ + int rfd; + + rfd = open(file_name, flags); + if (fd >= 0 && rfd != fd) + die_e("Can't open %s on file-descriptor %d", file_name, fd); + else if (rfd < 0) + die_e("Can't open %s", file_name); + return rfd; +} + +void +xclose(int fd) +/* Like close(), only doesn't return on failure */ +{ + if (close(fd)) die_e("Can't close file descriptor %d", fd); +} + +static void +go_background() +/* Become a daemon. The foreground process exits successfully. */ +{ + pid_t pid; + + /* stdin is already closed */ + + if (fclose(stdout)) die_e("Can't close stdout"); + xopen(1, "/dev/null", O_WRONLY); + + if (fclose(stderr)) die_e("Can't close stderr"); + xopen(2, "/dev/null", O_WRONLY); + + pid = xfork(); + if (pid != 0) + { + /* parent */ + exit(0); + } + else + { + /* child */ + primary_pid = getpid(); + if (setsid() == -1) die_e("setsid() error"); + in_background = 1; + } +} + +void +handle_sigalrm() +{ + got_sigalrm = 1; +} + +void +handle_sigchld() +{ + got_sigchld = 1; +} + +void +handle_sigusr1() +{ + got_sigusr1 = 1; +} + +static void +set_signal_handling() +/* We only use SIGALRM, SIGCHLD and SIGUSR1, and we unblock them only + * in wait_signal(). + */ +{ + sigset_t ss; + struct sigaction sa; + + got_sigalrm = got_sigchld = got_sigusr1 = 0; + + /* block SIGALRM, SIGCHLD and SIGUSR1 */ + if (sigemptyset(&ss) || + sigaddset(&ss, SIGALRM) || + sigaddset(&ss, SIGCHLD) || + sigaddset(&ss, SIGUSR1)) die_e("sigset error"); + if (sigprocmask(SIG_BLOCK, &ss, NULL)) die_e ("sigprocmask error"); + + /* setup SIGALRM handler */ + sa.sa_handler = handle_sigalrm; + sa.sa_mask = ss; + sa.sa_flags = 0; + if (sigaction(SIGALRM, &sa, NULL)) die_e("sigaction error"); + + /* setup SIGCHLD handler */ + sa.sa_handler = handle_sigchld; + sa.sa_mask = ss; + sa.sa_flags = SA_NOCLDSTOP; + if (sigaction(SIGCHLD, &sa, NULL)) die_e("sigaction error"); + + /* setup SIGUSR1 handler */ + sa.sa_handler = handle_sigusr1; + sa.sa_mask = ss; + sa.sa_flags = 0; + if (sigaction(SIGUSR1, &sa, NULL)) die_e("sigaction error"); +} + +static void +wait_signal() +/* Return after a signal is caught */ +{ + sigset_t ss; + + if (sigprocmask(0, NULL, &ss)) die_e("sigprocmask error"); + if (sigdelset(&ss, SIGALRM) || + sigdelset(&ss, SIGCHLD) || + sigdelset(&ss, SIGUSR1)) die_e("sigset error"); + sigsuspend(&ss); +} + +static void +wait_children() +/* Wait until we have no more children (of any kind) */ +{ + while (running_jobs > 0 || running_mailers > 0) + { + wait_signal(); + if (got_sigchld) tend_children(); + got_sigchld = 0; + if (got_sigusr1) explain("Received SIGUSR1"); + got_sigusr1 = 0; + } +} + +static void +orderly_termination() +/* Execution is diverted here, when we get SIGUSR1 */ +{ + explain("Received SIGUSR1"); + got_sigusr1 = 0; + wait_children(); + explain("Exited"); + exit(0); +} + +static void +xsleep(unsigned int n) +/* Sleep for n seconds, servicing SIGCHLDs and SIGUSR1s in the meantime. + * If n=0, return immediately. + */ +{ + if (n == 0) return; + alarm(n); + do + { + wait_signal(); + if (got_sigchld) tend_children(); + got_sigchld = 0; + if (got_sigusr1) orderly_termination(); + } + while (!got_sigalrm); + got_sigalrm = 0; +} + +static void +wait_jobs() +/* Wait until there are no running jobs, + * servicing SIGCHLDs and SIGUSR1s in the meantime. + */ +{ + while (running_jobs > 0) + { + wait_signal(); + if (got_sigchld) tend_children(); + got_sigchld = 0; + if (got_sigusr1) orderly_termination(); + } +} + +static void +record_start_time() +{ + struct tm *tm_now; + + start_sec = time(NULL); + tm_now = localtime(&start_sec); + year = tm_now->tm_year + 1900; + month = tm_now->tm_mon + 1; + day_of_month = tm_now->tm_mday; + day_now = day_num(year, month, day_of_month); + if (day_now == -1) die("Invalid date (this is really embarrassing)"); + if (!update_only && !testing_only) + explain("Anacron started on %04d-%02d-%02d", + year, month, day_of_month); +} + +static int +time_till(job_rec *jr) +/* Return the number of seconds that we have to wait until it's time + * to start job jr. + */ +{ + unsigned int tj, tn; + + if (now) return 0; + tn = time(NULL); + tj = start_sec + jr->delay * 60; + if (tj < tn) return 0; + return tj - tn; +} + +static void +fake_jobs() +{ + int j; + + j = 0; + while (j < njobs) + { + fake_job(job_array[j]); + explain("Updated timestamp for job `%s' to %04d-%02d-%02d", + job_array[j]->ident, year, month, day_of_month); + j++; + } +} + +static void +explain_intentions() +{ + int j; + struct tm *t; + + j = 0; + while (j < njobs) + { + if (now) + { + explain("Will run job `%s'", job_array[j]->ident); + } + else + { + time_t jobtime = start_sec + job_array[j]->delay * 60; + + t = localtime(&jobtime); + if (range_start != -1 && range_stop != -1 && + (t->tm_hour < range_start || t->tm_hour >= range_stop)) + { + Debug(("The job `%s' falls out of the %02d:00-%02d:00 hours range, skipping.", + job_array[j]->ident, range_start, range_stop)); + job_array[j]->drop_job = 1; + } + else + { + explain("Will run job `%s' in %d min.", + job_array[j]->ident, job_array[j]->delay); + } + } + j++; + } + if (serialize && njobs > 0) + explain("Jobs will be executed sequentially"); +} + +int +main(int argc, char *argv[]) +{ + int j; + + int cwd; + + int dropped_jobs = 0; + + anacrontab = NULL; + spooldir = NULL; + struct timeval tv; + struct timezone tz; + + if (gettimeofday(&tv, &tz) != 0) + explain("Can't get exact time, failure."); + + srandom(getpid()+tv.tv_usec); + + if((program_name = strrchr(argv[0], '/')) == NULL) + program_name = argv[0]; + else + ++program_name; /* move pointer to char after '/' */ + + parse_opts(argc, argv); + + if (anacrontab == NULL) + anacrontab = strdup(ANACRONTAB); + + if (spooldir == NULL) + spooldir = strdup(ANACRON_SPOOL_DIR); + + if ((cwd = open ("./", O_RDONLY)) == -1) { + die_e ("Can't save current directory"); + } + + in_background = 0; + + if (chdir(spooldir)) die_e("Can't chdir to %s", spooldir ); + + old_umask = umask(0); + + if (sigprocmask(0, NULL, &old_sigmask)) die_e("sigset error"); + + if (fclose(stdin)) die_e("Can't close stdin"); + xopen(0, "/dev/null", O_RDONLY); + + if (!no_daemon && !testing_only) + go_background(); + else + primary_pid = getpid(); + + record_start_time(); + read_tab(cwd); + close(cwd); + arrange_jobs(); + + if (testing_only) + { + if (complaints) exit (1); + + exit (0); + } + + if (update_only) + { + fake_jobs(); + exit(0); + } + + explain_intentions(); + set_signal_handling(); + running_jobs = running_mailers = 0; + for(j = 0; j < njobs; ++j) + { + if (job_array[j]->drop_job == 1) + { + ++dropped_jobs; + continue; + } + xsleep(time_till(job_array[j])); + if (serialize) wait_jobs(); + launch_job(job_array[j]); + } + wait_children(); + explain("Normal exit (%d job%s run)", njobs-dropped_jobs, (njobs-dropped_jobs == 1 ? "" : "s")); + exit(0); +} diff --git a/cronie-1.4.6/anacron/matchrx.c b/cronie-1.4.6/anacron/matchrx.c new file mode 100644 index 0000000..905694e --- /dev/null +++ b/cronie-1.4.6/anacron/matchrx.c @@ -0,0 +1,87 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +#include +#include +#include +#include +#include +#include "matchrx.h" + +int +match_rx(const char *rx, char *string, int n_sub, /* char **substrings */...) +/* Return 1 if the regular expression "*rx" matches the string "*string", + * 0 if not, -1 on error. + * "Extended" regular expressions are used. + * Additionally, there should be "n_sub" "substrings" arguments. These, + * if not NULL, and if the match succeeds are set to point to the + * corresponding substrings of the regexp. + * The original string is changed, and the substrings must not overlap, + * or even be directly adjacent. + * This is not the most efficient, or elegant way of doing this. + */ +{ + int r, n; + regex_t crx; + va_list va; + char **substring; + regmatch_t *sub_offsets; + sub_offsets = malloc(sizeof(regmatch_t) * (n_sub + 1)); + memset(sub_offsets, 0, sizeof(regmatch_t) * (n_sub + 1)); + + if (regcomp(&crx, rx, REG_EXTENDED)) { + free(sub_offsets); + return - 1; + } + r = regexec(&crx, string, n_sub + 1, sub_offsets, 0); + if (r != 0 && r != REG_NOMATCH) { + free(sub_offsets); + return - 1; + } + regfree(&crx); + if (r == REG_NOMATCH) { + free(sub_offsets); + return 0; + } + + va_start(va, n_sub); + n = 1; + while (n <= n_sub) + { + substring = va_arg(va, char**); + if (substring != NULL) + { + if (sub_offsets[n].rm_so == -1) { + free(sub_offsets); + return - 1; + } + *substring = string + sub_offsets[n].rm_so; + *(string + sub_offsets[n].rm_eo) = 0; + } + n++; + } + va_end(va); + free(sub_offsets); + return 1; +} diff --git a/cronie-1.4.6/anacron/matchrx.h b/cronie-1.4.6/anacron/matchrx.h new file mode 100644 index 0000000..3ce8350 --- /dev/null +++ b/cronie-1.4.6/anacron/matchrx.h @@ -0,0 +1,26 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +int match_rx(const char *rx, char *string, + int n_sub, /* char **substrings */...); diff --git a/cronie-1.4.6/anacron/readtab.c b/cronie-1.4.6/anacron/readtab.c new file mode 100644 index 0000000..aa9eb93 --- /dev/null +++ b/cronie-1.4.6/anacron/readtab.c @@ -0,0 +1,393 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + Copyright (C) 2004 Pascal Hakim + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +/* /etc/anacrontab parsing, and job sorting + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "global.h" +#include "matchrx.h" + +static struct obstack input_o; /* holds input line */ +static struct obstack tab_o; /* holds processed data read from anacrontab */ +static FILE *tab; +job_rec **job_array; +int njobs; /* number of jobs to run */ +static int jobs_read; /* number of jobs read */ +static int line_num; /* current line in anacrontab */ +static job_rec *last_job_rec; /* last job stored in memory, at the moment */ +static env_rec *last_env_rec; /* last environment assignment stored */ + +static int random_number = 0; + +/* some definitions for the obstack macros */ +#define obstack_chunk_alloc xmalloc +#define obstack_chunk_free free + +static void * +xmalloc (size_t size) +/* Just like standard malloc(), only never returns NULL. */ +{ + void * ptr; + + ptr = malloc(size); + if (ptr == NULL) + die("Memory exhausted"); + return ptr; +} + +static int +conv2int(const char *s) +/* Return the int or -1 on over/under-flow + */ +{ + long l; + + errno = 0; + l = strtol(s, NULL, 10); + /* we use negative as error, so I am really returning unsigned int */ + if (errno == ERANGE || l < 0 || l > INT_MAX) return - 1; + return l; +} + +static char * +read_tab_line () +/* Read one line and return a pointer to it. +Return NULL if no more lines. + */ +{ + int c, prev=0; + + if (feof(tab)) return NULL; + while (1) + { + c = getc(tab); + if ((c == '\n' && prev != '\\') || c == EOF) + { + if (0 != prev) obstack_1grow(&input_o, prev); + break; + } + + if ('\\' != prev && 0 != prev && '\n' != prev) obstack_1grow(&input_o, prev); + else if ('\n' == prev) obstack_1grow(&input_o, ' '); + + prev = c; + } + if (ferror(tab)) die_e("Error reading %s", anacrontab); + obstack_1grow(&input_o, '\0'); + return obstack_finish(&input_o); +} + +static int +job_arg_num(const char *ident) +/* Return the command-line-argument number refering to this job-identifier. + * If it isn't specified, return -1. + */ +{ + int i, r; + + for (i = 0; i < nargs; i++) + { + r = fnmatch(args[i], ident, 0); + if (r == 0) return i; + if (r != FNM_NOMATCH) die("fnmatch() error"); + } + return - 1; +} + +static void +register_env(const char *env_var, const char *value) +/* Store the environment assignment "env_var"="value" */ +{ + env_rec *er; + int var_len, val_len; + + var_len = strlen(env_var); + val_len = strlen(value); + er = obstack_alloc(&tab_o, sizeof(env_rec)); + er->assign = obstack_alloc(&tab_o, var_len + 1 + val_len + 1); + strcpy(er->assign, env_var); + er->assign[var_len] = '='; + strcpy(er->assign + var_len + 1, value); + er->assign[var_len + 1 + val_len] = 0; + if (last_env_rec != NULL) last_env_rec->next = er; + else first_env_rec = er; + last_env_rec = er; + Debug(("on line %d: %s", line_num, er->assign)); +} + +static void +register_job(const char *periods, const char *delays, + const char *ident, char *command) +/* Store a job definition */ +{ + int period, delay; + job_rec *jr; + int ident_len, command_len; + + ident_len = strlen(ident); + command_len = strlen(command); + jobs_read++; + period = conv2int(periods); + delay = conv2int(delays); + if (period < 0 || delay < 0) + { + complain("%s: number out of range on line %d, skipping", + anacrontab, line_num); + return; + } + jr = obstack_alloc(&tab_o, sizeof(job_rec)); + jr->period = period; + jr->named_period = 0; + delay += random_number; + jr->delay = delay; + jr->tab_line = line_num; + jr->ident = obstack_alloc(&tab_o, ident_len + 1); + strcpy(jr->ident, ident); + jr->arg_num = job_arg_num(ident); + jr->command = obstack_alloc(&tab_o, command_len + 1); + strcpy(jr->command, command); + jr->job_pid = jr->mailer_pid = 0; + if (last_job_rec != NULL) last_job_rec->next = jr; + else first_job_rec = jr; + last_job_rec = jr; + jr->prev_env_rec = last_env_rec; + jr->next = NULL; + Debug(("Read job - period=%d, delay=%d, ident=%s, command=%s", + jr->period, jr->delay, jr->ident, jr->command)); +} + +static void +register_period_job(const char *periods, const char *delays, + const char *ident, char *command) +/* Store a job definition with a named period */ +{ + int delay; + job_rec *jr; + int period_len, ident_len, command_len; + + period_len = strlen(periods); + ident_len = strlen(ident); + command_len = strlen(command); + jobs_read++; + delay = conv2int(delays); + if (delay < 0) + { + complain("%s: number out of range on line %d, skipping", + anacrontab, line_num); + return; + } + + jr = obstack_alloc(&tab_o, sizeof(job_rec)); + if (!strncmp ("@monthly", periods, 7)) { + jr->named_period = 1; + } else if (!strncmp("@yearly", periods, 7) || !strncmp("@annualy", periods, 8)) { + jr->named_period = 2; + } else if (!strncmp ("@daily", periods, 7)) { + jr->named_period = 3; + } else if (!strncmp ("@weekly", periods, 7)) { + jr->named_period = 4; + } else { + complain("%s: Unknown named period on line %d, skipping", + anacrontab, line_num); + } + jr->period = 0; + delay += random_number; + jr->delay = delay; + jr->tab_line = line_num; + jr->ident = obstack_alloc(&tab_o, ident_len + 1); + strcpy(jr->ident, ident); + jr->arg_num = job_arg_num(ident); + jr->command = obstack_alloc(&tab_o, command_len + 1); + strcpy(jr->command, command); + jr->job_pid = jr->mailer_pid = 0; + if (last_job_rec != NULL) last_job_rec->next = jr; + else first_job_rec = jr; + last_job_rec = jr; + jr->prev_env_rec = last_env_rec; + jr->next = NULL; + Debug(("Read job - period %d, delay=%d, ident%s, command=%s", + jr->named_period, jr->delay, jr->ident, jr->command)); +} + +static void +parse_tab_line(char *line) +{ + int r; + char *env_var; + char *value; + char *periods; + char *delays; + char *ident; + char *command; + char *from; + char *to; + + /* an empty line? */ + r = match_rx("^[ \t]*($|#)", line, 0); + if (r == -1) goto reg_err; + if (r) + { + Debug(("line %d empty", line_num)); + return; + } + + /* an environment assignment? */ + r = match_rx("^[ \t]*([^ \t=]+)[ \t]*=(.*)$", line, 2, + &env_var, &value); + if (r == -1) goto reg_err; + if (r) + { + if (strncmp(env_var, "START_HOURS_RANGE", 17) == 0) + { + r = match_rx("^([[:digit:]]+)-([[:digit:]]+)$", value, 2, &from, &to); + if ((r == -1) || (from == NULL) || (to == NULL)) goto reg_invalid; + range_start = atoi(from); + range_stop = atoi(to); + Debug(("Jobs will start in the %02d:00-%02d:00 range.", range_start, range_stop)); + } + if (strncmp(env_var, "RANDOM_DELAY", 12) == 0) { + r = match_rx("^([[:digit:]]+)$", value, 0); + if (r != -1) { + int i = random(); + double x = 0; + x = (double) i / (double) RAND_MAX * (double) (atoi(value)); + random_number = (int)x; + Debug(("Randomized delay set: %d", random_number)); + } + else goto reg_invalid; + } + register_env(env_var, value); + return; + } + + /* a job? */ + r = match_rx("^[ \t]*([[:digit:]]+)[ \t]+([[:digit:]]+)[ \t]+" + "([^ \t/]+)[ \t]+([^ \t].*)$", + line, 4, &periods, &delays, &ident, &command); + if (r == -1) goto reg_err; + if (r) + { + register_job(periods, delays, ident, command); + return; + } + + /* A period job? */ + r = match_rx("^[ \t]*(@[^ \t]+)[ \t]+([[:digit:]]+)[ \t]+" + "([^ \t/]+)[ \t]+([^ \t].*)$", + line, 4, &periods, &delays, &ident, &command); + if (r == -1) goto reg_err; + if (r) + { + register_period_job(periods, delays, ident, command); + return; + } + + reg_invalid: + complain("Invalid syntax in %s on line %d - skipping this line", + anacrontab, line_num); + return; + + reg_err: + die("Regex error reading %s", anacrontab); +} + +void +read_tab(int cwd) +/* Read the anacrontab file into memory */ +{ + char *tab_line; + + first_job_rec = last_job_rec = NULL; + first_env_rec = last_env_rec = NULL; + jobs_read = 0; + line_num = 0; + /* Open the anacrontab file */ + fchdir (cwd); + tab = fopen(anacrontab, "r"); + if (chdir(spooldir)) die_e("Can't chdir to %s", spooldir); + + if (tab == NULL) die_e("Error opening %s", anacrontab); + /* Initialize the obstacks */ + obstack_init(&input_o); + obstack_init(&tab_o); + while ((tab_line = read_tab_line()) != NULL) + { + line_num++; + parse_tab_line(tab_line); + obstack_free(&input_o, tab_line); + } + if (fclose(tab)) die_e("Error closing %s", anacrontab); +} + +static int +execution_order(const job_rec **job1, const job_rec **job2) +/* Comparison function for sorting the jobs. + */ +{ + int d; + + d = (*job1)->arg_num - (*job2)->arg_num; + if (d != 0 && now) return d; + d = (*job1)->delay - (*job2)->delay; + if (d != 0) return d; + d = (*job1)->tab_line - (*job2)->tab_line; + return d; +} + +void +arrange_jobs() +/* Make an array of pointers to jobs that are going to be executed, + * and arrange them in the order of execution. + * Also lock these jobs. + */ +{ + job_rec *j; + + j = first_job_rec; + njobs = 0; + while (j != NULL) + { + if (j->arg_num != -1 && (update_only || testing_only || consider_job(j))) + { + njobs++; + obstack_grow(&tab_o, &j, sizeof(j)); + } + j = j->next; + } + job_array = obstack_finish(&tab_o); + + /* sort the jobs */ + qsort(job_array, njobs, sizeof(*job_array), + (int (*)(const void *, const void *))execution_order); +} diff --git a/cronie-1.4.6/anacron/runjob.c b/cronie-1.4.6/anacron/runjob.c new file mode 100644 index 0000000..29aaefb --- /dev/null +++ b/cronie-1.4.6/anacron/runjob.c @@ -0,0 +1,345 @@ +/* + Anacron - run commands periodically + Copyright (C) 1998 Itai Tzur + Copyright (C) 1999 Sean 'Shaleh' Perry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The GNU General Public License can also be found in the file + `COPYING' that comes with the Anacron source distribution. +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "global.h" + +#include + +static int +temp_file(job_rec *jr) +/* Open a temporary file and return its file descriptor */ +{ + const int max_retries = 50; + char *name; + int fdin, fdout, i; + + i = 0; + name = NULL; + do + { + i++; + free(name); + name = tempnam(NULL, NULL); + if (name == NULL) die("Can't find a unique temporary filename"); + fdout = open(name, O_WRONLY | O_CREAT | O_EXCL | O_APPEND, + S_IRUSR | S_IWUSR); + if ( fdout != -1 ) + fdin = open(name, O_RDONLY, S_IRUSR | S_IWUSR); + /* I'm not sure we actually need to be so persistent here */ + } while (fdout == -1 && errno == EEXIST && i < max_retries); + + if (fdout == -1) die_e("Can't open temporary file for writing"); + if (fdin == -1) die_e("Can't open temporary file for reading"); + if (unlink(name)) die_e("Can't unlink temporary file"); + free(name); + fcntl(fdout, F_SETFD, FD_CLOEXEC); /* set close-on-exec flag */ + fcntl(fdin, F_SETFD, FD_CLOEXEC); /* set close-on-exec flag */ + + jr->input_fd = fdin; + jr->output_fd = fdout; + + return fdout; +} + +static off_t +file_size(int fd) +/* Return the size of temporary file fd */ +{ + struct stat st; + + if (fstat(fd, &st)) die_e("Can't fstat temporary file"); + return st.st_size; +} + +static char * +username() +{ + struct passwd *ps; + + ps = getpwuid(geteuid()); + if (ps == NULL) die_e("getpwuid() error"); + return ps->pw_name; +} + +static void +xputenv(const char *s) +{ + if (putenv(s)) die_e("Can't set the environment"); +} + +static void +setup_env(const job_rec *jr) +/* Setup the environment for the job according to /etc/anacrontab */ +{ + env_rec *er; + + er = first_env_rec; + if (er == NULL || jr->prev_env_rec == NULL) return; + xputenv(er->assign); + while (er != jr->prev_env_rec) + { + er = er->next; + xputenv(er->assign); + } +} + +static void +run_job(const job_rec *jr) +/* This is called to start the job, after the fork */ +{ + /* setup stdout and stderr */ + xclose(1); + xclose(2); + if (dup2(jr->output_fd, 1) != 1 || dup2(jr->output_fd, 2) != 2) + die_e("dup2() error"); /* dup2 also clears close-on-exec flag */ + in_background = 0; /* now, errors will be mailed to the user */ + if (chdir("/")) die_e("Can't chdir to '/'"); + + umask(old_umask); + if (sigprocmask(SIG_SETMASK, &old_sigmask, NULL)) + die_e("sigprocmask error"); + xcloselog(); + execl("/bin/sh", "/bin/sh", "-c", jr->command, (char *)NULL); + die_e("execl() error"); +} + +static void +xwrite(int fd, const char *string) +/* Write (using write()) the string "string" to temporary file "fd". + * Don't return on failure */ +{ + if (write(fd, string, strlen(string)) == -1) + die_e("Can't write to temporary file"); +} + +static int +xwait(pid_t pid , int *status) +/* Check if child process "pid" has finished. If it has, return 1 and its + * exit status in "*status". If not, return 0. + */ +{ + pid_t r; + + r = waitpid(pid, status, WNOHANG); + if (r == -1) die_e("waitpid() error"); + if (r == 0) return 0; + return 1; +} + +static void +launch_mailer(job_rec *jr) +{ + pid_t pid; + struct stat buf; + int r; + + /* Check that we have a way of sending mail. */ + if(stat(SENDMAIL, &buf)) + { + complain("Can't find sendmail at %s, not mailing output", SENDMAIL); + return; + } + + pid = xfork(); + if (pid == 0) + { + /* child */ + in_background = 1; + /* set stdin to the job's output */ + xclose(0); + if (dup2(jr->input_fd, 0) != 0) die_e("Can't dup2()"); + if (lseek(0, 0, SEEK_SET) != 0) die_e("Can't lseek()"); + umask(old_umask); + if (sigprocmask(SIG_SETMASK, &old_sigmask, NULL)) + die_e("sigprocmask error"); + xcloselog(); + + /* Ensure stdout/stderr are sane before exec-ing sendmail */ + xclose(1); xopen(1, "/dev/null", O_WRONLY); + xclose(2); xopen(2, "/dev/null", O_WRONLY); + xclose(jr->output_fd); + + /* Ensure stdin is not appendable ... ? */ + /* fdflags = fcntl(0, F_GETFL); fdflags &= ~O_APPEND; */ + /* fcntl(0, F_SETFL, fdflags ); */ + + /* Here, I basically mirrored the way /usr/sbin/sendmail is called + * by cron on a Debian system, except for the "-oem" and "-or0s" + * options, which don't seem to be appropriate here. + * Hopefully, this will keep all the MTAs happy. */ + execl(SENDMAIL, SENDMAIL, "-FAnacron", "-odi", + jr->mailto, (char *)NULL); + die_e("Can't exec " SENDMAIL); + } + /* parent */ + /* record mailer pid */ + jr->mailer_pid = pid; + running_mailers++; +} + +static void +tend_mailer(job_rec *jr, int status) +{ + if (WIFEXITED(status) && WEXITSTATUS(status) != 0) + complain("Tried to mail output of job `%s', " + "but mailer process (" SENDMAIL ") exited with status %d", + jr->ident, WEXITSTATUS(status)); + else if (!WIFEXITED(status) && WIFSIGNALED(status)) + complain("Tried to mail output of job `%s', " + "but mailer process (" SENDMAIL ") got signal %d", + jr->ident, WTERMSIG(status)); + else if (!WIFEXITED(status) && !WIFSIGNALED(status)) + complain("Tried to mail output of job `%s', " + "but mailer process (" SENDMAIL ") terminated abnormally" + , jr->ident); + + jr->mailer_pid = 0; + running_mailers--; +} + +void +launch_job(job_rec *jr) +{ + pid_t pid; + int fd; + char hostname[512]; + char *mailto; + + /* get hostname */ + if (gethostname(hostname, 512)) { + strcpy (hostname,"unknown machine"); + } + + setup_env(jr); + + /* Get the destination email address if set, or current user otherwise */ + mailto = getenv("MAILTO"); + + if (mailto) + jr->mailto = mailto; + else + jr->mailto = username (); + + /* create temporary file for stdout and stderr of the job */ + temp_file(jr); fd = jr->output_fd; + /* write mail header */ + xwrite(fd, "From: "); + xwrite(fd, "Anacron <"); + xwrite(fd, username()); + xwrite(fd, ">\n"); + xwrite(fd, "To: "); + if (mailto) { + xwrite(fd, mailto); + } else { + xwrite(fd, username()); + } + xwrite(fd, "\n"); + xwrite(fd, "Content-Type: text/plain; charset=\""); + xwrite(fd, nl_langinfo(CODESET)); + xwrite(fd, "\"\n"); + xwrite(fd, "Subject: Anacron job '"); + xwrite(fd, jr->ident); + xwrite(fd, "' on "); + xwrite(fd, hostname); + xwrite(fd, "\n\n"); + + jr->mail_header_size = file_size(fd); + + pid = xfork(); + if (pid == 0) + { + /* child */ + in_background = 1; + run_job(jr); + /* execution never gets here */ + } + /* parent */ + explain("Job `%s' started", jr->ident); + jr->job_pid = pid; + running_jobs++; +} + +static void +tend_job(job_rec *jr, int status) +/* Take care of a finished job */ +{ + int mail_output; + char *m; + + update_timestamp(jr); + unlock(jr); + if (file_size(jr->output_fd) > jr->mail_header_size) mail_output = 1; + else mail_output = 0; + + m = mail_output ? " (mailing output)" : ""; + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) + explain("Job `%s' terminated%s", jr->ident, m); + else if (WIFEXITED(status)) + explain("Job `%s' terminated (exit status: %d)%s", + jr->ident, WEXITSTATUS(status), m); + else if (WIFSIGNALED(status)) + complain("Job `%s' terminated due to signal %d%s", + jr->ident, WTERMSIG(status), m); + else /* is this possible? */ + complain("Job `%s' terminated abnormally%s", jr->ident, m); + + jr->job_pid = 0; + running_jobs--; + if (mail_output) launch_mailer(jr); + xclose(jr->output_fd); + xclose(jr->input_fd); +} + +void +tend_children() +/* This is called whenever we get a SIGCHLD. + * Takes care of zombie children. + */ +{ + int j; + int status; + + j = 0; + while (j < njobs) + { + if (job_array[j]->mailer_pid != 0 && + xwait(job_array[j]->mailer_pid, &status)) + tend_mailer(job_array[j], status); + if (job_array[j]->job_pid != 0 && + xwait(job_array[j]->job_pid, &status)) + tend_job(job_array[j], status); + j++; + } +} diff --git a/cronie-1.4.6/config.guess b/cronie-1.4.6/config.guess new file mode 100755 index 0000000..dc84c68 --- /dev/null +++ b/cronie-1.4.6/config.guess @@ -0,0 +1,1501 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/cronie-1.4.6/config.h.in b/cronie-1.4.6/config.h.in new file mode 100644 index 0000000..e884949 --- /dev/null +++ b/cronie-1.4.6/config.h.in @@ -0,0 +1,249 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* if you have a tm_gmtoff member in struct tm */ +#undef CAPITALIZE_FOR_PS + +/* Code will be built with debug info. */ +#undef DEBUGGING + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `fchgrp' function. */ +#undef HAVE_FCHGRP + +/* Define to 1 if you have the `fchown' function. */ +#undef HAVE_FCHOWN + +/* Define to 1 if you have the `fcntl' function. */ +#undef HAVE_FCNTL + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `flock' function. */ +#undef HAVE_FLOCK + +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getseuserbyname' function. */ +#undef HAVE_GETSEUSERBYNAME + +/* Define to 1 if you have the `get_default_context_with_level' function. */ +#undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL + +/* Define to 1 if you have the header file. */ +#undef HAVE_GLOB_H + +/* Define to 1 if you have the `inotify_add_watch' function. */ +#undef HAVE_INOTIFY_ADD_WATCH + +/* Define to 1 if you have the `inotify_init' function. */ +#undef HAVE_INOTIFY_INIT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `pam' library (-lpam). */ +#undef HAVE_LIBPAM + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `lockf' function. */ +#undef HAVE_LOCKF + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `pam_getenvlist' function. */ +#undef HAVE_PAM_GETENVLIST + +/* Define to 1 if you have the header file. */ +#undef HAVE_PAM_PAM_APPL_H + +/* Define to 1 if you have the `pam_putenv' function. */ +#undef HAVE_PAM_PUTENV + +/* Define to 1 if you have the header file. */ +#undef HAVE_PATHS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PTY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SECURITY_PAM_APPL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SELINUX_SELINUX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_GMTOFF + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_AUDIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_INOTIFY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STREAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STROPTS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMERS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIME_H + +/* There will be path to sendmail. */ +#undef MAILARG + +/* -i = don't terminate on "." by itself -Fx = Set full-name of sender -odi = + Option Deliverymode Interactive -oem = Option Errors Mailedtosender -oi = + Ignore "." alone on a line -t = Get recipient from headers -f %s = Envelope + sender address -d = undocumented but common flag. */ +#undef MAILFMT + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Using syslog for log messages. */ +#undef SYSLOG + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* Define if you want Audit trails. */ +#undef WITH_AUDIT + +/* Define if you want inotify support. */ +#undef WITH_INOTIFY + +/* Define if you want to enable PAM support */ +#undef WITH_PAM + +/* Define if you want SELinux support. */ +#undef WITH_SELINUX + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to `long int' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `int' if doesn't define. */ +#undef uid_t diff --git a/cronie-1.4.6/config.sub b/cronie-1.4.6/config.sub new file mode 100755 index 0000000..2a55a50 --- /dev/null +++ b/cronie-1.4.6/config.sub @@ -0,0 +1,1705 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/cronie-1.4.6/configure b/cronie-1.4.6/configure new file mode 100755 index 0000000..3a055c6 --- /dev/null +++ b/cronie-1.4.6/configure @@ -0,0 +1,6567 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.65 for cronie 1.4.6. +# +# Report bugs to . +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: mmaslano@redhat.com about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='cronie' +PACKAGE_TARNAME='cronie' +PACKAGE_VERSION='1.4.6' +PACKAGE_STRING='cronie 1.4.6' +PACKAGE_BUGREPORT='mmaslano@redhat.com' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +ANACRONTAB +ANACRON_SPOOL_DIR +ANACRON_FALSE +ANACRON_TRUE +SPOOL_DIR +SYS_CROND_DIR +SYSCRONTAB +LIBAUDIT +LIBPAM +PAM_FALSE +PAM_TRUE +LIBSELINUX +DAEMON_GROUPNAME +DAEMON_USERNAME +EGREP +GREP +CPP +LN_S +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +with_daemon_username +with_daemon_groupname +with_inotify +enable_pie +with_selinux +with_pam +enable_pam +with_audit +enable_anacron +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +SYSCRONTAB +SYS_CROND_DIR +SPOOL_DIR +ANACRON_SPOOL_DIR +ANACRONTAB' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures cronie 1.4.6 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/cronie] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of cronie 1.4.6:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors +CRONIE_HELP_STRING(--enable-pie,Build cronie as a Position Independent Executable) + --enable-pam Alias for --with-pam + --enable-anacron Build also anacron. + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-daemon_username=DAEMON_USERNAME + Username to run under (default daemon) + --with-daemon_groupname=DAEMON_GROUPNAME + Groupname to run under (default daemon) + --with-inotify Enable inotify support + --with-selinux Enable SELinux support + --with-pam Build with PAM support + --with-audit Enable audit trails + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + SYSCRONTAB the current working directory of the running daemon + [${sysconfdir}/crontab] + SYS_CROND_DIR + the current working directory of the running daemon + [${sysconfdir}/cron.d] + SPOOL_DIR the directory where all the user cron tabs reside + [${localstatedir}/spool/cron] + ANACRON_SPOOL_DIR + The path for anacron locks. [${localstatedir}/spool/anacron] + ANACRONTAB The anacron table for regular jobs. [${sysconfdir}/anacrontab] + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +cronie configure 1.4.6 +generated by GNU Autoconf 2.65 + +Copyright (C) 2009 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( cat <<\_ASBOX +## ---------------------------------- ## +## Report this to mmaslano@redhat.com ## +## ---------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by cronie $as_me 1.4.6, which was +generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_config_headers="$ac_config_headers config.h" + + + +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='cronie' + VERSION='1.4.6' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + +for ac_header in \ + dirent.h \ + fcntl.h \ + getopt.h \ + glob.h \ + limits.h \ + paths.h \ + pty.h \ + selinux/selinux.h \ + stddef.h \ + stdint.h \ + sys/audit.h \ + sys/inotify.h \ + sys/stat.h \ + sys/stream.h \ + sys/stropts.h \ + sys/time.h \ + sys/timers.h \ + sys/types.h \ + sys/cdefs.h \ + sys/fcntl.h \ + time.h \ + unistd.h \ + util.h \ + utime.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in \ + fcntl \ + lockf \ + flock \ + fchown \ + fchgrp \ + +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h +else + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_GMTOFF 1 +_ACEOF + + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking username to run under" >&5 +$as_echo_n "checking username to run under... " >&6; } + +# Check whether --with-daemon_username was given. +if test "${with_daemon_username+set}" = set; then : + withval=$with_daemon_username; case "$withval" in + no) + as_fn_error "Need DAEMON_USERNAME." "$LINENO" 5 + ;; + yes) + DAEMON_USERNAME=daemon + { $as_echo "$as_me:${as_lineno-$LINENO}: result: daemon" >&5 +$as_echo "daemon" >&6; } + ;; + *) + DAEMON_USERNAME="$withval"; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } + ;; + esac +else + DAEMON_USERNAME=daemon + { $as_echo "$as_me:${as_lineno-$LINENO}: result: daemon" >&5 +$as_echo "daemon" >&6; } + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking groupname to run under" >&5 +$as_echo_n "checking groupname to run under... " >&6; } + +# Check whether --with-daemon_groupname was given. +if test "${with_daemon_groupname+set}" = set; then : + withval=$with_daemon_groupname; case "$withval" in + no) + as_fn_error "Need DAEMON_GROUPNAME." "$LINENO" 5 + ;; + yes) + DAEMON_GROUPNAME=daemon + { $as_echo "$as_me:${as_lineno-$LINENO}: result: daemon" >&5 +$as_echo "daemon" >&6; } + ;; + *) + DAEMON_GROUPNAME="$withval"; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } + ;; + esac +else + DAEMON_GROUPNAME=daemon + { $as_echo "$as_me:${as_lineno-$LINENO}: result: daemon" >&5 +$as_echo "daemon" >&6; } + +fi + + + +# Check whether inotify is accepted + +# Check whether --with-inotify was given. +if test "${with_inotify+set}" = set; then : + withval=$with_inotify; if test "x$withval" != "xno" ; then + +$as_echo "#define WITH_INOTIFY 1" >>confdefs.h + + ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_inotify_h" = x""yes; then : + +else + as_fn_error "Inotify support requires sys/inotify.h header" "$LINENO" 5 +fi + + + for ac_func in inotify_init inotify_add_watch +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + + +fi + + +# Check whether --enable-pie was given. +if test "${enable_pie+set}" = set; then : + enableval=$enable_pie; +fi + +if test "x$enable_pie" = xyes; then + save_CFLAGS="$CFLAGS" + save_LDFLAGS="$LDFLAGS" + CFLAGS="$CFLAGS -fpie" + LDFLAGS="$LDFLAGS -pie -fpie" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -pie -fpie" >&5 +$as_echo_n "checking whether compiler accepts -pie -fpie... " >&6; } +if test "${ac_cv_pie_fpie+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_pie_fpie=yes +else + ac_cv_pie_fpie=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pie_fpie" >&5 +$as_echo "$ac_cv_pie_fpie" >&6; } + if test $ac_cv_pie_fpie = no; then + CFLAGS="$save_CFLAGS" + LDFLAGS="$save_LDFLAGS" + fi +fi + +# Check whether user wants SELinux support +SELINUX_MSG="no" +LIBSELINUX="" + +# Check whether --with-selinux was given. +if test "${with_selinux+set}" = set; then : + withval=$with_selinux; if test "x$withval" != "xno" ; then + saved_LIBS="$LIBS" + +$as_echo "#define WITH_SELINUX 1" >>confdefs.h + + SELINUX_MSG="yes" + ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : + +else + as_fn_error "SELinux support requires selinux.h header" "$LINENO" 5 +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5 +$as_echo_n "checking for setexeccon in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setexeccon (); +int +main () +{ +return setexeccon (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_selinux_setexeccon=yes +else + ac_cv_lib_selinux_setexeccon=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5 +$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; } +if test "x$ac_cv_lib_selinux_setexeccon" = x""yes; then : + LIBSELINUX="-lselinux" +else + as_fn_error "SELinux support requires libselinux library" "$LINENO" 5 +fi + + for ac_func in getseuserbyname get_default_context_with_level +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + LIBS="$saved_LIBS $LIBSELINUX" + + fi + +fi + + + +# Check whether --with-pam was given. +if test "${with_pam+set}" = set; then : + withval=$with_pam; +fi + +# Check whether --enable-pam was given. +if test "${enable_pam+set}" = set; then : + enableval=$enable_pam; +fi + + +# Check that with_pam and enable_pam are consistent. +# If neither one is set, the default is "no." +if test -z "$with_pam"; then + with_pam=${enable_pam:-no} +elif test -n "$enable_pam" && test "$with_pam" != "$enable_pam"; then + as_fn_error "Contradicting --with/without-pam and --enable/disable-pam options." "$LINENO" 5 +fi + + if test "$with_pam" != no; then + PAM_TRUE= + PAM_FALSE='#' +else + PAM_TRUE='#' + PAM_FALSE= +fi + + +if test "$with_pam" != no; then + +$as_echo "#define WITH_PAM 1" >>confdefs.h + + pam_appl_h_found=no + for ac_header in pam/pam_appl.h security/pam_appl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + pam_appl_h_found=yes +fi + +done + + test "$pam_appl_h_found" = yes || + as_fn_error "PAM headers not found" "$LINENO" 5 + + saved_LIBS="$LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + libdl_found=yes +else + libdl_found=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5 +$as_echo_n "checking for pam_set_item in -lpam... " >&6; } +if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpam $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pam_set_item (); +int +main () +{ +return pam_set_item (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pam_pam_set_item=yes +else + ac_cv_lib_pam_pam_set_item=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5 +$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; } +if test "x$ac_cv_lib_pam_pam_set_item" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPAM 1 +_ACEOF + + LIBS="-lpam $LIBS" + +else + as_fn_error "*** libpam missing" "$LINENO" 5 +fi + + for ac_func in pam_getenvlist pam_putenv +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + LIBS="$saved_LIBS" + + case $libdl_found:" $LIBS " in #( + *" -ldl "*) LIBPAM= ;; #( + yes:*) LIBPAM=-ldl ;; # libdl found, but is not in $LIBS + esac + LIBPAM="-lpam $LIBPAM" + +fi + + +$as_echo "#define DEBUGGING 1" >>confdefs.h + + + +$as_echo "#define MAILARG \"/usr/sbin/sendmail\"" >>confdefs.h + + + +$as_echo "#define MAILFMT \"%s -FCronDaemon -i -odi -oem -oi -t -f %s\"" >>confdefs.h + + + +$as_echo "#define SYSLOG 1" >>confdefs.h + + + +$as_echo "#define CAPITALIZE_FOR_PS 1" >>confdefs.h + + +# Check whether user wants Linux audit support + +# Check whether --with-audit was given. +if test "${with_audit+set}" = set; then : + withval=$with_audit; if test "x$withval" != "xno" ; then + saved_LIBS="$LIBS" + +$as_echo "#define WITH_AUDIT 1" >>confdefs.h + + ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = x""yes; then : + +else + as_fn_error "Audit trails requires libaudit.h header" "$LINENO" 5 +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5 +$as_echo_n "checking for audit_open in -laudit... " >&6; } +if test "${ac_cv_lib_audit_audit_open+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-laudit $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char audit_open (); +int +main () +{ +return audit_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_audit_audit_open=yes +else + ac_cv_lib_audit_audit_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5 +$as_echo "$ac_cv_lib_audit_audit_open" >&6; } +if test "x$ac_cv_lib_audit_audit_open" = x""yes; then : + LIBAUDIT="-laudit" +else + as_fn_error "Audit support needs audit libraries." "$LINENO" 5 +fi + + LIBS="$saved_LIBS $LIBAUDIT" + + fi + +fi + + + + + + + +if test "$SYSCRONTAB" = ""; then + SYSCRONTAB='${sysconfdir}/crontab' +fi + + +if test "$SYS_CROND_DIR" = ""; then + SYS_CROND_DIR='${sysconfdir}/cron.d' +fi + + +if test "$SPOOL_DIR" = ""; then + SPOOL_DIR='${localstatedir}/spool/cron' +fi + + +# Check whether --enable-anacron was given. +if test "${enable_anacron+set}" = set; then : + enableval=$enable_anacron; +fi + + if test "$enable_anacron" = yes; then + ANACRON_TRUE= + ANACRON_FALSE='#' +else + ANACRON_TRUE='#' + ANACRON_FALSE= +fi + +if test "$enable_anacron" != no; then + +if test "$ANACRON_SPOOL_DIR" = ""; then + ANACRON_SPOOL_DIR='${localstatedir}/spool/anacron' + fi + + +if test "$ANACRONTAB" = ""; then + ANACRONTAB='${sysconfdir}/anacrontab' + fi + +fi + +ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile anacron/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PAM_TRUE}" && test -z "${PAM_FALSE}"; then + as_fn_error "conditional \"PAM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ANACRON_TRUE}" && test -z "${ANACRON_FALSE}"; then + as_fn_error "conditional \"ANACRON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by cronie $as_me 1.4.6, which was +generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +cronie config.status 1.4.6 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2009 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "anacron/Makefile") CONFIG_FILES="$CONFIG_FILES anacron/Makefile" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + diff --git a/cronie-1.4.6/configure.ac b/cronie-1.4.6/configure.ac new file mode 100644 index 0000000..4e67ade --- /dev/null +++ b/cronie-1.4.6/configure.ac @@ -0,0 +1,248 @@ +AC_INIT([cronie],[1.4.6],[mmaslano@redhat.com]) +AC_CONFIG_HEADER([config.h]) +AC_PREREQ(2.60) + +AM_INIT_AUTOMAKE + +AC_CANONICAL_HOST + +dnl Checks for programs. + +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S + +dnl Check for _GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS + +AC_CHECK_HEADERS( \ + dirent.h \ + fcntl.h \ + getopt.h \ + glob.h \ + limits.h \ + paths.h \ + pty.h \ + selinux/selinux.h \ + stddef.h \ + stdint.h \ + sys/audit.h \ + sys/inotify.h \ + sys/stat.h \ + sys/stream.h \ + sys/stropts.h \ + sys/time.h \ + sys/timers.h \ + sys/types.h \ + sys/cdefs.h \ + sys/fcntl.h \ + time.h \ + unistd.h \ + util.h \ + utime.h \ +) + +AC_CHECK_FUNCS( \ + fcntl \ + lockf \ + flock \ + fchown \ + fchgrp \ +) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIGNAL +AC_TYPE_UID_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) + +dnl Checking for programs + +AC_MSG_CHECKING(username to run under) +AC_ARG_WITH(daemon_username, +[AS_HELP_STRING([--with-daemon_username=DAEMON_USERNAME], [Username to run under (default daemon) ])], +[ case "$withval" in + no) + AC_MSG_ERROR(Need DAEMON_USERNAME.) + ;; + yes) + DAEMON_USERNAME=daemon + AC_MSG_RESULT(daemon) + ;; + *) + DAEMON_USERNAME="$withval"; + AC_MSG_RESULT($withval) + ;; + esac ], + DAEMON_USERNAME=daemon + AC_MSG_RESULT(daemon) +) +AC_SUBST(DAEMON_USERNAME) + +AC_MSG_CHECKING(groupname to run under) +AC_ARG_WITH(daemon_groupname, +[AS_HELP_STRING([--with-daemon_groupname=DAEMON_GROUPNAME], [Groupname to run under (default daemon) ])], +[ case "$withval" in + no) + AC_MSG_ERROR(Need DAEMON_GROUPNAME.) + ;; + yes) + DAEMON_GROUPNAME=daemon + AC_MSG_RESULT(daemon) + ;; + *) + DAEMON_GROUPNAME="$withval"; + AC_MSG_RESULT($withval) + ;; + esac ], + DAEMON_GROUPNAME=daemon + AC_MSG_RESULT(daemon) +) +AC_SUBST(DAEMON_GROUPNAME) + +# Check whether inotify is accepted +AC_ARG_WITH(inotify, + [AS_HELP_STRING([--with-inotify], [ Enable inotify support])], + [ if test "x$withval" != "xno" ; then + AC_DEFINE(WITH_INOTIFY,1,[Define if you want inotify support.]) + AC_CHECK_HEADER([sys/inotify.h], , AC_MSG_ERROR(Inotify support requires sys/inotify.h header)) + AC_CHECK_FUNCS(inotify_init inotify_add_watch) + fi + ] +) + +AC_ARG_ENABLE(pie,CRONIE_HELP_STRING(--enable-pie,Build cronie as a Position Independent Executable)) +if test "x$enable_pie" = xyes; then + save_CFLAGS="$CFLAGS" + save_LDFLAGS="$LDFLAGS" + CFLAGS="$CFLAGS -fpie" + LDFLAGS="$LDFLAGS -pie -fpie" + AC_CACHE_CHECK([whether compiler accepts -pie -fpie], ac_cv_pie_fpie, + [AC_TRY_LINK([], [], + ac_cv_pie_fpie=yes, ac_cv_pie_fpie=no)]) + if test $ac_cv_pie_fpie = no; then + CFLAGS="$save_CFLAGS" + LDFLAGS="$save_LDFLAGS" + fi +fi + +# Check whether user wants SELinux support +SELINUX_MSG="no" +LIBSELINUX="" +AC_ARG_WITH(selinux, + [AS_HELP_STRING([--with-selinux], [Enable SELinux support])], + [ if test "x$withval" != "xno" ; then + saved_LIBS="$LIBS" + AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) + SELINUX_MSG="yes" + AC_CHECK_HEADER([selinux/selinux.h], ,AC_MSG_ERROR(SELinux support requires selinux.h header)) + AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], + AC_MSG_ERROR(SELinux support requires libselinux library)) + AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) + LIBS="$saved_LIBS $LIBSELINUX" + AC_SUBST(LIBSELINUX) + fi ] +) + +AC_ARG_WITH(pam, [AS_HELP_STRING([--with-pam], [Build with PAM support])]) +AC_ARG_ENABLE(pam, [AS_HELP_STRING([--enable-pam], [Alias for --with-pam])]) + +# Check that with_pam and enable_pam are consistent. +# If neither one is set, the default is "no." +if test -z "$with_pam"; then + with_pam=${enable_pam:-no} +elif test -n "$enable_pam" && test "$with_pam" != "$enable_pam"; then + AC_MSG_ERROR( + [Contradicting --with/without-pam and --enable/disable-pam options.]) +fi + +AM_CONDITIONAL([PAM], [test "$with_pam" != no]) + +if test "$with_pam" != no; then + AC_DEFINE(WITH_PAM, 1, [Define if you want to enable PAM support]) + pam_appl_h_found=no + AC_CHECK_HEADERS([pam/pam_appl.h security/pam_appl.h], + [pam_appl_h_found=yes]) + test "$pam_appl_h_found" = yes || + AC_MSG_ERROR([PAM headers not found]) + + saved_LIBS="$LIBS" + AC_CHECK_LIB([dl], [dlopen], [libdl_found=yes], [libdl_found=no]) + AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) + AC_CHECK_FUNCS([pam_getenvlist pam_putenv]) + LIBS="$saved_LIBS" + + case $libdl_found:" $LIBS " in #( + *" -ldl "*) LIBPAM= ;; #( + yes:*) LIBPAM=-ldl ;; # libdl found, but is not in $LIBS + esac + AC_SUBST([LIBPAM], ["-lpam $LIBPAM"]) +fi + +AC_DEFINE(DEBUGGING,1,[Code will be built with debug info.]) + +AC_DEFINE(MAILARG,"/usr/sbin/sendmail",[There will be path to sendmail.]) + +AC_DEFINE(MAILFMT,"%s -FCronDaemon -i -odi -oem -oi -t -f %s", +[-i = don't terminate on "." by itself +-Fx = Set full-name of sender +-odi = Option Deliverymode Interactive +-oem = Option Errors Mailedtosender +-oi = Ignore "." alone on a line +-t = Get recipient from headers +-f %s = Envelope sender address +-d = undocumented but common flag.]) + +AC_DEFINE(SYSLOG,1,[Using syslog for log messages.]) + +AC_DEFINE(CAPITALIZE_FOR_PS, 1, [if you have a tm_gmtoff member in struct tm]) + +# Check whether user wants Linux audit support +AC_ARG_WITH(audit, + [AS_HELP_STRING([--with-audit], [Enable audit trails])], + [ if test "x$withval" != "xno" ; then + saved_LIBS="$LIBS" + AC_DEFINE(WITH_AUDIT,1,[Define if you want Audit trails.]) + AC_CHECK_HEADER([libaudit.h], ,AC_MSG_ERROR(Audit trails requires libaudit.h header)) + AC_CHECK_LIB(audit, audit_open, [ LIBAUDIT="-laudit" ], + AC_MSG_ERROR(Audit support needs audit libraries.)) + LIBS="$saved_LIBS $LIBAUDIT" + AC_SUBST(LIBAUDIT) + fi ] +) + +dnl CRONIE_VAR_DEFAULT (VAR, DESCRIPTION, DEFAULT) +dnl -------------------------------------------- +AC_DEFUN([CRONIE_CONF_VAR], +[AC_ARG_VAR([$1], [$2 @<:@$3@:>@]) +if test "$$1" = ""; then + $1='$3' +fi +]) + +AC_DEFUN([ANACRON_CONF_VAR], +[AC_ARG_VAR([$1], [$2 @<:@$3@:>@]) +if test "$$1" = ""; then + $1='$3' + fi +]) + +CRONIE_CONF_VAR([SYSCRONTAB], [the current working directory of the running daemon], [${sysconfdir}/crontab]) +CRONIE_CONF_VAR([SYS_CROND_DIR], [the current working directory of the running daemon], [${sysconfdir}/cron.d]) +CRONIE_CONF_VAR([SPOOL_DIR], [the directory where all the user cron tabs reside], [${localstatedir}/spool/cron]) + +AC_ARG_ENABLE([anacron], [AS_HELP_STRING([--enable-anacron], [Build also anacron.])]) +AM_CONDITIONAL([ANACRON], [test "$enable_anacron" = yes]) +if test "$enable_anacron" != no; then + ANACRON_CONF_VAR([ANACRON_SPOOL_DIR],[The path for anacron locks.],[${localstatedir}/spool/anacron]) + ANACRON_CONF_VAR([ANACRONTAB],[The anacron table for regular jobs.],[${sysconfdir}/anacrontab]) +fi + +AC_CONFIG_FILES([Makefile src/Makefile man/Makefile anacron/Makefile]) +AC_OUTPUT + diff --git a/cronie-1.4.6/contrib/0anacron b/cronie-1.4.6/contrib/0anacron new file mode 100644 index 0000000..6835088 --- /dev/null +++ b/cronie-1.4.6/contrib/0anacron @@ -0,0 +1,18 @@ +#!/bin/bash +#in case file doesn't exist +if test -r /var/spool/anacron/cron.daily; then + day=`cat /var/spool/anacron/cron.daily` +fi +if [ `date +%Y%m%d` = "$day" ]; then + exit 0; +fi + +# in case anacron is already running, +# there will be log (daemon won't be running twice). +if test -x /usr/bin/on_ac_power; then + /usr/bin/on_ac_power &> /dev/null + if test $? -eq 1; then + exit 0 + fi +fi +/usr/sbin/anacron -s diff --git a/cronie-1.4.6/contrib/0hourly b/cronie-1.4.6/contrib/0hourly new file mode 100644 index 0000000..09039c1 --- /dev/null +++ b/cronie-1.4.6/contrib/0hourly @@ -0,0 +1,4 @@ +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +01 * * * * root run-parts /etc/cron.hourly diff --git a/cronie-1.4.6/contrib/anacrontab b/cronie-1.4.6/contrib/anacrontab new file mode 100644 index 0000000..78c6f8c --- /dev/null +++ b/cronie-1.4.6/contrib/anacrontab @@ -0,0 +1,16 @@ +# /etc/anacrontab: configuration file for anacron + +# See anacron(8) and anacrontab(5) for details. + +SHELL=/bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +# the maximal random delay added to the base delay of the jobs +RANDOM_DELAY=45 +# the jobs will be started during the following hours only +START_HOURS_RANGE=3-22 + +#period in days delay in minutes job-identifier command +1 5 cron.daily nice run-parts /etc/cron.daily +7 25 cron.weekly nice run-parts /etc/cron.weekly +@monthly 45 cron.monthly nice run-parts /etc/cron.monthly diff --git a/cronie-1.4.6/contrib/dailyjobs b/cronie-1.4.6/contrib/dailyjobs new file mode 100644 index 0000000..ee9af24 --- /dev/null +++ b/cronie-1.4.6/contrib/dailyjobs @@ -0,0 +1,8 @@ +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root + +# run-parts +02 4 * * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily +22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly +42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthly diff --git a/cronie-1.4.6/crond.sysconfig b/cronie-1.4.6/crond.sysconfig new file mode 100644 index 0000000..ee23703 --- /dev/null +++ b/cronie-1.4.6/crond.sysconfig @@ -0,0 +1,3 @@ +# Settings for the CRON daemon. +# CRONDARGS= : any extra command-line startup arguments for crond +CRONDARGS= diff --git a/cronie-1.4.6/cronie.init b/cronie-1.4.6/cronie.init new file mode 100755 index 0000000..1c520b9 --- /dev/null +++ b/cronie-1.4.6/cronie.init @@ -0,0 +1,132 @@ +#!/bin/sh +# +# crond Start/Stop the cron clock daemon. +# +# chkconfig: 2345 90 60 +# description: cron is a standard UNIX program that runs user-specified \ +# programs at periodic scheduled times. vixie cron adds a \ +# number of features to the basic UNIX cron, including better \ +# security and more powerful configuration options. + +### BEGIN INIT INFO +# Provides: crond crontab +# Required-Start: $local_fs $syslog +# Required-Stop: $local_fs $syslog +# Default-Start: 2345 +# Default-Stop: 90 +# Short-Description: run cron daemon +# Description: cron is a standard UNIX program that runs user-specified +# programs at periodic scheduled times. vixie cron adds a +# number of features to the basic UNIX cron, including better +# security and more powerful configuration options. +### END INIT INFO + +[ -f /etc/sysconfig/crond ] || { + [ "$1" = "status" ] && exit 4 || exit 6 +} + +RETVAL=0 +prog="crond" +exec=/usr/sbin/crond +lockfile=/var/lock/subsys/crond +config=/etc/sysconfig/crond + +# Source function library. +. /etc/rc.d/init.d/functions + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +start() { + if [ $UID -ne 0 ] ; then + echo "User has insufficient privilege." + exit 4 + fi + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon $prog $CRONDARGS + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile +} + +stop() { + if [ $UID -ne 0 ] ; then + echo "User has insufficient privilege." + exit 4 + fi + echo -n $"Stopping $prog: " + if [ -n "`pidfileofproc $exec`" ]; then + killproc $exec + RETVAL=3 + else + failure $"Stopping $prog" + fi + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile +} + +restart() { + stop + start +} + +reload() { + echo -n $"Reloading $prog: " + if [ -n "`pidfileofproc $exec`" ]; then + killproc $exec -HUP + else + failure $"Reloading $prog" + fi + retval=$? + echo +} + +force_reload() { + # new configuration takes effect after restart + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status -p /var/run/crond.pid $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? + diff --git a/cronie-1.4.6/depcomp b/cronie-1.4.6/depcomp new file mode 100755 index 0000000..df8eea7 --- /dev/null +++ b/cronie-1.4.6/depcomp @@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/cronie-1.4.6/install-sh b/cronie-1.4.6/install-sh new file mode 100755 index 0000000..6781b98 --- /dev/null +++ b/cronie-1.4.6/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/cronie-1.4.6/man/Makefile.am b/cronie-1.4.6/man/Makefile.am new file mode 100644 index 0000000..f52345b --- /dev/null +++ b/cronie-1.4.6/man/Makefile.am @@ -0,0 +1,6 @@ +dist_man_MANS = crontab.1 crontab.5 cron.8 crond.8 +if ANACRON +dist_man_MANS += anacrontab.5 anacron.8 +endif +noinst_MANS = bitstring.3 + diff --git a/cronie-1.4.6/man/Makefile.in b/cronie-1.4.6/man/Makefile.in new file mode 100644 index 0000000..a9bf4c8 --- /dev/null +++ b/cronie-1.4.6/man/Makefile.in @@ -0,0 +1,500 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ANACRON_TRUE@am__append_1 = anacrontab.5 anacron.8 +subdir = man +DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ + "$(DESTDIR)$(man8dir)" +man5dir = $(mandir)/man5 +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(dist_man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANACRONTAB = @ANACRONTAB@ +ANACRON_SPOOL_DIR = @ANACRON_SPOOL_DIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAEMON_GROUPNAME = @DAEMON_GROUPNAME@ +DAEMON_USERNAME = @DAEMON_USERNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBAUDIT = @LIBAUDIT@ +LIBOBJS = @LIBOBJS@ +LIBPAM = @LIBPAM@ +LIBS = @LIBS@ +LIBSELINUX = @LIBSELINUX@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPOOL_DIR = @SPOOL_DIR@ +STRIP = @STRIP@ +SYSCRONTAB = @SYSCRONTAB@ +SYS_CROND_DIR = @SYS_CROND_DIR@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_man_MANS = crontab.1 crontab.5 cron.8 crond.8 $(am__append_1) +noinst_MANS = bitstring.3 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu man/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-man1: $(dist_man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } +install-man5: $(dist_man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" + @list=''; test -n "$(man5dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.5[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ + done; } + +uninstall-man5: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man5dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.5[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } +install-man8: $(dist_man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" + @list=''; test -n "$(man8dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 install-man5 install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man5 install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-man \ + uninstall-man1 uninstall-man5 uninstall-man8 + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cronie-1.4.6/man/anacron.8 b/cronie-1.4.6/man/anacron.8 new file mode 100644 index 0000000..5c347d8 --- /dev/null +++ b/cronie-1.4.6/man/anacron.8 @@ -0,0 +1,167 @@ +.TH ANACRON 8 2009-07-17 "Marcela MaÅ¡láňová" "Anacron Users' Manual" +.SH NAME +anacron \- runs commands periodically +.SH SYNOPSIS +.B anacron \fR[\fB-s\fR] [\fB-f\fR] [\fB-n\fR] [\fB-d\fR] [\fB-q\fR] +[\fB-t anacrontab\fR] [\fB-S spooldir\fR] [\fIjob\fR] +.br +.B anacron \fR[\fB-S spooldir\fR] -u [\fB-t anacrontab\fR] \fR[\fIjob\fR] +.br +.B anacron \fR[\fB-V\fR|\fB-h\fR] +.br +.B anacron -T \fR[\fB-t anacrontab\fR] +.SH DESCRIPTION +Anacron +is used to execute commands periodically, with a +frequency specified in days. Unlike \fBcron(8)\fR, +it does not assume that the machine is running continuously. Hence, +it can be used on machines that are not running 24 hours a day +to control regular jobs as daily, weekly, and monthly jobs. +.PP +Anacron reads a list of jobs from the +.I /etc/anacrontab +configuration file (see \fBanacrontab(5)\fR). This file +contains the list of jobs that Anacron controls. Each +job entry specifies a period in days, +a delay in minutes, a unique +job identifier, and a shell command. +.PP +For each job, Anacron checks whether +this job has been executed in the last \fBn\fR days, where \fBn\fR is the time period specified +for that job. If a job has not been executed in \fBn\fR days or more, Anacron runs the job's shell command, after waiting +for the number of minutes specified as the delay parameter. +.PP +After the command exits, Anacron records the date (excludes the hour) in a special +timestamp file for that job, so it knows when to execute that job again. +.PP +When there are no more jobs to be run, Anacron exits. +.PP +Anacron only considers jobs whose identifier, as +specified in \fBanacrontab(5)\fR, matches any of +the +.I job +command-line arguments. The +.I job +command-line arguments can be represented by shell wildcard patterns (be sure to protect them from +your shell with adequate quoting). Specifying no +.I job +command-line arguments is equivalent to specifying "*" (that is, all jobs are +considered by Anacron). +.PP +Unless Anacron is run with the \fB-d\fR option (specified below), it forks to the +background when it starts, and any parent processes exit immediately. +.PP +Unless Anacron is run with the \fB-s\fR or \fB-n\fR options, it starts jobs +immediately when their delay is over. The execution of different jobs is +completely independent. +.PP +If an executed job generates any output to standard output or to standard error, +the output is mailed to the user under whom Anacron is running (usually root), or to +the address specified in the \fBMAILTO\fR environment variable in the +.I /etc/anacrontab +file, if such exists. If the \fBLOGNAME\fR environment variable is set, it is used in the From: field of the mail. +.PP +Any informative messages generated by Anacron are sent to \fBsyslogd(8)\fR +or \fBrsyslogd(8)\fR under with facility set to \fBcron\fR and priority set to \fBnotice\fR. Any error +messages are sent with the priority \fBerror\fR. +.PP +"Active" jobs (i.e. jobs that Anacron already decided +to run and are now waiting for their delay to pass, and jobs that are currently +being executed by +Anacron), are "locked", so that other copies of Anacron cannot run them +at the same time. +.SH OPTIONS +.TP +.B -f +Forces execution of all jobs, ignoring any timestamps. +.TP +.B -u +Updates the timestamps of all jobs to the current date, but +does not run any. +.TP +.B -s +Serializes execution of jobs. Anacron does not start a new job before the +previous one finished. +.TP +.B -n +Runs jobs immediately and ignores the specified delays in the +.I /etc/anacrontab +file. This options implies \fB-s\fR. +.TP +.B -d +Does not fork Anacron to the background. In this mode, Anacron will output informational +messages to standard error, as well as to syslog. The output of any job +is mailed by Anacron. +.TP +.B -q +Suppresses any messages to standard error. Only applicable with \fB-d\fR. +.TP +.B -t some_anacrontab +Uses the specified anacrontab, rather than the +.I /etc/anacrontab +default one. +.TP +.B -T +Anacrontab testing. Tests the +.I /etc/anacrontab +configuration file for validity. If +there is an error in the file, it is shown on the standard output and Anacron +returns the value of 1. Valid anacrontabs return the value of 0. +.TP +.B -S spooldir +Uses the specified spooldir to store timestamps in. This option is required for +users who wish to run anacron themselves. +.TP +.B -V +Prints version information, and exits. +.TP +.B -h +Prints short usage message, and exits. +.SH SIGNALS +After receiving a \fBSIGUSR1\fR signal, Anacron waits for any running +jobs to finish and then exits. This can be used to stop +Anacron cleanly. +.SH NOTES +Make sure your time-zone is set correctly before Anacron is +started since the time-zone affects the date. This is usually accomplished +by setting the TZ environment variable, or by installing a +.I /usr/lib/zoneinfo/localtime +file. See +.B tzset(3) +for more information. + +Timestamp files are created in the spool directory for each job specified in an anacrontab. These files are never removed automatically by Anacron, and should be removed by hand if a job is no longer being scheduled. +.SH FILES +.TP +.I /etc/anacrontab +Contains specifications of jobs. See \fBanacrontab(5)\fR for a complete +description. +.TP +.I /var/spool/anacron +This directory is used by Anacron for storing timestamp files. +.SH "SEE ALSO" +.BR anacrontab (5), cron (8), tzset (3) +.PP +The Anacron +.I README +file. +.SH BUGS +Anacron never removes timestamp files. Remove unused files manually. +.PP +Anacron +uses up to two file descriptors for each active job. It may run out of +descriptors if there are more than about 125 active jobs (on normal kernels). +.PP +Mail comments, suggestions and bug reports to Sean 'Shaleh' Perry . +.SH AUTHOR +Anacron was originally conceived and implemented by Christian Schwarz +. +.PP +The current implementation is a complete rewrite by Itai Tzur +. +.PP +The code base was maintained by Sean 'Shaleh' Perry . +.PP +Since 2004, it is maintained by Pascal Hakim . +.PP +For Fedora, Anacron is maintained by Marcela MaÅ¡láňová . diff --git a/cronie-1.4.6/man/anacrontab.5 b/cronie-1.4.6/man/anacrontab.5 new file mode 100644 index 0000000..2ed4446 --- /dev/null +++ b/cronie-1.4.6/man/anacrontab.5 @@ -0,0 +1,98 @@ +.TH ANACRONTAB 5 2009-08-17 "Marcela MaÅ¡láňová" "Anacron Users' Manual" +.SH NAME +/etc/anacrontab \- configuration file for Anacron +.SH DESCRIPTION +The +.I /etc/anacrontab +configuration file describes the jobs controlled by \fBanacron(8)\fR. It can contain three types of lines: +job-description lines, environment assignments, or empty lines. +.PP +Job-description lines can have the following format: +.PP + period in days delay in minutes job-identifier command +.PP +The +.I period in days +variable specifies the frequency of execution of a job in days. This variable can be represented by an integer or a macro (@daily, @weekly, @monthly), where @daily denotes the same value as the integer 1, @weekly the same as 7, and @monthly specifies that the job is run once a month, independent on the length of the month. +.PP +The +.I delay in minutes +variable specifies the number of minutes anacron waits, if necessary, before executing a job. This variable is represented by an integer where 0 means no delay. +.PP +The +.I job-identifier +variable specifies a unique name of a job which is used in the log files. +.PP +The +.I command +variable specifies the command to execute. The command can either be a command such as \fBls /proc >> /tmp/proc\fR or a command to execute a custom script. +.PP +Environment assignment lines can have the following format: +.PP + VAR=VALUE +.PP +Any spaces around +.I VAR +are removed. No spaces around +.I VALUE +are allowed (unless you want them to be part of the value). The specified assignment +takes effect from the next line until the end of the file, or to the next +assignment of the same variable. +.PP +The +.I START_HOURS_RANGE +variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for example, due to a power down, then scheduled jobs are not executed that day. +.PP +The +.I RANDOM_DELAY +variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for each job. A +.I RANDOM_DELAY +set to 12 would therefore add, randomly, between 0 and 12 minutes to the delay in minutes for each job in that particular anacrontab. When set to 0, no random delay is added. +.PP +Empty lines are either blank lines, line containing white spaces only, or +lines with white spaces followed by a '#' followed by an arbitrary comment. +.PP +You can continue a line onto the next line by adding a '\\' at the end of it. +.PP +In case you want to disable Anacron, add the +.I 0anacron +cron job (which is a part of +.IR crontabs(4) ) +into the +.I /etc/cron.hourly/jobs.deny +directory. +.SH EXAMPLE +This example shows how to set up an Anacron job similar in functionality to +.I /etc/crontab +which starts all regular jobs +between 6:00 and 8:00 +.I only. +A +.I RANDOM_DELAY +which can be 30 minutes at the most is specified. Jobs will run serialized in a queue where each job is started only after the previous one is finished. +.nf +# environment variables +SHELL=/bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +RANDOM_DELAY=30 +# Anacron jobs will start between 6am and 8am. +START_HOURS_RANGE=6-8 +# delay will be 5 minutes + RANDOM_DELAY for cron.daily +1 5 cron.daily nice run-parts /etc/cron.daily +7 0 cron.weekly nice run-parts /etc/cron.weekly +@monthly 0 cron.monthly nice run-parts /etc/cron.monthly +.fi +.SH "SEE ALSO" +.BR anacron (8), +.BR crontabs (4) +.PP +The Anacron +.I README +file. +.SH AUTHOR +Itai Tzur +.PP +Currently maintained by Pascal Hakim . +.PP +For Fedora, maintained by Marcela MaÅ¡láňová . diff --git a/cronie-1.4.6/man/cron.8 b/cronie-1.4.6/man/cron.8 new file mode 100644 index 0000000..5b6dbe3 --- /dev/null +++ b/cronie-1.4.6/man/cron.8 @@ -0,0 +1,225 @@ +.\"/* Copyright 1988,1990,1993,1996 by Paul Vixie +.\" * All rights reserved +.\" */ +.\" +.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" Modified 2010/09/12 by Colin Dean, Durham University IT Service, +.\" to add clustering support. +.\" +.\" $Id: cron.8,v 1.8 2004/01/23 19:03:32 vixie Exp $ +.\" +.TH CRON "8" "July 2010" "Marcela MaÅ¡láňová" "Cronie Users' Manual" +.SH NAME +crond \- daemon to execute scheduled commands +.SH SYNOPSIS +.B crond +.RB [ -n " | " -p " | " -s " | " -m \fP\fI\fP ] + +.B crond +.B -x +.RB [ext,sch,proc,pars,load,misc,test,bit] +.br +.SH DESCRIPTION +.I Cron +is started from +.I /etc/rc.d/init.d +or +.I /etc/init.d +It returns immediately, thus, there is no need to need to start it with the '&' parameter. +.PP +.I Cron +searches +.I /var/spool/cron +for crontab files which are named after accounts in +.I /etc/passwd; +The found crontabs are loaded into the memory. +.I Cron +also searches for +.I /etc/anacrontab +and any files in the +.I /etc/cron.d +directory, which have a different format (see +.BR crontab (5)). +.I Cron +examines all stored crontabs and checks each job to see if it needs to be +run in the current minute. When executing +commands, any output is mailed to the owner of the crontab (or to the user +specified in the +.I MAILTO +environment variable in the crontab, if such exists). +Any job output can also be sent to syslog by using the +.B "\-s" +option. +.PP +There are two ways how changes in crontables are checked. The first +method is checking the modtime of a file. The second method is using the inotify support. +Using of inotify is logged in the +.I /var/log/cron +log after the daemon is started. The inotify support checks for changes in all crontables and accesses the +hard disk only when a change is detected. +.PP +When using the modtime option, +.I Cron +checks its crontables' modtimes every minute to check for any changes and reloads +the crontables which have changed. There is no need to restart +.I Cron +after some of the +crontables were modified. The modtime option is also used when inotify can not be initialized. +.PP +.I Cron +checks these files and directories: +.IR /etc/anacrontab +system crontab, usually used to run daily, weekly, monthly jobs. See +.BR anacrontab (5) +for more details. +.IR /etc/cron.d/ +directory that contains system cronjobs stored for different users. +.IR /var/spool/cron +directory that contains user crontables created by the +.IR crontab +command. + +Note that the +.BR crontab (1) +command updates the modtime of the spool directory whenever it changes a +crontab. +.PP +.SS Daylight Saving Time and other time changes +Local time changes of less than three hours, such as those caused +by the Daylight Saving Time changes, are handled in a special way. +This only applies to jobs that run at a specific time and jobs that +run with a granularity greater than one hour. Jobs that run +more frequently are scheduled normally. +.PP +If time was adjusted one hour forward, those jobs that would have run in the +interval that has been skipped will be run immediately. +Conversely, if time was adjusted backward, running the same job twice is avoided. +.PP +Time changes of more than 3 hours are considered to be corrections to +the clock or the timezone, and the new time is used immediately. +.PP +It is possible to use different time zones for crontables. See +.IR crontab (5) +for more information. +.SS PAM Access Control +.IR Cron +supports access control with PAM if the system has PAM installed. For more information, see +.IR pam (8). +A PAM configuration file for +.IR crond +is installed in +.IR /etc/pam.d/crond . +The daemon loads the PAM environment from the pam_env module. This +can be overridden by defining specific settings in the appropriate crontab file. +.SH "OPTIONS" +.TP +.B "\-m" +This option allows you to specify a shell command to use for sending +.I Cron +mail output instead of using +.BR sendmail (8) +This command must accept a fully formatted mail message (with headers) on standard input and send it +as a mail message to the recipients specified in the mail headers. Specifying +the string +.I "off" +(i.e. crond -m off) +will disable the sending of mail. +.TP +.B "\-n" +Tells the daemon to run in the foreground. This can be useful when starting it out of init. +.TP +.B "\-p" +Allows +.I Cron +to accept any user set crontables. +.TP +.B "\-s" +This option will direct +.I Cron +to send the job output to the system log using +.IR syslog (3). +This is useful if your system does not have +.BR sendmail (8), +installed or if mail is disabled. +.TP +.B "\-x" +This option allows you to set debug flags. +.SH SIGNALS +When the \s-2SIGHUP\s+2 is received, the +.I Cron +daemon will close and reopen its +log file. This proves to be useful in scripts which rotate and age log files. +Naturally, this is not relevant if +.I Cron +was built to use +.IR syslog (3). +.SH CLUSTERING SUPPORT +In this version of +.IR Cron +it is possible to use a network-mounted shared +.I /var/spool/cron +across a cluster of hosts and specify that only one of the hosts should +run the crontab jobs in this directory at any one time. This is done by starting +.I Cron +with the \fB-c\fP option, and have the +.I /var/spool/cron/.cron.hostname +file contain just one line, which represents the hostname of whichever host in the +cluster should run the jobs. If this file does not exist, or the hostname +in it does not match that returned by +.BR gethostname (2) , +then all crontab files in this directory are ignored. This has no effect on +cron jobs specified in the +.I /etc/crontab +file or on files in the +.I /etc/cron.d +directory. These files are always run and considered host-specific. +.PP +Rather than editing +.I /var/spool/cron/.cron.hostname +directly, use the \fB-n\fP option of +.BR crontab (1) +to specify the host. +.PP +You should ensure that all hosts in a cluster, and the file server from which +they mount the shared crontab directory, have closely synchronised clocks, +e.g. using +.BR ntpd (8) +, otherwise the results will be very unpredictable. +.PP +Using cluster sharing automatically disables inotify support, because inotify cannot be +relied on with network-mounted shared file systems. +.SH CAVEATS +All +.BR crontab +files have to be regular files or symlinks to regular files, they must not be executable +or writable for anyone else but the owner. +This requirement can be overridden by using the \fB-p\fP option on the crond command line. +If inotify support is in use, changes in the symlinked crontabs are not automatically +noticed by the cron daemon. The cron daemon must receive a SIGHUP signal to reload the crontabs. +This is a limitation of the inotify API. +.PP +The syslog output will be used instead of mail, when sendmail is not installed. +.SH "SEE ALSO" +.BR crontab (1), +.BR crontab (5), +.BR inotify (7), +.BR pam (8) +.SH AUTHOR +.nf +Paul Vixie +Marcela MaÅ¡láňová +Colin Dean diff --git a/cronie-1.4.6/man/crond.8 b/cronie-1.4.6/man/crond.8 new file mode 100644 index 0000000..64c7c26 --- /dev/null +++ b/cronie-1.4.6/man/crond.8 @@ -0,0 +1 @@ +.so man8/cron.8 diff --git a/cronie-1.4.6/man/crontab.1 b/cronie-1.4.6/man/crontab.1 new file mode 100644 index 0000000..45b86f7 --- /dev/null +++ b/cronie-1.4.6/man/crontab.1 @@ -0,0 +1,186 @@ +.\"/* Copyright 1988,1990,1993 by Paul Vixie +.\" * All rights reserved +.\" */ +.\" +.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" Modified 2010/09/12 by Colin Dean, Durham University IT Service, +.\" to add clustering support. +.\" +.\" $Id: crontab.1,v 1.7 2004/01/23 19:03:32 vixie Exp $ +.\" +.TH CRONTAB 1 "22 September 2010" +.SH NAME +crontab \- maintains crontab files for individual users +.SH SYNOPSIS +.B crontab +.RB [ -u +.IR user ] " file" +.br +.B crontab +.RB [ -u +.IR user ] +.RB [ -l " | " -r " | " -e ]\ [ -i ] +.RB [ -s ] +.br +.B crontab +.BR -n\ [ +.IR "hostname " ] +.br +.B crontab +.BR -c +.SH DESCRIPTION +.I Crontab +is the program used to install, remove or list the tables +used to serve the +.BR cron (8) +daemon. Each user can have their own crontab, and though these are files in +.IR /var/spool/ , +they are not intended to be edited directly. For SELinux in MLS mode, you can define +more crontabs for each range. For more information, see +.BR selinux (8). +.PP +In this version of +.IR Cron +it is possible to use a network-mounted shared +.I /var/spool/cron +across a cluster of hosts and specify that only one of the hosts should +run the crontab jobs in the particular directory at any one time. You may also use +.BR crontab (1) +from any of these hosts to edit the same shared set of crontab files, and to +set and query which host should run the crontab jobs. +.PP +Running cron jobs can be allowed or disallowed for different users. For this purpose, use the +.I cron.allow +and +.I cron.deny +files. +If the +.I cron.allow +file exists, a user must be listed in it to be allowed to use cron +If the +.I cron.allow +file does not exist but the +.I cron.deny +file does exist, then a user must \fInot\fR be listed in the +.I cron.deny +file in order to use cron. If neither of these files exists, +only the super user is allowed to use cron. +Another way to restrict access to cron is to use PAM authentication to set up users, +which are allowed or disallowed to use +.I crontab +or modify system cron jobs in the +.IR /etc/cron.d/ +directory. +.PP +The temporary directory can be set in an environment variable. If it is not set +by the user, the +.I /tmp +directory is used. +.PP +.SH "OPTIONS" +.TP +.B "\-u" +Appends the name of the user whose crontab is to be modified. If this option +is not used, +.I crontab +examines "your" crontab, i.e., the crontab of the person executing the +command. Note that +.BR su (8) +may confuse +.IR crontab , +thus, when executing commands under +.BR su (8) +you should always use the +.B -u +option. If no crontab exists for a particular user, it is created for him the first time the +.B crontab -u +command is used under his username. +.TP +.B "\-l" +Displays the current crontab on standard output. +.TP +.B "\-r" +Removes the current crontab. +.TP +.B "\-e" +Edits the current crontab using the editor specified by +the \s-1VISUAL\s+1 or \s-1EDITOR\s+1 environment variables. After you exit +from the editor, the modified crontab will be installed automatically. +.TP +.B "\-i" +This option modifies the +.B "\-r" +option to prompt the user for a 'y/Y' response +before actually removing the crontab. +.TP +.B "\-s" +Appends the current SELinux security context string as an +MLS_LEVEL setting to the crontab file before editing / replacement +occurs - see the documentation of MLS_LEVEL in +.BR crontab(5)\. +.TP +.B "\-n" +This option is relevant only if +.BR cron (8) +was started with the \fB-c\fP option, to enable clustering support. It is +used to set the host in the cluster which should run the jobs specified in the +crontab files in the +.I /var/spool/cron\ +directory. +If a hostname is supplied, the host whose hostname returned by +.BR gethostname(2) +matches the supplied hostname, will be selected to run the selected cron jobs subsequently. If there +is no host in the cluster matching the supplied hostname, or you explicitly specify +an empty hostname, then the selected jobs will not be run at all. If the hostname +is omitted, the name of the local host returned by +.BR gethostname(2) +is used. Using this option has no effect on the +.I /etc/crontab +file and the files in the +.I /etc/cron.d +directory, which are always run, and considered host-specific. For more +information on clustering support, see +.BR cron (8)\. +.TP +.B "\-c" +This option is only relevant if +.BR cron (8) +was started with the \fB-c\fP option, to enable clustering support. It is +used to query which host in the cluster is currently set to run the jobs +specified in the crontab files in the directory +.I /var/spool/cron +, as set using the \fB-n\fP option. +.SH "SEE ALSO" +.BR crontab (5), cron (8) +.SH FILES +.nf +/etc/cron.allow +/etc/cron.deny +.fi +.SH STANDARDS +The +.I crontab +command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax +differs from previous versions of Vixie Cron, as well as from the classic +SVR3 syntax. +.SH DIAGNOSTICS +An informative usage message appears if you run a crontab with a faulty command +defined in it. +.SH AUTHOR +.nf +Paul Vixie +Colin Dean diff --git a/cronie-1.4.6/man/crontab.5 b/cronie-1.4.6/man/crontab.5 new file mode 100644 index 0000000..0132fc7 --- /dev/null +++ b/cronie-1.4.6/man/crontab.5 @@ -0,0 +1,309 @@ +.\"/* Copyright 1988,1990,1993,1994 by Paul Vixie +.\" * All rights reserved +.\" */ +.\" +.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" $Id: crontab.5,v 1.6 2004/01/23 19:03:33 vixie Exp $ +.\" +.TH ANACRONTAB 5 "July 2010" "Marcela MaÅ¡láňová" "Cronie Users' Manual" +.SH NAME +crontab \- files used to schedule the execution of programs +.SH DESCRIPTION +A +.I crontab +file contains instructions for the +.BR cron (8) +daemon in the following simplified manner: "run this command at this time on this date". +Each user can define their own crontab. Commands defined in any given crontab are +executed under the user who owns that particular crontab. Uucp and News usually have +their own crontabs, eliminating the need for explicitly running +.BR su (1) +as part of a cron command. +.PP +Blank lines, leading spaces, and tabs are ignored. Lines whose first +non-white space character is a pound-sign (#) are comments, and are note processed. +Note that comments are not allowed on the same line as cron commands, since +they are considered a part of the command. Similarly, comments are not +allowed on the same line as environment variable settings. +.PP +An active line in a crontab is either an environment setting or a cron +command. An environment setting is of the form: +.PP + name = value +.PP +where the white spaces around the equal-sign (=) are optional, and any subsequent +non-leading white spaces in +.I value +is a part of the value assigned to +.IR name . +The +.I value +string may be placed in quotes (single or double, but matching) to preserve +leading or trailing white spaces. +.PP +Several environment variables are set up +automatically by the +.BR cron (8) +daemon. +.I SHELL +is set to /bin/sh, and +.I LOGNAME +and +.I HOME +are set from the /etc/passwd line of the crontab\'s owner. +.I HOME +and +.I SHELL +can be overridden by settings in the crontab; LOGNAME can not. +.PP +(Note: the +.I LOGNAME +variable is sometimes called +.I USER +on BSD systems and is also automatically set). +.PP +In addition to +.IR LOGNAME , +.IR HOME , +and +.IR SHELL , +.BR cron (8) +looks at the +.I MAILTO +variable if a mail needs to be send as a result of running +any commands in that particular crontab. If +.I MAILTO +is defined (and non-empty), mail is +sent to the specified address. If +.I MAILTO +is defined but empty (\fIMAILTO=""\fR), no +mail is sent. Otherwise, mail is sent to the owner of the crontab. This +option is useful if you decide to use /bin/mail instead of /usr/lib/sendmail as +your mailer. Note that /bin/mail does not provide aliasing and UUCP +usually does not read its mail. If +.I MAILFROM +is defined (and non-empty), it +is used as the envelope sender address, otherwise, ``root'' is used. +.PP +By default, cron sends a mail using the 'Content-Type:' header of 'text/plain' +with the 'charset=' parameter set to the 'charmap/codeset' of the locale in which +.BR crond (8) +is started up - i.e. either the default system locale, if no LC_* environment +variables are set, or the locale specified by the LC_* environment variables +(see +.BR locale (7)). +Different character encodings can be used for mailing cron job outputs by +setting the +.I CONTENT_TYPE +and +.I CONTENT_TRANSFER_ENCODING +variables in a crontab to the correct values of the mail headers of those names. +.PP +The +.I CRON_TZ +variable specifies the time zone specific for the cron table. +The user should enter a time according to the specified time zone into the table. +The time used for writing into a log file is taken from the local time zone, where the +daemon is running. +.PP +The +.I MLS_LEVEL +environment variable provides support for multiple per-job +SELinux security contexts in the same crontab. +By default, cron jobs execute with the default SELinux security context of the +user that created the crontab file. +When using multiple security levels and roles, this may not be sufficient, because +the same user may be running in different roles or in different security levels. +For more information about roles and SELinux MLS/MCS, see +.BR selinux (8) +and the crontab example mentioned later on in this text. +You can set the +.I MLS_LEVEL +variable to the SELinux security context string specifying +the particular SELinux security context in which you want jobs to be run. +.B crond +will then set the execution context of those jobs that meet the specifications of the particular security context. +For more information, see +.BR crontab (1)\ -s\ option. +.PP +The format of a cron command is similar to the V7 standard, with a number of +upward-compatible extensions. Each line has five time-and-date fields +followed by a +.BR user name +(if this is the +.BR system +crontab file), and followed by a command. Commands are executed by +.BR cron (8) +when the 'minute', 'hour', and 'month of the year' fields match the current time, +.I and +at least one of the two 'day' fields ('day of month', or 'day of week') +match the current time (see "Note" below). +.PP +Note that this means that non-existent times, such as the "missing hours" +during the daylight savings time conversion, will never match, causing jobs +scheduled during the "missing times" not to be run. Similarly, times +that occur more than once (again, during the daylight savings time conversion) +will cause matching jobs to be run twice. +.PP +.BR cron (8) +examines cron entries every minute. +.PP +The time and date fields are: +.IP +.ta 1.5i +field allowed values +.br +----- -------------- +.br +minute 0-59 +.br +hour 0-23 +.br +day of month 1-31 +.br +month 1-12 (or names, see below) +.br +day of week 0-7 (0 or 7 is Sunday, or use names) +.br +.PP +A field may contain an asterisk (*), which always stands for "first\-last". +.PP +Ranges of numbers are allowed. Ranges are two numbers separated +with a hyphen. The specified range is inclusive. For example, +8-11 for an 'hours' entry specifies execution at hours 8, 9, 10, +and 11. +.PP +Lists are allowed. A list is a set of numbers (or ranges) +separated by commas. Examples: "1,2,5,9", "0-4,8-12". +.PP +Step values can be used in conjunction with ranges. Following +a range with "/" specifies skips of the number's value +through the range. For example, "0-23/2" can be used in the 'hours' +field to specify command execution for every other hour (the alternative +in the V7 standard is "0,2,4,6,8,10,12,14,16,18,20,22"). Step values are +also permitted after an asterisk, so if specifying a job to be run every two +hours, you can use "*/2". +.PP +Names can also be used for the 'month' and 'day of week' +fields. Use the first three letters of the particular +day or month (case does not matter). Ranges or +lists of names are not allowed. +.PP +The "sixth" field (the rest of the line) specifies the command to be +run. +The entire command portion of the line, up to a newline or a "%" +character, will be executed by /bin/sh or by the shell +specified in the SHELL variable of the cronfile. +A "%" character in the command, unless escaped with a backslash +(\\), will be changed into newline characters, and all data +after the first % will be sent to the command as standard +input. +.PP +Note: The day of a command's execution can be specified in the following two +fields \(em 'day of month', and 'day of week'. If both fields are +restricted (i.e., do not contain the "*" character), the command will be run when +.I either +field matches the current time. For example, +.br +"30 4 1,15 * 5" +would cause a command to be run at 4:30 am on the 1st and 15th of each +month, plus every Friday. +.SH EXAMPLE CRON FILE +.nf +# use /bin/sh to run commands, no matter what /etc/passwd says +SHELL=/bin/sh +# mail any output to `paul', no matter whose crontab this is +MAILTO=paul +# +CRON_TZ=Japan +# run five minutes after midnight, every day +5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 +# run at 2:15pm on the first of every month -- output mailed to paul +15 14 1 * * $HOME/bin/monthly +# run at 10 pm on weekdays, annoy Joe +0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% +23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" +5 4 * * sun echo "run at 5 after 4 every sunday" +.fi +.SH Jobs in /etc/cron.d/ +The jobs in +.I cron.d +and +.I /etc/crontab +are system jobs, which are used usually for more than +one user, thus, the username is needed. MAILTO on the first line +is optional. +.SH EXAMPLE OF A JOB IN /etc/cron.d/job +.nf +#login as root +#create job with preferred editor (e.g. vim) +MAILTO=root +* * * * * root touch /tmp/file +.fi +.SH SELinux with multi level security (MLS) +In a crontab, it is important to specify a security level by \fIcrontab\ -s\fR or specifying +the required level on the first line of the crontab. Each level is specified +in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it is especially important to: +.br +- check/change the actual role, +.br +- set correct \fIrole for directory\fR, which is used for input/output. +.SH EXAMPLE FOR SELINUX MLS +.nf +# login as root +newrole -r sysadm_r +mkdir /tmp/SystemHigh +chcon -l SystemHigh /tmp/SystemHigh +crontab -e +# write in crontab file +MLS_LEVEL=SystemHigh +0-59 * * * * id -Z > /tmp/SystemHigh/crontest +.fi +.SH FILES +.I /etc/anacrontab +system crontab file for jobs like cron.daily, weekly, monthly. +.I /var/spool/cron/ +a directory for storing crontabs defined by users. +.I /etc/cron.d/ +a directory for storing system crontables. +.SH "SEE ALSO" +.BR cron (8), +.BR crontab (1) +.SH EXTENSIONS +These special time specification "nicknames" which replace +the 5 initial time and date fields, and are prefixed with the '@' character, are supported: +.nf +@reboot : Run once after reboot. +@yearly : Run once a year, ie. "0 0 1 1 *". +@annually : Run once a year, ie. "0 0 1 1 *". +@monthly : Run once a month, ie. "0 0 1 * *". +@weekly : Run once a week, ie. "0 0 * * 0". +@daily : Run once a day, ie. "0 0 * * *". +@hourly : Run once an hour, ie. "0 * * * *". +.fi +.SH CAVEATS +.BR crontab +files have to be regular files or symlinks to regular files, they must not be executable +or writable for anyone else but the owner. +This requirement can be overridden by using the \fB-p\fP option on the crond command line. +If inotify support is in use, changes in the symlinked crontabs are not automatically +noticed by the cron daemon. The cron daemon must receive a SIGHUP signal to reload the crontabs. +This is a limitation of the inotify API. + +.SH AUTHOR +.nf +Paul Vixie diff --git a/cronie-1.4.6/missing b/cronie-1.4.6/missing new file mode 100755 index 0000000..28055d2 --- /dev/null +++ b/cronie-1.4.6/missing @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/cronie-1.4.6/pam/crond b/cronie-1.4.6/pam/crond new file mode 100644 index 0000000..37a6906 --- /dev/null +++ b/cronie-1.4.6/pam/crond @@ -0,0 +1,10 @@ +# +# The PAM configuration file for the cron daemon +# +# +# No PAM authentication called, auth modules not needed +account required pam_access.so +account include password-auth +session required pam_loginuid.so +session include password-auth +auth include password-auth diff --git a/cronie-1.4.6/src/Makefile.am b/cronie-1.4.6/src/Makefile.am new file mode 100644 index 0000000..a3f57c8 --- /dev/null +++ b/cronie-1.4.6/src/Makefile.am @@ -0,0 +1,73 @@ +# Makefile.am - two binaries crond and crontab + +sbin_PROGRAMS = crond +bin_PROGRAMS = crontab + +crond_SOURCES = \ + cron.c database.c user.c job.c do_command.c popen.c \ + $(common_src) +crontab_SOURCES = crontab.c $(common_src) +common_src = entry.c env.c misc.c pw_dup.c security.c cron.h \ + externs.h funcs.h globals.h macros.h pathnames.h structs.h \ + bitstring.h +common_nodist = cron-paths.h +nodist_crond_SOURCES = $(common_nodist) +nodist_crontab_SOURCES = $(common_nodist) +BUILT_SOURCES = $(common_nodist) + + +LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) + +## if DEBUG +## noinst_PROGRAMS = debug +## endif + +# This header contains all the paths. +# If they are configurable, they are declared in configure script. +# Depends on this Makefile, because it uses make variables. +# CCD 2010/09/10 added CRON_HOSTNAME for clustered-cron. +cron-paths.h: Makefile + @echo 'creating $@' + @sed >$@ 's/ *\\$$//' <<\END #\ + /* This file has been automatically generated. Do not edit. */ \ + \ + #ifndef _CRON_PATHS_H_ \ + #define _CRON_PATHS_H_ \ + \ + /* SPOOLDIR is where the crontabs live. \ + * This directory will have its modtime updated \ + * whenever crontab(1) changes a crontab; this is \ + * the signal for cron(8) to look at each individual \ + * crontab file and reload those whose modtimes are \ + * newer than they were last time around (or which \ + * didn't exist last time around...) \ + * or it will be checked by inotify \ + */ \ + #define SPOOL_DIR "$(SPOOL_DIR)" \ + \ + /* CRON_HOSTNAME is file in SPOOL_DIR which, if it \ + * exists, and does not just contain a line matching \ + * the name returned by gethostname(), causes all \ + * crontabs in SPOOL_DIR to be ignored. This is \ + * intended to be used when clustering hosts sharing \ + * one NFS-mounted SPOOL_DIR, and where only one host \ + * should use the crontab files here at any one time. \ + */ \ + #define CRON_HOSTNAME ".cron.hostname" \ + \ + /* cron allow/deny file. At least cron.deny must \ + * exist for ordinary users to run crontab. \ + */ \ + #define CRON_ALLOW "$(sysconfdir)/cron.allow" \ + #define CRON_DENY "$(sysconfdir)/cron.deny" \ + \ + /* 4.3BSD-style crontab f.e. /etc/crontab */ \ + #define SYSCRONTAB "$(SYSCRONTAB)" \ + \ + /* system crontab dir f.e. /etc/cron.d/ */ \ + #define SYS_CROND_DIR "$(SYS_CROND_DIR)" \ + \ + #define SYSCONFDIR "$(sysconfdir)" \ + \ + #endif /* _CRON_PATHS_H_ */ \ + END diff --git a/cronie-1.4.6/src/Makefile.in b/cronie-1.4.6/src/Makefile.in new file mode 100644 index 0000000..963d836 --- /dev/null +++ b/cronie-1.4.6/src/Makefile.in @@ -0,0 +1,609 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am - two binaries crond and crontab + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = crond$(EXEEXT) +bin_PROGRAMS = crontab$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" +PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) +am__objects_1 = entry.$(OBJEXT) env.$(OBJEXT) misc.$(OBJEXT) \ + pw_dup.$(OBJEXT) security.$(OBJEXT) +am_crond_OBJECTS = cron.$(OBJEXT) database.$(OBJEXT) user.$(OBJEXT) \ + job.$(OBJEXT) do_command.$(OBJEXT) popen.$(OBJEXT) \ + $(am__objects_1) +am__objects_2 = +nodist_crond_OBJECTS = $(am__objects_2) +crond_OBJECTS = $(am_crond_OBJECTS) $(nodist_crond_OBJECTS) +crond_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +crond_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_crontab_OBJECTS = crontab.$(OBJEXT) $(am__objects_1) +nodist_crontab_OBJECTS = $(am__objects_2) +crontab_OBJECTS = $(am_crontab_OBJECTS) $(nodist_crontab_OBJECTS) +crontab_LDADD = $(LDADD) +crontab_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(crond_SOURCES) $(nodist_crond_SOURCES) $(crontab_SOURCES) \ + $(nodist_crontab_SOURCES) +DIST_SOURCES = $(crond_SOURCES) $(crontab_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +ANACRONTAB = @ANACRONTAB@ +ANACRON_SPOOL_DIR = @ANACRON_SPOOL_DIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DAEMON_GROUPNAME = @DAEMON_GROUPNAME@ +DAEMON_USERNAME = @DAEMON_USERNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBAUDIT = @LIBAUDIT@ +LIBOBJS = @LIBOBJS@ +LIBPAM = @LIBPAM@ +LIBS = @LIBS@ +LIBSELINUX = @LIBSELINUX@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPOOL_DIR = @SPOOL_DIR@ +STRIP = @STRIP@ +SYSCRONTAB = @SYSCRONTAB@ +SYS_CROND_DIR = @SYS_CROND_DIR@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +crond_SOURCES = \ + cron.c database.c user.c job.c do_command.c popen.c \ + $(common_src) + +crontab_SOURCES = crontab.c $(common_src) +common_src = entry.c env.c misc.c pw_dup.c security.c cron.h \ + externs.h funcs.h globals.h macros.h pathnames.h structs.h \ + bitstring.h + +common_nodist = cron-paths.h +nodist_crond_SOURCES = $(common_nodist) +nodist_crontab_SOURCES = $(common_nodist) +BUILT_SOURCES = $(common_nodist) +LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +crond$(EXEEXT): $(crond_OBJECTS) $(crond_DEPENDENCIES) + @rm -f crond$(EXEEXT) + $(LINK) $(crond_OBJECTS) $(crond_LDADD) $(LIBS) +crontab$(EXEEXT): $(crontab_OBJECTS) $(crontab_DEPENDENCIES) + @rm -f crontab$(EXEEXT) + $(LINK) $(crontab_OBJECTS) $(crontab_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cron.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crontab.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/do_command.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pw_dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-sbinPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-sbinPROGRAMS + + +# This header contains all the paths. +# If they are configurable, they are declared in configure script. +# Depends on this Makefile, because it uses make variables. +# CCD 2010/09/10 added CRON_HOSTNAME for clustered-cron. +cron-paths.h: Makefile + @echo 'creating $@' + @sed >$@ 's/ *\\$$//' <<\END #\ + /* This file has been automatically generated. Do not edit. */ \ + \ + #ifndef _CRON_PATHS_H_ \ + #define _CRON_PATHS_H_ \ + \ + /* SPOOLDIR is where the crontabs live. \ + * This directory will have its modtime updated \ + * whenever crontab(1) changes a crontab; this is \ + * the signal for cron(8) to look at each individual \ + * crontab file and reload those whose modtimes are \ + * newer than they were last time around (or which \ + * didn't exist last time around...) \ + * or it will be checked by inotify \ + */ \ + #define SPOOL_DIR "$(SPOOL_DIR)" \ + \ + /* CRON_HOSTNAME is file in SPOOL_DIR which, if it \ + * exists, and does not just contain a line matching \ + * the name returned by gethostname(), causes all \ + * crontabs in SPOOL_DIR to be ignored. This is \ + * intended to be used when clustering hosts sharing \ + * one NFS-mounted SPOOL_DIR, and where only one host \ + * should use the crontab files here at any one time. \ + */ \ + #define CRON_HOSTNAME ".cron.hostname" \ + \ + /* cron allow/deny file. At least cron.deny must \ + * exist for ordinary users to run crontab. \ + */ \ + #define CRON_ALLOW "$(sysconfdir)/cron.allow" \ + #define CRON_DENY "$(sysconfdir)/cron.deny" \ + \ + /* 4.3BSD-style crontab f.e. /etc/crontab */ \ + #define SYSCRONTAB "$(SYSCRONTAB)" \ + \ + /* system crontab dir f.e. /etc/cron.d/ */ \ + #define SYS_CROND_DIR "$(SYS_CROND_DIR)" \ + \ + #define SYSCONFDIR "$(sysconfdir)" \ + \ + #endif /* _CRON_PATHS_H_ */ \ + END + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cronie-1.4.6/src/bitstring.h b/cronie-1.4.6/src/bitstring.h new file mode 100644 index 0000000..43bd843 --- /dev/null +++ b/cronie-1.4.6/src/bitstring.h @@ -0,0 +1,141 @@ +/* $NetBSD: bitstring.h,v 1.3 2003/08/07 11:17:08 agc Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ + +#ifndef _BITSTRING_H_ +#define _BITSTRING_H_ + +typedef unsigned char bitstr_t; + +/* internal macros */ + /* byte of the bitstring bit is in */ +#define _bit_byte(bit) \ + ((bit) >> 3) + + /* mask for the bit within its byte */ +#define _bit_mask(bit) \ + (1 << ((bit)&0x7)) + +/* external macros */ + /* bytes in a bitstring of nbits bits */ +#define bitstr_size(nbits) \ + ((((nbits) - 1) >> 3) + 1) + + /* allocate a bitstring */ +#define bit_alloc(nbits) \ + (bitstr_t *)calloc(1, \ + (unsigned int)bitstr_size(nbits) * sizeof(bitstr_t)) + + /* allocate a bitstring on the stack */ +#define bit_decl(name, nbits) \ + (name)[bitstr_size(nbits)] + + /* is bit N of bitstring name set? */ +#define bit_test(name, bit) \ + ((name)[_bit_byte(bit)] & _bit_mask(bit)) + + /* set bit N of bitstring name */ +#define bit_set(name, bit) \ + (name)[_bit_byte(bit)] |= _bit_mask(bit) + + /* clear bit N of bitstring name */ +#define bit_clear(name, bit) \ + (name)[_bit_byte(bit)] &= ~_bit_mask(bit) + + /* clear bits start ... stop in bitstring */ +#define bit_nclear(name, start, stop) { \ + register bitstr_t *_name = name; \ + register int _start = start, _stop = stop; \ + register int _startbyte = _bit_byte(_start); \ + register int _stopbyte = _bit_byte(_stop); \ + if (_startbyte == _stopbyte) { \ + _name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \ + (0xff << ((_stop&0x7) + 1))); \ + } else { \ + _name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \ + while (++_startbyte < _stopbyte) \ + _name[_startbyte] = 0; \ + _name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \ + } \ +} + + /* set bits start ... stop in bitstring */ +#define bit_nset(name, start, stop) { \ + register bitstr_t *_name = name; \ + register int _start = start, _stop = stop; \ + register int _startbyte = _bit_byte(_start); \ + register int _stopbyte = _bit_byte(_stop); \ + if (_startbyte == _stopbyte) { \ + _name[_startbyte] |= ((0xff << (_start&0x7)) & \ + (0xff >> (7 - (_stop&0x7)))); \ + } else { \ + _name[_startbyte] |= 0xff << ((_start)&0x7); \ + while (++_startbyte < _stopbyte) \ + _name[_startbyte] = 0xff; \ + _name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \ + } \ +} + + /* find first bit clear in name */ +#define bit_ffc(name, nbits, value) { \ + register bitstr_t *_name = name; \ + register int _byte, _nbits = nbits; \ + register int _stopbyte = _bit_byte(_nbits), _value = -1; \ + for (_byte = 0; _byte <= _stopbyte; ++_byte) \ + if (_name[_byte] != 0xff) { \ + _value = _byte << 3; \ + for (_stopbyte = _name[_byte]; (_stopbyte&0x1); \ + ++_value, _stopbyte >>= 1); \ + break; \ + } \ + *(value) = _value; \ +} + + /* find first bit set in name */ +#define bit_ffs(name, nbits, value) { \ + register bitstr_t *_name = name; \ + register int _byte, _nbits = nbits; \ + register int _stopbyte = _bit_byte(_nbits), _value = -1; \ + for (_byte = 0; _byte <= _stopbyte; ++_byte) \ + if (_name[_byte]) { \ + _value = _byte << 3; \ + for (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \ + ++_value, _stopbyte >>= 1); \ + break; \ + } \ + *(value) = _value; \ +} + +#endif /* !_BITSTRING_H_ */ diff --git a/cronie-1.4.6/src/cron.c b/cronie-1.4.6/src/cron.c new file mode 100644 index 0000000..9159164 --- /dev/null +++ b/cronie-1.4.6/src/cron.c @@ -0,0 +1,639 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Modified 2010/09/12 by Colin Dean, Durham University IT Service, + * to add clustering support. + */ + +#define MAIN_PROGRAM + +#include + +#if defined WITH_INOTIFY +int inotify_enabled; +#else +# define inotify_enabled 0 +#endif + +enum timejump { negative, small, medium, large }; + +static void usage(void), +run_reboot_jobs(cron_db *), +find_jobs(int, cron_db *, int, int), +set_time(int), +cron_sleep(int, cron_db *), +sigchld_handler(int), +sighup_handler(int), +sigchld_reaper(void), quit(int), parse_args(int c, char *v[]); + +static volatile sig_atomic_t got_sighup, got_sigchld; +static int timeRunning, virtualTime, clockTime; +static long GMToff; +static int DisableInotify; + +#if defined WITH_INOTIFY + +/* + * Note that inotify isn't safe to use with clustering, as changes made + * to a shared filesystem on one system cannot be relied on to be notified + * on another system, so use of inotify is disabled at runtime if run with + * clustering enabled. + */ + +# define NUM_WATCHES 3 + +int wd[NUM_WATCHES]; +const char *watchpaths[NUM_WATCHES] = {SPOOL_DIR, SYS_CROND_DIR, SYSCRONTAB}; + +void set_cron_unwatched(int fd) { + int i; + + for (i = 0; i < sizeof (wd) / sizeof (wd[0]); ++i) { + if (wd[i] < 0) { + inotify_rm_watch(fd, wd[i]); + wd[i] = -1; + } + } +} + +void set_cron_watched(int fd) { + pid_t pid = getpid(); + int i; + + if (fd < 0) { + inotify_enabled = 0; + return; + } + + for (i = 0; i < sizeof (wd) / sizeof (wd[0]); ++i) { + int w; + + w = inotify_add_watch(fd, watchpaths[i], + IN_CREATE | IN_CLOSE_WRITE | IN_ATTRIB | IN_MODIFY | IN_MOVED_TO | + IN_MOVED_FROM | IN_MOVE_SELF | IN_DELETE | IN_DELETE_SELF); + if (w < 0) { + if (wd[i] != -1) { + log_it("CRON", pid, "This directory or file can't be watched", + watchpaths[i], errno); + log_it("CRON", pid, "INFO", "running without inotify support", + 0); + } + inotify_enabled = 0; + set_cron_unwatched(fd); + return; + } + wd[i] = w; + } + + if (!inotify_enabled) { + log_it("CRON", pid, "INFO", "running with inotify support", 0); + } + + inotify_enabled = 1; +} +#endif + +static void handle_signals(cron_db * database) { + if (got_sighup) { + got_sighup = 0; +#if defined WITH_INOTIFY + /* watches must be reinstated on reload */ + if (inotify_enabled && (EnableClustering != 1)) { + set_cron_unwatched(database->ifd); + inotify_enabled = 0; + } +#endif + database->mtime = (time_t) 0; + log_close(); + } + + if (got_sigchld) { + got_sigchld = 0; + sigchld_reaper(); + } +} + +static void usage(void) { + const char **dflags; + + fprintf(stderr, "usage: %s [-h] print this message \n \ + [-i] deamon runs without inotify support \n \ + [-m ] off or specify prefered client for sending mails \n \ + [-n] run in foreground \n \ + [-p] permit any crontab \n \ + [-c] enable clustering support \n \ + [-s] log into syslog instead of sending mails \n \ + [-x [", + ProgramName); + for (dflags = DebugFlagNames; *dflags; dflags++) + fprintf(stderr, "%s%s", *dflags, dflags[1] ? "," : "]"); + fprintf(stderr, "] print debug information\n"); + exit(ERROR_EXIT); +} + +int main(int argc, char *argv[]) { + struct sigaction sact; + cron_db database; + int fd; + char *cs; + pid_t pid = getpid(); +#if defined WITH_INOTIFY + int i; +#endif + + ProgramName = argv[0]; + MailCmd[0] = '\0'; + cron_default_mail_charset[0] = '\0'; + + setlocale(LC_ALL, ""); + +#if defined(BSD) + setlinebuf(stdout); + setlinebuf(stderr); +#endif + + SyslogOutput = 0; + NoFork = 0; + parse_args(argc, argv); + + bzero((char *) &sact, sizeof sact); + sigemptyset(&sact.sa_mask); + sact.sa_flags = 0; +#ifdef SA_RESTART + sact.sa_flags |= SA_RESTART; +#endif + sact.sa_handler = sigchld_handler; + (void) sigaction(SIGCHLD, &sact, NULL); + sact.sa_handler = sighup_handler; + (void) sigaction(SIGHUP, &sact, NULL); + sact.sa_handler = quit; + (void) sigaction(SIGINT, &sact, NULL); + (void) sigaction(SIGTERM, &sact, NULL); + + acquire_daemonlock(0); + set_cron_uid(); + set_cron_cwd(); + + if (putenv("PATH=" _PATH_DEFPATH) < 0) { + log_it("CRON", pid, "DEATH", "can't putenv PATH", errno); + exit(1); + } + + /* Get the default locale character set for the mail + * "Content-Type: ...; charset=" header + */ + setlocale(LC_ALL, ""); /* set locale to system defaults or to + * that specified by any LC_* env vars */ + if ((cs = nl_langinfo(CODESET)) != 0L) + strncpy(cron_default_mail_charset, cs, MAX_ENVSTR); + else + strcpy(cron_default_mail_charset, "US-ASCII"); + + /* if there are no debug flags turned on, fork as a daemon should. + */ + if (DebugFlags) { +#if DEBUGGING + (void) fprintf(stderr, "[%ld] cron started\n", (long) getpid()); +#endif + } + else if (NoFork == 0) { + switch (fork()) { + case -1: + log_it("CRON", pid, "DEATH", "can't fork", errno); + exit(0); + break; + case 0: + /* child process */ + (void) setsid(); + if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) >= 0) { + (void) dup2(fd, STDIN); + (void) dup2(fd, STDOUT); + (void) dup2(fd, STDERR); + if (fd != STDERR) + (void) close(fd); + } + log_it("CRON", getpid(), "STARTUP", PACKAGE_VERSION, 0); + break; + default: + /* parent process should just die */ + _exit(0); + } + } + + if (access("/usr/sbin/sendmail", X_OK) != 0) { + SyslogOutput=1; + log_it("CRON", pid, "INFO","Syslog will be used instead of sendmail.", errno); + } + + pid = getpid(); + acquire_daemonlock(0); + database.head = NULL; + database.tail = NULL; + database.mtime = (time_t) 0; + + load_database(&database); + + fd = -1; +#if defined WITH_INOTIFY + if (DisableInotify || EnableClustering) { + log_it("CRON", getpid(), "No inotify - daemon runs with -i or -c option", + "", 0); + } + else { + for (i = 0; i < sizeof (wd) / sizeof (wd[0]); ++i) { + /* initialize to negative number other than -1 + * so an eventual error is reported for the first time + */ + wd[i] = -2; + } + + database.ifd = fd = inotify_init(); + fcntl(fd, F_SETFD, FD_CLOEXEC); + if (fd < 0) + log_it("CRON", pid, "INFO", "Inotify init failed", errno); + set_cron_watched(fd); + } +#endif + + set_time(TRUE); + run_reboot_jobs(&database); + timeRunning = virtualTime = clockTime; + + /* + * Too many clocks, not enough time (Al. Einstein) + * These clocks are in minutes since the epoch, adjusted for timezone. + * virtualTime: is the time it *would* be if we woke up + * promptly and nobody ever changed the clock. It is + * monotonically increasing... unless a timejump happens. + * At the top of the loop, all jobs for 'virtualTime' have run. + * timeRunning: is the time we last awakened. + * clockTime: is the time when set_time was last called. + */ + while (TRUE) { + int timeDiff; + enum timejump wakeupKind; + + /* ... wait for the time (in minutes) to change ... */ + do { + cron_sleep(timeRunning + 1, &database); + set_time(FALSE); + } while (clockTime == timeRunning); + timeRunning = clockTime; + + /* + * Calculate how the current time differs from our virtual + * clock. Classify the change into one of 4 cases. + */ + timeDiff = timeRunning - virtualTime; +#if defined WITH_INOTIFY + if (inotify_enabled) { + check_inotify_database(&database); + } + else { + if (load_database(&database) && (EnableClustering != 1)) + /* try reinstating the watches */ + set_cron_watched(fd); + } +#else + load_database(&database); +#endif + + /* shortcut for the most common case */ + if (timeDiff == 1) { + virtualTime = timeRunning; + find_jobs(virtualTime, &database, TRUE, TRUE); + } + else { + if (timeDiff > (3 * MINUTE_COUNT) || timeDiff < -(3 * MINUTE_COUNT)) + wakeupKind = large; + else if (timeDiff > 5) + wakeupKind = medium; + else if (timeDiff > 0) + wakeupKind = small; + else + wakeupKind = negative; + + switch (wakeupKind) { + case small: + /* + * case 1: timeDiff is a small positive number + * (wokeup late) run jobs for each virtual + * minute until caught up. + */ + Debug(DSCH, ("[%ld], normal case %d minutes to go\n", + (long) pid, timeDiff)) + do { + if (job_runqueue()) + sleep(10); + virtualTime++; + find_jobs(virtualTime, &database, TRUE, TRUE); + } while (virtualTime < timeRunning); + break; + + case medium: + /* + * case 2: timeDiff is a medium-sized positive + * number, for example because we went to DST + * run wildcard jobs once, then run any + * fixed-time jobs that would otherwise be + * skipped if we use up our minute (possible, + * if there are a lot of jobs to run) go + * around the loop again so that wildcard jobs + * have a chance to run, and we do our + * housekeeping. + */ + Debug(DSCH, ("[%ld], DST begins %d minutes to go\n", + (long) pid, timeDiff)) + /* run wildcard jobs for current minute */ + find_jobs(timeRunning, &database, TRUE, FALSE); + + /* run fixed-time jobs for each minute missed */ + do { + if (job_runqueue()) + sleep(10); + virtualTime++; + find_jobs(virtualTime, &database, FALSE, TRUE); + set_time(FALSE); + } while (virtualTime < timeRunning && clockTime == timeRunning); + break; + + case negative: + /* + * case 3: timeDiff is a small or medium-sized + * negative num, eg. because of DST ending. + * Just run the wildcard jobs. The fixed-time + * jobs probably have already run, and should + * not be repeated. Virtual time does not + * change until we are caught up. + */ + Debug(DSCH, ("[%ld], DST ends %d minutes to go\n", + (long) pid, timeDiff)) + find_jobs(timeRunning, &database, TRUE, FALSE); + break; + default: + /* + * other: time has changed a *lot*, + * jump virtual time, and run everything + */ + Debug(DSCH, ("[%ld], clock jumped\n", (long) pid)) + virtualTime = timeRunning; + find_jobs(timeRunning, &database, TRUE, TRUE); + } + } + + /* Jobs to be run (if any) are loaded; clear the queue. */ + job_runqueue(); + + handle_signals(&database); + } + +#if defined WITH_INOTIFY + if (inotify_enabled && (EnableClustering != 1)) + set_cron_unwatched(fd); + + if (fd >= 0 && close(fd) < 0) + log_it("CRON", pid, "INFO", "Inotify close failed", errno); +#endif +} + +static void run_reboot_jobs(cron_db * db) { + user *u; + entry *e; + int reboot; + pid_t pid = getpid(); + + /* lock exist - skip reboot jobs */ + if (access(REBOOT_LOCK, F_OK) == 0) { + log_it("CRON", pid, "INFO", + "@reboot jobs will be run at computer's startup.", 0); + return; + } + /* lock doesn't exist - create lock, run reboot jobs */ + if ((reboot = creat(REBOOT_LOCK, S_IRUSR & S_IWUSR)) < 0) + log_it("CRON", pid, "INFO", "Can't create lock for reboot jobs.", + errno); + else + close(reboot); + + for (u = db->head; u != NULL; u = u->next) { + for (e = u->crontab; e != NULL; e = e->next) { + if (e->flags & WHEN_REBOOT) + job_add(e, u); + } + } + (void) job_runqueue(); +} + +static void find_jobs(int vtime, cron_db * db, int doWild, int doNonWild) { + char *orig_tz, *job_tz; + time_t virtualSecond = vtime * SECONDS_PER_MINUTE; + struct tm *tm = gmtime(&virtualSecond); + int minute, hour, dom, month, dow; + user *u; + entry *e; + const char *uname; + struct passwd *pw = NULL; + + /* make 0-based values out of these so we can use them as indicies + */ +#define maketime(tz1, tz2) do { \ + char *t = tz1; \ + if (t != NULL && *t != '\0') \ + setenv("TZ", t, 1); \ + else if ((tz2) != NULL) \ + setenv("TZ", (tz2), 1); \ + else \ + unsetenv("TZ"); \ + tm = localtime(&StartTime); \ + minute = tm->tm_min -FIRST_MINUTE; \ + hour = tm->tm_hour -FIRST_HOUR; \ + dom = tm->tm_mday -FIRST_DOM; \ + month = tm->tm_mon +1 /* 0..11 -> 1..12 */ -FIRST_MONTH; \ + dow = tm->tm_wday -FIRST_DOW; \ + } while (0) + + orig_tz = getenv("TZ"); + maketime(NULL, orig_tz); + + Debug(DSCH, ("[%ld] tick(%d,%d,%d,%d,%d) %s %s\n", + (long) getpid(), minute, hour, dom, month, dow, + doWild ? " " : "No wildcard", doNonWild ? " " : "Wildcard only")) + /* the dom/dow situation is odd. '* * 1,15 * Sun' will run on the + * first and fifteenth AND every Sunday; '* * * * Sun' will run *only* + * on Sundays; '* * 1,15 * *' will run *only* the 1st and 15th. this + * is why we keep 'e->dow_star' and 'e->dom_star'. yes, it's bizarre. + * like many bizarre things, it's the standard. + */ + for (u = db->head; u != NULL; u = u->next) { + for (e = u->crontab; e != NULL; e = e->next) { + Debug(DSCH | DEXT, ("user [%s:%ld:%ld:...] cmd=\"%s\"\n", + e->pwd->pw_name, (long) e->pwd->pw_uid, + (long) e->pwd->pw_gid, e->cmd)) + uname = e->pwd->pw_name; + /* check if user exists in time of job is being run f.e. ldap */ + if ((pw = getpwnam(uname)) != NULL) { + job_tz = env_get("CRON_TZ", e->envp); + maketime(job_tz, orig_tz); + /* here we test whether time is NOW */ + if (bit_test(e->minute, minute) && + bit_test(e->hour, hour) && + bit_test(e->month, month) && + (((e->flags & DOM_STAR) || (e->flags & DOW_STAR)) + ? (bit_test(e->dow, dow) && bit_test(e->dom, dom)) + : (bit_test(e->dow, dow) || bit_test(e->dom, dom)) + ) + ) { + if ((doNonWild && + !(e->flags & (MIN_STAR | HR_STAR))) || + (doWild && (e->flags & (MIN_STAR | HR_STAR)))) + job_add(e, u); /*will add job, if it isn't in queue already for NOW. */ + } + } + } + } + if (orig_tz != NULL) + setenv("TZ", orig_tz, 1); + else + unsetenv("TZ"); +} + +/* + * Set StartTime and clockTime to the current time. + * These are used for computing what time it really is right now. + * Note that clockTime is a unix wallclock time converted to minutes. + */ +static void set_time(int initialize) { + struct tm tm; + static int isdst; + + StartTime = time(NULL); + + /* We adjust the time to GMT so we can catch DST changes. */ + tm = *localtime(&StartTime); + if (initialize || tm.tm_isdst != isdst) { + isdst = tm.tm_isdst; + GMToff = get_gmtoff(&StartTime, &tm); + Debug(DSCH, ("[%ld] GMToff=%ld\n", (long) getpid(), (long) GMToff)) + } + clockTime = (StartTime + GMToff) / (time_t) SECONDS_PER_MINUTE; +} + +/* + * Try to just hit the next minute. + */ +static void cron_sleep(int target, cron_db * db) { + time_t t1, t2; + int seconds_to_wait; + + t1 = time(NULL) + GMToff; + seconds_to_wait = (int) (target * SECONDS_PER_MINUTE - t1) + 1; + Debug(DSCH, ("[%ld] Target time=%ld, sec-to-wait=%d\n", + (long) getpid(), (long) target * SECONDS_PER_MINUTE, + seconds_to_wait)) + + while (seconds_to_wait > 0 && seconds_to_wait < 65) { + sleep((unsigned int) seconds_to_wait); + + /* + * Check to see if we were interrupted by a signal. + * If so, service the signal(s) then continue sleeping + * where we left off. + */ + handle_signals(db); + + t2 = time(NULL) + GMToff; + seconds_to_wait -= (int) (t2 - t1); + t1 = t2; + } +} + +static void sighup_handler(int x) { + got_sighup = 1; +} + +static void sigchld_handler(int x) { + got_sigchld = 1; +} + +static void quit(int x) { + (void) unlink(_PATH_CRON_PID); + _exit(0); +} + +static void sigchld_reaper(void) { + WAIT_T waiter; + PID_T pid; + + do { + pid = waitpid(-1, &waiter, WNOHANG); + switch (pid) { + case -1: + if (errno == EINTR) + continue; + Debug(DPROC, ("[%ld] sigchld...no children\n", (long) getpid())) + break; + case 0: + Debug(DPROC, ("[%ld] sigchld...no dead kids\n", (long) getpid())) + break; + default: + Debug(DPROC, + ("[%ld] sigchld...pid #%ld died, stat=%d\n", + (long) getpid(), (long) pid, WEXITSTATUS(waiter))) + break; + } + } while (pid > 0); +} + +static void parse_args(int argc, char *argv[]) { + int argch; + + while (-1 != (argch = getopt(argc, argv, "hnpsix:m:c"))) { + switch (argch) { + case 'x': + if (!set_debug_flags(optarg)) + usage(); + break; + case 'n': + NoFork = 1; + break; + case 'p': + PermitAnyCrontab = 1; + break; + case 's': + SyslogOutput = 1; + break; + case 'i': + DisableInotify = 1; + break; + case 'm': + strncpy(MailCmd, optarg, MAX_COMMAND); + break; + case 'c': + EnableClustering = 1; + break; + case 'h': + default: + usage(); + break; + } + } +} diff --git a/cronie-1.4.6/src/cron.h b/cronie-1.4.6/src/cron.h new file mode 100644 index 0000000..dff8fc1 --- /dev/null +++ b/cronie-1.4.6/src/cron.h @@ -0,0 +1,51 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* cron.h - header for vixie's cron + * + * $Id: cron.h,v 1.6 2004/01/23 18:56:42 vixie Exp $ + * + * vix 14nov88 [rest of log is in RCS] + * vix 14jan87 [0 or 7 can be sunday; thanks, mwm@berkeley] + * vix 30dec86 [written] + */ + +#include "../config.h" +#include "externs.h" + +#ifdef WITH_SELINUX +#include +#endif + +#ifdef WITH_PAM +#include +#endif + +#ifdef WITH_INOTIFY +#include +#endif + +#include "pathnames.h" +#include "macros.h" +#include "structs.h" +#include "funcs.h" +#include "globals.h" + diff --git a/cronie-1.4.6/src/crontab.c b/cronie-1.4.6/src/crontab.c new file mode 100644 index 0000000..d903407 --- /dev/null +++ b/cronie-1.4.6/src/crontab.c @@ -0,0 +1,969 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* crontab - install and manage per-user crontab files + * vix 02may87 [RCS has the rest of the log] + * vix 26jan87 [original] + */ + +/* + * Modified 2010/09/10 by Colin Dean, Durham University IT Service, + * to add clustering support. + */ + +#define MAIN_PROGRAM + +#include +#ifdef WITH_SELINUX +# include +# include +# include +#endif + +#define NHEADER_LINES 0 + +enum opt_t {opt_unknown, opt_list, opt_delete, opt_edit, opt_replace, opt_hostset, opt_hostget}; + +#if DEBUGGING +static char *Options[] = {"???", "list", "delete", "edit", "replace", "hostset", "hostget"}; + +# ifdef WITH_SELINUX +static char *getoptargs = "u:lerisncx:"; +# else +static char *getoptargs = "u:lerincx:"; +# endif +#else +# ifdef WITH_SELINUX +static char *getoptargs = "u:lerisnc"; +# else +static char *getoptargs = "u:lerinc"; +# endif +#endif +static char *selinux_context = 0; + +static PID_T Pid; +static char User[MAX_UNAME], RealUser[MAX_UNAME]; +static char Filename[MAX_FNAME], TempFilename[MAX_FNAME]; +static char Host[MAXHOSTNAMELEN]; +static FILE *NewCrontab; +static int CheckErrorCount; +static int PromptOnDelete; +static int HostSpecified; +static enum opt_t Option; +static struct passwd *pw; +static void list_cmd(void), +delete_cmd(void), +edit_cmd(void), +poke_daemon(void), +check_error(const char *), parse_args(int c, char *v[]), die(int); +static int replace_cmd(void), hostset_cmd(void), hostget_cmd(void); +static char *host_specific_filename(char *filename, int prefix); +static char *tmp_path(void); + +static void usage(const char *msg) { + fprintf(stderr, "%s: usage error: %s\n", ProgramName, msg); + fprintf(stderr, "usage:\t%s [-u user] file\n", ProgramName); + fprintf(stderr, "\t%s [-u user] [ -e | -l | -r ]\n", ProgramName); + fprintf(stderr, "\t%s -n [ hostname ]\n", ProgramName); + fprintf(stderr, "\t%s -c\n", ProgramName); + fprintf(stderr, "\t\t(default operation is replace, per 1003.2)\n"); + fprintf(stderr, "\t-e\t(edit user's crontab)\n"); + fprintf(stderr, "\t-l\t(list user's crontab)\n"); + fprintf(stderr, "\t-r\t(delete user's crontab)\n"); + fprintf(stderr, "\t-i\t(prompt before deleting user's crontab)\n"); + fprintf(stderr, "\t-n\t(set host in cluster to run users' crontabs)\n"); + fprintf(stderr, "\t-c\t(get host in cluster to run users' crontabs)\n"); +#ifdef WITH_SELINUX + fprintf(stderr, "\t-s\t(selinux context)\n"); +#endif + exit(ERROR_EXIT); +} + +int main(int argc, char *argv[]) { + int exitstatus; + + Pid = getpid(); + ProgramName = argv[0]; + MailCmd[0] = '\0'; + cron_default_mail_charset[0] = '\0'; + + setlocale(LC_ALL, ""); + +#if defined(BSD) + setlinebuf(stderr); +#endif + char *n = "-"; /*set the n string to - so we have a valid string to use */ + /*should we desire to make changes to behavior later. */ + if (argv[1] == NULL) { /* change behavior to allow crontab to take stdin with no '-' */ + argv[1] = n; + } + parse_args(argc, argv); /* sets many globals, opens a file */ + set_cron_cwd(); + if (!allowed(RealUser, CRON_ALLOW, CRON_DENY)) { + fprintf(stderr, + "You (%s) are not allowed to use this program (%s)\n", + User, ProgramName); + fprintf(stderr, "See crontab(1) for more information\n"); + log_it(RealUser, Pid, "AUTH", "crontab command not allowed", 0); + exit(ERROR_EXIT); + } + +#if defined(WITH_PAM) + if (cron_start_pam(pw) != PAM_SUCCESS) { + fprintf(stderr, + "You (%s) are not allowed to access to (%s) because of pam configuration.\n", + User, ProgramName); + exit(ERROR_EXIT); + }; +#endif + + exitstatus = OK_EXIT; + switch (Option) { + case opt_unknown: + exitstatus = ERROR_EXIT; + break; + case opt_list: + list_cmd(); + break; + case opt_delete: + delete_cmd(); + break; + case opt_edit: + edit_cmd(); + break; + case opt_replace: + if (replace_cmd() < 0) + exitstatus = ERROR_EXIT; + break; + case opt_hostset: + if (hostset_cmd() < 0) + exitstatus = ERROR_EXIT; + break; + case opt_hostget: + if (hostget_cmd() < 0) + exitstatus = ERROR_EXIT; + break; + default: + abort(); + } + cron_close_pam(); + exit(exitstatus); + /*NOTREACHED*/} + +static void parse_args(int argc, char *argv[]) { + int argch; + + if (!(pw = getpwuid(getuid()))) { + fprintf(stderr, "%s: your UID isn't in the passwd file.\n", + ProgramName); + fprintf(stderr, "bailing out.\n"); + exit(ERROR_EXIT); + } + if (strlen(pw->pw_name) >= sizeof User) { + fprintf(stderr, "username too long\n"); + exit(ERROR_EXIT); + } + strcpy(User, pw->pw_name); + strcpy(RealUser, User); + Filename[0] = '\0'; + Option = opt_unknown; + PromptOnDelete = 0; + HostSpecified = 0; + while (-1 != (argch = getopt(argc, argv, getoptargs))) { + switch (argch) { +#if DEBUGGING + case 'x': + if (!set_debug_flags(optarg)) + usage("bad debug option"); + break; +#endif + case 'u': + if (MY_UID(pw) != ROOT_UID) { + fprintf(stderr, "must be privileged to use -u\n"); + exit(ERROR_EXIT); + } + + if (crontab_security_access() != 0) { + fprintf(stderr, + "Access denied by SELinux, must be privileged to use -u\n"); + exit(ERROR_EXIT); + } + + if (Option == opt_hostset || Option == opt_hostget) { + fprintf(stderr, + "cannot use -u with -n or -c\n"); + exit(ERROR_EXIT); + } + + if (!(pw = getpwnam(optarg))) { + fprintf(stderr, "%s: user `%s' unknown\n", + ProgramName, optarg); + exit(ERROR_EXIT); + } + if (strlen(optarg) >= sizeof User) + usage("username too long"); + (void) strcpy(User, optarg); + break; + case 'l': + if (Option != opt_unknown) + usage("only one operation permitted"); + Option = opt_list; + break; + case 'r': + if (Option != opt_unknown) + usage("only one operation permitted"); + Option = opt_delete; + break; + case 'e': + if (Option != opt_unknown) + usage("only one operation permitted"); + Option = opt_edit; + break; + case 'i': + PromptOnDelete = 1; + break; +#ifdef WITH_SELINUX + case 's': + if (getprevcon((security_context_t *) & (selinux_context))) { + fprintf(stderr, "Cannot obtain SELinux process context\n"); + exit(ERROR_EXIT); + } + break; +#endif + case 'n': + if (MY_UID(pw) != ROOT_UID) { + fprintf(stderr, + "must be privileged to set host with -n\n"); + exit(ERROR_EXIT); + } + if (Option != opt_unknown) + usage("only one operation permitted"); + if (strcmp(User, RealUser) != 0) { + fprintf(stderr, + "cannot use -u with -n or -c\n"); + exit(ERROR_EXIT); + } + Option = opt_hostset; + break; + case 'c': + if (Option != opt_unknown) + usage("only one operation permitted"); + if (strcmp(User, RealUser) != 0) { + fprintf(stderr, + "cannot use -u with -n or -c\n"); + exit(ERROR_EXIT); + } + Option = opt_hostget; + break; + default: + usage("unrecognized option"); + } + } + + endpwent(); + + if (Option == opt_hostset && argv[optind] != NULL) { + HostSpecified = 1; + if (strlen(argv[optind]) >= sizeof Host) + usage("hostname too long"); + (void) strcpy(Host, argv[optind]); + optind++; + } + + if (Option != opt_unknown) { + if (argv[optind] != NULL) + usage("no arguments permitted after this option"); + } + else { + if (argv[optind] != NULL) { + Option = opt_replace; + if (strlen(argv[optind]) >= sizeof Filename) + usage("filename too long"); + (void) strcpy(Filename, argv[optind]); + } + else + usage("file name must be specified for replace"); + } + + if (Option == opt_replace) { + /* we have to open the file here because we're going to + * chdir(2) into /var/cron before we get around to + * reading the file. + */ + if (!strcmp(Filename, "-")) + NewCrontab = stdin; + else { + /* relinquish the setuid status of the binary during + * the open, lest nonroot users read files they should + * not be able to read. we can't use access() here + * since there's a race condition. thanks go out to + * Arnt Gulbrandsen for spotting + * the race. + */ + + if (swap_uids() < OK) { + perror("swapping uids"); + exit(ERROR_EXIT); + } + if (!(NewCrontab = fopen(Filename, "r"))) { + perror(Filename); + exit(ERROR_EXIT); + } + if (swap_uids_back() < OK) { + perror("swapping uids back"); + exit(ERROR_EXIT); + } + } + } + + Debug(DMISC, ("user=%s, file=%s, option=%s\n", + User, Filename, Options[(int) Option])) +} + +static void list_cmd(void) { + char n[MAX_FNAME]; + FILE *f; + int ch; + + log_it(RealUser, Pid, "LIST", User, 0); + if (!glue_strings(n, sizeof n, SPOOL_DIR, User, '/')) { + fprintf(stderr, "path too long\n"); + exit(ERROR_EXIT); + } + if (!(f = fopen(n, "r"))) { + if (errno == ENOENT) + fprintf(stderr, "no crontab for %s\n", User); + else + perror(n); + exit(ERROR_EXIT); + } + + /* file is open. copy to stdout, close. + */ + Set_LineNum(1) + while (EOF != (ch = get_char(f))) + putchar(ch); + fclose(f); +} + +static void delete_cmd(void) { + char n[MAX_FNAME] = ""; + if (PromptOnDelete == 1) { + printf("crontab: really delete %s's crontab? ", User); + fflush(stdout); + if ((fgets(n, MAX_FNAME - 1, stdin) == 0L) + || ((n[0] != 'Y') && (n[0] != 'y')) + ) + exit(0); + } + + log_it(RealUser, Pid, "DELETE", User, 0); + if (!glue_strings(n, sizeof n, SPOOL_DIR, User, '/')) { + fprintf(stderr, "path too long\n"); + exit(ERROR_EXIT); + } + if (unlink(n) != 0) { + if (errno == ENOENT) + fprintf(stderr, "no crontab for %s\n", User); + else + perror(n); + exit(ERROR_EXIT); + } + poke_daemon(); +} + +static void check_error(const char *msg) { + CheckErrorCount++; + fprintf(stderr, "\"%s\":%d: %s\n", Filename, LineNumber - 1, msg); +} + +static char *tmp_path() { + char *tmpdir = NULL; + + if ((getuid() == geteuid()) && (getgid() == getegid())) { + tmpdir = getenv("TMPDIR"); + } + return tmpdir ? tmpdir : "/tmp"; +} + +static char *host_specific_filename(char *filename, int prefix) +{ + /* + * For cluster-wide use, where there is otherwise risk of the same + * name being generated on more than one host at once, prefix with + * "hostname." or suffix with ".hostname" as requested, and return + * static buffer or NULL on failure. + */ + + static char safename[MAX_FNAME]; + char hostname[MAXHOSTNAMELEN]; + + if (gethostname(hostname, sizeof hostname) != 0) + return NULL; + + if (prefix) { + if (!glue_strings(safename, sizeof safename, hostname, filename, '.')) + return NULL; + } else { + if (!glue_strings(safename, sizeof safename, filename, hostname, '.')) + return NULL; + } + + return safename; +} + +static void edit_cmd(void) { + char n[MAX_FNAME], q[MAX_TEMPSTR], *editor; + FILE *f; + int ch = '\0', t; + struct stat statbuf; + struct utimbuf utimebuf; + WAIT_T waiter; + PID_T pid, xpid; + + log_it(RealUser, Pid, "BEGIN EDIT", User, 0); + if (!glue_strings(n, sizeof n, SPOOL_DIR, User, '/')) { + fprintf(stderr, "path too long\n"); + exit(ERROR_EXIT); + } + if (!(f = fopen(n, "r"))) { + if (errno != ENOENT) { + perror(n); + exit(ERROR_EXIT); + } + fprintf(stderr, "no crontab for %s - using an empty one\n", User); + if (!(f = fopen(_PATH_DEVNULL, "r"))) { + perror(_PATH_DEVNULL); + exit(ERROR_EXIT); + } + } + + /* Turn off signals. */ + (void) signal(SIGHUP, SIG_IGN); + (void) signal(SIGINT, SIG_IGN); + (void) signal(SIGQUIT, SIG_IGN); + + if (!glue_strings(Filename, sizeof Filename, tmp_path(), + "crontab.XXXXXXXXXX", '/')) { + fprintf(stderr, "path too long\n"); + exit(ERROR_EXIT); + } + if (swap_uids() == -1) { + perror("swapping uids"); + exit(ERROR_EXIT); + } + if (-1 == (t = mkstemp(Filename))) { + perror(Filename); + goto fatal; + } + + if (swap_uids_back() == -1) { + perror("swapping uids back"); + goto fatal; + } + if (!(NewCrontab = fdopen(t, "r+"))) { + perror("fdopen"); + goto fatal; + } + + Set_LineNum(1) + /* + * NHEADER_LINES processing removed for clarity + * (NHEADER_LINES == 0 in all Red Hat crontabs) + */ + /* copy the rest of the crontab (if any) to the temp file. + */ + if (EOF != ch) + while (EOF != (ch = get_char(f))) + putc(ch, NewCrontab); + +#ifdef WITH_SELINUX + if (selinux_context) { + context_t ccon = NULL; + const char *level = NULL; + + if (!(ccon = context_new(selinux_context))) { + fprintf(stderr, "context_new failed\n"); + goto fatal; + } + + if (!(level = context_range_get(ccon))) { + fprintf(stderr, "context_range failed\n"); + goto fatal; + } + + fprintf(NewCrontab, "MLS_LEVEL=%s\n", level); + context_free(ccon); + freecon(selinux_context); + selinux_context = NULL; + } +#endif + + fclose(f); + if (fflush(NewCrontab) < OK) { + perror(Filename); + exit(ERROR_EXIT); + } + if (swap_uids() == -1) { + perror("swapping uids"); + exit(ERROR_EXIT); + } + /* Set it to 1970 */ + utimebuf.actime = 0; + utimebuf.modtime = 0; + utime(Filename, &utimebuf); + if (swap_uids_back() == -1) { + perror("swapping uids"); + exit(ERROR_EXIT); + } + again: + rewind(NewCrontab); + if (ferror(NewCrontab)) { + fprintf(stderr, "%s: error while writing new crontab to %s\n", + ProgramName, Filename); + fatal: + unlink(Filename); + exit(ERROR_EXIT); + } + + if (((editor = getenv("VISUAL")) == NULL || *editor == '\0') && + ((editor = getenv("EDITOR")) == NULL || *editor == '\0')) { + editor = EDITOR; + } + + /* we still have the file open. editors will generally rewrite the + * original file rather than renaming/unlinking it and starting a + * new one; even backup files are supposed to be made by copying + * rather than by renaming. if some editor does not support this, + * then don't use it. the security problems are more severe if we + * close and reopen the file around the edit. + */ + + switch (pid = fork()) { + case -1: + perror("fork"); + goto fatal; + case 0: + /* child */ + if (setgid(MY_GID(pw)) < 0) { + perror("setgid(getgid())"); + exit(ERROR_EXIT); + } + if (setuid(MY_UID(pw)) < 0) { + perror("setuid(getuid())"); + exit(ERROR_EXIT); + } + if (!glue_strings(q, sizeof q, editor, Filename, ' ')) { + fprintf(stderr, "%s: editor command line too long\n", ProgramName); + exit(ERROR_EXIT); + } + execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", q, (char *) 0); + perror(editor); + exit(ERROR_EXIT); + /*NOTREACHED*/ default: + /* parent */ + break; + } + + /* parent */ + for (;;) { + xpid = waitpid(pid, &waiter, 0); + if (xpid == -1) { + if (errno != EINTR) + fprintf(stderr, + "%s: waitpid() failed waiting for PID %ld from \"%s\": %s\n", + ProgramName, (long) pid, editor, strerror(errno)); + } + else if (xpid != pid) { + fprintf(stderr, "%s: wrong PID (%ld != %ld) from \"%s\"\n", + ProgramName, (long) xpid, (long) pid, editor); + goto fatal; + } + else if (WIFEXITED(waiter) && WEXITSTATUS(waiter)) { + fprintf(stderr, "%s: \"%s\" exited with status %d\n", + ProgramName, editor, WEXITSTATUS(waiter)); + goto fatal; + } + else if (WIFSIGNALED(waiter)) { + fprintf(stderr, + "%s: \"%s\" killed; signal %d (%score dumped)\n", + ProgramName, editor, WTERMSIG(waiter), + WCOREDUMP(waiter) ? "" : "no "); + goto fatal; + } + else + break; + } + (void) signal(SIGHUP, SIG_DFL); + (void) signal(SIGINT, SIG_DFL); + (void) signal(SIGQUIT, SIG_DFL); + + /* lstat doesn't make any harm, because + * the file is stat'ed only when crontab is touched + */ + if (lstat(Filename, &statbuf) < 0) { + perror("lstat"); + goto fatal; + } + + if (!S_ISREG(statbuf.st_mode)) { + fprintf(stderr, "%s: illegal crontab\n", ProgramName); + goto remove; + } + + if (statbuf.st_mtime == 0) { + fprintf(stderr, "%s: no changes made to crontab\n", ProgramName); + goto remove; + } + + fprintf(stderr, "%s: installing new crontab\n", ProgramName); + fclose(NewCrontab); + if (swap_uids() < OK) { + perror("swapping uids"); + goto remove; + } + if (!(NewCrontab = fopen(Filename, "r+"))) { + perror("cannot read new crontab"); + goto remove; + } + if (swap_uids_back() < OK) { + perror("swapping uids back"); + exit(ERROR_EXIT); + } + if (NewCrontab == 0L) { + perror("fopen"); + goto fatal; + } + switch (replace_cmd()) { + case 0: + break; + case -1: + for (;;) { + printf("Do you want to retry the same edit? "); + fflush(stdout); + q[0] = '\0'; + if (fgets(q, sizeof q, stdin) == 0L) + continue; + switch (q[0]) { + case 'y': + case 'Y': + goto again; + case 'n': + case 'N': + goto abandon; + default: + fprintf(stderr, "Enter Y or N\n"); + } + } + /*NOTREACHED*/ case -2: + abandon: + fprintf(stderr, "%s: edits left in %s\n", ProgramName, Filename); + goto done; + default: + fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n", + ProgramName); + goto fatal; + } + remove: + unlink(Filename); + done: + log_it(RealUser, Pid, "END EDIT", User, 0); +} + +/* returns 0 on success + * -1 on syntax error + * -2 on install error + */ +static int replace_cmd(void) { + char n[MAX_FNAME], envstr[MAX_ENVSTR]; + FILE *tmp; + int ch, eof, fd; + int error = 0; + entry *e; + uid_t file_owner; + char **envp = env_init(); + char *safename; + + if (envp == NULL) { + fprintf(stderr, "%s: Cannot allocate memory.\n", ProgramName); + return (-2); + } + + safename = host_specific_filename("tmp.XXXXXXXXXX", 1); + if (!safename || !glue_strings(TempFilename, sizeof TempFilename, SPOOL_DIR, + safename, '/')) { + TempFilename[0] = '\0'; + fprintf(stderr, "path too long\n"); + return (-2); + } + if ((fd = mkstemp(TempFilename)) == -1 || !(tmp = fdopen(fd, "w+"))) { + perror(TempFilename); + if (fd != -1) { + close(fd); + unlink(TempFilename); + } + TempFilename[0] = '\0'; + return (-2); + } + + (void) signal(SIGHUP, die); + (void) signal(SIGINT, die); + (void) signal(SIGQUIT, die); + + /* write a signature at the top of the file. + * + * VERY IMPORTANT: make sure NHEADER_LINES agrees with this code. + */ + /*fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n"); + *fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now)); + *fprintf(tmp, "# (Cron version %s)\n", CRON_VERSION); + */ +#ifdef WITH_SELINUX + if (selinux_context) + fprintf(tmp, "SELINUX_ROLE_TYPE=%s\n", selinux_context); +#endif + + /* copy the crontab to the tmp + */ + rewind(NewCrontab); + Set_LineNum(1) + while (EOF != (ch = get_char(NewCrontab))) + putc(ch, tmp); + if (ftruncate(fileno(tmp), ftell(tmp)) == -1) { + fprintf(stderr, "%s: error while writing new crontab to %s\n", + ProgramName, TempFilename); + fclose(tmp); + error = -2; + goto done; + } + fflush(tmp); + rewind(tmp); + if (ferror(tmp)) { + fprintf(stderr, "%s: error while writing new crontab to %s\n", + ProgramName, TempFilename); + fclose(tmp); + error = -2; + goto done; + } + + /* check the syntax of the file being installed. + */ + + /* BUG: was reporting errors after the EOF if there were any errors + * in the file proper -- kludged it by stopping after first error. + * vix 31mar87 + */ + Set_LineNum(1 - NHEADER_LINES) + CheckErrorCount = 0; + eof = FALSE; + while (!CheckErrorCount && !eof) { + switch (load_env(envstr, tmp)) { + case ERR: + /* check for data before the EOF */ + if (envstr[0] != '\0') { + Set_LineNum(LineNumber + 1); + check_error("premature EOF"); + } + eof = TRUE; + break; + case FALSE: + e = load_entry(tmp, check_error, pw, envp); + if (e) + free(e); + break; + case TRUE: + break; + } + } + + if (CheckErrorCount != 0) { + fprintf(stderr, "errors in crontab file, can't install.\n"); + fclose(tmp); + error = -1; + goto done; + } + + file_owner = (getgid() == getegid())? ROOT_UID : pw->pw_uid; + +#ifdef HAVE_FCHOWN + if (fchown(fileno(tmp), file_owner, -1) < OK) { + perror("fchown"); + fclose(tmp); + error = -2; + goto done; + } +#else + if (chown(TempFilename, file_owner, -1) < OK) { + perror("chown"); + fclose(tmp); + error = -2; + goto done; + } +#endif + + if (fclose(tmp) == EOF) { + perror("fclose"); + error = -2; + goto done; + } + + if (!glue_strings(n, sizeof n, SPOOL_DIR, User, '/')) { + fprintf(stderr, "path too long\n"); + error = -2; + goto done; + } + if (rename(TempFilename, n)) { + fprintf(stderr, "%s: error renaming %s to %s\n", + ProgramName, TempFilename, n); + perror("rename"); + error = -2; + goto done; + } + TempFilename[0] = '\0'; + log_it(RealUser, Pid, "REPLACE", User, 0); + + poke_daemon(); + + done: + (void) signal(SIGHUP, SIG_DFL); + (void) signal(SIGINT, SIG_DFL); + (void) signal(SIGQUIT, SIG_DFL); + if (TempFilename[0]) { + (void) unlink(TempFilename); + TempFilename[0] = '\0'; + } + return (error); +} + +static int hostset_cmd(void) { + char n[MAX_FNAME]; + FILE *tmp; + int fd; + int error = 0; + char *safename; + + if (!HostSpecified) + gethostname(Host, sizeof Host); + + safename = host_specific_filename("tmp.XXXXXXXXXX", 1); + if (!safename || !glue_strings(TempFilename, sizeof TempFilename, SPOOL_DIR, + safename, '/')) { + TempFilename[0] = '\0'; + fprintf(stderr, "path too long\n"); + return (-2); + } + if ((fd = mkstemp(TempFilename)) == -1 || !(tmp = fdopen(fd, "w"))) { + perror(TempFilename); + if (fd != -1) { + close(fd); + unlink(TempFilename); + } + TempFilename[0] = '\0'; + return (-2); + } + + (void) signal(SIGHUP, die); + (void) signal(SIGINT, die); + (void) signal(SIGQUIT, die); + + (void) fchmod(fd, 0600); /* not all mkstemp() implementations do this */ + + if (fprintf(tmp, "%s\n", Host) < 0 || fclose(tmp) == EOF) { + fprintf(stderr, "%s: error while writing to %s\n", + ProgramName, TempFilename); + error = -2; + goto done; + } + + if (!glue_strings(n, sizeof n, SPOOL_DIR, CRON_HOSTNAME, '/')) { + fprintf(stderr, "path too long\n"); + error = -2; + goto done; + } + + if (rename(TempFilename, n)) { + fprintf(stderr, "%s: error renaming %s to %s\n", + ProgramName, TempFilename, n); + perror("rename"); + error = -2; + goto done; + } + TempFilename[0] = '\0'; + log_it(RealUser, Pid, "SET HOST", Host, 0); + + poke_daemon(); + + done: + (void) signal(SIGHUP, SIG_DFL); + (void) signal(SIGINT, SIG_DFL); + (void) signal(SIGQUIT, SIG_DFL); + if (TempFilename[0]) { + (void) unlink(TempFilename); + TempFilename[0] = '\0'; + } + return (error); +} + +static int hostget_cmd(void) { + char n[MAX_FNAME]; + FILE *f; + + if (!glue_strings(n, sizeof n, SPOOL_DIR, CRON_HOSTNAME, '/')) { + fprintf(stderr, "path too long\n"); + return (-2); + } + + if (!(f = fopen(n, "r"))) { + if (errno == ENOENT) + fprintf(stderr, "File %s not found\n", n); + else + perror(n); + return (-2); + } + + if (get_string(Host, sizeof Host, f, "\n") == EOF) { + fprintf(stderr, "Error reading from %s\n", n); + fclose(f); + return (-2); + } + + fclose(f); + + printf("%s\n", Host); + fflush(stdout); + + log_it(RealUser, Pid, "GET HOST", Host, 0); + return (0); +} + +static void poke_daemon(void) { + if (utime(SPOOL_DIR, NULL) < OK) { + fprintf(stderr, "crontab: can't update mtime on spooldir\n"); + perror(SPOOL_DIR); + return; + } +} + +static void die(int x) { + if (TempFilename[0]) + (void) unlink(TempFilename); + _exit(ERROR_EXIT); +} diff --git a/cronie-1.4.6/src/database.c b/cronie-1.4.6/src/database.c new file mode 100644 index 0000000..94396b3 --- /dev/null +++ b/cronie-1.4.6/src/database.c @@ -0,0 +1,550 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* vix 26jan87 [RCS has the log] + */ + +/* + * Modified 2010/09/12 by Colin Dean, Durham University IT Service, + * to add clustering support. + */ + +#include + +#define TMAX(a,b) ((a)>(b)?(a):(b)) + +/* size of the event structure, not counting name */ +#define EVENT_SIZE (sizeof (struct inotify_event)) + +/* reasonable guess as to size of 1024 events */ +#define BUF_LEN (1024 * (EVENT_SIZE + 16)) + +static void overwrite_database(cron_db *, cron_db *); + +static void process_crontab(const char *, const char *, + const char *, cron_db *, cron_db *); + +static int not_a_crontab(DIR_T * dp); +/* return 1 if we should skip this file */ + +static void max_mtime(char *dir_name, struct stat *max_st); +/* record max mtime of any file under dir_name in max_st */ + +static int +check_open(const char *tabname, const char *fname, const char *uname, + struct passwd *pw, time_t * mtime) { + struct stat statbuf; + int crontab_fd; + pid_t pid = getpid(); + + if ((crontab_fd = + open(tabname, O_RDONLY | O_NONBLOCK, 0)) == -1) { + log_it(uname, pid, "CAN'T OPEN", tabname, errno); + return (-1); + } + if (fstat(crontab_fd, &statbuf) < OK) { + log_it(uname, pid, "STAT FAILED", tabname, errno); + close(crontab_fd); + return (-1); + } + *mtime = statbuf.st_mtime; + if (PermitAnyCrontab == 0) { + if (!S_ISREG(statbuf.st_mode)) { + log_it(uname, pid, "NOT REGULAR", tabname, 0); + close(crontab_fd); + return (-1); + } + if ((statbuf.st_mode & 07533) != 0400) { + log_it(uname, pid, "BAD FILE MODE", tabname, 0); + close(crontab_fd); + return (-1); + } + if (statbuf.st_uid != ROOT_UID && (pw == NULL || + statbuf.st_uid != pw->pw_uid || + strcmp(uname, pw->pw_name) != 0)) { + log_it(uname, pid, "WRONG FILE OWNER", tabname, 0); + close(crontab_fd); + return (-1); + } + if (pw && statbuf.st_nlink != 1) { + log_it(uname, pid, "BAD LINK COUNT", tabname, 0); + close(crontab_fd); + return (-1); + } + } + return (crontab_fd); +} + +static void +process_crontab(const char *uname, const char *fname, const char *tabname, + cron_db * new_db, cron_db * old_db) { + struct passwd *pw = NULL; + int crontab_fd = -1; + user *u; + time_t mtime; + int crond_crontab = (fname == NULL) && (strcmp(tabname, SYSCRONTAB) != 0); + + if (fname == NULL) { + /* must be set to something for logging purposes. + */ + fname = "*system*"; + } + else if ((pw = getpwnam(uname)) == NULL) { + /* file doesn't have a user in passwd file. + */ + log_it(uname, getpid(), "ORPHAN", "no passwd entry", 0); + goto next_crontab; + } + + if ((crontab_fd = check_open(tabname, fname, uname, pw, &mtime)) == -1) + goto next_crontab; + + Debug(DLOAD, ("\t%s:", fname)) + + u = find_user(old_db, fname, crond_crontab ? tabname : NULL); /* find user in old_db */ + + if (u != NULL) { + /* if crontab has not changed since we last read it + * in, then we can just use our existing entry. + */ + if (u->mtime == mtime) { + Debug(DLOAD, (" [no change, using old data]")) + unlink_user(old_db, u); + link_user(new_db, u); + goto next_crontab; + } + + /* before we fall through to the code that will reload + * the user, let's deallocate and unlink the user in + * the old database. This is more a point of memory + * efficiency than anything else, since all leftover + * users will be deleted from the old database when + * we finish with the crontab... + */ + Debug(DLOAD, (" [delete old data]")) + unlink_user(old_db, u); + free_user(u); + log_it(fname, getpid(), "RELOAD", tabname, 0); + } + + u = load_user(crontab_fd, pw, uname, fname, tabname); /* read the file */ + if (u != NULL) { + u->mtime = mtime; + link_user(new_db, u); + } + + next_crontab: + if (crontab_fd != -1) { + Debug(DLOAD, (" [done]\n")) + close(crontab_fd); + } +} + +static int +cluster_host_is_local(void) +{ + char filename[MAXNAMLEN+1]; + int is_local; + FILE *f; + char hostname[MAXHOSTNAMELEN], myhostname[MAXHOSTNAMELEN]; + + if (!EnableClustering) + return (1); + + /* to allow option of NFS-mounting SPOOL_DIR on a cluster of + * hosts and to only use crontabs here on any one host at a + * time, allow for existence of a CRON_HOSTNAME file, and if + * it doesn't exist, or exists but does not contain this + * host's hostname, then skip the crontabs. + * + * Note: for safety's sake, no CRON_HOSTNAME file means skip, + * otherwise its accidental deletion could result in multiple + * cluster hosts running the same cron jobs, which is + * potentially worse. + */ + + is_local = 0; + if (glue_strings(filename, sizeof filename, SPOOL_DIR, CRON_HOSTNAME, '/')) { + if ((f = fopen(filename, "r"))) { + + if (EOF != get_string(hostname, MAXHOSTNAMELEN, f, "\n") && + gethostname(myhostname, MAXHOSTNAMELEN) == 0) { + is_local = (strcmp(myhostname, hostname) == 0); + } else { + Debug(DLOAD, ("cluster: hostname comparison error\n")); + } + + fclose(f); + } else { + Debug(DLOAD, ("cluster: file %s not found\n", filename)); + } + } + + return (is_local); +} + +#if defined WITH_INOTIFY +void check_inotify_database(cron_db * old_db) { + cron_db new_db; + DIR_T *dp; + DIR *dir; + struct timeval time; + fd_set rfds; + int retval = 0; + char buf[BUF_LEN]; + pid_t pid = getpid(); + time.tv_sec = 0; + time.tv_usec = 0; + + FD_ZERO(&rfds); + FD_SET(old_db->ifd, &rfds); + + retval = select(old_db->ifd + 1, &rfds, NULL, NULL, &time); + if (retval == -1) { + if (errno != EINTR) + log_it("CRON", pid, "INOTIFY", "select failed", errno); + return; + } + else if (FD_ISSET(old_db->ifd, &rfds)) { + new_db.head = new_db.tail = NULL; + new_db.ifd = old_db->ifd; + while ((retval = read(old_db->ifd, buf, sizeof (buf))) == -1 && + errno == EINTR) ; + + if (retval == 0) { + /* this should not happen as the buffer is large enough */ + errno = ENOMEM; + } + + if (retval <= 0) { + log_it("CRON", pid, "INOTIFY", "read failed", errno); + /* something fatal must have occured we have no other reasonable + * way how to handle this failure than exit. + */ + (void) exit(ERROR_EXIT); + } + + /* we must reinstate the watches here - TODO reinstate only watches + * which get IN_IGNORED event + */ + set_cron_watched(old_db->ifd); + + /* TODO: parse the events and read only affected files */ + + process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db); + + if (!(dir = opendir(SYS_CROND_DIR))) { + log_it("CRON", pid, "OPENDIR FAILED", SYS_CROND_DIR, errno); + } + else { + while (NULL != (dp = readdir(dir))) { + char tabname[MAXNAMLEN + 1]; + + if (not_a_crontab(dp)) + continue; + + if (!glue_strings(tabname, sizeof tabname, SYS_CROND_DIR, + dp->d_name, '/')) + continue; + process_crontab("root", NULL, tabname, &new_db, old_db); + } + closedir(dir); + } + + if (!(dir = opendir(SPOOL_DIR))) { + log_it("CRON", pid, "OPENDIR FAILED", SPOOL_DIR, errno); + } + else { + while (NULL != (dp = readdir(dir))) { + char fname[MAXNAMLEN + 1], tabname[MAXNAMLEN + 1]; + + if (not_a_crontab(dp)) + continue; + + strncpy(fname, dp->d_name, MAXNAMLEN); + + if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR, + dp->d_name, '/')) + continue; + process_crontab(fname, fname, tabname, &new_db, old_db); + } + closedir(dir); + } + + /* if we don't do this, then when our children eventually call + * getpwnam() in do_command.c's child_process to verify MAILTO=, + * they will screw us up (and v-v). + */ + endpwent(); + } + else { + /* just return as no db reload is needed */ + return; + } + + overwrite_database(old_db, &new_db); + Debug(DLOAD, ("check_inotify_database is done\n")) +} +#endif + +static void overwrite_database(cron_db * old_db, cron_db * new_db) { + user *u, *nu; + /* whatever's left in the old database is now junk. + */ + Debug(DLOAD, ("unlinking old database:\n")) + for (u = old_db->head; u != NULL; u = nu) { + Debug(DLOAD, ("\t%s\n", u->name)) + nu = u->next; + unlink_user(old_db, u); + free_user(u); + } + + /* overwrite the database control block with the new one. + */ + *old_db = *new_db; +} + +int load_database(cron_db * old_db) { + struct stat statbuf, syscron_stat, crond_stat; + cron_db new_db; + DIR_T *dp; + DIR *dir; + pid_t pid = getpid(); + int is_local = 0; + + Debug(DLOAD, ("[%ld] load_database()\n", (long) pid)) + + /* before we start loading any data, do a stat on SPOOL_DIR + * so that if anything changes as of this moment (i.e., before we've + * cached any of the database), we'll see the changes next time. + */ + if (stat(SPOOL_DIR, &statbuf) < OK) { + log_it("CRON", pid, "STAT FAILED", SPOOL_DIR, errno); + statbuf.st_mtime = 0; + } + else { + /* As pointed out in Red Hat bugzilla 198019, with modern Linux it + * is possible to modify a file without modifying the mtime of the + * containing directory. Hence, we must check the mtime of each file: + */ + max_mtime(SPOOL_DIR, &statbuf); + } + + if (stat(SYS_CROND_DIR, &crond_stat) < OK) { + log_it("CRON", pid, "STAT FAILED", SYS_CROND_DIR, errno); + crond_stat.st_mtime = 0; + } + else { + max_mtime(SYS_CROND_DIR, &crond_stat); + } + + /* track system crontab file + */ + if (stat(SYSCRONTAB, &syscron_stat) < OK) + syscron_stat.st_mtime = 0; + + /* if spooldir's mtime has not changed, we don't need to fiddle with + * the database. + * + * Note that old_db->mtime is initialized to 0 in main(), and + * so is guaranteed to be different than the stat() mtime the first + * time this function is called. + */ + if (old_db->mtime == TMAX(crond_stat.st_mtime, + TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) + ) { + Debug(DLOAD, ("[%ld] spool dir mtime unch, no load needed.\n", + (long) pid)) + return 0; + } + + /* something's different. make a new database, moving unchanged + * elements from the old database, reloading elements that have + * actually changed. Whatever is left in the old database when + * we're done is chaff -- crontabs that disappeared. + */ + new_db.mtime = TMAX(crond_stat.st_mtime, + TMAX(statbuf.st_mtime, syscron_stat.st_mtime)); + new_db.head = new_db.tail = NULL; +#if defined WITH_INOTIFY + new_db.ifd = old_db->ifd; +#endif + + if (syscron_stat.st_mtime) + process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db); + + if (!(dir = opendir(SYS_CROND_DIR))) { + log_it("CRON", pid, "OPENDIR FAILED", SYS_CROND_DIR, errno); + } + else { + while (NULL != (dp = readdir(dir))) { + char tabname[MAXNAMLEN + 1]; + + if (not_a_crontab(dp)) + continue; + + if (!glue_strings(tabname, sizeof tabname, SYS_CROND_DIR, + dp->d_name, '/')) + continue; /* XXX log? */ + + process_crontab("root", NULL, tabname, &new_db, old_db); + } + closedir(dir); + } + + /* we used to keep this dir open all the time, for the sake of + * efficiency. however, we need to close it in every fork, and + * we fork a lot more often than the mtime of the dir changes. + */ + + if (!(dir = opendir(SPOOL_DIR))) { + log_it("CRON", pid, "OPENDIR FAILED", SPOOL_DIR, errno); + } + else { + + is_local = cluster_host_is_local(); + + while (is_local && NULL != (dp = readdir(dir))) { + char fname[MAXNAMLEN + 1], tabname[MAXNAMLEN + 1]; + + if (not_a_crontab(dp)) + continue; + + strncpy(fname, dp->d_name, MAXNAMLEN); + + if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR, fname, '/')) + continue; /* XXX log? */ + + process_crontab(fname, fname, tabname, &new_db, old_db); + } + closedir(dir); + } + + /* if we don't do this, then when our children eventually call + * getpwnam() in do_command.c's child_process to verify MAILTO=, + * they will screw us up (and v-v). + */ + endpwent(); + + overwrite_database(old_db, &new_db); + Debug(DLOAD, ("load_database is done\n")) + return 1; +} + +void link_user(cron_db * db, user * u) { + if (db->head == NULL) + db->head = u; + if (db->tail) + db->tail->next = u; + u->prev = db->tail; + u->next = NULL; + db->tail = u; +} + +void unlink_user(cron_db * db, user * u) { + if (u->prev == NULL) + db->head = u->next; + else + u->prev->next = u->next; + + if (u->next == NULL) + db->tail = u->prev; + else + u->next->prev = u->prev; +} + +user *find_user(cron_db * db, const char *name, const char *tabname) { + user *u; + + for (u = db->head; u != NULL; u = u->next) + if ((strcmp(u->name, name) == 0) + && ((tabname == NULL) + || (strcmp(tabname, u->tabname) == 0) + ) + ) + break; + return (u); +} + +static int not_a_crontab(DIR_T * dp) { + int len; + + /* avoid file names beginning with ".". this is good + * because we would otherwise waste two guaranteed calls + * to getpwnam() for . and .., and there shouldn't be + * hidden files in here anyway + */ + if (dp->d_name[0] == '.') + return (1); + + /* ignore files starting with # and ending with ~ */ + if (dp->d_name[0] == '#') + return (1); + + /* ignore CRON_HOSTNAME file (in case doesn't start with ".") */ + if (0 == strcmp(dp->d_name, CRON_HOSTNAME)) + return(1); + + len = strlen(dp->d_name); + + if (len >= MAXNAMLEN) + return (1); /* XXX log? */ + + if ((len > 0) && (dp->d_name[len - 1] == '~')) + return (1); + + if ((len > 8) && (strncmp(dp->d_name + len - 8, ".rpmsave", 8) == 0)) + return (1); + if ((len > 8) && (strncmp(dp->d_name + len - 8, ".rpmorig", 8) == 0)) + return (1); + if ((len > 7) && (strncmp(dp->d_name + len - 7, ".rpmnew", 7) == 0)) + return (1); + + return (0); +} + +static void max_mtime(char *dir_name, struct stat *max_st) { + DIR *dir; + DIR_T *dp; + struct stat st; + + if (!(dir = opendir(dir_name))) { + max_st->st_mtime = 0; + return; + } + + while (NULL != (dp = readdir(dir))) { + char tabname[MAXNAMLEN + 1]; + + if ( not_a_crontab ( dp ) && strcmp(dp->d_name, CRON_HOSTNAME) != 0) + continue; + + if (!glue_strings(tabname, sizeof tabname, dir_name, dp->d_name, '/')) + continue; /* XXX log? */ + + if (stat(tabname, &st) < OK) + continue; /* XXX log? */ + + if (st.st_mtime > max_st->st_mtime) + max_st->st_mtime = st.st_mtime; + } + closedir(dir); +} diff --git a/cronie-1.4.6/src/do_command.c b/cronie-1.4.6/src/do_command.c new file mode 100644 index 0000000..744427c --- /dev/null +++ b/cronie-1.4.6/src/do_command.c @@ -0,0 +1,571 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include + +static void child_process(entry *, user *); +static int safe_p(const char *, const char *); + +void do_command(entry * e, user * u) { + pid_t pid = getpid(); + + Debug(DPROC, ("[%ld] do_command(%s, (%s,%ld,%ld))\n", + (long) pid, e->cmd, u->name, + (long) e->pwd->pw_uid, (long) e->pwd->pw_gid)) + + /* fork to become asynchronous -- parent process is done immediately, + * and continues to run the normal cron code, which means return to + * tick(). the child and grandchild don't leave this function, alive. + * + * vfork() is unsuitable, since we have much to do, and the parent + * needs to be able to run off and fork other processes. + */ + switch (fork()) { + case -1: + log_it("CRON", pid, "CAN'T FORK", "do_command", errno); + break; + case 0: + /* child process */ + acquire_daemonlock(1); + child_process(e, u); + Debug(DPROC, ("[%ld] child process done, exiting\n", (long) getpid())) + _exit(OK_EXIT); + break; + default: + /* parent process */ + break; + } + Debug(DPROC, ("[%ld] main process returning to work\n", (long) pid)) +} + +static void child_process(entry * e, user * u) { + int stdin_pipe[2], stdout_pipe[2]; + char *input_data, *usernm, *mailto, *mailfrom; + int children = 0; + char **jobenv = 0L; + pid_t pid = getpid(); + pid_t jobpid; + + /* Set up the Red Hat security context for both mail/minder and job processes: + */ + if (cron_set_job_security_context(e, u, &jobenv) != 0) { + //syslog(LOG_INFO, "CRON (%s) ERROR: cannot set security context", e->pwd->pw_name); + exit(ERROR_EXIT); + } + + Debug(DPROC, ("[%ld] child_process('%s')\n", (long) getpid(), e->cmd)) +#ifdef CAPITALIZE_FOR_PS + /* mark ourselves as different to PS command watchers by upshifting + * our program name. This has no effect on some kernels. + */ + /*local */ { + char *pch; + + for (pch = ProgramName; *pch; pch++) + *pch = MkUpper(*pch); + } +#endif /* CAPITALIZE_FOR_PS */ + + /* discover some useful and important environment settings + */ + usernm = e->pwd->pw_name; + mailto = env_get("MAILTO", jobenv); + mailfrom = env_get("MAILFROM", e->envp); + + /* our parent is watching for our death by catching SIGCHLD. we + * do not care to watch for our children's deaths this way -- we + * use wait() explicitly. so we have to reset the signal (which + * was inherited from the parent). + */ + (void) signal(SIGCHLD, SIG_DFL); + + /* create some pipes to talk to our future child + */ + if (pipe(stdin_pipe) == -1) { /* child's stdin */ + log_it("CRON", pid, "PIPE() FAILED", "stdin_pipe", errno); + return; + } + + if (pipe(stdout_pipe) == -1) { /* child's stdout */ + log_it("CRON", pid, "PIPE() FAILED", "stdout_pipe", errno); + return; + } + + /* since we are a forked process, we can diddle the command string + * we were passed -- nobody else is going to use it again, right? + * + * if a % is present in the command, previous characters are the + * command, and subsequent characters are the additional input to + * the command. An escaped % will have the escape character stripped + * from it. Subsequent %'s will be transformed into newlines, + * but that happens later. + */ + /*local */ { + int escaped = FALSE; + int ch; + char *p; + + for (input_data = p = e->cmd; + (ch = *input_data) != '\0'; input_data++, p++) { + if (p != input_data) + *p = ch; + if (escaped) { + if (ch == '%') + *--p = ch; + escaped = FALSE; + continue; + } + if (ch == '\\') { + escaped = TRUE; + continue; + } + if (ch == '%') { + *input_data++ = '\0'; + break; + } + } + *p = '\0'; + } + + + /* fork again, this time so we can exec the user's command. + */ + switch ((jobpid = fork())) { + case -1: + log_it("CRON", pid, "CAN'T FORK", "child_process", errno); + cron_close_pam(); + exit(ERROR_EXIT); + /*NOTREACHED*/ case 0: + Debug(DPROC, ("[%ld] grandchild process fork()'ed\n", (long) getpid())) + + if (cron_change_user_permanently(e->pwd, env_get("HOME", jobenv)) < 0) + _exit(ERROR_EXIT); + + /* write a log message. we've waited this long to do it + * because it was not until now that we knew the PID that + * the actual user command shell was going to get and the + * PID is part of the log message. + */ + if ((e->flags & DONT_LOG) == 0) { + char *x = mkprints((u_char *) e->cmd, strlen(e->cmd)); + + log_it(usernm, getpid(), "CMD", x, 0); + free(x); + } + + /* that's the last thing we'll log. close the log files. + */ + log_close(); + + /* get new pgrp, void tty, etc. + */ + (void) setsid(); + + /* close the pipe ends that we won't use. this doesn't affect + * the parent, who has to read and write them; it keeps the + * kernel from recording us as a potential client TWICE -- + * which would keep it from sending SIGPIPE in otherwise + * appropriate circumstances. + */ + close(stdin_pipe[WRITE_PIPE]); + close(stdout_pipe[READ_PIPE]); + + /* grandchild process. make std{in,out} be the ends of + * pipes opened by our daddy; make stderr go to stdout. + */ + if (stdin_pipe[READ_PIPE] != STDIN) { + dup2(stdin_pipe[READ_PIPE], STDIN); + close(stdin_pipe[READ_PIPE]); + } + if (stdout_pipe[WRITE_PIPE] != STDOUT) { + dup2(stdout_pipe[WRITE_PIPE], STDOUT); + close(stdout_pipe[WRITE_PIPE]); + } + dup2(STDOUT, STDERR); + + /* Our grandparent is watching for our parent's death by + * catching SIGCHLD. Meanwhile, our parent will use wait + * explicitly and so has disabled SIGCHLD. So now it's + * time to reset SIGCHLD handling. + */ + (void) signal(SIGCHLD, SIG_DFL); + + + /* + * Exec the command. + */ + { + char *shell = env_get("SHELL", jobenv); + +#if DEBUGGING + if (DebugFlags & DTEST) { + fprintf(stderr, "debug DTEST is on, not exec'ing command.\n"); + fprintf(stderr, "\tcmd='%s' shell='%s'\n", e->cmd, shell); + _exit(OK_EXIT); + } +#endif /*DEBUGGING*/ + execle(shell, shell, "-c", e->cmd, (char *) 0, jobenv); + fprintf(stderr, "execl: couldn't exec `%s'\n", shell); + perror("execl"); + _exit(ERROR_EXIT); + } + break; + default: + cron_restore_default_security_context(); + /* parent process */ + break; + } + + children++; + + /* middle process, child of original cron, parent of process running + * the user's command. + */ + + Debug(DPROC, ("[%ld] child continues, closing pipes\n", (long) getpid())) + + /* close the ends of the pipe that will only be referenced in the + * grandchild process... + */ + close(stdin_pipe[READ_PIPE]); + close(stdout_pipe[WRITE_PIPE]); + + /* + * write, to the pipe connected to child's stdin, any input specified + * after a % in the crontab entry. while we copy, convert any + * additional %'s to newlines. when done, if some characters were + * written and the last one wasn't a newline, write a newline. + * + * Note that if the input data won't fit into one pipe buffer (2K + * or 4K on most BSD systems), and the child doesn't read its stdin, + * we would block here. thus we must fork again. + */ + + if (*input_data && fork() == 0) { + FILE *out = fdopen(stdin_pipe[WRITE_PIPE], "w"); + int need_newline = FALSE; + int escaped = FALSE; + int ch; + + Debug(DPROC, ("[%ld] child2 sending data to grandchild\n", + (long) getpid())) + + /* close the pipe we don't use, since we inherited it and + * are part of its reference count now. + */ + close(stdout_pipe[READ_PIPE]); + if (cron_change_user_permanently(e->pwd, env_get("HOME", jobenv)) < 0) + _exit(ERROR_EXIT); + /* translation: + * \% -> % + * % -> \n + * \x -> \x for all x != % + */ + while ((ch = *input_data++) != '\0') { + if (escaped) { + if (ch != '%') + putc('\\', out); + } + else { + if (ch == '%') + ch = '\n'; + } + + if (!(escaped = (ch == '\\'))) { + putc(ch, out); + need_newline = (ch != '\n'); + } + } + if (escaped) + putc('\\', out); + if (need_newline) + putc('\n', out); + + /* close the pipe, causing an EOF condition. fclose causes + * stdin_pipe[WRITE_PIPE] to be closed, too. + */ + fclose(out); + + Debug(DPROC, ("[%ld] child2 done sending to grandchild\n", + (long) getpid())) + exit(0); + } + + /* close the pipe to the grandkiddie's stdin, since its wicked uncle + * ernie back there has it open and will close it when he's done. + */ + close(stdin_pipe[WRITE_PIPE]); + + children++; + + /* + * read output from the grandchild. it's stderr has been redirected to + * it's stdout, which has been redirected to our pipe. if there is any + * output, we'll be mailing it to the user whose crontab this is... + * when the grandchild exits, we'll get EOF. + */ + + Debug(DPROC, ("[%ld] child reading output from grandchild\n", + (long) getpid())) + + /*local */ { + FILE *in = fdopen(stdout_pipe[READ_PIPE], "r"); + int ch = getc(in); + + if (ch != EOF) { + FILE *mail = NULL; + int bytes = 1; + int status = 0; +#if defined(SYSLOG) + char jobtag[64], logbuf[1024]; + int bufidx = 0; + /* according to the NOTES section of openlog(3), jobtag will be + * used (implicitly) by future calls to syslog(). That's why it + * was defined outside of the if block here. */ + if (SyslogOutput) { + snprintf(jobtag, sizeof(jobtag), "CROND[%d]", jobpid); + openlog(jobtag, 0, LOG_CRON); + if (ch != '\n') + logbuf[bufidx++] = ch; + } +#endif + + Debug(DPROC | DEXT, + ("[%ld] got data (%x:%c) from grandchild\n", + (long) getpid(), ch, ch)) + + /* get name of recipient. this is MAILTO if set to a + * valid local username; USER otherwise. + */ + if (mailto) { + /* MAILTO was present in the environment + */ + if (!*mailto) { + /* ... but it's empty. set to NULL + */ + mailto = NULL; + } + } + else { + /* MAILTO not present, set to USER. + */ + mailto = usernm; + } + + /* get sender address. this is MAILFROM if set (and safe), + * root otherwise. + */ + if (!mailfrom || !*mailfrom || !safe_p(usernm, mailfrom)) { + mailfrom = calloc(5, sizeof (char)); + strcpy(mailfrom, "root"); + } + + /* if we are supposed to be mailing, MAILTO will + * be non-NULL. only in this case should we set + * up the mail command and subjects and stuff... + */ + + /* Also skip it if MailCmd is set to "off" */ + if (mailto && safe_p(usernm, mailto) + && strncmp(MailCmd,"off",4)) { + char **env; + char mailcmd[MAX_COMMAND]; + char hostname[MAXHOSTNAMELEN]; + char *content_type = env_get("CONTENT_TYPE", jobenv), + *content_transfer_encoding = + env_get("CONTENT_TRANSFER_ENCODING", jobenv); + + gethostname(hostname, MAXHOSTNAMELEN); + + if (MailCmd[0] == '\0') { + if (strlens(MAILFMT, MAILARG, mailfrom, NULL) + 1 + >= sizeof mailcmd) { + fprintf(stderr, "mailcmd too long\n"); + (void) _exit(ERROR_EXIT); + } + (void) sprintf(mailcmd, MAILFMT, MAILARG, mailfrom); + } + else { + strncpy(mailcmd, MailCmd, MAX_COMMAND); + } + if (!(mail = cron_popen(mailcmd, "w", e->pwd))) { + perror(mailcmd); + (void) _exit(ERROR_EXIT); + } + + fprintf(mail, "From: %s (Cron Daemon)\n", mailfrom); + fprintf(mail, "To: %s\n", mailto); + fprintf(mail, "Subject: Cron <%s@%s> %s\n", + usernm, first_word(hostname, "."), e->cmd); + +#ifdef MAIL_DATE + fprintf(mail, "Date: %s\n", arpadate(&StartTime)); +#endif /*MAIL_DATE */ + if (content_type == 0L) { + fprintf(mail, "Content-Type: text/plain; charset=%s\n", + cron_default_mail_charset); + } + else { /* user specified Content-Type header. + * disallow new-lines for security reasons + * (else users could specify arbitrary mail headers!) + */ + char *nl = content_type; + size_t ctlen = strlen(content_type); + while ((*nl != '\0') + && ((nl = strchr(nl, '\n')) != 0L) + && (nl < (content_type + ctlen)) + ) + *nl = ' '; + fprintf(mail, "Content-Type: %s\n", content_type); + } + if (content_transfer_encoding != 0L) { + char *nl = content_transfer_encoding; + size_t ctlen = strlen(content_transfer_encoding); + while ((*nl != '\0') + && ((nl = strchr(nl, '\n')) != 0L) + && (nl < (content_transfer_encoding + ctlen)) + ) + *nl = ' '; + fprintf(mail, "Content-Transfer-Encoding: %s\n", + content_transfer_encoding); + } + + /* The Auto-Submitted header is + * defined (and suggested by) RFC3834. + */ + fprintf(mail, "Auto-Submitted: auto-generated\n"); + + for (env = jobenv; *env; env++) + fprintf(mail, "X-Cron-Env: <%s>\n", *env); + fprintf(mail, "\n"); + + /* this was the first char from the pipe + */ + putc(ch, mail); + } + + /* we have to read the input pipe no matter whether + * we mail or not, but obviously we only write to + * mail pipe if we ARE mailing. + */ + + while (EOF != (ch = getc(in))) { + bytes++; + if (mail) + putc(ch, mail); + } +#if defined(SYSLOG) + if (SyslogOutput) { + logbuf[bufidx++] = ch; + if ((ch == '\n') || (bufidx == sizeof(logbuf)-1)) { + if (ch == '\n') + logbuf[bufidx-1] = '\0'; + else + logbuf[bufidx] = '\0'; + syslog(LOG_INFO, "%s", logbuf); + bufidx = 0; + } + } +#endif + + /* only close pipe if we opened it -- i.e., we're + * mailing... + */ + + if (mail) { + Debug(DPROC, ("[%ld] closing pipe to mail\n", (long) getpid())) + /* Note: the pclose will probably see + * the termination of the grandchild + * in addition to the mail process, since + * it (the grandchild) is likely to exit + * after closing its stdout. + */ + status = cron_pclose(mail); + } +#if defined(SYSLOG) + if (SyslogOutput) { + if (bufidx) { + logbuf[bufidx] = '\0'; + syslog(LOG_INFO, "%s", logbuf); + } + closelog(); + } +#endif + + /* if there was output and we could not mail it, + * log the facts so the poor user can figure out + * what's going on. + */ + if (mail && status) { + char buf[MAX_TEMPSTR]; + + sprintf(buf, + "mailed %d byte%s of output but got status 0x%04x\n", + bytes, (bytes == 1) ? "" : "s", status); + log_it(usernm, getpid(), "MAIL", buf, 0); + } + + } /*if data from grandchild */ + + Debug(DPROC, ("[%ld] got EOF from grandchild\n", (long) getpid())) + + fclose(in); /* also closes stdout_pipe[READ_PIPE] */ + } + + /* wait for children to die. + */ + for (; children > 0; children--) { + WAIT_T waiter; + PID_T pid; + + Debug(DPROC, ("[%ld] waiting for grandchild #%d to finish\n", + (long) getpid(), children)) + while ((pid = wait(&waiter)) < OK && errno == EINTR) ; + if (pid < OK) { + Debug(DPROC, + ("[%ld] no more grandchildren--mail written?\n", + (long) getpid())) + break; + } + Debug(DPROC, ("[%ld] grandchild #%ld finished, status=%04x", + (long) getpid(), (long) pid, WEXITSTATUS(waiter))) + if (WIFSIGNALED(waiter) && WCOREDUMP(waiter)) + Debug(DPROC, (", dumped core")) + Debug(DPROC, ("\n")) + } + cron_close_pam(); + env_free(jobenv); + } + +static int safe_p(const char *usernm, const char *s) { + static const char safe_delim[] = "@!:%-.,_+"; /* conservative! */ + const char *t; + int ch, first; + + for (t = s, first = 1; (ch = *t++) != '\0'; first = 0) { + if (isascii(ch) && isprint(ch) && + (isalnum(ch) || (!first && strchr(safe_delim, ch)))) + continue; + log_it(usernm, getpid(), "UNSAFE", s, 0); + return (FALSE); + } + return (TRUE); +} diff --git a/cronie-1.4.6/src/entry.c b/cronie-1.4.6/src/entry.c new file mode 100644 index 0000000..c5027db --- /dev/null +++ b/cronie-1.4.6/src/entry.c @@ -0,0 +1,580 @@ +/* + * Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* vix 26jan87 [RCS'd; rest of log is in RCS file] + * vix 01jan87 [added line-level error recovery] + * vix 31dec86 [added /step to the from-to range, per bob@acornrc] + * vix 30dec86 [written] + */ + +#include + +typedef enum ecode { + e_none, e_minute, e_hour, e_dom, e_month, e_dow, + e_cmd, e_timespec, e_username, e_option, e_memory +} ecode_e; + +static const char *ecodes[] = { + "no error", + "bad minute", + "bad hour", + "bad day-of-month", + "bad month", + "bad day-of-week", + "bad command", + "bad time specifier", + "bad username", + "bad option", + "out of memory" +}; + +static int get_list(bitstr_t *, int, int, const char *[], int, FILE *), +get_range(bitstr_t *, int, int, const char *[], int, FILE *), +get_number(int *, int, const char *[], int, FILE *, const char *), +set_element(bitstr_t *, int, int, int); + +void free_entry(entry * e) { + free(e->cmd); + free(e->pwd); + env_free(e->envp); + free(e); +} + +/* return NULL if eof or syntax error occurs; + * otherwise return a pointer to a new entry. + */ +entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw, + char **envp) { + /* this function reads one crontab entry -- the next -- from a file. + * it skips any leading blank lines, ignores comments, and returns + * NULL if for any reason the entry can't be read and parsed. + * + * the entry is also parsed here. + * + * syntax: + * user crontab: + * minutes hours doms months dows cmd\n + * system crontab (/etc/crontab): + * minutes hours doms months dows USERNAME cmd\n + */ + + ecode_e ecode = e_none; + entry *e; + int ch; + char cmd[MAX_COMMAND]; + char envstr[MAX_ENVSTR]; + char **tenvp; + + Debug(DPARS, ("load_entry()...about to eat comments\n")) + + skip_comments(file); + + ch = get_char(file); + if (ch == EOF) + return (NULL); + + /* ch is now the first useful character of a useful line. + * it may be an @special or it may be the first character + * of a list of minutes. + */ + + e = (entry *) calloc(sizeof (entry), sizeof (char)); + + /* check for '-' as a first character, this option will disable + * writing a syslog message about command getting executed + */ + if (ch == '-') { + /* if we are editing system crontab or user uid is 0 (root) + * we are allowed to disable logging + */ + if (pw == NULL || pw->pw_uid == 0) + e->flags |= DONT_LOG; + else { + log_it("CRON", getpid(), "ERROR", "Only privileged user can disable logging", 0); + ecode = e_option; + goto eof; + } + ch = get_char(file); + if (ch == EOF) + return NULL; + } + + if (ch == '@') { + /* all of these should be flagged and load-limited; i.e., + * instead of @hourly meaning "0 * * * *" it should mean + * "close to the front of every hour but not 'til the + * system load is low". Problems are: how do you know + * what "low" means? (save me from /etc/cron.conf!) and: + * how to guarantee low variance (how low is low?), which + * means how to we run roughly every hour -- seems like + * we need to keep a history or let the first hour set + * the schedule, which means we aren't load-limited + * anymore. too much for my overloaded brain. (vix, jan90) + * HINT + */ + ch = get_string(cmd, MAX_COMMAND, file, " \t\n"); + if (!strcmp("reboot", cmd)) { + e->flags |= WHEN_REBOOT; + } + else if (!strcmp("yearly", cmd) || !strcmp("annually", cmd)) { + bit_set(e->minute, 0); + bit_set(e->hour, 0); + bit_set(e->dom, 0); + bit_set(e->month, 0); + bit_nset(e->dow, 0, (LAST_DOW - FIRST_DOW + 1)); + e->flags |= DOW_STAR; + } + else if (!strcmp("monthly", cmd)) { + bit_set(e->minute, 0); + bit_set(e->hour, 0); + bit_set(e->dom, 0); + bit_nset(e->month, 0, (LAST_MONTH - FIRST_MONTH + 1)); + bit_nset(e->dow, 0, (LAST_DOW - FIRST_DOW + 1)); + e->flags |= DOW_STAR; + } + else if (!strcmp("weekly", cmd)) { + bit_set(e->minute, 0); + bit_set(e->hour, 0); + bit_nset(e->dom, 0, (LAST_DOM - FIRST_DOM + 1)); + bit_nset(e->month, 0, (LAST_MONTH - FIRST_MONTH + 1)); + bit_set(e->dow, 0); + e->flags |= DOW_STAR; + } + else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) { + bit_set(e->minute, 0); + bit_set(e->hour, 0); + bit_nset(e->dom, 0, (LAST_DOM - FIRST_DOM + 1)); + bit_nset(e->month, 0, (LAST_MONTH - FIRST_MONTH + 1)); + bit_nset(e->dow, 0, (LAST_DOW - FIRST_DOW + 1)); + } + else if (!strcmp("hourly", cmd)) { + bit_set(e->minute, 0); + bit_nset(e->hour, 0, (LAST_HOUR - FIRST_HOUR + 1)); + bit_nset(e->dom, 0, (LAST_DOM - FIRST_DOM + 1)); + bit_nset(e->month, 0, (LAST_MONTH - FIRST_MONTH + 1)); + bit_nset(e->dow, 0, (LAST_DOW - FIRST_DOW + 1)); + e->flags |= HR_STAR; + } + else { + ecode = e_timespec; + goto eof; + } + /* Advance past whitespace between shortcut and + * username/command. + */ + Skip_Blanks(ch, file); + if (ch == EOF || ch == '\n') { + ecode = e_cmd; + goto eof; + } + } + else { + Debug(DPARS, ("load_entry()...about to parse numerics\n")) + + if (ch == '*') + e->flags |= MIN_STAR; + ch = get_list(e->minute, FIRST_MINUTE, LAST_MINUTE, PPC_NULL, ch, file); + if (ch == EOF) { + ecode = e_minute; + goto eof; + } + + /* hours + */ + + if (ch == '*') + e->flags |= HR_STAR; + ch = get_list(e->hour, FIRST_HOUR, LAST_HOUR, PPC_NULL, ch, file); + if (ch == EOF) { + ecode = e_hour; + goto eof; + } + + /* DOM (days of month) + */ + + if (ch == '*') + e->flags |= DOM_STAR; + ch = get_list(e->dom, FIRST_DOM, LAST_DOM, PPC_NULL, ch, file); + if (ch == EOF) { + ecode = e_dom; + goto eof; + } + + /* month + */ + + ch = get_list(e->month, FIRST_MONTH, LAST_MONTH, MonthNames, ch, file); + if (ch == EOF) { + ecode = e_month; + goto eof; + } + + /* DOW (days of week) + */ + + if (ch == '*') + e->flags |= DOW_STAR; + ch = get_list(e->dow, FIRST_DOW, LAST_DOW, DowNames, ch, file); + if (ch == EOF) { + ecode = e_dow; + goto eof; + } + } + + /* make sundays equivalent */ + if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) { + bit_set(e->dow, 0); + bit_set(e->dow, 7); + } + + /* check for permature EOL and catch a common typo */ + if (ch == '\n' || ch == '*') { + ecode = e_cmd; + goto eof; + } + + /* ch is the first character of a command, or a username */ + unget_char(ch, file); + + if (!pw) { + char *username = cmd; /* temp buffer */ + + Debug(DPARS, ("load_entry()...about to parse username\n")) + ch = get_string(username, MAX_COMMAND, file, " \t\n"); + + Debug(DPARS, ("load_entry()...got %s\n", username)) + if (ch == EOF || ch == '\n' || ch == '*') { + ecode = e_cmd; + goto eof; + } + + pw = getpwnam(username); + if (pw == NULL) { + ecode = e_username; + goto eof; + } + Debug(DPARS, ("load_entry()...uid %ld, gid %ld\n", + (long) pw->pw_uid, (long) pw->pw_gid)) + } + + if ((e->pwd = pw_dup(pw)) == NULL) { + ecode = e_memory; + goto eof; + } + bzero(e->pwd->pw_passwd, strlen(e->pwd->pw_passwd)); + + /* copy and fix up environment. some variables are just defaults and + * others are overrides. + */ + if ((e->envp = env_copy(envp)) == NULL) { + ecode = e_memory; + goto eof; + } + if (!env_get("SHELL", e->envp)) { + if (glue_strings(envstr, sizeof envstr, "SHELL", _PATH_BSHELL, '=')) { + if ((tenvp = env_set(e->envp, envstr)) == NULL) { + ecode = e_memory; + goto eof; + } + e->envp = tenvp; + } + else + log_it("CRON", getpid(), "ERROR", "can't set SHELL", 0); + } + if (!env_get("HOME", e->envp)) { + if (glue_strings(envstr, sizeof envstr, "HOME", pw->pw_dir, '=')) { + if ((tenvp = env_set(e->envp, envstr)) == NULL) { + ecode = e_memory; + goto eof; + } + e->envp = tenvp; + } + else + log_it("CRON", getpid(), "ERROR", "can't set HOME", 0); + } +#ifndef LOGIN_CAP + /* If login.conf is in used we will get the default PATH later. */ + if (!env_get("PATH", e->envp)) { + if (glue_strings(envstr, sizeof envstr, "PATH", _PATH_DEFPATH, '=')) { + if ((tenvp = env_set(e->envp, envstr)) == NULL) { + ecode = e_memory; + goto eof; + } + e->envp = tenvp; + } + else + log_it("CRON", getpid(), "ERROR", "can't set PATH", 0); + } +#endif /* LOGIN_CAP */ + if (glue_strings(envstr, sizeof envstr, "LOGNAME", pw->pw_name, '=')) { + if ((tenvp = env_set(e->envp, envstr)) == NULL) { + ecode = e_memory; + goto eof; + } + e->envp = tenvp; + } + else + log_it("CRON", getpid(), "ERROR", "can't set LOGNAME", 0); +#if defined(BSD) || defined(__linux) + if (glue_strings(envstr, sizeof envstr, "USER", pw->pw_name, '=')) { + if ((tenvp = env_set(e->envp, envstr)) == NULL) { + ecode = e_memory; + goto eof; + } + e->envp = tenvp; + } + else + log_it("CRON", getpid(), "ERROR", "can't set USER", 0); +#endif + + Debug(DPARS, ("load_entry()...about to parse command\n")) + + /* Everything up to the next \n or EOF is part of the command... + * too bad we don't know in advance how long it will be, since we + * need to malloc a string for it... so, we limit it to MAX_COMMAND. + */ + ch = get_string(cmd, MAX_COMMAND, file, "\n"); + + /* a file without a \n before the EOF is rude, so we'll complain... + */ + if (ch == EOF) { + ecode = e_cmd; + goto eof; + } + + /* got the command in the 'cmd' string; save it in *e. + */ + if ((e->cmd = strdup(cmd)) == NULL) { + ecode = e_memory; + goto eof; + } + + Debug(DPARS, ("load_entry()...returning successfully\n")) + + /* success, fini, return pointer to the entry we just created... + */ + return (e); + + eof: + if (e->envp) + env_free(e->envp); + if (e->pwd) + free(e->pwd); + if (e->cmd) + free(e->cmd); + free(e); + while (ch != '\n' && !feof(file)) + ch = get_char(file); + if (ecode != e_none && error_func) + (*error_func) (ecodes[(int) ecode]); + return (NULL); +} + +static int +get_list(bitstr_t * bits, int low, int high, const char *names[], + int ch, FILE * file) { + int done; + + /* we know that we point to a non-blank character here; + * must do a Skip_Blanks before we exit, so that the + * next call (or the code that picks up the cmd) can + * assume the same thing. + */ + + Debug(DPARS | DEXT, ("get_list()...entered\n")) + + /* list = range {"," range} + */ + /* clear the bit string, since the default is 'off'. + */ + bit_nclear(bits, 0, (high - low + 1)); + + /* process all ranges + */ + done = FALSE; + while (!done) { + if (EOF == (ch = get_range(bits, low, high, names, ch, file))) + return (EOF); + if (ch == ',') + ch = get_char(file); + else + done = TRUE; + } + + /* exiting. skip to some blanks, then skip over the blanks. + */ + Skip_Nonblanks(ch, file) + Skip_Blanks(ch, file) + + Debug(DPARS | DEXT, ("get_list()...exiting w/ %02x\n", ch)) + + return (ch); +} + + +static int +get_range(bitstr_t * bits, int low, int high, const char *names[], + int ch, FILE * file) { + /* range = number | number "-" number [ "/" number ] + */ + + int i, num1, num2, num3; + + Debug(DPARS | DEXT, ("get_range()...entering, exit won't show\n")) + + if (ch == '*') { + /* '*' means "first-last" but can still be modified by /step + */ + num1 = low; + num2 = high; + ch = get_char(file); + if (ch == EOF) + return (EOF); + } + else { + ch = get_number(&num1, low, names, ch, file, ",- \t\n"); + if (ch == EOF) + return (EOF); + + if (ch != '-') { + /* not a range, it's a single number. + */ + if (EOF == set_element(bits, low, high, num1)) { + unget_char(ch, file); + return (EOF); + } + return (ch); + } + else { + /* eat the dash + */ + ch = get_char(file); + if (ch == EOF) + return (EOF); + + /* get the number following the dash + */ + ch = get_number(&num2, low, names, ch, file, "/, \t\n"); + if (ch == EOF || num1 > num2) + return (EOF); + } + } + + /* check for step size + */ + if (ch == '/') { + /* eat the slash + */ + ch = get_char(file); + if (ch == EOF) + return (EOF); + + /* get the step size -- note: we don't pass the + * names here, because the number is not an + * element id, it's a step size. 'low' is + * sent as a 0 since there is no offset either. + */ + ch = get_number(&num3, 0, PPC_NULL, ch, file, ", \t\n"); + if (ch == EOF || num3 == 0) + return (EOF); + } + else { + /* no step. default==1. + */ + num3 = 1; + } + + /* range. set all elements from num1 to num2, stepping + * by num3. (the step is a downward-compatible extension + * proposed conceptually by bob@acornrc, syntactically + * designed then implemented by paul vixie). + */ + for (i = num1; i <= num2; i += num3) + if (EOF == set_element(bits, low, high, i)) { + unget_char(ch, file); + return (EOF); + } + + return (ch); +} + +static int +get_number(int *numptr, int low, const char *names[], int ch, FILE * file, + const char *terms) { + char temp[MAX_TEMPSTR], *pc; + int len, i; + + pc = temp; + len = 0; + + /* first look for a number */ + while (isdigit((unsigned char) ch)) { + if (++len >= MAX_TEMPSTR) + goto bad; + *pc++ = ch; + ch = get_char(file); + } + *pc = '\0'; + if (len != 0) { + /* got a number, check for valid terminator */ + if (!strchr(terms, ch)) + goto bad; + *numptr = atoi(temp); + return (ch); + } + + /* no numbers, look for a string if we have any */ + if (names) { + while (isalpha((unsigned char) ch)) { + if (++len >= MAX_TEMPSTR) + goto bad; + *pc++ = ch; + ch = get_char(file); + } + *pc = '\0'; + if (len != 0 && strchr(terms, ch)) { + for (i = 0; names[i] != NULL; i++) { + Debug(DPARS | DEXT, + ("get_num, compare(%s,%s)\n", names[i], temp)) + if (!strcasecmp(names[i], temp)) { + *numptr = i + low; + return (ch); + } + } + } + } + + bad: + unget_char(ch, file); + return (EOF); +} + +static int set_element(bitstr_t * bits, int low, int high, int number) { + Debug(DPARS | DEXT, ("set_element(?,%d,%d,%d)\n", low, high, number)) + + if (number < low || number > high) + return (EOF); + + bit_set(bits, (number - low)); + return (OK); +} diff --git a/cronie-1.4.6/src/env.c b/cronie-1.4.6/src/env.c new file mode 100644 index 0000000..390eb64 --- /dev/null +++ b/cronie-1.4.6/src/env.c @@ -0,0 +1,242 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include + +char **env_init(void) { + char **p = (char **) malloc(sizeof (char **)); + + if (p != NULL) + p[0] = NULL; + return (p); +} + +void env_free(char **envp) { + char **p; + + for (p = envp; *p != NULL; p++) + free(*p); + free(envp); +} + +char **env_copy(char **envp) { + int count, i, save_errno; + char **p; + + for (count = 0; envp[count] != NULL; count++) ; + + p = (char **) malloc((count + 1) * sizeof (char *)); /* 1 for the NULL */ + if (p != NULL) { + for (i = 0; i < count; i++) + if ((p[i] = strdup(envp[i])) == NULL) { + save_errno = errno; + while (--i >= 0) + free(p[i]); + free(p); + errno = save_errno; + return (NULL); + } + p[count] = NULL; + } + return (p); +} + +char **env_set(char **envp, char *envstr) { + int count, found; + char **p, *envtmp; + + /* + * count the number of elements, including the null pointer; + * also set 'found' to -1 or index of entry if already in here. + */ + found = -1; + for (count = 0; envp[count] != NULL; count++) { + if (!strcmp_until(envp[count], envstr, '=')) + found = count; + } + count++; /* for the NULL */ + + if (found != -1) { + /* + * it exists already, so just free the existing setting, + * save our new one there, and return the existing array. + */ + if ((envtmp = strdup(envstr)) == NULL) + return (NULL); + free(envp[found]); + envp[found] = envtmp; + return (envp); + } + + /* + * it doesn't exist yet, so resize the array, move null pointer over + * one, save our string over the old null pointer, and return resized + * array. + */ + if ((envtmp = strdup(envstr)) == NULL) + return (NULL); + p = (char **) realloc((void *) envp, + (size_t) ((count + 1) * sizeof (char **))); + if (p == NULL) { + free(envtmp); + return (NULL); + } + p[count] = p[count - 1]; + p[count - 1] = envtmp; + return (p); +} + +/* The following states are used by load_env(), traversed in order: */ +enum env_state { + NAMEI, /* First char of NAME, may be quote */ + NAME, /* Subsequent chars of NAME */ + EQ1, /* After end of name, looking for '=' sign */ + EQ2, /* After '=', skipping whitespace */ + VALUEI, /* First char of VALUE, may be quote */ + VALUE, /* Subsequent chars of VALUE */ + FINI, /* All done, skipping trailing whitespace */ + ERROR, /* Error */ +}; + +/* return ERR = end of file + * FALSE = not an env setting (file was repositioned) + * TRUE = was an env setting + */ +int load_env(char *envstr, FILE * f) { + long filepos; + int fileline; + enum env_state state; + char name[MAX_ENVSTR], val[MAX_ENVSTR]; + char quotechar, *c, *str; + + filepos = ftell(f); + fileline = LineNumber; + skip_comments(f); + if (EOF == get_string(envstr, MAX_ENVSTR, f, "\n")) + return (ERR); + + Debug(DPARS, ("load_env, read <%s>\n", envstr)) + + bzero(name, sizeof name); + bzero(val, sizeof val); + str = name; + state = NAMEI; + quotechar = '\0'; + c = envstr; + while (state != ERROR && *c) { + switch (state) { + case NAMEI: + case VALUEI: + if (*c == '\'' || *c == '"') + quotechar = *c++; + state++; + /* FALLTHROUGH */ + case NAME: + case VALUE: + if (quotechar) { + if (*c == quotechar) { + state++; + c++; + break; + } + if (state == NAME && *c == '=') { + state = ERROR; + break; + } + } + else { + if (state == NAME) { + if (isspace((unsigned char) *c)) { + c++; + state++; + break; + } + if (*c == '=') { + state++; + break; + } + } + } + *str++ = *c++; + break; + + case EQ1: + if (*c == '=') { + state++; + str = val; + quotechar = '\0'; + } + else { + if (!isspace((unsigned char) *c)) + state = ERROR; + } + c++; + break; + + case EQ2: + case FINI: + if (isspace((unsigned char) *c)) + c++; + else + state++; + break; + + default: + abort(); + } + } + if (state != FINI && !(state == VALUE && !quotechar)) { + Debug(DPARS, ("load_env, not an env var, state = %d\n", state)) + fseek(f, filepos, 0); + Set_LineNum(fileline); + return (FALSE); + } + if (state == VALUE) { + /* End of unquoted value: trim trailing whitespace */ + c = val + strlen(val); + while (c > val && isspace((unsigned char) c[-1])) + *(--c) = '\0'; + } + + /* 2 fields from parser; looks like an env setting */ + + /* + * This can't overflow because get_string() limited the size of the + * name and val fields. Still, it doesn't hurt to be careful... + */ + if (!glue_strings(envstr, MAX_ENVSTR, name, val, '=')) + return (FALSE); + Debug(DPARS, ("load_env, <%s> <%s> -> <%s>\n", name, val, envstr)) + return (TRUE); +} + +char *env_get(char *name, char **envp) { + int len = strlen(name); + char *p, *q; + + while ((p = *envp++) != NULL) { + if (!(q = strchr(p, '='))) + continue; + if ((q - p) == len && !strncmp(p, name, len)) + return (q + 1); + } + return (NULL); +} diff --git a/cronie-1.4.6/src/externs.h b/cronie-1.4.6/src/externs.h new file mode 100644 index 0000000..9c01d2c --- /dev/null +++ b/cronie-1.4.6/src/externs.h @@ -0,0 +1,127 @@ +/* Copyright 1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* reorder these #include's at your peril */ + +#include +#include +#include +#include +#ifdef HAVE_SYS_FCNTL_H +#include +#endif +#include +/* stat is used even, when --with-inotify */ +#include + +#include +#include +#ifndef isascii +#define isascii(c) ((unsigned)(c)<=0177) +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(SYSLOG) +# include +#endif + +#if defined(LOGIN_CAP) +# include +#endif /*LOGIN_CAP*/ + +#if defined(BSD_AUTH) +# include +#endif /*BSD_AUTH*/ + +/* include locale stuff for mailer "Content-Type": + */ +#include +#include +#include + +#define DIR_T struct dirent +#define WAIT_T int +#define SIG_T sig_t +#define TIME_T time_t +#define PID_T pid_t + +#ifndef TZNAME_ALREADY_DEFINED +extern char *tzname[2]; +#endif +#define TZONE(tm) tzname[(tm).tm_isdst] + +#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(__sun) || defined(_AIX) +# define HAVE_SAVED_UIDS +#endif + +#define MY_UID(pw) getuid() +#define MY_GID(pw) getgid() + +/* getopt() isn't part of POSIX. some systems define it in anyway. + * of those that do, some complain that our definition is different and some + * do not. to add to the misery and confusion, some systems define getopt() + * in ways that we cannot predict or comprehend, yet do not define the adjunct + * external variables needed for the interface. + */ +#if (!defined(BSD) || (BSD < 198911)) +int getopt(int, char * const *, const char *); +#endif + +#if (!defined(BSD) || (BSD < 199103)) +extern char *optarg; +extern int optind, opterr, optopt; +#endif + +/* digital unix needs this but does not give us a way to identify it. + */ +extern int flock(int, int); + +/* not all systems who provide flock() provide these definitions. + */ +#ifndef LOCK_SH +# define LOCK_SH 1 +#endif +#ifndef LOCK_EX +# define LOCK_EX 2 +#endif +#ifndef LOCK_NB +# define LOCK_NB 4 +#endif +#ifndef LOCK_UN +# define LOCK_UN 8 +#endif + +#ifndef WCOREDUMP +# define WCOREDUMP(st) (((st) & 0200) != 0) +#endif diff --git a/cronie-1.4.6/src/funcs.h b/cronie-1.4.6/src/funcs.h new file mode 100644 index 0000000..fabd0b2 --- /dev/null +++ b/cronie-1.4.6/src/funcs.h @@ -0,0 +1,112 @@ +/* + * $Id: funcs.h,v 1.9 2004/01/23 18:56:42 vixie Exp $ + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* Notes: + * This file has to be included by cron.h after data structure defs. + * We should reorg this into sections by module. + */ + +void set_cron_uid(void), + set_cron_cwd(void), + open_logfile(void), + sigpipe_func(void), + job_add(entry *, user *), + do_command(entry *, user *), + link_user(cron_db *, user *), + unlink_user(cron_db *, user *), + free_user(user *), + env_free(char **), + unget_char(int, FILE *), + free_entry(entry *), + acquire_daemonlock(int), + skip_comments(FILE *), + log_it(const char *, PID_T, const char *, const char *, int), + log_close(void); +#if defined WITH_INOTIFY +void set_cron_watched(int ), + set_cron_unwatched(int ), + check_inotify_database(cron_db *); +#endif + +int load_database(cron_db *), + job_runqueue(void), + set_debug_flags(const char *), + get_char(FILE *), + get_string(char *, int, FILE *, char *), + swap_uids(void), + swap_uids_back(void), + load_env(char *, FILE *), + cron_pclose(FILE *), + glue_strings(char *, size_t, const char *, const char *, char), + strcmp_until(const char *, const char *, char), + allowed(const char * ,const char * ,const char *), + strdtb(char *); + +size_t strlens(const char *, ...); + +char *env_get(char *, char **), + *arpadate(time_t *), + *mkprints(unsigned char *, unsigned int), + *first_word(char *, char *), + **env_init(void), + **env_copy(char **), + **env_set(char **, char *); + +user *load_user(int, struct passwd *, const char *, const char *, const char *), + *find_user(cron_db *, const char *, const char *); + +entry *load_entry(FILE *, void (*)(), struct passwd *, char **); + +FILE *cron_popen(char *, const char *, struct passwd *); + +struct passwd *pw_dup(const struct passwd *); + +#ifndef HAVE_STRUCT_TM_TM_GMTOFF +long get_gmtoff(time_t *, struct tm *); +#endif + +/* Red Hat security stuff (security.c): + */ +void cron_restore_default_security_context( void ); + +int cron_set_job_security_context( entry *e, user *u, char ***jobenvp ); + +int cron_open_security_session( struct passwd *pw ); + +void cron_close_security_session( void ); + +int cron_change_user( struct passwd *pw ); + +int cron_change_user_permanently( struct passwd *pw, char *homedir ); + +int get_security_context(const char *name, + int crontab_fd, + security_context_t *rcontext, + const char *tabname + ); + +void free_security_context( security_context_t *scontext ); + +int crontab_security_access(void); + +/* PAM */ +int cron_start_pam(struct passwd *pw); +void cron_close_pam(void); diff --git a/cronie-1.4.6/src/globals.h b/cronie-1.4.6/src/globals.h new file mode 100644 index 0000000..c7a811d --- /dev/null +++ b/cronie-1.4.6/src/globals.h @@ -0,0 +1,89 @@ +/* + * $Id: globals.h,v 1.10 2004/01/23 19:03:33 vixie Exp $ + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Modified 2010/09/12 by Colin Dean, Durham University IT Service, + * to add clustering support. + */ + +#ifdef MAIN_PROGRAM +# define XTRN +# define INIT(x) = x +#else +# define XTRN extern +# define INIT(x) +#endif + +XTRN const char *copyright[] +#ifdef MAIN_PROGRAM + = { + "@(#) ISC Cron V4.1", + "@(#) Copyright 1988,1989,1990,1993,1994 by Paul Vixie", + "@(#) Copyright 1997,2000 by Internet Software Consortium, Inc.", + "@(#) Copyright 2004 by Internet Systems Consortium, Inc.", + "@(#) All rights reserved", + NULL + } +#endif + ; + +XTRN const char *MonthNames[] +#ifdef MAIN_PROGRAM + = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + NULL + } +#endif + ; + +XTRN const char *DowNames[] +#ifdef MAIN_PROGRAM + = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", + NULL + } +#endif + ; + +XTRN char *ProgramName; +XTRN int LineNumber; +XTRN int SyslogOutput; +XTRN time_t StartTime; +XTRN int NoFork; +XTRN int PermitAnyCrontab; +XTRN char MailCmd[MAX_COMMAND]; +XTRN char cron_default_mail_charset[MAX_ENVSTR]; +XTRN int EnableClustering; + +#if DEBUGGING +XTRN int DebugFlags INIT(0); +XTRN const char *DebugFlagNames[] +#ifdef MAIN_PROGRAM + = { + "ext", "sch", "proc", "pars", "load", "misc", "test", "bit", + NULL + } +#endif + ; +#else +#define DebugFlags 0 +#endif /* DEBUGGING */ diff --git a/cronie-1.4.6/src/job.c b/cronie-1.4.6/src/job.c new file mode 100644 index 0000000..5ea7d98 --- /dev/null +++ b/cronie-1.4.6/src/job.c @@ -0,0 +1,67 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include + +typedef struct _job { + struct _job *next; + entry *e; + user *u; +} job; + +static job *jhead = NULL, *jtail = NULL; + +void job_add(entry * e, user * u) { + job *j; + + /* if already on queue, keep going */ + for (j = jhead; j != NULL; j = j->next) + if (j->e == e && j->u == u) + return; + + /* build a job queue element */ + if ((j = (job *) malloc(sizeof (job))) == NULL) + return; + j->next = NULL; + j->e = e; + j->u = u; + + /* add it to the tail */ + if (jhead == NULL) + jhead = j; + else + jtail->next = j; + jtail = j; +} + +int job_runqueue(void) { + job *j, *jn; + int run = 0; + + for (j = jhead; j; j = jn) { + do_command(j->e, j->u); + jn = j->next; + free(j); + run++; + } + jhead = jtail = NULL; + return (run); +} diff --git a/cronie-1.4.6/src/macros.h b/cronie-1.4.6/src/macros.h new file mode 100644 index 0000000..4981a01 --- /dev/null +++ b/cronie-1.4.6/src/macros.h @@ -0,0 +1,132 @@ +/* + * $Id: macros.h,v 1.9 2004/01/23 18:56:43 vixie Exp $ + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifdef HAVE_LIMITS_H +#include +#endif + /* these are really immutable, and are + * defined for symbolic convenience only + * TRUE, FALSE, and ERR must be distinct + * ERR must be < OK. + */ +#define TRUE 1 +#define FALSE 0 + /* system calls return this on success */ +#define OK 0 + /* or this on error */ +#define ERR (-1) + + /* turn this on to get '-x' code */ +#ifndef DEBUGGING +#define DEBUGGING FALSE +#endif + +#define INIT_PID 1 /* parent of orphans */ +#define READ_PIPE 0 /* which end of a pipe pair do you read? */ +#define WRITE_PIPE 1 /* or write to? */ +#define STDIN 0 /* what is stdin's file descriptor? */ +#define STDOUT 1 /* stdout's? */ +#define STDERR 2 /* stderr's? */ +#define ERROR_EXIT 1 /* exit() with this will scare the shell */ +#define OK_EXIT 0 /* exit() with this is considered 'normal' */ +#define MAX_FNAME PATH_MAX/* max length of internally generated fn */ +#define MAX_COMMAND 131072 /* max length of internally generated cmd (max sh cmd line length) */ +#define MAX_ENVSTR 131072 /* max length of envvar=value\0 strings */ +#define MAX_TEMPSTR 131072 /* obvious */ +#define MAX_UNAME 256 /* max length of username */ +#define ROOT_UID 0 /* don't change this, it really must be root */ +#define ROOT_USER "root" /* ditto */ + + /* NOTE: these correspond to DebugFlagNames, + * defined below. + */ +#define DEXT 0x0001 /* extend flag for other debug masks */ +#define DSCH 0x0002 /* scheduling debug mask */ +#define DPROC 0x0004 /* process control debug mask */ +#define DPARS 0x0008 /* parsing debug mask */ +#define DLOAD 0x0010 /* database loading debug mask */ +#define DMISC 0x0020 /* misc debug mask */ +#define DTEST 0x0040 /* test mode: don't execute any commands */ + +#define PPC_NULL ((const char **)NULL) + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +#define Skip_Blanks(c, f) \ + while (c == '\t' || c == ' ') \ + c = get_char(f); + +#define Skip_Nonblanks(c, f) \ + while (c!='\t' && c!=' ' && c!='\n' && c != EOF) \ + c = get_char(f); + +#if DEBUGGING +# define Debug(mask, message) \ + if ((DebugFlags & (mask)) != 0) \ + printf message; +#else /* !DEBUGGING */ +# define Debug(mask, message) \ + ; +#endif /* DEBUGGING */ + +#define MkUpper(ch) (islower(ch) ? toupper(ch) : ch) +#define Set_LineNum(ln) {Debug(DPARS|DEXT,("linenum=%d\n",ln)); \ + LineNumber = ln; \ + } + +#ifdef HAVE_STRUCT_TM_TM_GMTOFF +#define get_gmtoff(c, t) ((t)->tm_gmtoff) +#endif + +#define SECONDS_PER_MINUTE 60 +#define SECONDS_PER_HOUR 3600 + +#define FIRST_MINUTE 0 +#define LAST_MINUTE 59 +#define MINUTE_COUNT (LAST_MINUTE - FIRST_MINUTE + 1) + +#define FIRST_HOUR 0 +#define LAST_HOUR 23 +#define HOUR_COUNT (LAST_HOUR - FIRST_HOUR + 1) + +#define FIRST_DOM 1 +#define LAST_DOM 31 +#define DOM_COUNT (LAST_DOM - FIRST_DOM + 1) + +#define FIRST_MONTH 1 +#define LAST_MONTH 12 +#define MONTH_COUNT (LAST_MONTH - FIRST_MONTH + 1) + +/* note on DOW: 0 and 7 are both Sunday, for compatibility reasons. */ +#define FIRST_DOW 0 +#define LAST_DOW 7 +#define DOW_COUNT (LAST_DOW - FIRST_DOW + 1) + +/* + * Because crontab/at files may be owned by their respective users we + * take extreme care in opening them. If the OS lacks the O_NOFOLLOW + * we will just have to live without it. In order for this to be an + * issue an attacker would have to subvert group CRON_GROUP. + */ +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 +#endif diff --git a/cronie-1.4.6/src/misc.c b/cronie-1.4.6/src/misc.c new file mode 100644 index 0000000..8ccda51 --- /dev/null +++ b/cronie-1.4.6/src/misc.c @@ -0,0 +1,749 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* vix 26jan87 [RCS has the rest of the log] + * vix 30dec86 [written] + */ + +#include +#ifdef WITH_AUDIT +# include +#endif + +#ifdef HAVE_FCNTL_H /* fcntl(2) */ +# include +#endif +#ifdef HAVE_UNISTD_H /* lockf(3) */ +# include +#endif +#ifdef HAVE_FLOCK /* flock(2) */ +# include +#endif +#include + +#if defined(SYSLOG) && defined(LOG_FILE) +# undef LOG_FILE +#endif + +#if defined(LOG_DAEMON) && !defined(LOG_CRON) +# define LOG_CRON LOG_DAEMON +#endif + +#ifndef FACILITY +# define FACILITY LOG_CRON +#endif + +static int LogFD = ERR; + +#if defined(SYSLOG) +static int syslog_open = FALSE; +#endif + +#if defined(HAVE_FCNTL) && defined(F_SETLK) +static int trylock_file(int fd) { + struct flock fl; + + memset(&fl, '\0', sizeof (fl)); + fl.l_type = F_WRLCK; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + + return fcntl(fd, F_SETLK, &fl); +} +#elif defined(HAVE_LOCKF) +# define trylock_file(fd) lockf((fd), F_TLOCK, 0) +#elif defined(HAVE_FLOCK) +# define trylock_file(fd) flock((fd), LOCK_EX|LOCK_NB) +#endif + +/* + * glue_strings is the overflow-safe equivalent of + * sprintf(buffer, "%s%c%s", a, separator, b); + * + * returns 1 on success, 0 on failure. 'buffer' MUST NOT be used if + * glue_strings fails. + */ +int +glue_strings(char *buffer, size_t buffer_size, const char *a, const char *b, + char separator) { + char *buf; + char *buf_end; + + if (buffer_size <= 0) + return (0); + buf_end = buffer + buffer_size; + buf = buffer; + + for ( /* nothing */ ; buf < buf_end && *a != '\0'; buf++, a++) + *buf = *a; + if (buf == buf_end) + return (0); + if (separator != '/' || buf == buffer || buf[-1] != '/') + *buf++ = separator; + if (buf == buf_end) + return (0); + for ( /* nothing */ ; buf < buf_end && *b != '\0'; buf++, b++) + *buf = *b; + if (buf == buf_end) + return (0); + *buf = '\0'; + return (1); +} + +int strcmp_until(const char *left, const char *right, char until) { + while (*left && *left != until && *left == *right) { + left++; + right++; + } + + if ((*left == '\0' || *left == until) && (*right == '\0' || + *right == until)) { + return (0); + } + return (*left - *right); +} + +/* strdtb(s) - delete trailing blanks in string 's' and return new length + */ +int strdtb(char *s) { + char *x = s; + + /* scan forward to the null + */ + while (*x) + x++; + + /* scan backward to either the first character before the string, + * or the last non-blank in the string, whichever comes first. + */ + do { + x--; + } while (x >= s && isspace((unsigned char) *x)); + + /* one character beyond where we stopped above is where the null + * goes. + */ + *++x = '\0'; + + /* the difference between the position of the null character and + * the position of the first character of the string is the length. + */ + return (x - s); +} + +int set_debug_flags(const char *flags) { + /* debug flags are of the form flag[,flag ...] + * + * if an error occurs, print a message to stdout and return FALSE. + * otherwise return TRUE after setting ERROR_FLAGS. + */ + +#if !DEBUGGING + + printf("this program was compiled without debugging enabled\n"); + return (FALSE); + +#else /* DEBUGGING */ + + const char *pc = flags; + + DebugFlags = 0; + + while (*pc) { + const char **test; + int mask; + + /* try to find debug flag name in our list. + */ + for (test = DebugFlagNames, mask = 1; + *test != NULL && strcmp_until(*test, pc, ','); test++, mask <<= 1) ; + + if (!*test) { + fprintf(stderr, "unrecognized debug flag <%s> <%s>\n", flags, pc); + return (FALSE); + } + + DebugFlags |= mask; + + /* skip to the next flag + */ + while (*pc && *pc != ',') + pc++; + if (*pc == ',') + pc++; + } + + if (DebugFlags) { + int flag; + + fprintf(stderr, "debug flags enabled:"); + + for (flag = 0; DebugFlagNames[flag]; flag++) + if (DebugFlags & (1 << flag)) + fprintf(stderr, " %s", DebugFlagNames[flag]); + fprintf(stderr, "\n"); + } + + return (TRUE); + +#endif /* DEBUGGING */ +} + +void set_cron_uid(void) { +#if defined(BSD) || defined(POSIX) + if (seteuid(ROOT_UID) < OK) { + perror("seteuid"); + exit(ERROR_EXIT); + } +#else + if (setuid(ROOT_UID) < OK) { + perror("setuid"); + exit(ERROR_EXIT); + } +#endif +} + +void set_cron_cwd(void) { + struct stat sb; + struct group *grp = NULL; + +#ifdef CRON_GROUP + grp = getgrnam(CRON_GROUP); +#endif + /* check SPOOL_DIR existence + */ + if (stat(SPOOL_DIR, &sb) < OK && errno == ENOENT) { + perror(SPOOL_DIR); + if (OK == mkdir(SPOOL_DIR, 0700)) { + fprintf(stderr, "%s: created\n", SPOOL_DIR); + stat(SPOOL_DIR, &sb); + } + else { + fprintf(stderr, "%s: ", SPOOL_DIR); + perror("mkdir"); + exit(ERROR_EXIT); + } + } + if (!S_ISDIR(sb.st_mode)) { + fprintf(stderr, "'%s' is not a directory, bailing out.\n", SPOOL_DIR); + exit(ERROR_EXIT); + } + if (grp != NULL) { + if (sb.st_gid != grp->gr_gid) + if (chown(SPOOL_DIR, -1, grp->gr_gid) == -1) { + fprintf(stderr, "chdir %s failed: %s\n", SPOOL_DIR, + strerror(errno)); + exit(ERROR_EXIT); + } + if (sb.st_mode != 01730) + if (chmod(SPOOL_DIR, 01730) == -1) { + fprintf(stderr, "chmod 01730 %s failed: %s\n", SPOOL_DIR, + strerror(errno)); + exit(ERROR_EXIT); + } + } +} + +/* acquire_daemonlock() - write our PID into /etc/cron.pid, unless + * another daemon is already running, which we detect here. + * + * note: main() calls us twice; once before forking, once after. + * we maintain static storage of the file pointer so that we + * can rewrite our PID into _PATH_CRON_PID after the fork. + */ +void acquire_daemonlock(int closeflag) { + static int fd = -1; + char buf[3 * MAX_FNAME]; + const char *pidfile; + char *ep; + long otherpid = -1; + ssize_t num, len; + pid_t pid = getpid(); + + if (closeflag) { + /* close stashed fd for child so we don't leak it. */ + if (fd != -1) { + close(fd); + fd = -1; + } + return; + } + + if (fd == -1) { + pidfile = _PATH_CRON_PID; + /* Initial mode is 0600 to prevent flock() race/DoS. */ + if ((fd = open(pidfile, O_RDWR | O_CREAT, 0600)) == -1) { + int save_errno = errno; + sprintf(buf, "can't open or create %s", pidfile); + fprintf(stderr, "%s: %s: %s\n", ProgramName, buf, + strerror(save_errno)); + log_it("CRON", pid, "DEATH", buf, save_errno); + exit(ERROR_EXIT); + } + + if (trylock_file(fd) < OK) { + int save_errno = errno; + + bzero(buf, sizeof (buf)); + if ((num = read(fd, buf, sizeof (buf) - 1)) > 0 && + (otherpid = strtol(buf, &ep, 10)) > 0 && + ep != buf && *ep == '\n' && otherpid != LONG_MAX) { + snprintf(buf, sizeof (buf), + "can't lock %s, otherpid may be %ld", pidfile, otherpid); + } + else { + snprintf(buf, sizeof (buf), + "can't lock %s, otherpid unknown", pidfile); + } + fprintf(stderr, "%s: %s: %s\n", ProgramName, buf, + strerror(save_errno)); + log_it("CRON", pid, "DEATH", buf, save_errno); + exit(ERROR_EXIT); + } + (void) fchmod(fd, 0644); + (void) fcntl(fd, F_SETFD, 1); + } + + sprintf(buf, "%ld\n", (long) pid); + (void) lseek(fd, (off_t) 0, SEEK_SET); + len = strlen(buf); + if ((num = write(fd, buf, len)) != len) + log_it("CRON", pid, "ERROR", "write() failed", errno); + else { + if (ftruncate(fd, num) == -1) + log_it("CRON", pid, "ERROR", "ftruncate() failed", errno); + } + + /* abandon fd even though the file is open. we need to keep + * it open and locked, but we don't need the handles elsewhere. + */ +} + +/* get_char(file) : like getc() but increment LineNumber on newlines + */ +int get_char(FILE * file) { + int ch; + + ch = getc(file); + if (ch == '\n') + Set_LineNum(LineNumber + 1) + return (ch); +} + +/* unget_char(ch, file) : like ungetc but do LineNumber processing + */ +void unget_char(int ch, FILE * file) { + ungetc(ch, file); + if (ch == '\n') + Set_LineNum(LineNumber - 1) +} + +/* get_string(str, max, file, termstr) : like fgets() but + * (1) has terminator string which should include \n + * (2) will always leave room for the null + * (3) uses get_char() so LineNumber will be accurate + * (4) returns EOF or terminating character, whichever + */ +int get_string(char *string, int size, FILE * file, char *terms) { + int ch; + + while (EOF != (ch = get_char(file)) && !strchr(terms, ch)) { + if (size > 1) { + *string++ = (char) ch; + size--; + } + } + + if (size > 0) + *string = '\0'; + + return (ch); +} + +/* skip_comments(file) : read past comment (if any) + */ +void skip_comments(FILE * file) { + int ch; + + while (EOF != (ch = get_char(file))) { + /* ch is now the first character of a line. + */ + while (ch == ' ' || ch == '\t') + ch = get_char(file); + + if (ch == EOF) + break; + + /* ch is now the first non-blank character of a line. + */ + + if (ch != '\n' && ch != '#') + break; + + /* ch must be a newline or comment as first non-blank + * character on a line. + */ + + while (ch != '\n' && ch != EOF) + ch = get_char(file); + + /* ch is now the newline of a line which we're going to + * ignore. + */ + } + if (ch != EOF) + unget_char(ch, file); +} + +/* int in_file(const char *string, FILE *file, int error) + * return TRUE if one of the lines in file matches string exactly, + * FALSE if no lines match, and error on error. + */ +static int in_file(const char *string, FILE * file, int error) { + char line[MAX_TEMPSTR]; + char *endp; + + if (fseek(file, 0L, SEEK_SET)) + return (error); + while (fgets(line, MAX_TEMPSTR, file)) { + if (line[0] != '\0') { + endp = &line[strlen(line) - 1]; + if (*endp != '\n') + return (error); + *endp = '\0'; + if (0 == strcmp(line, string)) + return (TRUE); + } + } + if (ferror(file)) + return (error); + return (FALSE); +} + +/* int allowed(const char *username, const char *allow_file, const char *deny_file) + * returns TRUE if (allow_file exists and user is listed) + * or (deny_file exists and user is NOT listed). + * root is always allowed. + */ +int allowed(const char *username, const char *allow_file, + const char *deny_file) { + FILE *fp; + int isallowed; + char buf[128]; + + if (getuid() == 0) + return TRUE; + isallowed = FALSE; + if ((fp = fopen(allow_file, "r")) != NULL) { + isallowed = in_file(username, fp, FALSE); + fclose(fp); + if ((getuid() == 0) && (!isallowed)) { + snprintf(buf, sizeof (buf), + "root used -u for user %s not in cron.allow", username); + log_it("crontab", getpid(), "warning", buf, 0); + isallowed = TRUE; + } + } + else if ((fp = fopen(deny_file, "r")) != NULL) { + isallowed = !in_file(username, fp, FALSE); + fclose(fp); + if ((getuid() == 0) && (!isallowed)) { + snprintf(buf, sizeof (buf), + "root used -u for user %s in cron.deny", username); + log_it("crontab", getpid(), "warning", buf, 0); + isallowed = TRUE; + } + } +#ifdef WITH_AUDIT + if (isallowed == FALSE) { + int audit_fd = audit_open(); + audit_log_user_message(audit_fd, AUDIT_USER_START, "cron deny", + NULL, NULL, NULL, 0); + close(audit_fd); + } +#endif + return (isallowed); +} + +void log_it(const char *username, PID_T xpid, const char *event, + const char *detail, int err) { +#if defined(LOG_FILE) || DEBUGGING + PID_T pid = xpid; +#endif +#if defined(LOG_FILE) + char *msg; + TIME_T now = time((TIME_T) 0); + struct tm *t = localtime(&now); + int msg_size; +#endif + +#if defined(LOG_FILE) + /* we assume that MAX_TEMPSTR will hold the date, time, &punctuation. + */ + msg = malloc(msg_size = (strlen(username) + + strlen(event) + + strlen(detail) + + MAX_TEMPSTR) + ); + if (msg == NULL) { /* damn, out of mem and we did not test that before... */ + fprintf(stderr, "%s: Run OUT OF MEMORY while %s\n", + ProgramName, __FUNCTION__); + return; + } + if (LogFD < OK) { + LogFD = open(LOG_FILE, O_WRONLY | O_APPEND | O_CREAT, 0600); + if (LogFD < OK) { + fprintf(stderr, "%s: can't open log file\n", ProgramName); + perror(LOG_FILE); + } + else { + (void) fcntl(LogFD, F_SETFD, 1); + } + } + + /* we have to snprintf() it because fprintf() doesn't always write + * everything out in one chunk and this has to be atomically appended + * to the log file. + */ + snprintf(msg, msg_size, + "%s (%02d/%02d-%02d:%02d:%02d-%d) %s (%s)%s%s\n", username, + t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, pid, + event, detail, err != 0 ? ": " : "", err != 0 ? strerror(err) : ""); + + /* we have to run strlen() because sprintf() returns (char*) on old BSD + */ + if (LogFD < OK || write(LogFD, msg, strlen(msg)) < OK) { + if (LogFD >= OK) + perror(LOG_FILE); + fprintf(stderr, "%s: can't write to log file\n", ProgramName); + write(STDERR, msg, strlen(msg)); + } + + free(msg); +#endif /*LOG_FILE */ + +#if defined(SYSLOG) + if (!syslog_open) { +# ifdef LOG_DAEMON + openlog(ProgramName, LOG_PID, FACILITY); +# else + openlog(ProgramName, LOG_PID); +# endif + syslog_open = TRUE; /* assume openlog success */ + } + + syslog(err != 0 ? LOG_ERR : LOG_INFO, + "(%s) %s (%s)%s%s", username, event, detail, + err != 0 ? ": " : "", err != 0 ? strerror(err) : ""); + + +#endif /*SYSLOG*/ +#if DEBUGGING + if (DebugFlags) { + fprintf(stderr, "log_it: (%s %ld) %s (%s)%s%s\n", + username, (long) pid, event, detail, + err != 0 ? ": " : "", err != 0 ? strerror(err) : ""); + } +#endif +} + +void log_close(void) { + if (LogFD != ERR) { + close(LogFD); + LogFD = ERR; + } +#if defined(SYSLOG) + closelog(); + syslog_open = FALSE; +#endif /*SYSLOG*/ +} + +/* char *first_word(char *s, char *t) + * return pointer to first word + * parameters: + * s - string we want the first word of + * t - terminators, implicitly including \0 + * warnings: + * (1) this routine is fairly slow + * (2) it returns a pointer to static storage + */ +char *first_word(char *s, char *t) { + static char retbuf[2][MAX_TEMPSTR + 1]; /* sure wish C had GC */ + static int retsel = 0; + char *rb, *rp; + + /* select a return buffer */ + retsel = 1 - retsel; + rb = &retbuf[retsel][0]; + rp = rb; + + /* skip any leading terminators */ + while (*s && (NULL != strchr(t, *s))) { + s++; + } + + /* copy until next terminator or full buffer */ + while (*s && (NULL == strchr(t, *s)) && (rp < &rb[MAX_TEMPSTR])) { + *rp++ = *s++; + } + + /* finish the return-string and return it */ + *rp = '\0'; + return (rb); +} + +/* warning: + * heavily ascii-dependent. + */ +void mkprint(char *dst, unsigned char *src, int len) { +/* + * XXX + * We know this routine can't overflow the dst buffer because mkprints() + * allocated enough space for the worst case. +*/ + while (len-- > 0) { + unsigned char ch = *src++; + + if (ch < ' ') { /* control character */ + *dst++ = '^'; + *dst++ = ch + '@'; + } + else if (ch < 0177) { /* printable */ + *dst++ = ch; + } + else if (ch == 0177) { /* delete/rubout */ + *dst++ = '^'; + *dst++ = '?'; + } + else { /* parity character */ + sprintf(dst, "\\%03o", ch); + dst += 4; + } + } + *dst = '\0'; +} + +/* warning: + * returns a pointer to malloc'd storage, you must call free yourself. + */ +char *mkprints(unsigned char *src, unsigned int len) { + char *dst = malloc(len * 4 + 1); + + if (dst) + mkprint(dst, src, len); + + return (dst); +} + +#ifdef MAIL_DATE +/* Sat, 27 Feb 1993 11:44:51 -0800 (CST) + * 1234567890123456789012345678901234567 + */ +char *arpadate(time_t *clock) { + time_t t = clock ? *clock : time((TIME_T) 0); + struct tm tm = *localtime(&t); + long gmtoff = get_gmtoff(&t, &tm); + int hours = gmtoff / SECONDS_PER_HOUR; + int minutes = + (gmtoff - (hours * SECONDS_PER_HOUR)) / SECONDS_PER_MINUTE; + static char ret[64]; /* zone name might be >3 chars */ + + (void) sprintf(ret, "%s, %2d %s %2d %02d:%02d:%02d %.2d%.2d (%s)", + DowNames[tm.tm_wday], + tm.tm_mday, + MonthNames[tm.tm_mon], + tm.tm_year + 1900, + tm.tm_hour, tm.tm_min, tm.tm_sec, hours, minutes, TZONE(tm)); + return (ret); +} +#endif /*MAIL_DATE */ + +#ifdef HAVE_SAVED_UIDS + static uid_t save_euid; + static gid_t save_egid; + +int swap_uids(void) { + save_egid = getegid(); + save_euid = geteuid(); + return ((setegid(getgid()) || seteuid(getuid()))? -1 : 0); +} + +int swap_uids_back(void) { + return ((setegid(save_egid) || seteuid(save_euid)) ? -1 : 0); +} + +#else /*HAVE_SAVED_UIDS */ + +int swap_uids(void) { + return ((setregid(getegid(), getgid()) + || setreuid(geteuid(), getuid())) ? -1 : 0); +} + +int swap_uids_back(void) { + return (swap_uids()); +} +#endif /*HAVE_SAVED_UIDS */ + +size_t strlens(const char *last, ...) { + va_list ap; + size_t ret = 0; + const char *str; + + va_start(ap, last); + for (str = last; str != NULL; str = va_arg(ap, const char *)) + ret += strlen(str); + va_end(ap); + return (ret); +} + +/* Return the offset from GMT in seconds (algorithm taken from sendmail). + * + * warning: + * clobbers the static storage space used by localtime() and gmtime(). + * If the local pointer is non-NULL it *must* point to a local copy. + */ +#ifndef HAVE_STRUCT_TM_TM_GMTOFF +long get_gmtoff(time_t * clock, struct tm *local) { + struct tm gmt; + long offset; + + gmt = *gmtime(clock); + if (local == NULL) + local = localtime(clock); + + offset = (local->tm_sec - gmt.tm_sec) + + ((local->tm_min - gmt.tm_min) * 60) + + ((local->tm_hour - gmt.tm_hour) * 3600); + + /* Timezone may cause year rollover to happen on a different day. */ + if (local->tm_year < gmt.tm_year) + offset -= 24 * 3600; + else if (local->tm_year > gmt.tm_year) + offset += 24 * 3600; + else if (local->tm_yday < gmt.tm_yday) + offset -= 24 * 3600; + else if (local->tm_yday > gmt.tm_yday) + offset += 24 * 3600; + + return (offset); +} +#endif /* HAVE_STRUCT_TM_TM_GMTOFF */ diff --git a/cronie-1.4.6/src/pathnames.h b/cronie-1.4.6/src/pathnames.h new file mode 100644 index 0000000..b5d5c70 --- /dev/null +++ b/cronie-1.4.6/src/pathnames.h @@ -0,0 +1,73 @@ +/* Copyright 1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * $Id: pathnames.h,v 1.9 2004/01/23 18:56:43 vixie Exp $ + */ + +#ifndef _PATHNAMES_H_ +#define _PATHNAMES_H_ + +#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX) +# include +#endif /*BSD*/ + +#include "cron-paths.h" + + /* where should the daemon stick its PID? + * PIDDIR must end in '/'. + * (Don't ask why the default is "/etc/".) + */ +#ifdef _PATH_VARRUN +# define PIDDIR _PATH_VARRUN +#else +# define PIDDIR SYSCONFDIR "/" +#endif +#define PIDFILE "crond.pid" +#define _PATH_CRON_PID PIDDIR PIDFILE +#define REBOOT_LOCK PIDDIR "cron.reboot" + + /* what editor to use if no EDITOR or VISUAL + * environment variable specified. + */ +#if defined(_PATH_VI) +# define EDITOR _PATH_VI +#else +# define EDITOR "/usr/ucb/vi" +#endif + +#ifndef _PATH_BSHELL +# define _PATH_BSHELL "/bin/sh" +#endif + +#ifndef _PATH_DEFPATH +# define _PATH_DEFPATH "/usr/bin:/bin" +#endif + +#ifndef _PATH_TMP +# define _PATH_TMP "/tmp" +#endif + +#ifndef _PATH_DEVNULL +# define _PATH_DEVNULL "/dev/null" +#endif + +#endif /* _PATHNAMES_H_ */ diff --git a/cronie-1.4.6/src/popen.c b/cronie-1.4.6/src/popen.c new file mode 100644 index 0000000..3229545 --- /dev/null +++ b/cronie-1.4.6/src/popen.c @@ -0,0 +1,156 @@ +/* $NetBSD: popen.c,v 1.9 2005/03/16 02:53:55 xtraeme Exp $ */ + +/* + * Copyright (c) 1988, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software written by Ken Arnold and + * published in UNIX Review, Vol. 6, No. 8. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#ifdef HAVE_SYS_CDEFS_H +# include +#endif + +#include +#include + +/* + * Special version of popen which avoids call to shell. This insures noone + * may create a pipe to a hidden program as a side effect of a list or dir + * command. + */ +static PID_T *pids; +static int fds; + +#define MAX_ARGS 1024 + +FILE *cron_popen(char *program, const char *type, struct passwd *pw) { + char *cp; + FILE *iop; + int argc, pdes[2]; + PID_T pid; + char *argv[MAX_ARGS]; + ssize_t out; + char buf[PIPE_BUF]; + +#ifdef __GNUC__ + (void) &iop; /* Avoid fork clobbering */ +#endif + + if ((*type != 'r' && *type != 'w') || type[1]) + return (NULL); + + if (!pids) { + if ((fds = getdtablesize()) <= 0) + return (NULL); + if (!(pids = (PID_T *) malloc((u_int) (fds * sizeof (PID_T))))) + return (NULL); + bzero((char *) pids, fds * sizeof (PID_T)); + } + if (pipe(pdes) < 0) + return (NULL); + + /* break up string into pieces */ + for (argc = 0, cp = program; argc < MAX_ARGS; cp = NULL) + if (!(argv[argc++] = strtok(cp, " \t\n"))) + break; + + iop = NULL; + switch (pid = fork()) { + case -1: /* error */ + (void) close(pdes[0]); + (void) close(pdes[1]); + goto pfree; + /* NOTREACHED */ + case 0: /* child */ + if (*type == 'r') { + if (pdes[1] != STDOUT) { + dup2(pdes[1], STDOUT); + dup2(pdes[1], STDERR); /* stderr, too! */ + (void) close(pdes[1]); + } + (void) close(pdes[0]); + } + else { + if (pdes[0] != STDIN) { + dup2(pdes[0], STDIN); + (void) close(pdes[0]); + } + (void) close(pdes[1]); + } + + if (execvp(argv[0], argv) < 0) { + int save_errno = errno; + + log_it("CRON", getpid(), "EXEC FAILED", program, save_errno); + if (*type != 'r') { + while (0 != (out = read(STDIN, buf, PIPE_BUF))) { + if ((out == -1) && (errno != EINTR)) + break; + } + } + } + _exit(1); + } + /* parent; assume fdopen can't fail... */ + if (*type == 'r') { + iop = fdopen(pdes[0], type); + (void) close(pdes[1]); + } + else { + iop = fdopen(pdes[1], type); + (void) close(pdes[0]); + } + pids[fileno(iop)] = pid; + + pfree: + return (iop); +} + +int cron_pclose(FILE * iop) { + int fdes; + sigset_t oset, nset; + WAIT_T stat_loc; + PID_T pid; + + /* + * pclose returns -1 if stream is not associated with a + * `popened' command, or, if already `pclosed'. + */ + if (pids == 0 || pids[fdes = fileno(iop)] == 0) + return (-1); + (void) fclose(iop); + + sigemptyset(&nset); + sigaddset(&nset, SIGINT); + sigaddset(&nset, SIGQUIT); + sigaddset(&nset, SIGHUP); + (void) sigprocmask(SIG_BLOCK, &nset, &oset); + while ((pid = wait(&stat_loc)) != pids[fdes] && pid != -1) ; + (void) sigprocmask(SIG_SETMASK, &oset, NULL); + pids[fdes] = 0; + return (pid == -1 ? -1 : WEXITSTATUS(stat_loc)); +} diff --git a/cronie-1.4.6/src/pw_dup.c b/cronie-1.4.6/src/pw_dup.c new file mode 100644 index 0000000..519dc75 --- /dev/null +++ b/cronie-1.4.6/src/pw_dup.c @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2000,2002 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE + * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +#if !defined(OpenBSD) || OpenBSD < 200105 + +#include +#include +#include +#include + +struct passwd * +pw_dup(const struct passwd *pw) { + char *cp; + size_t nsize=0, psize=0, gsize=0, dsize=0, ssize=0, total=0; + struct passwd *newpw; + + /* Allocate in one big chunk for easy freeing */ + total = sizeof(struct passwd); + if (pw->pw_name) { + nsize = strlen(pw->pw_name) + 1; + total += nsize; + } + if (pw->pw_passwd) { + psize = strlen(pw->pw_passwd) + 1; + total += psize; + } +#ifdef LOGIN_CAP + if (pw->pw_class) { + csize = strlen(pw->pw_class) + 1; + total += csize; + } +#endif /* LOGIN_CAP */ + if (pw->pw_gecos) { + gsize = strlen(pw->pw_gecos) + 1; + total += gsize; + } + if (pw->pw_dir) { + dsize = strlen(pw->pw_dir) + 1; + total += dsize; + } + if (pw->pw_shell) { + ssize = strlen(pw->pw_shell) + 1; + total += ssize; + } + if ((cp = malloc(total)) == NULL) + return (NULL); + newpw = (struct passwd *)cp; + + /* + * Copy in passwd contents and make strings relative to space + * at the end of the buffer. + */ + (void)memcpy(newpw, pw, sizeof(struct passwd)); + cp += sizeof(struct passwd); + if (pw->pw_name) { + (void)memcpy(cp, pw->pw_name, nsize); + newpw->pw_name = cp; + cp += nsize; + } + if (pw->pw_passwd) { + (void)memcpy(cp, pw->pw_passwd, psize); + newpw->pw_passwd = cp; + cp += psize; + } +#ifdef LOGIN_CAP + if (pw->pw_class) { + (void)memcpy(cp, pw->pw_class, csize); + newpw->pw_class = cp; + cp += csize; + } +#endif /* LOGIN_CAP */ + if (pw->pw_gecos) { + (void)memcpy(cp, pw->pw_gecos, gsize); + newpw->pw_gecos = cp; + cp += gsize; + } + if (pw->pw_dir) { + (void)memcpy(cp, pw->pw_dir, dsize); + newpw->pw_dir = cp; + cp += dsize; + } + if (pw->pw_shell) { + (void)memcpy(cp, pw->pw_shell, ssize); + newpw->pw_shell = cp; + cp += ssize; + } + + return (newpw); +} + +#endif /* !OpenBSD || OpenBSD < 200105 */ diff --git a/cronie-1.4.6/src/security.c b/cronie-1.4.6/src/security.c new file mode 100644 index 0000000..add7b1f --- /dev/null +++ b/cronie-1.4.6/src/security.c @@ -0,0 +1,574 @@ +/* security.c + * + * Implement Red Hat crond security context transitions + * + * Jason Vas Dias January 2006 + * + * Copyright(C) Red Hat Inc., 2006 + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include + +#ifdef WITH_SELINUX +# include +# include +# include +# include +# include +#endif + +#ifdef WITH_AUDIT +# include +#endif + +#ifdef WITH_PAM +static pam_handle_t *pamh = NULL; +static int pam_session_opened = 0; //global for open session + +static int +cron_conv(int num_msg, const struct pam_message **msgm, + struct pam_response **response, void *appdata_ptr) +{ + struct pam_message**m = msgm; + int i; + + for (i = 0; i < num_msg; i++) { + switch (m[i]->msg_style) { + case PAM_ERROR_MSG: + case PAM_TEXT_INFO: + if (m[i]->msg != NULL) { + log_it("CRON", getpid(), "pam_message", m[i]->msg, 0); + } + break; + default: + break; + } + } + return (0); +} + +static const struct pam_conv conv = { + cron_conv, NULL +}; + +static int cron_open_pam_session(struct passwd *pw); + +# define PAM_FAIL_CHECK if (retcode != PAM_SUCCESS) { \ + fprintf(stderr,"\n%s\n",pam_strerror(pamh, retcode)); \ + if (pamh != NULL) { \ + if (pam_session_opened != 0) \ + pam_close_session(pamh, PAM_SILENT); \ + pam_end(pamh, retcode); \ + } \ +return(retcode); } +#endif + +static char **build_env(char **cronenv); + +#ifdef WITH_SELINUX +static int cron_change_selinux_range(user * u, security_context_t ucontext); +static int cron_get_job_range(user * u, security_context_t * ucontextp, + char **jobenv); +#endif + +void cron_restore_default_security_context() { +#ifdef WITH_SELINUX + setexeccon(NULL); +#endif +} + +int cron_set_job_security_context(entry * e, user * u, char ***jobenv) { + time_t minutely_time = 0; +#ifdef WITH_PAM + int ret; +#endif + + if ((e->flags & MIN_STAR) == MIN_STAR) { + /* "minute-ly" job: Every minute for given hour/dow/month/dom. + * Ensure that these jobs never run in the same minute: + */ + minutely_time = time(0); + Debug(DSCH, ("Minute-ly job. Recording time %lu\n", minutely_time)) + } + +#ifdef WITH_PAM + if ((ret = cron_start_pam(e->pwd)) != 0) { + log_it(e->pwd->pw_name, getpid(), "FAILED to authorize user with PAM", + pam_strerror(pamh, ret), 0); + return -1; + } +#endif + + *jobenv = build_env(e->envp); + +#ifdef WITH_SELINUX + /* we must get the crontab context BEFORE changing user, else + * we'll not be permitted to read the cron spool directory :-) + */ + security_context_t ucontext = 0; + + if (cron_get_job_range(u, &ucontext, *jobenv) < OK) { + log_it(e->pwd->pw_name, getpid(), "ERROR", + "failed to get SELinux context", 0); + return -1; + } + + if (cron_change_selinux_range(u, ucontext) != 0) { + log_it(e->pwd->pw_name, getpid(), "ERROR", + "failed to change SELinux context", 0); + if (ucontext) + freecon(ucontext); + return -1; + } + if (ucontext) + freecon(ucontext); +#endif +#ifdef WITH_PAM + if ((ret = cron_open_pam_session(e->pwd)) != 0) { + log_it(e->pwd->pw_name, getpid(), + "FAILED to open PAM security session", pam_strerror(pamh, ret), 0); + return -1; + } +#endif + + if (cron_change_user(e->pwd) != 0) { + log_it(e->pwd->pw_name, getpid(), "ERROR", "failed to change user", 0); + return -1; + } + + log_close(); + + time_t job_run_time = time(0L); + + if ((minutely_time > 0) && ((job_run_time / 60) != (minutely_time / 60))) { + /* if a per-minute job is delayed into the next minute + * (eg. by network authentication method timeouts), skip it. + */ + struct tm tmS, tmN; + char buf[256]; + + localtime_r(&job_run_time, &tmN); + localtime_r(&minutely_time, &tmS); + + snprintf(buf, sizeof (buf), + "Job execution of per-minute job scheduled for " + "%.2u:%.2u delayed into subsequent minute %.2u:%.2u. Skipping job run.", + tmS.tm_hour, tmS.tm_min, tmN.tm_hour, tmN.tm_min); + log_it(e->pwd->pw_name, getpid(), "INFO", buf, 0); + return -1; + } + return 0; +} + +int cron_start_pam(struct passwd *pw) { + int retcode = 0; + +#if defined(WITH_PAM) + retcode = pam_start("crond", pw->pw_name, &conv, &pamh); + PAM_FAIL_CHECK; + retcode = pam_set_item(pamh, PAM_TTY, "cron"); + PAM_FAIL_CHECK; + retcode = pam_acct_mgmt(pamh, PAM_SILENT); + PAM_FAIL_CHECK; + retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT); + PAM_FAIL_CHECK; +#endif + + return retcode; +} + +static int cron_open_pam_session(struct passwd *pw) { + int retcode = 0; + +#if defined(WITH_PAM) + retcode = pam_open_session(pamh, PAM_SILENT); + PAM_FAIL_CHECK; + if (retcode == PAM_SUCCESS) + pam_session_opened = 1; +#endif + + return retcode; +} + +void cron_close_pam(void) { +#if defined(WITH_PAM) + if (pam_session_opened != 0) { + pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT); + pam_close_session(pamh, PAM_SILENT); + } + pam_end(pamh, PAM_SUCCESS); +#endif +} + +int cron_change_user(struct passwd *pw) { + pid_t pid = getpid(); + /* set our directory, uid and gid. Set gid first, since once + * we set uid, we've lost root privledges. + */ + if (setgid(pw->pw_gid) != 0) { + log_it("CRON", pid, "ERROR", "setgid failed", errno); + return -1; + } + + if (initgroups(pw->pw_name, pw->pw_gid) != 0) { + log_it("CRON", pid, "ERROR", "initgroups failed", errno); + return -1; + } + + if (setreuid(pw->pw_uid, -1) != 0) { + log_it("CRON", pid, "ERROR", "setreuid failed", errno); + return -1; + } + + return 0; +} + +int cron_change_user_permanently(struct passwd *pw, char *homedir) { + if (setreuid(pw->pw_uid, pw->pw_uid) != 0) { + log_it("CRON", getpid(), "ERROR", "setreuid failed", errno); + return -1; + } + if (chdir(homedir) == -1) { + log_it("CRON", getpid(), "ERROR chdir failed", homedir, errno); + return -1; + } + + return 0; +} + + +static int cron_authorize_context(security_context_t scontext, + security_context_t file_context) { +#ifdef WITH_SELINUX + struct av_decision avd; + int retval; + unsigned int bit = FILE__ENTRYPOINT; + /* + * Since crontab files are not directly executed, + * crond must ensure that the crontab file has + * a context that is appropriate for the context of + * the user cron job. It performs an entrypoint + * permission check for this purpose. + */ + retval = security_compute_av(scontext, file_context, + SECCLASS_FILE, bit, &avd); + if (retval || ((bit & avd.allowed) != bit)) + return 0; +#endif + return 1; +} + +static int cron_authorize_range(security_context_t scontext, + security_context_t ucontext) { +#ifdef WITH_SELINUX + struct av_decision avd; + int retval; + unsigned int bit = CONTEXT__CONTAINS; + /* + * Since crontab files are not directly executed, + * so crond must ensure that any user specified range + * falls within the seusers-specified range for that Linux user. + */ + retval = security_compute_av(scontext, ucontext, + SECCLASS_CONTEXT, bit, &avd); + + if (retval || ((bit & avd.allowed) != bit)) + return 0; +#endif + return 1; +} + +#if WITH_SELINUX +/* always uses u->scontext as the default process context, then changes the + level, and retuns it in ucontextp (or NULL otherwise) */ +static int +cron_get_job_range(user * u, security_context_t * ucontextp, char **jobenv) { + char *range; + + if (is_selinux_enabled() <= 0) + return 0; + if (ucontextp == 0L) + return -1; + + *ucontextp = 0L; + + if ((range = env_get("MLS_LEVEL", jobenv)) != 0L) { + context_t ccon; + if (!(ccon = context_new(u->scontext))) { + log_it(u->name, getpid(), "context_new FAILED for MLS_LEVEL", + range, 0); + return -1; + } + + if (context_range_set(ccon, range)) { + log_it(u->name, getpid(), + "context_range_set FAILED for MLS_LEVEL", range, 0); + return -1; + } + + if (!(*ucontextp = context_str(ccon))) { + log_it(u->name, getpid(), "context_str FAILED for MLS_LEVEL", + range, 0); + return -1; + } + + if (!(*ucontextp = strdup(*ucontextp))) { + log_it(u->name, getpid(), "strdup FAILED for MLS_LEVEL", range, 0); + return -1; + } + context_free(ccon); + } + else if (!u->scontext) { + /* cron_change_selinux_range() deals with this */ + return 0; + } + else if (!(*ucontextp = strdup(u->scontext))) { + log_it(u->name, getpid(), "strdup FAILED for MLS_LEVEL", range, 0); + return -1; + } + + return 0; +} +#endif + +#ifdef WITH_SELINUX +static int cron_change_selinux_range(user * u, security_context_t ucontext) { + char *msg = NULL; + + if (is_selinux_enabled() <= 0) + return 0; + + if (u->scontext == 0L) { + if (security_getenforce() > 0) { + log_it(u->name, getpid(), "NULL security context for user", "", 0); + return -1; + } + else { + log_it(u->name, getpid(), + "NULL security context for user, " + "but SELinux in permissive mode, continuing", "", 0); + return 0; + } + } + + if (strcmp(u->scontext, ucontext)) { + if (!cron_authorize_range(u->scontext, ucontext)) { + if (security_getenforce() > 0) { +# ifdef WITH_AUDIT + if (asprintf(&msg, + "cron: Unauthorized MLS range acct=%s new_scontext=%s old_scontext=%s", + u->name, (char *) ucontext, u->scontext) >= 0) { + int audit_fd = audit_open(); + audit_log_user_message(audit_fd, AUDIT_USER_ROLE_CHANGE, + msg, NULL, NULL, NULL, 0); + close(audit_fd); + free(msg); + } +# endif + if (asprintf + (&msg, "Unauthorized range in %s for user range in %s", + (char *) ucontext, u->scontext) >= 0) { + log_it(u->name, getpid(), "ERROR", msg, 0); + free(msg); + } + return -1; + } + else { + if (asprintf + (&msg, + "Unauthorized range in %s for user range in %s," + " but SELinux in permissive mod, continuing", + (char *) ucontext, u->scontext) >= 0) { + log_it(u->name, getpid(), "WARNING", msg, 0); + free(msg); + } + } + } + } + + if (setexeccon(ucontext) < 0 || setkeycreatecon(ucontext) < 0) { + if (security_getenforce() > 0) { + if (asprintf + (&msg, "Could not set exec or keycreate context to %s for user", + (char *) ucontext) >= 0) { + log_it(u->name, getpid(), "ERROR", msg, 0); + free(msg); + } + return -1; + } + else { + if (asprintf + (&msg, + "Could not set exec or keycreate context to %s for user," + " but SELinux in permissive mode, continuing", + (char *) ucontext) >= 0) { + log_it(u->name, getpid(), "WARNING", msg, 0); + free(msg); + } + return 0; + } + } + return 0; +} +#endif + +int +get_security_context(const char *name, int crontab_fd, + security_context_t * rcontext, const char *tabname) { +#ifdef WITH_SELINUX + security_context_t scontext = NULL; + security_context_t file_context = NULL; + int retval = 0; + char *seuser = NULL; + char *level = NULL; + + *rcontext = NULL; + + if (is_selinux_enabled() <= 0) + return 0; + + if (name != NULL) { + if (getseuserbyname(name, &seuser, &level) < 0) { + log_it(name, getpid(), "getseuserbyname FAILED", name, 0); + return (security_getenforce() > 0); + } + } + + retval = get_default_context_with_level(name == NULL ? "system_u" : seuser, + level, NULL, &scontext); + free(seuser); + free(level); + if (retval) { + if (security_getenforce() > 0) { + log_it(name, getpid(), "No SELinux security context", tabname, 0); + return -1; + } + else { + log_it(name, getpid(), + "No security context but SELinux in permissive mode, continuing", + tabname, 0); + return 0; + } + } + + if (fgetfilecon(crontab_fd, &file_context) < OK) { + if (security_getenforce() > 0) { + log_it(name, getpid(), "getfilecon FAILED", tabname, 0); + freecon(scontext); + return -1; + } + else { + log_it(name, getpid(), + "getfilecon FAILED but SELinux in permissive mode, continuing", + tabname, 0); + *rcontext = scontext; + return 0; + } + } + + if (!cron_authorize_context(scontext, file_context)) { + freecon(scontext); + freecon(file_context); + if (security_getenforce() > 0) { + log_it(name, getpid(), "Unauthorized SELinux context", tabname, 0); + return -1; + } + else { + log_it(name, getpid(), + "Unauthorized SELinux context, but SELinux in permissive mode, continuing", + tabname, 0); + return 0; + } + } + freecon(file_context); + + *rcontext = scontext; +#endif + return 0; +} + +void free_security_context(security_context_t * scontext) { +#ifdef WITH_SELINUX + if (*scontext != NULL) { + freecon(*scontext); + *scontext = 0L; + } +#endif +} + +int crontab_security_access(void) { +#ifdef WITH_SELINUX + int selinux_check_passwd_access = -1; + if (is_selinux_enabled() > 0) { + security_context_t user_context; + if (getprevcon_raw(&user_context) == 0) { + security_class_t passwd_class; + struct av_decision avd; + int retval; + + passwd_class = string_to_security_class("passwd"); + if (passwd_class == 0) { + selinux_check_passwd_access = -1; + fprintf(stderr, "Security class \"passwd\" is not defined in the SELinux policy.\n"); + } + + retval = security_compute_av_raw(user_context, + user_context, + passwd_class, + PASSWD__CRONTAB, + &avd); + + if ((retval == 0) && ((PASSWD__CRONTAB & avd.allowed) == PASSWD__CRONTAB)) { + selinux_check_passwd_access = 0; + } + freecon(user_context); + } + + if (selinux_check_passwd_access != 0 && security_getenforce() == 0) + selinux_check_passwd_access = 0; + + return selinux_check_passwd_access; + } +#endif + return 0; +} + +/* Build up the job environment from the PAM environment plus the +* crontab environment +*/ +static char **build_env(char **cronenv) { +#ifdef WITH_PAM + char **jobenv = cronenv; + char **pamenv = pam_getenvlist(pamh); + char *cronvar; + int count = 0; + jobenv = env_copy(pamenv); + + /* Now add the cron environment variables. Since env_set() + * overwrites existing variables, this will let cron's + * environment settings override pam's */ + + while ((cronvar = cronenv[count++])) { + if (!(jobenv = env_set(jobenv, cronvar))) { + log_it("CRON", getpid(), + "Setting Cron environment variable failed", cronvar, 0); + return NULL; + } + } + return jobenv; +#else + return env_copy(cronenv); +#endif +} diff --git a/cronie-1.4.6/src/structs.h b/cronie-1.4.6/src/structs.h new file mode 100644 index 0000000..fec5186 --- /dev/null +++ b/cronie-1.4.6/src/structs.h @@ -0,0 +1,70 @@ +/* + * $Id: structs.h,v 1.7 2004/01/23 18:56:43 vixie Exp $ + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +typedef struct _entry { + struct _entry *next; + struct passwd *pwd; + char **envp; + char *cmd; + bitstr_t bit_decl(minute, MINUTE_COUNT); + bitstr_t bit_decl(hour, HOUR_COUNT); + bitstr_t bit_decl(dom, DOM_COUNT); + bitstr_t bit_decl(month, MONTH_COUNT); + bitstr_t bit_decl(dow, DOW_COUNT); + int flags; +#define MIN_STAR 0x01 +#define HR_STAR 0x02 +#define DOM_STAR 0x04 +#define DOW_STAR 0x08 +#define WHEN_REBOOT 0x10 +#define DONT_LOG 0x20 +} entry; + + /* the crontab database will be a list of the + * following structure, one element per user + * plus one for the system. + * + * These are the crontabs. + */ +#ifndef WITH_SELINUX +#define security_context_t unsigned +#endif + +typedef struct _user { + struct _user *next, *prev; /* links */ + char *name; + char *tabname; /* /etc/cron.d/ file name or NULL */ + time_t mtime; /* last modtime of crontab */ + entry *crontab; /* this person's crontab */ + security_context_t scontext; /* SELinux security context */ +} user; + +typedef struct _cron_db { + user *head, *tail; /* links */ + time_t mtime; /* last modtime on spooldir */ +#ifdef WITH_INOTIFY + int ifd; +#endif +} cron_db; + /* in the C tradition, we only create + * variables for the main program, just + * extern them elsewhere. + */ diff --git a/cronie-1.4.6/src/user.c b/cronie-1.4.6/src/user.c new file mode 100644 index 0000000..8551aca --- /dev/null +++ b/cronie-1.4.6/src/user.c @@ -0,0 +1,132 @@ +/* Copyright 1988,1990,1993,1994 by Paul Vixie + * All rights reserved + */ + +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* vix 26jan87 [log is in RCS file] + */ + +#include + +static const char *FileName; + +static void +log_error (const char *msg) +{ + log_it ("CRON", getpid (), msg, FileName, 0); +} + +void +free_user (user * u) { + entry *e, *ne; + + free(u->name); + free(u->tabname); + for (e = u->crontab; e != NULL; e = ne) { + ne = e->next; + free_entry(e); + } + free_security_context(&(u->scontext)); + free(u); +} + +user * +load_user (int crontab_fd, struct passwd *pw, const char *uname, + const char *fname, const char *tabname) { + char envstr[MAX_ENVSTR]; + FILE *file; + user *u; + entry *e; + int status, save_errno; + char **envp, **tenvp; + + if (!(file = fdopen(crontab_fd, "r"))) { + int save_errno = errno; + log_it(uname, getpid (), "FAILED", "fdopen on crontab_fd in load_user", + save_errno); + return (NULL); + } + + Debug(DPARS, ("load_user()\n")) + /* file is open. build user entry, then read the crontab file. + */ + if ((u = (user *) malloc (sizeof (user))) == NULL) + return (NULL); + + if (((u->name = strdup(fname)) == NULL) + || ((u->tabname = strdup(tabname)) == NULL)) { + save_errno = errno; + free(u); + errno = save_errno; + return (NULL); + } + + u->crontab = NULL; + + /* init environment. this will be copied/augmented for each entry. + */ + if ((envp = env_init()) == NULL) { + save_errno = errno; + free(u->name); + free(u); + errno = save_errno; + return (NULL); + } + + if (get_security_context(pw == NULL ? NULL : uname, + crontab_fd, &u->scontext, tabname) != 0) { + free_user (u); + u = NULL; + goto done; + } + + /* load the crontab + */ + while ((status = load_env (envstr, file)) >= OK) { + switch (status) { + case ERR: + free_user(u); + u = NULL; + goto done; + case FALSE: + FileName = tabname; + e = load_entry(file, log_error, pw, envp); + if (e) { + e->next = u->crontab; + u->crontab = e; + } + break; + case TRUE: + if ((tenvp = env_set (envp, envstr)) == NULL) { + save_errno = errno; + free_user(u); + u = NULL; + errno = save_errno; + goto done; + } + envp = tenvp; + break; + } + } + +done: + env_free(envp); + fclose(file); + Debug(DPARS, ("...load_user() done\n")) return (u); +} diff --git a/wt-3.1.7a/AUTHORS b/wt-3.1.7a/AUTHORS new file mode 100644 index 0000000..51f617b --- /dev/null +++ b/wt-3.1.7a/AUTHORS @@ -0,0 +1,16 @@ +Wt is being developed jointly by the following authors: + +* Koen Deforche (koen@emweb.be) + Main developer + +* Wim Dumon (wim@emweb.be) + Windows port, hangman example, and tutorial. + +The following people contributed code in the past, but this code is no longer +part of Wt: + +* Abdiel Janulgue (xynopsis@yahoo.com) + Contributed XLObject (template based signal/slot system), which has + been replaced by a Boost.Signals-based signal/slot system + +Many people have contributed patches and bug fixes, see the Changelog diff --git a/wt-3.1.7a/CMakeLists.txt b/wt-3.1.7a/CMakeLists.txt new file mode 100644 index 0000000..101b2ec --- /dev/null +++ b/wt-3.1.7a/CMakeLists.txt @@ -0,0 +1,399 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.4) + +SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE true) + +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0002 OLD) + CMAKE_POLICY(SET CMP0003 OLD) + CMAKE_POLICY(SET CMP0005 OLD) +ENDIF(COMMAND CMAKE_POLICY) + +PROJECT(WT) +SET(CMAKE_MODULE_PATH ${WT_SOURCE_DIR} ${WT_SOURCE_DIR}/cmake) + +SET(VERSION_SERIES 3) +SET(VERSION_MAJOR 1) +SET(VERSION_MINOR 7a) + +SET(WT_SOVERSION 26) +SET(WTEXT_SOVERSION 26) +SET(WTHTTP_SOVERSION 26) +SET(WTFCGI_SOVERSION 26) +SET(WTISAPI_SOVERSION 4) +SET(WTDBO_SOVERSION 26) +SET(WTDBOSQLITE3_SOVERSION 26) +SET(WTDBOPOSTGRES_SOVERSION 26) + +# +# Ubuntu patched this compiler to hell +# gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 +# +EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS --version + OUTPUT_VARIABLE GCC_COMPILER_VERSION +) + +IF(GCC_COMPILER_VERSION MATCHES ".*4\\.4\\.4\\-14ubuntu5.*") + MESSAGE(" ") + MESSAGE(" !!!!! WARNING Your compiler is BUGGY. !!!!! ") + MESSAGE(" ") + MESSAGE(" If possible, upgrade your compiler to e.g. g++ 4.5:") + MESSAGE(" ") + MESSAGE(" $ sudo apt-get install g++-4.5") + MESSAGE(" ") + MESSAGE(" And build using that compiler cmake -DCMAKE_CXX_COMPILER=g++-4.5") + MESSAGE(" ") + MESSAGE(" We will now disable all assertions as a work around, by") + MESSAGE(" building using -DNDEBUG. You will need to define this") + MESSAGE(" also for programs built using Wt") + MESSAGE(" ") + ADD_DEFINITIONS(-DNDEBUG) +ENDIF(GCC_COMPILER_VERSION MATCHES ".*4\\.4\\.4\\-14ubuntu5.*") + +# +# Various things that must be configured by the user or packager ... +# +OPTION(BUILD_EXAMPLES "Build examples" ON) +OPTION(INSTALL_RESOURCES "Install resources directory" ON) +OPTION(ENABLE_GM "Enable GraphicsMagick, for supporting painting to raster images (PNG, GIF, ...) (WRasterImage)" ON) +OPTION(ENABLE_HARU "Enable Haru Free PDF Library, which is used to provide support for painting to PDF (WPdfImage)" ON) +OPTION(ENABLE_EXT "Build Wt Ext library with JavaScript-only widgets (http://extjs.com/)" ON) +OPTION(ENABLE_SQLITE "Build SQLite3 backend for Wt::Dbo" ON) +OPTION(ENABLE_POSTGRES "Build PostgreSQL backend for Wt::Dbo" ON) +OPTION(WT_NO_STD_LOCALE "Build Wt ro run on a system without std::locale support" OFF) +OPTION(WT_NO_STD_WSTRING "Build Wt ro run on a system without std::wstring support" OFF) + +IF(NOT SHARED_LIBS) + IF(WIN32) + OPTION(SHARED_LIBS "Compile shared libraries" OFF) + ELSE(WIN32) + OPTION(SHARED_LIBS "Compile shared libraries" ON) + ENDIF(WIN32) +ENDIF(NOT SHARED_LIBS) + +IF(WIN32) + IF(SHARED_LIBS) + # See http://svn.boost.org/trac/boost/ticket/3465 + SET(WT_NO_BOOST_INTRUSIVE true) + ENDIF(SHARED_LIBS) +ENDIF(WIN32) + +# Fixup Windows declspec stuff +IF(NOT SHARED_LIBS) + SET(WT_STATIC true) + SET(WTHTTP_STATIC true) + SET(WT_EXT_STATIC true) + SET(WTDBO_STATIC true) + SET(WTDBOSQLITE3_STATIC true) + SET(WTDBOPOSTGRES_STATIC true) +ENDIF(NOT SHARED_LIBS) + +IF(NOT MULTI_THREADED) + OPTION(MULTI_THREADED "Build multi-threaded httpd deamon (if possible)" ON) +ENDIF(NOT MULTI_THREADED) + +SET(BUILD_SHARED_LIBS ${SHARED_LIBS}) + +# Default is to use cmake's boost discovery. The default will use wt's own +# boost detection mechanism if one of the following is true: +# - cmake version is too old (prior to 2.6 series) +# - BOOST_COMPILER or BOOST_VERSION was defined (compatibility with existing +# build scripts) +IF(DEFINED BOOST_COMPILER OR DEFINED BOOST_VERSION) + SET(DEFAULT_WT_BOOST_DISCOVERY TRUE) +ELSE(DEFINED BOOST_COMPILER OR DEFINED BOOST_VERSION) + SET(DEFAULT_WT_BOOST_DISCOVERY FALSE) +ENDIF(DEFINED BOOST_COMPILER OR DEFINED BOOST_VERSION) +# There's no decent boost discovery prior to cmake 2.6 +IF(CMAKE_MAJOR_VERSION LESS 2) + SET(DEFAULT_WT_BOOST_DISCOVERY TRUE) +ELSEIF(CMAKE_MAJOR_VERSION EQUAL 2) + IF(CMAKE_MINOR_VERSION LESS 6) + SET(DEFAULT_WT_BOOST_DISCOVERY TRUE) + ELSEIF(CMAKE_MINOR_VERSION EQUAL 6) + IF(CMAKE_TINY_VERSION LESS 2) + # Pau says: 2.6.0 and 2.6.1 are not very good + SET(DEFAULT_WT_BOOST_DISCOVERY TRUE) + ENDIF(CMAKE_TINY_VERSION LESS 2) + ENDIF(CMAKE_MINOR_VERSION LESS 6) +ENDIF(CMAKE_MAJOR_VERSION LESS 2) + +SET(WT_BOOST_DISCOVERY ${DEFAULT_WT_BOOST_DISCOVERY} CACHE BOOL "Use Wt's boost discovery method rather than the cmake 2.6+ method") + + +SET(LIB_INSTALL_DIR "lib" CACHE STRING + "Name for library directory within ${CMAKE_INSTALL_PREFIX}") + +IF(WIN32) + + SET(RUNDIR "c:/witty") # Does not apply to win32 + + IF(NOT DEFINED CONFIGDIR) + SET(CONFIGDIR ${RUNDIR} CACHE STRING "Path for the configuration files") + ENDIF(NOT DEFINED CONFIGDIR) + + SET(USERLIB_PREFIX_DEFAULT "c:/libraries") + IF(MSVC) + SET(BUILD_PARALLEL "/MP" CACHE STRING "MSVC option for parallel builds (/MP or /MPx)") + ENDIF(MSVC) + +ELSE(WIN32) + + SET(RUNDIR "/var/run/wt" CACHE PATH + "Default path for wt session management (only used by FCGI connector; not relative to CMAKE_INSTALL_PREFIX)") + + IF( NOT DEFINED CONFIGDIR ) + SET(CONFIGDIR "/etc/wt" CACHE STRING "Path for the configuration files") + ENDIF( NOT DEFINED CONFIGDIR ) + + SET(USERLIB_PREFIX_DEFAULT "/usr") + +ENDIF(WIN32) + +IF(DEFINED USERLIB_ROOT) # Deprecated <= 3.1.3 + SET(USERLIB_PREFIX ${USERLIB_ROOT} CACHE PATH + "Installation prefix of dependency libraries (by USERLIB_ROOT)") +ELSE(DEFINED USERLIB_ROOT) + SET(USERLIB_PREFIX ${USERLIB_PREFIX_DEFAULT} CACHE PATH + "Installation prefix of dependency libraries") +ENDIF(DEFINED USERLIB_ROOT) + +IF(WIN32) + SET(BOOST_PREFIX_DEFAULT "c:/Program Files/Boost") + OPTION(BOOST_DYNAMIC "Link to boost DLLs (OFF means static link)" OFF) +ELSE(WIN32) + SET(BOOST_PREFIX_DEFAULT ${USERLIB_PREFIX}) +ENDIF(WIN32) + +IF(DEFINED BOOST_DIR) # Deprecated <= 3.1.3 + SET(BOOST_PREFIX ${BOOST_DIR} CACHE PATH + "Installation prefix of boost libraries (by BOOST_DIR)") +ELSE(DEFINED BOOST_DIR) + SET(BOOST_PREFIX ${BOOST_PREFIX_DEFAULT} CACHE PATH + "Installation prefix of boost libraries") +ENDIF(DEFINED BOOST_DIR) + +SET(FCGI_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of fcgi library (overrides USERLIB_PREFIX)") +SET(POSTGRES_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of postgresql library (overrides USERLIB_PREFIX)") +SET(MYSQL_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of mysql and mysql++ libraries " + "(overrides USERLIB_PREFIX)") +SET(SQLITE3_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of sqlite3 library (overrides USERLIB_PREFIX)") +SET(HARU_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of libharu library (overrides USERLIB_PREFIX)") +SET(SSL_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of SSL library (overrides USERLIB_PREFIX)") +SET(ZLIB_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of zlib library (overrides USERLIB_PREFIX)") +SET(GM_PREFIX ${USERLIB_PREFIX} CACHE PATH + "Installation prefix of GraphicsMgick library (overrides GM_PREFIX)") + +OPTION(DEBUG "Support for debugging, must be enabled also in wt_config.xml" OFF) +IF(CYGWIN) + OPTION(BUILD_TESTS "Build Wt tests" OFF) +ELSE(CYGWIN) + OPTION(BUILD_TESTS "Build Wt tests" ON) +ENDIF(CYGWIN) + +ADD_DEFINITIONS(-DWT_WITH_OLD_INTERNALPATH_API) +IF(CYGWIN) + ADD_DEFINITIONS(-D__USE_W32_SOCKETS) +ENDIF(CYGWIN) + +MARK_AS_ADVANCED( CONFIGDIR ) +SET(CONFIGURATION "${CONFIGDIR}/wt_config.xml" CACHE PATH "Path to the wt configuration file") +SET(WTHTTP_CONFIGURATION ${CONFIGDIR}/wthttpd CACHE PATH "Path for the wthttpd configuration file") + +SET(WEBUSER apache CACHE STRING "Webserver username (e.g. apache or www)") +SET(WEBGROUP apache CACHE STRING "Webserver groupname (e.g. apache or www or users)") +IF(WIN32) + SET(CONNECTOR_FCGI FALSE) + IF(NOT MINGW) + OPTION(CONNECTOR_ISAPI "Compile in ISAPI connector (libwtisapi) ?" ON) + ENDIF(NOT MINGW) +ELSE(WIN32) + OPTION(CONNECTOR_FCGI "Compile in FCGI connector (libwtfcgi) ?" ON) + SET(CONNECTOR_ISAPI OFF) +ENDIF(WIN32) +OPTION(CONNECTOR_HTTP "Compile in stand-alone httpd connector (libwthttp) ?" ON) +SET(EXAMPLES_CONNECTOR wthttp CACHE STRING "Connector used for examples") + +INCLUDE(cmake/WtFindBoost.txt) +INCLUDE(cmake/WtFindFcgi.txt) +INCLUDE(cmake/WtFindZlib.txt) +INCLUDE(cmake/WtFindSsl.txt) +INCLUDE(cmake/WtFindMysqlpp.txt) +INCLUDE(cmake/WtFindPostgresql.txt) +INCLUDE(cmake/WtFindAsciidoc.txt) +INCLUDE(cmake/WtFindHaru.txt) +INCLUDE(cmake/WtFindGm.txt) + +FIND_PACKAGE(Qt4) +IF(QT_FOUND) + INCLUDE(${QT_USE_FILE}) +ENDIF(QT_FOUND) + +INCLUDE(FindThreads) + +IF(NOT BOOST_WT_FOUND) + SET(ERR + "Could not find a boost installation in " ${BOOST_PREFIX} ".\n\n" + "There are two methods in Wt to find boost:\n\n" + "1. Find boost through cmake (recommended)\n" + "This requires cmake 2.6, and is in " + "that case the default (unless BOOST_COMPILER or BOOST_VERSION is " + "defined). This method requires a multi-threaded boost installation.\n" + "You may need to add your boost version number to " + "Boost_ADDITIONAL_VERSIONS, and/or set BOOST_PREFIX to the location " + "where boost is installed.\n\n" + "2. Use the Wt-proprietary method to find boost.\n" + "This requires you to define three variables:\n" + "BOOST_PREFIX: set to the directory where you installed boost\n" + "BOOST_COMPILER: set to the compiler signature as you find them in " + "library names (e.g.: gcc42)\n" + "BOOST_VERSION: set to the boost version, again as you find them in " + "the library names (e.g.: 1_38)\n\n" + "Note 1: WT_BOOST_DISCOVERY is the variable that selects the boost " + "discovery method. When set to false, method 1 is used (default if " + "cmake version is recent enough and BOOST_COMPILER and BOOST_VERSION " + "are not defined). When set to true, method 2 is used.\n" + "Note 2: the code to discover boost is located in cmake/WtFindBoost.txt\n" + "Note 3: on windows, set BOOST_PREFIX to the full path, eg " + "c:/Program Files/boost/boost_1_38\n\n" + "Wt requires the following C++ boost libraries: date_time, regex, program_options, signals, and optionally thread") + MESSAGE(FATAL_ERROR ${ERR}) +ENDIF(NOT BOOST_WT_FOUND) + +IF(BOOST_WT_MT_FOUND) + IF(MULTI_THREADED) + MESSAGE("** Enabling multi threading.") + SET(MULTI_THREADED_BUILD true) + + ADD_DEFINITIONS(-DWT_THREADED -D_REENTRANT -DBOOST_SPIRIT_THREADSAFE) + ELSE(MULTI_THREADED) + MESSAGE("** Disabling multi threading.") + SET(MULTI_THREADED_BUILD false) + + ADD_DEFINITIONS(-DBOOST_DISABLE_THREADS -DSQLITE_THREADSAFE=0) + ENDIF(MULTI_THREADED) +ELSE(BOOST_WT_MT_FOUND) + SET(MULTI_THREADED_BUILD false) + MESSAGE("** Disabling multi threading: could not find multi-threaded boost libraries") + ADD_DEFINITIONS(-DBOOST_DISABLE_THREADS -DSQLITE_THREADSAFE=0) +ENDIF(BOOST_WT_MT_FOUND) + +FIND_PACKAGE(Doxygen) + +# Boost is used nearly everywhere, so we can put these here +INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIRS}) +LINK_DIRECTORIES(${BOOST_LIB_DIRS}) +IF(WIN32) + IF(BOOST_DYNAMIC) + ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) + ELSE(BOOST_DYNAMIC) + # You could expect that this is the default when BOOST_ALL_DYN_LINK + # is not set, but this is problematic for cygwin + ADD_DEFINITIONS(-DBOOST_THREAD_USE_LIB) + ENDIF(BOOST_DYNAMIC) + ADD_DEFINITIONS( + -D_CRT_SECURE_NO_WARNINGS + -Dinline=__inline + -D_SCL_SECURE_NO_WARNINGS + ) +ENDIF(WIN32) + +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(DEBUG) + SET(WT_DEBUG_ENABLED 1) +ELSE(DEBUG) + SET(WT_DEBUG_ENABLED 0) +ENDIF(DEBUG) + +ADD_CUSTOM_TARGET(doc) + +IF (ASCIIDOC_FOUND) + MACRO (ASCIIDOC_FILE target infile outfile) + ADD_CUSTOM_TARGET(${target} + ${ASCIIDOC_EXECUTABLE} -a toc -a numbered -o ${outfile} ${infile} + COMMENT "Asciidoc ${infile}") + ADD_DEPENDENCIES(doc ${target}) + ENDMACRO (ASCIIDOC_FILE) +ENDIF (ASCIIDOC_FOUND) + +IF (DOXYGEN_FOUND) + ADD_CUSTOM_TARGET(doxygen + ${DOXYGEN_EXECUTABLE} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Doxygen ...") + ADD_DEPENDENCIES(doc doxygen) + ADD_CUSTOM_TARGET(doxygen-examples + ${DOXYGEN_EXECUTABLE} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/examples + COMMENT "Doxygen for examples ...") + ADD_DEPENDENCIES(doc doxygen-examples) + ENDIF (DOXYGEN_FOUND) + +SUBDIRS(src) + +IF(BUILD_EXAMPLES) + IF(WIN32) + SUBDIRS(examples) + ELSE(WIN32) + SUBDIRS(EXCLUDE_FROM_ALL examples) + ENDIF(WIN32) +ENDIF(BUILD_EXAMPLES) + +IF(BUILD_TESTS) + SUBDIRS(test) +ENDIF(BUILD_TESTS) + +IF( NOT DEFINED WT_CMAKE_FINDER_INSTALL_DIR ) + SET( WT_CMAKE_FINDER_INSTALL_DIR "share/cmake-2.4/Modules" ) +ENDIF( NOT DEFINED WT_CMAKE_FINDER_INSTALL_DIR) + +INSTALL(FILES ${PROJECT_SOURCE_DIR}/cmake/FindWt.cmake DESTINATION + ${CMAKE_INSTALL_PREFIX}/${WT_CMAKE_FINDER_INSTALL_DIR} ) + +IF(INSTALL_RESOURCES) +INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/resources DESTINATION + ${CMAKE_INSTALL_PREFIX}/share/Wt/) +ENDIF(INSTALL_RESOURCES) + +IF(NOT EXISTS ${DESTDIR}${CONFIGDIR}/wt_config.xml) + INSTALL(FILES ${WT_BINARY_DIR}/wt_config.xml DESTINATION ${CONFIGDIR}) +ENDIF (NOT EXISTS ${DESTDIR}${CONFIGDIR}/wt_config.xml) + +IF(ENABLE_HARU AND HARU_FOUND) + SET(HAVE_HARU ON) + SET(WT_HAS_WPDFIMAGE true) +ENDIF(ENABLE_HARU AND HARU_FOUND) + +IF(ENABLE_GM AND GM_FOUND) + SET(HAVE_GM ON) + SET(WT_HAS_WRASTERIMAGE true) +ENDIF(ENABLE_GM AND GM_FOUND) + +# Compile time constants & make sure our build finds it +FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Wt) +SET(WCONFIG_H_PATH ${CMAKE_CURRENT_BINARY_DIR}/Wt/WConfig.h) +CONFIGURE_FILE( + ${WT_SOURCE_DIR}/WConfig.h.in + ${WCONFIG_H_PATH} +) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +INSTALL_FILES(/include/Wt FILES ${WCONFIG_H_PATH}) + +# Generate wt_config.xml from wt_config.xml.in +CONFIGURE_FILE( + ${WT_SOURCE_DIR}/wt_config.xml.in + ${WT_BINARY_DIR}/wt_config.xml +) + diff --git a/wt-3.1.7a/Changelog b/wt-3.1.7a/Changelog new file mode 100644 index 0000000..7ca3e45 --- /dev/null +++ b/wt-3.1.7a/Changelog @@ -0,0 +1,3066 @@ +30-11-2010: + * fixed a regression in layout managers, released as 3.1.7a + +27-11-2010: + * js/StdGridLayout.js: implement rowspan handling + +26-11-2010: + * released 3.1.7 + +24-11-2010: + * WAbstractItemView: added support for column hiding + +23-11-2010: + * Chart/WCartesianChart: support ToolTipRole data using WAbstractArea + areas + +15-11-2010: + * Dbo/Sesion: add rereadAll() + + * Wt.js: fix IE6-8 history management regression + +10-11-2010: + * QueryModel: setData() now converts the incoming type to the database + field type (if possible), and also uses a transaction to persist the + result (if not nested in another transaction) + +08-11-2010: + * WebSession: landed Web Sockets support, must be enabled in the + configuration file + +05-11-2010: + * Wt.js: fix opera script loading indicating failure when loading from + cache + +02-11-2010: + * WebSession: initialize() in first notify() + + * WStringUtil: fix a bug in widen() when the underlying conversion + gives an error + + * build: fixes suggested by Pau + +29-10-2010: + * Wt 3.1.6 released + +28-10-2010: + * WebSession: use sequence instead of random numbers for resources + + * WebRenderer: be resilient to multiple GET requests for the main + script + + * WApplication: unload() does not quite() when reload-is-new-session + is disabled + + * WebRenderer: fix regression where timers are stopped by refreshing + a session when reload-is-new-session is disabled + +27-10-2010: + * examples/feature/dbo: added examples from the Wt::Dbo tutorial + + * WPushButton: added setRef() and setResource() APIs to make a button + behave like an anchor + + * WString::widen() and WString::narrow(): fix broken implementation + +26-10-2010: + * WMessageResourceBundle: better preservation of white-space when + parsing the XML resource bundle + +25-10-2010: + * WFileUpload: added setMultiple() which alows multiple files to + be uploaded at once (and demonstrate in composer example) + + * Http/Request: changed UploadedFileMap typedef from std::map to + std::multimap + + * WAbstractItemView: added methods sortColumn() and sortOrder() + +22-10-2010: + * WFileUpload, WResource: support upload progress tracking (currently + only with wthttpd) + +21-10-2010: + * various: support IE9 in IE9 document mode, enabling HTML5 features + like canvas and disabling workarounds no longer needed -- hooray ! + +19-10-2010: + * WPopupMenu: fix recycling of popup menu + +18-10-2010: + * WSignal: EventSignal::connect(): added an overload which accepts + a JavaScript function, as a short-cut for JSlot when connection + management is not needed + + * WSpinBox: a spin box is in the making + + * WApplication: deprecated getUpdateLock() in favour of the more + conventional RIIA UpdateLock(WApplication *app) constructor + + * WebSession: do not access WebSession shared_ptr during ~WebSession + but allow acquiring the update lock to fail instead when an application + is slated for destruction (#564) + + * SyncLock: an adaptor for a Boost Mutex lock which avoids dead-locks + when used while holding an application lock + +15-10-2010: + * WApplication: addMetaHeader() allows now to set http-equiv meta + headers and override the X-UA-Compatible meta header + +14-10-2010: + * WWebWidget: reimplemented buggy clear() optimisation. + +12-10-2010: + * WBoostAny: added registerType() method to register + new types for boost::any support by standard item views. + +11-10-2010: + * Dbo/WtSqlTraits, Dbo/backends: added support for WTime + + * Dbo/QueryModel: added support for customized header data, and + option for setQuery() to keep the current columns. + + * js/StdGridLayoutImpl: use parent node geometry for detecting need + for relayout, fixes IE7+ behaviour + +07-10-2010: + * WTableView, WTreeView, *ProxyModel: shift model indexes only after + the source model has inserted or removed rows, see bug #546 + + * WProgressBar: added valueChanged() and progressCompleted() signals, + from Omer Katz. + +05-10-2010: + * CMakeLists.txt: patch for gentoo, make many things optional which + can be enabled or disabled explicitly regardless of whether the + libraries and header files for it are found + +01-10-2010: + * WebController, WebSession: use shared_ptr for WebSession to resolve + concurrency bug #544 + + * Wt::Dbo: use a spirit based parser for sql queries to handle more + complex queries like 'WITH ... SELECT ...' syntax, but also with + complex aggregate functions in the SELECT clause. + +28-09-2010: + * WDatePicker: add setGlobalPopup() method which can be used to avoid + clipping problems on a date picker + + * WDatePicker: add setPopupVisible() method + + * Http/Request: add getRanges(), parsing the HTTP 1.1 Ranges header + + * Http/Response: add setContentLength() allowing you to specify the + content length. + + * WFileResource: support ranges to return partial file contents. + +27-09-2010: + * WMenuItem: destructor now cleans up properly + + * all connectors: consider appRoot as the location for the + wt_config.xml file and provide ways to configure appRoot for + wthttp and fastcgi connectors. + +22-09-2010: + * WProgressBar: based on a contribution by Thomas Suckow. + +21-09-2010: + * WRegExpValidator, WSortFilterProxyModel: support case-insensitive + regular expressions + + * WSuggestionPopup: optimized behaviour w.r.t server-side and + client-side filtering + +20-09-2010: + * WApplication: added makeAbsoluteUrl() method. + + * WPopupMenuItem: support setDisabled(). + +16-09-2010: + * WPaintDevice: remove paintFlags() method; PaintUpdate is a property of + the painted widget, and no longer something which has to do with + WPainter. In this we revert to the old behaviour of supporting multiple + WPainters on a single paint device in turn. + +14-09-2010: + * Wt.js: fix JavaScript memory leak after learning about the + surprising JavaScript scoping rules + + * WApplication: add unload() and setConfirmCloseMessage() to handle the + event of the user closing the window respectively have a confirmation + + * WInteractWidget, WMouseEvent: add mouseWheel() event + + * WTabWidget: fixed polished style close icon, and wrapping to next line + if having many tabs + + * WFormWidget: implement hasFocus() + + * WLineEdit, WTextArea: implements methods for retrieving cursor + position and current selection + +08-09-2010: + * WCheckBox: better tri-state support, using opacity: 0.5 as + workaround instead of an image + +07-09-2010: + * WBoxLayout, WGridLayout: improved client-side performance by + selectively doing relayout + + * WDate, WCalendar, WDatePicker, ...: support i18n through built-in + message resource bundle and get rid of ugly i18n bool in API + +23-08-2010: + * fcgi: fix connector when using WDialog::exec() or server push + (this is broken in 3.1.4!) + + * WSocketNotifier: finally (!) this beast works as advertised + +10-08-2010: + * isapi: various improvements + + * WSignal: SLOT/slots macro can be disabled using -DWT_NO_SLOT_MACROS + + * examples: cleanups to use appRoot() and no longer use SLOT() macro + +02-08-2010: + * WBatchEditProxyModel: a model that caches editing until submitted + in batch (or reverted) + + * Dbo/QueryModel: remove edit strategy, this is now handled by + WBatchEditProxyModel + + * WModelIndex: clarify usage when model rows/columns shift, implement + in-place toRaw/fromRaw conversion + + * WDialog: add titleBar() to access the title bar + +30-07-2010: + * Dbo/Query: support 'select distinct/all' syntax, and case-insenstive + query parsing + +29-07-2010: + * WSuggestionPopup: misc improvements to server-side filtering, fixing + rendering glitches + + * examples/feature/suggestionpopup: example demonstrating WSuggestionPopup + features + +27-07-2010: + * WRasterImage: Graphicsmagick backend implementation for WPaintDevice, + sponsorted by Eurofer, can be used for PNG, GIF, etc... output + +22-07-2010: + * WPdfImage: PDF backend implementation for WPaintDevice, + sponsored by Eurofer. + + * http/Reply.C: enable compression for image/svg+xml mime-type. + + * WInteractWidget: suppress click and double click mouse events when + disabled + +20-07-2010: + * Wt/WTreeNode: added insertChildNode(), as suggested by + Aleksey Chirkin + +19-07-2010: + * isapi: added a (first implementation) of an ISAPI connector, + which provides native support in Microsft IIS. + + * WebSession: fix one possible race condition, and one possible dead-lock + when grabbing the session lock + + * Dbo/QueryModel: implement write support (setData(), insertRows(), + and removeRows()) + +15-07-2010: + * Wt::Dbo: adds support for natural keys, including composite + keys, custom id and version field names, and foreign key + constraint definition that is compatible with mysql's broken sql. + + * Wt::Dbo: Dbo base class is now changed to Dbo template + class to take into account customizable id type. + +14-07-2010: + * resizable layout managers: reset total width percentage of all + remaining columns to 100 + + * WCanvasPaintDevice: fix transformation bug + +07-07-2010: + * examples/feature/serverPush: fix WIN32 build problem + + * Chart/WCartesianChart: fix clipping margin glitch + + * Dbo/QueryModel: fix missing implementation fields() method + + * WAbstractToggleButton: fix disabled/readonly properties #423 + + * WApplication: useStyleSheet(): allow media to be specified + + * WCanvasPaintDevice: fix font rendering glitch + + * WTableView: improved keyboard navigation through editors + +30-06-2010: + * WTabWidget, WMenu: support for closing, hiding and disabing + items, contributed by Dmitriy Igrishin + + * Wt::Dbo: fix boost::optional support + + * WAbstractItemView: build fix for MSVC in non-Latin locales + + * WAbstractItemModel: copyData() does first nullify existing data + + * WSuggestionPopup: fix bug in handling of model row removal + + * WWebWidget, WebRenderer: fix statelss slot learning bug when a + stubbed widget is affected (see treelist example) + + * WWebWidget: fix addStyleClass(), removeStyleClass() + implementations with force=true (from Dmitriy Igrishin) + + * WTableView: improved handling of arrow keys for navigating editors + +10-06-2010: + * WTableView, WTreeView: workaround IE bug w.r.t. white-space: nowrap + + * Chart/WCartesianChart: added createLegendItemWidget() to paint the + legend item outside the chart + + * WItemDelegate, WAbstractItemView: add support for validation + + * WBorderLayout: add missing setSpacing() method to control internal + spacing + + * WWidget: addStyleClass() and removeStyleClass() (finally!) + + * WContainerWidget: workaround scrolling bug in IE caused by + position: relative + + * WEnvironment: agent() and agentIsXXX() methods + + * WSvgImage: give in to inkscape's CSS font needs + + * WHTML5Video, WHTML5Audio: HTML5 video and audio support + + * WSuggestionPopup: implement explicit trigger (icon, key down) + + * WTreeNode: support selection by click on whole row + + * WWebWidget: added doJavaScript() + + * examples/blog: improved support for MSVC builds, new feature allowing + profile editing + + * examples/feature/serverpush: simple example illustrating use of + server push + +20-05-2010: + * build: added support for cygwin + +19-05-2010: + * WMenu: fix first selection not emitting internal path change (dmitry) + + * WTableView: properly react to model changes + + * WItemDelegate: explicit focus support + +18-05-2010: + * Chart/WChart2DRenderer: fix rendering glitch when rendering grids + +13-05-2010: + * WInteractWidget: added mouseDragged() + + * WApplication: added addMetaHeader() + +10-05-2010: + * WTableView: now supports (almost) same API as WTreeView, with the + similar style, but better performance for tabular data. + + * WTableView, WTreeView, WAbstractItemView: support non-AJAX rendering + using a paging bar. + + * WAbstractItemDelegate, WItemDelegate, WAbstractItemView: + supports editing + + * Dbo/QueryModel: a Wt model for viewing data from a Dbo::Query + result (a first version). + + * Dbo/SqlTraits: sql_result_traits was renamed to query_result_traits, + and its API updated to allow more robust query creation and result + interpretation as a list of boost::any's + + * Signal: SignalBase and EventSignalBase are now documented API + + * WFlashObject: reimplemented: no longer relies on JavaScript to load + the flash movie. WFlashObject no longer uses SwfObject.js. The objects + will also be resized when inserted in a layout manager. + + * WHTML5Video: HTML-5 video implementation, will become part of + generic video support later + + * http/Reply.C, http/StaticReply.C: support for http range header + and partial content + + * web/CgiParser.C: fix parsing logic error for multi-part/formdata + +28-04-2010: + * WTimer: implement singleShot(f) with f a function object variant + +21-04-2010: + * WMenu: support usage without contentsStack_ + + * rapidxml.hpp: fix bug #344 (some special entity characters not being + handled properly) + + * examples/planner: new example illustrating simple dbo usage + +20-04-2010: + * Dbo/SqlConnectionPool, Dbo/FixedSqlConnectionPool: connection pool + implementations + + * Dbo/Query: support for several bind strategies, including a new + DynamicBinding strategy which supports incremental query + specification + + * Dbo/Session: add execute() method for executing SQL that does not + return results + +08-04-2010: + * Http/Request: added headerValue() + +07-04-2010: + * WSuggestionPopup: add setFilterLength() and filterModel() methods + which allow for server-side filtering based on initial input. Also + support setMaxSize() to specifiy maximum height of the popup and + scrolling through the list of suggestions + +30-03-2010: + * WPanel: make titleBarWidget() public + +26-03-2010: + * Wt/WShadow, Wt/WPainter: add support for drop shadows + + * Wt/Chart/WDataSeries, Wt/Chart/WChart2DRenderer: add support for shadows + +25-03-2010: + * Wt/Dbo/backend: provide generic properties() and API clean-ups + +24-03-2010: + * Wt/Dbo/Query: also support queries without 'from' or 'select' + + * Wt/Dbo/DbAction.C: create indexes on join table for each referenced + table id + + * Wt/Dbo: support schema-qualified tables + +23-03-2010: + * Wt/Dbo/Postgres, Wt/Dbo/Sqlite3: add proper support for dates, + time stamps, binary blobs, var chars + +19-03-2010: + * WCheckBox, WRadioButton: fix inconsistencies when setting style + attributes and they have a non-empty label + +15-03-2010: + * Dbo/backend/Postgres: a PostgreSQL backend, contributed by Hilary + Cheng + +12-03-2010: + * EscapeOStream, WSvgImage: a host of performance improvements by + tossing away stringstream in favour of a simple SStream + + * WWidget: add setLayoutSizeAware() and layoutSizeChanged() methods + +08-03-2010: + * WResource: add setInternalPath() to deploy a resource at a + deterministic URL + +05-03-2010: + * WebSession: add support for http PUT/DELETE methods. + + * src/Http/Request: add method() to access request method + + * src/Http/Response: add setStatus() to set the response status + +03-03-2010: + * WCalendar: add HorizontalHeaderFormat enum (long day name support), + currentPageChanged signal, clicked signal, activated signal, + SelectionMode enum (NoSelection mode support), renderCell() virtual + method + +01-03-2010: + * WGridLayout, WBoxLayout: add support for user resizing ('splitter') + functionality + + * WTreeView, WGridLayout: externalize JS + +25-02-2010: + * src/Wt/WString: fix narrow() and widen() character encoding + conversions + + * http connector: spool large POSTs to a temporary file instead + of in-memory, and avoid extra copies + + * web/CgiParser.C: skip large file uploads entirely (instead of + erroneously buffering them to memory) + +22-02-2010: + * Dbo/StdSqlTraits: support float and double + + * WApplication: missing initialization messes up refresh() by reload + + * WPainter: now has defined behavior when missing horizontal or vertical + alignment flags in drawText() + +18-02-2010: + * web/EscapeOStream.C: fix build error on MSVC + + * Wt 3.1.1 released + +12-02-2010: + * mxml: replace mxml with an (adapted) rapidxml browser. + +28-01-2010: + * Ext/Container.C, WStackedWidget.C: fixed behavior in combination + with layout managers + +25-01-2010: + * WTreeView.C: simplified column resize handling code + +22-01-2010: + * WCanvasPaintDevice: Use HTML5 native canvas text when available + +21-01-2010: + * WSuggestionPopup, WTree, WTreeNode, & co: make CSS themed + +18-01-2010: + * Dbo: additional optional parameter to hasMany() allows the + definition of the joinId in the joinTable (you need this if you + are doing Many-to-Many between the same table). + + * WDateTime, WTime: fix AM/PM parsing problem + + * Dbo/SqlStatement: explicit null binding, since SQLite3 does not + reset bindings on reset() + + * WTreeView: fix ite column 0 changing + +12-01-2010: + * WTemplate: do not rerender bound widgets when rerendering the + template if the widget was already rendered + +11-01-2010: + * themes/polished: several improvements + + * WPanel, WCalendar, WDatePicker, WDialog: improved theme support + + * WTreeView: several bug fixes and improved IE bug workaround support + +05-01-2010: + * Chart/WAxis: added setLabelFont(), labelFont() methods + + * WTreeNode: fix selection handling when removing and readding a node + + * Boot.html, Hybrid.html: fix an XSS vulnerability arising from the + internal path + +04-01-2010: + * Wt.js, CommAjax.js, CommScript.js: support communication problems + by retrying with exponential back-off + +31-12-2009: + * Dbo: quote all identifiers + + * WContainerWidget: support resetting a layout manager + +29-12-2009: + * Release 3.1.0, after some more bug fixes + +22-12-2009: + * Ext/FormWidget: add changed(), blurred() and focussed() signals + +21-12-2009: + * WTemplate: add handleUnresolvedVariable() from Maurice Gittens + + * WMenu: sanitize internal path handling + + * documentation: integrate asciidoc and doxygen in CMake (target + 'doc'), and improve Wt::Dbo documentation + +18-12-2009: + * WTreeView: fix treeview column add/remove glitches with column 1 fixed + +17-12-2009: + * WSlider: correct upside down behavior of WSlider, use more accurate + position handling + +15-12-2009: + * Wt/Dbo: new C++ ORM layer + + * test/: automated test suite (for non-GUI features) + + * src/Wt/WTemplate: new XHTML template-based widget + + * examples/blog: new example that implements a blog using Wt and + Wt::Dbo + + * src/Wt/WDateTime, src/Wt/WTime: date time and time classes + +15-12-2009: + * CMakeLists.txt: add XML_FEATURES option which can be used to disable + the (mini-)XML library + +11-12-2009: + * WPaintedWidget, Ext::Container: properly react to resizes within + a Wt layout manager, both width and height + + * StdGridLayoutItem.C, Ext::Widget: concatenate html and body style + classes to not have interference + +09-12-2009: + * WDataSeries: added setHidden(bool) and isHidden() + + * WCartesianChart: added renderLegendIcon() + + * WTextEdit: fix updating of contents + +07-12-2009: + * WWidget: added isRendered(), let widgets keep track of being rendered + + * WSignal: added connect(Function& f) method + +04-12-2009: + * src/web/skeleton/Wt.js: added getSelectionRange and setSelectionRange + utility functions for line edits and text areas + +30-11-2009: + * src/mxml: updated to an unmodified mxml-2.6 (which includes our bug + UTF-8 bug fixes) + +25-11-2009: + * all: added support for CSS-based themes. + + * WAbstractItemModel, WAggregateProxyModel, WTreeView: addded support + for drilling down through treeview columns + + * WSlider: added sliderMoved() signal + + * Chart/WAxis: added setAutoLimits() and autoLimits() methods, and have + maximum() and minimum() return computed values + + * Chart/WCartesianChart: use MarkerPenColorRole and + MarkerBrushColorRole to override colors for markers per data point + + * WCanvasPaintDevice: several improvements for outputting more + concise JavaScript rendering statements + + * WWidget: add find() method to find a widget with a particular + objectName() + + * WFileUpload: fileTooLarge() signal now propagates within the + event loop + +10-11-2009: + * Chart/WCartesianChart, Chart/WDataSeries: added mapFromDevice() and + mapToDevice() methods. + +03-11-2009: + * WTreeView: fix for adding a first row to an otherwise empty model + (from Guy De Leeuw) + +03-11-2009: + * 3.0.0: released! + +21-10-2009: + * WMenu: set correct internal path before loading a menu item + +09-10-2009: + * WAxis: add TimeDateScale to AxisScale enum + +28-09-2009: + * WCartesianChart: seriesIndexOf() is now private + + * WebRenderer: several small fixes for the hybrid bootstrap + +23-09-2009: + * WTableView: table_ is now private and a protected getter table() was + added + +18-09-2009 + * Wt.js: cancelEvent() includes an option to only include cancelling + propagation or the default action + + * WResource: add setChanged() and url() methods which are more + useful than the generateUrl() method + + * http/RequestParser: fix possible shared_ptr corruption issue + reported by David Galicia + + * WCssDecorationStyle: add method for WResource as background + image + + * JSlot: fix internal consistency problem when connecting same + JSlot to same signal twice + + * JSlot::exec() now takes parameters for object and event + + * WTreeView: fix vertical scrolling showing mis-aligned columns + when column 1 is fixed + +15-09-2009: + * WWidget: move WFormWidget::setEnabled() to WWidget::setDisabled(), + allowing all widgets to be set enabled or disabled. + + * WWidget: isVisible() and isEnabled() reflect the computed visibility + respectively being enabled taking int account ancestors settings + + * WWidget: added setHiddenKeepsGeometry(), which uses css visibility + for setHidden() + +03-09-2009: + * WDialog, Ext::Dialog, and related: allow for multiple modal dialogs + and nested exec() calls. + + * Boot.html, Hybrid.html: add a loadScript() method to defer loading of + user JavaScript + +01-09-2009 + * WDatePicker: Use 'positionAtWidget' to make sure the widget + is rendered visible even if at bottom of page (folds up instead of down) + + * WDialog: Fix JavaScript positioning for IE6 + + * WFileUpload: Fix empty file regression (#53) + +31-08-2009 + * Wt.js: fix server push mayhem + + * WTreeView: fix autoJavaScript performance + + * Wt.js: fix mouse capture on IE, fix mouse capture of mouse up when + dragging outside the window + + * Wt.js: fix synchronisation issue with 'load' request and loading + of JS libraries + + * Wt.js, DomElement: use setExpression() to set a CSS expression + (for min/max-width) + + * WApplication: fix conditional stylesheet condition parse error + with 'gte' expression + +26-08-2009 + * Wt.js: attach mouse grab events to body using DOM event + capture + + * HybridBoot.html, WebSession, WebRenderer: assimilate new + bootstrap method with a refactoring, make it all a bit less + stateful + + * WApplication: notify() can now be used as a generic request + handling point where you grab and free request-specific + resources + +22-08-2009 + * fcgi/Sever.C: make multi-threaded, using the + number of threads + +19-08-2009 + * ProgressiveBoot.html, WebSession, WebRenderer: a new bootstrap + method has been added which implements the principle of + "progressive enhancement" + + * WebSession, Boot.html: avoid one extra round-trip when + redirecting to the canonical URL. + + * Plain.html: better SEO: do not render the form to a spider engine + +18-08-2009 + * WWidget: add boxPadding() and boxBorder() methods, which are + used by the layout managers to correct for built-in borders and + paddings of form widgets + + * WComboBox: listen to layoutChanged() + +06-08-2009 + * WGoogleMap: add setCenter() method without zoom argument, change + myHtml argument to WString + +01-08-2009 + * WLineEdit: work around IE's inability to change type + attribute + + * DomElement, WebRenderer, EscapeOStream: use IE alternative + createElement() which also sets all attribute values, and thus + saves JavaScript calls + + * StdGridLayoutImpl, StdWidgetItemImpl: fix IE glitches in + layout managers + +31-07-2009 + * WCssDecorationStyle: add custom cursor image functionality + +23-07-2009 + * WApplication: simplified the semantics of internal path API signal + internalPathChanged(). You may still use the old behavior by + defining the property oldInternalPathAPI. + +20-07-2009: + * WAxis: fix crash when dealing with negative values and a logscale axis + +17-07-2009: + * WServer, WGlobal: move WServer::Application and WServer::WidgetSet to + global enum + + * WAbstractToggleButton.C: put label inside a so that it works + as expected when used within a layout manager + + * Test/WTestEnvironment: test environment, for instantiating + WApplication instances usable for (unit) tests + +06-07-2009: + * WGridLayout, WBoxLayout, WTabWidget: better documentation that + discusses how to set contents with 100% height. + +29-06-2009: + * JSlot: fix exec() call as suggested by Adrian Sutherland + +25-06-2009: + * WCanvasPaintDevice, WSvgImage, WVmlImage: string -> stringstream + optimizations + + * WTableCell: fix vertical component of content alignment + + * WModelIndex: fix operator== to not use memcmp() since this gets + into trouble with struct padding bytes + +19-06-2009: + * Chart/WAbstractChart: react well to modelReset() and + modelLayoutChanged() + + * WCheckbox, WRadioButton: internal cleanup and simplifications + + * WButtonGroup: added checkedChanged() signal + + * WIntValidator: allow entry of +/- signs + +15-06-2009: + * WGlobal: fix Horizontals = Left | Right and Verticals = Top | Bottom + + * WPanel: clear the title bar + + * DomElement: fix an unstubbing regression with ExtJS widgets + + * Wt.js: fix server push + JSignal.emit() + + * WGlobal: fix doxygen for WFlags masks + + * http/Server.C: avoid http/https accept() to abort on Win32 + + * WResource, WFileResource: fix continuation + suggested filename + data corruption, and implement WFileResource::setBufferSize() + +10-06-2009: + * WRectF: added isEmpty() method, removed isNull() method + +09-06-2009: + * WEnvironment: added headerValue method + +08-06-2009: + * WPoint, WPointF, WLineF: removed obsolete isNull methods + +02-06-2009: + * WAbstractItemDelegate, WItemDelegate: new classes to which the + rendering of a model item is delegated. + + * WTreeView: use WAbstractItemDelegate and WItemDelegates, and + API to customize the used item delegate class. + + * WWidget: add setSelectable() method which can enable or disable + the rendering of the browser's default text selection handling + +29-05-2009: + * fcgi/Server.C: build fixes for FreeBSD and OpenSolaris + + * fcgi/Server.C: implement a (mostly stub) WServer implementation + + * Http/Response: add continuation() method to get a continuation + created for the response. + +28-05-2009: + * WMenu: show vertical scrollbar when needed + + * WGridLayout: support row stretch value of -1, like 0, but + indicates that height of cell contents for that row still needs to + be managed + + * DomElement.C: fix IE6 min/max-width workaround bugs + + * WStackedWidget: make behave well in layout managers + + * WPainter::Image: add constructor that fetches image dimensions + from file (from Daniel Derr) + + * DomElement.C: fix style.float -> style.cssFloat or + style.styleFloat property + +26-05-2009: + * WebRenderer, Configuration, WebSession, http/WServer: add support + for a favicon per EntryPoint, and in general for a favicon not in + "/favicon.ico" + +18-05-2009: + * WAbstractItemModel: add reset() method and modelReset() signal, which + are used to invalidate the whole model. Adjusted the views to listen + to this signal, and make WStandardItemModel::clear() call reset() + + * Ext/ToolBar: implement addStretch() + + * WPaintedWidget, WPaintDevice: support PaintUpdate flag which does + not erase the painting but merely adds to it + + * WTreeView: fix setColumnWidth() for column 0 bug, + setSortingEnabled() when no model yet set bug, column removal + behavior bug, JavaScript error when no column sort/resize handles + + * StdGridLayoutImpl, WStackedWidget: make WStackedWidget manage + children height actively when in a layout manager + + * WebSession: make server push survive refresh(), and fix cookie + support detection regression + + * WApplication.C: fix expose logic for widgets removed from the + widget tree + + * WCssDecorationStyle: WBorder::None is not always default + +11-05-2009 + * WDate: refactor modifiedJulianDate() to toJulianDate(), replaced + modifiedJulianDate constructor to static fromJulianDate function + +05-05-2009 + * WebSession: fix WApplication::attachThread(), simplify use of + thread specific storage + +04-05-2009 + * WString: do not assume a message resource bundle as localized + strings + + * Wt.js: fix empty line edit regression + + * WCalendar: setSingleClickSelect() + + * WEnvironment: getDeploymentPath() + +23-04-2009: + * WCheckBox, WAbstractToggleButton: tri-state checkboxes + + * WAbstractItemModel, WModelIndex, WStandardItem: support + tri-state checkboxes (ItemIsTriState ItemFlag) + +22-04-2009: + * WebRenderer: keep iterating the update map as long as render() + calls add new widgets to it + +21-04-2009: + * WFormWidget: add setReadOnly(), isReadOnly() methods + + * WTimer.C: fix multiple signals firing when stopping and + restarting, and use client-side repetition if the signal is not + exposed + + * WFileUpload: deprecated isUploaded(), new method canUpload() + +16-04-2009: + * WApplication, WDialog: simplify dialog rendering, allow + (multiple) non-modal dialogs (WDialog::setModal(false)), allow + dialogs to be moved around by dragging in the title bar + + * WWebWidget: saner handling of z-index, only apply IE6 shim to DIVs + + * WPaintedWidget: fix use of WImage for WAbstractArea's + + * WImage, Wt.js: fix position reporting in mouse events from + WAbstractArea's in non-compliant browsers (all except for Firefox) + +07-04-2009: + * Ext/FormField: add setFocus() method + +30-03-2009: + * WEnvironment.C, WebSession.C, wt_config.xml: allow configuration + of AJAX-capable user agents and bots in configuration file + + * Configuration.C, wt_config.xml: synchronize configuration + defaults. WARNING: default settings have changed! (see + wt_config.xml what the default values are) + + * WTabWidget.C: use a layout manager to manage vertical height + + * WLabel.C: fix bug with placement of image and add option to place + image to left or right of label text + + * WDatePicker.C: implement setEnabled() + + * WT_SERIES, WT_MAJOR, WT_MINOR, WT_VERSION: change to hexadecimal + format for preprocessor defines + + * Ext/TableView.C: fix access to null dataStore_ + +26-03-2009: + * Fixed cookie handling. Cookie parser is now less strict, and cookie + values are URL encoded, similar to PHP. Fixed setting multiple + cookies. + +24-02-2009: + * WWebWidget: implement a real propagateRenderOk() that does not + cause render() of children widgets of stubbed widgets + + * WTreeView: move JavaScript around that assumes jsRef() exists + + * WGoogleMap: fix require() dependency + + * install: do not overwrite existing configuration file wt_config.xml + +20-03-2009: + * WFormWidget: refuse to give focus to a disabled widget + + * Wt.js: make sure updated autoJavaScript() is executed by onresize + handler + +19-03-2009: + * WGoogleMap: fix require() to depend on google.load + + * filetostring: removed in favor of a CMAke-only solution + + * simplechat: improve its behaviour + + * WebSession/WebRenderer: update the form object list after + each event since it may contain stale objects + +17-03-2009: + * Fixes for cookie parser + + * Send along form values and hash in each 'update', and keep + JavaScript updates around until acknowledged by the browser + (avoids loss of updates especially for server push situations) + +16-03-2009: + * fixed build errors and warnings on Sun Studio and Visual Studio + + * WSignal: remove EventSignal specialization, use + EventSignal<> everywhere + + * add WT_NO_BOOST_INTRUSIVE compile option to use std::list instead + of boost::intrusive::list (needed for Sun Studio) + + * WTableColumn, WTableRow: support for custom id's with setId() + + * WViewWidget: fix interference problem with stateless slot learning + + * WWebWidget: complement quickPropagateRenderOk() with a clean + rerender of itself + + * Configuration.C: add option inline-css useful to disable inline + CSS stylesheets, in case you prefer all of them in an external style + sheet + + * WTableCell, WDomElement: support colspan/rowspan as properties + + * WTable.C: fix rendering problem for th/td reordering + + * WebRenderer: WLoadingIndicator: fix rendering and stateless slot + learning interference + + * WebSession: avoid superfluous 'none' request + +11-03-2009: + * WPushButton: allow line breaks in text using ('\n') + + * WebController: fix widget set mode (default entry path parsing) + + * CMakeLists.txt: also install Http/ directory + + * XSSFilter: refactored + + * WAbstractTableModel: new abstract model class + + * WebSession: simplify session locking (and fix reentrant event + loop memory corrouption) + +06-03-2009: + * win32: fix build problems + + * WMemoryResource: change API to unsigned char + +03-03-2009: + * WFileUpload.C: emit uploaded() signal in event loop. + +27-02-2009: + * WApplication.C, WebSession.C, Wt.js: finally a robust and simple + server-push implementation instead of orbited + + * WMenu.C, WTabWidget.C: simplify CSS (better IE workaround) + + * WCssDecorationStyle, WGlobal, WText, Ext/TableView: remove + deprecated enums and methods + + * WButtonGroup: make API more complete + + * WDatePicker: provide default constructor + + * fcgi/FCGIStream.C: make FCGI connector work again in new branch + + * lots of documentation updates + +24-02-2009: + * WOverlayLoadingIndicator.C: fixes for IE8 and opera + +23-02-2009: + * WAbstractItemModel.C, Wt.js: fix IE date propagation problem + + * WLineEdit.C, WTextArea.C: do not set style classes when no validator + is configured + + * WSocketNotifier.C: fixes for boost >= 1.36 (does not work yet + for win32) + +02-02-2009: + * fix konqueror show stopper bug + +28-01-2009: + * fix bug causing mouseup being called twice at end of drag (for + example confused mandlebrot example) + + * WApplication.C: found cause for long standing IE6 mystery 19px + offset + + * WDate.C: require 2 digits for 'dd' or 'MM' format entries + + * WFormWidget.C: auto-validate when contents changes + + * WebRenderer.C, Wt.js: fix several widgetset mode problems for + IE. + + * Wt.js: do not block when getting an AJAX error + +26-01-2009: + * 2.2.3 released. + +23-01-2009: + * examples: misc improvements, update homepage + + * src/Wt/WAbstractItemModel: support for const char * data in + boost::any() + + * src/Wt/WTreeView: better support for non-JavaScript situations + + * WDialog: fix layout regression + +21-01-2009: + * WRectF: normalized() returns a rectangle without negative width + or height, and is used within WPainter to normalize rectangle + arguments + + * WebRenderer.C: fix embedded mode + +16-01-2009: + * new example 'gitmodel': demonstrates how to create a custom model + class, to be used in conjunction with WTreeView. + + * WGridLayout, WBoxLayout, WBorderLayout: when used in conjuction + with WContainerWidget, there is now the possibility to hint an + alternative implementation for managing space horizontally, which + uses the 'table-layout: fixed' CSS property. + + * WCssStyleSheet: fix JavaScript error on IE + + * WTreeView: fixes for when the treeview is not immediately shown + +15-01-2009: + * WCanvasPaintDevice.C: fix arc drawing in singular case (width or + height == 0), and for very skewed arcs (widht / height <<< 1 or >>> 1) + +08-01-2009: + * WTreeView: react to column insertion and removal, and + fix WTreeNode::load() unintentionally overriding WWidget::load() + + * WAbstractProxyModel: implement toRawIndex() and fromRawIndex() so + that WTreeView does not lose selection or expanded index list when + resorting (or partial refiltering) + +07-01-2009: + * WDialog: add setTitleBarEnabled() to disable the title bar + +06-01-2009: + * WTreeView: setColumnBorder() allows setting the color for a + border line between columns, setColumnResizeEnabled() for + disabling the resize handles, and the content in each column is + now rendered with some padding (3px to the left and right). + +05-01-2009: + * WAbstractTobbleButton.C: fix inserting label into widget tree when + parent is not passed in constructor + + * Ext/Widget.C: fix hide() and show() to consistently use Ext methods + + * Wt.js, WebRenderer.C, WApplication.C: fix IE CSS loading ? + +24-12-2008: + * WTreeView: setColumn1Fixed() allows fixing of the first column while + scrolling through the other columns in a large model. + +22-12-2008: + * WMenu, WTabWidget: implement removeItem() and removeTab() + + * WebRenderer.C: fix internal path issue when starting with a path, + AJAX is available, and deployment ends on a / + + * WDialog: fix usage of layout managers in contents area + + * WJavaScript, WSignal: scope ::_1 in global scope + + * WOverlayIndicator: allow style class customization (Goetz Babin-Ebell) + + * CgiParser: cleanup when using GNU regexp API (Goetz Babin-Ebell) + + * Ext/PagingToolBar.C: fix adding multiple additional toolbar items. + +10-12-2008: + * WCompositeWidget.C: fix implementation not being load()ed + + * Boot.html, Wt.js: do not create a new stylesheet but add rules to + existing inline stylesheet (for ordering consistency) + + * Wt.js: fix regression for widget coordinates + +06-12-2008: + * hello-widgetset: do not build with fcgi connector (Guy Deleeuw) + + * global: do not use (unsigned) long long but + use (u)int64_t (Goetz Babin-Ebell and Pau) + + * DomElement.C: convert to instead of + wrapping it in a button, when JavaScript is not available (Anthony + aka roja) + +04-12-2008: + * treeview-dragdrop: new example, demonstrating Drag&Drop operations + between treeviews, WSortFilterProxyModel usage, and context popup + menus. + +02-12-2008: + * WWidget: remove parent_ member, use WObject::parent() instead + +27-11-2008: + * WPopupMenu, WPopupMenuItem: implementation of a popup menu + + * WAbstractProxyModel, WSortFilterProxyModel: proxy model classes + for WAbstractItemModel, that provide filtered and sortered views + of a source model + + * StdGridLayoutImpl.C: more consistent layout rendering, now using + JavaScript on all browsers, and using relative positioning of contents + to avoid overflow the layout when the child manages its size using + JavaScript (like WTreeView) + + * WButtonGroup: add count() method (from Torsten Schulz) + + * WComboBox: add findText() method. + + * WDialog.C: avoid applying css rules to contained tables. + + * WDropEvent: add mouseEvent() to access causing mouse event details + + * JSignal: support passing original event too using Wt.createEventCall() + + * WTreeView: add expandToDepth() method, and pass mouse event in + item clicked, doubleClicked and mouseWentDown signals. + + * WTreeView: better support for item drag&drop. + +19-11-2008: + * StaticReply.C: do not bwarf when we cannot determine file + size (i.e. for a pipe, reported by Michael Sorensen) + + * WMenuItem.C, DomElement.C: do not prevent default action for + anchor click, by default, (reported by Bin tan) + +18-11-2008: + * WTreeNode.C: apply width to TD only for IE + + * WTreeTable.C: fix scrollbar issues for IE6 and IE7 + + * TabWidget.C: fix offsets hiding problem + +17-11-2008: + * Boot.html, examples/hello-widgetset/hello.html: fix race + condition for IE7/6 with ExtJS loading (thanks to Guy Deleeuw for + help in debugging) + + * Ext/Dialog.C: make sure dialog is not centered on too small window. + +14-11-2008: + * WOverlayLoadingIndicator: a more obvious loading indicator + +13-11-2008: + * WApplication.C: fix miscalculation of exposed signals + + * WMenu.C: make Horizontal menus really behave horizontal + + * WLoadingIndicator, WDefaultLoadingIndicator: interface and default + implementation for loading the indicator + +12-11-2008: + * Boot.hml: typo oops indicated by Anthony Roger Buck + + * WApplication, WDialog, Ext::Dialog, Ext::MessageBox: more generic + way of preventing signals hidden by a modal dialog + + * WTreeView: more accurate column widths + + * CgiParser: fix handling of plain POSTs (indicated by Jim Koornneef) + + * WebSession: fix handling of recursive event loop when JavaScript + is disabled + + * Configuration.C, Wt.js: add configuration option for strict + event serialization, dropping events that happen while a response + is pending (off by default). + + * WTreeTable.C, WTree.C, WTreeNode.C: backport IE fixes from + WTreeView to WTreeTable + +07-11-2008: + * Boot.html: fix issue with IE7 and extkitchen loading (do not + apply same fix as for IE6) + + * WTreeView: support multi line headers, and rework layout management + for header row (revert to old style since it didn't work for IE7) + +06-11-2008: + * examples/extkitchen: use a WTreeView as another MVC-model + when demonstrating Ext::TableView + + * WAbstractItemModel, WItemSelectionModel, WTreeView, Wt.js: + support for drag of item selections, and drop of item selections + or other events + + * WTreeView: several bug fixes for incrementally handling row + insert and removals, and cosmetic improvements + +04-11-2008: + * WTreeView.C: allow setColumnWidth() and setContentAlignment for + column 0 too. + + * WebRenderer.C, WContainerWidget.C: brush up WidgetSet mode + + * examples/hello-widgetset: WidgetSet mode example + +03-11-2008: + * examples/treeview, examples/widgetgallery: new examples + + * WSubMenuItem.C: a menu item that can contain a sub menu + + * WGridLayout.C: do not attempt to layout when hidden since + measurements will fail + + * WGridLayout.C: apply width rules to every row since first + row may contain overspanned cells + + * WAnchor.C: support configurable word-wrap + + * WTextArea: allow default Wt-invalid class for also for textarea + + * WCssStyleSheet: implement assignment operator, and reimplement + addRule with WCssDecorationStyle, returns a WCssTemplateRule now. + + * WMenu: allow multiple menus to use a single + WStackedWidget (useful for menus with submenus) + + * WSuggestionPopup.C: pop up after widget itself + + * WTable.C: fix memory leak introduced by incremental row rendering + + * WTransform.C: fix double rounding error bug leading to NaNs + + * WTreeView: add setHeaderHeight() and setColumnAlignment() + methods, and many rendering misc. + + * Ext/Widget.C: apply correct style classes to body if Ext is not + loaded during initial page render + + * WApplication.C, Boot.html, Wt.js: url encoding and decoding for + internal paths + + * Boot.html, Wt.js: avoid race condition with IE when loading + application + + * Wt 2.2.1 released + +27-10-2008: + * WAnchor.C: no clicked connect when setting internal paths + + * WWidget, WWebWidget, WCompositeWidget: add setLineHeight() API + + * WCssStyleSheet: WCssTemplateRule copies CSS properties from a + template widget + + * WModelIndex: allow for SHA-1 internal Id's for on-disk models + + * WTreeView, WModelIndex, WStandardItem: add UrlRole and + InternalPathRole + +23-10-2008: + * WAppliation.C: be more accurate about when to absolutelify + relative URLs + + * WContainerWidget.C: use sorted vector instead of set to figure + out child insertions + + * WResource.C: use Content-Disposition to trick IE to get the name + right (in addition to an internal path) + + * WTable, DomElement.C: use table DOM API, and present row + additions incrementally + + * RequestHandler.C: fix url decoding + +13-10-2008: + * WTreeView.C: loading indicator in spacer + + * WTree.C: fix propagation of events inside table rows + +11-10-2008: + * src/WebSession.C: do not use relative Urls when JavaScript is + disabled since we cannot redirect to the canonical url (Bin Tan) + + * WDate.C: bugfix in JS date parsing + + * WServer.C: added new --config parameter to specify the + location of the wt_config.xml file + + * WApplication.C: style Wt-invalid applies to all objects, not only + input + + * Configuration.C: look for configuration file path in environment + variable WT_CONFIG_XML. This is overridden by program option --config + in wthttpd. + +11-10-2008: + * src/WebSession.C: do not use relative Urls when JavaScript is + disabled since we cannot redirect to the canonical url (Bin Tan) + + * src/WTreeView[.C]: implement selection, make sorting controls + optional + +10-10-2008: + * WDateValidator.C: better client-side date validation + +09-10-2008: + * fcgi/Server.C: pass parent environment to children (suggested by + misi e) + + * WBorderLayout[.C]: implement methods to retrieve widgets or + layout items set for a position. + + * WAbstractItemModel[.C], WModelIndex[.C], WStandardItemModel[.C]: + add support for hierarchical models + + * WAbstractItemModel[.C]: new abstract base class for + one-dimensional list models + + * WAbstractToggleButton.C: do not generate no-op click handlers + + * WApplication: update outdated documentation (rsh not longer + needed, and internal paths work for all major browsers since 2.2.0) + + * WApplication.C: improve consistency for CSS + XHTML + + * WComboBox.C, Ext/ComboBox.C: use WStringListModel instead of + WStandardItemModel by default + + * WContainerWidget[.C]: add scrolled event signal + + * WContainerWidget[.C], WWebWidget[.C]: implement different way of + handling insertChild() that fixes a bug with removing a child that + was just inserted but not yet rendered + + * WCssDecorationStyle[.C]: support dynamic updates to style sheet + rules + + * WCssStyleSheet[.C], Wt.js, WebRenderer.C: support dynamic + addition and removal of stylesheet rules + + * Wt.js, WEvent, WebController.C: pipeline multiple events, + queueing events while a reply is pending. + + * WEvent: add a WScrollEvent + + * WLabel[.C]: add methods to configure and inspect word wrapping. + + * WStandardItem[.C]: new class for implementing the hierarchical + WStandardItemModel + + * WStringListModel[.C]: new model that implements a simple string list + + * WTableRow[.C]: add setHidden() and related methods + + * WTreeView[.C]: new view widget for displaying trees or tree tables + + * Chart/WAbstractChart[.C], Chart/WCartesianChart[.C], + Chart/WPieChart[.C], Ext/ComboBox[.C], Ext/TableView[.C]: update + model listeners to use new hierarchical WAbstractItemModel API + + * DomElement.C: generate more compact code by using more + aggressively innerHtml + +02-10-2008: + * Ext/TableView.C: shift selected rows when rows are + inserted/deleted + + * WebController.C: do not send anything when the page script is + requested outside the Bootstrap. + +01-10-2008: + * WebController.C: fix refresh() regression, simplify, prevent + CSRF, and remove unnecessary code + +30-09-2008: + * Connection.C: catch exceptions thrown by + remote_endpoint() (reported by kal sason) + +28-09-2008: + * WContainerWidget.C: do not stub TDs for IE + +21-09-2008: + * DomElement.C: do not use innerHTML on IE6 for select element (fixes + WComboBox error reported by Sergey Bryukov) + +19-09-2008: + * WApplication.C: do not block timers when dialog is active (Billy + Muma) + +18-09-2008: + * various places: do not generate DOM ids when serving to a bot, + in the hope that this improves the way the bot indexes the page + since it should always look the same + + * Configuration.C: add configuration option for + FastCGI deployments, to allow usage of reentrant event loops, as + used by (W)Dialog::exec() methods when using shared session + process deployments. + +10-09-2008: + * WLocalizedStrings: add an abstract class to localized WString, + which is by default implemented using WMessageResourceBundle, but + may be customized (as suggested by Lars Hamren) + + * several files: fixes for RubyWt (Richard Dale) + + * WTabWidget: CSS fix for IE7 + +21-08-2008: + * all: build fixes for Sun Studio 12, and boost 1.36 + + * various places: better use of STL containers + +19-08-2008: + * src/web/WebSession.h: build fix for boost 1.36 + + * examples/wt-homepage: add Chinese translation (by Zhimin Song) + + * various places: fixes suggested by Richard Dale and Pau + +18-08-2008: + * CMakeFile.txt: default is now boost 1.35 + +13-08-2008: + * StdGridLayoutImpl.C: deal with padding in widgets correctly, + always fit item heights (this may cause rows to get stuck at a + particular height, but gives more consistent behaviour..., handle + UL children + + * WApplication: simplify internalPath stuff + + * WebController: propagate form values before touching the widget tree + +11-08-2008: + * WMenu: add setInternalBasePath(), do not specify display: inline + for a horizontal menu item, instead, should be handled by + programmer CSS + + * WMenuItem: do not erronously delete contents in destructor, if + it was already loaded. + +08-08-2008: + * Bejing: olympics started! gogo Kim Gevaert! + + * WApplication: more internal path small fixes + + * Connection.C: build fixes for MSVC and Visual Age + +07-08-2008: + * WApplication: fix old behaviour of applicationName(), deprecate it + + * WebSession.C, WebController.C, WebRenderer.C: improved url and + internal path handling: handle redirecting to a new internal path, + properly initialize application with an initial internal path, + more flexible internal paths (do not enforce trailing '/') + + * WMenu: properly restore application internal path when doing + stateless slot learning + +06-08-2008: + * cmake/WtFindSsl.txt: removed redundant code + + * src/web/skeleton/Wt.js: fix widget position bug when nested in scrolled + DOM elements or page on Safari/Opera/IE + + * all: merged in prettyurls branch + - no longer use frameset in bootstrap page, load instead ajax script. Remove + all code that dealt with the frame, and Ajax skeleton page + - switch to own implementation of history management, remove really simple + history framework code + - add internal path API: see WApplication::setInternalPath(), + WAnchor::setRefInternalPath() + - remove internal iframes to deal with file uploads, found a workaround for IE + problem + - make JavaScript skeleton files compressable with YUI JS compressor + - WMenu and WMenuItems: API changes to work with internal path API + - improved marking of deprecated methods in API + + * wt_config.xml: add new setting used in anchor + for redirecting to non-JavaScript version + +05-08-2008: + * web/Configuration.C: remove cppfileno mess + +04-08-2008: + * WFormWidget.C: fix crash when calling setBuddy() twice (or only + once in case of WAbstractToggleButton) + + * WTreeTable.C: fix problem when height is not explicitly set + +02-08-2008: + * WVMLImage.C: fix bounding box calculation for arc rendering in path when + rotated. It is still broken for non-uniform scale + rotation + + * TableView.C: fix cellSelected signal when used together with a + PagingToolBar to not propagate the correct model indexes + +01-08-2008: + * src/http/StaticReply.C, src/http/StockReply.C: transmit response only + when all POST'ed data was received + + * src/http/StaticReply.C: call stream_.clear() to recover from error state + +29-07-2008: + * WEnvironment.C, src/web/WebController.C, src/web/WebRenderer.C: + fix cookie setting and cookie parsing + + * WMenuItem: move itemWidget() from protected to public scope. + +25-07-2008: + * WTextEdit[.C]: implement an XHTML rich text editor wrapping the + TinyMCE javascript library + + * CMakeListst.txt: install resources/ folder to share/Wt/resources + + * WText[.C]: deprecated WText::Formatting enum, + WText::setFormatting() and WText::formatting() for Wt::TextFormat + enum, WText::setTextFormat() and textFormat(). Add a constructor + that accepts the format as an argument, and update examples + + * http/Reply.C, http/StaticReply.C: serve a .gz version of a file + with gzip content-encoding if possible and available, fix a + problem with logging when the reply is relayed + +22-07-2008: + * WAbstractArea, WRectArea, WCircleArea, WPolygonArea: new classes + that implement interactive areas on WImage and WPaintedWidget. + + * WImage, WPaintedWidget: add methods for defining interactive + areas + + * StdGridLayoutImpl.C: fix alignment margin glitch + + * WApplication.C: default stylesheet: add border: 0px for images, + which are rendered using a border when adding a map. + + * WMemoryResource: add constructors and methods for using C-style + array data. + + * WLogger.C: fix error in ~WLogEntry + + * all: misc build fixes for win32 + +15-07-2008: + * src/wt: renamed to src/Wt + + * src/Ext: renamed to src/Wt/Ext + + * src/Chart: renamed to src/Wt/Chart + + * src: upgrade to new include file locations + + * cmake/FindWt.cmake: update to new new include file locations, + and add some documentation for cmake newbies + + * src/wt/StdLayoutImpl.C: fix itemAt() problem + + * src/Wt/WMessageResource*, src/wt/WString[.C]: make literal + WString work properly with argument substitution (reported by + Micahel Ivanov) + + * src/web/Configuration.C: setup loggers even if no wt_config.xml + file (reported by Goetz Babin-Ebell) + +14-07-2008: + * src/wt/WComboBox[.C], src/Ext/ComboBox[.C]: fix problem with + setModel wrongly deleting the previous model (reported by Michael + Ivanov). + + * src/wt/WApplication, examples/composer/ComposeExample.C, + src/wt/WMessageResourceBundle: document and contrast expected + location for relative URLs or relative paths (suggested by Pau + Garcia) + + * doc/main: improved Inroduction to include logging and error + handling, and related configuration options + + * src/Chart/WChart2DRenderer.C: fix regression with stacked bars, + introduced by WAxis::setBreak() implementation + + * */CMakeListst.txt: install header files in Wt/ subdirectory to + not clobber the main include directory. You should make sure that + ${CMAKE_INSTALL_PREFIX}/include/Wt is searched for these headers! + +13-07-2008: + * src/wt/WLogger[.C], src/wt/WApplication: logging API, new method + WApplication::log() + + * src/web/Configuration.[Ch], src/wt/Configuration.[Ch]: add + configuration options for accesslog and application logging + + * src/wt/WText[.C], src/wt/WWebWidget[.C]: allow to detect XML + parse errors when using XHTMLFormatting + + * allover: code cleanups to use logging instead of std::cerr, to + throw exceptions for fatal errors + + * src/wt/WLayout[.C]: change contract of count() and itemAt() to + allow for '0' layout items, fix crash with WGridLayout (reported by + bvh). + +10-07-2008: + * src/Ext/Widget.C: propagate CSS style class and inline style to + the Ext widget through the config. + + * src/web/WtRandom.C: fix integer overflow compile warning (Pau + Garcia) + +09-07-2008: + * src/Chart/WAxis[.C]: add setBreak() to support a "broken" axis + that omits a part of the entire value range. + +07-07-2008: + * src/wt/WContainerWidget.C: implement clear() to also delete any + layout manager that was set, and support creation of a layout + manager in an existing widget + + * examples/simplechat/SimpleChat.C: use clear() in conjunction + with layout managers + + * src/web/DomElement.C: make sure style attribute is rendered as + JavaScript + + * src/wt/WApplication.C: do not apply 19px IE6 offset bug to IE7 or + later + + * src/wt/WGridLayout.C: use default spacing of 6px instead of 9px + + * src/wt/WContainerWidget.C: setLayout() replace two bools + fitWidth and fitHeight with an alignment option + + * examples/painting/PaintExample.C: use WGridLayout + +03-07-2008: + * src/web/skeletons/*, src/web/DomElement.C, + src/web/WebRenderer.C: make sure Wt homepage validates as proper + HTML or XHTML. + + * src/wt/WText.C: autodetect common block-style XHTHML content and + call setInline(false) for block elements (helps in producing valid + XHTML). + + * src/Ext/Widget.C: fix for Ext date picker and calendar with Firefox 3 + + * src/web/WebRenderer.C: fix JavaScript to reload an old session + (again!) + +02-07-2008: + * src/wt/WAppliation.C: block events from widgets under the modal + dialog cover + +01-06-2008: + * src/wt/WServer[.C]: API to start and stop the embedded http + server programatically. + + * src/Ext/TextEdit.C: fix forgotten string literal bug (Michael + Ivanov) + + * src/wt/WApplication.C: add auto-centering for WDialog using + JavaScript (Michael Ivanov) + +30-06-2008: + * src/wt/WGridLayout.C, src/wt/StdGridLayoutImpl.C: unify + cross-browser handling, fix alignment bugs, border handling + +27-06-2008: + * src/Ext/Widget.C: eliminate client-side memory leak of ExtW array + + * src/wt/StdGridLayoutImpl.C: fix minimum row height calculation + bug, and some clean up + internal doc improvements + + * src/Ext/Container.C: fix interference bugs between Ext and Wt + layout managers + + * src/wt/WBoxLayout, src/wt/WGridLayout: implement alignment + +25-06-2008: + * src/wt/WBoxLayout[.C], src/wt/WGridLayout[.C], + src/wt/WBorderLayout[.C], src/wt/WContainerWidget[.C]: implemented + layout management for WContainerWidgets + + * examples/chat: simplified by using layout managers instead of + absolute CSS layout. + + * src/wt/WApplication.C: reset padding to 0 for the body. Add + padding to the WApplication::root() if you want to have it back. + + * src/web/DomElement.C: change cancelEvent() signature, and add + emulate IE support for setMinimumSize() (using CSS expressions), + add support for CSS property white-space + + * src/web/skeleton/Wt.js: add pixel calculation routines + + * src/wt/WApplication.C: define declared functions as soon as + possible + + * src/wt/WText[.C]: add setWordWrap() method + + * src/wt/WLabel.C: use setWordWrap(false) for the text + + * src/wt/WMenuItem.C: do not set margin-right for horizontal + items (Billy Muma) + +18-06-2008: + * CMakeLists.txt: fixed CONFIGDIR issues + + * src/http/Reply.[Ch]: fixed non-multi threaded build + + * src/wt/WTabWidget[C], src/wt/WMenu[C]: reimplement + currentChanged signal + +17-06-2008: + * src/wt/WContainerWidget.C: fix bug caused by not searching child + list before inserting child, triggered when using insertBefore() + + * src/Ext/Dialog.C, src/Ext/MessageBox.C: workaround for missing + cursor problem in FireFox 1.5 and 2 + +16-06-2008: + * CMakeLists.txt: CONFIGDIR variable (from Pau Garcia i Quiles) + + * src/CMakeLists.txt: use a macro for FileToString + + * examples/wtwithqt: new example and library for interopability + between Wt and Qt4. + +13-06-2008: + * LICENSE: Clarified that GPL Wt is only licensed under the + second version of the GNU GPL (requested by debian folks) + + * src/wt/WWebWidget.C: performance improvement, do not search child + list before inserting child because we know for sure that it isn't + there + + * src/Ext/Dialog.C: do not use display:none since this may + cause problems with certain Ext widgets that need hide-with-offsets + + * src/Chart/WAxis[.C]: add support for axis titles with custom font + +12-06-2008: + * src/Ext/WWidgetItemImpl: do not use display:none since this may + cause problems with certain Ext widgets that need hide-with-offsets + +11-06-2008: + * add WEnvironment::pathInfo() + +10-06-2008: + * refactoring to simplify WWebWidget implementations + + * preliminary support for AJAX on IE Mobile. Things that do not + yet work include WFileUpload, WTimer, and there are many rendering + layout glitches (such as in the tree list stuff). + + * src/web/DomElement.C, src/web/WebController.C: fix handling + multiple buttons when JavaScript is not available + + * src/Ext/TableView.C: clearSelection() fix (Archimedes Cortes) + + * src/wt/WFormWidget, src/wt/WValidator: add an inputFilter() + method which allows filtering input characters against a regular + expression. + + * src/wt/WTree.C: let selection only on the label, so that other + interactive widgets may be present in other columns + + * src/web/DomElement.C: support return value, note this may break + existing behaviour of JavaScript slots, since they really need to + return properly! Better cross-platform event handling. + +30-05-2008: + * src/http/Server.[Ch]: fix potential thread safety issue on shutdown + (Max M) + +28-05-2008: + * src/Ext/LineEdit[.C]: add setMaxLength() + + * src/wt/WAnchor.C: fix targetChanged_ is uninitialized bug + +27-05-2008: + * src/fcgi/Server.C, src/web/Configuration.C: support valgrind arguments + + * src/web/Configuration.C: fix close(-1) valgrind warning, and + read 'valgrind-path' from fcgi-configuration + +26-05-2008: + * charts example: better support without JavaScript + + * src/Ext/NumberField: fix undefined reference: setDecimalPrecision() + + * src/Ext/TableView: add setColumnAlignment() method + + * src/web/DomElement.C: better support for anchor onclick events: + use browser default when used with a modifier, otherwise prevent + browser default + + * src/web/WebSession, src/web/WebController: propagate initial history + as a history event after application construction + + * various places: documentation improvements + +21-05-2008: + * src/web/WWebWidget.C: allow disabling the stubbing of small + widgets (added setLoadLaterVisible() method) + + * src/wt/WWidget: add htmlText() method to public API + +20-05-2008: + * src/wt/WTreeNode.C, src/wt/WIconPair.C: performance improvements + + * src/wt/WTree.C: suppress browser text selection when selection is + enabled + + * src/web/skeleton/Ajax.html: support for IE 8 beta + + * various places: documentation improvements + + * src/wt/WApplication[.C]: added WApplication::applicationName(), + from Goetz Babin-Ebell. + + * src/wt/WWebWidget.C: optimize widget destruction + +15-05-2008: + * src/web/WebSession.C: fix build problem when threading is disabled + + * src/wt/WVmlImage.C, Wt.js: fix selection problem on IE + +14-05-2008: + * src/wt/WInteractWidget.C: block changed signal after enterPressed + when the enterPressed signal is connected to get same behaviour across + all browsers + + * src/wt/WLenghtValidator.C: fix bug in constructor + + * src/wt/WLineEdit[.C]: add setMaxLength() + + * src/wt/WWidget.C: disable the fixed JavaScript implementation + for hide() and show() and revert to stateless slot learning by + default to take into account reimplement setHidden() methods. This + is now overridden only in WTreeNode. + + * src/web/CgiParser.C: open spoolfile in binary mode, fixes wrong + behaviour with binary files on Windows platforms + + * src/wt/WApplication: revert behaviour change for url() to return + the entire application path + + * src/wt/WSlider.C: avoid compile warning with gcc 4.2 + +13-05-2008: + * src/wt/WValidator[.C], src/wt/WIntValidator[.C], + src/wt/WDoubleValidator[.C], src/wt/WDateValidator[.C], + src/wt/WRegExpValidator[.C]. src/wt/WLengthValidator[.C], + src/wt/WFormWidget[.C]: add javaScriptValidate() for + client-side validation + + * src/wt/WDate[.C]: small cleanup and add conversion to perl + regular expression for client-side validation + + * put Wt stateless client-side routines in a version-dependent + namespace WT_CLASS + + * src/wt/WMessageResources.C: preserve white space and new lines for + message resources + +11-05-2008: + * src/wt/WSignal[.C]: reduce memory for unused event signals, and + add support for preventing the default handler (untested) + + * src/wt/WInteractWidget: better keyboard event documetation + + * src/wt/WTree[.C]: support for standard behaviour of Control and + Shift modifiers in extended selection mode + +10-05-2008: + * src/web/DomElement.C, src/web/skeleton/Wt.js, src/wt/WEvent[.C]: + improved keyboard and mouse event information + + * src/wt/WInteractWidget: better keyboard event documetation + + * src/wt/WTree[.C]: support for standard behaviour of Control and + Shift modifiers in extended selection mode + +08-05-2008: + * cmake/WtFindBoost.txt, src/web/random_device.cpp: add support + for MacOS X + + * src/wt/WAbstractItemModel: add asString(const boost::any&) and + asNumber(const boost::any&), and add warnings when trying to read + or write data outside the bounds + + * src/wt/WAbstractToggleButton.C, src/wt/WFormWidget.C: avoid + double changed event propagation (needs exception for bug in IE6 + and IE7). + + * src/wt/WCanvasPaintDevice.C: improve text rendering, optimize + path rendering, and fix bug with clipping and transformations + + * src/wt/WColor: documentation improvements, and specify default + colors numerically + + * src/wt/WComboBox: documentation improvements + + * src/wt/WComboBox.C: do not emit changed() event when changing + the values using setCurrentIndex() + + * src/wt/WDate: add support for conversion to integers using + julian day calculation, and add methods addDays(), addMonths(), + and addYears(), and fix string parse bug s/1900/2000 + + * src/wt/WDoubleValidator: fix default argument to real -inf + + * src/wt/WPainter, src/wt/WVmlImage: add support for rectangle + clipping to VML renderer + + * src/wt/WPainterPath: add support for bounding box calculations, + fix inverted angle calculation in getArcPosition() + + * src/wt/WRectF: add intersection test and united() method + + * src/wt/WResource: add write(std::ostream&) method to serialize a + resource (e.g. to a file) + + * src/wt/WSvgImage: optimize paths even when transformations + change (only translations), fix clipPath definition so that it + works with inkscape and opera, and make drawText() more accurate + + * src/wt/WVmlImage: optimize paths through transformations, and + use multiple parallel paths to avoid overlap artefacts, and add + full text support (including rotations and scales) + + * src/wt/WWebWidget: fix bug with double processing of new siblings + + * src/wt/WWidget: move enums to Wt:: scope (with full backwards + compatible support) + + * src/Chart/: first release of the Wt charting library + + * examples/charts/: example demonstrating the Wt charting library + + * src/wt/WPanel: new widget (will evolve to support many standard + options you want for a panel) + +29-04-2008: + * src/wt/WLength: Added multiplication operator, and toPixels() + method + + * src/wt/WFont: Fixed equality operator: fixed sizes are now also + compared + + * src/wt/WVmlImage.C, src/web/WebController.C, src/wt/WEnvironment, + src/web/skeleton/Boot.html: Fixed rendering on high density + displays (DPI scaling) + +25-04-2008: + * CMakeLists.txt: Dynamic/static boost build fix + +24-04-2008: + * CMakeLists.txt: FindWt.cmake is now installed in /usr/share/... + instead of /usr/usr/share/... + + * src/wt/WCssDecorationStyle.C: bugfix for setting background colors + +19-04-2008: + * src/web/WWebWidget.C: also update form objects in addChild() + and removeChild (could be optimized later) + +18-04-2008: + * CMakeLists.txt: LIB_INSTALL_DIR fixes. LIB_INSTALL_DIR must now be + a relative path. + + * src/web/WebController.C: reroute all methods that may call user + code through WApplication::notify() (including rendering and + application refresh()) + + * src/wt/WApplication[.C], src/web/WebSession[.C]: allow + post-construction and pre-destruction application initialization + and finalization + + * src/wt/WApplication[.C], src/web/WebSession[.C]: attachThread() + attaches an auxiliary thread to an application context + + * src/http/Connection.C: use graceful connection shutdown on timeout, + to avoid the occasional 502 proxy errors + +17-04-2008: + * src/http/Connection.C. src/http/Reply.C: fix race condition on + shutdown, protect connection_ with a mutex, and illegal access to + dead connection's request in the logging + + * src/http/HTTPRequest.[Ch]: keep a shared pointer (ReplyPtr) + instead of raw pointer for the WtReply + + * src/web/WebController.C: remove killed sessions from sessions + map from sessions map in forceShutDown() so that they do not get + illegally accessed from expireSessions(). + + * src/web/WebSession: do not call finalize() on 0 app_ + + * src/wt/WResource: setRequest() flushes a previous request if + there is already one + + * src/wt/WMenuItem.C: fix memory leak with LazyLoading + + * various places: make build work on gcc 3.4.0 (thanks to Petr Cerny) + +14-04-2008: + * src/web/DomElement.C: do not use innerHTML in xhtml (opera + doesn't like it with inline SVG) + + * src/wt/WPaintedWidget.C: prefer InlineSVG on Opera + + * src/wt/WPaintDevice.C, src/wt/WVmlImage.C: scale pen widths with + transform + + * src/web/skeletons/Wt.js: import XML nodes with correct namespace + into DOM + + * revert commit 4e7766d105888ae898ca6a8d7446d2188ae09846, since IE + cannot handle special tokens in DOM element id's + + * release 2.1.2 + +13-04-2008: + * src/wt/WPainter[.C], src/wt/WCanvasPaintDevice[.C], + src/wt/WVmlImage[.C], src/wt/WSvgImage[.C]: add drawImage() methods + + * src/wt/WRectF.C: fix setX() and setY() incorrect width adaptation + + * src/wt/WSvgImage.C: fix regression in drawLine + + * src/wt/WTransform.C: fix double comparison in SVD decomposition + + * src/wt/WVmlImage.C: fix drawArc() wrong transformation problem + +12-04-2008: + * src/web/DomElement.C, src/web/skeleton/Wt.js: capture() mouse + down so that all subsequent mouse events are received by the same + element/widget + + * src/web/WebRenderer.C: use JS reload(true) to force reload, and + disallow caching of bootstrap HTML + + * src/web/WebRenderer.C, src/wt/WVmlImage.C: use VML in standards + compliant rendering mode + + * src/web/skeleton/Wt.js: make private functions really sit within + "Wt" closure + + * src/wt/WJavaScriptSlot.C: fix wrong JavaScript code when JSlot + is not owned by a WWidget, and thus not using function + declaration, and define JavaScript functions before loading + + * src/wt/WPaintedWidget[.C]: update() on resize() + + * src/wt/WSlider[.C]: initial implementation of a slider + control (rendered using WPaintedWidget) + + * src/Ext/TabWidget[.C]: make sure currentIndex() is updated before + propagating the signal + + * src/wt/WVmlImage.C: correct -1 vertical offset problem + + * src/wt/WTreeTableNode.C: fix seg fault of calling virtual method + addChildNode() from WTreeNode constructor + + * src/wt/WTree.C: fix seg fault on consecutive calls of setTreeRoot() + + * src/wt/WTreeNode[.C]: rename expanded() to isExpanded() and add + two signals, expanded and collapsed + + * src/wt/WSignal: allow late binding of a relay signal to + EventSignal + + * src/wt/WTableTreeNode: change incorrect protected scope of + addChildNode() to public + +11-04-2008: + * src/wt/WPainter[.C]: expand API with setViewPort() and + setWindow() methods + + * src/wt/WTransform.C: fix reflexion bug in WTransform's SVD + + * src/wt/WPen[.C]: define 0 width as cosmetic pen of width 1 + pixel, independent of transformation matrix + + * Boost 1.35 support + + * CMakeLists.txt: The static version of Wt is now default + built on Windows + +10-04-2008: + * src/wt/WApplication[.C]: fix regression in + WApplication::processEvents() + + * src/wt/WPainter[.C]: add WPainter::save() and + WPainter::restore() methods + + * src/wt/WTransform.C: handle reflexions correctly in the singular + value decomposition + + * Released 2.1.1 + +09-04-2008: + * src/wt/WLineF, WPointF, WRectF, WPaintDevice, WPainter, WPen, + WBrush, WPainterPath, WVmlImage, WSVGImage, WCanvasPaintDevice: + complete implementation and documentation + + * src/wt/WString: improve documentation + +07-04-2008: + * src/wt/WTreeNode[.C]: add virtual expandable() method which + returns whether a node is expandable (even when not populated) + + * src/Ext/TabWidget.C: addTab(WWidget *, const WString&) checks if + the widget is a Panel, and only creates a Panel if not. + + * src/wt/WJavaScriptSlot[.C], WObject[.C], add + implementPrelearned() to directly specify the JavaScript behavior + for a method. Add support to switch the implementation of a method + between implementStateless() and implementJavaScript(). + + * src/wt/WTreeNode[.C]: add setChildCountPolicy() to enable the + child count next to the label, which now by default is disabled + + * src/wt/WWidget.C, src/wt/WWebWidget.C: performance optimization: + change implementation of hide() and show() from stateless to + prelearned + + * src/wt/WTreeTable[.C]: use offsetHeight instead of clientHeight and + offsetTop to solve layout problem ? + + * src/wt/WObject[.C]: use a simple 64-bit encoding for a valid + JavaScript identifier id + +02-04-2008: + * src/Ext/*.C: performance improvement: change config generation + to use streaming instead of string concatenation + + * src/Ext/*.C: performance improvement: do not use addUpdateJS + when not yet rendered + +01-04-2008: + * src/wt/WApplication: support dynamic loading of scripts, + internal stylesheet changes, and external stylesheets. This fixes + the problem with using Ext widgets only later in the application. + + * src/wt/WTableRow[.C], src/wt/WTableColumn[.C]: add support in + public API + + * src/wt/WApplication.C: move default CSS for widgets to the + widget constructors + + * src/wt/Ext/Widget.C, src/wt/WJavaScriptSlot.C: fix bugs when + using setId() to override the auto-generated id's. + + * src/wt/WEnvironment[.C]: make hostName() and clientAddress() + robust to proxies at either the client or server side, add + urlScheme() method. + + * src/fcgi/Server.C, src/http/PosixMain.C, + src/web/WebController.C: add support for multiple entry points + + * src/http/Configuration.C: add --servername option to override + the DNS name as default host name + + * src/http/Configuration.C: fix -1 error when removing trailing + '/' from directories. + + * src/web/CgiParser.C: use GNU regex when HAVE_GNU_REGEX is defined. + + * src/web/Configuration.C: add behind-reverse-proxy boolean + configuration option, and separate general from FastCGI specific + settings + + * src/web/DomElement.C, src/web/EscapeOStream.C, + src/web/WebRenderer.C: more rendering performance improvements + + * src/web/WebController.C: use GNU regex when HAVE_GNU_REGEX is defined. + + * src/web/WebController.C, src/web/WebRenderer.C, + src/web/WebSession.C: preliminary support for embedded application + mode, cross-domain AJAX using dynamic script tags, and automatic + conversion from relative to absolute URLs + + * src/web/skeletons/: reorganisation to have modular javascript, + and encapsulation in JavaScript "classes" to allow multiple + applications in a single page (in the future) + + * src/wt/WApplication.C: make "Loading" feedback work properly on + all browsers + + * src/wt/WCssDecorationStyle.C: do not generate no-op JavaScript + + * src/wt/WCssStyleSheet[.C]: add functionality to check whether a + particular rule has already been added + + * src/wt/WMessageResources.C: do not read the same XML file twice + when locale is empty + + * src/wt/WPushButton.C: do not generated no-op JavaScript + + * src/wt/WResource: change suggestFilename to suggestFileName, add + addHeader() method + + * src/wt/WSignal.C: fix double removal of a user event signal from + the exposed signals list + +18-03-2008: + * src/wt/WStackedWidget[.C]: fix bug when trying to add a composite + widget to a stack (cannot yet call hide()) through parent passing, + reported by Michael Ivanov + +17-03-2008: + * src/web/DomElement.C: fix regression introduced 04-03-2008 with + alternate hiding method interfering with setPositionScheme() + + * src/Ext/ComboBox.C: use modelColumn when indexing into model. + + * src/web/DomElement.C: various performance improvements (const + char * for string literals) + + * src/web/EscapeOStream[.C]: performance improvements + + * src/web/FileServe.C: performance improvement: avoid char-based I/O + + * src/web/WebRenderer.C: performance improvements: do not use + formName(), instead use pointer, do not propagateRenderOk() before + initial render, do stateless slot learning in JavaScript update + + * src/wt/WObject.C: performance improvement: use sprintf() in formName() + + * src/wt/WSignal.C: performance improvements: use local info to + track whether a signal was exposed instead of the expensive call + to WApplication + + * src/wt/WWebWidget.C: performance improvements + + * src/wt/WTreeNode[.C]: virtual method displayedChildCount() + + * src/web/skeleton/Ajax.html: fix offset problem in coordinate + calculations + + * src/wt/TableView[.C]: use SelectionBehavior instead of + SelectionUnit, which is now deprecated + + * src/wt/WSelectionBox[.C]: add support for multiple selection + + * src/web/DomElement.C: fix button wrap when using IE6 with + JavaScript disabled + + * all: various documentation cleanups + +13-03-2008: + * wthttpd: make build without thread support really work without + linking to a thread library + + * src/mxml/mxml-file.c: fix unicode encoding to not encode twice, + bug that was triggered on linux-arm platforms + + * src/mxml: merge with latest official release 2.5 + + * src/wt/WDate.C, src/http/Request.C: fix non-cost string literals + + * src/web/CgiParser.C: fix a regression to detect content-type + +12-03-2008: + * src/wt/WPainterPath: complete API, largely untested + +10-03-2008: + * src/wt/WPainterPath and devices: implement painter path arcTo() + +06-03-2008: + * examples/wt-homepage/: updated to emweb design + + * src/wt/WApplication.C: disable state system for WebKit, since it + does not work at all + + * src/wt/WMessageResources.C, src/wt/WWebWidget.C, src/web/DomElement.C: + do not let mxml self-close non-self-closing tags (gives problems in IE) + +05-03-2008: + * src/wt/WMenu[.C]: added method setRenderAsList() which allows + the menu to be rendered as an HTML list + + * src/wt/WContainerWidget[.C]: added methods setList(), isList(), + isOrderedList(), isUnorderedList(), that allow the container to + be used to render HTML
    and
      lists. + +04-03-2008: + * src/wt/WTable.C: correctly participate in slot learning when + stubbed + + * src/wt/WWebWidget[.C]: allow alternate method for hiding, which + propagates to parents. methods does not use display: none + + * src/Ext/ComboBox.C, src/Ext/DateField.C: use alternate method + for hiding + +03-03-2008: + * examples/extkitchen/ExtKitchenExample.C: modify example to use + a WTable for layout + +02-03-2008: + * src/wt/WSignal: connect new signals at_front, since it seems + that boost signals will call slots being appended to the signal + during slot invocation -- contrary to the documentation + + * src/wt/W[.*]Image: add support for VML rendering + + * src/wt/WVmlImage.C: make text alignment work properly + +01-03-2008: + * src/wt/WMenu[Item][.C]: make itemSelected signal normal signal, + instead of being called from within stateless slot + + * src/web/WebRenderer.C: do not show 'ignore' for updates to widgets + not inserted into the widget hierarchy + + * src/wt/WObject.C: do not show internal error when (no)FormData + is called + + * src/http/WinMain.C: adapted for non-boost asio + + * src/wt/WWebWidget.C: Allow widget reparenting. setParent() for a + widget who has already a parent used to be a no-op; now it reparents + the widget. + + * */CMakelists.txt: added 'd' suffix to debug libraries; added + FindWt.cmake (from Pau Garcia i Quiles) + + * Released 2.1.0 + +29-02-2008: + * */CMakeList.txt: Restructured the cmake files + + * wthttp: made zlib dependency optional + + * wthttp: asio_error becomes asio_error_code and asio_system_error + + * src/Ext/Widget.C: make setHidden() behave properly also when + not yet rendered + +25-02-2008: + * documentation updates + +23-02-2008: + * several fixes for JavaScript handling after a reload of the same + session + +22-02-2008: + * src/wt/WTreeTable.C: fix layout bug when using a border for the + header + +16-02-2008: + * src/wt/WAnchor[.C]: allow referencing to dynamically generated + documents + +15-02-2008: + * src/Ext/TableView.C: implement enableColumnHiding() methods + + * src/, src/http: move to boost-1.34.1 and (boost/non-boost) asio 0.3.9 + + * src/Ext/Dialog.C: implement setSizeGripEnabled(bool) method + + * src/Ext/Panel[.C]: add collapse(), expand() methods and fix + setCollapsed() implementation + + * src/Ext/TableView.C: fix setAutoExpandColumn min and max widths + +14-02-2008: + * src/Ext/PagingToolBar.C: render other buttons that were added, + as suggested by Michael Ivanov, 08-01-2008 + + * src/wt/WLabel[.C]: add setBuddy(Ext::FormField *) as suggested + by Pau Garcia i Quiles, 16-01-2008 + + * src/wt/WAnchor[.C]: add setTarget() method + +13-02-2008: + * src/Ext/MessageBox.[Ch]: fix delete from buttonClicked crash, + reported by Alex, 05-01-2008 + + * src/wt/WAnchor[.C]: fix anchor implementation problem reported + by Lasse Karkkainen, 15-01-2008. Note that the API has changed, + since we no longer use a WLabel (which caused the problem). Unless + your code relied on the fact that it was implemented using a label + there should be no problem in adapting to the new API. + + * src/web/WebController.C: fix IE6 history problem reported by Joe + Croft, 28-01-2008 + + * src/web/WebRender.C: fix synchronization problem of form + objects, bug and patch by Goetz Babin-Ebell + + * src/wt/WContainerWidget.C: syntax fix, by Goetz Babin-Ebell + + * src/wt/WString and related: use UTF8 internally, as suggested by + Goetz Babin-Ebell + +02-01-2008: + * src/wt/WTreeTable[.C]: scroll content while keeping headers fixed + + * src/wt/WTreeNode[.C]: add support for an invisible root node + + * src/Ext/LayoutImpl.C: trigget layout recalculation after adding a + panel + + * src/Ext/Button.C: fix bug not showing initial enabled/disabled state + + * src/Ext/WWidgetItemImpl.C: wrap non-Container Widgets also, so that + their style is not lost + + * src/Wt/WPainter: drawLine methods + + * src/web/skeleton/Ajax.html: fix mouse position calculations in + presence of scrolled widgets + +01-01-2008: + * src/web/WebController.[Ch], src/http/HTTPStream.[Ch]: + addSocketNotifier and removeSocketNotifier as virtual methods in + WebStream instead of callbacks from wt lib to connector lib + +30-12-2007: + * src/wt/WRectF[.C], src/wt/WCanvasPaintDevice[.C], ...: further + improvements to painting infrastructure + + * src/wt/WSignalMapper: API changes to be able to build on MSVC + + * src/wt/WEnvironment: allow reading content type, and raw CGI + environment variables + + * src/web/Configuration.C: switch back to default to HTML mime type + +29-12-2007: + * src/http/PosixMain.C: use asio::thread by default + + * src/wt/WContainerWidget.C: fix bug to use delete[] instead of delete + on overflow_ array + + * src/wt/WApplication: add notify(const WEvent& e) method to allow + custom event exception handling. + + * src/wt/WEnvironment: add cgiValue() method to inspect any CGI + environment variable + +18-12-2007: + * various places: pass string by reference where it makes sense + + * Ext/*: upgrade from Ext 1.x to Ext 2.x series, main addition is a + full layout management system + +12-12-2007: + * src/web/WebRenderer.C, src/web/DomElement.C, ...: serve XHTML + content-type if the browser accepts it, and if it is not disabled + in the config.xml file + + * resources/orbited.js: produce valid XHTML (no document.write()) + + * resources/rsh.js: produce valid XHMTL (except for IE) + + * src/wt/WApplication[.C]: split javascript in javascript that + needs to be run before starting the DOM (which is rendered + everytime the page is reloaded), and javascript that is run to + manipulate the DOM (which is the default) + + * src/web/DomElement.C: fix button wrap layout that was adding + extra padding in non-javascript support rendering + + * src/wt/WApplication.C: use lowercase CSS element selectors! + you will need to change your style sheets accordingly! + + * src/wt/WBrush[.C], src/wt/WPaintDevice[.C], + src/wt/WPaintedWidget[.C], src/wt/WPainter[.C], src/wt/WPen[.C], + src/wt/WPointF[.C], src/wt/WVectorImageResource[.C]: initial + check-in of incomplete painting infrastructure + +10-12-2007: + * src/web/WebController.C: keep the server push connection alive + when receiving a heart-beat + + * src/web/skeleton/Ajax.html: preliminary WinCE IE support + + * src/wt/WImage[.C]: add loaded event + +02-12-2007: + * examples/simplechat: added a chat example (replaces previous + stupid serverpush example) + + * src/web/WServerPushResource.C, resources/orbited.js: several + improvements to make server-push work + + * src/web/WebSession.C: allow updating another session from within an + existing session + + * src/wt/WContainerWidget: add setOverflow() method for easier + scrollbars + + * src/wt/WString: add operator< to be able to put them in std::set<> + +01-12-2007: + * src/mxml: updated to mxml-2.4 + + * resources/rhs.js, resources/json2005.js, src/wt/WApplication.C, + src/web/WebController.C: upgraded to RSH 0.6 RC1 (works now in IE, + Firefox and Opera) + + * examples/hello/hello.C: make example more interesting + + * examples/serverpush/serverpush.C: adapted to test intermixing + event server and client events + + * src/Ext/TableView.C: disconnect connections when changing model + + * src/fcgi/FCGIStream.[Ch]: add socket notifier stubs + + * src/http/Server.[Ch], src/web/WebController.[Ch]: implement + socket notification + + * src/http/WtReply.[Ch]: robust handling of server shutdown and + connection closing + + * src/web/WServerPushResource.C: adapted for orbited.js for as + server-push library + + * src/web/WebController.C: no longer add --Quited to application + title when quiting an application + + +27-11-2007: + * src/Ext/MessageBox.C: fix setting prompt value + + * src/Ext/DataStore[.C], src/Ext/ComboBox[.C], + src/Ext/TableView[.C]: bundle model changes leading to + significant reduction in generated JS for model changes. + + * src/Ext/DataStore[.C], src/Ext/TableView[.C]: support resetting the + model, and process row removals in reverse order + + * src/wt/WAbstractToggleButton.C: use click signal instead of + change to make checked/unChecked signals work in IE. + + * src/wt/WSignal.C: reorder emission of stateless and dynamic slots, + to avoid processing on a signal that has been deleted (which should + not happen in a stateless slot). + +23-11-2007: + * src/wt/WButtonGroup, src/Ext/RadioButton.C: add support for + Ext::RadioButton in WButtonGroup + +23-11-2007: + * CMakeLists.txt, src/CMakeLists.txt: add build option to disable + thread (in wthttpd) altogether + +22-11-2007: + * src/Ext/DataStore.C: fix use of DataStore when removing rows + +15-11-2007: + * src/Ext/DataStore.C: fix regression bug when inserting rows + + * src/Ext/ComboBox.[Ch]: add activated signal + + * src/Ext/DataStore.C: fix use of DataStore when inserting rows + +12-11-2007: + * src/Ext/ProgressDialog.C: don't show by default (unlike Qt) + +26-10-2007: + * src/Ext/TableView.C: add missing method implementations + +21-10-2007: + * src/Ext/DataStore.[Ch], src/Ext/TableView.[Ch]: support multiple row + selection, and be robust to sorting by using ids instead of row + indexes + + * src/Ext/TabWidget[.C]: fix bug where children were not inserted + into the widget tree, and thus could not implement event handling + + * src/wt/WTreeTableNode.C: fix konqueror/IE6 rendering problems + +18-10-2007: + * src/Ext/TableView[.C]: add methods for modifying and inspecting + the current selection + +17-10-2007: + * src/wt/WMessageResources.C: remove the trailing '\n' that was + being added to every WString in a resourcefile by mxml + +10-10-2007: + * examples/extkitchen/ExtKitchenExample.[Ch]: add a password prompt + dialog example + + * src/wt/WAbstractToggletButton.[C], src/wt/WCheckBox.[Ch], + src/wt/WRadioButton.[C]: fix reversion caused by constructor with + bool as first argument resulting in missing label text + + * src/wt/WFormWidget.[C]: add setFocus() method + + * src/wt/WInPlaceEdit.C: focus line edit using setFocus() + stateless slot + + * src/wt/WScrollArea.[C]: add vertical scrollbar stuff + +01-10-2007: + * src/web/skeleton/*.html: Reorder inline and external stylesheets so + that Wt's default rules can be overridden by applications + + * src/wt/WAnchor: Inherit from WContainerWidget so that other stuff can + be added to it + +27-09-2007: + * src/CMakeLists.txt: integrate mxml sources directly in libwt.so (to + avoid the static non-PIC .a in dynamic .so problem with CMake) + +24-09-2007: + * resources/dhtml_dhtmlHistory.js, src/web/WebController.C: use + dynamically generated blank image + + * src/wt/WApplication.C: use dhtml_dhtmlHistory.js in directory + specified using resourcesURL property + + * src/web/skeleton/Ajax.html: fix Loading... CSS for Internet Explorer + +21-09-2007: + * src/wt/WMenuItem.C: fix segfault when container stack is deleted + before menu. + + * src/mxml/*: supply a version of mxml(patched 2.3) which is used + by default instead of a system-installed mxml. + +11-09-2007: + * src/wt/WSignal: fixed EventSignal.emit() to also emit stateless + slots. + +08-09-2007: + * src/wt/WMenuItem, src/wt/WMenuItem.C: decouple render widget + from activate signal, move margin for horizontal items from WMenu.C + + * src/wt/WObject, src/wt/WSignal: use WObject::Method typedef + + * src/examples/wt/RoundedWidget.C: implement missing method, add + enabledRoundedCorners method for changing color in stateless + slot functions. + + * src/wt/WTabWidget, src/wt/WTabWidget.C, others: implement + WTabWidget with doxygen look, based on WMenu.C + +07-09-2007: + * src/Ext/SplitterHandle.C, src/Ext/Splitter.C: implemented full + awareness of configured minimum and maximum sizes. + + * src/Ext/TableView.C, src/wt/WAbstractItemModel.C: added full + support for other data types in models with respect to rendering + and editing + +04-09-2007: + * src/CMakeLists.txt: added -DBOOST_SPIRIT_THREADSAFE, fixes + thread safety problem (Max M) + + * src/http/Reply.C: implemented If-Modified-Since, Last-Modified, + and 304 Not Modified response codes + + * *CMakeLists.txt: add soversioning + + * src/wt/WDllDefs: added WT_VERSION define (4gsystems) + + * src/wt/WTimer: WTimer memory leak patch (4gsystems) + +03-09-2007: + * all: Released 2.0.5. + + Didn't keep track of ChangeLog, intending to improve on + that, using GNU Changelog guidelines. + +12-05-2007: + * Haven't kept track of things in ChangeLog.. Sorry. + +18-02-2007: + * various transient and widget memory improvements + sample of sizeof() before and after: + WObject: 48 40 + WResource: 84 60 + WWidget: 92 68 + WWebWidget: 592 108 + WInteractWidget: 1356 300 + WText: 1384 328 + WTable: 1376 320 + +16-02-2007: + * New widget: WTreeTable and example File Browser. + +18-12-2006: + * Use Boost.Signals instead of home-brew signal/slots + * Drag&Drop seems to work with firefox/konqueror, probably needs more + testing + * valgrind checked, no warnings no errors ! + * adopt wide string array + +05-12-2006: + * Solaris patches by Patrick Mauritz + * Drag&Drop, initial implementation (not yet complete) + * Drag&Drop example + +01-12-2006: + * Happy birthday, Wt. + * many changes not documented in the Changelog. + +07-09-2006: + * Support for cookies for session management (when available) instead + of URL rewriting + * Support for reading and setting cookies (in respectively WEnvironment + and WApplication) + +04-09-2006: + * Starting to finalize event handling: WMouseEvent and WKeyEvent + * working on a new example and a new widget: WVirtualImage + +02-09-2006: + * Added WTreeNode and WIconPair widgets, derived from the + treelist example with different loading policies, and OO + overloading capabilities. + * Corrected API bug: hide() and show() are non-virtual but + setHidden() is the virtual one that you should reimplement + * Remove WCssDecorationStyle from WWebWidget header, and do + not allocated it until needed. Saves alot on memory usage + when using many widgets. + +01-09-2006: + * Moved Menu from the homepage example to become WMenu. Provides now + different loading policies for the items, and customizable + WMenuItem look (through OO inheritance). + * Fixed a nasty bug in stateless slot learning. + +30-08-2006: + * implemented WJavascriptSlot (abdiel) for pure client-side event + handling + * implemented WSuggestionPopup + * use two-phase rendering for all updates, and configuration option + to change the threshold + * separated examples in their own doxygen documentation + * added ContactSuggestions widget to the composer example + * various documentation improvements + * fix a bug with deleting a signal while emitting the slots (abdiel) + * avoid (?) race condition in blur() and click() handler in WSuggestionPopup.C + +24-08-2006: + * mindfully implemented all quoting stuff + * change behaviour at quit(): simply render the last changes, but + add -- Quited. to the title, and avoid receiving new events. + * fix non-javascript look for the wrap buttons. + +22-08-2006: + * add WWidget::isVisible() + * workaround for Firefox keeping 'Transferring data from:' + * yet another WFileUpload implementation -- the final one ? + * misc improvements to Composer example + * add support for external stylesheets + * fix stateless slots discarding changes after serving resource + * allow caching of WWidget resources + +21-08-2006: + * Added the composer example + * Fixed bug not quoting href attribute in DemoTreeList + * CgiParser: revert old behaviour, parsing through big requests + * move helper function escape and replace to DomElement + * WFileUpload::fileTooLarge in addition to WAppliation::requestTooLarge + * isLoaded is broken because of WCompositeWidget..., but not needed anyway + * add WEnvironment::getArgument, by Tomek Mazurek + * WFileUpload: looks much better (konqueror, opera & firefox). + * WFileUpload: added alternative firefox implementation that is even better (but is not used now) + * WFileUpload: add isUploaded to check if calling upload() will do anything + * WLineEdit: bugfix: escape preset text + * WText: bugfix: replace newlines with
      in plainFormatting + * WTextArea: bugfix: now set preset text correctly + * WWebWidget, WCompositeWidget: bugfix: fix destructor javascript code + * WWebWidget: bugfix: do not propagate renderOk in stubbed widgets + * WWebWidget: bugfix: escapeText returns the escaped text + * WWidget: bugfix: resourceMimeType: escape " in javascript code. + +18-08-2006: + * Documentation improvements + * Fixed WFileUpload and FileUpload example (one bug remains) + * Add propagateRenderOk() instead of creating the complete + DOM structure + * prevent XSS attacks at the heart by filtering user supplied + XHTML. + * Do not parse CGI input if too big anyway -- simply discard. + +17-08-2006: + * Documentation improvements, also doxygenified some reusable + classes in the examples. + +16-08-2006: + * improved look on non-javascript version, konqueror renders + wt-homepage now ok, but Firefox keeps adding padding inside + the button... + +14-08-2006: + * parse locale from browser and use it as start-up locale + and other things in WEnvironment + * release 1.1.5 + +11-08-2006: + * performance improvement: keep track of widgets that need + to be repainted, and only process these when finding + changes in the DOM. + +10-08-2006: + * many new features, not kept track off in ChangeLog (bad habit) + * release 1.1.4 + +13-07-2006: + * adopted cmake, an autoconf/tool/make alternative. + +26-04-2006: + * new: WContainerWidget::insert(WWidget *w, WWidget *before) + * WCssDecorationStyle background image may be positioned + * Added a Style example + +24-04-2006: + * Patch for gcc 4 compile errors (Alan Ezust). + * chased any remaining memory leaks in all examples, reworked + WCompositeWidget implementation -- you will need to update any code + * WFileUpload improvements: looks better, works better + Added a changed signal which allows capturing file selection on + some browsers + * WApplication: limit post-size API + * CgiParser: make buffer static + +22-04-2006: + * fix session behaviour with multiple fastcgi servers for high + performance settings + * added WDoubleValidator and WRegExpValidator and example of a + custom validator -- DateValidator + +20-04-2006: + * kick buggy cgi_util.c in favour of C++ CgiParser + * rewrote WFileUpload -- works well but looks ugly (most of the time) + * fixed some memory-leaks indicated by valgrind + +14-04-2006: + * many changes in the last months that were not recorded + in the Changelog. + +16-01-2006: + * add new example hangman, contributed by Wim Dumon + * add new example hello-word, contributed by Wim Dumon + * fixed contentAlignment() on non-inline children + * moved HorizontAlignment to WWidget (that was ugly!) + * add support for valgrind, and fixed dito bugs + * remove excess zeros in object ids + * release 1.0.14 + +03-01-2006: + * add WSignalMapper class, suggested by Wim Dumon + * fix gcc 4 compile error, thanks to Costantino Giuliodori and Udo + Kreckel. + * release 1.0.13 + * add WContainerWidget::clear() + * add WLineEdit::echoMode (Normal/Password) + +29-12-2005: + * add javascript but non-ajax code. But does not work with + netscape 4, because of 'onclick' not working ? + * release 1.0.12 + +28-12-2005: + * make WWidget an abstract interface + * create WWebWidget + * create WCompositeWidget + * fixed a bug not initializing margin and padding + * add non-javascript support + * add message resource bundles, and support for localization to + most WWebWidgets + * add refresh() in WApplication and WWidget, and in wt-homepage + example. + +22-12-2005: + * fix (hack?) for browser going back to Wt page bug + * added side specific margin and padding, moved padding to + WContainerWidget + * More documented members in WWidget + * release 1.0.11 + +21-12-2005: + * added WFont, and use in the wt-homepage example (for the navigation + menu) + * discovered, but not fixed, the reason why going back to the Wt page + does not work: when going backward, the page replays the same stuff + as if it was unloaded. So, we probably want our first keep-alive + message to be 'load', which should find out which things were + stubbed, and retransmit these -- are easier just trigger a reload + +20-12-2005: + * some bug fixes in WStackedWidget + * converted homepage to Wt (as new example) + * add support for WApplication.title() + * release 1.0.10 + +19-12-2005: + * started doing ChangeLog + * read XHTML tutorial at w3org, now properly generate xhtml, no more + problems caused by closing non-empty tags (such as + + + + + +
+ + +
+
+

Installation: Unix-like platforms

+
+
+ + + + +Wt Installation + +

Wt Installation instructions on Unix-like systems

+ +This page lists the instructions for building and installing Wt 3.0.0. +It is organized in 3 sections: +
    +
  • Requirements
  • +
  • Building and installing the library
  • +
  • Trying the examples (or your own Wt application)
  • +
+ +

Requirements

+ +

+The library provides two ways for deploying applications: either using +the FastCGI protocol, in conjunction with a webserver (like apache), +or using a built-in web server (wthttpd). You only need one of these, +but you can have both of them.

+ +

+The built-in web server is more convenient during development and is +easier to setup.

+ +

+The FastCGI based solution provides more flexibility for deployment of +the application. The built-in web server runs all sessions in a single +process, while the FastCGI based solution allows different deployment +schemes including dedicated processes per sessions.

+ +

+Each of these two choices correspond to a library, a +so-called connector library. Below it is outlined how to +configure the build process of Wt to build either or both libraries +(libwthttp and libfcgi).

+ +

+Thus, to build a Wt library with built-in web server you need to +link against libwt and libwthttp. To build a Wt library which acts as +a FastCGI process, you need to link against libwt and libfcgi. +

+ +

1 Wt requirements

+ +
    +
  • Compiler: gcc-3.3.4 or higher, or gcc-4.1.x or higher, or other + Ansi C++ compiler that can deal with boost-like C++ code.
  • +
  • CMake cross-platform build +system: +
    Preferably CMake 2.6, which comes with a usable script for + finding boost libraries, but CMake 2.4 is still supported using + Wt's own boost find script. +
    +
  • +
  • C++ boost library (version + 1.36 or higher), preferably with thread support enabled. You can + verify you have a thread-enabled boost installation by locating the + libboost_thread library. Thread support is not essential: Wt + functionality is not affected except for exotic things like server + push and reentrant event loops. Most importantly, even without + thread support Wt can handle multiple concurrent sessions.
  • +
  • Optionally, Haru Free PDF Library, which is used to provide support for painting to PDF (WPdfImage).
  • +
  • Optionally, GraphicsMagick, for supporting painting to raster images (PNG, GIF, ...) (WRasterImage).
  • +
+ +

1a Using FastCGI

+ +

When using FastCGI, Wt requires a webserver (like apache, lighttpd or +nginx) which supports the FastCGI protocol.

+ +

Given that Apache is still the most popular webserver, below are +the requirements for apache, for other web servers the list is +similar:

+ +
    +
  • FCGI library, including C++ bindings (libfcgi++)
  • +
  • Fastcgi or mod_fcgi plugin for Apache.
  • +
+ +

1b Using wthttpd

+ +When using the built-in webserver, two more libraries may be installed +to enable optional features (you can also build without them), but +otherwise no extra dependencies are required. + +
    +
  • Optionally, libz, for compression over HTTP.
  • +
  • Optionally, openssl, for supporting HTTPS.
  • +
+ +

2 Additional and optional requirements for some of the examples

+
    +
  • libmysql++-2.x (hangman)
  • +
+ +
+ +

Building and installing the Wt library

+ +

1. Create a build directory

+ +

The recommended way to build the library is in a seperate build + directory, for example within the top-level of the Wt package:

+ +
+    $ cd wt-x.xx
+    $ mkdir build
+    $ cd build
+
+ +

2. Configure the library

+ +
+    $ cmake ../
+
+ +

The latter command will try to locate the necessary libraries. If everything +is OK, then this should end with something like: + +

+  -- Generating done
+  -- Build files have been written to: /home/kdforc0/project/wt/build
+

+ +

To build a multi-threaded version of Wt, which uses multiple +threads for handling concurrent requests, you need a thread-enabled +boost library. By default, CMake 2.6 will only search for a +thread-enabled boost installation, while CMake 2.4 will fall-back to a +non-multithreaded boost library, reporting: + +

+  ...
+  -- Looking for pthread_create in pthread - found
+  ** Disabling multi threading.
+  ...
+

+ +

Most linux distributions provide multi-threaded boost libraries by +default now.

+ +

If CMake fails, because it cannot resolve all dependencies, then you +may help CMake by setting some variables to help CMake locate the libraries. +This may be done on the command-line using -Dvar=value or +using the interactive program: + +

+    $ ccmake .
+
+ +

Variables that you may set to configure Wt's built-in boost finding +method:

+ +
+
BOOST_COMPILER
+
The boost compiler signature. For a library +libboost_regex-gcc41-mt-1_37.so, this is 'gcc41'
+
BOOST_VERSION
+
The boost compiler signature. For a library +libboost_regex-gcc41-mt-1_37.so, this is '1_37'
+
BOOST_DIR
+
The boost installation directory. This is the directory where lib/ +and include/ are located for your boost installation.
+
+ +Other variables specify several build and configuration aspects of Wt, of which +the most relevant ones are: + +
+
CMAKE_INSTALL_PREFIX
+
Installation prefix for the library and include files)
+
CONFIGDIR
+
Path for configuration files (default is /etc/wt/)
+
CONNECTOR_FCGI
+
Build the FastCGI connector (libwtfcgi) ?
+
CONNECTOR_HTTP
+
Build the stand-alone httpd connector (libwthttp) ?
+
EXAMPLES_CONNECTOR
+
Which connector library to use for the examples? (wthttp or wtfcgi)
+
MULTI_THREADED
+
Build a multi-threaded wthttpd? While on by default, and +recommended, you may want to disable this for example if you suspect +threading problems. Note that recursive event loops (most notably when +using Dialog::exec()) are not possible without thread support.
+
+ +The following variables apply to the FastCGI connector: + +
+
RUNDIR
+
Default location for Wt runtime session management (can be overridden in the Configuration file)
+
WEBUSER
+
Webserver username: used to assign permissions to RUNDIR
+
WEBGROUP
+
Webserver groupname: used to assign permissions to RUNDIR
+
+ +The following variables apply to the wthttpd connector: + +
+
WTHTTP_CONFIGURATION
+
Location of the wthttpd configuration file (default is /etc/wt/wthttpd)
+
HTTP_WITH_SSL
+
Compile with support for SSL, for secure HTTP (HTTPS). This requires an OpenSSL library.
+
HTTP_WITH_ZLIB
+
Compile with support for compression over HTTP. This requires the +libz library.
+
+ +To change any entry, use [Enter]. To save and quit, do [c] followed by [g]. +

+ +

3. Build the library

+ +
+    $ make
+
+ +

4. Install the library (as user with sufficient permissions):

+ +
+    $ make install
+
+ +

5. Get your LD_LIBRARY_PATH ok, if needed (mostly for FastCGI).

+ +

+If you did not install Wt in a directory (CMAKE_INSTALL_PREFIX) included +in the default linker dynamic library search path, then the web server will +not be able to start Wt programs (such as the examples).

+ +

+Fix it by (as user with sufficient permissions): + +

+    $ ln -s /your/path/to/lib/libwt.so /usr/lib
+    $ ln -s /your/path/to/lib/libwtfcgi.so /usr/lib
+
+ +

+ +
+ +

Trying the examples (or your own Wt application)

+ +

Deploying an application is different when using FastCGI or the +built-in web server (wthttpd).

+ +

The examples that come with the library use the connector specified +by the build option EXAMPLES_CONNECTOR (see supra).

+ +

Some examples need third-party JavaScript libraries (ExtJS or TinyMCE). +

+ +You will notice 404 File not Found errors for ext/ or +resources/tiny_mce/ if you are missing these JavaScript +libraries. +

+ +

A. Using FastCGI and apache

+ +

1. Build the examples

+ +
+    $ make -C examples
+
+ +

2. Deploy the example foobar

+ +

+The easiest way to deploy the examples is by copying the binary (from +your build directory) and the source directory (which contains the +images) and the resources/ into the same destination directory +somewhere in your Apache server (we no longer generate a ./deploy.sh +script that took care of some of this). +

+ +
+    $ export DESTINATION=/var/www/localhost/htdocs/wt-examples
+    $ mkdir -p $DESTINATION/foobar
+    $ cp -r examples/foobar/* resources/* build/examples/foobar/*.wt $DESTINATION/foobar/
+
+ +

+This does however make public also files (such as message resources +bundles, data files, etc...) that do not need to be served by your web +server. The clean way to deploy your own applications is to use the +"approot" property to deploy those files to a directory outside the +webserver's doc root. +

+ +

3. Configure Apache

+ +

+Treat the example as a mod_fastcgi application, by adding a line to +20_mod_fastcgi.conf in your Apache configuration modules.d/ directory, e.g.: +

+ +
+    FastCgiServer /var/www/localhost/htdocs/wt-examples/composer/composer.wt
+
+ +

4. Restart apache

+ +

B. Using wthttpd

+ +

1. Build the examples

+ +
+    $ make -C examples
+
+ +

2. Running an example

+ +

+Most examples use additional files, such as message resource bundles, +which are not indicated with absolute path names. Therefore the +working directory should be the source directory for the example. A +similar argument goes for icons and the setting of the --docroot +variable. Since Wt 3.1.4, you can use the "approot" property to move +the additional files that should not be available to browsers outside +of the docroot. +

+ +
+    $ cd ../examples/foobar # source directory for example foobar
+    $ ln -s ../../resources . # include standard Wt resource files
+    $ ../../build/examples/foobar/foobar.wt --docroot . --http-address 0.0.0.0 --http-port 8080
+
+ +

+This will start a httpd server listening on all local interfaces, on +port 8080, and you may browse the example at http://127.0.0.1:8080/

+ +

+You will notice 404 File not Found errors for resources/ files if you are +missing the resources files. +

+ +

+These are all the command-line options that are available: +

+General options:
+  -h [ --help ]                 produce help message
+  -t [ --threads ] arg (=10)    number of threads
+  --servername arg (=vierwerf)  servername (IP address or DNS name)
+  --docroot arg                 document root for static files
+  --errroot arg                 root for error pages
+  --accesslog arg               access log file (defaults to stdout)
+  --no-compression              do not compress dynamic text/html and text/plai
+                                n responses
+  --deploy-path arg (=/)        location for deployment
+  --session-id-prefix arg       prefix for session-id's (overrides wt_config.xm
+                                l setting)
+  -p [ --pid-file ] arg         path to pid file (optional)
+  -c [ --config ] arg           location of wt_config.xml. If unspecified, 
+                                WT_CONFIG_XML is searched in the environment, 
+                                if it does not exist then the compiled-in 
+                                default (/etc/wt/wt_config.xml) is tried. If 
+                                the default does not exist, we revert to 
+                                default values for all parameters.
+  --max-request-size arg        Maximum size of a HTTP request. This also 
+                                limits POST requests, so this is an upper limit
+                                for file uploads. Default is 40MB.
+  --max-memory-request-size arg Requests are usually read in memory before 
+                                being processed. To avoid DOS attacks where 
+                                large requests take up all RAM, use this 
+                                parameter to force requests that are larger 
+                                than the specified size to be spooled to disk. 
+                                This will also spool file uploads to disk.
+  --gdb                         do not shutdown when receiving Ctrl-C (and let 
+                                gdb break instead)
+
+HTTP server options:
+  --http-address arg    IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --http-port arg (=80) HTTP port (e.g. 80)
+
+HTTPS server options:
+  --https-address arg     IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --https-port arg (=443) HTTPS port (e.g. 443)
+  --ssl-certificate arg   SSL server certificate chain file
+                          e.g. "/etc/ssl/certs/vsign1.pem"
+  --ssl-private-key arg   SSL server private key file
+                          e.g. "/etc/ssl/private/company.pem"
+  --ssl-tmp-dh arg        File for temporary Diffie-Hellman parameters
+                          e.g. "/etc/ssl/dh512.pem"
+
+

+ + + +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/InstallationWindows.html b/wt-3.1.7a/doc/reference/html/InstallationWindows.html new file mode 100644 index 0000000..a97420a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/InstallationWindows.html @@ -0,0 +1,192 @@ + + + + +Wt: Installation: Windows + + + + + + + + + +
+
+

Installation: Windows

+
+
+ + + + +Wt Installation + +

Wt Installation instructions for Windows

+ +This page lists the instructions for building and installing Wt on Windows. +It is organized in 3 sections: +
    +
  • Requirements
  • +
  • Building and installing the library
  • +
  • Trying the examples (or your own Wt application)
  • +
+ +

Requirements

+ +

+Wt for Windows uses the built-in web server connector or the ISAPI connector. +The fastcgi connector is not supported. The built-in web server is more +convenient during development and is easier to setup than the ISAPI connector. +To use the built-in server, you have to link your projects against libwt +and libwthttp. To use the ISAPI connector, you have to link to libwtisapi +instead of libwthttp.

+ +

Requirements: +

    +
  • Microsoft Visual Studio C++ 2005 or newer. Wt and its dependencies also + build on the Express Edition, which is free (as in beer) to use. +
  • CMake cross-platform build system (www.cmake.org): cmake-2.6.x, + Windows version (2.8 or newer recommended).
  • +
  • Boost 1.36 (or later).
  • +
+

+ +

Additional and optional requirements for some of the examples +

    +
  • For https support: OpenSSL, version 0.9.8d or newer.
  • +
  • To compress traffic: zlib 1.2.3
  • +
  • libmysql and libmysql++-2.x (hangman)
  • +
  • Haru Free PDF Library, which is used to provide support for painting to PDF (WPdfImage).
  • +
  • GraphicsMagick, for supporting painting to raster images (PNG, GIF, ...) (WRasterImage).
  • +
+

+ +

+We stronly recommend to use libraries which are all built using the same +compiler and the same runtime configuration (/MT, /MD, /MTd +or /MDd) to avoid incompatibilities with the C runtime libraries. Mixing +CRTs is NOT recommended, the zlib +DLL FAQ clearly explains why and what you should do about it (in +short: use prebuilt libraries for the exact same compiler as you use, and +if those are not available, rebuild the dependency libraries from the sources). +

+ +
+ +

Step by step instructions to build and install the Wt library

+ +Up to date instructions are located on the Wt wiki page: +Installing Wt on MS Windows + +Instructions on how to use the ISAPI connector for deployment under IIS are +also available on the wiki page: +ISAPI on Microsoft IIS + +

Trying the examples (or your own Wt application) using wthttpd

+ +

1. Run the example in the MSVC IDE

+ +Right-click on the example project you want to run, and select 'Properties'. +In Configuration Properties->Debugging, set the Command Arguments to +
+--http-address=0.0.0.0 --http-port=8080 --deploy-path=/hello --docroot=.
+
+ +

+This will start a httpd server listening on all local interfaces, on +port 8080, and you may browse the example at http://127.0.0.1:8080/hello

+ +

+Examples that need extra files to run, should be executed from their source +directory in order to find their dependency files (icons, css files, etc. +Watch for 404 errors in Wt's output). To do so, set the 'Working directory' +for the example to wt-x.y.z/examples/ExampleName. Some examples (e.g. the +wt home page) need the 'resources' directory to work correctly. Copy +the wt-2.x.x/resources to the example's source directory to solve this +problem. Other examples (such as the Charts example) may require the +installation of ExtJs. See the Wt reference manual for more information +on how to obtain and install ExtJs. + +

+These are all the command-line options that are available: +

+General options:
+  -h [ --help ]              produce help message
+  -t [ --threads ] arg (=10) number of threads
+  --docroot arg              document root for static files
+  --no-compression           do not compress dynamic text/html and text/plain 
+                             responses
+  --deploy-path arg (=/)     location for deployment
+
+HTTP server options:
+  --http-address arg    IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --http-port arg (=80) HTTP port (e.g. 80)
+
+HTTPS server options:
+  --https-address arg     IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --https-port arg (=443) HTTPS port (e.g. 443)
+  --ssl-certificate arg   SSL server certificate chain file
+                          e.g. "/etc/ssl/certs/vsign1.pem"
+  --ssl-private-key arg   SSL server private key file
+                          e.g. "/etc/ssl/private/company.pem"
+  --ssl-tmp-dh arg        File for temporary Diffie-Hellman parameters
+                          e.g. "/etc/ssl/dh512.pem"
+
+

+ + + +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/Releasenotes.html b/wt-3.1.7a/doc/reference/html/Releasenotes.html new file mode 100644 index 0000000..541732f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/Releasenotes.html @@ -0,0 +1,1957 @@ + + + + +Wt: Release notes + + + + + + + + + +
+
+

Release notes

+
+
+ + + + + +Wt Release notes + + +

Wt Release notes

+ +This file lists important notes on migrating existing applications to +newer version of Wt. It lists changes in the library that may break +the way you build Wt, the way you configure Wt or the Wt API and +behaviour. + +

Release 3.1.7 (Nov 26, 2010)

+ +

+ This release contains mostly bug fixes, quality improvements, + and a few new features. +

+ +

+ Note: the package was updated (3.1.7a) on Nov 30 to fix a layouting + regression. +

+ +

A) New classes:

+ +
+
WGLWidget
+
+ A preview of WebGL support in Wt (work in progress). +
+
+ +

B) Main new features in existing classes:

+ +
+
+ WAbstractItemView +
+
Added API for hiding columns.
+
+ WCartesianChart, + WPieChart +
+
+ Added support for ToolTipRole data, using WAbstractArea interactive areas. +
+
+ Dbo::Session::rereadAll() +
+
+ Reread all transient objects, as a catch-all solution to stale + data (data modified in another session). +
+
+ WInteractWidget +
+
Added support for touch and gesture events (Mobile webkit).
+
+ +

C) Misc:

+ +
+
+ WebSocket protocol support (experimental) +
+
Use of WebSocket for communication between browser and server + can now be used, by enabling <web-sockets> in the + configuration file (we're likely to turn this on by default in a + future version. There is automatic fallback to the current + XMLHttpRequest based communication if WebSockets are not available + or communication could not be established. WebSockets is only + available using the built-in httpd server (which is now also a + WebSocket server).
+
+ Build improvements +
+
+
    +
  • Provide a workaround for broken g++ compiler shipped in Ubuntu + Maverick
  • +
  • Provide support for building without using + std::wstring (-DWT_NO_STD_WSTRING) or std::locale + (-DWT_NO_STD_LOCALE=OFF) support. +
  • +
+
+
+ +
+ +

Release 3.1.6 (Oct 29, 2010)

+ +

+ This release contains a healthy mix of bug fixes, quality improvements, + and new features. And hopefully no regressions :-) +

+ +

A) New classes:

+ +
+
SyncLock<Lock>
+
+ A dead-lock avoidance adaptor for a Boost mutex lock, which provides + a controlled way of releasing the current application lock. +
+
WProgressBar
+
+ A progress bar, contributed by Thomas Suckow. +
+
WSpinBox
+
+ A spin box. +
+
boost_any_traits<Type>
+
+ A traits class for customized interpretation of data stored in a + boost::any. You can register a new type using registerType<Type>. +
+ +
+ +

B) Main new features in existing classes:

+ +
+
+ Native support for MSIE 9 +
+
+ MSIE 9 (Beta) is now supported in all its goodness, including support + for HTML5 canvas and (almost working) support for SVG. +
+
+ + WApplication::UpdateLock +
+
The lock is now a RIAA lock, getUpdateLock() has been deprecated. + The lock needs also to be tested against validity (using operator bool()): + when invalid the session that it is trying to lock is being destroyed.
+
+ WApplication::setConfirmCloseMessage() +
+
Provide the user with a message to confirm navigating away from the + application.
+
+ WApplication::unload() +
+
Rather then waiting for the session to expire, an application + that is navigated away iis now notified of this and will by + default quit().
+
+ WApplication::addMetaHeader() +
+
Can now be used to specify "http-equiv" meta headers too.
+
+ WDatePicker::changed() +
+
I wonder how we ever did without. +
+
WAbstractArea::mouseWheel(), + WInteractWidget::mouseWheel(), + WMouseEvent::wheelDelta()
+
+ Added mouseWheel() event. +
+ +
WFileUpload
+
+ Added support for the simultaneous upload of multiple files (HTML5 + "multiple") attribute and showing a progress bar to show upload + progress. +
+ +
WFormWidget::hasFocus()
+
+ Returns whether the widget currently has the keyboard focus. +
+ +
WHTML5Media
+
+ Added events to catch play, pause, play-back progress and volume + changes. +
+ +
WLineEdit, WTextArea
+
+ Added currentPosition(), selectionStart(), + selectedText(), and hasSelectedText() methods to retrieve + the current cursor position and selection. +
+ +
WPushButton::setRef()
+
+ Utility method to create an anchor that looks like a button, or a + button that behaves like an anchor, depending on your point of + view. There is also setResource() to set a resource as + target. +
+
+ WResource +
+
Added API for upload progress tracking.
+ +
+ Http::Request +
+
Added support for HTTP request byte ranges, and this is now + interpreted by both the WFileResource and built-in httpd for static + files. +
+
+ Http::Response +
+
Added setContentLength() which allows you to specify the + lenght of the response in advance, proving a better user experience + for large downloads. +
+
+ Dbo::Session::query() +
+
Switched to a more complete Boost.Spirit parser for SQL queries, which + understands most of the SQL syntax, including functions, + "with ... select ... ". +
+
+ Dbo::QueryModel +
+
Added support for custom column header names and changing the + undelrying query using setQuery() while preserving the current + column definitions.
+
+ Dbo::SqlStatement +
+
Added boost::posix_time::time_duration type support.
+
+ Dbo::sql_value_traits<WTime> +
+
Added template specialization for WTime.
+
+ +
+ +

Release 3.1.5 (Sep 10, 2010)

+ +

+ This release contains mostly bug fixes. +

+ +

A) Main Changes

+ +
+
WGridLayout, + WBoxLayout
+
Optimized client-side rendering performance. Previously, every layout + manager used would automatically slowdown every event because it would try + to relayout each time. This is no longer the case.
+
WSocketNotifier
+
The socket notifier has been resurrected (it was in an perpetual state + of brokeness) and now works reliably across targets.
+
+ +

B) Changes that may break existing applications:

+ +

1) Built-in resource bundles

+ +Starting with this version, Wt uses an internal message resource +bundle for the few strings it provides by itself (like for example +'Ok' for the ok button in a WMessageBox, or the days-of-week in WDate). + +Previously, an ugly API was used in WMessageBox, +WCalendar, +and WDatePicker +using a boolean 'i18n' parameter in the constructor. All this has now been removed, +and instead the keys for these built-in strings have been documented. If you were +using these classes your application will no longer build, you can simply remove the +internationalization parameter and you will need to fix the keys you used for the +messages according to the documentation. + +Any localized strings you use will take precedence over these built-ins. + +All affected classes (only those listed above actually have changed API and behaviour) are: +
+
WAbstractItemView
+
the paging tool bar buttons for graceful callback.
+
WCalendar
+
because of WDate
+
WDate and WDateTime
+
week days, month names
+
WDatePicker
+
because of WCalendar and for the close button
+
WDefaultLoadingIndicator
+
loading text
+
WInPlaceEdit
+
save and cancel button text
+
WMessageBox
+
standard buttons
+
WLoadingIndicator
+
standard buttons
+
Validators
+
for the messages they display in case of error
+
+ +

2) Other behavioural changes

+ +
+
WDialog
+
Escape will no longer result in the dialog being rejected. You can + enable this behaviour using the rejectWhenEscaped() method. +
+
+ +
+ +

Release 3.1.4 (Aug 13, 2010)

+ +

+ This release contains several new features, but also a few changes + that break backwards compatibility (but are unlikely to affect an + average application). +

+ +

A) New classes:

+ +
+
+ WBatchEditProxyModel
+
A proxy model that caches editing operations to commit them atomically. +
+
WHTML5Audio
+
Audio support using the HTML5 audio tag.
+
WPdfImage
+
A WPaintDevice that writes to Pdf (using libharu).
+
WRasterImage
+
A WPaintDevice that writes to a Png/Gif (using GraphicsMagick).
+
ISAPI connector
+
(Windows only) a connector that implements the Microsoft ISAPI + API, to integrate directly into Microsoft IIS. On Windows, this is + an alternative deployment option next to the built-in httpd.
+
+ +

B) Main new features in existing classes:

+ +
+
+ WAbstractItemView +
+
Added support for validators while editing.
+
+ WApplication +
+
Added an appRoot() method this returns the value of the + special property "approot" which can in some cases be defined + implicitly by a connector (such as ISAPI), and which allows an + application to reference working files whereas previously it was + assumed that they were in the working directory (CWD).
+
+ WEnvironment::agent() and related +
+
Convenience methods that return pre-parsed user agent identification, + should you want to differentiate based on browser.
+
+ WWidget::addStyleClass(), WWidget::removeStyleClass() +
+
Added addStyleClass() and removeStyleClass() methods.
+
+ WMenu, WMenuItem +
+
Added support for closable and disabled items (not complete, + CSS is lacking for polished theme). Contributed by Dmitriy Igrishin.
+
+ WModelIndex +
+
Added support for in-place (destructive) encoding to and + decoding from a raw index, making this less of a hassle for View + classes.
+
+ WSortFilterProxyModel +
+
Added support for row insertion/removal.
+
+ WSuggestionPopup +
+
Allow usage as an advanced combo-box, with an explicit drop down + button and ability to react to a selection.
+
+ Dbo::id() +
+
Support for natural keys (possibly of composite type) next to the + built-in surrogate keys.
+
+ Dbo::dbo_traits<C> +
+
By specializing this traits class, you can modify the surrogate id + field name (or disable it), and the optimistic version lock field + name (or disable it).
+
+ Dbo::Session::query() +
+
More robust query parsing (of the 'select' part), including + support for "select distinct".
+
+ Dbo::QueryModel +
+
Added editing support (editing the model will modify the queried + dbo's).
+
+ Dbo::query_result_traits<C> +
+
Added setValue(), create(), add() and remove() methods for modifying + queried results.
+
+ +

C) Changes that break existing applications:

+ +
+
Dbo::Dbo
+
+ This class is now a templated with the class name itself, in + order to provide the proper type for the (natural or surrogate) id + field for id(). You will need to replace +
+      class User : public Wt::Dbo { ... }
+    
+ with +
+      class User : public Wt::Dbo<User> { ... }
+    
+
+
CSS
+
The toplevel container used by Wt is now given a position: + relative style; this was needed to be able to position widgets + (such as popups) using position: absolute, but may break + application layouts. You can override this CSS style by adding + .Wt-domRoot { position: static; } to your application's + (internal or external) stylesheet. +
+
+ +
+ +

Release 3.1.3 (May 20, 2010)

+ +

+ This release several new features, but also a few changes that + break backwards compatibility (but are unlikely to affect an average + application). +

+ +

A) New classes:

+ +
+
SignalBase, + EventSignalBase
+
Abstract base classes for signals (these are not actually new, + but they were not yet part of the API).
+
WHTML5Video
+
Video support using the HTML5 video tag (work-in-progress).
+
Dbo::Call
+
Class for executing a database call.
+
+ Dbo::SqlConnectionPool, + + Dbo::FixedSqlConnectionPool
+
Connection pool interface and implementation.
+
Dbo::QueryModel
+
An tabular item model for query results.
+
+ +

B) Main new features in existing classes:

+ +
+
WAbstractItemDelegate
+
Added methods for editing: editState(), setEditState(), + setModelData() and closeEditor().
+
WAbstractItemView
+
New editing API: edit(), closeEditor(), saveEditedValue(), + setEditOptions(), setEditTriggers().
+
Graceful degradation support using a paging navigation bar, which + may be customized by reimplementing createPageNavigationBar().
+
+
WCalendar, WDatePicker
+
Added setBottom() and setTop() methods to specify a valid range.
+
WInteractWidget
+
Added a mouseDragged() event for responding to mouse moves while + a mouse button is down.
+
WItemDelegate
+
Implements editing using a WLineEdit.
+
WMenu
+
Can now be used without a contents stack.
+
WSuggestionPopup
+
Added API to support dynamic server-side filtering.
+
WTableView
+
New implementation which supports horizontal and vertical + virtual scrolling, column resizing, drag and drop, etc... like + WTreeView.
+
Chart::WPieChart
+
Supports now also a shadow effect.
+
Dbo::collection
+
A find() method has been added to refine the query of a many-side relational.
+
Dbo::ptr
+
A version() method returns the current version.
+
Dbo::Query
+
An extra template parameter specifies a binding strategy. The + default binding strategy is DynamicBinding, which allows reuse of + the query object, and provides new API to modify the query: + where(), orderBy(), groupBy(), offset(), limit().
+
Dbo::Session
+
Added support for use with a connection pool. Added execute() + method to execute an SQL statement.
+
Built-in httpd
+
Support for HTTP Range header and partial content servering.
+
+ +

C) Changes that break existing applications:

+ +
+
Dbo::sql_result_traits
+
This traits class has been renamed to query_result_traits and + its API has changed considerably. This will only impact when you + have implemented a custom traits specialization. The getColumns() + method has been replaced with a getFields() method, and the + loadValues() method has been renamed to load(). A getValues() + method has been added which provides conversion to boost::any's. +
+
WTableView
+
This View class was reimplemented to have functionality + comparable to WTreeView. In the process, we had to abandon the + underlying <table> representation because of rendering + issues with Chrome (of all browsers!), although the WTableView + documentation specifically promised that we would keep this. +
+
+ +
+ +

Release 3.1.2 (March 26, 2010)

+ +

This release contains mostly bug fixes, and a few new features.

+ +

A) New classes:

+ +
+
WShadow
+
Class representing a drop shadow effect (see below).
+
Dbo/backend/Postgres
+
A Postgres backend has landed, contributed by Hilary Cheng.
+
+ +

B) Main new features in existing classes:

+ +
+
WBoxLayout, WGridLayout
+
Addition of horizontal and vertical splitter support (resize handles to + allow the user to adjust the layout), sponsored by Eurofer. The new API + methods are setResizable(), setColumnResizable() and setRowResizable()
+
WCalendar
+
Improved the API to allow custom cell rendering, and custom handling + of selection. We have also made the API for selection consistent with other + widgets (like WTreeView), deprecating the old API.
+
WDateTime
+
Added toPosixTime() and fromPosixTime() methods to interoperate with + boost::posix_time::ptime.
+
WFormWidget
+
Added a setEmptyText() method to implement a label inside a line edit or text area.
+
WPainter
+
Added a setShadow() method which defines a drop shadow to be used for subsequent + drawing actions.
+
WResource
+
Added a setInternalPath() method which allow a resource to be deployed at a deterministic and "pretty" URL.
+
WString
+
Added constructors that take a std::locale for interpreting a narrow + string in a given locale.
+
WWidget
+
Added setLayoutSizeAware() and layoutSizeChanged() methods which allow a widget to react to layout size changes.
+
Http::Request
+
Added access to the request method().
+
Http::Response
+
Added a setStatus() method to modify the response status.
+
Dbo::Session
+
Added support for schema qualified tables, in + Session::mapClass() and the joinTable specified in hasMany().
+ Added API for dropping the schema: dropTables().
+ Added support for arbitrary queries in Session::query(), including + queries that do not return result or do not select from tables.
+
Dbo::field()
+
Allow size suggestion for std::string and WString mappings
+
Dbo::SqlConnection, Dbo::SqlStatement
+
Added support for floating point types, binary data (using std::vector<unsigned char>) and date and date/time types.
+ Added methods for return dialect-specific information.
+ Added properties API.
+
+
Dbo::sql_value_traits
+
Added support for backend-specific type mapping.
+
(internal) DomElement
+
Performance improvements in serializing the widgets to HTML + and/or JavaScript
+
Built-in httpd
+
Added a configuration option --max-request-size to + limit the size of a POST instead of the built-in default of 40 + MB
Added a configuration option + --max-memory-request-size to limit the size of a POST that + is handed in-memory. Bigger POSTs are handled using a spool file. +
+
+ +
+ +

Release 3.1.1 (February 17, 2010)

+ +

The minimum boost version is now 1.36.

+ +

This release handles mostly bug fixes, with as most visible change +an update of the polished theme, which is now considered +complete.

+ +

A) Security fixes:

+ +Because of the following fixes for security problems, we recommend anyone +to upgrade live deployments of his application to the latest version. + +
+
Possible XSS vulnerability
+
Fixed a possible XSS attack where a user follows a link to a Wt web + application, taking advantage of unchecked insertions of the URL when + redirecting to the canonical page.
+
Possible UTF-8 vulnerability
+
Form values and JSignal arguments received from the browser are + now checked for sane UTF-8 encoding.
+
+ +

B) New classes:

+ +
+
Dbo/Dbo
+
An optional base class for a database object, providing access to its + id() and session().
+
+ +

C) Main new features in existing classes:

+ +
+
WCanvasPaintDevice
+
Now implements native text rendering on Firefox and latest + Chrome and Safari browsers
+
WInPlaceEdit
+
Added a setEmptyText() method which sets the text to be + displayed when value is empty.
+
WPopopMenu
+
Added an exec(WWidget *location, Orientation orientation) method which + popups the menu besides another widget.
+
WSuggestionPopup
+
This class is now also style by the CSS theme.
+
WTemplate
+
Avoids now rerendering of already bound widgets when the + template is rerendered.
+
WTree, + WTreeNode, + WTreeTable, + WTreeTableNode +
+
These widgets are now theme-aware, and tree decoration styling + is provided by the theme. The setImagePack() APIs are now + no-ops
+
WWidget
+
Added positionAt() method which positions a widget (absolutely) besides + another widget.
+
Chart/WAxis>
+
Added a setLabelFont() method.
+
Http/Request
+
Added serverName(), serverPort(), path(), pathInfo(), + queryString(), urlScheme(), in(), contentType(), contentLength(), + userAgent() and clientAddress() methods which expose information + form the HTTP request to WResources.
+
+ +

D) Build changes:

+ +
+
XML_FEATURES
+
This CMake option has been removed, and Mini-XML has been + replaced by a modified RapidXML xml parser (mostly because of the + hard-to-interpret Mini-XML license), but there are also nice + performance improvements.
+
+ +
+ +

Release 3.1.0 (December 29, 2009)

+ +

This release contains several new features and classes, after a long + period of stabilization that happened before the 3.0.0 release.

+ +

A) New classes:

+ +
+
WAggregateProxyModel
+
A model that provides support for drilling down through columns, supported + by WTreeView.
+
WCombinedLocalizedStrings
+
Combines different localized strings implementations.
+
WDateTime
+
Combines a calendar date (WDate) and a clock time (WTime).
+
WTemplate
+
Use an XHTML fragment as a template, with variables that are place + holders for strings or other widgets. See the blog example of how this + class can be used to simplify HTML/CSS based layout of widgets and + contents.
+
WTime
+
Represents a clock time (0-24 hours).
+
Wt::Dbo
+
An Object Relational Mapping library. See the tutorial here.
+
+ +

B) Main new features in existing classes:

+ +Most inline CSS styles have been pushed out to an external style +sheet, which may be themed. The "default" theme provides the old look, +while a new "polished" theme provides a less boring (?) look for +several widgets (work in progress). The theme can be set using WApplication::setCssTheme(). + +As a result, you will need to deploy Wt's "resources/" +folder, which contains the themes in "resources/themes/", for +all but the most trivial applications. + +
+
Signal
+
Added a template connect() method which may be given any function + object, providing also support for the (future) c++1x lambda functions.
+
WCanvasDevice
+
Several optimizations to output more concise JavaScript.
+
WPaintedWidget
+
When width and/or height is not set using resize(), the widget + will now properly react to layout management when put into a layout + manager, triggering a server-side rerendering when needed.
+
WSlider
+
A sliderMoved() signal was added which is fired whenever the slider is + moved (but not yet released).
+
WWidget
+
Added a find() method which searches the widget hierachy for a widget + with a particular objectName().
+
WServer
+
Added an addResource() method to bind static resources to particular + URLs (i.e. resources that are not bound to a specific session).
+
Ext::Container
+
Will now properly react to layout management from a layout that + is set for a WContainerWidget.
+
Ext::FormField
+
Added changed(), blurred() and focussed() signals.
+
Chart::WAxis
+
Added setAutoLimits() and autoLimits() methods to configure which limits + are to be determined based on the data, and which are explicitly set.
+
Chart::WDataSeries
+
Added the setHidden() and hidden() methods to enable or disable + a data series. Added setBarWidth() and barWidth() methods to set the + width of a bar (useful mostly for scatter plots). Added + setMarkerSize() and markerSize() methos.
+
Chart::WCartesianChart
+
Use MarkerPenColorRole and MarkerBrushColorRole to override + colors for makers on a per data point basis. Added mapFromDevice() + and mapToDevice() methods for mapping device coordinates to chart + coordinates and vice-versa
+
+ +

C) API Changes:

+ +
+
WSlider
+
Not really an API change, but the vertical slider is now showing + the maximum value at its top side, not its bottom side.
+
Chart::WAxis
+
The minimum() and maximum() methods will now return the calculated + minimum and maximum value when they are to be automatically calculated based + on the data, configured using setAutoLimits()
+
+ +

D) Build changes:

+ +
+
XML_FEATURES
+
A new configuration option, XML_FEATURES, was added which allows the library to be built without MiniXML (and disabling fatures that require Mini-XML support). This configuration option is likely to be removed again in future versions.
+
Documentation
+
A doc directive was added, which uses doxygen and asciidoc tools + to generate the reference documentation and tutorial.
+
Tests
+
Automated tests were added for non-interactive functionality, + and are built by default.
+
+ +
+ +

Release 3.0.0 (November 3, 2009)

+ +

+This release contains mostly bug fixes, build improvements and +documentation improvements compared to the latest pre-release +(2.99.5). +

+ +

+Most build improvements are related to finding the boost +libraries. Previously, Wt used a custom script, since CMake versions +< 2.6 did not provide a good enough script for finding +boost. Starting with this release, when using CMake 2.6 or later, Wt +will use the script that comes with CMake. You can still fall back to +the script that comes with Wt, which is still used for older versions +of CMake, by defining one of the BOOST_COMPILER or BOOST_VERSION +variables. +

+ +

A) New classes:

+ +No new classes + +

B) Main new features in existing classes:

+ +
+
WDialog
+
It is now possible to have multiple modal dialogs, and nested + recursive event loops.
+
+ WWidget
+
The setDisabled() method moved up + from WFormWidget to WWidget.
+
+ JSlot
+
The exec() method now passes object and event to the + JavaScript event handler.
+
+ +

C) API Changes:

+ +
+
WResource
+
The handling of changes to the resource has been sanitized. A + new method, setChanged() was added which must be called + to notify users of the resource that the resource was changed. In + addition to the existing generateUrl() which generates + a new URL, a method was added which merely returns the existing + URL: url(). With these improvements, a resource can + effictively be shared by many view widgets and updated with the + minimum of bandwidth usage.
+
+ +
+ +

Release 2.99.5 (September 1, 2009)

+ +

+This release contains mostly bug fixes. The previous release (2.99.4) +contains some critical bugs that cause mayhem on IE, and a regression +with server push. +

+ +
+ +

Release 2.99.4 (August 27, 2009)

+ +

+ !! This release contains bugs that render it unusable on IE !! +

+ +

+This release contains mostly bug fixes and back-end improvements. The +most exciting new feature is the addition of a new bootstrap method, +which implements progressive enhancements (starting with a plain HTML +page, and then upgrading it to an AJAX page if the browser has +support), see +also the +documentation. +

+ +

A) New classes:

+ +
+
WTableView
+
This is a simple MVC View class that renders tabular data + in the most straight forward way using an HTML table element +
+
+ +

B) Main new features in existing classes:

+ +
+
Ext::ToolBar
+
Added insert() methods.
+
WApplication
+
Added an enableAjax() method which notifies the application that + a session is being enhanced with AJAX capabilities when using the + progressive bootstrap method.
+
WWidget
+
Added an enableAjax() method which enhanced the widget with AJAX + capabilities when using the progressive bootstrap method.
+
WCssDecorationStyle
+
Add support for custom cursors.
+
WServer
+
For FastCGI deployments, the proxy process which directs FastCGI + requests to the correct session process is now also + multi-threaded.
+
+ +

C) API Changes:

+ +
+
The WApplication::notify() behavior changed.
+
Previously during a request, this method was called multiple + times during event propagation and rendering of the + application. Now, the method is called exactly once for each + request. In this way, it becomes a useful entry point to also manage + resource usage during (and inbetween) requests.
+
+ +
+ +

Release 2.99.3 (July 24, 2009)

+ +

+This release contains mostly bug fixes and small feature +improvements. The most notable change that might affect existing +applications is a simplified internal path API behavior. +

+ +

A) New classes:

+ +
+
WAbstractItemDelegate + and WItemDelegate
+
WAbstractItemDelegate is a helper class used + by WTreeView (and in the future perhaps other view + classes) to render contents. The standard + implementation, WItemDelegate maintains the default + implementation that was previously integrated + in WTreeView. The delegate will be responsible for + editing features in WTreeView in the future, and in + fact, you can already implement a custom item delegate that does + editing if you cannot wait for it! +
+
Test/WTestEnvironment
+
WTestEnvironment is an environment class which is useful for + (unit) test-cases: it allows the instantiation of a + WApplication so that you may include widgets in unit tests. +
+
+ +

B) Main new features in existing classes:

+ +

C) API Changes:

+ +
+
change of WApplication::internalPathChanged() semantics.
+
The old behavior was that a single internal path change caused + by the user (e.g. by moving forward/backword through his browser + history) would cause repetitive invocations of internalPathChanged() + with different arguments. The underlying idea was that this would + make it easier to have the handling of internal path changes + distributed over different objects. It caused however more problems + than it solved. The new behavior is now that it is invoked exactly + one time, and the argument is simply the new internal path.
+
+ +
+ +

Release 2.99.2 (May 29, 2009)

+ +

+This release contains mostly build improvements, bug fixes, and API cleanups. +

+ +

A) New classes:

+ +
+
Http/Client
+
Client is a utility class to bootstrap a new Wt + application.
+
+ +

B) Main new features in existing classes:

+ +
+
Ext::FormField
+
Add setFocus() method.
+
Ext::ToolBar
+
Added an addStretch() method (contributed by David Galicia).
+
Http::Response
+
Added a continuation() method.
+
WCheckBox
+
Add support for tri-state checkboxes. These are also supported + by item models and WTreeView.
+
WDialog
+
Support for non-modal dialogs and interactive moving.
+
WFormWidget
+
New methods setReadOnly() and isReadOnly().
+
WGridLayout
+
Support a row stretch value of -1, which is like 0 but will still + manage the height of cells (allowing their contents to fill the entire + cell).
+
WPaintDevice
+
Support update rendering (not erasing the current canvas) using + paint flags.
+
+ +

C) API Changes:

+ +
+
WFileUpload::isUploaded() was deprecated
+
The name was not covering its actual behavior: instead of + checking whether a file has been uploaded, it returns whether true + when a call to upload() is not needed. You should replace any call + to isUploaded() with the new method + !canUpload() (note the inversion!.
+
+ +
+ +

Release 2.99.1 (Mar 20, 2009)

+ +

+This release contains only build improvements, bug fixes, and API cleanups. +

+ +
+ +

Release 2.99.0 (Mar 4, 2009)

+ +

+This release is a preview for Wt 3.0.0. Many things have changed both +in the internals and the API. This is the first release that provides +several API changes which are not backward compatible (some of which +were post-poned until now). + +Please read the following notes carefully, especially sections C) and +D), to understand what changes to expect and how to adapt existing +applications. +

+ +

+Support for the C++ boost library < 1.35 has been dropped: Wt now +requires at least boost >= 1.35.0. +

+ +

A) New classes:

+ +
+
WFlags
+
WFlags is a utility class that provides a type-safe ORing of + enum flags. It is used everywhere in the Wt API where previously an + int was used to allow enums to be ORed together.
+
WGoogleMap
+
This is a widget, contributed by Richard Ulrich, that displays a + Google map.
+
Http::Request, Http::Response, Http::ResponseContinuation and Http::UploadedFile
+
These are utility classes which model an HTTP request and + response and that are used in the new WResource API.
+
+ +

B) Main new features in existing classes:

+ +
+
WApplication::enableUpdates()
+
Server-initiated updates (aka "server push") has been + reimplemented and now works reliably in all situations, including in + the presence of intermediate proxies. The dependency on the 3rd + party JS orbited library has been removed and replaced with a simple + XHR-based solution.
+
WButtonGroup
+
Various methods were added: id's may be associated with a specific + radio buttons, which may be used to identify a particular button.
+
WDatePicker
+
Is now easier to use because of a sensible default constructor + that also creates the line edit using a WDateValidator, + and creates the icon which is associated with the popup.
+
WFileResource
+
Uses the continuation support in the new WResource API + to transmit the file in chunks.
+
WLength
+
WLength::Auto was added, is a synonym for WLength()
+
WSuggestionPopup
+
Is now also an MVC View widget, reading its data from a + WAbstractItemModel
+
WTable
New method + setHeaderCount() to specify the number of first rows or columns that + should be rendered as an HTML table header + (<th>).
+
WWidget
+

New virtual method rerender() which allows a + widget to prepare itself before rendering (and defer internal + changes until that time). A widget may ask to be rerendered using + askRerender()

Widget no longer + inherits from WResource, but instead inherits directly from + WObject. It was simply a bad idea, and not useful for + anything.

+
+ +

C) Changes that break existing applications:

+ +
+
1) Signals are no longer public members
+

Instead, they are now accessor member functions: + e.g. WInteractWidget::clicked has been renamed to + WInteractWidget::clicked(). This has as major benefit + that signals can be created on-demand, which leads to drastically + lower memory usage and signifcant speedups especially on embedded + systems.

The change requires that everywhere in your code + where you access a signal, you will need to change to add + parentheses. For consistency, you may also want to + use the same convention for your own widget classes that define + signals.

+
2) WResource
+

The API has been redesigned and greatly simplified. If you are + implementing your own resources, then you will need to redesign your + implementation. The new API is simpler (requires only one virtual + method to be implemented) and more powerful, providing support for + continuations to serve large resources without blocking a + thread or requiring large memory usage.

+

In addition, resources have better thread-safety: they are now by + default reentrant (requests for a single resource may be handled + concurrently) and they are protected from concurrently being + destroyed by the main event loop.

+
3) WValidator
+

The signature for the virtual validate() method was + changed: parameter pos which was ignored anyway has + been removed.

+
4) WEnvironment
+

The methods getArgument() and + arguments() were renamed to respectively + getParameter() and getParameterMap(). The + signature for getParameter() is also different as it + returns a pointer to a string, which is 0 when the parameter is not + defined, instead of the olde behaviour of throwing an + exception. There is a new method that allows to read all values for + a parameter, getParameterValues()

+
5) WModelIndex
+

The 20-byte SHA1 hash based internal pointer has been removed + again as the object increase and overhead could not be justified.

+
+ +

D) Deprecated API that was removed:

+ +These are API calls that were deprecated in earlier releases, and have now +been completely removed from the library: + +
+
WApplication::applicationName()
+
Use + WApplication::internalPath() instead.
+
WApplication::setState()
+
Use WApplication::setInternalPath() + instead.
+
WApplication::state()
+
Use + WApplication::internalPath() instead.
+
WApplication::stateChanged
+
Use WApplication::internalPathChanged() + instead.
+
WRegExpValidator::WRegExpValidator(const boost::regex&) +
+
Use the WRegExpValidator(const + WString&) constructor instead.
+
WPainterPath::drawArc(..., width, height, ...)
+
An elliptical arc segment could not be support on all devices.
+
WTable::numRows()
+
Use WTable::rowCount().
+
WTable::numColumns()
+
Use WTable::columnCount() + instead.
+
WText::setFormatting() and + WText::formatting()
+
Use WText::setTextFormat() and + WText::textFormat() instead.
+
+ +
+ +

Release 2.2.3 (Jan 26, 2009)

+ +

This release is a maintenance release, with mostly bug fixes and +feature improvements.

+ +

A) Main new features in existing classes:

+ +
+
WAbstractItemModel:
+
const char * data in boost::any is now + also supported.
+
WAbstractProxyModel: +
Implemented toRawIndex() + and fromRawIndex() so that indexes can be recovered + when the model's layout is changed, if the underlying model + provides implementations for toRawIndex() + and fromRawIndex().
+
WComboBox:
+
Also supports StyleClassRole data role for items
+
WDialog:
+
New method setTitleBarEnabled() to disable the default + title bar.
+
WMenu:
+
New method removeItem(), only works when rendered as a + list.
+
WTabWidget:
+
New method removeTab().
+
WTreeView:
+
    +
  • New method setColumn1Fixed() to fix the first + column while scrolling horizontally through the other columns.
  • +
  • New method setColumnFormat() to control formatting of + data.
  • +
  • New method setColumnBorder() to set the + internal column border color.
  • +
  • New method setColumnResizeEnabled() to disable resize + handles.
  • +
  • The view now also reacts correctly to insertion and + removal of model columns.
  • +
+
+
+ +

B) New examples

+ +
+
+ gitmodel:
+
An example that demonstrates how to implement a custom abstract + item model.
+
treeview-dragdrop:
+
An example that demonstrates drag and drop support in WTreeView.
+
+ +

C) Changes that break backward compatibility

+ +
+
WApplication:
+
useStyleSheet() only supports a subset of IE condition + strings, since the string is now parsed by Wt rather than by IE (when + dynamically loading stylesheets, the comment-syntax does not work + reliably).
+
+ +
+ +

Release 2.2.2 (Dec 1, 2008)

+ +

As of now, we will also be listing noteworthy new API features, +even if they are no concern for backwards compatibility.

+ +

A) New classes:

+ +
+
WPopupMenu, + WPopupMenuItem:
+
A popup menu, which you would typically use to present a + context menu.
+
WAbstractProxyModel, + WSortFilterProxyModel:
+
Proxy models, which present data from a source model in a + different way.
+
WLoadingIndicator, WDefaultLoadingIndicator, + WOverlayLoadingIndicator:
+
Customizable loading indicators.
+
+ +

B) Main new features in existing classes:

+ +
+
WTreeView, WAbstractItemModel:
+
The WAbstractItemModel interface was extended to allow handling + of drag & drop events, and WTreeView now is able to start + dragging and handle dropping of item selections and other data.
+
JSignal:
+
You can now pass the original (keyboard/mouse) JavaScript event + as a parameter to custom signals.
+
WTreeView:
+
access mouse event in itemClicked, doubleClicked and + mouseWentDown signals.
+
WServer:
+
Support for widget-set mode, allowing a Wt application to be + embedded in an existing web page/application.
+
+ +

C) Changes that break backward compatibility

+ +

This release does not contain changes that break existing +applications.

+ +
+ +

Release 2.2.1 (Nov 3, 2008)

+ +

This release is as usually a mix of bug fixes, improvements and new +features.

+ +

We have made a significant change to the MVC system, which will +break existing program code in case you have implemented your own +models (i.e. deriving from WAbstractItemModel) or views +widgets (i.e. components that listen to model changes).

+ +

+The WAbstractItemModel interface was changed to support +hierarchical models. This means that most methods will now take an +extra parameter that specifies the parent WModelIndex, +and also all signals have now this extra parameter. Because the +parameter has a default value of WModelIndex() which corresponds to +the top level parent, the API is largely backwards compatible when +merely using the model. It is only those classes that reimplement the +interface, or listen to signal events, that are affected. +

+ +

+The immediate benefit of the new WAbstracItemModel +interface is that it allows us to implement View widgets like the new +WTreeView widget. +

+ +
+ +

Release 2.2.0 (Sept 12, 2008)

+ +

This release has a rather substantial rewrite (and simplification) +of Wt's bootstrapping process. In the past, Wt used a frameset trick +to be able to load the AJAX-based skeleton when JavaScript was +available. Isntead, now, the entire AJAX-based stuff is loaded +directly into the bootstrap page. A benefit of the new approach is +that we avoid iframe tricks, which have been deprecated from strict +HTML and XHTML. But, it was in fact motivated in the first place to +support all major browsers for a new internal path API. This new API +allows to fully support URL changes and bookmarks in a unified way +(i.e. it works equally when the browser supports AJAX, no JavaScript, +or is a bot such as google bot).

+ +

As a consequence, this release contains the following changes that +may break your application:

+ +
    +
  • WMenu::enableBrowserHistory() and WMenu::browserHistoryId() have been removed, use the new methods WMenu::setInternalPathEnabled() and WMenu::setInternalBasePath() +
  • +
  • WMenuItem has been reorganized, and if you have + specialized WMenuItem you will need to adapt your reimplementation + to the new virtual interface. In the new interface, you need to + reimplement WMenuItem::createItemWidget() and + WMenuItem::updateItemWidget() allowing you to react to + item changes (internal path or text). The default implementation now + always uses a WAnchor.
  • +
  • WApplication::setState(), WApplication::state() and WApplication::stateChanged have been deprecated. It is stronly advised that you use the new internal path API instead. This does require you to treat different parts of the state as a file hierarchy. See the WApplication::setInternalPath() documentation. +
  • +
+ +

+ The following methods have been deprecated (but are still supported): +

+
    +
  • WTable::numRows() has been renamed + to WTable::rowCount().
  • +
  • WTable::numColumns() has been renamed + to WTable::columnCount().
  • +
+ +
+ +

Release 2.1.5 (July 25, 2008)

+ +

Wt now installs its include files in a Wt/ subdirectory. You may +want to change your build files to pick up this new include directory, +or, change your code to scope the include files to look like +#include<Wt/WLineEdit> instead of #include<WLineEdit>

+ +

This release contains the following changes that may break your +application:

+ +
    +
  • WText will validate XHTML text when it is set to the + widget. The old behaviour was to validate only before + rendering. The change was needed to be able to react to XML parse + errors. As a consequence if you are creating a WText with text that + is not valid XML, followed by a + call setFormatting(WText::PlainFormatting), you should + change this now to use the new WText constructor which + takes the TextFormat as a new argument: new WText(text, + Wt::PlainText, parentWidget) +
  • +
  • WContainerWidget::setLayout(WLayout *layout, bool fitWidth, bool + fitHeight) has been replaced with the more generic + WContainerWidget::setLayout(WLayout *layout, int + alignment). +
  • +
+ +

+ The following methods and enumerations have been deprecated (but are + still supported): +

+
    +
  • enum WText::Formatting has been renamed + to Wt::TextFormat. The old values map as follows on new + values: +
      +
    • WText::XHTMLFormatting becomes Wt::XHTMLText;
    • +
    • WText::XHTMLUnsafeFormatting becomes Wt::XHTMLUnsafeText
    • +
    • WText::PlainFormatting becomes Wt::PlainText
    • +
    +
  • +
  • WText::setFormatting() has been renamed + to WText::setTextFormat() and + WText::formatting() has been renamed + to WText::textFormat().
  • +
+ +
+ +

Release 2.1.4 (July 4, 2008)

+ +

The following has changed for building Wt:

+ +
    +
  • The CMake variable CONFIGURATION (which defaulted to + /etc/wt/wt_config.xml) is no longer used, but instead there is now a + CONFIGDIR (/etc/wt/) which is used to store configuration + files. +
  • +
+ +

The following has changed in the wt_config.xml file:

+ +
    +
  • The <valgrind-path> setting for the FCGI connector may now + be a command-line including arguments
  • +
+ +

This release should not contain changes that may break your +application.

+ +
+ +

Release 2.1.3 (May 20, 2008)

+ +

This release should not contain changes that may break your +application.

+ +
+ +

Release 2.1.2 (April 14, 2008)

+ +

The following changes may break your application build:

+ +
    +
  • WTreeNode::expanded() has been renamed + to WTreeNode::isExpanded().
  • +
+ +
+ +

Release 2.1.1 (April 10, 2008)

+ +

This release should not break any of your applications, but we did + deprecate some methods and enumeration types. You are advised to + migrate to the replacements methods since we will discontinue support + for the older ones in the future.

+ +

+ The following methods and enumerations have been deprecated: +

+
    +
  • enum SelectionUnit has been renamed + to SelectionBehavior. The old values map as follows on new + values: CellSelection becomes SelectItems; + RowSelection becomes SelectRows.
  • +
  • WWidget::setOffset(int sides, WLength) is deprecated, + and the new method is WWidget::setOffsets(WLength, int + sides): the argument order has been switched to be consistent + with the method signature of setMargin() + and setPadding().
  • +
  • WResource::suggestFilename() has been renamed to + WResource::suggestFileName().
  • +
+ +

+ The following changes affect run-time behaviour: +

+
    +
  • WTreeNode now supports a policy for when to show a child count + indication. The old behaviour was to always show the child count. + Now, by default this option is disabled. Use + WTreeNode::setChildCountPolicy(Enabled) to get the old + behaviour back, if you wish.
  • +
+ +
+ +

Release 2.1.0

+ +

The library dependencies have changed slightly.

+ +

+To build Wt 2.1.0, you need: +

+
    +
  • CMake 2.4 or later
  • +
  • boost 1.34.1 (boost 1.33.1 might should still work, but is + not recommended)
  • +
  • asio 0.3.9: either the boost or non-boost version (only + for the http connector)
  • +
  • optionally, openssl for HTTPS support (only for the http + connector)
  • +
  • optionally, libz for gzip compression support (only for + the http connector)
  • +
  • fcgi library, including C++ bindings (libfcgi++)(only for the + fcgi connector)
  • +
+

Furthermore, the Wt::Ext library has been upgraded and now wraps +around the extjs 2.x library, instead of extjs 1.x.

+ +

Some API changes may need a porting effort: +

+
    +
  • Ext::ProgressDialog: doesn't show by default, you + need to call show() to show the dialog.
  • +
  • Ext::ContentPanel, Ext::BorderLayout have + been removed. They have been replaced with a stand-alone layout + system, that may manage contents in + an Ext::Container. The layout system provides + WBorderLayout and several other layout managers.
  • +
  • WSignalMapper has been expanded to allow mapping of + signals with an extra argument, which is passed to the mapped + signal. Because of this, the signature of the class has been + expanded with an extra template argument. If you have forward + declarations to WSignalMapper, you will need to modify + these too (or simply include WSignalMapper).
  • +
  • WAnchor: no longer uses a WLabel internally, + and the label-releated methods have been removed.
  • +
+ +
+ +

Release 2.0.5

+ +
    +
  • WDialog (and WMessageBox) usage changed, and + is now more like Qt. When you are not + using WDialog::exec() or WMessageBox::show(...), + then you must explictly show() the dialog to show it. You + can now also hide() the dialog if you want. +
  • +
  • + Moved several enums from within classes to the Wt namespace. This is + likely to break your code at compile time when you are using one. The + fix is to remove the class scope from the enum type or value. +
      +
    • WScrollArea::Orientation -> Wt::Orientation
    • +
    • WMenu::Orientation -> Wt::Orientation
    • +
    • WMessageBox::StandardButton -> Wt::StandardButton
    • +
    • WMessageBox::Icon -> Wt::Icon
    • +
    +
  • +
+ +
+ +

Release 2.0.4

+ +Important: 2.0.4a contains a fix for a bug introduced in 2.0.4 that + reset the deploy-path in wthttpd. + +

+ This release adds a few new features: +

+
    +
  • WComboBox (and WSelectionBox) now use + a WAbstractItemModel in a more flexible model/view + system.
  • +
  • Stylesheets may be browser-conditional (by Patrick Fischer)
  • +
  • wthttpd may serve custom error pages (by Patrick Fischer)
  • +
  • WResource can now access HTTP GET or POST query + arguments. This will break your code (at compile time) if you + have implemented your own WResource, since the signature of the + streamResourceData() method has been changed to pass + the arguments map as a second parameter.
  • +
+ +
+ +

Release 2.0.1

+ +

+ This release fixes some build-related problems, as well as smaller + bugs. The main improvement in this release is related to use of Wt + in resource-constrained embedded systems. +

+ +

+ The most visible change is that the dependency on the Xerces C++ XML + library was dropped in favour of the much smaller Mini-XML + library. The draw-back is a reduction of supported character + encodings to only UTF8 and UTF16, next to the default locale character + encoding (which is typically an 8-bit flavour). +

+ +

+ When using the built-in httpd, you can now disable support for SSL + at compile time, freeing a number of SSL-related dependencies. +

+ +

+ In the API, more comparison operators (== and !=) were added to + WString, and a WViewWidget was added for simple MVC widgets (with + the main purpose to reduce session-state at the server). +

+ +
+ +

Release 2.0.0

+ +

+ This release contains numerous changes which are likely to cause some + porting effort for Wt 1.1.x applications to work properly. +

+ +

+If you are upgrading from a 1.99.x release, you will notice that +some of these notes have actually evolved, especially with respect to +WString and unicode support. +

+ +

+ Here is a list of changes with respect to Wt 1.1.x that are likely + to require your attention, and some tips on how to do the porting. +

+ +

1) Namespace Wt

+ +

All Wt classes are now inside the namespace Wt.

+ +

To handle this change, you will need to: +

+
    +
  • Wrap forward declarations to Wt widgets in header files inside a + Wt namespace, or #include <WFwdDeclarations>
  • +
  • and scope all Wt classes with Wt::,
  • +
  • or import the Wt namespace: using namespace Wt;
  • +
+ +

2) WString

+ +

+ Previously, most widgets offered double methods that either used a + std::string for literal text, or a + WMessage for localized text. +

+ +

+ In the new release, widgets use Wt::WString for both + literal and localized text. WString offers unicode support for both + literal as well as localized text. To create a literal string, + simply assign or construct a Wt::WString from that string. The + strings supported or both narrow and wide C and C++ strings. UTF8 + encoded narrow strings may also be converted. To create a localized + string, use one of the static methods WString::tr(const + std::string key) and WWidget::tr(const std::string + key). +

+ +

+ To help with legacy code, WMessage is now a typedef for WString, but + is deprecated and should not be used in new code. Unfortunately, the + constructors WMessage(const char *text) and + WMessage(const std::string text), changed meaning! + While previously they took a key to construct a localized message, + they now take a literal text (the exact opposite!), since they are + in fact plain WString() constructors. As a consequence your application + will display key values instead of resolving those values (but will + not break entirely). +

+

+ The new approach offers the benefit of only requiring one method + signature for both literal and localizable text. This not only + simplifies our work, but more importantly by using + WString for displayed text in the API of your own + widgets, localization (including the automatic language switching) + comes automatically and is decided on by the user of your widget. +

+

+ Fortunately, there is a straightforward trick to handle most consequences + of this change: +

+
    +
  • Replace WMessage(...) with tr(...),
  • +
  • add .value() when using the result of functions such + as WText::text(),
  • +
  • change your own classes to use WString + wherever they expect some text that will be displayed, instead of + std::string or WMessage.
  • +
+ +

3) Wide string API

+ +

+ Since Wt 2.0.0, the API for Wt has been changed to use WString + instead of C++ narrow strings. WString supports both narrow and wide + strings, and provides conversion between both. It does not provide + string operations, however, and instead acts as a string + container. You should convert to a C++ string type to perform + operations. You should also not use WString outside of the user + interface part of your application. +

+ +

4) No more wmain()

+ +

+ Previously, the Wt library implemented the main(int argc, char + **argv) function, and called a wmain() function + which created the WApplication instance. +

+

+ Wt 2.0.0 allows multiple applications to run within a single process. + Therefore, the WApplication::exec() approach was no longer + feasible. The new approach requires that: +

+ +
    +
  • your main function should look like this: +
    +int main(int argc, char **argv)
    +{
    +  return Wt::WRun(argc, argv, &createApplication);
    +}
    +
    +
  • +
  • where createApplication is a function of the following + signature: + +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  // return a new application object.
    +}
    +
    + +
  • +
+ +

5) Configuration in /etc/wt/wt_config.xml

+ +

+ Wt 2.0.0 uses a configuration file for a number of settings that + could previously be configured at build time of the library, or + in the API. The latter functions are: +

+
    +
  • WApplication::setMaximumRquestSize()
  • +
  • WApplication::setIdleTimeout()
  • +
+ +

6) Removed obsolete classes

+ +

+ Wt 2.0.0 removed a number of classes that were still in the widget + tree, but have been obsoleted by more flexible classes: +

+
    +
  • WAbstractTab, WButtonTab, and WTabWidget are obsoleted by the more flexible WMenu.
  • +
+ +

7) Deprecate boost::regex from WRegExpValidator API

+ +

+ The constructor and methods that takes a boost::regex object in + the WRegExpValidator API have been deprecated, to remove the dependency + on boost from the public API. You should consider the std::string based + construtor and method instead. +

+ +

8) WObject::emit() has been removed.

+ +

+ Since Wt 1.99.1, we have removed WObject::emit() function. Instead, + you may simply call the signal with its arguments, or use the + explicit emit method (recommended).

+ +

+ To adapt your code, you should: +

+
    +
  • Replace all emit(MySignal(...)) with MySignal(...) or MySignal.emit(...) +
  • +
+ +

9) WResource::streamResourceData() signature has changed.

+ +

+ Since Wt 2.0.0, WResource::streamResourceData() returns a boolean value + which indicates if all data has been streamed. If you have reimplemented + WResource for your applications, you must update the signature and return + true. +

+

+ The change is relevant only within the new server-push support that is + now in Wt 2.0.0. This allows you to continuously append to the content + of a resource. +

+ +

10) Rename of WJavascriptSlot to JSlot.

+ +
+ +

Release 1.1.7

+ +This release contains lots of additions and improvements, but should +be completely backwards-compatible. + +
+ +

Release 1.1.6

+ +There is one change which will impact the behaviour of current applications: +Currently, on exit, by default the last widget updates are shown. So, no +more good-bye message. This changes slightly when one needs to redirect() +to a new location: not when WApplication::exec() returns, but during the +same event handling as when calling WApplication::quit(). + +
+ +

Release 1.1.5

+ +Nothing special... + +
+ +

Release 1.1.4

+ +Changes to impact everybody, since the previous release: + +
    +
  • + The dependency for libxml++ (and its large number of dependencies) has + been dropped, and replaced by Xerces-C++ (which has no further dependencies). +
  • +
  • + Wt programs need to link against libwtfcgi.so, instead of libwt.so. In the + future Wt will also support different web-connnector systems besides + FastCGI. +
  • +
  • + The signatures of wmain() and WApplication constructor have changed: + new signatures are: +
      +
    • int wmain(const WEnvironment& env)
    • +
    • WApplication::WApplication(const WEnvironment& env)
    • +
    +
  • +
+ +

Other changes:

+ +
    +
  • Support for unicode is implemented, but perhaps needs more testing + by non-Western people ? Only UTF-8 is supported currently.
  • +
  • Addition of a WTimer class -- see mission example.
  • +
  • Many bug fixes which should make Wt more robust against illegal CGI + requests (which are ignored), and now Wt should exit cleanly in more + (all?) circumstances.
  • +
  • Addition of feed-back for pending AJAX requests (does not work yet on + IE).
  • +
  • Support for style sheets is improved: now inline decoration styles + will override style sheet styles. See hangman or treelist examples.
  • +
  • The browser can be redirected to a new page. This is useful when the + application is terminated -- or to change during the application from + HTTP to HTTPS and back.
  • +
  • WValidationStatus API has changed -- less complicated now.
  • +
+ + + +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/WAggregateProxyModel-1.png b/wt-3.1.7a/doc/reference/html/WAggregateProxyModel-1.png new file mode 100644 index 0000000..fa21f69 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WAggregateProxyModel-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WCalendar-default-1.png b/wt-3.1.7a/doc/reference/html/WCalendar-default-1.png new file mode 100644 index 0000000..8156339 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WCalendar-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WCalendar-polished-1.png b/wt-3.1.7a/doc/reference/html/WCalendar-polished-1.png new file mode 100644 index 0000000..e7588ab Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WCalendar-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WDatePicker-default-1.png b/wt-3.1.7a/doc/reference/html/WDatePicker-default-1.png new file mode 100644 index 0000000..541c6d3 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WDatePicker-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WDatePicker-polished-1.png b/wt-3.1.7a/doc/reference/html/WDatePicker-polished-1.png new file mode 100644 index 0000000..ba95c24 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WDatePicker-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WDialog-default-1.png b/wt-3.1.7a/doc/reference/html/WDialog-default-1.png new file mode 100644 index 0000000..9d73640 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WDialog-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WDialog-polished-1.png b/wt-3.1.7a/doc/reference/html/WDialog-polished-1.png new file mode 100644 index 0000000..860fd52 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WDialog-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WGroupBox-1.png b/wt-3.1.7a/doc/reference/html/WGroupBox-1.png new file mode 100644 index 0000000..515c202 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WGroupBox-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WInPlaceEdit-1.png b/wt-3.1.7a/doc/reference/html/WInPlaceEdit-1.png new file mode 100644 index 0000000..6573427 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WInPlaceEdit-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WInPlaceEdit-2.png b/wt-3.1.7a/doc/reference/html/WInPlaceEdit-2.png new file mode 100644 index 0000000..22133dc Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WInPlaceEdit-2.png differ diff --git a/wt-3.1.7a/doc/reference/html/WMessageBox-default-1.png b/wt-3.1.7a/doc/reference/html/WMessageBox-default-1.png new file mode 100644 index 0000000..6a65a0d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WMessageBox-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WMessageBox-polished-1.png b/wt-3.1.7a/doc/reference/html/WMessageBox-polished-1.png new file mode 100644 index 0000000..5c19398 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WMessageBox-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WOverlayLoadingIndicator.png b/wt-3.1.7a/doc/reference/html/WOverlayLoadingIndicator.png new file mode 100644 index 0000000..200abdf Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WOverlayLoadingIndicator.png differ diff --git a/wt-3.1.7a/doc/reference/html/WPainter.png b/wt-3.1.7a/doc/reference/html/WPainter.png new file mode 100644 index 0000000..25d6db5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WPainter.png differ diff --git a/wt-3.1.7a/doc/reference/html/WPanel-default-1.png b/wt-3.1.7a/doc/reference/html/WPanel-default-1.png new file mode 100644 index 0000000..61d7048 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WPanel-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WPanel-polished-1.png b/wt-3.1.7a/doc/reference/html/WPanel-polished-1.png new file mode 100644 index 0000000..df79e98 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WPanel-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WPopupMenu-default-1.png b/wt-3.1.7a/doc/reference/html/WPopupMenu-default-1.png new file mode 100644 index 0000000..dc28aa6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WPopupMenu-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WPopupMenu-polished-1.png b/wt-3.1.7a/doc/reference/html/WPopupMenu-polished-1.png new file mode 100644 index 0000000..4b6015a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WPopupMenu-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WSlider-1.png b/wt-3.1.7a/doc/reference/html/WSlider-1.png new file mode 100644 index 0000000..bde5d91 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WSlider-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WSuggestionPopup-default-1.png b/wt-3.1.7a/doc/reference/html/WSuggestionPopup-default-1.png new file mode 100644 index 0000000..44318f0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WSuggestionPopup-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WSuggestionPopup-polished-1.png b/wt-3.1.7a/doc/reference/html/WSuggestionPopup-polished-1.png new file mode 100644 index 0000000..50e0a28 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WSuggestionPopup-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTabWidget-default-1.png b/wt-3.1.7a/doc/reference/html/WTabWidget-default-1.png new file mode 100644 index 0000000..ed94ad2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTabWidget-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTabWidget-polished-1.png b/wt-3.1.7a/doc/reference/html/WTabWidget-polished-1.png new file mode 100644 index 0000000..6f24b40 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTabWidget-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTextEdit-1.png b/wt-3.1.7a/doc/reference/html/WTextEdit-1.png new file mode 100644 index 0000000..2b1d0b2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTextEdit-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTree-default-1.png b/wt-3.1.7a/doc/reference/html/WTree-default-1.png new file mode 100644 index 0000000..963695d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTree-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTree-polished-1.png b/wt-3.1.7a/doc/reference/html/WTree-polished-1.png new file mode 100644 index 0000000..85d6a9e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTree-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTreeTable-default-1.png b/wt-3.1.7a/doc/reference/html/WTreeTable-default-1.png new file mode 100644 index 0000000..c3ba0a0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTreeTable-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTreeTable-polished-1.png b/wt-3.1.7a/doc/reference/html/WTreeTable-polished-1.png new file mode 100644 index 0000000..ff23110 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTreeTable-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTreeView-default-1.png b/wt-3.1.7a/doc/reference/html/WTreeView-default-1.png new file mode 100644 index 0000000..b8997da Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTreeView-default-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/WTreeView-polished-1.png b/wt-3.1.7a/doc/reference/html/WTreeView-polished-1.png new file mode 100644 index 0000000..472cf91 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/WTreeView-polished-1.png differ diff --git a/wt-3.1.7a/doc/reference/html/annotated.html b/wt-3.1.7a/doc/reference/html/annotated.html new file mode 100644 index 0000000..b519bf3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/annotated.html @@ -0,0 +1,338 @@ + + + + +Wt: Class List + + + + + + + + + +
+
+

Class List

+
+
+Here are the classes, structs, unions and interfaces with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Ext::AbstractButtonAbstract base class for a (toolbar) button or menu item
Wt::Ext::AbstractToggleButtonAbstract base class for radio button and check box
Wt::WAbstractProxyModel::BaseItemA base class for an item modeling a source index parent
Wt::boost_any_traits< Type >A traits class for a type stored in a boost::any
Wt::Ext::ButtonA button
Wt::Http::Request::ByteRangeA single byte range
Wt::Http::Request::ByteRangeSpecifierA byte range specifier
Wt::Ext::CalendarA calendar
Wt::Dbo::CallA database call
Wt::Ext::CheckBoxA user control that represents a check box
Wt::Http::ClientCollection of methods for dealing with a Wt application from a client perspective
Wt::Dbo::collection< C >An STL container for iterating query results
Wt::Ext::ComboBoxA widget that provides a drop-down combo-box control
Wt::Ext::ComponentAn abstract base class for widgets that can be visually disabled
Wt::Dbo::collection< C >::const_iteratorConst Iterator
Wt::Ext::ContainerA container class which manages its contents using layout managers
Wt::WGoogleMap::CoordinateA geographical coordinate (latitude/longitude)
Wt::CoordinatesA coordinate
Wt::Ext::DataStoreA resource that serializes data from a data model
Wt::Ext::DateFieldA form field for conveniently editing a date using a calendar popup
Wt::Dbo::Dbo< C >A base class for database objects
Wt::Dbo::dbo_default_traitsDefault traits for a class mapped with Wt::Dbo
Wt::Dbo::dbo_traits< C >Traits for a class mapped with Wt::Dbo
Wt::Ext::DialogA dialog emulates a modal window that blocks the user-interface
Wt::Dbo::DirectBinding
Wt::Dbo::DynamicBinding
Wt::EventSignal< E >A signal that conveys user-interface events
Wt::EventSignalBaseAbstract base class of an event signal
Wt::Dbo::ExceptionException base class for Wt::Dbo
Wt::WServer::ExceptionServer Exception class
Wt::WLogger::FieldClass that holds the configuration for a single field
Wt::Dbo::FieldInfoDescription of a field
Wt::Dbo::FixedSqlConnectionPoolA connection pool of fixed size
Wt::Ext::FormFieldAn abstract base class for form fields
Wt::WPainter::ImageAn image that can be rendered on a WPainter
Wt::InvalidDateExceptionException thrown when calculating with an invalid date
Wt::InvalidDateTimeExceptionException thrown when calculating with an invalid date
Wt::InvalidTimeExceptionException thrown when calculating with an invalid time
Wt::Dbo::collection< C >::iteratorIterator
Wt::WGLWidget::JavaScriptMatrix4x4A client-side JavaScript matrix
Wt::JSignal< A1, A2, A3, A4, A5, A6 >A signal to relay JavaScript to C++ calls
Wt::JSlotA slot that is only implemented in client side JavaScript code
Wt::Ext::LineEditA line edit
Wt::Ext::MenuA menu presented in a popup window
Wt::Ext::MenuItemAn item in a menu
Wt::Ext::MessageBoxA standard dialog for confirmation or to get simple user input
Wt::Dbo::NoUniqueResultExceptionException thrown when a query unexpectedly finds a non-unique result
Wt::Ext::NumberFieldA form field for editing a number
Wt::Dbo::ObjectNotFoundExceptionException thrown when trying to load a non-existing object
Wt::WSuggestionPopup::OptionsA configuration object to generate a matcher and replacer JavaScript function
Wt::Ext::PagingToolBarA tool bar that provides paging controls for supporting large data sets in a table view
Wt::Ext::PanelA container with a title and standard GUI elements
Wt::Dbo::backend::PostgresA PostgreSQL connection
Wt::Ext::ProgressDialogA standard dialog to inform the user of progress during a time consuming task
Wt::Dbo::ptr< C >A smart pointer for database objects
Wt::Dbo::ptr_tuple< T0, T1,, T9 >A utility class for defining a tuple of database objects
Wt::Dbo::Query< Result, BindStrategy >A database query
Wt::Dbo::query_result_traits< Result >Traits class for result types
Wt::Dbo::QueryModel< Result >A Wt MVC Model to view/edit query results
Wt::Ext::RadioButtonA user control that represents a radio button
Wt::Http::RequestAn HTTP request
Wt::Http::ResponseAn HTTP response
Wt::Http::ResponseContinuationA response continuation object
Wt::WPainterPath::SegmentA segment
Wt::WLogger::SepClass that indicates a field separator
Wt::Chart::SeriesIteratorAbstract base class for iterating over series data in WChart2DRenderer
Wt::Dbo::SessionA database session
Wt::Signal< A1, A2, A3, A4, A5, A6 >A signal that propagates events to listeners
Wt::SignalBaseAbstract base class of a signal
Wt::Ext::SplitterA container widget with resize handles between its children
Wt::Ext::SplitterHandleA handle inside a splitter
Wt::Dbo::sql_value_traits< V, Enable >Traits class for value types
Wt::Dbo::SqlConnectionAbstract base class for an SQL connection
Wt::Dbo::SqlConnectionPoolAbstract base class for a SQL connection pool
Wt::Dbo::backend::Sqlite3An SQLite3 connection
Wt::Dbo::SqlStatementAbstract base class for a prepared SQL statement
Wt::Dbo::StaleObjectExceptionException thrown when Wt::Dbo detects a concurrent modification
Wt::SyncLock< Lock >An dead-lock avoidance adaptor for a Boost mutex lock
Wt::Ext::TableViewA widget that displays data in a table
Wt::Ext::TabWidgetA widget that organizes contents in tab panes
Wt::Ext::TextEditA rich-text editor
Wt::WLogger::TimeStampClass that indicates a time stamp
Wt::Ext::ToolBarA class that represents a tool bar (or a menu bar)
Wt::Ext::ToolTipConfigA configuration object for tool tips
Wt::TouchA single finger touch of a touch event
Wt::Dbo::TransactionA database transaction
Wt::WTransform::TRSRDecompositionResult of a TRSR decomposition
Wt::WTransform::TRSSDecompositionResult of a TRSS decomposition
Wt::WApplication::UpdateLockA RAII lock for manipulating and updating the application and its widgets outside of the event loop
Wt::Http::UploadedFileDetails about a file uploaded with a (POST) request
Wt::WAbstractAreaAbstract base class for interactive areas in a widget
Wt::Chart::WAbstractChartAbstract base class for MVC-based charts
Wt::WAbstractItemDelegateAbstract delegate class for rendering an item in a MVC view
Wt::WAbstractItemModelAn abstract model for use with Wt's view classes
Wt::WAbstractItemViewAn abstract base class for item Views
Wt::WAbstractListModelAn abstract list model for use with Wt's view classes
Wt::WAbstractProxyModelAn abstract proxy model for Wt's item models
Wt::WAbstractTableModelAn abstract table model for use with Wt's view classes
Wt::WAbstractToggleButtonAn abstract base class for radio buttons and check boxes
Wt::WAccordionLayoutA layout manager which shows one item at a time
Wt::WAggregateProxyModelA proxy model for Wt's item models that provides column aggregation
Wt::WAnchorA widget that represents an HTML anchor (to link to other documents)
Wt::WApplicationRepresents an application instance for a single session
Wt::Chart::WAxisClass which represents an axis of a cartesian chart
Wt::WBatchEditProxyModelA proxy model for Wt's item models that provides batch editing
Wt::WBorderA style class for the border of a widget
Wt::WBorderLayoutA layout manager which divides the container region in five regions
Wt::WBoxLayoutA layout manager which arranges widgets horizontally or vertically
Wt::WBreakA widget that provides a line break between inline widgets
Wt::WBrushClass that defines the style for filling areas
Wt::WButtonGroupA class for grouping radio buttons logically together
Wt::WCalendarA calendar
Wt::WCanvasPaintDeviceA paint device for rendering using the HTML 5 <canvas> element
Wt::Chart::WCartesianChartA cartesian chart
Wt::Chart::WChart2DRendererHelper class for rendering a cartesian chart
Wt::Chart::WChartPaletteAbstract base class for styling rendered data series in charts
Wt::WCheckBoxA user control that represents a check box
Wt::WCircleAreaA interactive area in a widget, specified by a circle
Wt::WColorA class that specifies a color
Wt::WCombinedLocalizedStringsA localized string resolver that bundles multiple string resolvers
Wt::WComboBoxA widget that provides a drop-down combo-box control
Wt::WCompositeWidgetA widget that hides the implementation of composite widgets
Wt::WContainerWidgetA widget that holds and manages child widgets
Wt::WCssDecorationStyleA style class for a single widget or style sheet rule
Wt::WCssRuleAbstract rule in a CSS style sheet
Wt::WCssStyleSheetA CSS style sheet
Wt::WCssTemplateRuleA CSS rule based on a template widget
Wt::WCssTextRuleA CSS rule specified directly using CSS declarations
Wt::Chart::WDataSeriesA single data series in a cartesian chart
Wt::WDateA gregorian calendar date
Wt::WDatePickerA date picker
Wt::WDateTimeA calendar date and clock time
Wt::WDateValidatorA validator for date input
Wt::WDefaultLayoutA default layout manager
Wt::WDefaultLoadingIndicatorA default loading indicator
Wt::WDialogA WDialog shows a dialog
Wt::WDoubleValidatorA validator for validating floating point user input
Wt::WDropEventA class providing details for a drop event
Wt::WEnvironmentA class that captures information on the application environment
Wt::WFileResourceA resource which streams data from a local file
Wt::WFileUploadA widget that allows a file to be uploaded
Wt::WFitLayoutA layout manager which spans a single widget to all available space
Wt::WFlashObjectA widget that renders a Flash object (also known as Flash movie)
Wt::WFontA style class describing a font
Wt::WFormWidgetAn abstract widget that corresponds to an HTML form element
Wt::WGenericMatrix< T, Rows, Cols >A generalized matrix class
Wt::WGestureEventA class providing details for a gesture event
Wt::WGLWidgetWebGL support class
Wt::WGoogleMapA widget that displays a google map
Wt::WGridLayoutA layout manager which arranges widgets in a grid
Wt::WGroupBoxA widget which group widgets into a frame with a title
Wt::WHBoxLayoutA layout manager which arranges widgets horizontally
Wt::WHTML5AudioA widget that plays audio using the HTML5 audio element
Wt::WHTML5MediaAbstract baseclass for HTML5 media elements
Wt::WHTML5VideoA widget that renders video using the HTML5 video element
Wt::WIconPairA widget that shows one of two icons depending on its state
Wt::Ext::WidgetAn abstract base class for all Ext widgets
Wt::WImageA widget that displays an image
Wt::WInPlaceEditA widget that provides in-place-editable text
Wt::WInteractWidgetAn abstract widget that can receive user-interface interaction
Wt::WIntValidatorA validator that validates integer user input
Wt::WItemDelegateStandard delegate class for rendering a view item
Wt::WItemSelectionModelA class that represents a selection for a WAbstractItemView
Wt::WKeyEventA class providing details for a keyboard event
Wt::WLabelA label for a form field
Wt::WLayoutAn abstract base class for layout managers
Wt::WLayoutItemAn abstract base class for items that can participate in a layout
Wt::WLayoutItemImplAn abstract base class for implementing layout managers
Wt::WLengthA class that specifies a CSS length
Wt::WLengthValidatorA validator that checks the string length of user input
Wt::WLineEditA widget that provides a single line edit
Wt::WLineFUtility class that defines a single line
Wt::WLoadingIndicatorAn abstract interface for a loading indicator
Wt::WLocalizedStringsAn abstract class that provides support for localized strings
Wt::WLogEntryA stream-like object for creating an entry in a log file
Wt::WLoggerA simple logging class
Wt::WMatrix4x4A 3D affine transformation matrix
Wt::WMemoryResourceA resource which streams data from memory
Wt::WMenuA widget that shows a menu of options
Wt::WMenuItemA single item in a menu
Wt::WMessageBoxA standard dialog for confirmation or to get simple user input
Wt::WMessageResourceBundleSupport for localized strings using XML files
Wt::WModelIndexAn index to an item in a item data model
Wt::WMouseEventA class providing details for a mouse event
Wt::WObjectA base class for objects that participate in the signal/slot system
Wt::WOverlayLoadingIndicatorA more obvious loading indicator that grays the window
Wt::WPaintDeviceThe abstract base class for a paint device
Wt::WPaintedWidgetA widget that is painted using vector graphics
Wt::WPainterVector graphics painting class
Wt::WPainterPathA path defining a shape
Wt::WPanelA WPanel provides a container with a title bar
Wt::WPdfImageA paint device for rendering to a PDF
Wt::WPenClass that defines the style for pen strokes
Wt::Chart::WPieChartA pie chart
Wt::WPointUtility class that defines a 2D point with integer coordinates
Wt::WPointFUtility class that defines a 2D point
Wt::WPolygonAreaAn interactive area in a widget, specified by a polygon
Wt::WPopupMenuA menu presented in a popup window
Wt::WPopupMenuItemAn item in a popup menu
Wt::WProgressBarA progress bar
Wt::WPushButtonA widget that represents a push button
Wt::WRadioButtonA user control that represents a radio button
Wt::WRasterImageA paint device for rendering to a raster image
Wt::WRectAreaA interactive area in a widget, specified by a rectangle
Wt::WRectFUtility class that defines a rectangle
Wt::WRegExpValidatorA validator that checks user input against a regular expression
Wt::WResourceAn object which can be rendered in the HTTP protocol
Wt::WScrollAreaA widget that adds scrolling capabilities to its content
Wt::WScrollBarA scrollbar attached to a scroll area
Wt::WScrollEventA class providing details for a scroll event
Wt::WSelectionBoxA selection box allows selection from a list of options
Wt::WServerA class encapsulating an application server
Wt::WShadowClass that defines a shadow style
Wt::WSignalMapper< T, A1 >A utility class to connect multiple senders to a single slot
Wt::WSliderA horizontal or vertical slider control
Wt::WSocketNotifierA utility class for asynchronous notification of socket activity
Wt::WSortFilterProxyModelA proxy model for Wt's item models that provides filtering and/or sorting
Wt::WSoundUtility class to play a sound
Wt::WSpinBoxA spin box
Wt::WStackedWidgetA container widget that stacks its widgets on top of each other
Wt::WStandardItemAn item in a WStandardItemModel
Wt::WStandardItemModelA standard data model, which stores its data in memory
Wt::Chart::WStandardPaletteStandard styling for rendering series in charts
Wt::WStaticModelView< Renderer >A widget that implements a view for a non-changing model
Wt::WStringA unicode string class, with support for localization
Wt::WStringListModelAn model that manages a list of strings
Wt::WSubMenuItemA menu item that contains a nested sub menu
Wt::WSuggestionPopupA widget which popups to assist in editing a textarea or lineedit
Wt::WSvgImageA paint device for rendering using Scalable Vector Graphics (SVG)
Wt::WTableA container widget which provides layout of children in a table grid
Wt::WTableCellA container widget that represents a cell in a table
Wt::WTableColumnA table column
Wt::WTableRowA table row
Wt::WTableViewAn MVC View widget for tabular data
Wt::WTabWidgetA widget that organizes contents in tab panes
Wt::WTemplateA widget that renders an XHTML template
Wt::Test::WTestEnvironmentAn environment for testing purposes
Wt::WTextA widget that renders (XHTML) text
Wt::WTextAreaA widget that provides a multi-line edit
Wt::WTextEditA rich-text XHTML editor
Wt::WTimeA clock time
Wt::WTimerA utility class which provides timer signals and single-shot timers
Wt::WTouchEventA class providing details for a touch event
Wt::WTransformA 2D affine transformation matrix
Wt::WTreeA widget that represents a navigatable tree
Wt::WTreeNodeA single node in a tree
Wt::WTreeTableA table with a navigatable tree in the first column
Wt::WTreeTableNodeA specialized tree node which allows additional data to be associated with each node
Wt::WTreeViewA view class that displays a model as a tree or tree table
Wt::WValidationStatusA widget that keeps track of the validation status of a form widget
Wt::WValidatorA validator is used to validate user input according to pre-defined rules
Wt::WVBoxLayoutA layout manager which arranges widgets vertically
Wt::WVectorImageAn abstract paint device for rendering using native vector graphics
Wt::WViewWidgetAn abstract base class for an MVC view that is rendered using a widget
Wt::WVirtualImageAn abstract widget that shows a viewport to a virtually large image
Wt::WVmlImageA paint device for rendering using the VML pseudo-standard
Wt::WWebWidgetA base class for widgets with an HTML counterpart
Wt::WWidgetThe abstract base class for a user-interface component
Wt::WWidgetItemA layout item that holds a single widget
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/bc_s.png b/wt-3.1.7a/doc/reference/html/bc_s.png new file mode 100644 index 0000000..e401862 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/bc_s.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator-members.html new file mode 100644 index 0000000..8211688 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::SeriesIterator Member List

+
+
+This is the complete list of members for Wt::Chart::SeriesIterator, including all inherited members. + + + + + + + + +
currentXSegment() const Wt::Chart::SeriesIterator
currentYSegment() const Wt::Chart::SeriesIterator
endSegment()Wt::Chart::SeriesIterator [virtual]
endSeries()Wt::Chart::SeriesIterator [virtual]
newValue(const WDataSeries &series, double x, double y, double stackY, const WModelIndex &xIndex, const WModelIndex &yIndex)Wt::Chart::SeriesIterator [virtual]
startSegment(int currentXSegment, int currentYSegment, const WRectF &currentSegmentArea)Wt::Chart::SeriesIterator [virtual]
startSeries(const WDataSeries &series, double groupWidth, int numBarGroups, int currentBarGroup)Wt::Chart::SeriesIterator [virtual]
~SeriesIterator()Wt::Chart::SeriesIterator [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator.html new file mode 100644 index 0000000..4ff2ea0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1SeriesIterator.html @@ -0,0 +1,280 @@ + + + + +Wt: Wt::Chart::SeriesIterator Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::SeriesIterator Class Reference
+ +[Charts] +

+
+
+ +

Abstract base class for iterating over series data in WChart2DRenderer. +More...

+ +

#include <Wt/Chart/WChart2DRenderer>

+ +

Inherited by Wt::Chart::ExtremesIterator, Wt::Chart::LabelRenderIterator, Wt::Chart::MarkerRenderIterator, and Wt::Chart::SeriesRenderIterator.

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~SeriesIterator ()
 Destructor.
virtual void startSegment (int currentXSegment, int currentYSegment, const WRectF &currentSegmentArea)
 Start handling a new segment.
virtual void endSegment ()
 End handling a particular segment.
virtual bool startSeries (const WDataSeries &series, double groupWidth, int numBarGroups, int currentBarGroup)
 Start iterating a particular series.
+virtual void endSeries ()
 End iterating a particular series.
virtual void newValue (const WDataSeries &series, double x, double y, double stackY, const WModelIndex &xIndex, const WModelIndex &yIndex)
 Process a value.
+int currentXSegment () const
 Returns the current X segment.
+int currentYSegment () const
 Returns the current Y segment.
+

Detailed Description

+

Abstract base class for iterating over series data in WChart2DRenderer.

+

This class is specialized for rendering series data.

+
See also:
WChart2DRenderer::iterateSeries()
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::Chart::SeriesIterator::endSegment ( ) [virtual]
+
+
+ +

End handling a particular segment.

+
See also:
startSegment()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::SeriesIterator::newValue (const WDataSeries series,
double  x,
double  y,
double  stackY,
const WModelIndex xIndex,
const WModelIndex yIndex 
) [virtual]
+
+
+ +

Process a value.

+

Processes a value with model coordinates (x, y). The y value may differ from the model's y value, because of stacked series. The y value here corresponds to the location on the chart, after stacking.

+

The stackY argument is the y value from the previous series (also after stacking). It will be 0, unless this series is stacked.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::SeriesIterator::startSegment (int  currentXSegment,
int  currentYSegment,
const WRectF currentSegmentArea 
) [virtual]
+
+
+ +

Start handling a new segment.

+

Because of a 'break' specified in an axis, axes may be divided in one or two segments (in fact only the API limits this now to two). The iterator will iterate all segments seperately, but each time with a different clipping region specified in the painter, corresponding to that segment.

+

The currentSegmentArea specifies the clipping area.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::Chart::SeriesIterator::startSeries (const WDataSeries series,
double  groupWidth,
int  numBarGroups,
int  currentBarGroup 
) [virtual]
+
+
+ +

Start iterating a particular series.

+

Returns whether the series values should be iterated. The groupWidth is the width (in pixels) of a single bar group. The chart contains numBarGroups, and the current series is in the currentBarGroup'th group.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart-members.html new file mode 100644 index 0000000..381e42c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WAbstractChart Member List

+
+
+This is the complete list of members for Wt::Chart::WAbstractChart, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
addArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
area(int index) const Wt::WPaintedWidget
areas() const Wt::WPaintedWidget
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
background() const Wt::Chart::WAbstractChart
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WPaintedWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
HtmlCanvas enum valueWt::WPaintedWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
InlineSvgVml enum valueWt::WPaintedWidget
insertArea(int index, WAbstractArea *area)Wt::WPaintedWidget
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WPaintedWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method enum nameWt::WPaintedWidget
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::Chart::WAbstractChart
modelChanged()Wt::Chart::WAbstractChart [private, virtual]
modelColumnsInserted(const WModelIndex &parent, int start, int end)=0Wt::Chart::WAbstractChart [private, pure virtual]
modelColumnsRemoved(const WModelIndex &parent, int start, int end)=0Wt::Chart::WAbstractChart [private, pure virtual]
modelDataChanged(const WModelIndex &topLeft, const WModelIndex &bottomRight)=0Wt::Chart::WAbstractChart [private, pure virtual]
modelReset()Wt::Chart::WAbstractChart [private, virtual]
modelRowsInserted(const WModelIndex &parent, int start, int end)=0Wt::Chart::WAbstractChart [private, pure virtual]
modelRowsRemoved(const WModelIndex &parent, int start, int end)=0Wt::Chart::WAbstractChart [private, pure virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
paint(WPainter &painter, const WRectF &rectangle=WRectF()) const =0Wt::Chart::WAbstractChart [pure virtual]
paintEvent(WPaintDevice *paintDevice)=0Wt::WPaintedWidget [protected, pure virtual]
palette() const Wt::Chart::WAbstractChart
parent() const Wt::WWidget
plotAreaPadding(Side side) const Wt::Chart::WAbstractChart
PngImage enum valueWt::WPaintedWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
preferredMethod() const Wt::WPaintedWidget
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WPaintedWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setBackground(const WBrush &background)Wt::Chart::WAbstractChart
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::Chart::WAbstractChart
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPalette(WChartPalette *palette)Wt::Chart::WAbstractChart
setPlotAreaPadding(int padding, WFlags< Side > sides=All)Wt::Chart::WAbstractChart
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreferredMethod(Method method)Wt::WPaintedWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Chart::WAbstractChart
setTitleFont(const WFont &titleFont)Wt::Chart::WAbstractChart
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::Chart::WAbstractChart
titleFont() const Wt::Chart::WAbstractChart
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
update(WFlags< PaintFlag > flags=0)Wt::WPaintedWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WPaintedWidget(WContainerWidget *parent=0)Wt::WPaintedWidget
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WAbstractChart()Wt::Chart::WAbstractChart [virtual]
~WObject()Wt::WObject [virtual]
~WPaintedWidget()Wt::WPaintedWidget
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart.html new file mode 100644 index 0000000..cb059e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart.html @@ -0,0 +1,675 @@ + + + + +Wt: Wt::Chart::WAbstractChart Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WAbstractChart Class Reference
+ +[ChartsModel/view system] +

+
+
+ +

Abstract base class for MVC-based charts. +More...

+ +

#include <Wt/Chart/WAbstractChart>

+
+Inheritance diagram for Wt::Chart::WAbstractChart:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~WAbstractChart ()
 Destructor.
void setModel (WAbstractItemModel *model)
 Set the model.
WAbstractItemModelmodel () const
 Returns the model.
void setBackground (const WBrush &background)
 Sets a background for the chart.
const WBrushbackground () const
 Returns the background of the chart.
void setPalette (WChartPalette *palette)
 Set a palette for the chart.
WChartPalettepalette () const
 Returns the palette for the chart.
void setPlotAreaPadding (int padding, WFlags< Side > sides=All)
 Set an internal margin for the main plot area.
int plotAreaPadding (Side side) const
 Returns the internal margin for the main plot area.
void setTitle (const WString &title)
 Set a chart title.
const WStringtitle () const
 Return the chart title.
void setTitleFont (const WFont &titleFont)
 Set the font for the chart title.
const WFonttitleFont () const
 Returns the font for the chart title.
virtual void paint (WPainter &painter, const WRectF &rectangle=WRectF()) const =0
 Paint the chart in a rectangle of the given painter.

+Private Member Functions

virtual void modelChanged ()
 Method called whenever the entire model was changed.
virtual void modelReset ()
 Method called whenever the entire model was reset.
virtual void modelColumnsInserted (const WModelIndex &parent, int start, int end)=0
 Method called when colums have been inserted in the model.
virtual void modelColumnsRemoved (const WModelIndex &parent, int start, int end)=0
 Method called when colums have been removed from the model.
virtual void modelRowsInserted (const WModelIndex &parent, int start, int end)=0
 Method called when rows have been inserted from the model.
virtual void modelRowsRemoved (const WModelIndex &parent, int start, int end)=0
 Method called when rows have been removed from the model.
virtual void modelDataChanged (const WModelIndex &topLeft, const WModelIndex &bottomRight)=0
 Method called when data has been changed in the model.
+

Detailed Description

+

Abstract base class for MVC-based charts.

+

This is an abstract class and should not be used directly.

+

As an abstract base for MVC-based charts, this class manages the model setModel() and provides virtual methods that listen to model changes. In addition, it gives access to generic chart properties such as the title setTitle() and title font setTitleFont(), the chart palette setPalette(), plot area padding setPlotAreaPadding(), and the background fill color setBackground().

+

CSS

+

Styling through CSS is not applicable.

+
See also:
WCartesianChart, WPieChart
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WBrush& Wt::Chart::WAbstractChart::background ( ) const
+
+
+ +

Returns the background of the chart.

+
See also:
setBackground(const WBrush&)
+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::Chart::WAbstractChart::model ( ) const
+
+
+ +

Returns the model.

+
See also:
setModel(WAbstractItemModel *)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WAbstractChart::modelChanged ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was changed.

+
See also:
setModel(WAbstractItemModel *)
+ +

Reimplemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::modelColumnsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, pure virtual]
+
+
+ +

Method called when colums have been inserted in the model.

+
See also:
WAbstractItemModel::columnsInserted
+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::modelColumnsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, pure virtual]
+
+
+ +

Method called when colums have been removed from the model.

+
See also:
WAbstractItemModel::columnsRemoved
+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::modelDataChanged (const WModelIndex topLeft,
const WModelIndex bottomRight 
) [private, pure virtual]
+
+
+ +

Method called when data has been changed in the model.

+
See also:
WAbstractItemModel::dataChanged
+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WAbstractChart::modelReset ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was reset.

+

Bound to the WAbstractItemModel::modelReset() and WAbstractItemModel::layoutChanged() signals.

+ +

Reimplemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::modelRowsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, pure virtual]
+
+
+ +

Method called when rows have been inserted from the model.

+
See also:
WAbstractItemModel::rowsInserted
+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::modelRowsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, pure virtual]
+
+
+ +

Method called when rows have been removed from the model.

+
See also:
WAbstractItemModel::rowsRemoved
+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::Chart::WAbstractChart::paint (WPainter painter,
const WRectF rectangle = WRectF() 
) const [pure virtual]
+
+
+ +

Paint the chart in a rectangle of the given painter.

+

Paints the chart inside the painter, in the area indicated by rectangle. When rectangle is a null rectangle, the entire painter window is used.

+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + +
WChartPalette* Wt::Chart::WAbstractChart::palette ( ) const
+
+
+ +

Returns the palette for the chart.

+
See also:
setPalette(WChartPalette *palette)
+ +
+
+ +
+
+ + + + + + + + +
int Wt::Chart::WAbstractChart::plotAreaPadding (Side  side ) const
+
+
+ +

Returns the internal margin for the main plot area.

+
See also:
setPlotAreaPadding(int, WFlags<Side>)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAbstractChart::setBackground (const WBrush background )
+
+
+ +

Sets a background for the chart.

+

Set the background color for the main plot area.

+

The default is a completely transparent background.

+
See also:
background()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAbstractChart::setModel (WAbstractItemModel model )
+
+
+ +

Set the model.

+

The model is used by the chart to get its data. Ownership of the model is not transferred, and if a previous model was set it is not deleted.

+

The default model is a 0 model.

+
See also:
model()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAbstractChart::setPalette (WChartPalette palette )
+
+
+ +

Set a palette for the chart.

+

A palette is used to provide the style information to render the chart series. Ownership of the palette is transferred to the chart.

+

The default palette is dependent on the chart type.

+
See also:
palette()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WAbstractChart::setPlotAreaPadding (int  padding,
WFlags< Side sides = All 
)
+
+
+ +

Set an internal margin for the main plot area.

+

This configures the area (in pixels) around the plot area that is available for axes, labels, and titles. You need to set this appropriately so that labels fit inside these margins.

+

The default is dependent on the chart type.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAbstractChart::setTitle (const WString title )
+
+
+ +

Set a chart title.

+

The title is displayed on top of the chart, using the titleFont().

+

The default title is an empty title ("").

+
See also:
title()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAbstractChart::setTitleFont (const WFont titleFont )
+
+
+ +

Set the font for the chart title.

+

Changes the font for the chart title.

+

The default title font is a 15 point Sans Serif font.

+
See also:
titleFont(), setTitle(const WString&)
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Chart::WAbstractChart::title ( ) const
+
+
+ +

Return the chart title.

+
See also:
title()
+ +
+
+ +
+
+ + + + + + + +
const WFont& Wt::Chart::WAbstractChart::titleFont ( ) const
+
+
+ +

Returns the font for the chart title.

+
See also:
setTitleFont(const WFont&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.map new file mode 100644 index 0000000..0595a68 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.md5 new file mode 100644 index 0000000..d30386d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.md5 @@ -0,0 +1 @@ +8ade986907af41802d76c65171892d74 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.png new file mode 100644 index 0000000..f9ee555 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAbstractChart__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis-members.html new file mode 100644 index 0000000..97721f0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis-members.html @@ -0,0 +1,116 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WAxis Member List

+
+
+This is the complete list of members for Wt::Chart::WAxis, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AUTO_MAXIMUMWt::Chart::WAxis [static]
AUTO_MINIMUMWt::Chart::WAxis [static]
autoLimits() const Wt::Chart::WAxis
chart() const Wt::Chart::WAxis
gridLinesPen() const Wt::Chart::WAxis
id() const Wt::Chart::WAxis
isGridLinesEnabled() const Wt::Chart::WAxis
isVisible() const Wt::Chart::WAxis
labelAngle() const Wt::Chart::WAxis
labelFont() const Wt::Chart::WAxis
labelFormat() const Wt::Chart::WAxis
labelInterval() const Wt::Chart::WAxis
location() const Wt::Chart::WAxis
margin() const Wt::Chart::WAxis
maximum() const Wt::Chart::WAxis
minimum() const Wt::Chart::WAxis
pen() const Wt::Chart::WAxis
scale() const Wt::Chart::WAxis
setAutoLimits(WFlags< AxisValue > locations)Wt::Chart::WAxis
setBreak(double minimum, double maximum)Wt::Chart::WAxis
setGridLinesEnabled(bool enabled)Wt::Chart::WAxis
setGridLinesPen(const WPen &pen)Wt::Chart::WAxis
setLabelAngle(double angle)Wt::Chart::WAxis
setLabelFont(const WFont &labelFont)Wt::Chart::WAxis
setLabelFormat(const WString &format)Wt::Chart::WAxis
setLabelInterval(double labelInterval)Wt::Chart::WAxis
setLocation(AxisValue value)Wt::Chart::WAxis
setMargin(int pixels)Wt::Chart::WAxis
setMaximum(double maximum)Wt::Chart::WAxis
setMinimum(double minimum)Wt::Chart::WAxis
setPen(const WPen &pen)Wt::Chart::WAxis
setRange(double minimum, double maximum)Wt::Chart::WAxis
setScale(AxisScale scale)Wt::Chart::WAxis
setTitle(const WString &title)Wt::Chart::WAxis
setTitleFont(const WFont &titleFont)Wt::Chart::WAxis
setVisible(bool visible)Wt::Chart::WAxis
title() const Wt::Chart::WAxis
titleFont() const Wt::Chart::WAxis
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis.html new file mode 100644 index 0000000..061f92c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WAxis.html @@ -0,0 +1,973 @@ + + + + +Wt: Wt::Chart::WAxis Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WAxis Class Reference
+ +[Charts] +

+
+
+ +

Class which represents an axis of a cartesian chart. +More...

+ +

#include <Wt/Chart/WAxis>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Axis id () const
 Returns the axis id.
void setVisible (bool visible)
 Sets whether this axis is visible.
bool isVisible () const
 Returns whether this axis is visible.
void setLocation (AxisValue value)
 Sets the axis location.
AxisValue location () const
 Returns the axis location.
void setScale (AxisScale scale)
 Sets the scale of the axis.
AxisScale scale () const
 Returns the scale of the axis.
void setMinimum (double minimum)
 Sets the minimum value displayed on the axis.
double minimum () const
 Returns the minimum value displayed on the axis.
void setMaximum (double maximum)
 Sets the maximum value for the axis displayed on the axis.
double maximum () const
 Returns the maximum value displayed on the axis.
void setRange (double minimum, double maximum)
 Sets the axis range (minimum and maximum values) manually.
void setAutoLimits (WFlags< AxisValue > locations)
 Let the minimum and/or maximum be calculated from the data.
WFlags< AxisValueautoLimits () const
 Returns the limits that are calculated automatically.
void setBreak (double minimum, double maximum)
 Specify a range that needs to be omitted from the axis.
void setLabelInterval (double labelInterval)
 Sets the label interval.
double labelInterval () const
 Returns the label interval.
void setLabelFormat (const WString &format)
 Sets the label format.
const WStringlabelFormat () const
 Returns the label format string.
void setLabelAngle (double angle)
 Sets the label angle.
double labelAngle () const
 Returns the label angle.
void setGridLinesEnabled (bool enabled)
 Sets whether gridlines are displayed for this axis.
bool isGridLinesEnabled () const
 Returns whether gridlines are displayed for this axis.
void setPen (const WPen &pen)
 Changes the pen used for rendering the axis and ticks.
const WPenpen () const
 Returns the pen used for rendering the axis and ticks.
void setGridLinesPen (const WPen &pen)
 Changes the pen used for rendering the grid lines.
const WPengridLinesPen () const
 Returns the pen used for rendering the grid lines.
void setMargin (int pixels)
 Sets the margin between the axis and the plot area.
int margin () const
 Returns the margin between the axis and the plot area.
void setTitle (const WString &title)
 Sets the axis title.
const WStringtitle () const
 Returns the axis title.
void setTitleFont (const WFont &titleFont)
 Sets the axis title font.
const WFonttitleFont () const
 Returns the axis title font.
void setLabelFont (const WFont &labelFont)
 Sets the axis label font.
const WFontlabelFont () const
 Returns the axis label font.
WCartesianChartchart () const
 Returns the chart to which this axis belongs.

+Static Public Attributes

static const double AUTO_MINIMUM = DBL_MAX
 Constant which indicates automatic minimum calculation.
static const double AUTO_MAXIMUM = -DBL_MAX
 Constant which indicates automatic maximum calculation.
+

Detailed Description

+

Class which represents an axis of a cartesian chart.

+

A cartesian chart has two or three axes: an X axis (XAxis), a Y axis (YAxis) and optionally a second Y axis (Y2Axis). Each of the up to three axes in a cartesian chart has a unique id() that identifies which of these three axes it is in the enclosing chart().

+

Use setVisible(bool) to change the visibility of an axis, setGridLinesEnabled(bool) to show grid lines for an axis. The pen styles for rendering the axis or grid lines may be changed using setPen() and setGridLinesPen(). A margin between the axis and the main plot area may be configured using setMargin().

+

By default, the axis will automatically adjust its range so that all data will be visible. You may manually specify a range using setMinimum(), setMaximum or setRange(). The interval between labels is by default automatically adjusted depending on the axis length and the range, but may be manually specified using setLabelInterval().

+

The axis has support for being "broken", to support displaying data with a few outliers which would otherwise swamp the chart. This is not done automatically, but instead you need to use setBreak() to specify the value range that needs to be omitted from the axis. The omission is rendered in the axis and in bars that cross the break.

+

The labels are shown using a "%.4g" format string for numbers, and "dd/MM/yyyy" (for DateScale). The format may be customized using setLabelFormat(). The angle of the label text may be changed using setLabelAngle(double). By default, all labels are printed horizontally.

+
See also:
WCartesianChart
+

Member Function Documentation

+ +
+
+ + + + + + + +
WFlags< AxisValue > Wt::Chart::WAxis::autoLimits ( ) const
+
+
+ +

Returns the limits that are calculated automatically.

+

This returns the limits (Chart::MinimumValue and/or Chart::MaximumValue) that are calculated automatically from the data, rather than being specified manually using setMinimum() and/or setMaximum().

+
See also:
setAutoLimits()
+ +
+
+ +
+
+ + + + + + + +
WCartesianChart* Wt::Chart::WAxis::chart ( ) const
+
+
+ +

Returns the chart to which this axis belongs.

+
See also:
WCartesianChart::axis()
+ +
+
+ +
+
+ + + + + + + +
const WPen& Wt::Chart::WAxis::gridLinesPen ( ) const
+
+
+ +

Returns the pen used for rendering the grid lines.

+
See also:
setGridLinesPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + +
Axis Wt::Chart::WAxis::id ( ) const
+
+
+ +

Returns the axis id.

+
See also:
chart(), WCartesianChart::axis(Axis)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WAxis::isGridLinesEnabled ( ) const
+
+
+ +

Returns whether gridlines are displayed for this axis.

+
See also:
setGridLinesEnabled(bool)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WAxis::isVisible ( ) const
+
+
+ +

Returns whether this axis is visible.

+
See also:
setVisible(bool)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WAxis::labelAngle ( ) const
+
+
+ +

Returns the label angle.

+
See also:
setLabelAngle(double)
+ +
+
+ +
+
+ + + + + + + +
const WFont& Wt::Chart::WAxis::labelFont ( ) const
+
+
+ +

Returns the axis label font.

+
See also:
setLabelFont()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Chart::WAxis::labelFormat ( ) const
+
+
+ +

Returns the label format string.

+
See also:
setLabelFormat(const WString&)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WAxis::labelInterval ( ) const
+
+
+ +

Returns the label interval.

+
See also:
setLabelInterval(double)
+ +
+
+ +
+
+ + + + + + + +
AxisValue Wt::Chart::WAxis::location ( ) const
+
+
+ +

Returns the axis location.

+
See also:
setLocation(AxisValue)
+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WAxis::margin ( ) const
+
+
+ +

Returns the margin between the axis and the plot area.

+
See also:
setMargin(int)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WAxis::maximum ( ) const
+
+
+ +

Returns the maximum value displayed on the axis.

+

This returned the maximum value that was set using setMaximum(), or otherwise the automatically calculated maximum.

+
See also:
minimum(), setMaximum(double)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WAxis::minimum ( ) const
+
+
+ +

Returns the minimum value displayed on the axis.

+

This returned the minimum value that was set using setMinimum(), or otherwise the automatically calculated minimum.

+
See also:
maximum(), setMinimum(double), setAutoLimits()
+ +
+
+ +
+
+ + + + + + + +
const WPen& Wt::Chart::WAxis::pen ( ) const
+
+
+ +

Returns the pen used for rendering the axis and ticks.

+
See also:
setPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + +
AxisScale Wt::Chart::WAxis::scale ( ) const
+
+
+ +

Returns the scale of the axis.

+
See also:
setScale(AxisScale)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setAutoLimits (WFlags< AxisValue locations )
+
+
+ +

Let the minimum and/or maximum be calculated from the data.

+

Using this method, you can indicate that you want to have automatic limits, rather than limits set manually using setMinimum() or setMaximum().

+

locations can be Chart::MinimumValue and/or Chart::MaximumValue.

+

The default value is Chart::MinimumValue | Chart::MaximumValue.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WAxis::setBreak (double  minimum,
double  maximum 
)
+
+
+ +

Specify a range that needs to be omitted from the axis.

+

This is useful to display data with a few outliers which would otherwise swamp the chart. This is not done automatically, but instead you need to use setBreak() to specify the value range that needs to be omitted from the axis. The omission is rendered in the axis and in BarSeries that cross the break.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setGridLinesEnabled (bool  enabled )
+
+
+ +

Sets whether gridlines are displayed for this axis.

+

When enabled, gird lines are drawn for each tick on this axis, using the gridLinesPen().

+

Unlike all other visual aspects of an axis, rendering of the gridlines is not controlled by setDisplayEnabled(bool).

+
See also:
setGridLinesPen(const WPen&), isGridLinesEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setGridLinesPen (const WPen pen )
+
+
+ +

Changes the pen used for rendering the grid lines.

+

The default value is a gray pen of 0 width.

+
See also:
setPen(const WPen&), gridLinesPen().
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setLabelAngle (double  angle )
+
+
+ +

Sets the label angle.

+

Sets the angle used for displaying the labels (in degrees). A 0 angle corresponds to horizontal text. Note that this option is only supported by the InlineSvgVml renderers, but not by HtmlCanvas.

+

The default value is 0.0 ("horizontal text").

+
See also:
labelAngle()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setLabelFont (const WFont labelFont )
+
+
+ +

Sets the axis label font.

+

The default label font is a 10 point Sans Serif font.

+
See also:
labelFont()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setLabelFormat (const WString format )
+
+
+ +

Sets the label format.

+

Sets a format string which is used to format values, both for the axis labels as well as data series values (see WDataSeries::setLabelsEnabled(Axis, bool)).

+

For an axis with a LinearScale or LogScale scale, the format string must be a format string that is accepted by snprintf() and which formats one double. If the format string is an empty string, "%.4g" is used.

+

For an axis with a DateScale scale, the format string must be a format string accepted by WDate::toString(const WString&), to format a date. If the format string is an empty string, "dd/MM/yyyy", "MMM yy" or "yyyy" is used depending on the situation.

+

The default value is an empty string ("").

+
See also:
labelFormat()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setLabelInterval (double  labelInterval )
+
+
+ +

Sets the label interval.

+

Specifies the interval for displaying labels (and ticks) on the axis. The default value is 0.0, and indicates that the interval should be computed automatically.

+
See also:
setLabelFormat(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setLocation (AxisValue  value )
+
+
+ +

Sets the axis location.

+

Configures the location of the axis, relative to values on the other values (i.e. Y values for the X axis, and X values for the Y axis).

+

The default value is Chart::MinimumValue.

+
See also:
location()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setMargin (int  pixels )
+
+
+ +

Sets the margin between the axis and the plot area.

+

The margin is defined in pixels.

+

The default value is 0.

+
See also:
margin()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setMaximum (double  maximum )
+
+
+ +

Sets the maximum value for the axis displayed on the axis.

+

Specify the maximum value to be displayed on the axis. By default, the minimum and maximum values are determined automatically so that all the data can be displayed.

+
See also:
minimum(), setMinimum(double)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setMinimum (double  minimum )
+
+
+ +

Sets the minimum value displayed on the axis.

+

Specify the minimum value to be displayed on the axis. By default, the minimum and maximum values are determined automatically so that all the data can be displayed.

+
See also:
minimum(), setMaximum(double)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setPen (const WPen pen )
+
+
+ +

Changes the pen used for rendering the axis and ticks.

+

The default value is a black pen of 0 width.

+
See also:
setGridLinesPen(const WPen&).
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WAxis::setRange (double  minimum,
double  maximum 
)
+
+
+ +

Sets the axis range (minimum and maximum values) manually.

+

Specifies both minimum and maximum value for the axis. This automatically disables automatic range calculation.

+
See also:
setMinimum(double), setMaximum(double)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setScale (AxisScale  scale )
+
+
+ +

Sets the scale of the axis.

+

For the X scale in a CategoryChart, the scale should be left unchanged to CategoryScale.

+

For all other axes, the default value is LinearScale, but this may be changed to LogScale or DateScale. DateScale is only useful for the X axis in a ScatterPlot which contains WDate values.

+
See also:
scale()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setTitle (const WString title )
+
+
+ +

Sets the axis title.

+

The default title is empty.

+
See also:
title()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setTitleFont (const WFont titleFont )
+
+
+ +

Sets the axis title font.

+

The default title font is a 12 point Sans Serif font.

+
See also:
titleFont()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WAxis::setVisible (bool  visible )
+
+
+ +

Sets whether this axis is visible.

+

Changes whether the axis is displayed, including ticks and labels. The rendering of the grid lines is controlled seperately by setGridLinesEnabled(bool).

+

The default value is true for the X axis and first Y axis, but false for the second Y axis.

+
See also:
setGridLinesEnabled(bool).
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Chart::WAxis::title ( ) const
+
+
+ +

Returns the axis title.

+
See also:
setTitle()
+ +
+
+ +
+
+ + + + + + + +
const WFont& Wt::Chart::WAxis::titleFont ( ) const
+
+
+ +

Returns the axis title font.

+
See also:
setTitleFont()
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
const double Wt::Chart::WAxis::AUTO_MAXIMUM = -DBL_MAX [static]
+
+
+ +

Constant which indicates automatic maximum calculation.

+
See also:
setMaximum()
+ +
+
+ +
+
+ + + + +
const double Wt::Chart::WAxis::AUTO_MINIMUM = DBL_MAX [static]
+
+
+ +

Constant which indicates automatic minimum calculation.

+
See also:
setMinimum()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart-members.html new file mode 100644 index 0000000..32a6939 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart-members.html @@ -0,0 +1,266 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WCartesianChart Member List

+
+
+This is the complete list of members for Wt::Chart::WCartesianChart, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
addArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::addChild(WObject *child)Wt::WObject
addDataPointArea(const WDataSeries &series, const WModelIndex &xIndex, WAbstractArea *area)Wt::Chart::WCartesianChart [virtual]
addSeries(const WDataSeries &series)Wt::Chart::WCartesianChart
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
area(int index) const Wt::WPaintedWidget
areas() const Wt::WPaintedWidget
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
axis(Axis axis)Wt::Chart::WCartesianChart
axis(Axis axis) const Wt::Chart::WCartesianChart
background() const Wt::Chart::WAbstractChart
barMargin() const Wt::Chart::WCartesianChart
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
createLegendItemWidget(int index)Wt::Chart::WCartesianChart
createRenderer(WPainter &painter, const WRectF &rectangle) const Wt::Chart::WCartesianChart [protected, virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
drawMarker(const WDataSeries &series, WPainterPath &result) const Wt::Chart::WCartesianChart [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WPaintedWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
HtmlCanvas enum valueWt::WPaintedWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
initLayout(const WRectF &rectangle=WRectF())Wt::Chart::WCartesianChart
InlineSvgVml enum valueWt::WPaintedWidget
insertArea(int index, WAbstractArea *area)Wt::WPaintedWidget
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isLegendEnabled() const Wt::Chart::WCartesianChart
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WPaintedWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
mapFromDevice(const WPointF &point, Axis ordinateAxis=OrdinateAxis) const Wt::Chart::WCartesianChart
mapToDevice(const boost::any &xValue, const boost::any &yValue, Axis axis=OrdinateAxis, int xSegment=0, int ySegment=0) const Wt::Chart::WCartesianChart
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method enum nameWt::WPaintedWidget
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::Chart::WAbstractChart
modelChanged()Wt::Chart::WCartesianChart [private, virtual]
modelColumnsInserted(const WModelIndex &parent, int start, int end)Wt::Chart::WCartesianChart [private, virtual]
modelColumnsRemoved(const WModelIndex &parent, int start, int end)Wt::Chart::WCartesianChart [private, virtual]
modelDataChanged(const WModelIndex &topLeft, const WModelIndex &bottomRight)Wt::Chart::WCartesianChart [private, virtual]
modelReset()Wt::Chart::WCartesianChart [private, virtual]
modelRowsInserted(const WModelIndex &parent, int start, int end)Wt::Chart::WCartesianChart [private, virtual]
modelRowsRemoved(const WModelIndex &parent, int start, int end)Wt::Chart::WCartesianChart [private, virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
orientation() const Wt::Chart::WCartesianChart
paint(WPainter &painter, const WRectF &rectangle=WRectF()) const Wt::Chart::WCartesianChart [virtual]
paintEvent(WPaintDevice *paintDevice)Wt::Chart::WCartesianChart [protected, virtual]
palette() const Wt::Chart::WAbstractChart
parent() const Wt::WWidget
plotAreaPadding(Side side) const Wt::Chart::WAbstractChart
PngImage enum valueWt::WPaintedWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
preferredMethod() const Wt::WPaintedWidget
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeSeries(int modelColumn)Wt::Chart::WCartesianChart
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
renderLegendIcon(WPainter &painter, const WPointF &pos, const WDataSeries &series) const Wt::Chart::WCartesianChart [virtual]
renderLegendItem(WPainter &painter, const WPointF &pos, const WDataSeries &series) const Wt::Chart::WCartesianChart [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WPaintedWidget [virtual]
sender()Wt::WObject [protected, static]
series(int modelColumn)Wt::Chart::WCartesianChart
series(int modelColumn) const Wt::Chart::WCartesianChart
series() const Wt::Chart::WCartesianChart
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setBackground(const WBrush &background)Wt::Chart::WAbstractChart
setBarMargin(double margin)Wt::Chart::WCartesianChart
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLegendEnabled(bool enabled)Wt::Chart::WCartesianChart
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::Chart::WAbstractChart
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOrientation(Orientation orientation)Wt::Chart::WCartesianChart
setPalette(WChartPalette *palette)Wt::Chart::WAbstractChart
setPlotAreaPadding(int padding, WFlags< Side > sides=All)Wt::Chart::WAbstractChart
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreferredMethod(Method method)Wt::WPaintedWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSeries(const std::vector< WDataSeries > &series)Wt::Chart::WCartesianChart
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Chart::WAbstractChart
setTitleFont(const WFont &titleFont)Wt::Chart::WAbstractChart
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setType(ChartType type)Wt::Chart::WCartesianChart
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setXSeriesColumn(int modelColumn)Wt::Chart::WCartesianChart
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::Chart::WAbstractChart
titleFont() const Wt::Chart::WAbstractChart
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
type() const Wt::Chart::WCartesianChart
update(WFlags< PaintFlag > flags=0)Wt::WPaintedWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WCartesianChart(WContainerWidget *parent=0)Wt::Chart::WCartesianChart
WCartesianChart(ChartType type, WContainerWidget *parent=0)Wt::Chart::WCartesianChart
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WPaintedWidget(WContainerWidget *parent=0)Wt::WPaintedWidget
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
XSeriesColumn() const Wt::Chart::WCartesianChart
~WAbstractChart()Wt::Chart::WAbstractChart [virtual]
~WObject()Wt::WObject [virtual]
~WPaintedWidget()Wt::WPaintedWidget
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart.html new file mode 100644 index 0000000..c356c21 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart.html @@ -0,0 +1,1219 @@ + + + + +Wt: Wt::Chart::WCartesianChart Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WCartesianChart Class Reference
+ +[ChartsModel/view system] +

+
+
+ +

A cartesian chart. +More...

+ +

#include <Wt/Chart/WCartesianChart>

+
+Inheritance diagram for Wt::Chart::WCartesianChart:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WCartesianChart (WContainerWidget *parent=0)
 Creates a new cartesian chart.
 WCartesianChart (ChartType type, WContainerWidget *parent=0)
 Creates a new cartesian chart.
void setType (ChartType type)
 Sets the chart type.
ChartType type () const
 Returns the chart type.
void setOrientation (Orientation orientation)
 Sets the chart orientation.
Orientation orientation () const
 Returns the chart orientation.
void setXSeriesColumn (int modelColumn)
 Sets the the model column for the X series.
int XSeriesColumn () const
 Returns the model column for the X series.
void addSeries (const WDataSeries &series)
 Adds a data series.
void removeSeries (int modelColumn)
 Removes a data series.
void setSeries (const std::vector< WDataSeries > &series)
 Sets all data series.
WDataSeriesseries (int modelColumn)
 Returns a data series corresponding to a data column.
const WDataSeriesseries (int modelColumn) const
 Returns a data series corresponding to a data column.
const std::vector< WDataSeries > & series () const
 Returns a list with the current data series.
WAxisaxis (Axis axis)
 Returns a chart axis.
const WAxisaxis (Axis axis) const
 Accesses a chart axis.
void setBarMargin (double margin)
 Sets the margin between bars of different series.
double barMargin () const
 Returns the margin between bars of different series.
void setLegendEnabled (bool enabled)
 Enables the legend.
bool isLegendEnabled () const
 Returns whether the legend is enabled.
virtual void paint (WPainter &painter, const WRectF &rectangle=WRectF()) const
 Paint the chart in a rectangle of the given painter.
virtual void drawMarker (const WDataSeries &series, WPainterPath &result) const
 Draws the marker for a given data series.
virtual void renderLegendIcon (WPainter &painter, const WPointF &pos, const WDataSeries &series) const
 Renders the legend icon for a given data series.
virtual void renderLegendItem (WPainter &painter, const WPointF &pos, const WDataSeries &series) const
 Renders the legend item for a given data series.
WPointF mapFromDevice (const WPointF &point, Axis ordinateAxis=OrdinateAxis) const
 Maps from device coordinates to model coordinates.
WPointF mapToDevice (const boost::any &xValue, const boost::any &yValue, Axis axis=OrdinateAxis, int xSegment=0, int ySegment=0) const
 Maps model values onto chart coordinates.
void initLayout (const WRectF &rectangle=WRectF())
 Initializes the chart layout.
WWidgetcreateLegendItemWidget (int index)
 Creates a widget which renders the a legend item.
virtual void addDataPointArea (const WDataSeries &series, const WModelIndex &xIndex, WAbstractArea *area)
 Adds a data point area (used for displaying e.g. tooltips).

+Protected Member Functions

void paintEvent (WPaintDevice *paintDevice)
 Paints the widget.
virtual WChart2DRenderercreateRenderer (WPainter &painter, const WRectF &rectangle) const
 Creates a renderer which renders the chart.

+Private Member Functions

virtual void modelColumnsInserted (const WModelIndex &parent, int start, int end)
 Method called when colums have been inserted in the model.
virtual void modelColumnsRemoved (const WModelIndex &parent, int start, int end)
 Method called when colums have been removed from the model.
virtual void modelRowsInserted (const WModelIndex &parent, int start, int end)
 Method called when rows have been inserted from the model.
virtual void modelRowsRemoved (const WModelIndex &parent, int start, int end)
 Method called when rows have been removed from the model.
virtual void modelDataChanged (const WModelIndex &topLeft, const WModelIndex &bottomRight)
 Method called when data has been changed in the model.
virtual void modelChanged ()
 Method called whenever the entire model was changed.
virtual void modelReset ()
 Method called whenever the entire model was reset.
+

Detailed Description

+

A cartesian chart.

+

A cartesian chart is a chart that uses X and Y axes. It can display one or multiple data series, which each may be rendered using bars, lines, areas, or points.

+

To use a cartesian chart, the minimum you need to do is set a model using setModel(), set the model column that holds the X data using setXSeriesColumn(), and add one or more series using addSeries(const WDataSeries&). Each series corresponds to one data column that holds Y data.

+

A cartesian chart is either a CategoryChart or a ScatterPlot.

+

In a CategoryChart, the X series represent different categories, which are listed consecutively in model row order. The X axis scale is set to CategoryScale.

+
+ChartWCartesianChart-1.png +

A category chart with bar series

+

Each series may be rendered differently, and this is configured in the data series (see WDataSeries for more information).

+

In a ScatterPlot, the X series data are interpreted as numbers on a numerical scale. The scale for the X axis defaults to a LinearScale, but this may be changed to a DateScale when the X series contains dates (of type WDate) to create a time series chart, or to a LogScale. A ScatterPlot supports the same types of data series as a CategoryChart, but does not support stacking. In a scatter plot, the X series do not need to be ordered in increasing values.

+
+ChartWCartesianChart-2.png +

A time series scatter plot with line series

+

Missing data in a model series Y values is interpreted as a break. For curve-like series, this breaks the curve (or line). This may also be used to use different X series per Y series in a scatter plot.

+

The cartesian chart has support for dual Y axes. Each data series may be bound to one of the two Y axes. By default, only the first Y axis is displayed. To show the second Y axis you will need to call:

+
 chart->axis(Y2Axis).setVisible(true);
+

By default a chart has a horizontal X axis and a vertical Y axis, which corresponds to a Vertical orientation. The orientation may be changed to Horizontal using setOrientation().

+

The styling of the series data are dictated by a palette which may be set using setPalette(WChartPalette *), but may be overridden by settings in each data series.

+

CSS

+

Styling through CSS is not applicable.

+
See also:
WDataSeries, WAxis
+
+WPieChart
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Chart::WCartesianChart::WCartesianChart (WContainerWidget parent = 0 )
+
+
+ +

Creates a new cartesian chart.

+

Creates a cartesian chart of type CategoryChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::Chart::WCartesianChart::WCartesianChart (ChartType  type,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a new cartesian chart.

+

Creates a cartesian chart of the indicated type.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::addDataPointArea (const WDataSeries series,
const WModelIndex xIndex,
WAbstractArea area 
) [virtual]
+
+
+ +

Adds a data point area (used for displaying e.g. tooltips).

+

You may want to specialize this is if you wish to modify (or delete) the area.

+
Note:
Currently, an area is only created if the ToolTipRole data at the data point is not empty.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::addSeries (const WDataSeries series )
+
+
+ +

Adds a data series.

+

A single chart may display one or more data series. Each data series displays data from a single model column in the chart. Series are plotted in the order that they have been added to the chart.

+
See also:
removeSeries(int), setSeries(const std::vector<WDataSeries>&)
+ +
+
+ +
+
+ + + + + + + + +
WAxis & Wt::Chart::WCartesianChart::axis (Axis  axis )
+
+
+ +

Returns a chart axis.

+

Returns a reference to the specified axis.

+ +
+
+ +
+
+ + + + + + + + +
const WAxis & Wt::Chart::WCartesianChart::axis (Axis  axis ) const
+
+
+ +

Accesses a chart axis.

+

Returns a const reference to the specified axis.

+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WCartesianChart::barMargin ( ) const
+
+
+ +

Returns the margin between bars of different series.

+
See also:
setBarMargin(double)
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::Chart::WCartesianChart::createLegendItemWidget (int  index )
+
+
+ +

Creates a widget which renders the a legend item.

+

The legend item widget will contain a text and a WPaintedWidget which draws the series' symbol.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WChart2DRenderer * Wt::Chart::WCartesianChart::createRenderer (WPainter painter,
const WRectF rectangle 
) const [protected, virtual]
+
+
+ +

Creates a renderer which renders the chart.

+

The rendering of the chart is delegated to a WChart2DRenderer class, which will render the chart within the rectangle of the painter.

+

You may want to reimplement this method if you wish to override one or more aspects of the rendering, by returning an new instance of a specialized WChart2DRenderer class.

+

After rendering, the renderer is deleted.

+
See also:
WChart2DRenderer::render()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::drawMarker (const WDataSeries series,
WPainterPath result 
) const [virtual]
+
+
+ +

Draws the marker for a given data series.

+

Draws the marker for the indicated series in the result. This method is called while painting the chart, and you may want to reimplement this method if you wish to provide a custom marker for a particular data series.

+
See also:
setLegendEnabled(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::initLayout (const WRectF rectangle = WRectF() )
+
+
+ +

Initializes the chart layout.

+

A cartesian chart delegates the rendering and layout of the chart and its axes to a WChart2DRenderer. As a consequence, the mapping between model and device coordinates is also established by this class, which is only created on-demand when painging.

+

If you wish to establish the layout, in order to use the mapFromDevice() and mapToDevice() methods before the chart has been rendered, you should call this method.

+

Unless a specific chart rectangle is specified, the entire widget area is assumed.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WCartesianChart::isLegendEnabled ( ) const
+
+
+ +

Returns whether the legend is enabled.

+
See also:
setLegendEnabled(bool)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WPointF Wt::Chart::WCartesianChart::mapFromDevice (const WPointF point,
Axis  ordinateAxis = OrdinateAxis 
) const
+
+
+ +

Maps from device coordinates to model coordinates.

+

Maps a position in the chart back to model coordinates.

+

This uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call initLayout() first.

+
See also:
mapToDevice()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WPointF Wt::Chart::WCartesianChart::mapToDevice (const boost::any &  xValue,
const boost::any &  yValue,
Axis  axis = OrdinateAxis,
int  xSegment = 0,
int  ySegment = 0 
) const
+
+
+ +

Maps model values onto chart coordinates.

+

This returns the chart device coordinates for a (x,y) pair of model values.

+

This uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call initLayout() first.

+

The xSegment and ySegment arguments are relevant only when the corresponding axis is broken using WAxis::setBreak(). Then, its possible values may be 0 (below the break) or 1 (above the break).

+
See also:
mapFromDevice()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WCartesianChart::modelChanged ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was changed.

+
See also:
setModel(WAbstractItemModel *)
+ +

Reimplemented from Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::modelColumnsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when colums have been inserted in the model.

+
See also:
WAbstractItemModel::columnsInserted
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::modelColumnsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when colums have been removed from the model.

+
See also:
WAbstractItemModel::columnsRemoved
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::modelDataChanged (const WModelIndex topLeft,
const WModelIndex bottomRight 
) [private, virtual]
+
+
+ +

Method called when data has been changed in the model.

+
See also:
WAbstractItemModel::dataChanged
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WCartesianChart::modelReset ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was reset.

+

Bound to the WAbstractItemModel::modelReset() and WAbstractItemModel::layoutChanged() signals.

+ +

Reimplemented from Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::modelRowsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when rows have been inserted from the model.

+
See also:
WAbstractItemModel::rowsInserted
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::modelRowsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when rows have been removed from the model.

+
See also:
WAbstractItemModel::rowsRemoved
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + +
Orientation Wt::Chart::WCartesianChart::orientation ( ) const
+
+
+ +

Returns the chart orientation.

+
See also:
setOrientation(Orientation)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::paint (WPainter painter,
const WRectF rectangle = WRectF() 
) const [virtual]
+
+
+ +

Paint the chart in a rectangle of the given painter.

+

Paints the chart inside the painter, in the area indicated by rectangle. When rectangle is a null rectangle, the entire painter window is used.

+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::paintEvent (WPaintDevice paintDevice ) [protected, virtual]
+
+
+ +

Paints the widget.

+

You should reimplement this method to paint the contents of the widget, using the given paintDevice.

+ +

Implements Wt::WPaintedWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::removeSeries (int  modelColumn )
+
+
+ +

Removes a data series.

+

This removes the first data series which plots the given modelColumn.

+
See also:
addSeries(const WDataSeries&)
+
+setSeries(const std::vector<WDataSeries>&).
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::renderLegendIcon (WPainter painter,
const WPointF pos,
const WDataSeries series 
) const [virtual]
+
+
+ +

Renders the legend icon for a given data series.

+

Renders the legend icon for the indicated series in the painter at position pos.

+

This method is called while rendering a legend item, and you may want to reimplement this method if you wish to provide a custom legend icon for a particular data series.

+
See also:
renderLegendItem()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WCartesianChart::renderLegendItem (WPainter painter,
const WPointF pos,
const WDataSeries series 
) const [virtual]
+
+
+ +

Renders the legend item for a given data series.

+

Renders the legend item for the indicated series in the painter at position pos. The default implementation draws the marker, and the series description to the right. The series description is taken from the model's header data for that series' data column.

+

This method is called while painting the chart, and you may want to reimplement this method if you wish to provide a custom marker for a particular data series.

+
See also:
setLegendEnabled(bool)
+ +
+
+ +
+
+ + + + + + + + +
const WDataSeries & Wt::Chart::WCartesianChart::series (int  modelColumn ) const
+
+
+ +

Returns a data series corresponding to a data column.

+

Returns a const reference to the first data series that plots data from modelColumn.

+ +
+
+ +
+
+ + + + + + + + +
WDataSeries & Wt::Chart::WCartesianChart::series (int  modelColumn )
+
+
+ +

Returns a data series corresponding to a data column.

+

Returns a reference to the first data series that plots data from modelColumn.

+ +
+
+ +
+
+ + + + + + + +
const std::vector<WDataSeries>& Wt::Chart::WCartesianChart::series ( ) const
+
+
+ +

Returns a list with the current data series.

+

Returns the complete list of current data series.

+
See also:
setSeries(const std::vector<WDataSeries>&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setBarMargin (double  margin )
+
+
+ +

Sets the margin between bars of different series.

+

Use this method to change the margin that is set between bars of different series. The margin is specified as a fraction of the width. For example, a value of 0.1 adds a 10% margin between bars of each series. Negative values are also allowed. For example, use a margin of -1 to plot the bars of different series on top of each other.

+

The default value is 0.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setLegendEnabled (bool  enabled )
+
+
+ +

Enables the legend.

+

If enabled is true, then a default legend is added to the right of the chart. You should provide space for the legend using the setChartPadding() method. Only series for which the legend is enabled or included in this legend (see WDataSeries::isLegendEnabled()).

+

To have more control over the legend, you could reimplement the renderLegendItem() method to customize how one item in the legend is rendered, or, alternatively you could reimplement the paint() method in which you use the renderLegendItem() method repeatedly to render a legend at an arbitrary position.

+

The default value is false.

+
See also:
WDataSeries::setLegendEnabled(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setOrientation (Orientation  orientation )
+
+
+ +

Sets the chart orientation.

+

Sets the chart orientation, which corresponds to the orientation of the Y axis: a Vertical orientation corresponds to the conventional way of a horizontal X axis and vertical Y axis. A Horizontal orientation is the other way around.

+

The default orientation is Vertical.

+
See also:
orientation()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setSeries (const std::vector< WDataSeries > &  series )
+
+
+ +

Sets all data series.

+

Replaces the current list of series with the new list.

+
See also:
series(), addSeries(const WDataSeries&), removeSeries(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setType (ChartType  type )
+
+
+ +

Sets the chart type.

+

The chart type determines how (x,y) data are interpreted. In a CategoryChart, the X values are categories, and these are plotted consecutively, evenly spaced, and in row order. In a ScatterPlot, the X values are interpreted numerically (as for Y values).

+

The default chart type is a CategoryChart.

+
See also:
type()
+
+WAxis::setScale(), axis(Axis)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WCartesianChart::setXSeriesColumn (int  modelColumn )
+
+
+ +

Sets the the model column for the X series.

+

Use this method to specify the data for the X series. For a ScatterPlot this is mandatory, while for a CategoryChart, if not specified, an increasing series of integer numbers will be used (1, 2, ...).

+

The default value is -1 (not specified).

+
See also:
XSeriesColumn()
+ +
+
+ +
+
+ + + + + + + +
ChartType Wt::Chart::WCartesianChart::type ( ) const
+
+
+ +

Returns the chart type.

+
See also:
setType(ChartType type)
+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WCartesianChart::XSeriesColumn ( ) const
+
+
+ +

Returns the model column for the X series.

+
See also:
setXSeriesColumn(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.map new file mode 100644 index 0000000..eb75748 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.md5 new file mode 100644 index 0000000..e11a741 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.md5 @@ -0,0 +1 @@ +ce76d190a1a134120bfa86bfdd2759cc \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.png new file mode 100644 index 0000000..cfaaa46 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer-members.html new file mode 100644 index 0000000..37ec92a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer-members.html @@ -0,0 +1,107 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WChart2DRenderer Member List

+
+
+This is the complete list of members for Wt::Chart::WChart2DRenderer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AxisProperty enum nameWt::Chart::WChart2DRenderer
calcChartArea()Wt::Chart::WChart2DRenderer [virtual]
calcNumBarGroups()Wt::Chart::WChart2DRenderer [protected]
chart()Wt::Chart::WChart2DRenderer
chartArea()Wt::Chart::WChart2DRenderer
chartSegmentArea(WAxis yAxis, int xSegment, int ySegment) const Wt::Chart::WChart2DRenderer
Grid enum valueWt::Chart::WChart2DRenderer
height() const Wt::Chart::WChart2DRenderer [protected]
hv(double x, double y) const Wt::Chart::WChart2DRenderer
hv(const WPointF &f) const Wt::Chart::WChart2DRenderer
hv(const WRectF &f) const Wt::Chart::WChart2DRenderer
initLayout()Wt::Chart::WChart2DRenderer
iterateSeries(SeriesIterator *iterator, bool reverseStacked=false)Wt::Chart::WChart2DRenderer [protected]
Line enum valueWt::Chart::WChart2DRenderer
location_Wt::Chart::WChart2DRenderer [protected]
map(double xValue, double yValue, Axis axis=OrdinateAxis, int currentXSegment=0, int currentYSegment=0) const Wt::Chart::WChart2DRenderer [virtual]
painter()Wt::Chart::WChart2DRenderer
prepareAxes()Wt::Chart::WChart2DRenderer [protected, virtual]
render()Wt::Chart::WChart2DRenderer [virtual]
renderAxes(WFlags< AxisProperty > properties)Wt::Chart::WChart2DRenderer [protected, virtual]
renderAxis(const WAxis &axis, WFlags< AxisProperty > properties)Wt::Chart::WChart2DRenderer [protected]
renderBackground()Wt::Chart::WChart2DRenderer [protected, virtual]
renderLabel(const WString &text, const WPointF &pos, const WColor &color, WFlags< AlignmentFlag > flags, double angle, int margin)Wt::Chart::WChart2DRenderer
renderLegend()Wt::Chart::WChart2DRenderer [protected, virtual]
renderSeries()Wt::Chart::WChart2DRenderer [protected, virtual]
segmentMargin() const Wt::Chart::WChart2DRenderer [protected]
WChart2DRenderer(WCartesianChart *chart, WPainter &painter, const WRectF &rectangle)Wt::Chart::WChart2DRenderer
width() const Wt::Chart::WChart2DRenderer [protected]
~WChart2DRenderer()Wt::Chart::WChart2DRenderer [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer.html new file mode 100644 index 0000000..cb9d6b9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChart2DRenderer.html @@ -0,0 +1,627 @@ + + + + +Wt: Wt::Chart::WChart2DRenderer Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WChart2DRenderer Class Reference
+ +[Charts] +

+
+
+ +

Helper class for rendering a cartesian chart. +More...

+ +

#include <Wt/Chart/WChart2DRenderer>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  AxisProperty { , Grid = 0x2, +Line = 0x4 + }
 

Enumeration that specifies a property of the axes.

+ More...

+Public Member Functions

 WChart2DRenderer (WCartesianChart *chart, WPainter &painter, const WRectF &rectangle)
 Creates a renderer.
+virtual ~WChart2DRenderer ()
 Destructor.
+WCartesianChartchart ()
 Returns the corresponding chart.
+WPainterpainter ()
 Returns a reference to the painter.
WRectF chartArea ()
 Returns the main plotting area rectangle.
virtual void calcChartArea ()
 Calculates the main plotting area rectangle.
void initLayout ()
 Initializes the layout.
virtual void render ()
 Renders the chart.
virtual WPointF map (double xValue, double yValue, Axis axis=OrdinateAxis, int currentXSegment=0, int currentYSegment=0) const
 Maps a (X, Y) point to chart coordinates.
void renderLabel (const WString &text, const WPointF &pos, const WColor &color, WFlags< AlignmentFlag > flags, double angle, int margin)
 Utility function for rendering text.
WPointF hv (double x, double y) const
 Conversion between chart and painter coordinates.
WPointF hv (const WPointF &f) const
 Conversion between chart and painter coordinates.
WRectF hv (const WRectF &f) const
 Conversion between chart and painter coordinates.
WRectF chartSegmentArea (WAxis yAxis, int xSegment, int ySegment) const
 Returns the segment area for a combination of X and Y segments.

+Protected Member Functions

virtual void prepareAxes ()
 Prepares the axes for rendering.
+virtual void renderBackground ()
 Renders the background.
+virtual void renderAxes (WFlags< AxisProperty > properties)
 Renders one or more properties of the axes.
+virtual void renderSeries ()
 Renders all series data, including value labels.
+virtual void renderLegend ()
 Renders the (default) legend and chart titles.
+int width () const
 Returns the width along the X axis (as if orientation is Vertical)
+int height () const
 Returns the height along the Y axis (as if orientation is Vertical)
int segmentMargin () const
 Returns the segment margin.
void renderAxis (const WAxis &axis, WFlags< AxisProperty > properties)
 Renders properties of one axis.
+int calcNumBarGroups ()
 Calculates the total number of bar groups.
+void iterateSeries (SeriesIterator *iterator, bool reverseStacked=false)
 Iterates over the series using an iterator.

+Protected Attributes

AxisValue location_ [3]
 The computed axis locations.
+

Detailed Description

+

Helper class for rendering a cartesian chart.

+

This class is used by WCartesianChart during rendering, and normally, you will not need to use this class directly. You may want to specialize this class if you want to override particular aspects of how the chart is renderered. In that case, you will want to instantiate the specialized class in WCartesianChart::createRenderer().

+

To simplify the simulatenous handling of Horizontal and Vertical charts, the renderer makes abstraction of the orientation of the chart: regardless of the chart orientation, the width() corresponds to the length along the X axis, and height() corresponds to the length along the Y axis. Similarly, calcChartArea() and chartArea() return a rectangle where the bottom side corresponds to the lowest displayed Y values, and the left side corresponds to the lowest displayed X values. To map these "chart coordinates" to painter coordinates, use one of the hv() methods.

+

Note, this class is part of the internal charting API, and may be subject of changes and refactorings.

+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that specifies a property of the axes.

+
Enumerator:
+ + +
Grid  +

Labels property.

+
Line  +

Grid property.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Chart::WChart2DRenderer::WChart2DRenderer (WCartesianChart chart,
WPainter painter,
const WRectF rectangle 
)
+
+
+ +

Creates a renderer.

+

Creates a renderer for the cartesian chart chart, for rendering in the specified rectangle of the painter.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::Chart::WChart2DRenderer::calcChartArea ( ) [virtual]
+
+
+ +

Calculates the main plotting area rectangle.

+

This method calculates the main plotting area, and stores it in the member chartArea_. The default implementation simply removes the plot area padding from the entire painting rectangle.

+
See also:
WCartesianChart::plotAreaPadding().
+ +
+
+ +
+
+ + + + + + + +
WRectF Wt::Chart::WChart2DRenderer::chartArea ( )
+
+
+ +

Returns the main plotting area rectangle.

+

This area is calculated and cached by calcChartArea().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WRectF Wt::Chart::WChart2DRenderer::chartSegmentArea (WAxis  yAxis,
int  xSegment,
int  ySegment 
) const
+
+
+ +

Returns the segment area for a combination of X and Y segments.

+

This segment area is used for clipping when rendering in a particular segment.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WPointF Wt::Chart::WChart2DRenderer::hv (double  x,
double  y 
) const
+
+
+ +

Conversion between chart and painter coordinates.

+

Converts from chart coordinates to painter coordinates, taking into account the chart orientation.

+ +
+
+ +
+
+ + + + + + + + +
WPointF Wt::Chart::WChart2DRenderer::hv (const WPointF f ) const
+
+
+ +

Conversion between chart and painter coordinates.

+

Converts from chart coordinates to painter coordinates, taking into account the chart orientation.

+ +
+
+ +
+
+ + + + + + + + +
WRectF Wt::Chart::WChart2DRenderer::hv (const WRectF f ) const
+
+
+ +

Conversion between chart and painter coordinates.

+

Converts from chart coordinates to painter coordinates, taking into account the chart orientation.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WChart2DRenderer::initLayout ( )
+
+
+ +

Initializes the layout.

+

This computes the chart plotting area dimensions, and intializes the axes so that they provide a suitable mapping from logical coordinates to device coordinates.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WPointF Wt::Chart::WChart2DRenderer::map (double  xValue,
double  yValue,
Axis  axis = OrdinateAxis,
int  currentXSegment = 0,
int  currentYSegment = 0 
) const [virtual]
+
+
+ +

Maps a (X, Y) point to chart coordinates.

+

This method maps the point with given (xValue, yValue) to chart coordinates. The y value is mapped by one of the Y axes indicated by axis.

+

Note that chart coordinates may not be the same as painter coordinates, because of the chart orientation. To map from chart coordinates to painter coordinates, use hv().

+

The currentXSegment and currentYSegment specify the axis segments in which you wish to map the point.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WChart2DRenderer::prepareAxes ( ) [protected, virtual]
+
+
+ +

Prepares the axes for rendering.

+

Computes axis properties such as the range (if not manually specified), label interval (if not manually specified) and axis locations. These properties are stored within the axes (we may want to change that later to allow for reentrant rendering by multiple renderers ?).

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WChart2DRenderer::render ( ) [virtual]
+
+
+ +

Renders the chart.

+

This method renders the chart. The default implementation does the following:

+
 calcChartArea();           // sets chartArea_
+ prepareAxes();             // provides logical dimensions to the axes
+
+ renderBackground();        // render the background
+ renderAxes(Grid);          // render the grid
+ renderSeries();            // render the data series
+ renderAxes(Line | Labels); // render the axes (lines & labels)
+ renderLegend();            // render legend and titles
+

You may want to reimplement this method to change the sequence of steps for rendering the chart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WChart2DRenderer::renderAxis (const WAxis axis,
WFlags< AxisProperty properties 
) [protected]
+
+
+ +

Renders properties of one axis.

+
See also:
renderAxes()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WChart2DRenderer::renderLabel (const WString text,
const WPointF pos,
const WColor color,
WFlags< AlignmentFlag flags,
double  angle,
int  margin 
)
+
+
+ +

Utility function for rendering text.

+

This method renders text on the chart position pos, with a particular alignment flags. These are both specified in chart coordinates. The position is converted to painter coordinates using hv(), and the alignment flags are changed accordingly. The rotation, indicated by angle is specified in painter coordinates and thus an angle of 0 always indicates horizontal text, regardless of the chart orientation.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WChart2DRenderer::segmentMargin ( ) const [protected]
+
+
+ +

Returns the segment margin.

+

This is the separation between segments, and defaults to 40 pixels.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The computed axis locations.

+
See also:
prepareAxes()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette-members.html new file mode 100644 index 0000000..ded8870 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette-members.html @@ -0,0 +1,83 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WChartPalette Member List

+
+
+This is the complete list of members for Wt::Chart::WChartPalette, including all inherited members. + + + + + +
borderPen(int index) const =0Wt::Chart::WChartPalette [pure virtual]
brush(int index) const =0Wt::Chart::WChartPalette [pure virtual]
fontColor(int index) const =0Wt::Chart::WChartPalette [pure virtual]
strokePen(int index) const =0Wt::Chart::WChartPalette [pure virtual]
~WChartPalette()Wt::Chart::WChartPalette [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette.html new file mode 100644 index 0000000..b350a1f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette.html @@ -0,0 +1,214 @@ + + + + +Wt: Wt::Chart::WChartPalette Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WChartPalette Class Reference
+ +[Charts] +

+
+
+ +

Abstract base class for styling rendered data series in charts. +More...

+ +

#include <Wt/Chart/WChartPalette>

+
+Inheritance diagram for Wt::Chart::WChartPalette:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

+virtual ~WChartPalette ()
 Destructor.
virtual WBrush brush (int index) const =0
 Returns a brush from the palette.
virtual WPen borderPen (int index) const =0
 Returns a border pen from the palette.
virtual WPen strokePen (int index) const =0
 Returns a stroke pen from the palette.
virtual WColor fontColor (int index) const =0
 Returns a font color from the palette.
+

Detailed Description

+

Abstract base class for styling rendered data series in charts.

+

This class provides an interface for a palette which sets strokes and fill strokes for data in a chart. A palette is an ordered list of styles, which is indexed by the chart to get a suitable style for a particular series (in case of WCartesianChart) or data row (in case of WPieChart). Each style is defined by a brush, two pen styles (one for borders, and one for plain lines), and a font color that is appropriate for drawing text within the brushed area.

+

To use a custom palette, you should reimplement this class, and then use WAbstractChart::setPalette() to use an instance of the palette.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual WPen Wt::Chart::WChartPalette::borderPen (int  index ) const [pure virtual]
+
+
+ +

Returns a border pen from the palette.

+

Returns the pen for stroking borders around an area filled using the brush at the same index.

+
See also:
strokePen(), brush()
+ +

Implemented in Wt::Chart::WStandardPalette.

+ +
+
+ +
+
+ + + + + + + + +
virtual WBrush Wt::Chart::WChartPalette::brush (int  index ) const [pure virtual]
+
+
+ +

Returns a brush from the palette.

+

Returns the brush for the style with given index.

+ +

Implemented in Wt::Chart::WStandardPalette.

+ +
+
+ +
+
+ + + + + + + + +
virtual WColor Wt::Chart::WChartPalette::fontColor (int  index ) const [pure virtual]
+
+
+ +

Returns a font color from the palette.

+

Returns a font color suitable for rendering text in the area filled with the brush at the same index.

+
See also:
brush()
+ +

Implemented in Wt::Chart::WStandardPalette.

+ +
+
+ +
+
+ + + + + + + + +
virtual WPen Wt::Chart::WChartPalette::strokePen (int  index ) const [pure virtual]
+
+
+ +

Returns a stroke pen from the palette.

+

Returns the pen for stroking lines for the style with given index.

+
See also:
strokePen()
+ +

Implemented in Wt::Chart::WStandardPalette.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.map new file mode 100644 index 0000000..b3b5b19 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.md5 new file mode 100644 index 0000000..4420918 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.md5 @@ -0,0 +1 @@ +7b82b83d07fe8c4d0d38b51ae644cd47 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.png new file mode 100644 index 0000000..ca91cf0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WChartPalette__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries-members.html new file mode 100644 index 0000000..2c96a73 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries-members.html @@ -0,0 +1,123 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WDataSeries Member List

+
+
+This is the complete list of members for Wt::Chart::WDataSeries, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
axis() const Wt::Chart::WDataSeries
barWidth() const Wt::Chart::WDataSeries
bindToAxis(Axis axis)Wt::Chart::WDataSeries
brush() const Wt::Chart::WDataSeries
curstomFlags() const Wt::Chart::WDataSeries
CustomBrush enum valueWt::Chart::WDataSeries
CustomFlag enum nameWt::Chart::WDataSeries
CustomLabelColor enum valueWt::Chart::WDataSeries
CustomMarkerBrush enum valueWt::Chart::WDataSeries
CustomMarkerPen enum valueWt::Chart::WDataSeries
CustomPen enum valueWt::Chart::WDataSeries
fillRange() const Wt::Chart::WDataSeries
isHidden() const Wt::Chart::WDataSeries
isLabelsEnabled(Axis axis) const Wt::Chart::WDataSeries
isLegendEnabled() const Wt::Chart::WDataSeries
isStacked() const Wt::Chart::WDataSeries
labelColor() const Wt::Chart::WDataSeries
mapFromDevice(const WPointF &deviceCoordinates) const Wt::Chart::WDataSeries
mapToDevice(const boost::any &xValue, const boost::any &yValue, int segment=0) const Wt::Chart::WDataSeries
marker() const Wt::Chart::WDataSeries
markerBrush() const Wt::Chart::WDataSeries
markerPen() const Wt::Chart::WDataSeries
markerSize() const Wt::Chart::WDataSeries
modelColumn() const Wt::Chart::WDataSeries
pen() const Wt::Chart::WDataSeries
setBarWidth(const double width)Wt::Chart::WDataSeries
setBrush(const WBrush &brush)Wt::Chart::WDataSeries
setCustomFlags(WFlags< CustomFlag > customFlags)Wt::Chart::WDataSeries
setFillRange(FillRangeType fillRange)Wt::Chart::WDataSeries
setHidden(bool hidden)Wt::Chart::WDataSeries
setLabelColor(const WColor &color)Wt::Chart::WDataSeries
setLabelsEnabled(Axis axis, bool enabled=true)Wt::Chart::WDataSeries
setLegendEnabled(bool enabled)Wt::Chart::WDataSeries
setMarker(MarkerType marker)Wt::Chart::WDataSeries
setMarkerBrush(const WBrush &brush)Wt::Chart::WDataSeries
setMarkerPen(const WPen &pen)Wt::Chart::WDataSeries
setMarkerSize(double size)Wt::Chart::WDataSeries
setModelColumn(int modelColumn)Wt::Chart::WDataSeries
setPen(const WPen &pen)Wt::Chart::WDataSeries
setShadow(const WShadow &shadow)Wt::Chart::WDataSeries
setStacked(bool stacked)Wt::Chart::WDataSeries
setType(SeriesType t)Wt::Chart::WDataSeries
shadow() const Wt::Chart::WDataSeries
type() const Wt::Chart::WDataSeries
WDataSeries(int modelColumn, SeriesType seriesType=PointSeries, Axis axis=Y1Axis)Wt::Chart::WDataSeries
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries.html new file mode 100644 index 0000000..255f56f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WDataSeries.html @@ -0,0 +1,1056 @@ + + + + +Wt: Wt::Chart::WDataSeries Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WDataSeries Class Reference
+ +[Charts] +

+
+
+ +

A single data series in a cartesian chart. +More...

+ +

#include <Wt/Chart/WDataSeries>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  CustomFlag {
+  CustomPen = 0x1, +CustomBrush = 0x2, +CustomMarkerPen = 0x4, +CustomMarkerBrush = 0x8, +
+  CustomLabelColor = 0x10 +
+ }
 

Enumeration that indicates an aspect of the look.

+ More...

+Public Member Functions

 WDataSeries (int modelColumn, SeriesType seriesType=PointSeries, Axis axis=Y1Axis)
 Constructs a new data series.
void setBarWidth (const double width)
 Sets the bar width.
double barWidth () const
 Returns the bar width.
void setType (SeriesType t)
 Sets the series type.
SeriesType type () const
 Returns the series type.
void setModelColumn (int modelColumn)
 Sets the model column.
int modelColumn () const
 Returns the model column.
void setStacked (bool stacked)
 Sets whether this series is stacked on top of the preceding series.
bool isStacked () const
 Returns whether this series is stacked on top of the preceding series.
void bindToAxis (Axis axis)
 Binds this series to a chart axis.
Axis axis () const
 Returns the chart axis used for this series.
void setCustomFlags (WFlags< CustomFlag > customFlags)
 Sets which aspects of the look are overriden.
WFlags< CustomFlagcurstomFlags () const
 Returns which aspects of the look are overriden.
void setPen (const WPen &pen)
 Overrides the pen used for drawing lines for this series.
WPen pen () const
 Returns the pen used for drawing lines for this series.
void setBrush (const WBrush &brush)
 Overrides the brush used for filling areas for this series.
WBrush brush () const
 Returns the brush used for filling areas for this series.
+void setShadow (const WShadow &shadow)
 Sets a shadow used for stroking lines for this series.
const WShadowshadow () const
 Returns the shadow used for stroking lines for this series.
void setFillRange (FillRangeType fillRange)
 Sets the fill range for line or curve series.
FillRangeType fillRange () const
 Returns the fill range for line or curve series.
void setMarker (MarkerType marker)
 Sets the data point marker.
MarkerType marker () const
 Returns the data point marker.
void setMarkerSize (double size)
 Sets the marker size.
double markerSize () const
 Returns the marker size.
void setMarkerPen (const WPen &pen)
 Sets the marker pen.
WPen markerPen () const
 Returns the marker pen.
void setMarkerBrush (const WBrush &brush)
 Sets the marker brush.
WBrush markerBrush () const
 Returns the marker brush.
void setLegendEnabled (bool enabled)
 Enables the entry for this series in the legend.
bool isLegendEnabled () const
 Returns whether this series has an entry in the legend.
void setLabelsEnabled (Axis axis, bool enabled=true)
 Enables a label that is shown at the series data points.
bool isLabelsEnabled (Axis axis) const
 Returns whether labels are enabled for the given axis.
void setLabelColor (const WColor &color)
 Sets the label color.
WColor labelColor () const
 Returns the label color.
void setHidden (bool hidden)
 Hide/unhide this series.
bool isHidden () const
 Return whether the series is hidden.
WPointF mapFromDevice (const WPointF &deviceCoordinates) const
 Maps from device coordinates to model coordinates.
WPointF mapToDevice (const boost::any &xValue, const boost::any &yValue, int segment=0) const
 Maps from model values to device coordinates.
+

Detailed Description

+

A single data series in a cartesian chart.

+

This class configures all aspects for rendering a single data series in a cartesian chart. A data series renders Y data from a single model column against the X series configured for the chart.

+

The data column should contain data that can be converted to a number, but should not necessarily be of a number type, see also asNumber(const boost::any&).

+

Multiple series of different types may be combined on a single chart.

+
+ChartWDataSeries-1.png +

Different styles of data series

+

For a category chart, series may be stacked on top of each other. This is controlled by setStacked(bool stacked) for a series, which if enabled, will stack that series on top of the preceding data series. This works regardless of whether they are of the same type, but obviously works visually best if these series are of the same type. When not stacked, bar series are rendered next to each other. The margin between bars of different data series is controlled using WCartesianChart::setBarMargin(double).

+

The line and color type are by default based on the chart palette, but may be overridden for a series using setPen(const WPen&), setBrush(const WBrush&), etc...

+
See also:
WCartesianChart::addSeries(const WDataSeries&)
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that indicates an aspect of the look.

+

These flags are used to keep track of which aspects of the look that are overridden from the values provided by the chart palette, using one of the methods in this class.

+
See also:
setPen(), setBrush(), setMarkerPen(), setMarkerBrush(), setLabelColor()
+
Enumerator:
+ + + + + +
CustomPen  +

A custom pen is set.

+
CustomBrush  +

A custom brush is set.

+
CustomMarkerPen  +

A custom marker pen is set.

+
CustomMarkerBrush  +

A custom marker brush is set.

+
CustomLabelColor  +

A custom label color is set.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Chart::WDataSeries::WDataSeries (int  modelColumn,
SeriesType  seriesType = PointSeries,
Axis  axis = Y1Axis 
)
+
+
+ +

Constructs a new data series.

+

Creates a new data series which plots the Y values from the model column modelColumn, with the indicated seriesType. The Y values are mapped to the indicated axis, which should correspond to one of the two Y axes.

+
See also:
WCartesianChart::addSeries(const WDataSeries&)
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Axis Wt::Chart::WDataSeries::axis ( ) const
+
+
+ +

Returns the chart axis used for this series.

+
See also:
bindToAxis(Axis)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WDataSeries::barWidth ( ) const
+
+
+ +

Returns the bar width.

+
See also:
setBarWidth(double)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::bindToAxis (Axis  axis )
+
+
+ +

Binds this series to a chart axis.

+

A data series may be bound to either the first or second Y axis. Note that the second Y axis is by default not displayed.

+

The default value is the first Y axis.

+
See also:
WAxis::setVisible()
+ +
+
+ +
+
+ + + + + + + +
WBrush Wt::Chart::WDataSeries::brush ( ) const
+
+
+ +

Returns the brush used for filling areas for this series.

+
See also:
setBrush(const WBrush&)
+ +
+
+ +
+
+ + + + + + + +
WFlags<CustomFlag> Wt::Chart::WDataSeries::curstomFlags ( ) const
+
+
+ +

Returns which aspects of the look are overriden.

+
See also:
setCustomFlags(WFlags<CustomFlag>)
+ +
+
+ +
+
+ + + + + + + +
FillRangeType Wt::Chart::WDataSeries::fillRange ( ) const
+
+
+ +

Returns the fill range for line or curve series.

+
See also:
setFillRange(FillRangeType)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WDataSeries::isHidden ( ) const
+
+
+ +

Return whether the series is hidden.

+

/sa setHidden()

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::Chart::WDataSeries::isLabelsEnabled (Axis  axis ) const
+
+
+ +

Returns whether labels are enabled for the given axis.

+
See also:
setLabelsEnabled(Axis, bool)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WDataSeries::isLegendEnabled ( ) const
+
+
+ +

Returns whether this series has an entry in the legend.

+
See also:
setLegendEnabled(bool)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WDataSeries::isStacked ( ) const
+
+
+ +

Returns whether this series is stacked on top of the preceding series.

+
See also:
setStacked(bool)
+ +
+
+ +
+
+ + + + + + + +
WColor Wt::Chart::WDataSeries::labelColor ( ) const
+
+
+ +

Returns the label color.

+
See also:
setLabelColor(const WColor&)
+ +
+
+ +
+
+ + + + + + + + +
WPointF Wt::Chart::WDataSeries::mapFromDevice (const WPointF deviceCoordinates ) const
+
+
+ +

Maps from device coordinates to model coordinates.

+

Maps a position in the chart back to model coordinates, for data in this data series.

+

This uses WChart::mapFromDevice() passing the axis() to which this series is bound.

+

This method uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call WCartesianChart::initLayout() first.

+
See also:
mapToDevice()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WPointF Wt::Chart::WDataSeries::mapToDevice (const boost::any &  xValue,
const boost::any &  yValue,
int  segment = 0 
) const
+
+
+ +

Maps from model values to device coordinates.

+

Maps model values to device coordinates, for data in this data series.

+

This uses WChart::mapToDevice() passing the axis() to which this series is bound.

+

This method uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call WCartesianChart::initLayout() first.

+
See also:
mapFromDevice()
+ +
+
+ +
+
+ + + + + + + +
MarkerType Wt::Chart::WDataSeries::marker ( ) const
+
+
+ +

Returns the data point marker.

+
See also:
setMarker(MarkerType)
+ +
+
+ +
+
+ + + + + + + +
WBrush Wt::Chart::WDataSeries::markerBrush ( ) const
+
+
+ +

Returns the marker brush.

+
See also:
setMarkerBrush(const WBrush&)
+ +
+
+ +
+
+ + + + + + + +
WPen Wt::Chart::WDataSeries::markerPen ( ) const
+
+
+ +

Returns the marker pen.

+
See also:
setMarkerPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WDataSeries::markerSize ( ) const
+
+
+ +

Returns the marker size.

+
See also:
setMarkerSize()
+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WDataSeries::modelColumn ( ) const
+
+
+ +

Returns the model column.

+
See also:
setModelColumn(int)
+ +
+
+ +
+
+ + + + + + + +
WPen Wt::Chart::WDataSeries::pen ( ) const
+
+
+ +

Returns the pen used for drawing lines for this series.

+
See also:
setPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setBarWidth (const double  width )
+
+
+ +

Sets the bar width.

+

The bar width specifies the bar width (in axis dimensions). For category plots, which may have several bars for different series next to each other, you will want to specify the same bar width for each series.

+

For scatter plots, you may want to set the bar width to a natural size. E.g. if you are plotting weekly measurements, you could set the width to correspond to a week (=7).

+

The default value is 0.8 (which leaves a 20% margin between bars for different categories in a category chart.

+
See also:
WCartesianChart::setBarMargin()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setBrush (const WBrush brush )
+
+
+ +

Overrides the brush used for filling areas for this series.

+

Overrides the brush that is used to draw this series which is otherwise provided by the chart palette. For a bar plot, this is the brush used to fill the bars. For a line chart, this is the brush used to fill the area under (or above) the line. Calling this method automatically adds CustomBrush to the custom flags.

+
See also:
WChartPalette::brush()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setCustomFlags (WFlags< CustomFlag customFlags )
+
+
+ +

Sets which aspects of the look are overriden.

+

Set which aspects of the look, that are by default based on the chart palette, are overridden by custom settings.

+

The default value is 0 (nothing overridden).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setFillRange (FillRangeType  fillRange )
+
+
+ +

Sets the fill range for line or curve series.

+

Line or curve series may be filled under or above the curve, using the brush(). This setting specifies the range that is filled.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setHidden (bool  hidden )
+
+
+ +

Hide/unhide this series.

+

A hidden series will not be show in the chart and legend.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setLabelColor (const WColor color )
+
+
+ +

Sets the label color.

+

Specify the color used for the rendering labels at the data points.

+
See also:
setLabelsEnabled(Axis, bool)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WDataSeries::setLabelsEnabled (Axis  axis,
bool  enabled = true 
)
+
+
+ +

Enables a label that is shown at the series data points.

+

You may enable labels for the XAxis, YAxis or both axes. The label that is displayed is the corresponding value on that axis. If both labels are enabled then they are combined in a single text using the format: "<x-value>: <y-value>".

+

The default values are false for both axes (no labels).

+
See also:
isLabelsEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setLegendEnabled (bool  enabled )
+
+
+ +

Enables the entry for this series in the legend.

+

When enabled, this series is added to the chart legend.

+

The default value is true.

+
See also:
WCartesianChart::setLegendEnabled(bool).
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setMarker (MarkerType  marker )
+
+
+ +

Sets the data point marker.

+

Specifies a marker that is displayed at the (X,Y) coordinate for each series data point.

+

The default value is a CircleMarker for a PointSeries, or NoMarker otherwise.

+
See also:
setMarkerPen(const WPen&), setMarkerBrush(const WBrush&).
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setMarkerBrush (const WBrush brush )
+
+
+ +

Sets the marker brush.

+

Overrides the brush used for filling the marker. By default the marker brush is the same as brush(). Calling this method automatically adds CustomMarkerBrush to the custom flags.

+
See also:
setBrush(const WBrush&), setMarkerPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setMarkerPen (const WPen pen )
+
+
+ +

Sets the marker pen.

+

Overrides the pen used for stroking the marker. By default the marker pen is the same as pen(). Calling this method automatically adds CustomMarkerPen to the custom flags.

+
See also:
setPen(const WPen&), setMarkerBrush(const WBrush&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setMarkerSize (double  size )
+
+
+ +

Sets the marker size.

+

The default marker size is 6 pixels.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setModelColumn (int  modelColumn )
+
+
+ +

Sets the model column.

+

This specifies the model column from which the Y data is retrieved that is plotted by this series.

+

The data column should contain data that can be converted to a number (but should not necessarily be of a number type).

+
See also:
asNumber(const boost::any&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setPen (const WPen pen )
+
+
+ +

Overrides the pen used for drawing lines for this series.

+

Overrides the pen that is used to draw this series. Calling this method automatically adds CustomPen to the custom flags.

+

The default value is a default WPen().

+
See also:
WChartPalette::strokePen(), WChartPalette::borderPen()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setStacked (bool  stacked )
+
+
+ +

Sets whether this series is stacked on top of the preceding series.

+

For category charts, data from different series may be rendered stacked on top of each other. The rendered value is the sum of the value of this series plus the rendered value of the preceding series. For line series, you probably will want to add filling under the curve. A stacked bar series is rendered by a bar on top of the preceding bar series.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WDataSeries::setType (SeriesType  t )
+
+
+ +

Sets the series type.

+

The series type specifies how the data is plotted, i.e. using mere point markers, lines, curves, or bars.

+ +
+
+ +
+
+ + + + + + + +
const WShadow & Wt::Chart::WDataSeries::shadow ( ) const
+
+
+ +

Returns the shadow used for stroking lines for this series.

+
See also:
setShadow(const WShadow&)
+ +
+
+ +
+
+ + + + + + + +
SeriesType Wt::Chart::WDataSeries::type ( ) const
+
+
+ +

Returns the series type.

+
See also:
setType(SeriesType)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart-members.html new file mode 100644 index 0000000..638df0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart-members.html @@ -0,0 +1,256 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WPieChart Member List

+
+
+This is the complete list of members for Wt::Chart::WPieChart, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
addArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::addChild(WObject *child)Wt::WObject
addDataPointArea(const WModelIndex &index, WAbstractArea *area) const Wt::Chart::WPieChart [virtual]
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
area(int index) const Wt::WPaintedWidget
areas() const Wt::WPaintedWidget
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
background() const Wt::Chart::WAbstractChart
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
brush(int modelRow) const Wt::Chart::WPieChart
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
createLegendItemWidget(int index, WFlags< LabelOption > options)Wt::Chart::WPieChart
dataColumn() const Wt::Chart::WPieChart
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
displayLabels() const Wt::Chart::WPieChart
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WPaintedWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
explode(int modelRow) const Wt::Chart::WPieChart
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
HtmlCanvas enum valueWt::WPaintedWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
InlineSvgVml enum valueWt::WPaintedWidget
insertArea(int index, WAbstractArea *area)Wt::WPaintedWidget
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPerspectiveEnabled() const Wt::Chart::WPieChart
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isShadowEnabled() const Wt::Chart::WPieChart
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
labelsColumn() const Wt::Chart::WPieChart
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WPaintedWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method enum nameWt::WPaintedWidget
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::Chart::WAbstractChart
modelChanged()Wt::Chart::WPieChart [private, virtual]
modelColumnsInserted(const WModelIndex &parent, int start, int end)Wt::Chart::WPieChart [private, virtual]
modelColumnsRemoved(const WModelIndex &parent, int start, int end)Wt::Chart::WPieChart [private, virtual]
modelDataChanged(const WModelIndex &topLeft, const WModelIndex &bottomRight)Wt::Chart::WPieChart [private, virtual]
modelReset()Wt::Chart::WPieChart [private, virtual]
modelRowsInserted(const WModelIndex &parent, int start, int end)Wt::Chart::WPieChart [private, virtual]
modelRowsRemoved(const WModelIndex &parent, int start, int end)Wt::Chart::WPieChart [private, virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
paint(WPainter &painter, const WRectF &rectangle=WRectF()) const Wt::Chart::WPieChart [virtual]
paintEvent(Wt::WPaintDevice *paintDevice)Wt::Chart::WPieChart [protected, virtual]
palette() const Wt::Chart::WAbstractChart
parent() const Wt::WWidget
plotAreaPadding(Side side) const Wt::Chart::WAbstractChart
PngImage enum valueWt::WPaintedWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
preferredMethod() const Wt::WPaintedWidget
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WPaintedWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setBackground(const WBrush &background)Wt::Chart::WAbstractChart
setBrush(int modelRow, const WBrush &brush)Wt::Chart::WPieChart
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDataColumn(int modelColumn)Wt::Chart::WPieChart
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDisplayLabels(WFlags< LabelOption > options)Wt::Chart::WPieChart
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setExplode(int modelRow, double factor)Wt::Chart::WPieChart
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLabelsColumn(int column)Wt::Chart::WPieChart
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::Chart::WAbstractChart
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPalette(WChartPalette *palette)Wt::Chart::WAbstractChart
setPerspectiveEnabled(bool enabled, double height=1.0)Wt::Chart::WPieChart
setPlotAreaPadding(int padding, WFlags< Side > sides=All)Wt::Chart::WAbstractChart
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreferredMethod(Method method)Wt::WPaintedWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setShadowEnabled(bool enabled)Wt::Chart::WPieChart
setStartAngle(double degrees)Wt::Chart::WPieChart
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Chart::WAbstractChart
setTitleFont(const WFont &titleFont)Wt::Chart::WAbstractChart
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
startAngle() const Wt::Chart::WPieChart
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::Chart::WAbstractChart
titleFont() const Wt::Chart::WAbstractChart
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
update(WFlags< PaintFlag > flags=0)Wt::WPaintedWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WPaintedWidget(WContainerWidget *parent=0)Wt::WPaintedWidget
WPieChart(WContainerWidget *parent=0)Wt::Chart::WPieChart
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WAbstractChart()Wt::Chart::WAbstractChart [virtual]
~WObject()Wt::WObject [virtual]
~WPaintedWidget()Wt::WPaintedWidget
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart.html new file mode 100644 index 0000000..763125c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart.html @@ -0,0 +1,877 @@ + + + + +Wt: Wt::Chart::WPieChart Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WPieChart Class Reference
+ +[ChartsModel/view system] +

+
+
+ +

A pie chart. +More...

+ +

#include <Wt/Chart/WPieChart>

+
+Inheritance diagram for Wt::Chart::WPieChart:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WPieChart (WContainerWidget *parent=0)
 Creates a new pie chart.
void setLabelsColumn (int column)
 Sets the model column that holds the labels.
int labelsColumn () const
 Returns the model column used for the labels.
void setDataColumn (int modelColumn)
 Sets the model column that holds the data.
int dataColumn () const
 Returns the model column used for the data.
void setBrush (int modelRow, const WBrush &brush)
 Customizes the brush used for a pie segment.
WBrush brush (int modelRow) const
 Returns the brush used for a pie segment.
void setExplode (int modelRow, double factor)
 Sets the explosion factor for a pie segment.
double explode (int modelRow) const
 Returns the explosion factor for a segment.
void setPerspectiveEnabled (bool enabled, double height=1.0)
 Enables a 3D perspective effect on the pie.
bool isPerspectiveEnabled () const
 Returns whether a 3D effect is enabled.
void setShadowEnabled (bool enabled)
 Enables a shadow effect.
bool isShadowEnabled () const
 Returns whether a shadow effect is enabled.
void setStartAngle (double degrees)
 Sets the angle of the first segment.
double startAngle () const
 Returns the angle of the first segment.
void setDisplayLabels (WFlags< LabelOption > options)
 Configures if and how labels should be displayed.
WFlags< LabelOptiondisplayLabels () const
 Returns options set for displaying labels.
WWidgetcreateLegendItemWidget (int index, WFlags< LabelOption > options)
 Creates a widget which renders the a legend item.
virtual void addDataPointArea (const WModelIndex &index, WAbstractArea *area) const
 Adds a data point area (used for displaying e.g. tooltips).
virtual void paint (WPainter &painter, const WRectF &rectangle=WRectF()) const
 Paint the chart in a rectangle of the given painter.

+Protected Member Functions

void paintEvent (Wt::WPaintDevice *paintDevice)
 Paints the widget.

+Private Member Functions

virtual void modelChanged ()
 Method called whenever the entire model was changed.
virtual void modelReset ()
 Method called whenever the entire model was reset.
virtual void modelColumnsInserted (const WModelIndex &parent, int start, int end)
 Method called when colums have been inserted in the model.
virtual void modelColumnsRemoved (const WModelIndex &parent, int start, int end)
 Method called when colums have been removed from the model.
virtual void modelRowsInserted (const WModelIndex &parent, int start, int end)
 Method called when rows have been inserted from the model.
virtual void modelRowsRemoved (const WModelIndex &parent, int start, int end)
 Method called when rows have been removed from the model.
virtual void modelDataChanged (const WModelIndex &topLeft, const WModelIndex &bottomRight)
 Method called when data has been changed in the model.
+

Detailed Description

+

A pie chart.

+

A pie chart renders a single data series as segments of a circle, so that the area of each segment is proportional to the value in the data series.

+

To use a pie chart, you need to set a model using setModel(), and use setLabelsColumn() and setDataColumn() to specify the model column that contains the category labels and data.

+

The pie chart may be customized visually by enabling a 3D effect (setPerspectiveEnabled()), or by specifying the angle of the first segment. One or more segments may be exploded, which seperates the segment from the rest of the pie chart, using setExplode().

+

The segments may be labeled in various ways using setDisplayLabels().

+

CSS

+

Styling through CSS is not applicable.

+
+ChartWPieChart-1.png +

Example of a pie chart

+
See also:
WCartesianChart
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::addDataPointArea (const WModelIndex index,
WAbstractArea area 
) const [virtual]
+
+
+ +

Adds a data point area (used for displaying e.g. tooltips).

+

You may want to specialize this is if you wish to modify (or delete) the area.

+
Note:
Currently, an area is only created if the ToolTipRole data at the data point is not empty.
+ +
+
+ +
+
+ + + + + + + + +
WBrush Wt::Chart::WPieChart::brush (int  modelRow ) const
+
+
+ +

Returns the brush used for a pie segment.

+
See also:
setBrush(int, const WBrush&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WWidget * Wt::Chart::WPieChart::createLegendItemWidget (int  index,
WFlags< LabelOption options 
)
+
+
+ +

Creates a widget which renders the a legend item.

+

Depending on the passed LabelOption flags, the legend item widget, will contain a text (with or without the percentage) and/or a span with the segment's color.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WPieChart::dataColumn ( ) const
+
+
+ +

Returns the model column used for the data.

+
See also:
setDataColumn(int)
+ +
+
+ +
+
+ + + + + + + +
WFlags<LabelOption> Wt::Chart::WPieChart::displayLabels ( ) const
+
+
+ +

Returns options set for displaying labels.

+
See also:
WPieChart::setDisplayLabels()
+ +
+
+ +
+
+ + + + + + + + +
double Wt::Chart::WPieChart::explode (int  modelRow ) const
+
+
+ +

Returns the explosion factor for a segment.

+
See also:
setExplode(int, double)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WPieChart::isPerspectiveEnabled ( ) const
+
+
+ +

Returns whether a 3D effect is enabled.

+
See also:
setPerspectiveEnabled(bool, double)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Chart::WPieChart::isShadowEnabled ( ) const
+
+
+ +

Returns whether a shadow effect is enabled.

+
See also:
setShadowEnabled()
+ +
+
+ +
+
+ + + + + + + +
int Wt::Chart::WPieChart::labelsColumn ( ) const
+
+
+ +

Returns the model column used for the labels.

+
See also:
setLabelsColumn(int)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WPieChart::modelChanged ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was changed.

+
See also:
setModel(WAbstractItemModel *)
+ +

Reimplemented from Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::modelColumnsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when colums have been inserted in the model.

+
See also:
WAbstractItemModel::columnsInserted
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::modelColumnsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when colums have been removed from the model.

+
See also:
WAbstractItemModel::columnsRemoved
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::modelDataChanged (const WModelIndex topLeft,
const WModelIndex bottomRight 
) [private, virtual]
+
+
+ +

Method called when data has been changed in the model.

+
See also:
WAbstractItemModel::dataChanged
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Chart::WPieChart::modelReset ( ) [private, virtual]
+
+
+ +

Method called whenever the entire model was reset.

+

Bound to the WAbstractItemModel::modelReset() and WAbstractItemModel::layoutChanged() signals.

+ +

Reimplemented from Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::modelRowsInserted (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when rows have been inserted from the model.

+
See also:
WAbstractItemModel::rowsInserted
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::modelRowsRemoved (const WModelIndex parent,
int  start,
int  end 
) [private, virtual]
+
+
+ +

Method called when rows have been removed from the model.

+
See also:
WAbstractItemModel::rowsRemoved
+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::paint (WPainter painter,
const WRectF rectangle = WRectF() 
) const [virtual]
+
+
+ +

Paint the chart in a rectangle of the given painter.

+

Paints the chart inside the painter, in the area indicated by rectangle. When rectangle is a null rectangle, the entire painter window is used.

+ +

Implements Wt::Chart::WAbstractChart.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::paintEvent (Wt::WPaintDevice paintDevice ) [protected, virtual]
+
+
+ +

Paints the widget.

+

You should reimplement this method to paint the contents of the widget, using the given paintDevice.

+ +

Implements Wt::WPaintedWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::setBrush (int  modelRow,
const WBrush brush 
)
+
+
+ +

Customizes the brush used for a pie segment.

+

By default, the brush is taken from the palette(). You can use this method to override the palette's brush for a particular modelRow.

+
See also:
setPalette(WChartPalette *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::setDataColumn (int  modelColumn )
+
+
+ +

Sets the model column that holds the data.

+

The data column should contain data that can be converted to a number, but should not necessarily be of a number type, see also asNumber(const boost::any&).

+

The default value is -1 (not defined).

+
See also:
setModel(WAbstractItemModel *), setLabelsColumn(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::setDisplayLabels (WFlags< LabelOption options )
+
+
+ +

Configures if and how labels should be displayed.

+

The options must be the logical OR of a placement option (Inside or Outside) and TextLabel and/or TextPercentage. If both TextLabel and TextPercentage are specified, then these are combined as "<label>: <percentage>".

+

The default value is NoLabels.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::setExplode (int  modelRow,
double  factor 
)
+
+
+ +

Sets the explosion factor for a pie segment.

+

Separates the segment corresponding to model row modelRow from the rest of the pie. The factor is a positive number that represents the distance from the center as a fraction of the pie radius. Thus, 0 corresponds to no separation, and 0.1 to a 10% separation, and 1 to a separation where the segment tip is on the outer perimeter of the pie.

+

The default value is 0.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::setLabelsColumn (int  column )
+
+
+ +

Sets the model column that holds the labels.

+

The labels are used only when setDisplayLabels() is called with the TextLabel option.

+

The default value is -1 (not defined).

+
See also:
setModel(WAbstractItemModel *), setDisplayLabels(), setDataColumn(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Chart::WPieChart::setPerspectiveEnabled (bool  enabled,
double  height = 1.0 
)
+
+
+ +

Enables a 3D perspective effect on the pie.

+

A 3D perspective effect is added, which may be customized by specifying the simulated height of the pie. The height is defined as a fraction of the pie radius.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::setShadowEnabled (bool  enabled )
+
+
+ +

Enables a shadow effect.

+

A soft shadow effect is added.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Chart::WPieChart::setStartAngle (double  degrees )
+
+
+ +

Sets the angle of the first segment.

+

The default value is 45 degrees.

+ +
+
+ +
+
+ + + + + + + +
double Wt::Chart::WPieChart::startAngle ( ) const
+
+
+ +

Returns the angle of the first segment.

+
See also:
setStartAngle(double)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.map new file mode 100644 index 0000000..cebb5ca --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.md5 new file mode 100644 index 0000000..bfce2cb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.md5 @@ -0,0 +1 @@ +ee2e9e90aa2b4c1c15e62aa298eb71b5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.png new file mode 100644 index 0000000..6aec5d7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WPieChart__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette-members.html new file mode 100644 index 0000000..3856dc2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette-members.html @@ -0,0 +1,90 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Chart::WStandardPalette Member List

+
+
+This is the complete list of members for Wt::Chart::WStandardPalette, including all inherited members. + + + + + + + + + + + + +
Bold enum valueWt::Chart::WStandardPalette
borderPen(int index) const Wt::Chart::WStandardPalette [virtual]
brush(int index) const Wt::Chart::WStandardPalette [virtual]
color(int index) const Wt::Chart::WStandardPalette [virtual]
Flavour enum nameWt::Chart::WStandardPalette
fontColor(int index) const Wt::Chart::WStandardPalette [virtual]
GrayScale enum valueWt::Chart::WStandardPalette
Muted enum valueWt::Chart::WStandardPalette
Neutral enum valueWt::Chart::WStandardPalette
strokePen(int index) const Wt::Chart::WStandardPalette [virtual]
WStandardPalette(Flavour flavour)Wt::Chart::WStandardPalette
~WChartPalette()Wt::Chart::WChartPalette [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette.html new file mode 100644 index 0000000..b6efb78 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette.html @@ -0,0 +1,281 @@ + + + + +Wt: Wt::Chart::WStandardPalette Class Reference + + + + + + + + + +
+ +
+

Wt::Chart::WStandardPalette Class Reference
+ +[Charts] +

+
+
+ +

Standard styling for rendering series in charts. +More...

+ +

#include <Wt/Chart/WStandardPalette>

+
+Inheritance diagram for Wt::Chart::WStandardPalette:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + +

+Public Types

enum  Flavour { Neutral = 0, +Bold = 1, +Muted = 2, +GrayScale = 255 + }
 

Enumeration that indicates the palette flavour.

+ More...

+Public Member Functions

WStandardPalette (Flavour flavour)
 Creates a standard palette of a particular flavour.
virtual WBrush brush (int index) const
 Returns a brush from the palette.
virtual WPen borderPen (int index) const
 Returns a border pen from the palette.
virtual WPen strokePen (int index) const
 Returns a stroke pen from the palette.
virtual WColor fontColor (int index) const
 Returns a font color from the palette.
+virtual WColor color (int index) const
 Returns the color for the given index.
+

Detailed Description

+

Standard styling for rendering series in charts.

+

This class provides four standard palettes, each composed of eight different colors (these are recycled at index 8).

+

The three colored palettes are a variation on those defined at http://www.modernlifeisrubbish.co.uk/article/web-2.0-colour-palette.

+

The following table lists the background color, and font color of the different palettes:

+ + + + + + + + + + + + + + + + + + + +
Neutral Bold Muted GrayScale
Gmail blue Mozilla red Ruby on Rails red Gray #1
Shiny silver Flock blue Mozilla blue Gray #2
Interactive action yellow RSS orange Etsy vermillion Gray #3
Qoop mint Techcrunch green Digg blue Gray #4
Digg blue Flickr pink 43 Things gold Gray #5
Shadows grey Newsvine green Writely olive Gray #6
Magnolia Mag.nolia Magnolia Mag.nolia Last.fm crimson Gray #7
RSS orange Rollyo red Basecamp green Gray #8
+

The border pen is in all cases a gray pen of 0 width, while the stroke pen is a line of width 2 in the background color.

+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that indicates the palette flavour.

+
Enumerator:
+ + + + +
Neutral  +

Neutral palette.

+
Bold  +

Bold palette.

+
Muted  +

Muted palette.

+
GrayScale  +

Grayscale palette.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WPen Wt::Chart::WStandardPalette::borderPen (int  index ) const [virtual]
+
+
+ +

Returns a border pen from the palette.

+

Returns the pen for stroking borders around an area filled using the brush at the same index.

+
See also:
strokePen(), brush()
+ +

Implements Wt::Chart::WChartPalette.

+ +
+
+ +
+
+ + + + + + + + +
WBrush Wt::Chart::WStandardPalette::brush (int  index ) const [virtual]
+
+
+ +

Returns a brush from the palette.

+

Returns the brush for the style with given index.

+ +

Implements Wt::Chart::WChartPalette.

+ +
+
+ +
+
+ + + + + + + + +
WColor Wt::Chart::WStandardPalette::fontColor (int  index ) const [virtual]
+
+
+ +

Returns a font color from the palette.

+

Returns a font color suitable for rendering text in the area filled with the brush at the same index.

+
See also:
brush()
+ +

Implements Wt::Chart::WChartPalette.

+ +
+
+ +
+
+ + + + + + + + +
WPen Wt::Chart::WStandardPalette::strokePen (int  index ) const [virtual]
+
+
+ +

Returns a stroke pen from the palette.

+

Returns the pen for stroking lines for the style with given index.

+
See also:
strokePen()
+ +

Implements Wt::Chart::WChartPalette.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.map new file mode 100644 index 0000000..6240f64 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.md5 new file mode 100644 index 0000000..12561b4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.md5 @@ -0,0 +1 @@ +3028f2fe6a9c2c0a92d370ffb4ec4e1a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.png new file mode 100644 index 0000000..1cbbd65 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call-members.html new file mode 100644 index 0000000..12535d1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Call Member List

+
+
+This is the complete list of members for Wt::Dbo::Call, including all inherited members. + + + +
bind(const T &value)Wt::Dbo::Call
Call(const Call &other)Wt::Dbo::Call
~Call()Wt::Dbo::Call
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call.html new file mode 100644 index 0000000..d5f6c51 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Call.html @@ -0,0 +1,171 @@ + + + + +Wt: Wt::Dbo::Call Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Call Class Reference

+
+
+ +

A database call. +More...

+ +

#include <Wt/Dbo/Call>

+ +

List of all members.

+ + + + + + + + + +

+Public Member Functions

 ~Call ()
 Destructor.
 Call (const Call &other)
 Copy constructor.
template<typename T >
Callbind (const T &value)
 Binds a value to the next positional marker.
+

Detailed Description

+

A database call.

+

A call can be used to execute a database command (e.g. an update, or a stored procedure call).

+
See also:
Query
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::Dbo::Call::~Call ( )
+
+
+ +

Destructor.

+

This executes the call if it wasn't run() yet, and the call has not been copied.

+ +
+
+ +
+
+ + + + + + + + +
Wt::Dbo::Call::Call (const Call other )
+
+
+ +

Copy constructor.

+

This transfer the call "token" to the copy.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + + + + +
Call & Wt::Dbo::Call::bind (const T &  value )
+
+
+ +

Binds a value to the next positional marker.

+

This binds the value to the next positional marker.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo-members.html new file mode 100644 index 0000000..69a4717 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Dbo< C > Member List

+
+
+This is the complete list of members for Wt::Dbo::Dbo< C >, including all inherited members. + + + +
Dbo()Wt::Dbo::Dbo< C >
id() const Wt::Dbo::Dbo< C >
session() const Wt::Dbo::Dbo< C >
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo.html new file mode 100644 index 0000000..e35acfd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Dbo.html @@ -0,0 +1,169 @@ + + + + +Wt: Wt::Dbo::Dbo< C > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Dbo< C > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A base class for database objects. +More...

+ +

#include <Wt/Dbo/Dbo>

+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

Dbo ()
 Constructor.
dbo_traits< C >::IdType id () const
 Returns the database id.
Sessionsession () const
 Returns the session.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::Dbo< C >

+ +

A base class for database objects.

+

The only requirement for a class to be be persisted is to have a persist() method. In some cases however, it may be convenient to be able to access database information of an object, such as its database id and its session, from the object itself.

+

By deriving your database class directly or indirectly from this class, you can have access to its id() and session(). This will increase the size of your object with one pointer.

+

The following example shows a skeleton for a database object which has access to its own id and session information:

+
 class Cat : public Wt::Dbo::Dbo {
+ public:
+   template <class Action>
+   void persist(Action& a) { }
+ };
+

Compare this to the skeleton for a minimum valid database class:

+
 class Cat {
+ public:
+   template <class Action>
+   void persist(Action& a) { }
+ };
+

Member Function Documentation

+ +
+
+
+template<class C >
+ + + + + + + +
dbo_traits< C >::IdType Wt::Dbo::Dbo< C >::id ( ) const
+
+
+ +

Returns the database id.

+

Returns the database id of this object, or Wt::Dbo::dbo_traits<C>::invalidId() if the object is associated with a session or not yet stored in the database.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
Session * Wt::Dbo::Dbo< C >::session ( ) const
+
+
+ +

Returns the session.

+

Returns the session to which this object belongs, or 0 if the object is not associated with a session.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception-members.html new file mode 100644 index 0000000..2d0b924 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Exception Member List

+
+
+This is the complete list of members for Wt::Dbo::Exception, including all inherited members. + +
Exception(const std::string &error)Wt::Dbo::Exception
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception.html new file mode 100644 index 0000000..81639ad --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception.html @@ -0,0 +1,112 @@ + + + + +Wt: Wt::Dbo::Exception Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Exception Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Exception base class for Wt::Dbo. +More...

+ +

#include <Wt/Dbo/Exception>

+
+Inheritance diagram for Wt::Dbo::Exception:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

Exception (const std::string &error)
 Constructor.
+

Detailed Description

+

Exception base class for Wt::Dbo.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.map new file mode 100644 index 0000000..6ae5a35 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.md5 new file mode 100644 index 0000000..83bfe1e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.md5 @@ -0,0 +1 @@ +677f00d814d89ca5e2d16b188c1946f1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.png new file mode 100644 index 0000000..c7025dd Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Exception__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo-members.html new file mode 100644 index 0000000..ab73be3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo-members.html @@ -0,0 +1,99 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::FieldInfo Member List

+
+
+This is the complete list of members for Wt::Dbo::FieldInfo, including all inherited members. + + + + + + + + + + + + + + + + + + + + + +
FieldInfo(const std::string &name, const std::type_info *type, const std::string &sqlType, int flags)Wt::Dbo::FieldInfo
FieldInfo(const std::string &name, const std::type_info *type, const std::string &sqlType, const std::string &foreignKeyTable, const std::string &foreignKeyName, int flags)Wt::Dbo::FieldInfo
Flags enum nameWt::Dbo::FieldInfo
ForeignKey enum valueWt::Dbo::FieldInfo
isForeignKey() const Wt::Dbo::FieldInfo
isIdField() const Wt::Dbo::FieldInfo
isMutable() const Wt::Dbo::FieldInfo
isNaturalIdField() const Wt::Dbo::FieldInfo
isSurrogateIdField() const Wt::Dbo::FieldInfo
isVersionField() const Wt::Dbo::FieldInfo
Mutable enum valueWt::Dbo::FieldInfo
name() const Wt::Dbo::FieldInfo
NaturalId enum valueWt::Dbo::FieldInfo
needsQuotes() const Wt::Dbo::FieldInfo
NeedsQuotes enum valueWt::Dbo::FieldInfo
qualifier() const Wt::Dbo::FieldInfo
setQualifier(const std::string &qualifier, bool firstQualified=false)Wt::Dbo::FieldInfo
sqlType() const Wt::Dbo::FieldInfo
SurrogateId enum valueWt::Dbo::FieldInfo
type() const Wt::Dbo::FieldInfo
Version enum valueWt::Dbo::FieldInfo
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo.html new file mode 100644 index 0000000..adab2d6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FieldInfo.html @@ -0,0 +1,198 @@ + + + + +Wt: Wt::Dbo::FieldInfo Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::FieldInfo Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Description of a field. +More...

+ +

#include <Wt/Dbo/SqlTraits>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Flags {
+  SurrogateId = 0x1, +NaturalId = 0x2, +Version = 0x4, +Mutable = 0x8, +
+  NeedsQuotes = 0x10, +ForeignKey = 0x20 +
+ }
 

Flags.

+ More...

+Public Member Functions

FieldInfo (const std::string &name, const std::type_info *type, const std::string &sqlType, int flags)
 Creates a field description.
FieldInfo (const std::string &name, const std::type_info *type, const std::string &sqlType, const std::string &foreignKeyTable, const std::string &foreignKeyName, int flags)
 Creates a field description.
+void setQualifier (const std::string &qualifier, bool firstQualified=false)
 Sets a qualifier for the field.
+const std::string & name () const
 Returns the field name.
+const std::string & sqlType () const
 Returns the field SQL type.
+const std::string & qualifier () const
 Returns the field qualifier.
+const std::type_info * type () const
 Returns the field type.
+bool isIdField () const
 Returns whether the field is an Id field.
+bool isNaturalIdField () const
 Returns whether the field is a Natural Id field.
+bool isSurrogateIdField () const
 Returns whether the field is a Surroaget Id field.
+bool isVersionField () const
 Returns whether the field is a Version field.
+bool isMutable () const
 Returns whether the field is mutable.
+bool needsQuotes () const
 Returns whether the field name needs to be quoted.
+bool isForeignKey () const
 Returns whether the field is part of a foreign key.
+

Detailed Description

+

Description of a field.

+
See also:
query_result_traits::getFields(), Query::fields()
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::Dbo::FieldInfo::Flags
+
+
+ +

Flags.

+
Enumerator:
+ + + + + + +
SurrogateId  +

Field is a surrogate id.

+
NaturalId  +

Field is (part of) a natural id.

+
Version  +

Field is an optimistic concurrency version field.

+
Mutable  +

Field can be edited.

+
NeedsQuotes  +

Field name needs quotes when using in SQL.

+
ForeignKey  +

Field is (part of) a foreign key.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool-members.html new file mode 100644 index 0000000..bc647d1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::FixedSqlConnectionPool Member List

+
+
+This is the complete list of members for Wt::Dbo::FixedSqlConnectionPool, including all inherited members. + + + + +
FixedSqlConnectionPool(SqlConnection *connection, int size)Wt::Dbo::FixedSqlConnectionPool
getConnection()Wt::Dbo::FixedSqlConnectionPool [virtual]
returnConnection(SqlConnection *)Wt::Dbo::FixedSqlConnectionPool [virtual]
~SqlConnectionPool()Wt::Dbo::SqlConnectionPool [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool.html new file mode 100644 index 0000000..5498e3b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool.html @@ -0,0 +1,194 @@ + + + + +Wt: Wt::Dbo::FixedSqlConnectionPool Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::FixedSqlConnectionPool Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A connection pool of fixed size. +More...

+ +

#include <Wt/Dbo/FixedSqlConnectionPool>

+
+Inheritance diagram for Wt::Dbo::FixedSqlConnectionPool:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

 FixedSqlConnectionPool (SqlConnection *connection, int size)
 Creates a fixed connection pool.
virtual SqlConnectiongetConnection ()
 Uses a connection from the pool.
virtual void returnConnection (SqlConnection *)
 Returns a connection to the pool.
+

Detailed Description

+

A connection pool of fixed size.

+

This provides a connection pool of fixed size: its size is determined at startup time, and the pool will not grow as more connections are needed.

+

This is adequate when the number of threads (which need different connections to work with) is also bounded, like when using a fixed size thread pool. This is for example the case when used in conjunction with Wt. Note that you do not need as many connections as sessions, since Session will only use a connection while processing a transaction.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::Dbo::FixedSqlConnectionPool::FixedSqlConnectionPool (SqlConnection connection,
int  size 
)
+
+
+ +

Creates a fixed connection pool.

+

The pool is initialized with the provided connection, which is cloned (size - 1) times.

+

The pool thus takes ownership of the given connection.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
SqlConnection * Wt::Dbo::FixedSqlConnectionPool::getConnection ( ) [virtual]
+
+
+ +

Uses a connection from the pool.

+

This returns a connection from the pool that can be used. If the pool has no more connection available, the pool may decide to grow or block until a connection is returned.

+

This method is called by a Session when a new transaction is started.

+ +

Implements Wt::Dbo::SqlConnectionPool.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Dbo::FixedSqlConnectionPool::returnConnection (SqlConnection ) [virtual]
+
+
+ +

Returns a connection to the pool.

+

This returns a connection to the pool. This method is called by a Session after a transaction has been finished.

+ +

Implements Wt::Dbo::SqlConnectionPool.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.map new file mode 100644 index 0000000..89494d3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.md5 new file mode 100644 index 0000000..63d5b7d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.md5 @@ -0,0 +1 @@ +a353f3bd2f5a5911946c48f2bd38777d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.png new file mode 100644 index 0000000..94d116b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1FixedSqlConnectionPool__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException-members.html new file mode 100644 index 0000000..5d6d324 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException-members.html @@ -0,0 +1,80 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::NoUniqueResultException Member List

+
+
+This is the complete list of members for Wt::Dbo::NoUniqueResultException, including all inherited members. + + +
Exception(const std::string &error)Wt::Dbo::Exception
NoUniqueResultException()Wt::Dbo::NoUniqueResultException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException.html new file mode 100644 index 0000000..a151f0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException.html @@ -0,0 +1,113 @@ + + + + +Wt: Wt::Dbo::NoUniqueResultException Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::NoUniqueResultException Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Exception thrown when a query unexpectedly finds a non-unique result. +More...

+ +

#include <Wt/Dbo/Exception>

+
+Inheritance diagram for Wt::Dbo::NoUniqueResultException:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

NoUniqueResultException ()
 Constructor.
+

Detailed Description

+

Exception thrown when a query unexpectedly finds a non-unique result.

+

This Exception is thrown by Query::resultValue() when the query has more than one result.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.map new file mode 100644 index 0000000..1789601 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.md5 new file mode 100644 index 0000000..b7bf1fb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.md5 @@ -0,0 +1 @@ +63c95384b9cb03cffabef6c9484b6c90 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.png new file mode 100644 index 0000000..324d001 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1NoUniqueResultException__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException-members.html new file mode 100644 index 0000000..bb77f36 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException-members.html @@ -0,0 +1,80 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::ObjectNotFoundException Member List

+
+
+This is the complete list of members for Wt::Dbo::ObjectNotFoundException, including all inherited members. + + +
Exception(const std::string &error)Wt::Dbo::Exception
ObjectNotFoundException(const std::string &id)Wt::Dbo::ObjectNotFoundException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException.html new file mode 100644 index 0000000..eda4a5c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException.html @@ -0,0 +1,113 @@ + + + + +Wt: Wt::Dbo::ObjectNotFoundException Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::ObjectNotFoundException Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Exception thrown when trying to load a non-existing object. +More...

+ +

#include <Wt/Dbo/Exception>

+
+Inheritance diagram for Wt::Dbo::ObjectNotFoundException:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

ObjectNotFoundException (const std::string &id)
 Constructor.
+

Detailed Description

+

Exception thrown when trying to load a non-existing object.

+

This Exception is thrown by Session::load() when trying to load an object that does not exist.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.map new file mode 100644 index 0000000..1789601 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.md5 new file mode 100644 index 0000000..6ad606d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.md5 @@ -0,0 +1 @@ +41899cd91d4fd1ad738c1ecac693adcc \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.png new file mode 100644 index 0000000..04dd308 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ObjectNotFoundException__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query-members.html new file mode 100644 index 0000000..6f4c0f4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query-members.html @@ -0,0 +1,93 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Query< Result, BindStrategy > Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query.html new file mode 100644 index 0000000..f035448 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Query.html @@ -0,0 +1,394 @@ + + + + +Wt: Wt::Dbo::Query< Result, BindStrategy > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Query< Result, BindStrategy > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A database query. +More...

+ +

#include <Wt/DboQuery>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Query ()
 Default constructor.
~Query ()
 Destructor.
Query (const Query &other)
 Copy constructor.
+Queryoperator= (const Query &other)
 Assignment operator.
+std::vector< FieldInfofields () const
 Returns the result fields.
template<typename T >
Query< Result, BindStrategy > & bind (const T &value)
 Binds a value to the next positional marker.
Result resultValue () const
 Returns a unique result value.
collection< Result > resultList () const
 Returns a result list.
 operator Result () const
 Returns a unique result value.
 operator collection< Result > () const
 Returns a result list.
Methods for composing a query (DynamicBinding only)
Query< Result, BindStrategy > & where (const std::string &condition)
 Adds a query condition.
Query< Result, BindStrategy > & orderBy (const std::string &fieldName)
 Sets the result order.
Query< Result, BindStrategy > & groupBy (const std::string &fields)
 Sets the grouping field(s).
Query< Result, BindStrategy > & offset (int count)
 Sets a result offset.
Query< Result, BindStrategy > & limit (int count)
 Sets a result limit.
+

Detailed Description

+

template<class Result, typename BindStrategy = DynamicBinding>
+ class Wt::Dbo::Query< Result, BindStrategy >

+ +

A database query.

+

The query fetches results of type Result from the database. This can be any type for which query_result_traits are properly implemented. The library provides these implementations for primitive values (see sql_value_traits), database objects (ptr) and boost::tuple.

+

Simple queries can be done using Session::find(), while more elaborate queries (with arbitrary result types) using Session::query().

+

You may insert positional holders for parameters (in the conditional where part) using '?', and bind these to actual values using bind().

+

The query result may be fetched using resultValue() or resultList().

+

Usage example:

+
 typedef Wt::Dbo::ptr<Account> AccountPtr;
+ typedef Wt::Dbo::collection<AccountPtr> Accounts;
+
+ Wt::Dbo::Query<AccountPtr> query = session.find<Account>().where("balance > ?").bind(100000);
+ Accounts accounts = query.resultList();
+
+ for (Accounts::const_iterator i = accounts.begin(); i != accounts.end(); ++i)
+   std::cerr << "Name: " << i->name << std::end;
+

The BindStrategy specifies how you want to bind parameters to your query (if any).

+

When using DynamicBinding (which is the default), parameter binding to an actual sql statement is deferred until the query is run. This has the advantage that you can compose the query definition using helper methods provided in the query object (where(), orderBy() and groupBy()), possibly intermixing this with parameter binding, and you can keep the query around and run the query multiple times, perhaps with different parameter values or to scroll through the query results.

+

When using DirectBinding, parameters are directly bound to an underlying sql statement. Therefore, the query must be specified entirely when created. Because of this reliance on an sql statement, it can be run only once (one call to resultValue() or resultList()) after which it should be discarded. You should not try to keep a query object around when using this parameter binding strategy (that will amost always not do what you would hope it to do).

+

Member Function Documentation

+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+
+template<typename T >
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::bind (const T &  value )
+
+
+ +

Binds a value to the next positional marker.

+

This binds the value to the next positional marker in the query condition.

+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::groupBy (const std::string &  fields )
+
+
+ +

Sets the grouping field(s).

+

Groups results based on unique values of the indicated field(s), which is a comma separated list of fields. Only fields on which you group and aggregate functions can be selected by a query.

+

A field that refers to a database object that is selected by the query is expanded to all the corresponding fields of that database object (as in the select statement).

+

This provides the group by part of an SQL query.

+
Note:
This method is not available when using a DirectBinding binding strategy.
+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::limit (int  count )
+
+
+ +

Sets a result limit.

+

Sets a result limit. This has the effect that the next resultList() call will return up to count results. Use -1 to indicate no limit.

+

This provides the (non standard) limit part of an SQL query.

+
See also:
offset()
+
Note:
This method is not available when using a DirectBinding binding strategy.
+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::offset (int  count )
+
+
+ +

Sets a result offset.

+

Sets a result offset. This has the effect that the next resultList() call will skip as many results as the offset indicates. Use -1 to indicate no offset.

+

This provides the (non standard) offset part of an SQL query.

+
See also:
limit()
+
Note:
This method is not available when using a DirectBinding binding strategy.
+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + +
Wt::Dbo::Query< Result, BindStrategy >::operator collection< Result > ( ) const
+
+
+ +

Returns a result list.

+

This is a convenience conversion operator that calls resultList().

+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + +
Wt::Dbo::Query< Result, BindStrategy >::operator Result ( ) const
+
+
+ +

Returns a unique result value.

+

This is a convenience conversion operator that calls resultValue().

+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::orderBy (const std::string &  fieldName )
+
+
+ +

Sets the result order.

+

Orders the results based on the given field name (or multiple names, comma-separated).

+

This provides the order by part of an SQL query.

+
Note:
This method is not available when using a DirectBinding binding strategy.
+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + +
collection< Result > Wt::Dbo::Query< Result, BindStrategy >::resultList ( ) const
+
+
+ +

Returns a result list.

+

This returns a collection which is backed by the underlying query. The query is not actually run until this collection is traversed or its size is asked.

+

When using a DynamicBinding bind strategy, after a result has been fetched, the query can no longer be used.

+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + +
Result Wt::Dbo::Query< Result, BindStrategy >::resultValue ( ) const
+
+
+ +

Returns a unique result value.

+

You can use this method if you are expecting the query to return at most one result. If the query returns more than one result a NoUniqueResultException is thrown.

+

When using a DynamicBinding bind strategy, after a result has been fetched, the query can no longer be used.

+ +
+
+ +
+
+
+template<class Result, typename BindStrategy = DynamicBinding>
+ + + + + + + + +
Query<Result, BindStrategy>& Wt::Dbo::Query< Result, BindStrategy >::where (const std::string &  condition )
+
+
+ +

Adds a query condition.

+

The condition must be a valid SQL condition expression.

+

Multiple conditions may be provided, which must each be fulfilled, and are concatenated together using 'and').

+

A condition may contain positional markers '?' to which values may be bound using bind().

+

This provides the where part of an SQL query.

+
Note:
This method is not available when using a DirectBinding binding strategy.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel-members.html new file mode 100644 index 0000000..4285a22 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel-members.html @@ -0,0 +1,176 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::QueryModel< Result > Member List

+
+
+This is the complete list of members for Wt::Dbo::QueryModel< Result >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addAllFieldsAsColumns()Wt::Dbo::QueryModel< Result >
addChild(WObject *child)Wt::WObject
addColumn(const std::string &field, const WString &header, WFlags< ItemFlag > flags=ItemIsSelectable)Wt::Dbo::QueryModel< Result >
addColumn(const std::string &field, WFlags< ItemFlag > flags=ItemIsSelectable)Wt::Dbo::QueryModel< Result >
addRow(Result &result)Wt::Dbo::QueryModel< Result > [protected, virtual]
batchSize() const Wt::Dbo::QueryModel< Result >
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::Dbo::QueryModel< Result > [virtual]
columnFlags(int column) const Wt::Dbo::QueryModel< Result >
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
createRow()Wt::Dbo::QueryModel< Result > [protected, virtual]
data(const WModelIndex &index, int role=DisplayRole) const Wt::Dbo::QueryModel< Result > [virtual]
Wt::WAbstractTableModel::data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
deleteRow(Result &result)Wt::Dbo::QueryModel< Result > [protected, virtual]
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
fieldInfo(int column)Wt::Dbo::QueryModel< Result >
fieldName(int column)Wt::Dbo::QueryModel< Result >
fields() const Wt::Dbo::QueryModel< Result >
flags(const WModelIndex &index) const Wt::Dbo::QueryModel< Result > [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::Dbo::QueryModel< Result > [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractTableModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::Dbo::QueryModel< Result > [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WAbstractTableModel [virtual]
Wt::WObject::parent() const Wt::WObject
query() const Wt::Dbo::QueryModel< Result >
QueryModel(WObject *parent=0)Wt::Dbo::QueryModel< Result >
reload()Wt::Dbo::QueryModel< Result >
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::Dbo::QueryModel< Result > [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resultRow(int row) const Wt::Dbo::QueryModel< Result >
resultRow(int row)Wt::Dbo::QueryModel< Result >
rowCount(const WModelIndex &parent=WModelIndex()) const Wt::Dbo::QueryModel< Result > [virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setBatchSize(int count)Wt::Dbo::QueryModel< Result >
setColumnFlags(int column, WFlags< ItemFlag > flags)Wt::Dbo::QueryModel< Result >
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::Dbo::QueryModel< Result > [virtual]
Wt::WAbstractTableModel::setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int column, Orientation orientation, const boost::any &value, int role=EditRole)Wt::Dbo::QueryModel< Result > [virtual]
Wt::WAbstractTableModel::setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
setQuery(const Query< Result > &query, bool keepColumns=false)Wt::Dbo::QueryModel< Result >
sort(int column, SortOrder order=AscendingOrder)Wt::Dbo::QueryModel< Result > [virtual]
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractTableModel(WObject *parent=0)Wt::WAbstractTableModel
WObject(WObject *parent=0)Wt::WObject
~WAbstractTableModel()Wt::WAbstractTableModel
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel.html new file mode 100644 index 0000000..59e5541 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel.html @@ -0,0 +1,966 @@ + + + + +Wt: Wt::Dbo::QueryModel< Result > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::QueryModel< Result > Class Template Reference
+ +[Database Objects (Dbo)Model/view system] +

+
+
+ +

A Wt MVC Model to view/edit query results. +More...

+ +

#include <Wt/Dbo/QueryModel>

+
+Inheritance diagram for Wt::Dbo::QueryModel< Result >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 QueryModel (WObject *parent=0)
 Creates a new query model.
void setQuery (const Query< Result > &query, bool keepColumns=false)
 Sets the query.
const Query< Result > & query () const
 Returns the query.
int addColumn (const std::string &field, const WString &header, WFlags< ItemFlag > flags=ItemIsSelectable)
 Adds a column.
int addColumn (const std::string &field, WFlags< ItemFlag > flags=ItemIsSelectable)
 Adds a column.
void setColumnFlags (int column, WFlags< ItemFlag > flags)
 Sets column item flags.
WFlags< ItemFlagcolumnFlags (int column) const
 Returns column item flags.
void addAllFieldsAsColumns ()
 Adds all the columns from the field list.
const Result & resultRow (int row) const
 Returns a result row.
Result & resultRow (int row)
 Returns a result row.
void reload ()
 Rereads the data from the database.
void setBatchSize (int count)
 Sets the batch size for fetching results.
int batchSize () const
 Returns the batch size for fetching results.
const std::vector< FieldInfo > & fields () const
 Returns the query field list.
+const FieldInfofieldInfo (int column)
 Returns the FieldInfo structure for a column.
+const std::string & fieldName (int column)
 Returns the field name for the a column.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
virtual WFlags< ItemFlagflags (const WModelIndex &index) const
 Returns the flags for an item.
virtual boost::any data (const WModelIndex &index, int role=DisplayRole) const
 Returns the data for an item.
virtual bool setData (const WModelIndex &index, const boost::any &value, int role=EditRole)
 Sets data at the given model index.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
virtual bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more rows.
virtual bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes one or more rows.
virtual bool setHeaderData (int column, Orientation orientation, const boost::any &value, int role=EditRole)
 Sets header data for a column.
virtual boost::any headerData (int section, Orientation orientation=Horizontal, int role=DisplayRole) const
 Returns header data.

+Protected Member Functions

virtual Result createRow ()
 Creates a new row.
virtual void addRow (Result &result)
 Adds a row to the session.
virtual void deleteRow (Result &result)
 Deletes a row from the session.
+

Detailed Description

+

template<class Result>
+ class Wt::Dbo::QueryModel< Result >

+ +

A Wt MVC Model to view/edit query results.

+

The model fetches results from the query and presents the data in a table. It supports sorting the underlying SQL query using Query::orderBy().

+

The default implementation of data() converts Query results to model data using query_result_traits<Result>::getValues(). You may define your own data presentation using the underlying Result by specializing data() and accessing data from resultRow().

+

You may selectively add fields that you want to display using addColumn(), or you can also add all columns based on the query using addAllFieldsAsColumns().

+

The model supports editing of the underlying data (even if the underlying query fetches results from multiple tables!). Values in columns that correspond to fields that have been mapped (and are writable) in a Database Object can be edited. The default implementation of setData() uses query_result_traits<Result>::setValue() to manipulate the database object, and thus uses the same write-behind properties as ptr<C>::modify(). To customize editing, you can specialize setData() and use resultRow() to modify the result object directly.

+

The model supports also inserting rows (only at the end), and removing rows, which are reflected in object additions and removals from the Session.

+

Editing is directly to the underlying database objects (change, insert and remove). Note that these changes will be flushed to the database whenever a transaction is committed, or before a query is run. The model will not explicitly create a transaction for the modification, but since the model uses a query for reading data, the change may be committed to the database depending on how the model is loading data. Still, this implies that usually inserting a row and setting its data happens within a single SQL "insert" statement.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class Result >
+ + + + + + + + +
Wt::Dbo::QueryModel< Result >::QueryModel (WObject parent = 0 )
+
+
+ +

Creates a new query model.

+

You need to seed the model with a query using setQuery().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class Result >
+ + + + + + + +
void Wt::Dbo::QueryModel< Result >::addAllFieldsAsColumns ( )
+
+
+ +

Adds all the columns from the field list.

+

All fields are added as columns. Fields that are mutable are marked as editable columns.

+

This is a convenient alternative to selectively adding columns using addColumn().

+
See also:
fields()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
int Wt::Dbo::QueryModel< Result >::addColumn (const std::string &  field,
const WString header,
WFlags< ItemFlag flags = ItemIsSelectable 
)
+
+
+ +

Adds a column.

+

The field name may be a qualified or unqualified field name. The list of available fields can be inspected using fields().

+

The header is used as Wt::DisplayRole for the column header data.

+

For the column items, flags() will returned the given flags. For example, to indicate that a field is editable, you can set the Wt::ItemIsEditable flag.

+
See also:
fields()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + +
int Wt::Dbo::QueryModel< Result >::addColumn (const std::string &  field,
WFlags< ItemFlag flags = ItemIsSelectable 
)
+
+
+ +

Adds a column.

+

This is an overloaded function for convenience, which uses the field name as the header value.

+
See also:
setHeaderData()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
void Wt::Dbo::QueryModel< Result >::addRow (Result &  result ) [protected, virtual]
+
+
+ +

Adds a row to the session.

+

This method is called from within insertRows() to add (and save) a new result row to the Dbo session.

+

The default implementation uses query_result_traits<Result>::add().

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + +
int Wt::Dbo::QueryModel< Result >::batchSize ( ) const
+
+
+ +

Returns the batch size for fetching results.

+
See also:
setBatchSize()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
int Wt::Dbo::QueryModel< Result >::columnCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of columns.

+

Returns the number of columns that have been added using addColumn() or addAllFieldsAsColumns().

+

Since the query model implements a flat table model, this returns 0 when parent is valid.

+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
WFlags< ItemFlag > Wt::Dbo::QueryModel< Result >::columnFlags (int  column ) const
+
+
+ +

Returns column item flags.

+
See also:
setColumnFlags()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + +
Result Wt::Dbo::QueryModel< Result >::createRow ( ) [protected, virtual]
+
+
+ +

Creates a new row.

+

This method is called from within insertRows() to create a new row.

+

The default implementation uses query_result_traits<Result>::create().

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + +
boost::any Wt::Dbo::QueryModel< Result >::data (const WModelIndex index,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns the data for an item.

+

Returns data of type Wt::DisplayRole or Wt::EditRole based on the field value corresponding to the index. If necessary, this fetches a batch of results from the underlying database.

+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
void Wt::Dbo::QueryModel< Result >::deleteRow (Result &  result ) [protected, virtual]
+
+
+ +

Deletes a row from the session.

+

This method is called from within removeRows() to remove (and delete) a new result row from the Dbo session.

+

The default implementation uses query_result_traits<Result>::remove().

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + +
const std::vector< FieldInfo > & Wt::Dbo::QueryModel< Result >::fields ( ) const
+
+
+ +

Returns the query field list.

+

This returns the field list from the underlying query.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
WFlags< ItemFlag > Wt::Dbo::QueryModel< Result >::flags (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the flags for an item.

+

Returns the flags set for the column using setColumnFlags().

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::Dbo::QueryModel< Result >::headerData (int  section,
Orientation  orientation = Horizontal,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns header data.

+
See also:
setHeaderData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::Dbo::QueryModel< Result >::insertRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more rows.

+

Row insertions are only supported at the end (row == rowCount()). For each added row, a new result is added to the underlying database.

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + +
const Query<Result>& Wt::Dbo::QueryModel< Result >::query ( ) const
+
+
+ +

Returns the query.

+
See also:
setQuery()
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + +
void Wt::Dbo::QueryModel< Result >::reload ( )
+
+
+ +

Rereads the data from the database.

+

This invalidates the current (cached) data and informs views that they should rerender.

+

The model keeps the following data cached:

+ + +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::Dbo::QueryModel< Result >::removeRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes one or more rows.

+

For each removed row, the result is removed from the underlying database.

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
const Result & Wt::Dbo::QueryModel< Result >::resultRow (int  row ) const
+
+
+ +

Returns a result row.

+

This returns the result corresponding to a particular row, and could be used to customize the model behaviour, e.g. by specializing data() for certain columns.

+

Returns a const reference to an entry in the result cache.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
Result & Wt::Dbo::QueryModel< Result >::resultRow (int  row )
+
+
+ +

Returns a result row.

+

This returns the result corresponding to a particular row, and could be used to customize the model behaviour, e.g. by specializing setData() for certain columns.

+

Returns a reference to an entry in the result cache.

+
See also:
resultRow(int row) const
+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
int Wt::Dbo::QueryModel< Result >::rowCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of rows.

+

Returns the number of rows return from the underlying query.

+

Since the query model implements a flat table model, this returns 0 when parent is valid.

+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + +
void Wt::Dbo::QueryModel< Result >::setBatchSize (int  count )
+
+
+ +

Sets the batch size for fetching results.

+

The model fetches results from the query in batch, and caches these in memory to avoid repetitive querying of the database.

+

The default batch size is 40.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::QueryModel< Result >::setColumnFlags (int  column,
WFlags< ItemFlag flags 
)
+
+
+ +

Sets column item flags.

+

For items in column column, flags() will returned the given flags. For example, to indicate that a field is editable, you can set the Wt::ItemIsEditable flag.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::Dbo::QueryModel< Result >::setData (const WModelIndex index,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets data at the given model index.

+

If role = Wt::EditRole, sets the value for the field corresponding to the index. All other editing is ignored.

+
See also:
setCachedResult()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::Dbo::QueryModel< Result >::setHeaderData (int  column,
Orientation  orientation,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets header data for a column.

+

The model will return this data in headerData(). Only column headers are supported (orientation == Wt::Horizontal).

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::QueryModel< Result >::setQuery (const Query< Result > &  query,
bool  keepColumns = false 
)
+
+
+ +

Sets the query.

+

The query is used to query the database.

+

Unless keepColumns is true, this resets the column list, so you will need to (re-)add one or more columns using addColumn().

+

When keeping the current columns, a LayoutChange rather than a Reset is emitted by the model, allowing views to keep their column geometry as well.

+ +
+
+ +
+
+
+template<class Result >
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::QueryModel< Result >::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

This sorts the model by changing the query using Query<BindStrategy>::orderBy().

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.map new file mode 100644 index 0000000..46d2330 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.md5 new file mode 100644 index 0000000..67a58e9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.md5 @@ -0,0 +1 @@ +290714c231890903412ee7fad63f46ef \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.png new file mode 100644 index 0000000..c37ad25 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1QueryModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session-members.html new file mode 100644 index 0000000..39976b4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session-members.html @@ -0,0 +1,94 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Session Member List

+
+
+This is the complete list of members for Wt::Dbo::Session, including all inherited members. + + + + + + + + + + + + + + + + +
add(ptr< C > &ptr)Wt::Dbo::Session
add(C *obj)Wt::Dbo::Session
createTables()Wt::Dbo::Session
dropTables()Wt::Dbo::Session
execute(const std::string &sql)Wt::Dbo::Session
find(const std::string &condition=std::string())Wt::Dbo::Session
flush()Wt::Dbo::Session
load(const typename dbo_traits< C >::IdType &id)Wt::Dbo::Session
mapClass(const char *tableName)Wt::Dbo::Session
query(const std::string &sql)Wt::Dbo::Session
rereadAll()Wt::Dbo::Session
Session()Wt::Dbo::Session
setConnection(SqlConnection &connection)Wt::Dbo::Session
setConnectionPool(SqlConnectionPool &pool)Wt::Dbo::Session
tableName() const Wt::Dbo::Session
~Session()Wt::Dbo::Session
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session.html new file mode 100644 index 0000000..e4aab20 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Session.html @@ -0,0 +1,500 @@ + + + + +Wt: Wt::Dbo::Session Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Session Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A database session. +More...

+ +

#include <Wt/Dbo/Session>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Session ()
 Creates a database session.
 ~Session ()
 Destructor.
void setConnection (SqlConnection &connection)
 Sets a dedicated connection.
void setConnectionPool (SqlConnectionPool &pool)
 Sets a connection pool.
template<class C >
void mapClass (const char *tableName)
 Maps a class to a database table.
template<class C >
const char * tableName () const
 Returns the mapped table name for a class.
template<class C >
ptr< C > add (ptr< C > &ptr)
 Persists a transient object.
template<class C >
ptr< C > add (C *obj)
 Persists a transient object.
template<class C >
ptr< C > load (const typename dbo_traits< C >::IdType &id)
 Loads a persisted object.
template<class C , typename BindStrategy = DynamicBinding>
Query< ptr< C >, BindStrategy > find (const std::string &condition=std::string())
 Finds database objects.
template<class Result , typename BindStrategy = DynamicBinding>
Query< Result, BindStrategy > query (const std::string &sql)
 Creates a query.
Call execute (const std::string &sql)
 Executs an Sql command.
void createTables ()
 Creates the database schema.
void dropTables ()
 Drops the database schema.
void flush ()
 Flushes the session.
void rereadAll ()
 Rereads all objects.
+

Detailed Description

+

A database session.

+

A database session manages meta data about the mapping of C++ classes to database tables, and keeps track of a working set of in-memory objects (objects which are referenced from your code or from within a transaction).

+

It also manages an active transaction, which you need to access database objects.

+

You can provide the session with a dedicated database connection using setConnection(), or with a connection pool (from which it will take a connection while processing a transaction) using setConnectionPool(). In either case, the session does not take ownership of the connection or connection pool.

+

A session will typically be a long-lived object in your application.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::Dbo::Session::~Session ( )
+
+
+ +

Destructor.

+

A session must survive all database objects that have been loaded through it, and will warning during this destructor if there are still database objects that are being referenced from a ptr.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class C >
+ + + + + + + + +
ptr< C > Wt::Dbo::Session::add (ptr< C > &  ptr )
+
+
+ +

Persists a transient object.

+

The transient object pointed to by ptr is added to the session, and will be persisted when the session is flushed.

+

A transient object is usually a newly created object which want to add to the database.

+

The method returns ptr.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
ptr< C > Wt::Dbo::Session::add (C *  obj )
+
+
+ +

Persists a transient object.

+

This is an overloaded method for convenience, and is implemented as:

+
 return add(ptr<C>(obj));
+

The method returns a database pointer to the object.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::Session::createTables ( )
+
+
+ +

Creates the database schema.

+

This will create the database schema of the mapped tables. Schema creation will fail if one or more tables already existed.

+
See also:
mapClass(), dropTables()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::Session::dropTables ( )
+
+
+ +

Drops the database schema.

+

This will drop the database schema. Dropping the schema will fail if one or more tables did not exist.

+
See also:
createTables()
+ +
+
+ +
+
+ + + + + + + + +
Call Wt::Dbo::Session::execute (const std::string &  sql )
+
+
+ +

Executs an Sql command.

+

This executs an Sql command. It differs from query() in that no result is expected from the call.

+

Usage example:

+
 session.execute("update user set name = ? where name = ?").bind("Bart").bind("Sarah");
+
+
+
+ +
+
+
+template<class C , typename BindStrategy >
+ + + + + + + + +
Query< ptr< C >, BindStrategy > Wt::Dbo::Session::find (const std::string &  condition = std::string() )
+
+
+ +

Finds database objects.

+

This method creates a query for finding objects of type C.

+

When passing an empty condition parameter, it will return all objects of type C. Otherwise, it will add the condition, by generating an SQL where clause.

+

The BindStrategy specifies how you want to bind parameters to your query (if any).

+

When using DynamicBinding (which is the default), you will defer the binding until the query is run. This has the advantage that you can compose the query definition using helper methods provided in the query object, you can keep the query around and run the query multiple times, perhaps with different parameter values or to scroll through the query results.

+

When using DirectBinding, the query must be specified entirely using the condition, and can be run only once. This method does have the benefit of binding parameters directly to the underlying prepared statement.

+

This method is convenient when you are querying only results from a single table. For more generic query support, see query().

+

Usage example:

+
 // Bart is missing, let's find him.
+ Wt::Dbo::ptr<User> bart = session.find<User>().where("name = ?").bind("Bart");
+
+ // Find all users, order by name
+ typedef Wt::Dbo::collection< Wt::Dbo::ptr<User> > Users;
+ Users users = session.find<User>().orderBy("name");
+
See also:
query()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::Session::flush ( )
+
+
+ +

Flushes the session.

+

This flushes all modified objects to the database. This does not commit the transaction.

+

Normally, you need not to call this method as the session is flushed automatically before committing a transaction, or before running a query (to be sure to take into account pending modifications).

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
ptr< C > Wt::Dbo::Session::load (const typename dbo_traits< C >::IdType &  id )
+
+
+ +

Loads a persisted object.

+

This method returns a database object with the given object id. If the object was already loaded in the session, the loaded object is returned, otherwise the object is loaded from the database.

+

Throws an ObjectNotFoundException when the object was not found.

+
See also:
ptr::id()
+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
void Wt::Dbo::Session::mapClass (const char *  tableName )
+
+
+ +

Maps a class to a database table.

+

The class C is mapped to table with name tableName. You need to map classes to tables.

+

You may provide a schema-qualified table name, if the underlying database supports this, eg. "myschema.users".

+ +
+
+ +
+
+
+template<class Result , typename BindStrategy >
+ + + + + + + + +
Query< Result, BindStrategy > Wt::Dbo::Session::query (const std::string &  sql )
+
+
+ +

Creates a query.

+

The sql statement should be a complete SQL statement, starting with a "select ". The items listed in the "select" must match the Result type. An item that corresponds to a database object (ptr) is substituted with the selection of all the fields in the dbo.

+

For example, the following query (class User is mapped onto table 'user'):

+
 session.query< ptr<User> >("select u from user u").where("u.name = ?").bind("Bart");
+

is the more general version of:

+
 session.find<User>().where("name = ?").bind("Bart");
+

Note that "u" in this query will be expanded to select the fields of the user table (u.id, u.version, u.name, ...). The same expansion happens when using an alias in Query::groupBy().

+

The additional flexibility offered by query() over find() is however that it may support other result types.

+

Thus, it may return plain values:

+
 session.query<int>("select count(1) from ...");
+

Or Boost.Tuple for an arbitrary combination of result values:

+
 session.query< boost::tuple<int, int> >("select A.id, B.id from table_a A, table_b B").where("...");
+

A tuple may combine any kind of object that is supported as a result, including database objects (see also ptr_tuple):

+
 session.query< boost::tuple<ptr<A>, ptr<B> >("select A, B from table_a A, table_b B").where("...");
+

The BindStrategy specifies how you want to bind parameters to your query (if any).

+

When using DynamicBinding (which is the default), you will defer the binding until the query is run. This has the advantage that you can compose the query using helper methods provided in the Query object, you can keep the query around and run the query multiple times, perhaps with different parameter values or to scroll through the query results.

+

When using DirectBinding, the query must be specified entirely using the sql, and can be run only once. This method does have the benefit of binding parameters directly to the underlying prepared statement.

+

This method uses query_result_traits to unmarshal the query result into the Result type.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::Session::rereadAll ( )
+
+
+ +

Rereads all objects.

+

This rereads all objects from the database, possibly discarding unflushed modifications. This is a catch-all solution for a StaleObjectException.

+
See also:
ptr::reread()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Dbo::Session::setConnection (SqlConnection connection )
+
+
+ +

Sets a dedicated connection.

+

The connection will be used exclusively by this session.

+
See also:
setConnectionPool()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Dbo::Session::setConnectionPool (SqlConnectionPool pool )
+
+
+ +

Sets a connection pool.

+

The connection pool is typically shared with other sessions.

+
See also:
setConnection()
+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
const char * Wt::Dbo::Session::tableName ( ) const
+
+
+ +

Returns the mapped table name for a class.

+
See also:
mapClass()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection-members.html new file mode 100644 index 0000000..b2fa491 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection-members.html @@ -0,0 +1,94 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::SqlConnection Member List

+
+
+This is the complete list of members for Wt::Dbo::SqlConnection, including all inherited members. + + + + + + + + + + + + + + + + +
autoincrementInsertSuffix() const =0Wt::Dbo::SqlConnection [pure virtual]
autoincrementSql() const =0Wt::Dbo::SqlConnection [pure virtual]
autoincrementType() const =0Wt::Dbo::SqlConnection [pure virtual]
blobType() const =0Wt::Dbo::SqlConnection [pure virtual]
clone() const =0Wt::Dbo::SqlConnection [pure virtual]
commitTransaction()=0Wt::Dbo::SqlConnection [pure virtual]
dateTimeType(SqlDateTimeType type) const =0Wt::Dbo::SqlConnection [pure virtual]
executeSql(const std::string &sql)Wt::Dbo::SqlConnection [virtual]
getStatement(const std::string &id) const Wt::Dbo::SqlConnection [virtual]
prepareStatement(const std::string &sql)=0Wt::Dbo::SqlConnection [pure virtual]
property(const std::string &name) const Wt::Dbo::SqlConnection
rollbackTransaction()=0Wt::Dbo::SqlConnection [pure virtual]
saveStatement(const std::string &id, SqlStatement *statement)Wt::Dbo::SqlConnection [virtual]
setProperty(const std::string &name, const std::string &value)Wt::Dbo::SqlConnection
startTransaction()=0Wt::Dbo::SqlConnection [pure virtual]
~SqlConnection()Wt::Dbo::SqlConnection [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection.html new file mode 100644 index 0000000..099c804 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection.html @@ -0,0 +1,486 @@ + + + + +Wt: Wt::Dbo::SqlConnection Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::SqlConnection Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Abstract base class for an SQL connection. +More...

+ +

#include <Wt/Dbo/SqlConnection>

+
+Inheritance diagram for Wt::Dbo::SqlConnection:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~SqlConnection ()
 Destructor.
virtual SqlConnectionclone () const =0
 Clones the connection.
virtual void executeSql (const std::string &sql)
 Executes an SQL statement.
virtual void startTransaction ()=0
 Starts a transaction.
virtual void commitTransaction ()=0
 Commits a transaction.
virtual void rollbackTransaction ()=0
 Rolls back a transaction.
virtual SqlStatementgetStatement (const std::string &id) const
 Returns the statement with the given id.
virtual void saveStatement (const std::string &id, SqlStatement *statement)
 Saves a statement with the given id.
virtual SqlStatementprepareStatement (const std::string &sql)=0
 Prepares a statement.
void setProperty (const std::string &name, const std::string &value)
 Sets a property.
std::string property (const std::string &name) const
 Returns a property.
Methods that return dialect information
virtual std::string autoincrementSql () const =0
 Returns the 'autoincrement' SQL type modifier.
virtual std::string autoincrementType () const =0
 Returns the 'autoincrement' SQL type.
virtual std::string autoincrementInsertSuffix () const =0
 Returns the suffix for an 'autoincrement' insert statement.
virtual const char * dateTimeType (SqlDateTimeType type) const =0
 Returns the date/time type.
virtual const char * blobType () const =0
 Returns the blob type.
+

Detailed Description

+

Abstract base class for an SQL connection.

+

An sql connection manages a single connection to a database. It also manages a map of previously prepared statements indexed by id's.

+

This class is part of Wt::Dbo's backend API, and should not be used directly.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual std::string Wt::Dbo::SqlConnection::autoincrementInsertSuffix ( ) const [pure virtual]
+
+
+ +

Returns the suffix for an 'autoincrement' insert statement.

+

This is appended to the insert statement, since some back-ends need to be indicated that they should return the autoincrement id.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Wt::Dbo::SqlConnection::autoincrementSql ( ) const [pure virtual]
+
+
+ +

Returns the 'autoincrement' SQL type modifier.

+

This is used by Session::createTables() to create the id column.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Wt::Dbo::SqlConnection::autoincrementType ( ) const [pure virtual]
+
+
+ +

Returns the 'autoincrement' SQL type.

+

This is used by Session::createTables() to create the id column.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + +
virtual const char* Wt::Dbo::SqlConnection::blobType ( ) const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual SqlConnection* Wt::Dbo::SqlConnection::clone ( ) const [pure virtual]
+
+
+ +

Clones the connection.

+

Returns a new connection object that is configured like this object. This is used by connection pool implementations to create its connections.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::Dbo::SqlConnection::commitTransaction ( ) [pure virtual]
+
+
+ +

Commits a transaction.

+

This function commits a transaction.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + + +
virtual const char* Wt::Dbo::SqlConnection::dateTimeType (SqlDateTimeType  type ) const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
void Wt::Dbo::SqlConnection::executeSql (const std::string &  sql ) [virtual]
+
+
+ +

Executes an SQL statement.

+

This is a convenience method for preparing a statement, executing it, and deleting it.

+ +

Reimplemented in Wt::Dbo::backend::Postgres.

+ +
+
+ +
+
+ + + + + + + + +
SqlStatement * Wt::Dbo::SqlConnection::getStatement (const std::string &  id ) const [virtual]
+
+
+ +

Returns the statement with the given id.

+

Returns 0 if no such statement was already added.

+
See also:
saveStatement()
+ +
+
+ +
+
+ + + + + + + + +
virtual SqlStatement* Wt::Dbo::SqlConnection::prepareStatement (const std::string &  sql ) [pure virtual]
+
+
+ +

Prepares a statement.

+

Returns the prepared statement.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::Dbo::SqlConnection::property (const std::string &  name ) const
+
+
+ +

Returns a property.

+

Returns the property value, or an empty string if the property was not set.

+
See also:
setProperty()
+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::Dbo::SqlConnection::rollbackTransaction ( ) [pure virtual]
+
+
+ +

Rolls back a transaction.

+

This function rolls back a transaction.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::SqlConnection::saveStatement (const std::string &  id,
SqlStatement statement 
) [virtual]
+
+
+ +

Saves a statement with the given id.

+

Saves the statement for future reuse using getStatement()

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::SqlConnection::setProperty (const std::string &  name,
const std::string &  value 
)
+
+
+ +

Sets a property.

+

Properties may tailor the backend behavior. Some properties are applicable to all backends, while some are backend specific.

+

General properties are:

+
    +
  • show-queries: when value is "true", queries are shown as they are executed.
  • +
+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::Dbo::SqlConnection::startTransaction ( ) [pure virtual]
+
+
+ +

Starts a transaction.

+

This function starts a transaction.

+ +

Implemented in Wt::Dbo::backend::Postgres, and Wt::Dbo::backend::Sqlite3.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool-members.html new file mode 100644 index 0000000..50074da --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::SqlConnectionPool Member List

+
+
+This is the complete list of members for Wt::Dbo::SqlConnectionPool, including all inherited members. + + + +
getConnection()=0Wt::Dbo::SqlConnectionPool [pure virtual]
returnConnection(SqlConnection *)=0Wt::Dbo::SqlConnectionPool [pure virtual]
~SqlConnectionPool()Wt::Dbo::SqlConnectionPool [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool.html new file mode 100644 index 0000000..ec982ef --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool.html @@ -0,0 +1,162 @@ + + + + +Wt: Wt::Dbo::SqlConnectionPool Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::SqlConnectionPool Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Abstract base class for a SQL connection pool. +More...

+ +

#include <Wt/Dbo/SqlConnectionPool>

+
+Inheritance diagram for Wt::Dbo::SqlConnectionPool:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

+virtual ~SqlConnectionPool ()
 Destructor.
virtual SqlConnectiongetConnection ()=0
 Uses a connection from the pool.
virtual void returnConnection (SqlConnection *)=0
 Returns a connection to the pool.
+

Detailed Description

+

Abstract base class for a SQL connection pool.

+

An sql connection pool manages a pool of connections. It is shared between multiple sessions to allow these sessions to use a connection while handling a transaction. Note that a session only needs a connection while in-transaction, and thus you only need as much connections as the number of concurrent transactions.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual SqlConnection* Wt::Dbo::SqlConnectionPool::getConnection ( ) [pure virtual]
+
+
+ +

Uses a connection from the pool.

+

This returns a connection from the pool that can be used. If the pool has no more connection available, the pool may decide to grow or block until a connection is returned.

+

This method is called by a Session when a new transaction is started.

+ +

Implemented in Wt::Dbo::FixedSqlConnectionPool.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::Dbo::SqlConnectionPool::returnConnection (SqlConnection ) [pure virtual]
+
+
+ +

Returns a connection to the pool.

+

This returns a connection to the pool. This method is called by a Session after a transaction has been finished.

+ +

Implemented in Wt::Dbo::FixedSqlConnectionPool.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.map new file mode 100644 index 0000000..595d4c0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.md5 new file mode 100644 index 0000000..c1b0387 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.md5 @@ -0,0 +1 @@ +18f8ca1fec6ee408c46efc1ea9adce5b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.png new file mode 100644 index 0000000..1b41645 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnectionPool__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.map new file mode 100644 index 0000000..86520c6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.md5 new file mode 100644 index 0000000..ebcbb61 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.md5 @@ -0,0 +1 @@ +4defd05160fe460f9cd2c48a6a8c4408 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.png new file mode 100644 index 0000000..2ab5de5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlConnection__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement-members.html new file mode 100644 index 0000000..6457508 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement-members.html @@ -0,0 +1,106 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::SqlStatement Member List

+
+
+This is the complete list of members for Wt::Dbo::SqlStatement, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
affectedRowCount()=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, const std::string &value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, short value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, int value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, long long value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, float value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, double value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, const boost::posix_time::ptime &value, SqlDateTimeType type)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, const boost::posix_time::time_duration &value)=0Wt::Dbo::SqlStatement [pure virtual]
bind(int column, const std::vector< unsigned char > &value)=0Wt::Dbo::SqlStatement [pure virtual]
bindNull(int column)=0Wt::Dbo::SqlStatement [pure virtual]
done()Wt::Dbo::SqlStatement
execute()=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, std::string *value, int size)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, short *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, int *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, long long *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, float *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, double *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, boost::posix_time::ptime *value, SqlDateTimeType type)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, boost::posix_time::time_duration *value)=0Wt::Dbo::SqlStatement [pure virtual]
getResult(int column, std::vector< unsigned char > *value, int size)=0Wt::Dbo::SqlStatement [pure virtual]
insertedId()=0Wt::Dbo::SqlStatement [pure virtual]
nextRow()=0Wt::Dbo::SqlStatement [pure virtual]
reset()=0Wt::Dbo::SqlStatement [pure virtual]
sql() const =0Wt::Dbo::SqlStatement [pure virtual]
use()Wt::Dbo::SqlStatement
~SqlStatement()Wt::Dbo::SqlStatement [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement.html new file mode 100644 index 0000000..0fadd20 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1SqlStatement.html @@ -0,0 +1,542 @@ + + + + +Wt: Wt::Dbo::SqlStatement Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::SqlStatement Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Abstract base class for a prepared SQL statement. +More...

+ +

Inherited by Wt::Dbo::backend::PostgresStatement, and Wt::Dbo::backend::Sqlite3Statement.

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~SqlStatement ()
 Destructor.
bool use ()
 Uses the statement.
void done ()
 Finish statement use.
+virtual void reset ()=0
 Resets the statement.
+virtual void bind (int column, const std::string &value)=0
 Binds a value to a column.
+virtual void bind (int column, short value)=0
 Binds a value to a column.
+virtual void bind (int column, int value)=0
 Binds a value to a column.
+virtual void bind (int column, long long value)=0
 Binds a value to a column.
+virtual void bind (int column, float value)=0
 Binds a value to a column.
+virtual void bind (int column, double value)=0
 Binds a value to a column.
+virtual void bind (int column, const boost::posix_time::ptime &value, SqlDateTimeType type)=0
 Binds a value to a column.
+virtual void bind (int column, const boost::posix_time::time_duration &value)=0
 Binds a value to a column.
+virtual void bind (int column, const std::vector< unsigned char > &value)=0
 Binds a value to a column.
+virtual void bindNull (int column)=0
 Binds null to a column.
+virtual void execute ()=0
 Executes the statement.
+virtual long long insertedId ()=0
 Returns the id if the statement was an SQL insert.
virtual int affectedRowCount ()=0
 Returns the affected number of rows.
virtual bool nextRow ()=0
 Fetches the next result row.
virtual bool getResult (int column, std::string *value, int size)=0
 Fetches a result value.
virtual bool getResult (int column, short *value)=0
 Fetches a result value.
virtual bool getResult (int column, int *value)=0
 Fetches a result value.
virtual bool getResult (int column, long long *value)=0
 Fetches a result value.
virtual bool getResult (int column, float *value)=0
 Fetches a result value.
virtual bool getResult (int column, double *value)=0
 Fetches a result value.
virtual bool getResult (int column, boost::posix_time::ptime *value, SqlDateTimeType type)=0
 Fetches a result value.
virtual bool getResult (int column, boost::posix_time::time_duration *value)=0
 Fetches a result value.
virtual bool getResult (int column, std::vector< unsigned char > *value, int size)=0
 Fetches a result value.
+virtual std::string sql () const =0
 Returns the prepared SQL string.
+

Detailed Description

+

Abstract base class for a prepared SQL statement.

+

The statement may be used multiple times, but cannot be used concurrently. It also cannot be copied.

+

This class is part of Wt::Dbo's backend API, and should not be used directly. Its interface must be reimplemented for each backend corresponding to a supported database.

+
See also:
SqlConnection
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual int Wt::Dbo::SqlStatement::affectedRowCount ( ) [pure virtual]
+
+
+ +

Returns the affected number of rows.

+

This is only useful for an SQL update or delete statement.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::SqlStatement::done ( )
+
+
+ +

Finish statement use.

+

Marks the statement as no longer used and resets the statement.

+
See also:
use()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
boost::posix_time::time_duration *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
std::vector< unsigned char > *  value,
int  size 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
long long *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
double *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
int *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
float *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
short *  value 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
boost::posix_time::ptime *  value,
SqlDateTimeType  type 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool Wt::Dbo::SqlStatement::getResult (int  column,
std::string *  value,
int  size 
) [pure virtual]
+
+
+ +

Fetches a result value.

+

Returns true when the value was not null.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::Dbo::SqlStatement::nextRow ( ) [pure virtual]
+
+
+ +

Fetches the next result row.

+

Returns true if there was one more row to be fetched.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::Dbo::SqlStatement::use ( )
+
+
+ +

Uses the statement.

+

Marks the statement as in-use. If the statement is already in use, return false. In that case, we will later provision that a statement can be cloned and that a list of equivalent statement is kept in the statement cache of a connectin.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException-members.html new file mode 100644 index 0000000..a82dda9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException-members.html @@ -0,0 +1,80 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::StaleObjectException Member List

+
+
+This is the complete list of members for Wt::Dbo::StaleObjectException, including all inherited members. + + +
Exception(const std::string &error)Wt::Dbo::Exception
StaleObjectException(const std::string &id, int version)Wt::Dbo::StaleObjectException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException.html new file mode 100644 index 0000000..73fb5ce --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException.html @@ -0,0 +1,115 @@ + + + + +Wt: Wt::Dbo::StaleObjectException Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::StaleObjectException Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Exception thrown when Wt::Dbo detects a concurrent modification +More...

+ +

#include <Wt/Dbo/Exception>

+
+Inheritance diagram for Wt::Dbo::StaleObjectException:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

StaleObjectException (const std::string &id, int version)
 Constructor.
+

Detailed Description

+

Exception thrown when Wt::Dbo detects a concurrent modification

+

Wt::Dbo uses optimistic locking for detecting and preventing concurrent modification of database objects. When trying to save an object that has been modified concurrently by another session, since it was read from the database, this exception is thrown.

+

This exception is thrown during flushing from Session::flush() or ptr::flush(). Since flushing will also be done automatically when needed (e.g. before running a query or before committing a transaction), you should be prepared to catch this exception from most library API calls.

+
Note:
We should perhaps also have a ptr::isStale() method to find out what database object is stale ?
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.map new file mode 100644 index 0000000..a2d6540 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.md5 new file mode 100644 index 0000000..329144a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.md5 @@ -0,0 +1 @@ +b0fe15679455e619af57fb4d591acdc6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.png new file mode 100644 index 0000000..8dd2e44 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1StaleObjectException__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction-members.html new file mode 100644 index 0000000..f91cfe4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction-members.html @@ -0,0 +1,83 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::Transaction Member List

+
+
+This is the complete list of members for Wt::Dbo::Transaction, including all inherited members. + + + + + +
commit()Wt::Dbo::Transaction
isActive() const Wt::Dbo::Transaction
rollback()Wt::Dbo::Transaction
Transaction(Session &session)Wt::Dbo::Transaction [explicit]
~Transaction()Wt::Dbo::Transaction
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction.html new file mode 100644 index 0000000..254f055 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1Transaction.html @@ -0,0 +1,227 @@ + + + + +Wt: Wt::Dbo::Transaction Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::Transaction Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A database transaction. +More...

+ +

#include <Wt/Dbo/Transaction>

+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

 Transaction (Session &session)
 Constructor.
 ~Transaction ()
 Destructor.
bool isActive () const
 Returns whether the transaction is still active.
bool commit ()
 Commits the transaction.
void rollback ()
 Rolls back the transaction.
+

Detailed Description

+

A database transaction.

+

This class implements a RAII transaction. Most dbo manipulations require that a transaction is active, and database changes will not be committed to the database until the active transaction is committed using commit().

+

A transaction is active until it is either committed or rolled back. When a transaction is rolled back or fails, the modified database objects are not successfully synchronized with the database. The in memory database objects remain unchanged so they may possibly be synchronized later in a new transaction.

+

In most occasions you will want to guard a single method with a transaction object on the stack. Unless the object is committed before returning from the method, the transaction will be rolled back.

+

You may create multiple (nested) transaction objects at the same time: in this way you can guard a method with a transaction object even if it is called from another method which also defines a transaction with a wider scope. Nested transactions act in concert and reference the same logical transaction: the logical transaction will fail if at least one transaction fails, and will be committed only if all transactions are committed.

+

Usage example:

+
 void doSomething(Wt::Dbo::Session& session)
+ {
+   Wt::Dbo::Transaction transaction(session);
+
+   Wt::Dbo::ptr<Account> a = session.load<Account>(42);
+   ...
+
+   transaction.commit();
+ }
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Dbo::Transaction::Transaction (Session session ) [explicit]
+
+
+ +

Constructor.

+

Opens a transaction for the given session. If a transaction is already open for the session, this transaction is added. All open transactions must commit successfully for the entire transaction to succeed.

+ +
+
+ +
+
+ + + + + + + +
Wt::Dbo::Transaction::~Transaction ( )
+
+
+ +

Destructor.

+

If the transaction is still active, it is rolled back.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::Dbo::Transaction::commit ( )
+
+
+ +

Commits the transaction.

+

If this is the last open transaction for the session, the session is flushed and pending changes are committed to the database.

+

Returns whether the transaction was flushed to the database (i.e. whether this was indeed the last open transaction).

+
See also:
rollback()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Dbo::Transaction::isActive ( ) const
+
+
+ +

Returns whether the transaction is still active.

+

A transaction is active unless it has been committed or rolled back.

+

While a transaction is active, new transactions for the same session are treated as nested transactions.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::Transaction::rollback ( )
+
+
+ +

Rolls back the transaction.

+
See also:
commit(), ~Transaction()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres-members.html new file mode 100644 index 0000000..8de2ae3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres-members.html @@ -0,0 +1,100 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::backend::Postgres Member List

+
+
+This is the complete list of members for Wt::Dbo::backend::Postgres, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + +
autoincrementInsertSuffix() const Wt::Dbo::backend::Postgres [virtual]
autoincrementSql() const Wt::Dbo::backend::Postgres [virtual]
autoincrementType() const Wt::Dbo::backend::Postgres [virtual]
blobType() const Wt::Dbo::backend::Postgres [virtual]
clone() const Wt::Dbo::backend::Postgres [virtual]
commitTransaction()Wt::Dbo::backend::Postgres [virtual]
connect(const std::string &db)Wt::Dbo::backend::Postgres
connection()Wt::Dbo::backend::Postgres
dateTimeType(SqlDateTimeType type) const Wt::Dbo::backend::Postgres [virtual]
executeSql(const std::string &sql)Wt::Dbo::backend::Postgres [virtual]
getStatement(const std::string &id) const Wt::Dbo::SqlConnection [virtual]
Postgres()Wt::Dbo::backend::Postgres
Postgres(const std::string &db)Wt::Dbo::backend::Postgres
Postgres(const Postgres &other)Wt::Dbo::backend::Postgres
prepareStatement(const std::string &sql)Wt::Dbo::backend::Postgres [virtual]
property(const std::string &name) const Wt::Dbo::SqlConnection
rollbackTransaction()Wt::Dbo::backend::Postgres [virtual]
saveStatement(const std::string &id, SqlStatement *statement)Wt::Dbo::SqlConnection [virtual]
setProperty(const std::string &name, const std::string &value)Wt::Dbo::SqlConnection
startTransaction()Wt::Dbo::backend::Postgres [virtual]
~Postgres()Wt::Dbo::backend::Postgres
~SqlConnection()Wt::Dbo::SqlConnection [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html new file mode 100644 index 0000000..b120943 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html @@ -0,0 +1,462 @@ + + + + +Wt: Wt::Dbo::backend::Postgres Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::backend::Postgres Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A PostgreSQL connection. +More...

+ +

#include <Wt/Dbo/backend/Postgres>

+
+Inheritance diagram for Wt::Dbo::backend::Postgres:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Postgres ()
 Creates new PostgreSQL backend connection.
 Postgres (const std::string &db)
 Opens a new PostgreSQL backend connection.
Postgres (const Postgres &other)
 Copies a PostgreSQL connection.
 ~Postgres ()
 Destructor.
virtual Postgresclone () const
 Clones the connection.
bool connect (const std::string &db)
 Tries to connect.
+PGconn * connection ()
 Returns the underlying connection.
virtual void executeSql (const std::string &sql)
 Executes an SQL statement.
virtual void startTransaction ()
 Starts a transaction.
virtual void commitTransaction ()
 Commits a transaction.
virtual void rollbackTransaction ()
 Rolls back a transaction.
virtual SqlStatementprepareStatement (const std::string &sql)
 Prepares a statement.
Methods that return dialect information
virtual std::string autoincrementSql () const
 Returns the 'autoincrement' SQL type modifier.
virtual std::string autoincrementType () const
 Returns the 'autoincrement' SQL type.
virtual std::string autoincrementInsertSuffix () const
 Returns the suffix for an 'autoincrement' insert statement.
virtual const char * dateTimeType (SqlDateTimeType type) const
 Returns the date/time type.
virtual const char * blobType () const
 Returns the blob type.
+

Detailed Description

+

A PostgreSQL connection.

+

This class provides the backend implementation for PostgreSQL databases.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::Dbo::backend::Postgres::Postgres ( )
+
+
+ +

Creates new PostgreSQL backend connection.

+

The connection is not yet open, and requires a connect() before it can be used.

+ +
+
+ +
+
+ + + + + + + + +
Wt::Dbo::backend::Postgres::Postgres (const std::string &  db )
+
+
+ +

Opens a new PostgreSQL backend connection.

+

The db may be any of the values supported by PQconnectdb().

+ +
+
+ +
+
+ + + + + + + +
Wt::Dbo::backend::Postgres::~Postgres ( )
+
+
+ +

Destructor.

+

Closes the connection.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Postgres::autoincrementInsertSuffix ( ) const [virtual]
+
+
+ +

Returns the suffix for an 'autoincrement' insert statement.

+

This is appended to the insert statement, since some back-ends need to be indicated that they should return the autoincrement id.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Postgres::autoincrementSql ( ) const [virtual]
+
+
+ +

Returns the 'autoincrement' SQL type modifier.

+

This is used by Session::createTables() to create the id column.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Postgres::autoincrementType ( ) const [virtual]
+
+
+ +

Returns the 'autoincrement' SQL type.

+

This is used by Session::createTables() to create the id column.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
const char * Wt::Dbo::backend::Postgres::blobType ( ) const [virtual]
+
+
+ +

Returns the blob type.

+
See also:
SqlStatement::bind(int, const std::vector<unsigned char>&)
+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
Postgres * Wt::Dbo::backend::Postgres::clone ( ) const [virtual]
+
+
+ +

Clones the connection.

+

Returns a new connection object that is configured like this object. This is used by connection pool implementations to create its connections.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Postgres::commitTransaction ( ) [virtual]
+
+
+ +

Commits a transaction.

+

This function commits a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::Dbo::backend::Postgres::connect (const std::string &  db )
+
+
+ +

Tries to connect.

+

Throws an exception if there was a problem, otherwise true.

+ +
+
+ +
+
+ + + + + + + + +
const char * Wt::Dbo::backend::Postgres::dateTimeType (SqlDateTimeType  type ) const [virtual]
+
+ +
+ +
+
+ + + + + + + + +
void Wt::Dbo::backend::Postgres::executeSql (const std::string &  sql ) [virtual]
+
+
+ +

Executes an SQL statement.

+

This is a convenience method for preparing a statement, executing it, and deleting it.

+ +

Reimplemented from Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + + +
SqlStatement * Wt::Dbo::backend::Postgres::prepareStatement (const std::string &  sql ) [virtual]
+
+
+ +

Prepares a statement.

+

Returns the prepared statement.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Postgres::rollbackTransaction ( ) [virtual]
+
+
+ +

Rolls back a transaction.

+

This function rolls back a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Postgres::startTransaction ( ) [virtual]
+
+
+ +

Starts a transaction.

+

This function starts a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.map new file mode 100644 index 0000000..cb54d2e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.md5 new file mode 100644 index 0000000..68002e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.md5 @@ -0,0 +1 @@ +589dac8662e3730c40e02fac9a074aae \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.png new file mode 100644 index 0000000..0f272d8 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3-members.html new file mode 100644 index 0000000..c8cccc1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3-members.html @@ -0,0 +1,104 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::backend::Sqlite3 Member List

+
+
+This is the complete list of members for Wt::Dbo::backend::Sqlite3, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + +
autoincrementInsertSuffix() const Wt::Dbo::backend::Sqlite3 [virtual]
autoincrementSql() const Wt::Dbo::backend::Sqlite3 [virtual]
autoincrementType() const Wt::Dbo::backend::Sqlite3 [virtual]
blobType() const Wt::Dbo::backend::Sqlite3 [virtual]
clone() const Wt::Dbo::backend::Sqlite3 [virtual]
commitTransaction()Wt::Dbo::backend::Sqlite3 [virtual]
connection()Wt::Dbo::backend::Sqlite3
dateTimeStorage(SqlDateTimeType type) const Wt::Dbo::backend::Sqlite3
DateTimeStorage enum nameWt::Dbo::backend::Sqlite3
dateTimeType(SqlDateTimeType type) const Wt::Dbo::backend::Sqlite3 [virtual]
executeSql(const std::string &sql)Wt::Dbo::SqlConnection [virtual]
getStatement(const std::string &id) const Wt::Dbo::SqlConnection [virtual]
ISO8601AsText enum valueWt::Dbo::backend::Sqlite3
JulianDaysAsReal enum valueWt::Dbo::backend::Sqlite3
prepareStatement(const std::string &sql)Wt::Dbo::backend::Sqlite3 [virtual]
property(const std::string &name) const Wt::Dbo::SqlConnection
rollbackTransaction()Wt::Dbo::backend::Sqlite3 [virtual]
saveStatement(const std::string &id, SqlStatement *statement)Wt::Dbo::SqlConnection [virtual]
setDateTimeStorage(SqlDateTimeType type, DateTimeStorage format)Wt::Dbo::backend::Sqlite3
setProperty(const std::string &name, const std::string &value)Wt::Dbo::SqlConnection
Sqlite3(const std::string &db)Wt::Dbo::backend::Sqlite3
Sqlite3(const Sqlite3 &other)Wt::Dbo::backend::Sqlite3
startTransaction()Wt::Dbo::backend::Sqlite3 [virtual]
UnixTimeAsInteger enum valueWt::Dbo::backend::Sqlite3
~SqlConnection()Wt::Dbo::SqlConnection [virtual]
~Sqlite3()Wt::Dbo::backend::Sqlite3
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3.html new file mode 100644 index 0000000..fb2f550 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3.html @@ -0,0 +1,469 @@ + + + + +Wt: Wt::Dbo::backend::Sqlite3 Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::backend::Sqlite3 Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

An SQLite3 connection. +More...

+ +

#include <Wt/Dbo/backend/Sqlite3>

+
+Inheritance diagram for Wt::Dbo::backend::Sqlite3:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  DateTimeStorage { ISO8601AsText, +JulianDaysAsReal, +UnixTimeAsInteger + }
 

Configuration of date time storage.

+ More...

+Public Member Functions

 Sqlite3 (const std::string &db)
 Opens a new SQLite3 backend connection.
Sqlite3 (const Sqlite3 &other)
 Copies an SQLite3 connection.
 ~Sqlite3 ()
 Destructor.
virtual Sqlite3clone () const
 Clones the connection.
+sqlite3 * connection ()
 Returns the underlying connection.
void setDateTimeStorage (SqlDateTimeType type, DateTimeStorage format)
 Configures how to store date or date time.
+DateTimeStorage dateTimeStorage (SqlDateTimeType type) const
 Returns the date time storage.
virtual void startTransaction ()
 Starts a transaction.
virtual void commitTransaction ()
 Commits a transaction.
virtual void rollbackTransaction ()
 Rolls back a transaction.
virtual SqlStatementprepareStatement (const std::string &sql)
 Prepares a statement.
Methods that return dialect information
virtual std::string autoincrementSql () const
 Returns the 'autoincrement' SQL type modifier.
virtual std::string autoincrementType () const
 Returns the 'autoincrement' SQL type.
virtual std::string autoincrementInsertSuffix () const
 Returns the suffix for an 'autoincrement' insert statement.
virtual const char * dateTimeType (SqlDateTimeType type) const
 Returns the date/time type.
virtual const char * blobType () const
 Returns the blob type.
+

Detailed Description

+

An SQLite3 connection.

+

This class provides the backend implementation for SQLite3 databases.

+

Member Enumeration Documentation

+ +
+ +
+ +

Configuration of date time storage.

+

SQlite3 does not provide real type support for date time. Instead, it offers 3 choices for storing a date time, each of these compatible with the use of the built-in arithmetic functions.

+
Enumerator:
+ + + +
ISO8601AsText  +

As 'text' in ISO8601 format.

+
JulianDaysAsReal  +

As 'real', the number of julian days. Note that this does not support second accuracy for a date time, but is the preferred format for a plain date.

+
UnixTimeAsInteger  +

As 'integer', number of seconds since UNIX Epoch.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Dbo::backend::Sqlite3::Sqlite3 (const std::string &  db )
+
+
+ +

Opens a new SQLite3 backend connection.

+

The db may be any of the values supported by sqlite3_open().

+ +
+
+ +
+
+ + + + + + + +
Wt::Dbo::backend::Sqlite3::~Sqlite3 ( )
+
+
+ +

Destructor.

+

Closes the connection.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Sqlite3::autoincrementInsertSuffix ( ) const [virtual]
+
+
+ +

Returns the suffix for an 'autoincrement' insert statement.

+

This is appended to the insert statement, since some back-ends need to be indicated that they should return the autoincrement id.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Sqlite3::autoincrementSql ( ) const [virtual]
+
+
+ +

Returns the 'autoincrement' SQL type modifier.

+

This is used by Session::createTables() to create the id column.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Dbo::backend::Sqlite3::autoincrementType ( ) const [virtual]
+
+
+ +

Returns the 'autoincrement' SQL type.

+

This is used by Session::createTables() to create the id column.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
const char * Wt::Dbo::backend::Sqlite3::blobType ( ) const [virtual]
+
+
+ +

Returns the blob type.

+
See also:
SqlStatement::bind(int, const std::vector<unsigned char>&)
+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
Sqlite3 * Wt::Dbo::backend::Sqlite3::clone ( ) const [virtual]
+
+
+ +

Clones the connection.

+

Returns a new connection object that is configured like this object. This is used by connection pool implementations to create its connections.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Sqlite3::commitTransaction ( ) [virtual]
+
+
+ +

Commits a transaction.

+

This function commits a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + + +
const char * Wt::Dbo::backend::Sqlite3::dateTimeType (SqlDateTimeType  type ) const [virtual]
+
+ +
+ +
+
+ + + + + + + + +
SqlStatement * Wt::Dbo::backend::Sqlite3::prepareStatement (const std::string &  sql ) [virtual]
+
+
+ +

Prepares a statement.

+

Returns the prepared statement.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Sqlite3::rollbackTransaction ( ) [virtual]
+
+
+ +

Rolls back a transaction.

+

This function rolls back a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::backend::Sqlite3::setDateTimeStorage (SqlDateTimeType  type,
DateTimeStorage  format 
)
+
+
+ +

Configures how to store date or date time.

+

The default format is ISO8601AsText.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Dbo::backend::Sqlite3::startTransaction ( ) [virtual]
+
+
+ +

Starts a transaction.

+

This function starts a transaction.

+ +

Implements Wt::Dbo::SqlConnection.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.map new file mode 100644 index 0000000..1504880 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.md5 new file mode 100644 index 0000000..8165def --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.md5 @@ -0,0 +1 @@ +28fe26e9edd381b0c58a476d0b67205e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.png new file mode 100644 index 0000000..21427c5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Sqlite3__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection-members.html new file mode 100644 index 0000000..6e5835e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection-members.html @@ -0,0 +1,90 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::collection< C > Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection.html new file mode 100644 index 0000000..0321bc0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection.html @@ -0,0 +1,289 @@ + + + + +Wt: Wt::Dbo::collection< C > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::collection< C > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

An STL container for iterating query results. +More...

+ +

#include <Wt/Dbo/collection>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  const_iterator
 Const Iterator. More...
class  iterator
 Iterator. More...

+Public Types

+typedef C value_type
 Value type.

+Public Member Functions

 collection ()
 Default constructor.
~collection ()
 Destructor.
+iterator begin ()
 Returns an iterator to the begin of the collection.
+iterator end ()
 Returns an iterator to the end of the collection.
+const_iterator begin () const
 Returns a const iterator to the begin of the collection.
+const_iterator end () const
 Returns a const iterator to the end of the collection.
size_type size () const
 Returns the size.
void insert (C c)
 Inserts an object.
void erase (C c)
 Removes an object.
+Sessionsession () const
 Returns the session to which this collection is bound.
Query< C, DynamicBindingfind () const
 Returns the query that backs the collection.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::collection< C >

+ +

An STL container for iterating query results.

+

This is an STL-compatible container that is backed by an SQL query for fetching data.

+

A collection has two uses in Wt::Dbo:

+
    +
  • to iterate the results of a Query;
  • +
  • to map the many-side of a Many-to-One or Many-to-Many relation.
  • +
+

Its iterators implement the InputIterator requirements, meaning you have to traverse the results from begin() to end() solely by alternating between reading an element and incrementing the iterator. When the collection represents the results of a Query, you can only iterate the results just once: i.e. you can have only one begin() call.

+

The container is read only, unless it is being used as a member of a dbo to manage a Many-to-Many relation. In that case, you may also insert() and erase() may also be used.

+

You will typically iterate the container results for local processing, or copy the results into a standard STL container for extended processing. Not only the weak guarantees of the iterators make this useful, but also in the current implementation of the library, all sql statements are non-reentrant prepared statements (this limitation is likely to be removed in the future): only one collection, which is backed by the same SQL statement may be used at once per session. Thus, the following will fail:

+
 void iterateChildren(Wt::Dbo::ptr<Comment> comment)
+ {
+     typedef Wt::Dbo::collection<Wt::Dbo::ptr<Comment> > Comments;
+     Comments children = comment->children;
+
+     for (Comments::const_iterator i = children.begin(); i != children.end(); ++i) {
+        std::cerr << "Comment: " << i->text << std::endl;
+        iterateChildren(*i); // Illegal since will result in nested use of the same query.
+     }
+ }
+

If you cannot gaurantee that during its iteration the same query will be reused, you should copy the results in a standard container. Note that this is no big overhead since dbo pointers are lightweight.

+
 void iterateChildren(Wt::Dbo::ptr<Comment> comment)
+ {
+     typedef std::vector<Wt::Dbo::ptr<Comment> > Comments;
+
+     Comments children(comment->children.begin(), comment->children.end()); // copy into an STL container, freeing the underlying query for reuse 
+
+     for (Comments::const_iterator i = children.begin(); i != children.end(); ++i) {
+        std::cerr << "Comment: " << i->text << std::endl;
+        iterateChildren(*i); // Okay now.
+     }
+ }
+

Before iterating a collection, the session is flushed. In this way, the collection will reflect any pending dirty changes.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class C >
+ + + + + + + +
Wt::Dbo::collection< C >::collection ( )
+
+
+ +

Default constructor.

+

Constructs an empty collection that is not bound to a database session or query.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class C>
+ + + + + + + + +
void Wt::Dbo::collection< C >::erase ( c )
+
+
+ +

Removes an object.

+

This is only useful for a collection that implements one side of a ManyToMany relation.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
Query< C, DynamicBinding > Wt::Dbo::collection< C >::find ( ) const
+
+
+ +

Returns the query that backs the collection.

+

Returns the query that backs the collection. This can be used to search for a subset or to browse the results in a particular order.

+
Note:
This only works for a collection that represents the many-side of a collection (i.e. for which hasMany() is called).
+ +
+
+ +
+
+
+template<class C>
+ + + + + + + + +
void Wt::Dbo::collection< C >::insert ( c )
+
+
+ +

Inserts an object.

+

This is only useful for a collection that implements one side of a ManyToMany relation.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
collection< C >::size_type Wt::Dbo::collection< C >::size ( ) const
+
+
+ +

Returns the size.

+

This will execute an SQL count(*) statement to fetch the size of the collection without fetching all results.

+

If the collection represents the result of a Query, the underlying query is run only once, and its result is cached so that size() always returns the same value.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator-members.html new file mode 100644 index 0000000..1c5af1a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator-members.html @@ -0,0 +1,88 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::collection< C >::const_iterator Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator.html new file mode 100644 index 0000000..dacde48 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1const__iterator.html @@ -0,0 +1,153 @@ + + + + +Wt: Wt::Dbo::collection< C >::const_iterator Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::collection< C >::const_iterator Class Reference

+
+
+ +

Const Iterator. +More...

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

const_iterator (const const_iterator &other)
 Copy constructor.
const_iterator (const typename collection< C >::iterator &other)
 Copy constructor.
+const_iteratoroperator= (const const_iterator &other)
 Assignment operator.
+const_iteratoroperator= (const iterator &other)
 Assignment operator.
+const C & operator* ()
 Dereference operator.
+const C * operator-> ()
 Dereference operator.
bool operator== (const const_iterator &other) const
 Comparison operator.
+bool operator!= (const const_iterator &other) const
 Comparison operator.
+const_iteratoroperator++ ()
 Pre increment operator.
+const_iterator operator++ (int)
 Post increment operator.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::collection< C >::const_iterator

+ +

Const Iterator.

+

Member Function Documentation

+ +
+
+
+template<class C >
+ + + + + + + + +
bool Wt::Dbo::collection< C >::const_iterator::operator== (const const_iterator other ) const
+
+
+ +

Comparison operator.

+

Returns true if two iterators point to the same value in the same collection.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator-members.html new file mode 100644 index 0000000..e8cf9bb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator-members.html @@ -0,0 +1,87 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::collection< C >::iterator Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator.html new file mode 100644 index 0000000..edacb1e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1collection_1_1iterator.html @@ -0,0 +1,150 @@ + + + + +Wt: Wt::Dbo::collection< C >::iterator Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::collection< C >::iterator Class Reference

+
+
+ +

Iterator. +More...

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

iterator (const iterator &other)
 Copy constructor.
~iterator ()
 Destructor.
+iteratoroperator= (const iterator &other)
 Assignment operator.
+C & operator* ()
 Dereference operator.
+C * operator-> ()
 Dereference operator.
bool operator== (const iterator &other) const
 Comparison operator.
+bool operator!= (const iterator &other) const
 Comparison operator.
+iteratoroperator++ ()
 Pre increment operator.
+iterator operator++ (int)
 Post increment operator.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::collection< C >::iterator

+ +

Iterator.

+

Member Function Documentation

+ +
+
+
+template<class C >
+ + + + + + + + +
bool Wt::Dbo::collection< C >::iterator::operator== (const iterator other ) const
+
+
+ +

Comparison operator.

+

Returns true if two iterators point to the same value in the same collection.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__default__traits-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__default__traits-members.html new file mode 100644 index 0000000..0ceed6e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__default__traits-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::dbo_default_traits Member List

+
+
+This is the complete list of members for Wt::Dbo::dbo_default_traits, including all inherited members. + + + + +
IdType typedefWt::Dbo::dbo_default_traits
invalidId()Wt::Dbo::dbo_default_traits [static]
surrogateIdField()Wt::Dbo::dbo_default_traits [static]
versionField()Wt::Dbo::dbo_default_traits [static]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__traits-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__traits-members.html new file mode 100644 index 0000000..6c713bc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1dbo__traits-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::dbo_traits< C > Member List

+
+
+This is the complete list of members for Wt::Dbo::dbo_traits< C >, including all inherited members. + + + + +
IdType typedefWt::Dbo::dbo_traits< C >
invalidId()Wt::Dbo::dbo_traits< C > [static]
surrogateIdField()Wt::Dbo::dbo_traits< C > [static]
versionField()Wt::Dbo::dbo_traits< C > [static]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr-members.html new file mode 100644 index 0000000..66a5483 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr-members.html @@ -0,0 +1,95 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::ptr< C > Member List

+
+
+This is the complete list of members for Wt::Dbo::ptr< C >, including all inherited members. + + + + + + + + + + + + + + + + + +
flush() const Wt::Dbo::ptr< C >
id() const Wt::Dbo::ptr< C >
modify() const Wt::Dbo::ptr< C >
operator bool() const Wt::Dbo::ptr< C >
operator*() const Wt::Dbo::ptr< C >
operator->() const Wt::Dbo::ptr< C >
operator<(const ptr< C > &other) const Wt::Dbo::ptr< C >
operator=(const ptr< C > &other)Wt::Dbo::ptr< C >
operator==(const ptr< C > &other) const Wt::Dbo::ptr< C >
ptr(C *obj=0)Wt::Dbo::ptr< C >
ptr(const ptr< C > &other)Wt::Dbo::ptr< C >
purge()Wt::Dbo::ptr< C >
remove()Wt::Dbo::ptr< C >
reread()Wt::Dbo::ptr< C >
reset(C *obj=0)Wt::Dbo::ptr< C >
version() const Wt::Dbo::ptr< C >
~ptr()Wt::Dbo::ptr< C > [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr.html new file mode 100644 index 0000000..9aadd30 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1ptr.html @@ -0,0 +1,485 @@ + + + + +Wt: Wt::Dbo::ptr< C > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::ptr< C > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A smart pointer for database objects. +More...

+ +

#include <Wt/Dbo/ptr>

+ +

Inherits Wt::Dbo::ptr_base.

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ptr (C *obj=0)
 Creates a new pointer.
ptr (const ptr< C > &other)
 Copy constructor.
virtual ~ptr ()
 Destructor.
void reset (C *obj=0)
 Resets the pointer.
+ptr< C > & operator= (const ptr< C > &other)
 Assignment operator.
const C * operator-> () const
 Dereference operator.
const C & operator* () const
 Dereference operator.
C * modify () const
 Dereference operator, for writing.
bool operator== (const ptr< C > &other) const
 Comparison operator.
bool operator< (const ptr< C > &other) const
 Comparison operator.
 operator bool () const
 Checks for null.
void flush () const
 Flushes the object.
void remove ()
 Removes an object from the database.
void reread ()
 Rereads the database version.
void purge ()
 Purges an object from memory.
dbo_traits< C >::IdType id () const
 Returns the object id.
int version () const
 Returns the object version.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::ptr< C >

+ +

A smart pointer for database objects.

+

This smart pointer class implements a reference counted shared pointer for database objects, which also keeps tracking of synchronization between the in-memory copy and the database copy. You should always use this pointer class to reference a database object.

+

Unlike typical C++ data structures, classes mapped to database tables do not have clear ownership relationships. Therefore, the conventional ownership-based memory allocation/deallocation does not work naturally for database classes.

+

A pointer may point to a transient object or a persisted object. A persisted object has a corresponding copy in the database while a transient object is only present in memory. To persist a new object, use Session::add(). To make a persisted object transient, use remove().

+

Unlike a typical smart pointer, this pointer only allows read access to the underlying object by default. To modify the object, you should explicitly use modify(). This is used to mark the underyling object as dirty to add it to the queue of objects to be synchronized with the database.

+

The pointer class provides a number of methods to deal with the persistence state of the object:

+
    +
  • id(): returns the database id
  • +
  • flush(): forces the object to be synchronized to the database
  • +
  • remove(): deletes the object in the underlying database
  • +
  • reread(): rereads the database copy of the object
  • +
  • purge(): purges the transient version of a non-dirty object.
  • +
+

Constructor & Destructor Documentation

+ +
+
+
+template<class C >
+ + + + + + + + +
Wt::Dbo::ptr< C >::ptr (C *  obj = 0 )
+
+
+ +

Creates a new pointer.

+

When obj is not 0, the pointer points to the new unpersisted object. Use Session::add() to persist the newly created object.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
Wt::Dbo::ptr< C >::~ptr ( ) [virtual]
+
+
+ +

Destructor.

+

This method will delete the transient copy of the database object if it is not referenced by any other pointer.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class C >
+ + + + + + + +
void Wt::Dbo::ptr< C >::flush ( ) const
+
+
+ +

Flushes the object.

+

If dirty, the object is synchronized to the database. This will automatically also flush objects that are referenced by this object if needed. The object is not actually committed to the database before the active transaction has been committed.

+

Since this may persist object to the database, you should have an active transaction.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
dbo_traits< C >::IdType Wt::Dbo::ptr< C >::id ( ) const
+
+
+ +

Returns the object id.

+

This returns dbo_traits<C>::invalidId() for a transient object.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
C * Wt::Dbo::ptr< C >::modify ( ) const
+
+
+ +

Dereference operator, for writing.

+

Returns the underlying object with the intention to modify it. It marks the underlying object as dirty.

+

Since this may lazy-load the underlying database object, you should have an active transaction.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
Wt::Dbo::ptr< C >::operator bool ( ) const
+
+
+ +

Checks for null.

+

Returns true if the pointer is pointing to a non-null object.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
const C & Wt::Dbo::ptr< C >::operator* ( ) const
+
+
+ +

Dereference operator.

+

Note that this operator returns a const copy of the referenced object. Use modify() to get a non-const reference.

+

Since this may lazy-load the underlying database object, you should have an active transaction.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
const C * Wt::Dbo::ptr< C >::operator-> ( ) const
+
+
+ +

Dereference operator.

+

Note that this operator returns a const copy of the referenced object. Use modify() to get a non-const reference.

+

Since this may lazy-load the underlying database object, you should have an active transaction.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
bool Wt::Dbo::ptr< C >::operator< (const ptr< C > &  other ) const
+
+
+ +

Comparison operator.

+

This operator is implemented to be able to store pointers in std::set or std::map containers.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
bool Wt::Dbo::ptr< C >::operator== (const ptr< C > &  other ) const
+
+
+ +

Comparison operator.

+

Two pointers are equal if and only if they reference the same databse object.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
void Wt::Dbo::ptr< C >::purge ( )
+
+
+ +

Purges an object from memory.

+

When the object is not dirty, the memory copy of the object is deleted, and the object will be reread from the database on the next access.

+

Purging an object can be useful to conserve memory, but you should never purge an object while the user is editing if you wish to rely on the optimistick locking for detecting concurrent modifications.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
void Wt::Dbo::ptr< C >::remove ( )
+
+
+ +

Removes an object from the database.

+

The object is removed from the database, and becomes transient again.

+

Note that the object is not deleted in memory: you can still continue to read and modify the object, but there will no longer be a database copy of the object, and the object will effectively be treated as a new object (which may be re-added to the database at a later point).

+

This is the opposite operation of Session::add().

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + +
void Wt::Dbo::ptr< C >::reread ( )
+
+
+ +

Rereads the database version.

+

Rereads a persisted object from the database, discarding any possible changes and updating to the latest database version.

+

This does not actually load the database version, since loading is lazy.

+ +
+
+ +
+
+
+template<class C >
+ + + + + + + + +
void Wt::Dbo::ptr< C >::reset (C *  obj = 0 )
+
+
+ +

Resets the pointer.

+

This is equivalent to:

+
 p = ptr<C>(obj);
+
+
+
+ +
+
+
+template<class C >
+ + + + + + + +
int Wt::Dbo::ptr< C >::version ( ) const
+
+
+ +

Returns the object version.

+

This returns -1 for a transient object or when versioning is not enabled.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1query__result__traits-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1query__result__traits-members.html new file mode 100644 index 0000000..37d6fb2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1query__result__traits-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::query_result_traits< Result > Member List

+
+
+This is the complete list of members for Wt::Dbo::query_result_traits< Result >, including all inherited members. + + + + + + + +
add(Session &session, Result &result)Wt::Dbo::query_result_traits< Result > [static]
create()Wt::Dbo::query_result_traits< Result > [static]
getFields(Session &session, std::vector< std::string > *aliases, std::vector< FieldInfo > &result)Wt::Dbo::query_result_traits< Result > [static]
getValues(const Result &result, std::vector< boost::any > &values)Wt::Dbo::query_result_traits< Result > [static]
load(Session &session, SqlStatement &statement, int &column)Wt::Dbo::query_result_traits< Result > [static]
remove(Result &result)Wt::Dbo::query_result_traits< Result > [static]
setValue(Result &result, int &index, const boost::any &value)Wt::Dbo::query_result_traits< Result > [static]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1sql__value__traits-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1sql__value__traits-members.html new file mode 100644 index 0000000..ade99df --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Dbo_1_1sql__value__traits-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::sql_value_traits< V, Enable > Member List

+
+
+This is the complete list of members for Wt::Dbo::sql_value_traits< V, Enable >, including all inherited members. + + + +
bind(const V &v, SqlStatement *statement, int index, int size)Wt::Dbo::sql_value_traits< V, Enable > [static]
read(V &v, SqlStatement *statement, int column, int size)Wt::Dbo::sql_value_traits< V, Enable > [static]
type(SqlConnection *connection, int size)Wt::Dbo::sql_value_traits< V, Enable > [static]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal-members.html new file mode 100644 index 0000000..5b2b5e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal-members.html @@ -0,0 +1,94 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::EventSignal< E > Member List

+
+
+This is the complete list of members for Wt::EventSignal< E >, including all inherited members. + + + + + + + + + + + + + + + + +
connect(const F &function)Wt::EventSignal< E >
connect(T *target, void(V::*method)())Wt::EventSignal< E >
connect(T *target, void(V::*method)(E))Wt::EventSignal< E >
connect(T *target, void(V::*method)(const E &))Wt::EventSignal< E >
connect(const std::string &function)Wt::EventSignal< E >
connect(JSlot &slot)Wt::EventSignal< E >
connect(WObject *target, WObject::Method method)Wt::EventSignal< E > [virtual]
defaultActionPrevented() const Wt::EventSignalBase
emit(E e=NoClass::none) const Wt::EventSignal< E >
isConnected() const Wt::EventSignal< E > [virtual]
name() const Wt::EventSignalBase
operator()(E e) const Wt::EventSignal< E >
preventDefaultAction(bool prevent=true)Wt::EventSignalBase
preventPropagation(bool prevent=true)Wt::EventSignalBase
propagationPrevented() const Wt::EventSignalBase
sender() const Wt::SignalBase
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal.html b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal.html new file mode 100644 index 0000000..53127be --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal.html @@ -0,0 +1,405 @@ + + + + +Wt: Wt::EventSignal< E > Class Template Reference + + + + + + + + + +
+ +
+

Wt::EventSignal< E > Class Template Reference
+ +[Signal/slot system] +

+
+
+ +

A signal that conveys user-interface events. +More...

+ +

#include <Wt/WSignal>

+
+Inheritance diagram for Wt::EventSignal< E >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool isConnected () const
 Returns whether the signal is connected.
template<class F >
boost::signals::connection connect (const F &function)
 Connects to a function.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)())
 Connects a slot that takes no arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(E))
 Connects a slot that takes one argument.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(const E &))
 Connects a slot that takes a 'const argument&'.
void connect (const std::string &function)
 Connects a JavaScript function.
void connect (JSlot &slot)
 Connects a slot that is specified as JavaScript only.
void emit (E e=NoClass::none) const
 Emits the signal.
void operator() (E e) const
 Emits the signal.
virtual boost::signals::connection connect (WObject *target, WObject::Method method)
 Connects to a slot.
+

Detailed Description

+

template<typename E = NoClass>
+ class Wt::EventSignal< E >

+ +

A signal that conveys user-interface events.

+

An EventSignal is a special Signal that may be triggered by user interface events such as a mouse click, key press, or focus change. They are made available through the library in widgets like WInteractWidget, and should not be instantiated directly.

+

In addition to the behaviour of Signal, they are capable of both executing client-side and server-side slot code. They may learn JavaScript from C++ code, through stateless slot learning, when connected to a slot that has a stateless implementation, using WObject::implementStateless(). Or they may be connected to a JSlot which provides manual JavaScript code.

+

The typically relay UI event details, using event details objects like WKeyEvent or WMouseEvent.

+
See also:
Signal, JSignal
+

Member Function Documentation

+ +
+
+
+template<typename E >
+
+template<class F >
+ + + + + + + + +
boost::signals::connection Wt::EventSignal< E >::connect (const F &  function )
+
+
+ +

Connects to a function.

+

This variant of the overloaded connect() method supports a template function object (which supports operator ()).

+

When the receiver function is an object method, the signal will automatically be disconnected when the object is deleted, as long as the object inherits from WObject or boost::signals::trackable.

+

The function may leave 1 parameters unbound (e.g. using boost::bind placeholders _1) that may be bound to the event detail object passed by the signal.

+ +
+
+ +
+
+
+template<typename E >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::EventSignal< E >::connect (T *  target,
void(V::*)()  method 
)
+
+
+ +

Connects a slot that takes no arguments.

+

If a stateless implementation is specified for the slot, then the visual behaviour will be learned in terms of JavaScript, and will be cached on the client side for instant feed-back, in addition running the slot on the server.

+

The slot is as a method of an object target of class T, which equals class V, or is a base class of class V. In addition, to check for stateless implementations, class T must be also be a descendant of WObject. Thus, the following statement must return a non-null pointer:

+
 WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
+
+

Reimplemented from Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename E >
+ + + + + + + + +
void Wt::EventSignal< E >::connect (const std::string &  function )
+
+
+ +

Connects a JavaScript function.

+

This will provide a client-side connection between the event and a JavaScript function. The argument must be a JavaScript function which optinally accepts two arguments (the object and the event):

+
 function(object, event) {
+   ...
+ }
+

Unlike a JSlot, there is no automatic connection management: the connection cannot be removed. If you need automatic connection management, you should use connect(JSlot&) instead.

+ +

Reimplemented from Wt::EventSignalBase.

+ +
+
+ +
+
+
+template<typename E >
+ + + + + + + + +
void Wt::EventSignal< E >::connect (JSlot slot )
+
+
+ +

Connects a slot that is specified as JavaScript only.

+

This will provide a client-side connection between the event and some JavaScript code as implemented by the slot. Unlike other connects, this does not cause the event to propagated to the application, and thus the state changes caused by the JavaScript slot are not tracked client-side.

+

The connection is tracked, taking into account the life-time of the JSlot object, and can be updated by modifying the slot. If you do not need connection management (e.g. because the slot has the same life-time as the signal), then you can use connect(const std::string&) instead.

+ +

Reimplemented from Wt::EventSignalBase.

+ +
+
+ +
+
+
+template<typename E >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::EventSignal< E >::connect (T *  target,
void(V::*)(E)  method 
)
+
+
+ +

Connects a slot that takes one argument.

+

This is only possible for signals that take at least one argument.

+ +
+
+ +
+
+
+template<typename E >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::EventSignal< E >::connect (WObject target,
WObject::Method  method 
) [virtual]
+
+
+ +

Connects to a slot.

+

Every signal can be connected to a slot which does not take any arguments (and may thus ignore signal arguments).

+ +

Implements Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename E >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::EventSignal< E >::connect (T *  target,
void(V::*)(const E &)  method 
)
+
+
+ +

Connects a slot that takes a 'const argument&'.

+

This is only possible for signals that take at least one argument.

+ +
+
+ +
+
+
+template<typename E >
+ + + + + + + + +
void Wt::EventSignal< E >::emit ( e = NoClass::none ) const
+
+
+ +

Emits the signal.

+

This will cause all connected slots to be triggered, with the given argument.

+ +
+
+ +
+
+
+template<typename E >
+ + + + + + + + +
void Wt::EventSignal< E >::operator() ( e ) const
+
+
+ +

Emits the signal.

+

This is equivalent to emit().

+
See also:
emit()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase-members.html new file mode 100644 index 0000000..65941cd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase-members.html @@ -0,0 +1,87 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::EventSignalBase Member List

+
+
+This is the complete list of members for Wt::EventSignalBase, including all inherited members. + + + + + + + + + +
Wt::SignalBase::connect(WObject *target, WObject::Method method)=0Wt::SignalBase [pure virtual]
Wt::SignalBase::connect(T *target, void(V::*method)())Wt::SignalBase
defaultActionPrevented() const Wt::EventSignalBase
isConnected() const Wt::EventSignalBase [virtual]
name() const Wt::EventSignalBase
preventDefaultAction(bool prevent=true)Wt::EventSignalBase
preventPropagation(bool prevent=true)Wt::EventSignalBase
propagationPrevented() const Wt::EventSignalBase
sender() const Wt::SignalBase
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase.html b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase.html new file mode 100644 index 0000000..bf017e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase.html @@ -0,0 +1,244 @@ + + + + +Wt: Wt::EventSignalBase Class Reference + + + + + + + + + +
+ +
+

Wt::EventSignalBase Class Reference
+ +[Signal/slot system] +

+
+
+ +

Abstract base class of an event signal. +More...

+
+Inheritance diagram for Wt::EventSignalBase:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

const char * name () const
 Returns the event name.
virtual bool isConnected () const
 Returns whether this signal is connected.
void preventDefaultAction (bool prevent=true)
 Prevents the default browser action.
bool defaultActionPrevented () const
 Returns whether the default browser action is prevented.
void preventPropagation (bool prevent=true)
 Prevents event propagation.
bool propagationPrevented () const
 Returns whether event propagation is prevented.
+

Detailed Description

+

Abstract base class of an event signal.

+

An event signal is directly associated with a user-interface generated event.

+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::EventSignalBase::defaultActionPrevented ( ) const
+
+
+ +

Returns whether the default browser action is prevented.

+
See also:
preventDefaultAction()
+ +
+
+ + + + + +
+
+ + + + + + + + +
void Wt::EventSignalBase::preventDefaultAction (bool  prevent = true )
+
+
+ +

Prevents the default browser action.

+

Use this method to prevent the default browser action associated with this event.

+
See also:
setPreventPropagation()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::EventSignalBase::preventPropagation (bool  prevent = true )
+
+
+ +

Prevents event propagation.

+

Use this method to prevent that the event propagates further to its ancestors.

+
See also:
preventDefaultAction()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::EventSignalBase::propagationPrevented ( ) const
+
+
+ +

Returns whether event propagation is prevented.

+
See also:
preventPropagation()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.map new file mode 100644 index 0000000..92532af --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.map @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.md5 new file mode 100644 index 0000000..6174a05 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.md5 @@ -0,0 +1 @@ +b6b4038d3099ce230e327c61b4200e30 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.png new file mode 100644 index 0000000..4f705dc Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignalBase__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.map new file mode 100644 index 0000000..8171d8a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.md5 new file mode 100644 index 0000000..7bd837d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.md5 @@ -0,0 +1 @@ +fdb955cad7abb98c3fcae6f412f0fead \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.png new file mode 100644 index 0000000..258aefb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1EventSignal__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton-members.html new file mode 100644 index 0000000..3415197 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton-members.html @@ -0,0 +1,194 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::AbstractButton Member List

+
+
+This is the complete list of members for Wt::Ext::AbstractButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::Ext::AbstractButton
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
configureToolTip(ToolTipConfig *config)Wt::Ext::AbstractButton
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::Ext::AbstractButton
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCheckable() const Wt::Ext::AbstractButton
isChecked() const Wt::Ext::AbstractButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::AbstractButton [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setCheckable(bool how)Wt::Ext::AbstractButton
setChecked(bool how)Wt::Ext::AbstractButton
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(const std::string &path)Wt::Ext::AbstractButton
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMenu(Menu *menu)Wt::Ext::AbstractButton
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractButton
toggled()Wt::Ext::AbstractButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton.html new file mode 100644 index 0000000..d86c0dc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton.html @@ -0,0 +1,250 @@ + + + + +Wt: Wt::Ext::AbstractButton Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::AbstractButton Class Reference
+ +[Ext widgets] +

+
+
+ +

Abstract base class for a (toolbar) button or menu item. +More...

+ +

#include <Wt/Ext/AbstractButton>

+
+Inheritance diagram for Wt::Ext::AbstractButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+void setText (const WString &text)
 Set the item text.
+const WStringtext () const
 Get the item text.
+void setIcon (const std::string &path)
 Set the item icon path.
+const std::string & icon () const
 Get the item icon path.
+void setCheckable (bool how)
 Set if the item is checkable.
+bool isCheckable () const
 Return if the item is checkable.
+void setMenu (Menu *menu)
 Set a menu that popups up when the item is activated.
void setChecked (bool how)
 Change the checked state.
+bool isChecked () const
 Get the checked state.
void configureToolTip (ToolTipConfig *config)
 Configure the tool tip associated with this item.
JSignalactivated ()
 Signal emitted when a item gets activated.
JSignal< bool > & toggled ()
 Signal emitted when a item gets toggled.
virtual void refresh ()
 Refresh the widget.
+

Detailed Description

+

Abstract base class for a (toolbar) button or menu item.

+

You may set the button text using setText() and icon use setIcon(), and configure whether the button/menu item can be checked or toggled using setCheckable().

+

To respond to a click, you can connect to the activated() signal, and for a checkable button/item you may listen to the toggled() signal.

+
See also:
Button, MenuItem, AbstractToggleButton
+

Member Function Documentation

+ +
+
+ + + + + + + +
JSignal& Wt::Ext::AbstractButton::activated ( )
+
+
+ +

Signal emitted when a item gets activated.

+

This signal is emitted for non-checkable items (for who isCheckable() == false), when the user activates the item (by clicking it).

+
See also:
setCheckable(bool), isCheckable()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::AbstractButton::configureToolTip (ToolTipConfig config )
+
+
+ +

Configure the tool tip associated with this item.

+

If the config has no parent, then ownership is transferred to this widget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::AbstractButton::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::AbstractButton::setChecked (bool  how )
+
+
+ +

Change the checked state.

+

This is only used when the isCheckable() == true.

+
See also:
setCheckable(bool), isCheckable()
+ +
+
+ +
+
+ + + + + + + +
JSignal<bool>& Wt::Ext::AbstractButton::toggled ( )
+
+
+ +

Signal emitted when a item gets toggled.

+

This signal is emitted for checkable items (for who isCheckable() == false), when the user changed toggles the item state. The new state is passed as a parameter value.

+
See also:
setCheckable(bool), isCheckable()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.map new file mode 100644 index 0000000..c45f2a4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.md5 new file mode 100644 index 0000000..97f68dc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.md5 @@ -0,0 +1 @@ +67b06b7041286d31a1084e6e0c6c00b6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.png new file mode 100644 index 0000000..99843ba Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton-members.html new file mode 100644 index 0000000..e265887 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton-members.html @@ -0,0 +1,205 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::AbstractToggleButton Member List

+
+
+This is the complete list of members for Wt::Ext::AbstractToggleButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
checked()Wt::Ext::AbstractToggleButton
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::Ext::AbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool)Wt::Ext::AbstractToggleButton [slot]
setChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setUnChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::Ext::AbstractToggleButton
validate()Wt::Ext::FormField [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton.html new file mode 100644 index 0000000..6684ab8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton.html @@ -0,0 +1,235 @@ + + + + +Wt: Wt::Ext::AbstractToggleButton Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::AbstractToggleButton Class Reference
+ +[Ext widgets] +

+
+
+ +

Abstract base class for radio button and check box. +More...

+ +

#include <Ext/AbstractToggleButton>

+
+Inheritance diagram for Wt::Ext::AbstractToggleButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Slots

void setChecked (bool)
 Change the state of the button.
virtual void setChecked ()
 Set the button checked.
virtual void setUnChecked ()
 Set the button unChecked.

+Public Member Functions

+void setText (const WString &text)
 Change the text of the label.
+const WString text () const
 Get the text of the label.
+bool isChecked () const
 Returns the state of the button.
EventSignalchecked ()
 Signal emitted when the button gets checked.
EventSignalunChecked ()
 Signal emitted when the button gets unChecked.
+

Detailed Description

+

Abstract base class for radio button and check box.

+

Ext/AbstractToggleButton A toggle button provides a button with a boolean state (checked or unchecked), and a text label.

+

To act on a change of the state, you can listen to the checked() or unChecked() signals.

+

The current state (checked or unchecked) may be inspected using the isChecked() method.

+

The API is identical to the WAbstractToggleButton API.

+

Member Function Documentation

+ +
+
+ + + + + + + +
EventSignal & Wt::Ext::AbstractToggleButton::checked ( )
+
+
+ +

Signal emitted when the button gets checked.

+
See also:
unChecked()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::AbstractToggleButton::setChecked (bool  how ) [slot]
+
+
+ +

Change the state of the button.

+

Does not emit the checked() or unChecked() signals.

+
See also:
setChecked(), setUnChecked()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::AbstractToggleButton::setChecked ( ) [virtual, slot]
+
+
+ +

Set the button checked.

+

Does not emit the checked() signal.

+
See also:
setChecked(bool)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::AbstractToggleButton::setUnChecked ( ) [virtual, slot]
+
+
+ +

Set the button unChecked.

+

Does not emit the unChecked() signal.

+
See also:
setChecked(bool)
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::Ext::AbstractToggleButton::unChecked ( )
+
+
+ +

Signal emitted when the button gets unChecked.

+
See also:
checked()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.map new file mode 100644 index 0000000..01902ec --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.md5 new file mode 100644 index 0000000..1726dbd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.md5 @@ -0,0 +1 @@ +31074fff1ede01dd517151e603203050 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.png new file mode 100644 index 0000000..cb7453d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1AbstractToggleButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button-members.html new file mode 100644 index 0000000..33f9a68 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button-members.html @@ -0,0 +1,200 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Button Member List

+
+
+This is the complete list of members for Wt::Ext::Button, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::Ext::AbstractButton
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
Button(WContainerWidget *parent=0)Wt::Ext::Button
Button(const WString &text, WContainerWidget *parent=0)Wt::Ext::Button
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::Ext::Button
configureToolTip(ToolTipConfig *config)Wt::Ext::AbstractButton
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::Ext::AbstractButton
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCheckable() const Wt::Ext::AbstractButton
isChecked() const Wt::Ext::AbstractButton
isDefault() const Wt::Ext::Button
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::AbstractButton [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setCheckable(bool how)Wt::Ext::AbstractButton
setChecked(bool how)Wt::Ext::AbstractButton
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDefault(bool how)Wt::Ext::Button
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(const std::string &path)Wt::Ext::AbstractButton
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMenu(Menu *menu)Wt::Ext::AbstractButton
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractButton
toggled()Wt::Ext::AbstractButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Button()Wt::Ext::Button
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button.html new file mode 100644 index 0000000..3118592 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button.html @@ -0,0 +1,217 @@ + + + + +Wt: Wt::Ext::Button Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Button Class Reference
+ +[Ext widgets] +

+
+
+ +

A button. +More...

+ +

#include <Wt/Ext/Button>

+
+Inheritance diagram for Wt::Ext::Button:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

Button (WContainerWidget *parent=0)
 Create a push button with empty label.
Button (const WString &text, WContainerWidget *parent=0)
 Create a push button with given label.
~Button ()
 Delete a button.
void setDefault (bool how)
 Configure as the default button.
bool isDefault () const
 Return if is the default button.
JSignalclicked ()
 Alias for the activated() signal.
+

Detailed Description

+

A button.

+

A button with a label and/or icon, which may be standalone, or be added to a ToolBar (see ToolBar::addButton()) or to a Dialog (see Dialog::addButton()).

+

The API is similar to the WPushButton API, with the following additional features:

+ +
+ExtButton-1.png +

Standalone button

+
+ExtButton-1a.png +

Standalone button hover effect

+
+ExtButton-2.png +

Button in tool bar

+
+ExtButton-3.png +

Button in tool bar with icon

+
+ExtButton-4.png +

Button in tool bar with icon and menu

+
+ExtButton-5.png +

Button in tool bar hover effect

+
+ExtButton-6.png +

Toggled button in tool bar

+

Member Function Documentation

+ +
+
+ + + + + + + +
JSignal& Wt::Ext::Button::clicked ( )
+
+
+ +

Alias for the activated() signal.

+

This signal is added for increased API compatibility with WPushButton.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Button::isDefault ( ) const
+
+
+ +

Return if is the default button.

+
See also:
setDefault(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Button::setDefault (bool  how )
+
+
+ +

Configure as the default button.

+

This only applies for buttons that have been added to a dialog using Dialog::addButton().

+

The default button will be activated when the user presses the Enter (or Return) key in a dialog.

+

The default button may be rendered with more emphasis (?).

+
See also:
isDefault()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.map new file mode 100644 index 0000000..51805bd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.md5 new file mode 100644 index 0000000..45d1bf8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.md5 @@ -0,0 +1 @@ +6994e5472183047cb9416e3625116d65 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.png new file mode 100644 index 0000000..527c807 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Button__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar-members.html new file mode 100644 index 0000000..2e64520 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar-members.html @@ -0,0 +1,187 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Calendar Member List

+
+
+This is the complete list of members for Wt::Ext::Calendar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
Calendar(bool i18n=false, WContainerWidget *parent=0)Wt::Ext::Calendar
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
select(const WDate &date)Wt::Ext::Calendar
selected()Wt::Ext::Calendar
selection() const Wt::Ext::Calendar
selectionChanged()Wt::Ext::Calendar
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar.html new file mode 100644 index 0000000..de0fc13 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar.html @@ -0,0 +1,243 @@ + + + + +Wt: Wt::Ext::Calendar Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Calendar Class Reference
+ +[Ext widgets] +

+
+
+ +

A calendar. +More...

+ +

#include <Wt/Ext/Calendar>

+
+Inheritance diagram for Wt::Ext::Calendar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

 Calendar (bool i18n=false, WContainerWidget *parent=0)
 Create a new calendar.
void select (const WDate &date)
 Select a date.
const std::set< WDate > & selection () const
 Get the current selection.
Signal< void > & selectionChanged ()
 Signal emitted when the user changes the selection.
Signal< void > & selected ()
 Signal emitted when the user has selected a date.
+

Detailed Description

+

A calendar.

+

The calendar provides navigation by month and year, and indicates the current day.

+

The calendar only allows selection of a single day, and you may listen for when the user selects a new date using the selected() signal.

+

The API is a subset of the WCalendar API:

+ +

Here is a snapshot taken on 01/09/2007 (shown as today), and 12/09/2007 currently selected.

+
+ExtCalendar-1.png +

Calendar

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::Ext::Calendar::Calendar (bool  i18n = false,
WContainerWidget parent = 0 
)
+
+
+ +

Create a new calendar.

+

Constructs a new calendar, with optional support for internationalization. The calendar shows the current day, and has an empty selection.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::Calendar::select (const WDate date )
+
+
+ +

Select a date.

+

Select one date.

+ +
+
+ +
+
+ + + + + + + +
Signal<void>& Wt::Ext::Calendar::selected ( )
+
+
+ +

Signal emitted when the user has selected a date.

+

This signal indicates that the user has selected a new date, which is only available when in single selection mode.

+ +
+
+ +
+
+ + + + + + + +
const std::set<WDate>& Wt::Ext::Calendar::selection ( ) const
+
+
+ +

Get the current selection.

+

Returns the set of dates currently selected. This set contains 0 or 1 dates.

+ +
+
+ +
+
+ + + + + + + +
Signal<void>& Wt::Ext::Calendar::selectionChanged ( )
+
+
+ +

Signal emitted when the user changes the selection.

+

Emitted after the user has changed the current selection, before the selected() signal is emitted.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.map new file mode 100644 index 0000000..311ebda --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.md5 new file mode 100644 index 0000000..66c7566 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.md5 @@ -0,0 +1 @@ +26e2f1106815e32c3203ca0895457549 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.png new file mode 100644 index 0000000..d617f3c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Calendar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox-members.html new file mode 100644 index 0000000..878aea6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox-members.html @@ -0,0 +1,207 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::CheckBox Member List

+
+
+This is the complete list of members for Wt::Ext::CheckBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
CheckBox(WContainerWidget *parent=0)Wt::Ext::CheckBox
CheckBox(const WString &text, WContainerWidget *parent=0)Wt::Ext::CheckBox
checked()Wt::Ext::AbstractToggleButton
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::Ext::AbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool)Wt::Ext::AbstractToggleButton [slot]
setChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setUnChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::Ext::AbstractToggleButton
validate()Wt::Ext::FormField [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox.html new file mode 100644 index 0000000..4a509a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox.html @@ -0,0 +1,116 @@ + + + + +Wt: Wt::Ext::CheckBox Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::CheckBox Class Reference
+ +[Ext widgets] +

+
+
+ +

A user control that represents a check box. +More...

+ +

#include <Wt/Ext/CheckBox>

+
+Inheritance diagram for Wt::Ext::CheckBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

CheckBox (WContainerWidget *parent=0)
 Create a checkbox with empty label.
CheckBox (const WString &text, WContainerWidget *parent=0)
 Create a checkbox with given label.
+

Detailed Description

+

A user control that represents a check box.

+

The API is identical to the API of WCheckBox.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.map new file mode 100644 index 0000000..3fa2b5a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.md5 new file mode 100644 index 0000000..be7205f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.md5 @@ -0,0 +1 @@ +d1762cc8eea22adacbf0598c600a7e2c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.png new file mode 100644 index 0000000..d2c63dd Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1CheckBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox-members.html new file mode 100644 index 0000000..f1f0a58 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox-members.html @@ -0,0 +1,233 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::ComboBox Member List

+
+
+This is the complete list of members for Wt::Ext::ComboBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::Ext::ComboBox
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &text)Wt::Ext::ComboBox
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clear()Wt::Ext::ComboBox
clearSides() const Wt::WWebWidget [virtual]
ComboBox(WContainerWidget *parent=0)Wt::Ext::ComboBox
count() const Wt::Ext::ComboBox
currentIndex() const Wt::Ext::ComboBox
currentText() const Wt::Ext::ComboBox
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
EchoMode enum nameWt::Ext::LineEdit
echoMode() const Wt::Ext::LineEdit
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::Ext::LineEdit
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertItem(int index, const WString &text)Wt::Ext::ComboBox
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
itemText(int index) const Wt::Ext::ComboBox
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::Ext::LineEdit
keyWentDown()Wt::Ext::LineEdit
keyWentUp()Wt::Ext::LineEdit
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LineEdit(WContainerWidget *parent=0)Wt::Ext::LineEdit
LineEdit(const WString &content, WContainerWidget *parent=0)Wt::Ext::LineEdit
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::Ext::LineEdit
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
Normal enum valueWt::Ext::LineEdit
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::Ext::LineEdit
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::ComboBox [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeItem(int index)Wt::Ext::ComboBox
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCurrentIndex(int index)Wt::Ext::ComboBox
setDataLocation(DataLocation dataLocation)Wt::Ext::ComboBox
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEchoMode(EchoMode echoMode)Wt::Ext::LineEdit
setEditable(bool how)Wt::Ext::ComboBox
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setItemText(int index, const WString &text)Wt::Ext::ComboBox
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::Ext::LineEdit
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinQueryLength(int numChars)Wt::Ext::ComboBox
setModel(WAbstractItemModel *model)Wt::Ext::ComboBox
setModelColumn(int index)Wt::Ext::ComboBox
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPageSize(int pageSize)Wt::Ext::ComboBox
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setQueryDelay(int milliSeconds)Wt::Ext::ComboBox
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &value)Wt::Ext::LineEdit
setTextSize(int chars)Wt::Ext::LineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::LineEdit
textSize() const Wt::Ext::LineEdit
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::LineEdit [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox.html new file mode 100644 index 0000000..d94d27b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox.html @@ -0,0 +1,515 @@ + + + + +Wt: Wt::Ext::ComboBox Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::ComboBox Class Reference
+ +[Ext widgetsModel/view system] +

+
+
+ +

A widget that provides a drop-down combo-box control. +More...

+ +

#include <Wt/Ext/ComboBox>

+
+Inheritance diagram for Wt::Ext::ComboBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ComboBox (WContainerWidget *parent=0)
 Create an empty combo-box with optional parent.
void addItem (const WString &text)
 Add an option item.
+int count () const
 Get the number of items.
int currentIndex () const
 Get the currently selected item.
void insertItem (int index, const WString &text)
 Insert an option item at the specified position.
void removeItem (int index)
 Remove the option item at the specified position.
void setCurrentIndex (int index)
 Change the current selection.
void setItemText (int index, const WString &text)
 Change the text for a specified option.
const WString currentText () const
 Get the text of the currently selected item.
const WString itemText (int index) const
 Get the text of a particular item.
void setModel (WAbstractItemModel *model)
 Set the model to be used for the items.
void setModelColumn (int index)
 Set the column in the model to be used for the items.
void setEditable (bool how)
 Set if the combo-box is editable.
void setQueryDelay (int milliSeconds)
 Configure the delay to filter the list matching the current input.
void setMinQueryLength (int numChars)
 Configure the minimum number of characters to be entered before filtering the drop-down list.
void setPageSize (int pageSize)
 Configure a page size to show matching values one page at a time.
void setDataLocation (DataLocation dataLocation)
 Configure the location of the data for the combo-box.
virtual void refresh ()
 Refresh the widget.
+void clear ()
 Clear all items.
+JSignal< int > & activated ()
 Signal emitted when the selection changed.
+

Detailed Description

+

A widget that provides a drop-down combo-box control.

+

A combo-box provides the user with a choice of options to chose from. Use addItem(const WString&) or insertItem(int, const WString&) to populate the combo-box. All the content can be cleared through clear().

+

To act on a new selection, either connect a slot to the activated() signal.

+

At all times, the current selection index is available through currentIndex() or the text using currentText().

+

By default the ComboBox uses a WStringListModel to store the items. This may be changed by specifying a custom model with setModel().

+

When the combobox is configured to be editable, the user may enter a value which is not available in the list of values. In that case, currentText() will hold this value, while currentIndex() == -1 indicates that the value was not in the list.

+

By default, all the data is downloaded to the client. This may be changed using setDataLocation(DataLocation) to keep the data at hte server, and download data on-demand. This is useful if you have a very large list of options.

+

The API is a superset of the WComboBox API.

+
+ExtComboBox-1.png +

ComboBox with expanded drop-down list.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::addItem (const WString text )
+
+
+ +

Add an option item.

+

Equivalent to insertItem (count(), text).

+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::ComboBox::currentIndex ( ) const
+
+
+ +

Get the currently selected item.

+

If no item is currently selected, the method returns -1.
+ If the combo-box is editable and the entered text does not match an existing item, then this method also returns -1. Otherwise the index is returned of the first item that matches the value of currentText().

+ +
+
+ +
+
+ + + + + + + +
const WString Wt::Ext::ComboBox::currentText ( ) const
+
+
+ +

Get the text of the currently selected item.

+

This retrieves the current text entered by the user. When the combo-box is editable, this may be text that does not correspond to any of the items.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::ComboBox::insertItem (int  index,
const WString text 
)
+
+
+ +

Insert an option item at the specified position.

+

The option item is inserted at position index.

+ +
+
+ +
+
+ + + + + + + + +
const WString Wt::Ext::ComboBox::itemText (int  index ) const
+
+
+ +

Get the text of a particular item.

+

Use this method to get the text for the item at position index.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::ComboBox::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::Ext::FormField.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::removeItem (int  index )
+
+
+ +

Remove the option item at the specified position.

+

The option item at position index will be removed.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setCurrentIndex (int  index )
+
+
+ +

Change the current selection.

+

Specify a value of -1 for index to clear the selection.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setDataLocation (DataLocation  dataLocation )
+
+
+ +

Configure the location of the data for the combo-box.

+

When a ClientSide data location is specified, all data for the combo-box is downloaded when the combo-box is created. Using a ServerSide data location, data is downloaded to the client only when needed.

+

The defualt value is ClientSide.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setEditable (bool  how )
+
+
+ +

Set if the combo-box is editable.

+

An editable combo-box allows the user to specify a value that is not part of the list of values.

+

The default is false.

+
See also:
currentText()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::ComboBox::setItemText (int  index,
const WString text 
)
+
+
+ +

Change the text for a specified option.

+

Use this method to change the text for the item at position index.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setMinQueryLength (int  numChars )
+
+
+ +

Configure the minimum number of characters to be entered before filtering the drop-down list.

+

Values in the drop-down list will only be filtered when the entered text contains more that numChars characters.

+

The default value is 4.

+
See also:
setQueryDelay(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setModel (WAbstractItemModel model )
+
+
+ +

Set the model to be used for the items.

+

The model may not be 0, and ownership of the model is not transferred.

+
See also:
setModelColumn(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setModelColumn (int  index )
+
+
+ +

Set the column in the model to be used for the items.

+

The column index in the model will be used to retrieve data.

+
See also:
setModel()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setPageSize (int  pageSize )
+
+
+ +

Configure a page size to show matching values one page at a time.

+

At most pageSize matches will be shown at the same time in the combo-box.

+

The default value is 0 (no paging).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::ComboBox::setQueryDelay (int  milliSeconds )
+
+
+ +

Configure the delay to filter the list matching the current input.

+

After the a delay of milliSeconds milli seconds, the list items are filtered to match the currently entered text and the drop-down list is updated. It is recommended to specify a non-zero delay when using a Remote data location.

+

The default is 0.

+
See also:
setMinQueryLength(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.map new file mode 100644 index 0000000..fbc2aab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.md5 new file mode 100644 index 0000000..ea19ec9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.md5 @@ -0,0 +1 @@ +fa117dbaa7b92819074f8832911ce794 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.png new file mode 100644 index 0000000..6639915 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ComboBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component-members.html new file mode 100644 index 0000000..8ff6527 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component-members.html @@ -0,0 +1,182 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Component Member List

+
+
+This is the complete list of members for Wt::Ext::Component, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component.html new file mode 100644 index 0000000..eea92e7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component.html @@ -0,0 +1,122 @@ + + + + +Wt: Wt::Ext::Component Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Component Class Reference
+ +[Ext widgets] +

+
+
+ +

An abstract base class for widgets that can be visually disabled. +More...

+ +

#include <Wt/Ext/Component>

+
+Inheritance diagram for Wt::Ext::Component:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

+void setEnabled (bool how)
 Enable or disable the widget.
+void enable ()
 Enable the widget.
+void disable ()
 Disable the widget.
+bool isEnabled () const
 Return if enabled.
+

Detailed Description

+

An abstract base class for widgets that can be visually disabled.

+

Component is the abstract base class of all major Ext widgets, and offers an API to enable or disable a widget.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.map new file mode 100644 index 0000000..53a4d31 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.map @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.md5 new file mode 100644 index 0000000..1d02b9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.md5 @@ -0,0 +1 @@ +96d8b0b34ce194dd7a1eac6131a1ef7e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.png new file mode 100644 index 0000000..3cf1224 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Component__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container-members.html new file mode 100644 index 0000000..fa40edd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container-members.html @@ -0,0 +1,186 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Container Member List

+
+
+This is the complete list of members for Wt::Ext::Container, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
Container(WContainerWidget *parent=0)Wt::Ext::Container
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container.html new file mode 100644 index 0000000..0201c5f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container.html @@ -0,0 +1,189 @@ + + + + +Wt: Wt::Ext::Container Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Container Class Reference

+
+
+ +

A container class which manages its contents using layout managers. +More...

+ +

#include <Wt/Ext/Container>

+
+Inheritance diagram for Wt::Ext::Container:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

 Container (WContainerWidget *parent=0)
 Create a new container.
+virtual ~Container ()
 Destroy the container.
void setLayout (WLayout *layout)
 Set a layout manager for the container.
WLayoutlayout ()
 Get the layout manager that was set for the container.
+

Detailed Description

+

A container class which manages its contents using layout managers.

+

The Container is the Ext equivalent of WContainerWidget, and manages other widgets. Unlike WContainerWidget, Container can only use layout managers to manage its content.

+

Typically, panels will be added directly into a layout (which may be part of an Ext::Container or a WContainerWidget), and are components to organize your user interface. You may also add a container inside a plain WContainerWidget, but then you should set a size for the container (using WWidget::resize()), in pixels.

+

In most cases, using a Panel is more convenient than a Container, since a Panel also manages standard GUI components (such as menu/tool bars), and interactive controls (for resizing, for example). There is however one case where you need to use a Container, which is when you wish to use a layout manager to manage the contents of the entire view port. In that case, you should use a Container to represent the view port, by adding the Container as only child directly to the application's WApplication::root() container.

+

For example, the following creates a top borderlayout that spans the entire viewport:

+
 Wt::Ext::Container *rootContainer = new Wt::Ext::Container(app->root());
+ Wt::WBorderLayout *topLayout = new Wt::WBorderLayout()
+ rootContainer->setLayout(topLayout);
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::Container::Container (WContainerWidget parent = 0 )
+
+
+ +

Create a new container.

+

When a parent is specified, or the container is after construction added to a WContainerWidget, the container should be given an explicit size in pixels, using WWidget::resize().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WLayout * Wt::Ext::Container::layout ( ) [virtual]
+
+
+ +

Get the layout manager that was set for the container.

+

If no layout manager was previously set using setLayout(WLayout *), a default layout manager is created (WDefaultLayout), which does not attempt to size widgets to fit the entire container region.

+
See also:
setLayout(WLayout *)
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Container::setLayout (WLayout layout ) [virtual]
+
+
+ +

Set a layout manager for the container.

+

Only a single layout manager may be set. Note that you can nest layout managers inside each other, to create a complex layout hierarchy.

+
See also:
layout()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.map new file mode 100644 index 0000000..5a356a7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.md5 new file mode 100644 index 0000000..0ab94b2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.md5 @@ -0,0 +1 @@ +936ec8c22d8f7393992f3c7a2ef7a2b9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.png new file mode 100644 index 0000000..46ce208 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Container__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore-members.html new file mode 100644 index 0000000..4ecca17 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore-members.html @@ -0,0 +1,114 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::DataStore Member List

+
+
+This is the complete list of members for Wt::Ext::DataStore, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addColumn(int columnIndex, const std::string &jsonName)Wt::Ext::DataStore
beingDeleted()Wt::WResource [protected]
children() const Wt::WObject
dataChanged()Wt::WResource
dataReceived()Wt::WResource
DataStore(WAbstractItemModel *model, DataLocation dataLocation, WObject *parent=0)Wt::Ext::DataStore
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::Ext::DataStore [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
internalPath() const Wt::WResource
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged()Wt::WResource
setFilterColumn(int columnIndex)Wt::Ext::DataStore
setInternalPath(const std::string &path)Wt::WResource
setObjectName(const std::string &name)Wt::WObject
setUploadProgress(bool enabled)Wt::WResource
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
url() const Wt::WResource
WObject(WObject *parent=0)Wt::WObject
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~DataStore()Wt::Ext::DataStore
~WObject()Wt::WObject [virtual]
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore.html new file mode 100644 index 0000000..3fbc0b6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore.html @@ -0,0 +1,247 @@ + + + + +Wt: Wt::Ext::DataStore Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::DataStore Class Reference
+ +[Ext widgets] +

+
+
+ +

A resource that serializes data from a data model. +More...

+ +

#include <Wt/Ext/DataStore>

+
+Inheritance diagram for Wt::Ext::DataStore:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + +

+Public Member Functions

 DataStore (WAbstractItemModel *model, DataLocation dataLocation, WObject *parent=0)
 Create a new data store.
~DataStore ()
 Destructor.
void addColumn (int columnIndex, const std::string &jsonName)
 Add a column to the list of columns to be serialized.
void setFilterColumn (int columnIndex)
 Set the column which is used to handle filter requests.

+Protected Member Functions

virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.
+

Detailed Description

+

A resource that serializes data from a data model.

+

An instance of this class is used by ComboBox and TableView widgets to serialize data from a WAbstractItemModel. The data store can serialize data both for a ClientSide or ServerSide location of the data. When the location is ServerSide, the model supports transmission of certain data pages, and filtering of the model.

+

To use the data store, you need to specify which columns from the model need to be serialized.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Ext::DataStore::DataStore (WAbstractItemModel model,
DataLocation  dataLocation,
WObject parent = 0 
)
+
+
+ +

Create a new data store.

+

Data will be fecthed from model.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::DataStore::addColumn (int  columnIndex,
const std::string &  jsonName 
)
+
+
+ +

Add a column to the list of columns to be serialized.

+

The column columnIndex of the model is added to the current list of columns that are serialized. The jsonName provides the column label that is transmitted.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::DataStore::handleRequest (const Http::Request request,
Http::Response response 
) [protected, virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::DataStore::setFilterColumn (int  columnIndex )
+
+
+ +

Set the column which is used to handle filter requests.

+

A request for filtering data will be done by matching the given filter against data in the model at column columnIndex.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.map new file mode 100644 index 0000000..2fa6d1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.md5 new file mode 100644 index 0000000..66c58b7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.md5 @@ -0,0 +1 @@ +a0213f1d88e32a9f0138ae59ac5503d6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.png new file mode 100644 index 0000000..202125e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DataStore__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField-members.html new file mode 100644 index 0000000..aee3db5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField-members.html @@ -0,0 +1,219 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::DateField Member List

+
+
+This is the complete list of members for Wt::Ext::DateField, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
date() const Wt::Ext::DateField
DateField(WContainerWidget *parent=0)Wt::Ext::DateField
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
EchoMode enum nameWt::Ext::LineEdit
echoMode() const Wt::Ext::LineEdit
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::Ext::LineEdit
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
format() const Wt::Ext::DateField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::Ext::LineEdit
keyWentDown()Wt::Ext::LineEdit
keyWentUp()Wt::Ext::LineEdit
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LineEdit(WContainerWidget *parent=0)Wt::Ext::LineEdit
LineEdit(const WString &content, WContainerWidget *parent=0)Wt::Ext::LineEdit
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::Ext::LineEdit
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
Normal enum valueWt::Ext::LineEdit
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::Ext::LineEdit
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDate(const WDate &date)Wt::Ext::DateField
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEchoMode(EchoMode echoMode)Wt::Ext::LineEdit
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setFormat(const WString &format)Wt::Ext::DateField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::Ext::LineEdit
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &value)Wt::Ext::LineEdit
setTextSize(int chars)Wt::Ext::LineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::LineEdit
textSize() const Wt::Ext::LineEdit
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::LineEdit [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField.html new file mode 100644 index 0000000..ed51778 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField.html @@ -0,0 +1,188 @@ + + + + +Wt: Wt::Ext::DateField Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::DateField Class Reference
+ +[Ext widgets] +

+
+
+ +

A form field for conveniently editing a date using a calendar popup. +More...

+ +

#include <Wt/Ext/DateField>

+
+Inheritance diagram for Wt::Ext::DateField:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

DateField (WContainerWidget *parent=0)
 Create a new date field.
void setFormat (const WString &format)
 Set the date format.
const WStringformat () const
 Return the date format.
+void setDate (const WDate &date)
 Set the date value.
WDate date () const
 Return the date value.
+

Detailed Description

+

A form field for conveniently editing a date using a calendar popup.

+

You can set a WDateValidator to specify in more detail the valid range, and the client-side validation messages. When using a WDateValidator, however, make sure to use the same date format as the format used by the field.

+

Here is a snapshot taken on 01/09/2007 (shown as today), and with current value 12/09/2007 currently selected.

+
+ExtDateField-1.png +

DateField

+
See also:
Calendar, WDatePicker
+

Member Function Documentation

+ +
+
+ + + + + + + +
WDate Wt::Ext::DateField::date ( ) const
+
+
+ +

Return the date value.

+

When the date could not be parsed, an invalid date is returned (for which WDate::isValid() returns false).

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Ext::DateField::format ( ) const
+
+
+ +

Return the date format.

+
See also:
setFormat()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::DateField::setFormat (const WString format )
+
+
+ +

Set the date format.

+

The syntax of the format string is the same as used by WDate::toString(const WString&).

+

The default value is 'dd/MM/yyyy'.

+
See also:
format()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.map new file mode 100644 index 0000000..fbc2aab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.md5 new file mode 100644 index 0000000..12067ff --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.md5 @@ -0,0 +1 @@ +8e6d92375cb2506f04e6c3c6d842a219 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.png new file mode 100644 index 0000000..a7dc747 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1DateField__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog-members.html new file mode 100644 index 0000000..7f5dc25 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog-members.html @@ -0,0 +1,236 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Dialog Member List

+
+
+This is the complete list of members for Wt::Ext::Dialog, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept()Wt::Ext::Dialog [virtual]
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Accepted enum valueWt::Ext::Dialog
addButton(Button *button)Wt::Ext::Dialog
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
buttons() const Wt::Ext::Dialog
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
Container(WContainerWidget *parent=0)Wt::Ext::Container
contents() const Wt::Ext::Dialog
decorationStyle()Wt::WWebWidget [virtual]
defaultButton() const Wt::Ext::Dialog
Dialog(const WString &windowTitle=WString())Wt::Ext::Dialog
DialogCode enum nameWt::Ext::Dialog
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
done(DialogCode r)Wt::Ext::Dialog [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
exec()Wt::Ext::Dialog
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
finished()Wt::Ext::Dialog
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isSizeGripEnabled() const Wt::Ext::Dialog
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::Panel [virtual]
reject()Wt::Ext::Dialog [virtual]
Rejected enum valueWt::Ext::Dialog
removeButton(Button *button)Wt::Ext::Dialog
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
result() const Wt::Ext::Dialog
sender()Wt::WObject [protected, static]
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDefaultButton(Button *button)Wt::Ext::Dialog
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool hidden)Wt::Ext::Dialog [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSizeGripEnabled(bool enabled)Wt::Ext::Dialog
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWindowTitle(const WString &windowTitle)Wt::Ext::Dialog
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
windowTitle() const Wt::Ext::Dialog
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Dialog()Wt::Ext::Dialog
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog.html new file mode 100644 index 0000000..92d671f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog.html @@ -0,0 +1,568 @@ + + + + +Wt: Wt::Ext::Dialog Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Dialog Class Reference
+ +[Ext widgets] +

+
+
+ +

A dialog emulates a modal window that blocks the user-interface. +More...

+ +

#include <Wt/Ext/Dialog>

+
+Inheritance diagram for Wt::Ext::Dialog:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  DialogCode { Rejected, +Accepted + }
 

The result of a modal dialog execution.

+ More...

+Public Member Functions

 Dialog (const WString &windowTitle=WString())
 Construct a Dialog with a given window title.
~Dialog ()
 Destruct a Dialog.
void setWindowTitle (const WString &windowTitle)
 Set the dialog window title.
const WStringwindowTitle () const
 Return the dialog window title.
WContainerWidgetcontents () const
 Return the dialog contents container.
DialogCode exec ()
 Execute the dialog in a recursive event loop.
virtual void done (DialogCode r)
 Stop a recursive event loop.
virtual void accept ()
 Stop a recursive event loop with result Accepted.
virtual void reject ()
 Stop a recursive event loop with result Rejected.
Signal< DialogCode > & finished ()
 Signal emitted when the recursive event loop is ended.
DialogCode result () const
 Return the result that was set for this dialog.
virtual void setHidden (bool hidden)
 Sets whether the widget is hidden.
void addButton (Button *button)
 Add a button at the bottom of this dialog.
void removeButton (Button *button)
 Remove a button from the bottom of this dialog.
const std::vector< Button * > & buttons () const
 Return the list of buttons at the bottom of this dialog.
void setDefaultButton (Button *button)
 Configure a default button for this dialog.
ButtondefaultButton () const
 Return the default button for this dialog.
void setSizeGripEnabled (bool enabled)
 Configure a size grip to allow the user to resize this dialog.
bool isSizeGripEnabled () const
 Return if the size grip is enabled.
+

Detailed Description

+

A dialog emulates a modal window that blocks the user-interface.

+

A modal window blocks the user interface, and does not allow the user to interact with any other part of the user interface until the dialog is closed.

+

There are two ways for using a Dialog window.

+

The easiest way is using the exec() method: after creating a Dialog window, call the exec() method which blocks until the dialog window is closed, and returns the dialog result. Typically, an OK button will be connected to the accept() slot, and a Cancel button to the reject() slot. This solution has the drawback that it is not scalable to many concurrent sessions, since every recursive event loop (which is running during the exec() method) locks a thread. Therefore it is only suitable for software that doesn't need to scale (to thousands of users).

+

A second way is by treating the Dialog as another widget. The dialog may be closed by calling accept(), reject() or done() (or connecting a signal to one of these methods). This will hide the dialog and emit the finished() signal, which you then can listen for to process the dialog result and delete the dialog. Unlike other widgets, a dialog is hidden by default. You must use the method show() or setHidden(true) to show the dialog.

+

Since Dialog is a Panel, the dialog contents may be layed out inside the dialog using layout managers. To be compatible with WDialog howevere, a contents() method is provided which creates a WFitLayout that fits a single WContainerWidget widget inside the dialog.

+

Only one Dialog window may exist at any time in a single application. An attempt to instantiate a second dialog will result in undefined behaviour.

+

The API is a superset of the WDialog API:

+ +
+ExtDialog-1.png +

An example Dialog using BorderLayouts

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::Ext::Dialog::DialogCode
+
+
+ +

The result of a modal dialog execution.

+
Enumerator:
+ + +
Rejected  +

Dialog closed with reject()

+
Accepted  +

Dialog closed with accept()

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::Dialog::Dialog (const WString windowTitle = WString() )
+
+
+ +

Construct a Dialog with a given window title.

+

Only a single Dialog may be constructed at any time. Unlike other widgets, a dialog should not need be added to a container widget to be displayed.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::Ext::Dialog::accept ( ) [virtual]
+
+
+ +

Stop a recursive event loop with result Accepted.

+
See also:
done(DialogCode), reject()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::addButton (Button button )
+
+
+ +

Add a button at the bottom of this dialog.

+

Is the same as Panel::addFooterButton()

+ +
+
+ +
+
+ + + + + + + +
const std::vector<Button *>& Wt::Ext::Dialog::buttons ( ) const
+
+
+ +

Return the list of buttons at the bottom of this dialog.

+

Is the same as Panel::footerButtons()

+ +

Reimplemented in Wt::Ext::MessageBox.

+ +
+
+ +
+
+ + + + + + + +
WContainerWidget * Wt::Ext::Dialog::contents ( ) const
+
+
+ +

Return the dialog contents container.

+

The first invocation to this method creates a single WContainerWidget that is fitted in the panel content area, like this:

+
 WContainerWidget *contents = new WContainerWidget();
+ dialog->setLayout(new WFitLayout());
+ dialog->layout()->addWidget(contents);
+
+
+
+ +
+
+ + + + + + + +
Button * Wt::Ext::Dialog::defaultButton ( ) const
+
+
+ +

Return the default button for this dialog.

+
See also:
setDefaultButton(), Button::isDefault()
+ +

Reimplemented from Wt::Ext::Panel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::done (DialogCode  r ) [virtual]
+
+
+ +

Stop a recursive event loop.

+

Sets the dialog result, and ends a recursive event loop that was started using the exec() method.

+ +
+
+ +
+
+ + + + + + + +
Dialog::DialogCode Wt::Ext::Dialog::exec ( )
+
+
+ +

Execute the dialog in a recursive event loop.

+

Executes the dialog. This blocks the current thread of execution until one of done(DialogCode), accept() or reject() is called.

+

Warning: using exec() does not scale to many concurrent sessions, since the thread is locked.

+
See also:
done(DialogCode r), accept(), reject()
+ +
+
+ +
+
+ + + + + + + +
Signal<DialogCode>& Wt::Ext::Dialog::finished ( )
+
+
+ +

Signal emitted when the recursive event loop is ended.

+
See also:
done(DialogCode), accept(), reject()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Dialog::isSizeGripEnabled ( ) const
+
+
+ +

Return if the size grip is enabled.

+
See also:
setSizeGripEnabled()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::Dialog::reject ( ) [virtual]
+
+
+ +

Stop a recursive event loop with result Rejected.

+
See also:
done(DialogCode), accept()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::removeButton (Button button )
+
+
+ +

Remove a button from the bottom of this dialog.

+

The button must have been previously added using addButton(). Is the same as Panel::removeFooterButton()

+ +
+
+ +
+
+ + + + + + + +
DialogCode Wt::Ext::Dialog::result ( ) const
+
+
+ +

Return the result that was set for this dialog.

+
See also:
done(DialogCode)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::setDefaultButton (Button button )
+
+
+ +

Configure a default button for this dialog.

+

The button must have been previously added using addButton(). A default button is activated when the user presses Return in the dialog.

+
See also:
Button::setDefault()
+ +

Reimplemented from Wt::Ext::Panel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Reimplemented from Wt::Ext::Widget.

+ +

Reimplemented in Wt::Ext::MessageBox.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::setSizeGripEnabled (bool  enabled )
+
+
+ +

Configure a size grip to allow the user to resize this dialog.

+

When a size grip is enabled, then the user may resize the dialog window.

+

The default is true.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Dialog::setWindowTitle (const WString windowTitle )
+
+
+ +

Set the dialog window title.

+

Is the same as Panel::setTitle(const WString&)

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Ext::Dialog::windowTitle ( ) const
+
+
+ +

Return the dialog window title.

+

Is the same as Panel::title()

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.map new file mode 100644 index 0000000..afa74dd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.md5 new file mode 100644 index 0000000..6067c04 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.md5 @@ -0,0 +1 @@ +4afe74e4b4e1e27b4e7c401f3a10f03b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.png new file mode 100644 index 0000000..1922473 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Dialog__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField-members.html new file mode 100644 index 0000000..432d25e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField-members.html @@ -0,0 +1,197 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::FormField Member List

+
+
+This is the complete list of members for Wt::Ext::FormField, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::FormField [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField.html new file mode 100644 index 0000000..8624a1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField.html @@ -0,0 +1,256 @@ + + + + +Wt: Wt::Ext::FormField Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::FormField Class Reference
+ +[Ext widgets] +

+
+
+ +

An abstract base class for form fields. +More...

+ +

#include <Wt/Ext/FormField>

+
+Inheritance diagram for Wt::Ext::FormField:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  MessageLocation { FancyToolTip, +PlainToolTip, +Below, +Besides + }
 

The location of the validation error message.

+ More...

+Public Member Functions

+void setErrorMessageLocation (MessageLocation location)
 Set the location of the validation error message.
void setValidator (WValidator *validator)
 Set a validator.
+WValidatorvalidator () const
 Return the validator.
+virtual WValidator::State validate ()
 Validate the field.
WLabellabel () const
 Return the label associate with this formfield.
+void setFocus ()
 Give focus to this widget.
virtual void refresh ()
 Refresh the widget.
+EventSignalchanged ()
 Signal emitted when the value was changed.
+EventSignalblurred ()
 Signal emitted when the widget lost focus.
+EventSignalfocussed ()
 Signal emitted when the widget recieved focus.

+Protected Member Functions

FormField (WContainerWidget *parent=0)
 Create a form field.

+Friends

+class Wt::WLabel
+

Detailed Description

+

An abstract base class for form fields.

+

Member Enumeration Documentation

+ +
+ +
+ +

The location of the validation error message.

+
Enumerator:
+ + + + +
FancyToolTip  +

Display in a fancy (JavaScript) tool tip.

+
PlainToolTip  +

Display in a plain HTML tool tip.

+
Below  +

Display below the field.

+
Besides  +

Display next to the field.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WLabel * Wt::Ext::FormField::label ( ) const
+
+
+ +

Return the label associate with this formfield.

+

Returns the label (if there is one) that acts as a proxy for this widget.

+
See also:
WLabel::setBuddy(Ext::FormField *)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::FormField::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +

Reimplemented in Wt::Ext::ComboBox.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::FormField::setValidator (WValidator validator )
+
+
+ +

Set a validator.

+

The validator will be used for both client side and server side validation (if it is, or inherits from, one of the four validators provided by Wt: WDateValidator, WDoubleValidator, WIntValidator, WLengthValidator, WRegExpValidator).

+

If the validator has no parent yet, ownership of the validator is transferred to the form field.

+
See also:
validate()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.map new file mode 100644 index 0000000..38a27de --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.md5 new file mode 100644 index 0000000..0b0092c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.md5 @@ -0,0 +1 @@ +0ef51913311d59f2fbe7d68cb32e8d9a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.png new file mode 100644 index 0000000..0235736 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1FormField__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit-members.html new file mode 100644 index 0000000..62a6514 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit-members.html @@ -0,0 +1,214 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::LineEdit Member List

+
+
+This is the complete list of members for Wt::Ext::LineEdit, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
EchoMode enum nameWt::Ext::LineEdit
echoMode() const Wt::Ext::LineEdit
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::Ext::LineEdit
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::Ext::LineEdit
keyWentDown()Wt::Ext::LineEdit
keyWentUp()Wt::Ext::LineEdit
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LineEdit(WContainerWidget *parent=0)Wt::Ext::LineEdit
LineEdit(const WString &content, WContainerWidget *parent=0)Wt::Ext::LineEdit
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::Ext::LineEdit
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
Normal enum valueWt::Ext::LineEdit
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::Ext::LineEdit
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEchoMode(EchoMode echoMode)Wt::Ext::LineEdit
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::Ext::LineEdit
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &value)Wt::Ext::LineEdit
setTextSize(int chars)Wt::Ext::LineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::LineEdit
textSize() const Wt::Ext::LineEdit
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::LineEdit [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit.html new file mode 100644 index 0000000..e28f72f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit.html @@ -0,0 +1,290 @@ + + + + +Wt: Wt::Ext::LineEdit Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::LineEdit Class Reference
+ +[Ext widgets] +

+
+
+ +

A line edit. +More...

+ +

#include <Wt/Ext/LineEdit>

+
+Inheritance diagram for Wt::Ext::LineEdit:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  EchoMode { Normal, +Password + }
 

Enum that describes how the contents is displayed.

+ More...

+Public Member Functions

LineEdit (WContainerWidget *parent=0)
 Create a new line edit with empty content.
LineEdit (const WString &content, WContainerWidget *parent=0)
 Construct a line edit with given content.
+void setTextSize (int chars)
 Specify the width of the line edit in number of characters.
int textSize () const
 Return the current width of the line edit in number of characters.
+void setText (const WString &value)
 Change the content of the line edit.
+const WStringtext () const
 Return the current content.
void setMaxLength (int length)
 Specify the maximum length of text that can be entered.
int maxLength () const
 Returns the maximum length of text that can be entered.
void setEchoMode (EchoMode echoMode)
 Set the echo mode.
+EchoMode echoMode () const
 Return the echo mode.
+virtual WValidator::State validate ()
 Validate the field.
+EventSignal< WKeyEvent > & keyWentDown ()
 Event signal emitted when a keyboard key is pushed down.
+EventSignal< WKeyEvent > & keyPressed ()
 Event signal emitted when a keyboard key is pressed.
+EventSignal< WKeyEvent > & keyWentUp ()
 Event signal emitted when a keyboard key is released.
EventSignalenterPressed ()
 Event signal emitted when enter was pressed.
+

Detailed Description

+

A line edit.

+

To act upon text changes, connect a slot to the changed() signal. This signal is emitted when the user changed the content, and subsequently removes the focus from the line edit.

+

To act upon editing, connect a slot to the keyWentUp() signal.

+

At all times, the current content may be accessed with the text() method.

+

The API is a super-set of the WLineEdit API.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::Ext::LineEdit::EchoMode
+
+
+ +

Enum that describes how the contents is displayed.

+
See also:
setEchoMode
+
+echoMode
+
Enumerator:
+ + +
Normal  +

Characters are shown.

+
Password  +

Hide the contents as for a password.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
EventSignal & Wt::Ext::LineEdit::enterPressed ( )
+
+
+ +

Event signal emitted when enter was pressed.

+

This signal is emitted when the Enter or Return key was pressed.

+
See also:
WInteractWidget::enterPressed()
+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::LineEdit::maxLength ( ) const
+
+
+ +

Returns the maximum length of text that can be entered.

+
See also:
setMaxLength(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::LineEdit::setEchoMode (EchoMode  echoMode )
+
+
+ +

Set the echo mode.

+

The default echo mode is Normal.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::LineEdit::setMaxLength (int  length )
+
+
+ +

Specify the maximum length of text that can be entered.

+

A value <= 0 indicates that there is no limit.

+

The default value is -1.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::LineEdit::textSize ( ) const
+
+
+ +

Return the current width of the line edit in number of characters.

+
See also:
setTextSize(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.map new file mode 100644 index 0000000..ed516c4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.md5 new file mode 100644 index 0000000..76e37f9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.md5 @@ -0,0 +1 @@ +1c3504dbc35e4f4ba046bd48fa243c70 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.png new file mode 100644 index 0000000..de779af Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1LineEdit__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu-members.html new file mode 100644 index 0000000..de6254f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu-members.html @@ -0,0 +1,193 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Menu Member List

+
+
+This is the complete list of members for Wt::Ext::Menu, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
add(MenuItem *item)Wt::Ext::Menu
add(WWidget *item)Wt::Ext::Menu
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &text)Wt::Ext::Menu
addItem(const std::string &iconPath, const WString &text)Wt::Ext::Menu
addItem(const WString &text, T *target, void(V::*method)())Wt::Ext::Menu
addItem(const WString &text, const F &f)Wt::Ext::Menu
addItem(const std::string &iconPath, const WString &text, T *target, void(V::*method)())Wt::Ext::Menu
addItem(const std::string &iconPath, const WString &text, const F &f)Wt::Ext::Menu
addMenu(const WString &text, Menu *menu)Wt::Ext::Menu
addMenu(const std::string &iconPath, const WString &text, Menu *menu)Wt::Ext::Menu
addSeparator()Wt::Ext::Menu
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Menu()Wt::Ext::Menu
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu.html new file mode 100644 index 0000000..8cb0150 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu.html @@ -0,0 +1,356 @@ + + + + +Wt: Wt::Ext::Menu Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Menu Class Reference
+ +[Ext widgets] +

+
+
+ +

A menu presented in a popup window. +More...

+ +

#include <Wt/Ext/Menu>

+
+Inheritance diagram for Wt::Ext::Menu:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Menu ()
 Create a new menu.
+MenuItemaddItem (const WString &text)
 Add an item with given text.
+MenuItemaddItem (const std::string &iconPath, const WString &text)
 Add an item with given icon and text.
template<class T , class V >
MenuItemaddItem (const WString &text, T *target, void(V::*method)())
 Add an item with given text, and specify a slot method to be called when activated.
template<class F >
MenuItemaddItem (const WString &text, const F &f)
 Add an item with given text, and specify a slot method to be called when activated.
template<class T , class V >
MenuItemaddItem (const std::string &iconPath, const WString &text, T *target, void(V::*method)())
 Add an item with given text and icon, and specify a slot method to be called when activated.
template<class F >
MenuItemaddItem (const std::string &iconPath, const WString &text, const F &f)
 Add an item with given text and icon, and specify a slot method to be called when activated.
+MenuItemaddMenu (const WString &text, Menu *menu)
 Add a submenu, with given text.
+MenuItemaddMenu (const std::string &iconPath, const WString &text, Menu *menu)
 Add a submenu, with given icon and text.
+void add (MenuItem *item)
 Add a menu item.
+void add (WWidget *item)
 Add a widget to the menu.
+void addSeparator ()
 Add a separator to the menu.
+

Detailed Description

+

A menu presented in a popup window.

+

A menu is always presented in a popup window, and, unlike other widgets, cannot be instantiated on its own (by adding to a WContainerWidget). Instead it must be associated with a Button or MenuItem (to create sub menus).

+

Usage example:

+
 // Create a menu with some items
+ Wt::Ext::Menu *menu = new Wt::Ext::Menu();
+ Wt::Ext::MenuItem *item;
+
+ item = menu->addItem("File open...");
+ item->setIcon("icons/yellow-folder-open.png");
+
+ item = menu->addItem("I dig Wt");
+ item->setCheckable(true);
+ item->setChecked(true);
+
+ item = menu->addItem("I dig Wt too");
+ item->setCheckable(true);
+
+ menu->addSeparator();
+ menu->addItem("Menu item");
+ menu->addSeparator();
+
+ // Add a sub menu
+ Wt::Ext::Menu *subMenu = new Wt::Ext::Menu();
+ subMenu->addItem("Do this");
+ subMenu->addItem("And that");
+
+ item = menu->addMenu("More ...", subMenu);
+ item->setIcon("icons/yellow-folder-open.png");
+
+ // Create a tool bar
+ Wt::Ext::ToolBar *toolBar = new Wt::Ext::ToolBar(ex);
+
+ // Associate the menu with a button
+ Wt::Ext::Button *b = toolBar->addButton("Button w/Menu", menu);
+ b->setIcon("icons/yellow-folder-closed.png");
+
+ExtMenu-1.png +

Example of a Menu

+
See also:
MenuItem, AbstractButton::setMenu()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::Ext::Menu::Menu ( )
+
+
+ +

Create a new menu.

+

The menu cannot be added to a WContainerWidget, but must instead be associated with a Button or MenuItem.

+
See also:
Button::setMenu(), MenuItem::setMenu(), addMenu().
+ +
+
+

Member Function Documentation

+ +
+
+
+template<class F >
+ + + + + + + + + + + + + + + + + + +
MenuItem * Wt::Ext::Menu::addItem (const WString text,
const F &  f 
)
+
+
+ +

Add an item with given text, and specify a slot method to be called when activated.

+

This variant of the overloaded singleShot() method supports a template function object (which supports operator ()).

+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MenuItem * Wt::Ext::Menu::addItem (const std::string &  iconPath,
const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Add an item with given text and icon, and specify a slot method to be called when activated.

+

The target and method are connected to the MenuItem::activated() signal.

+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + +
MenuItem * Wt::Ext::Menu::addItem (const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Add an item with given text, and specify a slot method to be called when activated.

+

The target and method are connected to the MenuItem::activated() signal.

+ +
+
+ +
+
+
+template<class F >
+ + + + + + + + + + + + + + + + + + + + + + + + +
MenuItem * Wt::Ext::Menu::addItem (const std::string &  iconPath,
const WString text,
const F &  f 
)
+
+
+ +

Add an item with given text and icon, and specify a slot method to be called when activated.

+

This variant of the overloaded singleShot() method supports a template function object (which supports operator ()).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem-members.html new file mode 100644 index 0000000..748f960 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem-members.html @@ -0,0 +1,196 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::MenuItem Member List

+
+
+This is the complete list of members for Wt::Ext::MenuItem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::Ext::AbstractButton
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
configureToolTip(ToolTipConfig *config)Wt::Ext::AbstractButton
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::Ext::AbstractButton
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCheckable() const Wt::Ext::AbstractButton
isChecked() const Wt::Ext::AbstractButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MenuItem(const WString &text)Wt::Ext::MenuItem
MenuItem(const std::string &iconPath, const WString &text)Wt::Ext::MenuItem
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::AbstractButton [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setCheckable(bool how)Wt::Ext::AbstractButton
setChecked(bool how)Wt::Ext::AbstractButton
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(const std::string &path)Wt::Ext::AbstractButton
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMenu(Menu *menu)Wt::Ext::AbstractButton
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractButton
toggled()Wt::Ext::AbstractButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem.html new file mode 100644 index 0000000..b2dd09d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem.html @@ -0,0 +1,132 @@ + + + + +Wt: Wt::Ext::MenuItem Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::MenuItem Class Reference
+ +[Ext widgets] +

+
+
+ +

An item in a menu. +More...

+ +

#include <Wt/Ext/MenuItem>

+
+Inheritance diagram for Wt::Ext::MenuItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

MenuItem (const WString &text)
 Create a new item with given text.
MenuItem (const std::string &iconPath, const WString &text)
 Create a new item with given icon and text.
+

Detailed Description

+

An item in a menu.

+

A menu is always contained by a Menu, and, unlike other widgets, cannot be instantiated on its own (by adding to a WContainerWidget).

+
+ExtMenuItem-1.png +

Menu item

+
+ExtMenuItem-2.png +

Menu item with icon

+
+ExtMenuItem-3.png +

Menu item with icon and menu

+
+ExtMenuItem-4.png +

Menu item hover effect

+
+ExtMenuItem-5.png +

Toggled menu item

+
See also:
Menu, Menu::add(MenuItem *)
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.map new file mode 100644 index 0000000..51805bd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.md5 new file mode 100644 index 0000000..a227c2a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.md5 @@ -0,0 +1 @@ +c0630fc6b84ab0aa88c6cacf88030f4d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.png new file mode 100644 index 0000000..4c6acad Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MenuItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.map new file mode 100644 index 0000000..56555d0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.md5 new file mode 100644 index 0000000..f8e3aa9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.md5 @@ -0,0 +1 @@ +657b79f4827c1229e24604555251f9fb \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.png new file mode 100644 index 0000000..1490429 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Menu__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox-members.html new file mode 100644 index 0000000..72da1d6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox-members.html @@ -0,0 +1,253 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::MessageBox Member List

+
+
+This is the complete list of members for Wt::Ext::MessageBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept()Wt::Ext::Dialog [virtual]
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Accepted enum valueWt::Ext::Dialog
addButton(Button *button)Wt::Ext::Dialog
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
buttonClicked()Wt::Ext::MessageBox
buttons() const Wt::Ext::MessageBox
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
Container(WContainerWidget *parent=0)Wt::Ext::Container
contents() const Wt::Ext::Dialog
decorationStyle()Wt::WWebWidget [virtual]
defaultButton() const Wt::Ext::Dialog
Dialog(const WString &windowTitle=WString())Wt::Ext::Dialog
DialogCode enum nameWt::Ext::Dialog
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
done(DialogCode r)Wt::Ext::Dialog [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enablePrompt(bool enable)Wt::Ext::MessageBox
enableTextArea(bool enable)Wt::Ext::MessageBox
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
exec()Wt::Ext::Dialog
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
finished()Wt::Ext::Dialog
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
hasPrompt() const Wt::Ext::MessageBox
hasTextArea() const Wt::Ext::MessageBox
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::Ext::MessageBox
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isSizeGripEnabled() const Wt::Ext::Dialog
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageBox(bool i18n=false)Wt::Ext::MessageBox
MessageBox(const WString &caption, const WString &text, Icon icon, WFlags< StandardButton > buttons, bool i18n=false)Wt::Ext::MessageBox
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
prompt(const WString &caption, const WString &text, WString &value, bool multiLine=false, bool i18n=false)Wt::Ext::MessageBox [static]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::MessageBox [virtual]
reject()Wt::Ext::Dialog [virtual]
Rejected enum valueWt::Ext::Dialog
removeButton(Button *button)Wt::Ext::Dialog
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
result()Wt::Ext::MessageBox
Wt::Ext::Dialog::result() const Wt::Ext::Dialog
sender()Wt::WObject [protected, static]
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setButtons(WFlags< StandardButton > buttons)Wt::Ext::MessageBox
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDefaultButton(Button *button)Wt::Ext::Dialog
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool hidden)Wt::Ext::MessageBox [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(Icon icon)Wt::Ext::MessageBox
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSizeGripEnabled(bool enabled)Wt::Ext::Dialog
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::MessageBox
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setValue(const WString &value)Wt::Ext::MessageBox
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWindowTitle(const WString &windowTitle)Wt::Ext::Dialog
show(const WString &caption, const WString &text, WFlags< StandardButton > buttons, bool i18n=false)Wt::Ext::MessageBox [static]
Wt::Ext::Dialog::show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::MessageBox
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
value() const Wt::Ext::MessageBox
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
windowTitle() const Wt::Ext::Dialog
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Dialog()Wt::Ext::Dialog
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox.html new file mode 100644 index 0000000..3b59e5e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox.html @@ -0,0 +1,499 @@ + + + + +Wt: Wt::Ext::MessageBox Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::MessageBox Class Reference
+ +[Ext widgets] +

+
+
+ +

A standard dialog for confirmation or to get simple user input. +More...

+ +

#include <Wt/Ext/MessageBox>

+
+Inheritance diagram for Wt::Ext::MessageBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 MessageBox (bool i18n=false)
 Create an empty message box.
 MessageBox (const WString &caption, const WString &text, Icon icon, WFlags< StandardButton > buttons, bool i18n=false)
 Create a message box with given caption, text, icon, and buttons.
+void setText (const WString &text)
 Set the text for the message box.
+const WStringtext () const
 Get the message box text.
+void setIcon (Icon icon)
 Set the icon.
+Icon icon () const
 Get the icon.
+void setButtons (WFlags< StandardButton > buttons)
 Set standard buttons for the message box.
+WFlags< StandardButtonbuttons () const
 Get the standard buttons.
StandardButton result ()
 Get the result of this message box.
void enablePrompt (bool enable)
 Show a single-line input field.
bool hasPrompt () const
 Return if the messagebox may show a prompt.
void enableTextArea (bool enable)
 Show a multi-line input field.
bool hasTextArea () const
 Return if the messagebox may show a prompt.
void setValue (const WString &value)
 Set the value in the input field.
const WStringvalue () const
 Get the value of the input field.
+Signal< StandardButton > & buttonClicked ()
 Signal emitted when a button is clicked.
+virtual void setHidden (bool hidden)
 Show or hide the message box.
virtual void refresh ()
 Refresh the widget.

+Static Public Member Functions

static StandardButton show (const WString &caption, const WString &text, WFlags< StandardButton > buttons, bool i18n=false)
 Convenience method to show a message box, blocking the current thread.
static StandardButton prompt (const WString &caption, const WString &text, WString &value, bool multiLine=false, bool i18n=false)
 Convenience method to show a message box prompting for input, blocking the current thread.
+

Detailed Description

+

A standard dialog for confirmation or to get simple user input.

+

The message box shows a message in a dialog window, with a number of buttons. These buttons may only be standard buttons.

+

There are two distinct ways for using a MessageBox, which reflect the two ways of dealing with a Dialog box.

+

The easiest way is using the static show() method, which shows a message box, blocks the current thread, and returns the button that was pressed by the user. Since this uses the Dialog::exec(), it suffers from the same scalability issues.

+

The more elaborate way is by creating a MessageBox, and connecting the buttonClicked signal to a method. This method then interpretes the result and deletes the message box.

+

The API is slightly different from the WMessageBox API:

+ +
+ExtMessageBox-1.png +

Example of a MessageBox

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::MessageBox::MessageBox (bool  i18n = false )
+
+
+ +

Create an empty message box.

+

The button labels may be set fixed English (if i18n = false), or fetched from a resource bundle if i18n = true. In that case, the key for each button is exactly the same as the English text.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Ext::MessageBox::MessageBox (const WString caption,
const WString text,
Icon  icon,
WFlags< StandardButton buttons,
bool  i18n = false 
)
+
+
+ +

Create a message box with given caption, text, icon, and buttons.

+

The button labels may be set fixed English (if i18n = false), or fetched from a resource bundle if i18n = true. In that case, the key for each button is exactly the same as the English text.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::MessageBox::enablePrompt (bool  enable )
+
+
+ +

Show a single-line input field.

+

A message box may contain either a prompt, or a text area field, but not both. The value may be set using setValue() and retrieved using value().

+
See also:
enableTextArea(), setValue(), value()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::MessageBox::enableTextArea (bool  enable )
+
+
+ +

Show a multi-line input field.

+

A message box may contain either a prompt, or a text area field, but not both. The value may be set using setValue() and retrieved using value().

+
See also:
enablePrompt(), setValue(), value()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::MessageBox::hasPrompt ( ) const
+
+
+ +

Return if the messagebox may show a prompt.

+
See also:
enablePrompt()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::MessageBox::hasTextArea ( ) const
+
+
+ +

Return if the messagebox may show a prompt.

+
See also:
enableTextArea()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StandardButton Wt::Ext::MessageBox::prompt (const WString caption,
const WString text,
WString value,
bool  multiLine = false,
bool  i18n = false 
) [static]
+
+
+ +

Convenience method to show a message box prompting for input, blocking the current thread.

+

Show a message box that prompts for input, blocking the current thread until the message box is closed, and return the result.

+

When the user confirmed message box, the value is updated with the edited value.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::MessageBox::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::Ext::Panel.

+ +
+
+ +
+
+ + + + + + + +
StandardButton Wt::Ext::MessageBox::result ( )
+
+
+ +

Get the result of this message box.

+

This value is only defined after a button has been clicked.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::MessageBox::setValue (const WString value )
+
+
+ +

Set the value in the input field.

+
See also:
enableTextArea(), enablePrompt()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StandardButton Wt::Ext::MessageBox::show (const WString caption,
const WString text,
WFlags< StandardButton buttons,
bool  i18n = false 
) [static]
+
+
+ +

Convenience method to show a message box, blocking the current thread.

+

Show a message box, blocking the current thread until the message box is closed, and return the result.

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Ext::MessageBox::value ( ) const
+
+
+ +

Get the value of the input field.

+
See also:
enableTextArea(), enablePrompt()
+ +

Reimplemented in Wt::Ext::ProgressDialog.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.map new file mode 100644 index 0000000..682f253 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.md5 new file mode 100644 index 0000000..01b9c8e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.md5 @@ -0,0 +1 @@ +6790b2393bbdf3561a667eb8cf6208ba \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.png new file mode 100644 index 0000000..ed57f20 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1MessageBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField-members.html new file mode 100644 index 0000000..d6d14da --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField-members.html @@ -0,0 +1,219 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::NumberField Member List

+
+
+This is the complete list of members for Wt::Ext::NumberField, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decimalPrecision() const Wt::Ext::NumberField
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
EchoMode enum nameWt::Ext::LineEdit
echoMode() const Wt::Ext::LineEdit
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::Ext::LineEdit
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::Ext::LineEdit
keyWentDown()Wt::Ext::LineEdit
keyWentUp()Wt::Ext::LineEdit
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LineEdit(WContainerWidget *parent=0)Wt::Ext::LineEdit
LineEdit(const WString &content, WContainerWidget *parent=0)Wt::Ext::LineEdit
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::Ext::LineEdit
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
Normal enum valueWt::Ext::LineEdit
NumberField(WContainerWidget *parent=0)Wt::Ext::NumberField
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::Ext::LineEdit
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecimalPrecision(int decimals)Wt::Ext::NumberField
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEchoMode(EchoMode echoMode)Wt::Ext::LineEdit
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::Ext::LineEdit
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &value)Wt::Ext::LineEdit
setTextSize(int chars)Wt::Ext::LineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setValue(double value)Wt::Ext::NumberField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::LineEdit
textSize() const Wt::Ext::LineEdit
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::LineEdit [virtual]
validator() const Wt::Ext::FormField
value() const Wt::Ext::NumberField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField.html new file mode 100644 index 0000000..9cc5032 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField.html @@ -0,0 +1,125 @@ + + + + +Wt: Wt::Ext::NumberField Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::NumberField Class Reference
+ +[Ext widgets] +

+
+
+ +

A form field for editing a number. +More...

+ +

#include <Wt/Ext/NumberField>

+
+Inheritance diagram for Wt::Ext::NumberField:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

NumberField (WContainerWidget *parent=0)
 Create a new number field.
+void setValue (double value)
 Set the value.
+double value () const
 Return the value.
+void setDecimalPrecision (int decimals)
 Set the maximal decimal precision.
+int decimalPrecision () const
 Return the decimal precision.
+

Detailed Description

+

A form field for editing a number.

+

You may set a WIntValidator or WDoubleValidator to specify in more detail the valid range, and the client-side validation messages.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.map new file mode 100644 index 0000000..738fe41 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.md5 new file mode 100644 index 0000000..066e233 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.md5 @@ -0,0 +1 @@ +32a84a77aeb5fbc5ec68fd010a86f662 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.png new file mode 100644 index 0000000..be0db0b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1NumberField__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar-members.html new file mode 100644 index 0000000..6a76ef6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar-members.html @@ -0,0 +1,194 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::PagingToolBar Member List

+
+
+This is the complete list of members for Wt::Ext::PagingToolBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
add(Button *item)Wt::Ext::ToolBar
add(WWidget *item)Wt::Ext::ToolBar
addButton(const WString &text)Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text)Wt::Ext::ToolBar
addButton(const WString &text, T *target, void(V::*method)())Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text, T *target, void(V::*method)())Wt::Ext::ToolBar
addButton(const WString &text, Menu *menu)Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text, Menu *menu)Wt::Ext::ToolBar
Wt::WObject::addChild(WObject *child)Wt::WObject
addSeparator()Wt::Ext::ToolBar
addStretch()Wt::Ext::ToolBar
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insert(int index, Button *item)Wt::Ext::ToolBar
insert(int index, WWidget *item)Wt::Ext::ToolBar
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
ToolBar(WContainerWidget *parent=0)Wt::Ext::ToolBar
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar.html new file mode 100644 index 0000000..5bb2065 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar.html @@ -0,0 +1,108 @@ + + + + +Wt: Wt::Ext::PagingToolBar Class Reference + + + + + + + + + +
+
+

Wt::Ext::PagingToolBar Class Reference
+ +[Ext widgets] +

+
+
+ +

A tool bar that provides paging controls for supporting large data sets in a table view. +More...

+ +

#include <Wt/Ext/PagingToolBar>

+
+Inheritance diagram for Wt::Ext::PagingToolBar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ +
+

Detailed Description

+

A tool bar that provides paging controls for supporting large data sets in a table view.

+
See also:
TableView::createPagingToolBar()
+
+Panel::setTopToolBar(), Panel::setBottomToolBar()
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.map new file mode 100644 index 0000000..c026f9e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.md5 new file mode 100644 index 0000000..6ce9a61 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.md5 @@ -0,0 +1 @@ +a5aa075b7c1953a60afeec121b0dcccd \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.png new file mode 100644 index 0000000..066d095 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1PagingToolBar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel-members.html new file mode 100644 index 0000000..2643df8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel-members.html @@ -0,0 +1,215 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Panel Member List

+
+
+This is the complete list of members for Wt::Ext::Panel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
Container(WContainerWidget *parent=0)Wt::Ext::Container
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::Panel [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel.html new file mode 100644 index 0000000..82a27dd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel.html @@ -0,0 +1,768 @@ + + + + +Wt: Wt::Ext::Panel Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Panel Class Reference
+ +[Ext widgets] +

+
+
+ +

A container with a title and standard GUI elements. +More...

+ +

#include <Wt/Ext/Panel>

+
+Inheritance diagram for Wt::Ext::Panel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Panel (WContainerWidget *parent=0)
 Create a new panel.
~Panel ()
 Destruct a panel.
void setTopToolBar (ToolBar *toolBar)
 Set a tool bar at the top of the panel.
ToolBartopToolBar () const
 Return the top tool bar.
void setBottomToolBar (ToolBar *bottomBar)
 Set a tool bar at the bottom of the panel.
ToolBarbottomToolBar () const
 Return the top tool bar.
void addFooterButton (Button *button)
 Add a button to the footer of the panel.
void removeFooterButton (Button *button)
 Remove a button from the footer of the panel.
const std::vector< Button * > & footerButtons () const
 Retrn the list of footer buttons.
void setTitle (const WString &title)
 Set a title.
const WStringtitle () const
 Get the title.
void setTitleBar (bool enable)
 Show or hide a title bar for the panel.
bool titleBar () const
 Get the title bar.
void setAnimate (bool on)
 Set to use animations for the expand/collapse operation.
bool animate () const
 Return if using animations for expand/collapse.
void setAutoScrollBars (bool on)
 Option to show scroll bars when needed.
bool autoScrollBars () const
 Return if showing scroll bars when needed.
void setBorder (bool show)
 Change the border around the panel.
bool border () const
 Get the border setting.
void setCollapsed (bool on)
 Set the panel expanded or callapsed.
void collapse ()
 Collapse the panel.
void expand ()
 Expand the panel.
bool isCollapsed () const
 Return if the panel is collapsed.
void setCollapsible (bool on)
 Allow the user to collapse/expand the panel.
bool isCollapsible () const
 Return if the user may collapse/expand the panel.
void setResizable (bool on)
 Allow the user to resize the panel.
bool isResizable () const
 Return if the user may resize the panel.
JSignalcollapsed ()
 Signal emitted when the panel is collapsed.
JSignalexpanded ()
 Signal emitted when the panel is expanded.
virtual void refresh ()
 Refresh the widget.
+

Detailed Description

+

A container with a title and standard GUI elements.

+

Like a Container, from which Panel derives, a panel organizes its contents using layout managers.

+

The panel provides standard user-interface elements, such as a title bar, top and bottom tool/menu bars, and footer buttons, and a panel may be configured to be resizable and collapsible.

+

Typically, panels will be added directly into a layout, and are components to organize your user interface. You may also add a panel to a plain container widget, but then you should set a size for the panel (using WWidget::resize()), in pixels.

+

When a panel is added to WApplication::root(), as single widget, it acts like a plain Container, and thus none of the panel specific features (tool bars, buttons, etc...) are available. If you want to have a top-level Panel, you need thus to do something like this:

+
   // create the root container
+   Wt::Ext::Container *rootContainer = new Wt::Ext::Container(app->root());
+
+   // create the root panel and fit it inside the container
+   Wt::Ext::Panel *rootPanel = new Wt::Ext::Panel();
+   rootContainer->setLayout(new Wt::WFitLayout());
+   rootContainer->layout()->addWidget(rootPanel);
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::Panel::Panel (WContainerWidget parent = 0 )
+
+
+ +

Create a new panel.

+

When a parent is specified, or the panel is after construction added to a WContainerWidget, the panel should be given an explicit size in pixels, using WWidget::resize().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::addFooterButton (Button button )
+
+
+ +

Add a button to the footer of the panel.

+

The button is displayed below the contents, but above a bottom tool bar if it is set.

+
See also:
removeFooterButton(Button *), Dialog::addButton(Button *)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::animate ( ) const
+
+
+ +

Return if using animations for expand/collapse.

+
See also:
setAnimate(bool)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::autoScrollBars ( ) const
+
+
+ +

Return if showing scroll bars when needed.

+
See also:
setAutoScrollBars(bool)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::border ( ) const
+
+
+ +

Get the border setting.

+
See also:
setBorder(bool)
+ +
+
+ +
+
+ + + + + + + +
ToolBar* Wt::Ext::Panel::bottomToolBar ( ) const
+
+
+ +

Return the top tool bar.

+
See also:
setBottomToolBar(ToolBar *), topToolBar()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::Panel::collapse ( )
+
+
+ +

Collapse the panel.

+
See also:
setCollapsible(bool on)
+ +
+
+ +
+
+ + + + + + + +
JSignal& Wt::Ext::Panel::collapsed ( )
+
+
+ +

Signal emitted when the panel is collapsed.

+
See also:
setCollapsible()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::Panel::expand ( )
+
+
+ +

Expand the panel.

+
See also:
setCollapsible(bool on)
+ +
+
+ +
+
+ + + + + + + +
JSignal& Wt::Ext::Panel::expanded ( )
+
+
+ +

Signal emitted when the panel is expanded.

+
See also:
setCollapsible()
+ +
+
+ +
+
+ + + + + + + +
const std::vector<Button *>& Wt::Ext::Panel::footerButtons ( ) const
+
+
+ +

Retrn the list of footer buttons.

+
See also:
addFooterButton(Button *), removeFooterButton(Button *)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::isCollapsed ( ) const
+
+
+ +

Return if the panel is collapsed.

+
See also:
setCollapsed(bool)
+
+collapsed() and expanded() signals
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::isCollapsible ( ) const
+
+
+ +

Return if the user may collapse/expand the panel.

+
See also:
setCollapsible()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::isResizable ( ) const
+
+
+ +

Return if the user may resize the panel.

+
See also:
setResizable()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::Panel::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +

Reimplemented in Wt::Ext::MessageBox, Wt::Ext::TableView, and Wt::Ext::TabWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::removeFooterButton (Button button )
+
+
+ +

Remove a button from the footer of the panel.

+

Transfers ownership back, and so you must delete the button if you wish to destroy it.

+
See also:
addFooterButton(Button *), Dialog::removeButton(Button *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setAnimate (bool  on )
+
+
+ +

Set to use animations for the expand/collapse operation.

+

By default, the expand/collapse operation of a panel is not animated. This setting is ignored if the panel is not collapsible.

+
See also:
animate(), setCollapsible(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setAutoScrollBars (bool  on )
+
+
+ +

Option to show scroll bars when needed.

+

By default, scrollbars are disabled.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setBorder (bool  show )
+
+
+ +

Change the border around the panel.

+

By default, a panel has a small border around it. Set show false to disable the border.

+
See also:
border()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setBottomToolBar (ToolBar bottomBar )
+
+
+ +

Set a tool bar at the bottom of the panel.

+

Note: you can only set a tool bar before the panel is rendered.

+
See also:
bottomToolBar(), setTopToolBar(ToolBar *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setCollapsed (bool  on )
+
+
+ +

Set the panel expanded or callapsed.

+

When on is true, the panel is collapsed, minimizing screen real estate.

+

Initially, a panel is expanded.

+
See also:
setCollapsible(bool on)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setCollapsible (bool  on )
+
+
+ +

Allow the user to collapse/expand the panel.

+

When on is true, a button is added to the title bar, which may be used to collapse/expand the panel.

+

By default, a panel is not collapsible.

+
See also:
isCollapsed(), isCollapsible(), setCollapsed(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setResizable (bool  on )
+
+
+ +

Allow the user to resize the panel.

+

If true, then, depending on the layout the panel is in, a resize handle will be displayed at one of the panel borders.

+

By default, a panel may not be resized by the user.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setTitle (const WString title )
+
+
+ +

Set a title.

+

The panel title is set in the title bar. This method also makes the title bar visible by calling setTitleBar(true).

+

When the panel is added to a TabWidget, the title serves as the tab label.

+
See also:
title(), setTitleBar(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setTitleBar (bool  enable )
+
+
+ +

Show or hide a title bar for the panel.

+

The title bar appears at the top of the panel, above the contents and the top tool bar (if there is one). By default, the title bar is not shown unless a title is set.

+
See also:
setTitle(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Panel::setTopToolBar (ToolBar toolBar )
+
+
+ +

Set a tool bar at the top of the panel.

+

Note: you can only set a tool bar before the panel is rendered.

+
See also:
topToolBar(), setBottomToolBar(ToolBar *)
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::Ext::Panel::title ( ) const
+
+
+ +

Get the title.

+
See also:
setTitle(const WString&)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::Panel::titleBar ( ) const
+
+
+ +

Get the title bar.

+
See also:
setTitleBar(bool)
+ +
+
+ +
+
+ + + + + + + +
ToolBar* Wt::Ext::Panel::topToolBar ( ) const
+
+
+ +

Return the top tool bar.

+
See also:
setTopToolBar(ToolBar *), bottomToolBar()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.map new file mode 100644 index 0000000..b43f3f0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.md5 new file mode 100644 index 0000000..dfc286b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.md5 @@ -0,0 +1 @@ +3bf92998a7661d4d38cf2f30558b7c74 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.png new file mode 100644 index 0000000..05a7fe3 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Panel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog-members.html new file mode 100644 index 0000000..0f2d374 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog-members.html @@ -0,0 +1,266 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::ProgressDialog Member List

+
+
+This is the complete list of members for Wt::Ext::ProgressDialog, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept()Wt::Ext::Dialog [virtual]
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Accepted enum valueWt::Ext::Dialog
addButton(Button *button)Wt::Ext::Dialog
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
buttonClicked()Wt::Ext::MessageBox
buttons() const Wt::Ext::MessageBox
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
cancel()Wt::Ext::ProgressDialog
canceled()Wt::Ext::ProgressDialog
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
Container(WContainerWidget *parent=0)Wt::Ext::Container
contents() const Wt::Ext::Dialog
decorationStyle()Wt::WWebWidget [virtual]
defaultButton() const Wt::Ext::Dialog
Dialog(const WString &windowTitle=WString())Wt::Ext::Dialog
DialogCode enum nameWt::Ext::Dialog
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
done(DialogCode r)Wt::Ext::Dialog [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enablePrompt(bool enable)Wt::Ext::MessageBox
enableTextArea(bool enable)Wt::Ext::MessageBox
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
exec()Wt::Ext::Dialog
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
finished()Wt::Ext::Dialog
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
hasPrompt() const Wt::Ext::MessageBox
hasTextArea() const Wt::Ext::MessageBox
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::Ext::MessageBox
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isSizeGripEnabled() const Wt::Ext::Dialog
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximum() const Wt::Ext::ProgressDialog
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageBox(bool i18n=false)Wt::Ext::MessageBox
MessageBox(const WString &caption, const WString &text, Icon icon, WFlags< StandardButton > buttons, bool i18n=false)Wt::Ext::MessageBox
Method typedefWt::WObject
minimum() const Wt::Ext::ProgressDialog
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
ProgressDialog(bool i18n=false)Wt::Ext::ProgressDialog
ProgressDialog(const WString &text, const WString &cancelButtonText, int minimum, int maximum, bool i18n=false)Wt::Ext::ProgressDialog
prompt(const WString &caption, const WString &text, WString &value, bool multiLine=false, bool i18n=false)Wt::Ext::MessageBox [static]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::MessageBox [virtual]
reject()Wt::Ext::Dialog [virtual]
Rejected enum valueWt::Ext::Dialog
removeButton(Button *button)Wt::Ext::Dialog
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
reset()Wt::Ext::ProgressDialog
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
result()Wt::Ext::MessageBox
Wt::Ext::Dialog::result() const Wt::Ext::Dialog
sender()Wt::WObject [protected, static]
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setButtons(WFlags< StandardButton > buttons)Wt::Ext::MessageBox
setCancelButtonText(const WString &text)Wt::Ext::ProgressDialog
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDefaultButton(Button *button)Wt::Ext::Dialog
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool hidden)Wt::Ext::MessageBox [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(Icon icon)Wt::Ext::MessageBox
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximum(int maximum)Wt::Ext::ProgressDialog
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimum(int minimum)Wt::Ext::ProgressDialog
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRange(int minimum, int maximum)Wt::Ext::ProgressDialog
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSizeGripEnabled(bool enabled)Wt::Ext::Dialog
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::MessageBox
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setValue(int progress)Wt::Ext::ProgressDialog
Wt::Ext::MessageBox::setValue(const WString &value)Wt::Ext::MessageBox
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWindowTitle(const WString &windowTitle)Wt::Ext::Dialog
show(const WString &caption, const WString &text, WFlags< StandardButton > buttons, bool i18n=false)Wt::Ext::MessageBox [static]
Wt::Ext::Dialog::show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::MessageBox
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
value() const Wt::Ext::ProgressDialog
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
wasCanceled() const Wt::Ext::ProgressDialog
width() const Wt::WWebWidget [virtual]
windowTitle() const Wt::Ext::Dialog
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Dialog()Wt::Ext::Dialog
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog.html new file mode 100644 index 0000000..5553e94 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog.html @@ -0,0 +1,316 @@ + + + + +Wt: Wt::Ext::ProgressDialog Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::ProgressDialog Class Reference
+ +[Ext widgets] +

+
+
+ +

A standard dialog to inform the user of progress during a time consuming task. +More...

+ +

#include <Wt/Ext/ProgressDialog>

+
+Inheritance diagram for Wt::Ext::ProgressDialog:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ProgressDialog (bool i18n=false)
 Create a new progress dialog.
 ProgressDialog (const WString &text, const WString &cancelButtonText, int minimum, int maximum, bool i18n=false)
 Create a new progress dialog.
+void setMinimum (int minimum)
 Set the minimum value.
+int minimum () const
 Return the minimum value.
+void setMaximum (int maximum)
 Set the maximum value.
+int maximum () const
 Return the maximum value.
+void setRange (int minimum, int maximum)
 Define the range.
void cancel ()
 Cancel the dialog.
void reset ()
 Reset the dialog.
+void setCancelButtonText (const WString &text)
 Set the text used for the cancel button.
+void setValue (int progress)
 Set the current value (in the range from minimum() to maximum()).
+int value () const
 Return the current value.
bool wasCanceled () const
 Return if the progress dialog was cancelled.
Signalcanceled ()
 Signal emitted when the user cancels the dialog.
+

Detailed Description

+

A standard dialog to inform the user of progress during a time consuming task.

+

A progress bar is shown to show progress from minimum() to maximum(), with the current value within (this range) set using setValue(). When the user cancels the dialog, the dialog is hidden and the canceled() signal is emitted.

+

The progress dialog may be used in two ways.

+

The easiest way is using a code snippet like this:

+
 Wt::Ext::ProgressDialog progress("Converting contact details...", "Cancel", 0, contacts_.size());
+ progress.setWindowTitle("Import Contacts");
+
+ for (unsigned i = 0; i < contacts_.size(); ++i) {
+   progress.setValue(i);
+
+   Wt::WApplication::instance()->processEvents();
+
+   if (!progress.wasCanceled()) {
+     convertContactDetails(contacts_[i]);
+   } else {
+     Wt::Ext::MessageBox::show("Operation cancelled",
+               "You may import your contact details any time later.", Ok);
+     break;
+   }
+ }
+

Using this approach, WApplication::processEvents() is used to synchronize the server and client state. This approach has the drawback that browser interactivity is limited.

+

The more involved approach involves the use of WTimer to update the progress in conjunction with a worker thread to do the actual work.

+
+ExtProgressDialog-1.png +

Example of a ProgressDialog

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::ProgressDialog::ProgressDialog (bool  i18n = false )
+
+
+ +

Create a new progress dialog.

+

Creates a new dialog, with window title 'Progress...', no message, and a Cancel button. The progress range is defined from 0 to 100.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Ext::ProgressDialog::ProgressDialog (const WString text,
const WString cancelButtonText,
int  minimum,
int  maximum,
bool  i18n = false 
)
+
+
+ +

Create a new progress dialog.

+

Creates a new dialog, with window title 'Progress...', the given message, and a Cancel button. The progress range is defined from minimum to maximum

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::Ext::ProgressDialog::cancel ( )
+
+
+ +

Cancel the dialog.

+

Sets the state to cancelled, and hides the dialog. Calling this method does not emit the canceled signal.

+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::Ext::ProgressDialog::canceled ( )
+
+
+ +

Signal emitted when the user cancels the dialog.

+

When the user cancels the dialog, the dialog is hidden, and the state is set to being cancelled.

+
See also:
wasCanceled()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::ProgressDialog::reset ( )
+
+
+ +

Reset the dialog.

+

The value is reset to the minimum(), and the cancelled state is cleared.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::ProgressDialog::wasCanceled ( ) const
+
+
+ +

Return if the progress dialog was cancelled.

+
See also:
canceled, cancel()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.map new file mode 100644 index 0000000..e91c8f6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.md5 new file mode 100644 index 0000000..430937c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.md5 @@ -0,0 +1 @@ +39a6e72b399d691f9cc253713c51436d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.png new file mode 100644 index 0000000..edee98b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ProgressDialog__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton-members.html new file mode 100644 index 0000000..883cc8d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton-members.html @@ -0,0 +1,207 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::RadioButton Member List

+
+
+This is the complete list of members for Wt::Ext::RadioButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
checked()Wt::Ext::AbstractToggleButton
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::Ext::AbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
RadioButton(WContainerWidget *parent=0)Wt::Ext::RadioButton
RadioButton(const WString &text, WContainerWidget *parent=0)Wt::Ext::RadioButton
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool)Wt::Ext::AbstractToggleButton [slot]
setChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::Ext::AbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setUnChecked()Wt::Ext::AbstractToggleButton [virtual, slot]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::AbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::Ext::AbstractToggleButton
validate()Wt::Ext::FormField [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton.html new file mode 100644 index 0000000..292d91c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton.html @@ -0,0 +1,118 @@ + + + + +Wt: Wt::Ext::RadioButton Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::RadioButton Class Reference
+ +[Ext widgets] +

+
+
+ +

A user control that represents a radio button. +More...

+ +

#include <Wt/Ext/RadioButton>

+
+Inheritance diagram for Wt::Ext::RadioButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

RadioButton (WContainerWidget *parent=0)
 Create an unchecked radio button with empty label and optional parent.
RadioButton (const WString &text, WContainerWidget *parent=0)
 Create an unchecked radio button with given text and optional parent.
+

Detailed Description

+

A user control that represents a radio button.

+

Add the radio button to a WButtonGroup to group together different options that are mutually exclusive.

+

The API is identical to the WRadioButton API.

+
See also:
AbstractToggleButton
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.map new file mode 100644 index 0000000..3fa2b5a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.md5 new file mode 100644 index 0000000..d3fd320 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.md5 @@ -0,0 +1 @@ +f44c6dfe67256893f4c469a3016593a4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.png new file mode 100644 index 0000000..c0cfbab Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1RadioButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter-members.html new file mode 100644 index 0000000..be95ea3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Splitter Member List

+
+
+This is the complete list of members for Wt::Ext::Splitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::Ext::Splitter [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::Ext::Splitter
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
handle(int index) const Wt::Ext::Splitter
handleWidth() const Wt::Ext::Splitter
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::Ext::Splitter [virtual]
insertWidget(int index, WWidget *widget)Wt::Ext::Splitter [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
orientation() const Wt::Ext::Splitter
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHandleWidth(int width)Wt::Ext::Splitter
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOrientation(Orientation orientation)Wt::Ext::Splitter
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
Splitter(WContainerWidget *parent=0)Wt::Ext::Splitter
Splitter(Orientation orientation, WContainerWidget *parent=0)Wt::Ext::Splitter
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter.html new file mode 100644 index 0000000..9eb3304 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter.html @@ -0,0 +1,321 @@ + + + + +Wt: Wt::Ext::Splitter Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Splitter Class Reference
+ +[Ext widgets] +

+
+
+ +

A container widget with resize handles between its children. +More...

+ +

#include <Wt/Ext/Splitter>

+
+Inheritance diagram for Wt::Ext::Splitter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Splitter (WContainerWidget *parent=0)
 Create a new horizontal splitter.
Splitter (Orientation orientation, WContainerWidget *parent=0)
 Create a new splitter with the given orientation.
+void setOrientation (Orientation orientation)
 Set the orientation.
+Orientation orientation () const
 Return the orientation.
void setHandleWidth (int width)
 Set the width of the resize handles (in pixels).
int handleWidth () const
 Return the width of the resize handles.
SplitterHandlehandle (int index) const
 Returns the handle to the left (or above) the widget at the given index.
virtual void addWidget (WWidget *widget)
 Adds a child widget to this container.
virtual void insertWidget (int index, WWidget *widget)
 Inserts a child widget in this container at given index.
virtual void insertBefore (WWidget *widget, WWidget *before)
 Inserts a child widget in this container, before another widget.
const std::vector< WWidget * > & children () const
 Returns contained widgets.
+

Detailed Description

+

A container widget with resize handles between its children.

+

Provides a container in which widgets are laid out either horizontally (side by side, Horizontal orientation), or vertically (Vertical orientation).

+

Widgets are separated by a SplitterHandle which the user may use to resize widgets. For this to work properly, you need to properly specify widths, and minimum- and maximum widths for the widgets:

+
    +
  • +

    They MUST have their width (or height) set using WWidget::resize(), in WLength::Pixel units. You cannot specify the size through CSS!

    +

    +
  • +
  • +

    Optionally, the may have a minimum width (or minimum height) set using WWidget::setMinimumSize() and WWidget::setMaximumSize(). Again, you cannot specify these properties through CSS!

    +

    +
  • +
  • +Probably you will want to insert each widget in a WScrollArea, or set the CSS overflow attribute to hidden (which clips anything that goes outside) or auto (to add scroll bars).
  • +
+

Note: removing or adding widgets after initial render is not yet supported.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::Splitter::addWidget (WWidget widget ) [virtual]
+
+
+ +

Adds a child widget to this container.

+

This is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.

+ +

Reimplemented from Wt::WContainerWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::vector<WWidget *>& Wt::Ext::Splitter::children ( ) const
+
+
+ +

Returns contained widgets.

+
See also:
WContainerWidget::addWidget()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
SplitterHandle * Wt::Ext::Splitter::handle (int  index ) const
+
+
+ +

Returns the handle to the left (or above) the widget at the given index.

+

There is no handle to the left of the widget at index 0, and 0 will be returned.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::Splitter::handleWidth ( ) const
+
+
+ +

Return the width of the resize handles.

+

The default width is 4 pixels.

+
See also:
setHandleWidth()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::Splitter::insertBefore (WWidget widget,
WWidget before 
) [virtual]
+
+
+ +

Inserts a child widget in this container, before another widget.

+

The widget is inserted at the place of the before widget, and subsequent widgets are shifted.

+
See also:
insertWidget(int index, WWidget *widget);
+ +

Reimplemented from Wt::WContainerWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::Splitter::insertWidget (int  index,
WWidget widget 
) [virtual]
+
+
+ +

Inserts a child widget in this container at given index.

+

The widget is inserted at the given index, and subsequent widgets are shifted.

+
See also:
insertBefore(WWidget *widget, WWidget *before);
+ +

Reimplemented from Wt::WContainerWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::Splitter::setHandleWidth (int  width )
+
+
+ +

Set the width of the resize handles (in pixels).

+

The default width is 4 pixels.

+
See also:
handleWidth()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle-members.html new file mode 100644 index 0000000..801ea02 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle-members.html @@ -0,0 +1,182 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::SplitterHandle Member List

+
+
+This is the complete list of members for Wt::Ext::SplitterHandle, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
splitter() const Wt::Ext::SplitterHandle
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle.html new file mode 100644 index 0000000..bfb0998 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle.html @@ -0,0 +1,113 @@ + + + + +Wt: Wt::Ext::SplitterHandle Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::SplitterHandle Class Reference
+ +[Ext widgets] +

+
+
+ +

A handle inside a splitter. +More...

+ +

#include <Wt/Ext/SplitterHandle>

+
+Inheritance diagram for Wt::Ext::SplitterHandle:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

+Splittersplitter () const
 Return the splitter which uses this handle.
+

Detailed Description

+

A handle inside a splitter.

+

The handle which separates widgets inside a Splitter.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.map new file mode 100644 index 0000000..eb08a23 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.md5 new file mode 100644 index 0000000..4b446db --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.md5 @@ -0,0 +1 @@ +b755ba7a6dcc749240f02b66da78b416 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.png new file mode 100644 index 0000000..dcf2dd5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1SplitterHandle__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.map new file mode 100644 index 0000000..1ed709b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.md5 new file mode 100644 index 0000000..767d9ff --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.md5 @@ -0,0 +1 @@ +2f720b953a5633ac2aa410c0741b8d22 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.png new file mode 100644 index 0000000..db1596b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Splitter__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget-members.html new file mode 100644 index 0000000..0541154 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget-members.html @@ -0,0 +1,236 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::TabWidget Member List

+
+
+This is the complete list of members for Wt::Ext::TabWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addTab(WWidget *child, const WString &label)Wt::Ext::TabWidget
addTab(Panel *panel)Wt::Ext::TabWidget
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
Container(WContainerWidget *parent=0)Wt::Ext::Container
count() const Wt::Ext::TabWidget
currentChanged()Wt::Ext::TabWidget
currentIndex() const Wt::Ext::TabWidget
currentWidget() const Wt::Ext::TabWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::Ext::TabWidget
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isTabEnabled(int index) const Wt::Ext::TabWidget
isTabHidden(int index) const Wt::Ext::TabWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
panel(int index) const Wt::Ext::TabWidget
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::TabWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeTab(int index)Wt::Ext::TabWidget
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setCurrentIndex(int index)Wt::Ext::TabWidget
setCurrentWidget(WWidget *widget)Wt::Ext::TabWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabEnabled(int index, bool enable)Wt::Ext::TabWidget
setTabHidden(int index, bool hidden)Wt::Ext::TabWidget
setTabIndex(int index)Wt::WWebWidget [virtual]
setTabText(int index, const WString &label)Wt::Ext::TabWidget
setTabToolTip(int index, const WString &tip)Wt::Ext::TabWidget
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
tabText(int index) const Wt::Ext::TabWidget
tabToolTip(int index) const Wt::Ext::TabWidget
TabWidget(WContainerWidget *parent=0)Wt::Ext::TabWidget
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
widget(int index) const Wt::Ext::TabWidget
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget.html new file mode 100644 index 0000000..9c3a53c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget.html @@ -0,0 +1,563 @@ + + + + +Wt: Wt::Ext::TabWidget Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::TabWidget Class Reference
+ +[Ext widgets] +

+
+
+ +

A widget that organizes contents in tab panes. +More...

+ +

#include <Wt/Ext/TabWidget>

+
+Inheritance diagram for Wt::Ext::TabWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

TabWidget (WContainerWidget *parent=0)
 Create a new TabWidget.
void addTab (WWidget *child, const WString &label)
 Add a new tab, with child as content, and the given label.
void addTab (Panel *panel)
 Add a new tab panel.
void removeTab (int index)
 Remove a tab.
+int count () const
 Return the number of tabs.
Panelpanel (int index) const
 Return t the panel at the given tab index.
WWidgetwidget (int index) const
 Return the content widget at the given tab index.
int indexOf (WWidget *widget) const
 Return the index of the given widget/panel.
void setCurrentIndex (int index)
 Activate the tab at index.
int currentIndex () const
 Return the index of the activated tab.
void setCurrentWidget (WWidget *widget)
 Activate the tab showing the given widget
WWidgetcurrentWidget () const
 Return the widget of the activated tab.
void setTabEnabled (int index, bool enable)
 Enable or disable a tab.
+bool isTabEnabled (int index) const
 Returns if a tab is enabled.
void setTabHidden (int index, bool hidden)
 Hide or show a tab.
+bool isTabHidden (int index) const
 Return if a tab is hidden.
void setTabText (int index, const WString &label)
 Change the label for a tab.
const WStringtabText (int index) const
 Return the label for a tab.
void setTabToolTip (int index, const WString &tip)
 Set the tooltip for a tab.
+const WString tabToolTip (int index) const
 Return the tooltip for a tab.
virtual void refresh ()
 Refresh the widget.
Signal< int > & currentChanged ()
 Signal emitted when the user activates a tab.
+

Detailed Description

+

A widget that organizes contents in tab panes.

+

This widget has an API that is similar to the WTabWidget.

+

Unlike WTabWidget, each tab is actually represented by a Panel, and methods are provided to add a panel directly (see addTab(Panel *)). The panel titles are then used as the tab labels.

+

The widget inherits from Panel, and uses a WDefaultLayout to contain the tab panels. Adding panels to the layout is equivalent to adding tabs to the tab widget.

+
+ExtTabWidget-1.png +

Example of a TabWidget

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TabWidget::addTab (WWidget child,
const WString label 
)
+
+
+ +

Add a new tab, with child as content, and the given label.

+

This is implemented by creating a panel for the widget, and setting the panel title to be the label.

+
See also:
addTab(Panel *), removeTab(int), widget(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TabWidget::addTab (Panel panel )
+
+
+ +

Add a new tab panel.

+

The panel title is used as the tab label.

+
See also:
addTab(WWidget *, const WString&)
+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::Ext::TabWidget::currentChanged ( )
+
+
+ +

Signal emitted when the user activates a tab.

+

The index of the newly activated tab is passed as an argument.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::TabWidget::currentIndex ( ) const
+
+
+ +

Return the index of the activated tab.

+
See also:
setCurrentIndex(int)
+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::Ext::TabWidget::currentWidget ( ) const
+
+
+ +

Return the widget of the activated tab.

+
See also:
setCurrentWidget(WWidget *), currentIndex()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::Ext::TabWidget::indexOf (WWidget widget ) const
+
+
+ +

Return the index of the given widget/panel.

+

If the widget was not added to this tab widget, then -1 is returned.

+ +
+
+ +
+
+ + + + + + + + +
Panel * Wt::Ext::TabWidget::panel (int  index ) const
+
+
+ +

Return t the panel at the given tab index.

+
See also:
widget(int)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::TabWidget::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::Ext::Panel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TabWidget::removeTab (int  index )
+
+
+ +

Remove a tab.

+
See also:
addTab(Panel *), addTab(WWidget *, const WString&)
+
+indexOf(WWidget *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TabWidget::setCurrentIndex (int  index )
+
+
+ +

Activate the tab at index.

+
See also:
setCurrentWidget(WWidget *), currentIndex()
+
+currentChanged() signal
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TabWidget::setCurrentWidget (WWidget widget )
+
+
+ +

Activate the tab showing the given widget

+

This is equivalent to setCurrentIndex(indexOf(widget))

+
See also:
currentWidget(), setCurrentIndex(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TabWidget::setTabEnabled (int  index,
bool  enable 
)
+
+
+ +

Enable or disable a tab.

+

Enables or disables the tab at index. A disabled tab cannot be activated.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TabWidget::setTabHidden (int  index,
bool  hidden 
)
+
+
+ +

Hide or show a tab.

+

Hides are shows the tab at index.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TabWidget::setTabText (int  index,
const WString label 
)
+
+
+ +

Change the label for a tab.

+

This is equivalent to panel(index)->setTitle(label);

+
See also:
tabText(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TabWidget::setTabToolTip (int  index,
const WString tip 
)
+
+
+ +

Set the tooltip for a tab.

+

The tooltip is shown when the user hovers over the label.

+

This seems currently broken in extjs 2.0.

+ +
+
+ +
+
+ + + + + + + + +
const WString & Wt::Ext::TabWidget::tabText (int  index ) const
+
+
+ +

Return the label for a tab.

+
See also:
setTabText(int, const WString&)
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::Ext::TabWidget::widget (int  index ) const
+
+
+ +

Return the content widget at the given tab index.

+
See also:
panel(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.map new file mode 100644 index 0000000..9249116 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.md5 new file mode 100644 index 0000000..2a81123 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.md5 @@ -0,0 +1 @@ +69b517e5f606f6c64e3a0fc229049328 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.png new file mode 100644 index 0000000..978fa0d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TabWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView-members.html new file mode 100644 index 0000000..ec94211 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView-members.html @@ -0,0 +1,258 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::TableView Member List

+
+
+This is the complete list of members for Wt::Ext::TableView, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addFooterButton(Button *button)Wt::Ext::Panel
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
alternatingRowColors() const Wt::Ext::TableView
animate() const Wt::Ext::Panel
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
autoExpandColumn() const Wt::Ext::TableView
autoScrollBars() const Wt::Ext::Panel
border() const Wt::Ext::Panel
bottomToolBar() const Wt::Ext::Panel
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
cellClicked()Wt::Ext::TableView
children() const Wt::WWebWidget
clearSelection()Wt::Ext::TableView
clearSides() const Wt::WWebWidget [virtual]
collapse()Wt::Ext::Panel
collapsed()Wt::Ext::Panel
columnAlignment(int column) const Wt::Ext::TableView
columnsMovable() const Wt::Ext::TableView
columnWidth(int column) const Wt::Ext::TableView
Container(WContainerWidget *parent=0)Wt::Ext::Container
createPagingToolBar()Wt::Ext::TableView
currentCellChanged()Wt::Ext::TableView
currentColumn() const Wt::Ext::TableView
currentRow() const Wt::Ext::TableView
dateRenderer(const WString &format)Wt::Ext::TableView [static]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
enableColumnHiding(int column, bool enable)Wt::Ext::TableView
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
expand()Wt::Ext::Panel
expanded()Wt::Ext::Panel
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
footerButtons() const Wt::Ext::Panel
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
hideColumn(int column)Wt::Ext::TableView
highlightMouseOver() const Wt::Ext::TableView
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::Ext::Panel
isCollapsible() const Wt::Ext::Panel
isColumnHidden(int column) const Wt::Ext::TableView
isColumnHidingEnabled(int column) const Wt::Ext::TableView
isColumnSortable(int column) const Wt::Ext::TableView
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isResizable() const Wt::Ext::Panel
isVisible() const Wt::WWebWidget [virtual]
itemSelectionChanged()Wt::Ext::TableView
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layout()Wt::Ext::Container [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::Ext::TableView
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
pageSize() const Wt::Ext::TableView
Panel(WContainerWidget *parent=0)Wt::Ext::Panel
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::TableView [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeFooterButton(Button *button)Wt::Ext::Panel
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
resizeColumnsToContents(bool onResize=false)Wt::Ext::TableView
selectedRows()Wt::Ext::TableView
selectionBehavior() const Wt::Ext::TableView
selectionMode() const Wt::Ext::TableView
sender()Wt::WObject [protected, static]
setAlternatingRowColors(bool enable)Wt::Ext::TableView
setAnimate(bool on)Wt::Ext::Panel
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setAutoExpandColumn(int column, int minWidth=50, int maxWidth=1000)Wt::Ext::TableView
setAutoScrollBars(bool on)Wt::Ext::Panel
setBorder(bool show)Wt::Ext::Panel
setBottomToolBar(ToolBar *bottomBar)Wt::Ext::Panel
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCollapsed(bool on)Wt::Ext::Panel
setCollapsible(bool on)Wt::Ext::Panel
setColumnAlignment(int column, AlignmentFlag alignment)Wt::Ext::TableView
setColumnHidden(int column, bool hide)Wt::Ext::TableView
setColumnsMovable(bool movable)Wt::Ext::TableView
setColumnSortable(int column, bool sortable)Wt::Ext::TableView
setColumnWidth(int column, int pixels)Wt::Ext::TableView
setCurrentCell(int row, int column)Wt::Ext::TableView
setDataLocation(DataLocation dataLocation)Wt::Ext::TableView
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEditor(int column, FormField *editor)Wt::Ext::TableView
setEnabled(bool how)Wt::Ext::Component
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setHighlightMouseOver(bool highlight)Wt::Ext::TableView
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::Ext::Container [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::Ext::TableView
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPageSize(int pageSize)Wt::Ext::TableView
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRenderer(int column, const std::string &rendererJS)Wt::Ext::TableView
setResizable(bool on)Wt::Ext::Panel
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSelectionBehavior(SelectionBehavior behavior)Wt::Ext::TableView
setSelectionMode(SelectionMode mode)Wt::Ext::TableView
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::Ext::Panel
setTitleBar(bool enable)Wt::Ext::Panel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTopToolBar(ToolBar *toolBar)Wt::Ext::Panel
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
showColumn(int column)Wt::Ext::TableView
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
TableView(WContainerWidget *parent=0)Wt::Ext::TableView
title() const Wt::Ext::Panel
titleBar() const Wt::Ext::Panel
toolTip() const Wt::WWebWidget [virtual]
topToolBar() const Wt::Ext::Panel
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Container()Wt::Ext::Container [virtual]
~Panel()Wt::Ext::Panel
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView.html new file mode 100644 index 0000000..d006a5a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView.html @@ -0,0 +1,1191 @@ + + + + +Wt: Wt::Ext::TableView Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::TableView Class Reference
+ +[Ext widgets] +

+
+
+ +

A widget that displays data in a table. +More...

+ +

#include <Wt/Ext/TableView>

+
+Inheritance diagram for Wt::Ext::TableView:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 TableView (WContainerWidget *parent=0)
 Create a new table view.
void setModel (WAbstractItemModel *model)
 Specify the model.
WAbstractItemModelmodel () const
 Return the model.
void resizeColumnsToContents (bool onResize=false)
 Let the table view resize columns to fit their contents.
void setAutoExpandColumn (int column, int minWidth=50, int maxWidth=1000)
 Set the column which will auto-expand to take the remaining space.
+int autoExpandColumn () const
 Return the column index of the column that auto-expands.
void setDataLocation (DataLocation dataLocation)
 Configure the location of the data.
void setColumnsMovable (bool movable)
 Allow the user to move columns using drag and drop.
bool columnsMovable () const
 Return if columns are movable.
void setAlternatingRowColors (bool enable)
 Render rows with alternating colors.
bool alternatingRowColors () const
 Return if rows are rendered with alternating colors.
void setHighlightMouseOver (bool highlight)
 Configure if the row under the mouse will be highlighted.
+bool highlightMouseOver () const
 Return if the row under the mouse will be highlighted.
void setColumnHidden (int column, bool hide)
 Change the visibility of a column.
bool isColumnHidden (int column) const
 Return if a column is hidden.
void hideColumn (int column)
 Hide a column.
void showColumn (int column)
 Show a column.
void setColumnWidth (int column, int pixels)
 Set the column width (in pixels) for a column.
int columnWidth (int column) const
 Return the column width.
void setColumnAlignment (int column, AlignmentFlag alignment)
 Set the horizontal content alignment of a column.
AlignmentFlag columnAlignment (int column) const
 Return the horizontal content alignment of a column.
void setColumnSortable (int column, bool sortable)
 Allow a column to be sorted by the user.
bool isColumnSortable (int column) const
 Return if a column is sortable.
void enableColumnHiding (int column, bool enable)
 Allow a column to be hidden through its context menu.
bool isColumnHidingEnabled (int column) const
 Return if a column may be hidden through its context menu.
void setEditor (int column, FormField *editor)
 Configure an editor for the given column.
void setRenderer (int column, const std::string &rendererJS)
 Configure a custom renderer for the given column.
void setPageSize (int pageSize)
 Configure a page size to browse the data page by page.
int pageSize () const
 Return the page size.
ToolBarcreatePagingToolBar ()
 Create a paging tool bar.
virtual void refresh ()
 Refresh the widget.
void setCurrentCell (int row, int column)
 Give a cell focus.
int currentRow () const
 Return the index of the row currently selected.
int currentColumn () const
 Return the index of the column currently selected.
const std::vector< int > & selectedRows ()
 The list of rows that are currently selected.
void clearSelection ()
 Clear the current selection.
SelectionMode selectionMode () const
 Return the current selection mode.
void setSelectionMode (SelectionMode mode)
 Set the selection mode.
void setSelectionBehavior (SelectionBehavior behavior)
 Set the selection behaviour.
SelectionBehavior selectionBehavior () const
 Return the current selection behaviour.
Signal< int, int > & cellClicked ()
 Signal emitted when a cell is clicked.
Signal< int, int, int, int > & currentCellChanged ()
 Signal emitted when a new cell received focus.
SignalitemSelectionChanged ()
 Signal emitted when the selection changes.

+Static Public Member Functions

static std::string dateRenderer (const WString &format)
 Create a date renderer for the given format.
+

Detailed Description

+

A widget that displays data in a table.

+

This class is an MVC view widget, which works in conjunction with a WAbstractItemModel for the data. The model may be set (and changed) using setModel().

+

The widget may be configured to allow the user to hide or resize columns, sort on column data, or reorder columns using drag&drop.

+

By default, the table is not editable. Use setEditor() to specify a form field that may be used for inline editing for a particular column. Changes are then reflected in the model().

+

The table supports single and multiple selection modes, that work on a row-level, or cell-level. The latter option is enforced when the table is editable.

+

By default, the data of the model is stored client-side, but this may be changed using setDataLocation() to be server-side. The latter option allows, in conjunction with a paging tool bar (see createPagingToolBar()) to support viewing (and editing) of large data sets.

+

Although TableView inherits from Container (through Panel), specifying a layout for adding or removing widgets is not supported. The Panel methods to specify tool bars, titles, and buttons are however supported.

+
+ExtTableView-1.png +

Example of a TableView

+
+ExtTableView-2.png +

Example of a editing in a TableView using a ComboBox

+

CSS

+

A TableView has the table.x-grid3-row-table style classes.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::Ext::TableView::TableView (WContainerWidget parent = 0 )
+
+
+ +

Create a new table view.

+

You should specify a model using setModel(WAbstractItemModel *).

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::Ext::TableView::alternatingRowColors ( ) const
+
+
+ +

Return if rows are rendered with alternating colors.

+
See also:
setAlternatingRowColors(bool)
+ +
+
+ +
+
+ + + + + + + +
Signal<int, int>& Wt::Ext::TableView::cellClicked ( )
+
+
+ +

Signal emitted when a cell is clicked.

+

The signal arguments are row and column of the cell that is clicked.

+
See also:
currentCellChanged()
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::TableView::clearSelection ( )
+
+
+ +

Clear the current selection.

+
See also:
setCurrentCell(int, int)
+ +
+
+ +
+
+ + + + + + + + +
AlignmentFlag Wt::Ext::TableView::columnAlignment (int  column ) const
+
+
+ +

Return the horizontal content alignment of a column.

+
See also:
setColumnAlignment(int, AlignmentFlag)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::Ext::TableView::columnsMovable ( ) const
+
+
+ +

Return if columns are movable.

+
See also:
setColumnsMovable(bool)
+ +
+
+ +
+
+ + + + + + + + +
int Wt::Ext::TableView::columnWidth (int  column ) const
+
+
+ +

Return the column width.

+
See also:
setColumnWidth(int, int)
+ +
+
+ +
+
+ + + + + + + +
ToolBar * Wt::Ext::TableView::createPagingToolBar ( )
+
+
+ +

Create a paging tool bar.

+

Create a toolbar that provides paging controls for this table. You should configure the page size using setPageSize(int).

+
See also:
setPageSize(int), setDataLocation(DataLocation)
+
+setBottomToolBar(ToolBar *), setTopToolBar(ToolBar *)
+ +
+
+ +
+
+ + + + + + + +
Signal<int, int, int, int>& Wt::Ext::TableView::currentCellChanged ( )
+
+
+ +

Signal emitted when a new cell received focus.

+

This signal is only emitted when selectionBehavior() is SelectItems. The four arguments are row, column, prevrow, prevcolumn which hold respectively the location of the new focussed cell, and the previously focussed cell.

+

Values of -1 indicate 'no selection'.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::TableView::currentColumn ( ) const
+
+
+ +

Return the index of the column currently selected.

+
See also:
currentRow(), setCurrentCell(int, int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::TableView::currentRow ( ) const
+
+
+ +

Return the index of the row currently selected.

+
See also:
currentColumn(), setCurrentCell(int, int)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::Ext::TableView::dateRenderer (const WString format ) [static]
+
+
+ +

Create a date renderer for the given format.

+

The result is a JavaScript function that renders WDate (or more precisely, Ext.Date) values according to the given format, for use in setRenderer()

+
See also:
setRenderer()
+
+WDate::toString(const WString& format)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::enableColumnHiding (int  column,
bool  enable 
)
+
+
+ +

Allow a column to be hidden through its context menu.

+
See also:
isColumnHidingEnabled(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::hideColumn (int  column )
+
+
+ +

Hide a column.

+
See also:
showColumn(int), setColumnHidden(int, bool)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::Ext::TableView::isColumnHidden (int  column ) const
+
+
+ +

Return if a column is hidden.

+
See also:
setColumnHidden(int, bool)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::Ext::TableView::isColumnHidingEnabled (int  column ) const
+
+
+ +

Return if a column may be hidden through its context menu.

+
See also:
enableColumnHiding(int, bool)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::Ext::TableView::isColumnSortable (int  column ) const
+
+
+ +

Return if a column is sortable.

+
See also:
setColumnSortable(int, bool)
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::Ext::TableView::itemSelectionChanged ( )
+
+
+ +

Signal emitted when the selection changes.

+
See also:
currentRow(), currentColumn() when selectionBehavior() is SelectItems
+
+selectedRows() when selectionBehavior() is SelectRows.
+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::Ext::TableView::model ( ) const
+
+
+ +

Return the model.

+
See also:
setModel(WAbstractItemModel *)
+ +
+
+ +
+
+ + + + + + + +
int Wt::Ext::TableView::pageSize ( ) const
+
+
+ +

Return the page size.

+
See also:
setPageSize(int)
+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::TableView::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::Ext::Panel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::resizeColumnsToContents (bool  onResize = false )
+
+
+ +

Let the table view resize columns to fit their contents.

+

By default, columns are sized using the column sizes that are provided. Using this method, this is changed to let columns expand to fit the entire table. By setting onResize, this is done also whenever the entire table or one of the columns is resized.

+ +
+
+ +
+
+ + + + + + + +
const std::vector<int>& Wt::Ext::TableView::selectedRows ( )
+
+
+ +

The list of rows that are currently selected.

+

This is the way to retrieve the list of currently selected rows when selectionBehavior() is SelectRows. This list is always empty when selectionBehavior() is SelectItems and you should use currentRow() and currentColumn() instead.

+ +
+
+ +
+
+ + + + + + + +
SelectionBehavior Wt::Ext::TableView::selectionBehavior ( ) const
+
+
+ +

Return the current selection behaviour.

+
See also:
selectionBehavior()
+ +
+
+ +
+
+ + + + + + + +
SelectionMode Wt::Ext::TableView::selectionMode ( ) const
+
+
+ +

Return the current selection mode.

+
See also:
setSelectionMode(SelectionMode)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setAlternatingRowColors (bool  enable )
+
+
+ +

Render rows with alternating colors.

+

By defaults, all rows are rendered using the same color.

+
See also:
alternatingRowColors()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setAutoExpandColumn (int  column,
int  minWidth = 50,
int  maxWidth = 1000 
)
+
+
+ +

Set the column which will auto-expand to take the remaining space.

+

By default the last column will do that.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setColumnAlignment (int  column,
AlignmentFlag  alignment 
)
+
+
+ +

Set the horizontal content alignment of a column.

+

The default value is AlignLeft. The alignment parameter is a horizontal alignment flag.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setColumnHidden (int  column,
bool  hide 
)
+
+
+ +

Change the visibility of a column.

+
See also:
isColumnHidden(int), enableColumnHiding(int, bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setColumnsMovable (bool  movable )
+
+
+ +

Allow the user to move columns using drag and drop.

+

Setting movable to true, enables the user to move columns around by drag and drop.

+

Note: this currently breaks the CellSelection mode to record the view column number, but not the data column number.

+
See also:
columnsMovable()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setColumnSortable (int  column,
bool  sortable 
)
+
+
+ +

Allow a column to be sorted by the user.

+
See also:
isColumnSortable(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setColumnWidth (int  column,
int  pixels 
)
+
+
+ +

Set the column width (in pixels) for a column.

+
See also:
columnWidth(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setCurrentCell (int  row,
int  column 
)
+
+
+ +

Give a cell focus.

+

When selectionBehavior() is SelectRows, only the row argument is used, and the effect is to select a particular row.

+

Even when selectionMode() is ExtendedSelection, this method will first clear selection, and the result is that the given row,column will be the only selected cell.

+
See also:
currentRow(), currentColumn(), currentCellChanged() signal
+
+setSelectionMode(SelectionMode), setSelectionBehavior(SelectionBehavior)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setDataLocation (DataLocation  dataLocation )
+
+
+ +

Configure the location of the data.

+

By default, data is stored at the client, and therefore entirely transmitted when rendering the table for the first time. Alternatively, the data may be kept at the server. Unless a paging tool bar is configured however, this will still cause the entire table to be anyway, after the table is rendered. When a paging tool bar is configured, only a single page of data is displayed, and transmitted, giving the best performance for big data sets.

+
See also:
createPagingToolBar()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setEditor (int  column,
FormField editor 
)
+
+
+ +

Configure an editor for the given column.

+

Sets an inline editor that will be used to edit values in this column. The edited value will be reflected in the data model.

+

When configuring an editor, the selectionBehaviour() is set to SelectItems mode.

+
See also:
LineEdit, NumberField, DateField, ComboBox
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setHighlightMouseOver (bool  highlight )
+
+
+ +

Configure if the row under the mouse will be highlighted.

+

By default, the row under the mouse is not highlighted.

+
See also:
highlightMouseOver()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setModel (WAbstractItemModel model )
+
+
+ +

Specify the model.

+

You can change the model at any time, with the contraint that you should keep the same column configuration.

+

You may also reset the same model. This will result in retransmission of the model from scratch. In some cases, this could result in a higher preformance when you have removed many rows or modified a lot of data.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setPageSize (int  pageSize )
+
+
+ +

Configure a page size to browse the data page by page.

+

By setting a pageSize that is different from -1, the table view will display only single pages of the whole data set. You should probably add a paging tool bar to allow the user to scroll through the pages.

+
See also:
pageSize(), createPagingToolBar()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TableView::setRenderer (int  column,
const std::string &  rendererJS 
)
+
+
+ +

Configure a custom renderer for the given column.

+

Sets a JavaScript function to render values in the given column. The JavaScript function takes one argument (the value), which has a type that corresponds to the C++ type:

+ + + + + + + + + +
C++ typeJavaScript type
WStringstring
WDateExt.Date
number typenumber
+

An example of rendererJS for numerical data, which renders positive values in green and negative values in red could be:

+
 function change(val) {
+   if (val > 0){
+     return '<span style="color:green;">' + val + '</span>';
+   } else if(val < 0) {
+     return '<span style="color:red;">' + val + '</span>';
+   }
+   return val;
+ }
+
See also:
dateRenderer()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setSelectionBehavior (SelectionBehavior  behavior )
+
+
+ +

Set the selection behaviour.

+

The selection behavior defines the unit of selection. The selection behavior also determines the set of methods that must be used to inspect the current selection.

+

You may either:

+ + +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::setSelectionMode (SelectionMode  mode )
+
+
+ +

Set the selection mode.

+

The selection mode determines if no, only one, or multiple items may be selected.

+

When selectionBehavior() is SelectItems, ExtendedSelection is not supported.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Ext::TableView::showColumn (int  column )
+
+
+ +

Show a column.

+
See also:
hideColumn(int), setColumnHidden(int, bool)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.map new file mode 100644 index 0000000..9249116 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.md5 new file mode 100644 index 0000000..26b0d8d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.md5 @@ -0,0 +1 @@ +103e4e0fa1747d0cb00abefd07eace33 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.png new file mode 100644 index 0000000..bc19077 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TableView__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit-members.html new file mode 100644 index 0000000..6340c1e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit-members.html @@ -0,0 +1,209 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::TextEdit Member List

+
+
+This is the complete list of members for Wt::Ext::TextEdit, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Below enum valueWt::Ext::FormField
Besides enum valueWt::Ext::FormField
blurred()Wt::Ext::FormField
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::Ext::FormField
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::Ext::Component
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::Ext::Component
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
FancyToolTip enum valueWt::Ext::FormField
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::Ext::FormField
FormField(WContainerWidget *parent=0)Wt::Ext::FormField [protected]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::Ext::Component [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
label() const Wt::Ext::FormField
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
MessageLocation enum nameWt::Ext::FormField
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
PlainToolTip enum valueWt::Ext::FormField
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::Ext::FormField [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::Ext::TextEdit [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setEnableAlignments(bool enable)Wt::Ext::TextEdit
setEnableColors(bool enable)Wt::Ext::TextEdit
setEnabled(bool how)Wt::Ext::Component
setEnableFont(bool enable)Wt::Ext::TextEdit
setEnableFormat(bool enable)Wt::Ext::TextEdit
setEnableLinks(bool enable)Wt::Ext::TextEdit
setEnableLists(bool enable)Wt::Ext::TextEdit
setEnableSourceEdit(bool enable)Wt::Ext::TextEdit
setErrorMessageLocation(MessageLocation location)Wt::Ext::FormField
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::Ext::FormField
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLinkDefault(const WString &text, const WString &location)Wt::Ext::TextEdit
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &value)Wt::Ext::TextEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::Ext::FormField
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::Ext::TextEdit
TextEdit(WContainerWidget *parent=0)Wt::Ext::TextEdit
TextEdit(const WString &text, WContainerWidget *parent=0)Wt::Ext::TextEdit
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validate()Wt::Ext::TextEdit [virtual]
validator() const Wt::Ext::FormField
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit.html new file mode 100644 index 0000000..9a82a6f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit.html @@ -0,0 +1,191 @@ + + + + +Wt: Wt::Ext::TextEdit Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::TextEdit Class Reference
+ +[Ext widgets] +

+
+
+ +

A rich-text editor. +More...

+ +

#include <Ext/TextEdit>

+
+Inheritance diagram for Wt::Ext::TextEdit:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

TextEdit (WContainerWidget *parent=0)
 Create a rich text editor with empty text.
TextEdit (const WString &text, WContainerWidget *parent=0)
 Create a rich text editor initialized with the given HTML text.
+void setText (const WString &value)
 Set the text.
+const WStringtext () const
 Return the text.
+void setLinkDefault (const WString &text, const WString &location)
 Set the default location and link text used when inserting a link.
+void setEnableAlignments (bool enable)
 Enable or disable alignment buttons.
+void setEnableColors (bool enable)
 Enable or disable changing of text color.
+void setEnableFont (bool enable)
 Enable or disable changing of text font.
+void setEnableFormat (bool enable)
 Enable or disable changing of text formatting.
+void setEnableLinks (bool enable)
 Enable or disable insertion of links.
+void setEnableLists (bool enable)
 Enable or disable insertion of lists.
+void setEnableSourceEdit (bool enable)
 Enable or disable a view which shows the raw HTML source.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
+virtual WValidator::State validate ()
 Validate the field.
+

Detailed Description

+

A rich-text editor.

+

A rich-text editor that provides interactive editing of HTML, including basic mark-up (font, formatting, color, links, and lists).

+
+ExtTextEdit-1.png +

TextEdit

+
Note:
This widget does not work in XHTML documents. Use WTextEdit instead.
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::TextEdit::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.map new file mode 100644 index 0000000..4c940c8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.md5 new file mode 100644 index 0000000..004f77b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.md5 @@ -0,0 +1 @@ +dd6fd4283e8063e852a32e12cd567a8e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.png new file mode 100644 index 0000000..4d3d9ae Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1TextEdit__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar-members.html new file mode 100644 index 0000000..e1ea95a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar-members.html @@ -0,0 +1,194 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::ToolBar Member List

+
+
+This is the complete list of members for Wt::Ext::ToolBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
add(Button *item)Wt::Ext::ToolBar
add(WWidget *item)Wt::Ext::ToolBar
addButton(const WString &text)Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text)Wt::Ext::ToolBar
addButton(const WString &text, T *target, void(V::*method)())Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text, T *target, void(V::*method)())Wt::Ext::ToolBar
addButton(const WString &text, Menu *menu)Wt::Ext::ToolBar
addButton(const std::string &iconPath, const WString &text, Menu *menu)Wt::Ext::ToolBar
Wt::WObject::addChild(WObject *child)Wt::WObject
addSeparator()Wt::Ext::ToolBar
addStretch()Wt::Ext::ToolBar
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insert(int index, Button *item)Wt::Ext::ToolBar
insert(int index, WWidget *item)Wt::Ext::ToolBar
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
ToolBar(WContainerWidget *parent=0)Wt::Ext::ToolBar
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar.html new file mode 100644 index 0000000..40dadb8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar.html @@ -0,0 +1,282 @@ + + + + +Wt: Wt::Ext::ToolBar Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::ToolBar Class Reference
+ +[Ext widgets] +

+
+
+ +

A class that represents a tool bar (or a menu bar). +More...

+ +

#include <Wt/Ext/ToolBar>

+
+Inheritance diagram for Wt::Ext::ToolBar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ToolBar (WContainerWidget *parent=0)
 Create a new tool bar.
+ButtonaddButton (const WString &text)
 Add a button with given text.
+ButtonaddButton (const std::string &iconPath, const WString &text)
 Add a button with given icon and text.
template<class T , class V >
ButtonaddButton (const WString &text, T *target, void(V::*method)())
 Add a button with given text, and specify a slot method to be called when activated.
template<class T , class V >
ButtonaddButton (const std::string &iconPath, const WString &text, T *target, void(V::*method)())
 Add a button with given text and icon, and specify a slot method to be called when activated.
+ButtonaddButton (const WString &text, Menu *menu)
 Add a menu button, with given text.
+ButtonaddButton (const std::string &iconPath, const WString &text, Menu *menu)
 Add a menu button, with given icon and text.
+void add (Button *item)
 Add a button to the tool bar.
+void add (WWidget *item)
 Add a widget to the tool bar.
+void insert (int index, Button *item)
 Insert a button in the tool bar.
void insert (int index, WWidget *item)
 Insert a widget in the tool bar.
+void addSeparator ()
 Add a separator to the tool bar.
void addStretch ()
 Adds stretch to the tool bar.
+

Detailed Description

+

A class that represents a tool bar (or a menu bar).

+

A tool bar shows buttons (and other widgets). When using text-only buttons, the tool bar behaves like a top-level menu.

+
+ExtToolBar-1.png +

Example of a ToolBar

+

Member Function Documentation

+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Button * Wt::Ext::ToolBar::addButton (const std::string &  iconPath,
const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Add a button with given text and icon, and specify a slot method to be called when activated.

+

The target and method are connected to the Button::activated() signal.

+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Button * Wt::Ext::ToolBar::addButton (const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Add a button with given text, and specify a slot method to be called when activated.

+

The target and method are connected to the Button::activated() signal.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Ext::ToolBar::addStretch ( )
+
+
+ +

Adds stretch to the tool bar.

+

This is an empty space that will stretch and push contents to the right of it away to the very right end.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Ext::ToolBar::insert (int  index,
WWidget item 
)
+
+
+ +

Insert a widget in the tool bar.

+
Note:
A widget can ony be inserted before initial rendering.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.map new file mode 100644 index 0000000..8d0e996 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.md5 new file mode 100644 index 0000000..9c40081 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.md5 @@ -0,0 +1 @@ +ab9f6091d7636fd4139039aafd5ffe97 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.png new file mode 100644 index 0000000..23ca2fc Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolBar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig-members.html new file mode 100644 index 0000000..b0666e9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig-members.html @@ -0,0 +1,106 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::ToolTipConfig Member List

+
+
+This is the complete list of members for Wt::Ext::ToolTipConfig, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
animateWt::Ext::ToolTipConfig
autoDismissWt::Ext::ToolTipConfig
autoHideWt::Ext::ToolTipConfig
children() const Wt::WObject
dismissDelayWt::Ext::ToolTipConfig
getStateless(Method method)Wt::WObject [protected, virtual]
hideDelayWt::Ext::ToolTipConfig
hideOnClickWt::Ext::ToolTipConfig
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
maxWidthWt::Ext::ToolTipConfig
Method typedefWt::WObject
minWidthWt::Ext::ToolTipConfig
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setObjectName(const std::string &name)Wt::WObject
showDelayWt::Ext::ToolTipConfig
ToolTipConfig(WObject *parent=0)Wt::Ext::ToolTipConfig
trackMouseWt::Ext::ToolTipConfig
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig.html new file mode 100644 index 0000000..3eeea7c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig.html @@ -0,0 +1,299 @@ + + + + +Wt: Wt::Ext::ToolTipConfig Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::ToolTipConfig Class Reference
+ +[Ext widgets] +

+
+
+ +

A configuration object for tool tips. +More...

+ +

#include <Wt/Ext/ToolTipConfig>

+
+Inheritance diagram for Wt::Ext::ToolTipConfig:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ToolTipConfig (WObject *parent=0)
 Create a default tool tip configuration object.

+Public Attributes

bool autoDismiss
 Option to dismiss the tool tip automatically after a fixed period.
bool autoHide
 Option to hide the tool tip when the mouse moves away.
int dismissDelay
 Delay (in milliseconds) to dismiss the tool tip.
int hideDelay
 Delay (in milliseconds) to hide the tool tip.
int showDelay
 Delay (in milliseconds) to show the tool tip.
bool animate
 Option to use animations.
bool hideOnClick
 Option to hide when the user clicks anywhere.
int maxWidth
 Maximum tool tip width (pixels).
int minWidth
 Minimum tool tip width (pixels).
bool trackMouse
 Option to track the mouse.
+

Detailed Description

+

A configuration object for tool tips.

+
See also:
AbstractButton::configureToolTip()
+

Member Data Documentation

+ +
+ +
+ +

Option to use animations.

+

The default value is false.

+ +
+
+ +
+ +
+ +

Option to dismiss the tool tip automatically after a fixed period.

+

The default value is true.

+ +
+
+ +
+ +
+ +

Option to hide the tool tip when the mouse moves away.

+

The default value is true.

+ +
+
+ +
+ +
+ +

Delay (in milliseconds) to dismiss the tool tip.

+

The default value is 5000.

+
See also:
autoDismiss
+ +
+
+ +
+ +
+ +

Delay (in milliseconds) to hide the tool tip.

+

The default value is 200.

+
See also:
autoHide
+ +
+
+ +
+ +
+ +

Option to hide when the user clicks anywhere.

+

The default value is true.

+ +
+
+ +
+ +
+ +

Maximum tool tip width (pixels).

+

The default value is 300.

+ +
+
+ +
+ +
+ +

Minimum tool tip width (pixels).

+

The default value is 40.

+ +
+
+ +
+ +
+ +

Delay (in milliseconds) to show the tool tip.

+

The default value is 500.

+ +
+
+ +
+ +
+ +

Option to track the mouse.

+

The default value is false

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.map new file mode 100644 index 0000000..c1be8a7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.md5 new file mode 100644 index 0000000..c681369 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.md5 @@ -0,0 +1 @@ +636aad510e7c1770f7f62173997feefd \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.png new file mode 100644 index 0000000..d60e292 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1ToolTipConfig__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget-members.html new file mode 100644 index 0000000..3853e05 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget-members.html @@ -0,0 +1,181 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Ext::Widget Member List

+
+
+This is the complete list of members for Wt::Ext::Widget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool how)Wt::Ext::Widget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~Widget()Wt::Ext::Widget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget.html new file mode 100644 index 0000000..6347f10 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget.html @@ -0,0 +1,141 @@ + + + + +Wt: Wt::Ext::Widget Class Reference + + + + + + + + + +
+ +
+

Wt::Ext::Widget Class Reference
+ +[Ext widgets] +

+
+
+ +

An abstract base class for all Ext widgets. +More...

+ +

#include <Wt/Ext/Widget>

+
+Inheritance diagram for Wt::Ext::Widget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

~Widget ()
 Delete a widget.
virtual void setHidden (bool how)
 Sets whether the widget is hidden.
+

Detailed Description

+

An abstract base class for all Ext widgets.

+

Ext Widgets wrap around JavaScript-only widgets that are provided by the Ext JS JavaScript widget library.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Ext::Widget::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Reimplemented from Wt::WWebWidget.

+ +

Reimplemented in Wt::Ext::Dialog, and Wt::Ext::MessageBox.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.map new file mode 100644 index 0000000..6b2573e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.map @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.md5 new file mode 100644 index 0000000..4176395 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.md5 @@ -0,0 +1 @@ +8ae61d06a45411a30e28b8b196f79873 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.png new file mode 100644 index 0000000..20965e7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Ext_1_1Widget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client-members.html new file mode 100644 index 0000000..199d008 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::Client Member List

+
+
+This is the complete list of members for Wt::Http::Client, including all inherited members. + + + +
ClientOption enum nameWt::Http::Client
startWtSession(const std::string &host, const std::string &port, const std::string &path, const std::string &query=std::string(), WFlags< ClientOption > flags=SupportsAjax)Wt::Http::Client [static]
SupportsAjax enum valueWt::Http::Client
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client.html new file mode 100644 index 0000000..ed286a4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Client.html @@ -0,0 +1,182 @@ + + + + +Wt: Wt::Http::Client Class Reference + + + + + + + + + +
+ +
+

Wt::Http::Client Class Reference

+
+
+ +

Collection of methods for dealing with a Wt application from a client perspective. +More...

+ +

#include <Wt/Http/Client>

+ +

List of all members.

+ + + + + + + +

+Public Types

enum  ClientOption { SupportsAjax = 0x1 + }
 

Enumeration for client user-agent options.

+ More...

+Static Public Member Functions

static void startWtSession (const std::string &host, const std::string &port, const std::string &path, const std::string &query=std::string(), WFlags< ClientOption > flags=SupportsAjax)
 Starts a Wt session.
+

Detailed Description

+

Collection of methods for dealing with a Wt application from a client perspective.

+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration for client user-agent options.

+
Enumerator:
+ +
SupportsAjax  +

Flag that indicates supports for AJAX.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Http::Client::startWtSession (const std::string &  host,
const std::string &  port,
const std::string &  path,
const std::string &  query = std::string(),
WFlags< ClientOption flags = SupportsAjax 
) [static]
+
+
+ +

Starts a Wt session.

+

A Wt application uses a bootstrap procedure during which it collects information on user agent capabilities (unless the progressive bootstrap method is enabled). Therefore a session is not spawned after the first request, but only after these capabilities have been collected by a second request.

+

This function starts a session on the specific host, port, path, and optional query. These correspond to the different parts of a url:

+

http://host:port/path?query.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request-members.html new file mode 100644 index 0000000..81f182a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request-members.html @@ -0,0 +1,99 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::Request Member List

+
+
+This is the complete list of members for Wt::Http::Request, including all inherited members. + + + + + + + + + + + + + + + + + + + + + +
clientAddress() const Wt::Http::Request
contentLength() const Wt::Http::Request
contentType() const Wt::Http::Request
continuation() const Wt::Http::Request
getParameter(const std::string &name) const Wt::Http::Request
getParameterMap() const Wt::Http::Request
getParameterValues(const std::string &name) const Wt::Http::Request
getRanges(::int64_t filesize) const Wt::Http::Request
getUploadedFile(const std::string &name) const Wt::Http::Request
headerValue(const std::string &field) const Wt::Http::Request
in() const Wt::Http::Request
method() const Wt::Http::Request
path() const Wt::Http::Request
pathInfo() const Wt::Http::Request
queryString() const Wt::Http::Request
serverName() const Wt::Http::Request
serverPort() const Wt::Http::Request
tooLarge() const Wt::Http::Request
uploadedFiles() const Wt::Http::Request
urlScheme() const Wt::Http::Request
userAgent() const Wt::Http::Request
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request.html new file mode 100644 index 0000000..3394eb1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request.html @@ -0,0 +1,552 @@ + + + + +Wt: Wt::Http::Request Class Reference + + + + + + + + + +
+ +
+

Wt::Http::Request Class Reference

+
+
+ +

An HTTP request. +More...

+ +

#include <Wt/Http/Request>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  ByteRange
 A single byte range. More...
class  ByteRangeSpecifier
 A byte range specifier. More...

+Public Member Functions

const ParameterMapgetParameterMap () const
 Returns the query parameters.
const UploadedFileMapuploadedFiles () const
 Returns uploaded file parameters.
const ParameterValuesgetParameterValues (const std::string &name) const
 Returns all values for a query parameter.
const std::string * getParameter (const std::string &name) const
 Returns a query parameter value.
const UploadedFilegetUploadedFile (const std::string &name) const
 Returns an uploaded file.
int tooLarge () const
 Returns a non-zero value that exceeded the maximum allowed request.
ResponseContinuationcontinuation () const
 Returns a continuation object.
std::string serverName () const
 Returns the (public) server name.
std::string serverPort () const
 Returns the server port.
std::string path () const
 Returns the request path.
std::string pathInfo () const
 Returns the request path info.
+std::string queryString () const
 Returns the request query string.
std::string urlScheme () const
 Returns the url scheme used.
std::istream & in () const
 Returns the input stream for parsing the body.
std::string contentType () const
 Returns the "Content Type" of the request body.
int contentLength () const
 Returns the "Content Length" of the request body.
std::string userAgent () const
 Returns the user agent.
std::string clientAddress () const
 Returns the IP address of the client.
std::string headerValue (const std::string &field) const
 Returns a header value.
std::string method () const
 Returns the request method.
ByteRangeSpecifier getRanges (::int64_t filesize) const
 Returns the requested ranges as in the HTTP Range header.

+Friends

+class Wt::WResource
+

Detailed Description

+

An HTTP request.

+

The request provides information of parameters, including uploaded files, that were present in a GET or POST request.

+
See also:
WResource::handleRequest()
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string Wt::Http::Request::clientAddress ( ) const
+
+
+ +

Returns the IP address of the client.

+

The (most likely) IP address of the client that is connected to this session.

+

This is taken to be the first public address that is given in the Client-IP header, or in the X-Forwarded-For header (in case the client is behind a proxy). If none of these headers is present, the remote socket IP address is used.

+ +
+
+ +
+
+ + + + + + + +
int Wt::Http::Request::contentLength ( ) const
+
+
+ +

Returns the "Content Length" of the request body.

+
See also:
in()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::contentType ( ) const
+
+
+ +

Returns the "Content Type" of the request body.

+
See also:
in()
+ +
+
+ +
+
+ + + + + + + +
ResponseContinuation* Wt::Http::Request::continuation ( ) const
+
+
+ +

Returns a continuation object.

+

Returns a non-zero continuation object if the request is a continuation request for an earlier response for which a continuation was created.

+
See also:
Response::createContinuation()
+ +
+
+ +
+
+ + + + + + + + +
const std::string * Wt::Http::Request::getParameter (const std::string &  name ) const
+
+
+ +

Returns a query parameter value.

+

Returns the first value defined for a parameter named name or 0 if the paramter does not exist.

+ +
+
+ +
+
+ + + + + + + +
const ParameterMap& Wt::Http::Request::getParameterMap ( ) const
+
+
+ +

Returns the query parameters.

+

Returns parameters that were passed to the query, either inside the URL, or inside a POST request, excluding uploaded files.

+
See also:
uploadedFiles()
+ +
+
+ +
+
+ + + + + + + + +
const ParameterValues & Wt::Http::Request::getParameterValues (const std::string &  name ) const
+
+
+ +

Returns all values for a query parameter.

+

Returns all values defined for a parameter named name. A single parameter may have multiple values, e.g. in the query string '?param=value1&param=value2'.

+

Returns an empty list if the query parameter does not exist.

+ +
+
+ +
+
+ + + + + + + + +
Request::ByteRangeSpecifier Wt::Http::Request::getRanges (::int64_t  filesize ) const
+
+
+ +

Returns the requested ranges as in the HTTP Range header.

+

The filesize is used to adapt the ranges to the actual file size as per rules of RFC 2616. If the file size is unknown, pass -1.

+

You should check if the ranges are satisfiable using ByteRangeSpecifier::isSatisfiable().

+ +
+
+ +
+
+ + + + + + + + +
const UploadedFile * Wt::Http::Request::getUploadedFile (const std::string &  name ) const
+
+
+ +

Returns an uploaded file.

+

Returns the file uploaded for a parameter named name or 0 if the parameter does not contain does not exist or was not associated with a file input field.

+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::Http::Request::headerValue (const std::string &  field ) const
+
+
+ +

Returns a header value.

+

Returns a header value, or an empty string if the header was present.

+
Note:
Currently, the header name is case sensitive, although this should not be the case according to RFC2616
+ +
+
+ +
+
+ + + + + + + +
std::istream & Wt::Http::Request::in ( ) const
+
+
+ +

Returns the input stream for parsing the body.

+

If the request was a POST with as contentType() "application/x-www-form-urlencoded" or "multipart/form-data", the input stream will already have been consumed by Wt's CGI parser, and made available as parameters in the request.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::method ( ) const
+
+
+ +

Returns the request method.

+

Returns the HTTP request method ("GET", "POST", or other).

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::path ( ) const
+
+
+ +

Returns the request path.

+

Returns the path at which this request was received (excluding internal path information): it is the path at which the application or resource is deployed.

+
See also:
pathInfo()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::pathInfo ( ) const
+
+
+ +

Returns the request path info.

+

Returns additional path information internal to the path().

+
See also:
pathInfo()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::serverName ( ) const
+
+
+ +

Returns the (public) server name.

+

Returns the public server name. This is the server name that is advertised to outside, which is determined in a OS specific way.

+
See also:
serverPort()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::serverPort ( ) const
+
+
+ +

Returns the server port.

+

Returns the server port number through which this request was received.

+
See also:
serverName()
+ +
+
+ +
+
+ + + + + + + +
int Wt::Http::Request::tooLarge ( ) const
+
+
+ +

Returns a non-zero value that exceeded the maximum allowed request.

+
See also:
WApplication::requestTooLarge
+ +
+
+ +
+
+ + + + + + + +
const UploadedFileMap& Wt::Http::Request::uploadedFiles ( ) const
+
+
+ +

Returns uploaded file parameters.

+
See also:
getParameterMap()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::urlScheme ( ) const
+
+
+ +

Returns the url scheme used.

+

This is either "http" or "https"

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::Http::Request::userAgent ( ) const
+
+
+ +

Returns the user agent.

+

The user agent, as reported in the HTTP User-Agent field.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange-members.html new file mode 100644 index 0000000..2a47ea6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::Request::ByteRange Member List

+
+
+This is the complete list of members for Wt::Http::Request::ByteRange, including all inherited members. + + + + +
ByteRange()Wt::Http::Request::ByteRange
ByteRange(::uint64_t first,::uint64_t last)Wt::Http::Request::ByteRange
firstByte() const Wt::Http::Request::ByteRange
lastByte() const Wt::Http::Request::ByteRange
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange.html new file mode 100644 index 0000000..2aec079 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRange.html @@ -0,0 +1,110 @@ + + + + +Wt: Wt::Http::Request::ByteRange Class Reference + + + + + + + + + +
+ +
+

Wt::Http::Request::ByteRange Class Reference

+
+
+ +

A single byte range. +More...

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

ByteRange ()
 Creates a (0,0) byteranges.
ByteRange (::uint64_t first,::uint64_t last)
 Creates a byte range.
+::uint64_t firstByte () const
 Returns the first byte of this range.
+::uint64_t lastByte () const
 Returns the last byte of this range.
+

Detailed Description

+

A single byte range.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier-members.html new file mode 100644 index 0000000..8b9ee8d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::Request::ByteRangeSpecifier Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html new file mode 100644 index 0000000..ebe99cf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html @@ -0,0 +1,148 @@ + + + + +Wt: Wt::Http::Request::ByteRangeSpecifier Class Reference + + + + + + + + + +
+ +
+

Wt::Http::Request::ByteRangeSpecifier Class Reference

+
+
+ +

A byte range specifier. +More...

+ +

Inherits std::vector< ByteRange >.

+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

 ByteRangeSpecifier ()
 Creates an empty byte range specifier.
bool isSatisfiable () const
 Returns whether the range is satisfiable.
+void setSatisfiable (bool satisfiable)
 Sets whether the specifier is satisfiable.
+

Detailed Description

+

A byte range specifier.

+
See also:
getRanges()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::Http::Request::ByteRangeSpecifier::ByteRangeSpecifier ( )
+
+
+ +

Creates an empty byte range specifier.

+

The specifier is satisfiable but empty, indicating that no ranges were present.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::Http::Request::ByteRangeSpecifier::isSatisfiable ( ) const
+
+
+ +

Returns whether the range is satisfiable.

+

If the range specification is not satisfiable, RFC 2616 states you should return a response status of 416. isSatisfiable() will return true if a Range header was missing or a syntax error occured, in which case the number of ByteRanges will be zero and the client must send the entire file.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response-members.html new file mode 100644 index 0000000..1ea776e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::Response Member List

+
+
+This is the complete list of members for Wt::Http::Response, including all inherited members. + + + + + + + +
addHeader(const std::string &name, const std::string &value)Wt::Http::Response
continuation() const Wt::Http::Response
createContinuation()Wt::Http::Response
out()Wt::Http::Response
setContentLength(::uint64_t length)Wt::Http::Response
setMimeType(const std::string &mimeType)Wt::Http::Response
setStatus(int status)Wt::Http::Response
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response.html new file mode 100644 index 0000000..a6d98e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1Response.html @@ -0,0 +1,261 @@ + + + + +Wt: Wt::Http::Response Class Reference + + + + + + + + + +
+ +
+

Wt::Http::Response Class Reference

+
+
+ +

An HTTP response. +More...

+ +

#include <Wt/Http/Response>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

void setStatus (int status)
 Sets the response status.
void setContentLength (::uint64_t length)
 Sets the content length.
void setMimeType (const std::string &mimeType)
 Set the content mime type.
void addHeader (const std::string &name, const std::string &value)
 Add an HTTP header.
ResponseContinuationcreateContinuation ()
 Create a continuation object for this response.
ResponseContinuationcontinuation () const
 Return the continuation, if one was created for this response.
+std::ostream & out ()
 Returns the stream for getting the response output.

+Friends

+class Wt::WResource
+

Detailed Description

+

An HTTP response.

+

Use the HTTP response to format a response to an HTTP request (see Request).

+

More specifically you can:

+ +

You may chose to provide only a partial response. In that case, use createContinuation() to create a continuation object to which you can annotate information for the next request to process the response further.

+
See also:
WResource::handleRequest()
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::Http::Response::addHeader (const std::string &  name,
const std::string &  value 
)
+
+
+ +

Add an HTTP header.

+

Headers may be added only before setting the content mime-type (setMimeType()), and before streaming any data to the out() stream.

+ +
+
+ +
+
+ + + + + + + +
ResponseContinuation * Wt::Http::Response::continuation ( ) const
+
+
+ +

Return the continuation, if one was created for this response.

+

Returns the continuation that was previously created using createContinuation(), or 0 if no continuation was created yet.

+
See also:
createContinuation()
+ +
+
+ +
+
+ + + + + + + +
ResponseContinuation * Wt::Http::Response::createContinuation ( )
+
+
+ +

Create a continuation object for this response.

+

By creating a continuation object, a new request will be made for the resource to retrieve more data, after the current data has been sent out.

+
See also:
continuation()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Http::Response::setContentLength (::uint64_t  length )
+
+
+ +

Sets the content length.

+

If content length is known, use this method to set it. File downloads will see progress bars. If not set, Wt will use chunked transfers.

+

Always use this method instead of setting the Content-Length header with addHeader().

+

Headers may be added only before setting the content mime-type (setMimeType()), and before streaming any data to the out() stream.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Http::Response::setMimeType (const std::string &  mimeType )
+
+
+ +

Set the content mime type.

+

The content mimetype is used by the browser to correctly interpret the resource.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Http::Response::setStatus (int  status )
+
+
+ +

Sets the response status.

+

Unless a overriden, 200 OK will be assumed.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation-members.html new file mode 100644 index 0000000..b9e1f15 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::ResponseContinuation Member List

+
+
+This is the complete list of members for Wt::Http::ResponseContinuation, including all inherited members. + + + +
data()Wt::Http::ResponseContinuation
resource() const Wt::Http::ResponseContinuation
setData(const boost::any &data)Wt::Http::ResponseContinuation
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation.html new file mode 100644 index 0000000..77d6d27 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1ResponseContinuation.html @@ -0,0 +1,154 @@ + + + + +Wt: Wt::Http::ResponseContinuation Class Reference + + + + + + + + + +
+ +
+

Wt::Http::ResponseContinuation Class Reference

+
+
+ +

A response continuation object. +More...

+ +

#include <Wt/Http/ResponseContinuation>

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

void setData (const boost::any &data)
 Set data associated with the continuation.
boost::any data ()
 Return data associated with the continuation.
+WResourceresource () const
 Return the resource.

+Friends

+class Wt::WResource
+

Detailed Description

+

A response continuation object.

+

A response continuation object is used to keep track of a continued response, i.e. a response that is created in several parts.

+

You may associate data with the object using setData().

+
See also:
Response::createContinuation(), Request::continuation()
+

Member Function Documentation

+ +
+
+ + + + + + + +
boost::any Wt::Http::ResponseContinuation::data ( )
+
+
+ +

Return data associated with the continuation.

+
See also:
setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Http::ResponseContinuation::setData (const boost::any &  data )
+
+
+ +

Set data associated with the continuation.

+

You could do this to keep track of the state of sending the data for a WResource.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile-members.html new file mode 100644 index 0000000..4006ae2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Http::UploadedFile Member List

+
+
+This is the complete list of members for Wt::Http::UploadedFile, including all inherited members. + + + + +
clientFileName() const Wt::Http::UploadedFile
contentType() const Wt::Http::UploadedFile
spoolFileName() const Wt::Http::UploadedFile
stealSpoolFile() const Wt::Http::UploadedFile
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile.html new file mode 100644 index 0000000..2c882b4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Http_1_1UploadedFile.html @@ -0,0 +1,185 @@ + + + + +Wt: Wt::Http::UploadedFile Class Reference + + + + + + + + + +
+ +
+

Wt::Http::UploadedFile Class Reference

+
+
+ +

Details about a file uploaded with a (POST) request. +More...

+ +

#include <Wt/Http/Request>

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

const std::string & spoolFileName () const
 Return the spool file name.
const std::string & clientFileName () const
 Returns the client file name.
const std::string & contentType () const
 Returns the file content type.
void stealSpoolFile () const
 Steals the uploaded spool file.
+

Detailed Description

+

Details about a file uploaded with a (POST) request.

+
See also:
Request::uploadedFiles()
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string & Wt::Http::UploadedFile::clientFileName ( ) const
+
+
+ +

Returns the client file name.

+

This is the location that was indicated by the browser. Depending on the browser this is an absolute path or only the file name.

+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::Http::UploadedFile::contentType ( ) const
+
+
+ +

Returns the file content type.

+

Returns the content mime-type that was sent along with the uploaded file.

+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::Http::UploadedFile::spoolFileName ( ) const
+
+
+ +

Return the spool file name.

+

This is the location on the local (server) filesystem where the uploaded file is temporarily stored. Unless you call stealSpoolFile(), this file is deleted automatically.

+ +
+
+ +
+
+ + + + + + + +
void Wt::Http::UploadedFile::stealSpoolFile ( ) const
+
+
+ +

Steals the uploaded spool file.

+

By stealing the spooled file, it is no longer automatically deleted by Wt.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException-members.html new file mode 100644 index 0000000..534fd0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::InvalidDateException Member List

+
+
+This is the complete list of members for Wt::InvalidDateException, including all inherited members. + +
what() const Wt::InvalidDateException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException.html new file mode 100644 index 0000000..2aee15d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateException.html @@ -0,0 +1,104 @@ + + + + +Wt: Wt::InvalidDateException Class Reference + + + + + + + + + +
+ +
+

Wt::InvalidDateException Class Reference

+
+
+ +

Exception thrown when calculating with an invalid date. +More...

+ +

#include <Wt/WDate>

+ +

Inherits std::exception.

+ +

List of all members.

+ + + + +

+Public Member Functions

+const char * what () const throw ()
 Returns a message describing the error.
+

Detailed Description

+

Exception thrown when calculating with an invalid date.

+
See also:
WDate
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException-members.html new file mode 100644 index 0000000..f3bdb32 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::InvalidDateTimeException Member List

+
+
+This is the complete list of members for Wt::InvalidDateTimeException, including all inherited members. + +
what() const Wt::InvalidDateTimeException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException.html new file mode 100644 index 0000000..5e73de5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidDateTimeException.html @@ -0,0 +1,104 @@ + + + + +Wt: Wt::InvalidDateTimeException Class Reference + + + + + + + + + +
+ +
+

Wt::InvalidDateTimeException Class Reference

+
+
+ +

Exception thrown when calculating with an invalid date. +More...

+ +

#include <Wt/WDateTime>

+ +

Inherits std::exception.

+ +

List of all members.

+ + + + +

+Public Member Functions

+const char * what () const throw ()
 Returns a message describing the error.
+

Detailed Description

+

Exception thrown when calculating with an invalid date.

+
See also:
WDateTime
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException-members.html new file mode 100644 index 0000000..35f1690 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::InvalidTimeException Member List

+
+
+This is the complete list of members for Wt::InvalidTimeException, including all inherited members. + +
what() const Wt::InvalidTimeException
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException.html b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException.html new file mode 100644 index 0000000..c731d0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1InvalidTimeException.html @@ -0,0 +1,104 @@ + + + + +Wt: Wt::InvalidTimeException Class Reference + + + + + + + + + +
+ +
+

Wt::InvalidTimeException Class Reference

+
+
+ +

Exception thrown when calculating with an invalid time. +More...

+ +

#include <Wt/WTime>

+ +

Inherits std::exception.

+ +

List of all members.

+ + + + +

+Public Member Functions

+const char * what () const throw ()
 Returns a message describing the error.
+

Detailed Description

+

Exception thrown when calculating with an invalid time.

+
See also:
WTime
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal-members.html new file mode 100644 index 0000000..cbef7c1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal-members.html @@ -0,0 +1,101 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::JSignal< A1, A2, A3, A4, A5, A6 > Member List

+
+
+This is the complete list of members for Wt::JSignal< A1, A2, A3, A4, A5, A6 >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
connect(const F &function)Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)())Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4, A5))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))Wt::JSignal< A1, A2, A3, A4, A5, A6 >
connect(JSlot &slot)Wt::JSignal< A1, A2, A3, A4, A5, A6 >
Wt::SignalBase::connect(WObject *target, WObject::Method method)=0Wt::SignalBase [pure virtual]
createCall(const std::string &arg1=std::string(), const std::string &arg2=std::string(), const std::string &arg3=std::string(), const std::string &arg4=std::string(), const std::string &arg5=std::string(), const std::string &arg6=std::string()) const Wt::JSignal< A1, A2, A3, A4, A5, A6 >
createEventCall(const std::string &jsObject, const std::string &jsEvent, const std::string &arg1=std::string(), const std::string &arg2=std::string(), const std::string &arg3=std::string(), const std::string &arg4=std::string(), const std::string &arg5=std::string()) const Wt::JSignal< A1, A2, A3, A4, A5, A6 >
defaultActionPrevented() const Wt::EventSignalBase
emit(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)Wt::JSignal< A1, A2, A3, A4, A5, A6 >
isConnected() const Wt::JSignal< A1, A2, A3, A4, A5, A6 > [virtual]
JSignal(WObject *object, const std::string &name, bool collectSlotJavaScript=false)Wt::JSignal< A1, A2, A3, A4, A5, A6 >
name() const Wt::JSignal< A1, A2, A3, A4, A5, A6 >
operator()(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)Wt::JSignal< A1, A2, A3, A4, A5, A6 >
preventDefaultAction(bool prevent=true)Wt::EventSignalBase
preventPropagation(bool prevent=true)Wt::EventSignalBase
propagationPrevented() const Wt::EventSignalBase
sender() const Wt::SignalBase
~JSignal()Wt::JSignal< A1, A2, A3, A4, A5, A6 >
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal.html b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal.html new file mode 100644 index 0000000..7b97ebd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal.html @@ -0,0 +1,769 @@ + + + + +Wt: Wt::JSignal< A1, A2, A3, A4, A5, A6 > Class Template Reference + + + + + + + + + +
+ +
+

Wt::JSignal< A1, A2, A3, A4, A5, A6 > Class Template Reference
+ +[Signal/slot system] +

+
+
+ +

A signal to relay JavaScript to C++ calls. +More...

+ +

#include <Wt/WJavaScript>

+
+Inheritance diagram for Wt::JSignal< A1, A2, A3, A4, A5, A6 >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 JSignal (WObject *object, const std::string &name, bool collectSlotJavaScript=false)
 Construct a signal for the given object, and name.
~JSignal ()
 Destructor.
+const std::string & name () const
 Returns the signal name.
const std::string createCall (const std::string &arg1=std::string(), const std::string &arg2=std::string(), const std::string &arg3=std::string(), const std::string &arg4=std::string(), const std::string &arg5=std::string(), const std::string &arg6=std::string()) const
 Returns a JavaScript call that triggers the signal.
const std::string createEventCall (const std::string &jsObject, const std::string &jsEvent, const std::string &arg1=std::string(), const std::string &arg2=std::string(), const std::string &arg3=std::string(), const std::string &arg4=std::string(), const std::string &arg5=std::string()) const
 Returns a JavaScript call that triggers the signal, passing the original event too.
+virtual bool isConnected () const
 Returns whether the signal is connected to at least one slot.
template<class F >
boost::signals::connection connect (const F &function)
 Connect to a function.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)())
 Connect a slot that takes no arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1))
 Connect a slot that takes one argument.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2))
 Connect a slot that takes two arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3))
 Connect a slot that takes three arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4))
 Connect a slot that takes four arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4, A5))
 Connect a slot that takes five arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))
 Connect a slot that takes six arguments.
void connect (JSlot &slot)
 Connect a slot that is specified as JavaScript only.
void emit (A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)
 Emit the signal.
void operator() (A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)
 Emit the signal.
+

Detailed Description

+

template<typename A1 = NoClass, typename A2 = NoClass, typename A3 = NoClass, typename A4 = NoClass, typename A5 = NoClass, typename A6 = NoClass>
+ class Wt::JSignal< A1, A2, A3, A4, A5, A6 >

+ +

A signal to relay JavaScript to C++ calls.

+

A JSignal, like an EventSignal, provides communicates events from JavaScript to C++ code. However, it not tied to a built-in event. Instead, it can be emitted from within custom JavaScript code using the JavaScript Wt.emit() function.

+

The signal is identified by a unique name within the scope of a WObject, or a unique global name (when declaring the signal in your WApplication).

+

The signal supports up to 6 arguments. Values for these arguments may be specified in the JavaScript Wt.emit() (or the deprecated global function WtSignalEmit()).

+

Example code:

+
 class MyWidget : public WCompositeWidget
+ {
+ public:
+   MyWidget()
+     : doSome_(this, "doSome")
+   {
+     ...
+   }
+
+   JSignal<std::string, int>& doSome() { return doSome_; }
+
+ private:
+   JSignal<std::string, int> doSome_;
+
+   ...
+ };
+

The following JavaScript statement will emit the signal for a DOM element element that corresponds to a widget of class MyWidget:

+
 Wt.emit(element, 'dosome', 'foo', 42);
+

The element can be a DOM element, or the object ID of a WObject, or the constant 'Wt' which is an alias for 'WtWApplication::instance()->id()'. The conversion between the JavaScript arguments (ax) and the C++ type Ax uses boost::lexical_cast<Ax>(ax).

+

You can use the methods createCall() to let the signal itself generate this JavaScript call for you:

+
 doSome_.createCall("'foo'", "42");
+

The JavaScript generated by createCall() is possibly affected by every connect or disconnect to the signal. In practice, you will use JSignal internally within a widget and call createCall() only after you connected internal slots to signal.

+

It is also possible to propagate an original JavaScript event as a last argument, of type WMouseEvent or WKeyEvent. In that case, the second argument in Wt.emit() must be an object which indicates also the JavaScript event and event target.

+

Consider a signal declaration:

+
 JSignal<std::string, int, WMouseEvent> doSome();
+

Then, the following would be a suitable JavaScript call:

+
 Wt.emit(Wt, {name: 'dosome', event: event, eventObject: object}, 'foo', 42);
+

The method createEventCall() may be used this variation for the JavaScript method call.

+

Since the conversion from JavaScript to C++ uses boost::lexical_cast<T>(arg), you may provide support for custom types by implementing the c++ input stream operator operator<< (std::istream&, T& t) for your type.

+
See also:
WWidget::jsRef(), WObject::id()
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::JSignal< A1, A2, A3, A4, A5, A6 >::JSignal (WObject object,
const std::string &  name,
bool  collectSlotJavaScript = false 
)
+
+
+ +

Construct a signal for the given object, and name.

+

The given name must be unique for all user signals specified for the object object. Ownership of the signal is not transferred to the object.

+

If collectSlotJavaScript is true, then javascript specified for connected slots (using JSlot) or learned by stateless slot learning, is collected to client-side JavaScript.

+

Use the utility methods createCall() or createEventCall() to create the appropriate JavaScript statements that invoke the signal, which take into account possible other client-side JavaScript handling associated with the signal.

+
See also:
stateless slot learning
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class F >
+ + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (const F &  function )
+
+
+ +

Connect to a function.

+

This variant of the overloaded connect() method supports a template function object (which supports operator ()).

+

When the receiver function is an object method, the signal will automatically be disconnected when the object is deleted, as long as the object inherits from WObject or boost::signals::trackable.

+

The function may leave 1 parameters unbound (e.g. using boost::bind placeholders _1) that may be bound to the event detail object passed by the signal.

+ +
+
+ +
+
+
+template<typename A1, typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1)  method 
)
+
+
+ +

Connect a slot that takes one argument.

+

This is only possible for signals that take at least one argument.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2)  method 
)
+
+
+ +

Connect a slot that takes two arguments.

+

This is only possible for signals that take at least two arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3)  method 
)
+
+
+ +

Connect a slot that takes three arguments.

+

This is only possible for signals that take at least three arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4)  method 
)
+
+
+ +

Connect a slot that takes four arguments.

+

This is only possible for signals that take at least four arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4, A5, A6)  method 
)
+
+
+ +

Connect a slot that takes six arguments.

+

This is only possible for signals that take at least six arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)()  method 
)
+
+
+ +

Connect a slot that takes no arguments.

+

The slot is specified as a method of an object target of class T, which equals class V, or is a base class of class V. In addition, to check for stateless implementations, class T must be also be a descendant of WObject. Thus, the following statement must return a non-null pointer:

+
 WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
+

If a stateless implementation is specified for the slot, then the visual behaviour will be learned in terms of JavaScript, and will be cached on the client side for instant feed-back, in addition running the slot on the server.

+ +

Reimplemented from Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4, A5)  method 
)
+
+
+ +

Connect a slot that takes five arguments.

+

This is only possible for signals that take at least five arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + +
void Wt::JSignal< A1, A2, A3, A4, A5, A6 >::connect (JSlot slot )
+
+
+ +

Connect a slot that is specified as JavaScript only.

+

This will provide a client-side connection between the event and some JavaScript code as implemented by the slot. Unlike other connects, this does not cause the event to propagated to the application, and thus the state changes induced by the slot are invisible to the server-side.

+ +

Reimplemented from Wt::EventSignalBase.

+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const std::string Wt::JSignal< A1, A2, A3, A4, A5, A6 >::createCall (const std::string &  arg1 = std::string(),
const std::string &  arg2 = std::string(),
const std::string &  arg3 = std::string(),
const std::string &  arg4 = std::string(),
const std::string &  arg5 = std::string(),
const std::string &  arg6 = std::string() 
) const
+
+
+ +

Returns a JavaScript call that triggers the signal.

+

This is:

+
     Wt.emit([element], [name], arg1, ...);
+

When the signal was constructed with collectSlotJavaScript == true, the inline JavaScript from slots defined as JavaScript or from learned stateless slots is included as well.

+
See also:
createEventCall()
+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const std::string Wt::JSignal< A1, A2, A3, A4, A5, A6 >::createEventCall (const std::string &  jsObject,
const std::string &  jsEvent,
const std::string &  arg1 = std::string(),
const std::string &  arg2 = std::string(),
const std::string &  arg3 = std::string(),
const std::string &  arg4 = std::string(),
const std::string &  arg5 = std::string() 
) const
+
+
+ +

Returns a JavaScript call that triggers the signal, passing the original event too.

+

Similar to createCall(), the following JavaScript is returned:

+
     Wt.emit([element], { name: [name], eventObject: [jsObject], event: [jsEvent]},
+             arg1, ...);
+

In addition to information identifying the signal (element and name) and the arguments, also information on the original JavaScript event is transferred. In this way, you can propagate the corresponding event class (WMouseEvent or WKeyEvent) as an additional last argument in the slot.

+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::JSignal< A1, A2, A3, A4, A5, A6 >::emit (A1  a1 = NoClass::none,
A2  a2 = NoClass::none,
A3  a3 = NoClass::none,
A4  a4 = NoClass::none,
A5  a5 = NoClass::none,
A6  a6 = NoClass::none 
)
+
+
+ +

Emit the signal.

+

The arguments must exactly match the arguments of the target function.

+

This will cause all connected slots to be triggered, with the given arguments.

+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::JSignal< A1, A2, A3, A4, A5, A6 >::operator() (A1  a1 = NoClass::none,
A2  a2 = NoClass::none,
A3  a3 = NoClass::none,
A4  a4 = NoClass::none,
A5  a5 = NoClass::none,
A6  a6 = NoClass::none 
)
+
+
+ +

Emit the signal.

+

This is equivalent to emit().

+
See also:
emit
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.map new file mode 100644 index 0000000..29c10f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.md5 new file mode 100644 index 0000000..abf75d9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.md5 @@ -0,0 +1 @@ +3effdd3e49be9e818012a74ac3073a23 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.png new file mode 100644 index 0000000..e460d09 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1JSignal__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot-members.html new file mode 100644 index 0000000..9b969fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::JSlot Member List

+
+
+This is the complete list of members for Wt::JSlot, including all inherited members. + + + + + + +
exec(const std::string &object="null", const std::string &event="null")Wt::JSlot
execJs(const std::string &object="null", const std::string &event="null")Wt::JSlot
JSlot(WWidget *parent=0)Wt::JSlot
JSlot(const std::string &javaScript, WWidget *parent=0)Wt::JSlot
setJavaScript(const std::string &javaScript)Wt::JSlot
~JSlot()Wt::JSlot
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot.html b/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot.html new file mode 100644 index 0000000..a7422a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1JSlot.html @@ -0,0 +1,272 @@ + + + + +Wt: Wt::JSlot Class Reference + + + + + + + + + +
+ +
+

Wt::JSlot Class Reference
+ +[Signal/slot system] +

+
+
+ +

A slot that is only implemented in client side JavaScript code. +More...

+ +

#include <Wt/WJavaScript>

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

 JSlot (WWidget *parent=0)
 Constructs a JavaScript-only slot within the parent scope.
 JSlot (const std::string &javaScript, WWidget *parent=0)
 Constructs a JavaScript-only and sets the JavaScript code.
~JSlot ()
 Destructor.
void setJavaScript (const std::string &javaScript)
 Sets or modify the JavaScript code associated with the slot.
void exec (const std::string &object="null", const std::string &event="null")
 Executes the JavaScript code.
std::string execJs (const std::string &object="null", const std::string &event="null")
 Returns a JavaScript statement that executes the slot.
+

Detailed Description

+

A slot that is only implemented in client side JavaScript code.

+

This class provides a hook for adding your own JavaScript to respond to events.

+

Carefully consider the use of this. Not only is writing cross-browser JavaScript hard and tedious, but one must also be aware of possible security problems (see further), and ofcourse, the event handling will not be available when JavaScript is disabled or not present at all.

+

If you wish to add client side event handling, with automatic fall-back to server-side event handling and without writing JavaScript code with the associated risks and problems, consider using stateless slot implementations instead (see WObject::implementStateless())

+

For some purposes, stateless slot implementations are not sufficient, since they do not allow state inspection. At the same time, the non-availability in case of disabled JavaScript may also be fine for some non-essential functionality (see for example the WSuggestionPopup widget), or when you simply do not care. For these situations a JSlot can be used to add client-side event handling.

+

The JavaScript code may be set (or changed) using the setJavaScript() method which takes a string that implements a JavaScript function with the following signature:

+
 function(sender, event) {
+   // handle the event, and sender is a reference to the DOM element
+   // which captured the event (and holds the signal). Therefore it
+   // equivalent to the sender for a normal %Wt slot.
+
+   // You can prevent the default action using:
+   ${WT_CLASS}.cancelEvent(event);
+   // (where ${WT_CLASS} should be the value of the WT_CLASS define
+ }
+

In the JavaScript code, you may use WWidget::jsRef() to obtain the DOM element corresponding to any WWidget, or WWidget::id() to obtain the DOM id. In addition you may trigger server-side events using the JavaScript WtSignalEmit function (see JSignal documentation). That's how far we can help you. For the rest you are left to yourself, buggy browsers and quirky JavaScript (http://www.quirksmode.org/ was a reliable companion to me) -- good luck.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::JSlot::JSlot (WWidget parent = 0 )
+
+
+ +

Constructs a JavaScript-only slot within the parent scope.

+

The JavaScript code block will reside within the scope of the given widget. By picking a long-lived parent, one may reuse a single block of JavasCript code for multiple widgets.

+

When parent = 0, then the JavaScript will be inlined in each caller (possibly replicating the same JavaScript).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::JSlot::JSlot (const std::string &  javaScript,
WWidget parent = 0 
)
+
+
+ +

Constructs a JavaScript-only and sets the JavaScript code.

+
See also:
JSlot(WWidget *), setJavaScript()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::JSlot::exec (const std::string &  object = "null",
const std::string &  event = "null" 
)
+
+
+ +

Executes the JavaScript code.

+

This executes the JavaScript code in the same way as when triggered by a EventSignal. This function returns immediately, and execution of the JavaScript code is deferred until after the event handling.

+

The arguments are the "object, event" arguments of the JavaScript event callback function.

+
See also:
setJavaScript()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
std::string Wt::JSlot::execJs (const std::string &  object = "null",
const std::string &  event = "null" 
)
+
+
+ +

Returns a JavaScript statement that executes the slot.

+

This returns the JavaScript code to execute the slot.

+

The arguments are the "object, event" arguments of the JavaScript event callback function.

+
See also:
exec()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::JSlot::setJavaScript (const std::string &  javaScript )
+
+
+ +

Sets or modify the JavaScript code associated with the slot.

+

When the slot is triggered, the corresponding function defined by javaScript is executed.

+

The JavaScript function takes two parameters and thus should look like:

+
     function(obj, event) {
+       // ...
+     }
+

The first parameter obj is a reference to the DOM element that generates the event. The event refers to the JavaScript event object.

+
See also:
WWidget::jsRef()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Signal-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal-members.html new file mode 100644 index 0000000..8f355c2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal-members.html @@ -0,0 +1,93 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Signal< A1, A2, A3, A4, A5, A6 > Member List

+
+
+This is the complete list of members for Wt::Signal< A1, A2, A3, A4, A5, A6 >, including all inherited members. + + + + + + + + + + + + + + + +
connect(WObject *target, WObject::Method method)Wt::Signal< A1, A2, A3, A4, A5, A6 > [virtual]
connect(const F &function)Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)())Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1))Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2))Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3))Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4))Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4, A5))Wt::Signal< A1, A2, A3, A4, A5, A6 >
connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))Wt::Signal< A1, A2, A3, A4, A5, A6 >
emit(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const Wt::Signal< A1, A2, A3, A4, A5, A6 >
isConnected() const Wt::Signal< A1, A2, A3, A4, A5, A6 > [virtual]
operator()(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const Wt::Signal< A1, A2, A3, A4, A5, A6 >
sender() const Wt::SignalBase
Signal(WObject *sender=0)Wt::Signal< A1, A2, A3, A4, A5, A6 >
~Signal()Wt::Signal< A1, A2, A3, A4, A5, A6 >
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Signal.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal.html new file mode 100644 index 0000000..ca641e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal.html @@ -0,0 +1,663 @@ + + + + +Wt: Wt::Signal< A1, A2, A3, A4, A5, A6 > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Signal< A1, A2, A3, A4, A5, A6 > Class Template Reference
+ +[Signal/slot system] +

+
+
+ +

A signal that propagates events to listeners. +More...

+ +

#include <Wt/WSignal>

+
+Inheritance diagram for Wt::Signal< A1, A2, A3, A4, A5, A6 >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Signal (WObject *sender=0)
 Creates a signal.
~Signal ()
 Destructor.
virtual boost::signals::connection connect (WObject *target, WObject::Method method)
 Connects to a slot.
template<class F >
boost::signals::connection connect (const F &function)
 Connects to a function.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)())
 Connects a slot that takes no arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1))
 Connects a slot that takes one argument.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2))
 Connects a slot that takes two arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3))
 Connects a slot that takes three arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4))
 Connects a slot that takes four arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4, A5))
 Connects a slot that takes five arguments.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))
 Connects a slot that takes six arguments.
void emit (A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const
 Emits the signal.
void operator() (A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const
 Emits the signal.
virtual bool isConnected () const
 Returns whether this signal is connected.
+

Detailed Description

+

template<typename A1 = NoClass, typename A2 = NoClass, typename A3 = NoClass, typename A4 = NoClass, typename A5 = NoClass, typename A6 = NoClass>
+ class Wt::Signal< A1, A2, A3, A4, A5, A6 >

+ +

A signal that propagates events to listeners.

+

Use Signal/slots to let one object (A) listen to events caused by another object (B). In this scenario, object B provides in its public interface access to a signal, to which object A connects one of its member function (which act as slot). Object A can then signal an event (which triggers the connected callback functions), by emitting the signal. Signal/slot is a generalization of the popular observer pattern used in GUIs.

+

A signal can provide details of the event, using up to 6 parameters. A slot must have a compatible signature to connect to a signal, based on its parameters. A compatible signature provides the same parameters in the member function, or less (leaving out parameters at the end).

+

The signal automatically disconnects from the slot when the target is deleted. In addition, the signal may be deleted at any time, in particular also while it is being emitted.

+

The Signal objects integrate with WObject objects. A Signal requires that the target of a connection, i.e. the object that listens for an event, is a WObject. In addition, every signal may specify one WObject to be the owner of the signal, and a target may find out the sender of a signal emission, using WObject::sender().

+
 class MyWidget : public Wt::WContainerWidget
+ {
+ public:
+   MyWidget(Wt::WContainerWidget *parent = 0)
+     : Wt::WContainerWidget(parent),
+       done_(this)
+   {
+      ...
+      Wt::WPushButton *button = new Wt::WPushButton("Okay");
+      button->clicked().connect(this, &MyWidget::process);
+   }
+
+   // provide an accessor for the signal
+   Wt::Signal<int, std::string>& done() { return done_; }
+
+ private:
+   Wt::Signal<int, std::string> done_;
+
+   void process() {
+     ...
+     done_.emit(42, "Totally done"); // emit the signal
+   }
+ };
+

This widget could then be used from another class:

+
 class GUIClass : public Wt::WContainerWidget
+ {
+   ...
+
+ private:
+   void init() {
+     MyWidget *widget = new MyWidget(this);
+     widget->done().connect(this, &GUIClass::whenDone);
+   }
+
+   void whenDone(int result, const std::string& description) {
+     ...
+   }
+ };
+

The WSignalMapper is a utility class that helps in situations where you want to connect multiple signals to a single slot, and still be identify the sender using some property.

+
See also:
WSignalMapper
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + +
Wt::Signal< A1, A2, A3, A4, A5, A6 >::Signal (WObject sender = 0 )
+
+
+ +

Creates a signal.

+

The sender is the object that will be identified as WObject::sender() when executing connected slots may be passed as an argument.

+

The sender should not be 0 when you want to map the signal using the WSignalMapper.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (WObject target,
WObject::Method  method 
) [virtual]
+
+
+ +

Connects to a slot.

+

Every signal can be connected to a slot which does not take any arguments (and may thus ignore signal arguments).

+ +

Implements Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class F >
+ + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (const F &  function )
+
+
+ +

Connects to a function.

+

This variant of the overloaded connect() method supports a template function object (which supports operator ()).

+

When the receiver function is an object method, the signal will automatically be disconnected when the object is deleted, as long as the object inherits from WObject or boost::signals::trackable.

+

The function may leave up to N parameters unbound (e.g. using boost::bind placeholders _1 to _N) that may be bound to values passed by the signal.

+ +
+
+ +
+
+
+template<typename A1, typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1)  method 
)
+
+
+ +

Connects a slot that takes one argument.

+

This is only possible for signals that take at least one argument.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4, A5, A6)  method 
)
+
+
+ +

Connects a slot that takes six arguments.

+

This is only possible for signals that take at least six arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4, A5)  method 
)
+
+
+ +

Connects a slot that takes five arguments.

+

This is only possible for signals that take at least five arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3, A4)  method 
)
+
+
+ +

Connects a slot that takes four arguments.

+

This is only possible for signals that take at least four arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2, A3)  method 
)
+
+
+ +

Connects a slot that takes three arguments.

+

This is only possible for signals that take at least three arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)(A1, A2)  method 
)
+
+
+ +

Connects a slot that takes two arguments.

+

This is only possible for signals that take at least two arguments.

+
See also:
connect(T *target, void (V::*method)())
+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::Signal< A1, A2, A3, A4, A5, A6 >::connect (T *  target,
void(V::*)()  method 
)
+
+
+ +

Connects a slot that takes no arguments.

+

This is always possible (even when the signal specifies a number of arguments).

+

The slot is as a method of an object target of class T, which equals class V, or is a base class of class V. Thus, the following statement must return a non-null pointer:

+
 V *v = dynamic_cast<V *>(target);
+

In practice, to facilitate automatic disconnects on deletion of the target, class T must be also be a descendant of WObject, but this is not enforced by the interface.

+ +

Reimplemented from Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Signal< A1, A2, A3, A4, A5, A6 >::emit (A1  a1 = NoClass::none,
A2  a2 = NoClass::none,
A3  a3 = NoClass::none,
A4  a4 = NoClass::none,
A5  a5 = NoClass::none,
A6  a6 = NoClass::none 
) const
+
+
+ +

Emits the signal.

+

The arguments must exactly match the arguments of the target function.

+

This will cause all connected slots to be triggered, with the given arguments.

+ +
+
+ +
+
+
+template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
+ + + + + + + +
bool Wt::Signal< A1, A2, A3, A4, A5, A6 >::isConnected ( ) const [virtual]
+
+
+ +

Returns whether this signal is connected.

+

Returns true when the signal was connected to to at least one slot.

+ +

Implements Wt::SignalBase.

+ +
+
+ +
+
+
+template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Signal< A1, A2, A3, A4, A5, A6 >::operator() (A1  a1 = NoClass::none,
A2  a2 = NoClass::none,
A3  a3 = NoClass::none,
A4  a4 = NoClass::none,
A5  a5 = NoClass::none,
A6  a6 = NoClass::none 
) const
+
+
+ +

Emits the signal.

+

This is equivalent to emit().

+
See also:
emit
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase-members.html new file mode 100644 index 0000000..010aa5d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::SignalBase Member List

+
+
+This is the complete list of members for Wt::SignalBase, including all inherited members. + + + + +
connect(WObject *target, WObject::Method method)=0Wt::SignalBase [pure virtual]
connect(T *target, void(V::*method)())Wt::SignalBase
isConnected() const =0Wt::SignalBase [pure virtual]
sender() const Wt::SignalBase
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase.html b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase.html new file mode 100644 index 0000000..0429a15 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase.html @@ -0,0 +1,224 @@ + + + + +Wt: Wt::SignalBase Class Reference + + + + + + + + + +
+ +
+

Wt::SignalBase Class Reference
+ +[Signal/slot system] +

+
+
+ +

Abstract base class of a signal. +More...

+
+Inheritance diagram for Wt::SignalBase:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + +

+Public Member Functions

WObjectsender () const
 Returns the sender.
virtual bool isConnected () const =0
 Returns whether this signal is connected.
virtual boost::signals::connection connect (WObject *target, WObject::Method method)=0
 Connects to a slot.
template<class T , class V >
boost::signals::connection connect (T *target, void(V::*method)())
 Connects to a slot.
+

Detailed Description

+

Abstract base class of a signal.

+

Base class for all signals.

+

Member Function Documentation

+ + + +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::SignalBase::connect (T *  target,
void(V::*)()  method 
)
+
+
+ +

Connects to a slot.

+

Every signal can be connected to a slot which does not take any arguments (and may thus ignore signal arguments).

+ +

Reimplemented in Wt::JSignal< A1, A2, A3, A4, A5, A6 >, Wt::Signal< A1, A2, A3, A4, A5, A6 >, Wt::EventSignal< E >, Wt::JSignal< Coordinate >, Wt::JSignal<>, Wt::JSignal< std::string, int >, Wt::JSignal< std::string >, Wt::JSignal< std::string, std::string, WMouseEvent, struct NoClass, struct NoClass, struct NoClass >, Wt::JSignal< int, int >, Wt::JSignal< int >, Wt::JSignal< void >, Wt::JSignal< int, int, std::string, std::string, WMouseEvent >, Wt::JSignal< std::string, int, std::string, std::string, std::string, WMouseEvent >, Wt::JSignal< std::string, int, std::string >, Wt::JSignal< bool >, Wt::JSignal< int, int, int, int >, Wt::JSignal< std::string, std::string >, Wt::Signal< WModelIndex >, Wt::Signal< WDate >, Wt::Signal< ::uint64_t,::uint64_t >, Wt::Signal< WModelIndex, WModelIndex >, Wt::Signal< int, WLength >, Wt::Signal< WRadioButton * >, Wt::Signal< double >, Wt::Signal<>, Wt::Signal< Orientation, int, int >, Wt::Signal< std::string >, Wt::Signal< int, int >, Wt::Signal< int64_t, int64_t >, Wt::Signal< Coordinate, NoClass >, Wt::Signal< int >, Wt::Signal< WModelIndex, int, int >, Wt::Signal< int, WFormWidget * >, Wt::Signal< void >, Wt::Signal< WMenuItem * >, Wt::Signal< T, A1 >, Wt::Signal< WModelIndex, WMouseEvent >, Wt::Signal< StandardButton >, Wt::Signal< WString >, Wt::Signal< int, NoClass >, Wt::Signal< bool >, Wt::Signal< DialogCode >, Wt::Signal< WWidget * >, Wt::Signal< WStandardItem * >, Wt::Signal< StandardButton, NoClass >, Wt::Signal< int, int, int, int >, Wt::Signal< WObject *, NoClass, NoClass, NoClass, NoClass, NoClass >, and Wt::Signal< WWidget *, bool >.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::SignalBase::isConnected ( ) const [pure virtual]
+
+
+ +

Returns whether this signal is connected.

+

Returns true when the signal was connected to to at least one slot.

+ +

Implemented in Wt::JSignal< A1, A2, A3, A4, A5, A6 >, Wt::Signal< A1, A2, A3, A4, A5, A6 >, Wt::EventSignalBase, Wt::EventSignal< E >, Wt::JSignal< Coordinate >, Wt::JSignal<>, Wt::JSignal< std::string, int >, Wt::JSignal< std::string >, Wt::JSignal< std::string, std::string, WMouseEvent, struct NoClass, struct NoClass, struct NoClass >, Wt::JSignal< int, int >, Wt::JSignal< int >, Wt::JSignal< void >, Wt::JSignal< int, int, std::string, std::string, WMouseEvent >, Wt::JSignal< std::string, int, std::string, std::string, std::string, WMouseEvent >, Wt::JSignal< std::string, int, std::string >, Wt::JSignal< bool >, Wt::JSignal< int, int, int, int >, Wt::JSignal< std::string, std::string >, Wt::Signal< WModelIndex >, Wt::Signal< WDate >, Wt::Signal< ::uint64_t,::uint64_t >, Wt::Signal< WModelIndex, WModelIndex >, Wt::Signal< int, WLength >, Wt::Signal< WRadioButton * >, Wt::Signal< double >, Wt::Signal<>, Wt::Signal< Orientation, int, int >, Wt::Signal< std::string >, Wt::Signal< int, int >, Wt::Signal< int64_t, int64_t >, Wt::Signal< Coordinate, NoClass >, Wt::Signal< int >, Wt::Signal< WModelIndex, int, int >, Wt::Signal< int, WFormWidget * >, Wt::Signal< void >, Wt::Signal< WMenuItem * >, Wt::Signal< T, A1 >, Wt::Signal< WModelIndex, WMouseEvent >, Wt::Signal< StandardButton >, Wt::Signal< WString >, Wt::Signal< int, NoClass >, Wt::Signal< bool >, Wt::Signal< DialogCode >, Wt::Signal< WWidget * >, Wt::Signal< WStandardItem * >, Wt::Signal< StandardButton, NoClass >, Wt::Signal< int, int, int, int >, Wt::Signal< WObject *, NoClass, NoClass, NoClass, NoClass, NoClass >, and Wt::Signal< WWidget *, bool >.

+ +
+
+ +
+
+ + + + + + + +
WObject* Wt::SignalBase::sender ( ) const
+
+
+ +

Returns the sender.

+

The sender usually corresponds to the owner, and is used by the WSignalMapper to associated sender-specific data.

+

During a slot invocation, you can access the sender from WObject::sender().

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.map new file mode 100644 index 0000000..2578749 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.map @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.md5 new file mode 100644 index 0000000..cd1656b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.md5 @@ -0,0 +1 @@ +731de63d0d41db57722050bcdd31adff \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.png new file mode 100644 index 0000000..8d0a972 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1SignalBase__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.map new file mode 100644 index 0000000..cc3dc60 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.md5 new file mode 100644 index 0000000..c58d18d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.md5 @@ -0,0 +1 @@ +1737fb6eeb9d9d0576b3156789bbc7fa \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.png new file mode 100644 index 0000000..a9f1ef5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Signal__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock-members.html new file mode 100644 index 0000000..c1bab6e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::SyncLock< Lock > Member List

+
+
+This is the complete list of members for Wt::SyncLock< Lock >, including all inherited members. + + + +
lock()Wt::SyncLock< Lock >
SyncLock(Mutex &mutex)Wt::SyncLock< Lock >
SyncLock(Mutex &mutex, boost::defer_lock_t)Wt::SyncLock< Lock >
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock.html b/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock.html new file mode 100644 index 0000000..b64aa0a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1SyncLock.html @@ -0,0 +1,205 @@ + + + + +Wt: Wt::SyncLock< Lock > Class Template Reference + + + + + + + + + +
+ +
+

Wt::SyncLock< Lock > Class Template Reference

+
+
+ +

An dead-lock avoidance adaptor for a Boost mutex lock. +More...

+ +

#include <Wt/SyncLock>

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

template<class Mutex >
 SyncLock (Mutex &mutex)
 Creates a RIIA lock.
template<class Mutex >
 SyncLock (Mutex &mutex, boost::defer_lock_t)
 Creates a RIIA lock, but defers taking the lock.
void lock ()
 Tries to acquire the lock, blocking while waiting.
+

Detailed Description

+

template<class Lock>
+ class Wt::SyncLock< Lock >

+ +

An dead-lock avoidance adaptor for a Boost mutex lock.

+

A SyncLock adapts a Boost mutex lock (such as boost::mutex::scoped_lock), and provides the same API as the original lock (it derives from it).

+

Just as can be expected by a lock, a call to lock() will block until the thread has exclusive access to the mutex.

+

While waiting to acquire the lock, however, the current Wt::WApplication lock, may be temporarily released in favor of another helper thread trying to acquire the application lock. Thus, you need to be aware that when the lock is taken, some other thread may have modified the current application state.

+

A sync lock is useful in the context of a deployment where multiple (or all) WApplication instances are running in a single process and communicating with each other (such as the built-in httpd). Then, this lock adaptor helps in avoiding a dead-lock situation when applications wants to access a shared resource protected by a mutex, which communicates to other applications while taking their update lock. In that case, it is likely that you will also want to iterate over all "registered" applications while holding the global mutex, and this creates a natural dead-lock scenario because you have two mutexes (global mutex, application mutex) which are sequentially aquired in a different order:

+
    +
  • application mutex -> global mutex, during an application request
  • +
  • global mutex -> application mutex, while propagating events to applications
  • +
+

The altered behaviour of a call by application A to lock() is that this application A's state may be updated by another thread (e.g. serving application B), which tries to take A's update lock.

+

The following conventional locking code:

+
   boost::recursive_mutex::scoped_lock lock(mutex_);
+

is updated to a sync lock, by doing:

+

Constructor & Destructor Documentation

+ +
+
+
+template<class Lock>
+
+template<class Mutex >
+ + + + + + + + +
Wt::SyncLock< Lock >::SyncLock (Mutex &  mutex )
+
+
+ +

Creates a RIIA lock.

+

Initializes and acquires exclusive access to the mutex.

+ +
+
+ +
+
+
+template<class Lock>
+
+template<class Mutex >
+ + + + + + + + + + + + + + + + + + +
Wt::SyncLock< Lock >::SyncLock (Mutex &  mutex,
boost::defer_lock_t  
)
+
+
+ +

Creates a RIIA lock, but defers taking the lock.

+

Initialize the lock but defers taking the lock.

+
See also:
lock()
+ +
+
+

Member Function Documentation

+ +
+
+
+template<class Lock>
+ + + + + + + +
void Wt::SyncLock< Lock >::lock ( )
+
+
+ +

Tries to acquire the lock, blocking while waiting.

+

While an application A is waiting for the lock, its state may be updated by another application: another application B can succesfully take A's update lock.

+

Therefore you need to be prepared to deal with application state changes while waiting for the lock.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment-members.html new file mode 100644 index 0000000..226ddcf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment-members.html @@ -0,0 +1,173 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Test::WTestEnvironment Member List

+
+
+This is the complete list of members for Wt::Test::WTestEnvironment, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept() const Wt::WEnvironment
agent() const Wt::WEnvironment
agentIsChrome() const Wt::WEnvironment
agentIsGecko() const Wt::WEnvironment
agentIsIE() const Wt::WEnvironment
agentIsIElt(int version) const Wt::WEnvironment
agentIsIEMobile() const Wt::WEnvironment
agentIsMobileWebKit() const Wt::WEnvironment
agentIsOpera() const Wt::WEnvironment
agentIsSafari() const Wt::WEnvironment
agentIsSpiderBot() const Wt::WEnvironment
agentIsWebKit() const Wt::WEnvironment
ajax() const Wt::WEnvironment
Arora enum valueWt::WEnvironment
BotAgent enum valueWt::WEnvironment
Chrome0 enum valueWt::WEnvironment
Chrome1 enum valueWt::WEnvironment
Chrome2 enum valueWt::WEnvironment
Chrome3 enum valueWt::WEnvironment
Chrome4 enum valueWt::WEnvironment
Chrome5 enum valueWt::WEnvironment
clientAddress() const Wt::WEnvironment
contentType() const Wt::WEnvironment
ContentType enum nameWt::WEnvironment
CookieMap typedefWt::WEnvironment
cookies() const Wt::WEnvironment
deploymentPath() const Wt::WEnvironment
dpiScale() const Wt::WEnvironment
Firefox enum valueWt::WEnvironment
Firefox3_0 enum valueWt::WEnvironment
Firefox3_1 enum valueWt::WEnvironment
Firefox3_1b enum valueWt::WEnvironment
Firefox3_5 enum valueWt::WEnvironment
Firefox3_6 enum valueWt::WEnvironment
Gecko enum valueWt::WEnvironment
getCgiValue(const std::string &varName) const Wt::WEnvironment
getCookie(const std::string &cookieNname) const Wt::WEnvironment
getParameter(const std::string &name) const Wt::WEnvironment
getParameterMap() const Wt::WEnvironment
getParameterValues(const std::string &name) const Wt::WEnvironment
headerValue(const std::string &field) const Wt::WEnvironment
hostName() const Wt::WEnvironment
HTML4 enum valueWt::WEnvironment
IE6 enum valueWt::WEnvironment
IE7 enum valueWt::WEnvironment
IE8 enum valueWt::WEnvironment
IE9 enum valueWt::WEnvironment
IEMobile enum valueWt::WEnvironment
internalPath() const Wt::WEnvironment
javaScript() const Wt::WEnvironment
Konqueror enum valueWt::WEnvironment
libraryVersion()Wt::WEnvironment [static]
libraryVersion(int &series, int &major, int &minor) const Wt::WEnvironment
locale() const Wt::WEnvironment
MobileWebKit enum valueWt::WEnvironment
MobileWebKitAndroid enum valueWt::WEnvironment
MobileWebKitiPhone enum valueWt::WEnvironment
Opera enum valueWt::WEnvironment
pathInfo() const Wt::WEnvironment
referer() const Wt::WEnvironment
Safari enum valueWt::WEnvironment
Safari3 enum valueWt::WEnvironment
Safari4 enum valueWt::WEnvironment
server() const Wt::WEnvironment
serverAdmin() const Wt::WEnvironment
serverSignature() const Wt::WEnvironment
serverSoftware() const Wt::WEnvironment
sessionId() const Wt::WEnvironment
setAccept(const std::string &accept)Wt::Test::WTestEnvironment
setAjax(bool enabled)Wt::Test::WTestEnvironment
setClientAddress(const std::string &clientAddress)Wt::Test::WTestEnvironment
setContentType(ContentType contentType)Wt::Test::WTestEnvironment
setCookies(const CookieMap &cookies)Wt::Test::WTestEnvironment
setDpiScale(double dpiScale)Wt::Test::WTestEnvironment
setHeaderValue(const std::string &value)Wt::Test::WTestEnvironment
setHostName(const std::string &hostName)Wt::Test::WTestEnvironment
setInternalPath(const std::string &internalPath)Wt::Test::WTestEnvironment
setLocale(const std::string &locale)Wt::Test::WTestEnvironment
setParameterMap(const Http::ParameterMap &parameters)Wt::Test::WTestEnvironment
setReferer(const std::string &referer)Wt::Test::WTestEnvironment
setServerAdmin(const std::string &serverAdmin)Wt::Test::WTestEnvironment
setServerSignature(const std::string &signature)Wt::Test::WTestEnvironment
setServerSoftware(const std::string &software)Wt::Test::WTestEnvironment
setSupportsCookies(bool enabled)Wt::Test::WTestEnvironment
setUrlScheme(const std::string &scheme)Wt::Test::WTestEnvironment
setUserAgent(const std::string &userAgent)Wt::Test::WTestEnvironment
supportsCookies() const Wt::WEnvironment
Unknown enum valueWt::WEnvironment
urlScheme() const Wt::WEnvironment
UserAgent enum nameWt::WEnvironment
userAgent() const Wt::WEnvironment
WebKit enum valueWt::WEnvironment
WTestEnvironment(const std::string &applicationPath="/", const std::string &configurationFile="", EntryPointType type=Application)Wt::Test::WTestEnvironment
XHTML1 enum valueWt::WEnvironment
~WTestEnvironment()Wt::Test::WTestEnvironment
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html new file mode 100644 index 0000000..e916831 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html @@ -0,0 +1,597 @@ + + + + +Wt: Wt::Test::WTestEnvironment Class Reference + + + + + + + + + +
+ +
+

Wt::Test::WTestEnvironment Class Reference

+
+
+ +

An environment for testing purposes. +More...

+ +

#include <Wt/Test/WTestEnvironment>

+
+Inheritance diagram for Wt::Test::WTestEnvironment:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WTestEnvironment (const std::string &applicationPath="/", const std::string &configurationFile="", EntryPointType type=Application)
 Default constructor.
 ~WTestEnvironment ()
 Destructor.
void setParameterMap (const Http::ParameterMap &parameters)
 Sets parameters to the application.
void setCookies (const CookieMap &cookies)
 Sets HTTP cookies.
void setHeaderValue (const std::string &value)
 Sets a HTTP header value.
void setSupportsCookies (bool enabled)
 Sets whether cookies are supported.
void setAjax (bool enabled)
 Sets whether AJAX is supported.
void setDpiScale (double dpiScale)
 Sets the display's DPI scale.
void setLocale (const std::string &locale)
 Sets the locale.
void setHostName (const std::string &hostName)
 Sets the host name.
void setUrlScheme (const std::string &scheme)
 Sets the URL scheme.
void setUserAgent (const std::string &userAgent)
 Sets the user agent.
void setReferer (const std::string &referer)
 Sets the referer.
void setAccept (const std::string &accept)
 Sets the accept header.
void setServerSignature (const std::string &signature)
 Sets the server signature.
void setServerSoftware (const std::string &software)
 Sets the server software.
void setServerAdmin (const std::string &serverAdmin)
 Sets the server admin.
void setClientAddress (const std::string &clientAddress)
 Sets the client address.
void setInternalPath (const std::string &internalPath)
 Sets the initial internal path.
void setContentType (ContentType contentType)
 Sets the content type.
+

Detailed Description

+

An environment for testing purposes.

+

This environment is useful for use in automated (integration/unit) tests: you may configure its properties and pass it to the constructor of an application.

+

This is useful for automated test-cases:

+
 void testX() {
+   Test::WTestEnvironment environment;
+   MyApplication app(environment);
+   ...
+ }
+
See also:
WEnvironment, WApplication::WApplication(const WEnvironment&)
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::Test::WTestEnvironment::WTestEnvironment (const std::string &  applicationPath = "/",
const std::string &  configurationFile = "",
EntryPointType  type = Application 
)
+
+
+ +

Default constructor.

+

Constructs a test environment that resembles FireFox 3.0 with default settings.

+

The applicationPath is the simulated deployment path. The configuration file points to a wt_config.xml configuration file. The type indicates the application type.

+

After construction, but before passing it to the constructor of a WApplication, you can change any of the environment properties using the setter methods.

+ +
+
+ +
+
+ + + + + + + +
Wt::Test::WTestEnvironment::~WTestEnvironment ( )
+
+
+ +

Destructor.

+

!

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setAccept (const std::string &  accept )
+
+
+ +

Sets the accept header.

+ + The default value is + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8". +
See also:
accept()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setAjax (bool  enabled )
+
+
+ +

Sets whether AJAX is supported.

+

The default value is true.

+
See also:
ajax()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setClientAddress (const std::string &  clientAddress )
+
+
+ +

Sets the client address.

+

The default value is "127.0.0.1".

+
See also:
clientAddress()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setContentType (ContentType  contentType )
+
+
+ +

Sets the content type.

+

The default value is XHTML1.

+
See also:
contentType()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setCookies (const CookieMap cookies )
+
+
+ +

Sets HTTP cookies.

+

The default value is an empty map.

+
See also:
cookies()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setDpiScale (double  dpiScale )
+
+
+ +

Sets the display's DPI scale.

+

The default value is 1.

+
See also:
dpiScale()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setHeaderValue (const std::string &  value )
+
+
+ +

Sets a HTTP header value.

+

The default value is no headers.

+
See also:
headerValue()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setHostName (const std::string &  hostName )
+
+
+ +

Sets the host name.

+

The default value is "localhost".

+
See also:
hostName()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setInternalPath (const std::string &  internalPath )
+
+
+ +

Sets the initial internal path.

+

The default value is "".

+
See also:
internalPath()
+ +

Reimplemented from Wt::WEnvironment.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setLocale (const std::string &  locale )
+
+
+ +

Sets the locale.

+

The default value is "en".

+
See also:
locale()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setParameterMap (const Http::ParameterMap parameters )
+
+
+ +

Sets parameters to the application.

+

The default value is an empty map.

+
See also:
getParameterMap()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setReferer (const std::string &  referer )
+
+
+ +

Sets the referer.

+

The default value is "".

+
See also:
referer()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setServerAdmin (const std::string &  serverAdmin )
+
+
+ +

Sets the server admin.

+

The default value is "your@onyourown.here".

+
See also:
serverAdmin()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setServerSignature (const std::string &  signature )
+
+
+ +

Sets the server signature.

+

The default value is "None (WTestEnvironment)".

+
See also:
serverSignature()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setServerSoftware (const std::string &  software )
+
+
+ +

Sets the server software.

+

The default value is "None (WTestEnvironment)".

+
See also:
serverSoftware()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setSupportsCookies (bool  enabled )
+
+
+ +

Sets whether cookies are supported.

+

The default value is true.

+
See also:
supportsCookies()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setUrlScheme (const std::string &  scheme )
+
+
+ +

Sets the URL scheme.

+

The default value is "http".

+
See also:
urlScheme()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::Test::WTestEnvironment::setUserAgent (const std::string &  userAgent )
+
+
+ +

Sets the user agent.

+

The default value is no "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009060309 Ubuntu/9.04 (jaunty) Firefox/3.0.11".

+
See also:
userAgent()
+ +

Reimplemented from Wt::WEnvironment.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.map new file mode 100644 index 0000000..de7fe7c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.md5 new file mode 100644 index 0000000..1c7eb92 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.md5 @@ -0,0 +1 @@ +aaa46ac7fc9034ee07a9b500fbf509f2 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.png new file mode 100644 index 0000000..e8b6a22 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Touch-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Touch-members.html new file mode 100644 index 0000000..24b92c6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Touch-members.html @@ -0,0 +1,83 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Touch Member List

+
+
+This is the complete list of members for Wt::Touch, including all inherited members. + + + + + +
document() const Wt::Touch
screen() const Wt::Touch
Touch(int identifier, int clientX, int clientY, int documentX, int documentY, int screenX, int screenY, int widgetX, int widgetY)Wt::Touch
widget() const Wt::Touch
window() const Wt::Touch
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1Touch.html b/wt-3.1.7a/doc/reference/html/classWt_1_1Touch.html new file mode 100644 index 0000000..afbdca5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1Touch.html @@ -0,0 +1,131 @@ + + + + +Wt: Wt::Touch Class Reference + + + + + + + + + +
+ +
+

Wt::Touch Class Reference

+
+
+ +

A single finger touch of a touch event. +More...

+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

Touch (int identifier, int clientX, int clientY, int documentX, int documentY, int screenX, int screenY, int widgetX, int widgetY)
 Constructor.
+Coordinates document () const
 Returns the touch position relative to the document.
Coordinates window () const
 Returns the touch position relative to the window.
+Coordinates screen () const
 Returns the touch position relative to the screen.
+Coordinates widget () const
 Returns the touch position relative to the widget.
+

Detailed Description

+

A single finger touch of a touch event.

+
See also:
WTouchEvent
+

Member Function Documentation

+ +
+
+ + + + + + + +
Coordinates Wt::Touch::window ( ) const
+
+
+ +

Returns the touch position relative to the window.

+

This differs from document() only when scrolling through the document.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea-members.html new file mode 100644 index 0000000..d20104e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea-members.html @@ -0,0 +1,128 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractArea Member List

+
+
+This is the complete list of members for Wt::WAbstractArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
alternateText() const Wt::WAbstractArea
children() const Wt::WObject
clicked()Wt::WAbstractArea
cursor() const Wt::WAbstractArea
doubleClicked()Wt::WAbstractArea
enterPressed()Wt::WAbstractArea
escapePressed()Wt::WAbstractArea
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isHole() const Wt::WAbstractArea
keyPressed()Wt::WAbstractArea
keyWentDown()Wt::WAbstractArea
keyWentUp()Wt::WAbstractArea
Method typedefWt::WObject
mouseDragged()Wt::WAbstractArea
mouseMoved()Wt::WAbstractArea
mouseWentDown()Wt::WAbstractArea
mouseWentOut()Wt::WAbstractArea
mouseWentOver()Wt::WAbstractArea
mouseWentUp()Wt::WAbstractArea
mouseWheel()Wt::WAbstractArea
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
ref() const Wt::WAbstractArea
removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resource() const Wt::WAbstractArea
sender()Wt::WObject [protected, static]
setAlternateText(const WString &text)Wt::WAbstractArea
setCursor(Cursor cursor)Wt::WAbstractArea
setHole(bool hole)Wt::WAbstractArea
setObjectName(const std::string &name)Wt::WObject
setRef(const std::string &ref)Wt::WAbstractArea
setResource(WResource *resource)Wt::WAbstractArea
setStyleClass(const WString &styleClass)Wt::WAbstractArea
setTarget(AnchorTarget target)Wt::WAbstractArea
setToolTip(const WString &text)Wt::WAbstractArea
styleClass() const Wt::WAbstractArea
target() const Wt::WAbstractArea
toolTip() const Wt::WAbstractArea
WObject(WObject *parent=0)Wt::WObject
~WAbstractArea()Wt::WAbstractArea [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea.html new file mode 100644 index 0000000..58f543a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea.html @@ -0,0 +1,785 @@ + + + + +Wt: Wt::WAbstractArea Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractArea Class Reference

+
+
+ +

Abstract base class for interactive areas in a widget. +More...

+ +

#include <Wt/WAbstractArea>

+
+Inheritance diagram for Wt::WAbstractArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

virtual ~WAbstractArea ()
 Destructor.
void setHole (bool hole)
 Specifies that this area specifies a hole for another area.
bool isHole () const
 Returns whether this area specifies a hole.
void setRef (const std::string &ref)
 Sets the destination URL.
const std::string ref () const
 Returns the the destination URL.
void setResource (WResource *resource)
 Set a destination resource.
WResourceresource () const
 Returns the destination resource.
void setTarget (AnchorTarget target)
 Specifies the location where the referred content should be displayed.
AnchorTarget target () const
 Returns the location where the referred content should be displayed.
void setAlternateText (const WString &text)
 Sets an alternate text.
const WString alternateText () const
 Returns the alternate text.
void setToolTip (const WString &text)
 Sets the tooltip.
WString toolTip () const
 Returns the tooltip text.
+void setStyleClass (const WString &styleClass)
 Defines a style class.
WString styleClass () const
 Returns the style class.
+void addStyleClass (const WString &styleClass, bool force=false)
 Adds a style class.
+void removeStyleClass (const WString &styleClass, bool force=false)
 Removes a style class.
void setCursor (Cursor cursor)
 Sets the cursor.
Cursor cursor () const
 Returns the cursor.
EventSignal< WKeyEvent > & keyWentDown ()
 Event signal emitted when a keyboard key is pushed down.
EventSignal< WKeyEvent > & keyPressed ()
 Event signal emitted when a "character" was entered.
EventSignal< WKeyEvent > & keyWentUp ()
 Event signal emitted when a keyboard key is released.
EventSignalenterPressed ()
 Event signal emitted when enter was pressed.
EventSignalescapePressed ()
 Event signal emitted when escape was pressed.
EventSignal< WMouseEvent > & clicked ()
 Event signal emitted when a mouse key was clicked on this widget.
EventSignal< WMouseEvent > & doubleClicked ()
 Event signal emitted when a mouse key was double clicked on this widget.
EventSignal< WMouseEvent > & mouseWentDown ()
 Event signal emitted when a mouse key was pushed down on this widget.
EventSignal< WMouseEvent > & mouseWentUp ()
 Event signal emitted when a mouse key was released on this widget.
EventSignal< WMouseEvent > & mouseWentOut ()
 Event signal emitted when the mouse went out of this widget.
EventSignal< WMouseEvent > & mouseWentOver ()
 Event signal emitted when the mouse entered this widget.
EventSignal< WMouseEvent > & mouseMoved ()
 Event signal emitted when the mouse moved over this widget.
EventSignal< WMouseEvent > & mouseDragged ()
 Event signal emitted when the mouse is dragged over this widget.
EventSignal< WMouseEvent > & mouseWheel ()
 Event signal emitted when the mouse scroll wheel was used.
+

Detailed Description

+

Abstract base class for interactive areas in a widget.

+

Use an WAbstractArea (or rather, one of its concrete implementations), to define interactivity that applies on a part of a WImage or WPaintedWidget. The area may be defined using different shapes through WRectArea, WCircleArea or WPolygonArea.

+
See also:
WImage::addArea(), WPaintedWidget::addArea()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WAbstractArea::~WAbstractArea ( ) [virtual]
+
+
+ +

Destructor.

+

The are is automatically removed from the WImage or WPaintedWidget to which it was added.

+
See also:
WImage::removeArea(), WPaintedWidget::removeArea()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WString Wt::WAbstractArea::alternateText ( ) const
+
+
+ +

Returns the alternate text.

+
See also:
setAlternateText()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::clicked ( )
+
+
+ +

Event signal emitted when a mouse key was clicked on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the event details contain invalid information.
+ +
+
+ +
+
+ + + + + + + +
Cursor Wt::WAbstractArea::cursor ( ) const
+
+
+ +

Returns the cursor.

+
See also:
setCursor()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::doubleClicked ( )
+
+
+ +

Event signal emitted when a mouse key was double clicked on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WAbstractArea::enterPressed ( )
+
+
+ +

Event signal emitted when enter was pressed.

+

This signal is emitted when the Enter or Return key was pressed.

+
See also:
keyPressed(), Key_Enter
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WAbstractArea::escapePressed ( )
+
+
+ +

Event signal emitted when escape was pressed.

+

This signal is emitted when the Escape key was pressed.

+
See also:
keyPressed(), Key_Escape
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WAbstractArea::isHole ( ) const
+
+
+ +

Returns whether this area specifies a hole.

+
See also:
setHole()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WAbstractArea::keyPressed ( )
+
+
+ +

Event signal emitted when a "character" was entered.

+

The keyPressed signal is emitted when a key is pressed, and a character is entered. Unlike keyWentDown(), it is emitted only for key presses that result in a character being entered, and thus not for modifier keys or keyboard navigation keys.

+
See also:
keyWentDown()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WAbstractArea::keyWentDown ( )
+
+
+ +

Event signal emitted when a keyboard key is pushed down.

+

The keyWentDown signal is the first signal emitted when a key is pressed (before the keyPressed() signal). Unlike keyPressed() however it is also emitted for modifier keys (such as "shift", "control", ...) or keyboard navigation keys that do not have a corresponding character.

+
See also:
keyPressed(), keyWentUp()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WAbstractArea::keyWentUp ( )
+
+
+ +

Event signal emitted when a keyboard key is released.

+

This is the counter-part of the keyWentDown() event. Every key-down has its corresponding key-up.

+
See also:
keyWentDown()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseDragged ( )
+
+
+ +

Event signal emitted when the mouse is dragged over this widget.

+

The mouse event contains information on the button(s) currently pressed. If multiple buttons are currently pressed, only the button with smallest enum value is returned.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseMoved ( )
+
+
+ +

Event signal emitted when the mouse moved over this widget.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseWentDown ( )
+
+
+ +

Event signal emitted when a mouse key was pushed down on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseWentOut ( )
+
+
+ +

Event signal emitted when the mouse went out of this widget.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseWentOver ( )
+
+
+ +

Event signal emitted when the mouse entered this widget.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseWentUp ( )
+
+
+ +

Event signal emitted when a mouse key was released on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WAbstractArea::mouseWheel ( )
+
+
+ +

Event signal emitted when the mouse scroll wheel was used.

+

The event details contains information such as the wheel delta, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WAbstractArea::ref ( ) const
+
+
+ +

Returns the the destination URL.

+

When the area refers to a resource, the current resource URL is returned.

+
See also:
setRef(), WResource::url()
+ +
+
+ +
+
+ + + + + + + +
WResource * Wt::WAbstractArea::resource ( ) const
+
+
+ +

Returns the destination resource.

+

Returns 0 if no resource has been set.

+
See also:
setResource()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setAlternateText (const WString text )
+
+
+ +

Sets an alternate text.

+

The alternate text should provide a fallback for browsers that do not display an image. If no sensible fallback text can be provided, an empty text is preferred over nonsense.

+

This should not be confused with toolTip() text, which provides additional information that is displayed when the mouse hovers over the area.

+

The default alternate text is an empty text ("").

+
See also:
alternateText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setCursor (Cursor  cursor )
+
+
+ +

Sets the cursor.

+

This sets the mouse cursor that is shown when the mouse pointer is over the area. Most browsers only support PointingHandCursor, which is activated by a non-empty ref.

+
See also:
setRef()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setHole (bool  hole )
+
+
+ +

Specifies that this area specifies a hole for another area.

+

When set to true, this area will define an area that does not provide interactivity. When it preceeds other, overlapping, areas, it acts as if it cuts a hole in those areas.

+

The default value is false.

+
See also:
isHole()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setRef (const std::string &  ref )
+
+
+ +

Sets the destination URL.

+

By setting a destination URL, the area behaves like a WAnchor.

+

By default, no destination URL is set (ref = "").

+

This method should not be used when the area has been pointed to a dynamically generated resource using setResource().

+
See also:
setResource()
+
Note:
Even when no destination URL is set, in some circumstances, a identity URL ('#') will be set on the underlying HTML <area> element (see also setCursor()).
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setResource (WResource resource )
+
+
+ +

Set a destination resource.

+

A resource specifies application-dependent content, which may be generated by your application on demand.

+

By setting a resource, the area behaves like a WAnchor that refers to the resource resource. The resource may be cleared by passing resource = 0.

+

The area does not assume ownership of the resource.

+
See also:
setRef()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setTarget (AnchorTarget  target )
+
+
+ +

Specifies the location where the referred content should be displayed.

+

This configures the location where referred content should be displayed, that was specified using setRef() or setResource().

+

By default, the reference is displayed in the application (Wt::TargetSelf). When the destination is an HTML document, the application is replaced with the new document. When the reference is a document that cannot be displayed in the browser, it is offered for download or opened using an external program, depending on browser settings.

+

By setting target to Wt::TargetNewWindow, the destination is displayed in a new browser window or tab.

+
See also:
setRef(), setResource(), target()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractArea::setToolTip (const WString text )
+
+
+ +

Sets the tooltip.

+

The tooltip is displayed when the cursor hovers over the area.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WAbstractArea::styleClass ( ) const
+
+
+ +

Returns the style class.

+
See also:
setStyleClass()
+ +
+
+ +
+
+ + + + + + + +
AnchorTarget Wt::WAbstractArea::target ( ) const
+
+
+ +

Returns the location where the referred content should be displayed.

+
See also:
setTarget()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WAbstractArea::toolTip ( ) const
+
+
+ +

Returns the tooltip text.

+
See also:
setToolTip()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.map new file mode 100644 index 0000000..c8cb0cf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.md5 new file mode 100644 index 0000000..6456776 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.md5 @@ -0,0 +1 @@ +62db2f016442b743fd96fdf121ce6c6a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.png new file mode 100644 index 0000000..5153bd0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate-members.html new file mode 100644 index 0000000..0524e9f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate-members.html @@ -0,0 +1,105 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractItemDelegate Member List

+
+
+This is the complete list of members for Wt::WAbstractItemDelegate, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
closeEditor()Wt::WAbstractItemDelegate
closeEditor() const Wt::WAbstractItemDelegate
editState(WWidget *widget) const Wt::WAbstractItemDelegate [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setEditState(WWidget *widget, const boost::any &value) const Wt::WAbstractItemDelegate [virtual]
setModelData(const boost::any &editState, WAbstractItemModel *model, const WModelIndex &index) const Wt::WAbstractItemDelegate [virtual]
setObjectName(const std::string &name)Wt::WObject
update(WWidget *widget, const WModelIndex &index, WFlags< ViewItemRenderFlag > flags)=0Wt::WAbstractItemDelegate [pure virtual]
updateModelIndex(WWidget *widget, const WModelIndex &index)Wt::WAbstractItemDelegate [virtual]
validate(const WModelIndex &index, const boost::any &editState) const Wt::WAbstractItemDelegate [virtual]
WAbstractItemDelegate(WObject *parent=0)Wt::WAbstractItemDelegate
WObject(WObject *parent=0)Wt::WObject
~WAbstractItemDelegate()Wt::WAbstractItemDelegate [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate.html new file mode 100644 index 0000000..acd33f8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate.html @@ -0,0 +1,379 @@ + + + + +Wt: Wt::WAbstractItemDelegate Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractItemDelegate Class Reference
+ +[Model/view system] +

+
+
+ +

Abstract delegate class for rendering an item in a MVC view. +More...

+ +

#include <Wt/WAbstractItemDelegate>

+
+Inheritance diagram for Wt::WAbstractItemDelegate:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WAbstractItemDelegate (WObject *parent=0)
 Constructor.
+virtual ~WAbstractItemDelegate ()
 Destructor.
virtual WWidgetupdate (WWidget *widget, const WModelIndex &index, WFlags< ViewItemRenderFlag > flags)=0
 Creates or updates a widget that renders an item.
virtual void updateModelIndex (WWidget *widget, const WModelIndex &index)
 Updates the model index of a widget.
virtual boost::any editState (WWidget *widget) const
 Returns the current edit state.
virtual void setEditState (WWidget *widget, const boost::any &value) const
 Sets the editor data from the editor state.
virtual WValidator::State validate (const WModelIndex &index, const boost::any &editState) const
 Returns whether the edited value is valid.
virtual void setModelData (const boost::any &editState, WAbstractItemModel *model, const WModelIndex &index) const
 Saves the edited data to the model.
Signal< WWidget *, bool > & closeEditor ()
 Signal which indicates that an editor needs to be closed.
const Signal< WWidget *, bool > & closeEditor () const
 Signal which indicates that an editor needs to be closed.
+

Detailed Description

+

Abstract delegate class for rendering an item in a MVC view.

+

Rendering of an item in a WAbstractItemView is delegated to an implementation of this delegate class. The default implementation used by Wt's item views is WItemDelegate. To provide specialized rendering support, you can reimplement this class, and provide a specialized delegate to the view for rendering items.

+

As a delegate is used for rendering multiple items, the class should not keep state about one specific item.

+

A delegate may provide editing support by instantiating an editor when update() is called with the Wt::RenderEditing flag. In that case, you will also need to implement editState() and setEditState() to support virtual scrolling and setModelData() to save the edited value to the model. For an example, see the WItemDelegate.

+
See also:
WAbstractItemView::setItemDelegateForColumn()
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<WWidget *, bool>& Wt::WAbstractItemDelegate::closeEditor ( )
+
+
+ +

Signal which indicates that an editor needs to be closed.

+

The delegate should emit this signal when it decides for itself that it should be closed (e.g. because the user confirmed the edited value or cancelled the editing). The View will then rerender the item if needed.

+

The second boolean argument passed to the signal is a flag which indicates whether the editor feels that the value should be saved or cancelled.

+
See also:
WAbstractItemView::closeEditor()
+ +
+
+ +
+
+ + + + + + + +
const Signal<WWidget *, bool>& Wt::WAbstractItemDelegate::closeEditor ( ) const
+
+
+ +

Signal which indicates that an editor needs to be closed.

+
See also:
closeEditor()
+ +
+
+ +
+
+ + + + + + + + +
boost::any Wt::WAbstractItemDelegate::editState (WWidget widget ) const [virtual]
+
+
+ +

Returns the current edit state.

+

Because a View may support virtual scrolling in combination with editing, it may happen that the view decides to delete the editor widget while the user is editing. To allow to reconstruct the editor in its original state, the View will therefore ask for the editor to serialize its state in a boost::any.

+

When the view decides to close an editor and save its value back to the model, he will first call editState() and then setModelData().

+

The default implementation assumes a read-only delegate, and returns a boost::any().

+
See also:
setEditState(), setModelData()
+ +

Reimplemented in Wt::WItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemDelegate::setEditState (WWidget widget,
const boost::any &  value 
) const [virtual]
+
+
+ +

Sets the editor data from the editor state.

+

When the View scrolls back into view an item that was being edited, he will use setEditState() to allow the editor to restore its current editor state.

+

The default implementation assumes a read-only delegate and does nothing.

+
See also:
editState()
+ +

Reimplemented in Wt::WItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemDelegate::setModelData (const boost::any &  editState,
WAbstractItemModel model,
const WModelIndex index 
) const [virtual]
+
+
+ +

Saves the edited data to the model.

+

The View will use this method to save the edited value to the model. The editState is first fetched from the editor using editState().

+

The default implementation assumes a read-only delegate does nothing.

+ +

Reimplemented in Wt::WItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual WWidget* Wt::WAbstractItemDelegate::update (WWidget widget,
const WModelIndex index,
WFlags< ViewItemRenderFlag flags 
) [pure virtual]
+
+
+ +

Creates or updates a widget that renders an item.

+

The item is specified by its model index, which also indicates the model. If an existing widget already renders the item, but needs to be updated, it is passed as the widget parameter. You may decide to create a new widget, in which case you are responsible to delete the previous widget if it is not reused.

+

When widget is 0, a new widget needs to be created.

+

The returned widget should be a widget that responds properly to be given a height, width and style class. In practice, that means it cannot have a border or margin, and thus cannot be a WFormWidget since those widgets typically have built-in borders and margins. If you want to return a form widget (for editing the item), you should wrap it in a container widget.

+

The flags parameter indicates options for rendering the item.

+ +

Implemented in Wt::WItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemDelegate::updateModelIndex (WWidget widget,
const WModelIndex index 
) [virtual]
+
+
+ +

Updates the model index of a widget.

+

This method is invoked by the view when due to row/column insertions or removals, the index has shifted.

+

You should reimplement this method only if you are storing the model index in the widget, to update the stored model index.

+

The default implementation does nothing.

+ +

Reimplemented in Wt::WItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WValidator::State Wt::WAbstractItemDelegate::validate (const WModelIndex index,
const boost::any &  editState 
) const [virtual]
+
+
+ +

Returns whether the edited value is valid.

+

The default implementation does nothing and returns Valid.

+
See also:
WValidator::validate()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.map new file mode 100644 index 0000000..410fa27 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.md5 new file mode 100644 index 0000000..b7b860a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.md5 @@ -0,0 +1 @@ +bee2d321cf74c81e596aea7d4032ddcb \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.png new file mode 100644 index 0000000..818444b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemDelegate__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel-members.html new file mode 100644 index 0000000..dbd3e5b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel-members.html @@ -0,0 +1,155 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractItemModel Member List

+
+
+This is the complete list of members for Wt::WAbstractItemModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const =0Wt::WAbstractItemModel [pure virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
sort(int column, SortOrder order=AscendingOrder)Wt::WAbstractItemModel [virtual]
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel.html new file mode 100644 index 0000000..84b3a32 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel.html @@ -0,0 +1,2028 @@ + + + + +Wt: Wt::WAbstractItemModel Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractItemModel Class Reference
+ +[Model/view system] +

+
+
+ +

An abstract model for use with Wt's view classes. +More...

+ +

#include <Wt/WAbstractItemModel>

+
+Inheritance diagram for Wt::WAbstractItemModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

typedef std::map< int, boost::any > DataMap
 Data map.

+Public Member Functions

WAbstractItemModel (WObject *parent=0)
 Creates a new data model.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const =0
 Returns the number of columns.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const =0
 Returns the number of rows.
virtual WFlags< ItemFlagflags (const WModelIndex &index) const
 Returns the flags for an item.
virtual WFlags< HeaderFlagheaderFlags (int section, Orientation orientation=Horizontal) const
 Returns the flags for a header.
virtual bool hasChildren (const WModelIndex &index) const
 Returns if there are children at an index.
virtual WModelIndex parent (const WModelIndex &index) const =0
 Returns the parent for a model index.
virtual boost::any data (const WModelIndex &index, int role=DisplayRole) const =0
 Returns data at a specific model index.
virtual DataMap itemData (const WModelIndex &index) const
 Returns all data at a specific index.
virtual boost::any headerData (int section, Orientation orientation=Horizontal, int role=DisplayRole) const
 Returns the row or column header data.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const =0
 Returns the child index for the given row and column.
virtual WModelIndexList match (const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const
 Returns an index list for data items that match.
boost::any data (int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const
 Returns the data item at the given column and row.
virtual bool hasIndex (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns if an index at the given position is valid (i.e. falls within the column-row bounds).
virtual bool insertColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more columns.
virtual bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more rows.
virtual bool removeColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Removes columns.
virtual bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes rows.
virtual bool setData (const WModelIndex &index, const boost::any &value, int role=EditRole)
 Sets data at the given model index.
virtual bool setItemData (const WModelIndex &index, const DataMap &values)
 Sets data at the given model index.
virtual bool setHeaderData (int section, Orientation orientation, const boost::any &value, int role=EditRole)
 Sets header data for a column or row.
bool setHeaderData (int section, const boost::any &value)
 Sets column header data.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
virtual void expandColumn (int column)
 Expands a column.
virtual void collapseColumn (int column)
 Collapses a column.
virtual void * toRawIndex (const WModelIndex &index) const
 Converts a model index to a raw pointer that remains valid while the model's layout is changed.
virtual WModelIndex fromRawIndex (void *rawIndex) const
 Converts a raw pointer to a model index.
virtual std::string mimeType () const
 Returns a mime-type for dragging a set of indexes.
virtual std::vector< std::string > acceptDropMimeTypes () const
 Returns a list of mime-types that could be accepted for a drop event.
virtual void dropEvent (const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)
 Handles a drop event.
bool insertColumn (int column, const WModelIndex &parent=WModelIndex())
 Inserts one column.
bool insertRow (int row, const WModelIndex &parent=WModelIndex())
 Inserts one row.
bool removeColumn (int column, const WModelIndex &parent=WModelIndex())
 Removes one column.
bool removeRow (int row, const WModelIndex &parent=WModelIndex())
 Removes one row.
bool setData (int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())
 Sets data at the given row and column.
virtual Signal< WModelIndex,
+int, int > & 
columnsAboutToBeInserted ()
 Signal emitted before a number of columns will be inserted.
virtual Signal< WModelIndex,
+int, int > & 
columnsAboutToBeRemoved ()
 Signal emitted before a number of columns will be removed.
virtual Signal< WModelIndex,
+int, int > & 
columnsInserted ()
 Signal emitted after a number of columns were inserted.
virtual Signal< WModelIndex,
+int, int > & 
columnsRemoved ()
 Signal emitted after a number of columns were removed.
virtual Signal< WModelIndex,
+int, int > & 
rowsAboutToBeInserted ()
 Signal emitted before a number of rows will be inserted.
virtual Signal< WModelIndex,
+int, int > & 
rowsAboutToBeRemoved ()
 Signal emitted before a number of rows will be removed.
virtual Signal< WModelIndex,
+int, int > & 
rowsInserted ()
 Signal emitted after a number of rows were inserted.
virtual Signal< WModelIndex,
+int, int > & 
rowsRemoved ()
 Signal emitted after a number of rows were removed.
virtual Signal< WModelIndex,
+WModelIndex > & 
dataChanged ()
 Signal emitted when some data was changed.
virtual Signal< Orientation,
+int, int > & 
headerDataChanged ()
 Signal emitted when some header data was changed.
virtual SignallayoutAboutToBeChanged ()
 Signal emitted when the layout is about to be changed.
virtual SignallayoutChanged ()
 Signal emitted when the layout is changed.
virtual SignalmodelReset ()
 Signal emitted when the model was reset.

+Protected Member Functions

void reset ()
 Resets the model and invalidate any data.
WModelIndex createIndex (int row, int column, void *ptr) const
 Creates a model index for the given row and column.
WModelIndex createIndex (int row, int column,::uint64_t id) const
 Creates a model index for the given row and column.
void beginInsertColumns (const WModelIndex &parent, int first, int last)
 Method to be called before inserting columns.
void beginInsertRows (const WModelIndex &parent, int first, int last)
 Method to be called before inserting rows.
void beginRemoveColumns (const WModelIndex &parent, int first, int last)
 Method to be called before removing columns.
void beginRemoveRows (const WModelIndex &parent, int first, int last)
 Method to be called before removing rows.
void endInsertColumns ()
 Method to be called after inserting columns.
void endInsertRows ()
 Method to be called after inserting rows.
void endRemoveColumns ()
 Method to be called after removing columns.
void endRemoveRows ()
 Method to be called after removing rows.
+

Detailed Description

+

An abstract model for use with Wt's view classes.

+

This abstract model is used by several Wt view widgets as data models.

+

It may model data for both tree-like and table-like view widgets. Data is therefore organized in a hierarchical structure of tables, where every item stores data and items in column 0 can be the parent of a nested table of data. Every data item is uniquely identified by their row, column and parent index, and items may be referenced using the helper class WModelIndex.

+

Each item may provide data for one or more roles, and indicate options using flags. The different roles can be used to model different aspects of an item (its text value, an icon, style class), or to hold auxiliary custom information. The flags provide information to the View on possible interactivity.

+

Top level data have an invalid parent WModelIndex.

+

The data itself is of type boost::any, which can either be empty, or hold any type of data. Depending on the role however, view classes may expect certain types of data (e.g. a string for Wt::StyleClassRole).

+

Wt's standard view classes can display (Wt::DisplayRole) the following data:

+ +

The view classes know how to interpret data of these types as a string or as a number.

+

Conversion between native types and boost::any is done like this:

+
    +
  • +

    Conversion from v (of type Type) to boost::any a (for setData() and setHeaderData())

    +
    + boost::any a = boost::any(v);
    +    

    For example:

    +
    + WDate d(1976,6,14);
    + model->setData(row, column, boost::any(d));
    +    

    +
  • +
  • +Conversion from boost::any a to v (of type Type) (for data() and headerData()):
    + Type v = boost::any_cast<Type>(a);
    +    
    For example:
    + WDate d = boost::any_cast<WDate>(model->data(row, column));
    +    
  • +
  • +Checking if a boost::any a holds a value:
    + if (!a.empty()) {
    +   ...
    + }
    +    
  • +
  • +Determining the value type of a boost::any a, for example:
    + if (a.type() == typeid(double)) {
    +   ...
    + }
    +    
  • +
+

To implement a custom model, you need to reimplement the following methods:

+
    +
  • index() and parent() methods that allow one to navigate the model
  • +
  • columnCount() and rowCount() to specify the top level geometry and the nested geometry at every item
  • +
  • data() to return the data for an item
  • +
  • optionally, headerData() to return row and column header data
  • +
  • optionally, flags() to indicate data options
  • +
+

A crucial point in implementing a hierarchical model is to decide how to reference an index in terms of an internal pointer (WModelIndex::internalPointer()) or internal id (WModelIndex::internalId()). Other than the top-level index, which is special since it is referenced using an invalid index, every index with children must be identifiable using this number or pointer. For example, in the WStandardItemModel, the internal pointer points to the parent WStandardItem. For table models, the internal pointer plays no role, since only the toplevel index has children.

+

If you want to support editing of the model, then you need to indicate this support using a Wt::ItemIsEditable flag, and reimplement setData(). View classes will use the EditRole to read and update the data for the editor.

+

When the model's data has been changed, the model must emit the dataChanged() signal.

+

Finally, there is a generic interface for insertion of new data or removal of data (changing the geometry), although this interface is not yet used by any View class:

+ +

Alternatively, you can provide your own API for changing the model. In either case it is important that you call the corresponding protected member functions which will emit the relevant signals so that views can adapt themselves to the new geometry.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::map<int, boost::any> Wt::WAbstractItemModel::DataMap
+
+
+ +

Data map.

+

A map of data, indexed by a role.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::vector< std::string > Wt::WAbstractItemModel::acceptDropMimeTypes ( ) const [virtual]
+
+
+ +

Returns a list of mime-types that could be accepted for a drop event.

+

The default implementation only accepts drag&drop support between abstract item models.

+
See also:
mimeType()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::beginInsertColumns (const WModelIndex parent,
int  first,
int  last 
) [protected]
+
+
+ +

Method to be called before inserting columns.

+

If your model supports insertion of columns, then you should call this method before inserting one or more columns, and endInsertColumns() afterwards. These methods emit the necessary signals to allow view classes to update themselves.

+
See also:
endInsertColumns(), insertColumns(), columnsAboutToBeInserted
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::beginInsertRows (const WModelIndex parent,
int  first,
int  last 
) [protected]
+
+
+ +

Method to be called before inserting rows.

+

If your model supports insertion of rows, then you should call this method before inserting one or more rows, and endInsertRows() afterwards. These methods emit the necessary signals to allow view classes to update themselves.

+
See also:
endInsertRows(), insertRows(), rowsAboutToBeInserted
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::beginRemoveColumns (const WModelIndex parent,
int  first,
int  last 
) [protected]
+
+
+ +

Method to be called before removing columns.

+

If your model supports removal of columns, then you should call this method before removing one or more columns, and endRemoveColumns() afterwards. These methods emit the necessary signals to allow view classes to update themselves.

+
See also:
endRemoveColumns(), removeColumns(), columnsAboutToBeRemoved
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::beginRemoveRows (const WModelIndex parent,
int  first,
int  last 
) [protected]
+
+
+ +

Method to be called before removing rows.

+

If your model supports removal of rows, then you should call this method before removing one or more rows, and endRemoveRows() afterwards. These methods emit the necessary signals to allow view classes to update themselves.

+
See also:
endRemoveRows(), removeRows(), rowsAboutToBeRemoved
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemModel::collapseColumn (int  column ) [virtual]
+
+
+ +

Collapses a column.

+

Collapses a column. This may only be called by a view when the Wt::ColumnIsExpandedLeft or Wt::ColumnIsExpandedRight flag is set.

+

The default implementation does nothing.

+
See also:
WAggregateProxyModel
+ +

Reimplemented in Wt::WAggregateProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
virtual int Wt::WAbstractItemModel::columnCount (const WModelIndex parent = WModelIndex() ) const [pure virtual]
+
+
+ +

Returns the number of columns.

+

This returns the number of columns at index parent.

+
See also:
rowCount()
+ +

Implemented in Wt::Dbo::QueryModel< Result >, Wt::WAbstractListModel, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::columnsAboutToBeInserted ( ) [virtual]
+
+
+ +

Signal emitted before a number of columns will be inserted.

+

The first argument is the parent index. The two integer arguments are the column numbers that the first and last column will have when inserted.

+
See also:
columnsInserted(), beginInsertColumns()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::columnsAboutToBeRemoved ( ) [virtual]
+
+
+ +

Signal emitted before a number of columns will be removed.

+

The first argument is the parent index. The two integer arguments are the column numbers of the first and last column that will be removed.

+
See also:
columnsRemoved(), beginRemoveColumns()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::columnsInserted ( ) [virtual]
+
+
+ +

Signal emitted after a number of columns were inserted.

+

The first argument is the parent index. The two integer arguments are the column numbers of the first and last column that were inserted.

+
See also:
columnsAboutToBeInserted(), endInsertColumns()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::columnsRemoved ( ) [virtual]
+
+
+ +

Signal emitted after a number of columns were removed.

+

The first argument is the parent index. The two integer arguments are the column numbers of the first and last column that were removed.

+
See also:
columnsAboutToBeRemoved(), endRemoveColumns()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAbstractItemModel::createIndex (int  row,
int  column,
void *  ptr 
) const [protected]
+
+
+ +

Creates a model index for the given row and column.

+

Use this method to create a model index. ptr is an internal pointer that may be used to associate the index with particular model data.

+
See also:
WModelIndex::internalPointer()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAbstractItemModel::createIndex (int  row,
int  column,
::uint64_t  id 
) const [protected]
+
+
+ +

Creates a model index for the given row and column.

+

Use this method to create a model index. id is an internal id that may be used to associate the index with particular model data.

+
See also:
WModelIndex::internalId()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual boost::any Wt::WAbstractItemModel::data (const WModelIndex index,
int  role = DisplayRole 
) const [pure virtual]
+
+
+ +

Returns data at a specific model index.

+

Return data for a given role at a given index.

+
See also:
flags(), headerData(), setData()
+ +

Implemented in Wt::Dbo::QueryModel< Result >, Wt::WBatchEditProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::WAbstractItemModel::data (int  row,
int  column,
int  role = DisplayRole,
const WModelIndex parent = WModelIndex() 
) const
+
+
+ +

Returns the data item at the given column and row.

+

This is a convenience method, and is equivalent to:

+
 index(row, column, parent).data(role)
+
See also:
index(), data()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, WModelIndex>& Wt::WAbstractItemModel::dataChanged ( ) [virtual]
+
+
+ +

Signal emitted when some data was changed.

+

The two arguments are the model indexes of the top-left and bottom-right data items that span the rectangle of changed data items.

+
See also:
setData()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::dropEvent (const WDropEvent e,
DropAction  action,
int  row,
int  column,
const WModelIndex parent 
) [virtual]
+
+
+ +

Handles a drop event.

+

The default implementation only handles generic drag&drop between abstract item models. Source item data is copied (but not the source item's flags).

+

The location in the model is indicated by the row and column within the parent index. If row is -1, then the item is appended to the parent. Otherwise, the item is inserted at or copied over the indicated item (and subsequent rows). When action is a MoveAction, the original items are deleted from the source model.

+

You may want to reimplement this method if you want to handle other mime-type data, or if you want to refine how the drop event of an item selection must be interpreted.

+
Note:
Currently, only row selections are handled by the default implementation.
+
See also:
mimeType(), WItemSelectionModel
+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractItemModel::endInsertColumns ( ) [protected]
+
+
+ +

Method to be called after inserting columns.

+
See also:
beginInsertColumns()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractItemModel::endInsertRows ( ) [protected]
+
+
+ +

Method to be called after inserting rows.

+
See also:
beginInsertRows()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractItemModel::endRemoveColumns ( ) [protected]
+
+
+ +

Method to be called after removing columns.

+
See also:
beginRemoveColumns()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractItemModel::endRemoveRows ( ) [protected]
+
+
+ +

Method to be called after removing rows.

+
See also:
beginRemoveRows()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemModel::expandColumn (int  column ) [virtual]
+
+
+ +

Expands a column.

+

Expands a column. This may only be called by a view when the Wt::ColumnIsCollapsed flag is set.

+

The default implementation does nothing.

+
See also:
WAggregateProxyModel
+ +

Reimplemented in Wt::WAggregateProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WFlags< ItemFlag > Wt::WAbstractItemModel::flags (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the flags for an item.

+

The default implementation returns ItemIsSelectable.

+
See also:
Wt::ItemFlag
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WBatchEditProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAbstractItemModel::fromRawIndex (void *  rawIndex ) const [virtual]
+
+
+ +

Converts a raw pointer to a model index.

+

Use this method to create model index from temporary raw pointers. It is the reciproce method of toRawIndex().

+

You can return an invalid modelindex if the rawIndex no longer points to a valid item because of the layout change.

+
See also:
toRawIndex()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WAbstractItemModel::hasChildren (const WModelIndex index ) const [virtual]
+
+
+ +

Returns if there are children at an index.

+

Returns true when rowCount(index) > 0 and columnCount(index) > 0.

+
See also:
rowCount(), columnCount()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::hasIndex (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns if an index at the given position is valid (i.e. falls within the column-row bounds).

+

Equivalent to:

+
 return row >= 0 && column >= 0
+        && row < rowCount(parent) && column < columnCount(parent);
+
See also:
rowCount(), columnCount()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::WAbstractItemModel::headerData (int  section,
Orientation  orientation = Horizontal,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns the row or column header data.

+

When orientation is Horizontal, section is a column number, when orientation is Vertical, section is a row number.

+
See also:
data(), setHeaderData()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + +
virtual Signal<Orientation, int, int>& Wt::WAbstractItemModel::headerDataChanged ( ) [virtual]
+
+
+ +

Signal emitted when some header data was changed.

+

The first argument indicates the orientation of the header, and the two integer arguments are the row or column numbers of the first and last header item of which the value was changed.

+
See also:
setHeaderData()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WFlags< HeaderFlag > Wt::WAbstractItemModel::headerFlags (int  section,
Orientation  orientation = Horizontal 
) const [virtual]
+
+
+ +

Returns the flags for a header.

+

The default implementation returns no flags set.

+
See also:
Wt::HeaderFlag
+ +

Reimplemented in Wt::WAggregateProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual WModelIndex Wt::WAbstractItemModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [pure virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implemented in Wt::WAbstractListModel, Wt::WAbstractTableModel, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::insertColumn (int  column,
const WModelIndex parent = WModelIndex() 
)
+
+
+ +

Inserts one column.

+

This is a convenience method that adds a single column, and is equivalent to:

+
 insertColumns(column, 1, parent);
+

Returns true if the operation was successful.

+
See also:
insertColumns()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::insertColumns (int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more columns.

+

In models that support column insertion, this inserts count columns, starting at column, and returns true if the operation was successful. The new columns are inserted under parent.

+

The default implementation returns false.

+

The model implementation must call beginInsertColumns() and endInsertColumns() before and after the operation whenever its geometry is changed by inserting columns. This emits signals for views to properly react to these changes.

+
See also:
insertRows(), removeColumns(), beginInsertColumns(), endInsertColumns()
+ +

Reimplemented in Wt::WBatchEditProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::insertRow (int  row,
const WModelIndex parent = WModelIndex() 
)
+
+
+ +

Inserts one row.

+

This is a convenience method that adds a single row, and is equivalent to:

+
 insertRows(row, 1, parent);
+

Returns true if the operation was successful.

+
See also:
insertRows()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::insertRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more rows.

+

In models that support row insertion, this inserts count rows, starting at row, and returns true if the operation was successful. The new rows are inserted under parent.

+

If parent had no children, then a single column is added with count rows.

+

The default implementation returns false.

+

The model implementation must call beginInsertRows() and endInsertRows() before and after the operation whenever its geometry is changed by inserting rows. This emits signals for views to properly react to these changes.

+
See also:
insertColumns(), removeRows(), beginInsertRows(), endInsertRows()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WBatchEditProxyModel, Wt::WSortFilterProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + + +
WAbstractItemModel::DataMap Wt::WAbstractItemModel::itemData (const WModelIndex index ) const [virtual]
+
+
+ +

Returns all data at a specific index.

+

This is a convenience function that returns a map with data corresponding to all standard roles.

+
See also:
data()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal& Wt::WAbstractItemModel::layoutAboutToBeChanged ( ) [virtual]
+
+
+ +

Signal emitted when the layout is about to be changed.

+

A layout change reorders the data in the model, but columns are preserved. Model indexes are invalidated by a layout change, but indexes may be ported across a layout change by using the toRawIndex() and fromRawIndex() methods.

+
See also:
layoutChanged(), toRawIndex(), fromRawIndex()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal& Wt::WAbstractItemModel::layoutChanged ( ) [virtual]
+
+
+ +

Signal emitted when the layout is changed.

+
See also:
layoutAboutToBeChanged()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndexList Wt::WAbstractItemModel::match (const WModelIndex start,
int  role,
const boost::any &  value,
int  hits = -1,
WFlags< MatchFlag flags = WFlags<MatchFlag>(MatchStartsWith       | MatchWrap) 
) const [virtual]
+
+
+ +

Returns an index list for data items that match.

+

Returns an index list of data items that match, starting at start, and searching further in that column. If flags specifies MatchWrap then the search wraps around from the start. If hits is not -1, then at most that number of hits are returned.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WAbstractItemModel::mimeType ( ) const [virtual]
+
+
+ +

Returns a mime-type for dragging a set of indexes.

+

This method returns a mime-type that describes dragging of a selection of items.

+

The drop event will indicate a selection model for this abstract item model as source.

+

The default implementation returns a mime-type for generic drag&drop support between abstract item models.

+
See also:
acceptDropMimeTypes()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal& Wt::WAbstractItemModel::modelReset ( ) [virtual]
+
+
+ +

Signal emitted when the model was reset.

+

A model reset invalidates all existing data, and the model may change its entire geometry (column count, row count).

+
See also:
reset()
+ +
+
+ +
+
+ + + + + + + + +
virtual WModelIndex Wt::WAbstractItemModel::parent (const WModelIndex index ) const [pure virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implemented in Wt::WAbstractListModel, Wt::WAbstractTableModel, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::removeColumn (int  column,
const WModelIndex parent = WModelIndex() 
)
+
+
+ +

Removes one column.

+

This is a convenience method that removes a single column, and is equivalent to:

+
 removeColumns(column, 1, parent);
+

Returns true if the operation was successful.

+
See also:
removeColumns()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::removeColumns (int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes columns.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must call beginRemoveColumns() and endRemoveColumns() before and after the operation whenever its geometry is changed by removing columns. This emits signals for views to properly react to these changes.

+
See also:
removeRows(), insertColumns(), beginRemoveColumns(), endRemoveColumns()
+ +

Reimplemented in Wt::WBatchEditProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::removeRow (int  row,
const WModelIndex parent = WModelIndex() 
)
+
+
+ +

Removes one row.

+

This is a convenience method that removes a single row, and is equivalent to:

+
 removeRows(row, 1, parent);
+

Returns true if the operation was successful.

+
See also:
removeRows()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::removeRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes rows.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must call beginRemoveRows() and endRemoveRows() before and after the operation whenever its geometry is changed by removing rows. This emits signals for views to properly react to these changes.

+
See also:
removeColumns(), insertRows(), beginRemoveRows(), endRemoveRows()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WBatchEditProxyModel, Wt::WSortFilterProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractItemModel::reset ( ) [protected]
+
+
+ +

Resets the model and invalidate any data.

+

Informs any attached view that all data in the model was invalidated, and the model's data should be reread.

+

This causes the modelReset() signal to be emitted.

+ +
+
+ +
+
+ + + + + + + + +
virtual int Wt::WAbstractItemModel::rowCount (const WModelIndex parent = WModelIndex() ) const [pure virtual]
+
+
+ +

Returns the number of rows.

+

This returns the number of rows at index parent.

+
See also:
columnCount()
+ +

Implemented in Wt::Dbo::QueryModel< Result >, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, Wt::WSortFilterProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::rowsAboutToBeInserted ( ) [virtual]
+
+
+ +

Signal emitted before a number of rows will be inserted.

+

The first argument is the parent index. The two integer arguments are the row numbers that the first and last row will have when inserted.

+
See also:
rowsInserted(), beginInsertRows()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::rowsAboutToBeRemoved ( ) [virtual]
+
+
+ +

Signal emitted before a number of rows will be removed.

+

The first argument is the parent index. The two integer arguments are the row numbers of the first and last row that will be removed.

+
See also:
rowsRemoved(), beginRemoveRows()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::rowsInserted ( ) [virtual]
+
+
+ +

Signal emitted after a number of rows were inserted.

+

The first argument is the parent index. The two integer arguments are the row numbers of the first and last row that were inserted.

+
See also:
rowsAboutToBeInserted(), endInsertRows()
+ +
+
+ +
+
+ + + + + + + +
virtual Signal<WModelIndex, int, int>& Wt::WAbstractItemModel::rowsRemoved ( ) [virtual]
+
+
+ +

Signal emitted after a number of rows were removed.

+

The first argument is the parent index. The two integer arguments are the row numbers of the first and last row that were removed.

+
See also:
rowsAboutToBeRemoved(), endRemoveRows()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::setData (const WModelIndex index,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets data at the given model index.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must emit the dataChanged() signal after data was changed.

+
See also:
data()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WBatchEditProxyModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::setData (int  row,
int  column,
const boost::any &  value,
int  role = EditRole,
const WModelIndex parent = WModelIndex() 
)
+
+
+ +

Sets data at the given row and column.

+

This is a convience method, and is equivalent to:

+
 setData(index(row, column, parent), value, role);
+

Returns true if the operation was successful.

+
See also:
setData(), index()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::setHeaderData (int  section,
const boost::any &  value 
)
+
+
+ +

Sets column header data.

+

Returns true if the operation was successful.

+
See also:
setHeaderData(int, Orientation, const boost::any&, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::setHeaderData (int  section,
Orientation  orientation,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets header data for a column or row.

+

Returns true if the operation was successful.

+
See also:
headerData()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WAggregateProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WAbstractItemModel::setItemData (const WModelIndex index,
const DataMap values 
) [virtual]
+
+
+ +

Sets data at the given model index.

+

This is a convenience function that sets data for all roles at once.

+
See also:
setData()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemModel::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented in Wt::Dbo::QueryModel< Result >, Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, Wt::WSortFilterProxyModel, Wt::WStandardItemModel, and Wt::WStringListModel.

+ +
+
+ +
+
+ + + + + + + + +
void * Wt::WAbstractItemModel::toRawIndex (const WModelIndex index ) const [virtual]
+
+
+ +

Converts a model index to a raw pointer that remains valid while the model's layout is changed.

+

Use this method to temporarily save model indexes while the model's layout is changed by for example a sorting operation.

+

The default implementation returns 0, which indicates that the index cannot be converted to a raw pointer. If you reimplement this method, you also need to reimplemnt fromRawIndex().

+
See also:
layoutAboutToBeChanged, sort(), fromRawIndex()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.map new file mode 100644 index 0000000..aebf351 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.md5 new file mode 100644 index 0000000..92ef710 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.md5 @@ -0,0 +1 @@ +e99dbf5b3a70708dd6b330711ce68ac9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.png new file mode 100644 index 0000000..3e12e17 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView-members.html new file mode 100644 index 0000000..e47c230 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView-members.html @@ -0,0 +1,261 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractItemView Member List

+
+
+This is the complete list of members for Wt::WAbstractItemView, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
alternatingRowColors() const Wt::WAbstractItemView [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
clicked()Wt::WAbstractItemView
closeEditor(const WModelIndex &index, bool saveData=true)Wt::WAbstractItemView
closeEditors(bool saveData=true)Wt::WAbstractItemView
columnAlignment(int column) const Wt::WAbstractItemView [virtual]
columnResized()Wt::WAbstractItemView
columnWidth(int column) const Wt::WAbstractItemView
createExtraHeaderWidget(int column)Wt::WAbstractItemView [protected, virtual]
createPageNavigationBar()Wt::WAbstractItemView [protected, virtual]
currentPage() const =0Wt::WAbstractItemView [pure virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
DoubleClicked enum valueWt::WAbstractItemView
doubleClicked()Wt::WAbstractItemView
dropEvent(const WDropEvent &event, const WModelIndex &target)Wt::WAbstractItemView [protected, virtual]
Wt::WCompositeWidget::dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
edit(const WModelIndex &index)Wt::WAbstractItemView
EditOption enum nameWt::WAbstractItemView
editOptions() const Wt::WAbstractItemView
EditTrigger enum nameWt::WAbstractItemView
editTriggers() const Wt::WAbstractItemView
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
extraHeaderWidget(int column)Wt::WAbstractItemView [protected]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
headerAlignment(int column) const Wt::WAbstractItemView [virtual]
headerHeight() const Wt::WAbstractItemView
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
hideColumn(int column)Wt::WAbstractItemView
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isColumnHidden(int column) const Wt::WAbstractItemView
isColumnResizeEnabled() const Wt::WAbstractItemView
isDisabled() const Wt::WCompositeWidget [virtual]
isEditing(const WModelIndex &index) const Wt::WAbstractItemView
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelected(const WModelIndex &index) const Wt::WAbstractItemView
isSortingEnabled() const Wt::WAbstractItemView
isSortingEnabled(int column) const Wt::WAbstractItemView
isValid(const WModelIndex &index) const Wt::WAbstractItemView
isVisible() const Wt::WCompositeWidget [virtual]
itemDelegate() const Wt::WAbstractItemView
itemDelegate(const WModelIndex &index) const Wt::WAbstractItemView
itemDelegate(int column) const Wt::WAbstractItemView
itemDelegateForColumn(int column) const Wt::WAbstractItemView
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LeaveEditorsOpen enum valueWt::WAbstractItemView
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
model() const Wt::WAbstractItemView
mouseWentDown()Wt::WAbstractItemView
mouseWentUp()Wt::WAbstractItemView
MultipleEditors enum valueWt::WAbstractItemView
NoEditTrigger enum valueWt::WAbstractItemView
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
pageChanged()Wt::WAbstractItemView
pageCount() const =0Wt::WAbstractItemView [pure virtual]
pageSize() const =0Wt::WAbstractItemView [pure virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
rootIndex() const Wt::WAbstractItemView
rowHeight() const Wt::WAbstractItemView
SaveWhenClosed enum valueWt::WAbstractItemView
select(const WModelIndex &index, SelectionFlag option=Select)Wt::WAbstractItemView
SelectedClicked enum valueWt::WAbstractItemView
selectedIndexes() const Wt::WAbstractItemView
selectionBehavior() const Wt::WAbstractItemView
selectionChanged()Wt::WAbstractItemView
selectionMode() const Wt::WAbstractItemView
selectionModel() const Wt::WAbstractItemView
sender()Wt::WObject [protected, static]
setAlternatingRowColors(bool enable)Wt::WAbstractItemView [virtual]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setColumnAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setColumnBorder(const WColor &color)=0Wt::WAbstractItemView [pure virtual]
setColumnHidden(int column, bool hide)Wt::WAbstractItemView [virtual]
setColumnResizeEnabled(bool enabled)Wt::WAbstractItemView
setColumnWidth(int column, const WLength &width)=0Wt::WAbstractItemView [pure virtual]
setCurrentPage(int page)=0Wt::WAbstractItemView [pure virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setDragEnabled(bool enable)Wt::WAbstractItemView
setDropsEnabled(bool enable)Wt::WAbstractItemView
setEditOptions(WFlags< EditOption > options)Wt::WAbstractItemView
setEditTriggers(WFlags< EditTrigger > editTriggers)Wt::WAbstractItemView
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHeaderAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setHeaderHeight(const WLength &height, bool multiLine=false)Wt::WAbstractItemView [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setItemDelegate(WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setItemDelegateForColumn(int column, WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setModel(WAbstractItemModel *model)Wt::WAbstractItemView [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setRootIndex(const WModelIndex &rootIndex)Wt::WAbstractItemView
setRowHeight(const WLength &rowHeight)Wt::WAbstractItemView [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setSelectedIndexes(const WModelIndexSet &indexes)Wt::WAbstractItemView
setSelectionBehavior(SelectionBehavior behavior)Wt::WAbstractItemView
setSelectionMode(SelectionMode mode)Wt::WAbstractItemView
setSortingEnabled(bool enabled)Wt::WAbstractItemView
setSortingEnabled(int column, bool enabled)Wt::WAbstractItemView
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
showColumn(int column)Wt::WAbstractItemView
SingleClicked enum valueWt::WAbstractItemView
SingleEditor enum valueWt::WAbstractItemView
sortByColumn(int column, SortOrder order)Wt::WAbstractItemView
sortColumn() const Wt::WAbstractItemView
sortOrder() const Wt::WAbstractItemView
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validateEditor(const WModelIndex &index)Wt::WAbstractItemView
validateEditors()Wt::WAbstractItemView
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WAbstractItemView(WContainerWidget *parent=0)Wt::WAbstractItemView [protected]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView.html new file mode 100644 index 0000000..7495fd0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView.html @@ -0,0 +1,1941 @@ + + + + +Wt: Wt::WAbstractItemView Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractItemView Class Reference
+ +[Model/view system] +

+
+
+ +

An abstract base class for item Views. +More...

+ +

#include <Wt/WAbstractItemView>

+
+Inheritance diagram for Wt::WAbstractItemView:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  EditTrigger { NoEditTrigger = 0x0, +SingleClicked = 0x1, +DoubleClicked = 0x2, +SelectedClicked = 0x4 + }
 

Enumeration that specifies the user action that triggers editing.

+ More...
enum  EditOption { SingleEditor = 0x1, +MultipleEditors = 0x2, +SaveWhenClosed = 0x4, +LeaveEditorsOpen = 0x8 + }
 

Enumeration that specifies editing options.

+ More...

+Public Member Functions

virtual void setModel (WAbstractItemModel *model)
 Sets the model.
WAbstractItemModelmodel () const
 Returns the model.
void setRootIndex (const WModelIndex &rootIndex)
 Sets the root index.
const WModelIndexrootIndex () const
 Returns the root index.
void setItemDelegate (WAbstractItemDelegate *delegate)
 Sets the default item delegate.
WAbstractItemDelegateitemDelegate () const
 Returns the default item delegate.
void setItemDelegateForColumn (int column, WAbstractItemDelegate *delegate)
 Sets the delegate for a column.
WAbstractItemDelegateitemDelegateForColumn (int column) const
 Returns the delegate that was set for a column.
WAbstractItemDelegateitemDelegate (const WModelIndex &index) const
 Returns the delegate for rendering an item.
WAbstractItemDelegateitemDelegate (int column) const
 Returns the delegate for a column.
virtual void setColumnAlignment (int column, AlignmentFlag alignment)
 Sets the content alignment for a column.
virtual void setHeaderAlignment (int column, AlignmentFlag alignment)
 Sets the header alignment for a column.
virtual AlignmentFlag columnAlignment (int column) const
 Returns the content alignment for a column.
virtual AlignmentFlag headerAlignment (int column) const
 Returns the header alignment for a column.
virtual void setAlternatingRowColors (bool enable)
 Sets if alternating row colors are to be used.
virtual bool alternatingRowColors () const
 Returns whether alternating row colors are used.
void sortByColumn (int column, SortOrder order)
 Sorts the data according to a column.
int sortColumn () const
 Returns the current sorting columm.
SortOrder sortOrder () const
 Returns the current sorting order.
void setSortingEnabled (bool enabled)
 Enables or disables sorting for all columns.
void setSortingEnabled (int column, bool enabled)
 Enables or disables sorting for a single column.
bool isSortingEnabled () const
 Returns whether sorting is enabled.
bool isSortingEnabled (int column) const
 Returns whether sorting is enabled for a single column.
void setColumnResizeEnabled (bool enabled)
 Enables interactive column resizing.
bool isColumnResizeEnabled () const
 Returns whether column resizing is enabled.
void setSelectionBehavior (SelectionBehavior behavior)
 Changes the selection behaviour.
SelectionBehavior selectionBehavior () const
 Returns the selection behaviour.
void setSelectionMode (SelectionMode mode)
 Sets the selection mode.
SelectionMode selectionMode () const
 Returns the selection mode.
WItemSelectionModelselectionModel () const
 Returns the selection model.
void setSelectedIndexes (const WModelIndexSet &indexes)
 Sets the selected items.
void select (const WModelIndex &index, SelectionFlag option=Select)
 Selects a single item.
bool isSelected (const WModelIndex &index) const
 Returns wheter an item is selected.
WModelIndexSet selectedIndexes () const
 Returns the set of selected items.
void setDragEnabled (bool enable)
 Enables the selection to be dragged (drag & drop).
void setDropsEnabled (bool enable)
 Enables drop operations (drag & drop).
virtual void setRowHeight (const WLength &rowHeight)
 Sets the row height.
+const WLengthrowHeight () const
 Returns the row height.
virtual void setColumnWidth (int column, const WLength &width)=0
 Sets the column width.
WLength columnWidth (int column) const
 Returns the column width.
virtual void setColumnHidden (int column, bool hide)
 Changes the visibility of a column.
bool isColumnHidden (int column) const
 Returns if a column is hidden.
void hideColumn (int column)
 Hides a column.
void showColumn (int column)
 Shows a column.
virtual void setColumnBorder (const WColor &color)=0
 Sets the column border color.
virtual void setHeaderHeight (const WLength &height, bool multiLine=false)
 Sets the header height.
const WLengthheaderHeight () const
 Returns the header height.
virtual int pageCount () const =0
 Returns the number of pages.
virtual int pageSize () const =0
 Returns the page size.
virtual int currentPage () const =0
 Returns the current page.
virtual void setCurrentPage (int page)=0
 Sets the current page.
void setEditTriggers (WFlags< EditTrigger > editTriggers)
 Configures what actions should trigger editing.
WFlags< EditTriggereditTriggers () const
 Returns the editing triggers.
void setEditOptions (WFlags< EditOption > options)
 Configures editing options.
WFlags< EditOptioneditOptions () const
 Returns the editing options.
void edit (const WModelIndex &index)
 Opens an editor for the given index.
void closeEditor (const WModelIndex &index, bool saveData=true)
 Closes the editor for the given index.
void closeEditors (bool saveData=true)
 Closes all open editors.
WValidator::State validateEditor (const WModelIndex &index)
 Validates the editor for the given index.
WValidator::State validateEditors ()
 Validates all editors.
bool isEditing (const WModelIndex &index) const
 Returns whether an editor is open for a given index.
+bool isValid (const WModelIndex &index) const
 Returns whether an editor's state is valid.
Signal< WModelIndex,
+WMouseEvent > & 
clicked ()
 Signal emitted when an item is clicked.
Signal< WModelIndex,
+WMouseEvent > & 
doubleClicked ()
 Signal emitted when an item is double clicked.
Signal< WModelIndex,
+WMouseEvent > & 
mouseWentDown ()
 Signal emitted when a mouse button is pressed down.
Signal< WModelIndex,
+WMouseEvent > & 
mouseWentUp ()
 Signal emitted when the mouse button is released.
SignalselectionChanged ()
 Signal emitted when the selection is changed.
SignalpageChanged ()
 Signal emitted when page information was updated.
Signal< int, WLength > & columnResized ()
 Returns the signal emitted when a column is resized by the user.

+Protected Member Functions

WAbstractItemView (WContainerWidget *parent=0)
 Creates a new item view.
virtual void dropEvent (const WDropEvent &event, const WModelIndex &target)
 Handles a drop event (drag & drop).
virtual WWidgetcreateExtraHeaderWidget (int column)
 Create an extra widget in the header.
WWidgetextraHeaderWidget (int column)
 Returns the extra header widget.
virtual WWidgetcreatePageNavigationBar ()
 Returns a page navigation widget.
+

Detailed Description

+

An abstract base class for item Views.

+

See WTableView or WTreeView for a description.

+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WAbstractItemView.PageIOfN: {1} of {2}
  • +
  • Wt.WAbstractItemView.PageBar.First: &xc2ab; First
  • +
  • Wt.WAbstractItemView.PageBar.Previous: &xe280b9; Previous
  • +
  • Wt.WAbstractItemView.PageBar.Next: Next &xe280ba;
  • +
  • Wt.WAbstractItemView.PageBar.Last: Last &xc2bb;
  • +
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that specifies editing options.

+
See also:
setEditOptions()
+
Enumerator:
+ + + + +
SingleEditor  +

Never show more than one active editor.

+
MultipleEditors  +

Allow multiple editors at the same time.

+
SaveWhenClosed  +

Always save the current edit value when closing.

+
LeaveEditorsOpen  +

Editors can only be closed using closeEditor()

+
+
+
+ +
+
+ +
+ +
+ +

Enumeration that specifies the user action that triggers editing.

+
See also:
setEditTriggers(), edit()
+
Enumerator:
+ + + + +
NoEditTrigger  +

Do not allow user to initiate editing.

+
SingleClicked  +

Edit an item when clicked.

+
DoubleClicked  +

Edit an item when double clicked.

+
SelectedClicked  +

Edit a selected item that is clicked again.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool Wt::WAbstractItemView::alternatingRowColors ( ) const [virtual]
+
+
+ +

Returns whether alternating row colors are used.

+

When enabled, rows are displayed in alternating row colors, according to the current theme's definition.

+
See also:
setAlternatingRowColors()
+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex, WMouseEvent>& Wt::WAbstractItemView::clicked ( )
+
+
+ +

Signal emitted when an item is clicked.

+
See also:
doubleClicked()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::closeEditor (const WModelIndex index,
bool  saveData = true 
)
+
+
+ +

Closes the editor for the given index.

+

If saveData is true, then the currently edited value is saved first to the model.

+
See also:
edit()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::closeEditors (bool  saveData = true )
+
+
+ +

Closes all open editors.

+

If saveData is true, then the currently edited values are saved to the model before closing the editor.

+
See also:
closeEditor()
+ +
+
+ +
+
+ + + + + + + + +
AlignmentFlag Wt::WAbstractItemView::columnAlignment (int  column ) const [virtual]
+
+
+ +

Returns the content alignment for a column.

+
See also:
setColumnAlignment()
+ +
+
+ +
+
+ + + + + + + +
Signal<int, WLength>& Wt::WAbstractItemView::columnResized ( )
+
+
+ +

Returns the signal emitted when a column is resized by the user.

+

The arguments of the signal are: the column index and the new width of the column.

+ +
+
+ +
+
+ + + + + + + + +
WLength Wt::WAbstractItemView::columnWidth (int  column ) const
+
+
+ +

Returns the column width.

+
See also:
setColumnWidth()
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::WAbstractItemView::createExtraHeaderWidget (int  column ) [protected, virtual]
+
+
+ +

Create an extra widget in the header.

+

You may reimplement this method to provide an extra widget to be placed below the header label. The extra widget will be visible only if a multi-line header is configured using setHeaderHeight().

+

The widget is created only once, but this method may be called repeatedly for a column for which prior calls returned 0 (i.e. each time the header is rerendered).

+

The default implementation returns 0.

+
See also:
setHeaderHeight(), extraHeaderWidget()
+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WAbstractItemView::createPageNavigationBar ( ) [protected, virtual]
+
+
+ +

Returns a page navigation widget.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data, created by this method. The default implementation displays a simple navigation bar with (First, Prevous, Next, Last) buttons and a page counter.

+

You may want to reimplement this method to provide a custom page navigation bar. You can use the currentPage(), pageCount(), and setCurrentPage() methods to set or get the page information, and listen to the pageChanged() signal to react to changes.

+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WAbstractItemView::currentPage ( ) const [pure virtual]
+
+
+ +

Returns the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the current page (between 0 and pageCount() - 1).

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex, WMouseEvent>& Wt::WAbstractItemView::doubleClicked ( )
+
+
+ +

Signal emitted when an item is double clicked.

+
See also:
clicked()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::dropEvent (const WDropEvent event,
const WModelIndex target 
) [protected, virtual]
+
+
+ +

Handles a drop event (drag & drop).

+

The event object contains details about the drop operation, identifying the source (which provides the data) and the mime-type of the data. The drop was received on the target item.

+

The drop event can be handled either by the view itself, or by the model. The default implementation checks if the mime-type is accepted by the model, and if so passes the drop event to the model. If the source is the view's own selection model, then the drop event will be handled as a MoveAction, otherwise the drop event will be handled as a CopyAction.

+
See also:
WAbstractItemModel::dropEvent()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::edit (const WModelIndex index )
+
+
+ +

Opens an editor for the given index.

+

Unless multiple editors are enabled, any other open editor is closed first.

+
See also:
setEditTriggers(), setEditOptions(), closeEditor()
+ +
+
+ +
+
+ + + + + + + +
WFlags<EditOption> Wt::WAbstractItemView::editOptions ( ) const
+
+
+ +

Returns the editing options.

+
See also:
setEditOptions()
+ +
+
+ +
+
+ + + + + + + +
WFlags<EditTrigger> Wt::WAbstractItemView::editTriggers ( ) const
+
+
+ +

Returns the editing triggers.

+
See also:
setEditTriggers()
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::WAbstractItemView::extraHeaderWidget (int  column ) [protected]
+
+
+ +

Returns the extra header widget.

+

Returns the widget previously created using createExtraHeaderWidget()

+
See also:
createExtraHeaderWidget()
+ +
+
+ +
+
+ + + + + + + + +
AlignmentFlag Wt::WAbstractItemView::headerAlignment (int  column ) const [virtual]
+
+
+ +

Returns the header alignment for a column.

+
See also:
setHeaderAlignment()
+ +
+
+ +
+
+ + + + + + + +
const WLength& Wt::WAbstractItemView::headerHeight ( ) const
+
+
+ +

Returns the header height.

+
See also:
setHeaderHeight()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::hideColumn (int  column )
+
+
+ +

Hides a column.

+
See also:
showColumn(), setColumnHidden()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WAbstractItemView::isColumnHidden (int  column ) const
+
+
+ +

Returns if a column is hidden.

+
See also:
setColumnHidden()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WAbstractItemView::isColumnResizeEnabled ( ) const
+
+
+ +

Returns whether column resizing is enabled.

+
See also:
setColumnResizeEnabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WAbstractItemView::isEditing (const WModelIndex index ) const
+
+
+ +

Returns whether an editor is open for a given index.

+
See also:
edit()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WAbstractItemView::isSelected (const WModelIndex index ) const
+
+
+ +

Returns wheter an item is selected.

+

This is a convenience method for:

+
 selectionModel()->isSelected(index)
+
See also:
selectedIndexes(), select(), selectionModel()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WAbstractItemView::isSortingEnabled ( ) const
+
+
+ +

Returns whether sorting is enabled.

+
See also:
setSortingEnabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WAbstractItemView::isSortingEnabled (int  column ) const
+
+
+ +

Returns whether sorting is enabled for a single column.

+
See also:
setSortingEnabled()
+ +
+
+ +
+
+ + + + + + + + +
WAbstractItemDelegate * Wt::WAbstractItemView::itemDelegate (int  column ) const
+
+
+ +

Returns the delegate for a column.

+

Returns either the delegate that was set for the column, or the default delegate.

+ +
+
+ +
+
+ + + + + + + + +
WAbstractItemDelegate * Wt::WAbstractItemView::itemDelegate (const WModelIndex index ) const
+
+
+ +

Returns the delegate for rendering an item.

+
See also:
setItemDelegateForColumn(), setItemDelegate()
+ +
+
+ +
+
+ + + + + + + +
WAbstractItemDelegate* Wt::WAbstractItemView::itemDelegate ( ) const
+
+
+ +

Returns the default item delegate.

+
See also:
setItemDelegate()
+ +
+
+ +
+
+ + + + + + + + +
WAbstractItemDelegate * Wt::WAbstractItemView::itemDelegateForColumn (int  column ) const
+
+
+ +

Returns the delegate that was set for a column.

+

Returns 0 if no delegate was set for the column.

+
See also:
setItemDelegateForColumn()
+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::WAbstractItemView::model ( ) const
+
+
+ +

Returns the model.

+
See also:
setModel()
+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex, WMouseEvent>& Wt::WAbstractItemView::mouseWentDown ( )
+
+
+ +

Signal emitted when a mouse button is pressed down.

+
See also:
mouseWentUp()
+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex, WMouseEvent>& Wt::WAbstractItemView::mouseWentUp ( )
+
+
+ +

Signal emitted when the mouse button is released.

+
See also:
mouseWentDown()
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WAbstractItemView::pageChanged ( )
+
+
+ +

Signal emitted when page information was updated.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This signal is emitted when page-related information changed (e.g. the current page was changed, or the number of rows was changed).

+
See also:
createPageNavigationBar()
+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WAbstractItemView::pageCount ( ) const [pure virtual]
+
+
+ +

Returns the number of pages.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of pages currently shown.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WAbstractItemView::pageSize ( ) const [pure virtual]
+
+
+ +

Returns the page size.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of items per page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + +
const WModelIndex& Wt::WAbstractItemView::rootIndex ( ) const
+
+
+ +

Returns the root index.

+
See also:
setRootIndex()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::select (const WModelIndex index,
SelectionFlag  option = Select 
)
+
+
+ +

Selects a single item.

+
See also:
setSelectedIndexes(), selectionModel()
+ +
+
+ +
+
+ + + + + + + +
WModelIndexSet Wt::WAbstractItemView::selectedIndexes ( ) const
+
+
+ +

Returns the set of selected items.

+

The model indexes are returned as a set, topologically ordered (in the order they appear in the view).

+

This is a convenience method for:

+
 selectionModel()->selectedIndexes()
+
See also:
setSelectedIndexes()
+ +
+
+ +
+
+ + + + + + + +
SelectionBehavior Wt::WAbstractItemView::selectionBehavior ( ) const
+
+
+ +

Returns the selection behaviour.

+
See also:
setSelectionBehavior()
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WAbstractItemView::selectionChanged ( )
+
+
+ +

Signal emitted when the selection is changed.

+
See also:
select(), setSelectionMode(), setSelectionBehavior()
+ +
+
+ +
+
+ + + + + + + +
SelectionMode Wt::WAbstractItemView::selectionMode ( ) const
+
+
+ +

Returns the selection mode.

+
See also:
setSelectionMode()
+ +
+
+ +
+
+ + + + + + + +
WItemSelectionModel* Wt::WAbstractItemView::selectionModel ( ) const
+
+
+ +

Returns the selection model.

+

The selection model keeps track of the currently selected items.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setAlternatingRowColors (bool  enable ) [virtual]
+
+
+ +

Sets if alternating row colors are to be used.

+

Configure whether rows get alternating background colors, defined by the current CSS theme.

+

The default value is false.

+ +

Reimplemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setColumnAlignment (int  column,
AlignmentFlag  alignment 
) [virtual]
+
+
+ +

Sets the content alignment for a column.

+

The default value is AlignLeft.

+
See also:
setHeaderAlignment()
+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WAbstractItemView::setColumnBorder (const WColor color ) [pure virtual]
+
+
+ +

Sets the column border color.

+

The default border color is defined by the CSS theme.

+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setColumnHidden (int  column,
bool  hide 
) [virtual]
+
+
+ +

Changes the visibility of a column.

+
See also:
isColumnHidden()
+ +

Reimplemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setColumnResizeEnabled (bool  enabled )
+
+
+ +

Enables interactive column resizing.

+

Enable or disable column resize handles for interactive resizing of the columns.

+

Column resizing is enabled by default when JavaScript is available.

+
See also:
setColumnResizeEnabled()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WAbstractItemView::setColumnWidth (int  column,
const WLength width 
) [pure virtual]
+
+
+ +

Sets the column width.

+

The default column width is 150 pixels.

+
Note:
The actual space occupied by each column is the column width augmented by 7 pixels for internal padding and a border.
+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WAbstractItemView::setCurrentPage (int  page ) [pure virtual]
+
+
+ +

Sets the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This method can be used to change the current page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setDragEnabled (bool  enable )
+
+
+ +

Enables the selection to be dragged (drag & drop).

+

To enable dragging of the selection, you first need to enable selection using setSelectionMode().

+

Whether an individual item may be dragged is controlled by the item's ItemIsDragEnabled flag. The selection can be dragged only if all items currently selected can be dragged.

+
See also:
setDropsEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setDropsEnabled (bool  enable )
+
+
+ +

Enables drop operations (drag & drop).

+

When drop is enabled, the tree view will indicate that something may be dropped when the mime-type of the dragged object is compatible with one of the model's accepted drop mime-types (see WAbstractItemModel::acceptDropMimeTypes()) or this widget's accepted drop mime-types (see WWidget::acceptDrops()), and the target item has drop enabled (which is controlled by the item's ItemIsDropEnabled flag).

+

Drop events must be handled in dropEvent().

+
See also:
setDragEnabled(), dropEvent()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setEditOptions (WFlags< EditOption options )
+
+
+ +

Configures editing options.

+

The default value is SingleEditor;

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setEditTriggers (WFlags< EditTrigger editTriggers )
+
+
+ +

Configures what actions should trigger editing.

+

The default value is DoubleClicked.

+
See also:
edit()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setHeaderAlignment (int  column,
AlignmentFlag  alignment 
) [virtual]
+
+
+ +

Sets the header alignment for a column.

+

The default value is AlignLeft.

+
See also:
setColumnAlignment()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setHeaderHeight (const WLength height,
bool  multiLine = false 
) [virtual]
+
+
+ +

Sets the header height.

+

Use this method to change the header height. By default, the header text is a single line that is centered vertically.

+

By enabling multi-line headers, the header text will be aligned to the top and wrap as needed. In that case, additional contents may be displayed in the header, provided by createExtraHeaderWidget().

+

The default value is a single line of 20 pixels.

+ +

Reimplemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setItemDelegate (WAbstractItemDelegate delegate )
+
+
+ +

Sets the default item delegate.

+

The previous delegate is removed but not deleted. This item delegate is for all columns for which no specific item delegate is set.

+

The default item delegate is a WItemDelegate.

+
See also:
setItemDelegateForColumn()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setItemDelegateForColumn (int  column,
WAbstractItemDelegate delegate 
)
+
+
+ +

Sets the delegate for a column.

+

The previous delegate is removed but not deleted.

+
See also:
setItemDelegate()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setModel (WAbstractItemModel model ) [virtual]
+
+
+ +

Sets the model.

+

The View will display data of the given model and changes in the model are reflected by the View.

+

The initial model is 0.

+

Ownership of the model is not transferred (and thus the previously set model is not deleted). A model may not be deleted as long as a view exists for it.

+
See also:
setRootIndex()
+ +

Reimplemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setRootIndex (const WModelIndex rootIndex )
+
+
+ +

Sets the root index.

+

The root index is the model index that is considered the root node. This node itself is not rendered, but its children are.

+

The default value is an invalid model index, corresponding to the model's root node.

+
See also:
setModel()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setRowHeight (const WLength rowHeight ) [virtual]
+
+
+ +

Sets the row height.

+

The view renders all rows with a same height. This method configures this row height.

+

The default value is 20 pixels.

+
Note:
The height must be specified in WLength::Pixel units.
+
See also:
setColumnWidth()
+ +

Reimplemented in Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setSelectedIndexes (const WModelIndexSet &  indexes )
+
+
+ +

Sets the selected items.

+

Replaces the current selection with indexes.

+
See also:
select(), selectionModel()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setSelectionBehavior (SelectionBehavior  behavior )
+
+
+ +

Changes the selection behaviour.

+

The selection behavior indicates whether whole rows or individual items can be selected. It is a property of the selectionModel().

+

By default, selection operates on rows (SelectRows), in which case model indexes will always be in the first column (column 0).

+

Alternatively, you can allow selection for individual items (SelectItems).

+
See also:
WItemSelectionModel::setSelectionBehavior(), setSelectionMode()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setSelectionMode (SelectionMode  mode )
+
+
+ +

Sets the selection mode.

+

By default selection is disabled (NoSelection ).

+
See also:
setSelectionBehavior()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::setSortingEnabled (int  column,
bool  enabled 
)
+
+
+ +

Enables or disables sorting for a single column.

+

Enable or disable sorting by the user for a specific column.

+

Sorting is enabled by default.

+
See also:
WAbstractItemModel::sort()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::setSortingEnabled (bool  enabled )
+
+
+ +

Enables or disables sorting for all columns.

+

Enable or disable sorting by the user on all columns.

+

Sorting is enabled by default.

+
See also:
WAbstractItemModel::sort()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractItemView::showColumn (int  column )
+
+
+ +

Shows a column.

+
See also:
hideColumn(), setColumnHidden()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAbstractItemView::sortByColumn (int  column,
SortOrder  order 
)
+
+
+ +

Sorts the data according to a column.

+

Sorts the data according to data in column column and sort order order.

+

The default sorting column is -1: the model is unsorted.

+
See also:
WAbstractItemModel::sort()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WAbstractItemView::sortColumn ( ) const
+
+
+ +

Returns the current sorting columm.

+
See also:
sortByColumn(), sortOrder()
+ +
+
+ +
+
+ + + + + + + +
SortOrder Wt::WAbstractItemView::sortOrder ( ) const
+
+
+ +

Returns the current sorting order.

+
See also:
sortByColumn(), sortColumn()
+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WAbstractItemView::validateEditor (const WModelIndex index )
+
+
+ +

Validates the editor for the given index.

+

Validation is done by invoking WAbstractItemDelegate::validate().

+ +
+
+ +
+
+ + + + + + + +
WValidator::State Wt::WAbstractItemView::validateEditors ( )
+
+
+ +

Validates all editors.

+
See also:
validateEditor().
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.map new file mode 100644 index 0000000..a442861 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.md5 new file mode 100644 index 0000000..353a9ab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.md5 @@ -0,0 +1 @@ +2b16a6baafa2776a502c3ac07edfe4f6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.png new file mode 100644 index 0000000..ce736ec Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractItemView__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel-members.html new file mode 100644 index 0000000..37a4003 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel-members.html @@ -0,0 +1,157 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractListModel Member List

+
+
+This is the complete list of members for Wt::WAbstractListModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::WAbstractListModel [virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractListModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WAbstractListModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
sort(int column, SortOrder order=AscendingOrder)Wt::WAbstractItemModel [virtual]
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractListModel(WObject *parent=0)Wt::WAbstractListModel
WObject(WObject *parent=0)Wt::WObject
~WAbstractListModel()Wt::WAbstractListModel
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel.html new file mode 100644 index 0000000..95ffba9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel.html @@ -0,0 +1,209 @@ + + + + +Wt: Wt::WAbstractListModel Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractListModel Class Reference
+ +[Model/view system] +

+
+
+ +

An abstract list model for use with Wt's view classes. +More...

+ +

#include <Wt/WAbstractListModel>

+
+Inheritance diagram for Wt::WAbstractListModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

WAbstractListModel (WObject *parent=0)
 Create a new abstract list model.
~WAbstractListModel ()
 Destructor.
virtual WModelIndex parent (const WModelIndex &index) const
 Returns the parent for a model index.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
+

Detailed Description

+

An abstract list model for use with Wt's view classes.

+

An abstract list model specializes WAbstractItemModel for one-dimensional lists (i.e. a model with 1 column and no children).

+

It cannot be used directly but must be subclassed. Subclassed models must at least reimplement rowCount() to return the number of rows, and data() to return data.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WAbstractListModel::columnCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of columns.

+

This returns the number of columns at index parent.

+
See also:
rowCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAbstractListModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAbstractListModel::parent (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.map new file mode 100644 index 0000000..958d347 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.md5 new file mode 100644 index 0000000..a21f6c7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.md5 @@ -0,0 +1 @@ +e7c2bfe349fa2bcb6e9308595256cd60 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.png new file mode 100644 index 0000000..25c6810 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractListModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel-members.html new file mode 100644 index 0000000..d89adb8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel-members.html @@ -0,0 +1,163 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractProxyModel Member List

+
+
+This is the complete list of members for Wt::WAbstractProxyModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
createSourceIndex(int row, int column, void *ptr) const Wt::WAbstractProxyModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
ItemMap typedefWt::WAbstractProxyModel [protected]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
mapFromSource(const WModelIndex &sourceIndex) const =0Wt::WAbstractProxyModel [pure virtual]
mapToSource(const WModelIndex &proxyIndex) const =0Wt::WAbstractProxyModel [pure virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const =0Wt::WAbstractItemModel [pure virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
setSourceModel(WAbstractItemModel *sourceModel)Wt::WAbstractProxyModel [virtual]
shiftModelIndexes(const WModelIndex &sourceParent, int start, int count, ItemMap &items)Wt::WAbstractProxyModel [protected]
sort(int column, SortOrder order=AscendingOrder)Wt::WAbstractItemModel [virtual]
sourceModel() const Wt::WAbstractProxyModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractProxyModel(WObject *parent=0)Wt::WAbstractProxyModel
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel.html new file mode 100644 index 0000000..2e40ee7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel.html @@ -0,0 +1,323 @@ + + + + +Wt: Wt::WAbstractProxyModel Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractProxyModel Class Reference
+ +[Model/view system] +

+
+
+ +

An abstract proxy model for Wt's item models. +More...

+ +

#include <Wt/WAbstractProxyModel>

+
+Inheritance diagram for Wt::WAbstractProxyModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  BaseItem
 A base class for an item modeling a source index parent. More...

+Public Member Functions

WAbstractProxyModel (WObject *parent=0)
 Constructor.
virtual WModelIndex mapFromSource (const WModelIndex &sourceIndex) const =0
 Maps a source model index to the proxy model.
virtual WModelIndex mapToSource (const WModelIndex &proxyIndex) const =0
 Maps a proxy model index to the source model.
virtual void setSourceModel (WAbstractItemModel *sourceModel)
 Sets the source model.
WAbstractItemModelsourceModel () const
 Returns the source model.

+Protected Types

typedef std::map< WModelIndex,
+BaseItem * > 
ItemMap
 A map for items.

+Protected Member Functions

WModelIndex createSourceIndex (int row, int column, void *ptr) const
 Create a source model index.
void shiftModelIndexes (const WModelIndex &sourceParent, int start, int count, ItemMap &items)
 Utility methods to shift items in an item map.
+

Detailed Description

+

An abstract proxy model for Wt's item models.

+

A proxy model does not store data, but presents data from a source model in another way. It may provide filtering, sorting, or other computed changes to the source model. A proxy model may be a fully functional model, that also allows modification of the underlying model.

+

This abstract proxy model may be used as a starting point for implementing a custom proxy model, when WSortFilterProxyModel is not adequate. It implements data access and manipulation using the a virtual mapping method (mapToSource()) to access and manipulate the underlying sourceModel().

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::map<WModelIndex, BaseItem *> Wt::WAbstractProxyModel::ItemMap [protected]
+
+
+ +

A map for items.

+
See also:
BaseItem
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAbstractProxyModel::createSourceIndex (int  row,
int  column,
void *  ptr 
) const [protected]
+
+
+ +

Create a source model index.

+

This is a utility function that allows you to create indexes in the source model. In this way, you can reuse the internal pointers of the source model in proxy model indexes, and convert a proxy model index back to the source model index using this method.

+ +
+
+ +
+
+ + + + + + + + +
virtual WModelIndex Wt::WAbstractProxyModel::mapFromSource (const WModelIndex sourceIndex ) const [pure virtual]
+
+
+ +

Maps a source model index to the proxy model.

+

This method returns a model index in the proxy model that corresponds to the model index sourceIndex in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of mapToSource().

+
See also:
mapToSource()
+ +

Implemented in Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
virtual WModelIndex Wt::WAbstractProxyModel::mapToSource (const WModelIndex proxyIndex ) const [pure virtual]
+
+
+ +

Maps a proxy model index to the source model.

+

This method returns a model index in the source model that corresponds to the proxy model index proxyIndex.

+
See also:
mapFromSource()
+ +

Implemented in Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WAbstractProxyModel::setSourceModel (WAbstractItemModel sourceModel ) [virtual]
+
+
+ +

Sets the source model.

+

The source model provides the actual data for the proxy model.

+

Ownership of the source model is not transferred.

+ +

Reimplemented in Wt::WAggregateProxyModel, Wt::WBatchEditProxyModel, and Wt::WSortFilterProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAbstractProxyModel::shiftModelIndexes (const WModelIndex sourceParent,
int  start,
int  count,
ItemMap items 
) [protected]
+
+
+ +

Utility methods to shift items in an item map.

+

You can use this method to adjust an item map after the source model has inserted or removed rows. When removing rows (count < 0), items may possibly be removed and deleted.

+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::WAbstractProxyModel::sourceModel ( ) const
+
+
+ +

Returns the source model.

+
See also:
setSourceModel()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.map new file mode 100644 index 0000000..9859300 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.md5 new file mode 100644 index 0000000..701e57c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.md5 @@ -0,0 +1 @@ +36fad0167a87d72b347f1747077abbf1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.png new file mode 100644 index 0000000..6486126 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractProxyModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel-members.html new file mode 100644 index 0000000..a36d92f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel-members.html @@ -0,0 +1,157 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractTableModel Member List

+
+
+This is the complete list of members for Wt::WAbstractTableModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractTableModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WAbstractTableModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
sort(int column, SortOrder order=AscendingOrder)Wt::WAbstractItemModel [virtual]
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractTableModel(WObject *parent=0)Wt::WAbstractTableModel
WObject(WObject *parent=0)Wt::WObject
~WAbstractTableModel()Wt::WAbstractTableModel
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel.html new file mode 100644 index 0000000..4ac25cb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel.html @@ -0,0 +1,184 @@ + + + + +Wt: Wt::WAbstractTableModel Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractTableModel Class Reference
+ +[Model/view system] +

+
+
+ +

An abstract table model for use with Wt's view classes. +More...

+ +

#include <Wt/WAbstractTableModel>

+
+Inheritance diagram for Wt::WAbstractTableModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

WAbstractTableModel (WObject *parent=0)
 Creates a new abstract list model.
~WAbstractTableModel ()
 Destructor.
virtual WModelIndex parent (const WModelIndex &index) const
 Returns the parent for a model index.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
+

Detailed Description

+

An abstract table model for use with Wt's view classes.

+

An abstract table model specializes WAbstractItemModel for two-dimensional tables (but no hierarchical models).

+

It cannot be used directly but must be subclassed. Subclassed models must at least reimplement columnCount(), rowCount() and data().

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAbstractTableModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAbstractTableModel::parent (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.map new file mode 100644 index 0000000..5837617 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.md5 new file mode 100644 index 0000000..f18b0d9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.md5 @@ -0,0 +1 @@ +28f40968ba413e214d550e225051357f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.png new file mode 100644 index 0000000..2d42f78 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractTableModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton-members.html new file mode 100644 index 0000000..e77dbc8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton-members.html @@ -0,0 +1,231 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractToggleButton Member List

+
+
+This is the complete list of members for Wt::WAbstractToggleButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
checked()Wt::WAbstractToggleButton
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WAbstractToggleButton [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::WAbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool checked)Wt::WAbstractToggleButton
setChecked()Wt::WAbstractToggleButton [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WAbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setUnChecked()Wt::WAbstractToggleButton [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WAbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::WAbstractToggleButton
validate()Wt::WFormWidget [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WAbstractToggleButton(WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WAbstractToggleButton(const WString &text, WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WAbstractToggleButton()Wt::WAbstractToggleButton [virtual]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton.html new file mode 100644 index 0000000..dbd9c62 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton.html @@ -0,0 +1,349 @@ + + + + +Wt: Wt::WAbstractToggleButton Class Reference + + + + + + + + + +
+ +
+

Wt::WAbstractToggleButton Class Reference

+
+
+ +

An abstract base class for radio buttons and check boxes. +More...

+
+Inheritance diagram for Wt::WAbstractToggleButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~WAbstractToggleButton ()
 Destructor.
void setText (const WString &text)
 Sets the label text.
const WString text () const
 Returns the label text.
bool isChecked () const
 Returns the button state.
void setChecked (bool checked)
 Sets the button state.
virtual void setChecked ()
 Checks the button.
virtual void setUnChecked ()
 Unchecks the button.
EventSignalchecked ()
 Signal emitted when the button gets checked.
EventSignalunChecked ()
 Signal emitted when the button gets unChecked.

+Protected Member Functions

WAbstractToggleButton (WContainerWidget *parent=0)
 Creates an unchecked toggle button without label.
 WAbstractToggleButton (const WString &text, WContainerWidget *parent=0)
 Creates an unchecked toggle button with given text label.
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation.
+

Detailed Description

+

An abstract base class for radio buttons and check boxes.

+

A toggle button provides a button with a boolean state (checked or unchecked), and a text label.

+

To act on a change of the state, either connect a slot to the changed() signal, or connect a slot to the checked() or unChecked() signals.

+

The current state (checked or unchecked) may be inspected using the isChecked() method.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WAbstractToggleButton::WAbstractToggleButton (const WString text,
WContainerWidget parent = 0 
) [protected]
+
+
+ +

Creates an unchecked toggle button with given text label.

+

The text label is rendered to the right side of the button.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
EventSignal & Wt::WAbstractToggleButton::checked ( )
+
+
+ +

Signal emitted when the button gets checked.

+

This signal is emitted when the user checks the button.

+

You can use the changed() signal to react to any change of the button state.

+ +
+
+ +
+
+ + + + + + + + +
WStatelessSlot * Wt::WAbstractToggleButton::getStateless (Method  method ) [protected, virtual]
+
+
+ +

On-demand stateless slot implementation.

+

This method returns a stateless slot implementation for the given method. To avoid the cost of declaring methods to be stateless when they are not used, you may reimplement this method to provide a stateless implementation for a method only when the method is involved in a slot connection.

+

Use implementStateless() to provide a stateless implementation of the given method, or return the base class implementation otherwise.

+ +

Reimplemented from Wt::WFormWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WAbstractToggleButton::isChecked ( ) const
+
+
+ +

Returns the button state.

+
See also:
setChecked()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractToggleButton::setChecked (bool  checked )
+
+
+ +

Sets the button state.

+

This method does not emit one of the checked() or unChecked() signals.

+
See also:
setChecked(), setUnChecked()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractToggleButton::setChecked ( ) [virtual]
+
+
+ +

Checks the button.

+

Does not emit the checked() signal.

+
See also:
setChecked(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAbstractToggleButton::setText (const WString text )
+
+
+ +

Sets the label text.

+

The label is rendered to the right fo the button.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WAbstractToggleButton::setUnChecked ( ) [virtual]
+
+
+ +

Unchecks the button.

+

Does not emit the unChecked() signal.

+
See also:
setChecked(bool)
+ +
+
+ +
+
+ + + + + + + +
const WString Wt::WAbstractToggleButton::text ( ) const
+
+
+ +

Returns the label text.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WAbstractToggleButton::unChecked ( )
+
+
+ +

Signal emitted when the button gets unChecked.

+

This signal is emitted when the user unchecks the button.

+

You can use the changed() signal to react to any change of the button state.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.map new file mode 100644 index 0000000..3015d36 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.md5 new file mode 100644 index 0000000..3b66be1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.md5 @@ -0,0 +1 @@ +2452c45cb7614b033e98d1980d56d195 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.png new file mode 100644 index 0000000..c3098d5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAbstractToggleButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout-members.html new file mode 100644 index 0000000..263e36f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout-members.html @@ -0,0 +1,120 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAccordionLayout Member List

+
+
+This is the complete list of members for Wt::WAccordionLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WDefaultLayout [virtual]
addWidget(WWidget *widget)Wt::WLayout
children() const Wt::WObject
count() const Wt::WDefaultLayout [virtual]
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WDefaultLayout [virtual]
itemAt(int index) const Wt::WDefaultLayout [virtual]
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WDefaultLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WAccordionLayout(WWidget *parent=0)Wt::WAccordionLayout
WDefaultLayout(WWidget *parent=0)Wt::WDefaultLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WDefaultLayout()Wt::WDefaultLayout
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout.html new file mode 100644 index 0000000..f28497c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout.html @@ -0,0 +1,110 @@ + + + + +Wt: Wt::WAccordionLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WAccordionLayout Class Reference

+
+
+ +

A layout manager which shows one item at a time. +More...

+ +

#include <Wt/WAccordionLayout>

+
+Inheritance diagram for Wt::WAccordionLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

WAccordionLayout (WWidget *parent=0)
 Creates a new accordion layout.
+

Detailed Description

+

A layout manager which shows one item at a time.

+

The accordion layout manages several widgets, but shows only one (active) item at a time.

+
Note:
This layout manager is applicable only to Ext::Container container widgets.
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.map new file mode 100644 index 0000000..d52e793 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.md5 new file mode 100644 index 0000000..0456d30 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.md5 @@ -0,0 +1 @@ +aa75ad8b10f38fe5bb6871eea089d42c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.png new file mode 100644 index 0000000..d19b534 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAccordionLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel-members.html new file mode 100644 index 0000000..2d46923 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel-members.html @@ -0,0 +1,166 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAggregateProxyModel Member List

+
+
+This is the complete list of members for Wt::WAggregateProxyModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addAggregate(int parentColumn, int firstColumn, int lastColumn)Wt::WAggregateProxyModel
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAggregateProxyModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::WAggregateProxyModel [virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
createSourceIndex(int row, int column, void *ptr) const Wt::WAbstractProxyModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAggregateProxyModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAggregateProxyModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAggregateProxyModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAggregateProxyModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
ItemMap typedefWt::WAbstractProxyModel [protected]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
mapFromSource(const WModelIndex &sourceIndex) const Wt::WAggregateProxyModel [virtual]
mapToSource(const WModelIndex &proxyIndex) const Wt::WAggregateProxyModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WAggregateProxyModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const Wt::WAggregateProxyModel [virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAggregateProxyModel [virtual]
Wt::WAbstractProxyModel::setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
setSourceModel(WAbstractItemModel *sourceModel)Wt::WAggregateProxyModel [virtual]
shiftModelIndexes(const WModelIndex &sourceParent, int start, int count, ItemMap &items)Wt::WAbstractProxyModel [protected]
sort(int column, SortOrder order=AscendingOrder)Wt::WAggregateProxyModel [virtual]
sourceModel() const Wt::WAbstractProxyModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractProxyModel(WObject *parent=0)Wt::WAbstractProxyModel
WAggregateProxyModel(WObject *parent=0)Wt::WAggregateProxyModel
WObject(WObject *parent=0)Wt::WObject
~WAggregateProxyModel()Wt::WAggregateProxyModel [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel.html new file mode 100644 index 0000000..8a63ee8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel.html @@ -0,0 +1,644 @@ + + + + +Wt: Wt::WAggregateProxyModel Class Reference + + + + + + + + + +
+ +
+

Wt::WAggregateProxyModel Class Reference
+ +[Model/view system] +

+
+
+ +

A proxy model for Wt's item models that provides column aggregation. +More...

+ +

#include <Wt/WAggregateProxyModel>

+
+Inheritance diagram for Wt::WAggregateProxyModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WAggregateProxyModel (WObject *parent=0)
 Constructor.
+virtual ~WAggregateProxyModel ()
 Destructor.
void addAggregate (int parentColumn, int firstColumn, int lastColumn)
 Adds a new column aggregation definition.
virtual WModelIndex mapFromSource (const WModelIndex &sourceIndex) const
 Maps a source model index to the proxy model.
virtual WModelIndex mapToSource (const WModelIndex &proxyIndex) const
 Maps a proxy model index to the source model.
virtual void setSourceModel (WAbstractItemModel *sourceModel)
 Sets the source model.
virtual void expandColumn (int column)
 Expands a column.
virtual void collapseColumn (int column)
 Collapses a column.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
virtual WFlags< HeaderFlagheaderFlags (int section, Orientation orientation=Horizontal) const
 Returns the flags for a header.
virtual bool setHeaderData (int section, Orientation orientation, const boost::any &value, int role=EditRole)
 Sets header data for a column or row.
virtual boost::any headerData (int section, Orientation orientation=Horizontal, int role=DisplayRole) const
 Returns the row or column header data.
virtual WModelIndex parent (const WModelIndex &index) const
 Returns the parent for a model index.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
+

Detailed Description

+

A proxy model for Wt's item models that provides column aggregation.

+

This proxy model does not store data itself, but presents data from a source model, and presents methods to organize columns using aggregation, through which a user may navigate (usually to obtain more detailed results related to a single aggregate quantity).

+

To use this proxy model, you should provide a source model using setSourceModel(), and define column ranges that can be aggregated using addAggregate().

+

Example:

+
    int COLS = 18;
+    int ROWS = 20;
+
+    // set up the source model
+    model_ = new WStandardItemModel(0, COLS);
+
+    std::string columns[] = {
+      "Supplier",
+      "2004",
+        "Q1",
+          "January",
+          "February",
+          "March",
+        "Q2",
+          "April",
+          "May",
+          "June",
+        "Q3",
+          "July",
+          "August",
+          "September",
+        "Q4",
+          "October",
+          "November",
+          "December"
+    };
+
+    for (unsigned i = 0; i < COLS; ++i) {
+      model_->setHeaderData(i, Horizontal, columns[i]);
+    }
+
+    for (unsigned i = 0; i < ROWS; ++i) {
+      model_->insertRow(i);
+      for (unsigned j = 0; j < COLS; ++j)
+        model_->setData(i, j, "col " + boost::lexical_cast<std::string>(j));
+    }
+
+    // set up the proxy model
+    WAggregateProxyModel *proxy = new WAggregateProxyModel();
+    proxy->setSourceModel(model_);
+
+    proxy->addAggregate(1, 2, 17);
+    proxy->addAggregate(2, 3, 5);
+    proxy->addAggregate(6, 7, 9);
+    proxy->addAggregate(10, 11, 13);
+    proxy->addAggregate(14, 15, 17);
+
+    proxy->expandColumn(1); // expand 2004 -> Q1 Q2 Q3 Q4
+
+    // define a view
+    treeView_ = new WTreeView(root());
+    treeView_->setColumnBorder(Wt::black);
+    treeView_->setModel(proxy);
+    treeView_->setColumnWidth(0, 160);
+    treeView_->setColumnResizeEnabled(true);
+    treeView_->setSortingEnabled(true);
+

This example would render like this:

+
+WAggregateProxyModel-1.png +

A WTreeView using a WAggregateProxyModel

+
Note:
This model does not support dynamic changes to the column definition of the source model (i.e. insertions or deletions of source model columns).
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WAggregateProxyModel::WAggregateProxyModel (WObject parent = 0 )
+
+
+ +

Constructor.

+

Sets up the proxy without aggregation functionality.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WAggregateProxyModel::addAggregate (int  parentColumn,
int  firstColumn,
int  lastColumn 
)
+
+
+ +

Adds a new column aggregation definition.

+

The parentColumn is the column index in the source model that acts as an aggregate for columns firstColumn to lastColumn. parentColumn must border the range defined by firstColumn to lastColumn:

+
 parentColumn == firstColumn - 1 || parentColumn == lastColumn + 1 
+

Note that column parameters reference column indexes in the source model.

+

Aggregation definitions can be nested, but should be strictly hierarchical.

+

The aggregate column will initially be collapsed.

+

Only one aggregate can be defined per parentColumn.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAggregateProxyModel::collapseColumn (int  column ) [virtual]
+
+
+ +

Collapses a column.

+

Collapses a column. This may only be called by a view when the Wt::ColumnIsExpandedLeft or Wt::ColumnIsExpandedRight flag is set.

+

The default implementation does nothing.

+
See also:
WAggregateProxyModel
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WAggregateProxyModel::columnCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of columns.

+

This returns the number of columns at index parent.

+
See also:
rowCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAggregateProxyModel::expandColumn (int  column ) [virtual]
+
+
+ +

Expands a column.

+

Expands a column. This may only be called by a view when the Wt::ColumnIsCollapsed flag is set.

+

The default implementation does nothing.

+
See also:
WAggregateProxyModel
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::WAggregateProxyModel::headerData (int  section,
Orientation  orientation = Horizontal,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns the row or column header data.

+

When orientation is Horizontal, section is a column number, when orientation is Vertical, section is a row number.

+
See also:
data(), setHeaderData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WFlags< HeaderFlag > Wt::WAggregateProxyModel::headerFlags (int  section,
Orientation  orientation = Horizontal 
) const [virtual]
+
+
+ +

Returns the flags for a header.

+

The default implementation returns no flags set.

+
See also:
Wt::HeaderFlag
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WAggregateProxyModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAggregateProxyModel::mapFromSource (const WModelIndex sourceIndex ) const [virtual]
+
+
+ +

Maps a source model index to the proxy model.

+

This method returns a model index in the proxy model that corresponds to the model index sourceIndex in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of mapToSource().

+
See also:
mapToSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAggregateProxyModel::mapToSource (const WModelIndex proxyIndex ) const [virtual]
+
+
+ +

Maps a proxy model index to the source model.

+

This method returns a model index in the source model that corresponds to the proxy model index proxyIndex.

+
See also:
mapFromSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WAggregateProxyModel::parent (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WAggregateProxyModel::rowCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of rows.

+

This returns the number of rows at index parent.

+
See also:
columnCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WAggregateProxyModel::setHeaderData (int  section,
Orientation  orientation,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets header data for a column or row.

+

Returns true if the operation was successful.

+
See also:
headerData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAggregateProxyModel::setSourceModel (WAbstractItemModel sourceModel ) [virtual]
+
+
+ +

Sets the source model.

+

The source model provides the actual data for the proxy model.

+

Ownership of the source model is not transferred.

+ +

Reimplemented from Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WAggregateProxyModel::sort (int  column,
Wt::SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.map new file mode 100644 index 0000000..d50693c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.md5 new file mode 100644 index 0000000..53ce154 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.md5 @@ -0,0 +1 @@ +18c715f3035f9f9b6abc53599a182ee1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.png new file mode 100644 index 0000000..4046e8c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAggregateProxyModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor-members.html new file mode 100644 index 0000000..690c99e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor-members.html @@ -0,0 +1,250 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAnchor Member List

+
+
+This is the complete list of members for Wt::WAnchor, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WContainerWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WAnchor [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
image() const Wt::WAnchor
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WContainerWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
ref() const Wt::WAnchor
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
resource() const Wt::WAnchor
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setImage(WImage *image)Wt::WAnchor
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRef(const std::string &url)Wt::WAnchor
setRefInternalPath(const std::string &path)Wt::WAnchor
setResource(WResource *resource)Wt::WAnchor
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTarget(AnchorTarget target)Wt::WAnchor
setText(const WString &text)Wt::WAnchor
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWordWrap(bool wordWrap)Wt::WAnchor
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
target() const Wt::WAnchor
text() const Wt::WAnchor
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WAnchor(WContainerWidget *parent=0)Wt::WAnchor
WAnchor(const std::string &url, WContainerWidget *parent=0)Wt::WAnchor
WAnchor(WResource *resource, WContainerWidget *parent=0)Wt::WAnchor
WAnchor(const std::string &url, const WString &text, WContainerWidget *parent=0)Wt::WAnchor
WAnchor(WResource *resource, const WString &text, WContainerWidget *parent=0)Wt::WAnchor
WAnchor(const std::string &ref, WImage *image, WContainerWidget *parent=0)Wt::WAnchor
WAnchor(WResource *resource, WImage *image, WContainerWidget *parent=0)Wt::WAnchor
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
wordWrap() const Wt::WAnchor
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor.html new file mode 100644 index 0000000..d342042 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor.html @@ -0,0 +1,617 @@ + + + + +Wt: Wt::WAnchor Class Reference + + + + + + + + + +
+ +
+

Wt::WAnchor Class Reference

+
+
+ +

A widget that represents an HTML anchor (to link to other documents). +More...

+ +

#include <Wt/WAnchor>

+
+Inheritance diagram for Wt::WAnchor:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WAnchor (WContainerWidget *parent=0)
 Creates an anchor.
WAnchor (const std::string &url, WContainerWidget *parent=0)
 Creates an anchor referring to a URL.
 WAnchor (WResource *resource, WContainerWidget *parent=0)
 Creates an anchor referring a resource.
WAnchor (const std::string &url, const WString &text, WContainerWidget *parent=0)
 Creates an anchor referring to a URL, using a text message.
 WAnchor (WResource *resource, const WString &text, WContainerWidget *parent=0)
 Creates an anchor referring to a resource, using a text message.
 WAnchor (const std::string &ref, WImage *image, WContainerWidget *parent=0)
 Creates an anchor referring to a URL, using an image.
 WAnchor (WResource *resource, WImage *image, WContainerWidget *parent=0)
 Creates an anchor referring to a resource, using an image.
void setRef (const std::string &url)
 Sets the destination URL.
void setRefInternalPath (const std::string &path)
 Sets the destination URL as an internal path.
const std::string & ref () const
 Returns the destination URL.
void setResource (WResource *resource)
 Sets a destination resource.
WResourceresource () const
 Returns the destination resource.
void setText (const WString &text)
 Sets the label text.
const WStringtext () const
 Returns the label text.
void setWordWrap (bool wordWrap)
 Configures text word wrapping.
bool wordWrap () const
 Returns whether the widget may break lines.
void setImage (WImage *image)
 Sets an image.
WImageimage () const
 Returns the image.
void setTarget (AnchorTarget target)
 Sets the location where the referred content should be displayed.
AnchorTarget target () const
 Returns the location where the referred content should be displayed.

+Protected Member Functions

virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A widget that represents an HTML anchor (to link to other documents).

+

Use an anchor to link to another web page, document, internal application path or a resource. The anchor may contain a label text, an image, or any other widget (as it inherits from WContainerWidget). If you do not want the application to terminate when the user follows the anchor, you must use setTarget(TargetNewWindow). Even for non-HTML documents, this may be important since pending AJAX requests are cancelled if documents are not served within the browser window in certain browsers.

+

Usage example:

+
 WAnchor *a;
+
+ // Create an anchor that references a URL
+ a = new WAnchor("http://www.webtoolkit.eu/", "Wt web toolkit", this);
+
+ // Create an anchor that references an internal path
+ a = new WAnchor(this);
+ a->setRefInternalPath("/docs/" + myDocName());
+ //   and listen to the corresponding change in internal path
+ WApplication::instance()->internalPathChanged().connect(this, &DocsListWidget::onInternalPathChange);
+
+ // Create an anchor that references a resource
+ WResource *r = new PdfResource(this); // serializes to a PDF file.
+ a = new WAnchor(r, "PDF version", this);
+ a->setTarget(TargetNewWindow);
+

WAnchor is an inline widget.

+
Note:
If you set a text or image using one of the API methods like setText() or setImage() or a constructor, you should not attempt to remove all contents (using clear(), or provide a layout (using setLayout()), as this will result in undefined behaviour: the text or image are simply inserted as widgets into the container.
+

CSS

+

The widget corresponds to the HTML <a> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WAnchor::WAnchor (WResource resource,
WContainerWidget parent = 0 
)
+
+
+ +

Creates an anchor referring a resource.

+

The resource specifies application-dependent content that may be generated by your application on demand.

+

The anchor does not assume ownership of resource, so that you may share the same resources for several anchors.

+
See also:
WResource
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WAnchor::WAnchor (WResource resource,
const WString text,
WContainerWidget parent = 0 
)
+
+
+ +

Creates an anchor referring to a resource, using a text message.

+

The resource specifies application-dependent content that may be generated by your application on demand.

+

The anchor does not assume ownership of resource, so that you may share the same resources for several anchors.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WAnchor::WAnchor (const std::string &  ref,
WImage image,
WContainerWidget parent = 0 
)
+
+
+ +

Creates an anchor referring to a URL, using an image.

+

Ownership of the image is transferred to the anchor.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WAnchor::WAnchor (WResource resource,
WImage image,
WContainerWidget parent = 0 
)
+
+
+ +

Creates an anchor referring to a resource, using an image.

+

The resource specifies application-dependent content that may be generated by your application on demand.

+

The anchor does not assume ownership of resource, so that you may share the same resources for several anchors.

+

Ownership of the image is transferred to the anchor.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WAnchor::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
WImage* Wt::WAnchor::image ( ) const
+
+
+ +

Returns the image.

+

Returns 0 if no image is set.

+
See also:
setImage()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WAnchor::ref ( ) const
+
+
+ +

Returns the destination URL.

+

When the anchor refers to a resource, the current resource URL is returned. When the anchor refers to an internal path, the internal path is returned. Otherwise, the URL is returned that was set using setRef().

+
See also:
setRef(), WResource::url()
+ +
+
+ +
+
+ + + + + + + +
WResource* Wt::WAnchor::resource ( ) const
+
+
+ +

Returns the destination resource.

+

Returns 0 if no resource has been set.

+
See also:
setResource()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setImage (WImage image )
+
+
+ +

Sets an image.

+

If an image was previously set, it is deleted. The image is added using addWidget().

+

Ownership of the image is transferred to the anchor.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setRef (const std::string &  url )
+
+
+ +

Sets the destination URL.

+

This method should not be used when the anchor has been pointed to a dynamically generated resource using setResource().

+
See also:
setResource(), setRefInternalPath()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setRefInternalPath (const std::string &  path )
+
+
+ +

Sets the destination URL as an internal path.

+

Sets the anchor to point to the internal path path. When the anchor is activated, the internal path is set to path, and the WApplication::internalPathChanged() signal is emitted.

+

This is the easiest way to let the application participate in browser history, and generate URLs that are bookmarkable and search engine friendly.

+

Internally, this method sets the destination URL using:

+
 setRef(WApplication::instance()->bookmarkUrl(path)) 
+

The clicked() signal is connected to a slot that changes the internal path by calling

+
 WApplication::instance()->setInternalPath(ref(), true);
+
See also:
setRef(), setResource()
+
+WApplication::bookmarkUrl(), WApplication::setInternalPath()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setResource (WResource resource )
+
+
+ +

Sets a destination resource.

+

A resource specifies application-dependent content, which may be generated by your application on demand.

+

This sets the resource as the destination of the anchor, and is an alternative to setRef(). The resource may be cleared by passing resource = 0.

+

The anchor does not assume ownership of the resource.

+
See also:
setRef()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setTarget (AnchorTarget  target )
+
+
+ +

Sets the location where the referred content should be displayed.

+

By default, the referred content is displayed in the application (Wt::TargetSelf). When the destination is an HTML document, the application is replaced with the new document. When the reference is a document that cannot be displayed in the browser, it is offered for download or opened using an external program, depending on browser settings.

+

By setting target to Wt::TargetNewWindow, the destination is displayed in a new browser window or tab.

+
See also:
target()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setText (const WString text )
+
+
+ +

Sets the label text.

+

If no text was previously set, a new WText widget is added using addWidget().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WAnchor::setWordWrap (bool  wordWrap )
+
+
+ +

Configures text word wrapping.

+

When wordWrap is true, the text set with setText() may be broken up over multiple lines. When wordWrap is false, the text will displayed on a single line, unless the text contains <br /> tags or other block-level tags.

+

The default value is true.

+
See also:
wordWrap()
+ +
+
+ +
+
+ + + + + + + +
AnchorTarget Wt::WAnchor::target ( ) const
+
+
+ +

Returns the location where the referred content should be displayed.

+
See also:
setTarget()
+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WAnchor::text ( ) const
+
+
+ +

Returns the label text.

+

Returns an empty string if no label was set.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WAnchor::wordWrap ( ) const
+
+
+ +

Returns whether the widget may break lines.

+
See also:
setWordWrap(bool)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.map new file mode 100644 index 0000000..1ed709b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.md5 new file mode 100644 index 0000000..4f8f05f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.md5 @@ -0,0 +1 @@ +17786b0ecf7a82e5593d4bc238bfb956 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.png new file mode 100644 index 0000000..3f2b5ef Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WAnchor__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication-members.html new file mode 100644 index 0000000..79b2d8d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication-members.html @@ -0,0 +1,174 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WApplication Member List

+
+
+This is the complete list of members for Wt::WApplication, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addAutoJavaScript(const std::string &javascript)Wt::WApplication
addChild(WObject *child)Wt::WObject
addMetaHeader(const std::string &name, const WString &content, const std::string &lang="")Wt::WApplication
addMetaHeader(MetaHeaderType type, const std::string &name, const WString &content, const std::string &lang="")Wt::WApplication
ajaxMethod() const Wt::WApplication
AjaxMethod enum nameWt::WApplication
ApplicationCreator typedefWt::WApplication [related]
ApplicationCreator typedefWt::WApplication
appRoot()Wt::WApplication [static]
attachThread()Wt::WApplication
bindWidget(WWidget *widget, const std::string &domId)Wt::WApplication
bodyClass() const Wt::WApplication
bookmarkUrl() const Wt::WApplication
bookmarkUrl(const std::string &internalPath) const Wt::WApplication
children() const Wt::WObject
closeMessage() const Wt::WApplication
cssTheme() const Wt::WApplication
declareJavaScriptFunction(const std::string &name, const std::string &function)Wt::WApplication
doJavaScript(const std::string &javascript, bool afterLoaded=true)Wt::WApplication
DynamicScriptTag enum valueWt::WApplication
enableAjax()Wt::WApplication [protected, virtual]
enableUpdates(bool enabled=true)Wt::WApplication
environment() const Wt::WApplication
finalize()Wt::WApplication [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
getUpdateLock()Wt::WApplication
globalEnterPressed()Wt::WApplication
globalEscapePressed()Wt::WApplication
globalKeyPressed()Wt::WApplication
globalKeyWentDown()Wt::WApplication
globalKeyWentUp()Wt::WApplication
htmlClass() const Wt::WApplication
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
initialize()Wt::WApplication [virtual]
instance()Wt::WApplication [static]
internalPath() const Wt::WApplication
internalPathChanged()Wt::WApplication
internalPathMatches(const std::string &path) const Wt::WApplication
internalPathNextPart(const std::string &path) const Wt::WApplication
isExposed(WWidget *w) const Wt::WApplication [protected, virtual]
isQuited() const Wt::WApplication
javaScriptClass()Wt::WApplication
loadingIndicator() const Wt::WApplication
locale() const Wt::WApplication
localizedStrings()Wt::WApplication
log(const std::string &type) const Wt::WApplication
makeAbsoluteUrl(const std::string &url) const Wt::WApplication
maximumRequestSize() const Wt::WApplication
messageResourceBundle() const Wt::WApplication
Method typedefWt::WObject
notify(const WEvent &e)Wt::WApplication [protected, virtual]
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
processEvents()Wt::WApplication
quit()Wt::WApplication
readConfigurationProperty(const std::string &name, std::string &value)Wt::WApplication [static]
redirect(const std::string &url)Wt::WApplication
refresh()Wt::WApplication [virtual]
removeChild(WObject *child)Wt::WObject
requestTooLarge()Wt::WApplication
require(const std::string &url, const std::string &symbol=std::string())Wt::WApplication
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resourcesUrl()Wt::WApplication [static]
root() const Wt::WApplication
sender()Wt::WObject [protected, static]
sessionId() const Wt::WApplication
setAjaxMethod(AjaxMethod method)Wt::WApplication
setBodyClass(const std::string &styleClass)Wt::WApplication
setConfirmCloseMessage(const WString &message)Wt::WApplication
setCookie(const std::string &name, const std::string &value, int maxAge, const std::string &domain="", const std::string &path="")Wt::WApplication
setCssTheme(const std::string &theme)Wt::WApplication
setHtmlClass(const std::string &styleClass)Wt::WApplication
setInternalPath(const std::string &path, bool emitChange=false)Wt::WApplication
setLoadingIndicator(WLoadingIndicator *indicator)Wt::WApplication
setLocale(const std::string &locale)Wt::WApplication
setLocalizedStrings(WLocalizedStrings *stringResolver)Wt::WApplication
setObjectName(const std::string &name)Wt::WObject
setTitle(const WString &title)Wt::WApplication
setTwoPhaseRenderingThreshold(int size)Wt::WApplication
styleSheet()Wt::WApplication
title() const Wt::WApplication
triggerUpdate()Wt::WApplication
unload()Wt::WApplication [protected, virtual]
updatesEnabled() const Wt::WApplication
url() const Wt::WApplication
useStyleSheet(const std::string &url)Wt::WApplication
useStyleSheet(const std::string &url, const std::string &condition, const std::string &media="all")Wt::WApplication
WApplication(const WEnvironment &environment)Wt::WApplication
WObject(WObject *parent=0)Wt::WObject
XMLHttpRequest enum valueWt::WApplication
~WApplication()Wt::WApplication
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication.html new file mode 100644 index 0000000..aa0ba7f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication.html @@ -0,0 +1,2149 @@ + + + + +Wt: Wt::WApplication Class Reference + + + + + + + + + + +
+ +

Represents an application instance for a single session. +More...

+ +

#include <Wt/WApplication>

+
+Inheritance diagram for Wt::WApplication:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  UpdateLock
 A RAII lock for manipulating and updating the application and its widgets outside of the event loop. More...

+Public Types

enum  AjaxMethod { XMLHttpRequest, +DynamicScriptTag + }
 

Enumeration that indicates the method for dynamic (AJAX-alike) updates.

+ More...
typedef Wt::ApplicationCreator ApplicationCreator
 Typedef for a function that creates WApplication objects.

+Public Member Functions

 WApplication (const WEnvironment &environment)
 Creates a new application instance.
 ~WApplication ()
 Destructor.
const WEnvironmentenvironment () const
 Returns the environment information.
WContainerWidgetroot () const
 Returns the root container.
void setTitle (const WString &title)
 Sets the window title.
const WStringtitle () const
 Returns the window title.
+const WStringcloseMessage () const
 Returns the close message.
WLocalizedStringslocalizedStrings ()
 Returns the resource object that provides localized strings.
void setLocalizedStrings (WLocalizedStrings *stringResolver)
 Sets the resource object that provides localized strings.
WMessageResourceBundlemessageResourceBundle () const
 Returns the message resource bundle.
void setLocale (const std::string &locale)
 Changes the locale.
std::string locale () const
 Returns the current locale.
virtual void refresh ()
 Refreshes the application.
void bindWidget (WWidget *widget, const std::string &domId)
 Binds a top-level widget for a WidgetSet deployment.
std::string sessionId () const
 Returns the unique identifier for the current session.
void processEvents ()
 Processes UI events.
void setAjaxMethod (AjaxMethod method)
 Sets the Ajax communication method.
AjaxMethod ajaxMethod () const
 Returns the Ajax communication method.
virtual void initialize ()
 Initializes the application, post-construction.
virtual void finalize ()
 Finalizes the application, pre-destruction.
void setTwoPhaseRenderingThreshold (int size)
 Changes the threshold for two-phase rendering.
void setCookie (const std::string &name, const std::string &value, int maxAge, const std::string &domain="", const std::string &path="")
 Sets a new cookie.
void addMetaHeader (const std::string &name, const WString &content, const std::string &lang="")
 Adds an HTML meta header.
void addMetaHeader (MetaHeaderType type, const std::string &name, const WString &content, const std::string &lang="")
 Adds an HTML meta header.
WLogEntry log (const std::string &type) const
 Adds an entry to the application log.
void setLoadingIndicator (WLoadingIndicator *indicator)
 Sets the loading indicator.
WLoadingIndicatorloadingIndicator () const
 Returns the loading indicator.
void quit ()
 Quits the application.
bool isQuited () const
 Returns whether the application is quited.
::int64_t maximumRequestSize () const
 Returns the current maximum size of a request to the application.
Signal< int > & requestTooLarge ()
 Signal which indicates that too a large request was received.
void setConfirmCloseMessage (const WString &message)
 Sets the message for the user to confirm closing of the application window/tab.
Style sheets and CSS
WCssStyleSheetstyleSheet ()
 Returns a reference to the inline style sheet.
void useStyleSheet (const std::string &url)
 Adds an external style sheet.
void useStyleSheet (const std::string &url, const std::string &condition, const std::string &media="all")
 Adds an external style sheet, constrained with conditions.
void setCssTheme (const std::string &theme)
 Sets the theme.
std::string cssTheme () const
 Returns the theme.
void setBodyClass (const std::string &styleClass)
 Sets a style class to the entire page <body>.
std::string bodyClass () const
 Returns the style class set for the entire page <body>.
void setHtmlClass (const std::string &styleClass)
 Sets a style class to the entire page <html>.
std::string htmlClass () const
 Returns the style class set for the entire page <html>.
URLs and internal paths
std::string url () const
 Returns a URL for the current session.
std::string makeAbsoluteUrl (const std::string &url) const
 Makes an absolute URL.
std::string bookmarkUrl () const
 Returns a bookmarkable URL for the current internal path.
std::string bookmarkUrl (const std::string &internalPath) const
 Returns a bookmarkable URL for a given internal path.
void setInternalPath (const std::string &path, bool emitChange=false)
 Change the internal path.
std::string internalPath () const
 Returns the current internal path.
std::string internalPathNextPart (const std::string &path) const
 Returns a part of the current internal path.
bool internalPathMatches (const std::string &path) const
 Checks if the internal path matches a given path.
Signal< std::string > & internalPathChanged ()
 Signal which indicates that the user changes the internal path.
void redirect (const std::string &url)
 Redirects the application to another location.
Manipulation outside the main event loop
void enableUpdates (bool enabled=true)
 Enables server-initiated updates.
bool updatesEnabled () const
 Returns whether server-initiated updates are enabled.
void triggerUpdate ()
 Propagates server-initiated updates.
UpdateLock getUpdateLock ()
 Grabs and returns the lock for manipulating widgets outside the event loop (deprecated). cpp java.
void attachThread ()
 Attach an auxiliary thread to this application.
Invoking JavaScript or including scripts
void doJavaScript (const std::string &javascript, bool afterLoaded=true)
 Executes some JavaScript code.
void addAutoJavaScript (const std::string &javascript)
 Adds JavaScript statements that should be run continuously.
void declareJavaScriptFunction (const std::string &name, const std::string &function)
 Declares an application-wide JavaScript function.
bool require (const std::string &url, const std::string &symbol=std::string())
 Loads a JavaScript library.
std::string javaScriptClass ()
 Returns the name of the application JavaScript class.
Global keyboard and mouse events
EventSignal< WKeyEvent > & globalKeyWentDown ()
 Event signal emitted when a keyboard key is pushed down.
EventSignal< WKeyEvent > & globalKeyPressed ()
 Event signal emitted when a "character" was entered.
EventSignal< WKeyEvent > & globalKeyWentUp ()
 Event signal emitted when a keyboard key is released.
EventSignalglobalEnterPressed ()
 Event signal emitted when enter was pressed.
EventSignalglobalEscapePressed ()
 Event signal emitted when escape was pressed.

+Static Public Member Functions

static WApplicationinstance ()
 Returns the current application instance.
static std::string resourcesUrl ()
 Returns the URL at which the resources are deployed.
static std::string appRoot ()
 Returns the approot special property.
static bool readConfigurationProperty (const std::string &name, std::string &value)
 Reads a configuration property.

+Protected Member Functions

virtual void notify (const WEvent &e)
 Notifies an event to the application.
virtual bool isExposed (WWidget *w) const
 Returns whether a widget is exposed in the interface.
virtual void enableAjax ()
 Progresses to an Ajax-enabled user interface.
virtual void unload ()
 Handles a browser unload event.

+Related Functions

(Note that these are not member functions.)

+
typedef WApplication *(* ApplicationCreator )(const WEnvironment &env)
 Typedef for a function that creates WApplication objects.
+

Detailed Description

+

Represents an application instance for a single session.

+

Each user session of your application has a corresponding WApplication instance. You need to create a new instance and return it as the result of the callback function passed to WRun(). The instance is the main entry point to session information, and holds a reference to the root() of the widget tree.

+

The recipe for a Wt web application, which allocates new WApplication instances for every user visiting the application is thus:

+
 WApplication *createApplication(const WEnvironment WEnvironment& env)
+ {
+   //
+   // Optionally, check the environment and redirect to an error page.
+   //
+   bool valid = ...;
+
+   WApplication *app;
+   if (!valid) {
+     app = new WApplication(env);
+     app->redirect("error.html");
+     app->quit();
+   } else {
+     // usually you will specialize your application class
+     app = new WApplication(env);
+
+     //
+     // Add widgets to app->root() and return the application object.
+     //
+   }
+
+   return app;
+ }
+

Throughout the session, the instance is available through WApplication::instance() (or through wApp). The application may be quited either using the method quit(), or because of a timeout after the user has closed the window, but not because the user does not interact: keep-alive messages in the background will keep the session around as long as the user has the page opened. In either case, the application object is deleted, allowing for cleanup of the entire widget tree, and any other resources.

+

The WApplication object provides access to session-wide settings, including:

+
    +
  • circumstancial information through environment(), which gives details about the user, start-up arguments, and user agent capabilities.
  • +
  • the application title with setTitle().
  • +
  • inline and external style sheets using styleSheet() and useStyleSheet().
  • +
  • inline and external JavaScript using doJavaScript() and require().
  • +
  • the top-level widget in root(), representing the entire browser window, or multiple top-level widgets using bindWidget() when deployed in WidgetSet mode to manage a number of widgets within a 3rd party page.
  • +
  • definition of cookies using setCookie() to persist information across sessions, which may be read using WEnvironment::getCookie() in a future session.
  • +
  • management of the internal path (that enables browser history and bookmarks) using setInternalPath() and related methods.
  • +
  • support for server-initiated updates with enableUpdates()
  • +
  • localization information and message resources bundles using setLocale() and messageResourceBundle().
  • +
+

Member Typedef Documentation

+ +
+
+ + + + +
typedef Wt::ApplicationCreator Wt::WApplication::ApplicationCreator
+
+
+ +

Typedef for a function that creates WApplication objects.

+
See also:
WRun()
+ +
+
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that indicates the method for dynamic (AJAX-alike) updates.

+
See also:
setAjaxMethod()
+
Enumerator:
+ + +
XMLHttpRequest  +

Using the XMLHttpRequest object (real AJAX)

+
DynamicScriptTag  +

Using dynamic script tags (for cross-domain AJAX)

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WApplication::WApplication (const WEnvironment environment )
+
+
+ +

Creates a new application instance.

+

The environment provides information on the initial request, user agent, and deployment-related information.

+ +
+
+ +
+
+ + + + + + + +
Wt::WApplication::~WApplication ( )
+
+
+ +

Destructor.

+

The destructor deletes the root() container, and as a consequence the entire widget tree.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WApplication::addAutoJavaScript (const std::string &  javascript )
+
+
+ +

Adds JavaScript statements that should be run continuously.

+

This is an internal method.

+

It is used by for example layout managers to adjust the layout whenever the DOM tree is manipulated.

+
See also:
doJavaScript()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WApplication::addMetaHeader (const std::string &  name,
const WString content,
const std::string &  lang = "" 
)
+
+
+ +

Adds an HTML meta header.

+

A meta header can only be added in the following situations:

+
    +
  • when a plain HTML session is used (including when the user agent is a bot), you can add meta headers at any time.
  • +
+
    +
  • or, when progressive bootstrap is used, you can set meta headers for any type of session, from within the application constructor (which corresponds to the initial request).
  • +
+
    +
  • but never for a Wt::WidgetSet mode application since then the application is hosted within a foreign HTML page.
  • +
+

These situations coincide with WEnvironment::ajax() returning false (see environment()).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WApplication::addMetaHeader (MetaHeaderType  type,
const std::string &  name,
const WString content,
const std::string &  lang = "" 
)
+
+
+ +

Adds an HTML meta header.

+

This overloaded method allows to define both "name" meta headers, relating to document properties as well as "http-equiv" meta headers, which define HTTP headers.

+
See also:
addMetaHeader()
+ +
+
+ +
+
+ + + + + + + +
AjaxMethod Wt::WApplication::ajaxMethod ( ) const
+
+
+ +

Returns the Ajax communication method.

+
See also:
setAjaxMethod()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::appRoot ( ) [static]
+
+
+ +

Returns the approot special property.

+

This returns the "approot" property, with a trailing slash added to the end if it was not yet present.

+

The property "approot" was introduced as a generalization of the working directory for the location of files that do not need to be served over http to the client, but are required by the program to run properly. Typically, these are message resource bundles (xml), CSV files, database files (e.g. SQLite files for Wt::Dbo), ...

+

Some connectors do not allow you to control what the current working directory (CWD) is set to (fcgi, isapi). Instead of referring to files assuming a sensible CWD, it is therefore better to refer to them relative to the application root.

+

The approot property is special in the sense that it can be set implicitly by the connector (see the connector documentation for more info). If it was not set by the connector, it can be set as a normal property in the configuration file (the default wt_config.xml describes how to set properties). If the property is not set at all, it is assumed that the approot is CWD and this function will return an empty string.

+

Usage example:

+
 messageResourceBundle().use(appRoot() + "text");
+ messageResourceBundle().use(appRoot() + "charts");
+
+ Wt::Dbo::backend::Sqlite3 sqlite3_(approot() + "planner.db");
+
See also:
WServer::appRoot()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::attachThread ( )
+
+
+ +

Attach an auxiliary thread to this application.

+

In a multi-threaded environment, WApplication::instance() uses thread-local data to retrieve the application object that corresponds to the session currently being handled by the thread. This is set automatically by the library whenever an event is delivered to the application, or when you use the UpdateLock to modify the application from an auxiliary thread outside the normal event loop.

+

When you want to manipulate the widget tree inside the main event loop, but from within an auxiliary thread, then you cannot use the UpdateLock since this will create an immediate dead lock. Instead, you may attach the auxiliary thread to the application, by calling this method from the auxiliary thread, and in this way you can modify the application from within that thread without needing the update lock.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WApplication::bindWidget (WWidget widget,
const std::string &  domId 
)
+
+
+ +

Binds a top-level widget for a WidgetSet deployment.

+

This method binds a widget to an existing element with DOM id domId on the page. The element type should correspond with the widget type (e.g. it should be a <div> for a WContainerWidget, or a <table> for a WTable).

+
See also:
root()
+
+Wt::WidgetSet
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::bodyClass ( ) const
+
+
+ +

Returns the style class set for the entire page <body>.

+
See also:
setBodyClass()
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WApplication::bookmarkUrl (const std::string &  internalPath ) const
+
+
+ +

Returns a bookmarkable URL for a given internal path.

+

Returns the (relative) URL for this application that includes the internal path internalPath, usable across sessions. The URL is relative and expanded into a full URL by the browser.

+

For example, for an application with current URL:

+
 http://www.mydomain.com/stuff/app.wt#/project/internal/
+

when called with "/project/external", this method would return:

+
    +
  • "app.wt/project/external/" when JavaScript is available, or the agent is a web spider, or
  • +
  • "app.wt/project/external/?wtd=AbCdEf" when no JavaScript is available and URL rewriting is used for session-tracking (see also 10.1 Session management (wt_config.xml) for configuring the session-tracking method).
  • +
+

When the application is deployed at a folder (ending with '/'), this style of URLs is not possible, and URLs are of the form:

+
    +
  • "?_=/project/external/" when JavaScript is available, or the agent is a web spider, or
  • +
  • "?_=/project/external/&wtd=AbCdEf" when no JavaScript is available and URL rewriting is used for session-tracking.
  • +
+

You can use bookmarkUrl() as the destination for a WAnchor, and listen to a click event is attached to a slot that switches to the internal path internalPath (see WAnchor::setRefInternalPath()). In this way, an anchor can be used to switch between internal paths within an application regardless of the situation (browser with or without Ajax support, or a web spider bot), but still generates suitable URLs across sessions, which can be used for bookmarking, opening in a new window/tab, or indexing.

+

To obtain a URL that refers to the current session of the application, use url() instead.

+
See also:
url(), bookmarkUrl()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::bookmarkUrl ( ) const
+
+
+ +

Returns a bookmarkable URL for the current internal path.

+

Is equivalent to bookmarkUrl(internalPath()), see bookmarkUrl(const std::string&) const.

+

To obtain a URL that is refers to the current session of the application, use url() instead.

+
See also:
url(), bookmarkUrl(const std::string&) const
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::cssTheme ( ) const
+
+
+ +

Returns the theme.

+
See also:
setCssTheme()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WApplication::declareJavaScriptFunction (const std::string &  name,
const std::string &  function 
)
+
+
+ +

Declares an application-wide JavaScript function.

+

This is an internal method.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WApplication::doJavaScript (const std::string &  javascript,
bool  afterLoaded = true 
)
+
+
+ +

Executes some JavaScript code.

+

This method may be used to call some custom javaScript code as part of an event response.

+

This function does not wait until the JavaScript is run, but returns immediately. The JavaScript will be run after the normal event handling, unless afterLoaded is set to false.

+
See also:
addAutoJavaScript(), declareJavaScriptFunction()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled user interface.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will propagate the WWidget::enableAjax() method through the widget hierarchy.

+

You may want to reimplement this method if you want to make changes to the user-interface when AJAX is enabled. You should always call the base implementation.

+
See also:
WWidget::enableAjax()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::enableUpdates (bool  enabled = true )
+
+
+ +

Enables server-initiated updates.

+

By default, updates to the user interface are possible only at startup, during any event (in a slot), or at regular time points using WTimer. This is the normal Wt event loop.

+

In some cases, one may want to modify the user interface from a second thread, outside the event loop. While this may be worked around by the WTimer, in some cases, there are bandwidth and processing overheads associated which may be unnecessary, and which create a trade-off with time resolution of the updates.

+

When enabled is true, this enables "server push" (what is called 'comet' in AJAX terminology). Widgets may then be modified, created or deleted outside of the event loop (e.g. in response to execution of another thread), and these changes are propagated by calling triggerUpdate().

+

Note that you need to grab the application's update lock to avoid concurrency problems, whenever you modify the application's state from another thread.

+

At any time, the application may be deleted (e.g. because of a time out or because the user closes the application window). You should thus make sure you do no longer reference an application after it has been deleted. When Wt decides to delete an application, it first runs WApplication::finalize() and then invokes the destructor. While doing this, any other thread trying to grab the update lock will succeed but WApplication::instance() will return 0 -- i.e. the application is not actually locked. You should therefore always check WApplication::instance() after you locked the application.

+

An example of how to modify the widget tree outside the event loop and propagate changes is:

+
 // You need to have a reference to the application whose state
+ // you are about to manipulate.
+ // You should prevent the application from being deleted somehow,
+ // before you could grab the application lock.
+ Wt::WApplication *app = ...;
+
+ {
+   // Grab the application lock. It is a scoped lock.
+   Wt::WApplication::UpdateLock lock(app);
+
+   if (lock) {
+     // We now have exclusive access to the application: we can safely modify the widget tree for example.
+     app->root()->addWidget(new Wt::WText("Something happened!"));
+
+     // Push the changes to the browser
+     app->triggerUpdate();
+   }
+ }
+
Note:
This works only if JavaScript is available on the client.
+
See also:
triggerUpdate()
+ +
+
+ +
+
+ + + + + + + +
const WEnvironment & Wt::WApplication::environment ( ) const
+
+
+ +

Returns the environment information.

+

This method returns the environment object that was used when constructing the application. The environment provides information on the initial request, user agent, and deployment-related information.

+
See also:
url(), sessionId()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::finalize ( ) [virtual]
+
+
+ +

Finalizes the application, pre-destruction.

+

This method is invoked by the Wt library before destruction of a new application. You may reimplement this method to do additional finalization that is not possible from the destructor (e.g. which uses virtual methods).

+ +
+
+ +
+
+ + + + + + + +
WApplication::UpdateLock Wt::WApplication::getUpdateLock ( )
+
+
+ +

Grabs and returns the lock for manipulating widgets outside the event loop (deprecated). cpp java.

+

You need to keep this lock in scope while manipulating widgets outside of the event loop. In normal cases, inside the Wt event loop, you do not need to care about it.

+
See also:
enableUpdates(), triggerUpdate()
+
Deprecated:
Use the RAII-style UpdateLock(WApplication *) constructor instead. cpp
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WApplication::globalEnterPressed ( )
+
+
+ +

Event signal emitted when enter was pressed.

+

The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.

+
See also:
See WInteractWidget::enterPressed()
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WApplication::globalEscapePressed ( )
+
+
+ +

Event signal emitted when escape was pressed.

+

The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.

+
See also:
See WInteractWidget::escapePressed()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WApplication::globalKeyPressed ( )
+
+
+ +

Event signal emitted when a "character" was entered.

+

The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.

+
See also:
See WInteractWidget::keyPressed()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WApplication::globalKeyWentDown ( )
+
+
+ +

Event signal emitted when a keyboard key is pushed down.

+

The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.

+
See also:
See WInteractWidget::keyWentDown()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WApplication::globalKeyWentUp ( )
+
+
+ +

Event signal emitted when a keyboard key is released.

+

The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.

+
See also:
See WInteractWidget::keyWentUp()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::htmlClass ( ) const
+
+
+ +

Returns the style class set for the entire page <html>.

+
See also:
setHtmlClass()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::initialize ( ) [virtual]
+
+
+ +

Initializes the application, post-construction.

+

This method is invoked by the Wt library after construction of a new application. You may reimplement this method to do additional initialization that is not possible from the constructor (e.g. which uses virtual methods).

+ +
+
+ +
+
+ + + + + + + +
WApplication * Wt::WApplication::instance ( ) [static]
+
+
+ +

Returns the current application instance.

+

This is the same as the global define wApp. In a multi-threaded server, this method uses thread-specific storage to fetch the current session.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::internalPath ( ) const
+
+
+ +

Returns the current internal path.

+

When the application is just created, this is equal to WEnvironment::internalPath().

+
See also:
setInternalPath(), internalPathNextPart(), internalPathMatches()
+ +
+
+ +
+
+ + + + + + + +
Signal<std::string>& Wt::WApplication::internalPathChanged ( )
+
+
+ +

Signal which indicates that the user changes the internal path.

+

This signal indicates a change to the internal path, which is usually triggered by the user using the browser back/forward buttons.

+

The argument contains the new internal path.

+
See also:
setInternalPath()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WApplication::internalPathMatches (const std::string &  path ) const
+
+
+ +

Checks if the internal path matches a given path.

+

Returns whether the current internalPath() starts with path (or is equal to path). You will typically use this method within a slot conneted to the internalPathChanged() signal, to check that an internal path change affects the widget. It may also be useful before changing path using setInternalPath() if you do not intend to remove sub paths when the current internal path already matches path.

+

The path must start with a '/'.

+
See also:
setInternalPath(), internalPath()
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WApplication::internalPathNextPart (const std::string &  path ) const
+
+
+ +

Returns a part of the current internal path.

+

This is a convenience method which returns the next folder in the internal path, after the given path.

+

For example, when the current internal path is "/project/z3cbc/details", this method returns "details" when called with "/project/z3cbc/" as path argument.

+

The path must start with a '/', and internalPathMatches() should evaluate to true for the given path. If not, an empty string is returned and an error message is logged.

+
See also:
internalPath(), internalPathChanged()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WApplication::isExposed (WWidget w ) const [protected, virtual]
+
+
+ +

Returns whether a widget is exposed in the interface.

+

The default implementation simply returns true, unless a modal dialog is active, in which case it returns true only for widgets that are inside the dialog.

+

You may want to reimplement this method if you wish to disallow events from certain widgets even when they are inserted in the widget hierachy.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WApplication::isQuited ( ) const
+
+
+ +

Returns whether the application is quited.

+
See also:
quit()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::javaScriptClass ( )
+
+
+ +

Returns the name of the application JavaScript class.

+

This JavaScript class encapsulates all JavaScript methods specific to this application instance. The method is foreseen to allow multiple applications to run simultaneously on the same page in Wt::WidgtSet mode, without interfering.

+ +
+
+ +
+
+ + + + + + + +
WLoadingIndicator* Wt::WApplication::loadingIndicator ( ) const
+
+
+ +

Returns the loading indicator.

+
See also:
setLoadingIndicator()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::locale ( ) const
+
+
+ +

Returns the current locale.

+
See also:
setLocale(const std::string&)
+ +
+
+ +
+
+ + + + + + + +
WLocalizedStrings * Wt::WApplication::localizedStrings ( )
+
+
+ +

Returns the resource object that provides localized strings.

+

The default value is a WMessageResourceBundle instance, which uses XML files to resolve localized strings, but you can set a custom class using setLocalizedStrings().

+

WString::tr() is used to create localized strings, whose localized translation is looked up through this object, using a key.

+
See also:
WString::tr(), messageResourceBundle()
+ +
+
+ +
+
+ + + + + + + + +
WLogEntry Wt::WApplication::log (const std::string &  type ) const
+
+
+ +

Adds an entry to the application log.

+

Starts a new log entry of the given type in the Wt application log file. This method returns a stream-like object to which the message may be streamed.

+

A typical usage would be:

+
  wApp->log("notice") << "User " << userName << " logged in successfully.";
+

This would create a log entry that looks like:

+
+[2008-Jul-13 14:01:17.817348] 16879 [/app.wt Z2gCmSxIGjLHD73L] [notice] "User bart logged in successfully." 
See also:
10.2 General application settings (wt_config.xml)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WApplication::makeAbsoluteUrl (const std::string &  url ) const
+
+
+ +

Makes an absolute URL.

+

Returns an absolute URL for a given (relative url) by including the schema, hostname, and deployment path.

+

If url is "", then the absolute base URL is returned. This is the absolute URL at which the application is deployed, up to the last '/'.

+ +
+
+ +
+
+ + + + + + + +
int64_t Wt::WApplication::maximumRequestSize ( ) const
+
+
+ +

Returns the current maximum size of a request to the application.

+

The maximum request size is configured in the configuration file, see 10.2 General application settings (wt_config.xml).

+
See also:
requestTooLarge()
+ +
+
+ +
+
+ + + + + + + +
WMessageResourceBundle & Wt::WApplication::messageResourceBundle ( ) const
+
+
+ +

Returns the message resource bundle.

+

The message resource bundle defines the list of external XML files that are used to lookup localized strings.

+

The default localizedStrings() is a WMessageResourceBundle object, and this method returns localizedStrings() upcasted to this type.

+
See also:
WString::tr(const char *key)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::notify (const WEvent &  e ) [protected, virtual]
+
+
+ +

Notifies an event to the application.

+

This method is called by the event loop for propagating an event to the application. It provides a single point of entry for events to the application, besides the application constructor.

+

You may want to reimplement this method for two reasons:

+
    +
  • for having a single point for exception handling: while you may want to catch recoverable exceptions in a more appropriate place, general (usually fatal) exceptions may be caught here. You will in probably also want to catch the same exceptions in the application constructor in the same way.
  • +
  • you want to manage resource usage during requests. For example, at the end of request handling, you want to return a database session back to the pool. Since notify() is also used for rendering right after the application is created, this will also clean up resources after application construction.
  • +
+

In either case, you will need to call the base class implementation of notify(), as otherwise no events will be delivered to your application.

+

The following shows a generic template for reimplementhing this method for both managing request resources and generic exception handling.

+
 MyApplication::notify(const WEvent& event)
+ {
+    // Grab resources for during request handling
+    try {
+      WApplication::notify(event);
+    } catch (MyException& exception) {
+      // handle this exception in a central place
+    }
+    // Free resources used during request handling
+ }
+

Note that any uncaught exception throw during event handling terminates the session.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::processEvents ( )
+
+
+ +

Processes UI events.

+

You may call this method during a long operation to:

+
    +
  • propagate widget changes to the client.
  • +
  • process UI events.
  • +
+

This method starts a recursive event loop, blocking the current thread, and resumes when all pending user interface events have been processed.

+

Because a thread is blocked, this may affect your application scalability.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::quit ( )
+
+
+ +

Quits the application.

+

The method returns immediately, but has as effect that the application will be terminated after the current event is completed.

+

The current widget tree (including any modifications still pending and applied during the current event handling) will still be rendered, after which the application is terminated.

+

You might want to make sure no more events can be received from the user, by not having anything clickable, for example by displaying only text. Even better is to redirect() the user to another, static, page in conjunction with quit().

+
See also:
redirect()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WApplication::readConfigurationProperty (const std::string &  name,
std::string &  value 
) [static]
+
+
+ +

Reads a configuration property.

+

Tries to read a configured value for the property name. The method returns whether a value is defined for the property, and sets it to value.

+
See also:
WServer::readConfigurationProperty()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::redirect (const std::string &  url )
+
+
+ +

Redirects the application to another location.

+

The client will be redirected to a new location identified by url. Use this in conjunction with quit() if you want to the application to be terminated as well.

+

Calling redirect() does not imply quit() since it may be useful to switch between a non-secure and secure (SSL) transport connection.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::refresh ( ) [virtual]
+
+
+ +

Refreshes the application.

+

This lets the application to refresh its data, including strings from message-resource bundles. This done by propagating WWidget::refresh() through the widget hierarchy.

+

This method is also called when the user hits the refresh (or reload) button, if this can be caught within the current session.

+

The reload button may only be caught when Wt is configured so that reload should not spawn a new session. When URL rewriting is used for session tracking, this will cause an ugly session ID to be added to the URL. See 10.1 Session management (wt_config.xml) for configuring the reload behavior ("<reload-is-new-session>").

+
See also:
WWidget::refresh()
+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::WApplication::requestTooLarge ( )
+
+
+ +

Signal which indicates that too a large request was received.

+

The integer parameter is the request size that was received in bytes.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WApplication::require (const std::string &  url,
const std::string &  symbol = std::string() 
)
+
+
+ +

Loads a JavaScript library.

+

Loads a JavaScript library located at the URL url. Wt keeps track of libraries (with the same URL) that already have been loaded, and will load a library only once. In addition, you may provide a symbol which if already defined will also indicate that the library was already loaded (possibly outside of Wt when in WidgetSet mode).

+

This method returns true only when the library is loaded for the first time.

+

JavaScript libraries may be loaded at any point in time. Any JavaScript code is deferred until the library is loaded, except for JavaScript that was defined to load before, passing false as second parameter to doJavaScript().

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::resourcesUrl ( ) [static]
+
+
+ +

Returns the URL at which the resources are deployed.

+

This returns the value of the 'resources' property set in the configuration file.

+ +
+
+ +
+
+ + + + + + + +
WContainerWidget* Wt::WApplication::root ( ) const
+
+
+ +

Returns the root container.

+

This is the top-level widget container of the application, and corresponds to entire browser window. The user interface of your application is represented by the content of this container.

+

The root() widget is only defined when the application manages the entire window. When deployed as a WidgetSet application, there is no root() container, and 0 is returned. Instead, use bindWidget() to bind one or more root widgets to existing HTML <div> (or other) elements on the page.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::sessionId ( ) const
+
+
+ +

Returns the unique identifier for the current session.

+

The session id is a string that uniquely identifies the current session. Note that the actual contents has no particular meaning and client applications should in no way try to interpret its value.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setAjaxMethod (AjaxMethod  method )
+
+
+ +

Sets the Ajax communication method.

+

You may change the communication method only from within the application constructor.

+

The default method depends on your application deployment type.

+

For plain applications, XMLHttpRequest is used, while for widget set applications, DynamicScriptTag is used. The latter is less efficient, but has the benefit to allow serving the application from a different server than the page that hosts the embedded widgets.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setBodyClass (const std::string &  styleClass )
+
+
+ +

Sets a style class to the entire page <body>.

+
See also:
setHtmlClass()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setConfirmCloseMessage (const WString message )
+
+
+ +

Sets the message for the user to confirm closing of the application window/tab.

+

If the message is empty, then the user may navigate away from the page without confirmation.

+

Otherwise the user will be prompted with a browser-specific dialog asking him to confirm leaving the page. This message is added to the page.

+
See also:
unload()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WApplication::setCookie (const std::string &  name,
const std::string &  value,
int  maxAge,
const std::string &  domain = "",
const std::string &  path = "" 
)
+
+
+ +

Sets a new cookie.

+

Use cookies to transfer information across different sessions (e.g. a user name). In a subsequent session you will be able to read this cookie using WEnvironment::getCookie(). You cannot use a cookie to store information in the current session.

+

The name must be a valid cookie name (of type 'token': no special characters or separators, see RFC2616 page 16). The value may be anything. Specify the maximum age (in seconds) after which the client must discard the cookie. To delete a cookie, use a value of '0'.

+

By default the cookie only applies to the current path on the current domain. To set a proper value for domain, see also RFC2109.

+
Note:
Wt provides session tracking automatically, and may be configured to use a cookie for this. You only need to use cookies yourself if you want to remember information across sessions.
+
See also:
WEnvironment::supportsCookies(), WEnvironment::getCookie()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setCssTheme (const std::string &  theme )
+
+
+ +

Sets the theme.

+

The theme provides the look and feel of several built-in widgets, using CSS style rules. Rules for each theme are defined in the resources/themes/theme/ folder.

+

The default theme is "default". When setting "", the external style sheets related to the theme are not loaded.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setHtmlClass (const std::string &  styleClass )
+
+
+ +

Sets a style class to the entire page <html>.

+
See also:
setBodyClass()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WApplication::setInternalPath (const std::string &  path,
bool  emitChange = false 
)
+
+
+ +

Change the internal path.

+

A Wt application may manage multiple virtual paths. The virtual path is appended to the application URL. Depending on the situation, the path is directly appended to the application URL or it is appended using a name anchor (#).

+

For example, for an application deployed at:

+
 http://www.mydomain.com/stuff/app.wt
+

for which an internalPath "/project/z3cbc/details/" is set, the two forms for the application URL are:

+
    +
  • +in an AJAX session:
     http://www.mydomain.com/stuff/app.wt#/project/z3cbc/details/
    +
  • +
  • +in a plain HTML session:
     http://www.mydomain.com/stuff/app.wt/project/z3cbc/details/
    +
    This has as major consequence that from the browser stand point, the application now serves many different URLs. As a consequence, relative URLs will break. Still, you can specify relative URLs within your application (in for example WAnchor::setRef() or WImage::setImageRef()) since Wt will transform them to absolute URLs when needed. But, this in turn may break deployments behind reverse proxies when the context paths differ. For the same reason, you will need to use absolute URLs in any XHTML or CSS you write manually.
    + This type of URLs are only used when the your application is deployed at a location that does not end with a '/'. Otherwise, Wt will generate URLS like:
     http://www.mydomain.com/stuff/?_=/project/z3cbc/details/
    +
  • +
+

When the internal path is changed, an entry is added to the browser history. When the user navigates back and forward through this history (using the browser back/forward buttons), an internalPathChanged() event is emitted. You should listen to this signal to switch the application to the corresponding state. When emitChange is true, this signal is also emitted by setting the path.

+

A url that includes the internal path may be obtained using bookmarkUrl().

+

The internalPath must start with a '/'. In this way, you can still use normal anchors in your HTML. Internal path changes initiated in the browser to paths that do not start with a '/' are ignored.

+
See also:
bookmarkUrl(), internalPath(), internalPathChanged()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setLoadingIndicator (WLoadingIndicator indicator )
+
+
+ +

Sets the loading indicator.

+

The loading indicator is shown to indicate that a response from the server is pending or JavaScript is being evaluated.

+

The default loading indicator is a WDefaultLoadingIndicator.

+

When setting a new loading indicator, the previous one is deleted.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setLocale (const std::string &  locale )
+
+
+ +

Changes the locale.

+

The locale is used by the localized strings resource to resolve localized strings.

+

By passing an empty locale, the default locale is chosen.

+

When the locale is changed, refresh() is called, which will resolve the strings of the current user-interface in the new locale.

+

At construction, the locale is copied from the environment (WEnvironment::locale()), and this is the locale that was configured by the user in his browser preferences, and passed using an HTTP request header.

+
See also:
localizedStrings(), WString::tr()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setLocalizedStrings (WLocalizedStrings stringResolver )
+
+
+ +

Sets the resource object that provides localized strings.

+

The translator resolves localized strings within the current application locale.

+

The previous resource is deleted, and ownership of the new resource passes to the application.

+
See also:
localizedStrings(), WString::tr(const char *key)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setTitle (const WString title )
+
+
+ +

Sets the window title.

+

Sets the browser window title to title.

+

The default title is "".

+
See also:
title()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::setTwoPhaseRenderingThreshold (int  size )
+
+
+ +

Changes the threshold for two-phase rendering.

+

This changes the threshold for the size of a JavaScript response (in bytes) to render invisible changes in one go. If the bandwidth for rendering the invisible changes exceed the threshold, they will be fetched in a second communication, after the visible changes have been rendered.

+

The value is a trade-off: setting it smaller will always use two-phase rendering, increasing the total render time but reducing the latency for the visible changes. Setting it too large will increase the latency to render the visible changes, since first also all invisible changes need to be computed and received in the browser.

+

The initial value is read from the configuration file, see 10.2 General application settings (wt_config.xml).

+ +
+
+ +
+
+ + + + + + + +
WCssStyleSheet& Wt::WApplication::styleSheet ( )
+
+
+ +

Returns a reference to the inline style sheet.

+

Widgets may allow configuration of their look and feel through style classes. These may be defined in this inline stylesheet, or in external style sheets.

+

It is usually preferable to use external stylesheets (and consider more accessible). Still, the internal stylesheet has as benefit that style rules may be dynamically updated, and it is easier to manage logistically.

+
See also:
useStyleSheet()
+
+WWidget::setStyleClass()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WApplication::title ( ) const
+
+
+ +

Returns the window title.

+
See also:
setTitle(const WString&)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::triggerUpdate ( )
+
+
+ +

Propagates server-initiated updates.

+

Propagate changes made to the user interface outside of the main event loop. This is only possible after a call to enableUpdates(), and must be done while holding the UpdateLock.

+
See also:
enableUpdates(), UpdateLock
+ +
+
+ +
+
+ + + + + + + +
void Wt::WApplication::unload ( ) [protected, virtual]
+
+
+ +

Handles a browser unload event.

+

The browser unloads the application when the user navigates away or when he closes the window or tab.

+

When reload-is-new-session is set to true, then the default implementation of this method terminates this session by calling quit().

+

You may want to reimplement this if you want to keep the application running until it times out (as was the behaviour before Wt 3.1.6).

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WApplication::updatesEnabled ( ) const
+
+
+ +

Returns whether server-initiated updates are enabled.

+
See also:
enableUpdates()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WApplication::url ( ) const
+
+
+ +

Returns a URL for the current session.

+

Returns the (relative) URL for this application session (including the session ID if necessary). The URL includes the full application path, and is expanded by the browser into a full URL.

+

For example, for an application deployed at

+
 http://www.mydomain.com/stuff/app.wt 
+

this method would return "/stuff/app.wt?wtd=AbCdEf". Additional query parameters can be appended in the form of "&param1=value&param2=value".

+

To obtain a URL that is suitable for bookmarking the current application state, to be used across sessions, use bookmarkUrl() instead.

+
See also:
redirect(), WEnvironment::hostName(), WEnvironment::urlScheme()
+
+bookmarkUrl()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WApplication::useStyleSheet (const std::string &  url,
const std::string &  condition,
const std::string &  media = "all" 
)
+
+
+ +

Adds an external style sheet, constrained with conditions.

+

If not empty, condition is a string that is used to apply the stylesheet to specific versions of IE. Only a limited subset of the IE conditional comments syntax is supported (since these are in fact interpreted server-side instead of client-side). Examples are:

+
    +
  • "IE gte 6": only for IE version 6 or later.
  • +
  • "!IE gte 6": only for IE versions prior to IE6.
  • +
  • "IE lte 7": only for IE versions prior to IE7.
  • +
+

The media indicates the CSS media to which this stylesheet applies. This may be a comma separated list of media. The default value is "all" indicating all media.

+

The url indicates a relative or absolute URL to the stylesheet.

+
See also:
useStyleSheet()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WApplication::useStyleSheet (const std::string &  url )
+
+
+ +

Adds an external style sheet.

+

Widgets may allow configuration of their look and feel through style classes. These may be defined in an inline stylesheet, or in external style sheets.

+

The url indicates a relative or absolute URL to the stylesheet.

+

External stylesheets are inserted after the internal style sheet, and can therefore override default styles set by widgets in the internal style sheet.

+
See also:
styleSheet(), useStyleSheet(const std::string&, const std::string&)
+
+WWidget::setStyleClass()
+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + +
typedef WApplication*(* ApplicationCreator)(const WEnvironment &env) [related]
+
+
+ +

Typedef for a function that creates WApplication objects.

+
See also:
WRun()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock-members.html new file mode 100644 index 0000000..a1fdc33 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WApplication::UpdateLock Member List

+
+
+This is the complete list of members for Wt::WApplication::UpdateLock, including all inherited members. + + + + +
operator bool() const Wt::WApplication::UpdateLock
UpdateLock(WApplication *app)Wt::WApplication::UpdateLock
UpdateLock(const UpdateLock &)Wt::WApplication::UpdateLock
~UpdateLock()Wt::WApplication::UpdateLock
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock.html new file mode 100644 index 0000000..41897b5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication_1_1UpdateLock.html @@ -0,0 +1,175 @@ + + + + +Wt: Wt::WApplication::UpdateLock Class Reference + + + + + + + + + +
+ +
+

Wt::WApplication::UpdateLock Class Reference

+
+
+ +

A RAII lock for manipulating and updating the application and its widgets outside of the event loop. +More...

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

 UpdateLock (WApplication *app)
 Creates and locks the given application.
 UpdateLock (const UpdateLock &)
 Copy constructor (deprecated).
 operator bool () const
 Tests whether the update lock was succesfully taken.
~UpdateLock ()
 Releases the lock.
+

Detailed Description

+

A RAII lock for manipulating and updating the application and its widgets outside of the event loop.

+

You need to take this lock only when you want to manipulate widgets outside of the event loop. Inside the event loop, this lock is already held by the library itself.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WApplication::UpdateLock::UpdateLock (WApplication app )
+
+
+ +

Creates and locks the given application.

+

The lock guarantees exclusive access to modify the application's state.

+

When one application A is trying to take the lock of an another application B, this lock behaves like a Wt::SyncLock. Thus while application A waiting for application B's update lock, application B or C may succesfully take application A's update lock, in this way avoiding dead-lock situations.

+

As soon as the library decides to destroy the application, the lock will no longer succeed in taking the application lock. You can need to detect this by checking that after the lock is taken, the lock is taken:

+
 WApplication::UpdateLock lock(app);
+ if (lock) {
+   // exclusive access to app state
+ }
+
+
+
+ +
+
+ + + + + + + + +
Wt::WApplication::UpdateLock::UpdateLock (const UpdateLock other )
+
+
+ +

Copy constructor (deprecated).

+

By copying the lock, lock ownership is transferred. The original object becomes empty, and its destructor has no longer the effect of releasing the lock.

+
Deprecated:
use UpdateLock(WApplication *) instead of getUpdateLock() which requires this copy.
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Wt::WApplication::UpdateLock::operator bool ( ) const
+
+
+ +

Tests whether the update lock was succesfully taken.

+

This may return false when the library has already decided to destroy the session (but before your application finalizer/destructor has run to notify helper threads that the application is destroyed).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.map new file mode 100644 index 0000000..895c4a8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.md5 new file mode 100644 index 0000000..d73cee2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.md5 @@ -0,0 +1 @@ +b25d530d50622363e4c5ca6165e8f101 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.png new file mode 100644 index 0000000..6f52198 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WApplication__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel-members.html new file mode 100644 index 0000000..dcbd1aa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel-members.html @@ -0,0 +1,171 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBatchEditProxyModel Member List

+
+
+This is the complete list of members for Wt::WBatchEditProxyModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::WBatchEditProxyModel [virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
commitAll()Wt::WBatchEditProxyModel
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
createSourceIndex(int row, int column, void *ptr) const Wt::WAbstractProxyModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const Wt::WBatchEditProxyModel [virtual]
Wt::WAbstractProxyModel::data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WBatchEditProxyModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WBatchEditProxyModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WBatchEditProxyModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WBatchEditProxyModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WBatchEditProxyModel [virtual]
isDirty() const Wt::WBatchEditProxyModel
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
ItemMap typedefWt::WAbstractProxyModel [protected]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
mapFromSource(const WModelIndex &sourceIndex) const Wt::WBatchEditProxyModel [virtual]
mapToSource(const WModelIndex &proxyIndex) const Wt::WBatchEditProxyModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WBatchEditProxyModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WBatchEditProxyModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WBatchEditProxyModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
revertAll()Wt::WBatchEditProxyModel
rowCount(const WModelIndex &parent=WModelIndex()) const Wt::WBatchEditProxyModel [virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WBatchEditProxyModel [virtual]
Wt::WAbstractProxyModel::setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setDirtyIndication(int role, const boost::any &data)Wt::WBatchEditProxyModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setNewRowData(int column, const boost::any &data, int role=DisplayRole)Wt::WBatchEditProxyModel
setNewRowFlags(int column, WFlags< ItemFlag > flags)Wt::WBatchEditProxyModel
setObjectName(const std::string &name)Wt::WObject
setSourceModel(WAbstractItemModel *sourceModel)Wt::WBatchEditProxyModel [virtual]
shiftModelIndexes(const WModelIndex &sourceParent, int start, int count, ItemMap &items)Wt::WAbstractProxyModel [protected]
sort(int column, SortOrder order=AscendingOrder)Wt::WBatchEditProxyModel [virtual]
sourceModel() const Wt::WAbstractProxyModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractProxyModel(WObject *parent=0)Wt::WAbstractProxyModel
WBatchEditProxyModel(WObject *parent=0)Wt::WBatchEditProxyModel
WObject(WObject *parent=0)Wt::WObject
~WBatchEditProxyModel()Wt::WBatchEditProxyModel [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel.html new file mode 100644 index 0000000..bd7e6f2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel.html @@ -0,0 +1,834 @@ + + + + +Wt: Wt::WBatchEditProxyModel Class Reference + + + + + + + + + +
+ +
+

Wt::WBatchEditProxyModel Class Reference
+ +[Model/view system] +

+
+
+ +

A proxy model for Wt's item models that provides batch editing. +More...

+ +

#include <Wt/WBatchEditProxyModel>

+
+Inheritance diagram for Wt::WBatchEditProxyModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WBatchEditProxyModel (WObject *parent=0)
 Constructor.
+virtual ~WBatchEditProxyModel ()
 Destructor.
bool isDirty () const
 Returns whether changes have not yet been committed.
void commitAll ()
 Commits changes.
void revertAll ()
 Reverts changes.
void setNewRowData (int column, const boost::any &data, int role=DisplayRole)
 Sets default data for a newly inserted row.
void setNewRowFlags (int column, WFlags< ItemFlag > flags)
 Sets the item flags for items in a newly inserted row.
void setDirtyIndication (int role, const boost::any &data)
 Configures data used to indicate a modified item.
virtual WModelIndex mapFromSource (const WModelIndex &sourceIndex) const
 Maps a source model index to the proxy model.
virtual WModelIndex mapToSource (const WModelIndex &proxyIndex) const
 Maps a proxy model index to the source model.
virtual void setSourceModel (WAbstractItemModel *sourceModel)
 Sets the source model.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
virtual WModelIndex parent (const WModelIndex &index) const
 Returns the parent for a model index.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
virtual boost::any data (const WModelIndex &index, int role=DisplayRole) const
 Returns data at a specific model index.
virtual bool setData (const WModelIndex &index, const boost::any &value, int role=EditRole)
 Sets item data.
virtual WFlags< ItemFlagflags (const WModelIndex &index) const
 Returns the flags for an item.
virtual boost::any headerData (int section, Orientation orientation=Horizontal, int role=DisplayRole) const
 Returns the row or column header data.
virtual bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more rows.
virtual bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes rows.
virtual bool insertColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more columns.
virtual bool removeColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Removes columns.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
+

Detailed Description

+

A proxy model for Wt's item models that provides batch editing.

+

This proxy model presents data from a source model, and caches any editing operation without affecting the underlying source model, until commitAll() or revertAll() is called. In this way, you can commit all the editing in batch to the underlying source model, only when the user confirms the changes.

+

All editing operations are supported:

+ +

The model supports both simple tabular models, as well as hierarchical (tree-like / treetable-like) models, with children under items in the first column.

+

Default values for a newly inserted row can be set using setNewRowData() and flags for its items using setNewRowFlags().

+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WBatchEditProxyModel::columnCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of columns.

+

This returns the number of columns at index parent.

+
See also:
rowCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WBatchEditProxyModel::commitAll ( )
+
+
+ +

Commits changes.

+

This commits all changes to the source model.

+
See also:
revertAll()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
boost::any Wt::WBatchEditProxyModel::data (const WModelIndex index,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns data at a specific model index.

+

Return data for a given role at a given index.

+
See also:
flags(), headerData(), setData()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
WFlags< ItemFlag > Wt::WBatchEditProxyModel::flags (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the flags for an item.

+

The default implementation returns ItemIsSelectable.

+
See also:
Wt::ItemFlag
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::WBatchEditProxyModel::headerData (int  section,
Orientation  orientation = Horizontal,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns the row or column header data.

+

When orientation is Horizontal, section is a column number, when orientation is Vertical, section is a row number.

+
See also:
data(), setHeaderData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WBatchEditProxyModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WBatchEditProxyModel::insertColumns (int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more columns.

+

In models that support column insertion, this inserts count columns, starting at column, and returns true if the operation was successful. The new columns are inserted under parent.

+

The default implementation returns false.

+

The model implementation must call beginInsertColumns() and endInsertColumns() before and after the operation whenever its geometry is changed by inserting columns. This emits signals for views to properly react to these changes.

+
See also:
insertRows(), removeColumns(), beginInsertColumns(), endInsertColumns()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WBatchEditProxyModel::insertRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more rows.

+

In models that support row insertion, this inserts count rows, starting at row, and returns true if the operation was successful. The new rows are inserted under parent.

+

If parent had no children, then a single column is added with count rows.

+

The default implementation returns false.

+

The model implementation must call beginInsertRows() and endInsertRows() before and after the operation whenever its geometry is changed by inserting rows. This emits signals for views to properly react to these changes.

+
See also:
insertColumns(), removeRows(), beginInsertRows(), endInsertRows()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WBatchEditProxyModel::isDirty ( ) const
+
+
+ +

Returns whether changes have not yet been committed.

+

Returns whether have been made to the proxy model, which could be committed using commitAll() or reverted using revertAll().

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WBatchEditProxyModel::mapFromSource (const WModelIndex sourceIndex ) const [virtual]
+
+
+ +

Maps a source model index to the proxy model.

+

This method returns a model index in the proxy model that corresponds to the model index sourceIndex in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of mapToSource().

+
See also:
mapToSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WBatchEditProxyModel::mapToSource (const WModelIndex proxyIndex ) const [virtual]
+
+
+ +

Maps a proxy model index to the source model.

+

This method returns a model index in the source model that corresponds to the proxy model index proxyIndex.

+
See also:
mapFromSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WBatchEditProxyModel::parent (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WBatchEditProxyModel::removeColumns (int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes columns.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must call beginRemoveColumns() and endRemoveColumns() before and after the operation whenever its geometry is changed by removing columns. This emits signals for views to properly react to these changes.

+
See also:
removeRows(), insertColumns(), beginRemoveColumns(), endRemoveColumns()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WBatchEditProxyModel::removeRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes rows.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must call beginRemoveRows() and endRemoveRows() before and after the operation whenever its geometry is changed by removing rows. This emits signals for views to properly react to these changes.

+
See also:
removeColumns(), insertRows(), beginRemoveRows(), endRemoveRows()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WBatchEditProxyModel::revertAll ( )
+
+
+ +

Reverts changes.

+

This reverts all changes.

+
See also:
commitAll()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WBatchEditProxyModel::rowCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of rows.

+

This returns the number of rows at index parent.

+
See also:
columnCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WBatchEditProxyModel::setData (const WModelIndex index,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets item data.

+

The default implementation will copy Wt::EditRole data to Wt::DisplayRole. You may want to specialize the model to provide a more specialized editing behaviour.

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBatchEditProxyModel::setDirtyIndication (int  role,
const boost::any &  data 
)
+
+
+ +

Configures data used to indicate a modified item.

+

This sets data for item data role role to be returned by data() for an item that is dirty (e.g. because it belongs to a newly inserted row/column, or because new data has been set for it.

+

When role is Wt::StyleClassRole, the style class is appended to any style already returned by the source model or set by setNewRowData().

+

By default there is no dirty indication.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WBatchEditProxyModel::setNewRowData (int  column,
const boost::any &  data,
int  role = DisplayRole 
)
+
+
+ +

Sets default data for a newly inserted row.

+

You can use this method to initialize data for a newly inserted row.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBatchEditProxyModel::setNewRowFlags (int  column,
WFlags< ItemFlag flags 
)
+
+
+ +

Sets the item flags for items in a newly inserted row.

+

By default, flags() will return ItemIsSelectable.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBatchEditProxyModel::setSourceModel (WAbstractItemModel sourceModel ) [virtual]
+
+
+ +

Sets the source model.

+

The source model provides the actual data for the proxy model.

+

Ownership of the source model is not transferred.

+ +

Reimplemented from Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBatchEditProxyModel::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.map new file mode 100644 index 0000000..a81ebaf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.md5 new file mode 100644 index 0000000..169a40a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.md5 @@ -0,0 +1 @@ +551ad66d2378fa453f14c4f31432e510 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.png new file mode 100644 index 0000000..110abb8 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WBatchEditProxyModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder-members.html new file mode 100644 index 0000000..a913afe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder-members.html @@ -0,0 +1,107 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBorder Member List

+
+
+This is the complete list of members for Wt::WBorder, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
color() const Wt::WBorder
cssText() const Wt::WBorder
Dashed enum valueWt::WBorder
Dotted enum valueWt::WBorder
Double enum valueWt::WBorder
Explicit enum valueWt::WBorder
explicitWidth() const Wt::WBorder
Groove enum valueWt::WBorder
Hidden enum valueWt::WBorder
Inset enum valueWt::WBorder
Medium enum valueWt::WBorder
None enum valueWt::WBorder
operator!=(const WBorder &other) const Wt::WBorder
operator==(const WBorder &other) const Wt::WBorder
Outset enum valueWt::WBorder
Ridge enum valueWt::WBorder
setColor(WColor color)Wt::WBorder
setStyle(Style style)Wt::WBorder
setWidth(Width width, const WLength &explicitWidth=WLength::Auto)Wt::WBorder
Solid enum valueWt::WBorder
Style enum nameWt::WBorder
style() const Wt::WBorder
Thick enum valueWt::WBorder
Thin enum valueWt::WBorder
WBorder()Wt::WBorder
WBorder(Style style, Width=Medium, WColor color=WColor())Wt::WBorder [explicit]
WBorder(Style style, const WLength &width, WColor color=WColor())Wt::WBorder
Width enum nameWt::WBorder
width() const Wt::WBorder
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder.html new file mode 100644 index 0000000..3103fa8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorder.html @@ -0,0 +1,350 @@ + + + + +Wt: Wt::WBorder Class Reference + + + + + + + + + +
+ +
+

Wt::WBorder Class Reference
+ +[Style classes] +

+
+
+ +

A style class for the border of a widget. +More...

+ +

#include <Wt/WBorder>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Width { Thin, +Medium, +Thick, +Explicit + }
 

Enumeration for border width.

+ More...
enum  Style {
+  None, +Hidden, +Dotted, +Dashed, +
+  Solid, +Double, +Groove, +Ridge, +
+  Inset, +Outset +
+ }
 

Enumeration for border style.

+ More...

+Public Member Functions

WBorder ()
 Creates a border indicating no border.
WBorder (Style style, Width=Medium, WColor color=WColor())
 Creates a border with given style, thickness and color.
WBorder (Style style, const WLength &width, WColor color=WColor())
 Creates a border with an absolute width.
+bool operator== (const WBorder &other) const
 Comparison operator.
+bool operator!= (const WBorder &other) const
 Comparison operator.
void setWidth (Width width, const WLength &explicitWidth=WLength::Auto)
 Sets the border width.
+void setColor (WColor color)
 Sets the border color.
+void setStyle (Style style)
 Sets the border style.
Width width () const
 Returns the border width.
WLength explicitWidth () const
 Returns the border width when set explicitly.
WColor color () const
 Returns the border color.
Style style () const
 Returns the border style.
+std::string cssText () const
 Returns the CSS text for this border style.
+

Detailed Description

+

A style class for the border of a widget.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WBorder::Style
+
+
+ +

Enumeration for border style.

+
Enumerator:
+ + + + + + + + + + +
None  +

No border (width ignored), default.

+
Hidden  +

Invisible border (of specified width).

+
Dotted  +

Dotted border.

+
Dashed  +

Dashed border.

+
Solid  +

Solid border.

+
Double  +

Double lined border.

+
Groove  +

Relief border grooved into the canvas.

+
Ridge  +

Relief border coming out of the canvas.

+
Inset  +

Relief border lowering contents into the canvas.

+
Outset  +

Relief border letting contents come out of the canvas.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WBorder::Width
+
+
+ +

Enumeration for border width.

+
Enumerator:
+ + + + +
Thin  +

Browser-dependent 'thin' border.

+
Medium  +

Browser-dependent 'medium' border, default.

+
Thick  +

Browser-dependent 'thin' border.

+
Explicit  +

Explicit width. See also explicitWidth()

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WColor Wt::WBorder::color ( ) const
+
+
+ +

Returns the border color.

+
See also:
setColor()
+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WBorder::explicitWidth ( ) const
+
+
+ +

Returns the border width when set explicitly.

+
See also:
setWidth()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBorder::setWidth (Width  width,
const WLength explicitWidth = WLength::Auto 
)
+
+
+ +

Sets the border width.

+

If width == Explicit, then the width specified in explicitWidth is used.

+ +
+
+ +
+
+ + + + + + + +
Style Wt::WBorder::style ( ) const
+
+
+ +

Returns the border style.

+
See also:
setStyle()
+ +
+
+ +
+
+ + + + + + + +
Width Wt::WBorder::width ( ) const
+
+
+ +

Returns the border width.

+
See also:
setWidth()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout-members.html new file mode 100644 index 0000000..fe007e4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout-members.html @@ -0,0 +1,132 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBorderLayout Member List

+
+
+This is the complete list of members for Wt::WBorderLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add(WLayoutItem *item, Position position)Wt::WBorderLayout
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WBorderLayout [virtual]
addWidget(WWidget *widget, Position position)Wt::WBorderLayout
Wt::WLayout::addWidget(WWidget *widget)Wt::WLayout
Center enum valueWt::WBorderLayout
children() const Wt::WObject
count() const Wt::WBorderLayout [virtual]
East enum valueWt::WBorderLayout
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
itemAt(int index) const Wt::WBorderLayout [virtual]
itemAt(Position position) const Wt::WBorderLayout
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
North enum valueWt::WBorderLayout
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
Position enum nameWt::WBorderLayout
position(WLayoutItem *item) const Wt::WBorderLayout
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WBorderLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setSpacing(int size)Wt::WBorderLayout
South enum valueWt::WBorderLayout
spacing() const Wt::WBorderLayout
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WBorderLayout(WWidget *parent=0)Wt::WBorderLayout
West enum valueWt::WBorderLayout
widget()Wt::WLayout [virtual]
widgetAt(Position position) const Wt::WBorderLayout
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WBorderLayout()Wt::WBorderLayout
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout.html new file mode 100644 index 0000000..86447b7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout.html @@ -0,0 +1,448 @@ + + + + +Wt: Wt::WBorderLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WBorderLayout Class Reference

+
+
+ +

A layout manager which divides the container region in five regions. +More...

+ +

#include <Wt/WBorderLayout>

+
+Inheritance diagram for Wt::WBorderLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Position {
+  North, +East, +South, +West, +
+  Center +
+ }
 

Enumeration of possible positions in the layout.

+ More...

+Public Member Functions

WBorderLayout (WWidget *parent=0)
 Creates a new border layout.
~WBorderLayout ()
 Destructor.
void setSpacing (int size)
 Sets spacing between each item.
int spacing () const
 Returns the spacing between each item.
virtual void addItem (WLayoutItem *item)
 Adds a layout item.
virtual void removeItem (WLayoutItem *item)
 Removes a layout item (widget or nested layout).
virtual WLayoutItemitemAt (int index) const
 Returns the layout item at a specific index.
virtual int count () const
 Returns the number of items in this layout.
void addWidget (WWidget *widget, Position position)
 Adds a widget to the given position.
void add (WLayoutItem *item, Position position)
 Adds a layout item to the given position.
WWidgetwidgetAt (Position position) const
 Returns the widget at a position.
WLayoutItemitemAt (Position position) const
 Returns the item at a position.
+Position position (WLayoutItem *item) const
 Returns the position at which the given layout item is set.
+

Detailed Description

+

A layout manager which divides the container region in five regions.

+

The five regions are composed of:

+
+     ------------------------------------
+     |              North               |
+     ------------------------------------
+     |      |                    |      |
+     | West |       Center       | East |
+     |      |                    |      |
+     ------------------------------------
+     |              South               |
+     ------------------------------------
+ 

Each region may hold no more than one widget, and for all but the Center region, the widget is optional.

+

Widgets in the North and South regions need to have The Center widget takes all available remaining space.

+

This layout manager is applicable to WContainerWidget or Ext::Container container widgets. They use different properties from the widgets to determine the heights for the border panes:

+
    +
  • When used with an Ext::Container, the North and South regions need to have their height defined using WWidget::resize(), and likewise, widgets in the West ad East regions need their width defined.
  • +
  • When used with a WContainerWidget, the widget minimum sizes are used for sizing the border widgets, whose default values may be overridden using WWidget::setMinimumSize(). You may not define any padding for the container widget. Instead, use setContentsMargins().
  • +
+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
+ Wt::WBorderLayout *layout = new Wt::WBorderLayout();
+ layout->addWidget(new Wt::WText("West-side is best"), Wt::West);
+ layout->addWidget(new Wt::WText("East-side is best"), Wt::East);
+ layout->addWidget(contents, Wt::Center);
+
+ // use layout but do not justify vertically
+ w->setLayout(layout, Wt::AlignTop | Wt::AlignJustify);
+
Note:
When used on a WContainerWidget, this layout manager accepts the following hints (see setLayoutHint()):
    +
  • +"table-layout" with possible values "auto" (default) or "fixed".
    + Use "fixed" to prevent nested tables from overflowing the layout. In that case, you will need to specify a width (in CSS or otherwise) for at least one item in every column that has no stretch factor.
  • +
+
+
Warning:
You should specify AlignTop in the alignment flags of WContainerWidget::setLayout() if the container does not have a height that is constrained somehow. Otherwise the behavior is undefined (the parent container will continue to increase in size)
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WBorderLayout::Position
+
+
+ +

Enumeration of possible positions in the layout.

+
Enumerator:
+ + + + + +
North  +

North (top)

+
East  +

East (right)

+
South  +

South (bottom)

+
West  +

West (left)

+
Center  +

Center.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBorderLayout::add (WLayoutItem item,
Position  position 
)
+
+
+ +

Adds a layout item to the given position.

+

Only one widget per position is supported.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBorderLayout::addItem (WLayoutItem item ) [virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout.

+

How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBorderLayout::addWidget (WWidget widget,
Position  position 
)
+
+
+ +

Adds a widget to the given position.

+

Only one widget per position is supported.

+
See also:
add(WLayoutItem *, Position)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WBorderLayout::count ( ) const [virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WBorderLayout::itemAt (int  index ) const [virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WBorderLayout::itemAt (Position  position ) const
+
+
+ +

Returns the item at a position.

+

Returns 0 if no item was set for that position.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBorderLayout::removeItem (WLayoutItem item ) [virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBorderLayout::setSpacing (int  size )
+
+
+ +

Sets spacing between each item.

+

The default spacing is 6 pixels.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WBorderLayout::spacing ( ) const
+
+
+ +

Returns the spacing between each item.

+
See also:
setSpacing()
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::WBorderLayout::widgetAt (Position  position ) const
+
+
+ +

Returns the widget at a position.

+

Returns 0 if no widget was set for that position.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.map new file mode 100644 index 0000000..e293acd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.md5 new file mode 100644 index 0000000..5284984 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.md5 @@ -0,0 +1 @@ +8ae5afc79667df3c4f6e8ae184dfc1aa \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.png new file mode 100644 index 0000000..452a8cf Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WBorderLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout-members.html new file mode 100644 index 0000000..5c03f56 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout-members.html @@ -0,0 +1,139 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBoxLayout Member List

+
+
+This is the complete list of members for Wt::WBoxLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
addLayout(WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
addSpacing(const WLength &size)Wt::WBoxLayout
addStretch(int stretch=0)Wt::WBoxLayout
addWidget(WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
Wt::WLayout::addWidget(WWidget *widget)Wt::WLayout
BottomToTop enum valueWt::WBoxLayout
children() const Wt::WObject
count() const Wt::WBoxLayout [virtual]
Direction enum nameWt::WBoxLayout
direction() const Wt::WBoxLayout
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
insertLayout(int index, WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
insertSpacing(int index, const WLength &size)Wt::WBoxLayout
insertStretch(int index, int stretch=0)Wt::WBoxLayout
insertWidget(int index, WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
isResizable(int index) const Wt::WBoxLayout
itemAt(int index) const Wt::WBoxLayout [virtual]
layout()Wt::WLayout [virtual]
LeftToRight enum valueWt::WBoxLayout
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
RightToLeft enum valueWt::WBoxLayout
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setDirection(Direction direction)Wt::WBoxLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setResizable(int index, bool enabled=true)Wt::WBoxLayout
setSpacing(int size)Wt::WBoxLayout
setStretchFactor(WLayout *layout, int stretch)Wt::WBoxLayout
setStretchFactor(WWidget *widget, int stretch)Wt::WBoxLayout
spacing() const Wt::WBoxLayout
TopToBottom enum valueWt::WBoxLayout
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WBoxLayout(Direction dir, WWidget *parent=0)Wt::WBoxLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout.html new file mode 100644 index 0000000..9961fb8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout.html @@ -0,0 +1,799 @@ + + + + +Wt: Wt::WBoxLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WBoxLayout Class Reference

+
+
+ +

A layout manager which arranges widgets horizontally or vertically. +More...

+ +

#include <Wt/WBoxLayout>

+
+Inheritance diagram for Wt::WBoxLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Direction { LeftToRight, +RightToLeft, +TopToBottom, +BottomToTop + }
 

Enumeration of the direction in which widgets are layed out.

+ More...

+Public Member Functions

 WBoxLayout (Direction dir, WWidget *parent=0)
 Creates a new box layout.
virtual void addItem (WLayoutItem *item)
 Adds a layout item.
virtual void removeItem (WLayoutItem *item)
 Removes a layout item (widget or nested layout).
virtual WLayoutItemitemAt (int index) const
 Returns the layout item at a specific index.
virtual int count () const
 Returns the number of items in this layout.
void setDirection (Direction direction)
 Sets the layout direction.
Direction direction () const
 Returns the layout direction.
void setSpacing (int size)
 Sets spacing between each item.
int spacing () const
 Returns the spacing between each item.
void addWidget (WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)
 Adds a widget to the layout.
void addLayout (WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)
 Adds a nested layout to the layout.
void addSpacing (const WLength &size)
 Adds extra spacing.
void addStretch (int stretch=0)
 Adds a stretch element.
void insertWidget (int index, WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)
 Inserts a widget in the layout.
void insertLayout (int index, WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)
 Inserts a nested layout in the layout.
void insertSpacing (int index, const WLength &size)
 Inserts extra spacing in the layout.
void insertStretch (int index, int stretch=0)
 Inserts a stretch element in the layout.
bool setStretchFactor (WLayout *layout, int stretch)
 Sets the stretch factor for a nested layout.
bool setStretchFactor (WWidget *widget, int stretch)
 Sets the stretch factor for a widget.
void setResizable (int index, bool enabled=true)
 Sets whether the use may drag a particular border.
bool isResizable (int index) const
 Returns whether the user may drag a particular border.
+

Detailed Description

+

A layout manager which arranges widgets horizontally or vertically.

+

This layout manager arranges widgets horizontally or vertically inside the parent container. The space is divided so that each widgets is given its minimum size, and remaining space is divided according to stretch factors among the widgets. The widget minimum height or width is used for sizing each widget, whose default values may be overridden using WWidget::setMinimumSize().

+

If you want to use the layout manager for a container which does not have a height that is constrained somehow, you need to specify AlignTop in the alignment flags of WContainerWidget::setLayout(). Otherwise the behavior is undefined (the parent container will continue to increase in size as it tries to satisfy the constraints assuming a contrained height).

+

You can use WContainerWidget::setOverflow(OverflowAuto) or use a WScrollArea to automatically show scrollbars on a widget inserted in the layout.

+

A caveat with layout managers is that you cannot reliably use a stylesheet to add borders (or margin) to a widget inserted in a layout: this is broken on Internet Explorer. To provide the layout, the layout manager needs to set sizes on the contained widget but these sizes also need to take into account the border/margin width. Since on IE, this value will be 0 if the border or margin is provided by a stylesheet (as opposed to by inline CSS by using WWidget::decorationStyle()), the result will be wrong behaviour like widgets that keep growing in size.

+

A layout manager may provide resize handles between items which allow the user to change the automatic layout provided by the layout manager (see setResizable()). Resize handles between rows for a vertically oriented box layout only work when the layout fills the parent vertical space (i.e. is not aligned to the top). Likewise, resize handles between columns for a horizontally oriented box layout only work when the layout fills the parent horiziontal space (i.e. is not aligned left, right or centered).

+

Each item is separated using a constant spacing, which defaults to 6 pixels, and can be changed using setSpacing(). In addition, when this layout is a top-level layout (i.e. is not nested inside another layout), a margin is set around the contents, which thus replaces padding defined for the container. This margin defaults to 9 pixels, and can be changed using setContentsMargins(). It is not allowed to define padding for the container widget using its CSS 'padding' property or the WContainerWidget::setPadding(). You can add more space between two widgets using addSpacing().

+

For each item a stretch factor may be defined, which controls how remaining space is used. Each item is stretched using the stretch factor to fill the remaining space.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
+ w->resize(WLength(), 600);
+
+ Wt::WBoxLayout *layout = new Wt::WBoxLayout(Wt::WBoxLayout::TopToBottom);
+ layout->addWidget(new Wt::WText("One"));
+ layout->addWidget(new Wt::WText("Two"));
+ layout->addWidget(new Wt::WText("Three"));
+ layout->addWidget(new Wt::WText("Four"));
+
+ w->setLayout(layout);
+
Note:
This layout manager is applicable only to WContainerWidget container widgets. You may use it within an Ext::Container indirectly by first setting a WContainerWidget using a WFitLayout.
+
+When JavaScript support is not available, only Safari and Firefox properly implement this box layout. For other browsers, only the horizontal layout is properly implemented, while vertically all widgets use their minimum size.
+
+When set on a WContainerWidget, this layout manager accepts the following hints (see setLayoutHint()):
    +
  • +"table-layout" with possible values "auto" (default) or "fixed".
    + Use "fixed" to prevent nested tables from overflowing the layout. In that case, you will need to specify a width (in CSS or otherwise) for at least one item in every column that has no stretch factor.
  • +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WBoxLayout::Direction
+
+
+ +

Enumeration of the direction in which widgets are layed out.

+
Enumerator:
+ + + + +
LeftToRight  +

Horizontal layout, widgets are arranged from left to right.

+
RightToLeft  +

Horizontal layout, widgets are arranged from right to left.

+
TopToBottom  +

Vertical layout, widgets are arranged from top to bottom.

+
BottomToTop  +

Vertical layout, widgets are arranged from bottom to top.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WBoxLayout::WBoxLayout (Direction  dir,
WWidget parent = 0 
)
+
+
+ +

Creates a new box layout.

+

This constructor is rarely used. Instead, use the convenient constructors of the specialized WHBoxLayout or WVBoxLayout classes.

+

Use parent = 0 to created a layout manager that can be nested inside other layout managers.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::addItem (WLayoutItem item ) [virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout.

+

How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::addLayout (WLayout layout,
int  stretch = 0,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a nested layout to the layout.

+

Adds a nested layout, with given stretch factor.

+
See also:
addWidget(WWidget *, int, WFlags<AlignmentFlag>), insertLayout()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::addSpacing (const WLength size )
+
+
+ +

Adds extra spacing.

+

Adds extra spacing to the layout.

+
See also:
addStretch(), insertStretch()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::addStretch (int  stretch = 0 )
+
+
+ +

Adds a stretch element.

+

Adds a stretch element to the layout. This adds an empty space that stretches as needed.

+
See also:
addSpacing(), insertStretch()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::addWidget (WWidget widget,
int  stretch = 0,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a widget to the layout.

+

Adds a widget to the layout, with given stretch factor. When the stretch factor is 0, the widget will not be resized by the layout manager (stretched to take excess space). You may use a special stretch factor of -1 to indicate that the widget should not take excess space but the contents height should still be actively managed. This may make sense for example if the widget is layout size aware).

+

The alignemnt parameter is a combination of a horizontal and/or a vertical AlignmentFlag OR'ed together.

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire column or row. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addLayout(), insertWidget()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WBoxLayout::count ( ) const [virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + +
Direction Wt::WBoxLayout::direction ( ) const
+
+
+ +

Returns the layout direction.

+
See also:
setDirection()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::insertLayout (int  index,
WLayout layout,
int  stretch = 0,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Inserts a nested layout in the layout.

+

Inserts a nested layout in the layout at positionindex, with given stretch factor.

+
See also:
insertWidget(), addLayout()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::insertSpacing (int  index,
const WLength size 
)
+
+
+ +

Inserts extra spacing in the layout.

+

Inserts extra spacing in the layout at position index.

+
See also:
insertStretch(), addSpacing()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::insertStretch (int  index,
int  stretch = 0 
)
+
+
+ +

Inserts a stretch element in the layout.

+

Inserts a stretch element in the layout at position index. This adds an empty space that stretches as needed.

+
See also:
insertSpacing(), addStretch()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::insertWidget (int  index,
WWidget widget,
int  stretch = 0,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Inserts a widget in the layout.

+

Inserts a widget in the layout at position index, with given stretch factor. When the stretch factor is 0, the widget will not be resized by the layout manager (stretched to take excess space). You may use a special stretch factor of -1 to indicate that the widget should not take excess space but the contents height should still be actively managed. This may make sense for example if the widget is layout size aware).

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire column or row. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
insertLayout(), addWidget(WWidget *, int, WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WBoxLayout::isResizable (int  index ) const
+
+
+ +

Returns whether the user may drag a particular border.

+

This method returns whether the border that separates item index from the next item may be resized by the user.

+
See also:
setResizable()
+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WBoxLayout::itemAt (int  index ) const [virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::removeItem (WLayoutItem item ) [virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::setDirection (Direction  direction )
+
+
+ +

Sets the layout direction.

+
See also:
direction()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WBoxLayout::setResizable (int  index,
bool  enabled = true 
)
+
+
+ +

Sets whether the use may drag a particular border.

+

This method sets whether the border that separates item index from the next item may be resized by the user, depending on the value of enabled.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBoxLayout::setSpacing (int  size )
+
+
+ +

Sets spacing between each item.

+

The default spacing is 6 pixels.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WBoxLayout::setStretchFactor (WLayout layout,
int  stretch 
)
+
+
+ +

Sets the stretch factor for a nested layout.

+

The layout must have previously been added to this layout using insertLayout() or addLayout().

+

Returns whether the stretch could be set.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WBoxLayout::setStretchFactor (WWidget widget,
int  stretch 
)
+
+
+ +

Sets the stretch factor for a widget.

+

The widget must have previously been added to this layout using insertWidget() or addWidget().

+

Returns whether the stretch could be set.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WBoxLayout::spacing ( ) const
+
+
+ +

Returns the spacing between each item.

+
See also:
setSpacing()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.map new file mode 100644 index 0000000..53ed34e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.md5 new file mode 100644 index 0000000..c59a413 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.md5 @@ -0,0 +1 @@ +0a9e3f9fee22502115ba33c6917335b4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.png new file mode 100644 index 0000000..a939522 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WBoxLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak-members.html new file mode 100644 index 0000000..0a4c7f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak-members.html @@ -0,0 +1,181 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBreak Member List

+
+
+This is the complete list of members for Wt::WBreak, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WBreak(WContainerWidget *parent=0)Wt::WBreak
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak.html new file mode 100644 index 0000000..40bb503 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak.html @@ -0,0 +1,111 @@ + + + + +Wt: Wt::WBreak Class Reference + + + + + + + + + +
+ +
+

Wt::WBreak Class Reference

+
+
+ +

A widget that provides a line break between inline widgets. +More...

+ +

#include <Wt/WBreak>

+
+Inheritance diagram for Wt::WBreak:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

WBreak (WContainerWidget *parent=0)
 Construct a line break.
+

Detailed Description

+

A widget that provides a line break between inline widgets.

+

This is an inline widget that provides a line break inbetween its sibling widgets (such as WText).

+

CSS

+

The widget corresponds to the HTML <br /> tag and does not provide styling. Styling through CSS is not applicable.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.map new file mode 100644 index 0000000..76eb54b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.md5 new file mode 100644 index 0000000..923411e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.md5 @@ -0,0 +1 @@ +63c974055840f9e7934b14a376d1400b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.png new file mode 100644 index 0000000..5d83f78 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WBreak__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush-members.html new file mode 100644 index 0000000..a4698c1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush-members.html @@ -0,0 +1,89 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WBrush Member List

+
+
+This is the complete list of members for Wt::WBrush, including all inherited members. + + + + + + + + + + + +
color() const Wt::WBrush
operator!=(const WBrush &other) const Wt::WBrush
operator==(const WBrush &other) const Wt::WBrush
setColor(const WColor &color)Wt::WBrush
setStyle(WBrushStyle style)Wt::WBrush
style() const Wt::WBrush
WBrush()Wt::WBrush
WBrush(WBrushStyle style)Wt::WBrush
WBrush(const WColor &color)Wt::WBrush
WBrush(GlobalColor color)Wt::WBrush
WBrushStyle enum nameWt::WBrush [related]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush.html new file mode 100644 index 0000000..d89a57d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WBrush.html @@ -0,0 +1,332 @@ + + + + +Wt: Wt::WBrush Class Reference + + + + + + + + + +
+ +
+

Wt::WBrush Class Reference
+ +[Painting system] +

+
+
+ +

Class that defines the style for filling areas. +More...

+ +

#include <Wt/WBrush>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WBrush ()
 Creates a brush.
 WBrush (WBrushStyle style)
 Creates a black brush with given style.
 WBrush (const WColor &color)
 Creates a solid brush of a given color.
 WBrush (GlobalColor color)
 Creates a solid brush with a particular standard color.
bool operator== (const WBrush &other) const
 Comparison operator.
bool operator!= (const WBrush &other) const
 Comparison operator.
void setStyle (WBrushStyle style)
 Sets the brush style.
WBrushStyle style () const
 Returns the fill style.
void setColor (const WColor &color)
 Sets the brush color.
const WColorcolor () const
 Returns the brush color.

+Related Functions

(Note that these are not member functions.)

+
enum  WBrushStyle { NoBrush = 0, +SolidPattern = 1 + }
 

Enumeration that indicates a fill style.

+ More...
+

Detailed Description

+

Class that defines the style for filling areas.

+

A brush defines the properties of how areas (the interior of shapes) are filled. A brush is defined using a color and a fill type (currently only solid fills are supported).

+
See also:
WPainter::setBrush(), WPen
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WBrush::WBrush ( )
+
+
+ +

Creates a brush.

+

Creates a brush with a NoBrush fill style.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WBrush::WBrush (WBrushStyle  style )
+
+
+ +

Creates a black brush with given style.

+

Creates a black brush with the indicated style.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WBrush::WBrush (const WColor color )
+
+
+ +

Creates a solid brush of a given color.

+

Creates a solid brush with the indicated color.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WBrush::WBrush (GlobalColor  color )
+
+
+ +

Creates a solid brush with a particular standard color.

+

Creates a solid brush with the indicated color.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WColor& Wt::WBrush::color ( ) const
+
+
+ +

Returns the brush color.

+
See also:
color()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WBrush::operator!= (const WBrush other ) const
+
+
+ +

Comparison operator.

+

Returns true if the brushes are different.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WBrush::operator== (const WBrush other ) const
+
+
+ +

Comparison operator.

+

Returns true if the brushes are exactly the same.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBrush::setColor (const WColor color )
+
+
+ +

Sets the brush color.

+
See also:
color()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WBrush::setStyle (WBrushStyle  style )
+
+
+ +

Sets the brush style.

+
See also:
style()
+ +
+
+ +
+
+ + + + + + + +
WBrushStyle Wt::WBrush::style ( ) const
+
+
+ +

Returns the fill style.

+
See also:
setStyle(WBrushStyle)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup-members.html new file mode 100644 index 0000000..c649d83 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup-members.html @@ -0,0 +1,111 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WButtonGroup Member List

+
+
+This is the complete list of members for Wt::WButtonGroup, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addButton(WRadioButton *button, int id=-1)Wt::WButtonGroup
addButton(Ext::RadioButton *button, int id=-1)Wt::WButtonGroup
addChild(WObject *child)Wt::WObject
button(int id) const Wt::WButtonGroup
buttons() const Wt::WButtonGroup
checkedButton() const Wt::WButtonGroup
checkedChanged()Wt::WButtonGroup
checkedId() const Wt::WButtonGroup
children() const Wt::WObject
count() const Wt::WButtonGroup
getStateless(Method method)Wt::WObject [protected, virtual]
id(WRadioButton *button) const Wt::WButtonGroup
id() const Wt::WButtonGroup [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeButton(WRadioButton *button)Wt::WButtonGroup
removeButton(Ext::RadioButton *button)Wt::WButtonGroup
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
selectedButtonIndex() const Wt::WButtonGroup
sender()Wt::WObject [protected, static]
setCheckedButton(WRadioButton *button)Wt::WButtonGroup
setObjectName(const std::string &name)Wt::WObject
setSelectedButtonIndex(int idx)Wt::WButtonGroup
WButtonGroup(WObject *parent=0)Wt::WButtonGroup
WObject(WObject *parent=0)Wt::WObject
~WButtonGroup()Wt::WButtonGroup
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup.html new file mode 100644 index 0000000..ee42250 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup.html @@ -0,0 +1,476 @@ + + + + +Wt: Wt::WButtonGroup Class Reference + + + + + + + + + +
+ +
+

Wt::WButtonGroup Class Reference

+
+
+ +

A class for grouping radio buttons logically together. +More...

+ +

#include <Wt/WButtonGroup>

+
+Inheritance diagram for Wt::WButtonGroup:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WButtonGroup (WObject *parent=0)
 Creates a new empty button group.
 ~WButtonGroup ()
 Destructor.
void addButton (WRadioButton *button, int id=-1)
 Adds a radio button to the group.
void addButton (Ext::RadioButton *button, int id=-1)
 Adds a radio button to the group.
void removeButton (WRadioButton *button)
 Removes a radio button from the group.
void removeButton (Ext::RadioButton *button)
 Removes a radio button from the group.
WRadioButtonbutton (int id) const
 Returns the button for the given id.
int id (WRadioButton *button) const
 Returns the id for the given button.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
+std::vector< WRadioButton * > buttons () const
 Returns the buttons in this group.
+int count () const
 Returns the number of radiobuttons in this group.
int checkedId () const
 Returns the id of the checked button.
void setCheckedButton (WRadioButton *button)
 Sets the currently checked radiobutton.
WRadioButtoncheckedButton () const
 Returns the checked radiobutton.
void setSelectedButtonIndex (int idx)
 Sets the currently checked radiobutton.
int selectedButtonIndex () const
 Returns the index of the checked radiobutton.
Signal< WRadioButton * > & checkedChanged ()
 Signal emitted when a button was checked.
+

Detailed Description

+

A class for grouping radio buttons logically together.

+

A button group manages a set of radio buttons, making them exclusive of each other.

+

It is not a widget, but instead provides only a logical grouping. Radio buttons are aware of the group in which they have been added, see WRadioButton::group(). When a button is deleted, it is automatically removed its button group.

+

It allows you to associate id's with each button, which you may use to identify a particular button. The special value of -1 is reserved to indicate no button.

+

Usage example:

+
 enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
+
+ // use a group box as widget container for 3 radio buttons, with a title
+ Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
+
+ // use a button group to logically group the 3 options
+ Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
+
+ Wt::WRadioButton *button;
+ button = new Wt::WRadioButton("I voted Republican", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Republican);
+
+ button = new Wt::WRadioButton("I voted Democrat", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Democrate);
+
+ button = new Wt::WRadioButton("I didn't vote", container);
+ new Wt::WBreak(container);
+ group->addButton(button, NoVote);
+
+ group->setCheckedButton(group->button(NoVote));
+
See also:
WRadioButton, Ext::RadioButton
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WButtonGroup::~WButtonGroup ( )
+
+
+ +

Destructor.

+

This does not delete the radio buttons, but simply removes them from the group.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WButtonGroup::addButton (WRadioButton button,
int  id = -1 
)
+
+
+ +

Adds a radio button to the group.

+

You can assign an id to the button. If id is -1, then a unique id will be generated.

+
See also:
removeButton(WRadioButton *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WButtonGroup::addButton (Ext::RadioButton button,
int  id = -1 
)
+
+
+ +

Adds a radio button to the group.

+

You can assign an id to the button. If id is -1, then a unique id will be generated.

+
See also:
removeButton(Ext::RadioButton *)
+ +
+
+ +
+
+ + + + + + + + +
WRadioButton * Wt::WButtonGroup::button (int  id ) const
+
+
+ +

Returns the button for the given id.

+
See also:
id(), addButton()
+ +
+
+ +
+
+ + + + + + + +
WRadioButton * Wt::WButtonGroup::checkedButton ( ) const
+
+
+ +

Returns the checked radiobutton.

+

If there is no radiobutton currently checked this function returns 0.

+
See also:
setCheckedButton(), selectedButtonIndex()
+ +
+
+ +
+
+ + + + + + + +
Signal< WRadioButton * > & Wt::WButtonGroup::checkedChanged ( )
+
+
+ +

Signal emitted when a button was checked.

+

The argument passed is the new checkedButton().

+ +
+
+ +
+
+ + + + + + + +
int Wt::WButtonGroup::checkedId ( ) const
+
+
+ +

Returns the id of the checked button.

+

Returns the id of the currently checked button, or -1 if no button is currently checked.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WButtonGroup::id (WRadioButton button ) const
+
+
+ +

Returns the id for the given button.

+
See also:
button(), addButton()
+ +
+
+ +
+
+ + + + + + + +
virtual const std::string Wt::WButtonGroup::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WButtonGroup::removeButton (Ext::RadioButton button )
+
+
+ +

Removes a radio button from the group.

+
See also:
addButton(Ext::RadioButton *, int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WButtonGroup::removeButton (WRadioButton button )
+
+
+ +

Removes a radio button from the group.

+
See also:
addButton(WRadioButton *, int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WButtonGroup::selectedButtonIndex ( ) const
+
+
+ +

Returns the index of the checked radiobutton.

+

The index reflects the order in which the buttons have been added to the button group. Use checkedId() if you want to know the id of the button that is currently checked. If there is no radiobutton selected this function returns -1.

+
See also:
checkedId()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WButtonGroup::setCheckedButton (WRadioButton button )
+
+
+ +

Sets the currently checked radiobutton.

+

The button button of this group is checked. A value of 0 will uncheck all radiobuttons.

+

Initially, no button is checked.

+
See also:
checkedId()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WButtonGroup::setSelectedButtonIndex (int  idx )
+
+
+ +

Sets the currently checked radiobutton.

+

Sets the idx'th radiobutton checked. A value of -1 will uncheck all radiobuttons.

+

Initially, no button is checked.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.map new file mode 100644 index 0000000..0602f94 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.md5 new file mode 100644 index 0000000..53b715b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.md5 @@ -0,0 +1 @@ +4318b059589a10f59e4fe35b2546fa09 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.png new file mode 100644 index 0000000..f2b71c5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WButtonGroup__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar-members.html new file mode 100644 index 0000000..b6b79e6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar-members.html @@ -0,0 +1,211 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCalendar Member List

+
+
+This is the complete list of members for Wt::WCalendar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::WCalendar
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
bottom() const Wt::WCalendar
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
browseTo(const WDate &date)Wt::WCalendar
browseToNextMonth()Wt::WCalendar
browseToNextYear()Wt::WCalendar
browseToPreviousMonth()Wt::WCalendar
browseToPreviousYear()Wt::WCalendar
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSelection()Wt::WCalendar
clearSides() const Wt::WCompositeWidget [virtual]
clicked()Wt::WCalendar
currentMonth() const Wt::WCalendar
currentPageChanged()Wt::WCalendar
currentYear() const Wt::WCalendar
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
horizontalHeaderFormat()Wt::WCalendar
HorizontalHeaderFormat enum nameWt::WCalendar
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelected(const WDate &date) const Wt::WCalendar [protected]
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
LongDayNames enum valueWt::WCalendar
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
renderCell(WWidget *widget, const WDate &date)Wt::WCalendar [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
select(const WDate &date)Wt::WCalendar
select(const std::set< WDate > &dates)Wt::WCalendar
selected()Wt::WCalendar
selection() const Wt::WCalendar
selectionChanged()Wt::WCalendar
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setBottom(const WDate &bottom)Wt::WCalendar
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDayOfWeekLength(int chars)Wt::WCalendar
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFirstDayOfWeek(int dayOfWeek)Wt::WCalendar
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setHorizontalHeaderFormat(HorizontalHeaderFormat format)Wt::WCalendar
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMultipleSelection(bool multiple)Wt::WCalendar
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setSelectionMode(SelectionMode mode)Wt::WCalendar
setSingleClickSelect(bool single)Wt::WCalendar
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setTop(const WDate &top)Wt::WCalendar
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
ShortDayNames enum valueWt::WCalendar
show()Wt::WWidget
SingleLetterDayNames enum valueWt::WCalendar
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
top() const Wt::WCalendar
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCalendar(WContainerWidget *parent=0)Wt::WCalendar
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar.html new file mode 100644 index 0000000..8aa4ccb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar.html @@ -0,0 +1,820 @@ + + + + +Wt: Wt::WCalendar Class Reference + + + + + + + + + +
+ +
+

Wt::WCalendar Class Reference

+
+
+ +

A calendar. +More...

+ +

#include <Wt/WCalendar>

+
+Inheritance diagram for Wt::WCalendar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  HorizontalHeaderFormat { SingleLetterDayNames, +ShortDayNames, +LongDayNames + }
 

The format of the horizontal header.

+ More...

+Public Member Functions

 WCalendar (WContainerWidget *parent=0)
 Creates a new calendar.
void setSelectionMode (SelectionMode mode)
 Sets the selection mode.
void browseToPreviousYear ()
 Browses to the same month in the previous year.
void browseToPreviousMonth ()
 Browses to the previous month.
void browseToNextYear ()
 Browses to the same month in the next year.
void browseToNextMonth ()
 Browses to the next month.
void browseTo (const WDate &date)
 Browses to a date.
int currentMonth () const
 Returns the current month displayed.
int currentYear () const
 Returns the current year displayed.
void clearSelection ()
 Clears the current selection.
void select (const WDate &date)
 Selects a date.
void select (const std::set< WDate > &dates)
 Selects multiple dates.
void setHorizontalHeaderFormat (HorizontalHeaderFormat format)
 Sets the horizontal header format.
HorizontalHeaderFormat horizontalHeaderFormat ()
 Returns the horizontal header format.
void setFirstDayOfWeek (int dayOfWeek)
 Sets the first day of the week.
const std::set< WDate > & selection () const
 Returns the current selection.
SignalselectionChanged ()
 Signal emitted when the user changes the selection.
Signal< WDate > & activated ()
 Signal emitted when the user double-clicks a date.
Signal< WDate > & clicked ()
 Signal emitted when the user clicks a date.
Signal< int, int > & currentPageChanged ()
 Signal emitted when the current month is changed.
void setMultipleSelection (bool multiple)
 Configures single or multiple selection mode ( deprecated ).
Signal< WDate > & selected ()
 Signal emitted when the user has double clicked on a date (deprecated).
void setSingleClickSelect (bool single)
 Configures the calendar to use single click for activation (deprecated)
void setDayOfWeekLength (int chars)
 Sets the length for the abbreviated day of week ( deprecated ).
void setBottom (const WDate &bottom)
 Sets the bottom of the valid date range.
+const WDatebottom () const
 Returns the bottom date of the valid range.
void setTop (const WDate &top)
 Sets the top of the valid date range.
+const WDatetop () const
 Returns the top date of the valid range.

+Protected Member Functions

virtual WWidgetrenderCell (WWidget *widget, const WDate &date)
 Creates or updates a widget that renders a cell.
bool isSelected (const WDate &date) const
 Returns whether a date is selected.
+

Detailed Description

+

A calendar.

+

The calendar provides navigation by month and year, and indicates the current day.

+

You can listen for single click or double click events on a calendar cell using the clicked() and activated() methods.

+

The calendar may be configured to allow selection of single or multiple days using setSelectionMode(), and you may listen for changes in the selection using the selectionChanged() signals. Selection can also be entirely disabled in which case you can implement your own selection handling by listening for cell click events.

+

Cell rendering may be customized by reimplementing renderCell().

+

Internationalization is provided by the internationalization features of the Wt::WDate class.

+

Usage example:

+
 Wt::WDate today = Wt::WDate::currentDate();
+
+ Wt::WCalendar *calendar = new Wt::WCalendar(this);
+ calendar->browseTo(today.addMonths(1));
+ calendar->select(today.addMonths(1).addDays(3));
+ calendar->selected().connect(this, &MyWidget::daySelected);
+

Here is a snapshot, taken on 19/01/2010 (shown as today), and 14/01/2010 currently selected.

+ + + +
+WCalendar-default-1.png +

WCalendar with default look

+
+WCalendar-polished-1.png +

WCalendar with polished look

+
+

CSS

+

The calendar is styled by the current CSS theme. The look can be overridden using the Wt-calendar CSS class and the following selectors:

+
+.Wt-cal table       : The table
+.Wt-cal table.d1    : The table (single letter day headers)
+.Wt-cal table.d3    : The table (three letter day headers)
+.Wt-cal table.dlong : The table (long day headers)
+
+.Wt-cal caption	    : The caption (containing the navigation buttons)
+.Wt-cal-year        : The caption year in-place-edit
+
+.Wt-cal th          : Header cell (week day)
+
+.Wt-cal td          : Day cell
+.Wt-cal-oom         : Out-of-month day
+.Wt-cal-oor         : Out-of-range day (day < bottom or day > top)
+.Wt-cal-sel         : Selected day
+.Wt-cal-now         : Today day
+

Member Enumeration Documentation

+ +
+ +
+ +

The format of the horizontal header.

+
Enumerator:
+ + + +
SingleLetterDayNames  +

First letter of a day (e.g. 'M' for Monday)

+
ShortDayNames  +

First 3 letters of a day (e.g. 'Mon' for Monday)

+
LongDayNames  +

Full day name.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WCalendar::WCalendar (WContainerWidget parent = 0 )
+
+
+ +

Creates a new calendar.

+

Constructs a new calendar with English day/month names. The calendar shows the current day, and has an empty selection.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<WDate>& Wt::WCalendar::activated ( )
+
+
+ +

Signal emitted when the user double-clicks a date.

+

You may want to connect to this signal to treat a double click as the selection of a date.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::browseTo (const WDate date )
+
+
+ +

Browses to a date.

+

Displays the month which contains the given date. This does not change the current selection.

+

This will emit the currentPageChanged() signal if another month is displayed.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCalendar::browseToNextMonth ( )
+
+
+ +

Browses to the next month.

+

Displays the next month. This does not change the current selection.

+

This will emit the currentPageChanged() singal.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCalendar::browseToNextYear ( )
+
+
+ +

Browses to the same month in the next year.

+

Displays the same month in the next year. This does not change the current selection.

+

This will emit the currentPageChanged() singal.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCalendar::browseToPreviousMonth ( )
+
+
+ +

Browses to the previous month.

+

Displays the previous month. This does not affect the selection.

+

This will emit the currentPageChanged() singal.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCalendar::browseToPreviousYear ( )
+
+
+ +

Browses to the same month in the previous year.

+

Displays the same month in the previous year. This does not affect the selection.

+

This will emit the currentPageChanged() singal.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCalendar::clearSelection ( )
+
+
+ +

Clears the current selection.

+

Clears the current selection. Will result in a selection() that is empty().

+ +
+
+ +
+
+ + + + + + + +
Signal<WDate>& Wt::WCalendar::clicked ( )
+
+
+ +

Signal emitted when the user clicks a date.

+

You may want to connect to this signal if you want to provide a custom selection handling.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WCalendar::currentMonth ( ) const
+
+
+ +

Returns the current month displayed.

+

Returns the month (1-12) that is currently displayed.

+ +
+
+ +
+
+ + + + + + + +
Signal<int, int>& Wt::WCalendar::currentPageChanged ( )
+
+
+ +

Signal emitted when the current month is changed.

+

The method is emitted both when the change is done through the user interface or via the public API. The two parameters are respectively the new year and month.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WCalendar::currentYear ( ) const
+
+
+ +

Returns the current year displayed.

+

Returns the year that is currently displayed.

+ +
+
+ +
+
+ + + + + + + +
HorizontalHeaderFormat Wt::WCalendar::horizontalHeaderFormat ( )
+
+
+ +

Returns the horizontal header format.

+
See also:
setHorizontalHeaderFormat()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WCalendar::isSelected (const WDate date ) const [protected]
+
+
+ +

Returns whether a date is selected.

+

This is a convenience method that can be used when reimplementing renderCell().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WWidget * Wt::WCalendar::renderCell (WWidget widget,
const WDate date 
) [protected, virtual]
+
+
+ +

Creates or updates a widget that renders a cell.

+

The default implementation creates a WText

+

You may want to reimplement this method if you wish to customize how a cell is rendered. When widget is 0, a new widget should be created and returned. Otherwise, you may either modify the passed widget, or return a new widget. If you return a new widget, the prevoius widget will be deleted.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::select (const WDate date )
+
+
+ +

Selects a date.

+

Select one date. Both in single or multiple selection mode, this results in a selection() that contains exactly one date.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::select (const std::set< WDate > &  dates )
+
+
+ +

Selects multiple dates.

+

Select multiple dates. In multiple selection mode, this results in a selection() that contains exactly the given dates. In single selection mode, at most one date is set.

+ +
+
+ +
+
+ + + + + + + +
Signal<WDate>& Wt::WCalendar::selected ( )
+
+
+ +

Signal emitted when the user has double clicked on a date (deprecated).

+

This signal indicates that he user has selected a new date, which is only available when in single selection mode.

+
Deprecated:
use activated() instead.
+ +
+
+ +
+
+ + + + + + + +
const std::set<WDate>& Wt::WCalendar::selection ( ) const
+
+
+ +

Returns the current selection.

+

Returns the set of dates currently selected. In single selection mode, this set contains 0 or 1 dates.

+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WCalendar::selectionChanged ( )
+
+
+ +

Signal emitted when the user changes the selection.

+

Emitted after the user has changed the current selection.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setBottom (const WDate bottom )
+
+
+ +

Sets the bottom of the valid date range.

+

The default is a null date constructed using WDate().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setDayOfWeekLength (int  chars )
+
+
+ +

Sets the length for the abbreviated day of week ( deprecated ).

+

The chars may be 1 or 3, which render "Monday" as respectively "M" or "Mon".

+

The default length is 3.

+
Deprecated:
use setHorizontalHeaderFormat() instead.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setFirstDayOfWeek (int  dayOfWeek )
+
+
+ +

Sets the first day of the week.

+

Possible values or 1 to 7, as accepted by WDate::shortDayName().

+

The default value is 1 ("Monday").

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setHorizontalHeaderFormat (HorizontalHeaderFormat  format )
+
+
+ +

Sets the horizontal header format.

+

The default horizontal header format is WCalendar::ShortDayNames.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setMultipleSelection (bool  multiple )
+
+
+ +

Configures single or multiple selection mode ( deprecated ).

+

In single selection mode, only one date may be selected: the selection() will be empty or contain exactly one item.

+
Deprecated:
use setSelectionMode() instead.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setSelectionMode (SelectionMode  mode )
+
+
+ +

Sets the selection mode.

+

The default selection mode is SingleSelection.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setSingleClickSelect (bool  single )
+
+
+ +

Configures the calendar to use single click for activation (deprecated)

+

By default, double click will trigger activate(). Use this method if you want a single click to trigger activate() (and the now deprecated selected() method). This only applies to a single-selection calendar.

+
Deprecated:
listen to the clicked() signal if you want to react to a single click, or activated() signal if you want to react to a double click.
+
See also:
setMultipleSelection()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCalendar::setTop (const WDate top )
+
+
+ +

Sets the top of the valid date range.

+

The default is a null date constructed using WDate().

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.md5 new file mode 100644 index 0000000..371bf69 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.md5 @@ -0,0 +1 @@ +3588ec655b2ebd67dc103927bfe4fdcb \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.png new file mode 100644 index 0000000..ccc51e2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCalendar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice-members.html new file mode 100644 index 0000000..a47a9bb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice-members.html @@ -0,0 +1,119 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCanvasPaintDevice Member List

+
+
+This is the complete list of members for Wt::WCanvasPaintDevice, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
children() const Wt::WObject
clear()Wt::WCanvasPaintDevice [protected, virtual]
Clipping enum valueWt::WPaintDevice
done()Wt::WCanvasPaintDevice [virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)Wt::WCanvasPaintDevice [virtual]
drawImage(const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)Wt::WCanvasPaintDevice [virtual]
drawLine(double x1, double y1, double x2, double y2)Wt::WCanvasPaintDevice [virtual]
drawPath(const WPainterPath &path)Wt::WCanvasPaintDevice [virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)Wt::WCanvasPaintDevice [virtual]
Font enum valueWt::WPaintDevice
getStateless(Method method)Wt::WObject [protected, virtual]
height() const Wt::WCanvasPaintDevice [virtual]
Hints enum valueWt::WPaintDevice
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
init()Wt::WCanvasPaintDevice [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
paintActive() const Wt::WCanvasPaintDevice [virtual]
painter() const Wt::WCanvasPaintDevice [protected, virtual]
parent() const Wt::WObject
Pen enum valueWt::WPaintDevice
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged(WFlags< ChangeFlag > flags)Wt::WCanvasPaintDevice [virtual]
setObjectName(const std::string &name)Wt::WObject
setPainter(WPainter *painter)Wt::WCanvasPaintDevice [protected, virtual]
Shadow enum valueWt::WPaintDevice
Transform enum valueWt::WPaintDevice
WCanvasPaintDevice(const WLength &width, const WLength &height, WObject *parent=0)Wt::WCanvasPaintDevice
width() const Wt::WCanvasPaintDevice [virtual]
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice.html new file mode 100644 index 0000000..15dcb5b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice.html @@ -0,0 +1,492 @@ + + + + +Wt: Wt::WCanvasPaintDevice Class Reference + + + + + + + + + +
+ +
+

Wt::WCanvasPaintDevice Class Reference
+ +[Painting system] +

+
+
+ +

A paint device for rendering using the HTML 5 <canvas> element. +More...

+ +

#include <Wt/WCanvasPaintDevice>

+
+Inheritance diagram for Wt::WCanvasPaintDevice:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WCanvasPaintDevice (const WLength &width, const WLength &height, WObject *parent=0)
 Create a canvas paint device.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
virtual void drawPath (const WPainterPath &path)
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
virtual void init ()
 Initializes the device for painting.
virtual void done ()
 Finishes painting on the device.
virtual bool paintActive () const
 Returns whether painting is active.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.

+Protected Member Functions

virtual WPainterpainter () const
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)
 Sets the painter.
+virtual void clear ()
 Clears the paint device.
+

Detailed Description

+

A paint device for rendering using the HTML 5 <canvas> element.

+

The WCanvasPaintDevice is used by WPaintedWidget to render to the browser using the HTML 5 <canvas> element. You usually will not use the device directly, but rather rely on WPaintedWidget to use this device when appropriate.

+
Note:
Older browsers do not have text support in <canvas>. Text is then rendered in an overlayed DIV and a consequence text is not subject to rotation and scaling components of the current transformation (but does take into account translation). On most browser you can use the WSvgImage or WVmlImage paint devices which do support text natively.
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WCanvasPaintDevice::done ( ) [virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WCanvasPaintDevice::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WCanvasPaintDevice::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WCanvasPaintDevice::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCanvasPaintDevice::drawPath (const WPainterPath path ) [virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WCanvasPaintDevice::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WCanvasPaintDevice::height ( ) const [virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCanvasPaintDevice::init ( ) [virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WCanvasPaintDevice::paintActive ( ) const [virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WCanvasPaintDevice::painter ( ) const [protected, virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCanvasPaintDevice::setChanged (WFlags< ChangeFlag flags ) [virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WCanvasPaintDevice::width ( ) const [virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.map new file mode 100644 index 0000000..53e2064 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.md5 new file mode 100644 index 0000000..a45793f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.md5 @@ -0,0 +1 @@ +4c9fe3437d3afda641e065ee8db5c2f1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.png new file mode 100644 index 0000000..a570b91 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCanvasPaintDevice__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox-members.html new file mode 100644 index 0000000..043ed2e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCheckBox Member List

+
+
+This is the complete list of members for Wt::WCheckBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
checked()Wt::WAbstractToggleButton
checkState()Wt::WCheckBox
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WAbstractToggleButton [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::WAbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isTristate() const Wt::WCheckBox
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool checked)Wt::WAbstractToggleButton
setChecked()Wt::WAbstractToggleButton [virtual]
setCheckState(CheckState state)Wt::WCheckBox
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WAbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setTristate(bool tristate=true)Wt::WCheckBox
setUnChecked()Wt::WAbstractToggleButton [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WAbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::WAbstractToggleButton
validate()Wt::WFormWidget [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WAbstractToggleButton(WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WAbstractToggleButton(const WString &text, WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WCheckBox(WContainerWidget *parent=0)Wt::WCheckBox
WCheckBox(const WString &text, WContainerWidget *parent=0)Wt::WCheckBox
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WAbstractToggleButton()Wt::WAbstractToggleButton [virtual]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox.html new file mode 100644 index 0000000..0838fd7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox.html @@ -0,0 +1,219 @@ + + + + +Wt: Wt::WCheckBox Class Reference + + + + + + + + + +
+ +
+

Wt::WCheckBox Class Reference

+
+
+ +

A user control that represents a check box. +More...

+ +

#include <Wt/WCheckBox>

+
+Inheritance diagram for Wt::WCheckBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

WCheckBox (WContainerWidget *parent=0)
 Creates a checkbox with empty label.
WCheckBox (const WString &text, WContainerWidget *parent=0)
 Creates a checkbox with given label.
void setTristate (bool tristate=true)
 Makes a tristate checkbox.
bool isTristate () const
 Returns whether the checkbox is tristate.
void setCheckState (CheckState state)
 Sets the check state.
CheckState checkState ()
 Returns the check state.
+

Detailed Description

+

A user control that represents a check box.

+

By default, a checkbox can have two states: Wt::Checked or Wt::Unchecked, which can be inspected using isChecked(), and set using setChecked().

+

A checkbox may also provide a third state, Wt::PartiallyChecked, which is useful to indicate that it is neither checked or unchecked. Wt will use native browser support for this HTML5 extension when available (Safari and MS IE), and use an image-based workaround otherwise. You may enable support for the third state using setTristate(), and use setCheckState() and checkState() to read all three states.

+

A label is added as a sibling of the checkbox to the same parent.

+

Usage example:

+
 Wt::WGroupBox *box = new Wt::WGroupBox("In-flight options");
+
+ Wt::WCheckBox *w1 = new Wt::WCheckBox("Vegetarian diet", box);
+ box->addWidget(new WBreak());
+ Wt::WCheckBox *w2 = new Wt::WCheckBox("WIFI access", box);
+ box->addWidget(new WBreak());
+ Wt::WCheckBox *w3 = new Wt::WCheckBox("AC plug", box);
+
+ w1->setChecked(false);
+ w2->setChecked(true);
+ w3->setChecked(true);
+

WCheckBox is an inline widget.

+

CSS

+

This widget corresponds to the HTML <input type="checkbox"> tag. Depending on whether a text is included, it may be nested in a <span> tag which also includes a rendered WLabel. This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+
See also:
WAbstractToggleButton
+

Member Function Documentation

+ +
+
+ + + + + + + +
CheckState Wt::WCheckBox::checkState ( )
+
+
+ +

Returns the check state.

+
See also:
setCheckState(), isChecked()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCheckBox::isTristate ( ) const
+
+
+ +

Returns whether the checkbox is tristate.

+
See also:
setTristate()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCheckBox::setCheckState (CheckState  state )
+
+
+ +

Sets the check state.

+

Unless it is a tri-state checkbox, only Wt::Checked and Wt::Unchecked are valid states.

+ +

Reimplemented from Wt::WAbstractToggleButton.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCheckBox::setTristate (bool  tristate = true )
+
+
+ +

Makes a tristate checkbox.

+
Note:
You should enable tristate functionality right after construction and this cannot be modified later.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.map new file mode 100644 index 0000000..c169ba2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.md5 new file mode 100644 index 0000000..d92bd65 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.md5 @@ -0,0 +1 @@ +3bd597dca8523c8bfd06a9c0d3732628 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.png new file mode 100644 index 0000000..131fb9a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCheckBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea-members.html new file mode 100644 index 0000000..15c01c4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea-members.html @@ -0,0 +1,137 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCircleArea Member List

+
+
+This is the complete list of members for Wt::WCircleArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
alternateText() const Wt::WAbstractArea
centerX() const Wt::WCircleArea
centerY() const Wt::WCircleArea
children() const Wt::WObject
clicked()Wt::WAbstractArea
cursor() const Wt::WAbstractArea
doubleClicked()Wt::WAbstractArea
enterPressed()Wt::WAbstractArea
escapePressed()Wt::WAbstractArea
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isHole() const Wt::WAbstractArea
keyPressed()Wt::WAbstractArea
keyWentDown()Wt::WAbstractArea
keyWentUp()Wt::WAbstractArea
Method typedefWt::WObject
mouseDragged()Wt::WAbstractArea
mouseMoved()Wt::WAbstractArea
mouseWentDown()Wt::WAbstractArea
mouseWentOut()Wt::WAbstractArea
mouseWentOver()Wt::WAbstractArea
mouseWentUp()Wt::WAbstractArea
mouseWheel()Wt::WAbstractArea
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
radius() const Wt::WCircleArea
ref() const Wt::WAbstractArea
removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resource() const Wt::WAbstractArea
sender()Wt::WObject [protected, static]
setAlternateText(const WString &text)Wt::WAbstractArea
setCenter(const WPoint &point)Wt::WCircleArea
setCenter(const WPointF &point)Wt::WCircleArea
setCenter(int x, int y)Wt::WCircleArea
setCursor(Cursor cursor)Wt::WAbstractArea
setHole(bool hole)Wt::WAbstractArea
setObjectName(const std::string &name)Wt::WObject
setRadius(int radius)Wt::WCircleArea
setRef(const std::string &ref)Wt::WAbstractArea
setResource(WResource *resource)Wt::WAbstractArea
setStyleClass(const WString &styleClass)Wt::WAbstractArea
setTarget(AnchorTarget target)Wt::WAbstractArea
setToolTip(const WString &text)Wt::WAbstractArea
styleClass() const Wt::WAbstractArea
target() const Wt::WAbstractArea
toolTip() const Wt::WAbstractArea
WCircleArea()Wt::WCircleArea
WCircleArea(int x, int y, int radius)Wt::WCircleArea
WObject(WObject *parent=0)Wt::WObject
~WAbstractArea()Wt::WAbstractArea [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea.html new file mode 100644 index 0000000..b5d0d95 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea.html @@ -0,0 +1,196 @@ + + + + +Wt: Wt::WCircleArea Class Reference + + + + + + + + + +
+ +
+

Wt::WCircleArea Class Reference

+
+
+ +

A interactive area in a widget, specified by a circle. +More...

+ +

#include <Wt/WCircleArea>

+
+Inheritance diagram for Wt::WCircleArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WCircleArea ()
 Default constructor.
 WCircleArea (int x, int y, int radius)
 Creates a circular area with given geometry.
+void setCenter (const WPoint &point)
 Sets the center.
+void setCenter (const WPointF &point)
 Sets the center.
+void setCenter (int x, int y)
 Sets the center.
+int centerX () const
 Returns the center X coordinate.
+int centerY () const
 Returns the center Y coordinate.
+void setRadius (int radius)
 Sets the radius.
+int radius () const
 Returns the radius.
+

Detailed Description

+

A interactive area in a widget, specified by a circle.

+

The area may be added to a WImage or WPaintedWidget to provide interactivity on a circular area of the image. The circle is specified in pixel coordinates.

+

Usage example:

+
 Wt::WImage *image = new Wt::WImage("images/events.png", this);
+ Wt::WCircleArea *area = new Wt::WCircleArea(20, 30, 15);
+ image->addArea(area);
+
+ area->clicked().connect(this, &MyWidget::areaClicked);
+
See also:
WImage::addArea(), WPaintedWidget::addArea()
+
+WRectArea, WPolygonArea
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WCircleArea::WCircleArea ( )
+
+
+ +

Default constructor.

+

Specifies a circular area with center (0, 0) and radius 0.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WCircleArea::WCircleArea (int  x,
int  y,
int  radius 
)
+
+
+ +

Creates a circular area with given geometry.

+

The arguments are in pixel units.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.map new file mode 100644 index 0000000..8072d0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.md5 new file mode 100644 index 0000000..1c62cd0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.md5 @@ -0,0 +1 @@ +a400e6da3646f5c8dbfeddc1d0af8901 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.png new file mode 100644 index 0000000..f48c99c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCircleArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WColor-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WColor-members.html new file mode 100644 index 0000000..e14bd72 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WColor-members.html @@ -0,0 +1,92 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WColor Member List

+
+
+This is the complete list of members for Wt::WColor, including all inherited members. + + + + + + + + + + + + + + +
alpha() const Wt::WColor
blue() const Wt::WColor
green() const Wt::WColor
isDefault() const Wt::WColor
name() const Wt::WColor
operator!=(const WColor &other) const Wt::WColor
operator==(const WColor &other) const Wt::WColor
red() const Wt::WColor
setName(const WString &name)Wt::WColor
setRgb(int red, int green, int blue, int alpha=255)Wt::WColor
WColor()Wt::WColor
WColor(int red, int green, int blue, int alpha=255)Wt::WColor
WColor(const WString &name)Wt::WColor
WColor(GlobalColor name)Wt::WColor
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WColor.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WColor.html new file mode 100644 index 0000000..77c3448 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WColor.html @@ -0,0 +1,455 @@ + + + + +Wt: Wt::WColor Class Reference + + + + + + + + + +
+ +
+

Wt::WColor Class Reference
+ +[Style classesPainting system] +

+
+
+ +

A class that specifies a color. +More...

+ +

#include <Wt/WColor>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WColor ()
 Creates a default color.
 WColor (int red, int green, int blue, int alpha=255)
 Creates a color with given red/green/blue/alpha components.
 WColor (const WString &name)
 Creates a color from a CSS name.
 WColor (GlobalColor name)
 Creates a predefined color.
void setRgb (int red, int green, int blue, int alpha=255)
 Sets the red/green/blue/alpha components.
void setName (const WString &name)
 Sets the CSS name.
bool isDefault () const
 Returns if the color is the default color.
int red () const
 Returns the red component.
int green () const
 Returns the green component.
int blue () const
 Returns the blue component.
int alpha () const
 Returns the alpha component.
const WStringname () const
 Returns the CSS name.
bool operator== (const WColor &other) const
 Comparison operator.
bool operator!= (const WColor &other) const
 Comparison operator.
+

Detailed Description

+

A class that specifies a color.

+

A color corresponds to a CSS color. You can specify a color either using its red/green/blue components, or from a valid CSS name.

+

The color supports an alpha channel, which determines the degree of transparency. An alpha value of 0 is completely transparent (and thus invisible), while a value of 255 is completely opaque.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WColor::WColor ( )
+
+
+ +

Creates a default color.

+

The default color is depending on the context, another color (for example from a hierarchical parent in a widget tree), or a completely transparent color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WColor::WColor (int  red,
int  green,
int  blue,
int  alpha = 255 
)
+
+
+ +

Creates a color with given red/green/blue/alpha components.

+

All four components must be specified with a value in the range (0 - 255). The alpha channel determines the degree of transparency. An alpha value of 0 is completely transparent (and thus invisible), while a value of 255 is completely opaque.

+
See also:
setRgb(int, int, int, int)
+ +
+
+ +
+
+ + + + + + + + +
Wt::WColor::WColor (const WString name )
+
+
+ +

Creates a color from a CSS name.

+

The name may be any valid CSS color name, including names colors such as "aqua", or colors defined as RGB components.

+

In either case, the result of the methods red(), green() and blue() is undefined.

+

See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

+ +
+
+ +
+
+ + + + + + + + +
Wt::WColor::WColor (Wt::GlobalColor  name )
+
+
+ +

Creates a predefined color.

+

Constructs one of the 16 predefined Wt colors constants.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WColor::alpha ( ) const
+
+
+ +

Returns the alpha component.

+

Only available when the color was specified in terms of the RGB components using setRgb(int, int, int, int) or WColor(int, int, int, int).

+ +
+
+ +
+
+ + + + + + + +
int Wt::WColor::blue ( ) const
+
+
+ +

Returns the blue component.

+

Only available when the color was specified in terms of the RGB components using setRgb(int, int, int, int) or WColor(int, int, int, int).

+ +
+
+ +
+
+ + + + + + + +
int Wt::WColor::green ( ) const
+
+
+ +

Returns the green component.

+

Only available when the color was specified in terms of the RGB components using setRgb(int, int, int, int) or WColor(int, int, int, int).

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WColor::isDefault ( ) const
+
+
+ +

Returns if the color is the default color.

+
See also:
WColor()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WColor::name ( ) const
+
+
+ +

Returns the CSS name.

+

Only available when it was set with setName(const WString&) or WColor(const WString& name).

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WColor::operator!= (const WColor other ) const
+
+
+ +

Comparison operator.

+

Returns false if the two colors were not defined in exactly the same way. It may return return although they actually represent the same color.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WColor::operator== (const WColor other ) const
+
+
+ +

Comparison operator.

+

Returns true if the two colors were defined in exactly the same way. It may return false although they actually represent the same color.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WColor::red ( ) const
+
+
+ +

Returns the red component.

+

Only available when the color was specified in terms of the RGB components using setRgb(int, int, int, int) or WColor(int, int, int, int).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WColor::setName (const WString name )
+
+
+ +

Sets the CSS name.

+

The name may be any valid CSS color name, including names colors such as "aqua", or colors defined as RGB components.

+

In either case, the result of the methods red(), green() and blue() is undefined.

+

See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WColor::setRgb (int  red,
int  green,
int  blue,
int  alpha = 255 
)
+
+
+ +

Sets the red/green/blue/alpha components.

+

All four components must be specified with a value in the range (0 - 255). The alpha channel determines the degree of transparency. An alpha value of 0 is completely transparent (and thus invisible), while a value of 255 is completely opaque.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings-members.html new file mode 100644 index 0000000..5bfbe48 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCombinedLocalizedStrings Member List

+
+
+This is the complete list of members for Wt::WCombinedLocalizedStrings, including all inherited members. + + + + + + + +
add(WLocalizedStrings *stringResolver)Wt::WCombinedLocalizedStrings
hibernate()Wt::WCombinedLocalizedStrings [virtual]
items() const Wt::WCombinedLocalizedStrings
refresh()Wt::WCombinedLocalizedStrings [virtual]
resolveKey(const std::string &key, std::string &result)Wt::WCombinedLocalizedStrings [virtual]
WCombinedLocalizedStrings()Wt::WCombinedLocalizedStrings
~WLocalizedStrings()Wt::WLocalizedStrings [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings.html new file mode 100644 index 0000000..33fd1e9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings.html @@ -0,0 +1,239 @@ + + + + +Wt: Wt::WCombinedLocalizedStrings Class Reference + + + + + + + + + +
+ +
+

Wt::WCombinedLocalizedStrings Class Reference

+
+
+ +

A localized string resolver that bundles multiple string resolvers. +More...

+ +

#include <Wt/WCombinedLocalizedStrings>

+
+Inheritance diagram for Wt::WCombinedLocalizedStrings:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

WCombinedLocalizedStrings ()
 Constructor.
void add (WLocalizedStrings *stringResolver)
 Adds a string resolver.
const std::vector
+< WLocalizedStrings * > & 
items () const
 Returns all string resolver.
virtual void refresh ()
 Rereads the message resources.
virtual void hibernate ()
 Purges memory resources, if possible.
virtual bool resolveKey (const std::string &key, std::string &result)
 Resolves a key in the current locale.
+

Detailed Description

+

A localized string resolver that bundles multiple string resolvers.

+

This class implements the localized strings interface and delegates WString::tr() string resolution to one or more string resolvers. You will typically use this class if you want to combine different methods of string resolution (e.g. some from files, and other strings using a database).

+
See also:
WApplication::setLocalizedStrings()
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WCombinedLocalizedStrings::add (WLocalizedStrings stringResolver )
+
+
+ +

Adds a string resolver.

+

resolveKey() will consult each string resolver in the order they have been added.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCombinedLocalizedStrings::hibernate ( ) [virtual]
+
+
+ +

Purges memory resources, if possible.

+

This is called afer event handling, and is an opportunity to conserve memory inbetween events, by freeing memory used for cached key/value bindings, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented from Wt::WLocalizedStrings.

+ +
+
+ +
+
+ + + + + + + +
const std::vector< WLocalizedStrings * > & Wt::WCombinedLocalizedStrings::items ( ) const
+
+
+ +

Returns all string resolver.

+

Returns the list of all string resolvers that were added by a call to add().

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCombinedLocalizedStrings::refresh ( ) [virtual]
+
+
+ +

Rereads the message resources.

+

Purge any cached key/values, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented from Wt::WLocalizedStrings.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WCombinedLocalizedStrings::resolveKey (const std::string &  key,
std::string &  result 
) [virtual]
+
+
+ +

Resolves a key in the current locale.

+

This method is used by WString to obtain the UTF8 value corresponding to a key in the current locale.

+

Returns true if the key could be resolved. The value is written in result, encoded using UTF8.

+
See also:
WApplication::locale()
+ +

Implements Wt::WLocalizedStrings.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.map new file mode 100644 index 0000000..506ff15 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.md5 new file mode 100644 index 0000000..2dbb1b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.md5 @@ -0,0 +1 @@ +be782a5e49c7345d06878311451744fa \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.png new file mode 100644 index 0000000..afeb6a9 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCombinedLocalizedStrings__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox-members.html new file mode 100644 index 0000000..2376f26 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WComboBox Member List

+
+
+This is the complete list of members for Wt::WComboBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::WComboBox
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &text)Wt::WComboBox
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clear()Wt::WComboBox
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
count() const Wt::WComboBox
currentIndex() const Wt::WComboBox
currentText() const Wt::WComboBox
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
findText(const WString &text, WFlags< MatchFlag > flags=MatchExactly|MatchCaseSensitive)Wt::WComboBox
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertItem(int index, const WString &text)Wt::WComboBox
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
itemText(int index) const Wt::WComboBox
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::WComboBox
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WComboBox [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeItem(int index)Wt::WComboBox
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sactivated()Wt::WComboBox
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCurrentIndex(int index)Wt::WComboBox
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setItemText(int index, const WString &text)Wt::WComboBox
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::WComboBox
setModelColumn(int index)Wt::WComboBox
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WComboBox [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WComboBox(WContainerWidget *parent=0)Wt::WComboBox
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox.html new file mode 100644 index 0000000..364023b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox.html @@ -0,0 +1,494 @@ + + + + +Wt: Wt::WComboBox Class Reference + + + + + + + + + +
+ +
+

Wt::WComboBox Class Reference
+ +[Model/view system] +

+
+
+ +

A widget that provides a drop-down combo-box control. +More...

+ +

#include <Wt/WComboBox>

+
+Inheritance diagram for Wt::WComboBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WComboBox (WContainerWidget *parent=0)
 Creates an empty combo-box with optional parent.
void addItem (const WString &text)
 Adds an option item.
+int count () const
 Returns the number of items.
int currentIndex () const
 Returns the currently selected item.
void insertItem (int index, const WString &text)
 Inserts an item at the specified position.
void removeItem (int index)
 Removes the item at the specified position.
void setCurrentIndex (int index)
 Changes the current selection.
void setItemText (int index, const WString &text)
 Changes the text for a specified option.
const WString currentText () const
 Returns the text of the currently selected item.
const WString itemText (int index) const
 Returns the text of a particular item.
void setModel (WAbstractItemModel *model)
 Sets the model to be used for the items.
void setModelColumn (int index)
 Sets the column in the model to be used for the items.
WAbstractItemModelmodel () const
 Returns the data model.
+int findText (const WString &text, WFlags< MatchFlag > flags=MatchExactly|MatchCaseSensitive)
 Returns the index of the first item that matches a text.
+WValidator::State validate ()
 Validates the field.
virtual void refresh ()
 Refresh the widget.
void clear ()
 Clears all items.
Signal< int > & activated ()
 Signal emitted when the selection changed.
Signal< WString > & sactivated ()
 Signal emitted when the selection changed.
+

Detailed Description

+

A widget that provides a drop-down combo-box control.

+

A combo box provides the user with a set of options, from which one option may be selected.

+

WComboBox is an MVC view class, using a simple string list model by default. The model may be populated using addItem(const WString&) or insertItem(int, const WString&) and the contents can be cleared through clear(). These methods manipulate the underlying model().

+

To use the combo box with a custom model instead of the default WStringListModel, use setModel().

+

To react to selection events, connect to the changed(), activated() or sactivated() signals.

+

At all times, the current selection index is available through currentIndex() and the current selection text using currentText().

+

WComboBox does not have support for auto-completion, this behaviour can be found in the WSuggestionPopup.

+

Usage example:

+
 Wt::WComboBox *combo = new Wt::WComboBox(this);
+ combo->addItem("Clint Eastwood");
+ combo->addItem("Mick Jagger");
+ combo->addItem("Johnny Depp");
+ combo->addItem("Kate Winslet");
+
+ combo->setCurrentIndex(2); // Johnny Depp
+ combo->activated().connect(this, &MyWidget::comboChanged);
+

WComboBox is an inline widget.

+

CSS

+

The widget corresponds to the HTML <select> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<int>& Wt::WComboBox::activated ( )
+
+
+ +

Signal emitted when the selection changed.

+

The newly selected item is passed as an argument.

+
See also:
sactivated(), currentIndex()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WComboBox::addItem (const WString text )
+
+
+ +

Adds an option item.

+

Equivalent to insertItem (count(), text).

+ +
+
+ +
+
+ + + + + + + +
void Wt::WComboBox::clear ( )
+
+
+ +

Clears all items.

+

Removes all items from the underlying model. This requires that the model() is editable.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WComboBox::currentIndex ( ) const
+
+
+ +

Returns the currently selected item.

+

If no item is currently selected, the method returns -1.

+

The default value is 0, unless the combo box is empty.

+ +
+
+ +
+
+ + + + + + + +
const WString Wt::WComboBox::currentText ( ) const
+
+
+ +

Returns the text of the currently selected item.

+
See also:
currentIndex(), itemText(int) const
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WComboBox::insertItem (int  index,
const WString text 
)
+
+
+ +

Inserts an item at the specified position.

+

The item is inserted in the underlying model at position index. This requires that the model() is editable.

+
See also:
addItem(const WString&), removeItem(int)
+ +
+
+ +
+
+ + + + + + + + +
const WString Wt::WComboBox::itemText (int  index ) const
+
+
+ +

Returns the text of a particular item.

+
See also:
setItemText(int, const WString&), currentText()
+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::WComboBox::model ( ) const
+
+
+ +

Returns the data model.

+
See also:
setModel()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WComboBox::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WComboBox::removeItem (int  index )
+
+
+ +

Removes the item at the specified position.

+

The item is removed from the underlying model. This requires that the model() is editable.

+
See also:
insertItem(int index, const WString&), clear()
+ +
+
+ +
+
+ + + + + + + +
Signal<WString>& Wt::WComboBox::sactivated ( )
+
+
+ +

Signal emitted when the selection changed.

+

The newly selected text is passed as an argument.

+
See also:
activated(), currentText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WComboBox::setCurrentIndex (int  index )
+
+
+ +

Changes the current selection.

+

Specify a value of -1 for index to clear the selection.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WComboBox::setItemText (int  index,
const WString text 
)
+
+
+ +

Changes the text for a specified option.

+

The text for the item at position index is changed. This requires that the model() is editable.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WComboBox::setModel (WAbstractItemModel model )
+
+
+ +

Sets the model to be used for the items.

+

The model may not be 0, and ownership of the model is not transferred.

+

The default value is a WStringListModel that is owned by the combo box.

+
See also:
setModelColumn(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WComboBox::setModelColumn (int  index )
+
+
+ +

Sets the column in the model to be used for the items.

+

The column index in the model will be used to retrieve data.

+

The default value is 0.

+
See also:
setModel()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.map new file mode 100644 index 0000000..67135c1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.md5 new file mode 100644 index 0000000..54e4055 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.md5 @@ -0,0 +1 @@ +81b65900592531208c172e1f3eb57735 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.png new file mode 100644 index 0000000..78340c1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WComboBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget-members.html new file mode 100644 index 0000000..4b85293 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget-members.html @@ -0,0 +1,177 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCompositeWidget Member List

+
+
+This is the complete list of members for Wt::WCompositeWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget.html new file mode 100644 index 0000000..4648f63 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget.html @@ -0,0 +1,1823 @@ + + + + +Wt: Wt::WCompositeWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WCompositeWidget Class Reference

+
+
+ +

A widget that hides the implementation of composite widgets. +More...

+ +

#include <Wt/WCompositeWidget>

+
+Inheritance diagram for Wt::WCompositeWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WCompositeWidget (WContainerWidget *parent=0)
 Creates a WCompositeWidget.
WCompositeWidget (WWidget *implementation, WContainerWidget *parent)
 Creates a WCompositeWidget with given implementation.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
virtual void setPositionScheme (PositionScheme scheme)
 Sets the CSS position scheme.
virtual PositionScheme positionScheme () const
 Returns the CSS position scheme.
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=All)
 Sets CSS offsets for a non-statically positioned widget.
virtual WLength offset (Side s) const
 Returns a CSS offset.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
virtual WLength width () const
 Returns the width.
virtual WLength height () const
 Returns the height.
virtual void setMinimumSize (const WLength &width, const WLength &height)
 Sets a minimum size.
virtual WLength minimumWidth () const
 Returns the minimum width.
virtual WLength minimumHeight () const
 Returns the minimum height.
virtual void setMaximumSize (const WLength &width, const WLength &height)
 Sets a maximum size.
virtual WLength maximumWidth () const
 Returns the maximum width.
virtual WLength maximumHeight () const
 Returns the maximum height.
+virtual void setLineHeight (const WLength &height)
 Sets the CSS line height for contained text.
virtual WLength lineHeight () const
 Returns the CSS line height for contained text.
virtual void setFloatSide (Side s)
 Specifies a CSS float side.
virtual Side floatSide () const
 Returns the CSS float side.
virtual void setClearSides (WFlags< Side > sides)
 Sets the sides that should be cleared of floats.
virtual WFlags< SideclearSides () const
 Returns the sides that should remain empty.
virtual void setMargin (const WLength &margin, WFlags< Side > sides=All)
 Sets CSS margins around the widget.
virtual WLength margin (Side side) const
 Returns a CSS margin set.
virtual void setHiddenKeepsGeometry (bool enabled)
 Sets whether the widget keeps its geometry when hidden.
virtual bool hiddenKeepsGeometry () const
 Returns whether the widget keeps its geometry when hidden.
virtual void setHidden (bool)
 Sets whether the widget is hidden.
virtual bool isHidden () const
 Returns whether the widget is set hidden.
virtual bool isVisible () const
 Returns whether the widget is visible.
virtual void setDisabled (bool)
 Sets whether the widget is disabled.
virtual bool isDisabled () const
 Returns whether the widget is set disabled.
virtual bool isEnabled () const
 Returns whether the widget is enabled.
virtual void setPopup (bool)
 Lets the widget overlay over other sibling widgets.
virtual bool isPopup () const
 Returns whether the widget is overlayed.
virtual void setInline (bool)
 Sets whether the widget is displayed inline or as a block.
virtual bool isInline () const
 Returns whether the widget is displayed inline or as block.
virtual void setDecorationStyle (const WCssDecorationStyle &style)
 Sets a CSS decoration style.
virtual WCssDecorationStyledecorationStyle ()
 Returns the decoration style of this widget.
virtual void setStyleClass (const WString &styleClass)
 Sets (one or more) CSS style classes.
virtual WString styleClass () const
 Returns the CSS style class.
virtual void addStyleClass (const WString &styleClass, bool force=false)
 Adds a CSS style class.
virtual void removeStyleClass (const WString &styleClass, bool force=false)
 Removes a CSS style class.
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto)
 Sets the vertical alignment.
virtual AlignmentFlag verticalAlignment () const
 Returns the vertical alignment.
virtual WLength verticalAlignmentLength () const
 Returns the fixed vertical alignment that was set.
virtual void setToolTip (const WString &text)
 Sets a tooltip.
+virtual WString toolTip () const
 Returns the tooltip.
virtual void refresh ()
 Refresh the widget.
virtual void setAttributeValue (const std::string &name, const WString &value)
 Sets an attribute value.
virtual WString attributeValue (const std::string &name) const
 Returns an attribute value.
virtual void setJavaScriptMember (const std::string &name, const std::string &value)
 Sets a JavaScript member.
virtual std::string javaScriptMember (const std::string &name) const
 Returns the value of a JavaScript member.
virtual void callJavaScriptMember (const std::string &name, const std::string &args)
 Calls a JavaScript member.
virtual void load ()
 Loads content just before the widget is used.
virtual bool loaded () const
 Returns whether this widget has been loaded.
virtual void setTabIndex (int index)
 Sets the tab index.
virtual int tabIndex () const
 Returns the tab index.
virtual void setId (const std::string &id)
 Sets the CSS Id.
virtual WWidgetfind (const std::string &name)
 Finds a descendend widget by name.
virtual void setSelectable (bool selectable)
 Sets as selectable.
virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.

+Protected Member Functions

virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
void setImplementation (WWidget *widget)
 Set the implementation widget.
WWidgetimplementation ()
 Get the implementation widget.
virtual int boxPadding (Orientation orientation) const
 Returns the widget's built-in padding.
virtual int boxBorder (Orientation orientation) const
 Returns the widget's built-in border width.
+

Detailed Description

+

A widget that hides the implementation of composite widgets.

+

Composite widgets, built on top of the WebWidgets, should derive from this class, and use setImplementation() to set the widget that implements the composite widget (which is typically a WContainerWidget or a WTable, or another widget that allows composition, including perhaps another WCompositeWidget).

+

Using this class you can completely hide the implementation of your composite widget, and provide access to only the standard WWidget methods.

+

Usage example:

+
 class MyWidget : public Wt::WCompositeWidget
+ {
+ public:
+   MyWidget(WContainerWidget *parent = 0)
+     : WCompositeWidget(parent)
+       // initialize members ...
+   {
+     setImplementation(impl_ = new WContainerWidget());
+
+     // further initialization code ...
+   }
+
+ private:
+   Wt::ContainerWidget *impl_;
+ };
+

CSS

+

Styling through CSS is propagated to its implementation.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WCompositeWidget::WCompositeWidget (WContainerWidget parent = 0 )
+
+
+ +

Creates a WCompositeWidget.

+

You need to set an implemetation using setImplementation().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::addStyleClass (const WString styleClass,
bool  force = false 
) [virtual]
+
+
+ +

Adds a CSS style class.

+

When force = true, a JavaScript call will be used to add the style class to the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WCompositeWidget::attributeValue (const std::string &  name ) const [virtual]
+
+
+ +

Returns an attribute value.

+
See also:
setAttributeValue()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WCompositeWidget::boxBorder (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in border width.

+

This is used by the layout managers to correct for a built-in border which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the border width (the default implementation returns 0).

+

For form widgets, the border width depends on the specific browser/platform combination, unless an explicit border is set for the widget.

+

When setting an explicit border for the widget using a style class, you will want to reimplement this method to return this border width, in case you want to set the widget inside a layout manager.

+
See also:
boxPadding()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WCompositeWidget::boxPadding (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in padding.

+

This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).

+

For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.

+

When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.

+
See also:
boxBorder()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::callJavaScriptMember (const std::string &  name,
const std::string &  args 
) [virtual]
+
+
+ +

Calls a JavaScript member.

+

This calls a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WFlags< Side > Wt::WCompositeWidget::clearSides ( ) const [virtual]
+
+
+ +

Returns the sides that should remain empty.

+
See also:
setClearSides(WFlags<Side>)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WCssDecorationStyle & Wt::WCompositeWidget::decorationStyle ( ) [virtual]
+
+
+ +

Returns the decoration style of this widget.

+

This groups all decorative aspects of the widget, which do not affect the widget layout (except for the border properties which may behave like extra margin around the widget).

+

When a decoration style has not been previously set, it returns a default decoration style object.

+
See also:
setDecorationStyle()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCompositeWidget::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WMenu, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::WCompositeWidget::find (const std::string &  name ) [virtual]
+
+
+ +

Finds a descendend widget by name.

+
See also:
setObjectName()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
Side Wt::WCompositeWidget::floatSide ( ) const [virtual]
+
+
+ +

Returns the CSS float side.

+
See also:
setFloatSide(Side)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::height ( ) const [virtual]
+
+
+ +

Returns the height.

+

Returns the height set for this widget. This is not a calculated height, based on layout, but the height as specified previously with resize(const WLength& width, const WLength& height).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), width()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::hiddenKeepsGeometry ( ) const [virtual]
+
+
+ +

Returns whether the widget keeps its geometry when hidden.

+
See also:
setHiddenKeepsGeometry()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WCompositeWidget::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + +
WWidget* Wt::WCompositeWidget::implementation ( ) [protected]
+
+
+ +

Get the implementation widget.

+

This returns the widget that implements this compositeWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isDisabled ( ) const [virtual]
+
+
+ +

Returns whether the widget is set disabled.

+

A widget that is not set disabled may still be disabled when one of its ancestor widgets is set disabled. Use isEnabled() to find out whether a widget is enabled.

+
See also:
setDisabled(), isEnabled()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isEnabled ( ) const [virtual]
+
+
+ +

Returns whether the widget is enabled.

+

A widget is enabled if it is not disabled, and none of its ancestors are disabled. This method returns whether the widget is rendered as enabled, while isDisabled() returns whether a widget has been explicitly disabled.

+

Note that a widget may be at the same time not enabled, and not disabled, in case one of its ancestors was disabled.

+
See also:
isDisabled()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isHidden ( ) const [virtual]
+
+
+ +

Returns whether the widget is set hidden.

+

A widget that is not hidden may still be not visible when one of its ancestor widgets is hidden. Use isVisible() to check the visibility of a widget.

+
See also:
setHidden(), isVisible()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isInline ( ) const [virtual]
+
+
+ +

Returns whether the widget is displayed inline or as block.

+
See also:
setInline(bool)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isPopup ( ) const [virtual]
+
+
+ +

Returns whether the widget is overlayed.

+

This applies to CSS-based layout.

+
See also:
setPopup(bool)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::isVisible ( ) const [virtual]
+
+
+ +

Returns whether the widget is visible.

+

A widget is visible if it is not hidden, and none of its ancestors are hidden. This method returns the true visibility, while isHidden() returns whether a widget has been explicitly hidden.

+

Note that a widget may be at the same time not hidden, and not visible, in case one of its ancestors was hidden.

+
See also:
isHidden()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WCompositeWidget::javaScriptMember (const std::string &  name ) const [virtual]
+
+
+ +

Returns the value of a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::lineHeight ( ) const [virtual]
+
+
+ +

Returns the CSS line height for contained text.

+

sa setLineHeight()

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCompositeWidget::load ( ) [virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WPopupMenuItem.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WCompositeWidget::loaded ( ) const [virtual]
+
+
+ +

Returns whether this widget has been loaded.

+
See also:
load()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WLength Wt::WCompositeWidget::margin (Side  side ) const [virtual]
+
+
+ +

Returns a CSS margin set.

+

This applies to CSS-based layout.

+
See also:
setMargin()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::maximumHeight ( ) const [virtual]
+
+
+ +

Returns the maximum height.

+

Returns the minmum height set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumWidth()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::maximumWidth ( ) const [virtual]
+
+
+ +

Returns the maximum width.

+

Returns the maximum width set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::minimumHeight ( ) const [virtual]
+
+
+ +

Returns the minimum height.

+

Returns the minmum height set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumWidth()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::minimumWidth ( ) const [virtual]
+
+
+ +

Returns the minimum width.

+

Returns the minimum width set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WLength Wt::WCompositeWidget::offset (Side  side ) const [virtual]
+
+
+ +

Returns a CSS offset.

+

This applies to CSS-based layout.

+
See also:
setOffsets(const WLength&, WFlags<Side>)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
PositionScheme Wt::WCompositeWidget::positionScheme ( ) const [virtual]
+
+
+ +

Returns the CSS position scheme.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, setPositionScheme(PositionScheme)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::propagateSetEnabled (bool  enabled ) [virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WCompositeWidget::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::removeStyleClass (const WString styleClass,
bool  force = false 
) [virtual]
+
+
+ +

Removes a CSS style class.

+

When force = true, a JavaScript call will be used to remove the style class from the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::WSlider, Wt::WTableView, and Wt::WTreeView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setAttributeValue (const std::string &  name,
const WString value 
) [virtual]
+
+
+ +

Sets an attribute value.

+

Associate an extra attribute with this widget, with the given value. This is only useful when processing dom nodes associated with widgets in custom JavaScript code.

+
See also:
JSlot, WApplication::doJavaScript()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setClearSides (WFlags< Side sides ) [virtual]
+
+
+ +

Sets the sides that should be cleared of floats.

+

This pushes the widget down until it is not surrounded by floats at the sides (which may be a combination of Wt::Left and Wt::Right).

+

This applies to CSS-based layout.

+
See also:
setFloatSide()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setDecorationStyle (const WCssDecorationStyle style ) [virtual]
+
+
+ +

Sets a CSS decoration style.

+

This copies the style over its current decorationStyle()

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setDisabled (bool  disabled ) [virtual]
+
+
+ +

Sets whether the widget is disabled.

+

Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.

+

Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.

+
See also:
disable(), enable()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WDatePicker, and Wt::WPopupMenuItem.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setFloatSide (Side  s ) [virtual]
+
+
+ +

Specifies a CSS float side.

+

This only applies to widgets with a Wt::Static positionScheme().

+

This lets the widget float to one of the sides of the parent widget, at the current line. A typical use is to position images within text. Valid values for Side orWt::None java {javadoclink Side::None None}, Wt::Left or Wt::Right.

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WDatePicker, Wt::WDialog, and Wt::WPopupMenu.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setHiddenKeepsGeometry (bool  enabled ) [virtual]
+
+
+ +

Sets whether the widget keeps its geometry when hidden.

+

Normally, a widget that is hidden will no longer occupy space, causing a reflow of sibling widgets. Using this method you may change this behavior to keep an (open) space when hidden.

+
Note:
Currently you can only set this before initial rendering.
+
See also:
setHidden()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setId (const std::string &  id ) [virtual]
+
+
+ +

Sets the CSS Id.

+

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed. This is mostly useful for in tests using a test plan that manipulates DOM elements by Id.

+

By default, auto-generated id's are used.

+
See also:
WObject::id()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setImplementation (WWidget widget ) [protected]
+
+
+ +

Set the implementation widget.

+

This sets the widget that implements this compositeWidget. Ownership of the widget is completely transferred (including deletion).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setInline (bool  inlined ) [virtual]
+
+
+ +

Sets whether the widget is displayed inline or as a block.

+

This option changes whether this widget must be rendered in line with sibling widgets wrapping at the right edge of the parent container (like text), or whether this widget must be rendered as a rectangular block that stacks vertically with sibling widgets (unless a CSS float property is applied). Depending on the widget type, the default value is inline (such as for example for WText, or WPushButton), or block (such as for example for a WContainerWidget).

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setJavaScriptMember (const std::string &  name,
const std::string &  value 
) [virtual]
+
+
+ +

Sets a JavaScript member.

+

This binds a JavaScript member, which is set as a JavaScript property to the DOM object that implements this widget. The value may be any JavaScript expression, including a function.

+

Members that start with "wt" are reserved for internal use. You may define a member "wtResize(self, width, + height)" method if your widget needs active layout management. If defined, this method will be used by layout managers and when doing resize() to set the size of the widget, instead of setting the CSS width and height properties.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setMargin (const WLength margin,
WFlags< Side sides = All 
) [virtual]
+
+
+ +

Sets CSS margins around the widget.

+

Setting margin has the effect of adding a distance between the widget and surrounding widgets. The default margin (with an automatic length) is zero.

+

Use any combination of Wt::Left, Wt::Right, Wt::Bottom, or Wt::Top.

+

This applies to CSS-based layout.

+
See also:
margin()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setMaximumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a maximum size.

+

Specify a minimum size for this widget.

+
See also:
resize(), maximumWidth(), maximumHeight()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WSuggestionPopup.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setMinimumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a minimum size.

+

Specify a minimum size for this widget. When the widget is managed using a layout manager, these sizes are also taken into account.

+
See also:
resize(), minimumWidth(), minimumHeight()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WSuggestionPopup.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setOffsets (const WLength offset,
WFlags< Side sides = All 
) [virtual]
+
+
+ +

Sets CSS offsets for a non-statically positioned widget.

+

The argument sides may be a combination of Wt::Left, Wt::Right, Wt::Top, and Wt::Bottom.

+

This applies only to widgets that have a position scheme that is Wt::Relative, Wt::Absolute, or Wt::Fixed, and has a slightly different meaning for these three cases.

+

For a relatively positioned widget, an offset applies relative to the position the widget would have when layed-out using a static position scheme. The widget may be shifted to the left or right by specifying an offset for the left or right) side. The widget may be shifted vertically, by specifying an offset for the top or bottom side.

+

For an absolutely positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the corresponding side of the reference parent widget. Thus, setting all offsets to 0 result in a widget that spans the entire reference widget. The reference parent widget is the first ancestor widget that is a table cell, or a widget with a relative, absolute or fixed position scheme.

+

For an fixed positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the browser window, regardless of scrolling. Thus, setting all offsets to 0 result in a widget that spans the entire browser window.

+

This applies to CSS-based layout.

+
See also:
offset(Side) const
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setPopup (bool  popup ) [virtual]
+
+
+ +

Lets the widget overlay over other sibling widgets.

+

A widget that isPopup() will be rendered on top of any other sibling widget contained within the same parent (including other popup widgets previously added to the container).

+

This will only have an effect when the widgetis either Wt::Absolute or Wt::Fixed positionScheme().

+

This applies to CSS-based layout, and configures the z-index property.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setPositionScheme (PositionScheme  scheme ) [virtual]
+
+
+ +

Sets the CSS position scheme.

+

Establishes how the widget must be layed-out relative to its siblings. The default position scheme is Static.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, positionScheme()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setSelectable (bool  selectable ) [virtual]
+
+
+ +

Sets as selectable.

+

When a widget is made unselectable, a selection of text (or images) will not be visible (but may still be possible).

+

By default, the widget inherits this property from its parent, and this property propagates to all children. The top level container (WApplication::root()) selectable by default.

+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WTreeNode.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setStyleClass (const WString styleClass ) [virtual]
+
+
+ +

Sets (one or more) CSS style classes.

+

You may set one or more space separated style classes. CSS style class works in conjunction with style sheet, and provides a flexible way to provide many widgets the same markup.

+

Setting an empty string removes the style class(es).

+
See also:
WApplication::styleSheet()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setTabIndex (int  index ) [virtual]
+
+
+ +

Sets the tab index.

+

For widgets that receive focus, focus is passed on to the next widget in the tabbing chain based on their tab index. When the user navigates through form widgets using the keyboard, widgets receive focus starting from the element with the lowest tab index to elements with the highest tab index.

+

A tab index only applies to widgets than can receive focus (which are WFormWidget, WAnchor, WPushButton), but setting a tab index on any other type of widget will propagate to its contained form widgets.

+

Widgets with a same tab index will receive focus in the same order as they are inserted in the widget tree.

+

The default tab index is 0.

+
See also:
setTabOrder()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WCompositeWidget::setToolTip (const WString text ) [virtual]
+
+
+ +

Sets a tooltip.

+

The tooltip is displayed when the cursor hovers over the widget.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WCompositeWidget::setVerticalAlignment (AlignmentFlag  alignment,
const WLength length = WLength::Auto 
) [virtual]
+
+
+ +

Sets the vertical alignment.

+

This only applies to inline widgets, and determines how to position itself on the current line, with respect to sibling inline widgets.

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WCompositeWidget::styleClass ( ) const [virtual]
+
+
+ +

Returns the CSS style class.

+
See also:
setStyleClass()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WCompositeWidget::tabIndex ( ) const [virtual]
+
+
+ +

Returns the tab index.

+
See also:
setTabIndex()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
AlignmentFlag Wt::WCompositeWidget::verticalAlignment ( ) const [virtual]
+
+
+ +

Returns the vertical alignment.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::verticalAlignmentLength ( ) const [virtual]
+
+
+ +

Returns the fixed vertical alignment that was set.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WCompositeWidget::width ( ) const [virtual]
+
+
+ +

Returns the width.

+

Returns the width set for this widget. This is not a calculated width, based on layout, but the width as specified with resize(const WLength&, const WLength&).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), height()
+ +

Implements Wt::WWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.map new file mode 100644 index 0000000..1294633 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.map @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.md5 new file mode 100644 index 0000000..e8b1405 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.md5 @@ -0,0 +1 @@ +a5df5b57a76d2fef0fb727aca12d3faa \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.png new file mode 100644 index 0000000..1e27d2d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCompositeWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget-members.html new file mode 100644 index 0000000..50b4332 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget-members.html @@ -0,0 +1,230 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WContainerWidget Member List

+
+
+This is the complete list of members for Wt::WContainerWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WContainerWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WContainerWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget.html new file mode 100644 index 0000000..c16980b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget.html @@ -0,0 +1,681 @@ + + + + +Wt: Wt::WContainerWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WContainerWidget Class Reference

+
+
+ +

A widget that holds and manages child widgets. +More...

+ +

#include <Wt/WContainerWidget>

+
+Inheritance diagram for Wt::WContainerWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Overflow { OverflowVisible = 0x0, +OverflowAuto = 0x1, +OverflowHidden = 0x2, +OverflowScroll = 0x3 + }
 

How to handle overflow of inner content.

+ More...

+Public Member Functions

WContainerWidget (WContainerWidget *parent=0)
 Creates a container with optional parent.
~WContainerWidget ()
 Destructor.
void setLayout (WLayout *layout)
 Sets a layout manager for the container.
void setLayout (WLayout *layout, WFlags< AlignmentFlag > alignment)
 Sets a layout manager for the container.
WLayoutlayout ()
 Returns the layout manager that was set for the container.
virtual void addWidget (WWidget *widget)
 Adds a child widget to this container.
virtual void insertBefore (WWidget *widget, WWidget *before)
 Inserts a child widget in this container, before another widget.
virtual void insertWidget (int index, WWidget *widget)
 Inserts a child widget in this container at given index.
virtual void removeWidget (WWidget *widget)
 Removes a child widget from this container.
virtual void clear ()
 Removes and deletes all child widgets.
+virtual int indexOf (WWidget *widget) const
 Returns the index of a widget.
+virtual WWidgetwidget (int index) const
 Returns the widget at index
+virtual int count () const
 Returns the number of widgets in this container.
void setContentAlignment (WFlags< AlignmentFlag > contentAlignment)
 Specifies how child widgets must be aligned within the container.
void setPadding (const WLength &padding, WFlags< Side > sides=All)
 Sets padding inside the widget.
WLength padding (Side side) const
 Returns the padding set for the widget.
WFlags< AlignmentFlagcontentAlignment () const
 Returns the alignment of children.
void setOverflow (Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))
 Sets how overflow of contained children must be handled.
void setList (bool list, bool ordered=false)
 Renders the container as an HTML list.
bool isList () const
 Returns if this container is rendered as a List.
bool isUnorderedList () const
 Returns if this container is rendered as an Unordered List.
bool isOrderedList () const
 Returns if this container is rendered as an Ordered List.
EventSignal< WScrollEvent > & scrolled ()
 Event signal emitted when scrolling in the widget.
+

Detailed Description

+

A widget that holds and manages child widgets.

+

A WContainerWidget acts as a container for child widgets. Child widgets may be added directly to the container or using a layout manager.

+

Use addWidget() or pass the container as constructor argument to a widget to directly add children to the container, without using a layout manager. In that case, CSS-based layout is used, and the resulting display is determined by properties of the children and the container. By default, a WContainerWidget is displayed as a block and manages its children within a rectangle. Inline child widgets are layed out in lines, wrapping around as needed, while block child widgets are stacked vertically. The container may add padding at the container edges using setPadding(), and provide alignment of contents using setContentAlignment(). A container is rendered by default using a HTML div tag, but this may be changed to an HTML ul or ol tag to make use of other CSS layout techniques, using setList(). In addition, specializations of this class as implemented by WAnchor, WGroupBox, WStackedWidget and WTableCell provide other alternative rendering of the container.

+

When setting the WContainerWidget inline the container only acts as a conceptual container, offering a common style to its children. Inline children are still layed out inline within the flow of the parent container of this container, as if they were inserted directly into that parent container. Block children are then not allowed (according to the HTML specification).

+

To use a layout manager instead of CSS-based layout, use setLayout() or pass the container as constructor argument to a layout manager. In that case you should not define any padding for the container, and widgets and nested layout managers must be added to the layout manager, instead of to the container directly.

+

Usage example:

+
 // Example 1:
+ // Instantiate a container widget and add some children whose layout 
+ // is governed based on HTML/CSS rules.
+ Wt::WContainerWidget *container1 = new Wt::WContainerWidget();
+ container1->addWidget(new Wt::WText("Some text"));
+ container1->addWidget(new Wt::WImage("images/img.png"));
+ Wt::WContainerWidget *child3 = new Wt::WContainerWidget(container1);
+
+ // Example 2:
+ // Instantiate a container widget which uses a layout manager
+ Wt::WContainerWidget *container2 = new Wt::WContainerWidget();
+ container2->resize(WLength::Auto, 600); // give the container a fixed height.
+
+ Wt::WVBoxLayout *layout = new Wt::WVBoxLayout();
+ layout->addWidget(new Wt::WText("Some text"));
+ layout->addWidget(new Wt::WImage("images/img.png"));
+
+ container2->setLayout(layout);      // set the layout to the container.
+

When using a layout manager, you need to carefully consider the alignment of the layout manager with respect to the container: when the container's height is unconstrained (not specified explicitly using resize() or a style class, and the container is not included in a layout manager), you should pass AlignTop to setLayout().

+

CSS

+

Depending on its configuration and usage, the widget corresponds to the following HTML tags:

+
    +
  • By default, the widget corresponds to a <div> tag.
  • +
  • When configured with setInline(true), the widget corresponds to a <span>.
  • +
  • When configured with setList(true), the widget corresponds to a <ul>.
  • +
  • When configured with setList(true, true), the widget corresponds to a <ol>.
  • +
  • When inserted into a container widget that isList(), the widget corresponds to a <li>.
  • +
+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

Member Enumeration Documentation

+ +
+ +
+ +

How to handle overflow of inner content.

+
Enumerator:
+ + + + +
OverflowVisible  +

Show content that overflows.

+
OverflowAuto  +

Show scrollbars when needed.

+
OverflowHidden  +

Hide content that overflows.

+
OverflowScroll  +

Always show scroll bars.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WContainerWidget::addWidget (WWidget widget ) [virtual]
+
+
+ +

Adds a child widget to this container.

+

This is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.

+ +

Reimplemented in Wt::Ext::Splitter, and Wt::WStackedWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WContainerWidget::clear ( ) [virtual]
+
+
+ +

Removes and deletes all child widgets.

+

This deletes all children that have been added to this container.

+

If a layout was set, also the layout manager is deleted.

+ +
+
+ +
+
+ + + + + + + +
WFlags<AlignmentFlag> Wt::WContainerWidget::contentAlignment ( ) const
+
+
+ +

Returns the alignment of children.

+
See also:
setContentAlignment(WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::insertBefore (WWidget widget,
WWidget before 
) [virtual]
+
+
+ +

Inserts a child widget in this container, before another widget.

+

The widget is inserted at the place of the before widget, and subsequent widgets are shifted.

+
See also:
insertWidget(int index, WWidget *widget);
+ +

Reimplemented in Wt::Ext::Splitter.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::insertWidget (int  index,
WWidget widget 
) [virtual]
+
+
+ +

Inserts a child widget in this container at given index.

+

The widget is inserted at the given index, and subsequent widgets are shifted.

+
See also:
insertBefore(WWidget *widget, WWidget *before);
+ +

Reimplemented in Wt::Ext::Splitter, and Wt::WStackedWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WContainerWidget::isList ( ) const
+
+
+ +

Returns if this container is rendered as a List.

+
See also:
setList(), isOrderedList(), isUnorderedList()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WContainerWidget::isOrderedList ( ) const
+
+
+ +

Returns if this container is rendered as an Ordered List.

+
See also:
setList(), isList(), isUnorderedList()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WContainerWidget::isUnorderedList ( ) const
+
+
+ +

Returns if this container is rendered as an Unordered List.

+
See also:
setList(), isList(), isOrderedList()
+ +
+
+ +
+
+ + + + + + + +
WLayout* Wt::WContainerWidget::layout ( ) [virtual]
+
+
+ +

Returns the layout manager that was set for the container.

+

If no layout manager was previously set using setLayout(WLayout *), 0 is returned.

+
See also:
setLayout(WLayout *)
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WLength Wt::WContainerWidget::padding (Side  side ) const
+
+
+ +

Returns the padding set for the widget.

+
See also:
setPadding(const WLength&, WFlags<Side>)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WContainerWidget::removeWidget (WWidget widget ) [virtual]
+
+
+ +

Removes a child widget from this container.

+

This removes the widget from this container, but does not delete the widget !

+ +
+
+ +
+
+ + + + + + + +
EventSignal< WScrollEvent > & Wt::WContainerWidget::scrolled ( )
+
+
+ +

Event signal emitted when scrolling in the widget.

+

This event is emitted when the user scrolls in the widget (for setting the scroll bar policy, see setOverflow()). The event conveys details such as the new scroll bar position, the total contents height and the current widget height.

+
See also:
setOverflow()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WContainerWidget::setContentAlignment (WFlags< AlignmentFlag contentAlignment )
+
+
+ +

Specifies how child widgets must be aligned within the container.

+

For a WContainerWidget, only specifes the horizontal alignment of child widgets. Note that there is no way to specify vertical alignment: children are always pushed to the top of the container.

+

For a WTableCell, this may also specify the vertical alignment. The default alignment is (Wt::AlignTop | Wt::AlignLeft).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WContainerWidget::setLayout (WLayout layout ) [virtual]
+
+
+ +

Sets a layout manager for the container.

+

Note that you can nest layout managers inside each other, to create a complex layout hierarchy.

+

If a previous layout manager was already set, it is first deleted. In that case, you will need to make sure that you either readd all widgets that were part of the previous layout to the new layout, or delete them, to avoid memory leaks.

+

The layout manager arranges children in the entire width and height of the container. This is equivalent to setLayout(layout, AlignJustify)

+
See also:
layout(), setLayout(WLayout *, WFlags<AlignmentFlag>)
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::setLayout (WLayout layout,
WFlags< AlignmentFlag alignment 
)
+
+
+ +

Sets a layout manager for the container.

+

The alignment argument determines how the layout is aligned inside the container. By default, the layout manager arranges children over the entire width and height of the container, corresponding to a value of AlignJustify. This requires that the container has a specified height (either because it is managed by another layout manager, is the root container widget, or has a height set).

+

In general, alignment is the logical OR of a horizontal and a vertical flag:

+ +

When using a horizontal alingment different from Wt::AlignJustify, and a vertical alignment different from '0', the widget is sized in that direction to fit the contents, instead of the contents being adjusted to the widget size. This is useful when the container does not have a specific size in that direction and when the layout manager does not contain any widgets that wish to consume all remaining space in that direction.

+

Only a single layout manager may be set. If you want to replace the current layout manager, you have to erase all contents first using clear(), which also deletes the layout manager.

+

Note that you can nest layout managers inside each other, to create a complex layout hierarchy.

+

The widget will take ownership of layout.

+
See also:
layout()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::setList (bool  list,
bool  ordered = false 
)
+
+
+ +

Renders the container as an HTML list.

+

Setting renderList to true will cause the container to be using an HTML <ul> or <ol> type, depending on the value of orderedList. This must be set before the initial render of the container. When set, any contained WContainerWidget will be rendered as an HTML <li>. Adding non-WContainerWidget children results in unspecified behaviour.

+

Note that CSS default layout rules for <ul> and <ol> add margin and padding to the container, which may look odd if you do not use bullets.

+

By default, a container is rendered using a <div> element.

+
See also:
isList(), isOrderedList(), isUnorderedList()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::setOverflow (Overflow  overflow,
WFlags< Orientation orientation = (Horizontal | Vertical) 
)
+
+
+ +

Sets how overflow of contained children must be handled.

+

This is an alternative (CSS-ish) way to provide scroll bars on a container widget, compared to wrapping inside a WScrollArea.

+

Note that currently, you cannot separately specify vertical and horizontal scroll behaviour, since this is not supported on Opera. Therefore, settings will apply automatically to both orientations.

+

Unlike WScrollArea, horizontal scrolling does not work reliably when the container widget is inserted in a layout manager: the layout manager will overflow rather than use scrollbars for this container widget. A solution there is to use WScrollArea instead.

+
See also:
WScrollArea
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WContainerWidget::setPadding (const WLength padding,
WFlags< Side sides = All 
)
+
+
+ +

Sets padding inside the widget.

+

Setting padding has the effect of adding distance between the widget children and the border.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.map new file mode 100644 index 0000000..2a4ccfa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.md5 new file mode 100644 index 0000000..c5746f5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.md5 @@ -0,0 +1 @@ +c2118086831c54c2f2c2f0d471041539 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.png new file mode 100644 index 0000000..c1d1220 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WContainerWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle-members.html new file mode 100644 index 0000000..290cec7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle-members.html @@ -0,0 +1,108 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCssDecorationStyle Member List

+
+
+This is the complete list of members for Wt::WCssDecorationStyle, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
backgroundColor() const Wt::WCssDecorationStyle
backgroundImage() const Wt::WCssDecorationStyle
backgroundImageRepeat() const Wt::WCssDecorationStyle
Blink enum valueWt::WCssDecorationStyle
border() const Wt::WCssDecorationStyle
cursor() const Wt::WCssDecorationStyle
cursorImage() const Wt::WCssDecorationStyle
font()Wt::WCssDecorationStyle
foregroundColor() const Wt::WCssDecorationStyle
LineThrough enum valueWt::WCssDecorationStyle
NoRepeat enum valueWt::WCssDecorationStyle
operator=(const WCssDecorationStyle &other)Wt::WCssDecorationStyle
Overline enum valueWt::WCssDecorationStyle
Repeat enum nameWt::WCssDecorationStyle
RepeatX enum valueWt::WCssDecorationStyle
RepeatXY enum valueWt::WCssDecorationStyle
RepeatY enum valueWt::WCssDecorationStyle
setBackgroundColor(WColor color)Wt::WCssDecorationStyle
setBackgroundImage(const std::string &imageHRef, Repeat repeat=RepeatXY, WFlags< Side > sides=0)Wt::WCssDecorationStyle
setBackgroundImage(WResource *resource, Repeat repeat=RepeatXY, WFlags< Side > sides=0)Wt::WCssDecorationStyle
setBorder(WBorder border, WFlags< Side > sides=All)Wt::WCssDecorationStyle
setCursor(Cursor c)Wt::WCssDecorationStyle
setCursor(std::string cursorImage, Cursor fallback=ArrowCursor)Wt::WCssDecorationStyle
setFont(const WFont &font)Wt::WCssDecorationStyle
setForegroundColor(WColor color)Wt::WCssDecorationStyle
setTextDecoration(WFlags< TextDecoration > decoration)Wt::WCssDecorationStyle
TextDecoration enum nameWt::WCssDecorationStyle
textDecoration() const Wt::WCssDecorationStyle
Underline enum valueWt::WCssDecorationStyle
WCssDecorationStyle()Wt::WCssDecorationStyle
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle.html new file mode 100644 index 0000000..3bb14f1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssDecorationStyle.html @@ -0,0 +1,396 @@ + + + + +Wt: Wt::WCssDecorationStyle Class Reference + + + + + + + + + +
+ +
+

Wt::WCssDecorationStyle Class Reference
+ +[Style classes] +

+
+
+ +

A style class for a single widget or style sheet rule. +More...

+ +

#include <Wt/WCssDecorationStyle>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Repeat { RepeatXY, +RepeatX, +RepeatY, +NoRepeat + }
 

How a background image must be repeated.

+ More...
enum  TextDecoration { Underline = 0x1, +Overline = 0x2, +LineThrough = 0x4, +Blink = 0x8 + }
 

Text decoration options.

+ More...

+Public Member Functions

WCssDecorationStyle ()
 Creates a default style.
+WCssDecorationStyleoperator= (const WCssDecorationStyle &other)
 Assignment operator.
+void setCursor (Cursor c)
 Sets the cursor style.
+Cursor cursor () const
 Returns the cursor style.
void setCursor (std::string cursorImage, Cursor fallback=ArrowCursor)
 Sets a custom cursor image URI, with optionally a fallback cursor.
+std::string cursorImage () const
 Returns the cursor image.
+void setBackgroundColor (WColor color)
 Sets the background color.
+WColor backgroundColor () const
 Returns the background color.
void setBackgroundImage (const std::string &imageHRef, Repeat repeat=RepeatXY, WFlags< Side > sides=0)
 Sets a background image URL.
void setBackgroundImage (WResource *resource, Repeat repeat=RepeatXY, WFlags< Side > sides=0)
 Sets a background image URL.
+const std::string & backgroundImage () const
 Returns the background image URL.
+Repeat backgroundImageRepeat () const
 Returns the background image repeat.
+void setForegroundColor (WColor color)
 Sets the foreground color.
+WColor foregroundColor () const
 Returns the foreground color.
void setBorder (WBorder border, WFlags< Side > sides=All)
 Sets the border style.
+WBorder border () const
 Returns the border style.
+void setFont (const WFont &font)
 Sets the font.
+WFontfont ()
 Returns a reference to the font.
void setTextDecoration (WFlags< TextDecoration > decoration)
 Sets the text decoration options.
+WFlags< TextDecorationtextDecoration () const
 Returns the text decoration options.
+

Detailed Description

+

A style class for a single widget or style sheet rule.

+

You can manipulate the decoration style of a single widget using WWidget::decorationStyle() or you can use a WCssDecorationStyle to add a rule to the inline style sheet using WCssStyleSheet::addRule(const std::string&, const WCssDecorationStyle& style, const std::string&).

+

Usage example:

+
 Wt::WWidget *widget = ...
+ widget->decorationStyle().setCursor(PointingHandCursor);
+

Member Enumeration Documentation

+ +
+ +
+ +

How a background image must be repeated.

+
Enumerator:
+ + + + +
RepeatXY  +

Repeat horizontally and vertically, default.

+
RepeatX  +

Repeat horizontally.

+
RepeatY  +

Repeat vertically.

+
NoRepeat  +

Do not repeat.

+
+
+
+ +
+
+ +
+ +
+ +

Text decoration options.

+
Enumerator:
+ + + + +
Underline  +

Underline.

+
Overline  +

Overline.

+
LineThrough  +

LineThrough.

+
Blink  +

Blink.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WCssDecorationStyle::setBackgroundImage (const std::string &  imageHRef,
Repeat  repeat = RepeatXY,
WFlags< Side sides = 0 
)
+
+
+ +

Sets a background image URL.

+

The image may be placed in a particular location by specifying sides by OR'ing Wt::Side values together, e.g. (Right | Top).

+
See also:
setBackgroundImage()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WCssDecorationStyle::setBackgroundImage (WResource resource,
Repeat  repeat = RepeatXY,
WFlags< Side sides = 0 
)
+
+
+ +

Sets a background image URL.

+

The image may be placed in a particular location by specifying sides by OR'ing Wt::Side values together, e.g. (Right | Top).

+
See also:
setBackgroundImage()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WCssDecorationStyle::setBorder (WBorder  border,
WFlags< Side sides = All 
)
+
+
+ +

Sets the border style.

+

A border may be placed in a particular location by specifying sides by OR'ing WWidget::Side values together, e.g. (Right | Top).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WCssDecorationStyle::setCursor (std::string  cursorImage,
Cursor  fallback = ArrowCursor 
)
+
+
+ +

Sets a custom cursor image URI, with optionally a fallback cursor.

+

The URI should point to a .cur file (this shoul be a real .cur file, renaming an .ico is not enough for Internet Explorer).

+ +
+
+ +
+
+ + + + + + + + +
void WCssDecorationStyle::setTextDecoration (WFlags< TextDecoration decoration )
+
+
+ +

Sets the text decoration options.

+

You may logically or together any of the options of the TextDecoration enumeration.

+

The default is 0.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule-members.html new file mode 100644 index 0000000..6da3ba8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCssRule Member List

+
+
+This is the complete list of members for Wt::WCssRule, including all inherited members. + + + + + + +
declarations()=0Wt::WCssRule [pure virtual]
modified()Wt::WCssRule
selector() const Wt::WCssRule
sheet() const Wt::WCssRule
WCssRule(const std::string &selector)Wt::WCssRule [protected]
~WCssRule()Wt::WCssRule [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule.html new file mode 100644 index 0000000..960edf5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule.html @@ -0,0 +1,153 @@ + + + + +Wt: Wt::WCssRule Class Reference + + + + + + + + + +
+ +
+

Wt::WCssRule Class Reference
+ +[Style classes] +

+
+
+ +

Abstract rule in a CSS style sheet. +More...

+ +

#include <Wt/WCssStyleSheet>

+
+Inheritance diagram for Wt::WCssRule:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~WCssRule ()
 Destructor.
+const std::string & selector () const
 Returns the selector.
+WCssStyleSheetsheet () const
 Returns the style sheet to which this rule belongs.
+void modified ()
 Indicates that the rule has changed and needs updating.
virtual const std::string declarations ()=0
 Returns the declarations.

+Protected Member Functions

WCssRule (const std::string &selector)
 Creates a new CSS rule with given selector.
+

Detailed Description

+

Abstract rule in a CSS style sheet.

+

A rule presents CSS style properties that are applied to a selected set of elements.

+

Use WCssTemplateRule if you would like to use a widget as a template for specifying (and updating) a style rule, using the widgets style properties, or WCssTextRule if you wish to directly specify the CSS declarations.

+
See also:
WCssStyleSheet
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const std::string Wt::WCssRule::declarations ( ) [pure virtual]
+
+
+ +

Returns the declarations.

+

This is a semi-colon separated list of CSS declarations.

+ +

Implemented in Wt::WCssTemplateRule, and Wt::WCssTextRule.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.map new file mode 100644 index 0000000..49b7bfa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.md5 new file mode 100644 index 0000000..ad37d38 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.md5 @@ -0,0 +1 @@ +5a019aa5858d32132b434abb4b7f2285 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.png new file mode 100644 index 0000000..dd90e79 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssRule__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet-members.html new file mode 100644 index 0000000..ad01ef5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCssStyleSheet Member List

+
+
+This is the complete list of members for Wt::WCssStyleSheet, including all inherited members. + + + + + + + +
addRule(const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())Wt::WCssStyleSheet
addRule(const std::string &selector, const WCssDecorationStyle &style, const std::string &ruleName=std::string())Wt::WCssStyleSheet
addRule(WCssRule *rule, const std::string &ruleName=std::string())Wt::WCssStyleSheet
isDefined(const std::string &ruleName) const Wt::WCssStyleSheet
removeRule(WCssRule *rule)Wt::WCssStyleSheet
WCssStyleSheet()Wt::WCssStyleSheet
~WCssStyleSheet()Wt::WCssStyleSheet
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet.html new file mode 100644 index 0000000..e0d2eb9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssStyleSheet.html @@ -0,0 +1,250 @@ + + + + +Wt: Wt::WCssStyleSheet Class Reference + + + + + + + + + +
+ +
+

Wt::WCssStyleSheet Class Reference
+ +[Style classes] +

+
+
+ +

A CSS style sheet. +More...

+ +

#include <Wt/WCssStyleSheet>

+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

WCssStyleSheet ()
 Creates a new empty style sheet.
~WCssStyleSheet ()
 Destroys a style sheet, and all rules in it.
WCssTextRuleaddRule (const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())
 Adds a CSS rule.
WCssTemplateRuleaddRule (const std::string &selector, const WCssDecorationStyle &style, const std::string &ruleName=std::string())
 Adds a CSS rule.
WCssRuleaddRule (WCssRule *rule, const std::string &ruleName=std::string())
 Adds a CSS rule.
bool isDefined (const std::string &ruleName) const
 Returns if a rule was already defined in this style sheet.
+void removeRule (WCssRule *rule)
 Removes a rule.
+

Detailed Description

+

A CSS style sheet.

+

Usage example:

+
 Wt::WApplication::instance()->styleSheet().addRule(".MyWidget .item", "width: 100px; cursor: pointer;");
+
See also:
WApplication::styleSheet()
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WCssTextRule * Wt::WCssStyleSheet::addRule (const std::string &  selector,
const WString declarations,
const std::string &  ruleName = std::string() 
)
+
+
+ +

Adds a CSS rule.

+

Add a rule using the CSS selector selector, with CSS declarations in declarations. These declarations must be a list separated by semi-colons (;).

+

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

+
See also:
isDefined()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WCssTemplateRule * Wt::WCssStyleSheet::addRule (const std::string &  selector,
const WCssDecorationStyle style,
const std::string &  ruleName = std::string() 
)
+
+
+ +

Adds a CSS rule.

+

Add a rule using the CSS selector selector, with styles specified in style.

+

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

+
See also:
isDefined()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WCssRule * Wt::WCssStyleSheet::addRule (WCssRule rule,
const std::string &  ruleName = std::string() 
)
+
+
+ +

Adds a CSS rule.

+

Optionally, you may give a ruleName, which may later be used to check if the rule was already defined.

+
See also:
isDefined()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WCssStyleSheet::isDefined (const std::string &  ruleName ) const
+
+
+ +

Returns if a rule was already defined in this style sheet.

+

Returns whether a rule was added with the given ruleName.

+
See also:
addRule()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule-members.html new file mode 100644 index 0000000..50574a9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCssTemplateRule Member List

+
+
+This is the complete list of members for Wt::WCssTemplateRule, including all inherited members. + + + + + + + + +
declarations()Wt::WCssTemplateRule [virtual]
modified()Wt::WCssRule
selector() const Wt::WCssRule
sheet() const Wt::WCssRule
templateWidget()Wt::WCssTemplateRule
WCssRule(const std::string &selector)Wt::WCssRule [protected]
WCssTemplateRule(const std::string &selector)Wt::WCssTemplateRule
~WCssRule()Wt::WCssRule [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule.html new file mode 100644 index 0000000..073ef97 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule.html @@ -0,0 +1,194 @@ + + + + +Wt: Wt::WCssTemplateRule Class Reference + + + + + + + + + +
+ +
+

Wt::WCssTemplateRule Class Reference
+ +[Style classes] +

+
+
+ +

A CSS rule based on a template widget. +More...

+ +

#include <Wt/WCssStyleSheet>

+
+Inheritance diagram for Wt::WCssTemplateRule:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

 WCssTemplateRule (const std::string &selector)
 Creates a CSS rule with a given selector.
WWidgettemplateWidget ()
 Returns the widget that is used as a template.
const std::string declarations ()
 Returns the declarations.
+

Detailed Description

+

A CSS rule based on a template widget.

+

This is a CSS rule whose CSS style properties are defined based on properties of a template widget. When modifying the template widget, these changes are reflected on the CSS rule and thus all widgets that have this CSS rule.

+

Usage example:

+
 Wt::WCssTemplateRule *styleRule = new Wt::WCssTemplateRule("#" + id() + " .item");
+ Wt::WApplication::instance()->styleSheet().addRule(styleRule);
+
+ styleRule->templateWidget()->resize(100, WLength::Auto);
+ styleRule->templateWidget()->decorationStyle().setCursor(PointingHandCursor);
+
See also:
Wt::WCssStyleSheet
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WCssTemplateRule::WCssTemplateRule (const std::string &  selector )
+
+
+ +

Creates a CSS rule with a given selector.

+

The selector should be a valid CSS selector.

+
Note:
If you want to update the rule, then the selector should be unique and not contain commas, since this is not supported by Microsoft Internet Explorer.
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string Wt::WCssTemplateRule::declarations ( ) [virtual]
+
+
+ +

Returns the declarations.

+

This is a semi-colon separated list of CSS declarations.

+ +

Implements Wt::WCssRule.

+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WCssTemplateRule::templateWidget ( )
+
+
+ +

Returns the widget that is used as a template.

+

Various properties of the widget are reflected in the CSS style:

+ +

When modifying one of these properties of the returned widget, the rule will be updated accordingly.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.map new file mode 100644 index 0000000..990af9c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.md5 new file mode 100644 index 0000000..8f7aee1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.md5 @@ -0,0 +1 @@ +77cdf6aa8d71294333d7a2741f06ba6f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.png new file mode 100644 index 0000000..2d8fa0f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTemplateRule__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule-members.html new file mode 100644 index 0000000..65592e0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WCssTextRule Member List

+
+
+This is the complete list of members for Wt::WCssTextRule, including all inherited members. + + + + + + + +
declarations()Wt::WCssTextRule [virtual]
modified()Wt::WCssRule
selector() const Wt::WCssRule
sheet() const Wt::WCssRule
WCssRule(const std::string &selector)Wt::WCssRule [protected]
WCssTextRule(const std::string &selector, const WString &declarations)Wt::WCssTextRule
~WCssRule()Wt::WCssRule [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule.html new file mode 100644 index 0000000..7530a39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule.html @@ -0,0 +1,139 @@ + + + + +Wt: Wt::WCssTextRule Class Reference + + + + + + + + + +
+ +
+

Wt::WCssTextRule Class Reference
+ +[Style classes] +

+
+
+ +

A CSS rule specified directly using CSS declarations. +More...

+ +

#include <Wt/WCssStyleSheet>

+
+Inheritance diagram for Wt::WCssTextRule:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

WCssTextRule (const std::string &selector, const WString &declarations)
 Creates a CSS rule with a given selector and declarations.
const std::string declarations ()
 Returns the declarations.
+

Detailed Description

+

A CSS rule specified directly using CSS declarations.

+

Usage example:

+
 Wt::WCssTextRule *styleRule = new Wt::WCssTextRule(".MyWidget .item", "width: 100px; cursor: pointer;");
+ Wt::WApplication::instance()->styleSheet().addRule(styleRule);
+
See also:
WCssStyleSheet
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string Wt::WCssTextRule::declarations ( ) [virtual]
+
+
+ +

Returns the declarations.

+

This is a semi-colon separated list of CSS declarations.

+ +

Implements Wt::WCssRule.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.map new file mode 100644 index 0000000..5a2c9af --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.md5 new file mode 100644 index 0000000..e8f0373 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.md5 @@ -0,0 +1 @@ +632b5aff901f5611ffea5ab0fc29df08 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.png new file mode 100644 index 0000000..a160ca6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WCssTextRule__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDate-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDate-members.html new file mode 100644 index 0000000..228eb28 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDate-members.html @@ -0,0 +1,108 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDate Member List

+
+
+This is the complete list of members for Wt::WDate, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addDays(int ndays) const Wt::WDate
addMonths(int nmonths) const Wt::WDate
addYears(int nyears) const Wt::WDate
currentDate()Wt::WDate [static]
currentServerDate()Wt::WDate [static]
day() const Wt::WDate
dayOfWeek() const Wt::WDate
daysTo(const WDate &date) const Wt::WDate
fromString(const WString &s)Wt::WDate [static]
fromString(const WString &s, const WString &format)Wt::WDate [static]
isNull() const Wt::WDate
isValid() const Wt::WDate
longDayName(int weekday)Wt::WDate [static]
longMonthName(int month)Wt::WDate [static]
month() const Wt::WDate
operator!=(const WDate &other) const Wt::WDate
operator<(const WDate &other) const Wt::WDate
operator<=(const WDate &other) const Wt::WDate
operator==(const WDate &other) const Wt::WDate
operator>(const WDate &other) const Wt::WDate
operator>=(const WDate &other) const Wt::WDate
setDate(int year, int month, int day)Wt::WDate
shortDayName(int weekday)Wt::WDate [static]
shortMonthName(int month)Wt::WDate [static]
toJulianDay() const Wt::WDate
toString() const Wt::WDate
toString(const WString &format) const Wt::WDate
WDate()Wt::WDate
WDate(int year, int month, int day)Wt::WDate
year() const Wt::WDate
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDate.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDate.html new file mode 100644 index 0000000..ec44f66 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDate.html @@ -0,0 +1,727 @@ + + + + +Wt: Wt::WDate Class Reference + + + + + + + + + +
+ +
+

Wt::WDate Class Reference

+
+
+ +

A gregorian calendar date. +More...

+ +

#include <Wt/WDate>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WDate ()
 Construct a Null date.
 WDate (int year, int month, int day)
 Specify a date by year, month, and day.
void setDate (int year, int month, int day)
 Sets the date by year, month, and day.
WDate addDays (int ndays) const
 Adds days.
WDate addMonths (int nmonths) const
 Adds months.
WDate addYears (int nyears) const
 Adds years.
bool isNull () const
 Returns if this date is Null.
bool isValid () const
 Returns if this date is valid.
+int year () const
 Returns the year.
+int month () const
 Returns the month (1-12).
+int day () const
 Returns the day of month (1-31).
int dayOfWeek () const
 Returns the day of week (1-7).
+int daysTo (const WDate &date) const
 Returns the difference between two dates (in days).
int toJulianDay () const
 Converts the date to a Julian day.
+bool operator< (const WDate &other) const
 Compares two dates.
+bool operator<= (const WDate &other) const
 Compares two dates.
+bool operator> (const WDate &other) const
 Compares two dates.
+bool operator>= (const WDate &other) const
 Compares two dates.
+bool operator== (const WDate &other) const
 Compares two dates.
+bool operator!= (const WDate &other) const
 Compares two dates.
WString toString () const
 Formats this date to a string using a default format.
WString toString (const WString &format) const
 Formats this date to a string using a specified format.

+Static Public Member Functions

static WDate fromString (const WString &s)
 Parses a string to a date using a default format.
static WDate fromString (const WString &s, const WString &format)
 Parses a string to a date using a specified format.
static WDate currentDate ()
 Reports the current client date.
static WDate currentServerDate ()
 Reports the current server date.
static WString shortDayName (int weekday)
 Returns the short day name.
static WString shortMonthName (int month)
 Returns the short month name.
static WString longDayName (int weekday)
 Returns the long day name.
static WString longMonthName (int month)
 Returns the long month name.
+

Detailed Description

+

A gregorian calendar date.

+

Class which holds a date on the gregorian calendar, specified as day/month/year.

+

A WDate may either specify a valid date, or be a Null date (using the default constructor WDate::WDate(), for which isNull() returns true).

+

A valid date may be specified by year, month, and day of month (using the WDate(year, month, day) constructor, or the setDate() method). When attempting to specify an invalid date (with an impossible combination of year/month/date), isIvalid() will return false.

+

The class provides a flexible way for converting between strings and dates. Use toString() to convert to strings, and fromString() for parsing strings. Both methods take a format string, and the same format syntax is supported by both methods.

+

Simple operations are supported to compare dates, or to calculate with dates. These operations throw InvalidDateException when one of the dates is invalid.

+

i18n

+

If the thread using a WDate is bound to a WApplication (i.e. WApplication::instance() does not return 0), the date strings can be localized by overriding the default values for the localized string keys in the resource bundles of the WApplication:

+
    +
  • Short day names: Wt.WDate.Mon through Wt.WDate.Sun
  • +
  • Long day names: Wt.WDate.Monday through Wt.WDate.Sunday
  • +
  • Short month names: Wt.WDate.Jan through Wt.WDate.Dec
  • +
  • Long month names: Wt.WDate.January through Wt.WDate.December
  • +
+

If the thread using a WDate is not bound to a WApplication (i.e. WApplication::instance() returns 0), english strings will be used.

+

Internationalization affects both WDate to string conversions and string to WDate conversion.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WDate::WDate ( )
+
+
+ +

Construct a Null date.

+

A date for which isNull() returns true. A Null date is also invalid.

+
See also:
isValid(), isNull()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WDate::WDate (int  year,
int  month,
int  day 
)
+
+
+ +

Specify a date by year, month, and day.

+

The month has range 1-12 and the day has range 1-31. When the date is invalid, isValid() is set to false.

+
See also:
setDate(), year(), month(), day()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WDate Wt::WDate::addDays (int  ndays ) const
+
+
+ +

Adds days.

+

Returns a date that is ndays later than this date. Negative values for ndays will result in a date that is as many days earlier.

+
See also:
addMonths(), addYears()
+ +
+
+ +
+
+ + + + + + + + +
WDate Wt::WDate::addMonths (int  nmonths ) const
+
+
+ +

Adds months.

+

Returns a date that is the same day of the month, but nmonths later than this date. Negative values for nmonths will result in a date that is as many months earlier.

+
See also:
addDays(), addYears()
+ +
+
+ +
+
+ + + + + + + + +
WDate Wt::WDate::addYears (int  nyears ) const
+
+
+ +

Adds years.

+

Returns a date that is nyears later than this date. Negative values for nyears will result in a date that is as many years earlier.

+
See also:
addDays(), addMonths()
+ +
+
+ +
+
+ + + + + + + +
WDate Wt::WDate::currentDate ( ) [static]
+
+
+ +

Reports the current client date.

+

This method uses browser information to retrieve the date that is configured in the client.

+
Note:
Not Yet Implemented !
+ +
+
+ +
+
+ + + + + + + +
WDate Wt::WDate::currentServerDate ( ) [static]
+
+
+ +

Reports the current server date.

+

This method returns the date as indicated by the system clock of the server.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WDate::dayOfWeek ( ) const
+
+
+ +

Returns the day of week (1-7).

+

Returns the day of week, from Monday (=1) to Sunday (=7).

+ +
+
+ +
+
+ + + + + + + + +
WDate Wt::WDate::fromString (const WString s ) [static]
+
+
+ +

Parses a string to a date using a default format.

+

The default format is "ddd MMM d yyyy". For example, a date specified as:

+
   "Wed Aug 29 2007"
+

will be parsed as a date that equals a date constructed as:

+
   WDate d(2007,8,29);
+

When the date could not be parsed or is not valid, an invalid date is returned (for which isValid() returns false).

+
See also:
fromString(const WString& s, const WString& format), isValid()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WDate Wt::WDate::fromString (const WString s,
const WString format 
) [static]
+
+
+ +

Parses a string to a date using a specified format.

+

The format follows the same syntax as used by toString(const WString& format).

+

When the date could not be parsed or is not valid, an invalid date is returned (for which isValid() returns false).

+
See also:
toString(const WString&) const
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDate::isNull ( ) const
+
+
+ +

Returns if this date is Null.

+

A null date is also invalid.

+
See also:
isValid(), WDate()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDate::isValid ( ) const
+
+
+ +

Returns if this date is valid.

+
See also:
isNull(), WDate(int, int, int), setDate()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDate::longDayName (int  weekday ) [static]
+
+
+ +

Returns the long day name.

+

Results (for given weekDay) are (default English):
+ "Monday" (1),
+ "Tuesday" (2),
+ "Wednesday" (3),
+ "Thursday" (4),
+ "Friday" (5),
+ "Saturday" (6),
+ "Sunday" (7).

+

The result is affected by localization using the "Wt.WDate.Monday" to "Wt.WDate.Sunday" keys.

+
See also:
shortDayName()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDate::longMonthName (int  month ) [static]
+
+
+ +

Returns the long month name.

+

Results (for given month) are (default English):
+ "January" (1),
+ "February" (2),
+ "March" (3),
+ "April" (4),
+ "May" (5),
+ "June" (6),
+ "July" (7),
+ "August" (8),
+ "September" (9),
+ "October" (10),
+ "November" (11),
+ "December" (12).

+

The result is affected by localization using the "Wt.WDate.January" to "Wt.WDate.December" keys.

+
See also:
shortDayName()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WDate::setDate (int  year,
int  month,
int  day 
)
+
+
+ +

Sets the date by year, month, and day.

+

The month has range 1-12 and the day has range 1-31. When the new date is invalid, isValid() is set to false.

+
See also:
WDate(int year, int month, int day), year(), month(), day()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDate::shortDayName (int  weekday ) [static]
+
+
+ +

Returns the short day name.

+

Results (for given weekDay) are (default English):
+ "Mon" (1),
+ "Tue" (2),
+ "Wed" (3),
+ "Thu" (4),
+ "Fri" (5),
+ "Sat" (6),
+ "Sun" (7).

+

The result is affected by localization using the "Wt.WDate.Mon" to "Wt.WDate.Sun" keys.

+
See also:
longDayName()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDate::shortMonthName (int  month ) [static]
+
+
+ +

Returns the short month name.

+

Results (for given month) are (default English):
+ "Jan" (1),
+ "Feb" (2),
+ "Mar" (3),
+ "Apr" (4),
+ "May" (5),
+ "Jun" (6),
+ "Jul" (7),
+ "Aug" (8),
+ "Sep" (9),
+ "Oct" (10),
+ "Nov" (11),
+ "Dec" (12)
+.

+

The result is affected by localization using the "Wt.WDate.Jan" to "Wt.WDate.Dec" keys.

+
See also:
longMonthName()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WDate::toJulianDay ( ) const
+
+
+ +

Converts the date to a Julian day.

+
See also:
fromJulianDay()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDate::toString (const WString format ) const
+
+
+ +

Formats this date to a string using a specified format.

+

The format is a string in which the following contents has a special meaning.

+ + + + + + + + + + + + + + + + + + + + + + + +
CodeMeaning Example (for Mon Aug 3 2007)
dThe day without leading zero (1-31) 3
ddThe day with leading zero (01-31) 03
dddThe day abbreviated using shortDayName() Mon
ddddThe day abbreviated using longDayName() Monday
MThe month without leading zero (1-12) 8
MMThe month with leading zero (01-12) 08
MMMThe month abbreviated using shortMonthName() Aug
MMMMThe month abbreviated using longMonthName() August
yyThe year as a two-digit number (00-99) 07
yyyyThe year as a four-digit number (-9999-9999) 2007
+

Any other text is kept literally. String content between single quotes (') are not interpreted as special codes. Inside a string, a literal quote may be specifed using a double quote ('').

+

Examples of format and result:

+ + + + + + + + + + + +
FormatResult (for Mon Aug 3 2007)
ddd MMM d yyyyMon Aug 3 2007
dd/MM/yyyy03/08/2007
dddd, MMM d, yyyyWednesday, Aug 3, 2007
'MM': MM, 'd': d, 'yyyy': yyyyMM: 08, d: 3, yyyy: 2007
+
See also:
fromString(const WString& value, const WString& format)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDate::toString ( ) const
+
+
+ +

Formats this date to a string using a default format.

+

The default format is "ddd MMM d yyyy". For example, a date constructed as:

+
   WDate d(2007,8,29);
+

will be formatted as:

+
   "Wed Aug 29 2007"
+
See also:
toString(const WString& format) const, fromString()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker-members.html new file mode 100644 index 0000000..c38264b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker-members.html @@ -0,0 +1,195 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDatePicker Member List

+
+
+This is the complete list of members for Wt::WDatePicker, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
bottom() const Wt::WDatePicker
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
calendar() const Wt::WDatePicker
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
changed()Wt::WDatePicker
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
date() const Wt::WDatePicker
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
displayWidget() const Wt::WDatePicker
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
format() const Wt::WDatePicker
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineEdit() const Wt::WDatePicker
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setBottom(const WDate &bottom)Wt::WDatePicker
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDate(const WDate &date)Wt::WDatePicker
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool disabled)Wt::WDatePicker [virtual]
setEnabled(bool enabled)Wt::WDatePicker
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setFormat(const WString &format)Wt::WDatePicker
setGlobalPopup(bool global)Wt::WDatePicker
setHidden(bool hidden)Wt::WDatePicker [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPopupVisible(bool visible)Wt::WDatePicker
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setTop(const WDate &top)Wt::WDatePicker
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
top() const Wt::WDatePicker
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
WDatePicker(WContainerWidget *parent=0)Wt::WDatePicker
WDatePicker(WInteractWidget *displayWidget, WLineEdit *forEdit, WContainerWidget *parent=0)Wt::WDatePicker
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WDatePicker()Wt::WDatePicker
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker.html new file mode 100644 index 0000000..3162c3b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker.html @@ -0,0 +1,457 @@ + + + + +Wt: Wt::WDatePicker Class Reference + + + + + + + + + +
+ +
+

Wt::WDatePicker Class Reference

+
+
+ +

A date picker. +More...

+ +

#include <Wt/WDatePicker>

+
+Inheritance diagram for Wt::WDatePicker:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WDatePicker (WContainerWidget *parent=0)
 Create a new date picker.
 WDatePicker (WInteractWidget *displayWidget, WLineEdit *forEdit, WContainerWidget *parent=0)
 Create a new date picker for existing line edit and with custom display widget.
~WDatePicker ()
 Destructor.
void setFormat (const WString &format)
 Sets the format used for parsing or writing the date in the line edit.
const WStringformat () const
 Returns the format.
WCalendarcalendar () const
 The calendar widget.
WLineEditlineEdit () const
 The line edit.
WInteractWidgetdisplayWidget () const
 The display widget.
WDate date () const
 The current date.
void setDate (const WDate &date)
 Sets the current date.
void setEnabled (bool enabled)
 Sets whether the widget is enabled.
virtual void setDisabled (bool disabled)
 Sets whether the widget is disabled.
+void setHidden (bool hidden)
 Hide/unhide the widget.
+void setBottom (const WDate &bottom)
 Sets the bottom of the valid date range.
+WDate bottom () const
 Returns the bottom date of the valid range.
+void setTop (const WDate &top)
 Sets the top of the valid date range.
+WDate top () const
 Returns the top date of the valid range.
Signalchanged ()
 Signal emitted when the value has changed.
void setGlobalPopup (bool global)
 Controls how the calendar popup is positioned.
+void setPopupVisible (bool visible)
 Shows or hides the popup.
+

Detailed Description

+

A date picker.

+

A date picker shows a line edit and an icon which when clicked popups a WCalendar for editing the date. Any date entered in the line edit is reflected in the calendar, and vice-versa.

+

Each of these widgets may be accessed individually (lineEdit(), calendar(), and displayWidget()) and there is a constructor that allows you to specify an existing line edit and display widget.

+

The date format used by default is "dd/MM/yyyy" and can be changed using setFormat(). At any time, the date set may be read using date(), or can be changed using setDate().

+

Usage example:

+
 Wt::WDatePicker *picker = new Wt::WDatePicker(this);
+ picker->setFormat("dd-MM-yyyy");
+ picker->setDate(Wt::WDate(1976, 6, 14));
+

i18n

+

Internationalization of WDatePicker is mostly handled through the internationalization mechanism of WDate. The 'Close' button can be internationalized by overriding the default value for the localization key Wt.DatePicker.Close.

+

CSS

+

The date picker is styled by the current CSS theme. The look can be overridden using the Wt-datepicker and Wt-outset CSS class; the calendar itself can be styled as documented in WCalendar.

+ + + +
+WDatePicker-default-1.png +

Example of a WDatePicker (default theme)

+
+WDatePicker-polished-1.png +

Example of a WDatePicker (polished theme)

+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WDatePicker::WDatePicker (WContainerWidget parent = 0 )
+
+
+ +

Create a new date picker.

+

This constructor creates a line edit with an icon that leads to a popup calendar. A WDateValidator is configured for the line edit.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WDatePicker::WDatePicker (WInteractWidget displayWidget,
WLineEdit forEdit,
WContainerWidget parent = 0 
)
+
+
+ +

Create a new date picker for existing line edit and with custom display widget.

+

The displayWidget is a button or image which much be clicked to open the date picker. This widget will become owned by the picker.

+

The forEdit argument is the lineEdit that works in conjunction with the date picker. This widget does not become part of the date picker, and may be located anywhere else.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WCalendar* Wt::WDatePicker::calendar ( ) const
+
+
+ +

The calendar widget.

+

Returns the calendar widget.

+ +
+
+ +
+
+ + + + + + + +
Signal & Wt::WDatePicker::changed ( )
+
+
+ +

Signal emitted when the value has changed.

+

This signal is emitted when a new date has been entered (either through the line edit, or through the calendar popup).

+ +
+
+ +
+
+ + + + + + + +
WDate Wt::WDatePicker::date ( ) const
+
+
+ +

The current date.

+

Reads the current date from the lineEdit().

+

Returns an invalid date (for which WDate::isValid() returns false) if the date could not be parsed using the current format().
+

+
See also:
setDate(), WDate::fromString(), WLineEdit::text()
+ +
+
+ +
+
+ + + + + + + +
WInteractWidget* Wt::WDatePicker::displayWidget ( ) const
+
+
+ +

The display widget.

+

Returns the widget which is displayed to activate the calendar.

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WDatePicker::format ( ) const
+
+
+ +

Returns the format.

+
See also:
setFormat()
+ +
+
+ +
+
+ + + + + + + +
WLineEdit* Wt::WDatePicker::lineEdit ( ) const
+
+
+ +

The line edit.

+

Returns the line edit which works in conjunction with this date picker.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDatePicker::setDate (const WDate date )
+
+
+ +

Sets the current date.

+

Does nothing if the current date is Null.

+
See also:
date()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDatePicker::setDisabled (bool  disabled ) [virtual]
+
+
+ +

Sets whether the widget is disabled.

+

Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.

+

Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.

+
See also:
disable(), enable()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDatePicker::setEnabled (bool  enabled )
+
+
+ +

Sets whether the widget is enabled.

+

This is the oppositie of setDisabled().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDatePicker::setFormat (const WString format )
+
+
+ +

Sets the format used for parsing or writing the date in the line edit.

+

Sets the format used for representing the date in the line edit. If the line edit has a WDateValidator configured for it, then also there the format is updated.

+

The default format is 'dd/MM/yyyy'.

+
See also:
format(), WDate::toString()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDatePicker::setGlobalPopup (bool  global )
+
+
+ +

Controls how the calendar popup is positioned.

+

When global is true, then the popup will position itself globally. This avoids that the popup is affected by enclosing parents with overflow settings that clip the popup. This makes the popup however no longer follow the popup button when this button moves.

+

The default is false.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.md5 new file mode 100644 index 0000000..7b0638a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.md5 @@ -0,0 +1 @@ +5dffa0488478bafc24102fcf2bdf0fcf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.png new file mode 100644 index 0000000..7f5476a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDatePicker__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime-members.html new file mode 100644 index 0000000..a288702 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime-members.html @@ -0,0 +1,112 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDateTime Member List

+
+
+This is the complete list of members for Wt::WDateTime, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addDays(int ndays) const Wt::WDateTime
addMonths(int nmonths) const Wt::WDateTime
addMSecs(int ms) const Wt::WDateTime
addSecs(int s) const Wt::WDateTime
addYears(int nyears) const Wt::WDateTime
currentDateTime()Wt::WDateTime [static]
date() const Wt::WDateTime
daysTo(const WDateTime &other) const Wt::WDateTime
fromPosixTime(const boost::posix_time::ptime &datetime)Wt::WDateTime [static]
fromString(const WString &s)Wt::WDateTime [static]
fromString(const WString &s, const WString &format)Wt::WDateTime [static]
fromTime_t(std::time_t seconds)Wt::WDateTime [static]
isNull() const Wt::WDateTime
isValid() const Wt::WDateTime
operator!=(const WDateTime &other) const Wt::WDateTime
operator<(const WDateTime &other) const Wt::WDateTime
operator<=(const WDateTime &other) const Wt::WDateTime
operator==(const WDateTime &other) const Wt::WDateTime
operator>(const WDateTime &other) const Wt::WDateTime
operator>=(const WDateTime &other) const Wt::WDateTime
secsTo(const WDateTime &other) const Wt::WDateTime
setDate(const WDate &date)Wt::WDateTime
setPosixTime(const boost::posix_time::ptime &time)Wt::WDateTime
setTime(const WTime &time)Wt::WDateTime
setTime_t(std::time_t time)Wt::WDateTime
time() const Wt::WDateTime
timeTo(const WDateTime &other, int minValue=1) const Wt::WDateTime
toPosixTime() const Wt::WDateTime
toString() const Wt::WDateTime
toString(const WString &format) const Wt::WDateTime
toTime_t() const Wt::WDateTime
WDateTime()Wt::WDateTime
WDateTime(const WDate &date)Wt::WDateTime [explicit]
WDateTime(const WDate &date, const WTime &time)Wt::WDateTime
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime.html new file mode 100644 index 0000000..3da4d82 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateTime.html @@ -0,0 +1,769 @@ + + + + +Wt: Wt::WDateTime Class Reference + + + + + + + + + +
+ +
+

Wt::WDateTime Class Reference

+
+
+ +

A calendar date and clock time. +More...

+ +

#include <Wt/WDateTime>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WDateTime ()
 Creates a Null datetime.
 WDateTime (const WDate &date)
 Creates a datetime given a date.
 WDateTime (const WDate &date, const WTime &time)
 Creates a datetime given a date and time.
void setTime_t (std::time_t time)
 Sets the time in seconds from the Epoch.
+void setPosixTime (const boost::posix_time::ptime &time)
 Sets the date time.
WDateTime addMSecs (int ms) const
 Adds milliseconds.
WDateTime addSecs (int s) const
 Adds seconds.
WDateTime addDays (int ndays) const
 Adds days.
WDateTime addMonths (int nmonths) const
 Adds months.
WDateTime addYears (int nyears) const
 Adds years.
bool isNull () const
 Returns if this datetime is Null.
bool isValid () const
 Returns if this datetime is valid.
void setDate (const WDate &date)
 Sets the date part.
WDate date () const
 Returns the date part.
void setTime (const WTime &time)
 Sets the time part.
WTime time () const
 Returns the time part.
std::time_t toTime_t () const
 Returns the number of seconds since the Epoch.
boost::posix_time::ptime toPosixTime () const
 Returns the boost time.
int secsTo (const WDateTime &other) const
 Returns the difference between to datetime values (in seconds).
int daysTo (const WDateTime &other) const
 Returns the difference between two datetime values (in days).
WString timeTo (const WDateTime &other, int minValue=1) const
 Returns the difference between two datetime values (as text).
+bool operator< (const WDateTime &other) const
 Compares two datetime values.
+bool operator<= (const WDateTime &other) const
 Compares two datetime values.
+bool operator> (const WDateTime &other) const
 Compares two datetime values.
+bool operator>= (const WDateTime &other) const
 Compares two datetime values.
+bool operator== (const WDateTime &other) const
 Compares two datetime values.
+bool operator!= (const WDateTime &other) const
 Compares two datetime values.
WString toString () const
 Formats this datetime to a string using a default format.
WString toString (const WString &format) const
 Formats this time to a string using a specified format.

+Static Public Member Functions

static WDateTime fromString (const WString &s)
 Parses a string to a time using a default format.
static WDateTime fromString (const WString &s, const WString &format)
 Parses a string to a time using a specified format.
static WDateTime currentDateTime ()
 Reports the current UTC datetime.
static WDateTime fromTime_t (std::time_t seconds)
 Creates a date time based on a number of seconds since the Epoch.
static WDateTime fromPosixTime (const boost::posix_time::ptime &datetime)
 Creates a date time from boost's date time type.
+

Detailed Description

+

A calendar date and clock time.

+

The date time class combines the functionality of a WDate (for a calendar date) and WTime (for clock time) into a single class.

+

Conventionally date time is assumed in UTC, which affects the behaviour of the following methods:

+ +

i18n

+

The strings returned by toString() and timeTo() can be localized. If the thread using a WDateTime is bound to a WApplication (i.e. WApplication::instance() does not return 0), the strings can be localized by overriding the default values for the localized string keys in the resource bundles of the WApplication. If the thread using a WDateTime is not bound to a WApplication (i.e. WApplication::instance() returns 0), english strings will be used.

+

For toString(), localization is handled through the i18n functionality of the WDate class. An invalid WDateTime is converted to a string as "Null":

+
    +
  • Wt.WDateTime.null: Null
  • +
+

The timeTo() method contains the following localized strings:

+
    +
  • Wt.WDateTime.second: one second
  • +
  • Wt.WDateTime.seconds: {1} seconds The placeholder {1} will be replaced by the actual number of seconds. The same keys also exist for minutes, hours, days, weeks, monts and years.
  • +
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WDateTime::WDateTime ( )
+
+
+ +

Creates a Null datetime.

+

A time for which isNull() returns true. A Null datetime is also invalid.

+
See also:
isValid(), isNull()
+ +
+
+ +
+
+ + + + + + + + +
Wt::WDateTime::WDateTime (const WDate date ) [explicit]
+
+
+ +

Creates a datetime given a date.

+

The time is set to midnight (00:00). The datetime is valid if the date is valid.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WDateTime::WDateTime (const WDate date,
const WTime time 
)
+
+
+ +

Creates a datetime given a date and time.

+

The datetime is valid if both date and time are valid.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WDateTime Wt::WDateTime::addDays (int  ndays ) const
+
+
+ +

Adds days.

+

Returns a datetime that is ndays later than this datetime. Negative values for ndays will result in a datetime that is as many days earlier.

+
See also:
addMonths(), addYears()
+ +
+
+ +
+
+ + + + + + + + +
WDateTime Wt::WDateTime::addMonths (int  nmonths ) const
+
+
+ +

Adds months.

+

Returns a datetime that is the same day of the month, but nmonths later than this date. Negative values for nmonths will result in a datetime that is as many months earlier.

+
See also:
addDays(), addYears()
+ +
+
+ +
+
+ + + + + + + + +
WDateTime Wt::WDateTime::addMSecs (int  ms ) const
+
+
+ +

Adds milliseconds.

+

Returns a datetime that is ms milliseconds later than this datetime. Negative values for ms will result in a datetime that is as many milliseconds earlier.

+ +
+
+ +
+
+ + + + + + + + +
WDateTime Wt::WDateTime::addSecs (int  s ) const
+
+
+ +

Adds seconds.

+

Returns a datetime that is s seconds later than this datetime. Negative values for s will result in a datetime that is as many seconds earlier.

+ +
+
+ +
+
+ + + + + + + + +
WDateTime Wt::WDateTime::addYears (int  nyears ) const
+
+
+ +

Adds years.

+

Returns a datetime that is nyears later than this datetime. Negative values for nyears will result in a datetime that is as many years earlier.

+
See also:
addDays(), addMonths()
+ +
+
+ +
+
+ + + + + + + +
static WDateTime Wt::WDateTime::currentDateTime ( ) [static]
+
+
+ +

Reports the current UTC datetime.

+

This method returns the datetime as indicated by the system clock of the server, in the UTC timezone.

+ +
+
+ +
+
+ + + + + + + +
WDate Wt::WDateTime::date ( ) const
+
+
+ +

Returns the date part.

+

Returns the date part.

+
See also:
time()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WDateTime::daysTo (const WDateTime other ) const
+
+
+ +

Returns the difference between two datetime values (in days).

+
See also:
secsTo()
+ +
+
+ +
+
+ + + + + + + + +
static WDateTime Wt::WDateTime::fromPosixTime (const boost::posix_time::ptime &  datetime ) [static]
+
+
+ +

Creates a date time from boost's date time type.

+
See also:
toPosixTime()
+ +
+
+ +
+
+ + + + + + + + +
static WDateTime Wt::WDateTime::fromString (const WString s ) [static]
+
+
+ +

Parses a string to a time using a default format.

+

The default format is "ddd MMM d hh:mm:ss yyyy".

+
See also:
WDate::fromString(), WTime::fromString().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
static WDateTime Wt::WDateTime::fromString (const WString s,
const WString format 
) [static]
+
+
+ +

Parses a string to a time using a specified format.

+

The format is a string which mixes the format for WDate and WTime.

+
See also:
WDate::fromString(), WTime::toString().
+ +
+
+ +
+
+ + + + + + + + +
static WDateTime Wt::WDateTime::fromTime_t (std::time_t  seconds ) [static]
+
+
+ +

Creates a date time based on a number of seconds since the Epoch.

+
See also:
setTime_t()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDateTime::isNull ( ) const
+
+
+ +

Returns if this datetime is Null.

+

A null time is also invalid.

+
See also:
isValid(), WDateTime()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDateTime::isValid ( ) const
+
+
+ +

Returns if this datetime is valid.

+

A date time is only valid if its date and time parts are valid.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WDateTime::secsTo (const WDateTime other ) const
+
+
+ +

Returns the difference between to datetime values (in seconds).

+
See also:
daysTo()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateTime::setDate (const WDate date )
+
+
+ +

Sets the date part.

+

Changes the date part part, leaving the time unmodified. If no time was set, it is set to 00:00.

+
See also:
setTime()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateTime::setTime (const WTime time )
+
+
+ +

Sets the time part.

+

If no valid date is set, the time is not set either.

+
See also:
setDate()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateTime::setTime_t (std::time_t  time )
+
+
+ +

Sets the time in seconds from the Epoch.

+

The time is the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970).

+
See also:
toTime_t()
+ +
+
+ +
+
+ + + + + + + +
WTime Wt::WDateTime::time ( ) const
+
+
+ +

Returns the time part.

+
See also:
setTime()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WString Wt::WDateTime::timeTo (const WDateTime other,
int  minValue = 1 
) const
+
+
+ +

Returns the difference between two datetime values (as text).

+

This returns a textual representation of the approximate difference between this time and other. The textual representation returns the difference as a number of seconds, minutes, hours, days, weeks, months, or years, using the coarsest unit that is more than minValue.

+
See also:
daysTo(), secsTo()
+ +
+
+ +
+
+ + + + + + + +
boost::posix_time::ptime Wt::WDateTime::toPosixTime ( ) const
+
+
+ +

Returns the boost time.

+
See also:
fromPosixTime()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDateTime::toString ( ) const
+
+
+ +

Formats this datetime to a string using a default format.

+

The default format is "ddd MMM d hh:mm:ss yyyy".

+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WDateTime::toString (const WString format ) const
+
+
+ +

Formats this time to a string using a specified format.

+

The format is a string which mixes the format for WDate and WTime.

+
See also:
WDate::toString(), WTime::toString()
+ +
+
+ +
+
+ + + + + + + +
std::time_t Wt::WDateTime::toTime_t ( ) const
+
+
+ +

Returns the number of seconds since the Epoch.

+

This returns the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970) represented by this datetime.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator-members.html new file mode 100644 index 0000000..001edc5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator-members.html @@ -0,0 +1,130 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDateValidator Member List

+
+
+This is the complete list of members for Wt::WDateValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
bottom() const Wt::WDateValidator
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WDateValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
format() const Wt::WDateValidator
formats() const Wt::WDateValidator
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
invalidNotADateText() const Wt::WDateValidator
invalidTooEarlyText() const Wt::WDateValidator
invalidTooLateText() const Wt::WDateValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WDateValidator [protected, virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parse(const WString &input)Wt::WDateValidator [static]
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setBottom(const WDate &bottom)Wt::WDateValidator
setFormat(const WString &format)Wt::WDateValidator
setFormats(const std::vector< WString > &formats)Wt::WDateValidator
setInvalidBlankText(const WString &text)Wt::WValidator
setInvalidNotADateText(const WString &text)Wt::WDateValidator
setInvalidTooEarlyText(const WString &text)Wt::WDateValidator
setInvalidTooLateText(const WString &text)Wt::WDateValidator
setMandatory(bool how)Wt::WValidator
setObjectName(const std::string &name)Wt::WObject
setTop(const WDate &top)Wt::WDateValidator
State enum nameWt::WValidator
top() const Wt::WDateValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WDateValidator [virtual]
WDateValidator(WObject *parent=0)Wt::WDateValidator
WDateValidator(const WDate &bottom, const WDate &top, WObject *parent=0)Wt::WDateValidator
WDateValidator(const WString &format, WObject *parent=0)Wt::WDateValidator
WDateValidator(const WString &format, const WDate &bottom, const WDate &top, WObject *parent=0)Wt::WDateValidator
WObject(WObject *parent=0)Wt::WObject
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator.html new file mode 100644 index 0000000..02191cb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator.html @@ -0,0 +1,573 @@ + + + + +Wt: Wt::WDateValidator Class Reference + + + + + + + + + + +
+ +

A validator for date input. +More...

+ +

#include <Wt/WDateValidator>

+
+Inheritance diagram for Wt::WDateValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WDateValidator (WObject *parent=0)
 Creates a date validator.
 WDateValidator (const WDate &bottom, const WDate &top, WObject *parent=0)
 Creates a date validator.
 WDateValidator (const WString &format, WObject *parent=0)
 Creates a date validator.
 WDateValidator (const WString &format, const WDate &bottom, const WDate &top, WObject *parent=0)
 Creates a date validator.
void setBottom (const WDate &bottom)
 Sets the bottom of the valid date range.
+const WDatebottom () const
 Returns the bottom date of the valid range.
void setTop (const WDate &top)
 Sets the top of the valid date range.
+const WDatetop () const
 Returns the top date of the valid range.
void setFormat (const WString &format)
 Sets the date format used to parse date strings.
const WStringformat () const
 Returns the format string used to parse date strings.
+void setFormats (const std::vector< WString > &formats)
 Sets the date formats used to parse date strings.
+const std::vector< WString > & formats () const
 Returns the date formats used to parse date strings.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
void setInvalidNotADateText (const WString &text)
 Sets the message to display when the input is not a date.
WString invalidNotADateText () const
 Returns the message displayed when the input is not a date.
void setInvalidTooEarlyText (const WString &text)
 Sets the message to display when the date is earlier than bottom.
WString invalidTooEarlyText () const
 Returns the message displayed when date is too early.
void setInvalidTooLateText (const WString &text)
 Sets the message to display when the date is later than top.
WString invalidTooLateText () const
 Returns the message displayed when the date is too late.

+Static Public Member Functions

static WDate parse (const WString &input)
 Parses a date from a string (deprecated).

+Protected Member Functions

std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
+

Detailed Description

+

A validator for date input.

+

This validator accepts input in the given date format, and optionally checks if the date is within a given range.

+

The format string used for validating user input are the same as those used by WDate::fromString().

+

Usage example:

+
 Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
+ Wt::WDateValidator *validator = new Wt::WDateValidator();
+ validator->setFormat("dd-MM-yyyy");
+ lineEdit->setValidator(validator);
+ lineEdit->setText("01-03-2008");
+

i18n

+

The strings used in the WDateValidator can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WDateValidator.DateTooEarly: The date must be after {1}
  • +
  • Wt.WDateValidator.DateTooLate: The date must be before {1}
  • +
  • Wt.WDateValidator.WrongDateRange: The date must be between {1} and {2}
  • +
  • Wt.WDateValidator.WrongFormat: Must be a date in the format '{1}'
  • +
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WDateValidator::WDateValidator (WObject parent = 0 )
+
+
+ +

Creates a date validator.

+

The validator will accept any date of the format 'yyyy-MM-dd'.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WDateValidator::WDateValidator (const WDate bottom,
const WDate top,
WObject parent = 0 
)
+
+
+ +

Creates a date validator.

+

The validator will accept dates in the indicated range in the format 'yyyy-MM-dd'.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WDateValidator::WDateValidator (const WString format,
WObject parent = 0 
)
+
+
+ +

Creates a date validator.

+

The validator will accept dates in the date format format.

+

The syntax for format is as in WDate::fromString()

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WDateValidator::WDateValidator (const WString format,
const WDate bottom,
const WDate top,
WObject parent = 0 
)
+
+
+ +

Creates a date validator.

+

The validator will accept only dates within the indicated range bottom to top, in the date format format.

+

The syntax for format is as in WDate::fromString()

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WString& Wt::WDateValidator::format ( ) const
+
+
+ +

Returns the format string used to parse date strings.

+
See also:
setFormat()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDateValidator::invalidNotADateText ( ) const
+
+
+ +

Returns the message displayed when the input is not a date.

+
See also:
setInvalidNotADateText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDateValidator::invalidTooEarlyText ( ) const
+
+
+ +

Returns the message displayed when date is too early.

+
See also:
setInvalidTooEarlyText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDateValidator::invalidTooLateText ( ) const
+
+
+ +

Returns the message displayed when the date is too late.

+
See also:
setInvalidTooLateText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WDateValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + + +
WDate Wt::WDateValidator::parse (const WString input ) [static]
+
+
+ +

Parses a date from a string (deprecated).

+
Deprecated:
see WDate::fromString() static methods.
+

Equivalent to WDate::fromString(input, "yyyy-MM-dd");

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setBottom (const WDate bottom )
+
+
+ +

Sets the bottom of the valid date range.

+

The default is a null date constructed using WDate().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setFormat (const WString format )
+
+
+ +

Sets the date format used to parse date strings.

+
See also:
WDate::fromString()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setInvalidNotADateText (const WString text )
+
+
+ +

Sets the message to display when the input is not a date.

+

The default message is "The date must be of the format {1}", with as first argument the format string.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setInvalidTooEarlyText (const WString text )
+
+
+ +

Sets the message to display when the date is earlier than bottom.

+

Depending on whether bottom() and top() are defined (see WDate::isNull()), the default message is "The date + must be between {1} and {2}" or "The date must be after {1}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setInvalidTooLateText (const WString text )
+
+
+ +

Sets the message to display when the date is later than top.

+

Depending on whether bottom() and top() are defined, the default message is "The date must be + between {1} and {2}" or "The date must be before {2}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDateValidator::setTop (const WDate top )
+
+
+ +

Sets the top of the valid date range.

+

The default is a null date constructed using WDate().

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WDateValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

The input is considered valid only when it is blank for a non-mandatory field, or represents a date in the given format, and within the valid range.

+ +

Reimplemented from Wt::WValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.map new file mode 100644 index 0000000..f8b635b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.md5 new file mode 100644 index 0000000..96617b5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.md5 @@ -0,0 +1 @@ +bcbf99a7b440d51091c89c951680b1de \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.png new file mode 100644 index 0000000..d42dd90 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDateValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout-members.html new file mode 100644 index 0000000..598022b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout-members.html @@ -0,0 +1,119 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDefaultLayout Member List

+
+
+This is the complete list of members for Wt::WDefaultLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WDefaultLayout [virtual]
addWidget(WWidget *widget)Wt::WLayout
children() const Wt::WObject
count() const Wt::WDefaultLayout [virtual]
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WDefaultLayout [virtual]
itemAt(int index) const Wt::WDefaultLayout [virtual]
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WDefaultLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WDefaultLayout(WWidget *parent=0)Wt::WDefaultLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WDefaultLayout()Wt::WDefaultLayout
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout.html new file mode 100644 index 0000000..a3062aa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout.html @@ -0,0 +1,236 @@ + + + + +Wt: Wt::WDefaultLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WDefaultLayout Class Reference

+
+
+ +

A default layout manager. +More...

+ +

#include <Wt/WDefaultLayout>

+
+Inheritance diagram for Wt::WDefaultLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

WDefaultLayout (WWidget *parent=0)
 Creates a new WDefaultLayout.
~WDefaultLayout ()
 Destructor.
virtual void addItem (WLayoutItem *item)
 Adds a layout item.
virtual void removeItem (WLayoutItem *item)
 Removes a layout item (widget or nested layout).
virtual WLayoutItemitemAt (int index) const
 Returns the layout item at a specific index.
virtual int indexOf (WLayoutItem *item) const
 Returns the index of a given item.
virtual int count () const
 Returns the number of items in this layout.
+

Detailed Description

+

A default layout manager.

+

The default layout does not attempt to resize any of the widgets, and puts all widgets vertically above each other.

+
Note:
This layout manager is applicable only to Ext::Container container widgets. However, its behaviour is equivalent to not using a layout manager on a WContainerWidget and adding contents directly using WContainerWidget::addWidget().
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WDefaultLayout::addItem (WLayoutItem item ) [virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout, and is added below the last added item.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WDefaultLayout::count ( ) const [virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WDefaultLayout::indexOf (WLayoutItem item ) const [virtual]
+
+
+ +

Returns the index of a given item.

+

The default implementation loops over all items, and returns the index for which itemAt(index) equals item.

+
See also:
itemAt(int) const
+ +

Reimplemented from Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WDefaultLayout::itemAt (int  index ) const [virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDefaultLayout::removeItem (WLayoutItem item ) [virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.map new file mode 100644 index 0000000..b824942 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.md5 new file mode 100644 index 0000000..f08e468 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.md5 @@ -0,0 +1 @@ +bdc5cc623a248d773cc472b48ec13938 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.png new file mode 100644 index 0000000..ebcf695 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator-members.html new file mode 100644 index 0000000..792fb89 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator-members.html @@ -0,0 +1,218 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDefaultLoadingIndicator Member List

+
+
+This is the complete list of members for Wt::WDefaultLoadingIndicator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
padding(Side side) const Wt::WText
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WText [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMessage(const WString &text)Wt::WDefaultLoadingIndicator [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPadding(const WLength &padding, WFlags< Side > sides=Left|Right)Wt::WText
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::WText
setTextFormat(TextFormat format)Wt::WText
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWordWrap(bool wordWrap)Wt::WText
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::WText
textFormat() const Wt::WText
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WDefaultLoadingIndicator()Wt::WDefaultLoadingIndicator
widget()Wt::WDefaultLoadingIndicator [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
wordWrap() const Wt::WText
WText(WContainerWidget *parent=0)Wt::WText
WText(const WString &text, WContainerWidget *parent=0)Wt::WText
WText(const WString &text, TextFormat textFormat, WContainerWidget *parent=0)Wt::WText
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WLoadingIndicator()Wt::WLoadingIndicator [virtual]
~WObject()Wt::WObject [virtual]
~WText()Wt::WText
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator.html new file mode 100644 index 0000000..6b6d6e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator.html @@ -0,0 +1,168 @@ + + + + +Wt: Wt::WDefaultLoadingIndicator Class Reference + + + + + + + + + +
+ +
+

Wt::WDefaultLoadingIndicator Class Reference

+
+
+ +

A default loading indicator. +More...

+ +

#include <Wt/WDefaultLoadingIndicator>

+
+Inheritance diagram for Wt::WDefaultLoadingIndicator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

WDefaultLoadingIndicator ()
 Constructor.
virtual WWidgetwidget ()
 Returns the widget that visually represents the indicator.
virtual void setMessage (const WString &text)
 Sets the message that you want to be displayed.
+

Detailed Description

+

A default loading indicator.

+

The default loading indicator displays the text message Loading... in the right top corner of the window.

+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WDefaultLoadingIndicator.Loading: Loading...
  • +
+
See also:
WApplication::setLoadingIndicator()
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WDefaultLoadingIndicator::setMessage (const WString text ) [virtual]
+
+
+ +

Sets the message that you want to be displayed.

+

If the indicator is capable of displaying a text message, then you should reimplement this method to allow this message to be modified.

+ +

Implements Wt::WLoadingIndicator.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WDefaultLoadingIndicator::widget ( ) [virtual]
+
+
+ +

Returns the widget that visually represents the indicator.

+

You should reimplement this method to return a widget that will be shown to indicate that a response is pending. The widget should be positioned using CSS.

+

The widget will be shown and hidden using WWidget::show() and WWidget::hide(). If you want to customize this behaviour, you should reimplement the WWidget::setHidden() method. Note that show() and hide() are stateless slots, and thus you need to make sure that your implementation comforms to that contract, so that it may be optimized to JavaScript (the server-side implementation will only be called during stateless slot prelearning).

+
Note:
The widget will not be added to the WApplication::root() container.
+ +

Implements Wt::WLoadingIndicator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.map new file mode 100644 index 0000000..0207484 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.md5 new file mode 100644 index 0000000..80aeac3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.md5 @@ -0,0 +1 @@ +1c7fd53515d17506332c085709feabe7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.png new file mode 100644 index 0000000..6b11b57 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDefaultLoadingIndicator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog-members.html new file mode 100644 index 0000000..0f77802 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog-members.html @@ -0,0 +1,199 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDialog Member List

+
+
+This is the complete list of members for Wt::WDialog, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept()Wt::WDialog [virtual]
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Accepted enum valueWt::WDialog
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
caption() const Wt::WDialog
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
contents() const Wt::WDialog
decorationStyle()Wt::WCompositeWidget [virtual]
DialogCode enum nameWt::WDialog
disable()Wt::WWidget
done(DialogCode r)Wt::WDialog [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
exec()Wt::WDialog
find(const std::string &name)Wt::WCompositeWidget [virtual]
finished()Wt::WDialog
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isModal() const Wt::WDialog
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isTitleBarEnabled() const Wt::WDialog
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
reject()Wt::WDialog [virtual]
Rejected enum valueWt::WDialog
rejectWhenEscapePressed()Wt::WDialog
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
result() const Wt::WDialog
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setCaption(const WString &caption)Wt::WDialog
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool hidden)Wt::WDialog [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setModal(bool modal)Wt::WDialog
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setTitleBarEnabled(bool enabled)Wt::WDialog
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
setWindowTitle(const WString &title)Wt::WDialog
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
titleBar() const Wt::WDialog
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
WDialog(const WString &windowTitle=WString())Wt::WDialog
width() const Wt::WCompositeWidget [virtual]
windowTitle() const Wt::WDialog
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WDialog()Wt::WDialog
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog.html new file mode 100644 index 0000000..e12941b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog.html @@ -0,0 +1,598 @@ + + + + +Wt: Wt::WDialog Class Reference + + + + + + + + + +
+ +
+

Wt::WDialog Class Reference

+
+
+ +

A WDialog shows a dialog. +More...

+ +

#include <Wt/WDialog>

+
+Inheritance diagram for Wt::WDialog:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  DialogCode { Rejected, +Accepted + }
 

The result of a modal dialog execution.

+ More...

+Public Member Functions

 WDialog (const WString &windowTitle=WString())
 Constructs a WDialog with a given window title.
~WDialog ()
 Destructs a WDialog.
void setWindowTitle (const WString &title)
 Sets the dialog window title.
const WStringwindowTitle () const
 Returns the dialog window title.
void setCaption (const WString &caption)
 Sets the dialog caption (deprecated).
const WStringcaption () const
 Returns the dialog caption (deprecated).
void setTitleBarEnabled (bool enabled)
 Enables or disables the title bar.
bool isTitleBarEnabled () const
 Returns whether the title bar is enabled.
WContainerWidgettitleBar () const
 Returns the dialog title bar container.
WContainerWidgetcontents () const
 Returns the dialog contents container.
DialogCode exec ()
 Executes the dialog in a recursive event loop.
virtual void done (DialogCode r)
 Stops the dialog.
virtual void accept ()
 Closes the dialog, with result is Accepted.
virtual void reject ()
 Closes the dialog, with result is Rejected.
void rejectWhenEscapePressed ()
 Lets pressing the escape key reject the dialog.
Signal< DialogCode > & finished ()
 Signal emitted when the dialog is closed.
DialogCode result () const
 Returns the result that was set for this dialog.
void setModal (bool modal)
 Sets whether the dialog is modal.
bool isModal () const
 Returns whether the dialog is modal.
virtual void setHidden (bool hidden)
 Sets whether the widget is hidden.
+

Detailed Description

+

A WDialog shows a dialog.

+

By default, the dialog is modal. A modal window blocks the user interface, and does not allow the user to interact with any other part of the user interface until the dialog is closed (this is enforced at the server side, so you may rely on this behavior).

+

There are two distinct ways for using a WDialog window.

+

A WDialog can be used as any other widget. In this case, the WDialog is simply instantiated as another widget. The dialog may be closed by calling accept(), reject() or done() (or connecting a signal to one of these methods). This will hide the dialog and emit the finished() signal, which you then can listen for to process the dialog result and delete the dialog. Unlike other widgets, a dialog does not need to be added to a parent widget, but is hidden by default. You must use the method show() or setHidden(true) to show the dialog.

+

The easiest way to display a modal dialog is using exec(): after creating a WDialog window, a call to exec() will block (suspend the thread) until the dialog window is closed, and return the dialog result. Typically, an OK button will be connected to accept(), and in some cases a Cancel button to reject(). This solution has the drawback that it is not scalable to many concurrent sessions, since for every session with a recursive event loop (which is running durring the exec() method), a thread is locked. In practical terms, this means it is only suitable for software with restricted access or deployed on an intranet or extranet.

+

Use setModal(false) to create a non-modal dialog. A non-modal dialog does not block the underlying user interface: the user must not first deal with the dialog before interacting with the rest of the user interface.

+

Contents for the dialog is defined by adding it to the contents() widget.

+

Usage example, using the exec() method:

+
 Wt::WDialog dialog("Personalia");
+  
+ new Wt::WText("Enter your name: ", dialog.contents());
+ Wt::WLineEdit edit(dialog.contents());
+ new Wt::WBreak(dialog.contents());
+  
+ Wt::WPushButton ok("Ok", dialog.contents());
+
+ // these events will accept() the Dialog
+ edit.enterPressed().connect(&dialog, &Wt::WDialog::accept);
+ ok.clicked().connect(&dialog, &Wt::WDialog::accept);
+  
+ if (dialog.exec() == Wt::WDialog::Accepted)
+   setStatus("Welcome, " + edit.text());
+

This dialog looks like this (using the standard look):

+ + + +
+WDialog-default-1.png +

A simple custom dialog (default)

+
+WDialog-polished-1.png +

A simple custom dialog (polished)

+
+

CSS

+

A dialog has the Wt-dialog and Wt-outset style classes. The look can be overridden using the following style class selectors:

+
+ .Wt-dialog .titlebar : The title bar
+ .Wt-dialog .body     : The body (requires vertical padding 4px).
+ 
Note:
For the dialog (or rather, the silkscreen covering the user interface below) to render properly in IE, the "html body" margin is set to 0 (if it wasn't already).
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WDialog::DialogCode
+
+
+ +

The result of a modal dialog execution.

+
Enumerator:
+ + +
Rejected  +

Dialog closed with reject()

+
Accepted  +

Dialog closed with accept()

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WDialog::WDialog (const WString windowTitle = WString() )
+
+
+ +

Constructs a WDialog with a given window title.

+

Only a single Dialog may be constructed at any time. Unlike other widgets, a dialog does not need to be added to a container widget.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WDialog::accept ( ) [virtual]
+
+
+ +

Closes the dialog, with result is Accepted.

+
See also:
done(DialogCode r), reject()
+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WDialog::caption ( ) const
+
+
+ +

Returns the dialog caption (deprecated).

+
Deprecated:
Use windowTitle() instead.
+ +
+
+ +
+
+ + + + + + + +
WContainerWidget* Wt::WDialog::contents ( ) const
+
+
+ +

Returns the dialog contents container.

+

Content to the dialog window may be added to this container widget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::done (DialogCode  r ) [virtual]
+
+
+ +

Stops the dialog.

+

Sets the dialog result, and emits the finished() signal.

+

If a recursive event loop was started using the exec() method, it is ended.

+
See also:
finished(), result()
+ +
+
+ +
+
+ + + + + + + +
WDialog::DialogCode Wt::WDialog::exec ( )
+
+
+ +

Executes the dialog in a recursive event loop.

+

Executes the dialog. This blocks the current thread of execution until one of done(DialogCode), accept() or reject() is called.

+

Warning: using exec() does not scale to many concurrent sessions, since the thread is locked.

+
See also:
done(DialogCode r), accept(), reject()
+ +
+
+ +
+
+ + + + + + + +
Signal<DialogCode>& Wt::WDialog::finished ( )
+
+
+ +

Signal emitted when the dialog is closed.

+
See also:
done(DialogCode r), accept(), reject()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDialog::isModal ( ) const
+
+
+ +

Returns whether the dialog is modal.

+
See also:
setModal()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WDialog::isTitleBarEnabled ( ) const
+
+
+ +

Returns whether the title bar is enabled.

+
See also:
setTitleBarEnabled()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WDialog::reject ( ) [virtual]
+
+
+ +

Closes the dialog, with result is Rejected.

+
See also:
done(DialogCode r), accept()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WDialog::rejectWhenEscapePressed ( )
+
+
+ +

Lets pressing the escape key reject the dialog.

+

Before Wt 3.1.5, pressing escape automatically rejected the dialog. Since 3.1.4 this behaviour is no longer the default since it may interfere with other functionality in the dialog. Use this method to enable this behaviour.

+
See also:
reject()
+ +
+
+ +
+
+ + + + + + + +
DialogCode Wt::WDialog::result ( ) const
+
+
+ +

Returns the result that was set for this dialog.

+
See also:
done(DialogCode r)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::setCaption (const WString caption )
+
+
+ +

Sets the dialog caption (deprecated).

+
Deprecated:
Use setWindowTitle() instead.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::setModal (bool  modal )
+
+
+ +

Sets whether the dialog is modal.

+

A modal dialog will block the underlying user interface.

+

By default a dialog is modal.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::setTitleBarEnabled (bool  enabled )
+
+
+ +

Enables or disables the title bar.

+

The titlebar is enabled by default.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDialog::setWindowTitle (const WString title )
+
+
+ +

Sets the dialog window title.

+

The window title is displayed in the title bar.

+
See also:
setTitleBarEnabled()
+ +
+
+ +
+
+ + + + + + + +
WContainerWidget* Wt::WDialog::titleBar ( ) const
+
+
+ +

Returns the dialog title bar container.

+

The title bar contains a single text that contains the caption. You may customize the title bar by for example adding other content.

+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WDialog::windowTitle ( ) const
+
+
+ +

Returns the dialog window title.

+
See also:
setWindowTitle()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.map new file mode 100644 index 0000000..e2e4ef0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.md5 new file mode 100644 index 0000000..885b8cb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.md5 @@ -0,0 +1 @@ +6dbb0fceb041ba340ed86dda1eb83b65 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.png new file mode 100644 index 0000000..bf7462c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDialog__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator-members.html new file mode 100644 index 0000000..5e3479f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator-members.html @@ -0,0 +1,124 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDoubleValidator Member List

+
+
+This is the complete list of members for Wt::WDoubleValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
bottom() const Wt::WDoubleValidator
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WDoubleValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
invalidNotANumberText() const Wt::WDoubleValidator
invalidTooLargeText() const Wt::WDoubleValidator
invalidTooSmallText() const Wt::WDoubleValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WDoubleValidator [protected, virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setBottom(double bottom)Wt::WDoubleValidator
setInvalidBlankText(const WString &text)Wt::WValidator
setInvalidNotANumberText(const WString &text)Wt::WDoubleValidator
setInvalidTooLargeText(const WString &text)Wt::WDoubleValidator
setInvalidTooSmallText(const WString &text)Wt::WDoubleValidator
setMandatory(bool how)Wt::WValidator
setObjectName(const std::string &name)Wt::WObject
setRange(double bottom, double top)Wt::WDoubleValidator [virtual]
setTop(double top)Wt::WDoubleValidator
State enum nameWt::WValidator
top() const Wt::WDoubleValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WDoubleValidator [virtual]
WDoubleValidator(WObject *parent=0)Wt::WDoubleValidator
WDoubleValidator(double minimum, double maximum, WObject *parent=0)Wt::WDoubleValidator
WObject(WObject *parent=0)Wt::WObject
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator.html new file mode 100644 index 0000000..91eb427 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator.html @@ -0,0 +1,358 @@ + + + + +Wt: Wt::WDoubleValidator Class Reference + + + + + + + + + +
+ +
+

Wt::WDoubleValidator Class Reference

+
+
+ +

A validator for validating floating point user input. +More...

+ +

#include <Wt/WDoubleValidator>

+
+Inheritance diagram for Wt::WDoubleValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WDoubleValidator (WObject *parent=0)
 Creates a new double validator that accepts any double.
WDoubleValidator (double minimum, double maximum, WObject *parent=0)
 Creates a new double validator that accepts double within the given range.
+double bottom () const
 Returns the bottom of the valid double range.
void setBottom (double bottom)
 Sets the bottom of the valid double range.
+double top () const
 Returns the top of the valid double range.
void setTop (double top)
 Sets the top of the valid double range.
+virtual void setRange (double bottom, double top)
 Sets the range of valid doubles.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
void setInvalidNotANumberText (const WString &text)
 Sets the message to display when the input is not a number.
WString invalidNotANumberText () const
 Returns the message displayed when the input is not a number.
void setInvalidTooSmallText (const WString &text)
 Sets the message to display when the number is too small.
WString invalidTooSmallText () const
 Returns the message displayed when the number is too small.
void setInvalidTooLargeText (const WString &text)
 Sets the message to display when the number is too large.
WString invalidTooLargeText () const
 Returns the message displayed when the number is too large.

+Protected Member Functions

std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
+

Detailed Description

+

A validator for validating floating point user input.

+

This validator checks whether user input is a double in the pre-defined range.

+

Usage example:

+
 Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
+ Wt::WDoubleValidator *validator = new Wt::WDoubleValidator();
+ lineEdit->setValidator(validator);
+ lineEdit->setText("13.42");
+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys: Wt.WDoubleValidator.NotANumber: Must be a number Wt.WDoubleValidator.TooSmall: The number must be larger than {1} Wt.WDoubleValidator.BadRange: The number must be in the range {1} to {2} Wt.WDoubleValidator.TooLarge: The number must be smaller than {1}

+

Member Function Documentation

+ +
+
+ + + + + + + +
WString Wt::WDoubleValidator::invalidNotANumberText ( ) const
+
+
+ +

Returns the message displayed when the input is not a number.

+
See also:
setInvalidNotANumberText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDoubleValidator::invalidTooLargeText ( ) const
+
+
+ +

Returns the message displayed when the number is too large.

+
See also:
setInvalidTooLargeText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WDoubleValidator::invalidTooSmallText ( ) const
+
+
+ +

Returns the message displayed when the number is too small.

+
See also:
setInvalidTooSmallText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WDoubleValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDoubleValidator::setBottom (double  bottom )
+
+
+ +

Sets the bottom of the valid double range.

+

The default value is the minimum double value.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDoubleValidator::setInvalidNotANumberText (const WString text )
+
+
+ +

Sets the message to display when the input is not a number.

+

The default value is "Must be a number."

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDoubleValidator::setInvalidTooLargeText (const WString text )
+
+
+ +

Sets the message to display when the number is too large.

+

Depending on whether bottom() and top() are real bounds, the default message is "The number must be between {1} and {2}" or "The number must be smaller than {2}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDoubleValidator::setInvalidTooSmallText (const WString text )
+
+
+ +

Sets the message to display when the number is too small.

+

Depending on whether bottom() and top() are real bounds, the default message is "The number must be between {1} and {2}" or "The number must be larger than {1}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WDoubleValidator::setTop (double  top )
+
+
+ +

Sets the top of the valid double range.

+

The default value is the maximum double value.

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WDoubleValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

The input is considered valid only when it is blank for a non-mandatory field, or represents a double within the valid range.

+ +

Reimplemented from Wt::WValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.map new file mode 100644 index 0000000..4e1d8a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.md5 new file mode 100644 index 0000000..c5ba94f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.md5 @@ -0,0 +1 @@ +d8f5c1e650d8e6059041a87c95ef0457 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.png new file mode 100644 index 0000000..a0a29b0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WDoubleValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent-members.html new file mode 100644 index 0000000..4dc3662 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WDropEvent Member List

+
+
+This is the complete list of members for Wt::WDropEvent, including all inherited members. + + + + +
mimeType() const Wt::WDropEvent
mouseEvent() const Wt::WDropEvent
source() const Wt::WDropEvent
WDropEvent(WObject *source, const std::string &mimeType, const WMouseEvent &mouseEvent)Wt::WDropEvent
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent.html new file mode 100644 index 0000000..fc59d4c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WDropEvent.html @@ -0,0 +1,133 @@ + + + + +Wt: Wt::WDropEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WDropEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a drop event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

WDropEvent (WObject *source, const std::string &mimeType, const WMouseEvent &mouseEvent)
 Constructor.
WObjectsource () const
 Returns the source of the drag&drop operation.
+const std::string & mimeType () const
 Returns the mime type of this drop event.
+const WMouseEventmouseEvent () const
 Returns the original mouse event.
+

Detailed Description

+

A class providing details for a drop event.

+
See also:
WWidget::dropEvent(WDropEvent)
+

Member Function Documentation

+ +
+
+ + + + + + + +
WObject* Wt::WDropEvent::source ( ) const
+
+
+ +

Returns the source of the drag&drop operation.

+

The source is the widget that was set draggable using WInteractWidget::setDraggable().

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment-members.html new file mode 100644 index 0000000..73f53fd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment-members.html @@ -0,0 +1,153 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WEnvironment Member List

+
+
+This is the complete list of members for Wt::WEnvironment, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept() const Wt::WEnvironment
agent() const Wt::WEnvironment
agentIsChrome() const Wt::WEnvironment
agentIsGecko() const Wt::WEnvironment
agentIsIE() const Wt::WEnvironment
agentIsIElt(int version) const Wt::WEnvironment
agentIsIEMobile() const Wt::WEnvironment
agentIsMobileWebKit() const Wt::WEnvironment
agentIsOpera() const Wt::WEnvironment
agentIsSafari() const Wt::WEnvironment
agentIsSpiderBot() const Wt::WEnvironment
agentIsWebKit() const Wt::WEnvironment
ajax() const Wt::WEnvironment
Arora enum valueWt::WEnvironment
BotAgent enum valueWt::WEnvironment
Chrome0 enum valueWt::WEnvironment
Chrome1 enum valueWt::WEnvironment
Chrome2 enum valueWt::WEnvironment
Chrome3 enum valueWt::WEnvironment
Chrome4 enum valueWt::WEnvironment
Chrome5 enum valueWt::WEnvironment
clientAddress() const Wt::WEnvironment
contentType() const Wt::WEnvironment
ContentType enum nameWt::WEnvironment
CookieMap typedefWt::WEnvironment
cookies() const Wt::WEnvironment
deploymentPath() const Wt::WEnvironment
dpiScale() const Wt::WEnvironment
Firefox enum valueWt::WEnvironment
Firefox3_0 enum valueWt::WEnvironment
Firefox3_1 enum valueWt::WEnvironment
Firefox3_1b enum valueWt::WEnvironment
Firefox3_5 enum valueWt::WEnvironment
Firefox3_6 enum valueWt::WEnvironment
Gecko enum valueWt::WEnvironment
getCgiValue(const std::string &varName) const Wt::WEnvironment
getCookie(const std::string &cookieNname) const Wt::WEnvironment
getParameter(const std::string &name) const Wt::WEnvironment
getParameterMap() const Wt::WEnvironment
getParameterValues(const std::string &name) const Wt::WEnvironment
headerValue(const std::string &field) const Wt::WEnvironment
hostName() const Wt::WEnvironment
HTML4 enum valueWt::WEnvironment
IE6 enum valueWt::WEnvironment
IE7 enum valueWt::WEnvironment
IE8 enum valueWt::WEnvironment
IE9 enum valueWt::WEnvironment
IEMobile enum valueWt::WEnvironment
internalPath() const Wt::WEnvironment
javaScript() const Wt::WEnvironment
Konqueror enum valueWt::WEnvironment
libraryVersion()Wt::WEnvironment [static]
libraryVersion(int &series, int &major, int &minor) const Wt::WEnvironment
locale() const Wt::WEnvironment
MobileWebKit enum valueWt::WEnvironment
MobileWebKitAndroid enum valueWt::WEnvironment
MobileWebKitiPhone enum valueWt::WEnvironment
Opera enum valueWt::WEnvironment
pathInfo() const Wt::WEnvironment
referer() const Wt::WEnvironment
Safari enum valueWt::WEnvironment
Safari3 enum valueWt::WEnvironment
Safari4 enum valueWt::WEnvironment
server() const Wt::WEnvironment
serverAdmin() const Wt::WEnvironment
serverSignature() const Wt::WEnvironment
serverSoftware() const Wt::WEnvironment
sessionId() const Wt::WEnvironment
supportsCookies() const Wt::WEnvironment
Unknown enum valueWt::WEnvironment
urlScheme() const Wt::WEnvironment
UserAgent enum nameWt::WEnvironment
userAgent() const Wt::WEnvironment
WebKit enum valueWt::WEnvironment
XHTML1 enum valueWt::WEnvironment
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment.html new file mode 100644 index 0000000..255ad60 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment.html @@ -0,0 +1,1214 @@ + + + + +Wt: Wt::WEnvironment Class Reference + + + + + + + + + +
+ +
+

Wt::WEnvironment Class Reference

+
+
+ +

A class that captures information on the application environment. +More...

+ +

#include <Wt/WEnvironment>

+
+Inheritance diagram for Wt::WEnvironment:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  UserAgent {
+  Unknown = 0, +IEMobile = 1000, +IE6 = 1001, +IE7 = 1002, +
+  IE8 = 1003, +IE9 = 1004, +Opera = 3000, +WebKit = 4000, +
+  Safari = 4100, +Safari3 = 4103, +Safari4 = 4104, +Chrome0 = 4200, +
+  Chrome1 = 4201, +Chrome2 = 4202, +Chrome3 = 4203, +Chrome4 = 4204, +
+  Chrome5 = 4205, +Arora = 4300, +MobileWebKit = 4400, +MobileWebKitiPhone = 4450, +
+  MobileWebKitAndroid = 4500, +Konqueror = 5000, +Gecko = 6000, +Firefox = 6100, +
+  Firefox3_0 = 6101, +Firefox3_1 = 6102, +Firefox3_1b = 6103, +Firefox3_5 = 6104, +
+  Firefox3_6 = 6105, +BotAgent = 10000 +
+ }
 

An enumeration type for specific user agent.

+ More...
enum  ContentType { XHTML1, +HTML4 + }
 

Enumeration for HTML content type.

+ More...
typedef std::map< std::string,
+std::string > 
CookieMap
 Cookie map.

+Public Member Functions

const Http::ParameterMapgetParameterMap () const
 Parameters passed to the application.
const Http::ParameterValuesgetParameterValues (const std::string &name) const
 Returns values for a query parameter.
const std::string * getParameter (const std::string &name) const
 Returns a single value for a query parameter.
const CookieMapcookies () const
 Cookies set in the initial call to the application.
const std::string getCookie (const std::string &cookieNname) const
 Checks for existence and returns specified argument.
const std::string headerValue (const std::string &field) const
 Returns a header value.
bool supportsCookies () const
 Returns whether the browser has enabled support for cookies.
bool javaScript () const
 Returns whether the browser has enabled support for JavaScript.
bool ajax () const
 Returns whether the browser has enabled support for AJAX.
double dpiScale () const
 Returns the browser-side DPI scaling factor.
const std::string & locale () const
 Returns the preferred language indicated in the request header.
const std::string & hostName () const
 Returns the server host name that is used by the client.
+const std::string & urlScheme () const
 Returns the URL scheme used for the current request ("http" or "https").
const std::string & userAgent () const
 Returns the user agent.
const std::string & referer () const
 Returns the referer.
const std::string & accept () const
 Returns the accept header.
bool agentIsSpiderBot () const
 Returns if the user agent is a (known) indexing spider bot.
const std::string & serverSignature () const
 Returns the web server signature.
const std::string & serverSoftware () const
 Returns the web server software.
const std::string & serverAdmin () const
 Returns the email address of the server admin.
const std::string & clientAddress () const
 Returns the IP address of the client.
const std::string & pathInfo () const
 Returns the path info of the original request (deprecated)
const std::string & internalPath () const
 Returns the initial internal path.
const std::string & deploymentPath () const
 Returns the deployment path.
void libraryVersion (int &series, int &major, int &minor) const
 Returns the version of the Wt library, broken down.
std::string sessionId () const
 Returns the Wt session id.
std::string getCgiValue (const std::string &varName) const
 Returns a raw CGI environment variable.
ContentType contentType () const
 The type of the content provided to the browser.
UserAgent agent () const
 Returns the user agent type.
bool agentIsIE () const
 Returns whether the user agent is Microsoft Internet Explorer.
bool agentIsIElt (int version) const
 Returns whether the user agent is an older version of IE.
bool agentIsIEMobile () const
 Returns whether the user agent is Internet Explorer Mobile.
bool agentIsOpera () const
 Returns whether the user agent is Opera.
bool agentIsWebKit () const
 Returns whether the user agent is WebKit-based.
bool agentIsMobileWebKit () const
 Returns whether the user agent is Mobile WebKit-based.
bool agentIsSafari () const
 Returns whether the user agent is Safari.
bool agentIsChrome () const
 Returns whether the user agent is Chrome.
bool agentIsGecko () const
 Returns whether the user agent is Gecko-based.
+WAbstractServer * server () const
 Returns the server.

+Static Public Member Functions

static std::string libraryVersion ()
 Returns the version of the Wt library.
+

Detailed Description

+

A class that captures information on the application environment.

+

The environment provides information on the client, and gives access to startup arguments.

+

Usage example:

+
 const WEnvironment& env = WApplication::instance()->environment();
+
+ // read an application startup argument 
+ // (passed as argument in the URL or POST'ed to the application).
+ if (!env.getParameterValues("login").empty()) {
+   std::string login = env.getParameterValues("login")[0];
+   ...
+ }
+
+ // Check for JavaScript/AJAX availability before using AJAX-only
+ // widgets
+ Wt::WTextArea *textEdit;
+ if (!env.ajax())
+   textEdit = new Wt::WTextEdit(); // provide an HTML text editor
+ else
+   textEdit = new Wt::WTextArea(); // fall-back to a plain old text area.
+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::map<std::string, std::string> Wt::WEnvironment::CookieMap
+
+
+ +

Cookie map.

+

A std::map which associates a cookie name with a cookie value.

+
See also:
cookies()
+ +
+
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration for HTML content type.

+
Enumerator:
+ + +
XHTML1  +

XHTML1.x.

+
HTML4  +

HTML4.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WEnvironment::UserAgent
+
+
+ +

An enumeration type for specific user agent.

+
See also:
agent()
+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Unknown  +

Unknown user agent.

+
IEMobile  +

Internet Explorer Mobile, or Internet Explorer 5 or older.

+
IE6  +

Internet Explorer 6.

+
IE7  +

Internet Explorer 7.

+
IE8  +

Internet Explorer 8.

+
IE9  +

Internet Explorer 9 or later.

+
Opera  +

Opera.

+
WebKit  +

WebKit.

+
Safari  +

Safari 2 or older.

+
Safari3  +

Safari 3.

+
Safari4  +

Safari 4 or later.

+
Chrome0  +

Chrome 0.

+
Chrome1  +

Chrome 1.

+
Chrome2  +

Chrome 2.

+
Chrome3  +

Chrome 3.

+
Chrome4  +

Chrome 4.

+
Chrome5  +

Chrome 5 or later.

+
Arora  +

Arora.

+
MobileWebKit  +

Mobile WebKit.

+
MobileWebKitiPhone  +

Mobile WebKit iPhone/iPad.

+
MobileWebKitAndroid  +

Mobile WebKit Android.

+
Konqueror  +

Konqueror.

+
Gecko  +

Gecko.

+
Firefox  +

Firefox 2 or older.

+
Firefox3_0  +

Firefox 3.0.

+
Firefox3_1  +

Firefox 3.1.

+
Firefox3_1b  +

Firefox 3.1b.

+
Firefox3_5  +

Firefox 3.5.

+
Firefox3_6  +

Firefox 3.6 or later.

+
BotAgent  +

Bot user agent.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::accept ( ) const
+
+
+ +

Returns the accept header.

+

The accept header, as reported in the HTTP Accept field.

+ +
+
+ +
+
+ + + + + + + +
UserAgent Wt::WEnvironment::agent ( ) const
+
+
+ +

Returns the user agent type.

+

This returns an interpretation of the userAgent(). It should be used only for user-agent specific work-arounds (as a last resort).

+
See also:
agentIsIE(), agentIsOpera(), agentIsGecko(), agentIsChrome(), agentIsSafari(), agentIsWebKit()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsChrome ( ) const
+
+
+ +

Returns whether the user agent is Chrome.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsGecko ( ) const
+
+
+ +

Returns whether the user agent is Gecko-based.

+

Gecko-based browsers include Firefox.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsIE ( ) const
+
+
+ +

Returns whether the user agent is Microsoft Internet Explorer.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WEnvironment::agentIsIElt (int  version ) const
+
+
+ +

Returns whether the user agent is an older version of IE.

+

Returns whether the agent is an IE version older than the given version.

+
See also:
agentIsIE()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsIEMobile ( ) const
+
+
+ +

Returns whether the user agent is Internet Explorer Mobile.

+

Returns also true when the agent is Internet Explorer 5 or older.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsMobileWebKit ( ) const
+
+
+ +

Returns whether the user agent is Mobile WebKit-based.

+

Mobile Webkit-based browsers include the Android Mobile WebKit and the iPhone Mobile WebKit browsers.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsOpera ( ) const
+
+
+ +

Returns whether the user agent is Opera.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsSafari ( ) const
+
+
+ +

Returns whether the user agent is Safari.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsSpiderBot ( ) const
+
+
+ +

Returns if the user agent is a (known) indexing spider bot.

+

Note: currently the list of know bots is quite small. This method is used internally to render the web application for optimal indexing by bots:

+
    +
  • there is no detection for JavaScript, instead the application is directly served assuming no JavaScript support.
  • +
  • session information is omitted from the Urls.
  • +
  • no sessions are created (they are immediately stopped after the request has been handled).
  • +
  • auto-generated id and name attributes are omitted from DOM nodes. In this way, the generated page is always exactly the same.
  • +
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::agentIsWebKit ( ) const
+
+
+ +

Returns whether the user agent is WebKit-based.

+

Webkit-based browsers include Safari, Chrome, Arora and Konquerer browsers.

+
See also:
agent()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::ajax ( ) const
+
+
+ +

Returns whether the browser has enabled support for AJAX.

+

Without support for JavaScript/AJAX, Wt will still be able to serve the application, but with one considerable limitation: only the WTimer::timeout(), WInteractWidget::clicked(), WApplication::internalPathChanged(), and WAbstractArea::clicked() signals (and any derived signals) will generate events.

+

Every event will cause the complete page to be rerendered.

+
See also:
javaScript()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::clientAddress ( ) const
+
+
+ +

Returns the IP address of the client.

+

The (most likely) IP address of the client that is connected to this session.

+

This is taken to be the first public address that is given in the Client-IP header, or in the X-Forwarded-For header (in case the client is behind a proxy). If none of these headers is present, the remote socket IP address is used.

+ +
+
+ +
+
+ + + + + + + +
ContentType Wt::WEnvironment::contentType ( ) const
+
+
+ +

The type of the content provided to the browser.

+

This is determined by listening to the capabilities of the browser. Xhtml1 is chosen only if the browser reports support for it, and it is allowed in the configuration file (wt_config.xml).

+

Note that Wt makes also use of common non-standard techniques implemented in every major browser.

+ +
+
+ +
+
+ + + + + + + +
const CookieMap& Wt::WEnvironment::cookies ( ) const
+
+
+ +

Cookies set in the initial call to the application.

+

Note that cookies set with WApplication::setCookie() are not made available in the environment.

+

Not all clients may support cookies or have cookies enabled.

+
See also:
supportsCookies(), getCookie()
+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::WEnvironment::deploymentPath ( ) const
+
+
+ +

Returns the deployment path.

+

This is the path at which the application is deployed.

+
See also:
internalPath().
+ +
+
+ +
+
+ + + + + + + +
double Wt::WEnvironment::dpiScale ( ) const
+
+
+ +

Returns the browser-side DPI scaling factor.

+

Internet Explorer scales all graphics, fonts and other elements on high-density screens to make them readable. This is controlled by the DPI setting of the display. If all goes well, you do not have to worry about this scaling factor. Unfortunately, not all elements are scaled appropriately. The scaling factor is supposed to be used only internally in Wt and is in this interface for informational purposes.

+
See also:
WVmlImage
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WEnvironment::getCgiValue (const std::string &  varName ) const
+
+
+ +

Returns a raw CGI environment variable.

+

Retrieves the value for the given CGI environment variable (like "SSL_CLIENT_S_DN_CN"), if it is defined, otherwise an empty string.

+
See also:
serverSignature(), serverSoftware(), serverAdmin(),
+ +
+
+ +
+
+ + + + + + + + +
const std::string Wt::WEnvironment::getCookie (const std::string &  cookieNname ) const
+
+
+ +

Checks for existence and returns specified argument.

+

Throws a std::runtime_error("Missing cookie: ...") when the cookie is missing, or returns cookie value otherwise.

+ +
+
+ +
+
+ + + + + + + + +
const std::string * Wt::WEnvironment::getParameter (const std::string &  name ) const
+
+
+ +

Returns a single value for a query parameter.

+

Returns the first value for a parameter, or 0 if the parameter is not found.

+
See also:
getParameterValues()
+ +
+
+ +
+
+ + + + + + + +
const Http::ParameterMap& Wt::WEnvironment::getParameterMap ( ) const
+
+
+ +

Parameters passed to the application.

+

Arguments passed to the application, either in the URL for a http GET, or in both the URL and data submitted in a http POST.

+
See also:
getParameterValues()
+ +
+
+ +
+
+ + + + + + + + +
const Http::ParameterValues & Wt::WEnvironment::getParameterValues (const std::string &  name ) const
+
+
+ +

Returns values for a query parameter.

+

Returns an empty list if the parameter was not defined.

+

One or more values may be associated with a single argument.

+

For example a Wt application foo.wt started as http://.../foo.wt?hello=Hello&hello=World will result in both values "Hello" and "World" to be associated with the argument "hello".

+
See also:
getParameterMap()
+ +
+
+ +
+
+ + + + + + + + +
const std::string Wt::WEnvironment::headerValue (const std::string &  field ) const
+
+
+ +

Returns a header value.

+

Returns a header value, or an empty string if the header was present.

+
Note:
Currently, the header name is case sensitive, although this should not be the case according to RFC2616
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::hostName ( ) const
+
+
+ +

Returns the server host name that is used by the client.

+

The hostname is the unresolved host name with optional port number, which the browser used to connect to the application.

+

Examples:

+
    +
  • www.mydomain.com
  • +
  • localhost:8080
  • +
+

For HTTP 1.1 requests, this information is fetched from the HTTP Host header. If Wt is configured behind a reverse proxy, then the last entry in the HTTP X-Forwarded-Host header field is used instead (to infer the name of the reverse proxy instead).

+

For HTTP 1.0 requests, the HTTP Host header is not required. When not present, the server host name is inferred from the configured server name, which defaults to the DNS name.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::internalPath ( ) const
+
+
+ +

Returns the initial internal path.

+

This is the internal path with which the application was started.

+

For an application deployed at "/stuff/app.wt", the following three URLs are considered equivalent, and indicate an internal path "/this/there":

+
 http://www.mydomain.com/stuff/app.wt/this/there
+ http://www.mydomain.com/stuff/app.wt#/this/there
+ http://www.mydomain.com/stuff/app.wt?_=/this/there
+

The last form is generated by Wt when the application ends with a '/', as an alternative to the first form, which is then impossible.

+
See also:
WApplication::setInternalPath(), deploymentPath()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::javaScript ( ) const
+
+
+ +

Returns whether the browser has enabled support for JavaScript.

+

This is the same as ajax(): Wt only considers using JavaScript when it has detected AJAX support.

+
See also:
ajax()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WEnvironment::libraryVersion ( ) [static]
+
+
+ +

Returns the version of the Wt library.

+

Example: "1.99.2"

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WEnvironment::libraryVersion (int &  series,
int &  major,
int &  minor 
) const
+
+
+ +

Returns the version of the Wt library, broken down.

+

The version of the Wt library, broken down in its three numbers,

+

Example: series = 1, major = 99, minor = 2.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::locale ( ) const
+
+
+ +

Returns the preferred language indicated in the request header.

+

The language is parsed from the HTTP Accept-Language field, if present. If not, the locale is empty.

+

If multiple languages are present, the one with the highest "q"uality is assumed, and if a tie is present, the first one is taken.

+
See also:
WApplication::setLocale()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::pathInfo ( ) const
+
+
+ +

Returns the path info of the original request (deprecated)

+
Deprecated:
Use internalPath() instead, which is consistent with the internal paths generated by Wt.
+

This is the equivalent of the CGI PATH_INFO environment variable.

+

Assume for example that the application was deployed at "stuff/app.wt". When the user accesses the application using the URL "http://www.mydomain.com/stuff/app.wt", this method would return an empty string (""). When the user accesses the site using "http://www.mydomain.com/stuff/app.wt/this/there", the result would be "/this/there".

+

Together with getParameter(), this allows you to supply the application with initial information.

+
See also:
getParameter(), internalPath()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::referer ( ) const
+
+
+ +

Returns the referer.

+

The referer, as reported in the HTTP Referer field.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::serverAdmin ( ) const
+
+
+ +

Returns the email address of the server admin.

+

The value of the CGI variable SERVER_ADMIN.

+

Example: "root@localhost"

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::serverSignature ( ) const
+
+
+ +

Returns the web server signature.

+

The value of the CGI variable SERVER_SIGNATURE.

+

Example: <address>Apache Server at localhost Port 80</address>.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::serverSoftware ( ) const
+
+
+ +

Returns the web server software.

+

The value of the CGI variable SERVER_SOFTWARE.

+

Example: "Apache"

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WEnvironment::sessionId ( ) const
+
+
+ +

Returns the Wt session id.

+

Retrieves the session id for this session. This is an auto-generated random alpha-numerical id, whose length is determined by settings in the configuration file.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WEnvironment::supportsCookies ( ) const
+
+
+ +

Returns whether the browser has enabled support for cookies.

+

When the user disables cookies during the visit of the page, this value is not updated.

+
See also:
cookies(), getCookie()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WEnvironment::userAgent ( ) const
+
+
+ +

Returns the user agent.

+

The user agent, as reported in the HTTP User-Agent field.

+
See also:
agent()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.map new file mode 100644 index 0000000..4b090f0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.md5 new file mode 100644 index 0000000..a34034d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.md5 @@ -0,0 +1 @@ +544a4e5cd842b1c6a6ae360b233bd1d0 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.png new file mode 100644 index 0000000..58f5393 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WEnvironment__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource-members.html new file mode 100644 index 0000000..8200f41 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource-members.html @@ -0,0 +1,120 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFileResource Member List

+
+
+This is the complete list of members for Wt::WFileResource, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
bufferSize() const Wt::WFileResource
children() const Wt::WObject
dataChanged()Wt::WResource
dataReceived()Wt::WResource
fileName() const Wt::WFileResource
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::WFileResource [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
internalPath() const Wt::WResource
Method typedefWt::WObject
mimeType() const Wt::WFileResource
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setBufferSize(int size)Wt::WFileResource
setChanged()Wt::WResource
setFileName(const std::string &fileName)Wt::WFileResource
setInternalPath(const std::string &path)Wt::WResource
setMimeType(const std::string &mimeType)Wt::WFileResource
setObjectName(const std::string &name)Wt::WObject
setUploadProgress(bool enabled)Wt::WResource
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
url() const Wt::WResource
WFileResource(WObject *parent=0)Wt::WFileResource
WFileResource(const std::string &fileName, WObject *parent=0)Wt::WFileResource
WFileResource(const std::string &mimeType, const std::string &fileName, WObject *parent=0)Wt::WFileResource
WObject(WObject *parent=0)Wt::WObject
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~WFileResource()Wt::WFileResource
~WObject()Wt::WObject [virtual]
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource.html new file mode 100644 index 0000000..790b83b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource.html @@ -0,0 +1,306 @@ + + + + +Wt: Wt::WFileResource Class Reference + + + + + + + + + +
+ +
+

Wt::WFileResource Class Reference

+
+
+ +

A resource which streams data from a local file. +More...

+ +

#include <Wt/WFileResource>

+
+Inheritance diagram for Wt::WFileResource:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WFileResource (WObject *parent=0)
 Default constructor.
 WFileResource (const std::string &fileName, WObject *parent=0)
 Creates a new resource for a file.
WFileResource (const std::string &mimeType, const std::string &fileName, WObject *parent=0)
 Creates a new resource with given mime-type for a file.
 ~WFileResource ()
 Destructor.
void setFileName (const std::string &fileName)
 Sets a (different) filename.
+const std::string & fileName () const
 Returns the filename.
+void setMimeType (const std::string &mimeType)
 Sets the mime-type.
+const std::string & mimeType () const
 Returns the mime-type.
void setBufferSize (int size)
 Configures the buffer size.
int bufferSize () const
 Returns the buffer size.
virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.
+

Detailed Description

+

A resource which streams data from a local file.

+

To update the resource, either use setFileName() to point it to a new file, or emit the WResource::dataChanged() signal when only the file contents has changed, but not the filename.

+

The resource makes use of continuations to transmit data piecewise, without blocking a thread or requiring the entire file to be read in memory. The size of the buffer can be changed using setBufferSize().

+

Usage examples:

+
 Wt::WFileResource *csvFile = new Wt::WFileResource("text/csv", "/opt/files/afile.csv");
+ csvFile->suggestFileName("data.csv");
+ Wt::WAnchor *anchor = new Wt::WAnchor(csvFile, "CSV data");
+
+ Wt::WFileResource *imageFile = new Wt::WFileResource("image/png", "/opt/files/image.png");
+ imageFile->suggestFileName("data.png");
+ Wt::WImage *image = new Wt::WImage(imageFile, "PNG version");
+
See also:
WMemoryResource
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WFileResource::WFileResource (WObject parent = 0 )
+
+
+ +

Default constructor.

+

You need to set a file name (and mime type) for the resource using setFileName() and setMimeType().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WFileResource::WFileResource (const std::string &  fileName,
WObject parent = 0 
)
+
+
+ +

Creates a new resource for a file.

+

The mime type defaults to "text/plain".

+ +
+
+ +
+
+ + + + + + + +
Wt::WFileResource::~WFileResource ( )
+
+
+ +

Destructor.

+

It is up to the user to make sure that the resource is no longer in use (by e.g. a WImage).

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WFileResource::bufferSize ( ) const
+
+
+ +

Returns the buffer size.

+
See also:
setBufferSize()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFileResource::handleRequest (const Http::Request request,
Http::Response response 
) [virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFileResource::setBufferSize (int  size )
+
+
+ +

Configures the buffer size.

+

This configures the size of the buffer used to transmit the file piece by piece.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFileResource::setFileName (const std::string &  fileName )
+
+
+ +

Sets a (different) filename.

+

Set the location of the file on the local filesystem which must be streamed for this resource.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.map new file mode 100644 index 0000000..b3a1fbd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.md5 new file mode 100644 index 0000000..a439f9f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.md5 @@ -0,0 +1 @@ +2560e3e2865323c0d46d2d9137b31b0c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.png new file mode 100644 index 0000000..edecd22 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileResource__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload-members.html new file mode 100644 index 0000000..69556d1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload-members.html @@ -0,0 +1,201 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFileUpload Member List

+
+
+This is the complete list of members for Wt::WFileUpload, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
canUpload() const Wt::WFileUpload
changed()Wt::WFileUpload
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clientFileName() const Wt::WFileUpload
contentDescription() const Wt::WFileUpload
dataReceived()Wt::WFileUpload
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
empty() const Wt::WFileUpload
emptyFileName() const Wt::WFileUpload
enable()Wt::WWidget
enableAjax()Wt::WFileUpload [virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
fileTextSize() const Wt::WFileUpload
fileTooLarge()Wt::WFileUpload
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUploaded() const Wt::WFileUpload
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
multiple() const Wt::WFileUpload
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
progressBar() const Wt::WFileUpload
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFileTextSize(int chars)Wt::WFileUpload
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMultiple(bool multiple)Wt::WFileUpload
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setProgressBar(WProgressBar *progressBar)Wt::WFileUpload
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
spoolFileName() const Wt::WFileUpload
stealSpooledFile()Wt::WFileUpload
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
upload()Wt::WFileUpload
uploaded()Wt::WFileUpload
uploadedFiles() const Wt::WFileUpload
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFileUpload(WContainerWidget *parent=0)Wt::WFileUpload
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload.html new file mode 100644 index 0000000..aa71492 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload.html @@ -0,0 +1,543 @@ + + + + +Wt: Wt::WFileUpload Class Reference + + + + + + + + + +
+ +
+

Wt::WFileUpload Class Reference

+
+
+ +

A widget that allows a file to be uploaded. +More...

+ +

#include <Wt/WFileUpload>

+
+Inheritance diagram for Wt::WFileUpload:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WFileUpload (WContainerWidget *parent=0)
 Creates a file upload widget.
void setMultiple (bool multiple)
 Sets whether the file upload accepts multiple files.
bool multiple () const
 Returns whether multiple files can be uploaded.
+void setFileTextSize (int chars)
 Sets the size of the file input.
+int fileTextSize () const
 Returns the size of the file input.
std::string spoolFileName () const
 Returns the spooled location of the uploaded file.
WString clientFileName () const
 Returns the client filename.
WString contentDescription () const
 Returns the client content description.
void stealSpooledFile ()
 Steals the spooled file.
+bool empty () const
 Returns whether one or more files have been uploaded.
bool emptyFileName () const
 Checks if no filename was given and thus no file uploaded. (Deprecated)
+const std::vector
+< Http::UploadedFile > & 
uploadedFiles () const
 Returns the uploaded files.
bool canUpload () const
 Returns whether upload() will start a new file upload.
bool isUploaded () const
 Returns whether the upload() slot will not start a new upload. (Deprecated)
EventSignaluploaded ()
 Signal emitted when a new file was uploaded.
Signal< int > & fileTooLarge ()
 Signal emitted when the user tried to upload a too large file.
EventSignalchanged ()
 Signal emitted when the user selected a new file.
void upload ()
 Starts the file upload.
void setProgressBar (WProgressBar *progressBar)
 Sets a progress bar to indicate upload progress.
WProgressBarprogressBar () const
 Returns the progress bar.
Signal< ::uint64_t,::uint64_t > & dataReceived ()
 Signal emitted while a file is being uploaded.
virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A widget that allows a file to be uploaded.

+

This widget is displayed as a box in which a filename can be entered and a browse button.

+

Depending on availability of JavaScript, the behaviour of the widget is different, but the API is designed in a way which facilitates a portable use.

+

When JavaScript is available, the file will not be uploaded until upload() is called. This will start an asynchronous upload (and thus return immediately).While the file is being uploaded, the dataReceived() signal is emitted when data is being received and if the connector library provides support (see also WResource::setUploadProgress() for a more detailed discussion). Although you can modify the GUI from this signal, you still need to have a mechanism in place to update the client interface (using a WTimer or using server-push). When the file has been uploaded, the uploaded() signal is emitted, or if the file was too large, the fileTooLarge() signal is emitted. You may configure a progress bar that is used to show the upload progress using setProgressBar(). When no JavaScript is available, the file will be uploaded with the next click event. Thus, upload() has no effect -- the file will already be uploaded, and the corresponding signals will already be emitted. To test if upload() will start an upload, you may check using the canUpload() call.

+

Thus, to properly use the widget, one needs to follow these rules:

+ +

The WFileUpload widget must be hidden or deleted when a file is received. In addition it is wise to prevent the user from uploading the file twice as in the example below.

+

The uploaded file is automatically spooled to a local temporary file which will be deleted together with the WFileUpload widget, unless stealSpooledFile() is called.

+

Usage example:

+
 Wt::WFileUpload *upload = new Wt::WFileUpload(this);
+ upload->setFileTextSize(40);
+
+ // Provide a button
+ Wt::WPushButton *uploadButton = new Wt::WPushButton("Send", this);
+
+ // Upload when the button is clicked.
+ uploadButton->clicked().connect(upload, &Wt::WFileUpload::upload);
+ uploadButton->clicked().connect(uploadButton, &Wt::WPushButton::disable);
+
+ // Upload automatically when the user entered a file.
+ upload->changed().connect(upload, &WFileUpload::upload);
+ upload->changed().connect(uploadButton, &Wt::WPushButton::disable);
+
+ // React to a succesfull upload.
+ upload->uploaded().connect(this, &MyWidget::fileUploaded);
+
+ // React to a fileupload problem.
+ upload->fileTooLarge().connect(this, &MyWidget::fileTooLarge);
+

WFileUpload is an inline widget.

+

CSS

+

The file upload itself corresponds to a <input type="file"> tag, but may be wrapped in a <form> tag. This widget does not provide styling, and styling through CSS is not well supported across browsers.

+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::WFileUpload::canUpload ( ) const
+
+
+ +

Returns whether upload() will start a new file upload.

+

A call to upload() will only start a new file upload if there is no JavaScript support. Otherwise, the most recent file will already be uploaded.

+
Note:
This method was renamed, and its result inverted, from the now deprecated method isUploaded()
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WFileUpload::changed ( )
+
+
+ +

Signal emitted when the user selected a new file.

+

One could react on the user selecting a (new) file, by uploading the file immediately.

+

Caveat: this signal is not emitted with konqueror and possibly other browsers. Thus, in the above scenario you should still provide an alternative way to call the upload() method.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WFileUpload::clientFileName ( ) const
+
+
+ +

Returns the client filename.

+

When multiple files were uploaded, this returns the information from the first file.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WFileUpload::contentDescription ( ) const
+
+
+ +

Returns the client content description.

+

When multiple files were uploaded, this returns the information from the first file.

+ +
+
+ +
+
+ + + + + + + +
Signal< ::uint64_t, ::uint64_t >& Wt::WFileUpload::dataReceived ( )
+
+
+ +

Signal emitted while a file is being uploaded.

+

When supported by the connector library, you can track the progress of the file upload by listening to this signal.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WFileUpload::emptyFileName ( ) const
+
+
+ +

Checks if no filename was given and thus no file uploaded. (Deprecated)

+

Return whether a non-empty filename was given.

+
Deprecated:
This method was renamed to empty()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WFileUpload::enableAjax ( ) [virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::WFileUpload::fileTooLarge ( )
+
+
+ +

Signal emitted when the user tried to upload a too large file.

+

The parameter is the (approximate) size of the file the user tried to upload.

+

The maximum file size is determined by the maximum request size, which may be configured in the configuration file (<max-request-size>).

+
See also:
uploaded()
+
+WApplication::requestTooLarge()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WFileUpload::isUploaded ( ) const
+
+
+ +

Returns whether the upload() slot will not start a new upload. (Deprecated)

+
Deprecated:
use canUpload() instead -- canUpload() == !isUploaded(). the name was confusing.
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WFileUpload::multiple ( ) const
+
+
+ +

Returns whether multiple files can be uploaded.

+
See also:
setMultiple()
+ +
+
+ +
+
+ + + + + + + +
WProgressBar* Wt::WFileUpload::progressBar ( ) const
+
+
+ +

Returns the progress bar.

+
See also:
setProgressBar()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFileUpload::setMultiple (bool  multiple )
+
+
+ +

Sets whether the file upload accepts multiple files.

+

In browsers which support the "multiple" attribute for the file upload (to be part of HTML5) control, this will allow the user to select multiple files at once.

+

All uploaded files are available from uploadedFiles(). The single-file API will return only information on the first uploaded file.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFileUpload::setProgressBar (WProgressBar progressBar )
+
+
+ +

Sets a progress bar to indicate upload progress.

+

When the file is being uploaded, upload progress is indicated using the provided progress bar. Both the progress bar range and values are configured when the upload starts.

+

If the provided progress bar already has a parent, then the file upload itself is hidden as soon as the upload starts. If the provided progress bar does not yet have a parent, then the bar becomes part of the file upload, and replaces the file prompt when the upload is started.

+

The default progress bar is 0 (no upload progress is indicated).

+
See also:
dataReceived()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WFileUpload::spoolFileName ( ) const
+
+
+ +

Returns the spooled location of the uploaded file.

+

Returns the temporary filename in which the uploaded file was spooled. The file is guaranteed to exist as long as the WFileUpload widget is not deleted, or a new file is not uploaded.

+

When multiple files were uploaded, this returns the information from the first file.

+
See also:
stealSpooledFile()
+
+uploaded
+ +
+
+ +
+
+ + + + + + + +
void Wt::WFileUpload::stealSpooledFile ( )
+
+
+ +

Steals the spooled file.

+

By stealing the file, the spooled file will no longer be deleted together with this widget, which means you need to take care of managing that.

+

When multiple files were uploaded, this returns the information from the first file.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WFileUpload::upload ( )
+
+
+ +

Starts the file upload.

+

The uploaded() signal is emitted when a file is uploaded, or the fileTooLarge() signal is emitted when the file size exceeded the maximum request size.

+
See also:
uploaded()
+
+canUpload()
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WFileUpload::uploaded ( )
+
+
+ +

Signal emitted when a new file was uploaded.

+

This signal is emitted when file upload has been completed. It is good practice to hide or delete the WFileUpload widget when a file has been uploaded succesfully.

+
See also:
upload()
+
+fileTooLarge()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.map new file mode 100644 index 0000000..76eb54b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.md5 new file mode 100644 index 0000000..11bdf33 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.md5 @@ -0,0 +1 @@ +f0ec48cd6700608ffb1f39c0be5288a2 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.png new file mode 100644 index 0000000..96ad0c2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WFileUpload__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout-members.html new file mode 100644 index 0000000..1084bd8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout-members.html @@ -0,0 +1,118 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFitLayout Member List

+
+
+This is the complete list of members for Wt::WFitLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *)Wt::WFitLayout [virtual]
addWidget(WWidget *widget)Wt::WLayout
children() const Wt::WObject
count() const Wt::WFitLayout [virtual]
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WFitLayout [virtual]
itemAt(int index) const Wt::WFitLayout [virtual]
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *)Wt::WFitLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WFitLayout(WWidget *parent=0)Wt::WFitLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout.html new file mode 100644 index 0000000..ef2ed99 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout.html @@ -0,0 +1,234 @@ + + + + +Wt: Wt::WFitLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WFitLayout Class Reference

+
+
+ +

A layout manager which spans a single widget to all available space. +More...

+ +

#include <Wt/WFitLayout>

+
+Inheritance diagram for Wt::WFitLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

WFitLayout (WWidget *parent=0)
 Creates a new fit layout.
virtual void addItem (WLayoutItem *)
 Adds a layout item.
virtual void removeItem (WLayoutItem *)
 Removes a layout item (widget or nested layout).
virtual WLayoutItemitemAt (int index) const
 Returns the layout item at a specific index.
virtual int indexOf (WLayoutItem *item) const
 Returns the index of a given item.
virtual int count () const
 Returns the number of items in this layout.
+

Detailed Description

+

A layout manager which spans a single widget to all available space.

+

This layout manager may manage only a single child widget, and sizes that widget so that it uses all space available in the parent.

+
Note:
This layout manager is applicable only to Ext::Container container widgets. If you wish to fit widgets within a container widgets, use a WBoxLayout instead (with a single child).
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WFitLayout::addItem (WLayoutItem item ) [virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout.

+

How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WFitLayout::count ( ) const [virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WFitLayout::indexOf (WLayoutItem item ) const [virtual]
+
+
+ +

Returns the index of a given item.

+

The default implementation loops over all items, and returns the index for which itemAt(index) equals item.

+
See also:
itemAt(int) const
+ +

Reimplemented from Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WFitLayout::itemAt (int  index ) const [virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFitLayout::removeItem (WLayoutItem item ) [virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.map new file mode 100644 index 0000000..e293acd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.md5 new file mode 100644 index 0000000..cc1725d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.md5 @@ -0,0 +1 @@ +3df9d242c08a474b070fe8b0ac7e016e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.png new file mode 100644 index 0000000..f2c3fb1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WFitLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject-members.html new file mode 100644 index 0000000..e792145 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject-members.html @@ -0,0 +1,186 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFlashObject Member List

+
+
+This is the complete list of members for Wt::WFlashObject, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsFlashRef() const Wt::WFlashObject
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WFlashObject [virtual]
sender()Wt::WObject [protected, static]
setAlternativeContent(WWidget *alternative)Wt::WFlashObject
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFlashParameter(const std::string &name, const WString &value)Wt::WFlashObject
setFlashVariable(const std::string &name, const WString &value)Wt::WFlashObject
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFlashObject(const std::string &url, WContainerWidget *parent=0)Wt::WFlashObject
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFlashObject()Wt::WFlashObject
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject.html new file mode 100644 index 0000000..15afca5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject.html @@ -0,0 +1,292 @@ + + + + +Wt: Wt::WFlashObject Class Reference + + + + + + + + + +
+ +
+

Wt::WFlashObject Class Reference

+
+
+ +

A widget that renders a Flash object (also known as Flash movie). +More...

+ +

#include <Wt/WFlashObject>

+
+Inheritance diagram for Wt::WFlashObject:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

WFlashObject (const std::string &url, WContainerWidget *parent=0)
 Constructs a Flash widget.
 ~WFlashObject ()
 Destructor.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
void setFlashParameter (const std::string &name, const WString &value)
 Sets a Flash parameter.
void setFlashVariable (const std::string &name, const WString &value)
 Sets a Flash variable.
std::string jsFlashRef () const
 A JavaScript expression that returns the DOM node of the Flash object.
void setAlternativeContent (WWidget *alternative)
 Sets content to be displayed if Flash is not available.
+

Detailed Description

+

A widget that renders a Flash object (also known as Flash movie).

+

This class loads a .swf Flash file in the browser.

+

Usage example:

+
 WFlashObject *player = new WFlashObject("dummy.swf", parent);
+ player->resize(300, 600);
+ player->setFlashParameter("allowScriptAccess", "always");
+ player->setFlashParameter("quality", "high");
+ player->setFlashParameter("bgcolor", "#aaaaaa");
+ player->setFlashVariable("someVar", "foo");
+

Flash objects must have their size set, so do not forget to call resize() after instantiation or your content will be invisible. Wt will modify width and height attributes of the Flash object if resize() is called after the object is instantiated; it is however not clear if this is permitted by the Flash plugin.

+

Any WWidget can be set with setAlternativeContent(), and this widget will be shown only when the browser has no Flash support. By default, a 'Download Flash' button will be displayed that links to a website where the Flash player can be downloaded. You may modify this to be any widget, such as a WImage, or a native Wt implementation of the Flash movie.

+

CSS

+

Styling through CSS is not applicable.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WFlashObject::~WFlashObject ( )
+
+
+ +

Destructor.

+

The Flash object is removed.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string Wt::WFlashObject::jsFlashRef ( ) const
+
+
+ +

A JavaScript expression that returns the DOM node of the Flash object.

+

The Flash object is not stored in jsRef(), but in jsFlashRef(). Use this method in conjuction with WApplication::doJavaScript() or JSlot in custom JavaScript code to refer to the Flash content.

+

The expression returned by jsFlashRef() may be null, for example on IE when flash is not installed.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFlashObject::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFlashObject::setAlternativeContent (WWidget alternative )
+
+
+ +

Sets content to be displayed if Flash is not available.

+

Any widget can be a placeholder when Flash is not installed in the users browser. By default, this will show a 'Download Flash' button and link to the Flash download site.

+

Call this method with a NULL pointer to remove the alternative content.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFlashObject::setFlashParameter (const std::string &  name,
const WString value 
)
+
+
+ +

Sets a Flash parameter.

+

The Flash parameters are items such as quality, scale, menu, ... They are passed as PARAM objects to the Flash movie. See the adobe website for more information about these parameters: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_12701

+

Setting the same Flash parameter a second time will overwrite the previous value. Flash parameters can only be set before the widget is rendered for the first time, so it is recommended to call this method shortly after construction before returning to the idle loop.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFlashObject::setFlashVariable (const std::string &  name,
const WString value 
)
+
+
+ +

Sets a Flash variable.

+

This method is a helper function to set variable values in the flashvars parameter.

+

The flash variables will be properly encoded (URL encoding) before being passed to the flashvars parameter.

+

Setting the same Flash variable a second time will overwrite the previous value. Flash variables can only be set before the widget is rendered for the first time, so it is recommended to call this method shortly after construction before returning to the idle loop.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.map new file mode 100644 index 0000000..5c31ce8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.md5 new file mode 100644 index 0000000..bf08161 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.md5 @@ -0,0 +1 @@ +61748e7ad3481bdd9430e3c356519d89 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.png new file mode 100644 index 0000000..2e32a20 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WFlashObject__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFont-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFont-members.html new file mode 100644 index 0000000..d393cc9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFont-members.html @@ -0,0 +1,124 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFont Member List

+
+
+This is the complete list of members for Wt::WFont, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bold enum valueWt::WFont
Bolder enum valueWt::WFont
Cursive enum valueWt::WFont
Default enum valueWt::WFont
Fantasy enum valueWt::WFont
FixedSize enum valueWt::WFont
fixedSize() const Wt::WFont
genericFamily() const Wt::WFont
GenericFamily enum nameWt::WFont
Italic enum valueWt::WFont
Large enum valueWt::WFont
Larger enum valueWt::WFont
Lighter enum valueWt::WFont
Medium enum valueWt::WFont
Monospace enum valueWt::WFont
NormalStyle enum valueWt::WFont
NormalVariant enum valueWt::WFont
NormalWeight enum valueWt::WFont
Oblique enum valueWt::WFont
operator==(const WFont &other) const Wt::WFont
SansSerif enum valueWt::WFont
Serif enum valueWt::WFont
setFamily(GenericFamily genericFamily, const WString &specificFamilies=WString())Wt::WFont
setSize(Size size, const WLength &fixedSize=WLength::Auto)Wt::WFont
setStyle(Style style)Wt::WFont
setVariant(Variant variant)Wt::WFont
setWeight(Weight weight, int value=400)Wt::WFont
size() const Wt::WFont
Size enum nameWt::WFont
Small enum valueWt::WFont
SmallCaps enum valueWt::WFont
Smaller enum valueWt::WFont
specificFamilies() const Wt::WFont
Style enum nameWt::WFont
style() const Wt::WFont
Value enum valueWt::WFont
Variant enum nameWt::WFont
variant() const Wt::WFont
Weight enum nameWt::WFont
weight() const Wt::WFont
weightValue() const Wt::WFont
WFont()Wt::WFont
XLarge enum valueWt::WFont
XSmall enum valueWt::WFont
XXLarge enum valueWt::WFont
XXSmall enum valueWt::WFont
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFont.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFont.html new file mode 100644 index 0000000..6144244 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFont.html @@ -0,0 +1,435 @@ + + + + +Wt: Wt::WFont Class Reference + + + + + + + + + +
+ +
+

Wt::WFont Class Reference
+ +[Style classesPainting system] +

+
+
+ +

A style class describing a font. +More...

+ +

#include <Wt/WFont>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  GenericFamily {
+  Default, +Serif, +SansSerif, +Cursive, +
+  Fantasy, +Monospace +
+ }
 

The generic font family.

+ More...
enum  Style { NormalStyle, +Italic, +Oblique + }
 

The font style.

+ More...
enum  Variant { NormalVariant, +SmallCaps + }
 

The font variant.

+ More...
enum  Weight {
+  NormalWeight, +Bold, +Bolder, +Lighter, +
+  Value +
+ }
 

The font weight.

+ More...
enum  Size {
+  XXSmall, +XSmall, +Small, +Medium, +
+  Large, +XLarge, +XXLarge, +Smaller, +
+  Larger, +FixedSize +
+ }
 

The font size.

+ More...

+Public Member Functions

WFont ()
 A default font (dependent on the user agent).
+bool operator== (const WFont &other) const
 Comparison operator.
void setFamily (GenericFamily genericFamily, const WString &specificFamilies=WString())
 Sets the font family.
+GenericFamily genericFamily () const
 Returns the font generic family.
+const WStringspecificFamilies () const
 Returns the font specific family names.
+void setStyle (Style style)
 Sets the font style.
+Style style () const
 Returns the font style.
+void setVariant (Variant variant)
 Sets the font variant.
+Variant variant () const
 Returns the font variant.
void setWeight (Weight weight, int value=400)
 Sets the font weight.
+Weight weight () const
 Returns the font weight.
+int weightValue () const
 Returns the font weight value.
+void setSize (Size size, const WLength &fixedSize=WLength::Auto)
 Sets the font size.
+Size size () const
 Returns the font size.
+WLength fixedSize () const
 Returns the fixed font size for FixedSize .
+

Detailed Description

+

A style class describing a font.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WFont::GenericFamily
+
+
+ +

The generic font family.

+
Enumerator:
+ + + + + + +
Default  +

Browser-dependent default.

+
Serif  +

for example: Times

+
SansSerif  +

for example: Helvetica

+
Cursive  +

for example: Zapf-Chancery

+
Fantasy  +

for example: Western

+
Monospace  +

for example: Courier

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WFont::Size
+
+
+ +

The font size.

+
Enumerator:
+ + + + + + + + + + +
XXSmall  +

Extra Extra small.

+
XSmall  +

Extra small.

+
Small  +

Small.

+
Medium  +

Medium, default.

+
Large  +

Large.

+
XLarge  +

Extra large.

+
XXLarge  +

Extra Extra large.

+
Smaller  +

Relatively smaller than the parent widget.

+
Larger  +

Relatively larger than the parent widget.

+
FixedSize  +

Explicit size, See also fontFixedSize()

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WFont::Style
+
+
+ +

The font style.

+
Enumerator:
+ + + +
NormalStyle  +

Normal (default)

+
Italic  +

Italic.

+
Oblique  +

Oblique.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WFont::Variant
+
+
+ +

The font variant.

+
Enumerator:
+ + +
NormalVariant  +

Normal (default)

+
SmallCaps  +

Small Capitals.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WFont::Weight
+
+
+ +

The font weight.

+
Enumerator:
+ + + + + +
NormalWeight  +

Normal (default) (Value == 400)

+
Bold  +

Bold (Value == 700)

+
Bolder  +

Bolder than the parent widget.

+
Lighter  +

Lighter than the parent widget.

+
Value  +

Specify a value (100 - 900)

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFont::setFamily (GenericFamily  genericFamily,
const WString specificFamilies = WString() 
)
+
+
+ +

Sets the font family.

+

The font family is specified using a generic family name, in addition to a comma-seperated list of specific font choices.

+

The first specific font that can be matched will be used, otherwise a generic font will be used.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WFont::setWeight (Weight  weight,
int  value = 400 
)
+
+
+ +

Sets the font weight.

+

When setting weight == Value, you may specify a value.

+

Valid values are between 100 and 900, and are rounded to multiples of 100.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget-members.html new file mode 100644 index 0000000..fe916a4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget-members.html @@ -0,0 +1,220 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WFormWidget Member List

+
+
+This is the complete list of members for Wt::WFormWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WFormWidget [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget.html new file mode 100644 index 0000000..2bbecc6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget.html @@ -0,0 +1,511 @@ + + + + +Wt: Wt::WFormWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WFormWidget Class Reference

+
+
+ +

An abstract widget that corresponds to an HTML form element. +More...

+ +

#include <Wt/WFormWidget>

+
+Inheritance diagram for Wt::WFormWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WFormWidget (WContainerWidget *parent=0)
 Creates a WFormWidget with an optional parent.
 ~WFormWidget ()
 Destructor.
WLabellabel () const
 Returns the label associated with this widget.
virtual void setHidden (bool hidden)
 Sets the hidden state of this widget.
void setValidator (WValidator *validator)
 Sets a validator for this field.
+WValidatorvalidator () const
 Returns the validator.
+virtual WValidator::State validate ()
 Validates the field.
void setEnabled (bool enabled)
 Sets whether the widget is enabled.
void setFocus ()
 Gives focus.
void setFocus (bool focus)
 Changes focus.
+bool hasFocus () const
 Returns whether this widget has focus.
virtual void setTabIndex (int index)
 Sets the tab index.
virtual int tabIndex () const
 Returns the tab index.
void setReadOnly (bool readOnly)
 Sets the element read-only.
bool isReadOnly () const
 Returns whether the form element is read-only.
void setEmptyText (const WString &emptyText)
 Sets the empty text to be shown when the field is empty.
const WStringemptyText ()
 Returns the empty text to be shown when the field is empty.
+EventSignalchanged ()
 Signal emitted when the value was changed.
+EventSignalselected ()
 Signal emitted when ??
+EventSignalblurred ()
 Signal emitted when the widget lost focus.
+EventSignalfocussed ()
 Signal emitted when the widget recieved focus.

+Protected Member Functions

virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation.
virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.
+

Detailed Description

+

An abstract widget that corresponds to an HTML form element.

+

A WFormWidget may receive focus, can be disabled, and can have a label that acts as proxy for getting focus. It provides signals which reflect changes to its value, or changes to its focus.

+

Form widgets also have built-in support for validation, using setValidator(WValidator *). If the validator provide client-side validation, then an invalid validation state is reflected using the style class "Wt-invalid". All validators provided by Wt implement client-side validation.

+

On the server-side, use validate() method to validate the content using a validator previously set.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WFormWidget::~WFormWidget ( )
+
+
+ +

Destructor.

+

If a label was associated with the widget, its buddy is reset to 0.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WString& Wt::WFormWidget::emptyText ( )
+
+
+ +

Returns the empty text to be shown when the field is empty.

+
See also:
setEmptyText()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WFormWidget::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
WStatelessSlot * Wt::WFormWidget::getStateless (Method  method ) [protected, virtual]
+
+
+ +

On-demand stateless slot implementation.

+

This method returns a stateless slot implementation for the given method. To avoid the cost of declaring methods to be stateless when they are not used, you may reimplement this method to provide a stateless implementation for a method only when the method is involved in a slot connection.

+

Use implementStateless() to provide a stateless implementation of the given method, or return the base class implementation otherwise.

+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::WAbstractToggleButton.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WFormWidget::isReadOnly ( ) const
+
+
+ +

Returns whether the form element is read-only.

+
See also:
setReadOnly()
+ +
+
+ +
+
+ + + + + + + +
WLabel* Wt::WFormWidget::label ( ) const
+
+
+ +

Returns the label associated with this widget.

+

Returns the label (if there is one) that acts as a proxy for this widget.

+
See also:
WLabel::setBuddy(WFormWidget *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::propagateSetEnabled (bool  enabled ) [protected, virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Reimplemented from Wt::WInteractWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setEmptyText (const WString emptyText )
+
+
+ +

Sets the empty text to be shown when the field is empty.

+
See also:
emptyText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setEnabled (bool  enabled )
+
+
+ +

Sets whether the widget is enabled.

+

A widget that is disabled cannot receive focus or user interaction.

+

This is the opposite of setDisabled().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setFocus (bool  focus )
+
+
+ +

Changes focus.

+

When using focus = false, you can undo a previous setFocus() call.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WFormWidget::setFocus ( )
+
+
+ +

Gives focus.

+

Giving focus to an input element only works when JavaScript is enabled.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets the hidden state of this widget.

+

If the widget has a label, it is hidden and shown together with this widget.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setReadOnly (bool  readOnly )
+
+
+ +

Sets the element read-only.

+

A read-only form element cannot be edited, but the contents can still be selected.

+

By default, a form element area is not read-only.

+
See also:
setEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setTabIndex (int  index ) [virtual]
+
+
+ +

Sets the tab index.

+

For widgets that receive focus, focus is passed on to the next widget in the tabbing chain based on their tab index. When the user navigates through form widgets using the keyboard, widgets receive focus starting from the element with the lowest tab index to elements with the highest tab index.

+

A tab index only applies to widgets than can receive focus (which are WFormWidget, WAnchor, WPushButton), but setting a tab index on any other type of widget will propagate to its contained form widgets.

+

Widgets with a same tab index will receive focus in the same order as they are inserted in the widget tree.

+

The default tab index is 0.

+
See also:
setTabOrder()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WFormWidget::setValidator (WValidator validator )
+
+
+ +

Sets a validator for this field.

+

The validator is used to validate the current input.

+

If the validator has no parent yet, then ownership is transferred to the form field, and thus the validator will be deleted together with the form field.

+

The default value is 0.

+
See also:
validate()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WFormWidget::tabIndex ( ) const [virtual]
+
+
+ +

Returns the tab index.

+
See also:
setTabIndex()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.map new file mode 100644 index 0000000..d5a7b17 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.md5 new file mode 100644 index 0000000..fe81e35 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.md5 @@ -0,0 +1 @@ +ad0af31474ef8472cfe2a51ce4752b57 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.png new file mode 100644 index 0000000..0d8a85a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WFormWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget-members.html new file mode 100644 index 0000000..3f7a314 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget-members.html @@ -0,0 +1,319 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGLWidget Member List

+
+
+This is the complete list of members for Wt::WGLWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activeTexture(GLenum texture)Wt::WGLWidget
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attachShader(Program program, Shader shader)Wt::WGLWidget
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
bindAttribLocation(Program program, unsigned index, const std::string &name)Wt::WGLWidget
bindBuffer(GLenum target, Buffer buffer)Wt::WGLWidget
bindTexture(GLenum target, Texture texture)Wt::WGLWidget
blendColor(double red, double green, double blue, double alpha)Wt::WGLWidget
blendEquation(GLenum mode)Wt::WGLWidget
blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)Wt::WGLWidget
blendFunc(GLenum sfactor, GLenum dfactor)Wt::WGLWidget
blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)Wt::WGLWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
bufferDatafv(GLenum target, const Iterator begin, const Iterator end, GLenum usage)Wt::WGLWidget
bufferDataiv(GLenum target, const Iterator begin, const Iterator end, GLenum usage, GLenum type)Wt::WGLWidget
bufferSubDatafv(GLenum target, unsigned offset, const Iterator begin, const Iterator end)Wt::WGLWidget
bufferSubDataiv(GLenum target, unsigned offset, const Iterator begin, Iterator end, GLenum type)Wt::WGLWidget
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear(WFlags< GLenum > mask)Wt::WGLWidget
clearColor(double r, double g, double b, double a)Wt::WGLWidget
clearDepth(double depth)Wt::WGLWidget
clearSides() const Wt::WWebWidget [virtual]
clearStencil(int s)Wt::WGLWidget
clicked()Wt::WInteractWidget
ClientSideRenderer enum nameWt::WGLWidget
colorMask(bool red, bool green, bool blue, bool alpha)Wt::WGLWidget
compileShader(Shader shader)Wt::WGLWidget
copyTexImage2D(GLenum target, int level, GLenum internalformat, int x, int y, unsigned width, unsigned height, int border)Wt::WGLWidget
copyTexSubImage2D(GLenum target, int level, int xoffset, int yoffset, int x, int y, unsigned width, unsigned height)Wt::WGLWidget
createBuffer()Wt::WGLWidget
createJavaScriptMatrix4()Wt::WGLWidget
createProgram()Wt::WGLWidget
createShader(GLenum shader)Wt::WGLWidget
createTexture()Wt::WGLWidget
createTextureAndLoad(const std::string &url)Wt::WGLWidget
cullFace(GLenum mode)Wt::WGLWidget
decorationStyle()Wt::WWebWidget [virtual]
deleteBuffer(Buffer buffer)Wt::WGLWidget
deleteProgram(Program program)Wt::WGLWidget
deleteShader(Shader shader)Wt::WGLWidget
deleteTexture(Texture texture)Wt::WGLWidget
depthFunc(GLenum func)Wt::WGLWidget
depthMask(bool flag)Wt::WGLWidget
depthRange(double zNear, double zFar)Wt::WGLWidget
detachShader(Program program, Shader shader)Wt::WGLWidget
disable(GLenum cap)Wt::WGLWidget
Wt::WInteractWidget::disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
drawArrays(GLenum mode, int first, unsigned count)Wt::WGLWidget
drawElements(GLenum mode, unsigned count, GLenum type, unsigned offset)Wt::WGLWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable(GLenum cap)Wt::WGLWidget
Wt::WInteractWidget::enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enableVertexAttribArray(AttribLocation index)Wt::WGLWidget
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
finish()Wt::WGLWidget
floatSide() const Wt::WWebWidget [virtual]
flush()Wt::WGLWidget
frontFace(GLenum mode)Wt::WGLWidget
generateMipmap(GLenum target)Wt::WGLWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getAttribLocation(Program program, const std::string &attrib)Wt::WGLWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
getUniformLocation(Program program, const std::string location)Wt::WGLWidget
GLenum enum nameWt::WGLWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
hint(GLenum target, GLenum mode)Wt::WGLWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
initializeGL()Wt::WGLWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WGLWidget [private, virtual]
lineHeight() const Wt::WWebWidget [virtual]
lineWidth(double width)Wt::WGLWidget
linkProgram(Program program)Wt::WGLWidget
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
PAINT_GL enum valueWt::WGLWidget
paintGL()Wt::WGLWidget [virtual]
parent() const Wt::WWidget
pixelStorei(GLenum pname, int param)Wt::WGLWidget
polygonOffset(double factor, double units)Wt::WGLWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
repaintSlot()Wt::WGLWidget
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WGLWidget [virtual]
RESIZE_GL enum valueWt::WGLWidget
resizeGL(int width, int height)Wt::WGLWidget [virtual]
sampleCoverage(double value, bool invert)Wt::WGLWidget
scissor(int x, int y, unsigned width, unsigned height)Wt::WGLWidget
sender()Wt::WObject [protected, static]
setAlternativeContent(WWidget *alternative)Wt::WGLWidget
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setClientSideLookAtHandler(const JavaScriptMatrix4x4 &m, double lX, double lY, double lZ, double uX, double uY, double uZ, double pitchRate, double yawRate)Wt::WGLWidget
setClientSideWalkHandler(const JavaScriptMatrix4x4 &m, double frontStep, double rotStep)Wt::WGLWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMatrix4(const JavaScriptMatrix4x4 &jsm, const WGenericMatrix< T, 4, 4 > &m)Wt::WGLWidget
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
shaderSource(Shader shader, const std::string &src)Wt::WGLWidget
show()Wt::WWidget
stencilFunc(GLenum func, int ref, unsigned mask)Wt::WGLWidget
stencilFuncSeparate(GLenum face, GLenum func, int ref, unsigned mask)Wt::WGLWidget
stencilMask(unsigned mask)Wt::WGLWidget
stencilMaskSeparate(GLenum face, unsigned mask)Wt::WGLWidget
stencilOp(GLenum fail, GLenum zfail, GLenum zpass)Wt::WGLWidget
stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)Wt::WGLWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
texImage2D(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WImage *image)Wt::WGLWidget
texImage2D(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WHTML5Video *video)Wt::WGLWidget
texImage2D(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, Texture texture)Wt::WGLWidget
texParameteri(GLenum target, GLenum pname, GLenum param)Wt::WGLWidget
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
uniform1f(const UniformLocation &location, double x)Wt::WGLWidget
uniform1fv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform1i(const UniformLocation &location, int x)Wt::WGLWidget
uniform1iv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform2f(const UniformLocation &location, double x, double y)Wt::WGLWidget
uniform2fv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform2i(const UniformLocation &location, int x, int y)Wt::WGLWidget
uniform2iv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform3f(const UniformLocation &location, double x, double y, double z)Wt::WGLWidget
uniform3fv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform3i(const UniformLocation &location, int x, int y, int z)Wt::WGLWidget
uniform3iv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform4f(const UniformLocation &location, double x, double y, double z, double w)Wt::WGLWidget
uniform4fv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniform4i(const UniformLocation &location, int x, int y, int z, int w)Wt::WGLWidget
uniform4iv(const UniformLocation &location, const Array *value)Wt::WGLWidget
uniformMatrix2(const UniformLocation &location, const WGenericMatrix< T, 2, 2 > &m)Wt::WGLWidget
uniformMatrix2fv(const UniformLocation &location, bool transpose, const MatrixType *value)Wt::WGLWidget
uniformMatrix3(const UniformLocation &location, const WGenericMatrix< T, 3, 3 > &m)Wt::WGLWidget
uniformMatrix3fv(const UniformLocation &location, bool transpose, const MatrixType *value)Wt::WGLWidget
uniformMatrix4(const UniformLocation &location, const WGenericMatrix< T, 4, 4 > &m)Wt::WGLWidget
uniformMatrix4(const UniformLocation &location, const JavaScriptMatrix4x4 &m)Wt::WGLWidget
uniformMatrix4fv(const UniformLocation &location, bool transpose, const MatrixType *value)Wt::WGLWidget
UPDATE_GL enum valueWt::WGLWidget
updateGL()Wt::WGLWidget [virtual]
useProgram(Program program)Wt::WGLWidget
validateProgram(Program program)Wt::WGLWidget
vertexAttrib1f(AttribLocation location, double x)Wt::WGLWidget
vertexAttrib1fv(AttribLocation location, const Array *values)Wt::WGLWidget
vertexAttrib2f(AttribLocation location, double x, double y)Wt::WGLWidget
vertexAttrib2fv(AttribLocation location, const Array *values)Wt::WGLWidget
vertexAttrib3f(AttribLocation location, double x, double y, double z)Wt::WGLWidget
vertexAttrib3fv(AttribLocation location, const Array *values)Wt::WGLWidget
vertexAttrib4f(AttribLocation location, double x, double y, double z, double w)Wt::WGLWidget
vertexAttrib4fv(AttribLocation location, const Array *values)Wt::WGLWidget
vertexAttribPointer(AttribLocation location, int size, GLenum type, bool normalized, unsigned stride, unsigned offset)Wt::WGLWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
viewport(int x, int y, unsigned width, unsigned height)Wt::WGLWidget
WGLWidget(WContainerWidget *parent)Wt::WGLWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WGLWidget()Wt::WGLWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget.html new file mode 100644 index 0000000..dccf038 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget.html @@ -0,0 +1,4047 @@ + + + + +Wt: Wt::WGLWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WGLWidget Class Reference

+
+
+ +

WebGL support class. +More...

+ +

#include <Wt/WGLWidget>

+
+Inheritance diagram for Wt::WGLWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  JavaScriptMatrix4x4
 A client-side JavaScript matrix. More...

+Public Types

enum  ClientSideRenderer { PAINT_GL = 1, +RESIZE_GL = 2, +UPDATE_GL = 4 + }
 

Specifies what WebGL function needs to be updated.

+ More...
enum  GLenum
 

The enourmous GLenum.

+ More...

+Public Member Functions

 WGLWidget (WContainerWidget *parent)
 Construct a WebGL widget.
~WGLWidget ()
 Destructor.
virtual void initializeGL ()
 Initialize the WebGL state when the widget is first shown.
virtual void resizeGL (int width, int height)
 Act on resize events.
virtual void paintGL ()
 Update the client-side painting function.
virtual void updateGL ()
 Update state set in initializeGL()
void resize (const WLength &width, const WLength &height)
 Resizes the widget.
void setClientSideLookAtHandler (const JavaScriptMatrix4x4 &m, double lX, double lY, double lZ, double uX, double uY, double uZ, double pitchRate, double yawRate)
 Add a mouse handler to the widget that looks at a given point.
void setClientSideWalkHandler (const JavaScriptMatrix4x4 &m, double frontStep, double rotStep)
 Add a mouse handler to the widget that allows 'walking' in the scene.
void setAlternativeContent (WWidget *alternative)
 Sets the content to be displayed when WebGL is not available.
JSlotrepaintSlot ()
 A JavaScript slot that repaints the widget when triggered.
WebGL methods

The WebGL methods are mostly 1-on-1 translated to the identical JavaScript call. You can use the WebGL methods in your resizeGL(), paintGL() and updateGL() specializations. Wt takes care that data, arguments, ... are transfered to the client side and that the equivalent JavaScript WebGL funtion is executed.

+
void activeTexture (GLenum texture)
 GL function to activate an existing texture.
void attachShader (Program program, Shader shader)
 GL function to attach a shader to a program.
void bindAttribLocation (Program program, unsigned index, const std::string &name)
 GL function to bind an attribute to a given location.
void bindBuffer (GLenum target, Buffer buffer)
 GL function to bind a buffer to a target.
void bindTexture (GLenum target, Texture texture)
 GL function to bind a texture to a target.
void blendColor (double red, double green, double blue, double alpha)
 GL function to set the blending color.
void blendEquation (GLenum mode)
 GL function to set the blending equation.
void blendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
 GL function that sets separate blending functions for RGB and alpha.
void blendFunc (GLenum sfactor, GLenum dfactor)
 GL function to configure the blending function.
void blendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
 GL function that configures the blending function.
template<typename Iterator >
void bufferDatafv (GLenum target, const Iterator begin, const Iterator end, GLenum usage)
 GL function that loads float or double data in a VBO.
template<typename Iterator >
void bufferDataiv (GLenum target, const Iterator begin, const Iterator end, GLenum usage, GLenum type)
 GL function that updates an existing VBO with new integer data.
template<typename Iterator >
void bufferSubDatafv (GLenum target, unsigned offset, const Iterator begin, const Iterator end)
 GL function that updates an existing VBO with new float or double data.
template<typename Iterator >
void bufferSubDataiv (GLenum target, unsigned offset, const Iterator begin, Iterator end, GLenum type)
 GL function that loads integer data in a VBO.
void clear (WFlags< GLenum > mask)
 GL function that clears the given buffers.
void clearColor (double r, double g, double b, double a)
 GL function that sets the clear color of the color buffer.
void clearDepth (double depth)
 GL function that configures the depth to be set when the depth buffer is cleared.
void clearStencil (int s)
 GL function.
void colorMask (bool red, bool green, bool blue, bool alpha)
 GL function.
void compileShader (Shader shader)
 GL function to compile a shader.
void copyTexImage2D (GLenum target, int level, GLenum internalformat, int x, int y, unsigned width, unsigned height, int border)
 GL function to copy a texture image.
void copyTexSubImage2D (GLenum target, int level, int xoffset, int yoffset, int x, int y, unsigned width, unsigned height)
 GL function that copies a part of a texture image.
Buffer createBuffer ()
 GL function that creates an empty VBO.
Program createProgram ()
 GL function that creates an empty program.
Shader createShader (GLenum shader)
 GL function that creates an empty shader.
Texture createTexture ()
 GL function that creates an empty texture.
Texture createTextureAndLoad (const std::string &url)
 GL function that creates an image texture.
void cullFace (GLenum mode)
 GL function that configures the backface culling mode.
void deleteBuffer (Buffer buffer)
 GL function that deletes a VBO.
void deleteProgram (Program program)
 GL function that deletes a program.
void deleteShader (Shader shader)
 GL function that depetes a shader.
void deleteTexture (Texture texture)
 GL function that deletes a texture.
void depthFunc (GLenum func)
 GL function to set the depth test function.
void depthMask (bool flag)
 GL function that enables or disables writing to the depth buffer.
void depthRange (double zNear, double zFar)
 GL function that specifies to what range the normalized [-1,1] z values should match.
void detachShader (Program program, Shader shader)
 GL function that detaches a shader from a program.
void disable (GLenum cap)
 GL function to disable features.
void drawArrays (GLenum mode, int first, unsigned count)
 GL function to draw a VBO.
void drawElements (GLenum mode, unsigned count, GLenum type, unsigned offset)
 GL function to draw indexed VBOs.
void enable (GLenum cap)
 GL function to enable features.
void enableVertexAttribArray (AttribLocation index)
 GL function to enable the vertex attribute array.
void finish ()
 GL function to wait until given commands are executed.
void flush ()
 GL function to force execution of GL commands in finite time.
void frontFace (GLenum mode)
 GL function that specifies which side of a triangle is the front side.
void generateMipmap (GLenum target)
 GL function that generates a set of mipmaps for a texture object.
AttribLocation getAttribLocation (Program program, const std::string &attrib)
 GL function to retrieve an attribute's location in a Program.
UniformLocation getUniformLocation (Program program, const std::string location)
 GL function to retrieve a Uniform's location in a Program.
void hint (GLenum target, GLenum mode)
 GL function to give hints to the render pipeline.
void lineWidth (double width)
 GL function to set the line width.
void linkProgram (Program program)
 GL function to link a program.
void pixelStorei (GLenum pname, int param)
 GL function to set the pixel storage mode.
void polygonOffset (double factor, double units)
 GL function to apply modifications to Z values.
void sampleCoverage (double value, bool invert)
 GL function to set multisample parameters.
void scissor (int x, int y, unsigned width, unsigned height)
 GL function to define the scissor box.
void shaderSource (Shader shader, const std::string &src)
 GL function to set a shader's source code.
void stencilFunc (GLenum func, int ref, unsigned mask)
 GL function to set stencil test parameters.
void stencilFuncSeparate (GLenum face, GLenum func, int ref, unsigned mask)
 GL function to set stencil test parameters for front and/or back stencils.
void stencilMask (unsigned mask)
 GL function to control which bits are to be written in the stencil buffer.
void stencilMaskSeparate (GLenum face, unsigned mask)
 GL function to control which bits are written to the front and/or back stencil buffers.
void stencilOp (GLenum fail, GLenum zfail, GLenum zpass)
 GL function to set stencil test actions.
void stencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
 GL function to set front and/or back stencil test actions separately.
void texImage2D (GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WImage *image)
 GL function to load a 2D texture from a WImage.
void texImage2D (GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WHTML5Video *video)
 GL function to load a 2D texture from a HTML5Video object.
void texImage2D (GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, Texture texture)
 GL function to load a 2D texture loaded with createTextureAndLoad()
void texParameteri (GLenum target, GLenum pname, GLenum param)
 GL function to set texture parameters.
void uniform1f (const UniformLocation &location, double x)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform1fv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform1i (const UniformLocation &location, int x)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform1iv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform2f (const UniformLocation &location, double x, double y)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform2fv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform2i (const UniformLocation &location, int x, int y)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform2iv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform3f (const UniformLocation &location, double x, double y, double z)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform3fv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform3i (const UniformLocation &location, int x, int y, int z)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform3iv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform4f (const UniformLocation &location, double x, double y, double z, double w)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform4fv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
void uniform4i (const UniformLocation &location, int x, int y, int z, int w)
 GL function to set the value of a uniform variable of the current program.
template<typename Array >
void uniform4iv (const UniformLocation &location, const Array *value)
 GL function to set the value of a uniform variable of the current program.
template<typename MatrixType >
void uniformMatrix2fv (const UniformLocation &location, bool transpose, const MatrixType *value)
 GL function to set the value of a uniform matrix of the current program.
template<typename T >
void uniformMatrix2 (const UniformLocation &location, const WGenericMatrix< T, 2, 2 > &m)
 GL function to set the value of a uniform matrix of the current program.
template<typename MatrixType >
void uniformMatrix3fv (const UniformLocation &location, bool transpose, const MatrixType *value)
 GL function to set the value of a uniform matrix of the current program.
template<typename T >
void uniformMatrix3 (const UniformLocation &location, const WGenericMatrix< T, 3, 3 > &m)
 GL function to set the value of a uniform matrix of the current program.
template<typename MatrixType >
void uniformMatrix4fv (const UniformLocation &location, bool transpose, const MatrixType *value)
 GL function to set the value of a uniform matrix of the current program.
template<typename T >
void uniformMatrix4 (const UniformLocation &location, const WGenericMatrix< T, 4, 4 > &m)
 GL function to set the value of a uniform matrix of the current program.
void uniformMatrix4 (const UniformLocation &location, const JavaScriptMatrix4x4 &m)
 GL function to set the value of a uniform matrix of the current program.
void useProgram (Program program)
 GL function to set the current active shader program.
void validateProgram (Program program)
 GL function to validate a program.
void vertexAttrib1f (AttribLocation location, double x)
 GL function to set the value of an attribute of the current program.
template<typename Array >
void vertexAttrib1fv (AttribLocation location, const Array *values)
 GL function to set the value of an attribute of the current program.
void vertexAttrib2f (AttribLocation location, double x, double y)
 GL function to set the value of an attribute of the current program.
template<typename Array >
void vertexAttrib2fv (AttribLocation location, const Array *values)
 GL function to set the value of an attribute of the current program.
void vertexAttrib3f (AttribLocation location, double x, double y, double z)
 GL function to set the value of an attribute of the current program.
template<typename Array >
void vertexAttrib3fv (AttribLocation location, const Array *values)
 GL function to set the value of an attribute of the current program.
void vertexAttrib4f (AttribLocation location, double x, double y, double z, double w)
 GL function to set the value of an attribute of the current program.
template<typename Array >
void vertexAttrib4fv (AttribLocation location, const Array *values)
 GL function to set the value of an attribute of the current program.
void vertexAttribPointer (AttribLocation location, int size, GLenum type, bool normalized, unsigned stride, unsigned offset)
 GL function to bind a VBO to an attribute.
void viewport (int x, int y, unsigned width, unsigned height)
 GL function to set the viewport.
Additional WebGL methods

These methods are used to render WebGL content, but have no equivalent in WebGL.

+

Like the WebGL methods, you can use the WebGL methods in your resizeGL(), paintGL() and updateGL() specializations. It makes no sense to call these methods outside those functions.

+
+JavaScriptMatrix4x4 createJavaScriptMatrix4 ()
 Create a matrix that can be manipulated in client-side JavaScript.
+template<typename T >
void setJavaScriptMatrix4 (const JavaScriptMatrix4x4 &jsm, const WGenericMatrix< T, 4, 4 > &m)
 Set the value of a client-side JavaScript matrix created by createJavaScriptMatrix4x4()

+Private Member Functions

void layoutSizeChanged (int width, int height)
 Virtual method that indicates a size change.
+

Detailed Description

+

WebGL support class.

+

The WGLWidget class is an interface to the HTML5 WebGL infrastructure. Its implementation started based on the working drafts of the Khronos group, and will be updated as the standard stabilizes.

+

The goal of the WGLWidget class is to provide a method to render 3D structures in the browser, where rendering and rerendering is normally done in JavaScript without interaction from the server, unless the scene requires updates.

+

This widget is work in progress. The API may change in the future because of new features, reorganizations or changes in the WebGL draft.

+

For this purpose, the JavaScript functions to render the class are cached on the browser. There are four functions that you may implement in a specialization of this class:

+
    +
  • +initializeGL(): this function is executed only once, right after the successful detection of WebGL in the browser. (note: in future versions, it may be re-executed when the webglcontextlost signal is fired, but this is currently not yet implemented). This is the ideal location to compose shader programs, send VBO's to the client, extract uniform and attribute locations, ... Due to the presence of VBO's, this function may generate a large response to the client.
  • +
  • +resizeGL(): this function is executed whenever the canvas dimensions change. A change in canvas size will require you to invoke the viewport() function again, as well as recalculate the projection matrices (especially when the aspect ratio has changed). Thie resizeGL() function is therefore the ideal location to set those properties. The resizeGL() function is invoked automatically on every resize, and after the first initializeGL() invocation. Additional invocations may be triggered by calling repaint() with the RESIZE_GL flag.
  • +
  • +paintGL(): this is the workhorse. It is executed every time that the scene is to be redrawn. You can use the VBO's and shaders prepared in the initializeGL() phase. Usually, this function sets uniforms and attributes, links attributes to VBO's, applies textures, and draws primitives. You may also create local programs, buffers, ... Remeber that this function is executed a lot of times, so every buffer/program created in this function should also be destroyed to avoid memory leaks. This function is transmitted once to the client, and is executed when the scene needs to be redrawn. Redraws may be triggered from mouse events, timer triggers, events on e.g. a video element, or whatever other event. The paintGL() function can be updated through invoking repaintGL() with the PAINT_GL flag.
  • +
  • +updateGL(): VBO's, programs, uniforms, GL properties, or anything else set during intializeGL() are not necessarily immutable. If you want to change, add, remove or reconfigure those properties, the execution of an updateGL() function can be triggered by invoking repaintGL() with the UPDATE_GL flag. This signals that updateGL() needs to be evaluated - just once.
  • +
+

The WebGL functions are intended to be used exclusively from within the invocation of the four callback functions mentioned above. In order to manually trigger the execution of these function, use the repaintGL().

+

A WGLWidget must be given a size explicitly, or must be put inside a layout manager that manages its width and height. The behaviour of a WGLWidget that was not given a size is undefined.

+

Client side matrices. The WGLWidget has a mechanism to use client-side modifiable matrices in the render functions. These matrices can be used identically to the 'constant', with the advantage that there is no need to have a roundtrip to the server to redraw the scene when they are changed. As such, they are ideal for mouse-based camera manipulations, timer triggered animations, or object manipulations.

+

Note: the client side matrices are currently not yet communicated back to the server, but that is an implementation idea for the future.

+

Member Enumeration Documentation

+ +
+ +
+ +

Specifies what WebGL function needs to be updated.

+
Enumerator:
+ + + +
PAINT_GL  +

refresh paintGL()

+
RESIZE_GL  +

refresh resizeGL()

+
UPDATE_GL  +

refresh updateGL()

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WGLWidget::GLenum
+
+
+ +

The enourmous GLenum.

+

This enum contains all numeric constants defined by the WebGL standard.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
WGLWidget::WGLWidget (WContainerWidget parent )
+
+
+ +

Construct a WebGL widget.

+

Before the first rendering, you must apply a size to the WGLWidget.

+

/code /endcode

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void WGLWidget::activeTexture (GLenum  texture )
+
+
+ +

GL function to activate an existing texture.

+

glActiveTexture() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::attachShader (Program  program,
Shader  shader 
)
+
+
+ +

GL function to attach a shader to a program.

+

glAttachShader() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::bindAttribLocation (Program  program,
unsigned  index,
const std::string &  name 
)
+
+
+ +

GL function to bind an attribute to a given location.

+

glBindAttribLocation() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::bindBuffer (GLenum  target,
Buffer  buffer 
)
+
+
+ +

GL function to bind a buffer to a target.

+

glBindBuffer() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::bindTexture (GLenum  target,
Texture  texture 
)
+
+
+ +

GL function to bind a texture to a target.

+

glBindTexture() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::blendColor (double  red,
double  green,
double  blue,
double  alpha 
)
+
+
+ +

GL function to set the blending color.

+

glBlendColor() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::blendEquation (GLenum  mode )
+
+
+ +

GL function to set the blending equation.

+

glBlendEquation() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::blendEquationSeparate (GLenum  modeRGB,
GLenum  modeAlpha 
)
+
+
+ +

GL function that sets separate blending functions for RGB and alpha.

+

glBlendEquationSeparate() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::blendFunc (GLenum  sfactor,
GLenum  dfactor 
)
+
+
+ +

GL function to configure the blending function.

+

glBlendFunc() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::blendFuncSeparate (GLenum  srcRGB,
GLenum  dstRGB,
GLenum  srcAlpha,
GLenum  dstAlpha 
)
+
+
+ +

GL function that configures the blending function.

+

glBlendFuncSeparate() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Iterator >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::bufferDatafv (GLenum  target,
const Iterator  begin,
const Iterator  end,
GLenum  usage 
)
+
+
+ +

GL function that loads float or double data in a VBO.

+

Unlike the C version, we can't accept a void * here. We must be able to interpret the buffer's data in order to transmit it to the JS side.

+

Later we may also want versions with strides and offsets to cope with more complex buffer layouts that we typically see on desktop WebGL apps; suggestions to improve this are welcome

+

glBufferData() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Iterator >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::bufferDataiv (GLenum  target,
const Iterator  begin,
const Iterator  end,
GLenum  usage,
GLenum  type 
)
+
+
+ +

GL function that updates an existing VBO with new integer data.

+

glBufferData() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Iterator >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::bufferSubDatafv (GLenum  target,
unsigned  offset,
const Iterator  begin,
const Iterator  end 
)
+
+
+ +

GL function that updates an existing VBO with new float or double data.

+

glBufferSubData() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Iterator >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::bufferSubDataiv (GLenum  target,
unsigned  offset,
const Iterator  begin,
Iterator  end,
GLenum  type 
)
+
+
+ +

GL function that loads integer data in a VBO.

+

glBufferSubData() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::clear (WFlags< GLenum mask )
+
+
+ +

GL function that clears the given buffers.

+

glClear() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::clearColor (double  r,
double  g,
double  b,
double  a 
)
+
+
+ +

GL function that sets the clear color of the color buffer.

+

glClearColor() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::clearDepth (double  depth )
+
+
+ +

GL function that configures the depth to be set when the depth buffer is cleared.

+

glClearDepthf() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::clearStencil (int  s )
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::colorMask (bool  red,
bool  green,
bool  blue,
bool  alpha 
)
+
+
+ +

GL function.

+

glColorMask() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::compileShader (Shader  shader )
+
+
+ +

GL function to compile a shader.

+

glCompileShader() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::copyTexImage2D (GLenum  target,
int  level,
GLenum  internalformat,
int  x,
int  y,
unsigned  width,
unsigned  height,
int  border 
)
+
+
+ +

GL function to copy a texture image.

+

glCopyTexImage2D() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::copyTexSubImage2D (GLenum  target,
int  level,
int  xoffset,
int  yoffset,
int  x,
int  y,
unsigned  width,
unsigned  height 
)
+
+
+ +

GL function that copies a part of a texture image.

+

glCopyTexSubImage2D() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
WGLWidget::Buffer WGLWidget::createBuffer ( )
+
+
+ +

GL function that creates an empty VBO.

+

glGenBuffers() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
WGLWidget::Program WGLWidget::createProgram ( )
+
+
+ +

GL function that creates an empty program.

+

glCreateProgram() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
WGLWidget::Shader WGLWidget::createShader (GLenum  shader )
+
+
+ +

GL function that creates an empty shader.

+

glCreateShader() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
WGLWidget::Texture WGLWidget::createTexture ( )
+
+
+ +

GL function that creates an empty texture.

+

glGenTextures() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
WGLWidget::Texture WGLWidget::createTextureAndLoad (const std::string &  url )
+
+
+ +

GL function that creates an image texture.

+

glGenTextures() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::cullFace (GLenum  mode )
+
+
+ +

GL function that configures the backface culling mode.

+

glCullFace() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::deleteBuffer (Buffer  buffer )
+
+
+ +

GL function that deletes a VBO.

+

glDeleteBuffers() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::deleteProgram (Program  program )
+
+
+ +

GL function that deletes a program.

+

glDeleteProgram() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::deleteShader (Shader  shader )
+
+
+ +

GL function that depetes a shader.

+

glDeleteShader() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::deleteTexture (Texture  texture )
+
+
+ +

GL function that deletes a texture.

+

glDeleteTextures() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::depthFunc (GLenum  func )
+
+
+ +

GL function to set the depth test function.

+

glDepthFunc() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::depthMask (bool  flag )
+
+
+ +

GL function that enables or disables writing to the depth buffer.

+

glDepthMask() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::depthRange (double  zNear,
double  zFar 
)
+
+
+ +

GL function that specifies to what range the normalized [-1,1] z values should match.

+

glDepthRangef() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::detachShader (Program  program,
Shader  shader 
)
+
+
+ +

GL function that detaches a shader from a program.

+

glDetachShader() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::disable (GLenum  cap )
+
+
+ +

GL function to disable features.

+

glDisable() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::drawArrays (GLenum  mode,
int  first,
unsigned  count 
)
+
+
+ +

GL function to draw a VBO.

+

glDrawArrays() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::drawElements (GLenum  mode,
unsigned  count,
GLenum  type,
unsigned  offset 
)
+
+
+ +

GL function to draw indexed VBOs.

+

glDrawElements() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::enable (GLenum  cap )
+
+
+ +

GL function to enable features.

+

glEnable() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::enableVertexAttribArray (AttribLocation  index )
+
+
+ +

GL function to enable the vertex attribute array.

+

glEnableVertexAttribArray() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
void WGLWidget::finish ( )
+
+
+ +

GL function to wait until given commands are executed.

+

This call is transfered to JS, but the server will never wait on this call.

+

glFinish() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
void WGLWidget::flush ( )
+
+
+ +

GL function to force execution of GL commands in finite time.

+

glFlush() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::frontFace (GLenum  mode )
+
+
+ +

GL function that specifies which side of a triangle is the front side.

+

glFrontFace() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::generateMipmap (GLenum  target )
+
+
+ +

GL function that generates a set of mipmaps for a texture object.

+

glGenerateMipmap() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WGLWidget::AttribLocation WGLWidget::getAttribLocation (Program  program,
const std::string &  attrib 
)
+
+
+ +

GL function to retrieve an attribute's location in a Program.

+

glGetAttribLocation() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WGLWidget::UniformLocation WGLWidget::getUniformLocation (Program  program,
const std::string  location 
)
+
+
+ +

GL function to retrieve a Uniform's location in a Program.

+

glGetUniformLocation() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::hint (GLenum  target,
GLenum  mode 
)
+
+
+ +

GL function to give hints to the render pipeline.

+

glHint() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
void WGLWidget::initializeGL ( ) [virtual]
+
+
+ +

Initialize the WebGL state when the widget is first shown.

+

initializeGL() is called once, when the widget is first rendered. It usually creates most of the WebGL related state: shaders, VBOs, uniform locations, ...

+

If this state is to be updated during the lifetime of the widget, you should specialize the updateGL() to accomodate for this.

+

Note: in a future version, this method will probably also be invoked on contextrestore events.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::layoutSizeChanged (int  width,
int  height 
) [private, virtual]
+
+
+ +

Virtual method that indicates a size change.

+

This method propagates the client-side width and height of the widget when the widget is contained by a layout manager and setLayoutSizeAware(true) was called.

+
See also:
setLayoutSizeAware()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::lineWidth (double  width )
+
+
+ +

GL function to set the line width.

+

glLineWidth() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::linkProgram (Program  program )
+
+
+ +

GL function to link a program.

+

glLinkProgram() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
void WGLWidget::paintGL ( ) [virtual]
+
+
+ +

Update the client-side painting function.

+

This method is invoked client-side when a repaint is required, i.e. when the repaintSlot() (a JavaScript-side JSlot) is triggered. Typical examples are: after mouse-based camera movements, after a timed update of a camera or an object's position, after a resize event (resizeGL() will also be called then), after an animation event, ... In many cases, this function will be executed client-side many many times.

+

Using the WebGL functions from this class, you construct a scene. The implementation tracks all JavaScript calls that need to be performed to draw the scenes, and will replay them verbatim on every trigger of the repaintSlot(). There are a few mechanisms that may be employed to change what is rendered without updating the paintGL() cache:

+
    +
  • +Client-side matrices may be used to change camera viewpoints, manipilate separate object's model transformation matrices, ...
  • +
  • +Shader sources can be updated without requiring the paint function to be renewed
  • +
+

Updating the paintGL() cache is usually not too expensive; the VBOs, which are large in many cases, are already at the client side, while the paintGL() code only draws the VBOs. Of course, if you have to draw many separate objects, the paintGL() JS code may become large and updating is more expensive.

+

In order to update the paintGL() cache, call repaintGL() with the PAINT_GL parameter, which will cause the invocation of this method.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::pixelStorei (GLenum  pname,
int  param 
)
+
+
+ +

GL function to set the pixel storage mode.

+

glPixelStorei() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::polygonOffset (double  factor,
double  units 
)
+
+
+ +

GL function to apply modifications to Z values.

+

glPolygonOffset() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
JSlot& Wt::WGLWidget::repaintSlot ( )
+
+
+ +

A JavaScript slot that repaints the widget when triggered.

+

This is useful for client-side initiated repaints. You may e.g. use this if you write your own client-side mouse handler, or if you updated a texture, or if you're playing a video texture.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::resizeGL (int  width,
int  height 
) [virtual]
+
+
+ +

Act on resize events.

+

Usually, this method only contains functions to set the viewport and the projection matrix (as this is aspect ration dependent).

+

resizeGL() is rendered after initializeGL, and whenever widget is resized. After this method finishes, the widget is repainted with the cached client-side paint function.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::sampleCoverage (double  value,
bool  invert 
)
+
+
+ +

GL function to set multisample parameters.

+

glSampleCoverage() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::scissor (int  x,
int  y,
unsigned  width,
unsigned  height 
)
+
+
+ +

GL function to define the scissor box.

+

glScissor() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::setAlternativeContent (WWidget alternative )
+
+
+ +

Sets the content to be displayed when WebGL is not available.

+

If Wt cannot create a working WebGL context, this content will be shown to the user. This may be a text explanation, or a pre-rendered image, or a video, a flash movie, ...

+

The default is a widget that explains to the user that he has no WebGL support.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::setClientSideLookAtHandler (const JavaScriptMatrix4x4 m,
double  lX,
double  lY,
double  lZ,
double  uX,
double  uY,
double  uZ,
double  pitchRate,
double  yawRate 
)
+
+
+ +

Add a mouse handler to the widget that looks at a given point.

+

This will allow a user to change client-side matrix m with the mouse. M is a model transformation matrix, representing the viewpoint of the camera.

+

Through mouse operations, the camera can be changed by the user, but (lX, lY, lZ) will always be at the center of the display, (uX, uY, uZ) is considered to be the up direction, and the distance of the camera to (lX, lY, lZ) will never change.

+

Pressing the left mouse button and moving the mouse left/right will rotate the camera around the up (uX, uY, uZ) direction. Moving up/down will tilt the camera (causing it to move up/down to keep the lookpoint centered). The scroll wheel simulates zooming by scaling the scene.

+

pitchRate and yawRate control how much the camera will move per mouse pixel.

+

Usually this method is called after setting a camera transformation with a client-side matrix in initializeGL(). However, this function may also be called from outside the intializeGL()/paintGL()/updateGL() methods (but not before m was initialized).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::setClientSideWalkHandler (const JavaScriptMatrix4x4 m,
double  frontStep,
double  rotStep 
)
+
+
+ +

Add a mouse handler to the widget that allows 'walking' in the scene.

+

This will allow a user to change client-side matrix m with the mouse. M is a model transformation matrix, representing the viewpoint of the camera.

+

Through mouse operations, the camera can be changed by the user, as if he is walking around on a plane.

+

Pressing the left mouse button and moving the mouse left/right will rotate the camera around Y axis. Moving the mouse up/down will move the camera in the Z direction (walking forward/backward). centered).

+

frontStep and rotStep control how much the camera will move per mouse pixel.

+

Usually this method is called after setting a camera transformation with a client-side matrix in initializeGL(). However, this function may also be called from outside the intializeGL()/paintGL()/updateGL() methods (but not before m was initialized).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::shaderSource (Shader  shader,
const std::string &  src 
)
+
+
+ +

GL function to set a shader's source code.

+

glShaderSource() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::stencilFunc (GLenum  func,
int  ref,
unsigned  mask 
)
+
+
+ +

GL function to set stencil test parameters.

+

glStencilFunc() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::stencilFuncSeparate (GLenum  face,
GLenum  func,
int  ref,
unsigned  mask 
)
+
+
+ +

GL function to set stencil test parameters for front and/or back stencils.

+

glStencilFuncSeparate() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::stencilMask (unsigned  mask )
+
+
+ +

GL function to control which bits are to be written in the stencil buffer.

+

glStencilMask() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WGLWidget::stencilMaskSeparate (GLenum  face,
unsigned  mask 
)
+
+
+ +

GL function to control which bits are written to the front and/or back stencil buffers.

+

glStencilMaskSeparate() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::stencilOp (GLenum  fail,
GLenum  zfail,
GLenum  zpass 
)
+
+
+ +

GL function to set stencil test actions.

+

glStencilOp() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::stencilOpSeparate (GLenum  face,
GLenum  fail,
GLenum  zfail,
GLenum  zpass 
)
+
+
+ +

GL function to set front and/or back stencil test actions separately.

+

glStencilOpSeparate() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::texImage2D (GLenum  target,
int  level,
GLenum  internalformat,
GLenum  format,
GLenum  type,
WImage image 
)
+
+
+ +

GL function to load a 2D texture from a WImage.

+

Note: WImage must be loaded before this function is executed.

+

glTexImage2D() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::texImage2D (GLenum  target,
int  level,
GLenum  internalformat,
GLenum  format,
GLenum  type,
Texture  texture 
)
+
+
+ +

GL function to load a 2D texture loaded with createTextureAndLoad()

+

This function must only be used for textures created with createTextureAndLoad()

+

Note: the WGLWidget implementation will delay rendering until all textures created with createTextureAndLoad() are loaded in the browser.

+

glTexImage2D() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::texImage2D (GLenum  target,
int  level,
GLenum  internalformat,
GLenum  format,
GLenum  type,
WHTML5Video video 
)
+
+
+ +

GL function to load a 2D texture from a HTML5Video object.

+

Note: the video must be loaded prior to calling this function. The current frame is used as texture image.

+

glTexImage2D() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::texParameteri (GLenum  target,
GLenum  pname,
GLenum  param 
)
+
+
+ +

GL function to set texture parameters.

+

glTexParameter() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform1f (const UniformLocation &  location,
double  x 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform1fv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform1i (const UniformLocation &  location,
int  x 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform1iv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform2f (const UniformLocation &  location,
double  x,
double  y 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform2fv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform2i (const UniformLocation &  location,
int  x,
int  y 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform2iv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform3f (const UniformLocation &  location,
double  x,
double  y,
double  z 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform3fv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform3i (const UniformLocation &  location,
int  x,
int  y,
int  z 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform3iv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform4f (const UniformLocation &  location,
double  x,
double  y,
double  z,
double  w 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform4fv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform4i (const UniformLocation &  location,
int  x,
int  y,
int  z,
int  w 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniform4iv (const UniformLocation &  location,
const Array *  value 
)
+
+
+ +

GL function to set the value of a uniform variable of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix2 (const UniformLocation &  location,
const WGenericMatrix< T, 2, 2 > &  m 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

This function renders the matrix in the proper row/column order.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename MatrixType >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix2fv (const UniformLocation &  location,
bool  transpose,
const MatrixType *  value 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

Attention: The OpenGL ES specification states that transpose MUST be false.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix3 (const UniformLocation &  location,
const WGenericMatrix< T, 3, 3 > &  m 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

This function renders the matrix in the proper row/column order.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename MatrixType >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix3fv (const UniformLocation &  location,
bool  transpose,
const MatrixType *  value 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

Attention: The OpenGL ES specification states that transpose MUST be false.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix4 (const UniformLocation &  location,
const WGenericMatrix< T, 4, 4 > &  m 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

This function renders the matrix in the proper row/column order.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix4 (const UniformLocation &  location,
const JavaScriptMatrix4x4 m 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename MatrixType >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::uniformMatrix4fv (const UniformLocation &  location,
bool  transpose,
const MatrixType *  value 
)
+
+
+ +

GL function to set the value of a uniform matrix of the current program.

+

Attention: The OpenGL ES specification states that transpose MUST be false.

+

glUniform() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + +
void WGLWidget::updateGL ( ) [virtual]
+
+
+ +

Update state set in initializeGL()

+

Invoked when repaint is called with the UPDATE_GL call.

+

This is intended to be executed when you want to change programs, 'constant' uniforms, or even VBO's, ... without resending already initialized data. It is a mechanism to make changes to what you've set in intializeGL(). For every server-side invocation of this method, the result will be rendered client-side exactly once.

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::useProgram (Program  program )
+
+
+ +

GL function to set the current active shader program.

+

glUseProgram() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + +
void WGLWidget::validateProgram (Program  program )
+
+
+ +

GL function to validate a program.

+

implementation note: there is currently not yet a method to read out the validation result.

+

glValidateProgram() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib1f (AttribLocation  location,
double  x 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib1fv (AttribLocation  location,
const Array *  values 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib2f (AttribLocation  location,
double  x,
double  y 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib2fv (AttribLocation  location,
const Array *  values 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib3f (AttribLocation  location,
double  x,
double  y,
double  z 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib3fv (AttribLocation  location,
const Array *  values 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib4f (AttribLocation  location,
double  x,
double  y,
double  z,
double  w 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+
+template<typename Array >
+ + + + + + + + + + + + + + + + + + +
void Wt::WGLWidget::vertexAttrib4fv (AttribLocation  location,
const Array *  values 
)
+
+
+ +

GL function to set the value of an attribute of the current program.

+

glVertexAttrib() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::vertexAttribPointer (AttribLocation  location,
int  size,
GLenum  type,
bool  normalized,
unsigned  stride,
unsigned  offset 
)
+
+
+ +

GL function to bind a VBO to an attribute.

+

This function links the given attribute to the VBO currently bound to the ARRAY_BUFFER target.

+

The size parameter specifies the number of components per attribute (1 to 4). The type parameter is also used to determine the size of each component.

+

The size of a float is 8 bytes.

+

In WGLWidget, the size of an int is 4 bytes.

+

The stride is in bytes.

+

The maximum stride is 255.

+

glVertexAttribPointer() OpenGL ES manpage

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void WGLWidget::viewport (int  x,
int  y,
unsigned  width,
unsigned  height 
)
+
+
+ +

GL function to set the viewport.

+

glViewport() OpenGL ES manpage

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4-members.html new file mode 100644 index 0000000..e790017 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4-members.html @@ -0,0 +1,78 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGLWidget::JavaScriptMatrix4x4 Member List

+
+
+This is the complete list of members for Wt::WGLWidget::JavaScriptMatrix4x4, including all inherited members. +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4.html new file mode 100644 index 0000000..36f4127 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4.html @@ -0,0 +1,95 @@ + + + + +Wt: Wt::WGLWidget::JavaScriptMatrix4x4 Class Reference + + + + + + + + + +
+
+

Wt::WGLWidget::JavaScriptMatrix4x4 Class Reference

+
+
+ +

A client-side JavaScript matrix. +More...

+ +

List of all members.

+ +
+

Detailed Description

+

A client-side JavaScript matrix.

+

A JavaScriptMatrix has methods that make it possible to do client-side calculations on matrices.

+

Important: only the jsRef() of the return value from a call to createJavaScriptMatrix() is a variable name that can be used in custom JavaScript to modify a matrix from external scripts. The jsRef() of return values of operations should not be used as (they refer to unnamed temporary objects - rvalues in C++-lingo).

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.md5 new file mode 100644 index 0000000..e2d6464 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.md5 @@ -0,0 +1 @@ +cdc4fc3184534ffa7a252b5000fa4587 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.png new file mode 100644 index 0000000..ad23936 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WGLWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix-members.html new file mode 100644 index 0000000..33e82b9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix-members.html @@ -0,0 +1,97 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGenericMatrix< T, Rows, Cols > Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix.html new file mode 100644 index 0000000..f9b0cd4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGenericMatrix.html @@ -0,0 +1,367 @@ + + + + +Wt: Wt::WGenericMatrix< T, Rows, Cols > Class Template Reference + + + + + + + + + +
+ +
+

Wt::WGenericMatrix< T, Rows, Cols > Class Template Reference

+
+
+ +

A generalized matrix class. +More...

+ +

#include <Wt/WGenericMatrix>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WGenericMatrix ()
 Construct a identity matrix.
WGenericMatrix (const WGenericMatrix< T, Rows, Cols > &other)
 Copy Constructor.
 WGenericMatrix (const T *elements)
 Constructs a matrix from an array of elements.
const ArrayType & constData () const
 Returns a const pointer to the internal data store.
void copyDataTo (T *data)
 Export the matrix data.
ArrayType & data ()
 Returns a reference to the internal data store.
const ArrayType & data () const
 Returns a const reference to the internal data store.
+void fill (T value)
 Fills every element of the matrix with the given value.
bool isIdentity () const
 Identity check.
void setToIdentity ()
 Set this matrix to the identity matrix.
+WGenericMatrix< T, Cols, Rows > transposed () const
 Returns the transposed of the matrix.
bool operator== (const WGenericMatrix< T, Rows, Cols > &rhs) const
 Equality operator.
bool operator!= (const WGenericMatrix< T, Rows, Cols > &rhs) const
 Inequality operator.
+const T & operator() (int row, int column) const
 Returns the element at the given position.
+T & operator() (int row, int column)
 Returns the element at the given position.
+WGenericMatrix< T, Rows, Cols > & operator*= (const T &factor)
 Multiply every element of the matrix with the given factor.
+WGenericMatrix< T, Rows, Cols > & operator/= (const T &factor)
 Divide every element of the matrix by the given factor.
+WGenericMatrix< T, Rows, Cols > & operator+= (const WGenericMatrix< T, Rows, Cols > &rhs)
 Add the given matrix to this matrix.
+WGenericMatrix< T, Rows, Cols > & operator-= (const WGenericMatrix< T, Rows, Cols > &rhs)
 Substract the given matrix from this matrix.
+

Detailed Description

+

template<typename T, std::size_t Rows, std::size_t Cols>
+ class Wt::WGenericMatrix< T, Rows, Cols >

+ +

A generalized matrix class.

+

This class represents a fixed-size dense (!= sparse) matrix. It can be templatized to the number of rows and columns, and to the datatype stored (integer types, floatin point types, complex types, ...)

+

The row order of this matrix class is row-major. This means that when accessing the raw data store linearly, you will first encounter all elements of the first row, then the second row, and so on.

+

This template class is used in Wt as base class for transformation matrices, but can also be used as a general matrix class. Efficiency for this use case was considered when this class was implemented, but we recommend that you use a more specialized matrix class library if the algorithms you need exceed what's offered here (for example, if you intend to do many linear algebra computations, you may consider boost ublass, MTL, ...).

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
Wt::WGenericMatrix< T, Rows, Cols >::WGenericMatrix ( )
+
+
+ +

Construct a identity matrix.

+

An identity matrix in this context is a matrix where m(i,i) = 1 and m(i,j) = 0, for i != j.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + + +
Wt::WGenericMatrix< T, Rows, Cols >::WGenericMatrix (const T *  elements ) [explicit]
+
+
+ +

Constructs a matrix from an array of elements.

+

The input array is assumed to be in row-major order. If elements is 0, the matrix data is not initialized.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
const ArrayType& Wt::WGenericMatrix< T, Rows, Cols >::constData ( ) const
+
+
+ +

Returns a const pointer to the internal data store.

+

The array can be indexed with []. You can iterate over the entire data store by using begin() and end() iterators. The row order of the data is row major.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + + +
void Wt::WGenericMatrix< T, Rows, Cols >::copyDataTo (T *  data )
+
+
+ +

Export the matrix data.

+

Stores the matrix in an array of Rows*Cols elements of type T, pointed to by data. The data will be stored in row major order.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
const ArrayType& Wt::WGenericMatrix< T, Rows, Cols >::data ( ) const
+
+
+ +

Returns a const reference to the internal data store.

+

The array can be indexed with []. You can iterate over the entire data store by using begin() and end() iterators. The row order of the data is row major.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
ArrayType& Wt::WGenericMatrix< T, Rows, Cols >::data ( )
+
+
+ +

Returns a reference to the internal data store.

+

The array can be indexed with []. You can iterate over the entire data store by using begin() and end() iterators. The row order of the data is row major.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
bool Wt::WGenericMatrix< T, Rows, Cols >::isIdentity ( ) const
+
+
+ +

Identity check.

+

Returns true if the transform represents an identity transformation.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + + +
bool Wt::WGenericMatrix< T, Rows, Cols >::operator!= (const WGenericMatrix< T, Rows, Cols > &  rhs ) const
+
+
+ +

Inequality operator.

+

Returns true if the transforms are different.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + + +
bool Wt::WGenericMatrix< T, Rows, Cols >::operator== (const WGenericMatrix< T, Rows, Cols > &  rhs ) const
+
+
+ +

Equality operator.

+

Returns true if the matrices are exactly the same.

+ +
+
+ +
+
+
+template<typename T, std::size_t Rows, std::size_t Cols>
+ + + + + + + +
void Wt::WGenericMatrix< T, Rows, Cols >::setToIdentity ( )
+
+
+ +

Set this matrix to the identity matrix.

+

An identity matrix is in this context a matrix where m(i,i) = 1 and m(i,j) = 0, for i != j.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent-members.html new file mode 100644 index 0000000..42fbb0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGestureEvent Member List

+
+
+This is the complete list of members for Wt::WGestureEvent, including all inherited members. + + + +
rotation() const Wt::WGestureEvent
scale() const Wt::WGestureEvent
WGestureEvent()Wt::WGestureEvent
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent.html new file mode 100644 index 0000000..f838416 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGestureEvent.html @@ -0,0 +1,111 @@ + + + + +Wt: Wt::WGestureEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WGestureEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a gesture event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

WGestureEvent ()
 Default constructor.
+double scale () const
 Returns the multiplier which the user has pinched or pushed (relative to 1).
+double rotation () const
 Returns the number of degrees the user has rotated his/her fingers.
+

Detailed Description

+

A class providing details for a gesture event.

+
See also:
WInteractWidget::gestureStarted(), WInteractWidget::gestureChanged(), WInteractWidget::gestureEnded()
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap-members.html new file mode 100644 index 0000000..520f09e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap-members.html @@ -0,0 +1,211 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGoogleMap Member List

+
+
+This is the complete list of members for Wt::WGoogleMap, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addMarker(const Coordinate &pos)Wt::WGoogleMap
addPolyline(const std::vector< Coordinate > &points, const WColor &color=red, int width=2, double opacity=1.0)Wt::WGoogleMap
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
checkResize()Wt::WGoogleMap
children() const Wt::WObject
clearOverlays()Wt::WGoogleMap
clearSides() const Wt::WCompositeWidget [virtual]
clicked()Wt::WGoogleMap
decorationStyle()Wt::WCompositeWidget [virtual]
DefaultControl enum valueWt::WGoogleMap
disable()Wt::WWidget
disableDoubleClickZoom()Wt::WGoogleMap
disableDragging()Wt::WGoogleMap
disableGoogleBar()Wt::WGoogleMap
disableScrollWheelZoom()Wt::WGoogleMap
doubleClicked()Wt::WGoogleMap
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
enableDoubleClickZoom()Wt::WGoogleMap
enableDragging()Wt::WGoogleMap
enableGoogleBar()Wt::WGoogleMap
enableScrollWheelZoom()Wt::WGoogleMap
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
HierarchicalControl enum valueWt::WGoogleMap
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
MapTypeControl enum nameWt::WGoogleMap
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
MenuControl enum valueWt::WGoogleMap
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
mouseMoved()Wt::WGoogleMap
NoControl enum valueWt::WGoogleMap
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
openInfoWindow(const Coordinate &pos, const Wt::WString &myHtml)Wt::WGoogleMap
panTo(const Coordinate &center)Wt::WGoogleMap
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
returnToSavedPosition()Wt::WGoogleMap
savePosition()Wt::WGoogleMap
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setCenter(const Coordinate &center)Wt::WGoogleMap
setCenter(const Coordinate &center, int zoom)Wt::WGoogleMap
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMapTypeControl(MapTypeControl type)Wt::WGoogleMap
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
setZoom(int level)Wt::WGoogleMap
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
WGoogleMap(WContainerWidget *parent=0)Wt::WGoogleMap
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
zoomIn()Wt::WGoogleMap
zoomOut()Wt::WGoogleMap
zoomWindow(const std::pair< Coordinate, Coordinate > &bbox)Wt::WGoogleMap
zoomWindow(const Coordinate &topLeft, const Coordinate &bottomRight)Wt::WGoogleMap
~WGoogleMap()Wt::WGoogleMap [virtual]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap.html new file mode 100644 index 0000000..3afe0c2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap.html @@ -0,0 +1,469 @@ + + + + +Wt: Wt::WGoogleMap Class Reference + + + + + + + + + +
+ +
+

Wt::WGoogleMap Class Reference

+
+
+ +

A widget that displays a google map. +More...

+ +

#include <Wt/WGoogleMap>

+
+Inheritance diagram for Wt::WGoogleMap:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Coordinate
 A geographical coordinate (latitude/longitude) More...

+Public Types

enum  MapTypeControl { NoControl, +DefaultControl, +MenuControl, +HierarchicalControl + }
 

MapTypeControl.

+ More...

+Public Member Functions

WGoogleMap (WContainerWidget *parent=0)
 Creates a map widget with optional parent.
+virtual ~WGoogleMap ()
 Destructor.
+void addMarker (const Coordinate &pos)
 Adds a marker overlay to the map.
void addPolyline (const std::vector< Coordinate > &points, const WColor &color=red, int width=2, double opacity=1.0)
 Adds a polyline overlay to the map.
+void clearOverlays ()
 Removes all overlays from the map.
+void openInfoWindow (const Coordinate &pos, const Wt::WString &myHtml)
 Opens a text bubble with html text at a specific location.
+void setCenter (const Coordinate &center)
 Sets the map view to the given center.
+void setCenter (const Coordinate &center, int zoom)
 Sets the map view to the given center and zoom level.
void panTo (const Coordinate &center)
 Changes the center point of the map to the given point.
+void zoomWindow (const std::pair< Coordinate, Coordinate > &bbox)
 Zooms the map to a region defined by a bounding box.
+void zoomWindow (const Coordinate &topLeft, const Coordinate &bottomRight)
 Zooms the map to a region defined by a bounding box.
+void setZoom (int level)
 Sets the zoom level to the given new value.
+void zoomIn ()
 Increments zoom level by one.
+void zoomOut ()
 Decrements zoom level by one.
void savePosition ()
 Stores the current map position and zoom level.
+void returnToSavedPosition ()
 Restores the map view that was saved by savePosition().
void checkResize ()
 Notifies the map of a change of the size of its container.
+void enableDragging ()
 Enables the dragging of the map (enabled by default).
+void disableDragging ()
 Disables the dragging of the map.
+void enableDoubleClickZoom ()
 Enables double click to zoom in and out (enabled by default).
+void disableDoubleClickZoom ()
 Disables double click to zoom in and out.
void enableGoogleBar ()
 Enables the GoogleBar, an integrated search control, on the map.
void disableGoogleBar ()
 Disables the GoogleBar integrated search control.
void enableScrollWheelZoom ()
 Enables zooming using a mouse's scroll wheel.
void disableScrollWheelZoom ()
 Disables zooming using a mouse's scroll wheel.
void setMapTypeControl (MapTypeControl type)
 Sets the map type control.
JSignal< Coordinate > & clicked ()
 The click event.
JSignal< Coordinate > & doubleClicked ()
 The double click event.
+JSignal< Coordinate > & mouseMoved ()
 This event is fired when the user moves the mouse inside the map.
+

Detailed Description

+

A widget that displays a google map.

+

This widget uses the online Google Maps server to display a map. It exposes a part of the google maps API.

+

To use the map on a public server you will need to obtain a key. The widget will look for this key as the configuration property "google_api_key". If this configuration property has not been set, it will use a key that is suitable for localhost.

+

CSS

+

Styling through CSS is not applicable.

+

Contributed by: Richard Ulrich.

+

Member Enumeration Documentation

+ +
+ +
+ +

MapTypeControl.

+
Enumerator:
+ + + + +
NoControl  +

Show no maptype control.

+
DefaultControl  +

Show the default maptype control.

+
MenuControl  +

Show the menu maptype control.

+
HierarchicalControl  +

Show the hierarchical maptype control.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGoogleMap::addPolyline (const std::vector< Coordinate > &  points,
const WColor color = red,
int  width = 2,
double  opacity = 1.0 
)
+
+
+ +

Adds a polyline overlay to the map.

+

specify a value between 0.0 and 1.0 for the opacity.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::checkResize ( )
+
+
+ +

Notifies the map of a change of the size of its container.

+

Call this method after the size of the container DOM object has changed, so that the map can adjust itself to fit the new size.

+ +
+
+ +
+
+ + + + + + + +
JSignal<Coordinate>& Wt::WGoogleMap::clicked ( )
+
+
+ +

The click event.

+

This event is fired when the user clicks on the map with the mouse.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::disableGoogleBar ( )
+
+
+ +

Disables the GoogleBar integrated search control.

+

When disabled, the default Powered by Google logo occupies the position formerly containing this control. Note that this control is already disabled by default.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::disableScrollWheelZoom ( )
+
+
+ +

Disables zooming using a mouse's scroll wheel.

+

Scroll wheel zoom is disabled by default.

+ +
+
+ +
+
+ + + + + + + +
JSignal<Coordinate>& Wt::WGoogleMap::doubleClicked ( )
+
+
+ +

The double click event.

+

This event is fired when a double click is done on the map.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::enableGoogleBar ( )
+
+
+ +

Enables the GoogleBar, an integrated search control, on the map.

+

When enabled, this control takes the place of the default Powered By Google logo.

+

This control is initially disabled.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::enableScrollWheelZoom ( )
+
+
+ +

Enables zooming using a mouse's scroll wheel.

+

Scroll wheel zoom is disabled by default.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WGoogleMap::panTo (const Coordinate center )
+
+
+ +

Changes the center point of the map to the given point.

+

If the point is already visible in the current map view, change the center in a smooth animation.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGoogleMap::savePosition ( )
+
+
+ +

Stores the current map position and zoom level.

+

You can later restore this position using returnToSavedPosition().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WGoogleMap::setMapTypeControl (MapTypeControl  type )
+
+
+ +

Sets the map type control.

+

The control allows selecting and switching between supported map types via buttons.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate-members.html new file mode 100644 index 0000000..96acfe2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGoogleMap::Coordinate Member List

+
+
+This is the complete list of members for Wt::WGoogleMap::Coordinate, including all inherited members. + + + + + + + + +
Coordinate()Wt::WGoogleMap::Coordinate
Coordinate(double latitude, double longitude)Wt::WGoogleMap::Coordinate
distanceTo(const Coordinate &rhs) const Wt::WGoogleMap::Coordinate
latitude() const Wt::WGoogleMap::Coordinate
longitude() const Wt::WGoogleMap::Coordinate
operator()() const Wt::WGoogleMap::Coordinate
setLatitude(double latitude)Wt::WGoogleMap::Coordinate
setLongitude(double longitude)Wt::WGoogleMap::Coordinate
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate.html new file mode 100644 index 0000000..38eee24 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap_1_1Coordinate.html @@ -0,0 +1,141 @@ + + + + +Wt: Wt::WGoogleMap::Coordinate Class Reference + + + + + + + + + +
+ +
+

Wt::WGoogleMap::Coordinate Class Reference

+
+
+ +

A geographical coordinate (latitude/longitude) +More...

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

Coordinate ()
 Default constructor.
Coordinate (double latitude, double longitude)
 Creates with given latitude and longitude.
+void setLatitude (double latitude)
 Sets the latitude.
+void setLongitude (double longitude)
 Sets the longitude.
+double latitude () const
 Returns the latitude.
+double longitude () const
 Returns the longitude.
double distanceTo (const Coordinate &rhs) const
 Calculates the distance between two points in km (approximate).
+std::pair< double, double > operator() () const
 Conversion operator to pair of double.
+

Detailed Description

+

A geographical coordinate (latitude/longitude)

+

Member Function Documentation

+ +
+
+ + + + + + + + +
double Wt::WGoogleMap::Coordinate::distanceTo (const Coordinate rhs ) const
+
+
+ +

Calculates the distance between two points in km (approximate).

+

The calculation uses a sphere. Results can be out by 0.3%.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.md5 new file mode 100644 index 0000000..edd4528 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.md5 @@ -0,0 +1 @@ +a2f12e8f3749464e811af301459890c4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.png new file mode 100644 index 0000000..258700d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WGoogleMap__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout-members.html new file mode 100644 index 0000000..b489752 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout-members.html @@ -0,0 +1,137 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGridLayout Member List

+
+
+This is the complete list of members for Wt::WGridLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WGridLayout [virtual]
addItem(WLayoutItem *item, int row, int column, int rowSpan=1, int columnSpan=1, WFlags< AlignmentFlag > alignment=0)Wt::WGridLayout
addLayout(WLayout *layout, int row, int column, WFlags< AlignmentFlag > alignment=0)Wt::WGridLayout
addLayout(WLayout *layout, int row, int column, int rowSpan, int columnSpan, WFlags< AlignmentFlag > alignment=0)Wt::WGridLayout
addWidget(WWidget *widget, int row, int column, WFlags< AlignmentFlag > alignment=0)Wt::WGridLayout
addWidget(WWidget *widget, int row, int column, int rowSpan, int columnSpan, WFlags< AlignmentFlag > alignment=0)Wt::WGridLayout
Wt::WLayout::addWidget(WWidget *widget)Wt::WLayout
children() const Wt::WObject
columnCount() const Wt::WGridLayout
columnIsResizable(int column) const Wt::WGridLayout
columnStretch(int column) const Wt::WGridLayout
count() const Wt::WGridLayout [virtual]
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
horizontalSpacing() const Wt::WGridLayout
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
itemAt(int index) const Wt::WGridLayout [virtual]
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WGridLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount() const Wt::WGridLayout
rowIsResizable(int row) const Wt::WGridLayout
rowStretch(int row) const Wt::WGridLayout
sender()Wt::WObject [protected, static]
setColumnResizable(int column, bool enabled=true)Wt::WGridLayout
setColumnStretch(int column, int stretch)Wt::WGridLayout
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setHorizontalSpacing(int size)Wt::WGridLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setRowResizable(int row, bool enabled=true)Wt::WGridLayout
setRowStretch(int row, int stretch)Wt::WGridLayout
setVerticalSpacing(int size)Wt::WGridLayout
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
verticalSpacing() const Wt::WGridLayout
WGridLayout(WWidget *parent=0)Wt::WGridLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout.html new file mode 100644 index 0000000..09ff3e0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout.html @@ -0,0 +1,879 @@ + + + + +Wt: Wt::WGridLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WGridLayout Class Reference

+
+
+ +

A layout manager which arranges widgets in a grid. +More...

+ +

#include <Wt/WGridLayout>

+
+Inheritance diagram for Wt::WGridLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WGridLayout (WWidget *parent=0)
 Create a new grid layout.
virtual void addItem (WLayoutItem *item)
 Adds a layout item.
virtual void removeItem (WLayoutItem *item)
 Removes a layout item (widget or nested layout).
virtual WLayoutItemitemAt (int index) const
 Returns the layout item at a specific index.
virtual int count () const
 Returns the number of items in this layout.
void addItem (WLayoutItem *item, int row, int column, int rowSpan=1, int columnSpan=1, WFlags< AlignmentFlag > alignment=0)
 Adds a layout item to the grid.
void addLayout (WLayout *layout, int row, int column, WFlags< AlignmentFlag > alignment=0)
 Adds a nested layout item to the grid.
void addLayout (WLayout *layout, int row, int column, int rowSpan, int columnSpan, WFlags< AlignmentFlag > alignment=0)
 Adds a nested layout item to the grid.
void addWidget (WWidget *widget, int row, int column, WFlags< AlignmentFlag > alignment=0)
 Adds a widget to the grid.
void addWidget (WWidget *widget, int row, int column, int rowSpan, int columnSpan, WFlags< AlignmentFlag > alignment=0)
 Adds a widget to the grid.
void setHorizontalSpacing (int size)
 Sets the horizontal spacing.
int horizontalSpacing () const
 Returns the horizontal spacing.
void setVerticalSpacing (int size)
 Sets the vertical spacing.
int verticalSpacing () const
 Returns the vertical spacing.
int columnCount () const
 Returns the column count.
int rowCount () const
 Returns the row count.
void setColumnStretch (int column, int stretch)
 Sets the column stretch.
int columnStretch (int column) const
 Returns the column stretch.
void setRowStretch (int row, int stretch)
 Sets the row stretch.
int rowStretch (int row) const
 Returns the column stretch.
void setColumnResizable (int column, bool enabled=true)
 Sets whether the user may drag a particular column border.
bool columnIsResizable (int column) const
 Returns whether the user may drag a particular column border.
void setRowResizable (int row, bool enabled=true)
 Sets whether the user may drag a particular row border.
bool rowIsResizable (int row) const
 Returns whether the user may drag a particular row border.
+

Detailed Description

+

A layout manager which arranges widgets in a grid.

+

This is a layout class that arranges widgets in a grid, to span the entire area of the parent container. Each grid location (row, column) may contain one widget or nested layout. Horizontal and vertical space are divided so that each column/row is given its minimum size and the remaining space is dived according to stretch factors among the columns/rows. The minimum width of a column/row is based on the minimum dimensions of contained widgets or nested layouts. The default minimum height and width may be overridden using WWidget::setMinimumSize().

+

If you want to use the layout manager for a container which does not have a height that is constrained somehow, you need to specify AlignTop in the alignment flags of WContainerWidget::setLayout(). Otherwise the behavior is undefined (the parent container will continue to increase in size as it tries to satisfy the constraints assuming a contrained height).

+

You can use WContainerWidget::setOverflow(OverflowAuto) or use a WScrollArea to automatically show scrollbars on a widget inserted in the layout.

+

A caveat with layout managers is that you cannot reliably use a stylesheet to add borders (or margin) to a widget inserted in a layout: this is broken on Internet Explorer. To provide the layout, the layout manager needs to set sizes on the contained widget but these sizes also need to take into account the border/margin width. Since on IE, this value will be 0 if the border or margin is provided by a stylesheet (as opposed to by inline CSS by using WWidget::decorationStyle()), the result will be wrong behaviour like widgets that keep growing in size.

+

A layout manager may provide resize handles between columns or rows which allow the user to change the automatic layout provided by the layout manager (see setRowResizable() and setColumnResizable()). Resize handles between rows only work when the layout fills the parent vertical space (i.e. is not aligned to the top). Likewise, resize handles between columns only work when the layout fills the parent horiziontal space (i.e. is not aligned left, right or centered).

+

Columns and rows are separated using a constant spacing, which defaults to 6 pixels by default, and can be changed using setHorizontalSpacing() and setVerticalSpacing(). In addition, when this layout is a top-level layout (i.e. is not nested inside another layout), a margin is set around the contents, which thus replaces padding defined for the container. It is not allowed to define padding for the container widget using its CSS 'padding' property or the WContainerWidget::setPadding(). This margin also defaults to 9 pixels, and can be changed using setContentsMargins().

+

For each column or row, a stretch factor may be defined, which controls how remaining horizontal or vertical space is used. Each column and row is stretched using the stretch factor to fill the remaining space. When the stretch factor is 0, the height of the row and its contents is not actively managed. As a consequence, the contents of each cell will not fill the cell. You may use a special stretch factor of -1 to indicate that the height of the row should not stretch but the contents height should be actively managed. This has as draw-back that the height of the row will no longer reduce in size when any of the cell contents reduces in size.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
+ w->resize(WLength::Auto, 600);
+
+ Wt::WGridLayout *layout = new Wt::WGridLayout();
+ layout->addWidget(new Wt::WText("Item 0 0"), 0, 0);
+ layout->addWidget(new Wt::WText("Item 0 1"), 0, 1);
+ layout->addWidget(new Wt::WText("Item 1 0"), 1, 0);
+ layout->addWidget(new Wt::WText("Item 1 1"), 1, 1);
+
+ w->setLayout(layout);
+
Note:
This layout manager is applicable only to WContainerWidget container widgets. You may use it within an Ext::Container indirectly by first setting a WContainerWidget using a WFitLayout.
+
+When JavaScript support is not available, only Safari and Firefox properly implement this layout. For other browsers, only the horizontal layout is properly implemented, while vertically all widgets use their minimum size.
+
+When set on a WContainerWidget, this layout manager accepts the following hints (see setLayoutHint()):
    +
  • +"table-layout" with possible values "auto" (default) or "fixed".
    + Use "fixed" to prevent nested tables from overflowing the layout. In that case, you will need to specify a width (in CSS or otherwise) for at least one item in every column that has no stretch factor.
  • +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WGridLayout::WGridLayout (WWidget parent = 0 )
+
+
+ +

Create a new grid layout.

+

The grid will grow dynamically as items are added.

+

Use parent = 0 to create a layout manager that can be nested inside other layout managers or to specify a specific alignment when setting the layout to a WContainerWidget.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WGridLayout::addItem (WLayoutItem item ) [virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout.

+

How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::addItem (WLayoutItem item,
int  row,
int  column,
int  rowSpan = 1,
int  columnSpan = 1,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a layout item to the grid.

+

Adds the item at (row, column). If an item was already added to that location, it is replaced (but not deleted).

+

An item may span several more rows or columns, which is controlled by rowSpan and columnSpan.

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire grid cell. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addLayout(), addWidget()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::addLayout (WLayout layout,
int  row,
int  column,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a nested layout item to the grid.

+

Adds the layout at (row, column). If an item was already added to that location, it is replaced (but not deleted).

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire grid cell. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addLayout(WLayout *, int, int, int, int, WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::addLayout (WLayout layout,
int  row,
int  column,
int  rowSpan,
int  columnSpan,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a nested layout item to the grid.

+

Adds the layout at (row, column). If an item was already added to that location, it is replaced (but not deleted).

+

An item may span several more rows or columns, which is controlled by rowSpan and columnSpan.

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire grid cell. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addLayout(WLayout *, int, int, WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::addWidget (WWidget widget,
int  row,
int  column,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a widget to the grid.

+

Adds the widget at (row, column). If an item was already added to that location, it is replaced (but not deleted).

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire grid cell. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addWidget(WWidget *, int, int, int, int, WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::addWidget (WWidget widget,
int  row,
int  column,
int  rowSpan,
int  columnSpan,
WFlags< AlignmentFlag alignment = 0 
)
+
+
+ +

Adds a widget to the grid.

+

Adds the widget at (row, column). If an item was already added to that location, it is replaced (but not deleted).

+

The widget may span several more rows or columns, which is controlled by rowSpan and columnSpan.

+

The alignment specifies the vertical and horizontal alignment of the item. The default value 0 indicates that the item is stretched to fill the entire grid cell. The alignment can be specified as a logical combination of a horizontal alignment (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or Wt::AlignBottom).

+
See also:
addWidget(WWidget *, int, int, WFlags<AlignmentFlag>)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WGridLayout::columnCount ( ) const
+
+
+ +

Returns the column count.

+

The grid dimensions change dynamically when adding contents to the grid.

+
See also:
rowCount()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WGridLayout::columnIsResizable (int  column ) const
+
+
+ +

Returns whether the user may drag a particular column border.

+

This method returns whether the border that separates column column from the next column may be resized by the user.

+
See also:
setColumnResizable()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WGridLayout::columnStretch (int  column ) const
+
+
+ +

Returns the column stretch.

+
See also:
setColumnStretch(int, int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WGridLayout::count ( ) const [virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WGridLayout::horizontalSpacing ( ) const
+
+
+ +

Returns the horizontal spacing.

+
See also:
setHorizontalSpacing(int)
+ +
+
+ +
+
+ + + + + + + + +
WLayoutItem * Wt::WGridLayout::itemAt (int  index ) const [virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WGridLayout::removeItem (WLayoutItem item ) [virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implements Wt::WLayout.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WGridLayout::rowCount ( ) const
+
+
+ +

Returns the row count.

+

The grid dimensions change dynamically when adding contents to the grid.

+
See also:
columnCount()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WGridLayout::rowIsResizable (int  row ) const
+
+
+ +

Returns whether the user may drag a particular row border.

+

This method returns whether the border that separates row row from the next row may be resized by the user.

+
See also:
setRowResizable()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WGridLayout::rowStretch (int  row ) const
+
+
+ +

Returns the column stretch.

+
See also:
setRowStretch(int, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::setColumnResizable (int  column,
bool  enabled = true 
)
+
+
+ +

Sets whether the user may drag a particular column border.

+

This method sets whether the border that separates column column from the next column may be resized by the user, depending on the value of enabled.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::setColumnStretch (int  column,
int  stretch 
)
+
+
+ +

Sets the column stretch.

+

Sets the stretch factor for column column.

+
See also:
columnStretch()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WGridLayout::setHorizontalSpacing (int  size )
+
+
+ +

Sets the horizontal spacing.

+

The default horizontal spacing is 9 pixels.

+
See also:
setVerticalSpacing(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::setRowResizable (int  row,
bool  enabled = true 
)
+
+
+ +

Sets whether the user may drag a particular row border.

+

This method sets whether the border that separates row row from the next row may be resized by the user, depending on the value of enabled.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WGridLayout::setRowStretch (int  row,
int  stretch 
)
+
+
+ +

Sets the row stretch.

+

Sets the stretch factor for row row. See the description for the special value of -1.

+
See also:
rowStretch()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WGridLayout::setVerticalSpacing (int  size )
+
+
+ +

Sets the vertical spacing.

+

The default vertical spacing is 9 pixels.

+
See also:
setHorizontalSpacing(int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WGridLayout::verticalSpacing ( ) const
+
+
+ +

Returns the vertical spacing.

+
See also:
setVerticalSpacing(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.map new file mode 100644 index 0000000..e293acd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.md5 new file mode 100644 index 0000000..315d4e4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.md5 @@ -0,0 +1 @@ +1ed048117b44eede4a39f3d2567440db \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.png new file mode 100644 index 0000000..e8672f6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WGridLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox-members.html new file mode 100644 index 0000000..bd4fc71 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox-members.html @@ -0,0 +1,234 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WGroupBox Member List

+
+
+This is the complete list of members for Wt::WGroupBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WContainerWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WContainerWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WGroupBox [protected, virtual]
refresh()Wt::WGroupBox [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTitle(const WString &title)Wt::WGroupBox
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
title() const Wt::WGroupBox
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
WGroupBox(WContainerWidget *parent=0)Wt::WGroupBox
WGroupBox(const WString &title, WContainerWidget *parent=0)Wt::WGroupBox
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox.html new file mode 100644 index 0000000..d3c31e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox.html @@ -0,0 +1,200 @@ + + + + +Wt: Wt::WGroupBox Class Reference + + + + + + + + + +
+ +
+

Wt::WGroupBox Class Reference

+
+
+ +

A widget which group widgets into a frame with a title. +More...

+ +

#include <Wt/WGroupBox>

+
+Inheritance diagram for Wt::WGroupBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + +

+Public Member Functions

WGroupBox (WContainerWidget *parent=0)
 Creates a groupbox with empty title.
WGroupBox (const WString &title, WContainerWidget *parent=0)
 Creates a groupbox with given title message.
+const WStringtitle () const
 Returns the title.
+void setTitle (const WString &title)
 Returns the title.
virtual void refresh ()
 Refresh the widget.

+Protected Member Functions

virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.
+

Detailed Description

+

A widget which group widgets into a frame with a title.

+

This is typically used in a form to group certain form elements together.

+

Usage example:

+
 enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
+
+ // use a group box as widget container for 3 radio buttons, with a title
+ Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
+
+ // use a button group to logically group the 3 options
+ Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
+
+ Wt::WRadioButton *button;
+ button = new Wt::WRadioButton("I voted Republican", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Republican);
+
+ button = new Wt::WRadioButton("I voted Democrat", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Democrate);
+
+ button = new Wt::WRadioButton("I didn't vote", container);
+ new Wt::WBreak(container);
+ group->addButton(button, NoVote);
+
+ group->setCheckedButton(group->button(NoVote));
+

Like WContainerWidget, WGroupBox is by default displayed as a block.

+
+WGroupBox-1.png +

WGroupBox example

+

CSS

+

The widget corresponds to the HTML <fieldset> tag, and the title in a nested <legend> tag. This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WGroupBox::propagateSetEnabled (bool  enabled ) [protected, virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Reimplemented from Wt::WInteractWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WGroupBox::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.map new file mode 100644 index 0000000..1ed709b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.md5 new file mode 100644 index 0000000..403267e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.md5 @@ -0,0 +1 @@ +b788834662162e2ab30f7401001b994d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.png new file mode 100644 index 0000000..8a5320f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WGroupBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout-members.html new file mode 100644 index 0000000..3c1a99e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout-members.html @@ -0,0 +1,140 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WHBoxLayout Member List

+
+
+This is the complete list of members for Wt::WHBoxLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
addLayout(WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
addSpacing(const WLength &size)Wt::WBoxLayout
addStretch(int stretch=0)Wt::WBoxLayout
addWidget(WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
Wt::WLayout::addWidget(WWidget *widget)Wt::WLayout
BottomToTop enum valueWt::WBoxLayout
children() const Wt::WObject
count() const Wt::WBoxLayout [virtual]
Direction enum nameWt::WBoxLayout
direction() const Wt::WBoxLayout
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
insertLayout(int index, WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
insertSpacing(int index, const WLength &size)Wt::WBoxLayout
insertStretch(int index, int stretch=0)Wt::WBoxLayout
insertWidget(int index, WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
isResizable(int index) const Wt::WBoxLayout
itemAt(int index) const Wt::WBoxLayout [virtual]
layout()Wt::WLayout [virtual]
LeftToRight enum valueWt::WBoxLayout
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
RightToLeft enum valueWt::WBoxLayout
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setDirection(Direction direction)Wt::WBoxLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setResizable(int index, bool enabled=true)Wt::WBoxLayout
setSpacing(int size)Wt::WBoxLayout
setStretchFactor(WLayout *layout, int stretch)Wt::WBoxLayout
setStretchFactor(WWidget *widget, int stretch)Wt::WBoxLayout
spacing() const Wt::WBoxLayout
TopToBottom enum valueWt::WBoxLayout
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WBoxLayout(Direction dir, WWidget *parent=0)Wt::WBoxLayout
WHBoxLayout(WWidget *parent=0)Wt::WHBoxLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout.html new file mode 100644 index 0000000..3b17566 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout.html @@ -0,0 +1,142 @@ + + + + +Wt: Wt::WHBoxLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WHBoxLayout Class Reference

+
+
+ +

A layout manager which arranges widgets horizontally. +More...

+ +

#include <Wt/WHBoxLayout>

+
+Inheritance diagram for Wt::WHBoxLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

 WHBoxLayout (WWidget *parent=0)
 Creates a new horizontal box layout.
+

Detailed Description

+

A layout manager which arranges widgets horizontally.

+

This convenience class creates a horizontal box layout, laying contained widgets out from left to right.

+

See the WBoxLayout documentation for available member methods and more information.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
+
+ Wt::WHBoxLayout *layout = new Wt::WHBoxLayout();
+ layout->addWidget(new Wt::WText("One"));
+ layout->addWidget(new Wt::WText("Two"));
+ layout->addWidget(new Wt::WText("Three"));
+ layout->addWidget(new Wt::WText("Four"));
+
+ w->setLayout(layout, AlignTop | AlignJustify);
+
Note:
First consider if you can achieve your layout using CSS !
+
See also:
WVBoxLayout
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WHBoxLayout::WHBoxLayout (WWidget parent = 0 )
+
+
+ +

Creates a new horizontal box layout.

+

Use parent = 0 to create a layout manager that can be nested inside other layout managers, or to specify a specific alignment when setting the layout to a WContainerWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.map new file mode 100644 index 0000000..b8e7717 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.md5 new file mode 100644 index 0000000..1e928a8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.md5 @@ -0,0 +1 @@ +d93eaccb8448c724e42a01f6681b01d9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.png new file mode 100644 index 0000000..2c419af Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WHBoxLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio-members.html new file mode 100644 index 0000000..4897563 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio-members.html @@ -0,0 +1,230 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WHTML5Audio Member List

+
+
+This is the complete list of members for Wt::WHTML5Audio, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addSource(const std::string &url, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addSource(WResource *resource, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Autoplay enum valueWt::WHTML5Media
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clearSources()Wt::WHTML5Media
clicked()Wt::WInteractWidget
Controls enum valueWt::WHTML5Media
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
ended()Wt::WHTML5Media
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getOptions() const Wt::WHTML5Media
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsAudioRef() const Wt::WHTML5Audio
jsMediaRef() const Wt::WHTML5Media
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
Loop enum valueWt::WHTML5Media
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Options enum nameWt::WHTML5Media
parent() const Wt::WWidget
pause()Wt::WHTML5Media
play()Wt::WHTML5Media
playbackPaused()Wt::WHTML5Media
playbackStarted()Wt::WHTML5Media
playing() const Wt::WHTML5Media
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
PreloadAuto enum valueWt::WHTML5Media
PreloadMetadata enum valueWt::WHTML5Media
PreloadMode enum nameWt::WHTML5Media
preloadMode() const Wt::WHTML5Media
PreloadNone enum valueWt::WHTML5Media
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAlternativeContent(WWidget *alternative)Wt::WHTML5Media
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOptions(const WFlags< Options > &flags)Wt::WHTML5Media
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreloadMode(PreloadMode mode)Wt::WHTML5Media
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
timeUpdated()Wt::WHTML5Media
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
volumeChanged()Wt::WHTML5Media
WHTML5Audio(WContainerWidget *parent=0)Wt::WHTML5Audio
WHTML5Media(WContainerWidget *parent=0)Wt::WHTML5Media
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio.html new file mode 100644 index 0000000..d60f7f0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio.html @@ -0,0 +1,170 @@ + + + + +Wt: Wt::WHTML5Audio Class Reference + + + + + + + + + +
+ +
+

Wt::WHTML5Audio Class Reference

+
+
+ +

A widget that plays audio using the HTML5 audio element. +More...

+ +

#include <Wt/WHTML5Audio>

+
+Inheritance diagram for Wt::WHTML5Audio:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + +

+Public Member Functions

 WHTML5Audio (WContainerWidget *parent=0)
 Creates a HTML5 audio widget.
std::string jsAudioRef () const
 Returns the JavaScript reference to the audio object, or null.
+

Detailed Description

+

A widget that plays audio using the HTML5 audio element.

+

This class plays HTML5 audio. In a typical usage scenario, you instantiate the class, set options, and add one or multiple audio sources. The browser will play the first audio stream that it is capable to play back.

+

Since not every browser supports HTML5 audio, the class provides a mechanism to display alternative content in browsers that cannot play the audio. A Flash based player, configured to play the same audio file, is an example of sensible alternative content.

+

Usage example:

+
 WHTML5Audio *a = new WHTML5Audio(parent);
+ v->setOptions(WHTML5Media::Autoplay | WHTML5Media::Controls);
+ // Addsources may be called multiple times for different formats:
+ // Firefox only plays ogg
+ a->addSource("the_wt_song.ogg");
+ // many others play mp3
+ a->addSource("the_wt_song.mp3", "audio/mp3");
+ // You may display a simple text to explain that you need html5 support...
+ // a->setAlternativeContent(new WText("You have no HTML5 Audio!"));
+ // ... or provide an alternative player, e.g. Flash-based
+ WFlashObject *f = new WFlashObject("player.swf");
+ f->setFlashVariable("src", "the_wt_song.mp3");
+ v->setAlternativeContent(f);
+

There are two reasons why the a browser may use the alternative content: either because the browser does not support the HTML5 audio tag (alternative content is displayed even when JavaScript is not available), or because none of the specified sources contain an audio format that is understood by the browser (requires JavaScript to display the alternative content).

+

addSource() and setAlternativeContent() must not be called after the WHTML5Audio was rendered. This can easily be avoided by calling these functions right after construction.

+

This is a technology-specific class. To let Wt choose a technology (and fallback technologies) to display your videos, use the WSound class.

+
See also:
WHTML5Media, WSound
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
WHTML5Audio::WHTML5Audio (WContainerWidget parent = 0 )
+
+
+ +

Creates a HTML5 audio widget.

+

A freshly constructed HTML5Audio widget has no media sources, no options, and has preload mode set to PreloadAuto.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string WHTML5Audio::jsAudioRef ( ) const
+
+
+ +

Returns the JavaScript reference to the audio object, or null.

+

It is possible, for browser compatibility reasons, that jsRef() is not the HTML5 audio element. jsAudioRef() is guaranteed to be an expression that evaluates to the media object. This expression may yield null, if the video object is not rendered at all (e.g. on older versions of Internet Explorer).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.map new file mode 100644 index 0000000..6b0aad0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.md5 new file mode 100644 index 0000000..e8bcf70 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.md5 @@ -0,0 +1 @@ +0ed748f99988efe31c44d7624ff89b82 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.png new file mode 100644 index 0000000..6fe5c16 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Audio__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media-members.html new file mode 100644 index 0000000..657de8b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media-members.html @@ -0,0 +1,228 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WHTML5Media Member List

+
+
+This is the complete list of members for Wt::WHTML5Media, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addSource(const std::string &url, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addSource(WResource *resource, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Autoplay enum valueWt::WHTML5Media
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clearSources()Wt::WHTML5Media
clicked()Wt::WInteractWidget
Controls enum valueWt::WHTML5Media
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
ended()Wt::WHTML5Media
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getOptions() const Wt::WHTML5Media
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsMediaRef() const Wt::WHTML5Media
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
Loop enum valueWt::WHTML5Media
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Options enum nameWt::WHTML5Media
parent() const Wt::WWidget
pause()Wt::WHTML5Media
play()Wt::WHTML5Media
playbackPaused()Wt::WHTML5Media
playbackStarted()Wt::WHTML5Media
playing() const Wt::WHTML5Media
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
PreloadAuto enum valueWt::WHTML5Media
PreloadMetadata enum valueWt::WHTML5Media
PreloadMode enum nameWt::WHTML5Media
preloadMode() const Wt::WHTML5Media
PreloadNone enum valueWt::WHTML5Media
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAlternativeContent(WWidget *alternative)Wt::WHTML5Media
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOptions(const WFlags< Options > &flags)Wt::WHTML5Media
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreloadMode(PreloadMode mode)Wt::WHTML5Media
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
timeUpdated()Wt::WHTML5Media
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
volumeChanged()Wt::WHTML5Media
WHTML5Media(WContainerWidget *parent=0)Wt::WHTML5Media
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media.html new file mode 100644 index 0000000..04b0756 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media.html @@ -0,0 +1,530 @@ + + + + +Wt: Wt::WHTML5Media Class Reference + + + + + + + + + +
+ +
+

Wt::WHTML5Media Class Reference

+
+
+ +

Abstract baseclass for HTML5 media elements. +More...

+ +

#include <Wt/WHTML5Media>

+
+Inheritance diagram for Wt::WHTML5Media:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Options { Autoplay = 1, +Loop = 2, +Controls = 4 + }
 

Enumeration for playback options.

+ More...
enum  PreloadMode { PreloadNone, +PreloadAuto, +PreloadMetadata + }
 

Enumeration for preload strategy.

+ More...

+Public Member Functions

 WHTML5Media (WContainerWidget *parent=0)
 Consctructor for a HTML5 media widget.
void setOptions (const WFlags< Options > &flags)
 Set the media element options.
+WFlags< OptionsgetOptions () const
 Retrieve the configured options.
+void setPreloadMode (PreloadMode mode)
 Set the preload mode.
+PreloadMode preloadMode () const
 Retrieve the preload mode.
void clearSources ()
 Removes all source elements.
void addSource (const std::string &url, const std::string &type="", const std::string &media="")
 Add a media source.
void addSource (WResource *resource, const std::string &type="", const std::string &media="")
 Add a media source.
void setAlternativeContent (WWidget *alternative)
 Content to be shown when media cannot be played.
void play ()
 Invoke play() on the media element.
void pause ()
 Invoke pause() on the media element.
+bool playing () const
 Returns whether the media is playing.
EventSignalplaybackStarted ()
 Event signal emitted when playback has begun.
EventSignalplaybackPaused ()
 Event signal emitted when the playback has paused.
EventSignalended ()
 Event signal emitted when the playback stopped because the end of the media was reached.
EventSignaltimeUpdated ()
 Event signal emitted when the current playback position has changed.
EventSignalvolumeChanged ()
 Event signal emitted when the playback volume has changed.
std::string jsMediaRef () const
 Returns the JavaScript reference to the media object, or null.
+

Detailed Description

+

Abstract baseclass for HTML5 media elements.

+

This class is an abstract base class for HTML5 media elements (audio, video).

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WHTML5Media::Options
+
+
+ +

Enumeration for playback options.

+
Enumerator:
+ + + +
Autoplay  +

Start playing as soon as the video is loaded.

+
Loop  +

Enable loop mode.

+
Controls  +

Show video controls in the browser.

+
+
+
+ +
+
+ +
+ +
+ +

Enumeration for preload strategy.

+
Enumerator:
+ + + +
PreloadNone  +

Hints that the user will probably not play the video.

+
PreloadAuto  +

Hints that it is ok to download the entire resource.

+
PreloadMetadata  +

Hints that retrieving metadata is a good option.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
WHTML5Media::WHTML5Media (WContainerWidget parent = 0 )
+
+
+ +

Consctructor for a HTML5 media widget.

+

A freshly constructed HTML5Video widget has no options set, no media sources, and has preload mode set to PreloadAuto.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WHTML5Media::addSource (const std::string &  url,
const std::string &  type = "",
const std::string &  media = "" 
)
+
+
+ +

Add a media source.

+

This method specifies a media source. You may add as many media sources as you want. The browser will select the appropriate media stream to display to the user.

+

This method specifies a media source using the URL, the mime type, and the media attribute. HTML allows for empty type and media attributes.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void WHTML5Media::addSource (WResource resource,
const std::string &  type = "",
const std::string &  media = "" 
)
+
+
+ +

Add a media source.

+

This method specifies a media source. You may add as many media sources as you want. The browser will select the appropriate media stream to display to the user.

+

This method specifies a media source using the URL, the mime type, and the media attribute. HTML allows for empty type and media attributes.

+ +
+
+ +
+
+ + + + + + + +
void WHTML5Media::clearSources ( )
+
+
+ +

Removes all source elements.

+

This method can be used to remove all media sources. Afterward, you may add new media sources with calls to addSource().

+

Use this to reuse a WHTML5Media instantiation to play something else.

+ +
+
+ +
+
+ + + + + + + +
EventSignal & WHTML5Media::ended ( )
+
+
+ +

Event signal emitted when the playback stopped because the end of the media was reached.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
std::string WHTML5Media::jsMediaRef ( ) const
+
+
+ +

Returns the JavaScript reference to the media object, or null.

+

It is possible, for browser compatibility reasons, that jsRef() is not the HTML5 media element. jsMediaRef() is guaranteed to be an expression that evaluates to the media object. This expression may yield null, if the video object is not rendered at all (e.g. on older versions of Internet Explorer).

+ +
+
+ +
+
+ + + + + + + +
void WHTML5Media::pause ( )
+
+
+ +

Invoke pause() on the media element.

+

JavaScript must be available for this function to work.

+ +
+
+ +
+
+ + + + + + + +
void WHTML5Media::play ( )
+
+
+ +

Invoke play() on the media element.

+

JavaScript must be available for this function to work.

+ +
+
+ +
+
+ + + + + + + +
EventSignal & WHTML5Media::playbackPaused ( )
+
+
+ +

Event signal emitted when the playback has paused.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal & WHTML5Media::playbackStarted ( )
+
+
+ +

Event signal emitted when playback has begun.

+

This event fires when play was invoked, or when the media element starts playing because the Autoplay option was provided.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + + +
void WHTML5Media::setAlternativeContent (WWidget alternative )
+
+
+ +

Content to be shown when media cannot be played.

+

As the HTML5 media tags are not supported by all browsers, it is a good idea to provide fallback options when the media cannot be displayed. If the media can be played by the browser, the alternative content will be suppressed.

+

The two reasons to display the alternative content are (1) the media tag is not supported, or (2) the media tag is supported, but none of the media sources are supported by the browser. In the first case, fall-back is automatic and does not rely on JavaScript in the browser; in the latter case, JavaScript is required to make the fallback work.

+

The alternative content can be any widget: you can set it to an alternative media player (QuickTime, Flash, ...), show a Flash movie, an animated gif, a text, a poster image, ...

+ +
+
+ +
+
+ + + + + + + + +
void WHTML5Media::setOptions (const WFlags< Options > &  flags )
+
+
+ +

Set the media element options.

+
See also:
Options
+ +
+
+ +
+
+ + + + + + + +
EventSignal & WHTML5Media::timeUpdated ( )
+
+
+ +

Event signal emitted when the current playback position has changed.

+

This event is fired when the playback position has changed, both when the media is in a normal playing mode, but also when it has changed discontinuously because of another reason.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal & WHTML5Media::volumeChanged ( )
+
+
+ +

Event signal emitted when the playback volume has changed.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.map new file mode 100644 index 0000000..c5f6447 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.md5 new file mode 100644 index 0000000..d0f4d05 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.md5 @@ -0,0 +1 @@ +6fada99d66ac7539bc1e2f64cce7e5fc \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.png new file mode 100644 index 0000000..be184a3 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Media__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video-members.html new file mode 100644 index 0000000..4dd8219 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video-members.html @@ -0,0 +1,231 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WHTML5Video Member List

+
+
+This is the complete list of members for Wt::WHTML5Video, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addSource(const std::string &url, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addSource(WResource *resource, const std::string &type="", const std::string &media="")Wt::WHTML5Media
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
Autoplay enum valueWt::WHTML5Media
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clearSources()Wt::WHTML5Media
clicked()Wt::WInteractWidget
Controls enum valueWt::WHTML5Media
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
ended()Wt::WHTML5Media
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getOptions() const Wt::WHTML5Media
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsMediaRef() const Wt::WHTML5Media
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
jsVideoRef() const Wt::WHTML5Video
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
Loop enum valueWt::WHTML5Media
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Options enum nameWt::WHTML5Media
parent() const Wt::WWidget
pause()Wt::WHTML5Media
play()Wt::WHTML5Media
playbackPaused()Wt::WHTML5Media
playbackStarted()Wt::WHTML5Media
playing() const Wt::WHTML5Media
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
PreloadAuto enum valueWt::WHTML5Media
PreloadMetadata enum valueWt::WHTML5Media
PreloadMode enum nameWt::WHTML5Media
preloadMode() const Wt::WHTML5Media
PreloadNone enum valueWt::WHTML5Media
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WHTML5Video [virtual]
sender()Wt::WObject [protected, static]
setAlternativeContent(WWidget *alternative)Wt::WHTML5Media
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOptions(const WFlags< Options > &flags)Wt::WHTML5Media
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPoster(const std::string &url)Wt::WHTML5Video
setPreloadMode(PreloadMode mode)Wt::WHTML5Media
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
timeUpdated()Wt::WHTML5Media
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
volumeChanged()Wt::WHTML5Media
WHTML5Media(WContainerWidget *parent=0)Wt::WHTML5Media
WHTML5Video(WContainerWidget *parent=0)Wt::WHTML5Video
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video.html new file mode 100644 index 0000000..58eeb53 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video.html @@ -0,0 +1,232 @@ + + + + +Wt: Wt::WHTML5Video Class Reference + + + + + + + + + +
+ +
+

Wt::WHTML5Video Class Reference

+
+
+ +

A widget that renders video using the HTML5 video element. +More...

+ +

#include <Wt/WHTML5Video>

+
+Inheritance diagram for Wt::WHTML5Video:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

 WHTML5Video (WContainerWidget *parent=0)
 Creates a HTML5 video widget.
void setPoster (const std::string &url)
 Set the poster image.
std::string jsVideoRef () const
 Returns the JavaScript reference to the video object, or null.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
+

Detailed Description

+

A widget that renders video using the HTML5 video element.

+

This class renders HTML5 video. In a typical usage scenario, you instantiate the class, set options, add one or multiple video sources. Since not every browser supports HTML5 video, the class provides a mechanism to display alternative content in browsers that cannot play the video.

+

Usage example:

+
 WHTML5Video *v = new WHTML5Video(parent);
+ v->setOptions(WHTML5Video::Autoplay | WHTML5Video::Controls);
+ // Addsources may be called multiple times for different formats:
+ // Firefox only plays ogg
+ v->addSource("wt.ogv");
+ // many others play mp4
+ v->addSource("wt.mp4", "video/mp4");
+ // Image to be displayed before playback starts
+ v->setPoster("wt.jpg");
+ // You may display a simple text to explain that you need html5 support...
+ // v->setAlternativeContent(new WText("You have no HTML5 Video!"));
+ // ... or provide an alternative player, e.g. Flash-based
+ WFlashObject *f = new WFlashObject("player.swf", root());
+ f->setFlashVariable("startimage", "wt.jpg");
+ f->setFlashVariable("flv", "wt.mp4");
+ f->resize(640, 384);
+ v->setAlternativeContent(f);
+

There are two reasons why the a browser may use the alternative content: either because the browser does not support the HTML5 video tag (alternative content is displayed even when JavaScript is not available), or because none of the specified sources contain a video format that is understood by the browser (requires JavaScript to display the alternative content).

+

addSource() and setAlternativeContent() must not be called after the WHTML5Video was rendered. This can easily be avoided by calling these functions right after construction.

+

This is a technology-specific class. To let Wt choose a technology (and fallback technologies) to display your videos, use the WVideo class.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
WHTML5Video::WHTML5Video (WContainerWidget parent = 0 )
+
+
+ +

Creates a HTML5 video widget.

+

The constructor sets the 'controls' option, which causes the browser to display a bar with play/pauze/volume/... controls.

+

A freshly constructed HTML5Video widget has no poster image, no media sources, has preload mode set to PreloadAuto, and only the Controls flag is set.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string WHTML5Video::jsVideoRef ( ) const
+
+
+ +

Returns the JavaScript reference to the video object, or null.

+

It is possible, for compatibility reasons, that jsRef() is not the HTML5 video element. jsVideoRef() is guaranteed to be an expression that evaluates to the video object. This expression may yield null, if the video object is not rendered at all (e.g. on older versions of Internet Explorer).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WHTML5Video::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WHTML5Video::setPoster (const std::string &  url )
+
+
+ +

Set the poster image.

+

On browsers that support it, the poster image is displayed before the video is playing. Some browsers display the first frame of the video stream once the video stream is loaded; it is therefore a good idea to include the poster image as first frame in the video feed too.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.map new file mode 100644 index 0000000..6b0aad0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.md5 new file mode 100644 index 0000000..8712504 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.md5 @@ -0,0 +1 @@ +e20a7cbea18adfec4ffb1f2b8cd1ab1a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.png new file mode 100644 index 0000000..3364920 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WHTML5Video__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair-members.html new file mode 100644 index 0000000..da1abf2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair-members.html @@ -0,0 +1,186 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WIconPair Member List

+
+
+This is the complete list of members for Wt::WIconPair, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon1() const Wt::WIconPair
icon1Clicked()Wt::WIconPair
icon2() const Wt::WIconPair
icon2Clicked()Wt::WIconPair
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setState(int num)Wt::WIconPair
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
showIcon1()Wt::WIconPair
showIcon2()Wt::WIconPair
state() const Wt::WIconPair
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
WIconPair(const std::string &icon1URL, const std::string &icon2URL, bool clickIsSwitch=true, WContainerWidget *parent=0)Wt::WIconPair
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair.html new file mode 100644 index 0000000..a88dce1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair.html @@ -0,0 +1,292 @@ + + + + +Wt: Wt::WIconPair Class Reference + + + + + + + + + +
+ +
+

Wt::WIconPair Class Reference

+
+
+ +

A widget that shows one of two icons depending on its state. +More...

+ +

#include <Wt/WIconPair>

+
+Inheritance diagram for Wt::WIconPair:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WIconPair (const std::string &icon1URL, const std::string &icon2URL, bool clickIsSwitch=true, WContainerWidget *parent=0)
 Construct an icon pair from the two icons.
void setState (int num)
 Sets the state, which determines the visible icon.
int state () const
 Returns the current state.
+WImageicon1 () const
 Returns the first icon image.
+WImageicon2 () const
 Returns the second icon image.
void showIcon1 ()
 Sets the state to 0 (show icon 1).
void showIcon2 ()
 Sets the state to 1 (show icon 2).
EventSignal< WMouseEvent > & icon1Clicked ()
 Signal emitted when clicked while in state 0 (icon 1 is shown).
EventSignal< WMouseEvent > & icon2Clicked ()
 Signal emitted when clicked while in state 1 (icon 2 is shown).
+

Detailed Description

+

A widget that shows one of two icons depending on its state.

+

This is a utility class that simply manages two images, only one of which is shown at a single time, which reflects the current 'state'.

+

The widget may react to click events, by changing state.

+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate. The image may be styled via the <img> elements.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WIconPair::WIconPair (const std::string &  icon1URL,
const std::string &  icon2URL,
bool  clickIsSwitch = true,
WContainerWidget parent = 0 
)
+
+
+ +

Construct an icon pair from the two icons.

+

The constructor takes the URL of the two icons. When clickIsSwitch is set true, clicking on the icon will switch state.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WIconPair::icon1Clicked ( )
+
+
+ +

Signal emitted when clicked while in state 0 (icon 1 is shown).

+

Equivalent to:

+
 icon1()->clicked()
+
+
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WIconPair::icon2Clicked ( )
+
+
+ +

Signal emitted when clicked while in state 1 (icon 2 is shown).

+

Equivalent to:

+
 icon2()->clicked()
+
+
+
+ +
+
+ + + + + + + + +
void Wt::WIconPair::setState (int  num )
+
+
+ +

Sets the state, which determines the visible icon.

+

The first icon has number 0, and the second icon has number 1.

+

The default state is 0.

+
See also:
state()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WIconPair::showIcon1 ( )
+
+
+ +

Sets the state to 0 (show icon 1).

+
See also:
setState(int)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WIconPair::showIcon2 ( )
+
+
+ +

Sets the state to 1 (show icon 2).

+
See also:
setState(int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WIconPair::state ( ) const
+
+
+ +

Returns the current state.

+
See also:
setState()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.md5 new file mode 100644 index 0000000..1739dbf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.md5 @@ -0,0 +1 @@ +2e93196a3beb142cead912f60764f493 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.png new file mode 100644 index 0000000..cbaeb11 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WIconPair__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage-members.html new file mode 100644 index 0000000..b75d28a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage-members.html @@ -0,0 +1,218 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WImage Member List

+
+
+This is the complete list of members for Wt::WImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
addArea(WAbstractArea *area)Wt::WImage
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
alternateText() const Wt::WImage
area(int index) const Wt::WImage
areas() const Wt::WImage
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
imageLoaded()Wt::WImage
imageRef() const Wt::WImage
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertArea(int index, WAbstractArea *area)Wt::WImage
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeArea(WAbstractArea *area)Wt::WImage
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
resource() const Wt::WImage
sender()Wt::WObject [protected, static]
setAlternateText(const WString &text)Wt::WImage
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setImageRef(const std::string &url)Wt::WImage
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setResource(WResource *resource)Wt::WImage
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WImage(WContainerWidget *parent=0)Wt::WImage
WImage(const std::string &imageRef, WContainerWidget *parent=0)Wt::WImage
WImage(const std::string &imageRef, const WString &altText, WContainerWidget *parent=0)Wt::WImage
WImage(WResource *resource, const WString &altText, WContainerWidget *parent=0)Wt::WImage
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage.html new file mode 100644 index 0000000..c6894fb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage.html @@ -0,0 +1,428 @@ + + + + +Wt: Wt::WImage Class Reference + + + + + + + + + +
+ +
+

Wt::WImage Class Reference

+
+
+ +

A widget that displays an image. +More...

+ +

#include <Wt/WImage>

+
+Inheritance diagram for Wt::WImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WImage (WContainerWidget *parent=0)
 Creates an empty image widget.
WImage (const std::string &imageRef, WContainerWidget *parent=0)
 Creates an image widget with given image URL.
WImage (const std::string &imageRef, const WString &altText, WContainerWidget *parent=0)
 Creates an image widget with given image URL and alternate text.
 WImage (WResource *resource, const WString &altText, WContainerWidget *parent=0)
 Creates an image widget with given image resource and alternate text.
void setAlternateText (const WString &text)
 Sets an alternate text.
const WStringalternateText () const
 Returns the alternate text.
void setImageRef (const std::string &url)
 Sets the image URL.
const std::string imageRef () const
 Returns the image URL.
void setResource (WResource *resource)
 Sets the image resource.
WResourceresource () const
 Returns the image resource.
void addArea (WAbstractArea *area)
 Adds an interactive area.
void insertArea (int index, WAbstractArea *area)
 Inserts an interactive area.
void removeArea (WAbstractArea *area)
 Removes an interactive area.
WAbstractAreaarea (int index) const
 Returns the interactive area at the given index.
const std::vector
+< WAbstractArea * > 
areas () const
 Returns the interactive areas set for this widget.
+EventSignalimageLoaded ()
 Event emitted when the image was loaded.
+

Detailed Description

+

A widget that displays an image.

+

The image may be specified either as a URL, or may be dynamically generated by a WResource.

+

You may listen to events by attaching event listeners to signals such as clicked(). Since mouse events pass the coordinates through a WMouseEvent object, it is possible to react to clicks in specific parts of the image. An alternative is to define interactive areas on the image using addArea(), which in addition allows to have customized tool tips for certain image areas (using WAbstractArea::setToolTip()).

+

Usage example:

+
 Wt::WImage *img = new Wt::WImage("images/johnny_cash.png", this);
+ img->setAlternateText("Johnny Cash sings a song");
+

WImage is an inline widget.

+

CSS

+

The widget corresponds to the HTML <img> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+
See also:
WResource, WPaintedWidget
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WImage::WImage (WResource resource,
const WString altText,
WContainerWidget parent = 0 
)
+
+
+ +

Creates an image widget with given image resource and alternate text.

+

Use this constructor if you want to present a dynamically generated image.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WImage::addArea (WAbstractArea area )
+
+
+ +

Adds an interactive area.

+

Adds the area which listens to events in a specific region of the image. Areas are organized in an indexed list, to which the given area is appended. When areas overlap, the area with the lowest index receives the event.

+

Ownership of the area is transferred to the image.

+
See also:
insertArea(int, WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WImage::alternateText ( ) const
+
+
+ +

Returns the alternate text.

+
See also:
setAlternateText()
+ +
+
+ +
+
+ + + + + + + + +
WAbstractArea * Wt::WImage::area (int  index ) const
+
+
+ +

Returns the interactive area at the given index.

+

Returns 0 if index was invalid.

+
See also:
insertArea(int, WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + +
const std::vector< WAbstractArea * > Wt::WImage::areas ( ) const
+
+
+ +

Returns the interactive areas set for this widget.

+
See also:
addArea()
+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WImage::imageRef ( ) const
+
+
+ +

Returns the image URL.

+

When the image is specified as a resource, this returns the current resource URL.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WImage::insertArea (int  index,
WAbstractArea area 
)
+
+
+ +

Inserts an interactive area.

+

Inserts the area which listens to events in the coresponding area of the image. Areas are organized in a list, and the area is inserted at index index. When areas overlap, the area with the lowest index receives the event.

+

Ownership of the area is transferred to the image.

+
See also:
addArea(WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WImage::removeArea (WAbstractArea area )
+
+
+ +

Removes an interactive area.

+

Removes the area from this widget, and also returns the ownership.

+
See also:
addArea(WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + +
WResource* Wt::WImage::resource ( ) const
+
+
+ +

Returns the image resource.

+

Returns 0 if no image resource was set.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WImage::setAlternateText (const WString text )
+
+
+ +

Sets an alternate text.

+

The alternate text should provide a fallback for browsers that do not display an image. If no sensible fallback text can be provided, an empty text is preferred over nonsense.

+

This should not be confused with toolTip() text, which provides additional information that is displayed when the mouse hovers over the image.

+

The default alternate text is an empty text ("").

+
See also:
alternateText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WImage::setImageRef (const std::string &  url )
+
+
+ +

Sets the image URL.

+

This should not be used when the image is specified as a resource.

+
See also:
setResource()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WImage::setResource (WResource resource )
+
+
+ +

Sets the image resource.

+

A resource specifies application-dependent content, which may be used to generate an image on demand.

+

This sets resource as the contents for the image, as an alternative to setImageRef(). The resource may be cleared by passing resource = 0.

+

The image does not assume ownership of the resource.

+
See also:
setImageRef()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.md5 new file mode 100644 index 0000000..08aa1ca --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.md5 @@ -0,0 +1 @@ +ea2ed35e5df55b9271bdabba5f384abd \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.png new file mode 100644 index 0000000..f968663 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit-members.html new file mode 100644 index 0000000..5748fa0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit-members.html @@ -0,0 +1,187 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WInPlaceEdit Member List

+
+
+This is the complete list of members for Wt::WInPlaceEdit, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
cancelButton() const Wt::WInPlaceEdit
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WInPlaceEdit
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineEdit() const Wt::WInPlaceEdit
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
saveButton() const Wt::WInPlaceEdit
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setButtonsEnabled(bool enabled=true)Wt::WInPlaceEdit
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setEmptyText(const WString &emptyText)Wt::WInPlaceEdit
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setText(const WString &text)Wt::WInPlaceEdit
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
text() const Wt::WInPlaceEdit
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
valueChanged()Wt::WInPlaceEdit
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WInPlaceEdit(const WString &text, WContainerWidget *parent=0)Wt::WInPlaceEdit
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit.html new file mode 100644 index 0000000..ad5302f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit.html @@ -0,0 +1,325 @@ + + + + +Wt: Wt::WInPlaceEdit Class Reference + + + + + + + + + +
+ +
+

Wt::WInPlaceEdit Class Reference

+
+
+ +

A widget that provides in-place-editable text. +More...

+ +

#include <Wt/WInPlaceEdit>

+
+Inheritance diagram for Wt::WInPlaceEdit:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WInPlaceEdit (const WString &text, WContainerWidget *parent=0)
 Creates an in-place edit with the given text.
const WStringtext () const
 Returns the current value.
void setText (const WString &text)
 Sets the current value.
void setEmptyText (const WString &emptyText)
 Sets the empty text to be shown when the field is empty and not editable.
const WStringemptyText ()
 Returns the empty text to be shown when the field is empty and not editable.
WLineEditlineEdit () const
 Returns the line edit.
WPushButtonsaveButton () const
 Returns the save button.
WPushButtoncancelButton () const
 Returns the cancel button.
Signal< WString > & valueChanged ()
 Signal emitted when the value has been changed.
void setButtonsEnabled (bool enabled=true)
 Displays the Save and 'Cancel' button during editing.
+

Detailed Description

+

A widget that provides in-place-editable text.

+

The WInPlaceEdit provides a text that may be edited in place by the user by clicking on it. When clicked, the text turns into a line edit, with optionally a save and cancel button (see setButtonsEnabled()).

+

When the user saves the edit, the valueChanged() signal is emitted.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget();
+ new Wt::WText("Name: ", w);
+ Wt::WInPlaceEdit *edit = new Wt::WInPlaceEdit("Bob Smith", w);
+ edit->setStyleClass("inplace");
+

This code will produce an edit that looks like:

+
+WInPlaceEdit-1.png +

WInPlaceEdit text mode

+

When the text is clicked, the edit will expand to become:

+
+WInPlaceEdit-2.png +

WInPlaceEdit edit mode

+

CSS

+

A WInPlaceEdit widget renders as a <span> containing a WText, a WLineEdit and optional buttons (WPushButton). All these widgets may be styled as such. It does not provide style information.

+

In particular, you may want to provide a visual indication that the text is editable e.g. using a hover effect:

+

CSS stylesheet:

+
 .inplace span:hover {
+    background-color: gray;
+ }
+

Member Function Documentation

+ +
+
+ + + + + + + +
WPushButton* Wt::WInPlaceEdit::cancelButton ( ) const
+
+
+ +

Returns the cancel button.

+

This method returns 0 if the buttons were disabled.

+
See also:
saveButton(), setButtonsEnabled()
+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WInPlaceEdit::emptyText ( )
+
+
+ +

Returns the empty text to be shown when the field is empty and not editable.

+
See also:
setEmptyText()
+ +
+
+ +
+
+ + + + + + + +
WLineEdit* Wt::WInPlaceEdit::lineEdit ( ) const
+
+
+ +

Returns the line edit.

+

You may use this for example to set a validator on the line edit.

+ +
+
+ +
+
+ + + + + + + +
WPushButton* Wt::WInPlaceEdit::saveButton ( ) const
+
+
+ +

Returns the save button.

+

This method returns 0 if the buttons were disabled.

+
See also:
cancelButton(), setButtonsEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WInPlaceEdit::setButtonsEnabled (bool  enabled = true )
+
+
+ +

Displays the Save and 'Cancel' button during editing.

+

By default, the Save and Cancel buttons are shown. Call this function with enabled = false to only show a line edit. In this mode, the enter key has the effect of the save button and the escape key has the effect of the cancel button.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WInPlaceEdit::setEmptyText (const WString emptyText )
+
+
+ +

Sets the empty text to be shown when the field is empty and not editable.

+
See also:
emptyText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WInPlaceEdit::setText (const WString text )
+
+
+ +

Sets the current value.

+
See also:
text()
+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WInPlaceEdit::text ( ) const
+
+
+ +

Returns the current value.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + +
Signal<WString>& Wt::WInPlaceEdit::valueChanged ( )
+
+
+ +

Signal emitted when the value has been changed.

+

The signal argument provides the new value.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.md5 new file mode 100644 index 0000000..7b3bb97 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.md5 @@ -0,0 +1 @@ +66db7df9e3aefdc13f79fd35195cfc40 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.png new file mode 100644 index 0000000..2f6c701 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WInPlaceEdit__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator-members.html new file mode 100644 index 0000000..d2dd4f4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator-members.html @@ -0,0 +1,124 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WIntValidator Member List

+
+
+This is the complete list of members for Wt::WIntValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
bottom() const Wt::WIntValidator
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WIntValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WIntValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
invalidNotANumberText() const Wt::WIntValidator
invalidTooLargeText() const Wt::WIntValidator
invalidTooSmallText() const Wt::WIntValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WIntValidator [protected, virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setBottom(int bottom)Wt::WIntValidator
setInvalidBlankText(const WString &text)Wt::WValidator
setInvalidNotANumberText(const WString &text)Wt::WIntValidator
setInvalidTooLargeText(const WString &text)Wt::WIntValidator
setInvalidTooSmallText(const WString &text)Wt::WIntValidator
setMandatory(bool how)Wt::WValidator
setObjectName(const std::string &name)Wt::WObject
setRange(int bottom, int top)Wt::WIntValidator [virtual]
setTop(int top)Wt::WIntValidator
State enum nameWt::WValidator
top() const Wt::WIntValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WIntValidator [virtual]
WIntValidator(WObject *parent=0)Wt::WIntValidator
WIntValidator(int minimum, int maximum, WObject *parent=0)Wt::WIntValidator
WObject(WObject *parent=0)Wt::WObject
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator.html new file mode 100644 index 0000000..8cd976f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator.html @@ -0,0 +1,390 @@ + + + + +Wt: Wt::WIntValidator Class Reference + + + + + + + + + +
+ +
+

Wt::WIntValidator Class Reference

+
+
+ +

A validator that validates integer user input. +More...

+ +

#include <Wt/WIntValidator>

+
+Inheritance diagram for Wt::WIntValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WIntValidator (WObject *parent=0)
 Creates a new integer validator that accepts any integer.
WIntValidator (int minimum, int maximum, WObject *parent=0)
 Creates a new integer validator that accepts integer input within the given range.
+int bottom () const
 Returns the bottom of the valid integer range.
void setBottom (int bottom)
 Sets the bottom of the valid integer range.
+int top () const
 Returns the top of the valid integer range.
void setTop (int top)
 Sets the top of the valid integer range.
+virtual void setRange (int bottom, int top)
 Sets the range of valid integers.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
void setInvalidNotANumberText (const WString &text)
 Sets the message to display when the input is not a number.
WString invalidNotANumberText () const
 Returns the message displayed when the input is not a number.
void setInvalidTooSmallText (const WString &text)
 Sets the message to display when the number is too small.
WString invalidTooSmallText () const
 Returns the message displayed when the number is too small.
void setInvalidTooLargeText (const WString &text)
 Sets the message to display when the number is too large.
WString invalidTooLargeText () const
 Returns the message displayed when the number is too large.

+Protected Member Functions

std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
std::string inputFilter () const
 Returns a regular expression that filters input.
+

Detailed Description

+

A validator that validates integer user input.

+

This validator checks whether user input is an integer number in a pre-defined range.

+

Usage example:

+
 Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
+ Wt::WIntValidator *validator = new Wt::WIntValidator(0, 100);
+ lineEdit->setValidator(validator);
+ lineEdit->setText("50");
+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WIntValidator.NotAnInteger: Must be an integer number
  • +
  • Wt.WIntValidator.TooSmall: The number must be larger than {1}
  • +
  • Wt.WIntValidator.BadRange: The number must be in the range {1} to {2}
  • +
  • Wt.WIntValidator.TooLarge: The number must be smaller than {1}
  • +
+

Member Function Documentation

+ +
+
+ + + + + + + +
std::string Wt::WIntValidator::inputFilter ( ) const [protected, virtual]
+
+
+ +

Returns a regular expression that filters input.

+

The returned regular expression is used to filter keys presses. The regular expression should accept valid single characters.

+

For details on valid regular expressions, see WRegExpValidator. As an example, "[0-9]" would only accept numbers as valid input.

+

The default implementation returns an empty string, which does not filter any input.

+
See also:
javaScriptValidate()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WIntValidator::invalidNotANumberText ( ) const
+
+
+ +

Returns the message displayed when the input is not a number.

+
See also:
setInvalidNotANumberText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WIntValidator::invalidTooLargeText ( ) const
+
+
+ +

Returns the message displayed when the number is too large.

+
See also:
setInvalidTooLargeText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WIntValidator::invalidTooSmallText ( ) const
+
+
+ +

Returns the message displayed when the number is too small.

+
See also:
setInvalidTooSmallText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WIntValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WIntValidator::setBottom (int  bottom )
+
+
+ +

Sets the bottom of the valid integer range.

+

The default value is the minimum integer value.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WIntValidator::setInvalidNotANumberText (const WString text )
+
+
+ +

Sets the message to display when the input is not a number.

+

The default value is "Must be an integer number."

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WIntValidator::setInvalidTooLargeText (const WString text )
+
+
+ +

Sets the message to display when the number is too large.

+

Depending on whether bottom() and top() are real bounds, the default message is "The number must be between {1} and {2}" or "The number must be smaller than {2}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WIntValidator::setInvalidTooSmallText (const WString text )
+
+
+ +

Sets the message to display when the number is too small.

+

Depending on whether bottom() and top() are real bounds, the default message is "The number must be between {1} and {2}" or "The number must be larger than {1}".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WIntValidator::setTop (int  top )
+
+
+ +

Sets the top of the valid integer range.

+

The default value is the maximum integer value.

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WIntValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

The input is considered valid only when it is blank for a non-mandatory field, or represents an integer within the valid range.

+ +

Reimplemented from Wt::WValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.map new file mode 100644 index 0000000..dd85070 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.md5 new file mode 100644 index 0000000..68c82e2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.md5 @@ -0,0 +1 @@ +1c79375f310399face09652c7cc3ae8b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.png new file mode 100644 index 0000000..4808d41 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WIntValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget-members.html new file mode 100644 index 0000000..042090a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget-members.html @@ -0,0 +1,202 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WInteractWidget Member List

+
+
+This is the complete list of members for Wt::WInteractWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget.html new file mode 100644 index 0000000..6976ce3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget.html @@ -0,0 +1,689 @@ + + + + +Wt: Wt::WInteractWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WInteractWidget Class Reference

+
+
+ +

An abstract widget that can receive user-interface interaction. +More...

+ +

#include <Wt/WInteractWidget>

+
+Inheritance diagram for Wt::WInteractWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WInteractWidget (WContainerWidget *parent=0)
 Create an InteractWidget with optional parent.
EventSignal< WKeyEvent > & keyWentDown ()
 Event signal emitted when a keyboard key is pushed down.
EventSignal< WKeyEvent > & keyPressed ()
 Event signal emitted when a "character" was entered.
EventSignal< WKeyEvent > & keyWentUp ()
 Event signal emitted when a keyboard key is released.
EventSignalenterPressed ()
 Event signal emitted when enter was pressed.
EventSignalescapePressed ()
 Event signal emitted when escape was pressed.
EventSignal< WMouseEvent > & clicked ()
 Event signal emitted when a mouse key was clicked on this widget.
EventSignal< WMouseEvent > & doubleClicked ()
 Event signal emitted when a mouse key was double clicked on this widget.
EventSignal< WMouseEvent > & mouseWentDown ()
 Event signal emitted when a mouse key was pushed down on this widget.
EventSignal< WMouseEvent > & mouseWentUp ()
 Event signal emitted when a mouse key was released on this widget.
EventSignal< WMouseEvent > & mouseWentOut ()
 Event signal emitted when the mouse went out of this widget.
EventSignal< WMouseEvent > & mouseWentOver ()
 Event signal emitted when the mouse entered this widget.
EventSignal< WMouseEvent > & mouseMoved ()
 Event signal emitted when the mouse moved over this widget.
EventSignal< WMouseEvent > & mouseDragged ()
 Event signal emitted when the mouse is dragged over this widget.
EventSignal< WMouseEvent > & mouseWheel ()
 Event signal emitted when the mouse scroll wheel was used.
EventSignal< WTouchEvent > & touchStarted ()
 Event signal emitted when a finger is placed on the screen.
EventSignal< WTouchEvent > & touchEnded ()
 Event signal emitted when a finger is removed from the screen.
EventSignal< WTouchEvent > & touchMoved ()
 Event signal emitted when a finger, which is already placed on the screen, is moved across the screen.
EventSignal< WGestureEvent > & gestureStarted ()
 Event signal emitted when a gesture is started.
EventSignal< WGestureEvent > & gestureChanged ()
 Event signal emitted when a gesture is changed.
EventSignal< WGestureEvent > & gestureEnded ()
 Event signal emitted when a gesture is ended.
void setDraggable (const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)
 Configure dragging for drag and drop.
virtual void load ()
 Loads content just before the widget is used.
virtual bool isEnabled () const
 Returns whether the widget is enabled.

+Protected Member Functions

virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.
+

Detailed Description

+

An abstract widget that can receive user-interface interaction.

+

This abstract widget provides access to event signals that correspond to user-interface interaction through mouse or keyboard.

+

When JavaScript is disabled, only the clicked() event will propagate (but without event details information).

+

CSS

+

Styling through CSS is not applicable.

+

Member Function Documentation

+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::clicked ( )
+
+
+ +

Event signal emitted when a mouse key was clicked on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the event details contain invalid information.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::doubleClicked ( )
+
+
+ +

Event signal emitted when a mouse key was double clicked on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WInteractWidget::enterPressed ( )
+
+
+ +

Event signal emitted when enter was pressed.

+

This signal is emitted when the Enter or Return key was pressed.

+

Form widgets (like WLineEdit) will receive key events when focussed. Other widgets will receive key events when they contain (directly or indirectly) a form widget that has focus.

+

To capture an enter press when no element has focus, see WApplication::globalEnterPressed()

+
See also:
keyPressed(), Key_Enter
+ +
+
+ +
+
+ + + + + + + +
EventSignal & Wt::WInteractWidget::escapePressed ( )
+
+
+ +

Event signal emitted when escape was pressed.

+

This signal is emitted when the Escape key was pressed.

+

Form widgets (like WLineEdit) will receive key events when focussed. Other widgets will receive key events when they contain (directly or indirectly) a form widget that has focus.

+

To capture an escape press when no element has focus, see WApplication::globalEscapePressed()

+
See also:
keyPressed(), Key_Escape
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WGestureEvent > & Wt::WInteractWidget::gestureChanged ( )
+
+
+ +

Event signal emitted when a gesture is changed.

+

The event details contains information about the scale and the rotation.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WGestureEvent > & Wt::WInteractWidget::gestureEnded ( )
+
+
+ +

Event signal emitted when a gesture is ended.

+

The event details contains information about the scale and the rotation.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WGestureEvent > & Wt::WInteractWidget::gestureStarted ( )
+
+
+ +

Event signal emitted when a gesture is started.

+

The event details contains information about the scale and the rotation.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WInteractWidget::isEnabled ( ) const [virtual]
+
+
+ +

Returns whether the widget is enabled.

+

A widget is enabled if it is not disabled, and none of its ancestors are disabled. This method returns whether the widget is rendered as enabled, while isDisabled() returns whether a widget has been explicitly disabled.

+

Note that a widget may be at the same time not enabled, and not disabled, in case one of its ancestors was disabled.

+
See also:
isDisabled()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WInteractWidget::keyPressed ( )
+
+
+ +

Event signal emitted when a "character" was entered.

+

The keyPressed signal is emitted when a key is pressed, and a character is entered. Unlike keyWentDown(), it is emitted only for key presses that result in a character being entered, and thus not for modifier keys or keyboard navigation keys.

+

Form widgets (like WLineEdit) will receive key events when focussed. Other widgets will receive key events when they contain (directly or indirectly) a form widget that has focus.

+

To capture a key press when no element has focus, see WApplication::globalKeyPressed()

+
See also:
keyWentDown()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WInteractWidget::keyWentDown ( )
+
+
+ +

Event signal emitted when a keyboard key is pushed down.

+

The keyWentDown signal is the first signal emitted when a key is pressed (before the keyPressed signal). Unlike keyPressed() however it is also emitted for modifier keys (such as "shift", "control", ...) or keyboard navigation keys that do not have a corresponding character.

+

Form widgets (like WLineEdit) will receive key events when focussed. Other widgets will receive key events when they contain (directly or indirectly) a form widget that has focus.

+

To capture a key down event when no element has focus, see WApplication::globalKeyWentDown()

+
See also:
keyPressed(), keyWentUp()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WKeyEvent > & Wt::WInteractWidget::keyWentUp ( )
+
+
+ +

Event signal emitted when a keyboard key is released.

+

This is the counter-part of the keyWentDown() event. Every key-down has its corresponding key-up.

+

Form widgets (like WLineEdit) will receive key events when focussed. Other widgets will receive key events when they contain (directly or indirectly) a form widget that has focus.

+

To capture a key up event when no element has focus, see WApplication::globalKeyWentUp()

+
See also:
keyWentDown()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WInteractWidget::load ( ) [virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseDragged ( )
+
+
+ +

Event signal emitted when the mouse is dragged over this widget.

+

The mouse event contains information on the button(s) currently pressed. If multiple buttons are currently pressed, only the button with smallest enum value is returned.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseMoved ( )
+
+
+ +

Event signal emitted when the mouse moved over this widget.

+

The mouse event contains information on the button(s) currently pressed. If multiple buttons are currently pressed, only the button with smallest enum value is returned.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseWentDown ( )
+
+
+ +

Event signal emitted when a mouse key was pushed down on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseWentOut ( )
+
+
+ +

Event signal emitted when the mouse went out of this widget.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseWentOver ( )
+
+
+ +

Event signal emitted when the mouse entered this widget.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseWentUp ( )
+
+
+ +

Event signal emitted when a mouse key was released on this widget.

+

The event details contains information such as the button, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WInteractWidget::mouseWheel ( )
+
+
+ +

Event signal emitted when the mouse scroll wheel was used.

+

The event details contains information such as the wheel delta, optional keyboard modifiers, and mouse coordinates relative to the widget, the window window, or the document.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WInteractWidget::propagateSetEnabled (bool  enabled ) [protected, virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Reimplemented from Wt::WWebWidget.

+ +

Reimplemented in Wt::WFormWidget, Wt::WGroupBox, and Wt::WLabel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WInteractWidget::setDraggable (const std::string &  mimeType,
WWidget dragWidget = 0,
bool  isDragWidgetOnly = false,
WObject sourceWidget = 0 
)
+
+
+ +

Configure dragging for drag and drop.

+

Enable drag&drop for this widget. The mimeType is used to find a suitable drop target, which must accept dropping of this mimetype.

+

By default, the entire widget is dragged. One may specify another widget to be dragged (for example the parent as dragWidget) or a dragWidget whose function is only to represent the drag visually (when isDragWidgetOnly = true).

+

The widget to be identified as source in the dropEvent may be given explicitly, and will default to this widget otherwise.

+
Note:
When JavaScript is disabled, drag&drop does not work.
+
See also:
WWidget::dropEvent(), WWidget::acceptDrops(), WDropEvent
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WTouchEvent > & Wt::WInteractWidget::touchEnded ( )
+
+
+ +

Event signal emitted when a finger is removed from the screen.

+

The event details contains information such as the touches, target touches and changed touches.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WTouchEvent > & Wt::WInteractWidget::touchMoved ( )
+
+
+ +

Event signal emitted when a finger, which is already placed on the screen, is moved across the screen.

+

The event details contains information such as the touches, target touches and changed touches.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WTouchEvent > & Wt::WInteractWidget::touchStarted ( )
+
+
+ +

Event signal emitted when a finger is placed on the screen.

+

The event details contains information such as the touches, target touches and changed touches.

+
Note:
When JavaScript is disabled, the signal will never fire.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.map new file mode 100644 index 0000000..3fc3eba --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.map @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.md5 new file mode 100644 index 0000000..70024e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.md5 @@ -0,0 +1 @@ +63c029e61612237a868cfe327001bd65 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.png new file mode 100644 index 0000000..17f3089 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WInteractWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate-members.html new file mode 100644 index 0000000..11f0f6f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate-members.html @@ -0,0 +1,109 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WItemDelegate Member List

+
+
+This is the complete list of members for Wt::WItemDelegate, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
closeEditor()Wt::WAbstractItemDelegate
closeEditor() const Wt::WAbstractItemDelegate
createEditor(const WModelIndex &index, WFlags< ViewItemRenderFlag > flags) const Wt::WItemDelegate [protected, virtual]
editState(WWidget *editor) const Wt::WItemDelegate [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setEditState(WWidget *editor, const boost::any &value) const Wt::WItemDelegate [virtual]
setModelData(const boost::any &editState, WAbstractItemModel *model, const WModelIndex &index) const Wt::WItemDelegate [virtual]
setObjectName(const std::string &name)Wt::WObject
setTextFormat(const WString &format)Wt::WItemDelegate
textFormat() const Wt::WItemDelegate
update(WWidget *widget, const WModelIndex &index, WFlags< ViewItemRenderFlag > flags)Wt::WItemDelegate [virtual]
updateModelIndex(WWidget *widget, const WModelIndex &index)Wt::WItemDelegate [virtual]
validate(const WModelIndex &index, const boost::any &editState) const Wt::WAbstractItemDelegate [virtual]
WAbstractItemDelegate(WObject *parent=0)Wt::WAbstractItemDelegate
WItemDelegate(WObject *parent=0)Wt::WItemDelegate
WObject(WObject *parent=0)Wt::WObject
~WAbstractItemDelegate()Wt::WAbstractItemDelegate [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate.html new file mode 100644 index 0000000..b70b394 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate.html @@ -0,0 +1,430 @@ + + + + +Wt: Wt::WItemDelegate Class Reference + + + + + + + + + +
+ +
+

Wt::WItemDelegate Class Reference
+ +[Model/view system] +

+
+
+ +

Standard delegate class for rendering a view item. +More...

+ +

#include <Wt/WItemDelegate>

+
+Inheritance diagram for Wt::WItemDelegate:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WItemDelegate (WObject *parent=0)
 Create an item delegate.
virtual WWidgetupdate (WWidget *widget, const WModelIndex &index, WFlags< ViewItemRenderFlag > flags)
 Creates or updates a widget that renders an item.
virtual void updateModelIndex (WWidget *widget, const WModelIndex &index)
 Updates the model index of a widget.
void setTextFormat (const WString &format)
 Sets the text format string.
const WStringtextFormat () const
 Returns the text format string.
virtual void setModelData (const boost::any &editState, WAbstractItemModel *model, const WModelIndex &index) const
 Saves the edited data to the model.
virtual boost::any editState (WWidget *editor) const
 Returns the current edit state.
virtual void setEditState (WWidget *editor, const boost::any &value) const
 Sets the editor data from the editor state.

+Protected Member Functions

virtual WWidgetcreateEditor (const WModelIndex &index, WFlags< ViewItemRenderFlag > flags) const
 Creates an editor for a data item.
+

Detailed Description

+

Standard delegate class for rendering a view item.

+

This class provides the standard implementation for rendering an item (as in a WAbstractItemView), and renders data provided by the standard data roles (see ItemDataRole). It also provides default editing support using a line edit.

+

You may provide special editing support for an item by specializing the widget and reimplement createEditor(), setModelData(), editState(), and setEditState().

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
WWidget * Wt::WItemDelegate::createEditor (const WModelIndex index,
WFlags< ViewItemRenderFlag flags 
) const [protected, virtual]
+
+
+ +

Creates an editor for a data item.

+

The default implementation returns a WLineEdit which edits the item's Wt::EditRole value.

+

You may reimplement this method to provide a suitable editor, or to attach a custom validator. In that case, you will probably also want to reimplement editState(), setEditState(), and setModelData().

+

The editor should not keep a reference to the model index (it does not need to since setModelData() will provide the proper model index to save the data to the model). Otherwise, because model indexes may shift because of row or column insertions, you should reimplement updateModelIndex().

+

As an example of how to provide a specialized editor, consider the default implementation, which returns a WLineEdit:

+
 Wt::WWidget *WItemDelegate::createEditor(const Wt::WModelIndex& index, WFlags<ViewItemRenderFlag> flags) const
+ {
+   Wt::WContainerWidget *result = new Wt::WContainerWidget();
+   result->setSelectable(true);
+
+   Wt::WLineEdit *lineEdit = new Wt::WLineEdit();
+   lineEdit->setText(asString(index.data(EditRole), textFormat_));
+   lineEdit->enterPressed().connect(boost::bind(&WItemDelegate::doCloseEditor, this, result, true));
+   lineEdit->escapePressed().connect(boost::bind(&WItemDelegate::doCloseEditor, this, result, false));
+
+   if (flags & RenderFocused)
+     lineEdit->setFocus();
+
+   // We use a layout so that the line edit fills the entire cell.
+   result->setLayout(new WHBoxLayout());
+   result->layout()->setContentsMargins(1, 1, 1, 1);
+   result->layout()->addWidget(lineEdit);
+
+   return result;
+ }
+
+ void WItemDelegate::doCloseEditor(Wt::WWidget *editor, bool save) const
+ {
+   closeEditor().emit(editor, save);
+ }
+
+
+
+ +
+
+ + + + + + + + +
boost::any Wt::WItemDelegate::editState (WWidget editor ) const [virtual]
+
+
+ +

Returns the current edit state.

+

The default implementation returns the current text in the line edit. You will need to reimplement this method for a custom editor.

+

As an example of how to deal with a specialized editor, consider the default implementation:

+
 boost::any WItemDelegate::editState(Wt::WWidget *editor) const
+ {
+   Wt::WContainerWidget *w = dynamic_cast<Wt::WContainerWidget *>(editor);
+   Wt::WLineEdit *lineEdit = dynamic_cast<Wt::WLineEdit *>(w->widget(0));
+
+   return boost::any(lineEdit->text());
+ }
+
See also:
createEditor(), setEditState(), setModelData()
+ +

Reimplemented from Wt::WAbstractItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WItemDelegate::setEditState (WWidget editor,
const boost::any &  value 
) const [virtual]
+
+
+ +

Sets the editor data from the editor state.

+

The default implementation resets the text in the line edit. You will need to reimplement this method if for a custom editor.

+

As an example of how to deal with a specialized editor, consider the default implementation:

+
 void WItemDelegate::setEditState(Wt::WWidget *editor, const boost::any& value) const
+ {
+   Wt::WContainerWidget *w = dynamic_cast<Wt::WContainerWidget *>(editor);
+   Wt::WLineEdit *lineEdit = dynamic_cast<Wt::WLineEdit *>(w->widget(0));
+
+   lineEdit->setText(boost::any_cast<Wt::WString>(value));
+ }
+
See also:
createEditor()
+ +

Reimplemented from Wt::WAbstractItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WItemDelegate::setModelData (const boost::any &  editState,
WAbstractItemModel model,
const WModelIndex index 
) const [virtual]
+
+
+ +

Saves the edited data to the model.

+

The default implementation saves the current edit value to the model. You will need to reimplement this method for a custom editor.

+

As an example of how to deal with a specialized editor, consider the default implementation:

+
 void WItemDelegate::setModelData(const boost::any& editState,
+                                  Wt::WAbstractItemModel *model,
+                                  const Wt::WModelIndex& index) const
+ {
+   model->setData(index, editState, EditRole);
+ }
+
See also:
createEditor(), editState()
+ +

Reimplemented from Wt::WAbstractItemDelegate.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WItemDelegate::setTextFormat (const WString format )
+
+
+ +

Sets the text format string.

+

The DisplayRole data is converted to a string using asString() by passing the given format.

+

The default value is "".

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WItemDelegate::textFormat ( ) const
+
+
+ +

Returns the text format string.

+
See also:
setTextFormat()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WWidget * Wt::WItemDelegate::update (WWidget widget,
const WModelIndex index,
WFlags< ViewItemRenderFlag flags 
) [virtual]
+
+
+ +

Creates or updates a widget that renders an item.

+

The following properties of an item are rendered:

+
    +
  • text using the Wt::DisplayRole data, with the format specified by setTextFormat()
  • +
  • a check box depending on the Wt::ItemIsUserCheckable flag and Wt::CheckStateRole data
  • +
  • an anchor depending on Wt::InternalPathRole or Wt::UrlRole values
  • +
  • an icon depending on the value of Wt::DecorationRole
  • +
  • a tooltip depending on the value of Wt::ToolTipRole
  • +
  • a custom style class depending on the value of Wt::StyleClassRole
  • +
+

When the flags indicates Wt::RenderEditing, then createEditor() is called to create a suitable editor for editing the item.

+ +

Implements Wt::WAbstractItemDelegate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WItemDelegate::updateModelIndex (WWidget widget,
const WModelIndex index 
) [virtual]
+
+
+ +

Updates the model index of a widget.

+

This method is invoked by the view when due to row/column insertions or removals, the index has shifted.

+

You should reimplement this method only if you are storing the model index in the widget, to update the stored model index.

+

The default implementation does nothing.

+ +

Reimplemented from Wt::WAbstractItemDelegate.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.map new file mode 100644 index 0000000..65e6224 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.md5 new file mode 100644 index 0000000..a26d202 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.md5 @@ -0,0 +1 @@ +9013db224ca9243bbd54ab1c0ffdc38f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.png new file mode 100644 index 0000000..7c427b3 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemDelegate__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel-members.html new file mode 100644 index 0000000..c4933e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel-members.html @@ -0,0 +1,100 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WItemSelectionModel Member List

+
+
+This is the complete list of members for Wt::WItemSelectionModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isSelected(const WModelIndex &index) const Wt::WItemSelectionModel
Method typedefWt::WObject
model() const Wt::WItemSelectionModel
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
selectedIndexes() const Wt::WItemSelectionModel
selectionBehavior() const Wt::WItemSelectionModel
sender()Wt::WObject [protected, static]
setObjectName(const std::string &name)Wt::WObject
setSelectionBehavior(SelectionBehavior behavior)Wt::WItemSelectionModel
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel.html new file mode 100644 index 0000000..68f4b3d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel.html @@ -0,0 +1,204 @@ + + + + +Wt: Wt::WItemSelectionModel Class Reference + + + + + + + + + +
+ +
+

Wt::WItemSelectionModel Class Reference
+ +[Model/view system] +

+
+
+ +

A class that represents a selection for a WAbstractItemView. +More...

+ +

#include <Wt/WItemSelectionModel>

+
+Inheritance diagram for Wt::WItemSelectionModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

+WAbstractItemModelmodel () const
 Returns the WAbstractItemModel.
WModelIndexSet selectedIndexes () const
 Returns the set of selected items.
bool isSelected (const WModelIndex &index) const
 Returns wheter an item is selected.
void setSelectionBehavior (SelectionBehavior behavior)
 Sets the selection behaviour.
SelectionBehavior selectionBehavior () const
 Returns the selection behaviour.
+

Detailed Description

+

A class that represents a selection for a WAbstractItemView.

+

This model is currently only used by WTreeView, and plays only a role in drag & drop of an item selection.

+

When an item selection is dragged from a view widget, the generated drop events will have as source object (see WDropEvent::source()) this selection model.

+

Although this class does not (yet) allow you to modify the selection, note that manipulations to the model may modify the selection (row insertions and removals may shift the selection, and row deletions may shrink the selection).

+
Note:
Currently this class cannot be shared between multiple views.
+
See also:
WTreeView, WTableView, WAbstractItemModel
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool Wt::WItemSelectionModel::isSelected (const WModelIndex index ) const
+
+
+ +

Returns wheter an item is selected.

+
See also:
selectedIndexes()
+ +
+
+ +
+
+ + + + + + + +
WModelIndexSet Wt::WItemSelectionModel::selectedIndexes ( ) const
+
+
+ +

Returns the set of selected items.

+

The model indexes are returned as a set, topologically ordered (in the order they appear in the view).

+ +
+
+ +
+
+ + + + + + + +
SelectionBehavior Wt::WItemSelectionModel::selectionBehavior ( ) const
+
+
+ +

Returns the selection behaviour.

+
See also:
setSelectionBehavior()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WItemSelectionModel::setSelectionBehavior (SelectionBehavior  behavior )
+
+
+ +

Sets the selection behaviour.

+

By default, the selection contains rows (SelectRows), in which case model indexes will always be have column 0, but represent the whole row.

+

Alternatively, you can allow selection for individual items (SelectItems).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.map new file mode 100644 index 0000000..a31819c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.md5 new file mode 100644 index 0000000..6f4fc2b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.md5 @@ -0,0 +1 @@ +556c12870c2b29c0e04c4b4eb7c48b14 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.png new file mode 100644 index 0000000..43c5398 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WItemSelectionModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent-members.html new file mode 100644 index 0000000..45a047f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent-members.html @@ -0,0 +1,88 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WKeyEvent Member List

+
+
+This is the complete list of members for Wt::WKeyEvent, including all inherited members. + + + + + + + + + + +
altKey() const Wt::WKeyEvent
charCode() const Wt::WKeyEvent
ctrlKey() const Wt::WKeyEvent
key() const Wt::WKeyEvent
keyCode() const Wt::WKeyEvent
metaKey() const Wt::WKeyEvent
modifiers() const Wt::WKeyEvent
shiftKey() const Wt::WKeyEvent
text() const Wt::WKeyEvent
WKeyEvent()Wt::WKeyEvent
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent.html new file mode 100644 index 0000000..05d02e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WKeyEvent.html @@ -0,0 +1,305 @@ + + + + +Wt: Wt::WKeyEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WKeyEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a keyboard event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WKeyEvent ()
 Default constructor.
Key key () const
 Returns the key code key that was pressed or released.
WFlags< KeyboardModifiermodifiers () const
 Returns keyboard modifiers.
int charCode () const
 Returns the unicode character code.
WString text () const
 The (unicode) text that this key generated.
int keyCode () const
 Returns the raw key code (deprecated).
bool altKey () const
 Returns whether the alt key is pressed (deprecated).
bool metaKey () const
 Returns whether the meta key is pressed (deprecated).
bool ctrlKey () const
 Returns whether the control key is pressed (deprecated).
bool shiftKey () const
 Returns whether the shift key is pressed (deprecated).
+

Detailed Description

+

A class providing details for a keyboard event.

+

A key event is associated with the WInteractWidget::keyWentDown(), WInteractWidget::keyWentUp() and WInteractWidget::keyPressed() signals.

+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::WKeyEvent::altKey ( ) const
+
+
+ +

Returns whether the alt key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
int Wt::WKeyEvent::charCode ( ) const
+
+
+ +

Returns the unicode character code.

+

This is only defined for a keyPressed event, and returns the unicode character code of a character that is entered.

+

For the keyWentDown and keyWentUp events, '0' is returned.

+

The charCode() may be different from key(). For example, a Key_M key may correspond to 'm' or 'M' character, depending on whether the shift key is pressed simultaneously.

+
See also:
key(), text()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WKeyEvent::ctrlKey ( ) const
+
+
+ +

Returns whether the control key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
Key Wt::WKeyEvent::key ( ) const
+
+
+ +

Returns the key code key that was pressed or released.

+

The key code corresponds to the actual key on the keyboard, rather than the generated character.

+

All three types of key events provide this information.

+
See also:
modifiers(), charCode()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WKeyEvent::keyCode ( ) const
+
+
+ +

Returns the raw key code (deprecated).

+
Deprecated:
The value returned is somewhat browser-specific, and it is therefore recommended to use the key() method instead.
+
See also:
key()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WKeyEvent::metaKey ( ) const
+
+
+ +

Returns whether the meta key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
WFlags<KeyboardModifier> Wt::WKeyEvent::modifiers ( ) const
+
+
+ +

Returns keyboard modifiers.

+

The result is a logical OR of KeyboardModifier flags.

+

All three types of key events provide this information.

+
See also:
key(), charCode()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WKeyEvent::shiftKey ( ) const
+
+
+ +

Returns whether the shift key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WKeyEvent::text ( ) const
+
+
+ +

The (unicode) text that this key generated.

+

This is only defined for a keyPressed event, and returns a string that holds exactly one unicode character, which corresponds to charCode().

+

For the keyWentDown and keyWentUp events, an empty string is returned.

+
See also:
charCode()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel-members.html new file mode 100644 index 0000000..298cb6f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel-members.html @@ -0,0 +1,214 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLabel Member List

+
+
+This is the complete list of members for Wt::WLabel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
buddy() const Wt::WLabel
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
image() const Wt::WLabel
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WLabel [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setBuddy(WFormWidget *buddy)Wt::WLabel
setBuddy(Ext::FormField *buddy)Wt::WLabel
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setImage(WImage *image, Side side=Left)Wt::WLabel
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::WLabel
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWordWrap(bool wordWrap)Wt::WLabel
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::WLabel
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WLabel(WContainerWidget *parent=0)Wt::WLabel
WLabel(const WString &text, WContainerWidget *parent=0)Wt::WLabel
WLabel(WImage *image, WContainerWidget *parent=0)Wt::WLabel
WObject(WObject *parent=0)Wt::WObject
wordWrap() const Wt::WLabel
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel.html new file mode 100644 index 0000000..48ee435 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel.html @@ -0,0 +1,277 @@ + + + + +Wt: Wt::WLabel Class Reference + + + + + + + + + +
+ +
+

Wt::WLabel Class Reference

+
+
+ +

A label for a form field. +More...

+ +

#include <Wt/WLabel>

+
+Inheritance diagram for Wt::WLabel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WLabel (WContainerWidget *parent=0)
 Creates a label with empty text and optional parent.
WLabel (const WString &text, WContainerWidget *parent=0)
 Creates a label with a given text.
WLabel (WImage *image, WContainerWidget *parent=0)
 Creates a label with an image.
WFormWidgetbuddy () const
 Returns the buddy of this label.
void setBuddy (WFormWidget *buddy)
 Sets the buddy of this label.
void setBuddy (Ext::FormField *buddy)
 Sets the buddy of this label.
+void setText (const WString &text)
 Sets the label text.
+const WStringtext () const
 Returns the label text.
+void setImage (WImage *image, Side side=Left)
 Sets the image.
+WImageimage () const
 Returns the image.
void setWordWrap (bool wordWrap)
 Configures word wrapping.
bool wordWrap () const
 Returns whether word wrapping is on.

+Protected Member Functions

virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.
+

Detailed Description

+

A label for a form field.

+

The label may contain an image and/or text. It acts like a proxy for giving focus to a WFormWidget. When both an image and text are specified, the image is put to the left of the text.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget();
+ Wt::WLabel *label = new Wt::WLabel("Favourite Actress: ", w);
+ Wt::WLineEdit *edit = new Wt::WLineEdit("Renee Zellweger", w);
+ label->setBuddy(edit);
+

The widget corresponds to the HTML <label> tag. When no buddy is set, it is rendered using an HTML <span> or <div> to avoid click event handling misbehavior on Microsoft Internet Explorer.

+

WLabel is an inline widget.

+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate. A label's text may be styled via a nested <span> element, and it's image may be styled via a nested <img> element.

+

Member Function Documentation

+ +
+
+ + + + + + + +
WFormWidget* Wt::WLabel::buddy ( ) const
+
+
+ +

Returns the buddy of this label.

+
See also:
setBuddy(WFormWidget *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLabel::propagateSetEnabled (bool  enabled ) [protected, virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Reimplemented from Wt::WInteractWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLabel::setBuddy (WFormWidget buddy )
+
+
+ +

Sets the buddy of this label.

+

Sets the buddy FormWidget for which this label acts as a proxy.

+
See also:
WFormWidget::label(), setBuddy(Ext::FormField *), buddy()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLabel::setBuddy (Ext::FormField buddy )
+
+
+ +

Sets the buddy of this label.

+

Sets the buddy Ext::FormField for which this label acts as a proxy. When using this method, the result of buddy() is not defined.

+
See also:
Ext::FormField::label(), setBuddy(WFormWidget *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLabel::setWordWrap (bool  wordWrap )
+
+
+ +

Configures word wrapping.

+

When wordWrap is true, the widget may break lines, creating a multi-line text. When wordWrap is false, the text will displayed on a single line, unless the text contains end-of-lines (for Wt::PlainText) or <br /> tags or other block-level tags (for Wt::XHTMLText).

+

The default value is false.

+
See also:
wordWrap()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WLabel::wordWrap ( ) const
+
+
+ +

Returns whether word wrapping is on.

+
See also:
setWordWrap()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.md5 new file mode 100644 index 0000000..1ebea9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.md5 @@ -0,0 +1 @@ +aba04e15d7ffd3fdc7e25db77df16a44 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.png new file mode 100644 index 0000000..aedb285 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLabel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout-members.html new file mode 100644 index 0000000..7710cfa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout-members.html @@ -0,0 +1,119 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLayout Member List

+
+
+This is the complete list of members for Wt::WLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)=0Wt::WLayout [pure virtual]
addWidget(WWidget *widget)Wt::WLayout
children() const Wt::WObject
count() const =0Wt::WLayout [pure virtual]
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
itemAt(int index) const =0Wt::WLayout [pure virtual]
layout()Wt::WLayout [virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)=0Wt::WLayout [pure virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setParentLayout(WLayout *parentLayout)Wt::WLayout [private, virtual]
setParentWidget(WWidget *parent)Wt::WLayout [private, virtual]
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout.html new file mode 100644 index 0000000..41dc349 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout.html @@ -0,0 +1,604 @@ + + + + +Wt: Wt::WLayout Class Reference + + + + + + + + + + +
+ +

An abstract base class for layout managers. +More...

+ +

#include <Wt/WLayout>

+
+Inheritance diagram for Wt::WLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

virtual ~WLayout ()
 Destructor.
virtual void addItem (WLayoutItem *item)=0
 Adds a layout item.
void addWidget (WWidget *widget)
 Adds the given widget to the layout.
virtual void removeItem (WLayoutItem *item)=0
 Removes a layout item (widget or nested layout).
bool removeWidget (WWidget *widget)
 Removes the given widget from the layout.
virtual int count () const =0
 Returns the number of items in this layout.
virtual WLayoutItemitemAt (int index) const =0
 Returns the layout item at a specific index.
virtual int indexOf (WLayoutItem *item) const
 Returns the index of a given item.
+virtual WWidgetItemfindWidgetItem (WWidget *widget)
 Finds the widget item associated with the given widget.
void setLayoutHint (const std::string &name, const std::string &value)
 Provides a hint to the layout implementation.
virtual WWidgetwidget ()
 Returns the widget that is held by this WLayoutItem.
virtual WLayoutlayout ()
 Returns the layout that implements this WLayoutItem.
+virtual WLayoutparentLayout () const
 Returns the layout in which this item is contained.
WLayoutItemImplimpl () const
 Returns the implementation for this layout item.
void setContentsMargins (int left, int top, int right, int bottom)
 Set contents margins (in pixels).
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 Returns the contents margins.

+Protected Member Functions

WLayout ()
 Create a layout.
void update (WLayoutItem *item=0)
 Update the layout.
void updateAddItem (WLayoutItem *item)
 Update the layout, adding the given layout item.
void updateRemoveItem (WLayoutItem *item)
 Update the layout, remove the given layout item.
void setLayoutInParent (WWidget *parent)
 Set the layout in the parent.

+Private Member Functions

+virtual void setParentWidget (WWidget *parent)
 Internal method.
+virtual void setParentLayout (WLayout *parentLayout)
 Internal method.
+

Detailed Description

+

An abstract base class for layout managers.

+

This class is the abstract base class for any layout manager. A layout manager is associated with a container widget, and manages the layout of children inside the whole space available to the container widget.

+

Layout managers may be used with WContainerWidget and Ext::Container container widgets. A suitable implementation for all layout classes is not yet available for both containers, and thus you need to refer to the documentation of a layout manager to see if it is applicable to your situation.

+

The implementation of the layout manager depends on the container widget to which it is set, and is therefore deferred to WLayoutImpl.

+

A layout never assumes ownership of contained items, instead these are owned by the parent widget to which the layout is applied.

+
Note:
When applying a layout manager to a WContainerWidget, you may not define any padding for the container widget. Instead, use setContentsMargins().
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WLayout::~WLayout ( ) [virtual]
+
+
+ +

Destructor.

+

This will delete the layout (and nested layouts), but not the contained widgets.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void Wt::WLayout::addItem (WLayoutItem item ) [pure virtual]
+
+
+ +

Adds a layout item.

+

The item may be a widget or nested layout.

+

How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeItem(WLayoutItem *), addWidget(WWidget *)
+ +

Implemented in Wt::WBorderLayout, Wt::WBoxLayout, Wt::WDefaultLayout, Wt::WFitLayout, and Wt::WGridLayout.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLayout::addWidget (WWidget widget )
+
+
+ +

Adds the given widget to the layout.

+

This method wraps the widget in a WWidgetItem and calls addItem(WLayoutItem *).

+

How the widget is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.

+
See also:
removeWidget(WWidget *), addItem(WLayoutItem *)
+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WLayout::count ( ) const [pure virtual]
+
+
+ +

Returns the number of items in this layout.

+

This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().

+ +

Implemented in Wt::WBorderLayout, Wt::WBoxLayout, Wt::WDefaultLayout, Wt::WFitLayout, and Wt::WGridLayout.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WLayout::getContentsMargins (int *  left,
int *  top,
int *  right,
int *  bottom 
) const
+
+
+ +

Returns the contents margins.

+
See also:
setContentsMargins()
+ +
+
+ +
+
+ + + + + + + +
WLayoutItemImpl* Wt::WLayout::impl ( ) const [virtual]
+
+
+ +

Returns the implementation for this layout item.

+

The implementation of a layout item depends on the kind of container for which the layout does layout management.

+ +

Implements Wt::WLayoutItem.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WLayout::indexOf (WLayoutItem item ) const [virtual]
+
+
+ +

Returns the index of a given item.

+

The default implementation loops over all items, and returns the index for which itemAt(index) equals item.

+
See also:
itemAt(int) const
+ +

Reimplemented in Wt::WDefaultLayout, and Wt::WFitLayout.

+ +
+
+ +
+
+ + + + + + + + +
virtual WLayoutItem* Wt::WLayout::itemAt (int  index ) const [pure virtual]
+
+
+ +

Returns the layout item at a specific index.

+

If there is no item at the index, 0 is returned.

+
See also:
indexOf(WLayoutItem *) const, count()
+ +

Implemented in Wt::WBorderLayout, Wt::WBoxLayout, Wt::WDefaultLayout, Wt::WFitLayout, and Wt::WGridLayout.

+ +
+
+ +
+
+ + + + + + + +
virtual WLayout* Wt::WLayout::layout ( ) [virtual]
+
+
+ +

Returns the layout that implements this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WLayout.

+ +

Implements Wt::WLayoutItem.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WLayout::removeItem (WLayoutItem item ) [pure virtual]
+
+
+ +

Removes a layout item (widget or nested layout).

+
See also:
addItem(WLayoutItem *), removeWidget(WWidget *)
+ +

Implemented in Wt::WBorderLayout, Wt::WBoxLayout, Wt::WDefaultLayout, Wt::WFitLayout, and Wt::WGridLayout.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WLayout::removeWidget (WWidget widget )
+
+
+ +

Removes the given widget from the layout.

+

This method finds the corresponding WWidgetItem and calls removeItem(WLayoutItem *). The widget itself is not destroyed.

+

Returns true if succesful.

+
See also:
addWidget(WWidget *), removeItem(WLayoutItem *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WLayout::setContentsMargins (int  left,
int  top,
int  right,
int  bottom 
)
+
+
+ +

Set contents margins (in pixels).

+

The default contents margins are 9 pixels in all directions.

+
Note:
Only used when the layout manager is applied to a WContainerWidget.
+
See also:
setContentsMargins()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WLayout::setLayoutHint (const std::string &  name,
const std::string &  value 
)
+
+
+ +

Provides a hint to the layout implementation.

+

In some cases, a layout implementation may require some hints for rendering its contents. Possible hints are indicated in the reference documentation for each layout manager.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLayout::setLayoutInParent (WWidget parent ) [protected]
+
+
+ +

Set the layout in the parent.

+

Must be called from the constructor after the layout has been fully created (since it will call virtual methods count() and itemAt()).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLayout::update (WLayoutItem item = 0 ) [protected]
+
+
+ +

Update the layout.

+

Must be called whenever some properties of the layout have changed.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLayout::updateAddItem (WLayoutItem item ) [protected]
+
+
+ +

Update the layout, adding the given layout item.

+

Must be called from the implementation of addItem(WLayoutItem *)

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLayout::updateRemoveItem (WLayoutItem item ) [protected]
+
+
+ +

Update the layout, remove the given layout item.

+

Must be called from the implementation of removeItem(WLayoutItem *)

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WLayout::widget ( ) [virtual]
+
+
+ +

Returns the widget that is held by this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WWidgetItem.

+ +

Implements Wt::WLayoutItem.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem-members.html new file mode 100644 index 0000000..6abf52e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLayoutItem Member List

+
+
+This is the complete list of members for Wt::WLayoutItem, including all inherited members. + + + + + + + + +
findWidgetItem(WWidget *widget)=0Wt::WLayoutItem [pure virtual]
impl() const =0Wt::WLayoutItem [pure virtual]
layout()=0Wt::WLayoutItem [pure virtual]
parentLayout() const =0Wt::WLayoutItem [pure virtual]
setParentLayout(WLayout *parentLayout)=0Wt::WLayoutItem [private, pure virtual]
setParentWidget(WWidget *parent)=0Wt::WLayoutItem [private, pure virtual]
widget()=0Wt::WLayoutItem [pure virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem.html new file mode 100644 index 0000000..2d36284 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem.html @@ -0,0 +1,215 @@ + + + + +Wt: Wt::WLayoutItem Class Reference + + + + + + + + + +
+ +
+

Wt::WLayoutItem Class Reference

+
+
+ +

An abstract base class for items that can participate in a layout. +More...

+ +

#include <Wt/WLayoutItem>

+
+Inheritance diagram for Wt::WLayoutItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~WLayoutItem ()
 Destructor.
virtual WWidgetItemfindWidgetItem (WWidget *widget)=0
 Finds the widget item corresponding to the given widget
virtual WLayoutlayout ()=0
 Returns the layout that implements this WLayoutItem.
virtual WWidgetwidget ()=0
 Returns the widget that is held by this WLayoutItem.
+virtual WLayoutparentLayout () const =0
 Returns the layout in which this item is contained.
virtual WLayoutItemImplimpl () const =0
 Returns the implementation for this layout item.

+Private Member Functions

+virtual void setParentWidget (WWidget *parent)=0
 Internal method.
+virtual void setParentLayout (WLayout *parentLayout)=0
 Internal method.
+

Detailed Description

+

An abstract base class for items that can participate in a layout.

+
See also:
WLayout
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual WWidgetItem* Wt::WLayoutItem::findWidgetItem (WWidget widget ) [pure virtual]
+
+
+ +

Finds the widget item corresponding to the given widget

+

The widget is searched for recursively inside nested layouts.

+ +

Implemented in Wt::WLayout, and Wt::WWidgetItem.

+ +
+
+ +
+
+ + + + + + + +
virtual WLayoutItemImpl* Wt::WLayoutItem::impl ( ) const [pure virtual]
+
+
+ +

Returns the implementation for this layout item.

+

The implementation of a layout item depends on the kind of container for which the layout does layout management.

+ +

Implemented in Wt::WLayout, and Wt::WWidgetItem.

+ +
+
+ +
+
+ + + + + + + +
virtual WLayout* Wt::WLayoutItem::layout ( ) [pure virtual]
+
+
+ +

Returns the layout that implements this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WLayout.

+ +

Implemented in Wt::WLayout, and Wt::WWidgetItem.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WLayoutItem::widget ( ) [pure virtual]
+
+
+ +

Returns the widget that is held by this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WWidgetItem.

+ +

Implemented in Wt::WLayout, and Wt::WWidgetItem.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl-members.html new file mode 100644 index 0000000..5a8cdcb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLayoutItemImpl Member List

+
+
+This is the complete list of members for Wt::WLayoutItemImpl, including all inherited members. + + + + + + +
parentWidget() const =0Wt::WLayoutItemImpl [pure virtual]
setHint(const std::string &name, const std::string &value)=0Wt::WLayoutItemImpl [pure virtual]
update(WLayoutItem *item)=0Wt::WLayoutItemImpl [pure virtual]
updateAddItem(WLayoutItem *item)=0Wt::WLayoutItemImpl [pure virtual]
updateRemoveItem(WLayoutItem *item)=0Wt::WLayoutItemImpl [pure virtual]
~WLayoutItemImpl()Wt::WLayoutItemImpl [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl.html new file mode 100644 index 0000000..acfb985 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItemImpl.html @@ -0,0 +1,139 @@ + + + + +Wt: Wt::WLayoutItemImpl Class Reference + + + + + + + + + +
+ +
+

Wt::WLayoutItemImpl Class Reference

+
+
+ +

An abstract base class for implementing layout managers. +More...

+ +

#include <Wt/WLayoutItemImpl>

+ +

Inherited by Wt::Ext::LayoutItemImpl, and Wt::StdLayoutItemImpl.

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~WLayoutItemImpl ()
 Destructor.
virtual void updateAddItem (WLayoutItem *item)=0
 Adds a layout item.
+virtual void updateRemoveItem (WLayoutItem *item)=0
 Removes a layout item.
+virtual void update (WLayoutItem *item)=0
 Updates the layout.
+virtual WWidgetparentWidget () const =0
 Returns the widget for which this layout item participates in layout management.
+virtual void setHint (const std::string &name, const std::string &value)=0
 Provides a hint that can aid in layout strategy / algorithm.
+

Detailed Description

+

An abstract base class for implementing layout managers.

+
See also:
WLayoutItem, WLayout
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void Wt::WLayoutItemImpl::updateAddItem (WLayoutItem item ) [pure virtual]
+
+
+ +

Adds a layout item.

+

The item already has an implementation set.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.map new file mode 100644 index 0000000..d7c66b7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.md5 new file mode 100644 index 0000000..41da598 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.md5 @@ -0,0 +1 @@ +76f85c2b577b4340e3f60330ac905006 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.png new file mode 100644 index 0000000..d149a1b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayoutItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.map new file mode 100644 index 0000000..0ce0633 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.md5 new file mode 100644 index 0000000..44d2431 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.md5 @@ -0,0 +1 @@ +110c4adf736d7a9c11f88134050a4309 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.png new file mode 100644 index 0000000..a8b6635 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLength-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLength-members.html new file mode 100644 index 0000000..aed9a4c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLength-members.html @@ -0,0 +1,98 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLength Member List

+
+
+This is the complete list of members for Wt::WLength, including all inherited members. + + + + + + + + + + + + + + + + + + + + +
AutoWt::WLength [static]
Centimeter enum valueWt::WLength
cssText() const Wt::WLength
FontEm enum valueWt::WLength
FontEx enum valueWt::WLength
Inch enum valueWt::WLength
isAuto() const Wt::WLength
Millimeter enum valueWt::WLength
operator!=(const WLength &other) const Wt::WLength
operator==(const WLength &other) const Wt::WLength
Percentage enum valueWt::WLength
Pica enum valueWt::WLength
Pixel enum valueWt::WLength
Point enum valueWt::WLength
toPixels() const Wt::WLength
Unit enum nameWt::WLength
unit() const Wt::WLength
value() const Wt::WLength
WLength()Wt::WLength
WLength(double value, Unit unit=Pixel)Wt::WLength
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLength.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLength.html new file mode 100644 index 0000000..9df6225 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLength.html @@ -0,0 +1,336 @@ + + + + +Wt: Wt::WLength Class Reference + + + + + + + + + +
+ +
+

Wt::WLength Class Reference

+
+
+ +

A class that specifies a CSS length. +More...

+ +

#include <Wt/WLength>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Unit {
+  FontEm, +FontEx, +Pixel, +Inch, +
+  Centimeter, +Millimeter, +Point, +Pica, +
+  Percentage +
+ }
 

The unit.

+ More...

+Public Member Functions

 WLength ()
 Creates an 'auto' length.
 WLength (double value, Unit unit=Pixel)
 Creates a length with value and unit.
bool isAuto () const
 Returns whether the length is 'auto'.
double value () const
 Returns the value.
Unit unit () const
 Returns the unit.
+const std::string cssText () const
 Returns the CSS text.
+bool operator== (const WLength &other) const
 Comparison operator.
+bool operator!= (const WLength &other) const
 Comparison operator.
double toPixels () const
 Returns the (approximate) length in pixels.

+Static Public Attributes

static WLength Auto
 An 'auto' length.
+

Detailed Description

+

A class that specifies a CSS length.

+

The class combines a value with a unit. There is a special value auto which has a different meaning depending on the context.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WLength::Unit
+
+
+ +

The unit.

+
Enumerator:
+ + + + + + + + + +
FontEm  +

The relative font size.

+
FontEx  +

The height of an 'x' in the font.

+
Pixel  +

Pixel, relative to canvas resolution.

+
Inch  +

Inche.

+
Centimeter  +

Centimeter.

+
Millimeter  +

Millimeter.

+
Point  +

Point (1/72 Inch)

+
Pica  +

Pica (12 Point)

+
Percentage  +

Percentage (meaning context-sensitive)

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WLength::WLength ( )
+
+
+ +

Creates an 'auto' length.

+

Specifies an 'auto' length.

+
See also:
Auto
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WLength::WLength (double  value,
Unit  unit = Pixel 
)
+
+
+ +

Creates a length with value and unit.

+

This constructor will also provide the implicit conversion between a double and WLength, using a pixel unit.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::WLength::isAuto ( ) const
+
+
+ +

Returns whether the length is 'auto'.

+
See also:
WLength(), Auto
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLength::toPixels ( ) const
+
+
+ +

Returns the (approximate) length in pixels.

+

When the length isAuto(), 0 is returned, otherwise the approximate length in pixels.

+ +
+
+ +
+
+ + + + + + + +
Unit Wt::WLength::unit ( ) const
+
+
+ +

Returns the unit.

+
See also:
value()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLength::value ( ) const
+
+
+ +

Returns the value.

+
See also:
unit()
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
WLength Wt::WLength::Auto [static]
+
+
+ +

An 'auto' length.

+
See also:
WLength()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator-members.html new file mode 100644 index 0000000..bbf2ba8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator-members.html @@ -0,0 +1,121 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLengthValidator Member List

+
+
+This is the complete list of members for Wt::WLengthValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WLengthValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
invalidTooLongText() const Wt::WLengthValidator
invalidTooShortText() const Wt::WLengthValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WLengthValidator [protected, virtual]
maximumLength() const Wt::WLengthValidator
Method typedefWt::WObject
minimumLength() const Wt::WLengthValidator
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setInvalidBlankText(const WString &text)Wt::WValidator
setInvalidTooLongText(const WString &text)Wt::WLengthValidator
setInvalidTooShortText(const WString &text)Wt::WLengthValidator
setMandatory(bool how)Wt::WValidator
setMaximumLength(int maximum)Wt::WLengthValidator
setMinimumLength(int minimum)Wt::WLengthValidator
setObjectName(const std::string &name)Wt::WObject
State enum nameWt::WValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WLengthValidator [virtual]
WLengthValidator(WObject *parent=0)Wt::WLengthValidator
WLengthValidator(int minLength, int maxLength, WObject *parent=0)Wt::WLengthValidator
WObject(WObject *parent=0)Wt::WObject
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator.html new file mode 100644 index 0000000..7699938 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator.html @@ -0,0 +1,356 @@ + + + + +Wt: Wt::WLengthValidator Class Reference + + + + + + + + + +
+ +
+

Wt::WLengthValidator Class Reference

+
+
+ +

A validator that checks the string length of user input. +More...

+ +

#include <Wt/WLengthValidator>

+
+Inheritance diagram for Wt::WLengthValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WLengthValidator (WObject *parent=0)
 Creates a length validator that accepts input of any length.
WLengthValidator (int minLength, int maxLength, WObject *parent=0)
 Creates a length validator that accepts input within a length range.
void setMinimumLength (int minimum)
 Sets the minimum length.
int minimumLength () const
 Returns the minimum length.
void setMaximumLength (int maximum)
 Sets the maximum length.
int maximumLength () const
 Returns the maximum length.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
void setInvalidTooShortText (const WString &text)
 Sets the message to display when the input is too short.
WString invalidTooShortText () const
 Returns the message displayed when the input is too short.
void setInvalidTooLongText (const WString &text)
 Sets the message to display when the input is too long.
WString invalidTooLongText () const
 Returns the message displayed when the input is too long.

+Protected Member Functions

std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
+

Detailed Description

+

A validator that checks the string length of user input.

+

This validator checks whether user input is within the specified range of accepted string lengths.

+

If you only want to limit the length on a line edit, you may also use WLineEdit::setMaxLength().

+

Usage example:

+
 Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
+ Wt::WLengthValidator *validator = new Wt::WLengthValidator(5, 15);
+ lineEdit->setValidator(validator);
+ lineEdit->setText("abcdef");
+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WLengthValidator.TooShort: The input must be at least {1} characters
  • +
  • Wt.WLengthValidator.BadRange: The input must have a length between {1} and {2} characters
  • +
  • Wt.WLengthValidator.TooLong: The input must be no more than {1} characters
  • +
+

Member Function Documentation

+ +
+
+ + + + + + + +
WString Wt::WLengthValidator::invalidTooLongText ( ) const
+
+
+ +

Returns the message displayed when the input is too long.

+
See also:
setInvalidTooLongText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WLengthValidator::invalidTooShortText ( ) const
+
+
+ +

Returns the message displayed when the input is too short.

+
See also:
setInvalidTooShortText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WLengthValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WLengthValidator::maximumLength ( ) const
+
+
+ +

Returns the maximum length.

+
See also:
setMaximumLength(int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WLengthValidator::minimumLength ( ) const
+
+
+ +

Returns the minimum length.

+
See also:
setMinimumLength(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLengthValidator::setInvalidTooLongText (const WString text )
+
+
+ +

Sets the message to display when the input is too long.

+

Depending on whether minimumLength() is different from zero, the default message is "The input must have a length between {1} and + {2} characters" or " "The input must be no more than {2} characters".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLengthValidator::setInvalidTooShortText (const WString text )
+
+
+ +

Sets the message to display when the input is too short.

+

Depending on whether maximumLength() is a real bound, the default message is "The input must have a length between {1} and {2} + characters" or " "The input must be at least {1} characters".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLengthValidator::setMaximumLength (int  maximum )
+
+
+ +

Sets the maximum length.

+

The default value is the maximum integer value.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLengthValidator::setMinimumLength (int  minimum )
+
+
+ +

Sets the minimum length.

+

The default value is 0.

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WLengthValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

The input is considered valid only when it is blank for a non-mandatory field, or has a length within the valid range.

+ +

Reimplemented from Wt::WValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.map new file mode 100644 index 0000000..9566010 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.md5 new file mode 100644 index 0000000..34acf99 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.md5 @@ -0,0 +1 @@ +ed8bf914e0be575144122362ab42b0e2 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.png new file mode 100644 index 0000000..e609164 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLengthValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit-members.html new file mode 100644 index 0000000..ee0ab18 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLineEdit Member List

+
+
+This is the complete list of members for Wt::WLineEdit, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WLineEdit [protected, virtual]
boxPadding(Orientation orientation) const Wt::WLineEdit [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
cursorPosition() const Wt::WLineEdit
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
EchoMode enum nameWt::WLineEdit
echoMode() const Wt::WLineEdit
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
hasSelectedText() const Wt::WLineEdit
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::WLineEdit
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
Normal enum valueWt::WLineEdit
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::WLineEdit
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
selectedText() const Wt::WLineEdit
selectionStart() const Wt::WLineEdit
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEchoMode(EchoMode echoMode)Wt::WLineEdit
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::WLineEdit
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WLineEdit [virtual]
setTextSize(int chars)Wt::WLineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WLineEdit
textSize() const Wt::WLineEdit
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WLineEdit [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WLineEdit(WContainerWidget *parent=0)Wt::WLineEdit
WLineEdit(const WString &content, WContainerWidget *parent=0)Wt::WLineEdit
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit.html new file mode 100644 index 0000000..e3b280a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit.html @@ -0,0 +1,485 @@ + + + + +Wt: Wt::WLineEdit Class Reference + + + + + + + + + +
+ +
+

Wt::WLineEdit Class Reference

+
+
+ +

A widget that provides a single line edit. +More...

+ +

#include <Wt/WLineEdit>

+
+Inheritance diagram for Wt::WLineEdit:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  EchoMode { Normal, +Password + }
 

Enumeration that describes how the contents is displayed.

+ More...

+Public Member Functions

WLineEdit (WContainerWidget *parent=0)
 Creates a line edit with empty content and optional parent.
WLineEdit (const WString &content, WContainerWidget *parent=0)
 Creates a line edit with given content and optional parent.
void setTextSize (int chars)
 Specifies the width of the line edit in number of characters.
int textSize () const
 Returns the current width of the line edit in number of characters.
virtual void setText (const WString &text)
 Sets the content of the line edit.
const WStringtext () const
 Returns the current content.
void setMaxLength (int length)
 Specifies the maximum length of text that can be entered.
int maxLength () const
 Returns the maximum length of text that can be entered.
void setEchoMode (EchoMode echoMode)
 Sets the echo mode.
EchoMode echoMode () const
 Returns the echo mode.
int selectionStart () const
 Returns the current selection start.
WString selectedText () const
 Returns the currently selected text.
bool hasSelectedText () const
 Returns whether there is selected text.
int cursorPosition () const
 Returns the current cursor position.
+WValidator::State validate ()
 Validates the field.

+Protected Member Functions

virtual int boxPadding (Orientation orientation) const
 Returns the widget's built-in padding.
virtual int boxBorder (Orientation orientation) const
 Returns the widget's built-in border width.
+

Detailed Description

+

A widget that provides a single line edit.

+

To act upon text changes, connect a slot to the changed() signal. This signal is emitted when the user changed the content, and subsequently removes the focus from the line edit.

+

To act upon editing, connect a slot to the keyWentUp() signal.

+

At all times, the current content may be accessed with the text() method.

+

You may specify a maximum length for the input using setMaxLength(). If you wish to provide more detailed input validation, you may set a validator using the setValidator(WValidator *) method. Validators provide, in general, both client-side validation (as visual feed-back only) and server-side validation when calling validate().

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget();
+ Wt::WLabel *label = new Wt::WLabel("Age:", w);
+ Wt::WLineEdit *edit = new Wt::WLineEdit("13", w);
+ edit->setValidator(new Wt::WIntValidator(0, 200));
+ label->setBuddy(edit);
+

The widget corresponds to the HTML <input type="text"> or <input type="password"> tag.

+

WLineEdit is an inline widget.

+

CSS

+

The emptyText style can be configured via .Wt-edit-emptyText, other styling can be done using inline or external CSS as appropriate.

+
See also:
WTextArea
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WLineEdit::EchoMode
+
+
+ +

Enumeration that describes how the contents is displayed.

+
See also:
setEchoMode(EchoMode)
+
Enumerator:
+ + +
Normal  +

Characters are shown.

+
Password  +

Hide the contents as for a password.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WLineEdit::boxBorder (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in border width.

+

This is used by the layout managers to correct for a built-in border which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the border width (the default implementation returns 0).

+

For form widgets, the border width depends on the specific browser/platform combination, unless an explicit border is set for the widget.

+

When setting an explicit border for the widget using a style class, you will want to reimplement this method to return this border width, in case you want to set the widget inside a layout manager.

+
See also:
boxPadding()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WLineEdit::boxPadding (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in padding.

+

This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).

+

For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.

+

When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.

+
See also:
boxBorder()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WLineEdit::cursorPosition ( ) const
+
+
+ +

Returns the current cursor position.

+

Returns -1 if the widget does not have the focus.

+ +
+
+ +
+
+ + + + + + + +
EchoMode Wt::WLineEdit::echoMode ( ) const
+
+
+ +

Returns the echo mode.

+
See also:
setEchoMode(EchoMode)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WLineEdit::hasSelectedText ( ) const
+
+
+ +

Returns whether there is selected text.

+
See also:
selectedtext()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WLineEdit::maxLength ( ) const
+
+
+ +

Returns the maximum length of text that can be entered.

+
See also:
setMaxLength(int)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WLineEdit::selectedText ( ) const
+
+
+ +

Returns the currently selected text.

+

Returns an empty string if there is currently no selected text.

+
See also:
hasSelectedText()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WLineEdit::selectionStart ( ) const
+
+
+ +

Returns the current selection start.

+

Returns -1 if there is no selected text.

+
See also:
hasSelectedText(), selectedText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLineEdit::setEchoMode (EchoMode  echoMode )
+
+
+ +

Sets the echo mode.

+

The default echo mode is Normal.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLineEdit::setMaxLength (int  length )
+
+
+ +

Specifies the maximum length of text that can be entered.

+

A value <= 0 indicates that there is no limit.

+

The default value is -1.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLineEdit::setText (const WString text ) [virtual]
+
+
+ +

Sets the content of the line edit.

+

The default value is "".

+
See also:
text()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLineEdit::setTextSize (int  chars )
+
+
+ +

Specifies the width of the line edit in number of characters.

+

This specifies the width of the line edit that is roughly equivalent with chars characters. This does not limit the maximum length of a string that may be entered, which may be set using setMaxLength(int).

+

The default value is 10.

+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WLineEdit::text ( ) const
+
+
+ +

Returns the current content.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WLineEdit::textSize ( ) const
+
+
+ +

Returns the current width of the line edit in number of characters.

+
See also:
setTextSize(int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.map new file mode 100644 index 0000000..30ec7a8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.md5 new file mode 100644 index 0000000..9e0b6e2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.md5 @@ -0,0 +1 @@ +c2c278f82e8e1a6b27c5729c7aa2aee5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.png new file mode 100644 index 0000000..2831e68 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineEdit__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF-members.html new file mode 100644 index 0000000..3f9b2b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF-members.html @@ -0,0 +1,87 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLineF Member List

+
+
+This is the complete list of members for Wt::WLineF, including all inherited members. + + + + + + + + + +
p1() const Wt::WLineF
p2() const Wt::WLineF
WLineF()Wt::WLineF
WLineF(const WPointF &p1, const WPointF &p2)Wt::WLineF
WLineF(double x1, double y1, double x2, double y2)Wt::WLineF
x1() const Wt::WLineF
x2() const Wt::WLineF
y1() const Wt::WLineF
y2() const Wt::WLineF
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF.html new file mode 100644 index 0000000..52222b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLineF.html @@ -0,0 +1,326 @@ + + + + +Wt: Wt::WLineF Class Reference + + + + + + + + + +
+ +
+

Wt::WLineF Class Reference
+ +[Painting system] +

+
+
+ +

Utility class that defines a single line. +More...

+ +

#include <Wt/WLineF>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WLineF ()
 Default constructor.
 WLineF (const WPointF &p1, const WPointF &p2)
 Construct a line connecting two points.
 WLineF (double x1, double y1, double x2, double y2)
 Construct a line connecting two points.
double x1 () const
 Returns the X coordinate of the first point.
double y1 () const
 Returns the Y coordinate of the first point.
double x2 () const
 Returns the X coordinate of the second point.
double y2 () const
 Returns the Y coordinate of the second point.
WPointF p1 () const
 Returns the first point.
WPointF p2 () const
 Returns the second point.
+

Detailed Description

+

Utility class that defines a single line.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WLineF::WLineF ( )
+
+
+ +

Default constructor.

+

Constructs a line from (x1=0,y1=0) to (x2=0,y2=0).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WLineF::WLineF (const WPointF p1,
const WPointF p2 
)
+
+
+ +

Construct a line connecting two points.

+

Constructs a line from p1 to p2.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WLineF::WLineF (double  x1,
double  y1,
double  x2,
double  y2 
)
+
+
+ +

Construct a line connecting two points.

+

Constructs a line from (x1,y1) to (x2,y2).

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WPointF Wt::WLineF::p1 ( ) const
+
+
+ +

Returns the first point.

+
See also:
x1(), y1()
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WLineF::p2 ( ) const
+
+
+ +

Returns the second point.

+
See also:
x2(), y2()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLineF::x1 ( ) const
+
+
+ +

Returns the X coordinate of the first point.

+
See also:
y1(), p1()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLineF::x2 ( ) const
+
+
+ +

Returns the X coordinate of the second point.

+
See also:
y2(), p2()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLineF::y1 ( ) const
+
+
+ +

Returns the Y coordinate of the first point.

+
See also:
x1(), p1()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WLineF::y2 ( ) const
+
+
+ +

Returns the Y coordinate of the second point.

+
See also:
x2(), p2()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator-members.html new file mode 100644 index 0000000..c8e771d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLoadingIndicator Member List

+
+
+This is the complete list of members for Wt::WLoadingIndicator, including all inherited members. + + + +
setMessage(const WString &text)=0Wt::WLoadingIndicator [pure virtual]
widget()=0Wt::WLoadingIndicator [pure virtual]
~WLoadingIndicator()Wt::WLoadingIndicator [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator.html new file mode 100644 index 0000000..d686242 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator.html @@ -0,0 +1,180 @@ + + + + +Wt: Wt::WLoadingIndicator Class Reference + + + + + + + + + +
+ +
+

Wt::WLoadingIndicator Class Reference

+
+
+ +

An abstract interface for a loading indicator. +More...

+ +

#include <Wt/WLoadingIndicator>

+
+Inheritance diagram for Wt::WLoadingIndicator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

virtual ~WLoadingIndicator ()
 Destructor.
virtual WWidgetwidget ()=0
 Returns the widget that visually represents the indicator.
virtual void setMessage (const WString &text)=0
 Sets the message that you want to be displayed.
+

Detailed Description

+

An abstract interface for a loading indicator.

+

The loading indicator displays a message while a response from the server is pending.

+

By providing a custom implementation of this interface, you may use a custom loading indicator using WApplication::setLoadingIndicator(),instead of the default implementation (WDefaultLoadingIndicator).

+
See also:
WApplication::setLoadingIndicator()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WLoadingIndicator::~WLoadingIndicator ( ) [virtual]
+
+
+ +

Destructor.

+

The destructor must delete the widget().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void Wt::WLoadingIndicator::setMessage (const WString text ) [pure virtual]
+
+
+ +

Sets the message that you want to be displayed.

+

If the indicator is capable of displaying a text message, then you should reimplement this method to allow this message to be modified.

+ +

Implemented in Wt::WDefaultLoadingIndicator, and Wt::WOverlayLoadingIndicator.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WLoadingIndicator::widget ( ) [pure virtual]
+
+
+ +

Returns the widget that visually represents the indicator.

+

You should reimplement this method to return a widget that will be shown to indicate that a response is pending. The widget should be positioned using CSS.

+

The widget will be shown and hidden using WWidget::show() and WWidget::hide(). If you want to customize this behaviour, you should reimplement the WWidget::setHidden() method. Note that show() and hide() are stateless slots, and thus you need to make sure that your implementation comforms to that contract, so that it may be optimized to JavaScript (the server-side implementation will only be called during stateless slot prelearning).

+
Note:
The widget will not be added to the WApplication::root() container.
+ +

Implemented in Wt::WDefaultLoadingIndicator, and Wt::WOverlayLoadingIndicator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.map new file mode 100644 index 0000000..db2c0e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.md5 new file mode 100644 index 0000000..59a294f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.md5 @@ -0,0 +1 @@ +1665712de0daf39b302e96de0672fe3b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.png new file mode 100644 index 0000000..d9f4e71 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLoadingIndicator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings-members.html new file mode 100644 index 0000000..ca9f4c3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLocalizedStrings Member List

+
+
+This is the complete list of members for Wt::WLocalizedStrings, including all inherited members. + + + + +
hibernate()Wt::WLocalizedStrings [virtual]
refresh()Wt::WLocalizedStrings [virtual]
resolveKey(const std::string &key, std::string &result)=0Wt::WLocalizedStrings [pure virtual]
~WLocalizedStrings()Wt::WLocalizedStrings [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings.html new file mode 100644 index 0000000..a30d7cf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings.html @@ -0,0 +1,195 @@ + + + + +Wt: Wt::WLocalizedStrings Class Reference + + + + + + + + + +
+ +
+

Wt::WLocalizedStrings Class Reference

+
+
+ +

An abstract class that provides support for localized strings. +More...

+ +

#include <Wt/WLocalizedStrings>

+
+Inheritance diagram for Wt::WLocalizedStrings:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

+virtual ~WLocalizedStrings ()
 Destructor.
virtual void refresh ()
 Rereads the message resources.
virtual void hibernate ()
 Purges memory resources, if possible.
virtual bool resolveKey (const std::string &key, std::string &result)=0
 Resolves a key in the current locale.
+

Detailed Description

+

An abstract class that provides support for localized strings.

+

This abstract class provides the content to localized WStrings, by resolving the key to a string using the current application locale.

+
See also:
WString::tr(), WApplication::setLocalizedStrings()
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WLocalizedStrings::hibernate ( ) [virtual]
+
+
+ +

Purges memory resources, if possible.

+

This is called afer event handling, and is an opportunity to conserve memory inbetween events, by freeing memory used for cached key/value bindings, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented in Wt::WCombinedLocalizedStrings, and Wt::WMessageResourceBundle.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WLocalizedStrings::refresh ( ) [virtual]
+
+
+ +

Rereads the message resources.

+

Purge any cached key/values, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented in Wt::WCombinedLocalizedStrings, and Wt::WMessageResourceBundle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool Wt::WLocalizedStrings::resolveKey (const std::string &  key,
std::string &  result 
) [pure virtual]
+
+
+ +

Resolves a key in the current locale.

+

This method is used by WString to obtain the UTF8 value corresponding to a key in the current locale.

+

Returns true if the key could be resolved. The value is written in result, encoded using UTF8.

+
See also:
WApplication::locale()
+ +

Implemented in Wt::WCombinedLocalizedStrings, and Wt::WMessageResourceBundle.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.map new file mode 100644 index 0000000..4a0d1b8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.md5 new file mode 100644 index 0000000..2c04ca0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.md5 @@ -0,0 +1 @@ +056bc9a7c44377898909b905156d52bb \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.png new file mode 100644 index 0000000..1c8da2f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WLocalizedStrings__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry-members.html new file mode 100644 index 0000000..2adbdca --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry-members.html @@ -0,0 +1,85 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLogEntry Member List

+
+
+This is the complete list of members for Wt::WLogEntry, including all inherited members. + + + + + + + +
operator<<(const WLogger::Sep &)Wt::WLogEntry
operator<<(const WLogger::TimeStamp &)Wt::WLogEntry
operator<<(const char *)Wt::WLogEntry
operator<<(const std::string &)Wt::WLogEntry
operator<<(T t)Wt::WLogEntry
WLogEntry(const WLogEntry &from)Wt::WLogEntry
~WLogEntry()Wt::WLogEntry
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry.html new file mode 100644 index 0000000..d570044 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogEntry.html @@ -0,0 +1,180 @@ + + + + +Wt: Wt::WLogEntry Class Reference + + + + + + + + + +
+ +
+

Wt::WLogEntry Class Reference

+
+
+ +

A stream-like object for creating an entry in a log file. +More...

+ +

#include <Wt/WLogger>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 WLogEntry (const WLogEntry &from)
 Copy constructor.
~WLogEntry ()
 Destructor.
WLogEntryoperator<< (const WLogger::Sep &)
 Writes a field separator.
WLogEntryoperator<< (const WLogger::TimeStamp &)
 Writes a time stamp in the current field.
+WLogEntryoperator<< (const char *)
 Writes a string in the current field.
+WLogEntryoperator<< (const std::string &)
 Writes a string in the current field.
+template<typename T >
WLogEntryoperator<< (T t)
 Writes a number value in the current field.
+

Detailed Description

+

A stream-like object for creating an entry in a log file.

+

This class is returned by WLogger::entry() and creates a log entry using a stream-like interface.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WLogEntry::WLogEntry (const WLogEntry from )
+
+
+ +

Copy constructor.

+

Only the new object can be used, the original object is no longer valid.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WLogEntry & Wt::WLogEntry::operator<< (const WLogger::TimeStamp )
+
+
+ +

Writes a time stamp in the current field.

+

Formats a timestamp (date+time) to the current field.

+ +
+
+ +
+
+ + + + + + + + +
WLogEntry & Wt::WLogEntry::operator<< (const WLogger::Sep )
+
+
+ +

Writes a field separator.

+

You must separate fields in a single entry using the WLogger::sep constant.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger-members.html new file mode 100644 index 0000000..e5b7a60 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger-members.html @@ -0,0 +1,87 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLogger Member List

+
+
+This is the complete list of members for Wt::WLogger, including all inherited members. + + + + + + + + + +
addField(const std::string &name, bool isString)Wt::WLogger
entry() const Wt::WLogger
fields() const Wt::WLogger
sepWt::WLogger [static]
setFile(const std::string &path)Wt::WLogger
setStream(std::ostream &o)Wt::WLogger
timestampWt::WLogger [static]
WLogger()Wt::WLogger
~WLogger()Wt::WLogger
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger.html new file mode 100644 index 0000000..934e322 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger.html @@ -0,0 +1,275 @@ + + + + +Wt: Wt::WLogger Class Reference + + + + + + + + + +
+ +
+

Wt::WLogger Class Reference

+
+
+ +

A simple logging class. +More...

+ +

#include <Wt/WLogger>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Field
 Class that holds the configuration for a single field. More...
struct  Sep
 Class that indicates a field separator. More...
struct  TimeStamp
 Class that indicates a time stamp. More...

+Public Member Functions

WLogger ()
 Create a new logger.
~WLogger ()
 Destructor.
void setStream (std::ostream &o)
 Set the output stream.
void setFile (const std::string &path)
 Set the output file.
void addField (const std::string &name, bool isString)
 Add a field.
+const std::vector< Field > & fields () const
 Returns the field list.
WLogEntry entry () const
 Start a new log entry.

+Static Public Attributes

static const Sep sep = WLogger::Sep()
 Field separator constant.
static const TimeStamp timestamp = WLogger::TimeStamp()
 Timestamp field constant.
+

Detailed Description

+

A simple logging class.

+

This class logs events to a stream in a flexible way. It allows to create log files using the commonly used Common Log Format or Combined Log Format, but provides a general way for logging entries that consists of a fixed number of fields.

+

It is used by Wt to create the application log (WApplication::log()), and built-in httpd access log.

+

To use this class for custom logging, you should instantiate a logger, add one or more field definitions using addField(), and set an output stream using setStream() or setFile(). To stream data to the logger, use entry() to start formatting a new entry.

+

Usage example:

+
 // Setup the logger
+ Wt::WLogger logger;
+ logger.addField("datetime", false);
+ logger.addField("session", false);
+ logger.addField("type", false);
+ logger.addField("message", true);
+
+ logger.setFile("/tmp/mylog.txt");
+
+ // Add an entry
+ Wt::WLogEntry entry = logger.entry();
+ entry << Wt::WLogger::timestamp << Wt::WLogger::sep
+       << '[' << wApp->sessionId() << ']' << Wt::WLogger::sep
+       << '[' << "notice" << ']' << Wt::WLogger::sep
+       << "Succesfully started.";
+
See also:
WApplication::log()
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WLogger::addField (const std::string &  name,
bool  isString 
)
+
+
+ +

Add a field.

+

Add a field to the logger. When isString is true, values will be quoted.

+ +
+
+ +
+
+ + + + + + + +
WLogEntry Wt::WLogger::entry ( ) const
+
+
+ +

Start a new log entry.

+

Returns a new entry. The entry is logged in the destructor of the entry (i.e. when the entry goes out of scope).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLogger::setFile (const std::string &  path )
+
+
+ +

Set the output file.

+

Opens a file output stream for path.

+
See also:
setStream()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WLogger::setStream (std::ostream &  o )
+
+
+ +

Set the output stream.

+
See also:
setFile()
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
const WLogger::Sep Wt::WLogger::sep = WLogger::Sep() [static]
+
+
+ +

Field separator constant.

+
See also:
WLogEntry::operator<<(const WLogger::Sep&)
+ +
+
+ +
+ +
+ +

Timestamp field constant.

+
See also:
WLogEntry::operator<<(const WLogger::TimeStamp&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field-members.html new file mode 100644 index 0000000..b4b5969 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field-members.html @@ -0,0 +1,80 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WLogger::Field Member List

+
+
+This is the complete list of members for Wt::WLogger::Field, including all inherited members. + + +
isString() const Wt::WLogger::Field
name() const Wt::WLogger::Field
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field.html new file mode 100644 index 0000000..40019c5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WLogger_1_1Field.html @@ -0,0 +1,123 @@ + + + + +Wt: Wt::WLogger::Field Class Reference + + + + + + + + + +
+ +
+

Wt::WLogger::Field Class Reference

+
+
+ +

Class that holds the configuration for a single field. +More...

+ +

List of all members.

+ + + + + + +

+Public Member Functions

+std::string name () const
 Returns the field name.
bool isString () const
 Returns if the field is a quoted string.
+

Detailed Description

+

Class that holds the configuration for a single field.

+
See also:
addField()
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::WLogger::Field::isString ( ) const
+
+
+ +

Returns if the field is a quoted string.

+

String fields can contain white-space, and are therefore quoted in the log.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4-members.html new file mode 100644 index 0000000..c74b4c0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4-members.html @@ -0,0 +1,114 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMatrix4x4 Member List

+
+
+This is the complete list of members for Wt::WMatrix4x4, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
constData() constWt::WGenericMatrix< double, 4, 4 >
copyDataTo(double *data)Wt::WGenericMatrix< double, 4, 4 >
data()Wt::WGenericMatrix< double, 4, 4 >
data() constWt::WGenericMatrix< double, 4, 4 >
determinant() const Wt::WMatrix4x4
fill(doublevalue)Wt::WGenericMatrix< double, 4, 4 >
flipCoordinates()Wt::WMatrix4x4
frustum(double left, double right, double bottom, double top, double near, double far)Wt::WMatrix4x4
inverted(bool *invertible=0) const Wt::WMatrix4x4
isIdentity() constWt::WGenericMatrix< double, 4, 4 >
lookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)Wt::WMatrix4x4
operator!=(const WGenericMatrix< double, Rows, Cols > &rhs) constWt::WGenericMatrix< double, 4, 4 >
operator()(int row, int column) constWt::WGenericMatrix< double, 4, 4 >
operator()(int row, int column)Wt::WGenericMatrix< double, 4, 4 >
operator*=(const double &factor)Wt::WGenericMatrix< double, 4, 4 >
operator+=(const WGenericMatrix< double, Rows, Cols > &rhs)Wt::WGenericMatrix< double, 4, 4 >
operator-=(const WGenericMatrix< double, Rows, Cols > &rhs)Wt::WGenericMatrix< double, 4, 4 >
operator/=(const double &factor)Wt::WGenericMatrix< double, 4, 4 >
operator==(const WGenericMatrix< double, Rows, Cols > &rhs) constWt::WGenericMatrix< double, 4, 4 >
perspective(double angle, double aspect, double nearPlane, double farPlane)Wt::WMatrix4x4
rotate(double angle, double x, double y, double z)Wt::WMatrix4x4
scale(double xFactor, double yFactor)Wt::WMatrix4x4
scale(double x, double y, double z)Wt::WMatrix4x4
scale(double factor)Wt::WMatrix4x4
setToIdentity()Wt::WGenericMatrix< double, 4, 4 >
translate(double x, double y)Wt::WMatrix4x4
translate(double x, double y, double z)Wt::WMatrix4x4
transposed() constWt::WGenericMatrix< double, 4, 4 >
WGenericMatrix()Wt::WGenericMatrix< double, 4, 4 >
WGenericMatrix(const WGenericMatrix< double, Rows, Cols > &other)Wt::WGenericMatrix< double, 4, 4 >
WGenericMatrix(const double *elements)Wt::WGenericMatrix< double, 4, 4 > [explicit]
WMatrix4x4()Wt::WMatrix4x4
WMatrix4x4(const WMatrix4x4 &other)Wt::WMatrix4x4
WMatrix4x4(const WGenericMatrix< double, 4, 4 > &other)Wt::WMatrix4x4
WMatrix4x4(double *d)Wt::WMatrix4x4 [explicit]
WMatrix4x4(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)Wt::WMatrix4x4
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4.html new file mode 100644 index 0000000..dfbcd1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4.html @@ -0,0 +1,753 @@ + + + + +Wt: Wt::WMatrix4x4 Class Reference + + + + + + + + + +
+ +
+

Wt::WMatrix4x4 Class Reference

+
+
+ +

A 3D affine transformation matrix. +More...

+ +

#include <Wt/WMatrix4x4>

+
+Inheritance diagram for Wt::WMatrix4x4:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WMatrix4x4 ()
 Default constructor.
WMatrix4x4 (const WMatrix4x4 &other)
 Copy constructor.
 WMatrix4x4 (const WGenericMatrix< double, 4, 4 > &other)
 Construct for a WGenericMatrix.
 WMatrix4x4 (double *d)
 Constructs a matrix from an array of elements.
 WMatrix4x4 (double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)
 Construct a custom matrix by specifying the parameters.
+double determinant () const
 Returns the determinant.
void flipCoordinates ()
 Switch between left-hand and right-hand side coordinate systems.
void frustum (double left, double right, double bottom, double top, double near, double far)
 Construct a perspective projection matrix.
WMatrix4x4 inverted (bool *invertible=0) const
 Returns the inversion of this matrix, if invertible.
void lookAt (double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
 Apply a transformation to position a camera.
void perspective (double angle, double aspect, double nearPlane, double farPlane)
 Construct a perspective projection matrix for use in OpenGL.
void rotate (double angle, double x, double y, double z)
 Rotates the transformation around a random axis.
void scale (double xFactor, double yFactor)
 Scales the transformation.
void scale (double x, double y, double z)
 Scales the transformation.
void scale (double factor)
 Scales the transformation.
void translate (double x, double y)
 Translates the transformation.
void translate (double x, double y, double z)
 Translates the transformation.
+

Detailed Description

+

A 3D affine transformation matrix.

+

The matrix is a 4x4 matrix encoded using 16 parameters. The matrix stores its data internally in row order.

+

Normally, a transformation matrix (composed translation/rotation/scale, but without perspective) is of this form:

+
 m00 m01 m02 dx
+ m10 m11 m12 dy
+ m20 m21 m22 dz
+ 0   0   0   1
+

In this representation, dx, dy and dz (= m(0, 3), m(1, 3) and m(2, 3)) represent the translation components, and m(x, y) represent a 3D matrix that contains the scale, rotation (and skew) components. The matrix is also capable of representing perspective projections. In that case, the matrix will not match the form depicted above.

+

In order to calculate the transformed vector w of a 3D vector v by the transformation contained in matrix T, v will be left-multiplied by T:

+
 w = T * v;
+

In the formula above, v and w are homogenous 3D column vectors (x, y, z, w), equal to (x/w, y/w, z/w, 1). In normal use cases w is 1, except for vectors that were transformed by a perspective projection matrix.

+

The transformation is used to represent a tansformed coordinate system, and provides methods to rotate(), scale() or translate() this coordinate system.

+

This matrix class is matched to OpenGL's coordinate system and matrix notation. The rotate, translate, scale, lookAt, perspective, frustum and ortho methods of this class behave exactly like their OpenGL equivalents. The only difference is that the storage of this matrix is row-major, while OpenGL uses column-major. This should only be a concern if you need to access the raw data of the matrix, in which case you should use transposed().data() instead. When WWebGL uses this class, it sends the data in the correct order to the client.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WMatrix4x4::WMatrix4x4 ( )
+
+
+ +

Default constructor.

+

Creates the identity transformation matrix.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WMatrix4x4::WMatrix4x4 (const WGenericMatrix< double, 4, 4 > &  other )
+
+
+ +

Construct for a WGenericMatrix.

+

Creates the identity transformation matrix. As we inherit from WGenericMatrix, most overloaded operators create a WGenericMatrix. This implicit constructor ensures that you will not notice this.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WMatrix4x4::WMatrix4x4 (double *  d ) [explicit]
+
+
+ +

Constructs a matrix from an array of elements.

+

The input array is assumed to be in row-major order. If elements is 0, the matrix is not initialized.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WMatrix4x4::WMatrix4x4 (double  m11,
double  m12,
double  m13,
double  m14,
double  m21,
double  m22,
double  m23,
double  m24,
double  m31,
double  m32,
double  m33,
double  m34,
double  m41,
double  m42,
double  m43,
double  m44 
)
+
+
+ +

Construct a custom matrix by specifying the parameters.

+

Creates a matrix from the specified parameters.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WMatrix4x4::flipCoordinates ( )
+
+
+ +

Switch between left-hand and right-hand side coordinate systems.

+

Equivalent to scale(1, -1, -1)

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::frustum (double  left,
double  right,
double  bottom,
double  top,
double  near,
double  far 
)
+
+
+ +

Construct a perspective projection matrix.

+

This function constructs a perspective projection where the camera is located in the origin. The visible volume is determined by whatever that is visible when looking from the origin through the rectangular 'window' defined by the coordinates (l, b, n) and (r, t, n) (parallel to the XY plane). The zone is further delimited by the near and the far clipping planes.

+

The perspective matrix (P) is right-multiplied with the current transformation matrix (M): M * P. Usually, you will want M to be the identity matrix when using this method.

+ +
+
+ +
+
+ + + + + + + + +
WMatrix4x4 WMatrix4x4::inverted (bool *  invertible = 0 ) const
+
+
+ +

Returns the inversion of this matrix, if invertible.

+

If invertible is not 0, it will contain a bool that indicates if the operation succeeded and the inverse matrix is returned. Else, this method returns the unit matrix.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::lookAt (double  eyeX,
double  eyeY,
double  eyeZ,
double  centerX,
double  centerY,
double  centerZ,
double  upX,
double  upY,
double  upZ 
)
+
+
+ +

Apply a transformation to position a camera.

+

(eyeX, eyeY, eyeZ) is the position of the camera.

+

The camera looks at (centerX, centerY, centerZ).

+

(upX, upY, upZ) is a vector that is the direction of the up vector.

+

This method applies a rotation and translation transformation to the current matrix so that the given eye becomes (0, 0, 0), the center point is on the negative Z axis, and the up vector lies in the X=0 plane, with its Y component in the positive Y axis direction.

+

The up vector must not be parallel to the line between eye and center. The vectors will be normalized and are not required to be perpendicular.

+

If the lookat transformation matrix is M, and the current value of the Matrix4x4 matrix is T, the resulting matrix after lookAt returns will be M * T.

+

This matrix is often used in conjunction with the perspective() method:

+
 // First, apply the lookAt transformation
+ projectionMatrix.lookAt(1, 1, 1, 0, 0, 0, 0, 1, 0);
+ // Then apply some perspective
+ projectionMatrix.perspective(90, aspect, 0.1, 10);
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::perspective (double  angle,
double  aspect,
double  nearPlane,
double  farPlane 
)
+
+
+ +

Construct a perspective projection matrix for use in OpenGL.

+

The camera is located in the origin and look in the direction of the negative Z axis.

+

Angle is the vertical view angle, in degrees. Aspect is the aspect ratio of the viewport, and near and far are the distances of the front and rear clipping plane from the camera.

+

The perspective matrix (P) is right-multiplied with the current transformation matrix (M): M * P. Usually, you will want M to be the identity matrix when using this method.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::rotate (double  angle,
double  x,
double  y,
double  z 
)
+
+
+ +

Rotates the transformation around a random axis.

+

Applies a rotation to the current transformation matrix, over angle degrees. The current matrix (M) is right-multiplied by the rotation matrix: M = M * R

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::scale (double  x,
double  y,
double  z 
)
+
+
+ +

Scales the transformation.

+

Equivalent to M * S where M is the current transformation and S is

+
 x 0 0 0
+ 0 y 0 0
+ 0 0 z 0
+ 0 0 0 1
+
+
+
+ +
+
+ + + + + + + + +
void Wt::WMatrix4x4::scale (double  factor )
+
+
+ +

Scales the transformation.

+

Equivalent to scale(factor, factor, factor);

+
See also:
scale(double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::scale (double  xFactor,
double  yFactor 
)
+
+
+ +

Scales the transformation.

+

Equivalent to scale(xFactor, yFactor, 1);

+
See also:
scale(double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::translate (double  x,
double  y,
double  z 
)
+
+
+ +

Translates the transformation.

+

Translates the current transformation.

+

Equivalent to M * T where M is the current transformation matrix and T is:

+
 1 0 0 x
+ 0 1 0 y
+ 0 0 1 z
+ 0 0 0 1
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMatrix4x4::translate (double  x,
double  y 
)
+
+
+ +

Translates the transformation.

+

Equivalent to translate(x, y, 0)

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.map new file mode 100644 index 0000000..a62b3bd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.md5 new file mode 100644 index 0000000..76416a9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.md5 @@ -0,0 +1 @@ +d8e9fd09e95fec87e6b20fee031d6412 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.png new file mode 100644 index 0000000..930af69 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMatrix4x4__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource-members.html new file mode 100644 index 0000000..e13ea19 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource-members.html @@ -0,0 +1,117 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMemoryResource Member List

+
+
+This is the complete list of members for Wt::WMemoryResource, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
children() const Wt::WObject
dataChanged()Wt::WResource
dataReceived()Wt::WResource
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::WMemoryResource [private, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
internalPath() const Wt::WResource
Method typedefWt::WObject
mimeType() const Wt::WMemoryResource
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged()Wt::WResource
setData(const std::vector< unsigned char > &data)Wt::WMemoryResource
setData(const unsigned char *data, int count)Wt::WMemoryResource
setInternalPath(const std::string &path)Wt::WResource
setMimeType(const std::string &mimeType)Wt::WMemoryResource
setObjectName(const std::string &name)Wt::WObject
setUploadProgress(bool enabled)Wt::WResource
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
url() const Wt::WResource
WMemoryResource(WObject *parent=0)Wt::WMemoryResource
WMemoryResource(const std::string &mimeType, WObject *parent=0)Wt::WMemoryResource
WMemoryResource(const std::string &mimeType, const std::vector< unsigned char > &data, WObject *parent=0)Wt::WMemoryResource
WObject(WObject *parent=0)Wt::WObject
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~WObject()Wt::WObject [virtual]
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource.html new file mode 100644 index 0000000..a1b012a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource.html @@ -0,0 +1,259 @@ + + + + +Wt: Wt::WMemoryResource Class Reference + + + + + + + + + +
+ +
+

Wt::WMemoryResource Class Reference

+
+
+ +

A resource which streams data from memory. +More...

+ +

#include <Wt/WMemoryResource>

+
+Inheritance diagram for Wt::WMemoryResource:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WMemoryResource (WObject *parent=0)
 Creates a new resource.
 WMemoryResource (const std::string &mimeType, WObject *parent=0)
 Creates a new resource with given mime-type.
WMemoryResource (const std::string &mimeType, const std::vector< unsigned char > &data, WObject *parent=0)
 Creates a new resource with given mime-type and data.
+void setData (const std::vector< unsigned char > &data)
 Sets new data for the resource to serve.
void setData (const unsigned char *data, int count)
 Sets new data for the resource to serve.
+const std::string mimeType () const
 Returns the mime-type.
+void setMimeType (const std::string &mimeType)
 Sets the mime-type.

+Private Member Functions

virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.
+

Detailed Description

+

A resource which streams data from memory.

+

Use this resource if you want to serve resource data from memory. This is suitable for relatively small resources, which still require some computation.

+

If creating the data requires computation which you would like to post-pone until the resource is served, then you may want to directly reimplement WResource instead and compute the data on the fly while streaming.

+

Usage examples:

+
 Wt::WMemoryResource *imageResource = new Wt::WMemoryResource("image/gif", this);
+
+ static const unsigned char gifData[]
+    = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00,
+        0x80, 0x00, 0x00, 0xdb, 0xdf, 0xef, 0x00, 0x00, 0x00, 0x21,
+        0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
+        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44,
+        0x01, 0x00, 0x3b };
+
+ imageResource->setData(gifData, 43);
+ Wt::WImage *image = new Wt::WImage(imageResource, "1 transparent pixel");
+
See also:
WFileResource.
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WMemoryResource::WMemoryResource (WObject parent = 0 )
+
+
+ +

Creates a new resource.

+

You must call setMimeType() and setData() before using the resource.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WMemoryResource::WMemoryResource (const std::string &  mimeType,
WObject parent = 0 
)
+
+
+ +

Creates a new resource with given mime-type.

+

You must call setData() before using the resource.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMemoryResource::handleRequest (const Http::Request request,
Http::Response response 
) [private, virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMemoryResource::setData (const unsigned char *  data,
int  count 
)
+
+
+ +

Sets new data for the resource to serve.

+

Sets the data from using the first count bytes from the C-style data array.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.map new file mode 100644 index 0000000..b549919 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.md5 new file mode 100644 index 0000000..b6c5dcb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.md5 @@ -0,0 +1 @@ +7f7660187913a08979818011c608afcc \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.png new file mode 100644 index 0000000..bd87e7c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMemoryResource__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu-members.html new file mode 100644 index 0000000..58dd316 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu-members.html @@ -0,0 +1,211 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMenu Member List

+
+
+This is the complete list of members for Wt::WMenu, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &name, WWidget *contents, WMenuItem::LoadPolicy policy=WMenuItem::LazyLoading)Wt::WMenu
addItem(WMenuItem *item)Wt::WMenu
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
close(WMenuItem *item)Wt::WMenu
close(int index)Wt::WMenu
contentsStack() const Wt::WMenu
currentIndex() const Wt::WMenu
currentItem() const Wt::WMenu
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WMenu [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
internalBasePath() const Wt::WMenu
internalPathChanged(const std::string &path)Wt::WMenu [protected, virtual]
internalPathEnabled() const Wt::WMenu
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isItemDisabled(WMenuItem *item) const Wt::WMenu
isItemDisabled(int index) const Wt::WMenu
isItemHidden(WMenuItem *item) const Wt::WMenu
isItemHidden(int index) const Wt::WMenu
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
itemClosed()Wt::WMenu
items() const Wt::WMenu
itemSelected()Wt::WMenu
itemSelectRendered()Wt::WMenu
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
nextAfterHide(int index)Wt::WMenu [protected, virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
orientation() const Wt::WMenu
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeItem(WMenuItem *item)Wt::WMenu
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
renderAsList() const Wt::WMenu
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
select(WMenuItem *item)Wt::WMenu
select(int index)Wt::WMenu
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setInternalBasePath(const std::string &basePath)Wt::WMenu
setInternalPathEnabled(const std::string &basePath="")Wt::WMenu
setItemDisabled(WMenuItem *item, bool disabled)Wt::WMenu
setItemDisabled(int index, bool disabled)Wt::WMenu
setItemHidden(WMenuItem *item, bool hidden)Wt::WMenu
setItemHidden(int index, bool hidden)Wt::WMenu
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setRenderAsList(bool enable)Wt::WMenu
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WMenu(Orientation orientation, WContainerWidget *parent=0)Wt::WMenu
WMenu(WStackedWidget *contentsStack, Orientation orientation, WContainerWidget *parent=0)Wt::WMenu
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WMenu()Wt::WMenu
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu.html new file mode 100644 index 0000000..33fc798 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu.html @@ -0,0 +1,1067 @@ + + + + +Wt: Wt::WMenu Class Reference + + + + + + + + + +
+ +
+

Wt::WMenu Class Reference

+
+
+ +

A widget that shows a menu of options. +More...

+ +

#include <Wt/WMenu>

+
+Inheritance diagram for Wt::WMenu:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WMenu (Orientation orientation, WContainerWidget *parent=0)
 Creates a new menu.
 WMenu (WStackedWidget *contentsStack, Orientation orientation, WContainerWidget *parent=0)
 Creates a new menu.
~WMenu ()
 Destructor.
WMenuItemaddItem (const WString &name, WWidget *contents, WMenuItem::LoadPolicy policy=WMenuItem::LazyLoading)
 Adds an item.
WMenuItemaddItem (WMenuItem *item)
 Adds an item.
void removeItem (WMenuItem *item)
 Removes an item.
void select (WMenuItem *item)
 Selects an item.
void select (int index)
 Selects an item.
Signal< WMenuItem * > & itemSelected ()
 Signal which indicates that a new item was selected.
Signal< WMenuItem * > & itemSelectRendered ()
 Signal which indicates that a new selected item is rendered.
void close (WMenuItem *item)
 Closes an item.
void close (int index)
 Closes an item.
const std::vector< WMenuItem * > & items () const
 Returns the items.
Signal< WMenuItem * > & itemClosed ()
 Signal which indicates that an item was closed.
void setItemHidden (WMenuItem *item, bool hidden)
 Hides an item.
void setItemHidden (int index, bool hidden)
 Hides an item.
bool isItemHidden (WMenuItem *item) const
 Returns whether the item widget of the given item is hidden.
bool isItemHidden (int index) const
 Returns whether the item widget of the given index is hidden.
void setItemDisabled (WMenuItem *item, bool disabled)
 Disables an item.
void setItemDisabled (int index, bool disabled)
 Disables an item.
bool isItemDisabled (WMenuItem *item) const
 Returns whether the item widget of the given item is disabled.
bool isItemDisabled (int index) const
 Returns whether the item widget of the given index is disabled.
WMenuItemcurrentItem () const
 Returns the currently selected item.
int currentIndex () const
 Returns the index of the currently selected item.
Orientation orientation () const
 Returns the orientation.
void setRenderAsList (bool enable)
 Renders using an HTML list.
bool renderAsList () const
 Returns whether the menu is rendered as an HTML list.
void setInternalPathEnabled (const std::string &basePath="")
 Enables internal paths for items.
bool internalPathEnabled () const
 Returns whether the menu generates internal paths entries.
void setInternalBasePath (const std::string &basePath)
 Sets the internal base path.
const std::string & internalBasePath () const
 Returns the internal base path.
+WStackedWidgetcontentsStack () const
 Returns the contents stack associated with the menu.

+Protected Member Functions

virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
virtual void internalPathChanged (const std::string &path)
 Handling of internal path changes.
virtual int nextAfterHide (int index)
 Returns the index of the item to be selected after hides.
+

Detailed Description

+

A widget that shows a menu of options.

+

The WMenu widget offers menu navigation.

+

Typically, a menu is used in conjunction with a WStackedWidget (but can be used without too), where different 'contents' are stacked upon each other. Each choice in the menu (which is implemented as a WMenuItem) corresponds to a tab in the contents stack. The contents stack may contain other items, and could be shared with other WMenu instances.

+

When used without a contents stack, you can react to menu item selection using the itemSelected() signal, to implement some custom handling of item selection.

+

Usage example:

+
 // create the stack where the contents will be located
+ Wt::WStackedWidget *contents = new Wt::WStackedWidget(contentsParent);
+
+ // create a menu
+ Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical, menuParent);
+ menu->setRenderAsList(true);
+
+ // add four items using the default lazy loading policy.
+ menu->addItem("Introduction", new Wt::WText("intro"));
+ menu->addItem("Download", new Wt::WText("Not yet available"));
+ menu->addItem("Demo", new DemoWidget());
+ menu->addItem(new Wt::WMenuItem("Demo2", new DemoWidget()));
+

Historically, a menu was implemented as a table, but rendering as a list (<ul>) is preferred, as it is the norm form implementations.

+

After contruction, the first entry will be selected. At any time, it is possible to select a particular item using select().

+

Each item of WMenu may be closeable (see WMenuItem::setCloseable(bool). Like selection, at any time, it is possible to close a particular item using close(). You can react to close of item by using the itemClosed() signal.

+

The WMenu implementation offers fine-grained control on how contents should be preloaded. By default, all contents is lazy-loaded, only when needed. To improve response time, an item may also be preloaded (using addItem()). In that case, the item will be loaded in the background, before its first use. In any case, once the contents corresponding to a menu item is loaded, subsequent navigation to it is handled entirely client-side.

+

The WMenu may participate in the application's internal path, which lets menu items correspond to internal URLs, see setInternalPathEnabled().

+

The layout of the menu may be Horizontal or Vertical. The look of the items may be defined through style sheets. The default WMenuItem implementation uses four style classes to distinguish between inactivated, activated, closeable inactivated and closeable activated menu items: "item", "itemselected", "citem", "citemselected". By using CSS nested selectors, a different style may be defined for items in a different menu.

+

You may customize the rendering and behaviour of menu entries by specializing WMenuItem.

+

CSS

+

Styling a menu will be different depending of the rendering mode (table, list). Conventionally, menus like this are styled as a list (setRenderAsList()).

+

You will want to differentiate between unselected and selected items based on the "item" and "itemselected" style classes as well as between unselected and selected closeable items based on the "citem" and "citemselected" style classes.

+

For menus without closeable items a styling is pretty simple. For example, assuming you set a "menu" style class for your menu, you can style the items using:

+
.menu * .item {
+  cursor: pointer; cursor: hand;
+  color: blue;
+  text-decoration: underline;
+}
+
+.menu * .itemselected {
+  color: blue;
+  text-decoration: underline;
+  font-weight: bold;  
+}
+

For menus which supports closing and/or enabling disabling of items, the styling is more complex. The close icon is styled by the current CSS theme and can be overriden by using "Wt-closeicon" CSS class. The look of the menu, assuming the default implementation for WMenuItem, can be customized by using the following selectors (again assuming a menu with as styleclass "menu"):

+
+.Wt-closeicon                     : a close icon
+
+.menu                             : the list (you custom menu class)
+.menu li                          : a list item
+.menu span                        : spans of a list item
+
+# not closable items:
+.menu a.item span                 : the inner span of the label of an enabled item
+.menu span.item                   : the label of a disabled item
+.menu a.itemselected span         : the inner span the label of an enabled selected item
+.menu span.itemselected           : the label of a disabled selected item
+
+# closable items:
+.menu .citem a.label span         : the inner span of the label of an enabled item
+.menu .citem span.label           : the label of a disabled item
+.menu .citemselected a.label span : the inner span the label of an enabled selected item
+.menu .citemselected span.label   : the label of a disabled selected item
+

Example of styling a menu with closeable items:

+
.menu {
+  overflow: auto;
+}
+
+.menu li {
+  display: inline;
+}
+
+.menu span {
+  display: block; float: left;
+}
+
+.menu a.item span {
+  cursor: pointer; cursor: hand;
+  color: blue;
+  margin-right: 5px;
+}
+
+.menu span.item {
+  color: gray;
+  margin-right: 5px;
+}
+
+.menu a.itemselected span {
+  color: black;
+  font-weight: bold;
+  text-decoration: none;
+  margin-right: 5px;
+}
+
+.menu span.itemselected {
+  color: gray;
+  font-weight: bold;
+  text-decoration: none;
+  margin-right: 5px;
+}
+
+.menu .citem a.label span {
+  cursor: pointer; cursor: hand;
+  color: blue;
+}
+
+.menu .citem span.label {
+  color: gray;
+}
+
+.menu .citemselected a.label span {
+  color: black;
+  font-weight: bold;
+  text-decoration: none;
+}
+
+.menu .citemselected span.label {
+  color: gray;
+  font-weight: bold;
+  text-decoration: none;
+}
+
See also:
WMenuItem
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WMenu::WMenu (Orientation  orientation,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a new menu.

+

Construct a menu with given orientation. The menu is not associated with a contents stack, and thus you will want to react to the itemSelected() signal to react to menu changes.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WMenu::WMenu (WStackedWidget contentsStack,
Orientation  orientation,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a new menu.

+

Construct a menu to manage the widgets in contentsStack, and sets the menu orientation.

+

Each menu item will manage a single widget in the contentsStack, making it the current widget when the menu item is activated.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WMenuItem * Wt::WMenu::addItem (const WString name,
WWidget contents,
WMenuItem::LoadPolicy  policy = WMenuItem::LazyLoading 
)
+
+
+ +

Adds an item.

+

Adds a menu item with given contents, which is added to the menu's associated contents stack.

+

contents may be 0 for two reasons:

+
    +
  • if the menu is not associated with a contents stack, then you cannot associate a menu item with a contents widget
  • +
  • or, you may have one or more items which which are not associated with a contents widget in the contents stack.
  • +
+

Returns the corresponding WMenuItem.

+
See also:
addItem(WMenuItem *)
+ +
+
+ +
+
+ + + + + + + + +
WMenuItem * Wt::WMenu::addItem (WMenuItem item )
+
+
+ +

Adds an item.

+

Adds a menu item. Use this form to add specialized WMenuItem implementations.

+
See also:
addItem(const WString&, WWidget *, WMenuItem::LoadPolicy)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::close (WMenuItem item )
+
+
+ +

Closes an item.

+

Close the menu item item. Only closeable items can be closed.

+
See also:
close(int), WMenuItem::close()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::close (int  index )
+
+
+ +

Closes an item.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
close(WMenuItem *)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WMenu::currentIndex ( ) const
+
+
+ +

Returns the index of the currently selected item.

+
See also:
currentItem(), select(int)
+ +
+
+ +
+
+ + + + + + + +
WMenuItem * Wt::WMenu::currentItem ( ) const
+
+
+ +

Returns the currently selected item.

+
See also:
currentIndex(), select(WMenuItem *)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenu::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WMenu::internalBasePath ( ) const
+
+
+ +

Returns the internal base path.

+

The default value is the application's internalPath (WApplication::internalPath()) that was recorded when setInternalPathEnabled() was called, and together with each WMenuItem::pathComponent() determines the paths for each item.

+

For example, if internalBasePath() is "/examples/" and pathComponent() for a particular item is "charts/", then the internal path for that item will be "/examples/charts/".

+
See also:
setInternalPathEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::internalPathChanged (const std::string &  path ) [protected, virtual]
+
+
+ +

Handling of internal path changes.

+

This methods makes the menu react to internal path changes (and also the initial internal path).

+

You may want to reimplement this if you want to customize the internal path handling.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMenu::internalPathEnabled ( ) const
+
+
+ +

Returns whether the menu generates internal paths entries.

+
See also:
setInternalPathEnabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WMenu::isItemDisabled (WMenuItem item ) const
+
+
+ +

Returns whether the item widget of the given item is disabled.

+
See also:
setItemDisabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WMenu::isItemDisabled (int  index ) const
+
+
+ +

Returns whether the item widget of the given index is disabled.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
setItemDisabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WMenu::isItemHidden (WMenuItem item ) const
+
+
+ +

Returns whether the item widget of the given item is hidden.

+
See also:
setItemHidden()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WMenu::isItemHidden (int  index ) const
+
+
+ +

Returns whether the item widget of the given index is hidden.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
setItemHidden()
+ +
+
+ +
+
+ + + + + + + +
Signal<WMenuItem *>& Wt::WMenu::itemClosed ( )
+
+
+ +

Signal which indicates that an item was closed.

+

This signal is emitted when an item was closed. It is emitted both when the user closes an item, or when close() was invoked.

+ +
+
+ +
+
+ + + + + + + +
const std::vector<WMenuItem *>& Wt::WMenu::items ( ) const
+
+
+ +

Returns the items.

+

Returns the list of menu items in this menu.

+ +
+
+ +
+
+ + + + + + + +
Signal<WMenuItem *>& Wt::WMenu::itemSelected ( )
+
+
+ +

Signal which indicates that a new item was selected.

+

This signal is emitted when an item was selected. It is emitted both when the user activated an item, or when select() was invoked.

+
See also:
itemSelectRendered()
+ +
+
+ +
+
+ + + + + + + +
Signal<WMenuItem *>& Wt::WMenu::itemSelectRendered ( )
+
+
+ +

Signal which indicates that a new selected item is rendered.

+

This signal is similar to itemSelected, but is emitted from within a stateless slot. Therefore, any slot connected to this signal will be optimized to client-side JavaScript, and must support the contract of a stateless slot (i.e., be idempotent).

+

If you are unsure what is the difference with the itemSelected signal, you'll probably need the latter instead.

+
See also:
itemSelected()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WMenu::nextAfterHide (int  index ) [protected, virtual]
+
+
+ +

Returns the index of the item to be selected after hides.

+

Returns the index of the item to be selected after the item with given index will be hidden.

+

By default, if the given index is an index of currently selected item, returns an index of the first visible item to the right of it. If it is not found, returns the index of the first visible item to the left of it. If there are no visible items around the currently selected item, returns the index of currently selected item.

+

You may want to reimplement this if you want to customize the algorithm of determining the index of the item to be selected after hiding the item with given index.

+ +
+
+ +
+
+ + + + + + + +
Orientation Wt::WMenu::orientation ( ) const
+
+
+ +

Returns the orientation.

+

The orientation is set at time of construction.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::removeItem (WMenuItem item )
+
+
+ +

Removes an item.

+

Removes the given item. The item and its contents is not deleted.

+
See also:
addItem()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMenu::renderAsList ( ) const
+
+
+ +

Returns whether the menu is rendered as an HTML list.

+
See also:
setRenderAsList(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::select (WMenuItem item )
+
+
+ +

Selects an item.

+

Select the menu item item.

+
See also:
select(int), currentItem(), WMenuItem::select()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::select (int  index )
+
+
+ +

Selects an item.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
select(WMenuItem *), currentIndex()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::setInternalBasePath (const std::string &  basePath )
+
+
+ +

Sets the internal base path.

+

A '/' is appended to turn it into a folder, if needed.

+
See also:
setInternalPathEnabled(), internalBasePath()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::setInternalPathEnabled (const std::string &  basePath = "" )
+
+
+ +

Enables internal paths for items.

+

The menu participates in the internal path by changing the internal path when an item has been selected, and listening for path changes to react to path selections. As a consequence this allows the user to bookmark the current menu selection and revisit it later, use back/forward buttons to navigate through history of visited menu items, and allows indexing of pages.

+

For each menu item, WMenuItem::pathComponent() is appended to the internal base path (internalBasePath()), which defaults to the internal path (WApplication::internalPath()) but may be changed using setInternalBasePath(), with a '/' appended to turn it into a folder, if needed.

+

By default, menu interaction does not change the application internal path.

+
See also:
WMenuItem::setPathComponent().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMenu::setItemDisabled (WMenuItem item,
bool  disabled 
)
+
+
+ +

Disables an item.

+

Disables the menu item item. Only an item that is enabled can be selected. By default, all menu items are enabled.

+
See also:
setItemDisabled(int, bool), WMenuItem::setDisabled()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMenu::setItemDisabled (int  index,
bool  disabled 
)
+
+
+ +

Disables an item.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
setItemDisabled(WMenuItem *, bool)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMenu::setItemHidden (WMenuItem item,
bool  hidden 
)
+
+
+ +

Hides an item.

+

Hides the menu item item. By default, all menu items are visible.

+

If the item was currently selected, then the next item to be selected is determined by nextAfterHide().

+
See also:
setItemHidden(int, bool), WMenuItem::hide()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMenu::setItemHidden (int  index,
bool  hidden 
)
+
+
+ +

Hides an item.

+

Menu items in a menu with N items are numbered from 0 to N - 1.

+
See also:
setItemHidden(WMenuItem *, bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenu::setRenderAsList (bool  enable )
+
+
+ +

Renders using an HTML list.

+

By default, the the menu is rendered using an HTML <table> element for layout. Setting this option enables rendering using <ul> and <il> elements, as is commonly done for CSS-based designs.

+
Note:
You cannot use this method after items have been added to the menu.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem-members.html new file mode 100644 index 0000000..70461ea --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem-members.html @@ -0,0 +1,127 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMenuItem Member List

+
+
+This is the complete list of members for Wt::WMenuItem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
activateSignal()Wt::WMenuItem [protected, virtual]
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
close()Wt::WMenuItem
closeSignal()Wt::WMenuItem [protected, virtual]
contents() const Wt::WMenuItem
createItemWidget()Wt::WMenuItem [protected, virtual]
disable()Wt::WMenuItem
enable()Wt::WMenuItem
enableAjax()Wt::WMenuItem [protected, virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hide()Wt::WMenuItem
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCloseable() const Wt::WMenuItem
isDisabled() const Wt::WMenuItem
isHidden() const Wt::WMenuItem
itemWidget()Wt::WMenuItem
LazyLoading enum valueWt::WMenuItem
LoadPolicy enum nameWt::WMenuItem
menu() const Wt::WMenuItem
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
pathComponent() const Wt::WMenuItem [virtual]
PreLoading enum valueWt::WMenuItem
removeChild(WObject *child)Wt::WObject
renderHidden(bool hidden)Wt::WMenuItem [protected, virtual]
renderSelected(bool selected)Wt::WMenuItem [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
select()Wt::WMenuItem
sender()Wt::WObject [protected, static]
setCloseable(bool closeable)Wt::WMenuItem
setDisabled(bool disabled)Wt::WMenuItem
setHidden(bool hidden)Wt::WMenuItem
setObjectName(const std::string &name)Wt::WObject
setPathComponent(const std::string &path)Wt::WMenuItem
setText(const WString &text)Wt::WMenuItem
setToolTip(const WString &tip)Wt::WMenuItem
show()Wt::WMenuItem
text() const Wt::WMenuItem
toolTip() const Wt::WMenuItem
updateItemWidget(WWidget *itemWidget)Wt::WMenuItem [protected, virtual]
WMenuItem(const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)Wt::WMenuItem
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem.html new file mode 100644 index 0000000..2f4e785 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem.html @@ -0,0 +1,797 @@ + + + + +Wt: Wt::WMenuItem Class Reference + + + + + + + + + +
+ +
+

Wt::WMenuItem Class Reference

+
+
+ +

A single item in a menu. +More...

+
+Inheritance diagram for Wt::WMenuItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  LoadPolicy { LazyLoading, +PreLoading + }
 

Enumeration that determines when contents should be loaded.

+ More...

+Public Member Functions

 WMenuItem (const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)
 Creates a new item.
void setText (const WString &text)
 Sets the text for this item.
const WStringtext () const
 Returns the text for this item.
void setPathComponent (const std::string &path)
 Sets the path component for this item.
virtual std::string pathComponent () const
 Returns the path component for this item.
void setCloseable (bool closeable)
 Make it possible to close this item interactively or by close().
bool isCloseable () const
 Returns whether the item is closeable.
void close ()
 Closes this item.
void setHidden (bool hidden)
 Sets whether the item widget is hidden.
bool isHidden () const
 Returns whether the item widget is hidden.
void hide ()
 Hides the item widget.
void show ()
 Shows the item widget.
void setDisabled (bool disabled)
 Enables or disables an item.
bool isDisabled () const
 Returns whether an item is enabled.
void enable ()
 Enables the item.
void disable ()
 Disables the item.
void setToolTip (const WString &tip)
 Sets a tooltip.
+const WStringtoolTip () const
 Returns the tooltip.
+WMenumenu () const
 Returns the menu.
WWidgetcontents () const
 Returns the contents widget for this item.
WWidgetitemWidget ()
 Returns the widget that represents the item.
void select ()
 Selects this item.

+Protected Member Functions

virtual WWidgetcreateItemWidget ()
 Creates the widget that represents the item.
virtual void updateItemWidget (WWidget *itemWidget)
 Updates the widget that represents the item.
virtual void renderSelected (bool selected)
 Renders the item as selected or unselected.
virtual void renderHidden (bool hidden)
 Renders the item as hidden or closed.
virtual SignalBaseactivateSignal ()
 Returns the signal used to activate the item.
virtual SignalBasecloseSignal ()
 Returns the signal used to close the item.
virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A single item in a menu.

+

The item determines the look and behaviour of a single item in a WMenu.

+

By default, for enabled menu items a WMenuItem uses a WAnchor widget. For disabled menu items it uses a WText widget. If item is closeable, WMenuItem puts these widgets and extra WText widget (for a close icon) in a WContainerWidget. When the menu participates in application internal paths (see WMenu::setInternalPathEnabled()), the anchor references the bookmark URL corresponding to the pathComponent() for the item (see WApplication::bookmarkUrl()).

+

To provide another look for the menu items (such as perhaps adding an icon), you can specialize this class, and reimplement the virtual methods:

+ +

To provide another look for the close icon you can override Wt-closeicon CSS class (see WMenu for more details).

+
See also:
WMenu
+
+WMenu::addItem(WMenuItem *)
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WMenuItem::LoadPolicy
+
+
+ +

Enumeration that determines when contents should be loaded.

+
Enumerator:
+ + +
LazyLoading  +

Lazy loading: on first use.

+
PreLoading  +

Pre-loading: before first use.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WMenuItem::WMenuItem (const WString text,
WWidget contents,
LoadPolicy  policy = LazyLoading 
)
+
+
+ +

Creates a new item.

+

The text specifies the item text. The contents is the widget that must be shown in the WMenu contents stack when the item is selected.

+

The load policy specifies whether the contents widgets is transmitted only when it the item is activated for the first time (LazyLoading) or transmitted prior to first rendering.

+

The pathComponent() is derived from text, and can be customized using setPathComponent().

+

contents may be 0, in which case no contents is associated with the item in the contents stack.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
SignalBase & Wt::WMenuItem::activateSignal ( ) [protected, virtual]
+
+
+ +

Returns the signal used to activate the item.

+

The default implementation will tries to cast the itemWidget() or its first child if item is closeable to a WInteractWidget and returns the clicked signal.

+ +

Reimplemented in Wt::WSubMenuItem.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::close ( )
+
+
+ +

Closes this item.

+

Hides the item widget and emits WMenu::itemClosed() signal. Only closeable items can be closed.

+
See also:
setCloseable(), hide()
+ +
+
+ +
+
+ + + + + + + +
SignalBase & Wt::WMenuItem::closeSignal ( ) [protected, virtual]
+
+
+ +

Returns the signal used to close the item.

+

The default implementation will tries to cast the itemWidget() (or its second child if item is closeable) to a WInteractWidget and returns the clicked signal.

+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WMenuItem::contents ( ) const
+
+
+ +

Returns the contents widget for this item.

+

The contents widget is the widget in the WStackedWidget associated with this item.

+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WMenuItem::createItemWidget ( ) [protected, virtual]
+
+
+ +

Creates the widget that represents the item.

+

The default implementation will return:

+
    +
  • a WAnchor if item is not closeable and enabled;
  • +
  • a WText if item is not closeable and disabled;
  • +
  • a WContainerWidget with WAnchor or WText (the label of enabled or disabled item accordingly) and WText (the close icon) inside if item is closeable.
  • +
+

A call to createItemWidget() is immediately followed by updateItemWidget().

+

If you reimplement this method, you should probably also reimplement updateItemWidget().

+ +

Reimplemented in Wt::WSubMenuItem.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::disable ( )
+
+
+ +

Disables the item.

+

This calls setDisabled(true).

+
See also:
enable()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::enable ( )
+
+
+ +

Enables the item.

+

This calls setDisabled(false).

+
See also:
disable()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the menu and the contents event handling to use AJAX instead of full page reloads.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled.

+
See also:
WMenu::enableAjax()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::hide ( )
+
+
+ +

Hides the item widget.

+

This calls setHidden(true).

+
See also:
show()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMenuItem::isCloseable ( ) const
+
+
+ +

Returns whether the item is closeable.

+
See also:
setCloseable()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMenuItem::isDisabled ( ) const
+
+
+ +

Returns whether an item is enabled.

+
See also:
setDisabled()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMenuItem::isHidden ( ) const
+
+
+ +

Returns whether the item widget is hidden.

+
See also:
setHidden()
+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WMenuItem::itemWidget ( )
+
+
+ +

Returns the widget that represents the item.

+

This returns the item widget, creating it using createItemWidget() if necessary.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WMenuItem::pathComponent ( ) const [virtual]
+
+
+ +

Returns the path component for this item.

+

You may want to reimplement this to customize the path component set by the item in the application internal path.

+
See also:
setPathComponent()
+ +

Reimplemented in Wt::WSubMenuItem.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::renderHidden (bool  hidden ) [protected, virtual]
+
+
+ +

Renders the item as hidden or closed.

+

The default implementation hides the item widget (including all its descendant widgets).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::renderSelected (bool  selected ) [protected, virtual]
+
+
+ +

Renders the item as selected or unselected.

+

The default implementation sets the styleclass for itemWidget() to 'item' for an unselected not closeable, 'itemselected' for selected not closeable, 'citem' for an unselected closeable and 'citemselected' for selected closeable item.

+

Note that this method is called from within a stateless slot implementation, and thus should be stateless as well.

+ +

Reimplemented in Wt::WSubMenuItem.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::select ( )
+
+
+ +

Selects this item.

+

If the item was previously closed it will be shown.

+
See also:
close()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setCloseable (bool  closeable )
+
+
+ +

Make it possible to close this item interactively or by close().

+
See also:
close(), isCloseable()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setDisabled (bool  disabled )
+
+
+ +

Enables or disables an item.

+

A disabled item cannot be activated.

+
See also:
enable(), disable(), isEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setHidden (bool  hidden )
+
+
+ +

Sets whether the item widget is hidden.

+

Hides or show the item widget.

+
See also:
hide(), show(), isHidden()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setPathComponent (const std::string &  path )
+
+
+ +

Sets the path component for this item.

+

The path component is used by the menu item in the application internal path (see WApplication::setInternalPath()), when internal paths are enabled (see WMenu::setInternalPathEnabled()) for the menu.

+

You may specify an empty path to let a menu item be the "default" menu option.

+

For example, if WMenu::internalBasePath() is "/examples/" and pathComponent() for is "charts/", then the internal path for the item will be "/examples/charts/".

+

By default, the path is automatically derived from text(). If a literal text is used, the path is based on the text itself, otherwise on the key. It is converted to lower case, and replacing white space and special characters with '_'.

+
See also:
setText(), WMenu::setInternalPathEnabled()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setText (const WString text )
+
+
+ +

Sets the text for this item.

+

Unless a custom path component was defined, the pathComponent() is also updated based on the new text.

+

The item widget is updated using updateItemWidget().

+
See also:
setPathComponent();
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::setToolTip (const WString tip )
+
+
+ +

Sets a tooltip.

+

The tooltip is displayed when the cursor hovers over the label of the item, i.e. WAnchor or WText, depending on whether the item is enabled or not (see createItemWidget()).

+
See also:
toolTip()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WMenuItem::show ( )
+
+
+ +

Shows the item widget.

+

If the item was previously closed it will be shown.

+

This calls setHidden(false).

+
See also:
hide(), select()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WMenuItem::text ( ) const
+
+
+ +

Returns the text for this item.

+
See also:
setText();
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WMenuItem::updateItemWidget (WWidget itemWidget ) [protected, virtual]
+
+
+ +

Updates the widget that represents the item.

+

The default implementation will cast the itemWidget to a WAnchor, and set the anchor's text and destination according to text() and pathComponent().

+
See also:
createItemWidget()
+ +

Reimplemented in Wt::WSubMenuItem.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.map new file mode 100644 index 0000000..1ec6e41 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.md5 new file mode 100644 index 0000000..28c7aab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.md5 @@ -0,0 +1 @@ +f7778e3f1ba98472f7170d6034508be9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.png new file mode 100644 index 0000000..33285f7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenuItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.md5 new file mode 100644 index 0000000..ddafb83 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.md5 @@ -0,0 +1 @@ +0f47cd4928bb9c255a375f757eac19a5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.png new file mode 100644 index 0000000..470c1d9 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMenu__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox-members.html new file mode 100644 index 0000000..9778a03 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox-members.html @@ -0,0 +1,213 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMessageBox Member List

+
+
+This is the complete list of members for Wt::WMessageBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accept()Wt::WDialog [virtual]
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Accepted enum valueWt::WDialog
addButton(const WString &text, StandardButton result)Wt::WMessageBox
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
button(StandardButton b)Wt::WMessageBox
buttonClicked()Wt::WMessageBox
buttonResult()Wt::WMessageBox
buttons() const Wt::WMessageBox
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
caption() const Wt::WDialog
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
contents() const Wt::WDialog
decorationStyle()Wt::WCompositeWidget [virtual]
DialogCode enum nameWt::WDialog
disable()Wt::WWidget
done(DialogCode r)Wt::WDialog [virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
exec()Wt::WDialog
find(const std::string &name)Wt::WCompositeWidget [virtual]
finished()Wt::WDialog
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::WMessageBox
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isModal() const Wt::WDialog
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isTitleBarEnabled() const Wt::WDialog
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
reject()Wt::WDialog [virtual]
Rejected enum valueWt::WDialog
rejectWhenEscapePressed()Wt::WDialog
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
result() const Wt::WDialog
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setButtons(WFlags< StandardButton > buttons)Wt::WMessageBox
setCaption(const WString &caption)Wt::WDialog
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool hidden)Wt::WDialog [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setIcon(Icon icon)Wt::WMessageBox
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setModal(bool modal)Wt::WDialog
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setText(const WString &text)Wt::WMessageBox
setTitleBarEnabled(bool enabled)Wt::WDialog
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
setWindowTitle(const WString &title)Wt::WDialog
show(const WString &caption, const WString &text, WFlags< StandardButton > buttons)Wt::WMessageBox [static]
Wt::WDialog::show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
text() const Wt::WMessageBox
textWidget() const Wt::WMessageBox
titleBar() const Wt::WDialog
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
WDialog(const WString &windowTitle=WString())Wt::WDialog
width() const Wt::WCompositeWidget [virtual]
windowTitle() const Wt::WDialog
WMessageBox()Wt::WMessageBox
WMessageBox(const WString &caption, const WString &text, Icon icon, WFlags< StandardButton > buttons)Wt::WMessageBox
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WDialog()Wt::WDialog
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox.html new file mode 100644 index 0000000..135455c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox.html @@ -0,0 +1,304 @@ + + + + +Wt: Wt::WMessageBox Class Reference + + + + + + + + + +
+ +
+

Wt::WMessageBox Class Reference

+
+
+ +

A standard dialog for confirmation or to get simple user input. +More...

+ +

#include <Wt/WMessageBox>

+
+Inheritance diagram for Wt::WMessageBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WMessageBox ()
 Creates an empty message box.
WMessageBox (const WString &caption, const WString &text, Icon icon, WFlags< StandardButton > buttons)
 Creates a message box with given caption, text, icon, and buttons.
+void setText (const WString &text)
 Sets the text for the message box.
+const WStringtext () const
 Returns the message box text.
WTexttextWidget () const
 Returns the text widget.
+void setIcon (Icon icon)
 Sets the icon.
+Icon icon () const
 Returns the icon.
WPushButtonaddButton (const WString &text, StandardButton result)
 Add a custom button with given text.
+void setButtons (WFlags< StandardButton > buttons)
 Sets standard buttons for the message box.
+WFlags< StandardButtonbuttons () const
 Returns the standard buttons.
WPushButtonbutton (StandardButton b)
 Returns the button widget for the given standard button.
StandardButton buttonResult ()
 Returns the result of this message box.
+Signal< StandardButton > & buttonClicked ()
 Signal emitted when a button is clicked.

+Static Public Member Functions

static StandardButton show (const WString &caption, const WString &text, WFlags< StandardButton > buttons)
 Convenience method to show a message box, blocking the current thread.
+

Detailed Description

+

A standard dialog for confirmation or to get simple user input.

+

The message box shows a message in a dialog window, with a number of buttons. These buttons may be standard buttons, or customized.

+

There are two distinct ways for using a WMessageBox, which reflect the two ways of dealing with a WDialog box.

+

The easiest way is using the static show() method, which shows a message box, blocks the current thread, and returns the button that was pressed by the user. Since this uses the WDialog::exec(), it suffers from the same scalability issues.

+

The more elaborate way is by creating a WMessageBox, and connecting the buttonClicked signal to a method. This method then interpretes the result and deletes the message box.

+

Example code (using the exec() method):

+
 StandardButton
+   result = WMessageBox::show("Confirm", "About to wreak havoc... Continue ?",
+                              Ok | Cancel);
+

This will show a message box that looks like this:

+ + + +
+WMessageBox-default-1.png +

Example of a WMessageBox (default)

+
+WMessageBox-polished-1.png +

Example of a WMessageBox (polished)

+
+

i18n

+

The strings used in the WMessageBox buttons can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WMessageBox.Abort: Abort
  • +
  • Wt.WMessageBox.Cancel: Cancel
  • +
  • Wt.WMessageBox.Ignore: Ignore
  • +
  • Wt.WMessageBox.No: No
  • +
  • Wt.WMessageBox.NoToAll: No to All
  • +
  • Wt.WMessageBox.Ok: Ok
  • +
  • Wt.WMessageBox.Retry: Retry
  • +
  • Wt.WMessageBox.Yes: Yes
  • +
  • Wt.WMessageBox.YesToAll: Yes to All
  • +
+

CSS

+

A WMessageBox can be styled using the Wt-dialog and Wt-outset style classes from it's superclass WDialog. The messagebox' buttons can be styled using Wt-msgbox-buttons style class.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
WPushButton * Wt::WMessageBox::addButton (const WString text,
StandardButton  result 
)
+
+
+ +

Add a custom button with given text.

+

When the button is clicked, the associated result will be returned.

+ +
+
+ +
+
+ + + + + + + + +
WPushButton * Wt::WMessageBox::button (StandardButton  b )
+
+
+ +

Returns the button widget for the given standard button.

+

This may be useful to customize the style or layout of the button.

+ +
+
+ +
+
+ + + + + + + +
StandardButton Wt::WMessageBox::buttonResult ( )
+
+
+ +

Returns the result of this message box.

+

This value is only defined after a button has been clicked.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
StandardButton Wt::WMessageBox::show (const WString caption,
const WString text,
WFlags< StandardButton buttons 
) [static]
+
+
+ +

Convenience method to show a message box, blocking the current thread.

+

Show a message box, blocking the current thread until the message box is closed, and return the result.

+ +
+
+ +
+
+ + + + + + + +
WText* Wt::WMessageBox::textWidget ( ) const
+
+
+ +

Returns the text widget.

+

This may be useful to customize the style or layout of the displayed text.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.map new file mode 100644 index 0000000..9cd4b1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.md5 new file mode 100644 index 0000000..918b5ce --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.md5 @@ -0,0 +1 @@ +df26ce365dab472db306c74821a097ea \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.png new file mode 100644 index 0000000..dde01ed Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle-members.html new file mode 100644 index 0000000..96a0aa6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMessageResourceBundle Member List

+
+
+This is the complete list of members for Wt::WMessageResourceBundle, including all inherited members. + + + + + + + + +
hibernate()Wt::WMessageResourceBundle [virtual]
keys(WFlags< Scope > scope) const Wt::WMessageResourceBundle
refresh()Wt::WMessageResourceBundle [virtual]
resolveKey(const std::string &key, std::string &result)Wt::WMessageResourceBundle [virtual]
Scope enum nameWt::WMessageResourceBundle
use(const std::string &path, bool loadInMemory=true)Wt::WMessageResourceBundle
WMessageResourceBundle()Wt::WMessageResourceBundle
~WLocalizedStrings()Wt::WLocalizedStrings [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle.html new file mode 100644 index 0000000..3a3b43f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle.html @@ -0,0 +1,294 @@ + + + + +Wt: Wt::WMessageResourceBundle Class Reference + + + + + + + + + +
+ +
+

Wt::WMessageResourceBundle Class Reference

+
+
+ +

Support for localized strings using XML files. +More...

+ +

#include <Wt/WMessageResourceBundle>

+
+Inheritance diagram for Wt::WMessageResourceBundle:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + +

+Public Types

enum  Scope
 

Resource key scope.

+

+Public Member Functions

WMessageResourceBundle ()
 Creates a message resource bundle.
void use (const std::string &path, bool loadInMemory=true)
 Adds a (series) of message resource files to be used.
const std::set< std::string > keys (WFlags< Scope > scope) const
 Returns a set of all keys connected with this WMessageResources.
virtual void refresh ()
 Rereads the message resources.
virtual void hibernate ()
 Purges memory resources, if possible.
virtual bool resolveKey (const std::string &key, std::string &result)
 Resolves a key in the current locale.
+

Detailed Description

+

Support for localized strings using XML files.

+

The resource bundle manages a number of resource files, which allow the developer to conceptually manage its messages in a number of libraries.

+

For example, a WApplication may have a generic message library, that is shared with many other libraries, with re-occurring messages (such as 'welcome', 'add to shopping cart', and 'pay'), and a specific message library for specific messages.

+

Usage example:

+

XML file "general.xml":

+
 <?xml version="1.0" encoding="UTF-8"?>
+ <messages>
+   <message id='welcome-text'>
+     Welcome dear visiter, {1} of the WFooBar magic website !
+   </message>
+   <message id='company-policy'>
+     The company policy is to <b>please our share-holders</b>.
+   </message>
+ </messages>
+

Use this resource bundle in your program:

+
 // load the message resource bundle
+ Wt::WApplication *app = Wt::WApplication::instance();
+ app->messageResourceBundle().use("general");
+
+ // resolve a string using the resource bundle
+ Wt::WText *welcome = new Wt::WText(tr("welcome-visitor").arg("Bart"));
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WMessageResourceBundle::hibernate ( ) [virtual]
+
+
+ +

Purges memory resources, if possible.

+

This is called afer event handling, and is an opportunity to conserve memory inbetween events, by freeing memory used for cached key/value bindings, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented from Wt::WLocalizedStrings.

+ +
+
+ +
+
+ + + + + + + + +
const std::set< std::string > Wt::WMessageResourceBundle::keys (WFlags< Scope scope ) const
+
+
+ +

Returns a set of all keys connected with this WMessageResources.

+

Returns a set of all keys connected with this WMessageResources, within the scope provided as parameter.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WMessageResourceBundle::refresh ( ) [virtual]
+
+
+ +

Rereads the message resources.

+

Purge any cached key/values, if applicable.

+

The default implementation does nothing.

+ +

Reimplemented from Wt::WLocalizedStrings.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WMessageResourceBundle::resolveKey (const std::string &  key,
std::string &  result 
) [virtual]
+
+
+ +

Resolves a key in the current locale.

+

This method is used by WString to obtain the UTF8 value corresponding to a key in the current locale.

+

Returns true if the key could be resolved. The value is written in result, encoded using UTF8.

+
See also:
WApplication::locale()
+ +

Implements Wt::WLocalizedStrings.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WMessageResourceBundle::use (const std::string &  path,
bool  loadInMemory = true 
)
+
+
+ +

Adds a (series) of message resource files to be used.

+

The path is not a URI, and relative paths will be resolved with respect to the working directory of the server. The XML files do not need to be deployed in the web server's docroot.

+

When you give as path: /path/to/name, then the following message resource files will be used:

+
    +
  • /path/to/name.xml (default, English)
  • +
  • /path/to/name_nl.xml (for Dutch)
  • +
  • /path/to/name_fr.xml (for French)
  • +
  • etc...
  • +
+

The message file that is used depends on the application's locale.

+

A Message resource file must be formatted as follows:

+
     <?xml version="1.0" encoding="UTF-8"?>
+     <messages>
+       <message id='welcome-text'>
+         Welcome dear visiter, {1} of the WFooBar magic website !
+       </message>
+       <message id='company-policy'>
+         The company policy is to <b>please our share-holders</b>.
+       </message>
+     </messages>
+

The encodings supported are ASCII, UTF-8 (recommended) or UTF-16.

+

To refer the two messages defined in this resource file, use WString::tr("welcome-text").arg(userName) or WWidget::tr("company-policy").

+
See also:
WApplication::locale(), WString::tr(), WWidget::tr()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.map new file mode 100644 index 0000000..a9685fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.md5 new file mode 100644 index 0000000..78f0ca2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.md5 @@ -0,0 +1 @@ +084ca49ffdf3d44ebea8c9673991eb65 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.png new file mode 100644 index 0000000..7653293 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WMessageResourceBundle__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex-members.html new file mode 100644 index 0000000..a25a5c1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex-members.html @@ -0,0 +1,97 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WModelIndex Member List

+
+
+This is the complete list of members for Wt::WModelIndex, including all inherited members. + + + + + + + + + + + + + + + + + + + +
child(int row, int column) const Wt::WModelIndex
column() const Wt::WModelIndex
data(int role=DisplayRole) const Wt::WModelIndex
decodeFromRawIndex() const Wt::WModelIndex
decodeFromRawIndexes(const WModelIndexSet &encodedIndexes)Wt::WModelIndex [static]
encodeAsRawIndex()Wt::WModelIndex
encodeAsRawIndexes(WModelIndexSet &indexes)Wt::WModelIndex [static]
flags() const Wt::WModelIndex
internalId() const Wt::WModelIndex
internalPointer() const Wt::WModelIndex
isAncestor(const Wt::WModelIndex &i1, const Wt::WModelIndex &i2)Wt::WModelIndex [static]
isValid() const Wt::WModelIndex
model() const Wt::WModelIndex
operator!=(const WModelIndex &other) const Wt::WModelIndex
operator<(const WModelIndex &other) const Wt::WModelIndex
operator==(const WModelIndex &other) const Wt::WModelIndex
parent() const Wt::WModelIndex
row() const Wt::WModelIndex
WModelIndex()Wt::WModelIndex
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex.html new file mode 100644 index 0000000..9f42212 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WModelIndex.html @@ -0,0 +1,544 @@ + + + + +Wt: Wt::WModelIndex Class Reference + + + + + + + + + +
+ +
+

Wt::WModelIndex Class Reference
+ +[Model/view system] +

+
+
+ +

An index to an item in a item data model. +More...

+ +

#include <Wt/WModelIndex>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WModelIndex ()
 Create an invalid WModelIndex.
int column () const
 Returns the column for this model index.
int row () const
 Returns the row for this model index.
void * internalPointer () const
 Returns the internal pointer.
::uint64_t internalId () const
 Returns the internal id.
WModelIndex child (int row, int column) const
 Returns a model index for a child item.
WModelIndex parent () const
 Returns an index to the parent.
boost::any data (int role=DisplayRole) const
 Returns data in the model at this index.
WFlags< ItemFlagflags () const
 Returns the flags for this item.
bool isValid () const
 Returns whether the index is a real valid index.
const WAbstractItemModelmodel () const
 Returns the model to which this (valid) index is bound.
bool operator== (const WModelIndex &other) const
 Comparison operator.
bool operator!= (const WModelIndex &other) const
 Comparison operator.
bool operator< (const WModelIndex &other) const
 Comparison operator.
void encodeAsRawIndex ()
 Encode to raw index (before a layout change).
WModelIndex decodeFromRawIndex () const
 Decodes a raw index (after a layout change).

+Static Public Member Functions

static void encodeAsRawIndexes (WModelIndexSet &indexes)
 Utility method for converting an entire set of indexes to raw.
static WModelIndexSet decodeFromRawIndexes (const WModelIndexSet &encodedIndexes)
 Utility method to decode an entire set of raw indexes.
+static bool isAncestor (const Wt::WModelIndex &i1, const Wt::WModelIndex &i2)
 Returns whether i2 is an ancestor of i1.
+

Detailed Description

+

An index to an item in a item data model.

+

Indexes are used to indicate a particular item in a WAbstractItemModel. An index points to the item by identifying its row and column location within a parent model index.

+

An index is immutable.

+

The default constructor creates an invalid index, which by convention indicates the parent of top level indexes. Thus, a model that specifies only a list or table of data (but no hierarchical data) would have as valid indexes only indexes that specify the invalid model index as parent.

+

Upon the model's choice, model indexes for hierarchical models may have an internal Id represented by a int64_t (internalId()), a pointer (internalPointer()).

+

Indexes are created by the model, within the protected WAbstractItemModel::createIndex() methods. In this way, models can define an internal pointer or id suitable for identifying parent items in the model.

+

When a model's geometry changes due to row or column insertions or removals, you may need to update your indexes, as otherwise they may no longer point to the same item (but instead still to the same row/column). Thus, if you store indexes and want to support model changes such as row or columns insertions/removals, then you need to react to the corresponding signals such as WAbstractItemModel::rowsInserted() to update these indexes (i.e. shift them), or even remove them when the corresponding row/column has been removed.

+

When a model's layout changes (it is rearranging its contents for example in response to a sort operation), a similar problem arises. Some models support tracking of indexes over layout changes, using raw indexes. In reaction to WAbstractItemModel::layoutAboutToBeChanged(), you should encode any index which you wish to recover after the layout change using encodeAsRawIndex(), and in WAbstractItemModel::layoutChanged() you can obtain an index that points to the same item using decodeFromRawIndex().

+
See also:
WAbstractItemModel
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WModelIndex::WModelIndex ( )
+
+
+ +

Create an invalid WModelIndex.

+

Returns a model index for which isValid() return false.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WModelIndex::child (int  row,
int  column 
) const
+
+
+ +

Returns a model index for a child item.

+

This is a convenience method, and is only defined for indexes that are valid().

+

It has the same function as WAbstractItemModel::index() but is less general because the latter expression may also be used to retrieve top level children, i.e. when index is invalid.

+
See also:
WAbstractItemModel::index(), isValid()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WModelIndex::column ( ) const
+
+
+ +

Returns the column for this model index.

+
See also:
row()
+ +
+
+ +
+
+ + + + + + + + +
boost::any Wt::WModelIndex::data (int  role = DisplayRole ) const
+
+
+ +

Returns data in the model at this index.

+

This is a convenience method for WAbstractItemModel::data().

+
See also:
WAbstractItemModel::data()
+
+ItemDataRole
+ +
+
+ +
+
+ + + + + + + +
WModelIndex Wt::WModelIndex::decodeFromRawIndex ( ) const
+
+
+ +

Decodes a raw index (after a layout change).

+

A raw index can be decoded, within the context of a model that has been re-layed out.

+

This method returns a new index that points to the same item, or, WModelIndex() if the underlying model did not support encoding to raw indexes, or, if the item to which the index previously pointed, is no longer part of the model.

+
See also:
WAbstractItemModel::fromRawIndex(), WAbstractItemModel::layoutChanged()
+
+encodeAsRawIndex()
+ +
+
+ +
+
+ + + + + + + + +
WModelIndexSet Wt::WModelIndex::decodeFromRawIndexes (const WModelIndexSet &  encodedIndexes ) [static]
+
+
+ +

Utility method to decode an entire set of raw indexes.

+
See also:
decodeFromRawIndex()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WModelIndex::encodeAsRawIndex ( )
+
+
+ +

Encode to raw index (before a layout change).

+

Use this method to encode an index for which you want to recover an index after the layout change to the same item (which may still be in the model, but at a different location).

+

An index that has been encoded as a raw index cannot be used for anything but decodeFromRawIndex() at a later point.

+
See also:
WAbstractItemModel::toRawIndex(), WAbstractItemModel::layoutAboutToBeChanged()
+
+decodeFromRawIndex()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WModelIndex::encodeAsRawIndexes (WModelIndexSet &  indexes ) [static]
+
+
+ +

Utility method for converting an entire set of indexes to raw.

+
See also:
encodeAsRawIndex()
+ +
+
+ +
+
+ + + + + + + +
WFlags< ItemFlag > Wt::WModelIndex::flags ( ) const
+
+
+ +

Returns the flags for this item.

+

This is a convenience method for WAbstractItemModel::flags().

+
See also:
WAbstractItemModel::flags()
+
+ItemFlag
+ +
+
+ +
+
+ + + + + + + +
::uint64_t Wt::WModelIndex::internalId ( ) const
+
+
+ +

Returns the internal id.

+

The internal id is used by the model to retrieve the corresponding data.

+

This is only defined when the model created the index using WAbstractItemModel::createIndex(int, int, uint64_t) const.

+
See also:
internalPointer()
+
+WAbstractItemModel::createIndex(int, int, uint64_t) const
+ +
+
+ +
+
+ + + + + + + +
void* Wt::WModelIndex::internalPointer ( ) const
+
+
+ +

Returns the internal pointer.

+

The internal pointer is used by the model to retrieve the corresponding data.

+

This is only defined when the model created the index using WAbstractItemModel::createIndex(int, int, void *) const.

+
See also:
internalId(),
+
+WAbstractItemModel::createIndex(int, int, void *) const
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WModelIndex::isValid ( ) const
+
+
+ +

Returns whether the index is a real valid index.

+

Returns true when the index points to a valid data item, i.e. at a valid row() and column().

+

An index may be invalid for two reasons:

+
    +
  • an operation requested an index that was out of model bounds,
  • +
  • or, the index corresponds to the model's top level root item, and is thus the parent index for top level items.
  • +
+ +
+
+ +
+
+ + + + + + + +
const WAbstractItemModel* Wt::WModelIndex::model ( ) const
+
+
+ +

Returns the model to which this (valid) index is bound.

+

This returns the model that created the model index.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WModelIndex::operator!= (const WModelIndex other ) const
+
+
+ +

Comparison operator.

+
See also:
operator==()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WModelIndex::operator< (const WModelIndex other ) const
+
+
+ +

Comparison operator.

+

Returns true if the index comes topologically before other.

+

Topological order follows the order in which the indexes would be displayed in a tree table view, from top to bottom followed by left to right.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WModelIndex::operator== (const WModelIndex other ) const
+
+
+ +

Comparison operator.

+

Returns true only if the indexes point at the same data, in the same model.

+ +
+
+ +
+
+ + + + + + + +
WModelIndex Wt::WModelIndex::parent ( ) const
+
+
+ +

Returns an index to the parent.

+

This is a convenience method for WAbstractItemModel::parent().

+

For a top level data item, the parent() is an invalid index (see WModelIndex()).

+
See also:
WAbstractItemModel::parent()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WModelIndex::row ( ) const
+
+
+ +

Returns the row for this model index.

+
See also:
column()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent-members.html new file mode 100644 index 0000000..5c1f619 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent-members.html @@ -0,0 +1,97 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WMouseEvent Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent.html new file mode 100644 index 0000000..01c545c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WMouseEvent.html @@ -0,0 +1,350 @@ + + + + +Wt: Wt::WMouseEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WMouseEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a mouse event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Button { NoButton = 0, +LeftButton = 1, +MiddleButton = 2, +RightButton = 4 + }
 

Enumeration for the mouse button.

+ More...
+typedef Wt::Coordinates Coordinates
 Mouse coordinates.

+Public Member Functions

WMouseEvent ()
 Default constructor.
Button button () const
 Returns the button.
WFlags< KeyboardModifiermodifiers () const
 Returns keyboard modifiers.
+Coordinates document () const
 Returns the mouse position relative to the document.
Coordinates window () const
 Returns the mouse position relative to the window.
+Coordinates screen () const
 Returns the mouse position relative to the screen.
+Coordinates widget () const
 Returns the mouse position relative to the widget.
Coordinates dragDelta () const
 Returns the distance over which the mouse has been dragged.
int wheelDelta () const
 Returns the scroll wheel delta.
bool altKey () const
 Returns whether the alt key is pressed (deprecated).
bool metaKey () const
 Returns whether the meta key is pressed (deprecated).
bool ctrlKey () const
 Returns whether the control key is pressed (deprecated).
bool shiftKey () const
 Returns whether the shift key is pressed (deprecated).
+

Detailed Description

+

A class providing details for a mouse event.

+
See also:
WInteractWidget::clicked(), WInteractWidget::doubleClicked(), WInteractWidget::mouseWentDown(), WInteractWidget::mouseWentUp(), WInteractWidget::mouseWentOver(), WInteractWidget::mouseMoved()
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WMouseEvent::Button
+
+
+ +

Enumeration for the mouse button.

+
Enumerator:
+ + + + +
NoButton  +

No button.

+
LeftButton  +

Left button.

+
MiddleButton  +

Middle button.

+
RightButton  +

Right button.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool Wt::WMouseEvent::altKey ( ) const
+
+
+ +

Returns whether the alt key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
Button Wt::WMouseEvent::button ( ) const
+
+
+ +

Returns the button.

+

If multiple buttons are currently pressed for a mouse moved or mouse dragged event, then the one with the smallest numerical value is returned.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMouseEvent::ctrlKey ( ) const
+
+
+ +

Returns whether the control key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
Coordinates Wt::WMouseEvent::dragDelta ( ) const
+
+
+ +

Returns the distance over which the mouse has been dragged.

+

This is only defined for a WInteractWidget::mouseWentUp() event.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMouseEvent::metaKey ( ) const
+
+
+ +

Returns whether the meta key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
WFlags<KeyboardModifier> Wt::WMouseEvent::modifiers ( ) const
+
+
+ +

Returns keyboard modifiers.

+

The result is a logical OR of KeyboardModifier flags.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WMouseEvent::shiftKey ( ) const
+
+
+ +

Returns whether the shift key is pressed (deprecated).

+
Deprecated:
Use modifiers() instead.
+ +
+
+ +
+
+ + + + + + + +
int Wt::WMouseEvent::wheelDelta ( ) const
+
+
+ +

Returns the scroll wheel delta.

+

This is 1 when wheel was scrolled up or -1 when wheel was scrolled down.

+

This is only defined for a WInteractWidget::mouseWheel() event.

+ +
+
+ +
+
+ + + + + + + +
Coordinates Wt::WMouseEvent::window ( ) const
+
+
+ +

Returns the mouse position relative to the window.

+

This differs from documentX() only through scrolling through the document.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WObject-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject-members.html new file mode 100644 index 0000000..dce57fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject-members.html @@ -0,0 +1,95 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WObject Member List

+
+
+This is the complete list of members for Wt::WObject, including all inherited members. + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setObjectName(const std::string &name)Wt::WObject
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WObject.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject.html new file mode 100644 index 0000000..9a42643 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject.html @@ -0,0 +1,519 @@ + + + + +Wt: Wt::WObject Class Reference + + + + + + + + + + +
+ +

A base class for objects that participate in the signal/slot system. +More...

+ +

#include <Wt/WObject>

+
+Inheritance diagram for Wt::WObject:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef void(WObject::* Method )()
 Typedef for a WObject method without arguments.

+Public Member Functions

 WObject (WObject *parent=0)
 Create a WObject with a given parent object.
virtual ~WObject ()
 Destructor.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
void setObjectName (const std::string &name)
 Sets an object name.
virtual std::string objectName () const
 Returns the object name.
void resetLearnedSlots ()
 Resets learned stateless slot implementations.
template<class T >
void resetLearnedSlot (void(T::*method)())
 Resets a learned stateless slot implementation.
template<class T >
WStatelessSlot * implementStateless (void(T::*method)())
 Declares a slot to be stateless and learn client-side behaviour on first invocation.
template<class T >
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 Declares a slot to be stateless and learn client-side behaviour in advance.
template<class T >
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 Provides a JavaScript implementation for a method.
void addChild (WObject *child)
 Adds a child object.
void removeChild (WObject *child)
 Removes a child object.
+const std::vector< WObject * > & children () const
 Returns the children.
+WObjectparent () const
 Returns the parent object.

+Protected Member Functions

virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation.

+Static Protected Member Functions

static WObjectsender ()
 Returns the sender of the current slot call.
+

Detailed Description

+

A base class for objects that participate in the signal/slot system.

+

The main feature offered by WObject is automated object life-time tracking when involved in signal/slot connections. Connections between signals and slots of WObject instances implement a type-safe event callback system. For example, one can simply connect() the WInteractWidget::clicked() signal of a WPushButton to the WApplication::quit() method, to exit the application when the button is clicked:

+

Wt's signals may also propagate arguments to slots. For example, the same clicked() signal provides event details in a WMouseEvent details class, and these details may be received in the slot:

+
 class MyClass : public Wt::WContainerWidget
+ {
+ public:
+   MyClass(Wt::WContainerWidget *parent = 0)
+     : Wt::WContainerWidget(parent)
+   {
+     Wt::WText *text = Wt::WText("Click here", this);
+     text->clicked().connect(this, &MyClass::handleClick);
+
+     ...
+   }
+
+ private:
+   void handleClick(const Wt::WMouseEvent& event) {
+     if (event.modifiers() & Wt::ShiftModifier) {
+       ...
+     }
+   }
+ };
+

As the example illustrates, slots are ordinary WObject methods.

+

A second feature of WObject is that they allow ownership organization in ownership object trees. When an object is created with another object as parent, it's ownership is transferred to the parent. If not deleted explicitly, the child object will be deleted together with the parent. Child objects may also be deleted manually: they will remove themselves from their parent in the process.

+

In conjunction with EventSignal, WObject also facilitates learning of client-side event handling (in JavaScript) through invocation of the slot method. This is only possible when the slot behaviour is stateless, i.e. independent of any application state, and can be specified using the implementStateless() methods.

+
See also:
Signal, EventSignal
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WObject::WObject (WObject parent = 0 )
+
+
+ +

Create a WObject with a given parent object.

+

If the optional parent is specified, the parent object will destroy all child objects. Set parent to 0 to create an object with no parent.

+
See also:
addChild()
+ +
+
+ +
+
+ + + + + + + +
Wt::WObject::~WObject ( ) [virtual]
+
+
+ +

Destructor.

+

This automatically:

+
    +
  • deletes all child objects
  • +
  • invalidates this object as sender or receiver in signals and slots
  • +
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WObject::addChild (WObject child )
+
+
+ +

Adds a child object.

+

Take responsibility of deleting the child object, together with this object.

+
See also:
removeChild()
+ +
+
+ +
+
+ + + + + + + + +
WStatelessSlot * Wt::WObject::getStateless (Method  method ) [protected, virtual]
+
+
+ +

On-demand stateless slot implementation.

+

This method returns a stateless slot implementation for the given method. To avoid the cost of declaring methods to be stateless when they are not used, you may reimplement this method to provide a stateless implementation for a method only when the method is involved in a slot connection.

+

Use implementStateless() to provide a stateless implementation of the given method, or return the base class implementation otherwise.

+ +

Reimplemented in Wt::WAbstractToggleButton, Wt::WFormWidget, and Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WObject::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented in Wt::WButtonGroup, Wt::WCompositeWidget, Wt::WTableColumn, Wt::WTableRow, and Wt::WWebWidget.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
WStatelessSlot * Wt::WObject::implementJavaScript (void(T::*)()  method,
const std::string &  jsCode 
)
+
+
+ +

Provides a JavaScript implementation for a method.

+

This method sets the JavaScript implementation for a method. As a result, if JavaScript is available, the JavaScript version will be used on the client side and the visual effect of the C++ implementation will be ignored.

+

This is very similar to an auto-learned stateless slot, but here the learning is avoided by directly setting the JavaScript implementation.

+

The jsCode should be one or more valid JavaScript statements.

+
See also:
implementStateless(void (T::*method)())
+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
WStatelessSlot * Wt::WObject::implementStateless (void(T::*)()  method,
void(T::*)()  undoMethod 
)
+
+
+ +

Declares a slot to be stateless and learn client-side behaviour in advance.

+

This method has the same effect as implementStateless(void (T::*method)()), but learns the visual effect of the slot before the first invocation of the event.

+

To learn the visual effect, the library will simulate the event and record the visual effect. To restore the application state, it will call the undoMethod which must restore the effect of method.

+
See also:
implementStateless(void (T::*method)())
+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
WStatelessSlot * Wt::WObject::implementStateless (void(T::*)()  method )
+
+
+ +

Declares a slot to be stateless and learn client-side behaviour on first invocation.

+

Indicate that the given slot is stateless, and meets the requirement that the slot's code does not depend on any state of the object, but performs the same visual effect regardless of any state, or at least until resetLearnedSlot() is called.

+

When this slot is connected to an EventSignal (such as those exposed by WInteractWidget and WFormWidget), the Wt library may decide to cache the visual effect of this slot in JavaScript code at client-side: this effect will be learned automatically at the first invocation. This has no consequences for the normal event handling, since the slot implementation is still executed in response to any event notification. Therefore, it is merely an optimization of the latency for the visual effect, but it does not change the behaviour of the application.

+

When for some reason the visual effect does change, one may use resetLearnedSlot() or resetLearnedSlots() to flush the existing cached visual effect, forcing the library to relearn it.

+

It is crucial that this function be applied first to a slot that is intended to be stateless before any EventSignal connects to that slot. Otherwise, the connecting EventSignal cannot find the stateless slot implementation for the intended slot, and the statement will have no effect for that connection.

+
See also:
resetLearnedSlot(), EventSignal
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WObject::objectName ( ) const [virtual]
+
+
+ +

Returns the object name.

+
See also:
setObjectName()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WObject::removeChild (WObject child )
+
+
+ +

Removes a child object.

+

The child must have been previously added.

+
See also:
addChild()
+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void Wt::WObject::resetLearnedSlot (void(T::*)()  method )
+
+
+ +

Resets a learned stateless slot implementation.

+

Clears the stateless implementation for the given slot that was declared to be implemented with a stateless implementation.

+

When something has changed that breaks the contract of a stateless slot to always have the same effect, you may call this method to force the application to discard the current implementation.

+
See also:
implementStateless()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WObject::resetLearnedSlots ( )
+
+
+ +

Resets learned stateless slot implementations.

+

Clears the stateless implementation for all slots declared to be implemented with a stateless implementation.

+
See also:
resetLearnedSlot(), implementStateless()
+ +
+
+ +
+
+ + + + + + + +
WObject * Wt::WObject::sender ( ) [static, protected]
+
+
+ +

Returns the sender of the current slot call.

+

Use this function to know who emitted the signal that triggered this slot call. It may be 0 if the signal has no owner information, or if there is no signal triggering the current slot, but instead the slot method is called directly.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WObject::setObjectName (const std::string &  name )
+
+
+ +

Sets an object name.

+

The object name can be used to easily identify a type of object in the DOM, and does not need to be unique. It will usually reflect the widget type or role. The object name is prepended to the auto-generated object id().

+

The default object name is empty.

+
See also:
id()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.map new file mode 100644 index 0000000..996939f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.map @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.md5 new file mode 100644 index 0000000..8cf4cfe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.md5 @@ -0,0 +1 @@ +562845ee35929e683608297adc9d18c8 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.png new file mode 100644 index 0000000..44b69a2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WObject__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator-members.html new file mode 100644 index 0000000..6ed8cda --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator-members.html @@ -0,0 +1,234 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WOverlayLoadingIndicator Member List

+
+
+This is the complete list of members for Wt::WOverlayLoadingIndicator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WContainerWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WContainerWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMessage(const WString &text)Wt::WOverlayLoadingIndicator [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget()Wt::WOverlayLoadingIndicator [virtual]
Wt::WContainerWidget::widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WOverlayLoadingIndicator(const WString &styleClass=WString(), const WString &backgroundStyleClass=WString(), const WString &textStyleClass=WString())Wt::WOverlayLoadingIndicator
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WLoadingIndicator()Wt::WLoadingIndicator [virtual]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator.html new file mode 100644 index 0000000..12f5023 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator.html @@ -0,0 +1,238 @@ + + + + +Wt: Wt::WOverlayLoadingIndicator Class Reference + + + + + + + + + +
+ +
+

Wt::WOverlayLoadingIndicator Class Reference

+
+
+ +

A more obvious loading indicator that grays the window. +More...

+ +

#include <Wt/WOverlayLoadingIndicator>

+
+Inheritance diagram for Wt::WOverlayLoadingIndicator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

 WOverlayLoadingIndicator (const WString &styleClass=WString(), const WString &backgroundStyleClass=WString(), const WString &textStyleClass=WString())
 Construct the loading indicator.
virtual WWidgetwidget ()
 Returns the widget that visually represents the indicator.
virtual void setMessage (const WString &text)
 Sets the message that you want to be displayed.
+

Detailed Description

+

A more obvious loading indicator that grays the window.

+

This loading indicator uses a gray semi-transparent overlay to darken the window contents, and centers a loading icon (with some text).

+

Usage example:

+
+WOverlayLoadingIndicator.png +

The overlay loading indicator

+
Note:
For this loading indicator to render properly in IE, you need to reset the "body" margin to 0. Using the inline stylesheet, this could be done using:
   WApplication::instance()->styleSheet().addRule("body", "margin: 0px");
+
+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+
    +
  • Wt.WOverlayLoadingIndicator.Loading: Loading...
  • +
+
See also:
WApplication::setLoadingIndicator()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WOverlayLoadingIndicator::WOverlayLoadingIndicator (const WString styleClass = WString(),
const WString backgroundStyleClass = WString(),
const WString textStyleClass = WString() 
)
+
+
+ +

Construct the loading indicator.

+
Parameters:
+ + + + +
styleClassthe style class for the central box
backgroundStyleClassthe style class for the "background" part of the indicator
textStyleClassthe style class for the text that is displayed
+
+
+
Note:
if styleClass is not set, the central box gets the CSS style elements
             background: white;
+             border: 3px solid #333333;
+             z-index: 10001; visibility: visible;
+             position: absolute; left: 50%; top: 50%;
+             margin-left: -50px; margin-top: -40px;
+             width: 100px; height: 80px;
+             font-family: arial,sans-serif;
+             text-align: center
+
+
+if backgroundStyleClass is not set, the background gets the CSS style elements
             background: #DDDDDD;
+             height: 100%; width: 100%;
+             top: 0px; left: 0px;
+             z-index: 10000;
+             -moz-background-clip: -moz-initial;
+             -moz-background-origin: -moz-initial;
+             -moz-background-inline-policy: -moz-initial;
+             opacity: 0.5; filter: alpha(opacity=50); -moz-opacity:0.5;
+             position: absolute;
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WOverlayLoadingIndicator::setMessage (const WString text ) [virtual]
+
+
+ +

Sets the message that you want to be displayed.

+

If the indicator is capable of displaying a text message, then you should reimplement this method to allow this message to be modified.

+ +

Implements Wt::WLoadingIndicator.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WOverlayLoadingIndicator::widget ( ) [virtual]
+
+
+ +

Returns the widget that visually represents the indicator.

+

You should reimplement this method to return a widget that will be shown to indicate that a response is pending. The widget should be positioned using CSS.

+

The widget will be shown and hidden using WWidget::show() and WWidget::hide(). If you want to customize this behaviour, you should reimplement the WWidget::setHidden() method. Note that show() and hide() are stateless slots, and thus you need to make sure that your implementation comforms to that contract, so that it may be optimized to JavaScript (the server-side implementation will only be called during stateless slot prelearning).

+
Note:
The widget will not be added to the WApplication::root() container.
+ +

Implements Wt::WLoadingIndicator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.map new file mode 100644 index 0000000..ec18ba5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.md5 new file mode 100644 index 0000000..41ebe6a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.md5 @@ -0,0 +1 @@ +974a12a8864ea6283553c18ef713fe55 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.png new file mode 100644 index 0000000..adac49a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WOverlayLoadingIndicator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice-members.html new file mode 100644 index 0000000..bf9d278 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice-members.html @@ -0,0 +1,101 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPaintDevice Member List

+
+
+This is the complete list of members for Wt::WPaintDevice, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
clear()=0Wt::WPaintDevice [protected, pure virtual]
Clipping enum valueWt::WPaintDevice
done()=0Wt::WPaintDevice [pure virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)=0Wt::WPaintDevice [pure virtual]
drawImage(const WRectF &rect, const std::string &imageUri, int imgWidth, int imgHeight, const WRectF &sourceRect)=0Wt::WPaintDevice [pure virtual]
drawLine(double x1, double y1, double x2, double y2)=0Wt::WPaintDevice [pure virtual]
drawPath(const WPainterPath &path)=0Wt::WPaintDevice [pure virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)=0Wt::WPaintDevice [pure virtual]
Font enum valueWt::WPaintDevice
height() const =0Wt::WPaintDevice [pure virtual]
Hints enum valueWt::WPaintDevice
init()=0Wt::WPaintDevice [pure virtual]
paintActive() const =0Wt::WPaintDevice [pure virtual]
painter() const =0Wt::WPaintDevice [protected, pure virtual]
Pen enum valueWt::WPaintDevice
setChanged(WFlags< ChangeFlag > flags)=0Wt::WPaintDevice [pure virtual]
setPainter(WPainter *painter)=0Wt::WPaintDevice [protected, pure virtual]
Shadow enum valueWt::WPaintDevice
Transform enum valueWt::WPaintDevice
width() const =0Wt::WPaintDevice [pure virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice.html new file mode 100644 index 0000000..adf35c6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice.html @@ -0,0 +1,572 @@ + + + + +Wt: Wt::WPaintDevice Class Reference + + + + + + + + + +
+ +
+

Wt::WPaintDevice Class Reference
+ +[Painting system] +

+
+
+ +

The abstract base class for a paint device. +More...

+ +

#include <Wt/WPaintDevice>

+
+Inheritance diagram for Wt::WPaintDevice:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  ChangeFlag {
+  Pen = 0x1, +Brush = 0x2, +Font = 0x4, +Hints = 0x8, +
+  Transform = 0x10, +Clipping = 0x20, +Shadow = 0x40 +
+ }
 

Enumeration to communicate painter state changes.

+ More...

+Public Member Functions

virtual ~WPaintDevice ()
 Destructor.
virtual WLength width () const =0
 Returns the device width.
virtual WLength height () const =0
 Returns the device height.
virtual void setChanged (WFlags< ChangeFlag > flags)=0
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)=0
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imageUri, int imgWidth, int imgHeight, const WRectF &sourceRect)=0
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)=0
 Draws a line.
virtual void drawPath (const WPainterPath &path)=0
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)=0
 Draws text.
virtual void init ()=0
 Initializes the device for painting.
virtual void done ()=0
 Finishes painting on the device.
virtual bool paintActive () const =0
 Returns whether painting is active.

+Protected Member Functions

virtual WPainterpainter () const =0
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)=0
 Sets the painter.
+virtual void clear ()=0
 Clears the paint device.
+

Detailed Description

+

The abstract base class for a paint device.

+

A WPaintDevice is a device on which may be painted using a WPainter. You should never paint directly on a paint device.

+

The device defines the size of the drawing area, using width() and height(). These dimensions must be defined in pixel units. In the future, additional information will be included to convert these pixel units to lengths (using DPI information).

+

You should reimplement this class if you wish to extend the Wt paint system to paint on other devices than the ones provided by the library.

+

Note: this interface is subject to changes to increase optimization possibilities for the painting using different devices.

+
See also:
WPainter
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration to communicate painter state changes.

+
See also:
setChanged(WFlags<ChangeFlag>)
+
Enumerator:
+ + + + + + + +
Pen  +

Properties of the pen have changed.

+
Brush  +

Properties of the brush have changed.

+
Font  +

Properties of the font have changed.

+
Hints  +

Some render hints have changed.

+
Transform  +

The transformation has changed.

+
Clipping  +

The clipping has changed.

+
Shadow  +

Properties of the shadow have changed.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPaintDevice::~WPaintDevice ( ) [virtual]
+
+
+ +

Destructor.

+

Frees all resources associated with this device.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual void Wt::WPaintDevice::done ( ) [pure virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::WPaintDevice::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [pure virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::WPaintDevice::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [pure virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::WPaintDevice::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [pure virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WPaintDevice::drawPath (const WPainterPath path ) [pure virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void Wt::WPaintDevice::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [pure virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WPaintDevice::height ( ) const [pure virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::WPaintDevice::init ( ) [pure virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WPaintDevice::paintActive ( ) const [pure virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WPaintDevice::painter ( ) const [protected, pure virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WPaintDevice::setChanged (WFlags< ChangeFlag flags ) [pure virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WPaintDevice::width ( ) const [pure virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implemented in Wt::WCanvasPaintDevice, Wt::WPdfImage, Wt::WRasterImage, Wt::WSvgImage, and Wt::WVmlImage.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.map new file mode 100644 index 0000000..cf62a87 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.md5 new file mode 100644 index 0000000..3206944 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.md5 @@ -0,0 +1 @@ +1e28d7c198beb18f5cfb89d207c0ba3d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.png new file mode 100644 index 0000000..56269d6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintDevice__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget-members.html new file mode 100644 index 0000000..d75adf2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget-members.html @@ -0,0 +1,216 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPaintedWidget Member List

+
+
+This is the complete list of members for Wt::WPaintedWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
addArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
area(int index) const Wt::WPaintedWidget
areas() const Wt::WPaintedWidget
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WPaintedWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
HtmlCanvas enum valueWt::WPaintedWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
InlineSvgVml enum valueWt::WPaintedWidget
insertArea(int index, WAbstractArea *area)Wt::WPaintedWidget
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WPaintedWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method enum nameWt::WPaintedWidget
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
paintEvent(WPaintDevice *paintDevice)=0Wt::WPaintedWidget [protected, pure virtual]
parent() const Wt::WWidget
PngImage enum valueWt::WPaintedWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
preferredMethod() const Wt::WPaintedWidget
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeArea(WAbstractArea *area)Wt::WPaintedWidget
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WPaintedWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setPreferredMethod(Method method)Wt::WPaintedWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
update(WFlags< PaintFlag > flags=0)Wt::WPaintedWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WPaintedWidget(WContainerWidget *parent=0)Wt::WPaintedWidget
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WPaintedWidget()Wt::WPaintedWidget
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget.html new file mode 100644 index 0000000..f3ae66e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget.html @@ -0,0 +1,524 @@ + + + + +Wt: Wt::WPaintedWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WPaintedWidget Class Reference
+ +[Painting system] +

+
+
+ +

A widget that is painted using vector graphics. +More...

+ +

#include <Wt/WPaintedWidget>

+
+Inheritance diagram for Wt::WPaintedWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Method { InlineSvgVml, +HtmlCanvas, +PngImage + }
 

Enumeration that indicates a rendering method.

+ More...

+Public Member Functions

WPaintedWidget (WContainerWidget *parent=0)
 Create a new painted widget.
~WPaintedWidget ()
 Destructor.
void setPreferredMethod (Method method)
 Sets the preferred rendering method.
Method preferredMethod () const
 Returns the preferred rendering method.
void update (WFlags< PaintFlag > flags=0)
 Lets the widget repaint itself.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
void addArea (WAbstractArea *area)
 Adds an interactive area.
void insertArea (int index, WAbstractArea *area)
 Inserts an interactive area.
void removeArea (WAbstractArea *area)
 Removes an interactive area.
WAbstractAreaarea (int index) const
 Returns the interactive area at the given index.
const std::vector
+< WAbstractArea * > 
areas () const
 Returns the interactive areas set for this widget.

+Protected Member Functions

virtual void layoutSizeChanged (int width, int height)
 Virtual method that indicates a size change.
virtual void paintEvent (WPaintDevice *paintDevice)=0
 Paints the widget.
virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A widget that is painted using vector graphics.

+

A painted widget is rendered from basic drawing primitives. Rendering is done not on the server but on the browser, using different rendering methods:

+ + + + + + + + + + + + + +
BrowserMethods Default method
Firefox 1.5+HtmlCanvas, InlineSVG, PngImage HtmlCanvas
Internet Explorer 6.0+InlineVML, PngImage InlineVML
SafariHtmlCanvas, InlineSVG, PngImage HtmlCanvas
OperaInlineSVG, HtmlCanvas*, PngImage InlineSVG
other?HtmlCanvas, PngImage
+

* HtmlCanvas occasionally suffers from rendering artefacts in Opera.

+

The different rendering methods correspond to different WPaintDevice implementations, from which this widget choses a suitable one depending on the browser capabilities and configuration.

+

If no JavaScript is available, the JavaScript-based HtmlCanvas will not be used, and InlineSVG will be used instead. The method used may be changed by using setPreferredMethod().

+

InlineSVG requires that the document is rendered as XHTML. This must be enabled in the configuration file using the <send-xhtml-mime-type> option. By default, this option is off.

+

The PngImage is the most portable rendering method, and may be the fastest if the painting is of high complexity and/or the image is fairly small.

+

To use a WPaintedWidget, you must derive from it and reimplement paintEvent(WPaintDevice *paintDevice). To paint on a WPaintDevice, you will need to use a WPainter. Repainting is triggered by calling the update() method.

+

Usage example:

+
 class MyPaintedWidget : public Wt::WPaintedWidget
+ {
+ public:
+   MyPaintedWidget(Wt::WContainerWidget *parent = 0)
+     : Wt::WPaintedWidget(parent),
+       foo_(100)
+   {
+      resize(200, 200); // provide a default size
+   }
+
+   void setFoo(int foo) {
+      foo_ = foo;
+      update(); // trigger a repaint
+   }
+
+ protected:
+   void paintEvent(Wt::WPaintDevice *paintDevice) {
+     Wt::WPainter painter(paintDevice);
+     painter.drawLine(20, 20, foo_, foo_);
+     ...
+   }
+
+ private:
+   int foo_;
+ };
+

CSS

+

Styling through CSS is not applicable.

+
Note:
A WPaintedWidget requires that it is given a size using resize() or by a layout manager.
+
See also:
WImage
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WPaintedWidget::Method
+
+
+ +

Enumeration that indicates a rendering method.

+
Enumerator:
+ + + +
InlineSvgVml  +

SVG (Most browsers) or VML (Internet Explorer) embedded in the page.

+
HtmlCanvas  +

The WHATWG HTML 5 canvas element.

+
PngImage  +

Using a PNG image resource.

+
+
+
+ +

Reimplemented from Wt::WObject.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WPaintedWidget::addArea (WAbstractArea area )
+
+
+ +

Adds an interactive area.

+

Adds the area which listens to events in a specific region of the widget. Areas are organized in a list, to which the given area is appended. When areas overlap, the area with the lowest index receives the event.

+

Ownership of the area is transferred to the widget.

+
Note:
When defining at least one area, no more events will propagate to the widget itself. As a work-around, you can emulate this by listening for events on a WRectArea that corresponds to the whole widget, and which is added as the last area (catching all events that were not caught by preceding areas).
+
See also:
insertArea(int, WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + + +
WAbstractArea * Wt::WPaintedWidget::area (int  index ) const
+
+
+ +

Returns the interactive area at the given index.

+

Returns 0 if index was invalid.

+
See also:
insertArea(int, WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + +
const std::vector< WAbstractArea * > Wt::WPaintedWidget::areas ( ) const
+
+
+ +

Returns the interactive areas set for this widget.

+
See also:
addArea()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPaintedWidget::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPaintedWidget::insertArea (int  index,
WAbstractArea area 
)
+
+
+ +

Inserts an interactive area.

+

Inserts the area which listens to events in the coresponding area of the widget. Areas are organized in a list, and the area is inserted at index index. When areas overlap, the area with the lowest index receives the event.

+

Ownership of the Area is transferred to the widget.

+
Note:
When defining at least one area, no more events will propagate to the widget itself. As a work-around, you can emulate this by listening for events on a WRectArea that corresponds to the whole widget, and which is added as the last area (catching all events that were not caught by preceding areas).
+
See also:
addArea(WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPaintedWidget::layoutSizeChanged (int  width,
int  height 
) [protected, virtual]
+
+
+ +

Virtual method that indicates a size change.

+

This method propagates the client-side width and height of the widget when the widget is contained by a layout manager and setLayoutSizeAware(true) was called.

+
See also:
setLayoutSizeAware()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WPaintedWidget::paintEvent (WPaintDevice paintDevice ) [protected, pure virtual]
+
+
+ +

Paints the widget.

+

You should reimplement this method to paint the contents of the widget, using the given paintDevice.

+ +

Implemented in Wt::Chart::WCartesianChart, and Wt::Chart::WPieChart.

+ +
+
+ +
+
+ + + + + + + +
Method Wt::WPaintedWidget::preferredMethod ( ) const
+
+
+ +

Returns the preferred rendering method.

+
See also:
setPreferredMethod(Method)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPaintedWidget::removeArea (WAbstractArea area )
+
+
+ +

Removes an interactive area.

+

Removes the area from this widget, returning the ownership.

+
See also:
addArea(WAbstractArea *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPaintedWidget::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPaintedWidget::setPreferredMethod (Method  method )
+
+
+ +

Sets the preferred rendering method.

+

When method is supported by the browser, then it is chosen for rendering.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPaintedWidget::update (WFlags< PaintFlag flags = 0 )
+
+
+ +

Lets the widget repaint itself.

+

Repainting is not immediate, but happens after when the event loop is exited.

+

Unless a Wt::PaintUpdate paint flag is set, the widget is first cleared.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.map new file mode 100644 index 0000000..b5c8a95 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.md5 new file mode 100644 index 0000000..148cce6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.md5 @@ -0,0 +1 @@ +5b189d663190779a85e36860c17daa28 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.png new file mode 100644 index 0000000..f57ef17 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPaintedWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter-members.html new file mode 100644 index 0000000..c889245 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter-members.html @@ -0,0 +1,154 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPainter Member List

+
+
+This is the complete list of members for Wt::WPainter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Antialiasing enum valueWt::WPainter
begin(WPaintDevice *device)Wt::WPainter
brush() const Wt::WPainter
clipPath() const Wt::WPainter
combinedTransform() const Wt::WPainter
device() const Wt::WPainter
drawArc(const WRectF &rectangle, int startAngle, int spanAngle)Wt::WPainter
drawArc(double x, double y, double width, double height, int startAngle, int spanAngle)Wt::WPainter
drawChord(const WRectF &rectangle, int startAngle, int spanAngle)Wt::WPainter
drawChord(double x, double y, double width, double height, int startAngle, int spanAngle)Wt::WPainter
drawEllipse(const WRectF &rectangle)Wt::WPainter
drawEllipse(double x, double y, double width, double height)Wt::WPainter
drawImage(const WPointF &point, const Image &image)Wt::WPainter
drawImage(const WPointF &point, const Image &image, const WRectF &sourceRect)Wt::WPainter
drawImage(const WRectF &rect, const Image &image)Wt::WPainter
drawImage(const WRectF &rect, const Image &image, const WRectF &sourceRect)Wt::WPainter
drawImage(double x, double y, const Image &image, double sx=0, double sy=0, double sw=-1, double sh=-1)Wt::WPainter
drawLine(const WLineF &line)Wt::WPainter
drawLine(const WPointF &p1, const WPointF &p2)Wt::WPainter
drawLine(double x1, double y1, double x2, double y2)Wt::WPainter
drawLines(const WLineF *lines, int lineCount)Wt::WPainter
drawLines(const WPointF *pointPairs, int lineCount)Wt::WPainter
drawLines(const std::vector< WLineF > &lines)Wt::WPainter
drawLines(const std::vector< WPointF > &pointPairs)Wt::WPainter
drawPath(const WPainterPath &path)Wt::WPainter
drawPie(const WRectF &rectangle, int startAngle, int spanAngle)Wt::WPainter
drawPie(double x, double y, double width, double height, int startAngle, int spanAngle)Wt::WPainter
drawPoint(const WPointF &position)Wt::WPainter
drawPoint(double x, double y)Wt::WPainter
drawPoints(const WPointF *points, int pointCount)Wt::WPainter
drawPolygon(const WPointF *points, int pointCount)Wt::WPainter
drawPolyline(const WPointF *points, int pointCount)Wt::WPainter
drawRect(const WRectF &rectangle)Wt::WPainter
drawRect(double x, double y, double width, double height)Wt::WPainter
drawRects(const WRectF *rectangles, int rectCount)Wt::WPainter
drawRects(const std::vector< WRectF > &rectangles)Wt::WPainter
drawText(const WRectF &rectangle, WFlags< AlignmentFlag > flags, const WString &text)Wt::WPainter
drawText(double x, double y, double width, double height, WFlags< AlignmentFlag > flags, const WString &text)Wt::WPainter
end()Wt::WPainter
fillPath(const WPainterPath &path, const WBrush &brush)Wt::WPainter
fillRect(const WRectF &rectangle, const WBrush &brush)Wt::WPainter
fillRect(double x, double y, double width, double height, const WBrush &brush)Wt::WPainter
font() const Wt::WPainter
hasClipping() const Wt::WPainter
isActive() const Wt::WPainter
LowQualityShadows enum valueWt::WPainter
pen() const Wt::WPainter
RenderHint enum nameWt::WPainter
renderHints() const Wt::WPainter
resetTransform()Wt::WPainter
restore()Wt::WPainter
rotate(double angle)Wt::WPainter
save()Wt::WPainter
scale(double sx, double sy)Wt::WPainter
setBrush(const WBrush &brush)Wt::WPainter
setClipPath(const WPainterPath &clipPath)Wt::WPainter
setClipping(bool enable)Wt::WPainter
setFont(const WFont &font)Wt::WPainter
setPen(const WPen &pen)Wt::WPainter
setRenderHint(RenderHint hint, bool on=true)Wt::WPainter
setShadow(const WShadow &shadow)Wt::WPainter
setViewPort(const WRectF &viewPort)Wt::WPainter
setViewPort(double x, double y, double width, double height)Wt::WPainter
setWindow(const WRectF &window)Wt::WPainter
setWindow(double x, double y, double width, double height)Wt::WPainter
setWorldTransform(const WTransform &matrix, bool combine=false)Wt::WPainter
shadow() const Wt::WPainter
strokePath(const WPainterPath &path, const WPen &pen)Wt::WPainter
translate(const WPointF &offset)Wt::WPainter
translate(double dx, double dy)Wt::WPainter
viewPort() const Wt::WPainter
window() const Wt::WPainter
worldTransform() const Wt::WPainter
WPainter()Wt::WPainter
WPainter(WPaintDevice *device)Wt::WPainter
~WPainter()Wt::WPainter
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter.html new file mode 100644 index 0000000..0c91027 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter.html @@ -0,0 +1,2388 @@ + + + + +Wt: Wt::WPainter Class Reference + + + + + + + + + +
+ +
+

Wt::WPainter Class Reference
+ +[Painting system] +

+
+
+ +

Vector graphics painting class. +More...

+ +

#include <Wt/WPainter>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Image
 An image that can be rendered on a WPainter. More...

+Public Types

enum  RenderHint { Antialiasing = 1, +LowQualityShadows = 2 + }
 

Enumeration for render hints.

+ More...

+Public Member Functions

 WPainter ()
 Default constructor.
WPainter (WPaintDevice *device)
 Creates a painter on a given paint device.
~WPainter ()
 Destructor.
bool begin (WPaintDevice *device)
 Begins painting on a paint device.
bool isActive () const
 Returns whether this painter is active on a paint device.
bool end ()
 Ends painting.
WPaintDevicedevice () const
 Returns the device on which this painter is active (or 0 if not active).
void setRenderHint (RenderHint hint, bool on=true)
 Sets a render hint.
int renderHints () const
 Returns the current render hints.
void drawArc (const WRectF &rectangle, int startAngle, int spanAngle)
 Draws an arc.
void drawArc (double x, double y, double width, double height, int startAngle, int spanAngle)
 Draws an arc.
void drawChord (const WRectF &rectangle, int startAngle, int spanAngle)
 Draws a chord.
void drawChord (double x, double y, double width, double height, int startAngle, int spanAngle)
 Draws a chord.
void drawEllipse (const WRectF &rectangle)
 Draws an ellipse.
void drawEllipse (double x, double y, double width, double height)
 Draws an ellipse.
void drawImage (const WPointF &point, const Image &image)
 Draws an image.
void drawImage (const WPointF &point, const Image &image, const WRectF &sourceRect)
 Draws part of an image.
void drawImage (const WRectF &rect, const Image &image)
 Draws an image inside a rectangle.
void drawImage (const WRectF &rect, const Image &image, const WRectF &sourceRect)
 Draws part of an image inside a rectangle.
void drawImage (double x, double y, const Image &image, double sx=0, double sy=0, double sw=-1, double sh=-1)
 Draws part of an image.
void drawLine (const WLineF &line)
 Draws a line.
void drawLine (const WPointF &p1, const WPointF &p2)
 Draws a line.
void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
void drawLines (const WLineF *lines, int lineCount)
 Draws an array of lines.
void drawLines (const WPointF *pointPairs, int lineCount)
 Draws an array of lines.
void drawLines (const std::vector< WLineF > &lines)
 Draws an array of lines.
void drawLines (const std::vector< WPointF > &pointPairs)
 Draws an array of lines.
void drawPath (const WPainterPath &path)
 Draws a (complex) path.
void drawPie (const WRectF &rectangle, int startAngle, int spanAngle)
 Draws a pie.
void drawPie (double x, double y, double width, double height, int startAngle, int spanAngle)
 Draws a pie.
void drawPoint (const WPointF &position)
 Draws a point.
void drawPoint (double x, double y)
 Draws a point.
void drawPoints (const WPointF *points, int pointCount)
 Draws a number of points.
void drawPolygon (const WPointF *points, int pointCount)
 Draws a polygon.
void drawPolyline (const WPointF *points, int pointCount)
 Draws a polyline.
void drawRect (const WRectF &rectangle)
 Draws a rectangle.
void drawRect (double x, double y, double width, double height)
 Draws a rectangle.
void drawRects (const WRectF *rectangles, int rectCount)
 Draws a number of rectangles.
void drawRects (const std::vector< WRectF > &rectangles)
 Draws a number of rectangles.
void drawText (const WRectF &rectangle, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
void drawText (double x, double y, double width, double height, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
void fillPath (const WPainterPath &path, const WBrush &brush)
 Fills a (complex) path.
void fillRect (const WRectF &rectangle, const WBrush &brush)
 Fills a rectangle.
void fillRect (double x, double y, double width, double height, const WBrush &brush)
 Fills a rectangle.
void strokePath (const WPainterPath &path, const WPen &pen)
 Strokes a path.
void setShadow (const WShadow &shadow)
 Sets a shadow effect.
const WShadowshadow () const
 Returns the current shadow effect.
void setBrush (const WBrush &brush)
 Sets the fill style.
void setFont (const WFont &font)
 Sets the font.
void setPen (const WPen &pen)
 Sets the pen.
const WBrushbrush () const
 Returns the current brush.
const WFontfont () const
 Returns the current font.
const WPenpen () const
 Returns the current pen.
void setClipping (bool enable)
 Enables or disables clipping.
bool hasClipping () const
 Returns whether clipping is enabled.
void setClipPath (const WPainterPath &clipPath)
 Sets the clip path.
WPainterPath clipPath () const
 Returns the clip path.
void resetTransform ()
 Resets the current transformation.
void rotate (double angle)
 Rotates the logical coordinate system.
void scale (double sx, double sy)
 Scales the logical coordinate system.
void translate (const WPointF &offset)
 Translates the origin of the logical coordinate system.
void translate (double dx, double dy)
 Translates the origin of the logical coordinate system.
void setWorldTransform (const WTransform &matrix, bool combine=false)
 Sets a transformation for the logical coordinate system.
const WTransformworldTransform () const
 Returns the current world transformation matrix.
void save ()
 Saves the current state.
void restore ()
 Returns the last save state.
void setViewPort (const WRectF &viewPort)
 Sets the viewport.
void setViewPort (double x, double y, double width, double height)
 Sets the viewport.
WRectF viewPort () const
 Returns the viewport.
void setWindow (const WRectF &window)
 Sets the window.
void setWindow (double x, double y, double width, double height)
 Sets the window.
WRectF window () const
 Returns the current window.
WTransform combinedTransform () const
 Returns the combined transformation matrix.
+

Detailed Description

+

Vector graphics painting class.

+

The painter class provides a vector graphics interface for painting. It needs to be used in conjunction with a WPaintDevice, onto which it paints. To start painting on a device, either pass the device through the constructor, or use begin().

+

A typical use is to instantiate a WPainter from within a specialized WPaintedWidget::paintEvent() implementation, to paint on the given paint device, but you can also use a painter to paint directly to a particular paint device of choice, for example to create SVG, PDF or PNG images (as resources).

+

The painter maintains state such as the current pen, brush, font, shadow, transformation and clipping settings (see setClipping() and setClipPath()). A particular state can be saved using save() and later restored using restore().

+

The painting system distinguishes between device coordinates, logical coordinates, and local coordinates. The device coordinate system ranges from (0, 0) in the top left corner of the device, to (device->width().toPixels(), device->height().toPixels()) for the bottom right corner. The logical coordinate system defines a coordinate system that may be chosen independent of the geometry of the device, which is convenient to make abstraction of the actual device size. Finally, the current local coordinate system may be different from the logical coordinate system because of a transformation set (using translate(), rotate(), and scale()). Initially, the local coordinate system coincides with the logical coordinate system, which coincides with the device coordinate system.

+

The device coordinates are defined in terms of pixels. Even though most underlying devices are actual vector graphics formats, when used in conjunction with a WPaintedWidget, these vector graphics are rendered by the browser onto a pixel-based canvas (like the rest of the user-interface). The coordinates are defined such that integer values correspond to an imaginary raster which separates the individual pixels, as in the figure below.

+
+WPainter.png +

The device coordinate system for a 6x5 pixel device

+

As a consequence, to avoid anti-aliasing effects when drawing straight lines of width one pixel, you will need to use vertices that indicate the middle of a pixel to get a crisp one-pixel wide line, as in the example figure.

+

By setting a viewPort() and a window(), a viewPort transformation is defined which maps logical coordinates onto device coordinates. By changing the world transformation (using setWorldTransform(), or translate(), rotate(), scale() operations), it is defined how current local coordinates map onto logical coordinates.

+

The painter provides support for clipping using an arbitrary path, but not that the VmlImage only has limited support for clipping.

+

Usage example:

+
 class MyPaintedWidget : public Wt::WPaintedWidget
+ {
+ public:
+   MyPaintedWidget(Wt::WContainerWidget *parent = 0)
+     : Wt::WPaintedWidget(parent),
+       foo_(100)
+   {
+      resize(200, 200); // provide a default size
+   }
+
+   void setFoo(int foo) {
+      foo_ = foo;
+      update(); // trigger a repaint
+   }
+
+ protected:
+   void paintEvent(Wt::WPaintedWidget *paintDevice) {
+     Wt::WPainter painter(paintDevice);
+     painter.drawLine(20, 20, foo_, foo_);
+     ...
+   }
+
+ private:
+   int foo_;
+ };
+
See also:
WPaintedWidget::paintEvent(WPaintDevice *)
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WPainter::RenderHint
+
+
+ +

Enumeration for render hints.

+
Enumerator:
+ + +
Antialiasing  +

Antialiasing.

+
LowQualityShadows  +

Use low-quality shadows (applies only to VML)

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPainter::WPainter ( )
+
+
+ +

Default constructor.

+

Before painting, you must invoke begin(WPaintDevice *) on a paint device.

+
See also:
WPainter(WPaintDevice *)
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool Wt::WPainter::begin (WPaintDevice device )
+
+
+ +

Begins painting on a paint device.

+
See also:
end(), isActive()
+ +
+
+ +
+
+ + + + + + + +
const WBrush& Wt::WPainter::brush ( ) const
+
+
+ +

Returns the current brush.

+

Returns the brush style that is currently used for filling.

+
See also:
setBrush(const WBrush&)
+ +
+
+ +
+
+ + + + + + + +
WPainterPath Wt::WPainter::clipPath ( ) const
+
+
+ +

Returns the clip path.

+

The clip path is returned as it was defined: in the local coordinates at time of definition.

+
See also:
setClipPath(const WPainterPath&)
+ +
+
+ +
+
+ + + + + + + +
WTransform Wt::WPainter::combinedTransform ( ) const
+
+
+ +

Returns the combined transformation matrix.

+

Returns the transformation matrix that maps coordinates to device coordinates. It is the combination of the current world transformation (which defines the transformation within the logical coordinate system) and the window/viewport transformation (which transforms logical coordinates to device coordinates).

+
See also:
setWorldTransform(), setViewPort(), setWindow()
+ +
+
+ +
+
+ + + + + + + +
WPaintDevice* Wt::WPainter::device ( ) const
+
+
+ +

Returns the device on which this painter is active (or 0 if not active).

+
See also:
begin(WPaintDevice *), WPainter(WPaintDevice *), isActive()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawArc (double  x,
double  y,
double  width,
double  height,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws an arc.

+

This is an overloaded method for convenience.

+
See also:
drawArc(const WRectF&, int, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawArc (const WRectF rectangle,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws an arc.

+

Draws an arc using the current pen, and fills using the current brush.

+

The arc is defined as a segment from an ellipse, which fits in the rectangle. The segment starts at startAngle, and spans an angle given by spanAngle. These angles have as unit 1/16th of a degree, and are measured counter-clockwise starting from the 3 o'clock position.

+
See also:
drawEllipse(const WRectF&), drawChord(const WRectF&, int, int)
+
+drawArc(double, double, double, double, int, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawChord (const WRectF rectangle,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws a chord.

+

Draws an arc using the current pen, and connects start and end point with a line. The area is filled using the current brush.

+

The arc is defined as a segment from an ellipse, which fits in the rectangle. The segment starts at startAngle, and spans an angle given by spanAngle. These angles have as unit 1/16th of a degree, and are measured counter-clockwise starting at 3 o'clock.

+
See also:
drawEllipse(const WRectF&), drawArc(const WRectF&, int, int)
+
+drawChord(double, double, double, double, int, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawChord (double  x,
double  y,
double  width,
double  height,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws a chord.

+

This is an overloaded method for convenience.

+
See also:
drawChord(const WRectF&, int, int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawEllipse (const WRectF rectangle )
+
+
+ +

Draws an ellipse.

+

Draws an ellipse using the current pen and fills it using the current brush.

+

The ellipse is defined as being bounded by the rectangle.

+
See also:
drawArc(const WRectF&, int, int)
+
+drawEllipse(double, double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawEllipse (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Draws an ellipse.

+

This is an overloaded method for convenience.

+
See also:
drawEllipse(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawImage (const WRectF rect,
const Image image,
const WRectF sourceRect 
)
+
+
+ +

Draws part of an image inside a rectangle.

+

Draws the sourceRect rectangle from an image inside rect (If necessary, the image is scaled to fit into the rectangle).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawImage (double  x,
double  y,
const Image image,
double  sx = 0,
double  sy = 0,
double  sw = -1,
double  sh = -1 
)
+
+
+ +

Draws part of an image.

+

Draws the sourceRect rectangle with top left corner (sx, sy) and size sw x sh from an image to the location (x, y).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawImage (const WPointF point,
const Image image 
)
+
+
+ +

Draws an image.

+

Draws the image so that the top left corner corresponds to point.

+

This is an overloaded method provided for convenience.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawImage (const WPointF point,
const Image image,
const WRectF sourceRect 
)
+
+
+ +

Draws part of an image.

+

Draws the sourceRect rectangle from an image to the location point.

+

This is an overloaded method provided for convenience.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawImage (const WRectF rect,
const Image image 
)
+
+
+ +

Draws an image inside a rectangle.

+

Draws the image inside rect (If necessary, the image is scaled to fit into the rectangle).

+

This is an overloaded method provided for convenience.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawLine (const WLineF line )
+
+
+ +

Draws a line.

+

Draws a line using the current pen.

+
See also:
drawLine(const WPointF&, const WPointF&), drawLine(double, double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawLine (const WPointF p1,
const WPointF p2 
)
+
+
+ +

Draws a line.

+

Draws a line defined by two points.

+
See also:
drawLine(const WLineF&), drawLine(double, double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
)
+
+
+ +

Draws a line.

+

Draws a line defined by two points.

+
See also:
drawLine(const WLineF&), drawLine(const WPointF&, const WPointF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawLines (const WLineF lines,
int  lineCount 
)
+
+
+ +

Draws an array of lines.

+

Draws the lineCount first lines from the given array of lines.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawLines (const WPointF pointPairs,
int  lineCount 
)
+
+
+ +

Draws an array of lines.

+

Draws lineCount lines, where each line is specified using a begin and end point that are read from an array. Thus, the pointPairs array must have at least 2*lineCount points.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawLines (const std::vector< WLineF > &  lines )
+
+
+ +

Draws an array of lines.

+

Draws the lines given in the vector.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawLines (const std::vector< WPointF > &  pointPairs )
+
+
+ +

Draws an array of lines.

+

Draws a number of lines that are specified by pairs of begin- and endpoints. The vector should hold a number of points that is a multiple of two.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawPath (const WPainterPath path )
+
+
+ +

Draws a (complex) path.

+

Draws and fills the given path using the current pen and brush.

+
See also:
strokePath(const WPainterPath&, const WPen&), fillPath(const WPainterPath&, const WBrush&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPie (const WRectF rectangle,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws a pie.

+

Draws an arc using the current pen, and connects start and end point with the center of the corresponding ellipse. The area is filled using the current brush.

+

The arc is defined as a segment from an ellipse, which fits in the rectangle. The segment starts at startAngle, and spans an angle given by spanAngle. These angles have as unit 1/16th of a degree, and are measured counter-clockwise starting at 3 o'clock.

+
See also:
drawEllipse(const WRectF&), drawArc(const WRectF&, int, int)
+
+drawPie(double, double, double, double, int, int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPie (double  x,
double  y,
double  width,
double  height,
int  startAngle,
int  spanAngle 
)
+
+
+ +

Draws a pie.

+

This is an overloaded method for convenience.

+
See also:
drawPie(const WRectF&, int, int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawPoint (const WPointF position )
+
+
+ +

Draws a point.

+

Draws a single point using the current pen. This is implemented by drawing a very short line, centered around the given position. To get the result of a single point, you should use a pen with a Wt::SquareCap or Wt::RoundCap pen cap style.

+
See also:
drawPoint(double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPoint (double  x,
double  y 
)
+
+
+ +

Draws a point.

+

This is an overloaded method for convenience.

+
See also:
drawPoint(const WPointF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPoints (const WPointF points,
int  pointCount 
)
+
+
+ +

Draws a number of points.

+

Draws the pointCount first points from the given array of points.

+
See also:
drawPoint(const WPointF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPolygon (const WPointF points,
int  pointCount 
)
+
+
+ +

Draws a polygon.

+

Draws a polygon that is specified by a list of points, using the current pen. The polygon is closed by connecting the last point with the first point, and filled using the current brush.

+
See also:
drawPath(const WPainterPath&), drawPolyline()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawPolyline (const WPointF points,
int  pointCount 
)
+
+
+ +

Draws a polyline.

+

Draws a polyline that is specified by a list of points, using the current pen.

+
See also:
drawPath(const WPainterPath&), drawPolygon()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawRect (const WRectF rectangle )
+
+
+ +

Draws a rectangle.

+

Draws and fills a rectangle using the current pen and brush.

+
See also:
drawRect(double, double, double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawRect (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Draws a rectangle.

+

This is an overloaded method for convenience.

+
See also:
drawRect(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawRects (const WRectF rectangles,
int  rectCount 
)
+
+
+ +

Draws a number of rectangles.

+

Draws and fills the rectCount first rectangles from the given array, using the current pen and brush.

+
See also:
drawRect(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::drawRects (const std::vector< WRectF > &  rectangles )
+
+
+ +

Draws a number of rectangles.

+

Draws and fills a list of rectangles using the current pen and brush.

+
See also:
drawRect(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawText (const WRectF rectangle,
WFlags< AlignmentFlag flags,
const WString text 
)
+
+
+ +

Draws text.

+

Draws text using inside the rectangle, using the current font. The text is aligned inside the rectangle following alignment indications given in flags. The text is drawn using the current transformation, pen color (pen()) and font settings (font()).

+

Flags is the logical OR of a horizontal and vertical alignment. Horizontal alignment may be one of AlignLeft, AlignCenter, or AlignRight. Vertical alignment is one of AlignTop, AlignMiddle or AlignBottom.

+
Note:
HtmlCanvas: on older browsers implementing Html5 canvas, text will be rendered horizontally (unaffected by rotation and unaffected by the scaling component of the transformation matrix). In that case, text is overlayed on top of painted shapes (in DOM div's), and is not covered by shapes that are painted after the text. Use the SVG and VML renderers (WPaintedWidget::inlineSvgVml) for the most accurate font rendering. Native HTML5 text rendering is supported on Firefox3+, Chrome2+ and Safari4+.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::drawText (double  x,
double  y,
double  width,
double  height,
WFlags< AlignmentFlag flags,
const WString text 
)
+
+
+ +

Draws text.

+

This is an overloaded method for convenience.

+
See also:
drawText(const WRectF&, WFlags<AlignmentFlag>, const WString&)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPainter::end ( )
+
+
+ +

Ends painting.

+

This method is called automatically from the destructor.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::fillPath (const WPainterPath path,
const WBrush brush 
)
+
+
+ +

Fills a (complex) path.

+

Like drawPath(const WPainterPath&), but does not stroke the path, and fills the path with the given brush.

+
See also:
drawPath(const WPainterPath&), strokePath(const WPainterPath&, const WPen&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::fillRect (const WRectF rectangle,
const WBrush brush 
)
+
+
+ +

Fills a rectangle.

+

Like drawRect(const WRectF&), but does not stroke the rect, and fills the rect with the given brush.

+
See also:
drawRect(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::fillRect (double  x,
double  y,
double  width,
double  height,
const WBrush brush 
)
+
+
+ +

Fills a rectangle.

+

This is an overloaded method for convenience.

+
See also:
fillRect(const WRectF&, const WBrush&)
+ +
+
+ +
+
+ + + + + + + +
const WFont& Wt::WPainter::font ( ) const
+
+
+ +

Returns the current font.

+

Returns the font that is currently used for rendering text. The default font is a 10pt sans serif font.

+
See also:
setFont(const WFont&)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPainter::hasClipping ( ) const
+
+
+ +

Returns whether clipping is enabled.

+

Note: Clipping is not supported for the VML renderer.

+
See also:
setClipping(bool), setClipPath(const WPainterPath&)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPainter::isActive ( ) const
+
+
+ +

Returns whether this painter is active on a paint device.

+
See also:
begin(WPaintDevice *), end()
+ +
+
+ +
+
+ + + + + + + +
const WPen& Wt::WPainter::pen ( ) const
+
+
+ +

Returns the current pen.

+

Returns the pen that is currently used for stroking.

+
See also:
setPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WPainter::renderHints ( ) const
+
+
+ +

Returns the current render hints.

+

Returns the logical OR of render hints currently set.

+
See also:
setRenderHint(RenderHint, bool).
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPainter::resetTransform ( )
+
+
+ +

Resets the current transformation.

+

Resets the current transformation to the identity transformation matrix, so that the logical coordinate system coincides with the device coordinate system.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WPainter::restore ( )
+
+
+ +

Returns the last save state.

+

Pops the last saved state from the state stack.

+
See also:
save()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::rotate (double  angle )
+
+
+ +

Rotates the logical coordinate system.

+

Rotates the logical coordinate system around its origin. The angle is specified in degrees, and positive values are clock-wise.

+
See also:
scale(double, double), translate(double, double), resetTransform()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPainter::save ( )
+
+
+ +

Saves the current state.

+

A copy of the current state is saved on a stack. This state will may later be restored by popping this state from the stack using restore().

+

The state that is saved is the current pen, brush, font, shadow, transformation and clipping settings (see setClipping() and setClipPath()).

+
See also:
restore()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::scale (double  sx,
double  sy 
)
+
+
+ +

Scales the logical coordinate system.

+

Scales the logical coordinate system around its origin, by a factor in the X and Y directions.

+
See also:
rotate(double), translate(double, double), resetTransform()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setBrush (const WBrush brush )
+
+
+ +

Sets the fill style.

+

Changes the fills style for subsequent draw operations.

+
See also:
brush(), setPen(const WPen&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setClipPath (const WPainterPath clipPath )
+
+
+ +

Sets the clip path.

+

Sets the path that is used for clipping subsequent drawing operations. The clip path is only used when clipping is enabled using setClipping(bool). The path is specified in local coordinates.

+

Note: Only clipping with a rectangle is supported for the VML renderer (see WPainterPath::addRect()). The rectangle must, after applying the combined transformation system, be aligned with the window.

+
See also:
clipPath(), setClipping(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setClipping (bool  enable )
+
+
+ +

Enables or disables clipping.

+

Enables are disables clipping for subsequent operations using the current clip path set using setClipPath().

+

Note: Clipping is not supported for the VML renderer.

+
See also:
hasClipping(), setClipPath(const WPainterPath&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setFont (const WFont font )
+
+
+ +

Sets the font.

+

Changes the font for subsequent text rendering. Note that only font sizes that are defined as an explicit size (see WFont::FixedSize) will render correctly in all devices (SVG, VML, and HtmlCanvas).

+
See also:
font(), drawText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setPen (const WPen pen )
+
+
+ +

Sets the pen.

+

Changes the pen used for stroking subsequent draw operations.

+
See also:
pen(), setBrush(const WBrush&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::setRenderHint (RenderHint  hint,
bool  on = true 
)
+
+
+ +

Sets a render hint.

+

Renderers may ignore particular hints for which they have no support.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setShadow (const WShadow shadow )
+
+
+ +

Sets a shadow effect.

+

The shadow effect is applied to all things drawn (paths, text and images).

+
Note:
With the VML backend (IE), the shadow is not applied to images, and the shadow color is always black; only the opacity (alpha) channel is taken into account.
+
See also:
LowQualityShadows render hint
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setViewPort (const WRectF viewPort )
+
+
+ +

Sets the viewport.

+

Selects the part of the device that will correspond to the logical coordinate system.

+

By default, the viewport spans the entire device: it is the rectangle (0, 0) to (device->width(), device->height()). The window defines how the viewport is mapped to logical coordinates.

+
See also:
viewPort(), setWindow(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::setViewPort (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Sets the viewport.

+

This is an overloaded method for convenience.

+
See also:
setViewPort(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainter::setWindow (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Sets the window.

+

This is an overloaded method for convenience.

+
See also:
setWindow(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::setWindow (const WRectF window )
+
+
+ +

Sets the window.

+

Defines the viewport rectangle in logical coordinates, and thus how logical coordinates map onto the viewPort.

+

By default, is (0, 0) to (device->width(), device->height()). Thus, the default window and viewport leave logical coordinates identical to device coordinates.

+
See also:
window(), setViewPort(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::setWorldTransform (const WTransform matrix,
bool  combine = false 
)
+
+
+ +

Sets a transformation for the logical coordinate system.

+

Sets a new transformation which transforms logical coordinates to device coordinates. When combine is true, the transformation is combined with the current world transformation matrix.

+
See also:
worldTransform()
+
+rotate(double), scale(double, double), translate(double, double)
+
+resetTransform()
+ +
+
+ +
+
+ + + + + + + +
const WShadow& Wt::WPainter::shadow ( ) const
+
+
+ +

Returns the current shadow effect.

+
See also:
setShadow()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::strokePath (const WPainterPath path,
const WPen pen 
)
+
+
+ +

Strokes a path.

+

Like drawPath(const WPainterPath&), but does not fill the path, and strokes the path with the given pen.

+
See also:
drawPath(const WPainterPath&), fillPath(const WPainterPath&, const WBrush&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainter::translate (double  dx,
double  dy 
)
+
+
+ +

Translates the origin of the logical coordinate system.

+

Translates the origin of the logical coordinate system to a new location relative to the logical coordinate system.

+
See also:
translate(const WPointF& offset), rotate(double), scale(double, double), resetTransform()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainter::translate (const WPointF offset )
+
+
+ +

Translates the origin of the logical coordinate system.

+

Translates the origin of the logical coordinate system to a new location relative to the current logical coordinate system.

+
See also:
translate(double, double), rotate(double), scale(double, double), resetTransform()
+ +
+
+ +
+
+ + + + + + + +
WRectF Wt::WPainter::viewPort ( ) const
+
+
+ +

Returns the viewport.

+
See also:
setViewPort(const WRectF&)
+ +
+
+ +
+
+ + + + + + + +
WRectF Wt::WPainter::window ( ) const
+
+
+ +

Returns the current window.

+
See also:
setViewPort(const WRectF&)
+ +
+
+ +
+
+ + + + + + + +
const WTransform& Wt::WPainter::worldTransform ( ) const
+
+
+ +

Returns the current world transformation matrix.

+
See also:
setWorldTransform()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath-members.html new file mode 100644 index 0000000..4880b9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath-members.html @@ -0,0 +1,105 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPainterPath Member List

+
+
+This is the complete list of members for Wt::WPainterPath, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addEllipse(const WRectF &boundingRectangle)Wt::WPainterPath
addEllipse(double x, double y, double width, double height)Wt::WPainterPath
addPath(const WPainterPath &path)Wt::WPainterPath
addRect(const WRectF &rectangle)Wt::WPainterPath
addRect(double x, double y, double width, double height)Wt::WPainterPath
arcMoveTo(double cx, double cy, double radius, double angle)Wt::WPainterPath
arcMoveTo(double x, double y, double width, double height, double angle)Wt::WPainterPath
arcTo(double cx, double cy, double radius, double startAngle, double sweepLength)Wt::WPainterPath
closeSubPath()Wt::WPainterPath
connectPath(const WPainterPath &path)Wt::WPainterPath
controlPointRect() const Wt::WPainterPath
cubicTo(const WPointF &c1, const WPointF &c2, const WPointF &endPoint)Wt::WPainterPath
cubicTo(double c1x, double c1y, double c2x, double c2y, double endPointx, double endPointy)Wt::WPainterPath
currentPosition() const Wt::WPainterPath
isEmpty() const Wt::WPainterPath
lineTo(const WPointF &point)Wt::WPainterPath
lineTo(double x, double y)Wt::WPainterPath
moveTo(const WPointF &point)Wt::WPainterPath
moveTo(double x, double y)Wt::WPainterPath
operator!=(const WPainterPath &path) const Wt::WPainterPath
operator=(const WPainterPath &path)Wt::WPainterPath
operator==(const WPainterPath &path) const Wt::WPainterPath
quadTo(const WPointF &c, const WPointF &endPoint)Wt::WPainterPath
quadTo(double cx, double cy, double endPointx, double endPointy)Wt::WPainterPath
WPainterPath()Wt::WPainterPath
WPainterPath(const WPointF &startPoint)Wt::WPainterPath
WPainterPath(const WPainterPath &path)Wt::WPainterPath
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath.html new file mode 100644 index 0000000..00bc1db --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath.html @@ -0,0 +1,919 @@ + + + + +Wt: Wt::WPainterPath Class Reference + + + + + + + + + +
+ +
+

Wt::WPainterPath Class Reference
+ +[Painting system] +

+
+
+ +

A path defining a shape. +More...

+ +

#include <Wt/WPainterPath>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Segment
 A segment. More...

+Public Member Functions

 WPainterPath ()
 Default constructor.
 WPainterPath (const WPointF &startPoint)
 Construct a new path, and set the initial position.
WPainterPath (const WPainterPath &path)
 Copy constructor.
+WPainterPathoperator= (const WPainterPath &path)
 Assignment operator.
WPointF currentPosition () const
 Returns the current position.
bool isEmpty () const
 Returns whether the path is empty.
bool operator== (const WPainterPath &path) const
 Comparison operator.
bool operator!= (const WPainterPath &path) const
 Comparison operator.
void closeSubPath ()
 Closes the last sub path.
void moveTo (const WPointF &point)
 Moves the current position to a new location.
void moveTo (double x, double y)
 Moves the current position to a new location.
void lineTo (const WPointF &point)
 Draws a straight line.
void lineTo (double x, double y)
 Draws a straight line.
void cubicTo (const WPointF &c1, const WPointF &c2, const WPointF &endPoint)
 Draws a cubic bezier curve.
void cubicTo (double c1x, double c1y, double c2x, double c2y, double endPointx, double endPointy)
 Draws a cubic bezier curve.
void arcTo (double cx, double cy, double radius, double startAngle, double sweepLength)
 Draws an arc.
void arcMoveTo (double cx, double cy, double radius, double angle)
 Moves to a point on an arc.
void arcMoveTo (double x, double y, double width, double height, double angle)
 Move to a point on an arc.
void quadTo (const WPointF &c, const WPointF &endPoint)
 Draws a quadratic bezier curve.
void quadTo (double cx, double cy, double endPointx, double endPointy)
 Draws a quadratic bezier curve.
void addEllipse (const WRectF &boundingRectangle)
 Draws an ellipse.
void addEllipse (double x, double y, double width, double height)
 Draws an ellipse.
void addRect (const WRectF &rectangle)
 Draws a rectangle.
void addRect (double x, double y, double width, double height)
 Draws a rectangle.
void addPath (const WPainterPath &path)
 Adds a path.
void connectPath (const WPainterPath &path)
 Adds a path, connecting.
WRectF controlPointRect () const
 Returns the bounding box of the control points.
+

Detailed Description

+

A path defining a shape.

+

A painter path represents a (complex) path that may be composed of lines, arcs and bezier curve segments, and painted onto a paint device using WPainter::drawPath().

+

The path that is composed in a painter path may consist of multiple closed sub-paths. Only the last sub-path can be left open.

+

To compose a path, this class maintains a current position, which is the starting point for the next drawing operation. An operation may draw a line (see lineTo()), arc (see arcTo()), or bezier curve (see quadTo() and cubicTo()) from the current position to a new position. A new sub path may be started by moving the current position to a new location (see moveTo()), which automatically closes the previous sub path.

+

When sub paths overlap, the result is undefined (it is dependent on the underlying painting device).

+

Usage example:

+
 Wt::WPainter painter(...);
+
+ Wt::WPainterPath path(Wt::WPointF(10, 10));
+ path.lineTo(10, 20);
+ path.lineTo(30, 20);
+ path.closeSubPath();
+
+ painter.setPen(Wt::red);
+ painter.setBrush(Wt::blue);
+ painter.drawPath(path);
+
See also:
WPainter::drawPath()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPainterPath::WPainterPath ( )
+
+
+ +

Default constructor.

+

Creates an empty path, and sets the current position to (0, 0).

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPainterPath::WPainterPath (const WPointF startPoint )
+
+
+ +

Construct a new path, and set the initial position.

+

Creates an empty path, and sets the current position to startPoint.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WPainterPath::addEllipse (const WRectF boundingRectangle )
+
+
+ +

Draws an ellipse.

+

This method closes the current sub path, and adds an ellipse that is bounded by the rectangle boundingRectangle.

+

Note: some renderers only support circles (width == height)

+
See also:
addEllipse(double x, double y, double width, double height), arcTo()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::addEllipse (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Draws an ellipse.

+

This method closes the current sub path, and adds an ellipse that is bounded by the rectangle defined by top left position (x, y), and size width x height.

+
Note:
Some renderers only support circles (width == height)
+
See also:
addEllipse(const WRectF&), arcTo()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainterPath::addPath (const WPainterPath path )
+
+
+ +

Adds a path.

+

Adds an entire path to the current path. If the path's begin position is different from the current position, the last sub path is first closed, otherwise the last sub path is extended with the path's first sub path.

+
See also:
connectPath(const WPainterPath&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::addRect (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Draws a rectangle.

+

This method closes the current sub path, and adds a rectangle that is defined by top left position (x, y), and size width x height.

+
See also:
addRect(const WRectF&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainterPath::addRect (const WRectF rectangle )
+
+
+ +

Draws a rectangle.

+

This method closes the current sub path, and adds a rectangle that is defined by rectangle.

+
See also:
addRect(double x, double y, double width, double height)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::arcMoveTo (double  cx,
double  cy,
double  radius,
double  angle 
)
+
+
+ +

Moves to a point on an arc.

+

Moves to a point on a circle. The circle is defined with center (cx, cy) and radius, and the point is at angle degrees measured counter-clockwise starting from the 3 o'clock position.

+
See also:
arcTo(double cx, double cy, double radius, double startAngle, double sweepLength)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::arcMoveTo (double  x,
double  y,
double  width,
double  height,
double  angle 
)
+
+
+ +

Move to a point on an arc.

+

Moves to a point on an ellipse. The ellipse fits in the rectangle defined by top left position (x, y), and size width x height, and the point is at angle degrees measured counter-clockwise starting from the 3 o'clock position.

+
See also:
arcTo()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::arcTo (double  cx,
double  cy,
double  radius,
double  startAngle,
double  sweepLength 
)
+
+
+ +

Draws an arc.

+

Draws an arc which is a segment of a circle. The circle is defined with center (cx, cy) and radius. The segment starts at startAngle, and spans an angle given by spanAngle. These angles are expressed in degrees, and are measured counter-clockwise starting from the 3 o'clock position.

+

Implicitly draws a line from the current position to the start of the arc, if the current position is different from the start.

+
See also:
arcMoveTo(double cx, double cy, double radius, double angle)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPainterPath::closeSubPath ( )
+
+
+ +

Closes the last sub path.

+

Draws a line from the current position to the start position of the last sub path (which is the end point of the last move operation), and sets the current position to (0, 0).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainterPath::connectPath (const WPainterPath path )
+
+
+ +

Adds a path, connecting.

+

Adds an entire path to the current path. If the path's begin position is different from the current position, the last sub path is first closed, otherwise the last sub path is extended with the path's first sub path.

+
See also:
connectPath(const WPainterPath&)
+ +
+
+ +
+
+ + + + + + + +
WRectF Wt::WPainterPath::controlPointRect ( ) const
+
+
+ +

Returns the bounding box of the control points.

+

Returns the bounding box of all control points. This is guaranteed to be a superset of the actual bounding box.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::cubicTo (const WPointF c1,
const WPointF c2,
const WPointF endPoint 
)
+
+
+ +

Draws a cubic bezier curve.

+

Draws a cubic bezier curve from the current position to endPoint, which becomes the new current position. The bezier curve uses the two control points c1 and c2.

+
See also:
cubicTo(double c1x, double c1y, double c2x, double c2y, double endPointx, double endPointy)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::cubicTo (double  c1x,
double  c1y,
double  c2x,
double  c2y,
double  endPointx,
double  endPointy 
)
+
+
+ +

Draws a cubic bezier curve.

+

This is an overloaded method provided for convenience.

+
See also:
cubicTo(const WPointF&, const WPointF&, const WPointF&)
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WPainterPath::currentPosition ( ) const
+
+
+ +

Returns the current position.

+

Returns the current position, which is the end point of the last move or draw operation, and which well be the start point of the next draw operation.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPainterPath::isEmpty ( ) const
+
+
+ +

Returns whether the path is empty.

+

Returns true if the path contains no drawing operations. Note that move operations are not considered drawing operations.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainterPath::lineTo (const WPointF point )
+
+
+ +

Draws a straight line.

+

Draws a straight line from the current position to point, which becomes the new current position.

+
See also:
lineTo(double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::lineTo (double  x,
double  y 
)
+
+
+ +

Draws a straight line.

+

Draws a straight line from the current position to (x, y), which becomes the new current position.

+
See also:
lineTo(const WPointF&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPainterPath::moveTo (const WPointF point )
+
+
+ +

Moves the current position to a new location.

+

Moves the current position to a new point, implicitly closing the last sub path.

+
See also:
closeSubPath(), moveTo(double, double)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::moveTo (double  x,
double  y 
)
+
+
+ +

Moves the current position to a new location.

+

Moves the current position to a new point, implicitly closing the last sub path.

+
See also:
closeSubPath(), moveTo(double, double)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WPainterPath::operator!= (const WPainterPath path ) const
+
+
+ +

Comparison operator.

+

Returns true if the paths are different.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WPainterPath::operator== (const WPainterPath path ) const
+
+
+ +

Comparison operator.

+

Returns true if the paths are exactly the same.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::quadTo (const WPointF c,
const WPointF endPoint 
)
+
+
+ +

Draws a quadratic bezier curve.

+

Draws a quadratic bezier curve from the current position to endPoint, which becomes the new current position. The bezier curve uses the single control point c.

+
See also:
quadTo(double cx, double cy, double endPointx, double endPointy)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPainterPath::quadTo (double  cx,
double  cy,
double  endPointx,
double  endPointy 
)
+
+
+ +

Draws a quadratic bezier curve.

+

This is an overloaded method provided for convenience.

+
See also:
quadTo(const WPointF&, const WPointF&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment-members.html new file mode 100644 index 0000000..a6c99df --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment-members.html @@ -0,0 +1,78 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPainterPath::Segment Member List

+
+
+This is the complete list of members for Wt::WPainterPath::Segment, including all inherited members. +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment.html new file mode 100644 index 0000000..5eb925f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainterPath_1_1Segment.html @@ -0,0 +1,93 @@ + + + + +Wt: Wt::WPainterPath::Segment Class Reference + + + + + + + + + +
+
+

Wt::WPainterPath::Segment Class Reference

+
+
+ +

A segment. +More...

+ +

List of all members.

+ +
+

Detailed Description

+

A segment.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image-members.html new file mode 100644 index 0000000..0dcc7d5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image-members.html @@ -0,0 +1,83 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPainter::Image Member List

+
+
+This is the complete list of members for Wt::WPainter::Image, including all inherited members. + + + + + +
height() const Wt::WPainter::Image
Image(const std::string &uri, int width, int height)Wt::WPainter::Image
Image(const std::string &uri, const std::string &file)Wt::WPainter::Image
uri() const Wt::WPainter::Image
width() const Wt::WPainter::Image
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image.html new file mode 100644 index 0000000..e4f6c80 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPainter_1_1Image.html @@ -0,0 +1,179 @@ + + + + +Wt: Wt::WPainter::Image Class Reference + + + + + + + + + +
+ +
+

Wt::WPainter::Image Class Reference

+
+
+ +

An image that can be rendered on a WPainter. +More...

+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

 Image (const std::string &uri, int width, int height)
 Creates an image.
 Image (const std::string &uri, const std::string &file)
 Creates an image.
+std::string uri () const
 Returns the uri.
+int width () const
 Returns the image width.
+int height () const
 Returns the image height.
+

Detailed Description

+

An image that can be rendered on a WPainter.

+

The image is specified in terms of a URL, and the width and height.

+
See also:
drawImage()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WPainter::Image::Image (const std::string &  uri,
int  width,
int  height 
)
+
+
+ +

Creates an image.

+

Create an image which is located at the uri, and which has dimensions width x height.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WPainter::Image::Image (const std::string &  uri,
const std::string &  file 
)
+
+
+ +

Creates an image.

+

Create an image which is located at uri which is available on the local filesystem as file. The image dimensions are retrieved from the file.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel-members.html new file mode 100644 index 0000000..b0aa7d8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel-members.html @@ -0,0 +1,193 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPanel Member List

+
+
+This is the complete list of members for Wt::WPanel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
centralWidget() const Wt::WPanel
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
collapse()Wt::WPanel
collapsed()Wt::WPanel
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
expand()Wt::WPanel
expanded()Wt::WPanel
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCollapsed() const Wt::WPanel
isCollapsible() const Wt::WPanel
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setCentralWidget(WWidget *)Wt::WPanel
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setCollapsed(bool on)Wt::WPanel
setCollapsible(bool on)Wt::WPanel
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setTitle(const WString &title)Wt::WPanel
setTitleBar(bool enable)Wt::WPanel
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
title() const Wt::WPanel
titleBar() const Wt::WPanel
titleBarWidget() const Wt::WPanel
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WPanel(WContainerWidget *parent=0)Wt::WPanel
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel.html new file mode 100644 index 0000000..7a19519 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel.html @@ -0,0 +1,465 @@ + + + + +Wt: Wt::WPanel Class Reference + + + + + + + + + +
+ +
+

Wt::WPanel Class Reference

+
+
+ +

A WPanel provides a container with a title bar. +More...

+ +

#include <Wt/WPanel>

+
+Inheritance diagram for Wt::WPanel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WPanel (WContainerWidget *parent=0)
 Creates a panel.
void setTitle (const WString &title)
 Sets a title.
WString title () const
 Returns the title.
void setTitleBar (bool enable)
 Shows or hides the title bar for the panel.
bool titleBar () const
 Returns if a title bar is set.
WContainerWidgettitleBarWidget () const
 Returns the title bar widget.
void setCollapsible (bool on)
 Makes the panel collapsible.
bool isCollapsible () const
 Returns if the panel can be collapsed by the user.
void setCollapsed (bool on)
 Sets the panel expanded or collapsed.
bool isCollapsed () const
 Returns if the panel is collapsed.
void collapse ()
 Collapses the panel.
void expand ()
 Collapses the panel.
void setCentralWidget (WWidget *)
 Sets the central widget.
WWidgetcentralWidget () const
 Returns the central widget.
Signalcollapsed ()
 Signal emitted when the panel is collapsed.
Signalexpanded ()
 Signal emitted when the panel is expanded.
+

Detailed Description

+

A WPanel provides a container with a title bar.

+

The panel provides a container with an optional title bar, and an optional collapse icon.

+

Usage example:

+
 Wt::WPanel *panel = new Wt::WPanel();
+ panel->setTitle("A panel");
+ panel->setCentralWidget(new Wt::WText("This is the panel contents"));
+ panel->setCollapsible(true);
+
+WPanel-default-1.png +

Two panels: one collapsed and one expanded (default theme)

+
+WPanel-polished-1.png +

Two panels: one collapsed and one expanded (polished theme)

+
Note:
This widget is in development. It will provide features similar to the Ext::Panel.
+
See also:
Ext::Panel
+

CSS

+

A panel has the Wt-panel and Wt-outset style classes. The look can be overridden using the following style class selectors:

+
+ .Wt-panel .titlebar : The title bar
+ .Wt-panel .body     : The body (requires vertical padding 4px).
+

Member Function Documentation

+ +
+
+ + + + + + + +
WWidget* Wt::WPanel::centralWidget ( ) const
+
+
+ +

Returns the central widget.

+
See also:
setCentralWidget()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPanel::collapse ( )
+
+
+ +

Collapses the panel.

+

When isCollapsible() is true, the panel is collapsed to minimize screen real-estate.

+
See also:
setCollapsible(bool), expand()
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WPanel::collapsed ( )
+
+
+ +

Signal emitted when the panel is collapsed.

+

Signal emitted when the panel is collapsed. The signal is only emitted when the panel is collapsed by the user using the collapse icon in the tible bar, not when calling setCollapsed(bool).

+
See also:
expanded()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPanel::expand ( )
+
+
+ +

Collapses the panel.

+

When isCollapsible() is true, the panel is expanded to its original state.

+
See also:
setCollapsible(bool), expand()
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WPanel::expanded ( )
+
+
+ +

Signal emitted when the panel is expanded.

+

Signal emitted when the panel is expanded. The signal is only emitted when the panel is expanded by the user using the expand icon in the title bar, not when calling setCollapsed(bool).

+
See also:
collapsed()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPanel::isCollapsed ( ) const
+
+
+ +

Returns if the panel is collapsed.

+
See also:
setCollapsed(bool)
+
+collapsed(), expanded()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPanel::isCollapsible ( ) const
+
+
+ +

Returns if the panel can be collapsed by the user.

+
See also:
setCollapsible(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPanel::setCentralWidget (WWidget w )
+
+
+ +

Sets the central widget.

+

Sets the widget that is the contents of the panel. When a widget was previously set, the old widget is deleted first.

+

The default value is 0 (no widget set).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPanel::setCollapsed (bool  on )
+
+
+ +

Sets the panel expanded or collapsed.

+

When on is true, equivalent to collapse(), otherwise to expand().

+

The default value is false.

+
See also:
setCollapsible(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPanel::setCollapsible (bool  on )
+
+
+ +

Makes the panel collapsible.

+

When on is true, a collapse/expand icon is added to the title bar. This also calls setTitleBar(true) to enable the title bar.

+

The default value is false.

+
See also:
setTitleBar(bool), setCollapsed(bool), isCollapsed()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPanel::setTitle (const WString title )
+
+
+ +

Sets a title.

+

The panel title is set in the title bar. This method also makes the title bar visible by calling setTitleBar(true).

+

The default value is "" (no title).

+
See also:
title(), setTitleBar(bool)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPanel::setTitleBar (bool  enable )
+
+
+ +

Shows or hides the title bar for the panel.

+

The title bar appears at the top of the panel.

+

The default value is false: the title bar is not shown unless a title is set or the panel is made collapsible.

+
See also:
setTitle(const WString&), setCollapsible(bool)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WPanel::title ( ) const
+
+
+ +

Returns the title.

+
See also:
setTitle(const WString&)
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPanel::titleBar ( ) const
+
+
+ +

Returns if a title bar is set.

+
See also:
setTitleBar(bool)
+ +
+
+ +
+
+ + + + + + + +
WContainerWidget * Wt::WPanel::titleBarWidget ( ) const
+
+
+ +

Returns the title bar widget.

+

The title bar widget contains the collapse/expand icon (if the panel isCollapsible()), and the title text (if a title was set using setTitle()). You can access the title bar widget to customize the contents of the title.

+

The method returns 0 if titleBar() is false. You need to call setTitleBar() first.

+
See also:
setTitleBar()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.md5 new file mode 100644 index 0000000..58a8cee --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.md5 @@ -0,0 +1 @@ +2af9db472426ff4826f8b91923663580 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.png new file mode 100644 index 0000000..278c1d2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPanel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage-members.html new file mode 100644 index 0000000..4f8b2b8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage-members.html @@ -0,0 +1,136 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPdfImage Member List

+
+
+This is the complete list of members for Wt::WPdfImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
children() const Wt::WObject
clear()Wt::WPdfImage [protected, virtual]
Clipping enum valueWt::WPaintDevice
dataChanged()Wt::WResource
dataReceived()Wt::WResource
done()Wt::WPdfImage [virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)Wt::WPdfImage [virtual]
drawImage(const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)Wt::WPdfImage [virtual]
drawLine(double x1, double y1, double x2, double y2)Wt::WPdfImage [virtual]
drawPath(const WPainterPath &path)Wt::WPdfImage [virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)Wt::WPdfImage [virtual]
Font enum valueWt::WPaintDevice
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::WPdfImage [virtual]
height() const Wt::WPdfImage [virtual]
Hints enum valueWt::WPaintDevice
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
init()Wt::WPdfImage [virtual]
internalPath() const Wt::WResource
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
paintActive() const Wt::WPdfImage [virtual]
painter() const Wt::WPdfImage [protected, virtual]
parent() const Wt::WObject
Pen enum valueWt::WPaintDevice
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged(WFlags< ChangeFlag > flags)Wt::WPdfImage [virtual]
Wt::WResource::setChanged()Wt::WResource
setInternalPath(const std::string &path)Wt::WResource
setObjectName(const std::string &name)Wt::WObject
setPainter(WPainter *painter)Wt::WPdfImage [protected, virtual]
setUploadProgress(bool enabled)Wt::WResource
Shadow enum valueWt::WPaintDevice
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
Transform enum valueWt::WPaintDevice
url() const Wt::WResource
width() const Wt::WPdfImage [virtual]
WObject(WObject *parent=0)Wt::WObject
WPdfImage(const WLength &width, const WLength &height, WObject *parent=0)Wt::WPdfImage
WPdfImage(HPDF_Doc pdf, HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height, WObject *parent=0)Wt::WPdfImage
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~WObject()Wt::WObject [virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
~WPdfImage()Wt::WPdfImage
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage.html new file mode 100644 index 0000000..731402a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage.html @@ -0,0 +1,647 @@ + + + + +Wt: Wt::WPdfImage Class Reference + + + + + + + + + +
+ +
+

Wt::WPdfImage Class Reference
+ +[Painting system] +

+
+
+ +

A paint device for rendering to a PDF. +More...

+ +

#include <Wt/WPdfImage>

+
+Inheritance diagram for Wt::WPdfImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WPdfImage (const WLength &width, const WLength &height, WObject *parent=0)
 Create a PDF resource that represents a single-page PDF document.
 WPdfImage (HPDF_Doc pdf, HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height, WObject *parent=0)
 Create a PDF paint device to paint inside an existing page.
~WPdfImage ()
 Destructor.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
virtual void drawPath (const WPainterPath &path)
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
virtual void init ()
 Initializes the device for painting.
virtual void done ()
 Finishes painting on the device.
virtual bool paintActive () const
 Returns whether painting is active.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.
virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.

+Protected Member Functions

virtual WPainterpainter () const
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)
 Sets the painter.
+virtual void clear ()
 Clears the paint device.
+

Detailed Description

+

A paint device for rendering to a PDF.

+

A WPdfImage paint device should be used in conjunction with a WPainter, and can be used to make a PDF version of a WPaintedWidget's contents.

+

The PDF is generated using The Haru Free PDF Library, and this class is included in the library only if libharu was found during the build of the library.

+

You can use the image as a resource and specialize handleRequest() to paint the contents on the fly. Alternatively can also use write() to serialize to a PDF file (std::ostream).

+

The latter usage is illustrated by the code below:

+
 Wt::Chart::WCartesianChart *chart = ...
+
+ Wt::WPdfImage pdfImage(Wt::WLength(4, Wt::WLength::Centimeter), Wt::WLength(3, Wt::WLength::Centimeter));
+ {
+   Wt::WPainter p(&pdfImage);
+   chart->paint(p);
+ }
+ std::ofstream f("chart.pdf");
+ pdfImage.write(f);
+

A constructor is provided which allows the generated PDF image to be embedded directly into a page of a larger libharu document.

+

This paint device has the following limitations:

+
    +
  • images (WPainter::drawImage()) can only be included from local files, and is restricted to JPG and PNG images.
  • +
  • drop shadows are not supported.
  • +
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WPdfImage::WPdfImage (const WLength width,
const WLength height,
WObject parent = 0 
)
+
+
+ +

Create a PDF resource that represents a single-page PDF document.

+

The single page will have a size width x height. The PDF will be using the same DPI (72dpi) as is conventionally used for the web. Thus, you can use both physical units for width and height (such as 4 cm by 3 cm), as well as pixel units.

+
See also:
write()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WPdfImage::WPdfImage (HPDF_Doc  pdf,
HPDF_Page  page,
HPDF_REAL  x,
HPDF_REAL  y,
HPDF_REAL  width,
HPDF_REAL  height,
WObject parent = 0 
)
+
+
+ +

Create a PDF paint device to paint inside an existing page.

+

The image will be drawn in the existing page, as an image with lower-left point (x, y) and size (width x height).

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WPdfImage::done ( ) [virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPdfImage::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPdfImage::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPdfImage::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPdfImage::drawPath (const WPainterPath path ) [virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WPdfImage::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPdfImage::handleRequest (const Http::Request request,
Http::Response response 
) [virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WPdfImage::height ( ) const [virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WPdfImage::init ( ) [virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WPdfImage::paintActive ( ) const [virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WPdfImage::painter ( ) const [protected, virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPdfImage::setChanged (WFlags< ChangeFlag flags ) [virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WPdfImage::width ( ) const [virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.map new file mode 100644 index 0000000..948c61c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.md5 new file mode 100644 index 0000000..b111d70 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.md5 @@ -0,0 +1 @@ +5ed204890582d7c1fbe6f8bf2b8a3b04 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.png new file mode 100644 index 0000000..c18e65b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPdfImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPen-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPen-members.html new file mode 100644 index 0000000..ce3db52 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPen-members.html @@ -0,0 +1,97 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPen Member List

+
+
+This is the complete list of members for Wt::WPen, including all inherited members. + + + + + + + + + + + + + + + + + + + +
capStyle() const Wt::WPen
color() const Wt::WPen
joinStyle() const Wt::WPen
operator!=(const WPen &other) const Wt::WPen
operator==(const WPen &other) const Wt::WPen
PenCapStyle enum nameWt::WPen [related]
PenJoinStyle enum nameWt::WPen [related]
PenStyle enum nameWt::WPen [related]
setCapStyle(PenCapStyle style)Wt::WPen
setColor(const WColor &color)Wt::WPen
setJoinStyle(PenJoinStyle style)Wt::WPen
setStyle(PenStyle style)Wt::WPen
setWidth(const WLength &width)Wt::WPen
style() const Wt::WPen
width() const Wt::WPen
WPen()Wt::WPen
WPen(PenStyle style)Wt::WPen
WPen(const WColor &color)Wt::WPen
WPen(GlobalColor color)Wt::WPen
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPen.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPen.html new file mode 100644 index 0000000..c8d7896 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPen.html @@ -0,0 +1,485 @@ + + + + +Wt: Wt::WPen Class Reference + + + + + + + + + +
+ +
+

Wt::WPen Class Reference
+ +[Painting system] +

+
+
+ +

Class that defines the style for pen strokes. +More...

+ +

#include <Wt/WPen>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WPen ()
 Creates a black cosmetic pen.
 WPen (PenStyle style)
 Creates a black pen with a particular style.
 WPen (const WColor &color)
 Creates a solid pen of a particular color.
 WPen (GlobalColor color)
 Creates a solid pen of a particular standard color.
bool operator== (const WPen &other) const
 Comparison operator.
bool operator!= (const WPen &other) const
 Comparison operator.
void setStyle (PenStyle style)
 Sets the pen style.
PenStyle style () const
 Returns the pen style.
void setCapStyle (PenCapStyle style)
 Sets the style for rendering line ends.
PenCapStyle capStyle () const
 Returns the style for rendering line ends.
void setJoinStyle (PenJoinStyle style)
 Sets the style for rendering line joins.
PenJoinStyle joinStyle () const
 Returns the style for rendering line joins.
void setWidth (const WLength &width)
 Sets the pen width.
const WLengthwidth () const
 Returns the pen width.
void setColor (const WColor &color)
 Sets the pen color.
const WColorcolor () const
 Returns the pen color.

+Related Functions

(Note that these are not member functions.)

+
enum  PenStyle {
+  NoPen, +SolidLine, +DashLine, +DotLine, +
+  DashDotLine, +DashDotDotLine +
+ }
 

Enumeration that indicates a pen style.

+ More...
enum  PenCapStyle { FlatCap, +SquareCap, +RoundCap + }
 

Enumeration that indicates how line end points are rendered.

+ More...
enum  PenJoinStyle { MiterJoin, +BevelJoin, +RoundJoin + }
 

Enumeration that indicates how line joins are rendered.

+ More...
+

Detailed Description

+

Class that defines the style for pen strokes.

+

A pen defines the properties of how lines (that may surround shapes) are rendered.

+

A pen with width 0 is a cosmetic pen, and is always rendered as 1 pixel width, regardless of transformations. Otherwized, the pen width is modified by the transformation set on the painter.

+
See also:
WPainter::setPen(), WBrush
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPen::WPen ( )
+
+
+ +

Creates a black cosmetic pen.

+

Constructs a black solid pen of 0 width (i.e. cosmetic single pixel width), with SquareCap line ends and BevelJoin line join style.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPen::WPen (PenStyle  style )
+
+
+ +

Creates a black pen with a particular style.

+

Constructs a black pen of 0 width (i.e. cosmetic single pixel width), with SquareCap line ends and BevelJoin line join style.

+

The line style is set to style.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPen::WPen (const WColor color )
+
+
+ +

Creates a solid pen of a particular color.

+

Constructs a solid pen of 0 width (i.e. cosmetic single pixel width), with SquareCap line ends and BevelJoin line join style.

+

The pen color is set to color.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPen::WPen (GlobalColor  color )
+
+
+ +

Creates a solid pen of a particular standard color.

+

Constructs a solid pen of 0 width (i.e. cosmetic single pixel width), with SquareCap line ends and BevelJoin line join style.

+

The pen color is set to color.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
PenCapStyle Wt::WPen::capStyle ( ) const
+
+
+ +

Returns the style for rendering line ends.

+
See also:
setCapStyle(PenCapStyle)
+ +
+
+ +
+
+ + + + + + + +
const WColor& Wt::WPen::color ( ) const
+
+
+ +

Returns the pen color.

+
See also:
color()
+ +
+
+ +
+
+ + + + + + + +
PenJoinStyle Wt::WPen::joinStyle ( ) const
+
+
+ +

Returns the style for rendering line joins.

+
See also:
setJoinStyle(PenJoinStyle)
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WPen::operator!= (const WPen other ) const
+
+
+ +

Comparison operator.

+

Returns true if the pens are different.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WPen::operator== (const WPen other ) const
+
+
+ +

Comparison operator.

+

Returns true if the pens are exactly the same.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPen::setCapStyle (PenCapStyle  style )
+
+
+ +

Sets the style for rendering line ends.

+
See also:
capStyle()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPen::setColor (const WColor color )
+
+
+ +

Sets the pen color.

+
See also:
color()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPen::setJoinStyle (PenJoinStyle  style )
+
+
+ +

Sets the style for rendering line joins.

+
See also:
joinStyle()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPen::setStyle (PenStyle  style )
+
+
+ +

Sets the pen style.

+
See also:
style()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPen::setWidth (const WLength width )
+
+
+ +

Sets the pen width.

+

A pen width must be specified using WLength::Pixel units.

+
See also:
width()
+ +
+
+ +
+
+ + + + + + + +
PenStyle Wt::WPen::style ( ) const
+
+
+ +

Returns the pen style.

+
See also:
setStyle(PenStyle)
+ +
+
+ +
+
+ + + + + + + +
const WLength& Wt::WPen::width ( ) const
+
+
+ +

Returns the pen width.

+
See also:
setWidth(const WLength&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint-members.html new file mode 100644 index 0000000..dd4878b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint-members.html @@ -0,0 +1,86 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPoint Member List

+
+
+This is the complete list of members for Wt::WPoint, including all inherited members. + + + + + + + + +
operator!=(const WPoint &other) const Wt::WPoint
operator==(const WPoint &other) const Wt::WPoint
setX(int x)Wt::WPoint
setY(int y)Wt::WPoint
WPoint()Wt::WPoint
WPoint(int x, int y)Wt::WPoint
x() const Wt::WPoint
y() const Wt::WPoint
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint.html new file mode 100644 index 0000000..2ed397f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPoint.html @@ -0,0 +1,123 @@ + + + + +Wt: Wt::WPoint Class Reference + + + + + + + + + +
+ +
+

Wt::WPoint Class Reference

+
+
+ +

Utility class that defines a 2D point with integer coordinates. +More...

+ +

#include <Wt/WPoint>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

WPoint ()
 Creates a point (0, 0).
WPoint (int x, int y)
 Creates a point (x, y).
+void setX (int x)
 Sets the X coordinate.
+void setY (int y)
 Sets the Y coordinate.
+int x () const
 Returns the X coordinate.
+int y () const
 Returns the Y coordinate.
+bool operator== (const WPoint &other) const
 Comparison operator.
+bool operator!= (const WPoint &other) const
 Comparison operator.
+

Detailed Description

+

Utility class that defines a 2D point with integer coordinates.

+
See also:
WPolygonArea
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF-members.html new file mode 100644 index 0000000..bfb01ab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF-members.html @@ -0,0 +1,88 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPointF Member List

+
+
+This is the complete list of members for Wt::WPointF, including all inherited members. + + + + + + + + + + +
operator!=(const WPointF &other) const Wt::WPointF
operator==(const WPointF &other) const Wt::WPointF
setX(double x)Wt::WPointF
setY(double y)Wt::WPointF
WPointF()Wt::WPointF
WPointF(double x, double y)Wt::WPointF
WPointF(const WPointF &other)Wt::WPointF
WPointF(const WMouseEvent::Coordinates &other)Wt::WPointF
x() const Wt::WPointF
y() const Wt::WPointF
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF.html new file mode 100644 index 0000000..af1c091 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPointF.html @@ -0,0 +1,131 @@ + + + + +Wt: Wt::WPointF Class Reference + + + + + + + + + +
+ +
+

Wt::WPointF Class Reference
+ +[Painting system] +

+
+
+ +

Utility class that defines a 2D point. +More...

+ +

#include <Wt/WPointF>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WPointF ()
 Creates point (0, 0).
WPointF (double x, double y)
 Creates a point (x, y).
WPointF (const WPointF &other)
 Copy constructor.
WPointF (const WMouseEvent::Coordinates &other)
 Creates a point from mouse coordinates.
+void setX (double x)
 Sets the X coordinate.
+void setY (double y)
 Sets the Y coordinate.
+double x () const
 Returns the X coordinate.
+double y () const
 Returns the Y coordinate.
+bool operator== (const WPointF &other) const
 Comparison operator.
+bool operator!= (const WPointF &other) const
 Comparison operator.
+

Detailed Description

+

Utility class that defines a 2D point.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea-members.html new file mode 100644 index 0000000..b92693a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea-members.html @@ -0,0 +1,138 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPolygonArea Member List

+
+
+This is the complete list of members for Wt::WPolygonArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addPoint(int x, int y)Wt::WPolygonArea
addPoint(double x, double y)Wt::WPolygonArea
addPoint(const WPoint &point)Wt::WPolygonArea
addPoint(const WPointF &point)Wt::WPolygonArea
addStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
alternateText() const Wt::WAbstractArea
children() const Wt::WObject
clicked()Wt::WAbstractArea
cursor() const Wt::WAbstractArea
doubleClicked()Wt::WAbstractArea
enterPressed()Wt::WAbstractArea
escapePressed()Wt::WAbstractArea
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isHole() const Wt::WAbstractArea
keyPressed()Wt::WAbstractArea
keyWentDown()Wt::WAbstractArea
keyWentUp()Wt::WAbstractArea
Method typedefWt::WObject
mouseDragged()Wt::WAbstractArea
mouseMoved()Wt::WAbstractArea
mouseWentDown()Wt::WAbstractArea
mouseWentOut()Wt::WAbstractArea
mouseWentOver()Wt::WAbstractArea
mouseWentUp()Wt::WAbstractArea
mouseWheel()Wt::WAbstractArea
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
points() const Wt::WPolygonArea
ref() const Wt::WAbstractArea
removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resource() const Wt::WAbstractArea
sender()Wt::WObject [protected, static]
setAlternateText(const WString &text)Wt::WAbstractArea
setCursor(Cursor cursor)Wt::WAbstractArea
setHole(bool hole)Wt::WAbstractArea
setObjectName(const std::string &name)Wt::WObject
setPoints(const std::vector< WPoint > &points)Wt::WPolygonArea
setPoints(const std::vector< WPointF > &points)Wt::WPolygonArea
setRef(const std::string &ref)Wt::WAbstractArea
setResource(WResource *resource)Wt::WAbstractArea
setStyleClass(const WString &styleClass)Wt::WAbstractArea
setTarget(AnchorTarget target)Wt::WAbstractArea
setToolTip(const WString &text)Wt::WAbstractArea
styleClass() const Wt::WAbstractArea
target() const Wt::WAbstractArea
toolTip() const Wt::WAbstractArea
WObject(WObject *parent=0)Wt::WObject
WPolygonArea()Wt::WPolygonArea
WPolygonArea(const std::vector< WPoint > &points)Wt::WPolygonArea
WPolygonArea(const std::vector< WPointF > &points)Wt::WPolygonArea
~WAbstractArea()Wt::WAbstractArea [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea.html new file mode 100644 index 0000000..e1059fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea.html @@ -0,0 +1,261 @@ + + + + +Wt: Wt::WPolygonArea Class Reference + + + + + + + + + +
+ +
+

Wt::WPolygonArea Class Reference

+
+
+ +

An interactive area in a widget, specified by a polygon. +More...

+ +

#include <Wt/WPolygonArea>

+
+Inheritance diagram for Wt::WPolygonArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WPolygonArea ()
 Creates an empty polygon.
 WPolygonArea (const std::vector< WPoint > &points)
 Creates a polygon area with given vertices.
 WPolygonArea (const std::vector< WPointF > &points)
 Creates a polygon area with given vertices.
+void addPoint (int x, int y)
 Adds a point.
+void addPoint (double x, double y)
 Adds a point.
+void addPoint (const WPoint &point)
 Adds a point.
+void addPoint (const WPointF &point)
 Adds a point.
void setPoints (const std::vector< WPoint > &points)
 Sets the polygon vertices.
void setPoints (const std::vector< WPointF > &points)
 Sets the polygon vertices.
const std::vector< WPoint > & points () const
 Returns the polygon vertices.
+

Detailed Description

+

An interactive area in a widget, specified by a polygon.

+

The area may be added to a WImage or WPaintedWidget to provide interactivity on a polygon area of the image. The polygon is specified in pixel coordinates, and uses an even-odd winding rule (overlaps create holes).

+
 Wt::WImage *image = new Wt::WImage("images/family.jpg");
+ Wt::WPolygonArea *face = new Wt::WPolygonArea();
+ face->addPoint(100, 120);
+ face->addPoint(300, 120);
+ face->addPoint (200, 250);
+ face->setToolTip("Uncle Frank");
+ image->addArea(face);
+

The polygon area corresponds to the HTML <area shape="poly"> tag.

+
See also:
WImage::addArea(), WPaintedWidget::addArea()
+
+WCircleArea, WRectArea
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPolygonArea::WPolygonArea ( )
+
+
+ +

Creates an empty polygon.

+

Defines an empty polygon.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPolygonArea::WPolygonArea (const std::vector< WPoint > &  points )
+
+
+ +

Creates a polygon area with given vertices.

+

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WPolygonArea::WPolygonArea (const std::vector< WPointF > &  points )
+
+
+ +

Creates a polygon area with given vertices.

+

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::vector<WPoint>& Wt::WPolygonArea::points ( ) const
+
+
+ +

Returns the polygon vertices.

+
See also:
setPoints()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPolygonArea::setPoints (const std::vector< WPoint > &  points )
+
+
+ +

Sets the polygon vertices.

+

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPolygonArea::setPoints (const std::vector< WPointF > &  points )
+
+
+ +

Sets the polygon vertices.

+

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.map new file mode 100644 index 0000000..8072d0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.md5 new file mode 100644 index 0000000..4a04194 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.md5 @@ -0,0 +1 @@ +7278004f79a56cdcd065182feef7a584 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.png new file mode 100644 index 0000000..d76449c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPolygonArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu-members.html new file mode 100644 index 0000000..1255785 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu-members.html @@ -0,0 +1,194 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPopupMenu Member List

+
+
+This is the complete list of members for Wt::WPopupMenu, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
aboutToHide()Wt::WPopupMenu
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
add(WPopupMenuItem *item)Wt::WPopupMenu
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &text)Wt::WPopupMenu
addItem(const std::string &iconPath, const WString &text)Wt::WPopupMenu
addItem(const WString &text, T *target, void(V::*method)())Wt::WPopupMenu
addItem(const std::string &iconPath, const WString &text, T *target, void(V::*method)())Wt::WPopupMenu
addMenu(const WString &text, WPopupMenu *menu)Wt::WPopupMenu
addMenu(const std::string &iconPath, const WString &text, WPopupMenu *menu)Wt::WPopupMenu
addSeparator()Wt::WPopupMenu
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
exec(const WPoint &point)Wt::WPopupMenu
exec(const WMouseEvent &event)Wt::WPopupMenu
exec(WWidget *location, Orientation orientation=Vertical)Wt::WPopupMenu
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
popup(const WPoint &point)Wt::WPopupMenu
popup(const WMouseEvent &event)Wt::WPopupMenu
popup(WWidget *location, Orientation orientation=Vertical)Wt::WPopupMenu
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
result() const Wt::WPopupMenu
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool hidden)Wt::WPopupMenu [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WPopupMenu()Wt::WPopupMenu
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu.html new file mode 100644 index 0000000..4ebf4e7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu.html @@ -0,0 +1,664 @@ + + + + +Wt: Wt::WPopupMenu Class Reference + + + + + + + + + +
+ +
+

Wt::WPopupMenu Class Reference

+
+
+ +

A menu presented in a popup window. +More...

+ +

#include <Wt/WPopupMenu>

+
+Inheritance diagram for Wt::WPopupMenu:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WPopupMenu ()
 Creates a new popup menu.
WPopupMenuItemaddItem (const WString &text)
 Adds an item with given text.
WPopupMenuItemaddItem (const std::string &iconPath, const WString &text)
 Adds an item with given icon and text.
template<class T , class V >
WPopupMenuItemaddItem (const WString &text, T *target, void(V::*method)())
 Adds an item with given text, and specify a slot method to be called when the item is triggered.
template<class T , class V >
WPopupMenuItemaddItem (const std::string &iconPath, const WString &text, T *target, void(V::*method)())
 Adds an item with given text and icon, and specify a slot method to be called when activated.
WPopupMenuItemaddMenu (const WString &text, WPopupMenu *menu)
 Adds a submenu, with given text.
WPopupMenuItemaddMenu (const std::string &iconPath, const WString &text, WPopupMenu *menu)
 Adds a submenu, with given icon and text.
void add (WPopupMenuItem *item)
 Adds a menu item.
void addSeparator ()
 Adds a separator to the menu.
void popup (const WPoint &point)
 Shows the the popup at a position.
void popup (const WMouseEvent &event)
 Shows the the popup at the location of a mouse event.
void popup (WWidget *location, Orientation orientation=Vertical)
 Shows the popup besides a widget.
WPopupMenuItemexec (const WPoint &point)
 Executes the the popup at a position.
WPopupMenuItemexec (const WMouseEvent &event)
 Executes the the popup at the location of a mouse event.
WPopupMenuItemexec (WWidget *location, Orientation orientation=Vertical)
 Executes the popup besides a widget.
WPopupMenuItemresult () const
 Returns the last triggered menu item.
virtual void setHidden (bool hidden)
 Sets whether the widget is hidden.
SignalaboutToHide ()
 Signal emitted when the popup is hidden.
+

Detailed Description

+

A menu presented in a popup window.

+

The menu implements a typical context menu, with support for submenu's. It is not to be confused with WMenu which implements an always-visible navigation menu for a web application.

+

When initially created, the menu is invisible, until popup() or exec() is called. Then, the menu will remain visible until an item is selected, or the user cancels the menu (by hitting Escape or clicking elsewhere).

+

The implementation assumes availability of JavaScript to position the menu at the current mouse position and provide feed-back of the currently selected item.

+

Similar in use as WDialog, there are two ways of using the menu. The simplest way is to use one of the exec() methods, to use a reentrant event loop and wait until the user cancelled the popup menu (by hitting Escape or clicking elsewhere), or selected an item.

+

Alternatively, you can use one of the popup() methods to show the menu and listen to the aboutToHide signal where you read the result().

+

You have several options to react to the selection of an item:

+ +

Usage example:

+
 // Create a menu with some items
+ WPopupMenu popup;
+ popup.addItem("icons/item1.gif", "Item 1");
+ popup.addItem("Item 2")->setCheckable(true);
+ popup.addItem("Item 3");
+ popup.addSeparator();
+ popup.addItem("Item 4");
+ popup.addSeparator();
+ popup.addItem("Item 5");
+ popup.addItem("Item 6");
+ popup.addSeparator();
+
+ WPopupMenu *subMenu = new WPopupMenu();
+ subMenu->addItem("Sub Item 1");
+ subMenu->addItem("Sub Item 2");
+ popup.addMenu("Item 7", subMenu);
+
+ WPopupMenuItem *item = popup.exec(event);
+
+ if (item) {
+   // ... do associated action.
+ }
+

CSS

+

A WPopupMenu has the Wt-popupmenu style class. The look can be overridden using the following style class selectors:

+
+.Wt-popupmenu .Wt-item, .Wt-popupmenu .Wt-selected : item
+.Wt-popupmenu .Wt-selected                         : selected item
+.Wt-popupmenu .Wt-separator                        : separator
+

A snapshot of the WPopupMenu:

+
+WPopupMenu-default-1.png +

WPopupMenu example (default)

+
+WPopupMenu-polished-1.png +

WPopupMenu example (polished)

+
See also:
WPopupMenuItem
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WPopupMenu::WPopupMenu ( )
+
+
+ +

Creates a new popup menu.

+

The menu is hidden, by default, and must be shown using popup() or exec().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal& Wt::WPopupMenu::aboutToHide ( )
+
+
+ +

Signal emitted when the popup is hidden.

+

This signal is emitted when the popup is hidden, either because an item was selected, or when the menu was cancelled.

+

You can use result() to get the selected item.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenu::add (WPopupMenuItem item )
+
+
+ +

Adds a menu item.

+

Adds an item to the popup menu.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addItem (const std::string &  iconPath,
const WString text 
)
+
+
+ +

Adds an item with given icon and text.

+

Adds an item to the menu with given text and icon, and returns the corresponding item object.

+
Note:
The icon should have a width of 16 pixels.
+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addItem (const std::string &  iconPath,
const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Adds an item with given text and icon, and specify a slot method to be called when activated.

+

The target and method are connected to the WPopupMenuItem::triggered signal.

+
Note:
The icon should have a width of 16 pixels.
+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+ + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addItem (const WString text )
+
+
+ +

Adds an item with given text.

+

Adds an item to the menu with given text, and returns the corresponding item object.

+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addItem (const WString text,
T *  target,
void(V::*)()  method 
)
+
+
+ +

Adds an item with given text, and specify a slot method to be called when the item is triggered.

+

The target and method are connected to the WPopupMenuItem::triggered signal.

+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addMenu (const WString text,
WPopupMenu menu 
)
+
+
+ +

Adds a submenu, with given text.

+

Adds an item with text text, that leads to a submenu menu.

+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::addMenu (const std::string &  iconPath,
const WString text,
WPopupMenu menu 
)
+
+
+ +

Adds a submenu, with given icon and text.

+

Adds an item with given text and icon, that leads to a submenu menu.

+
See also:
add(WPopupMenuItem *)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPopupMenu::addSeparator ( )
+
+
+ +

Adds a separator to the menu.

+

Adds a separator the popup menu. The separator is an empty div with style-class "separator".

+ +
+
+ +
+
+ + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::exec (const WPoint point )
+
+
+ +

Executes the the popup at a position.

+

Displays the popup at a point with document coordinates p, using popup(), and the waits until a menu item is selected, or the menu is cancelled.

+

Returns the selected menu (or sub-menu) item, or 0 if the user cancelled the menu.

+
See also:
popup()
+ +
+
+ +
+
+ + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::exec (const WMouseEvent event )
+
+
+ +

Executes the the popup at the location of a mouse event.

+

This is a convenience method for exec(const WPoint& p) that uses the event's document coordinates.

+
See also:
exec(const WPoint&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WPopupMenuItem * Wt::WPopupMenu::exec (WWidget location,
Orientation  orientation = Vertical 
)
+
+
+ +

Executes the popup besides a widget.

+
See also:
positionAt(), popup(const WPointF&)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenu::popup (const WPoint point )
+
+
+ +

Shows the the popup at a position.

+

Displays the popup at a point with document coordinates point. The positions intelligent, and will chose one of the four menu corners to correspond to this point so that the popup menu is completely visible within the window.

+
See also:
exec()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenu::popup (const WMouseEvent event )
+
+
+ +

Shows the the popup at the location of a mouse event.

+

This is a convenience method for popup(const WPoint&) that uses the event's document coordinates.

+
See also:
popup(const WPoint& p), WMouseEvent::document()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WPopupMenu::popup (WWidget location,
Orientation  orientation = Vertical 
)
+
+
+ +

Shows the popup besides a widget.

+
See also:
positionAt(), popup(const WPointF&)
+ +
+
+ +
+
+ + + + + + + +
WPopupMenuItem* Wt::WPopupMenu::result ( ) const
+
+
+ +

Returns the last triggered menu item.

+

The result is 0 when the user cancelled the popup menu.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenu::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem-members.html new file mode 100644 index 0000000..6110664 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem-members.html @@ -0,0 +1,193 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPopupMenuItem Member List

+
+
+This is the complete list of members for Wt::WPopupMenuItem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
data() const Wt::WPopupMenuItem
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon()Wt::WPopupMenuItem
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCheckable() const Wt::WPopupMenuItem
isChecked() const Wt::WPopupMenuItem
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WPopupMenuItem [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
popupMenu() const Wt::WPopupMenuItem
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setCheckable(bool how)Wt::WPopupMenuItem
setChecked(bool how)Wt::WPopupMenuItem
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setData(void *data)Wt::WPopupMenuItem
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool disabled)Wt::WPopupMenuItem [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setIcon(const std::string &path)Wt::WPopupMenuItem
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPopupMenu(WPopupMenu *menu)Wt::WPopupMenuItem
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setText(const WString &text)Wt::WPopupMenuItem
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
text() const Wt::WPopupMenuItem
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
triggered()Wt::WPopupMenuItem
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WPopupMenuItem(const WString &text)Wt::WPopupMenuItem
WPopupMenuItem(const std::string &iconPath, const WString &text)Wt::WPopupMenuItem
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WPopupMenuItem()Wt::WPopupMenuItem
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem.html new file mode 100644 index 0000000..8801c24 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem.html @@ -0,0 +1,449 @@ + + + + +Wt: Wt::WPopupMenuItem Class Reference + + + + + + + + + +
+ +
+

Wt::WPopupMenuItem Class Reference

+
+
+ +

An item in a popup menu. +More...

+ +

#include <Wt/WPopupMenuItem>

+
+Inheritance diagram for Wt::WPopupMenuItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WPopupMenuItem (const WString &text)
 Creates a new item with given text.
 WPopupMenuItem (const std::string &iconPath, const WString &text)
 Creates a new item with given icon and text.
~WPopupMenuItem ()
 Destructor.
void setText (const WString &text)
 Sets the item text.
const WStringtext () const
 Returns the item text.
void setIcon (const std::string &path)
 Sets the item icon path.
const std::string & icon ()
 Returns the item icon path.
void setCheckable (bool how)
 Sets if the item is checkable.
bool isCheckable () const
 Returns whether the item is checkable.
void setPopupMenu (WPopupMenu *menu)
 Sets a sub menu for the item.
WPopupMenupopupMenu () const
 Returns the sub menu.
void setChecked (bool how)
 Sets the checked state.
bool isChecked () const
 Returns the checked state.
+void setData (void *data)
 Sets associated additional data with the item.
+void * data () const
 Returns additional data of the item.
+Signaltriggered ()
 Signal emitted when an item is activated.
virtual void load ()
 Loads content just before the widget is used.
virtual void setDisabled (bool disabled)
 Sets whether the widget is disabled.
+

Detailed Description

+

An item in a popup menu.

+

An item may have a text, icon, and can be checkable or lead to a submenu.

+

When the mouse hovers over the item, its class is changed from "Wt-item" to "Wt-selected".

+
See also:
WPopupMenu
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WPopupMenuItem::WPopupMenuItem (const WString text )
+
+
+ +

Creates a new item with given text.

+
See also:
WPopupMenu::addItem(const WString& text)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WPopupMenuItem::WPopupMenuItem (const std::string &  iconPath,
const WString text 
)
+
+
+ +

Creates a new item with given icon and text.

+

The icon is displayed left to the text.

+
Note:
The icon should have a width of 16 pixels.
+
See also:
WPopupMenu::addItem(const std::string& iconPath, const WString& text)
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string & Wt::WPopupMenuItem::icon ( )
+
+
+ +

Returns the item icon path.

+
See also:
setIcon()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPopupMenuItem::isCheckable ( ) const
+
+
+ +

Returns whether the item is checkable.

+
See also:
setCheckable()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WPopupMenuItem::isChecked ( ) const
+
+
+ +

Returns the checked state.

+

This is only used when isCheckable() == true.

+
See also:
setChecked(bool), isCheckable()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPopupMenuItem::load ( ) [virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + +
WPopupMenu* Wt::WPopupMenuItem::popupMenu ( ) const
+
+
+ +

Returns the sub menu.

+
See also:
setPopupMenu()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setCheckable (bool  how )
+
+
+ +

Sets if the item is checkable.

+

When an item is checkable, a checkbox is displayed to the left of the item text (instead of an icon).

+
See also:
setChecked(), isChecked()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setChecked (bool  how )
+
+
+ +

Sets the checked state.

+

This is only used when isCheckable() == true.

+
See also:
setCheckable(bool), isCheckable()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setDisabled (bool  disabled ) [virtual]
+
+
+ +

Sets whether the widget is disabled.

+

Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.

+

Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.

+
See also:
disable(), enable()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setIcon (const std::string &  path )
+
+
+ +

Sets the item icon path.

+

The icon should have a width of 16 pixels.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setPopupMenu (WPopupMenu menu )
+
+
+ +

Sets a sub menu for the item.

+

Sets a submenu for the item. Ownership of the submenu is transferred to the item.

+
See also:
popupMenu()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPopupMenuItem::setText (const WString text )
+
+
+ +

Sets the item text.

+
See also:
setIcon()
+ +
+
+ +
+
+ + + + + + + +
const WString & Wt::WPopupMenuItem::text ( ) const
+
+
+ +

Returns the item text.

+
See also:
setText()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.md5 new file mode 100644 index 0000000..d9f9647 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.md5 @@ -0,0 +1 @@ +17c468a54c3f449a3d8428d24ca86296 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.png new file mode 100644 index 0000000..4c0809b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenuItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.md5 new file mode 100644 index 0000000..8780b11 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.md5 @@ -0,0 +1 @@ +a3fede120f27c5a826852085a222c7ae \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.png new file mode 100644 index 0000000..f412004 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPopupMenu__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar-members.html new file mode 100644 index 0000000..0af7dfc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar-members.html @@ -0,0 +1,215 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WProgressBar Member List

+
+
+This is the complete list of members for Wt::WProgressBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
format() const Wt::WProgressBar
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximum() const Wt::WProgressBar
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimum() const Wt::WProgressBar
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
progressCompleted()Wt::WProgressBar
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WProgressBar [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFormat(const WString &format)Wt::WProgressBar
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximum(double maximum)Wt::WProgressBar
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimum(double minimum)Wt::WProgressBar
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRange(double minimum, double maximum)Wt::WProgressBar
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValue(double value)Wt::WProgressBar
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::WProgressBar [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
value() const Wt::WProgressBar
valueChanged()Wt::WProgressBar
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WProgressBar(WContainerWidget *parent=0)Wt::WProgressBar
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar.html new file mode 100644 index 0000000..76989bc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar.html @@ -0,0 +1,404 @@ + + + + +Wt: Wt::WProgressBar Class Reference + + + + + + + + + +
+ +
+

Wt::WProgressBar Class Reference

+
+
+ +

A progress bar. +More...

+
+Inheritance diagram for Wt::WProgressBar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WProgressBar (WContainerWidget *parent=0)
 Creates a progress bar.
void setMinimum (double minimum)
 Sets the minimum value.
double minimum () const
 Returns the minimum value.
void setMaximum (double maximum)
 Sets the maximum value.
double maximum () const
 Returns the maximum value.
void setRange (double minimum, double maximum)
 Sets the range.
void setValue (double value)
 Sets the current progress.
+double value () const
 Returns the current progress.
void setFormat (const WString &format)
 Sets the progress format string.
const WStringformat () const
 Returns the progress format string.
virtual WString text () const
 Returns the text displayed inside the progress bar.
Signal< double > & valueChanged ()
 A signal that indicates when the value has changed.
SignalprogressCompleted ()
 A signal that indicates when 100% is reached.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
+

Detailed Description

+

A progress bar.

+

The progress bar can be used to indicate the progress of a certain operation. The text displayed in the progress bar can be customized by specializing text().

+

To use the progress bar, you need to give it a range (minimum and maximum value), and update the progress using setValue().

+

WProgressBar is an inline widget.

+

CSS

+

Using HTML4, the widget is implemented using a set of nested DIVs. The element can be styled using the Wt-progressbar style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.

+
Note:
With the advent of HTML5, this widget will be implemented using the native HTML5 control when available.
+

Member Function Documentation

+ +
+
+ + + + + + + +
const WString& Wt::WProgressBar::format ( ) const
+
+
+ +

Returns the progress format string.

+
See also:
setFormat()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WProgressBar::maximum ( ) const
+
+
+ +

Returns the maximum value.

+
See also:
setMaximum()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WProgressBar::minimum ( ) const
+
+
+ +

Returns the minimum value.

+
See also:
setMinimum()
+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WProgressBar::progressCompleted ( )
+
+
+ +

A signal that indicates when 100% is reached.

+

This signal is emitted when setValue(maximum()) is called.

+
See also:
setValue()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WProgressBar::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WProgressBar::setFormat (const WString format )
+
+
+ +

Sets the progress format string.

+

The format is used by text() to indicate the progress value.

+

The default value is "%.0f %%"

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WProgressBar::setMaximum (double  maximum )
+
+
+ +

Sets the maximum value.

+

The maximum value is the value that corresponds to 0%.

+

The default value is 100.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WProgressBar::setMinimum (double  minimum )
+
+
+ +

Sets the minimum value.

+

The minimum value is the value that corresponds to 0%.

+

The default value is 0.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WProgressBar::setRange (double  minimum,
double  maximum 
)
+
+
+ +

Sets the range.

+
See also:
setMinimum(), setMaximum()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WProgressBar::setValue (double  value )
+
+
+ +

Sets the current progress.

+

value must be a value between minimum() and maximum().

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WProgressBar::text ( ) const [virtual]
+
+
+ +

Returns the text displayed inside the progress bar.

+

This text must be an XHTML formatted text fragment. The default text prints the current progress using format(). You may want to reimplement this method to display a different text corresponding to the current value().

+ +
+
+ +
+
+ + + + + + + +
Signal<double>& Wt::WProgressBar::valueChanged ( )
+
+
+ +

A signal that indicates when the value has changed.

+

This signal is emitted when setValue() is called.

+
See also:
setValue()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.md5 new file mode 100644 index 0000000..bcf22fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.md5 @@ -0,0 +1 @@ +7235f692a8e3a048418f20379f0af319 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.png new file mode 100644 index 0000000..a62c6df Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WProgressBar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton-members.html new file mode 100644 index 0000000..a603698 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton-members.html @@ -0,0 +1,230 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WPushButton Member List

+
+
+This is the complete list of members for Wt::WPushButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
icon() const Wt::WPushButton
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
ref() const Wt::WPushButton
refresh()Wt::WPushButton [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
resource() const Wt::WPushButton
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setIcon(const std::string &url)Wt::WPushButton
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setRef(const std::string &url)Wt::WPushButton
setResource(WResource *resource)Wt::WPushButton
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WPushButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WPushButton
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WFormWidget [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WPushButton(WContainerWidget *parent=0)Wt::WPushButton
WPushButton(const WString &text, WContainerWidget *parent=0)Wt::WPushButton
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton.html new file mode 100644 index 0000000..19daeb4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton.html @@ -0,0 +1,305 @@ + + + + +Wt: Wt::WPushButton Class Reference + + + + + + + + + +
+ +
+

Wt::WPushButton Class Reference

+
+
+ +

A widget that represents a push button. +More...

+ +

#include <Wt/WPushButton>

+
+Inheritance diagram for Wt::WPushButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WPushButton (WContainerWidget *parent=0)
 Creates a push button.
WPushButton (const WString &text, WContainerWidget *parent=0)
 Creates a push button with given label text.
+void setText (const WString &text)
 Sets the button text.
const WStringtext () const
 Returns the button text.
void setIcon (const std::string &url)
 Sets an icon.
const std::string & icon () const
 Returns the icon.
void setRef (const std::string &url)
 Sets a destination URL.
const std::string & ref () const
 Returns the destination URL.
void setResource (WResource *resource)
 Sets a destination resource.
WResourceresource () const
 Returns the destination resource.
virtual void refresh ()
 Refresh the widget.
+

Detailed Description

+

A widget that represents a push button.

+

To act on a button click, connect a slot to the clicked() signal.

+

Usage example:

+
 Wt::WPushButton *ok = new Wt::WPushButton("Okay");
+ ok->clicked().connect(ok, &Wt::WPushButton::disable);
+ ok->clicked().connect(this, &MyClass::processData);
+

WPushButton is an inline widget.

+

CSS

+

The widget corresponds to the HTML <button> tag and has the Wt-btn style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.

+

Member Function Documentation

+ +
+
+ + + + + + + +
const std::string& Wt::WPushButton::icon ( ) const
+
+
+ +

Returns the icon.

+
See also:
setIcon()
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WPushButton::ref ( ) const
+
+
+ +

Returns the destination URL.

+

When the button refers to a resource, the current resource URL is returned. Otherwise, the URL is returned that was set using setRef().

+
See also:
setRef(), WResource::url()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WPushButton::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
WResource* Wt::WPushButton::resource ( ) const
+
+
+ +

Returns the destination resource.

+

Returns 0 if no resource has been set.

+
See also:
setResource()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPushButton::setIcon (const std::string &  url )
+
+
+ +

Sets an icon.

+

The icon is placed to the left of the text.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPushButton::setRef (const std::string &  url )
+
+
+ +

Sets a destination URL.

+

This method can be used to make the button behave like a WAnchor (or conversely, an anchor look like a button) and redirect to another URL when clicked.

+

By default, a button does not refer to an URL and you should listen to the clicked() signal to react to a click event.

+
See also:
setResource(), setRefInternalPath()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WPushButton::setResource (WResource resource )
+
+
+ +

Sets a destination resource.

+

This method can be used to make the button behave like a WAnchor (or conversely, an anchor look like a button) and redirect to another resource when clicked.

+

A resource specifies application-dependent content, which may be generated by your application on demand.

+

This sets the resource as the destination of the button, and is an alternative to setRef(). The resource may be cleared by passing resource = 0.

+

The button does not assume ownership of the resource.

+
See also:
setRef()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WPushButton::text ( ) const
+
+
+ +

Returns the button text.

+
See also:
setText()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.map new file mode 100644 index 0000000..547338a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.md5 new file mode 100644 index 0000000..feb7e21 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.md5 @@ -0,0 +1 @@ +108a7638466f19adc171140ecf15bac4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.png new file mode 100644 index 0000000..d5e94f6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WPushButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton-members.html new file mode 100644 index 0000000..e145d84 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton-members.html @@ -0,0 +1,235 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WRadioButton Member List

+
+
+This is the complete list of members for Wt::WRadioButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
checked()Wt::WAbstractToggleButton
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WAbstractToggleButton [protected, virtual]
group() const Wt::WRadioButton
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isChecked() const Wt::WAbstractToggleButton
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setChecked(bool checked)Wt::WAbstractToggleButton
setChecked()Wt::WAbstractToggleButton [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WAbstractToggleButton
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setUnChecked()Wt::WAbstractToggleButton [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WAbstractToggleButton
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
unChecked()Wt::WAbstractToggleButton
validate()Wt::WFormWidget [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WAbstractToggleButton(WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WAbstractToggleButton(const WString &text, WContainerWidget *parent=0)Wt::WAbstractToggleButton [protected]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WRadioButton(WContainerWidget *parent=0)Wt::WRadioButton
WRadioButton(const WString &text, WContainerWidget *parent=0)Wt::WRadioButton
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WAbstractToggleButton()Wt::WAbstractToggleButton [virtual]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WRadioButton()Wt::WRadioButton
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton.html new file mode 100644 index 0000000..2560049 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton.html @@ -0,0 +1,165 @@ + + + + +Wt: Wt::WRadioButton Class Reference + + + + + + + + + +
+ +
+

Wt::WRadioButton Class Reference

+
+
+ +

A user control that represents a radio button. +More...

+ +

#include <Wt/WRadioButton>

+
+Inheritance diagram for Wt::WRadioButton:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

WRadioButton (WContainerWidget *parent=0)
 Creates an unchecked radio button with empty label and optional parent.
WRadioButton (const WString &text, WContainerWidget *parent=0)
 Creates an unchecked radio button with given text and optional parent.
~WRadioButton ()
 Destructor.
WButtonGroupgroup () const
 Returns the button group.
+

Detailed Description

+

A user control that represents a radio button.

+

Use a WButtonGroup to group together radio buttons that reflect options that are mutually exclusive.

+

Usage example:

+
 enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
+
+ // use a group box as widget container for 3 radio buttons, with a title
+ Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
+
+ // use a button group to logically group the 3 options
+ Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
+
+ Wt::WRadioButton *button;
+ button = new Wt::WRadioButton("I voted Republican", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Republican);
+
+ button = new Wt::WRadioButton("I voted Democrat", container);
+ new Wt::WBreak(container);
+ group->addButton(button, Democrate);
+
+ button = new Wt::WRadioButton("I didn't vote", container);
+ new Wt::WBreak(container);
+ group->addButton(button, NoVote);
+
+ group->setCheckedButton(group->button(NoVote));
+

WRadioButton is an inline widget.

+

CSS

+

This widget corresponds to the HTML <input type="radio"> tag. Depending on whether a text is included, it may be nested in a <span> tag which also includes a rendered WLabel. This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+
See also:
WAbstractToggleButton, WButtonGroup
+

Member Function Documentation

+ +
+
+ + + + + + + +
WButtonGroup* Wt::WRadioButton::group ( ) const
+
+
+ +

Returns the button group.

+

Returns the button group to which this button belongs.

+
See also:
WButtonGroup::addButton(WRadioButton *, int)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.map new file mode 100644 index 0000000..c169ba2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.md5 new file mode 100644 index 0000000..008acd4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.md5 @@ -0,0 +1 @@ +461487cb022769798ce4771baa8dda7f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.png new file mode 100644 index 0000000..ba7a5bf Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WRadioButton__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage-members.html new file mode 100644 index 0000000..207cd6f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage-members.html @@ -0,0 +1,136 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WRasterImage Member List

+
+
+This is the complete list of members for Wt::WRasterImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
children() const Wt::WObject
clear()Wt::WRasterImage [protected, virtual]
Clipping enum valueWt::WPaintDevice
dataChanged()Wt::WResource
dataReceived()Wt::WResource
done()Wt::WRasterImage [virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)Wt::WRasterImage [virtual]
drawImage(const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)Wt::WRasterImage [virtual]
drawLine(double x1, double y1, double x2, double y2)Wt::WRasterImage [virtual]
drawPath(const WPainterPath &path)Wt::WRasterImage [virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)Wt::WRasterImage [virtual]
Font enum valueWt::WPaintDevice
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::WRasterImage [virtual]
height() const Wt::WRasterImage [virtual]
Hints enum valueWt::WPaintDevice
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
init()Wt::WRasterImage [virtual]
internalPath() const Wt::WResource
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
paintActive() const Wt::WRasterImage [virtual]
painter() const Wt::WRasterImage [protected, virtual]
parent() const Wt::WObject
Pen enum valueWt::WPaintDevice
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged(WFlags< ChangeFlag > flags)Wt::WRasterImage [virtual]
Wt::WResource::setChanged()Wt::WResource
setInternalPath(const std::string &path)Wt::WResource
setObjectName(const std::string &name)Wt::WObject
setPainter(WPainter *painter)Wt::WRasterImage [protected, virtual]
setPixel(int x, int y, const WColor &color)Wt::WRasterImage
setUploadProgress(bool enabled)Wt::WResource
Shadow enum valueWt::WPaintDevice
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
Transform enum valueWt::WPaintDevice
url() const Wt::WResource
width() const Wt::WRasterImage [virtual]
WObject(WObject *parent=0)Wt::WObject
WRasterImage(const std::string &type, const WLength &width, const WLength &height, WObject *parent=0)Wt::WRasterImage
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~WObject()Wt::WObject [virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
~WRasterImage()Wt::WRasterImage
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage.html new file mode 100644 index 0000000..216dc10 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage.html @@ -0,0 +1,641 @@ + + + + +Wt: Wt::WRasterImage Class Reference + + + + + + + + + +
+ +
+

Wt::WRasterImage Class Reference
+ +[Painting system] +

+
+
+ +

A paint device for rendering to a raster image. +More...

+ +

#include <Wt/WRasterImage>

+
+Inheritance diagram for Wt::WRasterImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WRasterImage (const std::string &type, const WLength &width, const WLength &height, WObject *parent=0)
 Creates a raster image.
~WRasterImage ()
 Destructor.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
virtual void drawPath (const WPainterPath &path)
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
virtual void init ()
 Initializes the device for painting.
virtual void done ()
 Finishes painting on the device.
virtual bool paintActive () const
 Returns whether painting is active.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.
virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.
void setPixel (int x, int y, const WColor &color)
 Low-level paint method.

+Protected Member Functions

virtual WPainterpainter () const
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)
 Sets the painter.
+virtual void clear ()
 Clears the paint device.
+

Detailed Description

+

A paint device for rendering to a raster image.

+

A WRasterImage paint device provides support for creating raster images (such as PNG or GIF images).

+

It implements two main use-cases:

+
    +
  • When used either in conjunction with a WPainter, it supports vector graphics operations, and can be used to make a PNG or GIF version of a WPaintedWidget's contents.
  • +
+
    +
  • It also provides a low-level API to color individual pixels using setPixel(), which directly sets the raster pixels.
  • +
+

The rendering is provided by GraphicsMagick, and this class is included in the library only if libgraphicsmagick was found during the build of the library.

+

You can use the image as a resource and specialize handleRequest() to paint the contents on the fly. Alternatively can also use write() to serialize to an image file (std::ostream).

+

The latter usage is illustrated by the code below:

+
 Wt::Chart::WCartesianChart *chart = ...
+
+ Wt::WRasterImage pngImage("png", 600, 400);
+ {
+   Wt::WPainter p(&pngImage);
+   chart->paint(p);
+ }
+ std::ofstream f("chart.png");
+ pngImage.write(f);
+

This paint device has the following limitations:

+
    +
  • including images (WPainter::drawImage()) is not yet implemented.
  • +
  • drop shadows are (not yet?) supported.
  • +
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WRasterImage::WRasterImage (const std::string &  type,
const WLength width,
const WLength height,
WObject parent = 0 
)
+
+
+ +

Creates a raster image.

+

type indicates an image type. The mime type of the resource is "image/" type.

+

Wt supports the following image types (amongst others):

+
    +
  • png: Portable Network Graphics
  • +
  • gif: Graphics Interchange Format
  • +
  • bmp: Microsoft windows bitmap
  • +
  • jpeg: Joint Photographic Experts Group JFIF format
  • +
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WRasterImage::done ( ) [virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRasterImage::drawPath (const WPainterPath path ) [virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::handleRequest (const Http::Request request,
Http::Response response 
) [virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WRasterImage::height ( ) const [virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WRasterImage::init ( ) [virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WRasterImage::paintActive ( ) const [virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WRasterImage::painter ( ) const [protected, virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRasterImage::setChanged (WFlags< ChangeFlag flags ) [virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WRasterImage::setPixel (int  x,
int  y,
const WColor color 
)
+
+
+ +

Low-level paint method.

+

Use this method to directly set colors for individual pixels, when using the paint device without a painter.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WRasterImage::width ( ) const [virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.map new file mode 100644 index 0000000..948c61c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.md5 new file mode 100644 index 0000000..3f798e9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.md5 @@ -0,0 +1 @@ +38f22d53892a1fbd3658ff87294e8639 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.png new file mode 100644 index 0000000..30044fd Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WRasterImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea-members.html new file mode 100644 index 0000000..448b885 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea-members.html @@ -0,0 +1,140 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WRectArea Member List

+
+
+This is the complete list of members for Wt::WRectArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
alternateText() const Wt::WAbstractArea
children() const Wt::WObject
clicked()Wt::WAbstractArea
cursor() const Wt::WAbstractArea
doubleClicked()Wt::WAbstractArea
enterPressed()Wt::WAbstractArea
escapePressed()Wt::WAbstractArea
getStateless(Method method)Wt::WObject [protected, virtual]
height() const Wt::WRectArea
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isHole() const Wt::WAbstractArea
keyPressed()Wt::WAbstractArea
keyWentDown()Wt::WAbstractArea
keyWentUp()Wt::WAbstractArea
Method typedefWt::WObject
mouseDragged()Wt::WAbstractArea
mouseMoved()Wt::WAbstractArea
mouseWentDown()Wt::WAbstractArea
mouseWentOut()Wt::WAbstractArea
mouseWentOver()Wt::WAbstractArea
mouseWentUp()Wt::WAbstractArea
mouseWheel()Wt::WAbstractArea
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
ref() const Wt::WAbstractArea
removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WAbstractArea
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resource() const Wt::WAbstractArea
sender()Wt::WObject [protected, static]
setAlternateText(const WString &text)Wt::WAbstractArea
setCursor(Cursor cursor)Wt::WAbstractArea
setHeight(int height)Wt::WRectArea
setHole(bool hole)Wt::WAbstractArea
setObjectName(const std::string &name)Wt::WObject
setRef(const std::string &ref)Wt::WAbstractArea
setResource(WResource *resource)Wt::WAbstractArea
setStyleClass(const WString &styleClass)Wt::WAbstractArea
setTarget(AnchorTarget target)Wt::WAbstractArea
setToolTip(const WString &text)Wt::WAbstractArea
setWidth(int width)Wt::WRectArea
setX(int x)Wt::WRectArea
setY(int y)Wt::WRectArea
styleClass() const Wt::WAbstractArea
target() const Wt::WAbstractArea
toolTip() const Wt::WAbstractArea
width() const Wt::WRectArea
WObject(WObject *parent=0)Wt::WObject
WRectArea()Wt::WRectArea
WRectArea(int x, int y, int width, int height)Wt::WRectArea
WRectArea(double x, double y, double width, double height)Wt::WRectArea
WRectArea(const WRectF &rect)Wt::WRectArea
x() const Wt::WRectArea
y() const Wt::WRectArea
~WAbstractArea()Wt::WAbstractArea [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea.html new file mode 100644 index 0000000..3970af1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea.html @@ -0,0 +1,269 @@ + + + + +Wt: Wt::WRectArea Class Reference + + + + + + + + + +
+ +
+

Wt::WRectArea Class Reference

+
+
+ +

A interactive area in a widget, specified by a rectangle. +More...

+ +

#include <Wt/WRectArea>

+
+Inheritance diagram for Wt::WRectArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WRectArea ()
 Default constructor.
 WRectArea (int x, int y, int width, int height)
 Creates a rectangular area with given geometry.
 WRectArea (double x, double y, double width, double height)
 Creates a rectangular area with given geometry.
 WRectArea (const WRectF &rect)
 Creates a rectangular area with given geometry.
+void setX (int x)
 Sets the top-left X coordinate.
+int x () const
 Returns the top-left X coordinate.
+void setY (int y)
 Sets the top-left Y coordinate.
+int y () const
 Returns the top-left Y coordinate.
+void setWidth (int width)
 Sets the width.
+int width () const
 Returns the width.
+void setHeight (int height)
 Sets the height.
+int height () const
 Returns the height.
+

Detailed Description

+

A interactive area in a widget, specified by a rectangle.

+

The area may be added to a WImage or WPaintedWidget to provide interactivity on a rectangular area of the image. The rectangle is specified in pixel coordinates.

+
 Wt::WImage *image = new Wt::WImage("images/family.jpg");
+ Wt::WRectArea *face = new Wt::WRectArea(100, 120, 200, 130);
+ face->setToolTip("Uncle Frank");
+ image->addArea(face);
+
See also:
WImage::addArea(), WPaintedWidget::addArea()
+
+WCircleArea, WPolygonArea
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WRectArea::WRectArea ( )
+
+
+ +

Default constructor.

+

The default constructor creates a rectangular area spans the whole widget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WRectArea::WRectArea (int  x,
int  y,
int  width,
int  height 
)
+
+
+ +

Creates a rectangular area with given geometry.

+

The arguments are in pixel units.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WRectArea::WRectArea (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Creates a rectangular area with given geometry.

+

The arguments are in pixel units.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WRectArea::WRectArea (const WRectF rect )
+
+
+ +

Creates a rectangular area with given geometry.

+

The rect argument is in pixel units.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.map new file mode 100644 index 0000000..8072d0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.md5 new file mode 100644 index 0000000..2af4e91 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.md5 @@ -0,0 +1 @@ +b707fadadbe165c81759df150e2d107a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.png new file mode 100644 index 0000000..8682890 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF-members.html new file mode 100644 index 0000000..7527b50 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF-members.html @@ -0,0 +1,106 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WRectF Member List

+
+
+This is the complete list of members for Wt::WRectF, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bottom() const Wt::WRectF
bottomLeft() const Wt::WRectF
bottomRight() const Wt::WRectF
center() const Wt::WRectF
contains(const WPointF &p) const Wt::WRectF
contains(double x, double y) const Wt::WRectF
height() const Wt::WRectF
intersects(const WRectF &other) const Wt::WRectF
isEmpty() const Wt::WRectF
isNull() const Wt::WRectF
left() const Wt::WRectF
normalized() const Wt::WRectF
operator==(const WRectF &rhs) const Wt::WRectF
right() const Wt::WRectF
setHeight(double height)Wt::WRectF
setWidth(double width)Wt::WRectF
setX(double x)Wt::WRectF
setY(double y)Wt::WRectF
top() const Wt::WRectF
topLeft() const Wt::WRectF
topRight() const Wt::WRectF
united(const WRectF &other) const Wt::WRectF
width() const Wt::WRectF
WRectF()Wt::WRectF
WRectF(double x, double y, double width, double height)Wt::WRectF
WRectF(const WPointF &topLeft, const WPointF &bottomRight)Wt::WRectF
x() const Wt::WRectF
y() const Wt::WRectF
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF.html new file mode 100644 index 0000000..fd25145 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRectF.html @@ -0,0 +1,626 @@ + + + + +Wt: Wt::WRectF Class Reference + + + + + + + + + +
+ +
+

Wt::WRectF Class Reference
+ +[Painting system] +

+
+
+ +

Utility class that defines a rectangle. +More...

+ +

#include <Wt/WRectF>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WRectF ()
 Default constructor.
 WRectF (double x, double y, double width, double height)
 Creates a rectangle.
 WRectF (const WPointF &topLeft, const WPointF &bottomRight)
 Creates a rectangle.
+bool operator== (const WRectF &rhs) const
 Comparison operator.
bool isNull () const
 Checks for a null rectangle.
bool isEmpty () const
 Determines whether or not this rectangle is empty.
void setX (double x)
 Sets the X-position of the left side.
void setY (double y)
 Sets the Y-position of the top side.
void setWidth (double width)
 Sets the width.
void setHeight (double height)
 Sets the Y-position of the top side.
double x () const
 Returns the X-position of the left side.
double y () const
 Returns the Y-position of the top side.
double width () const
 Returns the width.
double height () const
 Returns the height.
double left () const
 Returns the X position of the left side.
double top () const
 Returns the Y position of the top side.
double right () const
 Returns the X position of the right side.
double bottom () const
 Returns the Y position of the bottom side.
WPointF topLeft () const
 Returns the top left point.
WPointF topRight () const
 Returns the top right point.
+WPointF center () const
 Returns the center point.
WPointF bottomLeft () const
 Returns the bottom left point.
WPointF bottomRight () const
 Returns the bottom right point.
+bool contains (const WPointF &p) const
 Tests if a rectangle contains a point.
+bool contains (double x, double y) const
 Tests if a rectangle contains a point.
+bool intersects (const WRectF &other) const
 Tests if two rectangles intersect.
+WRectF united (const WRectF &other) const
 Makes the union of to rectangles.
WRectF normalized () const
 Returns a normalized rectangle.
+

Detailed Description

+

Utility class that defines a rectangle.

+

The rectangle is defined by a top-left point and a width and height.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WRectF::WRectF ( )
+
+
+ +

Default constructor.

+

Constructs a null rectangle.

+
See also:
isNull()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WRectF::WRectF (double  x,
double  y,
double  width,
double  height 
)
+
+
+ +

Creates a rectangle.

+

Constructs a rectangle with top left point (x, y) and size width x height.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WRectF::WRectF (const WPointF topLeft,
const WPointF bottomRight 
)
+
+
+ +

Creates a rectangle.

+

Constructs a rectangle from the two points topLeft and bottomRight.

+

If you want to create a rectangle from two arbitrary corner points, you can use this constructor too, but should call normalized() afterwords.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
double Wt::WRectF::bottom ( ) const
+
+
+ +

Returns the Y position of the bottom side.

+
See also:
top()
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WRectF::bottomLeft ( ) const
+
+
+ +

Returns the bottom left point.

+
See also:
left(), bottom()
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WRectF::bottomRight ( ) const
+
+
+ +

Returns the bottom right point.

+
See also:
right(), bottom()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::height ( ) const
+
+
+ +

Returns the height.

+
See also:
width()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WRectF::isEmpty ( ) const
+
+
+ +

Determines whether or not this rectangle is empty.

+

A rectangle is empty if its width or its height is less than or equal to zero.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WRectF::isNull ( ) const
+
+
+ +

Checks for a null rectangle.

+
See also:
WRectF()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::left ( ) const
+
+
+ +

Returns the X position of the left side.

+
See also:
x(), right()
+ +
+
+ +
+
+ + + + + + + +
WRectF Wt::WRectF::normalized ( ) const
+
+
+ +

Returns a normalized rectangle.

+

A normalized rectangle has a positive width and height.

+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::right ( ) const
+
+
+ +

Returns the X position of the right side.

+
See also:
left()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRectF::setHeight (double  height )
+
+
+ +

Sets the Y-position of the top side.

+

The bottom side of the rectangle may move, but does not change the Y position of the top side.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRectF::setWidth (double  width )
+
+
+ +

Sets the width.

+

The right side of the rectangle may move, but does not change the X position of the left side.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRectF::setX (double  x )
+
+
+ +

Sets the X-position of the left side.

+

The right side of the rectangle does not move, and as a result, the rectangle may be resized.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRectF::setY (double  y )
+
+
+ +

Sets the Y-position of the top side.

+

The bottom side of the rectangle does not move, and as a result, the rectangle may be resized.

+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::top ( ) const
+
+
+ +

Returns the Y position of the top side.

+
See also:
y(), bottom()
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WRectF::topLeft ( ) const
+
+
+ +

Returns the top left point.

+
See also:
left(), top()
+ +
+
+ +
+
+ + + + + + + +
WPointF Wt::WRectF::topRight ( ) const
+
+
+ +

Returns the top right point.

+
See also:
right(), top()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::width ( ) const
+
+
+ +

Returns the width.

+
See also:
height()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::x ( ) const
+
+
+ +

Returns the X-position of the left side.

+

This is equivalent to left().

+
See also:
y(), left()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WRectF::y ( ) const
+
+
+ +

Returns the Y-position of the top side.

+

This is equivalent to top().

+
See also:
x(), top()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator-members.html new file mode 100644 index 0000000..d30575b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator-members.html @@ -0,0 +1,121 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WRegExpValidator Member List

+
+
+This is the complete list of members for Wt::WRegExpValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WRegExpValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
flags() const Wt::WRegExpValidator
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
invalidNoMatchText() const Wt::WRegExpValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WRegExpValidator [protected, virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
regExp() const Wt::WRegExpValidator
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setFlags(WFlags< RegExpFlag > flags)Wt::WRegExpValidator
setInvalidBlankText(const WString &text)Wt::WValidator
setInvalidNoMatchText(const WString &text)Wt::WRegExpValidator
setMandatory(bool how)Wt::WValidator
setNoMatchText(const WString &text)Wt::WRegExpValidator
setObjectName(const std::string &name)Wt::WObject
setRegExp(const WString &pattern)Wt::WRegExpValidator
State enum nameWt::WValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WRegExpValidator [virtual]
WObject(WObject *parent=0)Wt::WObject
WRegExpValidator(WObject *parent=0)Wt::WRegExpValidator
WRegExpValidator(const WString &pattern, WObject *parent=0)Wt::WRegExpValidator
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WRegExpValidator()Wt::WRegExpValidator
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator.html new file mode 100644 index 0000000..d0f3d8b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator.html @@ -0,0 +1,334 @@ + + + + +Wt: Wt::WRegExpValidator Class Reference + + + + + + + + + +
+ +
+

Wt::WRegExpValidator Class Reference

+
+
+ +

A validator that checks user input against a regular expression. +More...

+ +

#include <Wt/WRegExpValidator>

+
+Inheritance diagram for Wt::WRegExpValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WRegExpValidator (WObject *parent=0)
 Sets a new regular expression validator.
 WRegExpValidator (const WString &pattern, WObject *parent=0)
 Sets a new regular expression validator that accepts input that matches the given regular expression.
~WRegExpValidator ()
 Destructor.
void setRegExp (const WString &pattern)
 Sets the regular expression for valid input.
WString regExp () const
 Returns the regular expression for valid input.
+void setFlags (WFlags< RegExpFlag > flags)
 Sets regular expression matching flags.
+WFlags< RegExpFlagflags () const
 Returns regular expression matching flags.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
void setNoMatchText (const WString &text)
void setInvalidNoMatchText (const WString &text)
 Sets the message to display when the input does not match.
WString invalidNoMatchText () const
 Returns the message displayed when the input does not match.

+Protected Member Functions

std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
+

Detailed Description

+

A validator that checks user input against a regular expression.

+

This validator checks whether user input is matched by the given (perl-like) regular expression.

+

The following perl features are not supported (since client-side validation cannot handle them):

+
    +
  • +No Lookbehind support, i.e. the constructs (?<=text) and (?<!text).
  • +
  • +No atomic grouping, i.e. the construct (?>group).
  • +
  • +No conditional expressions, i.e. the consturct (?ifthen|else).
  • +
+

Usage example:

+
 Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
+ // an email address validator
+ Wt::WRegExpValidator *validator = new Wt::WRegExpValidator("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}");
+ lineEdit->setValidator(validator);
+ lineEdit->setText("koen@emweb.be");
+
Note:
This validator does not fully support unicode: it matches on the UTF8-encoded representation of the string.
+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+ +

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WRegExpValidator::WRegExpValidator (const WString pattern,
WObject parent = 0 
)
+
+
+ +

Sets a new regular expression validator that accepts input that matches the given regular expression.

+

This constructs a validator that matches the perl regular expression expr.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
WString Wt::WRegExpValidator::invalidNoMatchText ( ) const
+
+
+ +

Returns the message displayed when the input does not match.

+
See also:
setInvalidNoMatchText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WRegExpValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented from Wt::WValidator.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WRegExpValidator::regExp ( ) const
+
+
+ +

Returns the regular expression for valid input.

+

Returns the perl regular expression.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRegExpValidator::setInvalidNoMatchText (const WString text )
+
+
+ +

Sets the message to display when the input does not match.

+

The default value is "Invalid input".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRegExpValidator::setNoMatchText (const WString text )
+
+
+

Sets the text to be shown if no match can be found.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WRegExpValidator::setRegExp (const WString pattern )
+
+
+ +

Sets the regular expression for valid input.

+

Sets the perl regular expression expr.

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WRegExpValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

The input is considered valid only when it is blank for a non-mandatory field, or matches the regular expression.

+ +

Reimplemented from Wt::WValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.map new file mode 100644 index 0000000..4e1d8a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.md5 new file mode 100644 index 0000000..f99e67b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.md5 @@ -0,0 +1 @@ +e8c1cf14b382fbc0c9efc50d9331218e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.png new file mode 100644 index 0000000..59bb35c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WRegExpValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WResource-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource-members.html new file mode 100644 index 0000000..624a21b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource-members.html @@ -0,0 +1,110 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WResource Member List

+
+
+This is the complete list of members for Wt::WResource, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
children() const Wt::WObject
dataChanged()Wt::WResource
dataReceived()Wt::WResource
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)=0Wt::WResource [pure virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
internalPath() const Wt::WResource
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged()Wt::WResource
setInternalPath(const std::string &path)Wt::WResource
setObjectName(const std::string &name)Wt::WObject
setUploadProgress(bool enabled)Wt::WResource
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
url() const Wt::WResource
WObject(WObject *parent=0)Wt::WObject
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
~WObject()Wt::WObject [virtual]
~WResource()Wt::WResource
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WResource.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource.html new file mode 100644 index 0000000..657b5ed --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource.html @@ -0,0 +1,524 @@ + + + + +Wt: Wt::WResource Class Reference + + + + + + + + + +
+ +
+

Wt::WResource Class Reference

+
+
+ +

An object which can be rendered in the HTTP protocol. +More...

+ +

#include <Wt/WResource>

+
+Inheritance diagram for Wt::WResource:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WResource (WObject *parent=0)
 Creates a new resource.
 ~WResource ()
 Destroys the resource.
void suggestFileName (const std::string &name)
 Suggests a filename to the user for the data streamed by this resource.
const std::string & suggestedFileName () const
 Returns the suggested file name.
void setChanged ()
 Generates a new URL for this resource and emits the changed signal.
void setInternalPath (const std::string &path)
 Sets an internal path for this resource.
std::string internalPath () const
 Returns the internal path.
const std::string & generateUrl ()
 Generates an URL for this resource.
const std::string & url () const
 Returns the current URL for this resource.
SignaldataChanged ()
 Signal emitted when the data presented in this resource has changed.
void setUploadProgress (bool enabled)
 Indicate interest in upload progress.
Signal< ::uint64_t,::uint64_t > & dataReceived ()
 Signal emitted when data has been received for this resource.
void write (std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())
 Stream the resource to a stream.
virtual void handleRequest (const Http::Request &request, Http::Response &response)=0
 Handles a request.

+Protected Member Functions

void beingDeleted ()
 Prepares the resource for deletion.
+

Detailed Description

+

An object which can be rendered in the HTTP protocol.

+

Usage

+

Besides the main page, other objects may be rendered as additional resources, for example documents or images. Classes such as WAnchor or WImage can use a resource instead of a URL to provide their contents. Whenever the resource has changed, you should call the setChanged() method. setChanged() will make sure that the browser will use a new version of the resource by generating a new URL, and emits the dataChanged() signal to make those that refer to the resource aware that they should update their references to the new URL.

+

You can help the browser to start a suitable helper application to handle the downloaded resource, or suggest to the user a suitable filename for saving the resource, by setting an appropriate file name using suggestFileName().

+

To serve resources that you create on the fly, you need to specialize this class and implement handleRequest().

+

Example for a custom resource implementation:

+
 class MyResource : public Wt::WResource
+ {
+ public:
+   MyResource(Wt::WObject *parent = 0)
+     : Wt::WResource(parent)
+   {
+     suggestFileName("data.txt");
+   }
+
+   ~MyResource() {
+     beingDeleted(); // see "Concurrency issues" below.
+   }
+
+   void handleRequest(const Wt::Http::Request& request,
+                      Wt::Http::Response& response) {
+     response.setMimeType("plain/text");
+     response.out() << "I am a text file." << std::endl;
+   }
+ };
+

Concurrency issues

+

Because of the nature of the web, a resource may be requested one time or multiple times at the discretion of the browser, and therefore your resource should in general not have any side-effects except for what is needed to render its own contents. Unlike event notifications to a Wt application, resource requests are not serialized, but are handled concurrently. You need to grab the application lock if you want to access or modify other widget state from within the resource. When deleting a resource, any pending request is cancelled first. For this mechanism to work you need to specialize the destructor and call beingDeleted(). This method may safely be called multiple times (i.e. from within each destructor in the hierachy).

+

Continuations for asynchronous I/O

+

With respect to I/O, the current strategy is to cache the whole response first in a buffer and use async I/O to push the data to the client, in order to free the thread while waiting for I/O on a possibly slow link. You do not necessarily have to provide all output at once, instead you can obtain a Http::ResponseContinuation object for a response, construct the response piecewise. A new request() will be made to continue the response.

+

Example for a custom resource implementation using continuations:

+
 class MyResource : public Wt::WResource
+ {
+ public:
+   MyResource(int iterations, Wt::WObject *parent = 0)
+     : Wt::WResource(parent)
+     : iterations_(iterations)
+   {
+     suggestFileName("data.txt");
+   }
+
+   ~MyResource() {
+     beingDeleted();
+   }
+
+   void handleRequest(const Wt::Http::Request& request,
+                      const Wt::Http::Response& response) {
+     // see if this request is for a continuation:
+     Wt::Http::ResponseContinuation *continuation = request.continuation();
+
+     // calculate the current start
+     int iteration = continuation ? boost::any_cast<int>(continuation->data()) : 0;
+     if (iteration == 0)
+       response.setMimeType("plain/text");
+
+     int last = std::min(iterations_, iteration + 100);
+     for (int i = iteration; i < last; ++i)
+       response.out() << "Data item " << i << std::endl;
+
+     // if we have not yet finished, create a continuation to serve more
+     if (last < iterations_)
+       continuation = response.createContinuation();
+       // remember what to do next
+       continuation->setData(last);
+     }
+   }
+
+ private:
+   int iterations_;
+ };
+

Global and private resources

+

By default, a resource is private to an application: access to it is protected by same secret session Id that protects any other access to the application.

+

You can also deploy static resources, which are global, using WServer::addResource().

+

Monitoring upload progress

+

A resource may also handle the uploading of files (in fact, WFileUpload uses a WResource to do exactly that) or transmission of other large bodies of data being POST'ed or PUT to the resource URL. For these requests, it may be convenient to enable upload progress monitoring using setUploadProgress(), which allows you to be notified of data being received.

+
See also:
WAnchor, WImage
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WResource::~WResource ( )
+
+
+ +

Destroys the resource.

+

When specializing a resource, you MUST call beingDeleted() from within the specialized destructor, in order to stop any further requests to the resource.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WResource::beingDeleted ( ) [protected]
+
+
+ +

Prepares the resource for deletion.

+

When specializing a resource, you MUST call beingDeleted() from within the specialized destructor, in order to stop any further requests to the resource.

+ +
+
+ +
+
+ + + + + + + +
Signal& Wt::WResource::dataChanged ( )
+
+
+ +

Signal emitted when the data presented in this resource has changed.

+

Widgets that reference the resource (such as anchors and images) will make sure the new data is rendered.

+

It is better to call setChanged() than to emit this signal. setChanged generates a new URL for this resource to avoid caching problems and then emits this signal.

+ +
+
+ +
+
+ + + + + + + +
Signal< ::uint64_t, ::uint64_t >& Wt::WResource::dataReceived ( )
+
+
+ +

Signal emitted when data has been received for this resource.

+

When this signal is emitted, you have the update lock to modify the application. Because there is however no corresponding request from the browser, any update to the user interface is not immediately reflected in the client. To update the client interface, you need to use a WTimer or enable server-push.

+
See also:
setUploadProgress()
+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::WResource::generateUrl ( )
+
+
+ +

Generates an URL for this resource.

+

Generates a new url that refers to this resource. The url is unique to assure that it is not cached by the web browser, and can thus be used to refer to a new "version" of the resource, which can be indicated by emitting the dataChanged() signal.

+

The old urls are not invalidated by calling this method.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WResource::handleRequest (const Http::Request request,
Http::Response response 
) [pure virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implemented in Wt::Ext::DataStore, Wt::WFileResource, Wt::WMemoryResource, Wt::WPdfImage, Wt::WRasterImage, and Wt::WSvgImage.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WResource::internalPath ( ) const
+
+
+ +

Returns the internal path.

+
See also:
setInternalPath().
+ +
+
+ +
+
+ + + + + + + +
void Wt::WResource::setChanged ( )
+
+
+ +

Generates a new URL for this resource and emits the changed signal.

+

This does not work when the resource is deployed at an internal path using setInternalPath().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WResource::setInternalPath (const std::string &  path )
+
+
+ +

Sets an internal path for this resource.

+

Using this method you can deploy the resource at a fixed path. Unless you deploy using cookies for session tracking (not recommended), a session identifier will be appended to the path.

+

You should use internal paths that are different from internal paths handled by your application (WApplication::setInternalPath()), if you do not want a conflict between these two when the browser does not use AJAX (and thus url fragments for its internal paths).

+

The default value is empty. By default the URL for a resource is unspecified and a URL will be generated by the library.

+

The internal path for a static resource is the deployment path specified using WServer::addResource().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WResource::setUploadProgress (bool  enabled )
+
+
+ +

Indicate interest in upload progress.

+

When supported, you can track upload progress using this signal. While data is being received, and before handleRequest() is called, progress information is indicated using dataReceived().

+

We envision that in the future support will depend on a combination of browser and connector. Currently only the wthttp connector provides support for this across all AJAX browsers. In the future, we are likely to implement this also using JavaScript File API features making it independent of connectors.

+

The default value is false.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WResource::suggestedFileName ( ) const
+
+
+ +

Returns the suggested file name.

+
See also:
suggestFileName();
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WResource::suggestFileName (const std::string &  name )
+
+
+ +

Suggests a filename to the user for the data streamed by this resource.

+

For resources, intended to be downloaded by the user, suggest a name used for saving. The filename extension may also help the browser to identify the correct program for opening the resource.

+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::WResource::url ( ) const
+
+
+ +

Returns the current URL for this resource.

+

Returns the url that references this resource.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WResource::write (std::ostream &  out,
const Http::ParameterMap parameters = Http::ParameterMap(),
const Http::UploadedFileMap files = Http::UploadedFileMap() 
)
+
+
+ +

Stream the resource to a stream.

+

This is a convenience method to serialize to a stream (for example a file stream).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.map new file mode 100644 index 0000000..1d58028 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.md5 new file mode 100644 index 0000000..6ed517f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.md5 @@ -0,0 +1 @@ +da8acb60fdb777873fd1f8a54e926553 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.png new file mode 100644 index 0000000..cb98f93 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WResource__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea-members.html new file mode 100644 index 0000000..9c2d85b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea-members.html @@ -0,0 +1,193 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WScrollArea Member List

+
+
+This is the complete list of members for Wt::WScrollArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
horizontalScrollBar() const Wt::WScrollArea
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
ScrollBarAlwaysOff enum valueWt::WScrollArea
ScrollBarAlwaysOn enum valueWt::WScrollArea
ScrollBarAsNeeded enum valueWt::WScrollArea
ScrollBarPolicy enum nameWt::WScrollArea
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setHorizontalScrollBarPolicy(ScrollBarPolicy scrollBarPolicy)Wt::WScrollArea
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setScrollBarPolicy(ScrollBarPolicy scrollBarPolicy)Wt::WScrollArea
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setVerticalScrollBarPolicy(ScrollBarPolicy scrollBarPolicy)Wt::WScrollArea
setWidget(WWidget *widget)Wt::WScrollArea
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
takeWidget()Wt::WScrollArea
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
verticalScrollBar() const Wt::WScrollArea
widget() const Wt::WScrollArea
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WScrollArea(WContainerWidget *parent=0)Wt::WScrollArea
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea.html new file mode 100644 index 0000000..af2ba19 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea.html @@ -0,0 +1,249 @@ + + + + +Wt: Wt::WScrollArea Class Reference + + + + + + + + + +
+ +
+

Wt::WScrollArea Class Reference

+
+
+ +

A widget that adds scrolling capabilities to its content. +More...

+ +

#include <Wt/WScrollArea>

+
+Inheritance diagram for Wt::WScrollArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  ScrollBarPolicy { ScrollBarAsNeeded, +ScrollBarAlwaysOff, +ScrollBarAlwaysOn + }

+Public Member Functions

WScrollArea (WContainerWidget *parent=0)
 Creates a scroll area.
void setWidget (WWidget *widget)
 Sets the widget that is the contents of the scroll area.
+WWidgettakeWidget ()
 Remove the widget content.
+WWidgetwidget () const
 Returns the widget content.
+WScrollBarhorizontalScrollBar () const
 Returns the horizontal scrollbar.
+WScrollBarverticalScrollBar () const
 Returns the vertical scrollbar.
void setScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the policy for both scrollbars.
void setHorizontalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the horizontal scroll bar policy.
void setVerticalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the vertical scroll bar policy.
+

Detailed Description

+

A widget that adds scrolling capabilities to its content.

+

Use a WScrollArea to add scrolling capabilities to another widget. When the content is bigger than the WScrollArea, scrollbars are added so that the user can still view the entire content.

+

Use setScrollBarPolicy() to configure if and when the scrollbars may appear.

+

In many cases, it might be easier to use the CSS overflow property on a WContainerWidget (see WContainerWidget::setOverflow()). However, this class will behave better when used inside a layout manager: in that case it will make sure horizontal scrolling works properly, since otherwise the layout manager would overflow rather than scrollbars appear.

+

CSS

+

This widget is rendered using a <div> with a CSS overflow attribute. When in a layout manager it is positioned absolutely. It can be styled using inline or external CSS as appropriate.

+

Member Enumeration Documentation

+ +
+ +
+

brief Policy for showing a scrollbar.

+
Enumerator:
+ + + +
ScrollBarAsNeeded  +

Automatic.

+
ScrollBarAlwaysOff  +

Always show a scrollbar.

+
ScrollBarAlwaysOn  +

Never show a scrollbar.

+
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WScrollArea::setHorizontalScrollBarPolicy (ScrollBarPolicy  scrollBarPolicy )
+
+
+ +

Returns the horizontal scroll bar policy.

+
See also:
setScrollBarPolicy()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WScrollArea::setScrollBarPolicy (ScrollBarPolicy  scrollBarPolicy )
+
+
+ +

Returns the policy for both scrollbars.

+
See also:
setHorizontalScrollBarPolicy(), setVerticalScrollBarPolicy()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WScrollArea::setVerticalScrollBarPolicy (ScrollBarPolicy  scrollBarPolicy )
+
+
+ +

Returns the vertical scroll bar policy.

+
See also:
setScrollBarPolicy()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WScrollArea::setWidget (WWidget widget )
+
+
+ +

Sets the widget that is the contents of the scroll area.

+

Setting a new widget will delete the previously set widget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.map new file mode 100644 index 0000000..76eb54b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.md5 new file mode 100644 index 0000000..813c21e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.md5 @@ -0,0 +1 @@ +75d20ebd88a0817e116ac754f2024042 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.png new file mode 100644 index 0000000..d26c1b4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar-members.html new file mode 100644 index 0000000..ddd6822 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar-members.html @@ -0,0 +1,99 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WScrollBar Member List

+
+
+This is the complete list of members for Wt::WScrollBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
orientation() const Wt::WScrollBar
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setObjectName(const std::string &name)Wt::WObject
setValue(int value)Wt::WScrollBar
tie(WScrollBar *one, WScrollBar *two)Wt::WScrollBar [static]
unTie(WScrollBar *one, WScrollBar *two)Wt::WScrollBar [static]
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar.html new file mode 100644 index 0000000..a6a3a0a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar.html @@ -0,0 +1,200 @@ + + + + +Wt: Wt::WScrollBar Class Reference + + + + + + + + + +
+ +
+

Wt::WScrollBar Class Reference

+
+
+ +

A scrollbar attached to a scroll area. +More...

+ +

#include <Wt/WScrollBar>

+
+Inheritance diagram for Wt::WScrollBar:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + +

+Public Member Functions

+Orientation orientation () const
 Returns the orientation of this scrollbar.
void setValue (int value)
 Sets the scrollbar value.

+Static Public Member Functions

static void tie (WScrollBar *one, WScrollBar *two)
 Ties two scrollbars together.
static void unTie (WScrollBar *one, WScrollBar *two)
 Unties two scrollbars, that were previously tied together.
+

Detailed Description

+

A scrollbar attached to a scroll area.

+

A WScrollArea always has two scrollbars (even if they are not visible, for example when the policy is WScrollArea::ScrollBarAlwaysOff). Using the tie(WScrollBar *one, WScrollBar *two) functions, it is possible to tie to scrollbars together, so that they will scroll together.

+
See also:
WScrollArea
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WScrollBar::setValue (int  value )
+
+
+ +

Sets the scrollbar value.

+

This will move the scrollbar to the given value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WScrollBar::tie (WScrollBar one,
WScrollBar two 
) [static]
+
+
+ +

Ties two scrollbars together.

+

The effect of this call is that these scrollbars will keep their positions synchronised.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WScrollBar::unTie (WScrollBar one,
WScrollBar two 
) [static]
+
+
+ +

Unties two scrollbars, that were previously tied together.

+

Undo a tie(WScrollBar *one, WScrollBar *two);

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.map new file mode 100644 index 0000000..6ee590d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.md5 new file mode 100644 index 0000000..46f4ee5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.md5 @@ -0,0 +1 @@ +8da0aa548902cf6d2412292d8f194f58 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.png new file mode 100644 index 0000000..fcdf3ed Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollBar__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent-members.html new file mode 100644 index 0000000..122ce97 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent-members.html @@ -0,0 +1,83 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WScrollEvent Member List

+
+
+This is the complete list of members for Wt::WScrollEvent, including all inherited members. + + + + + +
scrollX() const Wt::WScrollEvent
scrollY() const Wt::WScrollEvent
viewportHeight() const Wt::WScrollEvent
viewportWidth() const Wt::WScrollEvent
WScrollEvent()Wt::WScrollEvent
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent.html new file mode 100644 index 0000000..dc44796 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WScrollEvent.html @@ -0,0 +1,192 @@ + + + + +Wt: Wt::WScrollEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WScrollEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a scroll event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

WScrollEvent ()
 Default constructor.
int scrollX () const
 Returns the current horizontal scroll position.
int scrollY () const
 Returns the current vertical scroll position.
int viewportWidth () const
 Returns the current horizontal viewport width.
int viewportHeight () const
 Returns the current horizontal viewport height.
+

Detailed Description

+

A class providing details for a scroll event.

+
See also:
WContainerWidget::scrolled()
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WScrollEvent::scrollX ( ) const
+
+
+ +

Returns the current horizontal scroll position.

+
See also:
scrollY(), viewportWidth()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WScrollEvent::scrollY ( ) const
+
+
+ +

Returns the current vertical scroll position.

+
See also:
scrollX(), viewportHeight()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WScrollEvent::viewportHeight ( ) const
+
+
+ +

Returns the current horizontal viewport height.

+

Returns the current viewport height.

+
See also:
viewportWidth(), scrollY()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WScrollEvent::viewportWidth ( ) const
+
+
+ +

Returns the current horizontal viewport width.

+

Returns the current viewport width.

+
See also:
viewportHeight(), scrollX()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox-members.html new file mode 100644 index 0000000..546b44e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox-members.html @@ -0,0 +1,245 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSelectionBox Member List

+
+
+This is the complete list of members for Wt::WSelectionBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::WComboBox
Wt::WObject::addChild(WObject *child)Wt::WObject
addItem(const WString &text)Wt::WComboBox
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clear()Wt::WComboBox
clearSelection()Wt::WSelectionBox
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
count() const Wt::WComboBox
currentIndex() const Wt::WComboBox
currentText() const Wt::WComboBox
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
findText(const WString &text, WFlags< MatchFlag > flags=MatchExactly|MatchCaseSensitive)Wt::WComboBox
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertItem(int index, const WString &text)Wt::WComboBox
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
itemText(int index) const Wt::WComboBox
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
model() const Wt::WComboBox
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WComboBox [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeItem(int index)Wt::WComboBox
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sactivated()Wt::WComboBox
selected()Wt::WFormWidget
selectedIndexes() const Wt::WSelectionBox
selectionMode() const Wt::WSelectionBox
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setCurrentIndex(int index)Wt::WComboBox
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setItemText(int index, const WString &text)Wt::WComboBox
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setModel(WAbstractItemModel *model)Wt::WComboBox
setModelColumn(int index)Wt::WComboBox
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSelectedIndexes(const std::set< int > &selection)Wt::WSelectionBox
setSelectionMode(SelectionMode mode)Wt::WSelectionBox
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setVerticalSize(int items)Wt::WSelectionBox
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WComboBox [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
verticalSize() const Wt::WSelectionBox
WComboBox(WContainerWidget *parent=0)Wt::WComboBox
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WSelectionBox(WContainerWidget *parent=0)Wt::WSelectionBox
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox.html new file mode 100644 index 0000000..00a7620 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox.html @@ -0,0 +1,262 @@ + + + + +Wt: Wt::WSelectionBox Class Reference + + + + + + + + + +
+ +
+

Wt::WSelectionBox Class Reference
+ +[Model/view system] +

+
+
+ +

A selection box allows selection from a list of options. +More...

+ +

#include <Wt/WSelectionBox>

+
+Inheritance diagram for Wt::WSelectionBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

WSelectionBox (WContainerWidget *parent=0)
 Constructor.
int verticalSize () const
 Sets the number of items that are visible.
+void setVerticalSize (int items)
 Returns the number of items that are visible.
void setSelectionMode (SelectionMode mode)
 Sets the selection mode.
SelectionMode selectionMode () const
 Returns the selection mode.
const std::set< int > & selectedIndexes () const
 Returns the current selection (in Wt::ExtendedSelection mode).
void setSelectedIndexes (const std::set< int > &selection)
 Sets the selection (in Wt::ExtendedSelection mode).
void clearSelection ()
 Clears the current selection.
+

Detailed Description

+

A selection box allows selection from a list of options.

+

By default, a selection box may be used to let the user select one item from a list. This may be changed to multiple selection mode using setSelectionMode().

+

The current selection may be set and read using setCurrentIndex() and currentIndex(), for SingleSelection mode, or setSelectedIndexes() and selectedIndexes() for Wt::ExtendedSelection mode. The activated() and sactivated() signals are not emited in the Wt::ExtendedSelection mode, use the changed() signal changed().

+

WSelectionBox is an MVC view class, using a simple string list model by default. The model may be populated using WComboBox::addItem() or WComboBox::insertItem() and the contents can be cleared through clear(). These methods manipulate the underlying model().

+

To use the selectionbox with a custom model instead of the default WStringListModel, use setModel().

+

Usage example:

+
 Wt::WSelectionBox *selectionBox = new Wt::WSelectionBox(this);
+ selectionBox->addItem("Clint Eastwood");
+ selectionBox->addItem("Mick Jagger");
+ selectionBox->addItem("Johnny Depp");
+ selectionBox->addItem("Kate Winslet");
+
+ selectionBox->setCurrentIndex(2); // Johnny Depp
+ selectionBox->activated().connect(this, &MyWidget::comboChanged);
+

WSelectionBox is an inline widget.

+

CSS

+

The widget corresponds to the HTML <select> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WSelectionBox::clearSelection ( )
+
+
+ +

Clears the current selection.

+

Clears the current selection.

+
See also:
setCurrentIndex(), setSelectedIndexes()
+ +
+
+ +
+
+ + + + + + + +
const std::set<int>& Wt::WSelectionBox::selectedIndexes ( ) const
+
+
+ +

Returns the current selection (in Wt::ExtendedSelection mode).

+

Get the list of currently selected items. This method is only defined when selectionMode() is Wt::ExtendedSelection. Otherwise, you should use currentIndex() to get item currently selected.

+
See also:
currentIndex()
+ +
+
+ +
+
+ + + + + + + +
SelectionMode Wt::WSelectionBox::selectionMode ( ) const
+
+
+ +

Returns the selection mode.

+
See also:
setSelectionMode(SelectionMode)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSelectionBox::setSelectedIndexes (const std::set< int > &  selection )
+
+
+ +

Sets the selection (in Wt::ExtendedSelection mode).

+

For an Wt::ExtendedSelection mode, set the list of currently selected items.

+
See also:
selectedIndexes()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSelectionBox::setSelectionMode (SelectionMode  mode )
+
+
+ +

Sets the selection mode.

+

The default selection mode is SingleSelection. You can change to Wt::ExtendedSelection to allow selection of multiple items.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WSelectionBox::verticalSize ( ) const
+
+
+ +

Sets the number of items that are visible.

+

If more items are available, a scroll-bar is provided.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.map new file mode 100644 index 0000000..da4c3e1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.md5 new file mode 100644 index 0000000..95da2df --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.md5 @@ -0,0 +1 @@ +9facd8c324f5d4fc46eaa2115e0b5367 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.png new file mode 100644 index 0000000..2039aa7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSelectionBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WServer-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer-members.html new file mode 100644 index 0000000..4132c53 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer-members.html @@ -0,0 +1,92 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WServer Member List

+
+
+This is the complete list of members for Wt::WServer, including all inherited members. + + + + + + + + + + + + + + +
addEntryPoint(EntryPointType type, ApplicationCreator callback, const std::string &path=std::string(), const std::string &favicon=std::string())Wt::WServer
addResource(WResource *resource, const std::string &path)Wt::WServer
appRoot() const Wt::WServer
httpPort() const Wt::WServer
isRunning() const Wt::WServer
readConfigurationProperty(const std::string &name, std::string &value) const Wt::WServer
restart(int argc, char **argv, char **envp)Wt::WServer [static]
setServerConfiguration(int argc, char *argv[], const std::string &serverConfigurationFile=std::string())Wt::WServer
start()Wt::WServer
stop()Wt::WServer
waitForShutdown(const char *restartWatchFile=0)Wt::WServer [static]
WRun(int argc, char **argv, ApplicationCreator createApplication=0)Wt::WServer [related]
WServer(const std::string &wtApplicationPath=std::string(), const std::string &wtConfigurationFile=std::string())Wt::WServer
~WServer()Wt::WServer [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WServer.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer.html new file mode 100644 index 0000000..517b1ab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer.html @@ -0,0 +1,595 @@ + + + + +Wt: Wt::WServer Class Reference + + + + + + + + + + +
+ +

A class encapsulating an application server. +More...

+ +

#include <Wt/WServer>

+ +

Inherits Wt::WAbstractServer.

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Exception
 Server Exception class. More...

+Public Member Functions

 WServer (const std::string &wtApplicationPath=std::string(), const std::string &wtConfigurationFile=std::string())
 Creates a new server instance.
virtual ~WServer ()
 Destructor.
void setServerConfiguration (int argc, char *argv[], const std::string &serverConfigurationFile=std::string())
 Configures the HTTP(S) server or FastCGI process.
void addEntryPoint (EntryPointType type, ApplicationCreator callback, const std::string &path=std::string(), const std::string &favicon=std::string())
 Binds an entry-point to a callback function to create a new application.
void addResource (WResource *resource, const std::string &path)
 Binds a resource to a fixed path.
bool start ()
 Starts the server in the background.
void stop ()
 Stops the server.
bool isRunning () const
 Returns whether the server is running.
int httpPort () const
 Returns the server http port number.
std::string appRoot () const
 Returns the approot special property.
bool readConfigurationProperty (const std::string &name, std::string &value) const
 Reads a configuration property.

+Static Public Member Functions

static int waitForShutdown (const char *restartWatchFile=0)
 Waits for a shutdown signal.
static void restart (int argc, char **argv, char **envp)
 A utility method to restart.

+Related Functions

(Note that these are not member functions.)

+
int WRun (int argc, char **argv, ApplicationCreator createApplication=0)
 Runs the Wt application server.
+

Detailed Description

+

A class encapsulating an application server.

+

This server class represents an instance of an application server.

+

It offers support for multiple application entry points and control over starting and stopping the server (the latter functionality is only for supported for the built-in httpd). This may be used as an alternative to using WRun() when you wish to support multiple application entry points, or for integrating a Wt (stand-alone httpd) server application into an existing application, when you want to and start and stop the server as appropriate.

+

As an example usage, consider the implementation of WRun(), which starts the server until a Ctrl-C is pressed or a termination signal has been received, or a restart is indicated using SIGHUP or a changed binary (argv[0]):

+
int WRun(int argc, char *argv[], ApplicationCreator createApplication)
+{
+  try {
+    // use argv[0] as the application name to match a suitable entry
+    // in the Wt configuration file, and use the default configuration
+    // file (which defaults to /etc/wt/wt_config.xml unless the environment
+    // variable WT_CONFIG_XML is set)
+    WServer server(argv[0]);
+
+    // WTHTTP_CONFIGURATION is e.g. "/etc/wt/wthttpd"
+    server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
+
+    // add a single entry point, at the default location (as determined
+    // by the server configuration's deploy-path)
+    server.addEntryPoint(Wt::Application, createApplication);
+    if (server.start()) {
+      int sig = WServer::waitForShutdown(argv[0]);
+
+      std::cerr << "Shutdown (signal = " << sig << ")" << std::endl;
+      server.stop();
+
+      if (sig == SIGHUP)
+        WServer::restart(argc, argv, environ);
+    }
+  } catch (WServer::Exception& e) {
+    std::cerr << e.what() << "\n";
+    return 1;
+  } catch (std::exception& e) {
+    std::cerr << "exception: " << e.what() << "\n";
+    return 1;
+  }
+}
+
Note:
Currently, only a single server instance may be created. We plan to remove this limiation in the future.
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WServer::WServer (const std::string &  wtApplicationPath = std::string(),
const std::string &  wtConfigurationFile = std::string() 
)
+
+
+ +

Creates a new server instance.

+

The wtApplicationPath is used to match specific application-settings in the Wt configuration file. If no specific match could be found, the general settings are used (corresponding to the '*' selector).

+

The Wt application configuration is read from the wtConfigurationFile. If empty, this defaults to the value configured at build time.

+

For more information on configuring Wt applications, see Configuration.

+
Exceptions:
+ + +
Exception: indicates a configuration problem.
+
+
+
See also:
setServerConfiguration()
+ +
+
+ +
+
+ + + + + + + +
virtual Wt::WServer::~WServer ( ) [virtual]
+
+
+ +

Destructor.

+

If the server was still running, it is stopped first by calling stop(). It is probably safer to call stop() first yourself, since this allows exceptions to be caught.

+
See also:
isRunning(), stop()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WServer::addEntryPoint (EntryPointType  type,
ApplicationCreator  callback,
const std::string &  path = std::string(),
const std::string &  favicon = std::string() 
)
+
+
+ +

Binds an entry-point to a callback function to create a new application.

+

The path is the local URL at which the application is deployed: when a user visits this URL, the callback will be called to create a new application. If empty, the URL is inferred from the server configuration's deploy-path (see also Built-in httpd configuration).

+

The path must start with a '/'.

+

The optional favicon is a URL path (which should not contain the host part!) to a favicon, which is the icon displayed in the browser for your application. Alternatively, you may specify a favicon using the "favicon" property in the configuration file (see als Application settings (wt_config.xml)").

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WServer::addResource (WResource resource,
const std::string &  path 
)
+
+
+ +

Binds a resource to a fixed path.

+

Resources may either be private to a single session or public. Use this method to add a public resource with a fixed path.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WServer::appRoot ( ) const
+
+
+ +

Returns the approot special property.

+
See also:
WApplication::appRoot()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WServer::httpPort ( ) const
+
+
+ +

Returns the server http port number.

+

Returns -1 if the port is not known (i.e. because the connector is not aware of how the http server is configured).

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WServer::isRunning ( ) const
+
+
+ +

Returns whether the server is running.

+
See also:
start(), stop()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WServer::readConfigurationProperty (const std::string &  name,
std::string &  value 
) const
+
+
+ +

Reads a configuration property.

+

As properties are unique to an executable location, they are defined from the moment that setServerConfiguration() is invoked. Use this method to access configuration properties outside of an active session, e.g. from within the main() function.

+
See also:
WApplication::readConfigurationProperty()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static void Wt::WServer::restart (int  argc,
char **  argv,
char **  envp 
) [static]
+
+
+ +

A utility method to restart.

+

This will result the application with the new image (argv[0]), effectively loading a newly deployed version. (Experimental, UNIX only)

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WServer::setServerConfiguration (int  argc,
char *  argv[],
const std::string &  serverConfigurationFile = std::string() 
)
+
+
+ +

Configures the HTTP(S) server or FastCGI process.

+

Configures the HTTP(S) server using command-line arguments, a configuration file, or both. The valid options are described in Built-in httpd configuration.

+

The applications themselves are configured using the configuration file passed to the constructor.

+

The server configuration must be set before any other functionality can be used.

+

In case of FastCGI deployment, the serverConfigurationFile argument is ignored, and depending on the command-line arguments, this process may become a FastCGI protocol relay process which never returning from this call but directs the FastCGI stream to the correct session, rather than a Wt application server.

+
Exceptions:
+ + +
Exception: indicates a configuration problem.
+
+
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WServer::start ( )
+
+
+ +

Starts the server in the background.

+

Returns whether the server could be successfully started.

+
Exceptions:
+ + +
Exception: indicates a problem starting the server.
+
+
+
See also:
isRunning(), stop()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WServer::stop ( )
+
+
+ +

Stops the server.

+

All active application sessions are terminated cleanly, and the HTTP(S) server is shut down.

+
Exceptions:
+ + +
Exception: indicates a problem while stopping the server.
+
+
+
See also:
isRunning(), start()
+ +
+
+ +
+
+ + + + + + + + +
static int Wt::WServer::waitForShutdown (const char *  restartWatchFile = 0 ) [static]
+
+
+ +

Waits for a shutdown signal.

+

This static method blocks the current thread, waiting for a shutdown signal. The implementation and details are platform dependent, but this is usually Ctrl-C (SIGINT), SIGKILL, or SIGHUP.

+

This method is convenient if you want to customize how the server is started (by instantiating a WServer object yourself, instead of using Wt::Wrun()), but still want to use Wt as a standalone server that cleanly terminates on interruption.

+

The optional restartWatchFile parameter can be used to let the server watch for changes to a particular file (usually the binary itself, argv[0]) which it will also interpret as SIGHUP. This may be convenient to start the new binary after cleanly shutting down, using restart(). (Experimental, UNIX only)

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int WRun (int  argc,
char **  argv,
ApplicationCreator  createApplication = 0 
) [related]
+
+
+ +

Runs the Wt application server.

+

This function runs the application server, and should be called only once (e.g. from within your main function).

+

The createApplication argument is a function pointer to create new application instances for each new user surfing to your application.

+

When using the built-in httpd, the implementation listens for POSIX termination signals (or console CTRL-C) event. You can use the WServer class for more flexible control on starting and stopping the server.

+
See also:
WApplication
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception-members.html new file mode 100644 index 0000000..e028854 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WServer::Exception Member List

+
+
+This is the complete list of members for Wt::WServer::Exception, including all inherited members. + +
what() const Wt::WServer::Exception
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception.html new file mode 100644 index 0000000..b7b5048 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WServer_1_1Exception.html @@ -0,0 +1,102 @@ + + + + +Wt: Wt::WServer::Exception Class Reference + + + + + + + + + +
+ +
+

Wt::WServer::Exception Class Reference

+
+
+ +

Server Exception class. +More...

+ +

Inherits std::exception.

+ +

List of all members.

+ + + + +

+Public Member Functions

+const char * what () const throw ()
 Returns the error message.
+

Detailed Description

+

Server Exception class.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow-members.html new file mode 100644 index 0000000..93a5e04 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow-members.html @@ -0,0 +1,90 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WShadow Member List

+
+
+This is the complete list of members for Wt::WShadow, including all inherited members. + + + + + + + + + + + + +
blur() const Wt::WShadow
color() const Wt::WShadow
none() const Wt::WShadow
offsetX() const Wt::WShadow
offsetY() const Wt::WShadow
operator!=(const WShadow &other) const Wt::WShadow
operator==(const WShadow &other) const Wt::WShadow
setBlur(double blur)Wt::WShadow
setColor(const WColor &color)Wt::WShadow
setOffsets(double dx, double dy)Wt::WShadow
WShadow()Wt::WShadow
WShadow(double dx, double dy, const WColor &color, double blur)Wt::WShadow
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow.html new file mode 100644 index 0000000..c5b1202 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WShadow.html @@ -0,0 +1,306 @@ + + + + +Wt: Wt::WShadow Class Reference + + + + + + + + + +
+ +
+

Wt::WShadow Class Reference
+ +[Painting system] +

+
+
+ +

Class that defines a shadow style. +More...

+ +

#include <Wt/WShadow>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WShadow ()
 Default constructor.
WShadow (double dx, double dy, const WColor &color, double blur)
 Constructs a shadow with given offset and color.
bool operator== (const WShadow &other) const
 Comparison operator.
bool operator!= (const WShadow &other) const
 Comparison operator.
+bool none () const
 Returns whether the shadow effect is nihil.
+void setOffsets (double dx, double dy)
 Sets the shadow offset.
double offsetX () const
 Returns the shadow X offset.
double offsetY () const
 Returns the shadow Y offset.
void setColor (const WColor &color)
 Changes the shadow color.
const WColorcolor () const
 Returns the shadow color.
void setBlur (double blur)
 Sets the blur.
double blur () const
 Returns the blur.
+

Detailed Description

+

Class that defines a shadow style.

+
See also:
WPainter::setShadow()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WShadow::WShadow ( )
+
+
+ +

Default constructor.

+

Constructs a disabled shadow effect (offsetX = offsetY = blur = 0)

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
double Wt::WShadow::blur ( ) const
+
+
+ +

Returns the blur.

+
See also:
setBlur()
+ +
+
+ +
+
+ + + + + + + +
const WColor& Wt::WShadow::color ( ) const
+
+
+ +

Returns the shadow color.

+
See also:
setColor()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WShadow::offsetX ( ) const
+
+
+ +

Returns the shadow X offset.

+
See also:
setOffsets()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WShadow::offsetY ( ) const
+
+
+ +

Returns the shadow Y offset.

+
See also:
setOffsets()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WShadow::operator!= (const WShadow other ) const
+
+
+ +

Comparison operator.

+

Returns true if the shadows are different.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WShadow::operator== (const WShadow other ) const
+
+
+ +

Comparison operator.

+

Returns true if the shadows are exactly the same.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WShadow::setBlur (double  blur )
+
+
+ +

Sets the blur.

+
See also:
blur()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WShadow::setColor (const WColor color )
+
+
+ +

Changes the shadow color.

+
See also:
color()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper-members.html new file mode 100644 index 0000000..7b406e1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper-members.html @@ -0,0 +1,103 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSignalMapper< T, A1 > Member List

+
+
+This is the complete list of members for Wt::WSignalMapper< T, A1 >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
map()Wt::WSignalMapper< T, A1 >
map1(A1 a)Wt::WSignalMapper< T, A1 >
mapConnect(SignalBase &signal, const T &data)Wt::WSignalMapper< T, A1 >
mapConnect1(S &signal, const T &data)Wt::WSignalMapper< T, A1 >
mapped()Wt::WSignalMapper< T, A1 >
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeMapping(WObject *sender)Wt::WSignalMapper< T, A1 >
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setMapping(WObject *sender, const T &data)Wt::WSignalMapper< T, A1 >
setObjectName(const std::string &name)Wt::WObject
WObject(WObject *parent=0)Wt::WObject
WSignalMapper(WObject *parent=0)Wt::WSignalMapper< T, A1 >
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper.html new file mode 100644 index 0000000..ecf8cd0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper.html @@ -0,0 +1,350 @@ + + + + +Wt: Wt::WSignalMapper< T, A1 > Class Template Reference + + + + + + + + + +
+ +
+

Wt::WSignalMapper< T, A1 > Class Template Reference
+ +[Signal/slot system] +

+
+
+ +

A utility class to connect multiple senders to a single slot. +More...

+ +

#include <Wt/WSignalMapper>

+
+Inheritance diagram for Wt::WSignalMapper< T, A1 >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WSignalMapper (WObject *parent=0)
 Creates a new WSignalMapper.
void setMapping (WObject *sender, const T &data)
 Associates data with a sender.
boost::signals::connection mapConnect (SignalBase &signal, const T &data)
 Maps a signal without arguments.
template<typename S >
boost::signals::connection mapConnect1 (S &signal, const T &data)
 Maps a signal with one argument.
Signal< T, A1 > & mapped ()
 Signal emitted in response to a signal sent to map() or map1().
void map ()
 Slot to which to connect the source signal.
void map1 (A1 a)
 Slot to which to connect the source signal, passing the argument to the receiver.
void removeMapping (WObject *sender)
 Removes the mapping of an object.
+

Detailed Description

+

template<typename T, typename A1 = NoClass>
+ class Wt::WSignalMapper< T, A1 >

+ +

A utility class to connect multiple senders to a single slot.

+

This class is useful if you would like to respond to signals of many objects or widgets within a single slot, but need to identify the particular sender through some property.

+

Usage example:

+
 void Test::createWidgets()
+ {
+   Wt::WSignalMapper<WText *> *MyMap = new Wt::WSignalMapper<Wt::WText *>(this);
+   // connect mapped() to our target slot
+   MyMap->mapped().connect(this, &Test::onClick);
+
+   // connect and map every source signal to the mapper
+   MyMap->mapConnect(text1->clicked(), text1);
+   MyMap->mapConnect(text2->clicked(), text2);
+   MyMap->mapConnect(text3->clicked(), text3);
+ }
+
+ void Test::onClick(WText* source)
+ {
+   // source is where it is coming from
+   // ...
+ }
+

The type T may be any type that has proper copy semantics and a default constructor. The mapper may pass one extra argument (type A1) from the original signal to the mapped() signal. In that case, you must connect the original signal to the map1() slot, or use mapConnect1().

+

Member Function Documentation

+ +
+
+
+template<typename T , typename A1 >
+ + + + + + + +
void Wt::WSignalMapper< T, A1 >::map ( )
+
+
+ +

Slot to which to connect the source signal.

+

When a signal triggers the slot, the sender is identified and used to find corresponding data set with setMapping(), which is then use to propagate further in the mapped() signal.

+ +
+
+ +
+
+
+template<typename T , typename A1>
+ + + + + + + + +
void Wt::WSignalMapper< T, A1 >::map1 (A1  a )
+
+
+ +

Slot to which to connect the source signal, passing the argument to the receiver.

+

When a signal triggers the slot, the sender is identified and used to find corresponding data set with setMapping(), which is then use to propagate further in the mapped() signal. The additional argument a is passed as the second argument to the mapped() signal.

+ +
+
+ +
+
+
+template<typename T, typename A1 >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::WSignalMapper< T, A1 >::mapConnect (SignalBase signal,
const T &  data 
)
+
+
+ +

Maps a signal without arguments.

+

Connect the given signal with the slot, and associate the data when it is triggered.

+
 Wt::WSignalMapper<T> *mapper = ...
+
+ mapper->mapConnect(widget->clicked(), data);
+

is equivalent to:

+
 Wt::WSignalMapper<T> *mapper = ...
+
+ widget->clicked().connect(mapper, &Wt::WSignalMapper<T>::map);
+ mapper->setMapping(widget, data);
+
+
+
+ +
+
+
+template<typename T, typename A1 >
+
+template<typename S >
+ + + + + + + + + + + + + + + + + + +
boost::signals::connection Wt::WSignalMapper< T, A1 >::mapConnect1 (S &  signal,
const T &  data 
)
+
+
+ +

Maps a signal with one argument.

+

Connect the given signal with the slot, and associate the data when it is triggered. The signal argument will be passed to the mapped() signal.

+
 Wt::WSignalMapper<T, Wt::WMouseEvent> *mapper = ...
+
+ mapper->mapConnect(widget->clicked(), data);
+

is equivalent to:

+
 Wt::WSignalMapper<T, Wt::WMouseEvent> *mapper = ...
+
+ widget->clicked().connect(mapper, &Wt::WSignalMapper<T, Wt::WMouseEvent>::map1);
+ mapper->setMapping(widget, data);
+
+
+
+ +
+
+
+template<typename T, typename A1 = NoClass>
+ + + + + + + +
Signal<T, A1>& Wt::WSignalMapper< T, A1 >::mapped ( )
+
+
+ +

Signal emitted in response to a signal sent to map() or map1().

+

The first argument propagated is the data that is associated with the specific sender, set in setMapping() or mapConnect(). The second argument is an argument passed from the originating signal.

+ +
+
+ +
+
+
+template<typename T , typename A1 >
+ + + + + + + + +
void Wt::WSignalMapper< T, A1 >::removeMapping (WObject sender )
+
+
+ +

Removes the mapping of an object.

+

This method does not disconnect any signals; that is the responsability of the user of WSignalMapper. If no mapping of for an object exits, the mapper will ignore the signal, and not emit the mapped signal.

+ +
+
+ +
+
+
+template<typename T, typename A1 >
+ + + + + + + + + + + + + + + + + + +
void Wt::WSignalMapper< T, A1 >::setMapping (WObject sender,
const T &  data 
)
+
+
+ +

Associates data with a sender.

+

Associate data with a sender, which wel emitted by the mapped() signal, when the corresponding sender signal triggers map() or map1().

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.map new file mode 100644 index 0000000..e37bfc4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.md5 new file mode 100644 index 0000000..23b1a99 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.md5 @@ -0,0 +1 @@ +dec8d8f18172243df4e2b2a1ff2c6f4f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.png new file mode 100644 index 0000000..afc23fe Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSignalMapper__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider-members.html new file mode 100644 index 0000000..9690bea --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider-members.html @@ -0,0 +1,202 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSlider Member List

+
+
+This is the complete list of members for Wt::WSlider, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WSlider [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximum() const Wt::WSlider
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimum() const Wt::WSlider
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
NoTicksWt::WSlider [static]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
orientation() const Wt::WSlider
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WSlider [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximum(int maximum)Wt::WSlider
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimum(int minimum)Wt::WSlider
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setOrientation(Wt::Orientation orientation)Wt::WSlider
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setRange(int minimum, int maximum)Wt::WSlider
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setTickInterval(int tickInterval)Wt::WSlider
setTickPosition(WFlags< TickPosition > tickPosition)Wt::WSlider
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setValue(int value)Wt::WSlider
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
sliderMoved()Wt::WSlider
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
tickInterval() const Wt::WSlider
TickPosition enum nameWt::WSlider
tickPosition() const Wt::WSlider
TicksAbove enum valueWt::WSlider
TicksBelow enum valueWt::WSlider
TicksBothSidesWt::WSlider [static]
TicksLeft enum valueWt::WSlider
TicksRight enum valueWt::WSlider
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
value() const Wt::WSlider
valueChanged()Wt::WSlider
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WSlider(WContainerWidget *parent=0)Wt::WSlider
WSlider(Orientation orientation, WContainerWidget *parent=0)Wt::WSlider
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WSlider()Wt::WSlider
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider.html new file mode 100644 index 0000000..113f44c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider.html @@ -0,0 +1,652 @@ + + + + +Wt: Wt::WSlider Class Reference + + + + + + + + + + +
+ +

A horizontal or vertical slider control. +More...

+ +

#include <Wt/WSlider>

+
+Inheritance diagram for Wt::WSlider:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  TickPosition { TicksAbove = 0x1, +TicksBelow = 0x2, +TicksLeft = 0x1, +TicksRight = 0x2 + }
 

Enumeration that specifies the location of ticks.

+ More...

+Public Member Functions

 WSlider (WContainerWidget *parent=0)
 Creates a default horizontal slider.
 WSlider (Orientation orientation, WContainerWidget *parent=0)
 Creates a default slider of the given orientation.
~WSlider ()
 Destructor.
void setOrientation (Wt::Orientation orientation)
 Sets the slider orientation.
Orientation orientation () const
 Returns the slider orientation.
void setTickInterval (int tickInterval)
 Sets the tick interval.
int tickInterval () const
 Returns the tick interval.
void setTickPosition (WFlags< TickPosition > tickPosition)
 Sets the tick position.
WFlags< TickPositiontickPosition () const
 Returns the tick position.
void setValue (int value)
 Sets the slider value.
int value () const
 Returns the current slider value.
void setMaximum (int maximum)
 Sets the maximum value.
int maximum () const
 Returns the maximum value.
void setMinimum (int minimum)
 Sets the minimum value.
int minimum () const
 Returns the minimum value.
void setRange (int minimum, int maximum)
 Sets the value range.
Signal< int > & valueChanged ()
 Signal emitted when the user has changed the value of the slider.
JSignal< int > & sliderMoved ()
 Signal emitted while the user drags the slider.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.

+Static Public Attributes

+static const Wt::WFlags
+< TickPosition
NoTicks = 0
 Do not render ticks.
+static const Wt::WFlags
+< TickPosition
TicksBothSides = TicksAbove | TicksBelow
 Render ticks on both sides.

+Protected Member Functions

virtual void layoutSizeChanged (int width, int height)
 Virtual method that indicates a size change.
+

Detailed Description

+

A horizontal or vertical slider control.

+

A slider allows the user to specify an integer value within a particular range using a visual slider.

+

The slider must be sized explicitly using WWidget::resize(). The default size is 150 x 50 pixels for a horizontal slider, and 50 x 150 pixels for a vertical slider.

+

Usage example:

+
 Wt::WSlider *scaleSlider = new Wt::WSlider(Wt::Horizontal);
+ scaleSlider->setMinimum(0);
+ scaleSlider->setMaximum(20);
+ scaleSlider->setValue(10);
+ scaleSlider->setTickInterval(5);
+ scaleSlider->setTickPosition(Wt::WSlider::TicksBothSides);
+ scaleSlider->resize(300, 50);
+ scaleSlider->valueChanged().connect(this, &ThisClass::scaleShape);
+
+WSlider-1.png +

Horizontal slider with ticks on both sides.

+

CSS

+

The slider is styled by the current CSS theme. The look can be overridden using the Wt-slider CSS class and the following selectors:

+
+.Wt-slider .handle-v : The vertical handle
+.Wt-slider .handle-h : The horizontal handle
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WSlider::TickPosition
+
+
+ +

Enumeration that specifies the location of ticks.

+
Enumerator:
+ + + + +
TicksAbove  +

Render ticks above (horizontal slider)

+
TicksBelow  +

Render ticks below (horizontal slider)

+
TicksLeft  +

Render ticks on the left side (vertical slider)

+
TicksRight  +

Render ticks on the right side (vertical slider)

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WSlider::WSlider (WContainerWidget parent = 0 )
+
+
+ +

Creates a default horizontal slider.

+

The slider shows no ticks, has a range from 0 to 99, and has tickInterval of 0 (defaulting to three ticks over the whole range).

+

The initial value is 0.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WSlider::WSlider (Orientation  orientation,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a default slider of the given orientation.

+

The slider shows no ticks, has a range from 0 to 99, and has tickInterval of 0 (defaulting to three ticks over the whole range).

+

The initial value is 0.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSlider::layoutSizeChanged (int  width,
int  height 
) [protected, virtual]
+
+
+ +

Virtual method that indicates a size change.

+

This method propagates the client-side width and height of the widget when the widget is contained by a layout manager and setLayoutSizeAware(true) was called.

+
See also:
setLayoutSizeAware()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WSlider::maximum ( ) const
+
+
+ +

Returns the maximum value.

+
See also:
setMaximum(int)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSlider::minimum ( ) const
+
+
+ +

Returns the minimum value.

+
See also:
setMinimum(int)
+ +
+
+ +
+
+ + + + + + + +
Orientation Wt::WSlider::orientation ( ) const
+
+
+ +

Returns the slider orientation.

+
See also:
setOrientation()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSlider::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setMaximum (int  maximum )
+
+
+ +

Sets the maximum value.

+

The maximum value defines the upper limit of the valid range. The lower limit and current value are automatically adjusted to remain valid.

+
See also:
maximum(), setMinimum(), setRange()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setMinimum (int  minimum )
+
+
+ +

Sets the minimum value.

+

The minimum value defines the lower limit of the valid range. The upper limit and current value are automatically adjusted to remain valid.

+
See also:
minimum(), setMaximum(), setRange()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setOrientation (Wt::Orientation  orientation )
+
+
+ +

Sets the slider orientation.

+
See also:
orientation()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSlider::setRange (int  minimum,
int  maximum 
)
+
+
+ +

Sets the value range.

+
See also:
setMinimum(), setMaximum()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setTickInterval (int  tickInterval )
+
+
+ +

Sets the tick interval.

+

The tick interval specifies the interval for placing ticks along the slider. The interval is specified in value units (not pixel units). A value of 0 specifies an automatic tick interval, which defaults to 3 ticks spanning the whole range.

+
See also:
tickInterval(), setTickPosition()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setTickPosition (WFlags< TickPosition tickPosition )
+
+
+ +

Sets the tick position.

+

The tick position indicates if and where ticks are placed around the slider groove.

+
See also:
tickPosition(), setTickInterval()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSlider::setValue (int  value )
+
+
+ +

Sets the slider value.

+

The value is automatically trimmed to the valid range (minimum() to maximum()).

+
See also:
value()
+ +
+
+ +
+
+ + + + + + + +
JSignal<int>& Wt::WSlider::sliderMoved ( )
+
+
+ +

Signal emitted while the user drags the slider.

+

The current dragged position is passed as the argument. Note that the slider value is not changed while dragging the slider, but only after the slider has been released.

+
See also:
valueChanged()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSlider::tickInterval ( ) const
+
+
+ +

Returns the tick interval.

+
See also:
setTickInterval()
+ +
+
+ +
+
+ + + + + + + +
WFlags<TickPosition> Wt::WSlider::tickPosition ( ) const
+
+
+ +

Returns the tick position.

+
See also:
setTickPosition(), setTickInterval()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSlider::value ( ) const
+
+
+ +

Returns the current slider value.

+
See also:
setValue()
+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::WSlider::valueChanged ( )
+
+
+ +

Signal emitted when the user has changed the value of the slider.

+

The new value is passed as the argument.

+
See also:
sliderMoved()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.md5 new file mode 100644 index 0000000..f8423f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.md5 @@ -0,0 +1 @@ +b19a841106297d232beb0c95814c10a3 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.png new file mode 100644 index 0000000..acae5c4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSlider__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier-members.html new file mode 100644 index 0000000..2a260fd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier-members.html @@ -0,0 +1,106 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSocketNotifier Member List

+
+
+This is the complete list of members for Wt::WSocketNotifier, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
activated()Wt::WSocketNotifier
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
Exception enum valueWt::WSocketNotifier
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isEnabled() const Wt::WSocketNotifier
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
Read enum valueWt::WSocketNotifier
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setEnabled(bool enabled)Wt::WSocketNotifier
setObjectName(const std::string &name)Wt::WObject
socket() const Wt::WSocketNotifier
Type enum nameWt::WSocketNotifier
type() const Wt::WSocketNotifier
WObject(WObject *parent=0)Wt::WObject
Write enum valueWt::WSocketNotifier
WSocketNotifier(int socket, Type type, WObject *parent=0)Wt::WSocketNotifier
~WObject()Wt::WObject [virtual]
~WSocketNotifier()Wt::WSocketNotifier
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier.html new file mode 100644 index 0000000..378b5fb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier.html @@ -0,0 +1,264 @@ + + + + +Wt: Wt::WSocketNotifier Class Reference + + + + + + + + + +
+ +
+

Wt::WSocketNotifier Class Reference

+
+
+ +

A utility class for asynchronous notification of socket activity. +More...

+ +

#include <Wt/WSocketNotifier>

+
+Inheritance diagram for Wt::WSocketNotifier:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Types

enum  Type { Read, +Write, +Exception + }
 

Enumeration that event type.

+ More...

+Public Member Functions

 WSocketNotifier (int socket, Type type, WObject *parent=0)
 Creates a new socket notifier.
~WSocketNotifier ()
 Destructor.
+int socket () const
 Returns the socket.
+Type type () const
 Returns the event type.
void setEnabled (bool enabled)
 Enables or disable the notifier.
+bool isEnabled () const
 Returns if the notifier is enabled.
Signal< int > & activated ()
 Signal indicating an event.
+

Detailed Description

+

A utility class for asynchronous notification of socket activity.

+

Use a aocket notifier to integrate listening for socket events into the Wt event loop. In this way, you do not need a separate thread to listen for socket activity. Socket activity is either the availability of data to be read (Read event), possibility to write data (Write event), or an exception that occurred (Exception event).

+

When an event on a socket is available, the notifier emits the activated() signal. As in the case of a user interface event (like for example WInteractWidget::clicked()), you will typically modify the widget tree in response to the event. But, unless you use a timer (WTimer) or use server-initiated updates (see WApplication::triggerUpdates()), these changes are not propagated to the user interface, until the next user interface event.

+

Like other events, socket notification events are serial (not simultaneous), and there are no thread safety issues (you don't need to take the WApplication::UpdateLock).

+
 Wt::WSocketNotifier *notifier_;
+
+ void init() {
+   ...
+   int sock = ...
+   notifier_ = new Wt::WSocketNotifier(sock, Wt::WSocketNotifier::Read, this);
+   notifier_->activated().connect(this, &HelloApplication::readData);
+ }
+
+ void readData() {
+   // data is available on socket, or socket was closed by peer
+   char buf[100];
+   int s = read(notifier_->socket(), buf, 99);
+
+   if (s > 0) {
+     ...
+   } else {
+     // closed by peer
+     notifier_->setEnabled(false);
+     close(notifier_->socket());
+   }
+ }
+

Note: At present, WSocketNotifier works only in conjunction with the wthttpd connector, and not when using the FastCGI connector.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WSocketNotifier::Type
+
+
+ +

Enumeration that event type.

+
Enumerator:
+ + + +
Read  +

Ready to read.

+
Write  +

Ready to write.

+
Exception  +

Exception.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WSocketNotifier::WSocketNotifier (int  socket,
Type  type,
WObject parent = 0 
)
+
+
+ +

Creates a new socket notifier.

+

Create a new socket listener to listen for events of given type on a socket with file descriptor socket. The WSocketNotifier is enabled after construction.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<int>& Wt::WSocketNotifier::activated ( )
+
+
+ +

Signal indicating an event.

+

The signal is emitted when an event that was waited for is available. The signal argument is socket().

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSocketNotifier::setEnabled (bool  enabled )
+
+
+ +

Enables or disable the notifier.

+

By default, the socket notifier is enabled to receive events. When disabled, no events will be notified (as if the socket notifier didn't exist).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.map new file mode 100644 index 0000000..fd11ac5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.md5 new file mode 100644 index 0000000..c165d22 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.md5 @@ -0,0 +1 @@ +49a7ef9851a28ff74aae42ecdf16e7e4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.png new file mode 100644 index 0000000..2d36aa2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSocketNotifier__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel-members.html new file mode 100644 index 0000000..eed9414 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel-members.html @@ -0,0 +1,179 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSortFilterProxyModel Member List

+
+
+This is the complete list of members for Wt::WSortFilterProxyModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::WSortFilterProxyModel [virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
createSourceIndex(int row, int column, void *ptr) const Wt::WAbstractProxyModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
dynamicSortFilter() const Wt::WSortFilterProxyModel
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
filterAcceptRow(int sourceRow, const WModelIndex &sourceParent) const Wt::WSortFilterProxyModel [protected, virtual]
filterFlags() const Wt::WSortFilterProxyModel
filterKeyColumn() const Wt::WSortFilterProxyModel
filterRegExp() const Wt::WSortFilterProxyModel
filterRole() const Wt::WSortFilterProxyModel
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WSortFilterProxyModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WSortFilterProxyModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WSortFilterProxyModel [virtual]
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
ItemMap typedefWt::WAbstractProxyModel [protected]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
lessThan(const WModelIndex &lhs, const WModelIndex &rhs) const Wt::WSortFilterProxyModel [protected, virtual]
mapFromSource(const WModelIndex &sourceIndex) const Wt::WSortFilterProxyModel [virtual]
mapToSource(const WModelIndex &proxyIndex) const Wt::WSortFilterProxyModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WSortFilterProxyModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WSortFilterProxyModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const Wt::WSortFilterProxyModel [virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setDynamicSortFilter(bool enable)Wt::WSortFilterProxyModel
setFilterFlags(WFlags< RegExpFlag > flags)Wt::WSortFilterProxyModel
setFilterKeyColumn(int column)Wt::WSortFilterProxyModel
setFilterRegExp(const WString &pattern)Wt::WSortFilterProxyModel
setFilterRole(int role)Wt::WSortFilterProxyModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WSortFilterProxyModel [virtual]
Wt::WAbstractProxyModel::setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
setSortRole(int role)Wt::WSortFilterProxyModel
setSourceModel(WAbstractItemModel *sourceModel)Wt::WSortFilterProxyModel [virtual]
shiftModelIndexes(const WModelIndex &sourceParent, int start, int count, ItemMap &items)Wt::WAbstractProxyModel [protected]
sort(int column, SortOrder order=AscendingOrder)Wt::WSortFilterProxyModel [virtual]
sortRole() const Wt::WSortFilterProxyModel
sourceModel() const Wt::WAbstractProxyModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractProxyModel(WObject *parent=0)Wt::WAbstractProxyModel
WObject(WObject *parent=0)Wt::WObject
WSortFilterProxyModel(WObject *parent=0)Wt::WSortFilterProxyModel
~WObject()Wt::WObject [virtual]
~WSortFilterProxyModel()Wt::WSortFilterProxyModel [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel.html new file mode 100644 index 0000000..9a66256 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel.html @@ -0,0 +1,831 @@ + + + + +Wt: Wt::WSortFilterProxyModel Class Reference + + + + + + + + + +
+ +
+

Wt::WSortFilterProxyModel Class Reference
+ +[Model/view system] +

+
+
+ +

A proxy model for Wt's item models that provides filtering and/or sorting. +More...

+ +

#include <Wt/WSortFilterProxyModel>

+
+Inheritance diagram for Wt::WSortFilterProxyModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WSortFilterProxyModel (WObject *parent=0)
 Constructor.
+virtual ~WSortFilterProxyModel ()
 Destructor.
virtual WModelIndex mapFromSource (const WModelIndex &sourceIndex) const
 Maps a source model index to the proxy model.
virtual WModelIndex mapToSource (const WModelIndex &proxyIndex) const
 Maps a proxy model index to the source model.
virtual void setSourceModel (WAbstractItemModel *sourceModel)
 Sets the source model.
void setFilterKeyColumn (int column)
 Specify the column on which the filtering is applied.
int filterKeyColumn () const
 Return the column on which the filtering is applied.
void setFilterRegExp (const WString &pattern)
 Specify a regular expression for filtering.
WString filterRegExp () const
 Return the regular expression used for filtering.
+void setFilterFlags (WFlags< RegExpFlag > flags)
 Sets the filter regular expression flags.
+WFlags< RegExpFlagfilterFlags () const
 Returns the filter regular expression flags.
void setFilterRole (int role)
 Specify the data role used for filtering.
int filterRole () const
 Return the data role used for filtering.
void setSortRole (int role)
 Specify the data role used used for sorting.
int sortRole () const
 Return the data role used for sorting.
void setDynamicSortFilter (bool enable)
 Configure the proxy to dynamically track changes in the source model.
bool dynamicSortFilter () const
 Returns whether this proxy dynmically filters and sorts.
virtual int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
virtual WModelIndex parent (const WModelIndex &index) const
 Returns the parent for a model index.
virtual WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
virtual bool setHeaderData (int section, Orientation orientation, const boost::any &value, int role=EditRole)
 Sets header data for a column or row.
virtual boost::any headerData (int section, Orientation orientation=Horizontal, int role=DisplayRole) const
 Returns the row or column header data.
virtual bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts a number rows.
virtual bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes a number rows.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.

+Protected Member Functions

virtual bool filterAcceptRow (int sourceRow, const WModelIndex &sourceParent) const
 Returns whether a source row is accepted by the filter.
virtual bool lessThan (const WModelIndex &lhs, const WModelIndex &rhs) const
 Compares two indexes.
+

Detailed Description

+

A proxy model for Wt's item models that provides filtering and/or sorting.

+

This proxy model does not store data itself, but presents data from a source model, after filtering rows. It also allows sorting of the source model data, without actually altering the source model. This may be convenient when the source model does not support sorting (i.e. does not reimplement WAbstractProxyModel::sort()), or you do not want to reorder the underlying model since that affects all views on the model.

+

To use the proxy model to filter data, you use the methods setFilterKeyColumn(), setFilterRegExp() and setFilterRole() to specify a filtering operation based on the values of a single column. If this filtering mechanism is too limiting, you can provide specialized filtering by reimplementing the filterAcceptRow() method.

+

Sorting is provided by reimplementing the standard WAbstractItemModel::sort() method. In this way, a view class such as WTreeView may resort the model as indicated by the user. Use setSortRole() to indicate on what data role sorting should be done, or reimplement the lessThan() method to provide a specialized sorting method.

+

By default, the proxy does not automatically refilter and resort when the original model changes. Data changes or row additions to the source model are not automatically reflected in the proxy model, but to maintain integrity, row removals in the source model are always reflected in the proxy model. You can enable the model to always refilter and resort when the underlying model changes using setDynamicSortFilter().

+

Usage example:

+
 // model is the source model
+ Wt::WAbstractItemModel *model = ...
+
+ // we setup a proxy to filter the source model
+ Wt::WSortFilterProxyModel *proxy = new Wt::WSortFilterProxyModel(this);
+ proxy->setSourceModel(model);
+ proxy->setDynamicSortFilter(true);
+ proxy->setFilterKeyColumn(0);
+ proxy->setFilterRole(Wt::UserRole);
+ proxy->setFilterRegExp("Wt::.*");
+
+ // configure a view to use the proxy model instead of the source model
+ Wt::WTreeView *view = new Wt::WTreeView(this);
+ view->setModel(proxy);
+ ...
+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WSortFilterProxyModel::columnCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of columns.

+

This returns the number of columns at index parent.

+
See also:
rowCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WSortFilterProxyModel::dynamicSortFilter ( ) const
+
+
+ +

Returns whether this proxy dynmically filters and sorts.

+
See also:
setDynamicSortFilter()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WSortFilterProxyModel::filterAcceptRow (int  sourceRow,
const WModelIndex sourceParent 
) const [protected, virtual]
+
+
+ +

Returns whether a source row is accepted by the filter.

+

The default implementation uses filterKeyColumn(), filterRole() and filterRegExp().

+

You may want to reimplement this method to provide specialized filtering.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WSortFilterProxyModel::filterKeyColumn ( ) const
+
+
+ +

Return the column on which the filtering is applied.

+
See also:
setFilterKeyColumn()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WSortFilterProxyModel::filterRegExp ( ) const
+
+
+ +

Return the regular expression used for filtering.

+
See also:
setFilterRegExp()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSortFilterProxyModel::filterRole ( ) const
+
+
+ +

Return the data role used for filtering.

+
See also:
setFilterRole()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
boost::any Wt::WSortFilterProxyModel::headerData (int  section,
Orientation  orientation = Horizontal,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns the row or column header data.

+

When orientation is Horizontal, section is a column number, when orientation is Vertical, section is a row number.

+
See also:
data(), setHeaderData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WModelIndex Wt::WSortFilterProxyModel::index (int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]
+
+
+ +

Returns the child index for the given row and column.

+

When implementing this method, you can use createIndex() to create an index that corresponds to the item at row and column within parent.

+

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

+
See also:
parent()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WSortFilterProxyModel::insertRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts a number rows.

+

The rows are inserted in the source model, and if successful, also in the proxy model regardless of whether they are matched by the current filter. They are inserted at the indicated row, regardless of whether this is the correct place according to the defined sorting.

+

As soon as you set data for the column on which the filtering is active, or which affects the sorting, the row may be filtered out or change position when dynamic sorting/filtering is enabled. Therefore, it is usually a good idea to temporarily disable the dynamic sort/filtering behaviour while inserting new row(s) of data.

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Wt::WSortFilterProxyModel::lessThan (const WModelIndex lhs,
const WModelIndex rhs 
) const [protected, virtual]
+
+
+ +

Compares two indexes.

+

The default implementation uses sortRole() and an ordering using the operator< when the data is of the same type or compares lexicographically otherwise.

+

You may want to reimplement this method to provide specialized sorting.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WSortFilterProxyModel::mapFromSource (const WModelIndex sourceIndex ) const [virtual]
+
+
+ +

Maps a source model index to the proxy model.

+

This method returns a model index in the proxy model that corresponds to the model index sourceIndex in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of mapToSource().

+
See also:
mapToSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WSortFilterProxyModel::mapToSource (const WModelIndex proxyIndex ) const [virtual]
+
+
+ +

Maps a proxy model index to the source model.

+

This method returns a model index in the source model that corresponds to the proxy model index proxyIndex.

+
See also:
mapFromSource()
+ +

Implements Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WSortFilterProxyModel::parent (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the parent for a model index.

+

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

+
See also:
index()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WSortFilterProxyModel::removeRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes a number rows.

+

The rows are removed from the source model.

+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WSortFilterProxyModel::rowCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of rows.

+

This returns the number of rows at index parent.

+
See also:
columnCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setDynamicSortFilter (bool  enable )
+
+
+ +

Configure the proxy to dynamically track changes in the source model.

+

When enable is true, the proxy will re-filter and re-sort the model when changes happen to the source model.

+
Note:
This may be ackward when editing through the proxy model, since changing some data may rearrange the model and thus invalidate model indexes. Therefore it is usually less complicated to manipulate directly the source model instead.
+
See also:
lessThan()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setFilterKeyColumn (int  column )
+
+
+ +

Specify the column on which the filtering is applied.

+

This configures the column on which the filterRegExp() is applied.

+

The default value is 0.

+
See also:
setFilterRegExp(), setFilterRole()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setFilterRegExp (const WString pattern )
+
+
+ +

Specify a regular expression for filtering.

+

This configures the regular expression used for filtering on filterKeyColumn().

+

The default value is an empty expression, which disables filtering.

+
See also:
setFilterKeyColumn(), setFilterRole()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setFilterRole (int  role )
+
+
+ +

Specify the data role used for filtering.

+

This configures the data role used for filtering on filterKeyColumn().

+

The default value is DisplayRole.

+
See also:
setFilterKeyColumn(), setFilterRegExp()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WSortFilterProxyModel::setHeaderData (int  section,
Orientation  orientation,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets header data for a column or row.

+

Returns true if the operation was successful.

+
See also:
headerData()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setSortRole (int  role )
+
+
+ +

Specify the data role used used for sorting.

+

This configures the data role used for sorting.

+

The default value is DisplayRole.

+
See also:
lessThan()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSortFilterProxyModel::setSourceModel (WAbstractItemModel sourceModel ) [virtual]
+
+
+ +

Sets the source model.

+

The source model provides the actual data for the proxy model.

+

Ownership of the source model is not transferred.

+ +

Reimplemented from Wt::WAbstractProxyModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSortFilterProxyModel::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WSortFilterProxyModel::sortRole ( ) const
+
+
+ +

Return the data role used for sorting.

+
See also:
setSortRole()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.map new file mode 100644 index 0000000..1787dac --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.md5 new file mode 100644 index 0000000..eea385f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.md5 @@ -0,0 +1 @@ +3cd958029fcbf3a515d8959ffbf8ffd2 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.png new file mode 100644 index 0000000..865b17e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSortFilterProxyModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSound-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound-members.html new file mode 100644 index 0000000..2b2b224 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound-members.html @@ -0,0 +1,102 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSound Member List

+
+
+This is the complete list of members for Wt::WSound, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
loops() const Wt::WSound
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
play()Wt::WSound
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setLoops(int number)Wt::WSound
setObjectName(const std::string &name)Wt::WObject
stop()Wt::WSound
url() const Wt::WSound
WObject(WObject *parent=0)Wt::WObject
WSound(const std::string &url, WObject *parent=0)Wt::WSound
~WObject()Wt::WObject [virtual]
~WSound()Wt::WSound
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSound.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound.html new file mode 100644 index 0000000..8c91cc8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound.html @@ -0,0 +1,230 @@ + + + + +Wt: Wt::WSound Class Reference + + + + + + + + + +
+ +
+

Wt::WSound Class Reference

+
+
+ +

Utility class to play a sound. +More...

+ +

#include <Wt/WSound>

+
+Inheritance diagram for Wt::WSound:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

WSound (const std::string &url, WObject *parent=0)
 Constructs a sound object that will play the given URL.
 ~WSound ()
 Destructor.
+const std::string & url () const
 Returns the url played by this class.
int loops () const
 Returns the configured number of loops for this object.
void setLoops (int number)
 Sets the amount of times the sound has to be played for every invocation of play()
void play ()
 Start asynchronous playback of the sound.
void stop ()
 Stops playback of the sound.
+

Detailed Description

+

Utility class to play a sound.

+

This class provides a way to play a sound asynchonously (if the browser supports this). It is intended as a simple way to play event sounds (not quite for a media center).

+

The current implementation uses Adobe Flash to play sounds in the web browser. Future releases may use the HTML5 tags to play audio in the browser. The appropriate file formats depend on the Flash player or the browser support, but MP3 or WAV are most widely supported.

+

This class uses resourcesURL"WtSoundManager.swf", a flash object, and resourcesURL"swfobject.js", a companion JavaScript library, which are both distributed with Wt in the resources folder, see deployment and resources.

+

Usage example:

+
 WSound *s = new WSound("djing.mp3", parent);
+ s->setLoops(3);
+ s->play();
+ playButton->clicked().connect(s, &WSound::play);
+ stopButton->clicked().connect(s, &WSound::stop);
+
Note:
The current implementation has occasional problems with playing sound on Internet Explorer.
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WSound::~WSound ( )
+
+
+ +

Destructor.

+

The destructor calls stop() and unloads the sound object.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WSound::loops ( ) const
+
+
+ +

Returns the configured number of loops for this object.

+

When play() is called, the sound will be played for this amount of loops.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WSound::play ( )
+
+
+ +

Start asynchronous playback of the sound.

+

This method returns immediately. It will cause the song to be played for the configured amount of loops.

+

The behavior of play() when a sound is already playing depends on the method to play songs in the browser (Flash/HTML5). It may be mixed with an already playing instance, or replace the previous instance. It is recommended to call stop() before play() if you want to avoid mixing multiple instances of a single WSound object.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSound::setLoops (int  number )
+
+
+ +

Sets the amount of times the sound has to be played for every invocation of play()

+

The behavior is undefined for negative loop numbers.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WSound::stop ( )
+
+
+ +

Stops playback of the sound.

+

This method returns immediately. It causes the playback of this WSound to be terminated.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.map new file mode 100644 index 0000000..eb73cd3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.md5 new file mode 100644 index 0000000..64156a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.md5 @@ -0,0 +1 @@ +ca211494776b66f32d59eb9644ec35b3 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.png new file mode 100644 index 0000000..b3983a6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSound__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox-members.html new file mode 100644 index 0000000..1e2b2a0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox-members.html @@ -0,0 +1,248 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSpinBox Member List

+
+
+This is the complete list of members for Wt::WSpinBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WLineEdit [protected, virtual]
boxPadding(Orientation orientation) const Wt::WLineEdit [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
cursorPosition() const Wt::WLineEdit
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
echoMode() const Wt::WLineEdit
EchoMode enum nameWt::WLineEdit
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
hasSelectedText() const Wt::WLineEdit
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximum() const Wt::WSpinBox
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
maxLength() const Wt::WLineEdit
Method typedefWt::WObject
minimum() const Wt::WSpinBox
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
Normal enum valueWt::WLineEdit
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
Password enum valueWt::WLineEdit
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
selected()Wt::WFormWidget
selectedText() const Wt::WLineEdit
selectionStart() const Wt::WLineEdit
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEchoMode(EchoMode echoMode)Wt::WLineEdit
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximum(double maximum)Wt::WSpinBox
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMaxLength(int length)Wt::WLineEdit
setMinimum(double minimum)Wt::WSpinBox
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRange(double minimum, double maximum)Wt::WSpinBox
setReadOnly(bool readOnly)Wt::WFormWidget
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setSingleStep(double step)Wt::WSpinBox
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WLineEdit [virtual]
setTextSize(int chars)Wt::WLineEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setValue(double value)Wt::WSpinBox
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
singleStep() const Wt::WSpinBox
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WLineEdit
textSize() const Wt::WLineEdit
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WLineEdit [virtual]
validator() const Wt::WFormWidget
value() const Wt::WSpinBox
valueChanged()Wt::WSpinBox
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WLineEdit(WContainerWidget *parent=0)Wt::WLineEdit
WLineEdit(const WString &content, WContainerWidget *parent=0)Wt::WLineEdit
WObject(WObject *parent=0)Wt::WObject
WSpinBox(WContainerWidget *parent=0)Wt::WSpinBox
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox.html new file mode 100644 index 0000000..455993b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox.html @@ -0,0 +1,325 @@ + + + + +Wt: Wt::WSpinBox Class Reference + + + + + + + + + +
+ +
+

Wt::WSpinBox Class Reference

+
+
+ +

A spin box. +More...

+ +

#include <Wt/WSpinBox>

+
+Inheritance diagram for Wt::WSpinBox:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WSpinBox (WContainerWidget *parent=0)
 Creates a spin-box.
void setMinimum (double minimum)
 Sets the minimum value.
double minimum () const
 Returns the minimum value.
void setMaximum (double maximum)
 Sets the maximum value.
double maximum () const
 Returns the maximum value.
void setRange (double minimum, double maximum)
 Sets the range.
void setSingleStep (double step)
 Sets the step value.
+double singleStep () const
 Returns the step value.
void setValue (double value)
 Sets the value.
+double value () const
 Returns the value.
Signal< double > & valueChanged ()
 A signal that indicates when the value has changed.
+

Detailed Description

+

A spin box.

+

The spin box provides a control for entering a number. It consists of a line edit, and buttons which allow to increase or decrease the value.

+

WSpinBox is an inline widget.

+

CSS

+

Using HTML4, the widget is implemented using a <input type="text"> The element can be styled using the Wt-spinbox style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.

+
Note:
With the advent of HTML5, this widget will be implemented using the native HTML5 control when available.
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WSpinBox::WSpinBox (WContainerWidget parent = 0 )
+
+
+ +

Creates a spin-box.

+

The range is (0-99) and the step size 1.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
double Wt::WSpinBox::maximum ( ) const
+
+
+ +

Returns the maximum value.

+
See also:
setMaximum()
+ +
+
+ +
+
+ + + + + + + +
double Wt::WSpinBox::minimum ( ) const
+
+
+ +

Returns the minimum value.

+
See also:
setMinimum()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSpinBox::setMaximum (double  maximum )
+
+
+ +

Sets the maximum value.

+

The default value is 99.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSpinBox::setMinimum (double  minimum )
+
+
+ +

Sets the minimum value.

+

The default value is 0.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSpinBox::setRange (double  minimum,
double  maximum 
)
+
+
+ +

Sets the range.

+
See also:
setMinimum(), setMaximum()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSpinBox::setSingleStep (double  step )
+
+
+ +

Sets the step value.

+

The default value is 1.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSpinBox::setValue (double  value )
+
+
+ +

Sets the value.

+

value must be a value between minimum() and maximum().

+

The default value is 0

+ +
+
+ +
+
+ + + + + + + +
Signal<double>& Wt::WSpinBox::valueChanged ( )
+
+
+ +

A signal that indicates when the value has changed.

+

This signal is emitted when setValue() is called.

+
See also:
setValue()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.map new file mode 100644 index 0000000..ecdf7fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.md5 new file mode 100644 index 0000000..2cb00be --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.md5 @@ -0,0 +1 @@ +1c7d8e71dafab7d072deefaa7292e7be \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.png new file mode 100644 index 0000000..c67425a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSpinBox__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget-members.html new file mode 100644 index 0000000..321dc97 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget-members.html @@ -0,0 +1,235 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WStackedWidget Member List

+
+
+This is the complete list of members for Wt::WStackedWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WStackedWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
currentIndex() const Wt::WStackedWidget
currentWidget() const Wt::WStackedWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WStackedWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setCurrentIndex(int index)Wt::WStackedWidget
setCurrentWidget(WWidget *widget)Wt::WStackedWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WStackedWidget(WContainerWidget *parent=0)Wt::WStackedWidget
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget.html new file mode 100644 index 0000000..5acdc18 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget.html @@ -0,0 +1,230 @@ + + + + +Wt: Wt::WStackedWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WStackedWidget Class Reference

+
+
+ +

A container widget that stacks its widgets on top of each other. +More...

+ +

#include <Wt/WStackedWidget>

+
+Inheritance diagram for Wt::WStackedWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

WStackedWidget (WContainerWidget *parent=0)
 Created a new stacked container widget.
virtual void addWidget (WWidget *widget)
 Adds a child widget to this container.
int currentIndex () const
 Returns the index of the widget that is currently shown.
WWidgetcurrentWidget () const
 Returns the widget that is currently shown.
+void insertWidget (int index, WWidget *widget)
 Insert a widget at a given index.
void setCurrentIndex (int index)
 Shows a particular widget.
void setCurrentWidget (WWidget *widget)
 Shows a particular widget.
+

Detailed Description

+

A container widget that stacks its widgets on top of each other.

+

This is a container widgets which at all times has only one item visible. The widget accomplishes this using setHidden(bool) on the children.

+

Using currentIndex() and setCurrentIndex(int index) you can retrieve or set the visible widget.

+

WStackedWidget, like WContainerWidget, is by default not inline.

+

CSS

+

The widget is rendered using an HTML <div> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+
See also:
WMenu
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WStackedWidget::addWidget (WWidget widget ) [virtual]
+
+
+ +

Adds a child widget to this container.

+

This is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.

+ +

Reimplemented from Wt::WContainerWidget.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WStackedWidget::currentIndex ( ) const
+
+
+ +

Returns the index of the widget that is currently shown.

+
See also:
setCurrentIndex(), currentWidget()
+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WStackedWidget::currentWidget ( ) const
+
+
+ +

Returns the widget that is currently shown.

+
See also:
setCurrentWidget(), currentIndex()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStackedWidget::setCurrentIndex (int  index )
+
+
+ +

Shows a particular widget.

+

The widget with index index is made visible, while all other widgets are invisible.

+
See also:
currentIndex(), setCurrentWidget()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStackedWidget::setCurrentWidget (WWidget widget )
+
+
+ +

Shows a particular widget.

+

The widget widget, which must have been added before, is made visible, while all other widgets are invisible.

+
See also:
currentWidget(), setCurrentIndex()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.map new file mode 100644 index 0000000..1ed709b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.md5 new file mode 100644 index 0000000..7c5de0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.md5 @@ -0,0 +1 @@ +47b81a509656e4c9ee140bca8b80cb0c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.png new file mode 100644 index 0000000..c13be5b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WStackedWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem-members.html new file mode 100644 index 0000000..d1b8363 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem-members.html @@ -0,0 +1,142 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WStandardItem Member List

+
+
+This is the complete list of members for Wt::WStandardItem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
appendColumn(const std::vector< WStandardItem * > &items)Wt::WStandardItem
appendRow(const std::vector< WStandardItem * > &items)Wt::WStandardItem
appendRow(WStandardItem *item)Wt::WStandardItem
appendRows(const std::vector< WStandardItem * > &items)Wt::WStandardItem
checkState() const Wt::WStandardItem
child(int row, int column=0) const Wt::WStandardItem
clone() const Wt::WStandardItem [virtual]
column() const Wt::WStandardItem
columnCount() const Wt::WStandardItem
compare(const WStandardItem &other) const Wt::WStandardItem [private]
data(int role=UserRole) const Wt::WStandardItem [virtual]
flags() const Wt::WStandardItem
hasChildren() const Wt::WStandardItem
icon() const Wt::WStandardItem
index() const Wt::WStandardItem
insertColumn(int column, const std::vector< WStandardItem * > &items)Wt::WStandardItem
insertColumns(int column, int count)Wt::WStandardItem
insertRow(int row, const std::vector< WStandardItem * > &items)Wt::WStandardItem
insertRow(int row, WStandardItem *item)Wt::WStandardItem
insertRows(int row, int count)Wt::WStandardItem
insertRows(int row, const std::vector< WStandardItem * > &items)Wt::WStandardItem
internalPath() const Wt::WStandardItem
isCheckable() const Wt::WStandardItem
isChecked() const Wt::WStandardItem
isTristate() const Wt::WStandardItem
model() const Wt::WStandardItem
operator<(const WStandardItem &other) const Wt::WStandardItem [virtual]
parent() const Wt::WStandardItem
removeColumn(int column)Wt::WStandardItem
removeColumns(int column, int count)Wt::WStandardItem
removeRow(int row)Wt::WStandardItem
removeRows(int row, int count)Wt::WStandardItem
row() const Wt::WStandardItem
rowCount() const Wt::WStandardItem
setCheckable(bool checkable)Wt::WStandardItem
setChecked(bool checked)Wt::WStandardItem
setCheckState(CheckState checked)Wt::WStandardItem
setChild(int row, int column, WStandardItem *item)Wt::WStandardItem
setChild(int row, WStandardItem *item)Wt::WStandardItem
setColumnCount(int columns)Wt::WStandardItem
setData(const boost::any &data, int role=UserRole)Wt::WStandardItem [virtual]
setFlags(WFlags< ItemFlag > flags)Wt::WStandardItem
setIcon(const std::string &uri)Wt::WStandardItem
setInternalPath(const std::string &internalpath)Wt::WStandardItem
setModel(WStandardItemModel *model)Wt::WStandardItem [protected, virtual]
setRowCount(int rows)Wt::WStandardItem
setStyleClass(const WString &styleClass)Wt::WStandardItem
setText(const WString &text)Wt::WStandardItem
setToolTip(const WString &toolTip)Wt::WStandardItem
setTristate(bool tristate)Wt::WStandardItem
setUrl(const std::string &url)Wt::WStandardItem
sortChildren(int column, SortOrder order)Wt::WStandardItem [virtual]
styleClass() const Wt::WStandardItem
takeChild(int row, int column)Wt::WStandardItem
takeColumn(int column)Wt::WStandardItem
takeRow(int row)Wt::WStandardItem
text() const Wt::WStandardItem
toolTip() const Wt::WStandardItem
url() const Wt::WStandardItem
WStandardItem()Wt::WStandardItem
WStandardItem(const WString &text)Wt::WStandardItem
WStandardItem(const std::string &iconUri, const WString &text)Wt::WStandardItem
WStandardItem(int rows, int columns=1)Wt::WStandardItem
~WStandardItem()Wt::WStandardItem [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem.html new file mode 100644 index 0000000..af6db2c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItem.html @@ -0,0 +1,1700 @@ + + + + +Wt: Wt::WStandardItem Class Reference + + + + + + + + + + +
+ +

An item in a WStandardItemModel. +More...

+ +

#include <Wt/WStandardItem>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WStandardItem ()
 Creates an empty standard item.
 WStandardItem (const WString &text)
 Creates an item with a text.
 WStandardItem (const std::string &iconUri, const WString &text)
 Creates an item with an icon and a text.
 WStandardItem (int rows, int columns=1)
 Creates an item with an initial geometry.
+virtual ~WStandardItem ()
 Destructor.
void setText (const WString &text)
 Sets the text.
WString text () const
 Returns the text.
void setIcon (const std::string &uri)
 Sets the icon url.
std::string icon () const
 Returns the icon url.
void setStyleClass (const WString &styleClass)
 Sets the CSS style class.
WString styleClass () const
 Returns the item style class.
void setToolTip (const WString &toolTip)
 Sets a tool tip.
WString toolTip () const
 Returns the tool tip.
void setInternalPath (const std::string &internalpath)
 Sets an anchor to an internal path.
std::string internalPath () const
 Returns the anchor to an internal path.
void setUrl (const std::string &url)
 Sets an anchor to an external URL.
std::string url () const
 Returns the url referenced by this item.
void setChecked (bool checked)
 Checks or unchecks the item.
bool isChecked () const
 Returns whether the item is checked.
void setCheckState (CheckState checked)
 Sets the check state.
CheckState checkState () const
 Returns the item's check state.
void setFlags (WFlags< ItemFlag > flags)
 Sets the flags.
WFlags< ItemFlagflags () const
 Returns the flags.
void setCheckable (bool checkable)
 Makes the item checkable.
bool isCheckable () const
 Returns whether the item is checkable.
void setTristate (bool tristate)
 Makes the item tri-state checkable.
bool isTristate () const
 Returns whether the item is tri-state checkable.
virtual void setData (const boost::any &data, int role=UserRole)
 Sets item data.
virtual boost::any data (int role=UserRole) const
 Returns item data.
bool hasChildren () const
 Returns whether the item has any children.
void setRowCount (int rows)
 Sets the row count.
int rowCount () const
 Returns the row count.
void setColumnCount (int columns)
 Sets the column count.
int columnCount () const
 Returns the column count.
void appendColumn (const std::vector< WStandardItem * > &items)
 Add a single column of items.
void insertColumn (int column, const std::vector< WStandardItem * > &items)
 Inserts a single column of items.
void appendRow (const std::vector< WStandardItem * > &items)
 Add a single row of items.
void insertRow (int row, const std::vector< WStandardItem * > &items)
 Inserts a single row of items.
void insertColumns (int column, int count)
 Inserts a number of empty columns.
void insertRows (int row, int count)
 Inserts a number of empty rows.
void appendRow (WStandardItem *item)
 Appends a row containing one item.
void insertRow (int row, WStandardItem *item)
 Inserts a row containing one item.
void appendRows (const std::vector< WStandardItem * > &items)
 Appends multiple rows containing one item.
void insertRows (int row, const std::vector< WStandardItem * > &items)
 Inserts multiple rows containing one item.
void setChild (int row, int column, WStandardItem *item)
 Sets a child item.
void setChild (int row, WStandardItem *item)
 Sets a child item.
WStandardItemchild (int row, int column=0) const
 Returns a child item.
WStandardItemtakeChild (int row, int column)
 Takes a child out of the item.
std::vector< WStandardItem * > takeColumn (int column)
 Takes a column of children out of the item.
std::vector< WStandardItem * > takeRow (int row)
 Takes a row of children out of the item.
void removeColumn (int column)
 Removes a single column.
void removeColumns (int column, int count)
 Removes a number of columns.
void removeRow (int row)
 Removes a single row.
void removeRows (int row, int count)
 Removes a number of rows.
WModelIndex index () const
 Returns the model index for this item.
WStandardItemModelmodel () const
 Returns the model.
WStandardItemparent () const
 Returns the parent item.
int row () const
 Returns the row index.
int column () const
 Returns the column index.
virtual WStandardItemclone () const
 Returns a clone of this item.
virtual bool operator< (const WStandardItem &other) const
 Compares the item with another item.
virtual void sortChildren (int column, SortOrder order)
 Sorts the children according to a given column and sort order.

+Protected Member Functions

virtual void setModel (WStandardItemModel *model)
 Set the model for this WStandardItem and its children.

+Private Member Functions

int compare (const WStandardItem &other) const
 Compares the item with another item.
+

Detailed Description

+

An item in a WStandardItemModel.

+

The item provides access to various data properties: text, icon, CSS style class, tool tip, and check state, and data flags (setFlags() and setCheckable()).

+

An item may contain a table of children items: the initial geometry may be specified in the constructor, or using the methods setRowCount() and setModelCount(). Unspecified items are 0. You can set or inspect children items using the setChild() and child() methods.

+

It is possible to reimplement this class and specialize the methods for data acess (setData() and data()), or provide custom sorting functionality by reimplementing operator<().

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WStandardItem::WStandardItem (const WString text )
+
+
+ +

Creates an item with a text.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WStandardItem::WStandardItem (const std::string &  iconUri,
const WString text 
)
+
+
+ +

Creates an item with an icon and a text.

+
See also:
setText(), setIcon()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WStandardItem::WStandardItem (int  rows,
int  columns = 1 
)
+
+
+ +

Creates an item with an initial geometry.

+
See also:
setRowCount(), setColumnCount()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WStandardItem::appendColumn (const std::vector< WStandardItem * > &  items )
+
+
+ +

Add a single column of items.

+

Appends a single column of items. If necessary, the row count is increased.

+

Equivalent to:

+
See also:
insertColumn(), appendRow()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::appendRow (const std::vector< WStandardItem * > &  items )
+
+
+ +

Add a single row of items.

+

Appends a single row of items. If necessary, the column count is increased.

+

Equivalent to:

+
 insertRow(rowCount(), items);
+
See also:
insertRow(), appendColumn()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::appendRow (WStandardItem item )
+
+
+ +

Appends a row containing one item.

+

This is a convenience method for nodes with a single column (for example for tree nodes). This adds a row with a single item, and is equivalent to:

+
 insertRow(rowCount(), item);
+
See also:
insertRow(int, WStandardItem *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::appendRows (const std::vector< WStandardItem * > &  items )
+
+
+ +

Appends multiple rows containing one item.

+

This is a convenience method for nodes with a single column (for example for tree nodes). This adds a number of rows, each containing a single item, and is equivalent to:

+
 insertRows(rowCount(), items);
+
See also:
insertRows(int, const std::vector<WStandardItem *>&)
+ +
+
+ +
+
+ + + + + + + +
CheckState Wt::WStandardItem::checkState ( ) const
+
+
+ +

Returns the item's check state.

+
See also:
setCheckState()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WStandardItem * Wt::WStandardItem::child (int  row,
int  column = 0 
) const
+
+
+ +

Returns a child item.

+

Returns the child item at position (row, column). This may be 0 if an item was not previously set, or if the position is out of bounds.

+
See also:
setChild(int, int, WStandardItem *).
+ +
+
+ +
+
+ + + + + + + +
WStandardItem * Wt::WStandardItem::clone ( ) const [virtual]
+
+
+ +

Returns a clone of this item.

+
See also:
WStandardItemModel::setItemPrototype()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WStandardItem::column ( ) const
+
+
+ +

Returns the column index.

+

Returns the column index of this item in the parent.

+
See also:
column()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WStandardItem::columnCount ( ) const
+
+
+ +

Returns the column count.

+
See also:
setRowCount()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WStandardItem::compare (const WStandardItem other ) const [private]
+
+
+ +

Compares the item with another item.

+

This is used during sorting (from sortChildren()), and returns which of the two items is the lesser, based on their data.

+

The default implementation compares the data based on the value corresponding to the WStandardItemModel::sortRole().

+
See also:
sortChildren(), WStandardItemModel::setSortRole()
+ +
+
+ +
+
+ + + + + + + + +
boost::any Wt::WStandardItem::data (int  role = UserRole ) const [virtual]
+
+
+ +

Returns item data.

+

Returns item data for the given role.

+
See also:
data()
+ +
+
+ +
+
+ + + + + + + +
WFlags< ItemFlag > Wt::WStandardItem::flags ( ) const
+
+
+ +

Returns the flags.

+
See also:
setFlags()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WStandardItem::hasChildren ( ) const
+
+
+ +

Returns whether the item has any children.

+

This is a convenience method and checks whether rowCount() and columnCount() differ both from 0.

+
See also:
rowCount(), columnCount()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WStandardItem::icon ( ) const
+
+
+ +

Returns the icon url.

+
See also:
setIcon()
+ +
+
+ +
+
+ + + + + + + +
WModelIndex Wt::WStandardItem::index ( ) const
+
+
+ +

Returns the model index for this item.

+
See also:
WStandardItemModel::indexFromItem()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertColumn (int  column,
const std::vector< WStandardItem * > &  items 
)
+
+
+ +

Inserts a single column of items.

+

Inserts a single column of items at column column. If necessary, the row count is increased.

+
See also:
WStandardItem::insertRow()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertColumns (int  column,
int  count 
)
+
+
+ +

Inserts a number of empty columns.

+

Inserts count empty columns at position column.

+
See also:
insertRows()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertRow (int  row,
const std::vector< WStandardItem * > &  items 
)
+
+
+ +

Inserts a single row of items.

+

Inserts a single row of items at row row. If necessary, the column count is increased.

+
See also:
insertColumn()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertRow (int  row,
WStandardItem item 
)
+
+
+ +

Inserts a row containing one item.

+

This is a convenience method for nodes with a single column (for example for tree nodes). This inserts a row with a single item, and is equivalent to:

+
 std::vector<WStandardItem *> r;
+ r.push_back(item);
+ insertRow(row, r);
+
See also:
insertRow(int, const std::vector<WStandardItem *>&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertRows (int  row,
int  count 
)
+
+
+ +

Inserts a number of empty rows.

+

Inserts count empty rows at position row.

+
See also:
insertColumns()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::insertRows (int  row,
const std::vector< WStandardItem * > &  items 
)
+
+
+ +

Inserts multiple rows containing one item.

+

This is a convenience method for nodes with a single column (for example for tree nodes). This inserts a number of rows at row row, each containing a single item, and is equivalent to:

+
 for (unsigned i = 0; i < items.size(); ++i)
+   insertRow(row + i, items[i]);
+
See also:
insertRow(int, WStandardItem *)
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WStandardItem::internalPath ( ) const
+
+
+ +

Returns the anchor to an internal path.

+
See also:
setInternalPath(), setData()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WStandardItem::isCheckable ( ) const
+
+
+ +

Returns whether the item is checkable.

+
See also:
setCheckable()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WStandardItem::isChecked ( ) const
+
+
+ +

Returns whether the item is checked.

+
See also:
setChecked()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WStandardItem::isTristate ( ) const
+
+
+ +

Returns whether the item is tri-state checkable.

+
See also:
setTristate()
+ +
+
+ +
+
+ + + + + + + +
WStandardItemModel* Wt::WStandardItem::model ( ) const
+
+
+ +

Returns the model.

+

This is the model that this item belongs to, or 0 if the item is not associated with a model.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WStandardItem::operator< (const WStandardItem other ) const [virtual]
+
+
+ +

Compares the item with another item.

+

This is used during sorting (from sortChildren()), and returns which of the two items is the lesser, based on their data.

+

The default implementation compares the data based on the value corresponding to the WStandardItemModel::sortRole().

+
See also:
sortChildren(), WStandardItemModel::setSortRole()
+ +
+
+ +
+
+ + + + + + + +
WStandardItem* Wt::WStandardItem::parent ( ) const
+
+
+ +

Returns the parent item.

+

Returns the parent item.

+
See also:
setChild()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::removeColumn (int  column )
+
+
+ +

Removes a single column.

+

Removes the column column from the model (reducing the column count by one). Is equivalent to:

+
See also:
removeColumns(), takeColumn()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::removeColumns (int  column,
int  count 
)
+
+
+ +

Removes a number of columns.

+

Removes count columns from the model (reducing the column count by count).

+
See also:
removeColumn(), removeRows()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::removeRow (int  row )
+
+
+ +

Removes a single row.

+

Removes the row row from the model (reducing the row count by one). Is equivalent to:

+
 removeRows(row, 1);
+
See also:
removeRows(), takeRow()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::removeRows (int  row,
int  count 
)
+
+
+ +

Removes a number of rows.

+

Removes count rows from the model (reducing the row count by count).

+
See also:
removeRow(), removeColumns()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WStandardItem::row ( ) const
+
+
+ +

Returns the row index.

+

Returns the row index of this item in the parent.

+
See also:
column()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WStandardItem::rowCount ( ) const
+
+
+ +

Returns the row count.

+
See also:
setRowCount()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setCheckable (bool  checkable )
+
+
+ +

Makes the item checkable.

+

Adds ItemIsUserCheckable to the item's flags.

+
See also:
setFlags(), setChecked()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setChecked (bool  checked )
+
+
+ +

Checks or unchecks the item.

+

The value is stored as CheckStateRole data.

+

By default, an item is not checked.

+

Note: this requires that the item is checkable (see setCheckable()).

+

If the item is tri-state, you may consider using setCheckState() instead which supports also setting the third Wt::PartiallyChecked state.

+
See also:
setCheckable(), setCheckState()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setCheckState (CheckState  checked )
+
+
+ +

Sets the check state.

+

Like setChecked(), this sets the check state, but allows also setting the Wt::PartiallyChecked state when the item is tri-state checkable.

+

The value is stored as CheckStateRole data.

+
See also:
setCheckable(), setData()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::setChild (int  row,
int  column,
WStandardItem item 
)
+
+
+ +

Sets a child item.

+

Sets a child item item at position (row, column). If an item was previously set, it is deleted first.

+

If necessary, the rowCount() and/or the columnCount() is increased.

+
See also:
child().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::setChild (int  row,
WStandardItem item 
)
+
+
+ +

Sets a child item.

+

This is a convenience method for nodes with a single column (e.g. tree nodes), and is equivalent to:

+
 setChild(row, 0, item);
+
See also:
setChild(int, int, WStandardItem *).
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setColumnCount (int  columns )
+
+
+ +

Sets the column count.

+

If columns is bigger than the current column count, empty columns are appended.

+

If columns is smaller than the current column count, columns are deleted at the end.

+
See also:
setRowCount(), columnCount()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::setData (const boost::any &  data,
int  role = UserRole 
) [virtual]
+
+
+ +

Sets item data.

+

Sets item data for the given role.

+
See also:
data()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setFlags (WFlags< ItemFlag flags )
+
+
+ +

Sets the flags.

+

The default flag value is ItemIsSelectable.

+
See also:
ItemFlag, flags(), setCheckable()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setIcon (const std::string &  uri )
+
+
+ +

Sets the icon url.

+

The icon is stored as DecorationRole data.

+

The default icon url is empty ("").

+
See also:
icon(), setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setInternalPath (const std::string &  internalpath )
+
+
+ +

Sets an anchor to an internal path.

+

The internal path is stored as InternalPathRole data.

+
See also:
internalPath(), setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setModel (WStandardItemModel model ) [protected, virtual]
+
+
+ +

Set the model for this WStandardItem and its children.

+

You may override this method if you want to change its behaviour.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setRowCount (int  rows )
+
+
+ +

Sets the row count.

+

If rows is bigger than the current row count, empty rows are appended.

+

If rows is smaller than the current row count, rows are deleted at the end.

+
Note:
If rows > 0, and columnCount() == 0, columnCount is first increased to 1 using setColumnCount(1).
+
See also:
setColumnCount(), rowCount()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setStyleClass (const WString styleClass )
+
+
+ +

Sets the CSS style class.

+

The style class is stored as StyleClassRole data.

+

The default style class is empty ("").

+
See also:
styleClass(), setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setText (const WString text )
+
+
+ +

Sets the text.

+

The text is stored as DisplayRole data.

+

The default text is empty ("").

+
See also:
text(), setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setToolTip (const WString toolTip )
+
+
+ +

Sets a tool tip.

+

The tool tip is stored as ToolTipRole data.

+

The default tool tip is empty ("").

+
See also:
toolTip(), setData()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setTristate (bool  tristate )
+
+
+ +

Makes the item tri-state checkable.

+

When tristate is true, the item is checkable with three states: Wt::Unchecked, Wt::Checked, and Wt::PartiallyChecked.

+

This requires that the item is also checkable (see setCheckable())

+
See also:
setCheckable()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItem::setUrl (const std::string &  url )
+
+
+ +

Sets an anchor to an external URL.

+

The anchor Url is stored as UrlRole data.

+
See also:
setInternalPath(), setData()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItem::sortChildren (int  column,
SortOrder  order 
) [virtual]
+
+
+ +

Sorts the children according to a given column and sort order.

+

Children of this item, and all children items are sorted recursively. Existing model indexes will be invalidated by the operation (will point to other items).

+

The WStandardItemModel::layoutAboutToBeChanged and WStandardItemModel::layoutChanged signals are emitted before and after the operation so that you get a chance to invalidate or update model indexes.

+
See also:
operator<(), WStandardItemModel::setSortRole()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WStandardItem::styleClass ( ) const
+
+
+ +

Returns the item style class.

+
See also:
setStyleClass()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WStandardItem * Wt::WStandardItem::takeChild (int  row,
int  column 
)
+
+
+ +

Takes a child out of the item.

+

Returns the child item at position (row, column), and removes it (by setting 0 instead). Ownership of the item is transferred to the caller.

+
See also:
child(), setChild(int, int, WStandardItem *)
+ +
+
+ +
+
+ + + + + + + + +
std::vector< WStandardItem * > Wt::WStandardItem::takeColumn (int  column )
+
+
+ +

Takes a column of children out of the item.

+

Returns the column column, and removes the column from the model (reducing the column count by one). Ownership of all items is transferred to the caller.

+
See also:
takeRow(), removeColumn()
+ +
+
+ +
+
+ + + + + + + + +
std::vector< WStandardItem * > Wt::WStandardItem::takeRow (int  row )
+
+
+ +

Takes a row of children out of the item.

+

Returns the row row, and removes the row from the model (reducing the row count by one). Ownership of all items is transferred to the caller.

+
See also:
takeColumn(), removeRow()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WStandardItem::text ( ) const
+
+
+ +

Returns the text.

+
See also:
setText()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WStandardItem::toolTip ( ) const
+
+
+ +

Returns the tool tip.

+
See also:
setToolTip()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WStandardItem::url ( ) const
+
+
+ +

Returns the url referenced by this item.

+
See also:
setUrl(), setData()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel-members.html new file mode 100644 index 0000000..d05f427 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel-members.html @@ -0,0 +1,178 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WStandardItemModel Member List

+
+
+This is the complete list of members for Wt::WStandardItemModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
appendColumn(const std::vector< WStandardItem * > &items)Wt::WStandardItemModel
appendRow(const std::vector< WStandardItem * > &items)Wt::WStandardItemModel
appendRow(WStandardItem *item)Wt::WStandardItemModel
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
clear()Wt::WStandardItemModel
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const =0Wt::WAbstractItemModel [pure virtual]
data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
indexFromItem(const WStandardItem *item) const Wt::WStandardItemModel
insertColumn(int column, const std::vector< WStandardItem * > &items)Wt::WStandardItemModel
Wt::WAbstractItemModel::insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const std::vector< WStandardItem * > &items)Wt::WStandardItemModel
insertRow(int row, WStandardItem *item)Wt::WStandardItemModel
Wt::WAbstractItemModel::insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
invisibleRootItem() const Wt::WStandardItemModel
item(int row, int column=0) const Wt::WStandardItemModel
itemChanged()Wt::WStandardItemModel
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
itemFromIndex(const WModelIndex &index) const Wt::WStandardItemModel
itemPrototype() const Wt::WStandardItemModel
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const =0Wt::WAbstractItemModel [pure virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const =0Wt::WAbstractItemModel [pure virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItem(int row, int column, WStandardItem *item)Wt::WStandardItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setItemPrototype(WStandardItem *item)Wt::WStandardItemModel
setObjectName(const std::string &name)Wt::WObject
setSortRole(int role)Wt::WStandardItemModel
sort(int column, SortOrder order=AscendingOrder)Wt::WStandardItemModel [virtual]
sortRole() const Wt::WStandardItemModel
takeColumn(int column)Wt::WStandardItemModel
takeItem(int row, int column=0)Wt::WStandardItemModel
takeRow(int row)Wt::WStandardItemModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WObject(WObject *parent=0)Wt::WObject
WStandardItemModel(WObject *parent=0)Wt::WStandardItemModel
WStandardItemModel(int rows, int columns, WObject *parent=0)Wt::WStandardItemModel
~WObject()Wt::WObject [virtual]
~WStandardItemModel()Wt::WStandardItemModel
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel.html new file mode 100644 index 0000000..90e23bc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel.html @@ -0,0 +1,768 @@ + + + + +Wt: Wt::WStandardItemModel Class Reference + + + + + + + + + +
+ +
+

Wt::WStandardItemModel Class Reference
+ +[Model/view system] +

+
+
+ +

A standard data model, which stores its data in memory. +More...

+ +

#include <Wt/WStandardItemModel>

+
+Inheritance diagram for Wt::WStandardItemModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WStandardItemModel (WObject *parent=0)
 Creates a new standard item model.
 WStandardItemModel (int rows, int columns, WObject *parent=0)
 Creates a new standard item model with an initial geometry.
~WStandardItemModel ()
 Destructor.
void clear ()
 Erases all data in the model.
WStandardIteminvisibleRootItem () const
 Returns the invisible root item.
WModelIndex indexFromItem (const WStandardItem *item) const
 Returns the model index for a particular item.
WStandardItemitemFromIndex (const WModelIndex &index) const
 Returns the standard item that corresponds to a model index.
void appendColumn (const std::vector< WStandardItem * > &items)
 Adds a single column of top level items.
void insertColumn (int column, const std::vector< WStandardItem * > &items)
 Inserts a single column of top level items.
void appendRow (const std::vector< WStandardItem * > &items)
 Adds a single row of top level items.
void insertRow (int row, const std::vector< WStandardItem * > &items)
 Inserts a single row of top level items.
void appendRow (WStandardItem *item)
 Appends a single row containing a single item.
void insertRow (int row, WStandardItem *item)
 Inserts a single row containing a single item.
WStandardItemitem (int row, int column=0) const
 Returns a toplevel item.
void setItem (int row, int column, WStandardItem *item)
 Sets a toplevel item.
WStandardItemitemPrototype () const
 Returns the item prototype.
void setItemPrototype (WStandardItem *item)
 Returns the item prototype.
std::vector< WStandardItem * > takeColumn (int column)
 Takes a column out of the model.
std::vector< WStandardItem * > takeRow (int row)
 Takes a row out of the model.
WStandardItemtakeItem (int row, int column=0)
 Takes an item out of the model.
void setSortRole (int role)
 Set the role used to sort the model.
int sortRole () const
 Returns the role used to sort the model.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
Signal< WStandardItem * > & itemChanged ()
 Signal emitted when an item is changed.
+

Detailed Description

+

A standard data model, which stores its data in memory.

+

The standard item model supports all features of WAbstractItemModel, and can thus be used to represent tables, trees and tree tables.

+

The data itself are organized in WStandardItem objects. There is one invisible root object (invisibleRootItem()) that holds the toplevel data. Most methods in this class that access or manipulate data internally operate on this root item.

+

If you want to use the model as a table, then you can use WStandardItemModel(int, int, WObject *) to set the initial table size, and use the item() and setItem() methods to set data. You can change the geometry by inserting rows (insertRow()) or columns (insertColumn()) or removing rows (removeRow()) or columns (removeColumn()).

+

If you want to use the model as a tree (or tree table), then you can use the default constructor to start with an empty tree, and use the WStandardItem API on invisibleRootItem() to manipulate the tree root. When you are building a tree, the column count at each node is 1. When you are building a tree table, you can add additional columns of data for each internal node. Only the items in the first column have children that result in a hierarchical tree structure.

+

When using the model with a view class, you can use the itemFromIndex() and indexFromItem() models to translate between model indexes (that are used by the view class) and standard items.

+

Usage example for tabular data:

+
 int rows = 5;
+ int columns = 4;
+
+ Wt::WStandardItemModel *model = new Wt::WStandardItemModel(rows, columns, this);
+
+ for (int row = 0; row < rows; ++row) {
+   for (int column = 0; column < columns; ++column) {
+     Wt::WStandardItem *item = new Wt::WStandardItem();
+     item->setText("Item " + boost::lexical_cast<std::string>(row)
+                   + ", " + boost::lexical_cast<std::string>(column));
+     model->setItem(row, column, item);
+   }
+ }
+

Usage example for tree-like data:

+
 int topLevelRows = 5;
+ int secondLevelRows = 7;
+
+ Wt::WStandardItemModel *model = new Wt::WStandardItemModel();
+ Wt::WStandardItem *root = model->invisibleRootItem();
+
+ for (int row = 0; row < topLevelRows; ++row) {
+   Wt::WStandardItem *topLevel = new Wt::WStandardItem();
+   topLevel->setText("Item " + boost::lexical_cast<std::string>(row));
+   for (int row2 = 0; row2 < secondLevelRows; ++row2) {
+     Wt::WStandardItem *item = new Wt::WStandardItem();
+     item->setText("Item " + boost::lexical_cast<std::string>(row)
+                   + ": " + boost::lexical_cast<std::string>(row2));
+     topLevel->appendRow(item);
+   }
+   root->appendRow(topLevel);
+ }
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WStandardItemModel::WStandardItemModel (int  rows,
int  columns,
WObject parent = 0 
)
+
+
+ +

Creates a new standard item model with an initial geometry.

+

Creates a standard item model with a geometry of rows x columns. All items are set to 0.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WStandardItemModel::appendColumn (const std::vector< WStandardItem * > &  items )
+
+
+ +

Adds a single column of top level items.

+

Appends a single column of top level items. If necessary, the row count is increased.

+

Equivalent to:

+
See also:
insertColumn(), appendRow()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItemModel::appendRow (WStandardItem item )
+
+
+ +

Appends a single row containing a single item.

+

Appends a single toplevel row, with a single item.

+

Equivalent to:

+
 insertRow(rowCount(), item);
+
See also:
WStandardItem::insertRow(int, WStandardItem *)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItemModel::appendRow (const std::vector< WStandardItem * > &  items )
+
+
+ +

Adds a single row of top level items.

+

Appends a single row of top level items. If necessary, the column count is increased.

+

Equivalent to:

+
 insertRow(rowCount(), items);
+
See also:
insertRow(), appendColumn()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WStandardItemModel::clear ( )
+
+
+ +

Erases all data in the model.

+

After clearing the model, rowCount() and columnCount() are 0.

+ +
+
+ +
+
+ + + + + + + + +
WModelIndex Wt::WStandardItemModel::indexFromItem (const WStandardItem item ) const
+
+
+ +

Returns the model index for a particular item.

+

If the item is the invisibleRootItem(), then an invalid index is returned.

+
See also:
itemFromIndex()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItemModel::insertColumn (int  column,
const std::vector< WStandardItem * > &  items 
)
+
+
+ +

Inserts a single column of top level items.

+

Inserts a single column of top level items at column column. If necessary, the row count is increased.

+

Equivalent to:

+
 invisibleRootItem()->insertColumn(column, items);
+
See also:
WStandardItem::insertColumn()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItemModel::insertRow (int  row,
const std::vector< WStandardItem * > &  items 
)
+
+
+ +

Inserts a single row of top level items.

+

Inserts a single row of top level items at row row. If necessary, the column count is increased.

+

Equivalent to:

+
 invisibleRootItem()->insertRow(row, items);
+
See also:
WStandardItem::insertRow()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStandardItemModel::insertRow (int  row,
WStandardItem item 
)
+
+
+ +

Inserts a single row containing a single item.

+

Inserts a single toplevel row, with a single item.

+

Equivalent to:

+
 invisibleRootItem()->insertRow(row, item);
+
See also:
WStandardItem::insertRow(int, WStandardItem *)
+ +
+
+ +
+
+ + + + + + + +
WStandardItem* Wt::WStandardItemModel::invisibleRootItem ( ) const
+
+
+ +

Returns the invisible root item.

+

The invisible root item is a special item that is not rendered itself, but holds the top level data.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WStandardItem* Wt::WStandardItemModel::item (int  row,
int  column = 0 
) const
+
+
+ +

Returns a toplevel item.

+

Returns the top level at at (row, column). This may be 0 if no item was set previously at that position, or if the indicated position is out of bounds.

+

Equivalent to:

+
 invisibleRootItem()->child(row, column);
+
See also:
WStandardItem::child()
+ +
+
+ +
+
+ + + + + + + +
Signal<WStandardItem *>& Wt::WStandardItemModel::itemChanged ( )
+
+
+ +

Signal emitted when an item is changed.

+

This signal is emitted whenever date of an item has changed. The item that has changed is passed as the first parameter.

+
See also:
WStandardItem::setData()
+ +
+
+ +
+
+ + + + + + + + +
WStandardItem* Wt::WStandardItemModel::itemFromIndex (const WModelIndex index ) const
+
+
+ +

Returns the standard item that corresponds to a model index.

+

If the index is an invalid index, then the invisibleRootItem() is returned.

+
See also:
indexFromItem()
+ +
+
+ +
+
+ + + + + + + +
WStandardItem* Wt::WStandardItemModel::itemPrototype ( ) const
+
+
+ +

Returns the item prototype.

+
See also:
setItemPrototype()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WStandardItemModel::setItem (int  row,
int  column,
WStandardItem item 
)
+
+
+ +

Sets a toplevel item.

+

Sets the top level at at (row, column). If necessary, the number of rows or columns is increased.

+

If an item was previously set for that position, it is deleted first.

+

Equivalent to:

+
 invisibleRootItem()->setChild(row, column, item);
+
See also:
WStandardItem::setChild(int, int, WStandardItem *item)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItemModel::setItemPrototype (WStandardItem item )
+
+
+ +

Returns the item prototype.

+

Set the item that is cloned when an item needs to be created because the model is manipulated through its WAbstractItemModel API. For example, this may be needed when a view sets data at a position for which no item was previously set and thus created.

+

The new item is created based on this prototype by using WStandardItem::clone().

+

The default prototype is WStandardItem().

+
See also:
setItemPrototype()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStandardItemModel::setSortRole (int  role )
+
+
+ +

Set the role used to sort the model.

+

The default role is DisplayRole.

+
See also:
sort().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WStandardItemModel::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WStandardItemModel::sortRole ( ) const
+
+
+ +

Returns the role used to sort the model.

+
See also:
setSortRole()
+ +
+
+ +
+
+ + + + + + + + +
std::vector<WStandardItem *> Wt::WStandardItemModel::takeColumn (int  column )
+
+
+ +

Takes a column out of the model.

+

Removes a column from the model, and returns the items that it contained. Ownership of the items is transferred out of the model.

+

Equivalent to:

+
 invisibleRootItem()->takeColumn(column);
+
See also:
WStandardItem::takeColumn(), WStandardItem::takeRow()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WStandardItem* Wt::WStandardItemModel::takeItem (int  row,
int  column = 0 
)
+
+
+ +

Takes an item out of the model.

+

Removes an item from the model, and returns it. Ownership of the item is transferred out of the model.

+

Equivalent to:

+
 invisibleRootItem()->takeItem(row, column);
+
See also:
takeItem(), WStandardItem::takeRow(), WStandardItem::takeColumn()
+ +
+
+ +
+
+ + + + + + + + +
std::vector<WStandardItem *> Wt::WStandardItemModel::takeRow (int  row )
+
+
+ +

Takes a row out of the model.

+

Removes a row from the model, and returns the items that it contained. Ownership of the items is transferred out of the model.

+

Equivalent to:

+
 invisibleRootItem()->takeRow(row);
+
See also:
WStandardItem::takeRow(), takeColumn()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.map new file mode 100644 index 0000000..e0030fb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.md5 new file mode 100644 index 0000000..93d24d8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.md5 @@ -0,0 +1 @@ +bd6737c0b8a2a3ce8cffeb569ee3e876 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.png new file mode 100644 index 0000000..ebada48 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WStandardItemModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView-members.html new file mode 100644 index 0000000..3ad9520 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView-members.html @@ -0,0 +1,185 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WStaticModelView< Renderer > Member List

+
+
+This is the complete list of members for Wt::WStaticModelView< Renderer >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WViewWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
makeStaticModel(Renderer f, WContainerWidget *parent=0)Wt::WStaticModelView< Renderer > [related]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WViewWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
renderView()Wt::WStaticModelView< Renderer > [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
update()Wt::WViewWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WStaticModelView(Renderer f, WContainerWidget *parent=0)Wt::WStaticModelView< Renderer >
WViewWidget(WContainerWidget *parent=0)Wt::WViewWidget
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView.html new file mode 100644 index 0000000..0010a08 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView.html @@ -0,0 +1,183 @@ + + + + +Wt: Wt::WStaticModelView< Renderer > Class Template Reference + + + + + + + + + +
+ +
+

Wt::WStaticModelView< Renderer > Class Template Reference

+
+
+ +

A widget that implements a view for a non-changing model. +More...

+ +

#include <Wt/WViewWidget>

+
+Inheritance diagram for Wt::WStaticModelView< Renderer >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

WStaticModelView (Renderer f, WContainerWidget *parent=0)
 Creates a new static model view, given a function object to render the View widget.

+Protected Member Functions

WWidgetrenderView ()
 Creates a widget that renders the View.

+Related Functions

(Note that these are not member functions.)

+
template<typename Renderer >
WStaticModelView< Renderer > * makeStaticModel (Renderer f, WContainerWidget *parent=0)
 Wraps a widget into a view with a non-changing model.
+

Detailed Description

+

template<typename Renderer>
+ class Wt::WStaticModelView< Renderer >

+ +

A widget that implements a view for a non-changing model.

+

This model uses a function object which is passed in the constructor to render the View, and does not react to changes.

+

You may want to use the utility function Wt::makeStaticModel() to create an instance of this class.

+

Member Function Documentation

+ +
+
+
+template<typename Renderer >
+ + + + + + + +
WWidget* Wt::WStaticModelView< Renderer >::renderView ( ) [protected, virtual]
+
+
+ +

Creates a widget that renders the View.

+

This method must be reimplemented to return a widget that renders the view. The returned widget will be deleted by WViewWidget.

+ +

Implements Wt::WViewWidget.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<typename Renderer >
+ + + + + + + + + + + + + + + + + + +
WStaticModelView< Renderer > * makeStaticModel (Renderer  f,
WContainerWidget parent = 0 
) [related]
+
+
+ +

Wraps a widget into a view with a non-changing model.

+

The ViewRenderer is called without arguments and must return a newly created widget (WWidget *).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.map new file mode 100644 index 0000000..ea3483c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.md5 new file mode 100644 index 0000000..7971857 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.md5 @@ -0,0 +1 @@ +4b5eb5be0a7ce14b81264963dae3b7be \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.png new file mode 100644 index 0000000..d969b69 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WStaticModelView__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WString-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WString-members.html new file mode 100644 index 0000000..1b54bf2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WString-members.html @@ -0,0 +1,144 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WString Member List

+
+
+This is the complete list of members for Wt::WString, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
arg(const std::wstring &value)Wt::WString
arg(const std::string &value, CharEncoding=LocalEncoding)Wt::WString
arg(const WString &value)Wt::WString
arg(int value)Wt::WString
arg(double value)Wt::WString
args() const Wt::WString
CharEncoding enum nameWt::WString [related]
EmptyWt::WString [static]
empty() const Wt::WString
fromUTF8(const std::string &value, bool checkValid=false)Wt::WString [static]
fromUTF8(const char *value, bool checkValid=false)Wt::WString [static]
fromUTF8(const std::string &s)Wt::WString [related]
fromUTF8(const std::string &s, const std::locale &loc)Wt::WString [related]
jsStringLiteral(char delimiter= '\'') const Wt::WString
key() const Wt::WString
literal() const Wt::WString
narrow(const std::locale &loc=std::locale()) const Wt::WString
narrow(const std::wstring &s, const std::locale &loc=std::locale())Wt::WString [related]
operator std::wstring() const Wt::WString
operator!=(const WString &rhs) const Wt::WString
operator!=(const char *lhs, const WString &rhs)Wt::WString [related]
operator!=(const wchar_t *lhs, const WString &rhs)Wt::WString [related]
operator!=(const std::string &lhs, const WString &rhs)Wt::WString [related]
operator!=(const std::wstring &lhs, const WString &rhs)Wt::WString [related]
operator+(const WString &lhs, const WString &rhs)Wt::WString [related]
operator+(const WString &lhs, const std::wstring &rhs)Wt::WString [related]
operator+(const WString &lhs, const wchar_t *rhs)Wt::WString [related]
operator+(const WString &lhs, const std::string &rhs)Wt::WString [related]
operator+(const WString &lhs, const char *rhs)Wt::WString [related]
operator+(const std::wstring &lhs, const WString &rhs)Wt::WString [related]
operator+(const wchar_t *lhs, const WString &rhs)Wt::WString [related]
operator+(const std::string &lhs, const WString &rhs)Wt::WString [related]
operator+(const char *lhs, const WString &rhs)Wt::WString [related]
operator+=(const WString &rhs)Wt::WString
operator+=(const std::wstring &rhs)Wt::WString
operator+=(const wchar_t *rhs)Wt::WString
operator+=(const std::string &rhs)Wt::WString
operator+=(const char *rhs)Wt::WString
operator<(const WString &rhs) const Wt::WString
operator<<(std::wostream &lhs, const WString &rhs)Wt::WString [related]
operator<<(std::ostream &lhs, const WString &rhs)Wt::WString [related]
operator=(const WString &rhs)Wt::WString
operator==(const WString &rhs) const Wt::WString
operator==(const char *lhs, const WString &rhs)Wt::WString [related]
operator==(const wchar_t *lhs, const WString &rhs)Wt::WString [related]
operator==(const std::string &lhs, const WString &rhs)Wt::WString [related]
operator==(const std::wstring &lhs, const WString &rhs)Wt::WString [related]
operator>(const WString &rhs) const Wt::WString
refresh()Wt::WString
toUTF8() const Wt::WString
toUTF8(const std::wstring &s)Wt::WString [related]
toUTF8(const std::string &s, const std::locale &loc=std::locale())Wt::WString [related]
tr(const char *key)Wt::WString [static]
tr(const std::string &key)Wt::WString [static]
value() const Wt::WString
widen(const std::string &s, const std::locale &loc=std::locale())Wt::WString [related]
WMessage typedefWt::WString [related]
WString()Wt::WString
WString(const wchar_t *value)Wt::WString
WString(const WString &other)Wt::WString
WString(const std::wstring &value)Wt::WString
WString(const char *value, CharEncoding encoding=LocalEncoding)Wt::WString
WString(const char *value, const std::locale &loc)Wt::WString
WString(const std::string &value, CharEncoding encoding=LocalEncoding)Wt::WString
WString(const std::string &value, const std::locale &loc)Wt::WString
~WString()Wt::WString
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WString.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WString.html new file mode 100644 index 0000000..235e6e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WString.html @@ -0,0 +1,1312 @@ + + + + +Wt: Wt::WString Class Reference + + + + + + + + + + +
+ +

A unicode string class, with support for localization. +More...

+ +

#include <Wt/WString>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WString ()
 Creates an empty string.
 WString (const wchar_t *value)
 Creates a WString from a wide C string.
WString (const WString &other)
 Copy constructor.
 WString (const std::wstring &value)
 Creates a WString from a wide C++ string.
 WString (const char *value, CharEncoding encoding=LocalEncoding)
 Creates a WString from a C string.
 WString (const char *value, const std::locale &loc)
 Creates a WString from a C string.
 WString (const std::string &value, CharEncoding encoding=LocalEncoding)
 Creates a WString from a C++ string.
 WString (const std::string &value, const std::locale &loc)
 Creates a WString from a C++ string.
~WString ()
 Destructor.
WStringoperator= (const WString &rhs)
 Assignment operator.
bool operator== (const WString &rhs) const
 Comparison operator.
bool operator< (const WString &rhs) const
 Comparison operator.
bool operator> (const WString &rhs) const
 Comparison operator.
WStringoperator+= (const WString &rhs)
 Self-concatenation operator.
WStringoperator+= (const std::wstring &rhs)
 Self-concatenation operator.
WStringoperator+= (const wchar_t *rhs)
 Self-concatenation operator.
WStringoperator+= (const std::string &rhs)
 Self-concatenation operator.
WStringoperator+= (const char *rhs)
 Self-concatenation operator.
+bool empty () const
 Returns whether the string is empty.
std::string toUTF8 () const
 Returns the value as a UTF8 unicode encoded string.
std::wstring value () const
 Returns the value as a wide C++ string.
std::string narrow (const std::locale &loc=std::locale()) const
 Returns the value as a narrow C++ string.
 operator std::wstring () const
 Returns the value as a wide C++ string.
bool literal () const
 Retuns whether the string is literal or localized.
const std::string key () const
 Returns the key for a localized string.
WStringarg (const std::wstring &value)
 Substitutes the next positional argument with a string value.
WStringarg (const std::string &value, CharEncoding=LocalEncoding)
 Substitutes the next positional argument with a string value.
WStringarg (const WString &value)
 Substitutes the next positional argument with a string value.
WStringarg (int value)
 Substitutes the next positional argument with an integer value.
WStringarg (double value)
 Substitutes the next positional argument with a double value.
const std::vector< std::string > & args () const
 Returns the list of arguments.
bool refresh ()
 Refreshes the string.
std::string jsStringLiteral (char delimiter= '\'') const
 Returns the string as a JavaScript literal.
bool operator!= (const WString &rhs) const
 Comparison operator.

+Static Public Member Functions

static WString fromUTF8 (const std::string &value, bool checkValid=false)
 Creates a WString from a UTF8 unicode encoded string.
static WString fromUTF8 (const char *value, bool checkValid=false)
 Creates a WString from a UTF8 unicode encoded string.
static WString tr (const char *key)
 Creates a localized string from a key.
static WString tr (const std::string &key)
 Creates a localized string with the specified key.

+Static Public Attributes

+static const WString Empty
 An emtpy string.

+Related Functions

(Note that these are not member functions.)

+
enum  CharEncoding { LocalEncoding, +UTF8 + }
 

Enumeration that indicates a character encoding.

+ More...
typedef WString WMessage
 Alias for WString (deprecated).
+WT_API WString operator+ (const WString &lhs, const WString &rhs)
 Concatenate two WStrings.
+WT_API WString operator+ (const WString &lhs, const std::wstring &rhs)
 Conatenate a WString with a C++ wide string.
+WT_API WString operator+ (const WString &lhs, const wchar_t *rhs)
 Conatenate a WString with a C wide string.
+WT_API WString operator+ (const WString &lhs, const std::string &rhs)
 Conatenate a WStrin with a C++ string.
+WT_API WString operator+ (const WString &lhs, const char *rhs)
 Conatenate a WString with a C string.
+WT_API WString operator+ (const std::wstring &lhs, const WString &rhs)
 Conatenate a C++ wide string with a WString.
+WT_API WString operator+ (const wchar_t *lhs, const WString &rhs)
 Conatenate a C wide string with a WString.
+WT_API WString operator+ (const std::string &lhs, const WString &rhs)
 Conatenate a C++ string with a WString.
+WT_API WString operator+ (const char *lhs, const WString &rhs)
 Conatenate a C string with a WString.
+WT_API bool operator== (const char *lhs, const WString &rhs)
 Compare a C string with a WString.
+WT_API bool operator== (const wchar_t *lhs, const WString &rhs)
 Compare a C wide string with a WString.
+WT_API bool operator== (const std::string &lhs, const WString &rhs)
 Compare a C++ string with a WString.
+WT_API bool operator== (const std::wstring &lhs, const WString &rhs)
 Compare a C++ wide string with a WString.
+WT_API bool operator!= (const char *lhs, const WString &rhs)
 Compare a C string with a WString.
+WT_API bool operator!= (const wchar_t *lhs, const WString &rhs)
 Compare a C wide string with a WString.
+WT_API bool operator!= (const std::string &lhs, const WString &rhs)
 Compare a C++ string with a WString.
+WT_API bool operator!= (const std::wstring &lhs, const WString &rhs)
 Compare a C++ wide string with a WString.
+WT_API std::wostream & operator<< (std::wostream &lhs, const WString &rhs)
 Output a WString to a C++ wide stream.
WT_API std::ostream & operator<< (std::ostream &lhs, const WString &rhs)
 Output a WString to a C++ stream.
WT_API std::wstring widen (const std::string &s, const std::locale &loc=std::locale())
 Convert a narrow to a wide string.
WT_API std::string narrow (const std::wstring &s, const std::locale &loc=std::locale())
 Convert a wide to a narrow string.
WT_API std::wstring fromUTF8 (const std::string &s)
 Decode a UTF8 string a wide string.
WT_API std::string fromUTF8 (const std::string &s, const std::locale &loc)
 Decode a UTF8 string into a (narrow) string.
WT_API std::string toUTF8 (const std::wstring &s)
 Encode a wide string to UTF8.
WT_API std::string toUTF8 (const std::string &s, const std::locale &loc=std::locale())
 Encode an character string (encoding known) to UTF8.
+

Detailed Description

+

A unicode string class, with support for localization.

+

Wt offers this string to facilitate handling of unicode text through the user interface, and to offer support for localized text using message resource bundles.

+

A WString may be constructed from a std::string, std::wstring or c-style strings (const char * and const wchar_t *), and converted to each of these strings taking into account the locale in which the Wt application runs on the web server. Independent of the locale on the web server, you may convert from and to UTF8 unicode encoded std::strings.

+

By using the static functions WString::tr() (or WWidget::tr()), one may construct a localized string. The key is used to retrieve its current value from the application's message-resource bundles.

+

Argument place holder in a string, denoted using {n} for the n'th argument, may be substituted by values set using arg(int) and arg(std::string).

+

WString is used by all built-in widgets for displayed text. By calling WApplication::setLocale() or WApplication::refresh(), the contents of every WString is reevaluated in the new locale, by calling refresh(). In this way, the contents of the whole user interface is adapted to a possibly changed locale.

+

To benefit from the localization properties of WString, you should design your own widget classes to use WString in their interface for any text that is displayed. In this way, your own widgets will automatically, and without any extra effort, participate in a relocalization triggered by WApplication::setLocale().

+

This string class does not provide anything more than basic manipulations. Instead, you should convert to a standard library string class to manipulate the string contents and perform string algorithms on them. In particular, we recommend to use the conversion methods toUTF8(), fromUTF8() to convert from and to UTF8 encoded std::strings. In this way, you can support the whole unicode character set, with backward compatible support for the standard 7-bit ASCII set. Since WString internally uses UTF8-encoding, and UTF8-encoding is used by the library for communication with the browser, there is no actual conversion overhead. Only when you need to run string algorithms that require the actual length of the string in number of characters, you would need to convert to a wide string representation such as std::wstring.

+
See also:
WApplication::messageResourceBundle()
+
+WApplication::locale()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WString::WString ( )
+
+
+ +

Creates an empty string.

+

Create a literal string with empty contents ("").

+ +
+
+ +
+
+ + + + + + + + +
Wt::WString::WString (const wchar_t *  value )
+
+
+ +

Creates a WString from a wide C string.

+

The wide string is implicitly converted to proper unicode. Note that there are known issues with the portability of wchar_t since its width and encoding are platform dependent.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WString::WString (const std::wstring &  value )
+
+
+ +

Creates a WString from a wide C++ string.

+

The wide string is implicitly converted to proper unicode. Note that there are known issues with the portability of wchar_t since its width and encoding are platform dependent.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WString::WString (const char *  value,
CharEncoding  encoding = LocalEncoding 
)
+
+
+ +

Creates a WString from a C string.

+

The C string is implicitly converted to unicode. When encoding is LocalEncoding, the current locale is used to interpret the C string. When encoding is UTF8, the C string is interpreted as a UTF8 encoded unicode string.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WString::WString (const char *  value,
const std::locale &  loc 
)
+
+
+ +

Creates a WString from a C string.

+

The C string is implicitly converted to unicode. The string is interpreted within the character set of the given locale.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WString::WString (const std::string &  value,
CharEncoding  encoding = LocalEncoding 
)
+
+
+ +

Creates a WString from a C++ string.

+

The C++ string is implicitly converted to unicode. When encoding is LocalEncoding, the current locale is used to interpret the C++ string. When encoding is UTF8, the C++ string is interpreted as a UTF8 encoded unicode string.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WString::WString (const std::string &  value,
const std::locale &  loc 
)
+
+
+ +

Creates a WString from a C++ string.

+

The C++ string is implicitly converted to unicode. The string is interpreted within the character set of the given locale.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WString & Wt::WString::arg (const std::wstring &  value )
+
+
+ +

Substitutes the next positional argument with a string value.

+

In the string, the n-th argument is referred to as using {n}.

+

For example: the string "<tt>{1} bought {2} apples in the + shop.</tt>" with first argument value "<tt>Bart</tt>" and second argument value 5 becomes: "<tt>Bart bought 5 apples in + the shop.</tt>"

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WString & Wt::WString::arg (const std::string &  value,
CharEncoding  encoding = LocalEncoding 
)
+
+
+ +

Substitutes the next positional argument with a string value.

+

In the string, the n-th argument is referred to as using {n}.

+

For example: the string "<tt>{1} bought {2} apples in the + shop.</tt>" with first argument value "<tt>Bart</tt>" and second argument value 5 becomes: "<tt>Bart bought 5 apples in + the shop.</tt>"

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::arg (const WString value )
+
+
+ +

Substitutes the next positional argument with a string value.

+

In the string, the n-th argument is referred to as using {n}.

+

For example: the string "<tt>{1} bought {2} apples in the + shop.</tt>" with first argument value "<tt>Bart</tt>" and second argument value 5 becomes: "<tt>Bart bought 5 apples in + the shop.</tt>"

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::arg (int  value )
+
+
+ +

Substitutes the next positional argument with an integer value.

+

In the string, the n-th argument is reffered to as using {n}.

+

For example: the string "<tt>{1} bought {2} apples in the + shop.</tt>" with first argument value "<tt>Bart</tt>" and second argument value 5 becomes: "<tt>Bart bought 5 apples in + the shop.</tt>"

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::arg (double  value )
+
+
+ +

Substitutes the next positional argument with a double value.

+

In the string, the n-th argument is reffered to as using {n}.

+

For example: the string "<tt>{1} bought {2} apples in the + shop.</tt>" with first argument value "<tt>Bart</tt>" and second argument value 5 becomes: "<tt>Bart bought 5 apples in + the shop.</tt>"

+ +
+
+ +
+
+ + + + + + + +
const std::vector< std::string > & Wt::WString::args ( ) const
+
+
+ +

Returns the list of arguments.

+

Each argument is UTF8 encoded.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WString Wt::WString::fromUTF8 (const std::string &  value,
bool  checkValid = false 
) [static]
+
+
+ +

Creates a WString from a UTF8 unicode encoded string.

+

This is equivalent to using the constructor WString(value, UTF8).

+

When checkValid is true, the UTF8 encoding is validated. You should enable this only if you cannot trust the origin of the string. The library uses this internally whenever it receives data from the browser (in UTF-8 format).

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WString Wt::WString::fromUTF8 (const char *  value,
bool  checkValid = false 
) [static]
+
+
+ +

Creates a WString from a UTF8 unicode encoded string.

+

This is equivalent to using the constructor WString(value, UTF8).

+

When checkValid is true, the UTF8 encoding is validated. You should enable this only if you cannot trust the origin of the string. The library uses this internally whenever it receives data from the browser (in UTF-8 format).

+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WString::jsStringLiteral (char  delimiter = '\'' ) const
+
+
+ +

Returns the string as a JavaScript literal.

+

The delimiter may be a single or double quote.

+
See also:
WWebWidget::jsStringLiteral()
+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WString::key ( ) const
+
+
+ +

Returns the key for a localized string.

+

When the string is literal, the result is undefined.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WString::literal ( ) const
+
+
+ +

Retuns whether the string is literal or localized.

+
See also:
tr()
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WString::narrow (const std::locale &  loc = std::locale() ) const
+
+
+ +

Returns the value as a narrow C++ string.

+

A localized string is resolved using the WApplication::localizedStrings().

+

Argument place holders are substitued with actual arguments.

+

Any wide character is narrowed using the provided locale, possibly losing information. If you wish to keep all information, use toUTF8() instead, which encodes wide characters in the string.

+
See also:
toUTF8()
+ +
+
+ +
+
+ + + + + + + +
Wt::WString::operator std::wstring ( ) const
+
+
+ +

Returns the value as a wide C++ string.

+

A localized string is resolved using the WApplication::localizedStrings().

+

Argument place holders are substitued with actual arguments.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WString::operator!= (const WString rhs ) const
+
+
+ +

Comparison operator.

+

Compares to strings and returns true if the strings are exactly the same. This may require evaluating a localized string in the current locale.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator+= (const char *  rhs )
+
+
+ +

Self-concatenation operator.

+

Appends a string to the current value. The right hand side is interpreted in the server locale and converted to unicode. If the string was localized, this automatically converts it to a literal string, by evaluating the string using the current locale.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator+= (const WString rhs )
+
+
+ +

Self-concatenation operator.

+

Appends a string to the current value. If the string was localized, this automatically converts it to a literal string, by evaluating the string using the current locale.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator+= (const std::string &  rhs )
+
+
+ +

Self-concatenation operator.

+

Appends a string to the current value. The right hand side is interpreted in the server locale and converted to unicode. If the string was localized, this automatically converts it to a literal string, by evaluating the string using the current locale.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator+= (const std::wstring &  rhs )
+
+
+ +

Self-concatenation operator.

+

Appends a string to the current value. If the string was localized, this automatically converts it to a literal string, by evaluating the string using the current locale.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator+= (const wchar_t *  rhs )
+
+
+ +

Self-concatenation operator.

+

Appends a string to the current value. If the string was localized, this automatically converts it to a literal string, by evaluating the string using the current locale.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WString::operator< (const WString rhs ) const
+
+
+ +

Comparison operator.

+

Compares to strings lexicographically. This may require evaluating a localized string in the current locale. The unicode representation of the strings are compared.

+ +
+
+ +
+
+ + + + + + + + +
WString & Wt::WString::operator= (const WString rhs )
+
+
+ +

Assignment operator.

+

Copy another string into this string.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WString::operator== (const WString rhs ) const
+
+
+ +

Comparison operator.

+

Compares to strings and returns true if the strings are exactly the same. This may require evaluating a localized string in the current locale.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WString::operator> (const WString rhs ) const
+
+
+ +

Comparison operator.

+

Compares to strings lexicographically. This may require evaluating a localized string in the current locale. The unicode representation of the strings are compared.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WString::refresh ( )
+
+
+ +

Refreshes the string.

+

For a localized string, its value is resolved again.

+

Returns whether the value has (potentially) changed.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WString::toUTF8 ( ) const
+
+
+ +

Returns the value as a UTF8 unicode encoded string.

+

For a localized string, returns the current localized value.

+
See also:
fromUTF8()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WString::tr (const char *  key ) [static]
+
+
+ +

Creates a localized string from a key.

+

Whenever the value of the string is needed, the key is used for a lookup in the application message resource bundles taking into account the current application locale. If the key cannot be resolved, its value is set to '??key??'.

+
See also:
WApplication::messageResourceBundle(), WApplication::locale(), WApplication::localizedStrings()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WString::tr (const std::string &  key ) [static]
+
+
+ +

Creates a localized string with the specified key.

+
See also:
tr(const char *)
+ +
+
+ +
+
+ + + + + + + +
std::wstring Wt::WString::value ( ) const
+
+
+ +

Returns the value as a wide C++ string.

+

A localized string is resolved using the WApplication::localizedStrings().

+

Argument place holders are substitued with actual arguments.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + +
enum CharEncoding [related]
+
+
+ +

Enumeration that indicates a character encoding.

+

Character encodings are used to represent characters in a stream of bytes.

+
Enumerator:
+ + +
LocalEncoding  +

The (server) system locale.

+

Each byte represents a character, according to the locale of the server-side system.

+
UTF8  +

UTF-8 unicode encoding.

+

The byte stream represents unicode characters encoded using UTF-8.

+
+
+
+ +
+
+ +
+
+ + + + + + + + +
WT_API std::wstring fromUTF8 (const std::string &  s ) [related]
+
+
+ +

Decode a UTF8 string a wide string.

+

Decode a UTF8 string to a wide string. In a UTF8 encoded unicode string, some unicode characters are represented in more than one byte. This method will decode to extract the proper unicode characters from the string. The resulting string may thus be shorter (has less characters) than the original, but does not lead to a loss of information.

+
See also:
toUTF8(const std::string& s), narrow(const std::wstring&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WT_API std::string fromUTF8 (const std::string &  s,
const std::locale &  loc 
) [related]
+
+
+ +

Decode a UTF8 string into a (narrow) string.

+

Decode a UTF8 string to a normal string. Not all Unicode characters can be represented in a narrow string, and quite a lot characters will have no equivalent in the target character set, so you may loose information.

+

To distinguish from the other fromUTF8() function, that returns a wstring, the locale is not an optional argument, as in most other locale-conversing functions. You may choose to use the default-constructed std::locale().

+
See also:
toUTF8(const std::string& s, const std::locale &), fromUTF8(const std::string& s)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WT_API std::string narrow (const std::wstring &  s,
const std::locale &  loc = std::locale() 
) [related]
+
+
+ +

Convert a wide to a narrow string.

+

Convert a wide string to a narrow string. This method will encode the characters in the given locale, if possible.

+

In general this will lead to a loss of information. If you wish to preserve all information, you should us toUTF8() instead.

+
See also:
widen(const std::string&), toUTF8(const std::wstring& s)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WT_API std::ostream & operator<< (std::ostream &  lhs,
const WString rhs 
) [related]
+
+
+ +

Output a WString to a C++ stream.

+

The string is narrowed using the currently global C++ locale, possibly losing information.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WT_API std::string toUTF8 (const std::string &  s,
const std::locale &  loc = std::locale() 
) [related]
+
+
+ +

Encode an character string (encoding known) to UTF8.

+

Convert a char * string to UTF8. This method will encode the given string in UTF8, assuming that the original string was encoded in the given locale. This conversion does not lead to a loss of information.

+

The reverse operation is in principle narrow(fromUTF8(str), locale).

+

Do not call this function multiple times: toUTF8(toUTF8(str)) is meaningless.

+
See also:
toUTF8(const std::wstring& s), fromUTF8(const std::string &), narrow(const std::wstring&)
+ +
+
+ +
+
+ + + + + + + + +
WT_API std::string toUTF8 (const std::wstring &  s ) [related]
+
+
+ +

Encode a wide string to UTF8.

+

Convert a wide string to UTF8. This method will encode the given wide string in UTF8. This may result in a string that is possibly longer (has more characters), but does not lead to a loss of information.

+
See also:
fromUTF8(const std::string& s), narrow(const std::wstring&)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WT_API std::wstring widen (const std::string &  s,
const std::locale &  loc = std::locale() 
) [related]
+
+
+ +

Convert a narrow to a wide string.

+

Convert a narrow string to a wide string. This method will interpret the input string as being encoded in the given locale (by default the currently configured global C++ locale).

+
See also:
narrow(const std::wstring&), fromUTF8(const std::string& s)
+ +
+
+ +
+
+ + + + +
typedef WString WMessage [related]
+
+
+ +

Alias for WString (deprecated).

+
Deprecated:
use WString instead.
+

WString provides all the functionality of the now deprecated WMessage, but is used more consistently through the API.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel-members.html new file mode 100644 index 0000000..12fa319 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel-members.html @@ -0,0 +1,164 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WStringListModel Member List

+
+
+This is the complete list of members for Wt::WStringListModel, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDropMimeTypes() const Wt::WAbstractItemModel [virtual]
addChild(WObject *child)Wt::WObject
addString(const WString &string)Wt::WStringListModel
beginInsertColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginInsertRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveColumns(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
beginRemoveRows(const WModelIndex &parent, int first, int last)Wt::WAbstractItemModel [protected]
children() const Wt::WObject
collapseColumn(int column)Wt::WAbstractItemModel [virtual]
columnCount(const WModelIndex &parent=WModelIndex()) const Wt::WAbstractListModel [virtual]
columnsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
columnsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
columnsInserted()Wt::WAbstractItemModel [virtual]
columnsRemoved()Wt::WAbstractItemModel [virtual]
createIndex(int row, int column, void *ptr) const Wt::WAbstractItemModel [protected]
createIndex(int row, int column,::uint64_t id) const Wt::WAbstractItemModel [protected]
data(const WModelIndex &index, int role=DisplayRole) const Wt::WStringListModel [virtual]
Wt::WAbstractListModel::data(int row, int column, int role=DisplayRole, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel
dataChanged()Wt::WAbstractItemModel [virtual]
DataMap typedefWt::WAbstractItemModel
dropEvent(const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent)Wt::WAbstractItemModel [virtual]
endInsertColumns()Wt::WAbstractItemModel [protected]
endInsertRows()Wt::WAbstractItemModel [protected]
endRemoveColumns()Wt::WAbstractItemModel [protected]
endRemoveRows()Wt::WAbstractItemModel [protected]
expandColumn(int column)Wt::WAbstractItemModel [virtual]
flags(const WModelIndex &index) const Wt::WStringListModel [virtual]
fromRawIndex(void *rawIndex) const Wt::WAbstractItemModel [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hasChildren(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
hasIndex(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractItemModel [virtual]
headerData(int section, Orientation orientation=Horizontal, int role=DisplayRole) const Wt::WAbstractItemModel [virtual]
headerDataChanged()Wt::WAbstractItemModel [virtual]
headerFlags(int section, Orientation orientation=Horizontal) const Wt::WAbstractItemModel [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
index(int row, int column, const WModelIndex &parent=WModelIndex()) const Wt::WAbstractListModel [virtual]
insertColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
insertRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
insertRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WStringListModel [virtual]
insertString(int row, const WString &string)Wt::WStringListModel
itemData(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
layoutAboutToBeChanged()Wt::WAbstractItemModel [virtual]
layoutChanged()Wt::WAbstractItemModel [virtual]
match(const WModelIndex &start, int role, const boost::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchStartsWith|MatchWrap)) const Wt::WAbstractItemModel [virtual]
Method typedefWt::WObject
mimeType() const Wt::WAbstractItemModel [virtual]
modelReset()Wt::WAbstractItemModel [virtual]
objectName() const Wt::WObject [virtual]
parent(const WModelIndex &index) const Wt::WAbstractListModel [virtual]
Wt::WObject::parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
removeColumn(int column, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeColumns(int column, int count, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel [virtual]
removeRow(int row, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
removeRows(int row, int count, const WModelIndex &parent=WModelIndex())Wt::WStringListModel [virtual]
reset()Wt::WAbstractItemModel [protected]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowCount(const WModelIndex &parent=WModelIndex()) const Wt::WStringListModel [virtual]
rowsAboutToBeInserted()Wt::WAbstractItemModel [virtual]
rowsAboutToBeRemoved()Wt::WAbstractItemModel [virtual]
rowsInserted()Wt::WAbstractItemModel [virtual]
rowsRemoved()Wt::WAbstractItemModel [virtual]
sender()Wt::WObject [protected, static]
setData(const WModelIndex &index, const boost::any &value, int role=EditRole)Wt::WStringListModel [virtual]
Wt::WAbstractListModel::setData(int row, int column, const boost::any &value, int role=EditRole, const WModelIndex &parent=WModelIndex())Wt::WAbstractItemModel
setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)Wt::WAbstractItemModel [virtual]
setHeaderData(int section, const boost::any &value)Wt::WAbstractItemModel
setItemData(const WModelIndex &index, const DataMap &values)Wt::WAbstractItemModel [virtual]
setObjectName(const std::string &name)Wt::WObject
setStringList(const std::vector< WString > &strings)Wt::WStringListModel
sort(int column, SortOrder order=AscendingOrder)Wt::WStringListModel [virtual]
stringList() const Wt::WStringListModel
toRawIndex(const WModelIndex &index) const Wt::WAbstractItemModel [virtual]
WAbstractItemModel(WObject *parent=0)Wt::WAbstractItemModel
WAbstractListModel(WObject *parent=0)Wt::WAbstractListModel
WObject(WObject *parent=0)Wt::WObject
WStringListModel(WObject *parent=0)Wt::WStringListModel
WStringListModel(const std::vector< WString > &strings, WObject *parent=0)Wt::WStringListModel
~WAbstractListModel()Wt::WAbstractListModel
~WObject()Wt::WObject [virtual]
~WStringListModel()Wt::WStringListModel
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel.html new file mode 100644 index 0000000..9ac264a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel.html @@ -0,0 +1,472 @@ + + + + +Wt: Wt::WStringListModel Class Reference + + + + + + + + + +
+ +
+

Wt::WStringListModel Class Reference
+ +[Model/view system] +

+
+
+ +

An model that manages a list of strings. +More...

+ +

#include <Wt/WStringListModel>

+
+Inheritance diagram for Wt::WStringListModel:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WStringListModel (WObject *parent=0)
 Creates a new empty string list model.
WStringListModel (const std::vector< WString > &strings, WObject *parent=0)
 Creates a new string list model.
~WStringListModel ()
 Destructor.
void setStringList (const std::vector< WString > &strings)
 Sets a new string list.
void insertString (int row, const WString &string)
 Inserts a string.
void addString (const WString &string)
 Adds a string.
const std::vector< WString > & stringList () const
 Returns the string list.
virtual WFlags< ItemFlagflags (const WModelIndex &index) const
 Returns the flags for an item.
virtual bool setData (const WModelIndex &index, const boost::any &value, int role=EditRole)
 Sets data at the given model index.
virtual boost::any data (const WModelIndex &index, int role=DisplayRole) const
 Returns data at a specific model index.
virtual int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
virtual bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more rows.
virtual bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes rows.
virtual void sort (int column, SortOrder order=AscendingOrder)
 Sorts the model according to a particular column.
+

Detailed Description

+

An model that manages a list of strings.

+

This model only manages a unidimensional list of strings. It is used as the default model for view classes that show a list.

+

The model only presents DisplayRole data of a single column of data, but otherwise provides support for all standard features of a model, including editing and addition and removal of data rows.

+

You can populate the model by passing a list of strings to its consructor, or by using the setStringList() method. You can set or retrieve data using the setData() and data() methods, and add or remove data using the insertRows() and removeRows() methods.

+
See also:
WComboBox, WSelectionBox, Ext::ComboBox
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WStringListModel::addString (const WString string )
+
+
+ +

Adds a string.

+
See also:
setStringList()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
boost::any Wt::WStringListModel::data (const WModelIndex index,
int  role = DisplayRole 
) const [virtual]
+
+
+ +

Returns data at a specific model index.

+

Return data for a given role at a given index.

+
See also:
flags(), headerData(), setData()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
WFlags< ItemFlag > Wt::WStringListModel::flags (const WModelIndex index ) const [virtual]
+
+
+ +

Returns the flags for an item.

+

This method is reimplemented to return ItemIsSelectable | ItemIsEditable.

+
See also:
Wt::ItemFlag
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WStringListModel::insertRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Inserts one or more rows.

+

In models that support row insertion, this inserts count rows, starting at row, and returns true if the operation was successful. The new rows are inserted under parent.

+

If parent had no children, then a single column is added with count rows.

+

The default implementation returns false.

+

The model implementation must call beginInsertRows() and endInsertRows() before and after the operation whenever its geometry is changed by inserting rows. This emits signals for views to properly react to these changes.

+
See also:
insertColumns(), removeRows(), beginInsertRows(), endInsertRows()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStringListModel::insertString (int  row,
const WString string 
)
+
+
+ +

Inserts a string.

+
See also:
setStringList()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WStringListModel::removeRows (int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]
+
+
+ +

Removes rows.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must call beginRemoveRows() and endRemoveRows() before and after the operation whenever its geometry is changed by removing rows. This emits signals for views to properly react to these changes.

+
See also:
removeColumns(), insertRows(), beginRemoveRows(), endRemoveRows()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WStringListModel::rowCount (const WModelIndex parent = WModelIndex() ) const [virtual]
+
+
+ +

Returns the number of rows.

+

This returns the number of rows at index parent.

+
See also:
columnCount()
+ +

Implements Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WStringListModel::setData (const WModelIndex index,
const boost::any &  value,
int  role = EditRole 
) [virtual]
+
+
+ +

Sets data at the given model index.

+

Returns true if the operation was successful.

+

The default implementation returns false.

+

The model implementation must emit the dataChanged() signal after data was changed.

+
See also:
data()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WStringListModel::setStringList (const std::vector< WString > &  strings )
+
+
+ +

Sets a new string list.

+

Replaces the current string list with a new list.

+
See also:
dataChanged()
+
+addString()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WStringListModel::sort (int  column,
SortOrder  order = AscendingOrder 
) [virtual]
+
+
+ +

Sorts the model according to a particular column.

+

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

+
See also:
layoutAboutToBeChanged(), layoutChanged()
+ +

Reimplemented from Wt::WAbstractItemModel.

+ +
+
+ +
+
+ + + + + + + +
const std::vector<WString>& Wt::WStringListModel::stringList ( ) const
+
+
+ +

Returns the string list.

+
See also:
setStringList()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.map new file mode 100644 index 0000000..e35307a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.md5 new file mode 100644 index 0000000..1c46aa6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.md5 @@ -0,0 +1 @@ +e9a3d078aaab917a0cf7df5d7a34a747 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.png new file mode 100644 index 0000000..50bf24f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WStringListModel__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem-members.html new file mode 100644 index 0000000..3332817 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem-members.html @@ -0,0 +1,130 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSubMenuItem Member List

+
+
+This is the complete list of members for Wt::WSubMenuItem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
activateSignal()Wt::WSubMenuItem [protected, virtual]
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
close()Wt::WMenuItem
closeSignal()Wt::WMenuItem [protected, virtual]
contents() const Wt::WMenuItem
createItemWidget()Wt::WSubMenuItem [protected, virtual]
disable()Wt::WMenuItem
enable()Wt::WMenuItem
enableAjax()Wt::WMenuItem [protected, virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
hide()Wt::WMenuItem
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isCloseable() const Wt::WMenuItem
isDisabled() const Wt::WMenuItem
isHidden() const Wt::WMenuItem
itemWidget()Wt::WMenuItem
LazyLoading enum valueWt::WMenuItem
LoadPolicy enum nameWt::WMenuItem
menu() const Wt::WMenuItem
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
pathComponent() const Wt::WSubMenuItem [virtual]
PreLoading enum valueWt::WMenuItem
removeChild(WObject *child)Wt::WObject
renderHidden(bool hidden)Wt::WMenuItem [protected, virtual]
renderSelected(bool selected)Wt::WSubMenuItem [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
select()Wt::WMenuItem
sender()Wt::WObject [protected, static]
setCloseable(bool closeable)Wt::WMenuItem
setDisabled(bool disabled)Wt::WMenuItem
setHidden(bool hidden)Wt::WMenuItem
setObjectName(const std::string &name)Wt::WObject
setPathComponent(const std::string &path)Wt::WMenuItem
setSubMenu(WMenu *subMenu)Wt::WSubMenuItem
setText(const WString &text)Wt::WMenuItem
setToolTip(const WString &tip)Wt::WMenuItem
show()Wt::WMenuItem
subMenu()Wt::WSubMenuItem
text() const Wt::WMenuItem
toolTip() const Wt::WMenuItem
updateItemWidget(WWidget *itemWidget)Wt::WSubMenuItem [protected, virtual]
WMenuItem(const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)Wt::WMenuItem
WObject(WObject *parent=0)Wt::WObject
WSubMenuItem(const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)Wt::WSubMenuItem
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem.html new file mode 100644 index 0000000..82b42bf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem.html @@ -0,0 +1,342 @@ + + + + +Wt: Wt::WSubMenuItem Class Reference + + + + + + + + + +
+ +
+

Wt::WSubMenuItem Class Reference

+
+
+ +

A menu item that contains a nested sub menu. +More...

+
+Inheritance diagram for Wt::WSubMenuItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WSubMenuItem (const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)
 Creates a new item.
void setSubMenu (WMenu *subMenu)
 Sets a sub menu.
WMenusubMenu ()
 Returns the sub menu.
virtual std::string pathComponent () const
 Returns the path component for this item.

+Protected Member Functions

virtual WWidgetcreateItemWidget ()
 Creates the widget that represents the item.
virtual void updateItemWidget (WWidget *itemWidget)
 Updates the widget that represents the item.
virtual void renderSelected (bool selected)
 Renders the item as selected or unselected.
virtual SignalBaseactivateSignal ()
 Returns the signal used to activate the item.
+

Detailed Description

+

A menu item that contains a nested sub menu.

+

This class specializes menu item to have an optional sub menu.

+

When the item is shown and hidden when the item is selected respectively deselected.

+

Usage example:

+
 // create the stack where the contents will be located
+ Wt::WStackedWidget *contents = new Wt::WStackedWidget();
+
+ // create a top-level menu
+ Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical);
+
+ // add two plain items
+ menu->addItem("Introduction", new Wt::WText(tr("intro"));
+ menu->addItem("Download", new Wt::WText("Not yet available"));
+
+ // add an item with a sub menu
+ Wt::WSubMenuItem *examples = new Wt::WSubMenuItem("Examples", new Wt::WText(tr("examples")));
+ Wt::WMenu *examplesMenu = new Wt::WMenu(contents, Wt::Vertical);
+ examplesMenu->addItem("Hello world", new Wt::WText(tr("example.hello-world")));
+ examplesMenu->addItem("Shopping cart", new Wt::WText(tr("example.shopping")));
+ examples->setSubMenu(examplesMenu);
+ menu->addItem(examples);
+
+ addWidget(menu);
+ addWidget(contents);
+
See also:
WMenuItem, WMenu
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WSubMenuItem::WSubMenuItem (const WString text,
WWidget contents,
LoadPolicy  policy = LazyLoading 
)
+
+ +
+

Member Function Documentation

+ +
+
+ + + + + + + +
SignalBase & Wt::WSubMenuItem::activateSignal ( ) [protected, virtual]
+
+
+ +

Returns the signal used to activate the item.

+

The default implementation will tries to cast the itemWidget() or its first child if item is closeable to a WInteractWidget and returns the clicked signal.

+ +

Reimplemented from Wt::WMenuItem.

+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WSubMenuItem::createItemWidget ( ) [protected, virtual]
+
+
+ +

Creates the widget that represents the item.

+

The default implementation will return:

+
    +
  • a WAnchor if item is not closeable and enabled;
  • +
  • a WText if item is not closeable and disabled;
  • +
  • a WContainerWidget with WAnchor or WText (the label of enabled or disabled item accordingly) and WText (the close icon) inside if item is closeable.
  • +
+

A call to createItemWidget() is immediately followed by updateItemWidget().

+

If you reimplement this method, you should probably also reimplement updateItemWidget().

+ +

Reimplemented from Wt::WMenuItem.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WSubMenuItem::pathComponent ( ) const [virtual]
+
+
+ +

Returns the path component for this item.

+

You may want to reimplement this to customize the path component set by the item in the application internal path.

+
See also:
setPathComponent()
+ +

Reimplemented from Wt::WMenuItem.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSubMenuItem::renderSelected (bool  selected ) [protected, virtual]
+
+
+ +

Renders the item as selected or unselected.

+

The default implementation sets the styleclass for itemWidget() to 'item' for an unselected not closeable, 'itemselected' for selected not closeable, 'citem' for an unselected closeable and 'citemselected' for selected closeable item.

+

Note that this method is called from within a stateless slot implementation, and thus should be stateless as well.

+ +

Reimplemented from Wt::WMenuItem.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSubMenuItem::setSubMenu (WMenu subMenu )
+
+
+ +

Sets a sub menu.

+

Ownership of the subMenu is transferred to the item. In most cases, the sub menu would use the same contents stack as the parent menu.

+

The default submenu is 0, in which case the item behaves as a plain WMenuItem.

+
Note:
A sub menu can only be set before the item is added to a menu.
+ +
+
+ +
+
+ + + + + + + +
WMenu* Wt::WSubMenuItem::subMenu ( )
+
+
+ +

Returns the sub menu.

+
See also:
setSubMenu()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSubMenuItem::updateItemWidget (WWidget itemWidget ) [protected, virtual]
+
+
+ +

Updates the widget that represents the item.

+

The default implementation will cast the itemWidget to a WAnchor, and set the anchor's text and destination according to text() and pathComponent().

+
See also:
createItemWidget()
+ +

Reimplemented from Wt::WMenuItem.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.map new file mode 100644 index 0000000..a1172dc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.md5 new file mode 100644 index 0000000..7c9284e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.md5 @@ -0,0 +1 @@ +da7846afaeafce36f04703da64205d66 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.png new file mode 100644 index 0000000..05e9274 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSubMenuItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup-members.html new file mode 100644 index 0000000..ef59af2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup-members.html @@ -0,0 +1,198 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSuggestionPopup Member List

+
+
+This is the complete list of members for Wt::WSuggestionPopup, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
activated()Wt::WSuggestionPopup
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
addSuggestion(const WString &suggestionText, const WString &suggestionValue)Wt::WSuggestionPopup
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
clearSuggestions()Wt::WSuggestionPopup
decorationStyle()Wt::WCompositeWidget [virtual]
defaultIndex() const Wt::WSuggestionPopup
disable()Wt::WWidget
DropDownIcon enum valueWt::WSuggestionPopup
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
Editing enum valueWt::WSuggestionPopup
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
filterLength() const Wt::WSuggestionPopup
filterModel()Wt::WSuggestionPopup
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
forEdit(WFormWidget *edit, WFlags< PopupTrigger > popupTriggers=Editing)Wt::WSuggestionPopup
generateMatcherJS(const Options &options)Wt::WSuggestionPopup [static]
generateReplacerJS(const Options &options)Wt::WSuggestionPopup [static]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
model() const Wt::WSuggestionPopup
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
PopupTrigger enum nameWt::WSuggestionPopup
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeEdit(WFormWidget *edit)Wt::WSuggestionPopup
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDefaultIndex(int row)Wt::WSuggestionPopup
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFilterLength(int count)Wt::WSuggestionPopup
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setGlobalPopup(bool global)Wt::WSuggestionPopup
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WSuggestionPopup [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WSuggestionPopup [virtual]
setModel(WAbstractItemModel *model)Wt::WSuggestionPopup
setModelColumn(int index)Wt::WSuggestionPopup
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WSuggestionPopup(const Options &options, WContainerWidget *parent=0)Wt::WSuggestionPopup
WSuggestionPopup(const std::string &matcherJS, const std::string &replacerJS, WContainerWidget *parent=0)Wt::WSuggestionPopup
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup.html new file mode 100644 index 0000000..231bb08 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup.html @@ -0,0 +1,751 @@ + + + + +Wt: Wt::WSuggestionPopup Class Reference + + + + + + + + + +
+ +
+

Wt::WSuggestionPopup Class Reference
+ +[Model/view system] +

+
+
+ +

A widget which popups to assist in editing a textarea or lineedit. +More...

+ +

#include <Wt/WSuggestionPopup>

+
+Inheritance diagram for Wt::WSuggestionPopup:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  Options
 A configuration object to generate a matcher and replacer JavaScript function. More...

+Public Types

enum  PopupTrigger { Editing = 0x1, +DropDownIcon = 0x2 + }
 

Enumeration that defines a trigger for showing the popup.

+ More...

+Public Member Functions

 WSuggestionPopup (const Options &options, WContainerWidget *parent=0)
 Creates a suggestion popup.
 WSuggestionPopup (const std::string &matcherJS, const std::string &replacerJS, WContainerWidget *parent=0)
 Creates a suggestion popup with given matcherJS and replacerJS.
void forEdit (WFormWidget *edit, WFlags< PopupTrigger > popupTriggers=Editing)
 Lets this suggestion popup assist in editing the given edit field.
void removeEdit (WFormWidget *edit)
 Removes the edit field from the list of assisted editors.
void clearSuggestions ()
 Clears the list of suggestions.
void addSuggestion (const WString &suggestionText, const WString &suggestionValue)
 Adds a new suggestion.
void setModel (WAbstractItemModel *model)
 Sets the model to be used for the suggestions.
WAbstractItemModelmodel () const
 Returns the data model.
void setModelColumn (int index)
 Sets the column in the model to be used for the items.
void setDefaultIndex (int row)
 Sets a default selected value.
int defaultIndex () const
 Returns the default value.
void setFilterLength (int count)
 Sets the minimum input length before showing the popup.
int filterLength () const
 Returns the filter length.
Signal< WString > & filterModel ()
 Signal that indicates that the model should be filtered.
Signal< int, WFormWidget * > & activated ()
 Signal emitted when a suggestion was selected.
void setGlobalPopup (bool global)
 Controls how the suggestion popup is positioned.
virtual void setMaximumSize (const WLength &width, const WLength &height)
 Sets a maximum size.
virtual void setMinimumSize (const WLength &width, const WLength &height)
 Sets a minimum size.

+Static Public Member Functions

static std::string generateMatcherJS (const Options &options)
 Creates a standard matcher JavaScript function.
static std::string generateReplacerJS (const Options &options)
 Creates a standard replacer JavaScript function.
+

Detailed Description

+

A widget which popups to assist in editing a textarea or lineedit.

+

This widget may be associated with one or more WFormWidgets (typically a WLineEdit or a WTextArea).

+

The popup provides the user with suggestions to enter input. The popup can be used by one or more editors, using forEdit(). The popup will show when the user starts editing the edit field, or when the user opens the suggestions explicitly using a drop down icon or with the down key. The popup positions itself intelligently just below or just on top of the edit field. It offers a list of suggestions that match in some way with the current edit field, and dynamically adjusts this list. The implementation for matching individual suggestions with the current text is provided through a JavaScript function. This function may also highlight part(s) of the suggestions to provide feed-back on how they match.

+

WSuggestionPopup is an MVC view class, using a simple WStringListModel by default. You can set a custom model using setModel(). The model can provide different text for the suggestion text (Wt::DisplayRole) and value (Wt::UserRole). The member methods clearSuggestions() and addSuggestion() manipulate this model.

+

By default, the popup implements all filtering client-side. To support large datasets, you may enable server-side filtering of suggestions based on the input. The server-side filtering may provide a coarse filtering using a fixed size prefix of the entered text, and complement the client-side filtering. To enable server-side filtering, use setFilterLength() and listen to filter notification using the modelFilter() signal. Whenever a filter event is generated you can adjust the model's content according to the filter (e.g. using a WSortFilterProxyModel). By using setMaximumSize() you can also limit the maximum height of the popup, in which case scrolling is supported (similar to a combo-box).

+

The class is initialized with an Options struct which configures how suggestion filtering and result editing is done. Alternatively, you can provide two JavaScript functions, one for filtering the suggestions, and one for editing the value of the textarea when a suggestion is selected.

+

The matcherJS function must have the following JavaScript signature:

+
 function (editElement) {
+   // fetch the location of cursor and current text in the editElement.
+
+   // return a function that matches a given suggestion with the current value of the editElement.
+   return function(suggestion) {
+
+     // 1) if suggestion is null, simply return the current text 'value'
+     // 2) check suggestion if it matches
+     // 3) add highlighting markup to suggestion if necessary
+
+     return { match : ...,      // does the suggestion match ? (boolean)
+              suggestion : ...  // modified suggestion with highlighting
+             };
+   }
+ }
+

The replacerJS function that edits the value has the following JavaScript signature.

+
 function (editElement, suggestionText, suggestionValue) {
+   // editElement is the form element which must be edited.
+   // suggestionText is the displayed text for the matched suggestion.
+   // suggestionValue is the stored value for the matched suggestion.
+
+   // computed modifiedEditValue and modifiedPos ...
+
+   editElement.value = modifiedEditValue;
+   editElement.selectionStart = edit.selectionEnd = modifiedPos;
+ }
+

To style the suggestions, you should style the <span> element inside this widget, and the <span>."sel" element to style the current selection.

+

Usage example:

+
 // options for email address suggestions
+ Wt::WSuggestionPopup::Options contactOptions
+ = { "<b>",         // highlightBeginTag
+     "</b>",        // highlightEndTag
+     ',',           // listSeparator      (for multiple addresses)
+     " \\n",        // whitespace
+     "-., \"@\\n;", // wordSeparators     (within an address)
+     ", "           // appendReplacedText (prepare next email address)
+    };
+
+ Wt::WSuggestionPopup *popup = new Wt::WSuggestionPopup(contactOptions, this);
+ Wt::WTextArea *textEdit = new Wt::WTextArea(this);
+ popup->forEdit(textEdit);
+
+ // load popup data
+ for (unsigned i = 0; i < contacts.size(); ++i)
+   popup->addSuggestion(contacts[i].formatted(), contacts[i].formatted());
+

A screenshot of this example:

+ + + +
+WSuggestionPopup-default-1.png +

An example WSuggestionPopup (default)

+
+WSuggestionPopup-polished-1.png +

An example WSuggestionPopup (polished)

+
+

CSS

+

The suggestion popup is styled by the current CSS theme. The look can be overridden using the Wt-suggest CSS class and the following selectors:

+
+.Wt-suggest .content div : A suggestion element
+.Wt-suggest .sel :         A selected suggestion element
+

When using the DropDownIcon trigger, an additional style class is provided for the edit field: Wt-suggest-dropdown, which renders the icon to the right inside the edit field. This class may be used to customize how the drop down icon is rendered.

+
Note:
This widget requires JavaScript support.
+

Member Enumeration Documentation

+ +
+ +
+ +

Enumeration that defines a trigger for showing the popup.

+
See also:
forEdit()
+
Enumerator:
+ + +
Editing  +

Shows popup when the user starts editing.

+

The popup is shown when the currently edited text has a length longer than the filter length.

+
DropDownIcon  +

Shows popup when user clicks a drop down icon.

+

The lineedit is modified to show a drop down icon, and clicking the icon shows the suggestions, very much like a WComboCox.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WSuggestionPopup::WSuggestionPopup (const Options options,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a suggestion popup.

+

The popup using a standard matcher and replacer implementation that is configured using the provided options.

+
See also:
generateMatcherJS(), generateReplacerJS()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WSuggestionPopup::WSuggestionPopup (const std::string &  matcherJS,
const std::string &  replacerJS,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a suggestion popup with given matcherJS and replacerJS.

+

See supra for the expected signature of the matcher and replace JavaScript functions.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<int, WFormWidget *>& Wt::WSuggestionPopup::activated ( )
+
+
+ +

Signal emitted when a suggestion was selected.

+

The selected item is passed as the first argument and the editor as the second.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSuggestionPopup::addSuggestion (const WString suggestionText,
const WString suggestionValue 
)
+
+
+ +

Adds a new suggestion.

+

This adds an entry to the underlying model. The suggestionText is set as Wt::DisplayRole and the suggestionValue (which is inserted into the edit field on selection) is set as Wt::UserRole.

+
See also:
clearSuggestions(), setModel()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WSuggestionPopup::clearSuggestions ( )
+
+
+ +

Clears the list of suggestions.

+

This clears the underlying model.

+
See also:
addSuggestion()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSuggestionPopup::defaultIndex ( ) const
+
+
+ +

Returns the default value.

+
See also:
setDefaultValue()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WSuggestionPopup::filterLength ( ) const
+
+
+ +

Returns the filter length.

+
See also:
setFilterLength()
+ +
+
+ +
+
+ + + + + + + +
Signal<WString>& Wt::WSuggestionPopup::filterModel ( )
+
+
+ +

Signal that indicates that the model should be filtered.

+

The argument is the initial input. When Editing is used as edit trigger, its length will always equal the filterLength(). When DropDownIcon is used as edit trigger, the input length may be less than filterLength(), and the the signal will be called repeatedly as the user provides more input.

+

For example, if you are using a WSortFilterProxyModel, you could react to this signal with:

+
 void MyClass::filterSuggestions(const WString& filter)
+ {
+   proxyModel->setFilterRegExp(filter + ".*");
+ }
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSuggestionPopup::forEdit (WFormWidget edit,
WFlags< PopupTrigger popupTriggers = Editing 
)
+
+
+ +

Lets this suggestion popup assist in editing the given edit field.

+

A single suggestion popup may assist in several edits by repeated calls of this method.

+

The popupTriggers control how editing is triggered (either by the user editing the field by entering keys or by an explicit drop down menu that is shown inside the edit).

+
See also:
removeEdit()
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WSuggestionPopup::generateMatcherJS (const Options options ) [static]
+
+
+ +

Creates a standard matcher JavaScript function.

+

This returns a JavaScript function that provides a standard implementation for the matching input, based on the given .

+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WSuggestionPopup::generateReplacerJS (const Options options ) [static]
+
+
+ +

Creates a standard replacer JavaScript function.

+

This returns a JavaScript function that provides a standard implementation for the matching input, based on the given .

+ +
+
+ +
+
+ + + + + + + +
WAbstractItemModel* Wt::WSuggestionPopup::model ( ) const
+
+
+ +

Returns the data model.

+
See also:
setModel()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::removeEdit (WFormWidget edit )
+
+
+ +

Removes the edit field from the list of assisted editors.

+

The editor will no longer be assisted by this popup widget.

+
See also:
forEdit().
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::setDefaultIndex (int  row )
+
+
+ +

Sets a default selected value.

+

row is the model row that is selected by default (only if it matches the current input).

+

The default value is -1, indicating no default.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::setFilterLength (int  count )
+
+
+ +

Sets the minimum input length before showing the popup.

+

When the user has typed this much characters, filterModel() is emitted which allows you to filter the model based on the initial input.

+

The default value is 0, which has the effect of always show the entire model.

+
See also:
filterModel()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::setGlobalPopup (bool  global )
+
+
+ +

Controls how the suggestion popup is positioned.

+

When global is true, then the popup will position itself globally. This avoids that the popup is affected by enclosing parents with overflow settings that clip the popup. This makes the popup however no longer follow the popup button when this button moves.

+

The default is false.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSuggestionPopup::setMaximumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a maximum size.

+

Specify a minimum size for this widget.

+
See also:
resize(), maximumWidth(), maximumHeight()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSuggestionPopup::setMinimumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a minimum size.

+

Specify a minimum size for this widget. When the widget is managed using a layout manager, these sizes are also taken into account.

+
See also:
resize(), minimumWidth(), minimumHeight()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::setModel (WAbstractItemModel model )
+
+
+ +

Sets the model to be used for the suggestions.

+

The model may not be 0, and ownership of the model is not transferred.

+

The default value is a WStringListModel that is owned by the suggestion popup.

+

The Wt::DisplayRole is used for the suggestion text. The Wt::UserRole is used for the suggestion value, unless empty, in which case the suggestion text is used as value.

+

Note that since the default WStringListModel does not support UserRole data, you will want to change it to a more general model (e.g. WStandardItemModel) if you want suggestion values that are different from display values.

+
See also:
setModelColumn(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSuggestionPopup::setModelColumn (int  index )
+
+
+ +

Sets the column in the model to be used for the items.

+

The column index in the model will be used to retrieve data.

+

The default value is 0.

+
See also:
setModel()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.md5 new file mode 100644 index 0000000..cdb2412 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.md5 @@ -0,0 +1 @@ +773312a0621e0761c436550639163bee \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.png new file mode 100644 index 0000000..92e4792 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSuggestionPopup__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage-members.html new file mode 100644 index 0000000..a648ba9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage-members.html @@ -0,0 +1,136 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSvgImage Member List

+
+
+This is the complete list of members for Wt::WSvgImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
beingDeleted()Wt::WResource [protected]
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
children() const Wt::WObject
clear()Wt::WSvgImage [protected, virtual]
Clipping enum valueWt::WPaintDevice
dataChanged()Wt::WResource
dataReceived()Wt::WResource
done()Wt::WSvgImage [virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)Wt::WSvgImage [virtual]
drawImage(const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)Wt::WSvgImage [virtual]
drawLine(double x1, double y1, double x2, double y2)Wt::WSvgImage [virtual]
drawPath(const WPainterPath &path)Wt::WSvgImage [virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)Wt::WSvgImage [virtual]
Font enum valueWt::WPaintDevice
generateUrl()Wt::WResource
getStateless(Method method)Wt::WObject [protected, virtual]
handleRequest(const Http::Request &request, Http::Response &response)Wt::WSvgImage [virtual]
height() const Wt::WSvgImage [virtual]
Hints enum valueWt::WPaintDevice
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
init()Wt::WSvgImage [virtual]
internalPath() const Wt::WResource
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
paintActive() const Wt::WSvgImage [virtual]
painter() const Wt::WSvgImage [protected, virtual]
parent() const Wt::WObject
Pen enum valueWt::WPaintDevice
removeChild(WObject *child)Wt::WObject
rendered()Wt::WSvgImage [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setChanged(WFlags< ChangeFlag > flags)Wt::WSvgImage [virtual]
Wt::WResource::setChanged()Wt::WResource
setInternalPath(const std::string &path)Wt::WResource
setObjectName(const std::string &name)Wt::WObject
setPainter(WPainter *painter)Wt::WSvgImage [protected, virtual]
setUploadProgress(bool enabled)Wt::WResource
Shadow enum valueWt::WPaintDevice
suggestedFileName() const Wt::WResource
suggestFileName(const std::string &name)Wt::WResource
Transform enum valueWt::WPaintDevice
url() const Wt::WResource
width() const Wt::WSvgImage [virtual]
WObject(WObject *parent=0)Wt::WObject
WResource(WObject *parent=0)Wt::WResource
write(std::ostream &out, const Http::ParameterMap &parameters=Http::ParameterMap(), const Http::UploadedFileMap &files=Http::UploadedFileMap())Wt::WResource
WSvgImage(const WLength &width, const WLength &height, WObject *parent=0)Wt::WSvgImage
~WObject()Wt::WObject [virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
~WResource()Wt::WResource
~WSvgImage()Wt::WSvgImage
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage.html new file mode 100644 index 0000000..8175e7c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage.html @@ -0,0 +1,542 @@ + + + + +Wt: Wt::WSvgImage Class Reference + + + + + + + + + +
+ +
+

Wt::WSvgImage Class Reference
+ +[Painting system] +

+
+
+ +

A paint device for rendering using Scalable Vector Graphics (SVG). +More...

+ +

#include <Wt/WSvgImage>

+
+Inheritance diagram for Wt::WSvgImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WSvgImage (const WLength &width, const WLength &height, WObject *parent=0)
 Create an SVG paint device.
~WSvgImage ()
 Destructor.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
virtual void drawPath (const WPainterPath &path)
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
virtual void init ()
 Initializes the device for painting.
virtual void done ()
 Finishes painting on the device.
virtual bool paintActive () const
 Returns whether painting is active.
+virtual std::string rendered ()
 Internal method.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.
virtual void handleRequest (const Http::Request &request, Http::Response &response)
 Handles a request.

+Protected Member Functions

virtual WPainterpainter () const
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)
 Sets the painter.
+virtual void clear ()
 Clears the paint device.
+

Detailed Description

+

A paint device for rendering using Scalable Vector Graphics (SVG).

+

The WSvgImage is primarily used by WPaintedWidget to render to the browser in Support Vector Graphics (SVG) format.

+

You may also use the WSvgImage as an independent resource, for example in conjunction with a WAnchor or WImage, or to make a hard copy of an image in SVG format, using write():

+
 Wt::Chart::WCartesianChart *chart = ...
+
+ Wt::WSvgImage svgImage(800, 400);
+ Wt::WPainter p(&svgImage);
+ chart->paint(p);
+ p.end();
+ std::ofstream f("chart.svg");
+ svgImage.write(f);
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WSvgImage::done ( ) [virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WSvgImage::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WSvgImage::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WSvgImage::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSvgImage::drawPath (const WPainterPath path ) [virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WSvgImage::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WSvgImage::handleRequest (const Http::Request request,
Http::Response response 
) [virtual]
+
+
+ +

Handles a request.

+

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

+

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

+

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.

+ +

Implements Wt::WResource.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WSvgImage::height ( ) const [virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WSvgImage::init ( ) [virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WSvgImage::paintActive ( ) const [virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WSvgImage::painter ( ) const [protected, virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WSvgImage::setChanged (WFlags< ChangeFlag flags ) [virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WSvgImage::width ( ) const [virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.map new file mode 100644 index 0000000..a44624e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.md5 new file mode 100644 index 0000000..013c7e6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.md5 @@ -0,0 +1 @@ +cb52a1789f150bb9bd3ae6568ea1c284 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.png new file mode 100644 index 0000000..62356fe Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WSvgImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget-members.html new file mode 100644 index 0000000..44be477 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget-members.html @@ -0,0 +1,208 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTabWidget Member List

+
+
+This is the complete list of members for Wt::WTabWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
addTab(WWidget *child, const WString &label, LoadPolicy=LazyLoading)Wt::WTabWidget
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
closeTab(int index)Wt::WTabWidget
count() const Wt::WTabWidget
currentChanged()Wt::WTabWidget
currentIndex() const Wt::WTabWidget
currentWidget() const Wt::WTabWidget
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WTabWidget
internalBasePath() const Wt::WTabWidget
internalPathEnabled() const Wt::WTabWidget
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isTabCloseable(int index)Wt::WTabWidget
isTabEnabled(int index) const Wt::WTabWidget
isTabHidden(int index) const Wt::WTabWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LazyLoading enum valueWt::WTabWidget
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
LoadPolicy enum nameWt::WTabWidget
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
PreLoading enum valueWt::WTabWidget
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
removeTab(WWidget *widget)Wt::WTabWidget
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setCurrentIndex(int index)Wt::WTabWidget
setCurrentWidget(WWidget *widget)Wt::WTabWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setInternalBasePath(const std::string &path)Wt::WTabWidget
setInternalPathEnabled(const std::string &basePath="")Wt::WTabWidget
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabCloseable(int index, bool closeable)Wt::WTabWidget
setTabEnabled(int index, bool enable)Wt::WTabWidget
setTabHidden(int index, bool hidden)Wt::WTabWidget
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setTabText(int index, const WString &label)Wt::WTabWidget
setTabToolTip(int index, const WString &tip)Wt::WTabWidget
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabClosed()Wt::WTabWidget
tabIndex() const Wt::WCompositeWidget [virtual]
tabText(int index) const Wt::WTabWidget
tabToolTip(int index) const Wt::WTabWidget
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
widget(int index) const Wt::WTabWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTabWidget(WContainerWidget *parent=0)Wt::WTabWidget
WTabWidget(WFlags< AlignmentFlag > layoutAlignment, WContainerWidget *parent=0)Wt::WTabWidget
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget.html new file mode 100644 index 0000000..c2734be --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget.html @@ -0,0 +1,579 @@ + + + + +Wt: Wt::WTabWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WTabWidget Class Reference

+
+
+ +

A widget that organizes contents in tab panes. +More...

+ +

#include <Wt/WTabWidget>

+
+Inheritance diagram for Wt::WTabWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  LoadPolicy { LazyLoading, +PreLoading + }
 

When should the contents be loaded ?

+ More...

+Public Member Functions

WTabWidget (WContainerWidget *parent=0)
 Creates a new tab widget.
 WTabWidget (WFlags< AlignmentFlag > layoutAlignment, WContainerWidget *parent=0)
 Creates a new tab widget (indicating layout alignment) (deprecated).
WMenuItemaddTab (WWidget *child, const WString &label, LoadPolicy=LazyLoading)
 Adds a new tab, with child as content, and the given label.
void removeTab (WWidget *widget)
 Removes a tab item.
+int count () const
 Returns the number of tabs.
+WWidgetwidget (int index) const
 Returns the content widget at the given tab index.
int indexOf (WWidget *widget) const
 Returns the index of the tab of the given content widget.
+void setCurrentIndex (int index)
 Activates the tab at index.
+int currentIndex () const
 Returns the index of the activated tab.
+void setCurrentWidget (WWidget *widget)
 Activates the tab showing the given widget
+WWidgetcurrentWidget () const
 Returns the widget of the activated tab.
void setTabEnabled (int index, bool enable)
 Enables or disables a tab.
bool isTabEnabled (int index) const
 Returns whether a tab is enabled.
void setTabHidden (int index, bool hidden)
 Hides or shows a tab.
+bool isTabHidden (int index) const
 Returns whether a tab is hidden.
+void setTabCloseable (int index, bool closeable)
 Make it possible to close a tab interactively or by closeTab.
+bool isTabCloseable (int index)
 Returns whether a tab is closeable.
+void setTabText (int index, const WString &label)
 Changes the label for a tab.
+const WStringtabText (int index) const
 Returns the label for a tab.
void setTabToolTip (int index, const WString &tip)
 Sets the tooltip for a tab.
+const WStringtabToolTip (int index) const
 Returns the tooltip for a tab.
void setInternalPathEnabled (const std::string &basePath="")
 Enables internal paths for items.
bool internalPathEnabled () const
 Returns whether internal paths are enabled.
void setInternalBasePath (const std::string &path)
 Sets the internal base path.
const std::string & internalBasePath () const
 Returns the internal base path.
Signal< int > & currentChanged ()
 Signal emitted when the user activates a tab.
+void closeTab (int index)
 Closes a tab at index.
Signal< int > & tabClosed ()
 Signal emitted when the user closes a tab.
+

Detailed Description

+

A widget that organizes contents in tab panes.

+

This widget combines a horizontal WMenu with a WStackedWidget, and a tab-like look.

+

A tab widget will place the tab bar on top of the contents, and fit the contents below it.

+

Usage example:

+
 Wt::WTabWidget *examples = new Wt::WTabWidget(this);
+
+ examples->addTab(helloWorldExample(), "Hello World");
+ examples->addTab(chartExample(), "Charts");
+ examples->addTab(new Wt::WText("A WText"), "WText");
+
+ examples->currentChanged().connect(this, &MyClass::logInternalPath);
+ examples->setInternalPathEnabled();
+ examples->setInternalBasePath("/examples");
+

CSS

+

The tab widget is styled by the current CSS theme. The look (of the header) can be overridden using the Wt-tabs CSS class and the following selectors:

+
+.Wt-tabs ul        : the list
+.Wt-tabs li        : a list item
+.Wt-tabs span      : outer span of a list item
+.Wt-span span span : inner span of a list item
+
+ + +
+WTabWidget-default-1.png +

An example WTabWidget (default)

+
+WTabWidget-polished-1.png +

An example WTabWidget (polished)

+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WTabWidget::LoadPolicy
+
+
+ +

When should the contents be loaded ?

+
Enumerator:
+ + +
LazyLoading  +

Lazy loading: on first use.

+
PreLoading  +

Pre-loading: before first use.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WTabWidget::WTabWidget (WFlags< AlignmentFlag layoutAlignment,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a new tab widget (indicating layout alignment) (deprecated).

+
Deprecated:
Since Wt 3.1.1, the layoutAlignment is no longer needed and its value is ignored
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
WMenuItem * Wt::WTabWidget::addTab (WWidget child,
const WString label,
LoadPolicy  loadPolicy = LazyLoading 
)
+
+
+ +

Adds a new tab, with child as content, and the given label.

+

Returns the menu item that implements the tab item.

+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::WTabWidget::currentChanged ( )
+
+
+ +

Signal emitted when the user activates a tab.

+

The index of the newly activated tab is passed as an argument.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTabWidget::indexOf (WWidget widget ) const
+
+
+ +

Returns the index of the tab of the given content widget.

+

If the widget is not in this tab widget, then -1 is returned.

+ +
+
+ +
+
+ + + + + + + +
const std::string & Wt::WTabWidget::internalBasePath ( ) const
+
+
+ +

Returns the internal base path.

+

The default value is the application's internalPath (WApplication::internalPath()) that was recorded when setInternalPathEnabled() was called, and together with each WMenuItem::pathComponent() determines the paths for each item.

+

For example, if internalBasePath() is "/examples/" and pathComponent() for a particular item is "charts/", then the internal path for that item will be "/examples/charts/".

+
See also:
setInternalPathEnabled()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTabWidget::internalPathEnabled ( ) const
+
+
+ +

Returns whether internal paths are enabled.

+
See also:
setInternalPathEnabled()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WTabWidget::isTabEnabled (int  index ) const
+
+
+ +

Returns whether a tab is enabled.

+
See also:
WMenu::enableItem(), WMenu::disableItem()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTabWidget::removeTab (WWidget widget )
+
+
+ +

Removes a tab item.

+

The widget itself is not deleted.

+
See also:
WMenu::removeItem()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTabWidget::setInternalBasePath (const std::string &  path )
+
+
+ +

Sets the internal base path.

+

A '/' is appended to turn it into a folder, if needed.

+
See also:
setInternalPathEnabled(), internalBasePath()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTabWidget::setInternalPathEnabled (const std::string &  basePath = "" )
+
+
+ +

Enables internal paths for items.

+

The menu participates in the internal path by changing the internal path when an item has been selected, and listening for path changes to react to path selections. As a consequence this allows the user to bookmark the current menu selection and revisit it later, use back/forward buttons to navigate through history of visited menu items, and allows indexing of pages.

+

For each menu item, WMenuItem::pathComponent() is appended to the internal base path (internalBasePath()), which defaults to the internal path (WApplication::internalPath()) but may be changed using setInternalBasePath(), with a '/' appended to turn it into a folder, if needed.

+

By default, menu interaction does not change the application internal path.

+
See also:
WMenuItem::setPathComponent().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTabWidget::setTabEnabled (int  index,
bool  enable 
)
+
+
+ +

Enables or disables a tab.

+

Enables or disables the tab at index. A disabled tab cannot be activated.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTabWidget::setTabHidden (int  index,
bool  hidden 
)
+
+
+ +

Hides or shows a tab.

+

Hides or shows the tab at index.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTabWidget::setTabToolTip (int  index,
const WString tip 
)
+
+
+ +

Sets the tooltip for a tab.

+

The tooltip is shown when the user hovers over the label.

+ +
+
+ +
+
+ + + + + + + +
Signal<int>& Wt::WTabWidget::tabClosed ( )
+
+
+ +

Signal emitted when the user closes a tab.

+

The index of the closed tab is passed as an argument.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.md5 new file mode 100644 index 0000000..31506fd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.md5 @@ -0,0 +1 @@ +b6a407da8259701449b6fb27c74a4efa \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.png new file mode 100644 index 0000000..9bd1dbb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTabWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTable-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable-members.html new file mode 100644 index 0000000..6b65ab6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable-members.html @@ -0,0 +1,218 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTable Member List

+
+
+This is the complete list of members for Wt::WTable, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WTable
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
columnAt(int column)Wt::WTable
columnCount() const Wt::WTable
decorationStyle()Wt::WWebWidget [virtual]
deleteColumn(int column)Wt::WTable
deleteRow(int row)Wt::WTable
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
elementAt(int row, int column)Wt::WTable
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
headerCount(Orientation orientation=Horizontal)Wt::WTable
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertColumn(int column)Wt::WTable
insertRow(int row)Wt::WTable
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
removeCell(WTableCell *item)Wt::WTable
removeCell(int row, int column)Wt::WTable
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
rowAt(int row)Wt::WTable
rowCount() const Wt::WTable
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHeaderCount(int count, Orientation orientation=Horizontal)Wt::WTable
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WTable(WContainerWidget *parent=0)Wt::WTable
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WTable()Wt::WTable
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTable.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable.html new file mode 100644 index 0000000..8fa7271 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable.html @@ -0,0 +1,375 @@ + + + + +Wt: Wt::WTable Class Reference + + + + + + + + + +
+ +
+

Wt::WTable Class Reference

+
+
+ +

A container widget which provides layout of children in a table grid. +More...

+ +

#include <Wt/WTable>

+
+Inheritance diagram for Wt::WTable:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTable (WContainerWidget *parent=0)
 Creates an empty table.
~WTable ()
 Deletes the table and its entire contents.
WTableCellelementAt (int row, int column)
 Accesses the table element at the given row and column.
WTableRowrowAt (int row)
 Returns the row object for the given row.
WTableColumncolumnAt (int column)
 Returns the column object for the given column.
void removeCell (WTableCell *item)
 Deletes a table cell and its contents.
void removeCell (int row, int column)
 Deletes the table cell at the given position.
+WTableRowinsertRow (int row)
 Inserts an empty row.
void deleteRow (int row)
 Deletes a row and all its contents.
+WTableColumninsertColumn (int column)
 Inserts an empty column.
+void deleteColumn (int column)
 Delete a column and all its contents.
void clear ()
 Clears the entire table.
+int rowCount () const
 Returns the number of rows in the table.
+int columnCount () const
 Returns the number of columns in the table.
void setHeaderCount (int count, Orientation orientation=Horizontal)
 Sets the number of header rows or columns.
int headerCount (Orientation orientation=Horizontal)
 Returns the number of header rows or columns.
+

Detailed Description

+

A container widget which provides layout of children in a table grid.

+

A WTable arranges its children in a table.

+

To insert or access contents, use elementAt(int row, int column) to access the cell at a particular location in the table. The WTable expands automatically to create the indexed (row, column) as necessary.

+

It is possible to insert and delete entire rows or columns from the table using the insertColumn(int column), insertRow(int row), deleteColumn(int column), or deleteRow(int row) methods.

+

You may indicate a number of rows and columns that act as headers using setHeaderCount(). Header cells are rendered as <th> instead of <td> elements. By default, no rows or columns are configured as headers.

+

WTable is displayed as a block.

+

Usage example:

+
 Wt::WTable *table = new Wt::WTable(this);
+ table->elementAt(0, 0)->addWidget(new Wt::WText("Item @ row 0, column 0"));
+ table->elementAt(0, 1)->addWidget(new Wt::WText("Item @ row 0, column 1"));
+ table->elementAt(1, 0)->addWidget(new Wt::WText("Item @ row 1, column 0"));
+ table->elementAt(1, 1)->addWidget(new Wt::WText("Item @ row 1, column 1"));
+
+ Wt::WTableCell *cell = table->elementAt(2, 0);
+ cell->addWidget(new Wt::WText("Item @ row 2"));
+ cell->setColumnSpan(2);
+

CSS

+

The widget corresponds to the HTML <table> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.

+
See also:
WTableCell, WTableRow, WTableColumn
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WTable::clear ( )
+
+
+ +

Clears the entire table.

+

This method clears the entire table: all cells and their contents are deleted.

+ +
+
+ +
+
+ + + + + + + + +
WTableColumn * Wt::WTable::columnAt (int  column )
+
+
+ +

Returns the column object for the given column.

+

Like with elementAt(), the table expands automatically when the column is beyond the current table dimensions.

+
See also:
elementAt(int, int), rowAt(int)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTable::deleteRow (int  row )
+
+
+ +

Deletes a row and all its contents.

+

Rows below the given row are shifted up.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WTableCell * Wt::WTable::elementAt (int  row,
int  column 
)
+
+
+ +

Accesses the table element at the given row and column.

+

If the row/column is beyond the current table dimensions, then the table is expanded automatically.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTable::headerCount (Orientation  orientation = Horizontal )
+
+
+ +

Returns the number of header rows or columns.

+
See also:
setHeaderCount()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTable::removeCell (WTableCell item )
+
+
+ +

Deletes a table cell and its contents.

+

The table cell at that position is recreated.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTable::removeCell (int  row,
int  column 
)
+
+
+ +

Deletes the table cell at the given position.

+
See also:
removeCell(WTableCell *)
+ +
+
+ +
+
+ + + + + + + + +
WTableRow * Wt::WTable::rowAt (int  row )
+
+
+ +

Returns the row object for the given row.

+

Like with elementAt(), the table expands automatically when the row is beyond the current table dimensions.

+
See also:
elementAt(int, int), columnAt(int)
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTable::setHeaderCount (int  count,
Orientation  orientation = Horizontal 
)
+
+
+ +

Sets the number of header rows or columns.

+

The default values are 0.

+
Note:
This must be set before the initial rendering and cannot be changed later.
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell-members.html new file mode 100644 index 0000000..2cde527 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell-members.html @@ -0,0 +1,237 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTableCell Member List

+
+
+This is the complete list of members for Wt::WTableCell, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
addWidget(WWidget *widget)Wt::WContainerWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WContainerWidget [virtual]
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
column() const Wt::WTableCell
columnSpan() const Wt::WTableCell
contentAlignment() const Wt::WContainerWidget
count() const Wt::WContainerWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WWidget *widget) const Wt::WContainerWidget [virtual]
insertBefore(WWidget *widget, WWidget *before)Wt::WContainerWidget [virtual]
insertWidget(int index, WWidget *widget)Wt::WContainerWidget [virtual]
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isList() const Wt::WContainerWidget
isOrderedList() const Wt::WContainerWidget
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isUnorderedList() const Wt::WContainerWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layout()Wt::WContainerWidget [virtual]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
Overflow enum nameWt::WContainerWidget
OverflowAuto enum valueWt::WContainerWidget
OverflowHidden enum valueWt::WContainerWidget
OverflowScroll enum valueWt::WContainerWidget
OverflowVisible enum valueWt::WContainerWidget
padding(Side side) const Wt::WContainerWidget
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
removeWidget(WWidget *widget)Wt::WContainerWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
row() const Wt::WTableCell
rowSpan() const Wt::WTableCell
scrolled()Wt::WContainerWidget
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setColumnSpan(int colSpan)Wt::WTableCell
setContentAlignment(WFlags< AlignmentFlag > contentAlignment)Wt::WContainerWidget
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayout(WLayout *layout)Wt::WContainerWidget [virtual]
setLayout(WLayout *layout, WFlags< AlignmentFlag > alignment)Wt::WContainerWidget
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setList(bool list, bool ordered=false)Wt::WContainerWidget
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setOverflow(Overflow overflow, WFlags< Orientation > orientation=(Horizontal|Vertical))Wt::WContainerWidget
setPadding(const WLength &padding, WFlags< Side > sides=All)Wt::WContainerWidget
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setRowSpan(int rowSpan)Wt::WTableCell
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
table() const Wt::WTableCell
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WContainerWidget(WContainerWidget *parent=0)Wt::WContainerWidget
widget(int index) const Wt::WContainerWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WContainerWidget()Wt::WContainerWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell.html new file mode 100644 index 0000000..c4c6f85 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell.html @@ -0,0 +1,206 @@ + + + + +Wt: Wt::WTableCell Class Reference + + + + + + + + + +
+ +
+

Wt::WTableCell Class Reference

+
+
+ +

A container widget that represents a cell in a table. +More...

+ +

#include <Wt/WTableCell>

+
+Inheritance diagram for Wt::WTableCell:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

void setRowSpan (int rowSpan)
 Sets the row span.
int rowSpan () const
 Returns the row span.
void setColumnSpan (int colSpan)
 Sets the column span.
int columnSpan () const
 Returns the column span.
+int row () const
 Returns the row index of this cell.
+int column () const
 Returns the column index of this cell.
+WTabletable () const
 Returns the table to which this cell belongs.
+

Detailed Description

+

A container widget that represents a cell in a table.

+

A WTable provides a table of WTableCell container widgets. A WTableCell may overspan more than one grid location in the table, by specifying a rowSpan and columnSpan . Table cells at overspanned positions are hidden. You cannot directly create a WTableCell, instead, they are created automatically by a table.

+

A WTableCell acts as any other WContainerWidget, except that both the vertical and horizontal alignment of contents may be specified by setContentAlignment().

+

CSS

+

The widget corresponds to the HTML <td> or <th> tag, depending on whether the cell is a plain cell or a header cell. The widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+
See also:
WTable
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WTableCell::columnSpan ( ) const
+
+
+ +

Returns the column span.

+
See also:
setColumnSpan(int colSpan)
+ +
+
+ +
+
+ + + + + + + +
int Wt::WTableCell::rowSpan ( ) const
+
+
+ +

Returns the row span.

+
See also:
setRowSpan(int rowSpan)
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableCell::setColumnSpan (int  colSpan )
+
+
+ +

Sets the column span.

+

The column span indicates how many table columns this WTableCell overspans. By default, a WTableCell has a column span of 1, only occupying its own grid cell. A column span greater than 1 indicates that table cells below this one are overspanned.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableCell::setRowSpan (int  rowSpan )
+
+
+ +

Sets the row span.

+

The row span indicates how many table rows this WTableCell overspans. By default, a WTableCell has a row span of 1, only occupying its own grid cell. A row span greater than 1 indicates that table cells to the right of this one are overspanned.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.map new file mode 100644 index 0000000..1ed709b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.md5 new file mode 100644 index 0000000..9907a4b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.md5 @@ -0,0 +1 @@ +f8eb4994cb6669fddd520963515c2190 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.png new file mode 100644 index 0000000..9ec6180 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableCell__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn-members.html new file mode 100644 index 0000000..48ee4e7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn-members.html @@ -0,0 +1,102 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTableColumn Member List

+
+
+This is the complete list of members for Wt::WTableColumn, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
columnNum() const Wt::WTableColumn
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WTableColumn [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setId(const std::string &id)Wt::WTableColumn
setObjectName(const std::string &name)Wt::WObject
setStyleClass(const WString &style)Wt::WTableColumn
setWidth(const WLength &width)Wt::WTableColumn
styleClass() const Wt::WTableColumn
table() const Wt::WTableColumn
width() const Wt::WTableColumn
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn.html new file mode 100644 index 0000000..902a82d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn.html @@ -0,0 +1,288 @@ + + + + +Wt: Wt::WTableColumn Class Reference + + + + + + + + + +
+ +
+

Wt::WTableColumn Class Reference

+
+
+ +

A table column. +More...

+ +

#include <Wt/WTableColumn>

+
+Inheritance diagram for Wt::WTableColumn:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTabletable () const
 Returns the table to which this column belongs.
int columnNum () const
 Returns the column number of this column in the table.
void setWidth (const WLength &width)
 Sets the column width.
WLength width () const
 Returns the column width.
void setStyleClass (const WString &style)
 Sets the CSS style class for this column.
const WStringstyleClass () const
 Returns the CSS style class for this column.
void setId (const std::string &id)
 Sets the CSS Id.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
+

Detailed Description

+

A table column.

+

A WTableColumn is returned by WTable::columnAt() and managing various properties of a single column in a table (it is however not a widget).

+

You cannot access table cells through the column. Instead, to access table cells, see WTable::elementAt().

+

A table column corresponds to the HTML <col> tag.

+
See also:
WTable, WTableRow
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WTableColumn::columnNum ( ) const
+
+
+ +

Returns the column number of this column in the table.

+
See also:
WTable::rowAt()
+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WTableColumn::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableColumn::setId (const std::string &  id )
+
+
+ +

Sets the CSS Id.

+

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed.

+
See also:
WObject::id()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableColumn::setStyleClass (const WString style )
+
+
+ +

Sets the CSS style class for this column.

+

The style is inherited by all table cells in this column.

+
See also:
styleClass(), WWidget::setStyleClass()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableColumn::setWidth (const WLength width )
+
+
+ +

Sets the column width.

+

The default column width is WLength::Auto.

+
See also:
width(), WWidget::resize()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WTableColumn::styleClass ( ) const
+
+
+ +

Returns the CSS style class for this column.

+
See also:
styleClass(), WWidget::styleClass()
+ +
+
+ +
+
+ + + + + + + +
WTable* Wt::WTableColumn::table ( ) const
+
+
+ +

Returns the table to which this column belongs.

+
See also:
WTable::rowAt()
+ +
+
+ +
+
+ + + + + + + +
WLength Wt::WTableColumn::width ( ) const
+
+
+ +

Returns the column width.

+
See also:
setWidth(const WLength&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.map new file mode 100644 index 0000000..58f1a7a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.md5 new file mode 100644 index 0000000..55538c7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.md5 @@ -0,0 +1 @@ +0e2abd774ed7275b078485f7b45f9a48 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.png new file mode 100644 index 0000000..c58fd6d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableColumn__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow-members.html new file mode 100644 index 0000000..ce99ddc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow-members.html @@ -0,0 +1,106 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTableRow Member List

+
+
+This is the complete list of members for Wt::WTableRow, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
height() const Wt::WTableRow
hide()Wt::WTableRow
id() const Wt::WTableRow [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isHidden() const Wt::WTableRow
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
rowNum() const Wt::WTableRow
sender()Wt::WObject [protected, static]
setHeight(const WLength &height)Wt::WTableRow
setHidden(bool how)Wt::WTableRow
setId(const std::string &id)Wt::WTableRow
setObjectName(const std::string &name)Wt::WObject
setStyleClass(const WString &style)Wt::WTableRow
show()Wt::WTableRow
styleClass() const Wt::WTableRow
table() const Wt::WTableRow
WObject(WObject *parent=0)Wt::WObject
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow.html new file mode 100644 index 0000000..50f8ec2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow.html @@ -0,0 +1,375 @@ + + + + +Wt: Wt::WTableRow Class Reference + + + + + + + + + +
+ +
+

Wt::WTableRow Class Reference

+
+
+ +

A table row. +More...

+ +

#include <Wt/WTableRow>

+
+Inheritance diagram for Wt::WTableRow:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTabletable () const
 Returns the table to which this row belongs.
int rowNum () const
 Returns the row number of this row in the table.
void setHeight (const WLength &height)
 Sets the row height.
WLength height () const
 Returns the row height.
void setStyleClass (const WString &style)
 Sets the CSS style class for this row.
const WStringstyleClass () const
 Returns the CSS style class for this row.
void setHidden (bool how)
 Sets whether the row must be hidden.
bool isHidden () const
 Returns whether the rows is hidden.
void hide ()
 Hides the row.
void show ()
 Shows the row.
void setId (const std::string &id)
 Sets the CSS Id.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
+

Detailed Description

+

A table row.

+

A WTableRow is returned by WTable::rowAt() and managing various properties of a single row in a table (it is however not a widget).

+

You cannot access table cells through the row. Instead, to access table cells, see WTable::elementAt().

+

A table row corresponds to the HTML <tr> tag.

+
See also:
WTable, WTableColumn
+

Member Function Documentation

+ +
+
+ + + + + + + +
WLength Wt::WTableRow::height ( ) const
+
+
+ +

Returns the row height.

+
See also:
setHeight(const WLength&)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTableRow::hide ( )
+
+
+ +

Hides the row.

+
See also:
setHidden()
+ +
+
+ +
+
+ + + + + + + +
const std::string Wt::WTableRow::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTableRow::isHidden ( ) const
+
+
+ +

Returns whether the rows is hidden.

+
See also:
setHidden()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WTableRow::rowNum ( ) const
+
+
+ +

Returns the row number of this row in the table.

+
See also:
WTable::rowAt()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableRow::setHeight (const WLength height )
+
+
+ +

Sets the row height.

+

The default row height is WLength::Auto.

+
See also:
height(), WWidget::resize()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableRow::setHidden (bool  how )
+
+
+ +

Sets whether the row must be hidden.

+

Hide or show the row.

+

The default value is false (row is not hidden).

+
See also:
hide(), show()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableRow::setId (const std::string &  id )
+
+
+ +

Sets the CSS Id.

+

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed.

+
See also:
WObject::id()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableRow::setStyleClass (const WString style )
+
+
+ +

Sets the CSS style class for this row.

+

The style is inherited by all table cells in this row.

+
See also:
styleClass(), WWidget::setStyleClass()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTableRow::show ( )
+
+
+ +

Shows the row.

+
See also:
setHidden()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WTableRow::styleClass ( ) const
+
+
+ +

Returns the CSS style class for this row.

+
See also:
styleClass(), WWidget::styleClass()
+ +
+
+ +
+
+ + + + + + + +
WTable* Wt::WTableRow::table ( ) const
+
+
+ +

Returns the table to which this row belongs.

+
See also:
WTable::rowAt()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.map new file mode 100644 index 0000000..6ee590d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.md5 new file mode 100644 index 0000000..1069b79 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.md5 @@ -0,0 +1 @@ +58a2d29b76de444ce3aa5bc647cf038e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.png new file mode 100644 index 0000000..41953cb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableRow__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView-members.html new file mode 100644 index 0000000..7323ff2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView-members.html @@ -0,0 +1,262 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTableView Member List

+
+
+This is the complete list of members for Wt::WTableView, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
alternatingRowColors() const Wt::WAbstractItemView [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
clicked()Wt::WAbstractItemView
closeEditor(const WModelIndex &index, bool saveData=true)Wt::WAbstractItemView
closeEditors(bool saveData=true)Wt::WAbstractItemView
columnAlignment(int column) const Wt::WAbstractItemView [virtual]
columnResized()Wt::WAbstractItemView
columnWidth(int column) const Wt::WAbstractItemView
createExtraHeaderWidget(int column)Wt::WAbstractItemView [protected, virtual]
createPageNavigationBar()Wt::WAbstractItemView [protected, virtual]
currentPage() const Wt::WTableView [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
doubleClicked()Wt::WAbstractItemView
DoubleClicked enum valueWt::WAbstractItemView
dropEvent(const WDropEvent &event, const WModelIndex &target)Wt::WAbstractItemView [protected, virtual]
Wt::WCompositeWidget::dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
edit(const WModelIndex &index)Wt::WAbstractItemView
EditOption enum nameWt::WAbstractItemView
editOptions() const Wt::WAbstractItemView
EditTrigger enum nameWt::WAbstractItemView
editTriggers() const Wt::WAbstractItemView
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
extraHeaderWidget(int column)Wt::WAbstractItemView [protected]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
headerAlignment(int column) const Wt::WAbstractItemView [virtual]
headerHeight() const Wt::WAbstractItemView
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
hideColumn(int column)Wt::WAbstractItemView
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isColumnHidden(int column) const Wt::WAbstractItemView
isColumnResizeEnabled() const Wt::WAbstractItemView
isDisabled() const Wt::WCompositeWidget [virtual]
isEditing(const WModelIndex &index) const Wt::WAbstractItemView
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelected(const WModelIndex &index) const Wt::WAbstractItemView
isSortingEnabled() const Wt::WAbstractItemView
isSortingEnabled(int column) const Wt::WAbstractItemView
isValid(const WModelIndex &index) const Wt::WAbstractItemView
isVisible() const Wt::WCompositeWidget [virtual]
itemDelegate() const Wt::WAbstractItemView
itemDelegate(const WModelIndex &index) const Wt::WAbstractItemView
itemDelegate(int column) const Wt::WAbstractItemView
itemDelegateForColumn(int column) const Wt::WAbstractItemView
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LeaveEditorsOpen enum valueWt::WAbstractItemView
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
model() const Wt::WAbstractItemView
mouseWentDown()Wt::WAbstractItemView
mouseWentUp()Wt::WAbstractItemView
MultipleEditors enum valueWt::WAbstractItemView
NoEditTrigger enum valueWt::WAbstractItemView
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
pageChanged()Wt::WAbstractItemView
pageCount() const Wt::WTableView [virtual]
pageSize() const Wt::WTableView [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WTableView [virtual]
rootIndex() const Wt::WAbstractItemView
rowHeight() const Wt::WAbstractItemView
SaveWhenClosed enum valueWt::WAbstractItemView
select(const WModelIndex &index, SelectionFlag option=Select)Wt::WAbstractItemView
SelectedClicked enum valueWt::WAbstractItemView
selectedIndexes() const Wt::WAbstractItemView
selectionBehavior() const Wt::WAbstractItemView
selectionChanged()Wt::WAbstractItemView
selectionMode() const Wt::WAbstractItemView
selectionModel() const Wt::WAbstractItemView
sender()Wt::WObject [protected, static]
setAlternatingRowColors(bool enable)Wt::WTableView [virtual]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setColumnAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setColumnBorder(const WColor &color)Wt::WTableView [virtual]
setColumnHidden(int column, bool hidden)Wt::WTableView [virtual]
setColumnResizeEnabled(bool enabled)Wt::WAbstractItemView
setColumnWidth(int column, const WLength &width)Wt::WTableView [virtual]
setCurrentPage(int page)Wt::WTableView [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setDragEnabled(bool enable)Wt::WAbstractItemView
setDropsEnabled(bool enable)Wt::WAbstractItemView
setEditOptions(WFlags< EditOption > options)Wt::WAbstractItemView
setEditTriggers(WFlags< EditTrigger > editTriggers)Wt::WAbstractItemView
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHeaderAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setHeaderHeight(const WLength &height, bool multiLine=false)Wt::WTableView [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setItemDelegate(WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setItemDelegateForColumn(int column, WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setModel(WAbstractItemModel *model)Wt::WTableView [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setRootIndex(const WModelIndex &rootIndex)Wt::WAbstractItemView
setRowHeight(const WLength &rowHeight)Wt::WTableView [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setSelectedIndexes(const WModelIndexSet &indexes)Wt::WAbstractItemView
setSelectionBehavior(SelectionBehavior behavior)Wt::WAbstractItemView
setSelectionMode(SelectionMode mode)Wt::WAbstractItemView
setSortingEnabled(bool enabled)Wt::WAbstractItemView
setSortingEnabled(int column, bool enabled)Wt::WAbstractItemView
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
showColumn(int column)Wt::WAbstractItemView
SingleClicked enum valueWt::WAbstractItemView
SingleEditor enum valueWt::WAbstractItemView
sortByColumn(int column, SortOrder order)Wt::WAbstractItemView
sortColumn() const Wt::WAbstractItemView
sortOrder() const Wt::WAbstractItemView
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validateEditor(const WModelIndex &index)Wt::WAbstractItemView
validateEditors()Wt::WAbstractItemView
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WAbstractItemView(WContainerWidget *parent=0)Wt::WAbstractItemView [protected]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTableView(WContainerWidget *parent=0)Wt::WTableView
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView.html new file mode 100644 index 0000000..ebbf4d9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView.html @@ -0,0 +1,463 @@ + + + + +Wt: Wt::WTableView Class Reference + + + + + + + + + +
+ +
+

Wt::WTableView Class Reference
+ +[Model/view system] +

+
+
+ +

An MVC View widget for tabular data. +More...

+ +

#include <Wt/WTableView>

+
+Inheritance diagram for Wt::WTableView:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTableView (WContainerWidget *parent=0)
 Constructor.
virtual void setModel (WAbstractItemModel *model)
 Sets the model.
virtual void setColumnWidth (int column, const WLength &width)
 Sets the column width.
virtual void setAlternatingRowColors (bool enable)
 Sets if alternating row colors are to be used.
virtual void setRowHeight (const WLength &rowHeight)
 Sets the row height.
virtual void setHeaderHeight (const WLength &height, bool multiLine=false)
 Sets the header height.
virtual void setColumnBorder (const WColor &color)
 Sets the column border color.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
virtual void setColumnHidden (int column, bool hidden)
 Changes the visibility of a column.
virtual int pageCount () const
 Returns the number of pages.
virtual int pageSize () const
 Returns the page size.
virtual int currentPage () const
 Returns the current page.
virtual void setCurrentPage (int page)
 Sets the current page.
+

Detailed Description

+

An MVC View widget for tabular data.

+

The view displays data from a WAbstractItemModel in a table. It provides incremental rendering, without excessive use of client- or serverside resources.

+

The rendering (and editing) of items is handled by a WAbstractItemDelegate, by default it uses WItemDelegate which renders data of all predefined roles (see also Wt::ItemDataRole), including text, icons, checkboxes, and tooltips.

+

The view provides virtual scrolling in both horizontal and vertical directions, and can therefore be used to display large data models (with large number of columns and rows).

+

The view may support editing of items, if the model indicates support (see the Wt::ItemIsEditable flag). You can define triggers that initiate editing of an item using setEditTriggers(). The actual editing is provided by the item delegate (you can set an appropriate delegate for one column using setItemDelegateForColumn()). Using setEditOptions() you can customize if and how the view deals with multiple editors.

+

By default, all columns are given a width of 150px. Column widths of all columns can be set through the API method setColumnWidth(), and also by the user using handles provided in the header.

+

If the model supports sorting (WAbstractItemModel::sort()), such as the WStandardItemModel, then you can enable sorting buttons in the header, using setSortingEnabled().

+

You can allow selection on row or item level (using setSelectionBehavior()), and selection of single or multiple items (using setSelectionMode()), and listen for changes in the selection using the selectionChanged() signal.

+

You may enable drag & drop support for this view, whith awareness of the items in the model. When enabling dragging (see setDragEnabled()), the current selection may be dragged, but only when all items in the selection indicate support for dragging (controlled by the ItemIsDragEnabled flag), and if the model indicates a mime-type (controlled by WAbstractItemModel::mimeType()). Likewise, by enabling support for dropping (see setDropsEnabled()), the view may receive a drop event on a particular item, at least if the item indicates support for drops (controlled by the ItemIsDropEnabled flag).

+

You may also react to mouse click events on any item, by connecting to one of the clicked() or doubleClicked() signals.

+

Member Function Documentation

+ +
+
+ + + + + + + +
int Wt::WTableView::currentPage ( ) const [virtual]
+
+
+ +

Returns the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the current page (between 0 and pageCount() - 1).

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WTableView::pageCount ( ) const [virtual]
+
+
+ +

Returns the number of pages.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of pages currently shown.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WTableView::pageSize ( ) const [virtual]
+
+
+ +

Returns the page size.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of items per page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTableView::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableView::setAlternatingRowColors (bool  enable ) [virtual]
+
+
+ +

Sets if alternating row colors are to be used.

+

Configure whether rows get alternating background colors, defined by the current CSS theme.

+

The default value is false.

+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableView::setColumnBorder (const WColor color ) [virtual]
+
+
+ +

Sets the column border color.

+

The default border color is defined by the CSS theme.

+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTableView::setColumnHidden (int  column,
bool  hide 
) [virtual]
+
+
+ +

Changes the visibility of a column.

+
See also:
isColumnHidden()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTableView::setColumnWidth (int  column,
const WLength width 
) [virtual]
+
+
+ +

Sets the column width.

+

The default column width is 150 pixels.

+
Note:
The actual space occupied by each column is the column width augmented by 7 pixels for internal padding and a border.
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableView::setCurrentPage (int  page ) [virtual]
+
+
+ +

Sets the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This method can be used to change the current page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTableView::setHeaderHeight (const WLength height,
bool  multiLine = false 
) [virtual]
+
+
+ +

Sets the header height.

+

Use this method to change the header height. By default, the header text is a single line that is centered vertically.

+

By enabling multi-line headers, the header text will be aligned to the top and wrap as needed. In that case, additional contents may be displayed in the header, provided by createExtraHeaderWidget().

+

The default value is a single line of 20 pixels.

+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableView::setModel (WAbstractItemModel model ) [virtual]
+
+
+ +

Sets the model.

+

The View will display data of the given model and changes in the model are reflected by the View.

+

The initial model is 0.

+

Ownership of the model is not transferred (and thus the previously set model is not deleted). A model may not be deleted as long as a view exists for it.

+
See also:
setRootIndex()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTableView::setRowHeight (const WLength rowHeight ) [virtual]
+
+
+ +

Sets the row height.

+

The view renders all rows with a same height. This method configures this row height.

+

The default value is 20 pixels.

+
Note:
The height must be specified in WLength::Pixel units.
+
See also:
setColumnWidth()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.map new file mode 100644 index 0000000..d66cb9b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.md5 new file mode 100644 index 0000000..5a7888a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.md5 @@ -0,0 +1 @@ +048ff2e41405dea745b8df79f010153f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.png new file mode 100644 index 0000000..975e06f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTableView__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.md5 new file mode 100644 index 0000000..43152d3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.md5 @@ -0,0 +1 @@ +d99ff67bbdb6160a57fe38936542e816 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.png new file mode 100644 index 0000000..414a3fe Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTable__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate-members.html new file mode 100644 index 0000000..47f69e0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate-members.html @@ -0,0 +1,217 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTemplate Member List

+
+
+This is the complete list of members for Wt::WTemplate, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
bindInt(const std::string &varName, int value)Wt::WTemplate
bindString(const std::string &varName, const WString &value, TextFormat textFormat=XHTMLText)Wt::WTemplate
bindWidget(const std::string &varName, WWidget *widget)Wt::WTemplate
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clear()Wt::WTemplate
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WTemplate [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
format(std::ostream &result, const std::string &s, TextFormat textFormat=PlainText)Wt::WTemplate [protected]
format(std::ostream &result, const WString &s, TextFormat textFormat=PlainText)Wt::WTemplate [protected]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
handleUnresolvedVariable(const std::string &varName, const std::vector< WString > &args, std::ostream &result)Wt::WTemplate [virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WTemplate [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
renderTemplate(std::ostream &result)Wt::WTemplate [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
resolve(const std::string &varName)Wt::WTemplate
resolveString(const std::string &varName, const std::vector< WString > &args, std::ostream &result)Wt::WTemplate [virtual]
resolveWidget(const std::string &varName)Wt::WTemplate [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setTemplateText(const WString &text, TextFormat textFormat=XHTMLText)Wt::WTemplate
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
templateText() const Wt::WTemplate
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WTemplate(WContainerWidget *parent=0)Wt::WTemplate
WTemplate(const WString &text, WContainerWidget *parent=0)Wt::WTemplate
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate.html new file mode 100644 index 0000000..3ac6bd8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate.html @@ -0,0 +1,639 @@ + + + + +Wt: Wt::WTemplate Class Reference + + + + + + + + + +
+ +
+

Wt::WTemplate Class Reference

+
+
+ +

A widget that renders an XHTML template. +More...

+ +

#include <Wt/WTemplate>

+
+Inheritance diagram for Wt::WTemplate:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTemplate (WContainerWidget *parent=0)
 Creates a template widget.
 WTemplate (const WString &text, WContainerWidget *parent=0)
 Creates a template widget with given template.
const WStringtemplateText () const
 Returns the template.
void setTemplateText (const WString &text, TextFormat textFormat=XHTMLText)
 Sets the template text.
void bindWidget (const std::string &varName, WWidget *widget)
 Binds a widget to a variable name.
void bindString (const std::string &varName, const WString &value, TextFormat textFormat=XHTMLText)
 Binds a string value to a variable name.
void bindInt (const std::string &varName, int value)
 Binds an integer value to a variable name.
virtual void resolveString (const std::string &varName, const std::vector< WString > &args, std::ostream &result)
 Resolves the string value for a variable name.
virtual void handleUnresolvedVariable (const std::string &varName, const std::vector< WString > &args, std::ostream &result)
 Handles a variable that could not be resolved.
virtual WWidgetresolveWidget (const std::string &varName)
 Resolves a widget for a variable name.
template<typename T >
resolve (const std::string &varName)
 Returns a widget for a variable name.
void clear ()
 Erases all variable bindings.
virtual void refresh ()
 Refreshes the template.

+Protected Member Functions

virtual void renderTemplate (std::ostream &result)
 Renders the template into the given result stream.
void format (std::ostream &result, const std::string &s, TextFormat textFormat=PlainText)
 Utility method to safely format an XHTML string.
void format (std::ostream &result, const WString &s, TextFormat textFormat=PlainText)
 Utility method to safely format an XHTML string.
virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A widget that renders an XHTML template.

+

The XHTML template may contain references to variables which replaced by strings are widgets.

+

Since the template text may be supplied by a WString, you can conveniently store the string in a message resource bundle, and make it localized by using WString::tr().

+

Variable references use a ${varName} syntax to reference the variable "varName". To use a literal "${", use "$${".

+

You can bind widgets and values to variables using bindWidget(), bindString() or bindInt() or by reimplementing the resolveString() and resolveWidget() methods.

+

Usage example:

+
 WString userName = ...;
+
+ WTemplate *t = new WTemplate();
+ t->setTemplateText("<div> How old are you, ${friend} ? ${age-input} </div>");
+
+ t->bindString("friend", userName);
+ t->bindWidget("age-input", ageEdit_ = new WLineEdit());
+

The template can return a bound widget using resolve(), which already tries to cast the widget to the proper type.

+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WTemplate::WTemplate (const WString text,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a template widget with given template.

+

The templateText must be proper XHTML, and this is checked unless the XHTML is resolved from a message resource bundle. This behavior is similar to a WText when configured with the Wt::XHTMLText textformat.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::bindInt (const std::string &  varName,
int  value 
)
+
+
+ +

Binds an integer value to a variable name.

+
See also:
bindString()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::bindString (const std::string &  varName,
const WString value,
TextFormat  textFormat = XHTMLText 
)
+
+
+ +

Binds a string value to a variable name.

+

Each occurrence of the variable within the template will be substituted by its value.

+

Depending on the textFormat, the value is validated according as for a WText.

+
See also:
bindWidget(), bindInt()
+
+resolveString()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::bindWidget (const std::string &  varName,
WWidget widget 
)
+
+
+ +

Binds a widget to a variable name.

+

The corresponding variable reference within the template will be replaced with the widget (rendered as XHTML). Since a single widget may be instantiated only once in a template, the variable varName may occur at most once in the template.

+

If a widget was already bound to the variable, it is deleted first. If previously a string or other value was bound to the variable, it is removed.

+

You may also pass a 0 widget, which will resolve to an empty string.

+
See also:
bindString()
+
+resolveWidget()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTemplate::clear ( )
+
+
+ +

Erases all variable bindings.

+

Removes all strings and deletes all widgets that were previously bound using bindString() and bindWidget().

+ +
+
+ +
+
+ + + + + + + +
void Wt::WTemplate::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::format (std::ostream &  result,
const WString s,
TextFormat  textFormat = PlainText 
) [protected]
+
+
+ +

Utility method to safely format an XHTML string.

+

The string is formatted according to the indicated textFormat. It is recommended to use this method when specializing resolveString() to avoid security risks.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::format (std::ostream &  result,
const std::string &  s,
TextFormat  textFormat = PlainText 
) [protected]
+
+
+ +

Utility method to safely format an XHTML string.

+

The string is formatted according to the indicated textFormat. It is recommended to use this method when specializing resolveString() to avoid security risks.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::handleUnresolvedVariable (const std::string &  varName,
const std::vector< WString > &  args,
std::ostream &  result 
) [virtual]
+
+
+ +

Handles a variable that could not be resolved.

+

This method is called from resolveString() for variables that could not be resolved.

+

The default implementation implementation writes "??" + varName + "??" to the result stream.

+

The result stream expects a UTF-8 encoded string value.

+
Warning:
When specializing this class, you need to make sure that you append proper XHTML to the result, without unsafe active contents. The format() methods may be used for this purpose.
+
See also:
resolveString()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTemplate::refresh ( ) [virtual]
+
+
+ +

Refreshes the template.

+

This rerenders the template.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTemplate::renderTemplate (std::ostream &  result ) [protected, virtual]
+
+
+ +

Renders the template into the given result stream.

+

The default implementation will parse the template, and resolve variables by calling resolveString().

+

You may want to reimplement this method to manage resources that are needed to load content on-demand (e.g. database objects), or support a custom template language.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
T Wt::WTemplate::resolve (const std::string &  varName )
+
+
+ +

Returns a widget for a variable name.

+

This is a convience method, which calls resolveWidget() and casts the result to type T. You may use this method to fetch widgets that have previously been bound using bindWidget().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::resolveString (const std::string &  varName,
const std::vector< WString > &  args,
std::ostream &  result 
) [virtual]
+
+
+ +

Resolves the string value for a variable name.

+

This is the main method used to resolve variables in the template text, during rendering.

+

The default implementation considers first whether a string was bound using bindString(). If so, that string is returned. If not, it will attempt to resolve a widget with that variable name using resolveWidget(), and render it as XHTML. If that fails too, handleUnresolvedVariable() is called, passing the initial arguments.

+

You may want to reimplement this method to provide on-demand loading of strings for your template.

+

The result stream expects a UTF-8 encoded string value.

+
Warning:
When specializing this class, you need to make sure that you append proper XHTML to the result, without unsafe active contents. The format() methods may be used for this purpose.
+
See also:
renderTemplate()
+ +
+
+ +
+
+ + + + + + + + +
WWidget * Wt::WTemplate::resolveWidget (const std::string &  varName ) [virtual]
+
+
+ +

Resolves a widget for a variable name.

+

The default implementation returns a widget that was bound using bindWidget().

+

You may want to reimplement this method to create widgets on-demand. All widgets that are returned by this method are reparented to the WTemplate, so they will be deleted when the template is destroyed, but they are not deleted by clear() (unless bind was called on them as in the example below).

+

This method is typically used for delayed binding of widgets. Usage example:

+
 {
+   if (Widget *known = WTemplate::resolveWidget(varName)) {
+     return known;
+   } else {
+     if (varName == "age-input") {
+       WWidget *w = new WLineEdit(); // widget only created when used
+       bind(varName, w);
+       return w;
+     }
+   }
+ }
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTemplate::setTemplateText (const WString text,
TextFormat  textFormat = XHTMLText 
)
+
+
+ +

Sets the template text.

+

The text must be proper XHTML, and this is checked unless the XHTML is resolved from a message resource bundle or TextFormat is Wt::XHTMLUnsafeText. This behavior is similar to a WText when configured with the Wt::XHTMLText textformat.

+

Changing the template text does not clear() bound widgets or values.

+
See also:
clear()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WTemplate::templateText ( ) const
+
+
+ +

Returns the template.

+
See also:
setTemplateText(const WString&)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.map new file mode 100644 index 0000000..fa94b39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.md5 new file mode 100644 index 0000000..28b77f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.md5 @@ -0,0 +1 @@ +2f244adbcc3f6287b137b6d5acc8a813 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.png new file mode 100644 index 0000000..c3d0a7b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTemplate__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WText-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WText-members.html new file mode 100644 index 0000000..be9a6d2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WText-members.html @@ -0,0 +1,214 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WText Member List

+
+
+This is the complete list of members for Wt::WText, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
padding(Side side) const Wt::WText
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WInteractWidget [protected, virtual]
refresh()Wt::WText [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPadding(const WLength &padding, WFlags< Side > sides=Left|Right)Wt::WText
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setText(const WString &text)Wt::WText
setTextFormat(TextFormat format)Wt::WText
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
setWordWrap(bool wordWrap)Wt::WText
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
text() const Wt::WText
textFormat() const Wt::WText
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
wordWrap() const Wt::WText
WText(WContainerWidget *parent=0)Wt::WText
WText(const WString &text, WContainerWidget *parent=0)Wt::WText
WText(const WString &text, TextFormat textFormat, WContainerWidget *parent=0)Wt::WText
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WText()Wt::WText
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WText.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WText.html new file mode 100644 index 0000000..9b839e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WText.html @@ -0,0 +1,424 @@ + + + + +Wt: Wt::WText Class Reference + + + + + + + + + +
+ +
+

Wt::WText Class Reference

+
+
+ +

A widget that renders (XHTML) text. +More...

+ +

#include <Wt/WText>

+
+Inheritance diagram for Wt::WText:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WText (WContainerWidget *parent=0)
 Creates a text widget with an empty text.
 WText (const WString &text, WContainerWidget *parent=0)
 Creates a text widget with given text.
 WText (const WString &text, TextFormat textFormat, WContainerWidget *parent=0)
 Creates a text widget with given text and format.
~WText ()
 Destructor.
const WStringtext () const
 Returns the text.
bool setText (const WString &text)
 Sets the text.
bool setTextFormat (TextFormat format)
 Sets the text format.
TextFormat textFormat () const
 Returns the text format.
void setWordWrap (bool wordWrap)
 Configures word wrapping.
bool wordWrap () const
 Returns whether the widget may break lines.
void setPadding (const WLength &padding, WFlags< Side > sides=Left|Right)
 Sets padding inside the widget.
WLength padding (Side side) const
 Returns the padding set for the widget.
virtual void refresh ()
 Refresh the widget.
+

Detailed Description

+

A widget that renders (XHTML) text.

+

The text is provided through a WString, which may either hold a literal text, or a key to localized text which is looked up in locale dependent XML files (see WString::tr()).

+

Use setTextFormat() to configure the textFormat of the text. The default textFormat is Wt::XHTMLText, which allows XHMTL markup to be included in the text. Tags and attributes that indicate "active" content are not allowed and stripped out, to avoid security risks exposed by JavaScript such as the common web-based Cross-Site Scripting (XSS) malicious attack. XSS is the situation where one user of your web application is able to execute a script in another user's browser while your application only intended to display a message entered by the mailicious user to the other user. To defeat this attack, Wt assumes that content in a WText is intended to be passive, and not contain any scripting elements.

+

The Wt::PlainText format will display the text literally (escaping any HTML special characters).

+

In some situations, Wt::XHTMLUnsafeText may be useful to explicitly allow scripting content. Like XHTMLText, it allows XHTML markup, but it also allows potentially dangerous tags and attributes. Use this if you're sure that a user cannot interfere with the text set, and XHTMLText is too limiting.

+

WText is by default inline, unless the XHTML contents starts with an element such as <div>, <h> or <p> that is displayed as a block, in which case the widget will also display as a block.

+

Usage examples:

+
 Wt::WContainerWidget *container = new Wt::WContainerWidget();
+
+ // display an XHTML text:
+ container->addWidget(new Wt::WText("Hello <i>dear</i> visitor."));
+
+ // display a plain text:
+ container->addWidget(new Wt::WText("The <i> tag displays italic text.", Wt::PlainText));
+
+ // display an XHTML fragment from a resource bundle:
+ container->addWidget(new Wt::WText(tr("introduction")));
+

CSS

+

The widget corresponds to an HTML <span> tag or an HTML <div> depending on whether the widget is inline.

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+
See also:
WApplication::setLocale()
+
+WApplication::messageResourceBundle()
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WText::WText (const WString text,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a text widget with given text.

+

The textFormat is set to Wt::XHTMLText, unless the text is literal (not created using WString::tr()) and it could not be parsed as valid XML. In that case the textFormat is set to Wt::PlainText.

+

Therefore, if you wish to use Wt::XHTMLText, but cannot be sure about text being valid XML, you should verify that the textFormat() is Wt::XHTMLText after construction.

+

The XML parser will silently discard malicious tags and attributes for literal Wt::XHTMLText text.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WText::WText (const WString text,
TextFormat  textFormat,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a text widget with given text and format.

+

If textFormat is Wt::XHTMLText and text is not literal (not created using WString::tr()), then if the text could not be parsed as valid XML, the textFormat is changed to Wt::PlainText.

+

Therefore, if you wish to use Wt::XHTMLText, but cannot be sure about text being valid XML, you should verify that the textFormat() is Wt::XHTMLText after construction.

+

The XML parser will silently discard malicious tags and attributes for literal Wt::XHTMLText text.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WLength Wt::WText::padding (Side  side ) const
+
+
+ +

Returns the padding set for the widget.

+
See also:
setPadding(const WLength&, WFlags<Side>)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WText::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WText::setPadding (const WLength padding,
WFlags< Side sides = Left | Right 
)
+
+
+ +

Sets padding inside the widget.

+

Setting padding has the effect of adding distance between the widget children and the border, for a WText padding is only supported on the left and/or right.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WText::setText (const WString text )
+
+
+ +

Sets the text.

+

When the current format is Wt::XHTMLText, and text is literal (not created using WString::tr()), it is parsed using an XML parser which discards malicious tags and attributes silently. When the parser encounters an XML parse error, the textFormat is changed to Wt::PlainText.

+

Returns whether the text could be set using the current textFormat. A return value of false indicates that the textFormat was changed in order to be able to accept the new text.

+
See also:
text(), setText()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WText::setTextFormat (TextFormat  format )
+
+
+ +

Sets the text format.

+

The textFormat controls how the string should be interpreted: either as plain text, which is displayed literally, or as XHTML-markup.

+

When changing the textFormat to Wt::XHTMLText, and the current text is literal (not created using WString::tr()), the current text is parsed using an XML parser which discards malicious tags and attributes silently. When the parser encounters an XML parse error, the textFormat is left unchanged, and this method returns false.

+

Returns whether the textFormat could be set for the current text.

+

The default format is Wt::XHTMLText.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WText::setWordWrap (bool  wordWrap )
+
+
+ +

Configures word wrapping.

+

When wordWrap is true, the widget may break lines, creating a multi-line text. When wordWrap is false, the text will displayed on a single line, unless the text contains end-of-lines (for Wt::PlainText) or <br /> tags or other block-level tags (for Wt::XHTMLText).

+

The default value is true.

+
See also:
wordWrap()
+ +
+
+ +
+
+ + + + + + + +
const WString& Wt::WText::text ( ) const
+
+
+ +

Returns the text.

+

When a literal XHTMLFormatted text was set, this may differ from the text that was set since malicious tags/attributes may have been stripped.

+
See also:
setText(const WString&)
+ +
+
+ +
+
+ + + + + + + +
TextFormat Wt::WText::textFormat ( ) const
+
+
+ +

Returns the text format.

+
See also:
setTextFormat()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WText::wordWrap ( ) const
+
+
+ +

Returns whether the widget may break lines.

+
See also:
setWordWrap(bool)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea-members.html new file mode 100644 index 0000000..62f4b02 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea-members.html @@ -0,0 +1,232 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTextArea Member List

+
+
+This is the complete list of members for Wt::WTextArea, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WTextArea [protected, virtual]
boxPadding(Orientation orientation) const Wt::WTextArea [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
columns() const Wt::WTextArea
cursorPosition() const Wt::WTextArea
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
hasSelectedText() const Wt::WTextArea
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
rows() const Wt::WTextArea
selected()Wt::WFormWidget
selectedText() const Wt::WTextArea
selectionStart() const Wt::WTextArea
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setColumns(int cols)Wt::WTextArea
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setRows(int rows)Wt::WTextArea
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WTextArea [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WTextArea
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WTextArea [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WTextArea(WContainerWidget *parent=0)Wt::WTextArea
WTextArea(const WString &content, WContainerWidget *parent=0)Wt::WTextArea
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea.html new file mode 100644 index 0000000..3e28e74 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea.html @@ -0,0 +1,389 @@ + + + + +Wt: Wt::WTextArea Class Reference + + + + + + + + + +
+ +
+

Wt::WTextArea Class Reference

+
+
+ +

A widget that provides a multi-line edit. +More...

+ +

#include <Wt/WTextArea>

+
+Inheritance diagram for Wt::WTextArea:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTextArea (WContainerWidget *parent=0)
 Creates a text area with empty content and optional parent.
WTextArea (const WString &content, WContainerWidget *parent=0)
 Creates a text area with given content and optional parent.
void setColumns (int cols)
 Sets the number of columns.
void setRows (int rows)
 Sets the number of rows.
int columns () const
 Returns the number of columns.
int rows () const
 Returns the number of rows.
+const WStringtext () const
 Returns the current content.
virtual void setText (const WString &text)
 Sets the content of the text area.
int selectionStart () const
 Returns the current selection start.
WString selectedText () const
 Returns the currently selected text.
bool hasSelectedText () const
 Returns whether there is selected text.
int cursorPosition () const
 Returns the current cursor position.
+WValidator::State validate ()
 Validates the field.

+Protected Member Functions

virtual int boxPadding (Orientation orientation) const
 Returns the widget's built-in padding.
virtual int boxBorder (Orientation orientation) const
 Returns the widget's built-in border width.
+

Detailed Description

+

A widget that provides a multi-line edit.

+

To act upon text changes, connect a slot to the changed() signal. This signal is emitted when the user changed the content, and subsequently removes the focus from the line edit.

+

To act upon editing, connect a slot to the keyWentUp() signal.

+

At all times, the current content may be accessed with the text() method.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget();
+ Wt::WLabel *label = new Wt::WLabel("Comments:", w);
+ Wt::WTextArea *edit = new Wt::WTextArea("", w);
+ label->setBuddy(edit);
+

WTextArea is an inline widget.

+

CSS

+

The widget corresponds to an HTML <textarea> tag can be styled using inline or external CSS as appropriate. The emptyText style can be configured via .Wt-edit-emptyText.

+
See also:
WLineEdit
+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WTextArea::boxBorder (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in border width.

+

This is used by the layout managers to correct for a built-in border which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the border width (the default implementation returns 0).

+

For form widgets, the border width depends on the specific browser/platform combination, unless an explicit border is set for the widget.

+

When setting an explicit border for the widget using a style class, you will want to reimplement this method to return this border width, in case you want to set the widget inside a layout manager.

+
See also:
boxPadding()
+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::WTextEdit.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTextArea::boxPadding (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in padding.

+

This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).

+

For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.

+

When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.

+
See also:
boxBorder()
+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::WTextEdit.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WTextArea::columns ( ) const
+
+
+ +

Returns the number of columns.

+
See also:
setColumns()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WTextArea::cursorPosition ( ) const
+
+
+ +

Returns the current cursor position.

+

Returns -1 if the widget does not have the focus.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTextArea::hasSelectedText ( ) const
+
+
+ +

Returns whether there is selected text.

+
See also:
selectedtext()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WTextArea::rows ( ) const
+
+
+ +

Returns the number of rows.

+
See also:
setRows()
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WTextArea::selectedText ( ) const
+
+
+ +

Returns the currently selected text.

+

Returns an empty string if there is currently no selected text.

+
See also:
hasSelectedText()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WTextArea::selectionStart ( ) const
+
+
+ +

Returns the current selection start.

+

Returns -1 if there is no selected text.

+
See also:
hasSelectedText(), selectedText()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextArea::setColumns (int  cols )
+
+
+ +

Sets the number of columns.

+

The default value is 20.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextArea::setRows (int  rows )
+
+
+ +

Sets the number of rows.

+

The default value is 5.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextArea::setText (const WString text ) [virtual]
+
+
+ +

Sets the content of the text area.

+

The default text is "".

+ +

Reimplemented in Wt::WTextEdit.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.map new file mode 100644 index 0000000..a84936f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.md5 new file mode 100644 index 0000000..2883db7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.md5 @@ -0,0 +1 @@ +09c10f196ae9251081609817bc4a3893 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.png new file mode 100644 index 0000000..fa08c29 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextArea__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit-members.html new file mode 100644 index 0000000..cbe3e74 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit-members.html @@ -0,0 +1,241 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTextEdit Member List

+
+
+This is the complete list of members for Wt::WTextEdit, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
blurred()Wt::WFormWidget
boxBorder(Orientation orientation) const Wt::WTextEdit [protected, virtual]
boxPadding(Orientation orientation) const Wt::WTextEdit [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
changed()Wt::WFormWidget
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
clicked()Wt::WInteractWidget
columns() const Wt::WTextArea
cursorPosition() const Wt::WTextArea
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
doubleClicked()Wt::WInteractWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
emptyText()Wt::WFormWidget
enable()Wt::WWidget
enableAjax()Wt::WFormWidget [protected, virtual]
enterPressed()Wt::WInteractWidget
escapePressed()Wt::WInteractWidget
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
extraPlugins() const Wt::WTextEdit
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
focussed()Wt::WFormWidget
gestureChanged()Wt::WInteractWidget
gestureEnded()Wt::WInteractWidget
gestureStarted()Wt::WInteractWidget
getStateless(Method method)Wt::WFormWidget [protected, virtual]
hasFocus() const Wt::WFormWidget
hasSelectedText() const Wt::WTextArea
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WInteractWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isReadOnly() const Wt::WFormWidget
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
keyPressed()Wt::WInteractWidget
keyWentDown()Wt::WInteractWidget
keyWentUp()Wt::WInteractWidget
label() const Wt::WFormWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WInteractWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
mouseDragged()Wt::WInteractWidget
mouseMoved()Wt::WInteractWidget
mouseWentDown()Wt::WInteractWidget
mouseWentOut()Wt::WInteractWidget
mouseWentOver()Wt::WInteractWidget
mouseWentUp()Wt::WInteractWidget
mouseWheel()Wt::WInteractWidget
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WFormWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WTextEdit [virtual]
rows() const Wt::WTextArea
selected()Wt::WFormWidget
selectedText() const Wt::WTextArea
selectionStart() const Wt::WTextArea
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setColumns(int cols)Wt::WTextArea
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setDraggable(const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)Wt::WInteractWidget
setEmptyText(const WString &emptyText)Wt::WFormWidget
setEnabled(bool enabled)Wt::WFormWidget
setExtraPlugins(const std::string &plugins)Wt::WTextEdit
setFloatSide(Side s)Wt::WWebWidget [virtual]
setFocus()Wt::WFormWidget
setFocus(bool focus)Wt::WFormWidget
setHidden(bool hidden)Wt::WFormWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setReadOnly(bool readOnly)Wt::WFormWidget
setRows(int rows)Wt::WTextArea
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setStyleSheet(const std::string &uri)Wt::WTextEdit
setTabIndex(int index)Wt::WFormWidget [virtual]
setText(const WString &text)Wt::WTextEdit [virtual]
setToolBar(int i, const std::string &config)Wt::WTextEdit
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setValidator(WValidator *validator)Wt::WFormWidget
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
styleSheet() const Wt::WTextEdit
tabIndex() const Wt::WFormWidget [virtual]
text() const Wt::WTextArea
toolBar(int i)Wt::WTextEdit
toolTip() const Wt::WWebWidget [virtual]
touchEnded()Wt::WInteractWidget
touchMoved()Wt::WInteractWidget
touchStarted()Wt::WInteractWidget
tr(const char *key)Wt::WWidget [static]
validate()Wt::WTextArea [virtual]
validator() const Wt::WFormWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
WFormWidget(WContainerWidget *parent=0)Wt::WFormWidget
width() const Wt::WWebWidget [virtual]
WInteractWidget(WContainerWidget *parent=0)Wt::WInteractWidget
WObject(WObject *parent=0)Wt::WObject
WTextArea(WContainerWidget *parent=0)Wt::WTextArea
WTextArea(const WString &content, WContainerWidget *parent=0)Wt::WTextArea
WTextEdit(WContainerWidget *parent=0)Wt::WTextEdit
WTextEdit(const WString &text, WContainerWidget *parent=0)Wt::WTextEdit
Wt::WWebWidget::WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WFormWidget()Wt::WFormWidget
~WObject()Wt::WObject [virtual]
~WTextEdit()Wt::WTextEdit
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit.html new file mode 100644 index 0000000..8f7c46a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit.html @@ -0,0 +1,428 @@ + + + + +Wt: Wt::WTextEdit Class Reference + + + + + + + + + +
+ +
+

Wt::WTextEdit Class Reference

+
+
+ +

A rich-text XHTML editor. +More...

+ +

#include <Wt/WTextEdit>

+
+Inheritance diagram for Wt::WTextEdit:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTextEdit (WContainerWidget *parent=0)
 Creates a new text editor.
 WTextEdit (const WString &text, WContainerWidget *parent=0)
 Creates a new text editor and initialize with given text.
~WTextEdit ()
 Destructor.
virtual void setText (const WString &text)
 Sets the content.
void setStyleSheet (const std::string &uri)
 Sets the stylesheet for displaying the content.
const std::string & styleSheet () const
 Returns the content stylesheet.
void setExtraPlugins (const std::string &plugins)
 Loads additional TinyMCE plugins.
const std::string & extraPlugins () const
 Returns the extra plugins.
void setToolBar (int i, const std::string &config)
 Configures a tool bar.
const std::string & toolBar (int i)
 Returns a tool bar configuration.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.

+Protected Member Functions

virtual int boxPadding (Orientation orientation) const
 Returns the widget's built-in padding.
virtual int boxBorder (Orientation orientation) const
 Returns the widget's built-in border width.
+

Detailed Description

+

A rich-text XHTML editor.

+

The editor provides interactive editing of XHTML text. By default it provides basic mark-up (font, formatting, color, links, and lists), but additional buttons may be added to the tool bars that add additional formatting options.

+

The implementation is based on TinyMCE. The widget may be configured and tailored using the setExtraPlugins() and setToolBar() methods that provide direct access to the underlying TinyMCE component.

+

To use this widget, you need to download TinyMCE (version 3.0.7 or later) and deploy the tinymce/jscripts/tiny_mce folder to tinyMCEURL. The default value for tinyMCEURL is resourcesURL/tiny_mce, where resourcesURL is the configuration property that locates the Wt resources/ folder (i.e., we assume by default that you copy the tiny_mce folder to the resources/ folder), see also deployment and resources.

+

The value may be overridden with a URL that points to the directory where the tiny_mce folder is located, by configuring the tinyMCEURL property in your Wt configuration file, see configuration properties.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget();
+ Wt::WLabel *label = new Wt::WLabel("Comments:", w);
+ Wt::WTextEdit *edit = new Wt::WTextEdit("", w);
+ label->setBuddy(edit);
+

CSS

+

Styling through CSS is not applicable.

+
+WTextEdit-1.png +

Default configuration of a WTextEdit

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WTextEdit::WTextEdit (const WString text,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a new text editor and initialize with given text.

+

The text should be valid XHTML.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
int Wt::WTextEdit::boxBorder (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in border width.

+

This is used by the layout managers to correct for a built-in border which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the border width (the default implementation returns 0).

+

For form widgets, the border width depends on the specific browser/platform combination, unless an explicit border is set for the widget.

+

When setting an explicit border for the widget using a style class, you will want to reimplement this method to return this border width, in case you want to set the widget inside a layout manager.

+
See also:
boxPadding()
+ +

Reimplemented from Wt::WTextArea.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTextEdit::boxPadding (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in padding.

+

This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).

+

For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.

+

When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.

+
See also:
boxBorder()
+ +

Reimplemented from Wt::WTextArea.

+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WTextEdit::extraPlugins ( ) const
+
+
+ +

Returns the extra plugins.

+
See also:
setExtraPlugins()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTextEdit::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextEdit::setExtraPlugins (const std::string &  plugins )
+
+
+ +

Loads additional TinyMCE plugins.

+

Wt loads by default only the plugin 'safari' (which adds support for the Safari web browser). Use this method to load additional plugins. Multiple plugins may be specified as a comma separated list.

+

The various plugins are described in the TinyMCE documentation.

+
Note:
Plugins can only be loaded before the initial display of the widget.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextEdit::setStyleSheet (const std::string &  uri )
+
+
+ +

Sets the stylesheet for displaying the content.

+

The content is rendered using the rules defined in this stylesheet. The stylesheet is also used to derive additional styles that are available in the text editor, for example in the "styleselect" button.

+

Multiple stylesheets may be specified as a comma separated list.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTextEdit::setText (const WString text ) [virtual]
+
+
+ +

Sets the content.

+

The text should be valid XHTML.

+

The default value is "".

+ +

Reimplemented from Wt::WTextArea.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTextEdit::setToolBar (int  i,
const std::string &  config 
)
+
+
+ +

Configures a tool bar.

+

This configures the buttons for the i'th tool bar (with 0 <= i <= 3).

+

The syntax and available buttons is documented in the TinyMCE documentation.

+

The default config for the first tool bar (i = 0) is: "fontselect, |, bold, italic, underline, |, fontsizeselect, |, forecolor, backcolor, |, justifyleft, justifycenter, justifyright, justifyfull, |, anchor, |, numlist, bullist".

+

By default, the other three tool bars are disabled (config = "").

+

Note that some buttons are only available after loading extra plugins using setExtraPlugins().

+
Note:
The tool bar configuration can only be set before the initial display of the widget.
+ +
+
+ +
+
+ + + + + + + +
const std::string& Wt::WTextEdit::styleSheet ( ) const
+
+
+ +

Returns the content stylesheet.

+
See also:
setStyleSheet()
+ +
+
+ +
+
+ + + + + + + + +
const std::string& Wt::WTextEdit::toolBar (int  i )
+
+
+ +

Returns a tool bar configuration.

+
See also:
setToolBar()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.map new file mode 100644 index 0000000..318a1d3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.md5 new file mode 100644 index 0000000..c1cbea8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.md5 @@ -0,0 +1 @@ +63d063e281899867679af0e12159b956 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.png new file mode 100644 index 0000000..592b640 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTextEdit__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.map new file mode 100644 index 0000000..c5b1ba8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.md5 new file mode 100644 index 0000000..c2ae91c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.md5 @@ -0,0 +1 @@ +255435c72f2fa87fca14827cba3dc719 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.png new file mode 100644 index 0000000..7843262 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WText__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTime-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTime-members.html new file mode 100644 index 0000000..f1bfc50 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTime-members.html @@ -0,0 +1,102 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTime Member List

+
+
+This is the complete list of members for Wt::WTime, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
addMSecs(int ms) const Wt::WTime
addSecs(int s) const Wt::WTime
currentServerTime()Wt::WTime [static]
fromString(const WString &s)Wt::WTime [static]
fromString(const WString &s, const WString &format)Wt::WTime [static]
hour() const Wt::WTime
isNull() const Wt::WTime
isValid() const Wt::WTime
minute() const Wt::WTime
msec() const Wt::WTime
msecsTo(const WTime &t) const Wt::WTime
operator!=(const WTime &other) const Wt::WTime
operator<(const WTime &other) const Wt::WTime
operator<=(const WTime &other) const Wt::WTime
operator==(const WTime &other) const Wt::WTime
operator>(const WTime &other) const Wt::WTime
operator>=(const WTime &other) const Wt::WTime
second() const Wt::WTime
secsTo(const WTime &t) const Wt::WTime
setHMS(int h, int m, int s, int ms=0)Wt::WTime
toString() const Wt::WTime
toString(const WString &format) const Wt::WTime
WTime()Wt::WTime
WTime(int h, int m, int s=0, int ms=0)Wt::WTime
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTime.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTime.html new file mode 100644 index 0000000..30cfb02 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTime.html @@ -0,0 +1,524 @@ + + + + +Wt: Wt::WTime Class Reference + + + + + + + + + +
+ +
+

Wt::WTime Class Reference

+
+
+ +

A clock time. +More...

+ +

#include <Wt/WTime>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WTime ()
 Construct a Null time.
 WTime (int h, int m, int s=0, int ms=0)
 Construct a time given hour, minutes, seconds, and milliseconds.
bool setHMS (int h, int m, int s, int ms=0)
 Sets the time.
WTime addSecs (int s) const
 Adds seconds.
WTime addMSecs (int ms) const
 Adds milliseconds.
bool isNull () const
 Returns if this time is Null.
+bool isValid () const
 Returns if this time is valid.
+int hour () const
 Returns the hour (0-23).
+int minute () const
 Returns the minutes (0-59).
+int second () const
 Returns the seconds (0-59).
+int msec () const
 Returns the milliseconds (0-999)
int secsTo (const WTime &t) const
 Returns the difference between to time values (in seconds).
int msecsTo (const WTime &t) const
 Returns the difference between to time values (in milliseconds).
+bool operator< (const WTime &other) const
 Compares two time values.
+bool operator<= (const WTime &other) const
 Compares two time values.
+bool operator> (const WTime &other) const
 Compares two time values.
+bool operator>= (const WTime &other) const
 Compares two time values.
+bool operator== (const WTime &other) const
 Compares two time values.
+bool operator!= (const WTime &other) const
 Compares two time values.
WString toString () const
 Formats this time to a string using a default format.
WString toString (const WString &format) const
 Formats this time to a string using a specified format.

+Static Public Member Functions

static WTime fromString (const WString &s)
 Parses a string to a time using a default format.
static WTime fromString (const WString &s, const WString &format)
 Parses a string to a time using a specified format.
static WTime currentServerTime ()
 Reports the current server time.
+

Detailed Description

+

A clock time.

+

A clock time represents the time of day (0 to 24 hour), up to millisecond precision.

+
See also:
WDate, WDateTime
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WTime::WTime ( )
+
+
+ +

Construct a Null time.

+

A time for which isNull() returns true. A Null time is also invalid.

+
See also:
isValid(), isNull()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WTime::WTime (int  h,
int  m,
int  s = 0,
int  ms = 0 
)
+
+
+ +

Construct a time given hour, minutes, seconds, and milliseconds.

+

h has range 0-23, m and s have range 0-59, and ms has range 0-999.

+

When the time is invalid, isValid() is set to false.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WTime Wt::WTime::addMSecs (int  ms ) const
+
+
+ +

Adds milliseconds.

+

Returns a time that is ms milliseconds later than this time. Negative values for ms will result in a time that is as many milliseconds earlier.

+ +
+
+ +
+
+ + + + + + + + +
WTime Wt::WTime::addSecs (int  s ) const
+
+
+ +

Adds seconds.

+

Returns a time that is s seconds later than this time. Negative values for s will result in a time that is as many seconds earlier.

+ +
+
+ +
+
+ + + + + + + +
WTime Wt::WTime::currentServerTime ( ) [static]
+
+
+ +

Reports the current server time.

+

This method returns the time as indicated by the system clock of the server.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WTime Wt::WTime::fromString (const WString s,
const WString format 
) [static]
+
+
+ +

Parses a string to a time using a specified format.

+

The format follows the same syntax as used by toString(const WString& format).

+

When the time could not be parsed or is not valid, an invalid time is returned (for which isValid() returns false).

+
See also:
toString(const WString&) const
+ +
+
+ +
+
+ + + + + + + + +
WTime Wt::WTime::fromString (const WString s ) [static]
+
+
+ +

Parses a string to a time using a default format.

+

The default format is "hh:mm:ss". For example, a time specified as:

+
   "22:55:15"
+

will be parsed as a time that equals a time constructed as:

+
   WTime d(22,55,15);
+

When the time could not be parsed or is not valid, an invalid time is returned (for which isValid() returns false).

+
See also:
fromString(const WString& s, const WString& format), isValid()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTime::isNull ( ) const
+
+
+ +

Returns if this time is Null.

+

A null time is also invalid.

+
See also:
isValid(), WTime()
+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTime::msecsTo (const WTime t ) const
+
+
+ +

Returns the difference between to time values (in milliseconds).

+

This returns a value between -86400000 ms and 86400000 ms.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WTime::secsTo (const WTime t ) const
+
+
+ +

Returns the difference between to time values (in seconds).

+

This returns a value between -86400 s and 86400 s.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Wt::WTime::setHMS (int  h,
int  m,
int  s,
int  ms = 0 
)
+
+
+ +

Sets the time.

+

h has range 0-23, m and s have range 0-59, and ms has range 0-999.

+

When the time is invalid, isValid() is set to false.

+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WTime::toString (const WString format ) const
+
+
+ +

Formats this time to a string using a specified format.

+

The format is a string in which the following contents has a special meaning.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeMeaning Example (for 14:06:23.045)
hThe hour without leading zero (0-23 or 1-12 for AM/PM display) 14 or 2
hhThe hour with leading zero (00-23 or 01-12 for AM/PM display) 14 or 02
HThe hour without leading zero (0-23) 14
HHThe hour with leading zero (00-23) 14
mThe minutes without leading zero (0-59) 6
mmThe minutes with leading zero (00-59) 06
sThe seconds without leading zero (0-59) 23
ssThe seconds with leading zero (00-59) 23
zThe milliseconds without leading zero (0-999) 45
zzzThe millisecons with leading zero (000-999) 045
AP or Ause AM/PM display: affects h or hh display and is replaced itself by AM/PM PM
ap or ause am/pm display: affects h or hh display and is replaced itself by am/pm pm
+

Any other text is kept literally. String content between single quotes (') are not interpreted as special codes. Inside a string, a literal quote may be specifed using a double quote ('').

+

Examples of format and result:

+ + + + + + + +
FormatResult (for 22:53:13.078)
hh:mm:ss.zzz22:53:13.078
hh:mm:ss AP10:53:13 PM
+
See also:
fromString(const WString& value, const WString& format)
+ +
+
+ +
+
+ + + + + + + +
WString Wt::WTime::toString ( ) const
+
+
+ +

Formats this time to a string using a default format.

+

The default format is "hh:mm:ss".

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer-members.html new file mode 100644 index 0000000..1485753 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer-members.html @@ -0,0 +1,107 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTimer Member List

+
+
+This is the complete list of members for Wt::WTimer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
interval() const Wt::WTimer
isActive() const Wt::WTimer
isSingleShot() const Wt::WTimer
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setInterval(int msec)Wt::WTimer
setObjectName(const std::string &name)Wt::WObject
setSingleShot(bool singleShot)Wt::WTimer
singleShot(int msec, T *receiver, void(V::*method)())Wt::WTimer [static]
singleShot(int msec, const F &f)Wt::WTimer [static]
start()Wt::WTimer
stop()Wt::WTimer
timeout()Wt::WTimer
WObject(WObject *parent=0)Wt::WObject
WTimer(WObject *parent=0)Wt::WTimer
~WObject()Wt::WObject [virtual]
~WTimer()Wt::WTimer
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer.html new file mode 100644 index 0000000..b3e5098 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer.html @@ -0,0 +1,303 @@ + + + + +Wt: Wt::WTimer Class Reference + + + + + + + + + +
+ +
+

Wt::WTimer Class Reference

+
+
+ +

A utility class which provides timer signals and single-shot timers. +More...

+ +

#include <Wt/WTimer>

+
+Inheritance diagram for Wt::WTimer:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTimer (WObject *parent=0)
 Construct a new timer with the given parent.
~WTimer ()
 Destuctor.
+int interval () const
 Returns the interval (msec).
+void setInterval (int msec)
 Sets the interval (msec).
+bool isActive () const
 Returns if the timer is running.
+bool isSingleShot () const
 Is this timer set to fire only once.
void setSingleShot (bool singleShot)
 Configures this timer to fire only once.
void start ()
 Starts the timer.
void stop ()
 Stops the timer.
EventSignal< WMouseEvent > & timeout ()
 Signal emitted when the timer timeouts.

+Static Public Member Functions

template<class T , class V >
static void singleShot (int msec, T *receiver, void(V::*method)())
 This static function calls a slot after a given time interval.
template<class F >
static void singleShot (int msec, const F &f)
 This static function calls a function after a given time interval.
+

Detailed Description

+

A utility class which provides timer signals and single-shot timers.

+

To use a timer, create a WTimer instance, set the timer interval using setInterval() and connect a slot to the timeout signal. Then, start the timer using start(). An active timer may be cancelled at any time using stop().

+

By default, a timer will continue to generate events until you stop() it. To create a timer that will fire only once, use setSingleShot(). There is also a convience static method singleShot().

+

When connecting stateless slot implementations to the timeout signal, these stateless slot implementations will be used as for any other signal (when Ajax is available).

+

In clients without (enabled) JavaScript support, the minimum resolution of the timer is one second (1000 milli-seconds), and it is probably wise to use timers sparingly.

+

A WTimer is only usable inside of a Wt event loop. If you want to create a timer outside the Wt event loop, take a look at asio deadline_timer.

+

Timers are one way to provide updates of a web page without the user generating an event. Alternatively you may consider server-initiated updates, see WApplication::enableUpdates().

+

Usage example:

+
 // setup a timer which calls MyClass::timeout() every 2 seconds, until timer->stop() is called.
+ Wt::WTimer *timer = new Wt::WTimer();
+ timer->setInterval(2000);
+ timer->timeout().connect(this, &MyClass::timeout);
+ timer->start();
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WTimer::setSingleShot (bool  singleShot )
+
+
+ +

Configures this timer to fire only once.

+

A Timer is by default not single shot, and will fire continuously, until it is stopped.

+
See also:
singleShot()
+ +
+
+ +
+
+
+template<class F >
+ + + + + + + + + + + + + + + + + + +
void Wt::WTimer::singleShot (int  msec,
const F &  f 
) [static]
+
+
+ +

This static function calls a function after a given time interval.

+

This variant of the overloaded singleShot() method supports a template function object (which supports operator ()).

+ +
+
+ +
+
+
+template<class T , class V >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTimer::singleShot (int  msec,
T *  receiver,
void(V::*)()  method 
) [static]
+
+
+ +

This static function calls a slot after a given time interval.

+

For example, the following code will call this->doSome() after 2 seconds:

+
   WTimer::singleShot(2000, this, &MyClass::doSome);
+
+
+
+ +
+
+ + + + + + + +
void Wt::WTimer::start ( )
+
+
+ +

Starts the timer.

+

The timer will be isActive(), until either the interval has elapsed, after which the timeout signal is activated, or until stop() is called.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WTimer::stop ( )
+
+
+ +

Stops the timer.

+

You may stop the timer during its timeout(), or cancel a running timer at any other time.

+
See also:
start()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WTimer::timeout ( )
+
+
+ +

Signal emitted when the timer timeouts.

+

The WMouseEvent does not provide any meaningful information but is an implementation artefact.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.map new file mode 100644 index 0000000..eb73cd3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.md5 new file mode 100644 index 0000000..4496e76 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.md5 @@ -0,0 +1 @@ +3071137ae283a9ea94c432c115dbd7b6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.png new file mode 100644 index 0000000..b79df44 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTimer__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent-members.html new file mode 100644 index 0000000..6dc06fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent-members.html @@ -0,0 +1,82 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTouchEvent Member List

+
+
+This is the complete list of members for Wt::WTouchEvent, including all inherited members. + + + + +
changedTouches() const Wt::WTouchEvent
targetTouches() const Wt::WTouchEvent
touches() const Wt::WTouchEvent
WTouchEvent()Wt::WTouchEvent
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent.html new file mode 100644 index 0000000..40adf42 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTouchEvent.html @@ -0,0 +1,114 @@ + + + + +Wt: Wt::WTouchEvent Class Reference + + + + + + + + + +
+ +
+

Wt::WTouchEvent Class Reference
+ +[Signal/slot system] +

+
+
+ +

A class providing details for a touch event. +More...

+ +

#include <Wt/WEvent>

+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

WTouchEvent ()
 Default constructor.
+const std::vector< Touch > & touches () const
 Returns a list of Touch objects for every finger currently touching the screen.
+const std::vector< Touch > & targetTouches () const
 Returns a list of Touch objects for finger touches that started out within the same widget.
+const std::vector< Touch > & changedTouches () const
 Returns a list of Touch objects for every finger involved in the event.
+

Detailed Description

+

A class providing details for a touch event.

+
See also:
WInteractWidget::touchStarted(), WInteractWidget::touchMoved(), WInteractWidget::touchEnded()
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform-members.html new file mode 100644 index 0000000..6e93723 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform-members.html @@ -0,0 +1,111 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTransform Member List

+
+
+This is the complete list of members for Wt::WTransform, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjoint() const Wt::WTransform
decomposeTranslateRotateScaleRotate(TRSRDecomposition &result) const Wt::WTransform
decomposeTranslateRotateScaleSkew(TRSSDecomposition &result) const Wt::WTransform
degreesToRadians(double angle)Wt::WTransform [static]
determinant() const Wt::WTransform
dx() const Wt::WTransform
dy() const Wt::WTransform
inverted() const Wt::WTransform
isIdentity() const Wt::WTransform
m11() const Wt::WTransform
m12() const Wt::WTransform
m13() const Wt::WTransform
m21() const Wt::WTransform
m22() const Wt::WTransform
m23() const Wt::WTransform
m31() const Wt::WTransform
m32() const Wt::WTransform
m33() const Wt::WTransform
map(const WPointF &p) const Wt::WTransform
map(double x, double y, double *tx, double *ty) const Wt::WTransform
operator!=(const WTransform &rhs) const Wt::WTransform
operator*(const WTransform &rhs) const Wt::WTransform
operator*=(const WTransform &rhs)Wt::WTransform
operator=(const WTransform &rhs)Wt::WTransform
operator==(const WTransform &rhs) const Wt::WTransform
reset()Wt::WTransform
rotate(double angle)Wt::WTransform
rotateRadians(double angle)Wt::WTransform
scale(double sx, double sy)Wt::WTransform
shear(double sh, double sv)Wt::WTransform
translate(double dx, double dy)Wt::WTransform
WTransform()Wt::WTransform
WTransform(double m11, double m12, double m21, double m22, double dx, double dy)Wt::WTransform
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform.html new file mode 100644 index 0000000..0fe6180 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTransform.html @@ -0,0 +1,713 @@ + + + + +Wt: Wt::WTransform Class Reference + + + + + + + + + +
+ +
+

Wt::WTransform Class Reference
+ +[Painting system] +

+
+
+ +

A 2D affine transformation matrix. +More...

+ +

#include <Wt/WTransform>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  TRSRDecomposition
 Result of a TRSR decomposition. More...
struct  TRSSDecomposition
 Result of a TRSS decomposition. More...

+Public Member Functions

 WTransform ()
 Default constructor.
 WTransform (double m11, double m12, double m21, double m22, double dx, double dy)
 Construct a custom matrix by specifying the parameters.
WTransformoperator= (const WTransform &rhs)
 Assignment operator.
bool operator== (const WTransform &rhs) const
 Comparison operator.
bool operator!= (const WTransform &rhs) const
 Comparison operator.
bool isIdentity () const
 Identity check.
+double m11 () const
 Returns the horizontal scaling factor.
+double m12 () const
 Returns the vertical shearing factor.
+double m13 () const
 Returns m13 = 0.
+double m21 () const
 Returns the horizontal shearing factor.
+double m22 () const
 Returns the vertical scaling factor.
+double m23 () const
 Returns m23 = 0.
double m31 () const
 Returns the horizontal translation factor.
double m32 () const
 Returns the vertical translation factor.
+double m33 () const
 Returns m33 = 1.
double dx () const
 Returns the horizontal translation factor.
double dy () const
 Returns the vertical translation factor.
WPointF map (const WPointF &p) const
 Applys the transformation to a point.
void map (double x, double y, double *tx, double *ty) const
 Applys the transformation to a point.
void reset ()
 Resets the transformation to the identity.
WTransformrotate (double angle)
 Rotates the transformation.
WTransformrotateRadians (double angle)
 Rotates the transformation.
WTransformscale (double sx, double sy)
 Scales the transformation.
WTransformshear (double sh, double sv)
 Shears the transformation.
WTransformtranslate (double dx, double dy)
 Translates the transformation.
+WTransformoperator*= (const WTransform &rhs)
 Adds a transform that is conceptually applied after this transform.
+WTransform operator* (const WTransform &rhs) const
 Multiply 2 transform objects.
+double determinant () const
 Returns the determinant.
+WTransform adjoint () const
 Returns the adjoint.
WTransform inverted () const
 Returns the inverted transformation.
void decomposeTranslateRotateScaleSkew (TRSSDecomposition &result) const
 Decomposes the transformation.
void decomposeTranslateRotateScaleRotate (TRSRDecomposition &result) const
 Decomposes the transformation.

+Static Public Member Functions

+static double degreesToRadians (double angle)
 Utility method to convert degrees to radians.
+

Detailed Description

+

A 2D affine transformation matrix.

+

The matrix is encoded using 6 parameters:

+
 m11  m12   0
+ m21  m22   0
+ dx   dy    1
+

In this representation, dx() (= m31()) and dy() (= m32()) represent the translation components, and mxy represent a 2D matrix that contains the scale, rotation (and skew) components.

+

The transformation is used to represent a tansformed coordinate system, and provides methods to rotate(), scale(), shear() or translate() this coordinate system.

+

There are also 2 methods to decompose an arbitrary matrix into elementary operations:

+ +

with T a translation, R a rotation, Sxx a scale, and Sxy a skew component.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WTransform::WTransform ( )
+
+
+ +

Default constructor.

+

Creates the identity transformation matrix.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WTransform::WTransform (double  m11,
double  m12,
double  m21,
double  m22,
double  dx,
double  dy 
)
+
+
+ +

Construct a custom matrix by specifying the parameters.

+

Creates a matrix from the specified parameters.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WTransform::decomposeTranslateRotateScaleRotate (TRSRDecomposition result ) const
+
+
+ +

Decomposes the transformation.

+

Decomposes the transformation into elementary operations: translation (dx, dy), followed by rotation (alpha2), followed by scale (sx, sy) and again a rotation (alpha2). The angles are expressed in radians.

+

This performs a Singular Value Decomposition (SVD).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTransform::decomposeTranslateRotateScaleSkew (TRSSDecomposition result ) const
+
+
+ +

Decomposes the transformation.

+

Decomposes the transformation into elementary operations: translation (dx, dy), followed by rotation (alpha), followed by scale (sx, sy) and vertical shearing factor (sh). The angle is expressed in radians.

+

This performs a Gram-Schmidt orthonormalization.

+ +
+
+ +
+
+ + + + + + + +
double Wt::WTransform::dx ( ) const
+
+
+ +

Returns the horizontal translation factor.

+

Is equivalent to m31()

+ +
+
+ +
+
+ + + + + + + +
double Wt::WTransform::dy ( ) const
+
+
+ +

Returns the vertical translation factor.

+

Is equivalent to m32()

+ +
+
+ +
+
+ + + + + + + +
WTransform Wt::WTransform::inverted ( ) const
+
+
+ +

Returns the inverted transformation.

+

Returns this if the transformation could not be inverted (determinant() == 0), and logs an error instead.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTransform::isIdentity ( ) const
+
+
+ +

Identity check.

+

Returns true if the transform represents an identity transformation.

+ +
+
+ +
+
+ + + + + + + +
double Wt::WTransform::m31 ( ) const
+
+
+ +

Returns the horizontal translation factor.

+

Is equivalent to dx()

+ +
+
+ +
+
+ + + + + + + +
double Wt::WTransform::m32 ( ) const
+
+
+ +

Returns the vertical translation factor.

+

Is equivalent to dy()

+ +
+
+ +
+
+ + + + + + + + +
WPointF Wt::WTransform::map (const WPointF p ) const
+
+
+ +

Applys the transformation to a point.

+

Returns the transformed point.

+
See also:
map(double x, double y, double *tx, double *ty) const
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WTransform::map (double  x,
double  y,
double *  tx,
double *  ty 
) const
+
+
+ +

Applys the transformation to a point.

+

Sets the point (tx, ty) to the transformation of the point (x, y).

+
See also:
map(const WPointF&) const
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WTransform::operator!= (const WTransform rhs ) const
+
+
+ +

Comparison operator.

+

Returns true if the transforms are different.

+ +
+
+ +
+
+ + + + + + + + +
WTransform & Wt::WTransform::operator= (const WTransform rhs )
+
+
+ +

Assignment operator.

+

Copies the transformation from the rhs.

+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WTransform::operator== (const WTransform rhs ) const
+
+
+ +

Comparison operator.

+

Returns true if the transforms are exactly the same.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WTransform::reset ( )
+
+
+ +

Resets the transformation to the identity.

+
See also:
isIdentity(), WTransform()
+ +
+
+ +
+
+ + + + + + + + +
WTransform & Wt::WTransform::rotate (double  angle )
+
+
+ +

Rotates the transformation.

+

Applies a clock-wise rotation to the current transformation matrix, over angle degrees.

+
See also:
rotateRadians()
+ +
+
+ +
+
+ + + + + + + + +
WTransform & Wt::WTransform::rotateRadians (double  angle )
+
+
+ +

Rotates the transformation.

+

Applies a clock-wise rotation to the current transformation matrix, over angle radians.

+
See also:
rotate()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WTransform & Wt::WTransform::scale (double  sx,
double  sy 
)
+
+
+ +

Scales the transformation.

+

Applies a clock-wise rotation to the current transformation matrix, over angle radians.

+
See also:
shear()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WTransform & Wt::WTransform::shear (double  sh,
double  sv 
)
+
+
+ +

Shears the transformation.

+

Shears the current transformation.

+
See also:
scale(), rotate()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WTransform & Wt::WTransform::translate (double  dx,
double  dy 
)
+
+
+ +

Translates the transformation.

+

Translates the current transformation.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTree-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree-members.html new file mode 100644 index 0000000..7704f38 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree-members.html @@ -0,0 +1,189 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTree Member List

+
+
+This is the complete list of members for Wt::WTree, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSelection()Wt::WTree
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelected(WTreeNode *node) const Wt::WTree
isVisible() const Wt::WCompositeWidget [virtual]
itemSelectionChanged()Wt::WTree
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
select(const WTreeNodeSet &nodes)Wt::WTree
select(WTreeNode *node, bool selected=true)Wt::WTree
selectedNodes() const Wt::WTree
selectionMode() const Wt::WTree
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setSelectionMode(SelectionMode mode)Wt::WTree
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setTreeRoot(WTreeNode *root)Wt::WTree
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
treeRoot() const Wt::WTree
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTree(WContainerWidget *parent=0)Wt::WTree
WTreeNodeSet typedefWt::WTree
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTree.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree.html new file mode 100644 index 0000000..3524528 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree.html @@ -0,0 +1,243 @@ + + + + +Wt: Wt::WTree Class Reference + + + + + + + + + +
+ +
+

Wt::WTree Class Reference

+
+
+ +

A widget that represents a navigatable tree. +More...

+ +

#include <Wt/WTree>

+
+Inheritance diagram for Wt::WTree:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef std::set< WTreeNode * > WTreeNodeSet
 Typedef for a set of WTreeNode's.

+Public Member Functions

WTree (WContainerWidget *parent=0)
 Creates a new tree.
void setTreeRoot (WTreeNode *root)
 Sets the tree root node.
WTreeNodetreeRoot () const
 Returns the root node.
void setSelectionMode (SelectionMode mode)
 Sets the selection mode.
+SelectionMode selectionMode () const
 Returns the selection mode.
+const WTreeNodeSetselectedNodes () const
 Returns the set of selected tree nodes.
+void select (const WTreeNodeSet &nodes)
 Sets a selection of tree nodes.
+void select (WTreeNode *node, bool selected=true)
 Selects or unselect the given node.
+bool isSelected (WTreeNode *node) const
 Returns if the given node is currently selected.
+void clearSelection ()
 Clears the current selection.
+SignalitemSelectionChanged ()
 Signal that is emitted when the selection changes.
+

Detailed Description

+

A widget that represents a navigatable tree.

+

WTree provides a tree widget, and coordinates selection functionality.

+

Unlike the MVC-based WTreeView, the tree renders a widget hierarchy, rather than a hierarhical standard model. This provides extra flexibility (as any widget can be used as contents), at the cost of server-side, client-side and bandwidth resources (especially for large tree tables).

+

The tree is implemented as a hierarchy of WTreeNode widgets.

+

Selection is rendered by calling WTreeNode::renderSelected(bool). Only tree nodes that are selectable may participate in the selection.

+

Usage example:

+
 Wt::WIconPair *folderIcon = new Wt::WIconPair("icons/yellow-folder-closed.png",
+                                               "icons/yellow-folder-open.png", false);
+
+ Wt::WTree *tree = new Wt::WTree();
+ tree->setSelectionMode(Wt::SingleSelection);
+
+ Wt::WTreeNode *root = new Wt::WTreeNode("Tree root", folderIcon);
+ root->setStyleClass("example-tree");
+ tree->setTreeRoot(root);
+ root->label()->setTextFormat(Wt::PlainText);
+ root->setImagePack("resources/");
+ root->setLoadPolicy(Wt::WTreeNode::NextLevelLoading);
+ root->addChildNode(new Wt::WTreeNode("one"));
+ root->addChildNode(new Wt::WTreeNode("two"));
+
+ Wt::WTreeNode *three = new Wt::WTreeNode("three");
+ three->addChildNode(new WTreeNode("three: one"));
+ three->addChildNode(new WTreeNode("three: two"));
+ root->addChildNode(three);
+
+ root->expand();
+

CSS

+

The tree is styled by the current CSS theme. The look can be overridden using the Wt-tree CSS class. The style selectors that affect the rendering of the decoration of the nodes are indicated in the documentation for WTreeNode. In addition, the following selector may be used to style the header:

+
+.Wt-tree .Wt-selected : selected item
+

A screenshot of the tree:

+ + + +
+WTree-default-1.png +

An example WTree (default)

+
+WTree-polished-1.png +

An example WTree (polished)

+
+
See also:
WTreeNode, WTreeTable, WTreeView
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WTree::setSelectionMode (SelectionMode  mode )
+
+
+ +

Sets the selection mode.

+

The default selection mode is Wt::NoSelection.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTree::setTreeRoot (WTreeNode root )
+
+
+ +

Sets the tree root node.

+
See also:
treeRoot()
+ +
+
+ +
+
+ + + + + + + +
WTreeNode* Wt::WTree::treeRoot ( ) const
+
+
+ +

Returns the root node.

+
See also:
setTreeRoot(WTreeNode *)
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode-members.html new file mode 100644 index 0000000..6237abe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode-members.html @@ -0,0 +1,223 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTreeNode Member List

+
+
+This is the complete list of members for Wt::WTreeNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addChildNode(WTreeNode *node)Wt::WTreeNode
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
ChildCountPolicy enum nameWt::WTreeNode
childCountPolicy() const Wt::WTreeNode
childNodes() const Wt::WTreeNode
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
collapse()Wt::WTreeNode
collapsed()Wt::WTreeNode
decorationStyle()Wt::WCompositeWidget [virtual]
descendantAdded(WTreeNode *node)Wt::WTreeNode [protected, virtual]
descendantRemoved(WTreeNode *node)Wt::WTreeNode [protected, virtual]
disable()Wt::WWidget
Disabled enum valueWt::WTreeNode
displayedChildCount() const Wt::WTreeNode [virtual]
doCollapse()Wt::WTreeNode [protected, virtual]
doExpand()Wt::WTreeNode [protected, virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
Enabled enum valueWt::WTreeNode
expand()Wt::WTreeNode
expandable()Wt::WTreeNode [protected, virtual]
expanded()Wt::WTreeNode
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
imagePack() const Wt::WTreeNode [protected]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertChildNode(int index, WTreeNode *node)Wt::WTreeNode [virtual]
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isExpanded() const Wt::WTreeNode
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelectable() const Wt::WTreeNode [virtual]
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
label() const Wt::WTreeNode
labelArea()Wt::WTreeNode [protected]
labelIcon() const Wt::WTreeNode
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
Lazy enum valueWt::WTreeNode
LazyLoading enum valueWt::WTreeNode
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
LoadPolicy enum nameWt::WTreeNode
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
NextLevelLoading enum valueWt::WTreeNode
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
parentNode() const Wt::WTreeNode
populate()Wt::WTreeNode [protected, virtual]
populated() const Wt::WTreeNode [protected]
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
PreLoading enum valueWt::WTreeNode
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeChildNode(WTreeNode *node)Wt::WTreeNode
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
renderSelected(bool selected)Wt::WTreeNode [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
selected()Wt::WTreeNode
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setChildCountPolicy(ChildCountPolicy policy)Wt::WTreeNode
setChildrenDecorated(bool decorated)Wt::WTreeNode
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImagePack(const std::string &url)Wt::WTreeNode
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setInteractive(bool interactive)Wt::WTreeNode
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLabelIcon(WIconPair *labelIcon)Wt::WTreeNode
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setLoadPolicy(LoadPolicy loadPolicy)Wt::WTreeNode
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setNodeVisible(bool visible)Wt::WTreeNode
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WTreeNode [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
undoDoCollapse()Wt::WTreeNode [protected, virtual]
undoDoExpand()Wt::WTreeNode [protected, virtual]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTreeNode(const WString &labelText, WIconPair *labelIcon=0, WTreeNode *parentNode=0)Wt::WTreeNode
WTreeNode(WTreeNode *parentNode=0)Wt::WTreeNode [protected]
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WTreeNode()Wt::WTreeNode
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode.html new file mode 100644 index 0000000..d96bea8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode.html @@ -0,0 +1,970 @@ + + + + +Wt: Wt::WTreeNode Class Reference + + + + + + + + + +
+ +
+

Wt::WTreeNode Class Reference

+
+
+ +

A single node in a tree. +More...

+ +

#include <Wt/WTreeNode>

+
+Inheritance diagram for Wt::WTreeNode:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  LoadPolicy { LazyLoading, +PreLoading, +NextLevelLoading + }
 

An enumeration for the policy to load children.

+ More...
enum  ChildCountPolicy { Disabled, +Enabled, +Lazy + }
 

An enumeration for the policy to display the child count.

+ More...

+Public Member Functions

 WTreeNode (const WString &labelText, WIconPair *labelIcon=0, WTreeNode *parentNode=0)
 Creates a tree node with the given label.
~WTreeNode ()
 Destructor.
+WTextlabel () const
 Returns the label.
+WIconPairlabelIcon () const
 Returns the label icon.
+void setLabelIcon (WIconPair *labelIcon)
 Sets the label icon.
virtual void insertChildNode (int index, WTreeNode *node)
 Inserts a child node.
void addChildNode (WTreeNode *node)
 Adds a child node.
+void removeChildNode (WTreeNode *node)
 Removes a child node.
+const std::vector< WTreeNode * > & childNodes () const
 Returns the list of children.
virtual int displayedChildCount () const
 Returns the number of children that should be displayed.
void setChildCountPolicy (ChildCountPolicy policy)
 Configures how and when the child count should be displayed.
ChildCountPolicy childCountPolicy () const
 Returns the child count policy.
void setImagePack (const std::string &url)
 Sets the image pack for this (sub)tree (deprecated).
void setLoadPolicy (LoadPolicy loadPolicy)
 Sets the load policy for this tree.
+bool isExpanded () const
 Returns whether this node is expanded.
void setSelectable (bool selectable)
 Allows this node to be selected.
virtual bool isSelectable () const
 Returns if this node may be selected.
WTreeNodeparentNode () const
 Returns the parent node.
void setNodeVisible (bool visible)
 Sets the visibility of the node itself.
void setChildrenDecorated (bool decorated)
 Sets whether this node's children are decorated.
void setInteractive (bool interactive)
 Sets whether this node is interactive.
void expand ()
 Expands this node.
void collapse ()
 Collapses this node.
EventSignal< WMouseEvent > & expanded ()
 Signal emitted when the node is expanded by the user.
EventSignal< WMouseEvent > & collapsed ()
 Signal emitted when the node is collapsed by the user.
Signal< bool > & selected ()
 Signal that is emitted when the node is added or removed from the selection

+Protected Member Functions

 WTreeNode (WTreeNode *parentNode=0)
 Creates a tree node with empty labelArea().
WTableCelllabelArea ()
 Accesses the container widget that holds the label area.
virtual void populate ()
 Populates the node dynamically on loading.
bool populated () const
 Returns whether this node has already been populated.
virtual bool expandable ()
 Returns whether this node can be expanded.
virtual void renderSelected (bool selected)
 Renders the node to be selected.
std::string imagePack () const
 The image pack that is used for this tree node (deprecated).
virtual void descendantRemoved (WTreeNode *node)
 Reacts to the removal of a descendant node.
virtual void descendantAdded (WTreeNode *node)
 Reacts to the addition of a descendant node.
virtual void doExpand ()
 The actual expand.
virtual void doCollapse ()
 The actual collapse.
virtual void undoDoExpand ()
 Undo method for doCollapse() stateless implementation.
virtual void undoDoCollapse ()
 Undo method for doCollapse() stateless implementation.
+

Detailed Description

+

A single node in a tree.

+

A tree list is constructed by combining several tree node objects in a tree hierarchy, by passing the parent tree node as the last argument in the child node constructor, or by using addChildNode(), to add a child to its parent.

+

Each tree node has a label, and optionally a label icon pair. The icon pair offers the capability to show a different icon depending on the state of the node (expanded or collapsed). When the node has any children, a child count may be displayed next to the label using setChildCountPolicy().

+

Expanding a tree node it will collapse all its children, so that a user may collapse/expand a node as a short-cut to collapsing all children.

+

The treenode provides several policies to communicate the current contents of the tree to the client (if possible):

+
    +
  • +WTreeNode::PreLoading: the entire tree is transmitted to the client, and all tree navigation requires no further communication.
  • +
  • +WTreeNode::LazyLoading: only the minimum is transmitted to the client. When expanding a node for the first time, only then it is transmitted to the client, and this may thus have some latency.
  • +
  • +WTreeNode::NextLevelLoading: all leafs of visible children are transmitted, but not their children. This provides a good trade-off between bandwith use and interactivity, since expanding any tree node will happen instantly, and at the same time trigger some communication in the back-ground to load the next level of invisible nodes.
  • +
+

The default policy is WTreeNode::LazyLoading. Another load policy may be specified using setLoadPolicy() on the root node and before adding any children. The load policy is inherited by all children in the tree.

+

There are a few scenarios where it makes sense to specialize the WTreeNode class. One scenario is create a tree that is populated dynamically while browsing. For this purpose you should reimplement the populate() method, whose default implementation does nothing. This method is called when 'loading' the node. The exact moment for loading a treenode depends on the LoadPolicy.

+

A second scenario that is if you want to customize the look of the tree label (see labelArea()) or if you want to modify or augment the event collapse/expand event handling (see doExpand() and doCollapse()).

+

See WTree for a usage example.

+

CSS

+

The tree is styled by the current CSS theme. The look can be overridden using the Wt-tree CSS class and the following selectors:

+
+.Wt-tree .Wt-trunk          : vertical line, trunk
+.Wt-tree .Wt-end            : vertical line, last item
+.Wt-tree .Wt-collapse       : collapse icon (img *)
+.Wt-tree .Wt-expand         : expand icon (img *)
+.Wt-tree .Wt-noexpand       : leaf icon
+
+.Wt-tree .Wt-label          : the node label
+.Wt-tree .Wt-childcount     : the node child count
+.Wt-tree .Wt-node           : the node's table row
+

* The collapse and expand icons are fetched themselves as images, nav-plus.gif and nav-minus.gif.

+
See also:
WTree, WTreeTableNode
+

Member Enumeration Documentation

+ +
+ +
+ +

An enumeration for the policy to display the child count.

+
Enumerator:
+ + + +
Disabled  +

Do not display a child count.

+
Enabled  +

Always display a child count.

+
Lazy  +

Only display a child count when the node is populated.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::WTreeNode::LoadPolicy
+
+
+ +

An enumeration for the policy to load children.

+
Enumerator:
+ + + +
LazyLoading  +

Load-on-demand of child nodes.

+
PreLoading  +

Pre-load all child nodes.

+
NextLevelLoading  +

Pre-load one level of child nodes.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WTreeNode::WTreeNode (const WString labelText,
WIconPair labelIcon = 0,
WTreeNode parentNode = 0 
)
+
+
+ +

Creates a tree node with the given label.

+

The labelIcon, if specified, will appear just before the label and its state reflect the expand/collapse state of the node.

+

The node is initialized to be collapsed.

+ +
+
+ +
+
+ + + + + + + + +
Wt::WTreeNode::WTreeNode (WTreeNode parentNode = 0 ) [protected]
+
+
+ +

Creates a tree node with empty labelArea().

+

This tree node has no label or labelicon, and is therefore ideally suited to provide a custom look.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WTreeNode::addChildNode (WTreeNode node )
+
+
+ +

Adds a child node.

+

Equivalent to:

+
 insertChildNode(childNodes().size(), node);
+
See also:
insertChildNode()
+ +
+
+ +
+
+ + + + + + + +
ChildCountPolicy Wt::WTreeNode::childCountPolicy ( ) const
+
+
+ +

Returns the child count policy.

+
See also:
setChildCountPolicy(ChildCountPolicy policy)
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::collapse ( )
+
+
+ +

Collapses this node.

+
See also:
expand()
+
+doCollapse()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WTreeNode::collapsed ( )
+
+
+ +

Signal emitted when the node is collapsed by the user.

+
See also:
expanded()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::descendantAdded (WTreeNode node ) [protected, virtual]
+
+
+ +

Reacts to the addition of a descendant node.

+

Reimplement this method if you wish to react on the addition of a descendant node. The default implementation simply propagates the event to the parent.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::descendantRemoved (WTreeNode node ) [protected, virtual]
+
+
+ +

Reacts to the removal of a descendant node.

+

Reimplement this method if you wish to react on the removal of a descendant node. The default implementation simply propagates the event to the parent.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WTreeNode::displayedChildCount ( ) const [virtual]
+
+
+ +

Returns the number of children that should be displayed.

+

This is used to display the count in the count label. The default implementation simply returns childNodes().size().

+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::doCollapse ( ) [protected, virtual]
+
+
+ +

The actual collapse.

+

This method, which is implemented as a stateless slot, performs the actual collapse of the node.

+

You may want to reimplement this function (and undoDoCollapse()) if you wish to do additional things on node expansion.

+
See also:
doExpand()
+
+collapse()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::doExpand ( ) [protected, virtual]
+
+
+ +

The actual expand.

+

This method, which is implemented as a stateless slot, performs the actual expansion of the node.

+

You may want to reimplement this function (and undoDoExpand()) if you wish to do additional things on node expansion.

+
See also:
doCollapse()
+
+expand()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::expand ( )
+
+
+ +

Expands this node.

+

Besides the actual expansion of the node, this may also trigger the loading and population of the node children, or of the children's children.

+
See also:
collapse()
+
+doExpand()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTreeNode::expandable ( ) [protected, virtual]
+
+
+ +

Returns whether this node can be expanded.

+

The default implementation populates the node if necessary, and then checks if there are any child nodes.

+

You may wish to reimplement this method if you reimplement populate(), and you have a quick default for determining whether a node may be expanded (which does not require populating the node).

+
See also:
populate()
+ +
+
+ +
+
+ + + + + + + +
EventSignal< WMouseEvent > & Wt::WTreeNode::expanded ( )
+
+
+ +

Signal emitted when the node is expanded by the user.

+
See also:
collapsed()
+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WTreeNode::imagePack ( ) const [protected]
+
+
+ +

The image pack that is used for this tree node (deprecated).

+
Deprecated:
This method returns "" since Wt 3.1.1, as the image pack is no longer used in favour of the CSS themes.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeNode::insertChildNode (int  index,
WTreeNode node 
) [virtual]
+
+
+ +

Inserts a child node.

+

Inserts the node node at index index.

+ +

Reimplemented in Wt::WTreeTableNode.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WTreeNode::isSelectable ( ) const [virtual]
+
+
+ +

Returns if this node may be selected.

+
See also:
setSelectable(bool)
+ +
+
+ +
+
+ + + + + + + +
WTableCell * Wt::WTreeNode::labelArea ( ) [protected]
+
+
+ +

Accesses the container widget that holds the label area.

+

Use this to customize how the label should look like.

+ +
+
+ +
+
+ + + + + + + +
WTreeNode* Wt::WTreeNode::parentNode ( ) const
+
+
+ +

Returns the parent node.

+
See also:
childNodes()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::populate ( ) [protected, virtual]
+
+
+ +

Populates the node dynamically on loading.

+

Reimplement this method if you want to populate the widget dynamically, as the tree is being browsed and therefore loaded. This is only usefull with LazyLoading or NextLevelLoading strategies.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTreeNode::populated ( ) const [protected]
+
+
+ +

Returns whether this node has already been populated.

+
See also:
populate()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::renderSelected (bool  selected ) [protected, virtual]
+
+
+ +

Renders the node to be selected.

+

The default implementation changes the style class of the labelArea() to "selected".

+ +
+
+ +
+
+ + + + + + + +
Signal<bool>& Wt::WTreeNode::selected ( )
+
+
+ +

Signal that is emitted when the node is added or removed from the selection

+
See also:
WTree::itemSelectionChanged
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setChildCountPolicy (ChildCountPolicy  policy )
+
+
+ +

Configures how and when the child count should be displayed.

+

By default, no child count indication is disabled (this is the behaviour since 2.1.1). Use this method to enable child count indications.

+

The child count policy is inherited by all children in the tree.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setChildrenDecorated (bool  decorated )
+
+
+ +

Sets whether this node's children are decorated.

+

By default, node's children have expand/collapse and other lines to display their linkage and offspring.

+

By setting decorated to false, you can hide the decorations for the node's children.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setImagePack (const std::string &  url )
+
+
+ +

Sets the image pack for this (sub)tree (deprecated).

+
Deprecated:
This method does not do anything since Wt 3.1.1, as the tree is now styled based on the current CSS theme.
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setInteractive (bool  interactive )
+
+
+ +

Sets whether this node is interactive.

+

Interactive nodes can be clicked upon and will populate a list of children when clicked. By disabling the interactivity, a node will not react to a click event.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setLoadPolicy (LoadPolicy  loadPolicy )
+
+
+ +

Sets the load policy for this tree.

+

This may only be set on the root of a tree, and before adding any children.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setNodeVisible (bool  visible )
+
+
+ +

Sets the visibility of the node itself.

+

If false, then the node itself is not displayed, but only its children. This is typically used to hide the root node of a tree.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeNode::setSelectable (bool  selectable ) [virtual]
+
+
+ +

Allows this node to be selected.

+

By default, all nodes may be selected.

+
See also:
isSelectable(), WTree::select(WTreeNode *, bool)
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::undoDoCollapse ( ) [protected, virtual]
+
+
+ +

Undo method for doCollapse() stateless implementation.

+
See also:
doExpand()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WTreeNode::undoDoExpand ( ) [protected, virtual]
+
+
+ +

Undo method for doCollapse() stateless implementation.

+
See also:
doCollapse()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.map new file mode 100644 index 0000000..82b281c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.md5 new file mode 100644 index 0000000..cb05c42 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.md5 @@ -0,0 +1 @@ +f2111605264f08e7ef8bcf44aad26aba \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.png new file mode 100644 index 0000000..f1cfa57 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeNode__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable-members.html new file mode 100644 index 0000000..d0a1d89 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable-members.html @@ -0,0 +1,187 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTreeTable Member List

+
+
+This is the complete list of members for Wt::WTreeTable, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addColumn(const WString &header, const WLength &width)Wt::WTreeTable
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
columnCount() const Wt::WTreeTable
columnWidth(int column) const Wt::WTreeTable
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
header(int column) const Wt::WTreeTable
headerWidget() const Wt::WTreeTable
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setTree(WTree *tree, const WString &header)Wt::WTreeTable
setTreeRoot(WTreeTableNode *root, const WString &header)Wt::WTreeTable
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
tree() const Wt::WTreeTable
treeRoot()Wt::WTreeTable
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTreeTable(WContainerWidget *parent=0)Wt::WTreeTable
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable.html new file mode 100644 index 0000000..0d6bcb3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable.html @@ -0,0 +1,383 @@ + + + + +Wt: Wt::WTreeTable Class Reference + + + + + + + + + +
+ +
+

Wt::WTreeTable Class Reference

+
+
+ +

A table with a navigatable tree in the first column. +More...

+ +

#include <Wt/WTreeTable>

+
+Inheritance diagram for Wt::WTreeTable:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WTreeTable (WContainerWidget *parent=0)
 Creates a new tree table.
void addColumn (const WString &header, const WLength &width)
 Adds an extra column.
int columnCount () const
 Returns the number of columns in this table.
void setTreeRoot (WTreeTableNode *root, const WString &header)
 Sets the tree root.
+WTreeTableNodetreeRoot ()
 Returns the tree root.
void setTree (WTree *tree, const WString &header)
 Sets the tree which provides the data for the tree table.
WTreetree () const
 Returns the tree that provides the data this table.
WLength columnWidth (int column) const
 Returns the column width for the given column.
WTextheader (int column) const
 Returns the header for the given column.
WWidgetheaderWidget () const
 Returns the header widget.
+

Detailed Description

+

A table with a navigatable tree in the first column.

+

A WTreeTable implements a tree table, where additional data associated is associated with tree items, which are organized in columns.

+

Unlike the MVC-based WTreeView widget, the tree renders a widget hierarchy, rather than a hierarhical standard model. This provides extra flexibility (as any widget can be used as contents), at the cost of server-side, client-side and bandwidth resources (especially for large tree tables).

+

The actual data is organized and provided by WTreeTableNode widgets.

+

To use the tree table, you must first use addColumn() to specify the additional data columns. Then, you must set the tree root using setTreeRoot() and bind additional information (text or other widgets) in each node using WTreeTableNode::setColumnWidget().

+

The table cannot be given a height using CSS style rules, instead you must use layout managers, or use resize().

+

Usage example:

+
 Wt::WTreeTable *treeTable = new Wt::WTreeTable();
+ treeTable->resize(650, 300);
+
+ // Add 3 extra columns
+ treeTable->addColumn("Yuppie Factor", 125);
+ treeTable->addColumn("# Holidays", 125);
+ treeTable->addColumn("Favorite Item", 125);
+
+ // Create and set the root node
+ Wt::WTreeTableNode *root = new Wt::WTreeTableNode("All Personnel");
+ root->setImagePack("resources/");
+ treeTable->setTreeRoot(root, "Emweb Organigram");
+
+ // Populate the tree with data nodes.
+ Wt::WTreeTableNode *node1 = new Wt::WTreeTableNode("Upper Management", 0, root);
+ Wt::WTreeTableNode *node2;
+ node2 = new Wt::WTreeTableNode("Chief Anything Officer", 0, node1);
+ node2->setColumnWidget(1, new Wt::WText("-2.8"));
+ node2->setColumnWidget(2, new Wt::WText("20"));
+ node2->setColumnWidget(3, new Wt::WText("Scepter"));
+
+ node2 = new WTreeTableNode("Vice President of Parties", 0, node1);
+ node2->setColumnWidget(1, new Wt::WText("13.57"));
+ node2->setColumnWidget(2, new Wt::WText("365"));
+ node2->setColumnWidget(3, new Wt::WText("Flag"));
+
+ root->expand();
+

CSS

+

The treetable is styled by the current CSS theme. The look can be overridden using the Wt-treetable CSS class. The style selectors that affect the rendering of the tree are indicated in the documentation for WTree (for selection) and WTreeNode (for decoration). In addition, the following selector may be used to to style the header:

+
+.Wt-treetable .Wt-header : header
+

A screenshot of the treetable:

+
+WTreeTable-default-1.png +

An example WTreeTable (default)

+
+WTreeTable-polished-1.png +

An example WTreeTable (polished)

+
See also:
WTreeTableNode, WTreeView
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WTreeTable::WTreeTable (WContainerWidget parent = 0 )
+
+
+ +

Creates a new tree table.

+

The treeRoot() is 0. The table should first be properly dimensioned using addColumn() calls, and then data using setTreeRoot().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeTable::addColumn (const WString header,
const WLength width 
)
+
+
+ +

Adds an extra column.

+

Add an extra column, specifying the column header and a column width. The extra columns are numbered from 1 as column 0 contains the tree itself. The header for column 0 (the tree itself) is specified in setTreeRoot(), and the width of column 0 takes the remaining available width.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WTreeTable::columnCount ( ) const
+
+
+ +

Returns the number of columns in this table.

+

Returns the number of columns in the table, including in the count column 0 (which contains the tree).

+
See also:
addColumn()
+ +
+
+ +
+
+ + + + + + + + +
WLength Wt::WTreeTable::columnWidth (int  column ) const
+
+
+ +

Returns the column width for the given column.

+

The width of the first column (with index 0), containing the tree, is implied by the width set for the table minus the width of all other columns.

+
See also:
addColumn(), setTreeRoot()
+ +
+
+ +
+
+ + + + + + + + +
WText * Wt::WTreeTable::header (int  column ) const
+
+
+ +

Returns the header for the given column.

+
See also:
addColumn(), setTreeRoot()
+ +
+
+ +
+
+ + + + + + + +
WWidget * Wt::WTreeTable::headerWidget ( ) const
+
+
+ +

Returns the header widget.

+

This is the widget that contains the column headers.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeTable::setTree (WTree tree,
const WString header 
)
+
+
+ +

Sets the tree which provides the data for the tree table.

+
See also:
setTreeRoot(WTreeTableNode *, const WString&).
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeTable::setTreeRoot (WTreeTableNode root,
const WString header 
)
+
+
+ +

Sets the tree root.

+

Sets the data for the tree table, and specify the header for the first column.

+
See also:
treeRoot(), setTree(WTree *tree, const WString&)
+ +
+
+ +
+
+ + + + + + + +
WTree* Wt::WTreeTable::tree ( ) const
+
+
+ +

Returns the tree that provides the data this table.

+
See also:
setTree(WTree *tree, const WString&).
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode-members.html new file mode 100644 index 0000000..458faf1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode-members.html @@ -0,0 +1,227 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTreeTableNode Member List

+
+
+This is the complete list of members for Wt::WTreeTableNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addChildNode(WTreeNode *node)Wt::WTreeNode
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
ChildCountPolicy enum nameWt::WTreeNode
childCountPolicy() const Wt::WTreeNode
childNodes() const Wt::WTreeNode
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
collapse()Wt::WTreeNode
collapsed()Wt::WTreeNode
columnWidget(int column)Wt::WTreeTableNode
decorationStyle()Wt::WCompositeWidget [virtual]
descendantAdded(WTreeNode *node)Wt::WTreeNode [protected, virtual]
descendantRemoved(WTreeNode *node)Wt::WTreeNode [protected, virtual]
disable()Wt::WWidget
Disabled enum valueWt::WTreeNode
displayedChildCount() const Wt::WTreeNode [virtual]
doCollapse()Wt::WTreeNode [protected, virtual]
doExpand()Wt::WTreeNode [protected, virtual]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
Enabled enum valueWt::WTreeNode
expand()Wt::WTreeNode
expandable()Wt::WTreeNode [protected, virtual]
expanded()Wt::WTreeNode
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
imagePack() const Wt::WTreeNode [protected]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
insertChildNode(int index, WTreeNode *node)Wt::WTreeTableNode [virtual]
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isExpanded() const Wt::WTreeNode
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelectable() const Wt::WTreeNode [virtual]
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
label() const Wt::WTreeNode
labelArea()Wt::WTreeNode [protected]
labelIcon() const Wt::WTreeNode
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
Lazy enum valueWt::WTreeNode
LazyLoading enum valueWt::WTreeNode
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
LoadPolicy enum nameWt::WTreeNode
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
NextLevelLoading enum valueWt::WTreeNode
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
parentNode() const Wt::WTreeNode
populate()Wt::WTreeNode [protected, virtual]
populated() const Wt::WTreeNode [protected]
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
PreLoading enum valueWt::WTreeNode
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeChildNode(WTreeNode *node)Wt::WTreeNode
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
renderSelected(bool selected)Wt::WTreeNode [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
selected()Wt::WTreeNode
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setChildCountPolicy(ChildCountPolicy policy)Wt::WTreeNode
setChildrenDecorated(bool decorated)Wt::WTreeNode
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setColumnWidget(int column, WWidget *item)Wt::WTreeTableNode
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImagePack(const std::string &url)Wt::WTreeNode
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setInteractive(bool interactive)Wt::WTreeNode
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLabelIcon(WIconPair *labelIcon)Wt::WTreeNode
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setLoadPolicy(LoadPolicy loadPolicy)Wt::WTreeNode
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setNodeVisible(bool visible)Wt::WTreeNode
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WTreeNode [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setTable(WTreeTable *table)Wt::WTreeTableNode [protected, virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
undoDoCollapse()Wt::WTreeNode [protected, virtual]
undoDoExpand()Wt::WTreeNode [protected, virtual]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTreeNode(const WString &labelText, WIconPair *labelIcon=0, WTreeNode *parentNode=0)Wt::WTreeNode
WTreeNode(WTreeNode *parentNode=0)Wt::WTreeNode [protected]
WTreeTableNode(const WString &labelText, WIconPair *labelIcon=0, WTreeTableNode *parentNode=0)Wt::WTreeTableNode
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WTreeNode()Wt::WTreeNode
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode.html new file mode 100644 index 0000000..47ad9e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode.html @@ -0,0 +1,263 @@ + + + + +Wt: Wt::WTreeTableNode Class Reference + + + + + + + + + +
+ +
+

Wt::WTreeTableNode Class Reference

+
+
+ +

A specialized tree node which allows additional data to be associated with each node. +More...

+ +

#include <Wt/WTreeTableNode>

+
+Inheritance diagram for Wt::WTreeTableNode:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + +

+Public Member Functions

 WTreeTableNode (const WString &labelText, WIconPair *labelIcon=0, WTreeTableNode *parentNode=0)
 Creates a new tree table node.
void setColumnWidget (int column, WWidget *item)
 Sets a widget to be displayed in the given column for this node.
WWidgetcolumnWidget (int column)
 Returns the widget set for a column.
virtual void insertChildNode (int index, WTreeNode *node)
 Inserts a child node.

+Protected Member Functions

virtual void setTable (WTreeTable *table)
 Sets the table for this node.
+

Detailed Description

+

A specialized tree node which allows additional data to be associated with each node.

+

Additional data for each column can be set using setColumnWidget().

+

CSS

+

This widget is styled by the current CSS theme. See WTreeNode for details.

+
See also:
WTreeNode, WTreeTable
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WTreeTableNode::WTreeTableNode (const WString labelText,
WIconPair labelIcon = 0,
WTreeTableNode parentNode = 0 
)
+
+
+ +

Creates a new tree table node.

+
See also:
WTreeNode::WTreeNode()
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WWidget * Wt::WTreeTableNode::columnWidget (int  column )
+
+
+ +

Returns the widget set for a column.

+

Returns the widget set previously using setColumnWidget(), or 0 if no widget was previously set.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeTableNode::insertChildNode (int  index,
WTreeNode node 
) [virtual]
+
+
+ +

Inserts a child node.

+

Inserts the node node at index index.

+ +

Reimplemented from Wt::WTreeNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeTableNode::setColumnWidget (int  column,
WWidget item 
)
+
+
+ +

Sets a widget to be displayed in the given column for this node.

+

Columns are counted starting from 0 for the tree list itself, and 1 for the first additional column.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeTableNode::setTable (WTreeTable table ) [protected, virtual]
+
+
+ +

Sets the table for this node.

+

This method is called when the node is inserted, directly, or indirectly into a table.

+

You may want to reimplement this method if you wish to customize the behaviour of the node depending on table properties. For example to only associate data with the node when the tree list is actually used inside a table.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.map new file mode 100644 index 0000000..f71523c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.md5 new file mode 100644 index 0000000..4809edc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.md5 @@ -0,0 +1 @@ +9451ce2a8a0797d3b76406636c07ee06 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.png new file mode 100644 index 0000000..aabab0c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTableNode__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.md5 new file mode 100644 index 0000000..a5db426 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.md5 @@ -0,0 +1 @@ +a03a208519504cee35d824bcee665a57 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.png new file mode 100644 index 0000000..32f1195 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeTable__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView-members.html new file mode 100644 index 0000000..05fdbb7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView-members.html @@ -0,0 +1,275 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTreeView Member List

+
+
+This is the complete list of members for Wt::WTreeView, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
alternatingRowColors() const Wt::WAbstractItemView [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
clicked()Wt::WAbstractItemView
closeEditor(const WModelIndex &index, bool saveData=true)Wt::WAbstractItemView
closeEditors(bool saveData=true)Wt::WAbstractItemView
collapse(const WModelIndex &index)Wt::WTreeView
collapsed()Wt::WTreeView
column1Fixed() const Wt::WTreeView
columnAlignment(int column) const Wt::WAbstractItemView [virtual]
columnFormat(int column) const Wt::WTreeView
columnResized()Wt::WAbstractItemView
columnWidth(int column) const Wt::WAbstractItemView
createExtraHeaderWidget(int column)Wt::WAbstractItemView [protected, virtual]
createPageNavigationBar()Wt::WAbstractItemView [protected, virtual]
currentPage() const Wt::WTreeView [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
DoubleClicked enum valueWt::WAbstractItemView
doubleClicked()Wt::WAbstractItemView
dropEvent(const WDropEvent &event, const WModelIndex &target)Wt::WAbstractItemView [protected, virtual]
Wt::WCompositeWidget::dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
edit(const WModelIndex &index)Wt::WAbstractItemView
EditOption enum nameWt::WAbstractItemView
editOptions() const Wt::WAbstractItemView
EditTrigger enum nameWt::WAbstractItemView
editTriggers() const Wt::WAbstractItemView
enable()Wt::WWidget
enableAjax()Wt::WTreeView [protected, virtual]
expand(const WModelIndex &index)Wt::WTreeView
expanded()Wt::WTreeView
expandToDepth(int depth)Wt::WTreeView
extraHeaderWidget(int column)Wt::WAbstractItemView [protected]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
headerAlignment(int column) const Wt::WAbstractItemView [virtual]
headerHeight() const Wt::WAbstractItemView
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
hideColumn(int column)Wt::WAbstractItemView
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isColumnHidden(int column) const Wt::WAbstractItemView
isColumnResizeEnabled() const Wt::WAbstractItemView
isDisabled() const Wt::WCompositeWidget [virtual]
isEditing(const WModelIndex &index) const Wt::WAbstractItemView
isEnabled() const Wt::WCompositeWidget [virtual]
isExpanded(const WModelIndex &index) const Wt::WTreeView
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isSelected(const WModelIndex &index) const Wt::WAbstractItemView
isSortingEnabled() const Wt::WAbstractItemView
isSortingEnabled(int column) const Wt::WAbstractItemView
isValid(const WModelIndex &index) const Wt::WAbstractItemView
isVisible() const Wt::WCompositeWidget [virtual]
itemDelegate() const Wt::WAbstractItemView
itemDelegate(const WModelIndex &index) const Wt::WAbstractItemView
itemDelegate(int column) const Wt::WAbstractItemView
itemDelegateForColumn(int column) const Wt::WAbstractItemView
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
LeaveEditorsOpen enum valueWt::WAbstractItemView
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
model() const Wt::WAbstractItemView
mouseWentDown()Wt::WAbstractItemView
mouseWentUp()Wt::WAbstractItemView
MultipleEditors enum valueWt::WAbstractItemView
NoEditTrigger enum valueWt::WAbstractItemView
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
pageChanged()Wt::WAbstractItemView
pageCount() const Wt::WTreeView [virtual]
pageSize() const Wt::WTreeView [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WTreeView [virtual]
rootIndex() const Wt::WAbstractItemView
rootIsDecorated() const Wt::WTreeView
rowHeight() const Wt::WAbstractItemView
SaveWhenClosed enum valueWt::WAbstractItemView
select(const WModelIndex &index, SelectionFlag option=Select)Wt::WAbstractItemView
SelectedClicked enum valueWt::WAbstractItemView
selectedIndexes() const Wt::WAbstractItemView
selectionBehavior() const Wt::WAbstractItemView
selectionChanged()Wt::WAbstractItemView
selectionMode() const Wt::WAbstractItemView
selectionModel() const Wt::WAbstractItemView
sender()Wt::WObject [protected, static]
setAlternatingRowColors(bool enable)Wt::WTreeView [virtual]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setColumn1Fixed(bool enable)Wt::WTreeView
setColumnAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setColumnBorder(const WColor &color)Wt::WTreeView [virtual]
setColumnFormat(int column, const WString &format)Wt::WTreeView
setColumnHidden(int column, bool hidden)Wt::WTreeView [virtual]
setColumnResizeEnabled(bool enabled)Wt::WAbstractItemView
setColumnWidth(int column, const WLength &width)Wt::WTreeView [virtual]
setCurrentPage(int page)Wt::WTreeView [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setDragEnabled(bool enable)Wt::WAbstractItemView
setDropsEnabled(bool enable)Wt::WAbstractItemView
setEditOptions(WFlags< EditOption > options)Wt::WAbstractItemView
setEditTriggers(WFlags< EditTrigger > editTriggers)Wt::WAbstractItemView
setExpanded(const WModelIndex &, bool expanded)Wt::WTreeView
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHeaderAlignment(int column, AlignmentFlag alignment)Wt::WAbstractItemView [virtual]
setHeaderHeight(const WLength &height, bool multiLine=false)Wt::WTreeView [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setItemDelegate(WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setItemDelegateForColumn(int column, WAbstractItemDelegate *delegate)Wt::WAbstractItemView
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setModel(WAbstractItemModel *model)Wt::WTreeView [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setRootIndex(const WModelIndex &rootIndex)Wt::WAbstractItemView
setRootIsDecorated(bool show)Wt::WTreeView
setRowHeight(const WLength &rowHeight)Wt::WTreeView [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setSelectedIndexes(const WModelIndexSet &indexes)Wt::WAbstractItemView
setSelectionBehavior(SelectionBehavior behavior)Wt::WAbstractItemView
setSelectionMode(SelectionMode mode)Wt::WAbstractItemView
setSortingEnabled(bool enabled)Wt::WAbstractItemView
setSortingEnabled(int column, bool enabled)Wt::WAbstractItemView
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
showColumn(int column)Wt::WAbstractItemView
SingleClicked enum valueWt::WAbstractItemView
SingleEditor enum valueWt::WAbstractItemView
sortByColumn(int column, SortOrder order)Wt::WAbstractItemView
sortColumn() const Wt::WAbstractItemView
sortOrder() const Wt::WAbstractItemView
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
validateEditor(const WModelIndex &index)Wt::WAbstractItemView
validateEditors()Wt::WAbstractItemView
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WAbstractItemView(WContainerWidget *parent=0)Wt::WAbstractItemView [protected]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WTreeView(WContainerWidget *parent=0)Wt::WTreeView
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView.html new file mode 100644 index 0000000..3995d26 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView.html @@ -0,0 +1,847 @@ + + + + +Wt: Wt::WTreeView Class Reference + + + + + + + + + +
+ +
+

Wt::WTreeView Class Reference
+ +[Model/view system] +

+
+
+ +

A view class that displays a model as a tree or tree table. +More...

+ +

#include <Wt/WTreeView>

+
+Inheritance diagram for Wt::WTreeView:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WTreeView (WContainerWidget *parent=0)
 Creates a new tree view.
void setColumnFormat (int column, const WString &format)
 Sets the column format string (deprecated).
WString columnFormat (int column) const
 Returns the column format string (deprecated).
void setExpanded (const WModelIndex &, bool expanded)
 Expands or collapses a node.
bool isExpanded (const WModelIndex &index) const
 Returns whether a node is expanded.
void collapse (const WModelIndex &index)
 Collapses a node.
void expand (const WModelIndex &index)
 Expands a node.
void expandToDepth (int depth)
 Expands all nodes to a depth.
void setRootIsDecorated (bool show)
 Sets whether toplevel items are decorated.
bool rootIsDecorated () const
 Returns whether toplevel items are decorated.
void setColumn1Fixed (bool enable)
 Configures whether horizontal scrolling includes the first column.
bool column1Fixed () const
 Returns whether horizontal scrolling includes the first column.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
Signal< WModelIndex > & collapsed ()
 Signal emitted when a node is collapsed.
Signal< WModelIndex > & expanded ()
 Signal emitted when a node is expanded.
virtual void setModel (WAbstractItemModel *model)
 Sets the model.
virtual void setColumnWidth (int column, const WLength &width)
 Sets the column width.
virtual void setAlternatingRowColors (bool enable)
 Sets if alternating row colors are to be used.
virtual void setRowHeight (const WLength &rowHeight)
 Sets the row height.
virtual void setHeaderHeight (const WLength &height, bool multiLine=false)
 Sets the header height.
virtual void setColumnBorder (const WColor &color)
 Sets the column border color.
virtual void setColumnHidden (int column, bool hidden)
 Changes the visibility of a column.
virtual int pageCount () const
 Returns the number of pages.
virtual int pageSize () const
 Returns the page size.
virtual int currentPage () const
 Returns the current page.
virtual void setCurrentPage (int page)
 Sets the current page.

+Protected Member Functions

virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
+

Detailed Description

+

A view class that displays a model as a tree or tree table.

+

The view displays data from a WAbstractItemModel in a tree or tree table. It provides incremental rendering, allowing the display of data models of any size efficiently, without excessive use of client- or serverside resources.

+

The rendering (and editing) of items is handled by a WAbstractItemDelegate, by default it uses WItemDelegate which renders data of all predefined roles (see also Wt::ItemDataRole), including text, icons, checkboxes, and tooltips.

+

The view may support editing of items, if the model indicates support (see the Wt::ItemIsEditable flag). You can define triggers that initiate editing of an item using setEditTriggers(). The actual editing is provided by the item delegate (you can set an appropriate delegate for one column using setItemDelegateForColumn()). Using setEditOptions() you can customize if and how the view deals with multiple editors.

+

By default, all but the first columns are given a width of 150px, and the first column takes the remaining size. Note that this may have as consequence that the first column's size is reduced to 0. Column widths of all columns, including the first column, can be set through the API method setColumnWidth(), and also by the user using handles provided in the header.

+

Optionally, the treeview may be configured so that the first column is always visible while scrolling through the other columns, which may be convenient if you wish to display a model with many columns. Use setColumn1Fixed() to enable this behaviour.

+

If the model supports sorting (WAbstractItemModel::sort()), such as the WStandardItemModel, then you can enable sorting buttons in the header, using setSortingEnabled().

+

You can allow selection on row or item level (using setSelectionBehavior()), and selection of single or multiple items (using setSelectionMode()), and listen for changes in the selection using the selectionChanged() signal.

+

You may enable drag & drop support for this view, whith awareness of the items in the model. When enabling dragging (see setDragEnabled()), the current selection may be dragged, but only when all items in the selection indicate support for dragging (controlled by the ItemIsDragEnabled flag), and if the model indicates a mime-type (controlled by WAbstractItemModel::mimeType()). Likewise, by enabling support for dropping (see setDropsEnabled()), the treeview may receive a drop event on a particular item, at least if the item indicates support for drops (controlled by the ItemIsDropEnabled flag).

+

You may also react to mouse click events on any item, by connecting to one of the clicked() or doubleClicked() signals.

+

Usage example:

+
 // WTreeView will display the data of a model
+ Wt::WAbstractItemModel *model = ...
+
+ // Create the WTreeView
+ Wt::WTreeView *gitView = new Wt::WTreeView();
+ gitView->resize(300, Wt::WLength::Auto);
+ gitView->setSortingEnabled(false);
+ gitView->setModel(model);
+ gitView->setSelectionMode(SingleSelection);
+

Graceful degradation

+

The view provides a virtual scrolling behavior which relies on Ajax availability. When Ajax is not available, a page navigation bar is used instead, see createPageNavigationBar(). In that case, the widget needs to be given an explicit height using resize() which determines the number of rows that are displayed at a time.

+

CSS

+

The treeview is styled by the current CSS theme. The look can be overridden using the Wt-treeview CSS class and the following selectors.

+

Selectors that apply to the header:

+
+.Wt-treeview .Wt-headerdiv         : header (background)
+.Wt-treeview .Wt-header .Wt-label  : header label
+.Wt-treeview .Wt-tv-rh             : column resize handle
+.Wt-treeview .Wt-tv-sh-none        : column sort handle, no sorting
+.Wt-treeview .Wt-tv-sh-up          : column sort handle, sort up
+.Wt-treeview .Wt-tv-sh-down        : column sort handle, sort down
+

Selectors that apply to the tree decoration:

+
+.Wt-treeview .Wt-trunk          : vertical line, trunk
+.Wt-treeview .Wt-end            : vertical line, last item
+.Wt-treeview .Wt-collapse       : collapse icon
+.Wt-treeview .Wt-expand         : expand icon
+.Wt-treeview .Wt-noexpand       : leaf icon
+

Selectors that apply to the table contents:

+
+.Wt-treeview .Wt-spacer         : spacer for non-loaded content
+.Wt-treeview .Wt-selected       : selected item
+.Wt-treeview .Wt-drop-site      : possible drop site
+

Selectors that apply to the table borders (which must be 1 pixel wide)

+
+.Wt-treeview .Wt-tv-row .Wt-tv-c      : border-right property of cells
+.Wt-treeview .Wt-header .Wt-tv-row,
+  .Wt-treeview .Wt-tv-node .Wt-tv-row : border-left property of cells
+

A snapshot of the WTreeView:

+
+WTreeView-default-1.png +

WTreeView example (default)

+
+WTreeView-polished-1.png +

WTreeView example (polished)

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WTreeView::collapse (const WModelIndex index )
+
+
+ +

Collapses a node.

+
See also:
setExpanded(), expand()
+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex>& Wt::WTreeView::collapsed ( )
+
+
+ +

Signal emitted when a node is collapsed.

+
See also:
setExpanded(), expanded()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTreeView::column1Fixed ( ) const
+
+
+ +

Returns whether horizontal scrolling includes the first column.

+
See also:
setColumn1Fixed()
+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WTreeView::columnFormat (int  column ) const
+
+
+ +

Returns the column format string (deprecated).

+
See also:
setColumnFormat()
+
Deprecated:
use itemDelegateForColumn() to customize the formatting. This method will try to cast the itemDelegateForColumn() to a WItemDelegate and return the format.
+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WTreeView::currentPage ( ) const [virtual]
+
+
+ +

Returns the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the current page (between 0 and pageCount() - 1).

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::WTreeView::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeView::expand (const WModelIndex index )
+
+
+ +

Expands a node.

+
See also:
setExpanded(), collapse()
+ +
+
+ +
+
+ + + + + + + +
Signal<WModelIndex>& Wt::WTreeView::expanded ( )
+
+
+ +

Signal emitted when a node is expanded.

+
See also:
setExpanded(), collapsed()
+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeView::expandToDepth (int  depth )
+
+
+ +

Expands all nodes to a depth.

+

Expands all nodes to the given depth. A depth of 1 corresponds to the top level nodes.

+
See also:
expand()
+ +
+
+ +
+
+ + + + + + + + +
bool Wt::WTreeView::isExpanded (const WModelIndex index ) const
+
+
+ +

Returns whether a node is expanded.

+
See also:
setExpanded()
+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WTreeView::pageCount ( ) const [virtual]
+
+
+ +

Returns the number of pages.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of pages currently shown.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WTreeView::pageSize ( ) const [virtual]
+
+
+ +

Returns the page size.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of items per page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WTreeView::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WCompositeWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WTreeView::rootIsDecorated ( ) const
+
+
+ +

Returns whether toplevel items are decorated.

+
See also:
setRootIsDecorated()
+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WTreeView::setAlternatingRowColors (bool  enable ) [virtual]
+
+
+ +

Sets if alternating row colors are to be used.

+

Configure whether rows get alternating background colors, defined by the current CSS theme.

+

The default value is false.

+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeView::setColumn1Fixed (bool  enable )
+
+
+ +

Configures whether horizontal scrolling includes the first column.

+

To display a model with many columns, this option allows you to keep the first column fixed while scrolling through the other columns of the model.

+

The default value is false.

+
Note:
Currently, you must set this option before any other manipulation of a newly created treeview, and only enable = true is supported.
+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WTreeView::setColumnBorder (const WColor color ) [virtual]
+
+
+ +

Sets the column border color.

+

The default border color is defined by the CSS theme.

+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeView::setColumnFormat (int  column,
const WString format 
)
+
+
+ +

Sets the column format string (deprecated).

+

The DisplayRole data for that column is converted to a string using asString(), with the given format.

+

The default value is "".

+
Deprecated:
use itemDelegateForColumn() to customize the formatting. This method will create a new WItemDelegate for the column, and configure its format.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WTreeView::setColumnHidden (int  column,
bool  hide 
) [virtual]
+
+
+ +

Changes the visibility of a column.

+
See also:
isColumnHidden()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WTreeView::setColumnWidth (int  column,
const WLength width 
) [virtual]
+
+
+ +

Sets the column width.

+

For a model with columnCount() == N, the initial width of columns 1..N is set to 150 pixels, and column 0 will take all remaining space.

+
Note:
The actual space occupied by each column is the column width augmented by 7 pixels for internal padding and a border.
+
See also:
setRowHeight()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WTreeView::setCurrentPage (int  page ) [virtual]
+
+
+ +

Sets the current page.

+

When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This method can be used to change the current page.

+
See also:
createPageNavigationBar(), pageChanged()
+ +

Implements Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WTreeView::setExpanded (const WModelIndex,
bool  expanded 
)
+
+
+ +

Expands or collapses a node.

+
See also:
expand(), collapse()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WTreeView::setHeaderHeight (const WLength height,
bool  multiLine = false 
) [virtual]
+
+
+ +

Sets the header height.

+

Use this method to change the header height. By default, the header text is a single line that is centered vertically.

+

By enabling multi-line headers, the header text will be aligned to the top and wrap as needed. In that case, additional contents may be displayed in the header, provided by createExtraHeaderWidget().

+

The default value is a single line of 20 pixels.

+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WTreeView::setModel (WAbstractItemModel model ) [virtual]
+
+
+ +

Sets the model.

+

The View will display data of the given model and changes in the model are reflected by the View.

+

The initial model is 0.

+

Ownership of the model is not transferred (and thus the previously set model is not deleted). A model may not be deleted as long as a view exists for it.

+
See also:
setRootIndex()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WTreeView::setRootIsDecorated (bool  show )
+
+
+ +

Sets whether toplevel items are decorated.

+

By default, top level nodes have expand/collapse and other lines to display their linkage and offspring, like any node.

+

By setting show to false, you can hide these decorations for root nodes, and in this way mimic a plain list. You could also consider using a WTableView instead.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WTreeView::setRowHeight (const WLength rowHeight ) [virtual]
+
+
+ +

Sets the row height.

+

The view renders all rows with a same height. This method configures this row height.

+

The default value is 20 pixels.

+
Note:
The height must be specified in WLength::Pixel units.
+
See also:
setColumnWidth()
+ +

Reimplemented from Wt::WAbstractItemView.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.map new file mode 100644 index 0000000..d66cb9b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.md5 new file mode 100644 index 0000000..489aede --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.md5 @@ -0,0 +1 @@ +698b14098158d37ccd17e44f671a3057 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.png new file mode 100644 index 0000000..905fe24 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTreeView__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.md5 new file mode 100644 index 0000000..f553d1c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.md5 @@ -0,0 +1 @@ +ee8a4018e7d1d1a01b4c85cb49f85300 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.png new file mode 100644 index 0000000..0a0628f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WTree__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout-members.html new file mode 100644 index 0000000..256b18a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout-members.html @@ -0,0 +1,140 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WVBoxLayout Member List

+
+
+This is the complete list of members for Wt::WVBoxLayout, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
addItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
addLayout(WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
addSpacing(const WLength &size)Wt::WBoxLayout
addStretch(int stretch=0)Wt::WBoxLayout
addWidget(WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
Wt::WLayout::addWidget(WWidget *widget)Wt::WLayout
BottomToTop enum valueWt::WBoxLayout
children() const Wt::WObject
count() const Wt::WBoxLayout [virtual]
Direction enum nameWt::WBoxLayout
direction() const Wt::WBoxLayout
findWidgetItem(WWidget *widget)Wt::WLayout [virtual]
getContentsMargins(int *left, int *top, int *right, int *bottom) const Wt::WLayout
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
impl() const Wt::WLayout [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
indexOf(WLayoutItem *item) const Wt::WLayout [virtual]
insertLayout(int index, WLayout *layout, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
insertSpacing(int index, const WLength &size)Wt::WBoxLayout
insertStretch(int index, int stretch=0)Wt::WBoxLayout
insertWidget(int index, WWidget *widget, int stretch=0, WFlags< AlignmentFlag > alignment=0)Wt::WBoxLayout
isResizable(int index) const Wt::WBoxLayout
itemAt(int index) const Wt::WBoxLayout [virtual]
layout()Wt::WLayout [virtual]
LeftToRight enum valueWt::WBoxLayout
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
parentLayout() const Wt::WLayout [virtual]
removeChild(WObject *child)Wt::WObject
removeItem(WLayoutItem *item)Wt::WBoxLayout [virtual]
removeWidget(WWidget *widget)Wt::WLayout
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
RightToLeft enum valueWt::WBoxLayout
sender()Wt::WObject [protected, static]
setContentsMargins(int left, int top, int right, int bottom)Wt::WLayout
setDirection(Direction direction)Wt::WBoxLayout
setLayoutHint(const std::string &name, const std::string &value)Wt::WLayout
setLayoutInParent(WWidget *parent)Wt::WLayout [protected]
setObjectName(const std::string &name)Wt::WObject
setResizable(int index, bool enabled=true)Wt::WBoxLayout
setSpacing(int size)Wt::WBoxLayout
setStretchFactor(WLayout *layout, int stretch)Wt::WBoxLayout
setStretchFactor(WWidget *widget, int stretch)Wt::WBoxLayout
spacing() const Wt::WBoxLayout
TopToBottom enum valueWt::WBoxLayout
update(WLayoutItem *item=0)Wt::WLayout [protected]
updateAddItem(WLayoutItem *item)Wt::WLayout [protected]
updateRemoveItem(WLayoutItem *item)Wt::WLayout [protected]
WBoxLayout(Direction dir, WWidget *parent=0)Wt::WBoxLayout
widget()Wt::WLayout [virtual]
WLayout()Wt::WLayout [protected]
WObject(WObject *parent=0)Wt::WObject
WVBoxLayout(WWidget *parent=0)Wt::WVBoxLayout
~WLayout()Wt::WLayout [virtual]
~WLayoutItem()Wt::WLayoutItem [virtual]
~WObject()Wt::WObject [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout.html new file mode 100644 index 0000000..d1b2322 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout.html @@ -0,0 +1,143 @@ + + + + +Wt: Wt::WVBoxLayout Class Reference + + + + + + + + + +
+ +
+

Wt::WVBoxLayout Class Reference

+
+
+ +

A layout manager which arranges widgets vertically. +More...

+ +

#include <Wt/WVBoxLayout>

+
+Inheritance diagram for Wt::WVBoxLayout:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

 WVBoxLayout (WWidget *parent=0)
 Create a new vertical box layout.
+

Detailed Description

+

A layout manager which arranges widgets vertically.

+

This convenience class creates a vertical box layout, laying contained widgets out from top to bottom.

+

See WBoxLayout for available member methods and more information.

+

Usage example:

+
 Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
+ w->resize(WLength::Auto, 600);
+
+ Wt::WVBoxLayout *layout = new Wt::WVBoxLayout();
+ layout->addWidget(new Wt::WText("One"));
+ layout->addWidget(new Wt::WText("Two"));
+ layout->addWidget(new Wt::WText("Three"));
+ layout->addWidget(new Wt::WText("Four"));
+
+ w->setLayout(layout);
+
Note:
First consider if you can achieve your layout using CSS !
+
See also:
WHBoxLayout
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Wt::WVBoxLayout::WVBoxLayout (WWidget parent = 0 )
+
+
+ +

Create a new vertical box layout.

+

Use parent=0 to created a layout manager that can be nested inside other layout managers.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.map new file mode 100644 index 0000000..b8e7717 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.md5 new file mode 100644 index 0000000..211b8bc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.md5 @@ -0,0 +1 @@ +ae81d1f36c4da634804dd4c7abd0cbf1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.png new file mode 100644 index 0000000..58f0fac Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WVBoxLayout__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus-members.html new file mode 100644 index 0000000..4888764 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus-members.html @@ -0,0 +1,180 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WValidationStatus Member List

+
+
+This is the complete list of members for Wt::WValidationStatus, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
valid() const Wt::WValidationStatus
validated()Wt::WValidationStatus
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WValidationStatus(WFormWidget *field, WWidget *validStateWidget=0, WWidget *invalidStateWidget=0, WWidget *invalidEmptyStateWidget=0, WContainerWidget *parent=0)Wt::WValidationStatus
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus.html new file mode 100644 index 0000000..986dd1a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus.html @@ -0,0 +1,187 @@ + + + + +Wt: Wt::WValidationStatus Class Reference + + + + + + + + + +
+ +
+

Wt::WValidationStatus Class Reference

+
+
+ +

A widget that keeps track of the validation status of a form widget. +More...

+ +

#include <Wt/WValidationStatus>

+
+Inheritance diagram for Wt::WValidationStatus:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + +

+Public Member Functions

 WValidationStatus (WFormWidget *field, WWidget *validStateWidget=0, WWidget *invalidStateWidget=0, WWidget *invalidEmptyStateWidget=0, WContainerWidget *parent=0)
 Construct a WValidationStatus widget for another widget.
+bool valid () const
 Is the field currently considered valid?
Signal< bool > & validated ()
 Signal emitted when the validation state changed.
+

Detailed Description

+

A widget that keeps track of the validation status of a form widget.

+

Since Wt 2.1.3, all standard validators provide client-side validation and this is reflected in the form widget using the style class "Wt-invalid" when the validator returns not WValidator::Valid. Therefore, it is unlikely you will need this class anymore.

+

Use a WValidationStatus widget to act to changes in validation of a WFormWidget. The widget may show visual feed-back of the validation state of the input.

+

Visual feed-back may be given by showing an invalidStateWidget when input is invalid, an invalidEmptyStateWidget when the input is invalid because mandatory and empty, or a validStateWidget when input is valid. All of these widgets may be 0, indicating that no widget will be shown for the corresponding state.

+

When validation state changes from invalid to valid, or from valid to invalid, the widget emits the validated signal. This may be used to for example enable or disable a button.

+
Deprecated:
Since Wt 3.1.1, validation is handled directly on WFormWidget subclasses.
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WValidationStatus::WValidationStatus (WFormWidget field,
WWidget validStateWidget = 0,
WWidget invalidStateWidget = 0,
WWidget invalidEmptyStateWidget = 0,
WContainerWidget parent = 0 
)
+
+
+ +

Construct a WValidationStatus widget for another widget.

+

Constructs a validation status widget for the given field.

+

The validation stateWidgets (if not 0) will be managed by this widget, and shown and hidden to reflect the current validation state.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
Signal<bool>& Wt::WValidationStatus::validated ( )
+
+
+ +

Signal emitted when the validation state changed.

+

The new state of the validation (valid or invalid) is given as argument. This signal gets emitted when the state changes from WValidator::Valid to WValidator::Invalid, or from WValidator::Invalid to WValidator::Valid.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.md5 new file mode 100644 index 0000000..119122b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.md5 @@ -0,0 +1 @@ +b4905a2ba19717191df2b064a214b490 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.png new file mode 100644 index 0000000..29533eb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidationStatus__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator-members.html new file mode 100644 index 0000000..a73e39b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator-members.html @@ -0,0 +1,111 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WValidator Member List

+
+
+This is the complete list of members for Wt::WValidator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChild(WObject *child)Wt::WObject
children() const Wt::WObject
createExtConfig(std::ostream &config) const Wt::WValidator [virtual]
fixup(WString &input) const Wt::WValidator [virtual]
getStateless(Method method)Wt::WObject [protected, virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
inputFilter() const Wt::WValidator [protected, virtual]
Invalid enum valueWt::WValidator
invalidBlankText() const Wt::WValidator
InvalidEmpty enum valueWt::WValidator
isMandatory() const Wt::WValidator
javaScriptValidate(const std::string &jsRef) const Wt::WValidator [protected, virtual]
Method typedefWt::WObject
objectName() const Wt::WObject [virtual]
parent() const Wt::WObject
removeChild(WObject *child)Wt::WObject
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
sender()Wt::WObject [protected, static]
setInvalidBlankText(const WString &text)Wt::WValidator
setMandatory(bool how)Wt::WValidator
setObjectName(const std::string &name)Wt::WObject
State enum nameWt::WValidator
Valid enum valueWt::WValidator
validate(WString &input) const Wt::WValidator [virtual]
WObject(WObject *parent=0)Wt::WObject
WValidator(WObject *parent=0)Wt::WValidator
WValidator(bool mandatory, WObject *parent=0)Wt::WValidator
~WObject()Wt::WObject [virtual]
~WValidator()Wt::WValidator
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator.html new file mode 100644 index 0000000..e9ec575 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator.html @@ -0,0 +1,384 @@ + + + + +Wt: Wt::WValidator Class Reference + + + + + + + + + +
+ +
+

Wt::WValidator Class Reference

+
+
+ +

A validator is used to validate user input according to pre-defined rules. +More...

+ +

#include <Wt/WValidator>

+
+Inheritance diagram for Wt::WValidator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  State { Invalid, +InvalidEmpty, +Valid + }
 

The state in which validated input can exist.

+ More...

+Public Member Functions

WValidator (WObject *parent=0)
 Creates a new validator.
 WValidator (bool mandatory, WObject *parent=0)
 Creates a new validator.
 ~WValidator ()
 Destructor.
void setMandatory (bool how)
 Sets if input is mandatory.
+bool isMandatory () const
 Returns if input is mandatory.
void setInvalidBlankText (const WString &text)
 Sets the message to display when a mandatory field is left blank.
WString invalidBlankText () const
 Returns the message displayed when a mandatory field is left blank.
virtual void fixup (WString &input) const
 This function attempts to change input to be valid according to the validator's rules.
virtual State validate (WString &input) const
 Validates the given input.
+virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.

+Protected Member Functions

virtual std::string javaScriptValidate (const std::string &jsRef) const
 Creates a Javascript expression that validates the input.
virtual std::string inputFilter () const
 Returns a regular expression that filters input.
+

Detailed Description

+

A validator is used to validate user input according to pre-defined rules.

+

A validator may be associated with a form widget using WFormWidget::setValidator().

+

The validator validates the user input. A validator may have a split implementation to provide both validation at the client-side (which gives instant feed-back to the user while editing), and server-side validation (to be sure that the client was not tampered with). The feed-back given by (client-side and server-side) validation is reflected in the style class of the form field: a style class of Wt-invalid is set for a field that is invalid.

+

This WValidator only checks that mandatory fields are not empty. This class is reimplemented in WDateValidator, WIntValidator, WDoubleValidator, WLengthValidator and WRegExpValidator. All these validators provibe both client-side and server-side validation.

+

If these validators are not suitable, you can inherit from this class, and provide a suitable implementation to validate() which does the server-side validation. If you want to provide client-side validation for your own validator, you may also reimplement javaScriptValidate().

+

i18n

+

The strings used in this class can be translated by overriding the default values for the following localization keys:

+ +
See also:
WFormWidget
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Wt::WValidator::State
+
+
+ +

The state in which validated input can exist.

+
Enumerator:
+ + + +
Invalid  +

The input is invalid.

+
InvalidEmpty  +

The input is invalid (emtpy and mandatory).

+
Valid  +

The input is valid.

+
+
+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Wt::WValidator::WValidator (bool  mandatory,
WObject parent = 0 
)
+
+
+ +

Creates a new validator.

+

Indicate whether input is mandatory.

+
See also:
setMandatory(bool)
+ +
+
+ +
+
+ + + + + + + +
Wt::WValidator::~WValidator ( )
+
+
+ +

Destructor.

+

The validator automatically removes itself from all formfields to which it was associated.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Wt::WValidator::fixup (WString input ) const [virtual]
+
+
+ +

This function attempts to change input to be valid according to the validator's rules.

+

In general the function needs not to change the input into a valid input. The default implementation does nothing. But it may help the user in getting its input right.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WValidator::inputFilter ( ) const [protected, virtual]
+
+
+ +

Returns a regular expression that filters input.

+

The returned regular expression is used to filter keys presses. The regular expression should accept valid single characters.

+

For details on valid regular expressions, see WRegExpValidator. As an example, "[0-9]" would only accept numbers as valid input.

+

The default implementation returns an empty string, which does not filter any input.

+
See also:
javaScriptValidate()
+ +

Reimplemented in Wt::WIntValidator.

+ +
+
+ +
+
+ + + + + + + +
WString Wt::WValidator::invalidBlankText ( ) const
+
+
+ +

Returns the message displayed when a mandatory field is left blank.

+
See also:
setInvalidBlankText(const WString&)
+ +
+
+ +
+
+ + + + + + + + +
std::string Wt::WValidator::javaScriptValidate (const std::string &  jsRef ) const [protected, virtual]
+
+
+ +

Creates a Javascript expression that validates the input.

+

The JavaScript expression should evaluate to an object with two fields: a boolean valid, and a message that indicates the problem if not valid.

+

Return an empty string if you are not provide the client-side validation.

+
See also:
inputFilter()
+ +

Reimplemented in Wt::WDateValidator, Wt::WDoubleValidator, Wt::WIntValidator, Wt::WLengthValidator, and Wt::WRegExpValidator.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WValidator::setInvalidBlankText (const WString text )
+
+
+ +

Sets the message to display when a mandatory field is left blank.

+

The default value is "This field cannot be empty".

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WValidator::setMandatory (bool  how )
+
+
+ +

Sets if input is mandatory.

+

When an input is not mandatory, then an empty field is always valid.

+ +
+
+ +
+
+ + + + + + + + +
WValidator::State Wt::WValidator::validate (WString input ) const [virtual]
+
+
+ +

Validates the given input.

+

This function returns the current validation state of the input. The default implementation only checks whether a mandatory field is not left blank.

+ +

Reimplemented in Wt::WDateValidator, Wt::WDoubleValidator, Wt::WIntValidator, Wt::WLengthValidator, and Wt::WRegExpValidator.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.map new file mode 100644 index 0000000..9b6b36a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.md5 new file mode 100644 index 0000000..449f2a3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.md5 @@ -0,0 +1 @@ +0c08b7cdcc8e179aeaef590a466dc627 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.png new file mode 100644 index 0000000..88e5f4f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WValidator__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage-members.html new file mode 100644 index 0000000..7453361 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage-members.html @@ -0,0 +1,102 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WVectorImage Member List

+
+
+This is the complete list of members for Wt::WVectorImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
clear()=0Wt::WPaintDevice [protected, pure virtual]
Clipping enum valueWt::WPaintDevice
done()=0Wt::WPaintDevice [pure virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)=0Wt::WPaintDevice [pure virtual]
drawImage(const WRectF &rect, const std::string &imageUri, int imgWidth, int imgHeight, const WRectF &sourceRect)=0Wt::WPaintDevice [pure virtual]
drawLine(double x1, double y1, double x2, double y2)=0Wt::WPaintDevice [pure virtual]
drawPath(const WPainterPath &path)=0Wt::WPaintDevice [pure virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)=0Wt::WPaintDevice [pure virtual]
Font enum valueWt::WPaintDevice
height() const =0Wt::WPaintDevice [pure virtual]
Hints enum valueWt::WPaintDevice
init()=0Wt::WPaintDevice [pure virtual]
paintActive() const =0Wt::WPaintDevice [pure virtual]
painter() const =0Wt::WPaintDevice [protected, pure virtual]
Pen enum valueWt::WPaintDevice
rendered()=0Wt::WVectorImage [pure virtual]
setChanged(WFlags< ChangeFlag > flags)=0Wt::WPaintDevice [pure virtual]
setPainter(WPainter *painter)=0Wt::WPaintDevice [protected, pure virtual]
Shadow enum valueWt::WPaintDevice
Transform enum valueWt::WPaintDevice
width() const =0Wt::WPaintDevice [pure virtual]
~WPaintDevice()Wt::WPaintDevice [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage.html new file mode 100644 index 0000000..5722677 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage.html @@ -0,0 +1,111 @@ + + + + +Wt: Wt::WVectorImage Class Reference + + + + + + + + + +
+ +
+

Wt::WVectorImage Class Reference
+ +[Painting system] +

+
+
+ +

An abstract paint device for rendering using native vector graphics. +More...

+ +

#include <Wt/WVectorImage>

+
+Inheritance diagram for Wt::WVectorImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + +

+Public Member Functions

+virtual std::string rendered ()=0
 Internal method.
+

Detailed Description

+

An abstract paint device for rendering using native vector graphics.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.map new file mode 100644 index 0000000..e1f3d39 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.md5 new file mode 100644 index 0000000..bf835a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.md5 @@ -0,0 +1 @@ +eac6d2fb54420da04eae402f74d1c691 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.png new file mode 100644 index 0000000..966a9b7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WVectorImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget-members.html new file mode 100644 index 0000000..44bb16a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget-members.html @@ -0,0 +1,183 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WViewWidget Member List

+
+
+This is the complete list of members for Wt::WViewWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WViewWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WViewWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
renderView()=0Wt::WViewWidget [protected, pure virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
update()Wt::WViewWidget
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WViewWidget(WContainerWidget *parent=0)Wt::WViewWidget
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget.html new file mode 100644 index 0000000..47a4d52 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget.html @@ -0,0 +1,260 @@ + + + + +Wt: Wt::WViewWidget Class Reference + + + + + + + + + +
+ +
+

Wt::WViewWidget Class Reference

+
+
+ +

An abstract base class for an MVC view that is rendered using a widget. +More...

+ +

#include <Wt/WViewWidget>

+
+Inheritance diagram for Wt::WViewWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + +

+Public Member Functions

WViewWidget (WContainerWidget *parent=0)
 Creates a new view widget.
void update ()
 Updates the view.
virtual void load ()
 Loads content just before the widget is used.
virtual void refresh ()
 Refresh the widget.

+Protected Member Functions

virtual WWidgetrenderView ()=0
 Creates a widget that renders the View.
+

Detailed Description

+

An abstract base class for an MVC view that is rendered using a widget.

+

In principle, Wt widgets are self-contained and manage both their content, behavior and layout. From the point of view of a Model-View-Controller (MVC) design pattern, they implement each of these, except for the view widgets that work in conjunction with WAbstractItemModel. As a developer you can chose to keep Model, View and Controller together or separate them as you wish.

+

This widget facilitates separation of the View from the Model and Controller in a particular way. The View is rendered as a Wt widget. The use of this widget provides two benefits. The classic MVC benefit is a decoupling between view and model, which may allow easier maintainance of code. In addition, this widget enforces the View to be stateless, as it is only created transiently on the server. Therefore the View does not require session resources. This may increase scalability for Internet-deployments.

+

The rendered View widget returned by renderView() should reflect the current model state. Whenever the model changes, rerendering can be triggered by calling update().

+

Currently, the View cannot enclose WFormWidgets which would allow direct manipulation of the model (but we are working to remove this limitation in the future, and let the Model/Controller handle editing changes) and the View may only be updated by a complete rerendering of the entire view.

+

The View widget may contain event handling code, but only in one of the following ways:

+
    +
  • +event handling implemented directly in JavaScript code
  • +
  • +event handling implemented in pre-learned stateless slot implementations
  • +
+

Thus, currently, event handling code related to the View cannot be implemented at server-side (but we are thinking about a solution for this as well...).

+

Implementation example:

+
 // Shows the contents for a specific role of a model index in a WText widget
+ class SourceView : public Wt::WViewWidget
+ {
+ public:
+   // role is the ItemDataRole
+   SourceView(int role)
+     : role_(role)
+   { }
+
+   // set an index
+   void setIndex(const Wt::WModelIndex& index) {
+     if (index != index_
+         && (!index.isValid() || !index.data(role_).empty())) {
+       index_ = index;
+       update(); // trigger rerendering of the view
+     }
+   }
+
+ private:
+   Wt::WModelIndex index_;
+   int             role_;
+
+ protected:
+   virtual Wt::WWidget *renderView() {
+     Wt::WText *result = new Wt::WText();
+     result->setInline(false);
+
+     if (!index_.isValid())
+       return result;
+
+     boost::any d = index_.data(role_);
+     const std::string& t = boost::any_cast<const std::string&>(d);
+
+     result->setTextFormat(Wt::PlainText);
+     result->setText(t);
+
+     return result;
+   }
+ };
+

CSS

+

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WViewWidget::load ( ) [virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WViewWidget::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WViewWidget::renderView ( ) [protected, pure virtual]
+
+
+ +

Creates a widget that renders the View.

+

This method must be reimplemented to return a widget that renders the view. The returned widget will be deleted by WViewWidget.

+ +

Implemented in Wt::WStaticModelView< Renderer >.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WViewWidget::update ( )
+
+
+ +

Updates the view.

+

Typically, the model will want to update the view when the model has changed.

+

This will trigger a call to renderView() to ask for a new rendering of the view.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.map new file mode 100644 index 0000000..c49bb5f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.md5 new file mode 100644 index 0000000..9756cd8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.md5 @@ -0,0 +1 @@ +a050f852c1bbfeba3c507dc28781370f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.png new file mode 100644 index 0000000..69274b4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WViewWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage-members.html new file mode 100644 index 0000000..667afbc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage-members.html @@ -0,0 +1,197 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WVirtualImage Member List

+
+
+This is the complete list of members for Wt::WVirtualImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
attributeValue(const std::string &name) const Wt::WCompositeWidget [virtual]
boxBorder(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WCompositeWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WCompositeWidget [virtual]
children() const Wt::WObject
clearSides() const Wt::WCompositeWidget [virtual]
createImage(::int64_t x,::int64_t y, int width, int height)Wt::WVirtualImage [protected, virtual]
currentBottomRightX() const Wt::WVirtualImage
currentBottomRightY() const Wt::WVirtualImage
currentTopLeftX() const Wt::WVirtualImage
currentTopLeftY() const Wt::WVirtualImage
decorationStyle()Wt::WCompositeWidget [virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WCompositeWidget [protected, virtual]
enableDragging()Wt::WVirtualImage
find(const std::string &name)Wt::WCompositeWidget [virtual]
floatSide() const Wt::WCompositeWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
gridImageSize() const Wt::WVirtualImage
height() const Wt::WCompositeWidget [virtual]
hiddenKeepsGeometry() const Wt::WCompositeWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WCompositeWidget [virtual]
imageHeight() const Wt::WVirtualImage
imageWidth() const Wt::WVirtualImage
implementation()Wt::WCompositeWidget [protected]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
InfiniteWt::WVirtualImage [static]
isDisabled() const Wt::WCompositeWidget [virtual]
isEnabled() const Wt::WCompositeWidget [virtual]
isHidden() const Wt::WCompositeWidget [virtual]
isInline() const Wt::WCompositeWidget [virtual]
isPopup() const Wt::WCompositeWidget [virtual]
isRendered() const Wt::WWidget
isVisible() const Wt::WCompositeWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WCompositeWidget [virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WCompositeWidget [virtual]
load()Wt::WCompositeWidget [virtual]
loaded() const Wt::WCompositeWidget [virtual]
margin(Side side) const Wt::WCompositeWidget [virtual]
maximumHeight() const Wt::WCompositeWidget [virtual]
maximumWidth() const Wt::WCompositeWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WCompositeWidget [virtual]
minimumWidth() const Wt::WCompositeWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WCompositeWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WCompositeWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WCompositeWidget [virtual]
redrawAll()Wt::WVirtualImage
refresh()Wt::WCompositeWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)Wt::WCompositeWidget [virtual]
render(::int64_t x,::int64_t y, int width, int height)Wt::WVirtualImage [protected, virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
resizeImage(::int64_t w,::int64_t h)Wt::WVirtualImage
scroll(::int64_t dx,::int64_t dy)Wt::WVirtualImage
scrollTo(::int64_t x,::int64_t y)Wt::WVirtualImage
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WCompositeWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WCompositeWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WCompositeWidget [virtual]
setDisabled(bool)Wt::WCompositeWidget [virtual]
setFloatSide(Side s)Wt::WCompositeWidget [virtual]
setHidden(bool)Wt::WCompositeWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WCompositeWidget [virtual]
setId(const std::string &id)Wt::WCompositeWidget [virtual]
setImplementation(WWidget *widget)Wt::WCompositeWidget [protected]
setInline(bool)Wt::WCompositeWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WCompositeWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WCompositeWidget [virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WCompositeWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WCompositeWidget [virtual]
setPopup(bool)Wt::WCompositeWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WCompositeWidget [virtual]
setSelectable(bool selectable)Wt::WCompositeWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WCompositeWidget [virtual]
setTabIndex(int index)Wt::WCompositeWidget [virtual]
setToolTip(const WString &text)Wt::WCompositeWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)Wt::WCompositeWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WCompositeWidget [virtual]
tabIndex() const Wt::WCompositeWidget [virtual]
toolTip() const Wt::WCompositeWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WCompositeWidget [virtual]
verticalAlignmentLength() const Wt::WCompositeWidget [virtual]
viewPortChanged()Wt::WVirtualImage
viewPortHeight() const Wt::WVirtualImage
viewPortWidth() const Wt::WVirtualImage
WCompositeWidget(WContainerWidget *parent=0)Wt::WCompositeWidget
WCompositeWidget(WWidget *implementation, WContainerWidget *parent)Wt::WCompositeWidget
width() const Wt::WCompositeWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WVirtualImage(int viewPortWidth, int viewPortHeight,::int64_t imageWidth,::int64_t imageHeight, int gridImageSize=256, WContainerWidget *parent=0)Wt::WVirtualImage
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WVirtualImage()Wt::WVirtualImage
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage.html new file mode 100644 index 0000000..3b1115f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage.html @@ -0,0 +1,628 @@ + + + + +Wt: Wt::WVirtualImage Class Reference + + + + + + + + + +
+ +
+

Wt::WVirtualImage Class Reference

+
+
+ +

An abstract widget that shows a viewport to a virtually large image. +More...

+ +

#include <Wt/WVirtualImage>

+
+Inheritance diagram for Wt::WVirtualImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WVirtualImage (int viewPortWidth, int viewPortHeight,::int64_t imageWidth,::int64_t imageHeight, int gridImageSize=256, WContainerWidget *parent=0)
 Creates a viewport for a virtual image.
~WVirtualImage ()
 Destructor.
void redrawAll ()
 Regenerates and redraws the image pieces.
void enableDragging ()
 Enables mouse dragging to scroll around the image.
void scroll (::int64_t dx,::int64_t dy)
 Scrolls the viewport of the image over a distance.
void scrollTo (::int64_t x,::int64_t y)
 Scrolls the viewport of the image to a specific coordinate.
::int64_t imageWidth () const
 Returns the virtual image width.
::int64_t imageHeight () const
 Returns the virtual image height.
void resizeImage (::int64_t w,::int64_t h)
 Resizes the virtual image.
int viewPortWidth () const
 Returns the viewport width.
int viewPortHeight () const
 Returns the viewport height.
int gridImageSize () const
 Returns the size of a single piece.
::int64_t currentTopLeftX () const
 Returns the current top left X coordinate.
::int64_t currentTopLeftY () const
 Returns the current top left Y coordinate.
::int64_t currentBottomRightX () const
 Returns the current bottom right X coordinate.
::int64_t currentBottomRightY () const
 Returns the current bottom right Y coordinate.
Signal< ::int64_t,::int64_t > & viewPortChanged ()
 Signal emitted whenever the viewport changes.

+Static Public Attributes

+static const ::int64_t Infinite = std::numeric_limits< ::int64_t >::max()
 Special value for imageWidth or imageHeight.

+Protected Member Functions

virtual WImagecreateImage (::int64_t x,::int64_t y, int width, int height)
 Creates a grid image for the given rectangle.
virtual WResourcerender (::int64_t x,::int64_t y, int width, int height)
 Render a grid image for the given rectangle.
+

Detailed Description

+

An abstract widget that shows a viewport to a virtually large image.

+

WVirtualImage is an abstract class which renders a large image in small pieces. The large image is broken down, and rendered as a grid of smaller square images parts.

+

The WVirtualImage may provide interactive navigation using the mouse, by reacting to dragging of the mouse on the image.

+

The WVirtualImage renders pieces in and bordering the current viewport. In this way, provided the individual pieces load sufficiently fast, the user has effectively the impression of scrolling through a single large image, without glitches. Whenever the image is navigated, if necessary, new images are rendered to maintain the border. Images that are too far from the current viewport are pruned away, so that browser memory remains bounded.

+

To use this class, you must reimplement one of two virtual methods to specify the contents of each grid piece. Either you provide a suitable WImage for every grid piece, or you provide a WResource which renders the contents for a WImage for every grid piece.

+

The total image dimensions are (0, 0) to (imageWidth, imageHeight) for a finite image, and become unbounded (including negative numbers) for each dimension which is Infinite.

+

CSS

+

Styling through CSS is not applicable.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wt::WVirtualImage::WVirtualImage (int  viewPortWidth,
int  viewPortHeight,
::int64_t  imageWidth,
::int64_t  imageHeight,
int  gridImageSize = 256,
WContainerWidget parent = 0 
)
+
+
+ +

Creates a viewport for a virtual image.

+

You must specify the size of the viewport, and the size of the virtual image. The latter dimensions may be the special value Infinite, indicating that in one or more dimensions, the image size is infinite (in practice limited by the maximum integer value).

+

In addition, you must specify the size of each square grid item. The default is 256 by 256.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WImage * Wt::WVirtualImage::createImage (::int64_t  x,
::int64_t  y,
int  width,
int  height 
) [protected, virtual]
+
+
+ +

Creates a grid image for the given rectangle.

+

Create the image which spans image coordinates with left upper corner (x, y) and given width and height.

+

Width and height will not necesarilly equal gridImageSize(), if the the image is not infinite sized.

+

The default implementation calls render() and creates an image for the resource returned.

+

You should override this method if you wish to serve for example static image content.

+
See also:
render()
+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::currentBottomRightX ( ) const
+
+
+ +

Returns the current bottom right X coordinate.

+
See also:
currentBottomRightY()
+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::currentBottomRightY ( ) const
+
+
+ +

Returns the current bottom right Y coordinate.

+
See also:
currentBottomRightX()
+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::currentTopLeftX ( ) const
+
+
+ +

Returns the current top left X coordinate.

+
See also:
currentTopLeftY()
+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::currentTopLeftY ( ) const
+
+
+ +

Returns the current top left Y coordinate.

+
See also:
currentTopLeftX()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WVirtualImage::enableDragging ( )
+
+
+ +

Enables mouse dragging to scroll around the image.

+

The cursor is changed to a 'move' symbol to indicate the interactivity.

+ +
+
+ +
+
+ + + + + + + +
int Wt::WVirtualImage::gridImageSize ( ) const
+
+
+ +

Returns the size of a single piece.

+

This is the size of a side of the square pieces that is used to render the visible part of the image.

+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::imageHeight ( ) const
+
+
+ +

Returns the virtual image height.

+
See also:
imageWidth(), resizeImage()
+ +
+
+ +
+
+ + + + + + + +
::int64_t Wt::WVirtualImage::imageWidth ( ) const
+
+
+ +

Returns the virtual image width.

+
See also:
imageHeight(), resizeImage()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WVirtualImage::redrawAll ( )
+
+
+ +

Regenerates and redraws the image pieces.

+

This method invalidates all current grid images, and recreates them.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WResource * Wt::WVirtualImage::render (::int64_t  x,
::int64_t  y,
int  width,
int  height 
) [protected, virtual]
+
+
+ +

Render a grid image for the given rectangle.

+

Returns a resource that streams an image which renders the rectangle which spans image coordinates with left upper corner (x, y) and given width and height.

+

Width and height will not necesarilly equal to gridImageSize(), if the the image is not infinite sized.

+

The default implementation throws an Exception. You must reimplement this method unless you reimplement createImage().

+
See also:
createImage()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WVirtualImage::resizeImage (::int64_t  w,
::int64_t  h 
)
+
+
+ +

Resizes the virtual image.

+

This sets a new virtual size for the image. The viewport size sets the visible portion of the image.

+
See also:
imageWidth(), imageHeight()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WVirtualImage::scroll (::int64_t  dx,
::int64_t  dy 
)
+
+
+ +

Scrolls the viewport of the image over a distance.

+
See also:
scrollTo()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WVirtualImage::scrollTo (::int64_t  x,
::int64_t  y 
)
+
+
+ +

Scrolls the viewport of the image to a specific coordinate.

+

Scroll the viewport so that its top left coordinate becomes (x, y).

+
See also:
scroll()
+ +
+
+ +
+
+ + + + + + + +
Signal< ::int64_t, ::int64_t >& Wt::WVirtualImage::viewPortChanged ( )
+
+
+ +

Signal emitted whenever the viewport changes.

+

The viewport can be changed by the user dragging the image or through the API methods scrollTo() and scroll().

+ +
+
+ +
+
+ + + + + + + +
int Wt::WVirtualImage::viewPortHeight ( ) const
+
+
+ +

Returns the viewport height.

+
See also:
viewPortWidth()
+ +
+
+ +
+
+ + + + + + + +
int Wt::WVirtualImage::viewPortWidth ( ) const
+
+
+ +

Returns the viewport width.

+
See also:
viewPortHeight()
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.map new file mode 100644 index 0000000..afd2707 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.md5 new file mode 100644 index 0000000..f3e2a0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.md5 @@ -0,0 +1 @@ +dd6f8d5398288ff0470f4e9caee4edbf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.png new file mode 100644 index 0000000..4fdcd03 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WVirtualImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage-members.html new file mode 100644 index 0000000..37a5956 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage-members.html @@ -0,0 +1,103 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WVmlImage Member List

+
+
+This is the complete list of members for Wt::WVmlImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
Brush enum valueWt::WPaintDevice
ChangeFlag enum nameWt::WPaintDevice
clear()Wt::WVmlImage [protected, virtual]
Clipping enum valueWt::WPaintDevice
done()Wt::WVmlImage [virtual]
drawArc(const WRectF &rect, double startAngle, double spanAngle)Wt::WVmlImage [virtual]
drawImage(const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)Wt::WVmlImage [virtual]
drawLine(double x1, double y1, double x2, double y2)Wt::WVmlImage [virtual]
drawPath(const WPainterPath &path)Wt::WVmlImage [virtual]
drawText(const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)Wt::WVmlImage [virtual]
Font enum valueWt::WPaintDevice
height() const Wt::WVmlImage [virtual]
Hints enum valueWt::WPaintDevice
init()Wt::WVmlImage [virtual]
paintActive() const Wt::WVmlImage [virtual]
painter() const Wt::WVmlImage [protected, virtual]
Pen enum valueWt::WPaintDevice
rendered()Wt::WVmlImage [virtual]
setChanged(WFlags< ChangeFlag > flags)Wt::WVmlImage [virtual]
setPainter(WPainter *painter)Wt::WVmlImage [protected, virtual]
Shadow enum valueWt::WPaintDevice
Transform enum valueWt::WPaintDevice
width() const Wt::WVmlImage [virtual]
WVmlImage(const WLength &width, const WLength &height)Wt::WVmlImage
~WPaintDevice()Wt::WPaintDevice [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage.html new file mode 100644 index 0000000..182f081 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage.html @@ -0,0 +1,495 @@ + + + + +Wt: Wt::WVmlImage Class Reference + + + + + + + + + +
+ +
+

Wt::WVmlImage Class Reference
+ +[Painting system] +

+
+
+ +

A paint device for rendering using the VML pseudo-standard. +More...

+ +

#include <Wt/WVmlImage>

+
+Inheritance diagram for Wt::WVmlImage:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WVmlImage (const WLength &width, const WLength &height)
 Create a VML paint device.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicates changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draws an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draws an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draws a line.
virtual void drawPath (const WPainterPath &path)
 Draws a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draws text.
virtual void init ()
 Initializes the device for painting.
virtual void done ()
 Finishes painting on the device.
virtual bool paintActive () const
 Returns whether painting is active.
+virtual std::string rendered ()
 Internal method.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.

+Protected Member Functions

virtual WPainterpainter () const
 Returns the painter that is currently painting on the device.
+virtual void setPainter (WPainter *painter)
 Sets the painter.
+virtual void clear ()
 Clears the paint device.
+

Detailed Description

+

A paint device for rendering using the VML pseudo-standard.

+

The WVmlImage is used by WPaintedWidget to render to the browser using the Vector Markup Language (VML) (to support graphics on Internet Explorer browsers).

+
Note:
The current implementation has only limited support for clipping: only rectangular areas aligned with the X/Y axes can be used as clipping path.
+

Member Function Documentation

+ +
+
+ + + + + + + +
void Wt::WVmlImage::done ( ) [virtual]
+
+
+ +

Finishes painting on the device.

+

This method is called when a WPainter stopped painting.

+
See also:
WPainter::end()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WVmlImage::drawArc (const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]
+
+
+ +

Draws an arc.

+

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

+

The arc must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WVmlImage::drawImage (const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]
+
+
+ +

Draws an image.

+

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

+

The image is transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WVmlImage::drawLine (double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]
+
+
+ +

Draws a line.

+

The line must be stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WVmlImage::drawPath (const WPainterPath path ) [virtual]
+
+
+ +

Draws a path.

+

The path must be stroked, filled, and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::WVmlImage::drawText (const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]
+
+
+ +

Draws text.

+

The text must be rendered, stroked and transformed using the current painter settings.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WVmlImage::height ( ) const [virtual]
+
+
+ +

Returns the device height.

+

The device height, in pixels, establishes the height of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WVmlImage::init ( ) [virtual]
+
+
+ +

Initializes the device for painting.

+

This method is called when a WPainter starts painting.

+
See also:
WPainter::begin(WPaintDevice *), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WVmlImage::paintActive ( ) const [virtual]
+
+
+ +

Returns whether painting is active.

+
See also:
init(), painter()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WPainter* Wt::WVmlImage::painter ( ) const [protected, virtual]
+
+
+ +

Returns the painter that is currently painting on the device.

+
See also:
init()
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WVmlImage::setChanged (WFlags< ChangeFlag flags ) [virtual]
+
+
+ +

Indicates changes in painter state.

+

The flags argument is the logical OR of one or more change flags.

+
See also:
ChangeFlag
+ +

Implements Wt::WPaintDevice.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WVmlImage::width ( ) const [virtual]
+
+
+ +

Returns the device width.

+

The device width, in pixels, establishes the width of the device coordinate system.

+ +

Implements Wt::WPaintDevice.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.map new file mode 100644 index 0000000..c97ff08 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.md5 new file mode 100644 index 0000000..3067092 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.md5 @@ -0,0 +1 @@ +2eebb57b4d86479aa424bdaa2a76d266 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.png new file mode 100644 index 0000000..d403ca5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WVmlImage__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget-members.html new file mode 100644 index 0000000..689dda7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget-members.html @@ -0,0 +1,180 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WWebWidget Member List

+
+
+This is the complete list of members for Wt::WWebWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
attributeValue(const std::string &name) const Wt::WWebWidget [virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)Wt::WWebWidget [virtual]
children() const Wt::WWebWidget
clearSides() const Wt::WWebWidget [virtual]
decorationStyle()Wt::WWebWidget [virtual]
disable()Wt::WWidget
doJavaScript(const std::string &javascript)Wt::WWebWidget [protected]
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()Wt::WWebWidget [protected, virtual]
escapeText(const WString &text, bool newlinesToo=false)Wt::WWebWidget [static]
escapeText(std::string &text, bool newlinestoo=false)Wt::WWebWidget [static]
find(const std::string &name)Wt::WWebWidget [virtual]
floatSide() const Wt::WWebWidget [virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const Wt::WWebWidget [virtual]
hiddenKeepsGeometry() const Wt::WWebWidget [virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WWebWidget [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const Wt::WWebWidget [virtual]
isEnabled() const Wt::WWebWidget [virtual]
isHidden() const Wt::WWebWidget [virtual]
isInline() const Wt::WWebWidget [virtual]
isPopup() const Wt::WWebWidget [virtual]
isRendered() const Wt::WWebWidget
isVisible() const Wt::WWebWidget [virtual]
javaScriptMember(const std::string &name) const Wt::WWebWidget [virtual]
jsRef() const Wt::WWidget
jsStringLiteral(const std::string &v, char delimiter= '\'')Wt::WWebWidget [static]
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const Wt::WWebWidget [virtual]
load()Wt::WWebWidget [virtual]
loaded() const Wt::WWebWidget [virtual]
margin(Side side) const Wt::WWebWidget [virtual]
maximumHeight() const Wt::WWebWidget [virtual]
maximumWidth() const Wt::WWebWidget [virtual]
Method typedefWt::WObject
minimumHeight() const Wt::WWebWidget [virtual]
minimumWidth() const Wt::WWebWidget [virtual]
objectName() const Wt::WObject [virtual]
offset(Side s) const Wt::WWebWidget [virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const Wt::WWebWidget [virtual]
propagateSetEnabled(bool enabled)Wt::WWebWidget [protected, virtual]
refresh()Wt::WWebWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeScript(WString &text)Wt::WWebWidget [static]
removeStyleClass(const WString &styleClass, bool force=false)Wt::WWebWidget [virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)Wt::WWebWidget [virtual]
setClearSides(WFlags< Side > sides)Wt::WWebWidget [virtual]
setDecorationStyle(const WCssDecorationStyle &style)Wt::WWebWidget [virtual]
setDisabled(bool)Wt::WWebWidget [virtual]
setFloatSide(Side s)Wt::WWebWidget [virtual]
setHidden(bool)Wt::WWebWidget [virtual]
setHiddenKeepsGeometry(bool enabled)Wt::WWebWidget [virtual]
setId(const std::string &id)Wt::WWebWidget [virtual]
setInline(bool)Wt::WWebWidget [virtual]
setJavaScriptMember(const std::string &name, const std::string &value)Wt::WWebWidget [virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)Wt::WWebWidget [virtual]
setLoadLaterWhenInvisible(bool)Wt::WWebWidget
setMargin(const WLength &margin, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setMaximumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setMinimumSize(const WLength &width, const WLength &height)Wt::WWebWidget [virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)Wt::WWebWidget [virtual]
setPopup(bool)Wt::WWebWidget [virtual]
setPositionScheme(PositionScheme scheme)Wt::WWebWidget [virtual]
setSelectable(bool selectable)Wt::WWebWidget [virtual]
setStyleClass(const WString &styleClass)Wt::WWebWidget [virtual]
setTabIndex(int index)Wt::WWebWidget [virtual]
setToolTip(const WString &toolTip)Wt::WWebWidget [virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength())Wt::WWebWidget [virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const Wt::WWebWidget [virtual]
tabIndex() const Wt::WWebWidget [virtual]
toolTip() const Wt::WWebWidget [virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const Wt::WWebWidget [virtual]
verticalAlignmentLength() const Wt::WWebWidget [virtual]
width() const Wt::WWebWidget [virtual]
WObject(WObject *parent=0)Wt::WObject
WWebWidget(WContainerWidget *parent=0)Wt::WWebWidget
Wt::WWidget::WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget.html new file mode 100644 index 0000000..8092669 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget.html @@ -0,0 +1,1867 @@ + + + + +Wt: Wt::WWebWidget Class Reference + + + + + + + + + + +
+ +

A base class for widgets with an HTML counterpart. +More...

+ +

#include <Wt/WWebWidget>

+
+Inheritance diagram for Wt::WWebWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WWebWidget (WContainerWidget *parent=0)
 Construct a WebWidget with a given parent.
virtual void setPositionScheme (PositionScheme scheme)
 Sets the CSS position scheme.
virtual PositionScheme positionScheme () const
 Returns the CSS position scheme.
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=All)
 Sets CSS offsets for a non-statically positioned widget.
virtual WLength offset (Side s) const
 Returns a CSS offset.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
virtual WLength width () const
 Returns the width.
virtual WLength height () const
 Returns the height.
virtual void setMinimumSize (const WLength &width, const WLength &height)
 Sets a minimum size.
virtual WLength minimumWidth () const
 Returns the minimum width.
virtual WLength minimumHeight () const
 Returns the minimum height.
virtual void setMaximumSize (const WLength &width, const WLength &height)
 Sets a maximum size.
virtual WLength maximumWidth () const
 Returns the maximum width.
virtual WLength maximumHeight () const
 Returns the maximum height.
+virtual void setLineHeight (const WLength &height)
 Sets the CSS line height for contained text.
virtual WLength lineHeight () const
 Returns the CSS line height for contained text.
virtual void setFloatSide (Side s)
 Specifies a CSS float side.
virtual Side floatSide () const
 Returns the CSS float side.
virtual void setClearSides (WFlags< Side > sides)
 Sets the sides that should be cleared of floats.
virtual WFlags< SideclearSides () const
 Returns the sides that should remain empty.
virtual void setMargin (const WLength &margin, WFlags< Side > sides=All)
 Sets CSS margins around the widget.
virtual WLength margin (Side side) const
 Returns a CSS margin set.
virtual void setHiddenKeepsGeometry (bool enabled)
 Sets whether the widget keeps its geometry when hidden.
virtual bool hiddenKeepsGeometry () const
 Returns whether the widget keeps its geometry when hidden.
virtual void setHidden (bool)
 Sets whether the widget is hidden.
virtual bool isHidden () const
 Returns whether the widget is set hidden.
virtual bool isVisible () const
 Returns whether the widget is visible.
virtual void setDisabled (bool)
 Sets whether the widget is disabled.
virtual bool isDisabled () const
 Returns whether the widget is set disabled.
virtual bool isEnabled () const
 Returns whether the widget is enabled.
virtual void setPopup (bool)
 Lets the widget overlay over other sibling widgets.
virtual bool isPopup () const
 Returns whether the widget is overlayed.
virtual void setInline (bool)
 Sets whether the widget is displayed inline or as a block.
virtual bool isInline () const
 Returns whether the widget is displayed inline or as block.
virtual void setDecorationStyle (const WCssDecorationStyle &style)
 Sets a CSS decoration style.
virtual WCssDecorationStyledecorationStyle ()
 Returns the decoration style of this widget.
virtual void setStyleClass (const WString &styleClass)
 Sets (one or more) CSS style classes.
virtual WString styleClass () const
 Returns the CSS style class.
virtual void addStyleClass (const WString &styleClass, bool force=false)
 Adds a CSS style class.
virtual void removeStyleClass (const WString &styleClass, bool force=false)
 Removes a CSS style class.
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength())
 Sets the vertical alignment.
virtual AlignmentFlag verticalAlignment () const
 Returns the vertical alignment.
virtual WLength verticalAlignmentLength () const
 Returns the fixed vertical alignment that was set.
virtual void setToolTip (const WString &toolTip)
 Sets a tooltip.
+virtual WString toolTip () const
 Returns the tooltip.
virtual void refresh ()
 Refresh the widget.
virtual void setAttributeValue (const std::string &name, const WString &value)
 Sets an attribute value.
virtual WString attributeValue (const std::string &name) const
 Returns an attribute value.
virtual void setJavaScriptMember (const std::string &name, const std::string &value)
 Sets a JavaScript member.
virtual std::string javaScriptMember (const std::string &name) const
 Returns the value of a JavaScript member.
virtual void callJavaScriptMember (const std::string &name, const std::string &args)
 Calls a JavaScript member.
virtual void load ()
 Loads content just before the widget is used.
virtual bool loaded () const
 Returns whether this widget has been loaded.
virtual void setTabIndex (int index)
 Sets the tab index.
virtual int tabIndex () const
 Returns the tab index.
virtual void setId (const std::string &id)
 Sets the CSS Id.
virtual WWidgetfind (const std::string &name)
 Finds a descendend widget by name.
virtual void setSelectable (bool selectable)
 Sets as selectable.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
void setLoadLaterWhenInvisible (bool)
 Change the way the widget is loaded when invisible.
const std::vector< WWidget * > & children () const
 Returns contained widgets.
bool isRendered () const
 Returns whether the widget is rendered.

+Static Public Member Functions

+static WString escapeText (const WString &text, bool newlinesToo=false)
 Escape HTML control characters in the text, to display literally.
+static std::string & escapeText (std::string &text, bool newlinestoo=false)
 Escape HTML control characters in the text, to display literally.
static bool removeScript (WString &text)
 Remove tags/attributes from text that are not passive.
static std::string jsStringLiteral (const std::string &v, char delimiter= '\'')
 Turn a UTF8 encoded string into a JavaScript string literal.

+Protected Member Functions

virtual void propagateSetEnabled (bool enabled)
 Propagates that a widget was enabled or disabled through children.
virtual void enableAjax ()
 Progresses to an Ajax-enabled widget.
void doJavaScript (const std::string &javascript)
 Executes the given JavaScript statements, possibly delayed until after the widget is rendered.
+

Detailed Description

+

A base class for widgets with an HTML counterpart.

+

All descendants of WWebWidget implement a widget which corresponds almost one-on-one with an HTML element. These widgets provide most capabilities of these HTML elements, but rarely make no attempt to do anything more.

+
See also:
WCompositeWidget
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
WWebWidget::WWebWidget (WContainerWidget parent = 0 )
+
+
+ +

Construct a WebWidget with a given parent.

+
See also:
WWidget::WWidget
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::addStyleClass (const WString styleClass,
bool  force = false 
) [virtual]
+
+
+ +

Adds a CSS style class.

+

When force = true, a JavaScript call will be used to add the style class to the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WString WWebWidget::attributeValue (const std::string &  name ) const [virtual]
+
+
+ +

Returns an attribute value.

+
See also:
setAttributeValue()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::callJavaScriptMember (const std::string &  name,
const std::string &  args 
) [virtual]
+
+
+ +

Calls a JavaScript member.

+

This calls a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::vector< WWidget * > & WWebWidget::children ( ) const
+
+
+ +

Returns contained widgets.

+
See also:
WContainerWidget::addWidget()
+ +

Reimplemented from Wt::WObject.

+ +

Reimplemented in Wt::Ext::Splitter.

+ +
+
+ +
+
+ + + + + + + +
WFlags< Side > WWebWidget::clearSides ( ) const [virtual]
+
+
+ +

Returns the sides that should remain empty.

+
See also:
setClearSides(WFlags<Side>)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WCssDecorationStyle & WWebWidget::decorationStyle ( ) [virtual]
+
+
+ +

Returns the decoration style of this widget.

+

This groups all decorative aspects of the widget, which do not affect the widget layout (except for the border properties which may behave like extra margin around the widget).

+

When a decoration style has not been previously set, it returns a default decoration style object.

+
See also:
setDecorationStyle()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::doJavaScript (const std::string &  javascript ) [protected]
+
+
+ +

Executes the given JavaScript statements, possibly delayed until after the widget is rendered.

+

Calling WApplication::doJavaScript() with JavaScript code that refers to a widget that is still to be rendered causes JavaScript errors. This happens for example when an object is created, but not yet inserted in the widget tree.

+

This method offers an alternative: it queues up all doJavaScript calls for widgets that were not yet rendered until they are rendered.

+ +
+
+ +
+
+ + + + + + + +
void WWebWidget::enableAjax ( ) [protected, virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WAnchor, Wt::WFileUpload, Wt::WFormWidget, Wt::WPaintedWidget, and Wt::WTemplate.

+ +
+
+ +
+
+ + + + + + + + +
WWidget * WWebWidget::find (const std::string &  name ) [virtual]
+
+
+ +

Finds a descendend widget by name.

+
See also:
setObjectName()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
Side WWebWidget::floatSide ( ) const [virtual]
+
+
+ +

Returns the CSS float side.

+
See also:
setFloatSide(Side)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::height ( ) const [virtual]
+
+
+ +

Returns the height.

+

Returns the height set for this widget. This is not a calculated height, based on layout, but the height as specified previously with resize(const WLength& width, const WLength& height).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), width()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::hiddenKeepsGeometry ( ) const [virtual]
+
+
+ +

Returns whether the widget keeps its geometry when hidden.

+
See also:
setHiddenKeepsGeometry()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
const std::string WWebWidget::id ( ) const [virtual]
+
+
+ +

Returns the (unique) identifier for this object.

+

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

+

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

+
See also:
WWidget::jsRef()
+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isDisabled ( ) const [virtual]
+
+
+ +

Returns whether the widget is set disabled.

+

A widget that is not set disabled may still be disabled when one of its ancestor widgets is set disabled. Use isEnabled() to find out whether a widget is enabled.

+
See also:
setDisabled(), isEnabled()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isEnabled ( ) const [virtual]
+
+
+ +

Returns whether the widget is enabled.

+

A widget is enabled if it is not disabled, and none of its ancestors are disabled. This method returns whether the widget is rendered as enabled, while isDisabled() returns whether a widget has been explicitly disabled.

+

Note that a widget may be at the same time not enabled, and not disabled, in case one of its ancestors was disabled.

+
See also:
isDisabled()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::Ext::Component, and Wt::WInteractWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isHidden ( ) const [virtual]
+
+
+ +

Returns whether the widget is set hidden.

+

A widget that is not hidden may still be not visible when one of its ancestor widgets is hidden. Use isVisible() to check the visibility of a widget.

+
See also:
setHidden(), isVisible()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isInline ( ) const [virtual]
+
+
+ +

Returns whether the widget is displayed inline or as block.

+
See also:
setInline(bool)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isPopup ( ) const [virtual]
+
+
+ +

Returns whether the widget is overlayed.

+

This applies to CSS-based layout.

+
See also:
setPopup(bool)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isRendered ( ) const
+
+
+ +

Returns whether the widget is rendered.

+
See also:
jsRef()
+ +

Reimplemented from Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::isVisible ( ) const [virtual]
+
+
+ +

Returns whether the widget is visible.

+

A widget is visible if it is not hidden, and none of its ancestors are hidden. This method returns the true visibility, while isHidden() returns whether a widget has been explicitly hidden.

+

Note that a widget may be at the same time not hidden, and not visible, in case one of its ancestors was hidden.

+
See also:
isHidden()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
std::string WWebWidget::javaScriptMember (const std::string &  name ) const [virtual]
+
+
+ +

Returns the value of a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
std::string WWebWidget::jsStringLiteral (const std::string &  v,
char  delimiter = '\'' 
) [static]
+
+
+ +

Turn a UTF8 encoded string into a JavaScript string literal.

+

The delimiter may be a single or double quote.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::lineHeight ( ) const [virtual]
+
+
+ +

Returns the CSS line height for contained text.

+

sa setLineHeight()

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
void WWebWidget::load ( ) [virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WInteractWidget, and Wt::WViewWidget.

+ +
+
+ +
+
+ + + + + + + +
bool WWebWidget::loaded ( ) const [virtual]
+
+
+ +

Returns whether this widget has been loaded.

+
See also:
load()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WLength WWebWidget::margin (Side  side ) const [virtual]
+
+
+ +

Returns a CSS margin set.

+

This applies to CSS-based layout.

+
See also:
setMargin()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::maximumHeight ( ) const [virtual]
+
+
+ +

Returns the maximum height.

+

Returns the minmum height set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumWidth()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::maximumWidth ( ) const [virtual]
+
+
+ +

Returns the maximum width.

+

Returns the maximum width set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::minimumHeight ( ) const [virtual]
+
+
+ +

Returns the minimum height.

+

Returns the minmum height set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumWidth()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::minimumWidth ( ) const [virtual]
+
+
+ +

Returns the minimum width.

+

Returns the minimum width set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
WLength WWebWidget::offset (Side  side ) const [virtual]
+
+
+ +

Returns a CSS offset.

+

This applies to CSS-based layout.

+
See also:
setOffsets(const WLength&, WFlags<Side>)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
PositionScheme WWebWidget::positionScheme ( ) const [virtual]
+
+
+ +

Returns the CSS position scheme.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, setPositionScheme(PositionScheme)
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::propagateSetEnabled (bool  enabled ) [protected, virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WFormWidget, Wt::WGroupBox, Wt::WInteractWidget, and Wt::WLabel.

+ +
+
+ +
+
+ + + + + + + +
void WWebWidget::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::Ext::AbstractButton, Wt::Ext::ComboBox, Wt::Ext::FormField, Wt::Ext::MessageBox, Wt::Ext::Panel, Wt::Ext::TableView, Wt::Ext::TabWidget, Wt::WComboBox, Wt::WGroupBox, Wt::WPushButton, Wt::WTemplate, Wt::WText, and Wt::WViewWidget.

+ +
+
+ +
+
+ + + + + + + + +
bool WWebWidget::removeScript (WString text ) [static]
+
+
+ +

Remove tags/attributes from text that are not passive.

+

This removes tags and attributes from XHTML-formatted text that do not simply display something but may trigger scripting, and could have been injected by a malicious user for Cross-Site Scripting (XSS).

+

This method is used by the library to sanitize XHTML-formatted text set in WText, but it may also be useful outside the library to sanitize user content when direcly using JavaScript.

+

Modifies the text if needed. When the text is not proper XML, returns false.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::removeStyleClass (const WString styleClass,
bool  force = false 
) [virtual]
+
+
+ +

Removes a CSS style class.

+

When force = true, a JavaScript call will be used to remove the style class from the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented from Wt::WWidget.

+ +

Reimplemented in Wt::Ext::TextEdit, Wt::WFlashObject, Wt::WGLWidget, Wt::WHTML5Video, Wt::WPaintedWidget, Wt::WProgressBar, and Wt::WTextEdit.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setAttributeValue (const std::string &  name,
const WString value 
) [virtual]
+
+
+ +

Sets an attribute value.

+

Associate an extra attribute with this widget, with the given value. This is only useful when processing dom nodes associated with widgets in custom JavaScript code.

+
See also:
JSlot, WApplication::doJavaScript()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setClearSides (WFlags< Side sides ) [virtual]
+
+
+ +

Sets the sides that should be cleared of floats.

+

This pushes the widget down until it is not surrounded by floats at the sides (which may be a combination of Wt::Left and Wt::Right).

+

This applies to CSS-based layout.

+
See also:
setFloatSide()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setDecorationStyle (const WCssDecorationStyle style ) [virtual]
+
+
+ +

Sets a CSS decoration style.

+

This copies the style over its current decorationStyle()

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setDisabled (bool  disabled ) [virtual]
+
+
+ +

Sets whether the widget is disabled.

+

Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.

+

Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.

+
See also:
disable(), enable()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setFloatSide (Side  s ) [virtual]
+
+
+ +

Specifies a CSS float side.

+

This only applies to widgets with a Wt::Static positionScheme().

+

This lets the widget float to one of the sides of the parent widget, at the current line. A typical use is to position images within text. Valid values for Side orWt::None java {javadoclink Side::None None}, Wt::Left or Wt::Right.

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setHidden (bool  hidden ) [virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::Ext::Dialog, Wt::Ext::MessageBox, Wt::Ext::Widget, and Wt::WFormWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setHiddenKeepsGeometry (bool  enabled ) [virtual]
+
+
+ +

Sets whether the widget keeps its geometry when hidden.

+

Normally, a widget that is hidden will no longer occupy space, causing a reflow of sibling widgets. Using this method you may change this behavior to keep an (open) space when hidden.

+
Note:
Currently you can only set this before initial rendering.
+
See also:
setHidden()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setId (const std::string &  id ) [virtual]
+
+
+ +

Sets the CSS Id.

+

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed. This is mostly useful for in tests using a test plan that manipulates DOM elements by Id.

+

By default, auto-generated id's are used.

+
See also:
WObject::id()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setInline (bool  inlined ) [virtual]
+
+
+ +

Sets whether the widget is displayed inline or as a block.

+

This option changes whether this widget must be rendered in line with sibling widgets wrapping at the right edge of the parent container (like text), or whether this widget must be rendered as a rectangular block that stacks vertically with sibling widgets (unless a CSS float property is applied). Depending on the widget type, the default value is inline (such as for example for WText, or WPushButton), or block (such as for example for a WContainerWidget).

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setJavaScriptMember (const std::string &  name,
const std::string &  value 
) [virtual]
+
+
+ +

Sets a JavaScript member.

+

This binds a JavaScript member, which is set as a JavaScript property to the DOM object that implements this widget. The value may be any JavaScript expression, including a function.

+

Members that start with "wt" are reserved for internal use. You may define a member "wtResize(self, width, + height)" method if your widget needs active layout management. If defined, this method will be used by layout managers and when doing resize() to set the size of the widget, instead of setting the CSS width and height properties.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setLoadLaterWhenInvisible (bool  how )
+
+
+ +

Change the way the widget is loaded when invisible.

+

By default, invisible widgets are loaded only after visible content. For tiny widgets this may lead to a performance loss, instead of the expected increase, because they require many more DOM manipulations to render, reducing the overall responsiveness of the application.

+

Therefore, this is disabled for some widgets like WImage, or empty WContainerWidgets.

+

You may also want to disable deferred loading when JavaScript event handling expects the widget to be loaded.

+

Usually the default settings are fine, but you may want to change the behaviour.

+
See also:
WApplication::setTwoPhaseRenderingThreshold()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setMargin (const WLength margin,
WFlags< Side sides = All 
) [virtual]
+
+
+ +

Sets CSS margins around the widget.

+

Setting margin has the effect of adding a distance between the widget and surrounding widgets. The default margin (with an automatic length) is zero.

+

Use any combination of Wt::Left, Wt::Right, Wt::Bottom, or Wt::Top.

+

This applies to CSS-based layout.

+
See also:
margin()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setMaximumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a maximum size.

+

Specify a minimum size for this widget.

+
See also:
resize(), maximumWidth(), maximumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setMinimumSize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Sets a minimum size.

+

Specify a minimum size for this widget. When the widget is managed using a layout manager, these sizes are also taken into account.

+
See also:
resize(), minimumWidth(), minimumHeight()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setOffsets (const WLength offset,
WFlags< Side sides = All 
) [virtual]
+
+
+ +

Sets CSS offsets for a non-statically positioned widget.

+

The argument sides may be a combination of Wt::Left, Wt::Right, Wt::Top, and Wt::Bottom.

+

This applies only to widgets that have a position scheme that is Wt::Relative, Wt::Absolute, or Wt::Fixed, and has a slightly different meaning for these three cases.

+

For a relatively positioned widget, an offset applies relative to the position the widget would have when layed-out using a static position scheme. The widget may be shifted to the left or right by specifying an offset for the left or right) side. The widget may be shifted vertically, by specifying an offset for the top or bottom side.

+

For an absolutely positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the corresponding side of the reference parent widget. Thus, setting all offsets to 0 result in a widget that spans the entire reference widget. The reference parent widget is the first ancestor widget that is a table cell, or a widget with a relative, absolute or fixed position scheme.

+

For an fixed positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the browser window, regardless of scrolling. Thus, setting all offsets to 0 result in a widget that spans the entire browser window.

+

This applies to CSS-based layout.

+
See also:
offset(Side) const
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setPopup (bool  popup ) [virtual]
+
+
+ +

Lets the widget overlay over other sibling widgets.

+

A widget that isPopup() will be rendered on top of any other sibling widget contained within the same parent (including other popup widgets previously added to the container).

+

This will only have an effect when the widgetis either Wt::Absolute or Wt::Fixed positionScheme().

+

This applies to CSS-based layout, and configures the z-index property.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setPositionScheme (PositionScheme  scheme ) [virtual]
+
+
+ +

Sets the CSS position scheme.

+

Establishes how the widget must be layed-out relative to its siblings. The default position scheme is Static.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, positionScheme()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setSelectable (bool  selectable ) [virtual]
+
+
+ +

Sets as selectable.

+

When a widget is made unselectable, a selection of text (or images) will not be visible (but may still be possible).

+

By default, the widget inherits this property from its parent, and this property propagates to all children. The top level container (WApplication::root()) selectable by default.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setStyleClass (const WString styleClass ) [virtual]
+
+
+ +

Sets (one or more) CSS style classes.

+

You may set one or more space separated style classes. CSS style class works in conjunction with style sheet, and provides a flexible way to provide many widgets the same markup.

+

Setting an empty string removes the style class(es).

+
See also:
WApplication::styleSheet()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setTabIndex (int  index ) [virtual]
+
+
+ +

Sets the tab index.

+

For widgets that receive focus, focus is passed on to the next widget in the tabbing chain based on their tab index. When the user navigates through form widgets using the keyboard, widgets receive focus starting from the element with the lowest tab index to elements with the highest tab index.

+

A tab index only applies to widgets than can receive focus (which are WFormWidget, WAnchor, WPushButton), but setting a tab index on any other type of widget will propagate to its contained form widgets.

+

Widgets with a same tab index will receive focus in the same order as they are inserted in the widget tree.

+

The default tab index is 0.

+
See also:
setTabOrder()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WFormWidget.

+ +
+
+ +
+
+ + + + + + + + +
void WWebWidget::setToolTip (const WString text ) [virtual]
+
+
+ +

Sets a tooltip.

+

The tooltip is displayed when the cursor hovers over the widget.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void WWebWidget::setVerticalAlignment (AlignmentFlag  alignment,
const WLength length = WLength() 
) [virtual]
+
+
+ +

Sets the vertical alignment.

+

This only applies to inline widgets, and determines how to position itself on the current line, with respect to sibling inline widgets.

+

This applies to CSS-based layout.

+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WString WWebWidget::styleClass ( ) const [virtual]
+
+
+ +

Returns the CSS style class.

+
See also:
setStyleClass()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
int WWebWidget::tabIndex ( ) const [virtual]
+
+
+ +

Returns the tab index.

+
See also:
setTabIndex()
+ +

Implements Wt::WWidget.

+ +

Reimplemented in Wt::WFormWidget.

+ +
+
+ +
+
+ + + + + + + +
AlignmentFlag WWebWidget::verticalAlignment ( ) const [virtual]
+
+
+ +

Returns the vertical alignment.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::verticalAlignmentLength ( ) const [virtual]
+
+
+ +

Returns the fixed vertical alignment that was set.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implements Wt::WWidget.

+ +
+
+ +
+
+ + + + + + + +
WLength WWebWidget::width ( ) const [virtual]
+
+
+ +

Returns the width.

+

Returns the width set for this widget. This is not a calculated width, based on layout, but the width as specified with resize(const WLength&, const WLength&).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), height()
+ +

Implements Wt::WWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.map new file mode 100644 index 0000000..7ad103a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.map @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.md5 new file mode 100644 index 0000000..b4e19f8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.md5 @@ -0,0 +1 @@ +6c0c495571c29c4e4a54967cbcfa6686 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.png new file mode 100644 index 0000000..ded08ef Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WWebWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget-members.html new file mode 100644 index 0000000..8b84757 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget-members.html @@ -0,0 +1,173 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WWidget Member List

+
+
+This is the complete list of members for Wt::WWidget, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acceptDrops(const std::string &mimeType, const WString &hoverStyleClass=WString())Wt::WWidget [virtual]
Wt::WObject::addChild(WObject *child)Wt::WObject
addStyleClass(const WString &styleClass, bool force=false)=0Wt::WWidget [pure virtual]
attributeValue(const std::string &name) const =0Wt::WWidget [pure virtual]
boxBorder(Orientation orientation) const Wt::WWidget [protected, virtual]
boxPadding(Orientation orientation) const Wt::WWidget [protected, virtual]
callJavaScriptMember(const std::string &name, const std::string &args)=0Wt::WWidget [pure virtual]
children() const Wt::WObject
clearSides() const =0Wt::WWidget [pure virtual]
decorationStyle()=0Wt::WWidget [pure virtual]
disable()Wt::WWidget
dropEvent(WDropEvent dropEvent)Wt::WWidget [protected, virtual]
enable()Wt::WWidget
enableAjax()=0Wt::WWidget [protected, pure virtual]
find(const std::string &name)=0Wt::WWidget [pure virtual]
floatSide() const =0Wt::WWidget [pure virtual]
getStateless(Method method)Wt::WWidget [protected, virtual]
height() const =0Wt::WWidget [pure virtual]
hiddenKeepsGeometry() const =0Wt::WWidget [pure virtual]
hide()Wt::WWidget
htmlText(std::ostream &out)Wt::WWidget [virtual]
id() const Wt::WObject [virtual]
implementJavaScript(void(T::*method)(), const std::string &jsCode)Wt::WObject
implementStateless(void(T::*method)())Wt::WObject
implementStateless(void(T::*method)(), void(T::*undoMethod)())Wt::WObject
isDisabled() const =0Wt::WWidget [pure virtual]
isEnabled() const =0Wt::WWidget [pure virtual]
isHidden() const =0Wt::WWidget [pure virtual]
isInline() const =0Wt::WWidget [pure virtual]
isPopup() const =0Wt::WWidget [pure virtual]
isRendered() const Wt::WWidget
isVisible() const =0Wt::WWidget [pure virtual]
javaScriptMember(const std::string &name) const =0Wt::WWidget [pure virtual]
jsRef() const Wt::WWidget
layoutSizeAware() const Wt::WWidget
layoutSizeChanged(int width, int height)Wt::WWidget [protected, virtual]
lineHeight() const =0Wt::WWidget [pure virtual]
load()=0Wt::WWidget [pure virtual]
loaded() const =0Wt::WWidget [pure virtual]
margin(Side side) const =0Wt::WWidget [pure virtual]
maximumHeight() const =0Wt::WWidget [pure virtual]
maximumWidth() const =0Wt::WWidget [pure virtual]
Method typedefWt::WObject
minimumHeight() const =0Wt::WWidget [pure virtual]
minimumWidth() const =0Wt::WWidget [pure virtual]
objectName() const Wt::WObject [virtual]
offset(Side side) const =0Wt::WWidget [pure virtual]
parent() const Wt::WWidget
positionAt(const WWidget *widget, Orientation orientation=Vertical)Wt::WWidget
positionScheme() const =0Wt::WWidget [pure virtual]
propagateSetEnabled(bool enabled)=0Wt::WWidget [protected, pure virtual]
refresh()Wt::WWidget [virtual]
Wt::WObject::removeChild(WObject *child)Wt::WObject
removeStyleClass(const WString &styleClass, bool force=false)=0Wt::WWidget [pure virtual]
resetLearnedSlot(void(T::*method)())Wt::WObject
resetLearnedSlots()Wt::WObject
resize(const WLength &width, const WLength &height)Wt::WWidget [virtual]
sender()Wt::WObject [protected, static]
setAttributeValue(const std::string &name, const WString &value)=0Wt::WWidget [pure virtual]
setClearSides(WFlags< Side > sides)=0Wt::WWidget [pure virtual]
setDecorationStyle(const WCssDecorationStyle &style)=0Wt::WWidget [pure virtual]
setDisabled(bool disabled)=0Wt::WWidget [pure virtual]
setFloatSide(Side s)=0Wt::WWidget [pure virtual]
setHidden(bool hidden)=0Wt::WWidget [pure virtual]
setHiddenKeepsGeometry(bool enabled)=0Wt::WWidget [pure virtual]
setId(const std::string &id)=0Wt::WWidget [pure virtual]
setInline(bool inlined)=0Wt::WWidget [pure virtual]
setJavaScriptMember(const std::string &name, const std::string &value)=0Wt::WWidget [pure virtual]
setLayoutSizeAware(bool sizeAware)Wt::WWidget [protected]
setLineHeight(const WLength &height)=0Wt::WWidget [pure virtual]
setMargin(const WLength &margin, WFlags< Side > sides=All)=0Wt::WWidget [pure virtual]
setMaximumSize(const WLength &width, const WLength &height)=0Wt::WWidget [pure virtual]
setMinimumSize(const WLength &width, const WLength &height)=0Wt::WWidget [pure virtual]
setObjectName(const std::string &name)Wt::WObject
setOffsets(const WLength &offset, WFlags< Side > sides=All)=0Wt::WWidget [pure virtual]
setPopup(bool popup)=0Wt::WWidget [pure virtual]
setPositionScheme(PositionScheme scheme)=0Wt::WWidget [pure virtual]
setSelectable(bool selectable)=0Wt::WWidget [pure virtual]
setStyleClass(const WString &styleClass)=0Wt::WWidget [pure virtual]
setTabIndex(int index)=0Wt::WWidget [pure virtual]
setToolTip(const WString &text)=0Wt::WWidget [pure virtual]
setVerticalAlignment(AlignmentFlag alignment, const WLength &length=WLength::Auto)=0Wt::WWidget [pure virtual]
show()Wt::WWidget
stopAcceptDrops(const std::string &mimeType)Wt::WWidget [virtual]
styleClass() const =0Wt::WWidget [pure virtual]
tabIndex() const =0Wt::WWidget [pure virtual]
toolTip() const =0Wt::WWidget [pure virtual]
tr(const char *key)Wt::WWidget [static]
verticalAlignment() const =0Wt::WWidget [pure virtual]
verticalAlignmentLength() const =0Wt::WWidget [pure virtual]
width() const =0Wt::WWidget [pure virtual]
WObject(WObject *parent=0)Wt::WObject
WWidget(WContainerWidget *parent=0)Wt::WWidget [protected]
~WObject()Wt::WObject [virtual]
~WWidget()Wt::WWidget [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget.html new file mode 100644 index 0000000..12f7961 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget.html @@ -0,0 +1,2169 @@ + + + + +Wt: Wt::WWidget Class Reference + + + + + + + + + + +
+ +

The abstract base class for a user-interface component. +More...

+ +

#include <Wt/WWidget>

+
+Inheritance diagram for Wt::WWidget:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

virtual ~WWidget ()
 Destructor.
WWidgetparent () const
 Returns the parent widget.
virtual void setPositionScheme (PositionScheme scheme)=0
 Sets the CSS position scheme.
virtual PositionScheme positionScheme () const =0
 Returns the CSS position scheme.
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=All)=0
 Sets CSS offsets for a non-statically positioned widget.
virtual WLength offset (Side side) const =0
 Returns a CSS offset.
virtual void resize (const WLength &width, const WLength &height)
 Resizes the widget.
virtual WLength width () const =0
 Returns the width.
virtual WLength height () const =0
 Returns the height.
virtual void setMinimumSize (const WLength &width, const WLength &height)=0
 Sets a minimum size.
virtual WLength minimumWidth () const =0
 Returns the minimum width.
virtual WLength minimumHeight () const =0
 Returns the minimum height.
virtual void setMaximumSize (const WLength &width, const WLength &height)=0
 Sets a maximum size.
virtual WLength maximumWidth () const =0
 Returns the maximum width.
virtual WLength maximumHeight () const =0
 Returns the maximum height.
void positionAt (const WWidget *widget, Orientation orientation=Vertical)
 Positions a widget next to another widget.
+virtual void setLineHeight (const WLength &height)=0
 Sets the CSS line height for contained text.
virtual WLength lineHeight () const =0
 Returns the CSS line height for contained text.
virtual void setFloatSide (Side s)=0
 Specifies a CSS float side.
virtual Side floatSide () const =0
 Returns the CSS float side.
virtual void setClearSides (WFlags< Side > sides)=0
 Sets the sides that should be cleared of floats.
virtual WFlags< SideclearSides () const =0
 Returns the sides that should remain empty.
virtual void setMargin (const WLength &margin, WFlags< Side > sides=All)=0
 Sets CSS margins around the widget.
virtual WLength margin (Side side) const =0
 Returns a CSS margin set.
virtual void setHiddenKeepsGeometry (bool enabled)=0
 Sets whether the widget keeps its geometry when hidden.
virtual bool hiddenKeepsGeometry () const =0
 Returns whether the widget keeps its geometry when hidden.
virtual void setHidden (bool hidden)=0
 Sets whether the widget is hidden.
virtual bool isHidden () const =0
 Returns whether the widget is set hidden.
virtual bool isVisible () const =0
 Returns whether the widget is visible.
virtual void setDisabled (bool disabled)=0
 Sets whether the widget is disabled.
virtual bool isDisabled () const =0
 Returns whether the widget is set disabled.
virtual bool isEnabled () const =0
 Returns whether the widget is enabled.
virtual void setPopup (bool popup)=0
 Lets the widget overlay over other sibling widgets.
virtual bool isPopup () const =0
 Returns whether the widget is overlayed.
virtual void setInline (bool inlined)=0
 Sets whether the widget is displayed inline or as a block.
virtual bool isInline () const =0
 Returns whether the widget is displayed inline or as block.
virtual void setDecorationStyle (const WCssDecorationStyle &style)=0
 Sets a CSS decoration style.
virtual WCssDecorationStyledecorationStyle ()=0
 Returns the decoration style of this widget.
virtual void setStyleClass (const WString &styleClass)=0
 Sets (one or more) CSS style classes.
virtual WString styleClass () const =0
 Returns the CSS style class.
virtual void addStyleClass (const WString &styleClass, bool force=false)=0
 Adds a CSS style class.
virtual void removeStyleClass (const WString &styleClass, bool force=false)=0
 Removes a CSS style class.
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto)=0
 Sets the vertical alignment.
virtual AlignmentFlag verticalAlignment () const =0
 Returns the vertical alignment.
virtual WLength verticalAlignmentLength () const =0
 Returns the fixed vertical alignment that was set.
virtual void setToolTip (const WString &text)=0
 Sets a tooltip.
+virtual WString toolTip () const =0
 Returns the tooltip.
virtual void refresh ()
 Refresh the widget.
std::string jsRef () const
 Returns a JavaScript expression to the corresponding DOM node.
virtual void setAttributeValue (const std::string &name, const WString &value)=0
 Sets an attribute value.
virtual WString attributeValue (const std::string &name) const =0
 Returns an attribute value.
virtual void setJavaScriptMember (const std::string &name, const std::string &value)=0
 Sets a JavaScript member.
virtual std::string javaScriptMember (const std::string &name) const =0
 Returns the value of a JavaScript member.
virtual void callJavaScriptMember (const std::string &name, const std::string &args)=0
 Calls a JavaScript member.
virtual void load ()=0
 Loads content just before the widget is used.
virtual bool loaded () const =0
 Returns whether this widget has been loaded.
virtual void setTabIndex (int index)=0
 Sets the tab index.
virtual int tabIndex () const =0
 Returns the tab index.
virtual void acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString())
 Sets a mime type to be accepted for dropping.
virtual void stopAcceptDrops (const std::string &mimeType)
 Indicates that a mime type is no longer accepted for dropping.
virtual void setId (const std::string &id)=0
 Sets the CSS Id.
virtual WWidgetfind (const std::string &name)=0
 Finds a descendend widget by name.
virtual void htmlText (std::ostream &out)
 Streams the (X)HTML representation.
virtual void setSelectable (bool selectable)=0
 Sets as selectable.
bool isRendered () const
 Returns whether the widget is rendered.
void hide ()
 Hides the widget.
void show ()
 Shows the widget.
void enable ()
 Enables the widget.
void disable ()
 Disable thes widget.
bool layoutSizeAware () const
 Returns whether the widget is layout size aware.

+Static Public Member Functions

static WString tr (const char *key)
 Short hand for WString::tr()

+Protected Member Functions

void setLayoutSizeAware (bool sizeAware)
 Sets the widget to be aware of its size set by a layout manager.
virtual void layoutSizeChanged (int width, int height)
 Virtual method that indicates a size change.
 WWidget (WContainerWidget *parent=0)
 Creates a widget.
virtual void dropEvent (WDropEvent dropEvent)
 Handles a drop event.
virtual void enableAjax ()=0
 Progresses to an Ajax-enabled widget.
virtual int boxPadding (Orientation orientation) const
 Returns the widget's built-in padding.
virtual int boxBorder (Orientation orientation) const
 Returns the widget's built-in border width.
virtual void propagateSetEnabled (bool enabled)=0
 Propagates that a widget was enabled or disabled through children.
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation.
+

Detailed Description

+

The abstract base class for a user-interface component.

+

The user-interface is organized in a tree structure, in which each nodes is a widgets. All widgets, except for the application's root widget and dialogs, have a parent which is usually a WContainerWidget.

+

When a widget is deleted, it is also visually removed from the user-interface and all children are deleted recursively.

+

This is an abstract base class. Implementations derive either from the abstract WWebWidget (for basic widgets with a direct HTML counter-part) or from the abstract WCompositeWidget (for anything else). To add a WWebWidget directly to a parent container, either specify the parent in the constructor (which is conventionally the last constructor argument), or add the widget to the parent using WContainerWidget::addWidget(). Alternatively, you may add the widget to a layout manager set for a WContainerWidget.

+

A widget provides methods to manage its decorative style base on CSS. It also provides access to CSS-based layout, which you may not use when the widget is not inserted into a layout manager.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Wt::WWidget::~WWidget ( ) [virtual]
+
+
+ +

Destructor.

+

Deletes a widget and all children (recursively). If the widget is contained in another widget, it is removed first.

+
See also:
WContainerWidget::removeWidget()
+ +
+
+ +
+
+ + + + + + + + +
Wt::WWidget::WWidget (WContainerWidget parent = 0 ) [protected]
+
+
+ +

Creates a widget.

+

When a parent container is specified, the widget is added to the container, using WContainerWidget::addWidget().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WWidget::acceptDrops (const std::string &  mimeType,
const WString hoverStyleClass = WString() 
) [virtual]
+
+
+ +

Sets a mime type to be accepted for dropping.

+

You may specify a style class that is applied to the widget when the specified mimetype hovers on top of it.

+
See also:
dropEvent(), WInteractWidget::setDraggable(), stopAcceptDrops()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::addStyleClass (const WString styleClass,
bool  force = false 
) [pure virtual]
+
+
+ +

Adds a CSS style class.

+

When force = true, a JavaScript call will be used to add the style class to the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual WString Wt::WWidget::attributeValue (const std::string &  name ) const [pure virtual]
+
+
+ +

Returns an attribute value.

+
See also:
setAttributeValue()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WWidget::boxBorder (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in border width.

+

This is used by the layout managers to correct for a built-in border which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the border width (the default implementation returns 0).

+

For form widgets, the border width depends on the specific browser/platform combination, unless an explicit border is set for the widget.

+

When setting an explicit border for the widget using a style class, you will want to reimplement this method to return this border width, in case you want to set the widget inside a layout manager.

+
See also:
boxPadding()
+ +

Reimplemented in Wt::WCompositeWidget, Wt::WLineEdit, Wt::WTextArea, and Wt::WTextEdit.

+ +
+
+ +
+
+ + + + + + + + +
int Wt::WWidget::boxPadding (Orientation  orientation ) const [protected, virtual]
+
+
+ +

Returns the widget's built-in padding.

+

This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.

+

A layout manager needs to set the width to 100% only for form widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).

+

For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.

+

When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.

+
See also:
boxBorder()
+ +

Reimplemented in Wt::WCompositeWidget, Wt::WLineEdit, Wt::WTextArea, and Wt::WTextEdit.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::callJavaScriptMember (const std::string &  name,
const std::string &  args 
) [pure virtual]
+
+
+ +

Calls a JavaScript member.

+

This calls a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WFlags<Side> Wt::WWidget::clearSides ( ) const [pure virtual]
+
+
+ +

Returns the sides that should remain empty.

+
See also:
setClearSides(WFlags<Side>)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WCssDecorationStyle& Wt::WWidget::decorationStyle ( ) [pure virtual]
+
+
+ +

Returns the decoration style of this widget.

+

This groups all decorative aspects of the widget, which do not affect the widget layout (except for the border properties which may behave like extra margin around the widget).

+

When a decoration style has not been previously set, it returns a default decoration style object.

+
See also:
setDecorationStyle()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WWidget::disable ( )
+
+
+ +

Disable thes widget.

+

This calls setDisabled(true).

+ +

Reimplemented in Wt::Ext::Component.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WWidget::dropEvent (WDropEvent  dropEvent ) [protected, virtual]
+
+
+ +

Handles a drop event.

+

Reimplement this method to handle a drop events for mime types you declared to accept using acceptDrops.

+

The default implementation simply completes the drag and drop operation as if nothing happened.

+
See also:
acceptDrops(), WInteractWidget::setDraggable()
+ +
+
+ +
+
+ + + + + + + +
void Wt::WWidget::enable ( )
+
+
+ +

Enables the widget.

+

This calls setDisabled(false).

+ +

Reimplemented in Wt::Ext::Component.

+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::WWidget::enableAjax ( ) [protected, pure virtual]
+
+
+ +

Progresses to an Ajax-enabled widget.

+

This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.

+

You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.

+
See also:
WApplication::enableAjax()
+ +

Implemented in Wt::WAnchor, Wt::WCompositeWidget, Wt::WFileUpload, Wt::WFormWidget, Wt::WMenu, Wt::WPaintedWidget, Wt::WTemplate, Wt::WTreeView, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual WWidget* Wt::WWidget::find (const std::string &  name ) [pure virtual]
+
+
+ +

Finds a descendend widget by name.

+
See also:
setObjectName()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual Side Wt::WWidget::floatSide ( ) const [pure virtual]
+
+
+ +

Returns the CSS float side.

+
See also:
setFloatSide(Side)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
WStatelessSlot * Wt::WWidget::getStateless (Method  method ) [protected, virtual]
+
+
+ +

On-demand stateless slot implementation.

+

This method returns a stateless slot implementation for the given method. To avoid the cost of declaring methods to be stateless when they are not used, you may reimplement this method to provide a stateless implementation for a method only when the method is involved in a slot connection.

+

Use implementStateless() to provide a stateless implementation of the given method, or return the base class implementation otherwise.

+ +

Reimplemented from Wt::WObject.

+ +

Reimplemented in Wt::WAbstractToggleButton, and Wt::WFormWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::height ( ) const [pure virtual]
+
+
+ +

Returns the height.

+

Returns the height set for this widget. This is not a calculated height, based on layout, but the height as specified previously with resize(const WLength& width, const WLength& height).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), width()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::hiddenKeepsGeometry ( ) const [pure virtual]
+
+
+ +

Returns whether the widget keeps its geometry when hidden.

+
See also:
setHiddenKeepsGeometry()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WWidget::hide ( )
+
+
+ +

Hides the widget.

+

This calls setHidden(true).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WWidget::htmlText (std::ostream &  out ) [virtual]
+
+
+ +

Streams the (X)HTML representation.

+

Streams the widget as UTF8-encoded (HTML-compatible) XHTML.

+

This may be useful as a debugging tool for the web-savvy, or in other rare situations. Usually, you will not deal directly with HTML, and calling this method on a widget that is rendered may interfere with the library keeping track of changes to the widget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isDisabled ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is set disabled.

+

A widget that is not set disabled may still be disabled when one of its ancestor widgets is set disabled. Use isEnabled() to find out whether a widget is enabled.

+
See also:
setDisabled(), isEnabled()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isEnabled ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is enabled.

+

A widget is enabled if it is not disabled, and none of its ancestors are disabled. This method returns whether the widget is rendered as enabled, while isDisabled() returns whether a widget has been explicitly disabled.

+

Note that a widget may be at the same time not enabled, and not disabled, in case one of its ancestors was disabled.

+
See also:
isDisabled()
+ +

Implemented in Wt::Ext::Component, Wt::WCompositeWidget, Wt::WInteractWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isHidden ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is set hidden.

+

A widget that is not hidden may still be not visible when one of its ancestor widgets is hidden. Use isVisible() to check the visibility of a widget.

+
See also:
setHidden(), isVisible()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isInline ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is displayed inline or as block.

+
See also:
setInline(bool)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isPopup ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is overlayed.

+

This applies to CSS-based layout.

+
See also:
setPopup(bool)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
bool Wt::WWidget::isRendered ( ) const
+
+
+ +

Returns whether the widget is rendered.

+
See also:
jsRef()
+ +

Reimplemented in Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::isVisible ( ) const [pure virtual]
+
+
+ +

Returns whether the widget is visible.

+

A widget is visible if it is not hidden, and none of its ancestors are hidden. This method returns the true visibility, while isHidden() returns whether a widget has been explicitly hidden.

+

Note that a widget may be at the same time not hidden, and not visible, in case one of its ancestors was hidden.

+
See also:
isHidden()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual std::string Wt::WWidget::javaScriptMember (const std::string &  name ) const [pure virtual]
+
+
+ +

Returns the value of a JavaScript member.

+
See also:
setJavaScriptMember()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
std::string Wt::WWidget::jsRef ( ) const
+
+
+ +

Returns a JavaScript expression to the corresponding DOM node.

+

You may want to use this in conjunction with JSlot or WApplication::doJavaScript() in custom JavaScript code.

+
See also:
isRendered()
+ +
+
+ +
+
+ + + + + + + +
bool Wt::WWidget::layoutSizeAware ( ) const
+
+
+ +

Returns whether the widget is layout size aware.

+
See also:
setLayoutSizeAware()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WWidget::layoutSizeChanged (int  width,
int  height 
) [protected, virtual]
+
+
+ +

Virtual method that indicates a size change.

+

This method propagates the client-side width and height of the widget when the widget is contained by a layout manager and setLayoutSizeAware(true) was called.

+
See also:
setLayoutSizeAware()
+ +

Reimplemented in Wt::WGLWidget, Wt::WPaintedWidget, and Wt::WSlider.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::lineHeight ( ) const [pure virtual]
+
+
+ +

Returns the CSS line height for contained text.

+

sa setLineHeight()

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual void Wt::WWidget::load ( ) [pure virtual]
+
+
+ +

Loads content just before the widget is used.

+

When the widget is inserted in the widget hierarchy, this method is called. Widgets that get inserted in the widget hierarchy will be rendered. Visible widgets are rendered immediately, and invisible widgets in the back-ground (or not for a plain HTML session). This method is called when the widget is directly or indirectly inserted into the widget tree.

+

The default implementation simply propagates the load signal to its children. You may want to override this method to delay loading of resource-intensive contents.

+

During the life-time of a widget, this method may be called multiple times, so you should make sure that you do a deferred initializiation only once.

+ +

Implemented in Wt::WCompositeWidget, Wt::WInteractWidget, Wt::WPopupMenuItem, Wt::WViewWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual bool Wt::WWidget::loaded ( ) const [pure virtual]
+
+
+ +

Returns whether this widget has been loaded.

+
See also:
load()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual WLength Wt::WWidget::margin (Side  side ) const [pure virtual]
+
+
+ +

Returns a CSS margin set.

+

This applies to CSS-based layout.

+
See also:
setMargin()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::maximumHeight ( ) const [pure virtual]
+
+
+ +

Returns the maximum height.

+

Returns the minmum height set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumWidth()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::maximumWidth ( ) const [pure virtual]
+
+
+ +

Returns the maximum width.

+

Returns the maximum width set for this widget with setMaximumSize().

+
See also:
setMaximumSize(), maximumHeight()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::minimumHeight ( ) const [pure virtual]
+
+
+ +

Returns the minimum height.

+

Returns the minmum height set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumWidth()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::minimumWidth ( ) const [pure virtual]
+
+
+ +

Returns the minimum width.

+

Returns the minimum width set for this widget with setMinimumSize().

+
See also:
setMinimumSize(), minimumHeight()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual WLength Wt::WWidget::offset (Side  side ) const [pure virtual]
+
+
+ +

Returns a CSS offset.

+

This applies to CSS-based layout.

+
See also:
setOffsets(const WLength&, WFlags<Side>)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
WWidget* Wt::WWidget::parent ( ) const
+
+
+ +

Returns the parent widget.

+

With a few exceptions, the parent is a WContainerWidget, and has been set implicitly when adding the widget to a container using WContainerWidget::addWidget(), by passing a container as a parent to the constructor, or by inserting the widget into a layout manager.

+ +

Reimplemented from Wt::WObject.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WWidget::positionAt (const WWidget widget,
Orientation  orientation = Vertical 
)
+
+
+ +

Positions a widget next to another widget.

+

Positions this absolutely positioned widget next to another widget. Both widgets must be visible.

+

When orientation = Wt::Vertical, the widget is displayed below the other widget (or above in case there is not enough room below). It is aligned so that the left edges align (or the right edges if there is not enough room to the right).

+

Conversely, when orientation = Wt::Horizontal, the widget is displayed to the right of the other widget (or to the left in case there is not enough room to the right). It is aligned so that the top edges align (or the bottom edges if there is not enough room below).

+
Note:
This only works if JavaScript is available.
+ +
+
+ +
+
+ + + + + + + +
virtual PositionScheme Wt::WWidget::positionScheme ( ) const [pure virtual]
+
+
+ +

Returns the CSS position scheme.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, setPositionScheme(PositionScheme)
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::propagateSetEnabled (bool  enabled ) [protected, pure virtual]
+
+
+ +

Propagates that a widget was enabled or disabled through children.

+

When enabling or disabling a widget, you usually also want to disable contained children. This method is called by setDisabled() to propagate its state to all children.

+

You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.

+ +

Implemented in Wt::WCompositeWidget, Wt::WFormWidget, Wt::WGroupBox, Wt::WInteractWidget, Wt::WLabel, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WWidget::refresh ( ) [virtual]
+
+
+ +

Refresh the widget.

+

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

+

The widget must actualize its contents in response.

+ +

Reimplemented in Wt::Ext::AbstractButton, Wt::Ext::ComboBox, Wt::Ext::FormField, Wt::Ext::MessageBox, Wt::Ext::Panel, Wt::Ext::TableView, Wt::Ext::TabWidget, Wt::WComboBox, Wt::WCompositeWidget, Wt::WGroupBox, Wt::WPushButton, Wt::WTemplate, Wt::WText, Wt::WViewWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::removeStyleClass (const WString styleClass,
bool  force = false 
) [pure virtual]
+
+
+ +

Removes a CSS style class.

+

When force = true, a JavaScript call will be used to remove the style class from the DOM element (if JavaScript is available). This may be necessary when client-side JavaScript manipulates the same style class.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Wt::WWidget::resize (const WLength width,
const WLength height 
) [virtual]
+
+
+ +

Resizes the widget.

+

Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().

+

This applies to CSS-based layout, and only block widgets can be given a size reliably.

+

When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.

+
See also:
width(), height()
+ +

Reimplemented in Wt::Ext::TextEdit, Wt::WCompositeWidget, Wt::WFlashObject, Wt::WGLWidget, Wt::WHTML5Video, Wt::WPaintedWidget, Wt::WProgressBar, Wt::WSlider, Wt::WTableView, Wt::WTextEdit, Wt::WTreeView, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setAttributeValue (const std::string &  name,
const WString value 
) [pure virtual]
+
+
+ +

Sets an attribute value.

+

Associate an extra attribute with this widget, with the given value. This is only useful when processing dom nodes associated with widgets in custom JavaScript code.

+
See also:
JSlot, WApplication::doJavaScript()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setClearSides (WFlags< Side sides ) [pure virtual]
+
+
+ +

Sets the sides that should be cleared of floats.

+

This pushes the widget down until it is not surrounded by floats at the sides (which may be a combination of Wt::Left and Wt::Right).

+

This applies to CSS-based layout.

+
See also:
setFloatSide()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setDecorationStyle (const WCssDecorationStyle style ) [pure virtual]
+
+
+ +

Sets a CSS decoration style.

+

This copies the style over its current decorationStyle()

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setDisabled (bool  disabled ) [pure virtual]
+
+
+ +

Sets whether the widget is disabled.

+

Enables or disables the widget (including all its descendant widgets). setDisabled(false) will enable this widget and all descendant widgets that are not disabled. A widget is only enabled if it and all its ancestors in the widget tree are disabled.

+

Typically, a disabled form widget will not allow changing the value, and disabled widgets will not react to mouse click events.

+
See also:
disable(), enable()
+ +

Implemented in Wt::WCompositeWidget, Wt::WDatePicker, Wt::WPopupMenuItem, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setFloatSide (Side  s ) [pure virtual]
+
+
+ +

Specifies a CSS float side.

+

This only applies to widgets with a Wt::Static positionScheme().

+

This lets the widget float to one of the sides of the parent widget, at the current line. A typical use is to position images within text. Valid values for Side orWt::None java {javadoclink Side::None None}, Wt::Left or Wt::Right.

+

This applies to CSS-based layout.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setHidden (bool  hidden ) [pure virtual]
+
+
+ +

Sets whether the widget is hidden.

+

Hides or show the widget (including all its descendant widgets). When setting hidden = false, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using isVisible().

+
See also:
hide(), show()
+ +

Implemented in Wt::Ext::Dialog, Wt::Ext::MessageBox, Wt::Ext::Widget, Wt::WCompositeWidget, Wt::WDatePicker, Wt::WDialog, Wt::WFormWidget, Wt::WPopupMenu, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setHiddenKeepsGeometry (bool  enabled ) [pure virtual]
+
+
+ +

Sets whether the widget keeps its geometry when hidden.

+

Normally, a widget that is hidden will no longer occupy space, causing a reflow of sibling widgets. Using this method you may change this behavior to keep an (open) space when hidden.

+
Note:
Currently you can only set this before initial rendering.
+
See also:
setHidden()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setId (const std::string &  id ) [pure virtual]
+
+
+ +

Sets the CSS Id.

+

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed. This is mostly useful for in tests using a test plan that manipulates DOM elements by Id.

+

By default, auto-generated id's are used.

+
See also:
WObject::id()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setInline (bool  inlined ) [pure virtual]
+
+
+ +

Sets whether the widget is displayed inline or as a block.

+

This option changes whether this widget must be rendered in line with sibling widgets wrapping at the right edge of the parent container (like text), or whether this widget must be rendered as a rectangular block that stacks vertically with sibling widgets (unless a CSS float property is applied). Depending on the widget type, the default value is inline (such as for example for WText, or WPushButton), or block (such as for example for a WContainerWidget).

+

This applies to CSS-based layout.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setJavaScriptMember (const std::string &  name,
const std::string &  value 
) [pure virtual]
+
+
+ +

Sets a JavaScript member.

+

This binds a JavaScript member, which is set as a JavaScript property to the DOM object that implements this widget. The value may be any JavaScript expression, including a function.

+

Members that start with "wt" are reserved for internal use. You may define a member "wtResize(self, width, + height)" method if your widget needs active layout management. If defined, this method will be used by layout managers and when doing resize() to set the size of the widget, instead of setting the CSS width and height properties.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WWidget::setLayoutSizeAware (bool  sizeAware ) [protected]
+
+
+ +

Sets the widget to be aware of its size set by a layout manager.

+

When the widget is inserted in a layout manager, it will be resized to fit within the constraints imposed by the layout manager. By default, this done client-side only by setting the CSS height (and if needed, width) properties of the DOM element corresponding to the widget.

+

A widget may define a JavaScript method, "wtResize(self, + width, height)", to actively manage its client-side width and height, if it wants to react to these client-side size hints in a custom way (see setJavaScriptMember()).

+

By setting sizeAware to true, the widget will propagate the width and height provided by the layout manager to the virtual layoutSizeChanged() method, so that you may for example change the size of contained children in a particular way (doing a custom, manual, layout).

+
See also:
layoutSizeChanged()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setMargin (const WLength margin,
WFlags< Side sides = All 
) [pure virtual]
+
+
+ +

Sets CSS margins around the widget.

+

Setting margin has the effect of adding a distance between the widget and surrounding widgets. The default margin (with an automatic length) is zero.

+

Use any combination of Wt::Left, Wt::Right, Wt::Bottom, or Wt::Top.

+

This applies to CSS-based layout.

+
See also:
margin()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setMaximumSize (const WLength width,
const WLength height 
) [pure virtual]
+
+
+ +

Sets a maximum size.

+

Specify a minimum size for this widget.

+
See also:
resize(), maximumWidth(), maximumHeight()
+ +

Implemented in Wt::WCompositeWidget, Wt::WSuggestionPopup, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setMinimumSize (const WLength width,
const WLength height 
) [pure virtual]
+
+
+ +

Sets a minimum size.

+

Specify a minimum size for this widget. When the widget is managed using a layout manager, these sizes are also taken into account.

+
See also:
resize(), minimumWidth(), minimumHeight()
+ +

Implemented in Wt::WCompositeWidget, Wt::WSuggestionPopup, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setOffsets (const WLength offset,
WFlags< Side sides = All 
) [pure virtual]
+
+
+ +

Sets CSS offsets for a non-statically positioned widget.

+

The argument sides may be a combination of Wt::Left, Wt::Right, Wt::Top, and Wt::Bottom.

+

This applies only to widgets that have a position scheme that is Wt::Relative, Wt::Absolute, or Wt::Fixed, and has a slightly different meaning for these three cases.

+

For a relatively positioned widget, an offset applies relative to the position the widget would have when layed-out using a static position scheme. The widget may be shifted to the left or right by specifying an offset for the left or right) side. The widget may be shifted vertically, by specifying an offset for the top or bottom side.

+

For an absolutely positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the corresponding side of the reference parent widget. Thus, setting all offsets to 0 result in a widget that spans the entire reference widget. The reference parent widget is the first ancestor widget that is a table cell, or a widget with a relative, absolute or fixed position scheme.

+

For an fixed positioned widget, an offset specifies a distance of the corresponding side of the widget with respect to the browser window, regardless of scrolling. Thus, setting all offsets to 0 result in a widget that spans the entire browser window.

+

This applies to CSS-based layout.

+
See also:
offset(Side) const
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setPopup (bool  popup ) [pure virtual]
+
+
+ +

Lets the widget overlay over other sibling widgets.

+

A widget that isPopup() will be rendered on top of any other sibling widget contained within the same parent (including other popup widgets previously added to the container).

+

This will only have an effect when the widgetis either Wt::Absolute or Wt::Fixed positionScheme().

+

This applies to CSS-based layout, and configures the z-index property.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setPositionScheme (PositionScheme  scheme ) [pure virtual]
+
+
+ +

Sets the CSS position scheme.

+

Establishes how the widget must be layed-out relative to its siblings. The default position scheme is Static.

+

This applies to CSS-based layout.

+
See also:
Wt::PositionScheme, positionScheme()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setSelectable (bool  selectable ) [pure virtual]
+
+
+ +

Sets as selectable.

+

When a widget is made unselectable, a selection of text (or images) will not be visible (but may still be possible).

+

By default, the widget inherits this property from its parent, and this property propagates to all children. The top level container (WApplication::root()) selectable by default.

+ +

Implemented in Wt::WCompositeWidget, Wt::WTreeNode, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setStyleClass (const WString styleClass ) [pure virtual]
+
+
+ +

Sets (one or more) CSS style classes.

+

You may set one or more space separated style classes. CSS style class works in conjunction with style sheet, and provides a flexible way to provide many widgets the same markup.

+

Setting an empty string removes the style class(es).

+
See also:
WApplication::styleSheet()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setTabIndex (int  index ) [pure virtual]
+
+
+ +

Sets the tab index.

+

For widgets that receive focus, focus is passed on to the next widget in the tabbing chain based on their tab index. When the user navigates through form widgets using the keyboard, widgets receive focus starting from the element with the lowest tab index to elements with the highest tab index.

+

A tab index only applies to widgets than can receive focus (which are WFormWidget, WAnchor, WPushButton), but setting a tab index on any other type of widget will propagate to its contained form widgets.

+

Widgets with a same tab index will receive focus in the same order as they are inserted in the widget tree.

+

The default tab index is 0.

+
See also:
setTabOrder()
+ +

Implemented in Wt::WCompositeWidget, Wt::WFormWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Wt::WWidget::setToolTip (const WString text ) [pure virtual]
+
+
+ +

Sets a tooltip.

+

The tooltip is displayed when the cursor hovers over the widget.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Wt::WWidget::setVerticalAlignment (AlignmentFlag  alignment,
const WLength length = WLength::Auto 
) [pure virtual]
+
+
+ +

Sets the vertical alignment.

+

This only applies to inline widgets, and determines how to position itself on the current line, with respect to sibling inline widgets.

+

This applies to CSS-based layout.

+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
void Wt::WWidget::show ( )
+
+
+ +

Shows the widget.

+

This calls setHidden(false).

+ +
+
+ +
+
+ + + + + + + + +
void Wt::WWidget::stopAcceptDrops (const std::string &  mimeType ) [virtual]
+
+
+ +

Indicates that a mime type is no longer accepted for dropping.

+
See also:
acceptDrops()
+ +
+
+ +
+
+ + + + + + + +
virtual WString Wt::WWidget::styleClass ( ) const [pure virtual]
+
+
+ +

Returns the CSS style class.

+
See also:
setStyleClass()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual int Wt::WWidget::tabIndex ( ) const [pure virtual]
+
+
+ +

Returns the tab index.

+
See also:
setTabIndex()
+ +

Implemented in Wt::WCompositeWidget, Wt::WFormWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + + +
WString Wt::WWidget::tr (const char *  key ) [static]
+
+
+ +

Short hand for WString::tr()

+

Creates a localized string with the given key.

+ +
+
+ +
+
+ + + + + + + +
virtual AlignmentFlag Wt::WWidget::verticalAlignment ( ) const [pure virtual]
+
+
+ +

Returns the vertical alignment.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::verticalAlignmentLength ( ) const [pure virtual]
+
+
+ +

Returns the fixed vertical alignment that was set.

+

This applies to CSS-based layout.

+
See also:
setVerticalAlignment()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+ +
+
+ + + + + + + +
virtual WLength Wt::WWidget::width ( ) const [pure virtual]
+
+
+ +

Returns the width.

+

Returns the width set for this widget. This is not a calculated width, based on layout, but the width as specified with resize(const WLength&, const WLength&).

+

This applies to CSS-based layout.

+
See also:
resize(const WLength&, const WLength&), height()
+ +

Implemented in Wt::WCompositeWidget, and Wt::WWebWidget.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem-members.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem-members.html new file mode 100644 index 0000000..6c6d76d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem-members.html @@ -0,0 +1,87 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WWidgetItem Member List

+
+
+This is the complete list of members for Wt::WWidgetItem, including all inherited members. + + + + + + + + + +
findWidgetItem(WWidget *widget)Wt::WWidgetItem [virtual]
impl() const Wt::WWidgetItem [virtual]
layout()Wt::WWidgetItem [virtual]
parentLayout() const Wt::WWidgetItem [virtual]
setParentLayout(WLayout *layout)Wt::WWidgetItem [private, virtual]
setParentWidget(WWidget *parent)Wt::WWidgetItem [private, virtual]
widget()Wt::WWidgetItem [virtual]
WWidgetItem(WWidget *widget)Wt::WWidgetItem
~WLayoutItem()Wt::WLayoutItem [virtual]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem.html b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem.html new file mode 100644 index 0000000..ffc4bc8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem.html @@ -0,0 +1,215 @@ + + + + +Wt: Wt::WWidgetItem Class Reference + + + + + + + + + +
+ +
+

Wt::WWidgetItem Class Reference

+
+
+ +

A layout item that holds a single widget. +More...

+ +

#include <Wt/WWidgetItem>

+
+Inheritance diagram for Wt::WWidgetItem:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

WWidgetItem (WWidget *widget)
 Creates a new item for the given widget.
virtual WWidgetwidget ()
 Returns the widget that is held by this WLayoutItem.
virtual WLayoutlayout ()
 Returns the layout that implements this WLayoutItem.
+virtual WLayoutparentLayout () const
 Returns the layout in which this item is contained.
virtual WWidgetItemfindWidgetItem (WWidget *widget)
 Finds the widget item corresponding to the given widget
WLayoutItemImplimpl () const
 Returns the implementation for this layout item.

+Private Member Functions

+virtual void setParentWidget (WWidget *parent)
 Internal method.
+virtual void setParentLayout (WLayout *layout)
 Internal method.
+

Detailed Description

+

A layout item that holds a single widget.

+
See also:
WLayout::addWidget(WWidget *)
+

Member Function Documentation

+ +
+
+ + + + + + + + +
WWidgetItem * Wt::WWidgetItem::findWidgetItem (WWidget widget ) [virtual]
+
+
+ +

Finds the widget item corresponding to the given widget

+

The widget is searched for recursively inside nested layouts.

+ +

Implements Wt::WLayoutItem.

+ +
+
+ +
+
+ + + + + + + +
WLayoutItemImpl* Wt::WWidgetItem::impl ( ) const [virtual]
+
+
+ +

Returns the implementation for this layout item.

+

The implementation of a layout item depends on the kind of container for which the layout does layout management.

+ +

Implements Wt::WLayoutItem.

+ +
+
+ +
+
+ + + + + + + +
virtual WLayout* Wt::WWidgetItem::layout ( ) [virtual]
+
+
+ +

Returns the layout that implements this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WLayout.

+ +

Implements Wt::WLayoutItem.

+ +
+
+ +
+
+ + + + + + + +
virtual WWidget* Wt::WWidgetItem::widget ( ) [virtual]
+
+
+ +

Returns the widget that is held by this WLayoutItem.

+

This implements a type-safe upcasting mechanism to a WWidgetItem.

+ +

Implements Wt::WLayoutItem.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.map new file mode 100644 index 0000000..5220bfb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.md5 new file mode 100644 index 0000000..001fd31 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.md5 @@ -0,0 +1 @@ +a702a8550badccdb0b69418d86b9461b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.png new file mode 100644 index 0000000..f492055 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidgetItem__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.map b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.map new file mode 100644 index 0000000..3020eb2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.map @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.md5 new file mode 100644 index 0000000..d600b6e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.md5 @@ -0,0 +1 @@ +a9bb6b5bd0f8501f489686c478d583e1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.png b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.png new file mode 100644 index 0000000..fca2551 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/classWt_1_1WWidget__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/classes.html b/wt-3.1.7a/doc/reference/html/classes.html new file mode 100644 index 0000000..e5a3d83 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/classes.html @@ -0,0 +1,99 @@ + + + + +Wt: Alphabetical List + + + + + + + + + +
+
+

Class Index

+
+
+
A | B | C | D | E | F | I | J | L | M | N | O | P | Q | R | S | T | U | W
+ +
  A  
+
  N  
+
WAbstractItemModel (Wt)   WGridLayout (Wt)   WRectF (Wt)   
AbstractButton (Wt::Ext)   NoUniqueResultException (Wt::Dbo)   WAbstractItemView (Wt)   WGroupBox (Wt)   WRegExpValidator (Wt)   
AbstractToggleButton (Wt::Ext)   NumberField (Wt::Ext)   WAbstractListModel (Wt)   WHBoxLayout (Wt)   WResource (Wt)   
  B  
+
  O  
+
WAbstractProxyModel (Wt)   WHTML5Audio (Wt)   WScrollArea (Wt)   
WAbstractProxyModel::BaseItem (Wt)   ObjectNotFoundException (Wt::Dbo)   WAbstractTableModel (Wt)   WHTML5Media (Wt)   WScrollBar (Wt)   
boost_any_traits (Wt)   WSuggestionPopup::Options (Wt)   WAbstractToggleButton (Wt)   WHTML5Video (Wt)   WScrollEvent (Wt)   
Button (Wt::Ext)   
  P  
+
WAccordionLayout (Wt)   WIconPair (Wt)   WSelectionBox (Wt)   
Request::ByteRange (Wt::Http)   PagingToolBar (Wt::Ext)   WAggregateProxyModel (Wt)   Widget (Wt::Ext)   WServer (Wt)   
Request::ByteRangeSpecifier (Wt::Http)   Panel (Wt::Ext)   WAnchor (Wt)   WImage (Wt)   WShadow (Wt)   
  C  
+
Postgres (Wt::Dbo::backend)   WApplication (Wt)   WInPlaceEdit (Wt)   WSignalMapper (Wt)   
Calendar (Wt::Ext)   ProgressDialog (Wt::Ext)   WAxis (Wt::Chart)   WInteractWidget (Wt)   WSlider (Wt)   
Call (Wt::Dbo)   ptr (Wt::Dbo)   WBatchEditProxyModel (Wt)   WIntValidator (Wt)   WSocketNotifier (Wt)   
CheckBox (Wt::Ext)   ptr_tuple (Wt::Dbo)   WBorder (Wt)   WItemDelegate (Wt)   WSortFilterProxyModel (Wt)   
Client (Wt::Http)   
  Q  
+
WBorderLayout (Wt)   WItemSelectionModel (Wt)   WSound (Wt)   
collection (Wt::Dbo)   Query (Wt::Dbo)   WBoxLayout (Wt)   WKeyEvent (Wt)   WSpinBox (Wt)   
ComboBox (Wt::Ext)   query_result_traits (Wt::Dbo)   WBreak (Wt)   WLabel (Wt)   WStackedWidget (Wt)   
Component (Wt::Ext)   QueryModel (Wt::Dbo)   WBrush (Wt)   WLayout (Wt)   WStandardItem (Wt)   
collection::const_iterator (Wt::Dbo)   
  R  
+
WButtonGroup (Wt)   WLayoutItem (Wt)   WStandardItemModel (Wt)   
Container (Wt::Ext)   RadioButton (Wt::Ext)   WCalendar (Wt)   WLayoutItemImpl (Wt)   WStandardPalette (Wt::Chart)   
WGoogleMap::Coordinate (Wt)   Request (Wt::Http)   WCanvasPaintDevice (Wt)   WLength (Wt)   WStaticModelView (Wt)   
Coordinates (Wt)   Response (Wt::Http)   WCartesianChart (Wt::Chart)   WLengthValidator (Wt)   WString (Wt)   
  D  
+
ResponseContinuation (Wt::Http)   WChart2DRenderer (Wt::Chart)   WLineEdit (Wt)   WStringListModel (Wt)   
DataStore (Wt::Ext)   
  S  
+
WChartPalette (Wt::Chart)   WLineF (Wt)   WSubMenuItem (Wt)   
DateField (Wt::Ext)   WPainterPath::Segment (Wt)   WCheckBox (Wt)   WLoadingIndicator (Wt)   WSuggestionPopup (Wt)   
Dbo (Wt::Dbo)   WLogger::Sep (Wt)   WCircleArea (Wt)   WLocalizedStrings (Wt)   WSvgImage (Wt)   
dbo_default_traits (Wt::Dbo)   SeriesIterator (Wt::Chart)   WColor (Wt)   WLogEntry (Wt)   WTable (Wt)   
dbo_traits (Wt::Dbo)   Session (Wt::Dbo)   WCombinedLocalizedStrings (Wt)   WLogger (Wt)   WTableCell (Wt)   
Dialog (Wt::Ext)   Signal (Wt)   WComboBox (Wt)   WMatrix4x4 (Wt)   WTableColumn (Wt)   
DirectBinding (Wt::Dbo)   SignalBase (Wt)   WCompositeWidget (Wt)   WMemoryResource (Wt)   WTableRow (Wt)   
DynamicBinding (Wt::Dbo)   Splitter (Wt::Ext)   WContainerWidget (Wt)   WMenu (Wt)   WTableView (Wt)   
  E  
+
SplitterHandle (Wt::Ext)   WCssDecorationStyle (Wt)   WMenuItem (Wt)   WTabWidget (Wt)   
EventSignal (Wt)   sql_value_traits (Wt::Dbo)   WCssRule (Wt)   WMessageBox (Wt)   WTemplate (Wt)   
EventSignalBase (Wt)   SqlConnection (Wt::Dbo)   WCssStyleSheet (Wt)   WMessageResourceBundle (Wt)   WTestEnvironment (Wt::Test)   
WServer::Exception (Wt)   SqlConnectionPool (Wt::Dbo)   WCssTemplateRule (Wt)   WModelIndex (Wt)   WText (Wt)   
Exception (Wt::Dbo)   Sqlite3 (Wt::Dbo::backend)   WCssTextRule (Wt)   WMouseEvent (Wt)   WTextArea (Wt)   
  F  
+
SqlStatement (Wt::Dbo)   WDataSeries (Wt::Chart)   WObject (Wt)   WTextEdit (Wt)   
WLogger::Field (Wt)   StaleObjectException (Wt::Dbo)   WDate (Wt)   WOverlayLoadingIndicator (Wt)   WTime (Wt)   
FieldInfo (Wt::Dbo)   SyncLock (Wt)   WDatePicker (Wt)   WPaintDevice (Wt)   WTimer (Wt)   
FixedSqlConnectionPool (Wt::Dbo)   
  T  
+
WDateTime (Wt)   WPaintedWidget (Wt)   WTouchEvent (Wt)   
FormField (Wt::Ext)   TableView (Wt::Ext)   WDateValidator (Wt)   WPainter (Wt)   WTransform (Wt)   
  I  
+
TabWidget (Wt::Ext)   WDefaultLayout (Wt)   WPainterPath (Wt)   WTree (Wt)   
WPainter::Image (Wt)   TextEdit (Wt::Ext)   WDefaultLoadingIndicator (Wt)   WPanel (Wt)   WTreeNode (Wt)   
InvalidDateException (Wt)   WLogger::TimeStamp (Wt)   WDialog (Wt)   WPdfImage (Wt)   WTreeTable (Wt)   
InvalidDateTimeException (Wt)   ToolBar (Wt::Ext)   WDoubleValidator (Wt)   WPen (Wt)   WTreeTableNode (Wt)   
InvalidTimeException (Wt)   ToolTipConfig (Wt::Ext)   WDropEvent (Wt)   WPieChart (Wt::Chart)   WTreeView (Wt)   
collection::iterator (Wt::Dbo)   Touch (Wt)   WEnvironment (Wt)   WPoint (Wt)   WValidationStatus (Wt)   
  J  
+
Transaction (Wt::Dbo)   WFileResource (Wt)   WPointF (Wt)   WValidator (Wt)   
WGLWidget::JavaScriptMatrix4x4 (Wt)   WTransform::TRSRDecomposition (Wt)   WFileUpload (Wt)   WPolygonArea (Wt)   WVBoxLayout (Wt)   
JSignal (Wt)   WTransform::TRSSDecomposition (Wt)   WFitLayout (Wt)   WPopupMenu (Wt)   WVectorImage (Wt)   
JSlot (Wt)   
  U  
+
WFlashObject (Wt)   WPopupMenuItem (Wt)   WViewWidget (Wt)   
  L  
+
WApplication::UpdateLock (Wt)   WFont (Wt)   WProgressBar (Wt)   WVirtualImage (Wt)   
LineEdit (Wt::Ext)   UploadedFile (Wt::Http)   WFormWidget (Wt)   WPushButton (Wt)   WVmlImage (Wt)   
  M  
+
  W  
+
WGenericMatrix (Wt)   WRadioButton (Wt)   WWebWidget (Wt)   
Menu (Wt::Ext)   WAbstractArea (Wt)   WGestureEvent (Wt)   WRasterImage (Wt)   WWidget (Wt)   
MenuItem (Wt::Ext)   WAbstractChart (Wt::Chart)   WGLWidget (Wt)   WRectArea (Wt)   WWidgetItem (Wt)   
MessageBox (Wt::Ext)   WAbstractItemDelegate (Wt)   WGoogleMap (Wt)   
A | B | C | D | E | F | I | J | L | M | N | O | P | Q | R | S | T | U | W
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/closed.png b/wt-3.1.7a/doc/reference/html/closed.png new file mode 100644 index 0000000..b7d4bd9 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/closed.png differ diff --git a/wt-3.1.7a/doc/reference/html/deprecated.html b/wt-3.1.7a/doc/reference/html/deprecated.html new file mode 100644 index 0000000..4df23a1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/deprecated.html @@ -0,0 +1,210 @@ + + + + +Wt: Deprecated List + + + + + + + + + +
+
+

Deprecated List

+
+
+

+
+
Member WMessage
+
use WString instead.
+
+

+
+
Member Wt::WApplication::getUpdateLock ()
+
Use the RAII-style UpdateLock(WApplication *) constructor instead. cpp
+
+

+
+
Member Wt::WApplication::UpdateLock::UpdateLock (const UpdateLock &)
+
use UpdateLock(WApplication *) instead of getUpdateLock() which requires this copy.
+
+

+
+
Member Wt::WCalendar::selected ()
+
use activated() instead.
+
+

+
+
Member Wt::WCalendar::setDayOfWeekLength (int chars)
+
use setHorizontalHeaderFormat() instead.
+
+

+
+
Member Wt::WCalendar::setMultipleSelection (bool multiple)
+
use setSelectionMode() instead.
+
+

+
+
Member Wt::WCalendar::setSingleClickSelect (bool single)
+
listen to the clicked() signal if you want to react to a single click, or activated() signal if you want to react to a double click.
+
+

+
+
Member Wt::WDateValidator::parse (const WString &input)
+
see WDate::fromString() static methods.
+
+

+
+
Member Wt::WDialog::caption () const
+
Use windowTitle() instead.
+
+

+
+
Member Wt::WDialog::setCaption (const WString &caption)
+
Use setWindowTitle() instead.
+
+

+
+
Member Wt::WEnvironment::pathInfo () const
+
Use internalPath() instead, which is consistent with the internal paths generated by Wt.
+
+

+
+
Member Wt::WFileUpload::emptyFileName () const
+
This method was renamed to empty()
+
+

+
+
Member Wt::WFileUpload::isUploaded () const
+
use canUpload() instead -- canUpload() == !isUploaded(). the name was confusing.
+
+

+
+
Member Wt::WKeyEvent::altKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WKeyEvent::ctrlKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WKeyEvent::keyCode () const
+
The value returned is somewhat browser-specific, and it is therefore recommended to use the key() method instead.
+
+

+
+
Member Wt::WKeyEvent::metaKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WKeyEvent::shiftKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WMouseEvent::altKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WMouseEvent::ctrlKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WMouseEvent::metaKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WMouseEvent::shiftKey () const
+
Use modifiers() instead.
+
+

+
+
Member Wt::WTabWidget::WTabWidget (WFlags< AlignmentFlag > layoutAlignment, WContainerWidget *parent=0)
+
Since Wt 3.1.1, the layoutAlignment is no longer needed and its value is ignored
+
+

+
+
Member Wt::WTreeNode::imagePack () const
+
This method returns "" since Wt 3.1.1, as the image pack is no longer used in favour of the CSS themes.
+
+

+
+
Member Wt::WTreeNode::setImagePack (const std::string &url)
+
This method does not do anything since Wt 3.1.1, as the tree is now styled based on the current CSS theme.
+
+

+
+
Member Wt::WTreeView::columnFormat (int column) const
+
use itemDelegateForColumn() to customize the formatting. This method will try to cast the itemDelegateForColumn() to a WItemDelegate and return the format.
+
+

+
+
Member Wt::WTreeView::setColumnFormat (int column, const WString &format)
+
use itemDelegateForColumn() to customize the formatting. This method will create a new WItemDelegate for the column, and configure its format.
+
+

+
+
Class Wt::WValidationStatus
+
Since Wt 3.1.1, validation is handled directly on WFormWidget subclasses.
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/doxygen.css b/wt-3.1.7a/doc/reference/html/doxygen.css new file mode 100644 index 0000000..1d22bd0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/doxygen.css @@ -0,0 +1,686 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #4665A2; +} + +a.codeRef { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right: 15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath a:hover +{ + color:#6884BD; +} + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + diff --git a/wt-3.1.7a/doc/reference/html/doxygen.png b/wt-3.1.7a/doc/reference/html/doxygen.png new file mode 100644 index 0000000..635ed52 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/doxygen.png differ diff --git a/wt-3.1.7a/doc/reference/html/example.html b/wt-3.1.7a/doc/reference/html/example.html new file mode 100644 index 0000000..c323918 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/example.html @@ -0,0 +1,504 @@ + + + + +Wt: Treelist example + + + + + + + + + +
+
+

Treelist example

+
+
+

In this example we will step through the code of the Tree List example. The source code of the entire example is available as leafs of the tree. Note that Wt offers a Tree List widget as part of the library (see WTreeNode), of which this example is a down-stripped version.

+

The example in particular demonstrates the use of stateless slot learning to simultaneously implement client-side and server-side event handling in C++.

+

The tree constructed as hierarchy of tree nodes. A single tree node is implemented in the class TreeNode. TreeNode uses the helper class IconPair for rendering icons that have a state (such as the expand/collapse icons). We start with a walk-over of this class.

+

+IconPair: a pair of icons that reflects state.

+

For the implementation of the tree list expand/collapse icons, as well as the label icons (such as the folder icon), we use class IconPair. It takes a pair of icons and shows only one at a time. Passing clickIsSwitch = true to the constructor will make the icon react to click events to switch the current icon.

+

This is the class definition of IconPair:

+
+class IconPair : public Wt::WCompositeWidget
+{
+public:
+  IconPair(const std::string icon1URI, const std::string icon2URI,
+           bool clickIsSwitch = true, Wt::WContainerWidget *parent = 0);
+
+  void setState(int num);
+
+  int state() const;
+
+  Wt::WImage *icon1() const { return icon1_; }
+  
+  Wt::WImage *icon2() const { return icon2_; }
+
+  void showIcon1();
+
+  void showIcon2();
+
+private:
+  Wt::WContainerWidget *impl_;
+
+  Wt::WImage *icon1_;
+
+  Wt::WImage *icon2_;
+
+public:
+  Wt::EventSignal<Wt::WMouseEvent>& icon1Clicked;
+
+  Wt::EventSignal<Wt::WMouseEvent>& icon2Clicked;
+
+private:
+  int previousState_;
+
+  void undoShowIcon1();
+
+  void undoShowIcon2();
+};
+

+

IconPair is a composite widget, implemented as a WContainerWidget which contains two WImage objects. The class defines two slots: IconPair::showIcon1() and IconPair::showIcon2(), which show the respective icon, while hiding the other icon.

+

Although Wt is a C++ (server-side) library, it can also generate client-side JavaScript code for instant visual response. This example will use this capability to implement all of the tree navigation at the client-side for those clients that support JavaScript -- as if it were implemented as a JavaScript library. But since everything is still plain C++ code, it works whatever technology is available or lacking at the client side. Think of a stateless slot implementation as creating a forked implementation, with JavaScript in the client for visual response -- when JavaScript is available, and C++ at the server. When no JavaScript is available, everything happens at the server.

+

The key concept behind Wt's capability to implement things at the client-side is stateless slot implementations. A stateless slot is, besides a normal C++ function that may be connected to a signal, a C++ function that promises to always have the same behaviour (until it is reset, as we will see later).

+

This applies to the two functions showIcon1() and showIcon2(), as they simply set the corresponding icon, irrespective of any application state. The library offers two methods for stateless slot implementations: AutoLearned and PreLearned. An AutoLearned stateless slot will only "become client-side" after the first invocation. Applied to our tree widget, this would mean that the first click on any icon would require a round-trip to the server the first time only. An AutoLearned stateless slot simply requires an indication that the particular slot confirms to the contract of being stateless. A PreLearned stateless slot, on the other hand, is "client-side" from the first invocation. To implement a PreLearned stateless however, we need to do some extra work by providing methods that exactly undo the effect of the slot. We provide here two such undo methods: undoShowIcon1() and undoShowIcon2().

+

Enough talk! Let's look at the implementation, starting with the constructor.

+
IconPair::IconPair(const std::string icon1URI, const std::string icon2URI,
+                   bool clickIsSwitch, Wt::WContainerWidget *parent)
+  : Wt::WCompositeWidget(parent),
+    impl_(new Wt::WContainerWidget()),
+    icon1_(new Wt::WImage(icon1URI, impl_)),
+    icon2_(new Wt::WImage(icon2URI, impl_)),
+    icon1Clicked(icon1_->clicked()),
+    icon2Clicked(icon2_->clicked())
+{
+

+

IconPair inherits from WCompositeWidget. A composite widget is a widget which is composed from other widgets, in a way not exposed in its API. In this way, you may later change the implementation without any problem.

+

Notice how we constructed three widgets that are used in the implementation: two images (icon1_ and icon2_), and a container (impl_) to hold them. The images are added to the container by passing the container as the last argument in their constructor.

+

WCompositeWidget requires to set the implementation widget, which is in our case a WContainerWidget:

+

  setImplementation(impl_);
+

+

We declare the slots showIcon1() and showIcon2() as stateless slots, allowing for client-side optimisation, and offer an undo function which facilitates a PreLearned client-side implementation.

+

The calls to WObject::implementStateless() state that the slots showIcon1() and showIcon2() are stateless slots, and their visual effect may be learned in advance. The effect of these statements is merely an optimization. Any non-visual effects of these slots are still propagated and executed, as expected.

+

+  implementStateless(&IconPair::showIcon1, &IconPair::undoShowIcon1);
+  implementStateless(&IconPair::showIcon2, &IconPair::undoShowIcon2);
+

+

Next, we declare the widget to be an inline widget. An inline widget will be layed out following the natural flow of text (left to right). This does not really matter for our example, since TreeNode will do the layout with a WTable, but we do so to provide consistency with a WImage which is also inline by default.

+

  setInline(true);
+

+

The initial state is to show the first icon:

+

  icon2_->hide();
+

+

To react to click events, we connect signals with slots:

+

+  if (clickIsSwitch) {
+    icon1_->clicked().connect(icon1_, &Wt::WImage::hide);
+    icon1_->clicked().connect(icon2_, &Wt::WImage::show);
+
+    icon2_->clicked().connect(icon2_, &Wt::WImage::hide);
+    icon2_->clicked().connect(icon1_, &Wt::WImage::show); //
+

+

We change the cursor to a pointer to hint that clicking these icons may do something useful.

+

+    decorationStyle().setCursor(Wt::PointingHandCursor);
+  }
+} //
+

+

We also change the cursor to a pointer to hint that clicking these icons will in fact perform an action.

+

The rest of the class definition is:

+

+void IconPair::setState(int num)
+{
+  if (num == 0) {
+    icon1_->show();
+    icon2_->hide();
+  } else {
+    icon1_->hide();
+    icon2_->show();
+  }
+}
+
+int IconPair::state() const
+{
+  return (icon1_->isHidden() ? 1 : 0);
+}
+
+void IconPair::showIcon1()
+{
+  previousState_ = (icon1_->isHidden() ? 1 : 0);
+  setState(0);
+}
+
+void IconPair::showIcon2()
+{
+  previousState_ = (icon1_->isHidden() ? 1 : 0);
+  setState(1);
+}
+
+void IconPair::undoShowIcon1()
+{
+  setState(previousState_);
+}
+
+void IconPair::undoShowIcon2()
+{
+  setState(previousState_);
+} //
+

+

Note the implementations of undoShowIcon1() and undoShowIcon2(): they simply, but accurately, reset the state to what it was before the respective showIcon1() and showIcon2() calls.

+

+TreeNode: an expandable tree node.

+

TreeNode contains the implementation of the tree, as a hierarchy of tree nodes. The layout of a single node is done using a 2x2 WTable:

+
+   |-----------------------|
+   | +/- | label           |
+   |------------------------
+   |     | child1          |
+   |     | child2          |
+   |     | child3          |
+   |     |       ...       |
+   |-----------------------| 

The TreeNode manages a list of child nodes in a WContainerWidget which will be hidden and shown when the node is expanded or collapsed, and children are collapsed when the node is expanded.

+

This is the TreeNode class definition:

+
class TreeNode : public Wt::WCompositeWidget
+{
+public:
+  TreeNode(const std::string labelText,
+           Wt::TextFormat labelFormat,
+           IconPair *labelIcon, Wt::WContainerWidget *parent = 0);
+
+  void addChildNode(TreeNode *node);
+
+  void removeChildNode(TreeNode *node);
+
+  const std::vector<TreeNode *>& childNodes() const { return childNodes_; }
+
+  void collapse();
+
+  void expand();
+
+private:
+  std::vector<TreeNode *> childNodes_;
+
+  TreeNode                 *parentNode_;
+
+  Wt::WTable               *layout_;
+
+  IconPair                 *expandIcon_;
+
+  Wt::WImage               *noExpandIcon_;
+
+  IconPair                 *labelIcon_;
+
+  Wt::WText                *labelText_;
+
+  Wt::WText                *childCountLabel_;
+
+  Wt::WContainerWidget     *expandedContent_;
+
+  void adjustExpandIcon();
+
+  bool isLastChildNode() const;
+
+  void childNodesChanged();
+
+  bool wasCollapsed_;
+
+  void undoCollapse();
+
+  void undoExpand();
+
+  enum ImageIndex { Middle = 0, Last = 1 };
+
+  static std::string imageLine_[];
+  static std::string imagePlus_[];
+  static std::string imageMin_[];
+}; //
+

+

The public interface of the TreeNode provides methods to manage its children, and two public slots to expand or collapse the node. Remember, a slot is nothing more than a method (and the public slots: does not actually mean anything, except providing a hint to the user of this class that these methods are made to be connected to signals).

+

We start with the implementation of the constructor:

+
TreeNode::TreeNode(const std::string labelText,
+                   Wt::TextFormat labelFormat,
+                   IconPair *labelIcon,
+                   Wt::WContainerWidget *parent)
+  : Wt::WCompositeWidget(parent),
+    parentNode_(0),
+    labelIcon_(labelIcon)
+{
+

+

We start with declaring stateless implementations for the slots. It is good practice to do this first, since it must be done before any connections are made to the slots.

+

  // pre-learned stateless implementations ...
+  implementStateless(&TreeNode::expand, &TreeNode::undoExpand);
+  implementStateless(&TreeNode::collapse, &TreeNode::undoCollapse);
+

+

We will implement the treenode as 2 by 2 table.

+

  setImplementation(layout_ = new Wt::WTable());
+

+

We create all icons. Since currently the node is empty, we only show the no-expand version (which is simply a horizontal line).

+

+  expandIcon_ = new IconPair(imagePlus_[Last], imageMin_[Last]);
+  expandIcon_->hide();
+  noExpandIcon_ = new Wt::WImage(imageLine_[Last]);
+

+

The expanded content is a WContainerWidget.

+

+  expandedContent_ = new Wt::WContainerWidget();
+  expandedContent_->hide();
+

+

We create the label and child count text widgets:

+

+  labelText_ = new Wt::WText(labelText);
+  labelText_->setTextFormat(labelFormat);
+  labelText_->setStyleClass("treenodelabel");
+  childCountLabel_ = new Wt::WText();
+  childCountLabel_->setMargin(7, Wt::Left);
+  childCountLabel_->setStyleClass("treenodechildcount");
+

+

Now we add all widgets in the proper table cell, and set the correct alignment.

+

+  layout_->elementAt(0, 0)->addWidget(expandIcon_);
+  layout_->elementAt(0, 0)->addWidget(noExpandIcon_);
+
+  if (labelIcon_) {
+    layout_->elementAt(0, 1)->addWidget(labelIcon_);
+    labelIcon_->setVerticalAlignment(Wt::AlignMiddle);
+  }
+  layout_->elementAt(0, 1)->addWidget(labelText_);
+  layout_->elementAt(0, 1)->addWidget(childCountLabel_);
+
+  layout_->elementAt(1, 1)->addWidget(expandedContent_);
+
+  layout_->elementAt(0, 0)->setContentAlignment(Wt::AlignTop);
+  layout_->elementAt(0, 1)->setContentAlignment(Wt::AlignMiddle);
+

+

Finally, we connect the click events of the expandIcon to the expand and collapse slots.

+

+  expandIcon_->icon1Clicked.connect(this, &TreeNode::expand);
+  expandIcon_->icon2Clicked.connect(this, &TreeNode::collapse);
+} //
+

+

WTable::elementAt(int row, int column) is used repeatedly to add or modify contents of the table cells, expanding the table geometry as needed. Finally, we make connections from the expand and collapse icons to the slots we define in the TreeNode class.

+

Again, we optimize the visual effect of expand() and collaps() in client-side JavaScript, which is possible since they both have an effect independent of application state. Typically, one will start with a default dynamic slot implementation, and indicate stateless implementations where desired and possible, using one of the two mechanisms of stateless slot learning.

+

The "business logic" of the TreeNode is simply to manage its children. Whenever a child is added or removed, adjustments to its look are updated by calling childNodesChanged().

+

+bool TreeNode::isLastChildNode() const
+{
+  if (parentNode_) {
+    return parentNode_->childNodes_.back() == this;
+  } else
+    return true;
+}
+
+void TreeNode::addChildNode(TreeNode *node)
+{
+  childNodes_.push_back(node);
+  node->parentNode_ = this;
+
+  expandedContent_->addWidget(node);
+
+  childNodesChanged();
+}
+
+void TreeNode::removeChildNode(TreeNode *node)
+{
+  childNodes_.erase(std::find(childNodes_.begin(), childNodes_.end(), node));
+
+  node->parentNode_ = 0;
+
+  expandedContent_->removeWidget(node);
+
+  childNodesChanged();
+} //
+

+

The expand icon of the last child is rendered differently, as it needs to terminate the vertical guide line. To keep the implementation simple, we simply let every child reset its proper look by calling adjustExpandIcon().

+

+void TreeNode::childNodesChanged()
+{
+  for (unsigned i = 0; i < childNodes_.size(); ++i)
+    childNodes_[i]->adjustExpandIcon();
+

+

When getting a first child, or losing the last child, the expand icon changes too.

+

+  adjustExpandIcon();
+

+

We also update the childCount label.

+

+  if (childNodes_.size())
+    childCountLabel_
+      ->setText("(" + boost::lexical_cast<std::string>(childNodes_.size())
+                + ")");
+  else
+    childCountLabel_->setText("");
+

+

Finally, we call WObject::resetLearnedSlots(). Because the expand() slot depends on the number of children, because it needs to collapse all children -- this slot is not entirely stateless, breaking the contract for a stateless slot. However, we can get away with still implementing as a stateless slot, by indicating when the state has changed.

+

+  resetLearnedSlots();
+} //
+

+

The implementation of the collapse slot is as follows:

+

+void TreeNode::collapse()
+{
+

+

First we record the current state, so the undo method can exactly undo what happened.

+

  wasCollapsed_ = expandedContent_->isHidden();
+

+

Next, we implement the actual collapse logic:

+

+  expandIcon_->setState(0);
+  expandedContent_->hide();
+  if (labelIcon_)
+    labelIcon_->setState(0);
+} //
+

+

Similarly, the implementation of the expand slot. However, in this case we need to collapse all children as well.

+

+void TreeNode::expand()
+{
+  wasCollapsed_ = expandedContent_->isHidden();
+
+  expandIcon_->setState(1);
+  expandedContent_->show();
+  if (labelIcon_)
+    labelIcon_->setState(1);
+
+  /*
+   * collapse all children
+   */
+  for (unsigned i = 0; i < childNodes_.size(); ++i)
+    childNodes_[i]->collapse();
+} //
+

+

Since we implement these slots as prelearned stateless slots, we also need to define the undo functions. Note that Because expand() also collapses all child nodes, the undo function of expand() is not simply collapse() and vice-versa.

+

+void TreeNode::undoCollapse()
+{
+  if (!wasCollapsed_) {
+    // re-expand
+    expandIcon_->setState(1);
+    expandedContent_->show();
+    if (labelIcon_)
+      labelIcon_->setState(1);    
+  }
+}
+
+void TreeNode::undoExpand()
+{
+  if (wasCollapsed_) {
+    // re-collapse
+    expandIcon_->setState(0);
+    expandedContent_->hide();
+    if (labelIcon_)
+      labelIcon_->setState(0);
+  }
+
+  /*
+   * undo collapse of children
+   */
+  for (unsigned i = 0; i < childNodes_.size(); ++i)
+    childNodes_[i]->undoCollapse();  
+} //
+

+

Finally, the adjustExpandIcon() function sets the correct images, which depends on how the node relates to its siblings. The last node looks a bit different.

+

+void TreeNode::adjustExpandIcon()
+{
+

+

We set the expand icon images:

+

  ImageIndex index = isLastChildNode() ? Last : Middle;
+
+  if (expandIcon_->icon1()->imageRef() != imagePlus_[index])
+    expandIcon_->icon1()->setImageRef(imagePlus_[index]);
+  if (expandIcon_->icon2()->imageRef() != imageMin_[index])
+    expandIcon_->icon2()->setImageRef(imageMin_[index]);
+  if (noExpandIcon_->imageRef() != imageLine_[index])
+    noExpandIcon_->setImageRef(imageLine_[index]);
+

+

Then, we set the vertical guide line if not the last child, and nothing if the last child:

+

+  if (index == Last) {
+    layout_->elementAt(0, 0)
+      ->decorationStyle().setBackgroundImage("");
+    layout_->elementAt(1, 0)
+      ->decorationStyle().setBackgroundImage("");
+  } else {
+    layout_->elementAt(0, 0)
+      ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
+                                             Wt::WCssDecorationStyle::RepeatY);
+    layout_->elementAt(1, 0)
+      ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
+                                             Wt::WCssDecorationStyle::RepeatY);
+  } //
+

+

Finally, we select the correct icon, depending on whether the node has children:

+

+  if (childNodes_.empty()) {
+    if (noExpandIcon_->isHidden()) {
+      noExpandIcon_->show();
+      expandIcon_->hide();
+    }
+  } else {
+    if (expandIcon_->isHidden()) {
+      noExpandIcon_->hide();
+      expandIcon_->show();
+    }
+  }
+} //
+

+

And that's it. By using the TreeNode class in a hierarchy, we can create a tree widget. The tree widget will be implemented entirely in JavaScript, if available, and otherwise as plain HTML. In any case, client-side and server-side state are completely synchronized, and identical by definition since they are derived from the same C++ code.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions.html b/wt-3.1.7a/doc/reference/html/functions.html new file mode 100644 index 0000000..1e1649a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions.html @@ -0,0 +1,510 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- a -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x62.html b/wt-3.1.7a/doc/reference/html/functions_0x62.html new file mode 100644 index 0000000..5782949 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x62.html @@ -0,0 +1,367 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- b -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x63.html b/wt-3.1.7a/doc/reference/html/functions_0x63.html new file mode 100644 index 0000000..af357b1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x63.html @@ -0,0 +1,803 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- c -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x64.html b/wt-3.1.7a/doc/reference/html/functions_0x64.html new file mode 100644 index 0000000..e33d4a6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x64.html @@ -0,0 +1,488 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- d -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x65.html b/wt-3.1.7a/doc/reference/html/functions_0x65.html new file mode 100644 index 0000000..5968615 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x65.html @@ -0,0 +1,336 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- e -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x66.html b/wt-3.1.7a/doc/reference/html/functions_0x66.html new file mode 100644 index 0000000..e7d262c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x66.html @@ -0,0 +1,340 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- f -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x67.html b/wt-3.1.7a/doc/reference/html/functions_0x67.html new file mode 100644 index 0000000..8d2ac80 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x67.html @@ -0,0 +1,251 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- g -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x68.html b/wt-3.1.7a/doc/reference/html/functions_0x68.html new file mode 100644 index 0000000..2bc7936 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x68.html @@ -0,0 +1,290 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- h -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x69.html b/wt-3.1.7a/doc/reference/html/functions_0x69.html new file mode 100644 index 0000000..275970a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x69.html @@ -0,0 +1,741 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- i -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6a.html b/wt-3.1.7a/doc/reference/html/functions_0x6a.html new file mode 100644 index 0000000..0014261 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6a.html @@ -0,0 +1,168 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- j -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6b.html b/wt-3.1.7a/doc/reference/html/functions_0x6b.html new file mode 100644 index 0000000..9eec8fc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6b.html @@ -0,0 +1,146 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- k -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6c.html b/wt-3.1.7a/doc/reference/html/functions_0x6c.html new file mode 100644 index 0000000..8e3a287 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6c.html @@ -0,0 +1,312 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- l -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6d.html b/wt-3.1.7a/doc/reference/html/functions_0x6d.html new file mode 100644 index 0000000..76d1824 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6d.html @@ -0,0 +1,448 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- m -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6e.html b/wt-3.1.7a/doc/reference/html/functions_0x6e.html new file mode 100644 index 0000000..ce2822c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6e.html @@ -0,0 +1,201 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- n -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x6f.html b/wt-3.1.7a/doc/reference/html/functions_0x6f.html new file mode 100644 index 0000000..f741202 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x6f.html @@ -0,0 +1,321 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- o -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x70.html b/wt-3.1.7a/doc/reference/html/functions_0x70.html new file mode 100644 index 0000000..78ab3d9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x70.html @@ -0,0 +1,401 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- p -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x71.html b/wt-3.1.7a/doc/reference/html/functions_0x71.html new file mode 100644 index 0000000..b589c4e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x71.html @@ -0,0 +1,145 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- q -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x72.html b/wt-3.1.7a/doc/reference/html/functions_0x72.html new file mode 100644 index 0000000..a7a33e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x72.html @@ -0,0 +1,550 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- r -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x73.html b/wt-3.1.7a/doc/reference/html/functions_0x73.html new file mode 100644 index 0000000..6fd0053 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x73.html @@ -0,0 +1,2100 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- s -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x74.html b/wt-3.1.7a/doc/reference/html/functions_0x74.html new file mode 100644 index 0000000..0248cf5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x74.html @@ -0,0 +1,424 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- t -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x75.html b/wt-3.1.7a/doc/reference/html/functions_0x75.html new file mode 100644 index 0000000..b10bca8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x75.html @@ -0,0 +1,294 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- u -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x76.html b/wt-3.1.7a/doc/reference/html/functions_0x76.html new file mode 100644 index 0000000..af761ae --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x76.html @@ -0,0 +1,264 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- v -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x77.html b/wt-3.1.7a/doc/reference/html/functions_0x77.html new file mode 100644 index 0000000..c0146bb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x77.html @@ -0,0 +1,691 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- w -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x78.html b/wt-3.1.7a/doc/reference/html/functions_0x78.html new file mode 100644 index 0000000..070852a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x78.html @@ -0,0 +1,152 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- x -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x79.html b/wt-3.1.7a/doc/reference/html/functions_0x79.html new file mode 100644 index 0000000..69f0613 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x79.html @@ -0,0 +1,134 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- y -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x7a.html b/wt-3.1.7a/doc/reference/html/functions_0x7a.html new file mode 100644 index 0000000..c4c0cd1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x7a.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- z -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_0x7e.html b/wt-3.1.7a/doc/reference/html/functions_0x7e.html new file mode 100644 index 0000000..3a6d110 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_0x7e.html @@ -0,0 +1,370 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented class members with links to the class documentation for each member: + +

- ~ -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_enum.html b/wt-3.1.7a/doc/reference/html/functions_enum.html new file mode 100644 index 0000000..9facf09 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_enum.html @@ -0,0 +1,329 @@ + + + + +Wt: Class Members - Enumerations + + + + + + + + + +
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval.html b/wt-3.1.7a/doc/reference/html/functions_eval.html new file mode 100644 index 0000000..b1f02ed --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- a -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x62.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x62.html new file mode 100644 index 0000000..77692f4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x62.html @@ -0,0 +1,139 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- b -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x63.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x63.html new file mode 100644 index 0000000..5f00a58 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x63.html @@ -0,0 +1,162 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- c -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x64.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x64.html new file mode 100644 index 0000000..856ceb0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x64.html @@ -0,0 +1,141 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- d -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x65.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x65.html new file mode 100644 index 0000000..3409db1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x65.html @@ -0,0 +1,129 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- e -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x66.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x66.html new file mode 100644 index 0000000..e8ee255 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x66.html @@ -0,0 +1,153 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- f -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x67.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x67.html new file mode 100644 index 0000000..f803359 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x67.html @@ -0,0 +1,126 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- g -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x68.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x68.html new file mode 100644 index 0000000..c34cd3b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x68.html @@ -0,0 +1,129 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- h -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x69.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x69.html new file mode 100644 index 0000000..4948285 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x69.html @@ -0,0 +1,150 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- i -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6a.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6a.html new file mode 100644 index 0000000..9ec5e31 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6a.html @@ -0,0 +1,117 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- j -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6b.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6b.html new file mode 100644 index 0000000..2d4df46 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6b.html @@ -0,0 +1,117 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- k -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6c.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6c.html new file mode 100644 index 0000000..810c514 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6c.html @@ -0,0 +1,155 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- l -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6d.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6d.html new file mode 100644 index 0000000..64df395 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6d.html @@ -0,0 +1,148 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- m -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6e.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6e.html new file mode 100644 index 0000000..b0063e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6e.html @@ -0,0 +1,157 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- n -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x6f.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x6f.html new file mode 100644 index 0000000..11db02f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x6f.html @@ -0,0 +1,138 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- o -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x70.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x70.html new file mode 100644 index 0000000..21346b3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x70.html @@ -0,0 +1,156 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- p -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x72.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x72.html new file mode 100644 index 0000000..a38f5cc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x72.html @@ -0,0 +1,142 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- r -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x73.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x73.html new file mode 100644 index 0000000..1e01b8b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x73.html @@ -0,0 +1,180 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- s -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x74.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x74.html new file mode 100644 index 0000000..99adf2f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x74.html @@ -0,0 +1,138 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- t -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x75.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x75.html new file mode 100644 index 0000000..c7a949c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x75.html @@ -0,0 +1,126 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- u -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x76.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x76.html new file mode 100644 index 0000000..00e7897 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x76.html @@ -0,0 +1,123 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- v -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x77.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x77.html new file mode 100644 index 0000000..4504fdb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x77.html @@ -0,0 +1,123 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- w -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_eval_0x78.html b/wt-3.1.7a/doc/reference/html/functions_eval_0x78.html new file mode 100644 index 0000000..1a0cc7d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_eval_0x78.html @@ -0,0 +1,132 @@ + + + + +Wt: Class Members - Enumerator + + + + + + + + + +
+  + +

- x -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func.html b/wt-3.1.7a/doc/reference/html/functions_func.html new file mode 100644 index 0000000..b47d89a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func.html @@ -0,0 +1,461 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- a -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x62.html b/wt-3.1.7a/doc/reference/html/functions_func_0x62.html new file mode 100644 index 0000000..bec4313 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x62.html @@ -0,0 +1,337 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- b -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x63.html b/wt-3.1.7a/doc/reference/html/functions_func_0x63.html new file mode 100644 index 0000000..2233d33 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x63.html @@ -0,0 +1,731 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- c -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x64.html b/wt-3.1.7a/doc/reference/html/functions_func_0x64.html new file mode 100644 index 0000000..640422d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x64.html @@ -0,0 +1,443 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- d -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x65.html b/wt-3.1.7a/doc/reference/html/functions_func_0x65.html new file mode 100644 index 0000000..dc1fc9a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x65.html @@ -0,0 +1,310 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- e -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x66.html b/wt-3.1.7a/doc/reference/html/functions_func_0x66.html new file mode 100644 index 0000000..c80d317 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x66.html @@ -0,0 +1,292 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- f -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x67.html b/wt-3.1.7a/doc/reference/html/functions_func_0x67.html new file mode 100644 index 0000000..60fefca --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x67.html @@ -0,0 +1,233 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- g -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x68.html b/wt-3.1.7a/doc/reference/html/functions_func_0x68.html new file mode 100644 index 0000000..2a0ac88 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x68.html @@ -0,0 +1,260 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- h -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x69.html b/wt-3.1.7a/doc/reference/html/functions_func_0x69.html new file mode 100644 index 0000000..370ba7b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x69.html @@ -0,0 +1,695 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- i -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6a.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6a.html new file mode 100644 index 0000000..365c417 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6a.html @@ -0,0 +1,165 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- j -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6b.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6b.html new file mode 100644 index 0000000..3c23f49 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6b.html @@ -0,0 +1,143 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- k -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6c.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6c.html new file mode 100644 index 0000000..1c2233a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6c.html @@ -0,0 +1,263 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- l -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6d.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6d.html new file mode 100644 index 0000000..8ad3f02 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6d.html @@ -0,0 +1,398 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- m -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6e.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6e.html new file mode 100644 index 0000000..905cd2b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6e.html @@ -0,0 +1,155 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- n -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x6f.html b/wt-3.1.7a/doc/reference/html/functions_func_0x6f.html new file mode 100644 index 0000000..0af0394 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x6f.html @@ -0,0 +1,294 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- o -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x70.html b/wt-3.1.7a/doc/reference/html/functions_func_0x70.html new file mode 100644 index 0000000..ddd59fa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x70.html @@ -0,0 +1,339 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- p -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x71.html b/wt-3.1.7a/doc/reference/html/functions_func_0x71.html new file mode 100644 index 0000000..28adfba --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x71.html @@ -0,0 +1,145 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- q -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x72.html b/wt-3.1.7a/doc/reference/html/functions_func_0x72.html new file mode 100644 index 0000000..d648e6f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x72.html @@ -0,0 +1,516 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- r -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x73.html b/wt-3.1.7a/doc/reference/html/functions_func_0x73.html new file mode 100644 index 0000000..bac369b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x73.html @@ -0,0 +1,1992 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- s -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x74.html b/wt-3.1.7a/doc/reference/html/functions_func_0x74.html new file mode 100644 index 0000000..03e446d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x74.html @@ -0,0 +1,379 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- t -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x75.html b/wt-3.1.7a/doc/reference/html/functions_func_0x75.html new file mode 100644 index 0000000..d94a0b2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x75.html @@ -0,0 +1,276 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- u -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x76.html b/wt-3.1.7a/doc/reference/html/functions_func_0x76.html new file mode 100644 index 0000000..1ff4f0f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x76.html @@ -0,0 +1,249 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- v -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x77.html b/wt-3.1.7a/doc/reference/html/functions_func_0x77.html new file mode 100644 index 0000000..925b19c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x77.html @@ -0,0 +1,659 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- w -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x78.html b/wt-3.1.7a/doc/reference/html/functions_func_0x78.html new file mode 100644 index 0000000..16e2991 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x78.html @@ -0,0 +1,133 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- x -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x79.html b/wt-3.1.7a/doc/reference/html/functions_func_0x79.html new file mode 100644 index 0000000..b899d1b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x79.html @@ -0,0 +1,133 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- y -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x7a.html b/wt-3.1.7a/doc/reference/html/functions_func_0x7a.html new file mode 100644 index 0000000..b997790 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x7a.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- z -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_func_0x7e.html b/wt-3.1.7a/doc/reference/html/functions_func_0x7e.html new file mode 100644 index 0000000..b5f27f5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_func_0x7e.html @@ -0,0 +1,370 @@ + + + + +Wt: Class Members - Functions + + + + + + + + + +
+  + +

- ~ -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_type.html b/wt-3.1.7a/doc/reference/html/functions_type.html new file mode 100644 index 0000000..cf5fc9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_type.html @@ -0,0 +1,119 @@ + + + + +Wt: Class Members - Typedefs + + + + + + + + + +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/functions_vars.html b/wt-3.1.7a/doc/reference/html/functions_vars.html new file mode 100644 index 0000000..1e62979 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/functions_vars.html @@ -0,0 +1,267 @@ + + + + +Wt: Class Members - Variables + + + + + + + + + +
+  + +

- a -

+ + +

- d -

+ + +

- e -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- s -

+ + +

- t -

+ + +

- w -

+ + +

- x -

+ + +

- y -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/graph_legend.html b/wt-3.1.7a/doc/reference/html/graph_legend.html new file mode 100644 index 0000000..5388067 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/graph_legend.html @@ -0,0 +1,134 @@ + + + + +Wt: Graph Legend + + + + + + + + + +
+
+

Graph Legend

+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

+
/*! Invisible class because of truncation */
+class Invisible { };
+
+/*! Truncated class, inheritance relation is hidden */
+class Truncated : public Invisible { };
+
+/* Class not documented with doxygen comments */
+class Undocumented { };
+
+/*! Class that is inherited using public inheritance */
+class PublicBase : public Truncated { };
+
+/*! A template class */
+template<class T> class Templ { };
+
+/*! Class that is inherited using protected inheritance */
+class ProtectedBase { };
+
+/*! Class that is inherited using private inheritance */
+class PrivateBase { };
+
+/*! Class that is used by the Inherited class */
+class Used { };
+
+/*! Super class that inherits a number of other classes */
+class Inherited : public PublicBase,
+                  protected ProtectedBase,
+                  private PrivateBase,
+                  public Undocumented,
+                  public Templ<int>
+{
+  private:
+    Used *m_usedClass;
+};
+

This will result in the following graph:

+
+graph_legend.png +
+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a grey border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/graph_legend.md5 b/wt-3.1.7a/doc/reference/html/graph_legend.md5 new file mode 100644 index 0000000..c8d3250 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/graph_legend.md5 @@ -0,0 +1 @@ +c43a1e38a88c7de97805a9273dc43584 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/graph_legend.png b/wt-3.1.7a/doc/reference/html/graph_legend.png new file mode 100644 index 0000000..bff495c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/graph_legend.png differ diff --git a/wt-3.1.7a/doc/reference/html/group__charts.html b/wt-3.1.7a/doc/reference/html/group__charts.html new file mode 100644 index 0000000..5fd95b8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__charts.html @@ -0,0 +1,444 @@ + + + + +Wt: Charts + + + + + + + + + +
+ +
+

Charts

+
+
+ +

A charting library implemented using the Wt Painting system. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Wt::Chart::WAbstractChart
 Abstract base class for MVC-based charts. More...
class  Wt::Chart::WAxis
 Class which represents an axis of a cartesian chart. More...
class  Wt::Chart::WCartesianChart
 A cartesian chart. More...
class  Wt::Chart::SeriesIterator
 Abstract base class for iterating over series data in WChart2DRenderer. More...
class  Wt::Chart::WChart2DRenderer
 Helper class for rendering a cartesian chart. More...
class  Wt::Chart::WChartPalette
 Abstract base class for styling rendered data series in charts. More...
class  Wt::Chart::WDataSeries
 A single data series in a cartesian chart. More...
class  Wt::Chart::WPieChart
 A pie chart. More...
class  Wt::Chart::WStandardPalette
 Standard styling for rendering series in charts. More...

+Enumerations

enum  Wt::Chart::Axis {
+  Wt::Chart::XAxis = 0, +Wt::Chart::YAxis = 1, +Wt::Chart::Y1Axis = YAxis, +Wt::Chart::Y2Axis = 2, +
+  Wt::Chart::OrdinateAxis = YAxis +
+ }
 

Enumeration that indicates a chart axis.

+ More...
enum  Wt::Chart::AxisValue { Wt::Chart::MinimumValue = 0x1, +Wt::Chart::MaximumValue = 0x2, +Wt::Chart::ZeroValue = 0x4 + }
 

Enumeration that indicates a logical location for an axis.

+ More...
enum  Wt::Chart::AxisScale {
+  Wt::Chart::CategoryScale = 0, +Wt::Chart::LinearScale = 1, +Wt::Chart::LogScale = 2, +Wt::Chart::DateScale = 3, +
+  Wt::Chart::DateTimeScale = 4 +
+ }
 

Enumeration that indicates a scale for an axis.

+ More...
enum  Wt::Chart::SeriesType { Wt::Chart::PointSeries, +Wt::Chart::LineSeries, +Wt::Chart::CurveSeries, +Wt::Chart::BarSeries + }
 

Enumeration that specifies the type of a chart series.

+ More...
enum  Wt::Chart::MarkerType {
+  Wt::Chart::NoMarker, +Wt::Chart::SquareMarker, +Wt::Chart::CircleMarker, +Wt::Chart::CrossMarker, +
+  Wt::Chart::XCrossMarker, +Wt::Chart::TriangleMarker +
+ }
 

Enumeration that specifies a type of point marker.

+ More...
enum  Wt::Chart::FillRangeType { Wt::Chart::NoFill, +Wt::Chart::MinimumValueFill, +Wt::Chart::MaximumValueFill, +Wt::Chart::ZeroValueFill + }
 

Enumeration that specifies how an area should be filled.

+ More...
enum  Wt::Chart::ChartType { Wt::Chart::CategoryChart, +Wt::Chart::ScatterPlot + }
 

Enumeration type that indicates a chart type for a cartesian chart.

+ More...
enum  Wt::Chart::LabelOption {
+  Wt::Chart::NoLabels = 0x00, +Wt::Chart::Inside = 0x01, +Wt::Chart::Outside = 0x02, +Wt::Chart::TextLabel = 0x10, +
+  Wt::Chart::TextPercentage = 0x20 +
+ }
 

Enumeration that specifies options for the labels.

+ More...
+

Detailed Description

+

A charting library implemented using the Wt Painting system.

+

The charting library contains two main chart widget classes, WCartesianChart and WPieChart, and a number of utility classes for drawing simple to complex charts.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::Chart::Axis
+
+
+ +

Enumeration that indicates a chart axis.

+
See also:
WCartesianChart::axis(Axis)
+
Enumerator:
+ + + + + +
XAxis  +

X axis.

+
YAxis  +

First Y axis (== Y1Axis).

+
Y1Axis  +

First Y axis (== YAxis).

+
Y2Axis  +

Second Y Axis.

+
OrdinateAxis  +

Ordinate axis (== Y1Axis for a 2D plot).

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::AxisScale
+
+
+ +

Enumeration that indicates a scale for an axis.

+

The scale determines how values are mapped onto an axis.

+
See also:
WAxis::setScale(AxisScale scale)
+
Enumerator:
+ + + + + +
CategoryScale  +

A category scale is set as the scale for the X axis in a CategoryChart, and is only applicable there. It lists all values, evenly spaced, and consecutively in the order of the model.

+
LinearScale  +

A linear scale is the default scale for all axes, except for the X scale in a CategoryScale. It maps values in a linear fashion on the axis.

+
LogScale  +

A logarithmic scale is useful for plotting values with of a large range, but only works for positive values.

+
DateScale  +

A date scale is a special linear scale, which is useful for the X axis in a ScatterPlot, when the X series contain dates (of type WDate).

+
DateTimeScale  +

A datetime scale is a special linear scale, which is useful for the X axis in a ScatterPlot, when the X series contain timedates (of type WDateTime).

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::AxisValue
+
+
+ +

Enumeration that indicates a logical location for an axis.

+

The location is dependent on the values of the other axis.

+
See also:
WAxis::setLocation(AxisValue)
+
Enumerator:
+ + + +
MinimumValue  +

At the minimum value.

+
MaximumValue  +

At the maximum value.

+
ZeroValue  +

At the zero value (if displayed).

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::ChartType
+
+
+ +

Enumeration type that indicates a chart type for a cartesian chart.

+
Enumerator:
+ + +
CategoryChart  +

The X series are categories.

+
ScatterPlot  +

The X series must be interpreted as numerical data.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::FillRangeType
+
+
+ +

Enumeration that specifies how an area should be filled.

+

Data series of type LineSeries or CurveSerie may be filled under or above the line or curve. This enumeration specifies the other limit of this fill.

+
See also:
WDataSeries::setFillRange(FillRangeType range)
+
+WCartesianChart
+
Enumerator:
+ + + + +
NoFill  +

Do not fill under the curve.

+
MinimumValueFill  +

Fill from the curve to the chart bottom (min)

+
MaximumValueFill  +

Fill from the curve to the chart top.

+
ZeroValueFill  +

Fill from the curve to the zero Y value.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::LabelOption
+
+
+ +

Enumeration that specifies options for the labels.

+
See also:
WPieChart::setDisplayLabels(WFlags<LabelOption>)
+
Enumerator:
+ + + + + +
NoLabels  +

Do not display labels (default).

+
Inside  +

Display labels inside each segment.

+
Outside  +

Display labels outside each segment.

+
TextLabel  +

Display the label text.

+
TextPercentage  +

Display the value (as percentage)

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::MarkerType
+
+
+ +

Enumeration that specifies a type of point marker.

+
See also:
WDataSeries::setMarker(MarkerType marker)
+
+WCartesianChart
+
Enumerator:
+ + + + + + +
NoMarker  +

Do not draw point markers.

+
SquareMarker  +

Mark points using a square.

+
CircleMarker  +

Mark points using a circle.

+
CrossMarker  +

Mark points using a cross (+).

+
XCrossMarker  +

Mark points using a cross (x).

+
TriangleMarker  +

Mark points using a triangle.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Chart::SeriesType
+
+
+ +

Enumeration that specifies the type of a chart series.

+
See also:
WDataSeries::setType(SeriesType)
+
+WCartesianChart
+
Enumerator:
+ + + + +
PointSeries  +

Series rendered solely as point markers.

+
LineSeries  +

Series rendered as points connected by straight lines.

+
CurveSeries  +

Series rendered as points connected by curves.

+
BarSeries  +

Series rendered as bars.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__dbo.html b/wt-3.1.7a/doc/reference/html/group__dbo.html new file mode 100644 index 0000000..f87d3f5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__dbo.html @@ -0,0 +1,388 @@ + + + + +Wt: Database Objects (Dbo) + + + + + + + + + +
+ +
+

Database Objects (Dbo)

+
+
+ +

An implemenation of an Object Relational Mapping layer. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  Wt::Dbo::ptr_tuple< T0, T1,, T9 >
 A utility class for defining a tuple of database objects. More...
class  Wt::Dbo::SqlStatement
 Abstract base class for a prepared SQL statement. More...
class  Wt::Dbo::backend::Postgres
 A PostgreSQL connection. More...
class  Wt::Dbo::backend::Sqlite3
 An SQLite3 connection. More...
class  Wt::Dbo::collection< C >
 An STL container for iterating query results. More...
class  Wt::Dbo::Exception
 Exception base class for Wt::Dbo. More...
class  Wt::Dbo::StaleObjectException
 Exception thrown when Wt::Dbo detects a concurrent modification More...
class  Wt::Dbo::ObjectNotFoundException
 Exception thrown when trying to load a non-existing object. More...
class  Wt::Dbo::NoUniqueResultException
 Exception thrown when a query unexpectedly finds a non-unique result. More...
class  Wt::Dbo::FixedSqlConnectionPool
 A connection pool of fixed size. More...
class  Wt::Dbo::dbo_default_traits
 Default traits for a class mapped with Wt::Dbo. More...
class  Wt::Dbo::dbo_traits< C >
 Traits for a class mapped with Wt::Dbo. More...
class  Wt::Dbo::Dbo< C >
 A base class for database objects. More...
class  Wt::Dbo::ptr< C >
 A smart pointer for database objects. More...
class  Wt::Dbo::Query< Result, BindStrategy >
 A database query. More...
class  Wt::Dbo::QueryModel< Result >
 A Wt MVC Model to view/edit query results. More...
class  Wt::Dbo::Session
 A database session. More...
class  Wt::Dbo::SqlConnection
 Abstract base class for an SQL connection. More...
class  Wt::Dbo::SqlConnectionPool
 Abstract base class for a SQL connection pool. More...
class  Wt::Dbo::sql_value_traits< V, Enable >
 Traits class for value types. More...
class  Wt::Dbo::FieldInfo
 Description of a field. More...
class  Wt::Dbo::query_result_traits< Result >
 Traits class for result types. More...
class  Wt::Dbo::Transaction
 A database transaction. More...

+Enumerations

enum  Wt::Dbo::RelationType { Wt::Dbo::ManyToOne, +Wt::Dbo::ManyToMany + }
 

Type of an SQL relation.

+ More...

+Functions

template<class Action , typename V >
void Wt::Dbo::id (Action &action, V &value, const std::string &name="id", int size=-1)
 Maps a natural primary key (id) field.
template<class Action , typename V >
void Wt::Dbo::field (Action &action, V &value, const std::string &name, int size=-1)
 Maps a database object field.
template<class Action , class C >
void Wt::Dbo::belongsTo (Action &action, ptr< C > &value, const std::string &name, int size=-1)
 Maps the "One"-side of a ManyToOne relation.
template<class Action , class C >
void Wt::Dbo::hasMany (Action &action, collection< ptr< C > > &value, RelationType type, const std::string &joinName, const std::string &joinId="")
 Maps the "Many"-side of a ManyToOne or ManyToMany relation.
+

Detailed Description

+

An implemenation of an Object Relational Mapping layer.

+

For an introduction, see the tutorial.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::Dbo::RelationType
+
+
+ +

Type of an SQL relation.

+
Enumerator:
+ + +
ManyToOne  +

Many-to-One relationship.

+
ManyToMany  +

Many-to-Many relationship.

+
+
+
+ +
+
+

Function Documentation

+ +
+
+
+template<class Action , class C >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::belongsTo (Action &  action,
ptr< C > &  value,
const std::string &  name,
int  size = -1 
)
+
+
+ +

Maps the "One"-side of a ManyToOne relation.

+

This function binds the pointer field value to the database field name + "_id".

+

A belongsTo() will usually have a counter-part hasMany() declaration in the referenced class C.

+
See also:
hasMany()
+ +
+
+ +
+
+
+template<class Action , typename V >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::field (Action &  action,
V &  value,
const std::string &  name,
int  size = -1 
)
+
+
+ +

Maps a database object field.

+

This function binds the field value to the database field name.

+

The optional size may be used as a hint for the needed storage. It is only useful for std::string or Wt::WString fields, and causes the schema to use a varchar(size) for storing the field instead of an unlimited length string type.

+

You may want to specialize this method for a particular composite type which should be persisted in multiple database fields but not as a separate table (e.g. for natural composite primary keys, see id()).

+

For example:

+
 struct Coordinate {
+   int x, y;
+ };
+
+ namespace Wt {
+   namespace Dbo {
+
+     template <class Action>
+     void field(Action& action, Coordinate& coordinate, const std::string& name, int size = -1)
+     {
+       field(action, coordinate.x, name + "_x");
+       field(action, coordinate.y, name + "_y");
+     }
+
+   } // namespace Dbo
+ } // namespace Wt
+

To support a custom type that needs to be persisted as a single field, you should specialize sql_value_traits instead.

+ +
+
+ +
+
+
+template<class Action , class C >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::hasMany (Action &  action,
collection< ptr< C > > &  value,
RelationType  type,
const std::string &  joinName,
const std::string &  joinId = "" 
)
+
+
+ +

Maps the "Many"-side of a ManyToOne or ManyToMany relation.

+

This function binds the collection field value to contain objects (of type C).

+

For a ManyToOne relation, the query is defined by the database field joinName + "_id" in the table that matches C. This should be the same name as passed to the matching belongsTo() method for the other side of the relation.

+

For a ManyToMany relation, the joinName is the name of a linker table (this linker table may be schema qualified, e.g. "myschema.posts_tags". Thus, also for a ManyToMany relation, both sides of the relationship will have the same joinName passed to them. You may optionally specify the joinId which is used to reference this side of the relationship in the join table. If joinId is left blank, the value will be table name of the current class + "_id".

+

A hasMany() must have a counter-part belongsTo() or hasMany() declaration in the referenced class C.

+
See also:
belongsTo()
+ +
+
+ +
+
+
+template<class Action , typename V >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::id (Action &  action,
V &  value,
const std::string &  name = "id",
int  size = -1 
)
+
+
+ +

Maps a natural primary key (id) field.

+

A natural primary key field is optional. If you define one and its type is not long long, you must specialize Wt::Dbo::dbo_traits to match the type V as the IdType for this class. When not specified for a class, an auto-generated surrogate key field is used with the name specified by Wt::Dbo::dbo_traits::surrogateIdField(), which defaults to "id".

+

Unlike the default surrogate key, a natural id is not auto-generated and thus you need to give each object a unique value when creating a new object.

+

The id may be a composite type. In that case, you need to specialize Wt::Dbo::field().

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__ext.html b/wt-3.1.7a/doc/reference/html/group__ext.html new file mode 100644 index 0000000..9a62678 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__ext.html @@ -0,0 +1,243 @@ + + + + +Wt: Ext widgets + + + + + + + + + +
+ +
+

Ext widgets

+
+
+ +

Wt Ext library with JavaScript-only widgets. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Wt::Ext::AbstractButton
 Abstract base class for a (toolbar) button or menu item. More...
class  Wt::Ext::AbstractToggleButton
 Abstract base class for radio button and check box. More...
class  Wt::Ext::Button
 A button. More...
class  Wt::Ext::Calendar
 A calendar. More...
class  Wt::Ext::CheckBox
 A user control that represents a check box. More...
class  Wt::Ext::ComboBox
 A widget that provides a drop-down combo-box control. More...
class  Wt::Ext::Component
 An abstract base class for widgets that can be visually disabled. More...
class  Wt::Ext::DataStore
 A resource that serializes data from a data model. More...
class  Wt::Ext::DateField
 A form field for conveniently editing a date using a calendar popup. More...
class  Wt::Ext::Dialog
 A dialog emulates a modal window that blocks the user-interface. More...
class  Wt::Ext::FormField
 An abstract base class for form fields. More...
class  Wt::Ext::LineEdit
 A line edit. More...
class  Wt::Ext::Menu
 A menu presented in a popup window. More...
class  Wt::Ext::MenuItem
 An item in a menu. More...
class  Wt::Ext::MessageBox
 A standard dialog for confirmation or to get simple user input. More...
class  Wt::Ext::NumberField
 A form field for editing a number. More...
class  Wt::Ext::PagingToolBar
 A tool bar that provides paging controls for supporting large data sets in a table view. More...
class  Wt::Ext::Panel
 A container with a title and standard GUI elements. More...
class  Wt::Ext::ProgressDialog
 A standard dialog to inform the user of progress during a time consuming task. More...
class  Wt::Ext::RadioButton
 A user control that represents a radio button. More...
class  Wt::Ext::Splitter
 A container widget with resize handles between its children. More...
class  Wt::Ext::SplitterHandle
 A handle inside a splitter. More...
class  Wt::Ext::TableView
 A widget that displays data in a table. More...
class  Wt::Ext::TabWidget
 A widget that organizes contents in tab panes. More...
class  Wt::Ext::TextEdit
 A rich-text editor. More...
class  Wt::Ext::ToolBar
 A class that represents a tool bar (or a menu bar). More...
class  Wt::Ext::ToolTipConfig
 A configuration object for tool tips. More...
class  Wt::Ext::Widget
 An abstract base class for all Ext widgets. More...

+Enumerations

enum  Wt::Ext::DataLocation { Wt::Ext::ClientSide, +Wt::Ext::ServerSide + }
 

An enum for the location of data in data-intensive widgets.

+ More...
+

Detailed Description

+

Wt Ext library with JavaScript-only widgets.

+

+1. Introduction

+

An add-on library to Wt (wtext) provides additional widgets that are all contained within the Wt::Ext namespace. These widgets are implemented using an open-source third-party JavaScript library, extjs (http://extjs.com/), version 2.0, or 2.1 but not higher (does not support Ext 2.2), e.g. http://stosha.net/ext-2.0.2.zip.

+

Unlike plain Wt widgets, these widgets require the availability of JavaScript (and a sufficiently recent browser). They do, however, have a polished default look (certainly compared to unstyled plain Wt widgets), and add several new capabilities to Wt:

+
    +
  • +

    A Container widget which supports layout using layout managers, and a Panel, which inherits Container, which adds standard GUI functionality to a container, such as tool bars, and support for collapsing and resizing

    +

    +
  • +
  • +

    Form fields that support client-side validation (CheckBox, ComboBox, DateField, LineEdit, NumberField, RadioButton). This has been integrated together with the server side validation in the standard WValidator classes (WDateValidator, WDoubleValidator, WIntValidator, WLengthValidator, WRegExpValidator). In this way, a single validator object specifies at the same time the client- and server-side validation. In this way, the user is given instant feed-back using client-side validation, but the data is also validated (again) as it arrives on the server, since nothing prevents the client JavaScript code from be hacked or circumvented.

    +

    +
  • +
  • +

    TextEdit: a rich text editor, which may be used to edit HTML.

    +

    +
  • +
  • +

    TableView displays data from a WAbstractItemModel. The widget provides sorting, column resizing. In addition, form fiels may be used for inline editing of data, which is propagated back to the model.

    +

    +
  • +
  • +

    Good-looking and flexible Menu and ToolBar classes.

    +

    +
  • +
  • +

    A polished Dialog, MessageBox and ProgressDialog.

    +

    +
  • +
  • +

    Standalone Splitter widget, or integrated in BorderLayout

    +

    +
  • +
  • +Availability of several themes, created by the ExtJS user community. Simply import the stylesheet after Ext itself is loaded. (for example, try: useStyleSheet("<i>extBaseURL</i>/resources/css/xtheme-gray.css")). Ext itself is loaded by inserting an Ext widget, so a good place to do this is at the end of your application construction.
  • +
+

The functionality of some of these widgets overlaps with existing Wt widgets. Whenever possible, the same API was adopted.

+

The following table shows corresponding widgets and comments on the resemblance of the APIs.

+ + + + + + + + + + + + + + + + + + + +
Wt widgetWt Ext widget Comment
WCalendarCalendar The Wt version is more versatile (for example allows multiple selection, and allows more programmatic control.
WCheckBoxCheckBox Identical API.
WComboBoxComboBox The Ext version adds a number of features that are similar to those provided by Wt's SuggestionPopup, and allows keeping the entire data set at the server.
WDialogDialog Almost identical API. The Ext version manages standard buttons.
WLineEditLineEdit Identical API.
WMessageBoxMessageBox Almost identical API. The Wt version is more flexible with respect to buttons, while the Ext version supports prompting for input.
WRadioButtonRadioButton Identical API.
WTextEditTextEdit API differences. The Wt version has more options and is XHTML-compliant.
+

You can freely mix Wt widgets and Ext widgets in your application: Wt widgets containers may contain Ext widgets, and vice-versa. From a programmer perspective, there are no differences for using Wt versus Ext widgets.

+

+2. Deployment notes.

+

To use Ext widgets, you need to download the Ext JavaScript library (ext-2.x), and deploy the following files to your web server:

+
    +
  • +ext-2.x/adapter/ext/ext-base.js to extBaseURL/ext-base.js
  • +
  • +ext-2.x/ext-all.js to extBaseURL/ext-all.js
  • +
  • +ext-2.x/resources/ to extBaseURL/resources/ (the entire folder)
  • +
+

The default value for extBaseURL is "ext/". This value may be overridden with a URL that points to a folder where these files are located, by configuring the extBaseURL property in your Wt configuration file.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::Ext::DataLocation
+
+
+ +

An enum for the location of data in data-intensive widgets.

+
See also:
ComboBox::setDataLocation(), TableView::setDataLocation()
+
Enumerator:
+ + +
ClientSide  +

Download the whole data model to the client.

+
ServerSide  +

Keep the data at the server, and transfer data on-demand.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__modelview.html b/wt-3.1.7a/doc/reference/html/group__modelview.html new file mode 100644 index 0000000..d6e9402 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__modelview.html @@ -0,0 +1,586 @@ + + + + +Wt: Model/view system + + + + + + + + + +
+ +
+

Model/view system

+
+
+ +

Classes that implement Wt's model/view system. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  Wt::boost_any_traits< Type >
 A traits class for a type stored in a boost::any. More...
class  Wt::Chart::WAbstractChart
 Abstract base class for MVC-based charts. More...
class  Wt::Chart::WCartesianChart
 A cartesian chart. More...
class  Wt::Chart::WPieChart
 A pie chart. More...
class  Wt::Dbo::QueryModel< Result >
 A Wt MVC Model to view/edit query results. More...
class  Wt::Ext::ComboBox
 A widget that provides a drop-down combo-box control. More...
class  Wt::WAbstractItemDelegate
 Abstract delegate class for rendering an item in a MVC view. More...
class  Wt::WAbstractItemModel
 An abstract model for use with Wt's view classes. More...
class  Wt::WAbstractItemView
 An abstract base class for item Views. More...
class  Wt::WAbstractListModel
 An abstract list model for use with Wt's view classes. More...
class  Wt::WAbstractProxyModel
 An abstract proxy model for Wt's item models. More...
class  Wt::WAbstractTableModel
 An abstract table model for use with Wt's view classes. More...
class  Wt::WAggregateProxyModel
 A proxy model for Wt's item models that provides column aggregation. More...
class  Wt::WBatchEditProxyModel
 A proxy model for Wt's item models that provides batch editing. More...
class  Wt::WComboBox
 A widget that provides a drop-down combo-box control. More...
class  Wt::WItemDelegate
 Standard delegate class for rendering a view item. More...
class  Wt::WItemSelectionModel
 A class that represents a selection for a WAbstractItemView. More...
class  Wt::WModelIndex
 An index to an item in a item data model. More...
class  Wt::WSelectionBox
 A selection box allows selection from a list of options. More...
class  Wt::WSortFilterProxyModel
 A proxy model for Wt's item models that provides filtering and/or sorting. More...
class  Wt::WStandardItem
 An item in a WStandardItemModel. More...
class  Wt::WStandardItemModel
 A standard data model, which stores its data in memory. More...
class  Wt::WStringListModel
 An model that manages a list of strings. More...
class  Wt::WSuggestionPopup
 A widget which popups to assist in editing a textarea or lineedit. More...
class  Wt::WTableView
 An MVC View widget for tabular data. More...
class  Wt::WTreeView
 A view class that displays a model as a tree or tree table. More...

+Enumerations

enum  Wt::MatchFlag {
+  Wt::MatchExactly = 0x0, +Wt::MatchStringExactly = 0x1, +Wt::MatchStartsWith = 0x2, +Wt::MatchEndsWith = 0x3, +
+  Wt::MatchRegExp = 0x4, +Wt::MatchWildCard = 0x5, +Wt::MatchCaseSensitive = 0x10, +Wt::MatchWrap = 0x20 +
+ }
 

Flags that specify how to match two values.

+ More...
enum  Wt::HeaderFlag { Wt::ColumnIsCollapsed = 0x1, +Wt::ColumnIsExpandedLeft = 0x2, +Wt::ColumnIsExpandedRight = 0x4 + }
 

Flags that indicate table header options.

+ More...
enum  Wt::ItemDataRole {
+  Wt::DisplayRole = 0, +Wt::DecorationRole = 1, +Wt::EditRole = 2, +Wt::StyleClassRole = 3, +
+  Wt::CheckStateRole = 4, +Wt::ToolTipRole = 5, +Wt::InternalPathRole = 6, +Wt::UrlRole = 7, +
+  Wt::LevelRole = 8, +Wt::MarkerPenColorRole = 16, +Wt::MarkerBrushColorRole = 17, +Wt::UserRole = 32 +
+ }
 

Enumeration that indicates a role for a data item.

+ More...
enum  Wt::ItemFlag {
+  Wt::ItemIsSelectable = 0x1, +Wt::ItemIsEditable = 0x2, +Wt::ItemIsUserCheckable = 0x4, +Wt::ItemIsDragEnabled = 0x8, +
+  Wt::ItemIsDropEnabled = 0x10, +Wt::ItemIsTristate = 0x20, +Wt::ItemIsXHTMLText = 0x40, +Wt::ItemIsDirty = 0x80 +
+ }
 

Flags that indicate data item options.

+ More...
enum  Wt::SortOrder { Wt::AscendingOrder, +Wt::DescendingOrder + }
 

Enumeration that indicates a sort order.

+ More...
enum  Wt::DropAction { Wt::CopyAction = 0x1, +Wt::MoveAction = 0x2 + }
 

Enumeration that indicates a drop action.

+ More...

+Functions

WString Wt::asString (const boost::any &v, const WString &formatString=WString())
 Interprets a boost::any as a string value.
double Wt::asNumber (const boost::any &v)
 Interprets a boost::any as a number value.
template<typename Type >
void Wt::registerType ()
 Registers MVC-support for a type passed in a boost::any.
+

Detailed Description

+

Classes that implement Wt's model/view system.

+

1. Models

+

The library provides support for tabular, tree-like and tree-table like models. All of these implement WAbstractItemModel.

+

Concrete model implementations

+

The following concrete model implementations are provided:

+ +

Proxy model implementations

+

Proxy models are helper models which wrap around another model, to provide additional functionality on top of the existing model. The following propy models:

+ +

Abstract models

+

Abstract models cannot be instantiated as such, but are the base point for custom model implementations:

+ +

2. Views

+

Item-based views

+ +

Graphical views

+ +

ExtJS-based (JavaScript-only) views

+

These views are being deprecated in favour of accessible counterparts.

+ +

3. Helper classes

+

Model indexes

+

WModelIndex represents an index to an item of a WAbstractItemModel, identified by a row, column and parent node.

+

Item delegates

+

Item delegates are used by WTableView and WTreeView to render a single item and to provide editing support.

+

The abstract base class is WAbstractItemDelegate, and a default implementation is provided by WItemDelegate.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::DropAction
+
+
+ +

Enumeration that indicates a drop action.

+
See also:
WAbstractItemModel::dropEvent()
+
Enumerator:
+ + +
CopyAction  +

Copy the selection.

+
MoveAction  +

Move the selection (deleting originals)

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::HeaderFlag
+
+
+ +

Flags that indicate table header options.

+
See also:
WAbstractItemModel::headerFlags()
+
Enumerator:
+ + + +
ColumnIsCollapsed  +

Flag that indicates that the column can be expanded.

+
See also:
WAbstractItemModel::expandColumn()
+
ColumnIsExpandedLeft  +

Flag that indicates that the column was expanded to the left.

+
See also:
WAbstractItemModel::collapseColumn()
+
ColumnIsExpandedRight  +

Flag that indicates that the column was expanded to the right.

+
See also:
WAbstractItemModel::collapseColumn()
+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::ItemDataRole
+
+
+ +

Enumeration that indicates a role for a data item.

+

A single data item can have data associated with it corresponding to different roles. Each role may be used by the corresponding view class in a different way.

+
See also:
WModelIndex::data()
+
Enumerator:
+ + + + + + + + + + + + +
DisplayRole  +

Role for textual representation.

+
DecorationRole  +

Role for the url of an icon.

+
EditRole  +

Role for the edited value.

+
StyleClassRole  +

Role for the style class.

+
CheckStateRole  +

Role that indicates the check state. Data for this role should be a bool. When the Wt::ItemIsTristate flag is set for the item, data for this role should be of type Wt::CheckState.

+
ToolTipRole  +

Role for a tooltip.

+
InternalPathRole  +

Role for an internal path activated when clicked.

+
UrlRole  +

Role for a url activated when clicked.

+
LevelRole  +

Level in aggregation, for header data.

+
MarkerPenColorRole  +

Marker pen color (for Chart::WCartesianChart)

+
MarkerBrushColorRole  +

Marker brush color (for Chart::WCartesianChart)

+
UserRole  +

First role reserved for user purposes.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::ItemFlag
+
+
+ +

Flags that indicate data item options.

+
See also:
WModelIndex::flags()
+
Enumerator:
+ + + + + + + + +
ItemIsSelectable  +

Item can be selected.

+
ItemIsEditable  +

Item can be edited.

+
ItemIsUserCheckable  +

Item can be checked.

+
ItemIsDragEnabled  +

Item can be dragged.

+
ItemIsDropEnabled  +

Item can be a drop target.

+
ItemIsTristate  +

Item has tree states. When set, Wt::CheckStateRole data is of type Wt::CheckState

+
ItemIsXHTMLText  +

Item's textual is HTML.

+
ItemIsDirty  +

Item's value has been modified.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::MatchFlag
+
+
+ +

Flags that specify how to match two values.

+

Except when MatchExactly, the lexical matching is done (by comparing string representations of the value with the query). This is by default case insensitive, unless MatchCaseSensitive is OR'ed.

+
Enumerator:
+ + + + + + + + +
MatchExactly  +

Same type and value.

+
MatchStringExactly  +

Lexical match.

+
MatchStartsWith  +

Match start with query.

+
MatchEndsWith  +

Match end with query.

+
MatchRegExp  +

Regular expression match.

+
MatchWildCard  +

Wildcard match.

+
MatchCaseSensitive  +

Case sensitive.

+
MatchWrap  +

Wrap around whole model.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::SortOrder
+
+
+ +

Enumeration that indicates a sort order.

+
Enumerator:
+ + +
AscendingOrder  +

Ascending sort order.

+
DescendingOrder  +

Descending sort order.

+
+
+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
double Wt::asNumber (const boost::any &  v )
+
+
+ +

Interprets a boost::any as a number value.

+

The conversion works as follows:

+
    +
  • A boost::any without a value, or a string that does not represent a number, is converted to a NaN.
  • +
  • A string is lexically casted to a double
  • +
  • Data of type WDate is converted to an integer number using WDate::toJulianDay().
  • +
  • Data of type WDateTime is converted to an integer number using WDateTime::toTime_t().
  • +
  • Data of type WTime is converted to an integer number as the number of milliseconds since midnight.
  • +
+

Other types are converted according to Wt::boost_any_traits<Type>::asNumber(). For these other types, you need to register their support first using Wt::registerType<Type>() and you may want to specialize Wt::boost_any_traits<Type> for a custom handling of their conversions.

+
See also:
asString(), boost_any_traits
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
WString Wt::asString (const boost::any &  v,
const WString &  formatString = WString() 
)
+
+
+ +

Interprets a boost::any as a string value.

+

The conversion works as follows:

+
    +
  • A boost::any without a value is converted to an empty string
  • +
  • Number values (integers and doubles) are formatted using the format string with snprintf(), or with boost::lexical_cast<> if the format string is empty.
  • +
  • Data of type WDate is converted with WDate::toString() using the indicated format string. If the format string is empty, "dd/MM/yy" is assumed.
  • +
  • Data of type WTime is converted with WTime::toString() using the indicated format string. If the format string is emtpy, "HH:mm:ss" is assumed.
  • +
  • Data of type WDateTime is converted with WDateTime::toString() using the indicated format string. If the format string is empty, "dd/MM/yy HH:mm:ss" is assumed.
  • +
+

Other types are converted according to Wt::boost_any_traits<Type>::asString(). For these other types, you need to register their support first using Wt::registerType<Type>() and you may want to specialize Wt::boost_any_traits<Type> for a custom handling of their conversions.

+
See also:
asNumber(), boost_any_traits
+ +
+
+ +
+
+
+template<typename Type >
+ + + + + + + +
void Wt::registerType ( )
+
+
+ +

Registers MVC-support for a type passed in a boost::any.

+

By registering a type using this method, the global function Wt::asString(), which converts a boost::any to a string, will know how to interpret a boost::any holding a value of type Type using Wt::boost_any_traits<Type>::asString(). This gives Wt's built-in standard View classes the ability to display Wt::DisplayRole data of a Wt::WAbstractItemModel model.

+

Similarly, Wt::asNumber() uses Wt::boost_any_traits<Type>::asNumber() for use by Wt::Chart::WCartesianChart and Wt::Chart::WPieChart as numerical data.

+

The default implementation of Wt::boost_any_traits<Type> converts a value t to a Wt::WString by using boost::lexical_cast<std::string>() which it expects to return a UTF-8 string. This conversion thus relies on the std::ostream<< operator to be overloaded for the type. You may want to specialize Wt::boost_any_traits to provide a custom conversion for a type, or if you want to take into account the format string.

+

The following types are registered by Wt itself:

+ +

This method is thread-safe, and it is not an error to register the same type multiple times.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__painting.html b/wt-3.1.7a/doc/reference/html/group__painting.html new file mode 100644 index 0000000..dc902f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__painting.html @@ -0,0 +1,273 @@ + + + + +Wt: Painting system + + + + + + + + + +
+ +
+

Painting system

+
+
+ +

Classes that provide support for vector graphics painting. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Wt::WBrush
 Class that defines the style for filling areas. More...
class  Wt::WCanvasPaintDevice
 A paint device for rendering using the HTML 5 <canvas> element. More...
class  Wt::WColor
 A class that specifies a color. More...
class  Wt::WFont
 A style class describing a font. More...
class  Wt::WLineF
 Utility class that defines a single line. More...
class  Wt::WPaintDevice
 The abstract base class for a paint device. More...
class  Wt::WPaintedWidget
 A widget that is painted using vector graphics. More...
class  Wt::WPainter
 Vector graphics painting class. More...
class  Wt::WPainterPath
 A path defining a shape. More...
class  Wt::WPdfImage
 A paint device for rendering to a PDF. More...
class  Wt::WPen
 Class that defines the style for pen strokes. More...
class  Wt::WPointF
 Utility class that defines a 2D point. More...
class  Wt::WRasterImage
 A paint device for rendering to a raster image. More...
class  Wt::WRectF
 Utility class that defines a rectangle. More...
class  Wt::WShadow
 Class that defines a shadow style. More...
class  Wt::WSvgImage
 A paint device for rendering using Scalable Vector Graphics (SVG). More...
class  Wt::WTransform
 A 2D affine transformation matrix. More...
class  Wt::WVectorImage
 An abstract paint device for rendering using native vector graphics. More...
class  Wt::WVmlImage
 A paint device for rendering using the VML pseudo-standard. More...

+Enumerations

enum  Wt::WPen::PenStyle {
+  Wt::NoPen, +Wt::SolidLine, +Wt::DashLine, +Wt::DotLine, +
+  Wt::DashDotLine, +Wt::DashDotDotLine +
+ }
 

Enumeration that indicates a pen style.

+ More...
enum  Wt::WPen::PenCapStyle { Wt::FlatCap, +Wt::SquareCap, +Wt::RoundCap + }
 

Enumeration that indicates how line end points are rendered.

+ More...
enum  Wt::WPen::PenJoinStyle { Wt::MiterJoin, +Wt::BevelJoin, +Wt::RoundJoin + }
 

Enumeration that indicates how line joins are rendered.

+ More...
enum  Wt::WBrush::WBrushStyle { Wt::NoBrush = 0, +Wt::SolidPattern = 1 + }
 

Enumeration that indicates a fill style.

+ More...
+

Detailed Description

+

Classes that provide support for vector graphics painting.

+

Wt provides a vector graphics painting system, which depending on the browser support, uses one of four different methods to paint the graphics (inline SVG, inline VML, HTML 5 <canvas> or a raster image). Vector graphics has as benefit a lower bandwidth usage compared to raster images, indepedent of the image size. To use the paint system, you need to specialize WPaintedWidget and use a WPainter to paint the contents of the widget inside its WPaintedWidget::paintEvent().

+

In addition, a PDF backend is included in the library, which can be used to make a PDF version of a painting, or to embed a painting in a PDF document.

+

To use inline SVG, you need to enable xhtml support in your configuration file by enabling send-xhtml-mimetype, see 10.2 General application settings (wt_config.xml).

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum PenCapStyle [related, inherited]
+
+
+ +

Enumeration that indicates how line end points are rendered.

+
Enumerator:
+ + + +
FlatCap  +

Flat ends.

+
SquareCap  +

Square ends (prolongs line with half width)

+
RoundCap  +

Round ends (terminates with a half circle)

+
+
+
+ +
+
+ +
+
+ + + + +
enum PenJoinStyle [related, inherited]
+
+
+ +

Enumeration that indicates how line joins are rendered.

+
Enumerator:
+ + + +
MiterJoin  +

Pointy joins.

+
BevelJoin  +

Squared-off joins.

+
RoundJoin  +

Rounded joins.

+
+
+
+ +
+
+ +
+
+ + + + +
enum PenStyle [related, inherited]
+
+
+ +

Enumeration that indicates a pen style.

+
Enumerator:
+ + + + + + +
NoPen  +

Do not stroke.

+
SolidLine  +

Stroke with a solid line.

+
DashLine  +

Stroked with a dashed line.

+
DotLine  +

Stroke with a dotted line.

+
DashDotLine  +

Stroke with a dash dot line.

+
DashDotDotLine  +

Stroke with a dash dot dot line.

+
+
+
+ +
+
+ +
+
+ + + + +
enum WBrushStyle [related, inherited]
+
+
+ +

Enumeration that indicates a fill style.

+
Enumerator:
+ + +
NoBrush  +

Do not fill.

+
SolidPattern  +

Fill with a solid color.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__signalslot.html b/wt-3.1.7a/doc/reference/html/group__signalslot.html new file mode 100644 index 0000000..8512088 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__signalslot.html @@ -0,0 +1,433 @@ + + + + +Wt: Signal/slot system + + + + + + + + + +
+ +
+

Signal/slot system

+
+
+ +

Support for event handling using signals and slots. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Wt::SignalBase
 Abstract base class of a signal. More...
class  Wt::EventSignalBase
 Abstract base class of an event signal. More...
class  Wt::WMouseEvent
 A class providing details for a mouse event. More...
class  Wt::WKeyEvent
 A class providing details for a keyboard event. More...
class  Wt::WDropEvent
 A class providing details for a drop event. More...
class  Wt::WScrollEvent
 A class providing details for a scroll event. More...
class  Wt::WTouchEvent
 A class providing details for a touch event. More...
class  Wt::WGestureEvent
 A class providing details for a gesture event. More...
class  Wt::JSignal< A1, A2, A3, A4, A5, A6 >
 A signal to relay JavaScript to C++ calls. More...
class  Wt::JSlot
 A slot that is only implemented in client side JavaScript code. More...
class  Wt::WObject
 A base class for objects that participate in the signal/slot system. More...
class  Wt::Signal< A1, A2, A3, A4, A5, A6 >
 A signal that propagates events to listeners. More...
class  Wt::EventSignal< E >
 A signal that conveys user-interface events. More...
class  Wt::WSignalMapper< T, A1 >
 A utility class to connect multiple senders to a single slot. More...

+Enumerations

enum  Wt::KeyboardModifier {
+  Wt::NoModifier = 0x0, +Wt::ShiftModifier = 0x1, +Wt::ControlModifier = 0x2, +Wt::AltModifier = 0x4, +
+  Wt::MetaModifier = 0x8 +
+ }
 

Enumeration for keyboard modifiers.

+ More...
enum  Wt::Key {
+  Wt::Key_unknown = 0, +Wt::Key_Enter = 13, +Wt::Key_Tab = 9, +Wt::Key_Backspace = 8, +
+  Wt::Key_Shift = 16, +Wt::Key_Control = 17, +Wt::Key_Alt = 18, +Wt::Key_PageUp = 33, +
+  Wt::Key_PageDown = 34, +Wt::Key_End = 35, +Wt::Key_Home = 36, +Wt::Key_Left = 37, +
+  Wt::Key_Up = 38, +Wt::Key_Right = 39, +Wt::Key_Down = 40, +Wt::Key_Insert = 45, +
+  Wt::Key_Delete = 46, +Wt::Key_Escape = 27, +Wt::Key_F1 = 112, +Wt::Key_F2 = 113, +
+  Wt::Key_F3 = 114, +Wt::Key_F4 = 115, +Wt::Key_F5 = 116, +Wt::Key_F6 = 117, +
+  Wt::Key_F7 = 118, +Wt::Key_F8 = 119, +Wt::Key_F9 = 120, +Wt::Key_F10 = 121, +
+  Wt::Key_F11 = 122, +Wt::Key_F12 = 123, +Wt::Key_Space = ' ', +Wt::Key_A = 'A', +
+  Wt::Key_B = 'B', +Wt::Key_C = 'C', +Wt::Key_D = 'D', +Wt::Key_E = 'E', +
+  Wt::Key_F = 'F', +Wt::Key_G = 'G', +Wt::Key_H = 'H', +Wt::Key_I = 'I', +
+  Wt::Key_J = 'J', +Wt::Key_K = 'K', +Wt::Key_L = 'L', +Wt::Key_M = 'M', +
+  Wt::Key_N = 'N', +Wt::Key_O = 'O', +Wt::Key_P = 'P', +Wt::Key_Q = 'Q', +
+  Wt::Key_R = 'R', +Wt::Key_S = 'S', +Wt::Key_T = 'T', +Wt::Key_U = 'U', +
+  Wt::Key_V = 'V', +Wt::Key_W = 'W', +Wt::Key_X = 'X', +Wt::Key_Y = 'Y', +
+  Wt::Key_Z = 'Z' +
+ }
 

Enumeration for key codes.

+ More...
+

Detailed Description

+

Support for event handling using signals and slots.

+

To respond to user-interactivity events, or in general to communicate events from one widget to any other, Wt uses a signal/slot system.

+

A slot is any method of any descendant of WObject. To connect a signal with a slot, the only requirement is that the method signature of the slot must be compatible with the signal definition. In this way every method may be used as a slot, and it is not necessary to explicitly indicate a particular method to be a slot (as is needed in Qt), by putting them in a special section. Nevertheless, you may still do that if you wish to emphasize that these functions can be used as slots, or, if you have done extra work to optimize the implementation of these methods as client-side JavaScript code (see below).

+

A signal may be created by adding a Signal<X, ...> object to your class. You may specify up to 6 arguments which may be of arbitrary types that are Copyable, that may be passed through the signal to connected slots.

+

The library defines several user-event signals on various widgets, and it is easy and convenient to add signals and slots to widget classes to communicate events and trigger callbacks.

+

Event signals (EventSignal<E>) are signals that may be triggered internally by the library to respond to user interactivity events. The abstract base classes WInteractWidget and WFormWidget define most of these event signals. To react to one of these events, the programmer connects a self-defined or already existing slot to such a signal.

+

To connect a signal from multiple senders to a single slot, the WSignalMapper<T> class may be convenient. Using that class you can still identify the sender, using an arbitrary property of the sender which you define when making the connection. That property is passed as an additional slot argument.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::Key
+
+
+ +

Enumeration for key codes.

+

These are key codes that identify a key on a keyboard. All keys listed here can be identified across all browsers and (Western) keyboards. A Key is returned by WKeyEvent::key(). If you want to identify a character, you should use the WKeyEvent::charCode() method instead.

+
See also:
WInteractWidget::keyWentDown, WInteractWidget::keyWentUp
+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key_unknown  +

Unknown key.

+
Key_Enter  +

Enter key.

+
Key_Tab  +

Tab key.

+
Key_Backspace  +

Backspace key.

+
Key_Shift  +

Shift key.

+
Key_Control  +

Control key.

+
Key_Alt  +

Alt key.

+
Key_PageUp  +

Page up key.

+
Key_PageDown  +

Page down key.

+
Key_End  +

End key.

+
Key_Home  +

Home key.

+
Key_Left  +

Left arrow key.

+
Key_Up  +

Up arrow key.

+
Key_Right  +

Right arrow key.

+
Key_Down  +

Down arrow key.

+
Key_Insert  +

Insert key.

+
Key_Delete  +

Delete key.

+
Key_Escape  +

Escape key.

+
Key_F1  +

F1 function key.

+
Key_F2  +

F2 function key.

+
Key_F3  +

F3 function key.

+
Key_F4  +

F4 function key.

+
Key_F5  +

F5 function key.

+
Key_F6  +

F6 function key.

+
Key_F7  +

F7 function key.

+
Key_F8  +

F8 function key.

+
Key_F9  +

F9 function key.

+
Key_F10  +

F10 function key.

+
Key_F11  +

F11 function key.

+
Key_F12  +

F12 function key.

+
Key_Space  +

Space.

+
Key_A  +

'A' key

+
Key_B  +

'B' key

+
Key_C  +

'C' key

+
Key_D  +

'D' key

+
Key_E  +

'E' key

+
Key_F  +

'F' key

+
Key_G  +

'G' key

+
Key_H  +

'H' key

+
Key_I  +

'I' key

+
Key_J  +

'J' key

+
Key_K  +

'K' key

+
Key_L  +

'L' key

+
Key_M  +

'M' key

+
Key_N  +

'N' key

+
Key_O  +

'O' key

+
Key_P  +

'P' key

+
Key_Q  +

'Q' key

+
Key_R  +

'R' key

+
Key_S  +

'S' key

+
Key_T  +

'T' key

+
Key_U  +

'U' key

+
Key_V  +

'V' key

+
Key_W  +

'W' key

+
Key_X  +

'X' key

+
Key_Y  +

'Y' key

+
Key_Z  +

'Z' key

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::KeyboardModifier
+
+
+ +

Enumeration for keyboard modifiers.

+
See also:
WMouseEvent::modifiers(), WKeyEvent::modifiers()
+
Enumerator:
+ + + + + +
NoModifier  +

No modifiers.

+
ShiftModifier  +

Shift key pressed.

+
ControlModifier  +

Control key pressed.

+
AltModifier  +

Alt key pressed.

+
MetaModifier  +

Meta key pressed ("Windows" or "Command" (Mac) key)

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/group__style.html b/wt-3.1.7a/doc/reference/html/group__style.html new file mode 100644 index 0000000..4d12111 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/group__style.html @@ -0,0 +1,203 @@ + + + + +Wt: Style classes + + + + + + + + + +
+ +
+

Style classes

+
+
+ +

Collection of classes for markup of widgets. +More...

+ + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Wt::WBorder
 A style class for the border of a widget. More...
class  Wt::WColor
 A class that specifies a color. More...
class  Wt::WCssDecorationStyle
 A style class for a single widget or style sheet rule. More...
class  Wt::WCssRule
 Abstract rule in a CSS style sheet. More...
class  Wt::WCssTemplateRule
 A CSS rule based on a template widget. More...
class  Wt::WCssTextRule
 A CSS rule specified directly using CSS declarations. More...
class  Wt::WCssStyleSheet
 A CSS style sheet. More...
class  Wt::WFont
 A style class describing a font. More...

+Enumerations

enum  Wt::GlobalColor {
+  Wt::white, +Wt::black, +Wt::red, +Wt::darkRed, +
+  Wt::green, +Wt::darkGreen, +Wt::blue, +Wt::darkBlue, +
+  Wt::cyan, +Wt::darkCyan, +Wt::magenta, +Wt::darkMagenta, +
+  Wt::yellow, +Wt::darkYellow, +Wt::gray, +Wt::darkGray, +
+  Wt::lightGray, +Wt::transparent +
+ }
 

Enumeration for predefined colors.

+ More...
+

Detailed Description

+

Collection of classes for markup of widgets.

+

The recommended way to provide style information for your Wt application is using CSS stylesheets. You may add rules to the inline style sheet using WCssStyleSheet::addRule(), or by linking one or more external stylesheets using WApplication::useStyleSheet().

+

Alternatively, you may also provide style information directly, using WCssDecorationStyle, which you can manipulate for each widget using WWidget::decorationStyle().

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::GlobalColor
+
+
+ +

Enumeration for predefined colors.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + +
white  +

Color white.

+
black  +

Color black.

+
red  +

Color red.

+
darkRed  +

Color dark red.

+
green  +

Color green.

+
darkGreen  +

Color dark green.

+
blue  +

Color blue.

+
darkBlue  +

Color dark blue.

+
cyan  +

Color cyan.

+
darkCyan  +

Color dark cyan.

+
magenta  +

Color magenta.

+
darkMagenta  +

Color dark magenta.

+
yellow  +

Color yellow.

+
darkYellow  +

Color dark yellow.

+
gray  +

Color medium gray.

+
darkGray  +

Color dark gray.

+
lightGray  +

Color light gray.

+
transparent  +

Color transparent.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/hierarchy.html b/wt-3.1.7a/doc/reference/html/hierarchy.html new file mode 100644 index 0000000..6d6f98b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/hierarchy.html @@ -0,0 +1,465 @@ + + + + +Wt: Hierarchical Index + + + + + + + + + +
+
+

Class Hierarchy

+
+
+ +

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically: +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/index.html b/wt-3.1.7a/doc/reference/html/index.html new file mode 100644 index 0000000..76ad5db --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/index.html @@ -0,0 +1,84 @@ + + + + +Wt: Wt documentation. + + + + + + + + + +
+
+

Wt documentation.

+
+
+

3.1.7

Wt is a C++ library for developing web applications.

+

This is a reference manual which has been generated from the source code.

+

For learning web application programming with Wt, we recommend reading the introduction to Wt which includes a complete tutorial.

+

In addition, there is also:

+ +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__0.map b/wt-3.1.7a/doc/reference/html/inherit__graph__0.map new file mode 100644 index 0000000..fe6ebbc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__0.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__0.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__0.md5 new file mode 100644 index 0000000..80c8f4b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__0.md5 @@ -0,0 +1 @@ +a6a1399287d1191893fbfcc4f0b1cf78 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__0.png b/wt-3.1.7a/doc/reference/html/inherit__graph__0.png new file mode 100644 index 0000000..e4f1eb1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__0.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__1.map b/wt-3.1.7a/doc/reference/html/inherit__graph__1.map new file mode 100644 index 0000000..a354dbc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__1.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__1.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__1.md5 new file mode 100644 index 0000000..83a4abf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__1.md5 @@ -0,0 +1 @@ +c336f4e0f3edaa6688160df18ccf9b02 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__1.png b/wt-3.1.7a/doc/reference/html/inherit__graph__1.png new file mode 100644 index 0000000..eef08bb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__1.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__10.map b/wt-3.1.7a/doc/reference/html/inherit__graph__10.map new file mode 100644 index 0000000..f21aee2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__10.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__10.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__10.md5 new file mode 100644 index 0000000..773b0ee --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__10.md5 @@ -0,0 +1 @@ +308e5bbacdf624d561a2b0c16407fc82 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__10.png b/wt-3.1.7a/doc/reference/html/inherit__graph__10.png new file mode 100644 index 0000000..6351a1b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__10.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__11.map b/wt-3.1.7a/doc/reference/html/inherit__graph__11.map new file mode 100644 index 0000000..d1f1013 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__11.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__11.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__11.md5 new file mode 100644 index 0000000..80b5a2b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__11.md5 @@ -0,0 +1 @@ +4263074cf00a3422370ff4951b8d794b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__11.png b/wt-3.1.7a/doc/reference/html/inherit__graph__11.png new file mode 100644 index 0000000..f197163 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__11.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__12.map b/wt-3.1.7a/doc/reference/html/inherit__graph__12.map new file mode 100644 index 0000000..bf33c08 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__12.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__12.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__12.md5 new file mode 100644 index 0000000..765675b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__12.md5 @@ -0,0 +1 @@ +57aa0b028936e8c03fc134fc825b30d4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__12.png b/wt-3.1.7a/doc/reference/html/inherit__graph__12.png new file mode 100644 index 0000000..9d6b542 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__12.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__13.map b/wt-3.1.7a/doc/reference/html/inherit__graph__13.map new file mode 100644 index 0000000..760e415 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__13.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__13.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__13.md5 new file mode 100644 index 0000000..b985cbb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__13.md5 @@ -0,0 +1 @@ +80dbf3b03d390d431404681f6213dfaf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__13.png b/wt-3.1.7a/doc/reference/html/inherit__graph__13.png new file mode 100644 index 0000000..73a8109 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__13.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__14.map b/wt-3.1.7a/doc/reference/html/inherit__graph__14.map new file mode 100644 index 0000000..65079ab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__14.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__14.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__14.md5 new file mode 100644 index 0000000..2316b6d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__14.md5 @@ -0,0 +1 @@ +8ed97145b56132bbadffa359d22bee2e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__14.png b/wt-3.1.7a/doc/reference/html/inherit__graph__14.png new file mode 100644 index 0000000..62502fe Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__14.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__15.map b/wt-3.1.7a/doc/reference/html/inherit__graph__15.map new file mode 100644 index 0000000..33e08bf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__15.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__15.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__15.md5 new file mode 100644 index 0000000..e3303fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__15.md5 @@ -0,0 +1 @@ +ca8d375b25a4b2394685542a86307410 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__15.png b/wt-3.1.7a/doc/reference/html/inherit__graph__15.png new file mode 100644 index 0000000..cb8b03c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__15.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__16.map b/wt-3.1.7a/doc/reference/html/inherit__graph__16.map new file mode 100644 index 0000000..d938d1f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__16.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__16.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__16.md5 new file mode 100644 index 0000000..471d266 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__16.md5 @@ -0,0 +1 @@ +9c7adcefa43a0c51c767dfcad9b359b5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__16.png b/wt-3.1.7a/doc/reference/html/inherit__graph__16.png new file mode 100644 index 0000000..395d1b5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__16.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__17.map b/wt-3.1.7a/doc/reference/html/inherit__graph__17.map new file mode 100644 index 0000000..077137d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__17.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__17.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__17.md5 new file mode 100644 index 0000000..ff36b76 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__17.md5 @@ -0,0 +1 @@ +89ce48281e13d2ddbfd69c79816a15db \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__17.png b/wt-3.1.7a/doc/reference/html/inherit__graph__17.png new file mode 100644 index 0000000..31d979f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__17.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__18.map b/wt-3.1.7a/doc/reference/html/inherit__graph__18.map new file mode 100644 index 0000000..be26686 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__18.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__18.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__18.md5 new file mode 100644 index 0000000..d423c56 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__18.md5 @@ -0,0 +1 @@ +a51589cb9abbc3a3ba71522f4d246977 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__18.png b/wt-3.1.7a/doc/reference/html/inherit__graph__18.png new file mode 100644 index 0000000..ce1bc34 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__18.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__19.map b/wt-3.1.7a/doc/reference/html/inherit__graph__19.map new file mode 100644 index 0000000..c3f35fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__19.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__19.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__19.md5 new file mode 100644 index 0000000..224bd49 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__19.md5 @@ -0,0 +1 @@ +f681ca4b8266a79a33eba6569ba86082 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__19.png b/wt-3.1.7a/doc/reference/html/inherit__graph__19.png new file mode 100644 index 0000000..bcdd917 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__19.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__2.map b/wt-3.1.7a/doc/reference/html/inherit__graph__2.map new file mode 100644 index 0000000..855ca57 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__2.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__2.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__2.md5 new file mode 100644 index 0000000..227ca7b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__2.md5 @@ -0,0 +1 @@ +22fc81777155438042ad8ee70db6ecbf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__2.png b/wt-3.1.7a/doc/reference/html/inherit__graph__2.png new file mode 100644 index 0000000..97d56de Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__2.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__20.map b/wt-3.1.7a/doc/reference/html/inherit__graph__20.map new file mode 100644 index 0000000..356c43f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__20.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__20.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__20.md5 new file mode 100644 index 0000000..43e8fbe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__20.md5 @@ -0,0 +1 @@ +a355355f43c6cf547d0d4836babce786 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__20.png b/wt-3.1.7a/doc/reference/html/inherit__graph__20.png new file mode 100644 index 0000000..dc6fc94 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__20.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__21.map b/wt-3.1.7a/doc/reference/html/inherit__graph__21.map new file mode 100644 index 0000000..b8e3978 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__21.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__21.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__21.md5 new file mode 100644 index 0000000..019cdbf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__21.md5 @@ -0,0 +1 @@ +3b58b2107ec6195735acfa17f42e1814 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__21.png b/wt-3.1.7a/doc/reference/html/inherit__graph__21.png new file mode 100644 index 0000000..80b7003 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__21.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__22.map b/wt-3.1.7a/doc/reference/html/inherit__graph__22.map new file mode 100644 index 0000000..1cf78e2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__22.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__22.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__22.md5 new file mode 100644 index 0000000..ea50bc0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__22.md5 @@ -0,0 +1 @@ +3683702d6f4229158216aa5d07d79fd3 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__22.png b/wt-3.1.7a/doc/reference/html/inherit__graph__22.png new file mode 100644 index 0000000..10bbe74 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__22.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__23.map b/wt-3.1.7a/doc/reference/html/inherit__graph__23.map new file mode 100644 index 0000000..0a26a4d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__23.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__23.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__23.md5 new file mode 100644 index 0000000..c933cd7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__23.md5 @@ -0,0 +1 @@ +49f9b04f3ea83ebf330e730cc6e35555 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__23.png b/wt-3.1.7a/doc/reference/html/inherit__graph__23.png new file mode 100644 index 0000000..266c5c1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__23.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__24.map b/wt-3.1.7a/doc/reference/html/inherit__graph__24.map new file mode 100644 index 0000000..df0b247 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__24.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__24.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__24.md5 new file mode 100644 index 0000000..dfb0438 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__24.md5 @@ -0,0 +1 @@ +6c2c7dd8c184408ccfe23d5846e25b62 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__24.png b/wt-3.1.7a/doc/reference/html/inherit__graph__24.png new file mode 100644 index 0000000..cd4d104 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__24.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__25.map b/wt-3.1.7a/doc/reference/html/inherit__graph__25.map new file mode 100644 index 0000000..9a86a6d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__25.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__25.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__25.md5 new file mode 100644 index 0000000..3148845 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__25.md5 @@ -0,0 +1 @@ +5b317a20f999443b7c299250459fe621 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__25.png b/wt-3.1.7a/doc/reference/html/inherit__graph__25.png new file mode 100644 index 0000000..fbd4e05 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__25.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__26.map b/wt-3.1.7a/doc/reference/html/inherit__graph__26.map new file mode 100644 index 0000000..2151142 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__26.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__26.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__26.md5 new file mode 100644 index 0000000..79e60f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__26.md5 @@ -0,0 +1 @@ +f2dcc33e23c9f087d08d2d10ae3d3c2d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__26.png b/wt-3.1.7a/doc/reference/html/inherit__graph__26.png new file mode 100644 index 0000000..ba38015 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__26.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__27.map b/wt-3.1.7a/doc/reference/html/inherit__graph__27.map new file mode 100644 index 0000000..28ceccf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__27.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__27.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__27.md5 new file mode 100644 index 0000000..5759602 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__27.md5 @@ -0,0 +1 @@ +871b0552d70aee55c0347e714e699779 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__27.png b/wt-3.1.7a/doc/reference/html/inherit__graph__27.png new file mode 100644 index 0000000..4ebc918 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__27.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__28.map b/wt-3.1.7a/doc/reference/html/inherit__graph__28.map new file mode 100644 index 0000000..d94f9f6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__28.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__28.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__28.md5 new file mode 100644 index 0000000..76c2d3e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__28.md5 @@ -0,0 +1 @@ +c32eda33e95413a03fc25ce19236d86c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__28.png b/wt-3.1.7a/doc/reference/html/inherit__graph__28.png new file mode 100644 index 0000000..d0a9215 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__28.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__29.map b/wt-3.1.7a/doc/reference/html/inherit__graph__29.map new file mode 100644 index 0000000..9208b9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__29.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__29.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__29.md5 new file mode 100644 index 0000000..2b54bc0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__29.md5 @@ -0,0 +1 @@ +9aa562d53cad9955a907f94e384cb92e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__29.png b/wt-3.1.7a/doc/reference/html/inherit__graph__29.png new file mode 100644 index 0000000..96c7384 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__29.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__3.map b/wt-3.1.7a/doc/reference/html/inherit__graph__3.map new file mode 100644 index 0000000..04c7633 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__3.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__3.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__3.md5 new file mode 100644 index 0000000..c4c6ba0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__3.md5 @@ -0,0 +1 @@ +690dec133f626039e3d081b7cd2ef8d5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__3.png b/wt-3.1.7a/doc/reference/html/inherit__graph__3.png new file mode 100644 index 0000000..85db62a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__3.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__30.map b/wt-3.1.7a/doc/reference/html/inherit__graph__30.map new file mode 100644 index 0000000..0dff795 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__30.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__30.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__30.md5 new file mode 100644 index 0000000..cbddeb3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__30.md5 @@ -0,0 +1 @@ +d1907e759c3c31ffbcfd3090b187fca7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__30.png b/wt-3.1.7a/doc/reference/html/inherit__graph__30.png new file mode 100644 index 0000000..14b409e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__30.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__31.map b/wt-3.1.7a/doc/reference/html/inherit__graph__31.map new file mode 100644 index 0000000..8dd4398 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__31.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__31.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__31.md5 new file mode 100644 index 0000000..6d21b3b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__31.md5 @@ -0,0 +1 @@ +6c81fe715e7f64f80f519f4f4ecbb9ee \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__31.png b/wt-3.1.7a/doc/reference/html/inherit__graph__31.png new file mode 100644 index 0000000..82eb06c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__31.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__32.map b/wt-3.1.7a/doc/reference/html/inherit__graph__32.map new file mode 100644 index 0000000..0e58b2b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__32.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__32.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__32.md5 new file mode 100644 index 0000000..d21326e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__32.md5 @@ -0,0 +1 @@ +de75393fb6cf788016e9b2f0fefa2fd3 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__32.png b/wt-3.1.7a/doc/reference/html/inherit__graph__32.png new file mode 100644 index 0000000..f515a98 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__32.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__33.map b/wt-3.1.7a/doc/reference/html/inherit__graph__33.map new file mode 100644 index 0000000..3a3bc96 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__33.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__33.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__33.md5 new file mode 100644 index 0000000..e761c1f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__33.md5 @@ -0,0 +1 @@ +f9f3447278e88d3b898f3a7871cfc1c1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__33.png b/wt-3.1.7a/doc/reference/html/inherit__graph__33.png new file mode 100644 index 0000000..86ed355 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__33.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__34.map b/wt-3.1.7a/doc/reference/html/inherit__graph__34.map new file mode 100644 index 0000000..668aede --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__34.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__34.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__34.md5 new file mode 100644 index 0000000..578d85b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__34.md5 @@ -0,0 +1 @@ +0f3b883a304e07bc81e50c22eb3b9a13 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__34.png b/wt-3.1.7a/doc/reference/html/inherit__graph__34.png new file mode 100644 index 0000000..66da4e4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__34.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__35.map b/wt-3.1.7a/doc/reference/html/inherit__graph__35.map new file mode 100644 index 0000000..9e5390c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__35.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__35.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__35.md5 new file mode 100644 index 0000000..995b366 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__35.md5 @@ -0,0 +1 @@ +115f2baf29d41596e9989bf46cead95f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__35.png b/wt-3.1.7a/doc/reference/html/inherit__graph__35.png new file mode 100644 index 0000000..9b89cb3 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__35.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__36.map b/wt-3.1.7a/doc/reference/html/inherit__graph__36.map new file mode 100644 index 0000000..65893e1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__36.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__36.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__36.md5 new file mode 100644 index 0000000..a7d16a5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__36.md5 @@ -0,0 +1 @@ +37ab8057dc7bfd59c1292f70082d2cd4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__36.png b/wt-3.1.7a/doc/reference/html/inherit__graph__36.png new file mode 100644 index 0000000..1722d8c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__36.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__37.map b/wt-3.1.7a/doc/reference/html/inherit__graph__37.map new file mode 100644 index 0000000..1b81fbd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__37.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__37.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__37.md5 new file mode 100644 index 0000000..63ab4f2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__37.md5 @@ -0,0 +1 @@ +188edd3b373e2e4b45ced34461ce5ad7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__37.png b/wt-3.1.7a/doc/reference/html/inherit__graph__37.png new file mode 100644 index 0000000..56c4b3d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__37.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__38.map b/wt-3.1.7a/doc/reference/html/inherit__graph__38.map new file mode 100644 index 0000000..8225009 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__38.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__38.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__38.md5 new file mode 100644 index 0000000..345d158 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__38.md5 @@ -0,0 +1 @@ +4e6ed16abd6fe58a0ad5a92a2b981487 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__38.png b/wt-3.1.7a/doc/reference/html/inherit__graph__38.png new file mode 100644 index 0000000..16ef127 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__38.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__39.map b/wt-3.1.7a/doc/reference/html/inherit__graph__39.map new file mode 100644 index 0000000..e9d5839 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__39.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__39.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__39.md5 new file mode 100644 index 0000000..48bdef3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__39.md5 @@ -0,0 +1 @@ +4833a58d45f6d2ea2aa136c0db6014e7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__39.png b/wt-3.1.7a/doc/reference/html/inherit__graph__39.png new file mode 100644 index 0000000..af434eb Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__39.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__4.map b/wt-3.1.7a/doc/reference/html/inherit__graph__4.map new file mode 100644 index 0000000..32d2232 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__4.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__4.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__4.md5 new file mode 100644 index 0000000..0bfbb5b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__4.md5 @@ -0,0 +1 @@ +e7f9a0fe02f7ca2bc26f8f4d00244e29 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__4.png b/wt-3.1.7a/doc/reference/html/inherit__graph__4.png new file mode 100644 index 0000000..2b5a2a5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__4.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__40.map b/wt-3.1.7a/doc/reference/html/inherit__graph__40.map new file mode 100644 index 0000000..911b795 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__40.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__40.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__40.md5 new file mode 100644 index 0000000..a6f57b5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__40.md5 @@ -0,0 +1 @@ +763f799d0ce7b3b57277b850d4181a3f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__40.png b/wt-3.1.7a/doc/reference/html/inherit__graph__40.png new file mode 100644 index 0000000..799c737 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__40.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__41.map b/wt-3.1.7a/doc/reference/html/inherit__graph__41.map new file mode 100644 index 0000000..e6d0e38 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__41.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__41.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__41.md5 new file mode 100644 index 0000000..b0b06d8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__41.md5 @@ -0,0 +1 @@ +fd08e020a5515cb27be2696f5ddead27 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__41.png b/wt-3.1.7a/doc/reference/html/inherit__graph__41.png new file mode 100644 index 0000000..510a7c9 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__41.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__42.map b/wt-3.1.7a/doc/reference/html/inherit__graph__42.map new file mode 100644 index 0000000..a710848 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__42.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__42.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__42.md5 new file mode 100644 index 0000000..a962999 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__42.md5 @@ -0,0 +1 @@ +112900881ed999f91994ce9847b17a6b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__42.png b/wt-3.1.7a/doc/reference/html/inherit__graph__42.png new file mode 100644 index 0000000..b18887c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__42.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__43.map b/wt-3.1.7a/doc/reference/html/inherit__graph__43.map new file mode 100644 index 0000000..3b19002 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__43.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__43.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__43.md5 new file mode 100644 index 0000000..5727d4a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__43.md5 @@ -0,0 +1 @@ +102705bf251a4969153b5b5dfce2da54 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__43.png b/wt-3.1.7a/doc/reference/html/inherit__graph__43.png new file mode 100644 index 0000000..145cb15 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__43.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__44.map b/wt-3.1.7a/doc/reference/html/inherit__graph__44.map new file mode 100644 index 0000000..6c5ac30 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__44.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__44.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__44.md5 new file mode 100644 index 0000000..9cb18a7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__44.md5 @@ -0,0 +1 @@ +65da29da7d3ead74b7d8fe654d2e3d69 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__44.png b/wt-3.1.7a/doc/reference/html/inherit__graph__44.png new file mode 100644 index 0000000..2a08e5a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__44.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__45.map b/wt-3.1.7a/doc/reference/html/inherit__graph__45.map new file mode 100644 index 0000000..e1346a9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__45.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__45.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__45.md5 new file mode 100644 index 0000000..36907f6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__45.md5 @@ -0,0 +1 @@ +4ad943128c6aa8cb3ba7ee6d4213884c \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__45.png b/wt-3.1.7a/doc/reference/html/inherit__graph__45.png new file mode 100644 index 0000000..cc61043 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__45.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__46.map b/wt-3.1.7a/doc/reference/html/inherit__graph__46.map new file mode 100644 index 0000000..36042b6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__46.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__46.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__46.md5 new file mode 100644 index 0000000..cfbf9cc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__46.md5 @@ -0,0 +1 @@ +db964bcec7d8a56f2bedad4b1632cdd7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__46.png b/wt-3.1.7a/doc/reference/html/inherit__graph__46.png new file mode 100644 index 0000000..4999675 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__46.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__47.map b/wt-3.1.7a/doc/reference/html/inherit__graph__47.map new file mode 100644 index 0000000..b0c50fd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__47.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__47.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__47.md5 new file mode 100644 index 0000000..26e0bde --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__47.md5 @@ -0,0 +1 @@ +bb913b2d3c431eab27237bba5df7bb48 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__47.png b/wt-3.1.7a/doc/reference/html/inherit__graph__47.png new file mode 100644 index 0000000..63e4e59 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__47.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__48.map b/wt-3.1.7a/doc/reference/html/inherit__graph__48.map new file mode 100644 index 0000000..4f5593b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__48.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__48.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__48.md5 new file mode 100644 index 0000000..7ae4703 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__48.md5 @@ -0,0 +1 @@ +c645bf6a80a479c8679b22bd6971f609 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__48.png b/wt-3.1.7a/doc/reference/html/inherit__graph__48.png new file mode 100644 index 0000000..92c9eb2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__48.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__49.map b/wt-3.1.7a/doc/reference/html/inherit__graph__49.map new file mode 100644 index 0000000..a492ffa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__49.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__49.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__49.md5 new file mode 100644 index 0000000..4f52b26 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__49.md5 @@ -0,0 +1 @@ +03c772f2f361d679fb559d58c4bf5ab7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__49.png b/wt-3.1.7a/doc/reference/html/inherit__graph__49.png new file mode 100644 index 0000000..76f11ad Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__49.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__5.map b/wt-3.1.7a/doc/reference/html/inherit__graph__5.map new file mode 100644 index 0000000..0a922aa --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__5.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__5.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__5.md5 new file mode 100644 index 0000000..e4168f6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__5.md5 @@ -0,0 +1 @@ +ec630df41e8910ba849b8326b43c56fd \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__5.png b/wt-3.1.7a/doc/reference/html/inherit__graph__5.png new file mode 100644 index 0000000..2f3cd40 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__5.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__50.map b/wt-3.1.7a/doc/reference/html/inherit__graph__50.map new file mode 100644 index 0000000..7cfafa6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__50.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__50.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__50.md5 new file mode 100644 index 0000000..3c6025b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__50.md5 @@ -0,0 +1 @@ +afb0881545eba805354e7bcc88d33b09 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__50.png b/wt-3.1.7a/doc/reference/html/inherit__graph__50.png new file mode 100644 index 0000000..b815723 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__50.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__51.map b/wt-3.1.7a/doc/reference/html/inherit__graph__51.map new file mode 100644 index 0000000..d7ff83a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__51.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__51.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__51.md5 new file mode 100644 index 0000000..8614e35 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__51.md5 @@ -0,0 +1 @@ +ec85972399d245f3c844702d5ba04d6d \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__51.png b/wt-3.1.7a/doc/reference/html/inherit__graph__51.png new file mode 100644 index 0000000..f366622 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__51.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__52.map b/wt-3.1.7a/doc/reference/html/inherit__graph__52.map new file mode 100644 index 0000000..9304a51 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__52.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__52.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__52.md5 new file mode 100644 index 0000000..d883e6b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__52.md5 @@ -0,0 +1 @@ +002c99fb8a9c8ca9d3a475f9cfba6cdf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__52.png b/wt-3.1.7a/doc/reference/html/inherit__graph__52.png new file mode 100644 index 0000000..6bdf5e7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__52.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__53.map b/wt-3.1.7a/doc/reference/html/inherit__graph__53.map new file mode 100644 index 0000000..e008b29 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__53.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__53.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__53.md5 new file mode 100644 index 0000000..2520463 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__53.md5 @@ -0,0 +1 @@ +20660a7adc336f957988ac7b12abf4a6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__53.png b/wt-3.1.7a/doc/reference/html/inherit__graph__53.png new file mode 100644 index 0000000..57fe1ea Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__53.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__54.map b/wt-3.1.7a/doc/reference/html/inherit__graph__54.map new file mode 100644 index 0000000..8bafe00 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__54.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__54.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__54.md5 new file mode 100644 index 0000000..b6efbc7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__54.md5 @@ -0,0 +1 @@ +0b6b5d78636788dc0bfc0924b88cb8f3 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__54.png b/wt-3.1.7a/doc/reference/html/inherit__graph__54.png new file mode 100644 index 0000000..5349bca Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__54.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__55.map b/wt-3.1.7a/doc/reference/html/inherit__graph__55.map new file mode 100644 index 0000000..539f379 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__55.map @@ -0,0 +1,4 @@ + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__55.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__55.md5 new file mode 100644 index 0000000..3ec91d1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__55.md5 @@ -0,0 +1 @@ +4ca69497ade176679ca33a43b1506472 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__55.png b/wt-3.1.7a/doc/reference/html/inherit__graph__55.png new file mode 100644 index 0000000..8f39a38 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__55.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__56.map b/wt-3.1.7a/doc/reference/html/inherit__graph__56.map new file mode 100644 index 0000000..5996609 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__56.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__56.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__56.md5 new file mode 100644 index 0000000..85752bc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__56.md5 @@ -0,0 +1 @@ +6921b252f5479d61f7bfbe6d66645f35 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__56.png b/wt-3.1.7a/doc/reference/html/inherit__graph__56.png new file mode 100644 index 0000000..bc2bf4c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__56.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__57.map b/wt-3.1.7a/doc/reference/html/inherit__graph__57.map new file mode 100644 index 0000000..af04e7b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__57.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__57.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__57.md5 new file mode 100644 index 0000000..a306f07 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__57.md5 @@ -0,0 +1 @@ +d59a951ba205e45179b71bb19a3d85c9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__57.png b/wt-3.1.7a/doc/reference/html/inherit__graph__57.png new file mode 100644 index 0000000..ec23f43 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__57.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__58.map b/wt-3.1.7a/doc/reference/html/inherit__graph__58.map new file mode 100644 index 0000000..0acbb2d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__58.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__58.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__58.md5 new file mode 100644 index 0000000..1fb281a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__58.md5 @@ -0,0 +1 @@ +9e17ba48e87a62ad3c44915f936c0334 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__58.png b/wt-3.1.7a/doc/reference/html/inherit__graph__58.png new file mode 100644 index 0000000..17d0547 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__58.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__59.map b/wt-3.1.7a/doc/reference/html/inherit__graph__59.map new file mode 100644 index 0000000..193035f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__59.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__59.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__59.md5 new file mode 100644 index 0000000..631bc37 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__59.md5 @@ -0,0 +1 @@ +65f630b73b3a313e0713ee5a0ea44153 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__59.png b/wt-3.1.7a/doc/reference/html/inherit__graph__59.png new file mode 100644 index 0000000..73ff085 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__59.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__6.map b/wt-3.1.7a/doc/reference/html/inherit__graph__6.map new file mode 100644 index 0000000..4512c6d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__6.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__6.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__6.md5 new file mode 100644 index 0000000..4c1eff5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__6.md5 @@ -0,0 +1 @@ +9e1b399f5b06584c88d8191b8ecf5504 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__6.png b/wt-3.1.7a/doc/reference/html/inherit__graph__6.png new file mode 100644 index 0000000..bf97f7f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__6.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__60.map b/wt-3.1.7a/doc/reference/html/inherit__graph__60.map new file mode 100644 index 0000000..4c767d5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__60.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__60.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__60.md5 new file mode 100644 index 0000000..1ec08f9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__60.md5 @@ -0,0 +1 @@ +68faea90bbfc12103617b50d82c11aec \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__60.png b/wt-3.1.7a/doc/reference/html/inherit__graph__60.png new file mode 100644 index 0000000..44e819f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__60.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__61.map b/wt-3.1.7a/doc/reference/html/inherit__graph__61.map new file mode 100644 index 0000000..ee267d6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__61.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__61.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__61.md5 new file mode 100644 index 0000000..d351f1c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__61.md5 @@ -0,0 +1 @@ +37cbb46d5b45e10d305c1630fb20e81b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__61.png b/wt-3.1.7a/doc/reference/html/inherit__graph__61.png new file mode 100644 index 0000000..346b288 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__61.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__62.map b/wt-3.1.7a/doc/reference/html/inherit__graph__62.map new file mode 100644 index 0000000..a68b4a9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__62.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__62.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__62.md5 new file mode 100644 index 0000000..0694a94 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__62.md5 @@ -0,0 +1 @@ +4b043d6001b6dadcc00663f0466b4ce6 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__62.png b/wt-3.1.7a/doc/reference/html/inherit__graph__62.png new file mode 100644 index 0000000..1cb68fd Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__62.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__63.map b/wt-3.1.7a/doc/reference/html/inherit__graph__63.map new file mode 100644 index 0000000..cc62d58 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__63.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__63.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__63.md5 new file mode 100644 index 0000000..3a5ca38 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__63.md5 @@ -0,0 +1 @@ +49d4232413c1025ab1468f269d5c4bd5 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__63.png b/wt-3.1.7a/doc/reference/html/inherit__graph__63.png new file mode 100644 index 0000000..675220b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__63.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__64.map b/wt-3.1.7a/doc/reference/html/inherit__graph__64.map new file mode 100644 index 0000000..1d4f015 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__64.map @@ -0,0 +1,5 @@ + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__64.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__64.md5 new file mode 100644 index 0000000..dd88a1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__64.md5 @@ -0,0 +1 @@ +8a8282be9df613a8b4f2dec18c7d068b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__64.png b/wt-3.1.7a/doc/reference/html/inherit__graph__64.png new file mode 100644 index 0000000..89acfc1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__64.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__65.map b/wt-3.1.7a/doc/reference/html/inherit__graph__65.map new file mode 100644 index 0000000..61f783c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__65.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__65.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__65.md5 new file mode 100644 index 0000000..931d26f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__65.md5 @@ -0,0 +1 @@ +d39c192c6f03ac191a381a8f71dded37 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__65.png b/wt-3.1.7a/doc/reference/html/inherit__graph__65.png new file mode 100644 index 0000000..c70c957 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__65.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__66.map b/wt-3.1.7a/doc/reference/html/inherit__graph__66.map new file mode 100644 index 0000000..2ccb3c2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__66.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__66.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__66.md5 new file mode 100644 index 0000000..81d55b2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__66.md5 @@ -0,0 +1 @@ +c86c7346ca6cb52fc82831ec2e0af3ce \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__66.png b/wt-3.1.7a/doc/reference/html/inherit__graph__66.png new file mode 100644 index 0000000..f71ea1d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__66.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__67.map b/wt-3.1.7a/doc/reference/html/inherit__graph__67.map new file mode 100644 index 0000000..b5b9814 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__67.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__67.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__67.md5 new file mode 100644 index 0000000..43cb0c0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__67.md5 @@ -0,0 +1 @@ +3604cc511bb25d5922fb3bac234ad9e2 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__67.png b/wt-3.1.7a/doc/reference/html/inherit__graph__67.png new file mode 100644 index 0000000..c22c830 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__67.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__68.map b/wt-3.1.7a/doc/reference/html/inherit__graph__68.map new file mode 100644 index 0000000..d5267dd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__68.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__68.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__68.md5 new file mode 100644 index 0000000..fee2f82 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__68.md5 @@ -0,0 +1 @@ +e43435afb149bb8e65a16e2171251075 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__68.png b/wt-3.1.7a/doc/reference/html/inherit__graph__68.png new file mode 100644 index 0000000..b39e3ea Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__68.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__69.map b/wt-3.1.7a/doc/reference/html/inherit__graph__69.map new file mode 100644 index 0000000..dd74e74 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__69.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__69.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__69.md5 new file mode 100644 index 0000000..68956ff --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__69.md5 @@ -0,0 +1 @@ +0521f2cc1c3d3f077af1305171a3b7f1 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__69.png b/wt-3.1.7a/doc/reference/html/inherit__graph__69.png new file mode 100644 index 0000000..bf1b868 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__69.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__7.map b/wt-3.1.7a/doc/reference/html/inherit__graph__7.map new file mode 100644 index 0000000..57b261b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__7.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__7.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__7.md5 new file mode 100644 index 0000000..3313322 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__7.md5 @@ -0,0 +1 @@ +be4b127f66bef69104247e034c5bddd0 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__7.png b/wt-3.1.7a/doc/reference/html/inherit__graph__7.png new file mode 100644 index 0000000..fb36d5b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__7.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__70.map b/wt-3.1.7a/doc/reference/html/inherit__graph__70.map new file mode 100644 index 0000000..5c5fe5b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__70.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__70.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__70.md5 new file mode 100644 index 0000000..982841a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__70.md5 @@ -0,0 +1 @@ +789f41d88a53e1c41d8f33f17928d47b \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__70.png b/wt-3.1.7a/doc/reference/html/inherit__graph__70.png new file mode 100644 index 0000000..fdf1fa7 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__70.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__71.map b/wt-3.1.7a/doc/reference/html/inherit__graph__71.map new file mode 100644 index 0000000..132448a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__71.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__71.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__71.md5 new file mode 100644 index 0000000..da6c4ad --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__71.md5 @@ -0,0 +1 @@ +be73157c5853d07d853df412fef8687a \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__71.png b/wt-3.1.7a/doc/reference/html/inherit__graph__71.png new file mode 100644 index 0000000..0d0cd1e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__71.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__72.map b/wt-3.1.7a/doc/reference/html/inherit__graph__72.map new file mode 100644 index 0000000..c3072a0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__72.map @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__72.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__72.md5 new file mode 100644 index 0000000..d1a1c65 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__72.md5 @@ -0,0 +1 @@ +438b70fa3322894efb7fbb6c0f0e6d86 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__72.png b/wt-3.1.7a/doc/reference/html/inherit__graph__72.png new file mode 100644 index 0000000..efb5cf5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__72.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__73.map b/wt-3.1.7a/doc/reference/html/inherit__graph__73.map new file mode 100644 index 0000000..6a6e29c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__73.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__73.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__73.md5 new file mode 100644 index 0000000..22d3db4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__73.md5 @@ -0,0 +1 @@ +dcb3d00defd3d6ab1d83a49c0d495b68 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__73.png b/wt-3.1.7a/doc/reference/html/inherit__graph__73.png new file mode 100644 index 0000000..adaf4ba Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__73.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__74.map b/wt-3.1.7a/doc/reference/html/inherit__graph__74.map new file mode 100644 index 0000000..1b5e30a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__74.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__74.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__74.md5 new file mode 100644 index 0000000..ba2ade7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__74.md5 @@ -0,0 +1 @@ +241d9fc4d97b337b90ffe4486de94e56 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__74.png b/wt-3.1.7a/doc/reference/html/inherit__graph__74.png new file mode 100644 index 0000000..26277e4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__74.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__75.map b/wt-3.1.7a/doc/reference/html/inherit__graph__75.map new file mode 100644 index 0000000..e292023 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__75.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__75.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__75.md5 new file mode 100644 index 0000000..8abbf4a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__75.md5 @@ -0,0 +1 @@ +b7444292badd02f7151de7bdc9ddc142 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__75.png b/wt-3.1.7a/doc/reference/html/inherit__graph__75.png new file mode 100644 index 0000000..7aef210 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__75.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__76.map b/wt-3.1.7a/doc/reference/html/inherit__graph__76.map new file mode 100644 index 0000000..013090c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__76.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__76.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__76.md5 new file mode 100644 index 0000000..ad7c0b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__76.md5 @@ -0,0 +1 @@ +a3c9867f18740b577181f3b6c5cedd90 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__76.png b/wt-3.1.7a/doc/reference/html/inherit__graph__76.png new file mode 100644 index 0000000..2b1db5f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__76.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__77.map b/wt-3.1.7a/doc/reference/html/inherit__graph__77.map new file mode 100644 index 0000000..c1ac2f4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__77.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__77.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__77.md5 new file mode 100644 index 0000000..cdef08e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__77.md5 @@ -0,0 +1 @@ +5b2dd992af8ce01a06ba5511563d6a8f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__77.png b/wt-3.1.7a/doc/reference/html/inherit__graph__77.png new file mode 100644 index 0000000..61335fa Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__77.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__78.map b/wt-3.1.7a/doc/reference/html/inherit__graph__78.map new file mode 100644 index 0000000..6ec232e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__78.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__78.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__78.md5 new file mode 100644 index 0000000..4d561eb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__78.md5 @@ -0,0 +1 @@ +f6d9ba10910dbd075d86de8963b00436 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__78.png b/wt-3.1.7a/doc/reference/html/inherit__graph__78.png new file mode 100644 index 0000000..64f78a5 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__78.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__79.map b/wt-3.1.7a/doc/reference/html/inherit__graph__79.map new file mode 100644 index 0000000..e17bfd7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__79.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__79.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__79.md5 new file mode 100644 index 0000000..cc2f05d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__79.md5 @@ -0,0 +1 @@ +137919c6abb8d2aa7b93bdd85dd2a8a9 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__79.png b/wt-3.1.7a/doc/reference/html/inherit__graph__79.png new file mode 100644 index 0000000..81f41ef Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__79.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__8.map b/wt-3.1.7a/doc/reference/html/inherit__graph__8.map new file mode 100644 index 0000000..8f962dd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__8.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__8.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__8.md5 new file mode 100644 index 0000000..fdaa19b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__8.md5 @@ -0,0 +1 @@ +229dd2614d1e8745d64d058cbb0cf35e \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__8.png b/wt-3.1.7a/doc/reference/html/inherit__graph__8.png new file mode 100644 index 0000000..736cbd1 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__8.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__80.map b/wt-3.1.7a/doc/reference/html/inherit__graph__80.map new file mode 100644 index 0000000..eb880d2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__80.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__80.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__80.md5 new file mode 100644 index 0000000..1b12786 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__80.md5 @@ -0,0 +1 @@ +3392bc0b05065ed1798ea47cd89d10a7 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__80.png b/wt-3.1.7a/doc/reference/html/inherit__graph__80.png new file mode 100644 index 0000000..3863fdd Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__80.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__81.map b/wt-3.1.7a/doc/reference/html/inherit__graph__81.map new file mode 100644 index 0000000..1516cad --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__81.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__81.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__81.md5 new file mode 100644 index 0000000..5989a50 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__81.md5 @@ -0,0 +1 @@ +8e40ba136f21f01430ee100982ea88ee \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__81.png b/wt-3.1.7a/doc/reference/html/inherit__graph__81.png new file mode 100644 index 0000000..88b3b9b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__81.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__82.map b/wt-3.1.7a/doc/reference/html/inherit__graph__82.map new file mode 100644 index 0000000..9468d65 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__82.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__82.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__82.md5 new file mode 100644 index 0000000..60d29a3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__82.md5 @@ -0,0 +1 @@ +ab65acee879b32983f8c55fab2fa34dc \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__82.png b/wt-3.1.7a/doc/reference/html/inherit__graph__82.png new file mode 100644 index 0000000..0a87a71 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__82.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__83.map b/wt-3.1.7a/doc/reference/html/inherit__graph__83.map new file mode 100644 index 0000000..b5a533d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__83.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__83.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__83.md5 new file mode 100644 index 0000000..89aa10f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__83.md5 @@ -0,0 +1 @@ +991245c4987e4d4dcdc4c9b66c07eeeb \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__83.png b/wt-3.1.7a/doc/reference/html/inherit__graph__83.png new file mode 100644 index 0000000..58c44ff Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__83.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__84.map b/wt-3.1.7a/doc/reference/html/inherit__graph__84.map new file mode 100644 index 0000000..18d71a0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__84.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__84.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__84.md5 new file mode 100644 index 0000000..e366b11 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__84.md5 @@ -0,0 +1 @@ +b518de6ca704cfc6e8c8a4bb4e09142f \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__84.png b/wt-3.1.7a/doc/reference/html/inherit__graph__84.png new file mode 100644 index 0000000..2f8b413 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__84.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__85.map b/wt-3.1.7a/doc/reference/html/inherit__graph__85.map new file mode 100644 index 0000000..66785a4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__85.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__85.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__85.md5 new file mode 100644 index 0000000..f8f1ac6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__85.md5 @@ -0,0 +1 @@ +338b15998c7b561802152ee25c43c557 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__85.png b/wt-3.1.7a/doc/reference/html/inherit__graph__85.png new file mode 100644 index 0000000..4ae6c58 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__85.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__86.map b/wt-3.1.7a/doc/reference/html/inherit__graph__86.map new file mode 100644 index 0000000..4d869ad --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__86.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__86.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__86.md5 new file mode 100644 index 0000000..61390a2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__86.md5 @@ -0,0 +1 @@ +e332c72f0cd9e6319de943afe329b611 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__86.png b/wt-3.1.7a/doc/reference/html/inherit__graph__86.png new file mode 100644 index 0000000..b9b16e0 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__86.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__87.map b/wt-3.1.7a/doc/reference/html/inherit__graph__87.map new file mode 100644 index 0000000..a3a4e9e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__87.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__87.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__87.md5 new file mode 100644 index 0000000..dc2dd9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__87.md5 @@ -0,0 +1 @@ +9be8d08a71bcfce3254681e07f0a42c4 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__87.png b/wt-3.1.7a/doc/reference/html/inherit__graph__87.png new file mode 100644 index 0000000..df15fd2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__87.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__88.map b/wt-3.1.7a/doc/reference/html/inherit__graph__88.map new file mode 100644 index 0000000..05e41bb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__88.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__88.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__88.md5 new file mode 100644 index 0000000..35c27cd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__88.md5 @@ -0,0 +1 @@ +3ac0a83eb0fe1747a570af1a6bf47094 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__88.png b/wt-3.1.7a/doc/reference/html/inherit__graph__88.png new file mode 100644 index 0000000..952b747 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__88.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__89.map b/wt-3.1.7a/doc/reference/html/inherit__graph__89.map new file mode 100644 index 0000000..8cdf713 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__89.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__89.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__89.md5 new file mode 100644 index 0000000..0637c42 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__89.md5 @@ -0,0 +1 @@ +90698ffe6a8712198ceee0cff2d30d06 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__89.png b/wt-3.1.7a/doc/reference/html/inherit__graph__89.png new file mode 100644 index 0000000..839be65 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__89.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__9.map b/wt-3.1.7a/doc/reference/html/inherit__graph__9.map new file mode 100644 index 0000000..6a3fe79 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__9.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__9.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__9.md5 new file mode 100644 index 0000000..633c798 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__9.md5 @@ -0,0 +1 @@ +7166176f5b5ff4cb3a4011df7dfa22db \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__9.png b/wt-3.1.7a/doc/reference/html/inherit__graph__9.png new file mode 100644 index 0000000..169bbdc Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__9.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__90.map b/wt-3.1.7a/doc/reference/html/inherit__graph__90.map new file mode 100644 index 0000000..ac0d3bf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__90.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__90.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__90.md5 new file mode 100644 index 0000000..67a9053 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__90.md5 @@ -0,0 +1 @@ +e58e204dc9cc6ae1102d2e8af4262810 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__90.png b/wt-3.1.7a/doc/reference/html/inherit__graph__90.png new file mode 100644 index 0000000..dd58b0e Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__90.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__91.map b/wt-3.1.7a/doc/reference/html/inherit__graph__91.map new file mode 100644 index 0000000..9727941 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__91.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__91.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__91.md5 new file mode 100644 index 0000000..4b72574 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__91.md5 @@ -0,0 +1 @@ +07382d78524f5fe06ca358c1f0827400 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__91.png b/wt-3.1.7a/doc/reference/html/inherit__graph__91.png new file mode 100644 index 0000000..3d4e602 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__91.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__92.map b/wt-3.1.7a/doc/reference/html/inherit__graph__92.map new file mode 100644 index 0000000..76dafc1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__92.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__92.md5 b/wt-3.1.7a/doc/reference/html/inherit__graph__92.md5 new file mode 100644 index 0000000..3f74a45 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherit__graph__92.md5 @@ -0,0 +1 @@ +75650a1eaa44b90b31037f9c120fbecf \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/inherit__graph__92.png b/wt-3.1.7a/doc/reference/html/inherit__graph__92.png new file mode 100644 index 0000000..405e689 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/inherit__graph__92.png differ diff --git a/wt-3.1.7a/doc/reference/html/inherits.html b/wt-3.1.7a/doc/reference/html/inherits.html new file mode 100644 index 0000000..767e92f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/inherits.html @@ -0,0 +1,453 @@ + + + + +Wt: Graphical Class Hierarchy + + + + + + + + + +
+
+

Graphical Class Hierarchy

+
+
+ +

Go to the textual class hierarchy

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/installdox b/wt-3.1.7a/doc/reference/html/installdox new file mode 100755 index 0000000..2697a81 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/installdox @@ -0,0 +1,117 @@ +#!/usr/bin/perl + +%subst = ( ); +$quiet = 0; + +if (open(F,"search.cfg")) +{ + $_= ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; + $_= ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; +} + +while ( @ARGV ) { + $_ = shift @ARGV; + if ( s/^-// ) { + if ( /^l(.*)/ ) { + $v = ($1 eq "") ? shift @ARGV : $1; + ($v =~ /\/$/) || ($v .= "/"); + $_ = $v; + if ( /(.+)\@(.+)/ ) { + if ( exists $subst{$1} ) { + $subst{$1} = $2; + } else { + print STDERR "Unknown tag file $1 given with option -l\n"; + &usage(); + } + } else { + print STDERR "Argument $_ is invalid for option -l\n"; + &usage(); + } + } + elsif ( /^q/ ) { + $quiet = 1; + } + elsif ( /^\?|^h/ ) { + &usage(); + } + else { + print STDERR "Illegal option -$_\n"; + &usage(); + } + } + else { + push (@files, $_ ); + } +} + +foreach $sub (keys %subst) +{ + if ( $subst{$sub} eq "" ) + { + print STDERR "No substitute given for tag file `$sub'\n"; + &usage(); + } + elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) + { + print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; + } +} + +if ( ! @files ) { + if (opendir(D,".")) { + foreach $file ( readdir(D) ) { + $match = ".html"; + next if ( $file =~ /^\.\.?$/ ); + ($file =~ /$match/) && (push @files, $file); + ($file =~ "tree.js") && (push @files, $file); + } + closedir(D); + } +} + +if ( ! @files ) { + print STDERR "Warning: No input files given and none found!\n"; +} + +foreach $f (@files) +{ + if ( ! $quiet ) { + print "Editing: $f...\n"; + } + $oldf = $f; + $f .= ".bak"; + unless (rename $oldf,$f) { + print STDERR "Error: cannot rename file $oldf\n"; + exit 1; + } + if (open(F,"<$f")) { + unless (open(G,">$oldf")) { + print STDERR "Error: opening file $oldf for writing\n"; + exit 1; + } + if ($oldf ne "tree.js") { + while () { + s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; + print G "$_"; + } + } + else { + while () { + s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; + print G "$_"; + } + } + } + else { + print STDERR "Warning file $f does not exist\n"; + } + unlink $f; +} + +sub usage { + print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; + print STDERR "Options:\n"; + print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; + print STDERR " -q Quiet mode\n\n"; + exit 1; +} diff --git a/wt-3.1.7a/doc/reference/html/modules.html b/wt-3.1.7a/doc/reference/html/modules.html new file mode 100644 index 0000000..a041165 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/modules.html @@ -0,0 +1,79 @@ + + + + +Wt: Module Index + + + + + + + + + +
+
+

Modules

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaceWt.html b/wt-3.1.7a/doc/reference/html/namespaceWt.html new file mode 100644 index 0000000..e430687 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaceWt.html @@ -0,0 +1,1542 @@ + + + + +Wt: Wt Namespace Reference + + + + + + + + + +
+ +
+

Wt Namespace Reference

+
+
+ +

The namespace for Wt. +More...

+ + + + +

+

+ + +

+

+ + +

+

+ + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Namespaces

namespace  Chart
 

Namespace for the Charts.

+
namespace  Dbo
 

Namespace for the Database Objects (Dbo).

+
namespace  Ext
 

Namespace for Ext widgets.

+
namespace  Http
 

Namespace for objects directly related to HTTP.

+

+Classes

class  SyncLock
 An dead-lock avoidance adaptor for a Boost mutex lock. More...
class  WAbstractArea
 Abstract base class for interactive areas in a widget. More...
class  WAbstractItemDelegate
 Abstract delegate class for rendering an item in a MVC view. More...
class  WAbstractItemModel
 An abstract model for use with Wt's view classes. More...
class  WAbstractItemView
 An abstract base class for item Views. More...
class  WAbstractListModel
 An abstract list model for use with Wt's view classes. More...
class  WAbstractProxyModel
 An abstract proxy model for Wt's item models. More...
class  WAbstractTableModel
 An abstract table model for use with Wt's view classes. More...
class  WAbstractToggleButton
 An abstract base class for radio buttons and check boxes. More...
class  WAccordionLayout
 A layout manager which shows one item at a time. More...
class  WAggregateProxyModel
 A proxy model for Wt's item models that provides column aggregation. More...
class  WAnchor
 A widget that represents an HTML anchor (to link to other documents). More...
class  WApplication
 Represents an application instance for a single session. More...
class  WBatchEditProxyModel
 A proxy model for Wt's item models that provides batch editing. More...
struct  boost_any_traits
 A traits class for a type stored in a boost::any. More...
class  WBorder
 A style class for the border of a widget. More...
class  WBorderLayout
 A layout manager which divides the container region in five regions. More...
class  WBoxLayout
 A layout manager which arranges widgets horizontally or vertically. More...
class  WBreak
 A widget that provides a line break between inline widgets. More...
class  WBrush
 Class that defines the style for filling areas. More...
class  WButtonGroup
 A class for grouping radio buttons logically together. More...
class  WCalendar
 A calendar. More...
class  WCanvasPaintDevice
 A paint device for rendering using the HTML 5 <canvas> element. More...
class  WCheckBox
 A user control that represents a check box. More...
class  WCircleArea
 A interactive area in a widget, specified by a circle. More...
class  WColor
 A class that specifies a color. More...
class  WCombinedLocalizedStrings
 A localized string resolver that bundles multiple string resolvers. More...
class  WComboBox
 A widget that provides a drop-down combo-box control. More...
class  WCompositeWidget
 A widget that hides the implementation of composite widgets. More...
class  WContainerWidget
 A widget that holds and manages child widgets. More...
class  WCssDecorationStyle
 A style class for a single widget or style sheet rule. More...
class  WCssRule
 Abstract rule in a CSS style sheet. More...
class  WCssTemplateRule
 A CSS rule based on a template widget. More...
class  WCssTextRule
 A CSS rule specified directly using CSS declarations. More...
class  WCssStyleSheet
 A CSS style sheet. More...
class  InvalidDateException
 Exception thrown when calculating with an invalid date. More...
class  WDate
 A gregorian calendar date. More...
class  WDatePicker
 A date picker. More...
class  InvalidDateTimeException
 Exception thrown when calculating with an invalid date. More...
class  WDateTime
 A calendar date and clock time. More...
class  WDateValidator
 A validator for date input. More...
class  WDefaultLayout
 A default layout manager. More...
class  WDefaultLoadingIndicator
 A default loading indicator. More...
class  WDialog
 A WDialog shows a dialog. More...
class  WDoubleValidator
 A validator for validating floating point user input. More...
class  WEnvironment
 A class that captures information on the application environment. More...
struct  Coordinates
 A coordinate. More...
class  Touch
 A single finger touch of a touch event. More...
class  WMouseEvent
 A class providing details for a mouse event. More...
class  WKeyEvent
 A class providing details for a keyboard event. More...
class  WDropEvent
 A class providing details for a drop event. More...
class  WScrollEvent
 A class providing details for a scroll event. More...
class  WTouchEvent
 A class providing details for a touch event. More...
class  WGestureEvent
 A class providing details for a gesture event. More...
class  WFileResource
 A resource which streams data from a local file. More...
class  WFileUpload
 A widget that allows a file to be uploaded. More...
class  WFitLayout
 A layout manager which spans a single widget to all available space. More...
class  WFlashObject
 A widget that renders a Flash object (also known as Flash movie). More...
class  WFont
 A style class describing a font. More...
class  WFormWidget
 An abstract widget that corresponds to an HTML form element. More...
class  WGenericMatrix
 A generalized matrix class. More...
class  WGLWidget
 WebGL support class. More...
class  WGoogleMap
 A widget that displays a google map. More...
class  WGridLayout
 A layout manager which arranges widgets in a grid. More...
class  WGroupBox
 A widget which group widgets into a frame with a title. More...
class  WHBoxLayout
 A layout manager which arranges widgets horizontally. More...
class  WHTML5Audio
 A widget that plays audio using the HTML5 audio element. More...
class  WHTML5Media
 Abstract baseclass for HTML5 media elements. More...
class  WHTML5Video
 A widget that renders video using the HTML5 video element. More...
class  WIconPair
 A widget that shows one of two icons depending on its state. More...
class  WImage
 A widget that displays an image. More...
class  WInPlaceEdit
 A widget that provides in-place-editable text. More...
class  WInteractWidget
 An abstract widget that can receive user-interface interaction. More...
class  WIntValidator
 A validator that validates integer user input. More...
class  WItemDelegate
 Standard delegate class for rendering a view item. More...
class  WItemSelectionModel
 A class that represents a selection for a WAbstractItemView. More...
class  JSignal
 A signal to relay JavaScript to C++ calls. More...
class  JSlot
 A slot that is only implemented in client side JavaScript code. More...
class  WLabel
 A label for a form field. More...
class  WLayout
 An abstract base class for layout managers. More...
class  WLayoutItem
 An abstract base class for items that can participate in a layout. More...
class  WLayoutItemImpl
 An abstract base class for implementing layout managers. More...
class  WLength
 A class that specifies a CSS length. More...
class  WLengthValidator
 A validator that checks the string length of user input. More...
class  WLineEdit
 A widget that provides a single line edit. More...
class  WLineF
 Utility class that defines a single line. More...
class  WLoadingIndicator
 An abstract interface for a loading indicator. More...
class  WLocalizedStrings
 An abstract class that provides support for localized strings. More...
class  WLogger
 A simple logging class. More...
class  WLogEntry
 A stream-like object for creating an entry in a log file. More...
class  WMatrix4x4
 A 3D affine transformation matrix. More...
class  WMemoryResource
 A resource which streams data from memory. More...
class  WMenu
 A widget that shows a menu of options. More...
class  WMenuItem
 A single item in a menu. More...
class  WMessageBox
 A standard dialog for confirmation or to get simple user input. More...
class  WMessageResourceBundle
 Support for localized strings using XML files. More...
class  WModelIndex
 An index to an item in a item data model. More...
class  WObject
 A base class for objects that participate in the signal/slot system. More...
class  WOverlayLoadingIndicator
 A more obvious loading indicator that grays the window. More...
class  WPaintDevice
 The abstract base class for a paint device. More...
class  WPaintedWidget
 A widget that is painted using vector graphics. More...
class  WPainter
 Vector graphics painting class. More...
class  WPainterPath
 A path defining a shape. More...
class  WPanel
 A WPanel provides a container with a title bar. More...
class  WPdfImage
 A paint device for rendering to a PDF. More...
class  WPen
 Class that defines the style for pen strokes. More...
class  WPoint
 Utility class that defines a 2D point with integer coordinates. More...
class  WPointF
 Utility class that defines a 2D point. More...
class  WPolygonArea
 An interactive area in a widget, specified by a polygon. More...
class  WPopupMenu
 A menu presented in a popup window. More...
class  WPopupMenuItem
 An item in a popup menu. More...
class  WProgressBar
 A progress bar. More...
class  WPushButton
 A widget that represents a push button. More...
class  WRadioButton
 A user control that represents a radio button. More...
class  WRasterImage
 A paint device for rendering to a raster image. More...
class  WRectArea
 A interactive area in a widget, specified by a rectangle. More...
class  WRectF
 Utility class that defines a rectangle. More...
class  WRegExpValidator
 A validator that checks user input against a regular expression. More...
class  WResource
 An object which can be rendered in the HTTP protocol. More...
class  WScrollArea
 A widget that adds scrolling capabilities to its content. More...
class  WScrollBar
 A scrollbar attached to a scroll area. More...
class  WSelectionBox
 A selection box allows selection from a list of options. More...
class  WServer
 A class encapsulating an application server. More...
class  WShadow
 Class that defines a shadow style. More...
class  SignalBase
 Abstract base class of a signal. More...
class  Signal
 A signal that propagates events to listeners. More...
class  EventSignalBase
 Abstract base class of an event signal. More...
class  EventSignal
 A signal that conveys user-interface events. More...
class  WSignalMapper
 A utility class to connect multiple senders to a single slot. More...
class  WSlider
 A horizontal or vertical slider control. More...
class  WSocketNotifier
 A utility class for asynchronous notification of socket activity. More...
class  WSortFilterProxyModel
 A proxy model for Wt's item models that provides filtering and/or sorting. More...
class  WSound
 Utility class to play a sound. More...
class  WSpinBox
 A spin box. More...
class  WStackedWidget
 A container widget that stacks its widgets on top of each other. More...
class  WStandardItem
 An item in a WStandardItemModel. More...
class  WStandardItemModel
 A standard data model, which stores its data in memory. More...
class  WString
 A unicode string class, with support for localization. More...
class  WStringListModel
 An model that manages a list of strings. More...
class  WSubMenuItem
 A menu item that contains a nested sub menu. More...
class  WSuggestionPopup
 A widget which popups to assist in editing a textarea or lineedit. More...
class  WSvgImage
 A paint device for rendering using Scalable Vector Graphics (SVG). More...
class  WTable
 A container widget which provides layout of children in a table grid. More...
class  WTableCell
 A container widget that represents a cell in a table. More...
class  WTableColumn
 A table column. More...
class  WTableRow
 A table row. More...
class  WTableView
 An MVC View widget for tabular data. More...
class  WTabWidget
 A widget that organizes contents in tab panes. More...
class  WTemplate
 A widget that renders an XHTML template. More...
class  WText
 A widget that renders (XHTML) text. More...
class  WTextArea
 A widget that provides a multi-line edit. More...
class  WTextEdit
 A rich-text XHTML editor. More...
class  InvalidTimeException
 Exception thrown when calculating with an invalid time. More...
class  WTime
 A clock time. More...
class  WTimer
 A utility class which provides timer signals and single-shot timers. More...
class  WTransform
 A 2D affine transformation matrix. More...
class  WTree
 A widget that represents a navigatable tree. More...
class  WTreeNode
 A single node in a tree. More...
class  WTreeTable
 A table with a navigatable tree in the first column. More...
class  WTreeTableNode
 A specialized tree node which allows additional data to be associated with each node. More...
class  WTreeView
 A view class that displays a model as a tree or tree table. More...
class  WValidationStatus
 A widget that keeps track of the validation status of a form widget. More...
class  WValidator
 A validator is used to validate user input according to pre-defined rules. More...
class  WVBoxLayout
 A layout manager which arranges widgets vertically. More...
class  WVectorImage
 An abstract paint device for rendering using native vector graphics. More...
class  WViewWidget
 An abstract base class for an MVC view that is rendered using a widget. More...
class  WStaticModelView
 A widget that implements a view for a non-changing model. More...
class  WVirtualImage
 An abstract widget that shows a viewport to a virtually large image. More...
class  WVmlImage
 A paint device for rendering using the VML pseudo-standard. More...
class  WWebWidget
 A base class for widgets with an HTML counterpart. More...
class  WWidget
 The abstract base class for a user-interface component. More...
class  WWidgetItem
 A layout item that holds a single widget. More...

+Enumerations

enum  ViewItemRenderFlag { RenderSelected = 0x1, +RenderEditing = 0x2, +RenderFocused = 0x4, +RenderInvalid = 0x8 + }
 

Enumeration that specifies an option for rendering a view item.

+ More...
enum  Orientation { Horizontal = 0x1, +Vertical = 0x2 + }
 

Enumeration that indicates a direction.

+ More...
enum  StandardButton {
+  NoButton = 0x00, +Ok = 0x01, +Cancel = 0x02, +Yes = 0x04, +
+  No = 0x08, +Abort = 0x10, +Retry = 0x20, +Ignore = 0x40, +
+  YesAll = 0x80, +NoAll = 0x100 +
+ }
 

Enumeration that indicates a standard button.

+ More...
enum  Icon {
+  NoIcon = 0, +Information = 1, +Warning = 2, +Critical = 3, +
+  Question = 4 +
+ }
 

Enumeration that indiciates a standard icon.

+ More...
enum  SelectionMode { NoSelection = 0, +SingleSelection = 1, +ExtendedSelection = 3 + }
 

Enumeration that indicates how items may be selected.

+ More...
enum  SelectionBehavior { SelectItems = 0, +SelectRows = 1 + }
 

Enumeration that indicates what is being selected.

+ More...
enum  SelectionFlag { Select = 1, +Deselect = 2, +ToggleSelect = 3, +ClearAndSelect = 4 + }
 

Enumeration that indicates how to change a selection.

+ More...
enum  Side {
+  Top = 0x1, +Bottom = 0x2, +Left = 0x4, +Right = 0x8, +
+  CenterX = 0x10, +CenterY = 0x20 +
+ }
 

Enumeration that indicates a relative location.

+ More...
enum  AlignmentFlag {
+  AlignLeft = 0x1, +AlignRight = 0x2, +AlignCenter = 0x4, +AlignJustify = 0x8, +
+  AlignBaseline = 0x10, +AlignSub = 0x20, +AlignSuper = 0x40, +AlignTop = 0x80, +
+  AlignTextTop = 0x100, +AlignMiddle = 0x200, +AlignBottom = 0x400, +AlignTextBottom = 0x800 +
+ }
 

Enumeration that specifies a horizontal or a vertical alignment.

+ More...
enum  PositionScheme { Static, +Relative, +Absolute, +Fixed + }
 

Enumeration that specifies a layout mechanism for a widget.

+ More...
enum  Cursor {
+  ArrowCursor, +AutoCursor, +CrossCursor, +PointingHandCursor, +
+  OpenHandCursor, +WaitCursor, +IBeamCursor, +WhatsThisCursor +
+ }
 

Enumeration for a cursor style.

+ More...
enum  CharEncoding { LocalEncoding, +UTF8 + }
 

Enumeration that indicates a character encoding.

+ More...
enum  PenStyle {
+  NoPen, +SolidLine, +DashLine, +DotLine, +
+  DashDotLine, +DashDotDotLine +
+ }
 

Enumeration that indicates a pen style.

+ More...
enum  PenCapStyle { FlatCap, +SquareCap, +RoundCap + }
 

Enumeration that indicates how line end points are rendered.

+ More...
enum  PenJoinStyle { MiterJoin, +BevelJoin, +RoundJoin + }
 

Enumeration that indicates how line joins are rendered.

+ More...
enum  WBrushStyle { NoBrush = 0, +SolidPattern = 1 + }
 

Enumeration that indicates a fill style.

+ More...
enum  AnchorTarget { TargetSelf, +TargetThisWindow, +TargetNewWindow + }
 

Enumeration that specifies where the target of an anchor should be displayed.

+ More...
enum  TextFormat { XHTMLText, +XHTMLUnsafeText, +PlainText + }
 

Enumeration that indicates the text format.

+ More...
enum  GlobalColor {
+  white, +black, +red, +darkRed, +
+  green, +darkGreen, +blue, +darkBlue, +
+  cyan, +darkCyan, +magenta, +darkMagenta, +
+  yellow, +darkYellow, +gray, +darkGray, +
+  lightGray, +transparent +
+ }
 

Enumeration for predefined colors.

+ More...
enum  KeyboardModifier {
+  NoModifier = 0x0, +ShiftModifier = 0x1, +ControlModifier = 0x2, +AltModifier = 0x4, +
+  MetaModifier = 0x8 +
+ }
 

Enumeration for keyboard modifiers.

+ More...
enum  Key {
+  Key_unknown = 0, +Key_Enter = 13, +Key_Tab = 9, +Key_Backspace = 8, +
+  Key_Shift = 16, +Key_Control = 17, +Key_Alt = 18, +Key_PageUp = 33, +
+  Key_PageDown = 34, +Key_End = 35, +Key_Home = 36, +Key_Left = 37, +
+  Key_Up = 38, +Key_Right = 39, +Key_Down = 40, +Key_Insert = 45, +
+  Key_Delete = 46, +Key_Escape = 27, +Key_F1 = 112, +Key_F2 = 113, +
+  Key_F3 = 114, +Key_F4 = 115, +Key_F5 = 116, +Key_F6 = 117, +
+  Key_F7 = 118, +Key_F8 = 119, +Key_F9 = 120, +Key_F10 = 121, +
+  Key_F11 = 122, +Key_F12 = 123, +Key_Space = ' ', +Key_A = 'A', +
+  Key_B = 'B', +Key_C = 'C', +Key_D = 'D', +Key_E = 'E', +
+  Key_F = 'F', +Key_G = 'G', +Key_H = 'H', +Key_I = 'I', +
+  Key_J = 'J', +Key_K = 'K', +Key_L = 'L', +Key_M = 'M', +
+  Key_N = 'N', +Key_O = 'O', +Key_P = 'P', +Key_Q = 'Q', +
+  Key_R = 'R', +Key_S = 'S', +Key_T = 'T', +Key_U = 'U', +
+  Key_V = 'V', +Key_W = 'W', +Key_X = 'X', +Key_Y = 'Y', +
+  Key_Z = 'Z' +
+ }
 

Enumeration for key codes.

+ More...
enum  CheckState { Unchecked, +PartiallyChecked, +Checked + }
 

Enumeration for the check state of a check box.

+ More...
enum  PaintFlag { PaintUpdate = 0x1 + }
 

Enumeration that indicates how to change a selection.

+ More...
enum  RegExpFlag { MatchCaseInsensitive = 0x1 + }
 

Enumeration that indicates a regular expression option.

+ More...
enum  EntryPointType { Application, +WidgetSet, +StaticResource + }
 

Enumeration that indicates a Wt entrypoint type.

+ More...
enum  MatchFlag {
+  MatchExactly = 0x0, +MatchStringExactly = 0x1, +MatchStartsWith = 0x2, +MatchEndsWith = 0x3, +
+  MatchRegExp = 0x4, +MatchWildCard = 0x5, +MatchCaseSensitive = 0x10, +MatchWrap = 0x20 +
+ }
 

Flags that specify how to match two values.

+ More...
enum  HeaderFlag { ColumnIsCollapsed = 0x1, +ColumnIsExpandedLeft = 0x2, +ColumnIsExpandedRight = 0x4 + }
 

Flags that indicate table header options.

+ More...
enum  MetaHeaderType { MetaName, +MetaHttpHeader + }
 

Enumeration that indicates a meta header type.

+ More...
enum  ItemDataRole {
+  DisplayRole = 0, +DecorationRole = 1, +EditRole = 2, +StyleClassRole = 3, +
+  CheckStateRole = 4, +ToolTipRole = 5, +InternalPathRole = 6, +UrlRole = 7, +
+  LevelRole = 8, +MarkerPenColorRole = 16, +MarkerBrushColorRole = 17, +UserRole = 32 +
+ }
 

Enumeration that indicates a role for a data item.

+ More...
enum  ItemFlag {
+  ItemIsSelectable = 0x1, +ItemIsEditable = 0x2, +ItemIsUserCheckable = 0x4, +ItemIsDragEnabled = 0x8, +
+  ItemIsDropEnabled = 0x10, +ItemIsTristate = 0x20, +ItemIsXHTMLText = 0x40, +ItemIsDirty = 0x80 +
+ }
 

Flags that indicate data item options.

+ More...
enum  SortOrder { AscendingOrder, +DescendingOrder + }
 

Enumeration that indicates a sort order.

+ More...
enum  DropAction { CopyAction = 0x1, +MoveAction = 0x2 + }
 

Enumeration that indicates a drop action.

+ More...

+Functions

WString asString (const boost::any &v, const WString &formatString=WString())
 Interprets a boost::any as a string value.
double asNumber (const boost::any &v)
 Interprets a boost::any as a number value.
template<typename Type >
void registerType ()
 Registers MVC-support for a type passed in a boost::any.
+template<typename T , std::size_t A, std::size_t B, std::size_t C>
WGenericMatrix< T, A, C > operator* (const WGenericMatrix< T, A, B > &l, const WGenericMatrix< T, B, C > &r)
 Multiply two matrices.
+template<typename T , std::size_t Rows, std::size_t Cols>
std::ostream & operator<< (std::ostream &os, const WGenericMatrix< T, Rows, Cols > &m)
 Print the matrix to an ostream.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator* (const T &factor, const WGenericMatrix< T, Rows, Cols > &m)
 Multiply every element in the matrix with the given factor.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator* (const WGenericMatrix< T, Rows, Cols > &m, const T &factor)
 Multiply every element in the matrix with the given factor.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator/ (const WGenericMatrix< T, Rows, Cols > &m, const T &factor)
 Divide every element in the matrix by the given factor.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator+ (const WGenericMatrix< T, Rows, Cols > &l, const WGenericMatrix< T, Rows, Cols > &r)
 Add two matrices together.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator- (const WGenericMatrix< T, Rows, Cols > &l, const WGenericMatrix< T, Rows, Cols > &r)
 Substract two matrices.
+template<typename T , std::size_t Rows, std::size_t Cols>
WGenericMatrix< T, Rows, Cols > operator- (const WGenericMatrix< T, Rows, Cols > &m)
 Negate every element in the matrix.

+Variables

+static const WFlags< SideNone = 0
 No side.
+static const WFlags< SideCenterXY = CenterX | CenterY
 (CenterX | CenterY)
+static const WFlags< SideHorizontals = Left | Right
 (Left | Right)
+static const WFlags< SideVerticals = Top | Bottom
 (Top | Bottom)
+static const WFlags< SideAll = Top | Bottom | Left | Right
 All sides.
+static const WFlags
+< AlignmentFlag
AlignHorizontalMask = AlignLeft | AlignRight | AlignCenter | AlignJustify
 Combination of all horizontal alignment flags.
+static const WFlags
+< AlignmentFlag
AlignVerticalMask
 Combination of all vertical alignment flags.
+static const WFlags< MatchFlagMatchTypeMask
 Type part of MatchFlags.
+

Detailed Description

+

The namespace for Wt.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::AlignmentFlag
+
+
+ +

Enumeration that specifies a horizontal or a vertical alignment.

+

The vertical alignment flags are AlignBaseline, AlignSub, AlignSuper, AlignTop, AlignTextTop, AlignMiddle, AlignBottom and AlignTextBottom. The horizontal alignment flags are AlignLeft, AlignRight, AlignCenter and AlignJustify. Functions expecting either horizontal or vertical alignment flags throw an exception when they are called with the wrong alignment flag.

+

When used with setVerticalAlignment(), this applies only to inline widgets and determines how to position itself on the current line, with respect to sibling inline widgets.

+

When used with WTableCell::setContentAlignment(), this determines the vertical alignment of contents within the table cell.

+

When used with WPainter::drawText(), this determines the horizontal and vertical alignment of the text with respect to the bounding rectangle.

+

When used with WContainerWidget::setContentAlignment(), this specifies how contents should be aligned horizontally within the container.

+

Not all values are applicable in all situations. The most commonly used values are AlignLeft, AlignCenter, AlignRight, AlignBottom, AlignMiddle and AlignTop.

+
Enumerator:
+ + + + + + + + + + + + +
AlignLeft  +

Align to the left.

+
AlignRight  +

Align to the right.

+
AlignCenter  +

Align horizontally in the center.

+
AlignJustify  +

Justify left and right.

+
AlignBaseline  +

Align at baseline (default alignment).

+
AlignSub  +

Align below the baseline (as if subscript).

+
AlignSuper  +

Align above the baseline (as if superscript).

+
AlignTop  +

Align top of widget with top of tallest sibling widget.

+
AlignTextTop  +

Align top of widget with the top of the parent widget's font.

+
AlignMiddle  +

Align vertically the middle to the middle of the parent widget.

+
AlignBottom  +

Align bottom of widget to the bottom of the lowest sigling widget.

+
AlignTextBottom  +

Align bottom of widget to the bottom of parent widget's font.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::AnchorTarget
+
+
+ +

Enumeration that specifies where the target of an anchor should be displayed.

+
See also:
WAnchor::setTarget()
+
Enumerator:
+ + + +
TargetSelf  +

Show Instead of the application.

+
TargetThisWindow  +

Show in the top level frame of the application window.

+
TargetNewWindow  +

Show in a separate new tab or window.

+
+
+
+ +
+
+ +
+
+ + + + +
enum CharEncoding [related, inherited]
+
+
+ +

Enumeration that indicates a character encoding.

+

Character encodings are used to represent characters in a stream of bytes.

+
Enumerator:
+ + +
LocalEncoding  +

The (server) system locale.

+

Each byte represents a character, according to the locale of the server-side system.

+
UTF8  +

UTF-8 unicode encoding.

+

The byte stream represents unicode characters encoded using UTF-8.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::CheckState
+
+
+ +

Enumeration for the check state of a check box.

+
See also:
WCheckBox
+
Enumerator:
+ + + +
Unchecked  +

Unchecked.

+
PartiallyChecked  +

Partially checked (for a tri-state checkbox)

+
Checked  +

Checked.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Cursor
+
+
+ +

Enumeration for a cursor style.

+
See also:
WCssDecorationStyle::setCursor(), WAbstractArea::setCursor()
+
Enumerator:
+ + + + + + + + +
ArrowCursor  +

Arrow, CSS 'default' cursor.

+
AutoCursor  +

Cursor chosen by the browser, CSS 'auto' cursor.

+
CrossCursor  +

Crosshair, CSS 'cross' cursor.

+
PointingHandCursor  +

Pointing hand, CSS 'pointer' cursor.

+
OpenHandCursor  +

Open hand, CSS 'move' cursor.

+
WaitCursor  +

Wait, CSS 'wait' cursor.

+
IBeamCursor  +

Text edit, CSS 'text' cursor.

+
WhatsThisCursor  +

Help, CSS 'help' cursor.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::EntryPointType
+
+
+ +

Enumeration that indicates a Wt entrypoint type.

+

An entry point binds a behavior to a public URL. Only the wthttpd connector currently supports multiple entry points.

+
Enumerator:
+ + + +
Application  +

Specifies a full-screen application.

+

A full screen application manages the entire browser window and provides its own HTML page.

+
See also:
WServer::addEntryPoint(), WApplication::root()
+
WidgetSet  +

Specifies an application that manages one or more widgets.

+

A widget set application is part of an existing HTML page. One or more HTML elements in that web page may be bound to widgets managed by the application.

+

The application presents itself as a JavaScript file, and therefore should be embedded in the web page using a <script> tag, from within the <body> (since it needs access to the <body>).

+
Note:
A WidgetSet application requires JavaScript support
+
See also:
WServer::addEntryPoint(), WApplication::bindWidget()
+
StaticResource  +

Specifies a static resource.

+

A static resource binds a WResource to a public URL, and is not bound to a specific session.

+
See also:
WServer::addResource()
+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Icon
+
+
+ +

Enumeration that indiciates a standard icon.

+
Note:
Not used yet.
+
Enumerator:
+ + + + + +
NoIcon  +

No icon.

+
Information  +

An information icon (not implemented)

+
Warning  +

An warning icon (not implemented)

+
Critical  +

An critical icon (not implemented)

+
Question  +

An question icon (not implemented)

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::MetaHeaderType
+
+
+ +

Enumeration that indicates a meta header type.

+
See also:
WApplication::addMetaHeader()
+
Enumerator:
+ + +
MetaName  +

A normal meta header defining a document property.

+
MetaHttpHeader  +

A http-equiv meta header defining a HTTP header.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Orientation
+
+
+ +

Enumeration that indicates a direction.

+
Enumerator:
+ + +
Horizontal  +

Horizontal.

+
Vertical  +

Vertical.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::PaintFlag
+
+
+ +

Enumeration that indicates how to change a selection.

+
See also:
WPaintedWidget::update(), WPaintDevice::paintFlags()
+
Enumerator:
+ +
PaintUpdate  +

The canvas is not cleared, but further painted on.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::PositionScheme
+
+
+ +

Enumeration that specifies a layout mechanism for a widget.

+

The layout mechanism determines how the widget positions itself relative to the parent or sibling widgets.

+
See also:
WWidget::setPositionScheme(PositionScheme scheme)
+
Enumerator:
+ + + + +
Static  +

Static position scheme.

+

The widget is layed-out with other Static and Relative sibling widgets, one after another.

+

Inline widgets are layed out in horizontal lines (like text), wrapping around at the end of the line to continue on the next line. Block widgets are stacked vertically.

+

Static widgets may also float to the left or right border, using setFloatSide().

+
Relative  +

Relative position scheme.

+

The widget is first layed out according to Static layout rules, but after layout, the widget may be offset relative to where it would be in a static layout, using setOffsets().

+

Another common use of a Relative position scheme (even with no specified offsets) is to provide a new reference coordinate system for Absolutely positioned widgets.

+
Absolute  +

Absolute position scheme.

+

The widget is positioned at an absolute position with respect to the nearest ancestor widget that is either:

+ +
Fixed  +

Fixed position scheme.

+

The widget is positioned at fixed position with respect to the browser's view-pane.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::RegExpFlag
+
+
+ +

Enumeration that indicates a regular expression option.

+
See also:
WSortFilterProxyModel::setFilterOptions(), WRegExpValidator::setOptions()
+
Enumerator:
+ +
MatchCaseInsensitive  +

Case insensitive matching.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::SelectionBehavior
+
+
+ +

Enumeration that indicates what is being selected.

+
See also:
WTreeView::setSelectionBehavior()
+
Enumerator:
+ + +
SelectItems  +

Select single items.

+
SelectRows  +

Select only rows.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::SelectionFlag
+
+
+ +

Enumeration that indicates how to change a selection.

+
See also:
WTreeView::select()
+
Enumerator:
+ + + + +
Select  +

Add to selection.

+
Deselect  +

Remove from selection.

+
ToggleSelect  +

Toggle in selection.

+
ClearAndSelect  +

Clear selection and add single item.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::SelectionMode
+
+
+ +

Enumeration that indicates how items may be selected.

+
See also:
WTreeView::setSelectionMode()
+
Enumerator:
+ + + +
NoSelection  +

No selections.

+
SingleSelection  +

Single selection only.

+
ExtendedSelection  +

Multiple selection.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::Side
+
+
+ +

Enumeration that indicates a relative location.

+

Values of CenterX, CenterY, and CenterXY are only valid for WCssDecorationStyle::setBackgroundImage()

+
See also:
WWidget::setMargin(const WLength& x, WFlags<Side> sides)
+
+WWidget::setOffsets(const WLength& x, WFlags<Side> sides)
+
+WWidget::setFloatSide(Side s)
+
+WWidget::setClearSides(WFlags<Side> sides)
+
+WContainerWidget::setPadding(const WLength& x, WFlags<Side> sides)
+
+WCssDecorationStyle::setBackgroundImage()
+
Enumerator:
+ + + + + + +
Top  +

Top side.

+
Bottom  +

Bottom side.

+
Left  +

Left side.

+
Right  +

Right side.

+
CenterX  +

Center horiziontally.

+
CenterY  +

Center vertically.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::StandardButton
+
+
+ +

Enumeration that indicates a standard button.

+

Multiple buttons may be specified by logically or'ing these values together, e.g.

+
 Ok | Cancel
+
See also:
WMessageBox
+
Enumerator:
+ + + + + + + + + + +
NoButton  +

No button.

+
Ok  +

An OK button.

+
Cancel  +

A Cancel button.

+
Yes  +

A Yes button.

+
No  +

A No button.

+
Abort  +

An Abort button.

+
Retry  +

A Retry button.

+
Ignore  +

An Ignore button.

+
YesAll  +

A Yes-to-All button.

+
NoAll  +

A No-to-All button.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::TextFormat
+
+
+ +

Enumeration that indicates the text format.

+
See also:
WText::setTextFormat()
+
Enumerator:
+ + + +
XHTMLText  +

Format text as XSS-safe XHTML markup'ed text.

+
XHTMLUnsafeText  +

Format text as XHTML markup'ed text.

+
PlainText  +

Format text as plain text.

+
+
+
+ +
+
+ +
+
+ + + + +
enum Wt::ViewItemRenderFlag
+
+
+ +

Enumeration that specifies an option for rendering a view item.

+
See also:
WAbstractItemDelegate::update()
+
Enumerator:
+ + + + +
RenderSelected  +

Render as selected.

+
RenderEditing  +

Render in editing mode.

+
RenderFocused  +

Render (the editor) focused.

+
RenderInvalid  +

Render as invalid.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Chart.html b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Chart.html new file mode 100644 index 0000000..bd023bb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Chart.html @@ -0,0 +1,184 @@ + + + + +Wt: Wt::Chart Namespace Reference + + + + + + + + + +
+ +
+

Wt::Chart Namespace Reference

+
+
+ +

Namespace for the Charts. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  WAbstractChart
 Abstract base class for MVC-based charts. More...
class  WAxis
 Class which represents an axis of a cartesian chart. More...
class  WCartesianChart
 A cartesian chart. More...
class  SeriesIterator
 Abstract base class for iterating over series data in WChart2DRenderer. More...
class  WChart2DRenderer
 Helper class for rendering a cartesian chart. More...
class  WChartPalette
 Abstract base class for styling rendered data series in charts. More...
class  WDataSeries
 A single data series in a cartesian chart. More...
class  WPieChart
 A pie chart. More...
class  WStandardPalette
 Standard styling for rendering series in charts. More...

+Enumerations

enum  Axis {
+  XAxis = 0, +YAxis = 1, +Y1Axis = YAxis, +Y2Axis = 2, +
+  OrdinateAxis = YAxis +
+ }
 

Enumeration that indicates a chart axis.

+ More...
enum  AxisValue { MinimumValue = 0x1, +MaximumValue = 0x2, +ZeroValue = 0x4 + }
 

Enumeration that indicates a logical location for an axis.

+ More...
enum  AxisScale {
+  CategoryScale = 0, +LinearScale = 1, +LogScale = 2, +DateScale = 3, +
+  DateTimeScale = 4 +
+ }
 

Enumeration that indicates a scale for an axis.

+ More...
enum  SeriesType { PointSeries, +LineSeries, +CurveSeries, +BarSeries + }
 

Enumeration that specifies the type of a chart series.

+ More...
enum  MarkerType {
+  NoMarker, +SquareMarker, +CircleMarker, +CrossMarker, +
+  XCrossMarker, +TriangleMarker +
+ }
 

Enumeration that specifies a type of point marker.

+ More...
enum  FillRangeType { NoFill, +MinimumValueFill, +MaximumValueFill, +ZeroValueFill + }
 

Enumeration that specifies how an area should be filled.

+ More...
enum  ChartType { CategoryChart, +ScatterPlot + }
 

Enumeration type that indicates a chart type for a cartesian chart.

+ More...
enum  LabelOption {
+  NoLabels = 0x00, +Inside = 0x01, +Outside = 0x02, +TextLabel = 0x10, +
+  TextPercentage = 0x20 +
+ }
 

Enumeration that specifies options for the labels.

+ More...
+

Detailed Description

+

Namespace for the Charts.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Dbo.html b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Dbo.html new file mode 100644 index 0000000..06e6b9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Dbo.html @@ -0,0 +1,197 @@ + + + + +Wt: Wt::Dbo Namespace Reference + + + + + + + + + +
+ +
+

Wt::Dbo Namespace Reference

+
+
+ +

Namespace for the Database Objects (Dbo). +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  Call
 A database call. More...
class  collection
 An STL container for iterating query results. More...
class  Exception
 Exception base class for Wt::Dbo. More...
class  StaleObjectException
 Exception thrown when Wt::Dbo detects a concurrent modification More...
class  ObjectNotFoundException
 Exception thrown when trying to load a non-existing object. More...
class  NoUniqueResultException
 Exception thrown when a query unexpectedly finds a non-unique result. More...
class  FixedSqlConnectionPool
 A connection pool of fixed size. More...
class  dbo_default_traits
 Default traits for a class mapped with Wt::Dbo. More...
class  dbo_traits
 Traits for a class mapped with Wt::Dbo. More...
class  Dbo
 A base class for database objects. More...
class  ptr
 A smart pointer for database objects. More...
struct  ptr_tuple
 A utility class for defining a tuple of database objects. More...
class  DirectBinding
class  DynamicBinding
class  Query
 A database query. More...
class  QueryModel
 A Wt MVC Model to view/edit query results. More...
class  Session
 A database session. More...
class  SqlConnection
 Abstract base class for an SQL connection. More...
class  SqlConnectionPool
 Abstract base class for a SQL connection pool. More...
class  SqlStatement
 Abstract base class for a prepared SQL statement. More...
class  sql_value_traits
 Traits class for value types. More...
class  FieldInfo
 Description of a field. More...
class  query_result_traits
 Traits class for result types. More...
class  Transaction
 A database transaction. More...

+Enumerations

enum  RelationType { ManyToOne, +ManyToMany + }
 

Type of an SQL relation.

+ More...
enum  SqlDateTimeType { SqlDate, +SqlDateTime, +SqlTime + }
 

Enum that defines a date time type.

+ More...

+Functions

template<class Action , typename V >
void id (Action &action, V &value, const std::string &name="id", int size=-1)
 Maps a natural primary key (id) field.
template<class Action , typename V >
void field (Action &action, V &value, const std::string &name, int size=-1)
 Maps a database object field.
template<class Action , class C >
void belongsTo (Action &action, ptr< C > &value, const std::string &name, int size=-1)
 Maps the "One"-side of a ManyToOne relation.
template<class Action , class C >
void hasMany (Action &action, collection< ptr< C > > &value, RelationType type, const std::string &joinName, const std::string &joinId="")
 Maps the "Many"-side of a ManyToOne or ManyToMany relation.
+

Detailed Description

+

Namespace for the Database Objects (Dbo).

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Wt::Dbo::SqlDateTimeType
+
+
+ +

Enum that defines a date time type.

+
Enumerator:
+ + + +
SqlDate  +

Date only.

+
SqlDateTime  +

Date and time.

+
SqlTime  +

Time duration.

+
+
+
+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Ext.html b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Ext.html new file mode 100644 index 0000000..2523d45 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Ext.html @@ -0,0 +1,159 @@ + + + + +Wt: Wt::Ext Namespace Reference + + + + + + + + + +
+ +
+

Wt::Ext Namespace Reference

+
+
+ +

Namespace for Ext widgets. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  AbstractButton
 Abstract base class for a (toolbar) button or menu item. More...
class  AbstractToggleButton
 Abstract base class for radio button and check box. More...
class  Button
 A button. More...
class  Calendar
 A calendar. More...
class  CheckBox
 A user control that represents a check box. More...
class  ComboBox
 A widget that provides a drop-down combo-box control. More...
class  Component
 An abstract base class for widgets that can be visually disabled. More...
class  Container
 A container class which manages its contents using layout managers. More...
class  DataStore
 A resource that serializes data from a data model. More...
class  DateField
 A form field for conveniently editing a date using a calendar popup. More...
class  Dialog
 A dialog emulates a modal window that blocks the user-interface. More...
class  FormField
 An abstract base class for form fields. More...
class  LineEdit
 A line edit. More...
class  Menu
 A menu presented in a popup window. More...
class  MenuItem
 An item in a menu. More...
class  MessageBox
 A standard dialog for confirmation or to get simple user input. More...
class  NumberField
 A form field for editing a number. More...
class  PagingToolBar
 A tool bar that provides paging controls for supporting large data sets in a table view. More...
class  Panel
 A container with a title and standard GUI elements. More...
class  ProgressDialog
 A standard dialog to inform the user of progress during a time consuming task. More...
class  RadioButton
 A user control that represents a radio button. More...
class  Splitter
 A container widget with resize handles between its children. More...
class  SplitterHandle
 A handle inside a splitter. More...
class  TableView
 A widget that displays data in a table. More...
class  TabWidget
 A widget that organizes contents in tab panes. More...
class  TextEdit
 A rich-text editor. More...
class  ToolBar
 A class that represents a tool bar (or a menu bar). More...
class  ToolTipConfig
 A configuration object for tool tips. More...
class  Widget
 An abstract base class for all Ext widgets. More...

+Enumerations

enum  DataLocation { ClientSide, +ServerSide + }
 

An enum for the location of data in data-intensive widgets.

+ More...
+

Detailed Description

+

Namespace for Ext widgets.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Http.html b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Http.html new file mode 100644 index 0000000..61d8a7e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaceWt_1_1Http.html @@ -0,0 +1,163 @@ + + + + +Wt: Wt::Http Namespace Reference + + + + + + + + + +
+ +
+

Wt::Http Namespace Reference

+
+
+ +

Namespace for objects directly related to HTTP. +More...

+ + + + + + + + + + + + + + + + + + + +

+Classes

class  Client
 Collection of methods for dealing with a Wt application from a client perspective. More...
class  UploadedFile
 Details about a file uploaded with a (POST) request. More...
class  Request
 An HTTP request. More...
class  Response
 An HTTP response. More...
class  ResponseContinuation
 A response continuation object. More...

+Typedefs

typedef std::vector< std::string > ParameterValues
 A list of parameter values.
typedef std::map< std::string,
+ParameterValues
ParameterMap
 A parameter value map.
typedef std::multimap
+< std::string, UploadedFile
UploadedFileMap
 A file parameter map.
+

Detailed Description

+

Namespace for objects directly related to HTTP.

+

Typedef Documentation

+ +
+
+ + + + +
typedef std::map<std::string, ParameterValues> Wt::Http::ParameterMap
+
+
+ +

A parameter value map.

+

This is the type used aggregate plain parameter values in a request.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Wt::Http::ParameterValues
+
+
+ +

A list of parameter values.

+

This is the type used to aggregate all values for a single parameter.

+ +
+
+ +
+
+ + + + +
typedef std::multimap<std::string, UploadedFile> Wt::Http::UploadedFileMap
+
+
+ +

A file parameter map.

+

This is the type used aggregate file parameter values in a request.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers.html b/wt-3.1.7a/doc/reference/html/namespacemembers.html new file mode 100644 index 0000000..e3ed789 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers.html @@ -0,0 +1,202 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- a -

    +
  • Abort +: Wt +
  • +
  • Absolute +: Wt +
  • +
  • AlignBaseline +: Wt +
  • +
  • AlignBottom +: Wt +
  • +
  • AlignCenter +: Wt +
  • +
  • AlignHorizontalMask +: Wt +
  • +
  • AlignJustify +: Wt +
  • +
  • AlignLeft +: Wt +
  • +
  • AlignmentFlag +: Wt +
  • +
  • AlignMiddle +: Wt +
  • +
  • AlignRight +: Wt +
  • +
  • AlignSub +: Wt +
  • +
  • AlignSuper +: Wt +
  • +
  • AlignTextBottom +: Wt +
  • +
  • AlignTextTop +: Wt +
  • +
  • AlignTop +: Wt +
  • +
  • AlignVerticalMask +: Wt +
  • +
  • All +: Wt +
  • +
  • AltModifier +: Wt +
  • +
  • AnchorTarget +: Wt +
  • +
  • Application +: Wt +
  • +
  • ArrowCursor +: Wt +
  • +
  • AscendingOrder +: Wt +
  • +
  • asNumber() +: Wt +
  • +
  • asString() +: Wt +
  • +
  • AutoCursor +: Wt +
  • +
  • Axis +: Wt::Chart +
  • +
  • AxisScale +: Wt::Chart +
  • +
  • AxisValue +: Wt::Chart +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x62.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x62.html new file mode 100644 index 0000000..170184b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x62.html @@ -0,0 +1,133 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- b -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x63.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x63.html new file mode 100644 index 0000000..678a040 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x63.html @@ -0,0 +1,187 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- c -

    +
  • Cancel +: Wt +
  • +
  • CategoryChart +: Wt::Chart +
  • +
  • CategoryScale +: Wt::Chart +
  • +
  • CenterX +: Wt +
  • +
  • CenterXY +: Wt +
  • +
  • CenterY +: Wt +
  • +
  • ChartType +: Wt::Chart +
  • +
  • Checked +: Wt +
  • +
  • CheckState +: Wt +
  • +
  • CheckStateRole +: Wt +
  • +
  • CircleMarker +: Wt::Chart +
  • +
  • ClearAndSelect +: Wt +
  • +
  • ClientSide +: Wt::Ext +
  • +
  • ColumnIsCollapsed +: Wt +
  • +
  • ColumnIsExpandedLeft +: Wt +
  • +
  • ColumnIsExpandedRight +: Wt +
  • +
  • ControlModifier +: Wt +
  • +
  • CopyAction +: Wt +
  • +
  • Critical +: Wt +
  • +
  • CrossCursor +: Wt +
  • +
  • CrossMarker +: Wt::Chart +
  • +
  • Cursor +: Wt +
  • +
  • CurveSeries +: Wt::Chart +
  • +
  • cyan +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x64.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x64.html new file mode 100644 index 0000000..4967dbf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x64.html @@ -0,0 +1,172 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- d -

    +
  • darkBlue +: Wt +
  • +
  • darkCyan +: Wt +
  • +
  • darkGray +: Wt +
  • +
  • darkGreen +: Wt +
  • +
  • darkMagenta +: Wt +
  • +
  • darkRed +: Wt +
  • +
  • darkYellow +: Wt +
  • +
  • DashDotDotLine +: Wt +
  • +
  • DashDotLine +: Wt +
  • +
  • DashLine +: Wt +
  • +
  • DataLocation +: Wt::Ext +
  • +
  • DateScale +: Wt::Chart +
  • +
  • DateTimeScale +: Wt::Chart +
  • +
  • DecorationRole +: Wt +
  • +
  • DescendingOrder +: Wt +
  • +
  • Deselect +: Wt +
  • +
  • DisplayRole +: Wt +
  • +
  • DotLine +: Wt +
  • +
  • DropAction +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x65.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x65.html new file mode 100644 index 0000000..c1d42fd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x65.html @@ -0,0 +1,124 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- e -

    +
  • EditRole +: Wt +
  • +
  • EntryPointType +: Wt +
  • +
  • ExtendedSelection +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x66.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x66.html new file mode 100644 index 0000000..0632dd7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x66.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- f -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x67.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x67.html new file mode 100644 index 0000000..5e62840 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x67.html @@ -0,0 +1,124 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- g -

    +
  • GlobalColor +: Wt +
  • +
  • gray +: Wt +
  • +
  • green +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x68.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x68.html new file mode 100644 index 0000000..3d0829c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x68.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- h -

    +
  • hasMany() +: Wt::Dbo +
  • +
  • HeaderFlag +: Wt +
  • +
  • Horizontal +: Wt +
  • +
  • Horizontals +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x69.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x69.html new file mode 100644 index 0000000..2820d83 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x69.html @@ -0,0 +1,166 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- i -

    +
  • IBeamCursor +: Wt +
  • +
  • Icon +: Wt +
  • +
  • id() +: Wt::Dbo +
  • +
  • Ignore +: Wt +
  • +
  • Information +: Wt +
  • +
  • Inside +: Wt::Chart +
  • +
  • InternalPathRole +: Wt +
  • +
  • ItemDataRole +: Wt +
  • +
  • ItemFlag +: Wt +
  • +
  • ItemIsDirty +: Wt +
  • +
  • ItemIsDragEnabled +: Wt +
  • +
  • ItemIsDropEnabled +: Wt +
  • +
  • ItemIsEditable +: Wt +
  • +
  • ItemIsSelectable +: Wt +
  • +
  • ItemIsTristate +: Wt +
  • +
  • ItemIsUserCheckable +: Wt +
  • +
  • ItemIsXHTMLText +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x6b.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6b.html new file mode 100644 index 0000000..17df361 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6b.html @@ -0,0 +1,292 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- k -

    +
  • Key +: Wt +
  • +
  • Key_A +: Wt +
  • +
  • Key_Alt +: Wt +
  • +
  • Key_B +: Wt +
  • +
  • Key_Backspace +: Wt +
  • +
  • Key_C +: Wt +
  • +
  • Key_Control +: Wt +
  • +
  • Key_D +: Wt +
  • +
  • Key_Delete +: Wt +
  • +
  • Key_Down +: Wt +
  • +
  • Key_E +: Wt +
  • +
  • Key_End +: Wt +
  • +
  • Key_Enter +: Wt +
  • +
  • Key_Escape +: Wt +
  • +
  • Key_F +: Wt +
  • +
  • Key_F1 +: Wt +
  • +
  • Key_F10 +: Wt +
  • +
  • Key_F11 +: Wt +
  • +
  • Key_F12 +: Wt +
  • +
  • Key_F2 +: Wt +
  • +
  • Key_F3 +: Wt +
  • +
  • Key_F4 +: Wt +
  • +
  • Key_F5 +: Wt +
  • +
  • Key_F6 +: Wt +
  • +
  • Key_F7 +: Wt +
  • +
  • Key_F8 +: Wt +
  • +
  • Key_F9 +: Wt +
  • +
  • Key_G +: Wt +
  • +
  • Key_H +: Wt +
  • +
  • Key_Home +: Wt +
  • +
  • Key_I +: Wt +
  • +
  • Key_Insert +: Wt +
  • +
  • Key_J +: Wt +
  • +
  • Key_K +: Wt +
  • +
  • Key_L +: Wt +
  • +
  • Key_Left +: Wt +
  • +
  • Key_M +: Wt +
  • +
  • Key_N +: Wt +
  • +
  • Key_O +: Wt +
  • +
  • Key_P +: Wt +
  • +
  • Key_PageDown +: Wt +
  • +
  • Key_PageUp +: Wt +
  • +
  • Key_Q +: Wt +
  • +
  • Key_R +: Wt +
  • +
  • Key_Right +: Wt +
  • +
  • Key_S +: Wt +
  • +
  • Key_Shift +: Wt +
  • +
  • Key_Space +: Wt +
  • +
  • Key_T +: Wt +
  • +
  • Key_Tab +: Wt +
  • +
  • Key_U +: Wt +
  • +
  • Key_unknown +: Wt +
  • +
  • Key_Up +: Wt +
  • +
  • Key_V +: Wt +
  • +
  • Key_W +: Wt +
  • +
  • Key_X +: Wt +
  • +
  • Key_Y +: Wt +
  • +
  • Key_Z +: Wt +
  • +
  • KeyboardModifier +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x6c.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6c.html new file mode 100644 index 0000000..647b2d9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6c.html @@ -0,0 +1,139 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- l -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x6d.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6d.html new file mode 100644 index 0000000..b53fa25 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6d.html @@ -0,0 +1,196 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- m -

    +
  • magenta +: Wt +
  • +
  • ManyToMany +: Wt::Dbo +
  • +
  • ManyToOne +: Wt::Dbo +
  • +
  • MarkerBrushColorRole +: Wt +
  • +
  • MarkerPenColorRole +: Wt +
  • +
  • MarkerType +: Wt::Chart +
  • +
  • MatchCaseInsensitive +: Wt +
  • +
  • MatchCaseSensitive +: Wt +
  • +
  • MatchEndsWith +: Wt +
  • +
  • MatchExactly +: Wt +
  • +
  • MatchFlag +: Wt +
  • +
  • MatchRegExp +: Wt +
  • +
  • MatchStartsWith +: Wt +
  • +
  • MatchStringExactly +: Wt +
  • +
  • MatchTypeMask +: Wt +
  • +
  • MatchWildCard +: Wt +
  • +
  • MatchWrap +: Wt +
  • +
  • MaximumValue +: Wt::Chart +
  • +
  • MaximumValueFill +: Wt::Chart +
  • +
  • MetaHeaderType +: Wt +
  • +
  • MetaHttpHeader +: Wt +
  • +
  • MetaModifier +: Wt +
  • +
  • MetaName +: Wt +
  • +
  • MinimumValue +: Wt::Chart +
  • +
  • MinimumValueFill +: Wt::Chart +
  • +
  • MiterJoin +: Wt +
  • +
  • MoveAction +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x6e.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6e.html new file mode 100644 index 0000000..02faaaf --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6e.html @@ -0,0 +1,151 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- n -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x6f.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6f.html new file mode 100644 index 0000000..5dc52fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x6f.html @@ -0,0 +1,145 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- o -

    +
  • Ok +: Wt +
  • +
  • OpenHandCursor +: Wt +
  • +
  • operator*() +: Wt +
  • +
  • operator+() +: Wt +
  • +
  • operator-() +: Wt +
  • +
  • operator/() +: Wt +
  • +
  • operator<<() +: Wt +
  • +
  • OrdinateAxis +: Wt::Chart +
  • +
  • Orientation +: Wt +
  • +
  • Outside +: Wt::Chart +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x70.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x70.html new file mode 100644 index 0000000..a8ef5be --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x70.html @@ -0,0 +1,142 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- p -

    +
  • PaintFlag +: Wt +
  • +
  • PaintUpdate +: Wt +
  • +
  • ParameterMap +: Wt::Http +
  • +
  • ParameterValues +: Wt::Http +
  • +
  • PartiallyChecked +: Wt +
  • +
  • PlainText +: Wt +
  • +
  • PointingHandCursor +: Wt +
  • +
  • PointSeries +: Wt::Chart +
  • +
  • PositionScheme +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x71.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x71.html new file mode 100644 index 0000000..64d4d44 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x71.html @@ -0,0 +1,118 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- q -

    +
  • Question +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x72.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x72.html new file mode 100644 index 0000000..1acf375 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x72.html @@ -0,0 +1,154 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- r -

    +
  • red +: Wt +
  • +
  • RegExpFlag +: Wt +
  • +
  • registerType() +: Wt +
  • +
  • RelationType +: Wt::Dbo +
  • +
  • Relative +: Wt +
  • +
  • RenderEditing +: Wt +
  • +
  • RenderFocused +: Wt +
  • +
  • RenderInvalid +: Wt +
  • +
  • RenderSelected +: Wt +
  • +
  • Retry +: Wt +
  • +
  • Right +: Wt +
  • +
  • RoundCap +: Wt +
  • +
  • RoundJoin +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x73.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x73.html new file mode 100644 index 0000000..40f4828 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x73.html @@ -0,0 +1,190 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- s -

    +
  • ScatterPlot +: Wt::Chart +
  • +
  • Select +: Wt +
  • +
  • SelectionBehavior +: Wt +
  • +
  • SelectionFlag +: Wt +
  • +
  • SelectionMode +: Wt +
  • +
  • SelectItems +: Wt +
  • +
  • SelectRows +: Wt +
  • +
  • SeriesType +: Wt::Chart +
  • +
  • ServerSide +: Wt::Ext +
  • +
  • ShiftModifier +: Wt +
  • +
  • Side +: Wt +
  • +
  • SingleSelection +: Wt +
  • +
  • SolidLine +: Wt +
  • +
  • SolidPattern +: Wt +
  • +
  • SortOrder +: Wt +
  • +
  • SqlDate +: Wt::Dbo +
  • +
  • SqlDateTime +: Wt::Dbo +
  • +
  • SqlDateTimeType +: Wt::Dbo +
  • +
  • SqlTime +: Wt::Dbo +
  • +
  • SquareCap +: Wt +
  • +
  • SquareMarker +: Wt::Chart +
  • +
  • StandardButton +: Wt +
  • +
  • Static +: Wt +
  • +
  • StaticResource +: Wt +
  • +
  • StyleClassRole +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x74.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x74.html new file mode 100644 index 0000000..0740106 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x74.html @@ -0,0 +1,148 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- t -

    +
  • TargetNewWindow +: Wt +
  • +
  • TargetSelf +: Wt +
  • +
  • TargetThisWindow +: Wt +
  • +
  • TextFormat +: Wt +
  • +
  • TextLabel +: Wt::Chart +
  • +
  • TextPercentage +: Wt::Chart +
  • +
  • ToggleSelect +: Wt +
  • +
  • ToolTipRole +: Wt +
  • +
  • Top +: Wt +
  • +
  • transparent +: Wt +
  • +
  • TriangleMarker +: Wt::Chart +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x75.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x75.html new file mode 100644 index 0000000..18e3043 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x75.html @@ -0,0 +1,130 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- u -

    +
  • Unchecked +: Wt +
  • +
  • UploadedFileMap +: Wt::Http +
  • +
  • UrlRole +: Wt +
  • +
  • UserRole +: Wt +
  • +
  • UTF8 +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x76.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x76.html new file mode 100644 index 0000000..8ce535f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x76.html @@ -0,0 +1,124 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- v -

    +
  • Vertical +: Wt +
  • +
  • Verticals +: Wt +
  • +
  • ViewItemRenderFlag +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x77.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x77.html new file mode 100644 index 0000000..ca830b2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x77.html @@ -0,0 +1,130 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- w -

    +
  • WaitCursor +: Wt +
  • +
  • Warning +: Wt +
  • +
  • WhatsThisCursor +: Wt +
  • +
  • white +: Wt +
  • +
  • WidgetSet +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x78.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x78.html new file mode 100644 index 0000000..3c1dabc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x78.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- x -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x79.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x79.html new file mode 100644 index 0000000..3d016e7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x79.html @@ -0,0 +1,133 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- y -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_0x7a.html b/wt-3.1.7a/doc/reference/html/namespacemembers_0x7a.html new file mode 100644 index 0000000..deb2edc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_0x7a.html @@ -0,0 +1,121 @@ + + + + +Wt: Class Members + + + + + + + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to: + +

- z -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_enum.html b/wt-3.1.7a/doc/reference/html/namespacemembers_enum.html new file mode 100644 index 0000000..2e443f0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_enum.html @@ -0,0 +1,285 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- a -

+ + +

- c -

+ + +

- d -

    +
  • DataLocation +: Wt::Ext +
  • +
  • DropAction +: Wt +
  • +
+ + +

- e -

    +
  • EntryPointType +: Wt +
  • +
+ + +

- f -

+ + +

- g -

    +
  • GlobalColor +: Wt +
  • +
+ + +

- h -

    +
  • HeaderFlag +: Wt +
  • +
+ + +

- i -

    +
  • Icon +: Wt +
  • +
  • ItemDataRole +: Wt +
  • +
  • ItemFlag +: Wt +
  • +
+ + +

- k -

    +
  • Key +: Wt +
  • +
  • KeyboardModifier +: Wt +
  • +
+ + +

- l -

+ + +

- m -

    +
  • MarkerType +: Wt::Chart +
  • +
  • MatchFlag +: Wt +
  • +
  • MetaHeaderType +: Wt +
  • +
+ + +

- o -

    +
  • Orientation +: Wt +
  • +
+ + +

- p -

    +
  • PaintFlag +: Wt +
  • +
  • PositionScheme +: Wt +
  • +
+ + +

- r -

    +
  • RegExpFlag +: Wt +
  • +
  • RelationType +: Wt::Dbo +
  • +
+ + +

- s -

    +
  • SelectionBehavior +: Wt +
  • +
  • SelectionFlag +: Wt +
  • +
  • SelectionMode +: Wt +
  • +
  • SeriesType +: Wt::Chart +
  • +
  • Side +: Wt +
  • +
  • SortOrder +: Wt +
  • +
  • SqlDateTimeType +: Wt::Dbo +
  • +
  • StandardButton +: Wt +
  • +
+ + +

- t -

    +
  • TextFormat +: Wt +
  • +
+ + +

- v -

    +
  • ViewItemRenderFlag +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval.html new file mode 100644 index 0000000..db4f3c9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval.html @@ -0,0 +1,172 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- a -

    +
  • Abort +: Wt +
  • +
  • Absolute +: Wt +
  • +
  • AlignBaseline +: Wt +
  • +
  • AlignBottom +: Wt +
  • +
  • AlignCenter +: Wt +
  • +
  • AlignJustify +: Wt +
  • +
  • AlignLeft +: Wt +
  • +
  • AlignMiddle +: Wt +
  • +
  • AlignRight +: Wt +
  • +
  • AlignSub +: Wt +
  • +
  • AlignSuper +: Wt +
  • +
  • AlignTextBottom +: Wt +
  • +
  • AlignTextTop +: Wt +
  • +
  • AlignTop +: Wt +
  • +
  • AltModifier +: Wt +
  • +
  • Application +: Wt +
  • +
  • ArrowCursor +: Wt +
  • +
  • AscendingOrder +: Wt +
  • +
  • AutoCursor +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x62.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x62.html new file mode 100644 index 0000000..5c0da6d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x62.html @@ -0,0 +1,130 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- b -

    +
  • BarSeries +: Wt::Chart +
  • +
  • BevelJoin +: Wt +
  • +
  • black +: Wt +
  • +
  • blue +: Wt +
  • +
  • Bottom +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x63.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x63.html new file mode 100644 index 0000000..213c642 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x63.html @@ -0,0 +1,175 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- c -

    +
  • Cancel +: Wt +
  • +
  • CategoryChart +: Wt::Chart +
  • +
  • CategoryScale +: Wt::Chart +
  • +
  • CenterX +: Wt +
  • +
  • CenterY +: Wt +
  • +
  • Checked +: Wt +
  • +
  • CheckStateRole +: Wt +
  • +
  • CircleMarker +: Wt::Chart +
  • +
  • ClearAndSelect +: Wt +
  • +
  • ClientSide +: Wt::Ext +
  • +
  • ColumnIsCollapsed +: Wt +
  • +
  • ColumnIsExpandedLeft +: Wt +
  • +
  • ColumnIsExpandedRight +: Wt +
  • +
  • ControlModifier +: Wt +
  • +
  • CopyAction +: Wt +
  • +
  • Critical +: Wt +
  • +
  • CrossCursor +: Wt +
  • +
  • CrossMarker +: Wt::Chart +
  • +
  • CurveSeries +: Wt::Chart +
  • +
  • cyan +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x64.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x64.html new file mode 100644 index 0000000..265dced --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x64.html @@ -0,0 +1,166 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- d -

    +
  • darkBlue +: Wt +
  • +
  • darkCyan +: Wt +
  • +
  • darkGray +: Wt +
  • +
  • darkGreen +: Wt +
  • +
  • darkMagenta +: Wt +
  • +
  • darkRed +: Wt +
  • +
  • darkYellow +: Wt +
  • +
  • DashDotDotLine +: Wt +
  • +
  • DashDotLine +: Wt +
  • +
  • DashLine +: Wt +
  • +
  • DateScale +: Wt::Chart +
  • +
  • DateTimeScale +: Wt::Chart +
  • +
  • DecorationRole +: Wt +
  • +
  • DescendingOrder +: Wt +
  • +
  • Deselect +: Wt +
  • +
  • DisplayRole +: Wt +
  • +
  • DotLine +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x65.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x65.html new file mode 100644 index 0000000..dbe1a0c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x65.html @@ -0,0 +1,121 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- e -

    +
  • EditRole +: Wt +
  • +
  • ExtendedSelection +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x66.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x66.html new file mode 100644 index 0000000..aeb3a5a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x66.html @@ -0,0 +1,121 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- f -

    +
  • Fixed +: Wt +
  • +
  • FlatCap +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x67.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x67.html new file mode 100644 index 0000000..5973087 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x67.html @@ -0,0 +1,121 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- g -

    +
  • gray +: Wt +
  • +
  • green +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x68.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x68.html new file mode 100644 index 0000000..49eb94b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x68.html @@ -0,0 +1,118 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- h -

    +
  • Horizontal +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x69.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x69.html new file mode 100644 index 0000000..9b2617b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x69.html @@ -0,0 +1,154 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- i -

    +
  • IBeamCursor +: Wt +
  • +
  • Ignore +: Wt +
  • +
  • Information +: Wt +
  • +
  • Inside +: Wt::Chart +
  • +
  • InternalPathRole +: Wt +
  • +
  • ItemIsDirty +: Wt +
  • +
  • ItemIsDragEnabled +: Wt +
  • +
  • ItemIsDropEnabled +: Wt +
  • +
  • ItemIsEditable +: Wt +
  • +
  • ItemIsSelectable +: Wt +
  • +
  • ItemIsTristate +: Wt +
  • +
  • ItemIsUserCheckable +: Wt +
  • +
  • ItemIsXHTMLText +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6b.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6b.html new file mode 100644 index 0000000..5762740 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6b.html @@ -0,0 +1,286 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- k -

    +
  • Key_A +: Wt +
  • +
  • Key_Alt +: Wt +
  • +
  • Key_B +: Wt +
  • +
  • Key_Backspace +: Wt +
  • +
  • Key_C +: Wt +
  • +
  • Key_Control +: Wt +
  • +
  • Key_D +: Wt +
  • +
  • Key_Delete +: Wt +
  • +
  • Key_Down +: Wt +
  • +
  • Key_E +: Wt +
  • +
  • Key_End +: Wt +
  • +
  • Key_Enter +: Wt +
  • +
  • Key_Escape +: Wt +
  • +
  • Key_F +: Wt +
  • +
  • Key_F1 +: Wt +
  • +
  • Key_F10 +: Wt +
  • +
  • Key_F11 +: Wt +
  • +
  • Key_F12 +: Wt +
  • +
  • Key_F2 +: Wt +
  • +
  • Key_F3 +: Wt +
  • +
  • Key_F4 +: Wt +
  • +
  • Key_F5 +: Wt +
  • +
  • Key_F6 +: Wt +
  • +
  • Key_F7 +: Wt +
  • +
  • Key_F8 +: Wt +
  • +
  • Key_F9 +: Wt +
  • +
  • Key_G +: Wt +
  • +
  • Key_H +: Wt +
  • +
  • Key_Home +: Wt +
  • +
  • Key_I +: Wt +
  • +
  • Key_Insert +: Wt +
  • +
  • Key_J +: Wt +
  • +
  • Key_K +: Wt +
  • +
  • Key_L +: Wt +
  • +
  • Key_Left +: Wt +
  • +
  • Key_M +: Wt +
  • +
  • Key_N +: Wt +
  • +
  • Key_O +: Wt +
  • +
  • Key_P +: Wt +
  • +
  • Key_PageDown +: Wt +
  • +
  • Key_PageUp +: Wt +
  • +
  • Key_Q +: Wt +
  • +
  • Key_R +: Wt +
  • +
  • Key_Right +: Wt +
  • +
  • Key_S +: Wt +
  • +
  • Key_Shift +: Wt +
  • +
  • Key_Space +: Wt +
  • +
  • Key_T +: Wt +
  • +
  • Key_Tab +: Wt +
  • +
  • Key_U +: Wt +
  • +
  • Key_unknown +: Wt +
  • +
  • Key_Up +: Wt +
  • +
  • Key_V +: Wt +
  • +
  • Key_W +: Wt +
  • +
  • Key_X +: Wt +
  • +
  • Key_Y +: Wt +
  • +
  • Key_Z +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6c.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6c.html new file mode 100644 index 0000000..dfb0094 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6c.html @@ -0,0 +1,136 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- l -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6d.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6d.html new file mode 100644 index 0000000..78f9e78 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6d.html @@ -0,0 +1,184 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- m -

    +
  • magenta +: Wt +
  • +
  • ManyToMany +: Wt::Dbo +
  • +
  • ManyToOne +: Wt::Dbo +
  • +
  • MarkerBrushColorRole +: Wt +
  • +
  • MarkerPenColorRole +: Wt +
  • +
  • MatchCaseInsensitive +: Wt +
  • +
  • MatchCaseSensitive +: Wt +
  • +
  • MatchEndsWith +: Wt +
  • +
  • MatchExactly +: Wt +
  • +
  • MatchRegExp +: Wt +
  • +
  • MatchStartsWith +: Wt +
  • +
  • MatchStringExactly +: Wt +
  • +
  • MatchWildCard +: Wt +
  • +
  • MatchWrap +: Wt +
  • +
  • MaximumValue +: Wt::Chart +
  • +
  • MaximumValueFill +: Wt::Chart +
  • +
  • MetaHttpHeader +: Wt +
  • +
  • MetaModifier +: Wt +
  • +
  • MetaName +: Wt +
  • +
  • MinimumValue +: Wt::Chart +
  • +
  • MinimumValueFill +: Wt::Chart +
  • +
  • MiterJoin +: Wt +
  • +
  • MoveAction +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6e.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6e.html new file mode 100644 index 0000000..04320b2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6e.html @@ -0,0 +1,148 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- n -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6f.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6f.html new file mode 100644 index 0000000..3911a50 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x6f.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- o -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x70.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x70.html new file mode 100644 index 0000000..cd458f7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x70.html @@ -0,0 +1,130 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- p -

    +
  • PaintUpdate +: Wt +
  • +
  • PartiallyChecked +: Wt +
  • +
  • PlainText +: Wt +
  • +
  • PointingHandCursor +: Wt +
  • +
  • PointSeries +: Wt::Chart +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x71.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x71.html new file mode 100644 index 0000000..72c4f28 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x71.html @@ -0,0 +1,118 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- q -

    +
  • Question +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x72.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x72.html new file mode 100644 index 0000000..4a706af --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x72.html @@ -0,0 +1,145 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- r -

    +
  • red +: Wt +
  • +
  • Relative +: Wt +
  • +
  • RenderEditing +: Wt +
  • +
  • RenderFocused +: Wt +
  • +
  • RenderInvalid +: Wt +
  • +
  • RenderSelected +: Wt +
  • +
  • Retry +: Wt +
  • +
  • Right +: Wt +
  • +
  • RoundCap +: Wt +
  • +
  • RoundJoin +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x73.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x73.html new file mode 100644 index 0000000..b2e00c7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x73.html @@ -0,0 +1,166 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- s -

    +
  • ScatterPlot +: Wt::Chart +
  • +
  • Select +: Wt +
  • +
  • SelectItems +: Wt +
  • +
  • SelectRows +: Wt +
  • +
  • ServerSide +: Wt::Ext +
  • +
  • ShiftModifier +: Wt +
  • +
  • SingleSelection +: Wt +
  • +
  • SolidLine +: Wt +
  • +
  • SolidPattern +: Wt +
  • +
  • SqlDate +: Wt::Dbo +
  • +
  • SqlDateTime +: Wt::Dbo +
  • +
  • SqlTime +: Wt::Dbo +
  • +
  • SquareCap +: Wt +
  • +
  • SquareMarker +: Wt::Chart +
  • +
  • Static +: Wt +
  • +
  • StaticResource +: Wt +
  • +
  • StyleClassRole +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x74.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x74.html new file mode 100644 index 0000000..4e51f0f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x74.html @@ -0,0 +1,145 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- t -

    +
  • TargetNewWindow +: Wt +
  • +
  • TargetSelf +: Wt +
  • +
  • TargetThisWindow +: Wt +
  • +
  • TextLabel +: Wt::Chart +
  • +
  • TextPercentage +: Wt::Chart +
  • +
  • ToggleSelect +: Wt +
  • +
  • ToolTipRole +: Wt +
  • +
  • Top +: Wt +
  • +
  • transparent +: Wt +
  • +
  • TriangleMarker +: Wt::Chart +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x75.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x75.html new file mode 100644 index 0000000..05613f7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x75.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- u -

    +
  • Unchecked +: Wt +
  • +
  • UrlRole +: Wt +
  • +
  • UserRole +: Wt +
  • +
  • UTF8 +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x76.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x76.html new file mode 100644 index 0000000..46b4185 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x76.html @@ -0,0 +1,118 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- v -

    +
  • Vertical +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x77.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x77.html new file mode 100644 index 0000000..dd01a9b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x77.html @@ -0,0 +1,130 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- w -

    +
  • WaitCursor +: Wt +
  • +
  • Warning +: Wt +
  • +
  • WhatsThisCursor +: Wt +
  • +
  • white +: Wt +
  • +
  • WidgetSet +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x78.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x78.html new file mode 100644 index 0000000..1b3cfea --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x78.html @@ -0,0 +1,127 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- x -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x79.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x79.html new file mode 100644 index 0000000..1f80c05 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x79.html @@ -0,0 +1,133 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- y -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x7a.html b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x7a.html new file mode 100644 index 0000000..3898b0b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_eval_0x7a.html @@ -0,0 +1,121 @@ + + + + +Wt: Class Members + + + + + + + + + +
+  + +

- z -

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_func.html b/wt-3.1.7a/doc/reference/html/namespacemembers_func.html new file mode 100644 index 0000000..f7ddd1e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_func.html @@ -0,0 +1,120 @@ + + + + +Wt: Class Members + + + + + + + + + +
    +
  • asNumber() +: Wt +
  • +
  • asString() +: Wt +
  • +
  • belongsTo() +: Wt::Dbo +
  • +
  • field() +: Wt::Dbo +
  • +
  • hasMany() +: Wt::Dbo +
  • +
  • id() +: Wt::Dbo +
  • +
  • operator*() +: Wt +
  • +
  • operator+() +: Wt +
  • +
  • operator-() +: Wt +
  • +
  • operator/() +: Wt +
  • +
  • operator<<() +: Wt +
  • +
  • registerType() +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_type.html b/wt-3.1.7a/doc/reference/html/namespacemembers_type.html new file mode 100644 index 0000000..ab825b7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_type.html @@ -0,0 +1,93 @@ + + + + +Wt: Class Members + + + + + + + + + +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespacemembers_vars.html b/wt-3.1.7a/doc/reference/html/namespacemembers_vars.html new file mode 100644 index 0000000..c3c1400 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespacemembers_vars.html @@ -0,0 +1,108 @@ + + + + +Wt: Class Members + + + + + + + + + +
    +
  • AlignHorizontalMask +: Wt +
  • +
  • AlignVerticalMask +: Wt +
  • +
  • All +: Wt +
  • +
  • CenterXY +: Wt +
  • +
  • Horizontals +: Wt +
  • +
  • MatchTypeMask +: Wt +
  • +
  • None +: Wt +
  • +
  • Verticals +: Wt +
  • +
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/namespaces.html b/wt-3.1.7a/doc/reference/html/namespaces.html new file mode 100644 index 0000000..caa3e3e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/namespaces.html @@ -0,0 +1,83 @@ + + + + +Wt: Namespace Index + + + + + + + + + +
+
+

Namespace List

+
+
+Here is a list of all documented namespaces with brief descriptions: + + + + + +
WtThe namespace for Wt
Wt::ChartNamespace for the Charts
Wt::DboNamespace for the Database Objects (Dbo)
Wt::ExtNamespace for Ext widgets
Wt::HttpNamespace for objects directly related to HTTP
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/nav_f.png b/wt-3.1.7a/doc/reference/html/nav_f.png new file mode 100644 index 0000000..1b07a16 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/nav_f.png differ diff --git a/wt-3.1.7a/doc/reference/html/nav_h.png b/wt-3.1.7a/doc/reference/html/nav_h.png new file mode 100644 index 0000000..01f5fa6 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/nav_h.png differ diff --git a/wt-3.1.7a/doc/reference/html/open.png b/wt-3.1.7a/doc/reference/html/open.png new file mode 100644 index 0000000..7b35d2c Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/open.png differ diff --git a/wt-3.1.7a/doc/reference/html/overview.html b/wt-3.1.7a/doc/reference/html/overview.html new file mode 100644 index 0000000..efa0a81 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/overview.html @@ -0,0 +1,450 @@ + + + + +Wt: Library overview + + + + + + + + + +
+
+

Library overview

+
+
+

+Contents

+

+1. Widgets

+

The WWidget class represents a widget, which provides an abstraction of a visual entity. The entire user-interface is specified by creating a hierarchical structure of WWidgets, rooted at WApplication::root(). By reacting to events related to these widgets, you can perform business logic, and manipulate the widget hierarchy to update the user interface.

+

When inserting a widget in the widget hierarchy, ownership is transferred to its parent in the tree. Thus, when deleting a widget, all of its children are deleted as well, significantly reducing the burden of memory management related to widgets. When the WApplication object is deleted, the root of the tree is deleted, and in this way all resources associated with any widget are free'd.

+

Any descendent class of WWidget is a self-contained (reusable) class that encapsulates both the look and behaviour, enabling the design of the user interface in an orthogonal way.

+

+1.1 Layout

+

Widgets are layed out (with a few exceptions) following this hierarchical structure. You have two main options for lay-out of children within a container. Either you use a CSS based layout, in which case the CSS style properties of the container and children together determine the result: each child manages its layout with respect to its sibling following a (rather complex) set of rules. Alternatively, Wt provides layout managers that may be used for layout.

+

CSS layout considers two important categories of layout. Text-like widgets (inline) flow with sibling inline widgets in lines, wrapping at the right edge of the parent container. In contrast, widgets displayed as a block stack vertically with respect to sibling widgets. Block widgets allow more control over their position and size than inline widgets, and may also float to the left or right border of the parent container.

+

Layout managers are implemented by classes that derive from WLayout. They can be used in conjunction with WContainerWidget or Ext::Container container classes. Note that some layout managers are applicable only to a WContainerWidget and some only to an Ext::Container. Due to limitations in CSS (and pedantic browser implementations), vertical layout is not possible without JavaScript.

+

+1.2 Style

+

For visual markup of widgets, the recommended way is to use CSS style sheets. These allow the visual look to be defined seperately from the the rest of the application. External stylesheets may be loaded using WApplication::useStyleSheet(), and the internal stylesheet may be manipulated using WApplication::styleSheet().

+

In the stylesheets, you describe rules that are prefixed by CSS selectors. By setting matching style classes for your widgets using WWidget::setStyleClass(), these rules will be applied to your widgets. The recommended way for visual response to events is by changing the style class for the widget.

+

In addition to style sheets, Wt also supports the direct manipulation of a widget's style, using WWidget::decorationStyle().

+

+1.3 Widget containers

+

With a few exceptions, all widgets are child of (and contained in) a container widget such as WContainerWidget or WTableCell. A widget may be inserted into a WContainerWidget by adding the widget to the container using WContainerWidget::addWidget(), or by passing the parent container as an argument to its constructor. You may also add a widget to a container using a layout manager.

+

+2. Application URL(s)

+

A Wt application, like any other CGI application, is deployed at a single location (URL) within your web server. In this mode, a Wt application is a single page web application: the URL does not change. Still, an application may manage multiple URLs that correspond to internal paths. These are URLs that are created by appending an internal path to the application URL (this works only if the application was not deployed at a location ending with a '/'). The internal path may be manipulated through WApplication::setInternalPath(). When the internal path changes, this is reflected in the browser URL and an entry is added to the browser history, allowing the user to use the back and forward buttons to navigate through your application.

+

To avoid rerendering the entire widget tree for each internal path change, when AJAX is available, the internal path is indicated using a name anchor (#) after the deployment URL. For a plain HTML session, the session ID is appended to the URL to avoid the session from reloading when the user navigates using a WAnchor to a new internal URL.

+

To effectively change the internal path and obtain consistent behaviour with or without JavaScript, you should use a WAnchor to let the user navigate to a new internal path. The easiest way to do this is by using the WAnchor::setRefInternalPath(). This refers the WAnchor to a URL generated by WApplication::bookmarkUrl() for the new internal path (handling the plain HTML case), and binds a JavaScript slot to its WAnchor::clicked() signal, which changes the internal path (handling the AJAX case).

+

Finally, you can listen for path changes using the WApplication::internalPathChanged() event to react to the user navigating through his history.

+

When your applications uses internal URLs, this has consequences for relative URLs to external resources (style sheets, images, JavaScript files, etc...), since these are resolved taking into account the current relative URL. All relative URLs that are known to the application (e.g. those set in WAnchor::setRef(), WImage::setImageRef(), WApplication::useStyleSheet(), etc...) are automatically replaced by Wt with an absolute URL that resolves these directly within the deployment location. You should use absolute URLs in your own CSS or XHTML snippets when you wish these snippets to work regardless of the internal path in a plain session, since these cannot be fixed by Wt.

+

+3. Startup and session management

+

In your application, e.g. from within your main(), you should WRun() to start the Wt application server. This method will return only when shutdown is signaled by the environment, and after the application server (and all remaining active sessions) has been properly shutd down. One parameter to the WRun() function is a createApplication function object. Alternatively, if you wish to have more control over the application server, you may also instantiate and configure a WServer instance directly.

+

For every new session (which corresponds to a new user accessing your web application), the library calls your createApplication callback function to create a new WApplication object for that session. The request arguments (as part of the WEnvironment object) are passed to this createApplication function, and may be used to customize the application or authenticate the user. See also 6. Application bootstrap for details on the application bootstrap method.

+

At all times, the WApplication instance is accessible using the static method WApplication::instance(), and is useful to inspect startup arguments and settings (using WApplication::environment()), to set or change the application title (WApplication::setTitle()), to specify a locale (WApplication::setLocale()) for rendering, and many other application-wide settings. In a multi-threaded environment, access to this instance is implemented using thread local storage.

+

A session exits when the user browses away from the application, when WApplication::quit() is called, or when the application server is shut down. In any case, the application object together with the entire widget tree for that session is first properly deleted. Therefore, you should release resources held by your widgets or application in the destructors of these objects.

+

The library offers two different mechanisms to map sessions onto processes: dedicated processes (only with FastCGI deployment) and shared processes. The first mechanisms forks a dedicated process for every distinct session. This provides the kernel-level isolation of different sessions, which may be useful for highly security sensitive applications. The second mechanism spawns a number of processes and allocates new sessions randomly to one of these processes (when using the built-in httpd, only one process is used in total). This reduces the danger for DoS attacks, but requires more careful programming as memory corruption affects all sessions in a single process, and sessions are not isolated by any other mechanism but correct programming.

+

+4. Signal/slot event handling

+

To respond to user-interactivity events, or in general to communicate events from one widget to any other, Wt uses a signal/slot system.

+

A slot is any method of any descendant of WObject. To connect a signal with a slot, the only requirement is that the method signature of the slot must be compatible with the signal definition. In this way every method may be used as a slot, and it is not necessary to explicitly indicate a particular method to be a slot (as is needed in Qt), by putting them in a special section. Nevertheless, you may still do that if you wish to emphasize that these functions can be used as slots, or, if you have done extra work to optimize the implementation of these methods as client-side JavaScript code (see below).

+

A signal may be created by adding a Signal<X, ...> object. You may specify up to 6 arguments which may be of arbitrary types that are Copyable, that may be passed through the signal to connected slots.

+

The library defines several user-event signals on various widgets, and it is easy and convenient to add signals and slots to widget classes to communicate events and trigger callbacks.

+

Event signals (EventSignal<E>) are signals that may be triggered internally by the library to respond to user interactivity events. The abstract base classes WInteractWidget and WFormWidget define most of these event signals. To react to one of these events, the programmer connects a self-defined or already existing slot to such a signal.

+

+5. Optimizing client-side event handling

+

By default, Wt performs all event processing server-side. Every connected event signal will cause the web browser to communicate with the web server in order to invoke the call-back code, and visual changes will be updated in the web page.

+

However, Wt offers several options for incorporating client-side event handling. This may in general increase responsiveness of the application since the user gets an instant feed-back, avoiding the typical communication delay is avoided.

+

The least flexible but most convenient option for client-side event handling is letting Wt learn the visual effect of a slot and cache it in JavaScript code in the browser. In this way, the functionality is still specified in C++, and therefore the application still works equally when JavaScript is not available. The only restriction is that this is only possible for stateless call-back code -- i.e. when the visual update does not depend on state that may change in the course of the application, or event details. See the documentation of WObject::implementStateless for details, or the Treelist example for the use of stateless implementations to create a treelist widget that does all node expansion / collapsing client-side, at least if JavaScript is available.

+

The stateless slot learning allows applications to be developed entirely in C++, with only one specification of the desired behaviour, and decide at run-time to optimize certain event handling in client-side JavaScript if possible, and fall-back to server-side event handling otherwise.

+

When the requirements for stateless slot learning cannot be met you will have to resort to writing JavaScript manually. Wt provides a number of mechanisms to integrate JavaScript code with C++:

+
    +
  • +Using JSlot, you can specify the JavaScript for a slot, when connected to an EventSignal.
  • +
  • +Using JSignal, you can emit a C++ signal from JavaScript code, using a JavaScript function Wt.emit().
  • +
  • +Using WApplication::doJavaScript(), you can call JavaScript code directly as part of event handling.
  • +
+

+6. Application bootstrap

+

A Wt application may support both plain HTML and Ajax-enabled user agents. When a first request is made for a new session, there is no way of knowing whether the agent supports Ajax (and has it enabled). The bootstrap procedure therefore has two strategies of making the choice between a plain HTML and Ajax-enabled application mode.

+

+6.1 Default bootstrap

+

In the default bootstrap mode, for the normal case, a small bootstrap HTML file is served, which detects presence of AJAX (and various other environment properties such as presence of an internal path as an anchor, cookie support, and IE VML DPI setting). If no JavaScript support is available, it automatically redirects the user to a plain HTML version of the application.

+

In this mode, the application is not started until the library has determined AJAX support, which is made available in WEnvironment::ajax() which is passed to the application constructor.

+

In some special cases, this bootstrap is skipped and a plain HTML version is served. This is for user agents that are identified as spider bots, or user agents which are configured to not support AJAX (well), see the user-agents configuration setting.

+

There are some draw-backs to this bootstrap method:

+
    +
  • +the redirection without JavaScript support may not be supported by all user agents, leaving these with a link and a redirect message (see the redirect-message configuration setting)
  • +
  • +there is an additional round-trip before any contents is rendered
  • +
  • +for an AJAX user interface, all contents will be loaded through JavaScript. This has a draw-back that IE may delay applying external stylesheets after the contents has been rendered, which might cause some confusion, and some 3rd party JavaScript libraries do not support being loaded on-demand (with as most notable example, Google ads).
  • +
+

+6.1 Progressive bootstrap

+

Since Wt 2.99.4, a new bootstrap method has been added (initially proposed by Anthony roger Buck). While the default bootstrap already honors the principle of graceful degradation, this bootstrap implements this using the principle of progressive enhancement (and quite literally so).

+

This bootstrap method may be enabled with the progressive-bootstrap configuration setting.

+

This bootstrap method will initially assume that the user agent is a plain HTML user-agent and immediately create the application (with WEnvironment::ajax() always returning false). The initial response will contain the initial page suitable for a plain HTML user-agent.

+

JavaScript embedded in this page will sense for AJAX support and trigger a second request which progresses the application to an AJAX application (without repainting the user interface). To that extent, it will change WEnvironment::ajax() to return true, and invoke WApplication::enableAjax() which in turn propagates WWidget::enableAjax() through the widget hierarchy. This upgrade happens in the back-ground, unnoticed to the user.

+

This mitigates disadvantages associated with the default bootstrap, but has the draw-backs of being a recent development in Wt, and it requires slightly more server-side processing.

+

+7. Painting

+

Wt provides a vector graphics painting system which depending on the browser support uses one of three different methods to paint the graphics (inline SVG, inline VML or HTML 5 <canvas> element). Vector graphics has as benefit a lower bandwidth usage, which is indepedent of the image size and quality, and can be embedded within the HTML, avoiding an additional round-trip. To use the paint system, you need to specialize WPaintedWidget and use a WPainter to paint the contents of the widget inside its WPaintedWidget::paintEvent().

+

+8. Internationalization

+

Wt's WString class offers an interface to translate strings by using the static WString::tr("key") method to construct a WString. These key values will be lookup up in so-called message resource bundles (see WMessageResourceBundle). These are a set of xml files that translate the keys to a localized string. The name of the xml file determines the language contained therin (e.g. foo.xml, foo-nl.xml, foo-cn.xml)

+

The strings that are used by classes within the Wt library use the same system to translate their strings. English messages will be used by default and are built into Wt. If you want to translate e.g. the months of a WCalendar, copy src/xml/wt.xml and translate them to your language of choice. From then on, you can call WMessageResourceBundle::use() in your application and use your own replacement XML files, which will take precedence over the built-in translations.

+

+9. Deployment

+

The library is designed so that, besides the application binary, only files from the resources/ folder are needed to deploy the application. The resources folder contains icons, style sheets associated with themes, and other resources specific for special widgets. The URL at which the resources/ folder is deployed is based on the resourcesURL configuration property (see see configuration properties), which defaults to "/resources".

+

In addition, you may need to deploy also your own CSS files, custom icons/images, and/or static pages that you reference from your application, into your web server.

+

Your application may also use other files which do not need to be published online, but are instead read only by your application. These files include message resource files (containing localized text strings), the wt configuration file, your own configuration files, etc... You can deploy these to an application root (see WApplication::appRoot()), whose location is configured in a way that is specific for each connector.

+

+9.1 FastCGI

+

When linking your application against libwtfcgi, the resulting binary is a FastCGI binary. This binary may then be deployed and managed within a web server which supports the FastCGI protocol (these include apache, lighttpd and many other popular web servers).

+

The following locations for the wt_config.xml configuration file are considered, in this order:

+
    +
  • value of environment variable $WT_CONFIG_XML
  • +
  • within the app root, as configured by the environment variable $WT_APP_ROOT: $WT_APP_ROOT/wt_config.xml
  • +
  • the compile-time default (/etc/wt/wt_config.xml),
  • +
+

Environment variables can be specified to a FastCGI application depending on the web server. E.g. for FastCGI, this is:

+
 -initial-env WT_APP_ROOT=/opt/myapp
+

+9.2 Built-in httpd

+

When linking your application against libwthttp, the resulting binary is a stand-alone HTTP/WebSockets server. The web server will act as a plain web server in addition to serving the Wt application.

+

The following locations for the wt_config.xml configuration file are considered, in this order:

+
    +
  • command-line parameter --config or -c
  • +
  • value of environment variable $WT_CONFIG_XML
  • +
  • within the app root, as configured by the environment variable $WT_APP_ROOT: $WT_APP_ROOT/wt_config.xml
  • +
  • the compile-time default (/etc/wt/wt_config.xml)
  • +
+

+9.3 ISAPI

+

When linking your application against wtisapi, the resulting binary is an ISAPI plugin. This DLL may then be deployed and managed within Microsoft IIS.

+

The following locations for the wt_config.xml configuration file are considered, in this order:

+
    +
  • within the app root, as configured by the INI file which has the same name as the application DLL, but with .INI append to it (e.g. C: Files\WtApplications\Public\MyApplication.dll.ini):
    [isapi]
    +appRoot=C:\Program Files\MyApplications\AppRoot
    +
  • +
  • the compile-time default (/etc/wt/wt_config.xml)
  • +
+

+10. Configuration

+

Wt has one main XML configuration file, which by default is located in /etc/wt/wt_config.xml, but whose location can be overridden use environment settings and/or commandline parameters that are connector specific (see the connector supra).

+

The configuration file may specify several <application-settings>. The settings that apply are determined by the location attribute. Application settings for the '*' location are general settings, which may be overridden on a per-application level by settings with a location attribute that matches the location of the application (on the file system).

+

+10.1 Session management (wt_config.xml)

+

These are options related to session management, and are specified inside <session-management> subsection.

+
+
dedicated-process
+

Every session is mapped a dedicated process, allowing maximal session isolation, but at an increased session cost.
+ This is currently only supported using the FastCGI connector.

+

+
+
shared-process
+

Sessions share a fixed number of processes, yielding a lower session cost.
+ This is the only option for the Wthttpd connector.

+

+
+
tracking
+

How session tracking is implemented: automatically (using cookies when available, otherwise using URL rewriting) or strictly using URL rewriting (which allows multiple concurrent sessions from one user).

+

+
+
reload-is-new-session
+

Should a brower reload spawn a new session (convenient for debugging) or simply refresh (using WApplication::refresh()) the current session ? This setting may have implications for the URL that is displayed, because session information in needed in the URL to handle the reload within the current session.

+

+
+
timeout
+
The timeout (in seconds) for detecting an idle session. A Wt application uses a keep-alive messages to keep the session alive as long as the user is visiting the page. Increasing this number will result in a longer time between keep-alive message, resulting in a lower server load, but at the same time will detect a dead session with a longer delay, and thus have on average more sessions in memory that are no longer used.
+
+

+10.2 General application settings (wt_config.xml)

+

These options are indicated directly within <application-settings>, and specify settings that affect the run-time behaviour of the application.

+
+
debug
+

When debugging is enabled, JavaScript errors are not caught, and thus will provide stack information when using a JavaScript debugger.

+

+
+
log-file
+

Path to the log file used for application logging (see WApplication::log()). If not specified, logging is directed to stderr, which depending on the connector used ends up in the server error log, into the big void, or, simply to stderr.

+

+
+
max-request-size
+

The maximum HTTP request size (Kb) that is accepted. An oversized request will result in a WApplication::requestTooLarge() signal.

+

+
+
session-id-length
+

The length (in number of characters) for the unique session ID.

+

+
+
session-id-prefix
+

A fixed prefix for the session ID. You can use this to implement aid a load-balancer to figure out the destination for a particular request.

+

+
+
send-xhtml-mime-type
+

Whether the application presents rendered content as XHTML or HTML. Wt always renders XHTML1 compatible HTML, but by default indicates to the browser that it is in fact HTML. However, to use inline SVG (see WSvgImage), it is necessary to present an XHTML mime type. Setting this option will do so only for browsers that indicate support for XHTML.

+

+
+
redirect-message
+

When the default bootstrap method is used, this message is used in the link which redirects to the user to a plain HTML version, in case his user agent does not support the automatic redirect.

+

+
+
behind-reverse-proxy
+

When enabling this option to indicate that the application is deployed behind a reverse proxy (as would be common if you use the wthttpd connector), the server location is not read from the "Host" header, but from the X-Forwarded-For header, if present.

+

+
+
user-agents
+

Wt considers three types of sessions:

+
    +
  • +AJAX sessions: use AJAX and JavaScript
  • +
  • +plain HTML sessions: use plain old server POSTs
  • +
  • +bots: have clean internal paths, no persistent sessions, no html <form> elements, and no auto-generated DOM element id's.
  • +
+

+

By default, Wt does a browser detection to distinguish between the first two: if a browser supports JavaScript (and has it enabled), and has an AJAX DOM API, then AJAX sessions are chosen, otherwise plain HTML sessions.

+

+

Here, you may indicate which user agents should or should not receive an AJAX session regardless of what they report as capabilities, and which user agents should be treated as search bots. You can define three types of <user-agents> lists:

+
    +
  • type="ajax" mode="white-list": these are the only user agents that are considered as AJAX-capable.
  • +
  • type="ajax" mode="black-list": these are user agents that are not considered as AJAX-capable.
  • +
  • type="bot": these are user-agents that are treated as bots.
  • +
+

Example:

+
<user-agents type="bot">
+  <user-agent>.*Googlebot.*</user-agent>
+  <user-agent>.*msnbot.*</user-agent>
+  <user-agent>.*Slurp.*</user-agent>
+  <user-agent>.*Crawler.*</user-agent>
+  <user-agent>.*Bot.*</user-agent>
+  <user-agent>.*ia_archiver.*</user-agent>
+  <user-agent>.*Twiceler.*</user-agent>
+  <user-agent>Yandex.*</user-agent>
+  <user-agent>.*Nutch.*</user-agent>
+  <user-agent>.*MJ12bot.*</user-agent>
+  <user-agent>Baiduspider.*</user-agent>
+</user-agents>
+

+

+
+
progressive-bootstrap
+

This boolean configuration option configures which bootstrap method is used, see 6. Application bootstrap.

+

+
+
properties
+
Application-specific properties which may be accessed using WApplication::readConfigurationProperty(). For example:
 <properties>
+    <property name="extBaseURL">/ext/</property>
+    <property name="resourcesURL">/resources</property>
+    <property name="appRoot">/opt/myapp</property>
+ </properties>
+
+
+

+10.3 FastCGI options (wt_config.xml)

+

These options only apply to FastCGI-based deployment, and are are specified inside a <connector-fcgi> subsection.

+
+
valgrind-path
+

Set the path to valgrind for debugging using valgrind. This requires that debugging is enabled and debug is passed to the application as last request parameter.

+

+
+
run-directory
+
The path that is used by the library for managing sessions.
+
+

+10.4 Wt httpd (command-line or configuration file) options

+

These options are not specified in the wt_config.xml configuration file, but may be indicated on the command-line, or within a configuration file that is located at /etc/wt/wthttpd.

+

The configuration file syntax is line based:

+
    +
  • +

    +

    A line in the form:

    +

    name = value

    +

    gives a value to an option.

    +

    +
  • +
  • +

    +

    The # character introduces a comment that spans until the end of the line.

    +
  • +
+
General options:
+  -h [ --help ]                 produce help message
+  -t [ --threads ] arg (=10)    number of threads
+  --servername arg (=vierwerf)  servername (IP address or DNS name)
+  --docroot arg                 document root for static files
+  --errroot arg                 root for error pages
+  --accesslog arg               access log file (defaults to stdout)
+  --no-compression              do not compress dynamic text/html and text/plain
+                                responses
+  --deploy-path arg (=/)        location for deployment
+  --session-id-prefix arg       prefix for session-id's (overrides wt_config.xml
+                                setting)
+  -p [ --pid-file ] arg         path to pid file (optional)
+  -c [ --config ] arg           location of wt_config.xml. If unspecified, 
+                                WT_CONFIG_XML is searched in the environment, 
+                                if it does not exist then the compiled-in 
+                                default (/etc/wt/wt_config.xml) is tried. If 
+                                the default does not exist, we revert to 
+                                default values for all parameters.
+  --max-memory-request-size arg Requests are usually read in memory before 
+                                being processed. To avoid DOS attacks where 
+                                large requests take up all RAM, use this 
+                                parameter to force requests that are larger 
+                                than the specified size (bytes) to be spooled 
+                                to disk. This will also spool file uploads to 
+                                disk.
+  --gdb                         do not shutdown when receiving Ctrl-C (and let 
+                                gdb break instead)
+
+HTTP/WebSocket server options:
+  --http-address arg    IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --http-port arg (=80) HTTP port (e.g. 80)
+
+HTTPS/Secure WebSocket server options:
+  --https-address arg     IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
+  --https-port arg (=443) HTTPS port (e.g. 443)
+  --ssl-certificate arg   SSL server certificate chain file
+                          e.g. "/etc/ssl/certs/vsign1.pem"
+  --ssl-private-key arg   SSL server private key file
+                          e.g. "/etc/ssl/private/company.pem"
+  --ssl-tmp-dh arg        File for temporary Diffie-Hellman parameters
+                          e.g. "/etc/ssl/dh512.pem"
+

+10.5 ISAPI options (wt_config.xml)

+

These options only apply to ISAPI-based deployment, and are are specified inside a <connector-isapi> subsection.

+
+
num-threads
+

Sets the number of threads to be used to handle Wt traffic. The connector will never use IIS threads to do any processing, but will forward the requests to a thread pool of the size given in this variable. Depending on your application, you may want to increase the default size of 10 threads.

+

+
+
max-memory-request-size
+
Every HTTP request whose size is smaller than this parameter will be buffered in memory. Larger requests, such as large file uploads, will be spooled to a file. You probably do not want to change this parameter.
+
+

+11. Error-handling and logging

+

Wt provides logging of events to a log-file (see the log-file configuration setting). Every log entry has a timestamp, the process id and the session id. Wt uses four different event types, from least to most severe:

+
+
notice
+

Informational notices. These are events that may be interesting for late analysis of other problems, for performance analysis, or estimating server load.

+

+

Generated using WApplication::log(), e.g.:

+
wApp->log("notice") << "Message";
+

+
+
warn
+

Warnings. These events are generated when you are using the API in a way that may not have been as intended.

+

+

Generated using WApplication::log(), e.g.:

+
wApp->log("warn") << "Message";
+

+
+
error
+

Non-fatal application errors. These errors indicate for example unexpected input from the web browser or application user, XML parsing problems, but not necessarily a programming error.

+

+

Generated using WApplication::log(), e.g.:

+
wApp->log("error") << "Message";
+

+
+
fatal
+

Fatal application errors. These errors terminate the current session (but not the application server), and are errors that indicate a programming error. For example, this error is triggered by misuses of the API.

+

+

Generated by throwing a std::exception.

+
+
+

You can now proceed to Installation: Unix-like platforms or Installation: Windows

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/pages.html b/wt-3.1.7a/doc/reference/html/pages.html new file mode 100644 index 0000000..d52c295 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/pages.html @@ -0,0 +1,84 @@ + + + + +Wt: Page Index + + + + + + + + + +
+
+

Related Pages

+
+
+Here is a list of all related documentation pages: +
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_61.html b/wt-3.1.7a/doc/reference/html/search/all_61.html new file mode 100644 index 0000000..6b31a96 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_61.html @@ -0,0 +1,1034 @@ + + + + + + + +
+
Loading...
+
+
+ Abort + Wt +
+
+
+
+ aboutToHide + Wt::WPopupMenu +
+
+
+
+ Absolute + Wt +
+
+
+
+ AbstractButton + Wt::Ext +
+
+
+
+ AbstractToggleButton + Wt::Ext +
+
+ +
+
+ acceptDropMimeTypes + Wt::WAbstractItemModel +
+
+
+
+ acceptDrops + Wt::WWidget +
+
+ + + +
+
+ activeTexture + Wt::WGLWidget +
+
+ +
+
+ addAggregate + Wt::WAggregateProxyModel +
+
+
+
+ addAllFieldsAsColumns + Wt::Dbo::QueryModel +
+
+ +
+
+ addAutoJavaScript + Wt::WApplication +
+
+ +
+
+ addChild + Wt::WObject +
+
+
+
+ addChildNode + Wt::WTreeNode +
+
+ + + + +
+
+ addEntryPoint + Wt::WServer +
+
+
+
+ addField + Wt::WLogger +
+
+
+
+ addFooterButton + Wt::Ext::Panel +
+
+
+
+ addHeader + Wt::Http::Response +
+
+ + +
+
+ addMarker + Wt::WGoogleMap +
+
+ + + + +
+
+ addPath + Wt::WPainterPath +
+
+ +
+
+ addPolyline + Wt::WGoogleMap +
+
+ +
+
+ addResource + Wt::WServer +
+
+
+
+ addRow + Wt::Dbo::QueryModel +
+
+ + + +
+
+ addSeries + Wt::Chart::WCartesianChart +
+
+ +
+
+ addSpacing + Wt::WBoxLayout +
+
+ +
+
+ addString + Wt::WStringListModel +
+
+ +
+
+ addSuggestion + Wt::WSuggestionPopup +
+
+ + + +
+
+ adjoint + Wt::WTransform +
+
+
+
+ affectedRowCount + Wt::Dbo::SqlStatement +
+
+
+
+ agent + Wt::WEnvironment +
+
+
+
+ agentIsChrome + Wt::WEnvironment +
+
+
+
+ agentIsGecko + Wt::WEnvironment +
+
+
+
+ agentIsIE + Wt::WEnvironment +
+
+
+
+ agentIsIElt + Wt::WEnvironment +
+
+
+
+ agentIsIEMobile + Wt::WEnvironment +
+
+
+
+ agentIsMobileWebKit + Wt::WEnvironment +
+
+
+
+ agentIsOpera + Wt::WEnvironment +
+
+
+
+ agentIsSafari + Wt::WEnvironment +
+
+
+
+ agentIsSpiderBot + Wt::WEnvironment +
+
+
+
+ agentIsWebKit + Wt::WEnvironment +
+
+
+
+ ajax + Wt::WEnvironment +
+
+ +
+
+ AlignBaseline + Wt +
+
+
+
+ AlignBottom + Wt +
+
+
+
+ AlignCenter + Wt +
+
+
+ +
+
+
+ AlignJustify + Wt +
+
+
+
+ AlignLeft + Wt +
+
+
+
+ AlignmentFlag + Wt +
+
+
+
+ AlignMiddle + Wt +
+
+
+
+ AlignRight + Wt +
+
+
+
+ AlignSub + Wt +
+
+
+
+ AlignSuper + Wt +
+
+
+
+ AlignTextBottom + Wt +
+
+
+
+ AlignTextTop + Wt +
+
+
+
+ AlignTop + Wt +
+
+
+ +
+
+
+ All + Wt +
+
+ +
+
+ alpha1 + Wt::WTransform::TRSRDecomposition +
+
+
+
+ alpha2 + Wt::WTransform::TRSRDecomposition +
+
+ + + +
+
+ AltModifier + Wt +
+
+
+
+ AnchorTarget + Wt +
+
+ +
+
+ Antialiasing + Wt::WPainter +
+
+ +
+
+ appendReplacedText + Wt::WSuggestionPopup::Options +
+
+ +
+
+ appendRows + Wt::WStandardItem +
+
+
+
+ Application + Wt +
+
+ + + +
+
+ arcTo + Wt::WPainterPath +
+
+ + + +
+
+ args + Wt::WString +
+
+
+
+ Arora + Wt::WEnvironment +
+
+
+
+ ArrowCursor + Wt +
+
+
+
+ AscendingOrder + Wt +
+
+ + +
+
+ attachShader + Wt::WGLWidget +
+
+
+
+ attachThread + Wt::WApplication +
+
+ +
+
+ Auto + Wt::WLength +
+
+
+
+ AUTO_MAXIMUM + Wt::Chart::WAxis +
+
+
+
+ AUTO_MINIMUM + Wt::Chart::WAxis +
+
+
+
+ AutoCursor + Wt +
+
+
+
+ autoDismiss + Wt::Ext::ToolTipConfig +
+
+
+
+ autoExpandColumn + Wt::Ext::TableView +
+
+
+
+ autoHide + Wt::Ext::ToolTipConfig +
+
+ + + +
+
+ autoLimits + Wt::Chart::WAxis +
+
+
+
+ Autoplay + Wt::WHTML5Media +
+
+
+
+ autoScrollBars + Wt::Ext::Panel +
+
+ +
+
+ AxisProperty + Wt::Chart::WChart2DRenderer +
+
+
+
+ AxisScale + Wt::Chart +
+
+
+
+ AxisValue + Wt::Chart +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_62.html b/wt-3.1.7a/doc/reference/html/search/all_62.html new file mode 100644 index 0000000..688941f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_62.html @@ -0,0 +1,563 @@ + + + + + + + +
+
Loading...
+
+
+ background + Wt::Chart::WAbstractChart +
+
+
+
+ backgroundColor + Wt::WCssDecorationStyle +
+
+
+
+ backgroundImage + Wt::WCssDecorationStyle +
+
+
+
+ backgroundImageRepeat + Wt::WCssDecorationStyle +
+
+
+
+ barMargin + Wt::Chart::WCartesianChart +
+
+
+
+ BarSeries + Wt::Chart +
+
+
+
+ barWidth + Wt::Chart::WDataSeries +
+
+
+
+ BaseItem + Wt::WAbstractProxyModel::BaseItem +
+
+
+
+ BaseItem + Wt::WAbstractProxyModel +
+
+
+
+ batchSize + Wt::Dbo::QueryModel +
+
+ +
+
+ beginInsertColumns + Wt::WAbstractItemModel +
+
+
+
+ beginInsertRows + Wt::WAbstractItemModel +
+
+
+
+ beginRemoveColumns + Wt::WAbstractItemModel +
+
+
+
+ beginRemoveRows + Wt::WAbstractItemModel +
+
+
+
+ beingDeleted + Wt::WResource +
+
+
+
+ belongsTo + Wt::Dbo +
+
+
+
+ Below + Wt::Ext::FormField +
+
+
+
+ Besides + Wt::Ext::FormField +
+
+
+
+ BevelJoin + Wt +
+
+ +
+
+ bindAttribLocation + Wt::WGLWidget +
+
+
+
+ bindBuffer + Wt::WGLWidget +
+
+
+
+ bindInt + Wt::WTemplate +
+
+
+
+ bindNull + Wt::Dbo::SqlStatement +
+
+
+
+ bindString + Wt::WTemplate +
+
+
+
+ bindTexture + Wt::WGLWidget +
+
+
+
+ bindToAxis + Wt::Chart::WDataSeries +
+
+ +
+
+ black + Wt +
+
+
+
+ blendColor + Wt::WGLWidget +
+
+
+
+ blendEquation + Wt::WGLWidget +
+
+
+
+ blendEquationSeparate + Wt::WGLWidget +
+
+
+
+ blendFunc + Wt::WGLWidget +
+
+
+
+ blendFuncSeparate + Wt::WGLWidget +
+
+ + + +
+
+ blur + Wt::WShadow +
+
+ +
+
+ bodyClass + Wt::WApplication +
+
+ +
+
+ Bolder + Wt::WFont +
+
+ +
+
+ boost_any_traits + Wt +
+
+ + +
+
+ BotAgent + Wt::WEnvironment +
+
+ +
+
+ bottomLeft + Wt::WRectF +
+
+
+
+ bottomRight + Wt::WRectF +
+
+
+
+ bottomToolBar + Wt::Ext::Panel +
+
+
+
+ BottomToTop + Wt::WBoxLayout +
+
+ + +
+
+ browseTo + Wt::WCalendar +
+
+
+
+ browseToNextMonth + Wt::WCalendar +
+
+
+
+ browseToNextYear + Wt::WCalendar +
+
+
+
+ browseToPreviousMonth + Wt::WCalendar +
+
+
+
+ browseToPreviousYear + Wt::WCalendar +
+
+ +
+
+ buddy + Wt::WLabel +
+
+
+
+ bufferDatafv + Wt::WGLWidget +
+
+
+
+ bufferDataiv + Wt::WGLWidget +
+
+
+
+ bufferSize + Wt::WFileResource +
+
+
+
+ bufferSubDatafv + Wt::WGLWidget +
+
+
+
+ bufferSubDataiv + Wt::WGLWidget +
+
+
+
+ Button + Wt::Ext +
+
+ + +
+
+ buttonResult + Wt::WMessageBox +
+
+ +
+
+ ByteRange + Wt::Http::Request +
+
+ +
+
+ ByteRangeSpecifier + Wt::Http::Request +
+
+
+
+ ByteRangeSpecifier + Wt::Http::Request::ByteRangeSpecifier +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_63.html b/wt-3.1.7a/doc/reference/html/search/all_63.html new file mode 100644 index 0000000..8265c32 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_63.html @@ -0,0 +1,1583 @@ + + + + + + + +
+
Loading...
+
+
+ calcChartArea + Wt::Chart::WChart2DRenderer +
+
+
+
+ calcNumBarGroups + Wt::Chart::WChart2DRenderer +
+
+
+
+ Calendar + Wt::Ext +
+
+ +
+
+ Call + Wt::Dbo +
+
+
+
+ Call + Wt::Dbo::Call +
+
+ + +
+
+ cancelButton + Wt::WInPlaceEdit +
+
+
+
+ canceled + Wt::Ext::ProgressDialog +
+
+
+
+ canUpload + Wt::WFileUpload +
+
+
+
+ capStyle + Wt::WPen +
+
+
+
+ caption + Wt::WDialog +
+
+
+
+ CategoryChart + Wt::Chart +
+
+
+
+ CategoryScale + Wt::Chart +
+
+
+
+ cellClicked + Wt::Ext::TableView +
+
+ + +
+
+ CenterXY + Wt +
+
+ +
+
+ Centimeter + Wt::WLength +
+
+
+
+ centralWidget + Wt::WPanel +
+
+ +
+
+ changedTouches + Wt::WTouchEvent +
+
+
+
+ ChangeFlag + Wt::WPaintDevice +
+
+
+
+ charCode + Wt::WKeyEvent +
+
+
+
+ CharEncoding + Wt +
+
+ +
+
+ chartArea + Wt::Chart::WChart2DRenderer +
+
+
+
+ chartSegmentArea + Wt::Chart::WChart2DRenderer +
+
+
+
+ ChartType + Wt::Chart +
+
+ +
+
+ CheckBox + Wt::Ext +
+
+ +
+
+ checkedButton + Wt::WButtonGroup +
+
+
+
+ checkedChanged + Wt::WButtonGroup +
+
+
+
+ checkedId + Wt::WButtonGroup +
+
+
+
+ checkResize + Wt::WGoogleMap +
+
+ +
+
+ CheckStateRole + Wt +
+
+ + +
+
+ childNodes + Wt::WTreeNode +
+
+ +
+
+ Chrome0 + Wt::WEnvironment +
+
+
+
+ Chrome1 + Wt::WEnvironment +
+
+
+
+ Chrome2 + Wt::WEnvironment +
+
+
+
+ Chrome3 + Wt::WEnvironment +
+
+
+
+ Chrome4 + Wt::WEnvironment +
+
+
+
+ Chrome5 + Wt::WEnvironment +
+
+
+
+ CircleMarker + Wt::Chart +
+
+ +
+
+ ClearAndSelect + Wt +
+
+
+
+ clearColor + Wt::WGLWidget +
+
+
+
+ clearDepth + Wt::WGLWidget +
+
+
+
+ clearOverlays + Wt::WGoogleMap +
+
+ + +
+
+ clearSources + Wt::WHTML5Media +
+
+
+
+ clearStencil + Wt::WGLWidget +
+
+
+
+ clearSuggestions + Wt::WSuggestionPopup +
+
+ +
+
+ Client + Wt::Http +
+
+ + +
+
+ ClientOption + Wt::Http::Client +
+
+
+
+ ClientSide + Wt::Ext +
+
+
+
+ ClientSideRenderer + Wt::WGLWidget +
+
+
+
+ clipPath + Wt::WPainter +
+
+
+
+ Clipping + Wt::WPaintDevice +
+
+ + + +
+
+ closeEditors + Wt::WAbstractItemView +
+
+
+
+ closeMessage + Wt::WApplication +
+
+
+
+ closeSignal + Wt::WMenuItem +
+
+
+
+ closeSubPath + Wt::WPainterPath +
+
+
+
+ closeTab + Wt::WTabWidget +
+
+ + + +
+
+ collection + Wt::Dbo::collection +
+
+
+
+ collection + Wt::Dbo +
+
+
+
+ collection< ptr< C > > + Wt::Dbo +
+
+ +
+
+ colorMask + Wt::WGLWidget +
+
+ +
+
+ column1Fixed + Wt::WTreeView +
+
+ +
+
+ columnAt + Wt::WTable +
+
+ +
+
+ columnFlags + Wt::Dbo::QueryModel +
+
+
+
+ columnFormat + Wt::WTreeView +
+
+
+ +
+
+ +
+
+ +
+
+
+ columnIsResizable + Wt::WGridLayout +
+
+
+
+ columnNum + Wt::WTableColumn +
+
+
+
+ columnResized + Wt::WAbstractItemView +
+
+
+
+ columns + Wt::WTextArea +
+
+
+
+ columnsAboutToBeInserted + Wt::WAbstractItemModel +
+
+
+
+ columnsAboutToBeRemoved + Wt::WAbstractItemModel +
+
+
+
+ columnsInserted + Wt::WAbstractItemModel +
+
+
+
+ columnsMovable + Wt::Ext::TableView +
+
+
+
+ columnSpan + Wt::WTableCell +
+
+
+
+ columnsRemoved + Wt::WAbstractItemModel +
+
+
+
+ columnStretch + Wt::WGridLayout +
+
+
+
+ columnWidget + Wt::WTreeTableNode +
+
+ +
+
+ combinedTransform + Wt::WPainter +
+
+
+
+ ComboBox + Wt::Ext::ComboBox +
+
+
+
+ ComboBox + Wt::Ext +
+
+
+
+ commit + Wt::Dbo::Transaction +
+
+
+
+ commitAll + Wt::WBatchEditProxyModel +
+
+ + +
+
+ compileShader + Wt::WGLWidget +
+
+
+
+ Component + Wt::Ext +
+
+
+
+ configureToolTip + Wt::Ext::AbstractButton +
+
+
+
+ connect +
+ Wt::Dbo::backend::Postgres::connect() + Wt::JSignal::connect(const F &function) + Wt::JSignal::connect(T *target, void(V::*method)()) + Wt::JSignal::connect(T *target, void(V::*method)(A1)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6)) + Wt::JSignal::connect(JSlot &slot) + Wt::SignalBase::connect(WObject *target, WObject::Method method)=0 + Wt::SignalBase::connect(T *target, void(V::*method)()) + Wt::Signal::connect(WObject *target, WObject::Method method) + Wt::Signal::connect(const F &function) + Wt::Signal::connect(T *target, void(V::*method)()) + Wt::Signal::connect(T *target, void(V::*method)(A1)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6)) + Wt::EventSignal::connect(const F &function) + Wt::EventSignal::connect(T *target, void(V::*method)()) + Wt::EventSignal::connect(T *target, void(V::*method)(E)) + Wt::EventSignal::connect(T *target, void(V::*method)(const E &)) + Wt::EventSignal::connect(const std::string &function) + Wt::EventSignal::connect(JSlot &slot) + Wt::EventSignal::connect(WObject *target, WObject::Method method) +
+
+
+ +
+
+ connectPath + Wt::WPainterPath +
+
+
+
+ const_iterator + Wt::Dbo::collection +
+
+ +
+
+ constData + Wt::WGenericMatrix +
+
+
+
+ Container + Wt::Ext +
+
+
+
+ Container + Wt::Ext::Container +
+
+ +
+
+ contentAlignment + Wt::WContainerWidget +
+
+
+
+ contentDescription + Wt::WFileUpload +
+
+
+
+ contentLength + Wt::Http::Request +
+
+ +
+
+ contentsStack + Wt::WMenu +
+
+ + +
+
+ ControlModifier + Wt +
+
+
+
+ controlPointRect + Wt::WPainterPath +
+
+
+
+ Controls + Wt::WHTML5Media +
+
+
+
+ CookieMap + Wt::WEnvironment +
+
+
+
+ cookies + Wt::WEnvironment +
+
+ +
+
+ Coordinate + Wt::WGoogleMap +
+
+ +
+
+ Coordinates + Wt +
+
+
+
+ CopyAction + Wt +
+
+
+
+ copyDataTo + Wt::WGenericMatrix +
+
+
+
+ copyTexImage2D + Wt::WGLWidget +
+
+
+
+ copyTexSubImage2D + Wt::WGLWidget +
+
+ +
+
+ create + Wt::Dbo::query_result_traits +
+
+
+
+ createBuffer + Wt::WGLWidget +
+
+
+
+ createCall + Wt::JSignal +
+
+
+
+ createContinuation + Wt::Http::Response +
+
+
+
+ createEditor + Wt::WItemDelegate +
+
+
+
+ createEventCall + Wt::JSignal +
+
+ +
+
+ createExtraHeaderWidget + Wt::WAbstractItemView +
+
+
+
+ createImage + Wt::WVirtualImage +
+
+ + +
+
+ createJavaScriptMatrix4 + Wt::WGLWidget +
+
+ +
+
+ createPageNavigationBar + Wt::WAbstractItemView +
+
+
+
+ createPagingToolBar + Wt::Ext::TableView +
+
+
+
+ createProgram + Wt::WGLWidget +
+
+
+
+ createRenderer + Wt::Chart::WCartesianChart +
+
+
+
+ createRow + Wt::Dbo::QueryModel +
+
+
+
+ createShader + Wt::WGLWidget +
+
+
+
+ createSourceIndex + Wt::WAbstractProxyModel +
+
+
+
+ createTables + Wt::Dbo::Session +
+
+
+
+ createTexture + Wt::WGLWidget +
+
+
+
+ createTextureAndLoad + Wt::WGLWidget +
+
+
+
+ Critical + Wt +
+
+
+
+ CrossCursor + Wt +
+
+
+
+ CrossMarker + Wt::Chart +
+
+ +
+
+ cssTheme + Wt::WApplication +
+
+ + +
+
+ cullFace + Wt::WGLWidget +
+
+
+
+ currentBottomRightX + Wt::WVirtualImage +
+
+
+
+ currentBottomRightY + Wt::WVirtualImage +
+
+
+
+ currentCellChanged + Wt::Ext::TableView +
+
+ +
+
+ currentColumn + Wt::Ext::TableView +
+
+
+
+ currentDate + Wt::WDate +
+
+
+
+ currentDateTime + Wt::WDateTime +
+
+ +
+
+ currentItem + Wt::WMenu +
+
+
+
+ currentMonth + Wt::WCalendar +
+
+ +
+
+ currentPageChanged + Wt::WCalendar +
+
+
+
+ currentPosition + Wt::WPainterPath +
+
+
+
+ currentRow + Wt::Ext::TableView +
+
+
+
+ currentServerDate + Wt::WDate +
+
+
+
+ currentServerTime + Wt::WTime +
+
+ +
+
+ currentTopLeftX + Wt::WVirtualImage +
+
+
+
+ currentTopLeftY + Wt::WVirtualImage +
+
+ +
+
+ currentXSegment + Wt::Chart::SeriesIterator +
+
+
+
+ currentYear + Wt::WCalendar +
+
+
+
+ currentYSegment + Wt::Chart::SeriesIterator +
+
+
+
+ Cursive + Wt::WFont +
+
+ +
+
+ cursorImage + Wt::WCssDecorationStyle +
+
+ +
+
+ curstomFlags + Wt::Chart::WDataSeries +
+
+
+
+ CurveSeries + Wt::Chart +
+
+
+
+ CustomBrush + Wt::Chart::WDataSeries +
+
+
+
+ CustomFlag + Wt::Chart::WDataSeries +
+
+
+
+ CustomLabelColor + Wt::Chart::WDataSeries +
+
+
+
+ CustomMarkerBrush + Wt::Chart::WDataSeries +
+
+
+
+ CustomMarkerPen + Wt::Chart::WDataSeries +
+
+
+
+ CustomPen + Wt::Chart::WDataSeries +
+
+
+
+ cyan + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_64.html b/wt-3.1.7a/doc/reference/html/search/all_64.html new file mode 100644 index 0000000..93693ec --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_64.html @@ -0,0 +1,908 @@ + + + + + + + +
+
Loading...
+
+
+ darkBlue + Wt +
+
+
+
+ darkCyan + Wt +
+
+
+
+ darkGray + Wt +
+
+
+
+ darkGreen + Wt +
+
+
+
+ darkMagenta + Wt +
+
+
+
+ darkRed + Wt +
+
+
+
+ darkYellow + Wt +
+
+
+
+ DashDotDotLine + Wt +
+
+
+
+ DashDotLine + Wt +
+
+
+
+ Dashed + Wt::WBorder +
+
+
+
+ DashLine + Wt +
+
+ + +
+
+ dataColumn + Wt::Chart::WPieChart +
+
+
+
+ DataLocation + Wt::Ext +
+
+
+
+ DataMap + Wt::WAbstractItemModel +
+
+ +
+
+ DataStore + Wt::Ext +
+
+
+
+ DataStore + Wt::Ext::DataStore +
+
+ +
+
+ DateField + Wt::Ext +
+
+
+
+ DateField + Wt::Ext::DateField +
+
+
+
+ dateRenderer + Wt::Ext::TableView +
+
+
+
+ DateScale + Wt::Chart +
+
+
+
+ DateTimeScale + Wt::Chart +
+
+ + +
+
+ day + Wt::WDate +
+
+
+
+ dayOfWeek + Wt::WDate +
+
+ +
+
+ Dbo + Wt::Dbo::Dbo +
+
+
+
+ Dbo + Wt::Dbo +
+
+
+
+ dbo_default_traits + Wt::Dbo +
+
+
+
+ dbo_traits + Wt::Dbo +
+
+
+
+ decimalPrecision + Wt::Ext::NumberField +
+
+ +
+
+ declareJavaScriptFunction + Wt::WApplication +
+
+
+
+ decodeFromRawIndex + Wt::WModelIndex +
+
+
+
+ decodeFromRawIndexes + Wt::WModelIndex +
+
+
+ +
+
+
+ decomposeTranslateRotateScaleSkew + Wt::WTransform +
+
+
+
+ DecorationRole + Wt +
+
+ +
+
+ Default + Wt::WFont +
+
+
+
+ defaultActionPrevented + Wt::EventSignalBase +
+
+
+
+ defaultButton + Wt::Ext::Dialog +
+
+
+
+ DefaultControl + Wt::WGoogleMap +
+
+
+
+ defaultIndex + Wt::WSuggestionPopup +
+
+
+
+ degreesToRadians + Wt::WTransform +
+
+
+
+ deleteBuffer + Wt::WGLWidget +
+
+
+
+ deleteColumn + Wt::WTable +
+
+
+
+ deleteProgram + Wt::WGLWidget +
+
+ +
+
+ deleteShader + Wt::WGLWidget +
+
+
+
+ deleteTexture + Wt::WGLWidget +
+
+
+
+ deploymentPath + Wt::WEnvironment +
+
+
+
+ depthFunc + Wt::WGLWidget +
+
+
+
+ depthMask + Wt::WGLWidget +
+
+
+
+ depthRange + Wt::WGLWidget +
+
+
+
+ descendantAdded + Wt::WTreeNode +
+
+
+
+ descendantRemoved + Wt::WTreeNode +
+
+
+
+ DescendingOrder + Wt +
+
+
+
+ Deselect + Wt +
+
+
+
+ detachShader + Wt::WGLWidget +
+
+ +
+
+ device + Wt::WPainter +
+
+
+
+ Dialog + Wt::Ext +
+
+
+
+ Dialog + Wt::Ext::Dialog +
+
+ +
+
+ DirectBinding + Wt::Dbo +
+
+ + +
+
+ Disabled + Wt::WTreeNode +
+
+
+
+ disableDoubleClickZoom + Wt::WGoogleMap +
+
+
+
+ disableDragging + Wt::WGoogleMap +
+
+
+
+ disableGoogleBar + Wt::WGoogleMap +
+
+
+
+ disableScrollWheelZoom + Wt::WGoogleMap +
+
+
+
+ dismissDelay + Wt::Ext::ToolTipConfig +
+
+
+
+ displayedChildCount + Wt::WTreeNode +
+
+
+
+ displayLabels + Wt::Chart::WPieChart +
+
+
+
+ DisplayRole + Wt +
+
+
+
+ displayWidget + Wt::WDatePicker +
+
+
+
+ distanceTo + Wt::WGoogleMap::Coordinate +
+
+
+
+ doCollapse + Wt::WTreeNode +
+
+ +
+
+ doExpand + Wt::WTreeNode +
+
+ + +
+
+ DotLine + Wt +
+
+
+
+ Dotted + Wt::WBorder +
+
+
+
+ Double + Wt::WBorder +
+
+ +
+
+ dpiScale + Wt::WEnvironment +
+
+
+
+ dragDelta + Wt::WMouseEvent +
+
+ +
+
+ drawArrays + Wt::WGLWidget +
+
+ +
+
+ drawElements + Wt::WGLWidget +
+
+ + + + +
+
+ drawMarker + Wt::Chart::WCartesianChart +
+
+ + + +
+
+ drawPoints + Wt::WPainter +
+
+
+
+ drawPolygon + Wt::WPainter +
+
+
+
+ drawPolyline + Wt::WPainter +
+
+ + + +
+
+ DropAction + Wt +
+
+
+
+ DropDownIcon + Wt::WSuggestionPopup +
+
+ +
+
+ dropTables + Wt::Dbo::Session +
+
+ + +
+
+ DynamicBinding + Wt::Dbo +
+
+
+
+ DynamicScriptTag + Wt::WApplication +
+
+
+
+ dynamicSortFilter + Wt::WSortFilterProxyModel +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_65.html b/wt-3.1.7a/doc/reference/html/search/all_65.html new file mode 100644 index 0000000..550a57c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_65.html @@ -0,0 +1,487 @@ + + + + + + + +
+
Loading...
+
+
+ East + Wt::WBorderLayout +
+
+ +
+
+ edit + Wt::WAbstractItemView +
+
+
+
+ Editing + Wt::WSuggestionPopup +
+
+
+
+ EditOption + Wt::WAbstractItemView +
+
+
+
+ editOptions + Wt::WAbstractItemView +
+
+
+
+ EditRole + Wt +
+
+ +
+
+ EditTrigger + Wt::WAbstractItemView +
+
+
+
+ editTriggers + Wt::WAbstractItemView +
+
+
+
+ elementAt + Wt::WTable +
+
+ + +
+
+ emptyFileName + Wt::WFileUpload +
+
+ + + +
+
+ enableColumnHiding + Wt::Ext::TableView +
+
+
+
+ Enabled + Wt::WTreeNode +
+
+
+
+ enableDoubleClickZoom + Wt::WGoogleMap +
+
+ +
+
+ enableGoogleBar + Wt::WGoogleMap +
+
+
+
+ enablePrompt + Wt::Ext::MessageBox +
+
+
+
+ enableScrollWheelZoom + Wt::WGoogleMap +
+
+
+
+ enableTextArea + Wt::Ext::MessageBox +
+
+
+
+ enableUpdates + Wt::WApplication +
+
+
+
+ enableVertexAttribArray + Wt::WGLWidget +
+
+
+
+ encodeAsRawIndex + Wt::WModelIndex +
+
+
+
+ encodeAsRawIndexes + Wt::WModelIndex +
+
+ +
+
+ ended + Wt::WHTML5Media +
+
+
+
+ endInsertColumns + Wt::WAbstractItemModel +
+
+
+
+ endInsertRows + Wt::WAbstractItemModel +
+
+
+
+ endRemoveColumns + Wt::WAbstractItemModel +
+
+
+
+ endRemoveRows + Wt::WAbstractItemModel +
+
+
+
+ endSegment + Wt::Chart::SeriesIterator +
+
+
+
+ endSeries + Wt::Chart::SeriesIterator +
+
+ +
+
+ entry + Wt::WLogger +
+
+
+
+ EntryPointType + Wt +
+
+
+
+ environment + Wt::WApplication +
+
+
+
+ erase + Wt::Dbo::collection +
+
+ + +
+
+ EventSignal + Wt +
+
+
+
+ EventSignalBase + Wt +
+
+
+
+ Exception + Wt::WServer +
+
+
+
+ Exception + Wt::Dbo +
+
+ + +
+
+ execJs + Wt::JSlot +
+
+ + + +
+
+ expandable + Wt::WTreeNode +
+
+ + +
+
+ expandToDepth + Wt::WTreeView +
+
+
+
+ Explicit + Wt::WBorder +
+
+
+
+ explicitWidth + Wt::WBorder +
+
+
+
+ explode + Wt::Chart::WPieChart +
+
+
+ +
+
+
+ extraHeaderWidget + Wt::WAbstractItemView +
+
+
+
+ extraPlugins + Wt::WTextEdit +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_66.html b/wt-3.1.7a/doc/reference/html/search/all_66.html new file mode 100644 index 0000000..6e33f66 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_66.html @@ -0,0 +1,495 @@ + + + + + + + +
+
Loading...
+
+
+ FancyToolTip + Wt::Ext::FormField +
+
+
+
+ Fantasy + Wt::WFont +
+
+
+
+ Field + Wt::WLogger +
+
+
+
+ field + Wt::Dbo +
+
+
+
+ FieldInfo + Wt::Dbo +
+
+ +
+
+ fieldName + Wt::Dbo::QueryModel +
+
+ +
+
+ fileName + Wt::WFileResource +
+
+
+
+ fileTextSize + Wt::WFileUpload +
+
+
+
+ fileTooLarge + Wt::WFileUpload +
+
+
+
+ fill + Wt::WGenericMatrix +
+
+
+
+ fillPath + Wt::WPainter +
+
+
+
+ fillRange + Wt::Chart::WDataSeries +
+
+
+
+ FillRangeType + Wt::Chart +
+
+ +
+
+ filterAcceptRow + Wt::WSortFilterProxyModel +
+
+
+
+ filterFlags + Wt::WSortFilterProxyModel +
+
+
+
+ filterKeyColumn + Wt::WSortFilterProxyModel +
+
+
+
+ filterLength + Wt::WSuggestionPopup +
+
+
+
+ filterModel + Wt::WSuggestionPopup +
+
+
+
+ filterRegExp + Wt::WSortFilterProxyModel +
+
+
+
+ filterRole + Wt::WSortFilterProxyModel +
+
+
+
+ finalize + Wt::WApplication +
+
+ +
+
+ findText + Wt::WComboBox +
+
+ +
+
+ finish + Wt::WGLWidget +
+
+ +
+
+ Firefox + Wt::WEnvironment +
+
+
+
+ Firefox3_0 + Wt::WEnvironment +
+
+
+
+ Firefox3_1 + Wt::WEnvironment +
+
+
+
+ Firefox3_1b + Wt::WEnvironment +
+
+
+
+ Firefox3_5 + Wt::WEnvironment +
+
+
+
+ Firefox3_6 + Wt::WEnvironment +
+
+
+
+ firstByte + Wt::Http::Request::ByteRange +
+
+
+
+ Fixed + Wt +
+
+ +
+
+ FixedSqlConnectionPool + Wt::Dbo::FixedSqlConnectionPool +
+
+
+
+ FixedSqlConnectionPool + Wt::Dbo +
+
+
+
+ fixup + Wt::WValidator +
+
+ +
+
+ FlatCap + Wt +
+
+
+
+ Flavour + Wt::Chart::WStandardPalette +
+
+
+
+ flipCoordinates + Wt::WMatrix4x4 +
+
+ + + + + +
+
+ FontEm + Wt::WLength +
+
+
+
+ FontEx + Wt::WLength +
+
+
+
+ footerButtons + Wt::Ext::Panel +
+
+
+
+ forEdit + Wt::WSuggestionPopup +
+
+
+
+ foregroundColor + Wt::WCssDecorationStyle +
+
+
+
+ ForeignKey + Wt::Dbo::FieldInfo +
+
+ +
+
+ formats + Wt::WDateValidator +
+
+
+
+ FormField + Wt::Ext +
+
+
+
+ FormField + Wt::Ext::FormField +
+
+
+
+ fromPosixTime + Wt::WDateTime +
+
+
+
+ fromRawIndex + Wt::WAbstractItemModel +
+
+ +
+
+ fromTime_t + Wt::WDateTime +
+
+ +
+
+ frontFace + Wt::WGLWidget +
+
+
+
+ frustum + Wt::WMatrix4x4 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_67.html b/wt-3.1.7a/doc/reference/html/search/all_67.html new file mode 100644 index 0000000..8e207d2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_67.html @@ -0,0 +1,311 @@ + + + + + + + +
+
Loading...
+
+
+ Gecko + Wt::WEnvironment +
+
+
+
+ generateMatcherJS + Wt::WSuggestionPopup +
+
+
+
+ generateMipmap + Wt::WGLWidget +
+
+
+
+ generateReplacerJS + Wt::WSuggestionPopup +
+
+
+
+ generateUrl + Wt::WResource +
+
+ +
+
+ gestureChanged + Wt::WInteractWidget +
+
+
+
+ gestureEnded + Wt::WInteractWidget +
+
+
+
+ gestureStarted + Wt::WInteractWidget +
+
+
+
+ getAttribLocation + Wt::WGLWidget +
+
+
+
+ getCgiValue + Wt::WEnvironment +
+
+ +
+
+ getContentsMargins + Wt::WLayout +
+
+
+
+ getCookie + Wt::WEnvironment +
+
+
+
+ getFields + Wt::Dbo::query_result_traits +
+
+
+
+ getOptions + Wt::WHTML5Media +
+
+ + + +
+
+ getRanges + Wt::Http::Request +
+
+ + +
+
+ getStatement + Wt::Dbo::SqlConnection +
+
+
+
+ getUniformLocation + Wt::WGLWidget +
+
+
+
+ getUpdateLock + Wt::WApplication +
+
+
+
+ getUploadedFile + Wt::Http::Request +
+
+
+
+ getValues + Wt::Dbo::query_result_traits +
+
+
+
+ GLenum + Wt::WGLWidget +
+
+
+
+ GlobalColor + Wt +
+
+
+
+ globalEnterPressed + Wt::WApplication +
+
+
+
+ globalEscapePressed + Wt::WApplication +
+
+
+
+ globalKeyPressed + Wt::WApplication +
+
+
+
+ globalKeyWentDown + Wt::WApplication +
+
+
+
+ globalKeyWentUp + Wt::WApplication +
+
+
+
+ gray + Wt +
+
+
+
+ GrayScale + Wt::Chart::WStandardPalette +
+
+ +
+
+ Grid + Wt::Chart::WChart2DRenderer +
+
+
+
+ gridImageSize + Wt::WVirtualImage +
+
+
+
+ gridLinesPen + Wt::Chart::WAxis +
+
+
+
+ Groove + Wt::WBorder +
+
+
+
+ group + Wt::WRadioButton +
+
+
+
+ groupBy + Wt::Dbo::Query +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_68.html b/wt-3.1.7a/doc/reference/html/search/all_68.html new file mode 100644 index 0000000..59ab146 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_68.html @@ -0,0 +1,377 @@ + + + + + + + +
+
Loading...
+
+
+ handle + Wt::Ext::Splitter +
+
+ +
+
+ handleUnresolvedVariable + Wt::WTemplate +
+
+
+
+ handleWidth + Wt::Ext::Splitter +
+
+ +
+
+ hasClipping + Wt::WPainter +
+
+
+
+ hasFocus + Wt::WFormWidget +
+
+
+
+ hasIndex + Wt::WAbstractItemModel +
+
+
+
+ hasMany + Wt::Dbo +
+
+
+
+ hasPrompt + Wt::Ext::MessageBox +
+
+ +
+
+ hasTextArea + Wt::Ext::MessageBox +
+
+
+
+ header + Wt::WTreeTable +
+
+
+
+ headerAlignment + Wt::WAbstractItemView +
+
+
+
+ headerCount + Wt::WTable +
+
+ +
+
+ headerDataChanged + Wt::WAbstractItemModel +
+
+
+
+ HeaderFlag + Wt +
+
+ +
+
+ headerHeight + Wt::WAbstractItemView +
+
+ +
+
+ headerWidget + Wt::WTreeTable +
+
+ + +
+
+ Hidden + Wt::WBorder +
+
+ + + +
+
+ hideDelay + Wt::Ext::ToolTipConfig +
+
+
+
+ hideOnClick + Wt::Ext::ToolTipConfig +
+
+
+
+ HierarchicalControl + Wt::WGoogleMap +
+
+
+
+ highlightBeginTag + Wt::WSuggestionPopup::Options +
+
+
+
+ highlightEndTag + Wt::WSuggestionPopup::Options +
+
+
+
+ highlightMouseOver + Wt::Ext::TableView +
+
+
+
+ hint + Wt::WGLWidget +
+
+
+
+ Hints + Wt::WPaintDevice +
+
+
+
+ Horizontal + Wt +
+
+ +
+
+ Horizontals + Wt +
+
+
+
+ horizontalScrollBar + Wt::WScrollArea +
+
+
+
+ horizontalSpacing + Wt::WGridLayout +
+
+
+
+ hostName + Wt::WEnvironment +
+
+
+
+ hour + Wt::WTime +
+
+
+
+ HTML4 + Wt::WEnvironment +
+
+
+
+ HtmlCanvas + Wt::WPaintedWidget +
+
+
+
+ htmlClass + Wt::WApplication +
+
+
+
+ htmlText + Wt::WWidget +
+
+
+
+ httpPort + Wt::WServer +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_69.html b/wt-3.1.7a/doc/reference/html/search/all_69.html new file mode 100644 index 0000000..26afa83 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_69.html @@ -0,0 +1,1392 @@ + + + + + + + +
+
Loading...
+
+
+ IBeamCursor + Wt +
+
+ +
+
+ icon1 + Wt::WIconPair +
+
+
+
+ icon1Clicked + Wt::WIconPair +
+
+
+
+ icon2 + Wt::WIconPair +
+
+
+
+ icon2Clicked + Wt::WIconPair +
+
+ + +
+
+ IE6 + Wt::WEnvironment +
+
+
+
+ IE7 + Wt::WEnvironment +
+
+
+
+ IE8 + Wt::WEnvironment +
+
+
+
+ IE9 + Wt::WEnvironment +
+
+
+
+ IEMobile + Wt::WEnvironment +
+
+
+
+ Ignore + Wt +
+
+ +
+
+ Image + Wt::WPainter +
+
+
+
+ imageHeight + Wt::WVirtualImage +
+
+
+
+ imageLoaded + Wt::WImage +
+
+
+
+ imagePack + Wt::WTreeNode +
+
+
+
+ imageRef + Wt::WImage +
+
+
+
+ imageWidth + Wt::WVirtualImage +
+
+ +
+
+ implementation + Wt::WCompositeWidget +
+
+
+
+ implementJavaScript + Wt::WObject +
+
+ +
+
+ in + Wt::Http::Request +
+
+
+
+ Inch + Wt::WLength +
+
+ +
+
+ indexFromItem + Wt::WStandardItemModel +
+
+ +
+
+ Infinite + Wt::WVirtualImage +
+
+
+
+ Information + Wt +
+
+ +
+
+ initialize + Wt::WApplication +
+
+
+
+ initializeGL + Wt::WGLWidget +
+
+ +
+
+ InlineSvgVml + Wt::WPaintedWidget +
+
+ + + + + + + +
+
+ insertedId + Wt::Dbo::SqlStatement +
+
+ +
+
+ insertLayout + Wt::WBoxLayout +
+
+ + +
+
+ insertSpacing + Wt::WBoxLayout +
+
+
+
+ insertStretch + Wt::WBoxLayout +
+
+
+
+ insertString + Wt::WStringListModel +
+
+ +
+
+ Inset + Wt::WBorder +
+
+
+
+ Inside + Wt::Chart +
+
+
+
+ instance + Wt::WApplication +
+
+ +
+
+ internalId + Wt::WModelIndex +
+
+ + + +
+
+ internalPathMatches + Wt::WApplication +
+
+
+
+ internalPathNextPart + Wt::WApplication +
+
+
+
+ InternalPathRole + Wt +
+
+
+
+ internalPointer + Wt::WModelIndex +
+
+
+
+ intersects + Wt::WRectF +
+
+
+
+ interval + Wt::WTimer +
+
+
+
+ Invalid + Wt::WValidator +
+
+
+
+ invalidBlankText + Wt::WValidator +
+
+
+ +
+ +
+
+ InvalidEmpty + Wt::WValidator +
+
+ +
+
+ invalidNoMatchText + Wt::WRegExpValidator +
+
+
+
+ invalidNotADateText + Wt::WDateValidator +
+
+ +
+ +
+
+
+ invalidTooEarlyText + Wt::WDateValidator +
+
+ +
+
+ invalidTooLateText + Wt::WDateValidator +
+
+
+
+ invalidTooLongText + Wt::WLengthValidator +
+
+
+
+ invalidTooShortText + Wt::WLengthValidator +
+
+ + +
+
+ invisibleRootItem + Wt::WStandardItemModel +
+
+ +
+
+ isAncestor + Wt::WModelIndex +
+
+
+
+ isAuto + Wt::WLength +
+
+ + +
+
+ isCloseable + Wt::WMenuItem +
+
+ + + +
+
+ isColumnHidingEnabled + Wt::Ext::TableView +
+
+
+
+ isColumnResizeEnabled + Wt::WAbstractItemView +
+
+
+
+ isColumnSortable + Wt::Ext::TableView +
+
+ + +
+
+ isDefined + Wt::WCssStyleSheet +
+
+
+
+ isDirty + Wt::WBatchEditProxyModel +
+
+ +
+
+ isEditing + Wt::WAbstractItemView +
+
+ + + +
+
+ isExposed + Wt::WApplication +
+
+
+
+ isForeignKey + Wt::Dbo::FieldInfo +
+
+
+
+ isGridLinesEnabled + Wt::Chart::WAxis +
+
+ +
+
+ isHole + Wt::WAbstractArea +
+
+ +
+
+ isIdField + Wt::Dbo::FieldInfo +
+
+ + + +
+
+ isLabelsEnabled + Wt::Chart::WDataSeries +
+
+ +
+
+ isList + Wt::WContainerWidget +
+
+
+
+ isMandatory + Wt::WValidator +
+
+
+
+ isModal + Wt::WDialog +
+
+
+
+ isMutable + Wt::Dbo::FieldInfo +
+
+
+
+ isNaturalIdField + Wt::Dbo::FieldInfo +
+
+ +
+
+ ISO8601AsText + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ isOrderedList + Wt::WContainerWidget +
+
+
+
+ isPerspectiveEnabled + Wt::Chart::WPieChart +
+
+ +
+
+ isQuited + Wt::WApplication +
+
+
+
+ isReadOnly + Wt::WFormWidget +
+
+ + +
+
+ isRunning + Wt::WServer +
+
+
+
+ isSatisfiable + Wt::Http::Request::ByteRangeSpecifier +
+
+
+
+ isSelectable + Wt::WTreeNode +
+
+ +
+
+ isShadowEnabled + Wt::Chart::WPieChart +
+
+
+
+ isSingleShot + Wt::WTimer +
+
+
+
+ isSizeGripEnabled + Wt::Ext::Dialog +
+
+ +
+
+ isStacked + Wt::Chart::WDataSeries +
+
+
+
+ isString + Wt::WLogger::Field +
+
+
+
+ isSurrogateIdField + Wt::Dbo::FieldInfo +
+
+
+
+ isTabCloseable + Wt::WTabWidget +
+
+ + +
+
+ isTitleBarEnabled + Wt::WDialog +
+
+ +
+
+ isUnorderedList + Wt::WContainerWidget +
+
+
+
+ isUploaded + Wt::WFileUpload +
+
+ +
+
+ isVersionField + Wt::Dbo::FieldInfo +
+
+ +
+
+ Italic + Wt::WFont +
+
+
+
+ item + Wt::WStandardItemModel +
+
+ +
+
+ itemChanged + Wt::WStandardItemModel +
+
+
+
+ itemClosed + Wt::WMenu +
+
+
+
+ itemData + Wt::WAbstractItemModel +
+
+
+
+ ItemDataRole + Wt +
+
+ +
+
+ itemDelegateForColumn + Wt::WAbstractItemView +
+
+
+
+ ItemFlag + Wt +
+
+
+
+ itemFromIndex + Wt::WStandardItemModel +
+
+
+
+ ItemIsDirty + Wt +
+
+
+ +
+
+ +
+
+
+ ItemIsEditable + Wt +
+
+
+
+ ItemIsSelectable + Wt +
+
+
+
+ ItemIsTristate + Wt +
+
+
+ +
+
+
+ ItemIsXHTMLText + Wt +
+
+
+
+ ItemMap + Wt::WAbstractProxyModel +
+
+
+
+ itemPrototype + Wt::WStandardItemModel +
+
+ +
+
+ itemSelected + Wt::WMenu +
+
+ +
+
+ itemSelectRendered + Wt::WMenu +
+
+ +
+
+ itemWidget + Wt::WMenuItem +
+
+
+
+ iterateSeries + Wt::Chart::WChart2DRenderer +
+
+
+
+ iterator + Wt::Dbo::collection +
+
+
+
+ iterator + Wt::Dbo::collection::iterator +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6a.html b/wt-3.1.7a/doc/reference/html/search/all_6a.html new file mode 100644 index 0000000..a2f3669 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6a.html @@ -0,0 +1,223 @@ + + + + + + + +
+
Loading...
+
+
+ javaScript + Wt::WEnvironment +
+
+
+
+ javaScriptClass + Wt::WApplication +
+
+
+
+ JavaScriptMatrix4x4 + Wt::WGLWidget +
+
+ + +
+
+ joinStyle + Wt::WPen +
+
+
+
+ jsAudioRef + Wt::WHTML5Audio +
+
+
+
+ jsFlashRef + Wt::WFlashObject +
+
+
+
+ JSignal + Wt +
+
+
+
+ JSignal + Wt::JSignal +
+
+
+
+ JSignal< bool > + Wt +
+
+
+ +
+
+
+ JSignal< int > + Wt +
+
+
+ +
+ + + + + + + + +
+
+ JSignal< void > + Wt +
+
+
+
+ JSignal<> + Wt +
+
+ +
+
+ JSlot + Wt +
+
+
+
+ jsMediaRef + Wt::WHTML5Media +
+
+
+
+ jsRef + Wt::WWidget +
+
+ +
+
+ jsVideoRef + Wt::WHTML5Video +
+
+
+
+ JulianDaysAsReal + Wt::Dbo::backend::Sqlite3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6b.html b/wt-3.1.7a/doc/reference/html/search/all_6b.html new file mode 100644 index 0000000..0b2dabd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6b.html @@ -0,0 +1,426 @@ + + + + + + + +
+
Loading...
+ +
+
+ Key_A + Wt +
+
+
+
+ Key_Alt + Wt +
+
+
+
+ Key_B + Wt +
+
+
+
+ Key_Backspace + Wt +
+
+
+
+ Key_C + Wt +
+
+
+
+ Key_Control + Wt +
+
+
+
+ Key_D + Wt +
+
+
+
+ Key_Delete + Wt +
+
+
+
+ Key_Down + Wt +
+
+
+
+ Key_E + Wt +
+
+
+
+ Key_End + Wt +
+
+
+
+ Key_Enter + Wt +
+
+
+
+ Key_Escape + Wt +
+
+
+
+ Key_F + Wt +
+
+
+
+ Key_F1 + Wt +
+
+
+
+ Key_F10 + Wt +
+
+
+
+ Key_F11 + Wt +
+
+
+
+ Key_F12 + Wt +
+
+
+
+ Key_F2 + Wt +
+
+
+
+ Key_F3 + Wt +
+
+
+
+ Key_F4 + Wt +
+
+
+
+ Key_F5 + Wt +
+
+
+
+ Key_F6 + Wt +
+
+
+
+ Key_F7 + Wt +
+
+
+
+ Key_F8 + Wt +
+
+
+
+ Key_F9 + Wt +
+
+
+
+ Key_G + Wt +
+
+
+
+ Key_H + Wt +
+
+
+
+ Key_Home + Wt +
+
+
+
+ Key_I + Wt +
+
+
+
+ Key_Insert + Wt +
+
+
+
+ Key_J + Wt +
+
+
+
+ Key_K + Wt +
+
+
+
+ Key_L + Wt +
+
+
+
+ Key_Left + Wt +
+
+
+
+ Key_M + Wt +
+
+
+
+ Key_N + Wt +
+
+
+
+ Key_O + Wt +
+
+
+
+ Key_P + Wt +
+
+
+
+ Key_PageDown + Wt +
+
+
+
+ Key_PageUp + Wt +
+
+
+
+ Key_Q + Wt +
+
+
+
+ Key_R + Wt +
+
+
+
+ Key_Right + Wt +
+
+
+
+ Key_S + Wt +
+
+
+
+ Key_Shift + Wt +
+
+
+
+ Key_Space + Wt +
+
+
+
+ Key_T + Wt +
+
+
+
+ Key_Tab + Wt +
+
+
+
+ Key_U + Wt +
+
+
+
+ Key_unknown + Wt +
+
+
+
+ Key_Up + Wt +
+
+
+
+ Key_V + Wt +
+
+
+
+ Key_W + Wt +
+
+
+
+ Key_X + Wt +
+
+
+
+ Key_Y + Wt +
+
+
+
+ Key_Z + Wt +
+
+
+
+ KeyboardModifier + Wt +
+
+
+
+ keyCode + Wt::WKeyEvent +
+
+ +
+
+ keys + Wt::WMessageResourceBundle +
+
+ + +
+
+ Konqueror + Wt::WEnvironment +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6c.html b/wt-3.1.7a/doc/reference/html/search/all_6c.html new file mode 100644 index 0000000..78463cd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6c.html @@ -0,0 +1,455 @@ + + + + + + + +
+
Loading...
+ +
+
+ labelAngle + Wt::Chart::WAxis +
+
+
+
+ labelArea + Wt::WTreeNode +
+
+
+
+ labelColor + Wt::Chart::WDataSeries +
+
+
+
+ labelFont + Wt::Chart::WAxis +
+
+
+
+ labelFormat + Wt::Chart::WAxis +
+
+
+
+ labelIcon + Wt::WTreeNode +
+
+
+
+ labelInterval + Wt::Chart::WAxis +
+
+
+
+ LabelOption + Wt::Chart +
+
+
+
+ labelsColumn + Wt::Chart::WPieChart +
+
+
+
+ Large + Wt::WFont +
+
+
+
+ Larger + Wt::WFont +
+
+
+
+ lastByte + Wt::Http::Request::ByteRange +
+
+
+
+ latitude + Wt::WGoogleMap::Coordinate +
+
+ +
+
+ layoutAboutToBeChanged + Wt::WAbstractItemModel +
+
+
+
+ layoutChanged + Wt::WAbstractItemModel +
+
+
+
+ layoutSizeAware + Wt::WWidget +
+
+ +
+
+ Lazy + Wt::WTreeNode +
+
+ +
+
+ LeaveEditorsOpen + Wt::WAbstractItemView +
+
+ +
+
+ LeftButton + Wt::WMouseEvent +
+
+
+
+ LeftToRight + Wt::WBoxLayout +
+
+
+
+ lessThan + Wt::WSortFilterProxyModel +
+
+
+
+ LevelRole + Wt +
+
+ +
+
+ Lighter + Wt::WFont +
+
+
+
+ lightGray + Wt +
+
+
+
+ limit + Wt::Dbo::Query +
+
+
+
+ Line + Wt::Chart::WChart2DRenderer +
+
+
+
+ LinearScale + Wt::Chart +
+
+
+
+ LineEdit + Wt::Ext +
+
+ + +
+
+ LineSeries + Wt::Chart +
+
+
+
+ LineThrough + Wt::WCssDecorationStyle +
+
+ +
+
+ lineWidth + Wt::WGLWidget +
+
+
+
+ linkProgram + Wt::WGLWidget +
+
+
+
+ listSeparator + Wt::WSuggestionPopup::Options +
+
+
+
+ literal + Wt::WString +
+
+ + +
+
+ loadingIndicator + Wt::WApplication +
+
+ + +
+
+ LocalEncoding + Wt +
+
+
+
+ localizedStrings + Wt::WApplication +
+
+
+
+ location + Wt::Chart::WAxis +
+
+
+
+ location_ + Wt::Chart::WChart2DRenderer +
+
+
+
+ lock + Wt::SyncLock +
+
+
+
+ log + Wt::WApplication +
+
+
+
+ LogScale + Wt::Chart +
+
+
+
+ longDayName + Wt::WDate +
+
+
+
+ LongDayNames + Wt::WCalendar +
+
+
+
+ longitude + Wt::WGoogleMap::Coordinate +
+
+
+
+ longMonthName + Wt::WDate +
+
+
+
+ lookAt + Wt::WMatrix4x4 +
+
+
+
+ Loop + Wt::WHTML5Media +
+
+
+
+ loops + Wt::WSound +
+
+
+
+ LowQualityShadows + Wt::WPainter +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6d.html b/wt-3.1.7a/doc/reference/html/search/all_6d.html new file mode 100644 index 0000000..2de4d7d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6d.html @@ -0,0 +1,859 @@ + + + + + + + +
+
Loading...
+
+
+ m11 + Wt::WTransform +
+
+
+
+ m12 + Wt::WTransform +
+
+
+
+ m13 + Wt::WTransform +
+
+
+
+ m21 + Wt::WTransform +
+
+
+
+ m22 + Wt::WTransform +
+
+
+
+ m23 + Wt::WTransform +
+
+
+
+ m31 + Wt::WTransform +
+
+
+
+ m32 + Wt::WTransform +
+
+
+
+ m33 + Wt::WTransform +
+
+
+
+ magenta + Wt +
+
+
+
+ makeAbsoluteUrl + Wt::WApplication +
+
+
+
+ makeStaticModel + Wt::WStaticModelView +
+
+
+
+ ManyToMany + Wt::Dbo +
+
+
+
+ ManyToOne + Wt::Dbo +
+
+ +
+
+ map1 + Wt::WSignalMapper +
+
+
+
+ mapClass + Wt::Dbo::Session +
+
+
+
+ mapConnect + Wt::WSignalMapper +
+
+
+
+ mapConnect1 + Wt::WSignalMapper +
+
+ + +
+
+ mapped + Wt::WSignalMapper +
+
+ + +
+
+ MapTypeControl + Wt::WGoogleMap +
+
+ +
+
+ marker + Wt::Chart::WDataSeries +
+
+
+
+ markerBrush + Wt::Chart::WDataSeries +
+
+
+ +
+
+
+ markerPen + Wt::Chart::WDataSeries +
+
+
+ +
+
+
+ markerSize + Wt::Chart::WDataSeries +
+
+
+
+ MarkerType + Wt::Chart +
+
+
+
+ match + Wt::WAbstractItemModel +
+
+
+ +
+
+ +
+
+
+ MatchEndsWith + Wt +
+
+
+
+ MatchExactly + Wt +
+
+
+
+ MatchFlag + Wt +
+
+
+
+ MatchRegExp + Wt +
+
+
+
+ MatchStartsWith + Wt +
+
+
+ +
+
+
+ MatchTypeMask + Wt +
+
+
+
+ MatchWildCard + Wt +
+
+
+
+ MatchWrap + Wt +
+
+ + +
+
+ maximumLength + Wt::WLengthValidator +
+
+
+
+ maximumRequestSize + Wt::WApplication +
+
+
+
+ MaximumValue + Wt::Chart +
+
+
+
+ MaximumValueFill + Wt::Chart +
+
+ + +
+
+ maxWidth + Wt::Ext::ToolTipConfig +
+
+ +
+
+ Menu + Wt::Ext +
+
+ +
+
+ MenuControl + Wt::WGoogleMap +
+
+
+
+ MenuItem + Wt::Ext +
+
+ + +
+
+ MessageBox + Wt::Ext +
+
+
+
+ MessageLocation + Wt::Ext::FormField +
+
+
+
+ messageResourceBundle + Wt::WApplication +
+
+
+
+ MetaHeaderType + Wt +
+
+
+
+ MetaHttpHeader + Wt +
+
+ +
+
+ MetaModifier + Wt +
+
+
+
+ MetaName + Wt +
+
+ +
+
+ MiddleButton + Wt::WMouseEvent +
+
+
+
+ Millimeter + Wt::WLength +
+
+ + + +
+
+ minimumLength + Wt::WLengthValidator +
+
+
+
+ MinimumValue + Wt::Chart +
+
+
+
+ MinimumValueFill + Wt::Chart +
+
+ +
+
+ minute + Wt::WTime +
+
+
+
+ minWidth + Wt::Ext::ToolTipConfig +
+
+
+
+ MiterJoin + Wt +
+
+
+
+ MobileWebKit + Wt::WEnvironment +
+
+
+
+ MobileWebKitAndroid + Wt::WEnvironment +
+
+
+
+ MobileWebKitiPhone + Wt::WEnvironment +
+
+ + +
+
+ modelColumn + Wt::Chart::WDataSeries +
+
+ + + + + + +
+
+ modified + Wt::WCssRule +
+
+ +
+
+ modify + Wt::Dbo::ptr +
+
+
+
+ Monospace + Wt::WFont +
+
+
+
+ month + Wt::WDate +
+
+ +
+
+ mouseEvent + Wt::WDropEvent +
+
+ + + + + + +
+
+ MoveAction + Wt +
+
+ +
+
+ msec + Wt::WTime +
+
+
+
+ msecsTo + Wt::WTime +
+
+
+
+ multiple + Wt::WFileUpload +
+
+
+
+ MultipleEditors + Wt::WAbstractItemView +
+
+
+
+ Mutable + Wt::Dbo::FieldInfo +
+
+
+
+ Muted + Wt::Chart::WStandardPalette +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6e.html b/wt-3.1.7a/doc/reference/html/search/all_6e.html new file mode 100644 index 0000000..9c95f44 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6e.html @@ -0,0 +1,258 @@ + + + + + + + +
+
Loading...
+ + +
+
+ NaturalId + Wt::Dbo::FieldInfo +
+
+ +
+
+ Neutral + Wt::Chart::WStandardPalette +
+
+
+
+ newValue + Wt::Chart::SeriesIterator +
+
+
+
+ nextAfterHide + Wt::WMenu +
+
+
+
+ NextLevelLoading + Wt::WTreeNode +
+
+
+
+ nextRow + Wt::Dbo::SqlStatement +
+
+
+
+ No + Wt +
+
+
+
+ NoAll + Wt +
+
+
+
+ NoBrush + Wt +
+
+ +
+
+ NoControl + Wt::WGoogleMap +
+
+
+
+ NoEditTrigger + Wt::WAbstractItemView +
+
+
+
+ NoFill + Wt::Chart +
+
+
+
+ NoIcon + Wt +
+
+
+
+ NoLabels + Wt::Chart +
+
+
+
+ NoMarker + Wt::Chart +
+
+
+
+ NoModifier + Wt +
+
+ +
+
+ NoPen + Wt +
+
+
+
+ NoRepeat + Wt::WCssDecorationStyle +
+
+ +
+
+ normalized + Wt::WRectF +
+
+
+
+ NormalStyle + Wt::WFont +
+
+
+
+ NormalVariant + Wt::WFont +
+
+
+
+ NormalWeight + Wt::WFont +
+
+
+
+ North + Wt::WBorderLayout +
+
+
+
+ NoSelection + Wt +
+
+
+
+ NoTicks + Wt::WSlider +
+
+
+
+ notify + Wt::WApplication +
+
+
+
+ NoUniqueResultException + Wt::Dbo::NoUniqueResultException +
+
+
+
+ NoUniqueResultException + Wt::Dbo +
+
+
+
+ NumberField + Wt::Ext +
+
+
+
+ NumberField + Wt::Ext::NumberField +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_6f.html b/wt-3.1.7a/doc/reference/html/search/all_6f.html new file mode 100644 index 0000000..8cf3e8d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_6f.html @@ -0,0 +1,460 @@ + + + + + + + +
+
Loading...
+
+
+ objectName + Wt::WObject +
+
+
+
+ ObjectNotFoundException + Wt::Dbo::ObjectNotFoundException +
+
+
+
+ ObjectNotFoundException + Wt::Dbo +
+
+
+
+ Oblique + Wt::WFont +
+
+ +
+
+ offsetX + Wt::WShadow +
+
+
+
+ offsetY + Wt::WShadow +
+
+
+
+ Ok + Wt +
+
+
+
+ OpenHandCursor + Wt +
+
+
+
+ openInfoWindow + Wt::WGoogleMap +
+
+
+
+ Opera + Wt::WEnvironment +
+
+ +
+
+ operator collection< Result > + Wt::Dbo::Query +
+
+
+
+ operator Result + Wt::Dbo::Query +
+
+ + + + + + + + +
+
+ operator-= + Wt::WGenericMatrix +
+
+ +
+
+ operator/ + Wt +
+
+
+
+ operator/= + Wt::WGenericMatrix +
+
+ + + + + + + +
+
+ Options + Wt::WSuggestionPopup +
+
+
+
+ Options + Wt::WHTML5Media +
+
+
+
+ orderBy + Wt::Dbo::Query +
+
+
+
+ OrdinateAxis + Wt::Chart +
+
+ +
+
+ out + Wt::Http::Response +
+
+
+
+ Outset + Wt::WBorder +
+
+
+
+ Outside + Wt::Chart +
+
+
+
+ Overflow + Wt::WContainerWidget +
+
+
+
+ OverflowAuto + Wt::WContainerWidget +
+
+
+
+ OverflowHidden + Wt::WContainerWidget +
+
+
+
+ OverflowScroll + Wt::WContainerWidget +
+
+
+
+ OverflowVisible + Wt::WContainerWidget +
+
+
+
+ Overline + Wt::WCssDecorationStyle +
+
+
+
+ wstring + Wt::WString +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_70.html b/wt-3.1.7a/doc/reference/html/search/all_70.html new file mode 100644 index 0000000..8013ef5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_70.html @@ -0,0 +1,653 @@ + + + + + + + +
+
Loading...
+
+
+ p1 + Wt::WLineF +
+
+
+
+ p2 + Wt::WLineF +
+
+ +
+
+ pageChanged + Wt::WAbstractItemView +
+
+ + +
+
+ PagingToolBar + Wt::Ext +
+
+ +
+
+ PAINT_GL + Wt::WGLWidget +
+
+ + + +
+
+ PaintFlag + Wt +
+
+
+
+ paintGL + Wt::WGLWidget +
+
+
+
+ PaintUpdate + Wt +
+
+
+
+ palette + Wt::Chart::WAbstractChart +
+
+
+
+ Panel + Wt::Ext +
+
+ +
+
+ panTo + Wt::WGoogleMap +
+
+
+
+ ParameterMap + Wt::Http +
+
+
+
+ ParameterValues + Wt::Http +
+
+ + +
+
+ parentNode + Wt::WTreeNode +
+
+
+
+ parentWidget + Wt::WLayoutItemImpl +
+
+
+
+ parse + Wt::WDateValidator +
+
+
+
+ PartiallyChecked + Wt +
+
+ +
+
+ path + Wt::Http::Request +
+
+ + +
+
+ pause + Wt::WHTML5Media +
+
+ +
+
+ PenCapStyle + Wt +
+
+
+
+ PenJoinStyle + Wt +
+
+
+
+ PenStyle + Wt +
+
+
+
+ Percentage + Wt::WLength +
+
+
+
+ perspective + Wt::WMatrix4x4 +
+
+
+
+ Pica + Wt::WLength +
+
+
+
+ Pixel + Wt::WLength +
+
+
+
+ pixelStorei + Wt::WGLWidget +
+
+
+
+ PlainText + Wt +
+
+
+
+ PlainToolTip + Wt::Ext::FormField +
+
+ +
+
+ playbackPaused + Wt::WHTML5Media +
+
+
+
+ playbackStarted + Wt::WHTML5Media +
+
+
+
+ playing + Wt::WHTML5Media +
+
+
+
+ plotAreaPadding + Wt::Chart::WAbstractChart +
+
+
+
+ PngImage + Wt::WPaintedWidget +
+
+
+
+ Point + Wt::WLength +
+
+
+ +
+
+
+ points + Wt::WPolygonArea +
+
+
+
+ PointSeries + Wt::Chart +
+
+
+
+ polygonOffset + Wt::WGLWidget +
+
+
+
+ populate + Wt::WTreeNode +
+
+
+
+ populated + Wt::WTreeNode +
+
+ +
+
+ popupMenu + Wt::WPopupMenuItem +
+
+
+
+ PopupTrigger + Wt::WSuggestionPopup +
+
+ +
+
+ positionAt + Wt::WWidget +
+
+ +
+
+ Postgres + Wt::Dbo::backend +
+
+ +
+
+ preferredMethod + Wt::WPaintedWidget +
+
+
+
+ PreloadAuto + Wt::WHTML5Media +
+
+ +
+
+ PreloadMetadata + Wt::WHTML5Media +
+
+ +
+
+ PreloadNone + Wt::WHTML5Media +
+
+
+
+ prepareAxes + Wt::Chart::WChart2DRenderer +
+
+ +
+
+ preventDefaultAction + Wt::EventSignalBase +
+
+
+
+ preventPropagation + Wt::EventSignalBase +
+
+
+
+ processEvents + Wt::WApplication +
+
+
+
+ progressBar + Wt::WFileUpload +
+
+
+
+ progressCompleted + Wt::WProgressBar +
+
+ +
+
+ ProgressDialog + Wt::Ext +
+
+
+
+ prompt + Wt::Ext::MessageBox +
+
+ +
+
+ propagationPrevented + Wt::EventSignalBase +
+
+
+
+ property + Wt::Dbo::SqlConnection +
+
+
+
+ ptr + Wt::Dbo +
+
+ +
+
+ ptr_tuple + Wt::Dbo +
+
+
+
+ purge + Wt::Dbo::ptr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_71.html b/wt-3.1.7a/doc/reference/html/search/all_71.html new file mode 100644 index 0000000..2c7c738 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_71.html @@ -0,0 +1,94 @@ + + + + + + + +
+
Loading...
+ +
+
+ qualifier + Wt::Dbo::FieldInfo +
+
+
+
+ Query + Wt::Dbo +
+
+ +
+
+ Query< Result > + Wt::Dbo +
+
+
+
+ query_result_traits + Wt::Dbo +
+
+
+
+ QueryModel + Wt::Dbo::QueryModel +
+
+
+
+ QueryModel + Wt::Dbo +
+
+
+
+ queryString + Wt::Http::Request +
+
+
+
+ Question + Wt +
+
+
+
+ quit + Wt::WApplication +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_72.html b/wt-3.1.7a/doc/reference/html/search/all_72.html new file mode 100644 index 0000000..24670c9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_72.html @@ -0,0 +1,946 @@ + + + + + + + +
+
Loading...
+
+
+ RadioButton + Wt::Ext +
+
+ +
+
+ radius + Wt::WCircleArea +
+
+ + + +
+
+ redirect + Wt::WApplication +
+
+
+
+ redrawAll + Wt::WVirtualImage +
+
+ +
+
+ referer + Wt::WEnvironment +
+
+ +
+
+ regExp + Wt::WRegExpValidator +
+
+
+
+ RegExpFlag + Wt +
+
+
+
+ registerType + Wt +
+
+ + +
+
+ rejectWhenEscapePressed + Wt::WDialog +
+
+
+
+ RelationType + Wt::Dbo +
+
+
+
+ Relative + Wt +
+
+
+
+ reload + Wt::Dbo::QueryModel +
+
+ + + + +
+
+ removeChild + Wt::WObject +
+
+
+
+ removeChildNode + Wt::WTreeNode +
+
+ + +
+
+ removeEdit + Wt::WSuggestionPopup +
+
+
+
+ removeFooterButton + Wt::Ext::Panel +
+
+ +
+
+ removeMapping + Wt::WSignalMapper +
+
+ + +
+
+ removeRule + Wt::WCssStyleSheet +
+
+
+
+ removeScript + Wt::WWebWidget +
+
+
+
+ removeSeries + Wt::Chart::WCartesianChart +
+
+ + + + +
+
+ renderAsList + Wt::WMenu +
+
+
+
+ renderAxes + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderAxis + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderBackground + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderCell + Wt::WCalendar +
+
+ +
+
+ RenderEditing + Wt +
+
+
+
+ RenderFocused + Wt +
+
+
+
+ renderHidden + Wt::WMenuItem +
+
+
+
+ RenderHint + Wt::WPainter +
+
+
+
+ renderHints + Wt::WPainter +
+
+
+
+ RenderInvalid + Wt +
+
+
+
+ renderLabel + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderLegend + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderLegendIcon + Wt::Chart::WCartesianChart +
+
+
+
+ renderLegendItem + Wt::Chart::WCartesianChart +
+
+ +
+
+ renderSeries + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderTemplate + Wt::WTemplate +
+
+ +
+
+ repaintSlot + Wt::WGLWidget +
+
+
+
+ Repeat + Wt::WCssDecorationStyle +
+
+
+
+ RepeatX + Wt::WCssDecorationStyle +
+
+
+
+ RepeatXY + Wt::WCssDecorationStyle +
+
+
+
+ RepeatY + Wt::WCssDecorationStyle +
+
+
+
+ Request + Wt::Http +
+
+
+
+ requestTooLarge + Wt::WApplication +
+
+
+
+ require + Wt::WApplication +
+
+
+
+ reread + Wt::Dbo::ptr +
+
+
+
+ rereadAll + Wt::Dbo::Session +
+
+ +
+
+ resetLearnedSlot + Wt::WObject +
+
+
+
+ resetLearnedSlots + Wt::WObject +
+
+
+
+ resetTransform + Wt::WPainter +
+
+ +
+
+ RESIZE_GL + Wt::WGLWidget +
+
+
+
+ resizeColumnsToContents + Wt::Ext::TableView +
+
+
+
+ resizeGL + Wt::WGLWidget +
+
+
+
+ resizeImage + Wt::WVirtualImage +
+
+
+
+ resolve + Wt::WTemplate +
+
+ +
+
+ resolveString + Wt::WTemplate +
+
+
+
+ resolveWidget + Wt::WTemplate +
+
+ +
+
+ resourcesUrl + Wt::WApplication +
+
+
+
+ Response + Wt::Http +
+
+
+
+ ResponseContinuation + Wt::Http +
+
+
+
+ restart + Wt::WServer +
+
+
+
+ restore + Wt::WPainter +
+
+ +
+
+ resultList + Wt::Dbo::Query +
+
+ +
+
+ resultValue + Wt::Dbo::Query +
+
+
+
+ Retry + Wt +
+
+ +
+
+ returnToSavedPosition + Wt::WGoogleMap +
+
+
+
+ revertAll + Wt::WBatchEditProxyModel +
+
+
+
+ Ridge + Wt::WBorder +
+
+ +
+
+ RightButton + Wt::WMouseEvent +
+
+
+
+ RightToLeft + Wt::WBoxLayout +
+
+
+
+ rollback + Wt::Dbo::Transaction +
+
+ +
+
+ root + Wt::WApplication +
+
+
+
+ rootIndex + Wt::WAbstractItemView +
+
+
+
+ rootIsDecorated + Wt::WTreeView +
+
+ +
+
+ rotateRadians + Wt::WTransform +
+
+
+
+ rotation + Wt::WGestureEvent +
+
+
+
+ RoundCap + Wt +
+
+
+
+ RoundJoin + Wt +
+
+ +
+
+ rowAt + Wt::WTable +
+
+ +
+
+ rowHeight + Wt::WAbstractItemView +
+
+
+
+ rowIsResizable + Wt::WGridLayout +
+
+
+
+ rowNum + Wt::WTableRow +
+
+
+
+ rows + Wt::WTextArea +
+
+
+
+ rowsAboutToBeInserted + Wt::WAbstractItemModel +
+
+
+
+ rowsAboutToBeRemoved + Wt::WAbstractItemModel +
+
+
+
+ rowsInserted + Wt::WAbstractItemModel +
+
+
+
+ rowSpan + Wt::WTableCell +
+
+
+
+ rowsRemoved + Wt::WAbstractItemModel +
+
+
+
+ rowStretch + Wt::WGridLayout +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_73.html b/wt-3.1.7a/doc/reference/html/search/all_73.html new file mode 100644 index 0000000..dc2a3da --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_73.html @@ -0,0 +1,4366 @@ + + + + + + + +
+
Loading...
+
+
+ sactivated + Wt::WComboBox +
+
+
+
+ Safari + Wt::WEnvironment +
+
+
+
+ Safari3 + Wt::WEnvironment +
+
+
+
+ Safari4 + Wt::WEnvironment +
+
+
+
+ sampleCoverage + Wt::WGLWidget +
+
+
+
+ SansSerif + Wt::WFont +
+
+
+
+ save + Wt::WPainter +
+
+
+
+ saveButton + Wt::WInPlaceEdit +
+
+
+
+ savePosition + Wt::WGoogleMap +
+
+
+
+ saveStatement + Wt::Dbo::SqlConnection +
+
+
+
+ SaveWhenClosed + Wt::WAbstractItemView +
+
+ +
+
+ ScatterPlot + Wt::Chart +
+
+
+
+ scissor + Wt::WGLWidget +
+
+
+
+ Scope + Wt::WMessageResourceBundle +
+
+ +
+
+ scroll + Wt::WVirtualImage +
+
+
+
+ ScrollBarAlwaysOff + Wt::WScrollArea +
+
+
+
+ ScrollBarAlwaysOn + Wt::WScrollArea +
+
+
+
+ ScrollBarAsNeeded + Wt::WScrollArea +
+
+
+
+ ScrollBarPolicy + Wt::WScrollArea +
+
+
+
+ scrolled + Wt::WContainerWidget +
+
+
+
+ scrollTo + Wt::WVirtualImage +
+
+
+
+ scrollX + Wt::WScrollEvent +
+
+
+
+ scrollY + Wt::WScrollEvent +
+
+
+
+ second + Wt::WTime +
+
+ +
+
+ Segment + Wt::WPainterPath +
+
+
+
+ segmentMargin + Wt::Chart::WChart2DRenderer +
+
+ + +
+
+ selectedButtonIndex + Wt::WButtonGroup +
+
+
+
+ SelectedClicked + Wt::WAbstractItemView +
+
+ +
+
+ selectedNodes + Wt::WTree +
+
+
+
+ selectedRows + Wt::Ext::TableView +
+
+ + + + +
+
+ SelectionFlag + Wt +
+
+ +
+
+ selectionModel + Wt::WAbstractItemView +
+
+ +
+
+ SelectItems + Wt +
+
+
+
+ selector + Wt::WCssRule +
+
+
+
+ SelectRows + Wt +
+
+ +
+
+ Sep + Wt::WLogger +
+
+
+
+ sep + Wt::WLogger +
+
+ +
+
+ SeriesIterator + Wt::Chart +
+
+
+
+ SeriesType + Wt::Chart +
+
+
+
+ Serif + Wt::WFont +
+
+
+
+ server + Wt::WEnvironment +
+
+
+
+ serverAdmin + Wt::WEnvironment +
+
+
+
+ serverName + Wt::Http::Request +
+
+
+
+ serverPort + Wt::Http::Request +
+
+
+
+ ServerSide + Wt::Ext +
+
+
+
+ serverSignature + Wt::WEnvironment +
+
+
+
+ serverSoftware + Wt::WEnvironment +
+
+
+
+ Session + Wt::Dbo +
+
+ + +
+
+ setAccept + Wt::Test::WTestEnvironment +
+
+
+
+ setAjax + Wt::Test::WTestEnvironment +
+
+
+
+ setAjaxMethod + Wt::WApplication +
+
+ + + +
+
+ setAnimate + Wt::Ext::Panel +
+
+ +
+
+ setAutoExpandColumn + Wt::Ext::TableView +
+
+
+
+ setAutoLimits + Wt::Chart::WAxis +
+
+
+
+ setAutoScrollBars + Wt::Ext::Panel +
+
+
+
+ setBackground + Wt::Chart::WAbstractChart +
+
+
+
+ setBackgroundColor + Wt::WCssDecorationStyle +
+
+ +
+
+ setBarMargin + Wt::Chart::WCartesianChart +
+
+
+
+ setBarWidth + Wt::Chart::WDataSeries +
+
+
+
+ setBatchSize + Wt::Dbo::QueryModel +
+
+
+
+ setBlur + Wt::WShadow +
+
+
+
+ setBodyClass + Wt::WApplication +
+
+ + +
+
+ setBottomToolBar + Wt::Ext::Panel +
+
+
+
+ setBreak + Wt::Chart::WAxis +
+
+ + +
+
+ setBufferSize + Wt::WFileResource +
+
+ +
+
+ setButtonsEnabled + Wt::WInPlaceEdit +
+
+
+
+ setCancelButtonText + Wt::Ext::ProgressDialog +
+
+
+
+ setCapStyle + Wt::WPen +
+
+
+
+ setCaption + Wt::WDialog +
+
+ +
+
+ setCentralWidget + Wt::WPanel +
+
+ + + +
+
+ setCheckedButton + Wt::WButtonGroup +
+
+ + +
+
+ setChildCountPolicy + Wt::WTreeNode +
+
+
+
+ setChildrenDecorated + Wt::WTreeNode +
+
+ +
+
+ setClientAddress + Wt::Test::WTestEnvironment +
+
+
+
+ setClientSideLookAtHandler + Wt::WGLWidget +
+
+
+
+ setClientSideWalkHandler + Wt::WGLWidget +
+
+
+
+ setClipPath + Wt::WPainter +
+
+
+
+ setClipping + Wt::WPainter +
+
+
+
+ setCloseable + Wt::WMenuItem +
+
+ + + +
+
+ setColumn1Fixed + Wt::WTreeView +
+
+ + +
+
+ setColumnCount + Wt::WStandardItem +
+
+
+
+ setColumnFlags + Wt::Dbo::QueryModel +
+
+
+
+ setColumnFormat + Wt::WTreeView +
+
+ +
+
+ setColumnResizable + Wt::WGridLayout +
+
+
+
+ setColumnResizeEnabled + Wt::WAbstractItemView +
+
+
+
+ setColumns + Wt::WTextArea +
+
+
+
+ setColumnsMovable + Wt::Ext::TableView +
+
+
+
+ setColumnSortable + Wt::Ext::TableView +
+
+
+
+ setColumnSpan + Wt::WTableCell +
+
+
+
+ setColumnStretch + Wt::WGridLayout +
+
+
+
+ setColumnWidget + Wt::WTreeTableNode +
+
+ +
+
+ setConfirmCloseMessage + Wt::WApplication +
+
+
+
+ setConnection + Wt::Dbo::Session +
+
+
+
+ setConnectionPool + Wt::Dbo::Session +
+
+
+
+ setContentAlignment + Wt::WContainerWidget +
+
+
+
+ setContentLength + Wt::Http::Response +
+
+
+
+ setContentsMargins + Wt::WLayout +
+
+
+
+ setContentType + Wt::Test::WTestEnvironment +
+
+
+
+ setCookie + Wt::WApplication +
+
+
+
+ setCookies + Wt::Test::WTestEnvironment +
+
+
+
+ setCssTheme + Wt::WApplication +
+
+
+
+ setCurrentCell + Wt::Ext::TableView +
+
+ + + + +
+
+ setCustomFlags + Wt::Chart::WDataSeries +
+
+ +
+
+ setDataColumn + Wt::Chart::WPieChart +
+
+ + +
+
+ setDateTimeStorage + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ setDayOfWeekLength + Wt::WCalendar +
+
+
+
+ setDecimalPrecision + Wt::Ext::NumberField +
+
+ +
+
+ setDefault + Wt::Ext::Button +
+
+
+
+ setDefaultButton + Wt::Ext::Dialog +
+
+
+
+ setDefaultIndex + Wt::WSuggestionPopup +
+
+
+
+ setDirection + Wt::WBoxLayout +
+
+
+
+ setDirtyIndication + Wt::WBatchEditProxyModel +
+
+ +
+
+ setDisplayLabels + Wt::Chart::WPieChart +
+
+
+
+ setDpiScale + Wt::Test::WTestEnvironment +
+
+
+
+ setDragEnabled + Wt::WAbstractItemView +
+
+
+
+ setDraggable + Wt::WInteractWidget +
+
+
+
+ setDropsEnabled + Wt::WAbstractItemView +
+
+
+
+ setDynamicSortFilter + Wt::WSortFilterProxyModel +
+
+ +
+
+ setEditable + Wt::Ext::ComboBox +
+
+
+
+ setEditOptions + Wt::WAbstractItemView +
+
+
+
+ setEditor + Wt::Ext::TableView +
+
+ +
+
+ setEditTriggers + Wt::WAbstractItemView +
+
+ +
+
+ setEnableAlignments + Wt::Ext::TextEdit +
+
+
+
+ setEnableColors + Wt::Ext::TextEdit +
+
+ +
+
+ setEnableFont + Wt::Ext::TextEdit +
+
+
+
+ setEnableFormat + Wt::Ext::TextEdit +
+
+ +
+
+ setEnableLists + Wt::Ext::TextEdit +
+
+
+
+ setEnableSourceEdit + Wt::Ext::TextEdit +
+
+
+
+ setErrorMessageLocation + Wt::Ext::FormField +
+
+
+
+ setExpanded + Wt::WTreeView +
+
+
+
+ setExplode + Wt::Chart::WPieChart +
+
+
+
+ setExtraPlugins + Wt::WTextEdit +
+
+
+
+ setFamily + Wt::WFont +
+
+
+
+ setFile + Wt::WLogger +
+
+
+
+ setFileName + Wt::WFileResource +
+
+
+
+ setFileTextSize + Wt::WFileUpload +
+
+
+
+ setFillRange + Wt::Chart::WDataSeries +
+
+
+
+ setFilterColumn + Wt::Ext::DataStore +
+
+
+
+ setFilterFlags + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterKeyColumn + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterLength + Wt::WSuggestionPopup +
+
+
+
+ setFilterRegExp + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterRole + Wt::WSortFilterProxyModel +
+
+
+
+ setFirstDayOfWeek + Wt::WCalendar +
+
+ +
+
+ setFlashParameter + Wt::WFlashObject +
+
+
+
+ setFlashVariable + Wt::WFlashObject +
+
+ + + +
+
+ setForegroundColor + Wt::WCssDecorationStyle +
+
+ +
+
+ setFormats + Wt::WDateValidator +
+
+ +
+
+ setGridLinesEnabled + Wt::Chart::WAxis +
+
+
+
+ setGridLinesPen + Wt::Chart::WAxis +
+
+
+
+ setHandleWidth + Wt::Ext::Splitter +
+
+
+
+ setHeaderAlignment + Wt::WAbstractItemView +
+
+
+
+ setHeaderCount + Wt::WTable +
+
+ + +
+
+ setHeaderValue + Wt::Test::WTestEnvironment +
+
+ + + +
+
+ setHighlightMouseOver + Wt::Ext::TableView +
+
+
+
+ setHint + Wt::WLayoutItemImpl +
+
+
+
+ setHMS + Wt::WTime +
+
+
+
+ setHole + Wt::WAbstractArea +
+
+
+
+ setHorizontalHeaderFormat + Wt::WCalendar +
+
+
+
+ setHorizontalScrollBarPolicy + Wt::WScrollArea +
+
+
+
+ setHorizontalSpacing + Wt::WGridLayout +
+
+
+
+ setHostName + Wt::Test::WTestEnvironment +
+
+
+
+ setHtmlClass + Wt::WApplication +
+
+ + + +
+
+ setImagePack + Wt::WTreeNode +
+
+
+
+ setImageRef + Wt::WImage +
+
+
+
+ setImplementation + Wt::WCompositeWidget +
+
+ +
+
+ setInteractive + Wt::WTreeNode +
+
+ + + +
+
+ setInterval + Wt::WTimer +
+
+
+
+ setInvalidBlankText + Wt::WValidator +
+
+
+
+ setInvalidNoMatchText + Wt::WRegExpValidator +
+
+
+
+ setInvalidNotADateText + Wt::WDateValidator +
+
+ +
+
+ setInvalidTooEarlyText + Wt::WDateValidator +
+
+ +
+
+ setInvalidTooLateText + Wt::WDateValidator +
+
+
+
+ setInvalidTooLongText + Wt::WLengthValidator +
+
+
+
+ setInvalidTooShortText + Wt::WLengthValidator +
+
+ +
+
+ setItem + Wt::WStandardItemModel +
+
+
+
+ setItemData + Wt::WAbstractItemModel +
+
+
+
+ setItemDelegate + Wt::WAbstractItemView +
+
+
+
+ setItemDelegateForColumn + Wt::WAbstractItemView +
+
+ + +
+
+ setItemPrototype + Wt::WStandardItemModel +
+
+ +
+
+ setJavaScript + Wt::JSlot +
+
+
+
+ setJavaScriptMatrix4 + Wt::WGLWidget +
+
+ +
+
+ setJoinStyle + Wt::WPen +
+
+
+
+ setLabelAngle + Wt::Chart::WAxis +
+
+
+
+ setLabelColor + Wt::Chart::WDataSeries +
+
+
+
+ setLabelFont + Wt::Chart::WAxis +
+
+
+
+ setLabelFormat + Wt::Chart::WAxis +
+
+
+
+ setLabelIcon + Wt::WTreeNode +
+
+
+
+ setLabelInterval + Wt::Chart::WAxis +
+
+
+
+ setLabelsColumn + Wt::Chart::WPieChart +
+
+
+
+ setLabelsEnabled + Wt::Chart::WDataSeries +
+
+
+
+ setLatitude + Wt::WGoogleMap::Coordinate +
+
+ +
+
+ setLayoutHint + Wt::WLayout +
+
+
+
+ setLayoutInParent + Wt::WLayout +
+
+
+
+ setLayoutSizeAware + Wt::WWidget +
+
+ + +
+
+ setLinkDefault + Wt::Ext::TextEdit +
+
+
+
+ setList + Wt::WContainerWidget +
+
+
+
+ setLoadingIndicator + Wt::WApplication +
+
+
+
+ setLoadLaterWhenInvisible + Wt::WWebWidget +
+
+
+
+ setLoadPolicy + Wt::WTreeNode +
+
+ +
+
+ setLocalizedStrings + Wt::WApplication +
+
+
+
+ setLocation + Wt::Chart::WAxis +
+
+
+
+ setLongitude + Wt::WGoogleMap::Coordinate +
+
+
+
+ setLoops + Wt::WSound +
+
+
+
+ setMandatory + Wt::WValidator +
+
+
+
+ setMapping + Wt::WSignalMapper +
+
+
+
+ setMapTypeControl + Wt::WGoogleMap +
+
+ +
+
+ setMarker + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerBrush + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerPen + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerSize + Wt::Chart::WDataSeries +
+
+ +
+
+ setMaximumLength + Wt::WLengthValidator +
+
+ + +
+
+ setMenu + Wt::Ext::AbstractButton +
+
+ + + +
+
+ setMinimumLength + Wt::WLengthValidator +
+
+ +
+
+ setMinQueryLength + Wt::Ext::ComboBox +
+
+
+
+ setModal + Wt::WDialog +
+
+ + + +
+
+ setMultiple + Wt::WFileUpload +
+
+
+
+ setMultipleSelection + Wt::WCalendar +
+
+
+
+ setName + Wt::WColor +
+
+
+
+ setNewRowData + Wt::WBatchEditProxyModel +
+
+
+
+ setNewRowFlags + Wt::WBatchEditProxyModel +
+
+
+
+ setNodeVisible + Wt::WTreeNode +
+
+
+
+ setNoMatchText + Wt::WRegExpValidator +
+
+
+
+ setObjectName + Wt::WObject +
+
+ +
+
+ setOptions + Wt::WHTML5Media +
+
+ +
+
+ setOverflow + Wt::WContainerWidget +
+
+ + + +
+
+ setPalette + Wt::Chart::WAbstractChart +
+
+
+
+ setParameterMap + Wt::Test::WTestEnvironment +
+
+ + +
+
+ setPathComponent + Wt::WMenuItem +
+
+ +
+
+ setPerspectiveEnabled + Wt::Chart::WPieChart +
+
+
+
+ setPixel + Wt::WRasterImage +
+
+
+
+ setPlotAreaPadding + Wt::Chart::WAbstractChart +
+
+ + +
+
+ setPopupMenu + Wt::WPopupMenuItem +
+
+
+
+ setPopupVisible + Wt::WDatePicker +
+
+ +
+
+ setPosixTime + Wt::WDateTime +
+
+
+
+ setPoster + Wt::WHTML5Video +
+
+
+
+ setPreferredMethod + Wt::WPaintedWidget +
+
+
+
+ setPreloadMode + Wt::WHTML5Media +
+
+
+
+ setProgressBar + Wt::WFileUpload +
+
+
+
+ setProperty + Wt::Dbo::SqlConnection +
+
+
+
+ setQualifier + Wt::Dbo::FieldInfo +
+
+
+
+ setQuery + Wt::Dbo::QueryModel +
+
+
+
+ setQueryDelay + Wt::Ext::ComboBox +
+
+
+
+ setRadius + Wt::WCircleArea +
+
+ +
+
+ setReadOnly + Wt::WFormWidget +
+
+ +
+
+ setReferer + Wt::Test::WTestEnvironment +
+
+
+
+ setRefInternalPath + Wt::WAnchor +
+
+
+
+ setRegExp + Wt::WRegExpValidator +
+
+
+
+ setRenderAsList + Wt::WMenu +
+
+
+
+ setRenderer + Wt::Ext::TableView +
+
+
+
+ setRenderHint + Wt::WPainter +
+
+ + +
+
+ setRgb + Wt::WColor +
+
+
+
+ setRootIndex + Wt::WAbstractItemView +
+
+
+
+ setRootIsDecorated + Wt::WTreeView +
+
+
+
+ setRowCount + Wt::WStandardItem +
+
+ +
+
+ setRowResizable + Wt::WGridLayout +
+
+
+
+ setRows + Wt::WTextArea +
+
+
+
+ setRowSpan + Wt::WTableCell +
+
+
+
+ setRowStretch + Wt::WGridLayout +
+
+
+
+ setSatisfiable + Wt::Http::Request::ByteRangeSpecifier +
+
+
+
+ setScale + Wt::Chart::WAxis +
+
+
+
+ setScrollBarPolicy + Wt::WScrollArea +
+
+ +
+
+ setSelectedButtonIndex + Wt::WButtonGroup +
+
+ + + +
+
+ setSeries + Wt::Chart::WCartesianChart +
+
+
+
+ setServerAdmin + Wt::Test::WTestEnvironment +
+
+
+
+ setServerConfiguration + Wt::WServer +
+
+
+
+ setServerSignature + Wt::Test::WTestEnvironment +
+
+
+
+ setServerSoftware + Wt::Test::WTestEnvironment +
+
+ +
+
+ setShadowEnabled + Wt::Chart::WPieChart +
+
+
+
+ setSingleClickSelect + Wt::WCalendar +
+
+
+
+ setSingleShot + Wt::WTimer +
+
+
+
+ setSingleStep + Wt::WSpinBox +
+
+
+
+ setSize + Wt::WFont +
+
+
+
+ setSizeGripEnabled + Wt::Ext::Dialog +
+
+ + + + +
+
+ setStacked + Wt::Chart::WDataSeries +
+
+
+
+ setStartAngle + Wt::Chart::WPieChart +
+
+
+
+ setState + Wt::WIconPair +
+
+
+
+ setStatus + Wt::Http::Response +
+
+
+
+ setStream + Wt::WLogger +
+
+ +
+
+ setStringList + Wt::WStringListModel +
+
+ + +
+
+ setStyleSheet + Wt::WTextEdit +
+
+
+
+ setSubMenu + Wt::WSubMenuItem +
+
+
+
+ setSupportsCookies + Wt::Test::WTestEnvironment +
+
+
+
+ setTabCloseable + Wt::WTabWidget +
+
+ + + +
+
+ setTable + Wt::WTreeTableNode +
+
+ + + +
+
+ setTemplateText + Wt::WTemplate +
+
+ +
+
+ setTextDecoration + Wt::WCssDecorationStyle +
+
+ + +
+
+ setTickInterval + Wt::WSlider +
+
+
+
+ setTickPosition + Wt::WSlider +
+
+
+
+ setTime + Wt::WDateTime +
+
+
+
+ setTime_t + Wt::WDateTime +
+
+ + +
+
+ setTitleBarEnabled + Wt::WDialog +
+
+ +
+
+ setToIdentity + Wt::WGenericMatrix +
+
+
+
+ setToolBar + Wt::WTextEdit +
+
+ + +
+
+ setTopToolBar + Wt::Ext::Panel +
+
+
+
+ setTree + Wt::WTreeTable +
+
+ + +
+
+ setTwoPhaseRenderingThreshold + Wt::WApplication +
+
+ + +
+
+ setUploadProgress + Wt::WResource +
+
+
+
+ setUrl + Wt::WStandardItem +
+
+
+
+ setUrlScheme + Wt::Test::WTestEnvironment +
+
+
+
+ setUserAgent + Wt::Test::WTestEnvironment +
+
+ + +
+
+ setVariant + Wt::WFont +
+
+ +
+
+ setVerticalScrollBarPolicy + Wt::WScrollArea +
+
+
+
+ setVerticalSize + Wt::WSelectionBox +
+
+
+
+ setVerticalSpacing + Wt::WGridLayout +
+
+ +
+
+ setVisible + Wt::Chart::WAxis +
+
+
+
+ setWeight + Wt::WFont +
+
+
+
+ setWidget + Wt::WScrollArea +
+
+ + + + +
+
+ setWorldTransform + Wt::WPainter +
+
+ +
+
+ setXSeriesColumn + Wt::Chart::WCartesianChart +
+
+ +
+
+ setZoom + Wt::WGoogleMap +
+
+
+
+ sh + Wt::WTransform::TRSSDecomposition +
+
+
+
+ shaderSource + Wt::WGLWidget +
+
+ +
+
+ shear + Wt::WTransform +
+
+
+
+ sheet + Wt::WCssRule +
+
+ +
+
+ shiftModelIndexes + Wt::WAbstractProxyModel +
+
+
+
+ ShiftModifier + Wt +
+
+
+
+ shortDayName + Wt::WDate +
+
+
+
+ ShortDayNames + Wt::WCalendar +
+
+
+
+ shortMonthName + Wt::WDate +
+
+ + +
+
+ showDelay + Wt::Ext::ToolTipConfig +
+
+
+
+ showIcon1 + Wt::WIconPair +
+
+
+
+ showIcon2 + Wt::WIconPair +
+
+
+
+ Side + Wt +
+
+
+
+ Signal + Wt +
+
+
+
+ Signal + Wt::Signal +
+
+ +
+
+ Signal< bool > + Wt +
+
+ +
+ +
+
+
+ Signal< double > + Wt +
+
+
+
+ Signal< int > + Wt +
+
+
+ +
+ + + + + + + + +
+ +
+
+
+ Signal< T, A1 > + Wt +
+
+
+
+ Signal< void > + Wt +
+
+
+
+ Signal< WDate > + Wt +
+
+
+ +
+
+ +
+ + + + + + +
+ +
+
+ +
+ +
+
+ Signal<> + Wt +
+
+
+
+ SignalBase + Wt +
+
+
+
+ SingleClicked + Wt::WAbstractItemView +
+
+
+
+ SingleEditor + Wt::WAbstractItemView +
+
+
+
+ SingleLetterDayNames + Wt::WCalendar +
+
+
+
+ SingleSelection + Wt +
+
+ +
+
+ singleStep + Wt::WSpinBox +
+
+ +
+
+ sliderMoved + Wt::WSlider +
+
+
+
+ Small + Wt::WFont +
+
+
+
+ SmallCaps + Wt::WFont +
+
+
+
+ Smaller + Wt::WFont +
+
+
+
+ socket + Wt::WSocketNotifier +
+
+
+
+ Solid + Wt::WBorder +
+
+
+
+ SolidLine + Wt +
+
+
+
+ SolidPattern + Wt +
+
+ +
+
+ sortByColumn + Wt::WAbstractItemView +
+
+
+
+ sortChildren + Wt::WStandardItem +
+
+
+
+ sortColumn + Wt::WAbstractItemView +
+
+ + +
+
+ source + Wt::WDropEvent +
+
+
+
+ sourceIndex_ + Wt::WAbstractProxyModel::BaseItem +
+
+
+
+ sourceModel + Wt::WAbstractProxyModel +
+
+
+
+ South + Wt::WBorderLayout +
+
+ +
+
+ specificFamilies + Wt::WFont +
+
+ +
+
+ Splitter + Wt::Ext +
+
+
+
+ SplitterHandle + Wt::Ext +
+
+ +
+
+ sql + Wt::Dbo::SqlStatement +
+
+
+
+ sql_value_traits + Wt::Dbo +
+
+
+
+ sql_value_traits< int > + Wt::Dbo +
+
+
+
+ SqlConnection + Wt::Dbo +
+
+
+
+ SqlConnectionPool + Wt::Dbo +
+
+
+
+ SqlDate + Wt::Dbo +
+
+
+
+ SqlDateTime + Wt::Dbo +
+
+
+
+ SqlDateTimeType + Wt::Dbo +
+
+ +
+
+ Sqlite3 + Wt::Dbo::backend +
+
+
+
+ SqlStatement + Wt::Dbo +
+
+
+
+ SqlTime + Wt::Dbo +
+
+
+
+ sqlType + Wt::Dbo::FieldInfo +
+
+
+
+ SquareCap + Wt +
+
+
+
+ SquareMarker + Wt::Chart +
+
+
+
+ StaleObjectException + Wt::Dbo::StaleObjectException +
+
+
+
+ StaleObjectException + Wt::Dbo +
+
+
+
+ StandardButton + Wt +
+
+ +
+
+ startAngle + Wt::Chart::WPieChart +
+
+
+
+ startSegment + Wt::Chart::SeriesIterator +
+
+
+
+ startSeries + Wt::Chart::SeriesIterator +
+
+ +
+
+ startWtSession + Wt::Http::Client +
+
+ +
+
+ Static + Wt +
+
+
+
+ StaticResource + Wt +
+
+
+
+ stealSpooledFile + Wt::WFileUpload +
+
+
+
+ stealSpoolFile + Wt::Http::UploadedFile +
+
+
+
+ stencilFunc + Wt::WGLWidget +
+
+
+
+ stencilFuncSeparate + Wt::WGLWidget +
+
+
+
+ stencilMask + Wt::WGLWidget +
+
+
+
+ stencilMaskSeparate + Wt::WGLWidget +
+
+
+
+ stencilOp + Wt::WGLWidget +
+
+
+
+ stencilOpSeparate + Wt::WGLWidget +
+
+ +
+
+ stopAcceptDrops + Wt::WWidget +
+
+
+
+ stringList + Wt::WStringListModel +
+
+
+
+ strokePath + Wt::WPainter +
+
+ + + +
+
+ StyleClassRole + Wt +
+
+ +
+
+ subMenu + Wt::WSubMenuItem +
+
+
+
+ suggestedFileName + Wt::WResource +
+
+
+
+ suggestFileName + Wt::WResource +
+
+
+
+ SupportsAjax + Wt::Http::Client +
+
+
+
+ supportsCookies + Wt::WEnvironment +
+
+
+
+ SurrogateId + Wt::Dbo::FieldInfo +
+
+ + + +
+
+ SyncLock + Wt +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_74.html b/wt-3.1.7a/doc/reference/html/search/all_74.html new file mode 100644 index 0000000..40eba54 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_74.html @@ -0,0 +1,724 @@ + + + + + + + +
+
Loading...
+
+
+ tabClosed + Wt::WTabWidget +
+
+ + +
+
+ tableName + Wt::Dbo::Session +
+
+
+
+ TableView + Wt::Ext +
+
+
+
+ TableView + Wt::Ext::TableView +
+
+ + +
+
+ TabWidget + Wt::Ext::TabWidget +
+
+
+
+ TabWidget + Wt::Ext +
+
+
+
+ takeChild + Wt::WStandardItem +
+
+ +
+
+ takeItem + Wt::WStandardItemModel +
+
+ +
+
+ takeWidget + Wt::WScrollArea +
+
+ +
+
+ TargetNewWindow + Wt +
+
+
+
+ TargetSelf + Wt +
+
+
+
+ TargetThisWindow + Wt +
+
+
+
+ targetTouches + Wt::WTouchEvent +
+
+
+
+ templateText + Wt::WTemplate +
+
+
+
+ templateWidget + Wt::WCssTemplateRule +
+
+ +
+
+ texParameteri + Wt::WGLWidget +
+
+ + + +
+
+ TextEdit + Wt::Ext +
+
+ +
+
+ TextLabel + Wt::Chart +
+
+
+
+ TextPercentage + Wt::Chart +
+
+ +
+
+ textWidget + Wt::WMessageBox +
+
+
+
+ Thick + Wt::WBorder +
+
+
+
+ Thin + Wt::WBorder +
+
+
+
+ tickInterval + Wt::WSlider +
+
+ +
+
+ TicksAbove + Wt::WSlider +
+
+
+
+ TicksBelow + Wt::WSlider +
+
+
+
+ TicksBothSides + Wt::WSlider +
+
+
+
+ TicksLeft + Wt::WSlider +
+
+
+
+ TicksRight + Wt::WSlider +
+
+
+
+ tie + Wt::WScrollBar +
+
+
+
+ time + Wt::WDateTime +
+
+
+
+ timeout + Wt::WTimer +
+
+
+
+ TimeStamp + Wt::WLogger +
+
+
+
+ timestamp + Wt::WLogger +
+
+
+
+ timeTo + Wt::WDateTime +
+
+
+
+ timeUpdated + Wt::WHTML5Media +
+
+ + +
+
+ titleBarWidget + Wt::WPanel +
+
+ +
+
+ toggled + Wt::Ext::AbstractButton +
+
+
+
+ ToggleSelect + Wt +
+
+
+
+ toJulianDay + Wt::WDate +
+
+
+
+ tooLarge + Wt::Http::Request +
+
+
+
+ ToolBar + Wt::Ext +
+
+ + +
+
+ ToolTipConfig + Wt::Ext +
+
+
+
+ ToolTipConfig + Wt::Ext::ToolTipConfig +
+
+
+
+ ToolTipRole + Wt +
+
+ +
+
+ toPixels + Wt::WLength +
+
+
+
+ topLeft + Wt::WRectF +
+
+
+
+ toPosixTime + Wt::WDateTime +
+
+
+
+ topRight + Wt::WRectF +
+
+
+
+ TopToBottom + Wt::WBoxLayout +
+
+
+
+ topToolBar + Wt::Ext::Panel +
+
+
+
+ toRawIndex + Wt::WAbstractItemModel +
+
+ +
+
+ toTime_t + Wt::WDateTime +
+
+
+
+ Touch + Wt +
+
+
+
+ Touch + Wt::Touch +
+
+
+
+ touchEnded + Wt::WInteractWidget +
+
+
+
+ touches + Wt::WTouchEvent +
+
+
+
+ touchMoved + Wt::WInteractWidget +
+
+
+
+ touchStarted + Wt::WInteractWidget +
+
+ + +
+
+ trackMouse + Wt::Ext::ToolTipConfig +
+
+
+
+ Transaction + Wt::Dbo +
+
+
+
+ Transaction + Wt::Dbo::Transaction +
+
+
+
+ Transform + Wt::WPaintDevice +
+
+ +
+
+ transparent + Wt +
+
+
+
+ transposed + Wt::WGenericMatrix +
+
+
+
+ tree + Wt::WTreeTable +
+
+ +
+
+ TriangleMarker + Wt::Chart +
+
+
+
+ triggered + Wt::WPopupMenuItem +
+
+
+
+ triggerUpdate + Wt::WApplication +
+
+
+
+ TRSRDecomposition + Wt::WTransform +
+
+
+
+ TRSSDecomposition + Wt::WTransform +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_75.html b/wt-3.1.7a/doc/reference/html/search/all_75.html new file mode 100644 index 0000000..e3f595b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_75.html @@ -0,0 +1,415 @@ + + + + + + + +
+
Loading...
+ +
+
+ Underline + Wt::WCssDecorationStyle +
+
+
+
+ undoDoCollapse + Wt::WTreeNode +
+
+
+
+ undoDoExpand + Wt::WTreeNode +
+
+
+
+ uniform1f + Wt::WGLWidget +
+
+
+
+ uniform1fv + Wt::WGLWidget +
+
+
+
+ uniform1i + Wt::WGLWidget +
+
+
+
+ uniform1iv + Wt::WGLWidget +
+
+
+
+ uniform2f + Wt::WGLWidget +
+
+
+
+ uniform2fv + Wt::WGLWidget +
+
+
+
+ uniform2i + Wt::WGLWidget +
+
+
+
+ uniform2iv + Wt::WGLWidget +
+
+
+
+ uniform3f + Wt::WGLWidget +
+
+
+
+ uniform3fv + Wt::WGLWidget +
+
+
+
+ uniform3i + Wt::WGLWidget +
+
+
+
+ uniform3iv + Wt::WGLWidget +
+
+
+
+ uniform4f + Wt::WGLWidget +
+
+
+
+ uniform4fv + Wt::WGLWidget +
+
+
+
+ uniform4i + Wt::WGLWidget +
+
+
+
+ uniform4iv + Wt::WGLWidget +
+
+
+
+ uniformMatrix2 + Wt::WGLWidget +
+
+
+
+ uniformMatrix2fv + Wt::WGLWidget +
+
+
+
+ uniformMatrix3 + Wt::WGLWidget +
+
+
+
+ uniformMatrix3fv + Wt::WGLWidget +
+
+ +
+
+ uniformMatrix4fv + Wt::WGLWidget +
+
+ +
+
+ united + Wt::WRectF +
+
+
+
+ UnixTimeAsInteger + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ Unknown + Wt::WEnvironment +
+
+
+
+ unload + Wt::WApplication +
+
+
+
+ unTie + Wt::WScrollBar +
+
+ +
+
+ UPDATE_GL + Wt::WGLWidget +
+
+ +
+
+ updateGL + Wt::WGLWidget +
+
+ + +
+
+ UpdateLock + Wt::WApplication +
+
+ + +
+
+ updatesEnabled + Wt::WApplication +
+
+
+
+ upload + Wt::WFileUpload +
+
+
+
+ uploaded + Wt::WFileUpload +
+
+
+
+ UploadedFile + Wt::Http +
+
+
+
+ UploadedFileMap + Wt::Http +
+
+ +
+
+ uri + Wt::WPainter::Image +
+
+ +
+
+ UrlRole + Wt +
+
+ + +
+
+ useProgram + Wt::WGLWidget +
+
+ +
+
+ UserRole + Wt +
+
+ +
+
+ UTF8 + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_76.html b/wt-3.1.7a/doc/reference/html/search/all_76.html new file mode 100644 index 0000000..7b3b956 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_76.html @@ -0,0 +1,292 @@ + + + + + + + +
+
Loading...
+ + +
+
+ validated + Wt::WValidationStatus +
+
+
+
+ validateEditor + Wt::WAbstractItemView +
+
+
+
+ validateEditors + Wt::WAbstractItemView +
+
+
+
+ validateProgram + Wt::WGLWidget +
+
+ + +
+
+ value_type + Wt::Dbo::collection +
+
+ + + + +
+
+ vertexAttrib1f + Wt::WGLWidget +
+
+
+
+ vertexAttrib1fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib2f + Wt::WGLWidget +
+
+
+
+ vertexAttrib2fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib3f + Wt::WGLWidget +
+
+
+
+ vertexAttrib3fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib4f + Wt::WGLWidget +
+
+
+
+ vertexAttrib4fv + Wt::WGLWidget +
+
+
+
+ vertexAttribPointer + Wt::WGLWidget +
+
+
+
+ Vertical + Wt +
+
+ + +
+
+ Verticals + Wt +
+
+
+
+ verticalScrollBar + Wt::WScrollArea +
+
+
+
+ verticalSize + Wt::WSelectionBox +
+
+
+
+ verticalSpacing + Wt::WGridLayout +
+
+
+ +
+ +
+
+ viewPortChanged + Wt::WVirtualImage +
+
+ + +
+
+ volumeChanged + Wt::WHTML5Media +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_77.html b/wt-3.1.7a/doc/reference/html/search/all_77.html new file mode 100644 index 0000000..258ec02 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_77.html @@ -0,0 +1,2444 @@ + + + + + + + +
+
Loading...
+
+
+ Chart + Wt +
+
+
+
+ Dbo + Wt +
+
+
+
+ Ext + Wt +
+
+
+
+ Http + Wt +
+
+
+
+ WAbstractArea + Wt +
+
+
+
+ WAbstractChart + Wt::Chart +
+
+
+
+ WAbstractItemDelegate + Wt::WAbstractItemDelegate +
+
+
+ +
+
+ +
+
+
+ WAbstractItemModel + Wt::WAbstractItemModel +
+
+
+ +
+
+
+ WAbstractItemView + Wt::WAbstractItemView +
+
+
+
+ WAbstractListModel + Wt::WAbstractListModel +
+
+
+ +
+
+
+ WAbstractProxyModel + Wt::WAbstractProxyModel +
+
+
+ +
+
+ +
+
+
+ WAbstractTableModel + Wt::WAbstractTableModel +
+
+
+ +
+ +
+
+ WAccordionLayout + Wt +
+
+
+
+ WAccordionLayout + Wt::WAccordionLayout +
+
+
+ +
+
+
+ WAggregateProxyModel + Wt::WAggregateProxyModel +
+
+
+
+ WaitCursor + Wt +
+
+
+
+ waitForShutdown + Wt::WServer +
+
+ +
+
+ WAnchor + Wt +
+
+
+
+ WApplication + Wt::WApplication +
+
+
+
+ WApplication + Wt +
+
+
+
+ Warning + Wt +
+
+
+
+ wasCanceled + Wt::Ext::ProgressDialog +
+
+
+
+ WAxis + Wt::Chart +
+
+
+
+ WBatchEditProxyModel + Wt::WBatchEditProxyModel +
+
+
+ +
+
+
+ WBorder + Wt +
+
+ +
+
+ WBorderLayout + Wt +
+
+
+
+ WBorderLayout + Wt::WBorderLayout +
+
+
+
+ WBoxLayout + Wt +
+
+
+
+ WBoxLayout + Wt::WBoxLayout +
+
+
+
+ WBreak + Wt +
+
+
+
+ WBreak + Wt::WBreak +
+
+
+
+ WBrush + Wt +
+
+ +
+
+ WBrushStyle + Wt +
+
+
+
+ WButtonGroup + Wt +
+
+
+
+ WButtonGroup + Wt::WButtonGroup +
+
+
+
+ WCalendar + Wt +
+
+
+
+ WCalendar + Wt::WCalendar +
+
+
+ +
+
+
+ WCanvasPaintDevice + Wt::WCanvasPaintDevice +
+
+
+
+ WCartesianChart + Wt::Chart +
+
+ +
+
+ WChart2DRenderer + Wt::Chart +
+
+
+
+ WChart2DRenderer + Wt::Chart::WChart2DRenderer +
+
+
+
+ WChartPalette + Wt::Chart +
+
+ +
+
+ WCheckBox + Wt +
+
+ +
+
+ WCircleArea + Wt +
+
+ +
+
+ WColor + Wt +
+
+
+
+ WCombinedLocalizedStrings + Wt::WCombinedLocalizedStrings +
+
+ +
+
+ WComboBox + Wt::WComboBox +
+
+
+
+ WComboBox + Wt +
+
+
+
+ WCompositeWidget + Wt +
+
+ +
+
+ WContainerWidget + Wt +
+
+
+
+ WContainerWidget + Wt::WContainerWidget +
+
+
+ +
+
+
+ WCssDecorationStyle + Wt::WCssDecorationStyle +
+
+
+
+ WCssRule + Wt +
+
+
+
+ WCssRule + Wt::WCssRule +
+
+
+
+ WCssStyleSheet + Wt +
+
+
+
+ WCssStyleSheet + Wt::WCssStyleSheet +
+
+
+
+ WCssTemplateRule + Wt +
+
+
+
+ WCssTemplateRule + Wt::WCssTemplateRule +
+
+
+
+ WCssTextRule + Wt +
+
+
+
+ WCssTextRule + Wt::WCssTextRule +
+
+
+
+ WDataSeries + Wt::Chart +
+
+
+
+ WDataSeries + Wt::Chart::WDataSeries +
+
+
+
+ WDate + Wt +
+
+ +
+
+ WDatePicker + Wt +
+
+ +
+
+ WDateTime + Wt +
+
+ +
+
+ WDateValidator + Wt +
+
+ +
+
+ WDefaultLayout + Wt +
+
+
+
+ WDefaultLayout + Wt::WDefaultLayout +
+
+ +
+
+ WDefaultLoadingIndicator + Wt::WDefaultLoadingIndicator +
+
+
+
+ WDialog + Wt +
+
+
+
+ WDialog + Wt::WDialog +
+
+
+
+ WDoubleValidator + Wt +
+
+ +
+
+ WDropEvent + Wt +
+
+
+
+ WDropEvent + Wt::WDropEvent +
+
+
+
+ WebKit + Wt::WEnvironment +
+
+ +
+
+ weightValue + Wt::WFont +
+
+
+
+ WEnvironment + Wt +
+
+
+
+ West + Wt::WBorderLayout +
+
+
+
+ WFileResource + Wt +
+
+ +
+
+ WFileUpload + Wt +
+
+
+
+ WFileUpload + Wt::WFileUpload +
+
+
+
+ WFitLayout + Wt +
+
+
+
+ WFitLayout + Wt::WFitLayout +
+
+
+
+ WFlashObject + Wt +
+
+
+
+ WFlashObject + Wt::WFlashObject +
+
+
+
+ WFont + Wt +
+
+
+
+ WFont + Wt::WFont +
+
+
+
+ WFormWidget + Wt +
+
+
+
+ WFormWidget + Wt::WFormWidget +
+
+
+
+ WGenericMatrix + Wt +
+
+ + +
+
+ WGestureEvent + Wt +
+
+
+
+ WGestureEvent + Wt::WGestureEvent +
+
+
+
+ WGLWidget + Wt +
+
+
+
+ WGLWidget + Wt::WGLWidget +
+
+
+
+ WGoogleMap + Wt +
+
+
+
+ WGoogleMap + Wt::WGoogleMap +
+
+
+
+ WGridLayout + Wt::WGridLayout +
+
+
+
+ WGridLayout + Wt +
+
+ +
+
+ WGroupBox + Wt +
+
+ +
+
+ WhatsThisCursor + Wt +
+
+
+
+ WHBoxLayout + Wt::WHBoxLayout +
+
+
+
+ WHBoxLayout + Wt +
+
+
+
+ wheelDelta + Wt::WMouseEvent +
+
+
+
+ where + Wt::Dbo::Query +
+
+
+
+ white + Wt +
+
+
+
+ whitespace + Wt::WSuggestionPopup::Options +
+
+
+
+ WHTML5Audio + Wt +
+
+
+
+ WHTML5Audio + Wt::WHTML5Audio +
+
+
+
+ WHTML5Media + Wt +
+
+
+
+ WHTML5Media + Wt::WHTML5Media +
+
+
+
+ WHTML5Video + Wt +
+
+
+
+ WHTML5Video + Wt::WHTML5Video +
+
+
+
+ WIconPair + Wt +
+
+
+
+ WIconPair + Wt::WIconPair +
+
+
+
+ widen + Wt::WString +
+
+
+
+ Widget + Wt::Ext +
+
+ +
+
+ widgetAt + Wt::WBorderLayout +
+
+
+
+ WidgetSet + Wt +
+
+ + +
+
+ WImage + Wt +
+
+ + +
+
+ WInPlaceEdit + Wt +
+
+
+
+ WInPlaceEdit + Wt::WInPlaceEdit +
+
+
+
+ WInteractWidget + Wt::WInteractWidget +
+
+
+
+ WInteractWidget + Wt +
+
+ +
+
+ WIntValidator + Wt +
+
+
+
+ WItemDelegate + Wt::WItemDelegate +
+
+
+
+ WItemDelegate + Wt +
+
+
+ +
+
+
+ WKeyEvent + Wt +
+
+
+
+ WKeyEvent + Wt::WKeyEvent +
+
+ +
+
+ WLabel + Wt +
+
+
+
+ WLayout + Wt::WLayout +
+
+
+
+ WLayout + Wt +
+
+
+
+ WLayoutItem + Wt +
+
+
+
+ WLayoutItemImpl + Wt +
+
+ +
+
+ WLength + Wt +
+
+
+
+ WLengthValidator + Wt +
+
+ + +
+
+ WLineEdit + Wt +
+
+ +
+
+ WLineF + Wt +
+
+
+ +
+
+ +
+
+
+ WLogEntry + Wt::WLogEntry +
+
+
+
+ WLogEntry + Wt +
+
+
+
+ WLogger + Wt +
+
+
+
+ WLogger + Wt::WLogger +
+
+ +
+
+ WMatrix4x4 + Wt +
+
+ +
+
+ WMemoryResource + Wt +
+
+ +
+
+ WMenu + Wt +
+
+
+
+ WMenuItem + Wt +
+
+
+
+ WMenuItem + Wt::WMenuItem +
+
+
+
+ WMessage + Wt::WString +
+
+ +
+
+ WMessageBox + Wt +
+
+
+
+ WMessageResourceBundle + Wt::WMessageResourceBundle +
+
+ +
+
+ WModelIndex + Wt +
+
+
+
+ WModelIndex + Wt::WModelIndex +
+
+
+
+ WMouseEvent + Wt::WMouseEvent +
+
+
+
+ WMouseEvent + Wt +
+
+
+
+ WObject + Wt::WObject +
+
+
+
+ WObject + Wt +
+
+
+
+ wordSeparators + Wt::WSuggestionPopup::Options +
+
+ +
+
+ worldTransform + Wt::WPainter +
+
+ +
+
+ WOverlayLoadingIndicator + Wt::WOverlayLoadingIndicator +
+
+
+
+ WPaintDevice + Wt +
+
+
+
+ WPaintedWidget + Wt::WPaintedWidget +
+
+
+
+ WPaintedWidget + Wt +
+
+
+
+ WPainter + Wt +
+
+ + +
+
+ WPainterPath + Wt +
+
+
+
+ WPanel + Wt::WPanel +
+
+
+
+ WPanel + Wt +
+
+ +
+
+ WPdfImage + Wt +
+
+
+
+ WPen + Wt +
+
+ +
+
+ WPieChart + Wt::Chart::WPieChart +
+
+
+
+ WPieChart + Wt::Chart +
+
+
+
+ WPoint + Wt +
+
+ + +
+
+ WPointF + Wt +
+
+
+
+ WPolygonArea + Wt +
+
+ +
+
+ WPopupMenu + Wt +
+
+
+
+ WPopupMenu + Wt::WPopupMenu +
+
+ +
+
+ WPopupMenuItem + Wt +
+
+
+
+ WProgressBar + Wt::WProgressBar +
+
+
+
+ WProgressBar + Wt +
+
+ +
+
+ WPushButton + Wt +
+
+ +
+
+ WRadioButton + Wt +
+
+
+
+ WRasterImage + Wt::WRasterImage +
+
+
+
+ WRasterImage + Wt +
+
+ +
+
+ WRectArea + Wt +
+
+ +
+
+ WRectF + Wt +
+
+ +
+
+ WRegExpValidator + Wt +
+
+
+
+ WResource + Wt::WResource +
+
+
+
+ WResource + Wt +
+
+ +
+
+ WRun + Wt::WServer +
+
+
+
+ WScrollArea + Wt::WScrollArea +
+
+
+
+ WScrollArea + Wt +
+
+
+
+ WScrollBar + Wt +
+
+
+
+ WScrollEvent + Wt::WScrollEvent +
+
+
+
+ WScrollEvent + Wt +
+
+
+
+ WSelectionBox + Wt::WSelectionBox +
+
+
+
+ WSelectionBox + Wt +
+
+
+
+ WServer + Wt +
+
+
+
+ WServer + Wt::WServer +
+
+
+
+ WShadow + Wt +
+
+ +
+
+ WSignalMapper + Wt +
+
+
+
+ WSignalMapper + Wt::WSignalMapper +
+
+ +
+ +
+ + +
+
+ WSlider + Wt +
+
+ +
+
+ WSocketNotifier + Wt::WSocketNotifier +
+
+
+
+ WSocketNotifier + Wt +
+
+
+
+ WSortFilterProxyModel + Wt::WSortFilterProxyModel +
+
+
+ +
+
+
+ WSound + Wt +
+
+
+
+ WSound + Wt::WSound +
+
+
+
+ WSpinBox + Wt +
+
+
+
+ WSpinBox + Wt::WSpinBox +
+
+
+
+ WStackedWidget + Wt +
+
+
+
+ WStackedWidget + Wt::WStackedWidget +
+
+ +
+
+ WStandardItem + Wt +
+
+ +
+ +
+
+
+ WStandardPalette + Wt::Chart +
+
+
+
+ WStandardPalette + Wt::Chart::WStandardPalette +
+
+
+
+ WStaticModelView + Wt::WStaticModelView +
+
+
+
+ WStaticModelView + Wt +
+
+
+
+ WString + Wt +
+
+ + +
+
+ WStringListModel + Wt +
+
+
+
+ WSubMenuItem + Wt::WSubMenuItem +
+
+
+
+ WSubMenuItem + Wt +
+
+
+
+ WSuggestionPopup + Wt +
+
+ +
+
+ WSvgImage + Wt +
+
+
+
+ WSvgImage + Wt::WSvgImage +
+
+
+
+ Wt +
+
+
+
+ WTable + Wt +
+
+
+
+ WTable + Wt::WTable +
+
+
+
+ WTableCell + Wt +
+
+
+
+ WTableColumn + Wt +
+
+
+
+ WTableRow + Wt +
+
+
+
+ WTableView + Wt +
+
+
+
+ WTableView + Wt::WTableView +
+
+ +
+
+ WTabWidget + Wt +
+
+ +
+
+ WTemplate + Wt +
+
+
+
+ WTestEnvironment + Wt::Test::WTestEnvironment +
+
+
+
+ WTestEnvironment + Wt::Test +
+
+ +
+
+ WText + Wt +
+
+
+
+ WTextArea + Wt +
+
+ + +
+
+ WTextEdit + Wt +
+
+
+
+ WTime + Wt +
+
+ +
+
+ WTimer + Wt::WTimer +
+
+
+
+ WTimer + Wt +
+
+
+
+ WTouchEvent + Wt::WTouchEvent +
+
+
+
+ WTouchEvent + Wt +
+
+ +
+
+ WTransform + Wt +
+
+
+
+ WTree + Wt::WTree +
+
+
+
+ WTree + Wt +
+
+ +
+
+ WTreeNode + Wt +
+
+
+
+ WTreeNodeSet + Wt::WTree +
+
+
+
+ WTreeTable + Wt::WTreeTable +
+
+
+
+ WTreeTable + Wt +
+
+
+
+ WTreeTableNode + Wt +
+
+
+
+ WTreeTableNode + Wt::WTreeTableNode +
+
+
+
+ WTreeView + Wt::WTreeView +
+
+
+
+ WTreeView + Wt +
+
+
+ +
+
+
+ WValidationStatus + Wt::WValidationStatus +
+
+
+
+ WValidator + Wt +
+
+ +
+
+ WVBoxLayout + Wt::WVBoxLayout +
+
+
+
+ WVBoxLayout + Wt +
+
+
+
+ WVectorImage + Wt +
+
+
+
+ WViewWidget + Wt::WViewWidget +
+
+
+
+ WViewWidget + Wt +
+
+
+
+ WVirtualImage + Wt::WVirtualImage +
+
+
+
+ WVirtualImage + Wt +
+
+
+
+ WVmlImage + Wt +
+
+
+
+ WVmlImage + Wt::WVmlImage +
+
+
+
+ WWebWidget + Wt +
+
+
+
+ WWebWidget + Wt::WWebWidget +
+
+
+
+ WWidget + Wt::WWidget +
+
+
+
+ WWidget + Wt +
+
+
+
+ WWidgetItem + Wt +
+
+
+
+ WWidgetItem + Wt::WWidgetItem +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_78.html b/wt-3.1.7a/doc/reference/html/search/all_78.html new file mode 100644 index 0000000..48880d6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_78.html @@ -0,0 +1,110 @@ + + + + + + + +
+
Loading...
+ +
+
+ x1 + Wt::WLineF +
+
+
+
+ x2 + Wt::WLineF +
+
+
+
+ XAxis + Wt::Chart +
+
+
+
+ XCrossMarker + Wt::Chart +
+
+
+
+ XHTML1 + Wt::WEnvironment +
+
+
+
+ XHTMLText + Wt +
+
+
+
+ XHTMLUnsafeText + Wt +
+
+
+
+ XLarge + Wt::WFont +
+
+
+
+ XMLHttpRequest + Wt::WApplication +
+
+
+
+ XSeriesColumn + Wt::Chart::WCartesianChart +
+
+
+
+ XSmall + Wt::WFont +
+
+
+
+ XXLarge + Wt::WFont +
+
+
+
+ XXSmall + Wt::WFont +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_79.html b/wt-3.1.7a/doc/reference/html/search/all_79.html new file mode 100644 index 0000000..f4c8157 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_79.html @@ -0,0 +1,86 @@ + + + + + + + +
+
Loading...
+ +
+
+ y1 + Wt::WLineF +
+
+
+
+ Y1Axis + Wt::Chart +
+
+
+
+ y2 + Wt::WLineF +
+
+
+
+ Y2Axis + Wt::Chart +
+
+
+
+ YAxis + Wt::Chart +
+
+
+
+ year + Wt::WDate +
+
+
+
+ yellow + Wt +
+
+
+
+ Yes + Wt +
+
+
+
+ YesAll + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_7a.html b/wt-3.1.7a/doc/reference/html/search/all_7a.html new file mode 100644 index 0000000..ee827ae --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_7a.html @@ -0,0 +1,53 @@ + + + + + + + +
+
Loading...
+
+
+ ZeroValue + Wt::Chart +
+
+
+
+ ZeroValueFill + Wt::Chart +
+
+
+
+ zoomIn + Wt::WGoogleMap +
+
+
+
+ zoomOut + Wt::WGoogleMap +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/all_7e.html b/wt-3.1.7a/doc/reference/html/search/all_7e.html new file mode 100644 index 0000000..7376657 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/all_7e.html @@ -0,0 +1,524 @@ + + + + + + + +
+
Loading...
+
+
+ ~Button + Wt::Ext::Button +
+
+
+
+ ~Call + Wt::Dbo::Call +
+
+
+
+ ~collection + Wt::Dbo::collection +
+
+
+
+ ~Container + Wt::Ext::Container +
+
+
+
+ ~DataStore + Wt::Ext::DataStore +
+
+
+
+ ~Dialog + Wt::Ext::Dialog +
+
+
+
+ ~iterator + Wt::Dbo::collection::iterator +
+
+
+
+ ~JSignal + Wt::JSignal +
+
+
+
+ ~JSlot + Wt::JSlot +
+
+
+
+ ~Panel + Wt::Ext::Panel +
+
+
+
+ ~Postgres + Wt::Dbo::backend::Postgres +
+
+
+
+ ~ptr + Wt::Dbo::ptr +
+
+
+
+ ~Query + Wt::Dbo::Query +
+
+
+
+ ~SeriesIterator + Wt::Chart::SeriesIterator +
+
+
+
+ ~Session + Wt::Dbo::Session +
+
+
+
+ ~Signal + Wt::Signal +
+
+
+
+ ~SqlConnection + Wt::Dbo::SqlConnection +
+
+
+
+ ~SqlConnectionPool + Wt::Dbo::SqlConnectionPool +
+
+
+
+ ~Sqlite3 + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ ~SqlStatement + Wt::Dbo::SqlStatement +
+
+
+
+ ~Transaction + Wt::Dbo::Transaction +
+
+
+
+ ~UpdateLock + Wt::WApplication::UpdateLock +
+
+
+
+ ~WAbstractArea + Wt::WAbstractArea +
+
+
+
+ ~WAbstractChart + Wt::Chart::WAbstractChart +
+
+
+
+ ~WAbstractItemDelegate + Wt::WAbstractItemDelegate +
+
+
+
+ ~WAbstractListModel + Wt::WAbstractListModel +
+
+
+
+ ~WAbstractTableModel + Wt::WAbstractTableModel +
+
+
+
+ ~WAbstractToggleButton + Wt::WAbstractToggleButton +
+
+
+
+ ~WAggregateProxyModel + Wt::WAggregateProxyModel +
+
+
+
+ ~WApplication + Wt::WApplication +
+
+
+
+ ~WBatchEditProxyModel + Wt::WBatchEditProxyModel +
+
+
+
+ ~WBorderLayout + Wt::WBorderLayout +
+
+
+
+ ~WButtonGroup + Wt::WButtonGroup +
+
+
+
+ ~WChart2DRenderer + Wt::Chart::WChart2DRenderer +
+
+
+
+ ~WChartPalette + Wt::Chart::WChartPalette +
+
+
+
+ ~WContainerWidget + Wt::WContainerWidget +
+
+
+
+ ~WCssRule + Wt::WCssRule +
+
+
+
+ ~WCssStyleSheet + Wt::WCssStyleSheet +
+
+
+
+ ~WDatePicker + Wt::WDatePicker +
+
+
+
+ ~WDefaultLayout + Wt::WDefaultLayout +
+
+
+
+ ~WDialog + Wt::WDialog +
+
+
+
+ ~WFileResource + Wt::WFileResource +
+
+
+
+ ~WFlashObject + Wt::WFlashObject +
+
+
+
+ ~WFormWidget + Wt::WFormWidget +
+
+
+
+ ~WGLWidget + Wt::WGLWidget +
+
+
+
+ ~WGoogleMap + Wt::WGoogleMap +
+
+
+
+ ~Widget + Wt::Ext::Widget +
+
+
+
+ ~WLayout + Wt::WLayout +
+
+
+
+ ~WLayoutItem + Wt::WLayoutItem +
+
+
+
+ ~WLayoutItemImpl + Wt::WLayoutItemImpl +
+
+
+
+ ~WLoadingIndicator + Wt::WLoadingIndicator +
+
+
+
+ ~WLocalizedStrings + Wt::WLocalizedStrings +
+
+
+
+ ~WLogEntry + Wt::WLogEntry +
+
+
+
+ ~WLogger + Wt::WLogger +
+
+
+
+ ~WMenu + Wt::WMenu +
+
+
+
+ ~WObject + Wt::WObject +
+
+
+
+ ~WPaintDevice + Wt::WPaintDevice +
+
+
+
+ ~WPaintedWidget + Wt::WPaintedWidget +
+
+
+
+ ~WPainter + Wt::WPainter +
+
+
+
+ ~WPdfImage + Wt::WPdfImage +
+
+
+
+ ~WPopupMenuItem + Wt::WPopupMenuItem +
+
+
+
+ ~WRadioButton + Wt::WRadioButton +
+
+
+
+ ~WRasterImage + Wt::WRasterImage +
+
+
+
+ ~WRegExpValidator + Wt::WRegExpValidator +
+
+
+
+ ~WResource + Wt::WResource +
+
+
+
+ ~WServer + Wt::WServer +
+
+
+
+ ~WSlider + Wt::WSlider +
+
+
+
+ ~WSocketNotifier + Wt::WSocketNotifier +
+
+
+
+ ~WSortFilterProxyModel + Wt::WSortFilterProxyModel +
+
+
+
+ ~WSound + Wt::WSound +
+
+
+
+ ~WStandardItem + Wt::WStandardItem +
+
+
+
+ ~WStandardItemModel + Wt::WStandardItemModel +
+
+
+
+ ~WString + Wt::WString +
+
+
+
+ ~WStringListModel + Wt::WStringListModel +
+
+
+
+ ~WSvgImage + Wt::WSvgImage +
+
+
+
+ ~WTable + Wt::WTable +
+
+
+
+ ~WTestEnvironment + Wt::Test::WTestEnvironment +
+
+
+
+ ~WText + Wt::WText +
+
+
+
+ ~WTextEdit + Wt::WTextEdit +
+
+
+
+ ~WTimer + Wt::WTimer +
+
+
+
+ ~WTreeNode + Wt::WTreeNode +
+
+
+
+ ~WValidator + Wt::WValidator +
+
+
+
+ ~WVirtualImage + Wt::WVirtualImage +
+
+
+
+ ~WWidget + Wt::WWidget +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_61.html b/wt-3.1.7a/doc/reference/html/search/classes_61.html new file mode 100644 index 0000000..eba8ef2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_61.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ AbstractButton + Wt::Ext +
+
+
+
+ AbstractToggleButton + Wt::Ext +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_62.html b/wt-3.1.7a/doc/reference/html/search/classes_62.html new file mode 100644 index 0000000..9b13ec3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_62.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ BaseItem + Wt::WAbstractProxyModel +
+
+
+
+ boost_any_traits + Wt +
+
+
+
+ Button + Wt::Ext +
+
+
+
+ ByteRange + Wt::Http::Request +
+
+
+
+ ByteRangeSpecifier + Wt::Http::Request +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_63.html b/wt-3.1.7a/doc/reference/html/search/classes_63.html new file mode 100644 index 0000000..bc0ad1f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_63.html @@ -0,0 +1,92 @@ + + + + + + + +
+
Loading...
+
+
+ Calendar + Wt::Ext +
+
+
+
+ Call + Wt::Dbo +
+
+
+
+ CheckBox + Wt::Ext +
+
+
+
+ Client + Wt::Http +
+
+
+
+ collection + Wt::Dbo +
+
+
+
+ collection< ptr< C > > + Wt::Dbo +
+
+
+
+ ComboBox + Wt::Ext +
+
+
+
+ Component + Wt::Ext +
+
+
+
+ const_iterator + Wt::Dbo::collection +
+
+
+
+ Container + Wt::Ext +
+
+
+
+ Coordinate + Wt::WGoogleMap +
+
+
+
+ Coordinates + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_64.html b/wt-3.1.7a/doc/reference/html/search/classes_64.html new file mode 100644 index 0000000..500112e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_64.html @@ -0,0 +1,68 @@ + + + + + + + +
+
Loading...
+
+
+ DataStore + Wt::Ext +
+
+
+
+ DateField + Wt::Ext +
+
+
+
+ Dbo + Wt::Dbo +
+
+
+
+ dbo_default_traits + Wt::Dbo +
+
+
+
+ dbo_traits + Wt::Dbo +
+
+
+
+ Dialog + Wt::Ext +
+
+
+
+ DirectBinding + Wt::Dbo +
+
+
+
+ DynamicBinding + Wt::Dbo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_65.html b/wt-3.1.7a/doc/reference/html/search/classes_65.html new file mode 100644 index 0000000..aab9e04 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_65.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ EventSignal + Wt +
+
+
+
+ EventSignalBase + Wt +
+
+
+
+ Exception + Wt::Dbo +
+
+
+
+ Exception + Wt::WServer +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_66.html b/wt-3.1.7a/doc/reference/html/search/classes_66.html new file mode 100644 index 0000000..81915c2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_66.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ Field + Wt::WLogger +
+
+
+
+ FieldInfo + Wt::Dbo +
+
+
+
+ FixedSqlConnectionPool + Wt::Dbo +
+
+
+
+ FormField + Wt::Ext +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_69.html b/wt-3.1.7a/doc/reference/html/search/classes_69.html new file mode 100644 index 0000000..01e8cf7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_69.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ Image + Wt::WPainter +
+
+
+ +
+ +
+ +
+
+
+ iterator + Wt::Dbo::collection +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_6a.html b/wt-3.1.7a/doc/reference/html/search/classes_6a.html new file mode 100644 index 0000000..599efac --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_6a.html @@ -0,0 +1,122 @@ + + + + + + + +
+
Loading...
+
+
+ JavaScriptMatrix4x4 + Wt::WGLWidget +
+
+
+
+ JSignal + Wt +
+
+
+
+ JSignal< bool > + Wt +
+
+
+ +
+
+
+ JSignal< int > + Wt +
+
+
+ +
+ + + + + + + + +
+
+ JSignal< void > + Wt +
+
+
+
+ JSignal<> + Wt +
+
+
+
+ JSlot + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_6c.html b/wt-3.1.7a/doc/reference/html/search/classes_6c.html new file mode 100644 index 0000000..8079d88 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_6c.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ LineEdit + Wt::Ext +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_6d.html b/wt-3.1.7a/doc/reference/html/search/classes_6d.html new file mode 100644 index 0000000..0f21d89 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_6d.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ Menu + Wt::Ext +
+
+
+
+ MenuItem + Wt::Ext +
+
+
+
+ MessageBox + Wt::Ext +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_6e.html b/wt-3.1.7a/doc/reference/html/search/classes_6e.html new file mode 100644 index 0000000..bfbefa1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_6e.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ NoUniqueResultException + Wt::Dbo +
+
+
+
+ NumberField + Wt::Ext +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_6f.html b/wt-3.1.7a/doc/reference/html/search/classes_6f.html new file mode 100644 index 0000000..c7cf60c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_6f.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ ObjectNotFoundException + Wt::Dbo +
+
+
+
+ Options + Wt::WSuggestionPopup +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_70.html b/wt-3.1.7a/doc/reference/html/search/classes_70.html new file mode 100644 index 0000000..8a6a2b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_70.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ PagingToolBar + Wt::Ext +
+
+
+
+ Panel + Wt::Ext +
+
+
+
+ Postgres + Wt::Dbo::backend +
+
+
+
+ ProgressDialog + Wt::Ext +
+
+
+
+ ptr + Wt::Dbo +
+
+
+
+ ptr_tuple + Wt::Dbo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_71.html b/wt-3.1.7a/doc/reference/html/search/classes_71.html new file mode 100644 index 0000000..56cfb6a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_71.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ Query + Wt::Dbo +
+
+
+
+ Query< Result > + Wt::Dbo +
+
+
+
+ query_result_traits + Wt::Dbo +
+
+
+
+ QueryModel + Wt::Dbo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_72.html b/wt-3.1.7a/doc/reference/html/search/classes_72.html new file mode 100644 index 0000000..bfda631 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_72.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ RadioButton + Wt::Ext +
+
+
+
+ Request + Wt::Http +
+
+
+
+ Response + Wt::Http +
+
+
+
+ ResponseContinuation + Wt::Http +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_73.html b/wt-3.1.7a/doc/reference/html/search/classes_73.html new file mode 100644 index 0000000..2e93c96 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_73.html @@ -0,0 +1,302 @@ + + + + + + + +
+
Loading...
+
+
+ Segment + Wt::WPainterPath +
+
+
+
+ Sep + Wt::WLogger +
+
+
+
+ SeriesIterator + Wt::Chart +
+
+
+
+ Session + Wt::Dbo +
+
+
+
+ Signal + Wt +
+
+ +
+
+ Signal< bool > + Wt +
+
+ +
+ +
+
+
+ Signal< double > + Wt +
+
+
+
+ Signal< int > + Wt +
+
+
+ +
+ + + + + + + + +
+ +
+
+
+ Signal< T, A1 > + Wt +
+
+
+
+ Signal< void > + Wt +
+
+
+
+ Signal< WDate > + Wt +
+
+
+ +
+
+ +
+ + + + + + +
+ +
+
+ +
+ +
+
+ Signal<> + Wt +
+
+
+
+ SignalBase + Wt +
+
+
+
+ Splitter + Wt::Ext +
+
+
+
+ SplitterHandle + Wt::Ext +
+
+
+
+ sql_value_traits + Wt::Dbo +
+
+
+
+ sql_value_traits< int > + Wt::Dbo +
+
+
+
+ SqlConnection + Wt::Dbo +
+
+
+
+ SqlConnectionPool + Wt::Dbo +
+
+
+
+ Sqlite3 + Wt::Dbo::backend +
+
+
+
+ SqlStatement + Wt::Dbo +
+
+
+
+ StaleObjectException + Wt::Dbo +
+
+
+
+ SyncLock + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_74.html b/wt-3.1.7a/doc/reference/html/search/classes_74.html new file mode 100644 index 0000000..c1ce336 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_74.html @@ -0,0 +1,80 @@ + + + + + + + +
+
Loading...
+
+
+ TableView + Wt::Ext +
+
+
+
+ TabWidget + Wt::Ext +
+
+
+
+ TextEdit + Wt::Ext +
+
+
+
+ TimeStamp + Wt::WLogger +
+
+
+
+ ToolBar + Wt::Ext +
+
+
+
+ ToolTipConfig + Wt::Ext +
+
+
+
+ Touch + Wt +
+
+
+
+ Transaction + Wt::Dbo +
+
+
+
+ TRSRDecomposition + Wt::WTransform +
+
+
+
+ TRSSDecomposition + Wt::WTransform +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_75.html b/wt-3.1.7a/doc/reference/html/search/classes_75.html new file mode 100644 index 0000000..a32e768 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_75.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ UpdateLock + Wt::WApplication +
+
+
+
+ UploadedFile + Wt::Http +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/classes_77.html b/wt-3.1.7a/doc/reference/html/search/classes_77.html new file mode 100644 index 0000000..4f2b166 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/classes_77.html @@ -0,0 +1,1064 @@ + + + + + + + +
+
Loading...
+
+
+ WAbstractArea + Wt +
+
+
+
+ WAbstractChart + Wt::Chart +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ WAccordionLayout + Wt +
+
+
+ +
+
+
+ WAnchor + Wt +
+
+
+
+ WApplication + Wt +
+
+
+
+ WAxis + Wt::Chart +
+
+
+ +
+
+
+ WBorder + Wt +
+
+
+
+ WBorderLayout + Wt +
+
+
+
+ WBoxLayout + Wt +
+
+
+
+ WBreak + Wt +
+
+
+
+ WBrush + Wt +
+
+
+
+ WButtonGroup + Wt +
+
+
+
+ WCalendar + Wt +
+
+
+ +
+
+
+ WCartesianChart + Wt::Chart +
+
+
+
+ WChart2DRenderer + Wt::Chart +
+
+
+
+ WChartPalette + Wt::Chart +
+
+
+
+ WCheckBox + Wt +
+
+
+
+ WCircleArea + Wt +
+
+
+
+ WColor + Wt +
+
+ +
+
+ WComboBox + Wt +
+
+
+
+ WCompositeWidget + Wt +
+
+
+
+ WContainerWidget + Wt +
+
+
+ +
+
+
+ WCssRule + Wt +
+
+
+
+ WCssStyleSheet + Wt +
+
+
+
+ WCssTemplateRule + Wt +
+
+
+
+ WCssTextRule + Wt +
+
+
+
+ WDataSeries + Wt::Chart +
+
+
+
+ WDate + Wt +
+
+
+
+ WDatePicker + Wt +
+
+
+
+ WDateTime + Wt +
+
+
+
+ WDateValidator + Wt +
+
+
+
+ WDefaultLayout + Wt +
+
+ +
+
+ WDialog + Wt +
+
+
+
+ WDoubleValidator + Wt +
+
+
+
+ WDropEvent + Wt +
+
+
+
+ WEnvironment + Wt +
+
+
+
+ WFileResource + Wt +
+
+
+
+ WFileUpload + Wt +
+
+
+
+ WFitLayout + Wt +
+
+
+
+ WFlashObject + Wt +
+
+
+
+ WFont + Wt +
+
+
+
+ WFormWidget + Wt +
+
+
+
+ WGenericMatrix + Wt +
+
+ +
+
+ WGestureEvent + Wt +
+
+
+
+ WGLWidget + Wt +
+
+
+
+ WGoogleMap + Wt +
+
+
+
+ WGridLayout + Wt +
+
+
+
+ WGroupBox + Wt +
+
+
+
+ WHBoxLayout + Wt +
+
+
+
+ WHTML5Audio + Wt +
+
+
+
+ WHTML5Media + Wt +
+
+
+
+ WHTML5Video + Wt +
+
+
+
+ WIconPair + Wt +
+
+
+
+ Widget + Wt::Ext +
+
+
+
+ WImage + Wt +
+
+
+
+ WInPlaceEdit + Wt +
+
+
+
+ WInteractWidget + Wt +
+
+
+
+ WIntValidator + Wt +
+
+
+
+ WItemDelegate + Wt +
+
+
+ +
+
+
+ WKeyEvent + Wt +
+
+
+
+ WLabel + Wt +
+
+
+
+ WLayout + Wt +
+
+
+
+ WLayoutItem + Wt +
+
+
+
+ WLayoutItemImpl + Wt +
+
+
+
+ WLength + Wt +
+
+
+
+ WLengthValidator + Wt +
+
+
+
+ WLineEdit + Wt +
+
+
+
+ WLineF + Wt +
+
+
+ +
+
+ +
+
+
+ WLogEntry + Wt +
+
+
+
+ WLogger + Wt +
+
+
+
+ WMatrix4x4 + Wt +
+
+
+
+ WMemoryResource + Wt +
+
+
+
+ WMenu + Wt +
+
+
+
+ WMenuItem + Wt +
+
+
+
+ WMessageBox + Wt +
+
+ +
+
+ WModelIndex + Wt +
+
+
+
+ WMouseEvent + Wt +
+
+
+
+ WObject + Wt +
+
+ +
+
+ WPaintDevice + Wt +
+
+
+
+ WPaintedWidget + Wt +
+
+
+
+ WPainter + Wt +
+
+
+
+ WPainterPath + Wt +
+
+
+
+ WPanel + Wt +
+
+
+
+ WPdfImage + Wt +
+
+
+
+ WPen + Wt +
+
+
+
+ WPieChart + Wt::Chart +
+
+
+
+ WPoint + Wt +
+
+
+
+ WPointF + Wt +
+
+
+
+ WPolygonArea + Wt +
+
+
+
+ WPopupMenu + Wt +
+
+
+
+ WPopupMenuItem + Wt +
+
+
+
+ WProgressBar + Wt +
+
+
+
+ WPushButton + Wt +
+
+
+
+ WRadioButton + Wt +
+
+
+
+ WRasterImage + Wt +
+
+
+
+ WRectArea + Wt +
+
+
+
+ WRectF + Wt +
+
+
+
+ WRegExpValidator + Wt +
+
+
+
+ WResource + Wt +
+
+
+
+ WScrollArea + Wt +
+
+
+
+ WScrollBar + Wt +
+
+
+
+ WScrollEvent + Wt +
+
+
+
+ WSelectionBox + Wt +
+
+
+
+ WServer + Wt +
+
+
+
+ WShadow + Wt +
+
+
+
+ WSignalMapper + Wt +
+
+ +
+ +
+ + +
+
+ WSlider + Wt +
+
+
+
+ WSocketNotifier + Wt +
+
+
+ +
+
+
+ WSound + Wt +
+
+
+
+ WSpinBox + Wt +
+
+
+
+ WStackedWidget + Wt +
+
+
+
+ WStandardItem + Wt +
+
+
+ +
+
+
+ WStandardPalette + Wt::Chart +
+
+
+
+ WStaticModelView + Wt +
+
+
+
+ WString + Wt +
+
+
+
+ WStringListModel + Wt +
+
+
+
+ WSubMenuItem + Wt +
+
+
+
+ WSuggestionPopup + Wt +
+
+
+
+ WSvgImage + Wt +
+
+
+
+ WTable + Wt +
+
+
+
+ WTableCell + Wt +
+
+
+
+ WTableColumn + Wt +
+
+
+
+ WTableRow + Wt +
+
+
+
+ WTableView + Wt +
+
+
+
+ WTabWidget + Wt +
+
+
+
+ WTemplate + Wt +
+
+
+
+ WTestEnvironment + Wt::Test +
+
+
+
+ WText + Wt +
+
+
+
+ WTextArea + Wt +
+
+
+
+ WTextEdit + Wt +
+
+
+
+ WTime + Wt +
+
+
+
+ WTimer + Wt +
+
+
+
+ WTouchEvent + Wt +
+
+
+
+ WTransform + Wt +
+
+
+
+ WTree + Wt +
+
+
+
+ WTreeNode + Wt +
+
+
+
+ WTreeTable + Wt +
+
+
+
+ WTreeTableNode + Wt +
+
+
+
+ WTreeView + Wt +
+
+
+ +
+
+
+ WValidator + Wt +
+
+
+
+ WVBoxLayout + Wt +
+
+
+
+ WVectorImage + Wt +
+
+
+
+ WViewWidget + Wt +
+
+
+
+ WVirtualImage + Wt +
+
+
+
+ WVmlImage + Wt +
+
+
+
+ WWebWidget + Wt +
+
+
+
+ WWidget + Wt +
+
+
+
+ WWidgetItem + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/close.png b/wt-3.1.7a/doc/reference/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/search/close.png differ diff --git a/wt-3.1.7a/doc/reference/html/search/enums_61.html b/wt-3.1.7a/doc/reference/html/search/enums_61.html new file mode 100644 index 0000000..6ed6877 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_61.html @@ -0,0 +1,62 @@ + + + + + + + +
+
Loading...
+
+
+ AjaxMethod + Wt::WApplication +
+
+
+
+ AlignmentFlag + Wt +
+
+
+
+ AnchorTarget + Wt +
+
+
+
+ Axis + Wt::Chart +
+
+
+
+ AxisProperty + Wt::Chart::WChart2DRenderer +
+
+
+
+ AxisScale + Wt::Chart +
+
+
+
+ AxisValue + Wt::Chart +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_62.html b/wt-3.1.7a/doc/reference/html/search/enums_62.html new file mode 100644 index 0000000..6598d40 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_62.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Button + Wt::WMouseEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_63.html b/wt-3.1.7a/doc/reference/html/search/enums_63.html new file mode 100644 index 0000000..21ac1e8 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_63.html @@ -0,0 +1,80 @@ + + + + + + + +
+
Loading...
+
+
+ ChangeFlag + Wt::WPaintDevice +
+
+
+
+ CharEncoding + Wt +
+
+
+
+ ChartType + Wt::Chart +
+
+
+
+ CheckState + Wt +
+
+
+
+ ChildCountPolicy + Wt::WTreeNode +
+
+
+
+ ClientOption + Wt::Http::Client +
+
+
+
+ ClientSideRenderer + Wt::WGLWidget +
+
+
+
+ ContentType + Wt::WEnvironment +
+
+
+
+ Cursor + Wt +
+
+
+
+ CustomFlag + Wt::Chart::WDataSeries +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_64.html b/wt-3.1.7a/doc/reference/html/search/enums_64.html new file mode 100644 index 0000000..8bddfac --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_64.html @@ -0,0 +1,53 @@ + + + + + + + +
+
Loading...
+
+
+ DataLocation + Wt::Ext +
+
+
+
+ DateTimeStorage + Wt::Dbo::backend::Sqlite3 +
+
+ +
+
+ Direction + Wt::WBoxLayout +
+
+
+
+ DropAction + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_65.html b/wt-3.1.7a/doc/reference/html/search/enums_65.html new file mode 100644 index 0000000..13bb132 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_65.html @@ -0,0 +1,47 @@ + + + + + + + +
+
Loading...
+ +
+
+ EditOption + Wt::WAbstractItemView +
+
+
+
+ EditTrigger + Wt::WAbstractItemView +
+
+
+
+ EntryPointType + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_66.html b/wt-3.1.7a/doc/reference/html/search/enums_66.html new file mode 100644 index 0000000..1fe4976 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_66.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ FillRangeType + Wt::Chart +
+
+
+
+ Flags + Wt::Dbo::FieldInfo +
+
+
+
+ Flavour + Wt::Chart::WStandardPalette +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_67.html b/wt-3.1.7a/doc/reference/html/search/enums_67.html new file mode 100644 index 0000000..5430294 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_67.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ GenericFamily + Wt::WFont +
+
+
+
+ GLenum + Wt::WGLWidget +
+
+
+
+ GlobalColor + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_68.html b/wt-3.1.7a/doc/reference/html/search/enums_68.html new file mode 100644 index 0000000..5be615f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_68.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ HeaderFlag + Wt +
+
+
+
+ HorizontalHeaderFormat + Wt::WCalendar +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_69.html b/wt-3.1.7a/doc/reference/html/search/enums_69.html new file mode 100644 index 0000000..8e2b4b9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_69.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ Icon + Wt +
+
+
+
+ ItemDataRole + Wt +
+
+
+
+ ItemFlag + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_6b.html b/wt-3.1.7a/doc/reference/html/search/enums_6b.html new file mode 100644 index 0000000..2f378d6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_6b.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ Key + Wt +
+
+
+
+ KeyboardModifier + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_6c.html b/wt-3.1.7a/doc/reference/html/search/enums_6c.html new file mode 100644 index 0000000..3082214 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_6c.html @@ -0,0 +1,36 @@ + + + + + + + +
+
Loading...
+
+
+ LabelOption + Wt::Chart +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_6d.html b/wt-3.1.7a/doc/reference/html/search/enums_6d.html new file mode 100644 index 0000000..7e70323 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_6d.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ MapTypeControl + Wt::WGoogleMap +
+
+
+
+ MarkerType + Wt::Chart +
+
+
+
+ MatchFlag + Wt +
+
+
+
+ MessageLocation + Wt::Ext::FormField +
+
+
+
+ MetaHeaderType + Wt +
+
+
+
+ Method + Wt::WPaintedWidget +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_6f.html b/wt-3.1.7a/doc/reference/html/search/enums_6f.html new file mode 100644 index 0000000..9d51b1d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_6f.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ Options + Wt::WHTML5Media +
+
+
+
+ Orientation + Wt +
+
+
+
+ Overflow + Wt::WContainerWidget +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_70.html b/wt-3.1.7a/doc/reference/html/search/enums_70.html new file mode 100644 index 0000000..6e771e6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_70.html @@ -0,0 +1,68 @@ + + + + + + + +
+
Loading...
+
+
+ PaintFlag + Wt +
+
+
+
+ PenCapStyle + Wt +
+
+
+
+ PenJoinStyle + Wt +
+
+
+
+ PenStyle + Wt +
+
+
+
+ PopupTrigger + Wt::WSuggestionPopup +
+
+
+
+ Position + Wt::WBorderLayout +
+
+
+
+ PositionScheme + Wt +
+
+
+
+ PreloadMode + Wt::WHTML5Media +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_72.html b/wt-3.1.7a/doc/reference/html/search/enums_72.html new file mode 100644 index 0000000..f4e1cbb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_72.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ RegExpFlag + Wt +
+
+
+
+ RelationType + Wt::Dbo +
+
+
+
+ RenderHint + Wt::WPainter +
+
+
+
+ Repeat + Wt::WCssDecorationStyle +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_73.html b/wt-3.1.7a/doc/reference/html/search/enums_73.html new file mode 100644 index 0000000..ea03920 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_73.html @@ -0,0 +1,101 @@ + + + + + + + +
+
Loading...
+
+
+ Scope + Wt::WMessageResourceBundle +
+
+
+
+ ScrollBarPolicy + Wt::WScrollArea +
+
+
+ +
+
+
+ SelectionFlag + Wt +
+
+
+
+ SelectionMode + Wt +
+
+
+
+ SeriesType + Wt::Chart +
+
+
+
+ Side + Wt +
+
+
+
+ Size + Wt::WFont +
+
+
+
+ SortOrder + Wt +
+
+
+
+ SqlDateTimeType + Wt::Dbo +
+
+
+
+ StandardButton + Wt +
+
+
+
+ State + Wt::WValidator +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_74.html b/wt-3.1.7a/doc/reference/html/search/enums_74.html new file mode 100644 index 0000000..1f0703a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_74.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ TextDecoration + Wt::WCssDecorationStyle +
+
+
+
+ TextFormat + Wt +
+
+
+
+ TickPosition + Wt::WSlider +
+
+
+
+ Type + Wt::WSocketNotifier +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_75.html b/wt-3.1.7a/doc/reference/html/search/enums_75.html new file mode 100644 index 0000000..fd56e1a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_75.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ Unit + Wt::WLength +
+
+
+
+ UserAgent + Wt::WEnvironment +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_76.html b/wt-3.1.7a/doc/reference/html/search/enums_76.html new file mode 100644 index 0000000..7b1e613 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_76.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ Variant + Wt::WFont +
+
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enums_77.html b/wt-3.1.7a/doc/reference/html/search/enums_77.html new file mode 100644 index 0000000..3b6997e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enums_77.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ WBrushStyle + Wt +
+
+
+
+ Weight + Wt::WFont +
+
+
+
+ Width + Wt::WBorder +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_61.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_61.html new file mode 100644 index 0000000..6fd62e4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_61.html @@ -0,0 +1,161 @@ + + + + + + + +
+
Loading...
+
+
+ Abort + Wt +
+
+
+
+ Absolute + Wt +
+
+ +
+
+ AlignBaseline + Wt +
+
+
+
+ AlignBottom + Wt +
+
+
+
+ AlignCenter + Wt +
+
+
+
+ AlignJustify + Wt +
+
+
+
+ AlignLeft + Wt +
+
+
+
+ AlignMiddle + Wt +
+
+
+
+ AlignRight + Wt +
+
+
+
+ AlignSub + Wt +
+
+
+
+ AlignSuper + Wt +
+
+
+
+ AlignTextBottom + Wt +
+
+
+
+ AlignTextTop + Wt +
+
+
+
+ AlignTop + Wt +
+
+
+
+ AltModifier + Wt +
+
+
+
+ Antialiasing + Wt::WPainter +
+
+
+
+ Application + Wt +
+
+
+
+ Arora + Wt::WEnvironment +
+
+
+
+ ArrowCursor + Wt +
+
+
+
+ AscendingOrder + Wt +
+
+
+
+ AutoCursor + Wt +
+
+
+
+ Autoplay + Wt::WHTML5Media +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_62.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_62.html new file mode 100644 index 0000000..d806bac --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_62.html @@ -0,0 +1,101 @@ + + + + + + + +
+
Loading...
+
+
+ BarSeries + Wt::Chart +
+
+
+
+ Below + Wt::Ext::FormField +
+
+
+
+ Besides + Wt::Ext::FormField +
+
+
+
+ BevelJoin + Wt +
+
+
+
+ black + Wt +
+
+ +
+
+ blue + Wt +
+
+ +
+
+ Bolder + Wt::WFont +
+
+
+
+ BotAgent + Wt::WEnvironment +
+
+
+
+ Bottom + Wt +
+
+
+
+ BottomToTop + Wt::WBoxLayout +
+
+
+
+ Brush + Wt::WPaintDevice +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_63.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_63.html new file mode 100644 index 0000000..3628d89 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_63.html @@ -0,0 +1,236 @@ + + + + + + + +
+
Loading...
+
+
+ Cancel + Wt +
+
+
+
+ CategoryChart + Wt::Chart +
+
+
+
+ CategoryScale + Wt::Chart +
+
+
+
+ Center + Wt::WBorderLayout +
+
+
+
+ CenterX + Wt +
+
+
+
+ CenterY + Wt +
+
+
+
+ Centimeter + Wt::WLength +
+
+
+
+ Checked + Wt +
+
+
+
+ CheckStateRole + Wt +
+
+
+
+ Chrome0 + Wt::WEnvironment +
+
+
+
+ Chrome1 + Wt::WEnvironment +
+
+
+
+ Chrome2 + Wt::WEnvironment +
+
+
+
+ Chrome3 + Wt::WEnvironment +
+
+
+
+ Chrome4 + Wt::WEnvironment +
+
+
+
+ Chrome5 + Wt::WEnvironment +
+
+
+
+ CircleMarker + Wt::Chart +
+
+
+
+ ClearAndSelect + Wt +
+
+
+
+ ClientSide + Wt::Ext +
+
+
+
+ Clipping + Wt::WPaintDevice +
+
+
+ +
+
+ +
+
+ +
+
+
+ ControlModifier + Wt +
+
+
+
+ Controls + Wt::WHTML5Media +
+
+
+
+ CopyAction + Wt +
+
+
+
+ Critical + Wt +
+
+
+
+ CrossCursor + Wt +
+
+
+
+ CrossMarker + Wt::Chart +
+
+
+
+ Cursive + Wt::WFont +
+
+
+
+ CurveSeries + Wt::Chart +
+
+
+
+ CustomBrush + Wt::Chart::WDataSeries +
+
+
+
+ CustomLabelColor + Wt::Chart::WDataSeries +
+
+
+
+ CustomMarkerBrush + Wt::Chart::WDataSeries +
+
+
+
+ CustomMarkerPen + Wt::Chart::WDataSeries +
+
+
+
+ CustomPen + Wt::Chart::WDataSeries +
+
+
+
+ cyan + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_64.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_64.html new file mode 100644 index 0000000..ac38369 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_64.html @@ -0,0 +1,176 @@ + + + + + + + +
+
Loading...
+
+
+ darkBlue + Wt +
+
+
+
+ darkCyan + Wt +
+
+
+
+ darkGray + Wt +
+
+
+
+ darkGreen + Wt +
+
+
+
+ darkMagenta + Wt +
+
+
+
+ darkRed + Wt +
+
+
+
+ darkYellow + Wt +
+
+
+
+ DashDotDotLine + Wt +
+
+
+
+ DashDotLine + Wt +
+
+
+
+ Dashed + Wt::WBorder +
+
+
+
+ DashLine + Wt +
+
+
+
+ DateScale + Wt::Chart +
+
+
+
+ DateTimeScale + Wt::Chart +
+
+
+
+ DecorationRole + Wt +
+
+
+
+ Default + Wt::WFont +
+
+
+
+ DefaultControl + Wt::WGoogleMap +
+
+
+
+ DescendingOrder + Wt +
+
+
+
+ Deselect + Wt +
+
+
+
+ Disabled + Wt::WTreeNode +
+
+
+
+ DisplayRole + Wt +
+
+
+
+ DotLine + Wt +
+
+
+
+ Dotted + Wt::WBorder +
+
+
+
+ Double + Wt::WBorder +
+
+
+
+ DoubleClicked + Wt::WAbstractItemView +
+
+
+
+ DropDownIcon + Wt::WSuggestionPopup +
+
+
+
+ DynamicScriptTag + Wt::WApplication +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_65.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_65.html new file mode 100644 index 0000000..8face7e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_65.html @@ -0,0 +1,62 @@ + + + + + + + +
+
Loading...
+
+
+ East + Wt::WBorderLayout +
+
+
+
+ Editing + Wt::WSuggestionPopup +
+
+
+
+ EditRole + Wt +
+
+
+
+ Enabled + Wt::WTreeNode +
+
+
+
+ Exception + Wt::WSocketNotifier +
+
+
+
+ Explicit + Wt::WBorder +
+
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_66.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_66.html new file mode 100644 index 0000000..5599fb6 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_66.html @@ -0,0 +1,110 @@ + + + + + + + +
+
Loading...
+
+
+ FancyToolTip + Wt::Ext::FormField +
+
+
+
+ Fantasy + Wt::WFont +
+
+
+
+ Firefox + Wt::WEnvironment +
+
+
+
+ Firefox3_0 + Wt::WEnvironment +
+
+
+
+ Firefox3_1 + Wt::WEnvironment +
+
+
+
+ Firefox3_1b + Wt::WEnvironment +
+
+
+
+ Firefox3_5 + Wt::WEnvironment +
+
+
+
+ Firefox3_6 + Wt::WEnvironment +
+
+
+
+ Fixed + Wt +
+
+
+
+ FixedSize + Wt::WFont +
+
+
+
+ FlatCap + Wt +
+
+
+
+ Font + Wt::WPaintDevice +
+
+
+
+ FontEm + Wt::WLength +
+
+
+
+ FontEx + Wt::WLength +
+
+
+
+ ForeignKey + Wt::Dbo::FieldInfo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_67.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_67.html new file mode 100644 index 0000000..85a1751 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_67.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ Gecko + Wt::WEnvironment +
+
+
+
+ gray + Wt +
+
+
+
+ GrayScale + Wt::Chart::WStandardPalette +
+
+
+
+ green + Wt +
+
+
+
+ Grid + Wt::Chart::WChart2DRenderer +
+
+
+
+ Groove + Wt::WBorder +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_68.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_68.html new file mode 100644 index 0000000..0ec31c2 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_68.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ Hidden + Wt::WBorder +
+
+
+
+ HierarchicalControl + Wt::WGoogleMap +
+
+
+
+ Hints + Wt::WPaintDevice +
+
+
+
+ Horizontal + Wt +
+
+
+
+ HTML4 + Wt::WEnvironment +
+
+
+
+ HtmlCanvas + Wt::WPaintedWidget +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_69.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_69.html new file mode 100644 index 0000000..55ae2cc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_69.html @@ -0,0 +1,170 @@ + + + + + + + +
+
Loading...
+
+
+ IBeamCursor + Wt +
+
+
+
+ IE6 + Wt::WEnvironment +
+
+
+
+ IE7 + Wt::WEnvironment +
+
+
+
+ IE8 + Wt::WEnvironment +
+
+
+
+ IE9 + Wt::WEnvironment +
+
+
+
+ IEMobile + Wt::WEnvironment +
+
+
+
+ Ignore + Wt +
+
+
+
+ Inch + Wt::WLength +
+
+
+
+ Information + Wt +
+
+
+
+ InlineSvgVml + Wt::WPaintedWidget +
+
+
+
+ Inset + Wt::WBorder +
+
+
+
+ Inside + Wt::Chart +
+
+
+
+ InternalPathRole + Wt +
+
+
+
+ Invalid + Wt::WValidator +
+
+
+
+ InvalidEmpty + Wt::WValidator +
+
+
+
+ ISO8601AsText + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ Italic + Wt::WFont +
+
+
+
+ ItemIsDirty + Wt +
+
+
+ +
+
+ +
+
+
+ ItemIsEditable + Wt +
+
+
+
+ ItemIsSelectable + Wt +
+
+
+
+ ItemIsTristate + Wt +
+
+
+ +
+
+
+ ItemIsXHTMLText + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6a.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6a.html new file mode 100644 index 0000000..20d4aab --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6a.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ JulianDaysAsReal + Wt::Dbo::backend::Sqlite3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6b.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6b.html new file mode 100644 index 0000000..d26b76c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6b.html @@ -0,0 +1,368 @@ + + + + + + + +
+
Loading...
+
+
+ Key_A + Wt +
+
+
+
+ Key_Alt + Wt +
+
+
+
+ Key_B + Wt +
+
+
+
+ Key_Backspace + Wt +
+
+
+
+ Key_C + Wt +
+
+
+
+ Key_Control + Wt +
+
+
+
+ Key_D + Wt +
+
+
+
+ Key_Delete + Wt +
+
+
+
+ Key_Down + Wt +
+
+
+
+ Key_E + Wt +
+
+
+
+ Key_End + Wt +
+
+
+
+ Key_Enter + Wt +
+
+
+
+ Key_Escape + Wt +
+
+
+
+ Key_F + Wt +
+
+
+
+ Key_F1 + Wt +
+
+
+
+ Key_F10 + Wt +
+
+
+
+ Key_F11 + Wt +
+
+
+
+ Key_F12 + Wt +
+
+
+
+ Key_F2 + Wt +
+
+
+
+ Key_F3 + Wt +
+
+
+
+ Key_F4 + Wt +
+
+
+
+ Key_F5 + Wt +
+
+
+
+ Key_F6 + Wt +
+
+
+
+ Key_F7 + Wt +
+
+
+
+ Key_F8 + Wt +
+
+
+
+ Key_F9 + Wt +
+
+
+
+ Key_G + Wt +
+
+
+
+ Key_H + Wt +
+
+
+
+ Key_Home + Wt +
+
+
+
+ Key_I + Wt +
+
+
+
+ Key_Insert + Wt +
+
+
+
+ Key_J + Wt +
+
+
+
+ Key_K + Wt +
+
+
+
+ Key_L + Wt +
+
+
+
+ Key_Left + Wt +
+
+
+
+ Key_M + Wt +
+
+
+
+ Key_N + Wt +
+
+
+
+ Key_O + Wt +
+
+
+
+ Key_P + Wt +
+
+
+
+ Key_PageDown + Wt +
+
+
+
+ Key_PageUp + Wt +
+
+
+
+ Key_Q + Wt +
+
+
+
+ Key_R + Wt +
+
+
+
+ Key_Right + Wt +
+
+
+
+ Key_S + Wt +
+
+
+
+ Key_Shift + Wt +
+
+
+
+ Key_Space + Wt +
+
+
+
+ Key_T + Wt +
+
+
+
+ Key_Tab + Wt +
+
+
+
+ Key_U + Wt +
+
+
+
+ Key_unknown + Wt +
+
+
+
+ Key_Up + Wt +
+
+
+
+ Key_V + Wt +
+
+
+
+ Key_W + Wt +
+
+
+
+ Key_X + Wt +
+
+
+
+ Key_Y + Wt +
+
+
+
+ Key_Z + Wt +
+
+
+
+ Konqueror + Wt::WEnvironment +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6c.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6c.html new file mode 100644 index 0000000..488322e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6c.html @@ -0,0 +1,144 @@ + + + + + + + +
+
Loading...
+
+
+ Large + Wt::WFont +
+
+
+
+ Larger + Wt::WFont +
+
+
+
+ Lazy + Wt::WTreeNode +
+
+ +
+
+ LeaveEditorsOpen + Wt::WAbstractItemView +
+
+
+
+ Left + Wt +
+
+
+
+ LeftButton + Wt::WMouseEvent +
+
+
+
+ LeftToRight + Wt::WBoxLayout +
+
+
+
+ LevelRole + Wt +
+
+
+
+ Lighter + Wt::WFont +
+
+
+
+ lightGray + Wt +
+
+
+
+ Line + Wt::Chart::WChart2DRenderer +
+
+
+
+ LinearScale + Wt::Chart +
+
+
+
+ LineSeries + Wt::Chart +
+
+
+
+ LineThrough + Wt::WCssDecorationStyle +
+
+
+
+ LocalEncoding + Wt +
+
+
+
+ LogScale + Wt::Chart +
+
+
+
+ LongDayNames + Wt::WCalendar +
+
+
+
+ Loop + Wt::WHTML5Media +
+
+
+
+ LowQualityShadows + Wt::WPainter +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6d.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6d.html new file mode 100644 index 0000000..c8c211b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6d.html @@ -0,0 +1,227 @@ + + + + + + + +
+
Loading...
+
+
+ magenta + Wt +
+
+
+
+ ManyToMany + Wt::Dbo +
+
+
+
+ ManyToOne + Wt::Dbo +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ MatchEndsWith + Wt +
+
+
+
+ MatchExactly + Wt +
+
+
+
+ MatchRegExp + Wt +
+
+
+
+ MatchStartsWith + Wt +
+
+
+ +
+
+
+ MatchWildCard + Wt +
+
+
+
+ MatchWrap + Wt +
+
+
+
+ MaximumValue + Wt::Chart +
+
+
+
+ MaximumValueFill + Wt::Chart +
+
+ +
+
+ MenuControl + Wt::WGoogleMap +
+
+
+
+ MetaHttpHeader + Wt +
+
+
+
+ MetaModifier + Wt +
+
+
+
+ MetaName + Wt +
+
+
+
+ MiddleButton + Wt::WMouseEvent +
+
+
+
+ Millimeter + Wt::WLength +
+
+
+
+ MinimumValue + Wt::Chart +
+
+
+
+ MinimumValueFill + Wt::Chart +
+
+
+
+ MiterJoin + Wt +
+
+
+
+ MobileWebKit + Wt::WEnvironment +
+
+
+
+ MobileWebKitAndroid + Wt::WEnvironment +
+
+
+
+ MobileWebKitiPhone + Wt::WEnvironment +
+
+
+
+ Monospace + Wt::WFont +
+
+
+
+ MoveAction + Wt +
+
+
+
+ MultipleEditors + Wt::WAbstractItemView +
+
+
+
+ Mutable + Wt::Dbo::FieldInfo +
+
+
+
+ Muted + Wt::Chart::WStandardPalette +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6e.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6e.html new file mode 100644 index 0000000..bdd1bb4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6e.html @@ -0,0 +1,170 @@ + + + + + + + +
+
Loading...
+
+
+ NaturalId + Wt::Dbo::FieldInfo +
+
+
+
+ NeedsQuotes + Wt::Dbo::FieldInfo +
+
+
+
+ Neutral + Wt::Chart::WStandardPalette +
+
+
+
+ NextLevelLoading + Wt::WTreeNode +
+
+
+
+ No + Wt +
+
+
+
+ NoAll + Wt +
+
+
+
+ NoBrush + Wt +
+
+ +
+
+ NoControl + Wt::WGoogleMap +
+
+
+
+ NoEditTrigger + Wt::WAbstractItemView +
+
+
+
+ NoFill + Wt::Chart +
+
+
+
+ NoIcon + Wt +
+
+
+
+ NoLabels + Wt::Chart +
+
+
+
+ NoMarker + Wt::Chart +
+
+
+
+ NoModifier + Wt +
+
+
+
+ None + Wt::WBorder +
+
+
+
+ NoPen + Wt +
+
+
+
+ NoRepeat + Wt::WCssDecorationStyle +
+
+ +
+
+ NormalStyle + Wt::WFont +
+
+
+
+ NormalVariant + Wt::WFont +
+
+
+
+ NormalWeight + Wt::WFont +
+
+
+
+ North + Wt::WBorderLayout +
+
+
+
+ NoSelection + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_6f.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_6f.html new file mode 100644 index 0000000..c77e5d5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_6f.html @@ -0,0 +1,92 @@ + + + + + + + +
+
Loading...
+
+
+ Oblique + Wt::WFont +
+
+
+
+ Ok + Wt +
+
+
+
+ OpenHandCursor + Wt +
+
+
+
+ Opera + Wt::WEnvironment +
+
+
+
+ OrdinateAxis + Wt::Chart +
+
+
+
+ Outset + Wt::WBorder +
+
+
+
+ Outside + Wt::Chart +
+
+
+
+ OverflowAuto + Wt::WContainerWidget +
+
+
+
+ OverflowHidden + Wt::WContainerWidget +
+
+
+
+ OverflowScroll + Wt::WContainerWidget +
+
+
+
+ OverflowVisible + Wt::WContainerWidget +
+
+
+
+ Overline + Wt::WCssDecorationStyle +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_70.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_70.html new file mode 100644 index 0000000..9cf6809 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_70.html @@ -0,0 +1,135 @@ + + + + + + + +
+
Loading...
+
+
+ PAINT_GL + Wt::WGLWidget +
+
+
+
+ PaintUpdate + Wt +
+
+
+
+ PartiallyChecked + Wt +
+
+ +
+
+ Pen + Wt::WPaintDevice +
+
+
+
+ Percentage + Wt::WLength +
+
+
+
+ Pica + Wt::WLength +
+
+
+
+ Pixel + Wt::WLength +
+
+
+
+ PlainText + Wt +
+
+
+
+ PlainToolTip + Wt::Ext::FormField +
+
+
+
+ PngImage + Wt::WPaintedWidget +
+
+
+
+ Point + Wt::WLength +
+
+
+ +
+
+
+ PointSeries + Wt::Chart +
+
+
+
+ PreloadAuto + Wt::WHTML5Media +
+
+ +
+
+ PreloadMetadata + Wt::WHTML5Media +
+
+
+
+ PreloadNone + Wt::WHTML5Media +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_71.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_71.html new file mode 100644 index 0000000..1d27d22 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_71.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Question + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_72.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_72.html new file mode 100644 index 0000000..c025e9b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_72.html @@ -0,0 +1,137 @@ + + + + + + + +
+
Loading...
+
+
+ Read + Wt::WSocketNotifier +
+
+
+
+ red + Wt +
+
+ +
+
+ Relative + Wt +
+
+
+
+ RenderEditing + Wt +
+
+
+
+ RenderFocused + Wt +
+
+
+
+ RenderInvalid + Wt +
+
+
+
+ RenderSelected + Wt +
+
+
+
+ RepeatX + Wt::WCssDecorationStyle +
+
+
+
+ RepeatXY + Wt::WCssDecorationStyle +
+
+
+
+ RepeatY + Wt::WCssDecorationStyle +
+
+
+
+ RESIZE_GL + Wt::WGLWidget +
+
+
+
+ Retry + Wt +
+
+
+
+ Ridge + Wt::WBorder +
+
+
+
+ Right + Wt +
+
+
+
+ RightButton + Wt::WMouseEvent +
+
+
+
+ RightToLeft + Wt::WBoxLayout +
+
+
+
+ RoundCap + Wt +
+
+
+
+ RoundJoin + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_73.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_73.html new file mode 100644 index 0000000..6f67968 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_73.html @@ -0,0 +1,254 @@ + + + + + + + +
+
Loading...
+
+
+ Safari + Wt::WEnvironment +
+
+
+
+ Safari3 + Wt::WEnvironment +
+
+
+
+ Safari4 + Wt::WEnvironment +
+
+
+
+ SansSerif + Wt::WFont +
+
+
+
+ SaveWhenClosed + Wt::WAbstractItemView +
+
+
+
+ ScatterPlot + Wt::Chart +
+
+
+
+ ScrollBarAlwaysOff + Wt::WScrollArea +
+
+
+
+ ScrollBarAlwaysOn + Wt::WScrollArea +
+
+
+
+ ScrollBarAsNeeded + Wt::WScrollArea +
+
+
+
+ Select + Wt +
+
+
+
+ SelectedClicked + Wt::WAbstractItemView +
+
+
+
+ SelectItems + Wt +
+
+
+
+ SelectRows + Wt +
+
+
+
+ Serif + Wt::WFont +
+
+
+
+ ServerSide + Wt::Ext +
+
+
+
+ Shadow + Wt::WPaintDevice +
+
+
+
+ ShiftModifier + Wt +
+
+
+
+ ShortDayNames + Wt::WCalendar +
+
+
+
+ SingleClicked + Wt::WAbstractItemView +
+
+
+
+ SingleEditor + Wt::WAbstractItemView +
+
+
+
+ SingleLetterDayNames + Wt::WCalendar +
+
+
+
+ SingleSelection + Wt +
+
+
+
+ Small + Wt::WFont +
+
+
+
+ SmallCaps + Wt::WFont +
+
+
+
+ Smaller + Wt::WFont +
+
+
+
+ Solid + Wt::WBorder +
+
+
+
+ SolidLine + Wt +
+
+
+
+ SolidPattern + Wt +
+
+
+
+ South + Wt::WBorderLayout +
+
+
+
+ SqlDate + Wt::Dbo +
+
+
+
+ SqlDateTime + Wt::Dbo +
+
+
+
+ SqlTime + Wt::Dbo +
+
+
+
+ SquareCap + Wt +
+
+
+
+ SquareMarker + Wt::Chart +
+
+
+
+ Static + Wt +
+
+
+
+ StaticResource + Wt +
+
+
+
+ StyleClassRole + Wt +
+
+
+
+ SupportsAjax + Wt::Http::Client +
+
+
+
+ SurrogateId + Wt::Dbo::FieldInfo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_74.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_74.html new file mode 100644 index 0000000..a3b2092 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_74.html @@ -0,0 +1,128 @@ + + + + + + + +
+
Loading...
+
+
+ TargetNewWindow + Wt +
+
+
+
+ TargetSelf + Wt +
+
+
+
+ TargetThisWindow + Wt +
+
+
+
+ TextLabel + Wt::Chart +
+
+
+
+ TextPercentage + Wt::Chart +
+
+
+
+ Thick + Wt::WBorder +
+
+
+
+ Thin + Wt::WBorder +
+
+
+
+ TicksAbove + Wt::WSlider +
+
+
+
+ TicksBelow + Wt::WSlider +
+
+
+
+ TicksLeft + Wt::WSlider +
+
+
+
+ TicksRight + Wt::WSlider +
+
+
+
+ ToggleSelect + Wt +
+
+
+
+ ToolTipRole + Wt +
+
+
+
+ Top + Wt +
+
+
+
+ TopToBottom + Wt::WBoxLayout +
+
+
+
+ Transform + Wt::WPaintDevice +
+
+
+
+ transparent + Wt +
+
+
+
+ TriangleMarker + Wt::Chart +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_75.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_75.html new file mode 100644 index 0000000..203c8f1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_75.html @@ -0,0 +1,68 @@ + + + + + + + +
+
Loading...
+
+
+ Unchecked + Wt +
+
+
+
+ Underline + Wt::WCssDecorationStyle +
+
+
+
+ UnixTimeAsInteger + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ Unknown + Wt::WEnvironment +
+
+
+
+ UPDATE_GL + Wt::WGLWidget +
+
+
+
+ UrlRole + Wt +
+
+
+
+ UserRole + Wt +
+
+
+
+ UTF8 + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_76.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_76.html new file mode 100644 index 0000000..2eb330c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_76.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ Valid + Wt::WValidator +
+
+
+
+ Value + Wt::WFont +
+
+
+
+ Version + Wt::Dbo::FieldInfo +
+
+
+
+ Vertical + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_77.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_77.html new file mode 100644 index 0000000..18e1f03 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_77.html @@ -0,0 +1,68 @@ + + + + + + + +
+
Loading...
+
+
+ WaitCursor + Wt +
+
+
+
+ Warning + Wt +
+
+
+
+ WebKit + Wt::WEnvironment +
+
+
+
+ West + Wt::WBorderLayout +
+
+
+
+ WhatsThisCursor + Wt +
+
+
+
+ white + Wt +
+
+
+
+ WidgetSet + Wt +
+
+
+
+ Write + Wt::WSocketNotifier +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_78.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_78.html new file mode 100644 index 0000000..62a0056 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_78.html @@ -0,0 +1,80 @@ + + + + + + + +
+
Loading...
+
+
+ XAxis + Wt::Chart +
+
+
+
+ XCrossMarker + Wt::Chart +
+
+
+
+ XHTML1 + Wt::WEnvironment +
+
+
+
+ XHTMLText + Wt +
+
+
+
+ XHTMLUnsafeText + Wt +
+
+
+
+ XLarge + Wt::WFont +
+
+
+
+ XMLHttpRequest + Wt::WApplication +
+
+
+
+ XSmall + Wt::WFont +
+
+
+
+ XXLarge + Wt::WFont +
+
+
+
+ XXSmall + Wt::WFont +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_79.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_79.html new file mode 100644 index 0000000..c681276 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_79.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ Y1Axis + Wt::Chart +
+
+
+
+ Y2Axis + Wt::Chart +
+
+
+
+ YAxis + Wt::Chart +
+
+
+
+ yellow + Wt +
+
+
+
+ Yes + Wt +
+
+
+
+ YesAll + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/enumvalues_7a.html b/wt-3.1.7a/doc/reference/html/search/enumvalues_7a.html new file mode 100644 index 0000000..f5d6a6e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/enumvalues_7a.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ ZeroValue + Wt::Chart +
+
+
+
+ ZeroValueFill + Wt::Chart +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_61.html b/wt-3.1.7a/doc/reference/html/search/functions_61.html new file mode 100644 index 0000000..be31a3e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_61.html @@ -0,0 +1,766 @@ + + + + + + + +
+
Loading...
+
+
+ aboutToHide + Wt::WPopupMenu +
+
+ +
+
+ acceptDropMimeTypes + Wt::WAbstractItemModel +
+
+
+
+ acceptDrops + Wt::WWidget +
+
+ + +
+
+ activeTexture + Wt::WGLWidget +
+
+ +
+
+ addAggregate + Wt::WAggregateProxyModel +
+
+
+
+ addAllFieldsAsColumns + Wt::Dbo::QueryModel +
+
+ +
+
+ addAutoJavaScript + Wt::WApplication +
+
+ +
+
+ addChild + Wt::WObject +
+
+
+
+ addChildNode + Wt::WTreeNode +
+
+ + + + +
+
+ addEntryPoint + Wt::WServer +
+
+
+
+ addField + Wt::WLogger +
+
+
+
+ addFooterButton + Wt::Ext::Panel +
+
+
+
+ addHeader + Wt::Http::Response +
+
+ + +
+
+ addMarker + Wt::WGoogleMap +
+
+ + + + +
+
+ addPath + Wt::WPainterPath +
+
+ +
+
+ addPolyline + Wt::WGoogleMap +
+
+ +
+
+ addResource + Wt::WServer +
+
+
+
+ addRow + Wt::Dbo::QueryModel +
+
+ + + +
+
+ addSeries + Wt::Chart::WCartesianChart +
+
+ +
+
+ addSpacing + Wt::WBoxLayout +
+
+ +
+
+ addString + Wt::WStringListModel +
+
+ +
+
+ addSuggestion + Wt::WSuggestionPopup +
+
+ + + +
+
+ adjoint + Wt::WTransform +
+
+
+
+ affectedRowCount + Wt::Dbo::SqlStatement +
+
+
+
+ agent + Wt::WEnvironment +
+
+
+
+ agentIsChrome + Wt::WEnvironment +
+
+
+
+ agentIsGecko + Wt::WEnvironment +
+
+
+
+ agentIsIE + Wt::WEnvironment +
+
+
+
+ agentIsIElt + Wt::WEnvironment +
+
+
+
+ agentIsIEMobile + Wt::WEnvironment +
+
+
+
+ agentIsMobileWebKit + Wt::WEnvironment +
+
+
+
+ agentIsOpera + Wt::WEnvironment +
+
+
+
+ agentIsSafari + Wt::WEnvironment +
+
+
+
+ agentIsSpiderBot + Wt::WEnvironment +
+
+
+
+ agentIsWebKit + Wt::WEnvironment +
+
+
+
+ ajax + Wt::WEnvironment +
+
+
+
+ ajaxMethod + Wt::WApplication +
+
+
+
+ alpha + Wt::WColor +
+
+ + + +
+
+ animate + Wt::Ext::Panel +
+
+ + +
+
+ appendRows + Wt::WStandardItem +
+
+ + +
+
+ arcTo + Wt::WPainterPath +
+
+ + + +
+
+ args + Wt::WString +
+
+ + +
+
+ attachShader + Wt::WGLWidget +
+
+
+
+ attachThread + Wt::WApplication +
+
+ +
+
+ autoExpandColumn + Wt::Ext::TableView +
+
+ + + +
+
+ autoLimits + Wt::Chart::WAxis +
+
+
+
+ autoScrollBars + Wt::Ext::Panel +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_62.html b/wt-3.1.7a/doc/reference/html/search/functions_62.html new file mode 100644 index 0000000..329d4a9 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_62.html @@ -0,0 +1,464 @@ + + + + + + + +
+
Loading...
+
+
+ background + Wt::Chart::WAbstractChart +
+
+
+
+ backgroundColor + Wt::WCssDecorationStyle +
+
+
+
+ backgroundImage + Wt::WCssDecorationStyle +
+
+
+
+ backgroundImageRepeat + Wt::WCssDecorationStyle +
+
+
+
+ barMargin + Wt::Chart::WCartesianChart +
+
+
+
+ barWidth + Wt::Chart::WDataSeries +
+
+
+
+ BaseItem + Wt::WAbstractProxyModel::BaseItem +
+
+
+
+ batchSize + Wt::Dbo::QueryModel +
+
+ +
+
+ beginInsertColumns + Wt::WAbstractItemModel +
+
+
+
+ beginInsertRows + Wt::WAbstractItemModel +
+
+
+
+ beginRemoveColumns + Wt::WAbstractItemModel +
+
+
+
+ beginRemoveRows + Wt::WAbstractItemModel +
+
+
+
+ beingDeleted + Wt::WResource +
+
+
+
+ belongsTo + Wt::Dbo +
+
+ +
+
+ bindAttribLocation + Wt::WGLWidget +
+
+
+
+ bindBuffer + Wt::WGLWidget +
+
+
+
+ bindInt + Wt::WTemplate +
+
+
+
+ bindNull + Wt::Dbo::SqlStatement +
+
+
+
+ bindString + Wt::WTemplate +
+
+
+
+ bindTexture + Wt::WGLWidget +
+
+
+
+ bindToAxis + Wt::Chart::WDataSeries +
+
+ +
+
+ blendColor + Wt::WGLWidget +
+
+
+
+ blendEquation + Wt::WGLWidget +
+
+
+
+ blendEquationSeparate + Wt::WGLWidget +
+
+
+
+ blendFunc + Wt::WGLWidget +
+
+
+
+ blendFuncSeparate + Wt::WGLWidget +
+
+ +
+
+ blue + Wt::WColor +
+
+
+
+ blur + Wt::WShadow +
+
+ +
+
+ bodyClass + Wt::WApplication +
+
+ + + + +
+
+ bottomLeft + Wt::WRectF +
+
+
+
+ bottomRight + Wt::WRectF +
+
+
+
+ bottomToolBar + Wt::Ext::Panel +
+
+ + +
+
+ browseTo + Wt::WCalendar +
+
+
+
+ browseToNextMonth + Wt::WCalendar +
+
+
+
+ browseToNextYear + Wt::WCalendar +
+
+
+
+ browseToPreviousMonth + Wt::WCalendar +
+
+
+
+ browseToPreviousYear + Wt::WCalendar +
+
+ +
+
+ buddy + Wt::WLabel +
+
+
+
+ bufferDatafv + Wt::WGLWidget +
+
+
+
+ bufferDataiv + Wt::WGLWidget +
+
+
+
+ bufferSize + Wt::WFileResource +
+
+
+
+ bufferSubDatafv + Wt::WGLWidget +
+
+
+
+ bufferSubDataiv + Wt::WGLWidget +
+
+ + +
+
+ buttonResult + Wt::WMessageBox +
+
+ + +
+
+ ByteRangeSpecifier + Wt::Http::Request::ByteRangeSpecifier +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_63.html b/wt-3.1.7a/doc/reference/html/search/functions_63.html new file mode 100644 index 0000000..a8c8bd5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_63.html @@ -0,0 +1,1255 @@ + + + + + + + +
+
Loading...
+
+
+ calcChartArea + Wt::Chart::WChart2DRenderer +
+
+
+
+ calcNumBarGroups + Wt::Chart::WChart2DRenderer +
+
+ +
+
+ Call + Wt::Dbo::Call +
+
+ +
+
+ cancel + Wt::Ext::ProgressDialog +
+
+
+
+ cancelButton + Wt::WInPlaceEdit +
+
+
+
+ canceled + Wt::Ext::ProgressDialog +
+
+
+
+ canUpload + Wt::WFileUpload +
+
+
+
+ capStyle + Wt::WPen +
+
+
+
+ caption + Wt::WDialog +
+
+
+
+ cellClicked + Wt::Ext::TableView +
+
+
+
+ center + Wt::WRectF +
+
+
+
+ centerX + Wt::WCircleArea +
+
+
+
+ centerY + Wt::WCircleArea +
+
+
+
+ centralWidget + Wt::WPanel +
+
+ +
+
+ changedTouches + Wt::WTouchEvent +
+
+
+
+ charCode + Wt::WKeyEvent +
+
+ +
+
+ chartArea + Wt::Chart::WChart2DRenderer +
+
+
+
+ chartSegmentArea + Wt::Chart::WChart2DRenderer +
+
+ + +
+
+ checkedButton + Wt::WButtonGroup +
+
+
+
+ checkedChanged + Wt::WButtonGroup +
+
+
+
+ checkedId + Wt::WButtonGroup +
+
+
+
+ checkResize + Wt::WGoogleMap +
+
+ + +
+
+ childCountPolicy + Wt::WTreeNode +
+
+
+
+ childNodes + Wt::WTreeNode +
+
+ + +
+
+ clearColor + Wt::WGLWidget +
+
+
+
+ clearDepth + Wt::WGLWidget +
+
+
+
+ clearOverlays + Wt::WGoogleMap +
+
+ + +
+
+ clearSources + Wt::WHTML5Media +
+
+
+
+ clearStencil + Wt::WGLWidget +
+
+
+
+ clearSuggestions + Wt::WSuggestionPopup +
+
+ + + +
+
+ clipPath + Wt::WPainter +
+
+ + + +
+
+ closeEditors + Wt::WAbstractItemView +
+
+
+
+ closeMessage + Wt::WApplication +
+
+
+
+ closeSignal + Wt::WMenuItem +
+
+
+
+ closeSubPath + Wt::WPainterPath +
+
+
+
+ closeTab + Wt::WTabWidget +
+
+ + + +
+
+ collection + Wt::Dbo::collection +
+
+ +
+
+ colorMask + Wt::WGLWidget +
+
+ +
+
+ column1Fixed + Wt::WTreeView +
+
+ +
+
+ columnAt + Wt::WTable +
+
+ +
+
+ columnFlags + Wt::Dbo::QueryModel +
+
+
+
+ columnFormat + Wt::WTreeView +
+
+
+
+ columnIsResizable + Wt::WGridLayout +
+
+
+
+ columnNum + Wt::WTableColumn +
+
+
+
+ columnResized + Wt::WAbstractItemView +
+
+
+
+ columns + Wt::WTextArea +
+
+
+
+ columnsAboutToBeInserted + Wt::WAbstractItemModel +
+
+
+
+ columnsAboutToBeRemoved + Wt::WAbstractItemModel +
+
+
+
+ columnsInserted + Wt::WAbstractItemModel +
+
+
+
+ columnsMovable + Wt::Ext::TableView +
+
+
+
+ columnSpan + Wt::WTableCell +
+
+
+
+ columnsRemoved + Wt::WAbstractItemModel +
+
+
+
+ columnStretch + Wt::WGridLayout +
+
+
+
+ columnWidget + Wt::WTreeTableNode +
+
+ +
+
+ combinedTransform + Wt::WPainter +
+
+
+
+ ComboBox + Wt::Ext::ComboBox +
+
+
+
+ commit + Wt::Dbo::Transaction +
+
+
+
+ commitAll + Wt::WBatchEditProxyModel +
+
+ + +
+
+ compileShader + Wt::WGLWidget +
+
+
+
+ configureToolTip + Wt::Ext::AbstractButton +
+
+
+
+ connect +
+ Wt::Dbo::backend::Postgres::connect() + Wt::JSignal::connect(const F &function) + Wt::JSignal::connect(T *target, void(V::*method)()) + Wt::JSignal::connect(T *target, void(V::*method)(A1)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5)) + Wt::JSignal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6)) + Wt::JSignal::connect(JSlot &slot) + Wt::SignalBase::connect(WObject *target, WObject::Method method)=0 + Wt::SignalBase::connect(T *target, void(V::*method)()) + Wt::Signal::connect(WObject *target, WObject::Method method) + Wt::Signal::connect(const F &function) + Wt::Signal::connect(T *target, void(V::*method)()) + Wt::Signal::connect(T *target, void(V::*method)(A1)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5)) + Wt::Signal::connect(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6)) + Wt::EventSignal::connect(const F &function) + Wt::EventSignal::connect(T *target, void(V::*method)()) + Wt::EventSignal::connect(T *target, void(V::*method)(E)) + Wt::EventSignal::connect(T *target, void(V::*method)(const E &)) + Wt::EventSignal::connect(const std::string &function) + Wt::EventSignal::connect(JSlot &slot) + Wt::EventSignal::connect(WObject *target, WObject::Method method) +
+
+
+ +
+
+ connectPath + Wt::WPainterPath +
+
+ +
+
+ constData + Wt::WGenericMatrix +
+
+
+
+ Container + Wt::Ext::Container +
+
+ +
+
+ contentAlignment + Wt::WContainerWidget +
+
+
+
+ contentDescription + Wt::WFileUpload +
+
+
+
+ contentLength + Wt::Http::Request +
+
+ +
+
+ contentsStack + Wt::WMenu +
+
+ + +
+
+ controlPointRect + Wt::WPainterPath +
+
+
+
+ cookies + Wt::WEnvironment +
+
+ +
+
+ Coordinates + Wt::Coordinates +
+
+
+
+ copyDataTo + Wt::WGenericMatrix +
+
+
+
+ copyTexImage2D + Wt::WGLWidget +
+
+
+
+ copyTexSubImage2D + Wt::WGLWidget +
+
+ +
+
+ create + Wt::Dbo::query_result_traits +
+
+
+
+ createBuffer + Wt::WGLWidget +
+
+
+
+ createCall + Wt::JSignal +
+
+
+
+ createContinuation + Wt::Http::Response +
+
+
+
+ createEditor + Wt::WItemDelegate +
+
+
+
+ createEventCall + Wt::JSignal +
+
+ +
+
+ createExtraHeaderWidget + Wt::WAbstractItemView +
+
+
+
+ createImage + Wt::WVirtualImage +
+
+ + +
+
+ createJavaScriptMatrix4 + Wt::WGLWidget +
+
+ +
+
+ createPageNavigationBar + Wt::WAbstractItemView +
+
+
+
+ createPagingToolBar + Wt::Ext::TableView +
+
+
+
+ createProgram + Wt::WGLWidget +
+
+
+
+ createRenderer + Wt::Chart::WCartesianChart +
+
+
+
+ createRow + Wt::Dbo::QueryModel +
+
+
+
+ createShader + Wt::WGLWidget +
+
+
+
+ createSourceIndex + Wt::WAbstractProxyModel +
+
+
+
+ createTables + Wt::Dbo::Session +
+
+
+
+ createTexture + Wt::WGLWidget +
+
+
+
+ createTextureAndLoad + Wt::WGLWidget +
+
+ +
+
+ cssTheme + Wt::WApplication +
+
+ + +
+
+ cullFace + Wt::WGLWidget +
+
+
+
+ currentBottomRightX + Wt::WVirtualImage +
+
+
+
+ currentBottomRightY + Wt::WVirtualImage +
+
+
+
+ currentCellChanged + Wt::Ext::TableView +
+
+ +
+
+ currentColumn + Wt::Ext::TableView +
+
+
+
+ currentDate + Wt::WDate +
+
+
+
+ currentDateTime + Wt::WDateTime +
+
+ +
+
+ currentItem + Wt::WMenu +
+
+
+
+ currentMonth + Wt::WCalendar +
+
+ +
+
+ currentPageChanged + Wt::WCalendar +
+
+
+
+ currentPosition + Wt::WPainterPath +
+
+
+
+ currentRow + Wt::Ext::TableView +
+
+
+
+ currentServerDate + Wt::WDate +
+
+
+
+ currentServerTime + Wt::WTime +
+
+ +
+
+ currentTopLeftX + Wt::WVirtualImage +
+
+
+
+ currentTopLeftY + Wt::WVirtualImage +
+
+ +
+
+ currentXSegment + Wt::Chart::SeriesIterator +
+
+
+
+ currentYear + Wt::WCalendar +
+
+
+
+ currentYSegment + Wt::Chart::SeriesIterator +
+
+ +
+
+ cursorImage + Wt::WCssDecorationStyle +
+
+ +
+
+ curstomFlags + Wt::Chart::WDataSeries +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_64.html b/wt-3.1.7a/doc/reference/html/search/functions_64.html new file mode 100644 index 0000000..71a48a0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_64.html @@ -0,0 +1,662 @@ + + + + + + + +
+
Loading...
+ + +
+
+ dataColumn + Wt::Chart::WPieChart +
+
+ +
+
+ DataStore + Wt::Ext::DataStore +
+
+ +
+
+ DateField + Wt::Ext::DateField +
+
+
+
+ dateRenderer + Wt::Ext::TableView +
+
+
+
+ dateTimeStorage + Wt::Dbo::backend::Sqlite3 +
+
+ +
+
+ day + Wt::WDate +
+
+
+
+ dayOfWeek + Wt::WDate +
+
+ +
+
+ Dbo + Wt::Dbo::Dbo +
+
+
+
+ decimalPrecision + Wt::Ext::NumberField +
+
+ +
+
+ declareJavaScriptFunction + Wt::WApplication +
+
+
+
+ decodeFromRawIndex + Wt::WModelIndex +
+
+
+
+ decodeFromRawIndexes + Wt::WModelIndex +
+
+
+ +
+
+
+ decomposeTranslateRotateScaleSkew + Wt::WTransform +
+
+ +
+
+ defaultActionPrevented + Wt::EventSignalBase +
+
+
+
+ defaultButton + Wt::Ext::Dialog +
+
+
+
+ defaultIndex + Wt::WSuggestionPopup +
+
+
+
+ degreesToRadians + Wt::WTransform +
+
+
+
+ deleteBuffer + Wt::WGLWidget +
+
+
+
+ deleteColumn + Wt::WTable +
+
+
+
+ deleteProgram + Wt::WGLWidget +
+
+ +
+
+ deleteShader + Wt::WGLWidget +
+
+
+
+ deleteTexture + Wt::WGLWidget +
+
+
+
+ deploymentPath + Wt::WEnvironment +
+
+
+
+ depthFunc + Wt::WGLWidget +
+
+
+
+ depthMask + Wt::WGLWidget +
+
+
+
+ depthRange + Wt::WGLWidget +
+
+
+
+ descendantAdded + Wt::WTreeNode +
+
+
+
+ descendantRemoved + Wt::WTreeNode +
+
+
+
+ detachShader + Wt::WGLWidget +
+
+ +
+
+ device + Wt::WPainter +
+
+
+
+ Dialog + Wt::Ext::Dialog +
+
+
+
+ direction + Wt::WBoxLayout +
+
+ +
+
+ disableDoubleClickZoom + Wt::WGoogleMap +
+
+
+
+ disableDragging + Wt::WGoogleMap +
+
+
+
+ disableGoogleBar + Wt::WGoogleMap +
+
+
+
+ disableScrollWheelZoom + Wt::WGoogleMap +
+
+
+
+ displayedChildCount + Wt::WTreeNode +
+
+
+
+ displayLabels + Wt::Chart::WPieChart +
+
+
+
+ displayWidget + Wt::WDatePicker +
+
+
+
+ distanceTo + Wt::WGoogleMap::Coordinate +
+
+
+
+ doCollapse + Wt::WTreeNode +
+
+ +
+
+ doExpand + Wt::WTreeNode +
+
+ + + +
+
+ dpiScale + Wt::WEnvironment +
+
+
+
+ dragDelta + Wt::WMouseEvent +
+
+ +
+
+ drawArrays + Wt::WGLWidget +
+
+ +
+
+ drawElements + Wt::WGLWidget +
+
+ + + + +
+
+ drawMarker + Wt::Chart::WCartesianChart +
+
+ + + +
+
+ drawPoints + Wt::WPainter +
+
+
+
+ drawPolygon + Wt::WPainter +
+
+
+
+ drawPolyline + Wt::WPainter +
+
+ + + + +
+
+ dropTables + Wt::Dbo::Session +
+
+
+
+ dx + Wt::WTransform +
+
+
+
+ dy + Wt::WTransform +
+
+
+
+ dynamicSortFilter + Wt::WSortFilterProxyModel +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_65.html b/wt-3.1.7a/doc/reference/html/search/functions_65.html new file mode 100644 index 0000000..c1295d5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_65.html @@ -0,0 +1,403 @@ + + + + + + + +
+
Loading...
+ +
+
+ edit + Wt::WAbstractItemView +
+
+
+
+ editOptions + Wt::WAbstractItemView +
+
+ +
+
+ editTriggers + Wt::WAbstractItemView +
+
+
+
+ elementAt + Wt::WTable +
+
+ + +
+
+ emptyFileName + Wt::WFileUpload +
+
+ + + +
+
+ enableColumnHiding + Wt::Ext::TableView +
+
+
+
+ enableDoubleClickZoom + Wt::WGoogleMap +
+
+ +
+
+ enableGoogleBar + Wt::WGoogleMap +
+
+
+
+ enablePrompt + Wt::Ext::MessageBox +
+
+
+
+ enableScrollWheelZoom + Wt::WGoogleMap +
+
+
+
+ enableTextArea + Wt::Ext::MessageBox +
+
+
+
+ enableUpdates + Wt::WApplication +
+
+
+
+ enableVertexAttribArray + Wt::WGLWidget +
+
+
+
+ encodeAsRawIndex + Wt::WModelIndex +
+
+
+
+ encodeAsRawIndexes + Wt::WModelIndex +
+
+ +
+
+ ended + Wt::WHTML5Media +
+
+
+
+ endInsertColumns + Wt::WAbstractItemModel +
+
+
+
+ endInsertRows + Wt::WAbstractItemModel +
+
+
+
+ endRemoveColumns + Wt::WAbstractItemModel +
+
+
+
+ endRemoveRows + Wt::WAbstractItemModel +
+
+
+
+ endSegment + Wt::Chart::SeriesIterator +
+
+
+
+ endSeries + Wt::Chart::SeriesIterator +
+
+ +
+
+ entry + Wt::WLogger +
+
+
+
+ environment + Wt::WApplication +
+
+
+
+ erase + Wt::Dbo::collection +
+
+ + +
+
+ Exception + Wt::Dbo::Exception +
+
+ +
+
+ execJs + Wt::JSlot +
+
+ + + +
+
+ expandable + Wt::WTreeNode +
+
+ + +
+
+ expandToDepth + Wt::WTreeView +
+
+
+
+ explicitWidth + Wt::WBorder +
+
+
+
+ explode + Wt::Chart::WPieChart +
+
+
+
+ extraHeaderWidget + Wt::WAbstractItemView +
+
+
+
+ extraPlugins + Wt::WTextEdit +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_66.html b/wt-3.1.7a/doc/reference/html/search/functions_66.html new file mode 100644 index 0000000..00d0d81 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_66.html @@ -0,0 +1,376 @@ + + + + + + + +
+
Loading...
+
+
+ field + Wt::Dbo +
+
+ +
+
+ fieldName + Wt::Dbo::QueryModel +
+
+ +
+
+ fileName + Wt::WFileResource +
+
+
+
+ fileTextSize + Wt::WFileUpload +
+
+
+
+ fileTooLarge + Wt::WFileUpload +
+
+
+
+ fill + Wt::WGenericMatrix +
+
+
+
+ fillPath + Wt::WPainter +
+
+
+
+ fillRange + Wt::Chart::WDataSeries +
+
+ +
+
+ filterAcceptRow + Wt::WSortFilterProxyModel +
+
+
+
+ filterFlags + Wt::WSortFilterProxyModel +
+
+
+
+ filterKeyColumn + Wt::WSortFilterProxyModel +
+
+
+
+ filterLength + Wt::WSuggestionPopup +
+
+
+
+ filterModel + Wt::WSuggestionPopup +
+
+
+
+ filterRegExp + Wt::WSortFilterProxyModel +
+
+
+
+ filterRole + Wt::WSortFilterProxyModel +
+
+
+
+ finalize + Wt::WApplication +
+
+ +
+
+ findText + Wt::WComboBox +
+
+ +
+
+ finish + Wt::WGLWidget +
+
+ +
+
+ firstByte + Wt::Http::Request::ByteRange +
+
+
+
+ fixedSize + Wt::WFont +
+
+
+
+ FixedSqlConnectionPool + Wt::Dbo::FixedSqlConnectionPool +
+
+
+
+ fixup + Wt::WValidator +
+
+ +
+
+ flipCoordinates + Wt::WMatrix4x4 +
+
+ + + + + +
+
+ footerButtons + Wt::Ext::Panel +
+
+
+
+ forEdit + Wt::WSuggestionPopup +
+
+
+
+ foregroundColor + Wt::WCssDecorationStyle +
+
+ +
+
+ formats + Wt::WDateValidator +
+
+
+
+ FormField + Wt::Ext::FormField +
+
+
+
+ fromPosixTime + Wt::WDateTime +
+
+
+
+ fromRawIndex + Wt::WAbstractItemModel +
+
+ +
+
+ fromTime_t + Wt::WDateTime +
+
+ +
+
+ frontFace + Wt::WGLWidget +
+
+
+
+ frustum + Wt::WMatrix4x4 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_67.html b/wt-3.1.7a/doc/reference/html/search/functions_67.html new file mode 100644 index 0000000..180d687 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_67.html @@ -0,0 +1,263 @@ + + + + + + + +
+
Loading...
+
+
+ generateMatcherJS + Wt::WSuggestionPopup +
+
+
+
+ generateMipmap + Wt::WGLWidget +
+
+
+
+ generateReplacerJS + Wt::WSuggestionPopup +
+
+
+
+ generateUrl + Wt::WResource +
+
+
+
+ genericFamily + Wt::WFont +
+
+
+
+ gestureChanged + Wt::WInteractWidget +
+
+
+
+ gestureEnded + Wt::WInteractWidget +
+
+
+
+ gestureStarted + Wt::WInteractWidget +
+
+
+
+ getAttribLocation + Wt::WGLWidget +
+
+
+
+ getCgiValue + Wt::WEnvironment +
+
+ +
+
+ getContentsMargins + Wt::WLayout +
+
+
+
+ getCookie + Wt::WEnvironment +
+
+
+
+ getFields + Wt::Dbo::query_result_traits +
+
+
+
+ getOptions + Wt::WHTML5Media +
+
+ + + +
+
+ getRanges + Wt::Http::Request +
+
+ + +
+
+ getStatement + Wt::Dbo::SqlConnection +
+
+
+
+ getUniformLocation + Wt::WGLWidget +
+
+
+
+ getUpdateLock + Wt::WApplication +
+
+
+
+ getUploadedFile + Wt::Http::Request +
+
+
+
+ getValues + Wt::Dbo::query_result_traits +
+
+
+
+ globalEnterPressed + Wt::WApplication +
+
+
+
+ globalEscapePressed + Wt::WApplication +
+
+
+
+ globalKeyPressed + Wt::WApplication +
+
+
+
+ globalKeyWentDown + Wt::WApplication +
+
+
+
+ globalKeyWentUp + Wt::WApplication +
+
+
+
+ green + Wt::WColor +
+
+
+
+ gridImageSize + Wt::WVirtualImage +
+
+
+
+ gridLinesPen + Wt::Chart::WAxis +
+
+
+
+ group + Wt::WRadioButton +
+
+
+
+ groupBy + Wt::Dbo::Query +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_68.html b/wt-3.1.7a/doc/reference/html/search/functions_68.html new file mode 100644 index 0000000..36b51eb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_68.html @@ -0,0 +1,302 @@ + + + + + + + +
+
Loading...
+
+
+ handle + Wt::Ext::Splitter +
+
+ +
+
+ handleUnresolvedVariable + Wt::WTemplate +
+
+
+
+ handleWidth + Wt::Ext::Splitter +
+
+ +
+
+ hasClipping + Wt::WPainter +
+
+
+
+ hasFocus + Wt::WFormWidget +
+
+
+
+ hasIndex + Wt::WAbstractItemModel +
+
+
+
+ hasMany + Wt::Dbo +
+
+
+
+ hasPrompt + Wt::Ext::MessageBox +
+
+ +
+
+ hasTextArea + Wt::Ext::MessageBox +
+
+
+
+ header + Wt::WTreeTable +
+
+
+
+ headerAlignment + Wt::WAbstractItemView +
+
+
+
+ headerCount + Wt::WTable +
+
+ +
+
+ headerDataChanged + Wt::WAbstractItemModel +
+
+ +
+
+ headerHeight + Wt::WAbstractItemView +
+
+ +
+
+ headerWidget + Wt::WTreeTable +
+
+ + + + + +
+
+ highlightMouseOver + Wt::Ext::TableView +
+
+
+
+ hint + Wt::WGLWidget +
+
+
+
+ horizontalHeaderFormat + Wt::WCalendar +
+
+
+
+ horizontalScrollBar + Wt::WScrollArea +
+
+
+
+ horizontalSpacing + Wt::WGridLayout +
+
+
+
+ hostName + Wt::WEnvironment +
+
+
+
+ hour + Wt::WTime +
+
+
+
+ htmlClass + Wt::WApplication +
+
+
+
+ htmlText + Wt::WWidget +
+
+
+
+ httpPort + Wt::WServer +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_69.html b/wt-3.1.7a/doc/reference/html/search/functions_69.html new file mode 100644 index 0000000..9e3dfbc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_69.html @@ -0,0 +1,1178 @@ + + + + + + + +
+
Loading...
+ +
+
+ icon1 + Wt::WIconPair +
+
+
+
+ icon1Clicked + Wt::WIconPair +
+
+
+
+ icon2 + Wt::WIconPair +
+
+
+
+ icon2Clicked + Wt::WIconPair +
+
+ + +
+
+ imageHeight + Wt::WVirtualImage +
+
+
+
+ imageLoaded + Wt::WImage +
+
+
+
+ imagePack + Wt::WTreeNode +
+
+
+
+ imageRef + Wt::WImage +
+
+
+
+ imageWidth + Wt::WVirtualImage +
+
+ +
+
+ implementation + Wt::WCompositeWidget +
+
+
+
+ implementJavaScript + Wt::WObject +
+
+ +
+
+ in + Wt::Http::Request +
+
+ +
+
+ indexFromItem + Wt::WStandardItemModel +
+
+ + +
+
+ initialize + Wt::WApplication +
+
+
+
+ initializeGL + Wt::WGLWidget +
+
+ + + + + + + + +
+
+ insertedId + Wt::Dbo::SqlStatement +
+
+ +
+
+ insertLayout + Wt::WBoxLayout +
+
+ + +
+
+ insertSpacing + Wt::WBoxLayout +
+
+
+
+ insertStretch + Wt::WBoxLayout +
+
+
+
+ insertString + Wt::WStringListModel +
+
+ +
+
+ instance + Wt::WApplication +
+
+ +
+
+ internalId + Wt::WModelIndex +
+
+ + + +
+
+ internalPathMatches + Wt::WApplication +
+
+
+
+ internalPathNextPart + Wt::WApplication +
+
+
+
+ internalPointer + Wt::WModelIndex +
+
+
+
+ intersects + Wt::WRectF +
+
+
+
+ interval + Wt::WTimer +
+
+
+
+ invalidBlankText + Wt::WValidator +
+
+ +
+
+ invalidNoMatchText + Wt::WRegExpValidator +
+
+
+
+ invalidNotADateText + Wt::WDateValidator +
+
+ +
+
+ invalidTooEarlyText + Wt::WDateValidator +
+
+ +
+
+ invalidTooLateText + Wt::WDateValidator +
+
+
+
+ invalidTooLongText + Wt::WLengthValidator +
+
+
+
+ invalidTooShortText + Wt::WLengthValidator +
+
+ + +
+
+ invisibleRootItem + Wt::WStandardItemModel +
+
+ +
+
+ isAncestor + Wt::WModelIndex +
+
+
+
+ isAuto + Wt::WLength +
+
+ + +
+
+ isCloseable + Wt::WMenuItem +
+
+ + + +
+
+ isColumnHidingEnabled + Wt::Ext::TableView +
+
+
+
+ isColumnResizeEnabled + Wt::WAbstractItemView +
+
+
+
+ isColumnSortable + Wt::Ext::TableView +
+
+ + +
+
+ isDefined + Wt::WCssStyleSheet +
+
+
+
+ isDirty + Wt::WBatchEditProxyModel +
+
+ +
+
+ isEditing + Wt::WAbstractItemView +
+
+ + + +
+
+ isExposed + Wt::WApplication +
+
+
+
+ isForeignKey + Wt::Dbo::FieldInfo +
+
+
+
+ isGridLinesEnabled + Wt::Chart::WAxis +
+
+ +
+
+ isHole + Wt::WAbstractArea +
+
+ +
+
+ isIdField + Wt::Dbo::FieldInfo +
+
+ + + +
+
+ isLabelsEnabled + Wt::Chart::WDataSeries +
+
+ +
+
+ isList + Wt::WContainerWidget +
+
+
+
+ isMandatory + Wt::WValidator +
+
+
+
+ isModal + Wt::WDialog +
+
+
+
+ isMutable + Wt::Dbo::FieldInfo +
+
+
+
+ isNaturalIdField + Wt::Dbo::FieldInfo +
+
+ +
+
+ isOrderedList + Wt::WContainerWidget +
+
+
+
+ isPerspectiveEnabled + Wt::Chart::WPieChart +
+
+ +
+
+ isQuited + Wt::WApplication +
+
+
+
+ isReadOnly + Wt::WFormWidget +
+
+ + +
+
+ isRunning + Wt::WServer +
+
+
+
+ isSatisfiable + Wt::Http::Request::ByteRangeSpecifier +
+
+
+
+ isSelectable + Wt::WTreeNode +
+
+ +
+
+ isShadowEnabled + Wt::Chart::WPieChart +
+
+
+
+ isSingleShot + Wt::WTimer +
+
+
+
+ isSizeGripEnabled + Wt::Ext::Dialog +
+
+ +
+
+ isStacked + Wt::Chart::WDataSeries +
+
+
+
+ isString + Wt::WLogger::Field +
+
+
+
+ isSurrogateIdField + Wt::Dbo::FieldInfo +
+
+
+
+ isTabCloseable + Wt::WTabWidget +
+
+ + +
+
+ isTitleBarEnabled + Wt::WDialog +
+
+ +
+
+ isUnorderedList + Wt::WContainerWidget +
+
+
+
+ isUploaded + Wt::WFileUpload +
+
+ +
+
+ isVersionField + Wt::Dbo::FieldInfo +
+
+ +
+
+ item + Wt::WStandardItemModel +
+
+ +
+
+ itemChanged + Wt::WStandardItemModel +
+
+
+
+ itemClosed + Wt::WMenu +
+
+
+
+ itemData + Wt::WAbstractItemModel +
+
+ +
+
+ itemDelegateForColumn + Wt::WAbstractItemView +
+
+
+
+ itemFromIndex + Wt::WStandardItemModel +
+
+
+
+ itemPrototype + Wt::WStandardItemModel +
+
+ +
+
+ itemSelected + Wt::WMenu +
+
+ +
+
+ itemSelectRendered + Wt::WMenu +
+
+ +
+
+ itemWidget + Wt::WMenuItem +
+
+
+
+ iterateSeries + Wt::Chart::WChart2DRenderer +
+
+
+
+ iterator + Wt::Dbo::collection::iterator +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6a.html b/wt-3.1.7a/doc/reference/html/search/functions_6a.html new file mode 100644 index 0000000..61720c5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6a.html @@ -0,0 +1,115 @@ + + + + + + + +
+
Loading...
+
+
+ javaScript + Wt::WEnvironment +
+
+
+
+ javaScriptClass + Wt::WApplication +
+
+ + +
+
+ joinStyle + Wt::WPen +
+
+
+
+ jsAudioRef + Wt::WHTML5Audio +
+
+
+
+ jsFlashRef + Wt::WFlashObject +
+
+
+
+ JSignal + Wt::JSignal +
+
+ +
+
+ jsMediaRef + Wt::WHTML5Media +
+
+
+
+ jsRef + Wt::WWidget +
+
+ +
+
+ jsVideoRef + Wt::WHTML5Video +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6b.html b/wt-3.1.7a/doc/reference/html/search/functions_6b.html new file mode 100644 index 0000000..a380c33 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6b.html @@ -0,0 +1,71 @@ + + + + + + + +
+
Loading...
+ +
+
+ keyCode + Wt::WKeyEvent +
+
+ +
+
+ keys + Wt::WMessageResourceBundle +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6c.html b/wt-3.1.7a/doc/reference/html/search/functions_6c.html new file mode 100644 index 0000000..e5b8c4f --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6c.html @@ -0,0 +1,300 @@ + + + + + + + +
+
Loading...
+ +
+
+ labelAngle + Wt::Chart::WAxis +
+
+
+
+ labelArea + Wt::WTreeNode +
+
+
+
+ labelColor + Wt::Chart::WDataSeries +
+
+
+
+ labelFont + Wt::Chart::WAxis +
+
+
+
+ labelFormat + Wt::Chart::WAxis +
+
+
+
+ labelIcon + Wt::WTreeNode +
+
+
+
+ labelInterval + Wt::Chart::WAxis +
+
+
+
+ labelsColumn + Wt::Chart::WPieChart +
+
+
+
+ lastByte + Wt::Http::Request::ByteRange +
+
+
+
+ latitude + Wt::WGoogleMap::Coordinate +
+
+ +
+
+ layoutAboutToBeChanged + Wt::WAbstractItemModel +
+
+
+
+ layoutChanged + Wt::WAbstractItemModel +
+
+
+
+ layoutSizeAware + Wt::WWidget +
+
+ +
+
+ left + Wt::WRectF +
+
+
+
+ lessThan + Wt::WSortFilterProxyModel +
+
+ +
+
+ limit + Wt::Dbo::Query +
+
+ + + +
+
+ lineWidth + Wt::WGLWidget +
+
+
+
+ linkProgram + Wt::WGLWidget +
+
+
+
+ literal + Wt::WString +
+
+ + +
+
+ loadingIndicator + Wt::WApplication +
+
+ +
+
+ localizedStrings + Wt::WApplication +
+
+
+
+ location + Wt::Chart::WAxis +
+
+
+
+ lock + Wt::SyncLock +
+
+
+
+ log + Wt::WApplication +
+
+
+
+ longDayName + Wt::WDate +
+
+
+
+ longitude + Wt::WGoogleMap::Coordinate +
+
+
+
+ longMonthName + Wt::WDate +
+
+
+
+ lookAt + Wt::WMatrix4x4 +
+
+
+
+ loops + Wt::WSound +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6d.html b/wt-3.1.7a/doc/reference/html/search/functions_6d.html new file mode 100644 index 0000000..dbd7932 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6d.html @@ -0,0 +1,582 @@ + + + + + + + +
+
Loading...
+
+
+ m11 + Wt::WTransform +
+
+
+
+ m12 + Wt::WTransform +
+
+
+
+ m13 + Wt::WTransform +
+
+
+
+ m21 + Wt::WTransform +
+
+
+
+ m22 + Wt::WTransform +
+
+
+
+ m23 + Wt::WTransform +
+
+
+
+ m31 + Wt::WTransform +
+
+
+
+ m32 + Wt::WTransform +
+
+
+
+ m33 + Wt::WTransform +
+
+
+
+ makeAbsoluteUrl + Wt::WApplication +
+
+
+
+ makeStaticModel + Wt::WStaticModelView +
+
+ +
+
+ map1 + Wt::WSignalMapper +
+
+
+
+ mapClass + Wt::Dbo::Session +
+
+
+
+ mapConnect + Wt::WSignalMapper +
+
+
+
+ mapConnect1 + Wt::WSignalMapper +
+
+ + +
+
+ mapped + Wt::WSignalMapper +
+
+ + + +
+
+ marker + Wt::Chart::WDataSeries +
+
+
+
+ markerBrush + Wt::Chart::WDataSeries +
+
+
+
+ markerPen + Wt::Chart::WDataSeries +
+
+
+
+ markerSize + Wt::Chart::WDataSeries +
+
+
+
+ match + Wt::WAbstractItemModel +
+
+ + +
+
+ maximumLength + Wt::WLengthValidator +
+
+
+
+ maximumRequestSize + Wt::WApplication +
+
+ + + + + +
+
+ messageResourceBundle + Wt::WApplication +
+
+ +
+
+ method + Wt::Http::Request +
+
+ + + +
+
+ minimumLength + Wt::WLengthValidator +
+
+ +
+
+ minute + Wt::WTime +
+
+ + +
+
+ modelColumn + Wt::Chart::WDataSeries +
+
+ + + + + + +
+
+ modified + Wt::WCssRule +
+
+ +
+
+ modify + Wt::Dbo::ptr +
+
+
+
+ month + Wt::WDate +
+
+ +
+
+ mouseEvent + Wt::WDropEvent +
+
+ + + + + + + +
+
+ msec + Wt::WTime +
+
+
+
+ msecsTo + Wt::WTime +
+
+
+
+ multiple + Wt::WFileUpload +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6e.html b/wt-3.1.7a/doc/reference/html/search/functions_6e.html new file mode 100644 index 0000000..2903235 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6e.html @@ -0,0 +1,95 @@ + + + + + + + +
+
Loading...
+ + +
+
+ needsQuotes + Wt::Dbo::FieldInfo +
+
+
+
+ newValue + Wt::Chart::SeriesIterator +
+
+
+
+ nextAfterHide + Wt::WMenu +
+
+
+
+ nextRow + Wt::Dbo::SqlStatement +
+
+
+
+ none + Wt::WShadow +
+
+
+
+ normalized + Wt::WRectF +
+
+
+
+ notify + Wt::WApplication +
+
+
+
+ NoUniqueResultException + Wt::Dbo::NoUniqueResultException +
+
+
+
+ NumberField + Wt::Ext::NumberField +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_6f.html b/wt-3.1.7a/doc/reference/html/search/functions_6f.html new file mode 100644 index 0000000..f70601d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_6f.html @@ -0,0 +1,363 @@ + + + + + + + +
+
Loading...
+
+
+ objectName + Wt::WObject +
+
+
+
+ ObjectNotFoundException + Wt::Dbo::ObjectNotFoundException +
+
+ +
+
+ offsetX + Wt::WShadow +
+
+
+
+ offsetY + Wt::WShadow +
+
+
+
+ openInfoWindow + Wt::WGoogleMap +
+
+ +
+
+ operator collection< Result > + Wt::Dbo::Query +
+
+
+
+ operator Result + Wt::Dbo::Query +
+
+ + + + + + + + +
+
+ operator-= + Wt::WGenericMatrix +
+
+ +
+
+ operator/ + Wt +
+
+
+
+ operator/= + Wt::WGenericMatrix +
+
+ + + + + + + +
+
+ orderBy + Wt::Dbo::Query +
+
+ +
+
+ out + Wt::Http::Response +
+
+
+
+ wstring + Wt::WString +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_70.html b/wt-3.1.7a/doc/reference/html/search/functions_70.html new file mode 100644 index 0000000..e282ac5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_70.html @@ -0,0 +1,458 @@ + + + + + + + +
+
Loading...
+
+
+ p1 + Wt::WLineF +
+
+
+
+ p2 + Wt::WLineF +
+
+ +
+
+ pageChanged + Wt::WAbstractItemView +
+
+ + + + + + +
+
+ paintGL + Wt::WGLWidget +
+
+
+
+ palette + Wt::Chart::WAbstractChart +
+
+ +
+
+ panTo + Wt::WGoogleMap +
+
+ + +
+
+ parentNode + Wt::WTreeNode +
+
+
+
+ parentWidget + Wt::WLayoutItemImpl +
+
+
+
+ parse + Wt::WDateValidator +
+
+
+
+ path + Wt::Http::Request +
+
+ + +
+
+ pause + Wt::WHTML5Media +
+
+ +
+
+ perspective + Wt::WMatrix4x4 +
+
+
+
+ pixelStorei + Wt::WGLWidget +
+
+ +
+
+ playbackPaused + Wt::WHTML5Media +
+
+
+
+ playbackStarted + Wt::WHTML5Media +
+
+
+
+ playing + Wt::WHTML5Media +
+
+
+
+ plotAreaPadding + Wt::Chart::WAbstractChart +
+
+
+
+ points + Wt::WPolygonArea +
+
+
+
+ polygonOffset + Wt::WGLWidget +
+
+
+
+ populate + Wt::WTreeNode +
+
+
+
+ populated + Wt::WTreeNode +
+
+ +
+
+ popupMenu + Wt::WPopupMenuItem +
+
+
+
+ position + Wt::WBorderLayout +
+
+
+
+ positionAt + Wt::WWidget +
+
+ + +
+
+ preferredMethod + Wt::WPaintedWidget +
+
+
+
+ preloadMode + Wt::WHTML5Media +
+
+
+
+ prepareAxes + Wt::Chart::WChart2DRenderer +
+
+ +
+
+ preventDefaultAction + Wt::EventSignalBase +
+
+
+
+ preventPropagation + Wt::EventSignalBase +
+
+
+
+ processEvents + Wt::WApplication +
+
+
+
+ progressBar + Wt::WFileUpload +
+
+
+
+ progressCompleted + Wt::WProgressBar +
+
+ +
+
+ prompt + Wt::Ext::MessageBox +
+
+ +
+
+ propagationPrevented + Wt::EventSignalBase +
+
+
+
+ property + Wt::Dbo::SqlConnection +
+
+ +
+
+ purge + Wt::Dbo::ptr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_71.html b/wt-3.1.7a/doc/reference/html/search/functions_71.html new file mode 100644 index 0000000..508960a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_71.html @@ -0,0 +1,64 @@ + + + + + + + +
+
Loading...
+ +
+
+ qualifier + Wt::Dbo::FieldInfo +
+
+ +
+
+ QueryModel + Wt::Dbo::QueryModel +
+
+
+
+ queryString + Wt::Http::Request +
+
+
+
+ quit + Wt::WApplication +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_72.html b/wt-3.1.7a/doc/reference/html/search/functions_72.html new file mode 100644 index 0000000..6f179e0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_72.html @@ -0,0 +1,795 @@ + + + + + + + +
+
Loading...
+ +
+
+ radius + Wt::WCircleArea +
+
+
+
+ read + Wt::Dbo::sql_value_traits +
+
+ +
+
+ red + Wt::WColor +
+
+
+
+ redirect + Wt::WApplication +
+
+
+
+ redrawAll + Wt::WVirtualImage +
+
+ +
+
+ referer + Wt::WEnvironment +
+
+ +
+
+ regExp + Wt::WRegExpValidator +
+
+
+
+ registerType + Wt +
+
+ +
+
+ rejectWhenEscapePressed + Wt::WDialog +
+
+
+
+ reload + Wt::Dbo::QueryModel +
+
+ + + + +
+
+ removeChild + Wt::WObject +
+
+
+
+ removeChildNode + Wt::WTreeNode +
+
+ + +
+
+ removeEdit + Wt::WSuggestionPopup +
+
+
+
+ removeFooterButton + Wt::Ext::Panel +
+
+ +
+
+ removeMapping + Wt::WSignalMapper +
+
+ + +
+
+ removeRule + Wt::WCssStyleSheet +
+
+
+
+ removeScript + Wt::WWebWidget +
+
+
+
+ removeSeries + Wt::Chart::WCartesianChart +
+
+ + + + +
+
+ renderAsList + Wt::WMenu +
+
+
+
+ renderAxes + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderAxis + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderBackground + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderCell + Wt::WCalendar +
+
+ +
+
+ renderHidden + Wt::WMenuItem +
+
+
+
+ renderHints + Wt::WPainter +
+
+
+
+ renderLabel + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderLegend + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderLegendIcon + Wt::Chart::WCartesianChart +
+
+
+
+ renderLegendItem + Wt::Chart::WCartesianChart +
+
+ +
+
+ renderSeries + Wt::Chart::WChart2DRenderer +
+
+
+
+ renderTemplate + Wt::WTemplate +
+
+ +
+
+ repaintSlot + Wt::WGLWidget +
+
+
+
+ requestTooLarge + Wt::WApplication +
+
+
+
+ require + Wt::WApplication +
+
+
+
+ reread + Wt::Dbo::ptr +
+
+
+
+ rereadAll + Wt::Dbo::Session +
+
+ +
+
+ resetLearnedSlot + Wt::WObject +
+
+
+
+ resetLearnedSlots + Wt::WObject +
+
+
+
+ resetTransform + Wt::WPainter +
+
+ +
+
+ resizeColumnsToContents + Wt::Ext::TableView +
+
+
+
+ resizeGL + Wt::WGLWidget +
+
+
+
+ resizeImage + Wt::WVirtualImage +
+
+
+
+ resolve + Wt::WTemplate +
+
+ +
+
+ resolveString + Wt::WTemplate +
+
+
+
+ resolveWidget + Wt::WTemplate +
+
+ +
+
+ resourcesUrl + Wt::WApplication +
+
+
+
+ restart + Wt::WServer +
+
+
+
+ restore + Wt::WPainter +
+
+ +
+
+ resultList + Wt::Dbo::Query +
+
+ +
+
+ resultValue + Wt::Dbo::Query +
+
+ +
+
+ returnToSavedPosition + Wt::WGoogleMap +
+
+
+
+ revertAll + Wt::WBatchEditProxyModel +
+
+
+
+ right + Wt::WRectF +
+
+
+
+ rollback + Wt::Dbo::Transaction +
+
+ +
+
+ root + Wt::WApplication +
+
+
+
+ rootIndex + Wt::WAbstractItemView +
+
+
+
+ rootIsDecorated + Wt::WTreeView +
+
+ +
+
+ rotateRadians + Wt::WTransform +
+
+
+
+ rotation + Wt::WGestureEvent +
+
+ +
+
+ rowAt + Wt::WTable +
+
+ +
+
+ rowHeight + Wt::WAbstractItemView +
+
+
+
+ rowIsResizable + Wt::WGridLayout +
+
+
+
+ rowNum + Wt::WTableRow +
+
+
+
+ rows + Wt::WTextArea +
+
+
+
+ rowsAboutToBeInserted + Wt::WAbstractItemModel +
+
+
+
+ rowsAboutToBeRemoved + Wt::WAbstractItemModel +
+
+
+
+ rowsInserted + Wt::WAbstractItemModel +
+
+
+
+ rowSpan + Wt::WTableCell +
+
+
+
+ rowsRemoved + Wt::WAbstractItemModel +
+
+
+
+ rowStretch + Wt::WGridLayout +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_73.html b/wt-3.1.7a/doc/reference/html/search/functions_73.html new file mode 100644 index 0000000..efbcee0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_73.html @@ -0,0 +1,3765 @@ + + + + + + + +
+
Loading...
+
+
+ sactivated + Wt::WComboBox +
+
+
+
+ sampleCoverage + Wt::WGLWidget +
+
+
+
+ save + Wt::WPainter +
+
+
+
+ saveButton + Wt::WInPlaceEdit +
+
+
+
+ savePosition + Wt::WGoogleMap +
+
+
+
+ saveStatement + Wt::Dbo::SqlConnection +
+
+ +
+
+ scissor + Wt::WGLWidget +
+
+ +
+
+ scroll + Wt::WVirtualImage +
+
+
+
+ scrolled + Wt::WContainerWidget +
+
+
+
+ scrollTo + Wt::WVirtualImage +
+
+
+
+ scrollX + Wt::WScrollEvent +
+
+
+
+ scrollY + Wt::WScrollEvent +
+
+
+
+ second + Wt::WTime +
+
+ +
+
+ segmentMargin + Wt::Chart::WChart2DRenderer +
+
+ + +
+
+ selectedButtonIndex + Wt::WButtonGroup +
+
+ +
+
+ selectedNodes + Wt::WTree +
+
+
+
+ selectedRows + Wt::Ext::TableView +
+
+ + + + + +
+
+ selectionModel + Wt::WAbstractItemView +
+
+ +
+
+ selector + Wt::WCssRule +
+
+ + +
+
+ server + Wt::WEnvironment +
+
+
+
+ serverAdmin + Wt::WEnvironment +
+
+
+
+ serverName + Wt::Http::Request +
+
+
+
+ serverPort + Wt::Http::Request +
+
+
+
+ serverSignature + Wt::WEnvironment +
+
+
+
+ serverSoftware + Wt::WEnvironment +
+
+ + +
+
+ setAccept + Wt::Test::WTestEnvironment +
+
+
+
+ setAjax + Wt::Test::WTestEnvironment +
+
+
+
+ setAjaxMethod + Wt::WApplication +
+
+ + + +
+
+ setAnimate + Wt::Ext::Panel +
+
+ +
+
+ setAutoExpandColumn + Wt::Ext::TableView +
+
+
+
+ setAutoLimits + Wt::Chart::WAxis +
+
+
+
+ setAutoScrollBars + Wt::Ext::Panel +
+
+
+
+ setBackground + Wt::Chart::WAbstractChart +
+
+
+
+ setBackgroundColor + Wt::WCssDecorationStyle +
+
+ +
+
+ setBarMargin + Wt::Chart::WCartesianChart +
+
+
+
+ setBarWidth + Wt::Chart::WDataSeries +
+
+
+
+ setBatchSize + Wt::Dbo::QueryModel +
+
+
+
+ setBlur + Wt::WShadow +
+
+
+
+ setBodyClass + Wt::WApplication +
+
+ + +
+
+ setBottomToolBar + Wt::Ext::Panel +
+
+
+
+ setBreak + Wt::Chart::WAxis +
+
+ + +
+
+ setBufferSize + Wt::WFileResource +
+
+ +
+
+ setButtonsEnabled + Wt::WInPlaceEdit +
+
+
+
+ setCancelButtonText + Wt::Ext::ProgressDialog +
+
+
+
+ setCapStyle + Wt::WPen +
+
+
+
+ setCaption + Wt::WDialog +
+
+ +
+
+ setCentralWidget + Wt::WPanel +
+
+ + + +
+
+ setCheckedButton + Wt::WButtonGroup +
+
+ + +
+
+ setChildCountPolicy + Wt::WTreeNode +
+
+
+
+ setChildrenDecorated + Wt::WTreeNode +
+
+ +
+
+ setClientAddress + Wt::Test::WTestEnvironment +
+
+
+
+ setClientSideLookAtHandler + Wt::WGLWidget +
+
+
+
+ setClientSideWalkHandler + Wt::WGLWidget +
+
+
+
+ setClipPath + Wt::WPainter +
+
+
+
+ setClipping + Wt::WPainter +
+
+
+
+ setCloseable + Wt::WMenuItem +
+
+ + + +
+
+ setColumn1Fixed + Wt::WTreeView +
+
+ + +
+
+ setColumnCount + Wt::WStandardItem +
+
+
+
+ setColumnFlags + Wt::Dbo::QueryModel +
+
+
+
+ setColumnFormat + Wt::WTreeView +
+
+ +
+
+ setColumnResizable + Wt::WGridLayout +
+
+
+
+ setColumnResizeEnabled + Wt::WAbstractItemView +
+
+
+
+ setColumns + Wt::WTextArea +
+
+
+
+ setColumnsMovable + Wt::Ext::TableView +
+
+
+
+ setColumnSortable + Wt::Ext::TableView +
+
+
+
+ setColumnSpan + Wt::WTableCell +
+
+
+
+ setColumnStretch + Wt::WGridLayout +
+
+
+
+ setColumnWidget + Wt::WTreeTableNode +
+
+ +
+
+ setConfirmCloseMessage + Wt::WApplication +
+
+
+
+ setConnection + Wt::Dbo::Session +
+
+
+
+ setConnectionPool + Wt::Dbo::Session +
+
+
+
+ setContentAlignment + Wt::WContainerWidget +
+
+
+
+ setContentLength + Wt::Http::Response +
+
+
+
+ setContentsMargins + Wt::WLayout +
+
+
+
+ setContentType + Wt::Test::WTestEnvironment +
+
+
+
+ setCookie + Wt::WApplication +
+
+
+
+ setCookies + Wt::Test::WTestEnvironment +
+
+
+
+ setCssTheme + Wt::WApplication +
+
+
+
+ setCurrentCell + Wt::Ext::TableView +
+
+ + + + +
+
+ setCustomFlags + Wt::Chart::WDataSeries +
+
+ +
+
+ setDataColumn + Wt::Chart::WPieChart +
+
+ + +
+
+ setDateTimeStorage + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ setDayOfWeekLength + Wt::WCalendar +
+
+
+
+ setDecimalPrecision + Wt::Ext::NumberField +
+
+ +
+
+ setDefault + Wt::Ext::Button +
+
+
+
+ setDefaultButton + Wt::Ext::Dialog +
+
+
+
+ setDefaultIndex + Wt::WSuggestionPopup +
+
+
+
+ setDirection + Wt::WBoxLayout +
+
+
+
+ setDirtyIndication + Wt::WBatchEditProxyModel +
+
+ +
+
+ setDisplayLabels + Wt::Chart::WPieChart +
+
+
+
+ setDpiScale + Wt::Test::WTestEnvironment +
+
+
+
+ setDragEnabled + Wt::WAbstractItemView +
+
+
+
+ setDraggable + Wt::WInteractWidget +
+
+
+
+ setDropsEnabled + Wt::WAbstractItemView +
+
+
+
+ setDynamicSortFilter + Wt::WSortFilterProxyModel +
+
+ +
+
+ setEditable + Wt::Ext::ComboBox +
+
+
+
+ setEditOptions + Wt::WAbstractItemView +
+
+
+
+ setEditor + Wt::Ext::TableView +
+
+ +
+
+ setEditTriggers + Wt::WAbstractItemView +
+
+ +
+
+ setEnableAlignments + Wt::Ext::TextEdit +
+
+
+
+ setEnableColors + Wt::Ext::TextEdit +
+
+ +
+
+ setEnableFont + Wt::Ext::TextEdit +
+
+
+
+ setEnableFormat + Wt::Ext::TextEdit +
+
+ +
+
+ setEnableLists + Wt::Ext::TextEdit +
+
+
+
+ setEnableSourceEdit + Wt::Ext::TextEdit +
+
+
+
+ setErrorMessageLocation + Wt::Ext::FormField +
+
+
+
+ setExpanded + Wt::WTreeView +
+
+
+
+ setExplode + Wt::Chart::WPieChart +
+
+
+
+ setExtraPlugins + Wt::WTextEdit +
+
+
+
+ setFamily + Wt::WFont +
+
+
+
+ setFile + Wt::WLogger +
+
+
+
+ setFileName + Wt::WFileResource +
+
+
+
+ setFileTextSize + Wt::WFileUpload +
+
+
+
+ setFillRange + Wt::Chart::WDataSeries +
+
+
+
+ setFilterColumn + Wt::Ext::DataStore +
+
+
+
+ setFilterFlags + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterKeyColumn + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterLength + Wt::WSuggestionPopup +
+
+
+
+ setFilterRegExp + Wt::WSortFilterProxyModel +
+
+
+
+ setFilterRole + Wt::WSortFilterProxyModel +
+
+
+
+ setFirstDayOfWeek + Wt::WCalendar +
+
+ +
+
+ setFlashParameter + Wt::WFlashObject +
+
+
+
+ setFlashVariable + Wt::WFlashObject +
+
+ + + +
+
+ setForegroundColor + Wt::WCssDecorationStyle +
+
+ +
+
+ setFormats + Wt::WDateValidator +
+
+ +
+
+ setGridLinesEnabled + Wt::Chart::WAxis +
+
+
+
+ setGridLinesPen + Wt::Chart::WAxis +
+
+
+
+ setHandleWidth + Wt::Ext::Splitter +
+
+
+
+ setHeaderAlignment + Wt::WAbstractItemView +
+
+
+
+ setHeaderCount + Wt::WTable +
+
+ + +
+
+ setHeaderValue + Wt::Test::WTestEnvironment +
+
+ + + +
+
+ setHighlightMouseOver + Wt::Ext::TableView +
+
+
+
+ setHint + Wt::WLayoutItemImpl +
+
+
+
+ setHMS + Wt::WTime +
+
+
+
+ setHole + Wt::WAbstractArea +
+
+
+
+ setHorizontalHeaderFormat + Wt::WCalendar +
+
+
+
+ setHorizontalScrollBarPolicy + Wt::WScrollArea +
+
+
+
+ setHorizontalSpacing + Wt::WGridLayout +
+
+
+
+ setHostName + Wt::Test::WTestEnvironment +
+
+
+
+ setHtmlClass + Wt::WApplication +
+
+ + + +
+
+ setImagePack + Wt::WTreeNode +
+
+
+
+ setImageRef + Wt::WImage +
+
+
+
+ setImplementation + Wt::WCompositeWidget +
+
+ +
+
+ setInteractive + Wt::WTreeNode +
+
+ + + +
+
+ setInterval + Wt::WTimer +
+
+
+
+ setInvalidBlankText + Wt::WValidator +
+
+
+
+ setInvalidNoMatchText + Wt::WRegExpValidator +
+
+
+
+ setInvalidNotADateText + Wt::WDateValidator +
+
+ +
+
+ setInvalidTooEarlyText + Wt::WDateValidator +
+
+ +
+
+ setInvalidTooLateText + Wt::WDateValidator +
+
+
+
+ setInvalidTooLongText + Wt::WLengthValidator +
+
+
+
+ setInvalidTooShortText + Wt::WLengthValidator +
+
+ +
+
+ setItem + Wt::WStandardItemModel +
+
+
+
+ setItemData + Wt::WAbstractItemModel +
+
+
+
+ setItemDelegate + Wt::WAbstractItemView +
+
+
+
+ setItemDelegateForColumn + Wt::WAbstractItemView +
+
+ + +
+
+ setItemPrototype + Wt::WStandardItemModel +
+
+ +
+
+ setJavaScript + Wt::JSlot +
+
+
+
+ setJavaScriptMatrix4 + Wt::WGLWidget +
+
+ +
+
+ setJoinStyle + Wt::WPen +
+
+
+
+ setLabelAngle + Wt::Chart::WAxis +
+
+
+
+ setLabelColor + Wt::Chart::WDataSeries +
+
+
+
+ setLabelFont + Wt::Chart::WAxis +
+
+
+
+ setLabelFormat + Wt::Chart::WAxis +
+
+
+
+ setLabelIcon + Wt::WTreeNode +
+
+
+
+ setLabelInterval + Wt::Chart::WAxis +
+
+
+
+ setLabelsColumn + Wt::Chart::WPieChart +
+
+
+
+ setLabelsEnabled + Wt::Chart::WDataSeries +
+
+
+
+ setLatitude + Wt::WGoogleMap::Coordinate +
+
+ +
+
+ setLayoutHint + Wt::WLayout +
+
+
+
+ setLayoutInParent + Wt::WLayout +
+
+
+
+ setLayoutSizeAware + Wt::WWidget +
+
+ + +
+
+ setLinkDefault + Wt::Ext::TextEdit +
+
+
+
+ setList + Wt::WContainerWidget +
+
+
+
+ setLoadingIndicator + Wt::WApplication +
+
+
+
+ setLoadLaterWhenInvisible + Wt::WWebWidget +
+
+
+
+ setLoadPolicy + Wt::WTreeNode +
+
+ +
+
+ setLocalizedStrings + Wt::WApplication +
+
+
+
+ setLocation + Wt::Chart::WAxis +
+
+
+
+ setLongitude + Wt::WGoogleMap::Coordinate +
+
+
+
+ setLoops + Wt::WSound +
+
+
+
+ setMandatory + Wt::WValidator +
+
+
+
+ setMapping + Wt::WSignalMapper +
+
+
+
+ setMapTypeControl + Wt::WGoogleMap +
+
+ +
+
+ setMarker + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerBrush + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerPen + Wt::Chart::WDataSeries +
+
+
+
+ setMarkerSize + Wt::Chart::WDataSeries +
+
+ +
+
+ setMaximumLength + Wt::WLengthValidator +
+
+ + +
+
+ setMenu + Wt::Ext::AbstractButton +
+
+ + + +
+
+ setMinimumLength + Wt::WLengthValidator +
+
+ +
+
+ setMinQueryLength + Wt::Ext::ComboBox +
+
+
+
+ setModal + Wt::WDialog +
+
+ + + +
+
+ setMultiple + Wt::WFileUpload +
+
+
+
+ setMultipleSelection + Wt::WCalendar +
+
+
+
+ setName + Wt::WColor +
+
+
+
+ setNewRowData + Wt::WBatchEditProxyModel +
+
+
+
+ setNewRowFlags + Wt::WBatchEditProxyModel +
+
+
+
+ setNodeVisible + Wt::WTreeNode +
+
+
+
+ setNoMatchText + Wt::WRegExpValidator +
+
+
+
+ setObjectName + Wt::WObject +
+
+ +
+
+ setOptions + Wt::WHTML5Media +
+
+ +
+
+ setOverflow + Wt::WContainerWidget +
+
+ + + +
+
+ setPalette + Wt::Chart::WAbstractChart +
+
+
+
+ setParameterMap + Wt::Test::WTestEnvironment +
+
+ + +
+
+ setPathComponent + Wt::WMenuItem +
+
+ +
+
+ setPerspectiveEnabled + Wt::Chart::WPieChart +
+
+
+
+ setPixel + Wt::WRasterImage +
+
+
+
+ setPlotAreaPadding + Wt::Chart::WAbstractChart +
+
+ + +
+
+ setPopupMenu + Wt::WPopupMenuItem +
+
+
+
+ setPopupVisible + Wt::WDatePicker +
+
+ +
+
+ setPosixTime + Wt::WDateTime +
+
+
+
+ setPoster + Wt::WHTML5Video +
+
+
+
+ setPreferredMethod + Wt::WPaintedWidget +
+
+
+
+ setPreloadMode + Wt::WHTML5Media +
+
+
+
+ setProgressBar + Wt::WFileUpload +
+
+
+
+ setProperty + Wt::Dbo::SqlConnection +
+
+
+
+ setQualifier + Wt::Dbo::FieldInfo +
+
+
+
+ setQuery + Wt::Dbo::QueryModel +
+
+
+
+ setQueryDelay + Wt::Ext::ComboBox +
+
+
+
+ setRadius + Wt::WCircleArea +
+
+ +
+
+ setReadOnly + Wt::WFormWidget +
+
+ +
+
+ setReferer + Wt::Test::WTestEnvironment +
+
+
+
+ setRefInternalPath + Wt::WAnchor +
+
+
+
+ setRegExp + Wt::WRegExpValidator +
+
+
+
+ setRenderAsList + Wt::WMenu +
+
+
+
+ setRenderer + Wt::Ext::TableView +
+
+
+
+ setRenderHint + Wt::WPainter +
+
+ + +
+
+ setRgb + Wt::WColor +
+
+
+
+ setRootIndex + Wt::WAbstractItemView +
+
+
+
+ setRootIsDecorated + Wt::WTreeView +
+
+
+
+ setRowCount + Wt::WStandardItem +
+
+ +
+
+ setRowResizable + Wt::WGridLayout +
+
+
+
+ setRows + Wt::WTextArea +
+
+
+
+ setRowSpan + Wt::WTableCell +
+
+
+
+ setRowStretch + Wt::WGridLayout +
+
+
+
+ setSatisfiable + Wt::Http::Request::ByteRangeSpecifier +
+
+
+
+ setScale + Wt::Chart::WAxis +
+
+
+
+ setScrollBarPolicy + Wt::WScrollArea +
+
+ +
+
+ setSelectedButtonIndex + Wt::WButtonGroup +
+
+ + + +
+
+ setSeries + Wt::Chart::WCartesianChart +
+
+
+
+ setServerAdmin + Wt::Test::WTestEnvironment +
+
+
+
+ setServerConfiguration + Wt::WServer +
+
+
+
+ setServerSignature + Wt::Test::WTestEnvironment +
+
+
+
+ setServerSoftware + Wt::Test::WTestEnvironment +
+
+ +
+
+ setShadowEnabled + Wt::Chart::WPieChart +
+
+
+
+ setSingleClickSelect + Wt::WCalendar +
+
+
+
+ setSingleShot + Wt::WTimer +
+
+
+
+ setSingleStep + Wt::WSpinBox +
+
+
+
+ setSize + Wt::WFont +
+
+
+
+ setSizeGripEnabled + Wt::Ext::Dialog +
+
+ + + + +
+
+ setStacked + Wt::Chart::WDataSeries +
+
+
+
+ setStartAngle + Wt::Chart::WPieChart +
+
+
+
+ setState + Wt::WIconPair +
+
+
+
+ setStatus + Wt::Http::Response +
+
+
+
+ setStream + Wt::WLogger +
+
+ +
+
+ setStringList + Wt::WStringListModel +
+
+ + +
+
+ setStyleSheet + Wt::WTextEdit +
+
+
+
+ setSubMenu + Wt::WSubMenuItem +
+
+
+
+ setSupportsCookies + Wt::Test::WTestEnvironment +
+
+
+
+ setTabCloseable + Wt::WTabWidget +
+
+ + + +
+
+ setTable + Wt::WTreeTableNode +
+
+ + + +
+
+ setTemplateText + Wt::WTemplate +
+
+ +
+
+ setTextDecoration + Wt::WCssDecorationStyle +
+
+ + +
+
+ setTickInterval + Wt::WSlider +
+
+
+
+ setTickPosition + Wt::WSlider +
+
+
+
+ setTime + Wt::WDateTime +
+
+
+
+ setTime_t + Wt::WDateTime +
+
+ + +
+
+ setTitleBarEnabled + Wt::WDialog +
+
+ +
+
+ setToIdentity + Wt::WGenericMatrix +
+
+
+
+ setToolBar + Wt::WTextEdit +
+
+ + +
+
+ setTopToolBar + Wt::Ext::Panel +
+
+
+
+ setTree + Wt::WTreeTable +
+
+ + +
+
+ setTwoPhaseRenderingThreshold + Wt::WApplication +
+
+ + +
+
+ setUploadProgress + Wt::WResource +
+
+
+
+ setUrl + Wt::WStandardItem +
+
+
+
+ setUrlScheme + Wt::Test::WTestEnvironment +
+
+
+
+ setUserAgent + Wt::Test::WTestEnvironment +
+
+ + +
+
+ setVariant + Wt::WFont +
+
+ +
+
+ setVerticalScrollBarPolicy + Wt::WScrollArea +
+
+
+
+ setVerticalSize + Wt::WSelectionBox +
+
+
+
+ setVerticalSpacing + Wt::WGridLayout +
+
+ +
+
+ setVisible + Wt::Chart::WAxis +
+
+
+
+ setWeight + Wt::WFont +
+
+
+
+ setWidget + Wt::WScrollArea +
+
+ + + + +
+
+ setWorldTransform + Wt::WPainter +
+
+ +
+
+ setXSeriesColumn + Wt::Chart::WCartesianChart +
+
+ +
+
+ setZoom + Wt::WGoogleMap +
+
+
+
+ shaderSource + Wt::WGLWidget +
+
+ +
+
+ shear + Wt::WTransform +
+
+
+
+ sheet + Wt::WCssRule +
+
+ +
+
+ shiftModelIndexes + Wt::WAbstractProxyModel +
+
+
+
+ shortDayName + Wt::WDate +
+
+
+
+ shortMonthName + Wt::WDate +
+
+ + +
+
+ showIcon1 + Wt::WIconPair +
+
+
+
+ showIcon2 + Wt::WIconPair +
+
+
+
+ Signal + Wt::Signal +
+
+ +
+
+ singleStep + Wt::WSpinBox +
+
+ +
+
+ sliderMoved + Wt::WSlider +
+
+
+
+ socket + Wt::WSocketNotifier +
+
+ +
+
+ sortByColumn + Wt::WAbstractItemView +
+
+
+
+ sortChildren + Wt::WStandardItem +
+
+
+
+ sortColumn + Wt::WAbstractItemView +
+
+
+
+ sortOrder + Wt::WAbstractItemView +
+
+ +
+
+ source + Wt::WDropEvent +
+
+
+
+ sourceModel + Wt::WAbstractProxyModel +
+
+ +
+
+ specificFamilies + Wt::WFont +
+
+ + +
+
+ sql + Wt::Dbo::SqlStatement +
+
+ +
+
+ sqlType + Wt::Dbo::FieldInfo +
+
+
+
+ StaleObjectException + Wt::Dbo::StaleObjectException +
+
+ +
+
+ startAngle + Wt::Chart::WPieChart +
+
+
+
+ startSegment + Wt::Chart::SeriesIterator +
+
+
+
+ startSeries + Wt::Chart::SeriesIterator +
+
+ +
+
+ startWtSession + Wt::Http::Client +
+
+
+
+ state + Wt::WIconPair +
+
+
+
+ stealSpooledFile + Wt::WFileUpload +
+
+
+
+ stealSpoolFile + Wt::Http::UploadedFile +
+
+
+
+ stencilFunc + Wt::WGLWidget +
+
+
+
+ stencilFuncSeparate + Wt::WGLWidget +
+
+
+
+ stencilMask + Wt::WGLWidget +
+
+
+
+ stencilMaskSeparate + Wt::WGLWidget +
+
+
+
+ stencilOp + Wt::WGLWidget +
+
+
+
+ stencilOpSeparate + Wt::WGLWidget +
+
+ +
+
+ stopAcceptDrops + Wt::WWidget +
+
+
+
+ stringList + Wt::WStringListModel +
+
+
+
+ strokePath + Wt::WPainter +
+
+ + + + +
+
+ subMenu + Wt::WSubMenuItem +
+
+
+
+ suggestedFileName + Wt::WResource +
+
+
+
+ suggestFileName + Wt::WResource +
+
+
+
+ supportsCookies + Wt::WEnvironment +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_74.html b/wt-3.1.7a/doc/reference/html/search/functions_74.html new file mode 100644 index 0000000..e9231e3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_74.html @@ -0,0 +1,534 @@ + + + + + + + +
+
Loading...
+
+
+ tabClosed + Wt::WTabWidget +
+
+ + +
+
+ tableName + Wt::Dbo::Session +
+
+
+
+ TableView + Wt::Ext::TableView +
+
+ + +
+
+ TabWidget + Wt::Ext::TabWidget +
+
+
+
+ takeChild + Wt::WStandardItem +
+
+ +
+
+ takeItem + Wt::WStandardItemModel +
+
+ +
+
+ takeWidget + Wt::WScrollArea +
+
+ +
+
+ targetTouches + Wt::WTouchEvent +
+
+
+
+ templateText + Wt::WTemplate +
+
+
+
+ templateWidget + Wt::WCssTemplateRule +
+
+ +
+
+ texParameteri + Wt::WGLWidget +
+
+ +
+
+ textDecoration + Wt::WCssDecorationStyle +
+
+ + + +
+
+ textWidget + Wt::WMessageBox +
+
+
+
+ tickInterval + Wt::WSlider +
+
+
+
+ tickPosition + Wt::WSlider +
+
+
+
+ tie + Wt::WScrollBar +
+
+
+
+ time + Wt::WDateTime +
+
+
+
+ timeout + Wt::WTimer +
+
+
+
+ timeTo + Wt::WDateTime +
+
+
+
+ timeUpdated + Wt::WHTML5Media +
+
+ + +
+
+ titleBarWidget + Wt::WPanel +
+
+ +
+
+ toggled + Wt::Ext::AbstractButton +
+
+
+
+ toJulianDay + Wt::WDate +
+
+
+
+ tooLarge + Wt::Http::Request +
+
+ + +
+
+ ToolTipConfig + Wt::Ext::ToolTipConfig +
+
+ +
+
+ toPixels + Wt::WLength +
+
+
+
+ topLeft + Wt::WRectF +
+
+
+
+ toPosixTime + Wt::WDateTime +
+
+
+
+ topRight + Wt::WRectF +
+
+
+
+ topToolBar + Wt::Ext::Panel +
+
+
+
+ toRawIndex + Wt::WAbstractItemModel +
+
+ +
+
+ toTime_t + Wt::WDateTime +
+
+
+
+ Touch + Wt::Touch +
+
+
+
+ touchEnded + Wt::WInteractWidget +
+
+
+
+ touches + Wt::WTouchEvent +
+
+
+
+ touchMoved + Wt::WInteractWidget +
+
+
+
+ touchStarted + Wt::WInteractWidget +
+
+ + +
+
+ Transaction + Wt::Dbo::Transaction +
+
+ +
+
+ transposed + Wt::WGenericMatrix +
+
+
+
+ tree + Wt::WTreeTable +
+
+ +
+
+ triggered + Wt::WPopupMenuItem +
+
+
+
+ triggerUpdate + Wt::WApplication +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_75.html b/wt-3.1.7a/doc/reference/html/search/functions_75.html new file mode 100644 index 0000000..69c2b60 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_75.html @@ -0,0 +1,350 @@ + + + + + + + +
+
Loading...
+ +
+
+ undoDoCollapse + Wt::WTreeNode +
+
+
+
+ undoDoExpand + Wt::WTreeNode +
+
+
+
+ uniform1f + Wt::WGLWidget +
+
+
+
+ uniform1fv + Wt::WGLWidget +
+
+
+
+ uniform1i + Wt::WGLWidget +
+
+
+
+ uniform1iv + Wt::WGLWidget +
+
+
+
+ uniform2f + Wt::WGLWidget +
+
+
+
+ uniform2fv + Wt::WGLWidget +
+
+
+
+ uniform2i + Wt::WGLWidget +
+
+
+
+ uniform2iv + Wt::WGLWidget +
+
+
+
+ uniform3f + Wt::WGLWidget +
+
+
+
+ uniform3fv + Wt::WGLWidget +
+
+
+
+ uniform3i + Wt::WGLWidget +
+
+
+
+ uniform3iv + Wt::WGLWidget +
+
+
+
+ uniform4f + Wt::WGLWidget +
+
+
+
+ uniform4fv + Wt::WGLWidget +
+
+
+
+ uniform4i + Wt::WGLWidget +
+
+
+
+ uniform4iv + Wt::WGLWidget +
+
+
+
+ uniformMatrix2 + Wt::WGLWidget +
+
+
+
+ uniformMatrix2fv + Wt::WGLWidget +
+
+
+
+ uniformMatrix3 + Wt::WGLWidget +
+
+
+
+ uniformMatrix3fv + Wt::WGLWidget +
+
+ +
+
+ uniformMatrix4fv + Wt::WGLWidget +
+
+
+
+ unit + Wt::WLength +
+
+
+
+ united + Wt::WRectF +
+
+
+
+ unload + Wt::WApplication +
+
+
+
+ unTie + Wt::WScrollBar +
+
+ + +
+
+ updateGL + Wt::WGLWidget +
+
+ + + + +
+
+ updatesEnabled + Wt::WApplication +
+
+
+
+ upload + Wt::WFileUpload +
+
+
+
+ uploaded + Wt::WFileUpload +
+
+ +
+
+ uri + Wt::WPainter::Image +
+
+ + + +
+
+ useProgram + Wt::WGLWidget +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_76.html b/wt-3.1.7a/doc/reference/html/search/functions_76.html new file mode 100644 index 0000000..8c20d51 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_76.html @@ -0,0 +1,258 @@ + + + + + + + +
+
Loading...
+
+
+ valid + Wt::WValidationStatus +
+
+ +
+
+ validated + Wt::WValidationStatus +
+
+
+
+ validateEditor + Wt::WAbstractItemView +
+
+
+
+ validateEditors + Wt::WAbstractItemView +
+
+
+
+ validateProgram + Wt::WGLWidget +
+
+ + + +
+
+ variant + Wt::WFont +
+
+
+
+ version + Wt::Dbo::ptr +
+
+ +
+
+ vertexAttrib1f + Wt::WGLWidget +
+
+
+
+ vertexAttrib1fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib2f + Wt::WGLWidget +
+
+
+
+ vertexAttrib2fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib3f + Wt::WGLWidget +
+
+
+
+ vertexAttrib3fv + Wt::WGLWidget +
+
+
+
+ vertexAttrib4f + Wt::WGLWidget +
+
+
+
+ vertexAttrib4fv + Wt::WGLWidget +
+
+
+
+ vertexAttribPointer + Wt::WGLWidget +
+
+ + +
+
+ verticalScrollBar + Wt::WScrollArea +
+
+
+
+ verticalSize + Wt::WSelectionBox +
+
+
+
+ verticalSpacing + Wt::WGridLayout +
+
+ +
+
+ viewPortChanged + Wt::WVirtualImage +
+
+ + +
+
+ volumeChanged + Wt::WHTML5Media +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_77.html b/wt-3.1.7a/doc/reference/html/search/functions_77.html new file mode 100644 index 0000000..c3de5b0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_77.html @@ -0,0 +1,1292 @@ + + + + + + + +
+
Loading...
+
+
+ WAbstractItemDelegate + Wt::WAbstractItemDelegate +
+
+
+
+ WAbstractItemModel + Wt::WAbstractItemModel +
+
+
+
+ WAbstractItemView + Wt::WAbstractItemView +
+
+
+
+ WAbstractListModel + Wt::WAbstractListModel +
+
+
+
+ WAbstractProxyModel + Wt::WAbstractProxyModel +
+
+
+
+ WAbstractTableModel + Wt::WAbstractTableModel +
+
+ +
+
+ WAccordionLayout + Wt::WAccordionLayout +
+
+
+
+ WAggregateProxyModel + Wt::WAggregateProxyModel +
+
+
+
+ waitForShutdown + Wt::WServer +
+
+ +
+
+ WApplication + Wt::WApplication +
+
+
+
+ wasCanceled + Wt::Ext::ProgressDialog +
+
+
+
+ WBatchEditProxyModel + Wt::WBatchEditProxyModel +
+
+ +
+
+ WBorderLayout + Wt::WBorderLayout +
+
+
+
+ WBoxLayout + Wt::WBoxLayout +
+
+
+
+ WBreak + Wt::WBreak +
+
+ +
+
+ WButtonGroup + Wt::WButtonGroup +
+
+
+
+ WCalendar + Wt::WCalendar +
+
+
+
+ WCanvasPaintDevice + Wt::WCanvasPaintDevice +
+
+ +
+
+ WChart2DRenderer + Wt::Chart::WChart2DRenderer +
+
+ + + +
+
+ WCombinedLocalizedStrings + Wt::WCombinedLocalizedStrings +
+
+
+
+ WComboBox + Wt::WComboBox +
+
+ +
+
+ WContainerWidget + Wt::WContainerWidget +
+
+
+
+ WCssDecorationStyle + Wt::WCssDecorationStyle +
+
+
+
+ WCssRule + Wt::WCssRule +
+
+
+
+ WCssStyleSheet + Wt::WCssStyleSheet +
+
+
+
+ WCssTemplateRule + Wt::WCssTemplateRule +
+
+
+
+ WCssTextRule + Wt::WCssTextRule +
+
+
+
+ WDataSeries + Wt::Chart::WDataSeries +
+
+ + + + +
+
+ WDefaultLayout + Wt::WDefaultLayout +
+
+
+
+ WDefaultLoadingIndicator + Wt::WDefaultLoadingIndicator +
+
+
+
+ WDialog + Wt::WDialog +
+
+ +
+
+ WDropEvent + Wt::WDropEvent +
+
+
+
+ weight + Wt::WFont +
+
+
+
+ weightValue + Wt::WFont +
+
+ +
+
+ WFileUpload + Wt::WFileUpload +
+
+
+
+ WFitLayout + Wt::WFitLayout +
+
+
+
+ WFlashObject + Wt::WFlashObject +
+
+
+
+ WFont + Wt::WFont +
+
+
+
+ WFormWidget + Wt::WFormWidget +
+
+ +
+
+ WGestureEvent + Wt::WGestureEvent +
+
+
+
+ WGLWidget + Wt::WGLWidget +
+
+
+
+ WGoogleMap + Wt::WGoogleMap +
+
+
+
+ WGridLayout + Wt::WGridLayout +
+
+ + +
+
+ WHBoxLayout + Wt::WHBoxLayout +
+
+
+
+ wheelDelta + Wt::WMouseEvent +
+
+
+
+ where + Wt::Dbo::Query +
+
+
+
+ WHTML5Audio + Wt::WHTML5Audio +
+
+
+
+ WHTML5Media + Wt::WHTML5Media +
+
+
+
+ WHTML5Video + Wt::WHTML5Video +
+
+
+
+ WIconPair + Wt::WIconPair +
+
+
+
+ widen + Wt::WString +
+
+ +
+
+ widgetAt + Wt::WBorderLayout +
+
+ + + + +
+
+ WInPlaceEdit + Wt::WInPlaceEdit +
+
+
+
+ WInteractWidget + Wt::WInteractWidget +
+
+ +
+
+ WItemDelegate + Wt::WItemDelegate +
+
+
+
+ WKeyEvent + Wt::WKeyEvent +
+
+ +
+
+ WLayout + Wt::WLayout +
+
+ + + + +
+
+ WLogEntry + Wt::WLogEntry +
+
+
+
+ WLogger + Wt::WLogger +
+
+ + + +
+
+ WMenuItem + Wt::WMenuItem +
+
+ +
+
+ WMessageResourceBundle + Wt::WMessageResourceBundle +
+
+
+
+ WModelIndex + Wt::WModelIndex +
+
+
+
+ WMouseEvent + Wt::WMouseEvent +
+
+
+
+ WObject + Wt::WObject +
+
+ +
+
+ worldTransform + Wt::WPainter +
+
+
+
+ WOverlayLoadingIndicator + Wt::WOverlayLoadingIndicator +
+
+
+
+ WPaintedWidget + Wt::WPaintedWidget +
+
+ + +
+
+ WPanel + Wt::WPanel +
+
+ + +
+
+ WPieChart + Wt::Chart::WPieChart +
+
+ + + +
+
+ WPopupMenu + Wt::WPopupMenu +
+
+ +
+
+ WProgressBar + Wt::WProgressBar +
+
+ + +
+
+ WRasterImage + Wt::WRasterImage +
+
+ + + +
+
+ WResource + Wt::WResource +
+
+
+
+ write + Wt::WResource +
+
+
+
+ WRun + Wt::WServer +
+
+
+
+ WScrollArea + Wt::WScrollArea +
+
+
+
+ WScrollEvent + Wt::WScrollEvent +
+
+
+
+ WSelectionBox + Wt::WSelectionBox +
+
+
+
+ WServer + Wt::WServer +
+
+ +
+
+ WSignalMapper + Wt::WSignalMapper +
+
+ +
+
+ WSocketNotifier + Wt::WSocketNotifier +
+
+
+
+ WSortFilterProxyModel + Wt::WSortFilterProxyModel +
+
+
+
+ WSound + Wt::WSound +
+
+
+
+ WSpinBox + Wt::WSpinBox +
+
+
+
+ WStackedWidget + Wt::WStackedWidget +
+
+ + +
+
+ WStandardPalette + Wt::Chart::WStandardPalette +
+
+
+
+ WStaticModelView + Wt::WStaticModelView +
+
+ + +
+
+ WSubMenuItem + Wt::WSubMenuItem +
+
+ +
+
+ WSvgImage + Wt::WSvgImage +
+
+
+
+ WTable + Wt::WTable +
+
+
+
+ WTableView + Wt::WTableView +
+
+ + +
+
+ WTestEnvironment + Wt::Test::WTestEnvironment +
+
+ + + + +
+
+ WTimer + Wt::WTimer +
+
+
+
+ WTouchEvent + Wt::WTouchEvent +
+
+ +
+
+ WTree + Wt::WTree +
+
+ +
+
+ WTreeTable + Wt::WTreeTable +
+
+
+
+ WTreeTableNode + Wt::WTreeTableNode +
+
+
+
+ WTreeView + Wt::WTreeView +
+
+
+
+ WValidationStatus + Wt::WValidationStatus +
+
+ +
+
+ WVBoxLayout + Wt::WVBoxLayout +
+
+
+
+ WViewWidget + Wt::WViewWidget +
+
+
+
+ WVirtualImage + Wt::WVirtualImage +
+
+
+
+ WVmlImage + Wt::WVmlImage +
+
+
+
+ WWebWidget + Wt::WWebWidget +
+
+
+
+ WWidget + Wt::WWidget +
+
+
+
+ WWidgetItem + Wt::WWidgetItem +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_78.html b/wt-3.1.7a/doc/reference/html/search/functions_78.html new file mode 100644 index 0000000..33ff8ba --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_78.html @@ -0,0 +1,49 @@ + + + + + + + +
+
Loading...
+ +
+
+ x1 + Wt::WLineF +
+
+
+
+ x2 + Wt::WLineF +
+
+
+
+ XSeriesColumn + Wt::Chart::WCartesianChart +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_79.html b/wt-3.1.7a/doc/reference/html/search/functions_79.html new file mode 100644 index 0000000..0706a56 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_79.html @@ -0,0 +1,49 @@ + + + + + + + +
+
Loading...
+ +
+
+ y1 + Wt::WLineF +
+
+
+
+ y2 + Wt::WLineF +
+
+
+
+ year + Wt::WDate +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_7a.html b/wt-3.1.7a/doc/reference/html/search/functions_7a.html new file mode 100644 index 0000000..c5acd1c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_7a.html @@ -0,0 +1,41 @@ + + + + + + + +
+
Loading...
+
+
+ zoomIn + Wt::WGoogleMap +
+
+
+
+ zoomOut + Wt::WGoogleMap +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/functions_7e.html b/wt-3.1.7a/doc/reference/html/search/functions_7e.html new file mode 100644 index 0000000..7376657 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/functions_7e.html @@ -0,0 +1,524 @@ + + + + + + + +
+
Loading...
+
+
+ ~Button + Wt::Ext::Button +
+
+
+
+ ~Call + Wt::Dbo::Call +
+
+
+
+ ~collection + Wt::Dbo::collection +
+
+
+
+ ~Container + Wt::Ext::Container +
+
+
+
+ ~DataStore + Wt::Ext::DataStore +
+
+
+
+ ~Dialog + Wt::Ext::Dialog +
+
+
+
+ ~iterator + Wt::Dbo::collection::iterator +
+
+
+
+ ~JSignal + Wt::JSignal +
+
+
+
+ ~JSlot + Wt::JSlot +
+
+
+
+ ~Panel + Wt::Ext::Panel +
+
+
+
+ ~Postgres + Wt::Dbo::backend::Postgres +
+
+
+
+ ~ptr + Wt::Dbo::ptr +
+
+
+
+ ~Query + Wt::Dbo::Query +
+
+
+
+ ~SeriesIterator + Wt::Chart::SeriesIterator +
+
+
+
+ ~Session + Wt::Dbo::Session +
+
+
+
+ ~Signal + Wt::Signal +
+
+
+
+ ~SqlConnection + Wt::Dbo::SqlConnection +
+
+
+
+ ~SqlConnectionPool + Wt::Dbo::SqlConnectionPool +
+
+
+
+ ~Sqlite3 + Wt::Dbo::backend::Sqlite3 +
+
+
+
+ ~SqlStatement + Wt::Dbo::SqlStatement +
+
+
+
+ ~Transaction + Wt::Dbo::Transaction +
+
+
+
+ ~UpdateLock + Wt::WApplication::UpdateLock +
+
+
+
+ ~WAbstractArea + Wt::WAbstractArea +
+
+
+
+ ~WAbstractChart + Wt::Chart::WAbstractChart +
+
+
+
+ ~WAbstractItemDelegate + Wt::WAbstractItemDelegate +
+
+
+
+ ~WAbstractListModel + Wt::WAbstractListModel +
+
+
+
+ ~WAbstractTableModel + Wt::WAbstractTableModel +
+
+
+
+ ~WAbstractToggleButton + Wt::WAbstractToggleButton +
+
+
+
+ ~WAggregateProxyModel + Wt::WAggregateProxyModel +
+
+
+
+ ~WApplication + Wt::WApplication +
+
+
+
+ ~WBatchEditProxyModel + Wt::WBatchEditProxyModel +
+
+
+
+ ~WBorderLayout + Wt::WBorderLayout +
+
+
+
+ ~WButtonGroup + Wt::WButtonGroup +
+
+
+
+ ~WChart2DRenderer + Wt::Chart::WChart2DRenderer +
+
+
+
+ ~WChartPalette + Wt::Chart::WChartPalette +
+
+
+
+ ~WContainerWidget + Wt::WContainerWidget +
+
+
+
+ ~WCssRule + Wt::WCssRule +
+
+
+
+ ~WCssStyleSheet + Wt::WCssStyleSheet +
+
+
+
+ ~WDatePicker + Wt::WDatePicker +
+
+
+
+ ~WDefaultLayout + Wt::WDefaultLayout +
+
+
+
+ ~WDialog + Wt::WDialog +
+
+
+
+ ~WFileResource + Wt::WFileResource +
+
+
+
+ ~WFlashObject + Wt::WFlashObject +
+
+
+
+ ~WFormWidget + Wt::WFormWidget +
+
+
+
+ ~WGLWidget + Wt::WGLWidget +
+
+
+
+ ~WGoogleMap + Wt::WGoogleMap +
+
+
+
+ ~Widget + Wt::Ext::Widget +
+
+
+
+ ~WLayout + Wt::WLayout +
+
+
+
+ ~WLayoutItem + Wt::WLayoutItem +
+
+
+
+ ~WLayoutItemImpl + Wt::WLayoutItemImpl +
+
+
+
+ ~WLoadingIndicator + Wt::WLoadingIndicator +
+
+
+
+ ~WLocalizedStrings + Wt::WLocalizedStrings +
+
+
+
+ ~WLogEntry + Wt::WLogEntry +
+
+
+
+ ~WLogger + Wt::WLogger +
+
+
+
+ ~WMenu + Wt::WMenu +
+
+
+
+ ~WObject + Wt::WObject +
+
+
+
+ ~WPaintDevice + Wt::WPaintDevice +
+
+
+
+ ~WPaintedWidget + Wt::WPaintedWidget +
+
+
+
+ ~WPainter + Wt::WPainter +
+
+
+
+ ~WPdfImage + Wt::WPdfImage +
+
+
+
+ ~WPopupMenuItem + Wt::WPopupMenuItem +
+
+
+
+ ~WRadioButton + Wt::WRadioButton +
+
+
+
+ ~WRasterImage + Wt::WRasterImage +
+
+
+
+ ~WRegExpValidator + Wt::WRegExpValidator +
+
+
+
+ ~WResource + Wt::WResource +
+
+
+
+ ~WServer + Wt::WServer +
+
+
+
+ ~WSlider + Wt::WSlider +
+
+
+
+ ~WSocketNotifier + Wt::WSocketNotifier +
+
+
+
+ ~WSortFilterProxyModel + Wt::WSortFilterProxyModel +
+
+
+
+ ~WSound + Wt::WSound +
+
+
+
+ ~WStandardItem + Wt::WStandardItem +
+
+
+
+ ~WStandardItemModel + Wt::WStandardItemModel +
+
+
+
+ ~WString + Wt::WString +
+
+
+
+ ~WStringListModel + Wt::WStringListModel +
+
+
+
+ ~WSvgImage + Wt::WSvgImage +
+
+
+
+ ~WTable + Wt::WTable +
+
+
+
+ ~WTestEnvironment + Wt::Test::WTestEnvironment +
+
+
+
+ ~WText + Wt::WText +
+
+
+
+ ~WTextEdit + Wt::WTextEdit +
+
+
+
+ ~WTimer + Wt::WTimer +
+
+
+
+ ~WTreeNode + Wt::WTreeNode +
+
+
+
+ ~WValidator + Wt::WValidator +
+
+
+
+ ~WVirtualImage + Wt::WVirtualImage +
+
+
+
+ ~WWidget + Wt::WWidget +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/mag_sel.png b/wt-3.1.7a/doc/reference/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/search/mag_sel.png differ diff --git a/wt-3.1.7a/doc/reference/html/search/namespaces_77.html b/wt-3.1.7a/doc/reference/html/search/namespaces_77.html new file mode 100644 index 0000000..935b1db --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/namespaces_77.html @@ -0,0 +1,49 @@ + + + + + + + +
+
Loading...
+
+
+ Chart + Wt +
+
+
+
+ Dbo + Wt +
+
+
+
+ Ext + Wt +
+
+
+
+ Http + Wt +
+
+
+
+ Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/nomatches.html b/wt-3.1.7a/doc/reference/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/search.css b/wt-3.1.7a/doc/reference/html/search/search.css new file mode 100644 index 0000000..50249e5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/search.css @@ -0,0 +1,240 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#searchli { + float: right; + display: block; + width: 170px; + height: 36px; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:116px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} diff --git a/wt-3.1.7a/doc/reference/html/search/search.js b/wt-3.1.7a/doc/reference/html/search/search.js new file mode 100644 index 0000000..780c785 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/search.js @@ -0,0 +1,740 @@ +// Search script generated by doxygen +// Copyright (C) 2009 by Dimitri van Heesch. + +// The code in this file is loosly based on main.js, part of Natural Docs, +// which is Copyright (C) 2003-2008 Greg Valure +// Natural Docs is licensed under the GPL. + +var indexSectionsWithContent = +{ + 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111001101111111111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101110011001110000110111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101100001000100100011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111011101101111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "namespaces", + 3: "functions", + 4: "variables", + 5: "typedefs", + 6: "enums", + 7: "enumvalues" +}; + +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var hexCode; + if (code<16) + { + hexCode="0"+code.toString(16); + } + else + { + hexCode=code.toString(16); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + { + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location.href = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} diff --git a/wt-3.1.7a/doc/reference/html/search/search_l.png b/wt-3.1.7a/doc/reference/html/search/search_l.png new file mode 100644 index 0000000..c872f4d Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/search/search_l.png differ diff --git a/wt-3.1.7a/doc/reference/html/search/search_m.png b/wt-3.1.7a/doc/reference/html/search/search_m.png new file mode 100644 index 0000000..b429a16 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/search/search_m.png differ diff --git a/wt-3.1.7a/doc/reference/html/search/search_r.png b/wt-3.1.7a/doc/reference/html/search/search_r.png new file mode 100644 index 0000000..97ee8b4 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/search/search_r.png differ diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_61.html b/wt-3.1.7a/doc/reference/html/search/typedefs_61.html new file mode 100644 index 0000000..6e613dc --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_61.html @@ -0,0 +1,29 @@ + + + + + + + +
+
Loading...
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_63.html b/wt-3.1.7a/doc/reference/html/search/typedefs_63.html new file mode 100644 index 0000000..2216d9d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_63.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ CookieMap + Wt::WEnvironment +
+
+
+
+ Coordinates + Wt::WMouseEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_64.html b/wt-3.1.7a/doc/reference/html/search/typedefs_64.html new file mode 100644 index 0000000..be20790 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_64.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ DataMap + Wt::WAbstractItemModel +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_69.html b/wt-3.1.7a/doc/reference/html/search/typedefs_69.html new file mode 100644 index 0000000..63267ef --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_69.html @@ -0,0 +1,35 @@ + + + + + + + +
+
Loading...
+ +
+
+ ItemMap + Wt::WAbstractProxyModel +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_6d.html b/wt-3.1.7a/doc/reference/html/search/typedefs_6d.html new file mode 100644 index 0000000..f64853a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_6d.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Method + Wt::WObject +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_70.html b/wt-3.1.7a/doc/reference/html/search/typedefs_70.html new file mode 100644 index 0000000..c694554 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_70.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ ParameterMap + Wt::Http +
+
+
+
+ ParameterValues + Wt::Http +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_74.html b/wt-3.1.7a/doc/reference/html/search/typedefs_74.html new file mode 100644 index 0000000..8ce5e8a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_74.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ type + Wt::Dbo::ptr_tuple +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_75.html b/wt-3.1.7a/doc/reference/html/search/typedefs_75.html new file mode 100644 index 0000000..84efab7 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_75.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ UploadedFileMap + Wt::Http +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_76.html b/wt-3.1.7a/doc/reference/html/search/typedefs_76.html new file mode 100644 index 0000000..86de551 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_76.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ value_type + Wt::Dbo::collection +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/typedefs_77.html b/wt-3.1.7a/doc/reference/html/search/typedefs_77.html new file mode 100644 index 0000000..c40f5f3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/typedefs_77.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ WMessage + Wt::WString +
+
+
+
+ WTreeNodeSet + Wt::WTree +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_61.html b/wt-3.1.7a/doc/reference/html/search/variables_61.html new file mode 100644 index 0000000..5734b62 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_61.html @@ -0,0 +1,98 @@ + + + + + + + +
+
Loading...
+
+ +
+
+ +
+
+
+ All + Wt +
+
+
+
+ alpha + Wt::WTransform::TRSSDecomposition +
+
+
+
+ alpha1 + Wt::WTransform::TRSRDecomposition +
+
+
+
+ alpha2 + Wt::WTransform::TRSRDecomposition +
+
+
+
+ animate + Wt::Ext::ToolTipConfig +
+
+
+
+ appendReplacedText + Wt::WSuggestionPopup::Options +
+
+
+
+ Auto + Wt::WLength +
+
+
+
+ AUTO_MAXIMUM + Wt::Chart::WAxis +
+
+
+
+ AUTO_MINIMUM + Wt::Chart::WAxis +
+
+
+
+ autoDismiss + Wt::Ext::ToolTipConfig +
+
+
+
+ autoHide + Wt::Ext::ToolTipConfig +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_63.html b/wt-3.1.7a/doc/reference/html/search/variables_63.html new file mode 100644 index 0000000..8638658 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_63.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ CenterXY + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_64.html b/wt-3.1.7a/doc/reference/html/search/variables_64.html new file mode 100644 index 0000000..0744819 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_64.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ dismissDelay + Wt::Ext::ToolTipConfig +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_65.html b/wt-3.1.7a/doc/reference/html/search/variables_65.html new file mode 100644 index 0000000..b6e3db3 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_65.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Empty + Wt::WString +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_68.html b/wt-3.1.7a/doc/reference/html/search/variables_68.html new file mode 100644 index 0000000..2d41b00 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_68.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ hideDelay + Wt::Ext::ToolTipConfig +
+
+
+
+ hideOnClick + Wt::Ext::ToolTipConfig +
+
+
+
+ highlightBeginTag + Wt::WSuggestionPopup::Options +
+
+
+
+ highlightEndTag + Wt::WSuggestionPopup::Options +
+
+
+
+ Horizontals + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_69.html b/wt-3.1.7a/doc/reference/html/search/variables_69.html new file mode 100644 index 0000000..eccd91d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_69.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Infinite + Wt::WVirtualImage +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_6c.html b/wt-3.1.7a/doc/reference/html/search/variables_6c.html new file mode 100644 index 0000000..cb5684a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_6c.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ listSeparator + Wt::WSuggestionPopup::Options +
+
+
+
+ location_ + Wt::Chart::WChart2DRenderer +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_6d.html b/wt-3.1.7a/doc/reference/html/search/variables_6d.html new file mode 100644 index 0000000..f92217d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_6d.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ MatchTypeMask + Wt +
+
+
+
+ maxWidth + Wt::Ext::ToolTipConfig +
+
+
+
+ minWidth + Wt::Ext::ToolTipConfig +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_6e.html b/wt-3.1.7a/doc/reference/html/search/variables_6e.html new file mode 100644 index 0000000..9e0727e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_6e.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ None + Wt +
+
+
+
+ NoTicks + Wt::WSlider +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_73.html b/wt-3.1.7a/doc/reference/html/search/variables_73.html new file mode 100644 index 0000000..3852307 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_73.html @@ -0,0 +1,62 @@ + + + + + + + +
+
Loading...
+
+
+ sep + Wt::WLogger +
+
+
+
+ sh + Wt::WTransform::TRSSDecomposition +
+
+
+
+ showDelay + Wt::Ext::ToolTipConfig +
+
+
+
+ sourceIndex_ + Wt::WAbstractProxyModel::BaseItem +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_74.html b/wt-3.1.7a/doc/reference/html/search/variables_74.html new file mode 100644 index 0000000..35971b5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_74.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ TicksBothSides + Wt::WSlider +
+
+
+
+ timestamp + Wt::WLogger +
+
+
+
+ trackMouse + Wt::Ext::ToolTipConfig +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_76.html b/wt-3.1.7a/doc/reference/html/search/variables_76.html new file mode 100644 index 0000000..d63a601 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_76.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Verticals + Wt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_77.html b/wt-3.1.7a/doc/reference/html/search/variables_77.html new file mode 100644 index 0000000..4814e45 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_77.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ whitespace + Wt::WSuggestionPopup::Options +
+
+
+
+ wordSeparators + Wt::WSuggestionPopup::Options +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_78.html b/wt-3.1.7a/doc/reference/html/search/variables_78.html new file mode 100644 index 0000000..950e621 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_78.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ x + Wt::Coordinates +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/search/variables_79.html b/wt-3.1.7a/doc/reference/html/search/variables_79.html new file mode 100644 index 0000000..eb2fa8b --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/search/variables_79.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ y + Wt::Coordinates +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates-members.html new file mode 100644 index 0000000..d5a2dba --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Coordinates Member List

+
+
+This is the complete list of members for Wt::Coordinates, including all inherited members. + + + +
Coordinates(int X, int Y)Wt::Coordinates
xWt::Coordinates
yWt::Coordinates
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates.html new file mode 100644 index 0000000..af7e018 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Coordinates.html @@ -0,0 +1,108 @@ + + + + +Wt: Wt::Coordinates Struct Reference + + + + + + + + + +
+ +
+

Wt::Coordinates Struct Reference

+
+
+ +

A coordinate. +More...

+ +

List of all members.

+ + + + + + + + + +

+Public Member Functions

Coordinates (int X, int Y)
 Constructor.

+Public Attributes

+int x
 X coordinate.
+int y
 Y coordinate.
+

Detailed Description

+

A coordinate.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DirectBinding.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DirectBinding.html new file mode 100644 index 0000000..fb02c16 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DirectBinding.html @@ -0,0 +1,90 @@ + + + + +Wt: Wt::Dbo::DirectBinding Class Reference + + + + + + + + + +
+
+

Wt::Dbo::DirectBinding Class Reference

+
+
+ +

#include <Wt/Dbo/Query>

+ +
+

Detailed Description

+

Bind strategy indicating that parameters are bound directly to an underlying prepared statement.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DynamicBinding.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DynamicBinding.html new file mode 100644 index 0000000..8d8cb2e --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1DynamicBinding.html @@ -0,0 +1,90 @@ + + + + +Wt: Wt::Dbo::DynamicBinding Class Reference + + + + + + + + + +
+
+

Wt::Dbo::DynamicBinding Class Reference

+
+
+ +

#include <Wt/Dbo/Query>

+ +
+

Detailed Description

+

Bind strategy indicating that binding to the underlying prepared statement is deferred and parameter values are temporarily stored first in a dynamic value vector.

+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits.html new file mode 100644 index 0000000..5f7e9e0 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits.html @@ -0,0 +1,204 @@ + + + + +Wt: Wt::Dbo::dbo_default_traits Class Reference + + + + + + + + + +
+ +
+

Wt::Dbo::dbo_default_traits Class Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Default traits for a class mapped with Wt::Dbo. +More...

+ +

#include <Wt/Dbo/Dbo>

+
+Inheritance diagram for Wt::Dbo::dbo_default_traits:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + +

+Public Types

typedef long long IdType
 Type of the primary key.

+Static Public Member Functions

static IdType invalidId ()
 Returns the sentinel value for a null id.
static const char * surrogateIdField ()
 Returns the database field name for the surrogate primary key.
static const char * versionField ()
 Configures the optimistic concurrency version field.
+

Detailed Description

+

Default traits for a class mapped with Wt::Dbo.

+

This class provides the default traits. It is convenient (and future proof) to inherit these default traits when customizing the traits for one particular class.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef long long Wt::Dbo::dbo_default_traits::IdType
+
+
+ +

Type of the primary key.

+

The default corresponds to a surrogate key, which is long long.

+ +

Reimplemented in Wt::Dbo::dbo_traits< C >.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
static IdType Wt::Dbo::dbo_default_traits::invalidId ( ) [static]
+
+
+ +

Returns the sentinel value for a null id.

+

The default implementation returns -1.

+ +

Reimplemented in Wt::Dbo::dbo_traits< C >.

+ +
+
+ +
+
+ + + + + + + +
static const char* Wt::Dbo::dbo_default_traits::surrogateIdField ( ) [static]
+
+
+ +

Returns the database field name for the surrogate primary key.

+

The default surrogate id database field name is "id".

+ +

Reimplemented in Wt::Dbo::dbo_traits< C >.

+ +
+
+ +
+
+ + + + + + + +
static const char* Wt::Dbo::dbo_default_traits::versionField ( ) [static]
+
+
+ +

Configures the optimistic concurrency version field.

+

By default, optimistic concurrency locking is enabled using a "version" field.

+ +

Reimplemented in Wt::Dbo::dbo_traits< C >.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.map b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.map new file mode 100644 index 0000000..f3b2d19 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.md5 new file mode 100644 index 0000000..20a7346 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.md5 @@ -0,0 +1 @@ +dd84adbadab21df8162691dc8205c565 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.png b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.png new file mode 100644 index 0000000..d629ed9 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__default__traits__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits.html new file mode 100644 index 0000000..b7bea5c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits.html @@ -0,0 +1,276 @@ + + + + +Wt: Wt::Dbo::dbo_traits< C > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::dbo_traits< C > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Traits for a class mapped with Wt::Dbo. +More...

+ +

#include <Wt/Dbo/Dbo>

+
+Inheritance diagram for Wt::Dbo::dbo_traits< C >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + +

+Public Types

typedef YourIdType IdType
 Type of the primary key.

+Static Public Member Functions

static IdType invalidId ()
 Returns the sentinel value for a null id.
static const char * surrogateIdField ()
 Configures the surrogate primary key field.
static const char * versionField ()
 Configures the optimistic concurrency version field.
+

Detailed Description

+

template<class C>
+ class Wt::Dbo::dbo_traits< C >

+ +

Traits for a class mapped with Wt::Dbo.

+

The traits class provides some of the mapping properties related to the primary key and optimistic concurrency locking using a version field.

+

See dbo_default_traits for default values.

+

The following example changes the surrogate id field name for a class Foo from the default "id" to "foo_id":

+
 namespace Wt {
+   namespace Dbo {
+
+     template<>
+     struct dbo_traits<Foo>
+     {
+        static const char *surrogateIdField() { return "foo_id"; }
+     };
+   }
+ }
+

Member Typedef Documentation

+ +
+
+
+template<class C>
+ + + + +
typedef YourIdType Wt::Dbo::dbo_traits< C >::IdType
+
+
+ +

Type of the primary key.

+

This indicates the type of the primary key, which needs to be long long for a surrogate id, but can be any type supported by Wt::Dbo::field() (including composite types) for a natural primary key.

+

The following operations need to be supported for an id value:

+
    +
  • default constructor
  • +
  • copy constructor
  • +
  • serialization to a string (for formatting an error message in exceptions) : std::ostream << id
  • +
  • comparison operator (for use as a key in a std::map): id == id
  • +
  • less than operator (for use as a key in a std::map): id < id
  • +
+

Only the default long long is supported for an auto-incrementing surrogate primary key. You need to change the default key type typically in conjuction with specifying a natural id, see Wt::Dbo::id().

+

The following example illustrates how to prepare a type to be usable as a composite id type:

+
 struct Coordinate {
+   int x, y;
+
+   Coordinate()
+     : x(-1), y(-1) { }
+
+   bool operator== (const Coordinate& other) const {
+     return x == other.x && y == other.y;
+   }
+
+   bool operator< (const Coordinate& other) const {
+     if (x < other.x)
+       return true;
+     else if (x == other.x)
+       return y < other.y;
+     else
+       return false;
+   }
+ };
+ 
+ std::ostream& operator<< (std::ostream& o, const Coordinate& c)
+ {
+   return o << "(" << c.x << ", " << c.y << ")";
+ }
+ 
+ namespace Wt {
+   namespace Dbo {
+ 
+     template <class Action>
+     void field(Action& action, Coordinate& coordinate, const std::string& name, int size = -1)
+     {
+       field(action, coordinate.x, name + "_x");
+       field(action, coordinate.y, name + "_y");
+     }
+   }
+ }
+
+

Reimplemented from Wt::Dbo::dbo_default_traits.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class C>
+ + + + + + + +
static IdType Wt::Dbo::dbo_traits< C >::invalidId ( ) [static]
+
+
+ +

Returns the sentinel value for a null id.

+

When used as a foreign key, this value is used to represent a null value.

+ +

Reimplemented from Wt::Dbo::dbo_default_traits.

+ +
+
+ +
+
+
+template<class C>
+ + + + + + + +
static const char* Wt::Dbo::dbo_traits< C >::surrogateIdField ( ) [static]
+
+
+ +

Configures the surrogate primary key field.

+

Returns the field name which is the surrogate primary key, corresponding to the object's id.

+

You can disable this auto-incrementing surrogate id by returning 0 instead. In that case you will need to define a natural id for your class using Wt::Dbo::id().

+ +

Reimplemented from Wt::Dbo::dbo_default_traits.

+ +
+
+ +
+
+
+template<class C>
+ + + + + + + +
static const char* Wt::Dbo::dbo_traits< C >::versionField ( ) [static]
+
+
+ +

Configures the optimistic concurrency version field.

+

Optimistic concurrency locking is used to detect concurrent updates by an object from multiple sessions. On each update, the version of a record is at the same time checked (to see if it matches the version of the record that was read), and incremented. A StaleObjectException is thrown if a record was modified by another session since it was read.

+

This method must return the database field name used for this version field.

+

You can disable optimistic locking using a version field all together for your class by returning 0 instead.

+ +

Reimplemented from Wt::Dbo::dbo_default_traits.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.map b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.map new file mode 100644 index 0000000..428acbb --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.md5 b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.md5 new file mode 100644 index 0000000..a7724b1 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.md5 @@ -0,0 +1 @@ +4ca2d329311eb9cb3a0b04f2fea9c898 \ No newline at end of file diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.png b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.png new file mode 100644 index 0000000..4c94174 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1dbo__traits__inherit__graph.png differ diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple-members.html new file mode 100644 index 0000000..411a571 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple-members.html @@ -0,0 +1,79 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::Dbo::ptr_tuple< T0, T1,, T9 > Member List

+
+
+This is the complete list of members for Wt::Dbo::ptr_tuple< T0, T1,, T9 >, including all inherited members. + +
type typedefWt::Dbo::ptr_tuple< T0, T1,, T9 >
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple.html new file mode 100644 index 0000000..2b3dabd --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1ptr__tuple.html @@ -0,0 +1,115 @@ + + + + +Wt: Wt::Dbo::ptr_tuple< T0, T1,, T9 > Struct Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::ptr_tuple< T0, T1,, T9 > Struct Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

A utility class for defining a tuple of database objects. +More...

+ +

List of all members.

+ + + + +

+Public Types

+typedef boost::tuple< ptr< T0 >
+, ptr< T1 >,..., ptr< T9 > > 
type
 A typedef for a Boost.Tuple for ptrs.
+

Detailed Description

+

template<class T0 = boost::tuples::null_type, class T1 = boost::tuples::null_type, ..., class T9 = boost::tuples::null_type>
+ struct Wt::Dbo::ptr_tuple< T0, T1,, T9 >

+ +

A utility class for defining a tuple of database objects.

+

Since C++ (at least prior to C++0x) does not support template typedefs, this class provides a nested type that is a typedef for a Boost.Tuple containing one or more Wt::Dbo::ptr.

+

Thus:

+
 namespace dbo = Wt::Dbo;
+ typedef dbo::ptr_tuple<A, B, C>::type ABC;
+

Is equivalent to:

+
 namespace dbo = Wt::Dbo;
+ typedef boost::tuple<dbo::ptr<A>, dbo::ptr<B>, dbo::ptr<C> > ABC;
+
Note:
Boost.Tuple (in its general form) is supported as a result for a Session::query() by a partial template specialization of query_result_traits.
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1query__result__traits.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1query__result__traits.html new file mode 100644 index 0000000..4a4c1fe --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1query__result__traits.html @@ -0,0 +1,353 @@ + + + + +Wt: Wt::Dbo::query_result_traits< Result > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::query_result_traits< Result > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Traits class for result types. +More...

+ +

#include <Wt/Dbo/SqlTraits>

+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Static Public Member Functions

static void getFields (Session &session, std::vector< std::string > *aliases, std::vector< FieldInfo > &result)
 Obtains the list of fields in this result.
static Result load (Session &session, SqlStatement &statement, int &column)
 Reads a result from an executed query.
static void getValues (const Result &result, std::vector< boost::any > &values)
 Returns result values.
static void setValue (Result &result, int &index, const boost::any &value)
 Sets a result value.
static Result create ()
 Creates a new result.
static void add (Session &session, Result &result)
 Adds a new result to the session.
static void remove (Result &result)
 Removes a result from the session.
+

Detailed Description

+

template<typename Result>
+ class Wt::Dbo::query_result_traits< Result >

+ +

Traits class for result types.

+

This traits class may be used to add support for using classes or structs as a result for a Session::query().

+

The library provides by default support for primitive types, using sql_value_traits, mapped objects held by ptr types, and boost::tuple<> of any combination of these.

+
See also:
sql_value_traits, ptr
+

Member Function Documentation

+ +
+
+
+template<typename Result >
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::query_result_traits< Result >::add (Session session,
Result &  result 
) [static]
+
+
+ +

Adds a new result to the session.

+

Adds a (newly created) result to a session.

+

This method needs to be implemented only if you want to create new results from a QueryModel (which implements Wt's MVC item model).

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + +
Result Wt::Dbo::query_result_traits< Result >::create ( ) [static]
+
+
+ +

Creates a new result.

+

Creates a new result. This should initialize a result so that its values can be set using setValue() or read using getValues().

+

The result should not yet be associated with a session.

+

This method needs to be implemented only if you want to create new results from a QueryModel (which implements Wt's MVC item model).

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::query_result_traits< Result >::getFields (Session session,
std::vector< std::string > *  aliases,
std::vector< FieldInfo > &  result 
) [static]
+
+
+ +

Obtains the list of fields in this result.

+

This is used to build the select clause of an Sql query.

+

The given aliases may be used to qualify fields that correspond to entire tables (popping values from the front of this vector). An exception is thrown if not enough aliases were provided.

+

This method is needed when you want to use Result as the result of query.

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + + + + + + + + + + + + +
void Wt::Dbo::query_result_traits< Result >::getValues (const Result &  result,
std::vector< boost::any > &  values 
) [static]
+
+
+ +

Returns result values.

+

This returns the individual field values in the given result.

+

This method needs to be implemented only if you want to display the result in a QueryModel (which implements Wt's MVC item model).

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
Result Wt::Dbo::query_result_traits< Result >::load (Session session,
SqlStatement statement,
int &  column 
) [static]
+
+
+ +

Reads a result from an executed query.

+

This reads the value from the statement, starting at column column, and advancing the column pointer for as many columns as needed (and according to the number of fields returned by getFields()).

+

This method is needed when you want to use Result as the result of query.

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + + +
void Wt::Dbo::query_result_traits< Result >::remove (Result &  result ) [static]
+
+
+ +

Removes a result from the session.

+

This method needs to be implemented only if you want to remove results from a QueryModel (which implements Wt's MVC item model).

+ +
+
+ +
+
+
+template<typename Result >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Wt::Dbo::query_result_traits< Result >::setValue (Result &  result,
int &  index,
const boost::any &  value 
) [static]
+
+
+ +

Sets a result value.

+

Sets the value at index, where index indicates the field whose value needs to be updated.

+

When index is out-of-bounds, it should be decremented with as many fields as there are in this result type. Otherwise, index should be set to -1 after the value has been set.

+

This method needs to be implemented only if you want to modify the result from a QueryModel (which implements Wt's MVC item model).

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1sql__value__traits.html b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1sql__value__traits.html new file mode 100644 index 0000000..b504830 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1Dbo_1_1sql__value__traits.html @@ -0,0 +1,255 @@ + + + + +Wt: Wt::Dbo::sql_value_traits< V, Enable > Class Template Reference + + + + + + + + + +
+ +
+

Wt::Dbo::sql_value_traits< V, Enable > Class Template Reference
+ +[Database Objects (Dbo)] +

+
+
+ +

Traits class for value types. +More...

+ +

#include <Wt/Dbo/SqlTraits>

+ +

List of all members.

+ + + + + + + + +

+Static Public Member Functions

static const char * type (SqlConnection *connection, int size)
 Returns the SQL type name.
static void bind (const V &v, SqlStatement *statement, int index, int size)
 Binds a value to a statement parameter.
static bool read (V &v, SqlStatement *statement, int column, int size)
 Reads a result from an executed query.
+

Detailed Description

+

template<typename V, class Enable = void>
+ class Wt::Dbo::sql_value_traits< V, Enable >

+ +

Traits class for value types.

+

This traits class may be specialized for a custom type V, to add dbo support for custom types. A value type has a one-to-one mapping to a single database column.

+

The library has built-in support for:

+
    +
  • std::string
  • +
  • char const * (read-only: only as a bound parameter for a query)
  • +
  • short, int, long, long long
  • +
  • float, double
  • +
  • enum types
  • +
  • std::vector<unsigned char> (binary data)
  • +
  • boost::optional<T>: to make the type optionally null
  • +
+

In <Wt/Dbo/WtSqlTraits>, traits classes are also provided for:

+ +
See also:
query_result_traits
+

Member Function Documentation

+ +
+
+
+template<typename V, class Enable = void>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void Wt::Dbo::sql_value_traits< V, Enable >::bind (const V &  v,
SqlStatement statement,
int  index,
int  size 
) [static]
+
+
+ +

Binds a value to a statement parameter.

+

The value v must be bound to parameter with index index in the statement.

+
See also:
SqlStatement::bind()
+ +
+
+ +
+
+
+template<typename V, class Enable = void>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool Wt::Dbo::sql_value_traits< V, Enable >::read (V &  v,
SqlStatement statement,
int  column,
int  size 
) [static]
+
+
+ +

Reads a result from an executed query.

+

The value v must be read from result column column in the statement.

+

Returns true if the value was not null. This result may be used by the boost::optional<V> specialization to support fields that may have null values.

+
See also:
SqlStatement::getResult()
+ +
+
+ +
+
+
+template<typename V, class Enable = void>
+ + + + + + + + + + + + + + + + + + +
static const char* Wt::Dbo::sql_value_traits< V, Enable >::type (SqlConnection connection,
int  size 
) [static]
+
+
+ +

Returns the SQL type name.

+

The size (for strings) is a hint and may be ignored by a back-end.

+

This will usually return a type ending with " not null" except for C++ types that support null values. For a normal c++ value type T, boost::optional<T> has been specialized to allow for null values.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem-members.html new file mode 100644 index 0000000..50b8267 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem-members.html @@ -0,0 +1,80 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WAbstractProxyModel::BaseItem Member List

+
+
+This is the complete list of members for Wt::WAbstractProxyModel::BaseItem, including all inherited members. + + +
BaseItem(const WModelIndex &sourceIndex)Wt::WAbstractProxyModel::BaseItem
sourceIndex_Wt::WAbstractProxyModel::BaseItem
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem.html new file mode 100644 index 0000000..a918c04 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WAbstractProxyModel_1_1BaseItem.html @@ -0,0 +1,128 @@ + + + + +Wt: Wt::WAbstractProxyModel::BaseItem Struct Reference + + + + + + + + + +
+ +
+

Wt::WAbstractProxyModel::BaseItem Struct Reference

+
+
+ +

A base class for an item modeling a source index parent. +More...

+ +

Inherited by Wt::WBatchEditProxyModel::Item.

+ +

List of all members.

+ + + + + + + +

+Public Member Functions

BaseItem (const WModelIndex &sourceIndex)
 Create a BaseItem.

+Public Attributes

WModelIndex sourceIndex_
 The source model index.
+

Detailed Description

+

A base class for an item modeling a source index parent.

+

Many mplementations of a proxy model will need to maintain a data structure per source model indexes, where they relate source rows or columns to proxy rows or columns, per hierarchical parent.

+

It may be convenient to start from this item class as a base class so that shiftModelIndexes() can be used to update this data structure when the source model adds or removes rows.

+

You will typically use your derived class of this item as the internal pointer for proxy model indexes: a proxy model index will have an item as internal pointer whose sourceIndex_ corresponds to the source equivalent of the proxy model index parent.

+
See also:
createIndex()
+

Member Data Documentation

+ +
+ +
+ +

The source model index.

+

The source model index for this item.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1Sep.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1Sep.html new file mode 100644 index 0000000..f3053b5 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1Sep.html @@ -0,0 +1,92 @@ + + + + +Wt: Wt::WLogger::Sep Struct Reference + + + + + + + + + +
+
+

Wt::WLogger::Sep Struct Reference

+
+
+ +

Class that indicates a field separator. +More...

+ +
+

Detailed Description

+

Class that indicates a field separator.

+
See also:
sep
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1TimeStamp.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1TimeStamp.html new file mode 100644 index 0000000..6781367 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WLogger_1_1TimeStamp.html @@ -0,0 +1,92 @@ + + + + +Wt: Wt::WLogger::TimeStamp Struct Reference + + + + + + + + + +
+
+

Wt::WLogger::TimeStamp Struct Reference

+
+
+ +

Class that indicates a time stamp. +More...

+ +
+

Detailed Description

+

Class that indicates a time stamp.

+
See also:
timestamp
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates-members.html new file mode 100644 index 0000000..b793b88 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates-members.html @@ -0,0 +1,46 @@ + + + + +Wt: Member List + + + + + + +
+
+

Wt::WMouseEvent::Coordinates Member List

+
+
+This is the complete list of members for Wt::WMouseEvent::Coordinates, including all inherited members. + + + +
Coordinates(int x_, int y_)Wt::WMouseEvent::Coordinates
xWt::WMouseEvent::Coordinates
yWt::WMouseEvent::Coordinates
+
+Generated on Fri Oct 29 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates.html new file mode 100644 index 0000000..22e8350 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WMouseEvent_1_1Coordinates.html @@ -0,0 +1,74 @@ + + + + +Wt: Wt::WMouseEvent::Coordinates Struct Reference + + + + + + +
+ +
+

Wt::WMouseEvent::Coordinates Struct Reference

+
+
+ +

A mouse coordinate. +More...

+ +

List of all members.

+ + + + + + + + + +

+Public Member Functions

Coordinates (int x_, int y_)
 Constructor.

+Public Attributes

+int x
 X coordinate.
+int y
 Y coordinate.
+

Detailed Description

+

A mouse coordinate.

+
+
+Generated on Fri Oct 29 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options-members.html new file mode 100644 index 0000000..378c642 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WSuggestionPopup::Options Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options.html new file mode 100644 index 0000000..fd4593d --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WSuggestionPopup_1_1Options.html @@ -0,0 +1,212 @@ + + + + +Wt: Wt::WSuggestionPopup::Options Struct Reference + + + + + + + + + +
+ +
+

Wt::WSuggestionPopup::Options Struct Reference

+
+
+ +

A configuration object to generate a matcher and replacer JavaScript function. +More...

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Attributes

std::string highlightBeginTag
 Open tag to highlight a match in a suggestion.
std::string highlightEndTag
 Close tag to highlight a match in a suggestion.
char listSeparator
 When editing a list of values, the separator used for different items.
std::string whitespace
 When editing a value, the whitespace characters ignored before the current value.
std::string wordSeparators
 To show suggestions based on matches of the edited value with parts of the suggestion.
std::string appendReplacedText
 When replacing the current edited value with suggestion value, append the following string as well.
+

Detailed Description

+

A configuration object to generate a matcher and replacer JavaScript function.

+
See also:
WSuggestionPopup
+

Member Data Documentation

+ +
+ +
+ +

When replacing the current edited value with suggestion value, append the following string as well.

+

Used during replacing.

+ +
+
+ +
+ +
+ +

Open tag to highlight a match in a suggestion.

+

Must be an opening markup tag, such as <b>.

+

Used during matching.

+ +
+
+ +
+ +
+ +

Close tag to highlight a match in a suggestion.

+

Must be a closing markup tag, such as </b>.

+

Used during matching.

+ +
+
+ +
+ +
+ +

When editing a list of values, the separator used for different items.

+

For example, ',' to separate different values on komma. Specify 0 ('\0') for no list separation.

+

Used during matching and replacing.

+ +
+
+ +
+ +
+ +

When editing a value, the whitespace characters ignored before the current value.

+

For example, " \\n" to ignore spaces and newlines.

+

Used during matching and replacing.

+ +
+
+ +
+ +
+ +

To show suggestions based on matches of the edited value with parts of the suggestion.

+

For example, " .@" will also match with suggestion text after a space, a dot (.) or an at-symbol (@).

+

Used during matching.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition-members.html new file mode 100644 index 0000000..ba3247c --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTransform::TRSRDecomposition Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition.html new file mode 100644 index 0000000..acf5187 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSRDecomposition.html @@ -0,0 +1,116 @@ + + + + +Wt: Wt::WTransform::TRSRDecomposition Struct Reference + + + + + + + + + +
+ +
+

Wt::WTransform::TRSRDecomposition Struct Reference

+
+
+ +

Result of a TRSR decomposition. +More...

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Attributes

+double dx
 X component of translation.
+double dy
 Y component of translation.
+double alpha1
 First rotation angle (radians)
+double sx
 X component of scale.
+double sy
 Y component of scale.
+double alpha2
 Second rotation angle (radians)
+

Detailed Description

+

Result of a TRSR decomposition.

+
See also:
decomposeTranslateRotateScaleRotate()
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition-members.html new file mode 100644 index 0000000..8433fc4 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition-members.html @@ -0,0 +1,84 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::WTransform::TRSSDecomposition Member List

+
+ + + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition.html b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition.html new file mode 100644 index 0000000..295b182 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1WTransform_1_1TRSSDecomposition.html @@ -0,0 +1,116 @@ + + + + +Wt: Wt::WTransform::TRSSDecomposition Struct Reference + + + + + + + + + +
+ +
+

Wt::WTransform::TRSSDecomposition Struct Reference

+
+
+ +

Result of a TRSS decomposition. +More...

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Attributes

+double dx
 X component of translation.
+double dy
 Y component of translation.
+double alpha
 Rotation angle (radians)
+double sx
 X component of scale.
+double sy
 Y component of scale.
+double sh
 Shear (in Y direction)
+

Detailed Description

+

Result of a TRSS decomposition.

+
See also:
decomposeTranslateRotateScaleSkew()
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits-members.html b/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits-members.html new file mode 100644 index 0000000..f966cce --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits-members.html @@ -0,0 +1,81 @@ + + + + +Wt: Member List + + + + + + + + + +
+
+

Wt::boost_any_traits< Type > Member List

+
+
+This is the complete list of members for Wt::boost_any_traits< Type >, including all inherited members. + + + +
asNumber(const Type &v)Wt::boost_any_traits< Type > [static]
asString(const Type &value, const WString &format)Wt::boost_any_traits< Type > [static]
compare(const Type &v1, const Type &v2)Wt::boost_any_traits< Type > [static]
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits.html b/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits.html new file mode 100644 index 0000000..83fd84a --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/structWt_1_1boost__any__traits.html @@ -0,0 +1,209 @@ + + + + +Wt: Wt::boost_any_traits< Type > Struct Template Reference + + + + + + + + + +
+ +
+

Wt::boost_any_traits< Type > Struct Template Reference
+ +[Model/view system] +

+
+
+ +

A traits class for a type stored in a boost::any. +More...

+ +

List of all members.

+ + + + + + + + +

+Static Public Member Functions

static WString asString (const Type &value, const WString &format)
 Converts a value to a string.
static double asNumber (const Type &v)
 Converts a value to a number.
static int compare (const Type &v1, const Type &v2)
 Compares two values.
+

Detailed Description

+

template<typename Type>
+ struct Wt::boost_any_traits< Type >

+ +

A traits class for a type stored in a boost::any.

+

The traits are used by Wt's view classes (such as Wt::WTableView Wt::WTreeView, Wt::Chart::WCartesianChart) to deal with values in a Wt::WAbstractItemModel:

+ +

This traits class provides a default implementation for supporting values value of a custom type Type in Wt's MVC system, which relies on:

+
    +
  • serializing to a stream (std::ostream << value) for converting the value to a string.
  • +
  • lexical interpretation as a number for converting the value to a number, using boost::lexical_cast<double>(value).
  • +
  • sorting using operator== and operator<
  • +
+

You can specialize these traits if you need to customize one or more of these operations.

+

Member Function Documentation

+ +
+
+
+template<typename Type >
+ + + + + + + + +
double Wt::boost_any_traits< Type >::asNumber (const Type &  v ) [static]
+
+
+ +

Converts a value to a number.

+

The default implementation returns:

+
 boost::lexical_cast<double>(asString(v), "")
+
+
+
+ +
+
+
+template<typename Type >
+ + + + + + + + + + + + + + + + + + +
WString Wt::boost_any_traits< Type >::asString (const Type &  value,
const WString format 
) [static]
+
+
+ +

Converts a value to a string.

+

The default implementation uses a boost::lexical_cast, and thus an overloaded std::ostream<< operator for the value.

+ +
+
+ +
+
+
+template<typename Type >
+ + + + + + + + + + + + + + + + + + +
int Wt::boost_any_traits< Type >::compare (const Type &  v1,
const Type &  v2 
) [static]
+
+
+ +

Compares two values.

+

The default implementation uses operator== and operator<.

+ +
+
+
+ + + + +
+ +
+ +
+Generated on Tue Nov 30 2010 for the +C++ Web Toolkit (Wt) by  1.7.2
+ + diff --git a/wt-3.1.7a/doc/reference/html/tab_a.png b/wt-3.1.7a/doc/reference/html/tab_a.png new file mode 100644 index 0000000..2d99ef2 Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/tab_a.png differ diff --git a/wt-3.1.7a/doc/reference/html/tab_b.png b/wt-3.1.7a/doc/reference/html/tab_b.png new file mode 100644 index 0000000..b2c3d2b Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/tab_b.png differ diff --git a/wt-3.1.7a/doc/reference/html/tab_h.png b/wt-3.1.7a/doc/reference/html/tab_h.png new file mode 100644 index 0000000..c11f48f Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/tab_h.png differ diff --git a/wt-3.1.7a/doc/reference/html/tab_s.png b/wt-3.1.7a/doc/reference/html/tab_s.png new file mode 100644 index 0000000..978943a Binary files /dev/null and b/wt-3.1.7a/doc/reference/html/tab_s.png differ diff --git a/wt-3.1.7a/doc/reference/html/tabs.css b/wt-3.1.7a/doc/reference/html/tabs.css new file mode 100644 index 0000000..2192056 --- /dev/null +++ b/wt-3.1.7a/doc/reference/html/tabs.css @@ -0,0 +1,59 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/wt-3.1.7a/doc/tutorial/dbo/tutorial.doc b/wt-3.1.7a/doc/tutorial/dbo/tutorial.doc new file mode 100644 index 0000000..43bcb48 --- /dev/null +++ b/wt-3.1.7a/doc/tutorial/dbo/tutorial.doc @@ -0,0 +1,920 @@ +Wt::Dbo Tutorial +================ + +Koen Deforche +3.1.6, 27 October 2010 + +:doc: link:../../reference/html/ +:cpp: pass:[C++] + +== Introduction + ++Wt::Dbo+ is a {cpp} ORM (Object-Relational-Mapping) library. + +The library is distributed as part of http://www.webtoolkit.eu/wt[Wt] +for building database-driven web applications, but may be equally well +used independently from it. + +The library provides a class-based view on database tables which keeps +an object-hiearchy of database object automatically synchronized with +a database by inserting, updating and deleting database +records. {cpp} classes map to database tables, class fields to +table columns, and pointers and collections of pointers to database +relations. An object from a mapped class is called a *database object* +(dbo). Query results may be defined in terms of database objects, +primitives, or tuples of these. + +A modern {cpp} approach is used to solve the mapping problem. Rather +than resorting to XML-based descriptions of how {cpp} classes and +fields should map onto tables and columns, or using obscure macros, +the mapping is defined entirely in {cpp} code. + +In this tutorial, we will work our way through a blogging example, +similar to the one that is distributed with the library. + +[TIP] +=============================== +The complete source code for the examples used in this tutorial are +available as ready-to-run programs in the +examples/feature/dbo/+ folder of +http://www.webtoolkit.eu/wt/download[Wt]. +=============================== + +== Mapping a single class + +We will start off with using +Wt::Dbo+ for mapping a single class +User+ +to a corresponding table +user+. + +[WARNING] +=============================== +In this tutorial and the examples, we alias the namespace +Wt::Dbo+ to ++dbo+, and in our explanation we will refer to types and methods +available in that namespace directly. +=============================== + +To build the following example, you need to link against the +wtdbo+ +and +wtdbosqlite3+ libraries. + +.Mapping a single class (tutorial1.C) +[source,cpp] +---- +#include +#include + +namespace dbo = Wt::Dbo; + +class User { +public: + enum Role { + Visitor = 0, + Admin = 1, + Alien = 42 + }; + + std::string name; + std::string password; + Role role; + int karma; + + template + void persist(Action& a) + { + dbo::field(a, name, "name"); + dbo::field(a, password, "password"); + dbo::field(a, role, "role"); + dbo::field(a, karma, "karma"); + } +}; +---- + +This example shows how persistence support is defined for a {cpp} +class. A template member method +persist()+ is defined which serves as +a persistence definition for the class. For each member in the class, +a call to ++{doc}group__dbo.html#ga8a2b653ff57f1459dfa2e556badd71d6[Wt::Dbo::field()]+ +is used to map the field to a table column name. + +As you may see, standard {cpp} types such as +int+, +std::string+ and ++enum+ types are readily supported by the library. Support for other +types can be added by specializing ++{doc}structWt_1_1Dbo_1_1sql\__value\__traits.html[Wt::Dbo::sql_value_traits<_T_>]+. + +The library defines a number of actions which will be applied to a +database object using its +persist()+ method, which applies it in turn +to all its members. These actions will then read, update or insert +database objects, create the schema, or propagate transaction +outcomes. + +[NOTE] +=============================== +For brevity, our example uses public members. There is no nothing that +prevents you to encapsulate your state in private members and provide +accessor methods. You may even define the persistence method in terms of +accessor methods by differentiating between read and write actions. +=============================== + +== A first session + +Now that we have a mapping definition for our +User+ class, we can +start a database session, create our schema (if necessary) and add a +user to the database. + +Let us walk through the code for doing this. + +.(tutorial1.C continued) +[source,cpp] +---- +void run() +{ + /* + * Setup a session, would typically be done once at application startup. + */ + dbo::backend::Sqlite3 sqlite3("blog.db"); + dbo::Session session; + session.setConnection(sqlite3); + + ... +---- + +The +{doc}classWt_1_1Dbo_1_1Session.html[Session]+ object is a long +living object that provides access to our database objects. You will +typically create a Session object for the entire lifetime of an +application session, and one per user. None of the ++{doc}group__dbo.html[Wt::Dbo]+ classes are thread safe (except for +the connection pools), and session objects are not shared between +sessions. + +The lack of thread-safety is not simply a consequence of laziness on +our part. It coincides with the promises made by transactional +integrity on the database: you will not want to see the changes made +by one session in another session while its transaction has not been +committed (Read-Committed transaction isolation level). It might make +sense however to implement a copy-on-write strategy in the future, to +allow sharing of the bulk of database objects between sessions. + +The session is given a connection which it may use to communicate with +the database. A session will use a connection only during a +transaction, and thus does not really need a dedicated +connection. When you are planning for multiple concurrent sessions, it +makes sense to use a connection pool instead, and a session may also +be initialized with a reference to a +{doc}classWt_1_1Dbo_1_1Session.html#a63ab17e16c9b721c94e6e9f67c5c255d[connection +pool]. + ++Wt::Dbo+ uses an abstraction layer for database access, and currently +supports {doc}classWt_1_1Dbo_1_1backend_1_1Postgres.html[Postgres] +and {doc}classWt_1_1Dbo_1_1backend_1_1Sqlite3.html[Sqlite3] as +backends. + +.(tutorial1.C continued) +[source,cpp] +---- + ... + + session.mapClass("user"); + + /* + * Try to create the schema (will fail if already exists). + */ + session.createTables(); + + ... +---- + +Next, we use ++{doc}classWt_1_1Dbo_1_1Session.html#a5886d450c052ae0ee15ab3c91e439229[mapClass()]+ +to register each database class with the session, indicating the +database table onto which the class must be mapped. + +Certainly during development, but also for initial deployment, it is +convenient to let +Wt::Dbo+ create or drop the database schema. + +This generates the following SQL: + +[source,sql] +---- +begin transaction +create table "user" ( + "id" integer primary key autoincrement, + "version" integer not null, + "name" text not null, + "password" text not null, + "role" integer not null, + "karma" integer not null +) +commit transaction +---- + +As you can see, next to the four columns that map to {cpp} fields, by +default, +Wt::Dbo+ adds another two columns: +id+ and +version+. The +id is a surrogate primary key, and version is used for version-based +optimistic locking. Since Wt 3.1.4, Wt::Dbo you can suppress the +version field, and provide natural keys of any type instead of the +surrogate primary key, see <>. + +Finally, we can add a user to the database. All database operations +happen within a transaction. + +.(tutorial1.C continued) +[source,cpp] +---- + ... + /* + * A unit of work happens always within a transaction. + */ + dbo::Transaction transaction(session); + + User *user = new User(); + user->name = "Joe"; + user->password = "Secret"; + user->role = User::Visitor; + user->karma = 13; + + dbo::ptr userPtr = session.add(user); + + transaction.commit(); +} +---- + +A call to +{doc}classWt_1_1Dbo_1_1Session.html#a1ffa672cd86ff1ce6d59837b05081946[Session::add()] +adds an object to the database. This call returns a ++{doc}classWt_1_1Dbo_1_1ptr.html[ptr<_Dbo_>]+ to reference a database +object of type +_Dbo_+. This is a shared pointer which also keeps +track of the persistence state of the referenced object. Within each +session, a database object will be loaded at most once: the session +keeps track of loaded database objects and returns an existing object +whenever a query to the database requires this. When the last pointer +to a database object goes out of scope, the _transient_ (in-memory) +copy of the database object is also deleted (unless it was modified, +in which case the transient copy will only be be deleted after changes +have been successfully committed to the database). + +The session also keeps track of objects that have been modified and +which need to be flushed (using SQL statements) to the +database. Flushing happens automatically when committing the +transaction, or whenever needed to maintain consistency between the +transient objects and the database copy (e.g. before doing a query). + +This generates the following SQL: + +[source,sql] +---- +begin transaction +insert into "user" ("version", "name", "password", "role", "karma") values (?, ?, ?, ?, ?) +commit transaction +---- + +All SQL statements are prepared once (per connection) and reused +later, which has the benefit of avoiding SQL injection problems, and +allows potentially better performance. + +== Querying objects + +There are two ways of querying the database. Database objects of a +single +_Dbo_+ class can be queried using ++{doc}classWt_1_1Dbo_1_1Session.html#a637d1031ffddd4bd7bbb55a616192ac7[Session::find(_condition_)]+: + +.(tutorial1.C continued) +[source,cpp] +---- +dbo::ptr joe = session.find().where("name = ?").bind("Joe"); + +std::cerr << "Joe has karma: " << joe->karma << std::endl; +---- + +All queries use prepared statements with positional argument +binding. The +Session::find()+ method returns a ++{doc}classWt_1_1Dbo_1_1Query.html[Query< ptr >]+ object. The Query object +can be used to refine the search by defining Sql +where+, +order by+ +and +group by+ definitions, and allows binding of parameters using ++{doc}classWt_1_1Dbo_1_1Query.html#abe3f72ee7e005c62e4428c399b57d6c5[Query::bind()]+. In +this case the query should expect a single result and is casted +directly to a database object pointer. + +[NOTE] +=============================== + +Since Wt 3.1.3, the +Query+ class has a second parameter +_BindStrategy_ which has two possible values, corresponding two +different query implementations. + +The default strategy is _DynamicBinding_ and allows the query to be a +long lived object associated with the session which may be run +multiple times. It also allows you to modify the query by changing +only the order order the limit/offsets. + +An alternative strategy is _DirectBinding_ which passes bound +parameters directly on to an underlying prepared statement. This +corresponds to the old behavior of a Query object. Such a query can be +run only once, but has the benefit of having less ({cpp}) overhead +because the parameters values are directly passed on to the backend +instead of stored within the query object. + +=============================== + +The query formulated to the database is: + +[source,sql] +---- +select id, version, "name", "password", "role", "karma" + from "user" + where (name = ?) +---- + +The more general way for querying uses ++{doc}classWt_1_1Dbo_1_1Session.html#a8712ff0d59f7bb6a4d2986ad9637cc9e[Session::query(_sql_)]+, +which supports not only database objects as results. The query of +above is equivalent to: + +.(tutorial1.C continued) +[source,cpp] +---- +dbo::ptr joe2 = session.query< dbo::ptr >("select u from user u").where("name = ?").bind("Joe"); +---- + +And this generates similar SQL: + +[source,sql] +---- +select u.id, u.version, u."name", u."password", u."role", u."karma" + from user u + where (name = ?) +---- + +The +_sql_+ statement passed to the method may be arbitrary sql which +returns results that are compatible with the +_Result_+ type. The ++_select_+ part of the SQL query may be rewritten (as in the example +above) to return the individual fields of a queried database object. + +To illustrate that +Session::query()+ may be used to return +other types, consider the query below where an +int+ result is +returned. + +.(tutorial1.C continued) +[source,cpp] +---- +int count = session.query("select count(1) from user").where("name = ?").bind("Joe"); +---- + +The queries above were expecting unique results, but queries can also +have multiple results. A +Session::query<_Result_>()+ may therefore in +general return a +dbo::collection< _Result_ >+ (for multiple results) +and in the examples above they were coerced to a single unique ++_Result_+ for convenience. Similarly, +Session::find<_Dbo_>()+ may +return a +collection< ptr<_Dbo_> >+ or a unique +_ptr<_Dbo_>+. If a +unique result is asked, but the query found multiple results, a ++{doc}classWt_1_1Dbo_1_1NoUniqueResultException.html[NoUniqueResultException]+ +will be thrown. + ++{doc}classWt_1_1Dbo_1_1collection.html[collection<_T_>]+ is an +STL-compatible collection which has iterators that implement the ++InputIterator+ requirements. Thus, you can only iterate through the +results of a collection once. After the results have been iterated the ++collection+ can no longer be used (but the +Query+ object can be +reused unless a _DirectBinding_ bind strategy was used). + +The following code shows how you may multiple results of a query may +be iterated: + +.(tutorial1.C continued) +[source,cpp] +---- +typedef dbo::collection< dbo::ptr > Users; + +Users users = session.find(); + +std::cerr << "We have " << users.size() << " users:" << std::endl; + +for (Users::const_iterator i = users.begin(); i != users.end(); ++i) + std::cerr << " user " << (*i)->name + << " with karma of " << (*i)->karma << std::endl; +---- + +This code will perform two database queries: one for the call to ++collection::size()+ and one for iterating the results: + +[source,sql] +---- +select count(1) from "user" +select id, version, "name", "password", "role", "karma" from "user" +---- + +[WARNING] +=============================== +A query uses a prepared statement to execute, and prepares a new +statement if no statement was yet prepared for that query. Because a +prepared statement is usually not reentrant and at the same time a +query will use an existing statement if one exists, you need to be +careful to not have two collections with the same statement busy at +the same time. Thus while iterating the results of a query you cannot +use that same query again. Therefore it may be necessary to copy the +results into a standard container (such as +std::vector+) before +iterating them. Since Wt 3.1.3, concurrent use will be detected and +an exception will be thrown saying: + + A collection for '...' is already in use. Reentrant statement use is not yet implemented. + +We plan to remove this restriction in later versions, cloning +prepared statements as necessary. +=============================== + +== Updating objects + +Unlike most other smart pointers, +ptr<_Dbo_>+ is read-only by +default: it returns a +const _Dbo_*+. To modify a database object, you +need to call the +{doc}classWt_1_1Dbo_1_1ptr.html#a8f9f4ec6ed2bd8febe8b62525c9576da[ptr::modify()]+ method, which returns a non-const +object. This mark the object as dirty and the modifications will later +be synchronized to the database. + +.(tutorial1.C continued) +[source,cpp] +---- +dbo::ptr joe = session.find().where("name = ?").bind("Joe"); + +joe.modify()->karma++; +joe.modify()->password = "public"; +---- + +Database synchronization does not happen instantaneously, instead, +they are delayed until explicitly asked, using ++{doc}classWt_1_1Dbo_1_1ptr.html#aaf91f5ef8bcdabfafcd9abb4182625bd[ptr<_Dbo_>::flush()]+ +or ++{doc}classWt_1_1Dbo_1_1Session.html#ab896d119f1e0fb79adffe2282b92ef17[Session::flush()]+, +until a query is executed whose results may be affected by the changes +made, or until the transaction is committed. + +The previous code will generate the following SQL: + +[source,sql] +---- +select id, version, "name", "password", "role", "karma" + from "user" + where (name = ?) +update "user" set "version" = ?, "name" = ?, "password" = ?, "role" = ?, "karma" = ? + where "id" = ? and "version" = ? +---- + +We already saw how using +Session::add(ptr<_Dbo_>)+, we added a new +object to the database. The opposite operation is ++{doc}classWt_1_1Dbo_1_1ptr.html#af4b26afebd56abc42005ef9f954d8fee[ptr<_Dbo_>::remove()]+: it deletes the object in the database. + +.(tutorial1.C continued) +[source,cpp] +---- +dbo::ptr joe = session.find().where("name = ?").bind("Joe"); + +joe.remove(); +---- + +After removing an object, the transient object can still be used, and +can even be re-added to the database. + +[NOTE] +=============================== + +Like +modify()+, also the +add()+ and +remove()+ operations defer +synchronization with the database, and therefore the following code +does not actually have any effect on the database: + +.(tutorial1.C continued) +[source,cpp] +---- +dbo::ptr silly = session.add(new User()); +silly.modify()->name = "Silly"; +silly.remove(); +---- +=============================== + +== Mapping relations + +=== _Many-to-One_ relations + +Let's add posts to our blogging example, and define a Man-to-One +relation between posts and users. In the code below, we limit +ourselves to the statements important for defining the relationship. + +.Many-to-One relation (tutorial2.C) +[source,cpp] +---- +#include +#include + +namespace dbo = Wt::Dbo; + +class User; + +class Post { +public: + ... + + dbo::ptr user; + + template + void persist(Action& a) + { + ... + + dbo::belongsTo(a, user, "user"); + } +}; + +class User { +public: + ... + + dbo::collection< dbo::ptr > posts; + + template + void persist(Action& a) + { + ... + + dbo::hasMany(a, posts, dbo::ManyToOne, "user"); + } +}; +---- + +At the _Many_-side, we add a reference to a user, and in the ++persist()+ method we call ++{doc}group__dbo.html#gaf1a3f4231d2064b86eb3903003527ddd[belongsTo()]+. This +allows us to reference the user to which this post belongs. The last +argument will correspond to the name of the database column which +defines the relationship. + +At the _One_-side, we add a collection of posts, and in the ++persist()+ method we call ++{doc}group__dbo.html#ga1a086b583fb150dbd4c5b4ba92bc177f[hasMany()]+. The +join field must be the same name as in reciproce belongsTo() method +call. + +If we add the Post class too to our session using ++Session::mapClass()+, and create the schema, the following SQL is +generated: + +[source,sql] +---- +create table "user" ( + ... + + -- table user is unaffected by the relationship +); + +create table "post" ( + ... + + "user_id" bigint, + constraint "fk_post_user" foreign key ("user_id") references "user" ("id") +) +---- + +Note the +user_id+ field which corresponds to the join name ``user''. + +At the _Many_-side, you may read or write the +ptr+ to set a user to +which this post belongs. + +The collection at the _One_-side allows us to retrieve all associated +elements, but is read-only: inserting elements will not have any +effect: to add a _post_ to a _user_, you need to set the _user_ for +the _post_, rather than adding the post to the collection in +user. + +Example: + +.(tutorial2.C continued) +[source,cpp] +---- +dbo::ptr post = session.add(new Post()); +post.modify()->user = joe; + +// will print 'Joe has 1 post(s).' +std::cerr << "Joe has " << joe->posts.size() << " post(s)." << std::endl; +---- + +As you can see, as soon as _joe_ is set as _user_ for the new post, the +post is reflected in the _posts_ collection of _joe_. + +[WARNING] +=============================== +The collection uses a prepared statement to execute. Collections will +try to share a single prepared statement, but prepared statements are +usually not reentrant. As a result, you need to be careful to not have +two collections with the same statement busy at the same time. Thus +while iterating a collection, you need to be sure you will not +reentrantly iterate the same collection (of the same or another +object). Therefore it may be necessary to copy the results into a +standard container (such as +std::vector+) before iterating them. + +We plan to remove this restriction in later versions, cloning +prepared statements as necessary. +=============================== + +=== _Many-to-Many_ relations + +To illustrate _Many-to-Many_ relations, we will add tags to our +blogging example, and define an _Many-to-Many_ relation between posts +and tags. In the code below, we again limit ourselves to the +statements important for defining the relationship. + +.Many-to-Many relation (tutorial2.C) +[source,cpp] +---- +#include +#include + +namespace dbo = Wt::Dbo; + +class Tag; + +class Post { +public: + ... + + dbo::collection< dbo::ptr > tags; + + template + void persist(Action& a) + { + ... + + dbo::hasMany(a, tags, dbo::ManyToMany, "post_tags"); + } +}; + +class Tag { +public: + ... + + dbo::collection< dbo::ptr > posts; + + template + void persist(Action& a) + { + ... + + dbo::hasMany(a, posts, dbo::ManyToMany, "post_tags"); + } +}; +---- + +As expected, the relationship is reflected in almost the same way in +both classes: they both have a +collection+ of database objects of the +related class, and in the +persist()+ method we call +hasMany()+. The +join field in this case will correspond to the name of a join-table +used to persist the relation. + +Adding the Post class to our session using +Session::mapClass()+, we +now get the following SQL for creating the schema: + +[source,sql] +---- +create table "post" ( + ... + + -- table post is unaffected by the relationship +) + +create table "tag" ( + ... + + -- table tag is unaffected by the relationship +) + +create table "post_tags" ( + "post_id" bigint not null, + "tag_id" bigint not null, + primary key ("post_id", "tag_id"), + constraint "fk_post_tags_key1" foreign key ("post_id") references "post" ("id"), + constraint "fk_post_tags_key2" foreign key ("tag_id") references "tag" ("id") +) + +create index "post_tags_post" on "post_tags" ("post_id") +create index "post_tags_tag" on "post_tags" ("tag_id") +---- + +The collection at either side of the _Many-to-Many_ relation allows us +to retrieve all associated elements. Unlike a collection in a +_Many-to-One_ relation however, we may now also ++{doc}classWt_1_1Dbo_1_1collection.html#7b497add0d6ac2b1e098820f9ee64c93[insert()]+ +and ++{doc}classWt_1_1Dbo_1_1collection.html#35d046e991b3fec59af85d501fd49e51[erase()]+ +items from the collection. To define a relation between a post and a +tag, you need to add the post to the tag's _posts_ collection, or the +tag to the post's _tags_ collection. You may not do both! The change +will automatically be reflected in the reciproce collection. Likewise, +to undo the relation between a post and a tag, you should remove the +tag from the post's _tags_ collection, or the post from the tag's +_posts_ collection, but not both. + +Example: + +.(tutorial2.C continued) +[source,cpp] +---- +dbo::ptr post = ... +dbo::ptr cooking = session.add(new Tag()); +cooking.modify()->name = "Cooking"; + +post.modify()->tags.insert(cooking); + +// will print '1 post(s) tagged with Cooking.' +std::cerr << cooking->posts.size() << " post(s) tagged with Cooking." << std::endl; +---- + +[WARNING] +=============================== +The same warning as above applies here as well. +=============================== + +=== _One-to-One_ relations + +_One-to-One_ relations are currently not supported, but can be +simulated using _Many-to-One_ relations as they have the same database +schema structure. + +[[customizing]] +== Customizing the mapping + +By default, +Wt::Dbo+ will add an auto-incrementing surrogate primary +(+id+) key and a version field (+version+) to each mapped table. + +While these defaults make sense for a new project, you can tailor the +mapping so that you can map to virtually any existing database schema. + +=== Changing or disabling the surrogate primary key "id" field + +To change the field name used for the surrogate primary key for a +mapped class, or to disable the surrogate primary key for a class and use a nautral key instead, you need to specialize ++{doc}structWt_1_1Dbo_1_1dbo__traits.html[Wt::Dbo::dbo_traits]+. + +For example, the code below changes the primary key field for class +Post from +id+ to +post_id+: + +.Changing the "id" field name (tutorial3.C) +[source,cpp] +---- +#include + +namespace dbo = Wt::Dbo; + +class Post { +public: + ... +}; + +namespace Wt { + namespace Dbo { + + template<> + struct dbo_traits : public dbo_default_traits { + static const char *surrogateIdField() { + return "post_id"; + } + }; + + } +} +---- + +=== Changing or disabling the "version" field + +To change the field name used for the optimistic concurrency control +version field (+version+), or to disable optimistic concurrency +control for a class alltoghether, you need to specialize ++{doc}structWt_1_1Dbo_1_1dbo__traits.html[Wt::Dbo::dbo_traits]+. + +For example, the code below disables optimistic concurrency control +for class Post: + +.Disabling the "version" field name (tutorial4.C) +[source,cpp] +---- +#include + +namespace dbo = Wt::Dbo; + +class Post { +public: + ... +}; + +namespace Wt { + namespace Dbo { + + template<> + struct dbo_traits : public dbo_default_traits { + static const char *versionField() { + return 0; + } + }; + + } +} +---- + +=== Specifying a natural primary key + +Instead of using a auto-incrementing surrogate primary key, you may +want to use a different primary key. + +For example, the code below changes the primary key for the User table +to a string (his username) which maps onto a +varchar (20)+ field ++user_name+: + +.Using a natural key (tutorial5.C) +[source,cpp] +---- +#include + +namespace dbo = Wt::Dbo; + +class User { +public: + std::string userId; + + template + void persist(Action& a) + { + dbo::id(a, userId, "user_id", 20); + } +}; + +namespace Wt { + namespace Dbo { + + template<> + struct dbo_traits : public dbo_default_traits { + typedef std::string IdType; + + static IdType invalidId() { + return std::string(); + } + + static const char *surrogateIdField() { return 0; } + }; + + } +} +---- + +A natural primary key may also be a composite key. + +== Transactions and concurrency + +Reading data from the database or flushing changes to the database +require an active transaction. A ++{doc}classWt_1_1Dbo_1_1Transaction.html[Transaction]+ is a RIIA +(Resource-Initialization-is-Acquisition) class which at the same time +provides isolation between concurrent sessions and atomicity for +persisting changes to the database. + +The library implements optimistic locking, which allows detection +(rather than avoidance) of concurrent modifications. It is a +recommended and widely used strategy for dealing with concurrency +issues in a scalable manner as no write locks are needed on the +database. To detect a concurrent modification, a +version+ field is +added to each table which is incremented on each modification. When +performing a modification (such as updating or removing an object), it +is checked that the version of the record in the database is the same +as the version of the object that was originally read from the +database. + +.Transaction isolation levels +[NOTE] +The minimum level of isolation which is required for the library's +_optimistic locking_ strategy is _Read Committed_: modifications in a +transaction are only visible to other sessions as soon as they are +committed. This is usually the lowest level of isolation supported by +a database (SQLite3 is currently the only backend and provides this +isolation level by default). + +The +Transaction+ class is a light-weight proxy that references a +_logical_ transaction: multiple (usually nested) Transaction objects +may be instantiated simultaneously, which each need to be committed +for the logical transaction to be committed. In this way you can +easily protect individual methods which require database access with +such a transaction object, which will automatically participate in a +wider transaction if that is available. A transaction will in fact +defer opening a real transaction in the database until needed, and +thus there is no penalty for instantiating a transaction to make sure +a unit of work is atomic, even if you are not yet sure that there will +be actual work done. + +Transactions may fail and dealing with failing transactions is an +integral aspect of their usage. When the library detects a concurrent +modification, a ++{doc}classWt_1_1Dbo_1_1StaleObjectException.html[StaleObjectException]+ +is thrown. Other exceptions may be thrown, including exceptions in the +backend driver when for example the database schema is not compatible +with the mapping. There may also be problems detected by the business +logic which may raise an exception and cause the transaction to be +rolled back. When a transaction is rolled back, the modified database +objects are not successfully synchronized with the database, but may +possibly be synchronized later in a new transaction. + +Obviously, many exceptions will be fatal. One notable exception is the ++StaleObjectException+ however. Different strategies are possible to +deal with this exception. Regardless of the approach, you will at +least need to ++{doc}classWt_1_1Dbo_1_1ptr.html#abb1db71ef910748437d69bf11a04eb6e[reread()]+ +the stale database object(s) before being able to commit changes made +in a new transaction. diff --git a/wt-3.1.7a/doc/tutorial/dbo/tutorial.html b/wt-3.1.7a/doc/tutorial/dbo/tutorial.html new file mode 100644 index 0000000..9a1090b --- /dev/null +++ b/wt-3.1.7a/doc/tutorial/dbo/tutorial.html @@ -0,0 +1,1388 @@ + + + + + +Wt::Dbo Tutorial + + + + + +
+
+

Koen Deforche <koen@emweb.be> +3.1.6, 27 October 2010

+
+
+

1. Introduction

+
+

Wt::Dbo is a C++ ORM (Object-Relational-Mapping) library.

+

The library is distributed as part of Wt +for building database-driven web applications, but may be equally well +used independently from it.

+

The library provides a class-based view on database tables which keeps +an object-hiearchy of database object automatically synchronized with +a database by inserting, updating and deleting database +records. C++ classes map to database tables, class fields to +table columns, and pointers and collections of pointers to database +relations. An object from a mapped class is called a database object +(dbo). Query results may be defined in terms of database objects, +primitives, or tuples of these.

+

A modern C++ approach is used to solve the mapping problem. Rather +than resorting to XML-based descriptions of how C++ classes and +fields should map onto tables and columns, or using obscure macros, +the mapping is defined entirely in C++ code.

+

In this tutorial, we will work our way through a blogging example, +similar to the one that is distributed with the library.

+
+ + + +
+
Tip
+
+

The complete source code for the examples used in this tutorial are +available as ready-to-run programs in the examples/feature/dbo/ folder of +Wt.

+
+
+
+

2. Mapping a single class

+
+

We will start off with using Wt::Dbo for mapping a single class User +to a corresponding table user.

+
+ + + +
+
Warning
+
+

In this tutorial and the examples, we alias the namespace Wt::Dbo to +dbo, and in our explanation we will refer to types and methods +available in that namespace directly.

+
+
+

To build the following example, you need to link against the wtdbo +and wtdbosqlite3 libraries.

+
+
Mapping a single class (tutorial1.C)
+
+
#include <Wt/Dbo/Dbo>
+#include <string>
+
+namespace dbo = Wt::Dbo;
+
+class User {
+public:
+  enum Role {
+    Visitor = 0,
+    Admin = 1,
+    Alien = 42
+  };
+
+  std::string name;
+  std::string password;
+  Role        role;
+  int         karma;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    dbo::field(a, name,     "name");
+    dbo::field(a, password, "password");
+    dbo::field(a, role,     "role");
+    dbo::field(a, karma,    "karma");
+  }
+};
+

This example shows how persistence support is defined for a C++ +class. A template member method persist() is defined which serves as +a persistence definition for the class. For each member in the class, +a call to +Wt::Dbo::field() +is used to map the field to a table column name.

+

As you may see, standard C++ types such as int, std::string and +enum types are readily supported by the library. Support for other +types can be added by specializing +Wt::Dbo::sql_value_traits<T>.

+

The library defines a number of actions which will be applied to a +database object using its persist() method, which applies it in turn +to all its members. These actions will then read, update or insert +database objects, create the schema, or propagate transaction +outcomes.

+
+ + + +
+
Note
+
+

For brevity, our example uses public members. There is no nothing that +prevents you to encapsulate your state in private members and provide +accessor methods. You may even define the persistence method in terms of +accessor methods by differentiating between read and write actions.

+
+
+
+

3. A first session

+
+

Now that we have a mapping definition for our User class, we can +start a database session, create our schema (if necessary) and add a +user to the database.

+

Let us walk through the code for doing this.

+
+
(tutorial1.C continued)
+
+
void run()
+{
+  /*
+   * Setup a session, would typically be done once at application startup.
+   */
+  dbo::backend::Sqlite3 sqlite3("blog.db");
+  dbo::Session session;
+  session.setConnection(sqlite3);
+
+  ...
+

The Session object is a long +living object that provides access to our database objects. You will +typically create a Session object for the entire lifetime of an +application session, and one per user. None of the +Wt::Dbo classes are thread safe (except for +the connection pools), and session objects are not shared between +sessions.

+

The lack of thread-safety is not simply a consequence of laziness on +our part. It coincides with the promises made by transactional +integrity on the database: you will not want to see the changes made +by one session in another session while its transaction has not been +committed (Read-Committed transaction isolation level). It might make +sense however to implement a copy-on-write strategy in the future, to +allow sharing of the bulk of database objects between sessions.

+

The session is given a connection which it may use to communicate with +the database. A session will use a connection only during a +transaction, and thus does not really need a dedicated +connection. When you are planning for multiple concurrent sessions, it +makes sense to use a connection pool instead, and a session may also +be initialized with a reference to a +connection +pool.

+

Wt::Dbo uses an abstraction layer for database access, and currently +supports Postgres +and Sqlite3 as +backends.

+
+
(tutorial1.C continued)
+
+
  ...
+
+  session.mapClass<User>("user");
+
+  /*
+   * Try to create the schema (will fail if already exists).
+   */
+  session.createTables();
+
+  ...
+

Next, we use +mapClass() +to register each database class with the session, indicating the +database table onto which the class must be mapped.

+

Certainly during development, but also for initial deployment, it is +convenient to let Wt::Dbo create or drop the database schema.

+

This generates the following SQL:

+
+
+
begin transaction
+create table "user" (
+  "id" integer primary key autoincrement,
+  "version" integer not null,
+  "name" text not null,
+  "password" text not null,
+  "role" integer not null,
+  "karma" integer not null
+)
+commit transaction
+

As you can see, next to the four columns that map to C++ fields, by +default, Wt::Dbo adds another two columns: id and version. The +id is a surrogate primary key, and version is used for version-based +optimistic locking. Since Wt 3.1.4, Wt::Dbo you can suppress the +version field, and provide natural keys of any type instead of the +surrogate primary key, see Customizing the mapping.

+

Finally, we can add a user to the database. All database operations +happen within a transaction.

+
+
(tutorial1.C continued)
+
+
  ...
+  /*
+   * A unit of work happens always within a transaction.
+   */
+  dbo::Transaction transaction(session);
+
+  User *user = new User();
+  user->name = "Joe";
+  user->password = "Secret";
+  user->role = User::Visitor;
+  user->karma = 13;
+
+  dbo::ptr<User> userPtr = session.add(user);
+
+  transaction.commit();
+}
+

A call to +Session::add() +adds an object to the database. This call returns a +ptr<Dbo> to reference a database +object of type Dbo. This is a shared pointer which also keeps +track of the persistence state of the referenced object. Within each +session, a database object will be loaded at most once: the session +keeps track of loaded database objects and returns an existing object +whenever a query to the database requires this. When the last pointer +to a database object goes out of scope, the transient (in-memory) +copy of the database object is also deleted (unless it was modified, +in which case the transient copy will only be be deleted after changes +have been successfully committed to the database).

+

The session also keeps track of objects that have been modified and +which need to be flushed (using SQL statements) to the +database. Flushing happens automatically when committing the +transaction, or whenever needed to maintain consistency between the +transient objects and the database copy (e.g. before doing a query).

+

This generates the following SQL:

+
+
+
begin transaction
+insert into "user" ("version", "name", "password", "role", "karma") values (?, ?, ?, ?, ?)
+commit transaction
+

All SQL statements are prepared once (per connection) and reused +later, which has the benefit of avoiding SQL injection problems, and +allows potentially better performance.

+
+

4. Querying objects

+
+

There are two ways of querying the database. Database objects of a +single Dbo class can be queried using +Session::find<Dbo>(condition):

+
+
(tutorial1.C continued)
+
+
dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
+
+std::cerr << "Joe has karma: " << joe->karma << std::endl;
+

All queries use prepared statements with positional argument +binding. The Session::find<T>() method returns a +Query< ptr<T> > object. The Query object +can be used to refine the search by defining Sql where, order by +and group by definitions, and allows binding of parameters using +Query::bind(). In +this case the query should expect a single result and is casted +directly to a database object pointer.

+
+ + + +
+
Note
+
+

Since Wt 3.1.3, the Query class has a second parameter +BindStrategy which has two possible values, corresponding two +different query implementations.

+

The default strategy is DynamicBinding and allows the query to be a +long lived object associated with the session which may be run +multiple times. It also allows you to modify the query by changing +only the order order the limit/offsets.

+

An alternative strategy is DirectBinding which passes bound +parameters directly on to an underlying prepared statement. This +corresponds to the old behavior of a Query object. Such a query can be +run only once, but has the benefit of having less (C++) overhead +because the parameters values are directly passed on to the backend +instead of stored within the query object.

+
+
+

The query formulated to the database is:

+
+
+
select id, version, "name", "password", "role", "karma"
+   from "user"
+   where (name = ?)
+

The more general way for querying uses +Session::query<Result>(sql), +which supports not only database objects as results. The query of +above is equivalent to:

+
+
(tutorial1.C continued)
+
+
dbo::ptr<User> joe2 = session.query< dbo::ptr<User> >("select u from user u").where("name = ?").bind("Joe");
+

And this generates similar SQL:

+
+
+
select u.id, u.version, u."name", u."password", u."role", u."karma"
+    from user u
+    where (name = ?)
+

The sql statement passed to the method may be arbitrary sql which +returns results that are compatible with the Result type. The +select part of the SQL query may be rewritten (as in the example +above) to return the individual fields of a queried database object.

+

To illustrate that Session::query<Result>() may be used to return +other types, consider the query below where an int result is +returned.

+
+
(tutorial1.C continued)
+
+
int count = session.query<int>("select count(1) from user").where("name = ?").bind("Joe");
+

The queries above were expecting unique results, but queries can also +have multiple results. A Session::query<Result>() may therefore in +general return a dbo::collection< Result > (for multiple results) +and in the examples above they were coerced to a single unique +Result for convenience. Similarly, Session::find<Dbo>() may +return a collection< ptr<Dbo> > or a unique ptr<_Dbo>. If a +unique result is asked, but the query found multiple results, a +NoUniqueResultException +will be thrown.

+

collection<T> is an +STL-compatible collection which has iterators that implement the +InputIterator requirements. Thus, you can only iterate through the +results of a collection once. After the results have been iterated the +collection can no longer be used (but the Query object can be +reused unless a DirectBinding bind strategy was used).

+

The following code shows how you may multiple results of a query may +be iterated:

+
+
(tutorial1.C continued)
+
+
typedef dbo::collection< dbo::ptr<User> > Users;
+
+Users users = session.find<User>();
+
+std::cerr << "We have " << users.size() << " users:" << std::endl;
+
+for (Users::const_iterator i = users.begin(); i != users.end(); ++i)
+    std::cerr << " user " << (*i)->name
+              << " with karma of " << (*i)->karma << std::endl;
+

This code will perform two database queries: one for the call to +collection::size() and one for iterating the results:

+
+
+
select count(1) from "user"
+select id, version, "name", "password", "role", "karma" from "user"
+
+ + + +
+
Warning
+
+

A query uses a prepared statement to execute, and prepares a new +statement if no statement was yet prepared for that query. Because a +prepared statement is usually not reentrant and at the same time a +query will use an existing statement if one exists, you need to be +careful to not have two collections with the same statement busy at +the same time. Thus while iterating the results of a query you cannot +use that same query again. Therefore it may be necessary to copy the +results into a standard container (such as std::vector) before +iterating them. Since Wt 3.1.3, concurrent use will be detected and +an exception will be thrown saying:

+
+
+
A collection for '...' is already in use. Reentrant statement use is not yet implemented.
+
+

We plan to remove this restriction in later versions, cloning +prepared statements as necessary.

+
+
+
+

5. Updating objects

+
+

Unlike most other smart pointers, ptr<Dbo> is read-only by +default: it returns a const Dbo*. To modify a database object, you +need to call the ptr::modify() method, which returns a non-const +object. This mark the object as dirty and the modifications will later +be synchronized to the database.

+
+
(tutorial1.C continued)
+
+
dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
+
+joe.modify()->karma++;
+joe.modify()->password = "public";
+

Database synchronization does not happen instantaneously, instead, +they are delayed until explicitly asked, using +ptr<Dbo>::flush() +or +Session::flush(), +until a query is executed whose results may be affected by the changes +made, or until the transaction is committed.

+

The previous code will generate the following SQL:

+
+
+
select id, version, "name", "password", "role", "karma"
+    from "user"
+    where (name = ?)
+update "user" set "version" = ?, "name" = ?, "password" = ?, "role" = ?, "karma" = ?
+    where "id" = ? and "version" = ?
+

We already saw how using Session::add(ptr<Dbo>), we added a new +object to the database. The opposite operation is +ptr<Dbo>::remove(): it deletes the object in the database.

+
+
(tutorial1.C continued)
+
+
dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
+
+joe.remove();
+

After removing an object, the transient object can still be used, and +can even be re-added to the database.

+
+ + + +
+
Note
+
+

Like modify(), also the add() and remove() operations defer +synchronization with the database, and therefore the following code +does not actually have any effect on the database:

+
+
(tutorial1.C continued)
+
+
dbo::ptr<User> silly = session.add(new User());
+silly.modify()->name = "Silly";
+silly.remove();
+
+
+
+

6. Mapping relations

+
+

6.1. Many-to-One relations

+

Let’s add posts to our blogging example, and define a Man-to-One +relation between posts and users. In the code below, we limit +ourselves to the statements important for defining the relationship.

+
+
Many-to-One relation (tutorial2.C)
+
+
#include <Wt/Dbo/Dbo>
+#include <string>
+
+namespace dbo = Wt::Dbo;
+
+class User;
+
+class Post {
+public:
+  ...
+
+  dbo::ptr<User> user;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    ...
+
+    dbo::belongsTo(a, user, "user");
+  }
+};
+
+class User {
+public:
+  ...
+
+  dbo::collection< dbo::ptr<Post> > posts;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    ...
+
+    dbo::hasMany(a, posts, dbo::ManyToOne, "user");
+  }
+};
+

At the Many-side, we add a reference to a user, and in the +persist() method we call +belongsTo(). This +allows us to reference the user to which this post belongs. The last +argument will correspond to the name of the database column which +defines the relationship.

+

At the One-side, we add a collection of posts, and in the +persist() method we call +hasMany(). The +join field must be the same name as in reciproce belongsTo() method +call.

+

If we add the Post class too to our session using +Session::mapClass(), and create the schema, the following SQL is +generated:

+
+
+
create table "user" (
+  ...
+
+  -- table user is unaffected by the relationship
+);
+
+create table "post" (
+  ...
+
+  "user_id" bigint,
+  constraint "fk_post_user" foreign key ("user_id") references "user" ("id")
+)
+

Note the user_id field which corresponds to the join name “user”.

+

At the Many-side, you may read or write the ptr to set a user to +which this post belongs.

+

The collection at the One-side allows us to retrieve all associated +elements, but is read-only: inserting elements will not have any +effect: to add a post to a user, you need to set the user for +the post, rather than adding the post to the collection in +user.

+

Example:

+
+
(tutorial2.C continued)
+
+
dbo::ptr<Post> post = session.add(new Post());
+post.modify()->user = joe;
+
+// will print 'Joe has 1 post(s).'
+std::cerr << "Joe has " << joe->posts.size() << " post(s)." << std::endl;
+

As you can see, as soon as joe is set as user for the new post, the +post is reflected in the posts collection of joe.

+
+ + + +
+
Warning
+
+

The collection uses a prepared statement to execute. Collections will +try to share a single prepared statement, but prepared statements are +usually not reentrant. As a result, you need to be careful to not have +two collections with the same statement busy at the same time. Thus +while iterating a collection, you need to be sure you will not +reentrantly iterate the same collection (of the same or another +object). Therefore it may be necessary to copy the results into a +standard container (such as std::vector) before iterating them.

+

We plan to remove this restriction in later versions, cloning +prepared statements as necessary.

+
+
+

6.2. Many-to-Many relations

+

To illustrate Many-to-Many relations, we will add tags to our +blogging example, and define an Many-to-Many relation between posts +and tags. In the code below, we again limit ourselves to the +statements important for defining the relationship.

+
+
Many-to-Many relation (tutorial2.C)
+
+
#include <Wt/Dbo/Dbo>
+#include <string>
+
+namespace dbo = Wt::Dbo;
+
+class Tag;
+
+class Post {
+public:
+  ...
+
+  dbo::collection< dbo::ptr<Tag> > tags;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    ...
+
+    dbo::hasMany(a, tags, dbo::ManyToMany, "post_tags");
+  }
+};
+
+class Tag {
+public:
+  ...
+
+  dbo::collection< dbo::ptr<Post> > posts;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    ...
+
+    dbo::hasMany(a, posts, dbo::ManyToMany, "post_tags");
+  }
+};
+

As expected, the relationship is reflected in almost the same way in +both classes: they both have a collection of database objects of the +related class, and in the persist() method we call hasMany(). The +join field in this case will correspond to the name of a join-table +used to persist the relation.

+

Adding the Post class to our session using Session::mapClass(), we +now get the following SQL for creating the schema:

+
+
+
create table "post" (
+  ...
+
+  -- table post is unaffected by the relationship
+)
+
+create table "tag" (
+  ...
+
+  -- table tag is unaffected by the relationship
+)
+
+create table "post_tags" (
+  "post_id" bigint not null,
+  "tag_id" bigint not null,
+  primary key ("post_id", "tag_id"),
+  constraint "fk_post_tags_key1" foreign key ("post_id") references "post" ("id"),
+  constraint "fk_post_tags_key2" foreign key ("tag_id") references "tag" ("id")
+)
+
+create index "post_tags_post" on "post_tags" ("post_id")
+create index "post_tags_tag" on "post_tags" ("tag_id")
+

The collection at either side of the Many-to-Many relation allows us +to retrieve all associated elements. Unlike a collection in a +Many-to-One relation however, we may now also +insert() +and +erase() +items from the collection. To define a relation between a post and a +tag, you need to add the post to the tag’s posts collection, or the +tag to the post’s tags collection. You may not do both! The change +will automatically be reflected in the reciproce collection. Likewise, +to undo the relation between a post and a tag, you should remove the +tag from the post’s tags collection, or the post from the tag’s +posts collection, but not both.

+

Example:

+
+
(tutorial2.C continued)
+
+
dbo::ptr<Post> post = ...
+dbo::ptr<Tag> cooking = session.add(new Tag());
+cooking.modify()->name = "Cooking";
+
+post.modify()->tags.insert(cooking);
+
+// will print '1 post(s) tagged with Cooking.'
+std::cerr << cooking->posts.size() << " post(s) tagged with Cooking." << std::endl;
+
+ + + +
+
Warning
+
+

The same warning as above applies here as well.

+
+
+

6.3. One-to-One relations

+

One-to-One relations are currently not supported, but can be +simulated using Many-to-One relations as they have the same database +schema structure.

+
+

7. Customizing the mapping

+
+

By default, Wt::Dbo will add an auto-incrementing surrogate primary +(id) key and a version field (version) to each mapped table.

+

While these defaults make sense for a new project, you can tailor the +mapping so that you can map to virtually any existing database schema.

+

7.1. Changing or disabling the surrogate primary key "id" field

+

To change the field name used for the surrogate primary key for a +mapped class, or to disable the surrogate primary key for a class and use a nautral key instead, you need to specialize +Wt::Dbo::dbo_traits<C>.

+

For example, the code below changes the primary key field for class +Post from id to post_id:

+
+
Changing the "id" field name (tutorial3.C)
+
+
#include <Wt/Dbo/Dbo>
+
+namespace dbo = Wt::Dbo;
+
+class Post {
+public:
+  ...
+};
+
+namespace Wt {
+  namespace Dbo {
+
+    template<>
+    struct dbo_traits<Post> : public dbo_default_traits {
+      static const char *surrogateIdField() {
+        return "post_id";
+      }
+    };
+
+  }
+}
+

7.2. Changing or disabling the "version" field

+

To change the field name used for the optimistic concurrency control +version field (version), or to disable optimistic concurrency +control for a class alltoghether, you need to specialize +Wt::Dbo::dbo_traits<C>.

+

For example, the code below disables optimistic concurrency control +for class Post:

+
+
Disabling the "version" field name (tutorial4.C)
+
+
#include <Wt/Dbo/Dbo>
+
+namespace dbo = Wt::Dbo;
+
+class Post {
+public:
+  ...
+};
+
+namespace Wt {
+  namespace Dbo {
+
+    template<>
+    struct dbo_traits<Post> : public dbo_default_traits {
+      static const char *versionField() {
+        return 0;
+      }
+    };
+
+  }
+}
+

7.3. Specifying a natural primary key

+

Instead of using a auto-incrementing surrogate primary key, you may +want to use a different primary key.

+

For example, the code below changes the primary key for the User table +to a string (his username) which maps onto a varchar (20) field +user_name:

+
+
Using a natural key (tutorial5.C)
+
+
#include <Wt/Dbo/Dbo>
+
+namespace dbo = Wt::Dbo;
+
+class User {
+public:
+  std::string userId;
+
+  template<class Action>
+  void persist(Action& a)
+  {
+    dbo::id(a, userId, "user_id", 20);
+  }
+};
+
+namespace Wt {
+  namespace Dbo {
+
+    template<>
+    struct dbo_traits<User> : public dbo_default_traits {
+      typedef std::string IdType;
+
+      static IdType invalidId() {
+        return std::string();
+      }
+
+      static const char *surrogateIdField() { return 0; }
+    };
+
+  }
+}
+

A natural primary key may also be a composite key.

+
+

8. Transactions and concurrency

+
+

Reading data from the database or flushing changes to the database +require an active transaction. A +Transaction is a RIIA +(Resource-Initialization-is-Acquisition) class which at the same time +provides isolation between concurrent sessions and atomicity for +persisting changes to the database.

+

The library implements optimistic locking, which allows detection +(rather than avoidance) of concurrent modifications. It is a +recommended and widely used strategy for dealing with concurrency +issues in a scalable manner as no write locks are needed on the +database. To detect a concurrent modification, a version field is +added to each table which is incremented on each modification. When +performing a modification (such as updating or removing an object), it +is checked that the version of the record in the database is the same +as the version of the object that was originally read from the +database.

+
+ + + +
+
Note
+
+
Transaction isolation levels
The minimum level of isolation which is required for the library’s +optimistic locking strategy is Read Committed: modifications in a +transaction are only visible to other sessions as soon as they are +committed. This is usually the lowest level of isolation supported by +a database (SQLite3 is currently the only backend and provides this +isolation level by default).
+
+

The Transaction class is a light-weight proxy that references a +logical transaction: multiple (usually nested) Transaction objects +may be instantiated simultaneously, which each need to be committed +for the logical transaction to be committed. In this way you can +easily protect individual methods which require database access with +such a transaction object, which will automatically participate in a +wider transaction if that is available. A transaction will in fact +defer opening a real transaction in the database until needed, and +thus there is no penalty for instantiating a transaction to make sure +a unit of work is atomic, even if you are not yet sure that there will +be actual work done.

+

Transactions may fail and dealing with failing transactions is an +integral aspect of their usage. When the library detects a concurrent +modification, a +StaleObjectException +is thrown. Other exceptions may be thrown, including exceptions in the +backend driver when for example the database schema is not compatible +with the mapping. There may also be problems detected by the business +logic which may raise an exception and cause the transaction to be +rolled back. When a transaction is rolled back, the modified database +objects are not successfully synchronized with the database, but may +possibly be synchronized later in a new transaction.

+

Obviously, many exceptions will be fatal. One notable exception is the +StaleObjectException however. Different strategies are possible to +deal with this exception. Regardless of the approach, you will at +least need to +reread() +the stale database object(s) before being able to commit changes made +in a new transaction.

+
+ + + diff --git a/wt-3.1.7a/doc/tutorial/wt/wt-sdj-action.png b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-action.png new file mode 100644 index 0000000..0e0390b Binary files /dev/null and b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-action.png differ diff --git a/wt-3.1.7a/doc/tutorial/wt/wt-sdj-login.png b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-login.png new file mode 100644 index 0000000..3dc6d97 Binary files /dev/null and b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-login.png differ diff --git a/wt-3.1.7a/doc/tutorial/wt/wt-sdj-models.png b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-models.png new file mode 100644 index 0000000..9dcaf2c Binary files /dev/null and b/wt-3.1.7a/doc/tutorial/wt/wt-sdj-models.png differ diff --git a/wt-3.1.7a/doc/tutorial/wt/wt-sdj.pdf b/wt-3.1.7a/doc/tutorial/wt/wt-sdj.pdf new file mode 100644 index 0000000..4554cb6 Binary files /dev/null and b/wt-3.1.7a/doc/tutorial/wt/wt-sdj.pdf differ diff --git a/wt-3.1.7a/doc/tutorial/wt/wt-sdj.xhtml b/wt-3.1.7a/doc/tutorial/wt/wt-sdj.xhtml new file mode 100644 index 0000000..c1cfe11 --- /dev/null +++ b/wt-3.1.7a/doc/tutorial/wt/wt-sdj.xhtml @@ -0,0 +1,98 @@ + + +<meta name="generator" content="StarOffice/OpenOffice.org XSLT (http://xml.openoffice.org/sx2ml)" /><meta name="author" content="Koen Deforche" /><meta name="created" content="2005-12-30T12:33:03" /><meta name="changedby" content="Koen Deforche" /><meta name="changed" content="2006-04-08T14:57:08" /><base href="." /><style type="text/css"> + @page { size: 21.001cm 29.7cm; margin-top: 2cm; margin-bottom: 2cm; margin-left: 1.499cm; margin-right: 1.499cm } + table { border-collapse:collapse; border-spacing:0; empty-cells:show } + td, th { vertical-align:top; } + h1, h2, h3, h4, h5, h6 { clear:both } + ol, ul { padding:0; } + *.Frame { vertical-align:middle; } + *.Graphics { vertical-align:top; text-align:center; } + *.Caption { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; margin-left:0.199cm; margin-right:0.199cm; margin-top:0.21cm; margin-bottom:0.21cm; text-indent:0cm; font-style:italic; clear: both } + *.Figure { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; margin-left:0.199cm; margin-right:0.199cm; margin-top:0.21cm; margin-bottom:0.21cm; text-indent:0cm; font-style:italic; } + *.Firstlineindent { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; margin-left:0cm; margin-right:0cm; text-indent:0.499cm; } + *.Footer { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; } + *.Footnote { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; margin-left:0.499cm; margin-right:0cm; text-indent:-0.499cm; } + *.Framecontents { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.Hangingindent { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; margin-left:1cm; margin-right:0cm; text-indent:-0.499cm; } + *.Header { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; } + *.Heading { font-family:Arial; font-size:14pt; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; } + *.Heading1 { font-family:Arial; font-size:16pt; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-weight:bold; } + *.Heading2 { font-family:Arial; font-size:14pt; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-style:italic; font-weight:bold; } + *.Heading3 { font-family:Arial; font-size:14pt; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-weight:bold; } + *.Heading4 { font-family:Arial; font-size:85%; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-style:italic; font-weight:bold; } + *.Index { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; } + *.List { font-family:'Times New Roman'; font-size:10.5pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.ListIndent { font-family:'Times New Roman'; font-size:10.5pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; margin-left:5.001cm; margin-right:0cm; text-indent:-4.5cm; } + *.P1 { font-family:'Times New Roman'; font-size:12pt; text-align:center ! important; font-style:italic; } + *.P2 { font-family:'Times New Roman'; font-size:12pt; text-align:center ! important; } + *.P3 { font-family:Arial; font-size:18pt; text-align:center ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-weight:bold; } + *.P4 { font-family:'Lucida Sans'; font-size:14pt; text-align:center ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-style:italic; } + *.P5 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.P6 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.P7 { font-family:Arial; font-size:12pt; text-align:justify ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-style:italic; font-weight:bold; } + *.P8 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.P9 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.PreformattedText { font-family:'Courier New'; font-size:11pt; text-align:left ! important; margin-top:0cm; margin-bottom:0cm; } + *.Sender { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; margin-top:0cm; margin-bottom:0.106cm; } + *.Standard { font-family:'Times New Roman'; font-size:12pt; text-align:justify ! important; } + *.Subtitle { font-family:Arial; font-size:14pt; text-align:center ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-style:italic; } + *.Textbody { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; } + *.Textbodyindent { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; margin-top:0cm; margin-bottom:0.212cm; margin-left:0.499cm; margin-right:0cm; text-indent:0cm; } + *.Title { font-family:Arial; font-size:18pt; text-align:center ! important; margin-top:0.423cm; margin-bottom:0.212cm; font-weight:bold; } + *.BulletSymbols { font-family:StarSymbol; font-size:9pt; } + *.Captioncharacters { } + *.Definition { } + *.Example { font-family:'Courier New'; } + *.Footnoteanchor { vertical-align:sup; } + *.FootnoteSymbol { } + *.Internetlink { color:#000080; text-decoration:underline; } + *.SourceText { font-family:'Courier New'; } + *.T1 { font-size:24pt; } + *.T10 { font-family:'Times New Roman'; } + *.T2 { font-weight:bold; } + *.T3 { font-style:italic; } + *.T4 { font-style:normal; } + *.T5 { } + *.T6 { font-family:'Courier New'; } + *.T7 { } + *.T8 { font-family:'Courier New'; font-size:10pt; } + *.T9 { font-family:Arial; font-size:14pt; font-weight:bold; } + *.VisitedInternetLink { color:#800000; text-decoration:underline; } + </style></head><body dir="ltr"> +<p> +<p class="P3"><span class="T1">A gentle introduction to the <a href="http://witty.sourceforge.net">Wt C++ Toolkit</a> for Web Applications</span></p><p class="P4">Koen Deforche and Wim Dumon, January, 2006 </p><p class="Textbody"> </p><p class="Textbody">* Originally published in <span class="T2">Software Developers Journal</span> April 2006 issue, and brought up-to-date for Wt version 1.1.0.</p> +<p class="Textbody">Also available as a <a href="wt-sdj.pdf">PDF file</a>.</p> + +<h1 class="Heading1"><a name="1._Introduction" />1. Introduction</h1><h2 class="Heading2"><a name="Web_application_technology_for_the_future" />Web application technology for the future</h2> + +<p class="Firstlineindent">C++ is an established language for developing many kinds of software such as desktop applications, email clients, database engines, and so on.  Still, the use of C++ for creating “web applications†has been limited. Instead, languages that dominate web application development are JAVA, PHP, Python, and Perl. With the exception of PHP, which is a language specifically designed for web development, web application frameworks are offered for the other languages to aid in web application development. Examples are J2EE and Struts for JAVA, Perl::CGI for Perl, or Zope for Python. These frameworks provide session-management, support for parsing data transmitted from the web browser from HTML forms and cookies, and help in generating the new page in response.</p> + +<p style="float: right; width:50%; margin: 4ex"> + <img src="wt-sdj-models.png" style="width:100%"></img> + Figure 1: (a) The dynamic page model traditionally used by web application frameworks, contrasted with (b) the event-driver model traditionally used by GUI toolkits, and Wt. +</p> + +<p class="Textbody"> +The paradigm followed by these web applications frameworks is illustrated in Figure 1(a). At each step, the web browser requests a new page to the web server, and may submit within the request a number of form values. At the server end, the web application processes the request, identifies the session, and performs business logic. Finally, the application generates the response page. The response page may contain not only HTML, but also JavaScript to enhance the interactivity of the web application. However, JavaScript has many quirks in different web browsers, and therefore requires great effort to write in a portable way. </p><p class="P5">New and highly successful web applications such as Google's Gmail or Google Maps, however, do no longer follow this page-by-page paradigm. Instead, they use a combination of JavaScript and server-side techniques, often referred to as AJAX, to dynamically update the web page with new content received from the server, <span class="T3">without reloading the web page.</span><span class="T4"> AJAX works by using JavaScript to make a HTTP request in the background to the server (e.g. 'Any new email?'). The server generates the appropriate response (e.g. 'Yes, 2: (1) ..., (2) ...'), in XML format. Finally, client-side JavaScript parses the response and updates the web page by manipulating the Document Object Model (DOM) (e.g. by prepending the two email messages to the inbox list).</span></p><p class="Textbody">This new technology which enjoyed much hype in 2005, causes a fundamental change in how web applications may be built. It is no longer necessary to transmit an entire new web page in response to every event. AJAX has fueled new possibilities for the web, and is therefore sometimes associated with an entire new and more interactive version of the web: Web 2.0. At the same time, the use of these technologies poses many challenges. The application developer needs to learn and absorb a number of technologies in order to use AJAX. In addition to the server-side framework and HTML/CSS, the developer needs to learn Dynamic HTML (DHTML) which is the manipulation of the Document Object Model (DOM) using JavaScript, some details of the HTTP protocol in order to generate valid GET or POST requests using JavaScript, and finally the usage of the XMLHttpRequest API. And to top it off, as always there is the variety of browser dialects to take into account, plus the desire to keep supporting older browsers lacking these new technologies. </p><h2 class="Heading2"><a name="Enter_Wt__21" />Enter Wt !</h2> +<p class="Firstlineindent">In contrast with the page model of traditional web applications frameworks, the model followed by Wt or a traditional GUI library is based on widgets, see Figure 1(b). The widgets are conceptually organized in a tree, and callback functions are attached to particular events. In response to an event, the callback is called, some work gets done, and/or the widget tree is modified. </p><p class="P6">Wt is a young C++ widget library for developing web applications. The application model of Wt is similar to the application models of existing GUI libraries (such as Microsoft's MFC or TrollTech's Qt). At the same time Wt hides many underlying technology details (HTML, Forms/CGI, JavaScript, AJAX, etc...) from the developer, not unlike how the Qt library hides the underlying X library or Microsoft Windows GUI details. </p><p class="P6">Because the API of Wt makes abstraction of the underlying technologies (Forms, JavaScript or AJAX), Wt chooses how to communicate with the web browser depending on technology support in the browser. The responsibility for making the application work in the jungle of web browsers is therefore also transferred from the application developers to the library developers. </p><p class="Standard"><span class="T5">In the remainder of this introductory article to Wt, we will first give an overview of the main classes and features, as well as an explanation of what Wt does behind the scenes. Next we will show how to use Wt by implementing the classic “hangman†game.</span></p><h1 class="Heading1"><a name="2._Library_overview" />2. Library overview</h1><h2 class="P7"><a name="Main_components" />Main components</h2><p class="Firstlineindent"><span class="T5">The entire user-interface is organized in a hierarchical widget tree of </span><span class="T6">WWidget</span><span class="T5"> objects. A </span><span class="T6">WWidget</span><span class="T5"> corresponds to a visible entity such as for example a piece of text (</span><span class="T6">WText</span><span class="T5">), a table (</span><span class="T6">WTable</span><span class="T5">), a line edit (</span><span class="T6">WLineEdit</span><span class="T5">), or a more complex composite widget (classes that implement </span><span class="T6">WCompositeWidget</span><span class="T5">). The user-interface, which corresponds to the web page, is specified by creating and maintaining this widget tree. Every </span><span class="T6">WWidget</span><span class="T5"> corresponds to a rectangular piece, and manages the contents and events within that rectangle.</span></p><p class="P6">The library provides a number of basic widgets that correspond directly to the widgets provided by HTML, and which are all descendants of <span class="T6">WWebWidget</span><span class="T5"> (</span><span class="T6">WText</span><span class="T5">, </span><span class="T6">WTable</span><span class="T5">, </span><span class="T6">WImage</span><span class="T5">, ...). These widgets  internally manipulate a server-side HTML DOM, which is then used by the core library to update the web page rendered by the browser. In contrast, </span><span class="T6">WCompositeWidget</span><span class="T5"> objects are widgets that are implemented by composition of other widgets. These widgets do not manipulate the DOM themselves but merely use the public API of the composing widgets. While Wt provides a number of these composite widgets (such as a tree-list widget and an auto-complete line edit), these widgets do not necessarily belong to the library, since they are implemented on top of Wt.</span></p><p class="Textbody"><span class="T5">Every Wt application must start with the instantiation of a </span><span class="T6">WApplication</span><span class="T5"> object. This object manages the root of the widget tree, information on browser capabilities and manages internationalization support using a locale and message resource bundles (see further).</span></p><h2 class="P7"><a name="Session_management" />Session management</h2><p class="Firstlineindent"><span class="T5">Similar to how multiple instances of conventional applications may be run concurrently, so will the Wt core system spawn multiple Wt applications for every independent web session. Each new “session†implies a new path of execution which starts in </span><span class="T6">wmain()</span><span class="T5">, which is the application entry point. Thus, the programmer only needs to implement a single-user application, unless users interact with a common component (such as a database) or with each other, for which standard data-sharing mechanisms must be used.</span></p><p class="P6">The current version of Wt implements these different paths of execution using different processes. Thus, for every new session, Wt spawns a new process. This has the main benefit of enjoying kernel-level memory protection between user sessions. As a consequence simple programming mistakes will not automatically compromise session-privacy. The downside of this approach is cost: current kernel implementations may require some amount of non-swappable memory associated with every process. In the future, Wt may offer different thread implementation choices, including user-level threads. </p><h2 class="Heading2"><a name="Signal_2FSlot_event_propagation" />Signal/Slot event propagation</h2><p class="Firstlineindent">Wt uses a signal/slot implementation for event propagation. User-interface events, such as mouse clicks, or text modifications, are exposed by Wt as <span class="T3">signals </span><span class="T4">associated with particular widgets</span>. To respond to an event, the programmer connects the respective signal to a <span class="T3">slot</span>. Any object method with a signature compatible with the signal may be used as a slot. Whenever the signal is emitted, all slots that have been connected to the signal are called. The signal/slot paradigm is a well-established type-safe and self-managed alternative to callbacks.</p><h2 class="Heading2"><a name="Internationalization" />Internationalization</h2><p class="Firstlineindent"><span class="T5">Internationalization and localization is an important property of a website, given the inherent global scope of the World-Wide-Web. Wt assists in internationalization by offering message resource bundles. A </span><span class="T6">WMessage</span><span class="T5"> object provides a piece of text which is dependent on the current locale. Widgets that display text to the user (such as </span><span class="T6">WText</span><span class="T5">) may be given a </span><span class="T6">WMessage</span><span class="T5"> instead of raw text. The message translations for every locale are stored in XML format in message resource files, one for every locale. When changing the application locale, using </span><span class="T6">WApplication::setLocale()</span><span class="T5">, the application automatically updates the corresponding widgets with the localized text.</span></p><h2 class="Heading2"><a name="Non-intrusive_upgrades" />Non-intrusive upgrades</h2><p class="Firstlineindent">Web applications enjoy a major advantage over conventional applications since the publisher can easily upgrade all copies of the application, by merely deploying a new version on his website. Usually the publisher may not want to terminate running sessions when deploying a new version, but instead offer the new version to new sessions. This process of non-intrusive upgrades is the default method of upgrading in Wt. </p><h2 class="Heading2"><a name="Session_lifetime" />Session lifetime</h2><p class="Firstlineindent"><span class="T5">Wt uses a keep-alive protocol between client and server to determine session lifetime. As long as the web page is displayed in the user's browser, the session is kept alive, otherwise the session is terminated. In addition the application can choose to end the session (for example in response to the user 'logging out'), by calling </span><span class="T6">WApplication::quit()</span><span class="T5">. Either way, when a session terminates, the main widget is destroyed. This allows the application to release any application-specific resources.</span></p><h2 class="Heading2"><a name="How_does_it_work_3F" />How does it work?</h2><p class="Firstlineindent">Wt implements two main tasks: rendering and maintaining the HTML DOM tree in the web browser, and responding to user input and user events, such as mouse clicks. </p><p class="P8"><span class="T5">All events that may be caught for processing are mapped to signals, which are available in the respective widgets. When an event is triggered by the user (e.g. a click on an 'OK' button), the web browser communicates the target object and corresponding signal (for example </span><span class="T6">OkButton->clicked</span><span class="T5">), together with all form data to the web server (using AJAX or plain HTML form submission). At the server, the corresponding Wt application instance processes first all form data to update the widget tree state. Then, the event is propagated by emitting the signal of the target object, which triggers all connected slots. These may perform business logic and modify the widget tree. Modifications to the widget tree are tracked by the library, and converted to modifications to a server-side model of the HTML DOM tree. Finally, depending on the method for communication, either the DOM tree changes, or the complete modified DOM tree are communicated back to the web browser, completing the event cycle.</span></p><p class="P6">Because of the clear separation between user-interface specification using the widget tree and the mechanism of rendering the tree, Wt optimizes rendering for increased responsiveness when AJAX is available. Wt accomplishes this by transmitting only visible widget changes during the first communication with the web browser. As soon as the page is loaded, remaining hidden widgets changes are transmitted in the background. As a consequence, both the initial response is optimized and the appearance of subsequent widgets appears snappy. </p><h1 class="Heading1"><a name="3._Tutorial" />3. Tutorial</h1><p class="Firstlineindent"><span class="T5">The tutorial section discusses two small programs to illustrate various Wt library concepts. The first program is a Hello World application, introducing two key concepts of the library: the widget tree and signal/slots. The second larger program is an online version of the classic hangman game, including a user ranking system, backed by a small database. The game is available online</span><span class="T5" /><span class="T5">. The hangman game illustrates how a widget tree for a more complex web application is constructed and managed, how to write your own widgets, signals and slots, how layout is handled, and offers an example of how data can be extracted from a database to be displayed on the website. The complete source code of the game is around 900 lines including comments. We selected the most interesting parts for this tutorial.</span></p><p class="Textbody"><span class="T5">The Wt documentation page</span><span class="T5" /><span class="T5"> contains an exhaustive list of  classes, methods, signals and slots exposed in the Wt API. Even the Hangman demo only uses a small portion of the available classes and methods. The complete sources of the tutorial examples, together with Makefiles to build them, are included in the Wt source distribution.</span></p><h2 class="Heading2"><a name="The_omnipresent_Hello_World" />The omnipresent Hello World</h2><p class="Firstlineindent"><span class="T5">The entry point of every Wt program is the </span><span class="T6">wmain()</span><span class="T5"> function. The simplest Wt program must instantiate the </span><span class="T6">WApplication</span><span class="T5"> object, and call the application idle loop. For the hello world application, a </span><span class="T6">WText</span><span class="T5"> object and a </span><span class="T6">WPushButton</span><span class="T5"> were added, having the root of the widget tree as parent. This will make them appear in the web browser. Clicking the Quit button cleanly terminates the session. This is achieved by connecting the </span><span class="T6">clicked</span><span class="T5"> signal of the Quit button with the </span><span class="T6">quit()</span><span class="T5"> slot of the application.</span></p><p class="Textbody"><span class="T5">It is important to remark that there is no obligation to call </span><span class="T6">quit()</span><span class="T5"> explicitly. When the user navigates away from the web application, Wt will detect that keep-alive messages are no longer received, and Wt will terminate the session as if </span><span class="T6">quit()</span><span class="T5"> was called.</span></p><p class="Caption">Listing 1. Hello World with Quit button </p><p class="PreformattedText">#include <WApplication> </p><p class="PreformattedText">#include <WText> </p><p class="PreformattedText">#include <WPushButton> </p><p class="PreformattedText"> </p><p class="PreformattedText">int wmain(int argc, char **argv) </p><p class="PreformattedText">{ </p><p class="PreformattedText">   WApplication appl(argc, argv);</p><p class="PreformattedText"> </p><p class="PreformattedText">   // Widgets can be added to a parent</p><p class="PreformattedText">   // by calling addWidget() ...</p><p class="PreformattedText">   appl.root()->addWidget(new Wtext("<h1>Hello, World!</h1>"));</p><p class="PreformattedText"> </p><p class="PreformattedText">   // ... or by specifying a parent at</p><p class="PreformattedText">   // construction time</p><p class="PreformattedText">   WPushButton *Button = new WPushButton("Quit", appl.root());</p><p class="PreformattedText"> </p><p class="PreformattedText">   Button->clicked.connect(SLOT(&appl, Wapplication::quit));</p><p class="PreformattedText">   return appl.exec();</p><p class="PreformattedText">} </p><h2 class="Heading2"><a name="My_first_widget" />My first widget</h2> + + +<p style="float: right; width:50%; margin: 4ex"> + <img src="wt-sdj-login.png" style="width:100%"></img> + Figure 2: The hangman login widget, right after construction. Listing 3 is the source code for this web page. +</p> +<p class="Firstlineindent">We start the discussion the hangman game with the login process. This is handled by the LoginWidget. We have kept the business logic to a minimum, and indeed a bit simplistic. The LoginWidget invites the returning user to login using his user name and password, and to choose one of the available dictionaries from which words will used for the game. If the user was not present in the user database, we assume a new user and he is automatically added to the database. On successful login, a confirmation is displayed, otherwise the user is notified of the problem and may try again. </p><p class="P6">Hangman's LoginWidget demonstrates the possibility to write self-contained widgets in a nice object-oriented fashion, with clean interfaces, ready to be plugged in where they are required. The LoginWidget, with its non-standard behavior, may not immediately be a candidate for reuse, but nevertheless it demonstrates the interface principles. The LoginWidget has only two public member functions. The first is the constructor, which takes the parent widget as an argument. Since all built-in widgets take their parent as an argument in the constructor, it is a consistent approach to do this as well for custom widgets. The second member is a signal that will be emitted when the login process has been successfully completed. The signal also carries the user name, and the chosen game dictionary. </p><p class="P6">The object oriented widget tree approach for GUI libraries has led to a significant amount of widget reuse, which is evident from large scale desktop projects such as KDE. Especially where widgets cover pretty simple concepts, reuse of a widget is often no more complex than instantiating it in the right location of the object tree. The remainder of a program may interact with the widget using its methods and by installing callback functions to react to events. Traditional GUI widget examples are an expandable tree list, a file-open dialog, etc... which are almost always included in the GUI libraries. Wt introduces the exact same paradigm to the world of web programming, and invites the programmer to partition a web application in well defined and self contained widgets. </p><p class="Caption">Listing 2. LoginWidget class definition. </p><p class="PreformattedText"><span class="SourceText">class LoginWidget : public WContainerWidget</span></p><p class="PreformattedText"><span class="SourceText">{</span></p><p class="PreformattedText"><span class="T8">  public:</span></p><p class="PreformattedText"><span class="SourceText">    LoginWidget(WContainerWidget *parent = 0);</span></p><p class="PreformattedText"><span class="SourceText" /></p><p class="PreformattedText"><span class="SourceText">  public signals:</span></p><p class="PreformattedText"><span class="SourceText">    </span><span class="SourceText"><span class="T8">Wt::Signal<std::string, Dictionary></span></span><span class="SourceText"> loginSuccessful;</span></p><p class="PreformattedText"><span class="SourceText" /></p><p class="PreformattedText"><span class="SourceText">  private slots:</span></p><p class="PreformattedText"><span class="SourceText">    void checkCredentials();</span></p><p class="PreformattedText"><span class="SourceText">    void startPlaying();</span></p><p class="PreformattedText"><span class="SourceText" /></p><p class="PreformattedText"><span class="SourceText">  private:</span></p><p class="PreformattedText"><span class="SourceText">    WText *IntroText;</span></p><p class="PreformattedText"><span class="SourceText">    WLineEdit *Username;</span></p><p class="PreformattedText"><span class="SourceText">    WLineEdit *Password;</span></p><p class="PreformattedText"><span class="SourceText">    WComboBox *Language;</span></p><p class="PreformattedText"><span class="SourceText">    std::string User;</span></p><p class="PreformattedText"><span class="SourceText">    Dictionary  Dict;</span></p><p class="PreformattedText"><span class="SourceText">    void confirmLogin(const std::string text);</span></p><p class="PreformattedText"><span class="SourceText">};</span></p><p class="PreformattedText"> </p><p class="P6">In Listing 2, we show the class definition of the LoginWidget class. The LoginWidget defines a public signal, <span class="SourceText">loginSuccessful</span>, and uses internally a number of slots to react to user events. Therefore, we must inherit (directly or indirectly) from <span class="SourceText">WObject</span>. We then declare signals and methods that will be used as in the class declaration.</p><p class="P6">LoginWidget inherits from <span class="SourceText">WContainerWidget</span>. A <span class="SourceText">WContainerWidget</span> is a widget which holds and manages child widgets. The parent of a widget is always a <span class="SourceText">WContainerWidget</span> or one of its derived classes (such as <span class="SourceText">WStackedWidget</span> or <span class="SourceText">WTableCell</span>). Children in a <span class="SourceText">WContainerWidget</span> are layed out in the order in which they were added to the container. The inline property of a widget determines its default layout behavior within the container. In-line widgets are layed out like words in a text, following lines and  wrapping at the right border of the container. Non in-line widgets are formatted as a new paragraph. Widgets may also be lifted out of this default layout flow to be manually positioned in various ways, but we will not discuss this here. Instead, as illustrated in the constructor discussed below, a <span class="SourceText">WTable</span> is used to create a more sophisticated layout.</p> + +<p class="P6">The login widget, as rendered by Firefox, is shown in Figure 2. The code that generates this interactive form is entirely located inside the constructor of LoginWidget, which is shown in Listing 3. </p> + +<p class="Caption">Listing 3. The LoginWidget constructor implementation. </p><p class="PreformattedText">LoginWidget::LoginWidget(WContainerWidget *parent)  </p><p class="PreformattedText">  : WContainerWidget(parent)</p><p class="PreformattedText">{ </p><p class="PreformattedText">  setPadding(WLength(100), Left | Right);</p><p class="PreformattedText"> </p><p class="PreformattedText">  WText *title = new WText("Login", this);</p><p class="PreformattedText">  title->decorationStyle().font().setSize(WFont::XLarge);</p><p class="PreformattedText"> </p><p class="PreformattedText">  IntroText = new Wtext("<p>Hangman keeps track of the best"</p><p class="PreformattedText">    "players. To recognize you, we ask you to log in. "</p><p class="PreformattedText">    "If you never logged in before, choose any name and "</p><p class="PreformattedText">    "password.</p>", this);</p><p class="PreformattedText"> </p><p class="PreformattedText">  WTable *layout = new WTable(this);</p><p class="PreformattedText">  WLabel *usernameLabel = new WLabel("User name: ",</p><p class="PreformattedText">                                     layout->elementAt(0, 0));</p><p class="PreformattedText">  layout->elementAt(0, 0)->resize(WLength(14, Wlength::FontEx),</p><p class="PreformattedText">                                  WLength());</p><p class="PreformattedText">  Username = new WLineEdit(layout->elementAt(0, 1));</p><p class="PreformattedText">  usernameLabel->setBuddy(Username);</p><p class="PreformattedText"> </p><p class="PreformattedText">  WLabel *passwordLabel = new WLabel("Password: ",</p><p class="PreformattedText">                                     layout->elementAt(1, 0));</p><p class="PreformattedText">  Password = new WLineEdit(layout->elementAt(1, 1));</p><p class="PreformattedText">  Password->setEchoMode(WLineEdit::Password);</p><p class="PreformattedText">  passwordLabel->setBuddy(Password);</p><p class="PreformattedText"> </p><p class="PreformattedText">  WLabel *languageLabel= new WLabel("Language: ",</p><p class="PreformattedText">                                    layout->elementAt(2, 0));</p><p class="PreformattedText">  Language = new WcomboBox(layout->elementAt(2, 1));</p><p class="PreformattedText">  Language->insertItem(0, "English words (18957 words)");</p><p class="PreformattedText">  Language->insertItem(1, "Nederlandse woordjes (1688 woorden)");</p><p class="PreformattedText">  languageLabel->setBuddy(Language);</p><p class="PreformattedText"> </p><p class="PreformattedText">  new WBreak(this);</p><p class="PreformattedText"> </p><p class="PreformattedText">  WPushButton *LoginButton = new WPushButton("Login", this);</p><p class="PreformattedText">  LoginButton->clicked.connect(SLOT(this, LoginWidget::checkCredentials));</p><p class="PreformattedText">} </p><p class="P6"> </p><p class="P6">The constructor introduces a number of new concepts. We had encountered the <span class="SourceText">WText</span> and <span class="SourceText">WPushButton</span> already in the hello world example. The new widgets will hold few surprises. <span class="SourceText">WLineEdit</span> provides a single line edit input and <span class="SourceText">WComboBox</span> provides a drop-down selection box. The latter is populated with selection options using <span class="SourceText">insertItem()</span>. We use the <span class="SourceText">WLabel</span> class to provide labels for the three input fields, and tie them to the corresponding input-field using <span class="SourceText">setBuddy()</span>. By using <span class="SourceText">WLabel</span> instead of <span class="SourceText">WText</span>, the user may click on the label to give focus to the corresponding input field. <span class="SourceText">WTable</span> is a table, in this case used for layout purposes. The table cells, accessed using elementAt(row, column), are used as parent widget for some of the text widgets, the line inputs, and the combo box, so that they are layed out in an array. Finally, <span class="SourceText">WBreak</span> is the equivalent of the HTML line break tag (<span class="SourceText"><br /></span>), and lets subsequent inline widgets start a new line.</p><p class="P6">The <span class="SourceText">setPadding()</span> call adds empty space within LoginWidget between its border and its children. The <span class="SourceText">WLength</span> class offers an interface to the CSS method of specifying sizes. An 'automatic' length is created by calling the default constructor. When constructed with parameters, a value and a unit (defaulting to <span class="SourceText">WLength::Pixels</span>) are specified. All CSS units (pixels, font height, font width, cm, percentage, ...) are supported by the <span class="SourceText">WLength</span> class. A few lines below the <span class="SourceText">setPadding()</span> call, the <span class="SourceText">WLength</span> class appears again, in the line where the table cell is resized. The table width is set to 14 font width units, while the height remains the default.</p><p class="P6">The last important new aspect of Wt in this constructor is the use of <span class="SourceText">decorationStyle()</span> to access style properties of a widget, which we use to set the font size of the title to extra large. In the hello world example, we used the old-fashioned <span class="SourceText"><h2>..</h2></span>, but here we demonstrate that you can apply CSS-based styles. This method will reappear in other functions.</p><p class="P6">We use <span class="SourceText">setEchoMode()</span> to mask the entered password with stars. Finally, the <span class="SourceText">connect()</span> call is similar as in the hello world application, but here we connect the <span class="SourceText">clicked</span> signal to the <span class="SourceText">LoginWidget::checkCredentials</span> slot.</p><p class="Caption">Listing 4. Methods <span class="SourceText">checkCredentials()</span> and <span class="SourceText">confirmLogin()</span> of the LoginWidget class.</p><p class="PreformattedText">void LoginWidget::checkCredentials() </p><p class="PreformattedText">{ </p><p class="PreformattedText">  User = Username->text();</p><p class="PreformattedText">  std::string pass = Password->text();</p><p class="PreformattedText">  Dict = (Dictionary) Language->currentIndex();</p><p class="PreformattedText"> </p><p class="PreformattedText">  if (HangmanDb::validLogin(User, pass)) {</p><p class="PreformattedText">    confirmLogin("<p>Welcome back, " + User + ".</p>");</p><p class="PreformattedText">  } else</p><p class="PreformattedText">    if (HangmanDb::addUser(User, pass)) {</p><p class="PreformattedText">      confirmLogin("<p>Welcome, " + User</p><p class="PreformattedText">        + ". Good luck with your first game!</p>");</p><p class="PreformattedText">    } else {</p><p class="PreformattedText">      IntroText->setText("<p>You entered the wrong"</p><p class="PreformattedText">          " username/password, please try again.</p>");</p><p class="PreformattedText">      IntroText->decorationStyle().setForegroundColor(Wt::red);</p><p class="PreformattedText">      Username->setText("");</p><p class="PreformattedText">      Password->setText("");</p><p class="PreformattedText">    }</p><p class="PreformattedText">} </p><p class="PreformattedText"> </p><p class="PreformattedText">void LoginWidget::confirmLogin(const std::string text) </p><p class="PreformattedText">{ </p><p class="PreformattedText">  clear();</p><p class="PreformattedText"> </p><p class="PreformattedText">  WText *title = new WText("Loging successful", this);</p><p class="PreformattedText">  title->decorationStyle().font().setSize(WFont::XLarge);</p><p class="PreformattedText"> </p><p class="PreformattedText">  new WText(text, this);</p><p class="PreformattedText">  (new WPushButton("Start playing", this))</p><p class="PreformattedText">    ->clicked.connect(SLOT(this, LoginWidget::startPlaying));</p><p class="PreformattedText">} </p><p class="PreformattedText"> </p><p class="P6">In <span class="SourceText">checkCredentials()</span> we validate the user and password that were entered. Therefore, it is a fine example of how user input is retrieved and how the webpage can be modified as a reaction to user input. In the first three lines, the user name, password, and language selection provided by the user are retrieved from the <span class="SourceText">WLineEdit</span> and <span class="SourceText">WComboBox</span> widgets, using respectively the <span class="SourceText">text()</span> and <span class="SourceText">currentIndex()</span> method calls. These methods always return the up-to-date values for these widgets, without any intervention from the programmer. This may not be surprising for a GUI library, but is a huge simplification compared to the traditional and tedious form-based content retrieval commonly found in web application frameworks.</p><p class="P6">In the subsequent code, the credentials are verified, and we call <span class="SourceText">confirmLogin()</span> when the login was successful. Otherwise we change the displayed message stored in the IntroText widget using <span class="SourceText">setText()</span> to notify the user of the failure. In addition, we change the message text color to red to alert the user. Text color is another property that can be accessed using <span class="SourceText">decorationStyle()</span>, which we previously used to set the font size of the title. Finally, we complete the slot implementation by clearing the user name and password text.</p><p class="P6">The most interesting and maybe surprising aspect of this slot implementation may be in the code that is not there! Wt has two possible ways for updating the web browser page: either by letting the browser move to a new page, or by using JavaScript, AJAX and DHMTL to update the current web page. Because the code does not specify the mechanism but only the desired result, Wt may use either of these methods depending on support for JavaScript and AJAX at the client. </p><p class="P6">We have kept the database interface simple on purpose. <span class="SourceText">HangmanDb::validLogin()</span> verifies if the user/password combination is stored in the database. If this fails, we try to add the user by means of the <span class="SourceText">HangmanDb::addUser()</span> call. This call will fail if the user name was already in the database. Even though the implementation of these functions will not be discussed in this article, it is worth to mention that they use the MySQL++ library to interact with a MySQL database.</p><p class="P6">When the login was successful, we display a welcome message and a confirmation of the login, which is implemented in <span class="SourceText">c</span><span class="SourceText"><span class="SourceText">onfirmLogin</span></span><span class="SourceText">()</span>. If you have digested the LoginWidget implementation well so far, you will find that this method contains no new magic. First, we use <span class="SourceText">clear()</span> to clear the container widget contents. Finally, in one statement we create a new button and at once connect its <span class="SourceText">clicked</span> signal to the <span class="SourceText">startPlaying()</span> slot.</p><p class="Caption">Listing 5. <span class="SourceText">LoginWidget::startPlaying()</span> slot implementation.</p><p class="PreformattedText">void LoginWidget::startPlaying() </p><p class="PreformattedText">{ </p><p class="PreformattedText">   emit(loginSuccessful(User, Dict));</p><p class="PreformattedText">} </p><p class="P6"> </p><p class="P6">The <span class="SourceText">startPlaying()</span> slot demonstrates how to emit a signal, in this case with arguments. What happens in response to the signal depends on slots that have been connected to this signal.</p><p class="P6">This concludes the entire implementation of the LoginWidget. In the remaining of the tutorial, we will reuse the same concepts that were used for the LoginWidget, to create highly responsive AJAX-enabled web applications. Because of the widget abstraction, you need no knowledge of JavaScript and even your knowledge of HTML can be minimal. On the other hand, Wt makes no big effort to abstract the decorative CSS concepts, instead exposing them almost directly using <span class="SourceText">decorationStyle()</span>. Therefore, familiarity with CSS will help you to style a Wt application.</p><h2 class="Heading2"><a name="The_second_widget_3A_unleashing_Wt_27s_power" />The second widget: unleashing <span class="T9">Wt</span>'s power</h2> +<p style="float: right; width:50%; margin: 4ex"> + <img src="wt-sdj-action.png" style="width:100%"></img> + Figure 3: Hangman screen shot: an AJAX and DHTML web-application, entirely programmed in C++. All images are preloaded in the browser for improved user experience. +</p> +<p class="Firstlineindent">Until now, we introduced a rather unique paradigm to program web applications. We demonstrated Wt's added value to the programmer. The next widget also illustrates some new Wt widgets and features, but we also demonstrate an important aspect of Wt that highly enhances the user experience. One of the most appealing features of popular web applications like Google's Gmail and Google Maps is the excellent response time. Google has spent quite some effort in developing client-side JavaScript and AJAX code to achieve this. With few effort <span class="T10">–</span> indeed almost automatically <span class="T10">–</span> you can get similar response times using Wt, and indeed the library will be using similar techniques to achieve this. A nice bonus of using Wt is that the application will still function correctly even when AJAX or JavaScript support is not available! The HangmanWidget class, which we discuss next, contains some of these techniques.</p> + +<p class="P6">HangmanWidget contains the real hangman game logic. Figure 3 is a screen shot of the game in action. For each new game, the program chooses a random secret word for the player to guess. From the alphabet, the player guesses a letter, and if the letter is part of the secret word, its occurrences in the word are revealed. In case of a wrong guess, you get one step closer to a hanging man. At the end of the game, we update the users score in the database, and offer the user the possibility to start a new game. The implementation of HangmanWidget contains few novelties, except for how we handle the hangman images. </p><p class="P6">In the constructor we construct the user interface. The part that constructs the images is isolated in the method <span class="SourceText">createImages()</span>.</p><p class="Caption">Listing 6. Hidden widgets are prefetched by the browser, ready to be displayed when <span class="SourceText">show()</span> is called.</p><p class="PreformattedText">void HangmanWidget::createHangmanImages(WContainerWidget *parent) </p><p class="PreformattedText">{ </p><p class="PreformattedText">  for (unsigned int i = 0; i <= MaxGuesses; ++i) {</p><p class="PreformattedText">    std::string fname = "icons/hangman"</p><p class="PreformattedText">      + boost::lexical_cast<std::string>(i)</p><p class="PreformattedText">      + ".png";</p><p class="PreformattedText"> </p><p class="PreformattedText">    WImage *theImage = new WImage(fname, parent);</p><p class="PreformattedText">    HangmanImages.push_back(theImage);</p><p class="PreformattedText">  }</p><p class="PreformattedText"> </p><p class="PreformattedText">  HurrayImage = new Wimage("icons/hangmanhurray.png", parent);</p><p class="PreformattedText"> </p><p class="PreformattedText">  resetImages(); // Hide all images</p><p class="PreformattedText">} </p><p class="PreformattedText"> </p><p class="PreformattedText">void HangmanWidget::resetImages() </p><p class="PreformattedText">{ </p><p class="PreformattedText">  HurrayImage->hide();</p><p class="PreformattedText">  for (unsigned int i = 0; i < HangmanImages.size(); ++i)</p><p class="PreformattedText">    HangmanImages[i]->hide();</p><p class="PreformattedText">} </p><p class="P6"> </p><p class="P6">This function introduces a new widget: the <span class="SourceText">WImage</span>, which not surprisingly corresponds to an image in HTML. The code shows how all widgets are created and inserted into the HangmanWidget. With what we discussed until now, we would expect that all images are displayed at the same time, which is clearly not what we want. Therefore, we call <span class="SourceText">resetImages()</span> after the images are created, and this method calls <span class="SourceText">hide()</span> on every image, after which none of them are visible. The game logic will show and hide the images, so that only the correct one is visible at any point in the game. Every <span class="SourceText">WWidget</span> can be hidden, and hidden widgets can be redisplayed by calling <span class="SourceText">show()</span>. But why do we create and hide them, where instead we could simply create and delete the <span class="SourceText">WImage</span> that we want to show? Alternatively we could work with only one image and modify the source of the image to change image! The answer lies in the response time, at least when AJAX is available. Wt first transfers information about visible widgets to the web browser. When the visible part of web page is rendered, the remaining hidden widgets are transmitted and inserted by the web browser into the DOM tree. Most web browsers will also preload the images referred to in these hidden widgets. As a consequence, when the user clicks on a letter button and we need to update the hangman image, we simply hide and show the correct image widget. Then, only a single HTTP request with a small response are communicated between the web browser and the server. An alternative implementation would invariably have caused the browser to fetch the new image, requiring a second round-trip to the server, plus the time to download the image. The hangman game uses this principle of hidden widgets frequently, for example also when you switch between high scores and the game. At any point in time, only one of these widgets is shown, and the user switches between these two widgets using the menu bar at the bottom. Wt is able to further reduce the reaction time in some cases by transferring the slot implementation completely to the browser, with the use of the so-called static signal/slot connections, but that discussion falls outside the scope of this introductory tutorial.</p><p class="P6">In summary, the use of hidden widgets is a simple and effective way to implement performant Wt applications. Hidden widgets do not compromise the application load time, since visible widgets are transferred first. </p><p class="P6">We will skip the implementation of the HighScoresWidget and the HangmanGame because they demonstrate no fundamental additional features. HighScoresWidget displays the highest ranking users, and HangmanGame connects together the LoginWidget, the HangmanWidget, and the HighScoresWidget. Information-hungry readers are however invited to take a quick look at the HangmanGame source, since it uses clickable text (no, not hyperlinks) to implement a menu bar and demonstrates the use <span class="SourceText">WStackedWidget</span>, a specialization of the <span class="SourceText">WcontainerWidget</span>.</p><h1 class="Heading1"><a name="4._Summary" />4. Summary</h1><p class="Firstlineindent">The Wt library provides an effective way to implement web applications and frees the application developer of many technical aspects and quirks associated with new web technologies such as JavaScript, AJAX and DHTML. Because of the many similarities between Wt and other GUI toolkits, application developers can treat the web browser in many aspects as just another GUI platform. </p><p class="P6">The tutorial demonstrated many important Wt features, but far from all Wt features. Static slots, which further improve event response times, file uploads and dynamic resources, internationalization, full CSS support, and many undiscussed widgets are only a selection of what we had to skip. For more information, we refer the reader to the online Wt documentation resources. </p> +</p> +</body></html> diff --git a/wt-3.1.7a/examples/CMakeLists.txt b/wt-3.1.7a/examples/CMakeLists.txt new file mode 100644 index 0000000..32ababd --- /dev/null +++ b/wt-3.1.7a/examples/CMakeLists.txt @@ -0,0 +1,64 @@ +IF(BOOST_WT_MT_FOUND) + IF(MULTI_THREADED) + ADD_DEFINITIONS(-DWT_THREADED -D_REENTRANT -DBOOST_SPIRIT_THREADSAFE) + ELSE(MULTI_THREADED) + ADD_DEFINITIONS(-DBOOST_DISABLE_THREADS) + ENDIF(MULTI_THREADED) +ELSE(BOOST_WT_MT_FOUND) + ADD_DEFINITIONS(-DBOOST_DISABLE_THREADS) +ENDIF(BOOST_WT_MT_FOUND) + +ADD_DEFINITIONS(-DWT_DEPRECATED_3_0_0) + +# The WT_ADD_EXAMPLE function builds a DLL in case of ISAPI, and an executable +# in case of FCGI or HTTPD connectors. It also makes sure that the example +# links to the proper libraries (connector + wt). +MACRO(WT_ADD_EXAMPLE name) + IF(EXAMPLES_CONNECTOR MATCHES "wtisapi") + SET(MYLIST ${ARGV}) + LIST(INSERT MYLIST 1 SHARED) + ADD_LIBRARY(${MYLIST}) + SET_TARGET_PROPERTIES(${name} + PROPERTIES + LINK_FLAGS + "/EXPORT:HttpExtensionProc /EXPORT:GetExtensionVersion /EXPORT:TerminateExtension" + ) + ELSE(EXAMPLES_CONNECTOR MATCHES "wtisapi") + ADD_EXECUTABLE(${ARGV}) + ENDIF(EXAMPLES_CONNECTOR MATCHES "wtisapi") + IF(MSVC) + SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/W3 /Wp64 /wd4251 /wd4275") + ENDIF(MSVC) + TARGET_LINK_LIBRARIES(${name} ${EXAMPLES_CONNECTOR}) +ENDMACRO(WT_ADD_EXAMPLE) + +SUBDIRS( + blog + bobsmith + charts + codeview + composer + dialog + dragdrop + extkitchen + feature + filetreetable + form + gitmodel + hangman + hello + javascript + mandelbrot + mission + painting + planner + simplechat + style + treelist + treeview + treeview-dragdrop + webgl + wt-homepage + wtwithqt + widgetgallery +) diff --git a/wt-3.1.7a/examples/Doxyfile b/wt-3.1.7a/examples/Doxyfile new file mode 100644 index 0000000..d4d32aa --- /dev/null +++ b/wt-3.1.7a/examples/Doxyfile @@ -0,0 +1,227 @@ +# Doxyfile 1.4.2 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "Wt examples" +PROJECT_NUMBER = 3.1.7 +OUTPUT_DIRECTORY = ../doc/examples +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /home/kdforc0/project/wt/examples +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = composer form hangman hello mission simplechat treelist wt-homepage dragdrop treeview-dragdrop filetreetable javascript painting charts gitmodel +FILE_PATTERNS = *.C *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = YES +EXCLUDE_PATTERNS = +EXAMPLE_PATH = . +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = YES +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = YES +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = ../doc/footer.html +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../wt.tags=../../reference/html +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/wt-3.1.7a/examples/blog/BlogRSSFeed.C b/wt-3.1.7a/examples/blog/BlogRSSFeed.C new file mode 100644 index 0000000..7154062 --- /dev/null +++ b/wt-3.1.7a/examples/blog/BlogRSSFeed.C @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include <Wt/Http/Response> + +#include "BlogRSSFeed.h" + +#include "BlogSession.h" +#include "model/User.h" +#include "model/Post.h" +#include "model/Comment.h" +#include "model/Tag.h" + +namespace dbo = Wt::Dbo; + +BlogRSSFeed::BlogRSSFeed(const std::string& sqliteDb, + const std::string& title, + const std::string& url, + const std::string& description) + : session_(new BlogSession(sqliteDb)), + title_(title), + url_(url), + description_(description) +{ } + +BlogRSSFeed::~BlogRSSFeed() +{ + delete session_; +} + +void BlogRSSFeed::handleRequest(const Wt::Http::Request &request, + Wt::Http::Response &response) +{ + response.setMimeType("text/xml"); + + std::string url = url_; + + if (url.empty()) { + url = request.urlScheme() + "://" + request.serverName(); + if (!request.serverPort().empty() && request.serverPort() != "80") + url += ":" + request.serverPort(); + url += request.path(); + + // remove '/feed/' + url.erase(url.length() - 6); + } + + response.out() << + "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<rss version=\"2.0\">\n" + " <channel>\n" + " <title>" << title_ << "\n" + " " << url << "\n" + " " << description_ << "\n"; + + dbo::Transaction t(*session_); + + Posts posts = session_->find + ("where state = ? " + "order by date desc " + "limit 10").bind(Post::Published); + + for (Posts::const_iterator i = posts.begin(); i != posts.end(); ++i) { + dbo::ptr post = *i; + + std::string permaLink = url + "/" + post->permaLink(); + + response.out() << + " \n" + " " << post->title.toUTF8() << "\n" + " " << post->date.toString("ddd, d MMM yyyy hh:mm:ss UTC") + << "\n" + " " << permaLink << "\n"; + + std::string description = post->briefHtml.toUTF8(); + if (!post->bodySrc.empty()) + description += + "

Read the rest...

"; + + response.out() << + " \n" + "
\n"; + } + + response.out() << + " \n" + "\n"; + + t.commit(); +} diff --git a/wt-3.1.7a/examples/blog/BlogRSSFeed.h b/wt-3.1.7a/examples/blog/BlogRSSFeed.h new file mode 100644 index 0000000..faa4bea --- /dev/null +++ b/wt-3.1.7a/examples/blog/BlogRSSFeed.h @@ -0,0 +1,33 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef BLOG_RSS_FEED_H_ +#define BLOG_RSS_FEED_H_ + +#include + +class BlogSession; + +class BlogRSSFeed : public Wt::WResource +{ +public: + BlogRSSFeed(const std::string& sqliteDb, + const std::string& title, + const std::string& url, + const std::string& description); + virtual ~BlogRSSFeed(); + +protected: + virtual void handleRequest(const Wt::Http::Request &request, + Wt::Http::Response &response); + +private: + BlogSession *session_; + + std::string title_, url_, description_; +}; + +#endif // BLOG_RSS_FEED_H_ diff --git a/wt-3.1.7a/examples/blog/BlogSession.C b/wt-3.1.7a/examples/blog/BlogSession.C new file mode 100644 index 0000000..0443632 --- /dev/null +++ b/wt-3.1.7a/examples/blog/BlogSession.C @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "BlogSession.h" +#include "asciidoc/asciidoc.h" + +#include "model/Comment.h" +#include "model/Post.h" +#include "model/Tag.h" +#include "model/User.h" + +namespace dbo = Wt::Dbo; + +BlogSession::BlogSession(const std::string& sqliteDb) + : connection_(sqliteDb) +{ + setConnection(connection_); + + mapClass("post"); + mapClass("comment"); + mapClass("user"); + mapClass("tag"); + + try { + dbo::Transaction t(*this); + createTables(); + + dbo::ptr admin = add(new User()); + User *a = admin.modify(); + a->name = "admin"; + a->role = User::Admin; + a->setPassword("admin"); + + dbo::ptr post = add(new Post()); + Post *p = post.modify(); + + p->state = Post::Published; + p->author = admin; + p->title = "Welcome!"; + p->briefSrc = "Welcome to your own blog."; + p->bodySrc = "We have created for you an admin user with password admin"; + p->briefHtml = asciidoc(p->briefSrc); + p->bodyHtml = asciidoc(p->bodySrc); + p->date = Wt::WDateTime::currentDateTime(); + + dbo::ptr rootComment = add(new Comment()); + rootComment.modify()->post = post; + + t.commit(); + + std::cerr << "Created database, and admin/admin user"; + } catch (std::exception& e) { + std::cerr << e.what() << std::endl; + std::cerr << "Using existing database"; + } +} + +void BlogSession::setUser(dbo::ptr user) +{ + user_ = user; +} diff --git a/wt-3.1.7a/examples/blog/BlogSession.h b/wt-3.1.7a/examples/blog/BlogSession.h new file mode 100644 index 0000000..a356efe --- /dev/null +++ b/wt-3.1.7a/examples/blog/BlogSession.h @@ -0,0 +1,37 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef BLOG_SESSION_H_ +#define BLOG_SESSION_H_ + +#include +#include +#include +#include + +namespace dbo = Wt::Dbo; + +class Comment; +class Post; +class User; + +class BlogSession : public dbo::Session +{ +public: + BlogSession(const std::string& sqliteDb); + + void setUser(dbo::ptr user); + dbo::ptr user() const { return user_; } + + Wt::Signal< dbo::ptr >& commentsChanged() { return commentsChanged_; } + +private: + dbo::backend::Sqlite3 connection_; + dbo::ptr user_; + Wt::Signal< dbo::ptr > commentsChanged_; +}; + +#endif // BLOG_SESSION_H_ diff --git a/wt-3.1.7a/examples/blog/CMakeLists.txt b/wt-3.1.7a/examples/blog/CMakeLists.txt new file mode 100644 index 0000000..588b496 --- /dev/null +++ b/wt-3.1.7a/examples/blog/CMakeLists.txt @@ -0,0 +1,42 @@ +INCLUDE(CheckFunctionExists) +INCLUDE(CheckLibraryExists) + +IF(ASCIIDOC_EXECUTABLE) + ADD_DEFINITIONS(-DASCIIDOC_EXECUTABLE="${ASCIIDOC_EXECUTABLE}") +ENDIF(ASCIIDOC_EXECUTABLE) + +WT_ADD_EXAMPLE(blog.wt + model/Post.C + model/Comment.C + model/User.C + model/Tag.C + view/PostView.C + view/CommentView.C + view/BlogView.C + view/EditUsers.C + asciidoc/asciidoc.C + BlogSession.C + BlogRSSFeed.C + blog.C +) + +TARGET_LINK_LIBRARIES(blog.wt wtdbo wtdbosqlite3) + +# Test whether crypt(3) is provided by libc. If it's not, check if +# libcrypt exists and if it provides crypt(3). +CHECK_FUNCTION_EXISTS(crypt CRYPT_EXISTS) +IF(NOT CRYPT_EXISTS) + CHECK_LIBRARY_EXISTS(crypt crypt "" CRYPT_LIB_EXISTS) + IF(CRYPT_LIB_EXISTS) + SET(CMAKE_REQUIRED_LIBRARIES "crypt") + CHECK_FUNCTION_EXISTS(crypt CRYPT_EXISTS) + ENDIF(CRYPT_LIB_EXISTS) +ENDIF(NOT CRYPT_EXISTS) + +IF(CRYPT_LIB_EXISTS) + TARGET_LINK_LIBRARIES(blog.wt crypt) +ENDIF(CRYPT_LIB_EXISTS) + +INCLUDE_DIRECTORIES( + ${WT_SOURCE_DIR}/src +) diff --git a/wt-3.1.7a/examples/blog/asciidoc/asciidoc.C b/wt-3.1.7a/examples/blog/asciidoc/asciidoc.C new file mode 100644 index 0000000..f050bf6 --- /dev/null +++ b/wt-3.1.7a/examples/blog/asciidoc/asciidoc.C @@ -0,0 +1,94 @@ +#include "asciidoc.h" + +#include +#include +#include +#include +#include + +#include "Wt/WString" + +using namespace Wt; + +namespace { + +std::string tempFileName() +{ +#ifndef WIN32 + char spool[20]; + strcpy(spool, "/tmp/wtXXXXXX"); + + int i = mkstemp(spool); + close(i); +#else + char spool[2 * L_tmpnam]; + tmpnam(spool); +#endif + return std::string(spool); +} + +std::string readFileToString(const std::string& fileName) +{ + std::fstream file (fileName.c_str(), std::ios::in | std::ios::binary); + file.seekg(0, std::ios::end); + int length = file.tellg(); + file.seekg(0, std::ios::beg); + + boost::scoped_array buf(new char[length]); + file.read(buf.get(), length); + file.close(); + + return std::string(buf.get(), length); +} + +} + +WString asciidoc(const Wt::WString& src) +{ + std::string srcFileName = tempFileName(); + std::string htmlFileName = tempFileName(); + + { + std::ofstream srcFile(srcFileName.c_str(), std::ios::out); + std::string ssrc = src.toUTF8(); + srcFile.write(ssrc.c_str(), (std::streamsize)ssrc.length()); + srcFile.close(); + } + +#if defined(ASCIIDOC_EXECUTABLE) +#define xstr(s) str(s) +#define str(s) #s + std::string cmd = xstr(ASCIIDOC_EXECUTABLE); +#else + std::string cmd = "asciidoc"; +#endif + std::string command = cmd + " -o " + htmlFileName + " -s " + srcFileName; + +#ifndef WIN32 + /* + * So, asciidoc apparently sends a SIGINT which is caught by its parent + * process.. So we have to temporarily ignore it. + */ + struct sigaction newAction, oldAction; + newAction.sa_handler = SIG_IGN; + newAction.sa_flags = 0; + sigemptyset(&newAction.sa_mask); + sigaction(SIGINT, &newAction, &oldAction); +#endif + bool ok = system(command.c_str()) == 0; +#ifndef WIN32 + sigaction(SIGINT, &oldAction, 0); +#endif + + WString result; + + if (ok) { + result = WString::fromUTF8(readFileToString(htmlFileName)); + } else + result = WString::fromUTF8("Could not execute asciidoc"); + + unlink(srcFileName.c_str()); + unlink(htmlFileName.c_str()); + + return result; +} diff --git a/wt-3.1.7a/examples/blog/asciidoc/asciidoc.h b/wt-3.1.7a/examples/blog/asciidoc/asciidoc.h new file mode 100644 index 0000000..0280d1c --- /dev/null +++ b/wt-3.1.7a/examples/blog/asciidoc/asciidoc.h @@ -0,0 +1,10 @@ +#ifndef ASCIIDOC_H_ +#define ASCIIDOC_H_ + +namespace Wt { + class WString; +} + +extern Wt::WString asciidoc(const Wt::WString& src); + +#endif // ASCIIDOC_H_ diff --git a/wt-3.1.7a/examples/blog/blog.C b/wt-3.1.7a/examples/blog/blog.C new file mode 100644 index 0000000..6603e67 --- /dev/null +++ b/wt-3.1.7a/examples/blog/blog.C @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2009 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#include +#include +#include + +#include "view/BlogView.h" +#include "BlogRSSFeed.h" + +using namespace Wt; + +static const char *FeedUrl = "/blog/feed/"; +static const char *BlogUrl = "/blog"; + +class BlogApplication : public WApplication +{ +public: + BlogApplication(const WEnvironment& env) + : WApplication(env) + { + root()->addWidget(new BlogView("/", + WApplication::appRoot() + "blog.db", FeedUrl)); + useStyleSheet("css/blogexample.css"); + } +}; + +WApplication *createApplication(const WEnvironment& env) +{ + return new BlogApplication(env); +} + +int main(int argc, char **argv) +{ + try { + WServer server(argv[0]); + + server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION); + + BlogRSSFeed rssFeed(server.appRoot() + "blog.db", "Wt blog example", + "", "It's just an example."); + + server.addResource(&rssFeed, FeedUrl); + server.addEntryPoint(Application, createApplication, BlogUrl); + + std::cerr << "\n\n -- Warning: Example is deployed at '" + << BlogUrl << "'\n\n"; + + if (server.start()) { + WServer::waitForShutdown(); + server.stop(); + } + } catch (Wt::WServer::Exception& e) { + std::cerr << e.what() << std::endl; + } catch (std::exception &e) { + std::cerr << "exception: " << e.what() << std::endl; + } +} + diff --git a/wt-3.1.7a/examples/blog/blog.xml b/wt-3.1.7a/examples/blog/blog.xml new file mode 100644 index 0000000..c8d4e29 --- /dev/null +++ b/wt-3.1.7a/examples/blog/blog.xml @@ -0,0 +1,261 @@ + + + + + + + +

Registered users

+ ${user-list} + Limit list to user names containing : ${limit-edit} ${limit-button} +
+ + +
+

Edit user ${username}

+ ${role-button} +
+
+ + +

Editing user ${user}

+ ${save-button} ${cancel-button} +
+ + +
+

This user id is invalid

+
+
+ + +
+

You need to log to access this function

+
+
+ + +
+

You need to be administrator to access this function

+
+
+ + +

Register

+

+ To register as a user to post comments with your own login, + please fill out the following form. +

+ + + + + + + + + + + + + + + + + + + + + + + +
Login:${name}
Password:${passwd}
Repeat password:${passwd2}
+ ${ok-button} + ${cancel-button} +
+
+ + +
+

Registered users

+ Search for ${searchstring} ${search-button}
+
+
+ + +
+

Profile panel for ${user}

+ + + + + + + + + + + + + + + +
New password:${passwd}
Repeat password:${passwd2}
+ ${ok-button} + ${cancel-button} +
+
+
+ + +
+

Author panel for ${user}

+ Statistics: +
    +
  • ${unpublished-count} unpublished post(s)
  • +
  • ${published-count} published post(s)
  • +
+ ${new-post} + ${unpublished-posts} +
+
+ + + + + + +

${title}

+
+
by ${author} on ${date}
+
+ ${brief+body} +
+
${comment-count}
+
+ ${publish} ${edit} ${delete} +
+
+
+ ${comments} +
+
+ + +

${title}

+
by ${author} on ${date}
+
+ ${brief} +
+
${read-more}
+
+ ${publish} ${edit} ${delete} +
+
${comment-count}
+
+ + +

+
+
Title: ${title-edit}
+
${brief-edit}
+
${body-edit}
+
+ ${save} ${cancel} +
+
+
+ + +
+
+
+ ${author} + ${date} ${collapse-expand} +
+ ${contents} + + ${children} +
+ + + + + ${children} + + + +
+
+
${area}
+
plain text or (<code>...</code>)
+ ${save} + ${cancel} +
+ + + +

No posts found

+ Sorry, no blog posts found that match your selection. +
+ + +

No author

+ Sorry, {1} is not a registered blog author. +
+ + Login + Login too short (must be at least {1} characters) + Passwords don't match. + Register + Logout + Profile + Authoring panel + Edit users + Add comment + Reply + Edit + Delete + [[Comment deleted]] + Read the rest of this post >> + New post + Publish + Retract + Delete + Edit + Save + Cancel + Search + Demote this administrator to a regular visitor + Promote this user to administrator + No users found + diff --git a/wt-3.1.7a/examples/blog/css/asciidoc.css b/wt-3.1.7a/examples/blog/css/asciidoc.css new file mode 100644 index 0000000..68e69d3 --- /dev/null +++ b/wt-3.1.7a/examples/blog/css/asciidoc.css @@ -0,0 +1,294 @@ +.asciidoc em { + font-style: italic; + color: #111111; +} + +.asciidoc strong { + font-weight: bold; + color: #111111; +} + +.asciidoc tt { + color: #111111; +} + +.asciidoc h1, .asciidoc h2, .asciidoc h3, .asciidoc h4, .asciidoc h5, .asciidoc h6 { + color: #111111; + font-family: sans-serif; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +.asciidoc h1, .asciidoc h2, .asciidoc h3 { + border-bottom: 2px solid silver; +} + +.asciidoc h2 { + padding-top: 0.5em; +} + +.asciidoc h3 { + float: left; +} + +.asciidoc h3 + * { + clear: left; +} + +.asciidoc div.sectionbody { + font-family: serif; + margin-left: 0; +} + +.asciidoc hr { + border: 1px solid silver; +} + +.asciidoc p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.asciidoc ul, .asciidoc ol, .asciidoc li > p { + margin-top: 0; +} + +.asciidoc pre { + padding: 0; + margin: 0; + line-height: 13px; +} + +.asciidoc div.tableblock, .asciidoc div.imageblock, .asciidoc div.exampleblock, +.asciidoc div.verseblock, .asciidoc div.quoteblock, .asciidoc div.literalblock, +.asciidoc div.listingblock, .asciidoc div.sidebarblock, +.asciidoc div.admonitionblock { + margin-top: 1.5em; + margin-bottom: 1.5em; +} + +.asciidoc div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +.asciidoc div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +.asciidoc div.title, .asciidoc caption.title, .asciidoc div.sidebar-title { + color: #111111; + font-family: sans-serif; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +.asciidoc div.title + * { + margin-top: 0; +} + +.asciidoc td div.title:first-child { + margin-top: 0.0em; +} +.asciidoc div.content div.title:first-child { + margin-top: 0.0em; +} +.asciidoc div.content + div.title { + margin-top: 0.0em; +} + +.asciidoc div.sidebarblock > div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +.asciidoc div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +.asciidoc div.quoteblock { + padding-left: 2.0em; + margin-right: 10%; +} +.asciidoc div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +.asciidoc div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +.asciidoc div.verseblock > div.content { + white-space: pre; +} +.asciidoc div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +.asciidoc div.verseblock + div.attribution { + text-align: left; +} + +.asciidoc div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #111111; + padding-right: 0.5em; +} +.asciidoc div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +.asciidoc div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +.asciidoc div.imageblock div.content { padding-left: 0; } +.asciidoc span.image img { border-style: none; } +.asciidoc a.image:visited { color: white; } + +.asciidoc dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +.asciidoc dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: #111111; +} +.asciidoc dd > *:first-child { + margin-top: 0.1em; +} + +.asciidoc ul, ol { + list-style-position: outside; +} +.asciidoc ol.arabic { + list-style-type: decimal; +} +.asciidoc ol.loweralpha { + list-style-type: lower-alpha; +} +.asciidoc ol.upperalpha { + list-style-type: upper-alpha; +} +.asciidoc ol.lowerroman { + list-style-type: lower-roman; +} +.asciidoc ol.upperroman { + list-style-type: upper-roman; +} + +.asciidoc div.compact ul, .asciidoc div.compact ol, +.asciidoc div.compact p, .asciidoc div.compact p, +.asciidoc div.compact div, .asciidoc div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +.asciidoc div.tableblock > table { + border: 3px solid #527bbd; +} +.asciidoc thead { + font-family: sans-serif; + font-weight: bold; +} +.asciidoc tfoot { + font-weight: bold; +} +.asciidoc td > div.verse { + white-space: pre; +} +.asciidoc p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +.asciidoc div.tableblock > table[frame="void"] { + border-style: none; +} +.asciidoc div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +.asciidoc div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +.asciidoc div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +.asciidoc div.hdlist tr { + padding-bottom: 15px; +} +.asciidoc dt.hdlist1.strong, .asciidoc td.hdlist1.strong { + font-weight: bold; +} +.asciidoc td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: #111111; +} +.asciidoc td.hdlist2 { + vertical-align: top; +} +.asciidoc div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.asciidoc .comment { + background: yellow; +} + +@media print { + div#footer-badges { display: none; } +} + +.asciidoc div#toctitle { + color: #111111; + font-family: sans-serif; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +.asciidoc div.toclevel1, +.asciidoc div.toclevel2, +.asciidoc div.toclevel3, +.asciidoc div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} + +.asciidoc div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} + +.asciidoc div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} + +.asciidoc div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} diff --git a/wt-3.1.7a/examples/blog/css/blog.css b/wt-3.1.7a/examples/blog/css/blog.css new file mode 100644 index 0000000..903449f --- /dev/null +++ b/wt-3.1.7a/examples/blog/css/blog.css @@ -0,0 +1,114 @@ +.login-box { + margin-bottom: -10px; + height: 25px; +} + +.user-menu { + float: left; + width: 40%; +} + +.login-menu { + text-align: right; + float: right; + width: 60%; +} + +.link { + text-decoration: underline; + cursor: pointer; cursor: hand; +} + +.invalid { + background-color: #EE9999; +} + +.comment-icon { + float: left; + margin-top: 3px; + width: 20px; + height: 20px; + background-image: url(comment.png); + background-repeat: no-repeat; +} + +.comment-edit-icon { + float: left; + margin-top: 3px; + width: 20px; + height: 20px; + background-image: url(comment_edit.png); + background-repeat: no-repeat; +} + +.comment-info { + color: rgb(136,136,136); +} + +.poster { + color: rgb(51, 102, 53); + font-weight: bold; +} + +.author-panel { + margin-top: 10px; + border: 1px #528B12 dashed; + padding: 5px; +} + +.user-editor { + margin-top: 10px; + border: 1px #528B12 dashed; + padding: 5px; +} + +.profile-panel { + margin-top: 10px; + border: 1px #528B12 dashed; + padding: 5px; +} + +.comment-body { + overflow: hidden; /* trick that makes alignment work properly */ + margin-left: 3px; +} + +.comment-body .vspace { + margin: 10px 0px; +} + +.comment-body pre { + line-height: 140%; + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +.comment-edit { + width: 400px; +} + +.comment-edit textarea { + width: 396px; +} + +.comment-links { + margin-bottom: 3px; +} + +.blogpost-edit { + width: 500px; + margin: 10x; +} + +.blogpost-edit div { + margin: 5px 0px; +} +.blogpost-edit input { + width: 450px; +} + +.blogpost-edit textarea { + width: 496px; + height: 150px; +} diff --git a/wt-3.1.7a/examples/blog/css/blogexample.css b/wt-3.1.7a/examples/blog/css/blogexample.css new file mode 100644 index 0000000..1b48df3 --- /dev/null +++ b/wt-3.1.7a/examples/blog/css/blogexample.css @@ -0,0 +1,57 @@ +body { + color: #333333; + font-family: arial,sans-serif; + font-size: 80%; + font-size-adjust:none; + font-stretch:normal; + font-style:normal; + font-variant:normal; + font-weight:normal; + line-height:1.5em; + background-color:#FFF; + min-width:750px; + overflow-x: hidden; +} + +a { + text-decoration: underline; + color: #528B12; /*#70BD1A;*/ +} + +.link { + color: #528B12; /*#70BD1A;*/ +} + +a.blank { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +h4 { + font-size: 1.3em; + line-height: 1.8; + border-top : 1px solid #528B12; + padding-bottom:10px; + margin-top:15px; + color: #528B12; + display: block; + } + +p { + font-size: 1.1em; + font-weight: normal; + line-height: 1.4; + margin-bottom : 15px; + color: #333333; + } +p.intro { + font-size: 1.3em; + font-weight: normal; + line-height: 1.4; + padding-bottom : 15px; + color: #333333; + } + diff --git a/wt-3.1.7a/examples/blog/css/comment.png b/wt-3.1.7a/examples/blog/css/comment.png new file mode 100644 index 0000000..7bc9233 Binary files /dev/null and b/wt-3.1.7a/examples/blog/css/comment.png differ diff --git a/wt-3.1.7a/examples/blog/css/comment_edit.png b/wt-3.1.7a/examples/blog/css/comment_edit.png new file mode 100644 index 0000000..73db110 Binary files /dev/null and b/wt-3.1.7a/examples/blog/css/comment_edit.png differ diff --git a/wt-3.1.7a/examples/blog/css/rss.png b/wt-3.1.7a/examples/blog/css/rss.png new file mode 100644 index 0000000..09e756e Binary files /dev/null and b/wt-3.1.7a/examples/blog/css/rss.png differ diff --git a/wt-3.1.7a/examples/blog/model/Comment.C b/wt-3.1.7a/examples/blog/model/Comment.C new file mode 100644 index 0000000..b504d21 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Comment.C @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "Comment.h" +#include "Post.h" +#include "User.h" +#include "Tag.h" + +#include +#include + +DBO_INSTANTIATE_TEMPLATES(Comment); + +namespace { + std::string& replace(std::string& s, const std::string& k, + const std::string& r) + { + std::string::size_type p = 0; + + while ((p = s.find(k, p)) != std::string::npos) { + s.replace(p, k.length(), r); + p += r.length(); + } + + return s; + } +} + +void Comment::setText(const Wt::WString& src) +{ + textSrc_ = src; + + std::string html = Wt::WWebWidget::escapeText(src, true).toUTF8(); + + std::string::size_type b = 0; + + // Replace <code>...</code> with
...
+ // This is kind of very ad-hoc! + + while ((b = html.find("<code>", b)) != std::string::npos) { + std::string::size_type e = html.find("</code>", b); + if (e == std::string::npos) + break; + else { + if (b > 6 && html.substr(b - 6, 6) == "
") { + html.erase(b - 6, 6); + b -= 6; + e -= 6; + } + + html.replace(b, 12, "
");
+      e -= 7;
+
+      if (html.substr(b + 5, 6) == "
") { + html.erase(b + 5, 6); + e -= 6; + } + + if (html.substr(e - 6, 6) == "
") { + html.erase(e - 6, 6); + e -= 6; + } + + html.replace(e, 13, "
"); + e += 6; + + if (e + 6 <= html.length() && html.substr(e, 6) == "
") { + html.erase(e, 6); + e -= 6; + } + + b = e; + } + } + + // We would also want to replace

(empty line) with + //
+ replace(html, "

", "
"); + + textHtml_ = Wt::WString::fromUTF8(html); +} + +void Comment::setDeleted() +{ + textHtml_ = Wt::WString::tr("comment-deleted"); +} diff --git a/wt-3.1.7a/examples/blog/model/Comment.h b/wt-3.1.7a/examples/blog/model/Comment.h new file mode 100644 index 0000000..35ea085 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Comment.h @@ -0,0 +1,60 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef COMMENT_H_ +#define COMMENT_H_ + +#include + +#include +#include + +class Comment; +class Post; +class User; + +namespace dbo = Wt::Dbo; + +typedef dbo::collection > Comments; + +class Comment { +public: + dbo::ptr author; + dbo::ptr post; + dbo::ptr parent; + + Wt::WDateTime date; + + void setText(const Wt::WString& text); + void setDeleted(); + + const Wt::WString& textSrc() const { return textSrc_; } + const Wt::WString& textHtml() const { return textHtml_; } + + Comments children; + + template + void persist(Action& a) + { + dbo::field(a, date, "date"); + dbo::field(a, textSrc_, "text_source"); + dbo::field(a, textHtml_, "text_html"); + + dbo::belongsTo(a, post, "post"); + dbo::belongsTo(a, author, "author"); + dbo::belongsTo(a, parent, "parent"); + + dbo::hasMany(a, children, dbo::ManyToOne, "parent"); + } + +private: + Wt::WString textSrc_; + Wt::WString textHtml_; +}; + +DBO_EXTERN_TEMPLATES(Comment); + +#endif // COMMENT_H_ diff --git a/wt-3.1.7a/examples/blog/model/Post.C b/wt-3.1.7a/examples/blog/model/Post.C new file mode 100644 index 0000000..c73dad1 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Post.C @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include + +#include "Post.h" +#include "Comment.h" +#include "User.h" +#include "Tag.h" + +#include + +DBO_INSTANTIATE_TEMPLATES(Post); + +std::string Post::permaLink() const +{ + return date.toString("yyyy/MM/dd/'" + titleToUrl() + '\'').toUTF8(); +} + +std::string Post::commentCount() const +{ + int count = (int)comments.size() - 1; + if (count == 1) + return "1 comment"; + else + return boost::lexical_cast(count) + " comments"; +} + +dbo::ptr Post::rootComment() const +{ + if (session()) + return session()->find() + .where("post_id = ?").bind(id()) + .where("parent_id is null"); + else + return dbo::ptr(); +} + +std::string Post::titleToUrl() const +{ + std::string result = title.narrow(); + for (unsigned i = 0; i < result.length(); ++i) { + if (!isalnum(result[i])) + result[i] = '_'; + else + result[i] = tolower(result[i]); + } + + return result; +} diff --git a/wt-3.1.7a/examples/blog/model/Post.h b/wt-3.1.7a/examples/blog/model/Post.h new file mode 100644 index 0000000..5f37198 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Post.h @@ -0,0 +1,71 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef POST_H_ +#define POST_H_ + +#include +#include + +#include +#include + +#include "Comment.h" +#include "Tag.h" + +class User; + +namespace dbo = Wt::Dbo; + +typedef dbo::collection< dbo::ptr > Comments; +typedef dbo::collection< dbo::ptr > Tags; + +class Post : public dbo::Dbo { +public: + enum State { + Unpublished = 0, + Published = 1 + }; + + dbo::ptr author; + State state; + + Wt::WDateTime date; + Wt::WString title; + Wt::WString briefSrc; + Wt::WString briefHtml; + Wt::WString bodySrc; + Wt::WString bodyHtml; + + Comments comments; + Tags tags; + + std::string permaLink() const; + std::string commentCount() const; + dbo::ptr rootComment() const; + std::string titleToUrl() const; + + template + void persist(Action& a) + { + dbo::field(a, state, "state"); + dbo::field(a, date, "date"); + dbo::field(a, title, "title"); + dbo::field(a, briefSrc, "brief_src"); + dbo::field(a, briefHtml, "brief_html"); + dbo::field(a, bodySrc, "body_src"); + dbo::field(a, bodyHtml, "body_html"); + + dbo::belongsTo(a, author, "author"); + + dbo::hasMany(a, comments, dbo::ManyToOne, "post"); + dbo::hasMany(a, tags, dbo::ManyToMany, "post_tag"); + } +}; + +DBO_EXTERN_TEMPLATES(Post); + +#endif // POST_H_ diff --git a/wt-3.1.7a/examples/blog/model/Tag.C b/wt-3.1.7a/examples/blog/model/Tag.C new file mode 100644 index 0000000..f9f5537 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Tag.C @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "Tag.h" +#include "Post.h" +#include "User.h" +#include "Comment.h" + +#include + +DBO_INSTANTIATE_TEMPLATES(Tag); + diff --git a/wt-3.1.7a/examples/blog/model/Tag.h b/wt-3.1.7a/examples/blog/model/Tag.h new file mode 100644 index 0000000..b66c041 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/Tag.h @@ -0,0 +1,39 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef TAG_H_ +#define TAG_H_ + +#include + +class Post; + +namespace dbo = Wt::Dbo; + +typedef dbo::collection< dbo::ptr > Posts; + +class Tag { +public: + Tag() { } + Tag(const std::string& aName) + : name(aName) { } + + std::string name; + + Posts posts; + + template + void persist(Action& a) + { + dbo::field(a, name, "name"); + + dbo::hasMany(a, posts, dbo::ManyToMany, "post_tag"); + } +}; + +DBO_EXTERN_TEMPLATES(Tag); + +#endif // TAG_H_ diff --git a/wt-3.1.7a/examples/blog/model/User.C b/wt-3.1.7a/examples/blog/model/User.C new file mode 100644 index 0000000..d334061 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/User.C @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef WIN32 +#define _XOPEN_SOURCE +#include +#endif + +#include "User.h" +#include "Comment.h" +#include "Post.h" +#include "Tag.h" + +#include + +#ifndef WIN32 +#ifndef __CYGWIN__ +#define HAVE_CRYPT +#endif +#endif + +DBO_INSTANTIATE_TEMPLATES(User); + +#ifdef HAVE_CRYPT +namespace { + std::string generateSalt() { + /* Salt generation from glibc manual */ + unsigned long seed[2]; + char salt[] = "$1$........"; + const char *const seedchars = + "./0123456789ABCDEFGHIJKLMNOPQRST" + "UVWXYZabcdefghijklmnopqrstuvwxyz"; + + /* Generate a (not very) random seed. */ + seed[0] = time(NULL); + seed[1] = getpid() ^ (seed[0] >> 14 & 0x30000); + + /* Turn it into printable characters from `seedchars'. */ + for (int i = 0; i < 8; i++) + salt[3+i] = seedchars[(seed[i/5] >> (i%5)*6) & 0x3f]; + + return salt; + } + + std::string md5(const std::string& s, const std::string& salt) { + return crypt(s.c_str(), salt.c_str()); + } +} +#endif + +void User::setPassword(const std::string& password) +{ +#ifdef HAVE_CRYPT + password_ = md5(password, generateSalt()); +#else + // This needs some improvement for production use + password_ = password; +#endif +} + +bool User::authenticate(const std::string& password) const +{ +#ifdef HAVE_CRYPT + return md5(password, password_) == password_; +#else + return password_ == password; +#endif +} + +Posts User::latestPosts(int count) const +{ + return posts.find().where("state = ?").bind(Post::Published) + .orderBy("date desc") + .limit(count); +} + +Posts User::allPosts(Post::State state) const +{ + return posts.find().where("state = ?").bind(state) + .orderBy("date desc"); +} diff --git a/wt-3.1.7a/examples/blog/model/User.h b/wt-3.1.7a/examples/blog/model/User.h new file mode 100644 index 0000000..77fb531 --- /dev/null +++ b/wt-3.1.7a/examples/blog/model/User.h @@ -0,0 +1,57 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef USER_H_ +#define USER_H_ + +#include + +#include "Post.h" + +class Comment; + +namespace dbo = Wt::Dbo; + +typedef dbo::collection< dbo::ptr > Comments; +typedef dbo::collection< dbo::ptr > Posts; + +class User { +public: + enum Role { + Visitor = 0, + Admin = 1 + }; + + std::string name; + Role role; + + Comments comments; + Posts posts; + + Posts latestPosts(int count = 10) const; + Posts allPosts(Post::State state) const; + + void setPassword(const std::string& password); + bool authenticate(const std::string& password) const; + + template + void persist(Action& a) + { + dbo::field(a, name, "name"); + dbo::field(a, password_, "password"); + dbo::field(a, role, "role"); + + dbo::hasMany(a, comments, dbo::ManyToOne, "author"); + dbo::hasMany(a, posts, dbo::ManyToOne, "author"); + } + +private: + std::string password_; +}; + +DBO_EXTERN_TEMPLATES(User); + +#endif // USER_H_ diff --git a/wt-3.1.7a/examples/blog/view/BlogView.C b/wt-3.1.7a/examples/blog/view/BlogView.C new file mode 100644 index 0000000..db2ec84 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/BlogView.C @@ -0,0 +1,582 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "PostView.h" +#include "BlogView.h" +#include "EditUsers.h" + +#include "../BlogSession.h" + +#include "../model/Comment.h" +#include "../model/Post.h" +#include "../model/Tag.h" +#include "../model/User.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +using namespace Wt; +namespace dbo = Wt::Dbo; + +class BlogImpl : public WContainerWidget +{ +public: + BlogImpl(const std::string& basePath, const std::string& sqliteDb, + const std::string& rssFeedUrl) + : basePath_(basePath), + rssFeedUrl_(rssFeedUrl), + session_(sqliteDb), + panel_(0), + register_(0), + profile_(0), + authorPanel_(0), + users_(0), + userEditor_(0), + mustLoginWarning_(0), + mustBeAdministratorWarning_(0), + invalidUser_(0) + { + WApplication *app = wApp; + + app->messageResourceBundle().use(WApplication::appRoot() + "blog"); + app->useStyleSheet("css/blog.css"); + app->useStyleSheet("css/asciidoc.css"); + app->internalPathChanged().connect(this, &BlogImpl::handlePathChange); + login_ = new WTemplate(this); + panel_ = new WStackedWidget(this); + items_ = new WContainerWidget(this); + + init(); + } + + ~BlogImpl() { + clear(); + } + +private: + std::string basePath_, rssFeedUrl_; + BlogSession session_; + + WTemplate *login_; + WStackedWidget* panel_; + WTemplate *register_; + WTemplate *profile_; + WTemplate *authorPanel_; + EditUsers *users_; + EditUser *userEditor_; + WTemplate *mustLoginWarning_; + WTemplate *mustBeAdministratorWarning_; + WTemplate *invalidUser_; + WContainerWidget *items_; + + void logout() { + if (boost::starts_with(wApp->internalPath(), basePath_ + "author/")) + wApp->setInternalPath(basePath_, true); + + init(); + } + + void init() { + session_.setUser(dbo::ptr()); + refresh(); + panel_->hide(); + + login_->clear(); + login_->setTemplateText(tr("blog-login")); + + WLineEdit *name = new WLineEdit(); + WLineEdit *passwd = new WLineEdit(); + WPushButton *loginButton = new WPushButton(tr("login")); + + passwd->setEchoMode(WLineEdit::Password); + passwd->enterPressed().connect(this, &BlogImpl::login); + loginButton->clicked().connect(this, &BlogImpl::login); + + name->hide(); + passwd->hide(); + loginButton->hide(); + + WText *loginLink = new WText(tr("login")); + loginLink->setStyleClass("link"); + + loginLink->clicked().connect(name, &WWidget::show); + loginLink->clicked().connect(passwd, &WWidget::show); + loginLink->clicked().connect(loginButton, &WWidget::show); + loginLink->clicked().connect(loginLink, &WWidget::hide); + loginLink->clicked().connect(name, &WFormWidget::setFocus); + + WText *registerLink = new WText(tr("register")); + registerLink->setStyleClass("link"); + + registerLink->clicked().connect(this, &BlogImpl::newUser); + + login_->bindWidget("name", name); + login_->bindWidget("passwd", passwd); + login_->bindWidget("login-button", loginButton); + login_->bindWidget("login-link", loginLink); + login_->bindWidget("register-link", registerLink); + login_->bindString("feed-url", rssFeedUrl_); + } + + void login() { + WLineEdit *name = login_->resolve("name"); + WLineEdit *passwd = login_->resolve("passwd"); + + dbo::Transaction t(session_); + + dbo::ptr user + = session_.find("where name = ?").bind(name->text()); + + if (user) { + if (user->authenticate(passwd->text().toUTF8())) { + loginAs(user); + } else { + name->setStyleClass(""); + passwd->setStyleClass("invalid"); + } + } else + name->setStyleClass("invalid"); + + t.commit(); + } + + void loginAs(dbo::ptr user) { + session_.setUser(user); + + if (user->role == User::Admin) + wApp->setInternalPath(basePath_ + "author/" + user->name, true); + + refresh(); + + login_->clear(); + login_->setTemplateText(tr("blog-logout")); + + cancelRegister(); + + WText *profileLink = new WText(tr("profile")); + profileLink->setStyleClass("link"); + profileLink->clicked().connect(this, &BlogImpl::editProfile); + + if (user->role == User::Admin) { + WText *editUsersLink = new WText(tr("edit-users")); + editUsersLink->setStyleClass("link"); + editUsersLink->clicked().connect(SLOT(this, BlogImpl::editUsers)); + login_->bindWidget("userlist-link", editUsersLink); + WText *authorPanelLink = new WText(tr("author-post")); + authorPanelLink->setStyleClass("link"); + authorPanelLink->clicked().connect(SLOT(this, BlogImpl::authorPanel)); + login_->bindWidget("author-panel-link", authorPanelLink); + } + else + { + login_->bindWidget("userlist-link", new WText("")); + login_->bindWidget("author-panel-link", new WText("")); + } + + WText *logoutLink = new WText(tr("logout")); + logoutLink->setStyleClass("link"); + logoutLink->clicked().connect(this, &BlogImpl::logout); + + login_->bindString("feed-url", rssFeedUrl_); + login_->bindString("user", user->name); + login_->bindWidget("profile-link", profileLink); + login_->bindWidget("logout-link", logoutLink); + + bindPanelTemplates(); + } + + void newUser() { + if (!register_) { + register_ = new WTemplate(); + insertWidget(1, register_); + register_->setTemplateText(tr("blog-register")); + + WLineEdit *name = new WLineEdit(); + WLineEdit *passwd = new WLineEdit(); + WLineEdit *passwd2 = new WLineEdit(); + WPushButton *okButton = new WPushButton(tr("register")); + WPushButton *cancelButton = new WPushButton(tr("cancel")); + WText *error = new WText(); + + passwd->setEchoMode(WLineEdit::Password); + passwd2->setEchoMode(WLineEdit::Password); + + okButton->clicked().connect(this, &BlogImpl::doRegister); + cancelButton->clicked().connect(this, &BlogImpl::cancelRegister); + + register_->bindWidget("name", name); + register_->bindWidget("passwd", passwd); + register_->bindWidget("passwd2", passwd2); + register_->bindWidget("ok-button", okButton); + register_->bindWidget("cancel-button", cancelButton); + register_->bindWidget("error", error); + } + } + + void bindPanelTemplates() { + if (!session_.user()) return; + Wt::Dbo::Transaction t(session_); + if (authorPanel_) { + WPushButton *newPost = new WPushButton(tr("new-post")); + newPost->clicked().connect(SLOT(this, BlogImpl::newPost)); + WContainerWidget *unpublishedPosts = new WContainerWidget(); + showPosts(session_.user()->allPosts(Post::Unpublished), unpublishedPosts); + + authorPanel_->bindString("user", session_.user()->name); + authorPanel_->bindInt("unpublished-count", + (int)session_.user()->allPosts(Post::Unpublished).size()); + authorPanel_->bindInt("published-count", + (int)session_.user()->allPosts(Post::Published).size()); + authorPanel_->bindWidget("new-post", newPost); + authorPanel_->bindWidget("unpublished-posts", unpublishedPosts); + } + if (profile_) + profile_->bindString("user",session_.user()->name); + } + + void editUsers() { + panel_->show(); + if (!users_) { + users_ = new EditUsers(session_, basePath_); + panel_->addWidget(users_); + bindPanelTemplates(); + } + panel_->setCurrentWidget(users_); + } + + void authorPanel() { + panel_->show(); + if (!authorPanel_) + { + authorPanel_ = new WTemplate(tr("blog-author-panel")); + panel_->addWidget(authorPanel_); + bindPanelTemplates(); + } + panel_->setCurrentWidget(authorPanel_); + } + + void editProfile() { + panel_->show(); + if (!profile_) { + profile_ = new WTemplate(tr("blog-profile")); + panel_->addWidget(profile_); + bindPanelTemplates(); + + WLineEdit *passwd = new WLineEdit(); + WLineEdit *passwd2 = new WLineEdit(); + WPushButton *okButton = new WPushButton(tr("save")); + WPushButton *cancelButton = new WPushButton(tr("cancel")); + WText *error = new WText(); + + passwd->setEchoMode(WLineEdit::Password); + passwd2->setEchoMode(WLineEdit::Password); + okButton->clicked().connect(this, &BlogImpl::saveProfile); + cancelButton->clicked().connect(this, &BlogImpl::cancelProfile); + + profile_->bindWidget("passwd", passwd); + profile_->bindWidget("passwd2", passwd2); + profile_->bindWidget("ok-button", okButton); + profile_->bindWidget("cancel-button", cancelButton); + profile_->bindWidget("error", error); + } + panel_->setCurrentWidget(profile_); + } + + void cancelProfile() { + WLineEdit *passwd = profile_->resolve("passwd"); + WLineEdit *passwd2 = profile_->resolve("passwd2"); + WText *error = profile_->resolve("error"); + passwd->setText(WString()); + passwd2->setText(WString()); + error->setText(WString()); + panel_->hide(); + } + + void saveProfile() { + WLineEdit *passwd = profile_->resolve("passwd"); + WLineEdit *passwd2 = profile_->resolve("passwd2"); + WText *error = profile_->resolve("error"); + if (passwd->text().empty()) { + cancelProfile(); + return; + } + if (passwd->text() != passwd2->text()) { + error->setText(tr("passwd-mismatch")); + return; + } + dbo::Transaction t(session_); + session_.user().modify()->setPassword(passwd->text().toUTF8()); + t.commit(); + cancelProfile(); + } + + void doRegister() { + WLineEdit *name = register_->resolve("name"); + WLineEdit *passwd = register_->resolve("passwd"); + WLineEdit *passwd2 = register_->resolve("passwd2"); + WText *error = register_->resolve("error"); + + if (passwd->text() != passwd2->text()) { + error->setText(tr("passwd-mismatch")); + return; + } + + dbo::Transaction t(session_); + + dbo::ptr user + = session_.find("where name = ?").bind(name->text()); + + if (user) { + error->setText(tr("user-exists").arg(name->text())); + t.commit(); + return; + } else { + std::string n = name->text().toUTF8(); + boost::trim(n); + if (n.length() < 4) { + error->setText(tr("login-tooshort").arg(4)); + t.commit(); + return; + } + + user = session_.add(new User()); + + user.modify()->name = n; + user.modify()->role = User::Visitor; + user.modify()->setPassword(passwd->text().toUTF8()); + + loginAs(user); + } + + t.commit(); + } + + void cancelRegister() { + delete register_; + register_ = 0; + } + + void refresh() { + handlePathChange(wApp->internalPath()); + } + + void handlePathChange(const std::string& path) { + WApplication *app = wApp; + + if (app->internalPathMatches(basePath_)) { + dbo::Transaction t(session_); + + std::string path = app->internalPathNextPart(basePath_); + + items_->clear(); + profile_ = 0; + users_ = 0; + + if (path.empty()) + showPosts(session_.find + ("where state = ? " + "order by date desc " + "limit 10").bind(Post::Published), items_); + + else if (path == "author") { + std::string author = app->internalPathNextPart(basePath_ + path + '/'); + dbo::ptr user = findUser(author); + + if (user) + showPosts(user); + else + showError(tr("blog-no-author").arg(author)); + } else if (path == "edituser") { + editUser(app->internalPathNextPart(basePath_ + path + '/')); + } else { + std::string remainder = app->internalPath().substr(basePath_.length()); + showPostsByDateTopic(remainder, items_); + } + + t.commit(); + } + } + + void editUser(const std::string& ids) { + if (!checkLoggedIn()) return; + if (!checkAdministrator()) return; + dbo::dbo_traits::IdType id; + try { + id = boost::lexical_cast::IdType>(ids); + } catch (boost::bad_lexical_cast&) { + id = dbo::dbo_traits::invalidId(); + } + panel_->show(); + try { + dbo::Transaction t(session_); + dbo::ptr target(session_.load(id)); + if (!userEditor_) + panel_->addWidget(userEditor_ = new EditUser(session_)); + userEditor_->switchUser(target); + panel_->setCurrentWidget(userEditor_); + } + catch (Dbo::ObjectNotFoundException) { + if (!invalidUser_) + panel_->addWidget(invalidUser_ = new WTemplate(tr("blog-invaliduser"))); + panel_->setCurrentWidget(invalidUser_); + } + } + + bool checkLoggedIn() + { + if (session_.user()) return true; + panel_->show(); + if (!mustLoginWarning_) + panel_->addWidget(mustLoginWarning_ = new WTemplate(tr("blog-mustlogin"))); + panel_->setCurrentWidget(mustLoginWarning_); + return false; + } + + bool checkAdministrator() + { + if (session_.user() && (session_.user()->role == User::Admin)) return true; + panel_->show(); + if (!mustBeAdministratorWarning_) + panel_->addWidget(mustBeAdministratorWarning_ = new WTemplate(tr("blog-mustbeadministrator"))); + panel_->setCurrentWidget(mustBeAdministratorWarning_); + return false; + } + + dbo::ptr findUser(const std::string& name) { + return session_.find("where name = ?").bind(name); + } + + void showPostsByDateTopic(const std::string& path, + WContainerWidget *parent) { + std::vector parts; + boost::split(parts, path, boost::is_any_of("/")); + + WDate lower, upper; + int year = boost::lexical_cast(parts[0]); + + if (parts.size() > 1) { + int month = boost::lexical_cast(parts[1]); + + if (parts.size() > 2) { + int day = boost::lexical_cast(parts[2]); + + lower.setDate(year, month, day); + upper = lower.addDays(1); + } else { + lower.setDate(year, month, 1); + upper = lower.addMonths(1); + } + } else { + lower.setDate(year, 1, 1); + upper = lower.addYears(1); + } + + Posts posts = session_.find + ("where date >= ? " + "and date < ? " + "and (state = ? or author_id = ?)") + .bind(WDateTime(lower)) + .bind(WDateTime(upper)) + .bind(Post::Published) + .bind(session_.user().id()); + + if (parts.size() > 3) { + std::string title = parts[3]; + + for (Posts::const_iterator i = posts.begin(); i != posts.end(); ++i) + if ((*i)->titleToUrl() == title) { + showPost(*i, PostView::Detail, parent); + return; + } + + showError(tr("blog-no-post")); + } else { + showPosts(posts, parent); + } + } + + void showPosts(dbo::ptr user) { + /* +<<<<<<< HEAD:examples/blog/view/BlogView.C + if (user == session_.user() && user->role == User::Admin) { + WTemplate *authorPanel = new WTemplate(tr("blog-author-panel"), items_); + + WPushButton *newPost = new WPushButton(tr("new-post")); + newPost->clicked().connect(this, &BlogImpl::newPost); + + WContainerWidget *unpublishedPosts = new WContainerWidget(); + showPosts(user->allPosts(Post::Unpublished), unpublishedPosts); + + authorPanel->bindString("user", user->name); + authorPanel->bindInt("unpublished-count", + user->allPosts(Post::Unpublished).size()); + authorPanel->bindInt("published-count", + user->allPosts(Post::Published).size()); + authorPanel->bindWidget("new-post", newPost); + authorPanel->bindWidget("unpublished-posts", unpublishedPosts); + } + +======= +>>>>>>> bvh_blog:examples/blog/view/BlogView.C + */ + showPosts(user->latestPosts(), items_); + } + + void newPost() { + dbo::Transaction t(session_); + + authorPanel(); + WContainerWidget *unpublishedPosts + = authorPanel_->resolve("unpublished-posts"); + + dbo::ptr post(new Post); + + Post *p = post.modify(); + p->state = Post::Unpublished; + p->author = session_.user(); + p->title = "Title"; + p->briefSrc = "Brief ..."; + p->bodySrc = "Body ..."; + + showPost(post, PostView::Edit, unpublishedPosts); + + t.commit(); + } + + void showPosts(const Posts& posts, WContainerWidget *parent) { + for (Posts::const_iterator i = posts.begin(); i != posts.end(); ++i) + showPost(*i, PostView::Brief, parent); + } + + void showPost(const dbo::ptr post, PostView::RenderType type, + WContainerWidget *parent) { + parent->addWidget(new PostView(session_, basePath_, post, type)); + } + + void showError(const WString& msg) { + items_->addWidget(new WText(msg)); + } +}; + +BlogView::BlogView(const std::string& basePath, const std::string& sqliteDb, + const std::string& rssFeedUrl, WContainerWidget *parent) + : WCompositeWidget(parent) +{ + impl_ = new BlogImpl(basePath, sqliteDb, rssFeedUrl); + setImplementation(impl_); +} diff --git a/wt-3.1.7a/examples/blog/view/BlogView.h b/wt-3.1.7a/examples/blog/view/BlogView.h new file mode 100644 index 0000000..aea8e69 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/BlogView.h @@ -0,0 +1,31 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef BLOG_VIEW_H_ +#define BLOG_VIEW_H_ + +#include + +namespace Wt { + class WContainerWidget; +} + +class BlogImpl; + +class BlogView : public Wt::WCompositeWidget +{ +public: + BlogView(const std::string& basePath, const std::string& sqliteDb, + const std::string& rssFeedUrl, Wt::WContainerWidget *parent = 0); + + void login(const std::string& user); + void logout(); + +private: + BlogImpl *impl_; +}; + +#endif // BLOG_VIEW_H_ diff --git a/wt-3.1.7a/examples/blog/view/CommentView.C b/wt-3.1.7a/examples/blog/view/CommentView.C new file mode 100644 index 0000000..fd54649 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/CommentView.C @@ -0,0 +1,207 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "../BlogSession.h" +#include "CommentView.h" + +#include "../model/Comment.h" +#include "../model/Tag.h" +#include "../model/User.h" +#include "../model/Post.h" + +#include +#include +#include +#include +#include + +using namespace Wt; +namespace dbo = Wt::Dbo; + +CommentView::CommentView(BlogSession& session, dbo::ptr comment) + : session_(session), + comment_(comment) +{ + comment_ = comment; + + renderView(); +} + +CommentView::CommentView(BlogSession& session, long long parentId) + : session_(session) +{ + dbo::ptr parent = session_.load(parentId); + + comment_.reset(new Comment); + comment_.modify()->parent = parent; + comment_.modify()->post = parent->post; + + edit(); +} + +bool CommentView::isNew() const +{ + return comment_.id() == -1; +} + +void CommentView::edit() +{ + clear(); + + dbo::Transaction t(session_); + + setTemplateText(tr("blog-edit-comment")); + + editArea_ = new WTextArea(); + editArea_->setText(comment_->textSrc()); + editArea_->setFocus(); + + WPushButton *save = new WPushButton(tr("save")); + save->clicked().connect(this, &CommentView::save); + + WPushButton *cancel = new WPushButton(tr("cancel")); + cancel->clicked().connect(this, &CommentView::cancel); + + bindWidget("area", editArea_); + bindWidget("save", save); + bindWidget("cancel", cancel); + + t.commit(); +} + +void CommentView::cancel() +{ + if (isNew()) + delete this; + else { + dbo::Transaction t(session_); + renderView(); + t.commit(); + } +} + +void CommentView::renderTemplate(std::ostream& result) +{ + dbo::Transaction t(session_); + + WTemplate::renderTemplate(result); + + comment_.purge(); + + t.commit(); +} + +void CommentView::resolveString(const std::string& varName, + const std::vector& args, + std::ostream& result) +{ + if (varName == "author") + format(result, comment_->author ? comment_->author->name : "anonymous"); + else if (varName == "date") + format(result, comment_->date.timeTo(WDateTime::currentDateTime()) + + " ago"); + else if (varName == "contents") + format(result, comment_->textHtml(), XHTMLText); + else + WTemplate::resolveString(varName, args, result); +} + +void CommentView::renderView() +{ + clear(); + + bool isRootComment = !comment_->parent; + setTemplateText(isRootComment ? tr("blog-root-comment") + : tr("blog-comment")); + + bindString("collapse-expand", WString::Empty); // NYI + + WText *replyText = new WText(isRootComment ? tr("comment-add") + : tr("comment-reply")); + replyText->setStyleClass("link"); + replyText->clicked().connect(this, &CommentView::reply); + bindWidget("reply", replyText); + + bool mayEdit = session_.user() + && (comment_->author == session_.user() + || session_.user()->role == User::Admin); + + if (mayEdit) { + WText *editText = new WText(tr("comment-edit")); + editText->setStyleClass("link"); + editText->clicked().connect(this, &CommentView::edit); + bindWidget("edit", editText); + } else + bindString("edit", WString::Empty); + + bool mayDelete + = (session_.user() && session_.user() == comment_->author) + || session_.user() == comment_->post->author; + + if (mayDelete) { + WText *deleteText = new WText(tr("comment-delete")); + deleteText->setStyleClass("link"); + deleteText->clicked().connect(this, &CommentView::rm); + bindWidget("delete", deleteText); + } else + bindString("delete", WString::Empty); + + typedef std::vector< dbo::ptr > CommentVector; + CommentVector comments(comment_->children.begin(), comment_->children.end()); + + WContainerWidget *children = new WContainerWidget(); + for (int i = (int)comments.size() - 1; i >= 0; --i) + children->addWidget(new CommentView(session_, comments[i])); + + bindWidget("children", children); +} + +void CommentView::save() +{ + dbo::Transaction t(session_); + + bool isNew = comment_.id() == -1; + + if (isNew) + session_.add(comment_); + + Comment *comment = comment_.modify(); + + comment->setText(editArea_->text()); + + if (comment->date.isNull()) + comment->date = WDateTime::currentDateTime(); + + if (!comment->author) + comment->author = session_.user(); + + if (isNew) + session_.commentsChanged().emit(comment_); + + renderView(); + + t.commit(); +} + +void CommentView::reply() +{ + dbo::Transaction t(session_); + + WContainerWidget *c = resolve("children"); + c->insertWidget(0, new CommentView(session_, comment_.id())); + + t.commit(); +} + +void CommentView::rm() +{ + dbo::Transaction t(session_); + + comment_.modify()->setDeleted(); + renderView(); + + t.commit(); +} diff --git a/wt-3.1.7a/examples/blog/view/CommentView.h b/wt-3.1.7a/examples/blog/view/CommentView.h new file mode 100644 index 0000000..17098b2 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/CommentView.h @@ -0,0 +1,51 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef COMMENT_VIEW_H_ +#define COMMENT_VIEW_H_ + +#include +#include + +namespace Wt { + class WTextArea; +} + +class BlogSession; +class Comment; + +class CommentView : public Wt::WTemplate +{ +public: + // For new comment, goes immediately to edit mode + CommentView(BlogSession& session, long long parentId); + + // Existing comment + CommentView(BlogSession& session, dbo::ptr comment); + + virtual void resolveString(const std::string& varName, + const std::vector& args, + std::ostream& result); + +protected: + virtual void renderTemplate(std::ostream& result); + +private: + BlogSession& session_; + dbo::ptr comment_; + Wt::WTextArea *editArea_; + + void reply(); + void edit(); + void rm(); + void save(); + void cancel(); + bool isNew() const; + + void renderView(); +}; + +#endif // COMMENT_VIEW_H_ diff --git a/wt-3.1.7a/examples/blog/view/EditUsers.C b/wt-3.1.7a/examples/blog/view/EditUsers.C new file mode 100644 index 0000000..9de689f --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/EditUsers.C @@ -0,0 +1,90 @@ +#include "EditUsers.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Wt; +namespace dbo = Wt::Dbo; + +EditUsers::EditUsers(dbo::Session& aSession, const std::string& basePath) +: session_(aSession), basePath_(basePath) +{ + setStyleClass("user-editor"); + setTemplateText(tr("edit-users-list")); + limitEdit_ = new WLineEdit; + WPushButton* goLimit = new WPushButton(tr("go-limit")); + goLimit->clicked().connect(SLOT(this,EditUsers::limitList)); + bindWidget("limit-edit",limitEdit_); + bindWidget("limit-button",goLimit); + limitList(); +} + +void EditUsers::limitList() +{ + WContainerWidget* list = new WContainerWidget; + bindWidget("user-list",list); + + typedef dbo::collection > UserList; + dbo::Transaction t(session_); + UserList users = session_.find().where("name like ?").bind("%"+limitEdit_->text()+"%").orderBy("name"); + + WSignalMapper::IdType >* userLinkMap = new WSignalMapper::IdType >(this); + userLinkMap->mapped().connect(this,&EditUsers::onUserClicked); + for (UserList::const_iterator i = users.begin(); i != users.end(); ++i) { + WText* t = new WText(WString((*i)->name,UTF8),list); + t->setStyleClass("link"); + new WBreak(list); + userLinkMap->mapConnect(t->clicked(), (*i).id()); + } + if (!users.size()) + new WText(tr("no-users-found"),list); +} + +void EditUsers::onUserClicked(Wt::Dbo::dbo_traits::IdType id) +{ + wApp->setInternalPath(basePath_+"edituser/"+boost::lexical_cast(id), true); +} + + +EditUser::EditUser(Wt::Dbo::Session& aSession) +: WTemplate(tr("edit-user")), + session_(aSession), + roleButton_(new WPushButton) +{ + bindWidget("role-button",roleButton_); + roleButton_->clicked().connect(SLOT(this, EditUser::switchRole)); +} + +void EditUser::switchUser(Wt::Dbo::ptr target) +{ + target_ = target; + bindTemplate(); +} + +void EditUser::bindTemplate() +{ + bindString("username", target_->name); + if (target_->role == User::Admin) + roleButton_->setText(tr("demote-admin")); + else + roleButton_->setText(tr("promote-user")); +} + +void EditUser::switchRole() +{ + dbo::Transaction t(session_); + target_.reread(); + if (target_->role == User::Admin) + target_.modify()->role = User::Visitor; + else + target_.modify()->role = User::Admin; + t.commit(); + bindTemplate(); +} diff --git a/wt-3.1.7a/examples/blog/view/EditUsers.h b/wt-3.1.7a/examples/blog/view/EditUsers.h new file mode 100644 index 0000000..1b3a6f0 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/EditUsers.h @@ -0,0 +1,47 @@ +#ifndef EDIT_USERS_H_ +#define EDIT_USERS_H_ + +#include "../model/User.h" +#include "../model/Tag.h" +#include "../model/Comment.h" + +#include +#include +#include + +namespace Wt { + class WLineEdit; + class WPushButton; + namespace Dbo { + class Session; + } +} + +class EditUsers : public Wt::WTemplate +{ +public: + EditUsers(Wt::Dbo::Session& aSesssion, const std::string& basePath); +private: + void onUserClicked(Wt::Dbo::dbo_traits::IdType id); + void limitList(); + + Wt::Dbo::Session& session_; + std::string basePath_; + Wt::WLineEdit* limitEdit_; +}; + +class EditUser : public Wt::WTemplate +{ +public: + EditUser(Wt::Dbo::Session& aSesssion); + void switchUser(Wt::Dbo::ptr target); +private: + void bindTemplate(); + void switchRole(); + + Wt::Dbo::Session& session_; + Wt::Dbo::ptr target_; + Wt::WPushButton* roleButton_; +}; + +#endif diff --git a/wt-3.1.7a/examples/blog/view/PostView.C b/wt-3.1.7a/examples/blog/view/PostView.C new file mode 100644 index 0000000..8526516 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/PostView.C @@ -0,0 +1,259 @@ +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "../BlogSession.h" +#include "CommentView.h" +#include "PostView.h" +#include "../asciidoc/asciidoc.h" + +#include "../model/Comment.h" +#include "../model/Tag.h" +#include "../model/User.h" + +#include +#include +#include +#include +#include + +using namespace Wt; +namespace dbo = Wt::Dbo; + +PostView::PostView(BlogSession& session, const std::string& basePath, + dbo::ptr post, RenderType type) + : session_(session), + basePath_(basePath), + post_(post) +{ + viewType_ = Brief; + render(type); +} + +void PostView::renderTemplate(std::ostream& result) +{ + dbo::Transaction t(session_); + + WTemplate::renderTemplate(result); + + post_.purge(); + + t.commit(); +} + +void PostView::resolveString(const std::string& varName, + const std::vector& args, + std::ostream& result) +{ + if (varName == "title") + format(result, post_->title); + else if (varName == "date") + format(result, post_->date.toString("dddd, MMMM d, yyyy @ HH:mm")); + else if (varName == "brief") { + if (!post_->briefSrc.empty()) + format(result, post_->briefHtml, XHTMLText); + else + format(result, post_->bodyHtml, XHTMLText); + } else if (varName == "brief+body") { + format(result, "
" + post_->briefHtml + "
" + "
permaLink() + "/more\">" + "
" + post_->bodyHtml + "
", XHTMLUnsafeText); + } else + WTemplate::resolveString(varName, args, result); +} + +void PostView::render(RenderType type) +{ + if (type != Edit) + viewType_ = type; + + clear(); + + switch (type) { + case Detail: { + setTemplateText(tr("blog-post")); + + commentCount_ = new WText(post_->commentCount()); + + CommentView *comments = new CommentView(session_, post_->rootComment()); + session_.commentsChanged().connect(this, &PostView::updateCommentCount); + + bindWidget("comment-count", commentCount_); + bindWidget("comments", comments); + bindString("anchor", basePath_ + post_->permaLink()); + + break; + } + case Brief: { + setTemplateText(tr("blog-post-brief")); + + WAnchor *titleAnchor = new WAnchor(""); + titleAnchor->setText(post_->title); + titleAnchor->setRefInternalPath(basePath_ + post_->permaLink()); + bindWidget("title", titleAnchor); + + if (!post_->briefSrc.empty()) { + WAnchor *moreAnchor = new WAnchor(""); + moreAnchor->setText(tr("blog-read-more")); + moreAnchor->setRefInternalPath(basePath_ + post_->permaLink() + "/more"); + bindWidget("read-more", moreAnchor); + } else { + bindString("read-more", WString::Empty); + } + + commentCount_ = new WText("(" + post_->commentCount() + ")"); + + WAnchor *commentsAnchor = new WAnchor(""); + commentsAnchor->addWidget(commentCount_); + commentsAnchor->setRefInternalPath(basePath_ + post_->permaLink() + + "/comments"); + bindWidget("comment-count", commentsAnchor); + + break; } + case Edit: { + setTemplateText(tr("blog-post-edit")); + + bindWidget("title-edit", titleEdit_ = new WLineEdit(post_->title)); + bindWidget("brief-edit", briefEdit_ = new WTextArea(post_->briefSrc)); + bindWidget("body-edit", bodyEdit_ = new WTextArea(post_->bodySrc)); + + WPushButton *saveButton = new WPushButton(tr("save")); + WPushButton *cancelButton = new WPushButton(tr("cancel")); + bindWidget("save", saveButton); + bindWidget("cancel", cancelButton); + + saveButton->clicked().connect(this, &PostView::saveEdit); + cancelButton->clicked().connect(this, &PostView::showView); + + break; } + } + + if (type == Detail || type == Brief) { + if (session_.user() == post_->author) { + WPushButton *publishButton; + if (post_->state != Post::Published) { + publishButton = new WPushButton(tr("publish")); + publishButton->clicked().connect(this, &PostView::publish); + } else { + publishButton = new WPushButton(tr("retract")); + publishButton->clicked().connect(this, &PostView::retract); + } + bindWidget("publish", publishButton); + + WPushButton *editButton = new WPushButton(tr("edit")); + editButton->clicked().connect(this, &PostView::showEdit); + bindWidget("edit", editButton); + + WPushButton *deleteButton = new WPushButton(tr("delete")); + deleteButton->clicked().connect(this, &PostView::rm); + bindWidget("delete", deleteButton); + } else { + bindString("publish", WString::Empty); + bindString("edit", WString::Empty); + bindString("delete", WString::Empty); + } + } + + WAnchor *postAnchor = new WAnchor("", post_->author->name); + postAnchor->setRefInternalPath(basePath_ + "author/" + post_->author->name); + bindWidget("author", postAnchor); +} + +void PostView::saveEdit() +{ + dbo::Transaction t(session_); + + bool newPost = post_.id() == -1; + + Post *post = post_.modify(); + + post->title = titleEdit_->text(); + post->briefSrc = briefEdit_->text(); + post->bodySrc = bodyEdit_->text(); + + post->briefHtml = asciidoc(post->briefSrc); + post->bodyHtml = asciidoc(post->bodySrc); + + if (newPost) { + session_.add(post_); + + post->date = Wt::WDateTime::currentDateTime(); + post->state = Post::Unpublished; + post->author = session_.user(); + + dbo::ptr rootComment = session_.add(new Comment); + rootComment.modify()->post = post_; + } + + session_.flush(); + + render(viewType_); + + t.commit(); +} + +void PostView::showView() +{ + if (post_.id() == -1) + delete this; + else { + dbo::Transaction t(session_); + render(viewType_); + t.commit(); + } +} + +void PostView::publish() +{ + setState(Post::Published); +} + +void PostView::retract() +{ + setState(Post::Unpublished); +} + +void PostView::setState(Post::State state) +{ + dbo::Transaction t(session_); + + post_.modify()->state = state; + if (state == Post::Published) + post_.modify()->date = Wt::WDateTime::currentDateTime(); + + render(viewType_); + + t.commit(); +} + +void PostView::showEdit() +{ + dbo::Transaction t(session_); + + render(Edit); + + t.commit(); +} + +void PostView::rm() +{ + dbo::Transaction t(session_); + post_.remove(); + t.commit(); + + delete this; +} + +void PostView::updateCommentCount(dbo::ptr comment) +{ + if (comment->post == post_) { + std::string count = comment->post->commentCount(); + + if (commentCount_->text().toUTF8()[0] == '(') + commentCount_->setText("(" + count + ")"); + else + commentCount_->setText(count); + } +} diff --git a/wt-3.1.7a/examples/blog/view/PostView.h b/wt-3.1.7a/examples/blog/view/PostView.h new file mode 100644 index 0000000..6f48d84 --- /dev/null +++ b/wt-3.1.7a/examples/blog/view/PostView.h @@ -0,0 +1,61 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef POST_VIEW_H_ +#define POST_VIEW_H_ + +#include +#include + +#include "../model/Post.h" + +namespace Wt { + class WText; +} + +class BlogSession; + +class Comment; + +class PostView : public Wt::WTemplate +{ +public: + enum RenderType { Brief, Detail, Edit }; + + PostView(BlogSession& session, const std::string& basePath, + dbo::ptr post, RenderType type); + + virtual void resolveString(const std::string& varName, + const std::vector& args, + std::ostream& result); + +protected: + virtual void renderTemplate(std::ostream& result); + +private: + BlogSession& session_; + std::string basePath_; + dbo::ptr post_; + + RenderType viewType_; + Wt::WText *commentCount_; + Wt::WLineEdit *titleEdit_; + Wt::WTextArea *briefEdit_, *bodyEdit_; + + void render(RenderType type); + void updateCommentCount(dbo::ptr comment); + void saveEdit(); + void showView(); + + void publish(); + void retract(); + void showEdit(); + void rm(); + + void setState(Post::State state); +}; + +#endif // POST_VIEW_H_ diff --git a/wt-3.1.7a/examples/bobsmith/CMakeLists.txt b/wt-3.1.7a/examples/bobsmith/CMakeLists.txt new file mode 100644 index 0000000..749bdd4 --- /dev/null +++ b/wt-3.1.7a/examples/bobsmith/CMakeLists.txt @@ -0,0 +1,12 @@ +WT_ADD_EXAMPLE(bobsmith.wt bobsmith.C) + +# +# If you have Wt installed somehwere, you should use the +# installed Wt header files for your own Wt projects. +# e.g. INCLUDE_DIRECTORIES(/usr/local/include) +# instead of the following: +# +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src) + +ADD_DEPENDENCIES(bobsmith.wt wt ${EXAMPLES_CONNECTOR}) + diff --git a/wt-3.1.7a/examples/bobsmith/bobsmith.C b/wt-3.1.7a/examples/bobsmith/bobsmith.C new file mode 100644 index 0000000..4f81094 --- /dev/null +++ b/wt-3.1.7a/examples/bobsmith/bobsmith.C @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include +#include +#include + +using namespace Wt; + +WApplication *createApplication(const WEnvironment& env) +{ + WApplication *app = new WApplication(env); + + new WText("Name: ", app->root()); + WInPlaceEdit *edit = new WInPlaceEdit("Bob Smith", app->root()); + edit->setStyleClass("inplace"); + edit->setEmptyText("Empty: click to edit"); + + app->styleSheet().addRule("*.inplace span:hover", "background-color: gray"); + + return app; +} + +int main(int argc, char **argv) +{ + return WRun(argc, argv, &createApplication); +} diff --git a/wt-3.1.7a/examples/charts/CMakeLists.txt b/wt-3.1.7a/examples/charts/CMakeLists.txt new file mode 100644 index 0000000..3bb8996 --- /dev/null +++ b/wt-3.1.7a/examples/charts/CMakeLists.txt @@ -0,0 +1,16 @@ +WT_ADD_EXAMPLE(charts.wt + PanelList.C + ChartConfig.C + ChartsExample.C + CsvUtil.C + ChartsApplication.C +) + +# +# If you have Wt installed somehwere, you should use the +# installed Wt header files for your own Wt projects. +# e.g. INCLUDE_DIRECTORIES(/usr/local/include) +# instead of the following: +# +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src) + diff --git a/wt-3.1.7a/examples/charts/ChartConfig.C b/wt-3.1.7a/examples/charts/ChartConfig.C new file mode 100644 index 0000000..096c426 --- /dev/null +++ b/wt-3.1.7a/examples/charts/ChartConfig.C @@ -0,0 +1,526 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "ChartConfig.h" +#include "PanelList.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Wt; +using namespace Wt::Chart; + +namespace { + void addHeader(WTable *t, const char *value) { + t->elementAt(0, t->columnCount())->addWidget(new WText(value)); + } + + void addEntry(WAbstractItemModel *model, const char *value) { + model->insertRows(model->rowCount(), 1); + model->setData(model->rowCount()-1, 0, boost::any(std::string(value))); + } + + bool getDouble(WLineEdit *edit, double& value) { + try { + value = boost::lexical_cast(edit->text().toUTF8()); + return true; + } catch (...) { + return false; + } + } + + int seriesIndexOf(WCartesianChart* chart, int modelColumn) { + for (unsigned i = 0; i < chart->series().size(); ++i) + if (chart->series()[i].modelColumn() == modelColumn) + return i; + + return -1; + } +} + +ChartConfig::ChartConfig(WCartesianChart *chart, WContainerWidget *parent) + : WContainerWidget(parent), + chart_(chart), + fill_(MinimumValueFill) +{ + chart->initLayout(); + + PanelList *list = new PanelList(this); + + WIntValidator *sizeValidator = new WIntValidator(200, 2000, this); + sizeValidator->setMandatory(true); + + WDoubleValidator *anyNumberValidator = new WDoubleValidator(this); + anyNumberValidator->setMandatory(true); + + WDoubleValidator *angleValidator = new WDoubleValidator(-90, 90, this); + angleValidator->setMandatory(true); + + // ---- Chart properties ---- + + WStandardItemModel *orientation = new WStandardItemModel(0, 1, this); + addEntry(orientation, "Vertical"); + addEntry(orientation, "Horizontal"); + + WTable *chartConfig = new WTable(); + chartConfig->setMargin(WLength::Auto, Left | Right); + + int row = 0; + chartConfig->elementAt(row, 0)->addWidget(new WText("Title:")); + titleEdit_ = new WLineEdit(chartConfig->elementAt(row, 1)); + connectSignals(titleEdit_); + ++row; + + chartConfig->elementAt(row, 0)->addWidget(new WText("Width:")); + chartWidthEdit_ = new WLineEdit(chartConfig->elementAt(row, 1)); + chartWidthEdit_ + ->setText(boost::lexical_cast(chart_->width().value())); + chartWidthEdit_->setValidator(sizeValidator); + chartWidthEdit_->setMaxLength(4); + connectSignals(chartWidthEdit_); + ++row; + + chartConfig->elementAt(row, 0)->addWidget(new WText("Height:")); + chartHeightEdit_ = new WLineEdit(chartConfig->elementAt(row, 1)); + chartHeightEdit_ + ->setText(boost::lexical_cast(chart_->height().value())); + chartHeightEdit_->setValidator(sizeValidator); + chartHeightEdit_->setMaxLength(4); + connectSignals(chartHeightEdit_); + ++row; + + chartConfig->elementAt(row, 0)->addWidget(new WText("Orientation:")); + chartOrientationEdit_ = new WComboBox(chartConfig->elementAt(row, 1)); + chartOrientationEdit_->setModel(orientation); + connectSignals(chartOrientationEdit_); + ++row; + + for (int i = 0; i < chartConfig->rowCount(); ++i) { + chartConfig->elementAt(i, 0)->setStyleClass("tdhead"); + chartConfig->elementAt(i, 1)->setStyleClass("tddata"); + } + + WPanel *p = list->addWidget("Chart properties", chartConfig); + p->setMargin(WLength::Auto, Left | Right); + p->resize(750, WLength::Auto); + p->setMargin(20, Top | Bottom); + + if (chart_->isLegendEnabled()) + chart_->setPlotAreaPadding(200, Right); + + // ---- Series properties ---- + + WStandardItemModel *types = new WStandardItemModel(0, 1, this); + addEntry(types, "Points"); + addEntry(types, "Line"); + addEntry(types, "Curve"); + addEntry(types, "Bar"); + addEntry(types, "Line Area"); + addEntry(types, "Curve Area"); + addEntry(types, "Stacked Bar"); + addEntry(types, "Stacked Line Area"); + addEntry(types, "Stacked Curve Area"); + + WStandardItemModel *markers = new WStandardItemModel(0, 1, this); + addEntry(markers, "None"); + addEntry(markers, "Square"); + addEntry(markers, "Circle"); + addEntry(markers, "Cross"); + addEntry(markers, "X cross"); + addEntry(markers, "Triangle"); + + WStandardItemModel *axes = new WStandardItemModel(0, 1, this); + addEntry(axes, "1st Y axis"); + addEntry(axes, "2nd Y axis"); + + WStandardItemModel *labels = new WStandardItemModel(0, 1, this); + addEntry(labels, "None"); + addEntry(labels, "X"); + addEntry(labels, "Y"); + addEntry(labels, "X: Y"); + + WTable *seriesConfig = new WTable(); + seriesConfig->setMargin(WLength::Auto, Left | Right); + + ::addHeader(seriesConfig, "Name"); + ::addHeader(seriesConfig, "Enabled"); + ::addHeader(seriesConfig, "Type"); + ::addHeader(seriesConfig, "Marker"); + ::addHeader(seriesConfig, "Y axis"); + ::addHeader(seriesConfig, "Legend"); + ::addHeader(seriesConfig, "Shadow"); + ::addHeader(seriesConfig, "Value labels"); + + seriesConfig->rowAt(0)->setStyleClass("trhead"); + + for (int j = 1; j < chart->model()->columnCount(); ++j) { + SeriesControl sc; + + new WText(asString(chart->model()->headerData(j)), + seriesConfig->elementAt(j, 0)); + + sc.enabledEdit = new WCheckBox(seriesConfig->elementAt(j, 1)); + connectSignals(sc.enabledEdit); + + sc.typeEdit = new WComboBox(seriesConfig->elementAt(j, 2)); + sc.typeEdit->setModel(types); + connectSignals(sc.typeEdit); + + sc.markerEdit = new WComboBox(seriesConfig->elementAt(j, 3)); + sc.markerEdit->setModel(markers); + connectSignals(sc.markerEdit); + + sc.axisEdit = new WComboBox(seriesConfig->elementAt(j, 4)); + sc.axisEdit->setModel(axes); + connectSignals(sc.axisEdit); + + sc.legendEdit = new WCheckBox(seriesConfig->elementAt(j, 5)); + connectSignals(sc.legendEdit); + + sc.shadowEdit = new WCheckBox(seriesConfig->elementAt(j, 6)); + connectSignals(sc.shadowEdit); + + sc.labelsEdit = new WComboBox(seriesConfig->elementAt(j, 7)); + sc.labelsEdit->setModel(labels); + connectSignals(sc.labelsEdit); + + int si = seriesIndexOf(chart, j); + + if (si != -1) { + sc.enabledEdit->setChecked(); + const WDataSeries& s = chart_->series(j); + switch (s.type()) { + case PointSeries: + sc.typeEdit->setCurrentIndex(0); break; + case LineSeries: + sc.typeEdit->setCurrentIndex(s.fillRange() != NoFill ? + (s.isStacked() ? 7 : 4) : 1); break; + case CurveSeries: + sc.typeEdit->setCurrentIndex(s.fillRange() != NoFill ? + (s.isStacked() ? 8 : 5) : 2); break; + case BarSeries: + sc.typeEdit->setCurrentIndex(s.isStacked() ? 6 : 3); + } + + sc.markerEdit->setCurrentIndex((int)s.marker()); + sc.legendEdit->setChecked(s.isLegendEnabled()); + sc.shadowEdit->setChecked(s.shadow() != WShadow()); + } + + seriesControls_.push_back(sc); + + seriesConfig->rowAt(j)->setStyleClass("trdata"); + } + + p = list->addWidget("Series properties", seriesConfig); + p->expand(); + p->setMargin(WLength::Auto, Left | Right); + p->resize(750, WLength::Auto); + p->setMargin(20, Top | Bottom); + + // ---- Axis properties ---- + + WStandardItemModel *yScales = new WStandardItemModel(0, 1, this); + addEntry(yScales, "Linear scale"); + addEntry(yScales, "Log scale"); + + WStandardItemModel *xScales = new WStandardItemModel(0, 1, this); + addEntry(xScales, "Categories"); + addEntry(xScales, "Linear scale"); + addEntry(xScales, "Log scale"); + addEntry(xScales, "Date scale"); + + WTable *axisConfig = new WTable(); + axisConfig->setMargin(WLength::Auto, Left | Right); + + ::addHeader(axisConfig, "Axis"); + ::addHeader(axisConfig, "Visible"); + ::addHeader(axisConfig, "Scale"); + ::addHeader(axisConfig, "Automatic"); + ::addHeader(axisConfig, "Minimum"); + ::addHeader(axisConfig, "Maximum"); + ::addHeader(axisConfig, "Gridlines"); + ::addHeader(axisConfig, "Label angle"); + + axisConfig->rowAt(0)->setStyleClass("trhead"); + + for (int i = 0; i < 3; ++i) { + const char *axisName[] = { "X axis", "1st Y axis", "2nd Y axis" }; + int j = i + 1; + + const WAxis& axis = chart_->axis(static_cast(i)); + AxisControl sc; + + new WText(WString(axisName[i], UTF8), axisConfig->elementAt(j, 0)); + + sc.visibleEdit = new WCheckBox(axisConfig->elementAt(j, 1)); + sc.visibleEdit->setChecked(axis.isVisible()); + connectSignals(sc.visibleEdit); + + sc.scaleEdit = new WComboBox(axisConfig->elementAt(j, 2)); + if (axis.scale() == CategoryScale) + sc.scaleEdit->addItem("Category scale"); + else { + if (axis.id() == XAxis) { + sc.scaleEdit->setModel(xScales); + sc.scaleEdit->setCurrentIndex(axis.scale()); + } else { + sc.scaleEdit->setModel(yScales); + sc.scaleEdit->setCurrentIndex(axis.scale() - 1); + } + } + connectSignals(sc.scaleEdit); + + bool autoValues = axis.autoLimits() == (MinimumValue | MaximumValue); + + sc.minimumEdit = new WLineEdit(axisConfig->elementAt(j, 4)); + sc.minimumEdit->setText(boost::lexical_cast(axis.minimum())); + sc.minimumEdit->setValidator(anyNumberValidator); + sc.minimumEdit->setEnabled(!autoValues); + connectSignals(sc.minimumEdit); + + sc.maximumEdit = new WLineEdit(axisConfig->elementAt(j, 5)); + sc.maximumEdit->setText(boost::lexical_cast(axis.maximum())); + sc.maximumEdit->setValidator(anyNumberValidator); + sc.maximumEdit->setEnabled(!autoValues); + connectSignals(sc.maximumEdit); + + sc.autoEdit = new WCheckBox(axisConfig->elementAt(j, 3)); + sc.autoEdit->setChecked(autoValues); + connectSignals(sc.autoEdit); + sc.autoEdit->checked().connect(sc.maximumEdit, &WLineEdit::disable); + sc.autoEdit->unChecked().connect(sc.maximumEdit, &WLineEdit::enable); + sc.autoEdit->checked().connect(sc.minimumEdit, &WLineEdit::disable); + sc.autoEdit->unChecked().connect(sc.minimumEdit, &WLineEdit::enable); + + sc.gridLinesEdit = new WCheckBox(axisConfig->elementAt(j, 6)); + connectSignals(sc.gridLinesEdit); + + sc.labelAngleEdit = new WLineEdit(axisConfig->elementAt(j, 7)); + sc.labelAngleEdit->setText("0"); + sc.labelAngleEdit->setValidator(angleValidator); + connectSignals(sc.labelAngleEdit); + + axisConfig->rowAt(j)->setStyleClass("trdata"); + + axisControls_.push_back(sc); + } + + p = list->addWidget("Axis properties", axisConfig); + p->setMargin(WLength::Auto, Left | Right); + p->resize(750, WLength::Auto); + p->setMargin(20, Top | Bottom); + + /* + * If we do not have JavaScript, then add a button to reflect changes to + * the chart. + */ + if (!WApplication::instance()->environment().javaScript()) { + WPushButton *b = new WPushButton(this); + b->setText("Update chart"); + b->setInline(false); // so we can add margin to center horizontally + b->setMargin(WLength::Auto, Left | Right); + b->clicked().connect(this, &ChartConfig::update); + } +} + +void ChartConfig::setValueFill(FillRangeType fill) +{ + fill_ = fill; +} + +void ChartConfig::update() +{ + bool haveLegend = false; + std::vector series; + + for (int i = 1; i < chart_->model()->columnCount(); ++i) { + SeriesControl& sc = seriesControls_[i-1]; + + if (sc.enabledEdit->isChecked()) { + WDataSeries s(i); + + switch (sc.typeEdit->currentIndex()) { + case 0: + s.setType(PointSeries); + if (sc.markerEdit->currentIndex() == 0) + sc.markerEdit->setCurrentIndex(1); + break; + case 1: + s.setType(LineSeries); + break; + case 2: + s.setType(CurveSeries); + break; + case 3: + s.setType(BarSeries); + break; + case 4: + s.setType(LineSeries); + s.setFillRange(fill_); + break; + case 5: + s.setType(CurveSeries); + s.setFillRange(fill_); + break; + case 6: + s.setType(BarSeries); + s.setStacked(true); + break; + case 7: + s.setType(LineSeries); + s.setFillRange(fill_); + s.setStacked(true); + break; + case 8: + s.setType(CurveSeries); + s.setFillRange(fill_); + s.setStacked(true); + } + + s.setMarker(static_cast(sc.markerEdit->currentIndex())); + + if (sc.axisEdit->currentIndex() == 1) { + s.bindToAxis(Y2Axis); + } + + if (sc.legendEdit->isChecked()) { + s.setLegendEnabled(true); + haveLegend = true; + } else + s.setLegendEnabled(false); + + if (sc.shadowEdit->isChecked()) { + s.setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); + } else + s.setShadow(WShadow()); + + switch (sc.labelsEdit->currentIndex()) { + case 1: + s.setLabelsEnabled(XAxis); + break; + case 2: + s.setLabelsEnabled(YAxis); + break; + case 3: + s.setLabelsEnabled(XAxis); + s.setLabelsEnabled(YAxis); + break; + } + + series.push_back(s); + } + } + + chart_->setSeries(series); + + for (int i = 0; i < 3; ++i) { + AxisControl& sc = axisControls_[i]; + WAxis& axis = chart_->axis(static_cast(i)); + + axis.setVisible(sc.visibleEdit->isChecked()); + + if (sc.scaleEdit->count() != 1) { + int k = sc.scaleEdit->currentIndex(); + if (axis.id() != XAxis) + k += 1; + else { + if (k == 0) + chart_->setType(CategoryChart); + else + chart_->setType(ScatterPlot); + } + + switch (k) { + case 1: + axis.setScale(LinearScale); break; + case 2: + axis.setScale(LogScale); break; + case 3: + axis.setScale(DateScale); break; + } + } + + if (sc.autoEdit->isChecked()) + axis.setAutoLimits(MinimumValue | MaximumValue); + else { + if (validate(sc.minimumEdit) && validate(sc.maximumEdit)) { + double min, max; + getDouble(sc.minimumEdit, min); + getDouble(sc.maximumEdit, max); + + if (axis.scale() == LogScale) + if (min <= 0) + min = 0.0001; + + axis.setRange(min, max); + } + + } + + if (validate(sc.labelAngleEdit)) { + double angle; + getDouble(sc.labelAngleEdit, angle); + axis.setLabelAngle(angle); + } + + axis.setGridLinesEnabled(sc.gridLinesEdit->isChecked()); + } + + chart_->setTitle(titleEdit_->text()); + + if (validate(chartWidthEdit_) && validate(chartHeightEdit_)) { + double width, height; + getDouble(chartWidthEdit_, width); + getDouble(chartHeightEdit_, height); + chart_->resize(width, height); + } + + switch (chartOrientationEdit_->currentIndex()) { + case 0: + chart_->setOrientation(Vertical); break; + case 1: + chart_->setOrientation(Horizontal); break; + } + + chart_->setLegendEnabled(haveLegend); + chart_->setPlotAreaPadding(haveLegend ? 200 : 40, Right); +} + +bool ChartConfig::validate(WFormWidget *w) +{ + bool valid = w->validate() == WValidator::Valid; + + if (!WApplication::instance()->environment().javaScript()) { + w->setStyleClass(valid ? "" : "Wt-invalid"); + w->setToolTip(valid ? "" : "Invalid value"); + } + + return valid; +} + +void ChartConfig::connectSignals(WFormWidget *w) +{ + w->changed().connect(this, &ChartConfig::update); + if (dynamic_cast(w)) + w->enterPressed().connect(this, &ChartConfig::update); +} diff --git a/wt-3.1.7a/examples/charts/ChartConfig.h b/wt-3.1.7a/examples/charts/ChartConfig.h new file mode 100644 index 0000000..3a419aa --- /dev/null +++ b/wt-3.1.7a/examples/charts/ChartConfig.h @@ -0,0 +1,91 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CHART_CONFIG_H_ +#define CHART_CONFIG_H_ + +#include +#include + +namespace Wt { + class WCheckBox; + class WComboBox; + class WFormWidget; + class WLineEdit; + class WTable; + + namespace Chart { + class WCartesianChart; + } +} + +/** + * @addtogroup chartsexample + */ +/*@{*/ + +/*! \brief A class that allows configuration of a cartesian chart. + * + * This widget provides forms for configuring chart, series, and axis properties + * and manipulates the chart according to user settings. + * + * This widget is part of the %Wt charts example. + */ +class ChartConfig : public Wt::WContainerWidget +{ +public: + /*! \brief Constructor. + */ + ChartConfig(Wt::Chart::WCartesianChart *chart, Wt::WContainerWidget *parent); + + void setValueFill(Wt::Chart::FillRangeType fill); + +private: + Wt::Chart::WCartesianChart *chart_; + Wt::Chart::FillRangeType fill_; + + //! Struct that holds the controls for one series + struct SeriesControl { + Wt::WCheckBox *enabledEdit; + Wt::WComboBox *typeEdit; + Wt::WComboBox *markerEdit; + Wt::WComboBox *axisEdit; + Wt::WCheckBox *legendEdit; + Wt::WCheckBox *shadowEdit; + Wt::WComboBox *labelsEdit; + }; + + //! Controls for series + std::vector seriesControls_; + + //! Struct that holds the controls for one axis + struct AxisControl { + Wt::WCheckBox *visibleEdit; + Wt::WComboBox *scaleEdit; + Wt::WCheckBox *autoEdit; + Wt::WLineEdit *minimumEdit; + Wt::WLineEdit *maximumEdit; + Wt::WCheckBox *gridLinesEdit; + Wt::WLineEdit *labelAngleEdit; + }; + + //! Controls for axes + std::vector axisControls_; + + Wt::WLineEdit *titleEdit_; + Wt::WLineEdit *chartWidthEdit_; + Wt::WLineEdit *chartHeightEdit_; + Wt::WComboBox *chartOrientationEdit_; + + void connectSignals(Wt::WFormWidget *w); + void update(); + + static bool validate(Wt::WFormWidget *w); +}; + +/*@}*/ + +#endif // CHARTS_EXAMPLE_H_ diff --git a/wt-3.1.7a/examples/charts/ChartsApplication.C b/wt-3.1.7a/examples/charts/ChartsApplication.C new file mode 100644 index 0000000..6ae436e --- /dev/null +++ b/wt-3.1.7a/examples/charts/ChartsApplication.C @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include +#include "ChartsExample.h" + +using namespace Wt; + +class ChartsApplication: public WApplication +{ +public: + ChartsApplication(const WEnvironment& env) + : WApplication(env) + { + setTitle("Charts example"); + + setCssTheme("polished"); + messageResourceBundle().use(appRoot() + "charts"); + + root()->setPadding(10); + root()->resize(WLength::Auto, WLength::Auto); + + new ChartsExample(root()); + + + /* + * Set our style sheet last, so that it loaded after the ext stylesheets. + */ + useStyleSheet("charts.css"); + } +}; + +WApplication *createApplication(const WEnvironment& env) +{ + WApplication *app = new ChartsApplication(env); + + return app; +} + +int main(int argc, char **argv) +{ + return WRun(argc, argv, &createApplication); +} diff --git a/wt-3.1.7a/examples/charts/ChartsExample.C b/wt-3.1.7a/examples/charts/ChartsExample.C new file mode 100644 index 0000000..b44af74 --- /dev/null +++ b/wt-3.1.7a/examples/charts/ChartsExample.C @@ -0,0 +1,381 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include +#include + +#include "ChartsExample.h" +#include "ChartConfig.h" +#include "CsvUtil.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +using namespace Wt; +using namespace Wt::Chart; +namespace { + + /* + * Reads a CSV file as an (editable) standard item model. + */ + WAbstractItemModel *readCsvFile(const std::string &fname, + WContainerWidget *parent) + { + WStandardItemModel *model = new WStandardItemModel(0, 0, parent); + std::ifstream f(fname.c_str()); + + if (f) { + readFromCsv(f, model); + + for (int row = 0; row < model->rowCount(); ++row) + for (int col = 0; col < model->columnCount(); ++col) { + model->item(row, col)->setFlags(ItemIsSelectable | ItemIsEditable); + + /* + Example of tool tips (disabled here because they are not updated + when editing data) + */ + + /* + WString toolTip = asString(model->headerData(col)) + ": " + + asString(model->item(row, col)->data(DisplayRole), "%.f"); + model->item(row, col)->setToolTip(toolTip); + */ + } + + return model; + } else { + WString error(WString::tr("error-missing-data")); + error.arg(fname, UTF8); + new WText(error, parent); + return 0; + } + } +} + +ChartsExample::ChartsExample(WContainerWidget *root) + : WContainerWidget(root) +{ + new WText(WString::tr("introduction"), this); + + new CategoryExample(this); + new TimeSeriesExample(this); + new ScatterPlotExample(this); + new PieExample(this); +} + +CategoryExample::CategoryExample(Wt::WContainerWidget *parent): + WContainerWidget(parent) +{ + new WText(WString::tr("category chart"), this); + + WAbstractItemModel *model = readCsvFile(WApplication::appRoot() + "category.csv", + this); + + if (!model) + return; + + // Show a view that allows editing of the model. + WContainerWidget *w = new WContainerWidget(this); + WTableView *table = new WTableView(w); + + table->setMargin(10, Top | Bottom); + table->setMargin(WLength::Auto, Left | Right); + + table->setModel(model); + table->setSortingEnabled(true); + table->setColumnResizeEnabled(true); + table->setSelectionMode(NoSelection); + table->setAlternatingRowColors(true); + table->setColumnAlignment(0, AlignCenter); + table->setHeaderAlignment(0, AlignCenter); + table->setRowHeight(22); + + // Editing does not really work without Ajax, it would require an + // additional button somewhere to confirm the edited value. + if (WApplication::instance()->environment().ajax()) { + table->resize(600, 20 + 5*22); + table->setEditTriggers(WAbstractItemView::SingleClicked); + } else { + table->resize(600, WLength::Auto); + table->setEditTriggers(WAbstractItemView::NoEditTrigger); + } + + // We use a single delegate for all items which rounds values to + // the closest integer value. + WItemDelegate *delegate = new WItemDelegate(this); + delegate->setTextFormat("%.f"); + table->setItemDelegate(delegate); + + table->setColumnWidth(0, 80); + for (int i = 1; i < model->columnCount(); ++i) + table->setColumnWidth(i, 120); + + /* + * Create the category chart. + */ + WCartesianChart *chart = new WCartesianChart(this); + chart->setModel(model); // set the model + chart->setXSeriesColumn(0); // set the column that holds the categories + chart->setLegendEnabled(true); // enable the legend + + // Provide space for the X and Y axis and title. + chart->setPlotAreaPadding(100, Left); + chart->setPlotAreaPadding(50, Top | Bottom); + + /* + * Add all (but first) column as bar series + */ + for (int i = 1; i < model->columnCount(); ++i) { + WDataSeries s(i, BarSeries); + s.setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); + chart->addSeries(s); + } + + chart->resize(800, 400); + + chart->setMargin(10, Top | Bottom); + chart->setMargin(WLength::Auto, Left | Right); + + /* + * Provide a widget to manipulate chart properties + */ + new ChartConfig(chart, this); +} + +TimeSeriesExample::TimeSeriesExample(Wt::WContainerWidget *parent): + WContainerWidget(parent) +{ + new WText(WString::tr("scatter plot"), this); + + WAbstractItemModel *model = readCsvFile( + WApplication::appRoot() + "timeseries.csv", this); + + if (!model) + return; + + /* + * Parses the first column as dates, to be able to use a date scale + */ + for (int i = 0; i < model->rowCount(); ++i) { + WString s = asString(model->data(i, 0)); + WDate d = WDate::fromString(s, "dd/MM/yy"); + model->setData(i, 0, d); + } + + // Show a view that allows editing of the model. + WContainerWidget *w = new WContainerWidget(this); + WTableView *table = new WTableView(w); + + table->setMargin(10, Top | Bottom); + table->setMargin(WLength::Auto, Left | Right); + + table->setModel(model); + table->setSortingEnabled(false); // Does not make much sense for time series + table->setColumnResizeEnabled(true); + table->setSelectionMode(NoSelection); + table->setAlternatingRowColors(true); + table->setColumnAlignment(0, AlignCenter); + table->setHeaderAlignment(0, AlignCenter); + table->setRowHeight(22); + + // Editing does not really work without Ajax, it would require an + // additional button somewhere to confirm the edited value. + if (WApplication::instance()->environment().ajax()) { + table->resize(800, 20 + 5*22); + table->setEditTriggers(WAbstractItemView::SingleClicked); + } else { + table->resize(800, 20 + 5*22 + 25); + table->setEditTriggers(WAbstractItemView::NoEditTrigger); + } + + WItemDelegate *delegate = new WItemDelegate(this); + delegate->setTextFormat("%.1f"); + table->setItemDelegate(delegate); + table->setItemDelegateForColumn(0, new WItemDelegate(this)); + + table->setColumnWidth(0, 80); + for (int i = 1; i < model->columnCount(); ++i) + table->setColumnWidth(i, 90); + + /* + * Create the scatter plot. + */ + WCartesianChart *chart = new WCartesianChart(this); + //chart->setPreferredMethod(WPaintedWidget::InlineSvgVml); + //chart->setBackground(gray); + chart->setModel(model); // set the model + chart->setXSeriesColumn(0); // set the column that holds the X data + chart->setLegendEnabled(true); // enable the legend + + chart->setType(ScatterPlot); // set type to ScatterPlot + chart->axis(XAxis).setScale(DateScale); // set scale of X axis to DateScale + + // Provide space for the X and Y axis and title. + chart->setPlotAreaPadding(100, Left); + chart->setPlotAreaPadding(50, Top | Bottom); + + /* + * Add first two columns as line series + */ + for (int i = 1; i < 3; ++i) { + WDataSeries s(i, LineSeries); + s.setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); + chart->addSeries(s); + } + + chart->resize(800, 400); // WPaintedWidget must be given explicit size + + chart->setMargin(10, Top | Bottom); // add margin vertically + chart->setMargin(WLength::Auto, Left | Right); // center horizontally + + new ChartConfig(chart, this); +} + +ScatterPlotExample::ScatterPlotExample(WContainerWidget *parent): + WContainerWidget(parent) +{ + new WText(WString::tr("scatter plot 2"), this); + + WStandardItemModel *model = new WStandardItemModel(40, 2, this); + model->setHeaderData(0, WString("X")); + model->setHeaderData(1, WString("Y = sin(X)")); + + for (unsigned i = 0; i < 40; ++i) { + double x = (static_cast(i) - 20) / 4; + + model->setData(i, 0, x); + model->setData(i, 1, sin(x)); + } + + /* + * Create the scatter plot. + */ + WCartesianChart *chart = new WCartesianChart(this); + chart->setModel(model); // set the model + chart->setXSeriesColumn(0); // set the column that holds the X data + chart->setLegendEnabled(true); // enable the legend + + chart->setType(ScatterPlot); // set type to ScatterPlot + + // Typically, for mathematical functions, you want the axes to cross + // at the 0 mark: + chart->axis(XAxis).setLocation(ZeroValue); + chart->axis(YAxis).setLocation(ZeroValue); + + // Provide space for the X and Y axis and title. + chart->setPlotAreaPadding(100, Left); + chart->setPlotAreaPadding(50, Top | Bottom); + + // Add the curves + WDataSeries s(1, CurveSeries); + s.setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); + chart->addSeries(s); + + chart->resize(800, 300); // WPaintedWidget must be given explicit size + + chart->setMargin(10, Top | Bottom); // add margin vertically + chart->setMargin(WLength::Auto, Left | Right); // center horizontally + + ChartConfig *config = new ChartConfig(chart, this); + config->setValueFill(ZeroValueFill); +} + +PieExample::PieExample(WContainerWidget *parent): + WContainerWidget(parent) +{ + new WText(WString::tr("pie chart"), this); + + WStandardItemModel *model = new WStandardItemModel(this); + + //headers + model->insertColumns(model->columnCount(), 2); + model->setHeaderData(0, WString("Item")); + model->setHeaderData(1, WString("Sales")); + + //data + model->insertRows(model->rowCount(), 6); + int row = 0; + model->setData(row, 0, WString("Blueberry")); + model->setData(row, 1, 120); + // model->setData(row, 1, WString("Blueberry"), ToolTipRole); + row++; + model->setData(row, 0, WString("Cherry")); + model->setData(row, 1, 30); + row++; + model->setData(row, 0, WString("Apple")); + model->setData(row, 1, 260); + row++; + model->setData(row, 0, WString("Boston Cream")); + model->setData(row, 1, 160); + row++; + model->setData(row, 0, WString("Other")); + model->setData(row, 1, 40); + row++; + model->setData(row, 0, WString("Vanilla Cream")); + model->setData(row, 1, 120); + row++; + + //set all items to be editable and selectable + for (int row = 0; row < model->rowCount(); ++row) + for (int col = 0; col < model->columnCount(); ++col) + model->item(row, col)->setFlags(ItemIsSelectable | ItemIsEditable); + + WContainerWidget *w = new WContainerWidget(this); + WTableView* table = new WTableView(w); + + table->setMargin(10, Top | Bottom); + table->setMargin(WLength::Auto, Left | Right); + table->setSortingEnabled(true); + table->setModel(model); + table->setColumnWidth(1, 100); + table->setRowHeight(22); + + if (WApplication::instance()->environment().ajax()) { + table->resize(150 + 100 + 14, 20 + 6 * 22); + table->setEditTriggers(WAbstractItemView::SingleClicked); + } else { + table->resize(150 + 100 + 14, WLength::Auto); + table->setEditTriggers(WAbstractItemView::NoEditTrigger); + } + + /* + * Create the pie chart. + */ + WPieChart *chart = new WPieChart(this); + chart->setModel(model); // set the model + chart->setLabelsColumn(0); // set the column that holds the labels + chart->setDataColumn(1); // set the column that holds the data + + // configure location and type of labels + chart->setDisplayLabels(Outside | TextLabel | TextPercentage); + + // enable a 3D and shadow effect + chart->setPerspectiveEnabled(true, 0.2); + chart->setShadowEnabled(true); + + // explode the first item + chart->setExplode(0, 0.3); + + chart->resize(800, 300); // WPaintedWidget must be given an explicit size + + chart->setMargin(10, Top | Bottom); // add margin vertically + chart->setMargin(WLength::Auto, Left | Right); // center horizontally +} + diff --git a/wt-3.1.7a/examples/charts/ChartsExample.h b/wt-3.1.7a/examples/charts/ChartsExample.h new file mode 100644 index 0000000..8cf8824 --- /dev/null +++ b/wt-3.1.7a/examples/charts/ChartsExample.h @@ -0,0 +1,79 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CHARTS_EXAMPLE_H_ +#define CHARTS_EXAMPLE_H_ + +#include + +#include + +namespace Wt { + class WAbstractItemModel; + + namespace Ext { + class TableView; + } +} + +/** + * \defgroup chartsexample Charts example + */ +/*@{*/ + +/*! \brief A widget that demonstrates a times series chart + */ +class TimeSeriesExample: public Wt::WContainerWidget +{ +public: + /*! \brief Creates the time series scatter plot example + */ + TimeSeriesExample(Wt::WContainerWidget *parent); +}; + +/*! \brief A Widget that demonstrates a category chart + */ +class CategoryExample: public Wt::WContainerWidget +{ +public: + /*! \brief Creates the category chart example + */ + CategoryExample(Wt::WContainerWidget *parent); +}; + +/*! \brief A Widget that demonstrates a scatter plot + */ +class ScatterPlotExample: public Wt::WContainerWidget +{ +public: + /*! \brief Creates the scatter plot example + */ + ScatterPlotExample(Wt::WContainerWidget *parent); +}; + +/*! \brief A Widget that demonstrates a Pie chart + */ +class PieExample: public Wt::WContainerWidget +{ +public: + /*! \brief Creates the pie chart example + */ + PieExample(Wt::WContainerWidget *parent); +}; + +/*! \brief A widget that demonstrates various aspects of the charting lib. + */ +class ChartsExample : public Wt::WContainerWidget +{ +public: + /*! \brief Constructor. + */ + ChartsExample(Wt::WContainerWidget *root); +}; + +/*@}*/ + +#endif // CHARTS_EXAMPLE_H_ diff --git a/wt-3.1.7a/examples/charts/CsvUtil.C b/wt-3.1.7a/examples/charts/CsvUtil.C new file mode 100644 index 0000000..86d3f4d --- /dev/null +++ b/wt-3.1.7a/examples/charts/CsvUtil.C @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include +#include + +#include +#include + +#include "CsvUtil.h" + +void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model, + int numRows, bool firstLineIsHeaders) +{ + int csvRow = 0; + + while (f) { + std::string line; + getline(f, line); + + if (f) { + typedef boost::tokenizer > + CsvTokenizer; + CsvTokenizer tok(line); + + int col = 0; + for (CsvTokenizer::iterator i = tok.begin(); + i != tok.end(); ++i, ++col) { + + if (col >= model->columnCount()) + model->insertColumns(model->columnCount(), + col + 1 - model->columnCount()); + + if (firstLineIsHeaders && csvRow == 0) + model->setHeaderData(col, boost::any(Wt::WString::fromUTF8(*i))); + else { + int dataRow = firstLineIsHeaders ? csvRow - 1 : csvRow; + + if (numRows != -1 && dataRow >= numRows) + return; + + if (dataRow >= model->rowCount()) + model->insertRows(model->rowCount(), + dataRow + 1 - model->rowCount()); + + boost::any data; + std::string s = *i; + + char *endptr; + /* + int i = strtol(s.c_str(), &endptr, 0); + if (*endptr == 0) + data = boost::any(i); + else { + */ + double d = strtod(s.c_str(), &endptr); + if (*endptr == 0) + data = boost::any(d); + else + data = boost::any(Wt::WString::fromUTF8(s)); + /*}*/ + + model->setData(dataRow, col, data); + } + } + } + + ++csvRow; + } +} diff --git a/wt-3.1.7a/examples/charts/CsvUtil.h b/wt-3.1.7a/examples/charts/CsvUtil.h new file mode 100644 index 0000000..7870f8d --- /dev/null +++ b/wt-3.1.7a/examples/charts/CsvUtil.h @@ -0,0 +1,28 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CSV_UTIL_H_ +#define CSV_UTIL_H_ + +#include + +namespace Wt { + class WAbstractItemModel; +} + +/** + * @addtogroup chartsexample + */ +/*@{*/ + +/*! \brief Utility function that reads a model from a CSV file. + */ +extern void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model, + int numRows = -1, bool firstLineIsHeaders = true); + +/*@}*/ + +#endif // CSV_UTIL_H_ diff --git a/wt-3.1.7a/examples/charts/PanelList.C b/wt-3.1.7a/examples/charts/PanelList.C new file mode 100644 index 0000000..d722369 --- /dev/null +++ b/wt-3.1.7a/examples/charts/PanelList.C @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include + +#include "PanelList.h" + +using namespace Wt; + +PanelList::PanelList(WContainerWidget *parent) + : WContainerWidget(parent) +{ } + +WPanel *PanelList::addWidget(const WString& text, WWidget *w) +{ + WPanel *p = new WPanel(); + p->setTitle(text); + p->setCentralWidget(w); + + addPanel(p); + + return p; +} + +void PanelList::addPanel(WPanel *panel) +{ + panel->setCollapsible(true); + panel->collapse(); + + panel->expandedSS().connect(this, &PanelList::onExpand); + + WContainerWidget::addWidget(panel); +} + +void PanelList::onExpand(bool notUndo) +{ + WPanel *panel = dynamic_cast(sender()); + + if (notUndo) { + wasExpanded_ = -1; + + for (unsigned i = 0; i < children().size(); ++i) { + WPanel *p = dynamic_cast(children()[i]); + if (p != panel) { + if (!p->isCollapsed()) + wasExpanded_ = i; + p->collapse(); + } + } + } else { + if (wasExpanded_ != -1) { + WPanel *p = dynamic_cast(children()[wasExpanded_]); + p->expand(); + } + } +} diff --git a/wt-3.1.7a/examples/charts/PanelList.h b/wt-3.1.7a/examples/charts/PanelList.h new file mode 100644 index 0000000..199bb50 --- /dev/null +++ b/wt-3.1.7a/examples/charts/PanelList.h @@ -0,0 +1,31 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef PANEL_LIST_H_ +#define PANEL_LIST_H_ + +#include + +namespace Wt { + class WPanel; +} + +class PanelList : public Wt::WContainerWidget +{ +public: + PanelList(Wt::WContainerWidget *parent); + + Wt::WPanel *addWidget(const Wt::WString& text, Wt::WWidget *w); + void addPanel(Wt::WPanel *panel); + void removePanel(Wt::WPanel *panel); + +private: + void onExpand(bool notUndo); + + int wasExpanded_; +}; + +#endif // PANEL_LIST_H_ diff --git a/wt-3.1.7a/examples/charts/category.csv b/wt-3.1.7a/examples/charts/category.csv new file mode 100644 index 0000000..b966804 --- /dev/null +++ b/wt-3.1.7a/examples/charts/category.csv @@ -0,0 +1,6 @@ +"Age","Rural Male","Rural Female","Urban Male","Urban Female" +"70-74",66.0,54.3,71.1,50.0 +"65-69",41.0,30.9,54.6,35.1 +"60-64",126.9,20.3,37.0,19.3 +"55-59",18.1,149.0,24.3,13.6 +"50-54",11.7,8.7,15.4,8.4 diff --git a/wt-3.1.7a/examples/charts/charts.css b/wt-3.1.7a/examples/charts/charts.css new file mode 100644 index 0000000..2979967 --- /dev/null +++ b/wt-3.1.7a/examples/charts/charts.css @@ -0,0 +1,60 @@ +body, html { + font-family:verdana,helvetica,tahoma,sans-serif; +} + +p.p { + margin: 16px 0px; + font-size: smaller; +} + +h2 { + padding-left: 30px; + border-bottom: 1px solid #000; +} + +h2 span { + border-bottom: 0.2em solid #000; +} + +.trhead { + font-family: sans-serif; + font-size: 10pt; + font-weight: bold; + border-bottom: 1px solid black; +} + +.trhead td { + padding-left: 4px; + padding-right: 4px; +} + +.trdata { + font-family: sans-serif; + font-size: 10pt; +} + +.trdata td { + vertical-align: middle; + padding-left: 4px; + padding-right: 4px; +} + +.trdata td input[type="checkbox"] { + text-align: center; + margin: 0px auto; + display: block; +} + +.tdhead { + font-family: sans-serif; + font-size: 10pt; + font-weight: bold; + padding-right: 8px; + text-align: right; +} + +.tddata { + font-family: sans-serif; + font-size: 10pt; + padding-left: 4px; +} diff --git a/wt-3.1.7a/examples/charts/charts.xml b/wt-3.1.7a/examples/charts/charts.xml new file mode 100644 index 0000000..24de8bf --- /dev/null +++ b/wt-3.1.7a/examples/charts/charts.xml @@ -0,0 +1,117 @@ + + + + +
The data file "{1}" could not be found. Check your deployment.
+ +
+ + +

Introduction

+ +

+ This example demonstrates some of the capabilities of + the Wt charting widgets. These widgets are implemented + using + the Wt painting API, which provides cross-browser + native painting, using VML, SVG, or the Html 5 canvas tag. +

+ +

+ The two main chart widgets + are WCartesianChart, which provides category charts + and scatter plots, + and WPieChart + which provides pie charts. These widgets are based on the MVC + mechanism, and retrieve their data from + a WAbstractItemModel. +

+ +

+ Many aspects of the charts may be customized. By default, style + information for rendering data series are taken from a + WChartPalette. It + is straight forward to specialize this class to provide different + styles from the standard styles provided by WStandardPalette. +

+ +

+ Btw, would you expect this example to work when Ajax/JavaScript are + not available or disabled? +

+ +
+ + +

Category Chart

+ +

+ A category chart uses categories on the X axis, and displays one or + more data series on the Y axes. The values corresponding to each + category are plotted consecutively (this is the main difference with + a ScatterPlot). Each data series corresponds to a column from the + model. +

+ +

+ A cartesian chart provides automatic configuration of the axes, and + support for a second Y axis. In addition, you may use a simple + built-in legend, or extend the class to provide a specialized + legend. +

+ +

+ The table view allows editing of the model, which is automatically + reflected in the chart. +

+ +
+ + +

Scatter Plot (time series)

+ +

+ A scatter plot is very much like a category chart, but uses + numerical data on the X axis. By default, these numerical data are + mapped linearly on the X axis, but may also be log transformed (as + can be configured for the Y axes). In addition, there is special + support for displaying date series, by means of smart heuristics for + chosing the labels on the X axis. +

+ +

+ Below is an extract from historical financial market data. +

+ +
+ + +

Scatter Plot (sine function)

+ +

+ Below we plot a single sine curves. We use 'curve' data series, + which creates a smooth spline curve that interpolates the data + points. As is typical when showing mathematical functions, we let + the axes cross each other at the origin (0, 0). +

+ +
+ + +

Pie chart

+ +

+ The pie chart is provided by the WPieChart widget. A pie chart can + only display data from one data series. The class supports both + plain 2D pies, as well as a 3D effect (as used below). As shown + below for the first segment, these may be separated from the pie to + show emphasis. +

+ +
+
diff --git a/wt-3.1.7a/examples/charts/timeseries.csv b/wt-3.1.7a/examples/charts/timeseries.csv new file mode 100644 index 0000000..c98b66c --- /dev/null +++ b/wt-3.1.7a/examples/charts/timeseries.csv @@ -0,0 +1,500 @@ +"Date","AMSTEOE","DAXINDX","FTSE100","HNGKNGI","JAPDOWA","SNGALLS","SPCOMP" +06/01/86,275.76,1425.56,1424.1,1796.59,13053.8,233.63,210.65 +07/01/86,275.43,1428.54,1415.2,1815.53,12991.2,237.37,213.8 +08/01/86,278.76,1474.24,1404.2,1826.84,13056.4,240.99,207.97 +09/01/86,272.29,1461.18,1379.6,1798.51,13034.2,239.68,206.11 +10/01/86,272.89,1448.97,1394.5,1807.94,12998.2,238.95,205.96 +13/01/86,268.02,1451.64,1383.2,1799.61,12977.02,237.78,206.72 +14/01/86,270.22,1472.09,1370.1,1782.23,12928.6,236.81,206.34 +15/01/86,274.42,1507.77,1390.5,1783.66,12928.6,235.79,208.26 +16/01/86,277.62,1490.79,1394.5,1797.22,13027.1,233.91,209.17 +17/01/86,276.45,1504.64,1396,1806.86,13009.7,232.72,208.43 +20/01/86,273.74,1491.04,1378.3,1775.82,12952,228.57,207.53 +21/01/86,274.35,1462.65,1378.1,1776.19,12881.5,229.25,205.79 +22/01/86,271.41,1424.05,1390.9,1737.94,12923.3,225.52,203.49 +23/01/86,261.18,1398.42,1382.8,1762.29,12888.89,225.32,204.25 +24/01/86,268.01,1449.78,1392,1745.8,12904.2,226.8,206.43 +27/01/86,269.28,1460.25,1405,1744.11,12983.4,226.98,207.39 +28/01/86,266.62,1418.45,1426.3,1754.38,12993.7,226.99,209.81 +29/01/86,264.49,1409.21,1421,1736.35,12957.1,224.3,210.29 +30/01/86,259.52,1380.06,1421,1720.21,12949,224.32,209.33 +31/01/86,263.4,1387.12,1435,1695.78,13024.3,225.85,211.78 +03/02/86,267.21,1394.78,1425.1,1702.38,13086.5,227.08,213.96 +04/02/86,269.95,1416.79,1431.6,1728.81,13138.1,227.57,216.24 +05/02/86,268.88,1435,1424.1,1723.08,13185.7,229.17,212.96 +06/02/86,268,1436,1426.9,1719.67,13186.6,228.79,213.47 +07/02/86,259.85,1434.14,1445,1734.04,13212.13,226.43,214.56 +10/02/86,266.87,1437,1461.5,1734.04,13226.1,226.43,216.24 +11/02/86,264.56,1444.17,1453.9,1734.04,13226.1,226.43,215.92 +12/02/86,262.57,1434.96,1470,1743.03,13300.6,227.43,215.97 +13/02/86,260.84,1402.35,1473.5,1746.4,13293.8,227.49,217.4 +14/02/86,261.76,1392.66,1477.9,1777.54,13342.78,227.18,219.76 +17/02/86,261.33,1364,1475.3,1783.08,13447.9,225.7,219.76 +18/02/86,260.54,1406.91,1491.9,1771.41,13436.2,226.95,222.45 +19/02/86,256.66,1394.5,1491.4,1751.67,13466.6,228.68,219.76 +20/02/86,255.04,1380.4,1492.1,1733.17,13355.4,233.15,222.22 +21/02/86,254.61,1395.74,1518,1747.06,13394.31,232.97,224.62 +24/02/86,251.88,1393.77,1533,1742.37,13503.5,230.42,224.34 +25/02/86,248,1358.19,1527.7,1746.05,13576.2,229.01,223.79 +26/02/86,248.85,1344.44,1534.6,1746.3,13621.7,228.1,224.04 +27/02/86,246.46,1323.93,1549.5,1720.51,13642.1,227.83,226.77 +28/02/86,247.69,1357.34,1543.9,1685.3,13640.83,226.27,226.74 +03/03/86,245.27,1361.01,1534.7,1685.06,13757.6,225.89,225.42 +04/03/86,252.23,1404.3,1548.9,1695.77,13784.3,226.14,224.38 +05/03/86,257.02,1421.8,1569.1,1664.33,13807.5,223.39,224.34 +06/03/86,259.66,1421.67,1566.1,1668.51,13901.6,222.46,225.13 +07/03/86,259.66,1421.06,1573.8,1682.65,13994.6,221.2,225.57 +10/03/86,263.97,1435.86,1572.2,1667.07,14056.5,219.87,226.58 +11/03/86,264.31,1455.77,1597.1,1639.15,14066.19,219.28,231.69 +12/03/86,264.31,1473.7,1624.5,1590.39,14238.13,217.29,232.54 +13/03/86,266.9,1465.5,1616.7,1612.67,14414.69,213.71,233.19 +14/03/86,265.45,1473.21,1624.4,1607.63,14516.77,211.84,236.55 +17/03/86,264.08,1476.99,1622.6,1566.49,14655.5,211.44,234.67 +18/03/86,265.5,1457.57,1644.4,1561.72,14639.3,210.95,235.78 +19/03/86,266.61,1481.46,1659.8,1559.94,14476.5,210.44,235.6 +20/03/86,268.04,1473.97,1690.1,1605.7,14753.3,211.01,236.54 +21/03/86,267.08,1460.02,1688.3,1611.73,14753.3,213.13,233.34 +24/03/86,265.9,1443.81,1663.9,1635.29,14975.5,213.87,235.33 +25/03/86,263.63,1457.02,1633.8,1626.71,14826.86,215.51,234.72 +26/03/86,263.63,1472.91,1653.9,1618.8,15059.7,219.33,237.3 +27/03/86,269.81,1481.63,1668.8,1625.94,15337.18,218.95,238.97 +28/03/86,269.81,1481.63,1668.8,1625.94,15364.3,218.95,238.97 +31/03/86,269.81,1481.63,1668.8,1625.94,15859.69,216,238.9 +01/04/86,273.64,1496.95,1684,1625.94,15745.89,216.47,235.14 +02/04/86,273.82,1497.41,1702.9,1603.27,15555.5,217.36,235.71 +03/04/86,275.37,1514.94,1717.6,1625.2,15272.19,215.73,232.47 +04/04/86,274.47,1510.38,1709.7,1643.8,15019.81,213.83,228.69 +07/04/86,275.1,1531.83,1688.5,1691.6,15062,212.95,228.63 +08/04/86,272.14,1541.74,1675.7,1727.93,15014.1,212.74,233.52 +09/04/86,273.33,1535.77,1659,1752.34,15110.19,211.95,233.75 +10/04/86,271.89,1523.85,1690.3,1758.57,15203.6,211.07,236.44 +11/04/86,272.9,1544.74,1694.1,1784.21,15326.3,210.98,235.98 +14/04/86,277.62,1570.48,1683.1,1785.45,15396.8,208.51,237.79 +15/04/86,273.64,1549.74,1654.8,1763.73,15352.32,209.74,237.73 +16/04/86,276.06,1572.26,1662,1791.19,15358.39,209.98,242.22 +17/04/86,277.33,1586.04,1680.9,1812,15486.8,210.89,243.03 +18/04/86,275.18,1579.07,1680.2,1790.4,15758.61,212.08,242.38 +21/04/86,274.35,1563.47,1668.5,1788.38,15827.3,212.19,244.74 +22/04/86,274.32,1558.18,1665.2,1792.9,15712.89,211.74,242.42 +23/04/86,270.3,1525.88,1632.7,1783.19,15748,209.99,241.75 +24/04/86,270.18,1512.93,1615.5,1824.51,15682,209.21,242.02 +25/04/86,269.95,1509.61,1622.6,1834.62,15689.88,208.8,241.98 +28/04/86,260.95,1472.21,1628.8,1848.65,15757.9,206.73,243.08 +29/04/86,264.71,1516.3,1650.1,1826.29,15757.9,208.74,240.51 +30/04/86,264.71,1507.32,1660.5,1836.99,15825.5,207.62,235.52 +01/05/86,261.86,1507.32,1640.1,1848.65,15782.6,207.62,235.16 +02/05/86,261.33,1491.7,1652.5,1843.14,15868.44,207.46,234.79 +05/05/86,260.59,1462.49,1652.5,1842.44,15868.44,207.54,237.73 +06/05/86,263.97,1483.76,1636.2,1858.16,15900.14,208.43,237.24 +07/05/86,258.71,1465.68,1610.1,1865.65,15953.85,209,236.08 +08/05/86,258.71,1465.68,1602.6,1864.21,16078.23,209.43,237.96 +09/05/86,255.61,1442.59,1601.6,1852.21,16194.98,209.2,237.85 +12/05/86,253.15,1398.92,1603.8,1832.5,16105.19,210.08,237.58 +13/05/86,251.08,1388.24,1623.3,1803.73,15982.3,212.36,236.43 +14/05/86,254.3,1412.63,1594.3,1820.68,15943.69,213.68,237.54 +15/05/86,256.21,1383.21,1575.7,1794.17,15924.7,213.23,234.43 +16/05/86,254.93,1370.09,1564.9,1787.08,15739.05,211.57,232.75 +19/05/86,254.93,1370.09,1573.1,1765.02,15697.5,210.72,233.2 +20/05/86,258.07,1336.64,1585.8,1777.27,15690,209.52,236.11 +21/05/86,265.31,1360.14,1591.9,1794.94,15808.1,210.76,235.45 +22/05/86,265.31,1403.9,1598.8,1820.98,15917.3,211.34,240.12 +23/05/86,265.31,1401.32,1617.4,1815.92,16204.98,211.34,241.35 +26/05/86,277.73,1394.34,1617.4,1811.87,16409.5,214.38,241.35 +27/05/86,275.67,1366.2,1612.1,1816.3,16467.3,217.36,244.75 +28/05/86,278.04,1363.46,1624.8,1777.47,16553.39,218.07,246.63 +29/05/86,277.74,1363.46,1609,1772.76,16610.6,219.64,247.98 +30/05/86,277.98,1380.47,1602.8,1787.96,16670.77,221.66,247.35 +02/06/86,278.97,1369.47,1596.5,1781.94,16739.3,227.7,245.04 +03/06/86,275.95,1329.3,1602.2,1757.91,16669.5,230.23,245.51 +04/06/86,277.51,1345.72,1601.4,1756.67,16802.7,230.54,243.94 +05/06/86,274.66,1355.58,1612.6,1748.56,16811,228.94,245.65 +06/06/86,273.56,1366.54,1611.9,1747.09,16817.9,230.61,245.67 +09/06/86,273.68,1394.43,1604.6,1748.24,17008.3,230.61,239.96 +10/06/86,272.43,1384.11,1586.5,1751.36,16967.69,237.35,239.58 +11/06/86,272.93,1386.39,1571.4,1751.36,17096.39,237.59,241.13 +12/06/86,273.88,1408.88,1571.8,1752.79,17131.19,237,241.49 +13/06/86,279.03,1420.79,1582.4,1765.65,17205.97,234.8,245.72 +16/06/86,277.48,1449.28,1593.6,1765.65,17185.6,236.67,246.13 +17/06/86,277.33,1449.28,1605.3,1789.34,17075.89,239.63,244.35 +18/06/86,276,1422.16,1619,1789.78,17177.06,243.53,244.99 +19/06/86,275.77,1400.69,1629.6,1778.29,17277.59,245.5,244.06 +20/06/86,275.62,1386.02,1637.2,1781.04,17403.13,247.8,247.56 +23/06/86,276.27,1397.01,1622.8,1777.15,17457.89,252.65,245.26 +24/06/86,274.06,1368.33,1624.9,1763.9,17342.39,250.47,247.03 +25/06/86,275.35,1361.97,1629.4,1759.72,17516.63,252.41,248.93 +26/06/86,275.35,1361.4,1637.5,1750.38,17600.94,248.62,248.74 +27/06/86,274.56,1381.33,1634.5,1750.98,17500.43,248.29,249.6 +30/06/86,272.45,1357.45,1649.8,1739.11,17654.19,244.64,250.84 +01/07/86,269.94,1342.77,1660.8,1733.51,17622.69,245.4,252.04 +02/07/86,272.56,1354.93,1656.7,1760.21,17669.89,246.09,252.7 +03/07/86,272.56,1341.01,1656.2,1757.58,17691.8,242.19,251.79 +04/07/86,274.82,1315.73,1649,1756.76,17597.73,241.98,251.79 +07/07/86,274.29,1284.47,1631,1761.52,17714.1,239.5,244.05 +08/07/86,269.64,1288.99,1599,1752.24,17734.1,241.28,241.59 +09/07/86,272.75,1297.12,1614.6,1747.61,17506.1,236.49,242.82 +10/07/86,274.09,1327.04,1626.7,1718.3,17469.8,238.08,243.01 +11/07/86,275.5,1339.04,1626.4,1721.69,17670.77,240.29,242.22 +14/07/86,273.01,1342.22,1597.3,1739.93,17820.6,241.53,238.11 +15/07/86,270.4,1309.55,1593,1764.13,17882.8,239.95,233.66 +16/07/86,268.49,1271.42,1597.3,1763.38,17700.89,239.57,235.01 +17/07/86,268.34,1290.27,1609.3,1759.71,17725.6,240.34,236.07 +18/07/86,267.42,1290.51,1584.4,1759.6,17838.84,239.89,236.36 +21/07/86,264.08,1257.54,1560.2,1777.73,17522.19,237.01,236.24 +22/07/86,261.61,1248.58,1559.2,1791.53,17639.3,236.8,238.18 +23/07/86,262.42,1269.15,1572.3,1816.96,17860.1,236.16,238.67 +24/07/86,260.67,1292.25,1547.7,1836,18026.19,234.55,237.95 +25/07/86,261.38,1306.12,1545.8,1843.57,18050.59,234.91,240.22 +28/07/86,262.19,1289.92,1549.4,1847.29,18038.89,235.87,236.01 +29/07/86,259.35,1285.91,1556.4,1860.01,17728.89,238.76,234.55 +30/07/86,261.62,1292.39,1566.3,1847.94,17799,239.08,236.59 +31/07/86,262.27,1288.6,1558.1,1855.46,17509.69,238.65,236.12 +01/08/86,264.73,1282.63,1561.8,1874.11,17321.93,238.66,234.91 +04/08/86,265.63,1294.34,1545.4,1906.28,17263.1,241.68,235.99 +05/08/86,267.8,1320.67,1561.6,1889.04,17414.8,243.21,237.03 +06/08/86,265.7,1324.01,1540.4,1887.83,17353.5,242.38,236.84 +07/08/86,265.75,1337.34,1529.9,1920.18,17422.39,241.7,237.04 +08/08/86,269.53,1391.97,1526.7,1931.29,17435.52,241.21,236.88 +11/08/86,273.46,1415.58,1542.8,1927.04,17479.1,242.09,240.68 +12/08/86,275.46,1415.86,1558.2,1905,17794.69,242.71,243.34 +13/08/86,277.29,1437.88,1581,1908.02,18000.76,247.14,245.67 +14/08/86,276.64,1439.17,1588.2,1925.16,18264.69,249.31,246.22 +15/08/86,266.83,1425.87,1601.9,1935.76,18376.39,251.3,247.15 +18/08/86,268.67,1442.75,1609,1950.12,18597.39,252.04,247.38 +19/08/86,268.18,1472.66,1604.4,1935.69,18792.6,250.58,246.51 +20/08/86,267.71,1447.38,1604.6,1941.28,18936.19,250.3,249.77 +21/08/86,269.66,1466.61,1606.8,1941.36,18675.6,251.97,249.67 +22/08/86,265.78,1469.06,1607.1,1946.03,18441.31,251.86,250.19 +25/08/86,262.35,1483.33,1607.1,1946.03,18565.6,253.66,247.81 +26/08/86,264.45,1464.63,1616.2,1917,18640.81,252.42,252.84 +27/08/86,268.29,1484.53,1629.8,1932.99,18503.27,256.19,253 +28/08/86,265.74,1479.73,1636.8,1934.2,18367.98,257.39,252.84 +29/08/86,265.39,1497.5,1661.2,1913,18553.68,259.59,252.93 +01/09/86,269.98,1502.7,1672.8,1903.02,18820.75,264.7,252.93 +02/09/86,273.11,1506.04,1667.8,1930.61,18694.93,264.7,248.52 +03/09/86,273.11,1488.58,1670.7,1944.99,18505.44,262.09,250.08 +04/09/86,275.26,1486.12,1680.3,1946.7,18559.64,261.85,253.82 +05/09/86,276.09,1497.62,1684.8,1968.53,18775.07,264.39,250.48 +08/09/86,271.75,1477.99,1666.6,1969.98,18552.2,264.1,248.14 +09/09/86,273.07,1467.4,1673.4,1966.02,18474.1,262.56,247.67 +10/09/86,271.09,1479.75,1663.5,1976.16,18619.3,259.71,247.06 +11/09/86,269.97,1478,1636.5,1997.92,18561.25,262.6,235.18 +12/09/86,262.33,1456.21,1608.6,1966.33,18100.52,260.55,230.68 +15/09/86,263.68,1456.87,1628.3,1942.34,18100.52,258.65,231.94 +16/09/86,258.89,1449.63,1596.7,1927.97,17463.19,256.5,231.72 +17/09/86,258.07,1420.57,1610.4,1921.99,17336.6,258.83,231.68 +18/09/86,255.38,1397.96,1615.5,1925.82,17478.3,258.06,232.31 +19/09/86,255.38,1410.57,1600.4,1925.82,17523.39,256.36,232.21 +22/09/86,258.18,1417.2,1617.1,1953.6,17706.3,254.53,234.93 +23/09/86,262.58,1447,1610,1992.6,17706.3,256.47,235.67 +24/09/86,262.05,1436.13,1603.4,2008.3,17955.8,258.37,236.28 +25/09/86,259.79,1438.67,1575.9,2011.7,17988.3,255.56,231.83 +26/09/86,256.36,1416.51,1568.6,2034.36,17960.69,256.64,232.23 +29/09/86,249.92,1401.63,1539.2,2064.3,18106.31,256.64,229.91 +30/09/86,253.98,1408.02,1555.8,2068.44,17852.89,256.64,231.32 +01/10/86,256.84,1443.2,1578.3,2090.24,17564.39,256.64,233.6 +02/10/86,256.84,1448.99,1573.1,2120.14,17019.1,256.64,233.92 +03/10/86,255.05,1444.66,1560.8,2134.8,17240.22,256.64,233.71 +06/10/86,254.89,1440.81,1578.9,2084.93,17435.3,256.64,234.78 +07/10/86,256.84,1454.64,1592.3,2162.76,17604.39,256.64,234.41 +08/10/86,259.41,1443.42,1587.8,2204.41,17514.8,256.64,236.68 +09/10/86,255.56,1440.44,1608.6,2271.15,17650.19,256.64,235.85 +10/10/86,255.56,1429.54,1599.4,2279.52,17650.19,256.64,235.48 +13/10/86,249.77,1421.69,1612.3,2279.52,17338.69,256.64,235.91 +14/10/86,251.52,1433.18,1592.5,2249.22,17318,256.64,235.37 +15/10/86,251.21,1418.42,1607.5,2289.65,16970.1,256.64,238.8 +16/10/86,251.69,1420.94,1605,2277.77,16871.89,256.64,239.53 +17/10/86,251.86,1399.79,1610,2234.89,16701.34,256.64,238.84 +20/10/86,249.36,1395.07,1590.2,2227.76,16523.39,256.64,235.97 +21/10/86,249.35,1406.79,1591.2,2238.29,16205.8,256.64,235.88 +22/10/86,248.44,1401.68,1589.6,2238.29,15819.5,256.64,236.26 +23/10/86,248.09,1410.61,1572.5,2254.79,16308.3,256.64,239.28 +24/10/86,251.69,1429.15,1577.1,2286.07,16284,256.64,238.26 +27/10/86,250.89,1420.61,1586.1,2343.66,16157.8,256.64,238.77 +28/10/86,250.02,1400.72,1583.6,2355.93,16397.8,256.64,239.26 +29/10/86,247.07,1384.13,1597,2345.24,16505.39,256.64,240.94 +30/10/86,255.65,1410.16,1615.8,2312.81,17010.89,253.91,243.71 +31/10/86,255.76,1426.32,1632.1,2315.63,16910.63,251.95,243.98 +03/11/86,256.58,1432.73,1639.2,2258.78,16910.63,290.72,245.8 +04/11/86,256.58,1437.4,1637.7,2265.82,16786.89,289.37,246.2 +05/11/86,254.67,1424.2,1644.4,2203.71,16713.69,285.08,246.58 +06/11/86,257.34,1429.39,1648.5,2230.65,16758.3,283.45,245.87 +07/11/86,260.6,1429.93,1662.6,2218.38,16973.6,281,245.77 +10/11/86,259.71,1425.68,1656.2,2206.76,17053.2,275.59,246.13 +11/11/86,261.51,1412.39,1660.9,2207.25,17300.6,275.27,247.08 +12/11/86,260.07,1403.01,1654.3,2239.71,17447.89,278.82,246.64 +13/11/86,256.81,1411.26,1644.6,2261.45,17438.5,278.74,243.02 +14/11/86,255.31,1408.84,1644.3,2244.03,17390.5,277.21,244.5 +17/11/86,253.47,1396.35,1628,2242.89,17208.1,275.33,243.21 +18/11/86,256.06,1402.91,1617.5,2249.97,17273.52,279.51,236.78 +19/11/86,255.3,1402.91,1604.3,2243.34,17283.81,278.5,237.66 +20/11/86,258.4,1411.98,1610.7,2245.95,17304.6,278.3,242.05 +21/11/86,258.4,1435.01,1624.9,2273.98,17489.57,272.05,245.86 +24/11/86,263.15,1451.7,1636.5,2343.59,17489.57,271.43,247.45 +25/11/86,260.14,1456.91,1619.3,2361.12,17747.5,275.95,248.17 +26/11/86,260.57,1456.91,1633.2,2377.71,17727.89,274.43,248.77 +27/11/86,261.54,1461.71,1632.5,2354.33,17883.65,272.43,248.77 +28/11/86,262.23,1466.28,1636.7,2418.75,18083,271.37,249.22 +01/12/86,259.74,1453.12,1617.8,2452.15,18308,272.66,249.05 +02/12/86,261.78,1452.67,1625.5,2458.2,18191,275.94,254 +03/12/86,263.88,1470.41,1615.1,2460,18455.1,275.82,253.83 +04/12/86,262.36,1460.22,1610.1,2430.52,18623.89,274.77,253.04 +05/12/86,261.93,1463.9,1613.5,2400.72,18637.39,275.29,251.17 +08/12/86,262.39,1455.94,1623.4,2431.29,18710.69,274.86,251.16 +09/12/86,262.8,1455.31,1635.9,2440.35,18602.69,272.71,249.28 +10/12/86,261.83,1452.82,1634.6,2442.59,18776.19,272.6,250.96 +11/12/86,264.5,1448.1,1634,2467.13,18731.19,273.07,248.17 +12/12/86,262.99,1444.15,1629.8,2463.23,18830.6,273.66,247.35 +15/12/86,258.32,1436.27,1637,2449.43,18788.89,272.03,248.21 +16/12/86,258.32,1446.98,1637.9,2440.68,18933.1,271.5,250.04 +17/12/86,255.11,1436.98,1636.3,2411.08,18847.89,272.9,247.56 +18/12/86,254.45,1429.95,1630.6,2422.22,18723.69,274.74,246.78 +19/12/86,256.82,1428.2,1632.2,2463.81,18930,275.12,249.44 +22/12/86,256.82,1421.62,1652.2,2503.77,18825.39,273.35,248.75 +23/12/86,254.6,1435.64,1660.9,2501.94,18808.5,273.56,246.34 +24/12/86,254.37,1435.64,1665.1,2523.92,18902.85,274.39,246.75 +25/12/86,254.37,1435.64,1665.1,2523.92,18902.85,274.39,246.75 +26/12/86,254.37,1435.64,1665.1,2523.92,18820.64,274.48,246.92 +29/12/86,254.37,1434.26,1671.6,2552.45,18820.64,270.44,244.67 +30/12/86,252.75,1432.25,1673.1,2559.36,18820.64,273.42,243.37 +31/12/86,252.75,1432.25,1679,2568.3,18820.64,273.42,242.17 +01/01/87,252.75,1432.25,1679,2568.3,18820.64,270.75,242.17 +02/01/87,252.67,1413.17,1681.1,2540.06,18820.64,271.14,246.45 +05/01/87,253.04,1421.88,1680,2552.4,18820.5,270.82,252.19 +06/01/87,251.22,1434.26,1690.7,2583.87,18936.8,270.42,252.78 +07/01/87,251.96,1418.05,1722.2,2607.11,18842.39,270.72,255.33 +08/01/87,251.96,1382.34,1733.1,2603.33,18778.69,273.4,257.28 +09/01/87,251.96,1348.72,1752.3,2561.73,18810.3,278.7,258.73 +12/01/87,236.97,1336.44,1755.6,2614.87,18669,284.7,260.3 +13/01/87,237.85,1326.7,1763.3,2590.83,18544,285.82,259.95 +14/01/87,239.99,1331.2,1765.2,2578.23,18784.64,288.88,262.64 +15/01/87,242.95,1353.4,1789,2559.12,18784.64,285.78,265.49 +16/01/87,244.44,1356.79,1789,2542.57,19149.63,286.93,266.28 +19/01/87,240.37,1328.3,1778.4,2460.46,19188.7,287.97,269.34 +20/01/87,240.9,1330.49,1778.9,2449.88,19216.1,285.18,269.04 +21/01/87,239.94,1332.32,1761.6,2533.9,19429.19,287.97,267.84 +22/01/87,239.59,1336.78,1777.5,2536.94,19380.5,286.79,273.91 +23/01/87,239.47,1347.75,1795.3,2499.43,19456.6,284.94,270.11 +26/01/87,233.45,1309.03,1781.8,2484.35,19554.69,284.04,269.61 +27/01/87,232.73,1294.76,1814.4,2524.01,19686.8,283.88,273.75 +28/01/87,227.21,1249.94,1812.1,2553.25,19789.89,288.72,275.4 +29/01/87,231.2,1272.92,1798.1,2553.25,19921,288.72,274.24 +30/01/87,235.24,1294.45,1808.3,2553.25,20048.3,288.72,274.08 +02/02/87,233.02,1276.38,1832.8,2585.22,20072.1,291.32,276.45 +03/02/87,230.65,1241.23,1828.6,2606.38,19956.3,292.97,275.99 +04/02/87,230.03,1216.31,1846.7,2636.63,19973.89,294.08,279.64 +05/02/87,231.48,1229.63,1866.1,2652.14,19795.1,295.18,281.16 +06/02/87,231.7,1250.68,1898.4,2673.57,19668.81,294.29,280.04 +09/02/87,230.16,1269.94,1910.7,2713.67,19679.31,296.33,278.16 +10/02/87,228.8,1254.36,1874.9,2694.85,19814,299.08,275.07 +11/02/87,230.81,1253.62,1895.8,2739.47,19814,300.8,277.54 +12/02/87,233.42,1265.63,1878.6,2754.72,19874.89,304.3,278.04 +13/02/87,232.89,1277.46,1898.1,2740.49,19628.86,305.23,279.7 +16/02/87,232.15,1260.31,1925.8,2766.06,19532.5,309.1,279.7 +17/02/87,233.77,1232.9,1942,2792.08,19637.89,306.83,285.49 +18/02/87,235.35,1249.04,1952,2801.48,19881.8,309.5,285.42 +19/02/87,236.47,1276.75,1930.1,2775.82,20228.1,313.84,285.57 +20/02/87,237.98,1265.44,1961.5,2827.4,20080.39,317.97,285.48 +23/02/87,235.26,1242.94,1939.7,2879.01,19940.5,315.63,282.38 +24/02/87,235.54,1239.86,1946.8,2848.19,20076.5,315.2,282.88 +25/02/87,236.24,1250.98,1973.1,2873.58,20186.3,317.81,284 +26/02/87,235.27,1243.87,1980.2,2843.6,20453.89,317.31,282.96 +27/02/87,233.95,1244.36,1979.2,2877.87,20421.64,318.31,284.2 +02/03/87,235.27,1236.55,1983.1,2894.26,20933.8,317.93,283 +03/03/87,231.18,1244.02,1998.3,2939.05,20971.39,316.05,284.12 +04/03/87,234.08,1256.7,2002.7,2890.93,21031.69,318.93,288.62 +05/03/87,236.76,1273.63,2002.8,2798.44,21176.02,321.35,290.52 +06/03/87,236.48,1262.8,1998.2,2798.24,21105.8,321.93,290.66 +09/03/87,236.56,1275.19,1973.7,2820.38,21166.39,322.18,288.3 +10/03/87,237.21,1264.03,1987.7,2731.05,21214.5,322.32,290.86 +11/03/87,240.62,1253.39,1979.4,2760.9,21313,320.49,290.31 +12/03/87,242.07,1250.23,1989.7,2750.14,21470.19,318.75,291.22 +13/03/87,243.77,1243.09,2000,2721.17,21497.89,313.99,289.89 +16/03/87,241.31,1238.37,1991.8,2669.57,21415.39,312.78,288.23 +17/03/87,241.27,1220.85,2006.3,2629.28,21514.69,307.34,292.47 +18/03/87,244.49,1214.38,2006.6,2724.01,21705.1,311.17,292.78 +19/03/87,239.92,1179.83,1991,2721.28,21644.3,312.17,294.08 +20/03/87,241.28,1196.12,2017.5,2780.55,21657.6,318.43,298.17 +23/03/87,242.68,1217.32,2033,2813.4,21588.19,318.87,301.16 +24/03/87,241.29,1235.58,2056.2,2828.07,21435.3,315.47,301.64 +25/03/87,238.78,1240.45,2042.9,2831.5,21473,319.97,300.38 +26/03/87,239.27,1270.5,2037.8,2783.12,21558.8,319.93,300.93 +27/03/87,242.3,1306.8,2048.6,2798.74,22026.6,319.15,296.13 +30/03/87,244.8,1296.76,2002.5,2774.88,21627.6,317.27,289.2 +31/03/87,241.56,1301.71,1997.6,2713.81,21566.69,314.02,291.7 +01/04/87,241.56,1332.54,1973.1,2695.91,22040.19,309.83,292.39 +02/04/87,246.91,1334.32,1987.7,2709.41,22367.69,313.64,293.63 +03/04/87,247.19,1335.33,1965.1,2679.99,22410.8,316.37,300.41 +06/04/87,253.87,1358.2,1989.6,2679.99,22586.1,317.86,301.95 +07/04/87,255.99,1331.35,1987,2664.7,22784.6,316.47,296.69 +08/04/87,256.01,1337.45,1976.7,2729.55,22913,319.28,297.26 +09/04/87,253.57,1327.37,1962.8,2785.47,22922.19,322.75,292.86 +10/04/87,249.28,1297.95,1936.7,2766.41,23216.5,323.57,292.49 +13/04/87,248.01,1282.22,1917.1,2708.94,22919.5,326.7,285.62 +14/04/87,244.44,1299.96,1908.9,2668.35,23524.1,326.02,279.16 +15/04/87,246.84,1312.12,1922.2,2693.62,23510.69,325.77,284.44 +16/04/87,248.98,1323.28,1949.4,2721.12,23868.43,325.77,286.91 +17/04/87,248.98,1323.28,1949.4,2721.12,23868.43,325.77,286.91 +20/04/87,248.98,1323.28,1949.4,2721.12,23868.43,329.28,286.09 +21/04/87,246.1,1312.6,1940.2,2713.36,23886.1,334.03,293.07 +22/04/87,248.93,1343.66,1955.7,2716.89,24097.69,338.46,287.19 +23/04/87,246.88,1336.11,1968.3,2719.89,24024.6,336.28,286.82 +24/04/87,244.44,1315.21,2001.5,2707.61,24006.3,337.16,281.52 +27/04/87,239.04,1282.11,1986.6,2636.47,23072.39,338.03,281.83 +28/04/87,239.04,1310.52,2022.1,2617.08,22889.89,337.68,282.51 +29/04/87,241.68,1314.43,2038.6,2589.54,22889.89,335.09,284.57 +30/04/87,241.68,1308.14,2050.5,2659.85,23274.8,334.57,288.36 +01/05/87,240.89,1308.14,2068.5,2685.37,23680.8,334.57,288.03 +04/05/87,239.08,1309.63,2068.5,2685.75,23680.8,334.55,289.36 +05/05/87,238.56,1311.41,2065.1,2713.83,23680.8,336.54,295.34 +06/05/87,242.23,1326.7,2086.5,2792.89,23918.5,336.8,295.47 +07/05/87,244.2,1328.86,2077.9,2785.56,24207.55,336.24,294.71 +08/05/87,244.87,1324.95,2126.5,2805.06,24589.23,336.87,293.37 +11/05/87,246.76,1323.35,2163.3,2846.93,24608.22,340.96,291.57 +12/05/87,245.36,1314.05,2143.3,2853.42,24535.85,340.96,293.3 +13/05/87,245.49,1324.88,2163.4,2833.53,24363.19,347.42,293.98 +14/05/87,245.28,1312.46,2180,2853.92,24651.44,352.28,294.24 +15/05/87,244.87,1310.82,2189.7,2872.19,24729.02,353.85,287.43 +18/05/87,244.84,1294.83,2192.1,2875.45,24298.98,354.08,286.65 +19/05/87,246.07,1299.21,2214.3,2881.47,24077.88,355.63,279.62 +20/05/87,240.32,1270.99,2174,2878.1,23419.6,356.38,278.21 +21/05/87,242,1283.18,2153.7,2870.91,23754.01,357.95,280.17 +22/05/87,240.37,1283.3,2167.5,2897.62,24156.69,354.82,282.16 +25/05/87,238.95,1280.73,2167.5,2926.1,24582.77,358.01,282.16 +26/05/87,240.66,1293,2153.4,2935.88,24580.85,358.88,289.11 +27/05/87,240.2,1306.39,2145.7,2942.92,24539.75,357.94,288.73 +28/05/87,240.2,1306.39,2157.4,2949.06,24433.64,360.88,290.76 +29/05/87,240.2,1316.43,2203,2919.7,24772.39,360.88,290.1 +01/06/87,240.76,1328.89,2228.2,2919.7,24992.77,367.46,289.83 +02/06/87,237.43,1310.67,2219.6,2934.19,24902.63,366.87,288.46 +03/06/87,238.21,1311.79,2235.4,2985.1,25049.39,369.11,293.47 +04/06/87,239.77,1306.28,2214.2,3023.6,25366.1,367.95,295.09 +05/06/87,238.56,1308.18,2228.8,3064.33,25271.3,368.56,293.45 +08/06/87,238.56,1308.18,2228.4,3068.06,25523.89,368.92,296.72 +09/06/87,238.36,1302.49,2265.2,3108.57,25379.88,363.56,297.28 +10/06/87,238.36,1303.79,2256.1,3097.33,25738.95,364.86,297.47 +11/06/87,239.41,1311.34,2249.3,3087.52,25890.94,364.55,298.73 +12/06/87,239.99,1313.16,2289.5,3129.88,25894.27,364.39,301.62 +15/06/87,242.3,1339.27,2307.6,3129.88,25756.44,361.48,302.69 +16/06/87,244.28,1346.26,2309,3170.88,25738.85,362.91,304.76 +17/06/87,247.99,1346.26,2320.4,3178.62,25929.42,365.5,304.81 +18/06/87,247.27,1346.26,2293.2,3133.74,25750.55,365.31,305.69 +19/06/87,250.12,1377.69,2266.1,3165.64,25288.1,365.32,306.97 +22/06/87,254.3,1390.45,2244.6,3131.19,24640.35,367.19,309.65 +23/06/87,253.97,1401.61,2265.5,3110.41,24794.89,368.13,308.43 +24/06/87,253.42,1371.03,2284,3178.98,24892.75,368.98,306.86 +25/06/87,258.15,1395.02,2277.2,3136.31,25031.35,370.09,308.96 +26/06/87,259.16,1408.56,2291.3,3138.68,25049.81,370.87,307.16 +29/06/87,259.16,1397.78,2289.3,3151.98,24509.39,372.13,307.9 +30/06/87,259.07,1382.56,2284.1,3178.19,24176.39,371.04,304 +01/07/87,256.5,1383.05,2269.8,3163.99,24252.38,370.77,302.94 +02/07/87,259.69,1399.97,2297.4,3229.15,24636.44,372.99,305.63 +03/07/87,262.85,1419.27,2328.1,3208.84,24465.48,376.66,305.63 +06/07/87,265.04,1408.11,2351.9,3220.68,23870.85,381.82,304.92 +07/07/87,264.26,1414.21,2365.4,3236.41,23816.09,383.88,307.4 +08/07/87,263.07,1419.2,2356.9,3251.38,23472.42,383.54,308.29 +09/07/87,261.36,1411.28,2371,3225.97,23755.89,387.17,307.52 +10/07/87,262.02,1419.76,2382,3207.21,24102.98,391.44,308.37 +13/07/87,263.32,1431.03,2386.6,3216.11,24118.01,393.99,307.63 +14/07/87,264.98,1440.47,2403,3253.42,23931.52,390.23,310.68 +15/07/87,264.5,1462.16,2419.2,3262.3,23969.76,395.71,310.42 +16/07/87,267.96,1455.8,2443.4,3305.82,24003.6,398.28,312.1 +17/07/87,271.72,1472.57,2428.7,3342.13,23983.44,399.03,314.59 +20/07/87,271.28,1483.84,2400.7,3386.09,23328.64,396.94,311.39 +21/07/87,272.47,1472.94,2390.5,3353.78,23078.35,399.67,308.55 +22/07/87,269.67,1460.33,2344.5,3380.41,22702.73,397.44,308.47 +23/07/87,267.98,1443.78,2340.2,3366.82,23036.52,393.27,307.81 +24/07/87,268.23,1459.66,2346.9,3343.6,23942.94,390.89,309.27 +27/07/87,268.77,1454.49,2333.9,3346.87,24104.98,385.55,310.65 +28/07/87,268.99,1468.89,2359.9,3337.46,24385.81,394.38,312.33 +29/07/87,270.97,1478.07,2383.1,3389.73,24427.1,395.37,315.65 +30/07/87,274.73,1501.88,2370.5,3419.28,24510.35,397.66,318.05 +31/07/87,273.57,1510.54,2360.9,3479.24,24488.1,397.98,318.66 +03/08/87,270.28,1507.38,2334.3,3514.25,24483.81,395.63,317.57 +04/08/87,270.28,1520.21,2307.8,3531.88,24172.6,398.92,316.23 +05/08/87,279.28,1536.73,2317.4,3517.13,24297.14,404.52,318.45 +06/08/87,280.99,1550.19,2261.4,3497.95,24658.23,404.52,322.09 +07/08/87,283.25,1559.53,2226.2,3536.19,24800.94,408.99,323 +10/08/87,284.95,1552.98,2242.2,3543.76,25119.69,408.99,328 +11/08/87,286.05,1559.3,2275.4,3546.52,25282.97,410.79,333.33 +12/08/87,283.06,1548.89,2286.1,3557.43,25559.23,409.21,332.39 +13/08/87,282.6,1542.83,2290.1,3514.27,25575.73,406.09,334.65 +14/08/87,281.64,1563.06,2295.4,3512.15,25494.01,404.62,333.99 +17/08/87,282.12,1570.28,2259.6,3510.66,25378.88,398.34,334.11 +18/08/87,275.4,1552.68,2224.8,3504.87,25344.34,401.81,329.25 +19/08/87,276.42,1530,2197.6,3450.64,25231.59,395.86,329.83 +20/08/87,279,1544.2,2185.3,3408.01,25396.56,393.86,334.84 +21/08/87,280.21,1546.66,2205.8,3446.59,25559.18,394.51,335.9 +24/08/87,280.39,1536.06,2225.1,3391.26,25754.31,399,333.33 +25/08/87,282.6,1529.62,2248.1,3447.3,25643.39,404.17,336.77 +26/08/87,282.52,1536.58,2249.6,3526.26,25875.73,401.91,334.57 +27/08/87,277.35,1531.82,2245.8,3583.33,25968.77,399.72,331.38 +28/08/87,275.72,1540.15,2249.7,3611.74,25974.96,396.77,327.04 +31/08/87,272.32,1537.81,2249.7,3611.74,26029.22,391.17,329.79 +01/09/87,274.81,1547.7,2272.8,3644.28,26118.42,381.66,323.4 +02/09/87,269.99,1537.21,2249.5,3635.86,25946.6,384.61,321.68 +03/09/87,269.18,1516.75,2268.1,3653.95,25649.88,376.71,320.21 +04/09/87,266.95,1500.17,2274.9,3654.48,25744.03,380.45,316.7 +07/09/87,262.35,1471.83,2283.6,3646.33,25004.09,384.21,316.7 +08/09/87,265.58,1481.42,2275,3601.54,25204.09,390.55,313.56 +09/09/87,266.56,1491.95,2249.1,3577.64,24937.93,391.26,313.92 +10/09/87,269.72,1507.2,2253.2,3600.96,24795.24,389.97,317.13 +11/09/87,268.24,1509.88,2261.2,3660.5,24828.27,391.47,321.98 +14/09/87,273.16,1531.07,2271.8,3649.84,24954.02,391.22,323.08 +15/09/87,272.02,1524.79,2264.5,3646.92,24954.02,388.05,317.74 +16/09/87,268.87,1515.38,2279.8,3604.64,24967.73,383.4,314.86 +17/09/87,265.44,1509.73,2304.5,3571.36,24855.31,380.98,314.93 +18/09/87,266.12,1502.62,2328.3,3649.96,24844.84,376.57,314.86 +21/09/87,265.65,1496.86,2334.8,3667.95,24912.42,368.35,310.54 +22/09/87,261.93,1495.74,2335.5,3695.53,24866.06,372.54,319.5 +23/09/87,268.7,1503.11,2352.4,3763.11,24866.06,373.83,321.19 +24/09/87,264.56,1498.34,2353.4,3764.42,24944.9,375.51,319.72 +25/09/87,265.6,1492.62,2342.6,3840.11,25095.8,376.86,320.16 +28/09/87,267.9,1493.21,2368.1,3884.65,25837.3,384.01,323.2 +29/09/87,267.99,1505.26,2368.3,3859.48,25998,384.36,321.69 +30/09/87,267.31,1500.17,2366,3943.64,26010.88,380.12,321.83 +01/10/87,268.13,1519.99,2373.8,3949.73,25721.74,380.99,327.34 +02/10/87,268.11,1543.05,2382.2,3932.04,25862.45,383.68,328.07 +05/10/87,268.88,1538.07,2385.8,3944.24,26018.33,386.35,328.08 +06/10/87,265.95,1525.23,2367.9,3906.44,26088.97,389.1,319.22 +07/10/87,263.1,1517.65,2359.8,3936.13,25952.27,388.11,318.54 +08/10/87,263.83,1519.77,2375.5,3936.13,26286.75,388.45,314.16 +09/10/87,260.06,1478.86,2366.5,3882.42,26338.77,389.21,311.05 +12/10/87,256.77,1480.16,2338.5,3900.17,26284.65,386.38,309.39 +13/10/87,258.81,1500.91,2350.2,3841.28,26400.63,384.54,314.52 +14/10/87,253.93,1497.38,2322.9,3844.48,26646.43,383.71,305.23 +15/10/87,248.52,1460.59,2301.9,3828.64,26428.22,382.55,298.08 +16/10/87,247.09,1458.54,2301.9,3783.2,26366.74,375.47,282.7 +19/10/87,217.43,1321.61,2052.3,3362.39,25746.56,341.93,224.99 +20/10/87,204.57,1302.8,1801.6,3362.39,21910.08,341.93,236.83 +21/10/87,223.42,1379.53,1943.8,3362.39,23947.4,341.93,258.38 +22/10/87,207.24,1287.58,1833.2,3362.39,24404.45,314.32,248.25 +23/10/87,207.7,1292.67,1795.2,3362.39,23201.22,288.1,248.22 +26/10/87,188.43,1193.31,1684.1,2241.69,22202.56,277.77,227.67 +27/10/87,194.57,1225.47,1703.3,2395.72,22834.96,274.06,233.19 +28/10/87,182.99,1142.17,1658.4,2370.16,22577.53,260.15,233.28 +29/10/87,183.45,1104.4,1682,2204.52,22033.89,258.68,244.77 +30/10/87,193.72,1177.38,1749.8,2240.13,22765.04,267.27,251.79 +02/11/87,188.3,1163.87,1723.7,2203.23,23358.6,273.74,255.74 +03/11/87,178.25,1129.99,1653.9,2180.74,23358.6,273.45,250.82 +04/11/87,171.52,1097.52,1608.1,2077.11,23060.53,267.02,248.96 +05/11/87,171.1,1093.39,1638.8,1960.9,22629.56,261.38,254.48 +06/11/87,171.63,1067.36,1620.8,2113.67,22795.02,262.45,250.41 +09/11/87,159.4,1012.09,1565.2,2139.31,22418.37,262.44,243.17 +10/11/87,152.36,945.91,1573.5,2043.24,21686.46,256.65,239 +11/11/87,170.38,988.19,1639.3,2046.18,21036.76,251.22,241.9 +12/11/87,185.22,1061.64,1702.5,2150.87,21546.5,254.9,249.9 +13/11/87,180.13,1075.87,1678.3,2226.74,22448.25,259.92,245.64 +16/11/87,187.27,1082.72,1684.7,2310.86,22615.43,262.77,246.76 +17/11/87,179.95,1063.38,1660.1,2290.37,22344.28,257.52,243.04 +18/11/87,182.01,1063.38,1663.7,2285.15,22734.49,259.32,245.55 +19/11/87,177.34,1055.6,1639.1,2257.6,22668.8,257.04,240.05 +20/11/87,170.27,1027.34,1633.4,2214.7,22705.56,256.19,242 +23/11/87,175.41,1037.3,1657.7,2141.71,22705.56,256.21,242.99 +24/11/87,179.27,1080.39,1689.1,2134.84,22856.02,254.46,246.39 +25/11/87,174.95,1067.24,1664.1,2184.41,23219.69,255.21,244.1 +26/11/87,171.78,1058.65,1660.7,2179.58,23282.19,253.3,244.1 +27/11/87,170.96,1052.55,1651.6,2194.19,23268.2,252.86,240.34 +30/11/87,159.26,1022.84,1579.9,2138.39,22686.78,250.17,230.3 +01/12/87,162.59,1030.24,1578.5,2108.55,22832.89,246.21,232 +02/12/87,164.26,1044.78,1590.3,2100.83,22915.49,245.28,233.45 +03/12/87,163.47,1037.94,1588.4,2057.43,22808.16,239.69,225.21 diff --git a/wt-3.1.7a/examples/codeview/CMakeLists.txt b/wt-3.1.7a/examples/codeview/CMakeLists.txt new file mode 100644 index 0000000..f237c78 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CMakeLists.txt @@ -0,0 +1,16 @@ +IF(NOT MULTI_THREADED_BUILD) + MESSAGE(STATUS "** Not building codingview example: requires a multi-threaded build.") +ELSE(NOT MULTI_THREADED_BUILD) + + ADD_DEFINITIONS(-DTHREADED) + + WT_ADD_EXAMPLE(codingview.wt + CoderApplication.C CodeSession.C CoderWidget.C ObserverWidget.C + ) + + TARGET_LINK_LIBRARIES(codingview.wt ${BOOST_THREAD_LIB}) + +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src) + +ENDIF(NOT MULTI_THREADED_BUILD) + diff --git a/wt-3.1.7a/examples/codeview/CodeSession.C b/wt-3.1.7a/examples/codeview/CodeSession.C new file mode 100644 index 0000000..e9f15b9 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CodeSession.C @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "CodeSession.h" + +boost::recursive_mutex CodeSession::mutex_; +std::vector CodeSession::sessions_; + +CodeSession::CodeSession() + : observers_(0), + coder_(true) +{ + generateId(); + + Lock lock(mutex_); + sessions_.push_back(this); +} + +std::pair + CodeSession::addObserver(const std::string& anId, + const BufferCallback& bufferCallback) +{ + Lock lock(mutex_); + + for (unsigned i = 0; i < sessions_.size(); ++i) { + CodeSession *session = sessions_[i]; + if (session->id() == anId) { + ++session->observers_; + + Connection conn = session->bufferChanged_.connect + (boost::bind(bufferCallback, _1, _2)); + + session->sessionChanged_.emit(); + + return std::make_pair(session, conn); + } + } + + return std::make_pair((CodeSession *)0, Connection()); +} + +void CodeSession::removeObserver(const Connection& connection) +{ + Lock lock(mutex_); + + --observers_; + connection.disconnect(); + + sessionChanged_.emit(); + + deleteIfEmpty(); +} + +void CodeSession::removeCoder(const Connection& connection) +{ + Lock lock(mutex_); + + coder_ = false; + connection.disconnect(); + + deleteIfEmpty(); +} + +void CodeSession::insertBuffer(int index) +{ + Lock lock(mutex_); + + buffers_.insert(buffers_.begin() + index, Buffer()); + + bufferChanged_.emit(index, Inserted); +} + +void CodeSession::updateBuffer(int buffer, const Wt::WString& name, + const Wt::WString& text) +{ + Lock lock(mutex_); + + buffers_[buffer].name = name; + buffers_[buffer].text = text; + + bufferChanged_.emit(buffer, Changed); +} + +std::vector CodeSession::buffers() const +{ + Lock lock(mutex_); + + return buffers_; +} + +CodeSession::Buffer CodeSession::buffer(int buffer) const +{ + Lock lock(mutex_); + + return buffers_[buffer]; +} + +void CodeSession::deleteIfEmpty() +{ + if (observers_ == 0 && !coder_) { + sessions_.erase(std::find(sessions_.begin(), sessions_.end(), this)); + + delete this; + } +} + +void CodeSession::generateId() +{ + for (int i = 0; i < 32; ++i) { +#ifndef WIN32 + int d = lrand48() % (26 + 26 + 10); +#else + int d = rand(); +#endif + + char c = (d < 10 ? ('0' + d) + : (d < 36 ? ('A' + d - 10) + : 'a' + d - 36)); + + id_.push_back(c); + } +} diff --git a/wt-3.1.7a/examples/codeview/CodeSession.h b/wt-3.1.7a/examples/codeview/CodeSession.h new file mode 100644 index 0000000..fc0c527 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CodeSession.h @@ -0,0 +1,72 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CODE_SESSION_H_ +#define CODE_SESSION_H_ + +#include +#include +#include + +#include +#include + +class CodeSession +{ +public: + enum BufferUpdate { + Inserted, + Deleted, + Changed + }; + + struct Buffer { + Wt::WString name; + Wt::WString text; + }; + + typedef boost::function BufferCallback; + typedef boost::function CoderCallback; + typedef boost::signals::connection Connection; + + CodeSession(); + + std::string id() const { return id_; } + + static std::pair + addObserver(const std::string& anId, const BufferCallback& bufferCallback); + + void removeObserver(const Connection& connection); + void removeCoder(const Connection& connection); + + void insertBuffer(int index); + void updateBuffer(int buffer, const Wt::WString& name, const Wt::WString& text); + + Wt::Signal<>& sessionChanged() { return sessionChanged_; } + + std::vector buffers() const; + Buffer buffer(int buffer) const; + int observerCount() const { return observers_; } + +private: + typedef Wt::SyncLock Lock; + + Wt::Signal bufferChanged_; + Wt::Signal<> sessionChanged_; + + std::string id_; + std::vector buffers_; + int observers_; + bool coder_; + + static std::vector sessions_; + static boost::recursive_mutex mutex_; + + void generateId(); + void deleteIfEmpty(); +}; + +#endif // CODE_SESSION_H_ diff --git a/wt-3.1.7a/examples/codeview/CoderApplication.C b/wt-3.1.7a/examples/codeview/CoderApplication.C new file mode 100644 index 0000000..146f473 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CoderApplication.C @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#include +#include + +#include "CoderApplication.h" +#include "CoderWidget.h" +#include "ObserverWidget.h" + +using namespace Wt; + +CoderApplication::CoderApplication(const WEnvironment& env) + : WApplication(env) +{ + setTitle("Watch that coding."); + useStyleSheet("coder.css"); + + createUI(env.internalPath()); + + internalPathChanged().connect(this, &CoderApplication::handlePathChange); +} + +void CoderApplication::createUI(const std::string& path) +{ + if (path.length() <= 1) + root()->addWidget(new CoderWidget()); + else + root()->addWidget(new ObserverWidget(path.substr(1))); +} + +void CoderApplication::handlePathChange() +{ + root()->clear(); + + createUI(internalPath()); +} + +WApplication *createApplication(const WEnvironment& env) +{ + return new CoderApplication(env); +} + +int main(int argc, char **argv) +{ + return WRun(argc, argv, &createApplication); +} diff --git a/wt-3.1.7a/examples/codeview/CoderApplication.h b/wt-3.1.7a/examples/codeview/CoderApplication.h new file mode 100644 index 0000000..607df93 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CoderApplication.h @@ -0,0 +1,22 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CODER_APPLICATION_H_ +#define CODER_APPLICATION_H_ + +#include + +class CoderApplication : public Wt::WApplication +{ +public: + CoderApplication(const Wt::WEnvironment& environment); + +private: + void handlePathChange(); + void createUI(const std::string& path); +}; + +#endif // CODER_APPLICATION_H_ diff --git a/wt-3.1.7a/examples/codeview/CoderWidget.C b/wt-3.1.7a/examples/codeview/CoderWidget.C new file mode 100644 index 0000000..74ab1db --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CoderWidget.C @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#include +#include +#include +#include + +#include "CoderWidget.h" + +using namespace Wt; + +class BufferEditorWidget : public WContainerWidget +{ +public: + BufferEditorWidget() + { + setStyleClass("editor"); + + new WText("File: ", this); + nameEdit_ = new WLineEdit(this); + + textArea_ = new WTextArea(this); + textArea_->setAttributeValue("spellcheck", "false"); + textArea_->setInline(false); + textArea_->setColumns(80); + textArea_->resize(WLength::Auto, 300); + } + + WString name() { return nameEdit_->text(); } + WString text() { + std::wstring t = textArea_->text(); + + if (textArea_->hasFocus()) { + if (textArea_->hasSelectedText()) { + int i = textArea_->selectionStart(); + int j = ((std::wstring) textArea_->selectedText()).length(); + + t = escape(t.substr(0, i)) + L"" + + escape(t.substr(i, j)) + L"" + + escape(t.substr(i + j)); + } else { + int i = textArea_->cursorPosition(); + if (i >= 0) { + std::wstring s; + s = escape(t.substr(0, i)) + L""; + + if (i + 1 < t.length()) { + if (t[i] == '\n') + s += L' '; + s += escape(t.substr(i, 1)) + L""; + s += escape(t.substr(i + 1)); + } else + s += L" "; + + t = s; + } + } + } else + t = escape(t); + + return t; + } + + WTextArea *textArea() { return textArea_; } + +private: + WLineEdit *nameEdit_; + WTextArea *textArea_; + + std::wstring escape(const std::wstring& s) { + return (std::wstring) escapeText(WString(s)); + } +}; + +CoderWidget::CoderWidget() + : app_(WApplication::instance()) +{ + app_->enableUpdates(true); + + session_ = new CodeSession(); + connection_ + = session_->sessionChanged().connect(this, + &CoderWidget::sessionChanged); + + app_->setInternalPath("/" + session_->id()); + + WPushButton *addBuffer = new WPushButton("Add file", this); + observerCount_ = new WText("Observers: 0", this); + + addBuffer->clicked().connect(this, &CoderWidget::addBuffer); + + buffers_ = new WContainerWidget(this); + + insertBuffer(0); +} + +CoderWidget::~CoderWidget() +{ + session_->removeCoder(connection_); + app_->enableUpdates(false); +} + +void CoderWidget::addBuffer() +{ + insertBuffer(buffers_->count()); +} + +void CoderWidget::insertBuffer(int index) +{ + session_->insertBuffer(index); + + BufferEditorWidget *editor = new BufferEditorWidget(); + editor->keyWentUp().connect(boost::bind(&CoderWidget::changed, this, editor)); + editor->clicked().connect(boost::bind(&CoderWidget::changed, this, editor)); + editor->textArea()->blurred() + .connect(boost::bind(&CoderWidget::changed, this, editor)); + + buffers_->insertWidget(index, editor); +} + +void CoderWidget::changed(BufferEditorWidget *editor) +{ + session_->updateBuffer(buffers_->indexOf(editor), editor->name(), + editor->text()); +} + +void CoderWidget::sessionChanged() +{ + WApplication::UpdateLock lock(app_); + + if (lock) { + observerCount_ + ->setText(WString("Observers: {1}").arg(session_->observerCount())); + app_->triggerUpdate(); + } +} diff --git a/wt-3.1.7a/examples/codeview/CoderWidget.h b/wt-3.1.7a/examples/codeview/CoderWidget.h new file mode 100644 index 0000000..3d66402 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/CoderWidget.h @@ -0,0 +1,36 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ +#ifndef CODER_WIDGET_H_ +#define CODER_WIDGET_H_ + +#include + +#include "CodeSession.h" + +class BufferEditorWidget; + +class CoderWidget : public Wt::WContainerWidget +{ +public: + CoderWidget(); + virtual ~CoderWidget(); + +private: + Wt::WApplication *app_; + CodeSession *session_; + CodeSession::Connection connection_; + + Wt::WContainerWidget *buffers_; + Wt::WText *observerCount_; + + void addBuffer(); + void insertBuffer(int index); + void changed(BufferEditorWidget *editor); + void sessionChanged(); +}; + +#endif // CODER_WIDGET_H_ diff --git a/wt-3.1.7a/examples/codeview/ObserverWidget.C b/wt-3.1.7a/examples/codeview/ObserverWidget.C new file mode 100644 index 0000000..a6fb57e --- /dev/null +++ b/wt-3.1.7a/examples/codeview/ObserverWidget.C @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#include "ObserverWidget.h" +#include + +#include + +using namespace Wt; + +class BufferViewWidget : public WContainerWidget +{ +public: + BufferViewWidget() + { + setStyleClass("viewer"); + + WApplication::instance()->require("prettify/prettify.min.js"); + WApplication::instance()->useStyleSheet("prettify/prettify.css"); + + new WText("File: ", this); + bufferName_ = new WText(this); + + bufferText_ = new WText(this); + bufferText_->setInline(false); + bufferText_->setStyleClass("prettyprint"); + } + + void setName(const WString& name) { + bufferName_->setText(name); + } + + void setText(const WString& text) { + WApplication::instance()->doJavaScript + (bufferText_->jsRef() + ".innerHTML=" + "'
' + prettyPrintOne("
+       + text.jsStringLiteral() + ", " + bufferText_->jsRef() + ") + '
';"); + } + +private: + WText *bufferName_; + WText *bufferText_; +}; + +ObserverWidget::ObserverWidget(const std::string& id) + : app_(WApplication::instance()) +{ + app_->enableUpdates(true); + + boost::tie(session_, connection_) + = CodeSession::addObserver(id, + boost::bind(&ObserverWidget::updateBuffer, this, + _1, _2)); + + if (session_) { + std::vector buffers = session_->buffers(); + + for (unsigned i = 0; i < buffers.size(); ++i) + insertBuffer(buffers[i], i); + + } +} + +ObserverWidget::~ObserverWidget() +{ + if (session_) + session_->removeObserver(connection_); + + app_->enableUpdates(false); +} + +void ObserverWidget::insertBuffer(const CodeSession::Buffer& buffer, int i) +{ + BufferViewWidget *w = new BufferViewWidget(); + w->setName(buffer.name); + w->setText(buffer.text); + + insertWidget(i, w); +} + +void ObserverWidget::updateBuffer(int buffer, CodeSession::BufferUpdate update) +{ + WApplication::UpdateLock lock(app_); + + if (lock) { + switch (update) { + case CodeSession::Inserted: + insertBuffer(session_->buffer(buffer), buffer); + break; + case CodeSession::Deleted: + delete widget(buffer); + break; + case CodeSession::Changed: + { + BufferViewWidget *w = dynamic_cast(widget(buffer)); + w->setName(session_->buffer(buffer).name); + w->setText(session_->buffer(buffer).text); + } + } + + app_->triggerUpdate(); + } +} diff --git a/wt-3.1.7a/examples/codeview/ObserverWidget.h b/wt-3.1.7a/examples/codeview/ObserverWidget.h new file mode 100644 index 0000000..114e525 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/ObserverWidget.h @@ -0,0 +1,30 @@ +// This may look like C code, but it's really -*- C++ -*- +/* + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium. + * + * See the LICENSE file for terms of use. + */ + +#ifndef OBSERVER_WIDGET_H_ +#define OBSERVER_WIDGET_H_ + +#include + +#include "CodeSession.h" + +class ObserverWidget : public Wt::WContainerWidget +{ +public: + ObserverWidget(const std::string& id); + virtual ~ObserverWidget(); + +private: + Wt::WApplication *app_; + CodeSession *session_; + CodeSession::Connection connection_; + + void updateBuffer(int buffer, CodeSession::BufferUpdate update); + void insertBuffer(const CodeSession::Buffer& buffer, int index); +}; + +#endif // OBSERVER_WIDGET_H_ diff --git a/wt-3.1.7a/examples/codeview/coder.css b/wt-3.1.7a/examples/codeview/coder.css new file mode 100644 index 0000000..a0a0e16 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/coder.css @@ -0,0 +1,11 @@ +body { + font-family: sans-serif, arial; +} + +.sel { + background-color: #eedc82; +} + +.pos { + background-color: #ee4444; +} \ No newline at end of file diff --git a/wt-3.1.7a/examples/codeview/prettify/prettify.css b/wt-3.1.7a/examples/codeview/prettify/prettify.css new file mode 100755 index 0000000..2925d13 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/prettify/prettify.css @@ -0,0 +1 @@ +.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}} \ No newline at end of file diff --git a/wt-3.1.7a/examples/codeview/prettify/prettify.js b/wt-3.1.7a/examples/codeview/prettify/prettify.js new file mode 100644 index 0000000..cc144f0 --- /dev/null +++ b/wt-3.1.7a/examples/codeview/prettify/prettify.js @@ -0,0 +1,1525 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + *

+ * + * For a fairly comprehensive set of languages see the + * README + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + *

+ * Usage:

    + *
  1. include this source file in an html page via + * {@code } + *
  2. define style rules. See the example page for examples. + *
  3. mark the {@code
    } and {@code } tags in your source with
    + *    {@code class=prettyprint.}
    + *    You can also use the (html deprecated) {@code } tag, but the pretty
    + *    printer needs to do more substantial DOM manipulations to support that, so
    + *    some css styles may not be preserved.
    + * </ol>
    + * That's it.  I wanted to keep the API as simple as possible, so there's no
    + * need to specify which language the code is in, but if you wish, you can add
    + * another class to the {@code <pre>} or {@code <code>} element to specify the
    + * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
    + * starts with "lang-" followed by a file extension, specifies the file type.
    + * See the "lang-*.js" files in this directory for code that implements
    + * per-language file handlers.
    + * <p>
    + * Change log:<br>
    + * cbeust, 2006/08/22
    + * <blockquote>
    + *   Java annotations (start with "@") are now captured as literals ("lit")
    + * </blockquote>
    + * @requires console
    + */
    +
    +// JSLint declarations
    +/*global console, document, navigator, setTimeout, window */
    +
    +/**
    + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
    + * UI events.
    + * If set to {@code false}, {@code prettyPrint()} is synchronous.
    + */
    +window['PR_SHOULD_USE_CONTINUATION'] = true;
    +
    +/** the number of characters between tab columns */
    +window['PR_TAB_WIDTH'] = 8;
    +
    +/** Walks the DOM returning a properly escaped version of innerHTML.
    +  * @param {Node} node
    +  * @param {Array.<string>} out output buffer that receives chunks of HTML.
    +  */
    +window['PR_normalizedHtml']
    +
    +/** Contains functions for creating and registering new language handlers.
    +  * @type {Object}
    +  */
    +  = window['PR']
    +
    +/** Pretty print a chunk of code.
    +  *
    +  * @param {string} sourceCodeHtml code as html
    +  * @return {string} code as html, but prettier
    +  */
    +  = window['prettyPrintOne']
    +/** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    +  * {@code class=prettyprint} and prettify them.
    +  * @param {Function?} opt_whenDone if specified, called when the last entry
    +  *     has been finished.
    +  */
    +  = window['prettyPrint'] = void 0;
    +
    +/** browser detection. @extern @returns false if not IE, otherwise the major version. */
    +window['_pr_isIE6'] = function () {
    +  var ieVersion = navigator && navigator.userAgent &&
    +      navigator.userAgent.match(/\bMSIE ([678])\./);
    +  ieVersion = ieVersion ? +ieVersion[1] : false;
    +  window['_pr_isIE6'] = function () { return ieVersion; };
    +  return ieVersion;
    +};
    +
    +
    +(function () {
    +  // Keyword lists for various languages.
    +  var FLOW_CONTROL_KEYWORDS =
    +      "break continue do else for if return while ";
    +  var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
    +      "double enum extern float goto int long register short signed sizeof " +
    +      "static struct switch typedef union unsigned void volatile ";
    +  var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
    +      "new operator private protected public this throw true try typeof ";
    +  var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
    +      "concept concept_map const_cast constexpr decltype " +
    +      "dynamic_cast explicit export friend inline late_check " +
    +      "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
    +      "template typeid typename using virtual wchar_t where ";
    +  var JAVA_KEYWORDS = COMMON_KEYWORDS +
    +      "abstract boolean byte extends final finally implements import " +
    +      "instanceof null native package strictfp super synchronized throws " +
    +      "transient ";
    +  var CSHARP_KEYWORDS = JAVA_KEYWORDS +
    +      "as base by checked decimal delegate descending dynamic event " +
    +      "fixed foreach from group implicit in interface internal into is lock " +
    +      "object out override orderby params partial readonly ref sbyte sealed " +
    +      "stackalloc string select uint ulong unchecked unsafe ushort var ";
    +  var COFFEE_KEYWORDS = "all and by catch class else extends false finally " +
    +      "for if in is isnt loop new no not null of off on or return super then " +
    +      "true try unless until when while yes ";
    +  var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
    +      "debugger eval export function get null set undefined var with " +
    +      "Infinity NaN ";
    +  var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
    +      "goto if import last local my next no our print package redo require " +
    +      "sub undef unless until use wantarray while BEGIN END ";
    +  var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " +
    +      "elif except exec finally from global import in is lambda " +
    +      "nonlocal not or pass print raise try with yield " +
    +      "False True None ";
    +  var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" +
    +      " defined elsif end ensure false in module next nil not or redo rescue " +
    +      "retry self super then true undef unless until when yield BEGIN END ";
    +  var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
    +      "function in local set then until ";
    +  var ALL_KEYWORDS = (
    +      CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
    +      PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
    +
    +  // token style names.  correspond to css classes
    +  /** token style for a string literal */
    +  var PR_STRING = 'str';
    +  /** token style for a keyword */
    +  var PR_KEYWORD = 'kwd';
    +  /** token style for a comment */
    +  var PR_COMMENT = 'com';
    +  /** token style for a type */
    +  var PR_TYPE = 'typ';
    +  /** token style for a literal value.  e.g. 1, null, true. */
    +  var PR_LITERAL = 'lit';
    +  /** token style for a punctuation string. */
    +  var PR_PUNCTUATION = 'pun';
    +  /** token style for a punctuation string. */
    +  var PR_PLAIN = 'pln';
    +
    +  /** token style for an sgml tag. */
    +  var PR_TAG = 'tag';
    +  /** token style for a markup declaration such as a DOCTYPE. */
    +  var PR_DECLARATION = 'dec';
    +  /** token style for embedded source. */
    +  var PR_SOURCE = 'src';
    +  /** token style for an sgml attribute name. */
    +  var PR_ATTRIB_NAME = 'atn';
    +  /** token style for an sgml attribute value. */
    +  var PR_ATTRIB_VALUE = 'atv';
    +
    +  /**
    +   * A class that indicates a section of markup that is not code, e.g. to allow
    +   * embedding of line numbers within code listings.
    +   */
    +  var PR_NOCODE = 'nocode';
    +
    +  /** A set of tokens that can precede a regular expression literal in
    +    * javascript.
    +    * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
    +    * list, but I've removed ones that might be problematic when seen in
    +    * languages that don't support regular expression literals.
    +    *
    +    * <p>Specifically, I've removed any keywords that can't precede a regexp
    +    * literal in a syntactically legal javascript program, and I've removed the
    +    * "in" keyword since it's not a keyword in many languages, and might be used
    +    * as a count of inches.
    +    *
    +    * <p>The link a above does not accurately describe EcmaScript rules since
    +    * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
    +    * very well in practice.
    +    *
    +    * @private
    +    */
    +  var REGEXP_PRECEDER_PATTERN = function () {
    +      var preceders = [
    +          "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
    +          "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
    +          "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
    +          "<", "<<", "<<=", "<=", "=", "==", "===", ">",
    +          ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
    +          "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
    +          "||=", "~" /* handles =~ and !~ */,
    +          "break", "case", "continue", "delete",
    +          "do", "else", "finally", "instanceof",
    +          "return", "throw", "try", "typeof"
    +          ];
    +      var pattern = '(?:^^|[+-]';
    +      for (var i = 0; i < preceders.length; ++i) {
    +        pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
    +      }
    +      pattern += ')\\s*';  // matches at end, and matches empty string
    +      return pattern;
    +      // CAVEAT: this does not properly handle the case where a regular
    +      // expression immediately follows another since a regular expression may
    +      // have flags for case-sensitivity and the like.  Having regexp tokens
    +      // adjacent is not valid in any language I'm aware of, so I'm punting.
    +      // TODO: maybe style special characters inside a regexp as punctuation.
    +    }();
    +
    +  // Define regexps here so that the interpreter doesn't have to create an
    +  // object each time the function containing them is called.
    +  // The language spec requires a new object created even if you don't access
    +  // the $1 members.
    +  var pr_amp = /&/g;
    +  var pr_lt = /</g;
    +  var pr_gt = />/g;
    +  var pr_quot = /\"/g;
    +  /** like textToHtml but escapes double quotes to be attribute safe. */
    +  function attribToHtml(str) {
    +    return str.replace(pr_amp, '&amp;')
    +        .replace(pr_lt, '&lt;')
    +        .replace(pr_gt, '&gt;')
    +        .replace(pr_quot, '&quot;');
    +  }
    +
    +  /** escapest html special characters to html. */
    +  function textToHtml(str) {
    +    return str.replace(pr_amp, '&amp;')
    +        .replace(pr_lt, '&lt;')
    +        .replace(pr_gt, '&gt;');
    +  }
    +
    +
    +  var pr_ltEnt = /&lt;/g;
    +  var pr_gtEnt = /&gt;/g;
    +  var pr_aposEnt = /&apos;/g;
    +  var pr_quotEnt = /&quot;/g;
    +  var pr_ampEnt = /&amp;/g;
    +  var pr_nbspEnt = /&nbsp;/g;
    +  /** unescapes html to plain text. */
    +  function htmlToText(html) {
    +    var pos = html.indexOf('&');
    +    if (pos < 0) { return html; }
    +    // Handle numeric entities specially.  We can't use functional substitution
    +    // since that doesn't work in older versions of Safari.
    +    // These should be rare since most browsers convert them to normal chars.
    +    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
    +      var end = html.indexOf(';', pos);
    +      if (end >= 0) {
    +        var num = html.substring(pos + 3, end);
    +        var radix = 10;
    +        if (num && num.charAt(0) === 'x') {
    +          num = num.substring(1);
    +          radix = 16;
    +        }
    +        var codePoint = parseInt(num, radix);
    +        if (!isNaN(codePoint)) {
    +          html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
    +                  html.substring(end + 1));
    +        }
    +      }
    +    }
    +
    +    return html.replace(pr_ltEnt, '<')
    +        .replace(pr_gtEnt, '>')
    +        .replace(pr_aposEnt, "'")
    +        .replace(pr_quotEnt, '"')
    +        .replace(pr_nbspEnt, ' ')
    +        .replace(pr_ampEnt, '&');
    +  }
    +
    +  /** is the given node's innerHTML normally unescaped? */
    +  function isRawContent(node) {
    +    return 'XMP' === node.tagName;
    +  }
    +
    +  var newlineRe = /[\r\n]/g;
    +  /**
    +   * Are newlines and adjacent spaces significant in the given node's innerHTML?
    +   */
    +  function isPreformatted(node, content) {
    +    // PRE means preformatted, and is a very common case, so don't create
    +    // unnecessary computed style objects.
    +    if ('PRE' === node.tagName) { return true; }
    +    if (!newlineRe.test(content)) { return true; }  // Don't care
    +    var whitespace = '';
    +    // For disconnected nodes, IE has no currentStyle.
    +    if (node.currentStyle) {
    +      whitespace = node.currentStyle.whiteSpace;
    +    } else if (window.getComputedStyle) {
    +      // Firefox makes a best guess if node is disconnected whereas Safari
    +      // returns the empty string.
    +      whitespace = window.getComputedStyle(node, null).whiteSpace;
    +    }
    +    return !whitespace || whitespace === 'pre';
    +  }
    +
    +  function normalizedHtml(node, out, opt_sortAttrs) {
    +    switch (node.nodeType) {
    +      case 1:  // an element
    +        var name = node.tagName.toLowerCase();
    +
    +        out.push('<', name);
    +        var attrs = node.attributes;
    +        var n = attrs.length;
    +        if (n) {
    +          if (opt_sortAttrs) {
    +            var sortedAttrs = [];
    +            for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; }
    +            sortedAttrs.sort(function (a, b) {
    +                return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1;
    +              });
    +            attrs = sortedAttrs;
    +          }
    +          for (var i = 0; i < n; ++i) {
    +            var attr = attrs[i];
    +            if (!attr.specified) { continue; }
    +            out.push(' ', attr.name.toLowerCase(),
    +                     '="', attribToHtml(attr.value), '"');
    +          }
    +        }
    +        out.push('>');
    +        for (var child = node.firstChild; child; child = child.nextSibling) {
    +          normalizedHtml(child, out, opt_sortAttrs);
    +        }
    +        if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
    +          out.push('<\/', name, '>');
    +        }
    +        break;
    +      case 3: case 4: // text
    +        out.push(textToHtml(node.nodeValue));
    +        break;
    +    }
    +  }
    +
    +  /**
    +   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
    +   * matches the union o the sets o strings matched d by the input RegExp.
    +   * Since it matches globally, if the input strings have a start-of-input
    +   * anchor (/^.../), it is ignored for the purposes of unioning.
    +   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
    +   * @return {RegExp} a global regex.
    +   */
    +  function combinePrefixPatterns(regexs) {
    +    var capturedGroupIndex = 0;
    +
    +    var needToFoldCase = false;
    +    var ignoreCase = false;
    +    for (var i = 0, n = regexs.length; i < n; ++i) {
    +      var regex = regexs[i];
    +      if (regex.ignoreCase) {
    +        ignoreCase = true;
    +      } else if (/[a-z]/i.test(regex.source.replace(
    +                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
    +        needToFoldCase = true;
    +        ignoreCase = false;
    +        break;
    +      }
    +    }
    +
    +    function decodeEscape(charsetPart) {
    +      if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
    +      switch (charsetPart.charAt(1)) {
    +        case 'b': return 8;
    +        case 't': return 9;
    +        case 'n': return 0xa;
    +        case 'v': return 0xb;
    +        case 'f': return 0xc;
    +        case 'r': return 0xd;
    +        case 'u': case 'x':
    +          return parseInt(charsetPart.substring(2), 16)
    +              || charsetPart.charCodeAt(1);
    +        case '0': case '1': case '2': case '3': case '4':
    +        case '5': case '6': case '7':
    +          return parseInt(charsetPart.substring(1), 8);
    +        default: return charsetPart.charCodeAt(1);
    +      }
    +    }
    +
    +    function encodeEscape(charCode) {
    +      if (charCode < 0x20) {
    +        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    +      }
    +      var ch = String.fromCharCode(charCode);
    +      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
    +        ch = '\\' + ch;
    +      }
    +      return ch;
    +    }
    +
    +    function caseFoldCharset(charSet) {
    +      var charsetParts = charSet.substring(1, charSet.length - 1).match(
    +          new RegExp(
    +              '\\\\u[0-9A-Fa-f]{4}'
    +              + '|\\\\x[0-9A-Fa-f]{2}'
    +              + '|\\\\[0-3][0-7]{0,2}'
    +              + '|\\\\[0-7]{1,2}'
    +              + '|\\\\[\\s\\S]'
    +              + '|-'
    +              + '|[^-\\\\]',
    +              'g'));
    +      var groups = [];
    +      var ranges = [];
    +      var inverse = charsetParts[0] === '^';
    +      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
    +        var p = charsetParts[i];
    +        switch (p) {
    +          case '\\B': case '\\b':
    +          case '\\D': case '\\d':
    +          case '\\S': case '\\s':
    +          case '\\W': case '\\w':
    +            groups.push(p);
    +            continue;
    +        }
    +        var start = decodeEscape(p);
    +        var end;
    +        if (i + 2 < n && '-' === charsetParts[i + 1]) {
    +          end = decodeEscape(charsetParts[i + 2]);
    +          i += 2;
    +        } else {
    +          end = start;
    +        }
    +        ranges.push([start, end]);
    +        // If the range might intersect letters, then expand it.
    +        if (!(end < 65 || start > 122)) {
    +          if (!(end < 65 || start > 90)) {
    +            ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
    +          }
    +          if (!(end < 97 || start > 122)) {
    +            ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
    +          }
    +        }
    +      }
    +
    +      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    +      // -> [[1, 12], [14, 14], [16, 17]]
    +      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    +      var consolidatedRanges = [];
    +      var lastRange = [NaN, NaN];
    +      for (var i = 0; i < ranges.length; ++i) {
    +        var range = ranges[i];
    +        if (range[0] <= lastRange[1] + 1) {
    +          lastRange[1] = Math.max(lastRange[1], range[1]);
    +        } else {
    +          consolidatedRanges.push(lastRange = range);
    +        }
    +      }
    +
    +      var out = ['['];
    +      if (inverse) { out.push('^'); }
    +      out.push.apply(out, groups);
    +      for (var i = 0; i < consolidatedRanges.length; ++i) {
    +        var range = consolidatedRanges[i];
    +        out.push(encodeEscape(range[0]));
    +        if (range[1] > range[0]) {
    +          if (range[1] + 1 > range[0]) { out.push('-'); }
    +          out.push(encodeEscape(range[1]));
    +        }
    +      }
    +      out.push(']');
    +      return out.join('');
    +    }
    +
    +    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    +      // Split into character sets, escape sequences, punctuation strings
    +      // like ('(', '(?:', ')', '^'), and runs of characters that do not
    +      // include any of the above.
    +      var parts = regex.source.match(
    +          new RegExp(
    +              '(?:'
    +              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
    +              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
    +              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
    +              + '|\\\\[0-9]+'  // a back-reference or octal escape
    +              + '|\\\\[^ux0-9]'  // other escape sequence
    +              + '|\\(\\?[:!=]'  // start of a non-capturing group
    +              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
    +              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
    +              + ')',
    +              'g'));
    +      var n = parts.length;
    +
    +      // Maps captured group numbers to the number they will occupy in
    +      // the output or to -1 if that has not been determined, or to
    +      // undefined if they need not be capturing in the output.
    +      var capturedGroups = [];
    +
    +      // Walk over and identify back references to build the capturedGroups
    +      // mapping.
    +      for (var i = 0, groupIndex = 0; i < n; ++i) {
    +        var p = parts[i];
    +        if (p === '(') {
    +          // groups are 1-indexed, so max group index is count of '('
    +          ++groupIndex;
    +        } else if ('\\' === p.charAt(0)) {
    +          var decimalValue = +p.substring(1);
    +          if (decimalValue && decimalValue <= groupIndex) {
    +            capturedGroups[decimalValue] = -1;
    +          }
    +        }
    +      }
    +
    +      // Renumber groups and reduce capturing groups to non-capturing groups
    +      // where possible.
    +      for (var i = 1; i < capturedGroups.length; ++i) {
    +        if (-1 === capturedGroups[i]) {
    +          capturedGroups[i] = ++capturedGroupIndex;
    +        }
    +      }
    +      for (var i = 0, groupIndex = 0; i < n; ++i) {
    +        var p = parts[i];
    +        if (p === '(') {
    +          ++groupIndex;
    +          if (capturedGroups[groupIndex] === undefined) {
    +            parts[i] = '(?:';
    +          }
    +        } else if ('\\' === p.charAt(0)) {
    +          var decimalValue = +p.substring(1);
    +          if (decimalValue && decimalValue <= groupIndex) {
    +            parts[i] = '\\' + capturedGroups[groupIndex];
    +          }
    +        }
    +      }
    +
    +      // Remove any prefix anchors so that the output will match anywhere.
    +      // ^^ really does mean an anchored match though.
    +      for (var i = 0, groupIndex = 0; i < n; ++i) {
    +        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    +      }
    +
    +      // Expand letters to groupts to handle mixing of case-sensitive and
    +      // case-insensitive patterns if necessary.
    +      if (regex.ignoreCase && needToFoldCase) {
    +        for (var i = 0; i < n; ++i) {
    +          var p = parts[i];
    +          var ch0 = p.charAt(0);
    +          if (p.length >= 2 && ch0 === '[') {
    +            parts[i] = caseFoldCharset(p);
    +          } else if (ch0 !== '\\') {
    +            // TODO: handle letters in numeric escapes.
    +            parts[i] = p.replace(
    +                /[a-zA-Z]/g,
    +                function (ch) {
    +                  var cc = ch.charCodeAt(0);
    +                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
    +                });
    +          }
    +        }
    +      }
    +
    +      return parts.join('');
    +    }
    +
    +    var rewritten = [];
    +    for (var i = 0, n = regexs.length; i < n; ++i) {
    +      var regex = regexs[i];
    +      if (regex.global || regex.multiline) { throw new Error('' + regex); }
    +      rewritten.push(
    +          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
    +    }
    +
    +    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
    +  }
    +
    +  var PR_innerHtmlWorks = null;
    +  function getInnerHtml(node) {
    +    // inner html is hopelessly broken in Safari 2.0.4 when the content is
    +    // an html description of well formed XML and the containing tag is a PRE
    +    // tag, so we detect that case and emulate innerHTML.
    +    if (null === PR_innerHtmlWorks) {
    +      var testNode = document.createElement('PRE');
    +      testNode.appendChild(
    +          document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
    +      PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
    +    }
    +
    +    if (PR_innerHtmlWorks) {
    +      var content = node.innerHTML;
    +      // XMP tags contain unescaped entities so require special handling.
    +      if (isRawContent(node)) {
    +        content = textToHtml(content);
    +      } else if (!isPreformatted(node, content)) {
    +        content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
    +            .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
    +      }
    +      return content;
    +    }
    +
    +    var out = [];
    +    for (var child = node.firstChild; child; child = child.nextSibling) {
    +      normalizedHtml(child, out);
    +    }
    +    return out.join('');
    +  }
    +
    +  /** returns a function that expand tabs to spaces.  This function can be fed
    +    * successive chunks of text, and will maintain its own internal state to
    +    * keep track of how tabs are expanded.
    +    * @return {function (string) : string} a function that takes
    +    *   plain text and return the text with tabs expanded.
    +    * @private
    +    */
    +  function makeTabExpander(tabWidth) {
    +    var SPACES = '                ';
    +    var charInLine = 0;
    +
    +    return function (plainText) {
    +      // walk over each character looking for tabs and newlines.
    +      // On tabs, expand them.  On newlines, reset charInLine.
    +      // Otherwise increment charInLine
    +      var out = null;
    +      var pos = 0;
    +      for (var i = 0, n = plainText.length; i < n; ++i) {
    +        var ch = plainText.charAt(i);
    +
    +        switch (ch) {
    +          case '\t':
    +            if (!out) { out = []; }
    +            out.push(plainText.substring(pos, i));
    +            // calculate how much space we need in front of this part
    +            // nSpaces is the amount of padding -- the number of spaces needed
    +            // to move us to the next column, where columns occur at factors of
    +            // tabWidth.
    +            var nSpaces = tabWidth - (charInLine % tabWidth);
    +            charInLine += nSpaces;
    +            for (; nSpaces >= 0; nSpaces -= SPACES.length) {
    +              out.push(SPACES.substring(0, nSpaces));
    +            }
    +            pos = i + 1;
    +            break;
    +          case '\n':
    +            charInLine = 0;
    +            break;
    +          default:
    +            ++charInLine;
    +        }
    +      }
    +      if (!out) { return plainText; }
    +      out.push(plainText.substring(pos));
    +      return out.join('');
    +    };
    +  }
    +
    +  var pr_chunkPattern = new RegExp(
    +      '[^<]+'  // A run of characters other than '<'
    +      + '|<\!--[\\s\\S]*?--\>'  // an HTML comment
    +      + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'  // a CDATA section
    +      // a probable tag that should not be highlighted
    +      + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
    +      + '|<',  // A '<' that does not begin a larger chunk
    +      'g');
    +  var pr_commentPrefix = /^<\!--/;
    +  var pr_cdataPrefix = /^<!\[CDATA\[/;
    +  var pr_brPrefix = /^<br\b/i;
    +  var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
    +
    +  /** split markup into chunks of html tags (style null) and
    +    * plain text (style {@link #PR_PLAIN}), converting tags which are
    +    * significant for tokenization (<br>) into their textual equivalent.
    +    *
    +    * @param {string} s html where whitespace is considered significant.
    +    * @return {Object} source code and extracted tags.
    +    * @private
    +    */
    +  function extractTags(s) {
    +    // since the pattern has the 'g' modifier and defines no capturing groups,
    +    // this will return a list of all chunks which we then classify and wrap as
    +    // PR_Tokens
    +    var matches = s.match(pr_chunkPattern);
    +    var sourceBuf = [];
    +    var sourceBufLen = 0;
    +    var extractedTags = [];
    +    if (matches) {
    +      for (var i = 0, n = matches.length; i < n; ++i) {
    +        var match = matches[i];
    +        if (match.length > 1 && match.charAt(0) === '<') {
    +          if (pr_commentPrefix.test(match)) { continue; }
    +          if (pr_cdataPrefix.test(match)) {
    +            // strip CDATA prefix and suffix.  Don't unescape since it's CDATA
    +            sourceBuf.push(match.substring(9, match.length - 3));
    +            sourceBufLen += match.length - 12;
    +          } else if (pr_brPrefix.test(match)) {
    +            // <br> tags are lexically significant so convert them to text.
    +            // This is undone later.
    +            sourceBuf.push('\n');
    +            ++sourceBufLen;
    +          } else {
    +            if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
    +              // A <span class="nocode"> will start a section that should be
    +              // ignored.  Continue walking the list until we see a matching end
    +              // tag.
    +              var name = match.match(pr_tagNameRe)[2];
    +              var depth = 1;
    +              var j;
    +              end_tag_loop:
    +              for (j = i + 1; j < n; ++j) {
    +                var name2 = matches[j].match(pr_tagNameRe);
    +                if (name2 && name2[2] === name) {
    +                  if (name2[1] === '/') {
    +                    if (--depth === 0) { break end_tag_loop; }
    +                  } else {
    +                    ++depth;
    +                  }
    +                }
    +              }
    +              if (j < n) {
    +                extractedTags.push(
    +                    sourceBufLen, matches.slice(i, j + 1).join(''));
    +                i = j;
    +              } else {  // Ignore unclosed sections.
    +                extractedTags.push(sourceBufLen, match);
    +              }
    +            } else {
    +              extractedTags.push(sourceBufLen, match);
    +            }
    +          }
    +        } else {
    +          var literalText = htmlToText(match);
    +          sourceBuf.push(literalText);
    +          sourceBufLen += literalText.length;
    +        }
    +      }
    +    }
    +    return { source: sourceBuf.join(''), tags: extractedTags };
    +  }
    +
    +  /** True if the given tag contains a class attribute with the nocode class. */
    +  function isNoCodeTag(tag) {
    +    return !!tag
    +        // First canonicalize the representation of attributes
    +        .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
    +                 ' $1="$2$3$4"')
    +        // Then look for the attribute we want.
    +        .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
    +  }
    +
    +  /**
    +   * Apply the given language handler to sourceCode and add the resulting
    +   * decorations to out.
    +   * @param {number} basePos the index of sourceCode within the chunk of source
    +   *    whose decorations are already present on out.
    +   */
    +  function appendDecorations(basePos, sourceCode, langHandler, out) {
    +    if (!sourceCode) { return; }
    +    var job = {
    +      source: sourceCode,
    +      basePos: basePos
    +    };
    +    langHandler(job);
    +    out.push.apply(out, job.decorations);
    +  }
    +
    +  /** Given triples of [style, pattern, context] returns a lexing function,
    +    * The lexing function interprets the patterns to find token boundaries and
    +    * returns a decoration list of the form
    +    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
    +    * where index_n is an index into the sourceCode, and style_n is a style
    +    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
    +    * all characters in sourceCode[index_n-1:index_n].
    +    *
    +    * The stylePatterns is a list whose elements have the form
    +    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
    +    *
    +    * Style is a style constant like PR_PLAIN, or can be a string of the
    +    * form 'lang-FOO', where FOO is a language extension describing the
    +    * language of the portion of the token in $1 after pattern executes.
    +    * E.g., if style is 'lang-lisp', and group 1 contains the text
    +    * '(hello (world))', then that portion of the token will be passed to the
    +    * registered lisp handler for formatting.
    +    * The text before and after group 1 will be restyled using this decorator
    +    * so decorators should take care that this doesn't result in infinite
    +    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
    +    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
    +    * '<script>foo()<\/script>', which would cause the current decorator to
    +    * be called with '<script>' which would not match the same rule since
    +    * group 1 must not be empty, so it would be instead styled as PR_TAG by
    +    * the generic tag rule.  The handler registered for the 'js' extension would
    +    * then be called with 'foo()', and finally, the current decorator would
    +    * be called with '<\/script>' which would not match the original rule and
    +    * so the generic tag rule would identify it as a tag.
    +    *
    +    * Pattern must only match prefixes, and if it matches a prefix, then that
    +    * match is considered a token with the same style.
    +    *
    +    * Context is applied to the last non-whitespace, non-comment token
    +    * recognized.
    +    *
    +    * Shortcut is an optional string of characters, any of which, if the first
    +    * character, gurantee that this pattern and only this pattern matches.
    +    *
    +    * @param {Array} shortcutStylePatterns patterns that always start with
    +    *   a known character.  Must have a shortcut string.
    +    * @param {Array} fallthroughStylePatterns patterns that will be tried in
    +    *   order if the shortcut ones fail.  May have shortcuts.
    +    *
    +    * @return {function (Object)} a
    +    *   function that takes source code and returns a list of decorations.
    +    */
    +  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
    +    var shortcuts = {};
    +    var tokenizer;
    +    (function () {
    +      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
    +      var allRegexs = [];
    +      var regexKeys = {};
    +      for (var i = 0, n = allPatterns.length; i < n; ++i) {
    +        var patternParts = allPatterns[i];
    +        var shortcutChars = patternParts[3];
    +        if (shortcutChars) {
    +          for (var c = shortcutChars.length; --c >= 0;) {
    +            shortcuts[shortcutChars.charAt(c)] = patternParts;
    +          }
    +        }
    +        var regex = patternParts[1];
    +        var k = '' + regex;
    +        if (!regexKeys.hasOwnProperty(k)) {
    +          allRegexs.push(regex);
    +          regexKeys[k] = null;
    +        }
    +      }
    +      allRegexs.push(/[\0-\uffff]/);
    +      tokenizer = combinePrefixPatterns(allRegexs);
    +    })();
    +
    +    var nPatterns = fallthroughStylePatterns.length;
    +    var notWs = /\S/;
    +
    +    /**
    +     * Lexes job.source and produces an output array job.decorations of style
    +     * classes preceded by the position at which they start in job.source in
    +     * order.
    +     *
    +     * @param {Object} job an object like {@code
    +     *    source: {string} sourceText plain text,
    +     *    basePos: {int} position of job.source in the larger chunk of
    +     *        sourceCode.
    +     * }
    +     */
    +    var decorate = function (job) {
    +      var sourceCode = job.source, basePos = job.basePos;
    +      /** Even entries are positions in source in ascending order.  Odd enties
    +        * are style markers (e.g., PR_COMMENT) that run from that position until
    +        * the end.
    +        * @type {Array.<number|string>}
    +        */
    +      var decorations = [basePos, PR_PLAIN];
    +      var pos = 0;  // index into sourceCode
    +      var tokens = sourceCode.match(tokenizer) || [];
    +      var styleCache = {};
    +
    +      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
    +        var token = tokens[ti];
    +        var style = styleCache[token];
    +        var match = void 0;
    +
    +        var isEmbedded;
    +        if (typeof style === 'string') {
    +          isEmbedded = false;
    +        } else {
    +          var patternParts = shortcuts[token.charAt(0)];
    +          if (patternParts) {
    +            match = token.match(patternParts[1]);
    +            style = patternParts[0];
    +          } else {
    +            for (var i = 0; i < nPatterns; ++i) {
    +              patternParts = fallthroughStylePatterns[i];
    +              match = token.match(patternParts[1]);
    +              if (match) {
    +                style = patternParts[0];
    +                break;
    +              }
    +            }
    +
    +            if (!match) {  // make sure that we make progress
    +              style = PR_PLAIN;
    +            }
    +          }
    +
    +          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
    +          if (isEmbedded && !(match && typeof match[1] === 'string')) {
    +            isEmbedded = false;
    +            style = PR_SOURCE;
    +          }
    +
    +          if (!isEmbedded) { styleCache[token] = style; }
    +        }
    +
    +        var tokenStart = pos;
    +        pos += token.length;
    +
    +        if (!isEmbedded) {
    +          decorations.push(basePos + tokenStart, style);
    +        } else {  // Treat group 1 as an embedded block of source code.
    +          var embeddedSource = match[1];
    +          var embeddedSourceStart = token.indexOf(embeddedSource);
    +          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
    +          if (match[2]) {
    +            // If embeddedSource can be blank, then it would match at the
    +            // beginning which would cause us to infinitely recurse on the
    +            // entire token, so we catch the right context in match[2].
    +            embeddedSourceEnd = token.length - match[2].length;
    +            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
    +          }
    +          var lang = style.substring(5);
    +          // Decorate the left of the embedded source
    +          appendDecorations(
    +              basePos + tokenStart,
    +              token.substring(0, embeddedSourceStart),
    +              decorate, decorations);
    +          // Decorate the embedded source
    +          appendDecorations(
    +              basePos + tokenStart + embeddedSourceStart,
    +              embeddedSource,
    +              langHandlerForExtension(lang, embeddedSource),
    +              decorations);
    +          // Decorate the right of the embedded section
    +          appendDecorations(
    +              basePos + tokenStart + embeddedSourceEnd,
    +              token.substring(embeddedSourceEnd),
    +              decorate, decorations);
    +        }
    +      }
    +      job.decorations = decorations;
    +    };
    +    return decorate;
    +  }
    +
    +  /** returns a function that produces a list of decorations from source text.
    +    *
    +    * This code treats ", ', and ` as string delimiters, and \ as a string
    +    * escape.  It does not recognize perl's qq() style strings.
    +    * It has no special handling for double delimiter escapes as in basic, or
    +    * the tripled delimiters used in python, but should work on those regardless
    +    * although in those cases a single string literal may be broken up into
    +    * multiple adjacent string literals.
    +    *
    +    * It recognizes C, C++, and shell style comments.
    +    *
    +    * @param {Object} options a set of optional parameters.
    +    * @return {function (Object)} a function that examines the source code
    +    *     in the input job and builds the decoration list.
    +    */
    +  function sourceDecorator(options) {
    +    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
    +    if (options['tripleQuotedStrings']) {
    +      // '''multi-line-string''', 'single-line-string', and double-quoted
    +      shortcutStylePatterns.push(
    +          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
    +           null, '\'"']);
    +    } else if (options['multiLineStrings']) {
    +      // 'multi-line-string', "multi-line-string"
    +      shortcutStylePatterns.push(
    +          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
    +           null, '\'"`']);
    +    } else {
    +      // 'single-line-string', "single-line-string"
    +      shortcutStylePatterns.push(
    +          [PR_STRING,
    +           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
    +           null, '"\'']);
    +    }
    +    if (options['verbatimStrings']) {
    +      // verbatim-string-literal production from the C# grammar.  See issue 93.
    +      fallthroughStylePatterns.push(
    +          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
    +    }
    +    var hc = options['hashComments'];
    +    if (hc) {
    +      if (options['cStyleComments']) {
    +        if (hc > 1) {  // multiline hash comments
    +          shortcutStylePatterns.push(
    +              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
    +        } else {
    +          // Stop C preprocessor declarations at an unclosed open comment
    +          shortcutStylePatterns.push(
    +              [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
    +               null, '#']);
    +        }
    +        fallthroughStylePatterns.push(
    +            [PR_STRING,
    +             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
    +             null]);
    +      } else {
    +        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
    +      }
    +    }
    +    if (options['cStyleComments']) {
    +      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
    +      fallthroughStylePatterns.push(
    +          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
    +    }
    +    if (options['regexLiterals']) {
    +      var REGEX_LITERAL = (
    +          // A regular expression literal starts with a slash that is
    +          // not followed by * or / so that it is not confused with
    +          // comments.
    +          '/(?=[^/*])'
    +          // and then contains any number of raw characters,
    +          + '(?:[^/\\x5B\\x5C]'
    +          // escape sequences (\x5C),
    +          +    '|\\x5C[\\s\\S]'
    +          // or non-nesting character sets (\x5B\x5D);
    +          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
    +          // finally closed by a /.
    +          + '/');
    +      fallthroughStylePatterns.push(
    +          ['lang-regex',
    +           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    +           ]);
    +    }
    +
    +    var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
    +    if (keywords.length) {
    +      fallthroughStylePatterns.push(
    +          [PR_KEYWORD,
    +           new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
    +    }
    +
    +    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    +    fallthroughStylePatterns.push(
    +        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    +        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    +        [PR_TYPE,        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
    +        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    +        [PR_LITERAL,
    +         new RegExp(
    +             '^(?:'
    +             // A hex number
    +             + '0x[a-f0-9]+'
    +             // or an octal or decimal number,
    +             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    +             // possibly in scientific notation
    +             + '(?:e[+\\-]?\\d+)?'
    +             + ')'
    +             // with an optional modifier like UL for unsigned long
    +             + '[a-z]*', 'i'),
    +         null, '0123456789'],
    +        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
    +
    +    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    +  }
    +
    +  var decorateSource = sourceDecorator({
    +        'keywords': ALL_KEYWORDS,
    +        'hashComments': true,
    +        'cStyleComments': true,
    +        'multiLineStrings': true,
    +        'regexLiterals': true
    +      });
    +
    +  /** Breaks {@code job.source} around style boundaries in
    +    * {@code job.decorations} while re-interleaving {@code job.extractedTags},
    +    * and leaves the result in {@code job.prettyPrintedHtml}.
    +    * @param {Object} job like {
    +    *    source: {string} source as plain text,
    +    *    extractedTags: {Array.<number|string>} extractedTags chunks of raw
    +    *                   html preceded by their position in {@code job.source}
    +    *                   in order
    +    *    decorations: {Array.<number|string} an array of style classes preceded
    +    *                 by the position at which they start in job.source in order
    +    * }
    +    * @private
    +    */
    +  function recombineTagsAndDecorations(job) {
    +    var sourceText = job.source;
    +    var extractedTags = job.extractedTags;
    +    var decorations = job.decorations;
    +
    +    var html = [];
    +    // index past the last char in sourceText written to html
    +    var outputIdx = 0;
    +
    +    var openDecoration = null;
    +    var currentDecoration = null;
    +    var tagPos = 0;  // index into extractedTags
    +    var decPos = 0;  // index into decorations
    +    var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
    +
    +    var adjacentSpaceRe = /([\r\n ]) /g;
    +    var startOrSpaceRe = /(^| ) /gm;
    +    var newlineRe = /\r\n?|\n/g;
    +    var trailingSpaceRe = /[ \r\n]$/;
    +    var lastWasSpace = true;  // the last text chunk emitted ended with a space.
    +
    +    // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
    +    var isIE678 = window['_pr_isIE6']();
    +    var lineBreakHtml = (
    +        isIE678
    +        ? (job.sourceNode.tagName === 'PRE'
    +           // Use line feeds instead of <br>s so that copying and pasting works
    +           // on IE.
    +           // See Issue 104 for the derivation of this mess.
    +           ? (isIE678 === 6 ? '&#160;\r\n' :
    +              isIE678 === 7 ? '&#160;<br />\r' :
    +              isIE678 === 8 ? '&#160;<br />' : '&#160;\r')
    +           // IE collapses multiple adjacent <br>s into 1 line break.
    +           // Prefix every newline with '&#160;' to prevent such behavior.
    +           // &nbsp; is the same as &#160; but works in XML as well as HTML.
    +           : '&#160;<br />')
    +        : '<br />');
    +
    +    // Look for a class like linenums or linenums:<n> where <n> is the 1-indexed
    +    // number of the first line.
    +    var numberLines = job.sourceNode.className.match(/\blinenums\b(?::(\d+))?/);
    +    var lineBreaker;
    +    if (numberLines) {
    +      var lineBreaks = [];
    +      for (var i = 0; i < 10; ++i) {
    +        lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
    +      }
    +      var lineNum = numberLines[1] && numberLines[1].length
    +          ? numberLines[1] - 1 : 0;  // Lines are 1-indexed
    +      html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
    +      if (lineNum) {
    +        html.push(' value="', lineNum + 1, '"');
    +      }
    +      html.push('>');
    +      lineBreaker = function () {
    +        var lb = lineBreaks[++lineNum % 10];
    +        // If a decoration is open, we need to close it before closing a list-item
    +        // and reopen it on the other side of the list item.
    +        return openDecoration
    +            ? ('</span>' + lb + '<span class="' + openDecoration + '">') : lb;
    +      };
    +    } else {
    +      lineBreaker = lineBreakHtml;
    +    }
    +
    +    // A helper function that is responsible for opening sections of decoration
    +    // and outputing properly escaped chunks of source
    +    function emitTextUpTo(sourceIdx) {
    +      if (sourceIdx > outputIdx) {
    +        if (openDecoration && openDecoration !== currentDecoration) {
    +          // Close the current decoration
    +          html.push('</span>');
    +          openDecoration = null;
    +        }
    +        if (!openDecoration && currentDecoration) {
    +          openDecoration = currentDecoration;
    +          html.push('<span class="', openDecoration, '">');
    +        }
    +        // This interacts badly with some wikis which introduces paragraph tags
    +        // into pre blocks for some strange reason.
    +        // It's necessary for IE though which seems to lose the preformattedness
    +        // of <pre> tags when their innerHTML is assigned.
    +        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
    +        // and it serves to undo the conversion of <br>s to newlines done in
    +        // chunkify.
    +        var htmlChunk = textToHtml(
    +            tabExpander(sourceText.substring(outputIdx, sourceIdx)))
    +            .replace(lastWasSpace
    +                     ? startOrSpaceRe
    +                     : adjacentSpaceRe, '$1&#160;');
    +        // Keep track of whether we need to escape space at the beginning of the
    +        // next chunk.
    +        lastWasSpace = trailingSpaceRe.test(htmlChunk);
    +        html.push(htmlChunk.replace(newlineRe, lineBreaker));
    +        outputIdx = sourceIdx;
    +      }
    +    }
    +
    +    while (true) {
    +      // Determine if we're going to consume a tag this time around.  Otherwise
    +      // we consume a decoration or exit.
    +      var outputTag;
    +      if (tagPos < extractedTags.length) {
    +        if (decPos < decorations.length) {
    +          // Pick one giving preference to extractedTags since we shouldn't open
    +          // a new style that we're going to have to immediately close in order
    +          // to output a tag.
    +          outputTag = extractedTags[tagPos] <= decorations[decPos];
    +        } else {
    +          outputTag = true;
    +        }
    +      } else {
    +        outputTag = false;
    +      }
    +      // Consume either a decoration or a tag or exit.
    +      if (outputTag) {
    +        emitTextUpTo(extractedTags[tagPos]);
    +        if (openDecoration) {
    +          // Close the current decoration
    +          html.push('</span>');
    +          openDecoration = null;
    +        }
    +        html.push(extractedTags[tagPos + 1]);
    +        tagPos += 2;
    +      } else if (decPos < decorations.length) {
    +        emitTextUpTo(decorations[decPos]);
    +        currentDecoration = decorations[decPos + 1];
    +        decPos += 2;
    +      } else {
    +        break;
    +      }
    +    }
    +    emitTextUpTo(sourceText.length);
    +    if (openDecoration) {
    +      html.push('</span>');
    +    }
    +    if (numberLines) { html.push('</li></ol>'); }
    +    job.prettyPrintedHtml = html.join('');
    +  }
    +
    +  /** Maps language-specific file extensions to handlers. */
    +  var langHandlerRegistry = {};
    +  /** Register a language handler for the given file extensions.
    +    * @param {function (Object)} handler a function from source code to a list
    +    *      of decorations.  Takes a single argument job which describes the
    +    *      state of the computation.   The single parameter has the form
    +    *      {@code {
    +    *        source: {string} as plain text.
    +    *        decorations: {Array.<number|string>} an array of style classes
    +    *                     preceded by the position at which they start in
    +    *                     job.source in order.
    +    *                     The language handler should assigned this field.
    +    *        basePos: {int} the position of source in the larger source chunk.
    +    *                 All positions in the output decorations array are relative
    +    *                 to the larger source chunk.
    +    *      } }
    +    * @param {Array.<string>} fileExtensions
    +    */
    +  function registerLangHandler(handler, fileExtensions) {
    +    for (var i = fileExtensions.length; --i >= 0;) {
    +      var ext = fileExtensions[i];
    +      if (!langHandlerRegistry.hasOwnProperty(ext)) {
    +        langHandlerRegistry[ext] = handler;
    +      } else if ('console' in window) {
    +        console['warn']('cannot override language handler %s', ext);
    +      }
    +    }
    +  }
    +  function langHandlerForExtension(extension, source) {
    +    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    +      // Treat it as markup if the first non whitespace character is a < and
    +      // the last non-whitespace character is a >.
    +      extension = /^\s*</.test(source)
    +          ? 'default-markup'
    +          : 'default-code';
    +    }
    +    return langHandlerRegistry[extension];
    +  }
    +  registerLangHandler(decorateSource, ['default-code']);
    +  registerLangHandler(
    +      createSimpleLexer(
    +          [],
    +          [
    +           [PR_PLAIN,       /^[^<?]+/],
    +           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    +           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    +           // Unescaped content in an unknown language
    +           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    +           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    +           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    +           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    +           // Unescaped content in javascript.  (Or possibly vbscript).
    +           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    +           // Contains unescaped stylesheet content
    +           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    +           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    +          ]),
    +      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    +  registerLangHandler(
    +      createSimpleLexer(
    +          [
    +           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    +           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    +           ],
    +          [
    +           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    +           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    +           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    +           [PR_PUNCTUATION,  /^[=<>\/]+/],
    +           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    +           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    +           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    +           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    +           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    +           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    +           ]),
    +      ['in.tag']);
    +  registerLangHandler(
    +      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': CPP_KEYWORDS,
    +          'hashComments': true,
    +          'cStyleComments': true
    +        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': 'null true false'
    +        }), ['json']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': CSHARP_KEYWORDS,
    +          'hashComments': true,
    +          'cStyleComments': true,
    +          'verbatimStrings': true
    +        }), ['cs']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': JAVA_KEYWORDS,
    +          'cStyleComments': true
    +        }), ['java']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': SH_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true
    +        }), ['bsh', 'csh', 'sh']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': PYTHON_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'tripleQuotedStrings': true
    +        }), ['cv', 'py']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': PERL_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'regexLiterals': true
    +        }), ['perl', 'pl', 'pm']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': RUBY_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'regexLiterals': true
    +        }), ['rb']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': JSCRIPT_KEYWORDS,
    +          'cStyleComments': true,
    +          'regexLiterals': true
    +        }), ['js']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': COFFEE_KEYWORDS,
    +          'hashComments': 3,  // ### style block comments
    +          'cStyleComments': true,
    +          'multilineStrings': true,
    +          'tripleQuotedStrings': true,
    +          'regexLiterals': true
    +        }), ['coffee']);
    +  registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    +
    +  function applyDecorator(job) {
    +    var sourceCodeHtml = job.sourceCodeHtml;
    +    var opt_langExtension = job.langExtension;
    +
    +    // Prepopulate output in case processing fails with an exception.
    +    job.prettyPrintedHtml = sourceCodeHtml;
    +
    +    try {
    +      // Extract tags, and convert the source code to plain text.
    +      var sourceAndExtractedTags = extractTags(sourceCodeHtml);
    +      /** Plain text. @type {string} */
    +      var source = sourceAndExtractedTags.source;
    +      job.source = source;
    +      job.basePos = 0;
    +
    +      /** Even entries are positions in source in ascending order.  Odd entries
    +        * are tags that were extracted at that position.
    +        * @type {Array.<number|string>}
    +        */
    +      job.extractedTags = sourceAndExtractedTags.tags;
    +
    +      // Apply the appropriate language handler
    +      langHandlerForExtension(opt_langExtension, source)(job);
    +      // Integrate the decorations and tags back into the source code to produce
    +      // a decorated html string which is left in job.prettyPrintedHtml.
    +      recombineTagsAndDecorations(job);
    +    } catch (e) {
    +      if ('console' in window) {
    +        console['log'](e && e['stack'] ? e['stack'] : e);
    +      }
    +    }
    +  }
    +
    +  function prettyPrintOne(sourceCodeHtml, sourceNode, opt_langExtension) {
    +    var job = {
    +      sourceCodeHtml: sourceCodeHtml,
    +      langExtension: opt_langExtension,
    +      sourceNode: sourceNode
    +    };
    +    applyDecorator(job);
    +    return job.prettyPrintedHtml;
    +  }
    +
    +  function prettyPrint(opt_whenDone) {
    +    function byTagName(tn) { return document.getElementsByTagName(tn); }
    +    // fetch a list of nodes to rewrite
    +    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
    +    var elements = [];
    +    for (var i = 0; i < codeSegments.length; ++i) {
    +      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    +        elements.push(codeSegments[i][j]);
    +      }
    +    }
    +    codeSegments = null;
    +
    +    var clock = Date;
    +    if (!clock['now']) {
    +      clock = { 'now': function () { return (new Date).getTime(); } };
    +    }
    +
    +    // The loop is broken into a series of continuations to make sure that we
    +    // don't make the browser unresponsive when rewriting a large page.
    +    var k = 0;
    +    var prettyPrintingJob;
    +
    +    function doWork() {
    +      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
    +                     clock.now() + 250 /* ms */ :
    +                     Infinity);
    +      for (; k < elements.length && clock.now() < endTime; k++) {
    +        var cs = elements[k];
    +        if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
    +          // If the classes includes a language extensions, use it.
    +          // Language extensions can be specified like
    +          //     <pre class="prettyprint lang-cpp">
    +          // the language extension "cpp" is used to find a language handler as
    +          // passed to PR.registerLangHandler.
    +          var langExtension = cs.className.match(/\blang-(\w+)\b/);
    +          if (langExtension) { langExtension = langExtension[1]; }
    +
    +          // make sure this is not nested in an already prettified element
    +          var nested = false;
    +          for (var p = cs.parentNode; p; p = p.parentNode) {
    +            if ((p.tagName === 'pre' || p.tagName === 'code' ||
    +                 p.tagName === 'xmp') &&
    +                p.className && p.className.indexOf('prettyprint') >= 0) {
    +              nested = true;
    +              break;
    +            }
    +          }
    +          if (!nested) {
    +            // fetch the content as a snippet of properly escaped HTML.
    +            // Firefox adds newlines at the end.
    +            var content = getInnerHtml(cs);
    +            content = content.replace(/(?:\r\n?|\n)$/, '');
    +
    +            // do the pretty printing
    +            prettyPrintingJob = {
    +              sourceCodeHtml: content,
    +              langExtension: langExtension,
    +              sourceNode: cs
    +            };
    +            applyDecorator(prettyPrintingJob);
    +            replaceWithPrettyPrintedHtml();
    +          }
    +        }
    +      }
    +      if (k < elements.length) {
    +        // finish up in a continuation
    +        setTimeout(doWork, 250);
    +      } else if (opt_whenDone) {
    +        opt_whenDone();
    +      }
    +    }
    +
    +    function replaceWithPrettyPrintedHtml() {
    +      var newContent = prettyPrintingJob.prettyPrintedHtml;
    +      if (!newContent) { return; }
    +      var cs = prettyPrintingJob.sourceNode;
    +
    +      // push the prettified html back into the tag.
    +      if (!isRawContent(cs)) {
    +        // just replace the old html with the new
    +        cs.innerHTML = newContent;
    +      } else {
    +        // we need to change the tag to a <pre> since <xmp>s do not allow
    +        // embedded tags such as the span tags used to attach styles to
    +        // sections of source code.
    +        var pre = document.createElement('PRE');
    +        for (var i = 0; i < cs.attributes.length; ++i) {
    +          var a = cs.attributes[i];
    +          if (a.specified) {
    +            var aname = a.name.toLowerCase();
    +            if (aname === 'class') {
    +              pre.className = a.value;  // For IE 6
    +            } else {
    +              pre.setAttribute(a.name, a.value);
    +            }
    +          }
    +        }
    +        pre.innerHTML = newContent;
    +
    +        // remove the old
    +        cs.parentNode.replaceChild(pre, cs);
    +        cs = pre;
    +      }
    +    }
    +
    +    doWork();
    +  }
    +
    +  window['PR_normalizedHtml'] = normalizedHtml;
    +  window['prettyPrintOne'] = prettyPrintOne;
    +  window['prettyPrint'] = prettyPrint;
    +  window['PR'] = {
    +        'combinePrefixPatterns': combinePrefixPatterns,
    +        'createSimpleLexer': createSimpleLexer,
    +        'registerLangHandler': registerLangHandler,
    +        'sourceDecorator': sourceDecorator,
    +        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    +        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    +        'PR_COMMENT': PR_COMMENT,
    +        'PR_DECLARATION': PR_DECLARATION,
    +        'PR_KEYWORD': PR_KEYWORD,
    +        'PR_LITERAL': PR_LITERAL,
    +        'PR_NOCODE': PR_NOCODE,
    +        'PR_PLAIN': PR_PLAIN,
    +        'PR_PUNCTUATION': PR_PUNCTUATION,
    +        'PR_SOURCE': PR_SOURCE,
    +        'PR_STRING': PR_STRING,
    +        'PR_TAG': PR_TAG,
    +        'PR_TYPE': PR_TYPE
    +      };
    +})();
    diff --git a/wt-3.1.7a/examples/codeview/prettify/prettify.min.js b/wt-3.1.7a/examples/codeview/prettify/prettify.min.js
    new file mode 100644
    index 0000000..13ad99d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/codeview/prettify/prettify.min.js
    @@ -0,0 +1,32 @@
    +window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
    +(function(){function y(a){return a.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(a,f,j){switch(a.nodeType){case 1:var l=a.tagName.toLowerCase();f.push("<",l);var m=a.attributes,o=m.length;if(o){if(j){for(var r=[],i=o;--i>=0;)r[i]=m[i];r.sort(function(q,n){return q.name<n.name?-1:q.name===n.name?0:1});m=r}for(i=0;i<o;++i){r=m[i];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
    +for(m=a.firstChild;m;m=m.nextSibling)H(m,f,j);if(a.firstChild||!/^(?:br|link|img)$/.test(l))f.push("</",l,">");break;case 3:case 4:f.push(y(a.nodeValue));break}}function O(a){function f(b){if(b.charAt(0)!=="\\")return b.charCodeAt(0);switch(b.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(b.substring(2),16)||b.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(b.substring(1),
    +8);default:return b.charCodeAt(1)}}function j(b){if(b<32)return(b<16?"\\x0":"\\x")+b.toString(16);b=String.fromCharCode(b);if(b==="\\"||b==="-"||b==="["||b==="]")b="\\"+b;return b}function l(b){var d=b.substring(1,b.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));b=[];for(var c=[],p=d[0]==="^",e=p?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":b.push(g);
    +continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;c.push([g,s]);if(!(s<65||g>122)){s<65||g>90||c.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||c.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}c.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<c.length;++e){h=c[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}c=["["];p&&c.push("^");c.push.apply(c,b);for(e=0;e<d.length;++e){h=d[e];c.push(j(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&c.push("-");
    +c.push(j(h[1]))}}c.push("]");return c.join("")}function m(b){for(var d=b.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),c=d.length,p=[],e=0,h=0;e<c;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)p[g]=-1}for(e=1;e<p.length;++e)if(-1===p[e])p[e]=++o;for(h=e=0;e<c;++e){g=d[e];if(g==="("){++h;if(p[h]===undefined)d[e]="(?:"}else if("\\"===
    +g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+p[h]}for(h=e=0;e<c;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(b.ignoreCase&&r)for(e=0;e<c;++e){g=d[e];b=g.charAt(0);if(g.length>=2&&b==="[")d[e]=l(g);else if(b!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var o=0,r=false,i=false,q=0,n=a.length;q<n;++q){var t=a[q];if(t.ignoreCase)i=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
    +""))){r=true;i=false;break}}var k=[];q=0;for(n=a.length;q<n;++q){t=a[q];if(t.global||t.multiline)throw new Error(""+t);k.push("(?:"+m(t)+")")}return new RegExp(k.join("|"),i?"gi":"g")}function Y(a){var f=0;return function(j){for(var l=null,m=0,o=0,r=j.length;o<r;++o)switch(j.charAt(o)){case "\t":l||(l=[]);l.push(j.substring(m,o));m=a-f%a;for(f+=m;m>=0;m-=16)l.push("                ".substring(0,m));m=o+1;break;case "\n":f=0;break;default:++f}if(!l)return j;l.push(j.substring(m));return l.join("")}}
    +function I(a,f,j,l){if(f){a={source:f,c:a};j(a);l.push.apply(l,a.d)}}function C(a,f){var j={},l;(function(){for(var r=a.concat(f),i=[],q={},n=0,t=r.length;n<t;++n){var k=r[n],b=k[3];if(b)for(var d=b.length;--d>=0;)j[b.charAt(d)]=k;k=k[1];b=""+k;if(!q.hasOwnProperty(b)){i.push(k);q[b]=null}}i.push(/[\0-\uffff]/);l=O(i)})();var m=f.length;function o(r){for(var i=r.c,q=[i,z],n=0,t=r.source.match(l)||[],k={},b=0,d=t.length;b<d;++b){var c=t[b],p=k[c],e=void 0,h;if(typeof p==="string")h=false;else{var g=
    +j[c.charAt(0)];if(g){e=c.match(g[1]);p=g[0]}else{for(h=0;h<m;++h){g=f[h];if(e=c.match(g[1])){p=g[0];break}}e||(p=z)}if((h=p.length>=5&&"lang-"===p.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;p=P}h||(k[c]=p)}g=n;n+=c.length;if(h){h=e[1];var s=c.indexOf(h),v=s+h.length;if(e[2]){v=c.length-e[2].length;s=v-h.length}p=p.substring(5);I(i+g,c.substring(0,s),o,q);I(i+g+s,h,Q(p,h),q);I(i+g+v,c.substring(v),o,q)}else q.push(i+g,p)}r.d=q}return o}function x(a){var f=[],j=[];if(a.tripleQuotedStrings)f.push([A,
    +/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]);else a.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);a.verbatimStrings&&j.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);
    +var l=a.hashComments;if(l)if(a.cStyleComments){l>1?f.push([B,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):f.push([B,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);j.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else f.push([B,/^#[^\r\n]*/,null,"#"]);if(a.cStyleComments){j.push([B,/^\/\/[^\r\n]*/,null]);j.push([B,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}a.regexLiterals&&j.push(["lang-regex",new RegExp("^"+
    +Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);a=a.keywords.replace(/^\s+|\s+$/g,"");a.length&&j.push([R,new RegExp("^(?:"+a.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);j.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);
    +return C(f,j)}function $(a){function f(D){if(D>r){if(i&&i!==q){o.push("</span>");i=null}if(!i&&q){i=q;o.push('<span class="',i,'">')}var T=y(k(j.substring(r,D))).replace(e?d:b,"$1&#160;");e=p.test(T);o.push(T.replace(c,s));r=D}}var j=a.source,l=a.g,m=a.d,o=[],r=0,i=null,q=null,n=0,t=0,k=Y(window.PR_TAB_WIDTH),b=/([\r\n ]) /g,d=/(^| ) /gm,c=/\r\n?|\n/g,p=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?a.a.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br />\r":h===8?"&#160;<br />":"&#160;\r":"&#160;<br />":
    +"<br />";var g=a.a.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;o.push('<ol class="linenums"><li class="L',F%10,'"');F&&o.push(' value="',F+1,'"');o.push(">");s=function(){var D=v[++F%10];return i?"</span>"+D+'<span class="'+i+'">':D}}else s=h;for(;;)if(n<l.length?t<m.length?l[n]<=m[t]:true:false){f(l[n]);if(i){o.push("</span>");i=null}o.push(l[n+1]);n+=2}else if(t<m.length){f(m[t]);q=m[t+1];t+=2}else break;
    +f(j.length);i&&o.push("</span>");g&&o.push("</li></ol>");a.b=o.join("")}function u(a,f){for(var j=f.length;--j>=0;){var l=f[j];if(G.hasOwnProperty(l))"console"in window&&console.warn("cannot override language handler %s",l);else G[l]=a}}function Q(a,f){a&&G.hasOwnProperty(a)||(a=/^\s*</.test(f)?"default-markup":"default-code");return G[a]}function U(a){var f=a.f,j=a.e;a.b=f;try{var l,m=f.match(aa);f=[];var o=0,r=[];if(m)for(var i=0,q=m.length;i<q;++i){var n=m[i];if(n.length>1&&n.charAt(0)==="<"){if(!ba.test(n))if(ca.test(n)){f.push(n.substring(9,
    +n.length-3));o+=n.length-12}else if(da.test(n)){f.push("\n");++o}else if(n.indexOf(V)>=0&&n.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=n.match(W)[2],k=1,b;b=i+1;a:for(;b<q;++b){var d=m[b].match(W);if(d&&d[2]===t)if(d[1]==="/"){if(--k===0)break a}else++k}if(b<q){r.push(o,m.slice(i,b+1).join(""));i=b}else r.push(o,n)}else r.push(o,n)}else{var c;k=n;var p=k.indexOf("&");if(p<0)c=k;else{for(--p;(p=k.indexOf("&#",p+
    +1))>=0;){var e=k.indexOf(";",p);if(e>=0){var h=k.substring(p+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(k=k.substring(0,p)+String.fromCharCode(s)+k.substring(e+1))}}c=k.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,"&")}f.push(c);o+=c.length}}l={source:f.join(""),h:r};var v=l.source;a.source=v;a.c=0;a.g=l.h;Q(j,v)(a);$(a)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}function ka(a,f,j){a=
    +{f:a,e:j,a:f};U(a);return a.b}function la(a){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?i.now()+250:Infinity;q<l.length&&i.now()<t;q++){var k=l[q];if(k.className&&k.className.indexOf("prettyprint")>=0){var b=k.className.match(/\blang-(\w+)\b/);if(b)b=b[1];for(var d=false,c=k.parentNode;c;c=c.parentNode)if((c.tagName==="pre"||c.tagName==="code"||c.tagName==="xmp")&&c.className&&c.className.indexOf("prettyprint")>=0){d=true;break}if(!d){if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
    +K=!/</.test(d.innerHTML)}if(K){d=k.innerHTML;if("XMP"===k.tagName)d=y(d);else{if("PRE"===k.tagName)c=true;else if(ma.test(d)){c="";if(k.currentStyle)c=k.currentStyle.whiteSpace;else if(window.getComputedStyle)c=window.getComputedStyle(k,null).whiteSpace;c=!c||c==="pre"}else c=true;c||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g," "))}d=d}else{d=[];for(c=k.firstChild;c;c=c.nextSibling)H(c,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");n={f:d,e:b,a:k};U(n);if(k=n.b){b=n.a;
    +if("XMP"===b.tagName){d=document.createElement("PRE");for(c=0;c<b.attributes.length;++c){var p=b.attributes[c];if(p.specified)if(p.name.toLowerCase()==="class")d.className=p.value;else d.setAttribute(p.name,p.value)}d.innerHTML=k;b.parentNode.replaceChild(d,b)}else b.innerHTML=k}}}}if(q<l.length)setTimeout(f,250);else a&&a()}for(var j=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],l=[],m=0;m<j.length;++m)for(var o=0,r=j[m].length;o<
    +r;++o)l.push(j[m][o]);j=null;var i=Date;i.now||(i={now:function(){return(new Date).getTime()}});var q=0,n;f()}var A="str",R="kwd",B="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var a=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue","delete","do","else","finally","instanceof",
    +"return","throw","try","typeof"],f="(?:^^|[+-]",j=0;j<a.length;++j)f+="|"+a[j].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ma=/[\r\n]/g,K=null,aa=new RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,na=x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending dynamic event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
    +hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(na,["default-code"]);u(C([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[B,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup",
    +"htm","html","mxml","xhtml","xml","xsl"]);u(C([[z,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],
    +["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);u(C([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
    +hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending dynamic event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
    +hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
    +cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
    +u(x({keywords:"caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",hashComments:true,
    +multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(x({keywords:"all and by catch class else extends false finally for if in is isnt loop new no not null of off on or return super then true try unless until when while yes ",
    +hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);u(C([],[[A,/^[\s\S]+/]]),["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=ka;window.prettyPrint=la;window.PR={combinePrefixPatterns:O,createSimpleLexer:C,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:B,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,PR_TAG:"tag",PR_TYPE:S}})();
    diff --git a/wt-3.1.7a/examples/composer/AddresseeEdit.C b/wt-3.1.7a/examples/composer/AddresseeEdit.C
    new file mode 100644
    index 0000000..edbc0a0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/AddresseeEdit.C
    @@ -0,0 +1,86 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/tokenizer.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include <Wt/WContainerWidget>
    +
    +#include "AddresseeEdit.h"
    +#include "Label.h"
    +
    +AddresseeEdit::AddresseeEdit(const WString& label, WContainerWidget *parent,
    +			     WContainerWidget *labelParent)
    +  : WTextArea(parent)
    +{
    +  label_ = new Label(label, labelParent);
    +
    +  setRows(3); setColumns(55);
    +  resize(WLength(99, WLength::Percentage), WLength::Auto);
    +
    +  setInline(false); // for IE to position the suggestions well
    +}
    +
    +void AddresseeEdit::setAddressees(const std::vector<Contact>& contacts)
    +{
    +  std::wstring text;
    +
    +  for (unsigned i = 0; i < contacts.size(); ++i) {
    +    if (i != 0)
    +      text += L", ";
    +    text += contacts[i].formatted();
    +  }
    +
    +  setText(text);
    +}
    +
    +bool AddresseeEdit::parse(std::vector<Contact>& contacts) const
    +{
    +  typedef boost::tokenizer<boost::escaped_list_separator<wchar_t>,
    +                           std::wstring::const_iterator, std::wstring>
    +    CsvTokenizer;
    +
    +  std::wstring t = text();
    +  CsvTokenizer tok(t);
    +  
    +  for (CsvTokenizer::iterator i = tok.begin(); i != tok.end(); ++i) {
    +    std::wstring addressee = *i;
    +
    +    boost::trim(addressee);
    +    std::wstring::size_type pos = addressee.find_last_of(' ');
    +    if (pos != std::string::npos) {
    +      std::wstring email = addressee.substr(pos + 1);
    +      std::wstring name = addressee.substr(0, pos);
    +
    +      boost::trim(email);
    +      boost::trim(name);
    +      if (email[0] == '<')
    +	email = email.substr(1);
    +      if (email[email.length() - 1] == '>')
    +	email = email.substr(0, email.length() - 1);
    +
    +      if (!email.empty())
    +	contacts.push_back(Contact(name, email));
    +    } else
    +      if (!addressee.empty())
    +	contacts.push_back(Contact(L"", addressee));
    +  }
    +  return true;
    +}
    +
    +std::vector<Contact> AddresseeEdit::addressees() const
    +{
    +  std::vector<Contact> result;
    +  parse(result);
    +
    +  return result;
    +}
    +
    +void AddresseeEdit::setHidden(bool how)
    +{
    +  WTextArea::setHidden(how);
    +  label_->setHidden(how);
    +}
    diff --git a/wt-3.1.7a/examples/composer/AddresseeEdit.h b/wt-3.1.7a/examples/composer/AddresseeEdit.h
    new file mode 100644
    index 0000000..ae6b968
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/AddresseeEdit.h
    @@ -0,0 +1,64 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ADDRESSEE_EDIT_H_
    +#define ADDRESSEE_EDIT_H_
    +
    +#include <Wt/WTextArea>
    +
    +#include "Contact.h"
    +
    +using namespace Wt;
    +
    +namespace Wt {
    +  class WTableCell;
    +}
    +
    +class Label;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief An edit field for an email addressee.
    + *
    + * This widget is part of the %Wt composer example. 
    + */
    +class AddresseeEdit : public WTextArea
    +{
    +public:
    +  /*! \brief Create a new addressee edit with the given label.
    +   *
    +   * Constructs also a widget to hold the label in the labelParent.
    +   * The label will be hidden and shown together with this field.
    +   */
    +  AddresseeEdit(const WString& label, WContainerWidget *parent,
    +		WContainerWidget *labelParent);
    +
    +  /*! \brief Set a list of addressees.
    +   */
    +  void setAddressees(const std::vector<Contact>& contacts);
    +
    +  /*! \brief Get a list of addressees
    +   */
    +  std::vector<Contact> addressees() const;
    +
    +  //! Reimplement hide() and show() to also hide() and show() the label.
    +  virtual void setHidden(bool);
    +
    +private:
    +  //! The label associated with this edit.
    +  Label *label_;
    +
    +  //! Parse the addressees into a list of contacts.
    +  bool parse(std::vector<Contact>& contacts) const;
    +};
    +
    +/*@}*/
    +
    +
    +#endif // ADDRESSEE_EDIT_H_
    diff --git a/wt-3.1.7a/examples/composer/Attachment.h b/wt-3.1.7a/examples/composer/Attachment.h
    new file mode 100644
    index 0000000..c662bb9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Attachment.h
    @@ -0,0 +1,47 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ATTACHMENT_H_
    +#define ATTACHMENT_H_
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief An email attachment.
    + *
    + * This widget is part of the %Wt composer example.
    + */
    +class Attachment
    +{
    +public:
    +  /*! \brief The file name.
    +   */
    +  std::wstring fileName;
    +
    +  /*! \brief The content description.
    +   */
    +  std::wstring contentDescription;
    +
    +  /*! \brief the spooled file name.
    +   */
    +  std::string spoolFileName;
    +
    +  /*! \brief Create an attachment.
    +   */
    +  Attachment(const std::wstring aFileName,
    +	     const std::wstring aContentDescription,
    +	     const std::string aSpoolFileName)
    +    : fileName(aFileName),
    +      contentDescription(aContentDescription),
    +      spoolFileName(aSpoolFileName)
    +  { }
    +};
    +
    +/*@}*/
    +
    +#endif // ATTACHMENT_H_
    diff --git a/wt-3.1.7a/examples/composer/AttachmentEdit.C b/wt-3.1.7a/examples/composer/AttachmentEdit.C
    new file mode 100644
    index 0000000..8f8fc15
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/AttachmentEdit.C
    @@ -0,0 +1,204 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <fstream>
    +#ifndef WIN32
    +#include <unistd.h>
    +#endif
    +#include <boost/lexical_cast.hpp>
    +
    +#include <iostream>
    +
    +#include <Wt/WAnchor>
    +#include <Wt/WCheckBox>
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WFileResource>
    +#include <Wt/WFileUpload>
    +#include <Wt/WProgressBar>
    +#include <Wt/WText>
    +
    +#include "Attachment.h"
    +#include "AttachmentEdit.h"
    +#include "Composer.h"
    +#include "Option.h"
    +
    +AttachmentEdit::UploadInfo::UploadInfo(const Http::UploadedFile& f,
    +				       WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    info_(f)
    +{
    +  /*
    +   * Include the file ?
    +   */
    +  keep_ = new WCheckBox(this);
    +  keep_->setChecked();
    +
    +  /*
    +   * Give information on the file uploaded.
    +   */
    +  std::streamsize fsize = 0;
    +  {
    +    std::ifstream theFile(info_.spoolFileName().c_str());
    +    theFile.seekg(0, std::ios_base::end);
    +    fsize = theFile.tellg();
    +    theFile.seekg(0);
    +  }
    +  std::wstring size;
    +  if (fsize < 1024)
    +    size = boost::lexical_cast<std::wstring>(fsize) + L" bytes";
    +  else
    +    size = boost::lexical_cast<std::wstring>((int)(fsize / 1024))
    +      + L"kb";
    +
    +  std::wstring fn = static_cast<std::wstring>
    +    (escapeText(WString::fromUTF8(info_.clientFileName())));
    +
    +  downloadLink_
    +    = new WAnchor("", fn + L" (<i>" + WString::fromUTF8(info_.contentType())
    +		  + L"</i>) " + size, this);
    +
    +  WFileResource *res = new WFileResource(info_.contentType(),
    +					 info_.spoolFileName(),
    +					 this);
    +  res->suggestFileName(info_.clientFileName());
    +  downloadLink_->setResource(res);
    +}
    +
    +AttachmentEdit::AttachmentEdit(Composer *composer, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    composer_(composer),
    +    uploadDone_(this),
    +    uploadFailed_(false)
    +{
    +  /*
    +   * The file upload itself.
    +   */
    +  upload_ = new WFileUpload(this);
    +  upload_->setMultiple(true);
    +  upload_->setFileTextSize(40);
    +
    +  /*
    +   * A progress bar
    +   */
    +  WProgressBar *progress = new WProgressBar();
    +  progress->setFormat(WString::Empty);
    +  progress->setVerticalAlignment(AlignMiddle);
    +  upload_->setProgressBar(progress);
    +
    +  /*
    +   * The 'remove' option.
    +   */
    +  remove_ = new Option(tr("msg.remove"), this);
    +  upload_->decorationStyle().font().setSize(WFont::Smaller);
    +  upload_->setVerticalAlignment(AlignMiddle);
    +  remove_->setMargin(5, Left);
    +  remove_->item()->clicked().connect(this, &WWidget::hide);
    +  remove_->item()->clicked().connect(this, &AttachmentEdit::remove);
    +
    +  // The error message.
    +  error_ = new WText("", this);
    +  error_->setStyleClass("error");
    +  error_->setMargin(WLength(5), Left);
    +
    +  /*
    +   * React to events.
    +   */
    +
    +  // Try to catch the fileupload change signal to trigger an upload.
    +  // We could do like google and at a delay with a WTimer as well...
    +  upload_->changed().connect(upload_, &WFileUpload::upload);
    +
    +  // React to a succesfull upload.
    +  upload_->uploaded().connect(this, &AttachmentEdit::uploaded);
    +
    +  // React to a fileupload problem.
    +  upload_->fileTooLarge().connect(this, &AttachmentEdit::fileTooLarge);
    +
    +  /*
    +   * Connect the uploadDone signal to the Composer's attachmentDone,
    +   * so that the Composer can keep track of attachment upload progress,
    +   * if it wishes.
    +   */
    +  uploadDone_.connect(composer, &Composer::attachmentDone);
    +}
    +
    +bool AttachmentEdit::uploadNow()
    +{
    +  /*
    +   * See if this attachment still needs to be uploaded,
    +   * and return if a new asynchronous upload is started.
    +   */
    +  if (upload_) {
    +    if (upload_->canUpload()) {
    +      upload_->upload();
    +      return true;
    +    } else
    +      return false;
    +  } else
    +    return false;
    +}
    +
    +void AttachmentEdit::uploaded()
    +{
    +  std::vector<Http::UploadedFile> files = upload_->uploadedFiles();
    +
    +  if (!files.empty()) {
    +    /*
    +     * Delete this widgets since we have a succesfull upload.
    +     */
    +    delete upload_;
    +    upload_ = 0;
    +    delete remove_;
    +    remove_ = 0;
    +    delete error_;
    +    error_ = 0;
    +
    +    for (unsigned i = 0; i < files.size(); ++i)
    +      uploadInfo_.push_back(new UploadInfo(files[i], this));
    +  } else {
    +    error_->setText(tr("msg.file-empty"));
    +    uploadFailed_ = true;
    +  }
    +
    +  /*
    +   * Signal to the Composer that a new asynchronous file upload was processed.
    +   */
    +  uploadDone_.emit();
    +}
    +
    +void AttachmentEdit::remove()
    +{
    +  composer_->removeAttachment(this);
    +}
    +
    +void AttachmentEdit::fileTooLarge(int size)
    +{
    +  error_->setText(tr("msg.file-too-large"));
    +  uploadFailed_ = true;
    +
    +  /*
    +   * Signal to the Composer that a new asyncrhonous file upload was processed.
    +   */
    +  uploadDone_.emit();
    +}
    +
    +std::vector<Attachment> AttachmentEdit::attachments()
    +{
    +  std::vector<Attachment> result;
    +
    +  for (unsigned i = 0; i < uploadInfo_.size(); ++i) {
    +    if (uploadInfo_[i]->keep_->isChecked()) {
    +      Http::UploadedFile& f = uploadInfo_[i]->info_;
    +      f.stealSpoolFile();
    +      result.push_back(Attachment
    +		       (WString::fromUTF8(f.clientFileName()),
    +			WString::fromUTF8(f.contentType()),
    +			f.spoolFileName()));
    +    }
    +  }
    +
    +  return result;
    +}
    diff --git a/wt-3.1.7a/examples/composer/AttachmentEdit.h b/wt-3.1.7a/examples/composer/AttachmentEdit.h
    new file mode 100644
    index 0000000..8f6aac5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/AttachmentEdit.h
    @@ -0,0 +1,110 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ATTACHMENT_EDIT_H_
    +#define ATTACHMENT_EDIT_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WFileUpload;
    +  class WText;
    +  class WCheckBox;
    +}
    +
    +class Attachment;
    +class Composer;
    +class Option;
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief An edit field for an email attachment.
    + *
    + * This widget managements one attachment edit: it shows a file upload
    + * control, handles the upload, and gives feed-back on the file
    + * uploaded.
    + *
    + * This widget is part of the %Wt composer example.
    + */
    +class AttachmentEdit : public WContainerWidget
    +{
    +public:
    +  /*! \brief Creates an attachment edit field.
    +   */
    +  AttachmentEdit(Composer *composer, WContainerWidget *parent = 0);
    +
    +  /*! \brief Updates the file now.
    +   *
    +   * Returns whether a new file will be uploaded. If so, the uploadDone
    +   * signal will be signalled when the file is uploaded (or failed to
    +   * upload).
    +   */
    +  bool uploadNow();
    +
    +  /*! \brief Returns whether the upload failed.
    +   */
    +  bool uploadFailed() const { return uploadFailed_; }
    +
    +  /*! \brief Returns the attachment.
    +   */
    +  std::vector<Attachment> attachments();
    +
    +  /*! \brief Signal emitted when new attachment(s) have been uploaded (or failed
    +   *         to upload.
    +   */
    +  Signal<void>& uploadDone() { return uploadDone_; }
    +
    +private:
    +  Composer    *composer_;
    +
    +  Signal<void> uploadDone_;
    +
    +  //! The WFileUpload control.
    +  WFileUpload *upload_;
    +
    +  class UploadInfo : public WContainerWidget
    +  {
    +  public:
    +    UploadInfo(const Http::UploadedFile& f, WContainerWidget *parent = 0);
    +
    +    Http::UploadedFile info_;
    +
    +    //! Anchor referencing the file.
    +    WAnchor   *downloadLink_;
    +
    +    //! The check box to keep or discard the uploaded file.
    +    WCheckBox *keep_;
    +  };
    +
    +  std::vector<UploadInfo *> uploadInfo_;
    +
    +  //! The text box to display an error (empty or too big file)
    +  WText *error_;
    +
    +  //! The option to cancel the file upload
    +  Option *remove_;
    +
    +  //! The state of the last upload process.
    +  bool uploadFailed_;
    +
    +  //! Slot triggered when the WFileUpload completed an upload.
    +  void uploaded();
    +
    +  //! Slot triggered when the WFileUpload received an oversized file.
    +  void fileTooLarge(int size);
    +
    +  //! Slot triggered when the users wishes to remove this attachment edit.
    +  void remove();
    +};
    +
    +/*@}*/
    +
    +#endif // ATTACHMENT_EDIT_H_
    diff --git a/wt-3.1.7a/examples/composer/CMakeLists.txt b/wt-3.1.7a/examples/composer/CMakeLists.txt
    new file mode 100644
    index 0000000..1da3a07
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/CMakeLists.txt
    @@ -0,0 +1,23 @@
    +WT_ADD_EXAMPLE(composer.wt 
    +  AddresseeEdit.C
    +  AttachmentEdit.C
    +  ComposeExample.C
    +  Composer.C
    +  ContactSuggestions.C
    +  Label.C
    +  Option.C
    +  OptionList.C
    +)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +  ${WT_SOURCE_DIR}/examples/treelist
    +)
    +
    +ADD_DEPENDENCIES(composer.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/composer/ComposeExample.C b/wt-3.1.7a/examples/composer/ComposeExample.C
    new file mode 100644
    index 0000000..5aeed76
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/ComposeExample.C
    @@ -0,0 +1,164 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WText>
    +#include <Wt/WPushButton>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WStringUtil>
    +#ifndef _MSC_VER
    +#include <unistd.h>
    +#endif
    +
    +#include "Composer.h"
    +#include "ComposeExample.h"
    +#include "Contact.h"
    +
    +ComposeExample::ComposeExample(WContainerWidget *parent)
    +  : WContainerWidget(parent)
    +{
    +  composer_ = new Composer(this);
    +
    +  std::vector<Contact> addressBook;
    +  addressBook.push_back(Contact(L"Koen Deforche",
    +				L"koen.deforche@gmail.com"));
    +  addressBook.push_back(Contact(L"Koen alias1",
    +				L"koen.alias1@yahoo.com"));
    +  addressBook.push_back(Contact(L"Koen alias2",
    +				L"koen.alias2@yahoo.com"));
    +  addressBook.push_back(Contact(L"Koen alias3",
    +				L"koen.alias3@yahoo.com"));
    +  addressBook.push_back(Contact(L"Bartje",
    +				L"jafar@hotmail.com"));
    +  composer_->setAddressBook(addressBook);
    +
    +  std::vector<Contact> contacts;
    +  contacts.push_back(Contact(L"Koen Deforche", L"koen.deforche@gmail.com"));
    +
    +  composer_->setTo(contacts);
    +  composer_->setSubject("That's cool! Want to start your own google?");
    +
    +  composer_->send.connect(this, &ComposeExample::send);
    +  composer_->discard.connect(this, &ComposeExample::discard);
    +
    +  details_ = new WContainerWidget(this);
    +
    +  new WText(tr("example.info"), details_);
    +}
    +
    +void ComposeExample::send()
    +{
    +  WContainerWidget *feedback = new WContainerWidget(this);
    +  feedback->setStyleClass(L"feedback");
    +
    +  WContainerWidget *horiz = new WContainerWidget(feedback);
    +  new WText(L"<p>We could have, but did not send the following email:</p>",
    +	    horiz);
    +
    +  std::vector<Contact> contacts = composer_->to();
    +  if (!contacts.empty())
    +    horiz = new WContainerWidget(feedback);
    +  for (unsigned i = 0; i < contacts.size(); ++i) {
    +    new WText(L"To: \"" + contacts[i].name + L"\" <"
    +	      + contacts[i].email + L">", PlainText, horiz);
    +    new WBreak(horiz);
    +  }
    +
    +  contacts = composer_->cc();
    +  if (!contacts.empty())
    +    horiz = new WContainerWidget(feedback);
    +  for (unsigned i = 0; i < contacts.size(); ++i) {
    +    new WText(L"Cc: \"" + contacts[i].name + L"\" <"
    +	      + contacts[i].email + L">", PlainText, horiz);
    +    new WBreak(horiz);
    +  }
    +  
    +  contacts = composer_->bcc();
    +  if (!contacts.empty())
    +    horiz = new WContainerWidget(feedback);
    +  for (unsigned i = 0; i < contacts.size(); ++i) {
    +    new WText(L"Bcc: \"" + contacts[i].name + L"\" <"
    +	      + contacts[i].email + L">", PlainText, horiz);
    +    new WBreak(horiz);
    +  }
    +
    +  horiz = new WContainerWidget(feedback);
    +  WText *t = new WText("Subject: \"" + composer_->subject() + "\"",
    +		       PlainText, horiz);
    +
    +  std::vector<Attachment> attachments = composer_->attachments();
    +  if (!attachments.empty())
    +    horiz = new WContainerWidget(feedback);
    +  for (unsigned i = 0; i < attachments.size(); ++i) {
    +    new WText(L"Attachment: \""
    +	      + attachments[i].fileName
    +	      + L"\" (" + attachments[i].contentDescription
    +	      + L")", PlainText, horiz);
    +
    +    unlink(attachments[i].spoolFileName.c_str());
    +
    +    new WText(", was in spool file: "
    +	      + attachments[i].spoolFileName, horiz);
    +    new WBreak(horiz);
    +  }
    +
    +  std::wstring message = composer_->message();
    +
    +  horiz = new WContainerWidget(feedback);
    +  t = new WText("Message body: ", horiz);
    +  new WBreak(horiz);
    +
    +  if (!message.empty()) {
    +    t = new WText(message, PlainText, horiz);
    +  } else
    +    t = new WText("<i>(empty)</i>", horiz);
    +
    +  delete composer_;
    +  delete details_;
    +
    +  wApp->quit();
    +}
    +
    +void ComposeExample::discard()
    +{
    +  WContainerWidget *feedback = new WContainerWidget(this);
    +  feedback->setStyleClass("feedback");
    +
    +  WContainerWidget *horiz = new WContainerWidget(feedback);
    +  new WText("<p>Wise decision! Everyone's mailbox is already full anyway.</p>",
    +	    horiz);
    +
    +  delete composer_;
    +  delete details_;
    +
    +  wApp->quit();
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +
    +  // The following assumes composer.xml is in the webserver working directory
    +  // (but does not need to be deployed within docroot):
    +  app->messageResourceBundle().use(WApplication::appRoot() + "composer");
    +
    +  // The following assumes composer.css is deployed in the seb server at the
    +  // same location as the application:
    +  app->useStyleSheet("composer.css");
    +
    +  app->setTitle("Composer example");
    +
    +  app->root()->addWidget(new ComposeExample());
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/composer/ComposeExample.h b/wt-3.1.7a/examples/composer/ComposeExample.h
    new file mode 100644
    index 0000000..879e982
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/ComposeExample.h
    @@ -0,0 +1,42 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef COMPOSE_EXAMPLE_H_
    +#define COMPOSE_EXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +class Composer;
    +
    +namespace Wt {
    +  class WTreeNode;
    +}
    +
    +/**
    + * \defgroup composerexample Composer example
    + */
    +/*@{*/
    +
    +/*! \brief Main widget of the %Composer example.
    + */
    +class ComposeExample : public WContainerWidget
    +{
    +public:
    +  /*! \brief create a new Composer example.
    +   */
    +  ComposeExample(WContainerWidget *parent = 0);
    +
    +private:
    +  Composer *composer_;
    +  WContainerWidget *details_;
    +
    +  void send();
    +  void discard();
    +};
    +
    +/*@}*/
    +
    +#endif // COMPOSE_EXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/composer/Composer.C b/wt-3.1.7a/examples/composer/Composer.C
    new file mode 100644
    index 0000000..d4d435f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Composer.C
    @@ -0,0 +1,389 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +
    +#include "AddresseeEdit.h"
    +#include "AttachmentEdit.h"
    +#include "Composer.h"
    +#include "ContactSuggestions.h"
    +#include "Label.h"
    +#include "Option.h"
    +#include "OptionList.h"
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WImage>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WStringUtil>
    +
    +Composer::Composer(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    saving_(false),
    +    sending_(false)
    +{
    +  setImplementation(layout_ = new WContainerWidget());
    +
    +  createUi();
    +}
    +
    +void Composer::setTo(const std::vector<Contact>& to)
    +{
    +  toEdit_->setAddressees(to);
    +}
    +
    +void Composer::setSubject(const WString& subject)
    +{
    +  subject_->setText(subject);
    +}
    +
    +void Composer::setMessage(const WString& message)
    +{
    +  message_->setText(message);
    +}
    +
    +std::vector<Contact> Composer::to() const
    +{
    +  return toEdit_->addressees();
    +}
    +
    +std::vector<Contact> Composer::cc() const
    +{
    +  return ccEdit_->addressees();
    +}
    + 
    +std::vector<Contact> Composer::bcc() const
    +{
    +  return bccEdit_->addressees();
    +}
    +
    +void Composer::setAddressBook(const std::vector<Contact>& contacts)
    +{
    +  contactSuggestions_->setAddressBook(contacts);
    +}
    +
    +const WString& Composer::subject() const
    +{
    +  return subject_->text();
    +}
    +
    +std::vector<Attachment> Composer::attachments() const
    +{
    +  std::vector<Attachment> attachments;
    +
    +  for (unsigned i = 0; i < attachments_.size() - 1; ++i) {
    +    std::vector<Attachment> toadd = attachments_[i]->attachments();
    +
    +    attachments.insert(attachments.end(), toadd.begin(), toadd.end());
    +  }
    +
    +  return attachments;
    +}
    +
    +const WString& Composer::message() const
    +{
    +  return message_->text();
    +}
    +
    +void Composer::createUi()
    +{
    +  setStyleClass("darker");
    +
    +  // horizontal layout container, used for top and bottom buttons.
    +  WContainerWidget *horiz;
    +
    +  /*
    +   * Top buttons
    +   */
    +  horiz = new WContainerWidget(layout_);
    +  horiz->setPadding(5);
    +  topSendButton_ = new WPushButton(tr("msg.send"), horiz);
    +  topSendButton_->setStyleClass("default"); // default action
    +  topSaveNowButton_ = new WPushButton(tr("msg.savenow"), horiz);
    +  topDiscardButton_ = new WPushButton(tr("msg.discard"), horiz);
    +
    +  // Text widget which shows status messages, next to the top buttons.
    +  statusMsg_ = new WText(horiz);
    +  statusMsg_->setMargin(15, Left);
    +
    +  /*
    +   * To, Cc, Bcc, Subject, Attachments
    +   *
    +   * They are organized in a two-column table: left column for
    +   * labels, and right column for the edit.
    +   */
    +  edits_ = new WTable(layout_);
    +  edits_->setStyleClass("lighter");
    +  edits_->resize(WLength(100, WLength::Percentage), WLength::Auto);
    +  edits_->elementAt(0, 0)->resize(WLength(1, WLength::Percentage),
    +				  WLength::Auto);
    +
    +  /*
    +   * To, Cc, Bcc
    +   */
    +  toEdit_ = new AddresseeEdit(tr("msg.to"), edits_->elementAt(0, 1),
    +			      edits_->elementAt(0, 0));
    +  // add some space above To:
    +  edits_->elementAt(0, 1)->setMargin(5, Top);
    +  ccEdit_ = new AddresseeEdit(tr("msg.cc"), edits_->elementAt(1, 1),
    +			      edits_->elementAt(1, 0));
    +  bccEdit_ = new AddresseeEdit(tr("msg.bcc"), edits_->elementAt(2, 1),
    +			       edits_->elementAt(2, 0));
    +
    +  ccEdit_->hide();
    +  bccEdit_->hide();
    +
    +  /*
    +   * Addressbook suggestions popup
    +   */
    +  contactSuggestions_ = new ContactSuggestions(layout_);
    +
    +  contactSuggestions_->forEdit(toEdit_);
    +  contactSuggestions_->forEdit(ccEdit_);
    +  contactSuggestions_->forEdit(bccEdit_);
    +
    +  /*
    +   * We use an OptionList widget to show the expand options for
    +   * ccEdit_ and bccEdit_ nicely next to each other, separated
    +   * by pipe characters.
    +   */
    +  options_ = new OptionList(edits_->elementAt(3, 1));
    +
    +  options_->add(addcc_ = new Option(tr("msg.addcc")));
    +  options_->add(addbcc_ = new Option(tr("msg.addbcc")));
    +
    +  /*
    +   * Subject
    +   */
    +  new Label(tr("msg.subject"), edits_->elementAt(4, 0));
    +  subject_ = new WLineEdit(edits_->elementAt(4, 1));
    +  subject_->resize(WLength(99, WLength::Percentage), WLength::Auto);
    +
    +  /*
    +   * Attachments
    +   */
    +  new WImage("icons/paperclip.png", edits_->elementAt(5, 0));
    +  edits_->elementAt(5, 0)->setContentAlignment(AlignRight | AlignTop);
    +  edits_->elementAt(5, 0)->setPadding(3);
    +  
    +  // Attachment edits: we always have the next attachmentedit ready
    +  // but hidden. This improves the response time, since the show()
    +  // and hide() slots are stateless.
    +  attachments_.push_back(new AttachmentEdit(this, edits_->elementAt(5, 1)));
    +  attachments_.back()->hide();
    +
    +  /*
    +   * Two options for attaching files. The first does not say 'another'.
    +   */
    +  attachFile_ = new Option(tr("msg.attachfile"),
    +			   edits_->elementAt(5, 1));
    +  attachOtherFile_ = new Option(tr("msg.attachanother"),
    +				edits_->elementAt(5, 1));
    +  attachOtherFile_->hide();
    +
    +  /*
    +   * Message
    +   */
    +  message_ = new WTextArea(layout_);
    +  message_->setColumns(80);
    +  message_->setRows(10); // should be 20, but let's keep it smaller
    +  message_->setMargin(10);
    +
    +  /*
    +   * Bottom buttons
    +   */
    +  horiz = new WContainerWidget(layout_);
    +  horiz->setPadding(5);
    +  botSendButton_ = new WPushButton(tr("msg.send"), horiz);
    +  botSendButton_->setStyleClass("default");
    +  botSaveNowButton_ = new WPushButton(tr("msg.savenow"), horiz);
    +  botDiscardButton_ = new WPushButton(tr("msg.discard"), horiz);
    +
    +  /*
    +   * Button events.
    +   */
    +  topSendButton_->clicked().connect(this, &Composer::sendIt);
    +  botSendButton_->clicked().connect(this, &Composer::sendIt);
    +  topSaveNowButton_->clicked().connect(this, &Composer::saveNow);
    +  botSaveNowButton_->clicked().connect(this, &Composer::saveNow);
    +  topDiscardButton_->clicked().connect(this, &Composer::discardIt);
    +  botDiscardButton_->clicked().connect(this, &Composer::discardIt);
    +
    +  /*
    +   * Option events to show the cc or Bcc edit.
    +   *
    +   * Clicking on the option should both show the corresponding edit, and
    +   * hide the option itself.
    +   */
    +  addcc_->item()->clicked().connect(ccEdit_, &WWidget::show);
    +  addcc_->item()->clicked().connect(addcc_, &WWidget::hide);
    +  addcc_->item()->clicked().connect(options_, &OptionList::update);
    +  addcc_->item()->clicked().connect(ccEdit_, &WFormWidget::setFocus);
    +
    +  addbcc_->item()->clicked().connect(bccEdit_, &WWidget::show);
    +  addbcc_->item()->clicked().connect(addbcc_, &WWidget::hide);
    +  addbcc_->item()->clicked().connect(options_, &OptionList::update);
    +  addbcc_->item()->clicked().connect(bccEdit_, &WFormWidget::setFocus);
    +
    +  /*
    +   * Option event to attach the first attachment.
    +   *
    +   * We show the first attachment, and call attachMore() to prepare the
    +   * next attachment edit that will be hidden.
    +   *
    +   * In addition, we need to show the 'attach More' option, and hide the
    +   * 'attach' option.
    +   */
    +  attachFile_->item()->clicked().connect(attachments_.back(), &WWidget::show);
    +  attachFile_->item()->clicked().connect(attachOtherFile_, &WWidget::show);
    +  attachFile_->item()->clicked().connect(attachFile_, &WWidget::hide);
    +  attachFile_->item()->clicked().connect(this, &Composer::attachMore);
    +  attachOtherFile_->item()->clicked().connect(this, &Composer::attachMore);
    +}
    +
    +void Composer::attachMore()
    +{
    +  /*
    +   * Create and append the next AttachmentEdit, that will be hidden.
    +   */
    +  AttachmentEdit *edit = new AttachmentEdit(this);
    +  edits_->elementAt(5, 1)->insertBefore(edit, attachOtherFile_);
    +  attachments_.push_back(edit);
    +  attachments_.back()->hide();
    +
    +  // Connect the attachOtherFile_ option to show this attachment.
    +  attachOtherFile_->item()->clicked()
    +    .connect(attachments_.back(), &WWidget::show);
    +}
    +
    +void Composer::removeAttachment(AttachmentEdit *attachment)
    +{
    +  /*
    +   * Remove the given attachment from the attachments list.
    +   */
    +  std::vector<AttachmentEdit *>::iterator i
    +    = std::find(attachments_.begin(), attachments_.end(), attachment);
    +
    +  if (i != attachments_.end()) {
    +    attachments_.erase(i);
    +    delete attachment;
    +
    +    if (attachments_.size() == 1) {
    +      /*
    +       * This was the last visible attachment, thus, we should switch
    +       * the option control again.
    +       */
    +      attachOtherFile_->hide();
    +      attachFile_->show();
    +      attachFile_->item()->clicked()
    +	.connect(attachments_.back(), &WWidget::show);
    +    }
    +  }
    +}
    +
    +void Composer::sendIt()
    +{
    +  if (!sending_) {
    +    sending_ = true;
    +
    +    /*
    +     * First save -- this will check for the sending_ state
    +     * signal if successfull.
    +     */
    +    saveNow();
    +  }
    +}
    +
    +void Composer::saveNow()
    +{
    +  if (!saving_) {
    +    saving_ = true;
    +
    +    /*
    +     * Check if any attachments still need to be uploaded.
    +     * This may be the case when fileupload change events could not
    +     * be caught (for example in Konqueror).
    +     */
    +    attachmentsPending_ = 0;
    +
    +    for (unsigned i = 0; i < attachments_.size() - 1; ++i) {
    +      if (attachments_[i]->uploadNow()) {
    +	++attachmentsPending_;
    +
    +	// this will trigger attachmentDone() when done, see
    +	// the AttachmentEdit constructor.
    +      }
    +    }
    +
    +    std::cerr << "Attachments pending: " << attachmentsPending_ << std::endl;
    +    if (attachmentsPending_)
    +      setStatus(tr("msg.uploading"), "status");
    +    else
    +      saved();
    +  }
    +}
    +
    +void Composer::attachmentDone()
    +{
    +  if (saving_) {
    +    --attachmentsPending_;
    +    std::cerr << "Attachments still: " << attachmentsPending_ << std::endl;
    +
    +    if (attachmentsPending_ == 0)
    +      saved();
    +  }
    +}
    +
    +void Composer::setStatus(const WString& text, const WString& style)
    +{
    +  statusMsg_->setText(text);
    +  statusMsg_->setStyleClass(style);
    +}
    +
    +void Composer::saved()
    +{
    +  /*
    +   * All attachments have been processed.
    +   */
    +
    +  bool attachmentsFailed = false;
    +  for (unsigned i = 0; i < attachments_.size() - 1; ++i)
    +    if (attachments_[i]->uploadFailed()) {
    +      attachmentsFailed = true;
    +      break;
    +    }
    +
    +  if (attachmentsFailed) {
    +    setStatus(tr("msg.attachment.failed"), "error");
    +  } else {
    +#ifndef WIN32
    +    time_t t = time(0);
    +    struct tm td;
    +    gmtime_r(&t, &td);
    +    char buffer[100];
    +    strftime(buffer, 100, "%H:%M", &td);
    +#else
    +    char buffer[] = "server"; // Should fix this; for now just make sense
    +#endif
    +    setStatus(tr("msg.ok"), "status");
    +    statusMsg_->setText(std::string("Draft saved at ") + buffer);
    +
    +    if (sending_) {
    +      send.emit();
    +      return;
    +    }
    +  }
    +
    +  saving_ = false;
    +  sending_ = false;
    +}
    +
    +void Composer::discardIt()
    +{ 
    +  discard.emit();
    +}
    diff --git a/wt-3.1.7a/examples/composer/Composer.h b/wt-3.1.7a/examples/composer/Composer.h
    new file mode 100644
    index 0000000..b754270
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Composer.h
    @@ -0,0 +1,199 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef COMPOSER_H_
    +#define COMPOSER_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +#include "Contact.h"
    +#include "Attachment.h"
    +
    +namespace Wt {
    +class WLineEdit;
    +class WPushButton;
    +class WTable;
    +class WText;
    +class WTextArea;
    +}
    +
    +class AddresseeEdit;
    +class AttachmentEdit;
    +class ContactSuggestions;
    +class OptionList;
    +class Option;
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief An E-mail composer widget.
    + *
    + * This widget is part of the %Wt composer example.
    + */
    +class Composer : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Construct a new Composer
    +   */
    +  Composer(WContainerWidget *parent = 0);
    +
    +  /*! \brief Set message To: contacts
    +   */
    +  void setTo(const std::vector<Contact>& to);
    +
    +  /*! \brief Set subject.
    +   */
    +  void setSubject(const WString& subject);
    +
    +  /*! \brief Set the message.
    +   */
    +  void setMessage(const WString& message);
    +
    +  /*! \brief Set the address book, for autocomplete suggestions. 
    +   */
    +  void setAddressBook(const std::vector<Contact>& addressBook);
    +
    +  /*! \brief Get the To: contacts.
    +   */
    +  std::vector<Contact> to() const;
    +
    +  /*! \brief Get the Cc: contacts.
    +   */
    +  std::vector<Contact> cc() const;
    +
    +  /*! \brief Get the Bc: contacts.
    +   */
    +  std::vector<Contact> bcc() const;
    +
    +  /*! \brief Get the subject.
    +   */
    +  const WString& subject() const;
    +
    +  /*! \brief Get the list of attachments.
    +   *
    +   * The ownership of the attachment spool files is transferred
    +   * to the caller as well, be sure to delete them !
    +   */
    +  std::vector<Attachment> attachments() const;
    +
    +  /*! \brief Get the message.
    +   */
    +  const WString& message() const;
    +
    +public:
    +  /*! \brief The message is ready to be sent...
    +   */
    +  Wt::Signal<void> send;
    +
    +  /*! \brief The message must be discarded.
    +   */
    +  Wt::Signal<void> discard;
    +
    +private:
    +  WContainerWidget *layout_;
    +
    +  WPushButton      *topSendButton_, *topSaveNowButton_, *topDiscardButton_;
    +  WPushButton      *botSendButton_, *botSaveNowButton_, *botDiscardButton_;
    +  WText            *statusMsg_;
    +
    +  WTable           *edits_;
    +
    +  //! To: Addressees edit.
    +  AddresseeEdit    *toEdit_;
    +  //! Cc: Addressees edit.
    +  AddresseeEdit    *ccEdit_;
    +  //! Bcc: Addressees edit.
    +  AddresseeEdit    *bccEdit_;
    +
    +  //! The suggestions popup for the addressee edits.
    +  ContactSuggestions *contactSuggestions_;
    +
    +  //! The subject line edit.
    +  WLineEdit        *subject_;
    +
    +  //! OptionsList for editing Cc or Bcc
    +  OptionList       *options_;
    +
    +  //! Option for editing Cc:
    +  Option           *addcc_;
    +  //! Option for editing Bcc:
    +  Option           *addbcc_;
    +  //! Option for attaching a file.
    +  Option           *attachFile_;
    +  //! Option for attaching another file.
    +  Option           *attachOtherFile_;
    +
    +  //! Array which holds all the attachments, including one extra invisible one.
    +  std::vector<AttachmentEdit *> attachments_;
    +
    +  //! WTextArea for the main message.
    +  WTextArea        *message_;
    +
    +  //! state when waiting asyncrhonously for attachments to be uploaded
    +  bool saving_, sending_;
    +
    +  //! number of attachments waiting to be uploaded during saving
    +  int attachmentsPending_;
    +
    +  /*!\brief Add an attachment edit.
    +   */
    +  void attachMore();
    +
    +  /*!\brief Remove the given attachment edit.
    +   */
    +  void removeAttachment(AttachmentEdit *attachment);
    +
    +  /*! \brief Slot attached to the Send button.
    +   *
    +   * Tries to save the mail message, and if succesfull, sends it.
    +   */
    +  void sendIt();
    +
    +  /*! \brief Slot attached to the Save now button.
    +   *
    +   * Tries to save the mail message, and gives feedback on failure
    +   * and on success.
    +   */
    +  void saveNow();
    +
    +  /*! \brief Slot attached to the Discard button.
    +   *
    +   * Discards the current message: emits the discard event.
    +   */
    +  void discardIt();
    +
    +  /*! \brief Slotcalled when an attachment has been uploaded.
    +   *
    +   * This used during while saving the email and waiting
    +   * for remaining attachments to be uploaded. It is connected
    +   * to the AttachmentEdit control signals that are emitted when
    +   * an attachment has been processed.
    +   */
    +  void attachmentDone();
    +
    +private:
    +  // create the user-interface
    +  void createUi();
    +
    +  /*! \brief All attachments have been processed, determine the result
    +   *         of saving the message.
    +   */
    +  void saved();
    +
    +  /*! \brief Set the status, and apply the given style.
    +   */
    +  void setStatus(const WString& text, const WString& style);
    +
    +  friend class AttachmentEdit;
    +};
    +
    +/*@}*/
    +
    +#endif // COMPOSER_H_
    diff --git a/wt-3.1.7a/examples/composer/Contact.h b/wt-3.1.7a/examples/composer/Contact.h
    new file mode 100644
    index 0000000..9cd692b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Contact.h
    @@ -0,0 +1,45 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CONTACT_H_
    +#define CONTACT_H_
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief An email contact.
    + *
    + * This widget is part of the %Wt composer example.
    + */
    +struct Contact
    +{
    +  /*! \brief The contact name.
    +   */
    +  std::wstring name;
    +
    +  /*! \brief The contact email address.
    +   */
    +  std::wstring email;
    +
    +  /*! \brief Create a new contact.
    +   */
    +  Contact(const std::wstring name_, const std::wstring email_)
    +    : name(name_),
    +      email(email_)
    +  { }
    +
    +  /*! \brief Get the typical single string form: "name" <email>
    +   */
    +  std::wstring formatted() const {
    +    return L'"' + name + L"\" <" + email + L">";
    +  }
    +};
    +
    +/*@}*/
    +
    +#endif // CONTACT_H_
    diff --git a/wt-3.1.7a/examples/composer/ContactSuggestions.C b/wt-3.1.7a/examples/composer/ContactSuggestions.C
    new file mode 100644
    index 0000000..1a0bf50
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/ContactSuggestions.C
    @@ -0,0 +1,36 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "ContactSuggestions.h"
    +#include "AddresseeEdit.h"
    +#include "Contact.h"
    +
    +namespace {
    +  WSuggestionPopup::Options contactOptions
    +  = { "<b>",         // highlightBeginTag
    +      "</b>",        // highlightEndTag
    +      ',',           // listSeparator
    +      " \\n",        // whitespace
    +      "-., \"@\\n;", // wordSeparators
    +      ", "           // appendReplacedText
    +    };
    +}
    +
    +ContactSuggestions::ContactSuggestions(WContainerWidget *parent)
    +  : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
    +		     WSuggestionPopup::generateReplacerJS(contactOptions),
    +		     parent)
    +{ }
    +
    +void ContactSuggestions::setAddressBook(const std::vector<Contact>& contacts)
    +{
    +  clearSuggestions();
    +
    +  for (unsigned i = 0; i < contacts.size(); ++i)
    +    addSuggestion(contacts[i].formatted(), contacts[i].formatted());
    +}
    diff --git a/wt-3.1.7a/examples/composer/ContactSuggestions.h b/wt-3.1.7a/examples/composer/ContactSuggestions.h
    new file mode 100644
    index 0000000..19a1b74
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/ContactSuggestions.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CONTACT_SUGGESTIONS_H_
    +#define CONTACT_SUGGESTIONS_H_
    +
    +#include <Wt/WSuggestionPopup>
    +
    +class AddresseeEdit;
    +struct Contact;
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief A suggestion popup suggesting contacts from an addressbook.
    + *
    + * This popup provides suggestions from a list of contact, by
    + * matching parts of the name or email adress with the current
    + * value being edited. It also supports editing a list of email
    + * addresses.
    + *
    + * The popup is only available when JavaScript is available, and
    + * is implemented entirely on the client-side.
    + */
    +class ContactSuggestions : public WSuggestionPopup
    +{
    +public:
    +  /*! \brief Create a new ContactSuggestions popup.
    +   */
    +  ContactSuggestions(WContainerWidget *parent = 0);
    +
    +  /*! \brief Set the address book.
    +   */
    +  void setAddressBook(const std::vector<Contact>& contacts);
    +
    +private:
    +};
    +
    +/*@}*/
    +
    +#endif // CONTACT_SUGGESTIONS_H_
    diff --git a/wt-3.1.7a/examples/composer/Label.C b/wt-3.1.7a/examples/composer/Label.C
    new file mode 100644
    index 0000000..5ff9e52
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Label.C
    @@ -0,0 +1,16 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WContainerWidget>
    +
    +#include "Label.h"
    +
    +Label::Label(const WString& text, WContainerWidget *parent)
    +  : WText(text, parent)
    +{ 
    +  setStyleClass(L"label");
    +  parent->setContentAlignment(AlignRight);
    +}
    diff --git a/wt-3.1.7a/examples/composer/Label.h b/wt-3.1.7a/examples/composer/Label.h
    new file mode 100644
    index 0000000..50d2002
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Label.h
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef LABEL_H_
    +#define LABEL_H_
    +
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief A label.
    + *
    + * A label is a WText that is styled as "label", and aligned
    + * to the right in its parent.
    + */
    +class Label : public WText
    +{
    +public:
    +  Label(const WString& text, WContainerWidget *parent);
    +};
    +
    +/*@}*/
    +
    +#endif // LABEL_H_
    diff --git a/wt-3.1.7a/examples/composer/Option.C b/wt-3.1.7a/examples/composer/Option.C
    new file mode 100644
    index 0000000..09792ea
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Option.C
    @@ -0,0 +1,55 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WText>
    +
    +#include "Option.h"
    +#include "OptionList.h"
    +
    +Option::Option(const WString& text, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    sep_(0),
    +    list_(0)
    +{
    +  setInline(true);
    +
    +  option_ = new WText(text, this);
    +  option_->setStyleClass("option");
    +}
    +
    +void Option::setText(const WString& text)
    +{
    +  option_->setText(text);
    +}
    +
    +void Option::setOptionList(OptionList *l)
    +{
    +  list_ = l;
    +}
    +
    +void Option::addSeparator()
    +{
    +  sep_ = new WText("|", this);
    +  sep_->setStyleClass("sep");
    +}
    +
    +void Option::hideSeparator()
    +{
    +  sep_->hide();
    +}
    +
    +void Option::showSeparator()
    +{
    +  sep_->show();
    +}
    +
    +void Option::setHidden(bool hidden)
    +{
    +  WContainerWidget::setHidden(hidden);
    +
    +  if (list_)
    +    list_->optionVisibilityChanged(this, hidden);
    +}
    diff --git a/wt-3.1.7a/examples/composer/Option.h b/wt-3.1.7a/examples/composer/Option.h
    new file mode 100644
    index 0000000..56b9a21
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/Option.h
    @@ -0,0 +1,74 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef OPTION_H_
    +#define OPTION_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +class OptionList;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief A clickable option
    + *
    + * This widget is part of the %Wt composer example.
    + *
    + * On its own, an option is a text which is style "option".
    + * An Option may also be used as items in an OptionList.
    + *
    + * \sa OptionList
    + */
    +class Option : public WContainerWidget
    +{
    +public:
    +  /*! \brief Create an Option with the given text.
    +   */
    +  Option(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Change the text.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the clickable part
    +   */
    +  WInteractWidget *item() { return option_; }
    +
    +  virtual void setHidden(bool);
    +
    +private:
    +  //! The option command text.
    +  WText       *option_;
    +
    +  //! The separator '|'
    +  WText       *sep_;
    +
    +  //! The list in which this option is managed, if managed.
    +  OptionList  *list_;
    +
    +  friend class OptionList;
    +
    +  void setOptionList(OptionList *l);
    +
    +  //! Create and show the separator.
    +  void addSeparator();
    +
    +  //! Show the separator
    +  void showSeparator();
    +
    +  //! Hide the separator
    +  void hideSeparator();
    +};
    +
    +/*@}*/
    +
    +#endif // OPTION_H_
    diff --git a/wt-3.1.7a/examples/composer/OptionList.C b/wt-3.1.7a/examples/composer/OptionList.C
    new file mode 100644
    index 0000000..bccad72
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/OptionList.C
    @@ -0,0 +1,78 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "OptionList.h"
    +#include "Option.h"
    +
    +OptionList::OptionList(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    optionNeedReset_(0)
    +{
    +  resize(WLength::Auto, WLength(2.5, WLength::FontEx));
    +}
    +
    +void OptionList::add(Option *option)
    +{
    +  addWidget(option);
    +  option->setOptionList(this);
    +
    +  if (!options_.empty()) {
    +    options_.back()->addSeparator();
    +  }
    +
    +  options_.push_back(option);
    +}
    +
    +void OptionList::update()
    +{
    +  if (optionNeedReset_ != 0)
    +    optionNeedReset_->resetLearnedSlots();
    +
    +  optionNeedReset_ = 0;
    +}
    +
    +void OptionList::optionVisibilityChanged(Option *opt, bool hidden)
    +{
    +  /*
    +   * Check if it was the last visible option, in that case the second last
    +   * visible option loses its separator.
    +   */
    +  for (std::size_t i = options_.size() - 1; i > 0; --i) {
    +    if (options_[i] == opt) {
    +      for (int j = i - 1; j >= 0; --j) {
    +	if (!options_[j]->isHidden()) {
    +	  if (hidden)
    +	    options_[j]->hideSeparator();
    +	  else
    +	    options_[j]->showSeparator();
    +	  break;
    +	}
    +      }
    +      break;
    +    } else
    +      if (!options_[i]->isHidden())
    +	break;
    +  }
    +
    +  /*
    +   * The Option to the right needs to relearn its stateless
    +   * slot code for hide() and show().
    +   */
    +  for (unsigned i = 0; i < options_.size(); ++i) {
    +    if (options_[i] == opt) {
    +      for (unsigned j = i + 1; j < options_.size(); ++j) {
    +	if (!options_[j]->isHidden()) {
    +	  optionNeedReset_ = options_[j];
    +	  break;
    +	}
    +      }
    +
    +      break;
    +    }
    +  }
    +}
    +
    diff --git a/wt-3.1.7a/examples/composer/OptionList.h b/wt-3.1.7a/examples/composer/OptionList.h
    new file mode 100644
    index 0000000..056c8d5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/OptionList.h
    @@ -0,0 +1,71 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef OPTIONLIST_H_
    +#define OPTIONLIST_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +using namespace Wt;
    +
    +class Option;
    +
    +/**
    + * @addtogroup composerexample
    + */
    +/*@{*/
    +
    +/*! \brief A list of options, separated by '|'
    + *
    + * This widget is part of the %Wt composer example.
    + *
    + * An OptionList displays a list of Option widgets, which are
    + * separated by a '|' separator.
    + *
    + * For example, Foo | Bar | Huu
    + *
    + * When Options are hidden, the separators are adjusted so that
    + * there is no separator after the last visible option. However,
    + * this requires a call of update() each time an option is hidden
    + * or shown. This is because the removing of separators is optimized
    + * in stateless implementations, and thus in client-side JavaScript
    + * code. Since the behaviour is not entirely stateless, the update()
    + * method resets stateless implementations if necessary.
    + *
    + * \sa OptionList
    + */
    +class OptionList : public WContainerWidget
    +{
    +public:
    +  /*! \brief Create an OptionList.
    +   */
    +  OptionList(WContainerWidget *parent = 0);
    +
    +  /*! \brief Add an Option to the list.
    +   */
    +  void add(Option *option);
    +
    +  /*! \brief Updates the stateless implementations after an Option has been
    +   *         hidden or shown.
    +   */
    +  void update();
    +
    +private:
    +  //! The list of options.
    +  std::vector<Option *> options_;
    +
    +  //! The option that needs its stateless code updated.
    +  Option *optionNeedReset_;
    +
    +  //! An option changed visibility: possibly update the separators inbetween
    +  void optionVisibilityChanged(Option *opt, bool hidden);
    +
    +  friend class Option;
    +};
    +
    +/*@}*/
    +
    +#endif // OPTIONLIST_H_
    diff --git a/wt-3.1.7a/examples/composer/composer.css b/wt-3.1.7a/examples/composer/composer.css
    new file mode 100644
    index 0000000..75db07d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/composer.css
    @@ -0,0 +1,67 @@
    +body, td, button {
    +  font-family:arial,sans-serif;
    +}
    +
    +.Wt-btn {
    +  margin-left: 10px;
    +  margin-right: 10px;
    +  padding-left: 5px;
    +  padding-right :5px;
    +  font-size: x-small;
    +}
    +
    +.label {
    +  font-weight: bold;
    +  font-size: smaller;
    +  margin-left: 5px;
    +  margin-right: 5px;
    +}
    +
    +.option {
    +  cursor: pointer; cursor: hand;
    +  color: blue;
    +  font-size: smaller;
    +  text-decoration: underline;
    +}
    +
    +.sep {
    +  padding: 5px;
    +}
    +
    +button.default {
    +  font-weight: bold
    +}
    +
    +.lighter {
    +  background-color: #e0ecff;
    +}
    +
    +.darker {
    +  background-color: #C3D9FF;
    +}
    +
    +.status {
    +  font-size: smaller;
    +}
    +
    +.error {
    +  color: red;
    +  font-size: smaller;
    +}
    +
    +.remove {
    +  cursor: pointer; cursor: hand;
    +  color: blue;
    +  font-size: x-small;
    +  text-decoration: underline;
    +}
    +
    +.feedback div {
    +  margin: 10px;
    +}
    +
    +a {
    +  color: blue;
    +  font-size: smaller;
    +  text-decoration: underline;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/composer/composer.xml b/wt-3.1.7a/examples/composer/composer.xml
    new file mode 100644
    index 0000000..1a3134e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/composer/composer.xml
    @@ -0,0 +1,35 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<messages>
    +  <!-- All languages -->
    +  <message id="msg.send">Send (not really)</message>
    +  <message id="msg.savenow">Save Now</message>
    +  <message id="msg.discard">Discard</message>
    +  <message id="msg.to">To:</message>
    +  <message id="msg.cc">Cc:</message>
    +  <message id="msg.bcc">Bcc:</message>
    +  <message id="msg.addcc">Add Cc</message>
    +  <message id="msg.addbcc">Add Bcc</message>
    +  <message id="msg.subject">Subject:</message>
    +  <message id="msg.attachfile">Attach a file</message>
    +  <message id="msg.attachanother">Attach another file</message>
    +  <message id="msg.remove">remove</message>
    +  <message id="msg.file-empty">Error: file was empty!</message>
    +  <message id="msg.file-too-large">Error: maximum file size is 128 Kb.</message>
    +  <message id="msg.uploading">Uploading attachments...</message>
    +  <message id="msg.attachment.failed">Error: empty or oversized attachments?</message>
    +  <message id="example.info">
    +    <p>This is an example application of 
    +      <a href="http://witty.sourceforge.net/">Wt</a>, a C++ toolkit for
    +      developping web applications.</p>
    +    <p>The benefit of Wt's widget approach to web development is the
    +      possibility to define self-contained components (such as in this case
    +      the Composer widget) which may be instantiated in the same way as
    +      basic widgets, despite its internal complexity (such as keeping track
    +      of uploaded attachments and asynchronous uploading of file
    +      attachments.</p>
    +    <p>The source code (about 1300 lines of commented C++ code) is included
    +      in the latest Wt distribution, or can <a href="http://jose.med.kuleuven.ac.be/wt/doc/examples/html/group__composerexample.html">be browsed online</a>
    +      </p>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/composer/icons/paperclip.png b/wt-3.1.7a/examples/composer/icons/paperclip.png
    new file mode 100644
    index 0000000..cdc16d0
    Binary files /dev/null and b/wt-3.1.7a/examples/composer/icons/paperclip.png differ
    diff --git a/wt-3.1.7a/examples/dialog/CMakeLists.txt b/wt-3.1.7a/examples/dialog/CMakeLists.txt
    new file mode 100644
    index 0000000..a41ed47
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dialog/CMakeLists.txt
    @@ -0,0 +1,8 @@
    +
    +WT_ADD_EXAMPLE(dialog.wt
    +  DialogExample.C
    +)
    +
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ADD_DEPENDENCIES(dialog.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/dialog/DialogExample.C b/wt-3.1.7a/examples/dialog/DialogExample.C
    new file mode 100644
    index 0000000..2723ef0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dialog/DialogExample.C
    @@ -0,0 +1,170 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLineEdit>
    +#include <Wt/WMessageBox>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +#include "DialogExample.h"
    +
    +using namespace Wt;
    +
    +DialogExample::DialogExample(const WEnvironment& env)
    +  : WApplication(env),
    +    messageBox_(0)
    +{
    +  setTitle("Dialog example");
    +
    +  WContainerWidget *textdiv = new WContainerWidget(root());
    +  textdiv->setStyleClass("text");
    +
    +  new WText("<h2>Wt dialogs example</h2>", textdiv);
    +  new WText("You can use WMessageBox for simple modal dialog boxes. <br />",
    +	    textdiv);
    +
    +  WContainerWidget *buttons = new WContainerWidget(root());
    +  buttons->setStyleClass("buttons");
    +
    +  WPushButton *button;
    +
    +  button = new WPushButton("One liner", buttons);
    +  button->clicked().connect(this, &DialogExample::messageBox1);
    +
    +  button = new WPushButton("Comfortable ?", buttons);
    +  button->clicked().connect(this, &DialogExample::messageBox2);
    +
    +  button = new WPushButton("Havoc!", buttons);
    +  button->clicked().connect(this, &DialogExample::messageBox3);
    +
    +  button = new WPushButton("Discard", buttons);
    +  button->clicked().connect(this, &DialogExample::messageBox4);
    +
    +  button = new WPushButton("Familiar", buttons);
    +  button->clicked().connect(this, &DialogExample::custom);
    +
    +  textdiv = new WContainerWidget(root());
    +  textdiv->setStyleClass("text");
    +
    +  status_ = new WText("Go ahead...", textdiv);
    +
    +  styleSheet().addRule(".buttons",
    +		       "padding: 5px;");
    +  styleSheet().addRule(".buttons BUTTON",
    +		       "padding-left: 4px; padding-right: 4px;"
    +		       "margin-top: 4px; display: block");
    +
    +  // avoid scrollbar problems
    +  styleSheet().addRule(".text", "padding: 4px 8px");
    +  styleSheet().addRule("body", "margin: 0px;");
    +}
    +
    +void DialogExample::messageBox1()
    +{
    +  WMessageBox::show("Information",
    +		    "Enjoy displaying messages with a one-liner.", Ok);
    +  setStatus("Ok'ed");
    +}
    +
    +void DialogExample::messageBox2()
    +{
    +  messageBox_
    +    = new WMessageBox("Question",
    +		      "Are you getting comfortable ?",
    +		      NoIcon, Yes | No | Cancel);
    +
    +  messageBox_
    +    ->buttonClicked().connect(this, &DialogExample::messageBoxDone);
    +
    +  messageBox_->show();
    +}
    +
    +void DialogExample::messageBox3()
    +{
    +  StandardButton
    +    result = WMessageBox::show("Confirm", "About to wreak havoc... Continue ?",
    +			       Ok | Cancel);
    +
    +  if (result == Ok)
    +    setStatus("Wreaking havoc.");
    +  else
    +    setStatus("Cancelled!");
    +}
    +
    +void DialogExample::messageBox4()
    +{
    +  messageBox_
    +    = new WMessageBox("Your work",
    +		      "Your work is not saved",
    +		      NoIcon, NoButton);
    +
    +  messageBox_->addButton("Cancel modifications", Ok);
    +  messageBox_->addButton("Continue modifying work", Cancel);
    +
    +  messageBox_
    +    ->buttonClicked().connect(this, &DialogExample::messageBoxDone);
    +
    +  messageBox_->show();
    +}
    +
    +void DialogExample::messageBoxDone(StandardButton result)
    +{
    +  switch (result) {
    +  case Ok:
    +    setStatus("Ok'ed"); break;
    +  case Cancel:
    +    setStatus("Cancelled!"); break;
    +  case Yes:
    +    setStatus("Me too!"); break;
    +  case No:
    +    setStatus("Me neither!"); break;
    +  default:
    +    setStatus("Unkonwn result?");
    +  }
    +
    +  delete messageBox_;
    +  messageBox_ = 0;
    +}
    +
    +void DialogExample::custom()
    +{
    +  WDialog dialog("Personalia");
    +
    +  new WText("Enter your name: ", dialog.contents());
    +  WLineEdit edit(dialog.contents());
    +  new WBreak(dialog.contents());
    +  WPushButton ok("Ok", dialog.contents());
    +
    +  edit.setFocus();
    +
    +  edit.enterPressed().connect(&dialog, &WDialog::accept);
    +  ok.clicked().connect(&dialog, &WDialog::accept);
    +
    +  if (dialog.exec() == WDialog::Accepted) {
    +    setStatus("Welcome, " + edit.text());
    +  }
    +}
    +
    +void DialogExample::setStatus(const WString& result)
    +{
    +  status_->setText(result);
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new DialogExample(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/dialog/DialogExample.h b/wt-3.1.7a/examples/dialog/DialogExample.h
    new file mode 100644
    index 0000000..05bd802
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dialog/DialogExample.h
    @@ -0,0 +1,46 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DIALOG_EXAMPLE_H_
    +#define DIALOG_EXAMPLE_H_
    +
    +#include <Wt/WApplication>
    +#include <Wt/WMessageBox>
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup dialog Dialog example
    + */
    +/*@{*/
    +
    +/*! \brief An example illustrating usage of Dialogs
    + */
    +class DialogExample : public WApplication
    +{
    +public:
    +  /*! \brief Create the example application.
    +   */
    +  DialogExample(const WEnvironment& env);
    +
    +private:
    +  void messageBox1();
    +  void messageBox2();
    +  void messageBox3();
    +  void messageBox4();
    +  void custom();
    +
    +  void messageBoxDone(StandardButton result);
    +
    +  void setStatus(const WString& text);
    +
    +  WMessageBox *messageBox_;
    +  WText *status_;
    +};
    +
    +/*@}*/
    +
    +#endif // DIALOGEXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/dragdrop/CMakeLists.txt b/wt-3.1.7a/examples/dragdrop/CMakeLists.txt
    new file mode 100644
    index 0000000..405ad44
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/CMakeLists.txt
    @@ -0,0 +1,15 @@
    +WT_ADD_EXAMPLE(dragdrop.wt 
    +  Character.C
    +  DragExample.C
    +  DragApplication.C
    +)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ADD_DEPENDENCIES(dragdrop.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/dragdrop/Character.C b/wt-3.1.7a/examples/dragdrop/Character.C
    new file mode 100644
    index 0000000..074adcd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/Character.C
    @@ -0,0 +1,48 @@
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Character.h"
    +
    +Character::Character(const std::string& name, WContainerWidget *parent)
    +  : WText(parent),
    +    name_(name),
    +    redDrops_(0),
    +    blueDrops_(0)
    +{
    +  setText(name_ + " got no pills");
    +
    +  setStyleClass("character");
    +
    +  /*
    +   * Accept drops, and indicate this with a change in CSS style class.
    +   */
    +  acceptDrops("red-pill", "red-drop-site");
    +  acceptDrops("blue-pill", "blue-drop-site");
    +
    +  setInline(false);
    +}
    +
    +void Character::dropEvent(WDropEvent event)
    +{
    +  if (event.mimeType() == "red-pill")
    +    ++redDrops_;
    +  if (event.mimeType() == "blue-pill")
    +    ++blueDrops_;
    +
    +  std::string text = name_ + " got ";
    +
    +  if (redDrops_ != 0)
    +    text += boost::lexical_cast<std::string>(redDrops_) + " red pill";
    +  if (redDrops_ > 1)
    +    text += "s";
    +
    +  if (redDrops_ != 0 && blueDrops_ != 0)
    +    text += " and ";
    +
    +  if (blueDrops_ != 0)
    +    text += boost::lexical_cast<std::string>(blueDrops_) + " blue pill";
    +  if (blueDrops_ > 1)
    +    text += "s";
    +
    +  setText(text);
    +}
    diff --git a/wt-3.1.7a/examples/dragdrop/Character.h b/wt-3.1.7a/examples/dragdrop/Character.h
    new file mode 100644
    index 0000000..b101c46
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/Character.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHARACTER_H_
    +#define CHARACTER_H_
    +
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup dragexample
    + */
    +/*@{*/
    +
    +/*! \brief A Matrix character that takes red and/or blue pills.
    + *
    + * The Character class demonstrates how to accept and react to drop
    + * events.
    + */
    +class Character : public WText
    +{
    +public:
    +  /*! \brief Create a new character with the given name.
    +   */
    +  Character(const std::string& name, WContainerWidget *parent = 0);
    +
    +  /*! \brief React to a drop event.
    +   */
    +  void dropEvent(WDropEvent event);
    +
    +private:
    +  //! The name
    +  std::string name_;
    +
    +  //! The current number of red pills.
    +  int redDrops_;
    +
    +  //! The current number of blue pills.
    +  int blueDrops_;
    +};
    +
    +/*@}*/
    +
    +#endif // CHARACTER_H_
    diff --git a/wt-3.1.7a/examples/dragdrop/DragApplication.C b/wt-3.1.7a/examples/dragdrop/DragApplication.C
    new file mode 100644
    index 0000000..1832c43
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/DragApplication.C
    @@ -0,0 +1,28 @@
    +#include <Wt/WApplication>
    +#include <Wt/WText>
    +
    +#include "DragExample.h"
    +
    +using namespace Wt;
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->setTitle("Drag & drop");
    +
    +  app->root()->setStyleClass("root");
    +
    +  new WText("<h1>Wt Drag &amp; drop example.</h1>", app->root());
    +
    +  new DragExample(app->root());
    +
    +  app->useStyleSheet("dragdrop.css");
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/dragdrop/DragExample.C b/wt-3.1.7a/examples/dragdrop/DragExample.C
    new file mode 100644
    index 0000000..35f5784
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/DragExample.C
    @@ -0,0 +1,64 @@
    +#include "DragExample.h"
    +#include "Character.h"
    +#include <Wt/WEnvironment>
    +#include <Wt/WImage>
    +#include <Wt/WApplication>
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup dragexample Drag and Drop example
    + */
    +/*@{*/
    +
    +/*! \brief Create an image which can be dragged.
    + *
    + * The image to be displayed when dragging is given by smallurl, and
    + * configured with the given mime type
    + */
    +WImage *createDragImage(const char *url, const char *smallurl,
    +			const char *mimeType,
    +			WContainerWidget *p)
    +{
    +  WImage *result = new WImage(url, p);
    +  WImage *dragImage = new WImage(smallurl, p);
    +
    +  /*
    +   * Set the image to be draggable, showing the other image (dragImage)
    +   * to be used as the widget that is visually dragged.
    +   */
    +  result->setDraggable(mimeType, dragImage, true);
    +
    +  return result;
    +}
    +
    +DragExample::DragExample(WContainerWidget *parent):
    +  WContainerWidget(parent)
    +{
    +  new WText("<p>Help these people with their decision by dragging one of "
    +	    "the pills.</p>", this);
    +
    +  if (!wApp->environment().javaScript()) {
    +    new WText("<i>This examples requires that javascript support is "
    +	      "enabled.</i>", this);
    +  }
    +
    +  WContainerWidget *pills = new WContainerWidget(this);
    +  pills->setContentAlignment(AlignCenter);
    +
    +  createDragImage("icons/blue-pill.jpg",
    +		  "icons/blue-pill-small.png",
    +		  "blue-pill", pills);
    +  createDragImage("icons/red-pill.jpg",
    +		  "icons/red-pill-small.png",
    +		  "red-pill", pills);
    +
    +  WContainerWidget *dropSites = new WContainerWidget(this);
    +
    +  new Character("Neo", dropSites);
    +  new Character("Morpheus", dropSites);
    +  new Character("Trinity", dropSites);
    +
    +}
    +
    +/*@}*/
    diff --git a/wt-3.1.7a/examples/dragdrop/DragExample.h b/wt-3.1.7a/examples/dragdrop/DragExample.h
    new file mode 100644
    index 0000000..44e41f3
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/DragExample.h
    @@ -0,0 +1,20 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DRAGEXAMPLE_H_
    +#define DRAGEXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +/// Class demonstrating drag and drop in Wt
    +class DragExample: public Wt::WContainerWidget
    +{
    + public:
    +  DragExample(Wt::WContainerWidget *parent);
    +};
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/dragdrop/dragdrop.css b/wt-3.1.7a/examples/dragdrop/dragdrop.css
    new file mode 100644
    index 0000000..18e4001
    --- /dev/null
    +++ b/wt-3.1.7a/examples/dragdrop/dragdrop.css
    @@ -0,0 +1,35 @@
    +body, html {
    +    height: 100%;
    +    margin: 0px;
    +    padding: 0px;
    +}
    +
    +.root {
    +    padding: 10px;
    +}
    +
    +body, td {
    +  font-family:arial,sans-serif;
    +}
    +
    +.character {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +}
    +
    +.blue-drop-site {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +
    +  background-color: #e0ecff;
    +}
    +
    +.red-drop-site {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +
    +  background-color: #ffece0;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/dragdrop/icons/blue-pill-small.png b/wt-3.1.7a/examples/dragdrop/icons/blue-pill-small.png
    new file mode 100644
    index 0000000..558027d
    Binary files /dev/null and b/wt-3.1.7a/examples/dragdrop/icons/blue-pill-small.png differ
    diff --git a/wt-3.1.7a/examples/dragdrop/icons/blue-pill.jpg b/wt-3.1.7a/examples/dragdrop/icons/blue-pill.jpg
    new file mode 100644
    index 0000000..a9b2fb6
    Binary files /dev/null and b/wt-3.1.7a/examples/dragdrop/icons/blue-pill.jpg differ
    diff --git a/wt-3.1.7a/examples/dragdrop/icons/red-pill-small.png b/wt-3.1.7a/examples/dragdrop/icons/red-pill-small.png
    new file mode 100644
    index 0000000..c3ab183
    Binary files /dev/null and b/wt-3.1.7a/examples/dragdrop/icons/red-pill-small.png differ
    diff --git a/wt-3.1.7a/examples/dragdrop/icons/red-pill.jpg b/wt-3.1.7a/examples/dragdrop/icons/red-pill.jpg
    new file mode 100644
    index 0000000..7debee2
    Binary files /dev/null and b/wt-3.1.7a/examples/dragdrop/icons/red-pill.jpg differ
    diff --git a/wt-3.1.7a/examples/extkitchen/CMakeLists.txt b/wt-3.1.7a/examples/extkitchen/CMakeLists.txt
    new file mode 100644
    index 0000000..5c3aff8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/CMakeLists.txt
    @@ -0,0 +1,12 @@
    +WT_ADD_EXAMPLE(extkitchen.wt ExtKitchenApplication.C CsvUtil.C)
    +TARGET_LINK_LIBRARIES(extkitchen.wt wtext)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ADD_DEPENDENCIES(extkitchen.wt wt wtext ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/extkitchen/CsvUtil.C b/wt-3.1.7a/examples/extkitchen/CsvUtil.C
    new file mode 100644
    index 0000000..98eabb8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/CsvUtil.C
    @@ -0,0 +1,65 @@
    +#include <boost/tokenizer.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WAbstractItemModel>
    +#include <Wt/WString>
    +
    +#include "CsvUtil.h"
    +
    +void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
    +		 int numRows, bool firstLineIsHeaders)
    +{
    +  int csvRow = 0;
    +
    +  while (f) {
    +    std::string line;
    +    getline(f, line);
    +
    +    if (f) {
    +      typedef boost::tokenizer<boost::escaped_list_separator<char> >
    +	CsvTokenizer;
    +      CsvTokenizer tok(line);
    +
    +      int col = 0;
    +      for (CsvTokenizer::iterator i = tok.begin();
    +	   i != tok.end(); ++i, ++col) {
    +
    +	if (col >= model->columnCount())
    +	  model->insertColumns(model->columnCount(),
    +			       col + 1 - model->columnCount());
    +
    +	if (firstLineIsHeaders && csvRow == 0)
    +	  model->setHeaderData(col, boost::any(Wt::WString::fromUTF8(*i)));
    +	else {
    +	  int dataRow = firstLineIsHeaders ? csvRow - 1 : csvRow;
    +
    +	  if (numRows != -1 && dataRow >= numRows)
    +	    return;
    +
    +	  if (dataRow >= model->rowCount())
    +	    model->insertRows(model->rowCount(),
    +			      dataRow + 1 - model->rowCount());
    +
    +	  boost::any data;
    +	  std::string s = *i;
    +
    +	  try {
    +	    int i = boost::lexical_cast<int>(s);
    +	    data = boost::any(i);
    +	  } catch (boost::bad_lexical_cast&) {
    +	    try {
    +	      double d = boost::lexical_cast<double>(s);
    +	      data = boost::any(d);
    +	    } catch (boost::bad_lexical_cast&) {
    +	      data = boost::any(Wt::WString::fromUTF8(s));
    +	    }
    +	  }
    +
    +	  model->setData(dataRow, col, data);
    +	}
    +      }
    +    }
    +
    +    ++csvRow;
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/extkitchen/CsvUtil.h b/wt-3.1.7a/examples/extkitchen/CsvUtil.h
    new file mode 100644
    index 0000000..29d90e7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/CsvUtil.h
    @@ -0,0 +1,19 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CSV_UTIL_H_
    +#define CSV_UTIL_H_
    +
    +#include <iostream>
    +
    +namespace Wt {
    +  class WAbstractItemModel;
    +}
    +
    +extern void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
    +			int numRows = -1, bool firstLineIsHeaders = true);
    +
    +#endif // CSV_UTIL_H_
    diff --git a/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.C b/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.C
    new file mode 100644
    index 0000000..f88957a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.C
    @@ -0,0 +1,717 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ExtKitchenApplication.h"
    +#include "CsvUtil.h"
    +
    +#include <fstream>
    +
    +#include <Wt/WBorderLayout>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WFitLayout>
    +#include <Wt/WOverlayLoadingIndicator>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WStandardItem>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WText>
    +#include <Wt/WTree>
    +#include <Wt/WTableView>
    +#include <Wt/WIconPair>
    +#include <Wt/WTreeNode>
    +
    +#include <Wt/Ext/Button>
    +#include <Wt/Ext/Calendar>
    +#include <Wt/Ext/CheckBox>
    +#include <Wt/Ext/ComboBox>
    +#include <Wt/Ext/Container>
    +#include <Wt/Ext/DateField>
    +#include <Wt/Ext/Dialog>
    +#include <Wt/Ext/Menu>
    +#include <Wt/Ext/MessageBox>
    +#include <Wt/Ext/ProgressDialog>
    +#include <Wt/Ext/Splitter>
    +#include <Wt/Ext/TabWidget>
    +#include <Wt/Ext/TableView>
    +#include <Wt/Ext/TextEdit>
    +#include <Wt/Ext/ToolBar>
    +
    +#include <iostream>
    +
    +#ifdef WIN32
    +#include <windows.h> // for Sleep()
    +#undef MessageBox
    +#endif
    +
    +using namespace Wt;
    +
    +ExtKitchenApplication::ExtKitchenApplication(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("Wt-Ext, including a kitchen sink");
    +  setLoadingIndicator(new WOverlayLoadingIndicator());
    +
    +  useStyleSheet("extkitchen.css");
    +  messageResourceBundle().use(appRoot() + "extkitchen");
    +
    +  Ext::Container *viewPort = new Ext::Container(root());
    +  WBorderLayout *layout = new WBorderLayout(viewPort);
    +
    +  /* North */
    +  Ext::Panel *north = new Ext::Panel();
    +  north->setBorder(false);
    +  WText *head = new WText(WString::tr("header"));
    +  head->setStyleClass("north");
    +  north->setLayout(new WFitLayout());
    +  north->layout()->addWidget(head);
    +  north->resize(WLength::Auto, 35);
    +  layout->addWidget(north, WBorderLayout::North);
    +
    +  /* West */
    +  Ext::Panel *west = new Ext::Panel();
    +  west->layout()->addWidget(createExampleTree());
    +
    +  west->setTitle("Widgets");
    +  west->resize(200, WLength::Auto);
    +  west->setResizable(true);
    +  west->setCollapsible(true);
    +  west->setAnimate(true);
    +  west->setAutoScrollBars(true);
    +  layout->addWidget(west, WBorderLayout::West);
    +
    +  /* Center */
    +  Ext::Panel *center = new Ext::Panel();
    +  center->setTitle("Demo widget");
    +  center->layout()->addWidget(exampleContainer_ = new WContainerWidget());
    +  center->setAutoScrollBars(true);
    +  layout->addWidget(center, WBorderLayout::Center);
    +
    +  exampleContainer_->setPadding(5);
    +
    +  WContainerWidget *container = new WContainerWidget(exampleContainer_);
    +  container->addWidget(new WText(WString::tr("about")));
    +  currentExample_ = container;
    +
    +  // load an Ext them, after at least one Ext widget. For example, here:
    +  //useStyleSheet("ext/resources/css/xtheme-gray.css");
    +}
    +
    +WWidget *ExtKitchenApplication::createExampleTree()
    +{
    +  WIconPair *mapIcon
    +    = new WIconPair("icons/yellow-folder-closed.png",
    +		    "icons/yellow-folder-open.png", false);
    +
    +  WTreeNode *rootNode = new WTreeNode("Examples", mapIcon);
    +  rootNode->setImagePack("icons/");
    +  rootNode->expand();
    +  rootNode->setLoadPolicy(WTreeNode::NextLevelLoading);
    +
    +  createExampleNode("Menu and ToolBar", rootNode,
    +		    &ExtKitchenApplication::menuAndToolBarExample);
    +  createExampleNode("Form widgets", rootNode,
    +		    &ExtKitchenApplication::formWidgetsExample);
    +  createExampleNode("TableView", rootNode,
    +		    &ExtKitchenApplication::tableViewExample);
    +  createExampleNode("Dialogs", rootNode,
    +		    &ExtKitchenApplication::dialogExample);
    +  createExampleNode("TabWidget", rootNode,
    +		    &ExtKitchenApplication::tabWidgetExample);
    +
    +  rootNode->setMargin(5);
    + 
    +  return rootNode;
    +}
    +
    +WTreeNode *ExtKitchenApplication::createExampleNode(const WString& label,
    +						    WTreeNode *parentNode,
    +						    ShowExample f)
    +{
    +  WIconPair *labelIcon
    +    = new WIconPair("icons/document.png", "icons/document.png", false);
    +
    +  WTreeNode *node = new WTreeNode(label, labelIcon, parentNode);
    +  node->label()->setTextFormat(PlainText);
    +  node->label()->clicked().connect(this, f);
    +
    +  return node;
    +}
    +
    +void ExtKitchenApplication::setExample(WWidget *example)
    +{
    +  delete currentExample_;
    +  currentExample_ = example;
    +  exampleContainer_->addWidget(currentExample_);
    +}
    +
    +void ExtKitchenApplication::menuAndToolBarExample()
    +{
    +  WContainerWidget *ex = new WContainerWidget();
    +
    +  WText *wt = new WText(WString::tr("ex-menu-and-toolbar"), ex);
    +  wt->setMargin(5, Bottom);
    +
    +  // Create a menu with some items
    +
    +  Ext::Menu *menu = new Ext::Menu();
    +  Ext::MenuItem *item;
    +
    +  item = menu->addItem("File open...");
    +  item->setIcon("icons/yellow-folder-open.png");
    +
    +  item = menu->addItem("I dig Wt");
    +  item->setCheckable(true);
    +  item->setChecked(true);
    +
    +  item = menu->addItem("I dig Wt too");
    +  item->setCheckable(true);
    +
    +  menu->addSeparator();
    +  menu->addItem("Menu item");
    +  menu->addSeparator();
    +
    +  // Add a sub menu
    +
    +  Ext::Menu *subMenu = new Ext::Menu();
    +  subMenu->addItem("Do this");
    +  subMenu->addItem("And that");
    +
    +  item = menu->addMenu("More ...", subMenu);
    +  item->setIcon("icons/yellow-folder-open.png");
    +
    +  // Create a tool bar
    +
    +  Ext::ToolBar *toolBar = new Ext::ToolBar(ex);
    +
    +  Ext::Button *b
    +    = toolBar->addButton("Button w/Menu", menu);
    +  b->setIcon("icons/yellow-folder-closed.png");
    +
    +  toolBar->addButton("Button");
    +
    +  toolBar->addSeparator();
    +  toolBar->addButton("Separated");
    +  toolBar->addSeparator();
    +  Ext::Button *button = toolBar->addButton("Toggle me");
    +  button->setCheckable(true);
    +
    +  Ext::ComboBox *cb = new Ext::ComboBox();
    +  cb->addItem("Winter");
    +  cb->addItem("Spring");
    +  cb->addItem("Summer");
    +  cb->addItem("Autumn");
    +  toolBar->add(cb);
    +
    +  setExample(ex);
    +}
    +
    +void ExtKitchenApplication::formWidgetsExample()
    +{
    +  WContainerWidget *ex = new WContainerWidget();
    +
    +  WText *wt = new WText( WString::tr("ex-form-widgets"), ex);
    +  wt->setMargin(5, Bottom);
    +
    +  WTable *table = new WTable(ex);
    +
    +  // ComboBox
    +  cb = new Ext::ComboBox(table->elementAt(0, 0));
    +  cb->addItem("One");
    +  cb->addItem("Two");
    +  cb->addItem("Three");
    +  cb->setFocus();
    +
    +  /*
    +    This is how you would keep the data on the server (for really big
    +    data models:
    +
    +    cb->setDataLocation(Ext::ServerSide);
    +    cb->setMinQueryLength(0);
    +    cb->setQueryDelay(0);
    +    cb->setPageSize(10);
    +    cb->setTextSize(20);
    +  */
    +
    +  // Button
    +  Ext::Button *button = new Ext::Button("Modify", table->elementAt(0, 1));
    +  button->setMargin(5, Left);
    +  button->activated().connect(this, &ExtKitchenApplication::formModify);
    +
    +  // CheckBox
    +  Ext::CheckBox *cb1 = new Ext::CheckBox("Check 1", table->elementAt(1, 0));
    +  Ext::CheckBox *cb2 = new Ext::CheckBox("Check 2", table->elementAt(2, 0));
    +  cb2->setChecked();
    +
    +  /*
    +    -- test setHideWithOffsets() of Ext::ComboBox
    +    table->hide();
    +    WPushButton *b = new WPushButton("show", ex);
    +    b->clicked().connect(table, &WWidget::show);
    +  */
    +
    +  // DateField
    +  WContainerWidget *w = new WContainerWidget(ex);
    +  w->setMargin(5, Top | Bottom);
    +  Ext::DateField *df = new Ext::DateField(w);
    +  df->setDate(WDate(2007, 9, 7));
    +
    +  // Calendar
    +  Ext::Calendar *dp = new Ext::Calendar(false, ex);
    +
    +  // TextEdit
    +  html_ = new Ext::TextEdit("Hello there, <b>brothers and sisters</b>", ex);
    +  html_->setMargin(5, Top | Bottom);
    +  html_->resize(600, 300);
    +
    +  // Horizontal Splitter
    +  Ext::Splitter *split = new Ext::Splitter(ex);
    +  split->resize(400, 100);
    +
    +  split->addWidget(new WText("Left"));
    +  split->children().back()->resize(150, WLength::Auto);
    +  split->children().back()->setMinimumSize(130, WLength::Auto);
    +  split->children().back()->setMaximumSize(170, WLength::Auto);
    +
    +  split->addWidget(new WText("Center"));
    +  split->children().back()->resize(100, WLength::Auto);
    +  split->children().back()->setMinimumSize(50, WLength::Auto);
    +
    +  split->addWidget(new WText("Right"));
    +  split->children().back()->resize(50, WLength::Auto);
    +  split->children().back()->setMinimumSize(50, WLength::Auto);
    +
    +  // Vertical Splitter
    +  split = new Ext::Splitter(Vertical, ex);
    +  split->resize(100, 200);
    +
    +  split->addWidget(new WText("Top"));
    +  split->children().back()->resize(WLength::Auto, 100);
    +  split->children().back()->setMinimumSize(WLength::Auto, 50);
    +  split->children().back()->setMaximumSize(WLength::Auto, 196);
    +
    +  split->addWidget(new WText("Center"));
    +  split->children().back()->resize(WLength::Auto, 100);
    +
    +  setExample(ex);
    +}
    +
    +void ExtKitchenApplication::tableViewExample()
    +{
    +  WContainerWidget *ex = new WContainerWidget();
    +
    +  WText *wt = new WText(WString::tr("ex-table-view"), ex);
    +  wt->setMargin(5, Bottom);
    +
    +  /*
    +   * Create the data model, and load from a CSV file
    +   */
    +  model_ = new WStandardItemModel(0,0,ex);
    +  std::ifstream f((appRoot() + "compare.csv").c_str());
    +  readFromCsv(f, model_);
    +
    +  /*
    +   * Convert the last column to WDate
    +   */
    +  for (int i = 0; i < model_->rowCount(); ++i) {
    +    int j = model_->columnCount() - 1;
    +    WString dStr = boost::any_cast<WString>(model_->data(i, j));
    +    model_->setData(i, j, boost::any(WDate::fromString(dStr, "d/M/yyyy")));
    +  }
    +
    +  /*
    +   * Create a read-only TableView for the model
    +   */
    +  table1_ = new Ext::TableView(ex);
    +  table1_->resize(700, 250);
    +  table1_->setModel(model_);
    +  table1_->setColumnSortable(0, true);
    +  table1_->enableColumnHiding(0, true);
    +  table1_->setAlternatingRowColors(true);
    +  table1_->setAutoExpandColumn(2);
    +  table1_->setRenderer(model_->columnCount() - 1,
    +		       Ext::TableView::dateRenderer("d MMM yyyy"));
    +
    +  /*
    +   * Leave the data on the server, and add a paging tool
    +   */
    +  table1_->setDataLocation(Ext::ServerSide);
    +  table1_->setPageSize(10);
    +  table1_->setBottomToolBar(table1_->createPagingToolBar());
    +  table1_->bottomToolBar()->addButton("Other button");
    +
    +  /*
    +   * A second editable TableView for the same model inside a tab
    +   * widget.
    +   */
    +  wt = new WText(WString::tr("ex-table-view2"), ex);
    +  wt->setMargin(5, Bottom);
    +
    +  Ext::TabWidget *tb = new Ext::TabWidget(ex);
    +  tb->addTab(table2_ = new Ext::TableView());
    +  tb->addTab(new WText(WString::tr("tab-2-content")), "Tab 2");
    +
    +  tb->resize(600, 250);
    +
    +  table2_->setTitle("Editable TableView");
    +  //table2_->setModel(new WStandardItemModel(5, 5));
    +  table2_->setModel(model_);
    +  table2_->resizeColumnsToContents(true);
    +  table2_->setAutoExpandColumn(2);
    +  table2_->setRenderer(model_->columnCount() - 1,
    +  		       Ext::TableView::dateRenderer("dd/MM/yyyy"));
    +
    +  // Set a LineEdit for the first field
    +  table2_->setEditor(0, new Ext::LineEdit());
    +
    +  // Set a ComboBox for the second field
    +  Ext::ComboBox *cb = new Ext::ComboBox();
    +  cb->addItem("Library");
    +  cb->addItem("Servlet");
    +  cb->addItem("Framework");
    +  table2_->setEditor(1, cb);
    +
    +  // Set a DateField for the last field
    +  Ext::DateField *df = new Ext::DateField();
    +  df->setFormat("dd/MM/yyyy");
    +  table2_->setEditor(model_->columnCount() - 1, df);
    +
    +  Ext::ToolBar *toolBar = new Ext::ToolBar();
    +  toolBar->addButton("Add 100 rows",
    +		     this, &ExtKitchenApplication::addRow);
    +  toolBar->addButton("Remove 100 row",
    +		     this, &ExtKitchenApplication::removeRow);
    +  toolBar->addButton("Reset",
    +		     this, &ExtKitchenApplication::resetModel);
    +  table2_->setBottomToolBar(toolBar);
    +
    +
    +  /*
    +   * A WTableView in another tab widget, working on the same model!
    +   */
    +  tableView_ = new WTableView();
    +  tableView_->setSelectionMode(Wt::ExtendedSelection);
    +  tableView_->setModel(model_);
    +  tableView_->setRowHeight(21);
    +  tableView_->setDragEnabled(true);
    +  tableView_->setDropsEnabled(true);
    +  tableView_->setAlternatingRowColors(true);
    +  for (int i = 0; i < model_->columnCount(); ++i)
    +    tableView_->setColumnWidth(i, 90);
    +
    +  Ext::Panel *p = new Ext::Panel();
    +  p->setLayout(new WFitLayout());
    +  p->layout()->addWidget(tableView_);
    +  p->setTitle("WTableView");
    +  toolBar = new Ext::ToolBar();
    +  toolBar->addButton("Add 100 rows",
    +		     this, &ExtKitchenApplication::addRow);
    +  p->setTopToolBar(toolBar);
    +
    +  tb->addTab(p);
    +
    +  setExample(ex);
    +}
    +
    +void ExtKitchenApplication::addRow()
    +{
    +  /* Add some new row at the end of the model */
    +  for (int i = 0; i < 100; ++i) {
    +    int r = model_->rowCount();
    +    model_->insertRow(r);
    +    model_->setData(r, 0, boost::any(WString("Mine")));
    +    model_->setData(r, 1, boost::any(WString("Framework")));
    +    model_->setData(r, 2, boost::any(WString("JavaScript")));
    +    model_->setData(r, 3, boost::any(WString("No")));
    +    model_->setData(r, 4, boost::any(WString("No")));
    +    model_->setData(r, 5, boost::any(WDate::currentDate()));
    +
    +    WStandardItem *c0 = model_->item(r, 0);
    +    c0->setFlags(c0->flags() | ItemIsDropEnabled);
    +  }
    +}
    +
    +void ExtKitchenApplication::removeRow()
    +{
    +  /* Remove the first row */
    +  for (int i = 0; i < 100; ++i)
    +    model_->removeRow(0);
    +}
    +
    +void ExtKitchenApplication::resetModel()
    +{
    +  /* Reset the original model */
    +  WStandardItemModel *model = new WStandardItemModel(0,0,this);
    +
    +  std::ifstream f((appRoot() + "compare.csv").c_str());
    +  readFromCsv(f, model);
    +
    +  table1_->setModel(model);
    +  table2_->setModel(model);
    +  tableView_->setModel(model);
    +
    +  delete model_;
    +  model_ = model;
    +}
    +
    +void ExtKitchenApplication::formModify()
    +{
    +  std::cerr << cb->currentText() << ", " << cb->currentIndex() << std::endl;
    +  cb->addItem("Four?");
    +}
    +
    +void ExtKitchenApplication::dialogExample()
    +{
    +  WContainerWidget *ex = new WContainerWidget();
    +
    +  WVBoxLayout *vLayout = new WVBoxLayout();
    +  ex->setLayout(vLayout, AlignTop | AlignLeft);
    +  vLayout->setContentsMargins(0, 0, 0, 0);
    +  vLayout->setSpacing(3);
    +
    +  vLayout->addWidget(new WText(WString::tr("ex-dialogs")));
    +
    +  Ext::Button *button;
    +
    +  vLayout->addWidget(button = new Ext::Button("Dialog 1"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 2"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog2);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 3"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog3);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 4"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog4);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 5"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog5);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 6"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog6);
    +  vLayout->addWidget(button = new Ext::Button("Dialog 7"));
    +  button->activated().connect(this, &ExtKitchenApplication::createDialog7);
    +
    +  setExample(ex);
    +}
    +
    +void ExtKitchenApplication::createDialog()
    +{
    +  mbox_ = new Ext::MessageBox();
    +  mbox_->resize(300, 100);
    +  mbox_->setWindowTitle("Hello there");
    +
    +  mbox_->setButtons(Wt::Ok);
    +  mbox_->finished().connect(this, &ExtKitchenApplication::testDelete);
    +
    +  mbox_->show();
    +}
    +
    +void ExtKitchenApplication::testDelete()
    +{
    +  delete mbox_;
    +}
    +
    +void ExtKitchenApplication::createDialog2()
    +{
    +  Ext::Dialog d;
    +  d.setWindowTitle("Hello there too");
    +  d.resize(300,100);
    +
    +  Ext::Button *okButton = new Ext::Button("Ok");
    +  okButton->activated().connect(&d, &Ext::Dialog::accept);
    +  d.addButton(okButton);
    +  okButton->setDefault(true);
    +
    +  Ext::Button *cancelButton = new Ext::Button("Cancel");
    +  cancelButton->activated().connect(&d, &Ext::Dialog::reject);
    +  d.addButton(cancelButton);
    +
    +  WText *contents = new WText("I'm right here.");
    +  d.contents()->addWidget(contents);
    +  d.exec();
    +
    +  d.setWindowTitle("Good to see you.");
    +  contents->setText("I've been waiting for you.");
    +  d.exec();
    +}
    +
    +void ExtKitchenApplication::createDialog3()
    +{
    +  Ext::Dialog d;
    +  d.setWindowTitle("Ext::Dialog with WBorderLayout");
    +  d.resize(400,300);
    +  d.setStyleClass("dialog");
    +
    +  Ext::Button *okButton = new Ext::Button("Ok");
    +  okButton->activated().connect(&d, &Ext::Dialog::accept);
    +  d.addButton(okButton);
    +  okButton->setDefault(true);
    +
    +  Ext::Button *cancelButton = new Ext::Button("Cancel");
    +  cancelButton->activated().connect(&d, &Ext::Dialog::reject);
    +  d.addButton(cancelButton);
    +
    +  WBorderLayout *layout = new WBorderLayout();
    +  d.setLayout(layout);
    +
    +  Ext::Panel *west = new Ext::Panel();
    +  west->setTitle("West");
    +  west->setResizable(true);
    +  west->resize(100, WLength::Auto);
    +  layout->addWidget(west, WBorderLayout::West);
    +
    +  Ext::Panel *center = new Ext::Panel();
    +  center->setTitle("Center");
    +
    +  WBorderLayout *nestedLayout = new WBorderLayout();
    +  center->setLayout(nestedLayout);
    +
    +  Ext::Panel *nestedNorth = new Ext::Panel();
    +  nestedLayout->addWidget(nestedNorth, WBorderLayout::North);
    +  nestedNorth->resize(WLength::Auto, 35);
    +  nestedNorth->layout()->addWidget(new WText(WString::tr("nested-header")));
    +
    +  Ext::Panel *nestedCenter = new Ext::Panel();
    +  nestedLayout->addWidget(nestedCenter, WBorderLayout::Center);
    +  nestedCenter->layout()->addWidget(new WText(WString::tr("dialog-nested")));
    +
    +  layout->addWidget(center, WBorderLayout::Center);
    +
    +  d.exec();
    +}
    +
    +void ExtKitchenApplication::createDialog4()
    +{
    +  if (Ext::MessageBox::show("Confirm", "I am amazed", Ok | Cancel)
    +      == Ok)
    +    std::cerr << "Got ok.";
    +  else
    +    std::cerr << "Got cancel.";
    +}
    +
    +void ExtKitchenApplication::createDialog5()
    +{
    +  WString v = "Jozef";
    +
    +  if (Ext::MessageBox::prompt("Info", "Please enter your name:", v) == Ok)
    +    std::cerr << "You entered: '" << v << '\'' << std::endl;
    +}
    +
    +void ExtKitchenApplication::createDialog6()
    +{
    +  Ext::ProgressDialog d("Converting contact details...", "Cancel", 0, 7);
    +  d.setWindowTitle("Import Contacts");
    +
    +  d.show();
    +
    +  for (unsigned i = 0; i < 7; ++i) {
    +    d.setValue(i);
    +    processEvents();
    +
    +    if (!d.wasCanceled()) {
    +      /* Do some work ... */
    +#ifdef WIN32
    +      Sleep(1000);
    +#else
    +      sleep(1);
    +#endif
    +    } else {
    +      Ext::MessageBox
    +	::show("Operation cancelled",
    +	       "You may import your contact details any time later.", Ok);
    +      break;
    +    }
    +  }
    +}
    +
    +void ExtKitchenApplication::createDialog7()
    +{
    +  Ext::Dialog d;
    +  d.setWindowTitle("Shhh...");
    +
    +  d.resize(350,120);
    +
    +  Ext::Button *okButton = new Ext::Button("Ok");
    +  okButton->activated().connect(&d, &Ext::Dialog::accept);
    +  d.addButton(okButton);
    +  okButton->setDefault(true);
    +
    +  Ext::Button *cancelButton = new Ext::Button("Cancel");
    +  cancelButton->activated().connect(&d, &Ext::Dialog::reject);
    +  d.addButton(cancelButton);
    +
    +  d.contents()->setPadding(8);
    +  new WText("Please give your password:", d.contents());
    +
    +  Ext::LineEdit passwd(d.contents());
    +  passwd.setEchoMode(Ext::LineEdit::Password);
    +  passwd.setTextSize(8);
    +  passwd.setMargin(5, Left);
    +  passwd.setInline(true);
    +
    +  d.contents()->enterPressed().connect(&d, &Ext::Dialog::accept);
    +
    +  if (d.exec() == Ext::Dialog::Accepted) {
    +    // ...
    +  }
    +}
    +
    +void ExtKitchenApplication::tabWidgetExample()
    +{
    +  WContainerWidget *ex = new WContainerWidget();
    +
    +  WText *wt = new WText(WString::tr("ex-tabwidget"), ex);
    +  wt->setMargin(5, Bottom);
    +
    +  tb = new Ext::TabWidget(ex);
    +  tb->resize(500, 200);
    +  tb->addTab(new WText(WString::tr("tab-1-content")), "Tab 1");
    +  tb->addTab(new WText(WString::tr("tab-2-content")), "Tab 2");
    +
    +  WContainerWidget *w = new WContainerWidget(ex);
    +  WHBoxLayout *hLayout = new WHBoxLayout();
    +  w->setLayout(hLayout, AlignTop | AlignLeft);
    +  hLayout->setContentsMargins(0, 9, 0, 0);
    +
    +  Ext::Button *b;
    +  hLayout->addWidget(b = new Ext::Button("Hide"));
    +  b->clicked().connect(this, &ExtKitchenApplication::hideTab);
    +
    +  hLayout->addWidget(b = new Ext::Button("Show"));
    +  b->clicked().connect(this, &ExtKitchenApplication::showTab);
    +
    +  hLayout->addWidget(b = new Ext::Button("Add tab"));
    +  b->clicked().connect(this, &ExtKitchenApplication::modifyTabWidget);
    +  b->setToolTip("Adds a tab");
    +
    +  setExample(ex);
    +}
    +
    +void ExtKitchenApplication::modifyTabWidget()
    +{
    +  tb->addTab(new WText(WString::tr("tab-x-content")),
    +	     "Tab " + boost::lexical_cast<std::string>(tb->count() + 1));
    +}
    +
    +void ExtKitchenApplication::hideTab()
    +{
    +  tb->setCurrentIndex(1);
    +  tb->setTabHidden(0, true);
    +}
    +
    +void ExtKitchenApplication::showTab()
    +{
    +  tb->setTabHidden(0, false);
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new ExtKitchenApplication(env);
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.h b/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.h
    new file mode 100644
    index 0000000..47afdbb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/ExtKitchenApplication.h
    @@ -0,0 +1,94 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_KITCHEN_APPLICATION_H_
    +#define EXT_KITCHEN_APPLICATION_H_
    +
    +#include <Wt/WApplication>
    +
    +#include <iostream>
    +
    +namespace Wt {
    +  class WStandardItemModel;
    +  class WTable;
    +  class WTreeNode;
    +  class WTableView;
    +  class WWidget;
    +
    +  namespace Ext {
    +    class ComboBox;
    +    class MessageBox;
    +    class TableView;
    +    class TabWidget;
    +    class TextEdit;
    +  }
    +}
    +
    +class ExtKitchenApplication : public Wt::WApplication
    +{
    +public:
    +  ExtKitchenApplication(const Wt::WEnvironment& env);
    +
    +private:
    +  typedef void (ExtKitchenApplication::*ShowExample)();
    +
    +  Wt::WWidget                       *currentExample_;
    +  Wt::WContainerWidget              *exampleContainer_;
    +
    +  Wt::WWidget *createExampleTree();
    +  Wt::WTreeNode *createExampleNode(const Wt::WString& label,
    +				   Wt::WTreeNode *parentNode,
    +				   ShowExample f);
    +  void setExample(Wt::WWidget *exampleWidget);
    +
    +  void menuAndToolBarExample();
    +  void formWidgetsExample();
    +  void tableViewExample();
    +  void dialogExample();
    +  void tabWidgetExample();
    +
    +  void createDialog();
    +  void createDialog2();
    +  void createDialog3();
    +  void createDialog4();
    +  void createDialog5();
    +  void createDialog6();
    +  void createDialog7();
    +
    +  /*
    +   * Delete the dialog
    +   */
    +  Wt::Ext::MessageBox *mbox_;
    +  void testDelete();
    +
    +  /*
    +   * Modify the combo box
    +   */
    +  void formModify();
    +  Wt::Ext::ComboBox *cb;
    +  Wt::Ext::TextEdit *html_;
    +
    +  /*
    +   * Modify the WTableView model
    +   */
    +  void addRow();
    +  void removeRow();
    +  void resetModel();
    +  void addChildren();
    +  Wt::WStandardItemModel *model_;
    +  Wt::Ext::TableView *table1_, *table2_;
    +  Wt::WTableView *tableView_;
    +
    +  /*
    +   * Modify the tabwidget
    +   */
    +  Wt::Ext::TabWidget *tb;
    +  void hideTab();
    +  void showTab();
    +  void modifyTabWidget();
    +};
    +
    +#endif // EXT_KITCHEN_APPLICATION_H_
    diff --git a/wt-3.1.7a/examples/extkitchen/compare.csv b/wt-3.1.7a/examples/extkitchen/compare.csv
    new file mode 100644
    index 0000000..f641533
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/compare.csv
    @@ -0,0 +1,6 @@
    +"Project","Type","Language(s)","Degrades gracefully","Monolithic","Since"
    +"Wt","Library","C++","Yes (subset)","No","1/12/2005"
    +"Echo2","Servlet","Java","No","No","17/3/2005"
    +"ZK","Servlet","XML + Java","No","No","27/2/2006"
    +"GWT","Framework","Java + server-side","No","Yes","16/5/2006"
    +"ExtJs","Library","JavaScript + server-side","No (manually possible)","Yes","1/8/2007"
    diff --git a/wt-3.1.7a/examples/extkitchen/extkitchen.css b/wt-3.1.7a/examples/extkitchen/extkitchen.css
    new file mode 100644
    index 0000000..8d23bbd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/extkitchen.css
    @@ -0,0 +1,69 @@
    +body {
    +    font-family:arial,sans-serif;
    +}
    +
    +p.p {
    +  margin: 16px 0px;
    +  font-size: smaller;
    +}
    +
    +h1 {
    +  font-weight: bold;
    +}
    +
    +h2, h3, h4, h5 {
    +  color: #505050;
    +}
    +
    +h2 {
    +  padding-left: 30px;
    +  border-bottom: 1px solid #000;
    +}
    +
    +h2 span {
    +  border-bottom: 0.2em solid #000;
    +}
    +
    +/*
    + * top-level layout
    + */
    +.north {
    +    background:#0000AA url(ext/resources/images/default/basic-dialog/hd-sprite.gif) repeat-x scroll 0px -83px;
    +    border:0px none;
    +    padding-left:3px;
    +    padding-top:3px;
    +}
    +
    +.dialog .x-layout-panel-north {
    +    background:#EEEEEE;
    +    border:0px none;
    +    padding-left:3px;
    +    padding-top:3px;
    +}
    +
    +.north .header {
    +    color: white;
    +    padding-top: 3px;
    +}
    +
    +.Wt-treeview {
    +    font-family: arial,tahoma,helvetica,sans-serif !important;
    +    font-size: 11px !important;
    +}
    +
    +/*
    + * for Widgets tree
    + */
    +.treenodelabel {
    +  cursor:pointer;cursor:hand;
    +  font-size: 10pt;
    +}
    +
    +.treenodelabel:hover {
    +  text-decoration: underline;
    +}
    +
    +.treenodechildcount {
    +  font-size: 10pt;
    +  color:blue;
    +}
    diff --git a/wt-3.1.7a/examples/extkitchen/extkitchen.xml b/wt-3.1.7a/examples/extkitchen/extkitchen.xml
    new file mode 100644
    index 0000000..63687b2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/extkitchen/extkitchen.xml
    @@ -0,0 +1,133 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="header">
    +
    +<div class="header">Wt Ext widgets demo </div>
    +
    +  </message>
    +
    +  <message id="about">
    +
    +<h2><span>About Wt Ext</span></h2>
    +
    +<p class="p">
    +  Wt Ext is an add-on library for Wt.
    +</p>
    +
    +<p class="p">
    +  It provides widgets that wrap around the JavaScript Ext library. Therefore,
    +  these widgets assume availability of JavaScript (and in fact, of a fairly
    +  recent browser).
    +</p>
    +
    +<p class="p">
    +  Ext widgets may be mixed with other Wt widgets: for example, the tree list
    +  on the left is created using Wt's native WTreeNode widgets.
    +</p>
    +
    +  </message>
    +  <message id="ex-menu-and-toolbar">
    +
    +<h2><span>Menu &amp; ToolBar</span></h2>
    +
    +<p class="p">
    +  Wt Ext provides Menu and ToolBar classes. Enjoy.
    +</p>
    +
    +  </message>
    +  <message id="ex-form-widgets">
    +
    +<h2><span>Form widgets</span></h2>
    +
    +<p class="p">
    +  Wt Ext provides alternative versions of the plain Wt form widgets, but
    +  also more complicated widgets such as the TextEdit.
    +</p>
    +
    +  </message>
    +  <message id="ex-table-view">
    +
    +<h2><span>Table view</span></h2>
    +
    +<p class="p">
    +  A TableView may be used to view data from a WStandardItemModel, and provides
    +  basic viewing functionality such as column resizing and sorting.<br />
    +</p>
    +
    +  </message>
    +  <message id="ex-table-view2">
    +
    +<p class="p">
    +  Form fields (LineEdit, NumberField, DateField, and ComboBox), may be
    +  used in conjunction with a TableView to edit data in the model. In
    +  the following table, we enabled editing for the first two columns
    +  (Project and Type) and the last column (Since). Not only strings but
    +  also numbers and dates are supported natively.
    +</p>
    +
    +<p class="p">
    +  In the third tab panel, we added a WTreeView, a native Wt MVC widget
    +  which may also be used to implement a table view, although it is
    +  able to view hierarchical tree tables. All three views share the
    +  same model, and therefore any change that you perform in the
    +  editable TableView is reflected in the other views. This is
    +  facilitated through Wt's MVC: the bottom TableView updates the
    +  model, which is shared with the top TableView.
    +</p>
    +
    +  </message>
    +  <message id="ex-dialogs">
    +
    +<h2><span>Dialogs</span></h2>
    +
    +<p class="p">
    +  The Ext Dialog and MessageBox classes have APIs that are identical to those
    +  of WDialog and WMessageBox. In this way, you may switch easily between these
    +  implementations, at any time. 
    +</p>
    +
    +  </message>
    +   <message id="dialog-nested">
    +
    +<p class="p" style="margin:5px">
    +  You may use any widget inside a Dialog. In particular, you can use
    +  a BorderLayout for more complex layout scenarios.
    +</p>
    +
    +  </message>
    +  <message id="nested-header">
    +
    +<div>North in a nested layout</div>
    +
    +  </message>
    +  <message id="ex-tabwidget">
    +
    +<h2><span>TabWidget</span></h2>
    +
    +<p class="p">
    +A Tab manages contents in several tab panels.
    +</p>
    +  </message>
    +  <message id="tab-1-content">
    +
    +<p class="p">
    +Content in the first tab.
    +</p>
    +
    +  </message>
    +  <message id="tab-2-content">
    +
    +<p class="p">
    +Content in the second tab.
    +</p>
    +
    +  </message>
    +  <message id="tab-x-content">
    +
    +<p class="p">
    +I was dynamically added, and could be anything, really. <br />
    +Wt is all about being dynamic.
    +</p>
    +
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/feature/CMakeLists.txt b/wt-3.1.7a/examples/feature/CMakeLists.txt
    new file mode 100644
    index 0000000..dd2c3b0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/CMakeLists.txt
    @@ -0,0 +1,8 @@
    +SUBDIRS(
    +  dbo
    +  serverpush
    +  socketnotifier
    +  suggestionpopup
    +  video
    +  widgetset
    +)
    diff --git a/wt-3.1.7a/examples/feature/dbo/CMakeLists.txt b/wt-3.1.7a/examples/feature/dbo/CMakeLists.txt
    new file mode 100644
    index 0000000..02cc983
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/CMakeLists.txt
    @@ -0,0 +1,22 @@
    +SET(tutorial_libs wtdbo wtdbosqlite3)
    +
    +#IF (MULTI_THREADED)
    +#  SET(tutorial_libs ${tutorial_libs} ${BOOST_THREAD_LIB})
    +#ENDIF (MULTI_THREADED)
    +
    +ADD_EXECUTABLE(dbo-tutorial1  tutorial1.C)
    +TARGET_LINK_LIBRARIES(dbo-tutorial1 ${tutorial_libs})
    +
    +ADD_EXECUTABLE(dbo-tutorial2  tutorial2.C)
    +TARGET_LINK_LIBRARIES(dbo-tutorial2 ${tutorial_libs})
    +
    +ADD_EXECUTABLE(dbo-tutorial3  tutorial3.C)
    +TARGET_LINK_LIBRARIES(dbo-tutorial3 ${tutorial_libs})
    +
    +ADD_EXECUTABLE(dbo-tutorial4  tutorial4.C)
    +TARGET_LINK_LIBRARIES(dbo-tutorial4 ${tutorial_libs})
    +
    +ADD_EXECUTABLE(dbo-tutorial5  tutorial5.C)
    +TARGET_LINK_LIBRARIES(dbo-tutorial5 ${tutorial_libs})
    +
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    diff --git a/wt-3.1.7a/examples/feature/dbo/tutorial1.C b/wt-3.1.7a/examples/feature/dbo/tutorial1.C
    new file mode 100644
    index 0000000..891e2d2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/tutorial1.C
    @@ -0,0 +1,154 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*****
    + * This file is part of the Wt::Dbo tutorial:
    + * http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html
    + *****/
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Sqlite3>
    +#include <string>
    +
    +namespace dbo = Wt::Dbo;
    +
    +/*****
    + * Dbo tutorial section 2. Mapping a single class
    + *****/
    +
    +class User {
    +public:
    +  enum Role {
    +    Visitor = 0,
    +    Admin = 1,
    +    Alien = 42
    +  };
    +
    +  std::string name;
    +  std::string password;
    +  Role        role;
    +  int         karma;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name,     "name");
    +    dbo::field(a, password, "password");
    +    dbo::field(a, role,     "role");
    +    dbo::field(a, karma,    "karma");
    +  }
    +};
    +
    +void run()
    +{
    +  /*****
    +   * Dbo tutorial section 3. A first session
    +   *****/
    +
    +  /*
    +   * Setup a session, would typically be done once at application startup.
    +   *
    +   * For testing, we'll be using Sqlite3's special :memory: database. You
    +   * can replace this with an actual filename for actual persistence.
    +   */
    +  dbo::backend::Sqlite3 sqlite3(":memory:");
    +  sqlite3.setProperty("show-queries", "true");
    +  dbo::Session session;
    +  session.setConnection(sqlite3);
    +
    +  session.mapClass<User>("user");
    +
    +  /*
    +   * Try to create the schema (will fail if already exists).
    +   */
    +  session.createTables();
    +  
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    User *user = new User();
    +    user->name = "Joe";
    +    user->password = "Secret";
    +    user->role = User::Visitor;
    +    user->karma = 13;
    +
    +    dbo::ptr<User> userPtr = session.add(user);
    +
    +    transaction.commit();
    +  }
    +
    +  /*****
    +   * Dbo tutorial section 4. Querying objects
    +   *****/
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
    +
    +    std::cerr << "Joe has karma: " << joe->karma << std::endl;
    +
    +    dbo::ptr<User> joe2 = session.query< dbo::ptr<User> >
    +      ("select u from user u").where("name = ?").bind("Joe");
    +
    +    transaction.commit();
    +  }
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    typedef dbo::collection< dbo::ptr<User> > Users;
    +
    +    Users users = session.find<User>();
    +
    +    std::cerr << "We have " << users.size() << " users:" << std::endl;
    +
    +    for (Users::const_iterator i = users.begin(); i != users.end(); ++i)
    +      std::cerr << " user " << (*i)->name
    +		<< " with karma of " << (*i)->karma << std::endl;
    +
    +    transaction.commit();
    +  }
    +
    +  /*****
    +   * Dbo tutorial section 5. Updating objects
    +   *****/
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
    +
    +    joe.modify()->karma++;
    +    joe.modify()->password = "public";
    +
    +    transaction.commit();
    +  }
    +
    +  {
    +    dbo::Transaction transaction(session);
    +    dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
    +    if (joe)
    +      joe.remove();
    +    transaction.commit();
    +  }
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<User> silly = session.add(new User());
    +    silly.modify()->name = "Silly";
    +    silly.remove();
    +
    +    transaction.commit();
    +  }
    +
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  run();
    +}
    diff --git a/wt-3.1.7a/examples/feature/dbo/tutorial2.C b/wt-3.1.7a/examples/feature/dbo/tutorial2.C
    new file mode 100644
    index 0000000..41796a9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/tutorial2.C
    @@ -0,0 +1,146 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*****
    + * This file is part of the Wt::Dbo tutorial:
    + * http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html
    + *****/
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Sqlite3>
    +#include <string>
    +
    +namespace dbo = Wt::Dbo;
    +
    +/*****
    + * Dbo tutorial section 6. Mapping relations
    + *****/
    +
    +class Post;
    +class User;
    +class Tag;
    +
    +class Post {
    +public:
    +  dbo::ptr<User> user;
    +  dbo::collection< dbo::ptr<Tag> > tags;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::belongsTo(a, user, "user");
    +    dbo::hasMany(a, tags, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +class Tag {
    +public:
    +  std::string name;
    +  dbo::collection< dbo::ptr<Post> > posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name, "name");
    +    dbo::hasMany(a, posts, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +class User {
    +public:
    +  enum Role {
    +    Visitor = 0,
    +    Admin = 1,
    +    Alien = 42
    +  };
    +
    +  std::string name;
    +  std::string password;
    +  Role        role;
    +  int         karma;
    +
    +  dbo::collection< dbo::ptr<Post> > posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name,     "name");
    +    dbo::field(a, password, "password");
    +    dbo::field(a, role,     "role");
    +    dbo::field(a, karma,    "karma");
    +
    +    dbo::hasMany(a, posts, dbo::ManyToOne, "user");
    +  }
    +};
    +
    +void run()
    +{
    +  /*
    +   * Setup a session, would typically be done once at application startup.
    +   */
    +  dbo::backend::Sqlite3 sqlite3(":memory:");
    +  sqlite3.setProperty("show-queries", "true");
    +  dbo::Session session;
    +  session.setConnection(sqlite3);
    +
    +  session.mapClass<User>("user");
    +  session.mapClass<Post>("post");
    +  session.mapClass<Tag>("tag");
    +
    +  /*
    +   * Try to create the schema (will fail if already exists).
    +   */
    +  session.createTables();
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    User *user = new User();
    +    user->name = "Joe";
    +    user->password = "Secret";
    +    user->role = User::Visitor;
    +    user->karma = 13;
    +
    +    dbo::ptr<User> userPtr = session.add(user);
    +
    +    transaction.commit();
    +  }
    +
    +  dbo::ptr<Post> post;
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
    +
    +    post = session.add(new Post());
    +    post.modify()->user = joe;
    +
    +    // will print 'Joe has 1 post(s).'
    +    std::cerr << "Joe has " << joe->posts.size() << " post(s)." << std::endl;
    +
    +    transaction.commit();
    +  }
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<Tag> cooking = session.add(new Tag());
    +    cooking.modify()->name = "Cooking";
    +
    +    post.modify()->tags.insert(cooking);
    +
    +    // will print '1 post(s) tagged with Cooking.'
    +    std::cerr << cooking->posts.size() << " post(s) tagged with Cooking." << std::endl;
    +
    +    transaction.commit();
    +  }
    +
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  run();
    +}
    diff --git a/wt-3.1.7a/examples/feature/dbo/tutorial3.C b/wt-3.1.7a/examples/feature/dbo/tutorial3.C
    new file mode 100644
    index 0000000..62093d4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/tutorial3.C
    @@ -0,0 +1,35 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*****
    + * This file is part of the Wt::Dbo tutorial:
    + * http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html
    + *****/
    +
    +/*****
    + * Dbo tutorial section 7.1
    + *  Changing or disabling the surrogate primary key "id" field
    + *****/
    +
    +#include <Wt/Dbo/Dbo>
    +
    +class Post;
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +    template<>
    +    struct dbo_traits<Post> : public dbo_default_traits {
    +      static const char *surrogateIdField() {
    +        return "post_id";
    +      }
    +    };
    +
    +  }
    +}
    +
    +#include "tutorial2.C"
    +
    diff --git a/wt-3.1.7a/examples/feature/dbo/tutorial4.C b/wt-3.1.7a/examples/feature/dbo/tutorial4.C
    new file mode 100644
    index 0000000..a10cac8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/tutorial4.C
    @@ -0,0 +1,35 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*****
    + * This file is part of the Wt::Dbo tutorial:
    + * http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html
    + *****/
    +
    +/*****
    + * Dbo tutorial section 7.2
    + *  Changing or disabling the "version" field
    + *****/
    +
    +#include <Wt/Dbo/Dbo>
    +
    +class Post;
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +    template<>
    +    struct dbo_traits<Post> : public dbo_default_traits {
    +      static const char *versionField() {
    +        return 0;
    +      }
    +    };
    +
    +  }
    +}
    +
    +#include "tutorial2.C"
    +
    diff --git a/wt-3.1.7a/examples/feature/dbo/tutorial5.C b/wt-3.1.7a/examples/feature/dbo/tutorial5.C
    new file mode 100644
    index 0000000..6933eba
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/dbo/tutorial5.C
    @@ -0,0 +1,167 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*****
    + * This file is part of the Wt::Dbo tutorial:
    + * http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html
    + *****/
    +
    +/*****
    + * Dbo tutorial section 7.3
    + *  Specifying a natural primary key
    + *****/
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Sqlite3>
    +#include <string>
    +
    +namespace dbo = Wt::Dbo;
    +
    +class Post;
    +class User;
    +class Tag;
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +    template<>
    +    struct dbo_traits<User> : public dbo_default_traits {
    +      typedef std::string IdType;
    +
    +      static IdType invalidId() {
    +        return std::string();
    +      }
    +
    +      static const char *surrogateIdField() { return 0; }
    +    };
    +
    +  }
    +}
    +
    +class Post {
    +public:
    +  dbo::ptr<User> user;
    +  dbo::collection< dbo::ptr<Tag> > tags;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::belongsTo(a, user, "user");
    +    dbo::hasMany(a, tags, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +class Tag {
    +public:
    +  std::string name;
    +  dbo::collection< dbo::ptr<Post> > posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name, "name");
    +    dbo::hasMany(a, posts, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +class User {
    +public:
    +  enum Role {
    +    Visitor = 0,
    +    Admin = 1,
    +    Alien = 42
    +  };
    +
    +  std::string userId;
    +  std::string name;
    +  std::string password;
    +  Role        role;
    +  int         karma;
    +
    +  dbo::collection< dbo::ptr<Post> > posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::   id(a, userId,   "user_id", 20);
    +
    +    dbo::field(a, name,     "name");
    +    dbo::field(a, password, "password");
    +    dbo::field(a, role,     "role");
    +    dbo::field(a, karma,    "karma");
    +
    +    dbo::hasMany(a, posts, dbo::ManyToOne, "user");
    +  }
    +};
    +
    +void run()
    +{
    +  /*
    +   * Setup a session, would typically be done once at application startup.
    +   */
    +  dbo::backend::Sqlite3 sqlite3(":memory:");
    +  sqlite3.setProperty("show-queries", "true");
    +  dbo::Session session;
    +  session.setConnection(sqlite3);
    +
    +  session.mapClass<User>("user");
    +  session.mapClass<Post>("post");
    +  session.mapClass<Tag>("tag");
    +
    +  /*
    +   * Try to create the schema (will fail if already exists).
    +   */
    +  session.createTables();
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    User *user = new User();
    +    user->userId = "007";
    +    user->name = "Joe";
    +    user->password = "Secret";
    +    user->role = User::Visitor;
    +    user->karma = 13;
    +
    +    dbo::ptr<User> userPtr = session.add(user);
    +
    +    transaction.commit();
    +  }
    +
    +  dbo::ptr<Post> post;
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<User> joe = session.find<User>().where("name = ?").bind("Joe");
    +
    +    post = session.add(new Post());
    +    post.modify()->user = joe;
    +
    +    // will print 'Joe has 1 post(s).'
    +    std::cerr << "Joe has " << joe->posts.size() << " post(s)." << std::endl;
    +
    +    transaction.commit();
    +  }
    +
    +  {
    +    dbo::Transaction transaction(session);
    +
    +    dbo::ptr<Tag> cooking = session.add(new Tag());
    +    cooking.modify()->name = "Cooking";
    +
    +    post.modify()->tags.insert(cooking);
    +
    +    // will print '1 post(s) tagged with Cooking.'
    +    std::cerr << cooking->posts.size() << " post(s) tagged with Cooking." << std::endl;
    +
    +    transaction.commit();
    +  }
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  run();
    +}
    diff --git a/wt-3.1.7a/examples/feature/serverpush/CMakeLists.txt b/wt-3.1.7a/examples/feature/serverpush/CMakeLists.txt
    new file mode 100644
    index 0000000..fad4742
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/serverpush/CMakeLists.txt
    @@ -0,0 +1,15 @@
    +IF(NOT MULTI_THREADED_BUILD)
    +  MESSAGE(STATUS "** Not building serverpush feature example: requires a multi-threaded build.")
    +ELSE(NOT MULTI_THREADED_BUILD)
    +
    +  WT_ADD_EXAMPLE(serverpush.wt ServerPush.C)
    +
    +  #
    +  # If you have Wt installed somehwere, you should use the
    +  # installed Wt header files for your own Wt projects.
    +  # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +  # instead of the following:
    +  #
    +  INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ENDIF(NOT MULTI_THREADED_BUILD)
    diff --git a/wt-3.1.7a/examples/feature/serverpush/ServerPush.C b/wt-3.1.7a/examples/feature/serverpush/ServerPush.C
    new file mode 100644
    index 0000000..e327664
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/serverpush/ServerPush.C
    @@ -0,0 +1,107 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WProgressBar>
    +
    +#include <iostream>
    +#include <boost/thread.hpp>
    +
    +/*
    + * This is a minimal server push example, which is used to update the GUI
    + * while a big work is computing in another thread.
    + */
    +
    +class BigWorkWidget : public Wt::WContainerWidget
    +{
    +public:
    +  BigWorkWidget(Wt::WContainerWidget *parent)
    +    : WContainerWidget(parent)
    +  {
    +    startButton_ = new Wt::WPushButton("Start", this);
    +    startButton_->clicked().connect(startButton_, &Wt::WPushButton::disable);
    +    startButton_->clicked().connect(this, &BigWorkWidget::startBigWork);
    +    startButton_->setMargin(2);
    +
    +    progress_ = new Wt::WProgressBar(this);
    +    progress_->setInline(false);
    +    progress_->setMinimum(0);
    +    progress_->setMaximum(20);
    +    progress_->setMargin(2);
    +  }
    +
    +  virtual ~BigWorkWidget() {
    +    workThread_.join();
    +  }
    +
    +private:
    +  Wt::WPushButton *startButton_;
    +  Wt::WProgressBar *progress_;
    +
    +  boost::thread workThread_;
    +
    +  void startBigWork() {
    +    Wt::WApplication *app = Wt::WApplication::instance();
    +
    +    // Enable server push
    +    app->enableUpdates(true);
    +
    +    workThread_ 
    +      = boost::thread(boost::bind(&BigWorkWidget::doBigWork, this, app));
    +
    +    progress_->setValue(0);
    +    startButton_->setText("Busy...");
    +  }
    +
    +  /*
    +   * This function runs from another thread.
    +   *
    +   * From within this thread, we cannot use WApplication::instance(), since
    +   * that use thread-local storage. We can only access WApplication::instance()
    +   * after we have grabbed its update-lock.
    +   */
    +  void doBigWork(Wt::WApplication *app)
    +  {
    +    for (unsigned i = 0; i < 20; ++i) {
    +      // Do 50 ms of hard work.
    +      boost::this_thread::sleep(boost::posix_time::milliseconds(50));
    +
    +      // Get the application update lock to update the user-interface
    +      // with a progress indication.
    +      Wt::WApplication::UpdateLock uiLock(app);
    +      if (uiLock) {
    +	progress_->setValue(i + 1);
    +	app->triggerUpdate();
    +      }
    +    }
    +
    +    Wt::WApplication::UpdateLock uiLock(app);
    +    if (uiLock) {
    +      startButton_->enable();
    +      startButton_->setText("Again!");
    +
    +      app->triggerUpdate();
    +
    +      // Disable server push
    +      app->enableUpdates(false);
    +    }
    +  }
    +};
    +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  Wt::WApplication *app = new Wt::WApplication(env);
    +  app->setCssTheme("polished");
    +  new BigWorkWidget(app->root());
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/feature/socketnotifier/CMakeLists.txt b/wt-3.1.7a/examples/feature/socketnotifier/CMakeLists.txt
    new file mode 100644
    index 0000000..7a23aab
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/socketnotifier/CMakeLists.txt
    @@ -0,0 +1,20 @@
    +IF(NOT MULTI_THREADED_BUILD)
    +  MESSAGE(STATUS "** Not building socketnotifier feature example: requires a multi-threaded build.")
    +ELSE(NOT MULTI_THREADED_BUILD)
    +
    +  IF (MINGW)
    +    MESSAGE(STATUS "** Not building socketnotifier example for lack of getaddrinfo freeaddrinfo.")
    +  ELSE (MINGW)
    +
    +    WT_ADD_EXAMPLE(socketnotifier.wt SocketNotifier.C)
    +
    +    #
    +    # If you have Wt installed somehwere, you should use the
    +    # installed Wt header files for your own Wt projects.
    +    # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +    # instead of the following:
    +    #
    +    INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +  ENDIF (MINGW)
    +
    +ENDIF(NOT MULTI_THREADED_BUILD)
    diff --git a/wt-3.1.7a/examples/feature/socketnotifier/SocketNotifier.C b/wt-3.1.7a/examples/feature/socketnotifier/SocketNotifier.C
    new file mode 100644
    index 0000000..6a3f72b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/socketnotifier/SocketNotifier.C
    @@ -0,0 +1,279 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WSocketNotifier>
    +#include <Wt/WText>
    +
    +#include <iostream>
    +#include <boost/thread.hpp>
    +
    +#if WIN32
    +#include <winsock2.h>
    +#include <ws2tcpip.h>
    +typedef int socklen_t;
    +#else
    +#include <sys/types.h>
    +#include <sys/socket.h>
    +#include <sys/types.h>
    +#include <sys/socket.h>
    +#include <netdb.h>
    +#include <unistd.h>
    +#include <fcntl.h>
    +#endif
    +
    +#define HOSTNAME "www.webtoolkit.eu"
    +#define URL_PATH "/wt/blog/feed/"
    +
    +/*
    + * This is a minimal socket notifier example, which is used to asynchronously
    + * read an RSS file and display it in raw format on the browser using server
    + * push.
    + * Note that when the SocketNotifier signal is emitted, that Wt already
    + * conveniently grabbed the update lock for you. You can simply modify
    + * the widget tree and use the server push mechanism to push the changes
    + * to the browser.
    + * The example looks unnecessary complex due to the use of the raw POSIX
    + * socket functions. Usually these are wrapped in a more programmer-friendly
    + * API.
    + */
    +
    +class RssReader : public Wt::WContainerWidget
    +{
    +public:
    +  RssReader(Wt::WContainerWidget *parent)
    +    : WContainerWidget(parent),
    +      state_(CONNECT),
    +      bytesSent_(0),
    +      readNotifier_(0),
    +      writeNotifier_(0)
    +  {
    +    new Wt::WText("Click 'Start' to download the Wt homepage RSS feed<br/>"
    +      "The download will be done asynchronously and this page will update its "
    +      "contents to inform you about the progress using server push.<br/>",
    +      this);
    +    startButton_ = new Wt::WPushButton("Start", this);
    +    startButton_->clicked().connect(startButton_, &Wt::WPushButton::disable);
    +    startButton_->clicked().connect(this, &RssReader::startDownload);
    +
    +    resultText_ = new Wt::WText(this);
    +    resultText_->setInline(false);
    +    rssText_ = new Wt::WText(this);
    +    rssText_->setInline(false);
    +  }
    +
    +private:
    +  int socket_;
    +  enum {CONNECT, WRITE, READ} state_;
    +  int bytesSent_;
    +  Wt::WSocketNotifier *readNotifier_, *writeNotifier_;
    +  Wt::WPushButton *startButton_;
    +  Wt::WText *resultText_;
    +  Wt::WText *rssText_;
    +  std::stringstream inStream_;
    +
    +  // Convenience function that updates the status message.
    +  void addText(const Wt::WString &text)
    +  {
    +    resultText_->setText(resultText_->text() + text);
    +    if (wApp->updatesEnabled())
    +      wApp->triggerUpdate();
    +
    +  }
    +
    +  void startDownload()
    +  {
    +    // Enable server push
    +    wApp->enableUpdates(true);
    +
    +    rssText_->setText("");
    +    resultText_->setText("");
    +    addText("Resolving hostname...");
    +    startButton_->setText("Busy...");
    +    /*
    +     * Name resolving may take a while, so entertain the user
    +     * already with the updates so far. As this slot is invoked
    +     * by the browser (caused by the user clicking the 'start'
    +     * button), we can use processEvents() to send the changes
    +     * we made to the widget tree up till here back to the browser
    +     */
    +    wApp->processEvents();
    +
    +    struct addrinfo *info;
    +    if (getaddrinfo(HOSTNAME, "http", 0, &info) == 0) {
    +      socket_ = ::socket(info->ai_family, info->ai_socktype, info->ai_protocol);
    +      /*
    +       * Install notifiers for read and write events. These will end up
    +       * in a call to select, and activated() will be called whenever
    +       * select decides that the socket is ready for read or write.
    +       */
    +      readNotifier_ = new Wt::WSocketNotifier(socket_,
    +          Wt::WSocketNotifier::Read, this);
    +      readNotifier_->setEnabled(false); // Linux fires this on connect, weird
    +      readNotifier_->activated().connect(this, &RssReader::read);
    +      writeNotifier_ = new Wt::WSocketNotifier(socket_,
    +          Wt::WSocketNotifier::Write, this);
    +      writeNotifier_->activated().connect(this, &RssReader::write);
    +
    +      // Set sockets to non-blocking
    +#ifndef WIN32
    +      int flags = ::fcntl(socket_, F_GETFL, 0);
    +      flags |= O_NONBLOCK;
    +      ::fcntl(socket_, F_SETFL, flags);
    +#else
    +      u_long enabled = 1;
    +      ::ioctlsocket(socket_, FIONBIO, &enabled);
    +#endif
    +      // Perform a non-blocking connect. POSIX specifies that the socket
    +      // will be marked as ready for write when the connect call completes.
    +      int err = ::connect(socket_, info->ai_addr, info->ai_addrlen);
    +#ifndef WIN32
    +      int err2 = errno;
    +#else
    +      int err2 = GetLastError();
    +#endif
    +      freeaddrinfo(info);
    +
    +      addText(" Done!<br/>Connecting...");
    +      wApp->processEvents();
    +
    +      if (err == 0) {
    +        // connected, proceed immediately to 'writing'
    +        state_ = WRITE;
    +        // write() will be invoked automatically by the notifier.
    +      } else if (err == -1) {
    +#ifndef WIN32
    +        if (err2 == EINPROGRESS) {
    +#else
    +        if (err2 == WSAEWOULDBLOCK) {
    +#endif
    +          state_ = CONNECT;
    +          // The writeNotifier will be fired when connected
    +        } else {
    +          addText(" Problem with connect(). Giving up.<br/>");
    +          cleanup();
    +        }
    +      }
    +    } else {
    +      addText("Terminating: could not resolve web service host: " HOSTNAME);
    +      cleanup();
    +    }
    +  }
    +
    +  void write()
    +  {
    +    const char request[] = "GET http://" HOSTNAME URL_PATH "\r\n";
    +    switch(state_) {
    +    case CONNECT:
    +      {
    +        int err;
    +        socklen_t len = sizeof err;
    +        getsockopt(socket_, SOL_SOCKET, SO_ERROR, (char *)&err, &len);
    +        if (err != 0) {
    +          addText(" connect() failed. Giving up.<br/>");
    +          cleanup();
    +        } else {
    +          addText(" Connected!<br/>Writing data");
    +          state_ = WRITE;
    +        }
    +      }
    +      break;
    +    case WRITE:
    +      {
    +        addText(".");
    +        // write in bits for demonstration purposes only
    +        int len = (std::min<int>)(10, (sizeof request) - bytesSent_);
    +        int retval = ::send(socket_, request + bytesSent_, len, 0);
    +        if (retval >= 0) {
    +          bytesSent_ += retval;
    +          if (bytesSent_ >= sizeof request) {
    +            addText(" Done!<br/>Reading data");
    +            state_ = READ;
    +            // We don't need any further notifications that we can
    +            // keep writing
    +            writeNotifier_->setEnabled(false);
    +            readNotifier_->setEnabled(true);
    +          }
    +        } else {
    +#ifndef WIN32
    +          if (errno != EAGAIN) {
    +#else
    +          if (GetLastError() == WSAEWOULDBLOCK) {
    +#endif
    +            addText("send() failed. Giving up.<br/>");
    +            cleanup();
    +          }
    +        }
    +      }
    +      break;
    +    }
    +  }
    +
    +  void read()
    +  {
    +    addText(".");
    +    char buf[128];
    +    int retval = ::recv(socket_, buf, sizeof buf, 0);
    +    if (retval == 0) {
    +      // 'orderly shutdown'
    +      addText(" Done! (Remote end closed connection)<br/>");
    +      cleanup();
    +    } else if (retval < 0) {
    +#ifndef WIN32
    +      if (errno != EAGAIN) {
    +#else
    +      if (GetLastError() == WSAEWOULDBLOCK) {
    +#endif
    +        // Euh.. all done?
    +        addText("recv failed. Giving up.<br/>");
    +        cleanup();
    +      }
    +    } else {
    +      inStream_.write(buf, retval);
    +    }
    +  }
    +
    +  void cleanup()
    +  {
    +    /*
    +     * It is mandatory not to have notifiers on closed sockets,
    +     * as select() fails miserably in this case. Disable (or even
    +     * better, delete) the notifiers before you close the sockets.
    +     */
    +    delete readNotifier_;
    +    delete writeNotifier_;
    +    readNotifier_ = writeNotifier_ = 0;
    +#ifdef WIN32
    +    closesocket(socket_);
    +#else
    +    close(socket_);
    +#endif
    +    socket_ = 0;
    +    state_ = CONNECT;
    +    bytesSent_ = 0;
    +    startButton_->setText("Again");
    +    startButton_->enable();
    +    rssText_->setText("<pre>" +
    +        escapeText(Wt::WString::fromUTF8(inStream_.str())) + "</pre>");
    +    addText("Finished!<br/>Run again?<br/>");
    +    inStream_.str("");
    +    wApp->enableUpdates(false);
    +  }
    +};
    +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  Wt::WApplication *app = new Wt::WApplication(env);
    +  new RssReader(app->root());
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/feature/suggestionpopup/CMakeLists.txt b/wt-3.1.7a/examples/feature/suggestionpopup/CMakeLists.txt
    new file mode 100644
    index 0000000..dddd5ec
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/suggestionpopup/CMakeLists.txt
    @@ -0,0 +1,9 @@
    +WT_ADD_EXAMPLE(suggestionpopup.wt SuggestionPopup.C)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    diff --git a/wt-3.1.7a/examples/feature/suggestionpopup/SuggestionPopup.C b/wt-3.1.7a/examples/feature/suggestionpopup/SuggestionPopup.C
    new file mode 100644
    index 0000000..ccb6116
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/suggestionpopup/SuggestionPopup.C
    @@ -0,0 +1,270 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WSuggestionPopup>
    +#include <Wt/WLineEdit>
    +#include <Wt/WText>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WStandardItem>
    +
    +/*
    + * See also: http://www.webtoolkit.eu/wt/blog/2010/03/02/javascript_that_is_c__
    + */
    +#define INLINE_JAVASCRIPT(...) #__VA_ARGS__
    +
    +class SuggestionPopups : public Wt::WApplication
    +{
    +public:
    +  SuggestionPopups(const Wt::WEnvironment& env)
    +    : Wt::WApplication(env)
    +  {
    +    setTitle("WSuggestionPopup example");
    +    setCssTheme("polished");
    +    messageResourceBundle().use(appRoot() + "text");
    +
    +    styleSheet().addRule(".Wt-suggest b", "color: black;");
    +
    +    simplePopup(root());
    +    serverSideFilteringPopups(root());
    +  }
    +
    +private:
    +  Wt::WStandardItemModel *fourCharModel_;
    +
    +  /*
    +   * Creates a one-column model with data on HIV drugs.
    +   *  - the DisplayRole contains a semi-colon separated list of all names,
    +   *    starting with the leading name
    +   *  - the UserRole contains the leading name
    +   *
    +   * The DisplayRole will be interpreted by the special aliasing match
    +   * function
    +   */
    +  Wt::WAbstractItemModel *createDrugsModel()
    +  {
    +    const char *hivDrugs[] = {
    +      "Delavirdine;Rescriptor;DLV",
    +      "Efavirenz;Sustiva;EFV",
    +      "Etravirine;Intelence;TMC125;ETR",
    +      "Nevirapine;Viramune;NVP",
    +      "Abacavir;Ziagen;ABC",
    +      "Didanosine;Videx;ddI;Videx EC",
    +      "Emtricitabine;Emtriva;FTC",
    +      "Lamivudine;Epivir;3TC",
    +      "Stavudine;Zerit;d4T",
    +      "Tenofovir DF;Viread,TDF",
    +      "Zidovudine;Retrovir;AZT;ZDV",
    +      "Amprenavir;Agenerase;APV",
    +      "Atazanavir;Reyataz;ATV",
    +      "Darunavir;Prezista;TMC114;DRV",
    +      "Fosamprenavir;Lexiva;FPV",
    +      "Indinavir;Crixivan;IDV",
    +      "Lopinavir, Ritonavir;Kaletra;LPV/r",
    +      "Nelfinavir;Viracept;NFV",
    +      "Ritonavir;Norvir;RTV",
    +      "Saquinavir;Invirase;SQV",
    +      "Tipranavir;Aptivus;TPV",
    +      0
    +    };
    +
    +    Wt::WStandardItemModel *model = new Wt::WStandardItemModel(0, 1, this);
    +
    +    for (const char **i = hivDrugs; *i; ++i) {
    +      Wt::WStandardItem *item = new Wt::WStandardItem();
    +
    +      std::string names = *i;
    +      item->setData(names, Wt::DisplayRole);
    +
    +      std::string value = names;
    +      std::size_t sc = value.find(';');
    +      if (sc != std::string::npos)
    +	value = value.substr(0, sc);
    +      item->setData(value, Wt::UserRole);
    +
    +      model->appendRow(item);
    +    }
    +
    +    model->sort(0);
    +
    +    return model;
    +  }
    +
    +  void simplePopup(Wt::WContainerWidget *parent)
    +  {
    +    Wt::WSuggestionPopup *popup = createAliasesMatchingPopup(parent);
    +    popup->setModel(createDrugsModel());
    +    popup->setMinimumSize(150, Wt::WLength::Auto);
    +    popup->setMaximumSize(Wt::WLength::Auto, 300);
    +
    +    new Wt::WText(Wt::WString::tr("simple-popup-editing"), parent);
    +
    +    Wt::WLineEdit *edit = new Wt::WLineEdit(parent);
    +    edit->resize(150, Wt::WLength::Auto);
    +    popup->forEdit(edit);
    +
    +    new Wt::WText(Wt::WString::tr("simple-popup-dropdown"), parent);
    +
    +    edit = new Wt::WLineEdit(parent);
    +    edit->resize(150, Wt::WLength::Auto);
    +    popup->forEdit(edit, Wt::WSuggestionPopup::DropDownIcon);
    +  }
    +
    +  void serverSideFilteringPopups(Wt::WContainerWidget *parent)
    +  {
    +    fourCharModel_ = new Wt::WStandardItemModel(0, 1);
    +
    +    Wt::WSuggestionPopup *popup = createAliasesMatchingPopup(parent);
    +    popup->setModel(fourCharModel_);
    +    popup->setFilterLength(3);
    +    popup->filterModel().connect(this, &SuggestionPopups::filter);
    +    popup->setMinimumSize(150, Wt::WLength::Auto);
    +    popup->setMaximumSize(Wt::WLength::Auto, 300);
    +
    +    new Wt::WText(Wt::WString::tr("serverside-popup-editing"), parent);
    +
    +    Wt::WLineEdit *edit = new Wt::WLineEdit(parent);
    +
    +    edit->resize(150, Wt::WLength::Auto);
    +    popup->forEdit(edit, Wt::WSuggestionPopup::Editing);
    +
    +    new Wt::WText(Wt::WString::tr("serverside-popup-dropdown"), parent);
    +
    +    edit = new Wt::WLineEdit(parent);
    +    edit->resize(150, Wt::WLength::Auto);
    +    popup->forEdit(edit, Wt::WSuggestionPopup::DropDownIcon);
    +  }
    +
    +  void filter(const Wt::WString& input)
    +  {
    +    /*
    +     * We implement a virtual model contains all items that start with
    +     * any arbitrary 3 characters, followed by "a-z"
    +     */
    +    fourCharModel_->removeRows(0, fourCharModel_->rowCount());
    +
    +    for (int i = 0; i < 26; ++i) {
    +      /*
    +       * If the input is shorter than the server-side filter length,
    +       * then limit the number of matches and end with a '...'
    +       */
    +      if (input.value().length() < 3 && i > 10) {
    +	Wt::WStandardItem *item = new Wt::WStandardItem();
    +
    +	item->setText("...");
    +	item->setData(std::string(""), Wt::UserRole); // no actual value
    +	fourCharModel_->appendRow(item);
    +
    +	break;
    +      }
    +
    +      std::wstring v = input;
    +      while (v.length() < 3)
    +	v += L'a';
    +
    +      v += (L'a' + i);
    +
    +      Wt::WStandardItem *item = new Wt::WStandardItem();
    +
    +      item->setText(v);
    +      fourCharModel_->appendRow(item);
    +    }
    +  }
    +
    +  Wt::WSuggestionPopup *createAliasesMatchingPopup(Wt::WContainerWidget *parent)
    +  {
    +    /*
    +     * This matcher JavaScript function matches the input against the
    +     * name of a product, or one or more aliases.
    +     *
    +     * A match is indicated by product name and optionally matching aliases
    +     * between brackets.
    +     */
    +
    +    /*
    +     * Note!
    +     *
    +     * INLINE_JAVASCRIPT is a macro which allows entry of JavaScript
    +     * directly in a C++ file.
    +     */
    +    std::string matcherJS = INLINE_JAVASCRIPT
    +      (
    +       function (edit) {
    +	 var value = edit.value;
    +
    +	 return function(suggestion) {
    +	   if (!suggestion)
    +	     return value;
    +	   
    +	   var i, il,
    +	     names = suggestion.split(';'),
    +	     val = value.toUpperCase(),
    +	     matchedAliases = [],
    +	     matched = null;
    +
    +	   if (val.length) {
    +	     for (i = 0, il = names.length; i < il; ++i) {
    +	       var name = names[i];
    +	       if (name.length >= val.length
    +		   && name.toUpperCase().substr(0, val.length) == val) {
    +		 // This name matches
    +		 name = '<b>' + name.substr(0, val.length) + '</b>'
    +		   + name.substr(val.length);
    +
    +		 if (i == 0) // it's the product name
    +		   matched = name;
    +		 else // it's an alias
    +		   matchedAliases.push(name);
    +	       }
    +	     }
    +	   }
    +
    +	   // Let '...' always match
    +	   if (names[0] == '...')
    +	     matched = names[0];
    +
    +	   if (matched || matchedAliases.length) {
    +	     if (!matched)
    +	       matched = names[0];
    +
    +	     if (matchedAliases.length)
    +	       matched += " (" + matchedAliases.join(", ") + ")";
    +
    +	     return { match : true,
    +		      suggestion : matched };
    +	   } else {
    +	     return { match : false,
    +		      suggestion : names[0] };
    +	   }
    +	 }
    +       }
    +       );
    +
    +    std::string replacerJS = INLINE_JAVASCRIPT
    +      (
    +       function (edit, suggestionText, suggestionValue) {
    +	 edit.value = suggestionValue;
    +
    +	 if (edit.selectionStart)
    +	   edit.selectionStart = edit.selectionEnd = suggestionValue.length;
    +       }
    +       );
    +
    +    return new Wt::WSuggestionPopup(matcherJS, replacerJS, parent);
    +  }
    +};
    +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  return new SuggestionPopups(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return Wt::WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/feature/suggestionpopup/text.xml b/wt-3.1.7a/examples/feature/suggestionpopup/text.xml
    new file mode 100644
    index 0000000..9fe4393
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/suggestionpopup/text.xml
    @@ -0,0 +1,93 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<messages>
    +  <message id="simple-popup-editing">
    +    <h2>WSuggestionPopup example</h2>
    +
    +    <p>
    +      This example shows various configurations of WSuggestionPopup,
    +      and an example of custom <i>matcher</i> and <i>replacer</i>
    +      JavaScript functions.
    +    </p>
    +
    +    <h3>Client-side filtering</h3>
    +
    +    <p>
    +      In its simplest form, the suggestion popup provides client-side
    +      filtering only. The entire model, which provides the list of
    +      suggestions, is preloaded in the browser and filtered based on
    +      editing in the line edit.
    +    </p>
    +
    +    <p>
    +      The example below uses a custom matcher implementation, which
    +      interprets the suggestions as a semi-colon separated list of
    +      synonyms, and shows the synonym that matches in addition to the
    +      leading name (the first synonym).
    +    </p>
    +
    +    <p>
    +      The model below contains names of HIV anti-retrovirals, with
    +      commercial, pre-clinical and abbreviations as synonyms. To see
    +      the effect of the custom matching function, which matches also
    +      by synonyms, try typing <tt>"tm"</tt>, and watch how this
    +      selects <tt>"Darunavir"</tt> and <tt>"Etravirine"</tt> through
    +      its synonyms <tt>"TMC114"</tt> and <tt>"TMC125"</tt>, and
    +      compare this to typing <tt>"da"</tt>.
    +    </p>
    +  </message>
    +
    +  <message id="simple-popup-dropdown">
    +    <h3>Client-side filtering with dropdown behaviour</h3>
    +
    +    <p>
    +      When using <tt>Wt::WSuggestionPopup::DropDownIcon</tt> as
    +      editing trigger, the suggestion popup acts as a smarter version
    +      of a combo-box that reacts to editing to narrow-down the list of
    +      matches.
    +    </p>
    +
    +    <p>
    +      Use <tt>setMaximumSize()</tt> to constrain the maximum height
    +      (which is also taken into account to position the popup either
    +      downwards or upwards), and <tt>setMinimumSize()</tt> to set a
    +      minimum width so provide space for a vertical scrollbar.
    +    </p>
    +  </message>
    +
    +  <message id="serverside-popup-editing">
    +    <h3>Client- and server-side filtering</h3>
    +
    +    <p>
    +      To support large models, filtering may be done partially on the
    +      server. A non-zero filter length indicates that until the input
    +      reaches that length, suggestions are not shown. Only when the
    +      input exceeds the filter length, the model is first filtered on
    +      the server, and only thereafter further narrowed down
    +      client-side. In other words, the filter length acts as a delay
    +      for the suggestion popup to be shown, based on the input length.
    +    </p>
    +
    +    <p>
    +      The following suggestion popup is backed by a virtual model
    +      which includes any combination of three characters and a letter
    +      (a-z) (e.g. <tt>'A €d'</tt>), but will use server-side filtering
    +      to provide suggestions only when at least three characters have
    +      been entered.
    +    </p>
    +  </message>
    +
    +  <message id="serverside-popup-dropdown">
    +    <h3>Client- and server-side filtering with dropdown behaviour</h3>
    +
    +    <p>
    +      Server-side filtering also works in combination with a drop-down
    +      to explicitly get the list of matching suggestions. Because the
    +      user may want to see this list even when the input is shorter
    +      than the filter length, the server-side filtering may in that
    +      case limit the number of suggestions that match, and add
    +      a <tt>...</tt> to indicate that not all matches are shown.
    +    </p>
    +  </message>
    +
    +</messages>
    diff --git a/wt-3.1.7a/examples/feature/video/CMakeLists.txt b/wt-3.1.7a/examples/feature/video/CMakeLists.txt
    new file mode 100644
    index 0000000..e5873dc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/video/CMakeLists.txt
    @@ -0,0 +1,17 @@
    +IF (EXAMPLES_CONNECTOR MATCHES "wthttp")
    +
    +  WT_ADD_EXAMPLE(video.wt video.C)
    +
    +  #
    +  # If you have Wt installed somehwere, you should use the
    +  # installed Wt header files for your own Wt projects.
    +  # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +  # instead of the following:
    +  #
    +  INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ELSE (EXAMPLES_CONNECTOR MATCHES "wthttp")
    +
    +  MESSAGE(STATUS "** hello-widget set example requires the built-in http... Skipping.")
    +
    +ENDIF (EXAMPLES_CONNECTOR MATCHES "wthttp")
    diff --git a/wt-3.1.7a/examples/feature/video/sintel_trailer.jpg b/wt-3.1.7a/examples/feature/video/sintel_trailer.jpg
    new file mode 100755
    index 0000000..3f7de31
    Binary files /dev/null and b/wt-3.1.7a/examples/feature/video/sintel_trailer.jpg differ
    diff --git a/wt-3.1.7a/examples/feature/video/text.xml b/wt-3.1.7a/examples/feature/video/text.xml
    new file mode 100644
    index 0000000..35f16e0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/video/text.xml
    @@ -0,0 +1,34 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="intro">
    +    <p>Wt's video support is work in progress, but there are already a few
    +      ways to play video in Wt. Currently, methods based on the HTML5 Video
    +      element and Flash are provided.
    +    </p>
    +    <p>The trailer below is <a href="http://durian.blender.org/"
    +      target="_blank">Sintel</a>,
    +      (c) copyright Blender Foundation | durian.blender.org
    +    </p>
    +  </message>
    +  <message id="html5">
    +    <h2>HTML5 Playback</h2>
    +    <p>Below is a WHTML5Video class, with a WImage (a static JPEG image) as
    +      fallback. The HTML5 video will play on browsers that support MP4 or OGV
    +      video streams (firefox, chrome, safari, ...), and show the image
    +      on other browsers (Internet Explorer, opera, ...).
    +    </p>
    +  </message>
    +  <message id="flash-fallback">
    +    <h2>HTML5 Playback with Flash fallback</h2>
    +    <p>For browsers that support HTML5 video, the video below looks exactly like
    +      the one above. On other browsers, the player below falls back to a
    +      Flash player, which plays an MP4 video. If flash is not supported on
    +      your system, a static image is shown.
    +    </p>
    +    <p>
    +      The Flash-based video player can be any player. The example below uses
    +      <a href="http://flv-player.net/" target="_blank">FLV Player</a> as
    +      fallback for HTML5 video, but any flash player can do the job.
    +    </p>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/feature/video/video.C b/wt-3.1.7a/examples/feature/video/video.C
    new file mode 100644
    index 0000000..81fd7a4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/video/video.C
    @@ -0,0 +1,63 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WText>
    +#include <Wt/WHTML5Video>
    +#include <Wt/WImage>
    +#include <Wt/WFlashObject>
    +
    +using namespace Wt;
    +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  WApplication* app = new WApplication(env);
    +
    +  app->messageResourceBundle().use(WApplication::appRoot() + "text");
    +
    +  std::string ogvVideo =
    +    "http://www.webtoolkit.eu/videos/sintel_trailer.ogv";
    +  std::string mp4Video =
    +    "http://www.webtoolkit.eu/videos/sintel_trailer.mp4";
    +  std::string poster = "sintel_trailer.jpg";
    +  
    +  new WText(WString::tr("intro"), app->root());
    +  new WBreak(app->root());
    +
    +  new WText(WString::tr("html5"), app->root());
    +  WHTML5Video *v1 = new WHTML5Video(app->root());
    +  v1->addSource(mp4Video);
    +  v1->addSource(ogvVideo);
    +  v1->setPoster(poster);
    +  v1->setAlternativeContent(new WImage(poster));
    +  v1->resize(640, 360);
    +  
    +  new WText(WString::tr("flash-fallback"), app->root());
    +  WFlashObject *flash2 =
    +    new WFlashObject("http://www.webtoolkit.eu/videos/player_flv_maxi.swf");
    +  flash2->setFlashVariable("startimage", "sintel_trailer.jpg");
    +  flash2->setFlashParameter("allowFullScreen", "true");
    +  flash2->setFlashVariable("flv", mp4Video);
    +  flash2->setFlashVariable("showvolume", "1");
    +  flash2->setFlashVariable("showfullscreen", "1");
    +  flash2->setAlternativeContent(new WImage(poster));
    +  flash2->resize(640, 360);
    +  WHTML5Video *v2 = new WHTML5Video(app->root());
    +  v2->addSource(mp4Video);
    +  v2->addSource(ogvVideo);
    +  v2->setAlternativeContent(flash2);
    +  v2->setPoster(poster);
    +  v2->resize(640, 360);
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return Wt::WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/feature/widgetset/CMakeLists.txt b/wt-3.1.7a/examples/feature/widgetset/CMakeLists.txt
    new file mode 100644
    index 0000000..9b6c87f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/widgetset/CMakeLists.txt
    @@ -0,0 +1,17 @@
    +IF (EXAMPLES_CONNECTOR MATCHES "wthttp")
    +
    +  WT_ADD_EXAMPLE(hello-widgetset.wt hello.C)
    +
    +  #
    +  # If you have Wt installed somehwere, you should use the
    +  # installed Wt header files for your own Wt projects.
    +  # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +  # instead of the following:
    +  #
    +  INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ELSE (EXAMPLES_CONNECTOR MATCHES "wthttp")
    +
    +  MESSAGE(STATUS "** hello-widget set example requires the built-in http... Skipping.")
    +
    +ENDIF (EXAMPLES_CONNECTOR MATCHES "wthttp")
    diff --git a/wt-3.1.7a/examples/feature/widgetset/hello.C b/wt-3.1.7a/examples/feature/widgetset/hello.C
    new file mode 100644
    index 0000000..360a24a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/widgetset/hello.C
    @@ -0,0 +1,145 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WServer>
    +#include <Wt/WText>
    +
    +class HelloApplication : public Wt::WApplication
    +{
    +public:
    +  HelloApplication(const Wt::WEnvironment& env, bool embedded);
    +
    +private:
    +  Wt::WLineEdit *nameEdit_;
    +  Wt::WText *greeting_;
    +
    +  void greet();
    +};
    +
    +HelloApplication::HelloApplication(const Wt::WEnvironment& env, bool embedded)
    +  : WApplication(env)
    +{
    +  /*
    +   * By default, "dynamic script tags" are used to relay event information
    +   * in WidgetSet mode. This has the benefit of allowing an application to
    +   * be embedded from within a web page on another domain.
    +   *
    +   * You can revert to plain AJAX requests using the following call. This will
    +   * only work if your application is hosted on the same domain as the
    +   * web page in which it is embedded.
    +   */
    +  //setAjaxMethod(XMLHttpRequest);
    +
    +  Wt::WContainerWidget *top;
    +
    +  setTitle("Hello world");
    +
    +  if (!embedded) {
    +    /*
    +     * In Application mode, we have the root() is a container
    +     * corresponding to the entire browser window
    +     */
    +    top = root();
    +
    +  } else {
    +    /*
    +     * In WidgetSet mode, we create and bind containers to existing
    +     * divs in the web page. In this example, we create a single div
    +     * whose DOM id was passed as a request argument.
    +     */
    +    top = new Wt::WContainerWidget();
    +    const std::string *div = env.getParameter("div");
    +    if (div)
    +      bindWidget(top, *div);
    +    else {
    +      std::cerr << "Missing: parameter: 'div'" << std::endl;
    +      return;
    +    }
    +  }
    +
    +  if (!embedded)
    +    new Wt::WText
    +      ("<p><emph>Note: you can also run this application "
    +       "from within <a href=\"hello.html\">a web page</a>.</emph></p>",
    +       root());
    +
    +  /*
    +   * Everything else is business as usual.
    +   */
    +
    +  top->addWidget(new Wt::WText("Your name, please ? "));
    +  nameEdit_ = new Wt::WLineEdit(top);
    +  nameEdit_->setFocus();
    +
    +  Wt::WPushButton *b = new Wt::WPushButton("Greet me.", top);
    +  b->setMargin(5, Wt::Left);
    +
    +  top->addWidget(new Wt::WBreak());
    +
    +  greeting_ = new Wt::WText(top);
    +
    +  /*
    +   * Connect signals with slots
    +   */
    +  b->clicked().connect(this, &HelloApplication::greet);
    +  nameEdit_->enterPressed().connect(this, &HelloApplication::greet);
    +}
    +
    +void HelloApplication::greet()
    +{
    +  /*
    +   * Update the text, using text input into the nameEdit_ field.
    +   */
    +  greeting_->setText("Hello there, " + nameEdit_->text());
    +}
    +
    +Wt::WApplication *createApplication(const Wt::WEnvironment& env)
    +{
    +  return new HelloApplication(env, false);
    +}
    +
    +Wt::WApplication *createWidgetSet(const Wt::WEnvironment& env)
    +{
    +  return new HelloApplication(env, true);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  Wt::WServer server(argv[0]);
    +
    +  // Use default server configuration: command line arguments and the
    +  // wthttpd configuration file.
    +  server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
    +
    +  // Application entry points. Each entry point binds an URL with an
    +  // application (with a callback function used to bootstrap a new
    +  // application).
    +
    +  // The following is the default entry point. It configures a
    +  // standalone Wt application at the deploy path configured in the
    +  // server configuration.
    +  server.addEntryPoint(Wt::Application, createApplication);
    +
    +  // The following adds an entry point for a widget set. A widget set
    +  // must be loaded as a JavaScript from an HTML page.
    +  server.addEntryPoint(Wt::WidgetSet, createWidgetSet, "/hello.wtjs");
    +
    +  // Start the server (in the background if there is threading support)
    +  // and wait for a shutdown signal (e.g. Ctrl C, SIGKILL)
    +  if (server.start()) {
    +    Wt::WServer::waitForShutdown();
    +
    +    // Cleanly terminate all sessions
    +    server.stop();
    +  }
    +}
    +
    diff --git a/wt-3.1.7a/examples/feature/widgetset/hello.html b/wt-3.1.7a/examples/feature/widgetset/hello.html
    new file mode 100644
    index 0000000..671215d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/feature/widgetset/hello.html
    @@ -0,0 +1,61 @@
    +<html>
    +<head>
    +  <style type="text/css">
    +    .widget { 
    +      width: 400px;
    +      height: 200px;
    +      margin: 10px auto;
    +      padding: 4px;
    +      border: 4px solid gray;
    +    }
    +
    +    .IE-hidden-iframe {
    +      position: absolute;
    +      top: 0; left: 0;
    +      width: 1px; height: 1px;
    +      visibility: hidden;
    +    }
    +  </style>
    +  <title>Embedded Wt</title>
    +
    +  <!-- You need this if you want to use Ext widgets:
    +    -->
    +  <!--[if gte IE 6]>
    +  <script id="ie-deferred-loader" defer="defer" src="//:"></script>
    +  <![endif]-->
    +</head>
    +<body>
    +
    +<!-- These hidden fields are needed for Wt's internal path API
    +     and are optional.
    +
    +   If you use them, then append "&amp;Wt-history=Wt-history" to the Wt
    +   script url, where Wt-history corresponds to the prefix of these fields:
    +     Wt-history-iframe
    +     Wt-history-field
    +
    +   The hidden iframe is only needed for Internet Explorer, so you can
    +   make it conditional:
    +-->
    +<!--[if gte IE 6]>
    +<iframe id="Wt-history-iframe" src="/hello.wtjs?resource=blank"
    +        class="IE-hidden-iframe">
    +</iframe> 
    +<![endif]-->
    +<input id="Wt-history-field" type="hidden"/>
    +
    +<!-- End hidden fields for Wt's internal path API -->
    +
    +<!--
    +   We need a place holder for every widget to which we want to bind
    +   a WContainerWidget in Wt
    +  -->
    +<div id="hello" class="widget">
    +
    +<!--
    +   As the last step, we load our application.
    +  -->
    +<script src="/hello.wtjs?div=hello&amp;Wt-history=Wt-history"></script>
    +
    +</body>
    +</html>
    diff --git a/wt-3.1.7a/examples/filetreetable/CMakeLists.txt b/wt-3.1.7a/examples/filetreetable/CMakeLists.txt
    new file mode 100644
    index 0000000..343c996
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/CMakeLists.txt
    @@ -0,0 +1,20 @@
    +IF(NOT WIN32 AND NOT BOOST_FS_LIB)
    +  MESSAGE(STATUS "** Not building filetreetable example: requires boost_filesystem library.")
    +ELSE(NOT WIN32 AND NOT BOOST_FS_LIB)
    +
    +  WT_ADD_EXAMPLE(filetreetable.wt
    +    FileTreeTable.C
    +    FileTreeTableNode.C
    +    FileTreeExample.C
    +  )
    +
    +  TARGET_LINK_LIBRARIES(filetreetable.wt
    +    ${BOOST_FS_LIB}
    +  )
    +
    +  INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +  ADD_DEPENDENCIES(filetreetable.wt wt ${EXAMPLES_CONNECTOR})
    +
    +ENDIF(NOT WIN32 AND NOT BOOST_FS_LIB)
    +
    diff --git a/wt-3.1.7a/examples/filetreetable/FileTreeExample.C b/wt-3.1.7a/examples/filetreetable/FileTreeExample.C
    new file mode 100644
    index 0000000..b97bbac
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/FileTreeExample.C
    @@ -0,0 +1,37 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WTree>
    +#include <Wt/WTreeTableNode>
    +
    +#include "FileTreeTable.h"
    +
    +using namespace Wt;
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->setTitle("File explorer example");
    +  app->useStyleSheet("filetree.css");
    +
    +  FileTreeTable *treeTable = new FileTreeTable(".");
    +  treeTable->resize(500, 300);
    +  treeTable->tree()->setSelectionMode(ExtendedSelection);
    +  treeTable->treeRoot()->setNodeVisible(false);
    +  treeTable->treeRoot()->setChildCountPolicy(WTreeNode::Enabled);
    +
    +  app->root()->addWidget(treeTable);
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/filetreetable/FileTreeTable.C b/wt-3.1.7a/examples/filetreetable/FileTreeTable.C
    new file mode 100644
    index 0000000..382f15a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/FileTreeTable.C
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "FileTreeTable.h"
    +#include "FileTreeTableNode.h"
    +
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +FileTreeTable::FileTreeTable(const boost::filesystem::path& path,
    +			     WContainerWidget *parent)
    +  : WTreeTable(parent)
    +{
    +  addColumn("Size", 80);
    +  addColumn("Modified", 110);
    +
    +  header(1)->setStyleClass("fsize");
    +  header(2)->setStyleClass("date");
    +
    +  setTreeRoot(new FileTreeTableNode(path), "File");
    +
    +  treeRoot()->setImagePack("icons/");
    +  treeRoot()->expand();
    +}
    diff --git a/wt-3.1.7a/examples/filetreetable/FileTreeTable.h b/wt-3.1.7a/examples/filetreetable/FileTreeTable.h
    new file mode 100644
    index 0000000..28b3ed0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/FileTreeTable.h
    @@ -0,0 +1,46 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef FILETREETABLE_H_
    +#define FILETREETABLE_H_
    +
    +#include <Wt/WTreeTable>
    +
    +#include <boost/filesystem/path.hpp>
    +
    +/**
    + * \defgroup fileexplorer File Explorer example
    + */
    +/*@{*/
    +
    +/*! \brief A tree table that displays a file tree.
    + *
    + * The table allows one to browse a path, and all its subdirectories,
    + * using a tree table. In addition to the file name, it shows file size
    + * and modification date.
    + *
    + * The table use FileTreeTableNode objects to display the actual content
    + * of the table. 
    + *
    + * The tree table uses the LazyLoading strategy of WTreeNode to dynamically
    + * load contents for the tree.
    + *
    + * This widget is part of the %Wt File Explorer example.
    + */
    +class FileTreeTable : public Wt::WTreeTable
    +{
    +public:
    +  /*! \brief Construct a new FileTreeTable.
    +   *
    +   * Create a new FileTreeTable to browse the given path.
    +   */
    +  FileTreeTable(const boost::filesystem::path& path,
    +		Wt::WContainerWidget *parent = 0);
    +};
    +
    +/*@}*/
    +
    +#endif // FILETREETABLE_H_
    diff --git a/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.C b/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.C
    new file mode 100644
    index 0000000..2ed02c5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.C
    @@ -0,0 +1,88 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "FileTreeTableNode.h"
    +
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/filesystem/exception.hpp>
    +#include <boost/lexical_cast.hpp>
    +#include <iostream>
    +#include <time.h>
    +
    +#include <Wt/WIconPair>
    +#include <Wt/WStringUtil>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +FileTreeTableNode::FileTreeTableNode(const boost::filesystem::path& path)
    +  : WTreeTableNode(Wt::widen(path.leaf()), createIcon(path)),
    +    path_(path)
    +{
    +  label()->setTextFormat(PlainText);
    +
    +  if (boost::filesystem::exists(path)) {
    +    if (!boost::filesystem::is_directory(path)) {
    +      int fsize = (int)boost::filesystem::file_size(path);
    +      setColumnWidget(1, new WText(boost::lexical_cast<std::wstring>(fsize)));
    +      columnWidget(1)->setStyleClass("fsize");
    +    } else
    +      setSelectable(false);
    +
    +    std::time_t t = boost::filesystem::last_write_time(path);
    +    struct tm ttm;
    +#if WIN32
    +    ttm=*localtime(&t);
    +#else
    +    localtime_r(&t, &ttm);
    +#endif
    +
    +    char c[100];
    +    strftime(c, 100, "%b %d %Y", &ttm);
    +
    +    setColumnWidget(2, new WText(c));
    +    columnWidget(2)->setStyleClass("date");
    +  }
    +}
    +
    +WIconPair *FileTreeTableNode::createIcon(const boost::filesystem::path& path)
    +{
    +  if (boost::filesystem::exists(path)
    +      && boost::filesystem::is_directory(path))
    +    return new WIconPair("icons/yellow-folder-closed.png",
    +			 "icons/yellow-folder-open.png", false);
    +  else
    +    return new WIconPair("icons/document.png",
    +			 "icons/yellow-folder-open.png", false);
    +}
    +
    +void FileTreeTableNode::populate()
    +{
    +  try {
    +    if (boost::filesystem::is_directory(path_)) {
    +      std::set<boost::filesystem::path> paths;
    +      boost::filesystem::directory_iterator end_itr;
    +
    +      for (boost::filesystem::directory_iterator i(path_); i != end_itr; ++i)
    +	paths.insert(*i);
    +
    +      for (std::set<boost::filesystem::path>::iterator i = paths.begin();
    +	   i != paths.end(); ++i)
    +	addChildNode(new FileTreeTableNode(*i));
    +    }
    +  } catch (boost::filesystem::filesystem_error& e) {
    +    std::cerr << e.what() << std::endl;
    +  }
    +}
    +
    +bool FileTreeTableNode::expandable()
    +{
    +  if (!populated()) {
    +    return boost::filesystem::is_directory(path_);
    +  } else
    +    return WTreeTableNode::expandable();
    +}
    diff --git a/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.h b/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.h
    new file mode 100644
    index 0000000..a4bd5f6
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/FileTreeTableNode.h
    @@ -0,0 +1,51 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef FILETREETABLENODE_H_
    +#define FILETREETABLENODE_H_
    +
    +#include <Wt/WTreeTableNode>
    +
    +#include <boost/filesystem/path.hpp>
    +
    +/**
    + * @addtogroup fileexplorer
    + */
    +/*@{*/
    +
    +/*! \brief A single node in a file tree table.
    + *
    + * The node manages the details about one file, and if the file is a
    + * directory, populates a subtree with nodes for every directory item.
    + *
    + * The tree node reimplements Wt::WTreeTableNode::populate() to populate
    + * a directory node only when the node is expanded. In this way, only
    + * directories that are actually browsed are loaded from disk.
    + */
    +class FileTreeTableNode : public Wt::WTreeTableNode
    +{
    +public:
    +  /*! \brief Construct a new node for the given file.
    +   */
    +  FileTreeTableNode(const boost::filesystem::path& path);
    +
    +private:
    +  //! The path.
    +  boost::filesystem::path path_;
    +
    +  //! Reimplements WTreeNode::populate to read files within a directory.
    +  virtual void populate();
    +
    +  //! Reimplements WTreeNode::expandable
    +  virtual bool expandable();
    +
    +  //! Create the iconpair for representing the path.
    +  static Wt::WIconPair *createIcon(const boost::filesystem::path& path);
    +};
    +
    +/*@}*/
    +
    +#endif // FILETREETABLENODE_H_
    diff --git a/wt-3.1.7a/examples/filetreetable/filetree.css b/wt-3.1.7a/examples/filetreetable/filetree.css
    new file mode 100644
    index 0000000..6354d84
    --- /dev/null
    +++ b/wt-3.1.7a/examples/filetreetable/filetree.css
    @@ -0,0 +1,36 @@
    +body {
    +  font-family:arial,sans-serif; font-size: smaller;
    +}
    +
    +.treenodelabel {
    +  cursor:pointer;cursor:hand;
    +}
    +
    +.selected {
    +  background-color: #FFFFAA;
    +}
    +
    +.treenodechildcount {
    +  color:blue;
    +}
    +
    +.header * {
    +  font-weight: bold;
    +}
    +
    +.header {
    +  border-bottom: solid 1px;
    +}
    +
    +.date {
    +  text-align: right;
    +  padding-right: 3px;
    +}
    +
    +.fsize {
    +  text-align: right;
    +}
    +
    +.table {
    +  border: solid 2px;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/filetreetable/icons/document.png b/wt-3.1.7a/examples/filetreetable/icons/document.png
    new file mode 100644
    index 0000000..208908a
    Binary files /dev/null and b/wt-3.1.7a/examples/filetreetable/icons/document.png differ
    diff --git a/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-closed.png b/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-closed.png
    new file mode 100644
    index 0000000..0215874
    Binary files /dev/null and b/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-closed.png differ
    diff --git a/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-open.png b/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-open.png
    new file mode 100644
    index 0000000..97ce9f8
    Binary files /dev/null and b/wt-3.1.7a/examples/filetreetable/icons/yellow-folder-open.png differ
    diff --git a/wt-3.1.7a/examples/form/CMakeLists.txt b/wt-3.1.7a/examples/form/CMakeLists.txt
    new file mode 100644
    index 0000000..ec347c9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +WT_ADD_EXAMPLE(formexample.wt Form.C FormExample.C)
    +
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ADD_DEPENDENCIES(formexample.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/form/Form.C b/wt-3.1.7a/examples/form/Form.C
    new file mode 100644
    index 0000000..4b6387e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/Form.C
    @@ -0,0 +1,213 @@
    +#include "Form.h"
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WDatePicker>
    +#include <Wt/WSelectionBox>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WImage>
    +#include <Wt/WIntValidator>
    +#include <Wt/WLabel>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WTableCell>
    +#include <Wt/WTextArea>
    +#include <Wt/WText>
    +
    +Form::Form(WContainerWidget *parent)
    +  : WTable(parent)
    +{
    +  createUI();
    +}
    +
    +void Form::createUI()
    +{
    +  WLabel *label;
    +  int row = 0;
    +
    +  // Title
    +  elementAt(row, 0)->setColumnSpan(3);
    +  elementAt(row, 0)->setContentAlignment(AlignTop | AlignCenter);
    +  elementAt(row, 0)->setPadding(10);
    +  WText *title = new WText(tr("example.form"),
    +			   elementAt(row, 0));
    +  title->decorationStyle().font().setSize(WFont::XLarge);
    +
    +  // error messages
    +  ++row;
    +  elementAt(row, 0)->setColumnSpan(3);
    +  feedbackMessages_ = elementAt(row, 0);
    +  feedbackMessages_->setPadding(5);
    +
    +  WCssDecorationStyle& errorStyle = feedbackMessages_->decorationStyle();
    +  errorStyle.setForegroundColor(Wt::red);
    +  errorStyle.font().setSize(WFont::Smaller);
    +  errorStyle.font().setWeight(WFont::Bold);
    +  errorStyle.font().setStyle(WFont::Italic);
    +
    +  // Name
    +  ++row;
    +  nameEdit_ = new WLineEdit(elementAt(row, 2));
    +  label = new WLabel(tr("example.name"), elementAt(row, 0));
    +  label->setBuddy(nameEdit_);
    +  nameEdit_->setValidator(new WValidator(true));
    +  nameEdit_->enterPressed().connect(this, &Form::submit);
    +
    +  // First name
    +  ++row;
    +  firstNameEdit_ = new WLineEdit(elementAt(row, 2));
    +  label = new WLabel(tr("example.firstname"), elementAt(row,0));
    +  label->setBuddy(firstNameEdit_);
    +
    +  // Country
    +  ++row;
    +  countryEdit_ = new WComboBox(elementAt(row, 2));
    +  countryEdit_->addItem("");
    +  countryEdit_->addItem("Belgium");
    +  countryEdit_->addItem("Netherlands");
    +  countryEdit_->addItem("United Kingdom");
    +  countryEdit_->addItem("United States");
    +  label = new WLabel(tr("example.country"), elementAt(row, 0));
    +  label->setBuddy(countryEdit_);
    +  countryEdit_->setValidator(new WValidator(true));
    +  countryEdit_->changed().connect(this, &Form::countryChanged);
    +
    +  // City
    +  ++row;
    +  cityEdit_ = new WComboBox(elementAt(row, 2));
    +  cityEdit_->addItem(tr("example.choosecountry"));
    +  label = new WLabel(tr("example.city"), elementAt(row, 0));
    +  label->setBuddy(cityEdit_);
    +
    +  // Birth date
    +  ++row;
    +
    +  birthDateEdit_ = new WDatePicker(elementAt(row, 2));
    +  birthDateEdit_->setBottom(WDate(1900, 1, 1));
    +  birthDateEdit_->setTop(WDate::currentDate());
    +  label = new WLabel(tr("example.birthdate"), elementAt(row, 0));
    +  label->setBuddy(birthDateEdit_->lineEdit());
    +  birthDateEdit_->setFormat("dd/MM/yyyy");
    +  birthDateEdit_->lineEdit()->validator()->setMandatory(true);
    +
    +  // Child count
    +  ++row;
    +  childCountEdit_ = new WLineEdit("0", elementAt(row, 2));
    +  label = new WLabel(tr("example.childcount"),
    +		     elementAt(row, 0));
    +  label->setBuddy(childCountEdit_);
    +  childCountEdit_->setValidator(new WIntValidator(0,30));
    +  childCountEdit_->validator()->setMandatory(true);
    +
    +  ++row;
    +  remarksEdit_ = new WTextArea(elementAt(row, 2));
    +  remarksEdit_->setColumns(40);
    +  remarksEdit_->setRows(5);
    +  label = new WLabel(tr("example.remarks"),
    +		     elementAt(row, 0));
    +  label->setBuddy(remarksEdit_);
    +
    +  // Submit
    +  ++row;
    +  WPushButton *submit = new WPushButton(tr("submit"),
    +					elementAt(row, 0));
    +  submit->clicked().connect(this, &Form::submit);
    +  submit->setMargin(15, Top);
    +  elementAt(row, 0)->setColumnSpan(3);
    +  elementAt(row, 0)->setContentAlignment(AlignTop | AlignCenter);
    +
    +  // Set column widths for label and validation icon
    +  elementAt(2, 0)->resize(WLength(30, WLength::FontEx), WLength::Auto);
    +  elementAt(2, 1)->resize(20, WLength::Auto);
    +}
    +
    +void Form::countryChanged()
    +{
    +  cityEdit_->clear();
    +  cityEdit_->addItem("");
    +  cityEdit_->setCurrentIndex(-1);
    +
    +  switch (countryEdit_->currentIndex()) {
    +  case 0:
    +    break;
    +  case 1:
    +    cityEdit_->addItem("Antwerp");
    +    cityEdit_->addItem("Brussels");
    +    cityEdit_->addItem("Oekene");
    +    break;
    +  case 2:
    +    cityEdit_->addItem("Amsterdam");
    +    cityEdit_->addItem("Den Haag");
    +    cityEdit_->addItem("Rotterdam");
    +    break;
    +  case 3:
    +    cityEdit_->addItem("London");
    +    cityEdit_->addItem("Bristol");
    +    cityEdit_->addItem("Oxford");
    +    cityEdit_->addItem("Stonehenge");
    +    break;
    +  case 4:
    +    cityEdit_->addItem("Boston");
    +    cityEdit_->addItem("Chicago");
    +    cityEdit_->addItem("Los Angelos");
    +    cityEdit_->addItem("New York");
    +    break;
    +  }    
    +}
    +
    +bool Form::checkValid(WFormWidget *edit, const WString& text)
    +{
    +  if (edit->validate() != WValidator::Valid) {
    +    feedbackMessages_->addWidget(new WText(text));
    +    feedbackMessages_->addWidget(new WBreak());
    +    edit->label()->decorationStyle().setForegroundColor(Wt::red);
    +    edit->setStyleClass("Wt-invalid");
    +
    +    return false;
    +  } else {
    +    edit->label()->decorationStyle().setForegroundColor(WColor());    
    +    edit->setStyleClass("");
    +
    +    return true;
    +  }
    +}
    +
    +bool Form::validate()
    +{
    +  feedbackMessages_->clear();
    +  bool valid = true;
    +
    +  if (!checkValid(nameEdit_, tr("error.name")))
    +    valid = false;
    +  if (!checkValid(countryEdit_, tr("error.country")))
    +    valid = false;
    +  if (!checkValid(birthDateEdit_->lineEdit(), tr("error.birthdate")))
    +    valid = false;
    +  if (!checkValid(childCountEdit_, tr("error.childcount")))
    +    valid = false;
    +
    +  return valid;
    +}
    +
    +void Form::submit()
    +{
    +  if (validate()) {
    +    // do something useful with the data...
    +    std::wstring name
    +      = firstNameEdit_->text() + L" " + nameEdit_->text();
    +
    +    std::wstring remarks
    +      = remarksEdit_->text();
    +
    +    clear();
    +
    +    new WText(WString::fromUTF8("<p>Thank you, {1}, "
    +				"for all this precious data.</p>").arg(name),
    +	      elementAt(0, 0));
    +    
    +    if (!remarks.empty())
    +      new WText("<p>You had some remarks. Splendid !</p>", elementAt(0, 0));
    +
    +    wApp->quit();
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/form/Form.h b/wt-3.1.7a/examples/form/Form.h
    new file mode 100644
    index 0000000..e9d83f3
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/Form.h
    @@ -0,0 +1,85 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef FORM_H_
    +#define FORM_H_
    +
    +#include <Wt/WTable>
    +
    +using namespace Wt;
    +
    +namespace Wt {
    +  class WContainerWidget;
    +  class WText;
    +  class WTextArea;
    +  class WLineEdit;
    +  class WComboBox;
    +  class WFormWidget;
    +  class WDatePicker;
    +}
    +
    +/**
    + * @addtogroup formexample
    + */
    +/*@{*/
    +
    +/*!\brief A simple Form.
    + *
    + * Shows how a simple form can made, with an emphasis on how
    + * to handle validation.
    + */
    +class Form : public WTable
    +{
    +public:
    +  /*!\brief Instantiate a new form.
    +   */
    +  Form(WContainerWidget *parent = 0);
    +
    +private:
    +  /*!\brief The user selected a new country: adjust the cities combo box.
    +   */
    +  void countryChanged();
    +
    +  /*!\brief Submit the form.
    +   */
    +  void submit(); 
    +
    +  void createUI();
    + 
    +  WContainerWidget *feedbackMessages_;
    +
    +  WLineEdit *nameEdit_;
    +  WLineEdit *firstNameEdit_;
    +
    +  WComboBox *countryEdit_;
    +  WComboBox *cityEdit_;
    +
    +  WDatePicker *birthDateEdit_;
    +  WLineEdit *childCountEdit_;
    +  WLineEdit *weightEdit_;
    +
    +  WTextArea *remarksEdit_;
    +
    +  /*!\brief Add a validation feedback for a field
    +   */
    +  void addValidationStatus(int row, WFormWidget *field);
    +
    +  /*!\brief Validate the form, and return whether succesfull.
    +   */
    +  bool validate();
    +
    +  /*!\brief Validate a single form field.
    +   *
    +   * Checks the given field, and appends the given text to the error
    +   * messages on problems.
    +   */
    +  bool checkValid(WFormWidget *edit, const WString& text);
    +};
    +
    +/*@}*/
    +
    +#endif // FORM_H_
    diff --git a/wt-3.1.7a/examples/form/FormExample.C b/wt-3.1.7a/examples/form/FormExample.C
    new file mode 100644
    index 0000000..783d486
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/FormExample.C
    @@ -0,0 +1,94 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "FormExample.h"
    +#include "Form.h"
    +
    +#include <Wt/WApplication>
    +#include <Wt/WText>
    +#include <Wt/WStringUtil>
    +
    +FormExample::FormExample(WContainerWidget *parent)
    +  : WContainerWidget(parent)
    +{
    +  WContainerWidget *langLayout = new WContainerWidget(this);
    +  langLayout->setContentAlignment(AlignRight);
    +  new WText(tr("language"), langLayout);
    +
    +  const char *lang[] = { "en", "nl" };
    +
    +  for (int i = 0; i < 2; ++i) {
    +    WText *t = new WText(widen(lang[i]), langLayout);
    +    t->setMargin(5);
    +    t->clicked().connect(this, &FormExample::changeLanguage);
    +
    +    languageSelects_.push_back(t);
    +  }
    +
    +  /*
    +   * Start with the reported locale, if available
    +   */
    +  setLanguage(wApp->locale());
    +
    +  Form *form = new Form(this);
    +  form->setMargin(20);
    +}
    +
    +void FormExample::setLanguage(const std::string lang)
    +{
    +  bool haveLang = false;
    +
    +  for (unsigned i = 0; i < languageSelects_.size(); ++i) {
    +    WText *t = languageSelects_[i];
    +
    +    // prefix match, e.g. en matches en-us.
    +    bool isLang = lang.find(narrow(t->text().value())) == 0;
    +    t->setStyleClass(isLang ? L"langcurrent" : L"lang");
    +
    +    haveLang = haveLang || isLang;
    +  }
    +
    +  if (!haveLang) {
    +    languageSelects_[0]->setStyleClass(L"langcurrent");
    +    WApplication::instance()
    +      ->setLocale(narrow(languageSelects_[0]->text().value()));
    +  } else
    +    WApplication::instance()->setLocale(lang);
    +}
    +
    +void FormExample::changeLanguage()
    +{
    +  WText *t = (WText *)sender();
    +  setLanguage(narrow(t->text().value()));
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->messageResourceBundle().use(WApplication::appRoot() + "form-example");
    +  app->setTitle("Form example");
    +
    +  app->root()->addWidget(new FormExample());
    +
    +  WCssDecorationStyle langStyle;
    +  langStyle.font().setSize(WFont::Smaller);
    +  langStyle.setCursor(PointingHandCursor);
    +  langStyle.setForegroundColor(blue);
    +  langStyle.setTextDecoration(WCssDecorationStyle::Underline);
    +  app->styleSheet().addRule(".lang", langStyle);
    +
    +  langStyle.setCursor(ArrowCursor);
    +  langStyle.font().setWeight(WFont::Bold);
    +  app->styleSheet().addRule(".langcurrent", langStyle);
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/form/FormExample.h b/wt-3.1.7a/examples/form/FormExample.h
    new file mode 100644
    index 0000000..69fa90f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/FormExample.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef FORMEXAMPLE_H_
    +#define FORMEXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WText;
    +}
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup formexample Form example
    + */
    +/*@{*/
    +
    +/*!\brief Main widget for the %Form example.
    + *
    + * This class demonstrates, next instantiating the form itself,
    + * handling of different languages.
    + */
    +class FormExample : public WContainerWidget
    +{
    +public:
    +  /*!\brief Instantiate a new form example.
    +   */
    +  FormExample(WContainerWidget *parent = 0);
    +
    +private:
    +  std::vector<WText *> languageSelects_;
    +
    +  /*!\brief Change the language.
    +   */
    +  void changeLanguage();
    +
    +  void setLanguage(const std::string lang);
    +};
    +
    +/*@}*/
    +
    +#endif // FORMEXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/form/form-example.xml b/wt-3.1.7a/examples/form/form-example.xml
    new file mode 100644
    index 0000000..42face9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/form-example.xml
    @@ -0,0 +1,46 @@
    +<?xml version="1.0" encoding="UTF8"?>
    +<messages>
    +  <message id="language">Language:</message>
    +
    +  <message id="example.form">Form example</message>
    +  <message id="example.name">Last name (*):</message>
    +  <message id="example.firstname">First name:</message>
    +  <message id="example.country">Country (*):</message>
    +  <message id="example.city">City:</message>
    +  <message id="example.birthdate">Birth date (dd/mm/yyyy) (*):</message>
    +  <message id="example.childcount">Number of children:</message>
    +  <message id="example.remarks">Remarks:</message>
    +  <message id="example.choosecountry">(Choose a country first)</message>
    +
    +  <message id="submit">Submit</message>
    +
    +  <message id="error.name">Error: please give a last name.</message>
    +  <message id="error.country">Error: please indicate a country.</message>
    +  <message id="error.birthdate">Error: please indicate a valid birth date.</message>
    +  <message id="error.childcount">Error: number of children must be a number (between 0 and 30)</message>
    +
    +  <message id="quit">Quit</message>
    +
    +  <message id="January">January</message>
    +  <message id="February">February</message>
    +  <message id="March">March</message>
    +  <message id="April">April</message>
    +  <message id="May">May</message>
    +  <message id="June">June</message>
    +  <message id="July">July</message>
    +  <message id="August">August</message>
    +  <message id="September">September</message>
    +  <message id="October">October</message>
    +  <message id="November">November</message>
    +  <message id="December">December</message>
    +
    +  <message id="Mon">Mon</message>
    +  <message id="Tue">Tue</message>
    +  <message id="Wed">Wed</message>
    +  <message id="Thu">Thu</message>
    +  <message id="Fri">Fri</message>
    +  <message id="Sat">Sat</message>
    +  <message id="Sun">Sun</message>
    +
    +  <message id="Close">Close Window</message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/form/form-example_nl.xml b/wt-3.1.7a/examples/form/form-example_nl.xml
    new file mode 100644
    index 0000000..18f4af5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/form/form-example_nl.xml
    @@ -0,0 +1,47 @@
    +<?xml version="1.0" encoding="ISO-8859-1"?>
    +<messages>
    +  <message id="language">Taal:</message>
    +
    +  <message id="example.form">Formulier voorbeeld</message>
    +  <message id="example.name">Naam (*):</message>
    +  <message id="example.firstname">Voornaam:</message>
    +  <message id="example.country">Land (*):</message>
    +  <message id="example.city">Stad:</message>
    +  <message id="example.birthdate">Geb. datum (dd/mm/yyyy) (*):</message>
    +  <message id="example.childcount">Aantal kinderen:</message>
    +  <message id="example.remarks">Opmerkingen:</message>
    +  <message id="example.choosecountry">(Kies eerst een land)</message>
    +
    +  <message id="submit">Verstuur</message>
    +
    +  <message id="error.name">Fout: gelieve een naam te geven.</message>
    +  <message id="error.country">Fout: gelieve uw land op te geven.</message>
    +  <message id="error.birthdate">Fout: gelieve uw geboorte datum op te geven.</message>
    +  <message id="error.childcount">Fout: een geldig aantal kinderen is 0-30.</message>
    +
    +  <message id="quit">Afsluiten</message>
    +
    +  <message id="January">Januari</message>
    +  <message id="February">Februari</message>
    +  <message id="March">Maart</message>
    +  <message id="April">April</message>
    +  <message id="May">Mei</message>
    +  <message id="June">Juni</message>
    +  <message id="July">Juli</message>
    +  <message id="August">Augustus</message>
    +  <message id="September">September</message>
    +  <message id="October">Oktober</message>
    +  <message id="November">November</message>
    +  <message id="December">December</message>
    +
    +  <message id="Mon">Maa</message>
    +  <message id="Tue">Din</message>
    +  <message id="Wed">Woe</message>
    +  <message id="Thu">Don</message>
    +  <message id="Fri">Vri</message>
    +  <message id="Sat">Zat</message>
    +  <message id="Sun">Zon</message>
    +
    +  <message id="Close">Venster Sluiten</message>
    +
    +</messages>
    diff --git a/wt-3.1.7a/examples/form/icons/invalid.png b/wt-3.1.7a/examples/form/icons/invalid.png
    new file mode 100644
    index 0000000..22202b3
    Binary files /dev/null and b/wt-3.1.7a/examples/form/icons/invalid.png differ
    diff --git a/wt-3.1.7a/examples/gitmodel/CMakeLists.txt b/wt-3.1.7a/examples/gitmodel/CMakeLists.txt
    new file mode 100644
    index 0000000..9b124c9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/CMakeLists.txt
    @@ -0,0 +1,28 @@
    +IF(NOT WIN32)
    +
    +IF(BOOST_FS_LIB)
    +  WT_ADD_EXAMPLE(gitview.wt
    +    Git.C
    +    GitModel.C
    +    ../wt-homepage/SourceView.C
    +    GitView.C
    +  )
    +  TARGET_LINK_LIBRARIES(gitview.wt ${BOOST_FS_LIB})
    +
    +  INCLUDE_DIRECTORIES(
    +    ${WT_SOURCE_DIR}/src
    +  )
    +
    +  ADD_DEPENDENCIES(gitview.wt wt ${EXAMPLES_CONNECTOR})
    +
    +ELSE(BOOST_FS_LIB)
    +
    +  MESSAGE(STATUS "** Not building gitmodel example: requires boost_filesystem library.")
    +
    +ENDIF(BOOST_FS_LIB)
    +
    +ELSE(NOT WIN32)
    +
    +  MESSAGE(STATUS "** Not building gitmodel example: uses POSIX calls not available on win32")
    +
    +ENDIF(NOT WIN32)
    diff --git a/wt-3.1.7a/examples/gitmodel/Git.C b/wt-3.1.7a/examples/gitmodel/Git.C
    new file mode 100644
    index 0000000..5e87d21
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/Git.C
    @@ -0,0 +1,329 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Git.h"
    +
    +#include <iostream>
    +#include <vector>
    +#include <stdio.h>
    +
    +#include <boost/algorithm/string/classification.hpp>
    +#include <boost/algorithm/string/predicate.hpp>
    +#include <boost/algorithm/string/split.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +/*
    + * Small utility methods and classes.
    + */
    +namespace {
    +  unsigned char fromHex(char b)
    +  {
    +    if (b <= '9')
    +      return b - '0';
    +    else if (b <= 'F')
    +      return (b - 'A') + 0x0A;
    +    else 
    +      return (b - 'a') + 0x0A;
    +  }
    +
    +  unsigned char fromHex(char msb, char lsb)
    +  {
    +    return (fromHex(msb) << 4) + fromHex(lsb);
    +  }
    +
    +  char toHex(unsigned char b)
    +  {
    +    if (b < 0xA)
    +      return '0' + b;
    +    else
    +      return 'a' + (b - 0xA);
    +  }
    +
    +  void toHex(unsigned char b, char& msb, char& lsb)
    +  {
    +    lsb = toHex(b & 0x0F);
    +    msb = toHex(b >> 4);
    +  }
    +
    +  /*
    +   * Run a command and capture its stdout into a string.
    +   * Uses and maintains a cache.
    +   */
    +  class POpenWrapper
    +  {
    +  public:
    +    POpenWrapper(const std::string& s, Git::Cache& cache) {
    +      bool cached = false;
    +
    +      for (Git::Cache::iterator i = cache.begin(); i != cache.end(); ++i)
    +	if (i->first == s) {
    +	  content_ = i->second;
    +	  status_ = 0;
    +	  cached = true;
    +	  cache.splice(cache.begin(), cache, i); // implement LRU
    +	  break;
    +	}
    +
    +      if (!cached) {
    +	std::cerr << s << std::endl;
    +	FILE *stream = popen((s + "  2>&1").c_str(), "r");
    +	if (!stream)
    +	  throw Git::Exception("Git: could not execute: '" + s + "'");
    +
    +	int n = 0;
    +	do {
    +	  char buffer[32000];
    +	  n = fread(buffer, 1, 30000, stream);
    +	  buffer[n] = 0;
    +	  content_ += std::string(buffer, n);
    +	} while (n);
    +
    +	status_ = pclose(stream);
    +
    +	if (status_ == 0) {
    +	  cache.pop_back(); // implement LRU
    +	  cache.push_front(std::make_pair(s, content_));
    +	}
    +      }
    +
    +      idx_ = 0;
    +    }
    +
    +    std::string& readLine(std::string& r, bool stripWhite = true) {
    +      r.clear();
    +
    +      while (stripWhite
    +	     && (idx_ < content_.length()) && isspace(content_[idx_]))
    +	++idx_;
    +
    +      while (idx_ < content_.size() && content_[idx_] != '\n') {
    +	r += content_[idx_];
    +	++idx_;
    +      }
    +
    +      if (idx_ < content_.size())
    +	++idx_;
    +
    +      return r;
    +    }
    +
    +    const std::string& contents() const {
    +      return content_;
    +    }
    +
    +    bool finished() const {
    +      return idx_ == content_.size();
    +    }
    +
    +    int exitStatus() const {
    +      return status_;
    +    }
    +
    +  private:
    +    std::string content_;
    +    unsigned int idx_;
    +    int status_;
    +  };
    +}
    +
    +/*
    + * About the git files:
    + * type="commit":
    + *  - of a reference, like the SHA1 ID obtained from git-rev-parse of a
    + *    particular revision
    + *  - contains the SHA1 ID of the tree
    + *
    + * type="tree":
    + *  100644 blob 0732f5e4def48d6d5b556fbad005adc994af1e0b    CMakeLists.txt
    + *  040000 tree 037d59672d37e116f6e0013a067a7ce1f8760b7c    Wt
    + *  <mode> SP <type> SP <object> TAB <file>
    + *
    + * type="blob": contents of a file
    + */
    +
    +Git::Exception::Exception(const std::string& msg)
    +  : std::runtime_error(msg)
    +{ }
    +
    +Git::ObjectId::ObjectId()
    +{ }
    +
    +Git::ObjectId::ObjectId(const std::string& id)
    +{
    +  if (id.length() != 40)
    +    throw Git::Exception("Git: not a valid SHA1 id: " + id);
    +
    +  for (int i = 0; i < 20; ++i)
    +    (*this)[i] = fromHex(id[2 * i], id[2 * i + 1]);
    +}
    +
    +std::string Git::ObjectId::toString() const
    +{
    +  std::string result(40, '-');
    +
    +  for (int i = 0; i < 20; ++i)
    +    toHex((*this)[i], result[2 * i], result[2 * i + 1]);
    +
    +  return result;
    +}
    +
    +Git::Object::Object(const ObjectId& anId, ObjectType aType)
    +  : id(anId),
    +    type(aType)
    +{ }
    +
    +Git::Git()
    +  : cache_(3) // cache of 3 git results
    +{ }
    +
    +void Git::setRepositoryPath(const std::string& repositoryPath)
    +{ 
    +  repository_ = repositoryPath;
    +  checkRepository();
    +}
    +
    +Git::ObjectId Git::getCommitTree(const std::string& revision) const
    +{
    +  Git::ObjectId commit = getCommit(revision);
    +  return getTreeFromCommit(commit);
    +}
    +
    +std::string Git::catFile(const ObjectId& id) const
    +{
    +  std::string result;
    +
    +  if (!getCmdResult("cat-file -p " + id.toString(), result, -1))
    +    throw Exception("Git: could not cat '" + id.toString() + "'");
    +
    +  return result;
    +}
    +
    +Git::ObjectId Git::getCommit(const std::string& revision) const
    +{
    +  std::string sha1Commit;
    +  getCmdResult("rev-parse " + revision, sha1Commit, 0);
    +  return ObjectId(sha1Commit);
    +}
    +
    +Git::ObjectId Git::getTreeFromCommit(const ObjectId& commit) const
    +{
    +  std::string treeLine;
    +  if (!getCmdResult("cat-file -p " + commit.toString(), treeLine, "tree"))
    +    throw Exception("Git: could not parse tree from commit '" 
    +		    + commit.toString() + "'");
    +
    +  std::vector<std::string> v;
    +  boost::split(v, treeLine, boost::is_any_of(" "));
    +  if (v.size() != 2)
    +    throw Exception("Git: could not parse tree from commit '"
    +		    + commit.toString() + "': '" + treeLine + "'");
    +  return ObjectId(v[1]);
    +}
    +
    +Git::Object Git::treeGetObject(const ObjectId& tree, int index) const
    +{
    +  std::string objectLine;
    +  if (!getCmdResult("cat-file -p " + tree.toString(), objectLine, index))
    +    throw Exception("Git: could not read object %"
    +		    + boost::lexical_cast<std::string>(index)
    +		    + "  from tree " + tree.toString());
    +  else {
    +    std::vector<std::string> v1, v2;
    +    boost::split(v1, objectLine, boost::is_any_of("\t"));
    +    if (v1.size() != 2)
    +      throw Exception("Git: could not parse tree object line: '"
    +		      + objectLine + "'");
    +    boost::split(v2, v1[0], boost::is_any_of(" "));
    +    if (v2.size() != 3)
    +      throw Exception("Git: could not parse tree object line: '"
    +		      + objectLine + "'");
    + 
    +    const std::string& stype = v2[1];
    +    ObjectType type;
    +    if (stype == "tree")
    +      type = Tree;
    +    else if (stype == "blob")
    +      type = Blob;
    +    else
    +      throw Exception("Git: Unknown type: " + stype);
    +
    +    Git::Object result(ObjectId(v2[2]), type);
    +    result.name = v1[1];
    +
    +    return result;
    +  }
    +}
    +
    +int Git::treeSize(const ObjectId& tree) const
    +{
    +  return getCmdResultLineCount("cat-file -p " + tree.toString());
    +}
    +
    +bool Git::getCmdResult(const std::string& gitCmd, std::string& result,
    +		       int index) const
    +{
    +  POpenWrapper p("git --git-dir=" + repository_ + " " + gitCmd, cache_);
    +
    +  if (p.exitStatus() != 0)
    +    throw Exception("Git error: " + p.readLine(result));
    +
    +  if (index == -1) {
    +    result = p.contents();
    +    return true;
    +  } else
    +    p.readLine(result);
    +
    +  for (int i = 0; i < index; ++i) {
    +    if (p.finished())
    +      return false;
    +    p.readLine(result);
    +  }
    +
    +  return true;
    +}
    +
    +bool Git::getCmdResult(const std::string& gitCmd, std::string& result,
    +		       const std::string& tag) const
    +{
    +  POpenWrapper p("git --git-dir=" + repository_ + " " + gitCmd, cache_);
    +
    +  if (p.exitStatus() != 0)
    +    throw Exception("Git error: " + p.readLine(result));
    +
    +  while (!p.finished()) {
    +    p.readLine(result);
    +    if (boost::starts_with(result, tag))
    +      return true;
    +  }
    +
    +  return false;
    +}
    +
    +int Git::getCmdResultLineCount(const std::string& gitCmd) const
    +{
    +  POpenWrapper p("git --git-dir=" + repository_ + " " + gitCmd, cache_);
    +
    +  std::string r;
    +
    +  if (p.exitStatus() != 0)
    +    throw Exception("Git error: " + p.readLine(r));
    +
    +  int result = 0;
    +  while (!p.finished()) {
    +    p.readLine(r);
    +    ++result;
    +  }
    +
    +  return result;
    +}
    +
    +void Git::checkRepository() const
    +{
    +  POpenWrapper p("git --git-dir=" + repository_ + " branch", cache_);
    +
    +  std::string r;
    +  if (p.exitStatus() != 0)
    +    throw Exception("Git error: " + p.readLine(r));
    +}
    diff --git a/wt-3.1.7a/examples/gitmodel/Git.h b/wt-3.1.7a/examples/gitmodel/Git.h
    new file mode 100644
    index 0000000..4f6d89a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/Git.h
    @@ -0,0 +1,167 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef GIT_H_
    +#define GIT_H_
    +
    +#include <stdexcept>
    +#include <list>
    +#include <boost/array.hpp>
    +
    +/**
    + * @addtogroup gitmodelexample
    + */
    +/*@{*/
    +
    +/*! \brief %Git utility class for browsing git archives.
    + *
    + * Far from complete! Only browses git revisions.
    + */
    +class Git {
    +public:
    +  /*! \brief %Exception class.
    +   */
    +  class Exception : public std::runtime_error {
    +  public:
    +    /*! \brief Constructor.
    +     */
    +    Exception(const std::string& msg);
    +  };
    +
    +  /*! \brief %Git object Id.
    +   *
    +   * Class for compactly storing a 20-byte SHA1 digest.
    +   */
    +  class ObjectId : public boost::array<unsigned char, 20> {
    +  public:
    +    /*! \brief Default constructor.
    +     */
    +    ObjectId();
    +
    +    /*! \brief Construct from a 40-digit hexadecimal number.
    +     *
    +     * \throws Exception : if the <i>id</i> does not represent a valid SHA1
    +     *         digest.
    +     */
    +    explicit ObjectId(const std::string& id);
    +
    +    /*! \brief Print as a 40-digit hexadecimal number.
    +     */
    +    std::string toString() const;
    +  };
    +
    +  /*! \brief %Git object type.
    +   */
    +  enum ObjectType { Tree, Commit, Blob };
    +
    +  /*! \brief %Git object.
    +   */
    +  struct Object {
    +    ObjectId    id;
    +    ObjectType  type;
    +    std::string name;
    +
    +    Object(const ObjectId& id, ObjectType type);
    +  };
    +
    +  /*! \brief Constructor.
    +   */
    +  Git();
    +
    +  /*! \brief Set the git repository path.
    +   *
    +   * \throws Exception : if the path does not specify a valid repository.
    +   */
    +  void setRepositoryPath(const std::string& repository);
    +
    +  /*! \brief Get the tree for a particular revision
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  ObjectId getCommitTree(const std::string& revision) const;
    +
    +  /*! \brief Get the commit for a particular revision
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  ObjectId getCommit(const std::string& revision) const;
    +
    +  /*! \brief Get the tree for a particular commit
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  ObjectId getTreeFromCommit(const ObjectId& commit) const;
    +
    +  /*! \brief Get some info on a tree object.
    +   *
    +   * The object is specified based on its index in the parent tree
    +   * object.
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  Object   treeGetObject(const ObjectId& tree, int index) const;
    +
    +  /*! \brief Return the number of objects inside a tree object.
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  int      treeSize(const ObjectId& tree) const;
    +
    +  /*! \brief Return the raw contents of a git object.
    +   *
    +   * \throws Exception : in case of a git error.
    +   */
    +  std::string catFile(const ObjectId& id) const;
    +
    +  typedef std::list<std::pair<std::string, std::string> > Cache;
    +
    +private:
    +  /*! \brief The path to the repository.
    +   */
    +  std::string repository_;
    +
    +  /*! \brief A small LRU cache that stores results of git commands.
    +   */
    +  mutable Cache cache_;
    +
    +  /*! \brief Checks the repository
    +   *
    +   * \throws Exception : in case the repository is not a valid.
    +   */
    +  void checkRepository() const;
    +
    +  /*! \brief Returns a line identified by a tag from the output of a git
    +   *         command.
    +   *
    +   * The line is filled in <i>result</i>.
    +   * Returns whether a line starting with <i>tag</i> could be found.
    +   *
    +   * \throws Exception : in case the command failed
    +   */
    +  bool getCmdResult(const std::string& cmd, std::string& result,
    +		    const std::string& tag) const;
    +
    +  /*! \brief Returns the <i>i</i>th line from the output of a git command.
    +   *
    +   * The line is filled in <i>result</i>.
    +   * Returns the whole git output if <i>index</i> = -1, otherwise the line
    +   * with line number <i>index</i>.
    +   *
    +   * \throws Exception : in case the command failed
    +   */
    +  bool getCmdResult(const std::string& cmd, std::string& result,
    +		    int index) const;
    +
    +  /*! \brief Returns the number of lines in the output of a git command.
    +   *
    +   * \throws Exception : in case the command failed
    +   */
    +  int getCmdResultLineCount(const std::string& cmd) const;
    +};
    +
    +/*@}*/
    +
    +#endif // GIT_H_
    diff --git a/wt-3.1.7a/examples/gitmodel/GitModel.C b/wt-3.1.7a/examples/gitmodel/GitModel.C
    new file mode 100644
    index 0000000..219cbb5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/GitModel.C
    @@ -0,0 +1,182 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "GitModel.h"
    +
    +using namespace Wt;
    +
    +GitModel::GitModel(WObject *parent)
    +  : WAbstractItemModel(parent)
    +{ }
    +
    +void GitModel::setRepositoryPath(const std::string& gitRepositoryPath)
    +{
    +  git_.setRepositoryPath(gitRepositoryPath);
    +  loadRevision("master");
    +}
    +
    +void GitModel::loadRevision(const std::string& revName)
    +{
    +  Git::ObjectId treeRoot = git_.getCommitTree(revName);
    +
    +  // You need to call this method before invalidating all existing
    +  // model indexes. Anyone listening for this event could temporarily
    +  // convert some model indexes to a raw index pointer, but this model
    +  // does not reimplement these methods.
    +  layoutAboutToBeChanged().emit();
    +
    +  treeData_.clear();
    +  childPointer_.clear();
    +
    +  // Store the tree root as treeData_[0]
    +  treeData_.push_back(Tree(-1, -1, treeRoot, git_.treeSize(treeRoot)));
    +
    +  layoutChanged().emit();
    +}
    +
    +WModelIndex GitModel::parent(const WModelIndex& index) const
    +{
    +  // treeData_[0] indicates the top-level parent.
    +  if (!index.isValid() || index.internalId() == 0)
    +    return WModelIndex();
    +  else {
    +    // get the item that corresponds to the parent ...
    +    const Tree& item = treeData_[index.internalId()];
    +
    +    // ... and construct that identifies the parent:
    +    //   row = child index in the grand parent
    +    //   internalId = id of the grand parent
    +    return createIndex(item.index(), 0, item.parentId()); 
    +  }
    +}
    +
    +WModelIndex GitModel::index(int row, int column,
    +			    const WModelIndex& parent) const
    +{
    +  int parentId;
    +
    +  // the top-level parent has id=0.
    +  if (!parent.isValid())
    +    parentId = 0;
    +  else {
    +    // the internal id of the parent identifies the grand parent
    +    int grandParentId = parent.internalId();
    +
    +    // lookup the parent id for the parent himself, based on grand parent
    +    // and child-index (=row) within the grand parent
    +    parentId = getTreeId(grandParentId, parent.row());
    +  }
    +
    +  return createIndex(row, column, parentId);
    +}
    +
    +int GitModel::getTreeId(int parentId, int childIndex) const
    +{
    +  ChildIndex index(parentId, childIndex);
    +
    +  ChildPointerMap::const_iterator i = childPointer_.find(index);
    +  if (i == childPointer_.end()) {
    +    // no tree object was already allocated, so do that now.
    +
    +    // lookup the git SHA1 object Id (within the parent)
    +    const Tree& parentItem = treeData_[parentId];
    +    Git::Object o = git_.treeGetObject(parentItem.treeObject(), childIndex);
    +
    +    // and add to treeData_ and childPointer_ data structures
    +    treeData_.push_back(Tree(parentId, childIndex, o.id, git_.treeSize(o.id)));
    +    int result = treeData_.size() - 1;
    +    childPointer_[index] = result;
    +    return result;
    +  } else
    +    return i->second;
    +}
    +
    +int GitModel::columnCount(const WModelIndex& index) const
    +{
    +  // currently only one column
    +  return 1;
    +}
    +
    +int GitModel::rowCount(const WModelIndex& index) const
    +{
    +  // we are looking for the git SHA1 id of a tree object (since only folders
    +  // may contain children).
    +  Git::ObjectId objectId;
    +  int treeId;
    +
    +  if (index.isValid()) {
    +    // only column 0 items may contain children
    +    if (index.column() != 0)
    +      return 0;
    +
    +    Git::Object o = getObject(index);
    +    if (o.type == Git::Tree) {
    +      objectId = o.id;
    +      treeId = getTreeId(index.internalId(), index.row());
    +    } else
    +      // not a folder: no children
    +      return 0;
    +  } else {
    +    treeId = 0;
    +    // the index corresponds to the root object
    +    if (treeData_.empty())
    +      // model not yet loaded !
    +      return 0;
    +    else
    +      objectId = treeData_[0].treeObject();
    +  }
    +
    +  return treeData_[treeId].rowCount();
    +}
    +
    +boost::any GitModel::data(const WModelIndex& index, int role) const
    +{
    +  if (!index.isValid())
    +    return boost::any();
    +
    +  /* Only 3 data roles on column 0 data are supported:
    +   * - DisplayRole: the file name
    +   * - DecorationRole: an icon (folder or file)
    +   * - ContentsRole: the file contents
    +   */
    +  if (index.column() == 0) {
    +    Git::Object object = getObject(index);
    +    if (role == DisplayRole) {
    +      if (object.type == Git::Tree)
    +	return object.name + '/';
    +      else
    +	return object.name;
    +    } else if (role == DecorationRole) {
    +      if (object.type == Git::Blob)
    +	return "icons/git-blob.png";
    +      else if (object.type == Git::Tree)
    +	return "icons/git-tree.png";
    +    } else if (role == ContentsRole) {
    +      if (object.type == Git::Blob)
    +	return git_.catFile(object.id);
    +    } else if (role == FilePathRole) {
    +      return boost::any();
    +    }
    +  }
    +
    +  return boost::any();
    +}
    +
    +boost::any GitModel::headerData(int section, Orientation orientation,
    +				int role) const
    +{
    +  if (orientation == Horizontal && role == DisplayRole)
    +    return "File";
    +  else
    +    return boost::any();
    +}
    +
    +Git::Object GitModel::getObject(const WModelIndex& index) const
    +{
    +  int parentId = index.internalId();
    +  const Tree& parentItem = treeData_[parentId];
    +  return git_.treeGetObject(parentItem.treeObject(), index.row());
    +}
    diff --git a/wt-3.1.7a/examples/gitmodel/GitModel.h b/wt-3.1.7a/examples/gitmodel/GitModel.h
    new file mode 100644
    index 0000000..d6ce052
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/GitModel.h
    @@ -0,0 +1,209 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef GIT_MODEL_H_
    +#define GIT_MODEL_H_
    +
    +#include <Wt/WAbstractItemModel>
    +
    +#include "Git.h"
    +
    +/**
    + * @addtogroup gitmodelexample
    + */
    +/*@{*/
    +
    +/*! \class GitModel
    + *  \brief A model that retrieves revision trees from a git repository.
    + *
    + * In its present form, it presents only a single column of data: the
    + * file names. Additional data could be easily added. Git "tree" objects
    + * correspond to folders, and "blob" objects to files.
    + *
    + * The model is read-only, does not support sorting (that could be
    + * provided by using a WSortFilterProxyModel).
    + *
    + * The model loads only minimal information in memory: to create model indexes
    + * for folders. These cannot be uniquely identified by their SHA1 id, since
    + * two identical folders at different locations would have the same SHA1 id.
    + *
    + * The internal id of model indexes created by the model uniquely identify
    + * a containing folder for a particular file.
    + */
    +class GitModel : public Wt::WAbstractItemModel
    +{
    +public:
    +  /*! \brief The role which may be used on a file to retrieve its contents.
    +   */
    +  static const int ContentsRole = Wt::UserRole;
    +  static const int FilePathRole = Wt::UserRole + 1;
    +
    +  /*! \brief Constructor.
    +   */
    +  GitModel(Wt::WObject *parent = 0);
    +
    +  /*! \brief Set the repository and load its 'master' revision.
    +   */
    +  void setRepositoryPath(const std::string& repositoryPath);
    +
    +  /*! \brief Load a particular revision.
    +   *
    +   * The revision name may be any revision accepted by git, by
    +   * git-rev-parse(1).
    +   */
    +  void loadRevision(const std::string& revName);
    +
    +  /*! \brief Returns the parent index.
    +   *
    +   * Consults the internal data structure to find the parent index.
    +   */
    +  virtual Wt::WModelIndex parent(const Wt::WModelIndex& index) const;
    +
    +  /*! \brief Returns the column count.
    +   *
    +   * Returns 1.
    +   */
    +  virtual int columnCount(const Wt::WModelIndex& parent = Wt::WModelIndex())
    +    const;
    +
    +  /*! \brief Returns the row count.
    +   *
    +   * Returns 0 unless the item represents a folder, in which case it returns
    +   * the number of items in the tree object that corresponds to the folder.
    +   */
    +  virtual int rowCount(const Wt::WModelIndex& parent = Wt::WModelIndex()) const;
    +
    +  /*! \brief Returns a child index.
    +   *
    +   * Consults the internal data structure to create a child index. If
    +   * necessary, the internal data structure is expanded by adding an
    +   * entry for using the <i>parent</i> index as a parent index.
    +   */
    +  virtual Wt::WModelIndex
    +  index(int row, int column, const Wt::WModelIndex& parent = Wt::WModelIndex())
    +    const;
    +
    +  /*! \brief Returns data.
    +   *
    +   * Returns only data corresponding to DisplayRole and ContentsRole.
    +   */
    +  virtual boost::any
    +  data(const Wt::WModelIndex& index, int role = Wt::DisplayRole) const;
    +  
    +  /*! \brief Returns header data.
    +   */
    +  virtual boost::any
    +  headerData(int section, Wt::Orientation orientation = Wt::Horizontal,
    +	     int role = Wt::DisplayRole) const;
    +
    +  using WAbstractItemModel::data;
    +
    +private:
    +  /*! \brief The git repository. */
    +  Git git_;
    +
    +  /*! \class ChildIndex
    +   *  \brief Index usable as a key to a map, that identifies a child/row
    +   *         within a tree.
    +   */
    +  struct ChildIndex {
    +    int parentId;
    +    int index;
    +
    +    ChildIndex(int aParent, int anIndex)
    +      : parentId(aParent), index(anIndex) { }
    +
    +    bool operator< (const ChildIndex& other) const {
    +      if (parentId < other.parentId)
    +	return true;
    +      else if (parentId > other.parentId)
    +	return false;
    +      else return index < other.index;
    +    }
    +  };
    +
    +  /*! \class Tree
    +   *  \brief Used to uniquely locate a folder within the folder hierarchy.
    +   */
    +  class Tree {
    +  public:
    +    /*! \brief Constructor.
    +     */
    +    Tree(int parentId, int index, const Git::ObjectId& object,
    +	 int rowCount)
    +      : index_(parentId, index),
    +	treeObject_(object),
    +	rowCount_(rowCount)
    +    { }
    +
    +    /*! \brief Returns the parent id.
    +     *
    +     * Index of the parent folder within the treeData_ vector.
    +     */
    +    int parentId() const { return index_.parentId; }
    +
    +    /*! \brief Returns the child index within the parent folder.
    +     *
    +     * Index of this folder within the file list of the parent folder.
    +     */
    +    int index() const { return index_.index; }
    +
    +    /*! \brief Returns the SHA1 id for the git tree object.
    +     */
    +    const Git::ObjectId& treeObject() const { return treeObject_; }
    +
    +    /*! \brief Returns the (cached) row count.
    +     */
    +    int rowCount() const { return rowCount_; }
    +
    +  private:
    +    ChildIndex    index_;
    +    Git::ObjectId treeObject_;
    +    int           rowCount_;
    +  };
    +
    +  typedef std::map<ChildIndex, int> ChildPointerMap;
    +
    +  /*! \brief List of folder objects.
    +   *
    +   * This list contains folders for which a model index has been allocated.
    +   *
    +   * Model indexes have an internal id that are indexes into this vector,
    +   * identifying the folder that contains a particular file.
    +   *
    +   * Note: only for folders this is needed, since files will never be used
    +   * as a 'parent' index.
    +   *
    +   * It is populated on-the-fly, as the user navigates the model.
    +   */
    +  mutable std::vector<Tree> treeData_;
    +
    +  /*! \brief Maps child indexes to tree indexes.
    +   *
    +   * This map provides a way to lookup data in treeData_. It has an entry
    +   * corresponding to every entry in treeData_: it maps child indexes for
    +   * folders to indexes in the treeData_ vector.
    +   *
    +   * It is populated on-the-fly, as the user navigates the model.
    +   */
    +  mutable ChildPointerMap   childPointer_;
    +
    +  /*! \brief Get or allocate an id for a folder.
    +   *
    +   * The folder is identified by a given childIndex within a parent
    +   * folder. This method adds data to the treeData_ (and
    +   * childPointer_) data structures.
    +   */
    +  int getTreeId(int parentId, int childIndex) const;
    +
    +  /*! \brief Get the Git::Object that corresponds to an index.
    +   */
    +  Git::Object getObject(const Wt::WModelIndex& index) const;
    +};
    +
    +/*@}*/
    +
    +#endif // GIT_MODEL_H_
    diff --git a/wt-3.1.7a/examples/gitmodel/GitView.C b/wt-3.1.7a/examples/gitmodel/GitView.C
    new file mode 100644
    index 0000000..6dc0236
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/GitView.C
    @@ -0,0 +1,166 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +#include <stdlib.h>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLineEdit>
    +#include <Wt/WGridLayout>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WPushButton>
    +#include <Wt/WTable>
    +#include <Wt/WText>
    +#include <Wt/WTreeView>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WViewWidget>
    +
    +#include "GitModel.h"
    +#include "../wt-homepage/SourceView.h"
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup gitmodelexample Git model example
    + */
    +/*@{*/
    +
    +/*! \class GitViewApplication
    + *  \brief A simple application to navigate a git repository.
    + *
    + * This examples demonstrates how to use the custom model use GitModel
    + * with a WTreeView.
    + */
    +class GitViewApplication : public WApplication
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  GitViewApplication(const WEnvironment& env) 
    +    : WApplication(env)
    +  {
    +    useStyleSheet("gitview.css");
    +    setTitle("Git model example");
    +
    +    const char *gitRepo = getenv("GITVIEW_REPOSITORY_PATH");
    +
    +    WGridLayout *grid = new WGridLayout();
    +    grid->addWidget(new WText("Git repository path:"), 0, 0);
    +    grid->addWidget(repositoryEdit_ = new WLineEdit(gitRepo ? gitRepo : "")
    +		    , 0, 1, AlignLeft);
    +    grid->addWidget(repositoryError_ = new WText(), 0, 2);
    +    grid->addWidget(new WText("Revision:"), 1, 0);
    +    grid->addWidget(revisionEdit_ = new WLineEdit("master"), 1, 1, AlignLeft);
    +    grid->addWidget(revisionError_ = new WText(), 1, 2);
    +
    +    repositoryEdit_->setTextSize(30);
    +    revisionEdit_->setTextSize(20);
    +    repositoryError_->setStyleClass("error-msg");
    +    revisionError_->setStyleClass("error-msg");
    +
    +    repositoryEdit_->enterPressed()
    +      .connect(this, &GitViewApplication::loadGitModel);
    +    revisionEdit_->enterPressed()
    +      .connect(this, &GitViewApplication::loadGitModel);
    +
    +    WPushButton *b = new WPushButton("Load");
    +    b->clicked().connect(this, &GitViewApplication::loadGitModel);
    +    grid->addWidget(b, 2, 0, AlignLeft);
    +
    +    gitView_ = new WTreeView();
    +    gitView_->resize(300, WLength::Auto);
    +    gitView_->setSortingEnabled(false);
    +    gitView_->setModel(gitModel_ = new GitModel(this));
    +    gitView_->setSelectionMode(SingleSelection);
    +    gitView_->selectionChanged().connect(this, &GitViewApplication::showFile);
    +
    +    sourceView_ = new SourceView(DisplayRole, 
    +				 GitModel::ContentsRole, 
    +				 GitModel::FilePathRole);
    +    sourceView_->setStyleClass("source-view");
    +
    +    if (environment().javaScript()) {
    +      /*
    +       * We have JavaScript: We can use layout managers so everything will
    +       * always fit nicely in the window.
    +       */
    +      WVBoxLayout *topLayout = new WVBoxLayout();
    +      topLayout->addLayout(grid, 0, AlignTop | AlignLeft);
    +
    +      WHBoxLayout *gitLayout = new WHBoxLayout();
    +      gitLayout->setLayoutHint("table-layout", "fixed");
    +      gitLayout->addWidget(gitView_, 0);
    +      gitLayout->addWidget(sourceView_, 1);
    +      topLayout->addLayout(gitLayout, 1);
    +
    +      root()->setLayout(topLayout);
    +      root()->setStyleClass("maindiv");
    +    } else {
    +      /*
    +       * No JavaScript: let's make the best of the situation using regular
    +       * CSS-based layout
    +       */
    +      root()->setStyleClass("maindiv");
    +      WContainerWidget *top = new WContainerWidget();
    +      top->setLayout(grid, AlignTop | AlignLeft);
    +      root()->addWidget(top);
    +      root()->addWidget(gitView_);
    +      gitView_->setFloatSide(Left);
    +      gitView_->setMargin(6);
    +      root()->addWidget(sourceView_);
    +      sourceView_->setMargin(6);
    +    }
    +  }
    +
    +private:
    +  WLineEdit  *repositoryEdit_, *revisionEdit_;
    +  WText      *repositoryError_, *revisionError_;
    +  GitModel   *gitModel_;
    +  WTreeView  *gitView_;
    +  SourceView *sourceView_;
    +
    +  /*! \brief Change repository and/or revision
    +   */
    +  void loadGitModel() {
    +    sourceView_->setIndex(WModelIndex());
    +    repositoryError_->setText("");
    +    revisionError_->setText("");
    +    try {
    +      gitModel_->setRepositoryPath(repositoryEdit_->text().toUTF8());
    +      try {
    +	gitModel_->loadRevision(revisionEdit_->text().toUTF8());
    +      } catch (const Git::Exception& e) {
    +	revisionError_->setText(e.what());
    +      }
    +    } catch (const Git::Exception& e) {
    +      repositoryError_->setText(e.what());
    +    }
    +  }
    +
    +  /*! \brief Displayed the currently selected file.
    +   */
    +  void showFile() {
    +    if (gitView_->selectedIndexes().empty())
    +      return;
    +
    +    WModelIndex selected = *gitView_->selectedIndexes().begin();
    +    sourceView_->setIndex(selected);
    +  }
    +};
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new GitViewApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    +/*@}*/
    diff --git a/wt-3.1.7a/examples/gitmodel/gitview.css b/wt-3.1.7a/examples/gitmodel/gitview.css
    new file mode 100644
    index 0000000..cfa8292
    --- /dev/null
    +++ b/wt-3.1.7a/examples/gitmodel/gitview.css
    @@ -0,0 +1,46 @@
    +body {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 14px;
    +}
    +
    +.maindiv {
    +    background-color: #e0ecff
    +}
    +
    +.Wt-treeview {
    +    background-color: white;
    +    border: 1px solid #C3D9FF;
    +}
    +
    +.config {
    +    background-color: white;
    +    border: 1px solid #C3D9FF;
    +    font-size: 80%;
    +}
    +
    +.source-view {
    +    background-color: white;
    +    overflow: auto;
    +    white-space: pre;
    +    font-family: 'Bitstream Vera Sans Mono','Courier',monospace;
    +    font-size: 85%;
    +    color: #444444;
    +    border: 1px solid #C3D9FF;
    +    zoom: 1;
    +}
    +
    +.source-view div {
    +    padding: 6px;
    +    line-height: 1.3;
    +    zoom: 1;
    +    font-family: Verdana, Helvetica, sans-serif;
    +    font-size: 9pt;
    + }
    +
    +.error-msg {
    +    color: #ee1111;
    +}
    +
    +.line-edit {
    +    width: 200px;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/gitmodel/icons/git-blob.png b/wt-3.1.7a/examples/gitmodel/icons/git-blob.png
    new file mode 100644
    index 0000000..208908a
    Binary files /dev/null and b/wt-3.1.7a/examples/gitmodel/icons/git-blob.png differ
    diff --git a/wt-3.1.7a/examples/gitmodel/icons/git-tree.png b/wt-3.1.7a/examples/gitmodel/icons/git-tree.png
    new file mode 100644
    index 0000000..97ce9f8
    Binary files /dev/null and b/wt-3.1.7a/examples/gitmodel/icons/git-tree.png differ
    diff --git a/wt-3.1.7a/examples/hangman/.htaccess b/wt-3.1.7a/examples/hangman/.htaccess
    new file mode 100644
    index 0000000..cbd9128
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/.htaccess
    @@ -0,0 +1,16 @@
    +<Files .htaccess>
    +order allow,deny
    +deny from all
    +</Files>
    +<Files dict.txt>
    +order allow,deny
    +deny from all
    +</Files>
    +<Files dict-nl.txt>
    +order allow,deny
    +deny from all
    +</Files>
    +<Files HangmanDb.info>
    +order allow,deny
    +deny from all
    +</Files>
    diff --git a/wt-3.1.7a/examples/hangman/CMakeLists.txt b/wt-3.1.7a/examples/hangman/CMakeLists.txt
    new file mode 100644
    index 0000000..8b0f816
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/CMakeLists.txt
    @@ -0,0 +1,30 @@
    +IF(NOT MYSQLPP_FOUND)
    +
    +  MESSAGE(STATUS "** Not building hangman example: requires mysql++")
    +  MESSAGE(STATUS "   Indicate the path of your mysql++-2.x installation using -DMYSQL_PREFIX=...")
    +
    +ELSE(NOT MYSQLPP_FOUND)
    +
    +  WT_ADD_EXAMPLE(hangman.wt
    +    hangman.C
    +    HangmanGame.C
    +    HangmanWidget.C
    +    HighScoresWidget.C
    +    LoginWidget.C
    +    Dictionary.C
    +    HangmanDb.C
    +  )
    +  TARGET_LINK_LIBRARIES(hangman.wt ${MYSQLPP_LIBRARIES})
    +
    +  INCLUDE_DIRECTORIES(
    +    ${WT_SOURCE_DIR}/src
    +    ${MYSQLPP_INCLUDE_DIRS}
    +  )
    +
    +  # Static linkage of mysqlpp, hence we don't want __declspecs
    +  ADD_DEFINITIONS(${MYSQLPP_DEFINITIONS})
    +
    +  ADD_DEPENDENCIES(hangman.wt wt ${EXAMPLES_CONNECTOR})
    +  
    +ENDIF(NOT MYSQLPP_FOUND)
    +
    diff --git a/wt-3.1.7a/examples/hangman/Dictionary.C b/wt-3.1.7a/examples/hangman/Dictionary.C
    new file mode 100644
    index 0000000..d7ea881
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/Dictionary.C
    @@ -0,0 +1,47 @@
    +/* this is a -*-C++-*- file
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WStringUtil>
    +
    +#include "Dictionary.h"
    +#include <fstream>
    +#include <iostream>
    +#include <time.h>
    +#include <stdlib.h>
    +
    +std::wstring RandomWord(Dictionary dictionary)
    +{
    +   std::ifstream dict;
    +   if (dictionary == DICT_NL) {
    +     dict.open((Wt::WApplication::appRoot() + "dict-nl.txt").c_str());
    +   } else { // english is default
    +     dict.open((Wt::WApplication::appRoot() + "dict.txt").c_str());
    +   }
    +      
    +   std::string retval;
    +   int numwords = 0;
    +   while(dict) {
    +      getline(dict, retval);
    +      numwords++;
    +   }
    +   dict.clear();
    +   dict.seekg(0);
    +
    +   srand(time(0));
    +   int selection = rand() % numwords; // not entirely uniform, but who cares?
    +
    +   while(selection--) {
    +      getline(dict, retval);
    +   }
    +   getline(dict, retval);
    +   for(unsigned int i = 0; i < retval.size(); ++i)
    +      if(retval[i] < 'A' || retval[i] > 'Z')
    +	 std::cout << "word " << retval << " contains illegal data at pos " << i << std::endl;
    +
    +   return Wt::widen(retval);
    +}
    +
    diff --git a/wt-3.1.7a/examples/hangman/Dictionary.h b/wt-3.1.7a/examples/hangman/Dictionary.h
    new file mode 100644
    index 0000000..97dd01f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/Dictionary.h
    @@ -0,0 +1,19 @@
    +/* this is a -*-C++-*- file
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef DICTIONARY_H_
    +#define DICTIONARY_H_
    +
    +#include <string>
    +
    +enum Dictionary {
    +  DICT_EN = 0,
    +  DICT_NL = 1
    +};
    +
    +extern std::wstring RandomWord(Dictionary dictionary);
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/hangman/HangmanDb.C b/wt-3.1.7a/examples/hangman/HangmanDb.C
    new file mode 100644
    index 0000000..f3eb160
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanDb.C
    @@ -0,0 +1,142 @@
    +#include <iostream>
    +#include <iomanip>
    +#include <string>
    +#include <fstream>
    +
    +#include <mysql++/mysql++.h>
    +#include <Wt/WStringUtil>
    +
    +#include <Wt/WApplication>
    +#include "HangmanDb.h"
    +
    +using namespace mysqlpp;
    +
    +std::string HangmanDb::DbUser()
    +{
    +	std::string retval;
    +	std::ifstream dbconf((Wt::WApplication::appRoot()
    +			      + "HangmanDb.info").c_str());
    +	dbconf >> retval;
    +	return retval;
    +}
    +
    +std::string HangmanDb::DbPass()
    +{
    +	std::string retval;
    +	std::ifstream dbconf((Wt::WApplication::appRoot()
    +			      + "HangmanDb.info").c_str());
    +	dbconf >> retval; // username
    +	dbconf >> retval; // password
    +	return retval;
    +}
    +
    +// this function returns false if user existed, true if user inserted
    +// It guarantees atomic userExists() checking and adding it if the user
    +// did not yet exits.
    +bool HangmanDb::addUser(const std::wstring &user, const std::wstring &password)
    +{
    +   try {
    +      Connection con("hangman", "localhost", DbUser().c_str(), DbPass().c_str());
    +      Query q = con.query();
    +      q << "insert into users "
    +	<< "set user='" << Wt::toUTF8(user) << "', pass=MD5('"
    +	<< Wt::toUTF8(password) << "'), numgames=0, score=0, lastseen=now()";
    +      q.store();
    +      return true;
    +   } catch(Exception &e) {
    +      std::cerr << "Database exception!\n";
    +      std::cerr << e.what() << std::endl;
    +      return false;
    +   }
    +}
    +
    +bool HangmanDb::validLogin(const std::wstring &user, const std::wstring &pass)
    +{
    +   try {
    +      Connection con("hangman", "localhost", DbUser().c_str(), DbPass().c_str());
    +      Query q = con.query();
    +      q << "select user,pass from users where "
    +	<< "user='" << Wt::toUTF8(user)
    +	<< "' and pass=MD5('" << Wt::toUTF8(pass) << "')";
    +      StoreQueryResult res = q.store();
    +      return res.size() > 0;
    +   } catch(Exception &e) {
    +      std::cerr << "Database exception!\n";
    +      std::cerr << e.what() << std::endl;
    +      return false;
    +   }
    +}
    +
    +void HangmanDb::addToScore(const std::wstring &user, int delta)
    +{
    +   try {
    +      Connection con("hangman", "localhost", DbUser().c_str(), DbPass().c_str());
    +      Query q = con.query();
    +      q << "update users set score=(score+" << delta << "), "
    +	<< "numgames=(numgames+1), lastseen=now() "
    +	<< "where user='" << Wt::toUTF8(user) << "'";
    +      StoreQueryResult res = q.store();
    +   } catch(Exception &e) {
    +      std::cerr << "Database exception!\n";
    +      std::cerr << e.what() << std::endl;
    +   }
    +}
    +
    +std::vector<HangmanDb::Score> HangmanDb::getHighScores(int top)
    +{
    +   std::vector<HangmanDb::Score> retval;
    +   try {
    +      Connection con("hangman", "localhost", DbUser().c_str(), DbPass().c_str());
    +      Query q = con.query();
    +      q << "select user, numgames, score, lastseen from users "
    +	<< "order by score desc "
    +	<< "limit " << top;
    +      StoreQueryResult res = q.store();
    +
    +      for(unsigned int i = 0; i < res.size(); ++i) {
    +	 struct Score s;
    +	 s.number = i + 1;
    +	 s.user = Wt::fromUTF8((std::string)res.at(i)["user"]);
    +	 s.numgames = res.at(i)["numgames"];
    +	 s.score = res.at(i)["score"];
    +	 s.lastseen = Wt::fromUTF8((std::string)res.at(i)["lastseen"]);
    +	 retval.push_back(s);
    +      }
    +   } catch(Exception &e) {
    +      std::cerr << "Database exception!\n";
    +      std::cerr << e.what() << std::endl;
    +   }
    +   return retval;
    +}
    +
    +HangmanDb::Score HangmanDb::getUserPosition(const std::wstring &user)
    +{
    +   try {
    +      Connection con("hangman", "localhost", DbUser().c_str(), DbPass().c_str());
    +      Query q = con.query();
    +      q << "select user, numgames, score, lastseen from users "
    +	<< "order by score desc";
    +      StoreQueryResult res = q.store();
    +
    +      // There MUST be a better way to do this...
    +      for(unsigned int i = 0; i < res.size(); ++i) {
    +	 if(Wt::fromUTF8((std::string)res.at(i)["user"]) == user) {
    +	    struct Score s;
    +	    s.number = i + 1;
    +	    s.user = Wt::fromUTF8((std::string)res.at(i)["user"]);
    +	    s.numgames = res.at(i)["numgames"];
    +	    s.score = res.at(i)["score"];
    +	    s.lastseen = Wt::fromUTF8((std::string)res.at(i)["lastseen"]);
    +	    return s;
    +	 }
    +      }
    +   } catch(Exception &e) {
    +      std::cerr << "Database exception!\n";
    +      std::cerr << e.what() << std::endl;
    +   }
    +   Score s;
    +   s.number=0;
    +   s.user=L"DBase error";
    +   s.numgames = s.score = 0;
    +   return s;
    +}
    diff --git a/wt-3.1.7a/examples/hangman/HangmanDb.h b/wt-3.1.7a/examples/hangman/HangmanDb.h
    new file mode 100644
    index 0000000..d8297c2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanDb.h
    @@ -0,0 +1,41 @@
    +#ifndef DB_H_
    +#define DB_H_
    +
    +#include <string>
    +#include <vector>
    +
    +class HangmanDb
    +{
    +public:
    +  // this function returns false if user existed, true if user inserted
    +  // It guarantees atomic userExists() checking and adding it if the user
    +  // did not yet exits.
    +  static bool addUser(const std::wstring &user, const std::wstring &password);
    +
    +  // This function returns true when the credentials are found in the
    +  // database, otherwise false
    +  static bool validLogin(const std::wstring &user, const std::wstring &pass);
    +
    +  // Increments the number of games played, and adds delta to the score
    +  static void addToScore(const std::wstring &user, int delta);
    +
    +  struct Score {
    +    int number; // position of the user
    +    std::wstring user;
    +    int numgames;
    +    int score;
    +    std::wstring lastseen; // Last seen, in GMT
    +  };
    +
    +  // Returns the top n highest scoring users
    +  static std::vector<Score> getHighScores(int top);
    +
    +  // Returns the score structure for the given user
    +  static Score getUserPosition(const std::wstring &user);
    +
    +private:
    +  static std::string DbUser();
    +  static std::string DbPass();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/hangman/HangmanGame.C b/wt-3.1.7a/examples/hangman/HangmanGame.C
    new file mode 100644
    index 0000000..9e3abef
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanGame.C
    @@ -0,0 +1,86 @@
    +/*
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WText>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WStackedWidget>
    +#include <Wt/WCssDecorationStyle>
    +
    +#include "HangmanGame.h"
    +#include "LoginWidget.h"
    +#include "HangmanWidget.h"
    +#include "HighScoresWidget.h"
    +
    +HangmanGame::HangmanGame(WContainerWidget *parent):
    +   WTable(parent)
    +{
    +   resize(WLength(100, WLength::Percentage), WLength::Auto);
    +
    +   WText *title = new WText(L"A Witty game: Hangman", elementAt(0,0));
    +   title->decorationStyle().font().setSize(WFont::XXLarge);
    +
    +   // Center the title horizontally.
    +   elementAt(0, 0)->setContentAlignment(AlignTop | AlignCenter);
    +
    +   // Element (1,1) holds a stack of widgets with the main content.
    +   // This is where we switch between Login, Game, and Highscores widgets.
    +   MainStack = new WStackedWidget(elementAt(1, 0));
    +   MainStack->setPadding(20);
    +
    +   MainStack->addWidget(Login = new LoginWidget());
    +   Login->loginSuccessful.connect(this, &HangmanGame::play);
    +
    +   // Element (2,0) contains navigation buttons. Instead of WButton,
    +   // we use WText. WText inherits from WInteractWidget, and thus exposes
    +   // the click event.
    +   BackToGameText = new WText(L" Gaming Grounds ", elementAt(2, 0));
    +   BackToGameText->decorationStyle().setCursor(PointingHandCursor);
    +   BackToGameText->clicked().connect(this, &HangmanGame::showGame);
    +
    +   ScoresText = new WText(L" Highscores ", elementAt(2, 0));
    +   ScoresText->decorationStyle().setCursor(PointingHandCursor);
    +   ScoresText->clicked().connect(this, &HangmanGame::showHighScores);
    +   // Center the buttons horizontally.
    +   elementAt(2, 0)->setContentAlignment(AlignTop | AlignCenter);
    +
    +   doLogin();
    +}
    +
    +void HangmanGame::doLogin()
    +{
    +   MainStack->setCurrentWidget(Login);
    +   BackToGameText->hide();
    +   ScoresText->hide();
    +}
    +
    +void HangmanGame::play(std::wstring user, Dictionary dict)
    +{
    +   // Add a widget by passing MainStack as the parent, ...
    +   Game = new HangmanWidget(user, dict, MainStack);
    +   // ... or using addWidget
    +   MainStack->addWidget(Scores = new HighScoresWidget(user));
    +
    +   BackToGameText->show();
    +   ScoresText->show();
    +
    +   showGame();
    +}
    +
    +void HangmanGame::showHighScores()
    +{
    +   MainStack->setCurrentWidget(Scores);
    +   Scores->update();
    +   BackToGameText->decorationStyle().font().setWeight(WFont::NormalWeight);
    +   ScoresText->decorationStyle().font().setWeight(WFont::Bold);
    +}
    +
    +void HangmanGame::showGame()
    +{
    +   MainStack->setCurrentWidget(Game);
    +   BackToGameText->decorationStyle().font().setWeight(WFont::Bold);
    +   ScoresText->decorationStyle().font().setWeight(WFont::NormalWeight);
    +}
    diff --git a/wt-3.1.7a/examples/hangman/HangmanGame.h b/wt-3.1.7a/examples/hangman/HangmanGame.h
    new file mode 100644
    index 0000000..14b09fd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanGame.h
    @@ -0,0 +1,46 @@
    +/* this is a -*-C++-*- file
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef HANGMANGAME_H_
    +#define HANGMANGAME_H_
    +
    +#include <Wt/WTable>
    +
    +namespace Wt {
    +  class WStackedWidget;
    +  class WText;
    +}
    +
    +using namespace Wt;
    +
    +#include "Dictionary.h"
    +
    +class HangmanWidget;
    +class HighScoresWidget;
    +class LoginWidget;
    +
    +class HangmanGame : public WTable
    +{
    +   public:
    +      HangmanGame(WContainerWidget *parent);
    +
    +   private:
    +      WStackedWidget   *MainStack;
    +      LoginWidget      *Login;
    +      HangmanWidget    *Game;
    +      HighScoresWidget *Scores;
    +      WText            *BackToGameText;
    +      WText            *ScoresText;
    +
    +      // Show the initial screen
    +      void doLogin();
    +
    +      void play(std::wstring user, Dictionary dictionary);
    +      void showGame();
    +      void showHighScores();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/hangman/HangmanWidget.C b/wt-3.1.7a/examples/hangman/HangmanWidget.C
    new file mode 100644
    index 0000000..63736cd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanWidget.C
    @@ -0,0 +1,181 @@
    +/*
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "HangmanWidget.h"
    +
    +#include <Wt/WBreak>
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WTable>
    +#include <Wt/WText>
    +#include <Wt/WTableCell>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WImage>
    +#include <Wt/WSignalMapper>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Dictionary.h"
    +#include "HangmanDb.h"
    +
    +HangmanWidget::HangmanWidget(std::wstring user, Dictionary dict,
    +			     WContainerWidget *parent):
    +   WContainerWidget(parent),
    +   MaxGuesses(9),
    +   User(user),
    +   Dict(dict)
    +{
    +   setContentAlignment(AlignCenter);
    +
    +   Title = new WText("Guess the word!", this);
    +   Title->decorationStyle().font().setSize(WFont::XLarge);
    +
    +   WordContainer = new WContainerWidget(this);
    +   WordContainer->setMargin(20, Top | Bottom);
    +   WordContainer->setContentAlignment(AlignCenter);
    +   WCssDecorationStyle& style = WordContainer->decorationStyle();
    +   style.setBorder(WBorder(WBorder::Solid));
    +   style.font().setFamily(WFont::Monospace, "courier");
    +   style.font().setSize(WFont::XXLarge);
    +
    +   StatusText = new WText(this);
    +   new WBreak(this);
    +   createHangmanImages(this);
    +   createAlphabet(this);
    +   new WBreak(this);
    +   NewGameButton = new WPushButton("New Game", this);
    +   NewGameButton->clicked().connect(this, &HangmanWidget::newGame);
    +
    +   // prepare for first game
    +   newGame();
    +}
    +
    +void HangmanWidget::createHangmanImages(WContainerWidget *parent)
    +{
    +   for(unsigned int i = 0; i <= MaxGuesses; ++i) {
    +      std::string fname = "icons/hangman";
    +      fname += boost::lexical_cast<std::string>(i) + ".png";
    +      WImage *theImage = new WImage(fname, parent);
    +      HangmanImages.push_back(theImage);
    +
    +      // Although not necessary, we can avoid flicker (on konqueror)
    +      // by presetting the image size.
    +      theImage->resize(256, 256);
    +   }
    +
    +   HurrayImage = new WImage("icons/hangmanhurray.png", parent);
    +   resetImages(); // Hide all images
    +}
    +
    +void HangmanWidget::createAlphabet(WContainerWidget *parent)
    +{
    +   LetterButtonLayout = new WTable(parent);
    +
    +   // The default width of a table is 100%...
    +   LetterButtonLayout->resize(13*30, WLength::Auto);
    +
    +   WSignalMapper<WPushButton *> *mapper
    +     = new WSignalMapper<WPushButton *>(this);
    +
    +   for(unsigned int i = 0; i < 26; ++i) {
    +      std::wstring c(1, 'A' + i);
    +      WPushButton *character =
    +	 new WPushButton(c, LetterButtonLayout->elementAt(i / 13, i % 13));
    +      LetterButtons.push_back(character);
    +      character->resize(30, WLength::Auto);
    +      mapper->mapConnect(character->clicked(), character);
    +   }
    +
    +   mapper->mapped().connect(this, &HangmanWidget::processButton);
    +}
    +
    +void HangmanWidget::newGame()
    +{
    +   Word = RandomWord(Dict);
    +   Title->setText(L"Guess the word, " + User + L"!");
    +   NewGameButton->hide(); // don't let the player chicken out
    +
    +   // Bring widget to initial state
    +   resetImages();
    +   resetButtons();
    +   BadGuesses = DisplayedLetters = 0;
    +   HangmanImages[0]->show();
    +
    +   // Prepare the widgets for the new word
    +   WordContainer->clear();
    +   WordLetters.clear();
    +   for(unsigned int i = 0; i < Word.size(); ++i) {
    +      WText *c = new WText("-", WordContainer);
    +      WordLetters.push_back(c);
    +   }
    +
    +   // resize appropriately so that the border nooks nice.
    +   WordContainer->resize(WLength(Word.size() * 1.5, WLength::FontEx),
    +			 WLength::Auto);
    +
    +   StatusText->setText("");
    +}
    +
    +void HangmanWidget::processButton(WPushButton *button)
    +{
    +   if (!button->isEnabled())
    +     return;
    +
    +   wchar_t c = button->text().value().c_str()[0];
    +   if(std::find(Word.begin(), Word.end(), c) != Word.end())
    +      registerCorrectGuess(c);
    +   else
    +      registerBadGuess();
    +   button->disable();
    +}
    +
    +void HangmanWidget::registerBadGuess()
    +{
    +   if(BadGuesses < MaxGuesses) {
    +      HangmanImages[BadGuesses]->hide();
    +      BadGuesses++;
    +      HangmanImages[BadGuesses]->show();
    +      if(BadGuesses == MaxGuesses) {
    +	 StatusText->setText(L"You hang... <br />"
    +			     L"The correct answer was: " + Word);
    +	 LetterButtonLayout->hide();
    +	 NewGameButton->show();
    +	 HangmanDb::addToScore(User, -10);
    +      }
    +   }
    +}
    +
    +void HangmanWidget::registerCorrectGuess(wchar_t c)
    +{
    +   for(unsigned int i = 0; i < Word.size(); ++i) {
    +      if(Word[i] == c) {
    +	 DisplayedLetters++;
    +	 WordLetters[i]->setText(std::wstring(1, c));
    +      }
    +   }
    +   if(DisplayedLetters == Word.size()) {
    +      StatusText->setText("You win!");
    +      HangmanImages[BadGuesses]->hide();
    +      HurrayImage->show();
    +      LetterButtonLayout->hide();
    +      NewGameButton->show();
    +      HangmanDb::addToScore(User, 20 - BadGuesses);
    +   }
    +}
    +
    +void HangmanWidget::resetImages()
    +{
    +    HurrayImage->hide();
    +    for(unsigned int i = 0; i < HangmanImages.size(); ++i)
    +       HangmanImages[i]->hide();
    +}
    +
    +void HangmanWidget::resetButtons()
    +{
    +   for(unsigned int i = 0; i < LetterButtons.size(); ++i) {
    +      LetterButtons[i]->enable();
    +   }
    +   LetterButtonLayout->show();
    +}
    diff --git a/wt-3.1.7a/examples/hangman/HangmanWidget.h b/wt-3.1.7a/examples/hangman/HangmanWidget.h
    new file mode 100644
    index 0000000..cb599f2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HangmanWidget.h
    @@ -0,0 +1,65 @@
    +/* this is a -*-C++-*- file
    + *
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef HANGMANWIDGET_H_
    +#define HANGMANWIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WText>
    +#include <Wt/WPushButton>
    +#include <vector>
    +
    +#include "Dictionary.h"
    +
    +namespace Wt {
    +  class WPushButton;
    +  class WImage;
    +  class WLineEdit;
    +  class WPushButton;
    +  class WTable;
    +}
    +
    +using namespace Wt;
    +
    +class HangmanWidget: public WContainerWidget
    +{
    +   public:
    +      HangmanWidget(std::wstring user, Dictionary dict,
    +		    WContainerWidget *parent = 0);
    +
    +   private:
    +      WText                     *Title;
    +      WTable                    *LetterButtonLayout;
    +      std::vector<WPushButton *> LetterButtons;
    +      std::vector<WImage *>      HangmanImages;
    +      WImage                    *HurrayImage;
    +      WContainerWidget          *WordContainer;
    +      WText                     *StatusText;
    +      std::vector<WText *>       WordLetters;
    +      WPushButton               *NewGameButton;
    +      
    +      const unsigned int MaxGuesses;
    +      unsigned int       BadGuesses;
    +      unsigned int       DisplayedLetters;
    +      std::wstring       Word;
    +      std::wstring       User;
    +      Dictionary         Dict;
    +
    +      // constructor helpers
    +      void createAlphabet(WContainerWidget *parent);
    +      void createHangmanImages(WContainerWidget *parent);
    +
    +      // other helpers
    +      void resetImages();
    +      void resetButtons();
    +      void registerBadGuess();
    +      void registerCorrectGuess(wchar_t c);
    +      void processButton(WPushButton *button);
    +      void newGame();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/hangman/HighScoresWidget.C b/wt-3.1.7a/examples/hangman/HighScoresWidget.C
    new file mode 100644
    index 0000000..d49179d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HighScoresWidget.C
    @@ -0,0 +1,99 @@
    +/*
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <sstream>
    +
    +#include <Wt/WBreak>
    +#include <Wt/WText>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WCssDecorationStyle>
    +
    +#include "HighScoresWidget.h"
    +#include "HangmanDb.h"
    +
    +using namespace std;
    +
    +HighScoresWidget::HighScoresWidget(const std::wstring &user,
    +				   WContainerWidget *parent):
    +   WContainerWidget(parent),
    +   User(user)
    +{
    +   setContentAlignment(AlignCenter);
    +   setStyleClass("highscores");
    +}
    +
    +void HighScoresWidget::update()
    +{
    +   clear();
    +
    +   WText *title = new WText("Hall of fame", this);
    +   title->decorationStyle().font().setSize(WFont::XLarge);
    +   title->setMargin(10, Top | Bottom);
    +
    +   new WBreak(this);
    +
    +   HangmanDb::Score s = HangmanDb::getUserPosition(User);
    +
    +   std::string yourScore;
    +   if (s.number == 1)
    +     yourScore = "Congratulations! You are currently leading the pack.";
    +   else {
    +     yourScore = "You are currently ranked number "
    +       + boost::lexical_cast<std::string>(s.number)
    +       + ". Almost there !";
    +   }
    +
    +   WText *score = new WText("<p>" + yourScore + "</p>", this);
    +   score->decorationStyle().font().setSize(WFont::Large);
    +
    +   std::vector<HangmanDb::Score> top = HangmanDb::getHighScores(20);
    +
    +   WTable *table = new WTable(this);
    +   new WText("Rank", table->elementAt(0, 0));
    +   new WText("User", table->elementAt(0, 1));
    +   new WText("Games", table->elementAt(0, 2));
    +   new WText("Score", table->elementAt(0, 3));
    +   new WText("Last game", table->elementAt(0, 4));
    +   for(unsigned int i = 0; i < top.size(); ++i) {
    +      new WText(boost::lexical_cast<string>(top[i].number),
    +		table->elementAt(i + 1, 0));
    +      new WText(top[i].user, table->elementAt(i + 1, 1));
    +      new WText(boost::lexical_cast<std::string>(top[i].numgames),
    +		table->elementAt(i+ 1, 2));
    +      new WText(boost::lexical_cast<std::string>(top[i].score),
    +		table->elementAt(i + 1, 3));
    +      new WText(top[i].lastseen, table->elementAt(i + 1, 4));
    +   }
    +
    +   table->resize(WLength(60, WLength::FontEx), WLength::Auto);
    +   table->setMargin(20, Top | Bottom);
    +   table->decorationStyle().setBorder(WBorder(WBorder::Solid));
    +
    +   /*
    +    * Apply cell styles
    +    */
    +   for (int row = 0; row < table->rowCount(); ++row) {
    +     for (int col = 0; col < table->columnCount(); ++col) {
    +       WTableCell *cell = table->elementAt(row, col);
    +       cell->setContentAlignment(AlignMiddle | AlignCenter);
    +
    +       if (row == 0)
    +	 cell->setStyleClass("highscoresheader");
    +
    +       if (row == s.number)
    +	 cell->setStyleClass("highscoresself");
    +     }
    +   }
    +
    +   WText *fineprint
    +     = new WText("<p>For each game won, you gain 20 points, "
    +		 "minus one point for each wrong letter guess.<br />"
    +		 "For each game lost, you loose 10 points, so you "
    +		 "better try hard to guess the word!</p>", this);
    +   fineprint->decorationStyle().font().setSize(WFont::Smaller);
    +}
    diff --git a/wt-3.1.7a/examples/hangman/HighScoresWidget.h b/wt-3.1.7a/examples/hangman/HighScoresWidget.h
    new file mode 100644
    index 0000000..9100407
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/HighScoresWidget.h
    @@ -0,0 +1,20 @@
    +/* this is a -*-C++-*- file
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WContainerWidget>
    +
    +using namespace Wt;
    +
    +class HighScoresWidget: public WContainerWidget
    +{
    +   public:
    +      HighScoresWidget(const std::wstring &user,
    +		       WContainerWidget *parent = 0);
    +      void update();
    +
    +   private:
    +      std::wstring User;
    +};
    diff --git a/wt-3.1.7a/examples/hangman/LoginWidget.C b/wt-3.1.7a/examples/hangman/LoginWidget.C
    new file mode 100644
    index 0000000..fbd7fcc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/LoginWidget.C
    @@ -0,0 +1,101 @@
    +/*
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WText>
    +#include <Wt/WLabel>
    +#include <Wt/WLineEdit>
    +#include <Wt/WBreak>
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WPushButton>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WComboBox>
    +
    +#include "LoginWidget.h"
    +#include "HangmanDb.h"
    +#include "Dictionary.h"
    +
    +LoginWidget::LoginWidget(WContainerWidget *parent):
    +   WContainerWidget(parent)
    +{
    +   setPadding(100, Left | Right);
    +
    +   WText *title = new WText("Login", this);
    +   title->decorationStyle().font().setSize(WFont::XLarge);
    +
    +   IntroText =
    +      new WText("<p>Hangman keeps track of the best players. To recognise "
    +		"you, we ask you to log in. If you never logged in before, "
    +		"choose any name and password. If you don't want to be in "
    +                "our database for some reason, use the 'guest/guest' "
    +		"account.</p>"
    +		"<p>Warning: hangman contains some words and "
    +		"pictures that may offend really young players.</p>", this);
    +
    +   WTable *layout = new WTable(this);
    +   WLabel *usernameLabel = new WLabel("User name: ", layout->elementAt(0, 0));
    +   layout->elementAt(0, 0)->resize(WLength(14, WLength::FontEx), WLength::Auto);
    +   Username = new WLineEdit(layout->elementAt(0, 1));
    +   usernameLabel->setBuddy(Username);
    +
    +   WLabel *passwordLabel = new WLabel("Password: ", layout->elementAt(1, 0));
    +   Password = new WLineEdit(layout->elementAt(1, 1));
    +   Password->setEchoMode(WLineEdit::Password);
    +   passwordLabel->setBuddy(Password);
    +
    +   WLabel *languageLabel = new WLabel("Language: ", layout->elementAt(2, 0));
    +   Language = new WComboBox(layout->elementAt(2, 1));
    +   Language->insertItem(0, "English words (18957 words)");
    +   Language->insertItem(1, "Nederlandse woordjes (1688 woorden)");
    +   languageLabel->setBuddy(Language);
    +
    +   new WBreak(this);
    +
    +   WPushButton *LoginButton = new WPushButton("Login", this);
    +   LoginButton->clicked().connect(this, &LoginWidget::checkCredentials);
    +}
    +
    +void LoginWidget::checkCredentials()
    +{
    +   User = Username->text();
    +   std::wstring pass = Password->text();
    +   Dict = (Dictionary) Language->currentIndex();
    +   
    +   if (HangmanDb::validLogin(User, pass)) {
    +      confirmLogin(L"<p>Welcome back, " + User + L".</p>");
    +   } else if (User == L"guest" && pass == L"guest") {
    +      confirmLogin(L"<p>Welcome guest, good luck.</p>");
    +   } else if (HangmanDb::addUser(User, pass)) {
    +      confirmLogin(L"<p>Welcome, "
    +		   + User + L". Good luck with your first game!</p>");
    +   } else {
    +      IntroText
    +	->setText("<p>You entered the wrong password, or the username "
    +		  "combination is already in use. If you are a returning "
    +		  "user, please try again. If you are a new user, please "
    +		  "try a different name.</p>");
    +      IntroText->decorationStyle().setForegroundColor(Wt::red);
    +      Username->setText("");
    +      Password->setText("");
    +   }
    +}
    +
    +void LoginWidget::confirmLogin(const std::wstring text)
    +{
    +   clear();
    +
    +   WText *title = new WText("Loging successful", this);
    +   title->decorationStyle().font().setSize(WFont::XLarge);
    +
    +   new WText(text, this);
    +   (new WPushButton("Start playing", this))
    +     ->clicked().connect(this, &LoginWidget::startPlaying);
    +}
    +
    +void LoginWidget::startPlaying()
    +{
    +   loginSuccessful.emit(User, Dict);
    +}
    diff --git a/wt-3.1.7a/examples/hangman/LoginWidget.h b/wt-3.1.7a/examples/hangman/LoginWidget.h
    new file mode 100644
    index 0000000..4944264
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/LoginWidget.h
    @@ -0,0 +1,44 @@
    +/* this is a -*-C++-*- file
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef LOGINWIDGET_H_
    +#define LOGINWIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +#include "Dictionary.h"
    +
    +namespace Wt {
    +  class WLineEdit;
    +  class WText;
    +  class WComboBox;
    +}
    +
    +using namespace Wt;
    +
    +class LoginWidget : public WContainerWidget
    +{
    +   public:
    +      LoginWidget(WContainerWidget *parent = 0);
    +
    +      Wt::Signal<std::wstring, Dictionary> loginSuccessful;
    +
    +   private:
    +      WText     *IntroText;
    +      WLineEdit *Username;
    +      WLineEdit *Password;
    +      WComboBox *Language;
    +
    +      std::wstring User;
    +      Dictionary   Dict;
    +
    +      void confirmLogin(const std::wstring text);
    +
    +      void checkCredentials();
    +      void startPlaying();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/hangman/dbscript b/wt-3.1.7a/examples/hangman/dbscript
    new file mode 100644
    index 0000000..a4b2f3e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/dbscript
    @@ -0,0 +1,18 @@
    +create database hangman;
    +use hangman;
    +
    +create table users (
    +  user char(50) primary key,
    +  pass char(50),
    +  numgames int,
    +  score int,
    +  lastseen datetime,
    +  index(score)
    +  );
    +
    +grant insert, select, update on hangman.users
    +  to "hangman"@"localhost" identified by "hangwoman";
    +
    +insert into hangman.users values ("guest", md5("guest"), 0, 0, now());
    +
    +#alter table users add lastseen datetime;
    diff --git a/wt-3.1.7a/examples/hangman/dict-nl.txt b/wt-3.1.7a/examples/hangman/dict-nl.txt
    new file mode 100644
    index 0000000..b6bf365
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/dict-nl.txt
    @@ -0,0 +1,1688 @@
    +AANBIEDINGSBRIEF
    +AANEENGEFLANST
    +AANGEBEDENEN
    +AANGEGAAN
    +AANGEREKEND
    +AANGEVALLEN
    +AANROEPINGEN
    +AANSCHAFFEN
    +AANSLAG
    +AANSPRAKELIJK
    +AANWERVINGEN
    +AARDEWEG
    +ACCUMULATIE
    +ACHTEN
    +ACHTENTWINTIGDUIZEND
    +ACHTERLIJKE
    +ACHTEROPGERAAKT
    +ACHTERUITGANG
    +ACOLIET
    +ACTIEVOERDERS
    +ACTIVEERDE
    +ACTRICE
    +ADEMHALING
    +ADJECTIEF
    +ADMINISTRATIES
    +ADONISSEN
    +ADRESBOEKEN
    +ADVERTENTIEBLAD
    +ADVERTENTIEKOSTEN
    +ADVIESWERK
    +AEROBIC
    +AFBROKKELEN
    +AFDUWEN
    +AFFIRMATIE
    +AFGEBEDELD
    +AFGEGRAASD
    +AFGEPLAGD
    +AFGESPEELD
    +AFGESPRONGEN
    +AFKAMMEN
    +AFKLEMMING
    +AFKNIBBELEN
    +AFKOKEN
    +AFPERSER
    +AFPIKKEN
    +AFPLUKKEN
    +AFSCHEPPEN
    +AFSPIEGELINGEN
    +AFWIMPELEN
    +AFZONDERLIJK
    +AGGREGATEN
    +AGITEREN
    +AGRONOMISCH
    +ALARMSYSTEMEN
    +ALLEENRECHT
    +ALMACHTIGE
    +ALTERNATIES
    +ALTIMETER
    +AMBASSADRICES
    +AMERIKAAN
    +ANACONDA
    +ANAGRAMMEN
    +ANALYTISCH
    +ANANAS
    +ANDERSDENKENDEN
    +ANESTHESIST
    +ANTICHAMBRE
    +ANTIKLERIKALE
    +ANTINOMIE
    +ANTISEPSIS
    +APEBROODBOMEN
    +AQUARELLEREN
    +ARBEIDSBUREAUS
    +ARBEIDSPRESTATIE
    +ARCHIEFKASTEN
    +ARCHIEFWEZEN
    +ARENDEN
    +ARISTOCRATEN
    +ARTISTIEKER
    +ASPIRINE
    +ASSURANTIES
    +ASYMMETRISCHE
    +ATLETEN
    +ATOOMGEWICHT
    +AUTEUR
    +AUTOBIOGRAAF
    +AUTOMATISERINGSPROJECTEN
    +AUTOPORTIER
    +AVATAR
    +AVONDMAALSVIERINGEN
    +BAAR
    +BABYVOEDING
    +BACILLAIR
    +BAGAGENET
    +BAKELIETEN
    +BAKKEN
    +BALANSOPRUIMINGEN
    +BALDADIGER
    +BANKETLETTERS
    +BANKINSTELLING
    +BANKMANAGER
    +BARDER
    +BARSTEN
    +BASGITAAR
    +BASILIEKEN
    +BASISREGELS
    +BASKLARINETTIST
    +BASTEN
    +BAUXIET
    +BAZELEN
    +BEARBEIDEN
    +BEDAUWDE
    +BEDDENLAKEN
    +BEDDENTIJKEN
    +BEDELMONNIKEN
    +BEDERF
    +BEDRIJFSBRANDWEER
    +BEDRIJFSONDERDELEN
    +BEDUIDEND
    +BEELDHOUWER
    +BEELDRECORDER
    +BEERPUTTEN
    +BEGAAFDST
    +BEGIJNENKOEKEN
    +BEHEERD
    +BEJAARDENPAS
    +BEKENDWORDING
    +BEKLEMD
    +BEKLEMTOOND
    +BEKNOPTHEID
    +BEKOMEN
    +BEKOSTIGEN
    +BELANGRIJKER
    +BELASTERD
    +BELASTINGBILJETTEN
    +BELASTINGTRUCS
    +BEMIDDELDE
    +BENADERBAAR
    +BENARDE
    +BENGAALSE
    +BENIJDENSWAARDIGE
    +BEOGEN
    +BEPLAKKEN
    +BEPOEDERDE
    +BEREIDEN
    +BEROEPSVOETBALLERS
    +BESCHAMEND
    +BESCHRIJVER
    +BESLISSEND
    +BESMEERD
    +BESTELLER
    +BESTENDIGDE
    +BESTRAFFING
    +BESTREKEN
    +BESTUURDERSCABINES
    +BETREDEN
    +BEURDE
    +BEVEILIGEN
    +BEVINDELIJKE
    +BEVLEKT
    +BEVLOEIINGSWERKEN
    +BEVOELDE
    +BEVOLKT
    +BEVROOR
    +BEVRUCHT
    +BEVRUCHTING
    +BEWASEMDE
    +BEZIGEN
    +BEZOCHTE
    +BEZORGDE
    +BIBLIOTHECARIS
    +BIEB
    +BIERPOMP
    +BIGOTTE
    +BIJEENKOMSTEN
    +BIJKLANK
    +BIJLEN
    +BIJPASSEND
    +BIJSNIJDEN
    +BIJVERTREK
    +BIJZAAK
    +BIJZIENDE
    +BINAIR
    +BINDTOUW
    +BINNENKORT
    +BIOCHEMISCH
    +BIOLOGIE
    +BLAASPIJP
    +BLADERLOOS
    +BLADMOSSEN
    +BLAUWEREGENS
    +BLIKSEMSCHICHT
    +BLINDEMANNETJE
    +BLOCNOTES
    +BLOEDZIEKTEN
    +BLOEMENMANDEN
    +BLOEMKWEKER
    +BLOEMLEZING
    +BLOTEBILLENGEZICHTEN
    +BLUSMIDDELEN
    +BOEKDRUKPERSEN
    +BOEKETTEN
    +BOERENBEDRIJF
    +BOERENKARREN
    +BOERENOORLOGEN
    +BOETEDOENINGEN
    +BOETSEREN
    +BOEZEMDE
    +BOLDERDE
    +BONBOEKJE
    +BONBONDOOS
    +BONUSPUNTEN
    +BOORBEITEL
    +BOORIJZER
    +BOOSHEID
    +BOSJESMAN
    +BOTANICI
    +BOTENHUIS
    +BOURGEOISTJE
    +BOUTEN
    +BOUWMARKT
    +BOUWSTENEN
    +BOVENGRENZEN
    +BOVENREGIONAAL
    +BRABANTSE
    +BRANDOFFERS
    +BRANDPUNTEN
    +BRANDSTICHTING
    +BREEDBEELDTELEVISIE
    +BRIEFBOM
    +BRIEFOMSLAG
    +BRILLENMAN
    +BROEDERDIENST
    +BROEIERIGER
    +BRONBELASTING
    +BRUGGETJE
    +BRUGPIJLERS
    +BRUIKBAAR
    +BRUILOFTSMAAL
    +BRUIS
    +BRUISTABLETTEN
    +BRUNETJE
    +BRUTAALST
    +BUDGETAFSPRAKEN
    +BUIGINGEN
    +BUITENHUIS
    +BUITENISSIGHEDEN
    +BUITENPLANETEN
    +BUITENPOLDERS
    +BUITENSPORT
    +BUNDELDE
    +BUNDELS
    +BUNKERDE
    +BUREAUCRATIE
    +BURGERMENS
    +BURGEROORLOGEN
    +BUSPASSAGIERS
    +BUTTON
    +BYPASS
    +CABINES
    +CADET
    +CAKEBLIK
    +CASSETTE
    +CELDELING
    +CEREBRAAL
    +CEREMONIE
    +CHEESEBURGER
    +CHRISTENMENSEN
    +CITROENSAP
    +CLERUS
    +COALITIEKABINET
    +COHABITEREN
    +COLLECTIVUM
    +COLLEGIALE
    +COLUMNS
    +COMPETENT
    +COMPUTERPROGRAMMEURS
    +CONCEPTUEEL
    +CONCERTZALEN
    +CONFECTIONEREN
    +CONFESSIONEEL
    +CONGRESSIST
    +CONSENSUS
    +CONSIDERATIE
    +CONSIDERATIES
    +CONSOLIDEERDE
    +CONSTANTEN
    +CONSUL
    +COPULEERDE
    +CORRUMPEREN
    +COWBOYS
    +CROSSFIETS
    +CYBERNETICA
    +DAARJUIST
    +DAARNA
    +DAGGE
    +DAGORDERS
    +DAGSLUITING
    +DALUUR
    +DAMPKRINGEN
    +DANKBETUIGING
    +DANKTE
    +DAUWTRAPPEN
    +DEBUTEREN
    +DECLASSEREN
    +DEELBAAR
    +DELFDEN
    +DENNENRUPSEN
    +DERBY
    +DESERTIE
    +DESORGANISEREN
    +DETERMINATIE
    +DEURKNOPPEN
    +DIACHRONISCH
    +DIAFANE
    +DIAKENHUISMANNETJES
    +DIAMETERS
    +DICHTGEPLAKT
    +DICHTGESCHOVEN
    +DICTATORSCHAP
    +DICTIONAIRE
    +DIEFSTAL
    +DIENSTBETREKKINGEN
    +DIENSTHOOFDEN
    +DIENSTORDER
    +DIENSTPISTOOL
    +DIENSTROOSTER
    +DIEPVRIESMAALTIJD
    +DIESELTREIN
    +DIJKBESTUREN
    +DIJKER
    +DINERS
    +DIODE
    +DIRECTIEKAMERS
    +DIRECTORAAT
    +DISCUSSIEPUNTEN
    +DISPONEERDE
    +DISTILLEERKETEL
    +DISTRIBUTIECENTRA
    +DOBBELDE
    +DOCTORALE
    +DOCTORSBUL
    +DODELIJKE
    +DOELTREFFENDE
    +DOLFIJNTJE
    +DOMEINEN
    +DOMINANTEN
    +DONDERDAGAVOND
    +DONKERBLAUWE
    +DOODERNSTIG
    +DOODSGEDACHTE
    +DOODVECHTEN
    +DOODZIEK
    +DOOPFORMULE
    +DOOPSEL
    +DOORDRAVERS
    +DOORGEDRAAFD
    +DOORGEDREVEN
    +DOORKERVEN
    +DOORKNAGEN
    +DOORNBOSSEN
    +DOORREIZEN
    +DOORSCHEUREN
    +DOORZEEFDE
    +DOORZETTINGSVERMOGEN
    +DORADE
    +DOUANIER
    +DOUCHECEL
    +DRAADBREUK
    +DRAADLOOS
    +DRAAIBANK
    +DRAAIORGEL
    +DRENKELING
    +DRIEWEGKRANEN
    +DRIFTLEVEN
    +DRINKBUSSEN
    +DROOGGEMALEN
    +DROOGSHAMPOO
    +DROOMSTERS
    +DRUIVENSUIKER
    +DRUKTEMAKER
    +DRUKVORM
    +DRUKVORMEN
    +DRUP
    +DUIKBOMMENWERPER
    +DUISTERDER
    +DUSGENAAMD
    +DUUR
    +DWARSHOUTEN
    +DWARSKIJKERS
    +ECHTSCHEIDINGSPROCEDURES
    +EENDENKOOIEN
    +EENSDENKEND
    +EENSGEZINDE
    +EETBARE
    +EGELANTIEREN
    +EIGENAARDIG
    +ELASTISCHER
    +ELEKTRICITEITSNET
    +ELEKTRONICUS
    +ELLENDIGST
    +ELPEES
    +EMOTIONEEL
    +ENERGETISCH
    +ENERGIEBEDRIJF
    +ENIGERLEI
    +ENTERBIJL
    +ENTERBIJLEN
    +ENTOURAGE
    +EREPRIJS
    +ERFPACHTERS
    +ERONDERUIT
    +EVENWAARDIGE
    +EVENWICHT
    +EXCLAVE
    +EXHIBITIONISTISCH
    +EXPEDITIEKANTOREN
    +EXPLODEREN
    +EXPOSITIEZALEN
    +EXQUIS
    +EXTERNE
    +EXTRAPOLEREN
    +EZELACHTIGHEDEN
    +FABRIEKSWETTEN
    +FALEN
    +FAMILIEBAND
    +FAMILIETRADITIE
    +FANTOOM
    +FEMINISME
    +FEZELEN
    +FIASCO
    +FIJNGEVOELIGER
    +FILM
    +FILMERS
    +FILMMUZIEK
    +FILOLOGISCHE
    +FLAUWIGHEDEN
    +FLENS
    +FLEURIGER
    +FLONKERDE
    +FLOR
    +FLUWEELZWART
    +FOETUS
    +FONOGRAMMEN
    +FORMULIEREN
    +FORUMBIJEENKOMST
    +FOTOBOEK
    +FOTOHANDEL
    +FRAAIER
    +FRAGMENTEN
    +FRANSTALIGE
    +FRAPPANT
    +FRET
    +FRIESE
    +FRONTAANVAL
    +FUNCTIONELE
    +FUNESTER
    +FYSIOTHERAPIE
    +GAANDE
    +GANGBOORD
    +GANSELIJK
    +GARAGIST
    +GASSTEL
    +GATLIKKERIJ
    +GEBOORTEPLAATSEN
    +GEBORREL
    +GEBULDER
    +GEBUURD
    +GECHROMEERD
    +GECLAUSULEERDE
    +GECOMMUNICEERD
    +GEDETINEERD
    +GEDIJKT
    +GEDOOGD
    +GEDRAPEERD
    +GEDULD
    +GEDUURD
    +GEESTENBEZWEERDER
    +GEESTVERWANTSCHAP
    +GEGAAPT
    +GEGEVENSVERWERKENDE
    +GEGIST
    +GEGLEUFD
    +GEGRAAID
    +GEHEEL
    +GEHEIMSCHRIJVER
    +GEHEIMTAAL
    +GEHEUGENSTEUN
    +GEHINKELD
    +GEHOORZAAMD
    +GEHOORZAAMDE
    +GEIGERTELLER
    +GEKKIN
    +GEKROPEN
    +GELATINE
    +GELAVEERD
    +GELDZAK
    +GELEGENHEIDSSTUK
    +GELEGENHEIDSSTUKKEN
    +GELICHT
    +GELIJKVORMIG
    +GELUKKIGER
    +GELULD
    +GELUWD
    +GEMAKKELIJK
    +GEMAKZUCHTIGE
    +GEMASSACREERD
    +GEMEENZAME
    +GEMOK
    +GEMUSICEERD
    +GENETISCH
    +GENEZEN
    +GENITREERD
    +GEPARKEERD
    +GEPERPENDICULARISEERD
    +GEPIKEERD
    +GEREPLICEERD
    +GERIJ
    +GERMANISTIEK
    +GEROOKTE
    +GEROOST
    +GESAUSD
    +GESCHAATST
    +GESCHAL
    +GESCHEPTE
    +GESCHIEDKUNDIG
    +GESCHIEDKUNDIGEN
    +GESCHILLENCOMMISSIES
    +GESJIRPT
    +GESLAAGDE
    +GESOESD
    +GESPAT
    +GESTAPELD
    +GESTE
    +GESUSPENDEERD
    +GETIJDENBOEK
    +GETIJSTROOM
    +GETOETERD
    +GETRANSCENDEERD
    +GETREURD
    +GETUKT
    +GETWIJFELD
    +GEVAARTEN
    +GEVANGENENKAMP
    +GEVARENDRIEHOEK
    +GEVEN
    +GEVLOEKT
    +GEWAARWORDINGEN
    +GEWEERSCHOT
    +GEWELDENAARS
    +GEWEREN
    +GEWICHTSEENHEDEN
    +GEXEROXT
    +GEZELLIGST
    +GEZONDST
    +GEZWEEFD
    +GEZWEEFVLIEGD
    +GEZWEEPT
    +GIFWOLK
    +GIJZELINGSACTIE
    +GILDENMEESTER
    +GIPS
    +GISTEREN
    +GISTPOEDER
    +GITARIST
    +GLADIATOREN
    +GLIMP
    +GLYCERINE
    +GODEN
    +GODSWEGE
    +GOEDGEVORMD
    +GOKLUSTIGE
    +GOLFBREKER
    +GONDEL
    +GORDEL
    +GRABBELTON
    +GRAMMOFONEN
    +GRAPPEN
    +GRASROLLER
    +GRIJSACHTIGE
    +GRIMEREN
    +GROENTEWINKELS
    +GROFDRADIG
    +GROFMEEL
    +GRONDBETEKENISSEN
    +GRONDLEGSTER
    +GRONDTOON
    +GROOTVORSTENDOMMEN
    +GRUWELDE
    +GRUWELIJKE
    +GULZIGER
    +GUNSTEN
    +GYMLOKAAL
    +HAAGDOORNS
    +HAAKTE
    +HAARKLIEVERIJ
    +HAKKETAKKEN
    +HALLUCINATIES
    +HANDEL
    +HANDELSMISSIE
    +HANDELSPOLITIEKE
    +HANDELSPROBLEMEN
    +HANDELSREGISTER
    +HANDELSTRANSACTIE
    +HANDELSVERENIGING
    +HANDICAPRACE
    +HANGAARS
    +HANGMAPPEN
    +HARENTWILLE
    +HARINGVLOOT
    +HARMONICA
    +HARPOENEREN
    +HARPSPEL
    +HASJHONDEN
    +HEEFT
    +HEERLIJKER
    +HEFTIGE
    +HEIDEVELDEN
    +HELLENISTISCHE
    +HERALDISCH
    +HERALDISCHE
    +HERBEVESTIGD
    +HERHALINGSTEKENS
    +HERLEIDBARE
    +HERZIENING
    +HETEROSEKSUEEL
    +HIERAAN
    +HIERBUITEN
    +HIERVAN
    +HINKEN
    +HINTEN
    +HIPPE
    +HITTEGOLF
    +HOBBELIG
    +HOESTEN
    +HOMMELTJE
    +HOMOSCENE
    +HOOFDSTAD
    +HOOFDSTEMBUREAU
    +HOOFSHEID
    +HOSPITAALSOLDAAT
    +HOSTIE
    +HOTELKAMERS
    +HOUTACHTIGE
    +HOUTERIGHEID
    +HOUTHAKKER
    +HOUTHOUDEND
    +HOUTVLOTTEN
    +HOVERCRAFT
    +HUIDKANKER
    +HUISGODEN
    +HUMANE
    +HUWELIJKSCONTRACTEN
    +HYPOTHEEKREGISTERS
    +IETWAT
    +IJDELHEDEN
    +IJZIGST
    +IMAGINATIE
    +IMPORTRESTRICTIES
    +IMPOSANTST
    +INCOHERENT
    +INDIENING
    +INDIVIDUALISEERDE
    +INDUCEREN
    +INEFFECTIVITEIT
    +INFECTIEUS
    +INFINITIEF
    +INFLUISTEREN
    +INFORMATIEBULLETIN
    +INFORMATIEBUREAU
    +INGEBURGERDE
    +INGEDOKEN
    +INGEGAAN
    +INGEKAPSELD
    +INGEKLEMD
    +INHOUDSTAFELS
    +INLANDSE
    +INQUISITEUR
    +INROEPEN
    +INSCHIKKELIJKHEID
    +INSOLVABEL
    +INTENSIVE
    +INTERDEPENDENTIE
    +INTERFACULTAIR
    +INTERMEDIAIR
    +INTERNATEN
    +INTERVAL
    +INTERVENIEERDE
    +INTRIGEREN
    +INVERS
    +INVOERRECHTEN
    +INWONEN
    +INZAKKINGEN
    +INZAMELEN
    +INZETBAARHEID
    +IONISATIE
    +ISCHIAS
    +JAARBOEKEN
    +JAGUAR
    +JEEP
    +JENEVERSTRUIKEN
    +JEUGDPUISTJES
    +JOJO
    +JOLIGER
    +JOURNALIST
    +JUNIORES
    +JUNKIES
    +JURISPRUDENTIE
    +JUTTE
    +KAALKOPPEN
    +KAARSEN
    +KAARTERS
    +KAARTJESKNIPPERS
    +KALLIGRAAF
    +KAMERPLANT
    +KAMPEERSPULLEN
    +KANDIDAAT
    +KANDIDAATSCHAP
    +KANNIBALEN
    +KANONLOPEN
    +KANTELEN
    +KANTELRAAM
    +KANTOORGEBOUWEN
    +KANTOORMACHINES
    +KAPITAALBEZITTER
    +KAPITALISTISCH
    +KAPOENTJE
    +KAPOTGESLAGEN
    +KAPOTMAKEN
    +KAPPEN
    +KAPPERSWINKELS
    +KARAKTEREIGENSCHAPPEN
    +KARAKTERTREK
    +KARAKTERTREKKEN
    +KASTIJDDE
    +KEERKRING
    +KELDERGATEN
    +KELDERRAMEN
    +KEMPENSE
    +KENNELIJKE
    +KERMISGAST
    +KERMISVOLK
    +KERNFYSICA
    +KETELLAPPER
    +KETTINGBRUG
    +KEUKENSPULLEN
    +KEURDERS
    +KEURIGER
    +KEUS
    +KEUZES
    +KIESDISTRICTEN
    +KIKKERVISJE
    +KIKVORS
    +KINDERBEDDEN
    +KINDERMOORDEN
    +KINDSKORF
    +KLAPBANKEN
    +KLEINZONEN
    +KLEIPOLDERS
    +KLEURENTOESTEL
    +KLEUTERPERIODE
    +KLIEKJES
    +KLOKKENGIETERIJEN
    +KLONT
    +KLOPGEEST
    +KLOTSEN
    +KNAAGDIEREN
    +KNALLERS
    +KNAPPER
    +KNIPOGEN
    +KNOTJE
    +KNOTSGEK
    +KOELBAKKEN
    +KOEMELK
    +KOEPELGEWELVEN
    +KOERSVERLOOP
    +KOFFIEMOLEN
    +KOLONIAAL
    +KOLONISTEN
    +KOLOSSEN
    +KOMEDIESPELER
    +KOMMAATJE
    +KONINGSGRAVEN
    +KONINKRIJK
    +KOOR
    +KOPIEBOEK
    +KOPLICHTEN
    +KORRELIG
    +KRABBELTJES
    +KRABCOCKTAIL
    +KRACHTWOORDEN
    +KREDIETGEVERS
    +KREDIETNEMERS
    +KRENG
    +KRENTENBOL
    +KREUNDE
    +KREUPELHOUT
    +KRISTAL
    +KRISTALACHTIGE
    +KRITISCHER
    +KRONKELDARMEN
    +KRONKELING
    +KRUIPER
    +KRUISHOUTEN
    +KUIF
    +KUNSTHISTORISCH
    +KUNSTIGHEID
    +KUNSTOBJECT
    +KURK
    +KUSTGEBIED
    +KWART
    +KWARTEL
    +KWARTIERMEESTER
    +KWARTNOOT
    +LAAGVLAKTES
    +LACHFILM
    +LANCEERBASIS
    +LANDBOUWCONSULENT
    +LANDBOUWMACHINE
    +LANDINGSBANEN
    +LANDINGSGESTEL
    +LANDSADVOCAAT
    +LANGGEREKTER
    +LANGLAUF
    +LANTARENTJE
    +LASTDRAGER
    +LASTGEVER
    +LAUWTJES
    +LEEMTEN
    +LEENMANNEN
    +LEENSPREUK
    +LEGIONAIR
    +LEIDERS
    +LEVENSSAPPEN
    +LEVENSSCHETS
    +LEVENSVRAAG
    +LEVENWEKKENDE
    +LEVERS
    +LIEDTEKSTEN
    +LIESBREUKEN
    +LIFTER
    +LIJDER
    +LIJKAUTO
    +LIJNBOOT
    +LINKERVLEUGEL
    +LIQUIDATIE
    +LITTERATUREN
    +LOFDICHTEN
    +LOGEERBED
    +LONGTUBERCULOSE
    +LOOFRIJK
    +LOOIERS
    +LORK
    +LOSBLADIGE
    +LOSZINNIGE
    +LUCHTLAGEN
    +LUSTELOOSHEID
    +LUWE
    +MAANDBASIS
    +MAATSCHAPPELIJKE
    +MAATSCHAPPIJLEER
    +MAATVERDELING
    +MACHIAVELLIST
    +MACHTSBELANGEN
    +MACHTSSTRIJD
    +MAINFRAME
    +MALSER
    +MANSCHAP
    +MARIONETTENSPEL
    +MARKTHANDEL
    +MARKTMECHANISMEN
    +MARKTONDERZOEKEN
    +MARKTRENTE
    +MASCOTTE
    +MASKERADE
    +MASSALER
    +MATERIALEN
    +MATRIX
    +MEDEONDERTEKENINGEN
    +MEDEOORZAKEN
    +MEDEVERANTWOORDELIJKHEID
    +MEDISCH
    +MEDITATIECENTRUM
    +MEEGAAND
    +MEEGEDRONKEN
    +MEEGEREDEN
    +MEETINSTRUMENTEN
    +MEETLIJNEN
    +MEEVOELEN
    +MEEWARIG
    +MEEWILLEN
    +MEISJESACHTIGE
    +MELANCHOLIE
    +MELKSTERS
    +MELKZUUR
    +MERKKLEDING
    +METSERSSTIEL
    +MEUTE
    +MICROBALANS
    +MICROMETERS
    +MIDDELLIJNEN
    +MIDDELMOOT
    +MIDDENBAAN
    +MIJNRAMP
    +MILDER
    +MINIEM
    +MINIMALISME
    +MINIMUMLOON
    +MISGELOPEN
    +MISSIEKRUISEN
    +MOBILE
    +MODELSCHOLEN
    +MODULEERDE
    +MOEDERKLOK
    +MOEIZAMER
    +MOLENASSEN
    +MOLENTJE
    +MOLLIGER
    +MOORDENARESSEN
    +MORGENMIDDAG
    +MUIS
    +MUTS
    +MUTSEN
    +MUZIEKTHEATER
    +NAAMKAARTJE
    +NABLOEIER
    +NACHTBOTEN
    +NACHTJAGER
    +NACHTVERGUNNING
    +NADRAGEN
    +NAGESTAARD
    +NANOMETER
    +NASEIZOEN
    +NAUWGEZET
    +NAVOLGERS
    +NAZANGEN
    +NEERGELEGD
    +NEERZITTEN
    +NEGENTIGSTE
    +NEGLIGEERDE
    +NEOLITHISCHE
    +NERTS
    +NESTEN
    +NETHEID
    +NETKAART
    +NETNUMMER
    +NEUSHOREN
    +NEUSWIJZE
    +NEUT
    +NEUTELS
    +NEUTRALIST
    +NEVENSCHIKKING
    +NIETIGHEDEN
    +NIEUWE
    +NIEUWERWETS
    +NIEUWSMEDIUM
    +NOORDERLING
    +NOORDOOSTELIJKE
    +NOORDWESTENWIND
    +NOTENMUSKAAT
    +NOTITIEBLOK
    +NUMMERBORD
    +NYLONS
    +OBSERVATORIUM
    +OCTAAN
    +OFFERDIEREN
    +OKERGELE
    +OLIEMAATSCHAPPIJ
    +OLIEVLEK
    +OLYMPIADEN
    +OMGEDAAN
    +OMGEVORMD
    +OMKNELD
    +OMKOMEN
    +OMSCHRIFTEN
    +OMSMELTEN
    +OMSTANDIG
    +OMVERGELOPEN
    +OMWASSEN
    +ONAANGERAAKT
    +ONBAATZUCHTIG
    +ONBEPERKTE
    +ONBETUIGD
    +ONBEWERKT
    +ONBEWOGEN
    +ONBILLIJKHEID
    +ONBRUIKBAARDER
    +ONDEFINIEERBAAR
    +ONDENKBARE
    +ONDERGEWAARDEERDE
    +ONDERGEWICHT
    +ONDERGRAVING
    +ONDERHANDELING
    +ONDERHOUDSBEURTEN
    +ONDERHOUDSMONTEURS
    +ONDERNEMINGSRADEN
    +ONDERSTEUNDE
    +ONDERWIJSKUNDIGEN
    +ONDERZOEKSTERS
    +ONDEUGENDER
    +ONDUIDELIJKE
    +ONECONOMISCHE
    +ONELINER
    +ONFEILBAARHEID
    +ONGECORRIGEERD
    +ONGEDULDIGHEID
    +ONGEHUWDE
    +ONGEMEUBILEERD
    +ONGENUANCEERD
    +ONGERIJMD
    +ONGEVAL
    +ONHANDELBAARDER
    +ONKREUKBARE
    +ONTBEERDE
    +ONTEVREDENHEID
    +ONTGLOEIEN
    +ONTGROENEN
    +ONTHAARDE
    +ONTHEEMDE
    +ONTKENNEND
    +ONTLADEN
    +ONTSLAGEN
    +ONTSMETTEND
    +ONTSMETTINGSMIDDELEN
    +ONTSPRONG
    +ONTVOERD
    +ONTVOERING
    +ONTWERPBEGROTING
    +ONTWRICHTING
    +ONUITBLUSBAAR
    +ONVASTE
    +ONVROUWELIJK
    +ONWEERSBUI
    +ONWEL
    +ONWELLEVENDHEID
    +OOGHOEKEN
    +OOGPUNTEN
    +OORLOGSLASTEN
    +OORLOGSZUCHTIG
    +OOST
    +OPDWEILEN
    +OPERACOMPONIST
    +OPGEHESEN
    +OPGELUCHTE
    +OPGESPEELD
    +OPHALERS
    +OPLAAIEN
    +OPLAPPEN
    +OPSCHEPPERIG
    +OPSLAGLOODS
    +OPSPOREN
    +OPSTELLER
    +OPSTRIJKEN
    +OPVALLENDST
    +OPVRAAGBAAR
    +OPVULLING
    +OPWINDEND
    +ORDELIEVEND
    +ORDELIEVENDE
    +ORGANOGRAMMEN
    +ORKESTLEIDERS
    +OVERBEVOLKT
    +OVERBOEKINGEN
    +OVERGESPEELD
    +OVERGEVOELIGHEIDSREACTIE
    +OVERGROTE
    +OVERHALEN
    +OVERLAPPEN
    +OVERLEGPARTNER
    +OVERPLAATSINGEN
    +OVERREDINGSKUNST
    +OVERRIJDEN
    +OVERSCHILDEREN
    +OVERSTEEK
    +OVERSTUURD
    +OVERWERKVERGOEDING
    +OVERWINTERINGEN
    +OXIDATIEF
    +PAARDENDIEF
    +PAASZONDAG
    +PAELLA
    +PANNENKOEK
    +PANTOMIMISCH
    +PARKIET
    +PARTIJBELANGEN
    +PARTIJDIGER
    +PATHOGENE
    +PATRIMONIAAL
    +PATRIMONIUM
    +PATRONISEERDE
    +PELLEN
    +PEPERS
    +PERFORATIES
    +PERIKELS
    +PERMANENTE
    +PERSGESPREK
    +PERSONEELSBLAD
    +PERSONEELSCHEF
    +PERSONENRECHT
    +PETROLEUMVERGASSER
    +PIEPTOON
    +PIJPBEEN
    +PIKEURS
    +PINKSTERWEKEN
    +PIONIERSTER
    +PISSEBEDDEN
    +PLAAGGEEST
    +PLAATIJZER
    +PLAFONDLATTEN
    +PLANTLUIZEN
    +PLASTRONS
    +PLEEGGEZINNEN
    +PLOETERAAR
    +PLONZEN
    +PLOOIDE
    +PLUNDERAAR
    +POEHA
    +POLLUTIE
    +POMPOENEN
    +PONSKAARTEN
    +POPGROEP
    +POPZENDER
    +PORNOGRAFISCH
    +PORTIERSTER
    +PORTRETTEERDE
    +POSITIONEREN
    +POSTINDUSTRIEEL
    +POSTKOLONIAAL
    +POSTVERVOER
    +POTENTAAT
    +POTIGE
    +POTTEN
    +PRECIEUZE
    +PRECISIE
    +PREDIKANTSWONINGEN
    +PREFIXEN
    +PRENTKAART
    +PRESTATIEMAATSCHAPPIJ
    +PREUTELAAR
    +PRIJSKAARTJES
    +PRIJSKARTEL
    +PRIJSVOORSCHRIFT
    +PRIMEUR
    +PRIMITIVITEIT
    +PRINCIPAAL
    +PRODUCTIEVE
    +PRODUCTIVITEITSVERHOGING
    +PROGRAMMEERTAAL
    +PROGRAMMEUR
    +PRONKKAST
    +PROOITJE
    +PROVINCIES
    +PRUILERIG
    +PRULLENWERK
    +PUMMELTJE
    +PUPPY
    +PUREREN
    +PURGEERDE
    +PURITEIN
    +PYREXGLAS
    +QUICHE
    +QUOTISATIE
    +RAADSLEDEN
    +RAASKALDE
    +RADARCONTROLES
    +RAFELIG
    +RAMMELKARREN
    +RAMMEN
    +RANKEN
    +RARITEITENVERZAMELINGEN
    +RATIFICEERDE
    +RATIONELER
    +REACTIEMOTOR
    +RECENT
    +RECHTSREGELS
    +RECHTSWEZEN
    +RECLAMEVERBOD
    +RECREATIERUIMTES
    +REDMIDDELEN
    +REGERINGSCRISIS
    +REGISTRATIEKOSTEN
    +REGLEMENTERING
    +REGULARISEREN
    +REISBILJET
    +REISGELEGENHEDEN
    +REISKOSTENVERGOEDING
    +REKBAND
    +RELATIVEREN
    +RENOVATIEPROJECTEN
    +RENTEBETALING
    +REPPEN
    +RESEM
    +RESULTEREN
    +REUZEN
    +REUZENZWAAI
    +REVUE
    +REVUETJE
    +RICHTINGSLIJNEN
    +RIDDERLINT
    +RIETJE
    +RIJWIELSTALLINGEN
    +RIVIERBED
    +ROBOTISEREN
    +ROBOTISERING
    +ROCKOPERA
    +ROLWAGEN
    +RONDSPOKEN
    +ROTARY
    +ROULETTE
    +ROZENBEDDEN
    +RUGGENSTEUN
    +RUGSPIER
    +RUIMTES
    +RUMOERDE
    +RUPSENNESTEN
    +RUSTOORD
    +RUSTSTOEL
    +RUZIEMAKER
    +SALARISSEN
    +SALARISVERMINDERING
    +SALONWAGEN
    +SAMENHORIGHEID
    +SAMENSPANNING
    +SARCASTISCHE
    +SARDIENEN
    +SATELLIETVERBINDING
    +SAUCIJZENBROODJE
    +SCHAAFBEITELS
    +SCHAALCOLLECTEN
    +SCHAALDE
    +SCHADUWKEGEL
    +SCHAFTUUR
    +SCHANDVLEKKEN
    +SCHAPPEN
    +SCHEER
    +SCHEMERLICHT
    +SCHENKINGEN
    +SCHEPPINGEN
    +SCHERMEN
    +SCHERPZINNIGER
    +SCHIETGATEN
    +SCHIJNREDENEN
    +SCHIKKING
    +SCHILDERAARS
    +SCHILDERSTUKKEN
    +SCHIMMELZIEKTES
    +SCHIMPNAAM
    +SCHIPPERSBOEK
    +SCHOLIEREN
    +SCHOONGEWREVEN
    +SCHOORSTEENVEGER
    +SCHOTWONDE
    +SCHRIJFBEHOEFTEN
    +SCHRIJFBLOK
    +SCHROOTWAARDE
    +SCHUIFLUIK
    +SCHUIMPJE
    +SCHUURSEL
    +SCOPE
    +SCRIPTORIUM
    +SECULARISME
    +SEINBORDEN
    +SEINLICHTEN
    +SEINSLEUTELS
    +SELECTIECRITERIA
    +SEMANTICUS
    +SENSATIEPERS
    +SERRETJE
    +SHOCKBEHANDELING
    +SHOCKTE
    +SIGARENAANSTEKERS
    +SIGARETTENMERK
    +SIKKELVORMIGE
    +SIMPLISTISCH
    +SIMULANTEN
    +SINAASAPPEL
    +SITES
    +SJANS
    +SKELET
    +SLAAP
    +SLAAPWANDELAARS
    +SLAGZEE
    +SLANGEKRUID
    +SLANGENEI
    +SLEEPTROSSEN
    +SLEUTELROLLEN
    +SLOKDARM
    +SLOPPENWIJKEN
    +SLOTGEBEDEN
    +SMELTOVEN
    +SMOUTEBOLLEN
    +SNELLER
    +SNIJMES
    +SNIJTAFELS
    +SODA
    +SOEPKIP
    +SOEPKOKERIJEN
    +SOEPTABLET
    +SOLDEN
    +SOMMIGE
    +SOORT
    +SPECIFIEK
    +SPEELPLAATS
    +SPERZIEBOON
    +SPIEGELTELESCOOP
    +SPILDE
    +SPILLEN
    +SPINNEN
    +SPINROK
    +SPITSMUIZEN
    +SPLIT
    +SPLITSHAMER
    +SPOEDDE
    +SPOORBOEKJES
    +SPORTPAK
    +SPORTRUBRIEK
    +SPRAAKORGAAN
    +SPRAKELOOS
    +SPRINGLADING
    +SPROEIVLIEGTUIG
    +STAAFMAGNEET
    +STAANPLAATS
    +STAATSLEER
    +STAATSMONOPOLIES
    +STABILISEREN
    +STADE
    +STADIUM
    +STAKERS
    +STALINIST
    +STAMPER
    +STANDAARDPROCEDURES
    +STAPELWOLKEN
    +STATISCHE
    +STEENACHTIGE
    +STEK
    +STEKKERTJE
    +STEMBUIGING
    +STEMHOKJE
    +STENGEL
    +STERRENSTELSELS
    +STEVENEN
    +STIEKEMERDS
    +STIJLTJE
    +STIKDONKER
    +STOER
    +STOMWEG
    +STOOKINRICHTINGEN
    +STOOKSEIZOEN
    +STOOMKLEP
    +STOPVERF
    +STRAATSLIJPER
    +STRAFREGISTERS
    +STRANDSCHELPEN
    +STREEFGETAL
    +STROBOSCOOP
    +STROOMGELEIDER
    +STUDENTE
    +STUDENTENLEVEN
    +STUDENTENVAKBOND
    +STUDENTIKOZER
    +STUKGOOIEN
    +STUKPRIJS
    +SUBSIDIEKRAAN
    +SUIKERKLONTJES
    +SULFAAT
    +SUPERMODERNE
    +SWEATER
    +SYLLABUSSEN
    +SYNCHRONISATIES
    +TAALFAMILIE
    +TAALGEBRUIKER
    +TABOE
    +TABULATOR
    +TACTLOOSHEID
    +TAMPONNEREN
    +TANTES
    +TARIFEREN
    +TAROT
    +TEAMGEEST
    +TEENKOOTJE
    +TEGENBOD
    +TEGENZIN
    +TEKTONISCH
    +TELEFONISTEN
    +TELEFOONBEANTWOORDER
    +TELEVISIETOESTELLEN
    +TEMMER
    +TEMPELIER
    +TEMPERATUURBEPALINGEN
    +TENTDAK
    +TERUGGEBELD
    +TERUGPLAATSEN
    +TERUGSTUREN
    +TERWIJL
    +THEEPLANTAGES
    +THEESTRUIKEN
    +THUISLANDEN
    +TIENDEN
    +TITANIUM
    +TOBDE
    +TOEFLUISTEREN
    +TOEGEMAAKT
    +TOEGROEIEN
    +TOEMAKEN
    +TOERENTELLERS
    +TOERISTISCHE
    +TOEWIJZINGSBELEID
    +TONDEUSE
    +TONEELSCHRIJVER
    +TORENVALKEN
    +TORSIE
    +TOUCHEERDE
    +TOXISCH
    +TRANSCENDENTALE
    +TRANSCENDENTE
    +TRANSFORMATORS
    +TRAPNAAIMACHINE
    +TREND
    +TRIBUNAALTJE
    +TRIVIUM
    +TROETELKINDEREN
    +TROTSE
    +TRUFFELSAUS
    +TUINSTAD
    +TUINTAFEL
    +TUIT
    +TUSSENFASE
    +TWEELINGEN
    +TWEERICHTINGSVERKEER
    +TYPISCHER
    +UITBOREN
    +UITDAGER
    +UITEENGEJAAGD
    +UITGAANSAVOND
    +UITGAANSKAS
    +UITGEBAZUIND
    +UITGEBRACHT
    +UITGESTELD
    +UITGEVERIJEN
    +UITGEZWAAID
    +UITLOOPMOGELIJKHEID
    +UITMONDEN
    +UITSPARING
    +UITVERKOREN
    +UITVOERDERS
    +UKELELES
    +UNIFORMEREN
    +UNIFORMPET
    +VAKANTIEHULPEN
    +VAKANTIEKIEKJE
    +VAKANTIETOESLAG
    +VALKUIL
    +VALLEITJE
    +VANGLIJN
    +VANGZEIL
    +VANZELFSPREKENDHEID
    +VARENTJE
    +VARKENSKARBONADES
    +VASTDRUKKEN
    +VECHTERS
    +VEELVLAKKEN
    +VEERTIENDAAGSE
    +VEERTIENDE
    +VEILIGHEIDSRAAD
    +VELODROOMS
    +VENSTERGLAZEN
    +VERBEURD
    +VERBLOEMING
    +VERBOOD
    +VERBOUWEREERDE
    +VERBROEDERINGEN
    +VERDEDIGEND
    +VERDERGAAN
    +VERDIKKEN
    +VERDRAG
    +VERDUVELDE
    +VERDWAALDE
    +VEREENZAMEN
    +VEREISTE
    +VERENIGINGSGEBOUW
    +VERESTERING
    +VERFIJND
    +VERFWINKELS
    +VERGAST
    +VERHASPELEN
    +VERHEVENHEID
    +VERHOED
    +VERJARING
    +VERKEER
    +VERKLEURDE
    +VERKOOPKOSTEN
    +VERKRACHTERS
    +VERKREUKEN
    +VERLENGEN
    +VERLENGINGEN
    +VERLOOFDE
    +VERLUCHT
    +VERLUCHTING
    +VERMIJDBARE
    +VERMINKINGEN
    +VERPAKT
    +VERPLAATSBAAR
    +VERPLETTEN
    +VERPRUTSEN
    +VERRICHTING
    +VERSCHEIDENHEID
    +VERSCHEURENDE
    +VERSCHOT
    +VERSIE
    +VERSLAGENHEID
    +VERSMALLING
    +VERSNIJDINGEN
    +VERSREGEL
    +VERTELLEN
    +VERTELLERS
    +VERTREKSEINEN
    +VERTROK
    +VERTROOSTTE
    +VERTWIJFELING
    +VERVILTEN
    +VERVLECHTEN
    +VERVOLGVRAAG
    +VERWERKT
    +VERZADIGDE
    +VERZAMELAARSTERS
    +VERZAMELEN
    +VERZEEPT
    +VERZEKERINGSGENEESKUNDIGEN
    +VERZENBUNDEL
    +VERZILVEREN
    +VERZORGEN
    +VEZELEN
    +VIERENVEERTIGSTE
    +VIERKANTIG
    +VIERKANTSVERGELIJKING
    +VIJANDELIJKHEID
    +VIJFTIGER
    +VILTACHTIG
    +VIOLET
    +VIOLISTISCH
    +VIOOLTJE
    +VIRAAL
    +VIROLOOG
    +VLEESLOZE
    +VLIEGDIENSTEN
    +VLIEGMACHINE
    +VLINDERNETTEN
    +VLOEKER
    +VLOEKWAARDIGE
    +VODDENRAPER
    +VOEDINGSBODEMS
    +VOELBAAR
    +VOETBALSPEL
    +VOETMATTEN
    +VOETNOTEN
    +VOLGAUTO
    +VOLKS
    +VOLKSSTEMMING
    +VOLKSUNIVERSITEIT
    +VOLKSVERGADERINGEN
    +VOLUPTUEUZE
    +VOLWASSENEN
    +VOORGESPIEGELD
    +VOORKAMER
    +VOORKEUREN
    +VOORKEURSTEMMEN
    +VOORLIEFDE
    +VOORONTWERPEN
    +VOOROORLOGSE
    +VOOROPSTELLING
    +VOORRANGSREGEL
    +VOORSPEL
    +VOORSTEDEN
    +VOORSTELLER
    +VOORTGEDUURD
    +VOORTGEPLANT
    +VOORTGESLEEPT
    +VOORTTREKKEN
    +VOORUITGESNELD
    +VORSTENKROON
    +VRATEN
    +VREETPARTIJ
    +VREUGDEVOLLE
    +VRIENDENKRING
    +VRIJERIJTJE
    +VROUWENSTUDIES
    +VROUWVRIENDELIJK
    +VUILHOOP
    +VUISTRECHT
    +WAANDE
    +WAARHEIDSGEHALTE
    +WAARLIJK
    +WAARMERK
    +WANHOOPSKRETEN
    +WANKELMOEDIGHEID
    +WAPENREKKEN
    +WAPENROEM
    +WARMTEBESTENDIG
    +WARMTEBESTENDIGE
    +WATERKARAF
    +WATERSNIPPEN
    +WEDERPARTIJEN
    +WEDIJVEREN
    +WEERKUNDIGEN
    +WEERLICHTTE
    +WEERMANNETJE
    +WEERSCHIJNSELS
    +WEES
    +WEESBOOM
    +WEGDUIKEN
    +WEGENBELASTING
    +WEGENVERKEERSREGLEMENT
    +WEGGELATEN
    +WEGGESCHOREN
    +WEGGETROKKEN
    +WEGGEWIST
    +WEKEN
    +WELGESTELD
    +WELLUSTIGE
    +WELSTANDSGRENS
    +WELVAREND
    +WERELD
    +WERELDBEROEMDE
    +WERKMEESTER
    +WERKNEMERSVERKLARINGEN
    +WERKSTUK
    +WERVEL
    +WETENSCHAPSWINKEL
    +WETTIGE
    +WICHELARIJ
    +WIJNVLEK
    +WINDSEL
    +WINDVAAN
    +WINDZAKKEN
    +WINKELGALERIJ
    +WINKELLADE
    +WINKELPRIJS
    +WINSTUITKERINGEN
    +WINTERTIJD
    +WISSELKANTOOR
    +WITGEKALKTE
    +WODKA
    +WOLHARIG
    +WONDERTEKEN
    +WONINGBOUW
    +WOUDREUS
    +WRAAKBAARDER
    +WRAAKZUCHTIG
    +WRAT
    +WRIJVINGSWARMTE
    +XENOFOBIE
    +YUPPIES
    +ZADELPIJN
    +ZADEN
    +ZAKENGESPREK
    +ZAKENLEVEN
    +ZALFPOTTEN
    +ZANDACHTIG
    +ZEDENDELICTEN
    +ZEEBANKET
    +ZEEFDOEK
    +ZEESCHILDERS
    +ZEESTRAAT
    +ZEEVERKENNER
    +ZEEWATER
    +ZENDINGSWERK
    +ZENUWSTELSEL
    +ZIEKENBOEKJE
    +ZIELENLEED
    +ZIELSZORG
    +ZIJDEUREN
    +ZIJRIVIEREN
    +ZIJVERTREK
    +ZINDERING
    +ZOEMER
    +ZOLDERTJE
    +ZOMERHUIZEN
    +ZORGGEDRAGEN
    +ZOTHEID
    +ZOUTSTROOIERS
    +ZUSTERGEMEENTE
    +ZUURSTOFVOORZIENING
    +ZUURVRIJE
    +ZWAARLIJVIGHEID
    +ZWAKTES
    +ZWAVELIG
    +ZWEEFTREINEN
    +ZWIEPEN
    diff --git a/wt-3.1.7a/examples/hangman/dict.txt b/wt-3.1.7a/examples/hangman/dict.txt
    new file mode 100644
    index 0000000..39b72f5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/dict.txt
    @@ -0,0 +1,18957 @@
    +ABACK
    +ABACUS
    +ABANDON
    +ABANDONED
    +ABANDONMENT
    +ABASHED
    +ABATE
    +ABBEY
    +ABBREVIATE
    +ABBREVIATION
    +ABDICATE
    +ABDICATION
    +ABDOMEN
    +ABDOMINAL
    +ABDUCT
    +ABDUCTION
    +ABERRATION
    +ABET
    +ABHOR
    +ABHORRENCE
    +ABHORRENT
    +ABIDE
    +ABIDING
    +ABILITY
    +ABJECT
    +ABLAZE
    +ABLE
    +ABLY
    +ABNORMAL
    +ABNORMALITY
    +ABNORMALLY
    +ABOARD
    +ABOLISH
    +ABOLITION
    +ABOLITIONIST
    +ABOMINABLE
    +ABORIGINAL
    +ABORIGINE
    +ABORT
    +ABORTION
    +ABORTIVE
    +ABOUND
    +ABOUT
    +ABOVE
    +ABOVEBOARD
    +ABRASIVE
    +ABRASIVELY
    +ABREAST
    +ABRIDGE
    +ABRIDGMENT
    +ABROAD
    +ABRUPT
    +ABRUPTLY
    +ABRUPTNESS
    +ABSCESS
    +ABSCOND
    +ABSENCE
    +ABSENT
    +ABSENTEE
    +ABSENTEEISM
    +ABSENTLY
    +ABSOLUTE
    +ABSOLUTELY
    +ABSOLVE
    +ABSORB
    +ABSORBED
    +ABSORBENT
    +ABSORBING
    +ABSORPTION
    +ABSTAIN
    +ABSTENTION
    +ABSTINENCE
    +ABSTINENT
    +ABSTRACT
    +ABSTRACTION
    +ABSURD
    +ABSURDITY
    +ABSURDLY
    +ABUNDANCE
    +ABUNDANT
    +ABUNDANTLY
    +ABUSE
    +ABUSIVE
    +ABYSMAL
    +ABYSMALLY
    +ABYSS
    +ACADEMIC
    +ACADEMICALLY
    +ACADEMY
    +ACCELERATE
    +ACCELERATION
    +ACCELERATOR
    +ACCENT
    +ACCENTED
    +ACCENTUATE
    +ACCEPT
    +ACCEPTABILITY
    +ACCEPTABLE
    +ACCEPTABLY
    +ACCEPTANCE
    +ACCEPTED
    +ACCESS
    +ACCESSIBILITY
    +ACCESSIBLE
    +ACCESSORY
    +ACCIDENT
    +ACCIDENTAL
    +ACCIDENTALLY
    +ACCLAIM
    +ACCLAIMED
    +ACCLIMATE
    +ACCLIMATION
    +ACCOLADE
    +ACCOMMODATE
    +ACCOMMODATING
    +ACCOMMODATION
    +ACCOMMODATIONS
    +ACCOMPANIMENT
    +ACCOMPANIST
    +ACCOMPANY
    +ACCOMPLICE
    +ACCOMPLISH
    +ACCOMPLISHED
    +ACCOMPLISHMENT
    +ACCORD
    +ACCORDANCE
    +ACCORDINGLY
    +ACCORDION
    +ACCOST
    +ACCOUNT
    +ACCOUNTABILITY
    +ACCOUNTABLE
    +ACCOUNTANT
    +ACCOUNTING
    +ACCREDITATION
    +ACCREDITED
    +ACCRUE
    +ACCUMULATE
    +ACCUMULATION
    +ACCURACY
    +ACCURATE
    +ACCURATELY
    +ACCUSATION
    +ACCUSE
    +ACCUSED
    +ACCUSER
    +ACCUSING
    +ACCUSINGLY
    +ACCUSTOM
    +ACCUSTOMED
    +ACERBIC
    +ACHE
    +ACHIEVE
    +ACHIEVEMENT
    +ACHIEVER
    +ACHY
    +ACID
    +ACIDIC
    +ACIDITY
    +ACKNOWLEDGE
    +ACKNOWLEDGED
    +ACKNOWLEDGMENT
    +ACNE
    +ACORN
    +ACOUSTIC
    +ACOUSTICS
    +ACQUAINT
    +ACQUAINTANCE
    +ACQUAINTED
    +ACQUIESCE
    +ACQUIESCENCE
    +ACQUIRE
    +ACQUISITION
    +ACQUIT
    +ACQUITTAL
    +ACRE
    +ACRID
    +ACRIMONIOUS
    +ACRIMONY
    +ACROBAT
    +ACROBATIC
    +ACROBATICS
    +ACRONYM
    +ACROSS
    +ACRYLIC
    +ACTING
    +ACTION
    +ACTIVATE
    +ACTIVATION
    +ACTIVE
    +ACTIVISM
    +ACTIVIST
    +ACTIVITY
    +ACTOR
    +ACTRESS
    +ACTUAL
    +ACTUALITY
    +ACTUALIZATION
    +ACTUALLY
    +ACUMEN
    +ACUPUNCTURE
    +ACUTE
    +ACUTELY
    +ADAGE
    +ADAMANT
    +ADAMANTLY
    +ADAPT
    +ADAPTABLE
    +ADAPTATION
    +ADAPTER
    +ADDICT
    +ADDICTED
    +ADDICTION
    +ADDICTIVE
    +ADDITION
    +ADDITIONAL
    +ADDITIONALLY
    +ADDITIVE
    +ADDRESS
    +ADEPT
    +ADEPTLY
    +ADEQUACY
    +ADEQUATE
    +ADEQUATELY
    +ADHERE
    +ADHERENCE
    +ADHERENT
    +ADHESION
    +ADHESIVE
    +ADJACENT
    +ADJECTIVAL
    +ADJECTIVE
    +ADJOIN
    +ADJOINING
    +ADJOURN
    +ADJOURNMENT
    +ADJUDICATE
    +ADJUDICATOR
    +ADJUNCT
    +ADJUST
    +ADJUSTABLE
    +ADJUSTMENT
    +ADMINISTER
    +ADMINISTRATION
    +ADMINISTRATIVE
    +ADMINISTRATOR
    +ADMIRABLE
    +ADMIRABLY
    +ADMIRAL
    +ADMIRATION
    +ADMIRE
    +ADMIRER
    +ADMIRING
    +ADMIRINGLY
    +ADMISSIBLE
    +ADMISSION
    +ADMIT
    +ADMITTANCE
    +ADMITTEDLY
    +ADMONISH
    +ADMONITION
    +ADOBE
    +ADOLESCENCE
    +ADOLESCENT
    +ADOPT
    +ADOPTED
    +ADOPTION
    +ADOPTIVE
    +ADORABLE
    +ADORATION
    +ADORE
    +ADORN
    +ADORNMENT
    +ADRENALINE
    +ADRIFT
    +ADROIT
    +ADROITLY
    +ADULATION
    +ADULT
    +ADULTERATE
    +ADULTERATION
    +ADULTERY
    +ADVANCE
    +ADVANCED
    +ADVANCEMENT
    +ADVANTAGE
    +ADVANTAGEOUS
    +ADVENT
    +ADVENT
    +ADVENTURE
    +ADVENTURER
    +ADVENTUROUS
    +ADVERB
    +ADVERBIAL
    +ADVERSARY
    +ADVERSE
    +ADVERSELY
    +ADVERSITY
    +ADVERTISE
    +ADVERTISEMENT
    +ADVERTISER
    +ADVERTISING
    +ADVICE
    +ADVISABLE
    +ADVISE
    +ADVISER
    +ADVISORY
    +ADVOCACY
    +ADVOCATE
    +AERIAL
    +AEROBIC
    +AEROBICS
    +AERODYNAMIC
    +AERODYNAMICS
    +AEROSOL
    +AEROSPACE
    +AESTHETIC
    +AESTHETICALLY
    +AESTHETICS
    +AFAR
    +AFFABLE
    +AFFABLY
    +AFFAIR
    +AFFAIRS
    +AFFECT
    +AFFECTATION
    +AFFECTED
    +AFFECTION
    +AFFECTIONATE
    +AFFECTIONATELY
    +AFFIDAVIT
    +AFFILIATE
    +AFFILIATED
    +AFFILIATION
    +AFFINITY
    +AFFIRM
    +AFFIRMATION
    +AFFIRMATIVE
    +AFFIRMATIVELY
    +AFFIX
    +AFFLICT
    +AFFLICTION
    +AFFLUENCE
    +AFFLUENT
    +AFFORD
    +AFFORDABLE
    +AFFRONT
    +AFLOAT
    +AFRAID
    +AFRESH
    +AFRICA
    +AFRICAN
    +AFTER
    +AFTEREFFECT
    +AFTERLIFE
    +AFTERMATH
    +AFTERNOON
    +AFTERSHAVE
    +AFTERSHOCK
    +AFTERTHOUGHT
    +AFTERWARD
    +AFTERWARDS
    +AGAIN
    +AGAINST
    +AGED
    +AGENCY
    +AGENDA
    +AGENT
    +AGES
    +AGGRAVATE
    +AGGRAVATING
    +AGGRAVATION
    +AGGRESSION
    +AGGRESSIVE
    +AGGRESSIVELY
    +AGGRESSIVENESS
    +AGGRESSOR
    +AGGRIEVED
    +AGHAST
    +AGILE
    +AGILITY
    +AGING
    +AGITATE
    +AGITATED
    +AGITATION
    +AGITATOR
    +AGNOSTIC
    +AGNOSTICISM
    +AGONIZE
    +AGONIZED
    +AGONIZING
    +AGONIZINGLY
    +AGONY
    +AGREE
    +AGREEABLE
    +AGREEABLY
    +AGREED
    +AGREEMENT
    +AGRICULTURAL
    +AGRICULTURE
    +AHEAD
    +AIDE
    +AIDS
    +AILING
    +AILMENT
    +AIMLESS
    +AIMLESSLY
    +AIRBORNE
    +AIRCRAFT
    +AIRFARE
    +AIRFIELD
    +AIRILY
    +AIRING
    +AIRLESS
    +AIRLINE
    +AIRLINER
    +AIRMAIL
    +AIRPLANE
    +AIRPORT
    +AIRS
    +AIRSPACE
    +AIRSTRIP
    +AIRTIGHT
    +AIRWAVES
    +AIRY
    +AISLE
    +AJAR
    +AKIN
    +ALARM
    +ALARMED
    +ALARMING
    +ALARMINGLY
    +ALARMIST
    +ALAS
    +ALBEIT
    +ALBINO
    +ALBUM
    +ALCOHOL
    +ALCOHOLIC
    +ALCOHOLISM
    +ALCOVE
    +ALDERMAN
    +ALDERWOMAN
    +ALERT
    +ALFALFA
    +ALGAE
    +ALGEBRA
    +ALGEBRAIC
    +ALGORITHM
    +ALIAS
    +ALIBI
    +ALIEN
    +ALIENATE
    +ALIENATION
    +ALIGHT
    +ALIGN
    +ALIGNMENT
    +ALIKE
    +ALIMONY
    +ALIVE
    +ALKALI
    +ALKALINE
    +ALLAH
    +ALLAY
    +ALLEGATION
    +ALLEGE
    +ALLEGED
    +ALLEGEDLY
    +ALLEGIANCE
    +ALLEGORICAL
    +ALLEGORY
    +ALLERGIC
    +ALLERGY
    +ALLEVIATE
    +ALLEVIATION
    +ALLEY
    +ALLIANCE
    +ALLIED
    +ALLIGATOR
    +ALLOCATE
    +ALLOCATION
    +ALLOT
    +ALLOTMENT
    +ALLOW
    +ALLOWABLE
    +ALLOWANCE
    +ALLOY
    +ALLUDE
    +ALLURE
    +ALLURING
    +ALLUSION
    +ALLY
    +ALMANAC
    +ALMIGHTY
    +ALMOND
    +ALMOST
    +ALMS
    +ALOFT
    +ALOHA
    +ALONE
    +ALONG
    +ALONGSIDE
    +ALOOF
    +ALOUD
    +ALPHABET
    +ALPHABETICAL
    +ALPHABETICALLY
    +ALPINE
    +ALREADY
    +ALRIGHT
    +ALSO
    +ALTAR
    +ALTER
    +ALTERATION
    +ALTERCATION
    +ALTERNATE
    +ALTERNATELY
    +ALTERNATION
    +ALTERNATIVE
    +ALTERNATIVELY
    +ALTHOUGH
    +ALTITUDE
    +ALTO
    +ALTOGETHER
    +ALTRUISM
    +ALTRUISTIC
    +ALUMINUM
    +ALUMNA
    +ALUMNAE
    +ALUMNI
    +ALUMNUS
    +ALWAYS
    +AMALGAMATE
    +AMALGAMATION
    +AMASS
    +AMATEUR
    +AMATEURISH
    +AMAZE
    +AMAZED
    +AMAZEMENT
    +AMAZING
    +AMAZINGLY
    +AMBASSADOR
    +AMBASSADORIAL
    +AMBER
    +AMBIANCE
    +AMBIDEXTROUS
    +AMBIGUITY
    +AMBIGUOUS
    +AMBIGUOUSLY
    +AMBITION
    +AMBITIOUS
    +AMBITIOUSLY
    +AMBIVALENCE
    +AMBIVALENT
    +AMBLE
    +AMBULANCE
    +AMBUSH
    +AMELIORATE
    +AMELIORATION
    +AMEN
    +AMENABLE
    +AMEND
    +AMENDMENT
    +AMENDS
    +AMENITY
    +AMERICA
    +AMERICAN
    +AMERICANA
    +AMERICANISM
    +AMIABLE
    +AMIABLY
    +AMICABLE
    +AMICABLY
    +AMID
    +AMIDST
    +AMISS
    +AMMO
    +AMMONIA
    +AMMUNITION
    +AMNESIA
    +AMNESIAC
    +AMNESTY
    +AMOEBA
    +AMOK
    +AMONG
    +AMONGST
    +AMORAL
    +AMOROUS
    +AMORPHOUS
    +AMOUNT
    +AMPERE
    +AMPHETAMINE
    +AMPHIBIAN
    +AMPHIBIOUS
    +AMPHITHEATER
    +AMPLE
    +AMPLIFICATION
    +AMPLIFIER
    +AMPLIFY
    +AMPLY
    +AMPUTATE
    +AMPUTATION
    +AMPUTEE
    +AMUSE
    +AMUSED
    +AMUSEMENT
    +AMUSING
    +ANACHRONISM
    +ANACHRONISTIC
    +ANAGRAM
    +ANAL
    +ANALGESIC
    +ANALOGOUS
    +ANALOGY
    +ANALYSES
    +ANALYSIS
    +ANALYST
    +ANALYTIC
    +ANALYZE
    +ANARCHIST
    +ANARCHY
    +ANATOMICAL
    +ANATOMY
    +ANCESTOR
    +ANCESTRAL
    +ANCESTRY
    +ANCHOR
    +ANCHORMAN
    +ANCHORWOMAN
    +ANCHOVY
    +ANCIENT
    +ANECDOTAL
    +ANECDOTE
    +ANEMIA
    +ANEMIC
    +ANESTHESIA
    +ANESTHESIOLOGIST
    +ANESTHETIC
    +ANESTHETIST
    +ANESTHETIZE
    +ANEW
    +ANGEL
    +ANGELIC
    +ANGELICALLY
    +ANGER
    +ANGLE
    +ANGLER
    +ANGLICAN
    +ANGLING
    +ANGLO
    +ANGRILY
    +ANGRY
    +ANGST
    +ANGUISH
    +ANGUISHED
    +ANGULAR
    +ANIMAL
    +ANIMATE
    +ANIMATED
    +ANIMATION
    +ANIMOSITY
    +ANKLE
    +ANNALS
    +ANNEX
    +ANNEXATION
    +ANNIHILATE
    +ANNIHILATION
    +ANNIVERSARY
    +ANNOTATED
    +ANNOUNCE
    +ANNOUNCEMENT
    +ANNOUNCER
    +ANNOY
    +ANNOYANCE
    +ANNOYED
    +ANNOYING
    +ANNUAL
    +ANNUALLY
    +ANNUITY
    +ANNUL
    +ANNULMENT
    +ANOINT
    +ANOMALOUS
    +ANONYMITY
    +ANONYMOUS
    +ANONYMOUSLY
    +ANOREXIA
    +ANOREXIC
    +ANOTHER
    +ANSWER
    +ANSWERABLE
    +ANTACID
    +ANTAGONISM
    +ANTAGONIST
    +ANTAGONISTIC
    +ANTAGONISTICALLY
    +ANTAGONIZE
    +ANTARCTIC
    +ANTARCTICA
    +ANTE
    +ANTEBELLUM
    +ANTELOPE
    +ANTENNA
    +ANTENNAE
    +ANTHEM
    +ANTHILL
    +ANTHOLOGY
    +ANTHROPOLOGICAL
    +ANTHROPOLOGIST
    +ANTHROPOLOGY
    +ANTIBIOTIC
    +ANTIBODY
    +ANTICIPATE
    +ANTICIPATION
    +ANTICLIMACTIC
    +ANTICLIMAX
    +ANTICS
    +ANTIDOTE
    +ANTIFREEZE
    +ANTIHISTAMINE
    +ANTIPATHY
    +ANTIPERSPIRANT
    +ANTIQUATED
    +ANTIQUE
    +ANTIQUITY
    +ANTISEPTIC
    +ANTISOCIAL
    +ANTITHESIS
    +ANTITRUST
    +ANTLER
    +ANTONYM
    +ANUS
    +ANVIL
    +ANXIETY
    +ANXIOUS
    +ANXIOUSLY
    +ANYBODY
    +ANYHOW
    +ANYMORE
    +ANYONE
    +ANYPLACE
    +ANYTHING
    +ANYTIME
    +ANYWAY
    +ANYWHERE
    +APART
    +APARTHEID
    +APARTMENT
    +APATHETIC
    +APATHY
    +APERITIF
    +APERTURE
    +APEX
    +APHORISM
    +APHRODISIAC
    +APIECE
    +APLOMB
    +APOCALYPSE
    +APOCALYPTIC
    +APOLITICAL
    +APOLOGETIC
    +APOLOGETICALLY
    +APOLOGIZE
    +APOLOGY
    +APOPLECTIC
    +APOPLEXY
    +APOSTLE
    +APOSTOLIC
    +APOSTROPHE
    +APPALL
    +APPALLING
    +APPALLINGLY
    +APPARATUS
    +APPAREL
    +APPARENT
    +APPARENTLY
    +APPARITION
    +APPEAL
    +APPEALING
    +APPEAR
    +APPEARANCE
    +APPEASE
    +APPEASEMENT
    +APPEND
    +APPENDAGE
    +APPENDICES
    +APPENDICITIS
    +APPENDIX
    +APPETITE
    +APPETIZER
    +APPETIZING
    +APPLAUD
    +APPLAUSE
    +APPLE
    +APPLESAUCE
    +APPLIANCE
    +APPLICABLE
    +APPLICANT
    +APPLICATION
    +APPLICATOR
    +APPLIED
    +APPLY
    +APPOINT
    +APPOINTED
    +APPOINTEE
    +APPOINTMENT
    +APPORTION
    +APPRAISAL
    +APPRAISE
    +APPRECIABLE
    +APPRECIATE
    +APPRECIATION
    +APPRECIATIVE
    +APPRECIATIVELY
    +APPREHEND
    +APPREHENSION
    +APPREHENSIVE
    +APPRENTICE
    +APPRENTICESHIP
    +APPRISE
    +APPROACH
    +APPROACHABLE
    +APPROBATION
    +APPROPRIATE
    +APPROPRIATELY
    +APPROPRIATION
    +APPROVAL
    +APPROVE
    +APPROVING
    +APPROVINGLY
    +APPROXIMATE
    +APPROXIMATELY
    +APPROXIMATION
    +APRICOT
    +APRIL
    +APRON
    +APTITUDE
    +APTLY
    +AQUARIA
    +AQUARIUM
    +AQUARIUS
    +AQUATIC
    +AQUEDUCT
    +ARAB
    +ARABIC
    +ARABLE
    +ARBITER
    +ARBITRARILY
    +ARBITRARY
    +ARBITRATE
    +ARBITRATION
    +ARBITRATOR
    +ARCADE
    +ARCH
    +ARCHAEOLOGICAL
    +ARCHAEOLOGIST
    +ARCHAEOLOGY
    +ARCHAIC
    +ARCHBISHOP
    +ARCHED
    +ARCHIPELAGO
    +ARCHITECT
    +ARCHITECTURAL
    +ARCHITECTURE
    +ARCHIVE
    +ARCHIVES
    +ARCHWAY
    +ARCTIC
    +ARCTIC
    +ARDENT
    +ARDENTLY
    +ARDOR
    +ARDUOUS
    +AREA
    +ARENA
    +ARGUABLE
    +ARGUABLY
    +ARGUE
    +ARGUMENT
    +ARGUMENTATIVE
    +ARIA
    +ARID
    +ARIES
    +ARISE
    +ARISEN
    +ARISTOCRACY
    +ARISTOCRAT
    +ARISTOCRATIC
    +ARITHMETIC
    +ARMADILLO
    +ARMAMENTS
    +ARMBAND
    +ARMCHAIR
    +ARMED
    +ARMFUL
    +ARMHOLE
    +ARMISTICE
    +ARMOR
    +ARMORED
    +ARMORY
    +ARMPIT
    +ARMS
    +ARMY
    +AROMA
    +AROMATIC
    +AROSE
    +AROUND
    +AROUSAL
    +AROUSE
    +ARRAIGN
    +ARRAIGNMENT
    +ARRANGE
    +ARRANGEMENT
    +ARRAY
    +ARREARS
    +ARREST
    +ARRIVAL
    +ARRIVE
    +ARROGANCE
    +ARROGANT
    +ARROGANTLY
    +ARROW
    +ARSENAL
    +ARSENIC
    +ARSON
    +ARSONIST
    +ARTERIAL
    +ARTERY
    +ARTHRITIC
    +ARTHRITIS
    +ARTICHOKE
    +ARTICLE
    +ARTICULATE
    +ARTICULATELY
    +ARTICULATION
    +ARTIFACT
    +ARTIFICIAL
    +ARTIFICIALLY
    +ARTILLERY
    +ARTISAN
    +ARTIST
    +ARTISTIC
    +ARTISTICALLY
    +ARTISTRY
    +ARTS
    +ARTSY
    +ARTWORK
    +ASAP
    +ASBESTOS
    +ASCEND
    +ASCENDANCY
    +ASCENDING
    +ASCENT
    +ASCERTAIN
    +ASCETIC
    +ASCRIBE
    +ASEXUAL
    +ASHAMED
    +ASHEN
    +ASHES
    +ASHORE
    +ASHTRAY
    +ASIA
    +ASIAN
    +ASIDE
    +ASKANCE
    +ASKEW
    +ASLEEP
    +ASPARAGUS
    +ASPECT
    +ASPERSION
    +ASPHALT
    +ASPHYXIATE
    +ASPHYXIATION
    +ASPIRATION
    +ASPIRE
    +ASPIRIN
    +ASPIRING
    +ASSAILANT
    +ASSASSIN
    +ASSASSINATE
    +ASSASSINATION
    +ASSAULT
    +ASSEMBLE
    +ASSEMBLY
    +ASSEMBLYMAN
    +ASSEMBLYWOMAN
    +ASSENT
    +ASSERT
    +ASSERTION
    +ASSERTIVE
    +ASSERTIVELY
    +ASSERTIVENESS
    +ASSESS
    +ASSESSMENT
    +ASSET
    +ASSHOLE
    +ASSIGN
    +ASSIGNMENT
    +ASSIMILATE
    +ASSIMILATION
    +ASSIST
    +ASSISTANCE
    +ASSISTANT
    +ASSOCIATE
    +ASSOCIATION
    +ASSORTED
    +ASSORTMENT
    +ASSUME
    +ASSUMPTION
    +ASSURANCE
    +ASSURE
    +ASSURED
    +ASSUREDLY
    +ASTERISK
    +ASTEROID
    +ASTHMA
    +ASTHMATIC
    +ASTONISH
    +ASTONISHED
    +ASTONISHING
    +ASTONISHINGLY
    +ASTONISHMENT
    +ASTOUND
    +ASTOUNDING
    +ASTRAY
    +ASTRIDE
    +ASTRINGENT
    +ASTROLOGER
    +ASTROLOGICAL
    +ASTROLOGY
    +ASTRONAUT
    +ASTRONOMER
    +ASTRONOMICAL
    +ASTRONOMY
    +ASTROTURF
    +ASTUTE
    +ASTUTELY
    +ASYLUM
    +ATHEISM
    +ATHEIST
    +ATHLETE
    +ATHLETIC
    +ATHLETICS
    +ATLANTIC
    +ATLAS
    +ATMOSPHERE
    +ATMOSPHERIC
    +ATOM
    +ATOMIC
    +ATONEMENT
    +ATROCIOUS
    +ATROCIOUSLY
    +ATROCITY
    +ATTACH
    +ATTACHE
    +ATTACHED
    +ATTACHMENT
    +ATTACK
    +ATTACKER
    +ATTAIN
    +ATTAINABLE
    +ATTAINMENT
    +ATTEMPT
    +ATTEND
    +ATTENDANCE
    +ATTENDANT
    +ATTENTION
    +ATTENTIVE
    +ATTENTIVELY
    +ATTEST
    +ATTIC
    +ATTIRE
    +ATTITUDE
    +ATTORNEY
    +ATTRACT
    +ATTRACTION
    +ATTRACTIVE
    +ATTRACTIVELY
    +ATTRACTIVENESS
    +ATTRIBUTABLE
    +ATTRIBUTE
    +ATTRIBUTION
    +ATTUNED
    +AUBURN
    +AUCTION
    +AUCTIONEER
    +AUDACIOUS
    +AUDACITY
    +AUDIBLE
    +AUDIBLY
    +AUDIENCE
    +AUDIO
    +AUDIOVISUAL
    +AUDIT
    +AUDITION
    +AUDITOR
    +AUDITORIUM
    +AUGMENT
    +AUGUST
    +AUNT
    +AURA
    +AURAL
    +AUSPICES
    +AUSPICIOUS
    +AUSTERE
    +AUSTERITY
    +AUSTRALIA
    +AUSTRALIAN
    +AUTHENTIC
    +AUTHENTICALLY
    +AUTHENTICATE
    +AUTHENTICITY
    +AUTHOR
    +AUTHORITARIAN
    +AUTHORITATIVE
    +AUTHORITATIVELY
    +AUTHORITY
    +AUTHORIZATION
    +AUTHORIZE
    +AUTHORSHIP
    +AUTISTIC
    +AUTO
    +AUTOBIOGRAPHICAL
    +AUTOBIOGRAPHY
    +AUTOCRACY
    +AUTOCRAT
    +AUTOCRATIC
    +AUTOGRAPH
    +AUTOMATE
    +AUTOMATIC
    +AUTOMATICALLY
    +AUTOMATION
    +AUTOMOBILE
    +AUTOMOTIVE
    +AUTONOMOUS
    +AUTONOMOUSLY
    +AUTONOMY
    +AUTOPSY
    +AUTOWORKER
    +AUTUMN
    +AUTUMNAL
    +AUXILIARY
    +AVAIL
    +AVAILABILITY
    +AVAILABLE
    +AVALANCHE
    +AVARICE
    +AVARICIOUS
    +AVENGE
    +AVENUE
    +AVERAGE
    +AVERSE
    +AVERSION
    +AVERT
    +AVIATION
    +AVIATOR
    +AVID
    +AVIDLY
    +AVOCADO
    +AVOID
    +AVOIDABLE
    +AVOIDANCE
    +AVOW
    +AVOWAL
    +AVOWED
    +AWAIT
    +AWAKE
    +AWAKEN
    +AWAKENING
    +AWARD
    +AWARE
    +AWARENESS
    +AWASH
    +AWAY
    +AWESOME
    +AWFUL
    +AWFULLY
    +AWHILE
    +AWKWARD
    +AWKWARDLY
    +AWKWARDNESS
    +AWNING
    +AWOKE
    +AWOKEN
    +AWOL
    +AWRY
    +AXES
    +AXIOM
    +AXIOMATIC
    +AXIS
    +AXLE
    +BABBLE
    +BABE
    +BABOON
    +BABY
    +BABYSAT
    +BABYSIT
    +BABYSITTER
    +BACHELOR
    +BACK
    +BACKBONE
    +BACKBREAKING
    +BACKDROP
    +BACKER
    +BACKFIRE
    +BACKGAMMON
    +BACKGROUND
    +BACKHAND
    +BACKHANDED
    +BACKING
    +BACKLASH
    +BACKLOG
    +BACKPACK
    +BACKPACKER
    +BACKSIDE
    +BACKSTAGE
    +BACKSTROKE
    +BACKTRACK
    +BACKUP
    +BACKWARD
    +BACKWARDS
    +BACKWOODS
    +BACKYARD
    +BACON
    +BACTERIA
    +BADE
    +BADGE
    +BADGER
    +BADLANDS
    +BADLY
    +BADMINTON
    +BADMOUTH
    +BAFFLE
    +BAFFLED
    +BAFFLING
    +BAGEL
    +BAGGAGE
    +BAGGY
    +BAGPIPES
    +BAIL
    +BAILIFF
    +BAIT
    +BAKE
    +BAKER
    +BAKERY
    +BALANCE
    +BALANCED
    +BALCONY
    +BALD
    +BALDING
    +BALE
    +BALEFUL
    +BALK
    +BALL
    +BALLAD
    +BALLERINA
    +BALLET
    +BALLISTIC
    +BALLISTICS
    +BALLOON
    +BALLOT
    +BALLPARK
    +BALLROOM
    +BALLS
    +BALM
    +BALMY
    +BALONEY
    +BAMBOO
    +BAMBOOZLE
    +BANAL
    +BANALITY
    +BANANA
    +BAND
    +BANDAGE
    +BANDANNA
    +BANDIT
    +BANDSTAND
    +BANDWAGON
    +BANDY
    +BANE
    +BANG
    +BANGLE
    +BANGS
    +BANISH
    +BANISTER
    +BANJO
    +BANK
    +BANKER
    +BANKING
    +BANKRUPT
    +BANKRUPTCY
    +BANNER
    +BANQUET
    +BANTER
    +BAPTISM
    +BAPTISMAL
    +BAPTIST
    +BAPTIZE
    +BARBARIAN
    +BARBARIC
    +BARBARISM
    +BARBECUE
    +BARBELL
    +BARBER
    +BARBITURATE
    +BARE
    +BAREFOOT
    +BARELY
    +BARF
    +BARGAIN
    +BARGE
    +BARITONE
    +BARK
    +BARLEY
    +BARN
    +BARNACLE
    +BARNYARD
    +BAROMETER
    +BAROMETRIC
    +BARON
    +BARRACKS
    +BARRAGE
    +BARREL
    +BARREN
    +BARRICADE
    +BARRIER
    +BARRING
    +BARRIO
    +BARROOM
    +BARTENDER
    +BARTER
    +BASE
    +BASEBALL
    +BASEMENT
    +BASES
    +BASH
    +BASHFUL
    +BASHING
    +BASIC
    +BASICALLY
    +BASICS
    +BASIN
    +BASIS
    +BASK
    +BASKET
    +BASKETBALL
    +BASS
    +BASSIST
    +BASSOON
    +BASTARD
    +BATCH
    +BATED
    +BATH
    +BATHE
    +BATHROBE
    +BATHROOM
    +BATHTUB
    +BATON
    +BATTALION
    +BATTER
    +BATTERED
    +BATTERY
    +BATTLE
    +BATTLEFIELD
    +BATTLEGROUND
    +BATTLESHIP
    +BAWDY
    +BAWL
    +BAYONET
    +BAYOU
    +BAZAAR
    +BEACH
    +BEACON
    +BEAD
    +BEADY
    +BEAGLE
    +BEAK
    +BEAKER
    +BEAM
    +BEAN
    +BEAR
    +BEARABLE
    +BEARD
    +BEARDED
    +BEARER
    +BEARING
    +BEAST
    +BEAT
    +BEATEN
    +BEATER
    +BEATING
    +BEAUTICIAN
    +BEAUTIFUL
    +BEAUTIFULLY
    +BEAUTY
    +BEAVER
    +BEBOP
    +BECAME
    +BECAUSE
    +BECKON
    +BECOME
    +BECOMING
    +BEDBUG
    +BEDCLOTHES
    +BEDDING
    +BEDLAM
    +BEDPAN
    +BEDRAGGLED
    +BEDRIDDEN
    +BEDROOM
    +BEDSIDE
    +BEDSPREAD
    +BEDTIME
    +BEECH
    +BEEF
    +BEEFY
    +BEEHIVE
    +BEELINE
    +BEEN
    +BEEP
    +BEEPER
    +BEER
    +BEESWAX
    +BEET
    +BEETLE
    +BEFALL
    +BEFALLEN
    +BEFELL
    +BEFIT
    +BEFITTING
    +BEFORE
    +BEFOREHAND
    +BEFRIEND
    +BEGAN
    +BEGGAR
    +BEGIN
    +BEGINNER
    +BEGINNING
    +BEGRUDGE
    +BEGUILE
    +BEGUN
    +BEHALF
    +BEHAVE
    +BEHAVIOR
    +BEHEAD
    +BEHIND
    +BEHOLD
    +BEHOLDER
    +BEIGE
    +BEING
    +BELATED
    +BELATEDLY
    +BELCH
    +BELIE
    +BELIEF
    +BELIEVABLE
    +BELIEVE
    +BELIEVER
    +BELITTLE
    +BELL
    +BELLIGERENCE
    +BELLOW
    +BELLY
    +BELLYBUTTON
    +BELONG
    +BELONGINGS
    +BELOVED
    +BELOW
    +BELT
    +BELTWAY
    +BEMUSED
    +BENCH
    +BENCHMARK
    +BEND
    +BENEATH
    +BENEDICTION
    +BENEFACTOR
    +BENEFICIAL
    +BENEFICIARY
    +BENEFIT
    +BENEVOLENCE
    +BENEVOLENT
    +BENIGN
    +BENT
    +BEQUEATH
    +BEQUEST
    +BERATE
    +BEREAVED
    +BEREAVEMENT
    +BEREFT
    +BERET
    +BERRY
    +BERSERK
    +BERTH
    +BESET
    +BESIDE
    +BESIDES
    +BESIEGE
    +BEST
    +BESTIAL
    +BESTIALITY
    +BESTOW
    +BESTSELLER
    +BETRAY
    +BETRAYAL
    +BETTER
    +BETTERMENT
    +BETWEEN
    +BEVELED
    +BEVERAGE
    +BEWARE
    +BEWILDERED
    +BEWILDERING
    +BEWILDERMENT
    +BEWITCHING
    +BEYOND
    +BIAS
    +BIASED
    +BIBLE
    +BIBLE
    +BIBLICAL
    +BIBLIOGRAPHY
    +BICENTENNIAL
    +BICEPS
    +BICKER
    +BICYCLE
    +BIDDEN
    +BIDDER
    +BIDDING
    +BIDE
    +BIENNIAL
    +BIFOCALS
    +BIGAMIST
    +BIGAMOUS
    +BIGAMY
    +BIGGIE
    +BIGMOUTH
    +BIGOT
    +BIGOTED
    +BIGOTRY
    +BIGWIG
    +BIKE
    +BIKER
    +BIKINI
    +BILATERAL
    +BILATERALLY
    +BILE
    +BILINGUAL
    +BILL
    +BILLBOARD
    +BILLFOLD
    +BILLIARDS
    +BILLION
    +BILLIONAIRE
    +BILLIONTH
    +BILLOW
    +BIMBO
    +BIMONTHLY
    +BINARY
    +BIND
    +BINDER
    +BINDING
    +BINGE
    +BINGO
    +BINOCULARS
    +BIOCHEMISTRY
    +BIODEGRADABLE
    +BIOGRAPHER
    +BIOGRAPHICAL
    +BIOGRAPHY
    +BIOLOGICAL
    +BIOLOGIST
    +BIOLOGY
    +BIOPSY
    +BIPARTISAN
    +BIPED
    +BIPLANE
    +BIRCH
    +BIRD
    +BIRDBRAINED
    +BIRDSEED
    +BIRTH
    +BIRTHDAY
    +BIRTHMARK
    +BIRTHPLACE
    +BIRTHRATE
    +BISCUIT
    +BISECT
    +BISECTION
    +BISEXUAL
    +BISHOP
    +BISON
    +BITCH
    +BITCHY
    +BITE
    +BITING
    +BITTEN
    +BITTER
    +BITTERLY
    +BITTERNESS
    +BIWEEKLY
    +BIZARRE
    +BLAB
    +BLABBERMOUTH
    +BLACK
    +BLACK
    +BLACKBERRY
    +BLACKBIRD
    +BLACKBOARD
    +BLACKEN
    +BLACKHEAD
    +BLACKJACK
    +BLACKLIST
    +BLACKMAIL
    +BLACKMAILER
    +BLACKNESS
    +BLACKOUT
    +BLACKSMITH
    +BLACKTOP
    +BLADDER
    +BLADE
    +BLAH
    +BLAME
    +BLAMELESS
    +BLANCH
    +BLAND
    +BLANDLY
    +BLANK
    +BLANKET
    +BLANKLY
    +BLANKNESS
    +BLARE
    +BLASE
    +BLASPHEME
    +BLASPHEMOUS
    +BLASPHEMY
    +BLAST
    +BLASTOFF
    +BLATANT
    +BLATANTLY
    +BLAZE
    +BLAZER
    +BLEACH
    +BLEACHERS
    +BLEAK
    +BLEAKLY
    +BLEAKNESS
    +BLEARILY
    +BLEARY
    +BLED
    +BLEED
    +BLEEDING
    +BLEMISH
    +BLEMISHED
    +BLEND
    +BLENDER
    +BLESS
    +BLESSED
    +BLESSING
    +BLEW
    +BLIGHT
    +BLIMP
    +BLIND
    +BLINDFOLD
    +BLINDLY
    +BLINDNESS
    +BLINK
    +BLIP
    +BLISS
    +BLISSFUL
    +BLISSFULLY
    +BLISTER
    +BLISTERING
    +BLITHE
    +BLITHELY
    +BLITZ
    +BLIZZARD
    +BLOATED
    +BLOB
    +BLOC
    +BLOCK
    +BLOCKADE
    +BLOCKAGE
    +BLOCKBUSTER
    +BLOCKHEAD
    +BLOND
    +BLOOD
    +BLOODBATH
    +BLOODHOUND
    +BLOODLESS
    +BLOODSHED
    +BLOODSHOT
    +BLOODSTAIN
    +BLOODSTAINED
    +BLOODSTREAM
    +BLOODTHIRSTY
    +BLOODY
    +BLOOM
    +BLOOPER
    +BLOSSOM
    +BLOT
    +BLOTCH
    +BLOTCHY
    +BLOTTER
    +BLOUSE
    +BLOW
    +BLOWN
    +BLOWOUT
    +BLOWTORCH
    +BLOWUP
    +BLUBBER
    +BLUDGEON
    +BLUE
    +BLUEBELL
    +BLUEBERRY
    +BLUEBIRD
    +BLUEGRASS
    +BLUEPRINT
    +BLUES
    +BLUFF
    +BLUISH
    +BLUNDER
    +BLUNT
    +BLUNTLY
    +BLUNTNESS
    +BLUR
    +BLURB
    +BLURRED
    +BLURRY
    +BLURT
    +BLUSH
    +BLUSHER
    +BOAR
    +BOARD
    +BOARDER
    +BOARDINGHOUSE
    +BOARDROOM
    +BOARDWALK
    +BOAST
    +BOASTFUL
    +BOAT
    +BOBBIN
    +BOBCAT
    +BOBSLED
    +BODICE
    +BODILY
    +BODY
    +BODYBUILDING
    +BODYGUARD
    +BODYWORK
    +BOGEYMAN
    +BOGGLE
    +BOGUS
    +BOHEMIAN
    +BOIL
    +BOILER
    +BOILING
    +BOISTEROUS
    +BOLD
    +BOLDLY
    +BOLDNESS
    +BOLOGNA
    +BOLSTER
    +BOLT
    +BOMB
    +BOMBARD
    +BOMBARDMENT
    +BOMBED
    +BOMBER
    +BOMBSHELL
    +BONANZA
    +BOND
    +BONDAGE
    +BONE
    +BONFIRE
    +BONGO
    +BONKERS
    +BONNET
    +BONUS
    +BONY
    +BOOB
    +BOOGIE
    +BOOK
    +BOOKCASE
    +BOOKEND
    +BOOKIE
    +BOOKING
    +BOOKKEEPER
    +BOOKKEEPING
    +BOOKLET
    +BOOKMAKER
    +BOOKMARK
    +BOOKS
    +BOOKSTORE
    +BOOKWORM
    +BOOM
    +BOOMERANG
    +BOON
    +BOONDOCKS
    +BOOR
    +BOORISH
    +BOOST
    +BOOSTER
    +BOOT
    +BOOTEE
    +BOOTH
    +BOOTLEG
    +BOOTLEGGER
    +BOOTSTRAPS
    +BOOTY
    +BOOZE
    +BOOZER
    +BORDER
    +BORDERLINE
    +BORE
    +BORED
    +BOREDOM
    +BORING
    +BORN
    +BORNE
    +BOROUGH
    +BORROW
    +BORROWER
    +BOSOM
    +BOSS
    +BOSSILY
    +BOSSINESS
    +BOSSY
    +BOTANICAL
    +BOTANIST
    +BOTANY
    +BOTCH
    +BOTH
    +BOTHER
    +BOTHERSOME
    +BOTTLE
    +BOTTLED
    +BOTTLENECK
    +BOTTOM
    +BOTTOMLESS
    +BOTTOMS
    +BOUGH
    +BOUGHT
    +BOULDER
    +BOULEVARD
    +BOUNCE
    +BOUNCER
    +BOUNCY
    +BOUND
    +BOUNDARY
    +BOUNDLESS
    +BOUNDS
    +BOUNTIFUL
    +BOUNTY
    +BOUQUET
    +BOURBON
    +BOURGEOIS
    +BOURGEOISIE
    +BOUT
    +BOUTIQUE
    +BOVINE
    +BOWEL
    +BOWL
    +BOWLEGGED
    +BOWLING
    +BOXCAR
    +BOXER
    +BOXING
    +BOYCOTT
    +BOYFRIEND
    +BOYHOOD
    +BOYISH
    +BOZO
    +BRACE
    +BRACELET
    +BRACES
    +BRACING
    +BRACKET
    +BRACKISH
    +BRAG
    +BRAGGART
    +BRAID
    +BRAILLE
    +BRAIN
    +BRAINCHILD
    +BRAINLESS
    +BRAINS
    +BRAINSTORM
    +BRAINWASH
    +BRAINWASHING
    +BRAINY
    +BRAISE
    +BRAKE
    +BRAN
    +BRANCH
    +BRAND
    +BRANDISH
    +BRANDY
    +BRASH
    +BRASS
    +BRASSIERE
    +BRASSY
    +BRAT
    +BRAVADO
    +BRAVE
    +BRAVELY
    +BRAVERY
    +BRAVO
    +BRAWL
    +BRAWN
    +BRAWNY
    +BRAY
    +BRAZEN
    +BRAZENLY
    +BRAZIER
    +BREACH
    +BREAD
    +BREADBASKET
    +BREADTH
    +BREADWINNER
    +BREAK
    +BREAKABLE
    +BREAKDOWN
    +BREAKFAST
    +BREAKNECK
    +BREAKTHROUGH
    +BREAKUP
    +BREAKWATER
    +BREAST
    +BREASTSTROKE
    +BREATH
    +BREATHE
    +BREATHER
    +BREATHING
    +BREATHLESS
    +BREATHLESSLY
    +BREATHTAKING
    +BREATHTAKINGLY
    +BRED
    +BREED
    +BREEDER
    +BREEDING
    +BREEZE
    +BREEZY
    +BRETHREN
    +BREVITY
    +BREW
    +BREWER
    +BREWERY
    +BRIBE
    +BRIBERY
    +BRICK
    +BRICKLAYER
    +BRICKLAYING
    +BRIDAL
    +BRIDE
    +BRIDEGROOM
    +BRIDESMAID
    +BRIDGE
    +BRIDLE
    +BRIEF
    +BRIEFCASE
    +BRIEFING
    +BRIEFLY
    +BRIEFS
    +BRIGADE
    +BRIGHT
    +BRIGHTEN
    +BRIGHTLY
    +BRIGHTNESS
    +BRILLIANCE
    +BRILLIANT
    +BRILLIANTLY
    +BRIM
    +BRINE
    +BRING
    +BRINK
    +BRINY
    +BRISK
    +BRISKLY
    +BRISTLE
    +BRITAIN
    +BRITCHES
    +BRITISH
    +BRITTLE
    +BROACH
    +BROAD
    +BROADCAST
    +BROADCASTER
    +BROADEN
    +BROADLY
    +BROADSIDE
    +BROCCOLI
    +BROCHURE
    +BROGUE
    +BROIL
    +BROILER
    +BROKE
    +BROKEN
    +BROKENHEARTED
    +BROKER
    +BROKERAGE
    +BRONCHITIS
    +BRONCO
    +BRONZE
    +BROOCH
    +BROOD
    +BROOK
    +BROOM
    +BROOMSTICK
    +BROTH
    +BROTHEL
    +BROTHER
    +BROTHERHOOD
    +BROTHERLY
    +BROUGHT
    +BROW
    +BROWBEAT
    +BROWN
    +BROWNIE
    +BROWNIE
    +BROWNIES
    +BROWNISH
    +BROWNSTONE
    +BROWSE
    +BROWSER
    +BRUISE
    +BRUNCH
    +BRUNETTE
    +BRUNT
    +BRUSH
    +BRUSQUE
    +BRUTAL
    +BRUTALITY
    +BRUTALIZE
    +BRUTALLY
    +BRUTE
    +BRUTISH
    +BUBBLE
    +BUBBLY
    +BUCK
    +BUCKET
    +BUCKLE
    +BUCKTOOTHED
    +BUDDHA
    +BUDDHISM
    +BUDDHIST
    +BUDDING
    +BUDDY
    +BUDGE
    +BUDGET
    +BUFF
    +BUFFALO
    +BUFFER
    +BUFFET
    +BUFFOON
    +BUGGY
    +BUGLE
    +BUILD
    +BUILDER
    +BUILDING
    +BUILDUP
    +BUILT
    +BULB
    +BULBOUS
    +BULGE
    +BULGING
    +BULK
    +BULKY
    +BULL
    +BULLDOG
    +BULLDOZE
    +BULLDOZER
    +BULLET
    +BULLETIN
    +BULLETPROOF
    +BULLFIGHT
    +BULLFIGHTER
    +BULLFIGHTING
    +BULLION
    +BULLISH
    +BULLSHIT
    +BULLY
    +BUMBLEBEE
    +BUMBLING
    +BUMMER
    +BUMP
    +BUMPER
    +BUMPY
    +BUNCH
    +BUNDLE
    +BUNGALOW
    +BUNGLE
    +BUNGLER
    +BUNION
    +BUNK
    +BUNKER
    +BUNNY
    +BUNS
    +BUOY
    +BUOYANCY
    +BUOYANT
    +BUOYANTLY
    +BURDEN
    +BUREAU
    +BUREAUCRACY
    +BUREAUCRAT
    +BUREAUCRATIC
    +BURGER
    +BURGLAR
    +BURGLARIZE
    +BURGLARY
    +BURIAL
    +BURLAP
    +BURLY
    +BURN
    +BURNER
    +BURNING
    +BURNISH
    +BURNT
    +BURP
    +BURROW
    +BURSAR
    +BURST
    +BURY
    +BUSBOY
    +BUSH
    +BUSHED
    +BUSHEL
    +BUSHY
    +BUSILY
    +BUSINESS
    +BUSINESSLIKE
    +BUSINESSMAN
    +BUSINESSWOMAN
    +BUSING
    +BUST
    +BUSTER
    +BUSTLE
    +BUSY
    +BUSYBODY
    +BUSYWORK
    +BUTCHER
    +BUTCHERY
    +BUTLER
    +BUTT
    +BUTTE
    +BUTTER
    +BUTTERCUP
    +BUTTERFINGERS
    +BUTTERFLY
    +BUTTERMILK
    +BUTTERSCOTCH
    +BUTTOCK
    +BUTTON
    +BUTTONHOLE
    +BUTTRESS
    +BUXOM
    +BUYER
    +BUYOUT
    +BUZZ
    +BUZZARD
    +BUZZER
    +BUZZWORD
    +BYGONE
    +BYLAW
    +BYPASS
    +BYSTANDER
    +BYTE
    +BYWAY
    +CABARET
    +CABBAGE
    +CABBY
    +CABIN
    +CABINET
    +CABINET
    +CABLE
    +CABOOSE
    +CACHE
    +CACHET
    +CACKLE
    +CACTI
    +CACTUS
    +CADAVER
    +CADENCE
    +CADET
    +CADRE
    +CAFE
    +CAFETERIA
    +CAFFEINE
    +CAGE
    +CAGED
    +CAGEY
    +CAHOOTS
    +CAJOLE
    +CAKE
    +CALAMITY
    +CALCIUM
    +CALCULATE
    +CALCULATED
    +CALCULATING
    +CALCULATION
    +CALCULATOR
    +CALCULUS
    +CALENDAR
    +CALF
    +CALIBER
    +CALIBRATE
    +CALIBRATION
    +CALICO
    +CALL
    +CALLER
    +CALLIGRAPHY
    +CALLING
    +CALLOUS
    +CALLOUSLY
    +CALLOUSNESS
    +CALLUS
    +CALM
    +CALMLY
    +CALMNESS
    +CALORIE
    +CALVES
    +CAMARADERIE
    +CAMCORDER
    +CAME
    +CAMEL
    +CAMELLIA
    +CAMEO
    +CAMERA
    +CAMERAMAN
    +CAMERAWOMAN
    +CAMOUFLAGE
    +CAMP
    +CAMPAIGN
    +CAMPAIGNER
    +CAMPER
    +CAMPGROUND
    +CAMPING
    +CAMPSITE
    +CAMPUS
    +CANADIAN
    +CANAL
    +CANARY
    +CANCEL
    +CANCELLATION
    +CANCER
    +CANCER
    +CANDID
    +CANDIDACY
    +CANDIDATE
    +CANDIDLY
    +CANDLE
    +CANDLELIGHT
    +CANDLESTICK
    +CANDOR
    +CANDY
    +CANE
    +CANINE
    +CANISTER
    +CANKER
    +CANNABIS
    +CANNED
    +CANNERY
    +CANNIBAL
    +CANNIBALISM
    +CANNON
    +CANNONBALL
    +CANNOT
    +CANNY
    +CANOE
    +CANOPIED
    +CANOPY
    +CANTALOUPE
    +CANTANKEROUS
    +CANTEEN
    +CANTER
    +CANTONESE
    +CANVAS
    +CANVASS
    +CANYON
    +CAPABILITY
    +CAPABLE
    +CAPACITY
    +CAPE
    +CAPER
    +CAPILLARY
    +CAPITAL
    +CAPITALISM
    +CAPITALIST
    +CAPITALIZATION
    +CAPITALIZE
    +CAPITOL
    +CAPITOL
    +CAPITULATE
    +CAPITULATION
    +CAPPUCCINO
    +CAPRICE
    +CAPRICIOUS
    +CAPRICIOUSLY
    +CAPRICORN
    +CAPSIZE
    +CAPSULE
    +CAPTAIN
    +CAPTION
    +CAPTIVATE
    +CAPTIVATING
    +CAPTIVE
    +CAPTIVITY
    +CAPTOR
    +CAPTURE
    +CARAMEL
    +CARAT
    +CARAVAN
    +CARBOHYDRATE
    +CARBON
    +CARBONATED
    +CARBURETOR
    +CARCASS
    +CARD
    +CARDBOARD
    +CARDIAC
    +CARDIGAN
    +CARDINAL
    +CARDIOLOGY
    +CARDS
    +CARE
    +CAREEN
    +CAREER
    +CAREFREE
    +CAREFUL
    +CAREFULLY
    +CAREFULNESS
    +CARELESS
    +CARELESSLY
    +CARELESSNESS
    +CARESS
    +CARETAKER
    +CARGO
    +CARIBBEAN
    +CARIBOU
    +CARICATURE
    +CARING
    +CARJACKER
    +CARJACKING
    +CARNAGE
    +CARNAL
    +CARNATION
    +CARNIVAL
    +CARNIVORE
    +CARNIVOROUS
    +CAROL
    +CAROUSE
    +CAROUSEL
    +CARP
    +CARPENTER
    +CARPENTRY
    +CARPET
    +CARPETED
    +CARPETING
    +CARRIAGE
    +CARRIER
    +CARROT
    +CARRY
    +CARRYOUT
    +CART
    +CARTEL
    +CARTILAGE
    +CARTOGRAPHER
    +CARTOGRAPHY
    +CARTON
    +CARTOON
    +CARTOONIST
    +CARTRIDGE
    +CARTWHEEL
    +CARVE
    +CARVING
    +CASCADE
    +CASE
    +CASEWORK
    +CASEWORKER
    +CASH
    +CASHEW
    +CASHIER
    +CASHMERE
    +CASING
    +CASINO
    +CASK
    +CASKET
    +CASSEROLE
    +CASSETTE
    +CAST
    +CASTAWAY
    +CASTE
    +CASTER
    +CASTIGATE
    +CASTIGATION
    +CASTING
    +CASTLE
    +CASTOFF
    +CASTRATE
    +CASTRATION
    +CASUAL
    +CASUALLY
    +CASUALNESS
    +CASUALTY
    +CATACLYSM
    +CATACLYSMIC
    +CATALOG
    +CATALYST
    +CATAMARAN
    +CATAPULT
    +CATARACT
    +CATASTROPHE
    +CATASTROPHIC
    +CATCH
    +CATCHING
    +CATCHY
    +CATECHISM
    +CATEGORICAL
    +CATEGORICALLY
    +CATEGORIZE
    +CATEGORY
    +CATER
    +CATERER
    +CATERING
    +CATERPILLAR
    +CATFISH
    +CATHEDRAL
    +CATHOLIC
    +CATHOLIC
    +CATHOLICISM
    +CATNAP
    +CATNIP
    +CATTLE
    +CATTY
    +CATWALK
    +CAUCASIAN
    +CAUCUS
    +CAUGHT
    +CAULIFLOWER
    +CAUSE
    +CAUSTIC
    +CAUTION
    +CAUTIONARY
    +CAUTIOUS
    +CAUTIOUSLY
    +CAVALIER
    +CAVALRY
    +CAVE
    +CAVEMAN
    +CAVERN
    +CAVIAR
    +CAVITY
    +CAVORT
    +CEASE
    +CEASELESS
    +CEASELESSLY
    +CEDAR
    +CEDE
    +CEILING
    +CELEBRATE
    +CELEBRATED
    +CELEBRATION
    +CELEBRITY
    +CELERY
    +CELESTIAL
    +CELIBACY
    +CELIBATE
    +CELL
    +CELLAR
    +CELLIST
    +CELLO
    +CELLOPHANE
    +CELLULAR
    +CELLULOID
    +CELLULOSE
    +CELSIUS
    +CEMENT
    +CEMETERY
    +CENSOR
    +CENSORSHIP
    +CENSURE
    +CENSUS
    +CENT
    +CENTENARY
    +CENTENNIAL
    +CENTER
    +CENTERPIECE
    +CENTIGRADE
    +CENTIMETER
    +CENTIPEDE
    +CENTRAL
    +CENTRALIZE
    +CENTRALLY
    +CENTURY
    +CERAMIC
    +CERAMICS
    +CEREAL
    +CEREBRAL
    +CEREMONIAL
    +CEREMONY
    +CERTAIN
    +CERTAINLY
    +CERTAINTY
    +CERTIFIABLE
    +CERTIFICATE
    +CERTIFICATION
    +CERTIFY
    +CERVICAL
    +CERVIX
    +CESAREAN
    +CESSATION
    +CESSPOOL
    +CHAFE
    +CHAGRIN
    +CHAIN
    +CHAINSAW
    +CHAIR
    +CHAIRMAN
    +CHAIRMANSHIP
    +CHAIRPERSON
    +CHAIRWOMAN
    +CHALET
    +CHALK
    +CHALKBOARD
    +CHALKY
    +CHALLENGE
    +CHALLENGED
    +CHALLENGER
    +CHALLENGING
    +CHAMBER
    +CHAMELEON
    +CHAMP
    +CHAMPAGNE
    +CHAMPION
    +CHAMPIONSHIP
    +CHANCE
    +CHANCELLOR
    +CHANDELIER
    +CHANGE
    +CHANGEABLE
    +CHANGEOVER
    +CHANNEL
    +CHANT
    +CHAOS
    +CHAOTIC
    +CHAP
    +CHAPEL
    +CHAPERONE
    +CHAPLAIN
    +CHAPPED
    +CHAPS
    +CHAPTER
    +CHAR
    +CHARACTER
    +CHARACTERISTIC
    +CHARACTERISTICALLY
    +CHARACTERIZATION
    +CHARACTERIZE
    +CHARADE
    +CHARADES
    +CHARCOAL
    +CHARGE
    +CHARIOT
    +CHARISMA
    +CHARISMATIC
    +CHARITABLE
    +CHARITABLY
    +CHARITY
    +CHARLATAN
    +CHARM
    +CHARMED
    +CHARMER
    +CHARMING
    +CHARRED
    +CHART
    +CHARTER
    +CHARTS
    +CHASE
    +CHASM
    +CHASSIS
    +CHASTE
    +CHASTEN
    +CHASTISE
    +CHASTISEMENT
    +CHASTITY
    +CHAT
    +CHATEAU
    +CHATEAUX
    +CHATTER
    +CHATTERBOX
    +CHATTY
    +CHAUFFEUR
    +CHAUVINISM
    +CHAUVINIST
    +CHAUVINISTIC
    +CHEAP
    +CHEAPEN
    +CHEAPLY
    +CHEAPNESS
    +CHEAPSKATE
    +CHEAT
    +CHEATER
    +CHECK
    +CHECKBOOK
    +CHECKED
    +CHECKER
    +CHECKERBOARD
    +CHECKERED
    +CHECKERS
    +CHECKLIST
    +CHECKMATE
    +CHECKOUT
    +CHECKPOINT
    +CHECKUP
    +CHEDDAR
    +CHEEK
    +CHEEKBONE
    +CHEER
    +CHEERFUL
    +CHEERFULLY
    +CHEERFULNESS
    +CHEERLEADER
    +CHEERS
    +CHEERY
    +CHEESE
    +CHEESEBURGER
    +CHEESECAKE
    +CHEESECLOTH
    +CHEETAH
    +CHEF
    +CHEMICAL
    +CHEMICALLY
    +CHEMIST
    +CHEMISTRY
    +CHEMOTHERAPY
    +CHERISH
    +CHERRY
    +CHERUB
    +CHESS
    +CHESSBOARD
    +CHEST
    +CHESTNUT
    +CHEW
    +CHEWY
    +CHIC
    +CHICANO
    +CHICK
    +CHICKADEE
    +CHICKEN
    +CHIDE
    +CHIEF
    +CHIEFLY
    +CHIEFTAIN
    +CHIFFON
    +CHILD
    +CHILDBEARING
    +CHILDBIRTH
    +CHILDCARE
    +CHILDHOOD
    +CHILDISH
    +CHILDISHLY
    +CHILDLESS
    +CHILDLIKE
    +CHILDPROOF
    +CHILDREN
    +CHILI
    +CHILL
    +CHILLING
    +CHILLY
    +CHIME
    +CHIMNEY
    +CHIMP
    +CHIMPANZEE
    +CHIN
    +CHINA
    +CHINATOWN
    +CHINESE
    +CHINK
    +CHINOS
    +CHINTZ
    +CHIP
    +CHIPMUNK
    +CHIPPER
    +CHIROPRACTOR
    +CHIRP
    +CHISEL
    +CHIT
    +CHITCHAT
    +CHIVALROUS
    +CHIVALRY
    +CHIVES
    +CHLORINATE
    +CHLORINE
    +CHLOROFORM
    +CHLOROPHYLL
    +CHOCOLATE
    +CHOICE
    +CHOIR
    +CHOKE
    +CHOLERA
    +CHOLESTEROL
    +CHOOSE
    +CHOOSY
    +CHOP
    +CHOPPER
    +CHOPPINESS
    +CHOPPY
    +CHOPSTICKS
    +CHORAL
    +CHORD
    +CHORE
    +CHOREOGRAPH
    +CHOREOGRAPHER
    +CHOREOGRAPHY
    +CHORTLE
    +CHORUS
    +CHOSE
    +CHOSEN
    +CHOW
    +CHOWDER
    +CHRIST
    +CHRISTEN
    +CHRISTENING
    +CHRISTIAN
    +CHRISTIANITY
    +CHRISTMAS
    +CHROME
    +CHROMIUM
    +CHROMOSOME
    +CHRONIC
    +CHRONICALLY
    +CHRONICLE
    +CHRONOLOGICAL
    +CHRONOLOGICALLY
    +CHRONOLOGY
    +CHRYSANTHEMUM
    +CHUBBY
    +CHUCK
    +CHUCKLE
    +CHUG
    +CHUM
    +CHUMP
    +CHUNK
    +CHUNKY
    +CHURCH
    +CHURCHGOER
    +CHURLISH
    +CHURN
    +CHUTE
    +CHUTZPAH
    +CIDER
    +CIGAR
    +CIGARETTE
    +CINCH
    +CINDER
    +CINEMA
    +CINEMATOGRAPHER
    +CINNAMON
    +CIPHER
    +CIRCA
    +CIRCLE
    +CIRCUIT
    +CIRCUITOUS
    +CIRCULAR
    +CIRCULATE
    +CIRCULATION
    +CIRCULATORY
    +CIRCUMCISE
    +CIRCUMCISION
    +CIRCUMFERENCE
    +CIRCUMSTANCE
    +CIRCUMSTANCES
    +CIRCUMSTANTIAL
    +CIRCUMVENT
    +CIRCUMVENTION
    +CIRCUS
    +CIRRHOSIS
    +CISTERN
    +CITATION
    +CITE
    +CITIZEN
    +CITIZENSHIP
    +CITRUS
    +CITY
    +CIVIC
    +CIVICS
    +CIVIL
    +CIVILIAN
    +CIVILIZATION
    +CIVILIZE
    +CIVILIZED
    +CIVILLY
    +CLACK
    +CLAD
    +CLAIM
    +CLAIRVOYANCE
    +CLAIRVOYANT
    +CLAM
    +CLAMBER
    +CLAMMY
    +CLAMOR
    +CLAMP
    +CLAMPDOWN
    +CLAN
    +CLANDESTINE
    +CLANG
    +CLANK
    +CLAP
    +CLAPBOARD
    +CLAPPER
    +CLARIFICATION
    +CLARIFY
    +CLARINET
    +CLARITY
    +CLASH
    +CLASP
    +CLASS
    +CLASSIC
    +CLASSICAL
    +CLASSICALLY
    +CLASSICS
    +CLASSIFICATION
    +CLASSIFIED
    +CLASSIFY
    +CLASSMATE
    +CLASSROOM
    +CLASSY
    +CLATTER
    +CLAUSE
    +CLAUSTROPHOBIA
    +CLAUSTROPHOBIC
    +CLAW
    +CLAY
    +CLEAN
    +CLEANER
    +CLEANERS
    +CLEANING
    +CLEANLINESS
    +CLEANLY
    +CLEANSE
    +CLEANSER
    +CLEANUP
    +CLEAR
    +CLEARANCE
    +CLEARING
    +CLEARLY
    +CLEAT
    +CLEAVAGE
    +CLEAVER
    +CLEF
    +CLEFT
    +CLEMENCY
    +CLENCH
    +CLERGY
    +CLERGYMAN
    +CLERGYWOMAN
    +CLERIC
    +CLERICAL
    +CLERK
    +CLEVER
    +CLEVERLY
    +CLEVERNESS
    +CLICHE
    +CLICK
    +CLIENT
    +CLIENTELE
    +CLIFF
    +CLIFFHANGER
    +CLIMACTIC
    +CLIMATE
    +CLIMATIC
    +CLIMAX
    +CLIMB
    +CLIMBER
    +CLINCH
    +CLING
    +CLINGING
    +CLINIC
    +CLINICAL
    +CLINICALLY
    +CLINICIAN
    +CLINK
    +CLIP
    +CLIPBOARD
    +CLIPPERS
    +CLIPPING
    +CLIQUE
    +CLITORIS
    +CLOAK
    +CLOAKROOM
    +CLOBBER
    +CLOCK
    +CLOCKWISE
    +CLOCKWORK
    +CLOD
    +CLOG
    +CLONE
    +CLOSE
    +CLOSED
    +CLOSELY
    +CLOSENESS
    +CLOSEOUT
    +CLOSET
    +CLOSURE
    +CLOT
    +CLOTH
    +CLOTHE
    +CLOTHED
    +CLOTHES
    +CLOTHESLINE
    +CLOTHESPIN
    +CLOTHING
    +CLOUD
    +CLOUDBURST
    +CLOUDLESS
    +CLOUDY
    +CLOUT
    +CLOVE
    +CLOVER
    +CLOWN
    +CLUB
    +CLUBHOUSE
    +CLUBS
    +CLUCK
    +CLUE
    +CLUELESS
    +CLUMP
    +CLUMSILY
    +CLUMSINESS
    +CLUMSY
    +CLUNG
    +CLUNK
    +CLUSTER
    +CLUTCH
    +CLUTCHES
    +CLUTTER
    +CLUTTERED
    +COACH
    +COAGULATE
    +COAGULATION
    +COAL
    +COALESCE
    +COALITION
    +COALS
    +COARSE
    +COARSELY
    +COARSEN
    +COAST
    +COASTAL
    +COASTER
    +COASTLINE
    +COAT
    +COATING
    +COAX
    +COBBLER
    +COBBLESTONE
    +COBRA
    +COBWEB
    +COCAINE
    +COCK
    +COCKEYED
    +COCKINESS
    +COCKPIT
    +COCKROACH
    +COCKTAIL
    +COCKY
    +COCOA
    +COCONUT
    +COCOON
    +CODE
    +COED
    +COEDUCATIONAL
    +COERCE
    +COERCION
    +COERCIVE
    +COEXIST
    +COEXISTENCE
    +COFFEE
    +COFFEEHOUSE
    +COFFIN
    +COGENCY
    +COGENT
    +COGENTLY
    +COGNAC
    +COHABIT
    +COHABITATION
    +COHERENCE
    +COHERENT
    +COHERENTLY
    +COHESION
    +COIL
    +COIN
    +COINCIDE
    +COINCIDENCE
    +COINCIDENTAL
    +COINCIDENTALLY
    +COKE
    +COKE
    +COLA
    +COLA
    +COLANDER
    +COLD
    +COLDLY
    +COLDNESS
    +COLESLAW
    +COLIC
    +COLLABORATE
    +COLLABORATION
    +COLLABORATOR
    +COLLAGE
    +COLLAPSE
    +COLLAPSIBLE
    +COLLAR
    +COLLARBONE
    +COLLATE
    +COLLATERAL
    +COLLEAGUE
    +COLLECT
    +COLLECTED
    +COLLECTIBLE
    +COLLECTION
    +COLLECTIVE
    +COLLECTIVELY
    +COLLECTOR
    +COLLEGE
    +COLLEGIATE
    +COLLIDE
    +COLLIE
    +COLLISION
    +COLLOQUIAL
    +COLLOQUIALISM
    +COLLOQUIALLY
    +COLLUSION
    +COLOGNE
    +COLON
    +COLONEL
    +COLONIAL
    +COLONIALISM
    +COLONIST
    +COLONIZATION
    +COLONIZE
    +COLONY
    +COLOR
    +COLORBLIND
    +COLORED
    +COLORFUL
    +COLORING
    +COLORLESS
    +COLOSSAL
    +COLT
    +COLUMN
    +COLUMNIST
    +COMA
    +COMATOSE
    +COMB
    +COMBAT
    +COMBATANT
    +COMBATIVE
    +COMBINATION
    +COMBINE
    +COMBINED
    +COMBUSTIBLE
    +COMBUSTION
    +COME
    +COMEBACK
    +COMEDIAN
    +COMEDOWN
    +COMEDY
    +COMET
    +COMEUPPANCE
    +COMFORT
    +COMFORTABLE
    +COMFORTABLY
    +COMFORTER
    +COMFORTING
    +COMFY
    +COMIC
    +COMICAL
    +COMICS
    +COMING
    +COMMA
    +COMMAND
    +COMMANDANT
    +COMMANDEER
    +COMMANDER
    +COMMANDING
    +COMMANDMENT
    +COMMANDO
    +COMMEMORATE
    +COMMEMORATION
    +COMMEMORATIVE
    +COMMENCE
    +COMMENCEMENT
    +COMMEND
    +COMMENDABLE
    +COMMENDATION
    +COMMENT
    +COMMENTARY
    +COMMENTATE
    +COMMENTATOR
    +COMMERCE
    +COMMERCIAL
    +COMMERCIALIZE
    +COMMERCIALLY
    +COMMISERATE
    +COMMISERATION
    +COMMISSION
    +COMMISSIONER
    +COMMIT
    +COMMITMENT
    +COMMITTED
    +COMMITTEE
    +COMMODITY
    +COMMODORE
    +COMMON
    +COMMONLY
    +COMMONPLACE
    +COMMONWEALTH
    +COMMOTION
    +COMMUNAL
    +COMMUNE
    +COMMUNICABLE
    +COMMUNICATE
    +COMMUNICATION
    +COMMUNICATIONS
    +COMMUNICATIVE
    +COMMUNION
    +COMMUNION
    +COMMUNIQUE
    +COMMUNISM
    +COMMUNIST
    +COMMUNITY
    +COMMUTE
    +COMMUTER
    +COMPACT
    +COMPANION
    +COMPANIONABLE
    +COMPANIONSHIP
    +COMPANY
    +COMPARABLE
    +COMPARATIVE
    +COMPARATIVELY
    +COMPARE
    +COMPARED
    +COMPARISON
    +COMPARTMENT
    +COMPARTMENTALIZE
    +COMPASS
    +COMPASSION
    +COMPASSIONATE
    +COMPATIBILITY
    +COMPATIBLE
    +COMPATRIOT
    +COMPEL
    +COMPELLING
    +COMPENSATE
    +COMPENSATION
    +COMPENSATORY
    +COMPETE
    +COMPETENCE
    +COMPETENT
    +COMPETENTLY
    +COMPETITION
    +COMPETITIVE
    +COMPETITIVELY
    +COMPETITIVENESS
    +COMPETITOR
    +COMPILATION
    +COMPILE
    +COMPLACENCY
    +COMPLACENT
    +COMPLAIN
    +COMPLAINT
    +COMPLEMENT
    +COMPLEMENTARY
    +COMPLETE
    +COMPLETELY
    +COMPLETION
    +COMPLEX
    +COMPLEXION
    +COMPLEXITY
    +COMPLIANCE
    +COMPLIANT
    +COMPLICATE
    +COMPLICATED
    +COMPLICATION
    +COMPLICITY
    +COMPLIMENT
    +COMPLIMENTARY
    +COMPLIMENTS
    +COMPLY
    +COMPONENT
    +COMPOSE
    +COMPOSED
    +COMPOSER
    +COMPOSITE
    +COMPOSITION
    +COMPOST
    +COMPOSURE
    +COMPOUND
    +COMPREHEND
    +COMPREHENSIBLE
    +COMPREHENSION
    +COMPREHENSIVE
    +COMPRESS
    +COMPRESSION
    +COMPRISE
    +COMPROMISE
    +COMPULSION
    +COMPULSIVE
    +COMPULSORY
    +COMPUNCTION
    +COMPUTATION
    +COMPUTE
    +COMPUTER
    +COMPUTERIZE
    +COMPUTING
    +COMRADE
    +COMRADESHIP
    +CONCAVE
    +CONCEAL
    +CONCEALMENT
    +CONCEDE
    +CONCEIT
    +CONCEITED
    +CONCEIVABLE
    +CONCEIVABLY
    +CONCEIVE
    +CONCENTRATE
    +CONCENTRATED
    +CONCENTRATION
    +CONCENTRIC
    +CONCEPT
    +CONCEPTION
    +CONCEPTUAL
    +CONCERN
    +CONCERNED
    +CONCERNING
    +CONCERT
    +CONCERTED
    +CONCERTO
    +CONCESSION
    +CONCIERGE
    +CONCILIATE
    +CONCILIATION
    +CONCILIATORY
    +CONCISE
    +CONCISELY
    +CONCISENESS
    +CONCLUDE
    +CONCLUDING
    +CONCLUSION
    +CONCLUSIVE
    +CONCLUSIVELY
    +CONCOCT
    +CONCOCTION
    +CONCOURSE
    +CONCRETE
    +CONCRETELY
    +CONCUR
    +CONCURRENCE
    +CONCURRENT
    +CONCURRENTLY
    +CONCUSSION
    +CONDEMN
    +CONDEMNATION
    +CONDENSATION
    +CONDENSE
    +CONDESCEND
    +CONDESCENDING
    +CONDESCENSION
    +CONDIMENT
    +CONDITION
    +CONDITIONAL
    +CONDITIONALLY
    +CONDITIONER
    +CONDITIONS
    +CONDO
    +CONDOLENCE
    +CONDOM
    +CONDOMINIUM
    +CONDONE
    +CONDOR
    +CONDUCIVE
    +CONDUCT
    +CONDUCTOR
    +CONE
    +CONFEDERACY
    +CONFEDERACY
    +CONFEDERATE
    +CONFEDERATE
    +CONFEDERATION
    +CONFER
    +CONFERENCE
    +CONFESS
    +CONFESSED
    +CONFESSION
    +CONFETTI
    +CONFIDANT
    +CONFIDE
    +CONFIDENCE
    +CONFIDENT
    +CONFIDENTIAL
    +CONFIDENTIALITY
    +CONFIDENTIALLY
    +CONFIDENTLY
    +CONFINE
    +CONFINED
    +CONFINEMENT
    +CONFINES
    +CONFIRM
    +CONFIRMATION
    +CONFIRMED
    +CONFISCATE
    +CONFISCATION
    +CONFLICT
    +CONFORM
    +CONFORMIST
    +CONFORMITY
    +CONFOUND
    +CONFRONT
    +CONFRONTATION
    +CONFUSE
    +CONFUSED
    +CONFUSING
    +CONFUSION
    +CONGEAL
    +CONGENIAL
    +CONGENITAL
    +CONGESTED
    +CONGESTION
    +CONGLOMERATE
    +CONGRATULATE
    +CONGRATULATIONS
    +CONGRATULATORY
    +CONGREGATE
    +CONGREGATION
    +CONGRESS
    +CONGRESS
    +CONGRESSIONAL
    +CONGRESSMAN
    +CONGRESSWOMAN
    +CONICAL
    +CONIFER
    +CONIFEROUS
    +CONJECTURE
    +CONJUGAL
    +CONJUGATE
    +CONJUGATION
    +CONJUNCTION
    +CONJURE
    +CONNECT
    +CONNECTED
    +CONNECTION
    +CONNIVANCE
    +CONNIVE
    +CONNOISSEUR
    +CONNOTATION
    +CONNOTE
    +CONQUER
    +CONQUEROR
    +CONQUEST
    +CONSCIENCE
    +CONSCIENTIOUS
    +CONSCIENTIOUSLY
    +CONSCIOUS
    +CONSCIOUSLY
    +CONSCIOUSNESS
    +CONSECRATE
    +CONSECRATION
    +CONSECUTIVE
    +CONSECUTIVELY
    +CONSENSUS
    +CONSENT
    +CONSEQUENCE
    +CONSEQUENT
    +CONSEQUENTLY
    +CONSERVATION
    +CONSERVATIONIST
    +CONSERVATISM
    +CONSERVATIVE
    +CONSERVATIVELY
    +CONSERVATOR
    +CONSERVATORY
    +CONSERVE
    +CONSIDER
    +CONSIDERABLE
    +CONSIDERABLY
    +CONSIDERATE
    +CONSIDERATELY
    +CONSIDERATION
    +CONSIDERING
    +CONSIGN
    +CONSIGNMENT
    +CONSIST
    +CONSISTENCY
    +CONSISTENT
    +CONSISTENTLY
    +CONSOLATION
    +CONSOLE
    +CONSOLIDATE
    +CONSOLIDATION
    +CONSOMME
    +CONSONANT
    +CONSORT
    +CONSORTIA
    +CONSORTIUM
    +CONSPICUOUS
    +CONSPICUOUSLY
    +CONSPIRACY
    +CONSPIRATOR
    +CONSPIRATORIAL
    +CONSPIRE
    +CONSTANT
    +CONSTANTLY
    +CONSTELLATION
    +CONSTERNATION
    +CONSTIPATED
    +CONSTIPATION
    +CONSTITUENCY
    +CONSTITUENT
    +CONSTITUTE
    +CONSTITUTION
    +CONSTITUTION
    +CONSTITUTIONAL
    +CONSTRAIN
    +CONSTRAINT
    +CONSTRICT
    +CONSTRICTION
    +CONSTRUCT
    +CONSTRUCTION
    +CONSTRUCTIVE
    +CONSTRUCTIVELY
    +CONSTRUE
    +CONSUL
    +CONSULAR
    +CONSULATE
    +CONSULT
    +CONSULTANT
    +CONSULTATION
    +CONSULTING
    +CONSUME
    +CONSUMER
    +CONSUMING
    +CONSUMMATE
    +CONSUMMATION
    +CONSUMPTION
    +CONTACT
    +CONTAGIOUS
    +CONTAIN
    +CONTAINER
    +CONTAMINATE
    +CONTAMINATION
    +CONTEMPLATE
    +CONTEMPLATION
    +CONTEMPLATIVE
    +CONTEMPORARY
    +CONTEMPT
    +CONTEMPTIBLE
    +CONTEMPTUOUS
    +CONTEND
    +CONTENDER
    +CONTENT
    +CONTENTED
    +CONTENTEDLY
    +CONTENTION
    +CONTENTIOUS
    +CONTENTMENT
    +CONTENTS
    +CONTEST
    +CONTESTANT
    +CONTEXT
    +CONTIGUOUS
    +CONTINENT
    +CONTINENTAL
    +CONTINGENCY
    +CONTINGENT
    +CONTINUAL
    +CONTINUALLY
    +CONTINUATION
    +CONTINUE
    +CONTINUED
    +CONTINUITY
    +CONTINUOUS
    +CONTINUOUSLY
    +CONTORT
    +CONTORTION
    +CONTOUR
    +CONTRABAND
    +CONTRACEPTION
    +CONTRACEPTIVE
    +CONTRACT
    +CONTRACTION
    +CONTRACTOR
    +CONTRACTUAL
    +CONTRADICT
    +CONTRADICTION
    +CONTRADICTORY
    +CONTRAPTION
    +CONTRARY
    +CONTRAST
    +CONTRASTING
    +CONTRAVENE
    +CONTRAVENTION
    +CONTRIBUTE
    +CONTRIBUTION
    +CONTRIBUTOR
    +CONTRIBUTORY
    +CONTRITE
    +CONTRITION
    +CONTRIVE
    +CONTRIVED
    +CONTROL
    +CONTROLLED
    +CONTROLLER
    +CONTROVERSIAL
    +CONTROVERSY
    +CONVALESCE
    +CONVALESCENCE
    +CONVALESCENT
    +CONVENE
    +CONVENIENCE
    +CONVENIENT
    +CONVENIENTLY
    +CONVENT
    +CONVENTION
    +CONVENTIONAL
    +CONVENTIONALLY
    +CONVERGE
    +CONVERSANT
    +CONVERSATION
    +CONVERSATIONAL
    +CONVERSE
    +CONVERSELY
    +CONVERSION
    +CONVERT
    +CONVERTIBLE
    +CONVEX
    +CONVEY
    +CONVICT
    +CONVICTION
    +CONVINCE
    +CONVINCED
    +CONVINCING
    +CONVINCINGLY
    +CONVIVIAL
    +CONVOLUTED
    +CONVOY
    +CONVULSE
    +CONVULSION
    +COOK
    +COOKBOOK
    +COOKIE
    +COOKING
    +COOKOUT
    +COOL
    +COOLER
    +COOLLY
    +COOLNESS
    +COOP
    +COOPERATE
    +COOPERATION
    +COOPERATIVE
    +COORDINATE
    +COORDINATION
    +COORDINATOR
    +COPE
    +COPIER
    +COPILOT
    +COPIOUS
    +COPPER
    +COPTER
    +COPULATE
    +COPULATION
    +COPY
    +COPYRIGHT
    +CORAL
    +CORD
    +CORDIAL
    +CORDIALITY
    +CORDIALLY
    +CORDLESS
    +CORDON
    +CORDUROY
    +CORE
    +CORK
    +CORKSCREW
    +CORN
    +CORNBREAD
    +CORNEA
    +CORNER
    +CORNERSTONE
    +CORNET
    +CORNFLAKES
    +CORNMEAL
    +CORNSTARCH
    +CORNY
    +CORONARY
    +CORONATION
    +CORONER
    +CORPORAL
    +CORPORATE
    +CORPORATION
    +CORPS
    +CORPSE
    +CORPULENT
    +CORPUSCLE
    +CORRAL
    +CORRECT
    +CORRECTION
    +CORRECTIVE
    +CORRECTLY
    +CORRECTNESS
    +CORRELATE
    +CORRELATION
    +CORRESPOND
    +CORRESPONDENCE
    +CORRESPONDENT
    +CORRESPONDING
    +CORRESPONDINGLY
    +CORRIDOR
    +CORROBORATE
    +CORROBORATION
    +CORRODE
    +CORROSION
    +CORROSIVE
    +CORRUGATED
    +CORRUPT
    +CORRUPTIBLE
    +CORRUPTION
    +CORSAGE
    +CORSET
    +COSMETIC
    +COSMIC
    +COSMONAUT
    +COSMOPOLITAN
    +COSMOS
    +COST
    +COSTAR
    +COSTLY
    +COSTUME
    +COTTAGE
    +COTTON
    +COTTONWOOD
    +COUCH
    +COUGAR
    +COUGH
    +COULD
    +COUNCIL
    +COUNCILOR
    +COUNSEL
    +COUNSELING
    +COUNSELOR
    +COUNT
    +COUNTABLE
    +COUNTDOWN
    +COUNTENANCE
    +COUNTER
    +COUNTERACT
    +COUNTERATTACK
    +COUNTERBALANCE
    +COUNTERCLOCKWISE
    +COUNTERFEIT
    +COUNTERFEITER
    +COUNTERPART
    +COUNTERPRODUCTIVE
    +COUNTERSIGN
    +COUNTLESS
    +COUNTRY
    +COUNTRYMAN
    +COUNTRYSIDE
    +COUNTRYWOMAN
    +COUNTY
    +COUP
    +COUPLE
    +COUPON
    +COURAGE
    +COURAGEOUS
    +COURAGEOUSLY
    +COURIER
    +COURSE
    +COURT
    +COURTEOUS
    +COURTEOUSLY
    +COURTESY
    +COURTHOUSE
    +COURTROOM
    +COURTSHIP
    +COURTYARD
    +COUSIN
    +COVE
    +COVENANT
    +COVER
    +COVERAGE
    +COVERALLS
    +COVERED
    +COVERING
    +COVERS
    +COVERT
    +COVERTLY
    +COVET
    +COVETOUS
    +COWARD
    +COWARDICE
    +COWARDLY
    +COWBOY
    +COWER
    +COWGIRL
    +COWORKER
    +COYOTE
    +COZY
    +CRAB
    +CRABBY
    +CRACK
    +CRACKDOWN
    +CRACKED
    +CRACKER
    +CRACKLE
    +CRACKPOT
    +CRADLE
    +CRAFT
    +CRAFTILY
    +CRAFTSMAN
    +CRAFTSMANSHIP
    +CRAFTY
    +CRAGGY
    +CRAM
    +CRAMMED
    +CRAMP
    +CRAMPED
    +CRAMPS
    +CRANBERRY
    +CRANE
    +CRANIUM
    +CRANK
    +CRANKY
    +CRANNY
    +CRAP
    +CRAPPY
    +CRAPS
    +CRASH
    +CRASS
    +CRATE
    +CRATER
    +CRAVAT
    +CRAVE
    +CRAVING
    +CRAWL
    +CRAYFISH
    +CRAYON
    +CRAZE
    +CRAZED
    +CRAZILY
    +CRAZINESS
    +CRAZY
    +CREAK
    +CREAKY
    +CREAM
    +CREAMY
    +CREASE
    +CREATE
    +CREATION
    +CREATIVE
    +CREATIVELY
    +CREATIVITY
    +CREATOR
    +CREATURE
    +CREDENCE
    +CREDENTIALS
    +CREDIBILITY
    +CREDIBLE
    +CREDIBLY
    +CREDIT
    +CREDITABLE
    +CREDITOR
    +CREDO
    +CREED
    +CREEK
    +CREEP
    +CREEPY
    +CREMATE
    +CREMATION
    +CREMATORIA
    +CREMATORIUM
    +CREOLE
    +CREPE
    +CREPT
    +CRESCENDO
    +CRESCENT
    +CREST
    +CRESTFALLEN
    +CREVASSE
    +CREVICE
    +CREW
    +CRIB
    +CRICK
    +CRICKET
    +CRIME
    +CRIMINAL
    +CRIMP
    +CRIMSON
    +CRINGE
    +CRINKLE
    +CRINKLY
    +CRIPPLE
    +CRIPPLED
    +CRIPPLING
    +CRISES
    +CRISIS
    +CRISP
    +CRISPLY
    +CRISPY
    +CRISSCROSS
    +CRITERIA
    +CRITERION
    +CRITIC
    +CRITICAL
    +CRITICALLY
    +CRITICISM
    +CRITICIZE
    +CRITIQUE
    +CRITTER
    +CROAK
    +CROCHET
    +CROCK
    +CROCKERY
    +CROCODILE
    +CROCUS
    +CROISSANT
    +CRONY
    +CROOK
    +CROOKED
    +CROON
    +CROONER
    +CROP
    +CROQUET
    +CROSS
    +CROSSBOW
    +CROSSCHECK
    +CROSSFIRE
    +CROSSING
    +CROSSOVER
    +CROSSROADS
    +CROSSTOWN
    +CROSSWALK
    +CROSSWORD
    +CROTCH
    +CROUCH
    +CROW
    +CROWBAR
    +CROWD
    +CROWDED
    +CROWN
    +CROWNING
    +CRUCIAL
    +CRUCIALLY
    +CRUCIFIX
    +CRUCIFIXION
    +CRUCIFY
    +CRUD
    +CRUDDY
    +CRUDE
    +CRUDELY
    +CRUEL
    +CRUELLY
    +CRUELTY
    +CRUISE
    +CRUISER
    +CRUMB
    +CRUMBLE
    +CRUMMY
    +CRUMPLE
    +CRUNCH
    +CRUNCHY
    +CRUSADE
    +CRUSADER
    +CRUSH
    +CRUSHING
    +CRUST
    +CRUSTACEAN
    +CRUSTY
    +CRUTCH
    +CRUX
    +CRYBABY
    +CRYING
    +CRYPT
    +CRYPTIC
    +CRYPTICALLY
    +CRYSTAL
    +CRYSTALLIZATION
    +CRYSTALLIZE
    +CUBE
    +CUBIC
    +CUBICLE
    +CUCKOO
    +CUCUMBER
    +CUDDLE
    +CUDDLY
    +CUFF
    +CUISINE
    +CULINARY
    +CULL
    +CULMINATE
    +CULMINATION
    +CULPABILITY
    +CULPABLE
    +CULPRIT
    +CULT
    +CULTIVATE
    +CULTIVATED
    +CULTIVATION
    +CULTURAL
    +CULTURALLY
    +CULTURE
    +CULTURED
    +CUMBERSOME
    +CUMULATIVE
    +CUNNING
    +CUNNINGLY
    +CUPBOARD
    +CUPCAKE
    +CURABLE
    +CURATOR
    +CURB
    +CURD
    +CURDLE
    +CURE
    +CURFEW
    +CURIO
    +CURIOSITY
    +CURIOUS
    +CURIOUSLY
    +CURL
    +CURLER
    +CURLY
    +CURRANT
    +CURRENCY
    +CURRENT
    +CURRENTLY
    +CURRICULA
    +CURRICULUM
    +CURRY
    +CURSE
    +CURSED
    +CURSOR
    +CURSORY
    +CURT
    +CURTAIL
    +CURTAIN
    +CURTSY
    +CURVE
    +CURVY
    +CUSHION
    +CUSS
    +CUSTARD
    +CUSTODIAL
    +CUSTODIAN
    +CUSTODY
    +CUSTOM
    +CUSTOMARILY
    +CUSTOMARY
    +CUSTOMER
    +CUSTOMIZE
    +CUSTOMS
    +CUTBACK
    +CUTE
    +CUTELY
    +CUTENESS
    +CUTICLE
    +CUTLERY
    +CUTLET
    +CUTOFF
    +CUTTER
    +CUTTHROAT
    +CUTTING
    +CYANIDE
    +CYBERSPACE
    +CYCLE
    +CYCLICAL
    +CYCLIST
    +CYCLONE
    +CYLINDER
    +CYLINDRICAL
    +CYMBAL
    +CYNIC
    +CYNICAL
    +CYNICALLY
    +CYNICISM
    +CYRILLIC
    +CYST
    +CZAR
    +DABBLE
    +DACHSHUND
    +DADDY
    +DAFFODIL
    +DAGGER
    +DAILY
    +DAINTILY
    +DAINTY
    +DAIRY
    +DAISY
    +DALLY
    +DALMATIAN
    +DAMAGE
    +DAMAGES
    +DAMAGING
    +DAME
    +DAMN
    +DAMNED
    +DAMNING
    +DAMP
    +DAMPEN
    +DAMPER
    +DAMPNESS
    +DAMSEL
    +DANCE
    +DANCER
    +DANCING
    +DANDELION
    +DANDRUFF
    +DANDY
    +DANGER
    +DANGEROUS
    +DANGEROUSLY
    +DANGLE
    +DANISH
    +DANK
    +DAPPER
    +DARE
    +DAREDEVIL
    +DARING
    +DARK
    +DARKEN
    +DARKNESS
    +DARKROOM
    +DARLING
    +DARN
    +DARNED
    +DART
    +DARTS
    +DASH
    +DASHBOARD
    +DATA
    +DATABASE
    +DATE
    +DATED
    +DAUB
    +DAUGHTER
    +DAUNT
    +DAUNTING
    +DAWDLE
    +DAWN
    +DAYBREAK
    +DAYDREAM
    +DAYDREAMER
    +DAYLIGHT
    +DAYS
    +DAYTIME
    +DAZE
    +DAZED
    +DAZZLE
    +DAZZLING
    +DEACON
    +DEACONESS
    +DEAD
    +DEADEN
    +DEADLINE
    +DEADLOCK
    +DEADLY
    +DEADPAN
    +DEAF
    +DEAFEN
    +DEAFENING
    +DEAFNESS
    +DEAL
    +DEALER
    +DEALERSHIP
    +DEALING
    +DEALINGS
    +DEALT
    +DEAN
    +DEAR
    +DEARLY
    +DEARTH
    +DEATH
    +DEATHBED
    +DEATHTRAP
    +DEBASE
    +DEBASEMENT
    +DEBATABLE
    +DEBATE
    +DEBAUCHERY
    +DEBILITATE
    +DEBILITATING
    +DEBILITY
    +DEBIT
    +DEBONAIR
    +DEBRIEF
    +DEBRIEFING
    +DEBRIS
    +DEBT
    +DEBTOR
    +DEBUG
    +DEBUNK
    +DEBUT
    +DEBUTANTE
    +DECADE
    +DECADENCE
    +DECADENT
    +DECAF
    +DECAFFEINATED
    +DECAL
    +DECANTER
    +DECAPITATE
    +DECATHLON
    +DECAY
    +DECEASED
    +DECEIT
    +DECEITFUL
    +DECEITFULLY
    +DECEITFULNESS
    +DECEIVE
    +DECEMBER
    +DECENCY
    +DECENT
    +DECENTLY
    +DECENTRALIZATION
    +DECENTRALIZE
    +DECEPTION
    +DECEPTIVE
    +DECEPTIVELY
    +DECIBEL
    +DECIDE
    +DECIDED
    +DECIDEDLY
    +DECIDUOUS
    +DECIMAL
    +DECIMATE
    +DECIPHER
    +DECISION
    +DECISIVE
    +DECISIVELY
    +DECK
    +DECLARATION
    +DECLARE
    +DECLINE
    +DECODE
    +DECOMPOSE
    +DECOMPOSITION
    +DECOR
    +DECORATE
    +DECORATION
    +DECORATIVE
    +DECORATOR
    +DECOROUS
    +DECORUM
    +DECOY
    +DECREASE
    +DECREE
    +DECREPIT
    +DECRIMINALIZE
    +DECRY
    +DEDICATE
    +DEDICATED
    +DEDICATION
    +DEDUCE
    +DEDUCT
    +DEDUCTIBLE
    +DEDUCTION
    +DEED
    +DEEM
    +DEEP
    +DEEPEN
    +DEEPLY
    +DEER
    +DEFACE
    +DEFAMATION
    +DEFAMATORY
    +DEFAME
    +DEFAULT
    +DEFEAT
    +DEFEATIST
    +DEFECATE
    +DEFECT
    +DEFECTION
    +DEFECTIVE
    +DEFECTOR
    +DEFEND
    +DEFENDANT
    +DEFENDER
    +DEFENSE
    +DEFENSELESS
    +DEFENSIBLE
    +DEFENSIVE
    +DEFENSIVELY
    +DEFER
    +DEFERENCE
    +DEFERENTIAL
    +DEFIANCE
    +DEFIANT
    +DEFIANTLY
    +DEFICIENCY
    +DEFICIENT
    +DEFICIT
    +DEFILE
    +DEFINE
    +DEFINITE
    +DEFINITELY
    +DEFINITION
    +DEFINITIVE
    +DEFINITIVELY
    +DEFLATE
    +DEFLATION
    +DEFLECT
    +DEFLECTION
    +DEFORESTATION
    +DEFORM
    +DEFORMATION
    +DEFORMED
    +DEFORMITY
    +DEFRAUD
    +DEFROST
    +DEFT
    +DEFTLY
    +DEFUNCT
    +DEFUSE
    +DEFY
    +DEGENERATE
    +DEGENERATION
    +DEGRADATION
    +DEGRADE
    +DEGRADING
    +DEGREE
    +DEHYDRATE
    +DEHYDRATED
    +DEHYDRATION
    +DEIGN
    +DEITY
    +DEJECTED
    +DEJECTEDLY
    +DEJECTION
    +DELAY
    +DELAYED
    +DELECTABLE
    +DELEGATE
    +DELEGATION
    +DELETE
    +DELETION
    +DELI
    +DELIBERATE
    +DELIBERATELY
    +DELIBERATION
    +DELICACY
    +DELICATE
    +DELICATELY
    +DELICATESSEN
    +DELICIOUS
    +DELIGHT
    +DELIGHTED
    +DELIGHTFUL
    +DELIGHTFULLY
    +DELINEATE
    +DELINQUENCY
    +DELINQUENT
    +DELIRIOUS
    +DELIRIOUSLY
    +DELIRIUM
    +DELIVER
    +DELIVERY
    +DELTA
    +DELUDE
    +DELUDED
    +DELUGE
    +DELUSION
    +DELUXE
    +DELVE
    +DEMAGOGIC
    +DEMAGOGUE
    +DEMAND
    +DEMANDING
    +DEMANDS
    +DEMEAN
    +DEMEANING
    +DEMEANOR
    +DEMENTED
    +DEMERIT
    +DEMISE
    +DEMO
    +DEMOCRACY
    +DEMOCRAT
    +DEMOCRATIC
    +DEMOCRATIC
    +DEMOCRATICALLY
    +DEMOGRAPHICS
    +DEMOLISH
    +DEMOLITION
    +DEMON
    +DEMONIC
    +DEMONSTRATE
    +DEMONSTRATION
    +DEMONSTRATIVE
    +DEMONSTRATOR
    +DEMORALIZE
    +DEMORALIZING
    +DEMOTE
    +DEMOTION
    +DEMURE
    +DENIAL
    +DENIGRATE
    +DENIM
    +DENOMINATION
    +DENOTE
    +DENOUNCE
    +DENSE
    +DENSELY
    +DENSITY
    +DENT
    +DENTAL
    +DENTED
    +DENTIST
    +DENTURES
    +DENUNCIATION
    +DENY
    +DEODORANT
    +DEODORIZE
    +DEPART
    +DEPARTMENT
    +DEPARTMENTAL
    +DEPARTURE
    +DEPEND
    +DEPENDABLE
    +DEPENDENCE
    +DEPENDENCY
    +DEPENDENT
    +DEPICT
    +DEPLETE
    +DEPLETION
    +DEPLORABLE
    +DEPLORABLY
    +DEPLORE
    +DEPLOY
    +DEPLOYMENT
    +DEPORT
    +DEPORTATION
    +DEPOSE
    +DEPOSIT
    +DEPOT
    +DEPRAVED
    +DEPRAVITY
    +DEPRECIATE
    +DEPRECIATION
    +DEPRESS
    +DEPRESSED
    +DEPRESSING
    +DEPRESSION
    +DEPRIVATION
    +DEPRIVE
    +DEPRIVED
    +DEPTH
    +DEPUTY
    +DERAIL
    +DERAILMENT
    +DERANGED
    +DERBY
    +DERELICT
    +DERIDE
    +DERISION
    +DERIVATION
    +DERIVATIVE
    +DERIVE
    +DEROGATORY
    +DESCEND
    +DESCENDANT
    +DESCENT
    +DESCRIBE
    +DESCRIPTION
    +DESCRIPTIVE
    +DESECRATE
    +DESECRATION
    +DESEGREGATE
    +DESEGREGATION
    +DESERT
    +DESERTED
    +DESERTER
    +DESERVE
    +DESERVING
    +DESIGN
    +DESIGNATE
    +DESIGNATION
    +DESIGNER
    +DESIGNING
    +DESIRABILITY
    +DESIRABLE
    +DESIRE
    +DESIROUS
    +DESIST
    +DESK
    +DESKTOP
    +DESOLATE
    +DESOLATION
    +DESPAIR
    +DESPERATE
    +DESPERATELY
    +DESPERATION
    +DESPICABLE
    +DESPISE
    +DESPITE
    +DESPONDENT
    +DESPONDENTLY
    +DESPOT
    +DESPOTIC
    +DESSERT
    +DESTINATION
    +DESTINED
    +DESTINY
    +DESTITUTE
    +DESTITUTION
    +DESTROY
    +DESTROYER
    +DESTRUCTION
    +DESTRUCTIVE
    +DETACH
    +DETACHED
    +DETACHMENT
    +DETAIL
    +DETAILED
    +DETAIN
    +DETECT
    +DETECTION
    +DETECTIVE
    +DETECTOR
    +DETENTE
    +DETENTION
    +DETER
    +DETERGENT
    +DETERIORATE
    +DETERIORATION
    +DETERMINATION
    +DETERMINE
    +DETERMINED
    +DETERMINER
    +DETERRENCE
    +DETERRENT
    +DETEST
    +DETONATE
    +DETONATION
    +DETONATOR
    +DETOUR
    +DETOX
    +DETRACT
    +DETRIMENT
    +DETRIMENTAL
    +DEVALUATION
    +DEVALUE
    +DEVASTATE
    +DEVASTATED
    +DEVASTATING
    +DEVASTATION
    +DEVELOP
    +DEVELOPED
    +DEVELOPER
    +DEVELOPING
    +DEVELOPMENT
    +DEVIANT
    +DEVIATE
    +DEVIATION
    +DEVICE
    +DEVIL
    +DEVILISH
    +DEVIOUS
    +DEVISE
    +DEVOID
    +DEVOTE
    +DEVOTED
    +DEVOTEDLY
    +DEVOTEE
    +DEVOTION
    +DEVOUR
    +DEVOUT
    +DEVOUTLY
    +DEXTERITY
    +DEXTEROUS
    +DIABETES
    +DIABETIC
    +DIABOLICAL
    +DIAGNOSE
    +DIAGNOSES
    +DIAGNOSIS
    +DIAGNOSTIC
    +DIAGONAL
    +DIAGONALLY
    +DIAGRAM
    +DIAL
    +DIALECT
    +DIALOGUE
    +DIAMETER
    +DIAMETRICALLY
    +DIAMOND
    +DIAMONDS
    +DIAPER
    +DIAPHRAGM
    +DIARRHEA
    +DIARY
    +DICE
    +DICEY
    +DICHOTOMY
    +DICK
    +DICTATE
    +DICTATION
    +DICTATOR
    +DICTATORIAL
    +DICTATORSHIP
    +DICTION
    +DICTIONARY
    +DIEHARD
    +DIESEL
    +DIET
    +DIFFER
    +DIFFERENCE
    +DIFFERENT
    +DIFFERENTIATE
    +DIFFERENTLY
    +DIFFICULT
    +DIFFICULTY
    +DIFFUSE
    +DIGEST
    +DIGESTION
    +DIGESTIVE
    +DIGIT
    +DIGITAL
    +DIGNIFIED
    +DIGNITARY
    +DIGNITY
    +DIGRESS
    +DIGRESSION
    +DIKE
    +DILAPIDATED
    +DILAPIDATION
    +DILATE
    +DILATION
    +DILEMMA
    +DILIGENCE
    +DILIGENT
    +DILIGENTLY
    +DILUTE
    +DILUTION
    +DIME
    +DIMENSION
    +DIMENSIONS
    +DIMINISH
    +DIMINUTIVE
    +DIMLY
    +DIMPLE
    +DINE
    +DINER
    +DINGHY
    +DINGY
    +DINNER
    +DINOSAUR
    +DIOCESE
    +DIPHTHERIA
    +DIPHTHONG
    +DIPLOMA
    +DIPLOMACY
    +DIPLOMAT
    +DIPLOMATIC
    +DIPLOMATICALLY
    +DIPSTICK
    +DIRE
    +DIRECT
    +DIRECTION
    +DIRECTIONS
    +DIRECTIVE
    +DIRECTLY
    +DIRECTOR
    +DIRECTORY
    +DIRT
    +DIRTY
    +DISABILITY
    +DISABLE
    +DISABLED
    +DISADVANTAGE
    +DISADVANTAGED
    +DISAFFECTED
    +DISAGREE
    +DISAGREEABLE
    +DISAGREEMENT
    +DISALLOW
    +DISAPPEAR
    +DISAPPEARANCE
    +DISAPPOINT
    +DISAPPOINTED
    +DISAPPOINTING
    +DISAPPOINTINGLY
    +DISAPPOINTMENT
    +DISAPPROVAL
    +DISAPPROVE
    +DISAPPROVING
    +DISAPPROVINGLY
    +DISARM
    +DISARMAMENT
    +DISARMING
    +DISARRAY
    +DISASTER
    +DISASTROUS
    +DISASTROUSLY
    +DISAVOW
    +DISAVOWAL
    +DISBAND
    +DISBELIEF
    +DISBELIEVE
    +DISCARD
    +DISCERN
    +DISCERNIBLE
    +DISCERNING
    +DISCHARGE
    +DISCIPLE
    +DISCIPLINARIAN
    +DISCIPLINARY
    +DISCIPLINE
    +DISCIPLINED
    +DISCLAIM
    +DISCLAIMER
    +DISCLOSE
    +DISCLOSURE
    +DISCO
    +DISCOLOR
    +DISCOLORATION
    +DISCOMFORT
    +DISCONCERT
    +DISCONCERTED
    +DISCONCERTING
    +DISCONNECT
    +DISCONNECTION
    +DISCONTENT
    +DISCONTENTED
    +DISCONTINUATION
    +DISCONTINUE
    +DISCORD
    +DISCORDANT
    +DISCOUNT
    +DISCOURAGE
    +DISCOURAGED
    +DISCOURAGEMENT
    +DISCOURAGING
    +DISCOURSE
    +DISCOURTEOUS
    +DISCOURTESY
    +DISCOVER
    +DISCOVERER
    +DISCOVERY
    +DISCREDIT
    +DISCREET
    +DISCREETLY
    +DISCREPANCY
    +DISCRETION
    +DISCRETIONARY
    +DISCRIMINATE
    +DISCRIMINATING
    +DISCRIMINATION
    +DISCUS
    +DISCUSS
    +DISCUSSION
    +DISDAIN
    +DISDAINFUL
    +DISEASE
    +DISEASED
    +DISEMBARK
    +DISEMBARKATION
    +DISENCHANTED
    +DISENCHANTMENT
    +DISENFRANCHISE
    +DISENGAGE
    +DISENTANGLE
    +DISFAVOR
    +DISFIGURE
    +DISFIGUREMENT
    +DISGRACE
    +DISGRACEFUL
    +DISGRACEFULLY
    +DISGRUNTLED
    +DISGUISE
    +DISGUST
    +DISGUSTED
    +DISGUSTING
    +DISH
    +DISHEARTEN
    +DISHEARTENING
    +DISHEVELED
    +DISHONEST
    +DISHONESTLY
    +DISHONESTY
    +DISHONOR
    +DISHONORABLE
    +DISHONORABLY
    +DISHTOWEL
    +DISHWASHER
    +DISILLUSION
    +DISILLUSIONED
    +DISILLUSIONMENT
    +DISINFECT
    +DISINFECTANT
    +DISINHERIT
    +DISINTEGRATE
    +DISINTEGRATION
    +DISINTEREST
    +DISINTERESTED
    +DISJOINTED
    +DISK
    +DISKETTE
    +DISLIKE
    +DISLOCATE
    +DISLOCATION
    +DISLODGE
    +DISLOYAL
    +DISLOYALTY
    +DISMAL
    +DISMALLY
    +DISMANTLE
    +DISMAY
    +DISMEMBER
    +DISMISS
    +DISMISSAL
    +DISMISSIVE
    +DISMOUNT
    +DISOBEDIENCE
    +DISOBEDIENT
    +DISOBEY
    +DISORDER
    +DISORDERED
    +DISORDERLY
    +DISORGANIZATION
    +DISORGANIZED
    +DISORIENT
    +DISORIENTATION
    +DISORIENTED
    +DISOWN
    +DISPARAGE
    +DISPARAGING
    +DISPARATE
    +DISPARITY
    +DISPASSIONATE
    +DISPASSIONATELY
    +DISPATCH
    +DISPEL
    +DISPENSABLE
    +DISPENSARY
    +DISPENSATION
    +DISPENSE
    +DISPENSER
    +DISPERSAL
    +DISPERSE
    +DISPIRITED
    +DISPLACE
    +DISPLACEMENT
    +DISPLAY
    +DISPLEASE
    +DISPLEASURE
    +DISPOSABLE
    +DISPOSAL
    +DISPOSE
    +DISPOSED
    +DISPOSSESS
    +DISPROPORTIONATE
    +DISPROPORTIONATELY
    +DISPROVE
    +DISPUTE
    +DISQUALIFICATION
    +DISQUALIFY
    +DISREGARD
    +DISREPAIR
    +DISREPUTABLE
    +DISREPUTE
    +DISRESPECT
    +DISRESPECTFUL
    +DISRESPECTFULLY
    +DISRUPT
    +DISRUPTION
    +DISRUPTIVE
    +DISSATISFACTION
    +DISSATISFIED
    +DISSECT
    +DISSECTION
    +DISSEMINATE
    +DISSEMINATION
    +DISSENSION
    +DISSENT
    +DISSENTER
    +DISSENTING
    +DISSERTATION
    +DISSERVICE
    +DISSIDENCE
    +DISSIDENT
    +DISSIMILAR
    +DISSIMILARITY
    +DISSIPATE
    +DISSOCIATE
    +DISSOCIATION
    +DISSOLUTE
    +DISSOLUTION
    +DISSOLVE
    +DISSUADE
    +DISTANCE
    +DISTANT
    +DISTASTE
    +DISTASTEFUL
    +DISTASTEFULLY
    +DISTEND
    +DISTENTION
    +DISTILL
    +DISTILLATION
    +DISTILLERY
    +DISTINCT
    +DISTINCTION
    +DISTINCTIVE
    +DISTINCTIVELY
    +DISTINCTLY
    +DISTINGUISH
    +DISTINGUISHABLE
    +DISTINGUISHED
    +DISTORT
    +DISTORTED
    +DISTORTION
    +DISTRACT
    +DISTRACTED
    +DISTRACTION
    +DISTRAUGHT
    +DISTRESS
    +DISTRESSING
    +DISTRIBUTE
    +DISTRIBUTION
    +DISTRIBUTOR
    +DISTRICT
    +DISTRUST
    +DISTRUSTFUL
    +DISTRUSTFULLY
    +DISTURB
    +DISTURBANCE
    +DISTURBED
    +DISTURBING
    +DISUSE
    +DITCH
    +DITHER
    +DITTO
    +DITTY
    +DIVE
    +DIVER
    +DIVERGE
    +DIVERGENCE
    +DIVERGENT
    +DIVERSE
    +DIVERSIFICATION
    +DIVERSIFY
    +DIVERSION
    +DIVERSITY
    +DIVERT
    +DIVEST
    +DIVIDE
    +DIVIDEND
    +DIVIDER
    +DIVINE
    +DIVINELY
    +DIVING
    +DIVINITY
    +DIVISIBLE
    +DIVISION
    +DIVISIVE
    +DIVORCE
    +DIVORCED
    +DIVORCEE
    +DIVULGE
    +DIXIE
    +DIZZINESS
    +DIZZY
    +DOCILE
    +DOCK
    +DOCKET
    +DOCTOR
    +DOCTORATE
    +DOCTRINE
    +DOCUMENT
    +DOCUMENTARY
    +DOCUMENTATION
    +DODGE
    +DOES
    +DOGGED
    +DOGGEDLY
    +DOGGONE
    +DOGHOUSE
    +DOGMA
    +DOGMATIC
    +DOGWOOD
    +DOLDRUMS
    +DOLE
    +DOLEFUL
    +DOLL
    +DOLLAR
    +DOLLHOUSE
    +DOLLOP
    +DOLLY
    +DOLPHIN
    +DOMAIN
    +DOME
    +DOMESTIC
    +DOMESTICATE
    +DOMESTICATED
    +DOMESTICITY
    +DOMICILE
    +DOMINANCE
    +DOMINANT
    +DOMINATE
    +DOMINATION
    +DOMINEERING
    +DOMINION
    +DOMINO
    +DOMINOES
    +DONATE
    +DONATION
    +DONE
    +DONKEY
    +DONOR
    +DOODAD
    +DOODLE
    +DOOHICKEY
    +DOOM
    +DOOMED
    +DOOMSDAY
    +DOOR
    +DOORBELL
    +DOORKNOB
    +DOORMAN
    +DOORMAT
    +DOORSTEP
    +DOORWAY
    +DOPE
    +DOPEY
    +DORK
    +DORKY
    +DORM
    +DORMANT
    +DORMITORY
    +DORSAL
    +DOSAGE
    +DOSE
    +DOSSIER
    +DOTE
    +DOTING
    +DOUBLE
    +DOUBLES
    +DOUBLY
    +DOUBT
    +DOUBTFUL
    +DOUBTFULLY
    +DOUBTLESS
    +DOUGH
    +DOUGHNUT
    +DOUR
    +DOUSE
    +DOVE
    +DOWDY
    +DOWN
    +DOWNCAST
    +DOWNER
    +DOWNFALL
    +DOWNGRADE
    +DOWNHEARTED
    +DOWNHILL
    +DOWNLOAD
    +DOWNPLAY
    +DOWNPOUR
    +DOWNRIGHT
    +DOWNSIZE
    +DOWNSIZING
    +DOWNSTAIRS
    +DOWNSTATE
    +DOWNSTREAM
    +DOWNTIME
    +DOWNTOWN
    +DOWNTRODDEN
    +DOWNTURN
    +DOWNWARD
    +DOWNWARDS
    +DOWNWIND
    +DOWNY
    +DOWRY
    +DOZE
    +DOZEN
    +DOZENS
    +DRAB
    +DRACONIAN
    +DRAFT
    +DRAFTSMAN
    +DRAFTY
    +DRAG
    +DRAGON
    +DRAIN
    +DRAINAGE
    +DRAKE
    +DRAMA
    +DRAMATIC
    +DRAMATICALLY
    +DRAMATICS
    +DRAMATIST
    +DRAMATIZATION
    +DRAMATIZE
    +DRANK
    +DRAPE
    +DRAPERY
    +DRAPES
    +DRASTIC
    +DRASTICALLY
    +DRAW
    +DRAWBACK
    +DRAWBRIDGE
    +DRAWER
    +DRAWING
    +DRAWL
    +DRAWN
    +DREAD
    +DREADED
    +DREADFUL
    +DREADFULLY
    +DREADLOCKS
    +DREAM
    +DREAMER
    +DREAMT
    +DREAMY
    +DREARY
    +DREDGE
    +DREGS
    +DRENCH
    +DRESS
    +DRESSER
    +DRESSING
    +DRESSMAKER
    +DRESSY
    +DREW
    +DRIBBLE
    +DRIED
    +DRIER
    +DRIFT
    +DRIFTER
    +DRIFTWOOD
    +DRILL
    +DRINK
    +DRINKER
    +DRINKING
    +DRIP
    +DRIVE
    +DRIVEL
    +DRIVEN
    +DRIVER
    +DRIVEWAY
    +DRIVING
    +DRIZZLE
    +DROLL
    +DRONE
    +DROOL
    +DROOP
    +DROOPING
    +DROP
    +DROPOUT
    +DROPPINGS
    +DROPS
    +DROUGHT
    +DROVE
    +DROWN
    +DROWNING
    +DROWSILY
    +DROWSINESS
    +DROWSY
    +DRUDGE
    +DRUDGERY
    +DRUG
    +DRUGSTORE
    +DRUM
    +DRUMMER
    +DRUNK
    +DRUNKARD
    +DRUNKEN
    +DRUNKENLY
    +DRUNKENNESS
    +DRYER
    +DRYLY
    +DRYNESS
    +DUAL
    +DUBIOUS
    +DUCHESS
    +DUCK
    +DUCKLING
    +DUCT
    +DUDE
    +DUDS
    +DUEL
    +DUES
    +DUET
    +DUGOUT
    +DUKE
    +DULL
    +DULLNESS
    +DULY
    +DUMB
    +DUMBBELL
    +DUMBFOUNDED
    +DUMMY
    +DUMP
    +DUMPLING
    +DUMPSTER
    +DUMPY
    +DUNCE
    +DUNE
    +DUNG
    +DUNGEON
    +DUNK
    +DUPE
    +DUPLEX
    +DUPLICATE
    +DUPLICATION
    +DUPLICITY
    +DURABILITY
    +DURABLE
    +DURATION
    +DURESS
    +DURING
    +DUSK
    +DUST
    +DUSTPAN
    +DUSTY
    +DUTCH
    +DUTIFUL
    +DUTIFULLY
    +DUTY
    +DWARF
    +DWARVES
    +DWELL
    +DWELLER
    +DWELLING
    +DWELT
    +DWINDLE
    +DWINDLING
    +DYING
    +DYKE
    +DYNAMIC
    +DYNAMICS
    +DYNAMISM
    +DYNAMITE
    +DYNAMO
    +DYNASTY
    +DYSENTERY
    +DYSFUNCTION
    +DYSFUNCTIONAL
    +DYSLEXIA
    +DYSLEXIC
    +EACH
    +EAGER
    +EAGERLY
    +EAGERNESS
    +EAGLE
    +EARACHE
    +EARDRUM
    +EARLOBE
    +EARLY
    +EARMARK
    +EARMUFFS
    +EARN
    +EARNEST
    +EARNESTLY
    +EARNESTNESS
    +EARNINGS
    +EARPHONES
    +EARPLUG
    +EARRING
    +EARSHOT
    +EARSPLITTING
    +EARTH
    +EARTH
    +EARTHINESS
    +EARTHLY
    +EARTHQUAKE
    +EARTHSHAKING
    +EARTHWORM
    +EARTHY
    +EARWAX
    +EASE
    +EASEL
    +EASILY
    +EAST
    +EASTBOUND
    +EASTER
    +EASTERLY
    +EASTERN
    +EASTERNER
    +EASTWARD
    +EASTWARDS
    +EASY
    +EASYGOING
    +EATEN
    +EATER
    +EATERY
    +EAVES
    +EAVESDROP
    +EAVESDROPPER
    +EBONY
    +EBULLIENCE
    +EBULLIENT
    +ECCENTRIC
    +ECCENTRICITY
    +ECCLESIASTICAL
    +ECHO
    +ECLAIR
    +ECLIPSE
    +ECOLOGICAL
    +ECOLOGICALLY
    +ECOLOGIST
    +ECOLOGY
    +ECONOMIC
    +ECONOMICAL
    +ECONOMICALLY
    +ECONOMICS
    +ECONOMIST
    +ECONOMIZE
    +ECONOMY
    +ECOSYSTEM
    +ECSTASY
    +ECSTATIC
    +ECUMENICAL
    +ECZEMA
    +EDDY
    +EDGE
    +EDGEWISE
    +EDGY
    +EDIBLE
    +EDICT
    +EDIFICATION
    +EDIFICE
    +EDIFY
    +EDIT
    +EDITION
    +EDITOR
    +EDITORIAL
    +EDUCATE
    +EDUCATED
    +EDUCATION
    +EDUCATIONAL
    +EDUCATIONALLY
    +EDUCATOR
    +EERIE
    +EERILY
    +EFFECT
    +EFFECTIVE
    +EFFECTIVELY
    +EFFECTIVENESS
    +EFFECTS
    +EFFEMINATE
    +EFFERVESCENCE
    +EFFERVESCENT
    +EFFICIENCY
    +EFFICIENT
    +EFFICIENTLY
    +EFFIGY
    +EFFORT
    +EFFORTLESS
    +EFFORTLESSLY
    +EFFUSIVE
    +EFFUSIVELY
    +EGALITARIAN
    +EGALITARIANISM
    +EGGHEAD
    +EGGPLANT
    +EGGSHELL
    +EGOCENTRIC
    +EGOTISM
    +EGOTIST
    +EGOTISTICAL
    +EGREGIOUS
    +EGREGIOUSLY
    +EIGHT
    +EIGHTEEN
    +EIGHTEENTH
    +EIGHTH
    +EIGHTIETH
    +EIGHTY
    +EITHER
    +EJACULATE
    +EJACULATION
    +EJECT
    +EJECTION
    +ELABORATE
    +ELABORATELY
    +ELABORATION
    +ELAPSE
    +ELASTIC
    +ELASTICITY
    +ELATED
    +ELATION
    +ELBOW
    +ELBOWROOM
    +ELDER
    +ELDERLY
    +ELDERS
    +ELDEST
    +ELECT
    +ELECTION
    +ELECTIVE
    +ELECTORAL
    +ELECTORATE
    +ELECTRIC
    +ELECTRICAL
    +ELECTRICIAN
    +ELECTRICITY
    +ELECTRIFY
    +ELECTRIFYING
    +ELECTROCUTE
    +ELECTROCUTION
    +ELECTRODE
    +ELECTROLYSIS
    +ELECTRON
    +ELECTRONIC
    +ELECTRONICALLY
    +ELECTRONICS
    +ELEGANCE
    +ELEGANT
    +ELEGANTLY
    +ELEGY
    +ELEMENT
    +ELEMENTAL
    +ELEMENTARY
    +ELEMENTS
    +ELEPHANT
    +ELEVATE
    +ELEVATION
    +ELEVATOR
    +ELEVEN
    +ELEVENTH
    +ELFIN
    +ELICIT
    +ELIGIBILITY
    +ELIGIBLE
    +ELIMINATE
    +ELIMINATION
    +ELITE
    +ELITISM
    +ELITIST
    +ELLIPTICAL
    +ELONGATE
    +ELONGATED
    +ELOPE
    +ELOPEMENT
    +ELOQUENCE
    +ELOQUENT
    +ELOQUENTLY
    +ELSE
    +ELSEWHERE
    +ELUCIDATE
    +ELUDE
    +ELUSIVE
    +ELVES
    +EMACIATED
    +EMANATE
    +EMANCIPATE
    +EMANCIPATED
    +EMANCIPATION
    +EMBALM
    +EMBANKMENT
    +EMBARGO
    +EMBARK
    +EMBARRASS
    +EMBARRASSED
    +EMBARRASSING
    +EMBARRASSINGLY
    +EMBARRASSMENT
    +EMBASSY
    +EMBATTLED
    +EMBED
    +EMBELLISH
    +EMBELLISHMENT
    +EMBER
    +EMBEZZLE
    +EMBEZZLEMENT
    +EMBEZZLER
    +EMBITTER
    +EMBITTERED
    +EMBLAZON
    +EMBLEM
    +EMBODIMENT
    +EMBODY
    +EMBOSS
    +EMBOSSED
    +EMBRACE
    +EMBROIDER
    +EMBROIDERY
    +EMBROIL
    +EMBRYO
    +EMBRYONIC
    +EMCEE
    +EMERALD
    +EMERGE
    +EMERGENCE
    +EMERGENCY
    +EMERGENT
    +EMERITUS
    +EMIGRANT
    +EMIGRATE
    +EMIGRATION
    +EMINENT
    +EMINENTLY
    +EMIR
    +EMIRATE
    +EMISSARY
    +EMISSION
    +EMIT
    +EMMY
    +EMOTION
    +EMOTIONAL
    +EMOTIONALLY
    +EMOTIVE
    +EMPATHIZE
    +EMPATHY
    +EMPEROR
    +EMPHASES
    +EMPHASIS
    +EMPHASIZE
    +EMPHATIC
    +EMPHATICALLY
    +EMPHYSEMA
    +EMPIRE
    +EMPIRICAL
    +EMPLOY
    +EMPLOYEE
    +EMPLOYER
    +EMPLOYMENT
    +EMPORIUM
    +EMPOWER
    +EMPOWERMENT
    +EMPRESS
    +EMPTINESS
    +EMPTY
    +EMULATE
    +ENABLE
    +ENACT
    +ENAMEL
    +ENAMORED
    +ENCASE
    +ENCHANTED
    +ENCHANTING
    +ENCHILADA
    +ENCIRCLE
    +ENCLAVE
    +ENCLOSE
    +ENCLOSURE
    +ENCOMPASS
    +ENCORE
    +ENCOUNTER
    +ENCOURAGE
    +ENCOURAGEMENT
    +ENCOURAGING
    +ENCROACH
    +ENCUMBER
    +ENCUMBRANCE
    +ENCYCLOPEDIA
    +ENDANGER
    +ENDANGERED
    +ENDEAR
    +ENDEARING
    +ENDEARMENT
    +ENDEAVOR
    +ENDEMIC
    +ENDING
    +ENDIVE
    +ENDLESS
    +ENDLESSLY
    +ENDORSE
    +ENDORSEMENT
    +ENDOW
    +ENDOWMENT
    +ENDURANCE
    +ENDURE
    +ENDURING
    +ENEMY
    +ENERGETIC
    +ENERGETICALLY
    +ENERGIES
    +ENERGIZE
    +ENERGY
    +ENFORCE
    +ENFORCEABLE
    +ENFORCEMENT
    +ENFRANCHISE
    +ENGAGE
    +ENGAGED
    +ENGAGEMENT
    +ENGAGING
    +ENGENDER
    +ENGINE
    +ENGINEER
    +ENGINEERING
    +ENGLISH
    +ENGRAVE
    +ENGRAVING
    +ENGROSSED
    +ENGROSSING
    +ENGULF
    +ENHANCE
    +ENHANCEMENT
    +ENIGMA
    +ENIGMATIC
    +ENJOY
    +ENJOYABLE
    +ENJOYMENT
    +ENLARGE
    +ENLARGEMENT
    +ENLIGHTEN
    +ENLIGHTENED
    +ENLIGHTENING
    +ENLIST
    +ENLISTMENT
    +ENLIVEN
    +ENMITY
    +ENORMITY
    +ENORMOUS
    +ENORMOUSLY
    +ENOUGH
    +ENRAGE
    +ENRAGED
    +ENRICH
    +ENRICHMENT
    +ENROLL
    +ENROLLMENT
    +ENSCONCE
    +ENSEMBLE
    +ENSHRINE
    +ENSIGN
    +ENSUE
    +ENSUING
    +ENSURE
    +ENTAIL
    +ENTANGLE
    +ENTANGLED
    +ENTANGLEMENT
    +ENTER
    +ENTERPRISE
    +ENTERPRISING
    +ENTERTAIN
    +ENTERTAINER
    +ENTERTAINING
    +ENTERTAINMENT
    +ENTHRALL
    +ENTHRALLING
    +ENTHUSE
    +ENTHUSIASM
    +ENTHUSIAST
    +ENTHUSIASTIC
    +ENTHUSIASTICALLY
    +ENTICE
    +ENTICEMENT
    +ENTICING
    +ENTIRE
    +ENTIRELY
    +ENTIRETY
    +ENTITLE
    +ENTITLED
    +ENTITLEMENT
    +ENTITY
    +ENTOMOLOGIST
    +ENTOMOLOGY
    +ENTOURAGE
    +ENTRAILS
    +ENTRANCE
    +ENTRANT
    +ENTRAP
    +ENTRAPMENT
    +ENTREAT
    +ENTREATY
    +ENTREE
    +ENTREPRENEUR
    +ENTREPRENEURIAL
    +ENTRUST
    +ENTRY
    +ENTRYWAY
    +ENTWINE
    +ENUMERATE
    +ENUNCIATE
    +ENUNCIATION
    +ENVELOP
    +ENVELOPE
    +ENVIABLE
    +ENVIOUS
    +ENVIOUSLY
    +ENVIRONMENT
    +ENVIRONMENTAL
    +ENVIRONMENTALIST
    +ENVIRONMENTALLY
    +ENVIRONS
    +ENVISAGE
    +ENVISION
    +ENVOY
    +ENVY
    +ENZYME
    +EPAULET
    +EPHEMERAL
    +EPIC
    +EPICENTER
    +EPIDEMIC
    +EPIGRAM
    +EPILEPSY
    +EPILEPTIC
    +EPILOGUE
    +EPISCOPALIAN
    +EPISODE
    +EPISODIC
    +EPISTLE
    +EPITAPH
    +EPITHET
    +EPITOME
    +EPITOMIZE
    +EPOCH
    +EQUAL
    +EQUALITY
    +EQUALIZE
    +EQUALLY
    +EQUANIMITY
    +EQUATE
    +EQUATION
    +EQUATOR
    +EQUATORIAL
    +EQUESTRIAN
    +EQUILATERAL
    +EQUILIBRIUM
    +EQUINE
    +EQUINOX
    +EQUIP
    +EQUIPMENT
    +EQUIPPED
    +EQUITABLE
    +EQUITY
    +EQUIVALENCE
    +EQUIVALENT
    +EQUIVOCAL
    +ERADICATE
    +ERADICATION
    +ERASE
    +ERASER
    +ERECT
    +ERECTION
    +ERODE
    +EROSION
    +EROTIC
    +EROTICALLY
    +EROTICISM
    +ERRAND
    +ERRANT
    +ERRATIC
    +ERRATICALLY
    +ERRONEOUS
    +ERRONEOUSLY
    +ERROR
    +ERUDITE
    +ERUDITION
    +ERUPT
    +ERUPTION
    +ESCALATE
    +ESCALATION
    +ESCALATOR
    +ESCAPADE
    +ESCAPE
    +ESCAPED
    +ESCAPISM
    +ESCAPIST
    +ESCHEW
    +ESCORT
    +ESKIMO
    +ESOPHAGUS
    +ESOTERIC
    +ESPECIALLY
    +ESPIONAGE
    +ESPOUSE
    +ESPRESSO
    +ESSAY
    +ESSENCE
    +ESSENTIAL
    +ESSENTIALLY
    +ESTABLISH
    +ESTABLISHMENT
    +ESTATE
    +ESTEEM
    +ESTHETIC
    +ESTHETICALLY
    +ESTIMABLE
    +ESTIMATE
    +ESTIMATED
    +ESTIMATION
    +ESTRANGED
    +ESTRANGEMENT
    +ESTROGEN
    +ESTUARY
    +ETCH
    +ETERNAL
    +ETERNALLY
    +ETERNITY
    +ETHER
    +ETHEREAL
    +ETHIC
    +ETHICAL
    +ETHICALLY
    +ETHICS
    +ETHNIC
    +ETIQUETTE
    +ETYMOLOGY
    +EULOGIZE
    +EULOGY
    +EUNUCH
    +EUPHEMISM
    +EUPHEMISTIC
    +EUPHEMISTICALLY
    +EUPHORIA
    +EUPHORIC
    +EUROPE
    +EUROPEAN
    +EUTHANASIA
    +EVACUATE
    +EVACUATION
    +EVACUEE
    +EVADE
    +EVALUATE
    +EVALUATION
    +EVANGELICAL
    +EVANGELISM
    +EVANGELIST
    +EVAPORATE
    +EVAPORATION
    +EVASION
    +EVASIVE
    +EVEN
    +EVENHANDED
    +EVENING
    +EVENINGS
    +EVENLY
    +EVENNESS
    +EVENT
    +EVENTFUL
    +EVENTUAL
    +EVENTUALITY
    +EVENTUALLY
    +EVER
    +EVERGREEN
    +EVERLASTING
    +EVERMORE
    +EVERY
    +EVERYBODY
    +EVERYDAY
    +EVERYONE
    +EVERYPLACE
    +EVERYTHING
    +EVERYWHERE
    +EVICT
    +EVICTION
    +EVIDENCE
    +EVIDENT
    +EVIDENTLY
    +EVIL
    +EVOCATIVE
    +EVOKE
    +EVOLUTION
    +EVOLUTIONARY
    +EVOLVE
    +EXACERBATE
    +EXACT
    +EXACTING
    +EXACTLY
    +EXAGGERATE
    +EXAGGERATED
    +EXAGGERATION
    +EXALT
    +EXALTATION
    +EXAM
    +EXAMINATION
    +EXAMINE
    +EXAMINER
    +EXAMPLE
    +EXASPERATE
    +EXASPERATED
    +EXASPERATING
    +EXASPERATION
    +EXCAVATE
    +EXCAVATION
    +EXCEED
    +EXCEEDINGLY
    +EXCEL
    +EXCELLENCE
    +EXCELLENT
    +EXCELLENTLY
    +EXCEPT
    +EXCEPTION
    +EXCEPTIONAL
    +EXCEPTIONALLY
    +EXCERPT
    +EXCESS
    +EXCESSES
    +EXCESSIVE
    +EXCESSIVELY
    +EXCHANGE
    +EXCISE
    +EXCISION
    +EXCITABLE
    +EXCITE
    +EXCITED
    +EXCITEDLY
    +EXCITEMENT
    +EXCITING
    +EXCLAIM
    +EXCLAMATION
    +EXCLUDE
    +EXCLUDING
    +EXCLUSION
    +EXCLUSIVE
    +EXCLUSIVELY
    +EXCOMMUNICATE
    +EXCOMMUNICATION
    +EXCREMENT
    +EXCRETE
    +EXCRUCIATING
    +EXCRUCIATINGLY
    +EXCURSION
    +EXCUSABLE
    +EXCUSE
    +EXEC
    +EXECUTE
    +EXECUTION
    +EXECUTIONER
    +EXECUTIVE
    +EXECUTOR
    +EXEMPLARY
    +EXEMPLIFY
    +EXEMPT
    +EXEMPTION
    +EXERCISE
    +EXERT
    +EXERTION
    +EXHALE
    +EXHAUST
    +EXHAUSTED
    +EXHAUSTING
    +EXHAUSTION
    +EXHAUSTIVE
    +EXHAUSTIVELY
    +EXHIBIT
    +EXHIBITION
    +EXHIBITIONISM
    +EXHIBITIONIST
    +EXHIBITOR
    +EXHILARATE
    +EXHILARATING
    +EXHILARATION
    +EXHORT
    +EXHORTATION
    +EXHUMATION
    +EXHUME
    +EXILE
    +EXIST
    +EXISTENCE
    +EXISTING
    +EXIT
    +EXODUS
    +EXONERATE
    +EXONERATION
    +EXORBITANT
    +EXORCISM
    +EXORCIST
    +EXOTIC
    +EXPAND
    +EXPANDED
    +EXPANSE
    +EXPANSION
    +EXPANSIONIST
    +EXPANSIVE
    +EXPATRIATE
    +EXPECT
    +EXPECTANCY
    +EXPECTANT
    +EXPECTANTLY
    +EXPECTATION
    +EXPEDIENCY
    +EXPEDIENT
    +EXPEDITE
    +EXPEDITION
    +EXPEL
    +EXPEND
    +EXPENDABLE
    +EXPENDITURE
    +EXPENSE
    +EXPENSES
    +EXPENSIVE
    +EXPENSIVELY
    +EXPERIENCE
    +EXPERIENCED
    +EXPERIMENT
    +EXPERIMENTAL
    +EXPERIMENTALLY
    +EXPERIMENTATION
    +EXPERT
    +EXPERTISE
    +EXPERTLY
    +EXPIRATION
    +EXPIRE
    +EXPLAIN
    +EXPLANATION
    +EXPLANATORY
    +EXPLETIVE
    +EXPLICABLE
    +EXPLICIT
    +EXPLICITLY
    +EXPLODE
    +EXPLOIT
    +EXPLOITATION
    +EXPLORATION
    +EXPLORATORY
    +EXPLORE
    +EXPLORER
    +EXPLOSION
    +EXPLOSIVE
    +EXPO
    +EXPONENT
    +EXPORT
    +EXPORTATION
    +EXPORTER
    +EXPOSE
    +EXPOSED
    +EXPOSITION
    +EXPOSURE
    +EXPRESS
    +EXPRESSION
    +EXPRESSIVE
    +EXPRESSIVELY
    +EXPRESSLY
    +EXPRESSWAY
    +EXPROPRIATE
    +EXPROPRIATION
    +EXPULSION
    +EXQUISITE
    +EXQUISITELY
    +EXTEMPORANEOUS
    +EXTEND
    +EXTENSION
    +EXTENSIVE
    +EXTENSIVELY
    +EXTENT
    +EXTERIOR
    +EXTERMINATE
    +EXTERMINATION
    +EXTERMINATOR
    +EXTERNAL
    +EXTINCT
    +EXTINCTION
    +EXTINGUISH
    +EXTINGUISHER
    +EXTOL
    +EXTORT
    +EXTORTION
    +EXTORTIONATE
    +EXTRA
    +EXTRACT
    +EXTRACTION
    +EXTRACURRICULAR
    +EXTRADITE
    +EXTRADITION
    +EXTRANEOUS
    +EXTRAORDINARILY
    +EXTRAORDINARY
    +EXTRAPOLATE
    +EXTRATERRESTRIAL
    +EXTRAVAGANCE
    +EXTRAVAGANT
    +EXTRAVAGANTLY
    +EXTREME
    +EXTREMELY
    +EXTREMISM
    +EXTREMIST
    +EXTREMITIES
    +EXTREMITY
    +EXTRICATE
    +EXTROVERT
    +EXTROVERTED
    +EXUBERANCE
    +EXUBERANT
    +EXUDE
    +EXULT
    +EXULTANT
    +EXULTATION
    +EYEBALL
    +EYEBROW
    +EYEGLASSES
    +EYELASH
    +EYELID
    +EYELINER
    +EYESIGHT
    +EYESORE
    +EYEWITNESS
    +FABLE
    +FABRIC
    +FABRICATE
    +FABRICATION
    +FABULOUS
    +FACADE
    +FACE
    +FACELESS
    +FACET
    +FACETIOUS
    +FACETIOUSLY
    +FACIAL
    +FACILE
    +FACILITATE
    +FACILITIES
    +FACILITY
    +FACSIMILE
    +FACT
    +FACTION
    +FACTOR
    +FACTORY
    +FACTUAL
    +FACULTY
    +FADE
    +FAGGOT
    +FAHRENHEIT
    +FAIL
    +FAILING
    +FAILURE
    +FAINT
    +FAIR
    +FAIRGROUND
    +FAIRLY
    +FAIRY
    +FAITH
    +FAITHFUL
    +FAITHFULLY
    +FAITHFULNESS
    +FAITHLESS
    +FAKE
    +FALCON
    +FALL
    +FALLACIOUS
    +FALLACY
    +FALLEN
    +FALLIBLE
    +FALLOUT
    +FALSE
    +FALSEHOOD
    +FALSETTO
    +FALSIFICATION
    +FALSIFY
    +FALSITY
    +FALTER
    +FALTERING
    +FAME
    +FAMED
    +FAMILIAR
    +FAMILIARITY
    +FAMILIARIZE
    +FAMILIARLY
    +FAMILY
    +FAMINE
    +FAMISHED
    +FAMOUS
    +FAMOUSLY
    +FANATIC
    +FANATICAL
    +FANATICALLY
    +FANATICISM
    +FANCIFUL
    +FANCY
    +FANFARE
    +FANG
    +FANNY
    +FANTASIZE
    +FANTASTIC
    +FANTASTICALLY
    +FANTASY
    +FARAWAY
    +FARCE
    +FARCICAL
    +FARE
    +FAREWELL
    +FARM
    +FARMER
    +FARMHOUSE
    +FARMING
    +FARMYARD
    +FARSIGHTED
    +FART
    +FARTHER
    +FARTHEST
    +FASCINATE
    +FASCINATING
    +FASCINATION
    +FASCISM
    +FASCIST
    +FASHION
    +FASHIONABLE
    +FASHIONABLY
    +FAST
    +FASTEN
    +FASTENER
    +FASTENING
    +FASTIDIOUS
    +FATAL
    +FATALISM
    +FATALISTIC
    +FATALITY
    +FATALLY
    +FATE
    +FATED
    +FATEFUL
    +FATHER
    +FATHER
    +FATHERHOOD
    +FATHERLY
    +FATHOM
    +FATIGUE
    +FATTEN
    +FATTENING
    +FATTY
    +FATUOUS
    +FAUCET
    +FAULT
    +FAULTLESS
    +FAULTY
    +FAUNA
    +FAVOR
    +FAVORABLE
    +FAVORABLY
    +FAVORITE
    +FAVORITISM
    +FAWN
    +FAZE
    +FEAR
    +FEARFUL
    +FEARFULLY
    +FEARLESS
    +FEARLESSLY
    +FEARLESSNESS
    +FEASIBILITY
    +FEASIBLE
    +FEAST
    +FEAT
    +FEATHER
    +FEATHERY
    +FEATURE
    +FEBRUARY
    +FECAL
    +FECES
    +FEDERAL
    +FEDERALISM
    +FEDERALIST
    +FEDERATE
    +FEDERATION
    +FEEBLE
    +FEED
    +FEEDBACK
    +FEEDBAG
    +FEEDING
    +FEEL
    +FEELER
    +FEELING
    +FEELINGS
    +FEET
    +FEIGN
    +FEINT
    +FEISTY
    +FELINE
    +FELL
    +FELLOW
    +FELLOWSHIP
    +FELON
    +FELONY
    +FELT
    +FEMALE
    +FEMININE
    +FEMININITY
    +FEMINISM
    +FEMINIST
    +FENCE
    +FENCING
    +FEND
    +FENDER
    +FERMENT
    +FERMENTATION
    +FERMENTED
    +FERN
    +FEROCIOUS
    +FEROCIOUSLY
    +FEROCITY
    +FERRET
    +FERRY
    +FERTILE
    +FERTILITY
    +FERTILIZATION
    +FERTILIZE
    +FERTILIZER
    +FERVENT
    +FERVENTLY
    +FERVOR
    +FEST
    +FESTER
    +FESTIVAL
    +FESTIVE
    +FESTIVITIES
    +FESTIVITY
    +FETAL
    +FETCH
    +FETCHING
    +FETE
    +FETID
    +FETISH
    +FETTER
    +FETTERS
    +FETUS
    +FEUD
    +FEUDAL
    +FEUDALISM
    +FEVER
    +FEVERISH
    +FEVERISHLY
    +FIANCE
    +FIANCEE
    +FIASCO
    +FIAT
    +FIBBER
    +FIBER
    +FIBERGLASS
    +FIBROUS
    +FICKLE
    +FICTION
    +FICTIONAL
    +FICTITIOUS
    +FIDDLE
    +FIDDLER
    +FIDELITY
    +FIDGET
    +FIDGETY
    +FIELD
    +FIELDWORK
    +FIEND
    +FIENDISH
    +FIERCE
    +FIERCELY
    +FIERY
    +FIESTA
    +FIFTEEN
    +FIFTEENTH
    +FIFTH
    +FIFTIETH
    +FIFTY
    +FIGHT
    +FIGHTER
    +FIGHTING
    +FIGMENT
    +FIGURATIVE
    +FIGURATIVELY
    +FIGURE
    +FIGUREHEAD
    +FILAMENT
    +FILCH
    +FILE
    +FILIBUSTER
    +FILIGREE
    +FILL
    +FILLET
    +FILLING
    +FILLY
    +FILM
    +FILMMAKER
    +FILMY
    +FILTER
    +FILTH
    +FILTHY
    +FINAGLE
    +FINAL
    +FINALE
    +FINALIST
    +FINALITY
    +FINALIZE
    +FINALLY
    +FINALS
    +FINANCE
    +FINANCES
    +FINANCIAL
    +FINANCIALLY
    +FINANCIER
    +FINANCING
    +FINCH
    +FIND
    +FINDER
    +FINDING
    +FINE
    +FINELY
    +FINESSE
    +FINGER
    +FINGERNAIL
    +FINGERPRINT
    +FINGERTIP
    +FINICKY
    +FINISH
    +FINISHED
    +FINITE
    +FIRE
    +FIREARM
    +FIREBRAND
    +FIRECRACKER
    +FIREFIGHTER
    +FIREFLY
    +FIREMAN
    +FIREPLACE
    +FIREPROOF
    +FIRESIDE
    +FIREWALL
    +FIREWOOD
    +FIREWORKS
    +FIRM
    +FIRMLY
    +FIRMNESS
    +FIRST
    +FIRSTHAND
    +FIRSTLY
    +FISCAL
    +FISH
    +FISHBOWL
    +FISHERMAN
    +FISHERY
    +FISHING
    +FISHNET
    +FISHTAIL
    +FISHY
    +FISSION
    +FISSURE
    +FIST
    +FITFUL
    +FITNESS
    +FITTED
    +FITTING
    +FIVE
    +FIXATION
    +FIXED
    +FIXTURE
    +FIZZ
    +FIZZLE
    +FIZZY
    +FJORD
    +FLAB
    +FLABBERGASTED
    +FLABBY
    +FLACCID
    +FLAG
    +FLAGGING
    +FLAGPOLE
    +FLAGRANT
    +FLAGRANTLY
    +FLAGSHIP
    +FLAGSTONE
    +FLAIL
    +FLAIR
    +FLAK
    +FLAKE
    +FLAKY
    +FLAMBOYANCE
    +FLAMBOYANT
    +FLAMBOYANTLY
    +FLAME
    +FLAMENCO
    +FLAMING
    +FLAMINGO
    +FLAMMABLE
    +FLANK
    +FLANNEL
    +FLAP
    +FLAPJACK
    +FLARE
    +FLARED
    +FLASH
    +FLASHBACK
    +FLASHER
    +FLASHLIGHT
    +FLASHY
    +FLASK
    +FLAT
    +FLATLY
    +FLATTEN
    +FLATTER
    +FLATTERER
    +FLATTERING
    +FLATTERY
    +FLATULENCE
    +FLAUNT
    +FLAVOR
    +FLAVORED
    +FLAVORING
    +FLAW
    +FLAWED
    +FLAWLESS
    +FLAWLESSLY
    +FLEA
    +FLECK
    +FLED
    +FLEDGLING
    +FLEE
    +FLEECE
    +FLEET
    +FLEETING
    +FLESH
    +FLESHY
    +FLEW
    +FLEX
    +FLEXIBILITY
    +FLEXIBLE
    +FLEXTIME
    +FLICK
    +FLICKER
    +FLIER
    +FLIGHT
    +FLIGHTY
    +FLIMSY
    +FLINCH
    +FLING
    +FLINT
    +FLIP
    +FLIPPANT
    +FLIPPER
    +FLIRT
    +FLIRTATION
    +FLIRTATIOUS
    +FLIT
    +FLOAT
    +FLOCK
    +FLOG
    +FLOGGING
    +FLOOD
    +FLOODGATE
    +FLOODLIGHT
    +FLOODLIT
    +FLOOR
    +FLOORING
    +FLOOZY
    +FLOP
    +FLOPHOUSE
    +FLOPPY
    +FLORA
    +FLORAL
    +FLORID
    +FLORIST
    +FLOSS
    +FLOTILLA
    +FLOUNCE
    +FLOUNDER
    +FLOUR
    +FLOURISH
    +FLOUT
    +FLOW
    +FLOWER
    +FLOWERBED
    +FLOWERED
    +FLOWERPOT
    +FLOWERY
    +FLOWN
    +FLUB
    +FLUCTUATE
    +FLUCTUATION
    +FLUE
    +FLUENCY
    +FLUENT
    +FLUENTLY
    +FLUFF
    +FLUFFY
    +FLUID
    +FLUIDITY
    +FLUIDS
    +FLUKE
    +FLUNG
    +FLUNK
    +FLUNKY
    +FLUORESCENT
    +FLUORIDE
    +FLURRY
    +FLUSH
    +FLUSHED
    +FLUSTER
    +FLUSTERED
    +FLUTE
    +FLUTIST
    +FLUTTER
    +FLUX
    +FLYING
    +FLYSWATTER
    +FOAL
    +FOAM
    +FOAMY
    +FOCI
    +FOCUS
    +FODDER
    +FOGBOUND
    +FOGGY
    +FOGHORN
    +FOGY
    +FOIBLE
    +FOIL
    +FOIST
    +FOLD
    +FOLDER
    +FOLIAGE
    +FOLK
    +FOLKLORE
    +FOLKS
    +FOLKSY
    +FOLLICLE
    +FOLLOW
    +FOLLOWER
    +FOLLOWING
    +FOLLY
    +FOMENT
    +FOND
    +FONDLE
    +FONDLY
    +FONDNESS
    +FONT
    +FOOD
    +FOODSTUFF
    +FOOL
    +FOOLHARDY
    +FOOLISH
    +FOOLISHLY
    +FOOLISHNESS
    +FOOLPROOF
    +FOOT
    +FOOTAGE
    +FOOTBALL
    +FOOTBRIDGE
    +FOOTHILL
    +FOOTHOLD
    +FOOTING
    +FOOTLIGHTS
    +FOOTLOCKER
    +FOOTLOOSE
    +FOOTNOTE
    +FOOTPATH
    +FOOTPRINT
    +FOOTSIE
    +FOOTSTEP
    +FOOTWEAR
    +FOOTWORK
    +FORAGE
    +FORAY
    +FORBADE
    +FORBEAR
    +FORBEARANCE
    +FORBID
    +FORBIDDEN
    +FORBIDDING
    +FORBORE
    +FORBORNE
    +FORCE
    +FORCED
    +FORCEFUL
    +FORCEFULLY
    +FORCEPS
    +FORCIBLE
    +FORCIBLY
    +FORD
    +FORE
    +FOREARM
    +FOREBODING
    +FORECAST
    +FORECLOSE
    +FORECLOSURE
    +FOREFINGER
    +FOREFRONT
    +FOREGROUND
    +FOREHAND
    +FOREHEAD
    +FOREIGN
    +FOREIGNER
    +FOREMAN
    +FOREMOST
    +FORENSIC
    +FOREPLAY
    +FORERUNNER
    +FORESAW
    +FORESEE
    +FORESEEABLE
    +FORESEEN
    +FORESHADOW
    +FORESIGHT
    +FORESKIN
    +FOREST
    +FORESTALL
    +FORESTRY
    +FORETASTE
    +FORETELL
    +FORETHOUGHT
    +FORETOLD
    +FOREVER
    +FOREWARN
    +FOREWORD
    +FORFEIT
    +FORGAVE
    +FORGE
    +FORGER
    +FORGERY
    +FORGET
    +FORGETFUL
    +FORGETFULNESS
    +FORGIVABLE
    +FORGIVE
    +FORGIVEN
    +FORGIVENESS
    +FORGIVING
    +FORGO
    +FORGONE
    +FORGOT
    +FORGOTTEN
    +FORK
    +FORKED
    +FORKLIFT
    +FORLORN
    +FORM
    +FORMAL
    +FORMALDEHYDE
    +FORMALITY
    +FORMALIZE
    +FORMALLY
    +FORMAT
    +FORMATION
    +FORMATIVE
    +FORMER
    +FORMERLY
    +FORMIDABLE
    +FORMIDABLY
    +FORMLESS
    +FORMULA
    +FORMULAE
    +FORMULATE
    +FORMULATION
    +FORNICATE
    +FORNICATION
    +FORSAKE
    +FORSAKEN
    +FORSOOK
    +FORSWEAR
    +FORSWORE
    +FORSWORN
    +FORT
    +FORTE
    +FORTH
    +FORTHCOMING
    +FORTHRIGHT
    +FORTIETH
    +FORTIFICATION
    +FORTIFY
    +FORTITUDE
    +FORTRESS
    +FORTUITOUS
    +FORTUNATE
    +FORTUNATELY
    +FORTUNE
    +FORTY
    +FORUM
    +FORWARD
    +FORWARDS
    +FORWENT
    +FOSSIL
    +FOSSILIZE
    +FOSTER
    +FOUGHT
    +FOUL
    +FOUND
    +FOUNDATION
    +FOUNDER
    +FOUNDRY
    +FOUNTAIN
    +FOUR
    +FOURTEEN
    +FOURTEENTH
    +FOURTH
    +FOURTHLY
    +FOWL
    +FOXHOLE
    +FOXTROT
    +FOXY
    +FOYER
    +FRACAS
    +FRACTION
    +FRACTIONAL
    +FRACTIONALLY
    +FRACTIOUS
    +FRACTURE
    +FRAGILE
    +FRAGILITY
    +FRAGMENT
    +FRAGRANCE
    +FRAGRANT
    +FRAIL
    +FRAILTY
    +FRAME
    +FRAMEWORK
    +FRANC
    +FRANCHISE
    +FRANK
    +FRANKFURTER
    +FRANKLY
    +FRANKNESS
    +FRANTIC
    +FRANTICALLY
    +FRAT
    +FRATERNAL
    +FRATERNITY
    +FRATERNIZE
    +FRAUD
    +FRAUDULENT
    +FRAUDULENTLY
    +FRAUGHT
    +FRAY
    +FREAK
    +FRECKLE
    +FRECKLED
    +FREE
    +FREEBIE
    +FREEDOM
    +FREEHAND
    +FREELANCE
    +FREELANCER
    +FREELOAD
    +FREELOADER
    +FREELY
    +FREETHINKER
    +FREETHINKING
    +FREEWAY
    +FREEWHEELING
    +FREEZE
    +FREEZER
    +FREEZING
    +FREIGHT
    +FREIGHTER
    +FRENCH
    +FRENETIC
    +FRENZIED
    +FRENZY
    +FREQUENCY
    +FREQUENT
    +FREQUENTLY
    +FRESH
    +FRESHEN
    +FRESHLY
    +FRESHMAN
    +FRESHNESS
    +FRESHWATER
    +FRET
    +FRETFUL
    +FREUDIAN
    +FRIAR
    +FRICTION
    +FRIDAY
    +FRIDGE
    +FRIED
    +FRIEND
    +FRIENDLESS
    +FRIENDLINESS
    +FRIENDLY
    +FRIENDSHIP
    +FRIES
    +FRIEZE
    +FRIGATE
    +FRIGHT
    +FRIGHTEN
    +FRIGHTENED
    +FRIGHTENING
    +FRIGHTENINGLY
    +FRIGHTFUL
    +FRIGID
    +FRIGIDITY
    +FRILL
    +FRILLY
    +FRINGE
    +FRISBEE
    +FRISK
    +FRISKY
    +FRITTER
    +FRIVOLITY
    +FRIVOLOUS
    +FRIVOLOUSLY
    +FRIZZ
    +FRIZZY
    +FROG
    +FROLIC
    +FROM
    +FROND
    +FRONT
    +FRONTAGE
    +FRONTAL
    +FRONTIER
    +FRONTIERS
    +FROST
    +FROSTBITE
    +FROSTBITTEN
    +FROSTED
    +FROSTING
    +FROSTY
    +FROTH
    +FROTHY
    +FROWN
    +FROZE
    +FROZEN
    +FRUGAL
    +FRUGALITY
    +FRUGALLY
    +FRUIT
    +FRUITCAKE
    +FRUITFUL
    +FRUITION
    +FRUITLESS
    +FRUITLESSLY
    +FRUITS
    +FRUITY
    +FRUMPY
    +FRUSTRATE
    +FRUSTRATED
    +FRUSTRATING
    +FRUSTRATION
    +FUCK
    +FUCKER
    +FUCKING
    +FUDGE
    +FUEL
    +FUGITIVE
    +FULCRUM
    +FULFILL
    +FULFILLED
    +FULFILLING
    +FULFILLMENT
    +FULL
    +FULLY
    +FUMBLE
    +FUME
    +FUMES
    +FUMIGATE
    +FUMIGATION
    +FUNCTION
    +FUNCTIONAL
    +FUNCTIONALLY
    +FUND
    +FUNDAMENTAL
    +FUNDAMENTALISM
    +FUNDAMENTALIST
    +FUNDAMENTALLY
    +FUNDAMENTALS
    +FUNDING
    +FUNDS
    +FUNERAL
    +FUNGAL
    +FUNGI
    +FUNGUS
    +FUNK
    +FUNKY
    +FUNNEL
    +FUNNIES
    +FUNNILY
    +FUNNY
    +FURIOUS
    +FURIOUSLY
    +FURL
    +FURLONG
    +FURNACE
    +FURNISH
    +FURNISHED
    +FURNISHINGS
    +FURNITURE
    +FUROR
    +FURROW
    +FURRY
    +FURTHER
    +FURTHERMORE
    +FURTHEST
    +FURTIVE
    +FURTIVELY
    +FURY
    +FUSE
    +FUSELAGE
    +FUSION
    +FUSS
    +FUSSY
    +FUTILE
    +FUTILELY
    +FUTURE
    +FUTURISTIC
    +FUZZ
    +FUZZY
    +GABBY
    +GABLE
    +GADGET
    +GAFFE
    +GAGGLE
    +GAIETY
    +GAILY
    +GAIN
    +GAIT
    +GALA
    +GALACTIC
    +GALAXY
    +GALE
    +GALL
    +GALLANT
    +GALLANTLY
    +GALLANTRY
    +GALLBLADDER
    +GALLERY
    +GALLEY
    +GALLIVANT
    +GALLON
    +GALLOP
    +GALLOWS
    +GALORE
    +GALOSHES
    +GALVANIZE
    +GAMBIT
    +GAMBLE
    +GAMBLER
    +GAMBLING
    +GAME
    +GAMES
    +GAMUT
    +GANDER
    +GANG
    +GANGLAND
    +GANGLING
    +GANGPLANK
    +GANGRENE
    +GANGSTER
    +GANGWAY
    +GAPE
    +GAPING
    +GARAGE
    +GARB
    +GARBAGE
    +GARBLED
    +GARDEN
    +GARDENER
    +GARDENING
    +GARGANTUAN
    +GARGLE
    +GARGOYLE
    +GARISH
    +GARLAND
    +GARLIC
    +GARMENT
    +GARNET
    +GARNISH
    +GARRET
    +GARRISON
    +GARRULOUS
    +GARTER
    +GASEOUS
    +GASH
    +GASKET
    +GASOLINE
    +GASP
    +GASSY
    +GASTRIC
    +GASTRONOMIC
    +GASWORKS
    +GATE
    +GATECRASHER
    +GATEWAY
    +GATHER
    +GATHERING
    +GAUCHE
    +GAUDY
    +GAUGE
    +GAUNT
    +GAUNTLET
    +GAUZE
    +GAVE
    +GAVEL
    +GAWK
    +GAWKY
    +GAZE
    +GAZEBO
    +GAZELLE
    +GAZETTE
    +GEAR
    +GEARSHIFT
    +GEEK
    +GEEKY
    +GEESE
    +GEEZER
    +GEISHA
    +GELATIN
    +GELDING
    +GEMINI
    +GENDER
    +GENE
    +GENEALOGICAL
    +GENEALOGIST
    +GENEALOGY
    +GENERA
    +GENERAL
    +GENERALIZATION
    +GENERALIZE
    +GENERALIZED
    +GENERALLY
    +GENERATE
    +GENERATION
    +GENERATOR
    +GENERIC
    +GENERICALLY
    +GENEROSITY
    +GENEROUS
    +GENEROUSLY
    +GENESIS
    +GENETIC
    +GENETICALLY
    +GENETICIST
    +GENETICS
    +GENIAL
    +GENITAL
    +GENITALIA
    +GENITALS
    +GENIUS
    +GENOCIDE
    +GENRE
    +GENT
    +GENTEEL
    +GENTILE
    +GENTILITY
    +GENTLE
    +GENTLEMAN
    +GENTLENESS
    +GENTLY
    +GENTRIFICATION
    +GENTRY
    +GENUFLECT
    +GENUINE
    +GENUINELY
    +GENUS
    +GEOGRAPHER
    +GEOGRAPHICAL
    +GEOGRAPHICALLY
    +GEOGRAPHY
    +GEOLOGIC
    +GEOLOGIST
    +GEOLOGY
    +GEOMETRIC
    +GEOMETRICALLY
    +GEOMETRY
    +GERANIUM
    +GERIATRIC
    +GERIATRICS
    +GERM
    +GERMAN
    +GERMINATE
    +GERMINATION
    +GERRYMANDER
    +GERRYMANDERING
    +GERUND
    +GESTATION
    +GESTICULATE
    +GESTURE
    +GETAWAY
    +GETUP
    +GEYSER
    +GHASTLY
    +GHETTO
    +GHOST
    +GHOSTLY
    +GHOSTWRITER
    +GHOUL
    +GHOULISH
    +GIANT
    +GIBBERISH
    +GIBE
    +GIBLETS
    +GIDDY
    +GIFT
    +GIFTED
    +GIGABYTE
    +GIGANTIC
    +GIGGLE
    +GILD
    +GILL
    +GIMMICK
    +GIMMICKY
    +GINGER
    +GINGERBREAD
    +GINGERLY
    +GINGHAM
    +GIRAFFE
    +GIRDER
    +GIRDLE
    +GIRL
    +GIRLFRIEND
    +GIRTH
    +GIST
    +GIVE
    +GIVEAWAY
    +GIVEN
    +GIZMO
    +GIZZARD
    +GLACIAL
    +GLACIER
    +GLAD
    +GLADE
    +GLADIATOR
    +GLADLY
    +GLAMORIZE
    +GLAMOROUS
    +GLAMOROUSLY
    +GLAMOUR
    +GLANCE
    +GLAND
    +GLANDULAR
    +GLARE
    +GLARING
    +GLASS
    +GLASSES
    +GLASSWARE
    +GLASSY
    +GLAZE
    +GLAZED
    +GLEAM
    +GLEAMING
    +GLEAN
    +GLEE
    +GLEEFUL
    +GLEEFULLY
    +GLIB
    +GLIBLY
    +GLIDE
    +GLIDER
    +GLIMMER
    +GLIMPSE
    +GLINT
    +GLISTEN
    +GLITCH
    +GLITTER
    +GLITTERING
    +GLITZ
    +GLITZY
    +GLOAT
    +GLOB
    +GLOBAL
    +GLOBALLY
    +GLOBE
    +GLOBETROTTER
    +GLOBULAR
    +GLOBULE
    +GLOOM
    +GLOOMILY
    +GLOOMINESS
    +GLOOMY
    +GLORIFICATION
    +GLORIFIED
    +GLORIFY
    +GLORIOUS
    +GLORIOUSLY
    +GLORY
    +GLOSS
    +GLOSSARY
    +GLOSSY
    +GLOVE
    +GLOW
    +GLOWER
    +GLOWERING
    +GLOWING
    +GLOWINGLY
    +GLOWWORM
    +GLUCOSE
    +GLUE
    +GLUM
    +GLUMLY
    +GLUT
    +GLUTTON
    +GLUTTONY
    +GLYCERIN
    +GMAT
    +GNARLED
    +GNARLY
    +GNASH
    +GNAT
    +GNAW
    +GNAWING
    +GNOME
    +GOAD
    +GOAL
    +GOALIE
    +GOALKEEPER
    +GOALPOST
    +GOAT
    +GOATEE
    +GOBBLE
    +GOBBLEDYGOOK
    +GOBLET
    +GOBLIN
    +GOBS
    +GODCHILD
    +GODCHILDREN
    +GODDAMN
    +GODDAMNED
    +GODDESS
    +GODFATHER
    +GODFORSAKEN
    +GODLESS
    +GODLIKE
    +GODLY
    +GODMOTHER
    +GODPARENT
    +GODSEND
    +GOFER
    +GOGGLES
    +GOING
    +GOLD
    +GOLDEN
    +GOLDFISH
    +GOLF
    +GOLFER
    +GOLLY
    +GONDOLA
    +GONE
    +GONER
    +GONG
    +GONNA
    +GONORRHEA
    +GOOD
    +GOODIES
    +GOODNESS
    +GOODS
    +GOODWILL
    +GOODY
    +GOOEY
    +GOOF
    +GOOFY
    +GOON
    +GOOSE
    +GOPHER
    +GORE
    +GORGE
    +GORGEOUS
    +GORGEOUSLY
    +GORILLA
    +GORY
    +GOSH
    +GOSLING
    +GOSPEL
    +GOSPEL
    +GOSSIP
    +GOTTA
    +GOTTEN
    +GOUGE
    +GOULASH
    +GOURD
    +GOURMET
    +GOUT
    +GOVERN
    +GOVERNMENT
    +GOVERNMENTAL
    +GOVERNOR
    +GOVERNORSHIP
    +GOWN
    +GRAB
    +GRACE
    +GRACEFUL
    +GRACEFULLY
    +GRACEFULNESS
    +GRACIOUS
    +GRACIOUSLY
    +GRACIOUSNESS
    +GRAD
    +GRADATION
    +GRADE
    +GRADER
    +GRADIENT
    +GRADUAL
    +GRADUALLY
    +GRADUATE
    +GRADUATION
    +GRAFFITI
    +GRAFT
    +GRAIN
    +GRAINY
    +GRAM
    +GRAMMAR
    +GRAMMATICAL
    +GRAMMATICALLY
    +GRAMMY
    +GRAND
    +GRANDCHILD
    +GRANDCHILDREN
    +GRANDDAD
    +GRANDDAUGHTER
    +GRANDEUR
    +GRANDFATHER
    +GRANDIOSE
    +GRANDLY
    +GRANDMA
    +GRANDMOTHER
    +GRANDPA
    +GRANDPARENT
    +GRANDSON
    +GRANDSTAND
    +GRANITE
    +GRANNY
    +GRANOLA
    +GRANT
    +GRANTED
    +GRANULAR
    +GRANULATED
    +GRANULE
    +GRAPE
    +GRAPEFRUIT
    +GRAPEVINE
    +GRAPH
    +GRAPHIC
    +GRAPHICALLY
    +GRAPHICS
    +GRAPHITE
    +GRAPPLE
    +GRASP
    +GRASPING
    +GRASS
    +GRASSHOPPER
    +GRASSLAND
    +GRASSY
    +GRATE
    +GRATEFUL
    +GRATEFULLY
    +GRATER
    +GRATIFICATION
    +GRATIFY
    +GRATIFYING
    +GRATING
    +GRATIS
    +GRATITUDE
    +GRATUITOUS
    +GRATUITY
    +GRAVE
    +GRAVEL
    +GRAVELY
    +GRAVESTONE
    +GRAVEYARD
    +GRAVITATE
    +GRAVITATION
    +GRAVITY
    +GRAVY
    +GRAY
    +GRAYISH
    +GRAZE
    +GREASE
    +GREASY
    +GREAT
    +GREATLY
    +GREATNESS
    +GREED
    +GREEDILY
    +GREEDY
    +GREEK
    +GREEN
    +GREENBACK
    +GREENERY
    +GREENHORN
    +GREENHOUSE
    +GREENISH
    +GREENS
    +GREET
    +GREETING
    +GREETINGS
    +GREGARIOUS
    +GREMLIN
    +GRENADE
    +GREW
    +GREYHOUND
    +GRID
    +GRIDDLE
    +GRIDIRON
    +GRIDLOCK
    +GRIEF
    +GRIEVANCE
    +GRIEVE
    +GRIEVOUS
    +GRILL
    +GRIM
    +GRIMACE
    +GRIME
    +GRIMLY
    +GRIMY
    +GRIN
    +GRIND
    +GRINDER
    +GRINDSTONE
    +GRINGO
    +GRIP
    +GRIPE
    +GRIPPING
    +GRISLY
    +GRISTLE
    +GRIT
    +GRITS
    +GRITTY
    +GROAN
    +GROCER
    +GROCERIES
    +GROCERY
    +GROGGY
    +GROIN
    +GROOM
    +GROOMING
    +GROOVE
    +GROOVY
    +GROPE
    +GROSS
    +GROSSLY
    +GROTESQUE
    +GROTTO
    +GROUCH
    +GROUCHY
    +GROUND
    +GROUNDHOG
    +GROUNDING
    +GROUNDLESS
    +GROUNDLESSLY
    +GROUNDS
    +GROUNDSWELL
    +GROUNDWORK
    +GROUP
    +GROUPIE
    +GROUPING
    +GROUSE
    +GROVE
    +GROVEL
    +GROW
    +GROWER
    +GROWL
    +GROWN
    +GROWTH
    +GRUB
    +GRUBBY
    +GRUDGE
    +GRUDGING
    +GRUEL
    +GRUELING
    +GRUESOME
    +GRUFF
    +GRUFFLY
    +GRUMBLE
    +GRUMPY
    +GRUNGE
    +GRUNGY
    +GRUNT
    +GUACAMOLE
    +GUARANTEE
    +GUARANTOR
    +GUARANTY
    +GUARD
    +GUARDED
    +GUARDEDLY
    +GUARDIAN
    +GUARDRAIL
    +GUBERNATORIAL
    +GUERRILLA
    +GUESS
    +GUESSTIMATE
    +GUESSWORK
    +GUEST
    +GUFF
    +GUFFAW
    +GUIDANCE
    +GUIDE
    +GUIDEBOOK
    +GUIDED
    +GUIDELINE
    +GUIDELINES
    +GUILD
    +GUILE
    +GUILELESS
    +GUILLOTINE
    +GUILT
    +GUILTILY
    +GUILTY
    +GUISE
    +GUITAR
    +GUITARIST
    +GULCH
    +GULF
    +GULL
    +GULLET
    +GULLIBILITY
    +GULLIBLE
    +GULLY
    +GULP
    +GUMBO
    +GUMDROP
    +GUMMY
    +GUMPTION
    +GUNBOAT
    +GUNFIRE
    +GUNK
    +GUNMAN
    +GUNNER
    +GUNNYSACK
    +GUNPOINT
    +GUNPOWDER
    +GUNRUNNER
    +GUNRUNNING
    +GUNSHOT
    +GURGLE
    +GURGLING
    +GURU
    +GUSH
    +GUSHER
    +GUSHY
    +GUST
    +GUSTO
    +GUSTY
    +GUTS
    +GUTSY
    +GUTTER
    +GUTTURAL
    +GUZZLE
    +GUZZLER
    +GYMNASIUM
    +GYMNAST
    +GYMNASTICS
    +GYNECOLOGICAL
    +GYNECOLOGIST
    +GYNECOLOGY
    +GYPSY
    +GYRATE
    +GYRATION
    +GYROSCOPE
    +HABERDASHERY
    +HABIT
    +HABITABLE
    +HABITAT
    +HABITATION
    +HABITUAL
    +HABITUALLY
    +HACK
    +HACKER
    +HACKNEYED
    +HACKSAW
    +HADDOCK
    +HAGGARD
    +HAGGLE
    +HAIL
    +HAILSTONE
    +HAIR
    +HAIRBRUSH
    +HAIRCUT
    +HAIRDO
    +HAIRDRESSER
    +HAIRLINE
    +HAIRNET
    +HAIRPIECE
    +HAIRSPLITTING
    +HAIRSTYLE
    +HAIRSTYLIST
    +HAIRY
    +HALE
    +HALF
    +HALFHEARTED
    +HALFHEARTEDLY
    +HALFTIME
    +HALFWAY
    +HALIBUT
    +HALL
    +HALLELUJAH
    +HALLMARK
    +HALLOWED
    +HALLOWEEN
    +HALLUCINATE
    +HALLUCINATION
    +HALLUCINOGENIC
    +HALLWAY
    +HALO
    +HALT
    +HALTER
    +HALTING
    +HALVE
    +HALVES
    +HAMBURGER
    +HAMLET
    +HAMMER
    +HAMMERING
    +HAMMOCK
    +HAMPER
    +HAMSTER
    +HAMSTRING
    +HAND
    +HANDBAG
    +HANDBOOK
    +HANDCUFF
    +HANDCUFFS
    +HANDFUL
    +HANDGUN
    +HANDICAP
    +HANDICAPPED
    +HANDIWORK
    +HANDKERCHIEF
    +HANDLE
    +HANDLEBAR
    +HANDLER
    +HANDMADE
    +HANDOUT
    +HANDPICKED
    +HANDSHAKE
    +HANDSOME
    +HANDSOMELY
    +HANDSTAND
    +HANDWRITING
    +HANDWRITTEN
    +HANDY
    +HANDYMAN
    +HANG
    +HANGAR
    +HANGER
    +HANGING
    +HANGOUT
    +HANGOVER
    +HANKER
    +HANKERING
    +HANKIE
    +HANUKKAH
    +HAPHAZARD
    +HAPHAZARDLY
    +HAPLESS
    +HAPPEN
    +HAPPENING
    +HAPPILY
    +HAPPINESS
    +HAPPY
    +HARANGUE
    +HARASS
    +HARASSMENT
    +HARBOR
    +HARD
    +HARDBALL
    +HARDCOVER
    +HARDEN
    +HARDHEADED
    +HARDHEARTED
    +HARDLY
    +HARDSHIP
    +HARDWARE
    +HARDWOOD
    +HARDY
    +HARE
    +HAREBRAINED
    +HARELIP
    +HAREM
    +HARK
    +HARLOT
    +HARM
    +HARMFUL
    +HARMLESS
    +HARMLESSLY
    +HARMONICA
    +HARMONIOUS
    +HARMONIOUSLY
    +HARMONIZATION
    +HARMONIZE
    +HARMONY
    +HARNESS
    +HARP
    +HARPIST
    +HARPOON
    +HARPSICHORD
    +HARROWING
    +HARSH
    +HARSHLY
    +HARSHNESS
    +HARVEST
    +HASH
    +HASHISH
    +HASSLE
    +HASTE
    +HASTEN
    +HASTILY
    +HASTY
    +HATCH
    +HATCHBACK
    +HATCHET
    +HATE
    +HATED
    +HATEFUL
    +HATRED
    +HAUGHTILY
    +HAUGHTY
    +HAUL
    +HAUNCHES
    +HAUNT
    +HAUNTED
    +HAUNTING
    +HAVE
    +HAVEN
    +HAVOC
    +HAWK
    +HAYSTACK
    +HAYWIRE
    +HAZARD
    +HAZARDOUS
    +HAZE
    +HAZEL
    +HAZELNUT
    +HAZING
    +HAZY
    +HEAD
    +HEADACHE
    +HEADBAND
    +HEADFIRST
    +HEADGEAR
    +HEADHUNTER
    +HEADING
    +HEADLAND
    +HEADLIGHT
    +HEADLINE
    +HEADLINES
    +HEADLONG
    +HEADMASTER
    +HEADMISTRESS
    +HEADPHONES
    +HEADQUARTERS
    +HEADREST
    +HEADROOM
    +HEADS
    +HEADSTONE
    +HEADSTRONG
    +HEADWAY
    +HEADWIND
    +HEADY
    +HEAL
    +HEALER
    +HEALTH
    +HEALTHFUL
    +HEALTHILY
    +HEALTHY
    +HEAP
    +HEAPING
    +HEAR
    +HEARD
    +HEARING
    +HEARSAY
    +HEARSE
    +HEART
    +HEARTACHE
    +HEARTBEAT
    +HEARTBREAK
    +HEARTBREAKING
    +HEARTBROKEN
    +HEARTBURN
    +HEARTEN
    +HEARTFELT
    +HEARTH
    +HEARTILY
    +HEARTLAND
    +HEARTLESS
    +HEARTS
    +HEARTTHROB
    +HEARTWARMING
    +HEARTY
    +HEAT
    +HEATED
    +HEATEDLY
    +HEATER
    +HEATHEN
    +HEAVE
    +HEAVEN
    +HEAVENLY
    +HEAVENS
    +HEAVILY
    +HEAVINESS
    +HEAVY
    +HEAVYWEIGHT
    +HECK
    +HECKLE
    +HECKLER
    +HECKLING
    +HECTIC
    +HEDGE
    +HEDONISM
    +HEDONIST
    +HEDONISTIC
    +HEED
    +HEEDLESS
    +HEEL
    +HEELS
    +HEFTY
    +HEIFER
    +HEIGHT
    +HEIGHTEN
    +HEIGHTS
    +HEINOUS
    +HEIR
    +HEIRESS
    +HEIRLOOM
    +HEIST
    +HELD
    +HELICOPTER
    +HELIPORT
    +HELIUM
    +HELL
    +HELLO
    +HELM
    +HELMET
    +HELP
    +HELPER
    +HELPFUL
    +HELPFULLY
    +HELPFULNESS
    +HELPING
    +HELPLESS
    +HELPLESSLY
    +HELPLESSNESS
    +HEMISPHERE
    +HEMLINE
    +HEMLOCK
    +HEMOGLOBIN
    +HEMOPHILIA
    +HEMOPHILIAC
    +HEMORRHAGE
    +HEMORRHOIDS
    +HEMP
    +HENCE
    +HENCEFORTH
    +HENCHMAN
    +HEPATITIS
    +HERALD
    +HERB
    +HERBAL
    +HERBIVORE
    +HERD
    +HERE
    +HEREABOUTS
    +HEREAFTER
    +HEREBY
    +HEREDITARY
    +HEREDITY
    +HEREIN
    +HERESY
    +HERETIC
    +HERETICAL
    +HEREWITH
    +HERITAGE
    +HERMETIC
    +HERMIT
    +HERNIA
    +HERO
    +HEROIC
    +HEROICALLY
    +HEROIN
    +HEROINE
    +HEROISM
    +HERON
    +HERPES
    +HERRING
    +HERS
    +HERSELF
    +HERTZ
    +HESITANCY
    +HESITANT
    +HESITANTLY
    +HESITATE
    +HESITATION
    +HETEROGENEOUS
    +HETEROSEXUAL
    +HEWN
    +HEXAGON
    +HEXAGONAL
    +HEYDAY
    +HIATUS
    +HIBERNATE
    +HIBERNATION
    +HICCUP
    +HICCUPS
    +HICK
    +HICKEY
    +HICKORY
    +HIDDEN
    +HIDE
    +HIDEAWAY
    +HIDEOUS
    +HIDEOUSLY
    +HIDEOUT
    +HIDING
    +HIERARCHICAL
    +HIERARCHY
    +HIEROGLYPHIC
    +HIEROGLYPHICS
    +HIGH
    +HIGHBROW
    +HIGHLIGHT
    +HIGHLIGHTER
    +HIGHLIGHTS
    +HIGHLY
    +HIGHNESS
    +HIGHWAY
    +HIJACK
    +HIJACKER
    +HIJACKING
    +HIKE
    +HIKER
    +HILARIOUS
    +HILARIOUSLY
    +HILARITY
    +HILL
    +HILLBILLY
    +HILLSIDE
    +HILLTOP
    +HILLY
    +HILT
    +HIMSELF
    +HIND
    +HINDER
    +HINDQUARTERS
    +HINDRANCE
    +HINDSIGHT
    +HINDU
    +HINDUISM
    +HINGE
    +HINT
    +HINTERLAND
    +HIPPIE
    +HIPPO
    +HIPPOPOTAMI
    +HIPPOPOTAMUS
    +HIRE
    +HISPANIC
    +HISS
    +HISTORIAN
    +HISTORIC
    +HISTORICAL
    +HISTORICALLY
    +HISTORY
    +HISTRIONIC
    +HISTRIONICS
    +HITCH
    +HITCHHIKE
    +HITCHHIKER
    +HITHER
    +HITHERTO
    +HIVE
    +HIVES
    +HOARD
    +HOARDER
    +HOARSE
    +HOARSELY
    +HOAX
    +HOBBLE
    +HOBBY
    +HOBNOB
    +HOBO
    +HOCK
    +HOCKEY
    +HODGEPODGE
    +HOIST
    +HOKEY
    +HOLD
    +HOLDER
    +HOLDING
    +HOLDOVER
    +HOLDUP
    +HOLE
    +HOLIDAY
    +HOLIDAYS
    +HOLINESS
    +HOLISTIC
    +HOLLER
    +HOLLOW
    +HOLLY
    +HOLLYWOOD
    +HOLOCAUST
    +HOLOCAUST
    +HOLOGRAM
    +HOLSTER
    +HOLY
    +HOMAGE
    +HOME
    +HOMECOMING
    +HOMELAND
    +HOMELESS
    +HOMELESSNESS
    +HOMELY
    +HOMEMADE
    +HOMEMAKER
    +HOMEOPATHIC
    +HOMEOPATHY
    +HOMEOWNER
    +HOMER
    +HOMEROOM
    +HOMESICK
    +HOMESICKNESS
    +HOMESTEAD
    +HOMETOWN
    +HOMEWARD
    +HOMEWORK
    +HOMEY
    +HOMICIDAL
    +HOMICIDE
    +HOMOGENEITY
    +HOMOGENEOUS
    +HOMOGENIZE
    +HOMOGENIZED
    +HOMONYM
    +HOMOSEXUAL
    +HOMOSEXUALITY
    +HONCHO
    +HONE
    +HONEST
    +HONESTLY
    +HONESTY
    +HONEY
    +HONEYCOMB
    +HONEYMOON
    +HONEYSUCKLE
    +HONK
    +HONOR
    +HONORABLE
    +HONORABLY
    +HONORARY
    +HONORS
    +HOOD
    +HOODED
    +HOOF
    +HOOK
    +HOOKED
    +HOOKER
    +HOOKEY
    +HOOLIGAN
    +HOOP
    +HOOPS
    +HOORAY
    +HOOT
    +HOOVES
    +HOPE
    +HOPEFUL
    +HOPEFULLY
    +HOPEFULNESS
    +HOPELESS
    +HOPELESSLY
    +HOPELESSNESS
    +HOPSCOTCH
    +HORDE
    +HORIZON
    +HORIZONTAL
    +HORIZONTALLY
    +HORMONE
    +HORN
    +HORNET
    +HORNY
    +HOROSCOPE
    +HORRENDOUS
    +HORRENDOUSLY
    +HORRIBLE
    +HORRIBLY
    +HORRID
    +HORRIFIC
    +HORRIFY
    +HORRIFYING
    +HORROR
    +HORSE
    +HORSEPLAY
    +HORSEPOWER
    +HORSESHOE
    +HORSESHOES
    +HORTICULTURAL
    +HORTICULTURE
    +HOSE
    +HOSPICE
    +HOSPITABLE
    +HOSPITAL
    +HOSPITALITY
    +HOSPITALIZATION
    +HOSPITALIZE
    +HOST
    +HOSTAGE
    +HOSTEL
    +HOSTESS
    +HOSTILE
    +HOSTILITIES
    +HOSTILITY
    +HOTBED
    +HOTCAKE
    +HOTEL
    +HOTHEAD
    +HOTHEADED
    +HOTLY
    +HOTSHOT
    +HOUND
    +HOUR
    +HOURGLASS
    +HOURLY
    +HOURS
    +HOUSE
    +HOUSE
    +HOUSEBOAT
    +HOUSEBOUND
    +HOUSEBROKEN
    +HOUSEHOLD
    +HOUSEHUSBAND
    +HOUSEKEEPER
    +HOUSEKEEPING
    +HOUSEWARES
    +HOUSEWARMING
    +HOUSEWIFE
    +HOUSEWIVES
    +HOUSEWORK
    +HOUSING
    +HOVEL
    +HOVER
    +HOWDY
    +HOWEVER
    +HOWL
    +HUBBUB
    +HUBCAP
    +HUDDLE
    +HUDDLED
    +HUFF
    +HUFFY
    +HUGE
    +HUGELY
    +HULK
    +HULL
    +HULLABALOO
    +HUMAN
    +HUMANE
    +HUMANELY
    +HUMANISM
    +HUMANIST
    +HUMANITARIAN
    +HUMANITARIANISM
    +HUMANITIES
    +HUMANITY
    +HUMANIZE
    +HUMANKIND
    +HUMANLY
    +HUMBLE
    +HUMBLING
    +HUMBLY
    +HUMDRUM
    +HUMID
    +HUMIDIFY
    +HUMIDITY
    +HUMILIATE
    +HUMILIATED
    +HUMILIATING
    +HUMILIATION
    +HUMILITY
    +HUMOR
    +HUMORIST
    +HUMOROUS
    +HUMOROUSLY
    +HUMP
    +HUNCH
    +HUNCHBACK
    +HUNDRED
    +HUNDREDTH
    +HUNG
    +HUNGER
    +HUNGRILY
    +HUNGRY
    +HUNK
    +HUNKER
    +HUNT
    +HUNTER
    +HUNTING
    +HURDLE
    +HURDLER
    +HURDLES
    +HURL
    +HURRAH
    +HURRICANE
    +HURRIED
    +HURRIEDLY
    +HURRY
    +HURT
    +HURTFUL
    +HURTLE
    +HUSBAND
    +HUSH
    +HUSHED
    +HUSK
    +HUSKINESS
    +HUSKY
    +HUSTLE
    +HUSTLER
    +HUTCH
    +HYBRID
    +HYDRANT
    +HYDRAULIC
    +HYDRAULICS
    +HYDROELECTRIC
    +HYDROGEN
    +HYDROPLANE
    +HYENA
    +HYGIENE
    +HYGIENIC
    +HYGIENICALLY
    +HYMN
    +HYMNAL
    +HYPE
    +HYPER
    +HYPERACTIVE
    +HYPERACTIVITY
    +HYPERBOLE
    +HYPERSENSITIVE
    +HYPERTENSION
    +HYPERVENTILATE
    +HYPHEN
    +HYPHENATE
    +HYPHENATED
    +HYPHENATION
    +HYPNOSIS
    +HYPNOTIC
    +HYPNOTISM
    +HYPNOTIST
    +HYPNOTIZE
    +HYPOCHONDRIA
    +HYPOCHONDRIAC
    +HYPOCRISY
    +HYPOCRITE
    +HYPOCRITICAL
    +HYPOCRITICALLY
    +HYPODERMIC
    +HYPOTHERMIA
    +HYPOTHESES
    +HYPOTHESIS
    +HYPOTHETICAL
    +HYPOTHETICALLY
    +HYSTERECTOMY
    +HYSTERIA
    +HYSTERICAL
    +HYSTERICALLY
    +HYSTERICS
    +ICEBERG
    +ICEBOX
    +ICEBREAKER
    +ICED
    +ICICLE
    +ICING
    +ICKY
    +ICON
    +IDEA
    +IDEAL
    +IDEALISM
    +IDEALIST
    +IDEALISTIC
    +IDEALIZE
    +IDEALLY
    +IDENTICAL
    +IDENTICALLY
    +IDENTIFICATION
    +IDENTIFY
    +IDENTITY
    +IDEOLOGICAL
    +IDEOLOGY
    +IDIOCY
    +IDIOM
    +IDIOMATIC
    +IDIOSYNCRASY
    +IDIOSYNCRATIC
    +IDIOT
    +IDIOTIC
    +IDIOTICALLY
    +IDLE
    +IDLENESS
    +IDLY
    +IDOL
    +IDOLATROUS
    +IDOLATRY
    +IDOLIZE
    +IDYLLIC
    +IFFY
    +IGLOO
    +IGNITE
    +IGNITION
    +IGNORANCE
    +IGNORANT
    +IGNORE
    +IGUANA
    +ILLEGAL
    +ILLEGALLY
    +ILLEGIBLE
    +ILLEGIBLY
    +ILLEGITIMACY
    +ILLEGITIMATE
    +ILLICIT
    +ILLITERACY
    +ILLITERATE
    +ILLNESS
    +ILLOGICAL
    +ILLOGICALLY
    +ILLUMINATE
    +ILLUMINATING
    +ILLUMINATION
    +ILLUSION
    +ILLUSORY
    +ILLUSTRATE
    +ILLUSTRATION
    +ILLUSTRATIVE
    +ILLUSTRATOR
    +ILLUSTRIOUS
    +IMAGE
    +IMAGERY
    +IMAGINABLE
    +IMAGINARY
    +IMAGINATION
    +IMAGINATIVE
    +IMAGINATIVELY
    +IMAGINE
    +IMBALANCE
    +IMBALANCED
    +IMBECILE
    +IMBIBE
    +IMBUE
    +IMITATE
    +IMITATION
    +IMITATIVE
    +IMITATOR
    +IMMACULATE
    +IMMACULATELY
    +IMMATERIAL
    +IMMATURE
    +IMMATURITY
    +IMMEDIACY
    +IMMEDIATE
    +IMMEDIATELY
    +IMMENSE
    +IMMENSELY
    +IMMENSITY
    +IMMERSE
    +IMMERSION
    +IMMIGRANT
    +IMMIGRATE
    +IMMIGRATION
    +IMMINENT
    +IMMINENTLY
    +IMMOBILE
    +IMMOBILITY
    +IMMOBILIZE
    +IMMORAL
    +IMMORALITY
    +IMMORALLY
    +IMMORTAL
    +IMMORTALITY
    +IMMORTALIZE
    +IMMOVABLE
    +IMMUNE
    +IMMUNITY
    +IMMUNIZATION
    +IMMUNIZE
    +IMMUTABLE
    +IMPACT
    +IMPAIR
    +IMPAIRED
    +IMPAIRMENT
    +IMPALE
    +IMPART
    +IMPARTIAL
    +IMPARTIALITY
    +IMPARTIALLY
    +IMPASSABLE
    +IMPASSE
    +IMPASSIONED
    +IMPASSIVE
    +IMPATIENCE
    +IMPATIENT
    +IMPATIENTLY
    +IMPEACH
    +IMPEACHMENT
    +IMPECCABLE
    +IMPECCABLY
    +IMPEDE
    +IMPEDIMENT
    +IMPEL
    +IMPENDING
    +IMPENETRABLE
    +IMPERATIVE
    +IMPERCEPTIBLE
    +IMPERFECT
    +IMPERFECTION
    +IMPERFECTLY
    +IMPERIAL
    +IMPERIALISM
    +IMPERIALIST
    +IMPERIL
    +IMPERSONAL
    +IMPERSONATE
    +IMPERSONATION
    +IMPERSONATOR
    +IMPERTINENCE
    +IMPERTINENT
    +IMPERVIOUS
    +IMPETUOUS
    +IMPETUOUSLY
    +IMPETUS
    +IMPINGE
    +IMPISH
    +IMPLACABLE
    +IMPLANT
    +IMPLAUSIBLE
    +IMPLEMENT
    +IMPLEMENTATION
    +IMPLICATE
    +IMPLICATION
    +IMPLICIT
    +IMPLICITLY
    +IMPLODE
    +IMPLORE
    +IMPLY
    +IMPOLITE
    +IMPOLITELY
    +IMPORT
    +IMPORTANCE
    +IMPORTANT
    +IMPORTANTLY
    +IMPORTATION
    +IMPORTER
    +IMPOSE
    +IMPOSING
    +IMPOSITION
    +IMPOSSIBILITY
    +IMPOSSIBLE
    +IMPOSSIBLY
    +IMPOSTOR
    +IMPOTENCE
    +IMPOTENT
    +IMPOUND
    +IMPOVERISHED
    +IMPRACTICAL
    +IMPRECISE
    +IMPREGNABLE
    +IMPREGNATE
    +IMPRESS
    +IMPRESSION
    +IMPRESSIONABLE
    +IMPRESSIONISTIC
    +IMPRESSIVE
    +IMPRINT
    +IMPRISON
    +IMPRISONMENT
    +IMPROBABILITY
    +IMPROBABLE
    +IMPROBABLY
    +IMPROMPTU
    +IMPROPER
    +IMPROPERLY
    +IMPROPRIETY
    +IMPROVE
    +IMPROVEMENT
    +IMPROVISATION
    +IMPROVISE
    +IMPUDENCE
    +IMPUDENT
    +IMPULSE
    +IMPULSIVE
    +IMPULSIVELY
    +IMPULSIVENESS
    +IMPUNITY
    +IMPURE
    +IMPURITY
    +INABILITY
    +INACCESSIBILITY
    +INACCESSIBLE
    +INACCURACY
    +INACCURATE
    +INACTION
    +INACTIVE
    +INACTIVITY
    +INADEQUACY
    +INADEQUATE
    +INADEQUATELY
    +INADMISSIBLE
    +INADVERTENT
    +INADVERTENTLY
    +INADVISABLE
    +INALIENABLE
    +INANE
    +INANIMATE
    +INAPPROPRIATE
    +INARTICULATE
    +INATTENTION
    +INATTENTIVE
    +INAUDIBLE
    +INAUDIBLY
    +INAUGURAL
    +INAUGURATE
    +INAUGURATION
    +INAUSPICIOUS
    +INBRED
    +INCALCULABLE
    +INCANDESCENCE
    +INCANDESCENT
    +INCANTATION
    +INCAPABLE
    +INCAPACITATE
    +INCAPACITY
    +INCARCERATE
    +INCARCERATION
    +INCARNATE
    +INCARNATION
    +INCENDIARY
    +INCENSE
    +INCENTIVE
    +INCEPTION
    +INCESSANT
    +INCESSANTLY
    +INCEST
    +INCESTUOUS
    +INCH
    +INCIDENCE
    +INCIDENT
    +INCIDENTAL
    +INCIDENTALLY
    +INCINERATE
    +INCINERATION
    +INCINERATOR
    +INCISION
    +INCISIVE
    +INCISOR
    +INCITE
    +INCITEMENT
    +INCLINATION
    +INCLINE
    +INCLINED
    +INCLUDE
    +INCLUDING
    +INCLUSION
    +INCLUSIVE
    +INCOGNITO
    +INCOHERENCE
    +INCOHERENT
    +INCOHERENTLY
    +INCOME
    +INCOMING
    +INCOMPARABLE
    +INCOMPATIBILITY
    +INCOMPATIBLE
    +INCOMPETENCE
    +INCOMPETENT
    +INCOMPETENTLY
    +INCOMPLETE
    +INCOMPLETELY
    +INCOMPREHENSIBLE
    +INCONCEIVABLE
    +INCONCLUSIVE
    +INCONCLUSIVELY
    +INCONGRUITY
    +INCONGRUOUS
    +INCONSEQUENTIAL
    +INCONSIDERATE
    +INCONSISTENCY
    +INCONSISTENT
    +INCONSISTENTLY
    +INCONSOLABLE
    +INCONSPICUOUS
    +INCONSPICUOUSLY
    +INCONTINENCE
    +INCONTINENT
    +INCONVENIENCE
    +INCONVENIENT
    +INCONVENIENTLY
    +INCORPORATE
    +INCORPORATED
    +INCORPORATION
    +INCORRECT
    +INCORRECTLY
    +INCORRIGIBLE
    +INCREASE
    +INCREASED
    +INCREASING
    +INCREASINGLY
    +INCREDIBLE
    +INCREDIBLY
    +INCREDULITY
    +INCREDULOUS
    +INCREMENT
    +INCREMENTAL
    +INCRIMINATE
    +INCRIMINATING
    +INCRIMINATION
    +INCUBATE
    +INCUBATION
    +INCUBATOR
    +INCUMBENT
    +INCUR
    +INCURABLE
    +INCURABLY
    +INDEBTED
    +INDEBTEDNESS
    +INDECENCY
    +INDECENT
    +INDECENTLY
    +INDECISION
    +INDECISIVE
    +INDECISIVELY
    +INDEED
    +INDEFENSIBLE
    +INDEFINABLE
    +INDEFINABLY
    +INDEFINITE
    +INDEFINITELY
    +INDELIBLE
    +INDELIBLY
    +INDELICATE
    +INDEMNIFY
    +INDEMNITY
    +INDENT
    +INDEPENDENCE
    +INDEPENDENT
    +INDEPENDENTLY
    +INDESCRIBABLE
    +INDESCRIBABLY
    +INDESTRUCTIBLE
    +INDETERMINATE
    +INDEX
    +INDIAN
    +INDICATE
    +INDICATION
    +INDICATIVE
    +INDICATOR
    +INDICES
    +INDICT
    +INDICTMENT
    +INDIFFERENCE
    +INDIFFERENT
    +INDIFFERENTLY
    +INDIGENOUS
    +INDIGENT
    +INDIGESTIBLE
    +INDIGESTION
    +INDIGNANT
    +INDIGNANTLY
    +INDIGNATION
    +INDIGNITY
    +INDIRECT
    +INDIRECTLY
    +INDIRECTNESS
    +INDISCREET
    +INDISCRETION
    +INDISCRIMINATE
    +INDISCRIMINATELY
    +INDISPENSABLE
    +INDISPUTABLE
    +INDISTINCT
    +INDISTINCTLY
    +INDISTINGUISHABLE
    +INDIVIDUAL
    +INDIVIDUALISM
    +INDIVIDUALIST
    +INDIVIDUALISTIC
    +INDIVIDUALITY
    +INDIVIDUALLY
    +INDIVISIBLE
    +INDOCTRINATE
    +INDOCTRINATION
    +INDOLENCE
    +INDOLENT
    +INDOMITABLE
    +INDOOR
    +INDOORS
    +INDUCE
    +INDUCEMENT
    +INDUCT
    +INDUCTION
    +INDULGE
    +INDULGENCE
    +INDULGENT
    +INDUSTRIAL
    +INDUSTRIALIST
    +INDUSTRIALIZATION
    +INDUSTRIALIZE
    +INDUSTRIOUS
    +INDUSTRY
    +INEBRIATED
    +INEBRIATION
    +INEFFECTIVE
    +INEFFECTIVENESS
    +INEFFICIENCY
    +INEFFICIENT
    +INEFFICIENTLY
    +INELEGANT
    +INELIGIBILITY
    +INELIGIBLE
    +INEPT
    +INEPTITUDE
    +INEQUALITY
    +INEQUITY
    +INERT
    +INERTIA
    +INESCAPABLE
    +INESSENTIAL
    +INEVITABILITY
    +INEVITABLE
    +INEVITABLY
    +INEXACT
    +INEXCUSABLE
    +INEXHAUSTIBLE
    +INEXPENSIVE
    +INEXPENSIVELY
    +INEXPERIENCE
    +INEXPERIENCED
    +INEXPLICABLE
    +INEXPLICABLY
    +INFALLIBILITY
    +INFALLIBLE
    +INFAMOUS
    +INFAMY
    +INFANCY
    +INFANT
    +INFANTILE
    +INFANTRY
    +INFATUATED
    +INFATUATION
    +INFECT
    +INFECTION
    +INFECTIOUS
    +INFER
    +INFERENCE
    +INFERIOR
    +INFERIORITY
    +INFERNO
    +INFERTILE
    +INFERTILITY
    +INFEST
    +INFESTATION
    +INFESTED
    +INFIDEL
    +INFIDELITY
    +INFIELD
    +INFIELDER
    +INFILTRATE
    +INFILTRATION
    +INFILTRATOR
    +INFINITE
    +INFINITELY
    +INFINITESIMAL
    +INFINITIVE
    +INFINITY
    +INFIRM
    +INFIRMARY
    +INFIRMITY
    +INFLAME
    +INFLAMED
    +INFLAMMABLE
    +INFLAMMATION
    +INFLAMMATORY
    +INFLATABLE
    +INFLATE
    +INFLATED
    +INFLATION
    +INFLATIONARY
    +INFLECTION
    +INFLEXIBILITY
    +INFLEXIBLE
    +INFLEXIBLY
    +INFLICT
    +INFLICTION
    +INFLUENCE
    +INFLUENTIAL
    +INFLUENZA
    +INFLUX
    +INFO
    +INFOMERCIAL
    +INFORM
    +INFORMAL
    +INFORMALITY
    +INFORMALLY
    +INFORMANT
    +INFORMATION
    +INFORMATIVE
    +INFORMED
    +INFORMER
    +INFRACTION
    +INFRARED
    +INFRASTRUCTURE
    +INFREQUENT
    +INFREQUENTLY
    +INFRINGE
    +INFRINGEMENT
    +INFURIATE
    +INFURIATING
    +INFURIATINGLY
    +INFUSE
    +INFUSION
    +INGENIOUS
    +INGENIOUSLY
    +INGENUITY
    +INGEST
    +INGRAINED
    +INGRATIATE
    +INGRATIATING
    +INGRATITUDE
    +INGREDIENT
    +INHABIT
    +INHABITANT
    +INHALATION
    +INHALE
    +INHALER
    +INHERENT
    +INHERIT
    +INHERITANCE
    +INHIBIT
    +INHIBITED
    +INHIBITION
    +INHOSPITABLE
    +INHUMAN
    +INHUMANE
    +INHUMANITY
    +INITIAL
    +INITIALLY
    +INITIALS
    +INITIATE
    +INITIATION
    +INITIATIVE
    +INJECT
    +INJECTION
    +INJUNCTION
    +INJURE
    +INJURED
    +INJURIOUS
    +INJURY
    +INJUSTICE
    +INKLING
    +INLAID
    +INLAND
    +INLET
    +INMATE
    +INNARDS
    +INNATE
    +INNER
    +INNERMOST
    +INNING
    +INNKEEPER
    +INNOCENCE
    +INNOCENT
    +INNOCENTLY
    +INNOCUOUS
    +INNOVATE
    +INNOVATION
    +INNOVATIVE
    +INNOVATOR
    +INNUENDO
    +INNUMERABLE
    +INOCULATE
    +INOCULATION
    +INOFFENSIVE
    +INOPPORTUNE
    +INORDINATE
    +INORDINATELY
    +INORGANIC
    +INPATIENT
    +INPUT
    +INQUEST
    +INQUIRE
    +INQUIRING
    +INQUIRY
    +INQUISITION
    +INQUISITIVE
    +INROADS
    +INSANE
    +INSANELY
    +INSANITY
    +INSATIABLE
    +INSCRIBE
    +INSCRIPTION
    +INSCRUTABLE
    +INSECT
    +INSECTICIDE
    +INSECURE
    +INSECURITY
    +INSEMINATION
    +INSENSITIVE
    +INSENSITIVELY
    +INSENSITIVITY
    +INSEPARABLE
    +INSERT
    +INSERTION
    +INSIDE
    +INSIDER
    +INSIDES
    +INSIDIOUS
    +INSIGHT
    +INSIGNIA
    +INSIGNIFICANCE
    +INSIGNIFICANT
    +INSIGNIFICANTLY
    +INSINCERE
    +INSINCERELY
    +INSINCERITY
    +INSINUATE
    +INSINUATION
    +INSIPID
    +INSIST
    +INSISTENCE
    +INSISTENT
    +INSISTENTLY
    +INSOLENCE
    +INSOLENT
    +INSOLUBLE
    +INSOLVENCY
    +INSOLVENT
    +INSOMNIA
    +INSOMNIAC
    +INSPECT
    +INSPECTION
    +INSPECTOR
    +INSPIRATION
    +INSPIRATIONAL
    +INSPIRE
    +INSPIRED
    +INSPIRING
    +INSTABILITY
    +INSTALL
    +INSTALLATION
    +INSTALLMENT
    +INSTANCE
    +INSTANT
    +INSTANTANEOUS
    +INSTANTANEOUSLY
    +INSTANTLY
    +INSTEAD
    +INSTEP
    +INSTIGATE
    +INSTIGATION
    +INSTILL
    +INSTINCT
    +INSTINCTIVE
    +INSTINCTIVELY
    +INSTITUTE
    +INSTITUTION
    +INSTITUTIONAL
    +INSTRUCT
    +INSTRUCTION
    +INSTRUCTIONS
    +INSTRUCTIVE
    +INSTRUCTIVELY
    +INSTRUCTOR
    +INSTRUMENT
    +INSTRUMENTAL
    +INSUBORDINATE
    +INSUBORDINATION
    +INSUBSTANTIAL
    +INSUFFERABLE
    +INSUFFICIENCY
    +INSUFFICIENT
    +INSULAR
    +INSULARITY
    +INSULATE
    +INSULATION
    +INSULIN
    +INSULT
    +INSULTING
    +INSURANCE
    +INSURE
    +INSURED
    +INSURGENCY
    +INSURGENT
    +INSURMOUNTABLE
    +INSURRECTION
    +INTACT
    +INTAKE
    +INTANGIBLE
    +INTEGER
    +INTEGRAL
    +INTEGRATE
    +INTEGRATION
    +INTEGRITY
    +INTELLECT
    +INTELLECTUAL
    +INTELLECTUALLY
    +INTELLIGENCE
    +INTELLIGENT
    +INTELLIGENTLY
    +INTELLIGIBLE
    +INTEND
    +INTENDED
    +INTENSE
    +INTENSELY
    +INTENSIFIER
    +INTENSIFY
    +INTENSITY
    +INTENSIVE
    +INTENSIVELY
    +INTENT
    +INTENTION
    +INTENTIONAL
    +INTENTIONALLY
    +INTENTLY
    +INTER
    +INTERACT
    +INTERACTION
    +INTERACTIVE
    +INTERCEDE
    +INTERCEPT
    +INTERCEPTION
    +INTERCHANGE
    +INTERCHANGEABLE
    +INTERCHANGEABLY
    +INTERCOM
    +INTERCONNECT
    +INTERCONNECTED
    +INTERCONTINENTAL
    +INTERCOURSE
    +INTERDEPENDENCE
    +INTERDEPENDENT
    +INTEREST
    +INTERESTED
    +INTERESTING
    +INTERESTINGLY
    +INTERFACE
    +INTERFERE
    +INTERFERENCE
    +INTERIM
    +INTERIOR
    +INTERJECT
    +INTERJECTION
    +INTERLOCK
    +INTERLOCKING
    +INTERLOPER
    +INTERLUDE
    +INTERMARRIAGE
    +INTERMARRY
    +INTERMEDIARY
    +INTERMEDIATE
    +INTERMINABLE
    +INTERMISSION
    +INTERMITTENT
    +INTERMITTENTLY
    +INTERN
    +INTERNAL
    +INTERNALLY
    +INTERNATIONAL
    +INTERNATIONALLY
    +INTERNET
    +INTERNIST
    +INTERNMENT
    +INTERNSHIP
    +INTERPERSONAL
    +INTERPLANETARY
    +INTERPLAY
    +INTERPOSE
    +INTERPRET
    +INTERPRETATION
    +INTERPRETER
    +INTERRACIAL
    +INTERRELATED
    +INTERROGATE
    +INTERROGATION
    +INTERROGATOR
    +INTERRUPT
    +INTERRUPTION
    +INTERSECT
    +INTERSECTION
    +INTERSPERSE
    +INTERSTATE
    +INTERVAL
    +INTERVENE
    +INTERVENING
    +INTERVENTION
    +INTERVIEW
    +INTERVIEWER
    +INTERWEAVE
    +INTERWOVE
    +INTERWOVEN
    +INTESTATE
    +INTESTINAL
    +INTESTINE
    +INTIMACY
    +INTIMATE
    +INTIMATELY
    +INTIMIDATE
    +INTIMIDATED
    +INTIMIDATING
    +INTIMIDATION
    +INTO
    +INTOLERABLE
    +INTOLERABLY
    +INTOLERANCE
    +INTOLERANT
    +INTONATION
    +INTOXICATED
    +INTOXICATION
    +INTRACTABLE
    +INTRAMURAL
    +INTRANSITIVE
    +INTRANSITIVELY
    +INTRAVENOUS
    +INTREPID
    +INTRICACIES
    +INTRICACY
    +INTRICATE
    +INTRICATELY
    +INTRIGUE
    +INTRIGUING
    +INTRINSIC
    +INTRINSICALLY
    +INTRODUCE
    +INTRODUCTION
    +INTRODUCTORY
    +INTROSPECTIVE
    +INTROVERT
    +INTROVERTED
    +INTRUDE
    +INTRUDER
    +INTRUSION
    +INTRUSIVE
    +INTUITION
    +INTUITIVE
    +INTUITIVELY
    +INUIT
    +INUNDATE
    +INUNDATION
    +INVADE
    +INVADER
    +INVALID
    +INVALIDATE
    +INVALUABLE
    +INVARIABLE
    +INVARIABLY
    +INVASION
    +INVASIVE
    +INVENT
    +INVENTION
    +INVENTIVE
    +INVENTOR
    +INVENTORY
    +INVERSE
    +INVERSION
    +INVERT
    +INVEST
    +INVESTIGATE
    +INVESTIGATION
    +INVESTIGATIVE
    +INVESTIGATOR
    +INVESTMENT
    +INVESTOR
    +INVETERATE
    +INVIGORATE
    +INVIGORATING
    +INVINCIBLE
    +INVISIBILITY
    +INVISIBLE
    +INVISIBLY
    +INVITATION
    +INVITE
    +INVITING
    +INVOICE
    +INVOKE
    +INVOLUNTARILY
    +INVOLUNTARY
    +INVOLVE
    +INVOLVED
    +INVOLVEMENT
    +INWARD
    +INWARDLY
    +INWARDS
    +IODINE
    +IOTA
    +IRASCIBLE
    +IRATE
    +IRIDESCENT
    +IRIS
    +IRISH
    +IRON
    +IRONIC
    +IRONICALLY
    +IRONING
    +IRONY
    +IRRATIONAL
    +IRRATIONALITY
    +IRRATIONALLY
    +IRRECONCILABLE
    +IRREFUTABLE
    +IRREGULAR
    +IRREGULARITY
    +IRREGULARLY
    +IRRELEVANCE
    +IRRELEVANT
    +IRREPARABLE
    +IRREPARABLY
    +IRREPLACEABLE
    +IRREPRESSIBLE
    +IRREPROACHABLE
    +IRRESISTIBLE
    +IRRESISTIBLY
    +IRRESPECTIVE
    +IRRESPONSIBILITY
    +IRRESPONSIBLE
    +IRRESPONSIBLY
    +IRREVERENCE
    +IRREVERENT
    +IRREVERENTLY
    +IRREVERSIBLE
    +IRRIGATE
    +IRRIGATION
    +IRRITABILITY
    +IRRITABLE
    +IRRITABLY
    +IRRITANT
    +IRRITATE
    +IRRITATING
    +IRRITATION
    +ISLAM
    +ISLAMIC
    +ISLAND
    +ISLANDER
    +ISLE
    +ISOLATE
    +ISOLATED
    +ISOLATION
    +ISSUE
    +ISTHMUS
    +ITALIAN
    +ITALIC
    +ITALICIZE
    +ITALICS
    +ITCH
    +ITCHINESS
    +ITCHY
    +ITEM
    +ITEMIZE
    +ITINERANT
    +ITINERARY
    +ITSELF
    +IVORY
    +JABBER
    +JACK
    +JACKAL
    +JACKASS
    +JACKET
    +JACKHAMMER
    +JACKKNIFE
    +JACKKNIVES
    +JACKPOT
    +JACUZZI
    +JADE
    +JADED
    +JAGGED
    +JAGUAR
    +JAIL
    +JAILER
    +JALOPY
    +JAMB
    +JAMBOREE
    +JAMMED
    +JANGLE
    +JANITOR
    +JANUARY
    +JAPANESE
    +JARGON
    +JAUNDICE
    +JAUNDICED
    +JAUNT
    +JAUNTILY
    +JAUNTY
    +JAVELIN
    +JAWS
    +JAYWALKER
    +JAZZ
    +JAZZY
    +JEALOUS
    +JEALOUSLY
    +JEALOUSY
    +JEANS
    +JEEP
    +JEER
    +JEEZ
    +JELLY
    +JELLYFISH
    +JEOPARDIZE
    +JEOPARDY
    +JERK
    +JERKILY
    +JERKY
    +JERSEY
    +JEST
    +JESTER
    +JESUS
    +JETTISON
    +JETTY
    +JEWEL
    +JEWELED
    +JEWELER
    +JEWELRY
    +JEWISH
    +JIBE
    +JIFFY
    +JIGGER
    +JIGGLE
    +JILT
    +JINGLE
    +JINX
    +JINXED
    +JITTERS
    +JITTERY
    +JIVE
    +JOBLESS
    +JOBLESSNESS
    +JOCK
    +JOCKEY
    +JOCKSTRAP
    +JOCULAR
    +JOCULARITY
    +JOGGER
    +JOGGING
    +JOHN
    +JOIN
    +JOINT
    +JOINTLY
    +JOKE
    +JOKER
    +JOLLY
    +JOLT
    +JOSTLE
    +JOURNAL
    +JOURNALISM
    +JOURNALIST
    +JOURNEY
    +JOVIAL
    +JOWLS
    +JOYFUL
    +JOYFULLY
    +JOYFULNESS
    +JOYOUS
    +JOYOUSLY
    +JOYRIDE
    +JOYRIDER
    +JOYRIDING
    +JOYSTICK
    +JUBILANT
    +JUBILATION
    +JUDAISM
    +JUDGE
    +JUDGMENT
    +JUDGMENTAL
    +JUDICIAL
    +JUDICIARY
    +JUDICIOUS
    +JUDICIOUSLY
    +JUGGLE
    +JUGGLER
    +JUGULAR
    +JUICE
    +JUICY
    +JUKEBOX
    +JULY
    +JUMBLE
    +JUMBLED
    +JUMBO
    +JUMP
    +JUMPER
    +JUMPSUIT
    +JUMPY
    +JUNCTION
    +JUNCTURE
    +JUNE
    +JUNGLE
    +JUNIOR
    +JUNIOR
    +JUNK
    +JUNKET
    +JUNKIE
    +JUNKYARD
    +JUNTA
    +JUPITER
    +JURISDICTION
    +JUROR
    +JURY
    +JUST
    +JUSTICE
    +JUSTIFIABLE
    +JUSTIFIABLY
    +JUSTIFICATION
    +JUSTIFIED
    +JUSTIFY
    +JUSTLY
    +JUVENILE
    +JUXTAPOSE
    +JUXTAPOSITION
    +KALEIDOSCOPE
    +KANGAROO
    +KAPUT
    +KARAT
    +KARATE
    +KARMA
    +KAYAK
    +KEEL
    +KEEN
    +KEENLY
    +KEENNESS
    +KEEP
    +KEEPER
    +KEEPING
    +KEEPSAKE
    +KENNEL
    +KEPT
    +KERNEL
    +KEROSENE
    +KETCHUP
    +KETTLE
    +KEYBOARD
    +KEYHOLE
    +KEYNOTE
    +KHAKI
    +KHAKIS
    +KICK
    +KICKBACK
    +KICKOFF
    +KIDDIE
    +KIDDO
    +KIDNAP
    +KIDNAPPER
    +KIDNAPPING
    +KIDNEY
    +KILL
    +KILLER
    +KILLING
    +KILN
    +KILO
    +KILOBYTE
    +KILOGRAM
    +KILOMETER
    +KILOWATT
    +KILT
    +KIMONO
    +KIND
    +KINDERGARTEN
    +KINDERGARTNER
    +KINDHEARTED
    +KINDLE
    +KINDLING
    +KINDLY
    +KINDNESS
    +KINDRED
    +KINFOLK
    +KING
    +KINGDOM
    +KINGFISHER
    +KINGPIN
    +KINK
    +KINKY
    +KIOSK
    +KISS
    +KITCHEN
    +KITE
    +KITTEN
    +KITTY
    +KIWI
    +KLEENEX
    +KLEPTOMANIAC
    +KLUTZ
    +KLUTZY
    +KNACK
    +KNAPSACK
    +KNEAD
    +KNEE
    +KNEECAP
    +KNEEL
    +KNELT
    +KNEW
    +KNICKERS
    +KNICKKNACK
    +KNIFE
    +KNIGHT
    +KNIT
    +KNITTING
    +KNIVES
    +KNOB
    +KNOBBY
    +KNOCK
    +KNOCKER
    +KNOCKOUT
    +KNOLL
    +KNOT
    +KNOTTY
    +KNOW
    +KNOWING
    +KNOWINGLY
    +KNOWLEDGE
    +KNOWLEDGEABLE
    +KNOWLEDGEABLY
    +KNOWN
    +KNUCKLE
    +KOALA
    +KORAN
    +KOREAN
    +KOSHER
    +KOWTOW
    +KUDOS
    +KWANZAA
    +LABEL
    +LABOR
    +LABORATORY
    +LABORER
    +LABORIOUS
    +LABORIOUSLY
    +LABYRINTH
    +LACE
    +LACERATE
    +LACERATION
    +LACK
    +LACKING
    +LACKLUSTER
    +LACQUER
    +LACY
    +LADDER
    +LADEN
    +LADLE
    +LADY
    +LADYBUG
    +LAGOON
    +LAID
    +LAIN
    +LAIR
    +LAKE
    +LAMB
    +LAME
    +LAMENT
    +LAMENTABLE
    +LAMINATE
    +LAMP
    +LAMPOON
    +LAMPSHADE
    +LANCE
    +LAND
    +LANDFILL
    +LANDING
    +LANDLADY
    +LANDLOCKED
    +LANDLORD
    +LANDMARK
    +LANDOWNER
    +LANDSCAPE
    +LANDSLIDE
    +LANE
    +LANGUAGE
    +LANGUID
    +LANGUISH
    +LANGUOROUS
    +LANKY
    +LANTERN
    +LAPEL
    +LAPSE
    +LAPTOP
    +LARCENY
    +LARD
    +LARGE
    +LARGELY
    +LARK
    +LARVA
    +LARVAE
    +LARYNGITIS
    +LARYNX
    +LASCIVIOUS
    +LASER
    +LASH
    +LASSO
    +LAST
    +LASTING
    +LASTLY
    +LATCH
    +LATE
    +LATELY
    +LATENT
    +LATER
    +LATERAL
    +LATEST
    +LATEX
    +LATHER
    +LATIN
    +LATINA
    +LATINO
    +LATITUDE
    +LATRINE
    +LATTER
    +LAUDABLE
    +LAUGH
    +LAUGHABLE
    +LAUGHINGSTOCK
    +LAUGHTER
    +LAUNCH
    +LAUNDER
    +LAUNDROMAT
    +LAUNDRY
    +LAUREATE
    +LAUREL
    +LAVA
    +LAVATORY
    +LAVENDER
    +LAVISH
    +LAWFUL
    +LAWLESS
    +LAWLESSNESS
    +LAWMAKER
    +LAWN
    +LAWSUIT
    +LAWYER
    +LAXATIVE
    +LAXITY
    +LAYAWAY
    +LAYER
    +LAYMAN
    +LAYOFF
    +LAYOUT
    +LAYOVER
    +LAZILY
    +LAZINESS
    +LAZY
    +LEAD
    +LEADER
    +LEADERSHIP
    +LEADING
    +LEAF
    +LEAFLET
    +LEAFY
    +LEAGUE
    +LEAK
    +LEAKAGE
    +LEAKY
    +LEAN
    +LEANING
    +LEAP
    +LEAPFROG
    +LEAPT
    +LEARN
    +LEARNED
    +LEARNING
    +LEASE
    +LEASH
    +LEAST
    +LEATHER
    +LEATHERY
    +LEAVE
    +LEAVES
    +LECHEROUS
    +LECTERN
    +LECTURE
    +LECTURER
    +LEDGE
    +LEDGER
    +LEECH
    +LEEK
    +LEER
    +LEERY
    +LEEWAY
    +LEFT
    +LEFTOVERS
    +LEGACY
    +LEGAL
    +LEGALITY
    +LEGALIZE
    +LEGALLY
    +LEGEND
    +LEGENDARY
    +LEGGINGS
    +LEGGY
    +LEGIBILITY
    +LEGIBLE
    +LEGIBLY
    +LEGION
    +LEGISLATE
    +LEGISLATION
    +LEGISLATIVE
    +LEGISLATOR
    +LEGISLATURE
    +LEGIT
    +LEGITIMACY
    +LEGITIMATE
    +LEGITIMATELY
    +LEISURE
    +LEISURELY
    +LEMON
    +LEMONADE
    +LEND
    +LENDER
    +LENGTH
    +LENGTHEN
    +LENGTHWISE
    +LENGTHY
    +LENIENCY
    +LENIENT
    +LENIENTLY
    +LENS
    +LENT
    +LENT
    +LENTIL
    +LEOPARD
    +LEOTARD
    +LEPER
    +LEPROSY
    +LEPROUS
    +LESBIAN
    +LESBIANISM
    +LESS
    +LESSEN
    +LESSER
    +LESSON
    +LETDOWN
    +LETHAL
    +LETHALLY
    +LETHARGIC
    +LETHARGY
    +LETTER
    +LETTERHEAD
    +LETTUCE
    +LETUP
    +LEUKEMIA
    +LEVEE
    +LEVEL
    +LEVELHEADED
    +LEVER
    +LEVERAGE
    +LEVITATE
    +LEVITATION
    +LEVITY
    +LEVY
    +LEWD
    +LEXICAL
    +LEXICON
    +LIABILITY
    +LIABLE
    +LIAISE
    +LIAISON
    +LIAR
    +LIBEL
    +LIBELOUS
    +LIBERAL
    +LIBERALISM
    +LIBERALIZE
    +LIBERALLY
    +LIBERATE
    +LIBERATED
    +LIBERATION
    +LIBERTY
    +LIBIDO
    +LIBRA
    +LIBRARIAN
    +LIBRARY
    +LICE
    +LICENSE
    +LICHEN
    +LICK
    +LICKING
    +LICORICE
    +LIEN
    +LIEU
    +LIEUTENANT
    +LIFE
    +LIFEBOAT
    +LIFEGUARD
    +LIFELESS
    +LIFELIKE
    +LIFELINE
    +LIFELONG
    +LIFESAVER
    +LIFESTYLE
    +LIFETIME
    +LIFT
    +LIFTOFF
    +LIGAMENT
    +LIGHT
    +LIGHTEN
    +LIGHTER
    +LIGHTHEARTED
    +LIGHTHOUSE
    +LIGHTING
    +LIGHTLY
    +LIGHTNESS
    +LIGHTNING
    +LIGHTWEIGHT
    +LIKABLE
    +LIKE
    +LIKELIHOOD
    +LIKELY
    +LIKEN
    +LIKENESS
    +LIKEWISE
    +LIKING
    +LILAC
    +LILT
    +LILY
    +LIMB
    +LIMBO
    +LIME
    +LIMELIGHT
    +LIMERICK
    +LIMIT
    +LIMITATION
    +LIMITATIONS
    +LIMITED
    +LIMITING
    +LIMO
    +LIMOUSINE
    +LIMP
    +LINCHPIN
    +LINE
    +LINEAGE
    +LINEAR
    +LINED
    +LINEN
    +LINENS
    +LINER
    +LINES
    +LINEUP
    +LINGER
    +LINGERIE
    +LINGO
    +LINGUIST
    +LINGUISTIC
    +LINGUISTICS
    +LINIMENT
    +LINING
    +LINK
    +LINKAGE
    +LINOLEUM
    +LINT
    +LION
    +LIPSTICK
    +LIQUEFY
    +LIQUEUR
    +LIQUID
    +LIQUIDATE
    +LIQUIDATION
    +LIQUOR
    +LISP
    +LIST
    +LISTEN
    +LISTENER
    +LISTING
    +LISTLESS
    +LISTLESSLY
    +LITANY
    +LITE
    +LITER
    +LITERACY
    +LITERAL
    +LITERALLY
    +LITERARY
    +LITERATE
    +LITERATURE
    +LITHE
    +LITIGATE
    +LITIGATION
    +LITTER
    +LITTERBUG
    +LITTLE
    +LITURGICAL
    +LITURGY
    +LIVABLE
    +LIVE
    +LIVELIHOOD
    +LIVELY
    +LIVEN
    +LIVER
    +LIVES
    +LIVESTOCK
    +LIVID
    +LIVING
    +LIZARD
    +LLAMA
    +LOAD
    +LOADED
    +LOADS
    +LOAF
    +LOAFER
    +LOAN
    +LOATH
    +LOATHE
    +LOATHING
    +LOATHSOME
    +LOAVES
    +LOBBY
    +LOBBYIST
    +LOBE
    +LOBSTER
    +LOCAL
    +LOCALE
    +LOCALITY
    +LOCALIZED
    +LOCALLY
    +LOCATE
    +LOCATION
    +LOCK
    +LOCKER
    +LOCKET
    +LOCKSMITH
    +LOCOMOTIVE
    +LOCUST
    +LODGE
    +LODGING
    +LOFT
    +LOFTY
    +LOGBOOK
    +LOGGING
    +LOGIC
    +LOGICAL
    +LOGICALLY
    +LOGISTICAL
    +LOGISTICS
    +LOGJAM
    +LOGO
    +LOINCLOTH
    +LOITER
    +LOLL
    +LOLLIPOP
    +LONE
    +LONELINESS
    +LONELY
    +LONER
    +LONESOME
    +LONG
    +LONGEVITY
    +LONGHAND
    +LONGING
    +LONGINGLY
    +LONGITUDE
    +LONGITUDINAL
    +LONGSHOREMAN
    +LONGTIME
    +LOOK
    +LOOKALIKE
    +LOOKOUT
    +LOOKS
    +LOOM
    +LOONY
    +LOOP
    +LOOPHOLE
    +LOOSE
    +LOOSELY
    +LOOSEN
    +LOOT
    +LOOTER
    +LOPE
    +LOPSIDED
    +LORD
    +LORD
    +LORE
    +LOSE
    +LOSER
    +LOSS
    +LOST
    +LOTION
    +LOTS
    +LOTTERY
    +LOUD
    +LOUDLY
    +LOUDMOUTH
    +LOUDMOUTHED
    +LOUDNESS
    +LOUDSPEAKER
    +LOUNGE
    +LOUSE
    +LOUSY
    +LOVABLE
    +LOVE
    +LOVELINESS
    +LOVELY
    +LOVER
    +LOVERS
    +LOVESICK
    +LOVING
    +LOVINGLY
    +LOWBROW
    +LOWDOWN
    +LOWER
    +LOWERCASE
    +LOWLY
    +LOYAL
    +LOYALLY
    +LOYALTY
    +LOZENGE
    +LUBRICANT
    +LUBRICATE
    +LUBRICATION
    +LUCID
    +LUCIDITY
    +LUCIDLY
    +LUCK
    +LUCKILY
    +LUCKY
    +LUCRATIVE
    +LUDICROUS
    +LUDICROUSLY
    +LUGGAGE
    +LUGUBRIOUS
    +LUKEWARM
    +LULL
    +LULLABY
    +LUMBER
    +LUMBERING
    +LUMBERJACK
    +LUMBERYARD
    +LUMINARY
    +LUMINOUS
    +LUMP
    +LUMPY
    +LUNACY
    +LUNAR
    +LUNATIC
    +LUNCH
    +LUNCHBOX
    +LUNCHEON
    +LUNCHTIME
    +LUNG
    +LUNGE
    +LURCH
    +LURE
    +LURID
    +LURIDLY
    +LURK
    +LUSCIOUS
    +LUSH
    +LUST
    +LUSTER
    +LUSTROUS
    +LUSTY
    +LUTHERAN
    +LUXURIANT
    +LUXURIATE
    +LUXURIOUS
    +LUXURIOUSLY
    +LUXURY
    +LYING
    +LYNCH
    +LYNCHING
    +LYRIC
    +LYRICAL
    +LYRICIST
    +LYRICS
    +MACABRE
    +MACARONI
    +MACE
    +MACHETE
    +MACHINE
    +MACHINERY
    +MACHINIST
    +MACHO
    +MACKEREL
    +MACRO
    +MACROCOSM
    +MADAM
    +MADDEN
    +MADDENING
    +MADDENINGLY
    +MADE
    +MADHOUSE
    +MADLY
    +MADMAN
    +MADNESS
    +MAELSTROM
    +MAFIA
    +MAGAZINE
    +MAGENTA
    +MAGGOT
    +MAGIC
    +MAGICAL
    +MAGICALLY
    +MAGICIAN
    +MAGISTRATE
    +MAGNANIMITY
    +MAGNANIMOUS
    +MAGNATE
    +MAGNESIUM
    +MAGNET
    +MAGNETIC
    +MAGNETISM
    +MAGNETIZE
    +MAGNIFICATION
    +MAGNIFICENCE
    +MAGNIFICENT
    +MAGNIFICENTLY
    +MAGNIFY
    +MAGNITUDE
    +MAGNOLIA
    +MAGPIE
    +MAHOGANY
    +MAID
    +MAIDEN
    +MAIL
    +MAILBOX
    +MAILING
    +MAILMAN
    +MAIM
    +MAIN
    +MAINFRAME
    +MAINLAND
    +MAINLY
    +MAINSTAY
    +MAINSTREAM
    +MAINTAIN
    +MAINTENANCE
    +MAJESTIC
    +MAJESTICALLY
    +MAJESTY
    +MAJOR
    +MAJORITY
    +MAJORLY
    +MAKE
    +MAKER
    +MAKESHIFT
    +MAKEUP
    +MAKING
    +MALADY
    +MALAISE
    +MALARIA
    +MALE
    +MALEVOLENCE
    +MALEVOLENT
    +MALFUNCTION
    +MALICE
    +MALICIOUS
    +MALICIOUSLY
    +MALIGN
    +MALIGNANCY
    +MALIGNANT
    +MALL
    +MALLARD
    +MALLET
    +MALNOURISHED
    +MALNUTRITION
    +MALPRACTICE
    +MALT
    +MAMA
    +MAMMAL
    +MAMMOTH
    +MANACLE
    +MANAGE
    +MANAGEABLE
    +MANAGEMENT
    +MANAGER
    +MANAGERIAL
    +MANDARIN
    +MANDARIN
    +MANDATE
    +MANDATORY
    +MANE
    +MANEUVER
    +MANEUVERS
    +MANGE
    +MANGER
    +MANGLE
    +MANGO
    +MANGROVE
    +MANGY
    +MANHANDLE
    +MANHOLE
    +MANHOOD
    +MANHUNT
    +MANIA
    +MANIAC
    +MANIACAL
    +MANIC
    +MANICURE
    +MANICURIST
    +MANIFEST
    +MANIFESTATION
    +MANIFESTO
    +MANIFOLD
    +MANIPULATE
    +MANIPULATION
    +MANIPULATIVE
    +MANKIND
    +MANLINESS
    +MANLY
    +MANNED
    +MANNEQUIN
    +MANNER
    +MANNERISM
    +MANNERS
    +MANNISH
    +MANOR
    +MANPOWER
    +MANSION
    +MANSLAUGHTER
    +MANTEL
    +MANTELPIECE
    +MANTLE
    +MANTRA
    +MANUAL
    +MANUALLY
    +MANUFACTURE
    +MANUFACTURER
    +MANUFACTURING
    +MANURE
    +MANUSCRIPT
    +MANY
    +MAORI
    +MAPLE
    +MARATHON
    +MARBLE
    +MARBLES
    +MARCH
    +MARCH
    +MARE
    +MARGARINE
    +MARGIN
    +MARGINAL
    +MARGINALLY
    +MARIJUANA
    +MARINA
    +MARINADE
    +MARINATE
    +MARINE
    +MARINE
    +MARINER
    +MARIONETTE
    +MARITAL
    +MARITIME
    +MARK
    +MARKDOWN
    +MARKED
    +MARKER
    +MARKET
    +MARKETABILITY
    +MARKETABLE
    +MARKETER
    +MARKETING
    +MARKETPLACE
    +MARKING
    +MARKSMAN
    +MARKUP
    +MARMALADE
    +MAROON
    +MAROONED
    +MARQUEE
    +MARRIAGE
    +MARRIED
    +MARROW
    +MARRY
    +MARS
    +MARSH
    +MARSHAL
    +MARSHMALLOW
    +MARSHY
    +MARSUPIAL
    +MART
    +MARTIAL
    +MARTIAN
    +MARTYR
    +MARTYRDOM
    +MARVEL
    +MARVELOUS
    +MARXISM
    +MARXIST
    +MASCARA
    +MASCOT
    +MASCULINE
    +MASCULINITY
    +MASH
    +MASK
    +MASOCHISM
    +MASOCHIST
    +MASOCHISTIC
    +MASON
    +MASON
    +MASONRY
    +MASQUERADE
    +MASS
    +MASS
    +MASSACRE
    +MASSAGE
    +MASSES
    +MASSEUR
    +MASSEUSE
    +MASSIVE
    +MAST
    +MASTER
    +MASTERFUL
    +MASTERMIND
    +MASTERPIECE
    +MASTERY
    +MASTURBATE
    +MASTURBATION
    +MATCH
    +MATCHBOOK
    +MATCHBOX
    +MATCHLESS
    +MATCHMAKER
    +MATCHMAKING
    +MATCHSTICK
    +MATE
    +MATERIAL
    +MATERIALISM
    +MATERIALIST
    +MATERIALISTIC
    +MATERIALIZE
    +MATERNAL
    +MATERNITY
    +MATH
    +MATHEMATICAL
    +MATHEMATICALLY
    +MATHEMATICIAN
    +MATHEMATICS
    +MATINEE
    +MATRIARCH
    +MATRIARCHAL
    +MATRIARCHY
    +MATRICULATE
    +MATRIMONIAL
    +MATRIMONY
    +MATRON
    +MATRONLY
    +MATTE
    +MATTED
    +MATTER
    +MATTING
    +MATTRESS
    +MATURE
    +MATURITY
    +MAUDLIN
    +MAUL
    +MAUSOLEUM
    +MAUVE
    +MAVERICK
    +MAWKISH
    +MAXIM
    +MAXIMIZE
    +MAXIMUM
    +MAYBE
    +MAYDAY
    +MAYHEM
    +MAYO
    +MAYONNAISE
    +MAYOR
    +MAZE
    +MCCOY
    +MEADOW
    +MEAGER
    +MEAL
    +MEALTIME
    +MEAN
    +MEANDER
    +MEANING
    +MEANINGFUL
    +MEANINGFULLY
    +MEANINGLESS
    +MEANS
    +MEANT
    +MEANTIME
    +MEANWHILE
    +MEASLES
    +MEASLY
    +MEASURABLE
    +MEASURE
    +MEASUREMENT
    +MEAT
    +MEATBALL
    +MEATLOAF
    +MEATY
    +MECCA
    +MECCA
    +MECHANIC
    +MECHANICAL
    +MECHANICALLY
    +MECHANICS
    +MECHANISM
    +MECHANIZATION
    +MECHANIZE
    +MEDAL
    +MEDALIST
    +MEDALLION
    +MEDDLE
    +MEDDLER
    +MEDDLESOME
    +MEDIA
    +MEDIAN
    +MEDIATE
    +MEDIATION
    +MEDIATOR
    +MEDICAID
    +MEDICAL
    +MEDICALLY
    +MEDICARE
    +MEDICATED
    +MEDICATION
    +MEDICINAL
    +MEDICINE
    +MEDIEVAL
    +MEDIOCRE
    +MEDIOCRITY
    +MEDITATE
    +MEDITATION
    +MEDITERRANEAN
    +MEDIUM
    +MEDLEY
    +MEEK
    +MEEKLY
    +MEEKNESS
    +MEET
    +MEETING
    +MEETINGHOUSE
    +MEGABYTE
    +MEGALOMANIA
    +MEGALOMANIAC
    +MEGAPHONE
    +MEGATON
    +MELANCHOLY
    +MELD
    +MELEE
    +MELLOW
    +MELODIC
    +MELODIOUS
    +MELODRAMA
    +MELODRAMATIC
    +MELODY
    +MELON
    +MELT
    +MELTDOWN
    +MEMBER
    +MEMBERSHIP
    +MEMBRANE
    +MEMENTO
    +MEMO
    +MEMOIRS
    +MEMORABILIA
    +MEMORABLE
    +MEMORABLY
    +MEMORANDA
    +MEMORANDUM
    +MEMORIAL
    +MEMORIZE
    +MEMORY
    +MENACE
    +MENACING
    +MENAGERIE
    +MEND
    +MENIAL
    +MENINGITIS
    +MENOPAUSE
    +MENORAH
    +MENSTRUAL
    +MENSTRUATE
    +MENSTRUATION
    +MENTAL
    +MENTALITY
    +MENTALLY
    +MENTHOL
    +MENTION
    +MENTOR
    +MENU
    +MEOW
    +MERCENARY
    +MERCHANDISE
    +MERCHANT
    +MERCIFUL
    +MERCIFULLY
    +MERCILESS
    +MERCILESSLY
    +MERCURY
    +MERCURY
    +MERCY
    +MERE
    +MERELY
    +MERGE
    +MERGER
    +MERIDIAN
    +MERINGUE
    +MERIT
    +MERMAID
    +MERRILY
    +MERRIMENT
    +MERRY
    +MESH
    +MESMERIZE
    +MESS
    +MESSAGE
    +MESSENGER
    +MESSIAH
    +MESSY
    +METABOLIC
    +METABOLISM
    +METAL
    +METALLIC
    +METALLURGIST
    +METALLURGY
    +METAMORPHOSES
    +METAMORPHOSIS
    +METAPHOR
    +METAPHORICAL
    +METAPHORICALLY
    +METAPHYSICAL
    +METAPHYSICS
    +METE
    +METEOR
    +METEORIC
    +METEORITE
    +METEOROLOGICAL
    +METEOROLOGIST
    +METEOROLOGY
    +METER
    +METHADONE
    +METHANE
    +METHOD
    +METHODICAL
    +METHODICALLY
    +METHODIST
    +METHODOLOGICAL
    +METHODOLOGY
    +METICULOUS
    +METICULOUSLY
    +METRIC
    +METRO
    +METROPOLIS
    +METROPOLITAN
    +METTLE
    +MEXICAN
    +MEZZANINE
    +MICE
    +MICROBE
    +MICROBIOLOGY
    +MICROCHIP
    +MICROCOSM
    +MICROFICHE
    +MICROFILM
    +MICROORGANISM
    +MICROPHONE
    +MICROPROCESSOR
    +MICROSCOPE
    +MICROSCOPIC
    +MICROWAVE
    +MIDAIR
    +MIDDAY
    +MIDDLE
    +MIDDLEMAN
    +MIDGET
    +MIDNIGHT
    +MIDRIFF
    +MIDST
    +MIDSUMMER
    +MIDTERM
    +MIDWAY
    +MIDWEEK
    +MIDWEST
    +MIDWESTERN
    +MIDWIFE
    +MIDWINTER
    +MIDWIVES
    +MIFFED
    +MIGHT
    +MIGHTY
    +MIGRAINE
    +MIGRANT
    +MIGRATE
    +MIGRATION
    +MIGRATORY
    +MIKE
    +MILD
    +MILDEW
    +MILDLY
    +MILDNESS
    +MILE
    +MILEAGE
    +MILES
    +MILESTONE
    +MILIEU
    +MILITANCY
    +MILITANT
    +MILITARISM
    +MILITARY
    +MILITATE
    +MILITIA
    +MILK
    +MILKMAN
    +MILKY
    +MILL
    +MILLENNIA
    +MILLENNIUM
    +MILLIGRAM
    +MILLILITER
    +MILLIMETER
    +MILLINER
    +MILLINERY
    +MILLION
    +MILLIONAIRE
    +MILLIONTH
    +MIME
    +MIMIC
    +MIMICRY
    +MINCE
    +MINCEMEAT
    +MIND
    +MINDFUL
    +MINDLESS
    +MINE
    +MINEFIELD
    +MINER
    +MINERAL
    +MINGLE
    +MINI
    +MINIATURE
    +MINIMAL
    +MINIMALLY
    +MINIMIZE
    +MINIMUM
    +MINING
    +MINISERIES
    +MINISKIRT
    +MINISTER
    +MINISTERIAL
    +MINISTRY
    +MINIVAN
    +MINK
    +MINNOW
    +MINOR
    +MINORITY
    +MINSTREL
    +MINT
    +MINTY
    +MINUS
    +MINUSCULE
    +MINUTE
    +MINUTES
    +MIRACLE
    +MIRACULOUS
    +MIRACULOUSLY
    +MIRAGE
    +MIRE
    +MIRROR
    +MIRTH
    +MISADVENTURE
    +MISAPPROPRIATE
    +MISAPPROPRIATION
    +MISBEHAVE
    +MISBEHAVIOR
    +MISCALCULATE
    +MISCALCULATION
    +MISCARRIAGE
    +MISCARRY
    +MISCELLANEOUS
    +MISCHIEF
    +MISCHIEVOUS
    +MISCHIEVOUSLY
    +MISCONCEPTION
    +MISCONDUCT
    +MISCONSTRUE
    +MISDEMEANOR
    +MISER
    +MISERABLE
    +MISERABLY
    +MISERY
    +MISFIT
    +MISFORTUNE
    +MISGIVING
    +MISGUIDED
    +MISHAP
    +MISINFORM
    +MISINTERPRET
    +MISINTERPRETATION
    +MISJUDGE
    +MISJUDGMENT
    +MISLEAD
    +MISLEADING
    +MISLED
    +MISMANAGE
    +MISMANAGEMENT
    +MISMATCH
    +MISNOMER
    +MISOGYNIST
    +MISOGYNY
    +MISPLACE
    +MISPLACED
    +MISPRINT
    +MISPRONOUNCE
    +MISPRONUNCIATION
    +MISQUOTE
    +MISREAD
    +MISREADING
    +MISREPRESENT
    +MISREPRESENTATION
    +MISS
    +MISS
    +MISSILE
    +MISSING
    +MISSION
    +MISSIONARY
    +MISSPELL
    +MISSPELLING
    +MISSPENT
    +MISSTEP
    +MIST
    +MISTAKE
    +MISTAKEN
    +MISTAKENLY
    +MISTER
    +MISTLETOE
    +MISTOOK
    +MISTREAT
    +MISTREATMENT
    +MISTRESS
    +MISTRIAL
    +MISTRUST
    +MISTY
    +MISUNDERSTAND
    +MISUNDERSTANDING
    +MISUNDERSTOOD
    +MISUSE
    +MITE
    +MITIGATE
    +MITIGATING
    +MITIGATION
    +MITT
    +MITTEN
    +MIXED
    +MIXER
    +MIXTURE
    +MOAN
    +MOAT
    +MOBILE
    +MOBILITY
    +MOBILIZATION
    +MOBILIZE
    +MOCCASIN
    +MOCK
    +MOCKERY
    +MOCKINGBIRD
    +MODAL
    +MODE
    +MODEL
    +MODELING
    +MODEM
    +MODERATE
    +MODERATELY
    +MODERATION
    +MODERATOR
    +MODERN
    +MODERNITY
    +MODERNIZATION
    +MODERNIZE
    +MODEST
    +MODESTLY
    +MODESTY
    +MODICUM
    +MODIFICATION
    +MODIFIER
    +MODIFY
    +MODULAR
    +MODULATE
    +MODULATION
    +MODULE
    +MOHAIR
    +MOIST
    +MOISTEN
    +MOISTURE
    +MOISTURIZER
    +MOLAR
    +MOLASSES
    +MOLD
    +MOLDING
    +MOLDY
    +MOLE
    +MOLECULAR
    +MOLECULE
    +MOLEST
    +MOLESTATION
    +MOLESTER
    +MOLLIFY
    +MOLLUSK
    +MOLT
    +MOLTEN
    +MOMENT
    +MOMENTARILY
    +MOMENTARY
    +MOMENTOUS
    +MOMENTUM
    +MOMMA
    +MOMMY
    +MONARCH
    +MONARCHY
    +MONASTERY
    +MONASTIC
    +MONDAY
    +MONETARY
    +MONEY
    +MONGREL
    +MONIKER
    +MONITOR
    +MONK
    +MONKEY
    +MONO
    +MONOCHROME
    +MONOGAMOUS
    +MONOGAMY
    +MONOGRAM
    +MONOGRAMMED
    +MONOLINGUAL
    +MONOLITH
    +MONOLITHIC
    +MONOLOGUE
    +MONONUCLEOSIS
    +MONOPOLIZATION
    +MONOPOLIZE
    +MONOPOLY
    +MONORAIL
    +MONOSYLLABLE
    +MONOTONE
    +MONOTONOUS
    +MONOTONOUSLY
    +MONOTONY
    +MONSOON
    +MONSTER
    +MONSTROSITY
    +MONSTROUS
    +MONTAGE
    +MONTH
    +MONTHLY
    +MONUMENT
    +MONUMENTAL
    +MOOCH
    +MOOD
    +MOODILY
    +MOODINESS
    +MOODY
    +MOON
    +MOONBEAM
    +MOONLIGHT
    +MOONLIGHTING
    +MOONLIT
    +MOOR
    +MOORING
    +MOOSE
    +MOOT
    +MOPE
    +MOPED
    +MORAL
    +MORALE
    +MORALIST
    +MORALISTIC
    +MORALITY
    +MORALLY
    +MORALS
    +MORASS
    +MORATORIUM
    +MORBID
    +MORE
    +MOREOVER
    +MORES
    +MORGUE
    +MORMON
    +MORNING
    +MORON
    +MORONIC
    +MOROSE
    +MORPHINE
    +MORSEL
    +MORTAL
    +MORTALITY
    +MORTALLY
    +MORTAR
    +MORTARBOARD
    +MORTGAGE
    +MORTICIAN
    +MORTIFICATION
    +MORTIFY
    +MORTIFYING
    +MORTUARY
    +MOSAIC
    +MOSQUE
    +MOSQUITO
    +MOSS
    +MOSSY
    +MOST
    +MOSTLY
    +MOTEL
    +MOTH
    +MOTHBALL
    +MOTHER
    +MOTHERBOARD
    +MOTHERFUCKER
    +MOTHERHOOD
    +MOTHERLY
    +MOTIF
    +MOTION
    +MOTIONLESS
    +MOTIVATE
    +MOTIVATED
    +MOTIVATION
    +MOTIVE
    +MOTLEY
    +MOTOR
    +MOTORBIKE
    +MOTORBOAT
    +MOTORCADE
    +MOTORCYCLE
    +MOTORCYCLIST
    +MOTORIST
    +MOTORIZED
    +MOTORMOUTH
    +MOTTLED
    +MOTTO
    +MOUND
    +MOUNT
    +MOUNT
    +MOUNTAIN
    +MOUNTAINEER
    +MOUNTAINEERING
    +MOUNTAINOUS
    +MOUNTAINSIDE
    +MOUNTED
    +MOUNTING
    +MOURN
    +MOURNER
    +MOURNFUL
    +MOURNFULLY
    +MOURNING
    +MOUSE
    +MOUSSE
    +MOUSY
    +MOUTH
    +MOUTHFUL
    +MOUTHPIECE
    +MOUTHWASH
    +MOVABLE
    +MOVE
    +MOVEMENT
    +MOVEMENTS
    +MOVER
    +MOVIE
    +MOVIES
    +MOVING
    +MOWER
    +MOWN
    +MUCH
    +MUCK
    +MUCOUS
    +MUCUS
    +MUDDLE
    +MUDDLED
    +MUDDY
    +MUDSLIDE
    +MUDSLINGING
    +MUFF
    +MUFFIN
    +MUFFLE
    +MUFFLED
    +MUFFLER
    +MUGGER
    +MUGGING
    +MUGGY
    +MUHAMMAD
    +MULATTO
    +MULCH
    +MULE
    +MULL
    +MULTICULTURAL
    +MULTILATERAL
    +MULTIMEDIA
    +MULTIMILLIONAIRE
    +MULTIPLE
    +MULTIPLEX
    +MULTIPLICATION
    +MULTIPLICITY
    +MULTIPLY
    +MULTITUDE
    +MUMBLE
    +MUMMIFY
    +MUMMY
    +MUMPS
    +MUNCH
    +MUNCHIES
    +MUNDANE
    +MUNICIPAL
    +MUNICIPALITY
    +MUNITIONS
    +MURAL
    +MURDER
    +MURDERER
    +MURDEROUS
    +MURKY
    +MURMUR
    +MUSCLE
    +MUSCULAR
    +MUSE
    +MUSEUM
    +MUSH
    +MUSHROOM
    +MUSHY
    +MUSIC
    +MUSICAL
    +MUSICIAN
    +MUSING
    +MUSK
    +MUSKET
    +MUSLIM
    +MUSS
    +MUSSEL
    +MUST
    +MUSTACHE
    +MUSTANG
    +MUSTARD
    +MUSTER
    +MUSTY
    +MUTABILITY
    +MUTABLE
    +MUTANT
    +MUTATE
    +MUTATION
    +MUTE
    +MUTED
    +MUTELY
    +MUTILATE
    +MUTILATION
    +MUTINOUS
    +MUTINY
    +MUTT
    +MUTTER
    +MUTTON
    +MUTUAL
    +MUTUALLY
    +MUZAK
    +MUZZLE
    +MYOPIC
    +MYRIAD
    +MYSELF
    +MYSTERIOUS
    +MYSTERIOUSLY
    +MYSTERY
    +MYSTIC
    +MYSTICAL
    +MYSTICISM
    +MYSTIFY
    +MYSTIFYING
    +MYSTIQUE
    +MYTH
    +MYTHICAL
    +MYTHOLOGICAL
    +MYTHOLOGY
    +NAGGING
    +NAIL
    +NAILBRUSH
    +NAIVE
    +NAIVELY
    +NAIVETE
    +NAKED
    +NAME
    +NAMELESS
    +NAMELY
    +NAMESAKE
    +NANNY
    +NAPALM
    +NAPE
    +NAPKIN
    +NAPPY
    +NARC
    +NARCISSISM
    +NARCISSIST
    +NARCISSISTIC
    +NARCOTIC
    +NARRATE
    +NARRATION
    +NARRATIVE
    +NARRATOR
    +NARROW
    +NARROWLY
    +NARROWNESS
    +NASA
    +NASAL
    +NASALLY
    +NASTILY
    +NASTINESS
    +NASTY
    +NATION
    +NATIONAL
    +NATIONALISM
    +NATIONALIST
    +NATIONALISTIC
    +NATIONALITY
    +NATIONALIZATION
    +NATIONALIZE
    +NATIONALLY
    +NATIONWIDE
    +NATIVE
    +NATO
    +NATURAL
    +NATURALIST
    +NATURALIZATION
    +NATURALIZE
    +NATURALLY
    +NATURALNESS
    +NATURE
    +NAUGHT
    +NAUGHTILY
    +NAUGHTINESS
    +NAUGHTY
    +NAUSEA
    +NAUSEATE
    +NAUSEATED
    +NAUSEATING
    +NAUSEOUS
    +NAUTICAL
    +NAVAL
    +NAVEL
    +NAVIGABLE
    +NAVIGATE
    +NAVIGATION
    +NAVIGATIONAL
    +NAVIGATOR
    +NAVY
    +NEAR
    +NEARBY
    +NEARLY
    +NEARSIGHTED
    +NEAT
    +NEATLY
    +NEATNESS
    +NECESSARILY
    +NECESSARY
    +NECESSITATE
    +NECESSITY
    +NECK
    +NECKLACE
    +NECKLINE
    +NECKTIE
    +NECTAR
    +NECTARINE
    +NEED
    +NEEDLE
    +NEEDLESS
    +NEEDLESSLY
    +NEEDLEWORK
    +NEEDS
    +NEEDY
    +NEGATE
    +NEGATION
    +NEGATIVE
    +NEGATIVELY
    +NEGLECT
    +NEGLECTED
    +NEGLECTFUL
    +NEGLIGEE
    +NEGLIGENCE
    +NEGLIGENT
    +NEGLIGENTLY
    +NEGLIGIBLE
    +NEGOTIABLE
    +NEGOTIATE
    +NEGOTIATION
    +NEGOTIATOR
    +NEGRO
    +NEIGH
    +NEIGHBOR
    +NEIGHBORHOOD
    +NEIGHBORING
    +NEIGHBORLY
    +NEITHER
    +NEON
    +NEPHEW
    +NEPOTISM
    +NEPTUNE
    +NERD
    +NERDY
    +NERVE
    +NERVES
    +NERVOUS
    +NERVOUSLY
    +NERVOUSNESS
    +NEST
    +NESTLE
    +NETTING
    +NETTLE
    +NETWORK
    +NEUROLOGICAL
    +NEUROLOGIST
    +NEUROLOGY
    +NEUROSES
    +NEUROSIS
    +NEUROTIC
    +NEUTER
    +NEUTRAL
    +NEUTRALITY
    +NEUTRALIZATION
    +NEUTRALIZE
    +NEUTRON
    +NEVER
    +NEVERTHELESS
    +NEWBORN
    +NEWCOMER
    +NEWFANGLED
    +NEWLY
    +NEWLYWED
    +NEWLYWEDS
    +NEWNESS
    +NEWS
    +NEWSCAST
    +NEWSCASTER
    +NEWSLETTER
    +NEWSPAPER
    +NEWSPRINT
    +NEWSSTAND
    +NEWSWORTHY
    +NEWSY
    +NEWT
    +NEXT
    +NIBBLE
    +NICE
    +NICELY
    +NICHE
    +NICK
    +NICKEL
    +NICKNAME
    +NICOTINE
    +NIECE
    +NIFTY
    +NIGGER
    +NIGGLING
    +NIGHT
    +NIGHTCLUB
    +NIGHTFALL
    +NIGHTGOWN
    +NIGHTIE
    +NIGHTINGALE
    +NIGHTLIFE
    +NIGHTLY
    +NIGHTMARE
    +NIGHTMARISH
    +NIGHTS
    +NIGHTTIME
    +NIMBLE
    +NIMBLY
    +NINCOMPOOP
    +NINE
    +NINETEEN
    +NINETEENTH
    +NINETIETH
    +NINETY
    +NINTH
    +NIPPLE
    +NIPPY
    +NITRATE
    +NITROGEN
    +NITWIT
    +NOBILITY
    +NOBLE
    +NOBLEMAN
    +NOBLEWOMAN
    +NOBLY
    +NOBODY
    +NOCTURNAL
    +NODE
    +NOISE
    +NOISELESS
    +NOISELESSLY
    +NOISILY
    +NOISY
    +NOMAD
    +NOMADIC
    +NOMENCLATURE
    +NOMINAL
    +NOMINALLY
    +NOMINATE
    +NOMINATION
    +NOMINEE
    +NONCHALANCE
    +NONCHALANT
    +NONCHALANTLY
    +NONCOMMITTAL
    +NONCOMMITTALLY
    +NONCONFORMIST
    +NONDAIRY
    +NONDENOMINATIONAL
    +NONDESCRIPT
    +NONE
    +NONENTITY
    +NONETHELESS
    +NONEVENT
    +NONEXISTENT
    +NONFAT
    +NONFICTION
    +NONFLAMMABLE
    +NONINTERVENTION
    +NONPLUSSED
    +NONPROFIT
    +NONPROLIFERATION
    +NONREFUNDABLE
    +NONRENEWABLE
    +NONSENSE
    +NONSENSICAL
    +NONSMOKER
    +NONSMOKING
    +NONSTANDARD
    +NONSTICK
    +NONSTOP
    +NONVERBAL
    +NONVIOLENCE
    +NONVIOLENT
    +NOODLE
    +NOOK
    +NOON
    +NOOSE
    +NOPE
    +NORM
    +NORMAL
    +NORMALCY
    +NORMALITY
    +NORMALIZATION
    +NORMALIZE
    +NORMALLY
    +NORTH
    +NORTHBOUND
    +NORTHEAST
    +NORTHEASTERLY
    +NORTHEASTERN
    +NORTHEASTWARD
    +NORTHERLY
    +NORTHERN
    +NORTHERNER
    +NORTHERNMOST
    +NORTHWARD
    +NORTHWEST
    +NORTHWESTERLY
    +NORTHWESTERN
    +NORTHWESTWARD
    +NOSE
    +NOSEBLEED
    +NOSEDIVE
    +NOSTALGIA
    +NOSTALGIC
    +NOSTALGICALLY
    +NOSTRIL
    +NOSY
    +NOTABLE
    +NOTABLY
    +NOTATION
    +NOTCH
    +NOTE
    +NOTEBOOK
    +NOTED
    +NOTES
    +NOTEWORTHY
    +NOTHING
    +NOTICE
    +NOTICEABLE
    +NOTICEABLY
    +NOTIFICATION
    +NOTIFY
    +NOTION
    +NOTORIETY
    +NOTORIOUS
    +NOTORIOUSLY
    +NOTWITHSTANDING
    +NOUN
    +NOURISH
    +NOURISHING
    +NOURISHMENT
    +NOVEL
    +NOVELIST
    +NOVELTY
    +NOVEMBER
    +NOVICE
    +NOWADAYS
    +NOWHERE
    +NOXIOUS
    +NOZZLE
    +NUANCE
    +NUCLEAR
    +NUCLEI
    +NUCLEUS
    +NUDE
    +NUDGE
    +NUDIST
    +NUDITY
    +NUGGET
    +NUISANCE
    +NUKE
    +NULLIFY
    +NUMB
    +NUMBER
    +NUMBNESS
    +NUMERAL
    +NUMERICAL
    +NUMERICALLY
    +NUMEROUS
    +NUPTIAL
    +NUPTIALS
    +NURSE
    +NURSERY
    +NURSING
    +NURTURE
    +NUTCRACKER
    +NUTMEG
    +NUTRIENT
    +NUTRITION
    +NUTRITIONAL
    +NUTRITIOUS
    +NUTS
    +NUTSHELL
    +NUTTY
    +NUZZLE
    +NYLON
    +NYLONS
    +NYMPH
    +NYMPHOMANIA
    +NYMPHOMANIAC
    +OASES
    +OASIS
    +OATH
    +OATMEAL
    +OATS
    +OBEDIENCE
    +OBEDIENT
    +OBEDIENTLY
    +OBESE
    +OBESITY
    +OBEY
    +OBITUARY
    +OBJECT
    +OBJECTION
    +OBJECTIONABLE
    +OBJECTIVE
    +OBJECTIVELY
    +OBJECTIVITY
    +OBJECTOR
    +OBLIGATE
    +OBLIGATED
    +OBLIGATION
    +OBLIGATORY
    +OBLIGE
    +OBLIGED
    +OBLIGING
    +OBLIGINGLY
    +OBLIQUE
    +OBLITERATE
    +OBLITERATION
    +OBLIVION
    +OBLIVIOUS
    +OBLONG
    +OBNOXIOUS
    +OBNOXIOUSLY
    +OBOE
    +OBSCENE
    +OBSCENITY
    +OBSCURE
    +OBSCURITY
    +OBSERVABLE
    +OBSERVANCE
    +OBSERVANT
    +OBSERVATION
    +OBSERVATORY
    +OBSERVE
    +OBSERVER
    +OBSESS
    +OBSESSED
    +OBSESSION
    +OBSESSIVE
    +OBSESSIVELY
    +OBSOLESCENCE
    +OBSOLETE
    +OBSTACLE
    +OBSTETRICIAN
    +OBSTETRICS
    +OBSTINACY
    +OBSTINATE
    +OBSTINATELY
    +OBSTRUCT
    +OBSTRUCTION
    +OBSTRUCTIVE
    +OBTAIN
    +OBTAINABLE
    +OBTRUSIVE
    +OBTUSE
    +OBVIOUS
    +OBVIOUSLY
    +OCCASION
    +OCCASIONAL
    +OCCASIONALLY
    +OCCULT
    +OCCUPANCY
    +OCCUPANT
    +OCCUPATION
    +OCCUPATIONAL
    +OCCUPIED
    +OCCUPY
    +OCCUR
    +OCCURRENCE
    +OCEAN
    +OCEANIC
    +OCEANOGRAPHY
    +OCTAGON
    +OCTAGONAL
    +OCTAVE
    +OCTOBER
    +OCTOPI
    +OCTOPUS
    +ODDITY
    +ODDLY
    +ODDNESS
    +ODDS
    +ODIOUS
    +ODOMETER
    +ODOR
    +ODYSSEY
    +OFFBEAT
    +OFFEND
    +OFFENDER
    +OFFENSE
    +OFFENSIVE
    +OFFENSIVELY
    +OFFER
    +OFFERING
    +OFFHAND
    +OFFICE
    +OFFICER
    +OFFICIAL
    +OFFICIALLY
    +OFFICIATE
    +OFFICIOUS
    +OFFING
    +OFFSET
    +OFFSHOOT
    +OFFSHORE
    +OFFSPRING
    +OFFSTAGE
    +OFTEN
    +OGLE
    +OGRE
    +OILED
    +OILFIELD
    +OILS
    +OILY
    +OINK
    +OINTMENT
    +OKAY
    +OKRA
    +OLDEN
    +OLDIE
    +OLIVE
    +OLYMPIC
    +OLYMPICS
    +OMBUDSMAN
    +OMELET
    +OMEN
    +OMINOUS
    +OMINOUSLY
    +OMISSION
    +OMIT
    +OMNIPOTENCE
    +OMNISCIENCE
    +OMNISCIENT
    +ONCE
    +ONCOMING
    +ONEROUS
    +ONESELF
    +ONETIME
    +ONGOING
    +ONION
    +ONLOOKER
    +ONLY
    +ONRUSH
    +ONSET
    +ONSLAUGHT
    +ONTO
    +ONUS
    +ONWARD
    +ONWARDS
    +OODLES
    +OOPS
    +OOZE
    +OPAL
    +OPAQUE
    +OPEN
    +OPENER
    +OPENING
    +OPENLY
    +OPENNESS
    +OPERA
    +OPERABLE
    +OPERATE
    +OPERATIC
    +OPERATION
    +OPERATIONAL
    +OPERATIONALLY
    +OPERATIVE
    +OPERATOR
    +OPHTHALMOLOGIST
    +OPHTHALMOLOGY
    +OPINION
    +OPINIONATED
    +OPIUM
    +OPOSSUM
    +OPPONENT
    +OPPORTUNE
    +OPPORTUNISM
    +OPPORTUNIST
    +OPPORTUNISTIC
    +OPPORTUNITY
    +OPPOSE
    +OPPOSED
    +OPPOSITE
    +OPPOSITION
    +OPPRESS
    +OPPRESSED
    +OPPRESSION
    +OPPRESSIVE
    +OPPRESSOR
    +OPTIC
    +OPTICAL
    +OPTICIAN
    +OPTIMISM
    +OPTIMIST
    +OPTIMISTIC
    +OPTIMISTICALLY
    +OPTIMUM
    +OPTION
    +OPTIONAL
    +OPTOMETRIST
    +OPTOMETRY
    +OPULENCE
    +OPULENT
    +ORAL
    +ORALLY
    +ORANGE
    +ORANGUTAN
    +ORATION
    +ORATOR
    +ORATORY
    +ORBIT
    +ORBITAL
    +ORCHARD
    +ORCHESTRA
    +ORCHESTRAL
    +ORCHESTRATE
    +ORCHESTRATION
    +ORCHID
    +ORDAIN
    +ORDEAL
    +ORDER
    +ORDERLY
    +ORDINAL
    +ORDINANCE
    +ORDINARILY
    +ORDINARY
    +ORDINATION
    +ORGAN
    +ORGANIC
    +ORGANICALLY
    +ORGANISM
    +ORGANIST
    +ORGANIZATION
    +ORGANIZATIONAL
    +ORGANIZE
    +ORGANIZED
    +ORGANIZER
    +ORGASM
    +ORGY
    +ORIENT
    +ORIENT
    +ORIENTAL
    +ORIENTAL
    +ORIENTATION
    +ORIENTED
    +ORIGIN
    +ORIGINAL
    +ORIGINALITY
    +ORIGINALLY
    +ORIGINATE
    +ORIOLE
    +ORNAMENT
    +ORNAMENTAL
    +ORNATE
    +ORNATELY
    +ORNITHOLOGIST
    +ORNITHOLOGY
    +ORPHAN
    +ORPHANAGE
    +ORTHODONTICS
    +ORTHODONTIST
    +ORTHODOX
    +ORTHODOXY
    +ORTHOPEDICS
    +OSCAR
    +OSTENTATION
    +OSTENTATIOUS
    +OSTENTATIOUSLY
    +OSTRACISM
    +OSTRACIZE
    +OSTRICH
    +OTHER
    +OTHERWISE
    +OTTER
    +OUCH
    +OUNCE
    +OURS
    +OURSELVES
    +OUST
    +OUSTER
    +OUTAGE
    +OUTBACK
    +OUTBID
    +OUTBREAK
    +OUTBURST
    +OUTCAST
    +OUTCLASS
    +OUTCOME
    +OUTCROPPING
    +OUTCRY
    +OUTDATED
    +OUTDID
    +OUTDISTANCE
    +OUTDO
    +OUTDONE
    +OUTDOOR
    +OUTDOORS
    +OUTER
    +OUTERMOST
    +OUTFIELD
    +OUTFIELDER
    +OUTFIT
    +OUTGOING
    +OUTGREW
    +OUTGROW
    +OUTGROWN
    +OUTGROWTH
    +OUTHOUSE
    +OUTING
    +OUTLANDISH
    +OUTLAST
    +OUTLAW
    +OUTLAY
    +OUTLET
    +OUTLINE
    +OUTLIVE
    +OUTLOOK
    +OUTLYING
    +OUTMANEUVER
    +OUTMODED
    +OUTNUMBER
    +OUTPATIENT
    +OUTPERFORM
    +OUTPLACEMENT
    +OUTPOST
    +OUTPOURING
    +OUTPUT
    +OUTRAGE
    +OUTRAGED
    +OUTRAGEOUS
    +OUTRAGEOUSLY
    +OUTRAN
    +OUTREACH
    +OUTRIGHT
    +OUTRUN
    +OUTSET
    +OUTSHINE
    +OUTSHONE
    +OUTSIDE
    +OUTSIDER
    +OUTSKIRTS
    +OUTSMART
    +OUTSOURCING
    +OUTSPOKEN
    +OUTSPOKENNESS
    +OUTSTANDING
    +OUTSTANDINGLY
    +OUTSTRETCHED
    +OUTSTRIP
    +OUTWARD
    +OUTWARDLY
    +OUTWARDS
    +OUTWEIGH
    +OUTWIT
    +OVAL
    +OVARIAN
    +OVARY
    +OVATION
    +OVEN
    +OVER
    +OVERALL
    +OVERALLS
    +OVERATE
    +OVERBEARING
    +OVERBOARD
    +OVERCAME
    +OVERCAST
    +OVERCHARGE
    +OVERCOAT
    +OVERCOME
    +OVERCOMPENSATE
    +OVERCOMPENSATION
    +OVERCROWDED
    +OVERDID
    +OVERDO
    +OVERDONE
    +OVERDOSE
    +OVERDRAW
    +OVERDRAWN
    +OVERDREW
    +OVERDUE
    +OVEREAT
    +OVEREATEN
    +OVERESTIMATE
    +OVEREXTEND
    +OVEREXTENDED
    +OVERFLOW
    +OVERGROWN
    +OVERHAND
    +OVERHANG
    +OVERHAUL
    +OVERHEAD
    +OVERHEAR
    +OVERHEARD
    +OVERJOYED
    +OVERLAND
    +OVERLAP
    +OVERLOAD
    +OVERLOOK
    +OVERLY
    +OVERNIGHT
    +OVERPASS
    +OVERPOPULATED
    +OVERPOPULATION
    +OVERPOWER
    +OVERPOWERING
    +OVERPRICED
    +OVERRAN
    +OVERRATE
    +OVERRATED
    +OVERREACT
    +OVERRIDDEN
    +OVERRIDE
    +OVERRIDING
    +OVERRODE
    +OVERRULE
    +OVERRUN
    +OVERSAW
    +OVERSEAS
    +OVERSEE
    +OVERSEEN
    +OVERSEER
    +OVERSHADOW
    +OVERSHOOT
    +OVERSHOT
    +OVERSIGHT
    +OVERSIMPLIFICATION
    +OVERSIMPLIFY
    +OVERSIZED
    +OVERSLEEP
    +OVERSLEPT
    +OVERSTATE
    +OVERSTEP
    +OVERT
    +OVERTAKE
    +OVERTAKEN
    +OVERTHREW
    +OVERTHROW
    +OVERTHROWN
    +OVERTIME
    +OVERTLY
    +OVERTONE
    +OVERTOOK
    +OVERTURE
    +OVERTURN
    +OVERVIEW
    +OVERWEIGHT
    +OVERWHELM
    +OVERWHELMED
    +OVERWHELMING
    +OVERWHELMINGLY
    +OVERWORK
    +OVERWORKED
    +OVERWROUGHT
    +OWNER
    +OWNERSHIP
    +OXEN
    +OXIDE
    +OXIDIZE
    +OXYGEN
    +OYSTER
    +OZONE
    +PACE
    +PACEMAKER
    +PACESETTER
    +PACIFIC
    +PACIFIER
    +PACIFISM
    +PACIFIST
    +PACIFY
    +PACK
    +PACKAGE
    +PACKAGING
    +PACKED
    +PACKER
    +PACKET
    +PACKING
    +PACT
    +PADDING
    +PADDLE
    +PADDOCK
    +PADDY
    +PADLOCK
    +PADRE
    +PAGAN
    +PAGE
    +PAGEANT
    +PAGEANTRY
    +PAGER
    +PAGODA
    +PAID
    +PAIL
    +PAIN
    +PAINED
    +PAINFUL
    +PAINFULLY
    +PAINKILLER
    +PAINLESS
    +PAINLESSLY
    +PAINSTAKING
    +PAINSTAKINGLY
    +PAINT
    +PAINTBRUSH
    +PAINTER
    +PAINTING
    +PAINTS
    +PAIR
    +PAJAMAS
    +PALACE
    +PALATABLE
    +PALATE
    +PALATIAL
    +PALE
    +PALEONTOLOGIST
    +PALEONTOLOGY
    +PALETTE
    +PALL
    +PALLBEARER
    +PALLID
    +PALLOR
    +PALM
    +PALPABLE
    +PALPABLY
    +PALTRY
    +PAMPER
    +PAMPHLET
    +PANACEA
    +PANACHE
    +PANCAKE
    +PANCREAS
    +PANCREATIC
    +PANDA
    +PANDEMONIUM
    +PANDER
    +PANE
    +PANEL
    +PANELING
    +PANELIST
    +PANG
    +PANHANDLE
    +PANHANDLER
    +PANIC
    +PANICKY
    +PANORAMA
    +PANORAMIC
    +PANSY
    +PANT
    +PANTHEISM
    +PANTHER
    +PANTIES
    +PANTOMIME
    +PANTRY
    +PANTS
    +PANTYHOSE
    +PAPA
    +PAPACY
    +PAPAL
    +PAPAYA
    +PAPER
    +PAPERBACK
    +PAPERBOY
    +PAPERGIRL
    +PAPERS
    +PAPERWEIGHT
    +PAPERWORK
    +PAPRIKA
    +PARABLE
    +PARACHUTE
    +PARADE
    +PARADIGM
    +PARADISE
    +PARADOX
    +PARADOXICAL
    +PARADOXICALLY
    +PARAFFIN
    +PARAGON
    +PARAGRAPH
    +PARAKEET
    +PARALEGAL
    +PARALLEL
    +PARALYSIS
    +PARALYTIC
    +PARALYZE
    +PARALYZED
    +PARAMEDIC
    +PARAMETER
    +PARAMILITARY
    +PARAMOUNT
    +PARANOIA
    +PARANOID
    +PARAPHERNALIA
    +PARAPHRASE
    +PARAPLEGIC
    +PARASITE
    +PARASITIC
    +PARASOL
    +PARATROOPER
    +PARCEL
    +PARCHED
    +PARCHMENT
    +PARDON
    +PARDONABLE
    +PARE
    +PARENT
    +PARENTAGE
    +PARENTAL
    +PARENTHESES
    +PARENTHESIS
    +PARENTHOOD
    +PARISH
    +PARISHIONER
    +PARITY
    +PARK
    +PARKA
    +PARKING
    +PARKWAY
    +PARLIAMENT
    +PARLIAMENTARY
    +PARLOR
    +PAROCHIAL
    +PARODY
    +PAROLE
    +PARQUET
    +PARROT
    +PARSLEY
    +PARSNIP
    +PART
    +PARTIAL
    +PARTIALITY
    +PARTIALLY
    +PARTICIPANT
    +PARTICIPATE
    +PARTICIPATION
    +PARTICIPLE
    +PARTICLE
    +PARTICULAR
    +PARTICULARLY
    +PARTICULARS
    +PARTING
    +PARTISAN
    +PARTITION
    +PARTLY
    +PARTNER
    +PARTNERSHIP
    +PARTRIDGE
    +PARTWAY
    +PARTY
    +PASS
    +PASSABLE
    +PASSAGE
    +PASSAGEWAY
    +PASSBOOK
    +PASSE
    +PASSENGER
    +PASSERBY
    +PASSERSBY
    +PASSING
    +PASSION
    +PASSIONATE
    +PASSIONATELY
    +PASSIVE
    +PASSIVELY
    +PASSOVER
    +PASSPORT
    +PASSWORD
    +PAST
    +PASTA
    +PASTE
    +PASTEL
    +PASTEURIZATION
    +PASTEURIZE
    +PASTEURIZED
    +PASTIME
    +PASTOR
    +PASTORAL
    +PASTRY
    +PASTURE
    +PASTY
    +PATCH
    +PATCHWORK
    +PATCHY
    +PATE
    +PATENT
    +PATENTLY
    +PATERNAL
    +PATERNALISM
    +PATERNALISTIC
    +PATERNITY
    +PATH
    +PATHETIC
    +PATHETICALLY
    +PATHOLOGICAL
    +PATHOLOGICALLY
    +PATHOLOGIST
    +PATHOLOGY
    +PATHOS
    +PATHWAY
    +PATIENCE
    +PATIENT
    +PATIENTLY
    +PATIO
    +PATRIARCH
    +PATRIARCHAL
    +PATRIARCHY
    +PATRICIDE
    +PATRIMONY
    +PATRIOT
    +PATRIOTIC
    +PATRIOTICALLY
    +PATRIOTISM
    +PATROL
    +PATROLMAN
    +PATROLWOMAN
    +PATRON
    +PATRONAGE
    +PATRONIZE
    +PATRONIZING
    +PATRONIZINGLY
    +PATTER
    +PATTERN
    +PATTERNED
    +PATTY
    +PAUCITY
    +PAUNCH
    +PAUNCHY
    +PAUSE
    +PAVE
    +PAVEMENT
    +PAVILION
    +PAWN
    +PAWNBROKER
    +PAYABLE
    +PAYCHECK
    +PAYDAY
    +PAYEE
    +PAYLOAD
    +PAYMENT
    +PAYOFF
    +PAYROLL
    +PEACE
    +PEACEABLE
    +PEACEABLY
    +PEACEFUL
    +PEACEFULLY
    +PEACEFULNESS
    +PEACEKEEPING
    +PEACEMAKER
    +PEACETIME
    +PEACH
    +PEACOCK
    +PEAK
    +PEAKED
    +PEAL
    +PEANUT
    +PEANUTS
    +PEAR
    +PEARL
    +PEASANT
    +PEAT
    +PEBBLE
    +PECAN
    +PECK
    +PECULIAR
    +PECULIARITY
    +PECULIARLY
    +PEDAGOGICAL
    +PEDAGOGY
    +PEDAL
    +PEDANTIC
    +PEDANTICALLY
    +PEDANTRY
    +PEDDLE
    +PEDDLER
    +PEDESTAL
    +PEDESTRIAN
    +PEDIATRICIAN
    +PEDIATRICS
    +PEDIGREE
    +PEDIGREED
    +PEEK
    +PEEKABOO
    +PEEL
    +PEEP
    +PEEPHOLE
    +PEER
    +PEERLESS
    +PEEVE
    +PEJORATIVE
    +PELICAN
    +PELLET
    +PELT
    +PELVIC
    +PELVIS
    +PENAL
    +PENALIZE
    +PENALTY
    +PENANCE
    +PENCHANT
    +PENCIL
    +PENDANT
    +PENDING
    +PENDULUM
    +PENETRATE
    +PENETRATING
    +PENETRATION
    +PENGUIN
    +PENICILLIN
    +PENINSULA
    +PENIS
    +PENITENCE
    +PENITENT
    +PENITENTIARY
    +PENKNIFE
    +PENKNIVES
    +PENNANT
    +PENNILESS
    +PENNY
    +PENSION
    +PENSIVE
    +PENTAGON
    +PENTAGON
    +PENTHOUSE
    +PEON
    +PEOPLE
    +PEPPER
    +PEPPERMINT
    +PEPPERONI
    +PEPPY
    +PERCEIVE
    +PERCENT
    +PERCENTAGE
    +PERCENTILE
    +PERCEPTIBLE
    +PERCEPTIBLY
    +PERCEPTION
    +PERCEPTIVE
    +PERCEPTIVELY
    +PERCH
    +PERCOLATE
    +PERCOLATOR
    +PERCUSSION
    +PEREMPTORY
    +PERENNIAL
    +PERFECT
    +PERFECTION
    +PERFECTIONIST
    +PERFECTLY
    +PERFORATE
    +PERFORM
    +PERFORMANCE
    +PERFORMER
    +PERFUME
    +PERFUNCTORILY
    +PERFUNCTORY
    +PERHAPS
    +PERIL
    +PERILOUS
    +PERIMETER
    +PERIOD
    +PERIODIC
    +PERIODICAL
    +PERIODICALLY
    +PERIPHERAL
    +PERIPHERY
    +PERISCOPE
    +PERISH
    +PERISHABLE
    +PERISHABLES
    +PERJURE
    +PERJURY
    +PERK
    +PERKY
    +PERM
    +PERMANENCE
    +PERMANENT
    +PERMANENTLY
    +PERMEATE
    +PERMISSIBLE
    +PERMISSION
    +PERMISSIVE
    +PERMIT
    +PERMUTATION
    +PERNICIOUS
    +PEROXIDE
    +PERPENDICULAR
    +PERPETRATE
    +PERPETRATOR
    +PERPETUAL
    +PERPETUALLY
    +PERPETUATE
    +PERPLEX
    +PERPLEXED
    +PERPLEXING
    +PERQUISITE
    +PERSECUTE
    +PERSECUTION
    +PERSECUTOR
    +PERSEVERANCE
    +PERSEVERE
    +PERSIST
    +PERSISTENCE
    +PERSISTENT
    +PERSISTENTLY
    +PERSON
    +PERSONA
    +PERSONABLE
    +PERSONAE
    +PERSONAL
    +PERSONALITY
    +PERSONALIZE
    +PERSONALLY
    +PERSONALS
    +PERSONIFICATION
    +PERSONIFY
    +PERSONNEL
    +PERSPECTIVE
    +PERSPIRATION
    +PERSPIRE
    +PERSUADE
    +PERSUASION
    +PERSUASIVE
    +PERSUASIVELY
    +PERSUASIVENESS
    +PERT
    +PERTAIN
    +PERTINENT
    +PERTURB
    +PERUSAL
    +PERUSE
    +PERVADE
    +PERVASIVE
    +PERVERSE
    +PERVERSELY
    +PERVERSION
    +PERVERSITY
    +PERVERT
    +PERVERTED
    +PESKY
    +PESSIMISM
    +PESSIMIST
    +PESSIMISTIC
    +PESSIMISTICALLY
    +PEST
    +PESTER
    +PESTICIDE
    +PETAL
    +PETER
    +PETITE
    +PETITION
    +PETRIFIED
    +PETRIFY
    +PETROLEUM
    +PETTINESS
    +PETTY
    +PETULANT
    +PEWTER
    +PHALLIC
    +PHALLUS
    +PHANTOM
    +PHARAOH
    +PHARMACEUTICAL
    +PHARMACIST
    +PHARMACOLOGIST
    +PHARMACOLOGY
    +PHARMACY
    +PHASE
    +PHEASANT
    +PHENOMENA
    +PHENOMENAL
    +PHENOMENALLY
    +PHENOMENON
    +PHILANTHROPIC
    +PHILANTHROPIST
    +PHILANTHROPY
    +PHILISTINE
    +PHILOSOPHER
    +PHILOSOPHICAL
    +PHILOSOPHICALLY
    +PHILOSOPHIZE
    +PHILOSOPHY
    +PHLEGM
    +PHLEGMATIC
    +PHOBIA
    +PHOBIC
    +PHOENIX
    +PHONE
    +PHONETIC
    +PHONETICALLY
    +PHONETICS
    +PHONOGRAPH
    +PHONY
    +PHOOEY
    +PHOSPHATE
    +PHOSPHORESCENCE
    +PHOSPHORESCENT
    +PHOSPHORUS
    +PHOTO
    +PHOTOCOPIER
    +PHOTOCOPY
    +PHOTOGENIC
    +PHOTOGRAPH
    +PHOTOGRAPHER
    +PHOTOGRAPHIC
    +PHOTOGRAPHY
    +PHOTOSYNTHESIS
    +PHRASE
    +PHRASING
    +PHYSICAL
    +PHYSICALLY
    +PHYSICIAN
    +PHYSICIST
    +PHYSICS
    +PHYSIOLOGICAL
    +PHYSIOLOGY
    +PHYSIOTHERAPY
    +PHYSIQUE
    +PIANIST
    +PIANO
    +PICCOLO
    +PICK
    +PICKAX
    +PICKER
    +PICKET
    +PICKLE
    +PICKLED
    +PICKPOCKET
    +PICKUP
    +PICKY
    +PICNIC
    +PICTORIAL
    +PICTURE
    +PICTURESQUE
    +PIDDLING
    +PIDGIN
    +PIECE
    +PIECEMEAL
    +PIECEWORK
    +PIER
    +PIERCE
    +PIERCING
    +PIETY
    +PIGEON
    +PIGEONHOLE
    +PIGGY
    +PIGGYBACK
    +PIGHEADED
    +PIGLET
    +PIGMENT
    +PIGMENTATION
    +PIGPEN
    +PIGSTY
    +PIGTAIL
    +PIKE
    +PILE
    +PILEUP
    +PILFER
    +PILGRIM
    +PILGRIM
    +PILGRIMAGE
    +PILING
    +PILL
    +PILLAGE
    +PILLAR
    +PILLOW
    +PILLOWCASE
    +PILOT
    +PIMP
    +PIMPLE
    +PIMPLY
    +PINCERS
    +PINCH
    +PINCUSHION
    +PINE
    +PINEAPPLE
    +PING
    +PINION
    +PINK
    +PINKIE
    +PINNACLE
    +PINPOINT
    +PINPRICK
    +PINSTRIPE
    +PINT
    +PINUP
    +PIONEER
    +PIOUS
    +PIOUSLY
    +PIPE
    +PIPELINE
    +PIPING
    +PIPSQUEAK
    +PIQUANCY
    +PIQUANT
    +PIQUE
    +PIRACY
    +PIRANHA
    +PIRATE
    +PIROUETTE
    +PISCES
    +PISS
    +PISSED
    +PISTACHIO
    +PISTOL
    +PISTON
    +PITCH
    +PITCHER
    +PITCHFORK
    +PITEOUS
    +PITFALL
    +PITHY
    +PITIFUL
    +PITIFULLY
    +PITILESS
    +PITTANCE
    +PITY
    +PIVOT
    +PIVOTAL
    +PIXEL
    +PIXIE
    +PIZZA
    +PIZZAZZ
    +PLACARD
    +PLACE
    +PLACEBO
    +PLACENTA
    +PLACID
    +PLACIDLY
    +PLAGIARISM
    +PLAGIARIST
    +PLAGIARIZE
    +PLAGUE
    +PLAID
    +PLAIN
    +PLAINCLOTHES
    +PLAINLY
    +PLAINS
    +PLAINTIFF
    +PLAINTIVE
    +PLAN
    +PLANE
    +PLANET
    +PLANETARIA
    +PLANETARIUM
    +PLANETARY
    +PLANK
    +PLANKTON
    +PLANNER
    +PLANNING
    +PLANT
    +PLANTATION
    +PLANTER
    +PLANTING
    +PLAQUE
    +PLASMA
    +PLASTER
    +PLASTERED
    +PLASTIC
    +PLATE
    +PLATEAU
    +PLATED
    +PLATEFUL
    +PLATFORM
    +PLATING
    +PLATINUM
    +PLATITUDE
    +PLATONIC
    +PLATOON
    +PLATTER
    +PLAUSIBLE
    +PLAY
    +PLAYBOY
    +PLAYER
    +PLAYFUL
    +PLAYFULLY
    +PLAYFULNESS
    +PLAYGROUND
    +PLAYHOUSE
    +PLAYMATE
    +PLAYOFF
    +PLAYPEN
    +PLAYROOM
    +PLAYTHING
    +PLAYWRIGHT
    +PLAZA
    +PLEA
    +PLEAD
    +PLEASANT
    +PLEASANTLY
    +PLEASANTRY
    +PLEASE
    +PLEASED
    +PLEASING
    +PLEASURABLE
    +PLEASURE
    +PLEAT
    +PLEATED
    +PLED
    +PLEDGE
    +PLENARY
    +PLENTIFUL
    +PLENTIFULLY
    +PLENTY
    +PLETHORA
    +PLEXIGLAS
    +PLIABLE
    +PLIANT
    +PLIERS
    +PLIGHT
    +PLOD
    +PLODDING
    +PLOP
    +PLOT
    +PLOW
    +PLOY
    +PLUCK
    +PLUCKY
    +PLUG
    +PLUM
    +PLUMAGE
    +PLUMBER
    +PLUMBING
    +PLUME
    +PLUMMET
    +PLUMP
    +PLUNDER
    +PLUNGE
    +PLUNGER
    +PLUNK
    +PLURAL
    +PLURALITY
    +PLUS
    +PLUSH
    +PLUTO
    +PLUTOCRACY
    +PLUTONIUM
    +PLYWOOD
    +PNEUMATIC
    +PNEUMONIA
    +POACH
    +POACHER
    +POCKET
    +POCKETBOOK
    +POCKETFUL
    +POCKETKNIFE
    +POCKETKNIVES
    +POCKMARK
    +POCKMARKED
    +PODIATRIST
    +PODIATRY
    +PODIUM
    +POEM
    +POET
    +POETIC
    +POETICALLY
    +POETRY
    +POGROM
    +POIGNANCY
    +POIGNANT
    +POIGNANTLY
    +POINSETTIA
    +POINT
    +POINTED
    +POINTEDLY
    +POINTER
    +POINTLESS
    +POINTLESSLY
    +POINTLESSNESS
    +POINTY
    +POISE
    +POISED
    +POISON
    +POISONING
    +POISONOUS
    +POKE
    +POKER
    +POKY
    +POLAR
    +POLARITY
    +POLARIZATION
    +POLARIZE
    +POLAROID
    +POLE
    +POLE
    +POLEMIC
    +POLEMICAL
    +POLICE
    +POLICEMAN
    +POLICEWOMAN
    +POLICY
    +POLIO
    +POLISH
    +POLISH
    +POLISHED
    +POLITE
    +POLITELY
    +POLITENESS
    +POLITICAL
    +POLITICALLY
    +POLITICIAN
    +POLITICIZE
    +POLITICS
    +POLKA
    +POLL
    +POLLEN
    +POLLINATE
    +POLLINATION
    +POLLS
    +POLLSTER
    +POLLUTANT
    +POLLUTE
    +POLLUTED
    +POLLUTION
    +POLO
    +POLYESTER
    +POLYGAMIST
    +POLYGAMOUS
    +POLYGAMY
    +POLYGON
    +POLYGRAPH
    +POLYMER
    +POLYP
    +POLYTECHNIC
    +POMEGRANATE
    +POMP
    +POMPOM
    +POMPOSITY
    +POMPOUS
    +PONCHO
    +POND
    +PONDER
    +PONDEROUS
    +PONTIFF
    +PONTIFICAL
    +PONTOON
    +PONY
    +PONYTAIL
    +POOCH
    +POODLE
    +POOL
    +POOP
    +POOPED
    +POOR
    +POORLY
    +POPCORN
    +POPE
    +POPLAR
    +POPPY
    +POPSICLE
    +POPULACE
    +POPULAR
    +POPULARITY
    +POPULARIZE
    +POPULARLY
    +POPULATE
    +POPULATION
    +POPULOUS
    +PORCELAIN
    +PORCH
    +PORCUPINE
    +PORE
    +PORK
    +PORN
    +PORNOGRAPHER
    +PORNOGRAPHIC
    +PORNOGRAPHY
    +POROUS
    +PORPOISE
    +PORT
    +PORTABLE
    +PORTAL
    +PORTEND
    +PORTENT
    +PORTER
    +PORTFOLIO
    +PORTHOLE
    +PORTICO
    +PORTION
    +PORTLY
    +PORTRAIT
    +PORTRAY
    +PORTRAYAL
    +PORTUGUESE
    +POSE
    +POSH
    +POSITION
    +POSITIVE
    +POSITIVELY
    +POSSE
    +POSSESS
    +POSSESSED
    +POSSESSION
    +POSSESSIONS
    +POSSESSIVE
    +POSSIBILITY
    +POSSIBLE
    +POSSIBLY
    +POSSUM
    +POST
    +POSTAGE
    +POSTAL
    +POSTCARD
    +POSTDATE
    +POSTDOC
    +POSTDOCTORAL
    +POSTER
    +POSTERIOR
    +POSTERITY
    +POSTGRADUATE
    +POSTHUMOUS
    +POSTHUMOUSLY
    +POSTMAN
    +POSTMARK
    +POSTMASTER
    +POSTMORTEM
    +POSTPONE
    +POSTPONEMENT
    +POSTSCRIPT
    +POSTULATE
    +POSTURE
    +POSTWAR
    +POSY
    +POTASSIUM
    +POTATO
    +POTBELLIED
    +POTBELLY
    +POTENCY
    +POTENT
    +POTENTIAL
    +POTENTIALLY
    +POTHOLE
    +POTION
    +POTLUCK
    +POTPOURRI
    +POTTER
    +POTTERY
    +POTTY
    +POUCH
    +POULTRY
    +POUNCE
    +POUND
    +POUR
    +POUT
    +POVERTY
    +POWDER
    +POWDERED
    +POWDERY
    +POWER
    +POWERBOAT
    +POWERFUL
    +POWERFULLY
    +POWERHOUSE
    +POWERLESS
    +POWERLESSNESS
    +POWWOW
    +PRACTICABLE
    +PRACTICAL
    +PRACTICALITY
    +PRACTICALLY
    +PRACTICE
    +PRACTICING
    +PRACTITIONER
    +PRAGMATIC
    +PRAGMATISM
    +PRAGMATIST
    +PRAIRIE
    +PRAISE
    +PRAISEWORTHY
    +PRANCE
    +PRANK
    +PRANKSTER
    +PRAWN
    +PRAY
    +PRAYER
    +PREACH
    +PREACHER
    +PREAMBLE
    +PRECARIOUS
    +PRECARIOUSLY
    +PRECAUTION
    +PRECAUTIONARY
    +PRECEDE
    +PRECEDENCE
    +PRECEDENT
    +PRECEDING
    +PRECEPT
    +PRECINCT
    +PRECIOUS
    +PRECIPICE
    +PRECIPITATE
    +PRECIPITATION
    +PRECIPITOUS
    +PRECISE
    +PRECISELY
    +PRECISION
    +PRECLUDE
    +PRECOCIOUS
    +PRECONCEIVED
    +PRECONCEPTION
    +PRECONDITION
    +PRECURSOR
    +PREDATE
    +PREDATOR
    +PREDATORY
    +PREDECESSOR
    +PREDESTINATION
    +PREDESTINED
    +PREDETERMINED
    +PREDICAMENT
    +PREDICATE
    +PREDICT
    +PREDICTABLE
    +PREDICTABLY
    +PREDICTION
    +PREDILECTION
    +PREDISPOSED
    +PREDISPOSITION
    +PREDOMINANCE
    +PREDOMINANT
    +PREDOMINANTLY
    +PREDOMINATE
    +PREEMINENCE
    +PREEMINENT
    +PREEMPT
    +PREEMPTIVE
    +PREEN
    +PREEXISTING
    +PREFAB
    +PREFABRICATED
    +PREFACE
    +PREFER
    +PREFERABLE
    +PREFERABLY
    +PREFERENCE
    +PREFERENTIAL
    +PREFIX
    +PREGNANCY
    +PREGNANT
    +PREHISTORIC
    +PREHISTORY
    +PREJUDGE
    +PREJUDICE
    +PREJUDICED
    +PREJUDICIAL
    +PRELIMINARY
    +PRELUDE
    +PREMARITAL
    +PREMATURE
    +PREMATURELY
    +PREMEDITATED
    +PREMEDITATION
    +PREMIER
    +PREMIERE
    +PREMISE
    +PREMISES
    +PREMIUM
    +PREMONITION
    +PRENATAL
    +PREOCCUPATION
    +PREOCCUPIED
    +PREOCCUPY
    +PREP
    +PREPARATION
    +PREPARATORY
    +PREPARE
    +PREPARED
    +PREPAREDNESS
    +PREPONDERANCE
    +PREPOSITION
    +PREPOSTEROUS
    +PREPPY
    +PREREGISTER
    +PREREGISTRATION
    +PREREQUISITE
    +PREROGATIVE
    +PRESAGE
    +PRESBYTERIAN
    +PRESCHOOL
    +PRESCHOOLER
    +PRESCRIBE
    +PRESCRIPTION
    +PRESCRIPTIVE
    +PRESENCE
    +PRESENT
    +PRESENTABLE
    +PRESENTATION
    +PRESENTLY
    +PRESERVATION
    +PRESERVATIVE
    +PRESERVE
    +PRESERVES
    +PRESIDE
    +PRESIDENCY
    +PRESIDENT
    +PRESIDENT
    +PRESIDENTIAL
    +PRESS
    +PRESSED
    +PRESSING
    +PRESSURE
    +PRESSURIZED
    +PRESTIGE
    +PRESTIGIOUS
    +PRESUMABLY
    +PRESUME
    +PRESUMPTION
    +PRESUMPTUOUS
    +PRESUPPOSE
    +PRESUPPOSITION
    +PRETEND
    +PRETENSE
    +PRETENSION
    +PRETENTIOUS
    +PRETEXT
    +PRETTILY
    +PRETTY
    +PRETZEL
    +PREVAIL
    +PREVAILING
    +PREVALENCE
    +PREVALENT
    +PREVENT
    +PREVENTABLE
    +PREVENTION
    +PREVENTIVE
    +PREVIEW
    +PREVIOUS
    +PREVIOUSLY
    +PREWAR
    +PREY
    +PRICE
    +PRICELESS
    +PRICEY
    +PRICK
    +PRICKLE
    +PRICKLY
    +PRIDE
    +PRIEST
    +PRIESTESS
    +PRIESTHOOD
    +PRIM
    +PRIMACY
    +PRIMAL
    +PRIMARILY
    +PRIMARY
    +PRIMATE
    +PRIME
    +PRIMER
    +PRIMEVAL
    +PRIMITIVE
    +PRIMLY
    +PRIMORDIAL
    +PRIMP
    +PRIMROSE
    +PRINCE
    +PRINCELY
    +PRINCESS
    +PRINCIPAL
    +PRINCIPALITY
    +PRINCIPALLY
    +PRINCIPLE
    +PRINCIPLED
    +PRINCIPLES
    +PRINT
    +PRINTER
    +PRINTING
    +PRINTOUT
    +PRIOR
    +PRIORITIZE
    +PRIORITY
    +PRISM
    +PRISON
    +PRISONER
    +PRISSY
    +PRISTINE
    +PRIVACY
    +PRIVATE
    +PRIVATELY
    +PRIVATION
    +PRIVATIZATION
    +PRIVATIZE
    +PRIVILEGE
    +PRIVILEGED
    +PRIVY
    +PRIZE
    +PROBABILITY
    +PROBABLE
    +PROBABLY
    +PROBATION
    +PROBE
    +PROBING
    +PROBLEM
    +PROBLEMATIC
    +PROCEDURAL
    +PROCEDURE
    +PROCEED
    +PROCEEDINGS
    +PROCEEDS
    +PROCESS
    +PROCESSION
    +PROCESSIONAL
    +PROCESSOR
    +PROCLAIM
    +PROCLAMATION
    +PROCRASTINATE
    +PROCRASTINATION
    +PROCREATE
    +PROCURE
    +PROCUREMENT
    +PROD
    +PRODDING
    +PRODIGAL
    +PRODIGIOUS
    +PRODIGY
    +PRODUCE
    +PRODUCER
    +PRODUCT
    +PRODUCTION
    +PRODUCTIVE
    +PRODUCTIVITY
    +PROF
    +PROFANE
    +PROFANITY
    +PROFESS
    +PROFESSED
    +PROFESSION
    +PROFESSIONAL
    +PROFESSIONALISM
    +PROFESSIONALLY
    +PROFESSOR
    +PROFICIENCY
    +PROFICIENT
    +PROFILE
    +PROFIT
    +PROFITABILITY
    +PROFITABLE
    +PROFITABLY
    +PROFITEER
    +PROFOUND
    +PROFOUNDLY
    +PROFUNDITY
    +PROFUSE
    +PROFUSION
    +PROGENY
    +PROGNOSES
    +PROGNOSIS
    +PROGRAM
    +PROGRAMMER
    +PROGRAMMING
    +PROGRESS
    +PROGRESSION
    +PROGRESSIVE
    +PROGRESSIVELY
    +PROHIBIT
    +PROHIBITION
    +PROHIBITION
    +PROHIBITIVE
    +PROHIBITIVELY
    +PROJECT
    +PROJECTILE
    +PROJECTION
    +PROJECTOR
    +PROLETARIAN
    +PROLETARIAT
    +PROLIFERATE
    +PROLIFERATION
    +PROLIFIC
    +PROLOGUE
    +PROLONG
    +PROLONGED
    +PROM
    +PROMENADE
    +PROMINENCE
    +PROMINENT
    +PROMINENTLY
    +PROMISCUITY
    +PROMISCUOUS
    +PROMISE
    +PROMISING
    +PROMO
    +PROMONTORY
    +PROMOTE
    +PROMOTER
    +PROMOTION
    +PROMOTIONAL
    +PROMPT
    +PROMPTING
    +PROMPTLY
    +PRONE
    +PRONG
    +PRONOUN
    +PRONOUNCE
    +PRONOUNCED
    +PRONOUNCEMENT
    +PRONTO
    +PRONUNCIATION
    +PROOF
    +PROOFREAD
    +PROP
    +PROPAGANDA
    +PROPAGANDIZE
    +PROPAGATE
    +PROPAGATION
    +PROPEL
    +PROPELLER
    +PROPENSITY
    +PROPER
    +PROPERLY
    +PROPERTY
    +PROPHECY
    +PROPHESY
    +PROPHET
    +PROPHETIC
    +PROPITIOUS
    +PROPONENT
    +PROPORTION
    +PROPORTIONAL
    +PROPORTIONS
    +PROPOSAL
    +PROPOSE
    +PROPOSITION
    +PROPRIETARY
    +PROPRIETOR
    +PROPRIETY
    +PROPULSION
    +PROSAIC
    +PROSCRIBE
    +PROSCRIPTION
    +PROSE
    +PROSECUTE
    +PROSECUTION
    +PROSECUTOR
    +PROSELYTIZE
    +PROSPECT
    +PROSPECTIVE
    +PROSPECTOR
    +PROSPECTS
    +PROSPECTUS
    +PROSPER
    +PROSPERITY
    +PROSPEROUS
    +PROSTHESES
    +PROSTHESIS
    +PROSTITUTE
    +PROSTITUTION
    +PROSTRATE
    +PROTAGONIST
    +PROTECT
    +PROTECTION
    +PROTECTIVE
    +PROTECTOR
    +PROTEGE
    +PROTEIN
    +PROTEST
    +PROTESTANT
    +PROTESTER
    +PROTOCOL
    +PROTON
    +PROTOTYPE
    +PROTRACTED
    +PROTRACTION
    +PROTRUDE
    +PROTRUSION
    +PROUD
    +PROUDLY
    +PROVE
    +PROVEN
    +PROVERB
    +PROVERBIAL
    +PROVIDE
    +PROVIDED
    +PROVIDENCE
    +PROVIDENT
    +PROVIDING
    +PROVINCE
    +PROVINCIAL
    +PROVISION
    +PROVISIONAL
    +PROVISIONS
    +PROVISO
    +PROVOCATION
    +PROVOCATIVE
    +PROVOKE
    +PROVOST
    +PROW
    +PROWESS
    +PROWL
    +PROWLER
    +PROXIMITY
    +PROXY
    +PRUDE
    +PRUDENCE
    +PRUDENT
    +PRUDENTLY
    +PRUDISH
    +PRUNE
    +PRURIENCE
    +PRURIENT
    +PSALM
    +PSEUDONYM
    +PSYCH
    +PSYCHE
    +PSYCHED
    +PSYCHEDELIC
    +PSYCHIATRIC
    +PSYCHIATRIST
    +PSYCHIATRY
    +PSYCHIC
    +PSYCHO
    +PSYCHOANALYSIS
    +PSYCHOANALYST
    +PSYCHOANALYZE
    +PSYCHOLOGICAL
    +PSYCHOLOGICALLY
    +PSYCHOLOGIST
    +PSYCHOLOGY
    +PSYCHOPATH
    +PSYCHOPATHIC
    +PSYCHOSES
    +PSYCHOSIS
    +PSYCHOSOMATIC
    +PSYCHOTHERAPIST
    +PSYCHOTHERAPY
    +PSYCHOTIC
    +PUBERTY
    +PUBESCENCE
    +PUBIC
    +PUBLIC
    +PUBLICATION
    +PUBLICIST
    +PUBLICITY
    +PUBLICIZE
    +PUBLICLY
    +PUBLISH
    +PUBLISHER
    +PUBLISHING
    +PUCK
    +PUCKER
    +PUCKERED
    +PUDDING
    +PUDDLE
    +PUDGY
    +PUERILE
    +PUFF
    +PUFFY
    +PUGNACIOUS
    +PUKE
    +PULL
    +PULLEY
    +PULLOUT
    +PULLOVER
    +PULMONARY
    +PULP
    +PULPIT
    +PULSATE
    +PULSATION
    +PULSE
    +PULVERIZATION
    +PULVERIZE
    +PUMA
    +PUMICE
    +PUMMEL
    +PUMP
    +PUMPERNICKEL
    +PUMPKIN
    +PUNCH
    +PUNCTUAL
    +PUNCTUALITY
    +PUNCTUATE
    +PUNCTUATION
    +PUNCTURE
    +PUNDIT
    +PUNGENT
    +PUNISH
    +PUNISHABLE
    +PUNISHING
    +PUNISHMENT
    +PUNITIVE
    +PUNK
    +PUNT
    +PUNY
    +PUPIL
    +PUPPET
    +PUPPETEER
    +PUPPY
    +PURCHASE
    +PURCHASER
    +PURE
    +PUREE
    +PURELY
    +PURGATORY
    +PURGE
    +PURIFICATION
    +PURIFY
    +PURIST
    +PURITAN
    +PURITAN
    +PURITANICAL
    +PURITY
    +PURPLE
    +PURPORT
    +PURPOSE
    +PURPOSEFUL
    +PURPOSELY
    +PURR
    +PURSE
    +PURSER
    +PURSUE
    +PURSUIT
    +PURVEY
    +PURVEYOR
    +PUSH
    +PUSHER
    +PUSHOVER
    +PUSHY
    +PUSSY
    +PUSSYCAT
    +PUSSYFOOT
    +PUTRID
    +PUTT
    +PUTTER
    +PUTTY
    +PUZZLE
    +PUZZLED
    +PYGMY
    +PYLON
    +PYRAMID
    +PYRE
    +PYREX
    +PYTHON
    +QUACK
    +QUAD
    +QUADRANGLE
    +QUADRANT
    +QUADRILATERAL
    +QUADRUPED
    +QUADRUPLE
    +QUADRUPLET
    +QUAGMIRE
    +QUAIL
    +QUAINT
    +QUAKE
    +QUALIFICATION
    +QUALIFIED
    +QUALIFIER
    +QUALIFY
    +QUALITATIVE
    +QUALITY
    +QUALM
    +QUANDARY
    +QUANTIFIER
    +QUANTIFY
    +QUANTITATIVE
    +QUANTITY
    +QUARANTINE
    +QUARK
    +QUARREL
    +QUARRELSOME
    +QUARRY
    +QUART
    +QUARTER
    +QUARTERBACK
    +QUARTERFINAL
    +QUARTERLY
    +QUARTERS
    +QUARTET
    +QUARTZ
    +QUASH
    +QUAVER
    +QUAY
    +QUEASINESS
    +QUEASY
    +QUEEN
    +QUEER
    +QUELL
    +QUENCH
    +QUERY
    +QUEST
    +QUESTION
    +QUESTIONABLE
    +QUESTIONNAIRE
    +QUIBBLE
    +QUICHE
    +QUICK
    +QUICKEN
    +QUICKIE
    +QUICKLY
    +QUICKSAND
    +QUIET
    +QUIETLY
    +QUIETNESS
    +QUILL
    +QUILT
    +QUINTESSENCE
    +QUINTESSENTIAL
    +QUINTET
    +QUINTUPLET
    +QUIP
    +QUIRK
    +QUIRKY
    +QUIT
    +QUITE
    +QUITS
    +QUITTER
    +QUIVER
    +QUIXOTIC
    +QUIZ
    +QUIZZICAL
    +QUORUM
    +QUOTA
    +QUOTABLE
    +QUOTATION
    +QUOTE
    +QUOTIENT
    +RABBI
    +RABBIT
    +RABBLE
    +RABID
    +RABIES
    +RACCOON
    +RACE
    +RACETRACK
    +RACIAL
    +RACIALLY
    +RACING
    +RACISM
    +RACIST
    +RACK
    +RACKET
    +RACKETEER
    +RACY
    +RADAR
    +RADIAL
    +RADIANCE
    +RADIANT
    +RADIATE
    +RADIATION
    +RADIATOR
    +RADICAL
    +RADICALLY
    +RADII
    +RADIO
    +RADIOACTIVE
    +RADIOACTIVITY
    +RADIOLOGIST
    +RADIOLOGY
    +RADIOTHERAPY
    +RADISH
    +RADIUM
    +RADIUS
    +RADON
    +RAFFLE
    +RAFT
    +RAFTER
    +RAGAMUFFIN
    +RAGE
    +RAGGED
    +RAGS
    +RAGTAG
    +RAGTIME
    +RAID
    +RAIDER
    +RAIL
    +RAILING
    +RAILROAD
    +RAIN
    +RAINBOW
    +RAINCOAT
    +RAINDROP
    +RAINFALL
    +RAINS
    +RAINSTORM
    +RAINWATER
    +RAINY
    +RAISE
    +RAISIN
    +RAKE
    +RALLY
    +RAMADAN
    +RAMBLE
    +RAMBLING
    +RAMBUNCTIOUS
    +RAMIFICATION
    +RAMP
    +RAMPAGE
    +RAMPANT
    +RAMROD
    +RAMSHACKLE
    +RANCH
    +RANCHER
    +RANCHING
    +RANCID
    +RANCOR
    +RANCOROUS
    +RANDOM
    +RANDOMLY
    +RANG
    +RANGE
    +RANGER
    +RANK
    +RANKING
    +RANKLE
    +RANKS
    +RANSACK
    +RANSOM
    +RANT
    +RAPE
    +RAPID
    +RAPIDITY
    +RAPIDLY
    +RAPIDS
    +RAPIST
    +RAPPORT
    +RAPPROCHEMENT
    +RAPT
    +RAPTURE
    +RAPTUROUS
    +RARE
    +RARELY
    +RARING
    +RARITY
    +RASCAL
    +RASH
    +RASP
    +RASPBERRY
    +RASPY
    +RATE
    +RATHER
    +RATIFICATION
    +RATIFY
    +RATING
    +RATIO
    +RATION
    +RATIONAL
    +RATIONALE
    +RATIONALIZATION
    +RATIONALIZE
    +RATIONALLY
    +RATIONING
    +RATIONS
    +RATTLE
    +RATTLER
    +RATTLESNAKE
    +RAUCOUS
    +RAUCOUSLY
    +RAUNCHY
    +RAVAGE
    +RAVE
    +RAVEN
    +RAVENOUS
    +RAVINE
    +RAVING
    +RAVISHING
    +RAYON
    +RAZE
    +RAZOR
    +RAZZ
    +REACH
    +REACT
    +REACTION
    +REACTIONARY
    +REACTOR
    +READ
    +READABLE
    +READER
    +READERSHIP
    +READILY
    +READINESS
    +READING
    +READJUST
    +READJUSTMENT
    +READY
    +REAL
    +REALISM
    +REALIST
    +REALISTIC
    +REALISTICALLY
    +REALITY
    +REALIZATION
    +REALIZE
    +REALLY
    +REALM
    +REALTOR
    +REALTY
    +REAM
    +REAP
    +REAPPEAR
    +REAPPEARANCE
    +REAR
    +REARRANGE
    +REARRANGEMENT
    +REASON
    +REASONABLE
    +REASONABLENESS
    +REASONABLY
    +REASONING
    +REASSURANCE
    +REASSURE
    +REASSURING
    +REASSURINGLY
    +REBATE
    +REBEL
    +REBELLION
    +REBELLIOUS
    +REBIRTH
    +REBOUND
    +REBUFF
    +REBUILD
    +REBUILT
    +REBUKE
    +REBUT
    +REBUTTAL
    +RECALCITRANCE
    +RECALCITRANT
    +RECALL
    +RECANT
    +RECAP
    +RECAPTURE
    +RECEDE
    +RECEIPT
    +RECEIVE
    +RECEIVER
    +RECEIVERSHIP
    +RECENT
    +RECENTLY
    +RECEPTACLE
    +RECEPTION
    +RECEPTIONIST
    +RECEPTIVE
    +RECESS
    +RECESSION
    +RECHARGE
    +RECIPE
    +RECIPIENT
    +RECIPROCAL
    +RECIPROCATE
    +RECITAL
    +RECITATION
    +RECITE
    +RECKLESS
    +RECKLESSLY
    +RECKLESSNESS
    +RECKON
    +RECKONING
    +RECLAIM
    +RECLAMATION
    +RECLINE
    +RECLINING
    +RECLUSE
    +RECOGNITION
    +RECOGNIZABLE
    +RECOGNIZABLY
    +RECOGNIZE
    +RECOIL
    +RECOLLECT
    +RECOLLECTION
    +RECOMMEND
    +RECOMMENDATION
    +RECOMPENSE
    +RECONCILE
    +RECONCILIATION
    +RECONDITION
    +RECONNAISSANCE
    +RECONSIDER
    +RECONSTITUTE
    +RECONSTRUCT
    +RECONSTRUCTION
    +RECORD
    +RECORDER
    +RECORDING
    +RECOUNT
    +RECOUP
    +RECOURSE
    +RECOVER
    +RECOVERY
    +RECREATE
    +RECREATION
    +RECREATIONAL
    +RECRUIT
    +RECRUITER
    +RECRUITMENT
    +RECTAL
    +RECTANGLE
    +RECTANGULAR
    +RECTIFY
    +RECTOR
    +RECTUM
    +RECUPERATE
    +RECUPERATION
    +RECUR
    +RECURRENCE
    +RECURRENT
    +RECYCLABLE
    +RECYCLE
    +RECYCLED
    +RECYCLING
    +REDDEN
    +REDDISH
    +REDEEM
    +REDEEMABLE
    +REDEMPTION
    +REDEVELOP
    +REDEVELOPMENT
    +REDHEAD
    +REDID
    +REDIRECT
    +REDISTRIBUTE
    +REDISTRIBUTION
    +REDNECK
    +REDNESS
    +REDO
    +REDONE
    +REDOUBLE
    +REDRESS
    +REDSKIN
    +REDUCE
    +REDUCTION
    +REDUNDANCY
    +REDUNDANT
    +REDWOOD
    +REED
    +REEDUCATE
    +REEDUCATION
    +REEF
    +REEK
    +REEL
    +REELECT
    +REELECTION
    +REENACT
    +REENACTMENT
    +REENTRY
    +REFER
    +REFEREE
    +REFERENCE
    +REFERENDA
    +REFERENDUM
    +REFILL
    +REFINANCE
    +REFINE
    +REFINED
    +REFINEMENT
    +REFINERY
    +REFINISH
    +REFLECT
    +REFLECTION
    +REFLECTIVE
    +REFLECTOR
    +REFLEX
    +REFLEXES
    +REFLEXIVE
    +REFORM
    +REFORMATION
    +REFORMER
    +REFRAIN
    +REFRESH
    +REFRESHING
    +REFRESHINGLY
    +REFRESHMENT
    +REFRESHMENTS
    +REFRIGERATE
    +REFRIGERATION
    +REFRIGERATOR
    +REFUEL
    +REFUGE
    +REFUGEE
    +REFUND
    +REFUNDABLE
    +REFURBISH
    +REFURBISHMENT
    +REFUSAL
    +REFUSE
    +REFUTE
    +REGAIN
    +REGAL
    +REGALIA
    +REGARD
    +REGARDING
    +REGARDLESS
    +REGARDS
    +REGATTA
    +REGENERATE
    +REGENERATION
    +REGENT
    +REGGAE
    +REGIME
    +REGIMEN
    +REGIMENT
    +REGIMENTAL
    +REGIMENTED
    +REGION
    +REGIONAL
    +REGIONALLY
    +REGISTER
    +REGISTRAR
    +REGISTRATION
    +REGISTRY
    +REGRESS
    +REGRESSION
    +REGRET
    +REGRETFUL
    +REGRETFULLY
    +REGRETTABLE
    +REGRETTABLY
    +REGROUP
    +REGULAR
    +REGULARITY
    +REGULARLY
    +REGULATE
    +REGULATION
    +REGURGITATE
    +REGURGITATION
    +REHAB
    +REHABILITATE
    +REHABILITATION
    +REHASH
    +REHEARSAL
    +REHEARSE
    +REIGN
    +REIMBURSE
    +REIMBURSEMENT
    +REIN
    +REINCARNATE
    +REINCARNATION
    +REINDEER
    +REINFORCE
    +REINFORCEMENT
    +REINFORCEMENTS
    +REINSTATE
    +REINSTATEMENT
    +REINVENT
    +REISSUE
    +REITERATE
    +REITERATION
    +REJECT
    +REJECTION
    +REJOICE
    +REJOICING
    +REJOIN
    +REJOINDER
    +REJUVENATE
    +REJUVENATION
    +REKINDLE
    +RELAPSE
    +RELATE
    +RELATED
    +RELATION
    +RELATIONS
    +RELATIONSHIP
    +RELATIVE
    +RELATIVELY
    +RELATIVITY
    +RELAX
    +RELAXATION
    +RELAXED
    +RELAXING
    +RELAY
    +RELEASE
    +RELEGATE
    +RELENT
    +RELENTLESS
    +RELENTLESSLY
    +RELEVANCE
    +RELEVANT
    +RELIABILITY
    +RELIABLE
    +RELIABLY
    +RELIANCE
    +RELIANT
    +RELIC
    +RELIEF
    +RELIEVE
    +RELIEVED
    +RELIGION
    +RELIGIOUS
    +RELIGIOUSLY
    +RELINQUISH
    +RELISH
    +RELIVE
    +RELOCATE
    +RELOCATION
    +RELUCTANCE
    +RELUCTANT
    +RELUCTANTLY
    +RELY
    +REMAIN
    +REMAINDER
    +REMAINING
    +REMAINS
    +REMAKE
    +REMARK
    +REMARKABLE
    +REMARKABLY
    +REMARRIAGE
    +REMARRY
    +REMEDIAL
    +REMEDY
    +REMEMBER
    +REMEMBRANCE
    +REMIND
    +REMINDER
    +REMINISCE
    +REMINISCENCE
    +REMINISCENT
    +REMISS
    +REMISSION
    +REMIT
    +REMITTANCE
    +REMNANT
    +REMODEL
    +REMORSE
    +REMORSEFUL
    +REMORSELESS
    +REMOTE
    +REMOTELY
    +REMOTENESS
    +REMOVABLE
    +REMOVAL
    +REMOVE
    +REMOVED
    +REMOVER
    +REMUNERATE
    +REMUNERATION
    +RENAISSANCE
    +RENAME
    +REND
    +RENDER
    +RENDERING
    +RENDEZVOUS
    +RENDITION
    +RENEGADE
    +RENEGE
    +RENEW
    +RENEWABLE
    +RENEWAL
    +RENOUNCE
    +RENOVATE
    +RENOVATION
    +RENOWN
    +RENOWNED
    +RENT
    +RENTAL
    +RENTER
    +RENUNCIATION
    +REORGANIZATION
    +REORGANIZE
    +REPAID
    +REPAIR
    +REPARATION
    +REPATRIATE
    +REPATRIATION
    +REPAY
    +REPAYMENT
    +REPEAL
    +REPEAT
    +REPEATED
    +REPEATEDLY
    +REPEL
    +REPELLENT
    +REPENT
    +REPENTANCE
    +REPENTANT
    +REPERCUSSION
    +REPERTOIRE
    +REPETITION
    +REPETITIOUS
    +REPETITIVE
    +REPHRASE
    +REPLACE
    +REPLACEABLE
    +REPLACEMENT
    +REPLAY
    +REPLENISH
    +REPLENISHMENT
    +REPLETE
    +REPLICA
    +REPLICATE
    +REPLICATION
    +REPLY
    +REPORT
    +REPORTEDLY
    +REPORTER
    +REPOSITORY
    +REPOSSESS
    +REPREHENSIBLE
    +REPRESENT
    +REPRESENTATION
    +REPRESENTATIVE
    +REPRESENTATIVE
    +REPRESS
    +REPRESSED
    +REPRESSION
    +REPRESSIVE
    +REPRIEVE
    +REPRIMAND
    +REPRINT
    +REPRISAL
    +REPRISE
    +REPROACH
    +REPRODUCE
    +REPRODUCTION
    +REPRODUCTIVE
    +REPROVE
    +REPTILE
    +REPTILIAN
    +REPUBLIC
    +REPUBLICAN
    +REPUBLICAN
    +REPUDIATE
    +REPUDIATION
    +REPUGNANCE
    +REPUGNANT
    +REPULSE
    +REPULSION
    +REPULSIVE
    +REPUTABLE
    +REPUTATION
    +REPUTE
    +REPUTED
    +REPUTEDLY
    +REQUEST
    +REQUIEM
    +REQUIRE
    +REQUIREMENT
    +REQUISITE
    +REQUISITION
    +RERUN
    +RESALE
    +RESCIND
    +RESCUE
    +RESCUER
    +RESEARCH
    +RESEARCHER
    +RESEMBLANCE
    +RESEMBLE
    +RESENT
    +RESENTFUL
    +RESENTMENT
    +RESERVATION
    +RESERVE
    +RESERVED
    +RESERVES
    +RESERVOIR
    +RESHUFFLE
    +RESIDE
    +RESIDENCE
    +RESIDENCY
    +RESIDENT
    +RESIDENTIAL
    +RESIDUAL
    +RESIDUE
    +RESIGN
    +RESIGNATION
    +RESIGNED
    +RESILIENCE
    +RESILIENT
    +RESIN
    +RESIST
    +RESISTANCE
    +RESISTANT
    +RESOLUTE
    +RESOLUTELY
    +RESOLUTION
    +RESOLVE
    +RESONANCE
    +RESONANT
    +RESONATE
    +RESORT
    +RESOUND
    +RESOUNDING
    +RESOUNDINGLY
    +RESOURCE
    +RESOURCEFUL
    +RESOURCEFULNESS
    +RESOURCES
    +RESPECT
    +RESPECTABILITY
    +RESPECTABLE
    +RESPECTABLY
    +RESPECTED
    +RESPECTFUL
    +RESPECTFULLY
    +RESPECTIVE
    +RESPECTIVELY
    +RESPECTS
    +RESPIRATION
    +RESPIRATOR
    +RESPIRATORY
    +RESPITE
    +RESPLENDENT
    +RESPOND
    +RESPONSE
    +RESPONSIBILITY
    +RESPONSIBLE
    +RESPONSIBLY
    +RESPONSIVE
    +RESPONSIVENESS
    +REST
    +RESTATE
    +RESTATEMENT
    +RESTAURANT
    +RESTITUTION
    +RESTIVE
    +RESTLESS
    +RESTLESSLY
    +RESTORATION
    +RESTORE
    +RESTRAIN
    +RESTRAINED
    +RESTRAINT
    +RESTRICT
    +RESTRICTED
    +RESTRICTION
    +RESTRICTIVE
    +RESTRUCTURE
    +RESTRUCTURING
    +RESULT
    +RESULTANT
    +RESUME
    +RESUMPTION
    +RESURFACE
    +RESURGENCE
    +RESURGENT
    +RESURRECT
    +RESURRECTION
    +RESURRECTION
    +RESUSCITATE
    +RESUSCITATION
    +RETAIL
    +RETAILER
    +RETAIN
    +RETAINER
    +RETAKE
    +RETAKEN
    +RETALIATE
    +RETALIATION
    +RETARD
    +RETARDATION
    +RETARDED
    +RETCH
    +RETENTION
    +RETHINK
    +RETHOUGHT
    +RETICENCE
    +RETICENT
    +RETINA
    +RETINUE
    +RETIRE
    +RETIRED
    +RETIREE
    +RETIREMENT
    +RETIRING
    +RETOOK
    +RETORT
    +RETRACE
    +RETRACT
    +RETRACTABLE
    +RETRACTION
    +RETREAD
    +RETREAT
    +RETRIAL
    +RETRIBUTION
    +RETRIEVAL
    +RETRIEVE
    +RETRIEVER
    +RETROACTIVE
    +RETROACTIVELY
    +RETROSPECTIVE
    +RETURN
    +RETURNABLE
    +REUNION
    +REUNITE
    +REVALUATION
    +REVALUE
    +REVAMP
    +REVEAL
    +REVEALING
    +REVEL
    +REVELATION
    +REVELER
    +REVELRY
    +REVENGE
    +REVENUE
    +REVERBERATE
    +REVERBERATION
    +REVERE
    +REVERENCE
    +REVEREND
    +REVERENT
    +REVERENTLY
    +REVERIE
    +REVERSAL
    +REVERSE
    +REVERSIBLE
    +REVERSION
    +REVERT
    +REVIEW
    +REVIEWER
    +REVILE
    +REVISE
    +REVISION
    +REVITALIZATION
    +REVITALIZE
    +REVIVAL
    +REVIVE
    +REVOKE
    +REVOLT
    +REVOLTING
    +REVOLUTION
    +REVOLUTIONARY
    +REVOLUTIONIZE
    +REVOLVE
    +REVOLVER
    +REVUE
    +REVULSION
    +REWARD
    +REWARDING
    +REWIND
    +REWORK
    +REWOUND
    +REWRITE
    +REWRITTEN
    +REWROTE
    +RHAPSODY
    +RHETORIC
    +RHETORICAL
    +RHETORICALLY
    +RHEUMATISM
    +RHINESTONE
    +RHINO
    +RHINOCEROS
    +RHODODENDRON
    +RHUBARB
    +RHYME
    +RHYTHM
    +RHYTHMIC
    +RHYTHMICALLY
    +RIBALD
    +RIBBON
    +RICE
    +RICH
    +RICHES
    +RICHLY
    +RICHNESS
    +RICKETY
    +RICKSHAW
    +RICOCHET
    +RIDDANCE
    +RIDDEN
    +RIDDLE
    +RIDDLED
    +RIDE
    +RIDER
    +RIDGE
    +RIDICULE
    +RIDICULOUS
    +RIDICULOUSLY
    +RIDING
    +RIFE
    +RIFLE
    +RIFT
    +RIGGING
    +RIGHT
    +RIGHTEOUS
    +RIGHTEOUSLY
    +RIGHTEOUSNESS
    +RIGHTFUL
    +RIGHTFULLY
    +RIGHTLY
    +RIGHTS
    +RIGID
    +RIGIDITY
    +RIGIDLY
    +RIGMAROLE
    +RIGOR
    +RIGOROUS
    +RIGOROUSLY
    +RILE
    +RIND
    +RING
    +RINGED
    +RINGLEADER
    +RINGLET
    +RINGSIDE
    +RINGWORM
    +RINK
    +RINSE
    +RIOT
    +RIOTER
    +RIOTING
    +RIOTOUS
    +RIPE
    +RIPEN
    +RIPPLE
    +RISE
    +RISEN
    +RISER
    +RISK
    +RISKY
    +RISQUE
    +RITE
    +RITUAL
    +RITUALLY
    +RITZY
    +RIVAL
    +RIVALRY
    +RIVER
    +RIVERBED
    +RIVERFRONT
    +RIVERSIDE
    +RIVET
    +RIVETING
    +ROACH
    +ROAD
    +ROADBLOCK
    +ROADHOUSE
    +ROADKILL
    +ROADRUNNER
    +ROADSIDE
    +ROADWAY
    +ROADWORTHY
    +ROAM
    +ROAR
    +ROARING
    +ROAST
    +ROBBER
    +ROBBERY
    +ROBE
    +ROBIN
    +ROBOT
    +ROBOTICS
    +ROBUST
    +ROCK
    +ROCKER
    +ROCKET
    +ROCKY
    +RODE
    +RODENT
    +RODEO
    +ROGUE
    +ROLE
    +ROLL
    +ROLLER
    +ROLLERBLADE
    +ROLLERSKATING
    +ROLLICKING
    +ROMAN
    +ROMANCE
    +ROMANTIC
    +ROMANTICALLY
    +ROMANTICIZE
    +ROMP
    +ROOF
    +ROOFING
    +ROOFTOP
    +ROOK
    +ROOKIE
    +ROOM
    +ROOMFUL
    +ROOMMATE
    +ROOMY
    +ROOST
    +ROOSTER
    +ROOT
    +ROOTLESS
    +ROOTS
    +ROPE
    +ROSARY
    +ROSE
    +ROSTER
    +ROSTRUM
    +ROSY
    +ROTARY
    +ROTATE
    +ROTATION
    +ROTC
    +ROTE
    +ROTISSERIE
    +ROTOR
    +ROTTEN
    +ROTUND
    +ROTUNDA
    +ROUGE
    +ROUGH
    +ROUGHAGE
    +ROUGHHOUSE
    +ROUGHLY
    +ROUGHNESS
    +ROUGHSHOD
    +ROULETTE
    +ROUND
    +ROUNDABOUT
    +ROUNDUP
    +ROUSE
    +ROUSING
    +ROUT
    +ROUTE
    +ROUTINE
    +ROUTINELY
    +ROVING
    +ROWBOAT
    +ROWDINESS
    +ROWDY
    +ROWING
    +ROYAL
    +ROYALTIES
    +ROYALTY
    +RSVP
    +RUBBER
    +RUBBERNECK
    +RUBBERY
    +RUBBISH
    +RUBBLE
    +RUBDOWN
    +RUBELLA
    +RUBY
    +RUCKUS
    +RUDDER
    +RUDDY
    +RUDE
    +RUDELY
    +RUDENESS
    +RUDIMENTARY
    +RUDIMENTS
    +RUEFUL
    +RUFFLE
    +RUGBY
    +RUGGED
    +RUIN
    +RUINOUS
    +RULE
    +RULER
    +RULING
    +RUMBLE
    +RUMINATE
    +RUMMAGE
    +RUMMY
    +RUMOR
    +RUMORED
    +RUMP
    +RUMPLE
    +RUNAROUND
    +RUNAWAY
    +RUNDOWN
    +RUNG
    +RUNNER
    +RUNNING
    +RUNNY
    +RUNWAY
    +RUPTURE
    +RURAL
    +RUSE
    +RUSH
    +RUSSIAN
    +RUST
    +RUSTIC
    +RUSTLE
    +RUSTLER
    +RUSTPROOF
    +RUSTY
    +RUTHLESS
    +RUTHLESSLY
    +RUTHLESSNESS
    +SABBATH
    +SABBATICAL
    +SABER
    +SABOTAGE
    +SABOTEUR
    +SACCHARIN
    +SACK
    +SACRAMENT
    +SACRED
    +SACRIFICE
    +SACRIFICIAL
    +SACRILEGE
    +SACRILEGIOUS
    +SACROSANCT
    +SADDEN
    +SADDLE
    +SADISM
    +SADIST
    +SADISTIC
    +SADISTICALLY
    +SADLY
    +SADNESS
    +SAFARI
    +SAFE
    +SAFEGUARD
    +SAFEKEEPING
    +SAFELY
    +SAFETY
    +SAGA
    +SAGE
    +SAGEBRUSH
    +SAGITTARIUS
    +SAID
    +SAIL
    +SAILBOARD
    +SAILBOAT
    +SAILING
    +SAILOR
    +SAINT
    +SAKE
    +SALABLE
    +SALAD
    +SALAMI
    +SALARIED
    +SALARY
    +SALE
    +SALES
    +SALESCLERK
    +SALESMAN
    +SALESPERSON
    +SALESWOMAN
    +SALIENT
    +SALIVA
    +SALIVATE
    +SALLOW
    +SALMON
    +SALMONELLA
    +SALON
    +SALOON
    +SALSA
    +SALT
    +SALTWATER
    +SALTY
    +SALUTATION
    +SALUTE
    +SALVAGE
    +SALVATION
    +SALVE
    +SAME
    +SAMENESS
    +SAMPLE
    +SANATORIUM
    +SANCTIFY
    +SANCTIMONIOUS
    +SANCTION
    +SANCTIONS
    +SANCTITY
    +SANCTUARY
    +SAND
    +SANDAL
    +SANDBAG
    +SANDBLAST
    +SANDCASTLE
    +SANDMAN
    +SANDPAPER
    +SANDSTONE
    +SANDWICH
    +SANDY
    +SANE
    +SANG
    +SANITARY
    +SANITATION
    +SANITIZE
    +SANITY
    +SANK
    +SANTA
    +SAPLING
    +SAPPHIRE
    +SARCASM
    +SARCASTIC
    +SARCASTICALLY
    +SARDINE
    +SARDONIC
    +SASE
    +SASH
    +SASS
    +SASSY
    +SATAN
    +SATANIC
    +SATANISM
    +SATELLITE
    +SATIN
    +SATINY
    +SATIRE
    +SATIRICAL
    +SATIRICALLY
    +SATIRIST
    +SATIRIZE
    +SATISFACTION
    +SATISFACTORILY
    +SATISFACTORY
    +SATISFIED
    +SATISFY
    +SATISFYING
    +SATURATE
    +SATURATION
    +SATURDAY
    +SATURN
    +SAUCE
    +SAUCEPAN
    +SAUCER
    +SAUCY
    +SAUNA
    +SAUNTER
    +SAUSAGE
    +SAUTE
    +SAUTEED
    +SAVAGE
    +SAVAGELY
    +SAVAGERY
    +SAVE
    +SAVER
    +SAVING
    +SAVINGS
    +SAVIOR
    +SAVIOR
    +SAVOR
    +SAVORY
    +SAVVY
    +SAWDUST
    +SAWN
    +SAXOPHONE
    +SAYING
    +SCAB
    +SCADS
    +SCAFFOLD
    +SCAFFOLDING
    +SCALD
    +SCALDING
    +SCALE
    +SCALLOP
    +SCALLOPED
    +SCALP
    +SCALPEL
    +SCALPER
    +SCALY
    +SCAM
    +SCAMPER
    +SCAN
    +SCANDAL
    +SCANDALIZE
    +SCANDALOUS
    +SCANDINAVIA
    +SCANDINAVIAN
    +SCANNER
    +SCANT
    +SCAPEGOAT
    +SCAR
    +SCARCE
    +SCARCELY
    +SCARCITY
    +SCARE
    +SCARECROW
    +SCARED
    +SCARF
    +SCARLET
    +SCARVES
    +SCARY
    +SCATHING
    +SCATTER
    +SCATTERBRAINED
    +SCATTERED
    +SCAVENGE
    +SCAVENGER
    +SCENARIO
    +SCENE
    +SCENERY
    +SCENIC
    +SCENT
    +SCENTED
    +SCHEDULE
    +SCHEME
    +SCHEMER
    +SCHISM
    +SCHIZOPHRENIA
    +SCHIZOPHRENIC
    +SCHLEP
    +SCHLOCK
    +SCHLOCKY
    +SCHMALTZ
    +SCHMALTZY
    +SCHMOOZE
    +SCHMUCK
    +SCHOLAR
    +SCHOLARSHIP
    +SCHOLASTIC
    +SCHOOL
    +SCHOOLBOY
    +SCHOOLCHILD
    +SCHOOLCHILDREN
    +SCHOOLGIRL
    +SCHOOLING
    +SCHOOLTEACHER
    +SCIENCE
    +SCIENTIFIC
    +SCIENTIFICALLY
    +SCIENTIST
    +SCINTILLATING
    +SCISSORS
    +SCOFF
    +SCOLD
    +SCOLDING
    +SCOOP
    +SCOOT
    +SCOOTER
    +SCOPE
    +SCORCH
    +SCORCHING
    +SCORE
    +SCOREBOARD
    +SCORECARD
    +SCORES
    +SCORN
    +SCORNFUL
    +SCORNFULLY
    +SCORPIO
    +SCORPION
    +SCOTCH
    +SCOTCH
    +SCOTTISH
    +SCOUNDREL
    +SCOUR
    +SCOURGE
    +SCOUT
    +SCOWL
    +SCRABBLE
    +SCRAGGLY
    +SCRAM
    +SCRAMBLE
    +SCRAP
    +SCRAPBOOK
    +SCRAPE
    +SCRAPPY
    +SCRAPS
    +SCRATCH
    +SCRATCHY
    +SCRAWL
    +SCRAWNY
    +SCREAM
    +SCREECH
    +SCREEN
    +SCREENPLAY
    +SCREW
    +SCREWBALL
    +SCREWDRIVER
    +SCREWY
    +SCRIBBLE
    +SCRIBE
    +SCRIMP
    +SCRIPT
    +SCRIPTURE
    +SCROLL
    +SCROOGE
    +SCROUNGE
    +SCRUB
    +SCRUFFY
    +SCRUPLES
    +SCRUPULOUS
    +SCRUPULOUSLY
    +SCRUTINIZE
    +SCRUTINY
    +SCUFF
    +SCUFFLE
    +SCULPTOR
    +SCULPTURE
    +SCUM
    +SCURRILOUS
    +SCURRY
    +SCUTTLE
    +SEAFOOD
    +SEAL
    +SEALED
    +SEAM
    +SEAMLESS
    +SEAR
    +SEARCH
    +SEARCHING
    +SEARCHLIGHT
    +SEASHELL
    +SEASHORE
    +SEASICK
    +SEASICKNESS
    +SEASIDE
    +SEASON
    +SEASONABLE
    +SEASONAL
    +SEASONED
    +SEASONING
    +SEAT
    +SEATING
    +SEAWEED
    +SECEDE
    +SECESSION
    +SECLUDED
    +SECLUSION
    +SECOND
    +SECONDARY
    +SECONDHAND
    +SECONDLY
    +SECONDS
    +SECRECY
    +SECRET
    +SECRETARIAL
    +SECRETARY
    +SECRETARY
    +SECRETE
    +SECRETION
    +SECRETIVE
    +SECRETIVELY
    +SECRETLY
    +SECT
    +SECTION
    +SECTOR
    +SECULAR
    +SECURE
    +SECURELY
    +SECURITY
    +SEDAN
    +SEDATE
    +SEDATED
    +SEDATION
    +SEDATIVE
    +SEDENTARY
    +SEDIMENT
    +SEDUCE
    +SEDUCTION
    +SEDUCTIVE
    +SEED
    +SEEDLESS
    +SEEDLING
    +SEEDY
    +SEEK
    +SEEM
    +SEEMING
    +SEEMINGLY
    +SEEN
    +SEEP
    +SEEPAGE
    +SEESAW
    +SEETHE
    +SEETHING
    +SEGMENT
    +SEGMENTED
    +SEGREGATE
    +SEGREGATION
    +SEIZE
    +SEIZURE
    +SELDOM
    +SELECT
    +SELECTION
    +SELECTIVE
    +SELECTIVELY
    +SELF
    +SELFISH
    +SELFISHLY
    +SELFISHNESS
    +SELFLESS
    +SELL
    +SELLER
    +SELLOUT
    +SELVES
    +SEMANTIC
    +SEMANTICS
    +SEMBLANCE
    +SEMEN
    +SEMESTER
    +SEMICIRCLE
    +SEMICOLON
    +SEMICONDUCTOR
    +SEMIFINAL
    +SEMIFINALIST
    +SEMINAL
    +SEMINAR
    +SEMINARY
    +SEMIPRECIOUS
    +SENATE
    +SENATE
    +SENATOR
    +SENATOR
    +SENATORIAL
    +SEND
    +SENILE
    +SENILITY
    +SENIOR
    +SENIOR
    +SENIORITY
    +SENSATION
    +SENSATIONAL
    +SENSATIONALISM
    +SENSATIONALLY
    +SENSE
    +SENSELESS
    +SENSIBILITY
    +SENSIBLE
    +SENSIBLY
    +SENSITIVE
    +SENSITIVELY
    +SENSITIVITY
    +SENSOR
    +SENSORY
    +SENSUAL
    +SENSUALITY
    +SENSUOUS
    +SENT
    +SENTENCE
    +SENTIMENT
    +SENTIMENTAL
    +SENTIMENTALITY
    +SENTRY
    +SEPARABLE
    +SEPARATE
    +SEPARATED
    +SEPARATELY
    +SEPARATION
    +SEPTEMBER
    +SEQUEL
    +SEQUENCE
    +SEQUENTIAL
    +SEQUOIA
    +SERENADE
    +SERENE
    +SERENELY
    +SERENITY
    +SERGEANT
    +SERIAL
    +SERIES
    +SERIOUS
    +SERIOUSLY
    +SERIOUSNESS
    +SERMON
    +SERPENT
    +SERRATED
    +SERUM
    +SERVANT
    +SERVE
    +SERVER
    +SERVICE
    +SERVICEABLE
    +SERVICEMAN
    +SERVICEWOMAN
    +SERVILE
    +SERVING
    +SERVITUDE
    +SESSION
    +SETBACK
    +SETTING
    +SETTLE
    +SETTLED
    +SETTLEMENT
    +SETTLER
    +SETUP
    +SEVEN
    +SEVENTEEN
    +SEVENTEENTH
    +SEVENTH
    +SEVENTIETH
    +SEVENTY
    +SEVER
    +SEVERAL
    +SEVERANCE
    +SEVERE
    +SEVERELY
    +SEVERITY
    +SEWAGE
    +SEWER
    +SEWING
    +SEWN
    +SEXISM
    +SEXIST
    +SEXUAL
    +SEXUALITY
    +SEXUALLY
    +SEXY
    +SHABBILY
    +SHABBY
    +SHACK
    +SHACKLE
    +SHADE
    +SHADES
    +SHADING
    +SHADOW
    +SHADOWY
    +SHADY
    +SHAFT
    +SHAGGY
    +SHAKE
    +SHAKEDOWN
    +SHAKEN
    +SHAKEUP
    +SHAKILY
    +SHAKY
    +SHALL
    +SHALLOW
    +SHALLOWNESS
    +SHAM
    +SHAMBLES
    +SHAME
    +SHAMEFUL
    +SHAMEFULLY
    +SHAMELESS
    +SHAMELESSLY
    +SHAMPOO
    +SHAMROCK
    +SHANTY
    +SHANTYTOWN
    +SHAPE
    +SHAPELY
    +SHARE
    +SHAREHOLDER
    +SHARK
    +SHARP
    +SHARPEN
    +SHARPENER
    +SHARPLY
    +SHARPNESS
    +SHATTER
    +SHAVE
    +SHAVER
    +SHAWL
    +SHEAF
    +SHEAR
    +SHEARS
    +SHEATH
    +SHEATHE
    +SHEAVES
    +SHED
    +SHEEN
    +SHEEP
    +SHEEPISH
    +SHEEPISHLY
    +SHEER
    +SHEET
    +SHEIK
    +SHELF
    +SHELL
    +SHELLFISH
    +SHELTER
    +SHELTERED
    +SHELVE
    +SHELVES
    +SHELVING
    +SHENANIGANS
    +SHEPHERD
    +SHERBET
    +SHERIFF
    +SHERRY
    +SHIELD
    +SHIFT
    +SHIFTLESS
    +SHIFTY
    +SHIMMER
    +SHIN
    +SHINE
    +SHINGLE
    +SHINNY
    +SHINY
    +SHIP
    +SHIPLOAD
    +SHIPMENT
    +SHIPPING
    +SHIPWRECK
    +SHIPYARD
    +SHIRK
    +SHIRT
    +SHIRTSLEEVE
    +SHIT
    +SHITTY
    +SHIVER
    +SHOAL
    +SHOCK
    +SHOCKED
    +SHOCKING
    +SHOD
    +SHODDILY
    +SHODDY
    +SHOE
    +SHOELACE
    +SHOESTRING
    +SHONE
    +SHOO
    +SHOOK
    +SHOOT
    +SHOOTING
    +SHOP
    +SHOPKEEPER
    +SHOPLIFT
    +SHOPLIFTER
    +SHOPLIFTING
    +SHOPPER
    +SHOPPING
    +SHORE
    +SHORN
    +SHORT
    +SHORTAGE
    +SHORTCHANGE
    +SHORTCOMING
    +SHORTCUT
    +SHORTEN
    +SHORTENING
    +SHORTFALL
    +SHORTHAND
    +SHORTLY
    +SHORTNESS
    +SHORTS
    +SHORTSIGHTED
    +SHORTWAVE
    +SHOT
    +SHOTGUN
    +SHOULD
    +SHOULDER
    +SHOUT
    +SHOVE
    +SHOVEL
    +SHOW
    +SHOWBIZ
    +SHOWCASE
    +SHOWDOWN
    +SHOWER
    +SHOWING
    +SHOWMAN
    +SHOWMANSHIP
    +SHOWN
    +SHOWPIECE
    +SHOWROOM
    +SHOWY
    +SHRANK
    +SHRAPNEL
    +SHRED
    +SHREWD
    +SHREWDLY
    +SHRIEK
    +SHRILL
    +SHRIMP
    +SHRINE
    +SHRINK
    +SHRINKAGE
    +SHRIVEL
    +SHRIVELED
    +SHROUD
    +SHRUB
    +SHRUBBERY
    +SHRUG
    +SHRUNK
    +SHRUNKEN
    +SHUCK
    +SHUCKS
    +SHUDDER
    +SHUFFLE
    +SHUN
    +SHUNT
    +SHUSH
    +SHUT
    +SHUTDOWN
    +SHUTEYE
    +SHUTTER
    +SHUTTLE
    +SHYLY
    +SHYNESS
    +SHYSTER
    +SIBLING
    +SICK
    +SICKEN
    +SICKENING
    +SICKLE
    +SICKLY
    +SICKNESS
    +SIDE
    +SIDEBURNS
    +SIDEKICK
    +SIDELINE
    +SIDELINES
    +SIDELONG
    +SIDESHOW
    +SIDESTEP
    +SIDETRACK
    +SIDEWALK
    +SIDEWAYS
    +SIDING
    +SIDLE
    +SIEGE
    +SIESTA
    +SIEVE
    +SIFT
    +SIGH
    +SIGHT
    +SIGHTED
    +SIGHTING
    +SIGHTLESS
    +SIGHTREAD
    +SIGHTS
    +SIGHTSEEING
    +SIGHTSEER
    +SIGN
    +SIGNAL
    +SIGNATORY
    +SIGNATURE
    +SIGNIFICANCE
    +SIGNIFICANT
    +SIGNIFICANTLY
    +SIGNIFY
    +SIGNING
    +SIGNPOST
    +SIKH
    +SIKHISM
    +SILENCE
    +SILENCER
    +SILENT
    +SILENTLY
    +SILHOUETTE
    +SILICON
    +SILK
    +SILKEN
    +SILKY
    +SILL
    +SILLINESS
    +SILLY
    +SILO
    +SILT
    +SILVER
    +SILVERSMITH
    +SILVERWARE
    +SIMILAR
    +SIMILARITY
    +SIMILARLY
    +SIMILE
    +SIMMER
    +SIMPER
    +SIMPLE
    +SIMPLICITY
    +SIMPLIFICATION
    +SIMPLIFY
    +SIMPLISTIC
    +SIMPLY
    +SIMULATE
    +SIMULATION
    +SIMULATOR
    +SIMULTANEOUS
    +SIMULTANEOUSLY
    +SINCE
    +SINCERE
    +SINCERELY
    +SINCERITY
    +SINEW
    +SINEWY
    +SINFUL
    +SING
    +SINGE
    +SINGER
    +SINGING
    +SINGLE
    +SINGLES
    +SINGLY
    +SINGSONG
    +SINGULAR
    +SINGULARLY
    +SINISTER
    +SINK
    +SINNER
    +SINUS
    +SIPHON
    +SIRE
    +SIREN
    +SIRLOIN
    +SISSY
    +SISTER
    +SISTER
    +SISTERHOOD
    +SISTERLY
    +SITCOM
    +SITE
    +SITTER
    +SITTING
    +SITUATED
    +SITUATION
    +SIXTEEN
    +SIXTEENTH
    +SIXTH
    +SIXTIETH
    +SIXTY
    +SIZABLE
    +SIZE
    +SIZZLE
    +SKATE
    +SKATEBOARD
    +SKATEBOARDER
    +SKATEBOARDING
    +SKATER
    +SKELETON
    +SKEPTIC
    +SKEPTICAL
    +SKEPTICALLY
    +SKEPTICISM
    +SKETCH
    +SKETCHY
    +SKEW
    +SKEWED
    +SKEWER
    +SKID
    +SKIER
    +SKIING
    +SKILL
    +SKILLED
    +SKILLET
    +SKILLFUL
    +SKILLFULLY
    +SKIM
    +SKIMP
    +SKIMPY
    +SKIN
    +SKINFLINT
    +SKINHEAD
    +SKINNY
    +SKINTIGHT
    +SKIP
    +SKIPPER
    +SKIRMISH
    +SKIRT
    +SKIT
    +SKITTISH
    +SKULL
    +SKULLCAP
    +SKUNK
    +SKYDIVER
    +SKYDIVING
    +SKYLIGHT
    +SKYLINE
    +SKYROCKET
    +SKYSCRAPER
    +SLAB
    +SLACK
    +SLACKEN
    +SLACKER
    +SLACKS
    +SLAIN
    +SLAKE
    +SLALOM
    +SLAM
    +SLANDER
    +SLANG
    +SLANT
    +SLAP
    +SLAPDASH
    +SLAPSTICK
    +SLASH
    +SLAT
    +SLATE
    +SLATHER
    +SLAUGHTER
    +SLAUGHTERHOUSE
    +SLAVE
    +SLAVERY
    +SLAVISH
    +SLAY
    +SLAYING
    +SLEAZY
    +SLED
    +SLEDGEHAMMER
    +SLEEK
    +SLEEP
    +SLEEPER
    +SLEEPILY
    +SLEEPLESS
    +SLEEPLESSNESS
    +SLEEPWALK
    +SLEEPY
    +SLEEPYHEAD
    +SLEET
    +SLEEVE
    +SLEEVELESS
    +SLEIGH
    +SLENDER
    +SLEPT
    +SLEUTH
    +SLEW
    +SLICE
    +SLICK
    +SLID
    +SLIDE
    +SLIGHT
    +SLIGHTLY
    +SLIM
    +SLIME
    +SLIMY
    +SLING
    +SLINGSHOT
    +SLINK
    +SLIP
    +SLIPPER
    +SLIPPERY
    +SLIPSHOD
    +SLIT
    +SLITHER
    +SLIVER
    +SLOB
    +SLOBBER
    +SLOG
    +SLOGAN
    +SLOP
    +SLOPE
    +SLOPPILY
    +SLOPPY
    +SLOSH
    +SLOSHED
    +SLOT
    +SLOTH
    +SLOTHFUL
    +SLOUCH
    +SLOVENLY
    +SLOW
    +SLOWDOWN
    +SLOWLY
    +SLOWNESS
    +SLOWPOKE
    +SLUDGE
    +SLUG
    +SLUGGISH
    +SLUICE
    +SLUM
    +SLUMBER
    +SLUMP
    +SLUNG
    +SLUNK
    +SLUR
    +SLURP
    +SLUSH
    +SLUSHY
    +SLUT
    +SLYLY
    +SMACK
    +SMALL
    +SMALLPOX
    +SMART
    +SMARTS
    +SMASH
    +SMASHED
    +SMATTERING
    +SMEAR
    +SMELL
    +SMELLY
    +SMIDGEN
    +SMILE
    +SMIRK
    +SMITH
    +SMITHEREENS
    +SMITTEN
    +SMOCK
    +SMOG
    +SMOGGY
    +SMOKE
    +SMOKED
    +SMOKER
    +SMOKESTACK
    +SMOKING
    +SMOKY
    +SMOLDER
    +SMOOCH
    +SMOOTH
    +SMOOTHLY
    +SMOOTHNESS
    +SMORGASBORD
    +SMOTHER
    +SMUDGE
    +SMUG
    +SMUGGLE
    +SMUGGLER
    +SMUGGLING
    +SMUGLY
    +SMUGNESS
    +SMUT
    +SMUTTY
    +SNACK
    +SNAFU
    +SNAG
    +SNAIL
    +SNAKE
    +SNAP
    +SNAPPY
    +SNAPSHOT
    +SNARE
    +SNARL
    +SNATCH
    +SNAZZY
    +SNEAK
    +SNEAKER
    +SNEAKING
    +SNEAKY
    +SNEER
    +SNEEZE
    +SNICKER
    +SNIDE
    +SNIFF
    +SNIFFLE
    +SNIFFLES
    +SNIP
    +SNIPE
    +SNIPER
    +SNIT
    +SNITCH
    +SNOB
    +SNOBBERY
    +SNOBBISH
    +SNOBBY
    +SNOOP
    +SNOOTY
    +SNOOZE
    +SNORE
    +SNORKEL
    +SNORKELING
    +SNORT
    +SNOT
    +SNOTTY
    +SNOUT
    +SNOW
    +SNOWBALL
    +SNOWBOARD
    +SNOWBOARDING
    +SNOWBOUND
    +SNOWDRIFT
    +SNOWFALL
    +SNOWFLAKE
    +SNOWMAN
    +SNOWMOBILE
    +SNOWPLOW
    +SNOWSTORM
    +SNOWY
    +SNUB
    +SNUCK
    +SNUFF
    +SNUG
    +SNUGGLE
    +SNUGLY
    +SOAK
    +SOAKED
    +SOAKING
    +SOAP
    +SOAPY
    +SOAR
    +SOARING
    +SOBER
    +SOBERING
    +SOBRIETY
    +SOCCER
    +SOCIABLE
    +SOCIAL
    +SOCIALISM
    +SOCIALIST
    +SOCIALITE
    +SOCIALIZE
    +SOCIALLY
    +SOCIETY
    +SOCIOECONOMIC
    +SOCIOLOGICAL
    +SOCIOLOGIST
    +SOCIOLOGY
    +SOCIOPATH
    +SOCK
    +SOCKET
    +SODA
    +SODDEN
    +SODIUM
    +SOFA
    +SOFT
    +SOFTBALL
    +SOFTEN
    +SOFTHEARTED
    +SOFTLY
    +SOFTNESS
    +SOFTWARE
    +SOFTY
    +SOGGY
    +SOIL
    +SOILED
    +SOJOURN
    +SOLACE
    +SOLAR
    +SOLD
    +SOLDER
    +SOLDIER
    +SOLE
    +SOLELY
    +SOLEMN
    +SOLEMNITY
    +SOLEMNLY
    +SOLICIT
    +SOLICITOR
    +SOLICITOUS
    +SOLID
    +SOLIDARITY
    +SOLIDIFY
    +SOLIDITY
    +SOLIDLY
    +SOLILOQUY
    +SOLITAIRE
    +SOLITARY
    +SOLITUDE
    +SOLO
    +SOLOIST
    +SOLUBLE
    +SOLUTION
    +SOLVABLE
    +SOLVE
    +SOLVENT
    +SOMBER
    +SOMBERLY
    +SOME
    +SOMEBODY
    +SOMEDAY
    +SOMEHOW
    +SOMEONE
    +SOMEPLACE
    +SOMERSAULT
    +SOMETHING
    +SOMETIME
    +SOMETIMES
    +SOMEWAY
    +SOMEWHAT
    +SOMEWHERE
    +SONATA
    +SONG
    +SONGWRITER
    +SONIC
    +SONNET
    +SOON
    +SOOT
    +SOOTHE
    +SOOTHING
    +SOOTHINGLY
    +SOPHISTICATED
    +SOPHISTICATION
    +SOPHOMORE
    +SOPHOMORIC
    +SOPORIFIC
    +SOPPING
    +SOPRANO
    +SORBET
    +SORCERER
    +SORCERESS
    +SORCERY
    +SORDID
    +SORE
    +SORELY
    +SORENESS
    +SORORITY
    +SORROW
    +SORROWFUL
    +SORROWFULLY
    +SORRY
    +SORT
    +SOUFFLE
    +SOUGHT
    +SOUL
    +SOULFUL
    +SOUND
    +SOUNDLY
    +SOUNDNESS
    +SOUNDPROOF
    +SOUNDTRACK
    +SOUP
    +SOUR
    +SOURCE
    +SOURDOUGH
    +SOURLY
    +SOURNESS
    +SOUTH
    +SOUTHBOUND
    +SOUTHEAST
    +SOUTHEASTERLY
    +SOUTHEASTERN
    +SOUTHEASTWARD
    +SOUTHERLY
    +SOUTHERN
    +SOUTHERNER
    +SOUTHWEST
    +SOUTHWESTERLY
    +SOUTHWESTERN
    +SOUTHWESTWARD
    +SOUVENIR
    +SOVEREIGN
    +SOVEREIGNTY
    +SOVIET
    +SOWN
    +SOYBEAN
    +SPACE
    +SPACECRAFT
    +SPACESHIP
    +SPACEY
    +SPACING
    +SPACIOUS
    +SPACIOUSNESS
    +SPADE
    +SPADES
    +SPAGHETTI
    +SPAN
    +SPANGLE
    +SPANIEL
    +SPANISH
    +SPANK
    +SPANKING
    +SPAR
    +SPARE
    +SPARINGLY
    +SPARK
    +SPARKLE
    +SPARKLER
    +SPARKLING
    +SPARROW
    +SPARSE
    +SPARSELY
    +SPARSENESS
    +SPARTAN
    +SPASM
    +SPASMODIC
    +SPASTIC
    +SPAT
    +SPATE
    +SPATIAL
    +SPATTER
    +SPATULA
    +SPAWN
    +SPEAK
    +SPEAKER
    +SPEAR
    +SPEARHEAD
    +SPEARMINT
    +SPECIAL
    +SPECIALIST
    +SPECIALIZATION
    +SPECIALIZE
    +SPECIALIZED
    +SPECIALLY
    +SPECIALTY
    +SPECIES
    +SPECIFIC
    +SPECIFICALLY
    +SPECIFICATION
    +SPECIFICS
    +SPECIFY
    +SPECIMEN
    +SPECIOUS
    +SPECK
    +SPECKLED
    +SPECTACLE
    +SPECTACLES
    +SPECTACULAR
    +SPECTACULARLY
    +SPECTATOR
    +SPECTER
    +SPECTRA
    +SPECTRUM
    +SPECULATE
    +SPECULATION
    +SPECULATIVE
    +SPECULATOR
    +SPED
    +SPEECH
    +SPEECHLESS
    +SPEED
    +SPEEDBOAT
    +SPEEDILY
    +SPEEDING
    +SPEEDOMETER
    +SPEEDWAY
    +SPEEDY
    +SPELL
    +SPELLBOUND
    +SPELLING
    +SPELT
    +SPEND
    +SPENDING
    +SPENDTHRIFT
    +SPENT
    +SPERM
    +SPEW
    +SPHERE
    +SPHERICAL
    +SPHINX
    +SPICE
    +SPICY
    +SPIDER
    +SPIEL
    +SPIFFY
    +SPIKE
    +SPILL
    +SPIN
    +SPINACH
    +SPINAL
    +SPINDLY
    +SPINE
    +SPINELESS
    +SPINSTER
    +SPIRAL
    +SPIRE
    +SPIRIT
    +SPIRITED
    +SPIRITS
    +SPIRITUAL
    +SPIRITUALLY
    +SPIT
    +SPITE
    +SPITEFUL
    +SPLASH
    +SPLASHY
    +SPLAT
    +SPLATTER
    +SPLAY
    +SPLENDID
    +SPLENDIDLY
    +SPLENDOR
    +SPLINT
    +SPLINTER
    +SPLIT
    +SPLITTING
    +SPLURGE
    +SPOIL
    +SPOILED
    +SPOILS
    +SPOILSPORT
    +SPOKE
    +SPOKEN
    +SPOKESMAN
    +SPOKESPERSON
    +SPOKESWOMAN
    +SPONGE
    +SPONSOR
    +SPONSORSHIP
    +SPONTANEITY
    +SPONTANEOUS
    +SPONTANEOUSLY
    +SPOOF
    +SPOOK
    +SPOOKY
    +SPOOL
    +SPOON
    +SPOONFUL
    +SPORADIC
    +SPORADICALLY
    +SPORT
    +SPORTING
    +SPORTS
    +SPORTSCAST
    +SPORTSMAN
    +SPORTSMANSHIP
    +SPORTSWEAR
    +SPORTY
    +SPOT
    +SPOTLESS
    +SPOTLIGHT
    +SPOTTY
    +SPOUSE
    +SPOUT
    +SPRAIN
    +SPRANG
    +SPRAWL
    +SPRAWLED
    +SPRAWLING
    +SPRAY
    +SPREAD
    +SPREADSHEET
    +SPREE
    +SPRIG
    +SPRING
    +SPRINGBOARD
    +SPRINGTIME
    +SPRINGY
    +SPRINKLE
    +SPRINKLER
    +SPRINT
    +SPRINTER
    +SPROUT
    +SPRUCE
    +SPRUNG
    +SPRY
    +SPUD
    +SPUN
    +SPUNKY
    +SPUR
    +SPURIOUS
    +SPURN
    +SPURT
    +SPUTTER
    +SQUABBLE
    +SQUAD
    +SQUADRON
    +SQUALID
    +SQUALL
    +SQUALOR
    +SQUANDER
    +SQUARE
    +SQUARELY
    +SQUASH
    +SQUAT
    +SQUATTER
    +SQUAWK
    +SQUEAK
    +SQUEAKY
    +SQUEAL
    +SQUEAMISH
    +SQUEEZE
    +SQUELCH
    +SQUID
    +SQUINT
    +SQUIRE
    +SQUIRM
    +SQUIRREL
    +SQUIRT
    +STAB
    +STABBING
    +STABILITY
    +STABILIZE
    +STABLE
    +STACK
    +STACKS
    +STADIA
    +STADIUM
    +STAFF
    +STAFFER
    +STAFFING
    +STAG
    +STAGE
    +STAGECOACH
    +STAGGER
    +STAGGERING
    +STAGGERINGLY
    +STAGING
    +STAGNANT
    +STAGNATE
    +STAGNATION
    +STAID
    +STAIN
    +STAIR
    +STAIRCASE
    +STAIRS
    +STAIRWAY
    +STAKE
    +STAKEOUT
    +STAKES
    +STALE
    +STALEMATE
    +STALK
    +STALKER
    +STALKING
    +STALL
    +STALLION
    +STALWART
    +STAMINA
    +STAMMER
    +STAMP
    +STAMPEDE
    +STANCE
    +STANCH
    +STAND
    +STANDARD
    +STANDARDIZATION
    +STANDARDIZE
    +STANDBY
    +STANDING
    +STANDOFF
    +STANDOUT
    +STANDPOINT
    +STANDS
    +STANDSTILL
    +STANK
    +STAPLE
    +STAPLER
    +STAR
    +STARBOARD
    +STARCH
    +STARCHY
    +STARDOM
    +STARE
    +STARFISH
    +STARK
    +START
    +STARTER
    +STARTLE
    +STARTLED
    +STARTLING
    +STARVATION
    +STARVE
    +STARVING
    +STASH
    +STAT
    +STATE
    +STATELY
    +STATEMENT
    +STATESMAN
    +STATESMANLIKE
    +STATESMANSHIP
    +STATEWIDE
    +STATIC
    +STATION
    +STATIONARY
    +STATIONERY
    +STATISTIC
    +STATISTICAL
    +STATISTICALLY
    +STATISTICIAN
    +STATISTICS
    +STATUE
    +STATURE
    +STATUS
    +STATUTE
    +STATUTORY
    +STAUNCH
    +STAVE
    +STAY
    +STEADFAST
    +STEADY
    +STEAK
    +STEAL
    +STEALTH
    +STEALTHILY
    +STEALTHY
    +STEAM
    +STEAMBOAT
    +STEAMROLL
    +STEAMROLLER
    +STEAMY
    +STEEL
    +STEEP
    +STEEPLE
    +STEEPLY
    +STEEPNESS
    +STEER
    +STEERING
    +STELLAR
    +STEM
    +STENCH
    +STENCIL
    +STENOGRAPHER
    +STENOGRAPHY
    +STEP
    +STEPBROTHER
    +STEPCHILD
    +STEPCHILDREN
    +STEPDAUGHTER
    +STEPFATHER
    +STEPLADDER
    +STEPMOTHER
    +STEPSISTER
    +STEPSON
    +STEREO
    +STEREOTYPE
    +STEREOTYPICAL
    +STERILE
    +STERILITY
    +STERILIZATION
    +STERILIZE
    +STERLING
    +STERN
    +STERNLY
    +STEROID
    +STETHOSCOPE
    +STEW
    +STEWARD
    +STEWARDESS
    +STICK
    +STICKER
    +STICKLER
    +STICKS
    +STICKY
    +STIFF
    +STIFFEN
    +STIFFLY
    +STIFFNESS
    +STIFLE
    +STIFLING
    +STIGMA
    +STIGMATIZE
    +STILL
    +STILLBIRTH
    +STILLBORN
    +STILLNESS
    +STILT
    +STILTED
    +STILTS
    +STIMULANT
    +STIMULATE
    +STIMULATING
    +STIMULATION
    +STIMULI
    +STIMULUS
    +STING
    +STINGINESS
    +STINGY
    +STINK
    +STINKER
    +STINKING
    +STINT
    +STIPEND
    +STIPULATE
    +STIPULATION
    +STIR
    +STIRRUP
    +STITCH
    +STITCHING
    +STOCK
    +STOCKADE
    +STOCKBROKER
    +STOCKHOLDER
    +STOCKING
    +STOCKPILE
    +STOCKY
    +STOCKYARD
    +STODGY
    +STOIC
    +STOICAL
    +STOICISM
    +STOKE
    +STOLE
    +STOLEN
    +STOLID
    +STOLIDLY
    +STOMACH
    +STOMACHACHE
    +STOMP
    +STONE
    +STONED
    +STONEWALL
    +STONY
    +STOOD
    +STOOL
    +STOOP
    +STOP
    +STOPGAP
    +STOPLIGHT
    +STOPOVER
    +STOPPAGE
    +STOPPER
    +STOPWATCH
    +STORAGE
    +STORE
    +STOREHOUSE
    +STOREKEEPER
    +STOREROOM
    +STOREY
    +STORK
    +STORM
    +STORMY
    +STORY
    +STORYTELLER
    +STOUT
    +STOVE
    +STOW
    +STOWAWAY
    +STRADDLE
    +STRAGGLE
    +STRAIGHT
    +STRAIGHTEN
    +STRAIGHTFORWARD
    +STRAIN
    +STRAINED
    +STRAINER
    +STRAIT
    +STRAITJACKET
    +STRAND
    +STRANDED
    +STRANGE
    +STRANGELY
    +STRANGENESS
    +STRANGER
    +STRANGLE
    +STRANGLEHOLD
    +STRANGULATION
    +STRAP
    +STRAPLESS
    +STRAPPED
    +STRATA
    +STRATEGIC
    +STRATEGICALLY
    +STRATEGY
    +STRATIFY
    +STRATOSPHERE
    +STRATUM
    +STRAW
    +STRAWBERRY
    +STRAY
    +STREAK
    +STREAKY
    +STREAM
    +STREAMER
    +STREAMLINE
    +STREAMLINED
    +STREET
    +STREETCAR
    +STREETLIGHT
    +STRENGTH
    +STRENGTHEN
    +STRENUOUS
    +STRENUOUSLY
    +STRESS
    +STRESSED
    +STRESSFUL
    +STRETCH
    +STRETCHER
    +STREW
    +STREWN
    +STRICKEN
    +STRICT
    +STRICTLY
    +STRIDDEN
    +STRIDE
    +STRIDENT
    +STRIFE
    +STRIKE
    +STRIKER
    +STRIKING
    +STRIKINGLY
    +STRING
    +STRINGENT
    +STRINGS
    +STRIP
    +STRIPE
    +STRIPED
    +STRIPPER
    +STRIPTEASE
    +STRIVE
    +STRIVEN
    +STRODE
    +STROKE
    +STROLL
    +STROLLER
    +STRONG
    +STRONGHOLD
    +STRONGLY
    +STROVE
    +STRUCK
    +STRUCTURAL
    +STRUCTURE
    +STRUGGLE
    +STRUM
    +STRUNG
    +STRUT
    +STUB
    +STUBBLE
    +STUBBORN
    +STUBBORNLY
    +STUBBORNNESS
    +STUCK
    +STUD
    +STUDDED
    +STUDENT
    +STUDIED
    +STUDIES
    +STUDIO
    +STUDIOUS
    +STUDY
    +STUFF
    +STUFFING
    +STUFFY
    +STUMBLE
    +STUMP
    +STUN
    +STUNG
    +STUNK
    +STUNNED
    +STUNNING
    +STUNT
    +STUPEFIED
    +STUPEFY
    +STUPENDOUS
    +STUPID
    +STUPIDITY
    +STUPIDLY
    +STUPOR
    +STURDINESS
    +STURDY
    +STUTTER
    +STYLE
    +STYLISH
    +STYMIE
    +STYROFOAM
    +SUAVE
    +SUBCOMMITTEE
    +SUBCONSCIOUS
    +SUBCONSCIOUSLY
    +SUBCULTURE
    +SUBDIVIDE
    +SUBDIVISION
    +SUBDUE
    +SUBDUED
    +SUBJECT
    +SUBJECTIVE
    +SUBJECTIVELY
    +SUBJUGATE
    +SUBJUNCTIVE
    +SUBLET
    +SUBLIME
    +SUBLIMINAL
    +SUBMARINE
    +SUBMERGE
    +SUBMERGED
    +SUBMERSION
    +SUBMISSION
    +SUBMISSIVE
    +SUBMIT
    +SUBORDINATE
    +SUBORDINATION
    +SUBPOENA
    +SUBSCRIBE
    +SUBSCRIBER
    +SUBSCRIPTION
    +SUBSEQUENT
    +SUBSEQUENTLY
    +SUBSERVIENCE
    +SUBSERVIENT
    +SUBSIDE
    +SUBSIDIARY
    +SUBSIDIZE
    +SUBSIDIZED
    +SUBSIDY
    +SUBSIST
    +SUBSISTENCE
    +SUBSTANCE
    +SUBSTANDARD
    +SUBSTANTIAL
    +SUBSTANTIALLY
    +SUBSTANTIATE
    +SUBSTITUTE
    +SUBSTITUTION
    +SUBTERFUGE
    +SUBTERRANEAN
    +SUBTITLES
    +SUBTLE
    +SUBTLETY
    +SUBTLY
    +SUBTRACT
    +SUBTRACTION
    +SUBURB
    +SUBURBAN
    +SUBURBIA
    +SUBVERSIVE
    +SUBVERT
    +SUBWAY
    +SUCCEED
    +SUCCESS
    +SUCCESSFUL
    +SUCCESSFULLY
    +SUCCESSION
    +SUCCESSIVE
    +SUCCESSIVELY
    +SUCCESSOR
    +SUCCINCT
    +SUCCINCTLY
    +SUCCOR
    +SUCCULENT
    +SUCCUMB
    +SUCH
    +SUCK
    +SUCKER
    +SUCTION
    +SUDDEN
    +SUDDENLY
    +SUDDENNESS
    +SUDS
    +SUEDE
    +SUFFER
    +SUFFERER
    +SUFFERING
    +SUFFICE
    +SUFFICIENCY
    +SUFFICIENT
    +SUFFICIENTLY
    +SUFFIX
    +SUFFOCATE
    +SUFFOCATING
    +SUFFOCATION
    +SUGAR
    +SUGARY
    +SUGGEST
    +SUGGESTIBLE
    +SUGGESTION
    +SUGGESTIVE
    +SUGGESTIVELY
    +SUICIDAL
    +SUICIDE
    +SUIT
    +SUITABILITY
    +SUITABLE
    +SUITABLY
    +SUITCASE
    +SUITE
    +SUITOR
    +SULFUR
    +SULK
    +SULKY
    +SULLEN
    +SULLENLY
    +SULTAN
    +SULTRY
    +SUMMARIZE
    +SUMMARY
    +SUMMER
    +SUMMERTIME
    +SUMMERY
    +SUMMIT
    +SUMMON
    +SUMMONS
    +SUMPTUOUS
    +SUNBATHE
    +SUNBATHING
    +SUNBLOCK
    +SUNBURN
    +SUNBURNED
    +SUNBURNT
    +SUNDAE
    +SUNDAY
    +SUNDOWN
    +SUNDRY
    +SUNFLOWER
    +SUNG
    +SUNGLASSES
    +SUNK
    +SUNKEN
    +SUNLIGHT
    +SUNLIT
    +SUNNY
    +SUNRISE
    +SUNSCREEN
    +SUNSET
    +SUNSHINE
    +SUNTAN
    +SUNUP
    +SUPER
    +SUPERB
    +SUPERBLY
    +SUPERFICIAL
    +SUPERFICIALLY
    +SUPERFLUOUS
    +SUPERHIGHWAY
    +SUPERHUMAN
    +SUPERINTENDENT
    +SUPERIOR
    +SUPERIORITY
    +SUPERLATIVE
    +SUPERMARKET
    +SUPERNATURAL
    +SUPERPOWER
    +SUPERSEDE
    +SUPERSONIC
    +SUPERSTAR
    +SUPERSTITION
    +SUPERSTITIOUS
    +SUPERSTRUCTURE
    +SUPERVISE
    +SUPERVISION
    +SUPERVISOR
    +SUPERVISORY
    +SUPPER
    +SUPPLANT
    +SUPPLE
    +SUPPLEMENT
    +SUPPLEMENTAL
    +SUPPLEMENTARY
    +SUPPLIER
    +SUPPLIES
    +SUPPLY
    +SUPPORT
    +SUPPORTER
    +SUPPORTIVE
    +SUPPOSE
    +SUPPOSED
    +SUPPOSEDLY
    +SUPPOSING
    +SUPPOSITION
    +SUPPRESS
    +SUPPRESSION
    +SUPREMACY
    +SUPREME
    +SUPREMELY
    +SURCHARGE
    +SURE
    +SUREFIRE
    +SURELY
    +SURF
    +SURFACE
    +SURFBOARD
    +SURFER
    +SURFING
    +SURGE
    +SURGEON
    +SURGERY
    +SURGICAL
    +SURGICALLY
    +SURLY
    +SURMISE
    +SURMOUNT
    +SURPASS
    +SURPLUS
    +SURPRISE
    +SURPRISED
    +SURPRISING
    +SURPRISINGLY
    +SURREAL
    +SURREALISTIC
    +SURRENDER
    +SURREPTITIOUS
    +SURROGATE
    +SURROUND
    +SURROUNDING
    +SURROUNDINGS
    +SURVEILLANCE
    +SURVEY
    +SURVIVAL
    +SURVIVE
    +SURVIVOR
    +SUSCEPTIBLE
    +SUSPECT
    +SUSPEND
    +SUSPENDERS
    +SUSPENSE
    +SUSPENSION
    +SUSPICION
    +SUSPICIOUS
    +SUSPICIOUSLY
    +SUSTAIN
    +SUSTAINED
    +SWAB
    +SWAGGER
    +SWALLOW
    +SWAM
    +SWAMP
    +SWAN
    +SWANK
    +SWAP
    +SWARM
    +SWARTHY
    +SWAT
    +SWATCH
    +SWAY
    +SWEAR
    +SWEAT
    +SWEATER
    +SWEATPANTS
    +SWEATS
    +SWEATSHIRT
    +SWEATSHOP
    +SWEATY
    +SWEEP
    +SWEEPER
    +SWEEPING
    +SWEEPSTAKES
    +SWEET
    +SWEETEN
    +SWEETENER
    +SWEETHEART
    +SWEETIE
    +SWEETLY
    +SWEETNESS
    +SWEETS
    +SWELL
    +SWELLING
    +SWELTERING
    +SWEPT
    +SWERVE
    +SWIFT
    +SWIFTLY
    +SWIM
    +SWIMMER
    +SWIMMING
    +SWIMSUIT
    +SWINDLE
    +SWINDLER
    +SWINE
    +SWING
    +SWINGING
    +SWIPE
    +SWIRL
    +SWISH
    +SWISS
    +SWITCH
    +SWITCHBOARD
    +SWIVEL
    +SWOLLEN
    +SWOON
    +SWOOP
    +SWORD
    +SWORDFISH
    +SWORE
    +SWORN
    +SWUM
    +SWUNG
    +SYCAMORE
    +SYCOPHANT
    +SYLLABI
    +SYLLABLE
    +SYLLABUS
    +SYMBOL
    +SYMBOLIC
    +SYMBOLICALLY
    +SYMBOLISM
    +SYMBOLIZE
    +SYMMETRICAL
    +SYMMETRICALLY
    +SYMMETRY
    +SYMPATHETIC
    +SYMPATHETICALLY
    +SYMPATHIES
    +SYMPATHIZE
    +SYMPATHIZER
    +SYMPATHY
    +SYMPHONY
    +SYMPTOM
    +SYNAGOGUE
    +SYNC
    +SYNCHRONIZE
    +SYNDICATE
    +SYNDICATED
    +SYNDICATION
    +SYNDROME
    +SYNOD
    +SYNONYM
    +SYNONYMOUS
    +SYNOPSES
    +SYNOPSIS
    +SYNTAX
    +SYNTHESES
    +SYNTHESIS
    +SYNTHESIZE
    +SYNTHESIZER
    +SYNTHETIC
    +SYNTHETICALLY
    +SYPHILIS
    +SYRINGE
    +SYRUP
    +SYSTEM
    +SYSTEMATIC
    +SYSTEMATICALLY
    +TABBY
    +TABERNACLE
    +TABLE
    +TABLECLOTH
    +TABLESPOON
    +TABLESPOONFUL
    +TABLET
    +TABLOID
    +TABOO
    +TABULATE
    +TABULATION
    +TACIT
    +TACITLY
    +TACITURN
    +TACK
    +TACKINESS
    +TACKLE
    +TACKY
    +TACO
    +TACT
    +TACTFUL
    +TACTFULLY
    +TACTIC
    +TACTICAL
    +TACTICALLY
    +TACTICS
    +TADPOLE
    +TAFFY
    +TAIL
    +TAILGATE
    +TAILLIGHT
    +TAILOR
    +TAILORING
    +TAILPIPE
    +TAILS
    +TAILSPIN
    +TAINT
    +TAINTED
    +TAIWANESE
    +TAKE
    +TAKEN
    +TAKEOFF
    +TAKEOUT
    +TAKEOVER
    +TAKING
    +TALE
    +TALENT
    +TALENTED
    +TALISMAN
    +TALK
    +TALKATIVE
    +TALKER
    +TALKS
    +TALL
    +TALLOW
    +TALLY
    +TALMUD
    +TALON
    +TAMBOURINE
    +TAME
    +TAMPER
    +TAMPON
    +TANDEM
    +TANGENT
    +TANGENTIAL
    +TANGERINE
    +TANGIBLE
    +TANGLE
    +TANGLED
    +TANGO
    +TANGY
    +TANK
    +TANKARD
    +TANKER
    +TANNED
    +TANTALIZE
    +TANTALIZING
    +TANTALIZINGLY
    +TANTAMOUNT
    +TANTRUM
    +TAPE
    +TAPER
    +TAPERED
    +TAPESTRY
    +TAPEWORM
    +TAPS
    +TARANTULA
    +TARDINESS
    +TARDY
    +TARGET
    +TARIFF
    +TARMAC
    +TARNISH
    +TAROT
    +TARP
    +TARPAULIN
    +TARRY
    +TART
    +TARTAN
    +TARTAR
    +TASK
    +TASSEL
    +TASTE
    +TASTEFUL
    +TASTEFULLY
    +TASTELESS
    +TASTER
    +TASTY
    +TATTERED
    +TATTLE
    +TATTLETALE
    +TATTOO
    +TAUGHT
    +TAUNT
    +TAURUS
    +TAUT
    +TAUTLY
    +TAVERN
    +TAWDRY
    +TAWNY
    +TAXABLE
    +TAXATION
    +TAXI
    +TAXIDERMY
    +TAXING
    +TAXPAYER
    +TEACH
    +TEACHER
    +TEACHING
    +TEACUP
    +TEAK
    +TEAKETTLE
    +TEAM
    +TEAMMATE
    +TEAMSTER
    +TEAMWORK
    +TEAPOT
    +TEAR
    +TEARDROP
    +TEARFUL
    +TEARGAS
    +TEASE
    +TEASPOON
    +TEASPOONFUL
    +TEAT
    +TECHNICAL
    +TECHNICALITY
    +TECHNICALLY
    +TECHNICIAN
    +TECHNIQUE
    +TECHNOLOGICAL
    +TECHNOLOGIST
    +TECHNOLOGY
    +TEDIOUS
    +TEDIUM
    +TEEM
    +TEEN
    +TEENAGE
    +TEENAGED
    +TEENAGER
    +TEENS
    +TEETER
    +TEETH
    +TEETHE
    +TEETOTALER
    +TEFLON
    +TELECOMMUNICATIONS
    +TELECOMMUTER
    +TELECOMMUTING
    +TELEGRAM
    +TELEGRAPH
    +TELEPATHY
    +TELEPHONE
    +TELESCOPE
    +TELESCOPIC
    +TELETHON
    +TELEVISE
    +TELEVISION
    +TELL
    +TELLER
    +TELLING
    +TELLTALE
    +TEMP
    +TEMPER
    +TEMPERAMENT
    +TEMPERAMENTAL
    +TEMPERANCE
    +TEMPERATE
    +TEMPERATURE
    +TEMPEST
    +TEMPESTUOUS
    +TEMPLATE
    +TEMPLE
    +TEMPO
    +TEMPORARILY
    +TEMPORARY
    +TEMPT
    +TEMPTATION
    +TEMPTING
    +TENACIOUS
    +TENACITY
    +TENANCY
    +TENANT
    +TEND
    +TENDENCY
    +TENDER
    +TENDERHEARTED
    +TENDERIZE
    +TENDERLY
    +TENDERNESS
    +TENDON
    +TENDRIL
    +TENEMENT
    +TENET
    +TENNIS
    +TENOR
    +TENSE
    +TENSION
    +TENT
    +TENTACLE
    +TENTATIVE
    +TENTATIVELY
    +TENTH
    +TENUOUS
    +TENURE
    +TEPEE
    +TEPID
    +TEQUILA
    +TERM
    +TERMINAL
    +TERMINALLY
    +TERMINATE
    +TERMINATION
    +TERMINOLOGY
    +TERMINUS
    +TERMITE
    +TERMS
    +TERRACE
    +TERRAIN
    +TERRESTRIAL
    +TERRIBLE
    +TERRIBLY
    +TERRIER
    +TERRIFIC
    +TERRIFIED
    +TERRIFY
    +TERRIFYING
    +TERRITORIAL
    +TERRITORY
    +TERROR
    +TERRORISM
    +TERRORIST
    +TERRORIZE
    +TERSE
    +TERSELY
    +TEST
    +TESTAMENT
    +TESTES
    +TESTICLE
    +TESTIFY
    +TESTIMONIAL
    +TESTIMONY
    +TESTY
    +TETANUS
    +TETHER
    +TEXT
    +TEXTBOOK
    +TEXTILE
    +TEXTURE
    +THAN
    +THANK
    +THANKFUL
    +THANKFULLY
    +THANKLESS
    +THANKS
    +THANKSGIVING
    +THAT
    +THATCH
    +THAW
    +THEATER
    +THEATRICAL
    +THEFT
    +THEIR
    +THEIRS
    +THEM
    +THEMATIC
    +THEME
    +THEMSELVES
    +THEN
    +THEOLOGIAN
    +THEOLOGICAL
    +THEOLOGY
    +THEORETICAL
    +THEORETICALLY
    +THEORETICIAN
    +THEORIST
    +THEORIZE
    +THEORY
    +THERAPEUTIC
    +THERAPIST
    +THERAPY
    +THERE
    +THEREABOUT
    +THEREABOUTS
    +THEREAFTER
    +THEREBY
    +THEREFORE
    +THEREIN
    +THEREOF
    +THEREUPON
    +THERMAL
    +THERMOMETER
    +THERMONUCLEAR
    +THERMOS
    +THERMOSTAT
    +THESAURI
    +THESAURUS
    +THESE
    +THESES
    +THESIS
    +THEY
    +THICK
    +THICKEN
    +THICKET
    +THICKLY
    +THICKNESS
    +THIEF
    +THIEVES
    +THIGH
    +THIMBLE
    +THIN
    +THING
    +THINGAMAJIG
    +THINGS
    +THINK
    +THINKER
    +THINKING
    +THINLY
    +THIRD
    +THIRST
    +THIRSTILY
    +THIRSTY
    +THIRTEEN
    +THIRTEENTH
    +THIRTIETH
    +THIRTY
    +THIS
    +THISTLE
    +THONG
    +THORN
    +THORNY
    +THOROUGH
    +THOROUGHBRED
    +THOROUGHFARE
    +THOROUGHLY
    +THOROUGHNESS
    +THOSE
    +THOUGH
    +THOUGHT
    +THOUGHTFUL
    +THOUGHTFULLY
    +THOUGHTFULNESS
    +THOUGHTLESS
    +THOUGHTLESSLY
    +THOUGHTLESSNESS
    +THOUSAND
    +THOUSANDTH
    +THRASH
    +THRASHING
    +THREAD
    +THREADBARE
    +THREAT
    +THREATEN
    +THREATENING
    +THREATENINGLY
    +THREE
    +THRESH
    +THRESHER
    +THRESHOLD
    +THREW
    +THRIFT
    +THRIFTY
    +THRILL
    +THRILLED
    +THRILLER
    +THRILLING
    +THRIVE
    +THRIVING
    +THROAT
    +THROATY
    +THROB
    +THRONE
    +THRONG
    +THROTTLE
    +THROUGH
    +THROUGHOUT
    +THROVE
    +THROW
    +THROWAWAY
    +THROWBACK
    +THROWN
    +THRUST
    +THUD
    +THUG
    +THUMB
    +THUMBNAIL
    +THUMBTACK
    +THUMP
    +THUNDER
    +THUNDERBOLT
    +THUNDEROUS
    +THUNDERSTORM
    +THUNDERSTRUCK
    +THURSDAY
    +THUS
    +THWART
    +THYROID
    +TIARA
    +TICK
    +TICKET
    +TICKLE
    +TICKLISH
    +TIDAL
    +TIDBIT
    +TIDE
    +TIDY
    +TIEBREAKER
    +TIER
    +TIFF
    +TIGER
    +TIGHT
    +TIGHTEN
    +TIGHTFISTED
    +TIGHTLY
    +TIGHTNESS
    +TIGHTROPE
    +TIGHTS
    +TIGHTWAD
    +TILE
    +TILL
    +TILT
    +TIMBER
    +TIME
    +TIMEKEEPER
    +TIMELESS
    +TIMELY
    +TIMER
    +TIMES
    +TIMETABLE
    +TIMID
    +TIMIDITY
    +TIMIDLY
    +TIMING
    +TINDER
    +TINDERBOX
    +TINFOIL
    +TINGE
    +TINGED
    +TINGLE
    +TINGLING
    +TINKER
    +TINKLE
    +TINNY
    +TINSEL
    +TINT
    +TINY
    +TIPSY
    +TIPTOE
    +TIRADE
    +TIRE
    +TIRED
    +TIREDNESS
    +TIRELESS
    +TIRESOME
    +TIRING
    +TISSUE
    +TITILLATE
    +TITLE
    +TITTER
    +TIZZY
    +TOAD
    +TOADSTOOL
    +TOAST
    +TOASTER
    +TOASTY
    +TOBACCO
    +TOBACCONIST
    +TOBOGGAN
    +TODAY
    +TODDLE
    +TODDLER
    +TOEFL
    +TOEHOLD
    +TOENAIL
    +TOFFEE
    +TOFU
    +TOGA
    +TOGETHER
    +TOGETHERNESS
    +TOGGLE
    +TOGS
    +TOIL
    +TOILET
    +TOILETRIES
    +TOKEN
    +TOKENISM
    +TOLD
    +TOLERABLE
    +TOLERANCE
    +TOLERANT
    +TOLERATE
    +TOLL
    +TOLLBOOTH
    +TOLLGATE
    +TOMAHAWK
    +TOMATO
    +TOMB
    +TOMBOY
    +TOMBSTONE
    +TOMCAT
    +TOME
    +TOMFOOLERY
    +TOMORROW
    +TONE
    +TONGS
    +TONGUE
    +TONIC
    +TONIGHT
    +TONNAGE
    +TONS
    +TONSIL
    +TONSILLITIS
    +TOOK
    +TOOL
    +TOOLBAR
    +TOOT
    +TOOTH
    +TOOTHACHE
    +TOOTHBRUSH
    +TOOTHPASTE
    +TOOTHPICK
    +TOPIC
    +TOPICAL
    +TOPLESS
    +TOPOGRAPHER
    +TOPOGRAPHY
    +TOPPING
    +TOPPLE
    +TORCH
    +TORE
    +TORMENT
    +TORMENTOR
    +TORN
    +TORNADO
    +TORPEDO
    +TORRENT
    +TORRENTIAL
    +TORRID
    +TORSO
    +TORT
    +TORTILLA
    +TORTOISE
    +TORTUOUS
    +TORTURE
    +TORTURER
    +TOSS
    +TOTAL
    +TOTALITARIAN
    +TOTALITARIANISM
    +TOTALITY
    +TOTALLY
    +TOTE
    +TOTTER
    +TOUCAN
    +TOUCH
    +TOUCHDOWN
    +TOUCHED
    +TOUCHING
    +TOUCHSTONE
    +TOUCHY
    +TOUGH
    +TOUGHEN
    +TOUGHNESS
    +TOUPEE
    +TOUR
    +TOURISM
    +TOURIST
    +TOURNAMENT
    +TOURNIQUET
    +TOUSLE
    +TOUT
    +TOWARD
    +TOWARDS
    +TOWEL
    +TOWER
    +TOWERING
    +TOWN
    +TOWNHOUSE
    +TOWNSHIP
    +TOXIC
    +TOXICITY
    +TOXICOLOGY
    +TOXIN
    +TRACE
    +TRACER
    +TRACK
    +TRACT
    +TRACTION
    +TRACTOR
    +TRADE
    +TRADEMARK
    +TRADER
    +TRADITION
    +TRADITIONAL
    +TRADITIONALIST
    +TRADITIONALLY
    +TRAFFIC
    +TRAGEDY
    +TRAGIC
    +TRAGICALLY
    +TRAIL
    +TRAILBLAZER
    +TRAILER
    +TRAIN
    +TRAINED
    +TRAINEE
    +TRAINER
    +TRAINING
    +TRAIT
    +TRAITOR
    +TRAJECTORY
    +TRAMP
    +TRAMPLE
    +TRAMPOLINE
    +TRANCE
    +TRANQUIL
    +TRANQUILITY
    +TRANQUILIZE
    +TRANQUILIZER
    +TRANSACT
    +TRANSACTION
    +TRANSATLANTIC
    +TRANSCEND
    +TRANSCENDENCE
    +TRANSCENDENTAL
    +TRANSCONTINENTAL
    +TRANSCRIBE
    +TRANSCRIPT
    +TRANSCRIPTION
    +TRANSFER
    +TRANSFERABLE
    +TRANSFORM
    +TRANSFORMATION
    +TRANSFORMER
    +TRANSFUSION
    +TRANSGRESS
    +TRANSGRESSION
    +TRANSIENT
    +TRANSISTOR
    +TRANSIT
    +TRANSITION
    +TRANSITIONAL
    +TRANSITIVE
    +TRANSITORY
    +TRANSLATE
    +TRANSLATION
    +TRANSLATOR
    +TRANSLUCENCE
    +TRANSLUCENT
    +TRANSMISSION
    +TRANSMIT
    +TRANSMITTER
    +TRANSPARENCY
    +TRANSPARENT
    +TRANSPARENTLY
    +TRANSPIRE
    +TRANSPLANT
    +TRANSPORT
    +TRANSPORTATION
    +TRANSPOSE
    +TRANSSEXUAL
    +TRANSVESTITE
    +TRAP
    +TRAPEZE
    +TRAPPER
    +TRAPPINGS
    +TRASH
    +TRASHY
    +TRAUMA
    +TRAUMATIC
    +TRAUMATIZE
    +TRAVEL
    +TRAVELER
    +TRAVELS
    +TRAVERSE
    +TRAVESTY
    +TRAWL
    +TRAWLER
    +TRAY
    +TREACHEROUS
    +TREACHERY
    +TREAD
    +TREADMILL
    +TREASON
    +TREASURE
    +TREASURER
    +TREASURY
    +TREAT
    +TREATABLE
    +TREATISE
    +TREATMENT
    +TREATY
    +TREBLE
    +TREE
    +TREETOP
    +TREK
    +TRELLIS
    +TREMBLE
    +TREMENDOUS
    +TREMENDOUSLY
    +TREMOR
    +TRENCH
    +TRENCHANT
    +TREND
    +TRENDY
    +TREPIDATION
    +TRESPASS
    +TRESPASSER
    +TRESTLE
    +TRIAL
    +TRIALS
    +TRIANGLE
    +TRIANGULAR
    +TRIBAL
    +TRIBE
    +TRIBULATION
    +TRIBUNAL
    +TRIBUTARY
    +TRIBUTE
    +TRICEPS
    +TRICK
    +TRICKERY
    +TRICKLE
    +TRICKSTER
    +TRICKY
    +TRICYCLE
    +TRIDENT
    +TRIFLE
    +TRIFLING
    +TRIGGER
    +TRIGONOMETRY
    +TRIKE
    +TRILL
    +TRILLION
    +TRILOGY
    +TRIM
    +TRIMESTER
    +TRIMMINGS
    +TRINITY
    +TRINKET
    +TRIO
    +TRIP
    +TRIPE
    +TRIPLE
    +TRIPLET
    +TRIPLICATE
    +TRIPOD
    +TRITE
    +TRIUMPH
    +TRIUMPHANT
    +TRIUMPHANTLY
    +TRIVIA
    +TRIVIAL
    +TRIVIALIZE
    +TROD
    +TRODDEN
    +TROLL
    +TROLLEY
    +TROMBONE
    +TROMP
    +TROOP
    +TROOPER
    +TROOPS
    +TROPHY
    +TROPIC
    +TROPICAL
    +TROPICS
    +TROT
    +TROUBADOUR
    +TROUBLE
    +TROUBLED
    +TROUBLEMAKER
    +TROUBLESHOOTER
    +TROUBLESHOOTING
    +TROUBLESOME
    +TROUGH
    +TROUNCE
    +TROUPE
    +TROUSERS
    +TROUT
    +TRUANCY
    +TRUANT
    +TRUCE
    +TRUCK
    +TRUCKER
    +TRUCKING
    +TRUCKLOAD
    +TRUCULENT
    +TRUDGE
    +TRUE
    +TRUFFLE
    +TRUISM
    +TRULY
    +TRUMP
    +TRUMPET
    +TRUMPETER
    +TRUNCATED
    +TRUNDLE
    +TRUNK
    +TRUNKS
    +TRUST
    +TRUSTEE
    +TRUSTFUL
    +TRUSTING
    +TRUSTWORTHY
    +TRUTH
    +TRUTHFUL
    +TRUTHFULLY
    +TRYING
    +TRYOUT
    +TUBA
    +TUBBY
    +TUBE
    +TUBERCULOSIS
    +TUBING
    +TUBULAR
    +TUCK
    +TUESDAY
    +TUFT
    +TUFTED
    +TUGBOAT
    +TUITION
    +TULIP
    +TUMBLE
    +TUMBLER
    +TUMMY
    +TUMOR
    +TUMULT
    +TUMULTUOUS
    +TUNA
    +TUNDRA
    +TUNE
    +TUNER
    +TUNIC
    +TUNNEL
    +TURBAN
    +TURBINE
    +TURBULENCE
    +TURBULENT
    +TURD
    +TUREEN
    +TURF
    +TURGID
    +TURKEY
    +TURMOIL
    +TURN
    +TURNAROUND
    +TURNCOAT
    +TURNIP
    +TURNOUT
    +TURNOVER
    +TURNPIKE
    +TURNSTILE
    +TURNTABLE
    +TURPENTINE
    +TURQUOISE
    +TURRET
    +TURTLE
    +TURTLENECK
    +TUSH
    +TUSK
    +TUSSLE
    +TUTOR
    +TUTORIAL
    +TUTORING
    +TUXEDO
    +TWANG
    +TWEAK
    +TWEED
    +TWEET
    +TWEEZERS
    +TWELFTH
    +TWELVE
    +TWENTIETH
    +TWENTY
    +TWERP
    +TWICE
    +TWIDDLE
    +TWIG
    +TWILIGHT
    +TWIN
    +TWINE
    +TWINGE
    +TWINKLE
    +TWIRL
    +TWIST
    +TWISTED
    +TWISTER
    +TWIT
    +TWITCH
    +TWITTER
    +TYCOON
    +TYKE
    +TYLENOL
    +TYPE
    +TYPECAST
    +TYPEFACE
    +TYPEWRITER
    +TYPEWRITTEN
    +TYPHOID
    +TYPHOON
    +TYPICAL
    +TYPICALLY
    +TYPIFY
    +TYPING
    +TYPIST
    +TYPO
    +TYRANNICAL
    +TYRANNIZE
    +TYRANNY
    +TYRANT
    +UBIQUITOUS
    +UBIQUITY
    +UDDER
    +UGLINESS
    +UGLY
    +ULCER
    +ULTERIOR
    +ULTIMATE
    +ULTIMATELY
    +ULTIMATUM
    +ULTRASONIC
    +ULTRASOUND
    +ULTRAVIOLET
    +UMBRELLA
    +UMPIRE
    +UMPTEEN
    +UMPTEENTH
    +UNABASHED
    +UNABATED
    +UNABLE
    +UNABRIDGED
    +UNACCEPTABLE
    +UNACCEPTABLY
    +UNACCOMPANIED
    +UNACCOUNTABLE
    +UNACCOUNTABLY
    +UNADULTERATED
    +UNAFFECTED
    +UNAIDED
    +UNANIMITY
    +UNANIMOUS
    +UNANIMOUSLY
    +UNARMED
    +UNASSUMING
    +UNATTACHED
    +UNATTENDED
    +UNATTRACTIVE
    +UNAUTHORIZED
    +UNAVAILABLE
    +UNAVOIDABLE
    +UNAVOIDABLY
    +UNAWARE
    +UNAWARES
    +UNBALANCED
    +UNBEARABLE
    +UNBEARABLY
    +UNBEATABLE
    +UNBEATEN
    +UNBELIEVABLE
    +UNBELIEVABLY
    +UNBORN
    +UNBOUNDED
    +UNBRIDLED
    +UNBROKEN
    +UNBUTTON
    +UNCANNILY
    +UNCANNY
    +UNCERTAIN
    +UNCERTAINLY
    +UNCERTAINTY
    +UNCHANGED
    +UNCHARACTERISTIC
    +UNCHARACTERISTICALLY
    +UNCHARTED
    +UNCHECKED
    +UNCLE
    +UNCLEAN
    +UNCLEAR
    +UNCOMFORTABLE
    +UNCOMFORTABLY
    +UNCOMMON
    +UNCOMMONLY
    +UNCOMPROMISING
    +UNCONCERNED
    +UNCONDITIONAL
    +UNCONDITIONALLY
    +UNCONFIRMED
    +UNCONSCIONABLE
    +UNCONSCIOUS
    +UNCONSCIOUSLY
    +UNCONSCIOUSNESS
    +UNCONSTITUTIONAL
    +UNCONTROLLABLE
    +UNCONTROLLABLY
    +UNCONTROLLED
    +UNCONVENTIONAL
    +UNCOUTH
    +UNCOVER
    +UNCUT
    +UNDAUNTED
    +UNDECIDED
    +UNDENIABLE
    +UNDENIABLY
    +UNDER
    +UNDERAGE
    +UNDERCLASS
    +UNDERCLASSMAN
    +UNDERCOVER
    +UNDERCURRENT
    +UNDERCUT
    +UNDERDOG
    +UNDERESTIMATE
    +UNDERGO
    +UNDERGRAD
    +UNDERGRADUATE
    +UNDERGROUND
    +UNDERGROWTH
    +UNDERHANDED
    +UNDERLINE
    +UNDERLYING
    +UNDERMINE
    +UNDERNEATH
    +UNDERNOURISHED
    +UNDERPAID
    +UNDERPANTS
    +UNDERPASS
    +UNDERPRIVILEGED
    +UNDERRATE
    +UNDERRATED
    +UNDERSCORE
    +UNDERSHIRT
    +UNDERSIDE
    +UNDERSTAFFED
    +UNDERSTAND
    +UNDERSTANDABLE
    +UNDERSTANDABLY
    +UNDERSTANDING
    +UNDERSTATE
    +UNDERSTATED
    +UNDERSTATEMENT
    +UNDERSTOOD
    +UNDERSTUDY
    +UNDERTAKE
    +UNDERTAKEN
    +UNDERTAKER
    +UNDERTAKING
    +UNDERTONE
    +UNDERTOOK
    +UNDERTOW
    +UNDERWATER
    +UNDERWEAR
    +UNDERWEIGHT
    +UNDERWENT
    +UNDERWORLD
    +UNDERWRITE
    +UNDERWRITTEN
    +UNDERWROTE
    +UNDESIRABLE
    +UNDETERMINED
    +UNDEVELOPED
    +UNDID
    +UNDISCLOSED
    +UNDISTURBED
    +UNDO
    +UNDOING
    +UNDONE
    +UNDOUBTEDLY
    +UNDRESS
    +UNDRESSED
    +UNDUE
    +UNDULY
    +UNDYING
    +UNEARTH
    +UNEARTHLY
    +UNEASE
    +UNEASILY
    +UNEASINESS
    +UNEASY
    +UNEDUCATED
    +UNEMPLOYED
    +UNEMPLOYMENT
    +UNENDING
    +UNEQUAL
    +UNEQUALLY
    +UNEQUIVOCAL
    +UNERRING
    +UNEVEN
    +UNEVENLY
    +UNEXPECTED
    +UNEXPECTEDLY
    +UNFAILING
    +UNFAIR
    +UNFAIRLY
    +UNFAIRNESS
    +UNFAITHFUL
    +UNFAMILIAR
    +UNFASHIONABLE
    +UNFASTEN
    +UNFAVORABLE
    +UNFEELING
    +UNFIT
    +UNFOLD
    +UNFORESEEN
    +UNFORGETTABLE
    +UNFORTUNATE
    +UNFORTUNATELY
    +UNFOUNDED
    +UNFRIENDLY
    +UNFURL
    +UNGAINLY
    +UNGRATEFUL
    +UNGRATEFULLY
    +UNHAPPILY
    +UNHAPPINESS
    +UNHAPPY
    +UNHEALTHY
    +UNHOLY
    +UNHOOK
    +UNICORN
    +UNIDENTIFIED
    +UNIFICATION
    +UNIFORM
    +UNIFORMED
    +UNIFORMITY
    +UNIFORMLY
    +UNIFY
    +UNILATERAL
    +UNIMPORTANT
    +UNINHABITABLE
    +UNINHIBITED
    +UNINSURED
    +UNINTELLIGIBLE
    +UNINTERESTED
    +UNION
    +UNIONIZE
    +UNIQUE
    +UNIQUELY
    +UNISEX
    +UNISON
    +UNIT
    +UNITE
    +UNITED
    +UNITY
    +UNIVERSAL
    +UNIVERSALLY
    +UNIVERSE
    +UNIVERSITY
    +UNJUST
    +UNJUSTIFIED
    +UNKEMPT
    +UNKIND
    +UNKINDLY
    +UNKINDNESS
    +UNKNOWINGLY
    +UNKNOWN
    +UNLAWFUL
    +UNLEADED
    +UNLEASH
    +UNLESS
    +UNLIKE
    +UNLIKELY
    +UNLIMITED
    +UNLISTED
    +UNLOAD
    +UNLOCK
    +UNLUCKY
    +UNMARKED
    +UNMARRIED
    +UNMASK
    +UNMISTAKABLE
    +UNMISTAKABLY
    +UNMITIGATED
    +UNMOVED
    +UNNATURAL
    +UNNATURALLY
    +UNNECESSARILY
    +UNNECESSARY
    +UNNERVE
    +UNNERVING
    +UNNOTICED
    +UNOBTRUSIVE
    +UNOCCUPIED
    +UNOFFICIAL
    +UNOFFICIALLY
    +UNORTHODOX
    +UNPACK
    +UNPAID
    +UNPARALLELED
    +UNPLEASANT
    +UNPLUG
    +UNPLUGGED
    +UNPOPULAR
    +UNPOPULARITY
    +UNPRECEDENTED
    +UNPREDICTABLE
    +UNPREPARED
    +UNPRINCIPLED
    +UNPRINTABLE
    +UNPRODUCTIVE
    +UNPROFESSIONAL
    +UNPROFITABLE
    +UNPROTECTED
    +UNPROVOKED
    +UNQUALIFIED
    +UNQUESTIONABLE
    +UNQUESTIONABLY
    +UNQUESTIONED
    +UNRAVEL
    +UNREAL
    +UNREALISTIC
    +UNREASONABLE
    +UNREASONABLY
    +UNRELENTING
    +UNRELIABLE
    +UNRESERVED
    +UNRESPONSIVE
    +UNREST
    +UNRESTRAINED
    +UNRIVALED
    +UNROLL
    +UNRULINESS
    +UNRULY
    +UNSAFE
    +UNSANITARY
    +UNSATISFACTORY
    +UNSAVORY
    +UNSCATHED
    +UNSCREW
    +UNSCRUPULOUS
    +UNSEASONABLE
    +UNSEAT
    +UNSEEMLY
    +UNSEEN
    +UNSETTLED
    +UNSIGHTLY
    +UNSKILLED
    +UNSOLICITED
    +UNSOPHISTICATED
    +UNSOUND
    +UNSPEAKABLE
    +UNSPECIFIED
    +UNSPOKEN
    +UNSPORTSMANLIKE
    +UNSTABLE
    +UNSTEADY
    +UNSTOPPABLE
    +UNSUCCESSFUL
    +UNSUCCESSFULLY
    +UNSUITABLE
    +UNSUNG
    +UNSURE
    +UNSUSPECTING
    +UNTANGLE
    +UNTENABLE
    +UNTHINKABLE
    +UNTHINKING
    +UNTHINKINGLY
    +UNTIE
    +UNTIL
    +UNTIMELY
    +UNTIRING
    +UNTOLD
    +UNTOUCHABLE
    +UNTOWARD
    +UNTRIED
    +UNTRUE
    +UNTRUTHFUL
    +UNUSED
    +UNUSUAL
    +UNUSUALLY
    +UNVEIL
    +UNWANTED
    +UNWARRANTED
    +UNWELCOME
    +UNWIELDY
    +UNWILLING
    +UNWIND
    +UNWISE
    +UNWITTING
    +UNWITTINGLY
    +UNWOUND
    +UNWRITTEN
    +UNYIELDING
    +UNZIP
    +UPBEAT
    +UPBRINGING
    +UPCHUCK
    +UPCOMING
    +UPDATE
    +UPEND
    +UPFRONT
    +UPGRADE
    +UPHEAVAL
    +UPHELD
    +UPHILL
    +UPHOLD
    +UPHOLSTER
    +UPHOLSTERED
    +UPHOLSTERY
    +UPKEEP
    +UPLIFTING
    +UPON
    +UPPER
    +UPPERCASE
    +UPPERCLASSMAN
    +UPPERMOST
    +UPPITY
    +UPRIGHT
    +UPRISING
    +UPROAR
    +UPROOT
    +UPSCALE
    +UPSET
    +UPSHOT
    +UPSTAGE
    +UPSTAIRS
    +UPSTART
    +UPSTATE
    +UPSTREAM
    +UPSURGE
    +UPSWING
    +UPTAKE
    +UPTIGHT
    +UPTOWN
    +UPTURN
    +UPWARD
    +UPWARDS
    +URANIUM
    +URANUS
    +URBAN
    +URBANE
    +URCHIN
    +URGE
    +URGENCY
    +URGENT
    +URGENTLY
    +URINATE
    +URINE
    +USAGE
    +USED
    +USEFUL
    +USEFULLY
    +USEFULNESS
    +USELESS
    +USELESSLY
    +USELESSNESS
    +USER
    +USHER
    +USUAL
    +USUALLY
    +USURP
    +UTENSIL
    +UTERI
    +UTERUS
    +UTILITY
    +UTILIZATION
    +UTILIZE
    +UTMOST
    +UTOPIA
    +UTOPIAN
    +UTTER
    +UTTERANCE
    +UTTERLY
    +VACANCY
    +VACANT
    +VACANTLY
    +VACATE
    +VACATION
    +VACATIONER
    +VACCINATE
    +VACCINATION
    +VACCINE
    +VACILLATE
    +VACUUM
    +VAGINA
    +VAGINAL
    +VAGRANT
    +VAGUE
    +VAGUELY
    +VAGUENESS
    +VAIN
    +VAINLY
    +VALEDICTORIAN
    +VALENTINE
    +VALET
    +VALIANT
    +VALIANTLY
    +VALID
    +VALIDATE
    +VALIDITY
    +VALLEY
    +VALOR
    +VALUABLE
    +VALUABLES
    +VALUE
    +VALUES
    +VALVE
    +VAMPIRE
    +VANDAL
    +VANDALISM
    +VANDALIZE
    +VANGUARD
    +VANILLA
    +VANISH
    +VANISHING
    +VANITY
    +VANQUISH
    +VAPOR
    +VAPORIZE
    +VARIABILITY
    +VARIABLE
    +VARIANCE
    +VARIANT
    +VARIATION
    +VARIED
    +VARIETY
    +VARIOUS
    +VARIOUSLY
    +VARNISH
    +VARSITY
    +VARY
    +VASE
    +VASECTOMY
    +VAST
    +VASTLY
    +VAULT
    +VEAL
    +VEER
    +VEGAN
    +VEGETABLE
    +VEGETARIAN
    +VEGETATION
    +VEGGIE
    +VEGGIES
    +VEHEMENT
    +VEHEMENTLY
    +VEHICLE
    +VEHICULAR
    +VEIL
    +VEILED
    +VEIN
    +VELCRO
    +VELOCITY
    +VELOUR
    +VELVET
    +VELVETY
    +VENDETTA
    +VENDOR
    +VENEER
    +VENERABLE
    +VENERATE
    +VENGEANCE
    +VENGEFUL
    +VENISON
    +VENOM
    +VENOMOUS
    +VENT
    +VENTILATE
    +VENTILATION
    +VENTILATOR
    +VENTRILOQUISM
    +VENTRILOQUIST
    +VENTURE
    +VENUE
    +VENUS
    +VERANDA
    +VERB
    +VERBAL
    +VERBALLY
    +VERBATIM
    +VERBOSE
    +VERDICT
    +VERGE
    +VERIFICATION
    +VERIFY
    +VERITABLE
    +VERMIN
    +VERNACULAR
    +VERSATILE
    +VERSATILITY
    +VERSE
    +VERSION
    +VERSUS
    +VERTEBRA
    +VERTEBRAE
    +VERTICAL
    +VERTICALLY
    +VERTIGO
    +VERVE
    +VERY
    +VESSEL
    +VEST
    +VESTIBULE
    +VESTIGE
    +VETERAN
    +VETERINARIAN
    +VETERINARY
    +VETO
    +VIABILITY
    +VIABLE
    +VIADUCT
    +VIAL
    +VIBES
    +VIBRANT
    +VIBRATE
    +VIBRATION
    +VICARIOUS
    +VICE
    +VICINITY
    +VICIOUS
    +VICIOUSLY
    +VICTIM
    +VICTIMIZATION
    +VICTIMIZE
    +VICTOR
    +VICTORIOUS
    +VICTORY
    +VIDEO
    +VIDEOCASSETTE
    +VIDEOTAPE
    +VIEW
    +VIEWER
    +VIEWING
    +VIEWPOINT
    +VIGIL
    +VIGILANCE
    +VIGILANT
    +VIGILANTE
    +VIGOR
    +VIGOROUS
    +VIGOROUSLY
    +VILE
    +VILIFY
    +VILLA
    +VILLAGE
    +VILLAGER
    +VILLAIN
    +VILLAINY
    +VINDICATE
    +VINDICATION
    +VINDICTIVE
    +VINE
    +VINEGAR
    +VINEYARD
    +VINTAGE
    +VINYL
    +VIOLA
    +VIOLATE
    +VIOLATION
    +VIOLENCE
    +VIOLENT
    +VIOLENTLY
    +VIOLET
    +VIOLIN
    +VIOLINIST
    +VIPER
    +VIRAL
    +VIRGIN
    +VIRGINITY
    +VIRGO
    +VIRILE
    +VIRILITY
    +VIRTUAL
    +VIRTUALLY
    +VIRTUE
    +VIRTUOSO
    +VIRTUOUS
    +VIRULENT
    +VIRUS
    +VISA
    +VISAGE
    +VISCOSITY
    +VISCOUS
    +VISE
    +VISIBILITY
    +VISIBLE
    +VISIBLY
    +VISION
    +VISIONARY
    +VISIT
    +VISITATION
    +VISITOR
    +VISOR
    +VISTA
    +VISUAL
    +VISUALIZE
    +VISUALLY
    +VITAL
    +VITALITY
    +VITALLY
    +VITAMIN
    +VIVACIOUS
    +VIVACIOUSLY
    +VIVACITY
    +VIVID
    +VIVIDLY
    +VIVISECTION
    +VOCABULARY
    +VOCAL
    +VOCALIST
    +VOCATION
    +VOCATIONAL
    +VOCIFEROUS
    +VOCIFEROUSLY
    +VODKA
    +VOGUE
    +VOICE
    +VOID
    +VOLATILE
    +VOLATILITY
    +VOLCANIC
    +VOLCANO
    +VOLITION
    +VOLLEY
    +VOLLEYBALL
    +VOLT
    +VOLTAGE
    +VOLUME
    +VOLUMINOUS
    +VOLUNTARILY
    +VOLUNTARY
    +VOLUNTEER
    +VOLUPTUOUS
    +VOMIT
    +VOODOO
    +VORACIOUS
    +VORACITY
    +VORTEX
    +VORTICES
    +VOTE
    +VOTER
    +VOUCH
    +VOUCHER
    +VOWEL
    +VOYAGE
    +VOYAGER
    +VOYEUR
    +VOYEURISM
    +VULGAR
    +VULGARITY
    +VULNERABILITY
    +VULNERABLE
    +VULTURE
    +WACKY
    +WADDLE
    +WADE
    +WAFER
    +WAFFLE
    +WAFT
    +WAGE
    +WAGER
    +WAGES
    +WAGON
    +WAIF
    +WAIL
    +WAIST
    +WAISTBAND
    +WAISTLINE
    +WAIT
    +WAITER
    +WAITRESS
    +WAIVE
    +WAIVER
    +WAKE
    +WAKEN
    +WALK
    +WALKER
    +WALKMAN
    +WALKOUT
    +WALL
    +WALLET
    +WALLOP
    +WALLOW
    +WALLPAPER
    +WALNUT
    +WALRUS
    +WALTZ
    +WAND
    +WANDER
    +WANDERER
    +WANE
    +WANNA
    +WANNABE
    +WANT
    +WANTED
    +WANTING
    +WANTON
    +WARBLE
    +WARD
    +WARDEN
    +WARDROBE
    +WARE
    +WAREHOUSE
    +WARES
    +WARFARE
    +WARHEAD
    +WARILY
    +WARLIKE
    +WARLOCK
    +WARLORD
    +WARM
    +WARMLY
    +WARMONGER
    +WARMONGERING
    +WARMTH
    +WARN
    +WARNING
    +WARP
    +WARPATH
    +WARPED
    +WARRANT
    +WARRANTY
    +WARREN
    +WARRING
    +WARRIOR
    +WARSHIP
    +WART
    +WARTIME
    +WARY
    +WASH
    +WASHABLE
    +WASHBASIN
    +WASHCLOTH
    +WASHER
    +WASHING
    +WASHOUT
    +WASHROOM
    +WASP
    +WASP
    +WASTE
    +WASTEBASKET
    +WASTED
    +WASTEFUL
    +WASTELAND
    +WATCH
    +WATCHDOG
    +WATCHFUL
    +WATCHMAKER
    +WATCHMAN
    +WATCHWORD
    +WATER
    +WATERBED
    +WATERCOLOR
    +WATERCOLORS
    +WATERFALL
    +WATERFRONT
    +WATERLOGGED
    +WATERMARK
    +WATERMELON
    +WATERPROOF
    +WATERS
    +WATERSHED
    +WATERTIGHT
    +WATERWAY
    +WATERWORKS
    +WATERY
    +WATT
    +WAVE
    +WAVELENGTH
    +WAVER
    +WAVY
    +WAXINESS
    +WAXY
    +WAYLAY
    +WAYS
    +WAYSIDE
    +WAYWARD
    +WEAK
    +WEAKEN
    +WEAKLING
    +WEAKLY
    +WEAKNESS
    +WEALTH
    +WEALTHY
    +WEAN
    +WEAPON
    +WEAPONRY
    +WEAR
    +WEARILY
    +WEARINESS
    +WEARISOME
    +WEARY
    +WEASEL
    +WEATHER
    +WEAVE
    +WEBSITE
    +WEDDING
    +WEDGE
    +WEDLOCK
    +WEDNESDAY
    +WEED
    +WEEK
    +WEEKDAY
    +WEEKEND
    +WEEKLY
    +WEEKNIGHT
    +WEEP
    +WEIGH
    +WEIGHT
    +WEIGHTLESS
    +WEIGHTLESSNESS
    +WEIGHTLIFTER
    +WEIGHTLIFTING
    +WEIGHTY
    +WEIRD
    +WEIRDO
    +WELCOME
    +WELD
    +WELDER
    +WELFARE
    +WELL
    +WELSH
    +WELSH
    +WELT
    +WELTER
    +WENT
    +WEPT
    +WERE
    +WEREWOLF
    +WEREWOLVES
    +WEST
    +WESTBOUND
    +WESTERLY
    +WESTERN
    +WESTERN
    +WESTERNER
    +WESTERNER
    +WESTERNIZE
    +WESTWARD
    +WESTWARDS
    +WETBACK
    +WHACK
    +WHALE
    +WHALER
    +WHALING
    +WHAM
    +WHARF
    +WHARVES
    +WHAT
    +WHATCHAMACALLIT
    +WHATEVER
    +WHATSOEVER
    +WHEAT
    +WHEEL
    +WHEELBARROW
    +WHEELCHAIR
    +WHEELS
    +WHEEZE
    +WHEN
    +WHENEVER
    +WHERE
    +WHEREABOUTS
    +WHEREAS
    +WHEREBY
    +WHEREIN
    +WHEREUPON
    +WHEREVER
    +WHEREWITHAL
    +WHET
    +WHETHER
    +WHEW
    +WHICH
    +WHICHEVER
    +WHIFF
    +WHILE
    +WHIM
    +WHIMPER
    +WHIMSICAL
    +WHINE
    +WHINER
    +WHINNY
    +WHIP
    +WHIPLASH
    +WHIPPING
    +WHIR
    +WHIRL
    +WHIRLPOOL
    +WHIRLWIND
    +WHISK
    +WHISKER
    +WHISKERS
    +WHISKEY
    +WHISPER
    +WHISTLE
    +WHITE
    +WHITE
    +WHITEN
    +WHITEWASH
    +WHITTLE
    +WHIZ
    +WHOA
    +WHODUNIT
    +WHOEVER
    +WHOLE
    +WHOLEHEARTED
    +WHOLEHEARTEDLY
    +WHOLESALE
    +WHOLESOME
    +WHOLLY
    +WHOM
    +WHOOP
    +WHOOPS
    +WHOOSH
    +WHOPPER
    +WHORE
    +WHOSE
    +WICK
    +WICKED
    +WICKEDLY
    +WICKEDNESS
    +WICKER
    +WICKET
    +WIDE
    +WIDELY
    +WIDEN
    +WIDESPREAD
    +WIDOW
    +WIDOWED
    +WIDOWER
    +WIDTH
    +WIELD
    +WIENER
    +WIFE
    +WIGGLE
    +WIGWAM
    +WILD
    +WILDERNESS
    +WILDLIFE
    +WILDLY
    +WILES
    +WILL
    +WILLFUL
    +WILLFULLY
    +WILLING
    +WILLINGLY
    +WILLINGNESS
    +WILLOW
    +WILLOWY
    +WILLPOWER
    +WILT
    +WILY
    +WIMP
    +WIMPY
    +WINCE
    +WINCH
    +WIND
    +WINDBREAKER
    +WINDED
    +WINDFALL
    +WINDING
    +WINDMILL
    +WINDOW
    +WINDOWPANE
    +WINDOWSILL
    +WINDPIPE
    +WINDSHIELD
    +WINDSURF
    +WINDSURFING
    +WINDSWEPT
    +WINDY
    +WINE
    +WINEGLASS
    +WING
    +WINGED
    +WINGS
    +WINGSPAN
    +WINGTIP
    +WINK
    +WINNER
    +WINNING
    +WINNINGS
    +WINO
    +WINSOME
    +WINTER
    +WINTERTIME
    +WINTRY
    +WIPE
    +WIPER
    +WIRE
    +WIRED
    +WIRETAP
    +WIRING
    +WIRY
    +WISDOM
    +WISE
    +WISECRACK
    +WISELY
    +WISH
    +WISHBONE
    +WISHES
    +WISP
    +WISPY
    +WISTFUL
    +WISTFULLY
    +WITCH
    +WITCHCRAFT
    +WITH
    +WITHDRAW
    +WITHDRAWAL
    +WITHDRAWN
    +WITHDREW
    +WITHER
    +WITHHELD
    +WITHHOLD
    +WITHHOLDING
    +WITHIN
    +WITHOUT
    +WITHSTAND
    +WITHSTOOD
    +WITNESS
    +WITS
    +WITTICISM
    +WITTY
    +WIVES
    +WIZARD
    +WIZENED
    +WOBBLE
    +WOBBLY
    +WOEBEGONE
    +WOES
    +WOKE
    +WOKEN
    +WOLF
    +WOLVES
    +WOMAN
    +WOMANHOOD
    +WOMANKIND
    +WOMB
    +WOMEN
    +WONDER
    +WONDERFUL
    +WONDERFULLY
    +WONT
    +WOOD
    +WOODCHUCK
    +WOODED
    +WOODEN
    +WOODLAND
    +WOODPECKER
    +WOODS
    +WOODWIND
    +WOODWORK
    +WOODY
    +WOOF
    +WOOL
    +WOOLEN
    +WOOLENS
    +WOOLY
    +WOOZY
    +WORD
    +WORDING
    +WORDY
    +WORE
    +WORK
    +WORKABLE
    +WORKAHOLIC
    +WORKBENCH
    +WORKBOOK
    +WORKER
    +WORKFARE
    +WORKFORCE
    +WORKING
    +WORKINGS
    +WORKLOAD
    +WORKMAN
    +WORKMANLIKE
    +WORKMANSHIP
    +WORKOUT
    +WORKS
    +WORKSHEET
    +WORKSHOP
    +WORKSTATION
    +WORLD
    +WORLDLY
    +WORLDWIDE
    +WORM
    +WORMS
    +WORN
    +WORRIED
    +WORRY
    +WORRYING
    +WORSE
    +WORSEN
    +WORSHIP
    +WORSHIPER
    +WORST
    +WORTH
    +WORTHLESS
    +WORTHWHILE
    +WORTHY
    +WOULD
    +WOUND
    +WOUNDED
    +WOVE
    +WOVEN
    +WRANGLE
    +WRANGLER
    +WRAP
    +WRAPPER
    +WRAPPING
    +WRATH
    +WREAK
    +WREATH
    +WRECK
    +WRECKAGE
    +WREN
    +WRENCH
    +WREST
    +WRESTLE
    +WRESTLER
    +WRESTLING
    +WRETCH
    +WRETCHED
    +WRIGGLE
    +WRING
    +WRINGER
    +WRINKLE
    +WRINKLED
    +WRIST
    +WRISTWATCH
    +WRIT
    +WRITE
    +WRITER
    +WRITHE
    +WRITING
    +WRITTEN
    +WRONG
    +WRONGDOER
    +WRONGDOING
    +WRONGFUL
    +WRONGFULLY
    +WRONGLY
    +WROTE
    +WROUGHT
    +WRUNG
    +WRYLY
    +XENOPHOBIA
    +XENOPHOBIC
    +XEROX
    +XMAS
    +XYLOPHONE
    +YACHT
    +YANK
    +YANK
    +YANKEE
    +YARD
    +YARDSTICK
    +YARMULKE
    +YARN
    +YAWN
    +YEAH
    +YEAR
    +YEARBOOK
    +YEARLING
    +YEARLY
    +YEARN
    +YEARNING
    +YEARS
    +YEAST
    +YELL
    +YELLOW
    +YELLOWISH
    +YELP
    +YESTERDAY
    +YIDDISH
    +YIELD
    +YIPPEE
    +YMCA
    +YODEL
    +YOGA
    +YOGURT
    +YOKE
    +YOKEL
    +YOLK
    +YONDER
    +YOUNG
    +YOUNGSTER
    +YOUR
    +YOURS
    +YOURSELF
    +YOURSELVES
    +YOUTH
    +YOUTHFUL
    +YUCK
    +YUCKY
    +YULETIDE
    +YUMMY
    +YUPPIE
    +YWCA
    +ZANY
    +ZEAL
    +ZEALOUS
    +ZEALOUSLY
    +ZEBRA
    +ZERO
    +ZEST
    +ZIGZAG
    +ZILLION
    +ZINC
    +ZIPPER
    +ZODIAC
    +ZOMBIE
    +ZONE
    +ZOOLOGICAL
    +ZOOLOGIST
    +ZOOLOGY
    +ZOOM
    +ZUCCHINI
    diff --git a/wt-3.1.7a/examples/hangman/hangman.C b/wt-3.1.7a/examples/hangman/hangman.C
    new file mode 100644
    index 0000000..803403b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hangman/hangman.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2005 Wim Dumon
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WApplication>
    +#include "HangmanGame.h"
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->setTitle(L"Hangman");
    +  new HangmanGame(app->root());  
    +
    +  /*
    +   * The application style sheet (only for the highscore widget)
    +   */
    +  WCssDecorationStyle cellStyle;
    +  WBorder cellBorder;
    +  cellBorder.setStyle(WBorder::Solid);
    +  cellBorder.setWidth(WBorder::Explicit, 1);
    +  cellBorder.setColor(WColor(Wt::lightGray));
    +  cellStyle.setBorder(cellBorder);
    +
    +  app->styleSheet().addRule(".highscores * TD", cellStyle);
    +
    +  cellStyle.font().setVariant(WFont::SmallCaps);
    +
    +  app->styleSheet().addRule(".highscoresheader", cellStyle);
    +
    +  cellStyle.font().setVariant(WFont::NormalVariant);
    +  cellStyle.font().setStyle(WFont::Italic);
    +  cellStyle.font().setWeight(WFont::Bold);
    +
    +  app->styleSheet().addRule(".highscoresself", cellStyle);
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman0.png b/wt-3.1.7a/examples/hangman/icons/hangman0.png
    new file mode 100644
    index 0000000..91c9df3
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman0.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman1.png b/wt-3.1.7a/examples/hangman/icons/hangman1.png
    new file mode 100644
    index 0000000..bb36a1a
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman1.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman2.png b/wt-3.1.7a/examples/hangman/icons/hangman2.png
    new file mode 100644
    index 0000000..0614d09
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman2.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman3.png b/wt-3.1.7a/examples/hangman/icons/hangman3.png
    new file mode 100644
    index 0000000..bbd9c65
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman3.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman4.png b/wt-3.1.7a/examples/hangman/icons/hangman4.png
    new file mode 100644
    index 0000000..4854687
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman4.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman5.png b/wt-3.1.7a/examples/hangman/icons/hangman5.png
    new file mode 100644
    index 0000000..116e8b4
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman5.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman6.png b/wt-3.1.7a/examples/hangman/icons/hangman6.png
    new file mode 100644
    index 0000000..8e8a4f8
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman6.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman7.png b/wt-3.1.7a/examples/hangman/icons/hangman7.png
    new file mode 100644
    index 0000000..0b55efa
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman7.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman8.png b/wt-3.1.7a/examples/hangman/icons/hangman8.png
    new file mode 100644
    index 0000000..43359f8
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman8.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangman9.png b/wt-3.1.7a/examples/hangman/icons/hangman9.png
    new file mode 100644
    index 0000000..e7814d1
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangman9.png differ
    diff --git a/wt-3.1.7a/examples/hangman/icons/hangmanhurray.png b/wt-3.1.7a/examples/hangman/icons/hangmanhurray.png
    new file mode 100644
    index 0000000..59df1cf
    Binary files /dev/null and b/wt-3.1.7a/examples/hangman/icons/hangmanhurray.png differ
    diff --git a/wt-3.1.7a/examples/hello/CMakeLists.txt b/wt-3.1.7a/examples/hello/CMakeLists.txt
    new file mode 100644
    index 0000000..4701e0b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hello/CMakeLists.txt
    @@ -0,0 +1,18 @@
    +#
    +# The ADD_EXAMPLE macro (defined in examples/CMakeLists.txt) ensures that
    +# the example is correctly built for the requested connector. It is equivalent
    +# to the following two lines:
    +#   ADD_EXECUTABLE(hello.wt hello.C)
    +#   TARGET_LINK_LIBRARIES(hello.wt ${EXAMPLES_CONNECTOR})
    +# except when the ISAPI (for Microsoft IIS) connector is used, where it will
    +# build a DLL with the proper symbols exported.
    +#
    +WT_ADD_EXAMPLE(hello.wt hello.C)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    diff --git a/wt-3.1.7a/examples/hello/hello.C b/wt-3.1.7a/examples/hello/hello.C
    new file mode 100644
    index 0000000..c80b1d7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/hello/hello.C
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +/*
    + * A simple hello world application class which demonstrates how to react
    + * to events, read input, and give feed-back.
    + */
    +class HelloApplication : public WApplication
    +{
    +public:
    +  HelloApplication(const WEnvironment& env);
    +
    +private:
    +  WLineEdit *nameEdit_;
    +  WText *greeting_;
    +
    +  void greet();
    +};
    +
    +/*
    + * The env argument contains information about the new session, and
    + * the initial request. It must be passed to the WApplication
    + * constructor so it is typically also an argument for your custom
    + * application constructor.
    +*/
    +HelloApplication::HelloApplication(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("Hello world");                               // application title
    +
    +  root()->addWidget(new WText("Your name, please ? "));  // show some text
    +  nameEdit_ = new WLineEdit(root());                     // allow text input
    +  nameEdit_->setFocus();                                 // give focus
    +
    +  WPushButton *b = new WPushButton("Greet me.", root()); // create a button
    +  b->setMargin(5, Left);                                 // add 5 pixels margin
    +
    +  root()->addWidget(new WBreak());                       // insert a line break
    +
    +  greeting_ = new WText(root());                         // empty text
    +
    +  /*
    +   * Connect signals with slots
    +   *
    +   * - simple Wt-way
    +   */
    +  b->clicked().connect(this, &HelloApplication::greet);
    +
    +  /*
    +   * - using an arbitrary function object (binding values with boost::bind())
    +   */
    +  nameEdit_->enterPressed().connect
    +    (boost::bind(&HelloApplication::greet, this));
    +}
    +
    +void HelloApplication::greet()
    +{
    +  /*
    +   * Update the text, using text input into the nameEdit_ field.
    +   */
    +  greeting_->setText("Hello there, " + nameEdit_->text());
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  /*
    +   * You could read information from the environment to decide whether
    +   * the user has permission to start a new application
    +   */
    +  return new HelloApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  /*
    +   * Your main method may set up some shared resources, but should then
    +   * start the server application (FastCGI or httpd) that starts listening
    +   * for requests, and handles all of the application life cycles.
    +   *
    +   * The last argument to WRun specifies the function that will instantiate
    +   * new application objects. That function is executed when a new user surfs
    +   * to the Wt application, and after the library has negotiated browser
    +   * support. The function should return a newly instantiated application
    +   * object.
    +   */
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/javascript/CMakeLists.txt b/wt-3.1.7a/examples/javascript/CMakeLists.txt
    new file mode 100644
    index 0000000..58c20f1
    --- /dev/null
    +++ b/wt-3.1.7a/examples/javascript/CMakeLists.txt
    @@ -0,0 +1,9 @@
    +
    +WT_ADD_EXAMPLE(javascript.wt
    +  JavascriptExample.C
    +  Popup.C
    +)
    +
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ADD_DEPENDENCIES(javascript.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/javascript/JavascriptExample.C b/wt-3.1.7a/examples/javascript/JavascriptExample.C
    new file mode 100644
    index 0000000..8773d7c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/javascript/JavascriptExample.C
    @@ -0,0 +1,102 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WText>
    +#include <Wt/WPushButton>
    +
    +#include "JavascriptExample.h"
    +#include "Popup.h"
    +
    +using namespace Wt;
    +
    +JavascriptExample::JavascriptExample(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("Javascript example");
    +
    +  // Create a popup for prompting the amount of money, and connect the
    +  // okPressed button to the slot for setting the amount of money.
    +  //
    +  // Note that the input provided by the user in the prompt box is passed as
    +  // an argument to the slot.
    +  promptAmount_ = Popup::createPrompt("How much do you want to pay?", "",
    +				      this);
    +  promptAmount_->okPressed().connect(this, &JavascriptExample::setAmount);
    +
    +  // Create a popup for confirming the payment.
    +  //
    +  // Since a confirm popup does not allow input, we ignore the
    +  // argument carrying the input (which will be empty anyway).
    +  confirmPay_ = Popup::createConfirm("", this);
    +  confirmPay_->okPressed().connect(this, &JavascriptExample::confirmed);
    +
    +  new WText("<h2>Wt Javascript example</h2>"
    +	    "<p>Wt makes abstraction of Javascript, and therefore allows you"
    +	    " to develop web applications without any knowledge of Javascript,"
    +	    " and which are not dependent on Javascript."
    +	    " However, Wt does allow you to add custom Javascript code:</p>"
    +	    " <ul>"
    +	    "   <li>To call custom JavaScript code from an event handler, "
    +	    "connect the Wt::EventSignal to a Wt::JSlot.</li>"
    +	    "   <li>To call C++ code from custom JavaScript, use "
    +	    "Wt.emit() to emit a Wt::JSignal.</li>"
    +	    "   <li>To call custom JavaScript code from C++, use "
    +	    "WApplication::doJavascript() or Wt::JSlot::exec().</li>"
    +	    " </ul>"
    +	    "<p>This simple application shows how to interact between C++ and"
    +	    " JavaScript using the JSlot and JSignal classes.</p>", root());
    +
    +  currentAmount_
    +    = new WText("Current amount: $" + promptAmount_->defaultValue(), root());
    +
    +  WPushButton *amountButton = new WPushButton("Change ...", root());
    +  amountButton->setMargin(10, Left | Right);
    +
    +  new WBreak(root());
    +
    +  WPushButton *confirmButton = new WPushButton("Pay now.", root());
    +  confirmButton->setMargin(10, Top | Bottom);
    +
    +  // Connect the event handlers to a JSlot: this will execute the JavaScript
    +  // immediately, without a server round trip.
    +  amountButton->clicked().connect(promptAmount_->show);
    +  confirmButton->clicked().connect(confirmPay_->show);
    +
    +  // Set the initial amount
    +  setAmount("1000");
    +}
    +
    +void JavascriptExample::setAmount(const std::string amount)
    +{
    +  // Change the confirmation message to include the amount.
    +  confirmPay_->setMessage("Are you sure you want to pay $" + amount + " ?");
    +
    +  // Change the default value for the prompt.
    +  promptAmount_->setDefaultValue(amount);
    +
    +  // Change the text that shows the current amount.
    +  currentAmount_->setText("Current amount: $" + promptAmount_->defaultValue());
    +}
    +
    +void JavascriptExample::confirmed()
    +{
    +  new WText("<br/>Just payed $" + promptAmount_->defaultValue() + ".", root());
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new JavascriptExample(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/javascript/JavascriptExample.h b/wt-3.1.7a/examples/javascript/JavascriptExample.h
    new file mode 100644
    index 0000000..9a93793
    --- /dev/null
    +++ b/wt-3.1.7a/examples/javascript/JavascriptExample.h
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef JAVASCRIPTEXAMPLE_H_
    +#define JAVASCRIPTEXAMPLE_H_
    +
    +#include <Wt/WApplication>
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup javascript Javascript - Wt interaction example
    + */
    +/*@{*/
    +
    +class Popup;
    +
    +/*! \brief An example showing how to interact custom JavaScript with Wt
    + *         stuff
    + */
    +class JavascriptExample : public WApplication
    +{
    +public:
    +  /*! \brief Create the example application.
    +   */
    +  JavascriptExample(const WEnvironment& env);
    +
    +private:
    +  /*! \brief The user has confirmed the payment.
    +   */
    +  void confirmed();
    +
    +  /*! \brief Set the amount to be payed.
    +   */
    +  void setAmount(std::string amount);
    +
    +  /*! \brief Popup for changing the amount.
    +   */
    +  Popup *promptAmount_;
    +
    +  /*! \brief Popup for paying.
    +   */
    +  Popup *confirmPay_;
    +
    +  /*! \brief WText for showing the current amount.
    +   */
    +  WText *currentAmount_;
    +};
    +
    +/*@}*/
    +
    +#endif // JAVASCRIPTEXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/javascript/Popup.C b/wt-3.1.7a/examples/javascript/Popup.C
    new file mode 100644
    index 0000000..c51195c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/javascript/Popup.C
    @@ -0,0 +1,86 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Popup.h"
    +
    +using namespace Wt;
    +
    +Popup::Popup(Type t, const WString& message, std::string defaultValue,
    +	     WObject *parent)
    +  : WObject(parent),
    +    okPressed_(this, "ok"),
    +    cancelPressed_(this, "cancel"),
    +    t_(t),
    +    message_(message),
    +    defaultValue_(defaultValue)
    +{
    +  setJavaScript();
    +}
    +
    +void Popup::setJavaScript()
    +{
    +  /*
    +   * Sets the JavaScript code.
    +   *
    +   * Notice how Wt.emit() is used to emit the okPressed or cancelPressed
    +   * signal, and how arguments may be passed to it, matching the number and
    +   * type of arguments in the JSignal definition.
    +   */
    +  switch (t_) {
    +  case Confirm:
    +    show.setJavaScript
    +      ("function(){ if (confirm('" + message_.narrow() + "')) {"
    +       + okPressed_.createCall("''") +
    +       "} else {"
    +       + cancelPressed_.createCall() +
    +       "}}");
    +    break;
    +  case Alert:
    +    show.setJavaScript
    +      ("function(){ alert('" + message_.narrow() + "');"
    +       + okPressed_.createCall("''") +
    +       "}");
    +    break;
    +  case Prompt:
    +    show.setJavaScript
    +      ("function(){var n = prompt('" + message_.narrow() + "', '"
    +       + defaultValue_ + "');"
    +       "if (n != null) {"
    +       + okPressed_.createCall("n") +
    +       "} else {"
    +       + cancelPressed_.createCall() +
    +       "}}");
    +  }
    +}
    +
    +void Popup::setMessage(const WString& message)
    +{
    +  message_ = message;
    +  setJavaScript();
    +}
    +
    +void Popup::setDefaultValue(const std::string defaultValue)
    +{
    +  defaultValue_ = defaultValue;
    +  setJavaScript();
    +}
    +
    +Popup *Popup::createConfirm(const WString& message, WObject *parent)
    +{
    +  return new Popup(Confirm, message, std::string(), parent);
    +}
    +
    +Popup *Popup::createAlert(const WString& message, WObject *parent)
    +{
    +  return new Popup(Alert, message, std::string(), parent);
    +}
    +
    +Popup *Popup::createPrompt(const WString& message,
    +			   const std::string defaultValue, WObject *parent)
    +{
    +  return new Popup(Prompt, message, defaultValue, parent);
    +}
    diff --git a/wt-3.1.7a/examples/javascript/Popup.h b/wt-3.1.7a/examples/javascript/Popup.h
    new file mode 100644
    index 0000000..0e8a575
    --- /dev/null
    +++ b/wt-3.1.7a/examples/javascript/Popup.h
    @@ -0,0 +1,104 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef POPUP_H_
    +#define POPUP_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +#include <Wt/WJavaScript>
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup javascript
    + */
    +/*@{*/
    +
    +/*! \brief A JavaScript based popup window, encapsulating the Javascript
    + *         functions alert(), confirm(), and prompt().
    + *
    + * Use one of the create static methods to create a popup. This will not
    + * display the popup, until either the show slot is triggered from an
    + * event handler, or is executed using it's exec() method.
    + *
    + * When the user closes the popup, either the okPressed or cancelPressed
    + * signal is emitted. For a prompt dialog, the value is passed as a parameter
    + * to the okPressed signal.
    + */
    +class Popup : public WObject
    +{
    +public:
    +  /*! \brief Create a confirm dialog.
    +   */
    +  static Popup *createConfirm(const WString& message, WObject *parent = 0);
    +
    +  /*! \brief Create a prompt dialog with the given default value
    +   */
    +  static Popup *createPrompt(const WString& message,
    +			     const std::string defaultValue,
    +			     WObject *parent = 0);
    +
    +  /*! \brief Create an alert dialog.
    +   */
    +  static Popup *createAlert(const WString& message, WObject *parent = 0);
    +
    +  /*! \brief Change the message
    +   */
    +  void setMessage(const WString& message);
    +
    +  /*! \brief Change the default value for a prompt dialog.
    +   */
    +  void setDefaultValue(const std::string defaultValue);
    +
    +  /*! \brief Get the current message.
    +   */
    +  const WString& message() const { return message_; }
    +
    +  /*! \brief Get the default value for a prompt dialog.
    +   */
    +  const std::string& defaultValue() const { return defaultValue_; }
    +
    +  /*! \brief Show the dialog.
    +   *
    +   * Use show.exec() to show the dialog, or connect the slot to an EventSignal
    +   * to directly show the dialog without a server round trip.
    +   */
    +  JSlot show;
    +
    +  /*! \brief Signal emitted when ok pressed.
    +   */
    +  JSignal<std::string>& okPressed() { return okPressed_; }
    +
    +  /*! \brief Signal emitted when cancel is pressed.
    +   */
    +  JSignal<void>&        cancelPressed() { return cancelPressed_; }
    +
    +private:
    +  /*! \brief Popup type.
    +   */
    +  enum Type { Confirm, Alert, Prompt };
    +
    +  /*! \brief Popup constructor.
    +   */
    +  Popup(Type t, const WString& message, const std::string defaultValue,
    +	WObject *parent);
    +
    +  JSignal<std::string> okPressed_;
    +  JSignal<void>        cancelPressed_;
    +
    +  Type t_;
    +  WString message_;
    +  std::string defaultValue_;
    +
    +  /*! \brief Update the javascript code.
    +   */
    +  void setJavaScript();
    +};
    +
    +/*@}*/
    +
    +#endif // POPUP_H_
    diff --git a/wt-3.1.7a/examples/mandelbrot/CMakeLists.txt b/wt-3.1.7a/examples/mandelbrot/CMakeLists.txt
    new file mode 100644
    index 0000000..64b8ff7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mandelbrot/CMakeLists.txt
    @@ -0,0 +1,15 @@
    +IF(NOT HAVE_GM)
    +  MESSAGE(STATUS "** Not building mandelbrot example: requires Wt::WRasterImage.")
    +ELSE(NOT HAVE_GM)
    +
    +  WT_ADD_EXAMPLE(mandelbrot.wt MandelbrotImage.C MandelbrotExample.C)
    +
    +  INCLUDE_DIRECTORIES(
    +    ${GD_INCLUDE_DIRS}
    +    ${WT_SOURCE_DIR}/src
    +  )
    +
    +  ADD_DEPENDENCIES(mandelbrot.wt wt ${EXAMPLES_CONNECTOR})
    +
    +ENDIF(NOT HAVE_GM)
    +
    diff --git a/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.C b/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.C
    new file mode 100644
    index 0000000..434a1c3
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.C
    @@ -0,0 +1,125 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WPushButton>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WText>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "MandelbrotExample.h"
    +#include "MandelbrotImage.h"
    +
    +MandelbrotExample::MandelbrotExample(WContainerWidget *parent)
    +  : WContainerWidget(parent)
    +{
    +  new WText("<div style=\"height:1px; width: 1px;\"/>"
    +	    "<h2>Wt Mandelbrot example</h2>"
    +	    "<p>The image below is a WVirtualImage that renders the "
    +	    "classic Mandelbrot fractal.</p>"
    +	    "<p>It is drawn as a grid of many smaller images, "
    +	    "computed on the fly, as you scroll around "
    +	    "through the virtual image. You can scroll the image using the "
    +	    "buttons, or by dragging the mouse.</p>", this);
    +
    +  WTable *layout = new WTable(this);
    +
    +  mandelbrot_ = new MandelbrotImage(400, 400,
    +				    3000, 3000,
    +				    -2,
    +				    -1.5,
    +				    1,
    +				    1.5, layout->elementAt(0, 0));
    +
    +  WContainerWidget *buttons = new WContainerWidget(layout->elementAt(0, 0));
    +  buttons->resize(400, WLength::Auto);
    +  buttons->setContentAlignment(AlignCenter);
    +
    +  (new WPushButton("Left", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::moveLeft);
    +  (new WPushButton("Right", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::moveRight);
    +  (new WPushButton("Up", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::moveUp);
    +  (new WPushButton("Down", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::moveDown);
    +
    +  new WBreak(buttons);
    +
    +  (new WPushButton("Zoom in", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::zoomIn);
    +  (new WPushButton("Zoom out", buttons))
    +    ->clicked().connect(this, &MandelbrotExample::zoomOut);
    +
    +  viewPortText_ = new WText(layout->elementAt(0, 1));
    +  layout->elementAt(0, 1)->setPadding(10);
    +
    +  updateViewPortText();
    +
    +  mandelbrot_->viewPortChanged()
    +    .connect(this, &MandelbrotExample::updateViewPortText);
    +}
    +
    +void MandelbrotExample::moveLeft()
    +{
    +  mandelbrot_->scroll(-50, 0);
    +}
    +
    +void MandelbrotExample::moveRight()
    +{
    +  mandelbrot_->scroll(50, 0);
    +}
    +
    +void MandelbrotExample::moveUp()
    +{
    +  mandelbrot_->scroll(0, -50);
    +}
    +
    +void MandelbrotExample::moveDown()
    +{
    +  mandelbrot_->scroll(0, 50);
    +}
    +
    +void MandelbrotExample::zoomIn()
    +{
    +  mandelbrot_->zoomIn();
    +}
    +
    +void MandelbrotExample::zoomOut()
    +{
    +  mandelbrot_->zoomOut();
    +}
    +
    +void MandelbrotExample::updateViewPortText()
    +{
    +  viewPortText_->setText
    +    ("Current viewport: ("
    +     + boost::lexical_cast<std::string>(mandelbrot_->currentX1()) + ","
    +     + boost::lexical_cast<std::string>(mandelbrot_->currentY1()) + ") to ("
    +     + boost::lexical_cast<std::string>(mandelbrot_->currentX2()) + ","
    +     + boost::lexical_cast<std::string>(mandelbrot_->currentY2()) + ")");
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->setTitle("Wt Mandelbrot example");
    +
    +  MandelbrotExample *mandelbrot = new MandelbrotExample();
    +  mandelbrot->setPadding(8);
    +  app->root()->addWidget(mandelbrot);
    +
    +  app->styleSheet().addRule("html, body",
    +			    "border: 0px; margin: 0px; height: 100%;");
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.h b/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.h
    new file mode 100644
    index 0000000..e49bcea
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mandelbrot/MandelbrotExample.h
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef MANDELBROT_EXAMPLE_H_
    +#define MANDELBROT_EXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WGlobal>
    +
    +using namespace Wt;
    +
    +class MandelbrotImage;
    +
    +class MandelbrotExample : public WContainerWidget
    +{
    +public:
    +  MandelbrotExample(WContainerWidget *parent = 0);
    +
    +private:
    +  MandelbrotImage *mandelbrot_;
    +
    +  WText *viewPortText_;
    +
    +  void moveLeft();
    +  void moveRight();
    +  void moveUp();
    +  void moveDown();
    +  void zoomIn();
    +  void zoomOut();
    +
    +  void updateViewPortText();
    +};
    +
    +#endif // MANDELBROT_EXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.C b/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.C
    new file mode 100644
    index 0000000..4af8dbb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.C
    @@ -0,0 +1,163 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <math.h>
    +#include <stdio.h>
    +#include <fstream>
    +#include <iostream>
    +
    +#include <Wt/WResource>
    +#include <Wt/WImage>
    +#include <Wt/WPainter>
    +#include <Wt/WPen>
    +#include <Wt/WRasterImage>
    +#include <Wt/Http/Response>
    +
    +#include "MandelbrotImage.h"
    +
    +namespace {
    +  class MandelbrotResource : public WResource
    +  {
    +  public:
    +    MandelbrotResource(MandelbrotImage *img,
    +		       int64_t x, int64_t y, int w, int h)
    +      : img_(img),
    +	x_(x), y_(y), w_(w), h_(h)
    +    { }
    +
    +    void handleRequest(const Http::Request& request,
    +		       Http::Response& response) {
    +      WRasterImage image("png", w_, h_);
    +      img_->generate(x_, y_, &image);
    +      image.handleRequest(request, response);
    +    }
    +
    +  private:
    +    MandelbrotImage *img_;
    +    int64_t x_, y_;
    +    int w_, h_;
    +  };
    +}
    +
    +MandelbrotImage::MandelbrotImage(int width, int height,
    +				 int64_t virtualWidth,
    +				 int64_t virtualHeight,
    +				 double bx1, double by1,
    +				 double bx2, double by2,
    +				 WContainerWidget *parent)
    +  : WVirtualImage(width, height, virtualWidth, virtualHeight, 256, parent),
    +    bx1_(bx1), by1_(by1),
    +    bwidth_(bx2 - bx1), bheight_(by2 - by1),
    +    maxDepth_(50),
    +    bailOut2_(30*30)
    +{
    +  enableDragging();
    +  redrawAll();
    +  scroll(width*2, virtualHeight/2 - height);
    +}
    +
    +void MandelbrotImage::zoomIn()
    +{
    +  resizeImage(imageWidth() * 2, imageHeight() * 2);
    +
    +  scrollTo(currentTopLeftX() * 2 + viewPortWidth()/2,
    +	   currentTopLeftY() * 2 + viewPortHeight()/2);
    +}
    +
    +void MandelbrotImage::zoomOut()
    +{
    +  scrollTo(currentTopLeftX() / 2 - viewPortWidth()/4,
    +	   currentTopLeftY() / 2 - viewPortHeight()/4);
    +
    +  resizeImage(std::max((int64_t)viewPortWidth(), imageWidth() / 2),
    +	      std::max((int64_t)viewPortHeight(), imageHeight() / 2));
    +}
    +
    +WResource *MandelbrotImage::render(int64_t x, int64_t y, int w, int h)
    +{
    +  return new MandelbrotResource(this, x, y, w, h);
    +}
    +
    +void MandelbrotImage::generate(int64_t x, int64_t y, WRasterImage *img)
    +{
    +  int w = img->width().toPixels();
    +  int h = img->height().toPixels();
    +
    +  std::cerr << "rendering: (" << x << "," << y << ") (" 
    +	    << x+w << "," << y+h << ")" << std::endl;
    +
    +  for (int i = 0; i < w; ++i)
    +    for (int j = 0; j < h; ++j) {
    +      double bx = convertPixelX(x + i);
    +      double by = convertPixelY(y + j);
    +      double d = calcPixel(bx, by);
    +
    +      int lowr = 100;
    +
    +      int r, g, b;
    +      if (d == maxDepth_)
    +	r = g = b = 0;
    +      else {
    +	r = lowr + (int)((d * (255-lowr))/maxDepth_);
    +	g = 0 + (int)((d * 255)/maxDepth_);
    +	b = 0;
    +      }
    +
    +      img->setPixel(i, j, WColor(r, g, b));
    +    }
    +}
    +
    +double MandelbrotImage::convertPixelX(int64_t x) const
    +{
    +  return bx1_ + ((double) (x) / imageWidth() * bwidth_);
    +}
    +
    +double MandelbrotImage::convertPixelY(int64_t y) const
    +{
    +  return by1_ + ((double) (y) / imageHeight() * bheight_);
    +}
    +
    +double MandelbrotImage::currentX1() const
    +{
    +  return convertPixelX(currentTopLeftX());
    +}
    +
    +double MandelbrotImage::currentY1() const
    +{
    +  return convertPixelY(currentTopLeftY());
    +}
    +
    +double MandelbrotImage::currentX2() const
    +{
    +  return convertPixelX(currentBottomRightX());
    +}
    +
    +double MandelbrotImage::currentY2() const
    +{
    +  return convertPixelY(currentBottomRightY());
    +}
    +
    +double MandelbrotImage::calcPixel(double x, double y)
    +{
    +  double x1 = x;
    +  double y1 = y;
    +
    +  for (int i = 0; i < maxDepth_; ++i) {
    +    double xs = x1 * x1;
    +    double ys = y1 * y1;
    +    double x2 = xs - ys + x;
    +    double y2 = x1 * y1 * 2 + y;
    +    x1 = x2;
    +    y1 = y2;
    +
    +    double z = xs + ys;
    +
    +    if (xs + ys > bailOut2_)
    +      return (double)i + 1 - log(log(sqrt(z)))/log(2.0);
    +  }
    +
    +  return maxDepth_;
    +}
    diff --git a/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.h b/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.h
    new file mode 100644
    index 0000000..168cce9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mandelbrot/MandelbrotImage.h
    @@ -0,0 +1,50 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef MANDELBROT_IMAGE_H_
    +#define MANDELBROT_IMAGE_H_
    +
    +#include <Wt/WVirtualImage>
    +
    +using namespace Wt;
    +
    +namespace Wt {
    +  class WRasterImage;
    +}
    +
    +class MandelbrotImage : public WVirtualImage
    +{
    +public:
    +  MandelbrotImage(int width, int height,
    +		  int64_t virtualWidth, int64_t virtualHeight,
    +		  double bx1, double by1,
    +		  double bx2, double by2,
    +		  WContainerWidget *parent = 0);
    +
    +  void zoomIn();
    +  void zoomOut();
    +
    +  void generate(int64_t x, int64_t y, WRasterImage *img);
    +
    +  double currentX1() const;
    +  double currentY1() const;
    +  double currentX2() const;
    +  double currentY2() const;
    +
    +private:
    +  double bx1_, by1_, bwidth_, bheight_;
    +  int maxDepth_;
    +  double bailOut2_;
    +
    +  virtual WResource *render(int64_t x, int64_t y, int w, int h);
    +  double calcPixel(double x, double y);
    +
    +  double convertPixelX(int64_t x) const;
    +  double convertPixelY(int64_t y) const;
    +};
    +
    +#endif // MANDELBROT_IMAGE_H_
    diff --git a/wt-3.1.7a/examples/mission/CMakeLists.txt b/wt-3.1.7a/examples/mission/CMakeLists.txt
    new file mode 100644
    index 0000000..4fab5bd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mission/CMakeLists.txt
    @@ -0,0 +1,13 @@
    +WT_ADD_EXAMPLE(impossible.wt impossible.C CountDownWidget.C)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/wt/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +)
    +
    +ADD_DEPENDENCIES(impossible.wt wt ${EXAMPLES_CONNECTOR})
    diff --git a/wt-3.1.7a/examples/mission/CountDownWidget.C b/wt-3.1.7a/examples/mission/CountDownWidget.C
    new file mode 100644
    index 0000000..7a59963
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mission/CountDownWidget.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WTimer>
    +#include "CountDownWidget.h"
    +
    +CountDownWidget::CountDownWidget(int start, int stop, unsigned msec,
    +				 WContainerWidget *parent)
    +  : WText(parent),
    +    done_(this),
    +    start_(start),
    +    stop_(stop)
    +{
    +  stop_ = std::min(start_ - 1, stop_);  // stop must be smaller than start
    +  current_ = start_;
    +
    +  timer_ = new WTimer(this);
    +  timer_->setInterval(msec);
    +  timer_->timeout().connect(this, &CountDownWidget::timerTick);
    +  timer_->start();
    +
    +  setText(boost::lexical_cast<std::string>(current_));
    +}
    +
    +void CountDownWidget::cancel()
    +{
    +  timer_->stop();
    +}
    +
    +void CountDownWidget::timerTick()
    +{
    +  setText(boost::lexical_cast<std::string>(--current_));
    +
    +  if (current_ <= stop_) {
    +    timer_->stop();
    +    done_.emit();
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/mission/CountDownWidget.h b/wt-3.1.7a/examples/mission/CountDownWidget.h
    new file mode 100644
    index 0000000..ea0470f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mission/CountDownWidget.h
    @@ -0,0 +1,61 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +// This may look like C code, but it's really -*- C++ -*-
    +#ifndef WCOUNTDOWNWIDGET_H_
    +#define WCOUNTDOWNWIDGET_H_
    +
    +#include <Wt/WText>
    +
    +namespace Wt {
    +  class WTimer;
    +}
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup missionexample Timer example
    + */
    +/*@{*/
    +
    +/*!\brief A widget which displays a decrementing number.
    + */
    +class CountDownWidget : public WText
    +{
    +public:
    +  /*! \brief Create a new CountDownWidget.
    +   *
    +   * The widget will count down from start to stop, decrementing
    +   * the number every msec milliseconds.
    +   */
    +  CountDownWidget(int start, int stop, unsigned msec,
    +		  WContainerWidget *parent = 0);
    +
    +  /*! \brief Signal emitted when the countdown reached stop.
    +   */
    +  Wt::Signal<void>& done() { return done_; }
    +
    +  /*! \brief Cancel the count down.
    +   */
    +  void cancel();
    +
    +private:
    +  Wt::Signal<void> done_;
    +  int start_;
    +  int stop_;
    +  unsigned msec_;
    +
    +  int current_;
    +
    +  WTimer *timer_;
    +
    +  /*! \brief Process one timer tick.
    +   */
    +  void timerTick();
    +};
    +
    +/*@}*/
    +
    +#endif // WCOUNTDOWNWIDGET_H_
    diff --git a/wt-3.1.7a/examples/mission/impossible.C b/wt-3.1.7a/examples/mission/impossible.C
    new file mode 100644
    index 0000000..72af791
    --- /dev/null
    +++ b/wt-3.1.7a/examples/mission/impossible.C
    @@ -0,0 +1,48 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +#include "CountDownWidget.h"
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *appl = new WApplication(env);
    +
    +  new WText("<h1>Your mission</h1>", appl->root());
    +  WText *secret 
    +    = new WText("Your mission, Jim, should you accept, is to create solid "
    +		"web applications.",
    +		appl->root());
    +
    +  new WBreak(appl->root()); new WBreak(appl->root());
    +
    +  new WText("This program will quit in ", appl->root());
    +  CountDownWidget *countdown = new CountDownWidget(10, 0, 1000, appl->root());
    +  new WText(" seconds.", appl->root());
    +
    +  new WBreak(appl->root()); new WBreak(appl->root());
    +
    +  WPushButton *cancelButton = new WPushButton("Cancel!", appl->root());
    +  WPushButton *quitButton = new WPushButton("Quit", appl->root());
    +  quitButton->clicked().connect(appl, &WApplication::quit);
    +
    +  countdown->done().connect(appl, &WApplication::quit);
    +  cancelButton->clicked().connect(countdown, &CountDownWidget::cancel);
    +  cancelButton->clicked().connect(cancelButton, &WFormWidget::disable);
    +  cancelButton->clicked().connect(secret, &WWidget::hide);
    +
    +  return appl;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/painting/CMakeLists.txt b/wt-3.1.7a/examples/painting/CMakeLists.txt
    new file mode 100644
    index 0000000..0a09a4b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/CMakeLists.txt
    @@ -0,0 +1,12 @@
    +WT_ADD_EXAMPLE(paintexample.wt
    +  PaintApplication.C PaintExample.C ShapesWidget.C
    +)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    diff --git a/wt-3.1.7a/examples/painting/PaintApplication.C b/wt-3.1.7a/examples/painting/PaintApplication.C
    new file mode 100644
    index 0000000..e4f6d3e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/PaintApplication.C
    @@ -0,0 +1,33 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +
    +#include "PaintExample.h"
    +
    +using namespace Wt;
    +
    +class PaintApplication: public WApplication
    +{
    +public:
    +  PaintApplication(const WEnvironment &env): WApplication(env) {
    +    setTitle("Paint example");
    +    
    +    useStyleSheet("painting.css");
    +    
    +    new PaintExample(root());
    +  }
    +};
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new PaintApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/painting/PaintExample.C b/wt-3.1.7a/examples/painting/PaintExample.C
    new file mode 100644
    index 0000000..90f6c6b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/PaintExample.C
    @@ -0,0 +1,93 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WGridLayout>
    +#include <Wt/WSlider>
    +#include <Wt/WText>
    +
    +#include "PaintExample.h"
    +#include "ShapesWidget.h"
    +
    +using namespace Wt;
    +
    +PaintExample::PaintExample(WContainerWidget *root, bool showTitle)
    +  : WContainerWidget(root)
    +{
    +  std::string text;
    +  if (showTitle)
    +    text += "<h2>Paint example</h2>";
    +
    +  text += 
    +    "<p>A simple example demonstrating cross-browser vector graphics."
    +    "</p>"
    +    "<p>The emweb logo below is painted using the Wt WPainter API from "
    +    "bezier paths, and rendered to the browser using inline SVG, inline VML "
    +    "or the HTML 5 &lt;canvas&gt; element."
    +    "</p>"
    +    "<p>"
    +    "The example also demonstrates the horizontal and vertical "
    +    "<a href=\"http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WSlider.html\" target=\"_blank\">"
    +    "WSlider</a> widgets (which are rendered using vector graphics). Here, "
    +    "the events of the WSlider widgets are used to scale and rotate the "
    +    "emweb logo."
    +    "</p>"
    +    "<p>"
    +    "In non-IE browsers, a different backend is used for positive or negative "
    +    "angles (SVG or HTML canvas)."
    +    "</p>";
    +
    +  new WText(text, this);
    +
    +  WContainerWidget *emweb = new WContainerWidget(this);
    +  emweb->setMargin(WLength::Auto, Left | Right);
    +
    +  WGridLayout *layout = new WGridLayout();
    +  emweb->setLayout(layout, AlignCenter | AlignTop);
    +
    +  WSlider *scaleSlider = new WSlider(Horizontal);
    +  scaleSlider->setMinimum(0);
    +  scaleSlider->setMaximum(20);
    +  scaleSlider->setValue(10);
    +  scaleSlider->setTickInterval(5);
    +  scaleSlider->setTickPosition(WSlider::TicksBothSides);
    +  scaleSlider->resize(300, 50);
    +  scaleSlider->sliderMoved().connect(this, &PaintExample::scaleShape);
    +
    +  layout->addWidget(scaleSlider, 0, 1, AlignCenter | AlignMiddle);
    +
    +  WSlider *rotateSlider = new WSlider(Vertical);
    +  rotateSlider->setMinimum(-30);
    +  rotateSlider->setMaximum(30);
    +  rotateSlider->setValue(0);
    +  rotateSlider->setTickInterval(10);
    +  rotateSlider->setTickPosition(WSlider::TicksBothSides);
    +  rotateSlider->resize(50, 400);
    +  rotateSlider->sliderMoved().connect(this, &PaintExample::rotateShape);
    +
    +  layout->addWidget(rotateSlider, 1, 0, AlignCenter | AlignMiddle);
    +
    +  shapes_ = new ShapesWidget();
    +  shapes_->setAngle(0.0);
    +  shapes_->setRelativeSize(0.5);
    +  shapes_->setPreferredMethod(WPaintedWidget::InlineSvgVml);
    +
    +  layout->addWidget(shapes_, 1, 1, AlignCenter | AlignMiddle);
    +}
    +
    +void PaintExample::rotateShape(int v)
    +{
    +  shapes_->setAngle(v / 2.0);
    +
    +  // Being silly: test alternate rendering method
    +  shapes_->setPreferredMethod(v < 0 ? WPaintedWidget::InlineSvgVml
    +			      : WPaintedWidget::HtmlCanvas);
    +}
    +
    +void PaintExample::scaleShape(int v)
    +{
    +  shapes_->setRelativeSize(0.1 + 0.9 * (v/20.0));
    +}
    diff --git a/wt-3.1.7a/examples/painting/PaintExample.h b/wt-3.1.7a/examples/painting/PaintExample.h
    new file mode 100644
    index 0000000..d362d40
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/PaintExample.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef PAINT_EXAMPLE_H_
    +#define PAINT_EXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +using namespace Wt;
    +
    +class ShapesWidget;
    +
    +class PaintExample : public WContainerWidget
    +{
    +public:
    +  PaintExample(WContainerWidget *root, bool showTitle=true);
    +
    +private:
    +  ShapesWidget *shapes_;
    +
    +  void rotateShape(int v);
    +  void scaleShape(int v);
    +};
    +
    +#endif // PAINT_EXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/painting/ShapesWidget.C b/wt-3.1.7a/examples/painting/ShapesWidget.C
    new file mode 100644
    index 0000000..ff9ac4b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/ShapesWidget.C
    @@ -0,0 +1,175 @@
    +
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ShapesWidget.h"
    +
    +#include <Wt/WPainter>
    +#include <Wt/WPainterPath>
    +#include <Wt/WPointF>
    +#include <Wt/WRectF>
    +
    +#include <math.h>
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace {
    +  // the blue emweb color
    +  WColor emweb(0x04, 0x7c, 0x93);
    +}
    +
    +ShapesWidget::ShapesWidget(WContainerWidget *parent)
    +  : WPaintedWidget(parent),
    +    angle_(0),
    +    size_(1)
    +{
    +  resize(710, 400);
    +}
    +
    +void ShapesWidget::setAngle(double angle)
    +{
    +  angle = std::max(-30.0, std::min(30.0, angle));
    +
    +  if (angle_ != angle) {
    +    angle_ = angle;
    +    update();
    +  }
    +}
    +
    +void ShapesWidget::setRelativeSize(double size)
    +{
    +  size = std::max(0.1, std::min(1.0, size));
    +
    +  if (size_ != size) {
    +    size_ = size;
    +    update();
    +  }
    +}
    +
    +void ShapesWidget::paintEvent(WPaintDevice *paintDevice)
    +{
    +  WPainter painter(paintDevice);
    +
    +  painter.setShadow(WShadow(10, 10, WColor(0, 0, 0, 50), 10));
    +  painter.setRenderHint(WPainter::Antialiasing);
    +
    +  painter.translate(width().value()/2, height().value()/2);
    +  painter.rotate(angle_);
    +  painter.scale(size_, size_);
    +  painter.translate(-width().value()/2 + 50, -height().value()/2 + 150);
    +
    +  drawEmwebLogo(painter);
    +}
    +
    +void ShapesWidget::drawEmwebE(WPainter& painter)
    +{
    +  WPainterPath p;
    +
    +  /* Path copied from our SVG for half of the E */
    +
    +  p.moveTo(46.835084,58.783624);
    +  p.cubicTo(45.700172,58.783624,35.350098,58.911502,24.656354,63.283309);
    +  p.cubicTo(8.7595992,69.78907,0,82.38499,0,98.809238);
    +  p.cubicTo(0,115.20152,08.7595992,127.82141,24.656354,134.31119);
    +  p.cubicTo(35.350098,138.69099,45.700172,138.81088,46.835084,138.81088);
    +  p.lineTo(94.509362,138.81088);
    +  p.lineTo(94.509362,117.58323);
    +  p.lineTo(46.835084,117.58323);
    +  p.cubicTo(46.811106,117.58323,39.466151,117.47134,32.608727,114.53815);
    +  p.cubicTo(25.095932,111.34122,21.747144,106.47389,21.747144,98.809238);
    +  p.cubicTo(21.747144,91.120612,25.095932,86.269265,32.608727,83.064338);
    +  p.cubicTo(39.466151,80.123159,46.811106,80.027251,46.89103,80.027251);
    +  p.lineTo(94.509362,80.027251);
    +  p.lineTo(94.509362,58.783624);
    +  p.lineTo(46.835084,58.783624);
    +
    +  painter.drawPath(p);
    +
    +  painter.save();
    +  painter.translate(0,-58.783624);
    +  painter.drawPath(p);
    +  painter.restore();
    +}
    +
    +void ShapesWidget::drawEmwebMW(WPainter& painter)
    +{
    +  WPainterPath p;
    +
    +  /* Path copied from our SVG for one fourth of the MW */
    +
    +  p.moveTo(120.59634,24.072913);
    +  p.cubicTo(116.12064,34.518895,115.98477,44.605222,115.98477,45.732141);
    +  p.lineTo(115.98477,138.81088);
    +  p.lineTo(137.7399,138.81088);
    +  p.lineTo(137.7399,45.732141);
    +  p.cubicTo(137.7399,45.708164,137.83581,38.53904,140.84892,31.841463);
    +  p.cubicTo(144.14176,24.512492,149.113,21.235634,156.98545,21.235634);
    +  p.cubicTo(164.8499,21.235634,169.81314,24.512492,173.10599,31.841463);
    +  p.cubicTo(176.10311,38.53904,176.215,45.708164,176.215,45.780095);
    +  p.lineTo(176.215,70.41343);
    +  p.lineTo(197.97014,70.41343);
    +  p.lineTo(197.97014,45.732141);
    +  p.cubicTo(197.97014,44.605222,197.83427,34.518895,193.35057,24.072913);
    +  p.cubicTo(186.70894,8.5517985,173.77734,0,156.99344,0);
    +  p.cubicTo(140.17756,0,127.25396,8.5517985,120.59634,24.072913);
    +
    +  /*
    +   * Paint it four times, translated and inverted
    +   */
    +
    +  painter.drawPath(p);
    +
    +  const double dx = 176. - 115.98477;
    +
    +  painter.save();
    +
    +  painter.translate(dx, 0);
    +  painter.drawPath(p);
    +
    +  painter.translate(dx, 0);
    +
    +  painter.scale(-1, -1);
    +  painter.translate(0, -138.81088);
    +  painter.translate(-115.98477 - 197.95 - dx, 0);
    +  painter.drawPath(p);
    +
    +  painter.translate(dx, 0);
    +  painter.drawPath(p);
    +
    +  painter.restore();
    +}
    +
    +void ShapesWidget::drawEmwebLogo(WPainter& painter)
    +{
    +  painter.save();
    +  painter.setPen(NoPen);
    +
    +  /*
    +   * The emweb logo can be drawn as 3 e's, and one combined m/w
    +   */
    +
    +  // Emweb
    +  painter.setBrush(black);
    +  drawEmwebE(painter);
    +
    +  // emwEb
    +  painter.save();
    +  painter.translate(397, 0);
    +  drawEmwebE(painter);
    +
    +  // emweB
    +  painter.translate(210, 0);
    +  painter.scale(-1, 1);
    +  drawEmwebE(painter);
    +
    +  painter.restore();
    +
    +  // eMWeb
    +  painter.setBrush(emweb);
    +  drawEmwebMW(painter);
    +
    +  painter.restore();
    +}
    diff --git a/wt-3.1.7a/examples/painting/ShapesWidget.h b/wt-3.1.7a/examples/painting/ShapesWidget.h
    new file mode 100644
    index 0000000..eabef4f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/ShapesWidget.h
    @@ -0,0 +1,42 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SHAPES_WIDGET_H_
    +#define SHAPES_WIDGET_H_
    +
    +#include <Wt/WPaintedWidget>
    +
    +namespace Wt {
    +  class WPainter;
    +}
    +
    +using namespace Wt;
    +
    +class ShapesWidget : public WPaintedWidget
    +{
    +public:
    +  ShapesWidget(WContainerWidget *parent = 0);
    +
    +  void setAngle(double angle);
    +  double angle() const { return angle_; }
    +
    +  void setRelativeSize(double size);
    +  double relativeSize() const { return size_; }
    +
    +protected:
    +  virtual void paintEvent(WPaintDevice *paintDevice);
    +
    +private:
    +  double angle_;
    +  double size_;
    +
    +  void drawEmwebLogo(WPainter& p);
    +  void drawEmwebE(WPainter& p);
    +  void drawEmwebMW(WPainter& p);
    +};
    +
    +#endif // SHAPES_WIDGET_H_
    diff --git a/wt-3.1.7a/examples/painting/painting.css b/wt-3.1.7a/examples/painting/painting.css
    new file mode 100644
    index 0000000..0212e8a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/painting/painting.css
    @@ -0,0 +1,3 @@
    +body {
    +  font-family:arial,sans-serif;
    +}
    diff --git a/wt-3.1.7a/examples/planner/AllEntriesDialog.C b/wt-3.1.7a/examples/planner/AllEntriesDialog.C
    new file mode 100644
    index 0000000..615b33e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/AllEntriesDialog.C
    @@ -0,0 +1,52 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "AllEntriesDialog.h"
    +#include "PlannerApplication.h"
    +#include "EntryDialog.h"
    +#include "Entry.h"
    +
    +#include <Wt/WTemplate>
    +#include <Wt/WString>
    +#include <Wt/WText>
    +#include <Wt/WPushButton>
    +
    +using namespace Wt;
    +
    +AllEntriesDialog::AllEntriesDialog(const WString& title, CalendarCell* cell)
    +  : WDialog(title)
    +{
    +  WTemplate* t = new WTemplate(tr("calendar.all-entries"), contents());
    +  WContainerWidget* wc = new WContainerWidget();
    +  t->bindWidget("entries", wc);
    +
    +  dbo::Session& session = PlannerApplication::plannerApplication()->session;
    +  dbo::Transaction transaction(session);
    +
    +  typedef dbo::collection< dbo::ptr<Entry> > Entries;
    +
    +  Entries entries = 
    +    cell->user()->entriesInRange(cell->date(), cell->date().addDays(1));
    +
    +  WString format = EntryDialog::timeFormat;
    +  for (Entries::const_iterator i = entries.begin(); i != entries.end(); ++i) {
    +    wc->addWidget(new WText((*i)->start.toString(format) + 
    +			    "-" + 
    +			    (*i)->stop.toString(format) + 
    +			    ": " + (*i)->summary));
    +  }
    +
    +  transaction.commit();
    +
    +  WPushButton* button = new WPushButton(tr("calendar.cell.all-entries.close"));
    +  t->bindWidget("close", button);
    +  button->clicked().connect(this, &AllEntriesDialog::closeDialog);
    +}
    +
    +void AllEntriesDialog::closeDialog()
    +{
    +  hide();
    +}
    diff --git a/wt-3.1.7a/examples/planner/AllEntriesDialog.h b/wt-3.1.7a/examples/planner/AllEntriesDialog.h
    new file mode 100644
    index 0000000..acfd9cd
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/AllEntriesDialog.h
    @@ -0,0 +1,24 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ALL_ENTRIES_DIALOG_H_
    +#define ALL_ENTRIES_DIALOG_H_
    +
    +#include <Wt/WDialog>
    +#include <Wt/WString>
    +
    +#include "CalendarCell.h"
    +
    +class AllEntriesDialog : public Wt::WDialog
    +{
    +public:
    +  AllEntriesDialog(const Wt::WString& title, CalendarCell* cell);
    +
    +private:
    +  void closeDialog();
    +};
    +
    +#endif // ALL_ENTRIES_DIALOG_H_
    diff --git a/wt-3.1.7a/examples/planner/CMakeLists.txt b/wt-3.1.7a/examples/planner/CMakeLists.txt
    new file mode 100644
    index 0000000..6bdbfe9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/CMakeLists.txt
    @@ -0,0 +1,24 @@
    +WT_ADD_EXAMPLE(planner.wt
    +  planner.C
    +  PlannerApplication.C
    +  UserAccount.C
    +  Shape.C
    +  ShapesWidget.C
    +  MyCaptcha.C
    +  Login.C
    +  TimeSuggestions.C
    +  EntryDialog.C
    +  AllEntriesDialog.C
    +  CalendarCell.C
    +  PlannerCalendar.C)
    +
    +TARGET_LINK_LIBRARIES(planner.wt wtdbo wtdbosqlite3)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    diff --git a/wt-3.1.7a/examples/planner/CalendarCell.C b/wt-3.1.7a/examples/planner/CalendarCell.C
    new file mode 100644
    index 0000000..4a67644
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/CalendarCell.C
    @@ -0,0 +1,96 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "CalendarCell.h"
    +#include "EntryDialog.h"
    +#include "AllEntriesDialog.h"
    +#include "PlannerApplication.h"
    +#include "Entry.h"
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WDate>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +CalendarCell::CalendarCell()
    +  : WContainerWidget()
    +{
    +  resize(100, 120);
    +
    +  setStyleClass("cell");
    +  setToolTip(tr("calendar.cell.tooltip"));
    +
    +  clicked().connect(this, &CalendarCell::showEntryDialog);
    +}
    +
    +void CalendarCell::update(const dbo::ptr<UserAccount>& user, const WDate& date)
    +{
    +  date_ = date;
    +  user_ = user;
    +
    +  clear();
    +
    +  dbo::Session& session = PlannerApplication::plannerApplication()->session;
    +  dbo::Transaction transaction(session);
    +  
    +  WString day;
    +  day += boost::lexical_cast<std::string>(date.day());
    +  if (date.day() == 1)
    +    day += " " + WDate::longMonthName(date.month());
    +  WText* header = new WText(day);
    +  header->setStyleClass("cell-header");
    +  addWidget(header);
    +
    +  typedef dbo::collection< dbo::ptr<Entry> > Entries;
    +  Entries entries = user->entriesInRange(date, date.addDays(1));
    +
    +  const unsigned maxEntries = 4;
    +  unsigned counter = 0;
    +  for (Entries::const_iterator i = entries.begin();
    +       i != entries.end(); ++i, ++counter) {
    +    if (counter == maxEntries) {
    +      WText* extra = 
    +	new WText(tr("calendar.cell.extra")
    +		  .arg((int)(entries.size() - maxEntries)));
    +      extra->setStyleClass("cell-extra");
    +      addWidget(extra);
    +
    +      extra->clicked().preventPropagation();
    +      extra->clicked().connect(this, &CalendarCell::showAllEntriesDialog);
    +      
    +      break;
    +    }
    +
    +    WString format = EntryDialog::timeFormat;
    +    addWidget(new WText((*i)->start.toString(format) +
    +			"-" + 
    +			(*i)->stop.toString(format) + 
    +			": " + (*i)->summary));
    +  }
    +
    +  transaction.commit();
    +}
    +
    +void CalendarCell::showEntryDialog()
    +{
    +  WString title =
    +    tr("calendar.entry.title").arg(date_.toString("ddd, d MMM yyyy"));
    +
    +  EntryDialog* ed = new EntryDialog(title, this);
    +  ed->show();
    +}
    +
    +void CalendarCell::showAllEntriesDialog()
    +{
    +  WString title =
    +    tr("calendar.cell.all-entries.title")
    +    .arg(date_.toString("ddd, d MMM yyyy"));
    +  
    +  AllEntriesDialog* dialog = new AllEntriesDialog(title, this);
    +  dialog->show();
    +}
    diff --git a/wt-3.1.7a/examples/planner/CalendarCell.h b/wt-3.1.7a/examples/planner/CalendarCell.h
    new file mode 100644
    index 0000000..5880ba0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/CalendarCell.h
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CALENDAR_CELL_H_
    +#define CALENDAR_CELL_H_
    +
    +#include "UserAccount.h"
    +
    +#include <Wt/WContainerWidget>
    +
    +class CalendarCell : public Wt::WContainerWidget
    +{
    +public:
    +  CalendarCell();
    +
    +  void update(const dbo::ptr<UserAccount>& user, const Wt::WDate& date);
    +  
    +  Wt::WDate date() {return date_; }
    +  dbo::ptr<UserAccount> user() { return user_; }  
    +
    +private:
    +  Wt::WDate date_;
    +  dbo::ptr<UserAccount> user_;
    +
    +  void showEntryDialog();
    +  void showAllEntriesDialog();
    +};
    +
    +#endif //CALENDAR_CELL_H_
    diff --git a/wt-3.1.7a/examples/planner/Entry.h b/wt-3.1.7a/examples/planner/Entry.h
    new file mode 100644
    index 0000000..39bc1f4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/Entry.h
    @@ -0,0 +1,40 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ENTRY_H_
    +#define ENTRY_H_
    +
    +#include <Wt/WDateTime>
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/WtSqlTraits>
    +
    +class UserAccount;
    +
    +namespace dbo = Wt::Dbo;
    +
    +class Entry {
    +public:
    +  dbo::ptr<UserAccount> user;
    +
    +  Wt::WDateTime start;
    +  Wt::WDateTime stop;
    +  Wt::WString summary;
    +  Wt::WString text;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::belongsTo(a, user, "user");
    +
    +    dbo::field(a, start, "start");
    +    dbo::field(a, stop, "stop");
    +    dbo::field(a, summary, "summary");
    +    dbo::field(a, text, "text");
    +  }
    +};
    +
    +#endif //ENTRY_H_
    diff --git a/wt-3.1.7a/examples/planner/EntryDialog.C b/wt-3.1.7a/examples/planner/EntryDialog.C
    new file mode 100644
    index 0000000..820e99f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/EntryDialog.C
    @@ -0,0 +1,96 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "EntryDialog.h"
    +#include "TimeSuggestions.h"
    +#include "Entry.h"
    +#include "PlannerApplication.h"
    +
    +#include <Wt/WTemplate>
    +#include <Wt/WPushButton>
    +#include <Wt/WRegExpValidator>
    +
    +#include <Wt/Dbo/WtSqlTraits>
    +
    +using namespace Wt;
    +using namespace Wt::Dbo;
    +
    +WString EntryDialog::timeFormat = WString::fromUTF8("HH:mm");
    +
    +EntryDialog::EntryDialog(const WString& title, CalendarCell* cell) 
    +  : WDialog(title)
    +{
    +  cell_ = cell;
    +
    +  WTemplate* t = new WTemplate(contents());
    +  t->setTemplateText(tr("calendar.entry"));
    +  
    +  summary_ = new WLineEdit();
    +  summary_->setValidator(new WValidator());
    +  t->bindWidget("summary", summary_);
    +		
    +  WValidator* timeValidator = 
    +    new WRegExpValidator("^([0-1][0-9]|[2][0-3]):([0-5][0-9])$");
    +  start_ = new WLineEdit();
    +  start_->setTextSize(5);
    +  start_->setValidator(timeValidator);
    +  t->bindWidget("start", start_);
    +  stop_ = new WLineEdit();
    +  stop_->setTextSize(5);
    +  stop_->setValidator(timeValidator);
    +  t->bindWidget("stop", stop_);
    +  description_ = new WTextArea();
    +  t->bindWidget("description", description_);
    +		
    +  TimeSuggestions* suggestions = new TimeSuggestions(contents());
    +  suggestions->forEdit(start_);
    +  suggestions->forEdit(stop_);
    +
    +  WPushButton* ok = new WPushButton(tr("calendar.entry.ok"));
    +  t->bindWidget("ok", ok);
    +  ok->clicked().connect(this, &EntryDialog::ok);
    +
    +  WPushButton* cancel = new WPushButton(tr("calendar.entry.cancel"));
    +  t->bindWidget("cancel", cancel);
    +  cancel->clicked().connect(this, &EntryDialog::cancel);
    +}
    +
    +WDateTime EntryDialog::timeStamp(const WString& time, const WDate& day)
    +{
    +  WString timeStamp = day.toString("dd/MM/yyyy ");
    +  timeStamp += time;
    +  return WDateTime::fromString(timeStamp, "dd/MM/yyyy " + timeFormat);
    +}
    +
    +WString EntryDialog::description() 
    +{
    +  return description_->text();
    +}
    +
    +void EntryDialog::ok()
    +{
    +  Session& session = PlannerApplication::plannerApplication()->session;
    +  Transaction transaction(session);
    +
    +  ptr<Entry> e = 
    +    PlannerApplication::plannerApplication()->session.add(new Entry());
    +  e.modify()->start = timeStamp(start_->text(), cell_->date());
    +  e.modify()->stop = timeStamp(stop_->text(), cell_->date());
    +  e.modify()->summary = summary_->text().toUTF8();
    +  e.modify()->text = description().toUTF8();
    +  e.modify()->user = cell_->user();
    +  
    +  cell_->update(cell_->user(), cell_->date());
    +  
    +  transaction.commit();
    +
    +  hide();
    +}
    +
    +void EntryDialog::cancel()
    +{
    +  hide();
    +}
    diff --git a/wt-3.1.7a/examples/planner/EntryDialog.h b/wt-3.1.7a/examples/planner/EntryDialog.h
    new file mode 100644
    index 0000000..af6a48f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/EntryDialog.h
    @@ -0,0 +1,40 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef ENTRY_DIALOG_H_
    +#define ENTRY_DIALOG_H_
    +
    +#include <Wt/WDialog>
    +#include <Wt/WDate>
    +#include <Wt/WDateTime>
    +#include <Wt/WLineEdit>
    +#include <Wt/WTextArea>
    +
    +#include "CalendarCell.h"
    +
    +class EntryDialog : public Wt::WDialog {
    + public:
    +  EntryDialog(const Wt::WString& title, CalendarCell* cell);
    +
    + private:
    +  Wt::WDateTime timeStamp(const Wt::WString& time, const Wt::WDate& day);
    +  Wt::WString description();
    +  void ok();
    +  void cancel();
    +
    + public:
    +  static Wt::WString timeFormat;
    +
    + private:
    +  CalendarCell* cell_;
    +
    +  Wt::WLineEdit* summary_;
    +  Wt::WLineEdit* start_;
    +  Wt::WLineEdit* stop_;
    +  Wt::WTextArea* description_;
    +};
    +
    +#endif //ENTRY_DIALOG_H_
    diff --git a/wt-3.1.7a/examples/planner/Login.C b/wt-3.1.7a/examples/planner/Login.C
    new file mode 100644
    index 0000000..13c52c3
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/Login.C
    @@ -0,0 +1,62 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Login.h"
    +
    +#include <Wt/WLabel>
    +
    +using namespace Wt;
    +
    +Login::Login(WContainerWidget* parent)
    +  : WContainerWidget(parent),
    +    loggedIn_(this)
    +{
    +  setStyleClass("login");
    +		 
    +  WLabel* userNameL = new WLabel(tr("login.userName"), this);
    +  userNameEdit_ = new WLineEdit(this);
    +  userNameEdit_->setFocus();
    +  userNameEdit_->setValidator(new WValidator(true));
    +  userNameL->setBuddy(userNameEdit_);
    +
    +  userNameEdit_->enterPressed().connect(this, &Login::userNameEnterPressed);
    +  
    +  loginButton_ = new WPushButton(tr("login.loginButton"), this);
    +  loginButton_->hide();
    +  loginButton_->clicked().connect(this, &Login::loginClicked);
    +
    +  captcha_ = new MyCaptcha(this, 150, 70);
    +  captcha_->completed().connect(this, &Login::captchaCompleted);
    +}
    +
    +void Login::captchaCompleted()
    +{
    +  if (userNameEdit_->validate() != WValidator::Valid) {
    +    captcha_->hide();
    +    loginButton_->show();
    +    userNameEdit_->setFocus();
    +  } else {
    +    login();
    +  }
    +}
    +
    +void Login::userNameEnterPressed()
    +{
    +  if (userNameEdit_->validate() == WValidator::Valid 
    +      && !loginButton_->isHidden())
    +    login();
    +}
    +
    +void Login::loginClicked(const WMouseEvent& me)
    +{
    +  if (userNameEdit_->validate() == WValidator::Valid)
    +    login();
    +}
    +
    +void Login::login()
    +{
    +  loggedIn_.emit(userNameEdit_->text());
    +}
    diff --git a/wt-3.1.7a/examples/planner/Login.h b/wt-3.1.7a/examples/planner/Login.h
    new file mode 100644
    index 0000000..e7105eb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/Login.h
    @@ -0,0 +1,36 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef LOGIN_H_
    +#define LOGIN_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WLineEdit>
    +
    +#include "MyCaptcha.h"
    +
    +class Login : public Wt::WContainerWidget
    +{
    +public:
    +  Login(Wt::WContainerWidget* parent);
    +
    +  Wt::Signal<Wt::WString>& loggedIn() { return loggedIn_; }
    +
    +private:
    +  void captchaCompleted();
    +  void userNameEnterPressed();
    +  void loginClicked(const Wt::WMouseEvent& me);
    +  void login();
    +
    +private:
    +  Wt::Signal<Wt::WString> loggedIn_;
    +  Wt::WLineEdit *userNameEdit_;
    +  MyCaptcha *captcha_;
    +  Wt::WPushButton *loginButton_;
    +};
    +
    +#endif // LOGIN_H_
    diff --git a/wt-3.1.7a/examples/planner/MyCaptcha.C b/wt-3.1.7a/examples/planner/MyCaptcha.C
    new file mode 100644
    index 0000000..c223814
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/MyCaptcha.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "MyCaptcha.h"
    +
    +using namespace Wt;
    +
    +MyCaptcha::MyCaptcha(WContainerWidget* parent, 
    +		     const int width, const int height)
    +  : WContainerWidget(parent),
    +    completed_(this)
    +{
    +  setStyleClass("captcha");
    +		
    +  captchaMessage_ = new WText(this);
    +
    +  shapesWidget_ = new ShapesWidget(this);
    +  shapesWidget_->resize(width, height);
    +
    +  shapesWidget_->clicked().connect(this, &MyCaptcha::handleClick);
    +
    +  regenerate();
    +}
    +  
    +void MyCaptcha::handleClick(const WMouseEvent& me)
    +{
    +  if (shapesWidget_->correctlyClicked(me)) 
    +    completed_.emit();
    +  else
    +    regenerate();
    +}
    +
    +void MyCaptcha::regenerate()
    +{
    +  shapesWidget_->initShapes();
    +  shapesWidget_->update();
    +  captchaMessage_->setText(tr("captcha.message")
    +			   .arg(shapesWidget_->selectedColor())
    +			   .arg(shapesWidget_->selectedShape()));
    +}
    diff --git a/wt-3.1.7a/examples/planner/MyCaptcha.h b/wt-3.1.7a/examples/planner/MyCaptcha.h
    new file mode 100644
    index 0000000..c56b20d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/MyCaptcha.h
    @@ -0,0 +1,33 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef MY_CAPTCHA_H_
    +#define MY_CAPTCHA_H_
    +
    +#include <Wt/WSignal>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WText>
    +
    +#include "ShapesWidget.h"
    +
    +class MyCaptcha : public Wt::WContainerWidget
    +{
    +public:
    +  MyCaptcha(Wt::WContainerWidget* parent, const int width, const int height);
    +
    +  Wt::Signal<void>& completed() { return completed_; }
    +  
    +private:
    +  Wt::Signal<void> completed_;
    +  ShapesWidget* shapesWidget_;
    +  Wt::WText* captchaMessage_;
    +
    +  void regenerate();
    +  void handleClick(const Wt::WMouseEvent& me);  
    +};
    +
    +#endif //MY_CAPTCHA_H_
    diff --git a/wt-3.1.7a/examples/planner/PlannerApplication.C b/wt-3.1.7a/examples/planner/PlannerApplication.C
    new file mode 100644
    index 0000000..5650751
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/PlannerApplication.C
    @@ -0,0 +1,60 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WLineEdit>
    +#include <Wt/WLogger>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +#include "PlannerApplication.h"
    +
    +#include "Entry.h"
    +#include "Login.h"
    +#include "PlannerCalendar.h"
    +#include "UserAccount.h"
    +
    +using namespace Wt;
    +
    +PlannerApplication::PlannerApplication(const WEnvironment& env)
    +  : WApplication(env),
    +    sqlite3_(Wt::WApplication::appRoot() + "planner.db")
    +{
    +  session.setConnection(sqlite3_);
    +  sqlite3_.setProperty("show-queries", "true");
    +
    +  session.mapClass<UserAccount>("user_account");
    +  session.mapClass<Entry>("entry");
    +
    +  dbo::Transaction transaction(session);
    +  try {
    +    session.createTables();
    +    log("info") << "Database created";
    +  } catch (...) {
    +    log("info") << "Using existing database";    
    +  }
    +
    +  transaction.commit();
    +
    +  messageResourceBundle().use(appRoot() + "planner");
    +  messageResourceBundle().use(appRoot() + "captcha");
    +  messageResourceBundle().use(appRoot() + "calendar");
    +
    +  useStyleSheet("planner.css");
    +
    +  Login *login = new Login(root());
    +  login->loggedIn().connect(this, &PlannerApplication::login);
    +}
    +
    +void PlannerApplication::login(const WString& user)
    +{
    +  root()->clear();
    +
    +  dbo::ptr<UserAccount> ua = UserAccount::login(session, user);
    +  new PlannerCalendar(root(), ua);
    +}
    +
    diff --git a/wt-3.1.7a/examples/planner/PlannerApplication.h b/wt-3.1.7a/examples/planner/PlannerApplication.h
    new file mode 100644
    index 0000000..4bc4296
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/PlannerApplication.h
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef PLANNER_APPLICATION_H_
    +#define PLANNER_APPLICATION_H_
    +
    +#include <Wt/WApplication>
    +#include <Wt/WString>
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Sqlite3>
    +
    +/*
    + * A planner application class which demonstrates how to customize
    + * cell rendering in a calendar, paint a captcha in WPaintedWidget and
    + * connect to a database via Dbo.
    + */
    +class PlannerApplication : public Wt::WApplication
    +{
    +public:
    +  Wt::Dbo::Session session;
    +
    +  PlannerApplication(const Wt::WEnvironment& env);
    +
    +  static PlannerApplication* plannerApplication() {
    +    return (PlannerApplication*)WApplication::instance();
    +  }
    +
    +private:
    +  Wt::Dbo::backend::Sqlite3 sqlite3_;
    +
    +  void login(const Wt::WString& user);
    +};
    +
    +#endif //PLANNER_APPLICATION_H_
    diff --git a/wt-3.1.7a/examples/planner/PlannerCalendar.C b/wt-3.1.7a/examples/planner/PlannerCalendar.C
    new file mode 100644
    index 0000000..308d58f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/PlannerCalendar.C
    @@ -0,0 +1,32 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "PlannerCalendar.h"
    +#include "CalendarCell.h"
    +#include "Entry.h"
    +
    +using namespace Wt;
    +
    +PlannerCalendar::PlannerCalendar(WContainerWidget* parent, 
    +				 dbo::ptr<UserAccount> user)
    +  : WCalendar(parent),
    +    user_(user)
    +{
    +  setStyleClass(styleClass() + " calendar");
    +  
    +  setSelectionMode(NoSelection);
    +}
    +
    +WWidget* PlannerCalendar::renderCell(WWidget* widget, const WDate& date)
    +{
    +  if (!widget) 
    +    widget = new CalendarCell();
    +		
    +  CalendarCell* cc = (CalendarCell*)widget;
    +  cc->update(user_, date);
    +		
    +  return cc;
    +}
    diff --git a/wt-3.1.7a/examples/planner/PlannerCalendar.h b/wt-3.1.7a/examples/planner/PlannerCalendar.h
    new file mode 100644
    index 0000000..ef6a8ab
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/PlannerCalendar.h
    @@ -0,0 +1,28 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef PLANNER_CALENDAR_H_
    +#define PLANNER_CALENDAR_H_
    +
    +#include "UserAccount.h"
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/WCalendar>
    +
    +class PlannerCalendar : public Wt::WCalendar
    +{
    +public: 
    +  PlannerCalendar(Wt::WContainerWidget* parent, 
    +		  dbo::ptr<UserAccount> user);
    +protected:
    +  virtual Wt::WWidget* renderCell(Wt::WWidget* widget, const Wt::WDate& date);
    + 
    +private:
    +  dbo::ptr<UserAccount> user_;
    +};
    +
    +#endif //PLANNER_CALENDAR_H_
    diff --git a/wt-3.1.7a/examples/planner/Shape.C b/wt-3.1.7a/examples/planner/Shape.C
    new file mode 100644
    index 0000000..330c247
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/Shape.C
    @@ -0,0 +1,96 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Shape.h"
    +
    +#include <Wt/WPainterPath>
    +
    +#include <math.h>
    +
    +using namespace Wt;
    +
    +Shape::~Shape() 
    +{
    +
    +}
    +
    +Circle::Circle(const WPointF& center, 
    +	       const ShapeColor& color, 
    +	       const double size)
    +  : Shape(center, color, size)
    +{
    +
    +}
    +
    +
    +
    +bool Circle::contains(const WPointF& point) const
    +{
    +  return distanceTo(center().x(), 
    +		    center().y(), 
    +		    point.x(), 
    +		    point.y()) 
    +    <= size();
    +}
    +
    +WString Circle::shapeName() const
    +{
    +  return WString::tr("captcha.circle");
    +}
    + 
    +double Circle::distanceTo(const double x1, const double y1, 
    +			  const double x2, const double y2) const
    +{
    +  return sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
    +}
    +
    +void Circle::paint(Wt::WPainter& painter) const
    +{
    +  WBrush b;
    +  b.setStyle(SolidPattern);
    +  b.setColor(color());
    +  
    +  WPainterPath pp;
    +  pp.addEllipse(center().x() - size(), 
    +		center().y() - size(), 
    +		size() * 2, size() * 2);
    +  
    +  painter.fillPath(pp, b);
    +}
    +
    +Rectangle::Rectangle(const WPointF& center, 
    +		     const ShapeColor& color, 
    +		     const double size)
    +  : Shape(center, color, size)
    +{
    +
    +}
    +
    +bool Rectangle::contains(const WPointF& point) const
    +{
    +  return WRectF(center().x(), 
    +		center().y(), 
    +		size(), 
    +		size()).
    +    contains(point);
    +}
    +
    +WString Rectangle::shapeName() const
    +{
    +  return WString::tr("captcha.rectangle");
    +}
    +
    +void Rectangle::paint(Wt::WPainter& painter) const
    +{
    +  WBrush b;
    +  b.setStyle(SolidPattern);
    +  b.setColor(color());
    +  
    +  WPainterPath pp;
    +  pp.addRect(WRectF(center().x(), center().y(), size(), size()));
    +  
    +  painter.fillPath(pp, b);
    +}
    diff --git a/wt-3.1.7a/examples/planner/Shape.h b/wt-3.1.7a/examples/planner/Shape.h
    new file mode 100644
    index 0000000..6a32493
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/Shape.h
    @@ -0,0 +1,93 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SHAPE_H_
    +#define SHAPE_H_
    +
    +#include <Wt/WPainter>
    +#include <Wt/WColor>
    +#include <Wt/WString>
    +
    +class ShapeColor : public Wt::WColor
    +{
    +public:
    +  ShapeColor(const Wt::WColor& color, const Wt::WString& colorName)
    +    : WColor(color),
    +      colorName_(colorName)
    +  { }
    +
    +  Wt::WString colorName() {
    +    return colorName_;
    +  }
    +
    +private:
    +  Wt::WString colorName_;
    +};
    +
    +class Shape
    +{
    +public:
    +  Shape(const Wt::WPointF& center, const ShapeColor& color, const double size) 
    +    : center_(center),
    +      color_(color),
    +      size_(size)
    +  {}
    +
    +  virtual ~Shape();
    +
    +  virtual bool contains(const Wt::WPointF& point) const =0;
    +  virtual Wt::WString shapeName() const =0;
    +  virtual void paint(Wt::WPainter& painter) const =0;
    +
    +  ShapeColor color() const {
    +    return color_;
    +  }
    +
    +  double size() const {
    +    return size_;
    +  }
    +
    +protected:
    +  Wt::WPointF center() const {
    +    return center_;
    +  }
    +
    +private:
    +  Wt::WPointF center_;
    +  ShapeColor color_;
    +  double size_;
    +};
    +
    +class Circle : public Shape
    +{
    +public:
    +  Circle(const Wt::WPointF& center, 
    +	 const ShapeColor& color, 
    +	 const double size);
    +  
    +  virtual bool contains(const Wt::WPointF& point) const;
    +  virtual Wt::WString shapeName() const;
    +  virtual void paint(Wt::WPainter& painter) const;
    + 
    + private:
    +  double distanceTo(const double x1, const double y1, 
    +		    const double x2, const double y2) const;
    +};
    +
    +class Rectangle : public Shape
    +{
    +public:
    +  Rectangle(const Wt::WPointF& center, 
    +	    const ShapeColor& color, 
    +	    const double size);
    +
    +  virtual bool contains(const Wt::WPointF& point) const;
    +  virtual Wt::WString shapeName() const;
    +  virtual void paint(Wt::WPainter& painter) const;
    +};
    +
    +#endif // SHAPE_H_
    diff --git a/wt-3.1.7a/examples/planner/ShapesWidget.C b/wt-3.1.7a/examples/planner/ShapesWidget.C
    new file mode 100644
    index 0000000..3235982
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/ShapesWidget.C
    @@ -0,0 +1,134 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ShapesWidget.h"
    +
    +#include <stdio.h>
    +#include <stdlib.h>
    +#include <time.h>
    +
    +#include <Wt/WPainter>
    +#include <Wt/WGlobal>
    +
    +using namespace Wt;
    +
    +ShapesWidget::ShapesWidget(WContainerWidget* parent) 
    +  : WPaintedWidget(parent),
    +    toSelect_(0)
    +{}
    +
    +ShapesWidget::~ShapesWidget()
    +{
    +  cleanupShapes();
    +}
    +
    +WString ShapesWidget::selectedColor()
    +{
    +  return toSelect_->color().colorName();
    +}
    +
    +WString ShapesWidget::selectedShape()
    +{
    +  return toSelect_->shapeName();
    +}
    +
    +bool ShapesWidget::correctlyClicked(const WMouseEvent& me)
    +{
    +  return toSelect_->contains(WPointF(me.widget().x, me.widget().y));
    +}
    +  
    +double ShapesWidget::randomDouble()
    +{
    +  return rand() / (double(RAND_MAX) + 1); 
    +}
    +
    +int ShapesWidget::randomInt(const unsigned max) 
    +{
    +  return (rand() % max);
    +}
    +
    +void ShapesWidget::cleanupShapes() 
    +{
    +  for (unsigned i = 0; i < shapes_.size(); i++) {
    +    delete shapes_[i];
    +  }
    +  shapes_.clear();
    +  toSelect_ = 0;
    +}
    +
    +void ShapesWidget::initShapes()
    +{
    +  cleanupShapes();
    +  
    +  const unsigned numberOfShapes = 5;
    +
    +  unsigned i = 1;
    +	
    +  toSelect_ = createRandomShape();
    +  while (i < numberOfShapes) {
    +    Shape* s = createRandomShape();
    +    if (!sameShapeAndColor(s, toSelect_)) {
    +      shapes_.push_back(s);
    +      i++;
    +    } else {
    +      delete s;
    +    }
    +  }
    +
    +  shapes_.insert(shapes_.begin() + randomInt((int)shapes_.size()), toSelect_);
    +}
    +
    +void ShapesWidget::paintEvent(WPaintDevice *paintDevice) 
    +{
    +  WPainter painter(paintDevice);
    +
    +  for (unsigned i = 0; i < shapes_.size(); i++) {
    +    Shape* s = shapes_[i];
    +    s->paint(painter);
    +  }
    +}
    +
    +bool ShapesWidget::sameShapeAndColor(const Shape* s1, const Shape* s2)
    +{
    +  return s1->shapeName() == s2->shapeName() 
    +    && s1->color() == s2->color();
    +}
    +
    +ShapeColor ShapesWidget::createRandomColor() 
    +{
    +  static const unsigned amountOfColors = 4;
    +  
    +  switch (randomInt(amountOfColors)) {
    +  case 0:
    +    return ShapeColor(red, WString::tr("captcha.red")); 
    +  case 1:
    +    return ShapeColor(green, WString::tr("captcha.green")); 
    +  case 2:
    +    return ShapeColor(blue, WString::tr("captcha.blue")); 
    +  case 3:
    +    return ShapeColor(yellow, WString::tr("captcha.yellow")); 
    +  default:
    +    return ShapeColor(black, WString("Invalid color")); 
    +  }
    +}
    +
    +Shape* ShapesWidget::createRandomShape()
    +{
    +  double size = 6 + randomDouble() * 6;
    +
    +  ShapeColor c = createRandomColor();
    +		
    +  double x = size + randomDouble() * (width().value() - 2 * size);
    +  double y = size + randomDouble() * (height().value() - 2 * size);
    +
    +  const unsigned amountOfShapes = 2;
    +  
    +  unsigned shapeId = randomInt(amountOfShapes);
    +  if (shapeId == 0)
    +    return new Circle(WPointF(x, y), c, size);
    +  else
    +    return new Rectangle(WPointF(x, y), c, size);
    +}
    diff --git a/wt-3.1.7a/examples/planner/ShapesWidget.h b/wt-3.1.7a/examples/planner/ShapesWidget.h
    new file mode 100644
    index 0000000..6a9d843
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/ShapesWidget.h
    @@ -0,0 +1,43 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SHAPES_WIDGET_H_
    +#define SHAPES_WIDGET_H_
    +
    +#include "Shape.h"
    +
    +#include <Wt/WPaintedWidget>
    +#include <Wt/WPaintDevice>
    +
    +class ShapesWidget : public Wt::WPaintedWidget
    +{
    +public:
    +  ShapesWidget(Wt::WContainerWidget* parent);
    +  ~ShapesWidget();
    +
    +  Wt::WString selectedColor();
    +  Wt::WString selectedShape();
    +  bool correctlyClicked(const Wt::WMouseEvent& me);
    +  void initShapes();
    +  
    +protected:
    +  virtual void paintEvent(Wt::WPaintDevice *paintDevice);
    +
    +private:
    +  int randomInt(const unsigned max);
    +  double randomDouble();
    +  bool sameShapeAndColor(const Shape* s1, const Shape* s2);
    +  ShapeColor createRandomColor();
    +  Shape* createRandomShape();
    +  void cleanupShapes();
    +
    +private:
    +  std::vector<Shape*> shapes_;
    +  Shape* toSelect_;
    +};
    +
    +#endif //SHAPES_WIDGET_H_
    diff --git a/wt-3.1.7a/examples/planner/TimeSuggestions.C b/wt-3.1.7a/examples/planner/TimeSuggestions.C
    new file mode 100644
    index 0000000..2c66184
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/TimeSuggestions.C
    @@ -0,0 +1,42 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "TimeSuggestions.h"
    +
    +#include <stdio.h>
    +
    +using namespace Wt;
    +
    +namespace {
    +  WSuggestionPopup::Options contactOptions
    +  = { "<b>",         // highlightBeginTag
    +      "</b>",        // highlightEndTag
    +      0,             // listSeparator
    +      " \\n",        // whitespace
    +      "0",           // wordSeparators
    +      ""             // appendReplacedText
    +    };
    +}
    +
    +TimeSuggestions::TimeSuggestions(WContainerWidget* parent)
    +  : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
    +                     WSuggestionPopup::generateReplacerJS(contactOptions),
    +                     parent)
    +{
    +  for (unsigned i = 0; i < 24; i++) {
    +    char buffer [25];
    +    sprintf(buffer, "%02d", i);
    +    std::string h = buffer;
    +    
    +    addSuggestion(WString(h + ":00"));
    +    addSuggestion(WString(h + ":30"));
    +  }
    +}
    +
    +void TimeSuggestions::addSuggestion(const WString& suggestion)
    +{
    +  WSuggestionPopup::addSuggestion(suggestion, suggestion);
    +}
    diff --git a/wt-3.1.7a/examples/planner/TimeSuggestions.h b/wt-3.1.7a/examples/planner/TimeSuggestions.h
    new file mode 100644
    index 0000000..253f7d7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/TimeSuggestions.h
    @@ -0,0 +1,23 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef TIME_SUGGESTIONS_H_
    +#define TIME_SUGGESTIONS_H_
    +
    +#include <Wt/WSuggestionPopup>
    +
    +#include <string>
    +
    +class TimeSuggestions : public Wt::WSuggestionPopup
    +{
    + public:
    +  TimeSuggestions(Wt::WContainerWidget *parent = 0);
    +  
    + private:
    +  void addSuggestion(const Wt::WString& suggestion);
    +};
    +
    +#endif //TIME_SUGGESTIONS_H_
    diff --git a/wt-3.1.7a/examples/planner/UserAccount.C b/wt-3.1.7a/examples/planner/UserAccount.C
    new file mode 100644
    index 0000000..5ec3b2a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/UserAccount.C
    @@ -0,0 +1,51 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "UserAccount.h"
    +#include "Entry.h"
    +
    +#include <Wt/WApplication>
    +#include <Wt/WLogger>
    +
    +#include <Wt/Dbo/WtSqlTraits>
    +
    +using namespace Wt;
    +using namespace Wt::Dbo;
    +
    +UserAccount::UserAccount()
    +{ }
    +
    +UserAccount::UserAccount(const WString& aName)
    +  : name(aName)
    +{ }
    +
    +collection< ptr<Entry> > UserAccount::entriesInRange(const WDate& from, 
    +						     const WDate& until) const
    +{
    +  return entries.find()
    +    .where("start >= ?").bind(WDateTime(from))
    +    .where("start < ?").bind(WDateTime(until));
    +}
    +
    +ptr<UserAccount> UserAccount::login(Session& session, 
    +				    const WString& userName)
    +{
    +  Transaction transaction(session);
    +
    +  ptr<UserAccount> ua = 
    +    session.find<UserAccount>("where name = ?").bind(userName);
    +
    +  if (!ua) {
    +    WApplication::instance()
    +      ->log("notice") << "Creating user: " << userName.toUTF8();
    +
    +    ua = session.add(new UserAccount(userName));
    +  }
    +
    +  transaction.commit(); 
    + 
    +  return ua;
    +}
    diff --git a/wt-3.1.7a/examples/planner/UserAccount.h b/wt-3.1.7a/examples/planner/UserAccount.h
    new file mode 100644
    index 0000000..1bc4c73
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/UserAccount.h
    @@ -0,0 +1,42 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef USER_ACCOUNT_H_
    +#define USER_ACCOUNT_H_
    +
    +#include <Wt/WDate>
    +#include <Wt/WString>
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/WtSqlTraits>
    +
    +class Entry;
    +
    +namespace dbo = Wt::Dbo;
    +
    +class UserAccount
    +{
    +public:
    +  Wt::WString name;
    +  dbo::collection< dbo::ptr<Entry> > entries;
    +  
    +  UserAccount();
    +  UserAccount(const Wt::WString& name);
    +
    +  dbo::collection< dbo::ptr<Entry> >
    +    entriesInRange(const Wt::WDate& from, const Wt::WDate& until) const;
    +
    +  static dbo::ptr<UserAccount> login(dbo::Session& session, 
    +				     const Wt::WString& user);
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name, "name");
    +    dbo::hasMany(a, entries, dbo::ManyToOne, "user");
    +  }
    +};
    +
    +#endif // USER_ACCOUNT_H_
    diff --git a/wt-3.1.7a/examples/planner/calendar.xml b/wt-3.1.7a/examples/planner/calendar.xml
    new file mode 100644
    index 0000000..75a3ee8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/calendar.xml
    @@ -0,0 +1,41 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="calendar.entry.title">
    +  	Enter a new appointment for {1}
    +  </message>
    +
    +  <message id="calendar.entry">
    +    <div class="entry-dialog">
    +      <div class="line"><label>Summary: ${summary}</label></div>
    +      <div class="line">
    +	<label>From${start}</label>
    +	<label>to${stop}</label>
    +      </div>
    +      <div class="line"><div><label>Description:</label></div>
    +	<div>${description}</div></div>
    +      <div class="buttons">${ok} ${cancel}</div>
    +    </div>
    +  </message>
    +
    +  <message id="calendar.all-entries">
    +	<div>
    +		<div class="all-entries-dialog-entries">${entries}</div>
    +		<div class="all-entries-dialog-button">${close}</div>
    +	</div>
    +  </message>
    +  
    +  <message id="calendar.entry.ok">
    +  	Ok
    +  </message>
    +  <message id="calendar.entry.cancel">
    +  	Cancel
    +  </message>
    +  <message id="calendar.cell.extra">+{1} extra</message>
    +  <message id="calendar.cell.tooltip">Click the cell to add a new entry.</message>
    +  <message id="calendar.cell.all-entries.title">
    +  	All entries for {1}
    +  </message>
    +  <message id="calendar.cell.all-entries.close">
    +  	Close
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/planner/captcha.xml b/wt-3.1.7a/examples/planner/captcha.xml
    new file mode 100644
    index 0000000..93c7ca0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/captcha.xml
    @@ -0,0 +1,26 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="captcha.red">
    +    red
    +  </message>
    +  <message id="captcha.green">
    +    green
    +  </message>
    +  <message id="captcha.blue">
    +    blue
    +  </message>
    +  <message id="captcha.yellow">
    +    yellow
    +  </message>
    +
    +  <message id="captcha.circle">
    +    circle
    +  </message>
    +  <message id="captcha.rectangle">
    +    rectangle
    +  </message>
    +
    +  <message id="captcha.message">
    +    Please select the <b>{1} {2}</b>.
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/planner/planner.C b/wt-3.1.7a/examples/planner/planner.C
    new file mode 100644
    index 0000000..111e9dc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/planner.C
    @@ -0,0 +1,23 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "PlannerApplication.h"
    +
    +using namespace Wt;
    +using namespace Wt::Dbo;
    +
    +WApplication *createApplication(const WEnvironment& env) 
    +{
    +  return new PlannerApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  srand(time(0));
    +
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/planner/planner.css b/wt-3.1.7a/examples/planner/planner.css
    new file mode 100644
    index 0000000..e84a25f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/planner.css
    @@ -0,0 +1,101 @@
    +.Wt-domRoot {
    +	position: static;
    +}
    +
    +.entry-dialog {
    +	font-family: Arial,Sans-serif;
    +	font-weight: bold;
    +	padding: 3px;
    +}
    +
    +.entry-dialog textarea {
    +	width: 250px;
    +}
    +
    +.entry-dialog .line {
    +        margin: 3px 0px;
    +}
    +
    +.entry-dialog .line input {
    +        margin: 0px 3px;
    +}
    +
    +.entry-dialog .buttons {
    +	text-align: center;
    +	padding-top: 5px;
    +}
    +
    +.entry-dialog button {
    +	margin: 0px 5px;
    +	padding: 0px 5px;
    +}
    +
    +.all-entries-dialog-entries {
    +	text-align: left;
    +	padding: 5px;
    +}
    +
    +.all-entries-dialog-entries span {
    +	display: block;
    +}
    +
    +.all-entries-dialog-button {
    +	text-align: center;	
    +	padding: 5px;
    +}
    +
    +.login {
    +	position:absolute;
    +	top: 50%;
    +	left: 50%;
    +	margin-top: -3em; 
    +	margin-left: -4em;
    +	width: 250px;
    +}
    +
    +.login label {
    +	font-weight: bold;
    +	padding-right: 5px;
    +}
    +
    +.captcha {
    +	font-style: italic;
    +	font-size: small;
    +	padding-top: 10px;
    +	width: 200px;
    +	margin: 5px auto;
    +}
    +
    +.captcha canvas {
    +	background: #F3F9FF;
    +}
    +
    +.calendar {
    +	width: 750px;
    +	margin: 50px auto;
    +}
    +
    +.cell {
    +	white-space: nowrap;
    +	font-size: 10pt;
    +	text-align: left;
    +        overflow: hidden;
    +        text-overflow: ellipsis;    
    +}
    +
    +.cell span {
    +	display: block;
    +}
    +
    +.cell-header {
    +	font-weight: bold;
    +	background-color: #C3D9FF;
    +	color: black;
    +        padding: 0px 3px;
    +}
    +
    +.cell-extra {
    +	color: blue;
    +	text-decoration: underline;
    +	text-align: center;
    +}
    diff --git a/wt-3.1.7a/examples/planner/planner.xml b/wt-3.1.7a/examples/planner/planner.xml
    new file mode 100644
    index 0000000..0cb562a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/planner/planner.xml
    @@ -0,0 +1,16 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="login.userName">
    +    User name
    +  </message>
    +  <message id="login.loginButton">
    +    Login
    +  </message>
    +  <message id="fatalerror.title">
    +    Fatal error
    +  </message> 
    +  <message id="fatalerror.body">
    +    <p>A fatal error occurred and the application was terminated.</p>
    +    <p>Reason:<pre>{1}</pre></p>
    +  </message> 
    +</messages>
    diff --git a/wt-3.1.7a/examples/simplechat/CMakeLists.txt b/wt-3.1.7a/examples/simplechat/CMakeLists.txt
    new file mode 100644
    index 0000000..c0c7fa8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/CMakeLists.txt
    @@ -0,0 +1,22 @@
    +IF(NOT MULTI_THREADED_BUILD)
    +  MESSAGE(STATUS "** Not building simplechat example: requires a multi-threaded build.")
    +ELSE(NOT MULTI_THREADED_BUILD)
    +
    + ADD_DEFINITIONS(-DTHREADED)
    +
    + WT_ADD_EXAMPLE(simplechat.wt
    +   simpleChat.C SimpleChatWidget.C SimpleChatServer.C
    + )
    +
    + TARGET_LINK_LIBRARIES(simplechat.wt ${BOOST_THREAD_LIB})
    +
    + #
    + # If you have Wt installed somehwere, you should use the
    + # installed Wt header files for your own Wt projects.
    + # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    + # instead of the following:
    + #
    + INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +ENDIF(NOT MULTI_THREADED_BUILD)
    +
    diff --git a/wt-3.1.7a/examples/simplechat/SimpleChatServer.C b/wt-3.1.7a/examples/simplechat/SimpleChatServer.C
    new file mode 100644
    index 0000000..0cc77d9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/SimpleChatServer.C
    @@ -0,0 +1,105 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "SimpleChatServer.h"
    +
    +#include <Wt/SyncLock>
    +
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +using namespace Wt;
    +
    +const WString ChatEvent::formattedHTML(const WString& user) const
    +{
    +  switch (type_) {
    +  case Login:
    +    return "<span class='chat-info'>"
    +      + user_ + " joined the conversation.</span>";
    +  case Logout:
    +    return "<span class='chat-info'>"
    +      + ((user == user_) ? "You" : user_)
    +      + " logged out.</span>";
    +  case Message:{
    +    WString result;
    +
    +    result = WString("<span class='")
    +      + ((user == user_) ? "chat-self" : "chat-user")
    +      + "'>" + user_ + ":</span>";
    +
    +    if (message_.toUTF8().find(user.toUTF8()) != std::string::npos)
    +      return result + "<span class='chat-highlight'>" + message_ + "</span>";
    +    else
    +      return result + message_;
    +  }
    +  default:
    +    return "";
    +  }
    +}
    +
    +
    +SimpleChatServer::SimpleChatServer()
    +  : chatEvent_(this)
    +{ }
    +
    +bool SimpleChatServer::login(const WString& user)
    +{
    +  // In every application path that holds a lock to a mutex while also
    +  // trying to update another application (as is in this method the
    +  // case during chatEvent_.emit()) we need to use Wt::SyncLock to
    +  // avoid dead-locks.
    +
    +  SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    +  
    +  if (users_.find(user) == users_.end()) {
    +    users_.insert(user);
    +
    +    chatEvent_.emit(ChatEvent(ChatEvent::Login, user));
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void SimpleChatServer::logout(const WString& user)
    +{
    +  SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    +  
    +  UserSet::iterator i = users_.find(user);
    +
    +  if (i != users_.end()) {
    +    users_.erase(i);
    +
    +    chatEvent_.emit(ChatEvent(ChatEvent::Logout, user));
    +  }
    +}
    +
    +WString SimpleChatServer::suggestGuest()
    +{
    +  SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    +
    +  for (int i = 1;; ++i) {
    +    std::string s = "guest " + boost::lexical_cast<std::string>(i);
    +    WString ss = s;
    +
    +    if (users_.find(ss) == users_.end())
    +      return ss;
    +  }
    +}
    +
    +void SimpleChatServer::sendMessage(const WString& user, const WString& message)
    +{
    +  SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    +
    +  chatEvent_.emit(ChatEvent(user, message));
    +}
    +
    +SimpleChatServer::UserSet SimpleChatServer::users()
    +{
    +  SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    +
    +  return users_;
    +}
    diff --git a/wt-3.1.7a/examples/simplechat/SimpleChatServer.h b/wt-3.1.7a/examples/simplechat/SimpleChatServer.h
    new file mode 100644
    index 0000000..12c2e70
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/SimpleChatServer.h
    @@ -0,0 +1,116 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef SIMPLECHATSERVER_H_
    +#define SIMPLECHATSERVER_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WSignal>
    +#include <Wt/WString>
    +
    +#include <set>
    +#include <boost/thread.hpp>
    +
    +/**
    + * @addtogroup chatexample
    + */
    +/*@{*/
    +
    +/*! \brief Encapsulate a chat event.
    + */
    +class ChatEvent
    +{
    +public:
    +  /*! \brief Enumeration for the event type.
    +   */
    +  enum Type { Login, Logout, Message };
    +
    +  /*! \brief Get the event type.
    +   */
    +  Type type() const { return type_; }
    +
    +  /*! \brief Get the user who caused the event.
    +   */
    +  const Wt::WString& user() const { return user_; }
    +
    +  /*! \brief Get the message of the event.
    +   */
    +  const Wt::WString& message() const { return message_; }
    +
    +  /*! \brief Get the message formatted as HTML, rendered for the given user.
    +   */
    +  const Wt::WString formattedHTML(const Wt::WString& user) const;
    +
    +private:
    +  Type type_;
    +  Wt::WString user_;
    +  Wt::WString message_;
    +
    +  /*
    +   * Both user and html will be formatted as html
    +   */
    +  ChatEvent(const Wt::WString& user, const Wt::WString& message)
    +    : type_(Message), user_(user), message_(message)
    +  { }
    +
    +  ChatEvent(Type type, const Wt::WString& user)
    +    : type_(type), user_(user)
    +  { }
    +
    +  friend class SimpleChatServer;
    +};
    +
    +/*! \brief A simple chat server
    + */
    +class SimpleChatServer : public Wt::WObject
    +{
    +public:
    +  /*! \brief Create a new chat server.
    +   */
    +  SimpleChatServer();
    +
    +  /*! \brief Try to login with given user name.
    +   *
    +   * Returns false if the login was not successfull.
    +   */
    +  bool login(const Wt::WString& user);
    +
    +  /*! \brief Logout from the server.
    +   */
    +  void logout(const Wt::WString& user);
    +
    +  /*! \brief Get a suggestion for a guest user name.
    +   */
    +  Wt::WString suggestGuest();
    +
    +  /*! \brief Send a message on behalve of a user.
    +   */
    +  void sendMessage(const Wt::WString& user, const Wt::WString& message);
    +
    +  /*! \brief %Signal that will convey chat events.
    +   *
    +   * Every client should connect to this signal, and process events.
    +   */
    +  Wt::Signal<ChatEvent>& chatEvent() { return chatEvent_; }
    +
    +  /*! \brief Typedef for a collection of user names.
    +   */
    +  typedef std::set<Wt::WString> UserSet;
    +
    +  /*! \brief Get the users currently logged in.
    +   */
    +  UserSet users();
    +
    +private:
    +  Wt::Signal<ChatEvent>         chatEvent_;
    +  boost::recursive_mutex        mutex_;
    +
    +  UserSet                       users_;
    +};
    +
    +/*@}*/
    +
    +#endif // SIMPLECHATSERVER_H_
    diff --git a/wt-3.1.7a/examples/simplechat/SimpleChatWidget.C b/wt-3.1.7a/examples/simplechat/SimpleChatWidget.C
    new file mode 100644
    index 0000000..36e2118
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/SimpleChatWidget.C
    @@ -0,0 +1,309 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "SimpleChatWidget.h"
    +#include "SimpleChatServer.h"
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WLabel>
    +#include <Wt/WLineEdit>
    +#include <Wt/WText>
    +#include <Wt/WTextArea>
    +#include <Wt/WPushButton>
    +#include <Wt/WCheckBox>
    +
    +#include <iostream>
    +
    +using namespace Wt;
    +
    +SimpleChatWidget::SimpleChatWidget(SimpleChatServer& server,
    +				   Wt::WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    server_(server),
    +    app_(WApplication::instance()),
    +    messageReceived_("sounds/message_received.mp3")
    +{
    +  user_ = server_.suggestGuest();
    +  letLogin();
    +
    +  // this widget supports server-side updates its processChatEvent()
    +  // method is connected to a slot that is triggered from outside this
    +  // session's event loop (usually because another user enters text).
    +  app_->enableUpdates();
    +}
    +
    +SimpleChatWidget::~SimpleChatWidget()
    +{
    +  logout();
    +}
    +
    +void SimpleChatWidget::letLogin()
    +{
    +  clear();
    +
    +  WVBoxLayout *vLayout = new WVBoxLayout();
    +  setLayout(vLayout, AlignLeft | AlignTop);
    +
    +  WHBoxLayout *hLayout = new WHBoxLayout();
    +  vLayout->addLayout(hLayout);
    +
    +  hLayout->addWidget(new WLabel("User name:"), 0, AlignMiddle);
    +  hLayout->addWidget(userNameEdit_ = new WLineEdit(user_), 0, AlignMiddle);
    +  userNameEdit_->setFocus();
    +
    +  WPushButton *b = new WPushButton("Login");
    +  hLayout->addWidget(b, 0, AlignMiddle);
    +  hLayout->addStretch(1);
    +
    +  b->clicked().connect(this, &SimpleChatWidget::login);
    +  userNameEdit_->enterPressed().connect(this, &SimpleChatWidget::login);
    +
    +  vLayout->addWidget(statusMsg_ = new WText());
    +  statusMsg_->setTextFormat(PlainText);
    +}
    +
    +void SimpleChatWidget::login()
    +{
    +  WString name = WWebWidget::escapeText(userNameEdit_->text());
    +
    +  if (!startChat(name))
    +    statusMsg_->setText("Sorry, name '" + name + "' is already taken.");
    +}
    +
    +void SimpleChatWidget::logout()
    +{
    +  if (eventConnection_.connected()) {
    +    eventConnection_.disconnect(); // do not listen for more events
    +    server_.logout(user_);
    +
    +    letLogin();
    +  }
    +}
    +
    +bool SimpleChatWidget::startChat(const WString& user)
    +{
    +  if (server_.login(user)) {
    +    // FIXME, chatEvent() needs to be protected by the server mutex too
    +    eventConnection_
    +      = server_.chatEvent().connect(this, &SimpleChatWidget::processChatEvent);
    +    user_ = user;    
    +
    +    clear();
    +
    +    /*
    +     * Create a vertical layout, which will hold 3 rows,
    +     * organized like this:
    +     *
    +     * WVBoxLayout
    +     * --------------------------------------------
    +     * | nested WHBoxLayout (vertical stretch=1)  |
    +     * |                              |           |
    +     * |  messages                    | userslist |
    +     * |   (horizontal stretch=1)     |           |
    +     * |                              |           |
    +     * --------------------------------------------
    +     * | message edit area                        |
    +     * --------------------------------------------
    +     * | WHBoxLayout                              |
    +     * | send | logout |       stretch = 1        |
    +     * --------------------------------------------
    +     */
    +    WVBoxLayout *vLayout = new WVBoxLayout();
    +
    +    // Create a horizontal layout for the messages | userslist.
    +    WHBoxLayout *hLayout = new WHBoxLayout();
    +
    +    // Add widget to horizontal layout with stretch = 1
    +    hLayout->addWidget(messages_ = new WContainerWidget(), 1);
    +    messages_->setStyleClass("chat-msgs");
    +    // Display scroll bars if contents overflows
    +    messages_->setOverflow(WContainerWidget::OverflowAuto);
    +
    +    // Add another widget to hirozontal layout with stretch = 0
    +    hLayout->addWidget(userList_ = new WContainerWidget());
    +    userList_->setStyleClass("chat-users");
    +    userList_->setOverflow(WContainerWidget::OverflowAuto);
    +
    +    hLayout->setResizable(0, true);
    +
    +    // Add nested layout to vertical layout with stretch = 1
    +    vLayout->addLayout(hLayout, 1);
    +
    +    // Add widget to vertical layout with stretch = 0
    +    vLayout->addWidget(messageEdit_ = new WTextArea());
    +    messageEdit_->setStyleClass("chat-noedit");
    +    messageEdit_->setRows(2);
    +    messageEdit_->setFocus();
    +
    +    // Create a horizontal layout for the buttons.
    +    hLayout = new WHBoxLayout();
    +
    +    // Add button to horizontal layout with stretch = 0
    +    hLayout->addWidget(sendButton_ = new WPushButton("Send"));
    +    WPushButton *b;
    +
    +    // Add button to horizontal layout with stretch = 0
    +    hLayout->addWidget(b = new WPushButton("Logout"));
    +
    +    // Add stretching spacer to horizontal layout
    +    hLayout->addStretch(1);
    +
    +    // Add nested layout to vertical layout with stretch = 0
    +    vLayout->addLayout(hLayout);
    +
    +    setLayout(vLayout);
    +
    +    /*
    +     * Connect event handlers:
    +     *  - click on button
    +     *  - enter in text area
    +     *
    +     * We will clear the input field using a small custom client-side
    +     * JavaScript invocation.
    +     */
    +
    +    // Create a JavaScript 'slot' (JSlot). The JavaScript slot always takes
    +    // 2 arguments: the originator of the event (in our case the
    +    // button or text area), and the JavaScript event object.
    +    clearInput_.setJavaScript
    +      ("function(o, e) {"
    +       "" + messageEdit_->jsRef() + ".value='';"
    +       "}");
    +
    +    // Bind the C++ and JavaScript event handlers.
    +    sendButton_->clicked().connect(this, &SimpleChatWidget::send);
    +    messageEdit_->enterPressed().connect(this, &SimpleChatWidget::send);
    +    sendButton_->clicked().connect(clearInput_);
    +    messageEdit_->enterPressed().connect(clearInput_);
    +    sendButton_->clicked().connect(messageEdit_, &WLineEdit::setFocus);
    +    messageEdit_->enterPressed().connect(messageEdit_, &WLineEdit::setFocus);
    +
    +    // Prevent the enter from generating a new line, which is its default
    +    // action
    +    messageEdit_->enterPressed().preventDefaultAction();
    +
    +    b->clicked().connect(this, &SimpleChatWidget::logout);
    +
    +    WText *msg = new WText
    +      ("<div><span class='chat-info'>You are joining the conversation as "
    +       + user_ + "</span></div>", messages_);
    +    msg->setStyleClass("chat-msg");
    +
    +    updateUsers();
    +    
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void SimpleChatWidget::send()
    +{
    +  if (!messageEdit_->text().empty())
    +    server_.sendMessage(user_, messageEdit_->text());
    +}
    +
    +void SimpleChatWidget::updateUsers()
    +{
    +  userList_->clear();
    +
    +  SimpleChatServer::UserSet users = server_.users();
    +
    +  UserMap oldUsers = users_;
    +  users_.clear();
    +
    +  for (SimpleChatServer::UserSet::iterator i = users.begin();
    +       i != users.end(); ++i) {
    +    WCheckBox *w = new WCheckBox(*i, userList_);
    +    w->setInline(false);
    +
    +    UserMap::const_iterator j = oldUsers.find(*i);
    +    if (j != oldUsers.end())
    +      w->setChecked(j->second);
    +    else
    +      w->setChecked(true);
    +
    +    users_[*i] = w->isChecked();
    +    w->changed().connect(this, &SimpleChatWidget::updateUser);
    +
    +    if (*i == user_)
    +      w->setStyleClass("chat-self");
    +  }
    +}
    +
    +void SimpleChatWidget::updateUser()
    +{
    +  WCheckBox *b = dynamic_cast<WCheckBox *>(sender());
    +  users_[b->text()] = b->isChecked();
    +}
    +
    +void SimpleChatWidget::processChatEvent(const ChatEvent& event)
    +{
    +  /*
    +   * This is where the "server-push" happens. This method is called
    +   * when a new event or message needs to be notified to the user. In
    +   * general, it is called from another session.
    +   */
    +
    +  /*
    +   * First, take the lock to safely manipulate the UI outside of the
    +   * normal event loop, by having exclusive access to the session.
    +   */
    +  WApplication::UpdateLock lock(app_);
    +
    +  if (lock) {
    +    /*
    +     * Format and append the line to the conversation.
    +     *
    +     * This is also the step where the automatic XSS filtering will kick in:
    +     * - if another user tried to pass on some JavaScript, it is filtered away.
    +     * - if another user did not provide valid XHTML, the text is automatically
    +     *   interpreted as PlainText
    +     */
    +    bool needPush = false;
    +
    +    /*
    +     * If it is not a normal message, also update the user list.
    +     */
    +    if (event.type() != ChatEvent::Message) {
    +      needPush = true;
    +      updateUsers();
    +    }
    +
    +    bool display = event.type() != ChatEvent::Message
    +      || (users_.find(event.user()) != users_.end() && users_[event.user()]);
    +
    +    if (display) {
    +      needPush = true;
    +
    +      WText *w = new WText(event.formattedHTML(user_), messages_);
    +      w->setInline(false);
    +      w->setStyleClass("chat-msg");
    +
    +      /*
    +       * Leave not more than 100 messages in the back-log
    +       */
    +      if (messages_->count() > 100)
    +	delete messages_->children()[0];
    +
    +      /*
    +       * Little javascript trick to make sure we scroll along with new content
    +       */
    +      app_->doJavaScript(messages_->jsRef() + ".scrollTop += "
    +			 + messages_->jsRef() + ".scrollHeight;");
    +
    +      /* If this message belongs to another user, play a received sound */
    +      if (event.user() != user_)
    +	messageReceived_.play();
    +    }
    +
    +    if (needPush)
    +      app_->triggerUpdate();
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/simplechat/SimpleChatWidget.h b/wt-3.1.7a/examples/simplechat/SimpleChatWidget.h
    new file mode 100644
    index 0000000..0405f54
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/SimpleChatWidget.h
    @@ -0,0 +1,90 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SIMPLECHATWIDGET_H_
    +#define SIMPLECHATWIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WJavaScript>
    +#include <Wt/WSound>
    +
    +namespace Wt {
    +  class WApplication;
    +  class WPushButton;
    +  class WText;
    +  class WLineEdit;
    +  class WTextArea;
    +}
    +
    +class SimpleChatServer;
    +class ChatEvent;
    +
    +/**
    + * \defgroup chatexample Chat example
    + */
    +/*@{*/
    +
    +/*! \brief A self-contained chat widget.
    + */
    +class SimpleChatWidget : public Wt::WContainerWidget
    +{
    +public:
    +  /*! \brief Create a chat widget that will connect to the given server.
    +   */
    +  SimpleChatWidget(SimpleChatServer& server, Wt::WContainerWidget *parent = 0);
    +
    +  /*! \brief Delete a chat widget.
    +   */
    +  ~SimpleChatWidget();
    +
    +  /*! \brief Show a simple login screen.
    +   */
    +  void letLogin();
    +
    +  /*! \brief Start a chat for the given user.
    +   *
    +   * Returns false if the user could not login.
    +   */
    +  bool startChat(const Wt::WString& user);
    +
    +private:
    +  typedef std::map<Wt::WString, bool> UserMap;
    +  UserMap users_;
    +
    +  SimpleChatServer&     server_;
    +  Wt::WApplication     *app_;
    +
    +  Wt::JSlot             clearInput_;
    +
    +  Wt::WString           user_;
    +
    +  Wt::WLineEdit        *userNameEdit_;
    +  Wt::WText            *statusMsg_;
    +
    +  Wt::WContainerWidget *messages_;
    +  Wt::WContainerWidget *messageEditArea_;
    +  Wt::WTextArea        *messageEdit_;
    +  Wt::WPushButton      *sendButton_;
    +  Wt::WContainerWidget *userList_;
    +
    +  boost::signals::connection eventConnection_;
    +
    +  Wt::WSound messageReceived_;
    +
    +  void login();
    +  void logout();
    +  void send();
    +  void updateUsers();
    +  void updateUser();
    +
    +  /* called from another session */
    +  void processChatEvent(const ChatEvent& event);
    +};
    +
    +/*@}*/
    +
    +#endif // SIMPLECHATWIDGET
    diff --git a/wt-3.1.7a/examples/simplechat/simpleChat.C b/wt-3.1.7a/examples/simplechat/simpleChat.C
    new file mode 100644
    index 0000000..f173f1b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/simpleChat.C
    @@ -0,0 +1,76 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +#include "SimpleChatServer.h"
    +#include "SimpleChatWidget.h"
    +
    +using namespace Wt;
    +
    +/**
    + * @addtogroup chatexample
    + */
    +/*@{*/
    +
    +/*! \brief The single chat server instance.
    + */
    +SimpleChatServer theServer;
    +
    +/*! \brief A chat demo application.
    + */
    +class ChatApplication : public WApplication
    +{
    +public:
    +  /*! \brief Create a new instance.
    +   */
    +  ChatApplication(const WEnvironment& env);
    +
    +private:
    +  /*! \brief Add another chat client.
    +   */
    +  void addChatWidget();
    +};
    +
    +ChatApplication::ChatApplication(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("Wt Chat");
    +  useStyleSheet("simplechat.css");
    +  messageResourceBundle().use(Wt::WApplication::appRoot() + "simplechat");
    +
    +  root()->addWidget(new WText(WString::tr("introduction")));
    +
    +  SimpleChatWidget *chatWidget = new SimpleChatWidget(theServer, root());
    +  chatWidget->setStyleClass("chat");
    +
    +  root()->addWidget(new WText(WString::tr("details")));
    +
    +  WPushButton *b = new WPushButton("I'm schizophrenic ...", root());
    +  b->clicked().connect(b, &WPushButton::hide);
    +  b->clicked().connect(this, &ChatApplication::addChatWidget);
    +}
    +
    +void ChatApplication::addChatWidget()
    +{
    +  SimpleChatWidget *chatWidget2 = new SimpleChatWidget(theServer, root());
    +  chatWidget2->setStyleClass("chat");
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new ChatApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    +/*@}*/
    diff --git a/wt-3.1.7a/examples/simplechat/simplechat.css b/wt-3.1.7a/examples/simplechat/simplechat.css
    new file mode 100644
    index 0000000..d921e1d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/simplechat.css
    @@ -0,0 +1,88 @@
    +html {
    +  font-family:arial,sans-serif;
    +  overflow-x: hidden;
    +}
    +
    +h1 {
    +  font-weight: bold;
    +}
    +
    +h2, h3, h4, h5 {
    +  color: #505050;
    +}
    +
    +h2 {
    +  padding-left: 30px;
    +  border-bottom: 1px solid #000;
    +}
    +
    +h2 span {
    +  border-bottom: 0.2em solid #000;
    +}
    +
    +
    +button {
    +  padding-left: 5px;
    +  padding-right: 5px;
    +  font-size: smaller;
    +}
    +
    +.chat {
    +  border: 2px solid #CCCCCC;
    +  margin-left: auto;
    +  margin-right: auto;
    +  margin-top: 10px;
    +  margin-bottom: 10px;
    +  width: 85%;
    +  height: 300px;
    +}
    +
    +span.chat-info {
    +  font-style: oblique;
    +  color: gray;
    +}
    +
    +textarea.chat-noedit {
    +  border: 2px solid #73A6FF;
    +}
    +
    +.chat-user {
    +  color: #DD7200;
    +  font-weight: bold;
    +  padding-right: 0.2em;
    +}
    +
    +.chat-users label {
    +  margin-left: 0.2em;
    +}
    +
    +.chat-self {
    +  color: #B42600;
    +  font-weight: bold;
    +  padding-right: 0.2em;
    +}
    +
    +.chat-highlight {
    +  font-weight: bold;
    +}
    +
    +.chat-msgs {
    +  margin: 0px 1px;
    +}
    +
    +.chat-users {
    +  width: 12ex;
    +}
    +
    +.chat-msg {
    +  padding: 2px;
    +}
    +
    +.chat-users div {
    +  margin: 3px 3px 3px 6px;
    +}
    +
    +.chat-users div .chat-self {
    +  font-weight: bold;
    +}
    +
    diff --git a/wt-3.1.7a/examples/simplechat/simplechat.xml b/wt-3.1.7a/examples/simplechat/simplechat.xml
    new file mode 100644
    index 0000000..240d001
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/simplechat.xml
    @@ -0,0 +1,35 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="introduction">
    +
    +<h2><span>Wt Chat client</span></h2>
    +
    +<p>This is a multi-user chat client and server.</p>
    +
    +<p>To keep the example simple, server and clients all run in the same
    +process. Still, because all I/O in Wt is asynchronous even when using
    +"server push" which requires an open connection with each client at
    +all times, clients do not tie up threads, and as such the application
    +could easily support thousands of simultaneous users as well.</p>
    +
    +<p>The client is contained in a widget (SimpleChatWidget), and can be
    +instantiated as many times as you like, even in the same
    +application.<br />
    +
    +Because of the widget abstraction, it is straight forward to include a
    +chat client in your own application, by linking both the client and
    +server classes into your application.</p>
    +  </message>
    +
    +  <message id="details">
    +
    +<p>The implementation uses server-initiated updates, a feature that is
    +not much different from regular client-server communication in Wt, and
    +allows updating a session from outside its regular event loop. When a
    +message is received, the user interface (i.e. widget tree) not only of
    +the current session, but also of all other sessions is updated and
    +"pushed" to these clients simultanously.</p>
    +
    +  </message>
    +
    +</messages>
    diff --git a/wt-3.1.7a/examples/simplechat/simplechat_ru.xml b/wt-3.1.7a/examples/simplechat/simplechat_ru.xml
    new file mode 100644
    index 0000000..b6b7cf8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/simplechat/simplechat_ru.xml
    @@ -0,0 +1,35 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<messages>
    +  <message id="introduction">
    +
    +<h2><span>Клиент чата Wt</span></h2>
    +
    +<p>Это клиент и Ñервер многопользовательÑкого чата.</p>
    +
    +<p>Ð”Ð»Ñ Ð¿Ñ€Ð¾Ñтоты примера, вÑÑ‘ - Ñервер и клиенты - выполнÑетÑÑ Ð² одном
    +процеÑÑе. Тем не менее, поÑкольку вÑе операции ввода/вывода в Wt
    +аÑинхронны, даже при иÑпользовании технологии "server push", котораÑ
    +нуждаетÑÑ Ð² открытом Ñоединении Ñ ÐºÐ°Ð¶Ð´Ñ‹Ð¼ клиентом поÑтоÑнно, клиенты
    +не привÑзаны к потокам, и такое приложение ÑпоÑобно легко обÑлужить
    +Ñ‚Ñ‹ÑÑчи пользователей одновременно.</p>
    +
    +<p>Клиент ÑодержитÑÑ Ð² виджете (SimpleChatWidget) и может быть инÑтанцирован
    +Ñтолько раз, Ñколько потребуетÑÑ, даже в пределах одного
    +приложениÑ.<br />
    +
    +Ð‘Ð»Ð°Ð³Ð¾Ð´Ð°Ñ€Ñ Ð°Ð±Ñтракции виджетов, можно прÑмиком включать клиент чата в Ваше
    +ÑобÑтвенное приложение, ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÑ ÐµÐ³Ð¾ Ñ ÐºÐ»Ð°ÑÑами клиента и Ñервера.</p>
    +  </message>
    +
    +  <message id="details">
    +
    +<p>Ð ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¸Ñпользует инициируемые Ñервером Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ - оÑобенноÑÑ‚ÑŒ,
    +ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ðµ во многом отличаетÑÑ Ð¾Ñ‚ обычного клиент-Ñерверного взаимодейÑÑ‚Ð²Ð¸Ñ Ð²
    +Wt, и позволÑет обновлÑÑ‚ÑŒ ÑеÑÑию вне обычного цикла обработки Ñобытий. При
    +получении ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ñ‚ того или иного пользователÑ, пользовательÑкие интерфейÑÑ‹
    +(Ñ‚.е. Ð´ÐµÑ€ÐµÐ²ÑŒÑ Ð²Ð¸Ð´Ð¶ÐµÑ‚Ð¾Ð²) текущей и вÑех оÑтальных ÑеÑÑий обновлÑÑŽÑ‚ÑÑ Ð¸ изменениÑ
    +отÑылаютÑÑ ("pushed") ÑоответÑтвующим клиентам одновременно.</p>
    +
    +  </message>
    +
    +</messages>
    diff --git a/wt-3.1.7a/examples/simplechat/sounds/message_received.mp3 b/wt-3.1.7a/examples/simplechat/sounds/message_received.mp3
    new file mode 100644
    index 0000000..ef791a1
    Binary files /dev/null and b/wt-3.1.7a/examples/simplechat/sounds/message_received.mp3 differ
    diff --git a/wt-3.1.7a/examples/style/CMakeLists.txt b/wt-3.1.7a/examples/style/CMakeLists.txt
    new file mode 100644
    index 0000000..04a71f7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/CMakeLists.txt
    @@ -0,0 +1,16 @@
    +IF(NOT HAVE_GM)
    +
    +  MESSAGE(STATUS "** Not building style example: requires WRasterImage.")
    +
    +ELSE(NOT HAVE_GM)
    +
    +  WT_ADD_EXAMPLE(styleexample.wt CornerImage.C RoundedWidget.C StyleExample.C)
    +
    +  INCLUDE_DIRECTORIES(
    +   ${WT_SOURCE_DIR}/src
    +  )
    +
    +  ADD_DEPENDENCIES(styleexample.wt wt ${EXAMPLES_CONNECTOR})
    +
    +ENDIF(NOT HAVE_GM)
    +
    diff --git a/wt-3.1.7a/examples/style/CornerImage.C b/wt-3.1.7a/examples/style/CornerImage.C
    new file mode 100644
    index 0000000..5cb2441
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/CornerImage.C
    @@ -0,0 +1,82 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <stdio.h>
    +
    +#include "CornerImage.h"
    +
    +#include <Wt/WPainter>
    +#include <Wt/WRasterImage>
    +
    +class CornerResource : public WResource
    +{
    +public:
    +  CornerResource(CornerImage *parent)
    +    : WResource(parent)
    +  { }
    +
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response) {
    +    CornerImage *img = dynamic_cast<CornerImage *>(parent());
    +    WRasterImage device("png", img->radius(), img->radius());
    +    paint(&device, img);
    +
    +    device.handleRequest(request, response);
    +  }
    +
    +  void paint(WPaintDevice *device, CornerImage *img)
    +  {
    +    WPainter painter(device);
    +
    +    painter.setPen(NoPen);
    +
    +    painter.setBrush(img->background());
    +    painter.drawRect(0, 0, img->radius(), img->radius());
    +
    +    int cx, cy;
    +
    +    if (img->corner() & Top)
    +      cy = img->radius() + 0.5;
    +    else
    +      cy = -0.5;
    +
    +    if (img->corner() & Left)
    +      cx = img->radius() + 0.5;
    +    else
    +      cx = -0.5;
    +
    +    painter.setBrush(img->foreground());
    +    painter.drawEllipse(cx - img->radius(), cy - img->radius(),
    +			2 * img->radius(), 2 * img->radius());    
    +  }
    +};
    +
    +CornerImage::CornerImage(Corner c, WColor fg, WColor bg,
    +			 int radius, WContainerWidget *parent)
    +  : WImage(parent),
    +    corner_(c),
    +    fg_(fg),
    +    bg_(bg),
    +    radius_(radius)
    +{
    +  resource_ = new CornerResource(this);
    +  setResource(resource_);
    +}
    +
    +void CornerImage::setRadius(int radius)
    +{
    +  if (radius != radius_) {
    +    radius_ = radius;
    +    resource_->setChanged();
    +  }
    +}
    +
    +void CornerImage::setForeground(WColor color)
    +{
    +  if (fg_ != color) {
    +    fg_ = color;
    +    resource_->setChanged();
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/style/CornerImage.h b/wt-3.1.7a/examples/style/CornerImage.h
    new file mode 100644
    index 0000000..0bac7f8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/CornerImage.h
    @@ -0,0 +1,97 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef CORNER_IMAGE_H_
    +#define CORNER_IMAGE_H_
    +
    +#include <Wt/WImage>
    +
    +using namespace Wt;
    +
    +class CornerResource;
    +
    +/**
    + * @addtogroup styleexample
    + */
    +/*@{*/
    +
    +/*! \brief The CornerImage is a painted widget with a rounded corner.
    + *
    + * The CornerImage is a dynamically generated image which draws an arc
    + * of 90°, to represent one of the four corners of a rounded widget.
    + *
    + * The CornerImage is part of the %Wt style example.
    + *
    + * \sa RoundedWidget
    + */
    +class CornerImage : public WImage
    +{
    +public:
    +  /*! \brief One of the four corners of a widget.
    +   */
    +  enum Corner { TopLeft = (int)Top | (int)Left,         //!< Top left
    +		TopRight = (int)Top | (int)Right,       //!< Top right
    +		BottomLeft = (int)Bottom | (int)Left,   //!< Bottom left
    +		BottomRight = (int)Bottom | (int)Right  //!< Bottom right
    +  };
    +
    +  /*! \brief Construct a new CornerImage.
    +   *
    +   * Construct a corner image, to draw the specified corner, with
    +   * the given foreground and background color, and the specified radius.
    +   *
    +   * The colors must be constructed using red/green/blue values,
    +   * using WColor::WColor(int, int, int).
    +   */
    +  CornerImage(Corner corner, WColor fg, WColor bg,
    +	      int radius, WContainerWidget *parent = 0);
    +
    +  /*! \brief Change the corner radius (and image dimensions).
    +   */
    +  void setRadius(int radius);
    +
    +  /*! \brief Get the corner radius.
    +   */
    +  int radius() const { return radius_; }
    +
    +  /*! \brief Change the foreground color.
    +   */
    +  void setForeground(WColor color);
    +
    +  /*! \brief Get the foreground color.
    +   */
    +  WColor foreground() const { return fg_; }
    +
    +  /*! \brief Change the background color.
    +   */
    +  void setBackground(WColor color);
    +
    +  /*! \brief Get the background color.
    +   */
    +  WColor background() const { return bg_; }
    +
    +  Corner corner() const { return corner_; }
    +
    +private:
    +  //! One of the four corners, which this image represents.
    +  Corner corner_;
    +
    +  //! Foreground color
    +  WColor fg_;
    +
    +  //! Background color
    +  WColor bg_;
    +
    +  //! Radius
    +  int radius_;
    +
    +  CornerResource *resource_;
    +};
    +
    +/*@}*/
    +
    +#endif // CORNER_IMAGE_H_
    diff --git a/wt-3.1.7a/examples/style/RoundedWidget.C b/wt-3.1.7a/examples/style/RoundedWidget.C
    new file mode 100644
    index 0000000..fbe5bd9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/RoundedWidget.C
    @@ -0,0 +1,176 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WImage>
    +
    +#include "RoundedWidget.h"
    +#include "CornerImage.h"
    +
    +RoundedWidget::RoundedWidget(int corners, WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    backgroundColor_(WColor(0xD4,0xDD,0xFF)),
    +    surroundingColor_(WColor(0xFF,0xFF,0xFF)),
    +    radius_(10),
    +    corners_(corners)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  contents_ = new WContainerWidget(impl_);
    +
    +  create();
    +}
    +
    +RoundedWidget::~RoundedWidget()
    +{
    +  if (images_[1])
    +    delete images_[1];
    +  if (images_[3])
    +    delete images_[3];
    +}
    +
    +void RoundedWidget::create()
    +{
    +  if (corners_ & TopLeft) {
    +    images_[0] = new CornerImage(CornerImage::TopLeft, backgroundColor_,
    +				 surroundingColor_, radius_);
    +    images_[0]->setPositionScheme(Absolute);
    +    images_[0]->setMargin(0);
    +  } else
    +    images_[0] = 0;
    +
    +  if (corners_ & TopRight)
    +    images_[1] = new CornerImage(CornerImage::TopRight, backgroundColor_,
    +				 surroundingColor_, radius_);
    +  else
    +    images_[1] = 0;
    +
    +  if (corners_ & BottomLeft) {
    +    images_[2] = new CornerImage(CornerImage::BottomLeft, backgroundColor_,
    +				 surroundingColor_, radius_);
    +    images_[2]->setPositionScheme(Absolute);
    +    images_[2]->setMargin(0);
    +  } else
    +    images_[2] = 0;
    +
    +  if (corners_ & BottomRight)
    +    images_[3] = new CornerImage(CornerImage::BottomRight, backgroundColor_,
    +				 surroundingColor_, radius_);
    +  else
    +    images_[3] = 0;
    +
    +  /*
    +   * At the top: an image (top left corner) inside
    +   * a container widget with background image top right.
    +   */
    +  top_ = new WContainerWidget();
    +  top_->resize(WLength::Auto, radius_);
    +  top_->setPositionScheme(Relative);
    +  if (images_[1])
    +    top_->decorationStyle().setBackgroundImage(images_[1]->imageRef(),
    +					       WCssDecorationStyle::NoRepeat,
    +					       Top | Right);
    +  if (images_[0])
    +    top_->addWidget(images_[0]);
    +  impl_->insertBefore(top_, contents_); // insert top before the contents
    +
    +  /*
    +   * At the bottom: an image (bottom left corner) inside
    +   * a container widget with background image bottom right.
    +   */
    +  bottom_ = new WContainerWidget();
    +  bottom_->setPositionScheme(Relative);
    +  bottom_->resize(WLength::Auto, radius_);
    +  if (images_[3])
    +    bottom_->decorationStyle().setBackgroundImage(images_[3]->imageRef(),
    +						  WCssDecorationStyle::NoRepeat,
    +						  Bottom | Right);
    +  if (images_[2])
    +    bottom_->addWidget(images_[2]);
    +  impl_->addWidget(bottom_);
    +
    +  decorationStyle().setBackgroundColor(backgroundColor_);
    +
    +  contents_->setMargin(WLength(radius_), Left | Right);
    +}
    +
    +void RoundedWidget::setBackgroundColor(WColor color)
    +{
    +  backgroundColor_ = color;
    +  adjust();
    +}
    +
    +void RoundedWidget::setSurroundingColor(WColor color)
    +{
    +  surroundingColor_ = color;
    +  adjust();
    +}
    +
    +void RoundedWidget::setCornerRadius(int radius)
    +{
    +  radius_ = radius;
    +  adjust();
    +}
    +
    +void RoundedWidget::enableRoundedCorners(bool how)
    +{
    +  if (images_[0]) images_[0]->setHidden(!how);
    +  if (images_[2]) images_[2]->setHidden(!how);
    +
    +  if (images_[1]) {
    +    images_[1]->setHidden(!how);
    +    if (!how)
    +      top_->decorationStyle().setBackgroundImage("");
    +    else
    +      top_->decorationStyle()
    +	.setBackgroundImage(images_[1]->imageRef(),
    +			    WCssDecorationStyle::NoRepeat,
    +			    Top | Right);
    +  }
    +
    +  if (images_[3]) {
    +    images_[3]->setHidden(!how);
    +    if (!how)
    +      bottom_->decorationStyle().setBackgroundImage("");
    +    else
    +      bottom_->decorationStyle()
    +	.setBackgroundImage(images_[3]->imageRef(),
    +			    WCssDecorationStyle::NoRepeat,
    +			    Top | Right);
    +  }
    +}
    +
    +void RoundedWidget::adjust()
    +{
    +  if (images_[0] && !images_[0]->isHidden()) images_[0]->setRadius(radius_);
    +  if (images_[1] && !images_[1]->isHidden()) images_[1]->setRadius(radius_);
    +  if (images_[2] && !images_[2]->isHidden()) images_[2]->setRadius(radius_);
    +  if (images_[3] && !images_[3]->isHidden()) images_[3]->setRadius(radius_);
    +
    +  if (images_[0] && !images_[0]->isHidden())
    +    images_[0]->setForeground(backgroundColor_);
    +  if (images_[1] && !images_[1]->isHidden())
    +    images_[1]->setForeground(backgroundColor_);
    +  if (images_[2] && !images_[2]->isHidden())
    +    images_[2]->setForeground(backgroundColor_);
    +  if (images_[3] && !images_[3]->isHidden())
    +    images_[3]->setForeground(backgroundColor_);
    +
    +  if (images_[1]) 
    +    top_->decorationStyle().setBackgroundImage(images_[1]->imageRef(),
    +					       WCssDecorationStyle::NoRepeat,
    +					       Top | Right);
    +  if (images_[3])
    +    bottom_->decorationStyle().setBackgroundImage(images_[3]->imageRef(),
    +						  WCssDecorationStyle::NoRepeat,
    +						  Bottom | Right);
    +
    +  top_->resize(WLength::Auto, radius_);
    +  bottom_->resize(WLength::Auto, radius_);
    +  contents_->setMargin(radius_, Left | Right);
    +
    +  decorationStyle().setBackgroundColor(backgroundColor_);
    +}
    diff --git a/wt-3.1.7a/examples/style/RoundedWidget.h b/wt-3.1.7a/examples/style/RoundedWidget.h
    new file mode 100644
    index 0000000..3a3096b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/RoundedWidget.h
    @@ -0,0 +1,140 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef ROUNDED_WIDGET_H_
    +#define ROUNDED_WIDGET_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +#include "CornerImage.h"
    +
    +namespace Wt {
    +  class WContainerWidget;
    +}
    +
    +/**
    + * @addtogroup styleexample
    + */
    +/*@{*/
    +
    +/*! \brief A widget with rounded corners.
    + *
    + * This widgets represents a widget for which any combination of its four
    + * corners may be rounded. Although rounded corners is not a standard part
    + * of the CSS specification, this widget will be rendered identical on
    + * all platforms.
    + *
    + * The contents of the widget is managed inside a WContainerWidget, which
    + * is accessed using the contents() method.
    + *
    + * The radius of the rounded corners, the background color of the image,
    + * and the surrounding color may be changed at all times.
    + *
    + * The RoundedWidget is part of the %Wt style example.
    + *
    + * \sa CornerImage.
    + */
    +class RoundedWidget : public WCompositeWidget
    +{
    +public:
    +  /*! \brief One of the four corners of a widget.
    +   */
    +  enum Corner { TopLeft = CornerImage::TopLeft,         //!< Top left
    +		TopRight = CornerImage::TopRight,       //!< Top right
    +		BottomLeft = CornerImage::BottomLeft,   //!< Bottom left
    +		BottomRight = CornerImage::BottomRight, //!< Bottom right
    +                All = 0xF};                             //!< All
    +
    +  /*! \brief Construct a widget with any combination of its corners
    +   *         rounded.
    +   */
    +  RoundedWidget(int corners = All, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destruct a RoundedWidget
    +   */
    +  ~RoundedWidget();
    +
    +  /*! \brief Set the widget background color.
    +   *
    +   * Because the background color also affects the color of the
    +   * corner images, the background color cannot be set using the
    +   * WCssDecorationStyle() of the widget.
    +   */
    +  void setBackgroundColor(WColor color);
    +
    +  /*! \brief Get the widget background color.
    +   */
    +  WColor backgroundColor() const { return backgroundColor_; }
    +
    +  /*! \brief Show or hide rounded corners.
    +   */
    +  void enableRoundedCorners(bool how);
    +
    +  /*! \brief Set the corner radius of the widget.
    +   */
    +  void setCornerRadius(int radius);
    +
    +  /*! \brief Get the corner radius of the widget.
    +   */
    +  int cornerRadius() const { return radius_; }
    +
    +  /*! \brief Set the surrounding color of the widget.
    +   *
    +   * This color will be used "outside" the corner, in each of the
    +   * corner images.
    +   */
    +  void setSurroundingColor(WColor color);
    +
    +  /*! \brief Get the surrounding color of the widget.
    +   */
    +  WColor surroundingColor() const { return surroundingColor_; }
    +
    +  /*! \brief Access the contents container.
    +   *
    +   * The contents WContainerWidget represents the contents inside
    +   * the rounded widget.
    +   */
    +  WContainerWidget *contents() const { return contents_; }
    +
    +private:
    +  //! Background color
    +  WColor backgroundColor_;
    +
    +  //! "Surrounding" color -- maybe we can use a transparent color ?
    +  WColor surroundingColor_;
    +
    +  //! Radius
    +  int radius_;
    +
    +  //! OR'ed specification of the corners which are to be rounded.
    +  int corners_;
    +
    +  //! The container widget in which to store the contents.
    +  WContainerWidget *contents_;
    +
    +  //! This composite widget is implemented as a WContainerWidget
    +  WContainerWidget *impl_;
    +
    +  //! A container at the top which renders the top rounding
    +  WContainerWidget *top_;
    +
    +  //! A container at the bottom renders the bottom rounding
    +  WContainerWidget *bottom_;
    +
    +  //! Up to four CornerImages for each corner.
    +  CornerImage *images_[4];
    +
    +  //! Create the implementation.
    +  void create();
    +
    +  //! Adjust the image (colors and radius).
    +  void adjust();
    +};
    +
    +/*@}*/
    +
    +#endif // ROUNDED_WIDGET_H_
    diff --git a/wt-3.1.7a/examples/style/StyleExample.C b/wt-3.1.7a/examples/style/StyleExample.C
    new file mode 100644
    index 0000000..c4425bc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/StyleExample.C
    @@ -0,0 +1,95 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WLineEdit>
    +#include <Wt/WIntValidator>
    +#include <Wt/WText>
    +#include <Wt/WPushButton>
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +
    +#include "RoundedWidget.h"
    +#include "StyleExample.h"
    +
    +char loremipsum[] = "Lorem ipsum dolor sit amet, consectetur adipisicing "
    +   "elit, sed do eiusmod tempor incididunt ut labore et "
    +   "dolore magna aliqua. Ut enim ad minim veniam, quis "
    +   "nostrud exercitation ullamco laboris nisi ut aliquip " 
    +   "ex ea commodo consequat. Duis aute irure dolor in "
    +   "reprehenderit in voluptate velit esse cillum dolore eu "
    +   "fugiat nulla pariatur. Excepteur sint occaecat cupidatat "
    +   "non proident, sunt in culpa qui officia deserunt mollit "
    +   "anim id est laborum.";
    +
    +StyleExample::StyleExample(WContainerWidget *parent)
    +  : WContainerWidget(parent)
    +{
    +  w_ = new RoundedWidget(RoundedWidget::All, this);
    +
    +  new WText(loremipsum, w_->contents());
    +  new WBreak(this);
    +
    +  new WText("Color (rgb): ", this);
    +  r_ = createValidateLineEdit(w_->backgroundColor().red(), 0, 255);
    +  g_ = createValidateLineEdit(w_->backgroundColor().green(), 0, 255);
    +  b_ = createValidateLineEdit(w_->backgroundColor().blue(), 0, 255);
    +
    +  new WBreak(this);
    +
    +  new WText("Radius (px): ", this);
    +  radius_ = createValidateLineEdit(w_->cornerRadius(), 1, 500);
    +
    +  new WBreak(this);
    +
    +  WPushButton *p = new WPushButton("Update!", this);
    +  p->clicked().connect(this, &StyleExample::updateStyle);
    +
    +  new WBreak(this);
    +
    +  error_ = new WText("", this);
    +}
    +
    +WLineEdit *StyleExample::createValidateLineEdit(int value, int min, int max)
    +{
    +  WLineEdit *le = new WLineEdit(boost::lexical_cast<std::wstring>(value), this);
    +  le->setTextSize(3);
    +  le->setValidator(new WIntValidator(min, max));
    +
    +  return le;
    +}
    +
    +void StyleExample::updateStyle()
    +{
    +  if ((r_->validate() != WValidator::Valid)
    +      || (g_->validate() != WValidator::Valid)
    +      || (b_->validate() != WValidator::Valid))
    +    error_->setText("Color components must be numbers between 0 and 255.");
    +  else if (radius_->validate() != WValidator::Valid)
    +    error_->setText("Radius must be between 1 and 500.");
    +  else {
    +    w_->setBackgroundColor(WColor(boost::lexical_cast<int>(r_->text()),
    +				  boost::lexical_cast<int>(g_->text()),
    +				  boost::lexical_cast<int>(b_->text())));
    +    w_->setCornerRadius(boost::lexical_cast<int>(radius_->text()));
    +    error_->setText("");
    +  }
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  app->setTitle("Style example");
    +
    +  app->root()->addWidget(new StyleExample());
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/style/StyleExample.h b/wt-3.1.7a/examples/style/StyleExample.h
    new file mode 100644
    index 0000000..cf4dece
    --- /dev/null
    +++ b/wt-3.1.7a/examples/style/StyleExample.h
    @@ -0,0 +1,50 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef STYLEEXAMPLE_H_
    +#define STYLEEXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WLineEdit;
    +  class WText;
    +}
    +
    +using namespace Wt;
    +
    +class RoundedWidget;
    +
    +/**
    + * \defgroup styleexample Style example
    + */
    +/*@{*/
    +
    +/*! \brief A demonstration of the RoundedWidget.
    + *
    + * This is the main class for the style example.
    + */
    +class StyleExample : public WContainerWidget
    +{
    +public:
    +  /*! \brief Create a StyleExample.
    +   */
    +  StyleExample(WContainerWidget *parent = 0);
    +
    +private:
    +  RoundedWidget *w_;
    +  WText *error_;
    +
    +  WLineEdit *radius_, *r_, *g_, *b_;
    +
    +  WLineEdit *createValidateLineEdit(int value, int min, int max);
    +  void updateStyle();
    +};
    +
    +/*@}*/
    +
    +#endif // STYLEEXAMPLE_H_
    diff --git a/wt-3.1.7a/examples/treelist/CMakeLists.txt b/wt-3.1.7a/examples/treelist/CMakeLists.txt
    new file mode 100644
    index 0000000..c17edc6
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/CMakeLists.txt
    @@ -0,0 +1,8 @@
    +WT_ADD_EXAMPLE(demotreelist.wt DemoTreeList.C IconPair.C TreeNode.C)
    +
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +)
    +
    +ADD_DEPENDENCIES(demotreelist.wt wt ${EXAMPLES_CONNECTOR})
    +
    diff --git a/wt-3.1.7a/examples/treelist/DemoTreeList.C b/wt-3.1.7a/examples/treelist/DemoTreeList.C
    new file mode 100644
    index 0000000..9e91cf0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/DemoTreeList.C
    @@ -0,0 +1,184 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WText>
    +#include <Wt/WImage>
    +#include <Wt/WPushButton>
    +
    +#include "DemoTreeList.h"
    +#include "TreeNode.h"
    +#include "IconPair.h"
    +
    +using namespace Wt;
    +using std::rand;
    +
    +DemoTreeList::DemoTreeList(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    testCount_(0)
    +{
    +  addWidget
    +    (new WText("<h2>Wt Tree List example</h2>"
    +	       "<p>This is a simple demo of a treelist, implemented using"
    +	       " <a href='http://witty.sourceforge.net/'>Wt</a>.</p>"
    +	       "<p>The leafs of the tree contain the source code of the "
    +	       "tree-list in the classes <b>TreeNode</b> and "
    +	       "<b>IconPair</b>, as well as the implementation of this "
    +	       "demo itself in the class <b>DemoTreeList</b>.</p>"));
    +
    +  tree_ = makeTreeMap("Examples", 0);
    +  addWidget(tree_);
    +
    +  TreeNode *treelist = makeTreeMap("Tree List", tree_);
    +  TreeNode *wstateicon = makeTreeMap("class IconPair", treelist);
    +  makeTreeFile("<a href=\"IconPair.h\">IconPair.h</a>", wstateicon);
    +  makeTreeFile("<a href=\"IconPair.C\">IconPair.C</a>", wstateicon);
    +  TreeNode *wtreenode = makeTreeMap("class TreeNode", treelist);
    +  makeTreeFile("<a href=\"TreeNode.h\">TreeNode.h</a>", wtreenode);
    +  makeTreeFile("<a href=\"TreeNode.C\">TreeNode.C</a>", wtreenode);
    +  TreeNode *demotreelist = makeTreeMap("class DemoTreeList", treelist);
    +  makeTreeFile("<a href=\"DemoTreeList.h\">DemoTreeList.h</a>", demotreelist);
    +  makeTreeFile("<a href=\"DemoTreeList.C\">DemoTreeList.C</a>", demotreelist);
    +
    +  testMap_ = makeTreeMap("Test map", tree_);
    +
    +  /*
    +   * Buttons to dynamically demonstrate changing the tree contents.
    +   */
    +  addWidget
    +    (new WText("<p>Use the following buttons to change the tree "
    +	       "contents:</p>"));
    +
    +  addMapButton_
    +    = new WPushButton("Add map", this);
    +  addMapButton_->clicked().connect(this, &DemoTreeList::addMap);
    +
    +  removeMapButton_
    +    = new WPushButton("Remove map", this);
    +  removeMapButton_->clicked().connect(this, &DemoTreeList::removeMap);
    +  removeMapButton_->disable();
    +
    +  addWidget
    +    (new WText("<p>Remarks:"
    +	       "<ul>"
    +	       "<li><p>This is not the instantiation of a pre-defined "
    +	       "tree list component, but the full implementation of such "
    +	       "a component, in about 350 lines of C++ code !</p> "
    +	       "<p>In comparison, the <a href='http://myfaces.apache.org'> "
    +	       "Apache MyFaces</a> JSF implementation of tree2, with similar "
    +	       "functionality, uses about 2400 lines of Java, and 140 lines "
    +	       "of JavaScript code.</p></li>"
    +	       "<li><p>Once loaded, the tree list does not require any "
    +	       "interaction with the server for handling the click events on "
    +	       "the <img src='icons/nav-plus-line-middle.gif' /> and "
    +	       "<img src='icons/nav-minus-line-middle.gif' /> icons, "
    +	       "because these events have been connected to slots using "
    +	       "STATIC connections. Such connections are converted to the "
    +	       "appropriate JavaScript code that is inserted into the page. "
    +	       "Still, the events are signaled to the server to update the "
    +	       "application state.</p></li>"
    +	       "<li><p>In contrast, the buttons for manipulating the tree "
    +	       "contents use DYNAMIC connections, and thus the update "
    +	       "is computed at server-side, and communicated back to the "
    +	       "browser (by default using AJAX).</p></li>"
    +	       "<li><p>When loading a page, only visible widgets (that are not "
    +	       "<b>setHidden(true)</b>) are transmitted. "
    +	       "The remaining widgets are loaded in the background after "
    +	       "rendering the page. "
    +	       "As a result the application is loaded as fast as possible.</p>"
    +	       "</li>"
    +	       "<li><p>The browser reload button is supported and behaves as "
    +	       "expected: the page is reloaded from the server. Again, "
    +	       "only visible widgets are transmitted immediately.</p> "
    +	       "<p>(For the curious, this is the way to see the actual "
    +	       "HTML/JavaScript code !)</p></li>"
    +	       "</ul></p>"));
    +}
    +
    +void DemoTreeList::addMap()
    +{
    +  TreeNode *node
    +    = makeTreeMap("Map " + boost::lexical_cast<std::string>(++testCount_),
    +		  testMap_);
    +  makeTreeFile("File " + boost::lexical_cast<std::string>(testCount_),
    +	       node);
    +
    +  removeMapButton_->enable();
    +}
    +
    +void DemoTreeList::removeMap()
    +{
    +  int numMaps = testMap_->childNodes().size();
    +
    +  if (numMaps > 0) {
    +    int c = rand() % numMaps;
    +
    +    TreeNode *child = testMap_->childNodes()[c];
    +    testMap_->removeChildNode(child);
    +    delete child;
    +
    +    if (numMaps == 1)
    +      removeMapButton_->disable();
    +  }
    +}
    +
    +TreeNode *DemoTreeList::makeTreeMap(const std::string name, TreeNode *parent)
    +{
    +  IconPair *labelIcon
    +    = new IconPair("icons/yellow-folder-closed.png",
    +		   "icons/yellow-folder-open.png",
    +		   false);
    +
    +  TreeNode *node = new TreeNode(name, PlainText, labelIcon, 0);
    +  if (parent)
    +    parent->addChildNode(node);
    +
    +  return node;
    +}
    +
    +TreeNode *DemoTreeList::makeTreeFile(const std::string name,
    +				      TreeNode *parent)
    +{
    +  IconPair *labelIcon
    +    = new IconPair("icons/document.png", "icons/yellow-folder-open.png",
    +		   false);
    +
    +  TreeNode *node = new TreeNode(name, XHTMLText, labelIcon, 0);
    +  if (parent)
    +    parent->addChildNode(node);
    +
    +  return node;
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new WApplication(env);
    +  new DemoTreeList(app->root());
    +
    +  /*
    +   * The look & feel of the tree node is configured using a CSS style sheet.
    +   * If you are not familiar with CSS, you can use the WCssDecorationStyle
    +   * class ...
    +   */
    +  WCssDecorationStyle treeNodeLabelStyle;
    +  treeNodeLabelStyle.font().setFamily(WFont::Serif, "Helvetica");
    +  app->styleSheet().addRule(".treenodelabel", treeNodeLabelStyle);
    +
    +  /*
    +   * ... or if you speak CSS fluently, you can add verbatim rules.
    +   */
    +  app->styleSheet().addRule(".treenodechildcount",
    +			    "color:blue; font-family:Helvetica,serif;");
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +   return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/treelist/DemoTreeList.h b/wt-3.1.7a/examples/treelist/DemoTreeList.h
    new file mode 100644
    index 0000000..c8df7d5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/DemoTreeList.h
    @@ -0,0 +1,61 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DEMO_TREE_LIST
    +#define DEMO_TREE_LIST
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WPushButton;
    +}
    +
    +class TreeNode;
    +
    +/**
    + * \defgroup treelist Treelist example
    + */
    +/*@{*/
    +
    +/*! \brief A demonstration of the treelist.
    + *
    + * This is the main class for the treelist example.
    + */
    +class DemoTreeList : public Wt::WContainerWidget
    +{
    +public:
    +  /*! \brief Create a DemoTreeList.
    +   */
    +  DemoTreeList(Wt::WContainerWidget *parent);
    +
    +private:
    +  TreeNode *tree_;
    +  TreeNode *testMap_;
    +  int testCount_;
    +
    +  Wt::WPushButton *addMapButton_;
    +  Wt::WPushButton *removeMapButton_;
    +
    +  /*!\brief Add a map.
    +   */
    +  void addMap();
    +
    +  /*!\brief Remove a map.
    +   */ 
    +  void removeMap();
    +
    +  /*!\brief Create a "map" node, and insert in the given parent.
    +   */
    +  TreeNode *makeTreeMap(const std::string name, TreeNode *parent);
    +
    +  /*!\brief Create a "file" node, and insert in the given parent.
    +   */
    +  TreeNode *makeTreeFile(const std::string name, TreeNode *parent);
    +};
    +
    +/*@}*/
    +
    +#endif // DEMO_TREE_LIST
    diff --git a/wt-3.1.7a/examples/treelist/IconPair.C b/wt-3.1.7a/examples/treelist/IconPair.C
    new file mode 100644
    index 0000000..b6554f2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/IconPair.C
    @@ -0,0 +1,77 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WImage>
    +
    +#include "IconPair.h"
    +
    +IconPair::IconPair(const std::string icon1URI, const std::string icon2URI,
    +		   bool clickIsSwitch, Wt::WContainerWidget *parent)
    +  : Wt::WCompositeWidget(parent),
    +    impl_(new Wt::WContainerWidget()),
    +    icon1_(new Wt::WImage(icon1URI, impl_)),
    +    icon2_(new Wt::WImage(icon2URI, impl_)),
    +    icon1Clicked(icon1_->clicked()),
    +    icon2Clicked(icon2_->clicked())
    +{
    +  setImplementation(impl_);
    +
    +  implementStateless(&IconPair::showIcon1, &IconPair::undoShowIcon1);
    +  implementStateless(&IconPair::showIcon2, &IconPair::undoShowIcon2);
    +
    +  setInline(true);
    +
    +  icon2_->hide();
    +
    +  if (clickIsSwitch) {
    +    icon1_->clicked().connect(icon1_, &Wt::WImage::hide);
    +    icon1_->clicked().connect(icon2_, &Wt::WImage::show);
    +
    +    icon2_->clicked().connect(icon2_, &Wt::WImage::hide);
    +    icon2_->clicked().connect(icon1_, &Wt::WImage::show); //
    +
    +    decorationStyle().setCursor(Wt::PointingHandCursor);
    +  }
    +} //
    +
    +void IconPair::setState(int num)
    +{
    +  if (num == 0) {
    +    icon1_->show();
    +    icon2_->hide();
    +  } else {
    +    icon1_->hide();
    +    icon2_->show();
    +  }
    +}
    +
    +int IconPair::state() const
    +{
    +  return (icon1_->isHidden() ? 1 : 0);
    +}
    +
    +void IconPair::showIcon1()
    +{
    +  previousState_ = (icon1_->isHidden() ? 1 : 0);
    +  setState(0);
    +}
    +
    +void IconPair::showIcon2()
    +{
    +  previousState_ = (icon1_->isHidden() ? 1 : 0);
    +  setState(1);
    +}
    +
    +void IconPair::undoShowIcon1()
    +{
    +  setState(previousState_);
    +}
    +
    +void IconPair::undoShowIcon2()
    +{
    +  setState(previousState_);
    +} //
    diff --git a/wt-3.1.7a/examples/treelist/IconPair.h b/wt-3.1.7a/examples/treelist/IconPair.h
    new file mode 100644
    index 0000000..681a7c2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/IconPair.h
    @@ -0,0 +1,108 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ICONPAIR_H_
    +#define ICONPAIR_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +  class WImage;
    +}
    +
    +/**
    + * @addtogroup treelist
    + */
    +/*@{*/
    +
    +/*! \brief An icon pair (identical to WIconPair)
    + *
    + * This widget manages two images, only one of which is shown at a single
    + * time.
    + *
    + * The widget may also react to click events, by changing state.
    + *
    + * This widget is part of the %Wt treelist example, where it is used
    + * to represent the expand/collapse icons, and the corresponding
    + * map open/close icon.
    + *
    + * \sa TreeNode
    + */
    +class IconPair : public Wt::WCompositeWidget
    +{
    +public:
    +  /*! \brief Construct a two-state icon widget.
    +   *
    +   * The constructor takes the URI of the two icons. When clickIsSwitch
    +   * is set true, clicking on the icon will switch state.
    +   */
    +  IconPair(const std::string icon1URI, const std::string icon2URI,
    +	   bool clickIsSwitch = true, Wt::WContainerWidget *parent = 0);
    +
    +  /*! \brief Set which icon should be visible.
    +   *
    +   * The first icon has number 0, and the second icon has number 1.
    +   *
    +   * \sa state()
    +   */
    +  void setState(int num);
    +
    +  /*! \brief Get the current state.
    +   *
    +   * \sa setState()
    +   */
    +  int state() const;
    +
    +  /*! \brief Get the first icon image
    +   */
    +  Wt::WImage *icon1() const { return icon1_; }
    +  
    +  /*! \brief Get the second icon image
    +   */
    +  Wt::WImage *icon2() const { return icon2_; }
    +
    +  /*! \brief Set state to 0 (show icon 1).
    +   */
    +  void showIcon1();
    +
    +  /*! \brief Set state to 1 (show icon 2).
    +   */ 
    +  void showIcon2();
    +
    +private:
    +  Wt::WContainerWidget *impl_;
    +
    +  //! First icon.
    +  Wt::WImage *icon1_;
    +
    +  //! Second icon.
    +  Wt::WImage *icon2_;
    +
    +public:
    +  /*! \brief Signal emitted when clicked while in state 0 (icon 1 is
    +   *         shown).
    +   */
    +  Wt::EventSignal<Wt::WMouseEvent>& icon1Clicked;
    +
    +  /*! \brief Signal emitted when clicked while in state 1 (icon 2 is
    +   *         shown).
    +   */
    +  Wt::EventSignal<Wt::WMouseEvent>& icon2Clicked;
    +
    +private:
    +  //! Undo state for prelearning stateless showIcon1() and showIcon2() slots
    +  int previousState_;
    +
    +  //! Undo function for prelearning showIcon1()
    +  void undoShowIcon1();
    +
    +  //! Undo function for prelearning showIcon2()
    +  void undoShowIcon2();
    +};
    +
    +/*@}*/
    +
    +#endif // ICONPAIR_H_
    diff --git a/wt-3.1.7a/examples/treelist/TreeNode.C b/wt-3.1.7a/examples/treelist/TreeNode.C
    new file mode 100644
    index 0000000..7779909
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/TreeNode.C
    @@ -0,0 +1,214 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WImage>
    +#include <Wt/WText>
    +#include <Wt/WCssDecorationStyle>
    +
    +#include "TreeNode.h"
    +#include "IconPair.h"
    +
    +using std::find;
    +
    +std::string TreeNode::imageLine_[] = { "icons/line-middle.gif",
    +				       "icons/line-last.gif" };
    +std::string TreeNode::imagePlus_[] = { "icons/nav-plus-line-middle.gif",
    +				       "icons/nav-plus-line-last.gif" };
    +std::string TreeNode::imageMin_[] = { "icons/nav-minus-line-middle.gif",
    +				      "icons/nav-minus-line-last.gif" };
    +
    +TreeNode::TreeNode(const std::string labelText,
    +		   Wt::TextFormat labelFormat,
    +		   IconPair *labelIcon,
    +		   Wt::WContainerWidget *parent)
    +  : Wt::WCompositeWidget(parent),
    +    parentNode_(0),
    +    labelIcon_(labelIcon)
    +{
    +  // pre-learned stateless implementations ...
    +  implementStateless(&TreeNode::expand, &TreeNode::undoExpand);
    +  implementStateless(&TreeNode::collapse, &TreeNode::undoCollapse);
    +
    +  // ... or auto-learned stateless implementations
    +  // which do not need undo functions
    +  //implementStateless(&TreeNode::expand);
    +  //implementStateless(&TreeNode::collapse);
    +
    +  setImplementation(layout_ = new Wt::WTable());
    +
    +  expandIcon_ = new IconPair(imagePlus_[Last], imageMin_[Last]);
    +  expandIcon_->hide();
    +  noExpandIcon_ = new Wt::WImage(imageLine_[Last]);
    +
    +  expandedContent_ = new Wt::WContainerWidget();
    +  expandedContent_->hide();
    +
    +  labelText_ = new Wt::WText(labelText);
    +  labelText_->setTextFormat(labelFormat);
    +  labelText_->setStyleClass("treenodelabel");
    +  childCountLabel_ = new Wt::WText();
    +  childCountLabel_->setMargin(7, Wt::Left);
    +  childCountLabel_->setStyleClass("treenodechildcount");
    +
    +  layout_->elementAt(0, 0)->addWidget(expandIcon_);
    +  layout_->elementAt(0, 0)->addWidget(noExpandIcon_);
    +
    +  if (labelIcon_) {
    +    layout_->elementAt(0, 1)->addWidget(labelIcon_);
    +    labelIcon_->setVerticalAlignment(Wt::AlignMiddle);
    +  }
    +  layout_->elementAt(0, 1)->addWidget(labelText_);
    +  layout_->elementAt(0, 1)->addWidget(childCountLabel_);
    +
    +  layout_->elementAt(1, 1)->addWidget(expandedContent_);
    +
    +  layout_->elementAt(0, 0)->setContentAlignment(Wt::AlignTop);
    +  layout_->elementAt(0, 1)->setContentAlignment(Wt::AlignMiddle);
    +
    +  expandIcon_->icon1Clicked.connect(this, &TreeNode::expand);
    +  expandIcon_->icon2Clicked.connect(this, &TreeNode::collapse);
    +} //
    +
    +bool TreeNode::isLastChildNode() const
    +{
    +  if (parentNode_) {
    +    return parentNode_->childNodes_.back() == this;
    +  } else
    +    return true;
    +}
    +
    +void TreeNode::addChildNode(TreeNode *node)
    +{
    +  childNodes_.push_back(node);
    +  node->parentNode_ = this;
    +
    +  expandedContent_->addWidget(node);
    +
    +  childNodesChanged();
    +}
    +
    +void TreeNode::removeChildNode(TreeNode *node)
    +{
    +  childNodes_.erase(std::find(childNodes_.begin(), childNodes_.end(), node));
    +
    +  node->parentNode_ = 0;
    +
    +  expandedContent_->removeWidget(node);
    +
    +  childNodesChanged();
    +} //
    +
    +void TreeNode::childNodesChanged()
    +{
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->adjustExpandIcon();
    +
    +  adjustExpandIcon();
    +
    +  if (childNodes_.size())
    +    childCountLabel_
    +      ->setText("(" + boost::lexical_cast<std::string>(childNodes_.size())
    +		+ ")");
    +  else
    +    childCountLabel_->setText("");
    +
    +  resetLearnedSlots();
    +} //
    +
    +void TreeNode::collapse()
    +{
    +  wasCollapsed_ = expandedContent_->isHidden();
    +
    +  expandIcon_->setState(0);
    +  expandedContent_->hide();
    +  if (labelIcon_)
    +    labelIcon_->setState(0);
    +} //
    +
    +void TreeNode::expand()
    +{
    +  wasCollapsed_ = expandedContent_->isHidden();
    +
    +  expandIcon_->setState(1);
    +  expandedContent_->show();
    +  if (labelIcon_)
    +    labelIcon_->setState(1);
    +
    +  /*
    +   * collapse all children
    +   */
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->collapse();
    +} //
    +
    +void TreeNode::undoCollapse()
    +{
    +  if (!wasCollapsed_) {
    +    // re-expand
    +    expandIcon_->setState(1);
    +    expandedContent_->show();
    +    if (labelIcon_)
    +      labelIcon_->setState(1);    
    +  }
    +}
    +
    +void TreeNode::undoExpand()
    +{
    +  if (wasCollapsed_) {
    +    // re-collapse
    +    expandIcon_->setState(0);
    +    expandedContent_->hide();
    +    if (labelIcon_)
    +      labelIcon_->setState(0);
    +  }
    +
    +  /*
    +   * undo collapse of children
    +   */
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->undoCollapse();  
    +} //
    +
    +void TreeNode::adjustExpandIcon()
    +{
    +  ImageIndex index = isLastChildNode() ? Last : Middle;
    +
    +  if (expandIcon_->icon1()->imageRef() != imagePlus_[index])
    +    expandIcon_->icon1()->setImageRef(imagePlus_[index]);
    +  if (expandIcon_->icon2()->imageRef() != imageMin_[index])
    +    expandIcon_->icon2()->setImageRef(imageMin_[index]);
    +  if (noExpandIcon_->imageRef() != imageLine_[index])
    +    noExpandIcon_->setImageRef(imageLine_[index]);
    +
    +  if (index == Last) {
    +    layout_->elementAt(0, 0)
    +      ->decorationStyle().setBackgroundImage("");
    +    layout_->elementAt(1, 0)
    +      ->decorationStyle().setBackgroundImage("");
    +  } else {
    +    layout_->elementAt(0, 0)
    +      ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
    +					     Wt::WCssDecorationStyle::RepeatY);
    +    layout_->elementAt(1, 0)
    +      ->decorationStyle().setBackgroundImage("icons/line-trunk.gif",
    +					     Wt::WCssDecorationStyle::RepeatY);
    +  } //
    +
    +  if (childNodes_.empty()) {
    +    if (noExpandIcon_->isHidden()) {
    +      noExpandIcon_->show();
    +      expandIcon_->hide();
    +    }
    +  } else {
    +    if (expandIcon_->isHidden()) {
    +      noExpandIcon_->hide();
    +      expandIcon_->show();
    +    }
    +  }
    +} //
    diff --git a/wt-3.1.7a/examples/treelist/TreeNode.h b/wt-3.1.7a/examples/treelist/TreeNode.h
    new file mode 100644
    index 0000000..6a80822
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treelist/TreeNode.h
    @@ -0,0 +1,148 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef TREENODE_H_
    +#define TREENODE_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WText>
    +
    +class IconPair;
    +
    +namespace Wt {
    +  class WTable;
    +  class WImage;
    +}
    +
    +/**
    + * @addtogroup treelist
    + */
    +/*@{*/
    +
    +/*! \brief Example implementation of a single tree list node.
    + *
    + * <i>This is an example of a basic treelist implementation. As of
    + * version 1.1.8, a more flexible treenode implementation is included as
    + * part of the library: WTreeNode.</i>
    + *
    + * A tree list is constructed by nesting TreeNode objects in a tree
    + * hierarchy.
    + *
    + * A TreeNode has a label, and optionally a two-state label icon, which
    + * defines a different image depending on the state of the node (expanded
    + * or collapsed). When the node has any children, a child count is also
    + * indicated.
    + *
    + * Next to the icons, two style classes determine the look of a TreeNode:
    + * the label has style "treenodelabel", and the child count has as style
    + * "treenodechildcount".
    + *
    + * Use CSS nested selectors to apply different styles to different treenodes.
    + * For example, to style the treenode with style class "mynode":
    + *
    + * The behaviour of the tree node is to collapse all children when the
    + * node is expanded (this is similar to how most tree node implementations
    + * work).
    + *
    + * The widget uses a number of images which must be available in an
    + * "icons/" folder (see the %Wt treelist examples).
    + *
    + * This widget is part of the %Wt treelist example.
    + */
    +class TreeNode : public Wt::WCompositeWidget
    +{
    +public:
    +  /*! \brief Construct a tree node with the given label.
    +   *
    +   * The label is formatted in a WText with the given formatting.
    +   * The labelIcon (if not 0) will appear next to the label and its state
    +   * will reflect the expand/collapse state of the node.
    +   *
    +   * Optionally, a userContent widget may be associated with the node.
    +   * When expanded, this widget will be shown below the widget, but above
    +   * any of the children nodes.
    +   */
    +  TreeNode(const std::string labelText,
    +	   Wt::TextFormat labelFormat,
    +	   IconPair *labelIcon, Wt::WContainerWidget *parent = 0);
    +
    +  /*! \brief Adds a child node.
    +   */
    +  void addChildNode(TreeNode *node);
    +
    +  /*! \brief Removes a child node.
    +   */
    +  void removeChildNode(TreeNode *node);
    +
    +  /*! \brief Returns the list of children.
    +   */
    +  const std::vector<TreeNode *>& childNodes() const { return childNodes_; }
    +
    +  /*! \brief Collapses this node.
    +   */
    +  void collapse();
    +
    +  /*! \brief Expands this node.
    +   */
    +  void expand();
    +
    +private:
    +  //! List of child nodes.
    +  std::vector<TreeNode *> childNodes_;
    +
    +  //! The parent node.
    +  TreeNode		   *parentNode_;
    +
    +  //! Layout (2x2 table).
    +  Wt::WTable               *layout_;
    +
    +  //! The icon for expanding or collapsing.
    +  IconPair                 *expandIcon_;
    +
    +  //! The single image shown instead of the expand/collapse icon when no children.
    +  Wt::WImage		   *noExpandIcon_;
    +
    +  //! The icon next to the label.
    +  IconPair		   *labelIcon_;
    +
    +  //! The label.
    +  Wt::WText		   *labelText_;
    +
    +  //! The children count '(x)' for x children.
    +  Wt::WText		   *childCountLabel_;
    +
    +  //! The container in which the children are managed.
    +  Wt::WContainerWidget     *expandedContent_;
    +
    +  //! Adjust the expand icon
    +  void adjustExpandIcon();
    +
    +  //! Returns if is the last child within its parent (is rendered differently)
    +  bool isLastChildNode() const;
    +
    +  //! Rerender when children have changed.
    +  void childNodesChanged();
    +
    +  //! Was collapsed (for undo of prelearned collapse() and expand() slots.
    +  bool wasCollapsed_;
    +
    +  //! Undo function for prelearning collapse()
    +  void undoCollapse();
    +
    +  //! Undo function for prelearning expand()
    +  void undoExpand();
    +
    +  //! Two sets of images, for a normal node, and for the last node.
    +  enum ImageIndex { Middle = 0, Last = 1 };
    +
    +  static std::string imageLine_[];
    +  static std::string imagePlus_[];
    +  static std::string imageMin_[];
    +}; //
    +
    +/*@}*/
    +
    +#endif // WTREENODE_H_
    diff --git a/wt-3.1.7a/examples/treelist/icons/document.png b/wt-3.1.7a/examples/treelist/icons/document.png
    new file mode 100644
    index 0000000..208908a
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/document.png differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/line-last.gif b/wt-3.1.7a/examples/treelist/icons/line-last.gif
    new file mode 100644
    index 0000000..0ada2a6
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/line-last.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/line-middle.gif b/wt-3.1.7a/examples/treelist/icons/line-middle.gif
    new file mode 100644
    index 0000000..23050bf
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/line-middle.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/line-trunk.gif b/wt-3.1.7a/examples/treelist/icons/line-trunk.gif
    new file mode 100644
    index 0000000..161fbd4
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/line-trunk.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/nav-minus-line-last.gif b/wt-3.1.7a/examples/treelist/icons/nav-minus-line-last.gif
    new file mode 100644
    index 0000000..cebd1cc
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/nav-minus-line-last.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/nav-minus-line-middle.gif b/wt-3.1.7a/examples/treelist/icons/nav-minus-line-middle.gif
    new file mode 100644
    index 0000000..388b11a
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/nav-minus-line-middle.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/nav-plus-line-last.gif b/wt-3.1.7a/examples/treelist/icons/nav-plus-line-last.gif
    new file mode 100644
    index 0000000..b1b8b52
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/nav-plus-line-last.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/nav-plus-line-middle.gif b/wt-3.1.7a/examples/treelist/icons/nav-plus-line-middle.gif
    new file mode 100644
    index 0000000..42362ac
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/nav-plus-line-middle.gif differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/yellow-folder-closed.png b/wt-3.1.7a/examples/treelist/icons/yellow-folder-closed.png
    new file mode 100644
    index 0000000..0215874
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/yellow-folder-closed.png differ
    diff --git a/wt-3.1.7a/examples/treelist/icons/yellow-folder-open.png b/wt-3.1.7a/examples/treelist/icons/yellow-folder-open.png
    new file mode 100644
    index 0000000..97ce9f8
    Binary files /dev/null and b/wt-3.1.7a/examples/treelist/icons/yellow-folder-open.png differ
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/CMakeLists.txt b/wt-3.1.7a/examples/treeview-dragdrop/CMakeLists.txt
    new file mode 100644
    index 0000000..dbaea17
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/CMakeLists.txt
    @@ -0,0 +1,12 @@
    +WT_ADD_EXAMPLE(treeviewdragdrop.wt
    +  CsvUtil.C
    +  FolderView.C
    +  TreeViewDragDrop.C
    +)
    +
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +)
    +
    +ADD_DEPENDENCIES(treeviewdragdrop.wt wt ${EXAMPLES_CONNECTOR})
    +
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.C b/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.C
    new file mode 100644
    index 0000000..af4123b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.C
    @@ -0,0 +1,66 @@
    +#include <boost/tokenizer.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WAbstractItemModel>
    +#include <Wt/WString>
    +
    +#include "CsvUtil.h"
    +
    +void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
    +		 int numRows, bool firstLineIsHeaders)
    +{
    +  int csvRow = 0;
    +
    +  while (f) {
    +    std::string line;
    +    getline(f, line);
    +
    +    if (f) {
    +      typedef boost::tokenizer<boost::escaped_list_separator<char> >
    +	CsvTokenizer;
    +      CsvTokenizer tok(line);
    +
    +      int col = 0;
    +      for (CsvTokenizer::iterator i = tok.begin();
    +	   i != tok.end(); ++i, ++col) {
    +
    +	if (col >= model->columnCount())
    +	  model->insertColumns(model->columnCount(),
    +			       col + 1 - model->columnCount());
    +
    +	if (firstLineIsHeaders && csvRow == 0)
    +	  model->setHeaderData(col, boost::any(Wt::WString::fromUTF8(*i)));
    +	else {
    +	  int dataRow = firstLineIsHeaders ? csvRow - 1 : csvRow;
    +
    +	  if (numRows != -1 && dataRow >= numRows)
    +	    return;
    +
    +	  if (dataRow >= model->rowCount())
    +	    model->insertRows(model->rowCount(),
    +			      dataRow + 1 - model->rowCount());
    +
    +	  std::string s = *i;
    +
    +	  boost::any data;
    +
    +	  char *end;
    +	  int i = std::strtol(s.c_str(), &end, 10);
    +	  if (*end == 0)
    +	    data = boost::any(i);
    +	  else {
    +	    double d = std::strtod(s.c_str(), &end);
    +	    if (*end == 0)
    +	      data = boost::any(d);
    +	    else
    +	      data = boost::any(Wt::WString::fromUTF8(s));
    +	  }
    +
    +	  model->setData(dataRow, col, data);
    +	}
    +      }
    +    }
    +
    +    ++csvRow;
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.h b/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.h
    new file mode 100644
    index 0000000..29d90e7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/CsvUtil.h
    @@ -0,0 +1,19 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CSV_UTIL_H_
    +#define CSV_UTIL_H_
    +
    +#include <iostream>
    +
    +namespace Wt {
    +  class WAbstractItemModel;
    +}
    +
    +extern void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
    +			int numRows = -1, bool firstLineIsHeaders = true);
    +
    +#endif // CSV_UTIL_H_
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/FolderView.C b/wt-3.1.7a/examples/treeview-dragdrop/FolderView.C
    new file mode 100644
    index 0000000..3f03085
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/FolderView.C
    @@ -0,0 +1,84 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +
    +#include <Wt/WAbstractItemModel>
    +#include <Wt/WItemSelectionModel>
    +#include <Wt/WMessageBox>
    +
    +#include "FolderView.h"
    +
    +using namespace Wt;
    +
    +const char *FolderView::FileSelectionMimeType
    +  = "application/x-computers-selection";
    +
    +FolderView::FolderView(Wt::WContainerWidget *parent)
    +  : WTreeView(parent)
    +{
    +  /*
    +   * Accept drops for the custom mime type.
    +   */
    +  acceptDrops(FileSelectionMimeType);
    +}
    +
    +void FolderView::dropEvent(const Wt::WDropEvent& event,
    +			    const Wt::WModelIndex& target)
    +{
    +  /*
    +   * We reimplement the drop event to handle the dropping of a
    +   * selection of computers.
    +   *
    +   * The test below would always be true in this case, since we only
    +   * indicated support for that particular mime type.
    +   */
    +  if (event.mimeType() == FileSelectionMimeType) {
    +    /*
    +     * The source object for a drag of a selection from a WTreeView is
    +     * a WItemSelectionModel.
    +     */
    +    WItemSelectionModel *selection
    +      = dynamic_cast<WItemSelectionModel *>(event.source());
    +
    +#ifdef WT_THREADED
    +    int result = WMessageBox::show
    +      ("Drop event",
    +       "Move "
    +       + boost::lexical_cast<std::string>(selection->selectedIndexes().size())
    +       + " files to folder '"
    +       + boost::any_cast<WString>(target.data(DisplayRole)).toUTF8()
    +       + "' ?",
    +       Yes | No);
    +#else
    +    int result = Yes;
    +#endif
    +
    +    if (result == Yes) {
    +      /*
    +       * You can access the source model from the selection and
    +       * manipulate it.
    +       */
    +      WAbstractItemModel *sourceModel = selection->model();
    +
    +      WModelIndexSet toChange = selection->selectedIndexes();
    +
    +      for (WModelIndexSet::const_reverse_iterator i = toChange.rbegin();
    +	   i != toChange.rend(); ++i) {
    +	WModelIndex index = *i;
    +
    +	/*
    +	 * Copy target folder to file. Since we are using a
    +	 * dynamic WSortFilterProxyModel that filters on folder, this
    +	 * will also result in the removal of the file from the
    +	 * current view.
    +	 */
    +	std::map<int, boost::any> data = model()->itemData(target);
    +	data[DecorationRole] = index.data(DecorationRole);
    +	sourceModel->setItemData(index, data);
    +      }
    +    }
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/FolderView.h b/wt-3.1.7a/examples/treeview-dragdrop/FolderView.h
    new file mode 100644
    index 0000000..25f381c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/FolderView.h
    @@ -0,0 +1,41 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef FOLDER_VIEW_H_
    +#define FOLDER_VIEW_H_
    +
    +#include <Wt/WTreeView>
    +
    +/**
    + * \addtogroup treeviewdragdrop
    + */
    +/*@{*/
    +
    +/*! \brief A specialized treeview that supports a custom drop event.
    + */
    +class FolderView : public Wt::WTreeView 
    +{
    +public:
    +  /*! \brief Constant that indicates the mime type for a selection of files.
    +   *
    +   * Every kind of dragged data should be identified using a unique mime type.
    +   */
    +  static const char *FileSelectionMimeType;
    +
    +  /*! \brief Constructor.
    +   */
    +  FolderView(Wt::WContainerWidget *parent = 0);
    +
    +protected:
    +  /*! \brief Drop event.
    +   */
    +  virtual void dropEvent(const Wt::WDropEvent &event,
    +			 const Wt::WModelIndex &target);
    +};
    +
    +/*@}*/
    +
    +#endif // FOLDER_VIEW_H_
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/TreeViewDragDrop.C b/wt-3.1.7a/examples/treeview-dragdrop/TreeViewDragDrop.C
    new file mode 100644
    index 0000000..9bd540c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/TreeViewDragDrop.C
    @@ -0,0 +1,650 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <fstream>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WComboBox>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WDatePicker>
    +#include <Wt/WDateValidator>
    +#include <Wt/WDialog>
    +#include <Wt/WEnvironment>
    +#include <Wt/WIntValidator>
    +#include <Wt/WItemDelegate>
    +#include <Wt/WLabel>
    +#include <Wt/WLineEdit>
    +#include <Wt/WMessageBox>
    +#include <Wt/WPushButton>
    +#include <Wt/WRegExpValidator>
    +#include <Wt/WGridLayout>
    +#include <Wt/WPopupMenu>
    +#include <Wt/WSortFilterProxyModel>
    +#include <Wt/WStandardItem>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WTableView>
    +#include <Wt/WTreeView>
    +#include <Wt/WText>
    +#include <Wt/WVBoxLayout>
    +
    +#include <Wt/Chart/WPieChart>
    +
    +#include "CsvUtil.h"
    +#include "FolderView.h"
    +
    +using namespace Wt;
    +
    +/**
    + * \defgroup treeviewdragdrop Drag and drop in WTreeView example
    + */
    +/*@{*/
    +
    +/*! \class FileModel
    + *  \brief A specialized standard item model which report a specific
    + *         drag and drop mime type.
    + *
    + * A specific drag and drop mime type instead of the generic abstract
    + * item model is returned by the model.
    + */
    +class FileModel : public WStandardItemModel
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  FileModel(WObject *parent)
    +    : WStandardItemModel(parent) { }
    +
    +  /*! \brief Return the mime type.
    +   */
    +  virtual std::string mimeType() const {
    +    return FolderView::FileSelectionMimeType;
    +  }
    +
    +  /// Date display format.
    +  static WString dateDisplayFormat;
    +
    +  /// Date edit format.
    +  static WString dateEditFormat;
    +};
    +
    +WString FileModel::dateDisplayFormat(WString::fromUTF8("MMM dd, yyyy"));
    +WString FileModel::dateEditFormat(WString::fromUTF8("dd-MM-yyyy"));
    +
    +/*! \class FileEditDialog
    + *  \brief A dialog for editing a 'file'.
    + */
    +class FileEditDialog : public WDialog
    +{
    +public:
    +  FileEditDialog(WAbstractItemModel *model, const WModelIndex& item)
    +    : WDialog("Edit..."),
    +      model_(model),
    +      item_(item)
    +  {
    +    int modelRow = item_.row();
    +
    +    resize(300, WLength::Auto);
    +
    +    /*
    +     * Create the form widgets, and load them with data from the model.
    +     */
    +
    +    // name
    +    nameEdit_ = new WLineEdit(asString(model_->data(modelRow, 1)));
    +
    +    // type
    +    typeEdit_ = new WComboBox();
    +    typeEdit_->addItem("Document");
    +    typeEdit_->addItem("Spreadsheet");
    +    typeEdit_->addItem("Presentation");
    +    typeEdit_->setCurrentIndex
    +      (typeEdit_->findText(asString(model_->data(modelRow, 2))));
    +
    +    // size
    +    sizeEdit_ = new WLineEdit(asString(model_->data(modelRow, 3)));
    +    sizeEdit_->setValidator
    +      (new WIntValidator(0, std::numeric_limits<int>::max(), this));
    +
    +    // created
    +    createdPicker_ = new WDatePicker();
    +    createdPicker_->lineEdit()->validator()->setMandatory(true);
    +    createdPicker_->setFormat(FileModel::dateEditFormat);
    +    createdPicker_->setDate(boost::any_cast<WDate>(model_->data(modelRow, 4)));
    +
    +    // modified
    +    modifiedPicker_ = new WDatePicker();
    +    modifiedPicker_->lineEdit()->validator()->setMandatory(true);
    +    modifiedPicker_->setFormat(FileModel::dateEditFormat);
    +    modifiedPicker_->setDate(boost::any_cast<WDate>(model_->data(modelRow, 5)));
    +
    +    /*
    +     * Use a grid layout for the labels and fields
    +     */
    +    WGridLayout *layout = new WGridLayout();
    +
    +    WLabel *l;
    +    int row = 0;
    +
    +    layout->addWidget(l = new WLabel("Name:"), row, 0);
    +    layout->addWidget(nameEdit_, row, 1);
    +    l->setBuddy(nameEdit_);
    +    ++row;
    +
    +    layout->addWidget(l = new WLabel("Type:"), row, 0);
    +    layout->addWidget(typeEdit_, row, 1, AlignTop);
    +    l->setBuddy(typeEdit_);
    +    ++row;
    +
    +    layout->addWidget(l = new WLabel("Size:"), row, 0);
    +    layout->addWidget(sizeEdit_, row, 1);
    +    l->setBuddy(sizeEdit_);
    +    ++row;
    +
    +    layout->addWidget(l = new WLabel("Created:"), row, 0);
    +    layout->addWidget(createdPicker_->lineEdit(), row, 1);
    +    layout->addWidget(createdPicker_, row, 2);
    +    l->setBuddy(createdPicker_->lineEdit());
    +    ++row;
    +
    +    layout->addWidget(l = new WLabel("Modified:"), row, 0);
    +    layout->addWidget(modifiedPicker_->lineEdit(), row, 1);
    +    layout->addWidget(modifiedPicker_, row, 2);
    +    l->setBuddy(modifiedPicker_->lineEdit());
    +    ++row;
    +
    +    WPushButton *b;
    +    WContainerWidget *buttons = new WContainerWidget();
    +    buttons->addWidget(b = new WPushButton("Save"));
    +    b->clicked().connect(this, &WDialog::accept);
    +    contents()->enterPressed().connect(this, &WDialog::accept);
    +    buttons->addWidget(b = new WPushButton("Cancel"));
    +    b->clicked().connect(this, &WDialog::reject);
    +
    +    /*
    +     * Focus the form widget that corresonds to the selected item.
    +     */
    +    switch (item.column()) {
    +    case 2:
    +      typeEdit_->setFocus(); break;
    +    case 3:
    +      sizeEdit_->setFocus(); break;
    +    case 4:
    +      createdPicker_->lineEdit()->setFocus(); break;
    +    case 5:
    +      modifiedPicker_->lineEdit()->setFocus(); break;
    +    default:
    +      nameEdit_->setFocus(); break;
    +    }
    +
    +    layout->addWidget(buttons, row, 0, 0, 3, AlignCenter);
    +    layout->setColumnStretch(1, 1);
    +
    +    contents()->setLayout(layout, AlignTop | AlignJustify);
    +
    +    finished().connect(this, &FileEditDialog::handleFinish);
    +
    +    show();
    +  }
    +
    +private:
    +  WAbstractItemModel *model_;
    +  WModelIndex         item_;
    +
    +  WLineEdit *nameEdit_, *sizeEdit_;
    +  WComboBox *typeEdit_;
    +  WDatePicker *createdPicker_, *modifiedPicker_;
    +
    +  void handleFinish(DialogCode result)
    +  {
    +    if (result == WDialog::Accepted) {
    +      /*
    +       * Update the model with data from the edit widgets.
    +       *
    +       * You will want to do some validation here...
    +       *
    +       * Note that we directly update the source model to avoid
    +       * problems caused by the dynamic sorting of the proxy model,
    +       * which reorders row numbers, and would cause us to switch to editing
    +       * the wrong data.
    +       */
    +      WAbstractItemModel *m = model_;
    +      int modelRow = item_.row();
    +
    +      WAbstractProxyModel *proxyModel = dynamic_cast<WAbstractProxyModel *>(m);
    +      if (proxyModel) {
    +	m = proxyModel->sourceModel();
    +	modelRow = proxyModel->mapToSource(item_).row();
    +      }
    +
    +      m->setData(modelRow, 1, boost::any(nameEdit_->text()));
    +      m->setData(modelRow, 2, boost::any(typeEdit_->currentText()));
    +      m->setData(modelRow, 3, boost::any(boost::lexical_cast<int>
    +					 (sizeEdit_->text().toUTF8())));
    +      m->setData(modelRow, 4, boost::any(createdPicker_->date()));
    +      m->setData(modelRow, 5, boost::any(modifiedPicker_->date()));
    +    }
    +
    +    delete this;
    +  }
    +
    +};
    +
    +/*! \class TreeViewDragDrop
    + *  \brief Main application class.
    + */
    +class TreeViewDragDrop : public WApplication
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  TreeViewDragDrop(const WEnvironment &env)
    +    : WApplication(env),
    +      popup_(0),
    +      popupActionBox_(0)
    +  {
    +    setCssTheme("polished");
    +
    +    /*
    +     * Create the data models.
    +     */
    +    folderModel_ = new WStandardItemModel(0, 1, this);
    +    populateFolders();
    +
    +    fileModel_ = new FileModel(this);
    +    populateFiles();
    +
    +    fileFilterModel_ = new WSortFilterProxyModel(this);
    +    fileFilterModel_->setSourceModel(fileModel_);
    +    fileFilterModel_->setDynamicSortFilter(true);
    +    fileFilterModel_->setFilterKeyColumn(0);
    +    fileFilterModel_->setFilterRole(UserRole);
    +
    +    /*
    +     * Setup the user interface.
    +     */
    +    createUI();
    +  }
    +
    +  virtual ~TreeViewDragDrop() {
    +    delete popup_;
    +    delete popupActionBox_;
    +  }
    +
    +private:
    +  /// The folder model (used by folderView_)
    +  WStandardItemModel    *folderModel_;
    +
    +  /// The file model (used by fileView_)
    +  WStandardItemModel    *fileModel_;
    +
    +  /// The sort filter proxy model that adapts fileModel_
    +  WSortFilterProxyModel *fileFilterModel_;
    +
    +  /// Maps folder id's to folder descriptions.
    +  std::map<std::string, WString> folderNameMap_;
    +
    +  /// The folder view.
    +  WTreeView *folderView_;
    +
    +  /// The file view.
    +  WTableView *fileView_;
    +
    +  /// Popup menu on the folder view
    +  WPopupMenu *popup_;
    +
    +  /// Message box to confirm the poup menu action
    +  WMessageBox *popupActionBox_;
    +
    +  /*! \brief Setup the user interface.
    +   */
    +  void createUI() {
    +    WContainerWidget *w = root();
    +    w->setStyleClass("maindiv");
    +
    +    /*
    +     * The main layout is a 3x2 grid layout.
    +     */
    +    WGridLayout *layout = new WGridLayout();
    +    layout->addWidget(createTitle("Folders"), 0, 0);
    +    layout->addWidget(createTitle("Files"), 0, 1);
    +    layout->addWidget(folderView(), 1, 0);
    +    layout->setColumnResizable(0);
    +
    +    // select the first folder
    +    folderView_->select(folderModel_->index(0, 0, folderModel_->index(0, 0)));
    +
    +    WVBoxLayout *vbox = new WVBoxLayout();
    +    vbox->addWidget(fileView(), 1);
    +    vbox->addWidget(pieChart(), 1);
    +    vbox->setResizable(0);
    +
    +    layout->addLayout(vbox, 1, 1);
    +
    +    layout->addWidget(aboutDisplay(), 2, 0, 1, 2, AlignTop);
    +
    +    /*
    +     * Let row 1 and column 1 take the excess space.
    +     */
    +    layout->setRowStretch(1, 1);
    +    layout->setColumnStretch(1, 1);
    +
    +    w->setLayout(layout);
    +  }
    +
    +  /*! \brief Creates a title widget.
    +   */
    +  WText *createTitle(const WString& title) {
    +    WText *result = new WText(title);
    +    result->setInline(false);
    +    result->setStyleClass("title");
    +
    +    return result;
    +  }
    +
    +  /*! \brief Creates the folder WTreeView
    +   */
    +  WTreeView *folderView() {
    +    WTreeView *treeView = new FolderView();
    +
    +    /*
    +     * To support right-click, we need to disable the built-in browser
    +     * context menu.
    +     *
    +     * Note that disabling the context menu and catching the
    +     * right-click does not work reliably on all browsers.
    +     */
    +    treeView->setAttributeValue
    +      ("oncontextmenu",
    +       "event.cancelBubble = true; event.returnValue = false; return false;");
    +    treeView->setModel(folderModel_);
    +    treeView->resize(200, WLength::Auto);
    +    treeView->setSelectionMode(SingleSelection);
    +    treeView->expandToDepth(1);
    +    treeView->selectionChanged()
    +      .connect(this, &TreeViewDragDrop::folderChanged);
    +
    +    treeView->mouseWentUp().connect(this, &TreeViewDragDrop::showPopup);
    +
    +    folderView_ = treeView;
    +
    +    return treeView;
    +  }
    +
    +  /*! \brief Creates the file table view (a WTableView)
    +   */
    +  WTableView *fileView() {
    +    WTableView *tableView = new WTableView();
    +
    +    tableView->setAlternatingRowColors(true);
    +
    +    tableView->setModel(fileFilterModel_);
    +    tableView->setSelectionMode(ExtendedSelection);
    +    tableView->setDragEnabled(true);
    +
    +    tableView->setColumnWidth(0, 100);
    +    tableView->setColumnWidth(1, 150);
    +    tableView->setColumnWidth(2, 100);
    +    tableView->setColumnWidth(3, 60);
    +    tableView->setColumnWidth(4, 100);
    +    tableView->setColumnWidth(5, 100);
    +
    +    WItemDelegate *delegate = new WItemDelegate(this);
    +    delegate->setTextFormat(FileModel::dateDisplayFormat);
    +    tableView->setItemDelegateForColumn(4, delegate);
    +    tableView->setItemDelegateForColumn(5, delegate);
    +
    +    tableView->setColumnAlignment(3, AlignRight);
    +    tableView->setColumnAlignment(4, AlignRight);
    +    tableView->setColumnAlignment(5, AlignRight);
    +
    +    tableView->sortByColumn(1, AscendingOrder);
    +
    +    tableView->doubleClicked().connect(this, &TreeViewDragDrop::editFile);
    +
    +    fileView_ = tableView;
    +
    +    return tableView;
    +  }
    +
    +  /*! \brief Edit a particular row.
    +   */
    +  void editFile(const WModelIndex& item) {
    +    new FileEditDialog(fileView_->model(), item);
    +  }
    +
    +  /*! \brief Creates the chart.
    +   */
    +  WWidget *pieChart() {
    +    using namespace Chart;
    +
    +    WPieChart *chart = new WPieChart();
    +    chart->setModel(fileFilterModel_);
    +    chart->setTitle("File sizes");
    +
    +    chart->setLabelsColumn(1); // Name
    +    chart->setDataColumn(3);   // Size
    +
    +    chart->setPerspectiveEnabled(true, 0.2);
    +    chart->setDisplayLabels(Outside | TextLabel);
    +
    +    if (!WApplication::instance()->environment().ajax()) {
    +      chart->resize(500, 200);
    +      chart->setMargin(WLength::Auto, Left | Right);
    +      WContainerWidget *w = new WContainerWidget();
    +      w->addWidget(chart);
    +      w->setStyleClass("about");
    +      return w;
    +    } else {
    +      chart->setStyleClass("about");
    +      return chart;
    +    }
    +  }
    +
    +  /*! \brief Creates the hints text.
    +   */
    +  WWidget *aboutDisplay() {
    +    WText *result = new WText(WString::tr("about-text"));
    +    result->setStyleClass("about");
    +    return result;
    +  }
    +
    +  /*! \brief Change the filter on the file view when the selected folder
    +   *         changes.
    +   */
    +  void folderChanged() {
    +    if (folderView_->selectedIndexes().empty())
    +      return;
    +
    +    WModelIndex selected = *folderView_->selectedIndexes().begin();
    +    boost::any d = selected.data(UserRole);
    +    if (!d.empty()) {
    +      std::string folder = boost::any_cast<std::string>(d);
    +
    +      // For simplicity, we assume here that the folder-id does not
    +      // contain special regexp characters, otherwise these need to be
    +      // escaped -- or use the \Q \E qutoing escape regular expression
    +      // syntax (and escape \E)
    +      fileFilterModel_->setFilterRegExp(folder);
    +    }
    +  }
    +
    +  /*! \brief Show a popup for a folder item.
    +   */
    +  void showPopup(const WModelIndex& item, const WMouseEvent& event) {
    +    if (event.button() == WMouseEvent::RightButton) {
    +      // Select the item, it was not yet selected.
    +      if (!folderView_->isSelected(item))
    +	folderView_->select(item);
    +
    +      if (!popup_) {
    +	popup_ = new WPopupMenu();
    +	popup_->addItem("icons/folder_new.gif", "Create a New Folder");
    +	popup_->addItem("Rename this Folder")->setCheckable(true);
    +	popup_->addItem("Delete this Folder");
    +	popup_->addSeparator();
    +	popup_->addItem("Folder Details");
    +	popup_->addSeparator();
    +	popup_->addItem("Application Inventory");
    +	popup_->addItem("Hardware Inventory");
    +	popup_->addSeparator();
    +
    +	WPopupMenu *subMenu = new WPopupMenu();
    +	subMenu->addItem("Sub Item 1");
    +	subMenu->addItem("Sub Item 2");
    +	popup_->addMenu("File Deployments", subMenu);
    +
    +	/*
    +	 * This is one method of executing a popup, which does not block a
    +	 * thread for a reentrant event loop, and thus scales.
    +	 *
    +	 * Alternatively you could call WPopupMenu::exec(), which returns
    +	 * the result, but while waiting for it, blocks the thread.
    +	 */      
    +	popup_->aboutToHide().connect(this, &TreeViewDragDrop::popupAction);
    +      }
    +
    +      if (popup_->isHidden())
    +      	popup_->popup(event);
    +      else
    +	popup_->hide();
    +    }
    +  }
    +
    +  /** \brief Process the result of the popup menu
    +   */
    +  void popupAction() {
    +    if (popup_->result()) {
    +      /*
    +       * You could also bind extra data to an item using setData() and
    +       * check here for the action asked. For now, we just use the text.
    +       */
    +      WString text = popup_->result()->text();
    +      popup_->hide();
    +
    +      popupActionBox_ = new WMessageBox("Sorry.","Action '" + text
    +					+ "' is not implemented.", NoIcon, Ok);
    +      popupActionBox_->buttonClicked()
    +	.connect(this, &TreeViewDragDrop::dialogDone);
    +      popupActionBox_->show();
    +    } else {
    +      popup_->hide();
    +    }
    +  }
    +
    +  /** \brief Process the result of the message box.
    +   */
    +  void dialogDone() {
    +    delete popupActionBox_;
    +    popupActionBox_ = 0;
    +  }
    +
    +  /*! \brief Populate the files model.
    +   *
    +   * Data (and headers) is read from the CSV file data/files.csv. We
    +   * add icons to the first column, resolve the folder id to the
    +   * actual folder name, and configure item flags, and parse date
    +   * values.
    +   */
    +  void populateFiles() {
    +    fileModel_->invisibleRootItem()->setRowCount(0);
    +
    +    std::ifstream f((appRoot() + "data/files.csv").c_str());
    +
    +    if (!f)
    +      throw std::runtime_error("Could not read: data/files.csv");
    +
    +    readFromCsv(f, fileModel_);
    +
    +    for (int i = 0; i < fileModel_->rowCount(); ++i) {
    +      WStandardItem *item = fileModel_->item(i, 0);
    +      item->setFlags(item->flags() | ItemIsDragEnabled);
    +      item->setIcon("icons/file.gif");
    +
    +      std::string folderId = item->text().toUTF8();
    +
    +      item->setData(boost::any(folderId), UserRole);
    +      item->setText(folderNameMap_[folderId]);
    +
    +      convertToDate(fileModel_->item(i, 4));
    +      convertToDate(fileModel_->item(i, 5));
    +    }
    +  }
    +
    +  /*! \brief Convert a string to a date.
    +   */
    +  void convertToDate(WStandardItem *item) {
    +    WDate d = WDate::fromString(item->text(), FileModel::dateEditFormat);
    +    item->setData(boost::any(d), DisplayRole);
    +  }
    +
    +  /*! \brief Populate the folders model.
    +   */
    +  void populateFolders() {
    +    WStandardItem *level1, *level2;
    +
    +    folderModel_->appendRow(level1 = createFolderItem("San Fransisco"));
    +    level1->appendRow(level2 = createFolderItem("Investors", "sf-investors"));
    +    level1->appendRow(level2 = createFolderItem("Fellows", "sf-fellows"));
    +
    +    folderModel_->appendRow(level1 = createFolderItem("Sophia Antipolis"));
    +    level1->appendRow(level2 = createFolderItem("R&D", "sa-r_d"));
    +    level1->appendRow(level2 = createFolderItem("Services", "sa-services"));
    +    level1->appendRow(level2 = createFolderItem("Support", "sa-support"));
    +    level1->appendRow(level2 = createFolderItem("Billing", "sa-billing"));
    +
    +    folderModel_->appendRow(level1 = createFolderItem("New York"));
    +    level1->appendRow(level2 = createFolderItem("Marketing", "ny-marketing"));
    +    level1->appendRow(level2 = createFolderItem("Sales", "ny-sales"));
    +    level1->appendRow(level2 = createFolderItem("Advisors", "ny-advisors"));
    +
    +    folderModel_->appendRow(level1 = createFolderItem
    +			     (WString::fromUTF8("Frankfürt")));
    +    level1->appendRow(level2 = createFolderItem("Sales", "frank-sales"));
    +
    +    folderModel_->setHeaderData(0, Horizontal,
    +				 boost::any(std::string("SandBox")));
    +  }
    +
    +  /*! \brief Create a folder item.
    +   *
    +   * Configures flags for drag and drop support.
    +   */
    +  WStandardItem *createFolderItem(const WString& location,
    +				  const std::string& folderId = std::string())
    +  {
    +    WStandardItem *result = new WStandardItem(location);
    +
    +    if (!folderId.empty()) {
    +      result->setData(boost::any(folderId));
    +      result->setFlags(result->flags() | ItemIsDropEnabled);
    +      folderNameMap_[folderId] = location;
    +    } else
    +      result->setFlags(result->flags().clear(ItemIsSelectable));
    +
    +    result->setIcon("icons/folder.gif");
    +
    +    return result;
    +  }
    +
    +};
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new TreeViewDragDrop(env);
    +  app->setTwoPhaseRenderingThreshold(0);
    +  app->setTitle("WTreeView Drag & Drop");
    +  app->useStyleSheet("styles.css");
    +  app->messageResourceBundle().use(WApplication::appRoot() + "about");
    +  app->refresh();
    +  
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    +/*@}*/
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/about.xml b/wt-3.1.7a/examples/treeview-dragdrop/about.xml
    new file mode 100644
    index 0000000..59d9524
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/about.xml
    @@ -0,0 +1,11 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="about-text">
    +    <div style="margin: 3px;"><i>Hints:</i>
    +    <ul style="margin-top: 0px">
    +      <li>You can drag a selection of files to a different folder.</li>
    +      <li>There is a context popup menu for <i>leaf</i> folders.</li>
    +      <li>You can sort on each column.</li>
    +    </ul></div>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/data/files.csv b/wt-3.1.7a/examples/treeview-dragdrop/data/files.csv
    new file mode 100644
    index 0000000..2ecdc4c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/data/files.csv
    @@ -0,0 +1,33 @@
    +Folder,Name,Type,Size,Created,Modified
    +sf-investors,Investments_2001,Document,22176,01-01-2001,01-06-2001
    +sf-investors,Investments_2002,Document,25340,02-01-2002,02-06-2002
    +sf-investors,Investments_2003,Document,27642,03-01-2003,01-06-2003
    +sf-investors,Investments_2004,Document,18731,02-01-2004,02-06-2004
    +sf-investors,Investments_2005,Document,16775,01-01-2005,01-06-2005
    +sf-investors,Investments_2006,Document,33242,10-01-2006,02-06-2006
    +sf-investors,Investments_2007,Document,9977,03-01-2007,01-06-2007
    +sf-fellows,Prestige_2001,Presentation,164234,01-01-2001,01-06-2001
    +sf-fellows,Prestige_2002,Presentation,13422,02-01-2002,02-06-2002
    +sf-fellows,Prestige_2003,Presentation,1142,03-01-2003,01-06-2003
    +sa-r_d,PatentOverview_2004,Spreadsheet,15456,02-01-2004,02-06-2004
    +sa-r_d,PatentOverview_2005,Spreadsheet,12242,01-01-2005,01-06-2005
    +sa-r_d,PatentOverview_2006,Spreadsheet,47744,10-01-2006,02-06-2006
    +sa-r_d,PatentOverview_2007,Spreadsheet,55777,03-01-2007,01-06-2007
    +sa-services,Income_2004,Spreadsheet,1545,02-01-2004,02-06-2004
    +sa-services,Income_2005,Spreadsheet,34564,01-01-2005,01-06-2005
    +sa-services,Income_2006,Spreadsheet,15464,10-01-2006,02-06-2006
    +sa-services,Income_2007,Spreadsheet,454,03-01-2007,01-06-2007
    +sa-support,Costs_2004,Spreadsheet,11223,02-01-2004,02-06-2004
    +sa-support,Costs_2005,Spreadsheet,44556,01-01-2005,01-06-2005
    +sa-support,Costs_2006,Spreadsheet,7897,10-01-2006,02-06-2006
    +sa-support,Costs_2007,Spreadsheet,12344,03-01-2007,01-06-2007
    +sa-billing,Billing_2004,Spreadsheet,135464,02-01-2004,02-06-2004
    +ny-marketing,BigPlan_2005,Presentation,445156,01-01-2005,01-06-2005
    +ny-marketing,BigPlan_2006,Presentation,789711,10-01-2006,02-06-2006
    +ny-marketing,Top_2007,Presentation,123441,03-01-2007,01-06-2007
    +ny-sales,ForSale,Presentation,13546,01-01-2005,01-06-2005
    +ny-sales,WeAreForSale,Presentation,13544,10-01-2006,02-06-2006
    +ny-sales,Priceless,Presentation,11334,03-01-2007,01-06-2007
    +ny-advisors,GeneralAdvice,Presentation,134576,01-01-2005,01-06-2005
    +ny-advisors,MothersAdivce,Presentation,9754,10-01-2006,02-06-2006
    +frank-sales,Verkaufen,Presentation,134,01-01-2005,01-06-2005
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/icons/file.gif b/wt-3.1.7a/examples/treeview-dragdrop/icons/file.gif
    new file mode 100644
    index 0000000..ae20627
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview-dragdrop/icons/file.gif differ
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/icons/folder.gif b/wt-3.1.7a/examples/treeview-dragdrop/icons/folder.gif
    new file mode 100644
    index 0000000..2033f55
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview-dragdrop/icons/folder.gif differ
    diff --git a/wt-3.1.7a/examples/treeview-dragdrop/styles.css b/wt-3.1.7a/examples/treeview-dragdrop/styles.css
    new file mode 100644
    index 0000000..b13ef02
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview-dragdrop/styles.css
    @@ -0,0 +1,24 @@
    +body, html {
    +    height: 100%; margin: 0px;
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 10pt;
    +}
    +
    +.maindiv {
    +    background-color: #F2F2F2
    +}
    +
    +.Wt-treeview {
    +    background-color: white;
    +    border: 1px solid #98B0D0;
    +}
    +
    +.title {
    +    font-weight: bold;
    +}
    +
    +.about {
    +    background-color: white;
    +    border: 1px solid #98B0D0;
    +    font-size: 80%;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/treeview/CMakeLists.txt b/wt-3.1.7a/examples/treeview/CMakeLists.txt
    new file mode 100644
    index 0000000..81b21ce
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview/CMakeLists.txt
    @@ -0,0 +1,11 @@
    +WT_ADD_EXAMPLE(treeviewexample.wt
    +  TreeViewExample.C
    +  TreeViewApplication.C
    +)
    +
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +)
    +
    +ADD_DEPENDENCIES(treeviewexample.wt wt ${EXAMPLES_CONNECTOR})
    +
    diff --git a/wt-3.1.7a/examples/treeview/TreeViewApplication.C b/wt-3.1.7a/examples/treeview/TreeViewApplication.C
    new file mode 100644
    index 0000000..f8a4bd4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview/TreeViewApplication.C
    @@ -0,0 +1,57 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WApplication>
    +#include <Wt/WText>
    +
    +#include "TreeViewExample.h"
    +
    +using namespace Wt;
    +
    +class TreeViewApplication: public WApplication
    +{
    +public:
    +  TreeViewApplication(const WEnvironment &env):
    +    WApplication(env)
    +  {
    +    WStandardItemModel *model = TreeViewExample::createModel(true, this);
    +
    +    root()->addWidget
    +      (new TreeViewExample(model, WString::tr("treeview-introduction"))); 
    +
    +    /*
    +     * Stub for the drink info
    +     */
    +    aboutDrink_ = new WText("", root());
    +    
    +    internalPathChanged().connect(this, &TreeViewApplication::handlePathChange);
    +  }
    +private:
    +  WText *aboutDrink_;
    +
    +  void handlePathChange() {
    +    if (internalPathMatches("/drinks/")) {
    +      std::string drink = internalPathNextPart("/drinks/");
    +      aboutDrink_->setText(WString::tr("drink-" + drink));
    +    }
    +  }
    +
    +};
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication *app = new TreeViewApplication(env);
    +  app->setTitle("WTreeView example");
    +  app->messageResourceBundle().use(WApplication::appRoot() + "drinks");
    +  app->styleSheet().addRule("button", "margin: 2px");
    +  //app->useStyleSheet("treeview.css");
    +  
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/treeview/TreeViewExample.C b/wt-3.1.7a/examples/treeview/TreeViewExample.C
    new file mode 100644
    index 0000000..1f7b7f6
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview/TreeViewExample.C
    @@ -0,0 +1,216 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "TreeViewExample.h"
    +
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WPanel>
    +#include <Wt/WPushButton>
    +#include <Wt/WStandardItem>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WText>
    +#include <Wt/WTreeView>
    +
    +using namespace Wt;
    +
    +static const char *weatherIcons[] = {
    +  "sun01.png",
    +  "cloudy01.png",
    +  "w_cloud.png",
    +  "rain.png",
    +  "storm.png",
    +  "snow.png"
    +};
    +
    +TreeViewExample::TreeViewExample(WStandardItemModel *model,
    +				 const WString& titleText)
    +  : model_(model)
    +{
    +  belgium_ = model_->item(0, 0)->child(0, 0);
    +
    +  new WText(titleText, this);
    +
    +  /*
    +   * Now create the view
    +   */
    +  WPanel *panel = new WPanel(this);
    +  panel->resize(600, 300);
    +  panel->setCentralWidget(treeView_ = new WTreeView());
    +  if (!WApplication::instance()->environment().ajax())
    +    treeView_->resize(WLength::Auto, 290);
    +  treeView_->setAlternatingRowColors(true);
    +  treeView_->setRowHeight(25);
    +  treeView_->setModel(model_);
    +
    +  treeView_->setColumnWidth(1, WLength(100));
    +  treeView_->setColumnAlignment(1, AlignCenter);
    +  treeView_->setColumnWidth(3, WLength(100));
    +  treeView_->setColumnAlignment(3, AlignCenter);
    +
    +  /*
    +   * Expand the first (and single) top level node
    +   */
    +  treeView_->setExpanded(model->index(0, 0), true);
    +  treeView_->setExpanded(model->index(0, 0, model->index(0, 0)), true);
    +  
    +  /*
    +   * Setup some buttons to manipulate the view and the model.
    +   */
    +  WContainerWidget *wc = new WContainerWidget(this);
    +  WPushButton *b;
    +  
    +  b = new WPushButton("Toggle row height", wc);
    +  b->clicked().connect(this, &TreeViewExample::toggleRowHeight);
    +  b->setToolTip("Toggles row height between 31px and 25px");
    +  
    +  b = new WPushButton("Toggle stripes", wc);
    +  b->clicked().connect(this, &TreeViewExample::toggleStripes);
    +  b->setToolTip("Toggle alternating row colors");
    +  
    +  b = new WPushButton("Toggle root", wc);
    +  b->clicked().connect(this, &TreeViewExample::toggleRoot);
    +  b->setToolTip("Toggles root item between all and the first continent.");
    +
    +  b = new WPushButton("Add rows", wc);
    +  b->clicked().connect(this, &TreeViewExample::addRows);
    +  b->setToolTip("Adds some cities to Belgium");
    +}
    +
    +WStandardItemModel *TreeViewExample::createModel(bool useInternalPath,
    +						 WObject *parent)
    +{
    +  /*
    +   * Setup a model.
    +   *
    +   * We use the standard item model, which is a general model
    +   * suitable for hierarchical (tree-like) data, but stores all data
    +   * in memory.
    +   */
    +  WStandardItemModel *result = new WStandardItemModel(0, 4, parent);
    +
    +  /*
    +   * Headers ...
    +   */
    +  result->setHeaderData(0, Horizontal, std::string("Places"));
    +  result->setHeaderData(1, Horizontal, std::string("Weather"));
    +  result->setHeaderData(2, Horizontal, std::string("Drink"));
    +  result->setHeaderData(3, Horizontal, std::string("Visited"));
    +  
    +  /*
    +   * ... and data
    +   */
    +  WStandardItem *continent, *country;
    +  
    +  result->appendRow(continent = continentItem("Europe"));
    +  
    +  continent->appendRow(country = countryItem("Belgium", "be"));
    +  country->appendRow(cityItems("Brussels", Rain, "Beer", useInternalPath,
    +			       true));
    +  country->appendRow(cityItems("Leuven", Rain, "Beer", useInternalPath, true));
    +  
    +  continent->appendRow(country = countryItem("France", "fr"));
    +  country->appendRow(cityItems("Paris", Cloud, "Wine", useInternalPath, true));
    +  country->appendRow(cityItems("Bordeaux", SunCloud, "Bordeaux wine",
    +			       useInternalPath, false));
    +  
    +  continent->appendRow(country = countryItem("Spain", "sp"));
    +  country->appendRow(cityItems("Barcelona", Sun, "Cava", useInternalPath,
    +			       true));
    +  country->appendRow(cityItems("Madrid", Sun, "San Miguel", useInternalPath,
    +			       false));
    +  
    +  result->appendRow(continent = continentItem("Africa"));
    +  
    +  continent->appendRow(country = countryItem("Morocco (المغرب)", "ma"));
    +  country->appendRow(cityItems("Casablanca", Sun, "Tea", useInternalPath,
    +			       false));
    +
    +  return result;
    +}
    +
    +WStandardItem *TreeViewExample::continentItem(const std::string& continent)
    +{
    +  return new WStandardItem(continent);
    +}
    +
    +WStandardItem *TreeViewExample::countryItem(const std::string& country,
    +					    const std::string& code)
    +{
    +  WStandardItem *result = new WStandardItem(WString::fromUTF8(country));
    +  result->setIcon("icons/flag_" + code + ".png");
    +  
    +  return result;
    +}
    +
    +std::vector<WStandardItem *>
    +TreeViewExample::cityItems(const std::string& city,
    +			   WeatherIcon weather,
    +			   const std::string& drink,
    +			   bool useInternalPath, bool visited)
    +{
    +  std::vector<WStandardItem *> result;
    +  WStandardItem *item;
    +  
    +  // column 0: country
    +  item = new WStandardItem(WString::fromUTF8(city));
    +  result.push_back(item);
    +  
    +  // column 1: weather
    +  item = new WStandardItem();
    +  item->setIcon(std::string("icons/") + weatherIcons[weather]);
    +  result.push_back(item);
    +  
    +  // column 2: drink
    +  item = new WStandardItem(drink);
    +  if (useInternalPath)
    +    item->setInternalPath("/drinks/" + drink);
    +  result.push_back(item);
    +  
    +  // column 3: visited
    +  item = new WStandardItem();
    +  item->setCheckable(true);
    +  item->setChecked(visited);
    +  result.push_back(item);
    +  
    +  return result;
    +}
    +
    +void TreeViewExample::toggleRowHeight()
    +{
    +  if (treeView_->rowHeight() == WLength(31))
    +    treeView_->setRowHeight(25);
    +  else
    +    treeView_->setRowHeight(31);
    +}
    +
    +void TreeViewExample::toggleStripes()
    +{
    +  treeView_->setAlternatingRowColors(!treeView_->alternatingRowColors());
    +}
    +
    +void TreeViewExample::toggleRoot()
    +{
    +  if (treeView_->rootIndex() == WModelIndex())
    +    treeView_->setRootIndex(model_->index(0, 0));
    +  else
    +    treeView_->setRootIndex(WModelIndex());
    +}
    +
    +void TreeViewExample::addRows()
    +{
    +  for (int i = 0; i < 5; ++i) {
    +    std::string cityName = "City "
    +      + boost::lexical_cast<std::string>(belgium_->rowCount() + 1);
    +    
    +    bool useInternalPath = false;
    +    belgium_->appendRow(cityItems(cityName, Storm, "Juice", useInternalPath,
    +				  false));
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/treeview/TreeViewExample.h b/wt-3.1.7a/examples/treeview/TreeViewExample.h
    new file mode 100644
    index 0000000..be93199
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview/TreeViewExample.h
    @@ -0,0 +1,61 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef TREEVIEWEXAMPLE_H_
    +#define TREEVIEWEXAMPLE_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WString>
    +#include <string>
    +#include <vector>
    +
    +enum WeatherIcon {
    +  Sun,
    +  SunCloud,
    +  Cloud,
    +  Rain,
    +  Storm,
    +  Snow
    +};
    +
    +namespace Wt {
    +  class WStandardItem;
    +  class WStandardItemModel;
    +  class WTreeView;
    +  class WText;
    +}
    +
    +class TreeViewExample : public Wt::WContainerWidget
    +{
    +public:
    +  TreeViewExample(Wt::WStandardItemModel *model,
    +		  const Wt::WString& titleText);
    +
    +  Wt::WTreeView *treeView() const { return treeView_; }
    +
    +  static Wt::WStandardItemModel *createModel(bool useInternalPath,
    +					     WObject *parent);
    +
    +private:
    +  Wt::WStandardItem      *belgium_;
    +  Wt::WStandardItemModel *model_;
    +  Wt::WTreeView          *treeView_;
    +
    +  static Wt::WStandardItem *continentItem(const std::string& continent);
    +  static Wt::WStandardItem *countryItem(const std::string& country,
    +					const std::string& code);
    +  static std::vector<Wt::WStandardItem *> cityItems(const std::string& city,
    +						    WeatherIcon weather,
    +						    const std::string& drink,
    +						    bool useInternalPath,
    +						    bool visited);
    +  void toggleRowHeight();
    +  void toggleStripes();
    +  void toggleRoot();
    +  void addRows();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/treeview/drinks.xml b/wt-3.1.7a/examples/treeview/drinks.xml
    new file mode 100644
    index 0000000..0d6e9fb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/treeview/drinks.xml
    @@ -0,0 +1,126 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="treeview-introduction">
    +    <h2>WTreeView example</h2>
    +
    +    <p>This example illustrates the WTreeView widget. This widget is
    +    part of Wt's MVC widgets, and are an alternative to the WTree, and
    +    WTreeTable widgets which are not MVC.</p>
    +
    +    <p>The widget supports very large models by loading only the
    +    visible region (with some margin) in the browser. This results in
    +    low memory consumption (on client and server) and fast load
    +    times.</p>
    +
    +    <p>This example uses a WStandardItemModel to populate the tree
    +    table. As is demonstrated, various roles may be used to indicate
    +    text, icons, selectable items (through check boxes), and also URLs
    +    or internal paths.</p>
    +
    +    <p>Many aspects of the tree view widget are not illustrated here,
    +    such as the various supported selection behaviors and modes, and
    +    reacting to item click events</p>
    +
    +    <p>Except for the selection of items, the view does not yet offer
    +    the possibility to modify the model. Together with more fine
    +    grained control of how to display the data through delegates,
    +    support for editing will be added in the near future.</p>
    +  </message>
    +
    +  <message id="drink-Beer">
    +    <h3>Drink: beer</h3>
    +
    +    <p>
    +      Belgium is famous for its rich beer culture. <br />
    +
    +      Belgians (like most other Europeans), will tell you that they
    +      have the largest variety of best beers in the world.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Beer">Beer</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-Wine">
    +    <h3>Drink: wine</h3>
    +
    +    <p>
    +      Not only because of their renowned chauvinism are French people
    +      so proud of their wine: they have plenty of good wines to brag
    +      about. <br />
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Wine">Wine</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-Bordeaux wine">
    +    <h3>Drink: wine (Bordeaux)</h3>
    +
    +    <p>
    +      Bordeaux is a wine region in France.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Bordeaux_wine">Bordeaux wine</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-Cava">
    +    <h3>Drink: cava</h3>
    +
    +    <p>
    +      The french do not allow the Spanish to call Cava Champaign, but
    +      that is what it is.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Cava">Cava</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-San Miguel">
    +    <h3>Drink: San Miguel</h3>
    +
    +    <p>
    +      A Spanish beer.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Mahou_Brewery">San Miguel</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-Juice">
    +    <h3>Drink: fruit juice</h3>
    +
    +    <p>
    +      It's got vitamins all over it and entirely healthy.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Juice">Juice</a>.
    +    </p>
    +  </message>
    +
    +  <message id="drink-Tea">
    +    <h3>Drink: tea</h3>
    +
    +    <p>
    +      C'est la boisson du jour.
    +    </p>
    +
    +    <p>
    +      Read about it on wikipedia: <a
    +      href="http://en.wikipedia.org/wiki/Tea">Tea</a>.
    +    </p>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/treeview/icons/cloudy01.png b/wt-3.1.7a/examples/treeview/icons/cloudy01.png
    new file mode 100644
    index 0000000..cf4a583
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/cloudy01.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/flag_be.png b/wt-3.1.7a/examples/treeview/icons/flag_be.png
    new file mode 100644
    index 0000000..5b59cc5
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/flag_be.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/flag_fr.png b/wt-3.1.7a/examples/treeview/icons/flag_fr.png
    new file mode 100644
    index 0000000..bf10103
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/flag_fr.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/flag_ma.png b/wt-3.1.7a/examples/treeview/icons/flag_ma.png
    new file mode 100644
    index 0000000..ffce531
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/flag_ma.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/flag_sp.png b/wt-3.1.7a/examples/treeview/icons/flag_sp.png
    new file mode 100644
    index 0000000..81647e3
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/flag_sp.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/rain.png b/wt-3.1.7a/examples/treeview/icons/rain.png
    new file mode 100644
    index 0000000..d46c187
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/rain.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/snow.png b/wt-3.1.7a/examples/treeview/icons/snow.png
    new file mode 100644
    index 0000000..c03a6d4
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/snow.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/storm.png b/wt-3.1.7a/examples/treeview/icons/storm.png
    new file mode 100644
    index 0000000..3a2ba44
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/storm.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/sun01.png b/wt-3.1.7a/examples/treeview/icons/sun01.png
    new file mode 100644
    index 0000000..4da0e72
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/sun01.png differ
    diff --git a/wt-3.1.7a/examples/treeview/icons/w_cloud.png b/wt-3.1.7a/examples/treeview/icons/w_cloud.png
    new file mode 100644
    index 0000000..f27be17
    Binary files /dev/null and b/wt-3.1.7a/examples/treeview/icons/w_cloud.png differ
    diff --git a/wt-3.1.7a/examples/webgl/CMakeLists.txt b/wt-3.1.7a/examples/webgl/CMakeLists.txt
    new file mode 100644
    index 0000000..0a00d6e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/CMakeLists.txt
    @@ -0,0 +1,18 @@
    +#
    +# The ADD_EXAMPLE macro (defined in examples/CMakeLists.txt) ensures that
    +# the example is correctly built for the requested connector. It is equivalent
    +# to the following two lines:
    +#   ADD_EXECUTABLE(hello.wt hello.C)
    +#   TARGET_LINK_LIBRARIES(hello.wt ${EXAMPLES_CONNECTOR})
    +# except when the ISAPI (for Microsoft IIS) connector is used, where it will
    +# build a DLL with the proper symbols exported.
    +#
    +WT_ADD_EXAMPLE(webgl.wt teapot.C readObj.C PaintWidget.C)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    diff --git a/wt-3.1.7a/examples/webgl/PaintWidget.C b/wt-3.1.7a/examples/webgl/PaintWidget.C
    new file mode 100644
    index 0000000..7d42652
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/PaintWidget.C
    @@ -0,0 +1,204 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "PaintWidget.h"
    +
    +#include <Wt/WGLWidget>
    +#include <Wt/WMatrix4x4>
    +
    +using namespace Wt;
    +
    +// To avoid copying large constant data around, the data points are stored
    +// in a global variable.
    +extern std::vector<double> data;
    +
    +// Calculates the centerpoint of the data. This is where the camera looks at.
    +void centerpoint(double &x, double &y, double &z)
    +{
    +  double minx, miny, minz;
    +  double maxx, maxy, maxz;
    +  minx = maxx = data[0];
    +  miny = maxy = data[1];
    +  minz = maxz = data[2];
    +  for (unsigned int i = 0; i < data.size()/6; ++i) {
    +    if (data[i*6] < minx) minx = data[i*6];
    +    if (data[i*6] > maxx) maxx = data[i*6];
    +    if (data[i*6 + 1] < miny) miny = data[i*6 + 1];
    +    if (data[i*6 + 1] > maxy) maxy = data[i*6 + 1];
    +    if (data[i*6 + 2] < minz) minz = data[i*6 + 2];
    +    if (data[i*6 + 2] > maxz) maxz = data[i*6 + 2];
    +  }
    +  x = (minx + maxx)/2.;
    +  y = (miny + maxy)/2.;
    +  z = (minz + maxz)/2.;
    +}
    +
    +PaintWidget::PaintWidget(WContainerWidget *root):
    +  WGLWidget(root)
    +{
    +}
    +  
    +// The initializeGL() captures all JS commands that are to be executed
    +// before the scene is rendered for the first time. It is executed only
    +// once. It is re-executed when the WebGL context is restored after it
    +// was lost.
    +// In general, it should be used to set up shaders, create VBOs, initialize
    +// matrices, ...
    +void PaintWidget::initializeGL()
    +{
    +  // In order to know where to look at, calculate the centerpoint of the
    +  // scene
    +  double cx, cy, cz;
    +  centerpoint(cx, cy, cz);
    +
    +  // Transform the world so that we look at the centerpoint of the scene
    +  WMatrix4x4 worldTransform;
    +  worldTransform.lookAt(
    +      cx, cy, cz + 10, // camera position
    +      cx, cy, cz,      // looking at
    +      0, 1, 0);        // 'up' vector
    +
    +  // We want to be able to change the camera position client-side. In
    +  // order to do so, the world transformation matrix must be stored in
    +  // a matrix that can be manipulated from JavaScript.
    +  jsMatrix_ = createJavaScriptMatrix4();
    +  setJavaScriptMatrix4(jsMatrix_, worldTransform);
    +
    +  // This installs a client-side mouse handler that modifies the
    +  // world transformation matrix. Like WMatrix4x4::lookAt, this works
    +  // by specifying a center point and an up direction; mouse movements
    +  // will allow the camera to be moved around the center point.
    +  setClientSideLookAtHandler(jsMatrix_, // the name of the JS matrix
    +      cx, cy, cz,                       // the center point
    +      0, 1, 0,                          // the up direction
    +      0.005, 0.005);                    // 'speed' factors
    +  // Alternative: this installs a client-side mouse handler that allows
    +  // to 'walk' around: go forward, backward, turn left, turn right, ...
    +  //setClientSideWalkHandler(jsMatrix_, 0.05, 0.005);
    +
    +  // First, load a simple shader
    +  Shader fragmentShader = createShader(FRAGMENT_SHADER);
    +  shaderSource(fragmentShader, fragmentShader_);
    +  compileShader(fragmentShader);
    +  Shader vertexShader = createShader(VERTEX_SHADER);
    +  shaderSource(vertexShader, vertexShader_);
    +  compileShader(vertexShader);
    +  shaderProgram_ = createProgram();
    +  attachShader(shaderProgram_, vertexShader);
    +  attachShader(shaderProgram_, fragmentShader);
    +  linkProgram(shaderProgram_);
    +  useProgram(shaderProgram_);
    +
    +  // Extract the references to the attributes from the shader.
    +  vertexNormalAttribute_   =
    +    getAttribLocation(shaderProgram_, "aVertexNormal");
    +  vertexPositionAttribute_ =
    +    getAttribLocation(shaderProgram_, "aVertexPosition");
    +  enableVertexAttribArray(vertexPositionAttribute_);
    +  enableVertexAttribArray(vertexNormalAttribute_);
    +
    +  // Extract the references the uniforms from the shader
    +  pMatrixUniform_  = getUniformLocation(shaderProgram_, "uPMatrix");
    +  cMatrixUniform_  = getUniformLocation(shaderProgram_, "uCMatrix");
    +  mvMatrixUniform_ = getUniformLocation(shaderProgram_, "uMVMatrix");
    +  nMatrixUniform_  = getUniformLocation(shaderProgram_, "uNMatrix");
    +
    +  // Create a Vertex Buffer Object (VBO) and load all polygon's data
    +  // (points, normals) into it. In this case we use one VBO that contains
    +  // all data (6 per point: vx, vy, vz, nx, ny, nz); alternatively you
    +  // can use multiple VBO's (e.g. one VBO for normals, one for points,
    +  // one for texture coordinates).
    +  // Note that if you use indexed buffers, you cannot have indexes
    +  // larger than 65K, due to the limitations of WebGL.
    +  objBuffer_ = createBuffer();
    +  bindBuffer(ARRAY_BUFFER, objBuffer_);
    +  bufferDatafv(ARRAY_BUFFER, data.begin(), data.end(), STATIC_DRAW);
    +
    +  // Set the clear color to a transparant background
    +  clearColor(0, 0, 0, 0);
    +
    +  // Reset Z-buffer, enable Z-buffering
    +  clearDepth(1);
    +  enable(DEPTH_TEST);
    +  depthFunc(LEQUAL);
    +}
    +
    +void PaintWidget::resizeGL(int width, int height)
    +{
    +  // Set the viewport size.
    +  viewport(0, 0, width, height);
    +
    +  // Set projection matrix to some fixed values
    +  WMatrix4x4 proj;
    +  proj.perspective(45, ((double)width)/height, 1, 40);
    +  uniformMatrix4(pMatrixUniform_, proj);
    +}
    +
    +// The paintGL function is executed every time the canvas is to be
    +// repainted. For example: when the camera location is modified,
    +// an animated object is changed, ...
    +void PaintWidget::paintGL()
    +{
    +  // Clear color an depth buffers
    +  clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT);
    +
    +
    +  // Configure the shader: set the uniforms
    +  // Uniforms are 'configurable constants' in a shader: they are
    +  // identical for every point that has to be drawn.
    +  // Set the camera transformation to the value of a client-side JS matrix
    +  uniformMatrix4(cMatrixUniform_, jsMatrix_);
    +  // Often, a model matrix is used to move the model around. We're happy
    +  // with the location of the model, so we leave it as the unit matrix
    +  WMatrix4x4 modelMatrix;
    +  uniformMatrix4(mvMatrixUniform_, modelMatrix);
    +  // The next one is a bit complicated. In desktop OpenGL, a shader
    +  // has the gl_NormalMatrix matrix available in the shader language,
    +  // a matrix that is used to transform normals to e.g. implement proper
    +  // Phong shading (google will help you to find a detailed explanation
    +  // of why you need it). It is the transposed inverse of the model view
    +  // matrix. Unfortunately, this matrix is not available in WebGL, so if
    +  // you want to do phong shading, you must calculate it yourself.
    +  // Wt provides methods to calculate the transposed inverse of a matrix,
    +  // when client-side JS matrices are involved. Here, we inverse-transpose
    +  // the product of the client-side camera matrix and the model matrix.
    +  uniformMatrix4(nMatrixUniform_, (jsMatrix_ * modelMatrix).inverted().transposed());
    +
    +  // Configure the shaders: set the attributes.
    +  // Attributes are 'variables' within a shader: they vary for every point
    +  // that has to be drawn. All are stored in one VBO.
    +  bindBuffer(ARRAY_BUFFER, objBuffer_);
    +  // Configure the vertex attributes:
    +  vertexAttribPointer(vertexPositionAttribute_,
    +      3,     // size: Every vertex has an X, Y anc Z component
    +      FLOAT, // type: They are floats
    +      false, // normalized: Please, do NOT normalize the vertices
    +      2*3*4, // stride: The first byte of the next vertex is located this
    +      //         amount of bytes further. The format of the VBO is
    +      //         vx, vy, vz, nx, ny, nz and every element is a
    +      //         Float32, hence 4 bytes large
    +      0);    // offset: The byte position of the first vertex in the buffer
    +  //         is 0.
    +  vertexAttribPointer(vertexNormalAttribute_,
    +      3,
    +      FLOAT,
    +      false,
    +      2*3*4, // stride: see above. We jump from normal to normal now
    +      3*4);  // offset: the first normal is located after the first vertex
    +             //         position, consisting of three four-byte floats
    +
    +  // Now draw all the triangles.
    +  drawArrays(TRIANGLES, 0, data.size()/6);
    +}
    +
    +void PaintWidget::setShaders(const std::string &vertexShader,
    +    const std::string &fragmentShader)
    +{
    +  vertexShader_ = vertexShader;
    +  fragmentShader_ = fragmentShader;
    +}
    +
    +
    diff --git a/wt-3.1.7a/examples/webgl/PaintWidget.h b/wt-3.1.7a/examples/webgl/PaintWidget.h
    new file mode 100644
    index 0000000..8b4e3c0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/PaintWidget.h
    @@ -0,0 +1,54 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef PAINTWIDGET_H_
    +#define PAINTWIDGET_H_
    +
    +#include <Wt/WGLWidget>
    +
    +// You must inherit Wt::WGLWidget to draw a 3D scene
    +class PaintWidget: public Wt::WGLWidget
    +{
    +public:
    +  PaintWidget(Wt::WContainerWidget *root);
    +  
    +  // Specialization of WGLWidgeT::intializeGL()
    +  void initializeGL();
    +
    +  // Specialization of WGLWidgeT::paintGL()
    +  void paintGL();
    +
    +  // Specialization of WGLWidgeT::resizeGL()
    +  void resizeGL(int width, int height);
    +
    +  // Sets the shader source. Must be set before the widget is first rendered.
    +  void setShaders(const std::string &vertexShader,
    +      const std::string &fragmentShader);
    +
    +private:
    +  // The shaders, in plain text format
    +  std::string vertexShader_;
    +  std::string fragmentShader_;
    +
    +  // Program and related variables
    +  Program shaderProgram_;
    +  AttribLocation vertexPositionAttribute_;
    +  AttribLocation vertexNormalAttribute_;
    +  UniformLocation pMatrixUniform_;
    +  UniformLocation cMatrixUniform_;
    +  UniformLocation mvMatrixUniform_;
    +  UniformLocation nMatrixUniform_;
    +
    +  // A client-side JavaScript matrix variable
    +  JavaScriptMatrix4x4 jsMatrix_;
    +
    +  // The so-called VBOs, Vertex Buffer Objects
    +  // This one contains both vertex (xyz) and normal (xyz) data
    +  Buffer objBuffer_;
    +};
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/webgl/README b/wt-3.1.7a/examples/webgl/README
    new file mode 100644
    index 0000000..6ef164a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/README
    @@ -0,0 +1,6 @@
    +NOTE
    +
    +WebGL is a pretty new feature of Wt. The interface is not yet final, so
    +you may need to modify your applications later if you start using WGLWidget
    +now. Apart from that, the demos should work on WebGL enabled browsers.
    +
    diff --git a/wt-3.1.7a/examples/webgl/nowebgl.png b/wt-3.1.7a/examples/webgl/nowebgl.png
    new file mode 100755
    index 0000000..ccf8b49
    Binary files /dev/null and b/wt-3.1.7a/examples/webgl/nowebgl.png differ
    diff --git a/wt-3.1.7a/examples/webgl/readObj.C b/wt-3.1.7a/examples/webgl/readObj.C
    new file mode 100644
    index 0000000..422bec5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/readObj.C
    @@ -0,0 +1,129 @@
    +#include "readObj.h"
    +#include <fstream>
    +#include <iostream>
    +#include <boost/tokenizer.hpp>
    +#include <boost/algorithm/string.hpp>
    +#include <boost/lexical_cast.hpp>
    +#if 0
    +#include <boost/bind.hpp>
    +#include <boost/spirit/include/qi.hpp>
    +#include <boost/spirit/include/phoenix_core.hpp>
    +#include <boost/spirit/include/phoenix_operator.hpp>
    +#include <boost/spirit/include/phoenix_stl.hpp>
    +namespace qi = boost::spirit::qi;
    +namespace ascii = boost::spirit::ascii;
    +namespace phoenix = boost::phoenix;
    +
    +void readObj(const std::string &fname,
    +             std::vector<double> &data)
    +{
    +  using qi::double_;
    +  using qi::int_;
    +  using qi::lit;
    +  using qi::char_;
    +  using qi::phrase_parse;
    +  using qi::_1;
    +  using ascii::space;
    +  using phoenix::push_back;
    +  using phoenix::ref;
    +
    +  std::vector<double> points;
    +  std::vector<double> normals;
    +  std::vector<double> tex;
    +  std::vector<int> faces;
    +  std::ifstream f(fname.c_str());
    +
    +  while (f) {
    +    std::string line;
    +    getline(f, line);
    +
    +    bool r = phrase_parse(
    +      line.begin(),
    +      line.end(),
    +      (char_('v') >> double_[push_back(ref(points), _1)] >> double_[push_back(ref(points), _1)] >> double_[push_back(ref(points), _1)] |
    +       lit("vn") >> double_[push_back(ref(normals), _1)] >> double_[push_back(ref(normals), _1)] >> double_[push_back(ref(normals), _1)] |
    +       lit("vt") >> double_[push_back(ref(tex), _1)] >> double_[push_back(ref(tex), _1)] |
    +       char_('f') >> *(int_[push_back(ref(faces), _1)] >> char_('/') >> -(int_) >> char_('/') >> int_[push_back(ref(faces), _1)])),
    +      space
    +      );
    +  }
    +
    +  for (unsigned i = 0; i < faces.size(); ++i) {
    +    data.push_back(points[(faces[i]-1)*3]);
    +    data.push_back(points[(faces[i]-1)*3 + 1]);
    +    data.push_back(points[(faces[i]-1)*3 + 2]);
    +    ++i;
    +    data.push_back(normals[(faces[i]-1)*3]);
    +    data.push_back(normals[(faces[i]-1)*3 + 1]);
    +    data.push_back(normals[(faces[i]-1)*3 + 2]);
    +  }
    +}
    +#else
    +double str2float(const std::string &s)
    +{
    +  return atof(s.c_str());
    +}
    +
    +void readObj(const std::string &fname,
    +             std::vector<double> &data)
    +{
    +  std::vector<double> points;
    +  std::vector<double> normals;
    +  std::vector<double> textures;
    +  std::ifstream f(fname.c_str());
    +  
    +  while (f) {
    +    std::string line;
    +    getline(f, line);
    +
    +    if (f) {
    +      std::vector<std::string> splitLine;
    +      boost::split(splitLine, line, boost::is_any_of(" "), boost::algorithm::token_compress_on);
    +      if (splitLine[0] == "v") {
    +        points.push_back(str2float(splitLine[1]));
    +        points.push_back(str2float(splitLine[2]));
    +        points.push_back(str2float(splitLine[3]));
    +      } else if (splitLine[0] == "vn") {
    +        normals.push_back(str2float(splitLine[1]));
    +        normals.push_back(str2float(splitLine[2]));
    +        normals.push_back(str2float(splitLine[3]));
    +      } else if (splitLine[0] == "vt") {
    +        textures.push_back(boost::lexical_cast<double>(splitLine[1]));
    +        textures.push_back(boost::lexical_cast<double>(splitLine[2]));
    +        textures.push_back(boost::lexical_cast<double>(splitLine[3]));
    +      } else if (splitLine[0] == "f") {
    +        //std::vector<boost::tuple<int, int, int> > face;
    +        //std::vector<int> face;
    +        for (unsigned i = 1; i < splitLine.size(); ++i) {
    +          std::vector<std::string> faceLine;
    +          boost::split(faceLine, splitLine[i], boost::is_any_of("/"), boost::algorithm::token_compress_off);
    +          int v, t, n;
    +          v = boost::lexical_cast<int>(faceLine[0]);
    +          if (faceLine[1] != "") {
    +            t = boost::lexical_cast<int>(faceLine[1]);
    +          } else {
    +            t = -1;
    +          }
    +          if (faceLine[2] != "") {
    +            n = boost::lexical_cast<int>(faceLine[2]);
    +          } else {
    +            n = -1;
    +          }
    +          //face.push_back(boost::make_tuple<int, int, int>(v, t, n));
    +          //faces.push_back(v - 1);
    +          data.push_back(points[(v-1)*3]);
    +          data.push_back(points[(v-1)*3 + 1]);
    +          data.push_back(points[(v-1)*3 + 2]);
    +          data.push_back(normals[(n-1)*3]);
    +          data.push_back(normals[(n-1)*3 + 1]);
    +          data.push_back(normals[(n-1)*3 +2]);
    +        }
    +        //faces.push_back(face);
    +      } else {
    +        std::cerr << "ERROR in obj file: unknown line\n";
    +        return;
    +      }
    +    }
    +  }
    +}
    +#endif
    diff --git a/wt-3.1.7a/examples/webgl/readObj.h b/wt-3.1.7a/examples/webgl/readObj.h
    new file mode 100644
    index 0000000..f8b565c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/readObj.h
    @@ -0,0 +1,14 @@
    +#ifndef READOBJ_H_
    +#define READOBJ_H_
    +
    +#include <vector>
    +#include <string>
    +#include <boost/tuple/tuple.hpp>
    +
    +// Function to read a very limited subset of obj files. Only reads
    +// files with triangles. Supports v, vn, t and f.
    +void readObj(const std::string &fname,
    +             std::vector<double> &data);
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/webgl/teapot.C b/wt-3.1.7a/examples/webgl/teapot.C
    new file mode 100644
    index 0000000..88bfe00
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/teapot.C
    @@ -0,0 +1,141 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WImage>
    +#include <Wt/WPushButton>
    +#include <Wt/WTabWidget>
    +#include <Wt/WText>
    +#include <Wt/WTextArea>
    +
    +
    +#include "readObj.h"
    +#include "PaintWidget.h"
    +
    +using namespace Wt;
    +
    +const char *fragmentShaderSrc =
    +"#ifdef GL_ES\n"
    +"precision highp float;\n"
    +"#endif\n"
    +"\n"
    +"varying vec3 vLightWeighting;\n"
    +"\n"
    +"void main(void) {\n"
    +"  vec4 matColor = vec4(0.278, 0.768, 0.353, 1.0);\n"
    +"  gl_FragColor = vec4(matColor.rgb * vLightWeighting, matColor.a);\n"
    +"}\n";
    +
    +const char *vertexShaderSrc =
    +"attribute vec3 aVertexPosition;\n"
    +"attribute vec3 aVertexNormal;\n"
    +"\n"
    +"uniform mat4 uMVMatrix; // [M]odel[V]iew matrix\n"
    +"uniform mat4 uCMatrix;  // Client-side manipulated [C]amera matrix\n"
    +"uniform mat4 uPMatrix;  // Perspective [P]rojection matrix\n"
    +"uniform mat4 uNMatrix;  // [N]ormal transformation\n"
    +"// uNMatrix is the transpose of the inverse of uCMatrix * uMVMatrix\n"
    +"\n"
    +"varying vec3 vLightWeighting;\n"
    +"\n"
    +"void main(void) {\n"
    +"  // Calculate the position of this vertex\n"
    +"  gl_Position = uPMatrix * uCMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n"
    +"\n"
    +"  // Phong shading\n"
    +"  vec3 transformedNormal = normalize((uNMatrix * vec4(normalize(aVertexNormal), 0)).xyz);\n"
    +"  vec3 lightingDirection = normalize(vec3(1, 1, 1));\n"
    +"  float directionalLightWeighting = max(dot(transformedNormal, lightingDirection), 0.0);\n"
    +"  vec3 uAmbientLightColor = vec3(0.2, 0.2, 0.2);\n"
    +"  vec3 uDirectionalColor = vec3(0.8, 0.8, 0.8);\n"
    +"  vLightWeighting = uAmbientLightColor + uDirectionalColor * directionalLightWeighting;\n"
    +"}\n";
    +
    +std::vector<double> data;
    +
    +/*
    + * A pretty basic WebGL demo application
    + */
    +class WebGLDemo : public WApplication
    +{
    +public:
    +  WebGLDemo(const WEnvironment& env);
    +
    +private:
    +  void updateShaders();
    +  void resetShaders();
    +
    +  WContainerWidget *glContainer_;
    +  PaintWidget *paintWidget_;
    +  WTextArea *fragmentShaderText_;
    +  WTextArea *vertexShaderText_;
    +};
    +
    +WebGLDemo::WebGLDemo(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("WebGL Demo");
    +
    +  root()->addWidget(new WText("If your browser supports WebGL, you'll "
    +    "see a teapot below.<br/>Use your mouse to move around the teapot.<br/>"
    +    "Edit the shaders below the teapot to change how the teapot is rendered."));
    +  root()->addWidget(new WBreak());
    +
    +  paintWidget_ = 0;
    +
    +  glContainer_ = new WContainerWidget(root());
    +  glContainer_->resize(500, 500);
    +  glContainer_->setInline(false);
    +
    +  WPushButton *updateButton = new WPushButton("Update shaders", root());
    +  updateButton->clicked().connect(this, &WebGLDemo::updateShaders);
    +  WPushButton *resetButton = new WPushButton("Reset shaders", root());
    +  resetButton->clicked().connect(this, &WebGLDemo::resetShaders);
    +
    +  WTabWidget *tabs = new WTabWidget(root());
    +
    +  fragmentShaderText_ = new WTextArea;
    +  fragmentShaderText_->resize(750, 250);
    +  tabs->addTab(fragmentShaderText_, "Fragment Shader");
    +  WText *shaderInfo = new WText(root());
    +  vertexShaderText_ = new WTextArea;
    +  vertexShaderText_->resize(750, 250);
    +  tabs->addTab(vertexShaderText_, "Vertex Shader");
    +
    +  resetShaders();
    +}
    +
    +void WebGLDemo::updateShaders()
    +{
    +  delete paintWidget_;
    +  paintWidget_ = new PaintWidget(glContainer_);
    +  paintWidget_->resize(500, 500);
    +  paintWidget_->setShaders(vertexShaderText_->text().toUTF8(),
    +    fragmentShaderText_->text().toUTF8());
    +  paintWidget_->setAlternativeContent(new WImage("nowebgl.png"));
    +}
    +
    +void WebGLDemo::resetShaders()
    +{
    +  fragmentShaderText_->setText(fragmentShaderSrc);
    +  vertexShaderText_->setText(vertexShaderSrc);
    +  updateShaders();
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new WebGLDemo(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  readObj("teapot.obj", data);
    +
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/webgl/teapot.obj b/wt-3.1.7a/examples/webgl/teapot.obj
    new file mode 100644
    index 0000000..5c06505
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/teapot.obj
    @@ -0,0 +1,28224 @@
    +v 1.400000 2.400000 0.000000
    +v 1.372000 2.400000 0.285250
    +v 1.356110 2.443070 0.281947
    +v 1.356110 2.443070 0.281947
    +v 1.383790 2.443070 0.000000
    +v 1.400000 2.400000 0.000000
    +v 1.372000 2.400000 0.285250
    +v 1.291500 2.400000 0.549500
    +v 1.276550 2.443070 0.543137
    +v 1.276550 2.443070 0.543137
    +v 1.356110 2.443070 0.281947
    +v 1.372000 2.400000 0.285250
    +v 1.291500 2.400000 0.549500
    +v 1.163750 2.400000 0.787500
    +v 1.150270 2.443070 0.778381
    +v 1.150270 2.443070 0.778381
    +v 1.276550 2.443070 0.543137
    +v 1.291500 2.400000 0.549500
    +v 1.163750 2.400000 0.787500
    +v 0.994000 2.400000 0.994000
    +v 0.982490 2.443070 0.982490
    +v 0.982490 2.443070 0.982490
    +v 1.150270 2.443070 0.778381
    +v 1.163750 2.400000 0.787500
    +v 0.994000 2.400000 0.994000
    +v 0.787500 2.400000 1.163750
    +v 0.778381 2.443070 1.150270
    +v 0.778381 2.443070 1.150270
    +v 0.982490 2.443070 0.982490
    +v 0.994000 2.400000 0.994000
    +v 0.787500 2.400000 1.163750
    +v 0.549500 2.400000 1.291500
    +v 0.543137 2.443070 1.276550
    +v 0.543137 2.443070 1.276550
    +v 0.778381 2.443070 1.150270
    +v 0.787500 2.400000 1.163750
    +v 0.549500 2.400000 1.291500
    +v 0.285250 2.400000 1.372000
    +v 0.281947 2.443070 1.356110
    +v 0.281947 2.443070 1.356110
    +v 0.543137 2.443070 1.276550
    +v 0.549500 2.400000 1.291500
    +v 0.285250 2.400000 1.372000
    +v 0.000000 2.400000 1.400000
    +v 0.000000 2.443070 1.383790
    +v 0.000000 2.443070 1.383790
    +v 0.281947 2.443070 1.356110
    +v 0.285250 2.400000 1.372000
    +v 1.383790 2.443070 0.000000
    +v 1.356110 2.443070 0.281947
    +v 1.352860 2.473830 0.281271
    +v 1.352860 2.473830 0.281271
    +v 1.380470 2.473830 0.000000
    +v 1.383790 2.443070 0.000000
    +v 1.356110 2.443070 0.281947
    +v 1.276550 2.443070 0.543137
    +v 1.273480 2.473830 0.541834
    +v 1.273480 2.473830 0.541834
    +v 1.352860 2.473830 0.281271
    +v 1.356110 2.443070 0.281947
    +v 1.276550 2.443070 0.543137
    +v 1.150270 2.443070 0.778381
    +v 1.147510 2.473830 0.776514
    +v 1.147510 2.473830 0.776514
    +v 1.273480 2.473830 0.541834
    +v 1.276550 2.443070 0.543137
    +v 1.150270 2.443070 0.778381
    +v 0.982490 2.443070 0.982490
    +v 0.980133 2.473830 0.980133
    +v 0.980133 2.473830 0.980133
    +v 1.147510 2.473830 0.776514
    +v 1.150270 2.443070 0.778381
    +v 0.982490 2.443070 0.982490
    +v 0.778381 2.443070 1.150270
    +v 0.776514 2.473830 1.147510
    +v 0.776514 2.473830 1.147510
    +v 0.980133 2.473830 0.980133
    +v 0.982490 2.443070 0.982490
    +v 0.778381 2.443070 1.150270
    +v 0.543137 2.443070 1.276550
    +v 0.541834 2.473830 1.273480
    +v 0.541834 2.473830 1.273480
    +v 0.776514 2.473830 1.147510
    +v 0.778381 2.443070 1.150270
    +v 0.543137 2.443070 1.276550
    +v 0.281947 2.443070 1.356110
    +v 0.281271 2.473830 1.352860
    +v 0.281271 2.473830 1.352860
    +v 0.541834 2.473830 1.273480
    +v 0.543137 2.443070 1.276550
    +v 0.281947 2.443070 1.356110
    +v 0.000000 2.443070 1.383790
    +v -0.000000 2.473830 1.380470
    +v -0.000000 2.473830 1.380470
    +v 0.281271 2.473830 1.352860
    +v 0.281947 2.443070 1.356110
    +v 1.380470 2.473830 0.000000
    +v 1.352860 2.473830 0.281271
    +v 1.359940 2.492290 0.282743
    +v 1.359940 2.492290 0.282743
    +v 1.387700 2.492290 0.000000
    +v 1.380470 2.473830 0.000000
    +v 1.352860 2.473830 0.281271
    +v 1.273480 2.473830 0.541834
    +v 1.280150 2.492290 0.544670
    +v 1.280150 2.492290 0.544670
    +v 1.359940 2.492290 0.282743
    +v 1.352860 2.473830 0.281271
    +v 1.273480 2.473830 0.541834
    +v 1.147510 2.473830 0.776514
    +v 1.153520 2.492290 0.780579
    +v 1.153520 2.492290 0.780579
    +v 1.280150 2.492290 0.544670
    +v 1.273480 2.473830 0.541834
    +v 1.147510 2.473830 0.776514
    +v 0.980133 2.473830 0.980133
    +v 0.985264 2.492290 0.985264
    +v 0.985264 2.492290 0.985264
    +v 1.153520 2.492290 0.780579
    +v 1.147510 2.473830 0.776514
    +v 0.980133 2.473830 0.980133
    +v 0.776514 2.473830 1.147510
    +v 0.780579 2.492290 1.153520
    +v 0.780579 2.492290 1.153520
    +v 0.985264 2.492290 0.985264
    +v 0.980133 2.473830 0.980133
    +v 0.776514 2.473830 1.147510
    +v 0.541834 2.473830 1.273480
    +v 0.544670 2.492290 1.280150
    +v 0.544670 2.492290 1.280150
    +v 0.780579 2.492290 1.153520
    +v 0.776514 2.473830 1.147510
    +v 0.541834 2.473830 1.273480
    +v 0.281271 2.473830 1.352860
    +v 0.282743 2.492290 1.359940
    +v 0.282743 2.492290 1.359940
    +v 0.544670 2.492290 1.280150
    +v 0.541834 2.473830 1.273480
    +v 0.281271 2.473830 1.352860
    +v -0.000000 2.473830 1.380470
    +v 0.000000 2.492290 1.387700
    +v 0.000000 2.492290 1.387700
    +v 0.282743 2.492290 1.359940
    +v 0.281271 2.473830 1.352860
    +v 1.387700 2.492290 0.000000
    +v 1.359940 2.492290 0.282743
    +v 1.375060 2.498440 0.285887
    +v 1.375060 2.498440 0.285887
    +v 1.403120 2.498440 0.000000
    +v 1.387700 2.492290 0.000000
    +v 1.359940 2.492290 0.282743
    +v 1.280150 2.492290 0.544670
    +v 1.294380 2.498440 0.550727
    +v 1.294380 2.498440 0.550727
    +v 1.375060 2.498440 0.285887
    +v 1.359940 2.492290 0.282743
    +v 1.280150 2.492290 0.544670
    +v 1.153520 2.492290 0.780579
    +v 1.166350 2.498440 0.789258
    +v 1.166350 2.498440 0.789258
    +v 1.294380 2.498440 0.550727
    +v 1.280150 2.492290 0.544670
    +v 1.153520 2.492290 0.780579
    +v 0.985264 2.492290 0.985264
    +v 0.996219 2.498440 0.996219
    +v 0.996219 2.498440 0.996219
    +v 1.166350 2.498440 0.789258
    +v 1.153520 2.492290 0.780579
    +v 0.985264 2.492290 0.985264
    +v 0.780579 2.492290 1.153520
    +v 0.789258 2.498440 1.166350
    +v 0.789258 2.498440 1.166350
    +v 0.996219 2.498440 0.996219
    +v 0.985264 2.492290 0.985264
    +v 0.780579 2.492290 1.153520
    +v 0.544670 2.492290 1.280150
    +v 0.550727 2.498440 1.294380
    +v 0.550727 2.498440 1.294380
    +v 0.789258 2.498440 1.166350
    +v 0.780579 2.492290 1.153520
    +v 0.544670 2.492290 1.280150
    +v 0.282743 2.492290 1.359940
    +v 0.285887 2.498440 1.375060
    +v 0.285887 2.498440 1.375060
    +v 0.550727 2.498440 1.294380
    +v 0.544670 2.492290 1.280150
    +v 0.282743 2.492290 1.359940
    +v 0.000000 2.492290 1.387700
    +v 0.000000 2.498440 1.403120
    +v 0.000000 2.498440 1.403120
    +v 0.285887 2.498440 1.375060
    +v 0.282743 2.492290 1.359940
    +v 1.403120 2.498440 0.000000
    +v 1.375060 2.498440 0.285887
    +v 1.395930 2.492290 0.290224
    +v 1.395930 2.492290 0.290224
    +v 1.424410 2.492290 0.000000
    +v 1.403120 2.498440 0.000000
    +v 1.375060 2.498440 0.285887
    +v 1.294380 2.498440 0.550727
    +v 1.314020 2.492290 0.559083
    +v 1.314020 2.492290 0.559083
    +v 1.395930 2.492290 0.290224
    +v 1.375060 2.498440 0.285887
    +v 1.294380 2.498440 0.550727
    +v 1.166350 2.498440 0.789258
    +v 1.184040 2.492290 0.801233
    +v 1.184040 2.492290 0.801233
    +v 1.314020 2.492290 0.559083
    +v 1.294380 2.498440 0.550727
    +v 1.166350 2.498440 0.789258
    +v 0.996219 2.498440 0.996219
    +v 1.011330 2.492290 1.011330
    +v 1.011330 2.492290 1.011330
    +v 1.184040 2.492290 0.801233
    +v 1.166350 2.498440 0.789258
    +v 0.996219 2.498440 0.996219
    +v 0.789258 2.498440 1.166350
    +v 0.801233 2.492290 1.184040
    +v 0.801233 2.492290 1.184040
    +v 1.011330 2.492290 1.011330
    +v 0.996219 2.498440 0.996219
    +v 0.789258 2.498440 1.166350
    +v 0.550727 2.498440 1.294380
    +v 0.559083 2.492290 1.314020
    +v 0.559083 2.492290 1.314020
    +v 0.801233 2.492290 1.184040
    +v 0.789258 2.498440 1.166350
    +v 0.550727 2.498440 1.294380
    +v 0.285887 2.498440 1.375060
    +v 0.290224 2.492290 1.395930
    +v 0.290224 2.492290 1.395930
    +v 0.559083 2.492290 1.314020
    +v 0.550727 2.498440 1.294380
    +v 0.285887 2.498440 1.375060
    +v 0.000000 2.498440 1.403120
    +v -0.000000 2.492290 1.424410
    +v -0.000000 2.492290 1.424410
    +v 0.290224 2.492290 1.395930
    +v 0.285887 2.498440 1.375060
    +v 1.424410 2.492290 0.000000
    +v 1.395930 2.492290 0.290224
    +v 1.420230 2.473830 0.295278
    +v 1.420230 2.473830 0.295278
    +v 1.449220 2.473830 0.000000
    +v 1.424410 2.492290 0.000000
    +v 1.395930 2.492290 0.290224
    +v 1.314020 2.492290 0.559083
    +v 1.336900 2.473830 0.568818
    +v 1.336900 2.473830 0.568818
    +v 1.420230 2.473830 0.295278
    +v 1.395930 2.492290 0.290224
    +v 1.314020 2.492290 0.559083
    +v 1.184040 2.492290 0.801233
    +v 1.204660 2.473830 0.815186
    +v 1.204660 2.473830 0.815186
    +v 1.336900 2.473830 0.568818
    +v 1.314020 2.492290 0.559083
    +v 1.184040 2.492290 0.801233
    +v 1.011330 2.492290 1.011330
    +v 1.028950 2.473830 1.028950
    +v 1.028950 2.473830 1.028950
    +v 1.204660 2.473830 0.815186
    +v 1.184040 2.492290 0.801233
    +v 1.011330 2.492290 1.011330
    +v 0.801233 2.492290 1.184040
    +v 0.815186 2.473830 1.204660
    +v 0.815186 2.473830 1.204660
    +v 1.028950 2.473830 1.028950
    +v 1.011330 2.492290 1.011330
    +v 0.801233 2.492290 1.184040
    +v 0.559083 2.492290 1.314020
    +v 0.568818 2.473830 1.336900
    +v 0.568818 2.473830 1.336900
    +v 0.815186 2.473830 1.204660
    +v 0.801233 2.492290 1.184040
    +v 0.559083 2.492290 1.314020
    +v 0.290224 2.492290 1.395930
    +v 0.295278 2.473830 1.420230
    +v 0.295278 2.473830 1.420230
    +v 0.568818 2.473830 1.336900
    +v 0.559083 2.492290 1.314020
    +v 0.290224 2.492290 1.395930
    +v -0.000000 2.492290 1.424410
    +v 0.000000 2.473830 1.449220
    +v 0.000000 2.473830 1.449220
    +v 0.295278 2.473830 1.420230
    +v 0.290224 2.492290 1.395930
    +v 1.449220 2.473830 0.000000
    +v 1.420230 2.473830 0.295278
    +v 1.445690 2.443070 0.300571
    +v 1.445690 2.443070 0.300571
    +v 1.475200 2.443070 0.000000
    +v 1.449220 2.473830 0.000000
    +v 1.420230 2.473830 0.295278
    +v 1.336900 2.473830 0.568818
    +v 1.360870 2.443070 0.579014
    +v 1.360870 2.443070 0.579014
    +v 1.445690 2.443070 0.300571
    +v 1.420230 2.473830 0.295278
    +v 1.336900 2.473830 0.568818
    +v 1.204660 2.473830 0.815186
    +v 1.226260 2.443070 0.829797
    +v 1.226260 2.443070 0.829797
    +v 1.360870 2.443070 0.579014
    +v 1.336900 2.473830 0.568818
    +v 1.204660 2.473830 0.815186
    +v 1.028950 2.473830 1.028950
    +v 1.047390 2.443070 1.047390
    +v 1.047390 2.443070 1.047390
    +v 1.226260 2.443070 0.829797
    +v 1.204660 2.473830 0.815186
    +v 1.028950 2.473830 1.028950
    +v 0.815186 2.473830 1.204660
    +v 0.829797 2.443070 1.226260
    +v 0.829797 2.443070 1.226260
    +v 1.047390 2.443070 1.047390
    +v 1.028950 2.473830 1.028950
    +v 0.815186 2.473830 1.204660
    +v 0.568818 2.473830 1.336900
    +v 0.579014 2.443070 1.360870
    +v 0.579014 2.443070 1.360870
    +v 0.829797 2.443070 1.226260
    +v 0.815186 2.473830 1.204660
    +v 0.568818 2.473830 1.336900
    +v 0.295278 2.473830 1.420230
    +v 0.300571 2.443070 1.445690
    +v 0.300571 2.443070 1.445690
    +v 0.579014 2.443070 1.360870
    +v 0.568818 2.473830 1.336900
    +v 0.295278 2.473830 1.420230
    +v 0.000000 2.473830 1.449220
    +v -0.000000 2.443070 1.475200
    +v -0.000000 2.443070 1.475200
    +v 0.300571 2.443070 1.445690
    +v 0.295278 2.473830 1.420230
    +v 1.475200 2.443070 0.000000
    +v 1.445690 2.443070 0.300571
    +v 1.470000 2.400000 0.305625
    +v 1.470000 2.400000 0.305625
    +v 1.500000 2.400000 0.000000
    +v 1.475200 2.443070 0.000000
    +v 1.445690 2.443070 0.300571
    +v 1.360870 2.443070 0.579014
    +v 1.383750 2.400000 0.588750
    +v 1.383750 2.400000 0.588750
    +v 1.470000 2.400000 0.305625
    +v 1.445690 2.443070 0.300571
    +v 1.360870 2.443070 0.579014
    +v 1.226260 2.443070 0.829797
    +v 1.246870 2.400000 0.843750
    +v 1.246870 2.400000 0.843750
    +v 1.383750 2.400000 0.588750
    +v 1.360870 2.443070 0.579014
    +v 1.226260 2.443070 0.829797
    +v 1.047390 2.443070 1.047390
    +v 1.065000 2.400000 1.065000
    +v 1.065000 2.400000 1.065000
    +v 1.246870 2.400000 0.843750
    +v 1.226260 2.443070 0.829797
    +v 1.047390 2.443070 1.047390
    +v 0.829797 2.443070 1.226260
    +v 0.843750 2.400000 1.246870
    +v 0.843750 2.400000 1.246870
    +v 1.065000 2.400000 1.065000
    +v 1.047390 2.443070 1.047390
    +v 0.829797 2.443070 1.226260
    +v 0.579014 2.443070 1.360870
    +v 0.588750 2.400000 1.383750
    +v 0.588750 2.400000 1.383750
    +v 0.843750 2.400000 1.246870
    +v 0.829797 2.443070 1.226260
    +v 0.579014 2.443070 1.360870
    +v 0.300571 2.443070 1.445690
    +v 0.305625 2.400000 1.470000
    +v 0.305625 2.400000 1.470000
    +v 0.588750 2.400000 1.383750
    +v 0.579014 2.443070 1.360870
    +v 0.300571 2.443070 1.445690
    +v -0.000000 2.443070 1.475200
    +v 0.000000 2.400000 1.500000
    +v 0.000000 2.400000 1.500000
    +v 0.305625 2.400000 1.470000
    +v 0.300571 2.443070 1.445690
    +v 0.000000 2.400000 1.400000
    +v -0.285250 2.400000 1.372000
    +v -0.281947 2.443070 1.356110
    +v -0.281947 2.443070 1.356110
    +v 0.000000 2.443070 1.383790
    +v 0.000000 2.400000 1.400000
    +v -0.285250 2.400000 1.372000
    +v -0.549500 2.400000 1.291500
    +v -0.543137 2.443070 1.276550
    +v -0.543137 2.443070 1.276550
    +v -0.281947 2.443070 1.356110
    +v -0.285250 2.400000 1.372000
    +v -0.549500 2.400000 1.291500
    +v -0.787500 2.400000 1.163750
    +v -0.778381 2.443070 1.150270
    +v -0.778381 2.443070 1.150270
    +v -0.543137 2.443070 1.276550
    +v -0.549500 2.400000 1.291500
    +v -0.787500 2.400000 1.163750
    +v -0.994000 2.400000 0.994000
    +v -0.982490 2.443070 0.982490
    +v -0.982490 2.443070 0.982490
    +v -0.778381 2.443070 1.150270
    +v -0.787500 2.400000 1.163750
    +v -0.994000 2.400000 0.994000
    +v -1.163750 2.400000 0.787500
    +v -1.150270 2.443070 0.778381
    +v -1.150270 2.443070 0.778381
    +v -0.982490 2.443070 0.982490
    +v -0.994000 2.400000 0.994000
    +v -1.163750 2.400000 0.787500
    +v -1.291500 2.400000 0.549500
    +v -1.276550 2.443070 0.543137
    +v -1.276550 2.443070 0.543137
    +v -1.150270 2.443070 0.778381
    +v -1.163750 2.400000 0.787500
    +v -1.291500 2.400000 0.549500
    +v -1.372000 2.400000 0.285250
    +v -1.356110 2.443070 0.281947
    +v -1.356110 2.443070 0.281947
    +v -1.276550 2.443070 0.543137
    +v -1.291500 2.400000 0.549500
    +v -1.372000 2.400000 0.285250
    +v -1.400000 2.400000 0.000000
    +v -1.383790 2.443070 0.000000
    +v -1.383790 2.443070 0.000000
    +v -1.356110 2.443070 0.281947
    +v -1.372000 2.400000 0.285250
    +v 0.000000 2.443070 1.383790
    +v -0.281947 2.443070 1.356110
    +v -0.281271 2.473830 1.352860
    +v -0.281271 2.473830 1.352860
    +v 0.000000 2.473830 1.380470
    +v 0.000000 2.443070 1.383790
    +v -0.281947 2.443070 1.356110
    +v -0.543137 2.443070 1.276550
    +v -0.541834 2.473830 1.273480
    +v -0.541834 2.473830 1.273480
    +v -0.281271 2.473830 1.352860
    +v -0.281947 2.443070 1.356110
    +v -0.543137 2.443070 1.276550
    +v -0.778381 2.443070 1.150270
    +v -0.776514 2.473830 1.147510
    +v -0.776514 2.473830 1.147510
    +v -0.541834 2.473830 1.273480
    +v -0.543137 2.443070 1.276550
    +v -0.778381 2.443070 1.150270
    +v -0.982490 2.443070 0.982490
    +v -0.980133 2.473830 0.980133
    +v -0.980133 2.473830 0.980133
    +v -0.776514 2.473830 1.147510
    +v -0.778381 2.443070 1.150270
    +v -0.982490 2.443070 0.982490
    +v -1.150270 2.443070 0.778381
    +v -1.147510 2.473830 0.776514
    +v -1.147510 2.473830 0.776514
    +v -0.980133 2.473830 0.980133
    +v -0.982490 2.443070 0.982490
    +v -1.150270 2.443070 0.778381
    +v -1.276550 2.443070 0.543137
    +v -1.273480 2.473830 0.541834
    +v -1.273480 2.473830 0.541834
    +v -1.147510 2.473830 0.776514
    +v -1.150270 2.443070 0.778381
    +v -1.276550 2.443070 0.543137
    +v -1.356110 2.443070 0.281947
    +v -1.352860 2.473830 0.281271
    +v -1.352860 2.473830 0.281271
    +v -1.273480 2.473830 0.541834
    +v -1.276550 2.443070 0.543137
    +v -1.356110 2.443070 0.281947
    +v -1.383790 2.443070 0.000000
    +v -1.380470 2.473830 0.000000
    +v -1.380470 2.473830 0.000000
    +v -1.352860 2.473830 0.281271
    +v -1.356110 2.443070 0.281947
    +v 0.000000 2.473830 1.380470
    +v -0.281271 2.473830 1.352860
    +v -0.282743 2.492290 1.359940
    +v -0.282743 2.492290 1.359940
    +v 0.000000 2.492290 1.387700
    +v 0.000000 2.473830 1.380470
    +v -0.281271 2.473830 1.352860
    +v -0.541834 2.473830 1.273480
    +v -0.544670 2.492290 1.280150
    +v -0.544670 2.492290 1.280150
    +v -0.282743 2.492290 1.359940
    +v -0.281271 2.473830 1.352860
    +v -0.541834 2.473830 1.273480
    +v -0.776514 2.473830 1.147510
    +v -0.780579 2.492290 1.153520
    +v -0.780579 2.492290 1.153520
    +v -0.544670 2.492290 1.280150
    +v -0.541834 2.473830 1.273480
    +v -0.776514 2.473830 1.147510
    +v -0.980133 2.473830 0.980133
    +v -0.985264 2.492290 0.985264
    +v -0.985264 2.492290 0.985264
    +v -0.780579 2.492290 1.153520
    +v -0.776514 2.473830 1.147510
    +v -0.980133 2.473830 0.980133
    +v -1.147510 2.473830 0.776514
    +v -1.153520 2.492290 0.780579
    +v -1.153520 2.492290 0.780579
    +v -0.985264 2.492290 0.985264
    +v -0.980133 2.473830 0.980133
    +v -1.147510 2.473830 0.776514
    +v -1.273480 2.473830 0.541834
    +v -1.280150 2.492290 0.544670
    +v -1.280150 2.492290 0.544670
    +v -1.153520 2.492290 0.780579
    +v -1.147510 2.473830 0.776514
    +v -1.273480 2.473830 0.541834
    +v -1.352860 2.473830 0.281271
    +v -1.359940 2.492290 0.282743
    +v -1.359940 2.492290 0.282743
    +v -1.280150 2.492290 0.544670
    +v -1.273480 2.473830 0.541834
    +v -1.352860 2.473830 0.281271
    +v -1.380470 2.473830 0.000000
    +v -1.387700 2.492290 0.000000
    +v -1.387700 2.492290 0.000000
    +v -1.359940 2.492290 0.282743
    +v -1.352860 2.473830 0.281271
    +v 0.000000 2.492290 1.387700
    +v -0.282743 2.492290 1.359940
    +v -0.285887 2.498440 1.375060
    +v -0.285887 2.498440 1.375060
    +v 0.000000 2.498440 1.403120
    +v 0.000000 2.492290 1.387700
    +v -0.282743 2.492290 1.359940
    +v -0.544670 2.492290 1.280150
    +v -0.550727 2.498440 1.294380
    +v -0.550727 2.498440 1.294380
    +v -0.285887 2.498440 1.375060
    +v -0.282743 2.492290 1.359940
    +v -0.544670 2.492290 1.280150
    +v -0.780579 2.492290 1.153520
    +v -0.789258 2.498440 1.166350
    +v -0.789258 2.498440 1.166350
    +v -0.550727 2.498440 1.294380
    +v -0.544670 2.492290 1.280150
    +v -0.780579 2.492290 1.153520
    +v -0.985264 2.492290 0.985264
    +v -0.996219 2.498440 0.996219
    +v -0.996219 2.498440 0.996219
    +v -0.789258 2.498440 1.166350
    +v -0.780579 2.492290 1.153520
    +v -0.985264 2.492290 0.985264
    +v -1.153520 2.492290 0.780579
    +v -1.166350 2.498440 0.789258
    +v -1.166350 2.498440 0.789258
    +v -0.996219 2.498440 0.996219
    +v -0.985264 2.492290 0.985264
    +v -1.153520 2.492290 0.780579
    +v -1.280150 2.492290 0.544670
    +v -1.294380 2.498440 0.550727
    +v -1.294380 2.498440 0.550727
    +v -1.166350 2.498440 0.789258
    +v -1.153520 2.492290 0.780579
    +v -1.280150 2.492290 0.544670
    +v -1.359940 2.492290 0.282743
    +v -1.375060 2.498440 0.285887
    +v -1.375060 2.498440 0.285887
    +v -1.294380 2.498440 0.550727
    +v -1.280150 2.492290 0.544670
    +v -1.359940 2.492290 0.282743
    +v -1.387700 2.492290 0.000000
    +v -1.403120 2.498440 0.000000
    +v -1.403120 2.498440 0.000000
    +v -1.375060 2.498440 0.285887
    +v -1.359940 2.492290 0.282743
    +v 0.000000 2.498440 1.403120
    +v -0.285887 2.498440 1.375060
    +v -0.290224 2.492290 1.395930
    +v -0.290224 2.492290 1.395930
    +v 0.000000 2.492290 1.424410
    +v 0.000000 2.498440 1.403120
    +v -0.285887 2.498440 1.375060
    +v -0.550727 2.498440 1.294380
    +v -0.559083 2.492290 1.314020
    +v -0.559083 2.492290 1.314020
    +v -0.290224 2.492290 1.395930
    +v -0.285887 2.498440 1.375060
    +v -0.550727 2.498440 1.294380
    +v -0.789258 2.498440 1.166350
    +v -0.801233 2.492290 1.184040
    +v -0.801233 2.492290 1.184040
    +v -0.559083 2.492290 1.314020
    +v -0.550727 2.498440 1.294380
    +v -0.789258 2.498440 1.166350
    +v -0.996219 2.498440 0.996219
    +v -1.011330 2.492290 1.011330
    +v -1.011330 2.492290 1.011330
    +v -0.801233 2.492290 1.184040
    +v -0.789258 2.498440 1.166350
    +v -0.996219 2.498440 0.996219
    +v -1.166350 2.498440 0.789258
    +v -1.184040 2.492290 0.801233
    +v -1.184040 2.492290 0.801233
    +v -1.011330 2.492290 1.011330
    +v -0.996219 2.498440 0.996219
    +v -1.166350 2.498440 0.789258
    +v -1.294380 2.498440 0.550727
    +v -1.314020 2.492290 0.559083
    +v -1.314020 2.492290 0.559083
    +v -1.184040 2.492290 0.801233
    +v -1.166350 2.498440 0.789258
    +v -1.294380 2.498440 0.550727
    +v -1.375060 2.498440 0.285887
    +v -1.395930 2.492290 0.290224
    +v -1.395930 2.492290 0.290224
    +v -1.314020 2.492290 0.559083
    +v -1.294380 2.498440 0.550727
    +v -1.375060 2.498440 0.285887
    +v -1.403120 2.498440 0.000000
    +v -1.424410 2.492290 0.000000
    +v -1.424410 2.492290 0.000000
    +v -1.395930 2.492290 0.290224
    +v -1.375060 2.498440 0.285887
    +v 0.000000 2.492290 1.424410
    +v -0.290224 2.492290 1.395930
    +v -0.295278 2.473830 1.420230
    +v -0.295278 2.473830 1.420230
    +v 0.000000 2.473830 1.449220
    +v 0.000000 2.492290 1.424410
    +v -0.290224 2.492290 1.395930
    +v -0.559083 2.492290 1.314020
    +v -0.568818 2.473830 1.336900
    +v -0.568818 2.473830 1.336900
    +v -0.295278 2.473830 1.420230
    +v -0.290224 2.492290 1.395930
    +v -0.559083 2.492290 1.314020
    +v -0.801233 2.492290 1.184040
    +v -0.815186 2.473830 1.204660
    +v -0.815186 2.473830 1.204660
    +v -0.568818 2.473830 1.336900
    +v -0.559083 2.492290 1.314020
    +v -0.801233 2.492290 1.184040
    +v -1.011330 2.492290 1.011330
    +v -1.028950 2.473830 1.028950
    +v -1.028950 2.473830 1.028950
    +v -0.815186 2.473830 1.204660
    +v -0.801233 2.492290 1.184040
    +v -1.011330 2.492290 1.011330
    +v -1.184040 2.492290 0.801233
    +v -1.204660 2.473830 0.815186
    +v -1.204660 2.473830 0.815186
    +v -1.028950 2.473830 1.028950
    +v -1.011330 2.492290 1.011330
    +v -1.184040 2.492290 0.801233
    +v -1.314020 2.492290 0.559083
    +v -1.336900 2.473830 0.568818
    +v -1.336900 2.473830 0.568818
    +v -1.204660 2.473830 0.815186
    +v -1.184040 2.492290 0.801233
    +v -1.314020 2.492290 0.559083
    +v -1.395930 2.492290 0.290224
    +v -1.420230 2.473830 0.295278
    +v -1.420230 2.473830 0.295278
    +v -1.336900 2.473830 0.568818
    +v -1.314020 2.492290 0.559083
    +v -1.395930 2.492290 0.290224
    +v -1.424410 2.492290 0.000000
    +v -1.449220 2.473830 0.000000
    +v -1.449220 2.473830 0.000000
    +v -1.420230 2.473830 0.295278
    +v -1.395930 2.492290 0.290224
    +v 0.000000 2.473830 1.449220
    +v -0.295278 2.473830 1.420230
    +v -0.300571 2.443070 1.445690
    +v -0.300571 2.443070 1.445690
    +v 0.000000 2.443070 1.475200
    +v 0.000000 2.473830 1.449220
    +v -0.295278 2.473830 1.420230
    +v -0.568818 2.473830 1.336900
    +v -0.579014 2.443070 1.360870
    +v -0.579014 2.443070 1.360870
    +v -0.300571 2.443070 1.445690
    +v -0.295278 2.473830 1.420230
    +v -0.568818 2.473830 1.336900
    +v -0.815186 2.473830 1.204660
    +v -0.829797 2.443070 1.226260
    +v -0.829797 2.443070 1.226260
    +v -0.579014 2.443070 1.360870
    +v -0.568818 2.473830 1.336900
    +v -0.815186 2.473830 1.204660
    +v -1.028950 2.473830 1.028950
    +v -1.047390 2.443070 1.047390
    +v -1.047390 2.443070 1.047390
    +v -0.829797 2.443070 1.226260
    +v -0.815186 2.473830 1.204660
    +v -1.028950 2.473830 1.028950
    +v -1.204660 2.473830 0.815186
    +v -1.226260 2.443070 0.829797
    +v -1.226260 2.443070 0.829797
    +v -1.047390 2.443070 1.047390
    +v -1.028950 2.473830 1.028950
    +v -1.204660 2.473830 0.815186
    +v -1.336900 2.473830 0.568818
    +v -1.360870 2.443070 0.579014
    +v -1.360870 2.443070 0.579014
    +v -1.226260 2.443070 0.829797
    +v -1.204660 2.473830 0.815186
    +v -1.336900 2.473830 0.568818
    +v -1.420230 2.473830 0.295278
    +v -1.445690 2.443070 0.300571
    +v -1.445690 2.443070 0.300571
    +v -1.360870 2.443070 0.579014
    +v -1.336900 2.473830 0.568818
    +v -1.420230 2.473830 0.295278
    +v -1.449220 2.473830 0.000000
    +v -1.475200 2.443070 0.000000
    +v -1.475200 2.443070 0.000000
    +v -1.445690 2.443070 0.300571
    +v -1.420230 2.473830 0.295278
    +v 0.000000 2.443070 1.475200
    +v -0.300571 2.443070 1.445690
    +v -0.305625 2.400000 1.470000
    +v -0.305625 2.400000 1.470000
    +v 0.000000 2.400000 1.500000
    +v 0.000000 2.443070 1.475200
    +v -0.300571 2.443070 1.445690
    +v -0.579014 2.443070 1.360870
    +v -0.588750 2.400000 1.383750
    +v -0.588750 2.400000 1.383750
    +v -0.305625 2.400000 1.470000
    +v -0.300571 2.443070 1.445690
    +v -0.579014 2.443070 1.360870
    +v -0.829797 2.443070 1.226260
    +v -0.843750 2.400000 1.246870
    +v -0.843750 2.400000 1.246870
    +v -0.588750 2.400000 1.383750
    +v -0.579014 2.443070 1.360870
    +v -0.829797 2.443070 1.226260
    +v -1.047390 2.443070 1.047390
    +v -1.065000 2.400000 1.065000
    +v -1.065000 2.400000 1.065000
    +v -0.843750 2.400000 1.246870
    +v -0.829797 2.443070 1.226260
    +v -1.047390 2.443070 1.047390
    +v -1.226260 2.443070 0.829797
    +v -1.246870 2.400000 0.843750
    +v -1.246870 2.400000 0.843750
    +v -1.065000 2.400000 1.065000
    +v -1.047390 2.443070 1.047390
    +v -1.226260 2.443070 0.829797
    +v -1.360870 2.443070 0.579014
    +v -1.383750 2.400000 0.588750
    +v -1.383750 2.400000 0.588750
    +v -1.246870 2.400000 0.843750
    +v -1.226260 2.443070 0.829797
    +v -1.360870 2.443070 0.579014
    +v -1.445690 2.443070 0.300571
    +v -1.470000 2.400000 0.305625
    +v -1.470000 2.400000 0.305625
    +v -1.383750 2.400000 0.588750
    +v -1.360870 2.443070 0.579014
    +v -1.445690 2.443070 0.300571
    +v -1.475200 2.443070 0.000000
    +v -1.500000 2.400000 0.000000
    +v -1.500000 2.400000 0.000000
    +v -1.470000 2.400000 0.305625
    +v -1.445690 2.443070 0.300571
    +v -1.400000 2.400000 0.000000
    +v -1.372000 2.400000 -0.285250
    +v -1.356110 2.443070 -0.281947
    +v -1.356110 2.443070 -0.281947
    +v -1.383790 2.443070 0.000000
    +v -1.400000 2.400000 0.000000
    +v -1.372000 2.400000 -0.285250
    +v -1.291500 2.400000 -0.549500
    +v -1.276550 2.443070 -0.543137
    +v -1.276550 2.443070 -0.543137
    +v -1.356110 2.443070 -0.281947
    +v -1.372000 2.400000 -0.285250
    +v -1.291500 2.400000 -0.549500
    +v -1.163750 2.400000 -0.787500
    +v -1.150270 2.443070 -0.778381
    +v -1.150270 2.443070 -0.778381
    +v -1.276550 2.443070 -0.543137
    +v -1.291500 2.400000 -0.549500
    +v -1.163750 2.400000 -0.787500
    +v -0.994000 2.400000 -0.994000
    +v -0.982490 2.443070 -0.982490
    +v -0.982490 2.443070 -0.982490
    +v -1.150270 2.443070 -0.778381
    +v -1.163750 2.400000 -0.787500
    +v -0.994000 2.400000 -0.994000
    +v -0.787500 2.400000 -1.163750
    +v -0.778381 2.443070 -1.150270
    +v -0.778381 2.443070 -1.150270
    +v -0.982490 2.443070 -0.982490
    +v -0.994000 2.400000 -0.994000
    +v -0.787500 2.400000 -1.163750
    +v -0.549500 2.400000 -1.291500
    +v -0.543137 2.443070 -1.276550
    +v -0.543137 2.443070 -1.276550
    +v -0.778381 2.443070 -1.150270
    +v -0.787500 2.400000 -1.163750
    +v -0.549500 2.400000 -1.291500
    +v -0.285250 2.400000 -1.372000
    +v -0.281947 2.443070 -1.356110
    +v -0.281947 2.443070 -1.356110
    +v -0.543137 2.443070 -1.276550
    +v -0.549500 2.400000 -1.291500
    +v -0.285250 2.400000 -1.372000
    +v 0.000000 2.400000 -1.400000
    +v -0.000000 2.443070 -1.383790
    +v -0.000000 2.443070 -1.383790
    +v -0.281947 2.443070 -1.356110
    +v -0.285250 2.400000 -1.372000
    +v -1.383790 2.443070 0.000000
    +v -1.356110 2.443070 -0.281947
    +v -1.352860 2.473830 -0.281271
    +v -1.352860 2.473830 -0.281271
    +v -1.380470 2.473830 0.000000
    +v -1.383790 2.443070 0.000000
    +v -1.356110 2.443070 -0.281947
    +v -1.276550 2.443070 -0.543137
    +v -1.273480 2.473830 -0.541834
    +v -1.273480 2.473830 -0.541834
    +v -1.352860 2.473830 -0.281271
    +v -1.356110 2.443070 -0.281947
    +v -1.276550 2.443070 -0.543137
    +v -1.150270 2.443070 -0.778381
    +v -1.147510 2.473830 -0.776514
    +v -1.147510 2.473830 -0.776514
    +v -1.273480 2.473830 -0.541834
    +v -1.276550 2.443070 -0.543137
    +v -1.150270 2.443070 -0.778381
    +v -0.982490 2.443070 -0.982490
    +v -0.980133 2.473830 -0.980133
    +v -0.980133 2.473830 -0.980133
    +v -1.147510 2.473830 -0.776514
    +v -1.150270 2.443070 -0.778381
    +v -0.982490 2.443070 -0.982490
    +v -0.778381 2.443070 -1.150270
    +v -0.776514 2.473830 -1.147510
    +v -0.776514 2.473830 -1.147510
    +v -0.980133 2.473830 -0.980133
    +v -0.982490 2.443070 -0.982490
    +v -0.778381 2.443070 -1.150270
    +v -0.543137 2.443070 -1.276550
    +v -0.541834 2.473830 -1.273480
    +v -0.541834 2.473830 -1.273480
    +v -0.776514 2.473830 -1.147510
    +v -0.778381 2.443070 -1.150270
    +v -0.543137 2.443070 -1.276550
    +v -0.281947 2.443070 -1.356110
    +v -0.281271 2.473830 -1.352860
    +v -0.281271 2.473830 -1.352860
    +v -0.541834 2.473830 -1.273480
    +v -0.543137 2.443070 -1.276550
    +v -0.281947 2.443070 -1.356110
    +v -0.000000 2.443070 -1.383790
    +v 0.000000 2.473830 -1.380470
    +v 0.000000 2.473830 -1.380470
    +v -0.281271 2.473830 -1.352860
    +v -0.281947 2.443070 -1.356110
    +v -1.380470 2.473830 0.000000
    +v -1.352860 2.473830 -0.281271
    +v -1.359940 2.492290 -0.282743
    +v -1.359940 2.492290 -0.282743
    +v -1.387700 2.492290 0.000000
    +v -1.380470 2.473830 0.000000
    +v -1.352860 2.473830 -0.281271
    +v -1.273480 2.473830 -0.541834
    +v -1.280150 2.492290 -0.544670
    +v -1.280150 2.492290 -0.544670
    +v -1.359940 2.492290 -0.282743
    +v -1.352860 2.473830 -0.281271
    +v -1.273480 2.473830 -0.541834
    +v -1.147510 2.473830 -0.776514
    +v -1.153520 2.492290 -0.780579
    +v -1.153520 2.492290 -0.780579
    +v -1.280150 2.492290 -0.544670
    +v -1.273480 2.473830 -0.541834
    +v -1.147510 2.473830 -0.776514
    +v -0.980133 2.473830 -0.980133
    +v -0.985264 2.492290 -0.985264
    +v -0.985264 2.492290 -0.985264
    +v -1.153520 2.492290 -0.780579
    +v -1.147510 2.473830 -0.776514
    +v -0.980133 2.473830 -0.980133
    +v -0.776514 2.473830 -1.147510
    +v -0.780579 2.492290 -1.153520
    +v -0.780579 2.492290 -1.153520
    +v -0.985264 2.492290 -0.985264
    +v -0.980133 2.473830 -0.980133
    +v -0.776514 2.473830 -1.147510
    +v -0.541834 2.473830 -1.273480
    +v -0.544670 2.492290 -1.280150
    +v -0.544670 2.492290 -1.280150
    +v -0.780579 2.492290 -1.153520
    +v -0.776514 2.473830 -1.147510
    +v -0.541834 2.473830 -1.273480
    +v -0.281271 2.473830 -1.352860
    +v -0.282743 2.492290 -1.359940
    +v -0.282743 2.492290 -1.359940
    +v -0.544670 2.492290 -1.280150
    +v -0.541834 2.473830 -1.273480
    +v -0.281271 2.473830 -1.352860
    +v 0.000000 2.473830 -1.380470
    +v 0.000000 2.492290 -1.387700
    +v 0.000000 2.492290 -1.387700
    +v -0.282743 2.492290 -1.359940
    +v -0.281271 2.473830 -1.352860
    +v -1.387700 2.492290 0.000000
    +v -1.359940 2.492290 -0.282743
    +v -1.375060 2.498440 -0.285887
    +v -1.375060 2.498440 -0.285887
    +v -1.403120 2.498440 0.000000
    +v -1.387700 2.492290 0.000000
    +v -1.359940 2.492290 -0.282743
    +v -1.280150 2.492290 -0.544670
    +v -1.294380 2.498440 -0.550727
    +v -1.294380 2.498440 -0.550727
    +v -1.375060 2.498440 -0.285887
    +v -1.359940 2.492290 -0.282743
    +v -1.280150 2.492290 -0.544670
    +v -1.153520 2.492290 -0.780579
    +v -1.166350 2.498440 -0.789258
    +v -1.166350 2.498440 -0.789258
    +v -1.294380 2.498440 -0.550727
    +v -1.280150 2.492290 -0.544670
    +v -1.153520 2.492290 -0.780579
    +v -0.985264 2.492290 -0.985264
    +v -0.996219 2.498440 -0.996219
    +v -0.996219 2.498440 -0.996219
    +v -1.166350 2.498440 -0.789258
    +v -1.153520 2.492290 -0.780579
    +v -0.985264 2.492290 -0.985264
    +v -0.780579 2.492290 -1.153520
    +v -0.789258 2.498440 -1.166350
    +v -0.789258 2.498440 -1.166350
    +v -0.996219 2.498440 -0.996219
    +v -0.985264 2.492290 -0.985264
    +v -0.780579 2.492290 -1.153520
    +v -0.544670 2.492290 -1.280150
    +v -0.550727 2.498440 -1.294380
    +v -0.550727 2.498440 -1.294380
    +v -0.789258 2.498440 -1.166350
    +v -0.780579 2.492290 -1.153520
    +v -0.544670 2.492290 -1.280150
    +v -0.282743 2.492290 -1.359940
    +v -0.285887 2.498440 -1.375060
    +v -0.285887 2.498440 -1.375060
    +v -0.550727 2.498440 -1.294380
    +v -0.544670 2.492290 -1.280150
    +v -0.282743 2.492290 -1.359940
    +v 0.000000 2.492290 -1.387700
    +v 0.000000 2.498440 -1.403120
    +v 0.000000 2.498440 -1.403120
    +v -0.285887 2.498440 -1.375060
    +v -0.282743 2.492290 -1.359940
    +v -1.403120 2.498440 0.000000
    +v -1.375060 2.498440 -0.285887
    +v -1.395930 2.492290 -0.290224
    +v -1.395930 2.492290 -0.290224
    +v -1.424410 2.492290 0.000000
    +v -1.403120 2.498440 0.000000
    +v -1.375060 2.498440 -0.285887
    +v -1.294380 2.498440 -0.550727
    +v -1.314020 2.492290 -0.559083
    +v -1.314020 2.492290 -0.559083
    +v -1.395930 2.492290 -0.290224
    +v -1.375060 2.498440 -0.285887
    +v -1.294380 2.498440 -0.550727
    +v -1.166350 2.498440 -0.789258
    +v -1.184040 2.492290 -0.801233
    +v -1.184040 2.492290 -0.801233
    +v -1.314020 2.492290 -0.559083
    +v -1.294380 2.498440 -0.550727
    +v -1.166350 2.498440 -0.789258
    +v -0.996219 2.498440 -0.996219
    +v -1.011330 2.492290 -1.011330
    +v -1.011330 2.492290 -1.011330
    +v -1.184040 2.492290 -0.801233
    +v -1.166350 2.498440 -0.789258
    +v -0.996219 2.498440 -0.996219
    +v -0.789258 2.498440 -1.166350
    +v -0.801233 2.492290 -1.184040
    +v -0.801233 2.492290 -1.184040
    +v -1.011330 2.492290 -1.011330
    +v -0.996219 2.498440 -0.996219
    +v -0.789258 2.498440 -1.166350
    +v -0.550727 2.498440 -1.294380
    +v -0.559083 2.492290 -1.314020
    +v -0.559083 2.492290 -1.314020
    +v -0.801233 2.492290 -1.184040
    +v -0.789258 2.498440 -1.166350
    +v -0.550727 2.498440 -1.294380
    +v -0.285887 2.498440 -1.375060
    +v -0.290224 2.492290 -1.395930
    +v -0.290224 2.492290 -1.395930
    +v -0.559083 2.492290 -1.314020
    +v -0.550727 2.498440 -1.294380
    +v -0.285887 2.498440 -1.375060
    +v 0.000000 2.498440 -1.403120
    +v 0.000000 2.492290 -1.424410
    +v 0.000000 2.492290 -1.424410
    +v -0.290224 2.492290 -1.395930
    +v -0.285887 2.498440 -1.375060
    +v -1.424410 2.492290 0.000000
    +v -1.395930 2.492290 -0.290224
    +v -1.420230 2.473830 -0.295278
    +v -1.420230 2.473830 -0.295278
    +v -1.449220 2.473830 0.000000
    +v -1.424410 2.492290 0.000000
    +v -1.395930 2.492290 -0.290224
    +v -1.314020 2.492290 -0.559083
    +v -1.336900 2.473830 -0.568818
    +v -1.336900 2.473830 -0.568818
    +v -1.420230 2.473830 -0.295278
    +v -1.395930 2.492290 -0.290224
    +v -1.314020 2.492290 -0.559083
    +v -1.184040 2.492290 -0.801233
    +v -1.204660 2.473830 -0.815186
    +v -1.204660 2.473830 -0.815186
    +v -1.336900 2.473830 -0.568818
    +v -1.314020 2.492290 -0.559083
    +v -1.184040 2.492290 -0.801233
    +v -1.011330 2.492290 -1.011330
    +v -1.028950 2.473830 -1.028950
    +v -1.028950 2.473830 -1.028950
    +v -1.204660 2.473830 -0.815186
    +v -1.184040 2.492290 -0.801233
    +v -1.011330 2.492290 -1.011330
    +v -0.801233 2.492290 -1.184040
    +v -0.815186 2.473830 -1.204660
    +v -0.815186 2.473830 -1.204660
    +v -1.028950 2.473830 -1.028950
    +v -1.011330 2.492290 -1.011330
    +v -0.801233 2.492290 -1.184040
    +v -0.559083 2.492290 -1.314020
    +v -0.568818 2.473830 -1.336900
    +v -0.568818 2.473830 -1.336900
    +v -0.815186 2.473830 -1.204660
    +v -0.801233 2.492290 -1.184040
    +v -0.559083 2.492290 -1.314020
    +v -0.290224 2.492290 -1.395930
    +v -0.295278 2.473830 -1.420230
    +v -0.295278 2.473830 -1.420230
    +v -0.568818 2.473830 -1.336900
    +v -0.559083 2.492290 -1.314020
    +v -0.290224 2.492290 -1.395930
    +v 0.000000 2.492290 -1.424410
    +v -0.000000 2.473830 -1.449220
    +v -0.000000 2.473830 -1.449220
    +v -0.295278 2.473830 -1.420230
    +v -0.290224 2.492290 -1.395930
    +v -1.449220 2.473830 0.000000
    +v -1.420230 2.473830 -0.295278
    +v -1.445690 2.443070 -0.300571
    +v -1.445690 2.443070 -0.300571
    +v -1.475200 2.443070 0.000000
    +v -1.449220 2.473830 0.000000
    +v -1.420230 2.473830 -0.295278
    +v -1.336900 2.473830 -0.568818
    +v -1.360870 2.443070 -0.579014
    +v -1.360870 2.443070 -0.579014
    +v -1.445690 2.443070 -0.300571
    +v -1.420230 2.473830 -0.295278
    +v -1.336900 2.473830 -0.568818
    +v -1.204660 2.473830 -0.815186
    +v -1.226260 2.443070 -0.829797
    +v -1.226260 2.443070 -0.829797
    +v -1.360870 2.443070 -0.579014
    +v -1.336900 2.473830 -0.568818
    +v -1.204660 2.473830 -0.815186
    +v -1.028950 2.473830 -1.028950
    +v -1.047390 2.443070 -1.047390
    +v -1.047390 2.443070 -1.047390
    +v -1.226260 2.443070 -0.829797
    +v -1.204660 2.473830 -0.815186
    +v -1.028950 2.473830 -1.028950
    +v -0.815186 2.473830 -1.204660
    +v -0.829797 2.443070 -1.226260
    +v -0.829797 2.443070 -1.226260
    +v -1.047390 2.443070 -1.047390
    +v -1.028950 2.473830 -1.028950
    +v -0.815186 2.473830 -1.204660
    +v -0.568818 2.473830 -1.336900
    +v -0.579014 2.443070 -1.360870
    +v -0.579014 2.443070 -1.360870
    +v -0.829797 2.443070 -1.226260
    +v -0.815186 2.473830 -1.204660
    +v -0.568818 2.473830 -1.336900
    +v -0.295278 2.473830 -1.420230
    +v -0.300571 2.443070 -1.445690
    +v -0.300571 2.443070 -1.445690
    +v -0.579014 2.443070 -1.360870
    +v -0.568818 2.473830 -1.336900
    +v -0.295278 2.473830 -1.420230
    +v -0.000000 2.473830 -1.449220
    +v 0.000000 2.443070 -1.475200
    +v 0.000000 2.443070 -1.475200
    +v -0.300571 2.443070 -1.445690
    +v -0.295278 2.473830 -1.420230
    +v -1.475200 2.443070 0.000000
    +v -1.445690 2.443070 -0.300571
    +v -1.470000 2.400000 -0.305625
    +v -1.470000 2.400000 -0.305625
    +v -1.500000 2.400000 0.000000
    +v -1.475200 2.443070 0.000000
    +v -1.445690 2.443070 -0.300571
    +v -1.360870 2.443070 -0.579014
    +v -1.383750 2.400000 -0.588750
    +v -1.383750 2.400000 -0.588750
    +v -1.470000 2.400000 -0.305625
    +v -1.445690 2.443070 -0.300571
    +v -1.360870 2.443070 -0.579014
    +v -1.226260 2.443070 -0.829797
    +v -1.246870 2.400000 -0.843750
    +v -1.246870 2.400000 -0.843750
    +v -1.383750 2.400000 -0.588750
    +v -1.360870 2.443070 -0.579014
    +v -1.226260 2.443070 -0.829797
    +v -1.047390 2.443070 -1.047390
    +v -1.065000 2.400000 -1.065000
    +v -1.065000 2.400000 -1.065000
    +v -1.246870 2.400000 -0.843750
    +v -1.226260 2.443070 -0.829797
    +v -1.047390 2.443070 -1.047390
    +v -0.829797 2.443070 -1.226260
    +v -0.843750 2.400000 -1.246870
    +v -0.843750 2.400000 -1.246870
    +v -1.065000 2.400000 -1.065000
    +v -1.047390 2.443070 -1.047390
    +v -0.829797 2.443070 -1.226260
    +v -0.579014 2.443070 -1.360870
    +v -0.588750 2.400000 -1.383750
    +v -0.588750 2.400000 -1.383750
    +v -0.843750 2.400000 -1.246870
    +v -0.829797 2.443070 -1.226260
    +v -0.579014 2.443070 -1.360870
    +v -0.300571 2.443070 -1.445690
    +v -0.305625 2.400000 -1.470000
    +v -0.305625 2.400000 -1.470000
    +v -0.588750 2.400000 -1.383750
    +v -0.579014 2.443070 -1.360870
    +v -0.300571 2.443070 -1.445690
    +v 0.000000 2.443070 -1.475200
    +v -0.000000 2.400000 -1.500000
    +v -0.000000 2.400000 -1.500000
    +v -0.305625 2.400000 -1.470000
    +v -0.300571 2.443070 -1.445690
    +v 0.000000 2.400000 -1.400000
    +v 0.285250 2.400000 -1.372000
    +v 0.281947 2.443070 -1.356110
    +v 0.281947 2.443070 -1.356110
    +v 0.000000 2.443070 -1.383790
    +v 0.000000 2.400000 -1.400000
    +v 0.285250 2.400000 -1.372000
    +v 0.549500 2.400000 -1.291500
    +v 0.543137 2.443070 -1.276550
    +v 0.543137 2.443070 -1.276550
    +v 0.281947 2.443070 -1.356110
    +v 0.285250 2.400000 -1.372000
    +v 0.549500 2.400000 -1.291500
    +v 0.787500 2.400000 -1.163750
    +v 0.778381 2.443070 -1.150270
    +v 0.778381 2.443070 -1.150270
    +v 0.543137 2.443070 -1.276550
    +v 0.549500 2.400000 -1.291500
    +v 0.787500 2.400000 -1.163750
    +v 0.994000 2.400000 -0.994000
    +v 0.982490 2.443070 -0.982490
    +v 0.982490 2.443070 -0.982490
    +v 0.778381 2.443070 -1.150270
    +v 0.787500 2.400000 -1.163750
    +v 0.994000 2.400000 -0.994000
    +v 1.163750 2.400000 -0.787500
    +v 1.150270 2.443070 -0.778381
    +v 1.150270 2.443070 -0.778381
    +v 0.982490 2.443070 -0.982490
    +v 0.994000 2.400000 -0.994000
    +v 1.163750 2.400000 -0.787500
    +v 1.291500 2.400000 -0.549500
    +v 1.276550 2.443070 -0.543137
    +v 1.276550 2.443070 -0.543137
    +v 1.150270 2.443070 -0.778381
    +v 1.163750 2.400000 -0.787500
    +v 1.291500 2.400000 -0.549500
    +v 1.372000 2.400000 -0.285250
    +v 1.356110 2.443070 -0.281947
    +v 1.356110 2.443070 -0.281947
    +v 1.276550 2.443070 -0.543137
    +v 1.291500 2.400000 -0.549500
    +v 1.372000 2.400000 -0.285250
    +v 1.400000 2.400000 0.000000
    +v 1.383790 2.443070 0.000000
    +v 1.383790 2.443070 0.000000
    +v 1.356110 2.443070 -0.281947
    +v 1.372000 2.400000 -0.285250
    +v 0.000000 2.443070 -1.383790
    +v 0.281947 2.443070 -1.356110
    +v 0.281271 2.473830 -1.352860
    +v 0.281271 2.473830 -1.352860
    +v 0.000000 2.473830 -1.380470
    +v 0.000000 2.443070 -1.383790
    +v 0.281947 2.443070 -1.356110
    +v 0.543137 2.443070 -1.276550
    +v 0.541834 2.473830 -1.273480
    +v 0.541834 2.473830 -1.273480
    +v 0.281271 2.473830 -1.352860
    +v 0.281947 2.443070 -1.356110
    +v 0.543137 2.443070 -1.276550
    +v 0.778381 2.443070 -1.150270
    +v 0.776514 2.473830 -1.147510
    +v 0.776514 2.473830 -1.147510
    +v 0.541834 2.473830 -1.273480
    +v 0.543137 2.443070 -1.276550
    +v 0.778381 2.443070 -1.150270
    +v 0.982490 2.443070 -0.982490
    +v 0.980133 2.473830 -0.980133
    +v 0.980133 2.473830 -0.980133
    +v 0.776514 2.473830 -1.147510
    +v 0.778381 2.443070 -1.150270
    +v 0.982490 2.443070 -0.982490
    +v 1.150270 2.443070 -0.778381
    +v 1.147510 2.473830 -0.776514
    +v 1.147510 2.473830 -0.776514
    +v 0.980133 2.473830 -0.980133
    +v 0.982490 2.443070 -0.982490
    +v 1.150270 2.443070 -0.778381
    +v 1.276550 2.443070 -0.543137
    +v 1.273480 2.473830 -0.541834
    +v 1.273480 2.473830 -0.541834
    +v 1.147510 2.473830 -0.776514
    +v 1.150270 2.443070 -0.778381
    +v 1.276550 2.443070 -0.543137
    +v 1.356110 2.443070 -0.281947
    +v 1.352860 2.473830 -0.281271
    +v 1.352860 2.473830 -0.281271
    +v 1.273480 2.473830 -0.541834
    +v 1.276550 2.443070 -0.543137
    +v 1.356110 2.443070 -0.281947
    +v 1.383790 2.443070 0.000000
    +v 1.380470 2.473830 0.000000
    +v 1.380470 2.473830 0.000000
    +v 1.352860 2.473830 -0.281271
    +v 1.356110 2.443070 -0.281947
    +v 0.000000 2.473830 -1.380470
    +v 0.281271 2.473830 -1.352860
    +v 0.282743 2.492290 -1.359940
    +v 0.282743 2.492290 -1.359940
    +v 0.000000 2.492290 -1.387700
    +v 0.000000 2.473830 -1.380470
    +v 0.281271 2.473830 -1.352860
    +v 0.541834 2.473830 -1.273480
    +v 0.544670 2.492290 -1.280150
    +v 0.544670 2.492290 -1.280150
    +v 0.282743 2.492290 -1.359940
    +v 0.281271 2.473830 -1.352860
    +v 0.541834 2.473830 -1.273480
    +v 0.776514 2.473830 -1.147510
    +v 0.780579 2.492290 -1.153520
    +v 0.780579 2.492290 -1.153520
    +v 0.544670 2.492290 -1.280150
    +v 0.541834 2.473830 -1.273480
    +v 0.776514 2.473830 -1.147510
    +v 0.980133 2.473830 -0.980133
    +v 0.985264 2.492290 -0.985264
    +v 0.985264 2.492290 -0.985264
    +v 0.780579 2.492290 -1.153520
    +v 0.776514 2.473830 -1.147510
    +v 0.980133 2.473830 -0.980133
    +v 1.147510 2.473830 -0.776514
    +v 1.153520 2.492290 -0.780579
    +v 1.153520 2.492290 -0.780579
    +v 0.985264 2.492290 -0.985264
    +v 0.980133 2.473830 -0.980133
    +v 1.147510 2.473830 -0.776514
    +v 1.273480 2.473830 -0.541834
    +v 1.280150 2.492290 -0.544670
    +v 1.280150 2.492290 -0.544670
    +v 1.153520 2.492290 -0.780579
    +v 1.147510 2.473830 -0.776514
    +v 1.273480 2.473830 -0.541834
    +v 1.352860 2.473830 -0.281271
    +v 1.359940 2.492290 -0.282743
    +v 1.359940 2.492290 -0.282743
    +v 1.280150 2.492290 -0.544670
    +v 1.273480 2.473830 -0.541834
    +v 1.352860 2.473830 -0.281271
    +v 1.380470 2.473830 0.000000
    +v 1.387700 2.492290 0.000000
    +v 1.387700 2.492290 0.000000
    +v 1.359940 2.492290 -0.282743
    +v 1.352860 2.473830 -0.281271
    +v 0.000000 2.492290 -1.387700
    +v 0.282743 2.492290 -1.359940
    +v 0.285887 2.498440 -1.375060
    +v 0.285887 2.498440 -1.375060
    +v 0.000000 2.498440 -1.403120
    +v 0.000000 2.492290 -1.387700
    +v 0.282743 2.492290 -1.359940
    +v 0.544670 2.492290 -1.280150
    +v 0.550727 2.498440 -1.294380
    +v 0.550727 2.498440 -1.294380
    +v 0.285887 2.498440 -1.375060
    +v 0.282743 2.492290 -1.359940
    +v 0.544670 2.492290 -1.280150
    +v 0.780579 2.492290 -1.153520
    +v 0.789258 2.498440 -1.166350
    +v 0.789258 2.498440 -1.166350
    +v 0.550727 2.498440 -1.294380
    +v 0.544670 2.492290 -1.280150
    +v 0.780579 2.492290 -1.153520
    +v 0.985264 2.492290 -0.985264
    +v 0.996219 2.498440 -0.996219
    +v 0.996219 2.498440 -0.996219
    +v 0.789258 2.498440 -1.166350
    +v 0.780579 2.492290 -1.153520
    +v 0.985264 2.492290 -0.985264
    +v 1.153520 2.492290 -0.780579
    +v 1.166350 2.498440 -0.789258
    +v 1.166350 2.498440 -0.789258
    +v 0.996219 2.498440 -0.996219
    +v 0.985264 2.492290 -0.985264
    +v 1.153520 2.492290 -0.780579
    +v 1.280150 2.492290 -0.544670
    +v 1.294380 2.498440 -0.550727
    +v 1.294380 2.498440 -0.550727
    +v 1.166350 2.498440 -0.789258
    +v 1.153520 2.492290 -0.780579
    +v 1.280150 2.492290 -0.544670
    +v 1.359940 2.492290 -0.282743
    +v 1.375060 2.498440 -0.285887
    +v 1.375060 2.498440 -0.285887
    +v 1.294380 2.498440 -0.550727
    +v 1.280150 2.492290 -0.544670
    +v 1.359940 2.492290 -0.282743
    +v 1.387700 2.492290 0.000000
    +v 1.403120 2.498440 0.000000
    +v 1.403120 2.498440 0.000000
    +v 1.375060 2.498440 -0.285887
    +v 1.359940 2.492290 -0.282743
    +v 0.000000 2.498440 -1.403120
    +v 0.285887 2.498440 -1.375060
    +v 0.290224 2.492290 -1.395930
    +v 0.290224 2.492290 -1.395930
    +v 0.000000 2.492290 -1.424410
    +v 0.000000 2.498440 -1.403120
    +v 0.285887 2.498440 -1.375060
    +v 0.550727 2.498440 -1.294380
    +v 0.559083 2.492290 -1.314020
    +v 0.559083 2.492290 -1.314020
    +v 0.290224 2.492290 -1.395930
    +v 0.285887 2.498440 -1.375060
    +v 0.550727 2.498440 -1.294380
    +v 0.789258 2.498440 -1.166350
    +v 0.801233 2.492290 -1.184040
    +v 0.801233 2.492290 -1.184040
    +v 0.559083 2.492290 -1.314020
    +v 0.550727 2.498440 -1.294380
    +v 0.789258 2.498440 -1.166350
    +v 0.996219 2.498440 -0.996219
    +v 1.011330 2.492290 -1.011330
    +v 1.011330 2.492290 -1.011330
    +v 0.801233 2.492290 -1.184040
    +v 0.789258 2.498440 -1.166350
    +v 0.996219 2.498440 -0.996219
    +v 1.166350 2.498440 -0.789258
    +v 1.184040 2.492290 -0.801233
    +v 1.184040 2.492290 -0.801233
    +v 1.011330 2.492290 -1.011330
    +v 0.996219 2.498440 -0.996219
    +v 1.166350 2.498440 -0.789258
    +v 1.294380 2.498440 -0.550727
    +v 1.314020 2.492290 -0.559083
    +v 1.314020 2.492290 -0.559083
    +v 1.184040 2.492290 -0.801233
    +v 1.166350 2.498440 -0.789258
    +v 1.294380 2.498440 -0.550727
    +v 1.375060 2.498440 -0.285887
    +v 1.395930 2.492290 -0.290224
    +v 1.395930 2.492290 -0.290224
    +v 1.314020 2.492290 -0.559083
    +v 1.294380 2.498440 -0.550727
    +v 1.375060 2.498440 -0.285887
    +v 1.403120 2.498440 0.000000
    +v 1.424410 2.492290 0.000000
    +v 1.424410 2.492290 0.000000
    +v 1.395930 2.492290 -0.290224
    +v 1.375060 2.498440 -0.285887
    +v 0.000000 2.492290 -1.424410
    +v 0.290224 2.492290 -1.395930
    +v 0.295278 2.473830 -1.420230
    +v 0.295278 2.473830 -1.420230
    +v 0.000000 2.473830 -1.449220
    +v 0.000000 2.492290 -1.424410
    +v 0.290224 2.492290 -1.395930
    +v 0.559083 2.492290 -1.314020
    +v 0.568818 2.473830 -1.336900
    +v 0.568818 2.473830 -1.336900
    +v 0.295278 2.473830 -1.420230
    +v 0.290224 2.492290 -1.395930
    +v 0.559083 2.492290 -1.314020
    +v 0.801233 2.492290 -1.184040
    +v 0.815186 2.473830 -1.204660
    +v 0.815186 2.473830 -1.204660
    +v 0.568818 2.473830 -1.336900
    +v 0.559083 2.492290 -1.314020
    +v 0.801233 2.492290 -1.184040
    +v 1.011330 2.492290 -1.011330
    +v 1.028950 2.473830 -1.028950
    +v 1.028950 2.473830 -1.028950
    +v 0.815186 2.473830 -1.204660
    +v 0.801233 2.492290 -1.184040
    +v 1.011330 2.492290 -1.011330
    +v 1.184040 2.492290 -0.801233
    +v 1.204660 2.473830 -0.815186
    +v 1.204660 2.473830 -0.815186
    +v 1.028950 2.473830 -1.028950
    +v 1.011330 2.492290 -1.011330
    +v 1.184040 2.492290 -0.801233
    +v 1.314020 2.492290 -0.559083
    +v 1.336900 2.473830 -0.568818
    +v 1.336900 2.473830 -0.568818
    +v 1.204660 2.473830 -0.815186
    +v 1.184040 2.492290 -0.801233
    +v 1.314020 2.492290 -0.559083
    +v 1.395930 2.492290 -0.290224
    +v 1.420230 2.473830 -0.295278
    +v 1.420230 2.473830 -0.295278
    +v 1.336900 2.473830 -0.568818
    +v 1.314020 2.492290 -0.559083
    +v 1.395930 2.492290 -0.290224
    +v 1.424410 2.492290 0.000000
    +v 1.449220 2.473830 0.000000
    +v 1.449220 2.473830 0.000000
    +v 1.420230 2.473830 -0.295278
    +v 1.395930 2.492290 -0.290224
    +v 0.000000 2.473830 -1.449220
    +v 0.295278 2.473830 -1.420230
    +v 0.300571 2.443070 -1.445690
    +v 0.300571 2.443070 -1.445690
    +v 0.000000 2.443070 -1.475200
    +v 0.000000 2.473830 -1.449220
    +v 0.295278 2.473830 -1.420230
    +v 0.568818 2.473830 -1.336900
    +v 0.579014 2.443070 -1.360870
    +v 0.579014 2.443070 -1.360870
    +v 0.300571 2.443070 -1.445690
    +v 0.295278 2.473830 -1.420230
    +v 0.568818 2.473830 -1.336900
    +v 0.815186 2.473830 -1.204660
    +v 0.829797 2.443070 -1.226260
    +v 0.829797 2.443070 -1.226260
    +v 0.579014 2.443070 -1.360870
    +v 0.568818 2.473830 -1.336900
    +v 0.815186 2.473830 -1.204660
    +v 1.028950 2.473830 -1.028950
    +v 1.047390 2.443070 -1.047390
    +v 1.047390 2.443070 -1.047390
    +v 0.829797 2.443070 -1.226260
    +v 0.815186 2.473830 -1.204660
    +v 1.028950 2.473830 -1.028950
    +v 1.204660 2.473830 -0.815186
    +v 1.226260 2.443070 -0.829797
    +v 1.226260 2.443070 -0.829797
    +v 1.047390 2.443070 -1.047390
    +v 1.028950 2.473830 -1.028950
    +v 1.204660 2.473830 -0.815186
    +v 1.336900 2.473830 -0.568818
    +v 1.360870 2.443070 -0.579014
    +v 1.360870 2.443070 -0.579014
    +v 1.226260 2.443070 -0.829797
    +v 1.204660 2.473830 -0.815186
    +v 1.336900 2.473830 -0.568818
    +v 1.420230 2.473830 -0.295278
    +v 1.445690 2.443070 -0.300571
    +v 1.445690 2.443070 -0.300571
    +v 1.360870 2.443070 -0.579014
    +v 1.336900 2.473830 -0.568818
    +v 1.420230 2.473830 -0.295278
    +v 1.449220 2.473830 0.000000
    +v 1.475200 2.443070 0.000000
    +v 1.475200 2.443070 0.000000
    +v 1.445690 2.443070 -0.300571
    +v 1.420230 2.473830 -0.295278
    +v 0.000000 2.443070 -1.475200
    +v 0.300571 2.443070 -1.445690
    +v 0.305625 2.400000 -1.470000
    +v 0.305625 2.400000 -1.470000
    +v 0.000000 2.400000 -1.500000
    +v 0.000000 2.443070 -1.475200
    +v 0.300571 2.443070 -1.445690
    +v 0.579014 2.443070 -1.360870
    +v 0.588750 2.400000 -1.383750
    +v 0.588750 2.400000 -1.383750
    +v 0.305625 2.400000 -1.470000
    +v 0.300571 2.443070 -1.445690
    +v 0.579014 2.443070 -1.360870
    +v 0.829797 2.443070 -1.226260
    +v 0.843750 2.400000 -1.246870
    +v 0.843750 2.400000 -1.246870
    +v 0.588750 2.400000 -1.383750
    +v 0.579014 2.443070 -1.360870
    +v 0.829797 2.443070 -1.226260
    +v 1.047390 2.443070 -1.047390
    +v 1.065000 2.400000 -1.065000
    +v 1.065000 2.400000 -1.065000
    +v 0.843750 2.400000 -1.246870
    +v 0.829797 2.443070 -1.226260
    +v 1.047390 2.443070 -1.047390
    +v 1.226260 2.443070 -0.829797
    +v 1.246870 2.400000 -0.843750
    +v 1.246870 2.400000 -0.843750
    +v 1.065000 2.400000 -1.065000
    +v 1.047390 2.443070 -1.047390
    +v 1.226260 2.443070 -0.829797
    +v 1.360870 2.443070 -0.579014
    +v 1.383750 2.400000 -0.588750
    +v 1.383750 2.400000 -0.588750
    +v 1.246870 2.400000 -0.843750
    +v 1.226260 2.443070 -0.829797
    +v 1.360870 2.443070 -0.579014
    +v 1.445690 2.443070 -0.300571
    +v 1.470000 2.400000 -0.305625
    +v 1.470000 2.400000 -0.305625
    +v 1.383750 2.400000 -0.588750
    +v 1.360870 2.443070 -0.579014
    +v 1.445690 2.443070 -0.300571
    +v 1.475200 2.443070 0.000000
    +v 1.500000 2.400000 0.000000
    +v 1.500000 2.400000 0.000000
    +v 1.470000 2.400000 -0.305625
    +v 1.445690 2.443070 -0.300571
    +v 1.500000 2.400000 0.000000
    +v 1.470000 2.400000 0.305625
    +v 1.561400 2.203270 0.324627
    +v 1.561400 2.203270 0.324627
    +v 1.593260 2.203270 0.000000
    +v 1.500000 2.400000 0.000000
    +v 1.470000 2.400000 0.305625
    +v 1.383750 2.400000 0.588750
    +v 1.469780 2.203270 0.625355
    +v 1.469780 2.203270 0.625355
    +v 1.561400 2.203270 0.324627
    +v 1.470000 2.400000 0.305625
    +v 1.383750 2.400000 0.588750
    +v 1.246870 2.400000 0.843750
    +v 1.324400 2.203270 0.896210
    +v 1.324400 2.203270 0.896210
    +v 1.469780 2.203270 0.625355
    +v 1.383750 2.400000 0.588750
    +v 1.246870 2.400000 0.843750
    +v 1.065000 2.400000 1.065000
    +v 1.131220 2.203270 1.131220
    +v 1.131220 2.203270 1.131220
    +v 1.324400 2.203270 0.896210
    +v 1.246870 2.400000 0.843750
    +v 1.065000 2.400000 1.065000
    +v 0.843750 2.400000 1.246870
    +v 0.896210 2.203270 1.324400
    +v 0.896210 2.203270 1.324400
    +v 1.131220 2.203270 1.131220
    +v 1.065000 2.400000 1.065000
    +v 0.843750 2.400000 1.246870
    +v 0.588750 2.400000 1.383750
    +v 0.625355 2.203270 1.469780
    +v 0.625355 2.203270 1.469780
    +v 0.896210 2.203270 1.324400
    +v 0.843750 2.400000 1.246870
    +v 0.588750 2.400000 1.383750
    +v 0.305625 2.400000 1.470000
    +v 0.324627 2.203270 1.561400
    +v 0.324627 2.203270 1.561400
    +v 0.625355 2.203270 1.469780
    +v 0.588750 2.400000 1.383750
    +v 0.305625 2.400000 1.470000
    +v 0.000000 2.400000 1.500000
    +v 0.000000 2.203270 1.593260
    +v 0.000000 2.203270 1.593260
    +v 0.324627 2.203270 1.561400
    +v 0.305625 2.400000 1.470000
    +v 1.593260 2.203270 0.000000
    +v 1.561400 2.203270 0.324627
    +v 1.649920 2.007420 0.343032
    +v 1.649920 2.007420 0.343032
    +v 1.683590 2.007420 0.000000
    +v 1.593260 2.203270 0.000000
    +v 1.561400 2.203270 0.324627
    +v 1.469780 2.203270 0.625355
    +v 1.553120 2.007420 0.660811
    +v 1.553120 2.007420 0.660811
    +v 1.649920 2.007420 0.343032
    +v 1.561400 2.203270 0.324627
    +v 1.469780 2.203270 0.625355
    +v 1.324400 2.203270 0.896210
    +v 1.399490 2.007420 0.947021
    +v 1.399490 2.007420 0.947021
    +v 1.553120 2.007420 0.660811
    +v 1.469780 2.203270 0.625355
    +v 1.324400 2.203270 0.896210
    +v 1.131220 2.203270 1.131220
    +v 1.195350 2.007420 1.195350
    +v 1.195350 2.007420 1.195350
    +v 1.399490 2.007420 0.947021
    +v 1.324400 2.203270 0.896210
    +v 1.131220 2.203270 1.131220
    +v 0.896210 2.203270 1.324400
    +v 0.947021 2.007420 1.399490
    +v 0.947021 2.007420 1.399490
    +v 1.195350 2.007420 1.195350
    +v 1.131220 2.203270 1.131220
    +v 0.896210 2.203270 1.324400
    +v 0.625355 2.203270 1.469780
    +v 0.660811 2.007420 1.553120
    +v 0.660811 2.007420 1.553120
    +v 0.947021 2.007420 1.399490
    +v 0.896210 2.203270 1.324400
    +v 0.625355 2.203270 1.469780
    +v 0.324627 2.203270 1.561400
    +v 0.343032 2.007420 1.649920
    +v 0.343032 2.007420 1.649920
    +v 0.660811 2.007420 1.553120
    +v 0.625355 2.203270 1.469780
    +v 0.324627 2.203270 1.561400
    +v 0.000000 2.203270 1.593260
    +v 0.000000 2.007420 1.683590
    +v 0.000000 2.007420 1.683590
    +v 0.343032 2.007420 1.649920
    +v 0.324627 2.203270 1.561400
    +v 1.683590 2.007420 0.000000
    +v 1.649920 2.007420 0.343032
    +v 1.732710 1.813330 0.360244
    +v 1.732710 1.813330 0.360244
    +v 1.768070 1.813330 0.000000
    +v 1.683590 2.007420 0.000000
    +v 1.649920 2.007420 0.343032
    +v 1.553120 2.007420 0.660811
    +v 1.631040 1.813330 0.693966
    +v 1.631040 1.813330 0.693966
    +v 1.732710 1.813330 0.360244
    +v 1.649920 2.007420 0.343032
    +v 1.553120 2.007420 0.660811
    +v 1.399490 2.007420 0.947021
    +v 1.469710 1.813330 0.994537
    +v 1.469710 1.813330 0.994537
    +v 1.631040 1.813330 0.693966
    +v 1.553120 2.007420 0.660811
    +v 1.399490 2.007420 0.947021
    +v 1.195350 2.007420 1.195350
    +v 1.255330 1.813330 1.255330
    +v 1.255330 1.813330 1.255330
    +v 1.469710 1.813330 0.994537
    +v 1.399490 2.007420 0.947021
    +v 1.195350 2.007420 1.195350
    +v 0.947021 2.007420 1.399490
    +v 0.994537 1.813330 1.469710
    +v 0.994537 1.813330 1.469710
    +v 1.255330 1.813330 1.255330
    +v 1.195350 2.007420 1.195350
    +v 0.947021 2.007420 1.399490
    +v 0.660811 2.007420 1.553120
    +v 0.693966 1.813330 1.631040
    +v 0.693966 1.813330 1.631040
    +v 0.994537 1.813330 1.469710
    +v 0.947021 2.007420 1.399490
    +v 0.660811 2.007420 1.553120
    +v 0.343032 2.007420 1.649920
    +v 0.360244 1.813330 1.732710
    +v 0.360244 1.813330 1.732710
    +v 0.693966 1.813330 1.631040
    +v 0.660811 2.007420 1.553120
    +v 0.343032 2.007420 1.649920
    +v 0.000000 2.007420 1.683590
    +v 0.000000 1.813330 1.768070
    +v 0.000000 1.813330 1.768070
    +v 0.360244 1.813330 1.732710
    +v 0.343032 2.007420 1.649920
    +v 1.768070 1.813330 0.000000
    +v 1.732710 1.813330 0.360244
    +v 1.806880 1.621870 0.375664
    +v 1.806880 1.621870 0.375664
    +v 1.843750 1.621870 0.000000
    +v 1.768070 1.813330 0.000000
    +v 1.732710 1.813330 0.360244
    +v 1.631040 1.813330 0.693966
    +v 1.700860 1.621870 0.723672
    +v 1.700860 1.621870 0.723672
    +v 1.806880 1.621870 0.375664
    +v 1.732710 1.813330 0.360244
    +v 1.631040 1.813330 0.693966
    +v 1.469710 1.813330 0.994537
    +v 1.532620 1.621870 1.037110
    +v 1.532620 1.621870 1.037110
    +v 1.700860 1.621870 0.723672
    +v 1.631040 1.813330 0.693966
    +v 1.469710 1.813330 0.994537
    +v 1.255330 1.813330 1.255330
    +v 1.309060 1.621870 1.309060
    +v 1.309060 1.621870 1.309060
    +v 1.532620 1.621870 1.037110
    +v 1.469710 1.813330 0.994537
    +v 1.255330 1.813330 1.255330
    +v 0.994537 1.813330 1.469710
    +v 1.037110 1.621870 1.532620
    +v 1.037110 1.621870 1.532620
    +v 1.309060 1.621870 1.309060
    +v 1.255330 1.813330 1.255330
    +v 0.994537 1.813330 1.469710
    +v 0.693966 1.813330 1.631040
    +v 0.723672 1.621870 1.700860
    +v 0.723672 1.621870 1.700860
    +v 1.037110 1.621870 1.532620
    +v 0.994537 1.813330 1.469710
    +v 0.693966 1.813330 1.631040
    +v 0.360244 1.813330 1.732710
    +v 0.375664 1.621870 1.806880
    +v 0.375664 1.621870 1.806880
    +v 0.723672 1.621870 1.700860
    +v 0.693966 1.813330 1.631040
    +v 0.360244 1.813330 1.732710
    +v 0.000000 1.813330 1.768070
    +v 0.000000 1.621870 1.843750
    +v 0.000000 1.621870 1.843750
    +v 0.375664 1.621870 1.806880
    +v 0.360244 1.813330 1.732710
    +v 1.843750 1.621870 0.000000
    +v 1.806880 1.621870 0.375664
    +v 1.869560 1.433940 0.388697
    +v 1.869560 1.433940 0.388697
    +v 1.907710 1.433940 0.000000
    +v 1.843750 1.621870 0.000000
    +v 1.806880 1.621870 0.375664
    +v 1.700860 1.621870 0.723672
    +v 1.759870 1.433940 0.748778
    +v 1.759870 1.433940 0.748778
    +v 1.869560 1.433940 0.388697
    +v 1.806880 1.621870 0.375664
    +v 1.700860 1.621870 0.723672
    +v 1.532620 1.621870 1.037110
    +v 1.585790 1.433940 1.073090
    +v 1.585790 1.433940 1.073090
    +v 1.759870 1.433940 0.748778
    +v 1.700860 1.621870 0.723672
    +v 1.532620 1.621870 1.037110
    +v 1.309060 1.621870 1.309060
    +v 1.354480 1.433940 1.354480
    +v 1.354480 1.433940 1.354480
    +v 1.585790 1.433940 1.073090
    +v 1.532620 1.621870 1.037110
    +v 1.309060 1.621870 1.309060
    +v 1.037110 1.621870 1.532620
    +v 1.073090 1.433940 1.585790
    +v 1.073090 1.433940 1.585790
    +v 1.354480 1.433940 1.354480
    +v 1.309060 1.621870 1.309060
    +v 1.037110 1.621870 1.532620
    +v 0.723672 1.621870 1.700860
    +v 0.748778 1.433940 1.759870
    +v 0.748778 1.433940 1.759870
    +v 1.073090 1.433940 1.585790
    +v 1.037110 1.621870 1.532620
    +v 0.723672 1.621870 1.700860
    +v 0.375664 1.621870 1.806880
    +v 0.388697 1.433940 1.869560
    +v 0.388697 1.433940 1.869560
    +v 0.748778 1.433940 1.759870
    +v 0.723672 1.621870 1.700860
    +v 0.375664 1.621870 1.806880
    +v 0.000000 1.621870 1.843750
    +v -0.000000 1.433940 1.907710
    +v -0.000000 1.433940 1.907710
    +v 0.388697 1.433940 1.869560
    +v 0.375664 1.621870 1.806880
    +v 1.907710 1.433940 0.000000
    +v 1.869560 1.433940 0.388697
    +v 1.917890 1.250390 0.398745
    +v 1.917890 1.250390 0.398745
    +v 1.957030 1.250390 0.000000
    +v 1.907710 1.433940 0.000000
    +v 1.869560 1.433940 0.388697
    +v 1.759870 1.433940 0.748778
    +v 1.805360 1.250390 0.768135
    +v 1.805360 1.250390 0.768135
    +v 1.917890 1.250390 0.398745
    +v 1.869560 1.433940 0.388697
    +v 1.759870 1.433940 0.748778
    +v 1.585790 1.433940 1.073090
    +v 1.626780 1.250390 1.100830
    +v 1.626780 1.250390 1.100830
    +v 1.805360 1.250390 0.768135
    +v 1.759870 1.433940 0.748778
    +v 1.585790 1.433940 1.073090
    +v 1.354480 1.433940 1.354480
    +v 1.389490 1.250390 1.389490
    +v 1.389490 1.250390 1.389490
    +v 1.626780 1.250390 1.100830
    +v 1.585790 1.433940 1.073090
    +v 1.354480 1.433940 1.354480
    +v 1.073090 1.433940 1.585790
    +v 1.100830 1.250390 1.626780
    +v 1.100830 1.250390 1.626780
    +v 1.389490 1.250390 1.389490
    +v 1.354480 1.433940 1.354480
    +v 1.073090 1.433940 1.585790
    +v 0.748778 1.433940 1.759870
    +v 0.768135 1.250390 1.805360
    +v 0.768135 1.250390 1.805360
    +v 1.100830 1.250390 1.626780
    +v 1.073090 1.433940 1.585790
    +v 0.748778 1.433940 1.759870
    +v 0.388697 1.433940 1.869560
    +v 0.398745 1.250390 1.917890
    +v 0.398745 1.250390 1.917890
    +v 0.768135 1.250390 1.805360
    +v 0.748778 1.433940 1.759870
    +v 0.388697 1.433940 1.869560
    +v -0.000000 1.433940 1.907710
    +v 0.000000 1.250390 1.957030
    +v 0.000000 1.250390 1.957030
    +v 0.398745 1.250390 1.917890
    +v 0.388697 1.433940 1.869560
    +v 1.957030 1.250390 0.000000
    +v 1.917890 1.250390 0.398745
    +v 1.948990 1.072120 0.405212
    +v 1.948990 1.072120 0.405212
    +v 1.988770 1.072120 0.000000
    +v 1.957030 1.250390 0.000000
    +v 1.917890 1.250390 0.398745
    +v 1.805360 1.250390 0.768135
    +v 1.834640 1.072120 0.780592
    +v 1.834640 1.072120 0.780592
    +v 1.948990 1.072120 0.405212
    +v 1.917890 1.250390 0.398745
    +v 1.805360 1.250390 0.768135
    +v 1.626780 1.250390 1.100830
    +v 1.653160 1.072120 1.118680
    +v 1.653160 1.072120 1.118680
    +v 1.834640 1.072120 0.780592
    +v 1.805360 1.250390 0.768135
    +v 1.626780 1.250390 1.100830
    +v 1.389490 1.250390 1.389490
    +v 1.412030 1.072120 1.412030
    +v 1.412030 1.072120 1.412030
    +v 1.653160 1.072120 1.118680
    +v 1.626780 1.250390 1.100830
    +v 1.389490 1.250390 1.389490
    +v 1.100830 1.250390 1.626780
    +v 1.118680 1.072120 1.653160
    +v 1.118680 1.072120 1.653160
    +v 1.412030 1.072120 1.412030
    +v 1.389490 1.250390 1.389490
    +v 1.100830 1.250390 1.626780
    +v 0.768135 1.250390 1.805360
    +v 0.780592 1.072120 1.834640
    +v 0.780592 1.072120 1.834640
    +v 1.118680 1.072120 1.653160
    +v 1.100830 1.250390 1.626780
    +v 0.768135 1.250390 1.805360
    +v 0.398745 1.250390 1.917890
    +v 0.405212 1.072120 1.948990
    +v 0.405212 1.072120 1.948990
    +v 0.780592 1.072120 1.834640
    +v 0.768135 1.250390 1.805360
    +v 0.398745 1.250390 1.917890
    +v 0.000000 1.250390 1.957030
    +v 0.000000 1.072120 1.988770
    +v 0.000000 1.072120 1.988770
    +v 0.405212 1.072120 1.948990
    +v 0.398745 1.250390 1.917890
    +v 1.988770 1.072120 0.000000
    +v 1.948990 1.072120 0.405212
    +v 1.960000 0.900000 0.407500
    +v 1.960000 0.900000 0.407500
    +v 2.000000 0.900000 0.000000
    +v 1.988770 1.072120 0.000000
    +v 1.948990 1.072120 0.405212
    +v 1.834640 1.072120 0.780592
    +v 1.845000 0.900000 0.785000
    +v 1.845000 0.900000 0.785000
    +v 1.960000 0.900000 0.407500
    +v 1.948990 1.072120 0.405212
    +v 1.834640 1.072120 0.780592
    +v 1.653160 1.072120 1.118680
    +v 1.662500 0.900000 1.125000
    +v 1.662500 0.900000 1.125000
    +v 1.845000 0.900000 0.785000
    +v 1.834640 1.072120 0.780592
    +v 1.653160 1.072120 1.118680
    +v 1.412030 1.072120 1.412030
    +v 1.420000 0.900000 1.420000
    +v 1.420000 0.900000 1.420000
    +v 1.662500 0.900000 1.125000
    +v 1.653160 1.072120 1.118680
    +v 1.412030 1.072120 1.412030
    +v 1.118680 1.072120 1.653160
    +v 1.125000 0.900000 1.662500
    +v 1.125000 0.900000 1.662500
    +v 1.420000 0.900000 1.420000
    +v 1.412030 1.072120 1.412030
    +v 1.118680 1.072120 1.653160
    +v 0.780592 1.072120 1.834640
    +v 0.785000 0.900000 1.845000
    +v 0.785000 0.900000 1.845000
    +v 1.125000 0.900000 1.662500
    +v 1.118680 1.072120 1.653160
    +v 0.780592 1.072120 1.834640
    +v 0.405212 1.072120 1.948990
    +v 0.407500 0.900000 1.960000
    +v 0.407500 0.900000 1.960000
    +v 0.785000 0.900000 1.845000
    +v 0.780592 1.072120 1.834640
    +v 0.405212 1.072120 1.948990
    +v 0.000000 1.072120 1.988770
    +v 0.000000 0.900000 2.000000
    +v 0.000000 0.900000 2.000000
    +v 0.407500 0.900000 1.960000
    +v 0.405212 1.072120 1.948990
    +v 0.000000 2.400000 1.500000
    +v -0.305625 2.400000 1.470000
    +v -0.324627 2.203270 1.561400
    +v -0.324627 2.203270 1.561400
    +v 0.000000 2.203270 1.593260
    +v 0.000000 2.400000 1.500000
    +v -0.305625 2.400000 1.470000
    +v -0.588750 2.400000 1.383750
    +v -0.625355 2.203270 1.469780
    +v -0.625355 2.203270 1.469780
    +v -0.324627 2.203270 1.561400
    +v -0.305625 2.400000 1.470000
    +v -0.588750 2.400000 1.383750
    +v -0.843750 2.400000 1.246870
    +v -0.896210 2.203270 1.324400
    +v -0.896210 2.203270 1.324400
    +v -0.625355 2.203270 1.469780
    +v -0.588750 2.400000 1.383750
    +v -0.843750 2.400000 1.246870
    +v -1.065000 2.400000 1.065000
    +v -1.131220 2.203270 1.131220
    +v -1.131220 2.203270 1.131220
    +v -0.896210 2.203270 1.324400
    +v -0.843750 2.400000 1.246870
    +v -1.065000 2.400000 1.065000
    +v -1.246870 2.400000 0.843750
    +v -1.324400 2.203270 0.896210
    +v -1.324400 2.203270 0.896210
    +v -1.131220 2.203270 1.131220
    +v -1.065000 2.400000 1.065000
    +v -1.246870 2.400000 0.843750
    +v -1.383750 2.400000 0.588750
    +v -1.469780 2.203270 0.625355
    +v -1.469780 2.203270 0.625355
    +v -1.324400 2.203270 0.896210
    +v -1.246870 2.400000 0.843750
    +v -1.383750 2.400000 0.588750
    +v -1.470000 2.400000 0.305625
    +v -1.561400 2.203270 0.324627
    +v -1.561400 2.203270 0.324627
    +v -1.469780 2.203270 0.625355
    +v -1.383750 2.400000 0.588750
    +v -1.470000 2.400000 0.305625
    +v -1.500000 2.400000 0.000000
    +v -1.593260 2.203270 0.000000
    +v -1.593260 2.203270 0.000000
    +v -1.561400 2.203270 0.324627
    +v -1.470000 2.400000 0.305625
    +v 0.000000 2.203270 1.593260
    +v -0.324627 2.203270 1.561400
    +v -0.343032 2.007420 1.649920
    +v -0.343032 2.007420 1.649920
    +v 0.000000 2.007420 1.683590
    +v 0.000000 2.203270 1.593260
    +v -0.324627 2.203270 1.561400
    +v -0.625355 2.203270 1.469780
    +v -0.660811 2.007420 1.553120
    +v -0.660811 2.007420 1.553120
    +v -0.343032 2.007420 1.649920
    +v -0.324627 2.203270 1.561400
    +v -0.625355 2.203270 1.469780
    +v -0.896210 2.203270 1.324400
    +v -0.947021 2.007420 1.399490
    +v -0.947021 2.007420 1.399490
    +v -0.660811 2.007420 1.553120
    +v -0.625355 2.203270 1.469780
    +v -0.896210 2.203270 1.324400
    +v -1.131220 2.203270 1.131220
    +v -1.195350 2.007420 1.195350
    +v -1.195350 2.007420 1.195350
    +v -0.947021 2.007420 1.399490
    +v -0.896210 2.203270 1.324400
    +v -1.131220 2.203270 1.131220
    +v -1.324400 2.203270 0.896210
    +v -1.399490 2.007420 0.947021
    +v -1.399490 2.007420 0.947021
    +v -1.195350 2.007420 1.195350
    +v -1.131220 2.203270 1.131220
    +v -1.324400 2.203270 0.896210
    +v -1.469780 2.203270 0.625355
    +v -1.553120 2.007420 0.660811
    +v -1.553120 2.007420 0.660811
    +v -1.399490 2.007420 0.947021
    +v -1.324400 2.203270 0.896210
    +v -1.469780 2.203270 0.625355
    +v -1.561400 2.203270 0.324627
    +v -1.649920 2.007420 0.343032
    +v -1.649920 2.007420 0.343032
    +v -1.553120 2.007420 0.660811
    +v -1.469780 2.203270 0.625355
    +v -1.561400 2.203270 0.324627
    +v -1.593260 2.203270 0.000000
    +v -1.683590 2.007420 0.000000
    +v -1.683590 2.007420 0.000000
    +v -1.649920 2.007420 0.343032
    +v -1.561400 2.203270 0.324627
    +v 0.000000 2.007420 1.683590
    +v -0.343032 2.007420 1.649920
    +v -0.360244 1.813330 1.732710
    +v -0.360244 1.813330 1.732710
    +v 0.000000 1.813330 1.768070
    +v 0.000000 2.007420 1.683590
    +v -0.343032 2.007420 1.649920
    +v -0.660811 2.007420 1.553120
    +v -0.693966 1.813330 1.631040
    +v -0.693966 1.813330 1.631040
    +v -0.360244 1.813330 1.732710
    +v -0.343032 2.007420 1.649920
    +v -0.660811 2.007420 1.553120
    +v -0.947021 2.007420 1.399490
    +v -0.994537 1.813330 1.469710
    +v -0.994537 1.813330 1.469710
    +v -0.693966 1.813330 1.631040
    +v -0.660811 2.007420 1.553120
    +v -0.947021 2.007420 1.399490
    +v -1.195350 2.007420 1.195350
    +v -1.255330 1.813330 1.255330
    +v -1.255330 1.813330 1.255330
    +v -0.994537 1.813330 1.469710
    +v -0.947021 2.007420 1.399490
    +v -1.195350 2.007420 1.195350
    +v -1.399490 2.007420 0.947021
    +v -1.469710 1.813330 0.994537
    +v -1.469710 1.813330 0.994537
    +v -1.255330 1.813330 1.255330
    +v -1.195350 2.007420 1.195350
    +v -1.399490 2.007420 0.947021
    +v -1.553120 2.007420 0.660811
    +v -1.631040 1.813330 0.693966
    +v -1.631040 1.813330 0.693966
    +v -1.469710 1.813330 0.994537
    +v -1.399490 2.007420 0.947021
    +v -1.553120 2.007420 0.660811
    +v -1.649920 2.007420 0.343032
    +v -1.732710 1.813330 0.360244
    +v -1.732710 1.813330 0.360244
    +v -1.631040 1.813330 0.693966
    +v -1.553120 2.007420 0.660811
    +v -1.649920 2.007420 0.343032
    +v -1.683590 2.007420 0.000000
    +v -1.768070 1.813330 0.000000
    +v -1.768070 1.813330 0.000000
    +v -1.732710 1.813330 0.360244
    +v -1.649920 2.007420 0.343032
    +v 0.000000 1.813330 1.768070
    +v -0.360244 1.813330 1.732710
    +v -0.375664 1.621870 1.806880
    +v -0.375664 1.621870 1.806880
    +v 0.000000 1.621870 1.843750
    +v 0.000000 1.813330 1.768070
    +v -0.360244 1.813330 1.732710
    +v -0.693966 1.813330 1.631040
    +v -0.723672 1.621870 1.700860
    +v -0.723672 1.621870 1.700860
    +v -0.375664 1.621870 1.806880
    +v -0.360244 1.813330 1.732710
    +v -0.693966 1.813330 1.631040
    +v -0.994537 1.813330 1.469710
    +v -1.037110 1.621870 1.532620
    +v -1.037110 1.621870 1.532620
    +v -0.723672 1.621870 1.700860
    +v -0.693966 1.813330 1.631040
    +v -0.994537 1.813330 1.469710
    +v -1.255330 1.813330 1.255330
    +v -1.309060 1.621870 1.309060
    +v -1.309060 1.621870 1.309060
    +v -1.037110 1.621870 1.532620
    +v -0.994537 1.813330 1.469710
    +v -1.255330 1.813330 1.255330
    +v -1.469710 1.813330 0.994537
    +v -1.532620 1.621870 1.037110
    +v -1.532620 1.621870 1.037110
    +v -1.309060 1.621870 1.309060
    +v -1.255330 1.813330 1.255330
    +v -1.469710 1.813330 0.994537
    +v -1.631040 1.813330 0.693966
    +v -1.700860 1.621870 0.723672
    +v -1.700860 1.621870 0.723672
    +v -1.532620 1.621870 1.037110
    +v -1.469710 1.813330 0.994537
    +v -1.631040 1.813330 0.693966
    +v -1.732710 1.813330 0.360244
    +v -1.806880 1.621870 0.375664
    +v -1.806880 1.621870 0.375664
    +v -1.700860 1.621870 0.723672
    +v -1.631040 1.813330 0.693966
    +v -1.732710 1.813330 0.360244
    +v -1.768070 1.813330 0.000000
    +v -1.843750 1.621870 0.000000
    +v -1.843750 1.621870 0.000000
    +v -1.806880 1.621870 0.375664
    +v -1.732710 1.813330 0.360244
    +v 0.000000 1.621870 1.843750
    +v -0.375664 1.621870 1.806880
    +v -0.388697 1.433940 1.869560
    +v -0.388697 1.433940 1.869560
    +v 0.000000 1.433940 1.907710
    +v 0.000000 1.621870 1.843750
    +v -0.375664 1.621870 1.806880
    +v -0.723672 1.621870 1.700860
    +v -0.748778 1.433940 1.759870
    +v -0.748778 1.433940 1.759870
    +v -0.388697 1.433940 1.869560
    +v -0.375664 1.621870 1.806880
    +v -0.723672 1.621870 1.700860
    +v -1.037110 1.621870 1.532620
    +v -1.073090 1.433940 1.585790
    +v -1.073090 1.433940 1.585790
    +v -0.748778 1.433940 1.759870
    +v -0.723672 1.621870 1.700860
    +v -1.037110 1.621870 1.532620
    +v -1.309060 1.621870 1.309060
    +v -1.354480 1.433940 1.354480
    +v -1.354480 1.433940 1.354480
    +v -1.073090 1.433940 1.585790
    +v -1.037110 1.621870 1.532620
    +v -1.309060 1.621870 1.309060
    +v -1.532620 1.621870 1.037110
    +v -1.585790 1.433940 1.073090
    +v -1.585790 1.433940 1.073090
    +v -1.354480 1.433940 1.354480
    +v -1.309060 1.621870 1.309060
    +v -1.532620 1.621870 1.037110
    +v -1.700860 1.621870 0.723672
    +v -1.759870 1.433940 0.748778
    +v -1.759870 1.433940 0.748778
    +v -1.585790 1.433940 1.073090
    +v -1.532620 1.621870 1.037110
    +v -1.700860 1.621870 0.723672
    +v -1.806880 1.621870 0.375664
    +v -1.869560 1.433940 0.388697
    +v -1.869560 1.433940 0.388697
    +v -1.759870 1.433940 0.748778
    +v -1.700860 1.621870 0.723672
    +v -1.806880 1.621870 0.375664
    +v -1.843750 1.621870 0.000000
    +v -1.907710 1.433940 0.000000
    +v -1.907710 1.433940 0.000000
    +v -1.869560 1.433940 0.388697
    +v -1.806880 1.621870 0.375664
    +v 0.000000 1.433940 1.907710
    +v -0.388697 1.433940 1.869560
    +v -0.398745 1.250390 1.917890
    +v -0.398745 1.250390 1.917890
    +v 0.000000 1.250390 1.957030
    +v 0.000000 1.433940 1.907710
    +v -0.388697 1.433940 1.869560
    +v -0.748778 1.433940 1.759870
    +v -0.768135 1.250390 1.805360
    +v -0.768135 1.250390 1.805360
    +v -0.398745 1.250390 1.917890
    +v -0.388697 1.433940 1.869560
    +v -0.748778 1.433940 1.759870
    +v -1.073090 1.433940 1.585790
    +v -1.100830 1.250390 1.626780
    +v -1.100830 1.250390 1.626780
    +v -0.768135 1.250390 1.805360
    +v -0.748778 1.433940 1.759870
    +v -1.073090 1.433940 1.585790
    +v -1.354480 1.433940 1.354480
    +v -1.389490 1.250390 1.389490
    +v -1.389490 1.250390 1.389490
    +v -1.100830 1.250390 1.626780
    +v -1.073090 1.433940 1.585790
    +v -1.354480 1.433940 1.354480
    +v -1.585790 1.433940 1.073090
    +v -1.626780 1.250390 1.100830
    +v -1.626780 1.250390 1.100830
    +v -1.389490 1.250390 1.389490
    +v -1.354480 1.433940 1.354480
    +v -1.585790 1.433940 1.073090
    +v -1.759870 1.433940 0.748778
    +v -1.805360 1.250390 0.768135
    +v -1.805360 1.250390 0.768135
    +v -1.626780 1.250390 1.100830
    +v -1.585790 1.433940 1.073090
    +v -1.759870 1.433940 0.748778
    +v -1.869560 1.433940 0.388697
    +v -1.917890 1.250390 0.398745
    +v -1.917890 1.250390 0.398745
    +v -1.805360 1.250390 0.768135
    +v -1.759870 1.433940 0.748778
    +v -1.869560 1.433940 0.388697
    +v -1.907710 1.433940 0.000000
    +v -1.957030 1.250390 0.000000
    +v -1.957030 1.250390 0.000000
    +v -1.917890 1.250390 0.398745
    +v -1.869560 1.433940 0.388697
    +v 0.000000 1.250390 1.957030
    +v -0.398745 1.250390 1.917890
    +v -0.405212 1.072120 1.948990
    +v -0.405212 1.072120 1.948990
    +v 0.000000 1.072120 1.988770
    +v 0.000000 1.250390 1.957030
    +v -0.398745 1.250390 1.917890
    +v -0.768135 1.250390 1.805360
    +v -0.780592 1.072120 1.834640
    +v -0.780592 1.072120 1.834640
    +v -0.405212 1.072120 1.948990
    +v -0.398745 1.250390 1.917890
    +v -0.768135 1.250390 1.805360
    +v -1.100830 1.250390 1.626780
    +v -1.118680 1.072120 1.653160
    +v -1.118680 1.072120 1.653160
    +v -0.780592 1.072120 1.834640
    +v -0.768135 1.250390 1.805360
    +v -1.100830 1.250390 1.626780
    +v -1.389490 1.250390 1.389490
    +v -1.412030 1.072120 1.412030
    +v -1.412030 1.072120 1.412030
    +v -1.118680 1.072120 1.653160
    +v -1.100830 1.250390 1.626780
    +v -1.389490 1.250390 1.389490
    +v -1.626780 1.250390 1.100830
    +v -1.653160 1.072120 1.118680
    +v -1.653160 1.072120 1.118680
    +v -1.412030 1.072120 1.412030
    +v -1.389490 1.250390 1.389490
    +v -1.626780 1.250390 1.100830
    +v -1.805360 1.250390 0.768135
    +v -1.834640 1.072120 0.780592
    +v -1.834640 1.072120 0.780592
    +v -1.653160 1.072120 1.118680
    +v -1.626780 1.250390 1.100830
    +v -1.805360 1.250390 0.768135
    +v -1.917890 1.250390 0.398745
    +v -1.948990 1.072120 0.405212
    +v -1.948990 1.072120 0.405212
    +v -1.834640 1.072120 0.780592
    +v -1.805360 1.250390 0.768135
    +v -1.917890 1.250390 0.398745
    +v -1.957030 1.250390 0.000000
    +v -1.988770 1.072120 0.000000
    +v -1.988770 1.072120 0.000000
    +v -1.948990 1.072120 0.405212
    +v -1.917890 1.250390 0.398745
    +v 0.000000 1.072120 1.988770
    +v -0.405212 1.072120 1.948990
    +v -0.407500 0.900000 1.960000
    +v -0.407500 0.900000 1.960000
    +v 0.000000 0.900000 2.000000
    +v 0.000000 1.072120 1.988770
    +v -0.405212 1.072120 1.948990
    +v -0.780592 1.072120 1.834640
    +v -0.785000 0.900000 1.845000
    +v -0.785000 0.900000 1.845000
    +v -0.407500 0.900000 1.960000
    +v -0.405212 1.072120 1.948990
    +v -0.780592 1.072120 1.834640
    +v -1.118680 1.072120 1.653160
    +v -1.125000 0.900000 1.662500
    +v -1.125000 0.900000 1.662500
    +v -0.785000 0.900000 1.845000
    +v -0.780592 1.072120 1.834640
    +v -1.118680 1.072120 1.653160
    +v -1.412030 1.072120 1.412030
    +v -1.420000 0.900000 1.420000
    +v -1.420000 0.900000 1.420000
    +v -1.125000 0.900000 1.662500
    +v -1.118680 1.072120 1.653160
    +v -1.412030 1.072120 1.412030
    +v -1.653160 1.072120 1.118680
    +v -1.662500 0.900000 1.125000
    +v -1.662500 0.900000 1.125000
    +v -1.420000 0.900000 1.420000
    +v -1.412030 1.072120 1.412030
    +v -1.653160 1.072120 1.118680
    +v -1.834640 1.072120 0.780592
    +v -1.845000 0.900000 0.785000
    +v -1.845000 0.900000 0.785000
    +v -1.662500 0.900000 1.125000
    +v -1.653160 1.072120 1.118680
    +v -1.834640 1.072120 0.780592
    +v -1.948990 1.072120 0.405212
    +v -1.960000 0.900000 0.407500
    +v -1.960000 0.900000 0.407500
    +v -1.845000 0.900000 0.785000
    +v -1.834640 1.072120 0.780592
    +v -1.948990 1.072120 0.405212
    +v -1.988770 1.072120 0.000000
    +v -2.000000 0.900000 0.000000
    +v -2.000000 0.900000 0.000000
    +v -1.960000 0.900000 0.407500
    +v -1.948990 1.072120 0.405212
    +v -1.500000 2.400000 0.000000
    +v -1.470000 2.400000 -0.305625
    +v -1.561400 2.203270 -0.324627
    +v -1.561400 2.203270 -0.324627
    +v -1.593260 2.203270 0.000000
    +v -1.500000 2.400000 0.000000
    +v -1.470000 2.400000 -0.305625
    +v -1.383750 2.400000 -0.588750
    +v -1.469780 2.203270 -0.625355
    +v -1.469780 2.203270 -0.625355
    +v -1.561400 2.203270 -0.324627
    +v -1.470000 2.400000 -0.305625
    +v -1.383750 2.400000 -0.588750
    +v -1.246870 2.400000 -0.843750
    +v -1.324400 2.203270 -0.896210
    +v -1.324400 2.203270 -0.896210
    +v -1.469780 2.203270 -0.625355
    +v -1.383750 2.400000 -0.588750
    +v -1.246870 2.400000 -0.843750
    +v -1.065000 2.400000 -1.065000
    +v -1.131220 2.203270 -1.131220
    +v -1.131220 2.203270 -1.131220
    +v -1.324400 2.203270 -0.896210
    +v -1.246870 2.400000 -0.843750
    +v -1.065000 2.400000 -1.065000
    +v -0.843750 2.400000 -1.246870
    +v -0.896210 2.203270 -1.324400
    +v -0.896210 2.203270 -1.324400
    +v -1.131220 2.203270 -1.131220
    +v -1.065000 2.400000 -1.065000
    +v -0.843750 2.400000 -1.246870
    +v -0.588750 2.400000 -1.383750
    +v -0.625355 2.203270 -1.469780
    +v -0.625355 2.203270 -1.469780
    +v -0.896210 2.203270 -1.324400
    +v -0.843750 2.400000 -1.246870
    +v -0.588750 2.400000 -1.383750
    +v -0.305625 2.400000 -1.470000
    +v -0.324627 2.203270 -1.561400
    +v -0.324627 2.203270 -1.561400
    +v -0.625355 2.203270 -1.469780
    +v -0.588750 2.400000 -1.383750
    +v -0.305625 2.400000 -1.470000
    +v -0.000000 2.400000 -1.500000
    +v -0.000000 2.203270 -1.593260
    +v -0.000000 2.203270 -1.593260
    +v -0.324627 2.203270 -1.561400
    +v -0.305625 2.400000 -1.470000
    +v -1.593260 2.203270 0.000000
    +v -1.561400 2.203270 -0.324627
    +v -1.649920 2.007420 -0.343032
    +v -1.649920 2.007420 -0.343032
    +v -1.683590 2.007420 0.000000
    +v -1.593260 2.203270 0.000000
    +v -1.561400 2.203270 -0.324627
    +v -1.469780 2.203270 -0.625355
    +v -1.553120 2.007420 -0.660811
    +v -1.553120 2.007420 -0.660811
    +v -1.649920 2.007420 -0.343032
    +v -1.561400 2.203270 -0.324627
    +v -1.469780 2.203270 -0.625355
    +v -1.324400 2.203270 -0.896210
    +v -1.399490 2.007420 -0.947021
    +v -1.399490 2.007420 -0.947021
    +v -1.553120 2.007420 -0.660811
    +v -1.469780 2.203270 -0.625355
    +v -1.324400 2.203270 -0.896210
    +v -1.131220 2.203270 -1.131220
    +v -1.195350 2.007420 -1.195350
    +v -1.195350 2.007420 -1.195350
    +v -1.399490 2.007420 -0.947021
    +v -1.324400 2.203270 -0.896210
    +v -1.131220 2.203270 -1.131220
    +v -0.896210 2.203270 -1.324400
    +v -0.947021 2.007420 -1.399490
    +v -0.947021 2.007420 -1.399490
    +v -1.195350 2.007420 -1.195350
    +v -1.131220 2.203270 -1.131220
    +v -0.896210 2.203270 -1.324400
    +v -0.625355 2.203270 -1.469780
    +v -0.660811 2.007420 -1.553120
    +v -0.660811 2.007420 -1.553120
    +v -0.947021 2.007420 -1.399490
    +v -0.896210 2.203270 -1.324400
    +v -0.625355 2.203270 -1.469780
    +v -0.324627 2.203270 -1.561400
    +v -0.343032 2.007420 -1.649920
    +v -0.343032 2.007420 -1.649920
    +v -0.660811 2.007420 -1.553120
    +v -0.625355 2.203270 -1.469780
    +v -0.324627 2.203270 -1.561400
    +v -0.000000 2.203270 -1.593260
    +v -0.000000 2.007420 -1.683590
    +v -0.000000 2.007420 -1.683590
    +v -0.343032 2.007420 -1.649920
    +v -0.324627 2.203270 -1.561400
    +v -1.683590 2.007420 0.000000
    +v -1.649920 2.007420 -0.343032
    +v -1.732710 1.813330 -0.360244
    +v -1.732710 1.813330 -0.360244
    +v -1.768070 1.813330 0.000000
    +v -1.683590 2.007420 0.000000
    +v -1.649920 2.007420 -0.343032
    +v -1.553120 2.007420 -0.660811
    +v -1.631040 1.813330 -0.693966
    +v -1.631040 1.813330 -0.693966
    +v -1.732710 1.813330 -0.360244
    +v -1.649920 2.007420 -0.343032
    +v -1.553120 2.007420 -0.660811
    +v -1.399490 2.007420 -0.947021
    +v -1.469710 1.813330 -0.994537
    +v -1.469710 1.813330 -0.994537
    +v -1.631040 1.813330 -0.693966
    +v -1.553120 2.007420 -0.660811
    +v -1.399490 2.007420 -0.947021
    +v -1.195350 2.007420 -1.195350
    +v -1.255330 1.813330 -1.255330
    +v -1.255330 1.813330 -1.255330
    +v -1.469710 1.813330 -0.994537
    +v -1.399490 2.007420 -0.947021
    +v -1.195350 2.007420 -1.195350
    +v -0.947021 2.007420 -1.399490
    +v -0.994537 1.813330 -1.469710
    +v -0.994537 1.813330 -1.469710
    +v -1.255330 1.813330 -1.255330
    +v -1.195350 2.007420 -1.195350
    +v -0.947021 2.007420 -1.399490
    +v -0.660811 2.007420 -1.553120
    +v -0.693966 1.813330 -1.631040
    +v -0.693966 1.813330 -1.631040
    +v -0.994537 1.813330 -1.469710
    +v -0.947021 2.007420 -1.399490
    +v -0.660811 2.007420 -1.553120
    +v -0.343032 2.007420 -1.649920
    +v -0.360244 1.813330 -1.732710
    +v -0.360244 1.813330 -1.732710
    +v -0.693966 1.813330 -1.631040
    +v -0.660811 2.007420 -1.553120
    +v -0.343032 2.007420 -1.649920
    +v -0.000000 2.007420 -1.683590
    +v -0.000000 1.813330 -1.768070
    +v -0.000000 1.813330 -1.768070
    +v -0.360244 1.813330 -1.732710
    +v -0.343032 2.007420 -1.649920
    +v -1.768070 1.813330 0.000000
    +v -1.732710 1.813330 -0.360244
    +v -1.806880 1.621870 -0.375664
    +v -1.806880 1.621870 -0.375664
    +v -1.843750 1.621870 0.000000
    +v -1.768070 1.813330 0.000000
    +v -1.732710 1.813330 -0.360244
    +v -1.631040 1.813330 -0.693966
    +v -1.700860 1.621870 -0.723672
    +v -1.700860 1.621870 -0.723672
    +v -1.806880 1.621870 -0.375664
    +v -1.732710 1.813330 -0.360244
    +v -1.631040 1.813330 -0.693966
    +v -1.469710 1.813330 -0.994537
    +v -1.532620 1.621870 -1.037110
    +v -1.532620 1.621870 -1.037110
    +v -1.700860 1.621870 -0.723672
    +v -1.631040 1.813330 -0.693966
    +v -1.469710 1.813330 -0.994537
    +v -1.255330 1.813330 -1.255330
    +v -1.309060 1.621870 -1.309060
    +v -1.309060 1.621870 -1.309060
    +v -1.532620 1.621870 -1.037110
    +v -1.469710 1.813330 -0.994537
    +v -1.255330 1.813330 -1.255330
    +v -0.994537 1.813330 -1.469710
    +v -1.037110 1.621870 -1.532620
    +v -1.037110 1.621870 -1.532620
    +v -1.309060 1.621870 -1.309060
    +v -1.255330 1.813330 -1.255330
    +v -0.994537 1.813330 -1.469710
    +v -0.693966 1.813330 -1.631040
    +v -0.723672 1.621870 -1.700860
    +v -0.723672 1.621870 -1.700860
    +v -1.037110 1.621870 -1.532620
    +v -0.994537 1.813330 -1.469710
    +v -0.693966 1.813330 -1.631040
    +v -0.360244 1.813330 -1.732710
    +v -0.375664 1.621870 -1.806880
    +v -0.375664 1.621870 -1.806880
    +v -0.723672 1.621870 -1.700860
    +v -0.693966 1.813330 -1.631040
    +v -0.360244 1.813330 -1.732710
    +v -0.000000 1.813330 -1.768070
    +v 0.000000 1.621870 -1.843750
    +v 0.000000 1.621870 -1.843750
    +v -0.375664 1.621870 -1.806880
    +v -0.360244 1.813330 -1.732710
    +v -1.843750 1.621870 0.000000
    +v -1.806880 1.621870 -0.375664
    +v -1.869560 1.433940 -0.388697
    +v -1.869560 1.433940 -0.388697
    +v -1.907710 1.433940 0.000000
    +v -1.843750 1.621870 0.000000
    +v -1.806880 1.621870 -0.375664
    +v -1.700860 1.621870 -0.723672
    +v -1.759870 1.433940 -0.748778
    +v -1.759870 1.433940 -0.748778
    +v -1.869560 1.433940 -0.388697
    +v -1.806880 1.621870 -0.375664
    +v -1.700860 1.621870 -0.723672
    +v -1.532620 1.621870 -1.037110
    +v -1.585790 1.433940 -1.073090
    +v -1.585790 1.433940 -1.073090
    +v -1.759870 1.433940 -0.748778
    +v -1.700860 1.621870 -0.723672
    +v -1.532620 1.621870 -1.037110
    +v -1.309060 1.621870 -1.309060
    +v -1.354480 1.433940 -1.354480
    +v -1.354480 1.433940 -1.354480
    +v -1.585790 1.433940 -1.073090
    +v -1.532620 1.621870 -1.037110
    +v -1.309060 1.621870 -1.309060
    +v -1.037110 1.621870 -1.532620
    +v -1.073090 1.433940 -1.585790
    +v -1.073090 1.433940 -1.585790
    +v -1.354480 1.433940 -1.354480
    +v -1.309060 1.621870 -1.309060
    +v -1.037110 1.621870 -1.532620
    +v -0.723672 1.621870 -1.700860
    +v -0.748778 1.433940 -1.759870
    +v -0.748778 1.433940 -1.759870
    +v -1.073090 1.433940 -1.585790
    +v -1.037110 1.621870 -1.532620
    +v -0.723672 1.621870 -1.700860
    +v -0.375664 1.621870 -1.806880
    +v -0.388697 1.433940 -1.869560
    +v -0.388697 1.433940 -1.869560
    +v -0.748778 1.433940 -1.759870
    +v -0.723672 1.621870 -1.700860
    +v -0.375664 1.621870 -1.806880
    +v 0.000000 1.621870 -1.843750
    +v 0.000000 1.433940 -1.907710
    +v 0.000000 1.433940 -1.907710
    +v -0.388697 1.433940 -1.869560
    +v -0.375664 1.621870 -1.806880
    +v -1.907710 1.433940 0.000000
    +v -1.869560 1.433940 -0.388697
    +v -1.917890 1.250390 -0.398745
    +v -1.917890 1.250390 -0.398745
    +v -1.957030 1.250390 0.000000
    +v -1.907710 1.433940 0.000000
    +v -1.869560 1.433940 -0.388697
    +v -1.759870 1.433940 -0.748778
    +v -1.805360 1.250390 -0.768135
    +v -1.805360 1.250390 -0.768135
    +v -1.917890 1.250390 -0.398745
    +v -1.869560 1.433940 -0.388697
    +v -1.759870 1.433940 -0.748778
    +v -1.585790 1.433940 -1.073090
    +v -1.626780 1.250390 -1.100830
    +v -1.626780 1.250390 -1.100830
    +v -1.805360 1.250390 -0.768135
    +v -1.759870 1.433940 -0.748778
    +v -1.585790 1.433940 -1.073090
    +v -1.354480 1.433940 -1.354480
    +v -1.389490 1.250390 -1.389490
    +v -1.389490 1.250390 -1.389490
    +v -1.626780 1.250390 -1.100830
    +v -1.585790 1.433940 -1.073090
    +v -1.354480 1.433940 -1.354480
    +v -1.073090 1.433940 -1.585790
    +v -1.100830 1.250390 -1.626780
    +v -1.100830 1.250390 -1.626780
    +v -1.389490 1.250390 -1.389490
    +v -1.354480 1.433940 -1.354480
    +v -1.073090 1.433940 -1.585790
    +v -0.748778 1.433940 -1.759870
    +v -0.768135 1.250390 -1.805360
    +v -0.768135 1.250390 -1.805360
    +v -1.100830 1.250390 -1.626780
    +v -1.073090 1.433940 -1.585790
    +v -0.748778 1.433940 -1.759870
    +v -0.388697 1.433940 -1.869560
    +v -0.398745 1.250390 -1.917890
    +v -0.398745 1.250390 -1.917890
    +v -0.768135 1.250390 -1.805360
    +v -0.748778 1.433940 -1.759870
    +v -0.388697 1.433940 -1.869560
    +v 0.000000 1.433940 -1.907710
    +v 0.000000 1.250390 -1.957030
    +v 0.000000 1.250390 -1.957030
    +v -0.398745 1.250390 -1.917890
    +v -0.388697 1.433940 -1.869560
    +v -1.957030 1.250390 0.000000
    +v -1.917890 1.250390 -0.398745
    +v -1.948990 1.072120 -0.405212
    +v -1.948990 1.072120 -0.405212
    +v -1.988770 1.072120 0.000000
    +v -1.957030 1.250390 0.000000
    +v -1.917890 1.250390 -0.398745
    +v -1.805360 1.250390 -0.768135
    +v -1.834640 1.072120 -0.780592
    +v -1.834640 1.072120 -0.780592
    +v -1.948990 1.072120 -0.405212
    +v -1.917890 1.250390 -0.398745
    +v -1.805360 1.250390 -0.768135
    +v -1.626780 1.250390 -1.100830
    +v -1.653160 1.072120 -1.118680
    +v -1.653160 1.072120 -1.118680
    +v -1.834640 1.072120 -0.780592
    +v -1.805360 1.250390 -0.768135
    +v -1.626780 1.250390 -1.100830
    +v -1.389490 1.250390 -1.389490
    +v -1.412030 1.072120 -1.412030
    +v -1.412030 1.072120 -1.412030
    +v -1.653160 1.072120 -1.118680
    +v -1.626780 1.250390 -1.100830
    +v -1.389490 1.250390 -1.389490
    +v -1.100830 1.250390 -1.626780
    +v -1.118680 1.072120 -1.653160
    +v -1.118680 1.072120 -1.653160
    +v -1.412030 1.072120 -1.412030
    +v -1.389490 1.250390 -1.389490
    +v -1.100830 1.250390 -1.626780
    +v -0.768135 1.250390 -1.805360
    +v -0.780592 1.072120 -1.834640
    +v -0.780592 1.072120 -1.834640
    +v -1.118680 1.072120 -1.653160
    +v -1.100830 1.250390 -1.626780
    +v -0.768135 1.250390 -1.805360
    +v -0.398745 1.250390 -1.917890
    +v -0.405212 1.072120 -1.948990
    +v -0.405212 1.072120 -1.948990
    +v -0.780592 1.072120 -1.834640
    +v -0.768135 1.250390 -1.805360
    +v -0.398745 1.250390 -1.917890
    +v 0.000000 1.250390 -1.957030
    +v -0.000000 1.072120 -1.988770
    +v -0.000000 1.072120 -1.988770
    +v -0.405212 1.072120 -1.948990
    +v -0.398745 1.250390 -1.917890
    +v -1.988770 1.072120 0.000000
    +v -1.948990 1.072120 -0.405212
    +v -1.960000 0.900000 -0.407500
    +v -1.960000 0.900000 -0.407500
    +v -2.000000 0.900000 0.000000
    +v -1.988770 1.072120 0.000000
    +v -1.948990 1.072120 -0.405212
    +v -1.834640 1.072120 -0.780592
    +v -1.845000 0.900000 -0.785000
    +v -1.845000 0.900000 -0.785000
    +v -1.960000 0.900000 -0.407500
    +v -1.948990 1.072120 -0.405212
    +v -1.834640 1.072120 -0.780592
    +v -1.653160 1.072120 -1.118680
    +v -1.662500 0.900000 -1.125000
    +v -1.662500 0.900000 -1.125000
    +v -1.845000 0.900000 -0.785000
    +v -1.834640 1.072120 -0.780592
    +v -1.653160 1.072120 -1.118680
    +v -1.412030 1.072120 -1.412030
    +v -1.420000 0.900000 -1.420000
    +v -1.420000 0.900000 -1.420000
    +v -1.662500 0.900000 -1.125000
    +v -1.653160 1.072120 -1.118680
    +v -1.412030 1.072120 -1.412030
    +v -1.118680 1.072120 -1.653160
    +v -1.125000 0.900000 -1.662500
    +v -1.125000 0.900000 -1.662500
    +v -1.420000 0.900000 -1.420000
    +v -1.412030 1.072120 -1.412030
    +v -1.118680 1.072120 -1.653160
    +v -0.780592 1.072120 -1.834640
    +v -0.785000 0.900000 -1.845000
    +v -0.785000 0.900000 -1.845000
    +v -1.125000 0.900000 -1.662500
    +v -1.118680 1.072120 -1.653160
    +v -0.780592 1.072120 -1.834640
    +v -0.405212 1.072120 -1.948990
    +v -0.407500 0.900000 -1.960000
    +v -0.407500 0.900000 -1.960000
    +v -0.785000 0.900000 -1.845000
    +v -0.780592 1.072120 -1.834640
    +v -0.405212 1.072120 -1.948990
    +v -0.000000 1.072120 -1.988770
    +v 0.000000 0.900000 -2.000000
    +v 0.000000 0.900000 -2.000000
    +v -0.407500 0.900000 -1.960000
    +v -0.405212 1.072120 -1.948990
    +v 0.000000 2.400000 -1.500000
    +v 0.305625 2.400000 -1.470000
    +v 0.324627 2.203270 -1.561400
    +v 0.324627 2.203270 -1.561400
    +v 0.000000 2.203270 -1.593260
    +v 0.000000 2.400000 -1.500000
    +v 0.305625 2.400000 -1.470000
    +v 0.588750 2.400000 -1.383750
    +v 0.625355 2.203270 -1.469780
    +v 0.625355 2.203270 -1.469780
    +v 0.324627 2.203270 -1.561400
    +v 0.305625 2.400000 -1.470000
    +v 0.588750 2.400000 -1.383750
    +v 0.843750 2.400000 -1.246870
    +v 0.896210 2.203270 -1.324400
    +v 0.896210 2.203270 -1.324400
    +v 0.625355 2.203270 -1.469780
    +v 0.588750 2.400000 -1.383750
    +v 0.843750 2.400000 -1.246870
    +v 1.065000 2.400000 -1.065000
    +v 1.131220 2.203270 -1.131220
    +v 1.131220 2.203270 -1.131220
    +v 0.896210 2.203270 -1.324400
    +v 0.843750 2.400000 -1.246870
    +v 1.065000 2.400000 -1.065000
    +v 1.246870 2.400000 -0.843750
    +v 1.324400 2.203270 -0.896210
    +v 1.324400 2.203270 -0.896210
    +v 1.131220 2.203270 -1.131220
    +v 1.065000 2.400000 -1.065000
    +v 1.246870 2.400000 -0.843750
    +v 1.383750 2.400000 -0.588750
    +v 1.469780 2.203270 -0.625355
    +v 1.469780 2.203270 -0.625355
    +v 1.324400 2.203270 -0.896210
    +v 1.246870 2.400000 -0.843750
    +v 1.383750 2.400000 -0.588750
    +v 1.470000 2.400000 -0.305625
    +v 1.561400 2.203270 -0.324627
    +v 1.561400 2.203270 -0.324627
    +v 1.469780 2.203270 -0.625355
    +v 1.383750 2.400000 -0.588750
    +v 1.470000 2.400000 -0.305625
    +v 1.500000 2.400000 0.000000
    +v 1.593260 2.203270 0.000000
    +v 1.593260 2.203270 0.000000
    +v 1.561400 2.203270 -0.324627
    +v 1.470000 2.400000 -0.305625
    +v 0.000000 2.203270 -1.593260
    +v 0.324627 2.203270 -1.561400
    +v 0.343032 2.007420 -1.649920
    +v 0.343032 2.007420 -1.649920
    +v 0.000000 2.007420 -1.683590
    +v 0.000000 2.203270 -1.593260
    +v 0.324627 2.203270 -1.561400
    +v 0.625355 2.203270 -1.469780
    +v 0.660811 2.007420 -1.553120
    +v 0.660811 2.007420 -1.553120
    +v 0.343032 2.007420 -1.649920
    +v 0.324627 2.203270 -1.561400
    +v 0.625355 2.203270 -1.469780
    +v 0.896210 2.203270 -1.324400
    +v 0.947021 2.007420 -1.399490
    +v 0.947021 2.007420 -1.399490
    +v 0.660811 2.007420 -1.553120
    +v 0.625355 2.203270 -1.469780
    +v 0.896210 2.203270 -1.324400
    +v 1.131220 2.203270 -1.131220
    +v 1.195350 2.007420 -1.195350
    +v 1.195350 2.007420 -1.195350
    +v 0.947021 2.007420 -1.399490
    +v 0.896210 2.203270 -1.324400
    +v 1.131220 2.203270 -1.131220
    +v 1.324400 2.203270 -0.896210
    +v 1.399490 2.007420 -0.947021
    +v 1.399490 2.007420 -0.947021
    +v 1.195350 2.007420 -1.195350
    +v 1.131220 2.203270 -1.131220
    +v 1.324400 2.203270 -0.896210
    +v 1.469780 2.203270 -0.625355
    +v 1.553120 2.007420 -0.660811
    +v 1.553120 2.007420 -0.660811
    +v 1.399490 2.007420 -0.947021
    +v 1.324400 2.203270 -0.896210
    +v 1.469780 2.203270 -0.625355
    +v 1.561400 2.203270 -0.324627
    +v 1.649920 2.007420 -0.343032
    +v 1.649920 2.007420 -0.343032
    +v 1.553120 2.007420 -0.660811
    +v 1.469780 2.203270 -0.625355
    +v 1.561400 2.203270 -0.324627
    +v 1.593260 2.203270 0.000000
    +v 1.683590 2.007420 0.000000
    +v 1.683590 2.007420 0.000000
    +v 1.649920 2.007420 -0.343032
    +v 1.561400 2.203270 -0.324627
    +v 0.000000 2.007420 -1.683590
    +v 0.343032 2.007420 -1.649920
    +v 0.360244 1.813330 -1.732710
    +v 0.360244 1.813330 -1.732710
    +v 0.000000 1.813330 -1.768070
    +v 0.000000 2.007420 -1.683590
    +v 0.343032 2.007420 -1.649920
    +v 0.660811 2.007420 -1.553120
    +v 0.693966 1.813330 -1.631040
    +v 0.693966 1.813330 -1.631040
    +v 0.360244 1.813330 -1.732710
    +v 0.343032 2.007420 -1.649920
    +v 0.660811 2.007420 -1.553120
    +v 0.947021 2.007420 -1.399490
    +v 0.994537 1.813330 -1.469710
    +v 0.994537 1.813330 -1.469710
    +v 0.693966 1.813330 -1.631040
    +v 0.660811 2.007420 -1.553120
    +v 0.947021 2.007420 -1.399490
    +v 1.195350 2.007420 -1.195350
    +v 1.255330 1.813330 -1.255330
    +v 1.255330 1.813330 -1.255330
    +v 0.994537 1.813330 -1.469710
    +v 0.947021 2.007420 -1.399490
    +v 1.195350 2.007420 -1.195350
    +v 1.399490 2.007420 -0.947021
    +v 1.469710 1.813330 -0.994537
    +v 1.469710 1.813330 -0.994537
    +v 1.255330 1.813330 -1.255330
    +v 1.195350 2.007420 -1.195350
    +v 1.399490 2.007420 -0.947021
    +v 1.553120 2.007420 -0.660811
    +v 1.631040 1.813330 -0.693966
    +v 1.631040 1.813330 -0.693966
    +v 1.469710 1.813330 -0.994537
    +v 1.399490 2.007420 -0.947021
    +v 1.553120 2.007420 -0.660811
    +v 1.649920 2.007420 -0.343032
    +v 1.732710 1.813330 -0.360244
    +v 1.732710 1.813330 -0.360244
    +v 1.631040 1.813330 -0.693966
    +v 1.553120 2.007420 -0.660811
    +v 1.649920 2.007420 -0.343032
    +v 1.683590 2.007420 0.000000
    +v 1.768070 1.813330 0.000000
    +v 1.768070 1.813330 0.000000
    +v 1.732710 1.813330 -0.360244
    +v 1.649920 2.007420 -0.343032
    +v 0.000000 1.813330 -1.768070
    +v 0.360244 1.813330 -1.732710
    +v 0.375664 1.621870 -1.806880
    +v 0.375664 1.621870 -1.806880
    +v 0.000000 1.621870 -1.843750
    +v 0.000000 1.813330 -1.768070
    +v 0.360244 1.813330 -1.732710
    +v 0.693966 1.813330 -1.631040
    +v 0.723672 1.621870 -1.700860
    +v 0.723672 1.621870 -1.700860
    +v 0.375664 1.621870 -1.806880
    +v 0.360244 1.813330 -1.732710
    +v 0.693966 1.813330 -1.631040
    +v 0.994537 1.813330 -1.469710
    +v 1.037110 1.621870 -1.532620
    +v 1.037110 1.621870 -1.532620
    +v 0.723672 1.621870 -1.700860
    +v 0.693966 1.813330 -1.631040
    +v 0.994537 1.813330 -1.469710
    +v 1.255330 1.813330 -1.255330
    +v 1.309060 1.621870 -1.309060
    +v 1.309060 1.621870 -1.309060
    +v 1.037110 1.621870 -1.532620
    +v 0.994537 1.813330 -1.469710
    +v 1.255330 1.813330 -1.255330
    +v 1.469710 1.813330 -0.994537
    +v 1.532620 1.621870 -1.037110
    +v 1.532620 1.621870 -1.037110
    +v 1.309060 1.621870 -1.309060
    +v 1.255330 1.813330 -1.255330
    +v 1.469710 1.813330 -0.994537
    +v 1.631040 1.813330 -0.693966
    +v 1.700860 1.621870 -0.723672
    +v 1.700860 1.621870 -0.723672
    +v 1.532620 1.621870 -1.037110
    +v 1.469710 1.813330 -0.994537
    +v 1.631040 1.813330 -0.693966
    +v 1.732710 1.813330 -0.360244
    +v 1.806880 1.621870 -0.375664
    +v 1.806880 1.621870 -0.375664
    +v 1.700860 1.621870 -0.723672
    +v 1.631040 1.813330 -0.693966
    +v 1.732710 1.813330 -0.360244
    +v 1.768070 1.813330 0.000000
    +v 1.843750 1.621870 0.000000
    +v 1.843750 1.621870 0.000000
    +v 1.806880 1.621870 -0.375664
    +v 1.732710 1.813330 -0.360244
    +v 0.000000 1.621870 -1.843750
    +v 0.375664 1.621870 -1.806880
    +v 0.388697 1.433940 -1.869560
    +v 0.388697 1.433940 -1.869560
    +v 0.000000 1.433940 -1.907710
    +v 0.000000 1.621870 -1.843750
    +v 0.375664 1.621870 -1.806880
    +v 0.723672 1.621870 -1.700860
    +v 0.748778 1.433940 -1.759870
    +v 0.748778 1.433940 -1.759870
    +v 0.388697 1.433940 -1.869560
    +v 0.375664 1.621870 -1.806880
    +v 0.723672 1.621870 -1.700860
    +v 1.037110 1.621870 -1.532620
    +v 1.073090 1.433940 -1.585790
    +v 1.073090 1.433940 -1.585790
    +v 0.748778 1.433940 -1.759870
    +v 0.723672 1.621870 -1.700860
    +v 1.037110 1.621870 -1.532620
    +v 1.309060 1.621870 -1.309060
    +v 1.354480 1.433940 -1.354480
    +v 1.354480 1.433940 -1.354480
    +v 1.073090 1.433940 -1.585790
    +v 1.037110 1.621870 -1.532620
    +v 1.309060 1.621870 -1.309060
    +v 1.532620 1.621870 -1.037110
    +v 1.585790 1.433940 -1.073090
    +v 1.585790 1.433940 -1.073090
    +v 1.354480 1.433940 -1.354480
    +v 1.309060 1.621870 -1.309060
    +v 1.532620 1.621870 -1.037110
    +v 1.700860 1.621870 -0.723672
    +v 1.759870 1.433940 -0.748778
    +v 1.759870 1.433940 -0.748778
    +v 1.585790 1.433940 -1.073090
    +v 1.532620 1.621870 -1.037110
    +v 1.700860 1.621870 -0.723672
    +v 1.806880 1.621870 -0.375664
    +v 1.869560 1.433940 -0.388697
    +v 1.869560 1.433940 -0.388697
    +v 1.759870 1.433940 -0.748778
    +v 1.700860 1.621870 -0.723672
    +v 1.806880 1.621870 -0.375664
    +v 1.843750 1.621870 0.000000
    +v 1.907710 1.433940 0.000000
    +v 1.907710 1.433940 0.000000
    +v 1.869560 1.433940 -0.388697
    +v 1.806880 1.621870 -0.375664
    +v 0.000000 1.433940 -1.907710
    +v 0.388697 1.433940 -1.869560
    +v 0.398745 1.250390 -1.917890
    +v 0.398745 1.250390 -1.917890
    +v 0.000000 1.250390 -1.957030
    +v 0.000000 1.433940 -1.907710
    +v 0.388697 1.433940 -1.869560
    +v 0.748778 1.433940 -1.759870
    +v 0.768135 1.250390 -1.805360
    +v 0.768135 1.250390 -1.805360
    +v 0.398745 1.250390 -1.917890
    +v 0.388697 1.433940 -1.869560
    +v 0.748778 1.433940 -1.759870
    +v 1.073090 1.433940 -1.585790
    +v 1.100830 1.250390 -1.626780
    +v 1.100830 1.250390 -1.626780
    +v 0.768135 1.250390 -1.805360
    +v 0.748778 1.433940 -1.759870
    +v 1.073090 1.433940 -1.585790
    +v 1.354480 1.433940 -1.354480
    +v 1.389490 1.250390 -1.389490
    +v 1.389490 1.250390 -1.389490
    +v 1.100830 1.250390 -1.626780
    +v 1.073090 1.433940 -1.585790
    +v 1.354480 1.433940 -1.354480
    +v 1.585790 1.433940 -1.073090
    +v 1.626780 1.250390 -1.100830
    +v 1.626780 1.250390 -1.100830
    +v 1.389490 1.250390 -1.389490
    +v 1.354480 1.433940 -1.354480
    +v 1.585790 1.433940 -1.073090
    +v 1.759870 1.433940 -0.748778
    +v 1.805360 1.250390 -0.768135
    +v 1.805360 1.250390 -0.768135
    +v 1.626780 1.250390 -1.100830
    +v 1.585790 1.433940 -1.073090
    +v 1.759870 1.433940 -0.748778
    +v 1.869560 1.433940 -0.388697
    +v 1.917890 1.250390 -0.398745
    +v 1.917890 1.250390 -0.398745
    +v 1.805360 1.250390 -0.768135
    +v 1.759870 1.433940 -0.748778
    +v 1.869560 1.433940 -0.388697
    +v 1.907710 1.433940 0.000000
    +v 1.957030 1.250390 0.000000
    +v 1.957030 1.250390 0.000000
    +v 1.917890 1.250390 -0.398745
    +v 1.869560 1.433940 -0.388697
    +v 0.000000 1.250390 -1.957030
    +v 0.398745 1.250390 -1.917890
    +v 0.405212 1.072120 -1.948990
    +v 0.405212 1.072120 -1.948990
    +v 0.000000 1.072120 -1.988770
    +v 0.000000 1.250390 -1.957030
    +v 0.398745 1.250390 -1.917890
    +v 0.768135 1.250390 -1.805360
    +v 0.780592 1.072120 -1.834640
    +v 0.780592 1.072120 -1.834640
    +v 0.405212 1.072120 -1.948990
    +v 0.398745 1.250390 -1.917890
    +v 0.768135 1.250390 -1.805360
    +v 1.100830 1.250390 -1.626780
    +v 1.118680 1.072120 -1.653160
    +v 1.118680 1.072120 -1.653160
    +v 0.780592 1.072120 -1.834640
    +v 0.768135 1.250390 -1.805360
    +v 1.100830 1.250390 -1.626780
    +v 1.389490 1.250390 -1.389490
    +v 1.412030 1.072120 -1.412030
    +v 1.412030 1.072120 -1.412030
    +v 1.118680 1.072120 -1.653160
    +v 1.100830 1.250390 -1.626780
    +v 1.389490 1.250390 -1.389490
    +v 1.626780 1.250390 -1.100830
    +v 1.653160 1.072120 -1.118680
    +v 1.653160 1.072120 -1.118680
    +v 1.412030 1.072120 -1.412030
    +v 1.389490 1.250390 -1.389490
    +v 1.626780 1.250390 -1.100830
    +v 1.805360 1.250390 -0.768135
    +v 1.834640 1.072120 -0.780592
    +v 1.834640 1.072120 -0.780592
    +v 1.653160 1.072120 -1.118680
    +v 1.626780 1.250390 -1.100830
    +v 1.805360 1.250390 -0.768135
    +v 1.917890 1.250390 -0.398745
    +v 1.948990 1.072120 -0.405212
    +v 1.948990 1.072120 -0.405212
    +v 1.834640 1.072120 -0.780592
    +v 1.805360 1.250390 -0.768135
    +v 1.917890 1.250390 -0.398745
    +v 1.957030 1.250390 0.000000
    +v 1.988770 1.072120 -0.000000
    +v 1.988770 1.072120 -0.000000
    +v 1.948990 1.072120 -0.405212
    +v 1.917890 1.250390 -0.398745
    +v 0.000000 1.072120 -1.988770
    +v 0.405212 1.072120 -1.948990
    +v 0.407500 0.900000 -1.960000
    +v 0.407500 0.900000 -1.960000
    +v 0.000000 0.900000 -2.000000
    +v 0.000000 1.072120 -1.988770
    +v 0.405212 1.072120 -1.948990
    +v 0.780592 1.072120 -1.834640
    +v 0.785000 0.900000 -1.845000
    +v 0.785000 0.900000 -1.845000
    +v 0.407500 0.900000 -1.960000
    +v 0.405212 1.072120 -1.948990
    +v 0.780592 1.072120 -1.834640
    +v 1.118680 1.072120 -1.653160
    +v 1.125000 0.900000 -1.662500
    +v 1.125000 0.900000 -1.662500
    +v 0.785000 0.900000 -1.845000
    +v 0.780592 1.072120 -1.834640
    +v 1.118680 1.072120 -1.653160
    +v 1.412030 1.072120 -1.412030
    +v 1.420000 0.900000 -1.420000
    +v 1.420000 0.900000 -1.420000
    +v 1.125000 0.900000 -1.662500
    +v 1.118680 1.072120 -1.653160
    +v 1.412030 1.072120 -1.412030
    +v 1.653160 1.072120 -1.118680
    +v 1.662500 0.900000 -1.125000
    +v 1.662500 0.900000 -1.125000
    +v 1.420000 0.900000 -1.420000
    +v 1.412030 1.072120 -1.412030
    +v 1.653160 1.072120 -1.118680
    +v 1.834640 1.072120 -0.780592
    +v 1.845000 0.900000 -0.785000
    +v 1.845000 0.900000 -0.785000
    +v 1.662500 0.900000 -1.125000
    +v 1.653160 1.072120 -1.118680
    +v 1.834640 1.072120 -0.780592
    +v 1.948990 1.072120 -0.405212
    +v 1.960000 0.900000 -0.407500
    +v 1.960000 0.900000 -0.407500
    +v 1.845000 0.900000 -0.785000
    +v 1.834640 1.072120 -0.780592
    +v 1.948990 1.072120 -0.405212
    +v 1.988770 1.072120 -0.000000
    +v 2.000000 0.900000 0.000000
    +v 2.000000 0.900000 0.000000
    +v 1.960000 0.900000 -0.407500
    +v 1.948990 1.072120 -0.405212
    +v 2.000000 0.900000 0.000000
    +v 1.960000 0.900000 0.407500
    +v 1.938950 0.741650 0.403123
    +v 1.938950 0.741650 0.403123
    +v 1.978520 0.741650 0.000000
    +v 2.000000 0.900000 0.000000
    +v 1.960000 0.900000 0.407500
    +v 1.845000 0.900000 0.785000
    +v 1.825180 0.741650 0.776567
    +v 1.825180 0.741650 0.776567
    +v 1.938950 0.741650 0.403123
    +v 1.960000 0.900000 0.407500
    +v 1.845000 0.900000 0.785000
    +v 1.662500 0.900000 1.125000
    +v 1.644640 0.741650 1.112920
    +v 1.644640 0.741650 1.112920
    +v 1.825180 0.741650 0.776567
    +v 1.845000 0.900000 0.785000
    +v 1.662500 0.900000 1.125000
    +v 1.420000 0.900000 1.420000
    +v 1.404750 0.741650 1.404750
    +v 1.404750 0.741650 1.404750
    +v 1.644640 0.741650 1.112920
    +v 1.662500 0.900000 1.125000
    +v 1.420000 0.900000 1.420000
    +v 1.125000 0.900000 1.662500
    +v 1.112920 0.741650 1.644640
    +v 1.112920 0.741650 1.644640
    +v 1.404750 0.741650 1.404750
    +v 1.420000 0.900000 1.420000
    +v 1.125000 0.900000 1.662500
    +v 0.785000 0.900000 1.845000
    +v 0.776567 0.741650 1.825180
    +v 0.776567 0.741650 1.825180
    +v 1.112920 0.741650 1.644640
    +v 1.125000 0.900000 1.662500
    +v 0.785000 0.900000 1.845000
    +v 0.407500 0.900000 1.960000
    +v 0.403123 0.741650 1.938950
    +v 0.403123 0.741650 1.938950
    +v 0.776567 0.741650 1.825180
    +v 0.785000 0.900000 1.845000
    +v 0.407500 0.900000 1.960000
    +v 0.000000 0.900000 2.000000
    +v 0.000000 0.741650 1.978520
    +v 0.000000 0.741650 1.978520
    +v 0.403123 0.741650 1.938950
    +v 0.407500 0.900000 1.960000
    +v 1.978520 0.741650 0.000000
    +v 1.938950 0.741650 0.403123
    +v 1.883440 0.603516 0.391582
    +v 1.883440 0.603516 0.391582
    +v 1.921880 0.603516 0.000000
    +v 1.978520 0.741650 0.000000
    +v 1.938950 0.741650 0.403123
    +v 1.825180 0.741650 0.776567
    +v 1.772930 0.603516 0.754336
    +v 1.772930 0.603516 0.754336
    +v 1.883440 0.603516 0.391582
    +v 1.938950 0.741650 0.403123
    +v 1.825180 0.741650 0.776567
    +v 1.644640 0.741650 1.112920
    +v 1.597560 0.603516 1.081050
    +v 1.597560 0.603516 1.081050
    +v 1.772930 0.603516 0.754336
    +v 1.825180 0.741650 0.776567
    +v 1.644640 0.741650 1.112920
    +v 1.404750 0.741650 1.404750
    +v 1.364530 0.603516 1.364530
    +v 1.364530 0.603516 1.364530
    +v 1.597560 0.603516 1.081050
    +v 1.644640 0.741650 1.112920
    +v 1.404750 0.741650 1.404750
    +v 1.112920 0.741650 1.644640
    +v 1.081050 0.603516 1.597560
    +v 1.081050 0.603516 1.597560
    +v 1.364530 0.603516 1.364530
    +v 1.404750 0.741650 1.404750
    +v 1.112920 0.741650 1.644640
    +v 0.776567 0.741650 1.825180
    +v 0.754336 0.603516 1.772930
    +v 0.754336 0.603516 1.772930
    +v 1.081050 0.603516 1.597560
    +v 1.112920 0.741650 1.644640
    +v 0.776567 0.741650 1.825180
    +v 0.403123 0.741650 1.938950
    +v 0.391582 0.603516 1.883440
    +v 0.391582 0.603516 1.883440
    +v 0.754336 0.603516 1.772930
    +v 0.776567 0.741650 1.825180
    +v 0.403123 0.741650 1.938950
    +v 0.000000 0.741650 1.978520
    +v 0.000000 0.603516 1.921880
    +v 0.000000 0.603516 1.921880
    +v 0.391582 0.603516 1.883440
    +v 0.403123 0.741650 1.938950
    +v 1.921880 0.603516 0.000000
    +v 1.883440 0.603516 0.391582
    +v 1.804960 0.484717 0.375266
    +v 1.804960 0.484717 0.375266
    +v 1.841800 0.484717 0.000000
    +v 1.921880 0.603516 0.000000
    +v 1.883440 0.603516 0.391582
    +v 1.772930 0.603516 0.754336
    +v 1.699060 0.484717 0.722905
    +v 1.699060 0.484717 0.722905
    +v 1.804960 0.484717 0.375266
    +v 1.883440 0.603516 0.391582
    +v 1.772930 0.603516 0.754336
    +v 1.597560 0.603516 1.081050
    +v 1.530990 0.484717 1.036010
    +v 1.530990 0.484717 1.036010
    +v 1.699060 0.484717 0.722905
    +v 1.772930 0.603516 0.754336
    +v 1.597560 0.603516 1.081050
    +v 1.364530 0.603516 1.364530
    +v 1.307680 0.484717 1.307680
    +v 1.307680 0.484717 1.307680
    +v 1.530990 0.484717 1.036010
    +v 1.597560 0.603516 1.081050
    +v 1.364530 0.603516 1.364530
    +v 1.081050 0.603516 1.597560
    +v 1.036010 0.484717 1.530990
    +v 1.036010 0.484717 1.530990
    +v 1.307680 0.484717 1.307680
    +v 1.364530 0.603516 1.364530
    +v 1.081050 0.603516 1.597560
    +v 0.754336 0.603516 1.772930
    +v 0.722905 0.484717 1.699060
    +v 0.722905 0.484717 1.699060
    +v 1.036010 0.484717 1.530990
    +v 1.081050 0.603516 1.597560
    +v 0.754336 0.603516 1.772930
    +v 0.391582 0.603516 1.883440
    +v 0.375266 0.484717 1.804960
    +v 0.375266 0.484717 1.804960
    +v 0.722905 0.484717 1.699060
    +v 0.754336 0.603516 1.772930
    +v 0.391582 0.603516 1.883440
    +v 0.000000 0.603516 1.921880
    +v -0.000000 0.484717 1.841800
    +v -0.000000 0.484717 1.841800
    +v 0.375266 0.484717 1.804960
    +v 0.391582 0.603516 1.883440
    +v 1.841800 0.484717 0.000000
    +v 1.804960 0.484717 0.375266
    +v 1.715000 0.384375 0.356563
    +v 1.715000 0.384375 0.356563
    +v 1.750000 0.384375 0.000000
    +v 1.841800 0.484717 0.000000
    +v 1.804960 0.484717 0.375266
    +v 1.699060 0.484717 0.722905
    +v 1.614370 0.384375 0.686875
    +v 1.614370 0.384375 0.686875
    +v 1.715000 0.384375 0.356563
    +v 1.804960 0.484717 0.375266
    +v 1.699060 0.484717 0.722905
    +v 1.530990 0.484717 1.036010
    +v 1.454690 0.384375 0.984375
    +v 1.454690 0.384375 0.984375
    +v 1.614370 0.384375 0.686875
    +v 1.699060 0.484717 0.722905
    +v 1.530990 0.484717 1.036010
    +v 1.307680 0.484717 1.307680
    +v 1.242500 0.384375 1.242500
    +v 1.242500 0.384375 1.242500
    +v 1.454690 0.384375 0.984375
    +v 1.530990 0.484717 1.036010
    +v 1.307680 0.484717 1.307680
    +v 1.036010 0.484717 1.530990
    +v 0.984375 0.384375 1.454690
    +v 0.984375 0.384375 1.454690
    +v 1.242500 0.384375 1.242500
    +v 1.307680 0.484717 1.307680
    +v 1.036010 0.484717 1.530990
    +v 0.722905 0.484717 1.699060
    +v 0.686875 0.384375 1.614370
    +v 0.686875 0.384375 1.614370
    +v 0.984375 0.384375 1.454690
    +v 1.036010 0.484717 1.530990
    +v 0.722905 0.484717 1.699060
    +v 0.375266 0.484717 1.804960
    +v 0.356562 0.384375 1.715000
    +v 0.356562 0.384375 1.715000
    +v 0.686875 0.384375 1.614370
    +v 0.722905 0.484717 1.699060
    +v 0.375266 0.484717 1.804960
    +v -0.000000 0.484717 1.841800
    +v -0.000000 0.384375 1.750000
    +v -0.000000 0.384375 1.750000
    +v 0.356562 0.384375 1.715000
    +v 0.375266 0.484717 1.804960
    +v 1.750000 0.384375 0.000000
    +v 1.715000 0.384375 0.356563
    +v 1.625040 0.301611 0.337859
    +v 1.625040 0.301611 0.337859
    +v 1.658200 0.301611 0.000000
    +v 1.750000 0.384375 0.000000
    +v 1.715000 0.384375 0.356563
    +v 1.614370 0.384375 0.686875
    +v 1.529690 0.301611 0.650845
    +v 1.529690 0.301611 0.650845
    +v 1.625040 0.301611 0.337859
    +v 1.715000 0.384375 0.356563
    +v 1.614370 0.384375 0.686875
    +v 1.454690 0.384375 0.984375
    +v 1.378380 0.301611 0.932739
    +v 1.378380 0.301611 0.932739
    +v 1.529690 0.301611 0.650845
    +v 1.614370 0.384375 0.686875
    +v 1.454690 0.384375 0.984375
    +v 1.242500 0.384375 1.242500
    +v 1.177320 0.301611 1.177320
    +v 1.177320 0.301611 1.177320
    +v 1.378380 0.301611 0.932739
    +v 1.454690 0.384375 0.984375
    +v 1.242500 0.384375 1.242500
    +v 0.984375 0.384375 1.454690
    +v 0.932739 0.301611 1.378380
    +v 0.932739 0.301611 1.378380
    +v 1.177320 0.301611 1.177320
    +v 1.242500 0.384375 1.242500
    +v 0.984375 0.384375 1.454690
    +v 0.686875 0.384375 1.614370
    +v 0.650845 0.301611 1.529690
    +v 0.650845 0.301611 1.529690
    +v 0.932739 0.301611 1.378380
    +v 0.984375 0.384375 1.454690
    +v 0.686875 0.384375 1.614370
    +v 0.356562 0.384375 1.715000
    +v 0.337859 0.301611 1.625040
    +v 0.337859 0.301611 1.625040
    +v 0.650845 0.301611 1.529690
    +v 0.686875 0.384375 1.614370
    +v 0.356562 0.384375 1.715000
    +v -0.000000 0.384375 1.750000
    +v -0.000000 0.301611 1.658200
    +v -0.000000 0.301611 1.658200
    +v 0.337859 0.301611 1.625040
    +v 0.356562 0.384375 1.715000
    +v 1.658200 0.301611 0.000000
    +v 1.625040 0.301611 0.337859
    +v 1.546560 0.235547 0.321543
    +v 1.546560 0.235547 0.321543
    +v 1.578120 0.235547 0.000000
    +v 1.658200 0.301611 0.000000
    +v 1.625040 0.301611 0.337859
    +v 1.529690 0.301611 0.650845
    +v 1.455820 0.235547 0.619414
    +v 1.455820 0.235547 0.619414
    +v 1.546560 0.235547 0.321543
    +v 1.625040 0.301611 0.337859
    +v 1.529690 0.301611 0.650845
    +v 1.378380 0.301611 0.932739
    +v 1.311820 0.235547 0.887695
    +v 1.311820 0.235547 0.887695
    +v 1.455820 0.235547 0.619414
    +v 1.529690 0.301611 0.650845
    +v 1.378380 0.301611 0.932739
    +v 1.177320 0.301611 1.177320
    +v 1.120470 0.235547 1.120470
    +v 1.120470 0.235547 1.120470
    +v 1.311820 0.235547 0.887695
    +v 1.378380 0.301611 0.932739
    +v 1.177320 0.301611 1.177320
    +v 0.932739 0.301611 1.378380
    +v 0.887695 0.235547 1.311820
    +v 0.887695 0.235547 1.311820
    +v 1.120470 0.235547 1.120470
    +v 1.177320 0.301611 1.177320
    +v 0.932739 0.301611 1.378380
    +v 0.650845 0.301611 1.529690
    +v 0.619414 0.235547 1.455820
    +v 0.619414 0.235547 1.455820
    +v 0.887695 0.235547 1.311820
    +v 0.932739 0.301611 1.378380
    +v 0.650845 0.301611 1.529690
    +v 0.337859 0.301611 1.625040
    +v 0.321543 0.235547 1.546560
    +v 0.321543 0.235547 1.546560
    +v 0.619414 0.235547 1.455820
    +v 0.650845 0.301611 1.529690
    +v 0.337859 0.301611 1.625040
    +v -0.000000 0.301611 1.658200
    +v 0.000000 0.235547 1.578120
    +v 0.000000 0.235547 1.578120
    +v 0.321543 0.235547 1.546560
    +v 0.337859 0.301611 1.625040
    +v 1.578120 0.235547 0.000000
    +v 1.546560 0.235547 0.321543
    +v 1.491050 0.185303 0.310002
    +v 1.491050 0.185303 0.310002
    +v 1.521480 0.185303 0.000000
    +v 1.578120 0.235547 0.000000
    +v 1.546560 0.235547 0.321543
    +v 1.455820 0.235547 0.619414
    +v 1.403570 0.185303 0.597183
    +v 1.403570 0.185303 0.597183
    +v 1.491050 0.185303 0.310002
    +v 1.546560 0.235547 0.321543
    +v 1.455820 0.235547 0.619414
    +v 1.311820 0.235547 0.887695
    +v 1.264730 0.185303 0.855835
    +v 1.264730 0.185303 0.855835
    +v 1.403570 0.185303 0.597183
    +v 1.455820 0.235547 0.619414
    +v 1.311820 0.235547 0.887695
    +v 1.120470 0.235547 1.120470
    +v 1.080250 0.185303 1.080250
    +v 1.080250 0.185303 1.080250
    +v 1.264730 0.185303 0.855835
    +v 1.311820 0.235547 0.887695
    +v 1.120470 0.235547 1.120470
    +v 0.887695 0.235547 1.311820
    +v 0.855835 0.185303 1.264730
    +v 0.855835 0.185303 1.264730
    +v 1.080250 0.185303 1.080250
    +v 1.120470 0.235547 1.120470
    +v 0.887695 0.235547 1.311820
    +v 0.619414 0.235547 1.455820
    +v 0.597183 0.185303 1.403570
    +v 0.597183 0.185303 1.403570
    +v 0.855835 0.185303 1.264730
    +v 0.887695 0.235547 1.311820
    +v 0.619414 0.235547 1.455820
    +v 0.321543 0.235547 1.546560
    +v 0.310002 0.185303 1.491050
    +v 0.310002 0.185303 1.491050
    +v 0.597183 0.185303 1.403570
    +v 0.619414 0.235547 1.455820
    +v 0.321543 0.235547 1.546560
    +v 0.000000 0.235547 1.578120
    +v 0.000000 0.185303 1.521480
    +v 0.000000 0.185303 1.521480
    +v 0.310002 0.185303 1.491050
    +v 0.321543 0.235547 1.546560
    +v 1.521480 0.185303 0.000000
    +v 1.491050 0.185303 0.310002
    +v 1.470000 0.150000 0.305625
    +v 1.470000 0.150000 0.305625
    +v 1.500000 0.150000 0.000000
    +v 1.521480 0.185303 0.000000
    +v 1.491050 0.185303 0.310002
    +v 1.403570 0.185303 0.597183
    +v 1.383750 0.150000 0.588750
    +v 1.383750 0.150000 0.588750
    +v 1.470000 0.150000 0.305625
    +v 1.491050 0.185303 0.310002
    +v 1.403570 0.185303 0.597183
    +v 1.264730 0.185303 0.855835
    +v 1.246870 0.150000 0.843750
    +v 1.246870 0.150000 0.843750
    +v 1.383750 0.150000 0.588750
    +v 1.403570 0.185303 0.597183
    +v 1.264730 0.185303 0.855835
    +v 1.080250 0.185303 1.080250
    +v 1.065000 0.150000 1.065000
    +v 1.065000 0.150000 1.065000
    +v 1.246870 0.150000 0.843750
    +v 1.264730 0.185303 0.855835
    +v 1.080250 0.185303 1.080250
    +v 0.855835 0.185303 1.264730
    +v 0.843750 0.150000 1.246870
    +v 0.843750 0.150000 1.246870
    +v 1.065000 0.150000 1.065000
    +v 1.080250 0.185303 1.080250
    +v 0.855835 0.185303 1.264730
    +v 0.597183 0.185303 1.403570
    +v 0.588750 0.150000 1.383750
    +v 0.588750 0.150000 1.383750
    +v 0.843750 0.150000 1.246870
    +v 0.855835 0.185303 1.264730
    +v 0.597183 0.185303 1.403570
    +v 0.310002 0.185303 1.491050
    +v 0.305625 0.150000 1.470000
    +v 0.305625 0.150000 1.470000
    +v 0.588750 0.150000 1.383750
    +v 0.597183 0.185303 1.403570
    +v 0.310002 0.185303 1.491050
    +v 0.000000 0.185303 1.521480
    +v -0.000000 0.150000 1.500000
    +v -0.000000 0.150000 1.500000
    +v 0.305625 0.150000 1.470000
    +v 0.310002 0.185303 1.491050
    +v 0.000000 0.900000 2.000000
    +v -0.407500 0.900000 1.960000
    +v -0.403123 0.741650 1.938950
    +v -0.403123 0.741650 1.938950
    +v 0.000000 0.741650 1.978520
    +v 0.000000 0.900000 2.000000
    +v -0.407500 0.900000 1.960000
    +v -0.785000 0.900000 1.845000
    +v -0.776567 0.741650 1.825180
    +v -0.776567 0.741650 1.825180
    +v -0.403123 0.741650 1.938950
    +v -0.407500 0.900000 1.960000
    +v -0.785000 0.900000 1.845000
    +v -1.125000 0.900000 1.662500
    +v -1.112920 0.741650 1.644640
    +v -1.112920 0.741650 1.644640
    +v -0.776567 0.741650 1.825180
    +v -0.785000 0.900000 1.845000
    +v -1.125000 0.900000 1.662500
    +v -1.420000 0.900000 1.420000
    +v -1.404750 0.741650 1.404750
    +v -1.404750 0.741650 1.404750
    +v -1.112920 0.741650 1.644640
    +v -1.125000 0.900000 1.662500
    +v -1.420000 0.900000 1.420000
    +v -1.662500 0.900000 1.125000
    +v -1.644640 0.741650 1.112920
    +v -1.644640 0.741650 1.112920
    +v -1.404750 0.741650 1.404750
    +v -1.420000 0.900000 1.420000
    +v -1.662500 0.900000 1.125000
    +v -1.845000 0.900000 0.785000
    +v -1.825180 0.741650 0.776567
    +v -1.825180 0.741650 0.776567
    +v -1.644640 0.741650 1.112920
    +v -1.662500 0.900000 1.125000
    +v -1.845000 0.900000 0.785000
    +v -1.960000 0.900000 0.407500
    +v -1.938950 0.741650 0.403123
    +v -1.938950 0.741650 0.403123
    +v -1.825180 0.741650 0.776567
    +v -1.845000 0.900000 0.785000
    +v -1.960000 0.900000 0.407500
    +v -2.000000 0.900000 0.000000
    +v -1.978520 0.741650 0.000000
    +v -1.978520 0.741650 0.000000
    +v -1.938950 0.741650 0.403123
    +v -1.960000 0.900000 0.407500
    +v 0.000000 0.741650 1.978520
    +v -0.403123 0.741650 1.938950
    +v -0.391582 0.603516 1.883440
    +v -0.391582 0.603516 1.883440
    +v 0.000000 0.603516 1.921880
    +v 0.000000 0.741650 1.978520
    +v -0.403123 0.741650 1.938950
    +v -0.776567 0.741650 1.825180
    +v -0.754336 0.603516 1.772930
    +v -0.754336 0.603516 1.772930
    +v -0.391582 0.603516 1.883440
    +v -0.403123 0.741650 1.938950
    +v -0.776567 0.741650 1.825180
    +v -1.112920 0.741650 1.644640
    +v -1.081050 0.603516 1.597560
    +v -1.081050 0.603516 1.597560
    +v -0.754336 0.603516 1.772930
    +v -0.776567 0.741650 1.825180
    +v -1.112920 0.741650 1.644640
    +v -1.404750 0.741650 1.404750
    +v -1.364530 0.603516 1.364530
    +v -1.364530 0.603516 1.364530
    +v -1.081050 0.603516 1.597560
    +v -1.112920 0.741650 1.644640
    +v -1.404750 0.741650 1.404750
    +v -1.644640 0.741650 1.112920
    +v -1.597560 0.603516 1.081050
    +v -1.597560 0.603516 1.081050
    +v -1.364530 0.603516 1.364530
    +v -1.404750 0.741650 1.404750
    +v -1.644640 0.741650 1.112920
    +v -1.825180 0.741650 0.776567
    +v -1.772930 0.603516 0.754336
    +v -1.772930 0.603516 0.754336
    +v -1.597560 0.603516 1.081050
    +v -1.644640 0.741650 1.112920
    +v -1.825180 0.741650 0.776567
    +v -1.938950 0.741650 0.403123
    +v -1.883440 0.603516 0.391582
    +v -1.883440 0.603516 0.391582
    +v -1.772930 0.603516 0.754336
    +v -1.825180 0.741650 0.776567
    +v -1.938950 0.741650 0.403123
    +v -1.978520 0.741650 0.000000
    +v -1.921880 0.603516 0.000000
    +v -1.921880 0.603516 0.000000
    +v -1.883440 0.603516 0.391582
    +v -1.938950 0.741650 0.403123
    +v 0.000000 0.603516 1.921880
    +v -0.391582 0.603516 1.883440
    +v -0.375266 0.484717 1.804960
    +v -0.375266 0.484717 1.804960
    +v 0.000000 0.484717 1.841800
    +v 0.000000 0.603516 1.921880
    +v -0.391582 0.603516 1.883440
    +v -0.754336 0.603516 1.772930
    +v -0.722905 0.484717 1.699060
    +v -0.722905 0.484717 1.699060
    +v -0.375266 0.484717 1.804960
    +v -0.391582 0.603516 1.883440
    +v -0.754336 0.603516 1.772930
    +v -1.081050 0.603516 1.597560
    +v -1.036010 0.484717 1.530990
    +v -1.036010 0.484717 1.530990
    +v -0.722905 0.484717 1.699060
    +v -0.754336 0.603516 1.772930
    +v -1.081050 0.603516 1.597560
    +v -1.364530 0.603516 1.364530
    +v -1.307680 0.484717 1.307680
    +v -1.307680 0.484717 1.307680
    +v -1.036010 0.484717 1.530990
    +v -1.081050 0.603516 1.597560
    +v -1.364530 0.603516 1.364530
    +v -1.597560 0.603516 1.081050
    +v -1.530990 0.484717 1.036010
    +v -1.530990 0.484717 1.036010
    +v -1.307680 0.484717 1.307680
    +v -1.364530 0.603516 1.364530
    +v -1.597560 0.603516 1.081050
    +v -1.772930 0.603516 0.754336
    +v -1.699060 0.484717 0.722905
    +v -1.699060 0.484717 0.722905
    +v -1.530990 0.484717 1.036010
    +v -1.597560 0.603516 1.081050
    +v -1.772930 0.603516 0.754336
    +v -1.883440 0.603516 0.391582
    +v -1.804960 0.484717 0.375266
    +v -1.804960 0.484717 0.375266
    +v -1.699060 0.484717 0.722905
    +v -1.772930 0.603516 0.754336
    +v -1.883440 0.603516 0.391582
    +v -1.921880 0.603516 0.000000
    +v -1.841800 0.484717 -0.000000
    +v -1.841800 0.484717 -0.000000
    +v -1.804960 0.484717 0.375266
    +v -1.883440 0.603516 0.391582
    +v 0.000000 0.484717 1.841800
    +v -0.375266 0.484717 1.804960
    +v -0.356563 0.384375 1.715000
    +v -0.356563 0.384375 1.715000
    +v 0.000000 0.384375 1.750000
    +v 0.000000 0.484717 1.841800
    +v -0.375266 0.484717 1.804960
    +v -0.722905 0.484717 1.699060
    +v -0.686875 0.384375 1.614370
    +v -0.686875 0.384375 1.614370
    +v -0.356563 0.384375 1.715000
    +v -0.375266 0.484717 1.804960
    +v -0.722905 0.484717 1.699060
    +v -1.036010 0.484717 1.530990
    +v -0.984375 0.384375 1.454690
    +v -0.984375 0.384375 1.454690
    +v -0.686875 0.384375 1.614370
    +v -0.722905 0.484717 1.699060
    +v -1.036010 0.484717 1.530990
    +v -1.307680 0.484717 1.307680
    +v -1.242500 0.384375 1.242500
    +v -1.242500 0.384375 1.242500
    +v -0.984375 0.384375 1.454690
    +v -1.036010 0.484717 1.530990
    +v -1.307680 0.484717 1.307680
    +v -1.530990 0.484717 1.036010
    +v -1.454690 0.384375 0.984375
    +v -1.454690 0.384375 0.984375
    +v -1.242500 0.384375 1.242500
    +v -1.307680 0.484717 1.307680
    +v -1.530990 0.484717 1.036010
    +v -1.699060 0.484717 0.722905
    +v -1.614370 0.384375 0.686875
    +v -1.614370 0.384375 0.686875
    +v -1.454690 0.384375 0.984375
    +v -1.530990 0.484717 1.036010
    +v -1.699060 0.484717 0.722905
    +v -1.804960 0.484717 0.375266
    +v -1.715000 0.384375 0.356562
    +v -1.715000 0.384375 0.356562
    +v -1.614370 0.384375 0.686875
    +v -1.699060 0.484717 0.722905
    +v -1.804960 0.484717 0.375266
    +v -1.841800 0.484717 -0.000000
    +v -1.750000 0.384375 -0.000000
    +v -1.750000 0.384375 -0.000000
    +v -1.715000 0.384375 0.356562
    +v -1.804960 0.484717 0.375266
    +v 0.000000 0.384375 1.750000
    +v -0.356563 0.384375 1.715000
    +v -0.337859 0.301611 1.625040
    +v -0.337859 0.301611 1.625040
    +v 0.000000 0.301611 1.658200
    +v 0.000000 0.384375 1.750000
    +v -0.356563 0.384375 1.715000
    +v -0.686875 0.384375 1.614370
    +v -0.650845 0.301611 1.529690
    +v -0.650845 0.301611 1.529690
    +v -0.337859 0.301611 1.625040
    +v -0.356563 0.384375 1.715000
    +v -0.686875 0.384375 1.614370
    +v -0.984375 0.384375 1.454690
    +v -0.932739 0.301611 1.378380
    +v -0.932739 0.301611 1.378380
    +v -0.650845 0.301611 1.529690
    +v -0.686875 0.384375 1.614370
    +v -0.984375 0.384375 1.454690
    +v -1.242500 0.384375 1.242500
    +v -1.177320 0.301611 1.177320
    +v -1.177320 0.301611 1.177320
    +v -0.932739 0.301611 1.378380
    +v -0.984375 0.384375 1.454690
    +v -1.242500 0.384375 1.242500
    +v -1.454690 0.384375 0.984375
    +v -1.378380 0.301611 0.932739
    +v -1.378380 0.301611 0.932739
    +v -1.177320 0.301611 1.177320
    +v -1.242500 0.384375 1.242500
    +v -1.454690 0.384375 0.984375
    +v -1.614370 0.384375 0.686875
    +v -1.529690 0.301611 0.650845
    +v -1.529690 0.301611 0.650845
    +v -1.378380 0.301611 0.932739
    +v -1.454690 0.384375 0.984375
    +v -1.614370 0.384375 0.686875
    +v -1.715000 0.384375 0.356562
    +v -1.625040 0.301611 0.337859
    +v -1.625040 0.301611 0.337859
    +v -1.529690 0.301611 0.650845
    +v -1.614370 0.384375 0.686875
    +v -1.715000 0.384375 0.356562
    +v -1.750000 0.384375 -0.000000
    +v -1.658200 0.301611 -0.000000
    +v -1.658200 0.301611 -0.000000
    +v -1.625040 0.301611 0.337859
    +v -1.715000 0.384375 0.356562
    +v 0.000000 0.301611 1.658200
    +v -0.337859 0.301611 1.625040
    +v -0.321543 0.235547 1.546560
    +v -0.321543 0.235547 1.546560
    +v 0.000000 0.235547 1.578120
    +v 0.000000 0.301611 1.658200
    +v -0.337859 0.301611 1.625040
    +v -0.650845 0.301611 1.529690
    +v -0.619414 0.235547 1.455820
    +v -0.619414 0.235547 1.455820
    +v -0.321543 0.235547 1.546560
    +v -0.337859 0.301611 1.625040
    +v -0.650845 0.301611 1.529690
    +v -0.932739 0.301611 1.378380
    +v -0.887695 0.235547 1.311820
    +v -0.887695 0.235547 1.311820
    +v -0.619414 0.235547 1.455820
    +v -0.650845 0.301611 1.529690
    +v -0.932739 0.301611 1.378380
    +v -1.177320 0.301611 1.177320
    +v -1.120470 0.235547 1.120470
    +v -1.120470 0.235547 1.120470
    +v -0.887695 0.235547 1.311820
    +v -0.932739 0.301611 1.378380
    +v -1.177320 0.301611 1.177320
    +v -1.378380 0.301611 0.932739
    +v -1.311820 0.235547 0.887695
    +v -1.311820 0.235547 0.887695
    +v -1.120470 0.235547 1.120470
    +v -1.177320 0.301611 1.177320
    +v -1.378380 0.301611 0.932739
    +v -1.529690 0.301611 0.650845
    +v -1.455820 0.235547 0.619414
    +v -1.455820 0.235547 0.619414
    +v -1.311820 0.235547 0.887695
    +v -1.378380 0.301611 0.932739
    +v -1.529690 0.301611 0.650845
    +v -1.625040 0.301611 0.337859
    +v -1.546560 0.235547 0.321543
    +v -1.546560 0.235547 0.321543
    +v -1.455820 0.235547 0.619414
    +v -1.529690 0.301611 0.650845
    +v -1.625040 0.301611 0.337859
    +v -1.658200 0.301611 -0.000000
    +v -1.578120 0.235547 0.000000
    +v -1.578120 0.235547 0.000000
    +v -1.546560 0.235547 0.321543
    +v -1.625040 0.301611 0.337859
    +v 0.000000 0.235547 1.578120
    +v -0.321543 0.235547 1.546560
    +v -0.310002 0.185303 1.491050
    +v -0.310002 0.185303 1.491050
    +v 0.000000 0.185303 1.521480
    +v 0.000000 0.235547 1.578120
    +v -0.321543 0.235547 1.546560
    +v -0.619414 0.235547 1.455820
    +v -0.597183 0.185303 1.403570
    +v -0.597183 0.185303 1.403570
    +v -0.310002 0.185303 1.491050
    +v -0.321543 0.235547 1.546560
    +v -0.619414 0.235547 1.455820
    +v -0.887695 0.235547 1.311820
    +v -0.855835 0.185303 1.264730
    +v -0.855835 0.185303 1.264730
    +v -0.597183 0.185303 1.403570
    +v -0.619414 0.235547 1.455820
    +v -0.887695 0.235547 1.311820
    +v -1.120470 0.235547 1.120470
    +v -1.080250 0.185303 1.080250
    +v -1.080250 0.185303 1.080250
    +v -0.855835 0.185303 1.264730
    +v -0.887695 0.235547 1.311820
    +v -1.120470 0.235547 1.120470
    +v -1.311820 0.235547 0.887695
    +v -1.264730 0.185303 0.855835
    +v -1.264730 0.185303 0.855835
    +v -1.080250 0.185303 1.080250
    +v -1.120470 0.235547 1.120470
    +v -1.311820 0.235547 0.887695
    +v -1.455820 0.235547 0.619414
    +v -1.403570 0.185303 0.597183
    +v -1.403570 0.185303 0.597183
    +v -1.264730 0.185303 0.855835
    +v -1.311820 0.235547 0.887695
    +v -1.455820 0.235547 0.619414
    +v -1.546560 0.235547 0.321543
    +v -1.491050 0.185303 0.310002
    +v -1.491050 0.185303 0.310002
    +v -1.403570 0.185303 0.597183
    +v -1.455820 0.235547 0.619414
    +v -1.546560 0.235547 0.321543
    +v -1.578120 0.235547 0.000000
    +v -1.521480 0.185303 0.000000
    +v -1.521480 0.185303 0.000000
    +v -1.491050 0.185303 0.310002
    +v -1.546560 0.235547 0.321543
    +v 0.000000 0.185303 1.521480
    +v -0.310002 0.185303 1.491050
    +v -0.305625 0.150000 1.470000
    +v -0.305625 0.150000 1.470000
    +v 0.000000 0.150000 1.500000
    +v 0.000000 0.185303 1.521480
    +v -0.310002 0.185303 1.491050
    +v -0.597183 0.185303 1.403570
    +v -0.588750 0.150000 1.383750
    +v -0.588750 0.150000 1.383750
    +v -0.305625 0.150000 1.470000
    +v -0.310002 0.185303 1.491050
    +v -0.597183 0.185303 1.403570
    +v -0.855835 0.185303 1.264730
    +v -0.843750 0.150000 1.246870
    +v -0.843750 0.150000 1.246870
    +v -0.588750 0.150000 1.383750
    +v -0.597183 0.185303 1.403570
    +v -0.855835 0.185303 1.264730
    +v -1.080250 0.185303 1.080250
    +v -1.065000 0.150000 1.065000
    +v -1.065000 0.150000 1.065000
    +v -0.843750 0.150000 1.246870
    +v -0.855835 0.185303 1.264730
    +v -1.080250 0.185303 1.080250
    +v -1.264730 0.185303 0.855835
    +v -1.246870 0.150000 0.843750
    +v -1.246870 0.150000 0.843750
    +v -1.065000 0.150000 1.065000
    +v -1.080250 0.185303 1.080250
    +v -1.264730 0.185303 0.855835
    +v -1.403570 0.185303 0.597183
    +v -1.383750 0.150000 0.588750
    +v -1.383750 0.150000 0.588750
    +v -1.246870 0.150000 0.843750
    +v -1.264730 0.185303 0.855835
    +v -1.403570 0.185303 0.597183
    +v -1.491050 0.185303 0.310002
    +v -1.470000 0.150000 0.305625
    +v -1.470000 0.150000 0.305625
    +v -1.383750 0.150000 0.588750
    +v -1.403570 0.185303 0.597183
    +v -1.491050 0.185303 0.310002
    +v -1.521480 0.185303 0.000000
    +v -1.500000 0.150000 -0.000000
    +v -1.500000 0.150000 -0.000000
    +v -1.470000 0.150000 0.305625
    +v -1.491050 0.185303 0.310002
    +v -2.000000 0.900000 0.000000
    +v -1.960000 0.900000 -0.407500
    +v -1.938950 0.741650 -0.403123
    +v -1.938950 0.741650 -0.403123
    +v -1.978520 0.741650 0.000000
    +v -2.000000 0.900000 0.000000
    +v -1.960000 0.900000 -0.407500
    +v -1.845000 0.900000 -0.785000
    +v -1.825180 0.741650 -0.776567
    +v -1.825180 0.741650 -0.776567
    +v -1.938950 0.741650 -0.403123
    +v -1.960000 0.900000 -0.407500
    +v -1.845000 0.900000 -0.785000
    +v -1.662500 0.900000 -1.125000
    +v -1.644640 0.741650 -1.112920
    +v -1.644640 0.741650 -1.112920
    +v -1.825180 0.741650 -0.776567
    +v -1.845000 0.900000 -0.785000
    +v -1.662500 0.900000 -1.125000
    +v -1.420000 0.900000 -1.420000
    +v -1.404750 0.741650 -1.404750
    +v -1.404750 0.741650 -1.404750
    +v -1.644640 0.741650 -1.112920
    +v -1.662500 0.900000 -1.125000
    +v -1.420000 0.900000 -1.420000
    +v -1.125000 0.900000 -1.662500
    +v -1.112920 0.741650 -1.644640
    +v -1.112920 0.741650 -1.644640
    +v -1.404750 0.741650 -1.404750
    +v -1.420000 0.900000 -1.420000
    +v -1.125000 0.900000 -1.662500
    +v -0.785000 0.900000 -1.845000
    +v -0.776567 0.741650 -1.825180
    +v -0.776567 0.741650 -1.825180
    +v -1.112920 0.741650 -1.644640
    +v -1.125000 0.900000 -1.662500
    +v -0.785000 0.900000 -1.845000
    +v -0.407500 0.900000 -1.960000
    +v -0.403123 0.741650 -1.938950
    +v -0.403123 0.741650 -1.938950
    +v -0.776567 0.741650 -1.825180
    +v -0.785000 0.900000 -1.845000
    +v -0.407500 0.900000 -1.960000
    +v 0.000000 0.900000 -2.000000
    +v 0.000000 0.741650 -1.978520
    +v 0.000000 0.741650 -1.978520
    +v -0.403123 0.741650 -1.938950
    +v -0.407500 0.900000 -1.960000
    +v -1.978520 0.741650 0.000000
    +v -1.938950 0.741650 -0.403123
    +v -1.883440 0.603516 -0.391582
    +v -1.883440 0.603516 -0.391582
    +v -1.921880 0.603516 0.000000
    +v -1.978520 0.741650 0.000000
    +v -1.938950 0.741650 -0.403123
    +v -1.825180 0.741650 -0.776567
    +v -1.772930 0.603516 -0.754336
    +v -1.772930 0.603516 -0.754336
    +v -1.883440 0.603516 -0.391582
    +v -1.938950 0.741650 -0.403123
    +v -1.825180 0.741650 -0.776567
    +v -1.644640 0.741650 -1.112920
    +v -1.597560 0.603516 -1.081050
    +v -1.597560 0.603516 -1.081050
    +v -1.772930 0.603516 -0.754336
    +v -1.825180 0.741650 -0.776567
    +v -1.644640 0.741650 -1.112920
    +v -1.404750 0.741650 -1.404750
    +v -1.364530 0.603516 -1.364530
    +v -1.364530 0.603516 -1.364530
    +v -1.597560 0.603516 -1.081050
    +v -1.644640 0.741650 -1.112920
    +v -1.404750 0.741650 -1.404750
    +v -1.112920 0.741650 -1.644640
    +v -1.081050 0.603516 -1.597560
    +v -1.081050 0.603516 -1.597560
    +v -1.364530 0.603516 -1.364530
    +v -1.404750 0.741650 -1.404750
    +v -1.112920 0.741650 -1.644640
    +v -0.776567 0.741650 -1.825180
    +v -0.754336 0.603516 -1.772930
    +v -0.754336 0.603516 -1.772930
    +v -1.081050 0.603516 -1.597560
    +v -1.112920 0.741650 -1.644640
    +v -0.776567 0.741650 -1.825180
    +v -0.403123 0.741650 -1.938950
    +v -0.391582 0.603516 -1.883440
    +v -0.391582 0.603516 -1.883440
    +v -0.754336 0.603516 -1.772930
    +v -0.776567 0.741650 -1.825180
    +v -0.403123 0.741650 -1.938950
    +v 0.000000 0.741650 -1.978520
    +v 0.000000 0.603516 -1.921880
    +v 0.000000 0.603516 -1.921880
    +v -0.391582 0.603516 -1.883440
    +v -0.403123 0.741650 -1.938950
    +v -1.921880 0.603516 0.000000
    +v -1.883440 0.603516 -0.391582
    +v -1.804960 0.484717 -0.375266
    +v -1.804960 0.484717 -0.375266
    +v -1.841800 0.484717 0.000000
    +v -1.921880 0.603516 0.000000
    +v -1.883440 0.603516 -0.391582
    +v -1.772930 0.603516 -0.754336
    +v -1.699060 0.484717 -0.722905
    +v -1.699060 0.484717 -0.722905
    +v -1.804960 0.484717 -0.375266
    +v -1.883440 0.603516 -0.391582
    +v -1.772930 0.603516 -0.754336
    +v -1.597560 0.603516 -1.081050
    +v -1.530990 0.484717 -1.036010
    +v -1.530990 0.484717 -1.036010
    +v -1.699060 0.484717 -0.722905
    +v -1.772930 0.603516 -0.754336
    +v -1.597560 0.603516 -1.081050
    +v -1.364530 0.603516 -1.364530
    +v -1.307680 0.484717 -1.307680
    +v -1.307680 0.484717 -1.307680
    +v -1.530990 0.484717 -1.036010
    +v -1.597560 0.603516 -1.081050
    +v -1.364530 0.603516 -1.364530
    +v -1.081050 0.603516 -1.597560
    +v -1.036010 0.484717 -1.530990
    +v -1.036010 0.484717 -1.530990
    +v -1.307680 0.484717 -1.307680
    +v -1.364530 0.603516 -1.364530
    +v -1.081050 0.603516 -1.597560
    +v -0.754336 0.603516 -1.772930
    +v -0.722905 0.484717 -1.699060
    +v -0.722905 0.484717 -1.699060
    +v -1.036010 0.484717 -1.530990
    +v -1.081050 0.603516 -1.597560
    +v -0.754336 0.603516 -1.772930
    +v -0.391582 0.603516 -1.883440
    +v -0.375266 0.484717 -1.804960
    +v -0.375266 0.484717 -1.804960
    +v -0.722905 0.484717 -1.699060
    +v -0.754336 0.603516 -1.772930
    +v -0.391582 0.603516 -1.883440
    +v 0.000000 0.603516 -1.921880
    +v 0.000000 0.484717 -1.841800
    +v 0.000000 0.484717 -1.841800
    +v -0.375266 0.484717 -1.804960
    +v -0.391582 0.603516 -1.883440
    +v -1.841800 0.484717 0.000000
    +v -1.804960 0.484717 -0.375266
    +v -1.715000 0.384375 -0.356563
    +v -1.715000 0.384375 -0.356563
    +v -1.750000 0.384375 0.000000
    +v -1.841800 0.484717 0.000000
    +v -1.804960 0.484717 -0.375266
    +v -1.699060 0.484717 -0.722905
    +v -1.614370 0.384375 -0.686875
    +v -1.614370 0.384375 -0.686875
    +v -1.715000 0.384375 -0.356563
    +v -1.804960 0.484717 -0.375266
    +v -1.699060 0.484717 -0.722905
    +v -1.530990 0.484717 -1.036010
    +v -1.454690 0.384375 -0.984375
    +v -1.454690 0.384375 -0.984375
    +v -1.614370 0.384375 -0.686875
    +v -1.699060 0.484717 -0.722905
    +v -1.530990 0.484717 -1.036010
    +v -1.307680 0.484717 -1.307680
    +v -1.242500 0.384375 -1.242500
    +v -1.242500 0.384375 -1.242500
    +v -1.454690 0.384375 -0.984375
    +v -1.530990 0.484717 -1.036010
    +v -1.307680 0.484717 -1.307680
    +v -1.036010 0.484717 -1.530990
    +v -0.984375 0.384375 -1.454690
    +v -0.984375 0.384375 -1.454690
    +v -1.242500 0.384375 -1.242500
    +v -1.307680 0.484717 -1.307680
    +v -1.036010 0.484717 -1.530990
    +v -0.722905 0.484717 -1.699060
    +v -0.686875 0.384375 -1.614370
    +v -0.686875 0.384375 -1.614370
    +v -0.984375 0.384375 -1.454690
    +v -1.036010 0.484717 -1.530990
    +v -0.722905 0.484717 -1.699060
    +v -0.375266 0.484717 -1.804960
    +v -0.356562 0.384375 -1.715000
    +v -0.356562 0.384375 -1.715000
    +v -0.686875 0.384375 -1.614370
    +v -0.722905 0.484717 -1.699060
    +v -0.375266 0.484717 -1.804960
    +v 0.000000 0.484717 -1.841800
    +v 0.000000 0.384375 -1.750000
    +v 0.000000 0.384375 -1.750000
    +v -0.356562 0.384375 -1.715000
    +v -0.375266 0.484717 -1.804960
    +v -1.750000 0.384375 0.000000
    +v -1.715000 0.384375 -0.356563
    +v -1.625040 0.301611 -0.337859
    +v -1.625040 0.301611 -0.337859
    +v -1.658200 0.301611 0.000000
    +v -1.750000 0.384375 0.000000
    +v -1.715000 0.384375 -0.356563
    +v -1.614370 0.384375 -0.686875
    +v -1.529690 0.301611 -0.650845
    +v -1.529690 0.301611 -0.650845
    +v -1.625040 0.301611 -0.337859
    +v -1.715000 0.384375 -0.356563
    +v -1.614370 0.384375 -0.686875
    +v -1.454690 0.384375 -0.984375
    +v -1.378380 0.301611 -0.932739
    +v -1.378380 0.301611 -0.932739
    +v -1.529690 0.301611 -0.650845
    +v -1.614370 0.384375 -0.686875
    +v -1.454690 0.384375 -0.984375
    +v -1.242500 0.384375 -1.242500
    +v -1.177320 0.301611 -1.177320
    +v -1.177320 0.301611 -1.177320
    +v -1.378380 0.301611 -0.932739
    +v -1.454690 0.384375 -0.984375
    +v -1.242500 0.384375 -1.242500
    +v -0.984375 0.384375 -1.454690
    +v -0.932739 0.301611 -1.378380
    +v -0.932739 0.301611 -1.378380
    +v -1.177320 0.301611 -1.177320
    +v -1.242500 0.384375 -1.242500
    +v -0.984375 0.384375 -1.454690
    +v -0.686875 0.384375 -1.614370
    +v -0.650845 0.301611 -1.529690
    +v -0.650845 0.301611 -1.529690
    +v -0.932739 0.301611 -1.378380
    +v -0.984375 0.384375 -1.454690
    +v -0.686875 0.384375 -1.614370
    +v -0.356562 0.384375 -1.715000
    +v -0.337859 0.301611 -1.625040
    +v -0.337859 0.301611 -1.625040
    +v -0.650845 0.301611 -1.529690
    +v -0.686875 0.384375 -1.614370
    +v -0.356562 0.384375 -1.715000
    +v 0.000000 0.384375 -1.750000
    +v 0.000000 0.301611 -1.658200
    +v 0.000000 0.301611 -1.658200
    +v -0.337859 0.301611 -1.625040
    +v -0.356562 0.384375 -1.715000
    +v -1.658200 0.301611 0.000000
    +v -1.625040 0.301611 -0.337859
    +v -1.546560 0.235547 -0.321543
    +v -1.546560 0.235547 -0.321543
    +v -1.578120 0.235547 0.000000
    +v -1.658200 0.301611 0.000000
    +v -1.625040 0.301611 -0.337859
    +v -1.529690 0.301611 -0.650845
    +v -1.455820 0.235547 -0.619414
    +v -1.455820 0.235547 -0.619414
    +v -1.546560 0.235547 -0.321543
    +v -1.625040 0.301611 -0.337859
    +v -1.529690 0.301611 -0.650845
    +v -1.378380 0.301611 -0.932739
    +v -1.311820 0.235547 -0.887695
    +v -1.311820 0.235547 -0.887695
    +v -1.455820 0.235547 -0.619414
    +v -1.529690 0.301611 -0.650845
    +v -1.378380 0.301611 -0.932739
    +v -1.177320 0.301611 -1.177320
    +v -1.120470 0.235547 -1.120470
    +v -1.120470 0.235547 -1.120470
    +v -1.311820 0.235547 -0.887695
    +v -1.378380 0.301611 -0.932739
    +v -1.177320 0.301611 -1.177320
    +v -0.932739 0.301611 -1.378380
    +v -0.887695 0.235547 -1.311820
    +v -0.887695 0.235547 -1.311820
    +v -1.120470 0.235547 -1.120470
    +v -1.177320 0.301611 -1.177320
    +v -0.932739 0.301611 -1.378380
    +v -0.650845 0.301611 -1.529690
    +v -0.619414 0.235547 -1.455820
    +v -0.619414 0.235547 -1.455820
    +v -0.887695 0.235547 -1.311820
    +v -0.932739 0.301611 -1.378380
    +v -0.650845 0.301611 -1.529690
    +v -0.337859 0.301611 -1.625040
    +v -0.321543 0.235547 -1.546560
    +v -0.321543 0.235547 -1.546560
    +v -0.619414 0.235547 -1.455820
    +v -0.650845 0.301611 -1.529690
    +v -0.337859 0.301611 -1.625040
    +v 0.000000 0.301611 -1.658200
    +v -0.000000 0.235547 -1.578120
    +v -0.000000 0.235547 -1.578120
    +v -0.321543 0.235547 -1.546560
    +v -0.337859 0.301611 -1.625040
    +v -1.578120 0.235547 0.000000
    +v -1.546560 0.235547 -0.321543
    +v -1.491050 0.185303 -0.310002
    +v -1.491050 0.185303 -0.310002
    +v -1.521480 0.185303 0.000000
    +v -1.578120 0.235547 0.000000
    +v -1.546560 0.235547 -0.321543
    +v -1.455820 0.235547 -0.619414
    +v -1.403570 0.185303 -0.597183
    +v -1.403570 0.185303 -0.597183
    +v -1.491050 0.185303 -0.310002
    +v -1.546560 0.235547 -0.321543
    +v -1.455820 0.235547 -0.619414
    +v -1.311820 0.235547 -0.887695
    +v -1.264730 0.185303 -0.855835
    +v -1.264730 0.185303 -0.855835
    +v -1.403570 0.185303 -0.597183
    +v -1.455820 0.235547 -0.619414
    +v -1.311820 0.235547 -0.887695
    +v -1.120470 0.235547 -1.120470
    +v -1.080250 0.185303 -1.080250
    +v -1.080250 0.185303 -1.080250
    +v -1.264730 0.185303 -0.855835
    +v -1.311820 0.235547 -0.887695
    +v -1.120470 0.235547 -1.120470
    +v -0.887695 0.235547 -1.311820
    +v -0.855835 0.185303 -1.264730
    +v -0.855835 0.185303 -1.264730
    +v -1.080250 0.185303 -1.080250
    +v -1.120470 0.235547 -1.120470
    +v -0.887695 0.235547 -1.311820
    +v -0.619414 0.235547 -1.455820
    +v -0.597183 0.185303 -1.403570
    +v -0.597183 0.185303 -1.403570
    +v -0.855835 0.185303 -1.264730
    +v -0.887695 0.235547 -1.311820
    +v -0.619414 0.235547 -1.455820
    +v -0.321543 0.235547 -1.546560
    +v -0.310002 0.185303 -1.491050
    +v -0.310002 0.185303 -1.491050
    +v -0.597183 0.185303 -1.403570
    +v -0.619414 0.235547 -1.455820
    +v -0.321543 0.235547 -1.546560
    +v -0.000000 0.235547 -1.578120
    +v -0.000000 0.185303 -1.521480
    +v -0.000000 0.185303 -1.521480
    +v -0.310002 0.185303 -1.491050
    +v -0.321543 0.235547 -1.546560
    +v -1.521480 0.185303 0.000000
    +v -1.491050 0.185303 -0.310002
    +v -1.470000 0.150000 -0.305625
    +v -1.470000 0.150000 -0.305625
    +v -1.500000 0.150000 0.000000
    +v -1.521480 0.185303 0.000000
    +v -1.491050 0.185303 -0.310002
    +v -1.403570 0.185303 -0.597183
    +v -1.383750 0.150000 -0.588750
    +v -1.383750 0.150000 -0.588750
    +v -1.470000 0.150000 -0.305625
    +v -1.491050 0.185303 -0.310002
    +v -1.403570 0.185303 -0.597183
    +v -1.264730 0.185303 -0.855835
    +v -1.246870 0.150000 -0.843750
    +v -1.246870 0.150000 -0.843750
    +v -1.383750 0.150000 -0.588750
    +v -1.403570 0.185303 -0.597183
    +v -1.264730 0.185303 -0.855835
    +v -1.080250 0.185303 -1.080250
    +v -1.065000 0.150000 -1.065000
    +v -1.065000 0.150000 -1.065000
    +v -1.246870 0.150000 -0.843750
    +v -1.264730 0.185303 -0.855835
    +v -1.080250 0.185303 -1.080250
    +v -0.855835 0.185303 -1.264730
    +v -0.843750 0.150000 -1.246870
    +v -0.843750 0.150000 -1.246870
    +v -1.065000 0.150000 -1.065000
    +v -1.080250 0.185303 -1.080250
    +v -0.855835 0.185303 -1.264730
    +v -0.597183 0.185303 -1.403570
    +v -0.588750 0.150000 -1.383750
    +v -0.588750 0.150000 -1.383750
    +v -0.843750 0.150000 -1.246870
    +v -0.855835 0.185303 -1.264730
    +v -0.597183 0.185303 -1.403570
    +v -0.310002 0.185303 -1.491050
    +v -0.305625 0.150000 -1.470000
    +v -0.305625 0.150000 -1.470000
    +v -0.588750 0.150000 -1.383750
    +v -0.597183 0.185303 -1.403570
    +v -0.310002 0.185303 -1.491050
    +v -0.000000 0.185303 -1.521480
    +v 0.000000 0.150000 -1.500000
    +v 0.000000 0.150000 -1.500000
    +v -0.305625 0.150000 -1.470000
    +v -0.310002 0.185303 -1.491050
    +v 0.000000 0.900000 -2.000000
    +v 0.407500 0.900000 -1.960000
    +v 0.403123 0.741650 -1.938950
    +v 0.403123 0.741650 -1.938950
    +v 0.000000 0.741650 -1.978520
    +v 0.000000 0.900000 -2.000000
    +v 0.407500 0.900000 -1.960000
    +v 0.785000 0.900000 -1.845000
    +v 0.776567 0.741650 -1.825180
    +v 0.776567 0.741650 -1.825180
    +v 0.403123 0.741650 -1.938950
    +v 0.407500 0.900000 -1.960000
    +v 0.785000 0.900000 -1.845000
    +v 1.125000 0.900000 -1.662500
    +v 1.112920 0.741650 -1.644640
    +v 1.112920 0.741650 -1.644640
    +v 0.776567 0.741650 -1.825180
    +v 0.785000 0.900000 -1.845000
    +v 1.125000 0.900000 -1.662500
    +v 1.420000 0.900000 -1.420000
    +v 1.404750 0.741650 -1.404750
    +v 1.404750 0.741650 -1.404750
    +v 1.112920 0.741650 -1.644640
    +v 1.125000 0.900000 -1.662500
    +v 1.420000 0.900000 -1.420000
    +v 1.662500 0.900000 -1.125000
    +v 1.644640 0.741650 -1.112920
    +v 1.644640 0.741650 -1.112920
    +v 1.404750 0.741650 -1.404750
    +v 1.420000 0.900000 -1.420000
    +v 1.662500 0.900000 -1.125000
    +v 1.845000 0.900000 -0.785000
    +v 1.825180 0.741650 -0.776567
    +v 1.825180 0.741650 -0.776567
    +v 1.644640 0.741650 -1.112920
    +v 1.662500 0.900000 -1.125000
    +v 1.845000 0.900000 -0.785000
    +v 1.960000 0.900000 -0.407500
    +v 1.938950 0.741650 -0.403123
    +v 1.938950 0.741650 -0.403123
    +v 1.825180 0.741650 -0.776567
    +v 1.845000 0.900000 -0.785000
    +v 1.960000 0.900000 -0.407500
    +v 2.000000 0.900000 0.000000
    +v 1.978520 0.741650 0.000000
    +v 1.978520 0.741650 0.000000
    +v 1.938950 0.741650 -0.403123
    +v 1.960000 0.900000 -0.407500
    +v 0.000000 0.741650 -1.978520
    +v 0.403123 0.741650 -1.938950
    +v 0.391582 0.603516 -1.883440
    +v 0.391582 0.603516 -1.883440
    +v 0.000000 0.603516 -1.921880
    +v 0.000000 0.741650 -1.978520
    +v 0.403123 0.741650 -1.938950
    +v 0.776567 0.741650 -1.825180
    +v 0.754336 0.603516 -1.772930
    +v 0.754336 0.603516 -1.772930
    +v 0.391582 0.603516 -1.883440
    +v 0.403123 0.741650 -1.938950
    +v 0.776567 0.741650 -1.825180
    +v 1.112920 0.741650 -1.644640
    +v 1.081050 0.603516 -1.597560
    +v 1.081050 0.603516 -1.597560
    +v 0.754336 0.603516 -1.772930
    +v 0.776567 0.741650 -1.825180
    +v 1.112920 0.741650 -1.644640
    +v 1.404750 0.741650 -1.404750
    +v 1.364530 0.603516 -1.364530
    +v 1.364530 0.603516 -1.364530
    +v 1.081050 0.603516 -1.597560
    +v 1.112920 0.741650 -1.644640
    +v 1.404750 0.741650 -1.404750
    +v 1.644640 0.741650 -1.112920
    +v 1.597560 0.603516 -1.081050
    +v 1.597560 0.603516 -1.081050
    +v 1.364530 0.603516 -1.364530
    +v 1.404750 0.741650 -1.404750
    +v 1.644640 0.741650 -1.112920
    +v 1.825180 0.741650 -0.776567
    +v 1.772930 0.603516 -0.754336
    +v 1.772930 0.603516 -0.754336
    +v 1.597560 0.603516 -1.081050
    +v 1.644640 0.741650 -1.112920
    +v 1.825180 0.741650 -0.776567
    +v 1.938950 0.741650 -0.403123
    +v 1.883440 0.603516 -0.391582
    +v 1.883440 0.603516 -0.391582
    +v 1.772930 0.603516 -0.754336
    +v 1.825180 0.741650 -0.776567
    +v 1.938950 0.741650 -0.403123
    +v 1.978520 0.741650 0.000000
    +v 1.921880 0.603516 0.000000
    +v 1.921880 0.603516 0.000000
    +v 1.883440 0.603516 -0.391582
    +v 1.938950 0.741650 -0.403123
    +v 0.000000 0.603516 -1.921880
    +v 0.391582 0.603516 -1.883440
    +v 0.375266 0.484717 -1.804960
    +v 0.375266 0.484717 -1.804960
    +v 0.000000 0.484717 -1.841800
    +v 0.000000 0.603516 -1.921880
    +v 0.391582 0.603516 -1.883440
    +v 0.754336 0.603516 -1.772930
    +v 0.722905 0.484717 -1.699060
    +v 0.722905 0.484717 -1.699060
    +v 0.375266 0.484717 -1.804960
    +v 0.391582 0.603516 -1.883440
    +v 0.754336 0.603516 -1.772930
    +v 1.081050 0.603516 -1.597560
    +v 1.036010 0.484717 -1.530990
    +v 1.036010 0.484717 -1.530990
    +v 0.722905 0.484717 -1.699060
    +v 0.754336 0.603516 -1.772930
    +v 1.081050 0.603516 -1.597560
    +v 1.364530 0.603516 -1.364530
    +v 1.307680 0.484717 -1.307680
    +v 1.307680 0.484717 -1.307680
    +v 1.036010 0.484717 -1.530990
    +v 1.081050 0.603516 -1.597560
    +v 1.364530 0.603516 -1.364530
    +v 1.597560 0.603516 -1.081050
    +v 1.530990 0.484717 -1.036010
    +v 1.530990 0.484717 -1.036010
    +v 1.307680 0.484717 -1.307680
    +v 1.364530 0.603516 -1.364530
    +v 1.597560 0.603516 -1.081050
    +v 1.772930 0.603516 -0.754336
    +v 1.699060 0.484717 -0.722905
    +v 1.699060 0.484717 -0.722905
    +v 1.530990 0.484717 -1.036010
    +v 1.597560 0.603516 -1.081050
    +v 1.772930 0.603516 -0.754336
    +v 1.883440 0.603516 -0.391582
    +v 1.804960 0.484717 -0.375266
    +v 1.804960 0.484717 -0.375266
    +v 1.699060 0.484717 -0.722905
    +v 1.772930 0.603516 -0.754336
    +v 1.883440 0.603516 -0.391582
    +v 1.921880 0.603516 0.000000
    +v 1.841800 0.484717 0.000000
    +v 1.841800 0.484717 0.000000
    +v 1.804960 0.484717 -0.375266
    +v 1.883440 0.603516 -0.391582
    +v 0.000000 0.484717 -1.841800
    +v 0.375266 0.484717 -1.804960
    +v 0.356563 0.384375 -1.715000
    +v 0.356563 0.384375 -1.715000
    +v 0.000000 0.384375 -1.750000
    +v 0.000000 0.484717 -1.841800
    +v 0.375266 0.484717 -1.804960
    +v 0.722905 0.484717 -1.699060
    +v 0.686875 0.384375 -1.614370
    +v 0.686875 0.384375 -1.614370
    +v 0.356563 0.384375 -1.715000
    +v 0.375266 0.484717 -1.804960
    +v 0.722905 0.484717 -1.699060
    +v 1.036010 0.484717 -1.530990
    +v 0.984375 0.384375 -1.454690
    +v 0.984375 0.384375 -1.454690
    +v 0.686875 0.384375 -1.614370
    +v 0.722905 0.484717 -1.699060
    +v 1.036010 0.484717 -1.530990
    +v 1.307680 0.484717 -1.307680
    +v 1.242500 0.384375 -1.242500
    +v 1.242500 0.384375 -1.242500
    +v 0.984375 0.384375 -1.454690
    +v 1.036010 0.484717 -1.530990
    +v 1.307680 0.484717 -1.307680
    +v 1.530990 0.484717 -1.036010
    +v 1.454690 0.384375 -0.984375
    +v 1.454690 0.384375 -0.984375
    +v 1.242500 0.384375 -1.242500
    +v 1.307680 0.484717 -1.307680
    +v 1.530990 0.484717 -1.036010
    +v 1.699060 0.484717 -0.722905
    +v 1.614370 0.384375 -0.686875
    +v 1.614370 0.384375 -0.686875
    +v 1.454690 0.384375 -0.984375
    +v 1.530990 0.484717 -1.036010
    +v 1.699060 0.484717 -0.722905
    +v 1.804960 0.484717 -0.375266
    +v 1.715000 0.384375 -0.356562
    +v 1.715000 0.384375 -0.356562
    +v 1.614370 0.384375 -0.686875
    +v 1.699060 0.484717 -0.722905
    +v 1.804960 0.484717 -0.375266
    +v 1.841800 0.484717 0.000000
    +v 1.750000 0.384375 0.000000
    +v 1.750000 0.384375 0.000000
    +v 1.715000 0.384375 -0.356562
    +v 1.804960 0.484717 -0.375266
    +v 0.000000 0.384375 -1.750000
    +v 0.356563 0.384375 -1.715000
    +v 0.337859 0.301611 -1.625040
    +v 0.337859 0.301611 -1.625040
    +v 0.000000 0.301611 -1.658200
    +v 0.000000 0.384375 -1.750000
    +v 0.356563 0.384375 -1.715000
    +v 0.686875 0.384375 -1.614370
    +v 0.650845 0.301611 -1.529690
    +v 0.650845 0.301611 -1.529690
    +v 0.337859 0.301611 -1.625040
    +v 0.356563 0.384375 -1.715000
    +v 0.686875 0.384375 -1.614370
    +v 0.984375 0.384375 -1.454690
    +v 0.932739 0.301611 -1.378380
    +v 0.932739 0.301611 -1.378380
    +v 0.650845 0.301611 -1.529690
    +v 0.686875 0.384375 -1.614370
    +v 0.984375 0.384375 -1.454690
    +v 1.242500 0.384375 -1.242500
    +v 1.177320 0.301611 -1.177320
    +v 1.177320 0.301611 -1.177320
    +v 0.932739 0.301611 -1.378380
    +v 0.984375 0.384375 -1.454690
    +v 1.242500 0.384375 -1.242500
    +v 1.454690 0.384375 -0.984375
    +v 1.378380 0.301611 -0.932739
    +v 1.378380 0.301611 -0.932739
    +v 1.177320 0.301611 -1.177320
    +v 1.242500 0.384375 -1.242500
    +v 1.454690 0.384375 -0.984375
    +v 1.614370 0.384375 -0.686875
    +v 1.529690 0.301611 -0.650845
    +v 1.529690 0.301611 -0.650845
    +v 1.378380 0.301611 -0.932739
    +v 1.454690 0.384375 -0.984375
    +v 1.614370 0.384375 -0.686875
    +v 1.715000 0.384375 -0.356562
    +v 1.625040 0.301611 -0.337859
    +v 1.625040 0.301611 -0.337859
    +v 1.529690 0.301611 -0.650845
    +v 1.614370 0.384375 -0.686875
    +v 1.715000 0.384375 -0.356562
    +v 1.750000 0.384375 0.000000
    +v 1.658200 0.301611 0.000000
    +v 1.658200 0.301611 0.000000
    +v 1.625040 0.301611 -0.337859
    +v 1.715000 0.384375 -0.356562
    +v 0.000000 0.301611 -1.658200
    +v 0.337859 0.301611 -1.625040
    +v 0.321543 0.235547 -1.546560
    +v 0.321543 0.235547 -1.546560
    +v 0.000000 0.235547 -1.578120
    +v 0.000000 0.301611 -1.658200
    +v 0.337859 0.301611 -1.625040
    +v 0.650845 0.301611 -1.529690
    +v 0.619414 0.235547 -1.455820
    +v 0.619414 0.235547 -1.455820
    +v 0.321543 0.235547 -1.546560
    +v 0.337859 0.301611 -1.625040
    +v 0.650845 0.301611 -1.529690
    +v 0.932739 0.301611 -1.378380
    +v 0.887695 0.235547 -1.311820
    +v 0.887695 0.235547 -1.311820
    +v 0.619414 0.235547 -1.455820
    +v 0.650845 0.301611 -1.529690
    +v 0.932739 0.301611 -1.378380
    +v 1.177320 0.301611 -1.177320
    +v 1.120470 0.235547 -1.120470
    +v 1.120470 0.235547 -1.120470
    +v 0.887695 0.235547 -1.311820
    +v 0.932739 0.301611 -1.378380
    +v 1.177320 0.301611 -1.177320
    +v 1.378380 0.301611 -0.932739
    +v 1.311820 0.235547 -0.887695
    +v 1.311820 0.235547 -0.887695
    +v 1.120470 0.235547 -1.120470
    +v 1.177320 0.301611 -1.177320
    +v 1.378380 0.301611 -0.932739
    +v 1.529690 0.301611 -0.650845
    +v 1.455820 0.235547 -0.619414
    +v 1.455820 0.235547 -0.619414
    +v 1.311820 0.235547 -0.887695
    +v 1.378380 0.301611 -0.932739
    +v 1.529690 0.301611 -0.650845
    +v 1.625040 0.301611 -0.337859
    +v 1.546560 0.235547 -0.321543
    +v 1.546560 0.235547 -0.321543
    +v 1.455820 0.235547 -0.619414
    +v 1.529690 0.301611 -0.650845
    +v 1.625040 0.301611 -0.337859
    +v 1.658200 0.301611 0.000000
    +v 1.578120 0.235547 -0.000000
    +v 1.578120 0.235547 -0.000000
    +v 1.546560 0.235547 -0.321543
    +v 1.625040 0.301611 -0.337859
    +v 0.000000 0.235547 -1.578120
    +v 0.321543 0.235547 -1.546560
    +v 0.310002 0.185303 -1.491050
    +v 0.310002 0.185303 -1.491050
    +v 0.000000 0.185303 -1.521480
    +v 0.000000 0.235547 -1.578120
    +v 0.321543 0.235547 -1.546560
    +v 0.619414 0.235547 -1.455820
    +v 0.597183 0.185303 -1.403570
    +v 0.597183 0.185303 -1.403570
    +v 0.310002 0.185303 -1.491050
    +v 0.321543 0.235547 -1.546560
    +v 0.619414 0.235547 -1.455820
    +v 0.887695 0.235547 -1.311820
    +v 0.855835 0.185303 -1.264730
    +v 0.855835 0.185303 -1.264730
    +v 0.597183 0.185303 -1.403570
    +v 0.619414 0.235547 -1.455820
    +v 0.887695 0.235547 -1.311820
    +v 1.120470 0.235547 -1.120470
    +v 1.080250 0.185303 -1.080250
    +v 1.080250 0.185303 -1.080250
    +v 0.855835 0.185303 -1.264730
    +v 0.887695 0.235547 -1.311820
    +v 1.120470 0.235547 -1.120470
    +v 1.311820 0.235547 -0.887695
    +v 1.264730 0.185303 -0.855835
    +v 1.264730 0.185303 -0.855835
    +v 1.080250 0.185303 -1.080250
    +v 1.120470 0.235547 -1.120470
    +v 1.311820 0.235547 -0.887695
    +v 1.455820 0.235547 -0.619414
    +v 1.403570 0.185303 -0.597183
    +v 1.403570 0.185303 -0.597183
    +v 1.264730 0.185303 -0.855835
    +v 1.311820 0.235547 -0.887695
    +v 1.455820 0.235547 -0.619414
    +v 1.546560 0.235547 -0.321543
    +v 1.491050 0.185303 -0.310002
    +v 1.491050 0.185303 -0.310002
    +v 1.403570 0.185303 -0.597183
    +v 1.455820 0.235547 -0.619414
    +v 1.546560 0.235547 -0.321543
    +v 1.578120 0.235547 -0.000000
    +v 1.521480 0.185303 -0.000000
    +v 1.521480 0.185303 -0.000000
    +v 1.491050 0.185303 -0.310002
    +v 1.546560 0.235547 -0.321543
    +v 0.000000 0.185303 -1.521480
    +v 0.310002 0.185303 -1.491050
    +v 0.305625 0.150000 -1.470000
    +v 0.305625 0.150000 -1.470000
    +v 0.000000 0.150000 -1.500000
    +v 0.000000 0.185303 -1.521480
    +v 0.310002 0.185303 -1.491050
    +v 0.597183 0.185303 -1.403570
    +v 0.588750 0.150000 -1.383750
    +v 0.588750 0.150000 -1.383750
    +v 0.305625 0.150000 -1.470000
    +v 0.310002 0.185303 -1.491050
    +v 0.597183 0.185303 -1.403570
    +v 0.855835 0.185303 -1.264730
    +v 0.843750 0.150000 -1.246870
    +v 0.843750 0.150000 -1.246870
    +v 0.588750 0.150000 -1.383750
    +v 0.597183 0.185303 -1.403570
    +v 0.855835 0.185303 -1.264730
    +v 1.080250 0.185303 -1.080250
    +v 1.065000 0.150000 -1.065000
    +v 1.065000 0.150000 -1.065000
    +v 0.843750 0.150000 -1.246870
    +v 0.855835 0.185303 -1.264730
    +v 1.080250 0.185303 -1.080250
    +v 1.264730 0.185303 -0.855835
    +v 1.246870 0.150000 -0.843750
    +v 1.246870 0.150000 -0.843750
    +v 1.065000 0.150000 -1.065000
    +v 1.080250 0.185303 -1.080250
    +v 1.264730 0.185303 -0.855835
    +v 1.403570 0.185303 -0.597183
    +v 1.383750 0.150000 -0.588750
    +v 1.383750 0.150000 -0.588750
    +v 1.246870 0.150000 -0.843750
    +v 1.264730 0.185303 -0.855835
    +v 1.403570 0.185303 -0.597183
    +v 1.491050 0.185303 -0.310002
    +v 1.470000 0.150000 -0.305625
    +v 1.470000 0.150000 -0.305625
    +v 1.383750 0.150000 -0.588750
    +v 1.403570 0.185303 -0.597183
    +v 1.491050 0.185303 -0.310002
    +v 1.521480 0.185303 -0.000000
    +v 1.500000 0.150000 0.000000
    +v 1.500000 0.150000 0.000000
    +v 1.470000 0.150000 -0.305625
    +v 1.491050 0.185303 -0.310002
    +v -1.600000 2.025000 0.000000
    +v -1.595700 2.034670 0.098438
    +v -1.848380 2.034210 0.098438
    +v -1.848380 2.034210 0.098438
    +v -1.848240 2.024560 0.000000
    +v -1.600000 2.025000 0.000000
    +v -1.595700 2.034670 0.098438
    +v -1.584380 2.060160 0.168750
    +v -1.848760 2.059650 0.168750
    +v -1.848760 2.059650 0.168750
    +v -1.848380 2.034210 0.098438
    +v -1.595700 2.034670 0.098438
    +v -1.584380 2.060160 0.168750
    +v -1.568360 2.096190 0.210937
    +v -1.849290 2.095610 0.210937
    +v -1.849290 2.095610 0.210937
    +v -1.848760 2.059650 0.168750
    +v -1.584380 2.060160 0.168750
    +v -1.568360 2.096190 0.210937
    +v -1.550000 2.137500 0.225000
    +v -1.849900 2.136840 0.225000
    +v -1.849900 2.136840 0.225000
    +v -1.849290 2.095610 0.210937
    +v -1.568360 2.096190 0.210937
    +v -1.550000 2.137500 0.225000
    +v -1.531640 2.178810 0.210937
    +v -1.850510 2.178070 0.210937
    +v -1.850510 2.178070 0.210937
    +v -1.849900 2.136840 0.225000
    +v -1.550000 2.137500 0.225000
    +v -1.531640 2.178810 0.210937
    +v -1.515620 2.214840 0.168750
    +v -1.851040 2.214030 0.168750
    +v -1.851040 2.214030 0.168750
    +v -1.850510 2.178070 0.210937
    +v -1.531640 2.178810 0.210937
    +v -1.515620 2.214840 0.168750
    +v -1.504300 2.240330 0.098438
    +v -1.851420 2.239470 0.098438
    +v -1.851420 2.239470 0.098438
    +v -1.851040 2.214030 0.168750
    +v -1.515620 2.214840 0.168750
    +v -1.504300 2.240330 0.098438
    +v -1.500000 2.250000 0.000000
    +v -1.851560 2.249120 0.000000
    +v -1.851560 2.249120 0.000000
    +v -1.851420 2.239470 0.098438
    +v -1.504300 2.240330 0.098438
    +v -1.848240 2.024560 0.000000
    +v -1.848380 2.034210 0.098438
    +v -2.071010 2.031000 0.098438
    +v -2.071010 2.031000 0.098438
    +v -2.067190 2.021480 0.000000
    +v -1.848240 2.024560 0.000000
    +v -1.848380 2.034210 0.098438
    +v -1.848760 2.059650 0.168750
    +v -2.081100 2.056090 0.168750
    +v -2.081100 2.056090 0.168750
    +v -2.071010 2.031000 0.098438
    +v -1.848380 2.034210 0.098438
    +v -1.848760 2.059650 0.168750
    +v -1.849290 2.095610 0.210937
    +v -2.095370 2.091560 0.210937
    +v -2.095370 2.091560 0.210937
    +v -2.081100 2.056090 0.168750
    +v -1.848760 2.059650 0.168750
    +v -1.849290 2.095610 0.210937
    +v -1.849900 2.136840 0.225000
    +v -2.111720 2.132230 0.225000
    +v -2.111720 2.132230 0.225000
    +v -2.095370 2.091560 0.210937
    +v -1.849290 2.095610 0.210937
    +v -1.849900 2.136840 0.225000
    +v -1.850510 2.178070 0.210937
    +v -2.128070 2.172890 0.210937
    +v -2.128070 2.172890 0.210937
    +v -2.111720 2.132230 0.225000
    +v -1.849900 2.136840 0.225000
    +v -1.850510 2.178070 0.210937
    +v -1.851040 2.214030 0.168750
    +v -2.142330 2.208360 0.168750
    +v -2.142330 2.208360 0.168750
    +v -2.128070 2.172890 0.210937
    +v -1.850510 2.178070 0.210937
    +v -1.851040 2.214030 0.168750
    +v -1.851420 2.239470 0.098438
    +v -2.152420 2.233450 0.098438
    +v -2.152420 2.233450 0.098438
    +v -2.142330 2.208360 0.168750
    +v -1.851040 2.214030 0.168750
    +v -1.851420 2.239470 0.098438
    +v -1.851560 2.249120 0.000000
    +v -2.156250 2.242970 0.000000
    +v -2.156250 2.242970 0.000000
    +v -2.152420 2.233450 0.098438
    +v -1.851420 2.239470 0.098438
    +v -2.067190 2.021480 0.000000
    +v -2.071010 2.031000 0.098438
    +v -2.262470 2.022290 0.098438
    +v -2.262470 2.022290 0.098438
    +v -2.255660 2.013130 0.000000
    +v -2.067190 2.021480 0.000000
    +v -2.071010 2.031000 0.098438
    +v -2.081100 2.056090 0.168750
    +v -2.280410 2.046440 0.168750
    +v -2.280410 2.046440 0.168750
    +v -2.262470 2.022290 0.098438
    +v -2.071010 2.031000 0.098438
    +v -2.081100 2.056090 0.168750
    +v -2.095370 2.091560 0.210937
    +v -2.305780 2.080570 0.210937
    +v -2.305780 2.080570 0.210937
    +v -2.280410 2.046440 0.168750
    +v -2.081100 2.056090 0.168750
    +v -2.095370 2.091560 0.210937
    +v -2.111720 2.132230 0.225000
    +v -2.334860 2.119700 0.225000
    +v -2.334860 2.119700 0.225000
    +v -2.305780 2.080570 0.210937
    +v -2.095370 2.091560 0.210937
    +v -2.111720 2.132230 0.225000
    +v -2.128070 2.172890 0.210937
    +v -2.363940 2.158830 0.210937
    +v -2.363940 2.158830 0.210937
    +v -2.334860 2.119700 0.225000
    +v -2.111720 2.132230 0.225000
    +v -2.128070 2.172890 0.210937
    +v -2.142330 2.208360 0.168750
    +v -2.389310 2.192970 0.168750
    +v -2.389310 2.192970 0.168750
    +v -2.363940 2.158830 0.210937
    +v -2.128070 2.172890 0.210937
    +v -2.142330 2.208360 0.168750
    +v -2.152420 2.233450 0.098438
    +v -2.407260 2.217110 0.098438
    +v -2.407260 2.217110 0.098438
    +v -2.389310 2.192970 0.168750
    +v -2.142330 2.208360 0.168750
    +v -2.152420 2.233450 0.098438
    +v -2.156250 2.242970 0.000000
    +v -2.414060 2.226270 0.000000
    +v -2.414060 2.226270 0.000000
    +v -2.407260 2.217110 0.098438
    +v -2.152420 2.233450 0.098438
    +v -2.255660 2.013130 0.000000
    +v -2.262470 2.022290 0.098438
    +v -2.421630 2.005330 0.098438
    +v -2.421630 2.005330 0.098438
    +v -2.412500 1.996870 0.000000
    +v -2.255660 2.013130 0.000000
    +v -2.262470 2.022290 0.098438
    +v -2.280410 2.046440 0.168750
    +v -2.445700 2.027640 0.168750
    +v -2.445700 2.027640 0.168750
    +v -2.421630 2.005330 0.098438
    +v -2.262470 2.022290 0.098438
    +v -2.280410 2.046440 0.168750
    +v -2.305780 2.080570 0.210937
    +v -2.479740 2.059170 0.210937
    +v -2.479740 2.059170 0.210937
    +v -2.445700 2.027640 0.168750
    +v -2.280410 2.046440 0.168750
    +v -2.305780 2.080570 0.210937
    +v -2.334860 2.119700 0.225000
    +v -2.518750 2.095310 0.225000
    +v -2.518750 2.095310 0.225000
    +v -2.479740 2.059170 0.210937
    +v -2.305780 2.080570 0.210937
    +v -2.334860 2.119700 0.225000
    +v -2.363940 2.158830 0.210937
    +v -2.557760 2.131460 0.210937
    +v -2.557760 2.131460 0.210937
    +v -2.518750 2.095310 0.225000
    +v -2.334860 2.119700 0.225000
    +v -2.363940 2.158830 0.210937
    +v -2.389310 2.192970 0.168750
    +v -2.591800 2.162990 0.168750
    +v -2.591800 2.162990 0.168750
    +v -2.557760 2.131460 0.210937
    +v -2.363940 2.158830 0.210937
    +v -2.389310 2.192970 0.168750
    +v -2.407260 2.217110 0.098438
    +v -2.615870 2.185290 0.098438
    +v -2.615870 2.185290 0.098438
    +v -2.591800 2.162990 0.168750
    +v -2.389310 2.192970 0.168750
    +v -2.407260 2.217110 0.098438
    +v -2.414060 2.226270 0.000000
    +v -2.625000 2.193750 0.000000
    +v -2.625000 2.193750 0.000000
    +v -2.615870 2.185290 0.098438
    +v -2.407260 2.217110 0.098438
    +v -2.412500 1.996870 0.000000
    +v -2.421630 2.005330 0.098438
    +v -2.547370 1.977380 0.098438
    +v -2.547370 1.977380 0.098438
    +v -2.536520 1.970070 0.000000
    +v -2.412500 1.996870 0.000000
    +v -2.421630 2.005330 0.098438
    +v -2.445700 2.027640 0.168750
    +v -2.575980 1.996640 0.168750
    +v -2.575980 1.996640 0.168750
    +v -2.547370 1.977380 0.098438
    +v -2.421630 2.005330 0.098438
    +v -2.445700 2.027640 0.168750
    +v -2.479740 2.059170 0.210937
    +v -2.616430 2.023880 0.210937
    +v -2.616430 2.023880 0.210937
    +v -2.575980 1.996640 0.168750
    +v -2.445700 2.027640 0.168750
    +v -2.479740 2.059170 0.210937
    +v -2.518750 2.095310 0.225000
    +v -2.662790 2.055100 0.225000
    +v -2.662790 2.055100 0.225000
    +v -2.616430 2.023880 0.210937
    +v -2.479740 2.059170 0.210937
    +v -2.518750 2.095310 0.225000
    +v -2.557760 2.131460 0.210937
    +v -2.709160 2.086330 0.210937
    +v -2.709160 2.086330 0.210937
    +v -2.662790 2.055100 0.225000
    +v -2.518750 2.095310 0.225000
    +v -2.557760 2.131460 0.210937
    +v -2.591800 2.162990 0.168750
    +v -2.749600 2.113560 0.168750
    +v -2.749600 2.113560 0.168750
    +v -2.709160 2.086330 0.210937
    +v -2.557760 2.131460 0.210937
    +v -2.591800 2.162990 0.168750
    +v -2.615870 2.185290 0.098438
    +v -2.778210 2.132830 0.098438
    +v -2.778210 2.132830 0.098438
    +v -2.749600 2.113560 0.168750
    +v -2.591800 2.162990 0.168750
    +v -2.615870 2.185290 0.098438
    +v -2.625000 2.193750 0.000000
    +v -2.789060 2.140140 0.000000
    +v -2.789060 2.140140 0.000000
    +v -2.778210 2.132830 0.098438
    +v -2.615870 2.185290 0.098438
    +v -2.536520 1.970070 0.000000
    +v -2.547370 1.977380 0.098438
    +v -2.638580 1.935670 0.098438
    +v -2.638580 1.935670 0.098438
    +v -2.626560 1.930080 0.000000
    +v -2.536520 1.970070 0.000000
    +v -2.547370 1.977380 0.098438
    +v -2.575980 1.996640 0.168750
    +v -2.670260 1.950400 0.168750
    +v -2.670260 1.950400 0.168750
    +v -2.638580 1.935670 0.098438
    +v -2.547370 1.977380 0.098438
    +v -2.575980 1.996640 0.168750
    +v -2.616430 2.023880 0.210937
    +v -2.715060 1.971240 0.210937
    +v -2.715060 1.971240 0.210937
    +v -2.670260 1.950400 0.168750
    +v -2.575980 1.996640 0.168750
    +v -2.616430 2.023880 0.210937
    +v -2.662790 2.055100 0.225000
    +v -2.766410 1.995120 0.225000
    +v -2.766410 1.995120 0.225000
    +v -2.715060 1.971240 0.210937
    +v -2.616430 2.023880 0.210937
    +v -2.662790 2.055100 0.225000
    +v -2.709160 2.086330 0.210937
    +v -2.817760 2.019000 0.210937
    +v -2.817760 2.019000 0.210937
    +v -2.766410 1.995120 0.225000
    +v -2.662790 2.055100 0.225000
    +v -2.709160 2.086330 0.210937
    +v -2.749600 2.113560 0.168750
    +v -2.862550 2.039830 0.168750
    +v -2.862550 2.039830 0.168750
    +v -2.817760 2.019000 0.210937
    +v -2.709160 2.086330 0.210937
    +v -2.749600 2.113560 0.168750
    +v -2.778210 2.132830 0.098438
    +v -2.894230 2.054570 0.098438
    +v -2.894230 2.054570 0.098438
    +v -2.862550 2.039830 0.168750
    +v -2.749600 2.113560 0.168750
    +v -2.778210 2.132830 0.098438
    +v -2.789060 2.140140 0.000000
    +v -2.906250 2.060160 0.000000
    +v -2.906250 2.060160 0.000000
    +v -2.894230 2.054570 0.098438
    +v -2.778210 2.132830 0.098438
    +v -2.626560 1.930080 0.000000
    +v -2.638580 1.935670 0.098438
    +v -2.694130 1.877460 0.098438
    +v -2.694130 1.877460 0.098438
    +v -2.681450 1.874270 0.000000
    +v -2.626560 1.930080 0.000000
    +v -2.638580 1.935670 0.098438
    +v -2.670260 1.950400 0.168750
    +v -2.727560 1.885870 0.168750
    +v -2.727560 1.885870 0.168750
    +v -2.694130 1.877460 0.098438
    +v -2.638580 1.935670 0.098438
    +v -2.670260 1.950400 0.168750
    +v -2.715060 1.971240 0.210937
    +v -2.774820 1.897770 0.210937
    +v -2.774820 1.897770 0.210937
    +v -2.727560 1.885870 0.168750
    +v -2.670260 1.950400 0.168750
    +v -2.715060 1.971240 0.210937
    +v -2.766410 1.995120 0.225000
    +v -2.829000 1.911400 0.225000
    +v -2.829000 1.911400 0.225000
    +v -2.774820 1.897770 0.210937
    +v -2.715060 1.971240 0.210937
    +v -2.766410 1.995120 0.225000
    +v -2.817760 2.019000 0.210937
    +v -2.883190 1.925040 0.210937
    +v -2.883190 1.925040 0.210937
    +v -2.829000 1.911400 0.225000
    +v -2.766410 1.995120 0.225000
    +v -2.817760 2.019000 0.210937
    +v -2.862550 2.039830 0.168750
    +v -2.930450 1.936930 0.168750
    +v -2.930450 1.936930 0.168750
    +v -2.883190 1.925040 0.210937
    +v -2.817760 2.019000 0.210937
    +v -2.862550 2.039830 0.168750
    +v -2.894230 2.054570 0.098438
    +v -2.963880 1.945340 0.098438
    +v -2.963880 1.945340 0.098438
    +v -2.930450 1.936930 0.168750
    +v -2.862550 2.039830 0.168750
    +v -2.894230 2.054570 0.098438
    +v -2.906250 2.060160 0.000000
    +v -2.976560 1.948540 0.000000
    +v -2.976560 1.948540 0.000000
    +v -2.963880 1.945340 0.098438
    +v -2.894230 2.054570 0.098438
    +v -2.681450 1.874270 0.000000
    +v -2.694130 1.877460 0.098438
    +v -2.712890 1.800000 0.098438
    +v -2.712890 1.800000 0.098438
    +v -2.700000 1.800000 0.000000
    +v -2.681450 1.874270 0.000000
    +v -2.694130 1.877460 0.098438
    +v -2.727560 1.885870 0.168750
    +v -2.746880 1.800000 0.168750
    +v -2.746880 1.800000 0.168750
    +v -2.712890 1.800000 0.098438
    +v -2.694130 1.877460 0.098438
    +v -2.727560 1.885870 0.168750
    +v -2.774820 1.897770 0.210937
    +v -2.794920 1.800000 0.210937
    +v -2.794920 1.800000 0.210937
    +v -2.746880 1.800000 0.168750
    +v -2.727560 1.885870 0.168750
    +v -2.774820 1.897770 0.210937
    +v -2.829000 1.911400 0.225000
    +v -2.850000 1.800000 0.225000
    +v -2.850000 1.800000 0.225000
    +v -2.794920 1.800000 0.210937
    +v -2.774820 1.897770 0.210937
    +v -2.829000 1.911400 0.225000
    +v -2.883190 1.925040 0.210937
    +v -2.905080 1.800000 0.210937
    +v -2.905080 1.800000 0.210937
    +v -2.850000 1.800000 0.225000
    +v -2.829000 1.911400 0.225000
    +v -2.883190 1.925040 0.210937
    +v -2.930450 1.936930 0.168750
    +v -2.953120 1.800000 0.168750
    +v -2.953120 1.800000 0.168750
    +v -2.905080 1.800000 0.210937
    +v -2.883190 1.925040 0.210937
    +v -2.930450 1.936930 0.168750
    +v -2.963880 1.945340 0.098438
    +v -2.987110 1.800000 0.098438
    +v -2.987110 1.800000 0.098438
    +v -2.953120 1.800000 0.168750
    +v -2.930450 1.936930 0.168750
    +v -2.963880 1.945340 0.098438
    +v -2.976560 1.948540 0.000000
    +v -3.000000 1.800000 0.000000
    +v -3.000000 1.800000 0.000000
    +v -2.987110 1.800000 0.098438
    +v -2.963880 1.945340 0.098438
    +v -1.500000 2.250000 0.000000
    +v -1.504300 2.240330 -0.098438
    +v -1.851420 2.239470 -0.098438
    +v -1.851420 2.239470 -0.098438
    +v -1.851560 2.249120 0.000000
    +v -1.500000 2.250000 0.000000
    +v -1.504300 2.240330 -0.098438
    +v -1.515620 2.214840 -0.168750
    +v -1.851040 2.214030 -0.168750
    +v -1.851040 2.214030 -0.168750
    +v -1.851420 2.239470 -0.098438
    +v -1.504300 2.240330 -0.098438
    +v -1.515620 2.214840 -0.168750
    +v -1.531640 2.178810 -0.210937
    +v -1.850510 2.178070 -0.210937
    +v -1.850510 2.178070 -0.210937
    +v -1.851040 2.214030 -0.168750
    +v -1.515620 2.214840 -0.168750
    +v -1.531640 2.178810 -0.210937
    +v -1.550000 2.137500 -0.225000
    +v -1.849900 2.136840 -0.225000
    +v -1.849900 2.136840 -0.225000
    +v -1.850510 2.178070 -0.210937
    +v -1.531640 2.178810 -0.210937
    +v -1.550000 2.137500 -0.225000
    +v -1.568360 2.096190 -0.210937
    +v -1.849290 2.095610 -0.210937
    +v -1.849290 2.095610 -0.210937
    +v -1.849900 2.136840 -0.225000
    +v -1.550000 2.137500 -0.225000
    +v -1.568360 2.096190 -0.210937
    +v -1.584380 2.060160 -0.168750
    +v -1.848760 2.059650 -0.168750
    +v -1.848760 2.059650 -0.168750
    +v -1.849290 2.095610 -0.210937
    +v -1.568360 2.096190 -0.210937
    +v -1.584380 2.060160 -0.168750
    +v -1.595700 2.034670 -0.098438
    +v -1.848380 2.034210 -0.098438
    +v -1.848380 2.034210 -0.098438
    +v -1.848760 2.059650 -0.168750
    +v -1.584380 2.060160 -0.168750
    +v -1.595700 2.034670 -0.098438
    +v -1.600000 2.025000 0.000000
    +v -1.848240 2.024560 0.000000
    +v -1.848240 2.024560 0.000000
    +v -1.848380 2.034210 -0.098438
    +v -1.595700 2.034670 -0.098438
    +v -1.851560 2.249120 0.000000
    +v -1.851420 2.239470 -0.098438
    +v -2.152420 2.233450 -0.098438
    +v -2.152420 2.233450 -0.098438
    +v -2.156250 2.242970 0.000000
    +v -1.851560 2.249120 0.000000
    +v -1.851420 2.239470 -0.098438
    +v -1.851040 2.214030 -0.168750
    +v -2.142330 2.208360 -0.168750
    +v -2.142330 2.208360 -0.168750
    +v -2.152420 2.233450 -0.098438
    +v -1.851420 2.239470 -0.098438
    +v -1.851040 2.214030 -0.168750
    +v -1.850510 2.178070 -0.210937
    +v -2.128070 2.172890 -0.210937
    +v -2.128070 2.172890 -0.210937
    +v -2.142330 2.208360 -0.168750
    +v -1.851040 2.214030 -0.168750
    +v -1.850510 2.178070 -0.210937
    +v -1.849900 2.136840 -0.225000
    +v -2.111720 2.132230 -0.225000
    +v -2.111720 2.132230 -0.225000
    +v -2.128070 2.172890 -0.210937
    +v -1.850510 2.178070 -0.210937
    +v -1.849900 2.136840 -0.225000
    +v -1.849290 2.095610 -0.210937
    +v -2.095370 2.091560 -0.210937
    +v -2.095370 2.091560 -0.210937
    +v -2.111720 2.132230 -0.225000
    +v -1.849900 2.136840 -0.225000
    +v -1.849290 2.095610 -0.210937
    +v -1.848760 2.059650 -0.168750
    +v -2.081100 2.056090 -0.168750
    +v -2.081100 2.056090 -0.168750
    +v -2.095370 2.091560 -0.210937
    +v -1.849290 2.095610 -0.210937
    +v -1.848760 2.059650 -0.168750
    +v -1.848380 2.034210 -0.098438
    +v -2.071010 2.031000 -0.098438
    +v -2.071010 2.031000 -0.098438
    +v -2.081100 2.056090 -0.168750
    +v -1.848760 2.059650 -0.168750
    +v -1.848380 2.034210 -0.098438
    +v -1.848240 2.024560 0.000000
    +v -2.067190 2.021480 0.000000
    +v -2.067190 2.021480 0.000000
    +v -2.071010 2.031000 -0.098438
    +v -1.848380 2.034210 -0.098438
    +v -2.156250 2.242970 0.000000
    +v -2.152420 2.233450 -0.098438
    +v -2.407260 2.217110 -0.098438
    +v -2.407260 2.217110 -0.098438
    +v -2.414060 2.226270 0.000000
    +v -2.156250 2.242970 0.000000
    +v -2.152420 2.233450 -0.098438
    +v -2.142330 2.208360 -0.168750
    +v -2.389310 2.192970 -0.168750
    +v -2.389310 2.192970 -0.168750
    +v -2.407260 2.217110 -0.098438
    +v -2.152420 2.233450 -0.098438
    +v -2.142330 2.208360 -0.168750
    +v -2.128070 2.172890 -0.210937
    +v -2.363940 2.158830 -0.210937
    +v -2.363940 2.158830 -0.210937
    +v -2.389310 2.192970 -0.168750
    +v -2.142330 2.208360 -0.168750
    +v -2.128070 2.172890 -0.210937
    +v -2.111720 2.132230 -0.225000
    +v -2.334860 2.119700 -0.225000
    +v -2.334860 2.119700 -0.225000
    +v -2.363940 2.158830 -0.210937
    +v -2.128070 2.172890 -0.210937
    +v -2.111720 2.132230 -0.225000
    +v -2.095370 2.091560 -0.210937
    +v -2.305780 2.080570 -0.210937
    +v -2.305780 2.080570 -0.210937
    +v -2.334860 2.119700 -0.225000
    +v -2.111720 2.132230 -0.225000
    +v -2.095370 2.091560 -0.210937
    +v -2.081100 2.056090 -0.168750
    +v -2.280410 2.046440 -0.168750
    +v -2.280410 2.046440 -0.168750
    +v -2.305780 2.080570 -0.210937
    +v -2.095370 2.091560 -0.210937
    +v -2.081100 2.056090 -0.168750
    +v -2.071010 2.031000 -0.098438
    +v -2.262470 2.022290 -0.098438
    +v -2.262470 2.022290 -0.098438
    +v -2.280410 2.046440 -0.168750
    +v -2.081100 2.056090 -0.168750
    +v -2.071010 2.031000 -0.098438
    +v -2.067190 2.021480 0.000000
    +v -2.255660 2.013130 0.000000
    +v -2.255660 2.013130 0.000000
    +v -2.262470 2.022290 -0.098438
    +v -2.071010 2.031000 -0.098438
    +v -2.414060 2.226270 0.000000
    +v -2.407260 2.217110 -0.098438
    +v -2.615870 2.185290 -0.098438
    +v -2.615870 2.185290 -0.098438
    +v -2.625000 2.193750 0.000000
    +v -2.414060 2.226270 0.000000
    +v -2.407260 2.217110 -0.098438
    +v -2.389310 2.192970 -0.168750
    +v -2.591800 2.162990 -0.168750
    +v -2.591800 2.162990 -0.168750
    +v -2.615870 2.185290 -0.098438
    +v -2.407260 2.217110 -0.098438
    +v -2.389310 2.192970 -0.168750
    +v -2.363940 2.158830 -0.210937
    +v -2.557760 2.131460 -0.210937
    +v -2.557760 2.131460 -0.210937
    +v -2.591800 2.162990 -0.168750
    +v -2.389310 2.192970 -0.168750
    +v -2.363940 2.158830 -0.210937
    +v -2.334860 2.119700 -0.225000
    +v -2.518750 2.095310 -0.225000
    +v -2.518750 2.095310 -0.225000
    +v -2.557760 2.131460 -0.210937
    +v -2.363940 2.158830 -0.210937
    +v -2.334860 2.119700 -0.225000
    +v -2.305780 2.080570 -0.210937
    +v -2.479740 2.059170 -0.210937
    +v -2.479740 2.059170 -0.210937
    +v -2.518750 2.095310 -0.225000
    +v -2.334860 2.119700 -0.225000
    +v -2.305780 2.080570 -0.210937
    +v -2.280410 2.046440 -0.168750
    +v -2.445700 2.027640 -0.168750
    +v -2.445700 2.027640 -0.168750
    +v -2.479740 2.059170 -0.210937
    +v -2.305780 2.080570 -0.210937
    +v -2.280410 2.046440 -0.168750
    +v -2.262470 2.022290 -0.098438
    +v -2.421630 2.005330 -0.098438
    +v -2.421630 2.005330 -0.098438
    +v -2.445700 2.027640 -0.168750
    +v -2.280410 2.046440 -0.168750
    +v -2.262470 2.022290 -0.098438
    +v -2.255660 2.013130 0.000000
    +v -2.412500 1.996880 0.000000
    +v -2.412500 1.996880 0.000000
    +v -2.421630 2.005330 -0.098438
    +v -2.262470 2.022290 -0.098438
    +v -2.625000 2.193750 0.000000
    +v -2.615870 2.185290 -0.098438
    +v -2.778210 2.132830 -0.098438
    +v -2.778210 2.132830 -0.098438
    +v -2.789060 2.140140 0.000000
    +v -2.625000 2.193750 0.000000
    +v -2.615870 2.185290 -0.098438
    +v -2.591800 2.162990 -0.168750
    +v -2.749600 2.113560 -0.168750
    +v -2.749600 2.113560 -0.168750
    +v -2.778210 2.132830 -0.098438
    +v -2.615870 2.185290 -0.098438
    +v -2.591800 2.162990 -0.168750
    +v -2.557760 2.131460 -0.210937
    +v -2.709160 2.086330 -0.210937
    +v -2.709160 2.086330 -0.210937
    +v -2.749600 2.113560 -0.168750
    +v -2.591800 2.162990 -0.168750
    +v -2.557760 2.131460 -0.210937
    +v -2.518750 2.095310 -0.225000
    +v -2.662790 2.055100 -0.225000
    +v -2.662790 2.055100 -0.225000
    +v -2.709160 2.086330 -0.210937
    +v -2.557760 2.131460 -0.210937
    +v -2.518750 2.095310 -0.225000
    +v -2.479740 2.059170 -0.210937
    +v -2.616430 2.023880 -0.210937
    +v -2.616430 2.023880 -0.210937
    +v -2.662790 2.055100 -0.225000
    +v -2.518750 2.095310 -0.225000
    +v -2.479740 2.059170 -0.210937
    +v -2.445700 2.027640 -0.168750
    +v -2.575980 1.996640 -0.168750
    +v -2.575980 1.996640 -0.168750
    +v -2.616430 2.023880 -0.210937
    +v -2.479740 2.059170 -0.210937
    +v -2.445700 2.027640 -0.168750
    +v -2.421630 2.005330 -0.098438
    +v -2.547370 1.977380 -0.098438
    +v -2.547370 1.977380 -0.098438
    +v -2.575980 1.996640 -0.168750
    +v -2.445700 2.027640 -0.168750
    +v -2.421630 2.005330 -0.098438
    +v -2.412500 1.996880 0.000000
    +v -2.536520 1.970070 0.000000
    +v -2.536520 1.970070 0.000000
    +v -2.547370 1.977380 -0.098438
    +v -2.421630 2.005330 -0.098438
    +v -2.789060 2.140140 0.000000
    +v -2.778210 2.132830 -0.098438
    +v -2.894230 2.054570 -0.098438
    +v -2.894230 2.054570 -0.098438
    +v -2.906250 2.060160 0.000000
    +v -2.789060 2.140140 0.000000
    +v -2.778210 2.132830 -0.098438
    +v -2.749600 2.113560 -0.168750
    +v -2.862550 2.039830 -0.168750
    +v -2.862550 2.039830 -0.168750
    +v -2.894230 2.054570 -0.098438
    +v -2.778210 2.132830 -0.098438
    +v -2.749600 2.113560 -0.168750
    +v -2.709160 2.086330 -0.210937
    +v -2.817760 2.019000 -0.210937
    +v -2.817760 2.019000 -0.210937
    +v -2.862550 2.039830 -0.168750
    +v -2.749600 2.113560 -0.168750
    +v -2.709160 2.086330 -0.210937
    +v -2.662790 2.055100 -0.225000
    +v -2.766410 1.995120 -0.225000
    +v -2.766410 1.995120 -0.225000
    +v -2.817760 2.019000 -0.210937
    +v -2.709160 2.086330 -0.210937
    +v -2.662790 2.055100 -0.225000
    +v -2.616430 2.023880 -0.210937
    +v -2.715060 1.971240 -0.210937
    +v -2.715060 1.971240 -0.210937
    +v -2.766410 1.995120 -0.225000
    +v -2.662790 2.055100 -0.225000
    +v -2.616430 2.023880 -0.210937
    +v -2.575980 1.996640 -0.168750
    +v -2.670260 1.950400 -0.168750
    +v -2.670260 1.950400 -0.168750
    +v -2.715060 1.971240 -0.210937
    +v -2.616430 2.023880 -0.210937
    +v -2.575980 1.996640 -0.168750
    +v -2.547370 1.977380 -0.098438
    +v -2.638580 1.935670 -0.098438
    +v -2.638580 1.935670 -0.098438
    +v -2.670260 1.950400 -0.168750
    +v -2.575980 1.996640 -0.168750
    +v -2.547370 1.977380 -0.098438
    +v -2.536520 1.970070 0.000000
    +v -2.626560 1.930080 0.000000
    +v -2.626560 1.930080 0.000000
    +v -2.638580 1.935670 -0.098438
    +v -2.547370 1.977380 -0.098438
    +v -2.906250 2.060160 0.000000
    +v -2.894230 2.054570 -0.098438
    +v -2.963880 1.945340 -0.098438
    +v -2.963880 1.945340 -0.098438
    +v -2.976560 1.948540 0.000000
    +v -2.906250 2.060160 0.000000
    +v -2.894230 2.054570 -0.098438
    +v -2.862550 2.039830 -0.168750
    +v -2.930450 1.936930 -0.168750
    +v -2.930450 1.936930 -0.168750
    +v -2.963880 1.945340 -0.098438
    +v -2.894230 2.054570 -0.098438
    +v -2.862550 2.039830 -0.168750
    +v -2.817760 2.019000 -0.210937
    +v -2.883190 1.925040 -0.210937
    +v -2.883190 1.925040 -0.210937
    +v -2.930450 1.936930 -0.168750
    +v -2.862550 2.039830 -0.168750
    +v -2.817760 2.019000 -0.210937
    +v -2.766410 1.995120 -0.225000
    +v -2.829000 1.911400 -0.225000
    +v -2.829000 1.911400 -0.225000
    +v -2.883190 1.925040 -0.210937
    +v -2.817760 2.019000 -0.210937
    +v -2.766410 1.995120 -0.225000
    +v -2.715060 1.971240 -0.210937
    +v -2.774820 1.897770 -0.210937
    +v -2.774820 1.897770 -0.210937
    +v -2.829000 1.911400 -0.225000
    +v -2.766410 1.995120 -0.225000
    +v -2.715060 1.971240 -0.210937
    +v -2.670260 1.950400 -0.168750
    +v -2.727560 1.885870 -0.168750
    +v -2.727560 1.885870 -0.168750
    +v -2.774820 1.897770 -0.210937
    +v -2.715060 1.971240 -0.210937
    +v -2.670260 1.950400 -0.168750
    +v -2.638580 1.935670 -0.098438
    +v -2.694130 1.877460 -0.098438
    +v -2.694130 1.877460 -0.098438
    +v -2.727560 1.885870 -0.168750
    +v -2.670260 1.950400 -0.168750
    +v -2.638580 1.935670 -0.098438
    +v -2.626560 1.930080 0.000000
    +v -2.681450 1.874270 0.000000
    +v -2.681450 1.874270 0.000000
    +v -2.694130 1.877460 -0.098438
    +v -2.638580 1.935670 -0.098438
    +v -2.976560 1.948540 0.000000
    +v -2.963880 1.945340 -0.098438
    +v -2.987110 1.800000 -0.098438
    +v -2.987110 1.800000 -0.098438
    +v -3.000000 1.800000 0.000000
    +v -2.976560 1.948540 0.000000
    +v -2.963880 1.945340 -0.098438
    +v -2.930450 1.936930 -0.168750
    +v -2.953120 1.800000 -0.168750
    +v -2.953120 1.800000 -0.168750
    +v -2.987110 1.800000 -0.098438
    +v -2.963880 1.945340 -0.098438
    +v -2.930450 1.936930 -0.168750
    +v -2.883190 1.925040 -0.210937
    +v -2.905080 1.800000 -0.210937
    +v -2.905080 1.800000 -0.210937
    +v -2.953120 1.800000 -0.168750
    +v -2.930450 1.936930 -0.168750
    +v -2.883190 1.925040 -0.210937
    +v -2.829000 1.911400 -0.225000
    +v -2.850000 1.800000 -0.225000
    +v -2.850000 1.800000 -0.225000
    +v -2.905080 1.800000 -0.210937
    +v -2.883190 1.925040 -0.210937
    +v -2.829000 1.911400 -0.225000
    +v -2.774820 1.897770 -0.210937
    +v -2.794920 1.800000 -0.210937
    +v -2.794920 1.800000 -0.210937
    +v -2.850000 1.800000 -0.225000
    +v -2.829000 1.911400 -0.225000
    +v -2.774820 1.897770 -0.210937
    +v -2.727560 1.885870 -0.168750
    +v -2.746880 1.800000 -0.168750
    +v -2.746880 1.800000 -0.168750
    +v -2.794920 1.800000 -0.210937
    +v -2.774820 1.897770 -0.210937
    +v -2.727560 1.885870 -0.168750
    +v -2.694130 1.877460 -0.098438
    +v -2.712890 1.800000 -0.098438
    +v -2.712890 1.800000 -0.098438
    +v -2.746880 1.800000 -0.168750
    +v -2.727560 1.885870 -0.168750
    +v -2.694130 1.877460 -0.098438
    +v -2.681450 1.874270 0.000000
    +v -2.700000 1.800000 0.000000
    +v -2.700000 1.800000 0.000000
    +v -2.712890 1.800000 -0.098438
    +v -2.694130 1.877460 -0.098438
    +v -2.700000 1.800000 0.000000
    +v -2.712890 1.800000 0.098438
    +v -2.703020 1.702830 0.098438
    +v -2.703020 1.702830 0.098438
    +v -2.690430 1.705960 0.000000
    +v -2.700000 1.800000 0.000000
    +v -2.712890 1.800000 0.098438
    +v -2.746880 1.800000 0.168750
    +v -2.736220 1.694570 0.168750
    +v -2.736220 1.694570 0.168750
    +v -2.703020 1.702830 0.098438
    +v -2.712890 1.800000 0.098438
    +v -2.746880 1.800000 0.168750
    +v -2.794920 1.800000 0.210937
    +v -2.783160 1.682900 0.210937
    +v -2.783160 1.682900 0.210937
    +v -2.736220 1.694570 0.168750
    +v -2.746880 1.800000 0.168750
    +v -2.794920 1.800000 0.210937
    +v -2.850000 1.800000 0.225000
    +v -2.836960 1.669520 0.225000
    +v -2.836960 1.669520 0.225000
    +v -2.783160 1.682900 0.210937
    +v -2.794920 1.800000 0.210937
    +v -2.850000 1.800000 0.225000
    +v -2.905080 1.800000 0.210937
    +v -2.890770 1.656140 0.210937
    +v -2.890770 1.656140 0.210937
    +v -2.836960 1.669520 0.225000
    +v -2.850000 1.800000 0.225000
    +v -2.905080 1.800000 0.210937
    +v -2.953120 1.800000 0.168750
    +v -2.937700 1.644470 0.168750
    +v -2.937700 1.644470 0.168750
    +v -2.890770 1.656140 0.210937
    +v -2.905080 1.800000 0.210937
    +v -2.953120 1.800000 0.168750
    +v -2.987110 1.800000 0.098438
    +v -2.970900 1.636210 0.098438
    +v -2.970900 1.636210 0.098438
    +v -2.937700 1.644470 0.168750
    +v -2.953120 1.800000 0.168750
    +v -2.987110 1.800000 0.098438
    +v -3.000000 1.800000 0.000000
    +v -2.983500 1.633080 0.000000
    +v -2.983500 1.633080 0.000000
    +v -2.970900 1.636210 0.098438
    +v -2.987110 1.800000 0.098438
    +v -2.690430 1.705960 0.000000
    +v -2.703020 1.702830 0.098438
    +v -2.672650 1.590680 0.098438
    +v -2.672650 1.590680 0.098438
    +v -2.660940 1.596090 0.000000
    +v -2.690430 1.705960 0.000000
    +v -2.703020 1.702830 0.098438
    +v -2.736220 1.694570 0.168750
    +v -2.703540 1.576410 0.168750
    +v -2.703540 1.576410 0.168750
    +v -2.672650 1.590680 0.098438
    +v -2.703020 1.702830 0.098438
    +v -2.736220 1.694570 0.168750
    +v -2.783160 1.682900 0.210937
    +v -2.747210 1.556230 0.210937
    +v -2.747210 1.556230 0.210937
    +v -2.703540 1.576410 0.168750
    +v -2.736220 1.694570 0.168750
    +v -2.783160 1.682900 0.210937
    +v -2.836960 1.669520 0.225000
    +v -2.797270 1.533110 0.225000
    +v -2.797270 1.533110 0.225000
    +v -2.747210 1.556230 0.210937
    +v -2.783160 1.682900 0.210937
    +v -2.836960 1.669520 0.225000
    +v -2.890770 1.656140 0.210937
    +v -2.847320 1.509980 0.210937
    +v -2.847320 1.509980 0.210937
    +v -2.797270 1.533110 0.225000
    +v -2.836960 1.669520 0.225000
    +v -2.890770 1.656140 0.210937
    +v -2.937700 1.644470 0.168750
    +v -2.890990 1.489800 0.168750
    +v -2.890990 1.489800 0.168750
    +v -2.847320 1.509980 0.210937
    +v -2.890770 1.656140 0.210937
    +v -2.937700 1.644470 0.168750
    +v -2.970900 1.636210 0.098438
    +v -2.921880 1.475530 0.098438
    +v -2.921880 1.475530 0.098438
    +v -2.890990 1.489800 0.168750
    +v -2.937700 1.644470 0.168750
    +v -2.970900 1.636210 0.098438
    +v -2.983500 1.633080 0.000000
    +v -2.933590 1.470120 0.000000
    +v -2.933590 1.470120 0.000000
    +v -2.921880 1.475530 0.098438
    +v -2.970900 1.636210 0.098438
    +v -2.660940 1.596090 0.000000
    +v -2.672650 1.590680 0.098438
    +v -2.620640 1.468630 0.098438
    +v -2.620640 1.468630 0.098438
    +v -2.610350 1.475680 0.000000
    +v -2.660940 1.596090 0.000000
    +v -2.672650 1.590680 0.098438
    +v -2.703540 1.576410 0.168750
    +v -2.647750 1.450040 0.168750
    +v -2.647750 1.450040 0.168750
    +v -2.620640 1.468630 0.098438
    +v -2.672650 1.590680 0.098438
    +v -2.703540 1.576410 0.168750
    +v -2.747210 1.556230 0.210937
    +v -2.686090 1.423750 0.210937
    +v -2.686090 1.423750 0.210937
    +v -2.647750 1.450040 0.168750
    +v -2.703540 1.576410 0.168750
    +v -2.747210 1.556230 0.210937
    +v -2.797270 1.533110 0.225000
    +v -2.730030 1.393620 0.225000
    +v -2.730030 1.393620 0.225000
    +v -2.686090 1.423750 0.210937
    +v -2.747210 1.556230 0.210937
    +v -2.797270 1.533110 0.225000
    +v -2.847320 1.509980 0.210937
    +v -2.773970 1.363480 0.210937
    +v -2.773970 1.363480 0.210937
    +v -2.730030 1.393620 0.225000
    +v -2.797270 1.533110 0.225000
    +v -2.847320 1.509980 0.210937
    +v -2.890990 1.489800 0.168750
    +v -2.812310 1.337190 0.168750
    +v -2.812310 1.337190 0.168750
    +v -2.773970 1.363480 0.210937
    +v -2.847320 1.509980 0.210937
    +v -2.890990 1.489800 0.168750
    +v -2.921880 1.475530 0.098438
    +v -2.839420 1.318600 0.098438
    +v -2.839420 1.318600 0.098438
    +v -2.812310 1.337190 0.168750
    +v -2.890990 1.489800 0.168750
    +v -2.921880 1.475530 0.098438
    +v -2.933590 1.470120 0.000000
    +v -2.849710 1.311550 0.000000
    +v -2.849710 1.311550 0.000000
    +v -2.839420 1.318600 0.098438
    +v -2.921880 1.475530 0.098438
    +v -2.610350 1.475680 0.000000
    +v -2.620640 1.468630 0.098438
    +v -2.545830 1.341740 0.098438
    +v -2.545830 1.341740 0.098438
    +v -2.537500 1.350000 0.000000
    +v -2.610350 1.475680 0.000000
    +v -2.620640 1.468630 0.098438
    +v -2.647750 1.450040 0.168750
    +v -2.567770 1.319970 0.168750
    +v -2.567770 1.319970 0.168750
    +v -2.545830 1.341740 0.098438
    +v -2.620640 1.468630 0.098438
    +v -2.647750 1.450040 0.168750
    +v -2.686090 1.423750 0.210937
    +v -2.598800 1.289190 0.210937
    +v -2.598800 1.289190 0.210937
    +v -2.567770 1.319970 0.168750
    +v -2.647750 1.450040 0.168750
    +v -2.686090 1.423750 0.210937
    +v -2.730030 1.393620 0.225000
    +v -2.634370 1.253910 0.225000
    +v -2.634370 1.253910 0.225000
    +v -2.598800 1.289190 0.210937
    +v -2.686090 1.423750 0.210937
    +v -2.730030 1.393620 0.225000
    +v -2.773970 1.363480 0.210937
    +v -2.669950 1.218620 0.210937
    +v -2.669950 1.218620 0.210937
    +v -2.634370 1.253910 0.225000
    +v -2.730030 1.393620 0.225000
    +v -2.773970 1.363480 0.210937
    +v -2.812310 1.337190 0.168750
    +v -2.700980 1.187840 0.168750
    +v -2.700980 1.187840 0.168750
    +v -2.669950 1.218620 0.210937
    +v -2.773970 1.363480 0.210937
    +v -2.812310 1.337190 0.168750
    +v -2.839420 1.318600 0.098438
    +v -2.722920 1.166070 0.098438
    +v -2.722920 1.166070 0.098438
    +v -2.700980 1.187840 0.168750
    +v -2.812310 1.337190 0.168750
    +v -2.839420 1.318600 0.098438
    +v -2.849710 1.311550 0.000000
    +v -2.731250 1.157810 0.000000
    +v -2.731250 1.157810 0.000000
    +v -2.722920 1.166070 0.098438
    +v -2.839420 1.318600 0.098438
    +v -2.537500 1.350000 0.000000
    +v -2.545830 1.341740 0.098438
    +v -2.447070 1.215080 0.098438
    +v -2.447070 1.215080 0.098438
    +v -2.441210 1.224320 0.000000
    +v -2.537500 1.350000 0.000000
    +v -2.545830 1.341740 0.098438
    +v -2.567770 1.319970 0.168750
    +v -2.462530 1.190730 0.168750
    +v -2.462530 1.190730 0.168750
    +v -2.447070 1.215080 0.098438
    +v -2.545830 1.341740 0.098438
    +v -2.567770 1.319970 0.168750
    +v -2.598800 1.289190 0.210937
    +v -2.484380 1.156300 0.210937
    +v -2.484380 1.156300 0.210937
    +v -2.462530 1.190730 0.168750
    +v -2.567770 1.319970 0.168750
    +v -2.598800 1.289190 0.210937
    +v -2.634370 1.253910 0.225000
    +v -2.509420 1.116830 0.225000
    +v -2.509420 1.116830 0.225000
    +v -2.484380 1.156300 0.210937
    +v -2.598800 1.289190 0.210937
    +v -2.634370 1.253910 0.225000
    +v -2.669950 1.218620 0.210937
    +v -2.534470 1.077370 0.210937
    +v -2.534470 1.077370 0.210937
    +v -2.509420 1.116830 0.225000
    +v -2.634370 1.253910 0.225000
    +v -2.669950 1.218620 0.210937
    +v -2.700980 1.187840 0.168750
    +v -2.556320 1.042940 0.168750
    +v -2.556320 1.042940 0.168750
    +v -2.534470 1.077370 0.210937
    +v -2.669950 1.218620 0.210937
    +v -2.700980 1.187840 0.168750
    +v -2.722920 1.166070 0.098438
    +v -2.571770 1.018590 0.098438
    +v -2.571770 1.018590 0.098438
    +v -2.556320 1.042940 0.168750
    +v -2.700980 1.187840 0.168750
    +v -2.722920 1.166070 0.098438
    +v -2.731250 1.157810 0.000000
    +v -2.577640 1.009350 0.000000
    +v -2.577640 1.009350 0.000000
    +v -2.571770 1.018590 0.098438
    +v -2.722920 1.166070 0.098438
    +v -2.441210 1.224320 0.000000
    +v -2.447070 1.215080 0.098438
    +v -2.323230 1.093710 0.098438
    +v -2.323230 1.093710 0.098438
    +v -2.320310 1.103910 0.000000
    +v -2.441210 1.224320 0.000000
    +v -2.447070 1.215080 0.098438
    +v -2.462530 1.190730 0.168750
    +v -2.330930 1.066830 0.168750
    +v -2.330930 1.066830 0.168750
    +v -2.323230 1.093710 0.098438
    +v -2.447070 1.215080 0.098438
    +v -2.462530 1.190730 0.168750
    +v -2.484380 1.156300 0.210937
    +v -2.341820 1.028820 0.210937
    +v -2.341820 1.028820 0.210937
    +v -2.330930 1.066830 0.168750
    +v -2.462530 1.190730 0.168750
    +v -2.484380 1.156300 0.210937
    +v -2.509420 1.116830 0.225000
    +v -2.354300 0.985254 0.225000
    +v -2.354300 0.985254 0.225000
    +v -2.341820 1.028820 0.210937
    +v -2.484380 1.156300 0.210937
    +v -2.509420 1.116830 0.225000
    +v -2.534470 1.077370 0.210937
    +v -2.366780 0.941686 0.210937
    +v -2.366780 0.941686 0.210937
    +v -2.354300 0.985254 0.225000
    +v -2.509420 1.116830 0.225000
    +v -2.534470 1.077370 0.210937
    +v -2.556320 1.042940 0.168750
    +v -2.377660 0.903680 0.168750
    +v -2.377660 0.903680 0.168750
    +v -2.366780 0.941686 0.210937
    +v -2.534470 1.077370 0.210937
    +v -2.556320 1.042940 0.168750
    +v -2.571770 1.018590 0.098438
    +v -2.385360 0.876798 0.098438
    +v -2.385360 0.876798 0.098438
    +v -2.377660 0.903680 0.168750
    +v -2.556320 1.042940 0.168750
    +v -2.571770 1.018590 0.098438
    +v -2.577640 1.009350 0.000000
    +v -2.388280 0.866602 0.000000
    +v -2.388280 0.866602 0.000000
    +v -2.385360 0.876798 0.098438
    +v -2.571770 1.018590 0.098438
    +v -2.320310 1.103910 0.000000
    +v -2.323230 1.093710 0.098438
    +v -2.173160 0.982698 0.098438
    +v -2.173160 0.982698 0.098438
    +v -2.173630 0.994043 0.000000
    +v -2.320310 1.103910 0.000000
    +v -2.323230 1.093710 0.098438
    +v -2.330930 1.066830 0.168750
    +v -2.171910 0.952787 0.168750
    +v -2.171910 0.952787 0.168750
    +v -2.173160 0.982698 0.098438
    +v -2.323230 1.093710 0.098438
    +v -2.330930 1.066830 0.168750
    +v -2.341820 1.028820 0.210937
    +v -2.170140 0.910500 0.210937
    +v -2.170140 0.910500 0.210937
    +v -2.171910 0.952787 0.168750
    +v -2.330930 1.066830 0.168750
    +v -2.341820 1.028820 0.210937
    +v -2.354300 0.985254 0.225000
    +v -2.168120 0.862024 0.225000
    +v -2.168120 0.862024 0.225000
    +v -2.170140 0.910500 0.210937
    +v -2.341820 1.028820 0.210937
    +v -2.354300 0.985254 0.225000
    +v -2.366780 0.941686 0.210937
    +v -2.166090 0.813548 0.210937
    +v -2.166090 0.813548 0.210937
    +v -2.168120 0.862024 0.225000
    +v -2.354300 0.985254 0.225000
    +v -2.366780 0.941686 0.210937
    +v -2.377660 0.903680 0.168750
    +v -2.164320 0.771261 0.168750
    +v -2.164320 0.771261 0.168750
    +v -2.166090 0.813548 0.210937
    +v -2.366780 0.941686 0.210937
    +v -2.377660 0.903680 0.168750
    +v -2.385360 0.876798 0.098438
    +v -2.163070 0.741350 0.098438
    +v -2.163070 0.741350 0.098438
    +v -2.164320 0.771261 0.168750
    +v -2.377660 0.903680 0.168750
    +v -2.385360 0.876798 0.098438
    +v -2.388280 0.866602 0.000000
    +v -2.162600 0.730005 0.000000
    +v -2.162600 0.730005 0.000000
    +v -2.163070 0.741350 0.098438
    +v -2.385360 0.876798 0.098438
    +v -2.173630 0.994043 0.000000
    +v -2.173160 0.982698 0.098438
    +v -1.995700 0.887109 0.098438
    +v -1.995700 0.887109 0.098438
    +v -2.000000 0.900000 0.000000
    +v -2.173630 0.994043 0.000000
    +v -2.173160 0.982698 0.098438
    +v -2.171910 0.952787 0.168750
    +v -1.984380 0.853125 0.168750
    +v -1.984380 0.853125 0.168750
    +v -1.995700 0.887109 0.098438
    +v -2.173160 0.982698 0.098438
    +v -2.171910 0.952787 0.168750
    +v -2.170140 0.910500 0.210937
    +v -1.968360 0.805078 0.210937
    +v -1.968360 0.805078 0.210937
    +v -1.984380 0.853125 0.168750
    +v -2.171910 0.952787 0.168750
    +v -2.170140 0.910500 0.210937
    +v -2.168120 0.862024 0.225000
    +v -1.950000 0.750000 0.225000
    +v -1.950000 0.750000 0.225000
    +v -1.968360 0.805078 0.210937
    +v -2.170140 0.910500 0.210937
    +v -2.168120 0.862024 0.225000
    +v -2.166090 0.813548 0.210937
    +v -1.931640 0.694922 0.210937
    +v -1.931640 0.694922 0.210937
    +v -1.950000 0.750000 0.225000
    +v -2.168120 0.862024 0.225000
    +v -2.166090 0.813548 0.210937
    +v -2.164320 0.771261 0.168750
    +v -1.915620 0.646875 0.168750
    +v -1.915620 0.646875 0.168750
    +v -1.931640 0.694922 0.210937
    +v -2.166090 0.813548 0.210937
    +v -2.164320 0.771261 0.168750
    +v -2.163070 0.741350 0.098438
    +v -1.904300 0.612891 0.098438
    +v -1.904300 0.612891 0.098438
    +v -1.915620 0.646875 0.168750
    +v -2.164320 0.771261 0.168750
    +v -2.163070 0.741350 0.098438
    +v -2.162600 0.730005 0.000000
    +v -1.900000 0.600000 0.000000
    +v -1.900000 0.600000 0.000000
    +v -1.904300 0.612891 0.098438
    +v -2.163070 0.741350 0.098438
    +v -3.000000 1.800000 0.000000
    +v -2.987110 1.800000 -0.098438
    +v -2.970900 1.636210 -0.098438
    +v -2.970900 1.636210 -0.098438
    +v -2.983500 1.633080 0.000000
    +v -3.000000 1.800000 0.000000
    +v -2.987110 1.800000 -0.098438
    +v -2.953120 1.800000 -0.168750
    +v -2.937700 1.644470 -0.168750
    +v -2.937700 1.644470 -0.168750
    +v -2.970900 1.636210 -0.098438
    +v -2.987110 1.800000 -0.098438
    +v -2.953120 1.800000 -0.168750
    +v -2.905080 1.800000 -0.210937
    +v -2.890770 1.656140 -0.210937
    +v -2.890770 1.656140 -0.210937
    +v -2.937700 1.644470 -0.168750
    +v -2.953120 1.800000 -0.168750
    +v -2.905080 1.800000 -0.210937
    +v -2.850000 1.800000 -0.225000
    +v -2.836960 1.669520 -0.225000
    +v -2.836960 1.669520 -0.225000
    +v -2.890770 1.656140 -0.210937
    +v -2.905080 1.800000 -0.210937
    +v -2.850000 1.800000 -0.225000
    +v -2.794920 1.800000 -0.210937
    +v -2.783160 1.682900 -0.210937
    +v -2.783160 1.682900 -0.210937
    +v -2.836960 1.669520 -0.225000
    +v -2.850000 1.800000 -0.225000
    +v -2.794920 1.800000 -0.210937
    +v -2.746880 1.800000 -0.168750
    +v -2.736220 1.694570 -0.168750
    +v -2.736220 1.694570 -0.168750
    +v -2.783160 1.682900 -0.210937
    +v -2.794920 1.800000 -0.210937
    +v -2.746880 1.800000 -0.168750
    +v -2.712890 1.800000 -0.098438
    +v -2.703020 1.702830 -0.098438
    +v -2.703020 1.702830 -0.098438
    +v -2.736220 1.694570 -0.168750
    +v -2.746880 1.800000 -0.168750
    +v -2.712890 1.800000 -0.098438
    +v -2.700000 1.800000 0.000000
    +v -2.690430 1.705960 0.000000
    +v -2.690430 1.705960 0.000000
    +v -2.703020 1.702830 -0.098438
    +v -2.712890 1.800000 -0.098438
    +v -2.983500 1.633080 0.000000
    +v -2.970900 1.636210 -0.098438
    +v -2.921880 1.475530 -0.098438
    +v -2.921880 1.475530 -0.098438
    +v -2.933590 1.470120 0.000000
    +v -2.983500 1.633080 0.000000
    +v -2.970900 1.636210 -0.098438
    +v -2.937700 1.644470 -0.168750
    +v -2.890990 1.489800 -0.168750
    +v -2.890990 1.489800 -0.168750
    +v -2.921880 1.475530 -0.098438
    +v -2.970900 1.636210 -0.098438
    +v -2.937700 1.644470 -0.168750
    +v -2.890770 1.656140 -0.210937
    +v -2.847320 1.509980 -0.210937
    +v -2.847320 1.509980 -0.210937
    +v -2.890990 1.489800 -0.168750
    +v -2.937700 1.644470 -0.168750
    +v -2.890770 1.656140 -0.210937
    +v -2.836960 1.669520 -0.225000
    +v -2.797270 1.533110 -0.225000
    +v -2.797270 1.533110 -0.225000
    +v -2.847320 1.509980 -0.210937
    +v -2.890770 1.656140 -0.210937
    +v -2.836960 1.669520 -0.225000
    +v -2.783160 1.682900 -0.210937
    +v -2.747210 1.556230 -0.210937
    +v -2.747210 1.556230 -0.210937
    +v -2.797270 1.533110 -0.225000
    +v -2.836960 1.669520 -0.225000
    +v -2.783160 1.682900 -0.210937
    +v -2.736220 1.694570 -0.168750
    +v -2.703540 1.576410 -0.168750
    +v -2.703540 1.576410 -0.168750
    +v -2.747210 1.556230 -0.210937
    +v -2.783160 1.682900 -0.210937
    +v -2.736220 1.694570 -0.168750
    +v -2.703020 1.702830 -0.098438
    +v -2.672650 1.590680 -0.098438
    +v -2.672650 1.590680 -0.098438
    +v -2.703540 1.576410 -0.168750
    +v -2.736220 1.694570 -0.168750
    +v -2.703020 1.702830 -0.098438
    +v -2.690430 1.705960 0.000000
    +v -2.660940 1.596090 0.000000
    +v -2.660940 1.596090 0.000000
    +v -2.672650 1.590680 -0.098438
    +v -2.703020 1.702830 -0.098438
    +v -2.933590 1.470120 0.000000
    +v -2.921880 1.475530 -0.098438
    +v -2.839420 1.318600 -0.098438
    +v -2.839420 1.318600 -0.098438
    +v -2.849710 1.311550 0.000000
    +v -2.933590 1.470120 0.000000
    +v -2.921880 1.475530 -0.098438
    +v -2.890990 1.489800 -0.168750
    +v -2.812310 1.337190 -0.168750
    +v -2.812310 1.337190 -0.168750
    +v -2.839420 1.318600 -0.098438
    +v -2.921880 1.475530 -0.098438
    +v -2.890990 1.489800 -0.168750
    +v -2.847320 1.509980 -0.210937
    +v -2.773970 1.363480 -0.210937
    +v -2.773970 1.363480 -0.210937
    +v -2.812310 1.337190 -0.168750
    +v -2.890990 1.489800 -0.168750
    +v -2.847320 1.509980 -0.210937
    +v -2.797270 1.533110 -0.225000
    +v -2.730030 1.393620 -0.225000
    +v -2.730030 1.393620 -0.225000
    +v -2.773970 1.363480 -0.210937
    +v -2.847320 1.509980 -0.210937
    +v -2.797270 1.533110 -0.225000
    +v -2.747210 1.556230 -0.210937
    +v -2.686090 1.423750 -0.210937
    +v -2.686090 1.423750 -0.210937
    +v -2.730030 1.393620 -0.225000
    +v -2.797270 1.533110 -0.225000
    +v -2.747210 1.556230 -0.210937
    +v -2.703540 1.576410 -0.168750
    +v -2.647750 1.450040 -0.168750
    +v -2.647750 1.450040 -0.168750
    +v -2.686090 1.423750 -0.210937
    +v -2.747210 1.556230 -0.210937
    +v -2.703540 1.576410 -0.168750
    +v -2.672650 1.590680 -0.098438
    +v -2.620640 1.468630 -0.098438
    +v -2.620640 1.468630 -0.098438
    +v -2.647750 1.450040 -0.168750
    +v -2.703540 1.576410 -0.168750
    +v -2.672650 1.590680 -0.098438
    +v -2.660940 1.596090 0.000000
    +v -2.610350 1.475680 0.000000
    +v -2.610350 1.475680 0.000000
    +v -2.620640 1.468630 -0.098438
    +v -2.672650 1.590680 -0.098438
    +v -2.849710 1.311550 0.000000
    +v -2.839420 1.318600 -0.098438
    +v -2.722920 1.166070 -0.098438
    +v -2.722920 1.166070 -0.098438
    +v -2.731250 1.157810 0.000000
    +v -2.849710 1.311550 0.000000
    +v -2.839420 1.318600 -0.098438
    +v -2.812310 1.337190 -0.168750
    +v -2.700980 1.187840 -0.168750
    +v -2.700980 1.187840 -0.168750
    +v -2.722920 1.166070 -0.098438
    +v -2.839420 1.318600 -0.098438
    +v -2.812310 1.337190 -0.168750
    +v -2.773970 1.363480 -0.210937
    +v -2.669950 1.218620 -0.210937
    +v -2.669950 1.218620 -0.210937
    +v -2.700980 1.187840 -0.168750
    +v -2.812310 1.337190 -0.168750
    +v -2.773970 1.363480 -0.210937
    +v -2.730030 1.393620 -0.225000
    +v -2.634380 1.253910 -0.225000
    +v -2.634380 1.253910 -0.225000
    +v -2.669950 1.218620 -0.210937
    +v -2.773970 1.363480 -0.210937
    +v -2.730030 1.393620 -0.225000
    +v -2.686090 1.423750 -0.210937
    +v -2.598800 1.289190 -0.210937
    +v -2.598800 1.289190 -0.210937
    +v -2.634380 1.253910 -0.225000
    +v -2.730030 1.393620 -0.225000
    +v -2.686090 1.423750 -0.210937
    +v -2.647750 1.450040 -0.168750
    +v -2.567770 1.319970 -0.168750
    +v -2.567770 1.319970 -0.168750
    +v -2.598800 1.289190 -0.210937
    +v -2.686090 1.423750 -0.210937
    +v -2.647750 1.450040 -0.168750
    +v -2.620640 1.468630 -0.098438
    +v -2.545830 1.341740 -0.098438
    +v -2.545830 1.341740 -0.098438
    +v -2.567770 1.319970 -0.168750
    +v -2.647750 1.450040 -0.168750
    +v -2.620640 1.468630 -0.098438
    +v -2.610350 1.475680 0.000000
    +v -2.537500 1.350000 0.000000
    +v -2.537500 1.350000 0.000000
    +v -2.545830 1.341740 -0.098438
    +v -2.620640 1.468630 -0.098438
    +v -2.731250 1.157810 0.000000
    +v -2.722920 1.166070 -0.098438
    +v -2.571770 1.018590 -0.098438
    +v -2.571770 1.018590 -0.098438
    +v -2.577640 1.009350 0.000000
    +v -2.731250 1.157810 0.000000
    +v -2.722920 1.166070 -0.098438
    +v -2.700980 1.187840 -0.168750
    +v -2.556320 1.042940 -0.168750
    +v -2.556320 1.042940 -0.168750
    +v -2.571770 1.018590 -0.098438
    +v -2.722920 1.166070 -0.098438
    +v -2.700980 1.187840 -0.168750
    +v -2.669950 1.218620 -0.210937
    +v -2.534470 1.077370 -0.210937
    +v -2.534470 1.077370 -0.210937
    +v -2.556320 1.042940 -0.168750
    +v -2.700980 1.187840 -0.168750
    +v -2.669950 1.218620 -0.210937
    +v -2.634380 1.253910 -0.225000
    +v -2.509420 1.116830 -0.225000
    +v -2.509420 1.116830 -0.225000
    +v -2.534470 1.077370 -0.210937
    +v -2.669950 1.218620 -0.210937
    +v -2.634380 1.253910 -0.225000
    +v -2.598800 1.289190 -0.210937
    +v -2.484380 1.156300 -0.210937
    +v -2.484380 1.156300 -0.210937
    +v -2.509420 1.116830 -0.225000
    +v -2.634380 1.253910 -0.225000
    +v -2.598800 1.289190 -0.210937
    +v -2.567770 1.319970 -0.168750
    +v -2.462530 1.190730 -0.168750
    +v -2.462530 1.190730 -0.168750
    +v -2.484380 1.156300 -0.210937
    +v -2.598800 1.289190 -0.210937
    +v -2.567770 1.319970 -0.168750
    +v -2.545830 1.341740 -0.098438
    +v -2.447070 1.215080 -0.098438
    +v -2.447070 1.215080 -0.098438
    +v -2.462530 1.190730 -0.168750
    +v -2.567770 1.319970 -0.168750
    +v -2.545830 1.341740 -0.098438
    +v -2.537500 1.350000 0.000000
    +v -2.441210 1.224320 0.000000
    +v -2.441210 1.224320 0.000000
    +v -2.447070 1.215080 -0.098438
    +v -2.545830 1.341740 -0.098438
    +v -2.577640 1.009350 0.000000
    +v -2.571770 1.018590 -0.098438
    +v -2.385360 0.876798 -0.098438
    +v -2.385360 0.876798 -0.098438
    +v -2.388280 0.866602 0.000000
    +v -2.577640 1.009350 0.000000
    +v -2.571770 1.018590 -0.098438
    +v -2.556320 1.042940 -0.168750
    +v -2.377660 0.903680 -0.168750
    +v -2.377660 0.903680 -0.168750
    +v -2.385360 0.876798 -0.098438
    +v -2.571770 1.018590 -0.098438
    +v -2.556320 1.042940 -0.168750
    +v -2.534470 1.077370 -0.210937
    +v -2.366780 0.941686 -0.210937
    +v -2.366780 0.941686 -0.210937
    +v -2.377660 0.903680 -0.168750
    +v -2.556320 1.042940 -0.168750
    +v -2.534470 1.077370 -0.210937
    +v -2.509420 1.116830 -0.225000
    +v -2.354300 0.985254 -0.225000
    +v -2.354300 0.985254 -0.225000
    +v -2.366780 0.941686 -0.210937
    +v -2.534470 1.077370 -0.210937
    +v -2.509420 1.116830 -0.225000
    +v -2.484380 1.156300 -0.210937
    +v -2.341820 1.028820 -0.210937
    +v -2.341820 1.028820 -0.210937
    +v -2.354300 0.985254 -0.225000
    +v -2.509420 1.116830 -0.225000
    +v -2.484380 1.156300 -0.210937
    +v -2.462530 1.190730 -0.168750
    +v -2.330930 1.066830 -0.168750
    +v -2.330930 1.066830 -0.168750
    +v -2.341820 1.028820 -0.210937
    +v -2.484380 1.156300 -0.210937
    +v -2.462530 1.190730 -0.168750
    +v -2.447070 1.215080 -0.098438
    +v -2.323230 1.093710 -0.098438
    +v -2.323230 1.093710 -0.098438
    +v -2.330930 1.066830 -0.168750
    +v -2.462530 1.190730 -0.168750
    +v -2.447070 1.215080 -0.098438
    +v -2.441210 1.224320 0.000000
    +v -2.320310 1.103910 0.000000
    +v -2.320310 1.103910 0.000000
    +v -2.323230 1.093710 -0.098438
    +v -2.447070 1.215080 -0.098438
    +v -2.388280 0.866602 0.000000
    +v -2.385360 0.876798 -0.098438
    +v -2.163070 0.741350 -0.098438
    +v -2.163070 0.741350 -0.098438
    +v -2.162600 0.730005 0.000000
    +v -2.388280 0.866602 0.000000
    +v -2.385360 0.876798 -0.098438
    +v -2.377660 0.903680 -0.168750
    +v -2.164320 0.771261 -0.168750
    +v -2.164320 0.771261 -0.168750
    +v -2.163070 0.741350 -0.098438
    +v -2.385360 0.876798 -0.098438
    +v -2.377660 0.903680 -0.168750
    +v -2.366780 0.941686 -0.210937
    +v -2.166090 0.813548 -0.210937
    +v -2.166090 0.813548 -0.210937
    +v -2.164320 0.771261 -0.168750
    +v -2.377660 0.903680 -0.168750
    +v -2.366780 0.941686 -0.210937
    +v -2.354300 0.985254 -0.225000
    +v -2.168120 0.862024 -0.225000
    +v -2.168120 0.862024 -0.225000
    +v -2.166090 0.813548 -0.210937
    +v -2.366780 0.941686 -0.210937
    +v -2.354300 0.985254 -0.225000
    +v -2.341820 1.028820 -0.210937
    +v -2.170140 0.910500 -0.210937
    +v -2.170140 0.910500 -0.210937
    +v -2.168120 0.862024 -0.225000
    +v -2.354300 0.985254 -0.225000
    +v -2.341820 1.028820 -0.210937
    +v -2.330930 1.066830 -0.168750
    +v -2.171910 0.952787 -0.168750
    +v -2.171910 0.952787 -0.168750
    +v -2.170140 0.910500 -0.210937
    +v -2.341820 1.028820 -0.210937
    +v -2.330930 1.066830 -0.168750
    +v -2.323230 1.093710 -0.098438
    +v -2.173160 0.982698 -0.098438
    +v -2.173160 0.982698 -0.098438
    +v -2.171910 0.952787 -0.168750
    +v -2.330930 1.066830 -0.168750
    +v -2.323230 1.093710 -0.098438
    +v -2.320310 1.103910 0.000000
    +v -2.173630 0.994043 0.000000
    +v -2.173630 0.994043 0.000000
    +v -2.173160 0.982698 -0.098438
    +v -2.323230 1.093710 -0.098438
    +v -2.162600 0.730005 0.000000
    +v -2.163070 0.741350 -0.098438
    +v -1.904300 0.612891 -0.098438
    +v -1.904300 0.612891 -0.098438
    +v -1.900000 0.600000 0.000000
    +v -2.162600 0.730005 0.000000
    +v -2.163070 0.741350 -0.098438
    +v -2.164320 0.771261 -0.168750
    +v -1.915620 0.646875 -0.168750
    +v -1.915620 0.646875 -0.168750
    +v -1.904300 0.612891 -0.098438
    +v -2.163070 0.741350 -0.098438
    +v -2.164320 0.771261 -0.168750
    +v -2.166090 0.813548 -0.210937
    +v -1.931640 0.694922 -0.210937
    +v -1.931640 0.694922 -0.210937
    +v -1.915620 0.646875 -0.168750
    +v -2.164320 0.771261 -0.168750
    +v -2.166090 0.813548 -0.210937
    +v -2.168120 0.862024 -0.225000
    +v -1.950000 0.750000 -0.225000
    +v -1.950000 0.750000 -0.225000
    +v -1.931640 0.694922 -0.210937
    +v -2.166090 0.813548 -0.210937
    +v -2.168120 0.862024 -0.225000
    +v -2.170140 0.910500 -0.210937
    +v -1.968360 0.805078 -0.210937
    +v -1.968360 0.805078 -0.210937
    +v -1.950000 0.750000 -0.225000
    +v -2.168120 0.862024 -0.225000
    +v -2.170140 0.910500 -0.210937
    +v -2.171910 0.952787 -0.168750
    +v -1.984380 0.853125 -0.168750
    +v -1.984380 0.853125 -0.168750
    +v -1.968360 0.805078 -0.210937
    +v -2.170140 0.910500 -0.210937
    +v -2.171910 0.952787 -0.168750
    +v -2.173160 0.982698 -0.098438
    +v -1.995700 0.887109 -0.098438
    +v -1.995700 0.887109 -0.098438
    +v -1.984380 0.853125 -0.168750
    +v -2.171910 0.952787 -0.168750
    +v -2.173160 0.982698 -0.098438
    +v -2.173630 0.994043 0.000000
    +v -2.000000 0.900000 0.000000
    +v -2.000000 0.900000 0.000000
    +v -1.995700 0.887109 -0.098438
    +v -2.173160 0.982698 -0.098438
    +v 1.700000 1.425000 0.000000
    +v 1.700000 1.389550 0.216562
    +v 1.991360 1.423310 0.210782
    +v 1.991360 1.423310 0.210782
    +v 1.984960 1.454590 0.000000
    +v 1.700000 1.425000 0.000000
    +v 1.700000 1.389550 0.216562
    +v 1.700000 1.296090 0.371250
    +v 2.008220 1.340840 0.361340
    +v 2.008220 1.340840 0.361340
    +v 1.991360 1.423310 0.210782
    +v 1.700000 1.389550 0.216562
    +v 1.700000 1.296090 0.371250
    +v 1.700000 1.163960 0.464062
    +v 2.032050 1.224240 0.451675
    +v 2.032050 1.224240 0.451675
    +v 2.008220 1.340840 0.361340
    +v 1.700000 1.296090 0.371250
    +v 1.700000 1.163960 0.464062
    +v 1.700000 1.012500 0.495000
    +v 2.059370 1.090580 0.481787
    +v 2.059370 1.090580 0.481787
    +v 2.032050 1.224240 0.451675
    +v 1.700000 1.163960 0.464062
    +v 1.700000 1.012500 0.495000
    +v 1.700000 0.861035 0.464062
    +v 2.086700 0.956915 0.451675
    +v 2.086700 0.956915 0.451675
    +v 2.059370 1.090580 0.481787
    +v 1.700000 1.012500 0.495000
    +v 1.700000 0.861035 0.464062
    +v 1.700000 0.728906 0.371250
    +v 2.110530 0.840317 0.361340
    +v 2.110530 0.840317 0.361340
    +v 2.086700 0.956915 0.451675
    +v 1.700000 0.861035 0.464062
    +v 1.700000 0.728906 0.371250
    +v 1.700000 0.635449 0.216562
    +v 2.127390 0.757845 0.210782
    +v 2.127390 0.757845 0.210782
    +v 2.110530 0.840317 0.361340
    +v 1.700000 0.728906 0.371250
    +v 1.700000 0.635449 0.216562
    +v 1.700000 0.600000 0.000000
    +v 2.133790 0.726563 0.000000
    +v 2.133790 0.726563 0.000000
    +v 2.127390 0.757845 0.210782
    +v 1.700000 0.635449 0.216562
    +v 1.984960 1.454590 0.000000
    +v 1.991360 1.423310 0.210782
    +v 2.189760 1.508870 0.195542
    +v 2.189760 1.508870 0.195542
    +v 2.179690 1.535160 0.000000
    +v 1.984960 1.454590 0.000000
    +v 1.991360 1.423310 0.210782
    +v 2.008220 1.340840 0.361340
    +v 2.216310 1.439580 0.335215
    +v 2.216310 1.439580 0.335215
    +v 2.189760 1.508870 0.195542
    +v 1.991360 1.423310 0.210782
    +v 2.008220 1.340840 0.361340
    +v 2.032050 1.224240 0.451675
    +v 2.253850 1.341600 0.419019
    +v 2.253850 1.341600 0.419019
    +v 2.216310 1.439580 0.335215
    +v 2.008220 1.340840 0.361340
    +v 2.032050 1.224240 0.451675
    +v 2.059370 1.090580 0.481787
    +v 2.296880 1.229300 0.446953
    +v 2.296880 1.229300 0.446953
    +v 2.253850 1.341600 0.419019
    +v 2.032050 1.224240 0.451675
    +v 2.059370 1.090580 0.481787
    +v 2.086700 0.956915 0.451675
    +v 2.339900 1.116990 0.419019
    +v 2.339900 1.116990 0.419019
    +v 2.296880 1.229300 0.446953
    +v 2.059370 1.090580 0.481787
    +v 2.086700 0.956915 0.451675
    +v 2.110530 0.840317 0.361340
    +v 2.377440 1.019020 0.335215
    +v 2.377440 1.019020 0.335215
    +v 2.339900 1.116990 0.419019
    +v 2.086700 0.956915 0.451675
    +v 2.110530 0.840317 0.361340
    +v 2.127390 0.757845 0.210782
    +v 2.403990 0.949722 0.195542
    +v 2.403990 0.949722 0.195542
    +v 2.377440 1.019020 0.335215
    +v 2.110530 0.840317 0.361340
    +v 2.127390 0.757845 0.210782
    +v 2.133790 0.726563 0.000000
    +v 2.414060 0.923437 0.000000
    +v 2.414060 0.923437 0.000000
    +v 2.403990 0.949722 0.195542
    +v 2.127390 0.757845 0.210782
    +v 2.179690 1.535160 0.000000
    +v 2.189760 1.508870 0.195542
    +v 2.318380 1.633560 0.173996
    +v 2.318380 1.633560 0.173996
    +v 2.306450 1.654390 0.000000
    +v 2.179690 1.535160 0.000000
    +v 2.189760 1.508870 0.195542
    +v 2.216310 1.439580 0.335215
    +v 2.349840 1.578630 0.298279
    +v 2.349840 1.578630 0.298279
    +v 2.318380 1.633560 0.173996
    +v 2.189760 1.508870 0.195542
    +v 2.216310 1.439580 0.335215
    +v 2.253850 1.341600 0.419019
    +v 2.394320 1.500980 0.372849
    +v 2.394320 1.500980 0.372849
    +v 2.349840 1.578630 0.298279
    +v 2.216310 1.439580 0.335215
    +v 2.253850 1.341600 0.419019
    +v 2.296880 1.229300 0.446953
    +v 2.445310 1.411960 0.397705
    +v 2.445310 1.411960 0.397705
    +v 2.394320 1.500980 0.372849
    +v 2.253850 1.341600 0.419019
    +v 2.296880 1.229300 0.446953
    +v 2.339900 1.116990 0.419019
    +v 2.496300 1.322950 0.372849
    +v 2.496300 1.322950 0.372849
    +v 2.445310 1.411960 0.397705
    +v 2.296880 1.229300 0.446953
    +v 2.339900 1.116990 0.419019
    +v 2.377440 1.019020 0.335215
    +v 2.540780 1.245290 0.298279
    +v 2.540780 1.245290 0.298279
    +v 2.496300 1.322950 0.372849
    +v 2.339900 1.116990 0.419019
    +v 2.377440 1.019020 0.335215
    +v 2.403990 0.949722 0.195542
    +v 2.572250 1.190370 0.173996
    +v 2.572250 1.190370 0.173996
    +v 2.540780 1.245290 0.298279
    +v 2.377440 1.019020 0.335215
    +v 2.403990 0.949722 0.195542
    +v 2.414060 0.923437 0.000000
    +v 2.584180 1.169530 0.000000
    +v 2.584180 1.169530 0.000000
    +v 2.572250 1.190370 0.173996
    +v 2.403990 0.949722 0.195542
    +v 2.306450 1.654390 0.000000
    +v 2.318380 1.633560 0.173996
    +v 2.400390 1.784690 0.149297
    +v 2.400390 1.784690 0.149297
    +v 2.387500 1.800000 0.000000
    +v 2.306450 1.654390 0.000000
    +v 2.318380 1.633560 0.173996
    +v 2.349840 1.578630 0.298279
    +v 2.434370 1.744340 0.255937
    +v 2.434370 1.744340 0.255937
    +v 2.400390 1.784690 0.149297
    +v 2.318380 1.633560 0.173996
    +v 2.349840 1.578630 0.298279
    +v 2.394320 1.500980 0.372849
    +v 2.482420 1.687280 0.319922
    +v 2.482420 1.687280 0.319922
    +v 2.434370 1.744340 0.255937
    +v 2.349840 1.578630 0.298279
    +v 2.394320 1.500980 0.372849
    +v 2.445310 1.411960 0.397705
    +v 2.537500 1.621870 0.341250
    +v 2.537500 1.621870 0.341250
    +v 2.482420 1.687280 0.319922
    +v 2.394320 1.500980 0.372849
    +v 2.445310 1.411960 0.397705
    +v 2.496300 1.322950 0.372849
    +v 2.592580 1.556470 0.319922
    +v 2.592580 1.556470 0.319922
    +v 2.537500 1.621870 0.341250
    +v 2.445310 1.411960 0.397705
    +v 2.496300 1.322950 0.372849
    +v 2.540780 1.245290 0.298279
    +v 2.640620 1.499410 0.255937
    +v 2.640620 1.499410 0.255937
    +v 2.592580 1.556470 0.319922
    +v 2.496300 1.322950 0.372849
    +v 2.540780 1.245290 0.298279
    +v 2.572250 1.190370 0.173996
    +v 2.674610 1.459060 0.149297
    +v 2.674610 1.459060 0.149297
    +v 2.640620 1.499410 0.255937
    +v 2.540780 1.245290 0.298279
    +v 2.572250 1.190370 0.173996
    +v 2.584180 1.169530 0.000000
    +v 2.687500 1.443750 0.000000
    +v 2.687500 1.443750 0.000000
    +v 2.674610 1.459060 0.149297
    +v 2.572250 1.190370 0.173996
    +v 2.387500 1.800000 0.000000
    +v 2.400390 1.784690 0.149297
    +v 2.458960 1.949580 0.124598
    +v 2.458960 1.949580 0.124598
    +v 2.445120 1.959670 0.000000
    +v 2.387500 1.800000 0.000000
    +v 2.400390 1.784690 0.149297
    +v 2.434370 1.744340 0.255937
    +v 2.495470 1.923000 0.213596
    +v 2.495470 1.923000 0.213596
    +v 2.458960 1.949580 0.124598
    +v 2.400390 1.784690 0.149297
    +v 2.434370 1.744340 0.255937
    +v 2.482420 1.687280 0.319922
    +v 2.547080 1.885420 0.266995
    +v 2.547080 1.885420 0.266995
    +v 2.495470 1.923000 0.213596
    +v 2.434370 1.744340 0.255937
    +v 2.482420 1.687280 0.319922
    +v 2.537500 1.621870 0.341250
    +v 2.606250 1.842330 0.284795
    +v 2.606250 1.842330 0.284795
    +v 2.547080 1.885420 0.266995
    +v 2.482420 1.687280 0.319922
    +v 2.537500 1.621870 0.341250
    +v 2.592580 1.556470 0.319922
    +v 2.665420 1.799250 0.266995
    +v 2.665420 1.799250 0.266995
    +v 2.606250 1.842330 0.284795
    +v 2.537500 1.621870 0.341250
    +v 2.592580 1.556470 0.319922
    +v 2.640620 1.499410 0.255937
    +v 2.717030 1.761670 0.213596
    +v 2.717030 1.761670 0.213596
    +v 2.665420 1.799250 0.266995
    +v 2.592580 1.556470 0.319922
    +v 2.640620 1.499410 0.255937
    +v 2.674610 1.459060 0.149297
    +v 2.753540 1.735080 0.124598
    +v 2.753540 1.735080 0.124598
    +v 2.717030 1.761670 0.213596
    +v 2.640620 1.499410 0.255937
    +v 2.674610 1.459060 0.149297
    +v 2.687500 1.443750 0.000000
    +v 2.767380 1.725000 0.000000
    +v 2.767380 1.725000 0.000000
    +v 2.753540 1.735080 0.124598
    +v 2.674610 1.459060 0.149297
    +v 2.445120 1.959670 0.000000
    +v 2.458960 1.949580 0.124598
    +v 2.517270 2.115550 0.103052
    +v 2.517270 2.115550 0.103052
    +v 2.501560 2.121090 0.000000
    +v 2.445120 1.959670 0.000000
    +v 2.458960 1.949580 0.124598
    +v 2.495470 1.923000 0.213596
    +v 2.558690 2.100950 0.176660
    +v 2.558690 2.100950 0.176660
    +v 2.517270 2.115550 0.103052
    +v 2.458960 1.949580 0.124598
    +v 2.495470 1.923000 0.213596
    +v 2.547080 1.885420 0.266995
    +v 2.617250 2.080310 0.220825
    +v 2.617250 2.080310 0.220825
    +v 2.558690 2.100950 0.176660
    +v 2.495470 1.923000 0.213596
    +v 2.547080 1.885420 0.266995
    +v 2.606250 1.842330 0.284795
    +v 2.684380 2.056640 0.235547
    +v 2.684380 2.056640 0.235547
    +v 2.617250 2.080310 0.220825
    +v 2.547080 1.885420 0.266995
    +v 2.606250 1.842330 0.284795
    +v 2.665420 1.799250 0.266995
    +v 2.751500 2.032970 0.220825
    +v 2.751500 2.032970 0.220825
    +v 2.684380 2.056640 0.235547
    +v 2.606250 1.842330 0.284795
    +v 2.665420 1.799250 0.266995
    +v 2.717030 1.761670 0.213596
    +v 2.810060 2.012330 0.176660
    +v 2.810060 2.012330 0.176660
    +v 2.751500 2.032970 0.220825
    +v 2.665420 1.799250 0.266995
    +v 2.717030 1.761670 0.213596
    +v 2.753540 1.735080 0.124598
    +v 2.851480 1.997730 0.103052
    +v 2.851480 1.997730 0.103052
    +v 2.810060 2.012330 0.176660
    +v 2.717030 1.761670 0.213596
    +v 2.753540 1.735080 0.124598
    +v 2.767380 1.725000 0.000000
    +v 2.867190 1.992190 0.000000
    +v 2.867190 1.992190 0.000000
    +v 2.851480 1.997730 0.103052
    +v 2.753540 1.735080 0.124598
    +v 2.501560 2.121090 0.000000
    +v 2.517270 2.115550 0.103052
    +v 2.598490 2.269920 0.087812
    +v 2.598490 2.269920 0.087812
    +v 2.579100 2.271970 0.000000
    +v 2.501560 2.121090 0.000000
    +v 2.517270 2.115550 0.103052
    +v 2.558690 2.100950 0.176660
    +v 2.649600 2.264510 0.150535
    +v 2.649600 2.264510 0.150535
    +v 2.598490 2.269920 0.087812
    +v 2.517270 2.115550 0.103052
    +v 2.558690 2.100950 0.176660
    +v 2.617250 2.080310 0.220825
    +v 2.721860 2.256860 0.188168
    +v 2.721860 2.256860 0.188168
    +v 2.649600 2.264510 0.150535
    +v 2.558690 2.100950 0.176660
    +v 2.617250 2.080310 0.220825
    +v 2.684380 2.056640 0.235547
    +v 2.804690 2.248100 0.200713
    +v 2.804690 2.248100 0.200713
    +v 2.721860 2.256860 0.188168
    +v 2.617250 2.080310 0.220825
    +v 2.684380 2.056640 0.235547
    +v 2.751500 2.032970 0.220825
    +v 2.887520 2.239330 0.188168
    +v 2.887520 2.239330 0.188168
    +v 2.804690 2.248100 0.200713
    +v 2.684380 2.056640 0.235547
    +v 2.751500 2.032970 0.220825
    +v 2.810060 2.012330 0.176660
    +v 2.959780 2.231680 0.150535
    +v 2.959780 2.231680 0.150535
    +v 2.887520 2.239330 0.188168
    +v 2.751500 2.032970 0.220825
    +v 2.810060 2.012330 0.176660
    +v 2.851480 1.997730 0.103052
    +v 3.010890 2.226270 0.087812
    +v 3.010890 2.226270 0.087812
    +v 2.959780 2.231680 0.150535
    +v 2.810060 2.012330 0.176660
    +v 2.851480 1.997730 0.103052
    +v 2.867190 1.992190 0.000000
    +v 3.030270 2.224220 0.000000
    +v 3.030270 2.224220 0.000000
    +v 3.010890 2.226270 0.087812
    +v 2.851480 1.997730 0.103052
    +v 2.579100 2.271970 0.000000
    +v 2.598490 2.269920 0.087812
    +v 2.725780 2.400000 0.082031
    +v 2.725780 2.400000 0.082031
    +v 2.700000 2.400000 0.000000
    +v 2.579100 2.271970 0.000000
    +v 2.598490 2.269920 0.087812
    +v 2.649600 2.264510 0.150535
    +v 2.793750 2.400000 0.140625
    +v 2.793750 2.400000 0.140625
    +v 2.725780 2.400000 0.082031
    +v 2.598490 2.269920 0.087812
    +v 2.649600 2.264510 0.150535
    +v 2.721860 2.256860 0.188168
    +v 2.889840 2.400000 0.175781
    +v 2.889840 2.400000 0.175781
    +v 2.793750 2.400000 0.140625
    +v 2.649600 2.264510 0.150535
    +v 2.721860 2.256860 0.188168
    +v 2.804690 2.248100 0.200713
    +v 3.000000 2.400000 0.187500
    +v 3.000000 2.400000 0.187500
    +v 2.889840 2.400000 0.175781
    +v 2.721860 2.256860 0.188168
    +v 2.804690 2.248100 0.200713
    +v 2.887520 2.239330 0.188168
    +v 3.110160 2.400000 0.175781
    +v 3.110160 2.400000 0.175781
    +v 3.000000 2.400000 0.187500
    +v 2.804690 2.248100 0.200713
    +v 2.887520 2.239330 0.188168
    +v 2.959780 2.231680 0.150535
    +v 3.206250 2.400000 0.140625
    +v 3.206250 2.400000 0.140625
    +v 3.110160 2.400000 0.175781
    +v 2.887520 2.239330 0.188168
    +v 2.959780 2.231680 0.150535
    +v 3.010890 2.226270 0.087812
    +v 3.274220 2.400000 0.082031
    +v 3.274220 2.400000 0.082031
    +v 3.206250 2.400000 0.140625
    +v 2.959780 2.231680 0.150535
    +v 3.010890 2.226270 0.087812
    +v 3.030270 2.224220 0.000000
    +v 3.300000 2.400000 0.000000
    +v 3.300000 2.400000 0.000000
    +v 3.274220 2.400000 0.082031
    +v 3.010890 2.226270 0.087812
    +v 1.700000 0.600000 0.000000
    +v 1.700000 0.635449 -0.216562
    +v 2.127390 0.757845 -0.210782
    +v 2.127390 0.757845 -0.210782
    +v 2.133790 0.726562 0.000000
    +v 1.700000 0.600000 0.000000
    +v 1.700000 0.635449 -0.216562
    +v 1.700000 0.728906 -0.371250
    +v 2.110530 0.840317 -0.361340
    +v 2.110530 0.840317 -0.361340
    +v 2.127390 0.757845 -0.210782
    +v 1.700000 0.635449 -0.216562
    +v 1.700000 0.728906 -0.371250
    +v 1.700000 0.861035 -0.464062
    +v 2.086700 0.956915 -0.451675
    +v 2.086700 0.956915 -0.451675
    +v 2.110530 0.840317 -0.361340
    +v 1.700000 0.728906 -0.371250
    +v 1.700000 0.861035 -0.464062
    +v 1.700000 1.012500 -0.495000
    +v 2.059380 1.090580 -0.481787
    +v 2.059380 1.090580 -0.481787
    +v 2.086700 0.956915 -0.451675
    +v 1.700000 0.861035 -0.464062
    +v 1.700000 1.012500 -0.495000
    +v 1.700000 1.163960 -0.464062
    +v 2.032050 1.224240 -0.451675
    +v 2.032050 1.224240 -0.451675
    +v 2.059380 1.090580 -0.481787
    +v 1.700000 1.012500 -0.495000
    +v 1.700000 1.163960 -0.464062
    +v 1.700000 1.296090 -0.371250
    +v 2.008220 1.340840 -0.361340
    +v 2.008220 1.340840 -0.361340
    +v 2.032050 1.224240 -0.451675
    +v 1.700000 1.163960 -0.464062
    +v 1.700000 1.296090 -0.371250
    +v 1.700000 1.389550 -0.216562
    +v 1.991360 1.423310 -0.210782
    +v 1.991360 1.423310 -0.210782
    +v 2.008220 1.340840 -0.361340
    +v 1.700000 1.296090 -0.371250
    +v 1.700000 1.389550 -0.216562
    +v 1.700000 1.425000 0.000000
    +v 1.984960 1.454590 0.000000
    +v 1.984960 1.454590 0.000000
    +v 1.991360 1.423310 -0.210782
    +v 1.700000 1.389550 -0.216562
    +v 2.133790 0.726562 0.000000
    +v 2.127390 0.757845 -0.210782
    +v 2.403990 0.949722 -0.195542
    +v 2.403990 0.949722 -0.195542
    +v 2.414060 0.923437 0.000000
    +v 2.133790 0.726562 0.000000
    +v 2.127390 0.757845 -0.210782
    +v 2.110530 0.840317 -0.361340
    +v 2.377440 1.019020 -0.335215
    +v 2.377440 1.019020 -0.335215
    +v 2.403990 0.949722 -0.195542
    +v 2.127390 0.757845 -0.210782
    +v 2.110530 0.840317 -0.361340
    +v 2.086700 0.956915 -0.451675
    +v 2.339900 1.116990 -0.419019
    +v 2.339900 1.116990 -0.419019
    +v 2.377440 1.019020 -0.335215
    +v 2.110530 0.840317 -0.361340
    +v 2.086700 0.956915 -0.451675
    +v 2.059380 1.090580 -0.481787
    +v 2.296880 1.229300 -0.446953
    +v 2.296880 1.229300 -0.446953
    +v 2.339900 1.116990 -0.419019
    +v 2.086700 0.956915 -0.451675
    +v 2.059380 1.090580 -0.481787
    +v 2.032050 1.224240 -0.451675
    +v 2.253850 1.341600 -0.419019
    +v 2.253850 1.341600 -0.419019
    +v 2.296880 1.229300 -0.446953
    +v 2.059380 1.090580 -0.481787
    +v 2.032050 1.224240 -0.451675
    +v 2.008220 1.340840 -0.361340
    +v 2.216310 1.439580 -0.335215
    +v 2.216310 1.439580 -0.335215
    +v 2.253850 1.341600 -0.419019
    +v 2.032050 1.224240 -0.451675
    +v 2.008220 1.340840 -0.361340
    +v 1.991360 1.423310 -0.210782
    +v 2.189760 1.508870 -0.195542
    +v 2.189760 1.508870 -0.195542
    +v 2.216310 1.439580 -0.335215
    +v 2.008220 1.340840 -0.361340
    +v 1.991360 1.423310 -0.210782
    +v 1.984960 1.454590 0.000000
    +v 2.179690 1.535160 0.000000
    +v 2.179690 1.535160 0.000000
    +v 2.189760 1.508870 -0.195542
    +v 1.991360 1.423310 -0.210782
    +v 2.414060 0.923437 0.000000
    +v 2.403990 0.949722 -0.195542
    +v 2.572250 1.190370 -0.173996
    +v 2.572250 1.190370 -0.173996
    +v 2.584180 1.169530 0.000000
    +v 2.414060 0.923437 0.000000
    +v 2.403990 0.949722 -0.195542
    +v 2.377440 1.019020 -0.335215
    +v 2.540780 1.245290 -0.298279
    +v 2.540780 1.245290 -0.298279
    +v 2.572250 1.190370 -0.173996
    +v 2.403990 0.949722 -0.195542
    +v 2.377440 1.019020 -0.335215
    +v 2.339900 1.116990 -0.419019
    +v 2.496300 1.322950 -0.372849
    +v 2.496300 1.322950 -0.372849
    +v 2.540780 1.245290 -0.298279
    +v 2.377440 1.019020 -0.335215
    +v 2.339900 1.116990 -0.419019
    +v 2.296880 1.229300 -0.446953
    +v 2.445310 1.411960 -0.397705
    +v 2.445310 1.411960 -0.397705
    +v 2.496300 1.322950 -0.372849
    +v 2.339900 1.116990 -0.419019
    +v 2.296880 1.229300 -0.446953
    +v 2.253850 1.341600 -0.419019
    +v 2.394320 1.500980 -0.372849
    +v 2.394320 1.500980 -0.372849
    +v 2.445310 1.411960 -0.397705
    +v 2.296880 1.229300 -0.446953
    +v 2.253850 1.341600 -0.419019
    +v 2.216310 1.439580 -0.335215
    +v 2.349840 1.578630 -0.298279
    +v 2.349840 1.578630 -0.298279
    +v 2.394320 1.500980 -0.372849
    +v 2.253850 1.341600 -0.419019
    +v 2.216310 1.439580 -0.335215
    +v 2.189760 1.508870 -0.195542
    +v 2.318380 1.633560 -0.173996
    +v 2.318380 1.633560 -0.173996
    +v 2.349840 1.578630 -0.298279
    +v 2.216310 1.439580 -0.335215
    +v 2.189760 1.508870 -0.195542
    +v 2.179690 1.535160 0.000000
    +v 2.306450 1.654390 0.000000
    +v 2.306450 1.654390 0.000000
    +v 2.318380 1.633560 -0.173996
    +v 2.189760 1.508870 -0.195542
    +v 2.584180 1.169530 0.000000
    +v 2.572250 1.190370 -0.173996
    +v 2.674610 1.459060 -0.149297
    +v 2.674610 1.459060 -0.149297
    +v 2.687500 1.443750 0.000000
    +v 2.584180 1.169530 0.000000
    +v 2.572250 1.190370 -0.173996
    +v 2.540780 1.245290 -0.298279
    +v 2.640620 1.499410 -0.255937
    +v 2.640620 1.499410 -0.255937
    +v 2.674610 1.459060 -0.149297
    +v 2.572250 1.190370 -0.173996
    +v 2.540780 1.245290 -0.298279
    +v 2.496300 1.322950 -0.372849
    +v 2.592580 1.556470 -0.319922
    +v 2.592580 1.556470 -0.319922
    +v 2.640620 1.499410 -0.255937
    +v 2.540780 1.245290 -0.298279
    +v 2.496300 1.322950 -0.372849
    +v 2.445310 1.411960 -0.397705
    +v 2.537500 1.621870 -0.341250
    +v 2.537500 1.621870 -0.341250
    +v 2.592580 1.556470 -0.319922
    +v 2.496300 1.322950 -0.372849
    +v 2.445310 1.411960 -0.397705
    +v 2.394320 1.500980 -0.372849
    +v 2.482420 1.687280 -0.319922
    +v 2.482420 1.687280 -0.319922
    +v 2.537500 1.621870 -0.341250
    +v 2.445310 1.411960 -0.397705
    +v 2.394320 1.500980 -0.372849
    +v 2.349840 1.578630 -0.298279
    +v 2.434370 1.744340 -0.255937
    +v 2.434370 1.744340 -0.255937
    +v 2.482420 1.687280 -0.319922
    +v 2.394320 1.500980 -0.372849
    +v 2.349840 1.578630 -0.298279
    +v 2.318380 1.633560 -0.173996
    +v 2.400390 1.784690 -0.149297
    +v 2.400390 1.784690 -0.149297
    +v 2.434370 1.744340 -0.255937
    +v 2.349840 1.578630 -0.298279
    +v 2.318380 1.633560 -0.173996
    +v 2.306450 1.654390 0.000000
    +v 2.387500 1.800000 0.000000
    +v 2.387500 1.800000 0.000000
    +v 2.400390 1.784690 -0.149297
    +v 2.318380 1.633560 -0.173996
    +v 2.687500 1.443750 0.000000
    +v 2.674610 1.459060 -0.149297
    +v 2.753540 1.735080 -0.124598
    +v 2.753540 1.735080 -0.124598
    +v 2.767380 1.725000 0.000000
    +v 2.687500 1.443750 0.000000
    +v 2.674610 1.459060 -0.149297
    +v 2.640620 1.499410 -0.255937
    +v 2.717030 1.761670 -0.213596
    +v 2.717030 1.761670 -0.213596
    +v 2.753540 1.735080 -0.124598
    +v 2.674610 1.459060 -0.149297
    +v 2.640620 1.499410 -0.255937
    +v 2.592580 1.556470 -0.319922
    +v 2.665420 1.799250 -0.266995
    +v 2.665420 1.799250 -0.266995
    +v 2.717030 1.761670 -0.213596
    +v 2.640620 1.499410 -0.255937
    +v 2.592580 1.556470 -0.319922
    +v 2.537500 1.621870 -0.341250
    +v 2.606250 1.842330 -0.284795
    +v 2.606250 1.842330 -0.284795
    +v 2.665420 1.799250 -0.266995
    +v 2.592580 1.556470 -0.319922
    +v 2.537500 1.621870 -0.341250
    +v 2.482420 1.687280 -0.319922
    +v 2.547080 1.885420 -0.266995
    +v 2.547080 1.885420 -0.266995
    +v 2.606250 1.842330 -0.284795
    +v 2.537500 1.621870 -0.341250
    +v 2.482420 1.687280 -0.319922
    +v 2.434370 1.744340 -0.255937
    +v 2.495470 1.923000 -0.213596
    +v 2.495470 1.923000 -0.213596
    +v 2.547080 1.885420 -0.266995
    +v 2.482420 1.687280 -0.319922
    +v 2.434370 1.744340 -0.255937
    +v 2.400390 1.784690 -0.149297
    +v 2.458960 1.949580 -0.124598
    +v 2.458960 1.949580 -0.124598
    +v 2.495470 1.923000 -0.213596
    +v 2.434370 1.744340 -0.255937
    +v 2.400390 1.784690 -0.149297
    +v 2.387500 1.800000 0.000000
    +v 2.445120 1.959670 0.000000
    +v 2.445120 1.959670 0.000000
    +v 2.458960 1.949580 -0.124598
    +v 2.400390 1.784690 -0.149297
    +v 2.767380 1.725000 0.000000
    +v 2.753540 1.735080 -0.124598
    +v 2.851480 1.997730 -0.103052
    +v 2.851480 1.997730 -0.103052
    +v 2.867190 1.992190 0.000000
    +v 2.767380 1.725000 0.000000
    +v 2.753540 1.735080 -0.124598
    +v 2.717030 1.761670 -0.213596
    +v 2.810060 2.012330 -0.176660
    +v 2.810060 2.012330 -0.176660
    +v 2.851480 1.997730 -0.103052
    +v 2.753540 1.735080 -0.124598
    +v 2.717030 1.761670 -0.213596
    +v 2.665420 1.799250 -0.266995
    +v 2.751500 2.032970 -0.220825
    +v 2.751500 2.032970 -0.220825
    +v 2.810060 2.012330 -0.176660
    +v 2.717030 1.761670 -0.213596
    +v 2.665420 1.799250 -0.266995
    +v 2.606250 1.842330 -0.284795
    +v 2.684370 2.056640 -0.235547
    +v 2.684370 2.056640 -0.235547
    +v 2.751500 2.032970 -0.220825
    +v 2.665420 1.799250 -0.266995
    +v 2.606250 1.842330 -0.284795
    +v 2.547080 1.885420 -0.266995
    +v 2.617250 2.080310 -0.220825
    +v 2.617250 2.080310 -0.220825
    +v 2.684370 2.056640 -0.235547
    +v 2.606250 1.842330 -0.284795
    +v 2.547080 1.885420 -0.266995
    +v 2.495470 1.923000 -0.213596
    +v 2.558690 2.100950 -0.176660
    +v 2.558690 2.100950 -0.176660
    +v 2.617250 2.080310 -0.220825
    +v 2.547080 1.885420 -0.266995
    +v 2.495470 1.923000 -0.213596
    +v 2.458960 1.949580 -0.124598
    +v 2.517270 2.115550 -0.103052
    +v 2.517270 2.115550 -0.103052
    +v 2.558690 2.100950 -0.176660
    +v 2.495470 1.923000 -0.213596
    +v 2.458960 1.949580 -0.124598
    +v 2.445120 1.959670 0.000000
    +v 2.501560 2.121090 0.000000
    +v 2.501560 2.121090 0.000000
    +v 2.517270 2.115550 -0.103052
    +v 2.458960 1.949580 -0.124598
    +v 2.867190 1.992190 0.000000
    +v 2.851480 1.997730 -0.103052
    +v 3.010890 2.226270 -0.087812
    +v 3.010890 2.226270 -0.087812
    +v 3.030270 2.224220 0.000000
    +v 2.867190 1.992190 0.000000
    +v 2.851480 1.997730 -0.103052
    +v 2.810060 2.012330 -0.176660
    +v 2.959780 2.231680 -0.150535
    +v 2.959780 2.231680 -0.150535
    +v 3.010890 2.226270 -0.087812
    +v 2.851480 1.997730 -0.103052
    +v 2.810060 2.012330 -0.176660
    +v 2.751500 2.032970 -0.220825
    +v 2.887520 2.239330 -0.188168
    +v 2.887520 2.239330 -0.188168
    +v 2.959780 2.231680 -0.150535
    +v 2.810060 2.012330 -0.176660
    +v 2.751500 2.032970 -0.220825
    +v 2.684370 2.056640 -0.235547
    +v 2.804690 2.248100 -0.200713
    +v 2.804690 2.248100 -0.200713
    +v 2.887520 2.239330 -0.188168
    +v 2.751500 2.032970 -0.220825
    +v 2.684370 2.056640 -0.235547
    +v 2.617250 2.080310 -0.220825
    +v 2.721860 2.256860 -0.188168
    +v 2.721860 2.256860 -0.188168
    +v 2.804690 2.248100 -0.200713
    +v 2.684370 2.056640 -0.235547
    +v 2.617250 2.080310 -0.220825
    +v 2.558690 2.100950 -0.176660
    +v 2.649600 2.264510 -0.150535
    +v 2.649600 2.264510 -0.150535
    +v 2.721860 2.256860 -0.188168
    +v 2.617250 2.080310 -0.220825
    +v 2.558690 2.100950 -0.176660
    +v 2.517270 2.115550 -0.103052
    +v 2.598490 2.269920 -0.087812
    +v 2.598490 2.269920 -0.087812
    +v 2.649600 2.264510 -0.150535
    +v 2.558690 2.100950 -0.176660
    +v 2.517270 2.115550 -0.103052
    +v 2.501560 2.121090 0.000000
    +v 2.579100 2.271970 0.000000
    +v 2.579100 2.271970 0.000000
    +v 2.598490 2.269920 -0.087812
    +v 2.517270 2.115550 -0.103052
    +v 3.030270 2.224220 0.000000
    +v 3.010890 2.226270 -0.087812
    +v 3.274220 2.400000 -0.082031
    +v 3.274220 2.400000 -0.082031
    +v 3.300000 2.400000 0.000000
    +v 3.030270 2.224220 0.000000
    +v 3.010890 2.226270 -0.087812
    +v 2.959780 2.231680 -0.150535
    +v 3.206250 2.400000 -0.140625
    +v 3.206250 2.400000 -0.140625
    +v 3.274220 2.400000 -0.082031
    +v 3.010890 2.226270 -0.087812
    +v 2.959780 2.231680 -0.150535
    +v 2.887520 2.239330 -0.188168
    +v 3.110160 2.400000 -0.175781
    +v 3.110160 2.400000 -0.175781
    +v 3.206250 2.400000 -0.140625
    +v 2.959780 2.231680 -0.150535
    +v 2.887520 2.239330 -0.188168
    +v 2.804690 2.248100 -0.200713
    +v 3.000000 2.400000 -0.187500
    +v 3.000000 2.400000 -0.187500
    +v 3.110160 2.400000 -0.175781
    +v 2.887520 2.239330 -0.188168
    +v 2.804690 2.248100 -0.200713
    +v 2.721860 2.256860 -0.188168
    +v 2.889840 2.400000 -0.175781
    +v 2.889840 2.400000 -0.175781
    +v 3.000000 2.400000 -0.187500
    +v 2.804690 2.248100 -0.200713
    +v 2.721860 2.256860 -0.188168
    +v 2.649600 2.264510 -0.150535
    +v 2.793750 2.400000 -0.140625
    +v 2.793750 2.400000 -0.140625
    +v 2.889840 2.400000 -0.175781
    +v 2.721860 2.256860 -0.188168
    +v 2.649600 2.264510 -0.150535
    +v 2.598490 2.269920 -0.087812
    +v 2.725780 2.400000 -0.082031
    +v 2.725780 2.400000 -0.082031
    +v 2.793750 2.400000 -0.140625
    +v 2.649600 2.264510 -0.150535
    +v 2.598490 2.269920 -0.087812
    +v 2.579100 2.271970 0.000000
    +v 2.700000 2.400000 0.000000
    +v 2.700000 2.400000 0.000000
    +v 2.725780 2.400000 -0.082031
    +v 2.598490 2.269920 -0.087812
    +v 2.700000 2.400000 0.000000
    +v 2.725780 2.400000 0.082031
    +v 2.764330 2.424910 0.080621
    +v 2.764330 2.424910 0.080621
    +v 2.737110 2.424610 0.000000
    +v 2.700000 2.400000 0.000000
    +v 2.725780 2.400000 0.082031
    +v 2.793750 2.400000 0.140625
    +v 2.836090 2.425690 0.138208
    +v 2.836090 2.425690 0.138208
    +v 2.764330 2.424910 0.080621
    +v 2.725780 2.400000 0.082031
    +v 2.793750 2.400000 0.140625
    +v 2.889840 2.400000 0.175781
    +v 2.937540 2.426800 0.172760
    +v 2.937540 2.426800 0.172760
    +v 2.836090 2.425690 0.138208
    +v 2.793750 2.400000 0.140625
    +v 2.889840 2.400000 0.175781
    +v 3.000000 2.400000 0.187500
    +v 3.053830 2.428070 0.184277
    +v 3.053830 2.428070 0.184277
    +v 2.937540 2.426800 0.172760
    +v 2.889840 2.400000 0.175781
    +v 3.000000 2.400000 0.187500
    +v 3.110160 2.400000 0.175781
    +v 3.170130 2.429340 0.172760
    +v 3.170130 2.429340 0.172760
    +v 3.053830 2.428070 0.184277
    +v 3.000000 2.400000 0.187500
    +v 3.110160 2.400000 0.175781
    +v 3.206250 2.400000 0.140625
    +v 3.271580 2.430450 0.138208
    +v 3.271580 2.430450 0.138208
    +v 3.170130 2.429340 0.172760
    +v 3.110160 2.400000 0.175781
    +v 3.206250 2.400000 0.140625
    +v 3.274220 2.400000 0.082031
    +v 3.343340 2.431230 0.080621
    +v 3.343340 2.431230 0.080621
    +v 3.271580 2.430450 0.138208
    +v 3.206250 2.400000 0.140625
    +v 3.274220 2.400000 0.082031
    +v 3.300000 2.400000 0.000000
    +v 3.370560 2.431530 0.000000
    +v 3.370560 2.431530 0.000000
    +v 3.343340 2.431230 0.080621
    +v 3.274220 2.400000 0.082031
    +v 2.737110 2.424610 0.000000
    +v 2.764330 2.424910 0.080621
    +v 2.799490 2.442750 0.076904
    +v 2.799490 2.442750 0.076904
    +v 2.771880 2.442190 0.000000
    +v 2.737110 2.424610 0.000000
    +v 2.764330 2.424910 0.080621
    +v 2.836090 2.425690 0.138208
    +v 2.872280 2.444250 0.131836
    +v 2.872280 2.444250 0.131836
    +v 2.799490 2.442750 0.076904
    +v 2.764330 2.424910 0.080621
    +v 2.836090 2.425690 0.138208
    +v 2.937540 2.426800 0.172760
    +v 2.975190 2.446360 0.164795
    +v 2.975190 2.446360 0.164795
    +v 2.872280 2.444250 0.131836
    +v 2.836090 2.425690 0.138208
    +v 2.937540 2.426800 0.172760
    +v 3.053830 2.428070 0.184277
    +v 3.093160 2.448780 0.175781
    +v 3.093160 2.448780 0.175781
    +v 2.975190 2.446360 0.164795
    +v 2.937540 2.426800 0.172760
    +v 3.053830 2.428070 0.184277
    +v 3.170130 2.429340 0.172760
    +v 3.211140 2.451200 0.164795
    +v 3.211140 2.451200 0.164795
    +v 3.093160 2.448780 0.175781
    +v 3.053830 2.428070 0.184277
    +v 3.170130 2.429340 0.172760
    +v 3.271580 2.430450 0.138208
    +v 3.314050 2.453310 0.131836
    +v 3.314050 2.453310 0.131836
    +v 3.211140 2.451200 0.164795
    +v 3.170130 2.429340 0.172760
    +v 3.271580 2.430450 0.138208
    +v 3.343340 2.431230 0.080621
    +v 3.386840 2.454800 0.076904
    +v 3.386840 2.454800 0.076904
    +v 3.314050 2.453310 0.131836
    +v 3.271580 2.430450 0.138208
    +v 3.343340 2.431230 0.080621
    +v 3.370560 2.431530 0.000000
    +v 3.414450 2.455370 0.000000
    +v 3.414450 2.455370 0.000000
    +v 3.386840 2.454800 0.076904
    +v 3.343340 2.431230 0.080621
    +v 2.771880 2.442190 0.000000
    +v 2.799490 2.442750 0.076904
    +v 2.829080 2.453510 0.071649
    +v 2.829080 2.453510 0.071649
    +v 2.801950 2.452730 0.000000
    +v 2.771880 2.442190 0.000000
    +v 2.799490 2.442750 0.076904
    +v 2.872280 2.444250 0.131836
    +v 2.900580 2.455570 0.122827
    +v 2.900580 2.455570 0.122827
    +v 2.829080 2.453510 0.071649
    +v 2.799490 2.442750 0.076904
    +v 2.872280 2.444250 0.131836
    +v 2.975190 2.446360 0.164795
    +v 3.001670 2.458470 0.153534
    +v 3.001670 2.458470 0.153534
    +v 2.900580 2.455570 0.122827
    +v 2.872280 2.444250 0.131836
    +v 2.975190 2.446360 0.164795
    +v 3.093160 2.448780 0.175781
    +v 3.117550 2.461800 0.163770
    +v 3.117550 2.461800 0.163770
    +v 3.001670 2.458470 0.153534
    +v 2.975190 2.446360 0.164795
    +v 3.093160 2.448780 0.175781
    +v 3.211140 2.451200 0.164795
    +v 3.233440 2.465130 0.153534
    +v 3.233440 2.465130 0.153534
    +v 3.117550 2.461800 0.163770
    +v 3.093160 2.448780 0.175781
    +v 3.211140 2.451200 0.164795
    +v 3.314050 2.453310 0.131836
    +v 3.334530 2.468030 0.122827
    +v 3.334530 2.468030 0.122827
    +v 3.233440 2.465130 0.153534
    +v 3.211140 2.451200 0.164795
    +v 3.314050 2.453310 0.131836
    +v 3.386840 2.454800 0.076904
    +v 3.406030 2.470080 0.071649
    +v 3.406030 2.470080 0.071649
    +v 3.334530 2.468030 0.122827
    +v 3.314050 2.453310 0.131836
    +v 3.386840 2.454800 0.076904
    +v 3.414450 2.455370 0.000000
    +v 3.433150 2.470860 0.000000
    +v 3.433150 2.470860 0.000000
    +v 3.406030 2.470080 0.071649
    +v 3.386840 2.454800 0.076904
    +v 2.801950 2.452730 0.000000
    +v 2.829080 2.453510 0.071649
    +v 2.850920 2.457160 0.065625
    +v 2.850920 2.457160 0.065625
    +v 2.825000 2.456250 0.000000
    +v 2.801950 2.452730 0.000000
    +v 2.829080 2.453510 0.071649
    +v 2.900580 2.455570 0.122827
    +v 2.919240 2.459550 0.112500
    +v 2.919240 2.459550 0.112500
    +v 2.850920 2.457160 0.065625
    +v 2.829080 2.453510 0.071649
    +v 2.900580 2.455570 0.122827
    +v 3.001670 2.458470 0.153534
    +v 3.015830 2.462920 0.140625
    +v 3.015830 2.462920 0.140625
    +v 2.919240 2.459550 0.112500
    +v 2.900580 2.455570 0.122827
    +v 3.001670 2.458470 0.153534
    +v 3.117550 2.461800 0.163770
    +v 3.126560 2.466800 0.150000
    +v 3.126560 2.466800 0.150000
    +v 3.015830 2.462920 0.140625
    +v 3.001670 2.458470 0.153534
    +v 3.117550 2.461800 0.163770
    +v 3.233440 2.465130 0.153534
    +v 3.237290 2.470670 0.140625
    +v 3.237290 2.470670 0.140625
    +v 3.126560 2.466800 0.150000
    +v 3.117550 2.461800 0.163770
    +v 3.233440 2.465130 0.153534
    +v 3.334530 2.468030 0.122827
    +v 3.333890 2.474050 0.112500
    +v 3.333890 2.474050 0.112500
    +v 3.237290 2.470670 0.140625
    +v 3.233440 2.465130 0.153534
    +v 3.334530 2.468030 0.122827
    +v 3.406030 2.470080 0.071649
    +v 3.402210 2.476440 0.065625
    +v 3.402210 2.476440 0.065625
    +v 3.333890 2.474050 0.112500
    +v 3.334530 2.468030 0.122827
    +v 3.406030 2.470080 0.071649
    +v 3.433150 2.470860 0.000000
    +v 3.428120 2.477340 0.000000
    +v 3.428120 2.477340 0.000000
    +v 3.402210 2.476440 0.065625
    +v 3.406030 2.470080 0.071649
    +v 2.825000 2.456250 0.000000
    +v 2.850920 2.457160 0.065625
    +v 2.862830 2.453650 0.059601
    +v 2.862830 2.453650 0.059601
    +v 2.838670 2.452730 0.000000
    +v 2.825000 2.456250 0.000000
    +v 2.850920 2.457160 0.065625
    +v 2.919240 2.459550 0.112500
    +v 2.926510 2.456080 0.102173
    +v 2.926510 2.456080 0.102173
    +v 2.862830 2.453650 0.059601
    +v 2.850920 2.457160 0.065625
    +v 2.919240 2.459550 0.112500
    +v 3.015830 2.462920 0.140625
    +v 3.016540 2.459510 0.127716
    +v 3.016540 2.459510 0.127716
    +v 2.926510 2.456080 0.102173
    +v 2.919240 2.459550 0.112500
    +v 3.015830 2.462920 0.140625
    +v 3.126560 2.466800 0.150000
    +v 3.119750 2.463450 0.136230
    +v 3.119750 2.463450 0.136230
    +v 3.016540 2.459510 0.127716
    +v 3.015830 2.462920 0.140625
    +v 3.126560 2.466800 0.150000
    +v 3.237290 2.470670 0.140625
    +v 3.222960 2.467380 0.127716
    +v 3.222960 2.467380 0.127716
    +v 3.119750 2.463450 0.136230
    +v 3.126560 2.466800 0.150000
    +v 3.237290 2.470670 0.140625
    +v 3.333890 2.474050 0.112500
    +v 3.312990 2.470810 0.102173
    +v 3.312990 2.470810 0.102173
    +v 3.222960 2.467380 0.127716
    +v 3.237290 2.470670 0.140625
    +v 3.333890 2.474050 0.112500
    +v 3.402210 2.476440 0.065625
    +v 3.376670 2.473240 0.059601
    +v 3.376670 2.473240 0.059601
    +v 3.312990 2.470810 0.102173
    +v 3.333890 2.474050 0.112500
    +v 3.402210 2.476440 0.065625
    +v 3.428120 2.477340 0.000000
    +v 3.400830 2.474160 0.000000
    +v 3.400830 2.474160 0.000000
    +v 3.376670 2.473240 0.059601
    +v 3.402210 2.476440 0.065625
    +v 2.838670 2.452730 0.000000
    +v 2.862830 2.453650 0.059601
    +v 2.862630 2.442980 0.054346
    +v 2.862630 2.442980 0.054346
    +v 2.840620 2.442190 0.000000
    +v 2.838670 2.452730 0.000000
    +v 2.862830 2.453650 0.059601
    +v 2.926510 2.456080 0.102173
    +v 2.920640 2.445070 0.093164
    +v 2.920640 2.445070 0.093164
    +v 2.862630 2.442980 0.054346
    +v 2.862830 2.453650 0.059601
    +v 2.926510 2.456080 0.102173
    +v 3.016540 2.459510 0.127716
    +v 3.002660 2.448030 0.116455
    +v 3.002660 2.448030 0.116455
    +v 2.920640 2.445070 0.093164
    +v 2.926510 2.456080 0.102173
    +v 3.016540 2.459510 0.127716
    +v 3.119750 2.463450 0.136230
    +v 3.096680 2.451420 0.124219
    +v 3.096680 2.451420 0.124219
    +v 3.002660 2.448030 0.116455
    +v 3.016540 2.459510 0.127716
    +v 3.119750 2.463450 0.136230
    +v 3.222960 2.467380 0.127716
    +v 3.190700 2.454800 0.116455
    +v 3.190700 2.454800 0.116455
    +v 3.096680 2.451420 0.124219
    +v 3.119750 2.463450 0.136230
    +v 3.222960 2.467380 0.127716
    +v 3.312990 2.470810 0.102173
    +v 3.272720 2.457760 0.093164
    +v 3.272720 2.457760 0.093164
    +v 3.190700 2.454800 0.116455
    +v 3.222960 2.467380 0.127716
    +v 3.312990 2.470810 0.102173
    +v 3.376670 2.473240 0.059601
    +v 3.330730 2.459850 0.054346
    +v 3.330730 2.459850 0.054346
    +v 3.272720 2.457760 0.093164
    +v 3.312990 2.470810 0.102173
    +v 3.376670 2.473240 0.059601
    +v 3.400830 2.474160 0.000000
    +v 3.352730 2.460640 0.000000
    +v 3.352730 2.460640 0.000000
    +v 3.330730 2.459850 0.054346
    +v 3.376670 2.473240 0.059601
    +v 2.840620 2.442190 0.000000
    +v 2.862630 2.442980 0.054346
    +v 2.848140 2.425110 0.050629
    +v 2.848140 2.425110 0.050629
    +v 2.828520 2.424610 0.000000
    +v 2.840620 2.442190 0.000000
    +v 2.862630 2.442980 0.054346
    +v 2.920640 2.445070 0.093164
    +v 2.899890 2.426410 0.086792
    +v 2.899890 2.426410 0.086792
    +v 2.848140 2.425110 0.050629
    +v 2.862630 2.442980 0.054346
    +v 2.920640 2.445070 0.093164
    +v 3.002660 2.448030 0.116455
    +v 2.973050 2.428260 0.108490
    +v 2.973050 2.428260 0.108490
    +v 2.899890 2.426410 0.086792
    +v 2.920640 2.445070 0.093164
    +v 3.002660 2.448030 0.116455
    +v 3.096680 2.451420 0.124219
    +v 3.056910 2.430380 0.115723
    +v 3.056910 2.430380 0.115723
    +v 2.973050 2.428260 0.108490
    +v 3.002660 2.448030 0.116455
    +v 3.096680 2.451420 0.124219
    +v 3.190700 2.454800 0.116455
    +v 3.140770 2.432500 0.108490
    +v 3.140770 2.432500 0.108490
    +v 3.056910 2.430380 0.115723
    +v 3.096680 2.451420 0.124219
    +v 3.190700 2.454800 0.116455
    +v 3.272720 2.457760 0.093164
    +v 3.213930 2.434340 0.086792
    +v 3.213930 2.434340 0.086792
    +v 3.140770 2.432500 0.108490
    +v 3.190700 2.454800 0.116455
    +v 3.272720 2.457760 0.093164
    +v 3.330730 2.459850 0.054346
    +v 3.265680 2.435650 0.050629
    +v 3.265680 2.435650 0.050629
    +v 3.213930 2.434340 0.086792
    +v 3.272720 2.457760 0.093164
    +v 3.330730 2.459850 0.054346
    +v 3.352730 2.460640 0.000000
    +v 3.285300 2.436150 0.000000
    +v 3.285300 2.436150 0.000000
    +v 3.265680 2.435650 0.050629
    +v 3.330730 2.459850 0.054346
    +v 2.828520 2.424610 0.000000
    +v 2.848140 2.425110 0.050629
    +v 2.817190 2.400000 0.049219
    +v 2.817190 2.400000 0.049219
    +v 2.800000 2.400000 0.000000
    +v 2.828520 2.424610 0.000000
    +v 2.848140 2.425110 0.050629
    +v 2.899890 2.426410 0.086792
    +v 2.862500 2.400000 0.084375
    +v 2.862500 2.400000 0.084375
    +v 2.817190 2.400000 0.049219
    +v 2.848140 2.425110 0.050629
    +v 2.899890 2.426410 0.086792
    +v 2.973050 2.428260 0.108490
    +v 2.926560 2.400000 0.105469
    +v 2.926560 2.400000 0.105469
    +v 2.862500 2.400000 0.084375
    +v 2.899890 2.426410 0.086792
    +v 2.973050 2.428260 0.108490
    +v 3.056910 2.430380 0.115723
    +v 3.000000 2.400000 0.112500
    +v 3.000000 2.400000 0.112500
    +v 2.926560 2.400000 0.105469
    +v 2.973050 2.428260 0.108490
    +v 3.056910 2.430380 0.115723
    +v 3.140770 2.432500 0.108490
    +v 3.073440 2.400000 0.105469
    +v 3.073440 2.400000 0.105469
    +v 3.000000 2.400000 0.112500
    +v 3.056910 2.430380 0.115723
    +v 3.140770 2.432500 0.108490
    +v 3.213930 2.434340 0.086792
    +v 3.137500 2.400000 0.084375
    +v 3.137500 2.400000 0.084375
    +v 3.073440 2.400000 0.105469
    +v 3.140770 2.432500 0.108490
    +v 3.213930 2.434340 0.086792
    +v 3.265680 2.435650 0.050629
    +v 3.182810 2.400000 0.049219
    +v 3.182810 2.400000 0.049219
    +v 3.137500 2.400000 0.084375
    +v 3.213930 2.434340 0.086792
    +v 3.265680 2.435650 0.050629
    +v 3.285300 2.436150 0.000000
    +v 3.200000 2.400000 0.000000
    +v 3.200000 2.400000 0.000000
    +v 3.182810 2.400000 0.049219
    +v 3.265680 2.435650 0.050629
    +v 3.300000 2.400000 0.000000
    +v 3.274220 2.400000 -0.082031
    +v 3.343340 2.431230 -0.080621
    +v 3.343340 2.431230 -0.080621
    +v 3.370560 2.431530 0.000000
    +v 3.300000 2.400000 0.000000
    +v 3.274220 2.400000 -0.082031
    +v 3.206250 2.400000 -0.140625
    +v 3.271580 2.430450 -0.138208
    +v 3.271580 2.430450 -0.138208
    +v 3.343340 2.431230 -0.080621
    +v 3.274220 2.400000 -0.082031
    +v 3.206250 2.400000 -0.140625
    +v 3.110160 2.400000 -0.175781
    +v 3.170130 2.429340 -0.172760
    +v 3.170130 2.429340 -0.172760
    +v 3.271580 2.430450 -0.138208
    +v 3.206250 2.400000 -0.140625
    +v 3.110160 2.400000 -0.175781
    +v 3.000000 2.400000 -0.187500
    +v 3.053830 2.428070 -0.184277
    +v 3.053830 2.428070 -0.184277
    +v 3.170130 2.429340 -0.172760
    +v 3.110160 2.400000 -0.175781
    +v 3.000000 2.400000 -0.187500
    +v 2.889840 2.400000 -0.175781
    +v 2.937540 2.426800 -0.172760
    +v 2.937540 2.426800 -0.172760
    +v 3.053830 2.428070 -0.184277
    +v 3.000000 2.400000 -0.187500
    +v 2.889840 2.400000 -0.175781
    +v 2.793750 2.400000 -0.140625
    +v 2.836090 2.425690 -0.138208
    +v 2.836090 2.425690 -0.138208
    +v 2.937540 2.426800 -0.172760
    +v 2.889840 2.400000 -0.175781
    +v 2.793750 2.400000 -0.140625
    +v 2.725780 2.400000 -0.082031
    +v 2.764330 2.424910 -0.080621
    +v 2.764330 2.424910 -0.080621
    +v 2.836090 2.425690 -0.138208
    +v 2.793750 2.400000 -0.140625
    +v 2.725780 2.400000 -0.082031
    +v 2.700000 2.400000 0.000000
    +v 2.737110 2.424610 0.000000
    +v 2.737110 2.424610 0.000000
    +v 2.764330 2.424910 -0.080621
    +v 2.725780 2.400000 -0.082031
    +v 3.370560 2.431530 0.000000
    +v 3.343340 2.431230 -0.080621
    +v 3.386840 2.454800 -0.076904
    +v 3.386840 2.454800 -0.076904
    +v 3.414450 2.455370 0.000000
    +v 3.370560 2.431530 0.000000
    +v 3.343340 2.431230 -0.080621
    +v 3.271580 2.430450 -0.138208
    +v 3.314050 2.453310 -0.131836
    +v 3.314050 2.453310 -0.131836
    +v 3.386840 2.454800 -0.076904
    +v 3.343340 2.431230 -0.080621
    +v 3.271580 2.430450 -0.138208
    +v 3.170130 2.429340 -0.172760
    +v 3.211140 2.451200 -0.164795
    +v 3.211140 2.451200 -0.164795
    +v 3.314050 2.453310 -0.131836
    +v 3.271580 2.430450 -0.138208
    +v 3.170130 2.429340 -0.172760
    +v 3.053830 2.428070 -0.184277
    +v 3.093160 2.448780 -0.175781
    +v 3.093160 2.448780 -0.175781
    +v 3.211140 2.451200 -0.164795
    +v 3.170130 2.429340 -0.172760
    +v 3.053830 2.428070 -0.184277
    +v 2.937540 2.426800 -0.172760
    +v 2.975190 2.446360 -0.164795
    +v 2.975190 2.446360 -0.164795
    +v 3.093160 2.448780 -0.175781
    +v 3.053830 2.428070 -0.184277
    +v 2.937540 2.426800 -0.172760
    +v 2.836090 2.425690 -0.138208
    +v 2.872280 2.444250 -0.131836
    +v 2.872280 2.444250 -0.131836
    +v 2.975190 2.446360 -0.164795
    +v 2.937540 2.426800 -0.172760
    +v 2.836090 2.425690 -0.138208
    +v 2.764330 2.424910 -0.080621
    +v 2.799490 2.442750 -0.076904
    +v 2.799490 2.442750 -0.076904
    +v 2.872280 2.444250 -0.131836
    +v 2.836090 2.425690 -0.138208
    +v 2.764330 2.424910 -0.080621
    +v 2.737110 2.424610 0.000000
    +v 2.771880 2.442190 0.000000
    +v 2.771880 2.442190 0.000000
    +v 2.799490 2.442750 -0.076904
    +v 2.764330 2.424910 -0.080621
    +v 3.414450 2.455370 0.000000
    +v 3.386840 2.454800 -0.076904
    +v 3.406030 2.470080 -0.071649
    +v 3.406030 2.470080 -0.071649
    +v 3.433150 2.470860 0.000000
    +v 3.414450 2.455370 0.000000
    +v 3.386840 2.454800 -0.076904
    +v 3.314050 2.453310 -0.131836
    +v 3.334530 2.468030 -0.122827
    +v 3.334530 2.468030 -0.122827
    +v 3.406030 2.470080 -0.071649
    +v 3.386840 2.454800 -0.076904
    +v 3.314050 2.453310 -0.131836
    +v 3.211140 2.451200 -0.164795
    +v 3.233440 2.465130 -0.153534
    +v 3.233440 2.465130 -0.153534
    +v 3.334530 2.468030 -0.122827
    +v 3.314050 2.453310 -0.131836
    +v 3.211140 2.451200 -0.164795
    +v 3.093160 2.448780 -0.175781
    +v 3.117550 2.461800 -0.163770
    +v 3.117550 2.461800 -0.163770
    +v 3.233440 2.465130 -0.153534
    +v 3.211140 2.451200 -0.164795
    +v 3.093160 2.448780 -0.175781
    +v 2.975190 2.446360 -0.164795
    +v 3.001670 2.458470 -0.153534
    +v 3.001670 2.458470 -0.153534
    +v 3.117550 2.461800 -0.163770
    +v 3.093160 2.448780 -0.175781
    +v 2.975190 2.446360 -0.164795
    +v 2.872280 2.444250 -0.131836
    +v 2.900580 2.455570 -0.122827
    +v 2.900580 2.455570 -0.122827
    +v 3.001670 2.458470 -0.153534
    +v 2.975190 2.446360 -0.164795
    +v 2.872280 2.444250 -0.131836
    +v 2.799490 2.442750 -0.076904
    +v 2.829080 2.453510 -0.071649
    +v 2.829080 2.453510 -0.071649
    +v 2.900580 2.455570 -0.122827
    +v 2.872280 2.444250 -0.131836
    +v 2.799490 2.442750 -0.076904
    +v 2.771880 2.442190 0.000000
    +v 2.801950 2.452730 0.000000
    +v 2.801950 2.452730 0.000000
    +v 2.829080 2.453510 -0.071649
    +v 2.799490 2.442750 -0.076904
    +v 3.433150 2.470860 0.000000
    +v 3.406030 2.470080 -0.071649
    +v 3.402210 2.476440 -0.065625
    +v 3.402210 2.476440 -0.065625
    +v 3.428130 2.477340 0.000000
    +v 3.433150 2.470860 0.000000
    +v 3.406030 2.470080 -0.071649
    +v 3.334530 2.468030 -0.122827
    +v 3.333890 2.474050 -0.112500
    +v 3.333890 2.474050 -0.112500
    +v 3.402210 2.476440 -0.065625
    +v 3.406030 2.470080 -0.071649
    +v 3.334530 2.468030 -0.122827
    +v 3.233440 2.465130 -0.153534
    +v 3.237290 2.470670 -0.140625
    +v 3.237290 2.470670 -0.140625
    +v 3.333890 2.474050 -0.112500
    +v 3.334530 2.468030 -0.122827
    +v 3.233440 2.465130 -0.153534
    +v 3.117550 2.461800 -0.163770
    +v 3.126560 2.466800 -0.150000
    +v 3.126560 2.466800 -0.150000
    +v 3.237290 2.470670 -0.140625
    +v 3.233440 2.465130 -0.153534
    +v 3.117550 2.461800 -0.163770
    +v 3.001670 2.458470 -0.153534
    +v 3.015830 2.462920 -0.140625
    +v 3.015830 2.462920 -0.140625
    +v 3.126560 2.466800 -0.150000
    +v 3.117550 2.461800 -0.163770
    +v 3.001670 2.458470 -0.153534
    +v 2.900580 2.455570 -0.122827
    +v 2.919240 2.459550 -0.112500
    +v 2.919240 2.459550 -0.112500
    +v 3.015830 2.462920 -0.140625
    +v 3.001670 2.458470 -0.153534
    +v 2.900580 2.455570 -0.122827
    +v 2.829080 2.453510 -0.071649
    +v 2.850920 2.457160 -0.065625
    +v 2.850920 2.457160 -0.065625
    +v 2.919240 2.459550 -0.112500
    +v 2.900580 2.455570 -0.122827
    +v 2.829080 2.453510 -0.071649
    +v 2.801950 2.452730 0.000000
    +v 2.825000 2.456250 0.000000
    +v 2.825000 2.456250 0.000000
    +v 2.850920 2.457160 -0.065625
    +v 2.829080 2.453510 -0.071649
    +v 3.428130 2.477340 0.000000
    +v 3.402210 2.476440 -0.065625
    +v 3.376670 2.473240 -0.059601
    +v 3.376670 2.473240 -0.059601
    +v 3.400830 2.474160 0.000000
    +v 3.428130 2.477340 0.000000
    +v 3.402210 2.476440 -0.065625
    +v 3.333890 2.474050 -0.112500
    +v 3.312990 2.470810 -0.102173
    +v 3.312990 2.470810 -0.102173
    +v 3.376670 2.473240 -0.059601
    +v 3.402210 2.476440 -0.065625
    +v 3.333890 2.474050 -0.112500
    +v 3.237290 2.470670 -0.140625
    +v 3.222960 2.467380 -0.127716
    +v 3.222960 2.467380 -0.127716
    +v 3.312990 2.470810 -0.102173
    +v 3.333890 2.474050 -0.112500
    +v 3.237290 2.470670 -0.140625
    +v 3.126560 2.466800 -0.150000
    +v 3.119750 2.463450 -0.136230
    +v 3.119750 2.463450 -0.136230
    +v 3.222960 2.467380 -0.127716
    +v 3.237290 2.470670 -0.140625
    +v 3.126560 2.466800 -0.150000
    +v 3.015830 2.462920 -0.140625
    +v 3.016540 2.459510 -0.127716
    +v 3.016540 2.459510 -0.127716
    +v 3.119750 2.463450 -0.136230
    +v 3.126560 2.466800 -0.150000
    +v 3.015830 2.462920 -0.140625
    +v 2.919240 2.459550 -0.112500
    +v 2.926510 2.456080 -0.102173
    +v 2.926510 2.456080 -0.102173
    +v 3.016540 2.459510 -0.127716
    +v 3.015830 2.462920 -0.140625
    +v 2.919240 2.459550 -0.112500
    +v 2.850920 2.457160 -0.065625
    +v 2.862830 2.453650 -0.059601
    +v 2.862830 2.453650 -0.059601
    +v 2.926510 2.456080 -0.102173
    +v 2.919240 2.459550 -0.112500
    +v 2.850920 2.457160 -0.065625
    +v 2.825000 2.456250 0.000000
    +v 2.838670 2.452730 0.000000
    +v 2.838670 2.452730 0.000000
    +v 2.862830 2.453650 -0.059601
    +v 2.850920 2.457160 -0.065625
    +v 3.400830 2.474160 0.000000
    +v 3.376670 2.473240 -0.059601
    +v 3.330730 2.459850 -0.054346
    +v 3.330730 2.459850 -0.054346
    +v 3.352730 2.460640 0.000000
    +v 3.400830 2.474160 0.000000
    +v 3.376670 2.473240 -0.059601
    +v 3.312990 2.470810 -0.102173
    +v 3.272720 2.457760 -0.093164
    +v 3.272720 2.457760 -0.093164
    +v 3.330730 2.459850 -0.054346
    +v 3.376670 2.473240 -0.059601
    +v 3.312990 2.470810 -0.102173
    +v 3.222960 2.467380 -0.127716
    +v 3.190700 2.454800 -0.116455
    +v 3.190700 2.454800 -0.116455
    +v 3.272720 2.457760 -0.093164
    +v 3.312990 2.470810 -0.102173
    +v 3.222960 2.467380 -0.127716
    +v 3.119750 2.463450 -0.136230
    +v 3.096680 2.451420 -0.124219
    +v 3.096680 2.451420 -0.124219
    +v 3.190700 2.454800 -0.116455
    +v 3.222960 2.467380 -0.127716
    +v 3.119750 2.463450 -0.136230
    +v 3.016540 2.459510 -0.127716
    +v 3.002660 2.448030 -0.116455
    +v 3.002660 2.448030 -0.116455
    +v 3.096680 2.451420 -0.124219
    +v 3.119750 2.463450 -0.136230
    +v 3.016540 2.459510 -0.127716
    +v 2.926510 2.456080 -0.102173
    +v 2.920640 2.445070 -0.093164
    +v 2.920640 2.445070 -0.093164
    +v 3.002660 2.448030 -0.116455
    +v 3.016540 2.459510 -0.127716
    +v 2.926510 2.456080 -0.102173
    +v 2.862830 2.453650 -0.059601
    +v 2.862630 2.442980 -0.054346
    +v 2.862630 2.442980 -0.054346
    +v 2.920640 2.445070 -0.093164
    +v 2.926510 2.456080 -0.102173
    +v 2.862830 2.453650 -0.059601
    +v 2.838670 2.452730 0.000000
    +v 2.840630 2.442190 0.000000
    +v 2.840630 2.442190 0.000000
    +v 2.862630 2.442980 -0.054346
    +v 2.862830 2.453650 -0.059601
    +v 3.352730 2.460640 0.000000
    +v 3.330730 2.459850 -0.054346
    +v 3.265680 2.435650 -0.050629
    +v 3.265680 2.435650 -0.050629
    +v 3.285300 2.436150 0.000000
    +v 3.352730 2.460640 0.000000
    +v 3.330730 2.459850 -0.054346
    +v 3.272720 2.457760 -0.093164
    +v 3.213930 2.434340 -0.086792
    +v 3.213930 2.434340 -0.086792
    +v 3.265680 2.435650 -0.050629
    +v 3.330730 2.459850 -0.054346
    +v 3.272720 2.457760 -0.093164
    +v 3.190700 2.454800 -0.116455
    +v 3.140770 2.432500 -0.108490
    +v 3.140770 2.432500 -0.108490
    +v 3.213930 2.434340 -0.086792
    +v 3.272720 2.457760 -0.093164
    +v 3.190700 2.454800 -0.116455
    +v 3.096680 2.451420 -0.124219
    +v 3.056910 2.430380 -0.115723
    +v 3.056910 2.430380 -0.115723
    +v 3.140770 2.432500 -0.108490
    +v 3.190700 2.454800 -0.116455
    +v 3.096680 2.451420 -0.124219
    +v 3.002660 2.448030 -0.116455
    +v 2.973050 2.428260 -0.108490
    +v 2.973050 2.428260 -0.108490
    +v 3.056910 2.430380 -0.115723
    +v 3.096680 2.451420 -0.124219
    +v 3.002660 2.448030 -0.116455
    +v 2.920640 2.445070 -0.093164
    +v 2.899890 2.426410 -0.086792
    +v 2.899890 2.426410 -0.086792
    +v 2.973050 2.428260 -0.108490
    +v 3.002660 2.448030 -0.116455
    +v 2.920640 2.445070 -0.093164
    +v 2.862630 2.442980 -0.054346
    +v 2.848140 2.425110 -0.050629
    +v 2.848140 2.425110 -0.050629
    +v 2.899890 2.426410 -0.086792
    +v 2.920640 2.445070 -0.093164
    +v 2.862630 2.442980 -0.054346
    +v 2.840630 2.442190 0.000000
    +v 2.828520 2.424610 0.000000
    +v 2.828520 2.424610 0.000000
    +v 2.848140 2.425110 -0.050629
    +v 2.862630 2.442980 -0.054346
    +v 3.285300 2.436150 0.000000
    +v 3.265680 2.435650 -0.050629
    +v 3.182810 2.400000 -0.049219
    +v 3.182810 2.400000 -0.049219
    +v 3.200000 2.400000 0.000000
    +v 3.285300 2.436150 0.000000
    +v 3.265680 2.435650 -0.050629
    +v 3.213930 2.434340 -0.086792
    +v 3.137500 2.400000 -0.084375
    +v 3.137500 2.400000 -0.084375
    +v 3.182810 2.400000 -0.049219
    +v 3.265680 2.435650 -0.050629
    +v 3.213930 2.434340 -0.086792
    +v 3.140770 2.432500 -0.108490
    +v 3.073440 2.400000 -0.105469
    +v 3.073440 2.400000 -0.105469
    +v 3.137500 2.400000 -0.084375
    +v 3.213930 2.434340 -0.086792
    +v 3.140770 2.432500 -0.108490
    +v 3.056910 2.430380 -0.115723
    +v 3.000000 2.400000 -0.112500
    +v 3.000000 2.400000 -0.112500
    +v 3.073440 2.400000 -0.105469
    +v 3.140770 2.432500 -0.108490
    +v 3.056910 2.430380 -0.115723
    +v 2.973050 2.428260 -0.108490
    +v 2.926560 2.400000 -0.105469
    +v 2.926560 2.400000 -0.105469
    +v 3.000000 2.400000 -0.112500
    +v 3.056910 2.430380 -0.115723
    +v 2.973050 2.428260 -0.108490
    +v 2.899890 2.426410 -0.086792
    +v 2.862500 2.400000 -0.084375
    +v 2.862500 2.400000 -0.084375
    +v 2.926560 2.400000 -0.105469
    +v 2.973050 2.428260 -0.108490
    +v 2.899890 2.426410 -0.086792
    +v 2.848140 2.425110 -0.050629
    +v 2.817190 2.400000 -0.049219
    +v 2.817190 2.400000 -0.049219
    +v 2.862500 2.400000 -0.084375
    +v 2.899890 2.426410 -0.086792
    +v 2.848140 2.425110 -0.050629
    +v 2.828520 2.424610 0.000000
    +v 2.800000 2.400000 0.000000
    +v 2.800000 2.400000 0.000000
    +v 2.817190 2.400000 -0.049219
    +v 2.848140 2.425110 -0.050629
    +v 0.225500 3.136820 0.047043
    +v 0.230078 3.136820 0.000000
    +v 0.000000 3.150000 0.000000
    +v 0.212328 3.136820 0.090548
    +v 0.225500 3.136820 0.047043
    +v 0.000000 3.150000 0.000000
    +v 0.191404 3.136820 0.129671
    +v 0.212328 3.136820 0.090548
    +v 0.000000 3.150000 0.000000
    +v 0.163571 3.136820 0.163571
    +v 0.191404 3.136820 0.129671
    +v 0.000000 3.150000 0.000000
    +v 0.129671 3.136820 0.191404
    +v 0.163571 3.136820 0.163571
    +v 0.000000 3.150000 0.000000
    +v 0.090548 3.136820 0.212328
    +v 0.129671 3.136820 0.191404
    +v 0.000000 3.150000 0.000000
    +v 0.047043 3.136820 0.225500
    +v 0.090548 3.136820 0.212328
    +v 0.000000 3.150000 0.000000
    +v 0.000000 3.136820 0.230078
    +v 0.047043 3.136820 0.225500
    +v 0.000000 3.150000 0.000000
    +v 0.230078 3.136820 0.000000
    +v 0.225500 3.136820 0.047043
    +v 0.333847 3.100780 0.069645
    +v 0.333847 3.100780 0.069645
    +v 0.340625 3.100780 0.000000
    +v 0.230078 3.136820 0.000000
    +v 0.225500 3.136820 0.047043
    +v 0.212328 3.136820 0.090548
    +v 0.314345 3.100780 0.134051
    +v 0.314345 3.100780 0.134051
    +v 0.333847 3.100780 0.069645
    +v 0.225500 3.136820 0.047043
    +v 0.212328 3.136820 0.090548
    +v 0.191404 3.136820 0.129671
    +v 0.283367 3.100780 0.191972
    +v 0.283367 3.100780 0.191972
    +v 0.314345 3.100780 0.134051
    +v 0.212328 3.136820 0.090548
    +v 0.191404 3.136820 0.129671
    +v 0.163571 3.136820 0.163571
    +v 0.242160 3.100780 0.242160
    +v 0.242160 3.100780 0.242160
    +v 0.283367 3.100780 0.191972
    +v 0.191404 3.136820 0.129671
    +v 0.163571 3.136820 0.163571
    +v 0.129671 3.136820 0.191404
    +v 0.191972 3.100780 0.283367
    +v 0.191972 3.100780 0.283367
    +v 0.242160 3.100780 0.242160
    +v 0.163571 3.136820 0.163571
    +v 0.129671 3.136820 0.191404
    +v 0.090548 3.136820 0.212328
    +v 0.134051 3.100780 0.314345
    +v 0.134051 3.100780 0.314345
    +v 0.191972 3.100780 0.283367
    +v 0.129671 3.136820 0.191404
    +v 0.090548 3.136820 0.212328
    +v 0.047043 3.136820 0.225500
    +v 0.069645 3.100780 0.333847
    +v 0.069645 3.100780 0.333847
    +v 0.134051 3.100780 0.314345
    +v 0.090548 3.136820 0.212328
    +v 0.047043 3.136820 0.225500
    +v 0.000000 3.136820 0.230078
    +v 0.000000 3.100780 0.340625
    +v 0.000000 3.100780 0.340625
    +v 0.069645 3.100780 0.333847
    +v 0.047043 3.136820 0.225500
    +v 0.340625 3.100780 0.000000
    +v 0.333847 3.100780 0.069645
    +v 0.354903 3.047170 0.074032
    +v 0.354903 3.047170 0.074032
    +v 0.362109 3.047170 0.000000
    +v 0.340625 3.100780 0.000000
    +v 0.333847 3.100780 0.069645
    +v 0.314345 3.100780 0.134051
    +v 0.334169 3.047170 0.142499
    +v 0.334169 3.047170 0.142499
    +v 0.354903 3.047170 0.074032
    +v 0.333847 3.100780 0.069645
    +v 0.314345 3.100780 0.134051
    +v 0.283367 3.100780 0.191972
    +v 0.301235 3.047170 0.204073
    +v 0.301235 3.047170 0.204073
    +v 0.334169 3.047170 0.142499
    +v 0.314345 3.100780 0.134051
    +v 0.283367 3.100780 0.191972
    +v 0.242160 3.100780 0.242160
    +v 0.257427 3.047170 0.257427
    +v 0.257427 3.047170 0.257427
    +v 0.301235 3.047170 0.204073
    +v 0.283367 3.100780 0.191972
    +v 0.242160 3.100780 0.242160
    +v 0.191972 3.100780 0.283367
    +v 0.204073 3.047170 0.301235
    +v 0.204073 3.047170 0.301235
    +v 0.257427 3.047170 0.257427
    +v 0.242160 3.100780 0.242160
    +v 0.191972 3.100780 0.283367
    +v 0.134051 3.100780 0.314345
    +v 0.142499 3.047170 0.334169
    +v 0.142499 3.047170 0.334169
    +v 0.204073 3.047170 0.301235
    +v 0.191972 3.100780 0.283367
    +v 0.134051 3.100780 0.314345
    +v 0.069645 3.100780 0.333847
    +v 0.074032 3.047170 0.354903
    +v 0.074032 3.047170 0.354903
    +v 0.142499 3.047170 0.334169
    +v 0.134051 3.100780 0.314345
    +v 0.069645 3.100780 0.333847
    +v 0.000000 3.100780 0.340625
    +v -0.000000 3.047170 0.362109
    +v -0.000000 3.047170 0.362109
    +v 0.074032 3.047170 0.354903
    +v 0.069645 3.100780 0.333847
    +v 0.362109 3.047170 0.000000
    +v 0.354903 3.047170 0.074032
    +v 0.318531 2.981250 0.066434
    +v 0.318531 2.981250 0.066434
    +v 0.325000 2.981250 0.000000
    +v 0.362109 3.047170 0.000000
    +v 0.354903 3.047170 0.074032
    +v 0.334169 3.047170 0.142499
    +v 0.299918 2.981250 0.127879
    +v 0.299918 2.981250 0.127879
    +v 0.318531 2.981250 0.066434
    +v 0.354903 3.047170 0.074032
    +v 0.334169 3.047170 0.142499
    +v 0.301235 3.047170 0.204073
    +v 0.270354 2.981250 0.183142
    +v 0.270354 2.981250 0.183142
    +v 0.299918 2.981250 0.127879
    +v 0.334169 3.047170 0.142499
    +v 0.301235 3.047170 0.204073
    +v 0.257427 3.047170 0.257427
    +v 0.231031 2.981250 0.231031
    +v 0.231031 2.981250 0.231031
    +v 0.270354 2.981250 0.183142
    +v 0.301235 3.047170 0.204073
    +v 0.257427 3.047170 0.257427
    +v 0.204073 3.047170 0.301235
    +v 0.183142 2.981250 0.270354
    +v 0.183142 2.981250 0.270354
    +v 0.231031 2.981250 0.231031
    +v 0.257427 3.047170 0.257427
    +v 0.204073 3.047170 0.301235
    +v 0.142499 3.047170 0.334169
    +v 0.127879 2.981250 0.299918
    +v 0.127879 2.981250 0.299918
    +v 0.183142 2.981250 0.270354
    +v 0.204073 3.047170 0.301235
    +v 0.142499 3.047170 0.334169
    +v 0.074032 3.047170 0.354903
    +v 0.066434 2.981250 0.318531
    +v 0.066434 2.981250 0.318531
    +v 0.127879 2.981250 0.299918
    +v 0.142499 3.047170 0.334169
    +v 0.074032 3.047170 0.354903
    +v -0.000000 3.047170 0.362109
    +v -0.000000 2.981250 0.325000
    +v -0.000000 2.981250 0.325000
    +v 0.066434 2.981250 0.318531
    +v 0.074032 3.047170 0.354903
    +v 0.325000 2.981250 0.000000
    +v 0.318531 2.981250 0.066434
    +v 0.254592 2.908300 0.053079
    +v 0.254592 2.908300 0.053079
    +v 0.259766 2.908300 0.000000
    +v 0.325000 2.981250 0.000000
    +v 0.318531 2.981250 0.066434
    +v 0.299918 2.981250 0.127879
    +v 0.239708 2.908300 0.102180
    +v 0.239708 2.908300 0.102180
    +v 0.254592 2.908300 0.053079
    +v 0.318531 2.981250 0.066434
    +v 0.299918 2.981250 0.127879
    +v 0.270354 2.981250 0.183142
    +v 0.216069 2.908300 0.146350
    +v 0.216069 2.908300 0.146350
    +v 0.239708 2.908300 0.102180
    +v 0.299918 2.981250 0.127879
    +v 0.270354 2.981250 0.183142
    +v 0.231031 2.981250 0.231031
    +v 0.184631 2.908300 0.184631
    +v 0.184631 2.908300 0.184631
    +v 0.216069 2.908300 0.146350
    +v 0.270354 2.981250 0.183142
    +v 0.231031 2.981250 0.231031
    +v 0.183142 2.981250 0.270354
    +v 0.146350 2.908300 0.216069
    +v 0.146350 2.908300 0.216069
    +v 0.184631 2.908300 0.184631
    +v 0.231031 2.981250 0.231031
    +v 0.183142 2.981250 0.270354
    +v 0.127879 2.981250 0.299918
    +v 0.102180 2.908300 0.239708
    +v 0.102180 2.908300 0.239708
    +v 0.146350 2.908300 0.216069
    +v 0.183142 2.981250 0.270354
    +v 0.127879 2.981250 0.299918
    +v 0.066434 2.981250 0.318531
    +v 0.053079 2.908300 0.254592
    +v 0.053079 2.908300 0.254592
    +v 0.102180 2.908300 0.239708
    +v 0.127879 2.981250 0.299918
    +v 0.066434 2.981250 0.318531
    +v -0.000000 2.981250 0.325000
    +v -0.000000 2.908300 0.259766
    +v -0.000000 2.908300 0.259766
    +v 0.053079 2.908300 0.254592
    +v 0.066434 2.981250 0.318531
    +v 0.259766 2.908300 0.000000
    +v 0.254592 2.908300 0.053079
    +v 0.192949 2.833590 0.040194
    +v 0.192949 2.833590 0.040194
    +v 0.196875 2.833590 0.000000
    +v 0.259766 2.908300 0.000000
    +v 0.254592 2.908300 0.053079
    +v 0.239708 2.908300 0.102180
    +v 0.181657 2.833590 0.077392
    +v 0.181657 2.833590 0.077392
    +v 0.192949 2.833590 0.040194
    +v 0.254592 2.908300 0.053079
    +v 0.239708 2.908300 0.102180
    +v 0.216069 2.908300 0.146350
    +v 0.163727 2.833590 0.110866
    +v 0.163727 2.833590 0.110866
    +v 0.181657 2.833590 0.077392
    +v 0.239708 2.908300 0.102180
    +v 0.216069 2.908300 0.146350
    +v 0.184631 2.908300 0.184631
    +v 0.139887 2.833590 0.139887
    +v 0.139887 2.833590 0.139887
    +v 0.163727 2.833590 0.110866
    +v 0.216069 2.908300 0.146350
    +v 0.184631 2.908300 0.184631
    +v 0.146350 2.908300 0.216069
    +v 0.110866 2.833590 0.163727
    +v 0.110866 2.833590 0.163727
    +v 0.139887 2.833590 0.139887
    +v 0.184631 2.908300 0.184631
    +v 0.146350 2.908300 0.216069
    +v 0.102180 2.908300 0.239708
    +v 0.077392 2.833590 0.181657
    +v 0.077392 2.833590 0.181657
    +v 0.110866 2.833590 0.163727
    +v 0.146350 2.908300 0.216069
    +v 0.102180 2.908300 0.239708
    +v 0.053079 2.908300 0.254592
    +v 0.040194 2.833590 0.192949
    +v 0.040194 2.833590 0.192949
    +v 0.077392 2.833590 0.181657
    +v 0.102180 2.908300 0.239708
    +v 0.053079 2.908300 0.254592
    +v -0.000000 2.908300 0.259766
    +v -0.000000 2.833590 0.196875
    +v -0.000000 2.833590 0.196875
    +v 0.040194 2.833590 0.192949
    +v 0.053079 2.908300 0.254592
    +v 0.196875 2.833590 0.000000
    +v 0.192949 2.833590 0.040194
    +v 0.163464 2.762400 0.034008
    +v 0.163464 2.762400 0.034008
    +v 0.166797 2.762400 0.000000
    +v 0.196875 2.833590 0.000000
    +v 0.192949 2.833590 0.040194
    +v 0.181657 2.833590 0.077392
    +v 0.153882 2.762400 0.065502
    +v 0.153882 2.762400 0.065502
    +v 0.163464 2.762400 0.034008
    +v 0.192949 2.833590 0.040194
    +v 0.181657 2.833590 0.077392
    +v 0.163727 2.833590 0.110866
    +v 0.138672 2.762400 0.093859
    +v 0.138672 2.762400 0.093859
    +v 0.153882 2.762400 0.065502
    +v 0.181657 2.833590 0.077392
    +v 0.163727 2.833590 0.110866
    +v 0.139887 2.833590 0.139887
    +v 0.118457 2.762400 0.118457
    +v 0.118457 2.762400 0.118457
    +v 0.138672 2.762400 0.093859
    +v 0.163727 2.833590 0.110866
    +v 0.139887 2.833590 0.139887
    +v 0.110866 2.833590 0.163727
    +v 0.093859 2.762400 0.138672
    +v 0.093859 2.762400 0.138672
    +v 0.118457 2.762400 0.118457
    +v 0.139887 2.833590 0.139887
    +v 0.110866 2.833590 0.163727
    +v 0.077392 2.833590 0.181657
    +v 0.065502 2.762400 0.153882
    +v 0.065502 2.762400 0.153882
    +v 0.093859 2.762400 0.138672
    +v 0.110866 2.833590 0.163727
    +v 0.077392 2.833590 0.181657
    +v 0.040194 2.833590 0.192949
    +v 0.034008 2.762400 0.163464
    +v 0.034008 2.762400 0.163464
    +v 0.065502 2.762400 0.153882
    +v 0.077392 2.833590 0.181657
    +v 0.040194 2.833590 0.192949
    +v -0.000000 2.833590 0.196875
    +v -0.000000 2.762400 0.166797
    +v -0.000000 2.762400 0.166797
    +v 0.034008 2.762400 0.163464
    +v 0.040194 2.833590 0.192949
    +v 0.166797 2.762400 0.000000
    +v 0.163464 2.762400 0.034008
    +v 0.196000 2.700000 0.040750
    +v 0.196000 2.700000 0.040750
    +v 0.200000 2.700000 0.000000
    +v 0.166797 2.762400 0.000000
    +v 0.163464 2.762400 0.034008
    +v 0.153882 2.762400 0.065502
    +v 0.184500 2.700000 0.078500
    +v 0.184500 2.700000 0.078500
    +v 0.196000 2.700000 0.040750
    +v 0.163464 2.762400 0.034008
    +v 0.153882 2.762400 0.065502
    +v 0.138672 2.762400 0.093859
    +v 0.166250 2.700000 0.112500
    +v 0.166250 2.700000 0.112500
    +v 0.184500 2.700000 0.078500
    +v 0.153882 2.762400 0.065502
    +v 0.138672 2.762400 0.093859
    +v 0.118457 2.762400 0.118457
    +v 0.142000 2.700000 0.142000
    +v 0.142000 2.700000 0.142000
    +v 0.166250 2.700000 0.112500
    +v 0.138672 2.762400 0.093859
    +v 0.118457 2.762400 0.118457
    +v 0.093859 2.762400 0.138672
    +v 0.112500 2.700000 0.166250
    +v 0.112500 2.700000 0.166250
    +v 0.142000 2.700000 0.142000
    +v 0.118457 2.762400 0.118457
    +v 0.093859 2.762400 0.138672
    +v 0.065502 2.762400 0.153882
    +v 0.078500 2.700000 0.184500
    +v 0.078500 2.700000 0.184500
    +v 0.112500 2.700000 0.166250
    +v 0.093859 2.762400 0.138672
    +v 0.065502 2.762400 0.153882
    +v 0.034008 2.762400 0.163464
    +v 0.040750 2.700000 0.196000
    +v 0.040750 2.700000 0.196000
    +v 0.078500 2.700000 0.184500
    +v 0.065502 2.762400 0.153882
    +v 0.034008 2.762400 0.163464
    +v -0.000000 2.762400 0.166797
    +v -0.000000 2.700000 0.200000
    +v -0.000000 2.700000 0.200000
    +v 0.040750 2.700000 0.196000
    +v 0.034008 2.762400 0.163464
    +v -0.047043 3.136820 0.225500
    +v 0.000000 3.136820 0.230078
    +v 0.000000 3.150000 0.000000
    +v -0.090548 3.136820 0.212328
    +v -0.047043 3.136820 0.225500
    +v 0.000000 3.150000 0.000000
    +v -0.129671 3.136820 0.191404
    +v -0.090548 3.136820 0.212328
    +v 0.000000 3.150000 0.000000
    +v -0.163571 3.136820 0.163571
    +v -0.129671 3.136820 0.191404
    +v 0.000000 3.150000 0.000000
    +v -0.191404 3.136820 0.129671
    +v -0.163571 3.136820 0.163571
    +v 0.000000 3.150000 0.000000
    +v -0.212328 3.136820 0.090548
    +v -0.191404 3.136820 0.129671
    +v 0.000000 3.150000 0.000000
    +v -0.225500 3.136820 0.047043
    +v -0.212328 3.136820 0.090548
    +v 0.000000 3.150000 0.000000
    +v -0.230078 3.136820 0.000000
    +v -0.225500 3.136820 0.047043
    +v 0.000000 3.150000 0.000000
    +v 0.000000 3.136820 0.230078
    +v -0.047043 3.136820 0.225500
    +v -0.069645 3.100780 0.333847
    +v -0.069645 3.100780 0.333847
    +v 0.000000 3.100780 0.340625
    +v 0.000000 3.136820 0.230078
    +v -0.047043 3.136820 0.225500
    +v -0.090548 3.136820 0.212328
    +v -0.134051 3.100780 0.314345
    +v -0.134051 3.100780 0.314345
    +v -0.069645 3.100780 0.333847
    +v -0.047043 3.136820 0.225500
    +v -0.090548 3.136820 0.212328
    +v -0.129671 3.136820 0.191404
    +v -0.191972 3.100780 0.283367
    +v -0.191972 3.100780 0.283367
    +v -0.134051 3.100780 0.314345
    +v -0.090548 3.136820 0.212328
    +v -0.129671 3.136820 0.191404
    +v -0.163571 3.136820 0.163571
    +v -0.242160 3.100780 0.242160
    +v -0.242160 3.100780 0.242160
    +v -0.191972 3.100780 0.283367
    +v -0.129671 3.136820 0.191404
    +v -0.163571 3.136820 0.163571
    +v -0.191404 3.136820 0.129671
    +v -0.283367 3.100780 0.191972
    +v -0.283367 3.100780 0.191972
    +v -0.242160 3.100780 0.242160
    +v -0.163571 3.136820 0.163571
    +v -0.191404 3.136820 0.129671
    +v -0.212328 3.136820 0.090548
    +v -0.314345 3.100780 0.134051
    +v -0.314345 3.100780 0.134051
    +v -0.283367 3.100780 0.191972
    +v -0.191404 3.136820 0.129671
    +v -0.212328 3.136820 0.090548
    +v -0.225500 3.136820 0.047043
    +v -0.333847 3.100780 0.069645
    +v -0.333847 3.100780 0.069645
    +v -0.314345 3.100780 0.134051
    +v -0.212328 3.136820 0.090548
    +v -0.225500 3.136820 0.047043
    +v -0.230078 3.136820 0.000000
    +v -0.340625 3.100780 0.000000
    +v -0.340625 3.100780 0.000000
    +v -0.333847 3.100780 0.069645
    +v -0.225500 3.136820 0.047043
    +v 0.000000 3.100780 0.340625
    +v -0.069645 3.100780 0.333847
    +v -0.074032 3.047170 0.354903
    +v -0.074032 3.047170 0.354903
    +v 0.000000 3.047170 0.362109
    +v 0.000000 3.100780 0.340625
    +v -0.069645 3.100780 0.333847
    +v -0.134051 3.100780 0.314345
    +v -0.142499 3.047170 0.334169
    +v -0.142499 3.047170 0.334169
    +v -0.074032 3.047170 0.354903
    +v -0.069645 3.100780 0.333847
    +v -0.134051 3.100780 0.314345
    +v -0.191972 3.100780 0.283367
    +v -0.204073 3.047170 0.301235
    +v -0.204073 3.047170 0.301235
    +v -0.142499 3.047170 0.334169
    +v -0.134051 3.100780 0.314345
    +v -0.191972 3.100780 0.283367
    +v -0.242160 3.100780 0.242160
    +v -0.257427 3.047170 0.257427
    +v -0.257427 3.047170 0.257427
    +v -0.204073 3.047170 0.301235
    +v -0.191972 3.100780 0.283367
    +v -0.242160 3.100780 0.242160
    +v -0.283367 3.100780 0.191972
    +v -0.301235 3.047170 0.204073
    +v -0.301235 3.047170 0.204073
    +v -0.257427 3.047170 0.257427
    +v -0.242160 3.100780 0.242160
    +v -0.283367 3.100780 0.191972
    +v -0.314345 3.100780 0.134051
    +v -0.334169 3.047170 0.142499
    +v -0.334169 3.047170 0.142499
    +v -0.301235 3.047170 0.204073
    +v -0.283367 3.100780 0.191972
    +v -0.314345 3.100780 0.134051
    +v -0.333847 3.100780 0.069645
    +v -0.354903 3.047170 0.074032
    +v -0.354903 3.047170 0.074032
    +v -0.334169 3.047170 0.142499
    +v -0.314345 3.100780 0.134051
    +v -0.333847 3.100780 0.069645
    +v -0.340625 3.100780 0.000000
    +v -0.362109 3.047170 0.000000
    +v -0.362109 3.047170 0.000000
    +v -0.354903 3.047170 0.074032
    +v -0.333847 3.100780 0.069645
    +v 0.000000 3.047170 0.362109
    +v -0.074032 3.047170 0.354903
    +v -0.066434 2.981250 0.318531
    +v -0.066434 2.981250 0.318531
    +v 0.000000 2.981250 0.325000
    +v 0.000000 3.047170 0.362109
    +v -0.074032 3.047170 0.354903
    +v -0.142499 3.047170 0.334169
    +v -0.127879 2.981250 0.299918
    +v -0.127879 2.981250 0.299918
    +v -0.066434 2.981250 0.318531
    +v -0.074032 3.047170 0.354903
    +v -0.142499 3.047170 0.334169
    +v -0.204073 3.047170 0.301235
    +v -0.183142 2.981250 0.270354
    +v -0.183142 2.981250 0.270354
    +v -0.127879 2.981250 0.299918
    +v -0.142499 3.047170 0.334169
    +v -0.204073 3.047170 0.301235
    +v -0.257427 3.047170 0.257427
    +v -0.231031 2.981250 0.231031
    +v -0.231031 2.981250 0.231031
    +v -0.183142 2.981250 0.270354
    +v -0.204073 3.047170 0.301235
    +v -0.257427 3.047170 0.257427
    +v -0.301235 3.047170 0.204073
    +v -0.270354 2.981250 0.183142
    +v -0.270354 2.981250 0.183142
    +v -0.231031 2.981250 0.231031
    +v -0.257427 3.047170 0.257427
    +v -0.301235 3.047170 0.204073
    +v -0.334169 3.047170 0.142499
    +v -0.299918 2.981250 0.127879
    +v -0.299918 2.981250 0.127879
    +v -0.270354 2.981250 0.183142
    +v -0.301235 3.047170 0.204073
    +v -0.334169 3.047170 0.142499
    +v -0.354903 3.047170 0.074032
    +v -0.318531 2.981250 0.066434
    +v -0.318531 2.981250 0.066434
    +v -0.299918 2.981250 0.127879
    +v -0.334169 3.047170 0.142499
    +v -0.354903 3.047170 0.074032
    +v -0.362109 3.047170 0.000000
    +v -0.325000 2.981250 0.000000
    +v -0.325000 2.981250 0.000000
    +v -0.318531 2.981250 0.066434
    +v -0.354903 3.047170 0.074032
    +v 0.000000 2.981250 0.325000
    +v -0.066434 2.981250 0.318531
    +v -0.053079 2.908300 0.254592
    +v -0.053079 2.908300 0.254592
    +v 0.000000 2.908300 0.259766
    +v 0.000000 2.981250 0.325000
    +v -0.066434 2.981250 0.318531
    +v -0.127879 2.981250 0.299918
    +v -0.102180 2.908300 0.239708
    +v -0.102180 2.908300 0.239708
    +v -0.053079 2.908300 0.254592
    +v -0.066434 2.981250 0.318531
    +v -0.127879 2.981250 0.299918
    +v -0.183142 2.981250 0.270354
    +v -0.146350 2.908300 0.216069
    +v -0.146350 2.908300 0.216069
    +v -0.102180 2.908300 0.239708
    +v -0.127879 2.981250 0.299918
    +v -0.183142 2.981250 0.270354
    +v -0.231031 2.981250 0.231031
    +v -0.184631 2.908300 0.184631
    +v -0.184631 2.908300 0.184631
    +v -0.146350 2.908300 0.216069
    +v -0.183142 2.981250 0.270354
    +v -0.231031 2.981250 0.231031
    +v -0.270354 2.981250 0.183142
    +v -0.216069 2.908300 0.146350
    +v -0.216069 2.908300 0.146350
    +v -0.184631 2.908300 0.184631
    +v -0.231031 2.981250 0.231031
    +v -0.270354 2.981250 0.183142
    +v -0.299918 2.981250 0.127879
    +v -0.239708 2.908300 0.102180
    +v -0.239708 2.908300 0.102180
    +v -0.216069 2.908300 0.146350
    +v -0.270354 2.981250 0.183142
    +v -0.299918 2.981250 0.127879
    +v -0.318531 2.981250 0.066434
    +v -0.254592 2.908300 0.053079
    +v -0.254592 2.908300 0.053079
    +v -0.239708 2.908300 0.102180
    +v -0.299918 2.981250 0.127879
    +v -0.318531 2.981250 0.066434
    +v -0.325000 2.981250 0.000000
    +v -0.259766 2.908300 0.000000
    +v -0.259766 2.908300 0.000000
    +v -0.254592 2.908300 0.053079
    +v -0.318531 2.981250 0.066434
    +v 0.000000 2.908300 0.259766
    +v -0.053079 2.908300 0.254592
    +v -0.040194 2.833590 0.192949
    +v -0.040194 2.833590 0.192949
    +v 0.000000 2.833590 0.196875
    +v 0.000000 2.908300 0.259766
    +v -0.053079 2.908300 0.254592
    +v -0.102180 2.908300 0.239708
    +v -0.077392 2.833590 0.181657
    +v -0.077392 2.833590 0.181657
    +v -0.040194 2.833590 0.192949
    +v -0.053079 2.908300 0.254592
    +v -0.102180 2.908300 0.239708
    +v -0.146350 2.908300 0.216069
    +v -0.110866 2.833590 0.163727
    +v -0.110866 2.833590 0.163727
    +v -0.077392 2.833590 0.181657
    +v -0.102180 2.908300 0.239708
    +v -0.146350 2.908300 0.216069
    +v -0.184631 2.908300 0.184631
    +v -0.139887 2.833590 0.139887
    +v -0.139887 2.833590 0.139887
    +v -0.110866 2.833590 0.163727
    +v -0.146350 2.908300 0.216069
    +v -0.184631 2.908300 0.184631
    +v -0.216069 2.908300 0.146350
    +v -0.163727 2.833590 0.110866
    +v -0.163727 2.833590 0.110866
    +v -0.139887 2.833590 0.139887
    +v -0.184631 2.908300 0.184631
    +v -0.216069 2.908300 0.146350
    +v -0.239708 2.908300 0.102180
    +v -0.181657 2.833590 0.077392
    +v -0.181657 2.833590 0.077392
    +v -0.163727 2.833590 0.110866
    +v -0.216069 2.908300 0.146350
    +v -0.239708 2.908300 0.102180
    +v -0.254592 2.908300 0.053079
    +v -0.192949 2.833590 0.040194
    +v -0.192949 2.833590 0.040194
    +v -0.181657 2.833590 0.077392
    +v -0.239708 2.908300 0.102180
    +v -0.254592 2.908300 0.053079
    +v -0.259766 2.908300 0.000000
    +v -0.196875 2.833590 0.000000
    +v -0.196875 2.833590 0.000000
    +v -0.192949 2.833590 0.040194
    +v -0.254592 2.908300 0.053079
    +v 0.000000 2.833590 0.196875
    +v -0.040194 2.833590 0.192949
    +v -0.034008 2.762400 0.163464
    +v -0.034008 2.762400 0.163464
    +v 0.000000 2.762400 0.166797
    +v 0.000000 2.833590 0.196875
    +v -0.040194 2.833590 0.192949
    +v -0.077392 2.833590 0.181657
    +v -0.065502 2.762400 0.153882
    +v -0.065502 2.762400 0.153882
    +v -0.034008 2.762400 0.163464
    +v -0.040194 2.833590 0.192949
    +v -0.077392 2.833590 0.181657
    +v -0.110866 2.833590 0.163727
    +v -0.093859 2.762400 0.138672
    +v -0.093859 2.762400 0.138672
    +v -0.065502 2.762400 0.153882
    +v -0.077392 2.833590 0.181657
    +v -0.110866 2.833590 0.163727
    +v -0.139887 2.833590 0.139887
    +v -0.118457 2.762400 0.118457
    +v -0.118457 2.762400 0.118457
    +v -0.093859 2.762400 0.138672
    +v -0.110866 2.833590 0.163727
    +v -0.139887 2.833590 0.139887
    +v -0.163727 2.833590 0.110866
    +v -0.138672 2.762400 0.093859
    +v -0.138672 2.762400 0.093859
    +v -0.118457 2.762400 0.118457
    +v -0.139887 2.833590 0.139887
    +v -0.163727 2.833590 0.110866
    +v -0.181657 2.833590 0.077392
    +v -0.153882 2.762400 0.065502
    +v -0.153882 2.762400 0.065502
    +v -0.138672 2.762400 0.093859
    +v -0.163727 2.833590 0.110866
    +v -0.181657 2.833590 0.077392
    +v -0.192949 2.833590 0.040194
    +v -0.163464 2.762400 0.034008
    +v -0.163464 2.762400 0.034008
    +v -0.153882 2.762400 0.065502
    +v -0.181657 2.833590 0.077392
    +v -0.192949 2.833590 0.040194
    +v -0.196875 2.833590 0.000000
    +v -0.166797 2.762400 0.000000
    +v -0.166797 2.762400 0.000000
    +v -0.163464 2.762400 0.034008
    +v -0.192949 2.833590 0.040194
    +v 0.000000 2.762400 0.166797
    +v -0.034008 2.762400 0.163464
    +v -0.040750 2.700000 0.196000
    +v -0.040750 2.700000 0.196000
    +v 0.000000 2.700000 0.200000
    +v 0.000000 2.762400 0.166797
    +v -0.034008 2.762400 0.163464
    +v -0.065502 2.762400 0.153882
    +v -0.078500 2.700000 0.184500
    +v -0.078500 2.700000 0.184500
    +v -0.040750 2.700000 0.196000
    +v -0.034008 2.762400 0.163464
    +v -0.065502 2.762400 0.153882
    +v -0.093859 2.762400 0.138672
    +v -0.112500 2.700000 0.166250
    +v -0.112500 2.700000 0.166250
    +v -0.078500 2.700000 0.184500
    +v -0.065502 2.762400 0.153882
    +v -0.093859 2.762400 0.138672
    +v -0.118457 2.762400 0.118457
    +v -0.142000 2.700000 0.142000
    +v -0.142000 2.700000 0.142000
    +v -0.112500 2.700000 0.166250
    +v -0.093859 2.762400 0.138672
    +v -0.118457 2.762400 0.118457
    +v -0.138672 2.762400 0.093859
    +v -0.166250 2.700000 0.112500
    +v -0.166250 2.700000 0.112500
    +v -0.142000 2.700000 0.142000
    +v -0.118457 2.762400 0.118457
    +v -0.138672 2.762400 0.093859
    +v -0.153882 2.762400 0.065502
    +v -0.184500 2.700000 0.078500
    +v -0.184500 2.700000 0.078500
    +v -0.166250 2.700000 0.112500
    +v -0.138672 2.762400 0.093859
    +v -0.153882 2.762400 0.065502
    +v -0.163464 2.762400 0.034008
    +v -0.196000 2.700000 0.040750
    +v -0.196000 2.700000 0.040750
    +v -0.184500 2.700000 0.078500
    +v -0.153882 2.762400 0.065502
    +v -0.163464 2.762400 0.034008
    +v -0.166797 2.762400 0.000000
    +v -0.200000 2.700000 0.000000
    +v -0.200000 2.700000 0.000000
    +v -0.196000 2.700000 0.040750
    +v -0.163464 2.762400 0.034008
    +v -0.225500 3.136820 -0.047043
    +v -0.230078 3.136820 0.000000
    +v 0.000000 3.150000 0.000000
    +v -0.212328 3.136820 -0.090548
    +v -0.225500 3.136820 -0.047043
    +v 0.000000 3.150000 0.000000
    +v -0.191404 3.136820 -0.129671
    +v -0.212328 3.136820 -0.090548
    +v 0.000000 3.150000 0.000000
    +v -0.163571 3.136820 -0.163571
    +v -0.191404 3.136820 -0.129671
    +v 0.000000 3.150000 0.000000
    +v -0.129671 3.136820 -0.191404
    +v -0.163571 3.136820 -0.163571
    +v 0.000000 3.150000 0.000000
    +v -0.090548 3.136820 -0.212328
    +v -0.129671 3.136820 -0.191404
    +v 0.000000 3.150000 0.000000
    +v -0.047043 3.136820 -0.225500
    +v -0.090548 3.136820 -0.212328
    +v 0.000000 3.150000 0.000000
    +v 0.000000 3.136820 -0.230078
    +v -0.047043 3.136820 -0.225500
    +v 0.000000 3.150000 0.000000
    +v -0.230078 3.136820 0.000000
    +v -0.225500 3.136820 -0.047043
    +v -0.333847 3.100780 -0.069645
    +v -0.333847 3.100780 -0.069645
    +v -0.340625 3.100780 0.000000
    +v -0.230078 3.136820 0.000000
    +v -0.225500 3.136820 -0.047043
    +v -0.212328 3.136820 -0.090548
    +v -0.314345 3.100780 -0.134051
    +v -0.314345 3.100780 -0.134051
    +v -0.333847 3.100780 -0.069645
    +v -0.225500 3.136820 -0.047043
    +v -0.212328 3.136820 -0.090548
    +v -0.191404 3.136820 -0.129671
    +v -0.283367 3.100780 -0.191972
    +v -0.283367 3.100780 -0.191972
    +v -0.314345 3.100780 -0.134051
    +v -0.212328 3.136820 -0.090548
    +v -0.191404 3.136820 -0.129671
    +v -0.163571 3.136820 -0.163571
    +v -0.242160 3.100780 -0.242160
    +v -0.242160 3.100780 -0.242160
    +v -0.283367 3.100780 -0.191972
    +v -0.191404 3.136820 -0.129671
    +v -0.163571 3.136820 -0.163571
    +v -0.129671 3.136820 -0.191404
    +v -0.191972 3.100780 -0.283367
    +v -0.191972 3.100780 -0.283367
    +v -0.242160 3.100780 -0.242160
    +v -0.163571 3.136820 -0.163571
    +v -0.129671 3.136820 -0.191404
    +v -0.090548 3.136820 -0.212328
    +v -0.134051 3.100780 -0.314345
    +v -0.134051 3.100780 -0.314345
    +v -0.191972 3.100780 -0.283367
    +v -0.129671 3.136820 -0.191404
    +v -0.090548 3.136820 -0.212328
    +v -0.047043 3.136820 -0.225500
    +v -0.069645 3.100780 -0.333847
    +v -0.069645 3.100780 -0.333847
    +v -0.134051 3.100780 -0.314345
    +v -0.090548 3.136820 -0.212328
    +v -0.047043 3.136820 -0.225500
    +v 0.000000 3.136820 -0.230078
    +v 0.000000 3.100780 -0.340625
    +v 0.000000 3.100780 -0.340625
    +v -0.069645 3.100780 -0.333847
    +v -0.047043 3.136820 -0.225500
    +v -0.340625 3.100780 0.000000
    +v -0.333847 3.100780 -0.069645
    +v -0.354903 3.047170 -0.074032
    +v -0.354903 3.047170 -0.074032
    +v -0.362109 3.047170 0.000000
    +v -0.340625 3.100780 0.000000
    +v -0.333847 3.100780 -0.069645
    +v -0.314345 3.100780 -0.134051
    +v -0.334169 3.047170 -0.142499
    +v -0.334169 3.047170 -0.142499
    +v -0.354903 3.047170 -0.074032
    +v -0.333847 3.100780 -0.069645
    +v -0.314345 3.100780 -0.134051
    +v -0.283367 3.100780 -0.191972
    +v -0.301235 3.047170 -0.204073
    +v -0.301235 3.047170 -0.204073
    +v -0.334169 3.047170 -0.142499
    +v -0.314345 3.100780 -0.134051
    +v -0.283367 3.100780 -0.191972
    +v -0.242160 3.100780 -0.242160
    +v -0.257427 3.047170 -0.257427
    +v -0.257427 3.047170 -0.257427
    +v -0.301235 3.047170 -0.204073
    +v -0.283367 3.100780 -0.191972
    +v -0.242160 3.100780 -0.242160
    +v -0.191972 3.100780 -0.283367
    +v -0.204073 3.047170 -0.301235
    +v -0.204073 3.047170 -0.301235
    +v -0.257427 3.047170 -0.257427
    +v -0.242160 3.100780 -0.242160
    +v -0.191972 3.100780 -0.283367
    +v -0.134051 3.100780 -0.314345
    +v -0.142499 3.047170 -0.334169
    +v -0.142499 3.047170 -0.334169
    +v -0.204073 3.047170 -0.301235
    +v -0.191972 3.100780 -0.283367
    +v -0.134051 3.100780 -0.314345
    +v -0.069645 3.100780 -0.333847
    +v -0.074032 3.047170 -0.354903
    +v -0.074032 3.047170 -0.354903
    +v -0.142499 3.047170 -0.334169
    +v -0.134051 3.100780 -0.314345
    +v -0.069645 3.100780 -0.333847
    +v 0.000000 3.100780 -0.340625
    +v 0.000000 3.047170 -0.362109
    +v 0.000000 3.047170 -0.362109
    +v -0.074032 3.047170 -0.354903
    +v -0.069645 3.100780 -0.333847
    +v -0.362109 3.047170 0.000000
    +v -0.354903 3.047170 -0.074032
    +v -0.318531 2.981250 -0.066434
    +v -0.318531 2.981250 -0.066434
    +v -0.325000 2.981250 0.000000
    +v -0.362109 3.047170 0.000000
    +v -0.354903 3.047170 -0.074032
    +v -0.334169 3.047170 -0.142499
    +v -0.299918 2.981250 -0.127879
    +v -0.299918 2.981250 -0.127879
    +v -0.318531 2.981250 -0.066434
    +v -0.354903 3.047170 -0.074032
    +v -0.334169 3.047170 -0.142499
    +v -0.301235 3.047170 -0.204073
    +v -0.270354 2.981250 -0.183142
    +v -0.270354 2.981250 -0.183142
    +v -0.299918 2.981250 -0.127879
    +v -0.334169 3.047170 -0.142499
    +v -0.301235 3.047170 -0.204073
    +v -0.257427 3.047170 -0.257427
    +v -0.231031 2.981250 -0.231031
    +v -0.231031 2.981250 -0.231031
    +v -0.270354 2.981250 -0.183142
    +v -0.301235 3.047170 -0.204073
    +v -0.257427 3.047170 -0.257427
    +v -0.204073 3.047170 -0.301235
    +v -0.183142 2.981250 -0.270354
    +v -0.183142 2.981250 -0.270354
    +v -0.231031 2.981250 -0.231031
    +v -0.257427 3.047170 -0.257427
    +v -0.204073 3.047170 -0.301235
    +v -0.142499 3.047170 -0.334169
    +v -0.127879 2.981250 -0.299918
    +v -0.127879 2.981250 -0.299918
    +v -0.183142 2.981250 -0.270354
    +v -0.204073 3.047170 -0.301235
    +v -0.142499 3.047170 -0.334169
    +v -0.074032 3.047170 -0.354903
    +v -0.066434 2.981250 -0.318531
    +v -0.066434 2.981250 -0.318531
    +v -0.127879 2.981250 -0.299918
    +v -0.142499 3.047170 -0.334169
    +v -0.074032 3.047170 -0.354903
    +v 0.000000 3.047170 -0.362109
    +v 0.000000 2.981250 -0.325000
    +v 0.000000 2.981250 -0.325000
    +v -0.066434 2.981250 -0.318531
    +v -0.074032 3.047170 -0.354903
    +v -0.325000 2.981250 0.000000
    +v -0.318531 2.981250 -0.066434
    +v -0.254592 2.908300 -0.053079
    +v -0.254592 2.908300 -0.053079
    +v -0.259766 2.908300 0.000000
    +v -0.325000 2.981250 0.000000
    +v -0.318531 2.981250 -0.066434
    +v -0.299918 2.981250 -0.127879
    +v -0.239708 2.908300 -0.102180
    +v -0.239708 2.908300 -0.102180
    +v -0.254592 2.908300 -0.053079
    +v -0.318531 2.981250 -0.066434
    +v -0.299918 2.981250 -0.127879
    +v -0.270354 2.981250 -0.183142
    +v -0.216069 2.908300 -0.146350
    +v -0.216069 2.908300 -0.146350
    +v -0.239708 2.908300 -0.102180
    +v -0.299918 2.981250 -0.127879
    +v -0.270354 2.981250 -0.183142
    +v -0.231031 2.981250 -0.231031
    +v -0.184631 2.908300 -0.184631
    +v -0.184631 2.908300 -0.184631
    +v -0.216069 2.908300 -0.146350
    +v -0.270354 2.981250 -0.183142
    +v -0.231031 2.981250 -0.231031
    +v -0.183142 2.981250 -0.270354
    +v -0.146350 2.908300 -0.216069
    +v -0.146350 2.908300 -0.216069
    +v -0.184631 2.908300 -0.184631
    +v -0.231031 2.981250 -0.231031
    +v -0.183142 2.981250 -0.270354
    +v -0.127879 2.981250 -0.299918
    +v -0.102180 2.908300 -0.239708
    +v -0.102180 2.908300 -0.239708
    +v -0.146350 2.908300 -0.216069
    +v -0.183142 2.981250 -0.270354
    +v -0.127879 2.981250 -0.299918
    +v -0.066434 2.981250 -0.318531
    +v -0.053079 2.908300 -0.254592
    +v -0.053079 2.908300 -0.254592
    +v -0.102180 2.908300 -0.239708
    +v -0.127879 2.981250 -0.299918
    +v -0.066434 2.981250 -0.318531
    +v 0.000000 2.981250 -0.325000
    +v 0.000000 2.908300 -0.259766
    +v 0.000000 2.908300 -0.259766
    +v -0.053079 2.908300 -0.254592
    +v -0.066434 2.981250 -0.318531
    +v -0.259766 2.908300 0.000000
    +v -0.254592 2.908300 -0.053079
    +v -0.192949 2.833590 -0.040194
    +v -0.192949 2.833590 -0.040194
    +v -0.196875 2.833590 0.000000
    +v -0.259766 2.908300 0.000000
    +v -0.254592 2.908300 -0.053079
    +v -0.239708 2.908300 -0.102180
    +v -0.181657 2.833590 -0.077392
    +v -0.181657 2.833590 -0.077392
    +v -0.192949 2.833590 -0.040194
    +v -0.254592 2.908300 -0.053079
    +v -0.239708 2.908300 -0.102180
    +v -0.216069 2.908300 -0.146350
    +v -0.163727 2.833590 -0.110866
    +v -0.163727 2.833590 -0.110866
    +v -0.181657 2.833590 -0.077392
    +v -0.239708 2.908300 -0.102180
    +v -0.216069 2.908300 -0.146350
    +v -0.184631 2.908300 -0.184631
    +v -0.139887 2.833590 -0.139887
    +v -0.139887 2.833590 -0.139887
    +v -0.163727 2.833590 -0.110866
    +v -0.216069 2.908300 -0.146350
    +v -0.184631 2.908300 -0.184631
    +v -0.146350 2.908300 -0.216069
    +v -0.110866 2.833590 -0.163727
    +v -0.110866 2.833590 -0.163727
    +v -0.139887 2.833590 -0.139887
    +v -0.184631 2.908300 -0.184631
    +v -0.146350 2.908300 -0.216069
    +v -0.102180 2.908300 -0.239708
    +v -0.077392 2.833590 -0.181657
    +v -0.077392 2.833590 -0.181657
    +v -0.110866 2.833590 -0.163727
    +v -0.146350 2.908300 -0.216069
    +v -0.102180 2.908300 -0.239708
    +v -0.053079 2.908300 -0.254592
    +v -0.040194 2.833590 -0.192949
    +v -0.040194 2.833590 -0.192949
    +v -0.077392 2.833590 -0.181657
    +v -0.102180 2.908300 -0.239708
    +v -0.053079 2.908300 -0.254592
    +v 0.000000 2.908300 -0.259766
    +v 0.000000 2.833590 -0.196875
    +v 0.000000 2.833590 -0.196875
    +v -0.040194 2.833590 -0.192949
    +v -0.053079 2.908300 -0.254592
    +v -0.196875 2.833590 0.000000
    +v -0.192949 2.833590 -0.040194
    +v -0.163464 2.762400 -0.034008
    +v -0.163464 2.762400 -0.034008
    +v -0.166797 2.762400 0.000000
    +v -0.196875 2.833590 0.000000
    +v -0.192949 2.833590 -0.040194
    +v -0.181657 2.833590 -0.077392
    +v -0.153882 2.762400 -0.065502
    +v -0.153882 2.762400 -0.065502
    +v -0.163464 2.762400 -0.034008
    +v -0.192949 2.833590 -0.040194
    +v -0.181657 2.833590 -0.077392
    +v -0.163727 2.833590 -0.110866
    +v -0.138672 2.762400 -0.093859
    +v -0.138672 2.762400 -0.093859
    +v -0.153882 2.762400 -0.065502
    +v -0.181657 2.833590 -0.077392
    +v -0.163727 2.833590 -0.110866
    +v -0.139887 2.833590 -0.139887
    +v -0.118457 2.762400 -0.118457
    +v -0.118457 2.762400 -0.118457
    +v -0.138672 2.762400 -0.093859
    +v -0.163727 2.833590 -0.110866
    +v -0.139887 2.833590 -0.139887
    +v -0.110866 2.833590 -0.163727
    +v -0.093859 2.762400 -0.138672
    +v -0.093859 2.762400 -0.138672
    +v -0.118457 2.762400 -0.118457
    +v -0.139887 2.833590 -0.139887
    +v -0.110866 2.833590 -0.163727
    +v -0.077392 2.833590 -0.181657
    +v -0.065502 2.762400 -0.153882
    +v -0.065502 2.762400 -0.153882
    +v -0.093859 2.762400 -0.138672
    +v -0.110866 2.833590 -0.163727
    +v -0.077392 2.833590 -0.181657
    +v -0.040194 2.833590 -0.192949
    +v -0.034008 2.762400 -0.163464
    +v -0.034008 2.762400 -0.163464
    +v -0.065502 2.762400 -0.153882
    +v -0.077392 2.833590 -0.181657
    +v -0.040194 2.833590 -0.192949
    +v 0.000000 2.833590 -0.196875
    +v 0.000000 2.762400 -0.166797
    +v 0.000000 2.762400 -0.166797
    +v -0.034008 2.762400 -0.163464
    +v -0.040194 2.833590 -0.192949
    +v -0.166797 2.762400 0.000000
    +v -0.163464 2.762400 -0.034008
    +v -0.196000 2.700000 -0.040750
    +v -0.196000 2.700000 -0.040750
    +v -0.200000 2.700000 0.000000
    +v -0.166797 2.762400 0.000000
    +v -0.163464 2.762400 -0.034008
    +v -0.153882 2.762400 -0.065502
    +v -0.184500 2.700000 -0.078500
    +v -0.184500 2.700000 -0.078500
    +v -0.196000 2.700000 -0.040750
    +v -0.163464 2.762400 -0.034008
    +v -0.153882 2.762400 -0.065502
    +v -0.138672 2.762400 -0.093859
    +v -0.166250 2.700000 -0.112500
    +v -0.166250 2.700000 -0.112500
    +v -0.184500 2.700000 -0.078500
    +v -0.153882 2.762400 -0.065502
    +v -0.138672 2.762400 -0.093859
    +v -0.118457 2.762400 -0.118457
    +v -0.142000 2.700000 -0.142000
    +v -0.142000 2.700000 -0.142000
    +v -0.166250 2.700000 -0.112500
    +v -0.138672 2.762400 -0.093859
    +v -0.118457 2.762400 -0.118457
    +v -0.093859 2.762400 -0.138672
    +v -0.112500 2.700000 -0.166250
    +v -0.112500 2.700000 -0.166250
    +v -0.142000 2.700000 -0.142000
    +v -0.118457 2.762400 -0.118457
    +v -0.093859 2.762400 -0.138672
    +v -0.065502 2.762400 -0.153882
    +v -0.078500 2.700000 -0.184500
    +v -0.078500 2.700000 -0.184500
    +v -0.112500 2.700000 -0.166250
    +v -0.093859 2.762400 -0.138672
    +v -0.065502 2.762400 -0.153882
    +v -0.034008 2.762400 -0.163464
    +v -0.040750 2.700000 -0.196000
    +v -0.040750 2.700000 -0.196000
    +v -0.078500 2.700000 -0.184500
    +v -0.065502 2.762400 -0.153882
    +v -0.034008 2.762400 -0.163464
    +v 0.000000 2.762400 -0.166797
    +v 0.000000 2.700000 -0.200000
    +v 0.000000 2.700000 -0.200000
    +v -0.040750 2.700000 -0.196000
    +v -0.034008 2.762400 -0.163464
    +v 0.047043 3.136820 -0.225500
    +v 0.000000 3.136820 -0.230078
    +v 0.000000 3.150000 0.000000
    +v 0.090548 3.136820 -0.212328
    +v 0.047043 3.136820 -0.225500
    +v 0.000000 3.150000 0.000000
    +v 0.129671 3.136820 -0.191404
    +v 0.090548 3.136820 -0.212328
    +v 0.000000 3.150000 0.000000
    +v 0.163571 3.136820 -0.163571
    +v 0.129671 3.136820 -0.191404
    +v 0.000000 3.150000 0.000000
    +v 0.191404 3.136820 -0.129671
    +v 0.163571 3.136820 -0.163571
    +v 0.000000 3.150000 0.000000
    +v 0.212328 3.136820 -0.090548
    +v 0.191404 3.136820 -0.129671
    +v 0.000000 3.150000 0.000000
    +v 0.225500 3.136820 -0.047043
    +v 0.212328 3.136820 -0.090548
    +v 0.000000 3.150000 0.000000
    +v 0.230078 3.136820 0.000000
    +v 0.225500 3.136820 -0.047043
    +v 0.000000 3.150000 0.000000
    +v 0.000000 3.136820 -0.230078
    +v 0.047043 3.136820 -0.225500
    +v 0.069645 3.100780 -0.333847
    +v 0.069645 3.100780 -0.333847
    +v 0.000000 3.100780 -0.340625
    +v 0.000000 3.136820 -0.230078
    +v 0.047043 3.136820 -0.225500
    +v 0.090548 3.136820 -0.212328
    +v 0.134051 3.100780 -0.314345
    +v 0.134051 3.100780 -0.314345
    +v 0.069645 3.100780 -0.333847
    +v 0.047043 3.136820 -0.225500
    +v 0.090548 3.136820 -0.212328
    +v 0.129671 3.136820 -0.191404
    +v 0.191972 3.100780 -0.283367
    +v 0.191972 3.100780 -0.283367
    +v 0.134051 3.100780 -0.314345
    +v 0.090548 3.136820 -0.212328
    +v 0.129671 3.136820 -0.191404
    +v 0.163571 3.136820 -0.163571
    +v 0.242160 3.100780 -0.242160
    +v 0.242160 3.100780 -0.242160
    +v 0.191972 3.100780 -0.283367
    +v 0.129671 3.136820 -0.191404
    +v 0.163571 3.136820 -0.163571
    +v 0.191404 3.136820 -0.129671
    +v 0.283367 3.100780 -0.191972
    +v 0.283367 3.100780 -0.191972
    +v 0.242160 3.100780 -0.242160
    +v 0.163571 3.136820 -0.163571
    +v 0.191404 3.136820 -0.129671
    +v 0.212328 3.136820 -0.090548
    +v 0.314345 3.100780 -0.134051
    +v 0.314345 3.100780 -0.134051
    +v 0.283367 3.100780 -0.191972
    +v 0.191404 3.136820 -0.129671
    +v 0.212328 3.136820 -0.090548
    +v 0.225500 3.136820 -0.047043
    +v 0.333847 3.100780 -0.069645
    +v 0.333847 3.100780 -0.069645
    +v 0.314345 3.100780 -0.134051
    +v 0.212328 3.136820 -0.090548
    +v 0.225500 3.136820 -0.047043
    +v 0.230078 3.136820 0.000000
    +v 0.340625 3.100780 0.000000
    +v 0.340625 3.100780 0.000000
    +v 0.333847 3.100780 -0.069645
    +v 0.225500 3.136820 -0.047043
    +v 0.000000 3.100780 -0.340625
    +v 0.069645 3.100780 -0.333847
    +v 0.074032 3.047170 -0.354903
    +v 0.074032 3.047170 -0.354903
    +v 0.000000 3.047170 -0.362109
    +v 0.000000 3.100780 -0.340625
    +v 0.069645 3.100780 -0.333847
    +v 0.134051 3.100780 -0.314345
    +v 0.142499 3.047170 -0.334169
    +v 0.142499 3.047170 -0.334169
    +v 0.074032 3.047170 -0.354903
    +v 0.069645 3.100780 -0.333847
    +v 0.134051 3.100780 -0.314345
    +v 0.191972 3.100780 -0.283367
    +v 0.204073 3.047170 -0.301235
    +v 0.204073 3.047170 -0.301235
    +v 0.142499 3.047170 -0.334169
    +v 0.134051 3.100780 -0.314345
    +v 0.191972 3.100780 -0.283367
    +v 0.242160 3.100780 -0.242160
    +v 0.257427 3.047170 -0.257427
    +v 0.257427 3.047170 -0.257427
    +v 0.204073 3.047170 -0.301235
    +v 0.191972 3.100780 -0.283367
    +v 0.242160 3.100780 -0.242160
    +v 0.283367 3.100780 -0.191972
    +v 0.301235 3.047170 -0.204073
    +v 0.301235 3.047170 -0.204073
    +v 0.257427 3.047170 -0.257427
    +v 0.242160 3.100780 -0.242160
    +v 0.283367 3.100780 -0.191972
    +v 0.314345 3.100780 -0.134051
    +v 0.334169 3.047170 -0.142499
    +v 0.334169 3.047170 -0.142499
    +v 0.301235 3.047170 -0.204073
    +v 0.283367 3.100780 -0.191972
    +v 0.314345 3.100780 -0.134051
    +v 0.333847 3.100780 -0.069645
    +v 0.354903 3.047170 -0.074032
    +v 0.354903 3.047170 -0.074032
    +v 0.334169 3.047170 -0.142499
    +v 0.314345 3.100780 -0.134051
    +v 0.333847 3.100780 -0.069645
    +v 0.340625 3.100780 0.000000
    +v 0.362109 3.047170 0.000000
    +v 0.362109 3.047170 0.000000
    +v 0.354903 3.047170 -0.074032
    +v 0.333847 3.100780 -0.069645
    +v 0.000000 3.047170 -0.362109
    +v 0.074032 3.047170 -0.354903
    +v 0.066434 2.981250 -0.318531
    +v 0.066434 2.981250 -0.318531
    +v 0.000000 2.981250 -0.325000
    +v 0.000000 3.047170 -0.362109
    +v 0.074032 3.047170 -0.354903
    +v 0.142499 3.047170 -0.334169
    +v 0.127879 2.981250 -0.299918
    +v 0.127879 2.981250 -0.299918
    +v 0.066434 2.981250 -0.318531
    +v 0.074032 3.047170 -0.354903
    +v 0.142499 3.047170 -0.334169
    +v 0.204073 3.047170 -0.301235
    +v 0.183142 2.981250 -0.270354
    +v 0.183142 2.981250 -0.270354
    +v 0.127879 2.981250 -0.299918
    +v 0.142499 3.047170 -0.334169
    +v 0.204073 3.047170 -0.301235
    +v 0.257427 3.047170 -0.257427
    +v 0.231031 2.981250 -0.231031
    +v 0.231031 2.981250 -0.231031
    +v 0.183142 2.981250 -0.270354
    +v 0.204073 3.047170 -0.301235
    +v 0.257427 3.047170 -0.257427
    +v 0.301235 3.047170 -0.204073
    +v 0.270354 2.981250 -0.183142
    +v 0.270354 2.981250 -0.183142
    +v 0.231031 2.981250 -0.231031
    +v 0.257427 3.047170 -0.257427
    +v 0.301235 3.047170 -0.204073
    +v 0.334169 3.047170 -0.142499
    +v 0.299918 2.981250 -0.127879
    +v 0.299918 2.981250 -0.127879
    +v 0.270354 2.981250 -0.183142
    +v 0.301235 3.047170 -0.204073
    +v 0.334169 3.047170 -0.142499
    +v 0.354903 3.047170 -0.074032
    +v 0.318531 2.981250 -0.066434
    +v 0.318531 2.981250 -0.066434
    +v 0.299918 2.981250 -0.127879
    +v 0.334169 3.047170 -0.142499
    +v 0.354903 3.047170 -0.074032
    +v 0.362109 3.047170 0.000000
    +v 0.325000 2.981250 0.000000
    +v 0.325000 2.981250 0.000000
    +v 0.318531 2.981250 -0.066434
    +v 0.354903 3.047170 -0.074032
    +v 0.000000 2.981250 -0.325000
    +v 0.066434 2.981250 -0.318531
    +v 0.053079 2.908300 -0.254592
    +v 0.053079 2.908300 -0.254592
    +v 0.000000 2.908300 -0.259766
    +v 0.000000 2.981250 -0.325000
    +v 0.066434 2.981250 -0.318531
    +v 0.127879 2.981250 -0.299918
    +v 0.102180 2.908300 -0.239708
    +v 0.102180 2.908300 -0.239708
    +v 0.053079 2.908300 -0.254592
    +v 0.066434 2.981250 -0.318531
    +v 0.127879 2.981250 -0.299918
    +v 0.183142 2.981250 -0.270354
    +v 0.146350 2.908300 -0.216069
    +v 0.146350 2.908300 -0.216069
    +v 0.102180 2.908300 -0.239708
    +v 0.127879 2.981250 -0.299918
    +v 0.183142 2.981250 -0.270354
    +v 0.231031 2.981250 -0.231031
    +v 0.184631 2.908300 -0.184631
    +v 0.184631 2.908300 -0.184631
    +v 0.146350 2.908300 -0.216069
    +v 0.183142 2.981250 -0.270354
    +v 0.231031 2.981250 -0.231031
    +v 0.270354 2.981250 -0.183142
    +v 0.216069 2.908300 -0.146350
    +v 0.216069 2.908300 -0.146350
    +v 0.184631 2.908300 -0.184631
    +v 0.231031 2.981250 -0.231031
    +v 0.270354 2.981250 -0.183142
    +v 0.299918 2.981250 -0.127879
    +v 0.239708 2.908300 -0.102180
    +v 0.239708 2.908300 -0.102180
    +v 0.216069 2.908300 -0.146350
    +v 0.270354 2.981250 -0.183142
    +v 0.299918 2.981250 -0.127879
    +v 0.318531 2.981250 -0.066434
    +v 0.254592 2.908300 -0.053079
    +v 0.254592 2.908300 -0.053079
    +v 0.239708 2.908300 -0.102180
    +v 0.299918 2.981250 -0.127879
    +v 0.318531 2.981250 -0.066434
    +v 0.325000 2.981250 0.000000
    +v 0.259766 2.908300 0.000000
    +v 0.259766 2.908300 0.000000
    +v 0.254592 2.908300 -0.053079
    +v 0.318531 2.981250 -0.066434
    +v 0.000000 2.908300 -0.259766
    +v 0.053079 2.908300 -0.254592
    +v 0.040194 2.833590 -0.192949
    +v 0.040194 2.833590 -0.192949
    +v 0.000000 2.833590 -0.196875
    +v 0.000000 2.908300 -0.259766
    +v 0.053079 2.908300 -0.254592
    +v 0.102180 2.908300 -0.239708
    +v 0.077392 2.833590 -0.181657
    +v 0.077392 2.833590 -0.181657
    +v 0.040194 2.833590 -0.192949
    +v 0.053079 2.908300 -0.254592
    +v 0.102180 2.908300 -0.239708
    +v 0.146350 2.908300 -0.216069
    +v 0.110866 2.833590 -0.163727
    +v 0.110866 2.833590 -0.163727
    +v 0.077392 2.833590 -0.181657
    +v 0.102180 2.908300 -0.239708
    +v 0.146350 2.908300 -0.216069
    +v 0.184631 2.908300 -0.184631
    +v 0.139887 2.833590 -0.139887
    +v 0.139887 2.833590 -0.139887
    +v 0.110866 2.833590 -0.163727
    +v 0.146350 2.908300 -0.216069
    +v 0.184631 2.908300 -0.184631
    +v 0.216069 2.908300 -0.146350
    +v 0.163727 2.833590 -0.110866
    +v 0.163727 2.833590 -0.110866
    +v 0.139887 2.833590 -0.139887
    +v 0.184631 2.908300 -0.184631
    +v 0.216069 2.908300 -0.146350
    +v 0.239708 2.908300 -0.102180
    +v 0.181657 2.833590 -0.077392
    +v 0.181657 2.833590 -0.077392
    +v 0.163727 2.833590 -0.110866
    +v 0.216069 2.908300 -0.146350
    +v 0.239708 2.908300 -0.102180
    +v 0.254592 2.908300 -0.053079
    +v 0.192949 2.833590 -0.040194
    +v 0.192949 2.833590 -0.040194
    +v 0.181657 2.833590 -0.077392
    +v 0.239708 2.908300 -0.102180
    +v 0.254592 2.908300 -0.053079
    +v 0.259766 2.908300 0.000000
    +v 0.196875 2.833590 0.000000
    +v 0.196875 2.833590 0.000000
    +v 0.192949 2.833590 -0.040194
    +v 0.254592 2.908300 -0.053079
    +v 0.000000 2.833590 -0.196875
    +v 0.040194 2.833590 -0.192949
    +v 0.034008 2.762400 -0.163464
    +v 0.034008 2.762400 -0.163464
    +v 0.000000 2.762400 -0.166797
    +v 0.000000 2.833590 -0.196875
    +v 0.040194 2.833590 -0.192949
    +v 0.077392 2.833590 -0.181657
    +v 0.065502 2.762400 -0.153882
    +v 0.065502 2.762400 -0.153882
    +v 0.034008 2.762400 -0.163464
    +v 0.040194 2.833590 -0.192949
    +v 0.077392 2.833590 -0.181657
    +v 0.110866 2.833590 -0.163727
    +v 0.093859 2.762400 -0.138672
    +v 0.093859 2.762400 -0.138672
    +v 0.065502 2.762400 -0.153882
    +v 0.077392 2.833590 -0.181657
    +v 0.110866 2.833590 -0.163727
    +v 0.139887 2.833590 -0.139887
    +v 0.118457 2.762400 -0.118457
    +v 0.118457 2.762400 -0.118457
    +v 0.093859 2.762400 -0.138672
    +v 0.110866 2.833590 -0.163727
    +v 0.139887 2.833590 -0.139887
    +v 0.163727 2.833590 -0.110866
    +v 0.138672 2.762400 -0.093859
    +v 0.138672 2.762400 -0.093859
    +v 0.118457 2.762400 -0.118457
    +v 0.139887 2.833590 -0.139887
    +v 0.163727 2.833590 -0.110866
    +v 0.181657 2.833590 -0.077392
    +v 0.153882 2.762400 -0.065502
    +v 0.153882 2.762400 -0.065502
    +v 0.138672 2.762400 -0.093859
    +v 0.163727 2.833590 -0.110866
    +v 0.181657 2.833590 -0.077392
    +v 0.192949 2.833590 -0.040194
    +v 0.163464 2.762400 -0.034008
    +v 0.163464 2.762400 -0.034008
    +v 0.153882 2.762400 -0.065502
    +v 0.181657 2.833590 -0.077392
    +v 0.192949 2.833590 -0.040194
    +v 0.196875 2.833590 0.000000
    +v 0.166797 2.762400 0.000000
    +v 0.166797 2.762400 0.000000
    +v 0.163464 2.762400 -0.034008
    +v 0.192949 2.833590 -0.040194
    +v 0.000000 2.762400 -0.166797
    +v 0.034008 2.762400 -0.163464
    +v 0.040750 2.700000 -0.196000
    +v 0.040750 2.700000 -0.196000
    +v 0.000000 2.700000 -0.200000
    +v 0.000000 2.762400 -0.166797
    +v 0.034008 2.762400 -0.163464
    +v 0.065502 2.762400 -0.153882
    +v 0.078500 2.700000 -0.184500
    +v 0.078500 2.700000 -0.184500
    +v 0.040750 2.700000 -0.196000
    +v 0.034008 2.762400 -0.163464
    +v 0.065502 2.762400 -0.153882
    +v 0.093859 2.762400 -0.138672
    +v 0.112500 2.700000 -0.166250
    +v 0.112500 2.700000 -0.166250
    +v 0.078500 2.700000 -0.184500
    +v 0.065502 2.762400 -0.153882
    +v 0.093859 2.762400 -0.138672
    +v 0.118457 2.762400 -0.118457
    +v 0.142000 2.700000 -0.142000
    +v 0.142000 2.700000 -0.142000
    +v 0.112500 2.700000 -0.166250
    +v 0.093859 2.762400 -0.138672
    +v 0.118457 2.762400 -0.118457
    +v 0.138672 2.762400 -0.093859
    +v 0.166250 2.700000 -0.112500
    +v 0.166250 2.700000 -0.112500
    +v 0.142000 2.700000 -0.142000
    +v 0.118457 2.762400 -0.118457
    +v 0.138672 2.762400 -0.093859
    +v 0.153882 2.762400 -0.065502
    +v 0.184500 2.700000 -0.078500
    +v 0.184500 2.700000 -0.078500
    +v 0.166250 2.700000 -0.112500
    +v 0.138672 2.762400 -0.093859
    +v 0.153882 2.762400 -0.065502
    +v 0.163464 2.762400 -0.034008
    +v 0.196000 2.700000 -0.040750
    +v 0.196000 2.700000 -0.040750
    +v 0.184500 2.700000 -0.078500
    +v 0.153882 2.762400 -0.065502
    +v 0.163464 2.762400 -0.034008
    +v 0.166797 2.762400 0.000000
    +v 0.200000 2.700000 0.000000
    +v 0.200000 2.700000 0.000000
    +v 0.196000 2.700000 -0.040750
    +v 0.163464 2.762400 -0.034008
    +v 0.200000 2.700000 0.000000
    +v 0.196000 2.700000 0.040750
    +v 0.298594 2.650200 0.062080
    +v 0.298594 2.650200 0.062080
    +v 0.304688 2.650200 0.000000
    +v 0.200000 2.700000 0.000000
    +v 0.196000 2.700000 0.040750
    +v 0.184500 2.700000 0.078500
    +v 0.281074 2.650200 0.119590
    +v 0.281074 2.650200 0.119590
    +v 0.298594 2.650200 0.062080
    +v 0.196000 2.700000 0.040750
    +v 0.184500 2.700000 0.078500
    +v 0.166250 2.700000 0.112500
    +v 0.253271 2.650200 0.171387
    +v 0.253271 2.650200 0.171387
    +v 0.281074 2.650200 0.119590
    +v 0.184500 2.700000 0.078500
    +v 0.166250 2.700000 0.112500
    +v 0.142000 2.700000 0.142000
    +v 0.216328 2.650200 0.216328
    +v 0.216328 2.650200 0.216328
    +v 0.253271 2.650200 0.171387
    +v 0.166250 2.700000 0.112500
    +v 0.142000 2.700000 0.142000
    +v 0.112500 2.700000 0.166250
    +v 0.171387 2.650200 0.253271
    +v 0.171387 2.650200 0.253271
    +v 0.216328 2.650200 0.216328
    +v 0.142000 2.700000 0.142000
    +v 0.112500 2.700000 0.166250
    +v 0.078500 2.700000 0.184500
    +v 0.119590 2.650200 0.281074
    +v 0.119590 2.650200 0.281074
    +v 0.171387 2.650200 0.253271
    +v 0.112500 2.700000 0.166250
    +v 0.078500 2.700000 0.184500
    +v 0.040750 2.700000 0.196000
    +v 0.062080 2.650200 0.298594
    +v 0.062080 2.650200 0.298594
    +v 0.119590 2.650200 0.281074
    +v 0.078500 2.700000 0.184500
    +v 0.040750 2.700000 0.196000
    +v 0.000000 2.700000 0.200000
    +v 0.000000 2.650200 0.304688
    +v 0.000000 2.650200 0.304688
    +v 0.062080 2.650200 0.298594
    +v 0.040750 2.700000 0.196000
    +v 0.304688 2.650200 0.000000
    +v 0.298594 2.650200 0.062080
    +v 0.447125 2.610940 0.092961
    +v 0.447125 2.610940 0.092961
    +v 0.456250 2.610940 0.000000
    +v 0.304688 2.650200 0.000000
    +v 0.298594 2.650200 0.062080
    +v 0.281074 2.650200 0.119590
    +v 0.420891 2.610940 0.179078
    +v 0.420891 2.610940 0.179078
    +v 0.447125 2.610940 0.092961
    +v 0.298594 2.650200 0.062080
    +v 0.281074 2.650200 0.119590
    +v 0.253271 2.650200 0.171387
    +v 0.379258 2.610940 0.256641
    +v 0.379258 2.610940 0.256641
    +v 0.420891 2.610940 0.179078
    +v 0.281074 2.650200 0.119590
    +v 0.253271 2.650200 0.171387
    +v 0.216328 2.650200 0.216328
    +v 0.323938 2.610940 0.323937
    +v 0.323938 2.610940 0.323937
    +v 0.379258 2.610940 0.256641
    +v 0.253271 2.650200 0.171387
    +v 0.216328 2.650200 0.216328
    +v 0.171387 2.650200 0.253271
    +v 0.256641 2.610940 0.379258
    +v 0.256641 2.610940 0.379258
    +v 0.323938 2.610940 0.323937
    +v 0.216328 2.650200 0.216328
    +v 0.171387 2.650200 0.253271
    +v 0.119590 2.650200 0.281074
    +v 0.179078 2.610940 0.420891
    +v 0.179078 2.610940 0.420891
    +v 0.256641 2.610940 0.379258
    +v 0.171387 2.650200 0.253271
    +v 0.119590 2.650200 0.281074
    +v 0.062080 2.650200 0.298594
    +v 0.092961 2.610940 0.447125
    +v 0.092961 2.610940 0.447125
    +v 0.179078 2.610940 0.420891
    +v 0.119590 2.650200 0.281074
    +v 0.062080 2.650200 0.298594
    +v 0.000000 2.650200 0.304688
    +v 0.000000 2.610940 0.456250
    +v 0.000000 2.610940 0.456250
    +v 0.092961 2.610940 0.447125
    +v 0.062080 2.650200 0.298594
    +v 0.456250 2.610940 0.000000
    +v 0.447125 2.610940 0.092961
    +v 0.623219 2.578710 0.129572
    +v 0.623219 2.578710 0.129572
    +v 0.635938 2.578710 0.000000
    +v 0.456250 2.610940 0.000000
    +v 0.447125 2.610940 0.092961
    +v 0.420891 2.610940 0.179078
    +v 0.586652 2.578710 0.249605
    +v 0.586652 2.578710 0.249605
    +v 0.623219 2.578710 0.129572
    +v 0.447125 2.610940 0.092961
    +v 0.420891 2.610940 0.179078
    +v 0.379258 2.610940 0.256641
    +v 0.528623 2.578710 0.357715
    +v 0.528623 2.578710 0.357715
    +v 0.586652 2.578710 0.249605
    +v 0.420891 2.610940 0.179078
    +v 0.379258 2.610940 0.256641
    +v 0.323938 2.610940 0.323937
    +v 0.451516 2.578710 0.451516
    +v 0.451516 2.578710 0.451516
    +v 0.528623 2.578710 0.357715
    +v 0.379258 2.610940 0.256641
    +v 0.323938 2.610940 0.323937
    +v 0.256641 2.610940 0.379258
    +v 0.357715 2.578710 0.528623
    +v 0.357715 2.578710 0.528623
    +v 0.451516 2.578710 0.451516
    +v 0.323938 2.610940 0.323937
    +v 0.256641 2.610940 0.379258
    +v 0.179078 2.610940 0.420891
    +v 0.249605 2.578710 0.586652
    +v 0.249605 2.578710 0.586652
    +v 0.357715 2.578710 0.528623
    +v 0.256641 2.610940 0.379258
    +v 0.179078 2.610940 0.420891
    +v 0.092961 2.610940 0.447125
    +v 0.129572 2.578710 0.623219
    +v 0.129572 2.578710 0.623219
    +v 0.249605 2.578710 0.586652
    +v 0.179078 2.610940 0.420891
    +v 0.092961 2.610940 0.447125
    +v 0.000000 2.610940 0.456250
    +v -0.000000 2.578710 0.635938
    +v -0.000000 2.578710 0.635938
    +v 0.129572 2.578710 0.623219
    +v 0.092961 2.610940 0.447125
    +v 0.635938 2.578710 0.000000
    +v 0.623219 2.578710 0.129572
    +v 0.808500 2.550000 0.168094
    +v 0.808500 2.550000 0.168094
    +v 0.825000 2.550000 0.000000
    +v 0.635938 2.578710 0.000000
    +v 0.623219 2.578710 0.129572
    +v 0.586652 2.578710 0.249605
    +v 0.761063 2.550000 0.323813
    +v 0.761063 2.550000 0.323813
    +v 0.808500 2.550000 0.168094
    +v 0.623219 2.578710 0.129572
    +v 0.586652 2.578710 0.249605
    +v 0.528623 2.578710 0.357715
    +v 0.685781 2.550000 0.464062
    +v 0.685781 2.550000 0.464062
    +v 0.761063 2.550000 0.323813
    +v 0.586652 2.578710 0.249605
    +v 0.528623 2.578710 0.357715
    +v 0.451516 2.578710 0.451516
    +v 0.585750 2.550000 0.585750
    +v 0.585750 2.550000 0.585750
    +v 0.685781 2.550000 0.464062
    +v 0.528623 2.578710 0.357715
    +v 0.451516 2.578710 0.451516
    +v 0.357715 2.578710 0.528623
    +v 0.464063 2.550000 0.685781
    +v 0.464063 2.550000 0.685781
    +v 0.585750 2.550000 0.585750
    +v 0.451516 2.578710 0.451516
    +v 0.357715 2.578710 0.528623
    +v 0.249605 2.578710 0.586652
    +v 0.323813 2.550000 0.761062
    +v 0.323813 2.550000 0.761062
    +v 0.464063 2.550000 0.685781
    +v 0.357715 2.578710 0.528623
    +v 0.249605 2.578710 0.586652
    +v 0.129572 2.578710 0.623219
    +v 0.168094 2.550000 0.808500
    +v 0.168094 2.550000 0.808500
    +v 0.323813 2.550000 0.761062
    +v 0.249605 2.578710 0.586652
    +v 0.129572 2.578710 0.623219
    +v -0.000000 2.578710 0.635938
    +v 0.000000 2.550000 0.825000
    +v 0.000000 2.550000 0.825000
    +v 0.168094 2.550000 0.808500
    +v 0.129572 2.578710 0.623219
    +v 0.825000 2.550000 0.000000
    +v 0.808500 2.550000 0.168094
    +v 0.984594 2.521290 0.204705
    +v 0.984594 2.521290 0.204705
    +v 1.004690 2.521290 0.000000
    +v 0.825000 2.550000 0.000000
    +v 0.808500 2.550000 0.168094
    +v 0.761063 2.550000 0.323813
    +v 0.926824 2.521290 0.394340
    +v 0.926824 2.521290 0.394340
    +v 0.984594 2.521290 0.204705
    +v 0.808500 2.550000 0.168094
    +v 0.761063 2.550000 0.323813
    +v 0.685781 2.550000 0.464062
    +v 0.835146 2.521290 0.565137
    +v 0.835146 2.521290 0.565137
    +v 0.926824 2.521290 0.394340
    +v 0.761063 2.550000 0.323813
    +v 0.685781 2.550000 0.464062
    +v 0.585750 2.550000 0.585750
    +v 0.713328 2.521290 0.713328
    +v 0.713328 2.521290 0.713328
    +v 0.835146 2.521290 0.565137
    +v 0.685781 2.550000 0.464062
    +v 0.585750 2.550000 0.585750
    +v 0.464063 2.550000 0.685781
    +v 0.565137 2.521290 0.835146
    +v 0.565137 2.521290 0.835146
    +v 0.713328 2.521290 0.713328
    +v 0.585750 2.550000 0.585750
    +v 0.464063 2.550000 0.685781
    +v 0.323813 2.550000 0.761062
    +v 0.394340 2.521290 0.926824
    +v 0.394340 2.521290 0.926824
    +v 0.565137 2.521290 0.835146
    +v 0.464063 2.550000 0.685781
    +v 0.323813 2.550000 0.761062
    +v 0.168094 2.550000 0.808500
    +v 0.204705 2.521290 0.984594
    +v 0.204705 2.521290 0.984594
    +v 0.394340 2.521290 0.926824
    +v 0.323813 2.550000 0.761062
    +v 0.168094 2.550000 0.808500
    +v 0.000000 2.550000 0.825000
    +v 0.000000 2.521290 1.004690
    +v 0.000000 2.521290 1.004690
    +v 0.204705 2.521290 0.984594
    +v 0.168094 2.550000 0.808500
    +v 1.004690 2.521290 0.000000
    +v 0.984594 2.521290 0.204705
    +v 1.133120 2.489060 0.235586
    +v 1.133120 2.489060 0.235586
    +v 1.156250 2.489060 0.000000
    +v 1.004690 2.521290 0.000000
    +v 0.984594 2.521290 0.204705
    +v 0.926824 2.521290 0.394340
    +v 1.066640 2.489060 0.453828
    +v 1.066640 2.489060 0.453828
    +v 1.133120 2.489060 0.235586
    +v 0.984594 2.521290 0.204705
    +v 0.926824 2.521290 0.394340
    +v 0.835146 2.521290 0.565137
    +v 0.961133 2.489060 0.650391
    +v 0.961133 2.489060 0.650391
    +v 1.066640 2.489060 0.453828
    +v 0.926824 2.521290 0.394340
    +v 0.835146 2.521290 0.565137
    +v 0.713328 2.521290 0.713328
    +v 0.820937 2.489060 0.820937
    +v 0.820937 2.489060 0.820937
    +v 0.961133 2.489060 0.650391
    +v 0.835146 2.521290 0.565137
    +v 0.713328 2.521290 0.713328
    +v 0.565137 2.521290 0.835146
    +v 0.650391 2.489060 0.961133
    +v 0.650391 2.489060 0.961133
    +v 0.820937 2.489060 0.820937
    +v 0.713328 2.521290 0.713328
    +v 0.565137 2.521290 0.835146
    +v 0.394340 2.521290 0.926824
    +v 0.453828 2.489060 1.066640
    +v 0.453828 2.489060 1.066640
    +v 0.650391 2.489060 0.961133
    +v 0.565137 2.521290 0.835146
    +v 0.394340 2.521290 0.926824
    +v 0.204705 2.521290 0.984594
    +v 0.235586 2.489060 1.133120
    +v 0.235586 2.489060 1.133120
    +v 0.453828 2.489060 1.066640
    +v 0.394340 2.521290 0.926824
    +v 0.204705 2.521290 0.984594
    +v 0.000000 2.521290 1.004690
    +v 0.000000 2.489060 1.156250
    +v 0.000000 2.489060 1.156250
    +v 0.235586 2.489060 1.133120
    +v 0.204705 2.521290 0.984594
    +v 1.156250 2.489060 0.000000
    +v 1.133120 2.489060 0.235586
    +v 1.235720 2.449800 0.256916
    +v 1.235720 2.449800 0.256916
    +v 1.260940 2.449800 0.000000
    +v 1.156250 2.489060 0.000000
    +v 1.133120 2.489060 0.235586
    +v 1.066640 2.489060 0.453828
    +v 1.163210 2.449800 0.494918
    +v 1.163210 2.449800 0.494918
    +v 1.235720 2.449800 0.256916
    +v 1.133120 2.489060 0.235586
    +v 1.066640 2.489060 0.453828
    +v 0.961133 2.489060 0.650391
    +v 1.048150 2.449800 0.709277
    +v 1.048150 2.449800 0.709277
    +v 1.163210 2.449800 0.494918
    +v 1.066640 2.489060 0.453828
    +v 0.961133 2.489060 0.650391
    +v 0.820937 2.489060 0.820937
    +v 0.895266 2.449800 0.895266
    +v 0.895266 2.449800 0.895266
    +v 1.048150 2.449800 0.709277
    +v 0.961133 2.489060 0.650391
    +v 0.820937 2.489060 0.820937
    +v 0.650391 2.489060 0.961133
    +v 0.709277 2.449800 1.048150
    +v 0.709277 2.449800 1.048150
    +v 0.895266 2.449800 0.895266
    +v 0.820937 2.489060 0.820937
    +v 0.650391 2.489060 0.961133
    +v 0.453828 2.489060 1.066640
    +v 0.494918 2.449800 1.163210
    +v 0.494918 2.449800 1.163210
    +v 0.709277 2.449800 1.048150
    +v 0.650391 2.489060 0.961133
    +v 0.453828 2.489060 1.066640
    +v 0.235586 2.489060 1.133120
    +v 0.256916 2.449800 1.235720
    +v 0.256916 2.449800 1.235720
    +v 0.494918 2.449800 1.163210
    +v 0.453828 2.489060 1.066640
    +v 0.235586 2.489060 1.133120
    +v 0.000000 2.489060 1.156250
    +v 0.000000 2.449800 1.260940
    +v 0.000000 2.449800 1.260940
    +v 0.256916 2.449800 1.235720
    +v 0.235586 2.489060 1.133120
    +v 1.260940 2.449800 0.000000
    +v 1.235720 2.449800 0.256916
    +v 1.274000 2.400000 0.264875
    +v 1.274000 2.400000 0.264875
    +v 1.300000 2.400000 0.000000
    +v 1.260940 2.449800 0.000000
    +v 1.235720 2.449800 0.256916
    +v 1.163210 2.449800 0.494918
    +v 1.199250 2.400000 0.510250
    +v 1.199250 2.400000 0.510250
    +v 1.274000 2.400000 0.264875
    +v 1.235720 2.449800 0.256916
    +v 1.163210 2.449800 0.494918
    +v 1.048150 2.449800 0.709277
    +v 1.080620 2.400000 0.731250
    +v 1.080620 2.400000 0.731250
    +v 1.199250 2.400000 0.510250
    +v 1.163210 2.449800 0.494918
    +v 1.048150 2.449800 0.709277
    +v 0.895266 2.449800 0.895266
    +v 0.923000 2.400000 0.923000
    +v 0.923000 2.400000 0.923000
    +v 1.080620 2.400000 0.731250
    +v 1.048150 2.449800 0.709277
    +v 0.895266 2.449800 0.895266
    +v 0.709277 2.449800 1.048150
    +v 0.731250 2.400000 1.080620
    +v 0.731250 2.400000 1.080620
    +v 0.923000 2.400000 0.923000
    +v 0.895266 2.449800 0.895266
    +v 0.709277 2.449800 1.048150
    +v 0.494918 2.449800 1.163210
    +v 0.510250 2.400000 1.199250
    +v 0.510250 2.400000 1.199250
    +v 0.731250 2.400000 1.080620
    +v 0.709277 2.449800 1.048150
    +v 0.494918 2.449800 1.163210
    +v 0.256916 2.449800 1.235720
    +v 0.264875 2.400000 1.274000
    +v 0.264875 2.400000 1.274000
    +v 0.510250 2.400000 1.199250
    +v 0.494918 2.449800 1.163210
    +v 0.256916 2.449800 1.235720
    +v 0.000000 2.449800 1.260940
    +v 0.000000 2.400000 1.300000
    +v 0.000000 2.400000 1.300000
    +v 0.264875 2.400000 1.274000
    +v 0.256916 2.449800 1.235720
    +v 0.000000 2.700000 0.200000
    +v -0.040750 2.700000 0.196000
    +v -0.062080 2.650200 0.298594
    +v -0.062080 2.650200 0.298594
    +v 0.000000 2.650200 0.304688
    +v 0.000000 2.700000 0.200000
    +v -0.040750 2.700000 0.196000
    +v -0.078500 2.700000 0.184500
    +v -0.119590 2.650200 0.281074
    +v -0.119590 2.650200 0.281074
    +v -0.062080 2.650200 0.298594
    +v -0.040750 2.700000 0.196000
    +v -0.078500 2.700000 0.184500
    +v -0.112500 2.700000 0.166250
    +v -0.171387 2.650200 0.253271
    +v -0.171387 2.650200 0.253271
    +v -0.119590 2.650200 0.281074
    +v -0.078500 2.700000 0.184500
    +v -0.112500 2.700000 0.166250
    +v -0.142000 2.700000 0.142000
    +v -0.216328 2.650200 0.216328
    +v -0.216328 2.650200 0.216328
    +v -0.171387 2.650200 0.253271
    +v -0.112500 2.700000 0.166250
    +v -0.142000 2.700000 0.142000
    +v -0.166250 2.700000 0.112500
    +v -0.253271 2.650200 0.171387
    +v -0.253271 2.650200 0.171387
    +v -0.216328 2.650200 0.216328
    +v -0.142000 2.700000 0.142000
    +v -0.166250 2.700000 0.112500
    +v -0.184500 2.700000 0.078500
    +v -0.281074 2.650200 0.119590
    +v -0.281074 2.650200 0.119590
    +v -0.253271 2.650200 0.171387
    +v -0.166250 2.700000 0.112500
    +v -0.184500 2.700000 0.078500
    +v -0.196000 2.700000 0.040750
    +v -0.298594 2.650200 0.062080
    +v -0.298594 2.650200 0.062080
    +v -0.281074 2.650200 0.119590
    +v -0.184500 2.700000 0.078500
    +v -0.196000 2.700000 0.040750
    +v -0.200000 2.700000 0.000000
    +v -0.304688 2.650200 0.000000
    +v -0.304688 2.650200 0.000000
    +v -0.298594 2.650200 0.062080
    +v -0.196000 2.700000 0.040750
    +v 0.000000 2.650200 0.304688
    +v -0.062080 2.650200 0.298594
    +v -0.092961 2.610940 0.447125
    +v -0.092961 2.610940 0.447125
    +v 0.000000 2.610940 0.456250
    +v 0.000000 2.650200 0.304688
    +v -0.062080 2.650200 0.298594
    +v -0.119590 2.650200 0.281074
    +v -0.179078 2.610940 0.420891
    +v -0.179078 2.610940 0.420891
    +v -0.092961 2.610940 0.447125
    +v -0.062080 2.650200 0.298594
    +v -0.119590 2.650200 0.281074
    +v -0.171387 2.650200 0.253271
    +v -0.256641 2.610940 0.379258
    +v -0.256641 2.610940 0.379258
    +v -0.179078 2.610940 0.420891
    +v -0.119590 2.650200 0.281074
    +v -0.171387 2.650200 0.253271
    +v -0.216328 2.650200 0.216328
    +v -0.323937 2.610940 0.323938
    +v -0.323937 2.610940 0.323938
    +v -0.256641 2.610940 0.379258
    +v -0.171387 2.650200 0.253271
    +v -0.216328 2.650200 0.216328
    +v -0.253271 2.650200 0.171387
    +v -0.379258 2.610940 0.256641
    +v -0.379258 2.610940 0.256641
    +v -0.323937 2.610940 0.323938
    +v -0.216328 2.650200 0.216328
    +v -0.253271 2.650200 0.171387
    +v -0.281074 2.650200 0.119590
    +v -0.420891 2.610940 0.179078
    +v -0.420891 2.610940 0.179078
    +v -0.379258 2.610940 0.256641
    +v -0.253271 2.650200 0.171387
    +v -0.281074 2.650200 0.119590
    +v -0.298594 2.650200 0.062080
    +v -0.447125 2.610940 0.092961
    +v -0.447125 2.610940 0.092961
    +v -0.420891 2.610940 0.179078
    +v -0.281074 2.650200 0.119590
    +v -0.298594 2.650200 0.062080
    +v -0.304688 2.650200 0.000000
    +v -0.456250 2.610940 0.000000
    +v -0.456250 2.610940 0.000000
    +v -0.447125 2.610940 0.092961
    +v -0.298594 2.650200 0.062080
    +v 0.000000 2.610940 0.456250
    +v -0.092961 2.610940 0.447125
    +v -0.129572 2.578710 0.623219
    +v -0.129572 2.578710 0.623219
    +v 0.000000 2.578710 0.635938
    +v 0.000000 2.610940 0.456250
    +v -0.092961 2.610940 0.447125
    +v -0.179078 2.610940 0.420891
    +v -0.249605 2.578710 0.586652
    +v -0.249605 2.578710 0.586652
    +v -0.129572 2.578710 0.623219
    +v -0.092961 2.610940 0.447125
    +v -0.179078 2.610940 0.420891
    +v -0.256641 2.610940 0.379258
    +v -0.357715 2.578710 0.528623
    +v -0.357715 2.578710 0.528623
    +v -0.249605 2.578710 0.586652
    +v -0.179078 2.610940 0.420891
    +v -0.256641 2.610940 0.379258
    +v -0.323937 2.610940 0.323938
    +v -0.451516 2.578710 0.451516
    +v -0.451516 2.578710 0.451516
    +v -0.357715 2.578710 0.528623
    +v -0.256641 2.610940 0.379258
    +v -0.323937 2.610940 0.323938
    +v -0.379258 2.610940 0.256641
    +v -0.528623 2.578710 0.357715
    +v -0.528623 2.578710 0.357715
    +v -0.451516 2.578710 0.451516
    +v -0.323937 2.610940 0.323938
    +v -0.379258 2.610940 0.256641
    +v -0.420891 2.610940 0.179078
    +v -0.586652 2.578710 0.249605
    +v -0.586652 2.578710 0.249605
    +v -0.528623 2.578710 0.357715
    +v -0.379258 2.610940 0.256641
    +v -0.420891 2.610940 0.179078
    +v -0.447125 2.610940 0.092961
    +v -0.623219 2.578710 0.129572
    +v -0.623219 2.578710 0.129572
    +v -0.586652 2.578710 0.249605
    +v -0.420891 2.610940 0.179078
    +v -0.447125 2.610940 0.092961
    +v -0.456250 2.610940 0.000000
    +v -0.635938 2.578710 0.000000
    +v -0.635938 2.578710 0.000000
    +v -0.623219 2.578710 0.129572
    +v -0.447125 2.610940 0.092961
    +v 0.000000 2.578710 0.635938
    +v -0.129572 2.578710 0.623219
    +v -0.168094 2.550000 0.808500
    +v -0.168094 2.550000 0.808500
    +v 0.000000 2.550000 0.825000
    +v 0.000000 2.578710 0.635938
    +v -0.129572 2.578710 0.623219
    +v -0.249605 2.578710 0.586652
    +v -0.323813 2.550000 0.761063
    +v -0.323813 2.550000 0.761063
    +v -0.168094 2.550000 0.808500
    +v -0.129572 2.578710 0.623219
    +v -0.249605 2.578710 0.586652
    +v -0.357715 2.578710 0.528623
    +v -0.464062 2.550000 0.685781
    +v -0.464062 2.550000 0.685781
    +v -0.323813 2.550000 0.761063
    +v -0.249605 2.578710 0.586652
    +v -0.357715 2.578710 0.528623
    +v -0.451516 2.578710 0.451516
    +v -0.585750 2.550000 0.585750
    +v -0.585750 2.550000 0.585750
    +v -0.464062 2.550000 0.685781
    +v -0.357715 2.578710 0.528623
    +v -0.451516 2.578710 0.451516
    +v -0.528623 2.578710 0.357715
    +v -0.685781 2.550000 0.464063
    +v -0.685781 2.550000 0.464063
    +v -0.585750 2.550000 0.585750
    +v -0.451516 2.578710 0.451516
    +v -0.528623 2.578710 0.357715
    +v -0.586652 2.578710 0.249605
    +v -0.761062 2.550000 0.323813
    +v -0.761062 2.550000 0.323813
    +v -0.685781 2.550000 0.464063
    +v -0.528623 2.578710 0.357715
    +v -0.586652 2.578710 0.249605
    +v -0.623219 2.578710 0.129572
    +v -0.808500 2.550000 0.168094
    +v -0.808500 2.550000 0.168094
    +v -0.761062 2.550000 0.323813
    +v -0.586652 2.578710 0.249605
    +v -0.623219 2.578710 0.129572
    +v -0.635938 2.578710 0.000000
    +v -0.825000 2.550000 0.000000
    +v -0.825000 2.550000 0.000000
    +v -0.808500 2.550000 0.168094
    +v -0.623219 2.578710 0.129572
    +v 0.000000 2.550000 0.825000
    +v -0.168094 2.550000 0.808500
    +v -0.204705 2.521290 0.984594
    +v -0.204705 2.521290 0.984594
    +v 0.000000 2.521290 1.004690
    +v 0.000000 2.550000 0.825000
    +v -0.168094 2.550000 0.808500
    +v -0.323813 2.550000 0.761063
    +v -0.394340 2.521290 0.926824
    +v -0.394340 2.521290 0.926824
    +v -0.204705 2.521290 0.984594
    +v -0.168094 2.550000 0.808500
    +v -0.323813 2.550000 0.761063
    +v -0.464062 2.550000 0.685781
    +v -0.565137 2.521290 0.835146
    +v -0.565137 2.521290 0.835146
    +v -0.394340 2.521290 0.926824
    +v -0.323813 2.550000 0.761063
    +v -0.464062 2.550000 0.685781
    +v -0.585750 2.550000 0.585750
    +v -0.713328 2.521290 0.713328
    +v -0.713328 2.521290 0.713328
    +v -0.565137 2.521290 0.835146
    +v -0.464062 2.550000 0.685781
    +v -0.585750 2.550000 0.585750
    +v -0.685781 2.550000 0.464063
    +v -0.835146 2.521290 0.565137
    +v -0.835146 2.521290 0.565137
    +v -0.713328 2.521290 0.713328
    +v -0.585750 2.550000 0.585750
    +v -0.685781 2.550000 0.464063
    +v -0.761062 2.550000 0.323813
    +v -0.926824 2.521290 0.394340
    +v -0.926824 2.521290 0.394340
    +v -0.835146 2.521290 0.565137
    +v -0.685781 2.550000 0.464063
    +v -0.761062 2.550000 0.323813
    +v -0.808500 2.550000 0.168094
    +v -0.984594 2.521290 0.204705
    +v -0.984594 2.521290 0.204705
    +v -0.926824 2.521290 0.394340
    +v -0.761062 2.550000 0.323813
    +v -0.808500 2.550000 0.168094
    +v -0.825000 2.550000 0.000000
    +v -1.004690 2.521290 0.000000
    +v -1.004690 2.521290 0.000000
    +v -0.984594 2.521290 0.204705
    +v -0.808500 2.550000 0.168094
    +v 0.000000 2.521290 1.004690
    +v -0.204705 2.521290 0.984594
    +v -0.235586 2.489060 1.133120
    +v -0.235586 2.489060 1.133120
    +v 0.000000 2.489060 1.156250
    +v 0.000000 2.521290 1.004690
    +v -0.204705 2.521290 0.984594
    +v -0.394340 2.521290 0.926824
    +v -0.453828 2.489060 1.066640
    +v -0.453828 2.489060 1.066640
    +v -0.235586 2.489060 1.133120
    +v -0.204705 2.521290 0.984594
    +v -0.394340 2.521290 0.926824
    +v -0.565137 2.521290 0.835146
    +v -0.650391 2.489060 0.961133
    +v -0.650391 2.489060 0.961133
    +v -0.453828 2.489060 1.066640
    +v -0.394340 2.521290 0.926824
    +v -0.565137 2.521290 0.835146
    +v -0.713328 2.521290 0.713328
    +v -0.820937 2.489060 0.820937
    +v -0.820937 2.489060 0.820937
    +v -0.650391 2.489060 0.961133
    +v -0.565137 2.521290 0.835146
    +v -0.713328 2.521290 0.713328
    +v -0.835146 2.521290 0.565137
    +v -0.961133 2.489060 0.650391
    +v -0.961133 2.489060 0.650391
    +v -0.820937 2.489060 0.820937
    +v -0.713328 2.521290 0.713328
    +v -0.835146 2.521290 0.565137
    +v -0.926824 2.521290 0.394340
    +v -1.066640 2.489060 0.453828
    +v -1.066640 2.489060 0.453828
    +v -0.961133 2.489060 0.650391
    +v -0.835146 2.521290 0.565137
    +v -0.926824 2.521290 0.394340
    +v -0.984594 2.521290 0.204705
    +v -1.133120 2.489060 0.235586
    +v -1.133120 2.489060 0.235586
    +v -1.066640 2.489060 0.453828
    +v -0.926824 2.521290 0.394340
    +v -0.984594 2.521290 0.204705
    +v -1.004690 2.521290 0.000000
    +v -1.156250 2.489060 0.000000
    +v -1.156250 2.489060 0.000000
    +v -1.133120 2.489060 0.235586
    +v -0.984594 2.521290 0.204705
    +v 0.000000 2.489060 1.156250
    +v -0.235586 2.489060 1.133120
    +v -0.256916 2.449800 1.235720
    +v -0.256916 2.449800 1.235720
    +v 0.000000 2.449800 1.260940
    +v 0.000000 2.489060 1.156250
    +v -0.235586 2.489060 1.133120
    +v -0.453828 2.489060 1.066640
    +v -0.494918 2.449800 1.163210
    +v -0.494918 2.449800 1.163210
    +v -0.256916 2.449800 1.235720
    +v -0.235586 2.489060 1.133120
    +v -0.453828 2.489060 1.066640
    +v -0.650391 2.489060 0.961133
    +v -0.709277 2.449800 1.048150
    +v -0.709277 2.449800 1.048150
    +v -0.494918 2.449800 1.163210
    +v -0.453828 2.489060 1.066640
    +v -0.650391 2.489060 0.961133
    +v -0.820937 2.489060 0.820937
    +v -0.895266 2.449800 0.895266
    +v -0.895266 2.449800 0.895266
    +v -0.709277 2.449800 1.048150
    +v -0.650391 2.489060 0.961133
    +v -0.820937 2.489060 0.820937
    +v -0.961133 2.489060 0.650391
    +v -1.048150 2.449800 0.709277
    +v -1.048150 2.449800 0.709277
    +v -0.895266 2.449800 0.895266
    +v -0.820937 2.489060 0.820937
    +v -0.961133 2.489060 0.650391
    +v -1.066640 2.489060 0.453828
    +v -1.163210 2.449800 0.494918
    +v -1.163210 2.449800 0.494918
    +v -1.048150 2.449800 0.709277
    +v -0.961133 2.489060 0.650391
    +v -1.066640 2.489060 0.453828
    +v -1.133120 2.489060 0.235586
    +v -1.235720 2.449800 0.256916
    +v -1.235720 2.449800 0.256916
    +v -1.163210 2.449800 0.494918
    +v -1.066640 2.489060 0.453828
    +v -1.133120 2.489060 0.235586
    +v -1.156250 2.489060 0.000000
    +v -1.260940 2.449800 0.000000
    +v -1.260940 2.449800 0.000000
    +v -1.235720 2.449800 0.256916
    +v -1.133120 2.489060 0.235586
    +v 0.000000 2.449800 1.260940
    +v -0.256916 2.449800 1.235720
    +v -0.264875 2.400000 1.274000
    +v -0.264875 2.400000 1.274000
    +v 0.000000 2.400000 1.300000
    +v 0.000000 2.449800 1.260940
    +v -0.256916 2.449800 1.235720
    +v -0.494918 2.449800 1.163210
    +v -0.510250 2.400000 1.199250
    +v -0.510250 2.400000 1.199250
    +v -0.264875 2.400000 1.274000
    +v -0.256916 2.449800 1.235720
    +v -0.494918 2.449800 1.163210
    +v -0.709277 2.449800 1.048150
    +v -0.731250 2.400000 1.080620
    +v -0.731250 2.400000 1.080620
    +v -0.510250 2.400000 1.199250
    +v -0.494918 2.449800 1.163210
    +v -0.709277 2.449800 1.048150
    +v -0.895266 2.449800 0.895266
    +v -0.923000 2.400000 0.923000
    +v -0.923000 2.400000 0.923000
    +v -0.731250 2.400000 1.080620
    +v -0.709277 2.449800 1.048150
    +v -0.895266 2.449800 0.895266
    +v -1.048150 2.449800 0.709277
    +v -1.080620 2.400000 0.731250
    +v -1.080620 2.400000 0.731250
    +v -0.923000 2.400000 0.923000
    +v -0.895266 2.449800 0.895266
    +v -1.048150 2.449800 0.709277
    +v -1.163210 2.449800 0.494918
    +v -1.199250 2.400000 0.510250
    +v -1.199250 2.400000 0.510250
    +v -1.080620 2.400000 0.731250
    +v -1.048150 2.449800 0.709277
    +v -1.163210 2.449800 0.494918
    +v -1.235720 2.449800 0.256916
    +v -1.274000 2.400000 0.264875
    +v -1.274000 2.400000 0.264875
    +v -1.199250 2.400000 0.510250
    +v -1.163210 2.449800 0.494918
    +v -1.235720 2.449800 0.256916
    +v -1.260940 2.449800 0.000000
    +v -1.300000 2.400000 0.000000
    +v -1.300000 2.400000 0.000000
    +v -1.274000 2.400000 0.264875
    +v -1.235720 2.449800 0.256916
    +v -0.200000 2.700000 0.000000
    +v -0.196000 2.700000 -0.040750
    +v -0.298594 2.650200 -0.062080
    +v -0.298594 2.650200 -0.062080
    +v -0.304688 2.650200 0.000000
    +v -0.200000 2.700000 0.000000
    +v -0.196000 2.700000 -0.040750
    +v -0.184500 2.700000 -0.078500
    +v -0.281074 2.650200 -0.119590
    +v -0.281074 2.650200 -0.119590
    +v -0.298594 2.650200 -0.062080
    +v -0.196000 2.700000 -0.040750
    +v -0.184500 2.700000 -0.078500
    +v -0.166250 2.700000 -0.112500
    +v -0.253271 2.650200 -0.171387
    +v -0.253271 2.650200 -0.171387
    +v -0.281074 2.650200 -0.119590
    +v -0.184500 2.700000 -0.078500
    +v -0.166250 2.700000 -0.112500
    +v -0.142000 2.700000 -0.142000
    +v -0.216328 2.650200 -0.216328
    +v -0.216328 2.650200 -0.216328
    +v -0.253271 2.650200 -0.171387
    +v -0.166250 2.700000 -0.112500
    +v -0.142000 2.700000 -0.142000
    +v -0.112500 2.700000 -0.166250
    +v -0.171387 2.650200 -0.253271
    +v -0.171387 2.650200 -0.253271
    +v -0.216328 2.650200 -0.216328
    +v -0.142000 2.700000 -0.142000
    +v -0.112500 2.700000 -0.166250
    +v -0.078500 2.700000 -0.184500
    +v -0.119590 2.650200 -0.281074
    +v -0.119590 2.650200 -0.281074
    +v -0.171387 2.650200 -0.253271
    +v -0.112500 2.700000 -0.166250
    +v -0.078500 2.700000 -0.184500
    +v -0.040750 2.700000 -0.196000
    +v -0.062080 2.650200 -0.298594
    +v -0.062080 2.650200 -0.298594
    +v -0.119590 2.650200 -0.281074
    +v -0.078500 2.700000 -0.184500
    +v -0.040750 2.700000 -0.196000
    +v -0.000000 2.700000 -0.200000
    +v 0.000000 2.650200 -0.304688
    +v 0.000000 2.650200 -0.304688
    +v -0.062080 2.650200 -0.298594
    +v -0.040750 2.700000 -0.196000
    +v -0.304688 2.650200 0.000000
    +v -0.298594 2.650200 -0.062080
    +v -0.447125 2.610940 -0.092961
    +v -0.447125 2.610940 -0.092961
    +v -0.456250 2.610940 0.000000
    +v -0.304688 2.650200 0.000000
    +v -0.298594 2.650200 -0.062080
    +v -0.281074 2.650200 -0.119590
    +v -0.420891 2.610940 -0.179078
    +v -0.420891 2.610940 -0.179078
    +v -0.447125 2.610940 -0.092961
    +v -0.298594 2.650200 -0.062080
    +v -0.281074 2.650200 -0.119590
    +v -0.253271 2.650200 -0.171387
    +v -0.379258 2.610940 -0.256641
    +v -0.379258 2.610940 -0.256641
    +v -0.420891 2.610940 -0.179078
    +v -0.281074 2.650200 -0.119590
    +v -0.253271 2.650200 -0.171387
    +v -0.216328 2.650200 -0.216328
    +v -0.323938 2.610940 -0.323937
    +v -0.323938 2.610940 -0.323937
    +v -0.379258 2.610940 -0.256641
    +v -0.253271 2.650200 -0.171387
    +v -0.216328 2.650200 -0.216328
    +v -0.171387 2.650200 -0.253271
    +v -0.256641 2.610940 -0.379258
    +v -0.256641 2.610940 -0.379258
    +v -0.323938 2.610940 -0.323937
    +v -0.216328 2.650200 -0.216328
    +v -0.171387 2.650200 -0.253271
    +v -0.119590 2.650200 -0.281074
    +v -0.179078 2.610940 -0.420891
    +v -0.179078 2.610940 -0.420891
    +v -0.256641 2.610940 -0.379258
    +v -0.171387 2.650200 -0.253271
    +v -0.119590 2.650200 -0.281074
    +v -0.062080 2.650200 -0.298594
    +v -0.092961 2.610940 -0.447125
    +v -0.092961 2.610940 -0.447125
    +v -0.179078 2.610940 -0.420891
    +v -0.119590 2.650200 -0.281074
    +v -0.062080 2.650200 -0.298594
    +v 0.000000 2.650200 -0.304688
    +v -0.000000 2.610940 -0.456250
    +v -0.000000 2.610940 -0.456250
    +v -0.092961 2.610940 -0.447125
    +v -0.062080 2.650200 -0.298594
    +v -0.456250 2.610940 0.000000
    +v -0.447125 2.610940 -0.092961
    +v -0.623219 2.578710 -0.129572
    +v -0.623219 2.578710 -0.129572
    +v -0.635938 2.578710 0.000000
    +v -0.456250 2.610940 0.000000
    +v -0.447125 2.610940 -0.092961
    +v -0.420891 2.610940 -0.179078
    +v -0.586652 2.578710 -0.249605
    +v -0.586652 2.578710 -0.249605
    +v -0.623219 2.578710 -0.129572
    +v -0.447125 2.610940 -0.092961
    +v -0.420891 2.610940 -0.179078
    +v -0.379258 2.610940 -0.256641
    +v -0.528623 2.578710 -0.357715
    +v -0.528623 2.578710 -0.357715
    +v -0.586652 2.578710 -0.249605
    +v -0.420891 2.610940 -0.179078
    +v -0.379258 2.610940 -0.256641
    +v -0.323938 2.610940 -0.323937
    +v -0.451516 2.578710 -0.451516
    +v -0.451516 2.578710 -0.451516
    +v -0.528623 2.578710 -0.357715
    +v -0.379258 2.610940 -0.256641
    +v -0.323938 2.610940 -0.323937
    +v -0.256641 2.610940 -0.379258
    +v -0.357715 2.578710 -0.528623
    +v -0.357715 2.578710 -0.528623
    +v -0.451516 2.578710 -0.451516
    +v -0.323938 2.610940 -0.323937
    +v -0.256641 2.610940 -0.379258
    +v -0.179078 2.610940 -0.420891
    +v -0.249605 2.578710 -0.586652
    +v -0.249605 2.578710 -0.586652
    +v -0.357715 2.578710 -0.528623
    +v -0.256641 2.610940 -0.379258
    +v -0.179078 2.610940 -0.420891
    +v -0.092961 2.610940 -0.447125
    +v -0.129572 2.578710 -0.623219
    +v -0.129572 2.578710 -0.623219
    +v -0.249605 2.578710 -0.586652
    +v -0.179078 2.610940 -0.420891
    +v -0.092961 2.610940 -0.447125
    +v -0.000000 2.610940 -0.456250
    +v 0.000000 2.578710 -0.635938
    +v 0.000000 2.578710 -0.635938
    +v -0.129572 2.578710 -0.623219
    +v -0.092961 2.610940 -0.447125
    +v -0.635938 2.578710 0.000000
    +v -0.623219 2.578710 -0.129572
    +v -0.808500 2.550000 -0.168094
    +v -0.808500 2.550000 -0.168094
    +v -0.825000 2.550000 0.000000
    +v -0.635938 2.578710 0.000000
    +v -0.623219 2.578710 -0.129572
    +v -0.586652 2.578710 -0.249605
    +v -0.761063 2.550000 -0.323813
    +v -0.761063 2.550000 -0.323813
    +v -0.808500 2.550000 -0.168094
    +v -0.623219 2.578710 -0.129572
    +v -0.586652 2.578710 -0.249605
    +v -0.528623 2.578710 -0.357715
    +v -0.685781 2.550000 -0.464062
    +v -0.685781 2.550000 -0.464062
    +v -0.761063 2.550000 -0.323813
    +v -0.586652 2.578710 -0.249605
    +v -0.528623 2.578710 -0.357715
    +v -0.451516 2.578710 -0.451516
    +v -0.585750 2.550000 -0.585750
    +v -0.585750 2.550000 -0.585750
    +v -0.685781 2.550000 -0.464062
    +v -0.528623 2.578710 -0.357715
    +v -0.451516 2.578710 -0.451516
    +v -0.357715 2.578710 -0.528623
    +v -0.464063 2.550000 -0.685781
    +v -0.464063 2.550000 -0.685781
    +v -0.585750 2.550000 -0.585750
    +v -0.451516 2.578710 -0.451516
    +v -0.357715 2.578710 -0.528623
    +v -0.249605 2.578710 -0.586652
    +v -0.323813 2.550000 -0.761062
    +v -0.323813 2.550000 -0.761062
    +v -0.464063 2.550000 -0.685781
    +v -0.357715 2.578710 -0.528623
    +v -0.249605 2.578710 -0.586652
    +v -0.129572 2.578710 -0.623219
    +v -0.168094 2.550000 -0.808500
    +v -0.168094 2.550000 -0.808500
    +v -0.323813 2.550000 -0.761062
    +v -0.249605 2.578710 -0.586652
    +v -0.129572 2.578710 -0.623219
    +v 0.000000 2.578710 -0.635938
    +v 0.000000 2.550000 -0.825000
    +v 0.000000 2.550000 -0.825000
    +v -0.168094 2.550000 -0.808500
    +v -0.129572 2.578710 -0.623219
    +v -0.825000 2.550000 0.000000
    +v -0.808500 2.550000 -0.168094
    +v -0.984594 2.521290 -0.204705
    +v -0.984594 2.521290 -0.204705
    +v -1.004690 2.521290 0.000000
    +v -0.825000 2.550000 0.000000
    +v -0.808500 2.550000 -0.168094
    +v -0.761063 2.550000 -0.323813
    +v -0.926824 2.521290 -0.394340
    +v -0.926824 2.521290 -0.394340
    +v -0.984594 2.521290 -0.204705
    +v -0.808500 2.550000 -0.168094
    +v -0.761063 2.550000 -0.323813
    +v -0.685781 2.550000 -0.464062
    +v -0.835146 2.521290 -0.565137
    +v -0.835146 2.521290 -0.565137
    +v -0.926824 2.521290 -0.394340
    +v -0.761063 2.550000 -0.323813
    +v -0.685781 2.550000 -0.464062
    +v -0.585750 2.550000 -0.585750
    +v -0.713328 2.521290 -0.713328
    +v -0.713328 2.521290 -0.713328
    +v -0.835146 2.521290 -0.565137
    +v -0.685781 2.550000 -0.464062
    +v -0.585750 2.550000 -0.585750
    +v -0.464063 2.550000 -0.685781
    +v -0.565137 2.521290 -0.835146
    +v -0.565137 2.521290 -0.835146
    +v -0.713328 2.521290 -0.713328
    +v -0.585750 2.550000 -0.585750
    +v -0.464063 2.550000 -0.685781
    +v -0.323813 2.550000 -0.761062
    +v -0.394340 2.521290 -0.926824
    +v -0.394340 2.521290 -0.926824
    +v -0.565137 2.521290 -0.835146
    +v -0.464063 2.550000 -0.685781
    +v -0.323813 2.550000 -0.761062
    +v -0.168094 2.550000 -0.808500
    +v -0.204705 2.521290 -0.984594
    +v -0.204705 2.521290 -0.984594
    +v -0.394340 2.521290 -0.926824
    +v -0.323813 2.550000 -0.761062
    +v -0.168094 2.550000 -0.808500
    +v 0.000000 2.550000 -0.825000
    +v -0.000000 2.521290 -1.004690
    +v -0.000000 2.521290 -1.004690
    +v -0.204705 2.521290 -0.984594
    +v -0.168094 2.550000 -0.808500
    +v -1.004690 2.521290 0.000000
    +v -0.984594 2.521290 -0.204705
    +v -1.133120 2.489060 -0.235586
    +v -1.133120 2.489060 -0.235586
    +v -1.156250 2.489060 0.000000
    +v -1.004690 2.521290 0.000000
    +v -0.984594 2.521290 -0.204705
    +v -0.926824 2.521290 -0.394340
    +v -1.066640 2.489060 -0.453828
    +v -1.066640 2.489060 -0.453828
    +v -1.133120 2.489060 -0.235586
    +v -0.984594 2.521290 -0.204705
    +v -0.926824 2.521290 -0.394340
    +v -0.835146 2.521290 -0.565137
    +v -0.961133 2.489060 -0.650391
    +v -0.961133 2.489060 -0.650391
    +v -1.066640 2.489060 -0.453828
    +v -0.926824 2.521290 -0.394340
    +v -0.835146 2.521290 -0.565137
    +v -0.713328 2.521290 -0.713328
    +v -0.820937 2.489060 -0.820937
    +v -0.820937 2.489060 -0.820937
    +v -0.961133 2.489060 -0.650391
    +v -0.835146 2.521290 -0.565137
    +v -0.713328 2.521290 -0.713328
    +v -0.565137 2.521290 -0.835146
    +v -0.650391 2.489060 -0.961133
    +v -0.650391 2.489060 -0.961133
    +v -0.820937 2.489060 -0.820937
    +v -0.713328 2.521290 -0.713328
    +v -0.565137 2.521290 -0.835146
    +v -0.394340 2.521290 -0.926824
    +v -0.453828 2.489060 -1.066640
    +v -0.453828 2.489060 -1.066640
    +v -0.650391 2.489060 -0.961133
    +v -0.565137 2.521290 -0.835146
    +v -0.394340 2.521290 -0.926824
    +v -0.204705 2.521290 -0.984594
    +v -0.235586 2.489060 -1.133120
    +v -0.235586 2.489060 -1.133120
    +v -0.453828 2.489060 -1.066640
    +v -0.394340 2.521290 -0.926824
    +v -0.204705 2.521290 -0.984594
    +v -0.000000 2.521290 -1.004690
    +v 0.000000 2.489060 -1.156250
    +v 0.000000 2.489060 -1.156250
    +v -0.235586 2.489060 -1.133120
    +v -0.204705 2.521290 -0.984594
    +v -1.156250 2.489060 0.000000
    +v -1.133120 2.489060 -0.235586
    +v -1.235720 2.449800 -0.256916
    +v -1.235720 2.449800 -0.256916
    +v -1.260940 2.449800 0.000000
    +v -1.156250 2.489060 0.000000
    +v -1.133120 2.489060 -0.235586
    +v -1.066640 2.489060 -0.453828
    +v -1.163210 2.449800 -0.494918
    +v -1.163210 2.449800 -0.494918
    +v -1.235720 2.449800 -0.256916
    +v -1.133120 2.489060 -0.235586
    +v -1.066640 2.489060 -0.453828
    +v -0.961133 2.489060 -0.650391
    +v -1.048150 2.449800 -0.709277
    +v -1.048150 2.449800 -0.709277
    +v -1.163210 2.449800 -0.494918
    +v -1.066640 2.489060 -0.453828
    +v -0.961133 2.489060 -0.650391
    +v -0.820937 2.489060 -0.820937
    +v -0.895266 2.449800 -0.895266
    +v -0.895266 2.449800 -0.895266
    +v -1.048150 2.449800 -0.709277
    +v -0.961133 2.489060 -0.650391
    +v -0.820937 2.489060 -0.820937
    +v -0.650391 2.489060 -0.961133
    +v -0.709277 2.449800 -1.048150
    +v -0.709277 2.449800 -1.048150
    +v -0.895266 2.449800 -0.895266
    +v -0.820937 2.489060 -0.820937
    +v -0.650391 2.489060 -0.961133
    +v -0.453828 2.489060 -1.066640
    +v -0.494918 2.449800 -1.163210
    +v -0.494918 2.449800 -1.163210
    +v -0.709277 2.449800 -1.048150
    +v -0.650391 2.489060 -0.961133
    +v -0.453828 2.489060 -1.066640
    +v -0.235586 2.489060 -1.133120
    +v -0.256916 2.449800 -1.235720
    +v -0.256916 2.449800 -1.235720
    +v -0.494918 2.449800 -1.163210
    +v -0.453828 2.489060 -1.066640
    +v -0.235586 2.489060 -1.133120
    +v 0.000000 2.489060 -1.156250
    +v -0.000000 2.449800 -1.260940
    +v -0.000000 2.449800 -1.260940
    +v -0.256916 2.449800 -1.235720
    +v -0.235586 2.489060 -1.133120
    +v -1.260940 2.449800 0.000000
    +v -1.235720 2.449800 -0.256916
    +v -1.274000 2.400000 -0.264875
    +v -1.274000 2.400000 -0.264875
    +v -1.300000 2.400000 0.000000
    +v -1.260940 2.449800 0.000000
    +v -1.235720 2.449800 -0.256916
    +v -1.163210 2.449800 -0.494918
    +v -1.199250 2.400000 -0.510250
    +v -1.199250 2.400000 -0.510250
    +v -1.274000 2.400000 -0.264875
    +v -1.235720 2.449800 -0.256916
    +v -1.163210 2.449800 -0.494918
    +v -1.048150 2.449800 -0.709277
    +v -1.080620 2.400000 -0.731250
    +v -1.080620 2.400000 -0.731250
    +v -1.199250 2.400000 -0.510250
    +v -1.163210 2.449800 -0.494918
    +v -1.048150 2.449800 -0.709277
    +v -0.895266 2.449800 -0.895266
    +v -0.923000 2.400000 -0.923000
    +v -0.923000 2.400000 -0.923000
    +v -1.080620 2.400000 -0.731250
    +v -1.048150 2.449800 -0.709277
    +v -0.895266 2.449800 -0.895266
    +v -0.709277 2.449800 -1.048150
    +v -0.731250 2.400000 -1.080620
    +v -0.731250 2.400000 -1.080620
    +v -0.923000 2.400000 -0.923000
    +v -0.895266 2.449800 -0.895266
    +v -0.709277 2.449800 -1.048150
    +v -0.494918 2.449800 -1.163210
    +v -0.510250 2.400000 -1.199250
    +v -0.510250 2.400000 -1.199250
    +v -0.731250 2.400000 -1.080620
    +v -0.709277 2.449800 -1.048150
    +v -0.494918 2.449800 -1.163210
    +v -0.256916 2.449800 -1.235720
    +v -0.264875 2.400000 -1.274000
    +v -0.264875 2.400000 -1.274000
    +v -0.510250 2.400000 -1.199250
    +v -0.494918 2.449800 -1.163210
    +v -0.256916 2.449800 -1.235720
    +v -0.000000 2.449800 -1.260940
    +v -0.000000 2.400000 -1.300000
    +v -0.000000 2.400000 -1.300000
    +v -0.264875 2.400000 -1.274000
    +v -0.256916 2.449800 -1.235720
    +v 0.000000 2.700000 -0.200000
    +v 0.040750 2.700000 -0.196000
    +v 0.062080 2.650200 -0.298594
    +v 0.062080 2.650200 -0.298594
    +v 0.000000 2.650200 -0.304688
    +v 0.000000 2.700000 -0.200000
    +v 0.040750 2.700000 -0.196000
    +v 0.078500 2.700000 -0.184500
    +v 0.119590 2.650200 -0.281074
    +v 0.119590 2.650200 -0.281074
    +v 0.062080 2.650200 -0.298594
    +v 0.040750 2.700000 -0.196000
    +v 0.078500 2.700000 -0.184500
    +v 0.112500 2.700000 -0.166250
    +v 0.171387 2.650200 -0.253271
    +v 0.171387 2.650200 -0.253271
    +v 0.119590 2.650200 -0.281074
    +v 0.078500 2.700000 -0.184500
    +v 0.112500 2.700000 -0.166250
    +v 0.142000 2.700000 -0.142000
    +v 0.216328 2.650200 -0.216328
    +v 0.216328 2.650200 -0.216328
    +v 0.171387 2.650200 -0.253271
    +v 0.112500 2.700000 -0.166250
    +v 0.142000 2.700000 -0.142000
    +v 0.166250 2.700000 -0.112500
    +v 0.253271 2.650200 -0.171387
    +v 0.253271 2.650200 -0.171387
    +v 0.216328 2.650200 -0.216328
    +v 0.142000 2.700000 -0.142000
    +v 0.166250 2.700000 -0.112500
    +v 0.184500 2.700000 -0.078500
    +v 0.281074 2.650200 -0.119590
    +v 0.281074 2.650200 -0.119590
    +v 0.253271 2.650200 -0.171387
    +v 0.166250 2.700000 -0.112500
    +v 0.184500 2.700000 -0.078500
    +v 0.196000 2.700000 -0.040750
    +v 0.298594 2.650200 -0.062080
    +v 0.298594 2.650200 -0.062080
    +v 0.281074 2.650200 -0.119590
    +v 0.184500 2.700000 -0.078500
    +v 0.196000 2.700000 -0.040750
    +v 0.200000 2.700000 0.000000
    +v 0.304688 2.650200 0.000000
    +v 0.304688 2.650200 0.000000
    +v 0.298594 2.650200 -0.062080
    +v 0.196000 2.700000 -0.040750
    +v 0.000000 2.650200 -0.304688
    +v 0.062080 2.650200 -0.298594
    +v 0.092961 2.610940 -0.447125
    +v 0.092961 2.610940 -0.447125
    +v 0.000000 2.610940 -0.456250
    +v 0.000000 2.650200 -0.304688
    +v 0.062080 2.650200 -0.298594
    +v 0.119590 2.650200 -0.281074
    +v 0.179078 2.610940 -0.420891
    +v 0.179078 2.610940 -0.420891
    +v 0.092961 2.610940 -0.447125
    +v 0.062080 2.650200 -0.298594
    +v 0.119590 2.650200 -0.281074
    +v 0.171387 2.650200 -0.253271
    +v 0.256641 2.610940 -0.379258
    +v 0.256641 2.610940 -0.379258
    +v 0.179078 2.610940 -0.420891
    +v 0.119590 2.650200 -0.281074
    +v 0.171387 2.650200 -0.253271
    +v 0.216328 2.650200 -0.216328
    +v 0.323937 2.610940 -0.323938
    +v 0.323937 2.610940 -0.323938
    +v 0.256641 2.610940 -0.379258
    +v 0.171387 2.650200 -0.253271
    +v 0.216328 2.650200 -0.216328
    +v 0.253271 2.650200 -0.171387
    +v 0.379258 2.610940 -0.256641
    +v 0.379258 2.610940 -0.256641
    +v 0.323937 2.610940 -0.323938
    +v 0.216328 2.650200 -0.216328
    +v 0.253271 2.650200 -0.171387
    +v 0.281074 2.650200 -0.119590
    +v 0.420891 2.610940 -0.179078
    +v 0.420891 2.610940 -0.179078
    +v 0.379258 2.610940 -0.256641
    +v 0.253271 2.650200 -0.171387
    +v 0.281074 2.650200 -0.119590
    +v 0.298594 2.650200 -0.062080
    +v 0.447125 2.610940 -0.092961
    +v 0.447125 2.610940 -0.092961
    +v 0.420891 2.610940 -0.179078
    +v 0.281074 2.650200 -0.119590
    +v 0.298594 2.650200 -0.062080
    +v 0.304688 2.650200 0.000000
    +v 0.456250 2.610940 0.000000
    +v 0.456250 2.610940 0.000000
    +v 0.447125 2.610940 -0.092961
    +v 0.298594 2.650200 -0.062080
    +v 0.000000 2.610940 -0.456250
    +v 0.092961 2.610940 -0.447125
    +v 0.129572 2.578710 -0.623219
    +v 0.129572 2.578710 -0.623219
    +v 0.000000 2.578710 -0.635938
    +v 0.000000 2.610940 -0.456250
    +v 0.092961 2.610940 -0.447125
    +v 0.179078 2.610940 -0.420891
    +v 0.249605 2.578710 -0.586652
    +v 0.249605 2.578710 -0.586652
    +v 0.129572 2.578710 -0.623219
    +v 0.092961 2.610940 -0.447125
    +v 0.179078 2.610940 -0.420891
    +v 0.256641 2.610940 -0.379258
    +v 0.357715 2.578710 -0.528623
    +v 0.357715 2.578710 -0.528623
    +v 0.249605 2.578710 -0.586652
    +v 0.179078 2.610940 -0.420891
    +v 0.256641 2.610940 -0.379258
    +v 0.323937 2.610940 -0.323938
    +v 0.451516 2.578710 -0.451516
    +v 0.451516 2.578710 -0.451516
    +v 0.357715 2.578710 -0.528623
    +v 0.256641 2.610940 -0.379258
    +v 0.323937 2.610940 -0.323938
    +v 0.379258 2.610940 -0.256641
    +v 0.528623 2.578710 -0.357715
    +v 0.528623 2.578710 -0.357715
    +v 0.451516 2.578710 -0.451516
    +v 0.323937 2.610940 -0.323938
    +v 0.379258 2.610940 -0.256641
    +v 0.420891 2.610940 -0.179078
    +v 0.586652 2.578710 -0.249605
    +v 0.586652 2.578710 -0.249605
    +v 0.528623 2.578710 -0.357715
    +v 0.379258 2.610940 -0.256641
    +v 0.420891 2.610940 -0.179078
    +v 0.447125 2.610940 -0.092961
    +v 0.623219 2.578710 -0.129572
    +v 0.623219 2.578710 -0.129572
    +v 0.586652 2.578710 -0.249605
    +v 0.420891 2.610940 -0.179078
    +v 0.447125 2.610940 -0.092961
    +v 0.456250 2.610940 0.000000
    +v 0.635938 2.578710 0.000000
    +v 0.635938 2.578710 0.000000
    +v 0.623219 2.578710 -0.129572
    +v 0.447125 2.610940 -0.092961
    +v 0.000000 2.578710 -0.635938
    +v 0.129572 2.578710 -0.623219
    +v 0.168094 2.550000 -0.808500
    +v 0.168094 2.550000 -0.808500
    +v 0.000000 2.550000 -0.825000
    +v 0.000000 2.578710 -0.635938
    +v 0.129572 2.578710 -0.623219
    +v 0.249605 2.578710 -0.586652
    +v 0.323813 2.550000 -0.761063
    +v 0.323813 2.550000 -0.761063
    +v 0.168094 2.550000 -0.808500
    +v 0.129572 2.578710 -0.623219
    +v 0.249605 2.578710 -0.586652
    +v 0.357715 2.578710 -0.528623
    +v 0.464062 2.550000 -0.685781
    +v 0.464062 2.550000 -0.685781
    +v 0.323813 2.550000 -0.761063
    +v 0.249605 2.578710 -0.586652
    +v 0.357715 2.578710 -0.528623
    +v 0.451516 2.578710 -0.451516
    +v 0.585750 2.550000 -0.585750
    +v 0.585750 2.550000 -0.585750
    +v 0.464062 2.550000 -0.685781
    +v 0.357715 2.578710 -0.528623
    +v 0.451516 2.578710 -0.451516
    +v 0.528623 2.578710 -0.357715
    +v 0.685781 2.550000 -0.464063
    +v 0.685781 2.550000 -0.464063
    +v 0.585750 2.550000 -0.585750
    +v 0.451516 2.578710 -0.451516
    +v 0.528623 2.578710 -0.357715
    +v 0.586652 2.578710 -0.249605
    +v 0.761062 2.550000 -0.323813
    +v 0.761062 2.550000 -0.323813
    +v 0.685781 2.550000 -0.464063
    +v 0.528623 2.578710 -0.357715
    +v 0.586652 2.578710 -0.249605
    +v 0.623219 2.578710 -0.129572
    +v 0.808500 2.550000 -0.168094
    +v 0.808500 2.550000 -0.168094
    +v 0.761062 2.550000 -0.323813
    +v 0.586652 2.578710 -0.249605
    +v 0.623219 2.578710 -0.129572
    +v 0.635938 2.578710 0.000000
    +v 0.825000 2.550000 0.000000
    +v 0.825000 2.550000 0.000000
    +v 0.808500 2.550000 -0.168094
    +v 0.623219 2.578710 -0.129572
    +v 0.000000 2.550000 -0.825000
    +v 0.168094 2.550000 -0.808500
    +v 0.204705 2.521290 -0.984594
    +v 0.204705 2.521290 -0.984594
    +v 0.000000 2.521290 -1.004690
    +v 0.000000 2.550000 -0.825000
    +v 0.168094 2.550000 -0.808500
    +v 0.323813 2.550000 -0.761063
    +v 0.394340 2.521290 -0.926824
    +v 0.394340 2.521290 -0.926824
    +v 0.204705 2.521290 -0.984594
    +v 0.168094 2.550000 -0.808500
    +v 0.323813 2.550000 -0.761063
    +v 0.464062 2.550000 -0.685781
    +v 0.565137 2.521290 -0.835146
    +v 0.565137 2.521290 -0.835146
    +v 0.394340 2.521290 -0.926824
    +v 0.323813 2.550000 -0.761063
    +v 0.464062 2.550000 -0.685781
    +v 0.585750 2.550000 -0.585750
    +v 0.713328 2.521290 -0.713328
    +v 0.713328 2.521290 -0.713328
    +v 0.565137 2.521290 -0.835146
    +v 0.464062 2.550000 -0.685781
    +v 0.585750 2.550000 -0.585750
    +v 0.685781 2.550000 -0.464063
    +v 0.835146 2.521290 -0.565137
    +v 0.835146 2.521290 -0.565137
    +v 0.713328 2.521290 -0.713328
    +v 0.585750 2.550000 -0.585750
    +v 0.685781 2.550000 -0.464063
    +v 0.761062 2.550000 -0.323813
    +v 0.926824 2.521290 -0.394340
    +v 0.926824 2.521290 -0.394340
    +v 0.835146 2.521290 -0.565137
    +v 0.685781 2.550000 -0.464063
    +v 0.761062 2.550000 -0.323813
    +v 0.808500 2.550000 -0.168094
    +v 0.984594 2.521290 -0.204705
    +v 0.984594 2.521290 -0.204705
    +v 0.926824 2.521290 -0.394340
    +v 0.761062 2.550000 -0.323813
    +v 0.808500 2.550000 -0.168094
    +v 0.825000 2.550000 0.000000
    +v 1.004690 2.521290 0.000000
    +v 1.004690 2.521290 0.000000
    +v 0.984594 2.521290 -0.204705
    +v 0.808500 2.550000 -0.168094
    +v 0.000000 2.521290 -1.004690
    +v 0.204705 2.521290 -0.984594
    +v 0.235586 2.489060 -1.133120
    +v 0.235586 2.489060 -1.133120
    +v 0.000000 2.489060 -1.156250
    +v 0.000000 2.521290 -1.004690
    +v 0.204705 2.521290 -0.984594
    +v 0.394340 2.521290 -0.926824
    +v 0.453828 2.489060 -1.066640
    +v 0.453828 2.489060 -1.066640
    +v 0.235586 2.489060 -1.133120
    +v 0.204705 2.521290 -0.984594
    +v 0.394340 2.521290 -0.926824
    +v 0.565137 2.521290 -0.835146
    +v 0.650391 2.489060 -0.961133
    +v 0.650391 2.489060 -0.961133
    +v 0.453828 2.489060 -1.066640
    +v 0.394340 2.521290 -0.926824
    +v 0.565137 2.521290 -0.835146
    +v 0.713328 2.521290 -0.713328
    +v 0.820937 2.489060 -0.820937
    +v 0.820937 2.489060 -0.820937
    +v 0.650391 2.489060 -0.961133
    +v 0.565137 2.521290 -0.835146
    +v 0.713328 2.521290 -0.713328
    +v 0.835146 2.521290 -0.565137
    +v 0.961133 2.489060 -0.650391
    +v 0.961133 2.489060 -0.650391
    +v 0.820937 2.489060 -0.820937
    +v 0.713328 2.521290 -0.713328
    +v 0.835146 2.521290 -0.565137
    +v 0.926824 2.521290 -0.394340
    +v 1.066640 2.489060 -0.453828
    +v 1.066640 2.489060 -0.453828
    +v 0.961133 2.489060 -0.650391
    +v 0.835146 2.521290 -0.565137
    +v 0.926824 2.521290 -0.394340
    +v 0.984594 2.521290 -0.204705
    +v 1.133120 2.489060 -0.235586
    +v 1.133120 2.489060 -0.235586
    +v 1.066640 2.489060 -0.453828
    +v 0.926824 2.521290 -0.394340
    +v 0.984594 2.521290 -0.204705
    +v 1.004690 2.521290 0.000000
    +v 1.156250 2.489060 0.000000
    +v 1.156250 2.489060 0.000000
    +v 1.133120 2.489060 -0.235586
    +v 0.984594 2.521290 -0.204705
    +v 0.000000 2.489060 -1.156250
    +v 0.235586 2.489060 -1.133120
    +v 0.256916 2.449800 -1.235720
    +v 0.256916 2.449800 -1.235720
    +v 0.000000 2.449800 -1.260940
    +v 0.000000 2.489060 -1.156250
    +v 0.235586 2.489060 -1.133120
    +v 0.453828 2.489060 -1.066640
    +v 0.494918 2.449800 -1.163210
    +v 0.494918 2.449800 -1.163210
    +v 0.256916 2.449800 -1.235720
    +v 0.235586 2.489060 -1.133120
    +v 0.453828 2.489060 -1.066640
    +v 0.650391 2.489060 -0.961133
    +v 0.709277 2.449800 -1.048150
    +v 0.709277 2.449800 -1.048150
    +v 0.494918 2.449800 -1.163210
    +v 0.453828 2.489060 -1.066640
    +v 0.650391 2.489060 -0.961133
    +v 0.820937 2.489060 -0.820937
    +v 0.895266 2.449800 -0.895266
    +v 0.895266 2.449800 -0.895266
    +v 0.709277 2.449800 -1.048150
    +v 0.650391 2.489060 -0.961133
    +v 0.820937 2.489060 -0.820937
    +v 0.961133 2.489060 -0.650391
    +v 1.048150 2.449800 -0.709277
    +v 1.048150 2.449800 -0.709277
    +v 0.895266 2.449800 -0.895266
    +v 0.820937 2.489060 -0.820937
    +v 0.961133 2.489060 -0.650391
    +v 1.066640 2.489060 -0.453828
    +v 1.163210 2.449800 -0.494918
    +v 1.163210 2.449800 -0.494918
    +v 1.048150 2.449800 -0.709277
    +v 0.961133 2.489060 -0.650391
    +v 1.066640 2.489060 -0.453828
    +v 1.133120 2.489060 -0.235586
    +v 1.235720 2.449800 -0.256916
    +v 1.235720 2.449800 -0.256916
    +v 1.163210 2.449800 -0.494918
    +v 1.066640 2.489060 -0.453828
    +v 1.133120 2.489060 -0.235586
    +v 1.156250 2.489060 0.000000
    +v 1.260940 2.449800 0.000000
    +v 1.260940 2.449800 0.000000
    +v 1.235720 2.449800 -0.256916
    +v 1.133120 2.489060 -0.235586
    +v 0.000000 2.449800 -1.260940
    +v 0.256916 2.449800 -1.235720
    +v 0.264875 2.400000 -1.274000
    +v 0.264875 2.400000 -1.274000
    +v 0.000000 2.400000 -1.300000
    +v 0.000000 2.449800 -1.260940
    +v 0.256916 2.449800 -1.235720
    +v 0.494918 2.449800 -1.163210
    +v 0.510250 2.400000 -1.199250
    +v 0.510250 2.400000 -1.199250
    +v 0.264875 2.400000 -1.274000
    +v 0.256916 2.449800 -1.235720
    +v 0.494918 2.449800 -1.163210
    +v 0.709277 2.449800 -1.048150
    +v 0.731250 2.400000 -1.080620
    +v 0.731250 2.400000 -1.080620
    +v 0.510250 2.400000 -1.199250
    +v 0.494918 2.449800 -1.163210
    +v 0.709277 2.449800 -1.048150
    +v 0.895266 2.449800 -0.895266
    +v 0.923000 2.400000 -0.923000
    +v 0.923000 2.400000 -0.923000
    +v 0.731250 2.400000 -1.080620
    +v 0.709277 2.449800 -1.048150
    +v 0.895266 2.449800 -0.895266
    +v 1.048150 2.449800 -0.709277
    +v 1.080620 2.400000 -0.731250
    +v 1.080620 2.400000 -0.731250
    +v 0.923000 2.400000 -0.923000
    +v 0.895266 2.449800 -0.895266
    +v 1.048150 2.449800 -0.709277
    +v 1.163210 2.449800 -0.494918
    +v 1.199250 2.400000 -0.510250
    +v 1.199250 2.400000 -0.510250
    +v 1.080620 2.400000 -0.731250
    +v 1.048150 2.449800 -0.709277
    +v 1.163210 2.449800 -0.494918
    +v 1.235720 2.449800 -0.256916
    +v 1.274000 2.400000 -0.264875
    +v 1.274000 2.400000 -0.264875
    +v 1.199250 2.400000 -0.510250
    +v 1.163210 2.449800 -0.494918
    +v 1.235720 2.449800 -0.256916
    +v 1.260940 2.449800 0.000000
    +v 1.300000 2.400000 0.000000
    +v 1.300000 2.400000 0.000000
    +v 1.274000 2.400000 -0.264875
    +v 1.235720 2.449800 -0.256916
    +v 0.464112 0.003369 -0.096493
    +v 0.473584 0.003369 0.000000
    +v 0.000000 0.000000 0.000000
    +v 0.436881 0.003369 -0.185882
    +v 0.464112 0.003369 -0.096493
    +v 0.000000 0.000000 0.000000
    +v 0.393667 0.003369 -0.266391
    +v 0.436881 0.003369 -0.185882
    +v 0.000000 0.000000 0.000000
    +v 0.336245 0.003369 -0.336245
    +v 0.393667 0.003369 -0.266391
    +v 0.000000 0.000000 0.000000
    +v 0.266391 0.003369 -0.393667
    +v 0.336245 0.003369 -0.336245
    +v 0.000000 0.000000 0.000000
    +v 0.185882 0.003369 -0.436881
    +v 0.266391 0.003369 -0.393667
    +v 0.000000 0.000000 0.000000
    +v 0.096493 0.003369 -0.464112
    +v 0.185882 0.003369 -0.436881
    +v 0.000000 0.000000 0.000000
    +v 0.000000 0.003369 -0.473584
    +v 0.096493 0.003369 -0.464112
    +v 0.000000 0.000000 0.000000
    +v 0.473584 0.003369 0.000000
    +v 0.464112 0.003369 -0.096493
    +v 0.818836 0.012891 -0.170243
    +v 0.818836 0.012891 -0.170243
    +v 0.835547 0.012891 0.000000
    +v 0.473584 0.003369 0.000000
    +v 0.464112 0.003369 -0.096493
    +v 0.436881 0.003369 -0.185882
    +v 0.770792 0.012891 -0.327952
    +v 0.770792 0.012891 -0.327952
    +v 0.818836 0.012891 -0.170243
    +v 0.464112 0.003369 -0.096493
    +v 0.436881 0.003369 -0.185882
    +v 0.393667 0.003369 -0.266391
    +v 0.694548 0.012891 -0.469995
    +v 0.694548 0.012891 -0.469995
    +v 0.770792 0.012891 -0.327952
    +v 0.436881 0.003369 -0.185882
    +v 0.393667 0.003369 -0.266391
    +v 0.336245 0.003369 -0.336245
    +v 0.593238 0.012891 -0.593238
    +v 0.593238 0.012891 -0.593238
    +v 0.694548 0.012891 -0.469995
    +v 0.393667 0.003369 -0.266391
    +v 0.336245 0.003369 -0.336245
    +v 0.266391 0.003369 -0.393667
    +v 0.469995 0.012891 -0.694548
    +v 0.469995 0.012891 -0.694548
    +v 0.593238 0.012891 -0.593238
    +v 0.336245 0.003369 -0.336245
    +v 0.266391 0.003369 -0.393667
    +v 0.185882 0.003369 -0.436881
    +v 0.327952 0.012891 -0.770792
    +v 0.327952 0.012891 -0.770792
    +v 0.469995 0.012891 -0.694548
    +v 0.266391 0.003369 -0.393667
    +v 0.185882 0.003369 -0.436881
    +v 0.096493 0.003369 -0.464112
    +v 0.170243 0.012891 -0.818836
    +v 0.170243 0.012891 -0.818836
    +v 0.327952 0.012891 -0.770792
    +v 0.185882 0.003369 -0.436881
    +v 0.096493 0.003369 -0.464112
    +v 0.000000 0.003369 -0.473584
    +v 0.000000 0.012891 -0.835547
    +v 0.000000 0.012891 -0.835547
    +v 0.170243 0.012891 -0.818836
    +v 0.096493 0.003369 -0.464112
    +v 0.835547 0.012891 0.000000
    +v 0.818836 0.012891 -0.170243
    +v 1.078810 0.027686 -0.224294
    +v 1.078810 0.027686 -0.224294
    +v 1.100830 0.027686 0.000000
    +v 0.835547 0.012891 0.000000
    +v 0.818836 0.012891 -0.170243
    +v 0.770792 0.012891 -0.327952
    +v 1.015520 0.027686 -0.432076
    +v 1.015520 0.027686 -0.432076
    +v 1.078810 0.027686 -0.224294
    +v 0.818836 0.012891 -0.170243
    +v 0.770792 0.012891 -0.327952
    +v 0.694548 0.012891 -0.469995
    +v 0.915065 0.027686 -0.619217
    +v 0.915065 0.027686 -0.619217
    +v 1.015520 0.027686 -0.432076
    +v 0.770792 0.012891 -0.327952
    +v 0.694548 0.012891 -0.469995
    +v 0.593238 0.012891 -0.593238
    +v 0.781589 0.027686 -0.781589
    +v 0.781589 0.027686 -0.781589
    +v 0.915065 0.027686 -0.619217
    +v 0.694548 0.012891 -0.469995
    +v 0.593238 0.012891 -0.593238
    +v 0.469995 0.012891 -0.694548
    +v 0.619217 0.027686 -0.915065
    +v 0.619217 0.027686 -0.915065
    +v 0.781589 0.027686 -0.781589
    +v 0.593238 0.012891 -0.593238
    +v 0.469995 0.012891 -0.694548
    +v 0.327952 0.012891 -0.770792
    +v 0.432076 0.027686 -1.015520
    +v 0.432076 0.027686 -1.015520
    +v 0.619217 0.027686 -0.915065
    +v 0.469995 0.012891 -0.694548
    +v 0.327952 0.012891 -0.770792
    +v 0.170243 0.012891 -0.818836
    +v 0.224294 0.027686 -1.078810
    +v 0.224294 0.027686 -1.078810
    +v 0.432076 0.027686 -1.015520
    +v 0.327952 0.012891 -0.770792
    +v 0.170243 0.012891 -0.818836
    +v 0.000000 0.012891 -0.835547
    +v 0.000000 0.027686 -1.100830
    +v 0.000000 0.027686 -1.100830
    +v 0.224294 0.027686 -1.078810
    +v 0.170243 0.012891 -0.818836
    +v 1.100830 0.027686 0.000000
    +v 1.078810 0.027686 -0.224294
    +v 1.258690 0.046875 -0.261691
    +v 1.258690 0.046875 -0.261691
    +v 1.284380 0.046875 0.000000
    +v 1.100830 0.027686 0.000000
    +v 1.078810 0.027686 -0.224294
    +v 1.015520 0.027686 -0.432076
    +v 1.184840 0.046875 -0.504117
    +v 1.184840 0.046875 -0.504117
    +v 1.258690 0.046875 -0.261691
    +v 1.078810 0.027686 -0.224294
    +v 1.015520 0.027686 -0.432076
    +v 0.915065 0.027686 -0.619217
    +v 1.067640 0.046875 -0.722461
    +v 1.067640 0.046875 -0.722461
    +v 1.184840 0.046875 -0.504117
    +v 1.015520 0.027686 -0.432076
    +v 0.915065 0.027686 -0.619217
    +v 0.781589 0.027686 -0.781589
    +v 0.911906 0.046875 -0.911906
    +v 0.911906 0.046875 -0.911906
    +v 1.067640 0.046875 -0.722461
    +v 0.915065 0.027686 -0.619217
    +v 0.781589 0.027686 -0.781589
    +v 0.619217 0.027686 -0.915065
    +v 0.722461 0.046875 -1.067640
    +v 0.722461 0.046875 -1.067640
    +v 0.911906 0.046875 -0.911906
    +v 0.781589 0.027686 -0.781589
    +v 0.619217 0.027686 -0.915065
    +v 0.432076 0.027686 -1.015520
    +v 0.504117 0.046875 -1.184840
    +v 0.504117 0.046875 -1.184840
    +v 0.722461 0.046875 -1.067640
    +v 0.619217 0.027686 -0.915065
    +v 0.432076 0.027686 -1.015520
    +v 0.224294 0.027686 -1.078810
    +v 0.261691 0.046875 -1.258690
    +v 0.261691 0.046875 -1.258690
    +v 0.504117 0.046875 -1.184840
    +v 0.432076 0.027686 -1.015520
    +v 0.224294 0.027686 -1.078810
    +v 0.000000 0.027686 -1.100830
    +v 0.000000 0.046875 -1.284380
    +v 0.000000 0.046875 -1.284380
    +v 0.261691 0.046875 -1.258690
    +v 0.224294 0.027686 -1.078810
    +v 1.284380 0.046875 0.000000
    +v 1.258690 0.046875 -0.261691
    +v 1.373100 0.069580 -0.285479
    +v 1.373100 0.069580 -0.285479
    +v 1.401120 0.069580 0.000000
    +v 1.284380 0.046875 0.000000
    +v 1.258690 0.046875 -0.261691
    +v 1.184840 0.046875 -0.504117
    +v 1.292540 0.069580 -0.549941
    +v 1.292540 0.069580 -0.549941
    +v 1.373100 0.069580 -0.285479
    +v 1.258690 0.046875 -0.261691
    +v 1.184840 0.046875 -0.504117
    +v 1.067640 0.046875 -0.722461
    +v 1.164680 0.069580 -0.788132
    +v 1.164680 0.069580 -0.788132
    +v 1.292540 0.069580 -0.549941
    +v 1.184840 0.046875 -0.504117
    +v 1.067640 0.046875 -0.722461
    +v 0.911906 0.046875 -0.911906
    +v 0.994797 0.069580 -0.994797
    +v 0.994797 0.069580 -0.994797
    +v 1.164680 0.069580 -0.788132
    +v 1.067640 0.046875 -0.722461
    +v 0.911906 0.046875 -0.911906
    +v 0.722461 0.046875 -1.067640
    +v 0.788132 0.069580 -1.164680
    +v 0.788132 0.069580 -1.164680
    +v 0.994797 0.069580 -0.994797
    +v 0.911906 0.046875 -0.911906
    +v 0.722461 0.046875 -1.067640
    +v 0.504117 0.046875 -1.184840
    +v 0.549941 0.069580 -1.292540
    +v 0.549941 0.069580 -1.292540
    +v 0.788132 0.069580 -1.164680
    +v 0.722461 0.046875 -1.067640
    +v 0.504117 0.046875 -1.184840
    +v 0.261691 0.046875 -1.258690
    +v 0.285479 0.069580 -1.373100
    +v 0.285479 0.069580 -1.373100
    +v 0.549941 0.069580 -1.292540
    +v 0.504117 0.046875 -1.184840
    +v 0.261691 0.046875 -1.258690
    +v 0.000000 0.046875 -1.284380
    +v 0.000000 0.069580 -1.401120
    +v 0.000000 0.069580 -1.401120
    +v 0.285479 0.069580 -1.373100
    +v 0.261691 0.046875 -1.258690
    +v 1.401120 0.069580 0.000000
    +v 1.373100 0.069580 -0.285479
    +v 1.436700 0.094922 -0.298701
    +v 1.436700 0.094922 -0.298701
    +v 1.466020 0.094922 0.000000
    +v 1.401120 0.069580 0.000000
    +v 1.373100 0.069580 -0.285479
    +v 1.292540 0.069580 -0.549941
    +v 1.352400 0.094922 -0.575411
    +v 1.352400 0.094922 -0.575411
    +v 1.436700 0.094922 -0.298701
    +v 1.373100 0.069580 -0.285479
    +v 1.292540 0.069580 -0.549941
    +v 1.164680 0.069580 -0.788132
    +v 1.218630 0.094922 -0.824634
    +v 1.218630 0.094922 -0.824634
    +v 1.352400 0.094922 -0.575411
    +v 1.292540 0.069580 -0.549941
    +v 1.164680 0.069580 -0.788132
    +v 0.994797 0.069580 -0.994797
    +v 1.040870 0.094922 -1.040870
    +v 1.040870 0.094922 -1.040870
    +v 1.218630 0.094922 -0.824634
    +v 1.164680 0.069580 -0.788132
    +v 0.994797 0.069580 -0.994797
    +v 0.788132 0.069580 -1.164680
    +v 0.824634 0.094922 -1.218630
    +v 0.824634 0.094922 -1.218630
    +v 1.040870 0.094922 -1.040870
    +v 0.994797 0.069580 -0.994797
    +v 0.788132 0.069580 -1.164680
    +v 0.549941 0.069580 -1.292540
    +v 0.575411 0.094922 -1.352400
    +v 0.575411 0.094922 -1.352400
    +v 0.824634 0.094922 -1.218630
    +v 0.788132 0.069580 -1.164680
    +v 0.549941 0.069580 -1.292540
    +v 0.285479 0.069580 -1.373100
    +v 0.298701 0.094922 -1.436700
    +v 0.298701 0.094922 -1.436700
    +v 0.575411 0.094922 -1.352400
    +v 0.549941 0.069580 -1.292540
    +v 0.285479 0.069580 -1.373100
    +v 0.000000 0.069580 -1.401120
    +v 0.000000 0.094922 -1.466020
    +v 0.000000 0.094922 -1.466020
    +v 0.298701 0.094922 -1.436700
    +v 0.285479 0.069580 -1.373100
    +v 1.466020 0.094922 0.000000
    +v 1.436700 0.094922 -0.298701
    +v 1.464110 0.122021 -0.304401
    +v 1.464110 0.122021 -0.304401
    +v 1.493990 0.122021 0.000000
    +v 1.466020 0.094922 0.000000
    +v 1.436700 0.094922 -0.298701
    +v 1.352400 0.094922 -0.575411
    +v 1.378210 0.122021 -0.586393
    +v 1.378210 0.122021 -0.586393
    +v 1.464110 0.122021 -0.304401
    +v 1.436700 0.094922 -0.298701
    +v 1.352400 0.094922 -0.575411
    +v 1.218630 0.094922 -0.824634
    +v 1.241880 0.122021 -0.840372
    +v 1.241880 0.122021 -0.840372
    +v 1.378210 0.122021 -0.586393
    +v 1.352400 0.094922 -0.575411
    +v 1.218630 0.094922 -0.824634
    +v 1.040870 0.094922 -1.040870
    +v 1.060740 0.122021 -1.060740
    +v 1.060740 0.122021 -1.060740
    +v 1.241880 0.122021 -0.840372
    +v 1.218630 0.094922 -0.824634
    +v 1.040870 0.094922 -1.040870
    +v 0.824634 0.094922 -1.218630
    +v 0.840372 0.122021 -1.241880
    +v 0.840372 0.122021 -1.241880
    +v 1.060740 0.122021 -1.060740
    +v 1.040870 0.094922 -1.040870
    +v 0.824634 0.094922 -1.218630
    +v 0.575411 0.094922 -1.352400
    +v 0.586393 0.122021 -1.378210
    +v 0.586393 0.122021 -1.378210
    +v 0.840372 0.122021 -1.241880
    +v 0.824634 0.094922 -1.218630
    +v 0.575411 0.094922 -1.352400
    +v 0.298701 0.094922 -1.436700
    +v 0.304401 0.122021 -1.464110
    +v 0.304401 0.122021 -1.464110
    +v 0.586393 0.122021 -1.378210
    +v 0.575411 0.094922 -1.352400
    +v 0.298701 0.094922 -1.436700
    +v 0.000000 0.094922 -1.466020
    +v 0.000000 0.122021 -1.493990
    +v 0.000000 0.122021 -1.493990
    +v 0.304401 0.122021 -1.464110
    +v 0.298701 0.094922 -1.436700
    +v 1.493990 0.122021 0.000000
    +v 1.464110 0.122021 -0.304401
    +v 1.470000 0.150000 -0.305625
    +v 1.470000 0.150000 -0.305625
    +v 1.500000 0.150000 0.000000
    +v 1.493990 0.122021 0.000000
    +v 1.464110 0.122021 -0.304401
    +v 1.378210 0.122021 -0.586393
    +v 1.383750 0.150000 -0.588750
    +v 1.383750 0.150000 -0.588750
    +v 1.470000 0.150000 -0.305625
    +v 1.464110 0.122021 -0.304401
    +v 1.378210 0.122021 -0.586393
    +v 1.241880 0.122021 -0.840372
    +v 1.246870 0.150000 -0.843750
    +v 1.246870 0.150000 -0.843750
    +v 1.383750 0.150000 -0.588750
    +v 1.378210 0.122021 -0.586393
    +v 1.241880 0.122021 -0.840372
    +v 1.060740 0.122021 -1.060740
    +v 1.065000 0.150000 -1.065000
    +v 1.065000 0.150000 -1.065000
    +v 1.246870 0.150000 -0.843750
    +v 1.241880 0.122021 -0.840372
    +v 1.060740 0.122021 -1.060740
    +v 0.840372 0.122021 -1.241880
    +v 0.843750 0.150000 -1.246870
    +v 0.843750 0.150000 -1.246870
    +v 1.065000 0.150000 -1.065000
    +v 1.060740 0.122021 -1.060740
    +v 0.840372 0.122021 -1.241880
    +v 0.586393 0.122021 -1.378210
    +v 0.588750 0.150000 -1.383750
    +v 0.588750 0.150000 -1.383750
    +v 0.843750 0.150000 -1.246870
    +v 0.840372 0.122021 -1.241880
    +v 0.586393 0.122021 -1.378210
    +v 0.304401 0.122021 -1.464110
    +v 0.305625 0.150000 -1.470000
    +v 0.305625 0.150000 -1.470000
    +v 0.588750 0.150000 -1.383750
    +v 0.586393 0.122021 -1.378210
    +v 0.304401 0.122021 -1.464110
    +v 0.000000 0.122021 -1.493990
    +v 0.000000 0.150000 -1.500000
    +v 0.000000 0.150000 -1.500000
    +v 0.305625 0.150000 -1.470000
    +v 0.304401 0.122021 -1.464110
    +v -0.096493 0.003369 -0.464112
    +v 0.000000 0.003369 -0.473584
    +v 0.000000 0.000000 0.000000
    +v -0.185882 0.003369 -0.436881
    +v -0.096493 0.003369 -0.464112
    +v 0.000000 0.000000 0.000000
    +v -0.266391 0.003369 -0.393667
    +v -0.185882 0.003369 -0.436881
    +v 0.000000 0.000000 0.000000
    +v -0.336245 0.003369 -0.336245
    +v -0.266391 0.003369 -0.393667
    +v 0.000000 0.000000 0.000000
    +v -0.393667 0.003369 -0.266391
    +v -0.336245 0.003369 -0.336245
    +v 0.000000 0.000000 0.000000
    +v -0.436881 0.003369 -0.185882
    +v -0.393667 0.003369 -0.266391
    +v 0.000000 0.000000 0.000000
    +v -0.464112 0.003369 -0.096493
    +v -0.436881 0.003369 -0.185882
    +v 0.000000 0.000000 0.000000
    +v -0.473584 0.003369 -0.000000
    +v -0.464112 0.003369 -0.096493
    +v 0.000000 0.000000 0.000000
    +v 0.000000 0.003369 -0.473584
    +v -0.096493 0.003369 -0.464112
    +v -0.170243 0.012891 -0.818836
    +v -0.170243 0.012891 -0.818836
    +v 0.000000 0.012891 -0.835547
    +v 0.000000 0.003369 -0.473584
    +v -0.096493 0.003369 -0.464112
    +v -0.185882 0.003369 -0.436881
    +v -0.327952 0.012891 -0.770792
    +v -0.327952 0.012891 -0.770792
    +v -0.170243 0.012891 -0.818836
    +v -0.096493 0.003369 -0.464112
    +v -0.185882 0.003369 -0.436881
    +v -0.266391 0.003369 -0.393667
    +v -0.469995 0.012891 -0.694548
    +v -0.469995 0.012891 -0.694548
    +v -0.327952 0.012891 -0.770792
    +v -0.185882 0.003369 -0.436881
    +v -0.266391 0.003369 -0.393667
    +v -0.336245 0.003369 -0.336245
    +v -0.593238 0.012891 -0.593238
    +v -0.593238 0.012891 -0.593238
    +v -0.469995 0.012891 -0.694548
    +v -0.266391 0.003369 -0.393667
    +v -0.336245 0.003369 -0.336245
    +v -0.393667 0.003369 -0.266391
    +v -0.694548 0.012891 -0.469995
    +v -0.694548 0.012891 -0.469995
    +v -0.593238 0.012891 -0.593238
    +v -0.336245 0.003369 -0.336245
    +v -0.393667 0.003369 -0.266391
    +v -0.436881 0.003369 -0.185882
    +v -0.770792 0.012891 -0.327952
    +v -0.770792 0.012891 -0.327952
    +v -0.694548 0.012891 -0.469995
    +v -0.393667 0.003369 -0.266391
    +v -0.436881 0.003369 -0.185882
    +v -0.464112 0.003369 -0.096493
    +v -0.818836 0.012891 -0.170243
    +v -0.818836 0.012891 -0.170243
    +v -0.770792 0.012891 -0.327952
    +v -0.436881 0.003369 -0.185882
    +v -0.464112 0.003369 -0.096493
    +v -0.473584 0.003369 -0.000000
    +v -0.835547 0.012891 0.000000
    +v -0.835547 0.012891 0.000000
    +v -0.818836 0.012891 -0.170243
    +v -0.464112 0.003369 -0.096493
    +v 0.000000 0.012891 -0.835547
    +v -0.170243 0.012891 -0.818836
    +v -0.224294 0.027686 -1.078810
    +v -0.224294 0.027686 -1.078810
    +v 0.000000 0.027686 -1.100830
    +v 0.000000 0.012891 -0.835547
    +v -0.170243 0.012891 -0.818836
    +v -0.327952 0.012891 -0.770792
    +v -0.432076 0.027686 -1.015520
    +v -0.432076 0.027686 -1.015520
    +v -0.224294 0.027686 -1.078810
    +v -0.170243 0.012891 -0.818836
    +v -0.327952 0.012891 -0.770792
    +v -0.469995 0.012891 -0.694548
    +v -0.619217 0.027686 -0.915065
    +v -0.619217 0.027686 -0.915065
    +v -0.432076 0.027686 -1.015520
    +v -0.327952 0.012891 -0.770792
    +v -0.469995 0.012891 -0.694548
    +v -0.593238 0.012891 -0.593238
    +v -0.781589 0.027686 -0.781589
    +v -0.781589 0.027686 -0.781589
    +v -0.619217 0.027686 -0.915065
    +v -0.469995 0.012891 -0.694548
    +v -0.593238 0.012891 -0.593238
    +v -0.694548 0.012891 -0.469995
    +v -0.915065 0.027686 -0.619217
    +v -0.915065 0.027686 -0.619217
    +v -0.781589 0.027686 -0.781589
    +v -0.593238 0.012891 -0.593238
    +v -0.694548 0.012891 -0.469995
    +v -0.770792 0.012891 -0.327952
    +v -1.015520 0.027686 -0.432076
    +v -1.015520 0.027686 -0.432076
    +v -0.915065 0.027686 -0.619217
    +v -0.694548 0.012891 -0.469995
    +v -0.770792 0.012891 -0.327952
    +v -0.818836 0.012891 -0.170243
    +v -1.078810 0.027686 -0.224294
    +v -1.078810 0.027686 -0.224294
    +v -1.015520 0.027686 -0.432076
    +v -0.770792 0.012891 -0.327952
    +v -0.818836 0.012891 -0.170243
    +v -0.835547 0.012891 0.000000
    +v -1.100830 0.027686 0.000000
    +v -1.100830 0.027686 0.000000
    +v -1.078810 0.027686 -0.224294
    +v -0.818836 0.012891 -0.170243
    +v 0.000000 0.027686 -1.100830
    +v -0.224294 0.027686 -1.078810
    +v -0.261691 0.046875 -1.258690
    +v -0.261691 0.046875 -1.258690
    +v 0.000000 0.046875 -1.284380
    +v 0.000000 0.027686 -1.100830
    +v -0.224294 0.027686 -1.078810
    +v -0.432076 0.027686 -1.015520
    +v -0.504117 0.046875 -1.184840
    +v -0.504117 0.046875 -1.184840
    +v -0.261691 0.046875 -1.258690
    +v -0.224294 0.027686 -1.078810
    +v -0.432076 0.027686 -1.015520
    +v -0.619217 0.027686 -0.915065
    +v -0.722461 0.046875 -1.067640
    +v -0.722461 0.046875 -1.067640
    +v -0.504117 0.046875 -1.184840
    +v -0.432076 0.027686 -1.015520
    +v -0.619217 0.027686 -0.915065
    +v -0.781589 0.027686 -0.781589
    +v -0.911906 0.046875 -0.911906
    +v -0.911906 0.046875 -0.911906
    +v -0.722461 0.046875 -1.067640
    +v -0.619217 0.027686 -0.915065
    +v -0.781589 0.027686 -0.781589
    +v -0.915065 0.027686 -0.619217
    +v -1.067640 0.046875 -0.722461
    +v -1.067640 0.046875 -0.722461
    +v -0.911906 0.046875 -0.911906
    +v -0.781589 0.027686 -0.781589
    +v -0.915065 0.027686 -0.619217
    +v -1.015520 0.027686 -0.432076
    +v -1.184840 0.046875 -0.504117
    +v -1.184840 0.046875 -0.504117
    +v -1.067640 0.046875 -0.722461
    +v -0.915065 0.027686 -0.619217
    +v -1.015520 0.027686 -0.432076
    +v -1.078810 0.027686 -0.224294
    +v -1.258690 0.046875 -0.261691
    +v -1.258690 0.046875 -0.261691
    +v -1.184840 0.046875 -0.504117
    +v -1.015520 0.027686 -0.432076
    +v -1.078810 0.027686 -0.224294
    +v -1.100830 0.027686 0.000000
    +v -1.284380 0.046875 -0.000000
    +v -1.284380 0.046875 -0.000000
    +v -1.258690 0.046875 -0.261691
    +v -1.078810 0.027686 -0.224294
    +v 0.000000 0.046875 -1.284380
    +v -0.261691 0.046875 -1.258690
    +v -0.285479 0.069580 -1.373100
    +v -0.285479 0.069580 -1.373100
    +v 0.000000 0.069580 -1.401120
    +v 0.000000 0.046875 -1.284380
    +v -0.261691 0.046875 -1.258690
    +v -0.504117 0.046875 -1.184840
    +v -0.549941 0.069580 -1.292540
    +v -0.549941 0.069580 -1.292540
    +v -0.285479 0.069580 -1.373100
    +v -0.261691 0.046875 -1.258690
    +v -0.504117 0.046875 -1.184840
    +v -0.722461 0.046875 -1.067640
    +v -0.788132 0.069580 -1.164680
    +v -0.788132 0.069580 -1.164680
    +v -0.549941 0.069580 -1.292540
    +v -0.504117 0.046875 -1.184840
    +v -0.722461 0.046875 -1.067640
    +v -0.911906 0.046875 -0.911906
    +v -0.994797 0.069580 -0.994797
    +v -0.994797 0.069580 -0.994797
    +v -0.788132 0.069580 -1.164680
    +v -0.722461 0.046875 -1.067640
    +v -0.911906 0.046875 -0.911906
    +v -1.067640 0.046875 -0.722461
    +v -1.164680 0.069580 -0.788132
    +v -1.164680 0.069580 -0.788132
    +v -0.994797 0.069580 -0.994797
    +v -0.911906 0.046875 -0.911906
    +v -1.067640 0.046875 -0.722461
    +v -1.184840 0.046875 -0.504117
    +v -1.292540 0.069580 -0.549941
    +v -1.292540 0.069580 -0.549941
    +v -1.164680 0.069580 -0.788132
    +v -1.067640 0.046875 -0.722461
    +v -1.184840 0.046875 -0.504117
    +v -1.258690 0.046875 -0.261691
    +v -1.373100 0.069580 -0.285479
    +v -1.373100 0.069580 -0.285479
    +v -1.292540 0.069580 -0.549941
    +v -1.184840 0.046875 -0.504117
    +v -1.258690 0.046875 -0.261691
    +v -1.284380 0.046875 -0.000000
    +v -1.401120 0.069580 -0.000000
    +v -1.401120 0.069580 -0.000000
    +v -1.373100 0.069580 -0.285479
    +v -1.258690 0.046875 -0.261691
    +v 0.000000 0.069580 -1.401120
    +v -0.285479 0.069580 -1.373100
    +v -0.298701 0.094922 -1.436700
    +v -0.298701 0.094922 -1.436700
    +v 0.000000 0.094922 -1.466020
    +v 0.000000 0.069580 -1.401120
    +v -0.285479 0.069580 -1.373100
    +v -0.549941 0.069580 -1.292540
    +v -0.575411 0.094922 -1.352400
    +v -0.575411 0.094922 -1.352400
    +v -0.298701 0.094922 -1.436700
    +v -0.285479 0.069580 -1.373100
    +v -0.549941 0.069580 -1.292540
    +v -0.788132 0.069580 -1.164680
    +v -0.824634 0.094922 -1.218630
    +v -0.824634 0.094922 -1.218630
    +v -0.575411 0.094922 -1.352400
    +v -0.549941 0.069580 -1.292540
    +v -0.788132 0.069580 -1.164680
    +v -0.994797 0.069580 -0.994797
    +v -1.040870 0.094922 -1.040870
    +v -1.040870 0.094922 -1.040870
    +v -0.824634 0.094922 -1.218630
    +v -0.788132 0.069580 -1.164680
    +v -0.994797 0.069580 -0.994797
    +v -1.164680 0.069580 -0.788132
    +v -1.218630 0.094922 -0.824634
    +v -1.218630 0.094922 -0.824634
    +v -1.040870 0.094922 -1.040870
    +v -0.994797 0.069580 -0.994797
    +v -1.164680 0.069580 -0.788132
    +v -1.292540 0.069580 -0.549941
    +v -1.352400 0.094922 -0.575411
    +v -1.352400 0.094922 -0.575411
    +v -1.218630 0.094922 -0.824634
    +v -1.164680 0.069580 -0.788132
    +v -1.292540 0.069580 -0.549941
    +v -1.373100 0.069580 -0.285479
    +v -1.436700 0.094922 -0.298701
    +v -1.436700 0.094922 -0.298701
    +v -1.352400 0.094922 -0.575411
    +v -1.292540 0.069580 -0.549941
    +v -1.373100 0.069580 -0.285479
    +v -1.401120 0.069580 -0.000000
    +v -1.466020 0.094922 -0.000000
    +v -1.466020 0.094922 -0.000000
    +v -1.436700 0.094922 -0.298701
    +v -1.373100 0.069580 -0.285479
    +v 0.000000 0.094922 -1.466020
    +v -0.298701 0.094922 -1.436700
    +v -0.304401 0.122021 -1.464110
    +v -0.304401 0.122021 -1.464110
    +v 0.000000 0.122021 -1.493990
    +v 0.000000 0.094922 -1.466020
    +v -0.298701 0.094922 -1.436700
    +v -0.575411 0.094922 -1.352400
    +v -0.586393 0.122021 -1.378210
    +v -0.586393 0.122021 -1.378210
    +v -0.304401 0.122021 -1.464110
    +v -0.298701 0.094922 -1.436700
    +v -0.575411 0.094922 -1.352400
    +v -0.824634 0.094922 -1.218630
    +v -0.840372 0.122021 -1.241880
    +v -0.840372 0.122021 -1.241880
    +v -0.586393 0.122021 -1.378210
    +v -0.575411 0.094922 -1.352400
    +v -0.824634 0.094922 -1.218630
    +v -1.040870 0.094922 -1.040870
    +v -1.060740 0.122021 -1.060740
    +v -1.060740 0.122021 -1.060740
    +v -0.840372 0.122021 -1.241880
    +v -0.824634 0.094922 -1.218630
    +v -1.040870 0.094922 -1.040870
    +v -1.218630 0.094922 -0.824634
    +v -1.241880 0.122021 -0.840372
    +v -1.241880 0.122021 -0.840372
    +v -1.060740 0.122021 -1.060740
    +v -1.040870 0.094922 -1.040870
    +v -1.218630 0.094922 -0.824634
    +v -1.352400 0.094922 -0.575411
    +v -1.378210 0.122021 -0.586393
    +v -1.378210 0.122021 -0.586393
    +v -1.241880 0.122021 -0.840372
    +v -1.218630 0.094922 -0.824634
    +v -1.352400 0.094922 -0.575411
    +v -1.436700 0.094922 -0.298701
    +v -1.464110 0.122021 -0.304401
    +v -1.464110 0.122021 -0.304401
    +v -1.378210 0.122021 -0.586393
    +v -1.352400 0.094922 -0.575411
    +v -1.436700 0.094922 -0.298701
    +v -1.466020 0.094922 -0.000000
    +v -1.493990 0.122021 -0.000000
    +v -1.493990 0.122021 -0.000000
    +v -1.464110 0.122021 -0.304401
    +v -1.436700 0.094922 -0.298701
    +v 0.000000 0.122021 -1.493990
    +v -0.304401 0.122021 -1.464110
    +v -0.305625 0.150000 -1.470000
    +v -0.305625 0.150000 -1.470000
    +v 0.000000 0.150000 -1.500000
    +v 0.000000 0.122021 -1.493990
    +v -0.304401 0.122021 -1.464110
    +v -0.586393 0.122021 -1.378210
    +v -0.588750 0.150000 -1.383750
    +v -0.588750 0.150000 -1.383750
    +v -0.305625 0.150000 -1.470000
    +v -0.304401 0.122021 -1.464110
    +v -0.586393 0.122021 -1.378210
    +v -0.840372 0.122021 -1.241880
    +v -0.843750 0.150000 -1.246870
    +v -0.843750 0.150000 -1.246870
    +v -0.588750 0.150000 -1.383750
    +v -0.586393 0.122021 -1.378210
    +v -0.840372 0.122021 -1.241880
    +v -1.060740 0.122021 -1.060740
    +v -1.065000 0.150000 -1.065000
    +v -1.065000 0.150000 -1.065000
    +v -0.843750 0.150000 -1.246870
    +v -0.840372 0.122021 -1.241880
    +v -1.060740 0.122021 -1.060740
    +v -1.241880 0.122021 -0.840372
    +v -1.246870 0.150000 -0.843750
    +v -1.246870 0.150000 -0.843750
    +v -1.065000 0.150000 -1.065000
    +v -1.060740 0.122021 -1.060740
    +v -1.241880 0.122021 -0.840372
    +v -1.378210 0.122021 -0.586393
    +v -1.383750 0.150000 -0.588750
    +v -1.383750 0.150000 -0.588750
    +v -1.246870 0.150000 -0.843750
    +v -1.241880 0.122021 -0.840372
    +v -1.378210 0.122021 -0.586393
    +v -1.464110 0.122021 -0.304401
    +v -1.470000 0.150000 -0.305625
    +v -1.470000 0.150000 -0.305625
    +v -1.383750 0.150000 -0.588750
    +v -1.378210 0.122021 -0.586393
    +v -1.464110 0.122021 -0.304401
    +v -1.493990 0.122021 -0.000000
    +v -1.500000 0.150000 -0.000000
    +v -1.500000 0.150000 -0.000000
    +v -1.470000 0.150000 -0.305625
    +v -1.464110 0.122021 -0.304401
    +v -0.464112 0.003369 0.096493
    +v -0.473584 0.003369 0.000000
    +v 0.000000 0.000000 0.000000
    +v -0.436881 0.003369 0.185882
    +v -0.464112 0.003369 0.096493
    +v 0.000000 0.000000 0.000000
    +v -0.393667 0.003369 0.266391
    +v -0.436881 0.003369 0.185882
    +v 0.000000 0.000000 0.000000
    +v -0.336245 0.003369 0.336245
    +v -0.393667 0.003369 0.266391
    +v 0.000000 0.000000 0.000000
    +v -0.266391 0.003369 0.393667
    +v -0.336245 0.003369 0.336245
    +v 0.000000 0.000000 0.000000
    +v -0.185882 0.003369 0.436881
    +v -0.266391 0.003369 0.393667
    +v 0.000000 0.000000 0.000000
    +v -0.096493 0.003369 0.464112
    +v -0.185882 0.003369 0.436881
    +v 0.000000 0.000000 0.000000
    +v -0.000000 0.003369 0.473584
    +v -0.096493 0.003369 0.464112
    +v 0.000000 0.000000 0.000000
    +v -0.473584 0.003369 0.000000
    +v -0.464112 0.003369 0.096493
    +v -0.818836 0.012891 0.170243
    +v -0.818836 0.012891 0.170243
    +v -0.835547 0.012891 0.000000
    +v -0.473584 0.003369 0.000000
    +v -0.464112 0.003369 0.096493
    +v -0.436881 0.003369 0.185882
    +v -0.770792 0.012891 0.327952
    +v -0.770792 0.012891 0.327952
    +v -0.818836 0.012891 0.170243
    +v -0.464112 0.003369 0.096493
    +v -0.436881 0.003369 0.185882
    +v -0.393667 0.003369 0.266391
    +v -0.694548 0.012891 0.469995
    +v -0.694548 0.012891 0.469995
    +v -0.770792 0.012891 0.327952
    +v -0.436881 0.003369 0.185882
    +v -0.393667 0.003369 0.266391
    +v -0.336245 0.003369 0.336245
    +v -0.593238 0.012891 0.593238
    +v -0.593238 0.012891 0.593238
    +v -0.694548 0.012891 0.469995
    +v -0.393667 0.003369 0.266391
    +v -0.336245 0.003369 0.336245
    +v -0.266391 0.003369 0.393667
    +v -0.469995 0.012891 0.694548
    +v -0.469995 0.012891 0.694548
    +v -0.593238 0.012891 0.593238
    +v -0.336245 0.003369 0.336245
    +v -0.266391 0.003369 0.393667
    +v -0.185882 0.003369 0.436881
    +v -0.327952 0.012891 0.770792
    +v -0.327952 0.012891 0.770792
    +v -0.469995 0.012891 0.694548
    +v -0.266391 0.003369 0.393667
    +v -0.185882 0.003369 0.436881
    +v -0.096493 0.003369 0.464112
    +v -0.170243 0.012891 0.818836
    +v -0.170243 0.012891 0.818836
    +v -0.327952 0.012891 0.770792
    +v -0.185882 0.003369 0.436881
    +v -0.096493 0.003369 0.464112
    +v -0.000000 0.003369 0.473584
    +v 0.000000 0.012891 0.835547
    +v 0.000000 0.012891 0.835547
    +v -0.170243 0.012891 0.818836
    +v -0.096493 0.003369 0.464112
    +v -0.835547 0.012891 0.000000
    +v -0.818836 0.012891 0.170243
    +v -1.078810 0.027686 0.224294
    +v -1.078810 0.027686 0.224294
    +v -1.100830 0.027686 0.000000
    +v -0.835547 0.012891 0.000000
    +v -0.818836 0.012891 0.170243
    +v -0.770792 0.012891 0.327952
    +v -1.015520 0.027686 0.432076
    +v -1.015520 0.027686 0.432076
    +v -1.078810 0.027686 0.224294
    +v -0.818836 0.012891 0.170243
    +v -0.770792 0.012891 0.327952
    +v -0.694548 0.012891 0.469995
    +v -0.915065 0.027686 0.619217
    +v -0.915065 0.027686 0.619217
    +v -1.015520 0.027686 0.432076
    +v -0.770792 0.012891 0.327952
    +v -0.694548 0.012891 0.469995
    +v -0.593238 0.012891 0.593238
    +v -0.781589 0.027686 0.781589
    +v -0.781589 0.027686 0.781589
    +v -0.915065 0.027686 0.619217
    +v -0.694548 0.012891 0.469995
    +v -0.593238 0.012891 0.593238
    +v -0.469995 0.012891 0.694548
    +v -0.619217 0.027686 0.915065
    +v -0.619217 0.027686 0.915065
    +v -0.781589 0.027686 0.781589
    +v -0.593238 0.012891 0.593238
    +v -0.469995 0.012891 0.694548
    +v -0.327952 0.012891 0.770792
    +v -0.432076 0.027686 1.015520
    +v -0.432076 0.027686 1.015520
    +v -0.619217 0.027686 0.915065
    +v -0.469995 0.012891 0.694548
    +v -0.327952 0.012891 0.770792
    +v -0.170243 0.012891 0.818836
    +v -0.224294 0.027686 1.078810
    +v -0.224294 0.027686 1.078810
    +v -0.432076 0.027686 1.015520
    +v -0.327952 0.012891 0.770792
    +v -0.170243 0.012891 0.818836
    +v 0.000000 0.012891 0.835547
    +v 0.000000 0.027686 1.100830
    +v 0.000000 0.027686 1.100830
    +v -0.224294 0.027686 1.078810
    +v -0.170243 0.012891 0.818836
    +v -1.100830 0.027686 0.000000
    +v -1.078810 0.027686 0.224294
    +v -1.258690 0.046875 0.261691
    +v -1.258690 0.046875 0.261691
    +v -1.284380 0.046875 0.000000
    +v -1.100830 0.027686 0.000000
    +v -1.078810 0.027686 0.224294
    +v -1.015520 0.027686 0.432076
    +v -1.184840 0.046875 0.504117
    +v -1.184840 0.046875 0.504117
    +v -1.258690 0.046875 0.261691
    +v -1.078810 0.027686 0.224294
    +v -1.015520 0.027686 0.432076
    +v -0.915065 0.027686 0.619217
    +v -1.067640 0.046875 0.722461
    +v -1.067640 0.046875 0.722461
    +v -1.184840 0.046875 0.504117
    +v -1.015520 0.027686 0.432076
    +v -0.915065 0.027686 0.619217
    +v -0.781589 0.027686 0.781589
    +v -0.911906 0.046875 0.911906
    +v -0.911906 0.046875 0.911906
    +v -1.067640 0.046875 0.722461
    +v -0.915065 0.027686 0.619217
    +v -0.781589 0.027686 0.781589
    +v -0.619217 0.027686 0.915065
    +v -0.722461 0.046875 1.067640
    +v -0.722461 0.046875 1.067640
    +v -0.911906 0.046875 0.911906
    +v -0.781589 0.027686 0.781589
    +v -0.619217 0.027686 0.915065
    +v -0.432076 0.027686 1.015520
    +v -0.504117 0.046875 1.184840
    +v -0.504117 0.046875 1.184840
    +v -0.722461 0.046875 1.067640
    +v -0.619217 0.027686 0.915065
    +v -0.432076 0.027686 1.015520
    +v -0.224294 0.027686 1.078810
    +v -0.261691 0.046875 1.258690
    +v -0.261691 0.046875 1.258690
    +v -0.504117 0.046875 1.184840
    +v -0.432076 0.027686 1.015520
    +v -0.224294 0.027686 1.078810
    +v 0.000000 0.027686 1.100830
    +v -0.000000 0.046875 1.284380
    +v -0.000000 0.046875 1.284380
    +v -0.261691 0.046875 1.258690
    +v -0.224294 0.027686 1.078810
    +v -1.284380 0.046875 0.000000
    +v -1.258690 0.046875 0.261691
    +v -1.373100 0.069580 0.285479
    +v -1.373100 0.069580 0.285479
    +v -1.401120 0.069580 0.000000
    +v -1.284380 0.046875 0.000000
    +v -1.258690 0.046875 0.261691
    +v -1.184840 0.046875 0.504117
    +v -1.292540 0.069580 0.549941
    +v -1.292540 0.069580 0.549941
    +v -1.373100 0.069580 0.285479
    +v -1.258690 0.046875 0.261691
    +v -1.184840 0.046875 0.504117
    +v -1.067640 0.046875 0.722461
    +v -1.164680 0.069580 0.788132
    +v -1.164680 0.069580 0.788132
    +v -1.292540 0.069580 0.549941
    +v -1.184840 0.046875 0.504117
    +v -1.067640 0.046875 0.722461
    +v -0.911906 0.046875 0.911906
    +v -0.994797 0.069580 0.994797
    +v -0.994797 0.069580 0.994797
    +v -1.164680 0.069580 0.788132
    +v -1.067640 0.046875 0.722461
    +v -0.911906 0.046875 0.911906
    +v -0.722461 0.046875 1.067640
    +v -0.788132 0.069580 1.164680
    +v -0.788132 0.069580 1.164680
    +v -0.994797 0.069580 0.994797
    +v -0.911906 0.046875 0.911906
    +v -0.722461 0.046875 1.067640
    +v -0.504117 0.046875 1.184840
    +v -0.549941 0.069580 1.292540
    +v -0.549941 0.069580 1.292540
    +v -0.788132 0.069580 1.164680
    +v -0.722461 0.046875 1.067640
    +v -0.504117 0.046875 1.184840
    +v -0.261691 0.046875 1.258690
    +v -0.285479 0.069580 1.373100
    +v -0.285479 0.069580 1.373100
    +v -0.549941 0.069580 1.292540
    +v -0.504117 0.046875 1.184840
    +v -0.261691 0.046875 1.258690
    +v -0.000000 0.046875 1.284380
    +v -0.000000 0.069580 1.401120
    +v -0.000000 0.069580 1.401120
    +v -0.285479 0.069580 1.373100
    +v -0.261691 0.046875 1.258690
    +v -1.401120 0.069580 0.000000
    +v -1.373100 0.069580 0.285479
    +v -1.436700 0.094922 0.298701
    +v -1.436700 0.094922 0.298701
    +v -1.466020 0.094922 0.000000
    +v -1.401120 0.069580 0.000000
    +v -1.373100 0.069580 0.285479
    +v -1.292540 0.069580 0.549941
    +v -1.352400 0.094922 0.575411
    +v -1.352400 0.094922 0.575411
    +v -1.436700 0.094922 0.298701
    +v -1.373100 0.069580 0.285479
    +v -1.292540 0.069580 0.549941
    +v -1.164680 0.069580 0.788132
    +v -1.218630 0.094922 0.824634
    +v -1.218630 0.094922 0.824634
    +v -1.352400 0.094922 0.575411
    +v -1.292540 0.069580 0.549941
    +v -1.164680 0.069580 0.788132
    +v -0.994797 0.069580 0.994797
    +v -1.040870 0.094922 1.040870
    +v -1.040870 0.094922 1.040870
    +v -1.218630 0.094922 0.824634
    +v -1.164680 0.069580 0.788132
    +v -0.994797 0.069580 0.994797
    +v -0.788132 0.069580 1.164680
    +v -0.824634 0.094922 1.218630
    +v -0.824634 0.094922 1.218630
    +v -1.040870 0.094922 1.040870
    +v -0.994797 0.069580 0.994797
    +v -0.788132 0.069580 1.164680
    +v -0.549941 0.069580 1.292540
    +v -0.575411 0.094922 1.352400
    +v -0.575411 0.094922 1.352400
    +v -0.824634 0.094922 1.218630
    +v -0.788132 0.069580 1.164680
    +v -0.549941 0.069580 1.292540
    +v -0.285479 0.069580 1.373100
    +v -0.298701 0.094922 1.436700
    +v -0.298701 0.094922 1.436700
    +v -0.575411 0.094922 1.352400
    +v -0.549941 0.069580 1.292540
    +v -0.285479 0.069580 1.373100
    +v -0.000000 0.069580 1.401120
    +v -0.000000 0.094922 1.466020
    +v -0.000000 0.094922 1.466020
    +v -0.298701 0.094922 1.436700
    +v -0.285479 0.069580 1.373100
    +v -1.466020 0.094922 0.000000
    +v -1.436700 0.094922 0.298701
    +v -1.464110 0.122021 0.304401
    +v -1.464110 0.122021 0.304401
    +v -1.493990 0.122021 0.000000
    +v -1.466020 0.094922 0.000000
    +v -1.436700 0.094922 0.298701
    +v -1.352400 0.094922 0.575411
    +v -1.378210 0.122021 0.586393
    +v -1.378210 0.122021 0.586393
    +v -1.464110 0.122021 0.304401
    +v -1.436700 0.094922 0.298701
    +v -1.352400 0.094922 0.575411
    +v -1.218630 0.094922 0.824634
    +v -1.241880 0.122021 0.840372
    +v -1.241880 0.122021 0.840372
    +v -1.378210 0.122021 0.586393
    +v -1.352400 0.094922 0.575411
    +v -1.218630 0.094922 0.824634
    +v -1.040870 0.094922 1.040870
    +v -1.060740 0.122021 1.060740
    +v -1.060740 0.122021 1.060740
    +v -1.241880 0.122021 0.840372
    +v -1.218630 0.094922 0.824634
    +v -1.040870 0.094922 1.040870
    +v -0.824634 0.094922 1.218630
    +v -0.840372 0.122021 1.241880
    +v -0.840372 0.122021 1.241880
    +v -1.060740 0.122021 1.060740
    +v -1.040870 0.094922 1.040870
    +v -0.824634 0.094922 1.218630
    +v -0.575411 0.094922 1.352400
    +v -0.586393 0.122021 1.378210
    +v -0.586393 0.122021 1.378210
    +v -0.840372 0.122021 1.241880
    +v -0.824634 0.094922 1.218630
    +v -0.575411 0.094922 1.352400
    +v -0.298701 0.094922 1.436700
    +v -0.304401 0.122021 1.464110
    +v -0.304401 0.122021 1.464110
    +v -0.586393 0.122021 1.378210
    +v -0.575411 0.094922 1.352400
    +v -0.298701 0.094922 1.436700
    +v -0.000000 0.094922 1.466020
    +v -0.000000 0.122021 1.493990
    +v -0.000000 0.122021 1.493990
    +v -0.304401 0.122021 1.464110
    +v -0.298701 0.094922 1.436700
    +v -1.493990 0.122021 0.000000
    +v -1.464110 0.122021 0.304401
    +v -1.470000 0.150000 0.305625
    +v -1.470000 0.150000 0.305625
    +v -1.500000 0.150000 0.000000
    +v -1.493990 0.122021 0.000000
    +v -1.464110 0.122021 0.304401
    +v -1.378210 0.122021 0.586393
    +v -1.383750 0.150000 0.588750
    +v -1.383750 0.150000 0.588750
    +v -1.470000 0.150000 0.305625
    +v -1.464110 0.122021 0.304401
    +v -1.378210 0.122021 0.586393
    +v -1.241880 0.122021 0.840372
    +v -1.246870 0.150000 0.843750
    +v -1.246870 0.150000 0.843750
    +v -1.383750 0.150000 0.588750
    +v -1.378210 0.122021 0.586393
    +v -1.241880 0.122021 0.840372
    +v -1.060740 0.122021 1.060740
    +v -1.065000 0.150000 1.065000
    +v -1.065000 0.150000 1.065000
    +v -1.246870 0.150000 0.843750
    +v -1.241880 0.122021 0.840372
    +v -1.060740 0.122021 1.060740
    +v -0.840372 0.122021 1.241880
    +v -0.843750 0.150000 1.246870
    +v -0.843750 0.150000 1.246870
    +v -1.065000 0.150000 1.065000
    +v -1.060740 0.122021 1.060740
    +v -0.840372 0.122021 1.241880
    +v -0.586393 0.122021 1.378210
    +v -0.588750 0.150000 1.383750
    +v -0.588750 0.150000 1.383750
    +v -0.843750 0.150000 1.246870
    +v -0.840372 0.122021 1.241880
    +v -0.586393 0.122021 1.378210
    +v -0.304401 0.122021 1.464110
    +v -0.305625 0.150000 1.470000
    +v -0.305625 0.150000 1.470000
    +v -0.588750 0.150000 1.383750
    +v -0.586393 0.122021 1.378210
    +v -0.304401 0.122021 1.464110
    +v -0.000000 0.122021 1.493990
    +v -0.000000 0.150000 1.500000
    +v -0.000000 0.150000 1.500000
    +v -0.305625 0.150000 1.470000
    +v -0.304401 0.122021 1.464110
    +v 0.096493 0.003369 0.464112
    +v 0.000000 0.003369 0.473584
    +v 0.000000 0.000000 0.000000
    +v 0.185882 0.003369 0.436881
    +v 0.096493 0.003369 0.464112
    +v 0.000000 0.000000 0.000000
    +v 0.266391 0.003369 0.393667
    +v 0.185882 0.003369 0.436881
    +v 0.000000 0.000000 0.000000
    +v 0.336245 0.003369 0.336245
    +v 0.266391 0.003369 0.393667
    +v 0.000000 0.000000 0.000000
    +v 0.393667 0.003369 0.266391
    +v 0.336245 0.003369 0.336245
    +v 0.000000 0.000000 0.000000
    +v 0.436881 0.003369 0.185882
    +v 0.393667 0.003369 0.266391
    +v 0.000000 0.000000 0.000000
    +v 0.464112 0.003369 0.096493
    +v 0.436881 0.003369 0.185882
    +v 0.000000 0.000000 0.000000
    +v 0.473584 0.003369 0.000000
    +v 0.464112 0.003369 0.096493
    +v 0.000000 0.000000 0.000000
    +v 0.000000 0.003369 0.473584
    +v 0.096493 0.003369 0.464112
    +v 0.170243 0.012891 0.818836
    +v 0.170243 0.012891 0.818836
    +v 0.000000 0.012891 0.835547
    +v 0.000000 0.003369 0.473584
    +v 0.096493 0.003369 0.464112
    +v 0.185882 0.003369 0.436881
    +v 0.327952 0.012891 0.770792
    +v 0.327952 0.012891 0.770792
    +v 0.170243 0.012891 0.818836
    +v 0.096493 0.003369 0.464112
    +v 0.185882 0.003369 0.436881
    +v 0.266391 0.003369 0.393667
    +v 0.469995 0.012891 0.694548
    +v 0.469995 0.012891 0.694548
    +v 0.327952 0.012891 0.770792
    +v 0.185882 0.003369 0.436881
    +v 0.266391 0.003369 0.393667
    +v 0.336245 0.003369 0.336245
    +v 0.593238 0.012891 0.593238
    +v 0.593238 0.012891 0.593238
    +v 0.469995 0.012891 0.694548
    +v 0.266391 0.003369 0.393667
    +v 0.336245 0.003369 0.336245
    +v 0.393667 0.003369 0.266391
    +v 0.694548 0.012891 0.469995
    +v 0.694548 0.012891 0.469995
    +v 0.593238 0.012891 0.593238
    +v 0.336245 0.003369 0.336245
    +v 0.393667 0.003369 0.266391
    +v 0.436881 0.003369 0.185882
    +v 0.770792 0.012891 0.327952
    +v 0.770792 0.012891 0.327952
    +v 0.694548 0.012891 0.469995
    +v 0.393667 0.003369 0.266391
    +v 0.436881 0.003369 0.185882
    +v 0.464112 0.003369 0.096493
    +v 0.818836 0.012891 0.170243
    +v 0.818836 0.012891 0.170243
    +v 0.770792 0.012891 0.327952
    +v 0.436881 0.003369 0.185882
    +v 0.464112 0.003369 0.096493
    +v 0.473584 0.003369 0.000000
    +v 0.835547 0.012891 0.000000
    +v 0.835547 0.012891 0.000000
    +v 0.818836 0.012891 0.170243
    +v 0.464112 0.003369 0.096493
    +v 0.000000 0.012891 0.835547
    +v 0.170243 0.012891 0.818836
    +v 0.224294 0.027686 1.078810
    +v 0.224294 0.027686 1.078810
    +v 0.000000 0.027686 1.100830
    +v 0.000000 0.012891 0.835547
    +v 0.170243 0.012891 0.818836
    +v 0.327952 0.012891 0.770792
    +v 0.432076 0.027686 1.015520
    +v 0.432076 0.027686 1.015520
    +v 0.224294 0.027686 1.078810
    +v 0.170243 0.012891 0.818836
    +v 0.327952 0.012891 0.770792
    +v 0.469995 0.012891 0.694548
    +v 0.619217 0.027686 0.915065
    +v 0.619217 0.027686 0.915065
    +v 0.432076 0.027686 1.015520
    +v 0.327952 0.012891 0.770792
    +v 0.469995 0.012891 0.694548
    +v 0.593238 0.012891 0.593238
    +v 0.781589 0.027686 0.781589
    +v 0.781589 0.027686 0.781589
    +v 0.619217 0.027686 0.915065
    +v 0.469995 0.012891 0.694548
    +v 0.593238 0.012891 0.593238
    +v 0.694548 0.012891 0.469995
    +v 0.915065 0.027686 0.619217
    +v 0.915065 0.027686 0.619217
    +v 0.781589 0.027686 0.781589
    +v 0.593238 0.012891 0.593238
    +v 0.694548 0.012891 0.469995
    +v 0.770792 0.012891 0.327952
    +v 1.015520 0.027686 0.432076
    +v 1.015520 0.027686 0.432076
    +v 0.915065 0.027686 0.619217
    +v 0.694548 0.012891 0.469995
    +v 0.770792 0.012891 0.327952
    +v 0.818836 0.012891 0.170243
    +v 1.078810 0.027686 0.224294
    +v 1.078810 0.027686 0.224294
    +v 1.015520 0.027686 0.432076
    +v 0.770792 0.012891 0.327952
    +v 0.818836 0.012891 0.170243
    +v 0.835547 0.012891 0.000000
    +v 1.100830 0.027686 0.000000
    +v 1.100830 0.027686 0.000000
    +v 1.078810 0.027686 0.224294
    +v 0.818836 0.012891 0.170243
    +v 0.000000 0.027686 1.100830
    +v 0.224294 0.027686 1.078810
    +v 0.261691 0.046875 1.258690
    +v 0.261691 0.046875 1.258690
    +v 0.000000 0.046875 1.284380
    +v 0.000000 0.027686 1.100830
    +v 0.224294 0.027686 1.078810
    +v 0.432076 0.027686 1.015520
    +v 0.504117 0.046875 1.184840
    +v 0.504117 0.046875 1.184840
    +v 0.261691 0.046875 1.258690
    +v 0.224294 0.027686 1.078810
    +v 0.432076 0.027686 1.015520
    +v 0.619217 0.027686 0.915065
    +v 0.722461 0.046875 1.067640
    +v 0.722461 0.046875 1.067640
    +v 0.504117 0.046875 1.184840
    +v 0.432076 0.027686 1.015520
    +v 0.619217 0.027686 0.915065
    +v 0.781589 0.027686 0.781589
    +v 0.911906 0.046875 0.911906
    +v 0.911906 0.046875 0.911906
    +v 0.722461 0.046875 1.067640
    +v 0.619217 0.027686 0.915065
    +v 0.781589 0.027686 0.781589
    +v 0.915065 0.027686 0.619217
    +v 1.067640 0.046875 0.722461
    +v 1.067640 0.046875 0.722461
    +v 0.911906 0.046875 0.911906
    +v 0.781589 0.027686 0.781589
    +v 0.915065 0.027686 0.619217
    +v 1.015520 0.027686 0.432076
    +v 1.184840 0.046875 0.504117
    +v 1.184840 0.046875 0.504117
    +v 1.067640 0.046875 0.722461
    +v 0.915065 0.027686 0.619217
    +v 1.015520 0.027686 0.432076
    +v 1.078810 0.027686 0.224294
    +v 1.258690 0.046875 0.261691
    +v 1.258690 0.046875 0.261691
    +v 1.184840 0.046875 0.504117
    +v 1.015520 0.027686 0.432076
    +v 1.078810 0.027686 0.224294
    +v 1.100830 0.027686 0.000000
    +v 1.284380 0.046875 0.000000
    +v 1.284380 0.046875 0.000000
    +v 1.258690 0.046875 0.261691
    +v 1.078810 0.027686 0.224294
    +v 0.000000 0.046875 1.284380
    +v 0.261691 0.046875 1.258690
    +v 0.285479 0.069580 1.373100
    +v 0.285479 0.069580 1.373100
    +v 0.000000 0.069580 1.401120
    +v 0.000000 0.046875 1.284380
    +v 0.261691 0.046875 1.258690
    +v 0.504117 0.046875 1.184840
    +v 0.549941 0.069580 1.292540
    +v 0.549941 0.069580 1.292540
    +v 0.285479 0.069580 1.373100
    +v 0.261691 0.046875 1.258690
    +v 0.504117 0.046875 1.184840
    +v 0.722461 0.046875 1.067640
    +v 0.788132 0.069580 1.164680
    +v 0.788132 0.069580 1.164680
    +v 0.549941 0.069580 1.292540
    +v 0.504117 0.046875 1.184840
    +v 0.722461 0.046875 1.067640
    +v 0.911906 0.046875 0.911906
    +v 0.994797 0.069580 0.994797
    +v 0.994797 0.069580 0.994797
    +v 0.788132 0.069580 1.164680
    +v 0.722461 0.046875 1.067640
    +v 0.911906 0.046875 0.911906
    +v 1.067640 0.046875 0.722461
    +v 1.164680 0.069580 0.788132
    +v 1.164680 0.069580 0.788132
    +v 0.994797 0.069580 0.994797
    +v 0.911906 0.046875 0.911906
    +v 1.067640 0.046875 0.722461
    +v 1.184840 0.046875 0.504117
    +v 1.292540 0.069580 0.549941
    +v 1.292540 0.069580 0.549941
    +v 1.164680 0.069580 0.788132
    +v 1.067640 0.046875 0.722461
    +v 1.184840 0.046875 0.504117
    +v 1.258690 0.046875 0.261691
    +v 1.373100 0.069580 0.285479
    +v 1.373100 0.069580 0.285479
    +v 1.292540 0.069580 0.549941
    +v 1.184840 0.046875 0.504117
    +v 1.258690 0.046875 0.261691
    +v 1.284380 0.046875 0.000000
    +v 1.401120 0.069580 0.000000
    +v 1.401120 0.069580 0.000000
    +v 1.373100 0.069580 0.285479
    +v 1.258690 0.046875 0.261691
    +v 0.000000 0.069580 1.401120
    +v 0.285479 0.069580 1.373100
    +v 0.298701 0.094922 1.436700
    +v 0.298701 0.094922 1.436700
    +v 0.000000 0.094922 1.466020
    +v 0.000000 0.069580 1.401120
    +v 0.285479 0.069580 1.373100
    +v 0.549941 0.069580 1.292540
    +v 0.575411 0.094922 1.352400
    +v 0.575411 0.094922 1.352400
    +v 0.298701 0.094922 1.436700
    +v 0.285479 0.069580 1.373100
    +v 0.549941 0.069580 1.292540
    +v 0.788132 0.069580 1.164680
    +v 0.824634 0.094922 1.218630
    +v 0.824634 0.094922 1.218630
    +v 0.575411 0.094922 1.352400
    +v 0.549941 0.069580 1.292540
    +v 0.788132 0.069580 1.164680
    +v 0.994797 0.069580 0.994797
    +v 1.040870 0.094922 1.040870
    +v 1.040870 0.094922 1.040870
    +v 0.824634 0.094922 1.218630
    +v 0.788132 0.069580 1.164680
    +v 0.994797 0.069580 0.994797
    +v 1.164680 0.069580 0.788132
    +v 1.218630 0.094922 0.824634
    +v 1.218630 0.094922 0.824634
    +v 1.040870 0.094922 1.040870
    +v 0.994797 0.069580 0.994797
    +v 1.164680 0.069580 0.788132
    +v 1.292540 0.069580 0.549941
    +v 1.352400 0.094922 0.575411
    +v 1.352400 0.094922 0.575411
    +v 1.218630 0.094922 0.824634
    +v 1.164680 0.069580 0.788132
    +v 1.292540 0.069580 0.549941
    +v 1.373100 0.069580 0.285479
    +v 1.436700 0.094922 0.298701
    +v 1.436700 0.094922 0.298701
    +v 1.352400 0.094922 0.575411
    +v 1.292540 0.069580 0.549941
    +v 1.373100 0.069580 0.285479
    +v 1.401120 0.069580 0.000000
    +v 1.466020 0.094922 0.000000
    +v 1.466020 0.094922 0.000000
    +v 1.436700 0.094922 0.298701
    +v 1.373100 0.069580 0.285479
    +v 0.000000 0.094922 1.466020
    +v 0.298701 0.094922 1.436700
    +v 0.304401 0.122021 1.464110
    +v 0.304401 0.122021 1.464110
    +v 0.000000 0.122021 1.493990
    +v 0.000000 0.094922 1.466020
    +v 0.298701 0.094922 1.436700
    +v 0.575411 0.094922 1.352400
    +v 0.586393 0.122021 1.378210
    +v 0.586393 0.122021 1.378210
    +v 0.304401 0.122021 1.464110
    +v 0.298701 0.094922 1.436700
    +v 0.575411 0.094922 1.352400
    +v 0.824634 0.094922 1.218630
    +v 0.840372 0.122021 1.241880
    +v 0.840372 0.122021 1.241880
    +v 0.586393 0.122021 1.378210
    +v 0.575411 0.094922 1.352400
    +v 0.824634 0.094922 1.218630
    +v 1.040870 0.094922 1.040870
    +v 1.060740 0.122021 1.060740
    +v 1.060740 0.122021 1.060740
    +v 0.840372 0.122021 1.241880
    +v 0.824634 0.094922 1.218630
    +v 1.040870 0.094922 1.040870
    +v 1.218630 0.094922 0.824634
    +v 1.241880 0.122021 0.840372
    +v 1.241880 0.122021 0.840372
    +v 1.060740 0.122021 1.060740
    +v 1.040870 0.094922 1.040870
    +v 1.218630 0.094922 0.824634
    +v 1.352400 0.094922 0.575411
    +v 1.378210 0.122021 0.586393
    +v 1.378210 0.122021 0.586393
    +v 1.241880 0.122021 0.840372
    +v 1.218630 0.094922 0.824634
    +v 1.352400 0.094922 0.575411
    +v 1.436700 0.094922 0.298701
    +v 1.464110 0.122021 0.304401
    +v 1.464110 0.122021 0.304401
    +v 1.378210 0.122021 0.586393
    +v 1.352400 0.094922 0.575411
    +v 1.436700 0.094922 0.298701
    +v 1.466020 0.094922 0.000000
    +v 1.493990 0.122021 0.000000
    +v 1.493990 0.122021 0.000000
    +v 1.464110 0.122021 0.304401
    +v 1.436700 0.094922 0.298701
    +v 0.000000 0.122021 1.493990
    +v 0.304401 0.122021 1.464110
    +v 0.305625 0.150000 1.470000
    +v 0.305625 0.150000 1.470000
    +v 0.000000 0.150000 1.500000
    +v 0.000000 0.122021 1.493990
    +v 0.304401 0.122021 1.464110
    +v 0.586393 0.122021 1.378210
    +v 0.588750 0.150000 1.383750
    +v 0.588750 0.150000 1.383750
    +v 0.305625 0.150000 1.470000
    +v 0.304401 0.122021 1.464110
    +v 0.586393 0.122021 1.378210
    +v 0.840372 0.122021 1.241880
    +v 0.843750 0.150000 1.246870
    +v 0.843750 0.150000 1.246870
    +v 0.588750 0.150000 1.383750
    +v 0.586393 0.122021 1.378210
    +v 0.840372 0.122021 1.241880
    +v 1.060740 0.122021 1.060740
    +v 1.065000 0.150000 1.065000
    +v 1.065000 0.150000 1.065000
    +v 0.843750 0.150000 1.246870
    +v 0.840372 0.122021 1.241880
    +v 1.060740 0.122021 1.060740
    +v 1.241880 0.122021 0.840372
    +v 1.246870 0.150000 0.843750
    +v 1.246870 0.150000 0.843750
    +v 1.065000 0.150000 1.065000
    +v 1.060740 0.122021 1.060740
    +v 1.241880 0.122021 0.840372
    +v 1.378210 0.122021 0.586393
    +v 1.383750 0.150000 0.588750
    +v 1.383750 0.150000 0.588750
    +v 1.246870 0.150000 0.843750
    +v 1.241880 0.122021 0.840372
    +v 1.378210 0.122021 0.586393
    +v 1.464110 0.122021 0.304401
    +v 1.470000 0.150000 0.305625
    +v 1.470000 0.150000 0.305625
    +v 1.383750 0.150000 0.588750
    +v 1.378210 0.122021 0.586393
    +v 1.464110 0.122021 0.304401
    +v 1.493990 0.122021 0.000000
    +v 1.500000 0.150000 0.000000
    +v 1.500000 0.150000 0.000000
    +v 1.470000 0.150000 0.305625
    +v 1.464110 0.122021 0.304401
    +vn -0.902860 -0.429934 -0.000000
    +vn -0.885176 -0.430259 -0.177035
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.969231 -0.246154 -0.000000
    +vn -0.902860 -0.429934 -0.000000
    +vn -0.885176 -0.430259 -0.177035
    +vn -0.833024 -0.430809 -0.347093
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.885176 -0.430259 -0.177035
    +vn -0.833024 -0.430809 -0.347093
    +vn -0.749355 -0.431220 -0.502509
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.833024 -0.430809 -0.347093
    +vn -0.749355 -0.431220 -0.502509
    +vn -0.637936 -0.431366 -0.637936
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.749355 -0.431220 -0.502509
    +vn -0.637936 -0.431366 -0.637936
    +vn -0.502509 -0.431220 -0.749355
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.637936 -0.431366 -0.637936
    +vn -0.502509 -0.431220 -0.749355
    +vn -0.347093 -0.430809 -0.833024
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.502509 -0.431220 -0.749355
    +vn -0.347093 -0.430809 -0.833024
    +vn -0.177035 -0.430259 -0.885176
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.347093 -0.430809 -0.833024
    +vn -0.177035 -0.430259 -0.885176
    +vn -0.000000 -0.429934 -0.902860
    +vn -0.000000 -0.246154 -0.969231
    +vn -0.000000 -0.246154 -0.969231
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.177035 -0.430259 -0.885176
    +vn -0.969231 -0.246154 -0.000000
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.976155 0.094896 -0.195231
    +vn -0.976155 0.094896 -0.195231
    +vn -0.995495 0.094809 0.000000
    +vn -0.969231 -0.246154 -0.000000
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.918898 0.095044 -0.382874
    +vn -0.918898 0.095044 -0.382874
    +vn -0.976155 0.094896 -0.195231
    +vn -0.950356 -0.246368 -0.190071
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.826775 0.095154 -0.554426
    +vn -0.826775 0.095154 -0.554426
    +vn -0.918898 0.095044 -0.382874
    +vn -0.894539 -0.246732 -0.372725
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.703896 0.095193 -0.703896
    +vn -0.703896 0.095193 -0.703896
    +vn -0.826775 0.095154 -0.554426
    +vn -0.804809 -0.247004 -0.539696
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.554426 0.095154 -0.826775
    +vn -0.554426 0.095154 -0.826775
    +vn -0.703896 0.095193 -0.703896
    +vn -0.685179 -0.247100 -0.685179
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.382874 0.095044 -0.918898
    +vn -0.382874 0.095044 -0.918898
    +vn -0.554426 0.095154 -0.826775
    +vn -0.539696 -0.247004 -0.804809
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.195231 0.094896 -0.976155
    +vn -0.195231 0.094896 -0.976155
    +vn -0.382874 0.095044 -0.918898
    +vn -0.372725 -0.246732 -0.894539
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.000000 -0.246154 -0.969231
    +vn -0.000000 0.094809 -0.995495
    +vn -0.000000 0.094809 -0.995495
    +vn -0.195231 0.094896 -0.976155
    +vn -0.190071 -0.246368 -0.950356
    +vn -0.995495 0.094809 0.000000
    +vn -0.976155 0.094896 -0.195231
    +vn -0.709762 0.689990 -0.141952
    +vn -0.709762 0.689990 -0.141952
    +vn -0.724138 0.689655 0.000000
    +vn -0.995495 0.094809 0.000000
    +vn -0.976155 0.094896 -0.195231
    +vn -0.918898 0.095044 -0.382874
    +vn -0.667641 0.690558 -0.278184
    +vn -0.667641 0.690558 -0.278184
    +vn -0.709762 0.689990 -0.141952
    +vn -0.976155 0.094896 -0.195231
    +vn -0.918898 0.095044 -0.382874
    +vn -0.826775 0.095154 -0.554426
    +vn -0.600378 0.690981 -0.402606
    +vn -0.600378 0.690981 -0.402606
    +vn -0.667641 0.690558 -0.278184
    +vn -0.918898 0.095044 -0.382874
    +vn -0.826775 0.095154 -0.554426
    +vn -0.703896 0.095193 -0.703896
    +vn -0.511047 0.691131 -0.511047
    +vn -0.511047 0.691131 -0.511047
    +vn -0.600378 0.690981 -0.402606
    +vn -0.826775 0.095154 -0.554426
    +vn -0.703896 0.095193 -0.703896
    +vn -0.554426 0.095154 -0.826775
    +vn -0.402606 0.690981 -0.600378
    +vn -0.402606 0.690981 -0.600378
    +vn -0.511047 0.691131 -0.511047
    +vn -0.703896 0.095193 -0.703896
    +vn -0.554426 0.095154 -0.826775
    +vn -0.382874 0.095044 -0.918898
    +vn -0.278184 0.690558 -0.667641
    +vn -0.278184 0.690558 -0.667641
    +vn -0.402606 0.690981 -0.600378
    +vn -0.554426 0.095154 -0.826775
    +vn -0.382874 0.095044 -0.918898
    +vn -0.195231 0.094896 -0.976155
    +vn -0.141952 0.689990 -0.709762
    +vn -0.141952 0.689990 -0.709762
    +vn -0.278184 0.690558 -0.667641
    +vn -0.382874 0.095044 -0.918898
    +vn -0.195231 0.094896 -0.976155
    +vn -0.000000 0.094809 -0.995495
    +vn -0.000000 0.689655 -0.724138
    +vn -0.000000 0.689655 -0.724138
    +vn -0.141952 0.689990 -0.709762
    +vn -0.195231 0.094896 -0.976155
    +vn -0.724138 0.689655 0.000000
    +vn -0.709762 0.689990 -0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.724138 0.689655 0.000000
    +vn -0.709762 0.689990 -0.141952
    +vn -0.667641 0.690558 -0.278184
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.709762 0.689990 -0.141952
    +vn -0.667641 0.690558 -0.278184
    +vn -0.600378 0.690981 -0.402606
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.667641 0.690558 -0.278184
    +vn -0.600378 0.690981 -0.402606
    +vn -0.511047 0.691131 -0.511047
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.600378 0.690981 -0.402606
    +vn -0.511047 0.691131 -0.511047
    +vn -0.402606 0.690981 -0.600378
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.511047 0.691131 -0.511047
    +vn -0.402606 0.690981 -0.600378
    +vn -0.278184 0.690558 -0.667641
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.402606 0.690981 -0.600378
    +vn -0.278184 0.690558 -0.667641
    +vn -0.141952 0.689990 -0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.278184 0.690558 -0.667641
    +vn -0.141952 0.689990 -0.709762
    +vn -0.000000 0.689655 -0.724138
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.141952 0.689990 -0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.455476 0.885575 0.091095
    +vn 0.455476 0.885575 0.091095
    +vn 0.464834 0.885398 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.428238 0.885875 0.178432
    +vn 0.428238 0.885875 0.178432
    +vn 0.455476 0.885575 0.091095
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.384955 0.886098 0.258146
    +vn 0.384955 0.886098 0.258146
    +vn 0.428238 0.885875 0.178432
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.327636 0.886177 0.327636
    +vn 0.327636 0.886177 0.327636
    +vn 0.384955 0.886098 0.258146
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.258146 0.886098 0.384955
    +vn 0.258146 0.886098 0.384955
    +vn 0.327636 0.886177 0.327636
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.178432 0.885875 0.428238
    +vn 0.178432 0.885875 0.428238
    +vn 0.258146 0.886098 0.384955
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.091095 0.885575 0.455476
    +vn 0.091095 0.885575 0.455476
    +vn 0.178432 0.885875 0.428238
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.885398 0.464834
    +vn 0.000000 0.885398 0.464834
    +vn 0.091095 0.885575 0.455476
    +vn 0.000000 1.000000 0.000000
    +vn 0.464834 0.885398 0.000000
    +vn 0.455476 0.885575 0.091095
    +vn 0.676739 0.723675 0.135348
    +vn 0.676739 0.723675 0.135348
    +vn 0.690476 0.723356 0.000000
    +vn 0.464834 0.885398 0.000000
    +vn 0.455476 0.885575 0.091095
    +vn 0.428238 0.885875 0.178432
    +vn 0.636529 0.724216 0.265220
    +vn 0.636529 0.724216 0.265220
    +vn 0.676739 0.723675 0.135348
    +vn 0.455476 0.885575 0.091095
    +vn 0.428238 0.885875 0.178432
    +vn 0.384955 0.886098 0.258146
    +vn 0.572369 0.724620 0.383824
    +vn 0.572369 0.724620 0.383824
    +vn 0.636529 0.724216 0.265220
    +vn 0.428238 0.885875 0.178432
    +vn 0.384955 0.886098 0.258146
    +vn 0.327636 0.886177 0.327636
    +vn 0.487196 0.724762 0.487196
    +vn 0.487196 0.724762 0.487196
    +vn 0.572369 0.724620 0.383824
    +vn 0.384955 0.886098 0.258146
    +vn 0.327636 0.886177 0.327636
    +vn 0.258146 0.886098 0.384955
    +vn 0.383824 0.724620 0.572369
    +vn 0.383824 0.724620 0.572369
    +vn 0.487196 0.724762 0.487196
    +vn 0.327636 0.886177 0.327636
    +vn 0.258146 0.886098 0.384955
    +vn 0.178432 0.885875 0.428238
    +vn 0.265220 0.724216 0.636529
    +vn 0.265220 0.724216 0.636529
    +vn 0.383824 0.724620 0.572369
    +vn 0.258146 0.886098 0.384955
    +vn 0.178432 0.885875 0.428238
    +vn 0.091095 0.885575 0.455476
    +vn 0.135348 0.723675 0.676739
    +vn 0.135348 0.723675 0.676739
    +vn 0.265220 0.724216 0.636529
    +vn 0.178432 0.885875 0.428238
    +vn 0.091095 0.885575 0.455476
    +vn 0.000000 0.885398 0.464834
    +vn 0.000000 0.723356 0.690476
    +vn 0.000000 0.723356 0.690476
    +vn 0.135348 0.723675 0.676739
    +vn 0.091095 0.885575 0.455476
    +vn 0.690476 0.723356 0.000000
    +vn 0.676739 0.723675 0.135348
    +vn 0.803677 0.572946 0.160736
    +vn 0.803677 0.572946 0.160736
    +vn 0.819843 0.572589 0.000000
    +vn 0.690476 0.723356 0.000000
    +vn 0.676739 0.723675 0.135348
    +vn 0.636529 0.724216 0.265220
    +vn 0.756158 0.573550 0.315066
    +vn 0.756158 0.573550 0.315066
    +vn 0.803677 0.572946 0.160736
    +vn 0.676739 0.723675 0.135348
    +vn 0.636529 0.724216 0.265220
    +vn 0.572369 0.724620 0.383824
    +vn 0.680095 0.574001 0.456064
    +vn 0.680095 0.574001 0.456064
    +vn 0.756158 0.573550 0.315066
    +vn 0.636529 0.724216 0.265220
    +vn 0.572369 0.724620 0.383824
    +vn 0.487196 0.724762 0.487196
    +vn 0.578939 0.574160 0.578939
    +vn 0.578939 0.574160 0.578939
    +vn 0.680095 0.574001 0.456064
    +vn 0.572369 0.724620 0.383824
    +vn 0.487196 0.724762 0.487196
    +vn 0.383824 0.724620 0.572369
    +vn 0.456064 0.574001 0.680095
    +vn 0.456064 0.574001 0.680095
    +vn 0.578939 0.574160 0.578939
    +vn 0.487196 0.724762 0.487196
    +vn 0.383824 0.724620 0.572369
    +vn 0.265220 0.724216 0.636529
    +vn 0.315066 0.573550 0.756158
    +vn 0.315066 0.573550 0.756158
    +vn 0.456064 0.574001 0.680095
    +vn 0.383824 0.724620 0.572369
    +vn 0.265220 0.724216 0.636529
    +vn 0.135348 0.723675 0.676739
    +vn 0.160736 0.572946 0.803677
    +vn 0.160736 0.572946 0.803677
    +vn 0.315066 0.573550 0.756158
    +vn 0.265220 0.724216 0.636529
    +vn 0.135348 0.723675 0.676739
    +vn 0.000000 0.723356 0.690476
    +vn 0.000000 0.572589 0.819843
    +vn 0.000000 0.572589 0.819843
    +vn 0.160736 0.572946 0.803677
    +vn 0.135348 0.723675 0.676739
    +vn 0.819843 0.572589 0.000000
    +vn 0.803677 0.572946 0.160736
    +vn 0.885176 0.430259 0.177035
    +vn 0.885176 0.430259 0.177035
    +vn 0.902860 0.429934 0.000000
    +vn 0.819843 0.572589 0.000000
    +vn 0.803677 0.572946 0.160736
    +vn 0.756158 0.573550 0.315066
    +vn 0.833024 0.430809 0.347093
    +vn 0.833024 0.430809 0.347093
    +vn 0.885176 0.430259 0.177035
    +vn 0.803677 0.572946 0.160736
    +vn 0.756158 0.573550 0.315066
    +vn 0.680095 0.574001 0.456064
    +vn 0.749355 0.431220 0.502509
    +vn 0.749355 0.431220 0.502509
    +vn 0.833024 0.430809 0.347093
    +vn 0.756158 0.573550 0.315066
    +vn 0.680095 0.574001 0.456064
    +vn 0.578939 0.574160 0.578939
    +vn 0.637936 0.431366 0.637936
    +vn 0.637936 0.431366 0.637936
    +vn 0.749355 0.431220 0.502509
    +vn 0.680095 0.574001 0.456064
    +vn 0.578939 0.574160 0.578939
    +vn 0.456064 0.574001 0.680095
    +vn 0.502509 0.431220 0.749355
    +vn 0.502509 0.431220 0.749355
    +vn 0.637936 0.431366 0.637936
    +vn 0.578939 0.574160 0.578939
    +vn 0.456064 0.574001 0.680095
    +vn 0.315066 0.573550 0.756158
    +vn 0.347093 0.430809 0.833024
    +vn 0.347093 0.430809 0.833024
    +vn 0.502509 0.431220 0.749355
    +vn 0.456064 0.574001 0.680095
    +vn 0.315066 0.573550 0.756158
    +vn 0.160736 0.572946 0.803677
    +vn 0.177035 0.430259 0.885176
    +vn 0.177035 0.430259 0.885176
    +vn 0.347093 0.430809 0.833024
    +vn 0.315066 0.573550 0.756158
    +vn 0.160736 0.572946 0.803677
    +vn 0.000000 0.572589 0.819843
    +vn 0.000000 0.429934 0.902860
    +vn 0.000000 0.429934 0.902860
    +vn 0.177035 0.430259 0.885176
    +vn 0.160736 0.572946 0.803677
    +vn 0.000000 -0.429934 -0.902860
    +vn 0.177035 -0.430259 -0.885176
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.000000 -0.246154 -0.969231
    +vn 0.000000 -0.429934 -0.902860
    +vn 0.177035 -0.430259 -0.885176
    +vn 0.347093 -0.430809 -0.833024
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.177035 -0.430259 -0.885176
    +vn 0.347093 -0.430809 -0.833024
    +vn 0.502509 -0.431220 -0.749355
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.347093 -0.430809 -0.833024
    +vn 0.502509 -0.431220 -0.749355
    +vn 0.637936 -0.431366 -0.637936
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.502509 -0.431220 -0.749355
    +vn 0.637936 -0.431366 -0.637936
    +vn 0.749355 -0.431220 -0.502509
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.637936 -0.431366 -0.637936
    +vn 0.749355 -0.431220 -0.502509
    +vn 0.833024 -0.430809 -0.347093
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.749355 -0.431220 -0.502509
    +vn 0.833024 -0.430809 -0.347093
    +vn 0.885176 -0.430259 -0.177035
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.833024 -0.430809 -0.347093
    +vn 0.885176 -0.430259 -0.177035
    +vn 0.902860 -0.429934 -0.000000
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.885176 -0.430259 -0.177035
    +vn 0.000000 -0.246154 -0.969231
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.195231 0.094896 -0.976155
    +vn 0.195231 0.094896 -0.976155
    +vn 0.000000 0.094809 -0.995495
    +vn 0.000000 -0.246154 -0.969231
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.382874 0.095044 -0.918898
    +vn 0.382874 0.095044 -0.918898
    +vn 0.195231 0.094896 -0.976155
    +vn 0.190071 -0.246368 -0.950356
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.554426 0.095154 -0.826775
    +vn 0.554426 0.095154 -0.826775
    +vn 0.382874 0.095044 -0.918898
    +vn 0.372725 -0.246732 -0.894539
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.703896 0.095193 -0.703896
    +vn 0.703896 0.095193 -0.703896
    +vn 0.554426 0.095154 -0.826775
    +vn 0.539696 -0.247004 -0.804809
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.826775 0.095154 -0.554426
    +vn 0.826775 0.095154 -0.554426
    +vn 0.703896 0.095193 -0.703896
    +vn 0.685179 -0.247100 -0.685179
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.918898 0.095044 -0.382874
    +vn 0.918898 0.095044 -0.382874
    +vn 0.826775 0.095154 -0.554426
    +vn 0.804809 -0.247004 -0.539696
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.976155 0.094896 -0.195231
    +vn 0.976155 0.094896 -0.195231
    +vn 0.918898 0.095044 -0.382874
    +vn 0.894539 -0.246732 -0.372725
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.995495 0.094809 -0.000000
    +vn 0.995495 0.094809 -0.000000
    +vn 0.976155 0.094896 -0.195231
    +vn 0.950356 -0.246368 -0.190071
    +vn 0.000000 0.094809 -0.995495
    +vn 0.195231 0.094896 -0.976155
    +vn 0.141952 0.689990 -0.709762
    +vn 0.141952 0.689990 -0.709762
    +vn 0.000000 0.689655 -0.724138
    +vn 0.000000 0.094809 -0.995495
    +vn 0.195231 0.094896 -0.976155
    +vn 0.382874 0.095044 -0.918898
    +vn 0.278184 0.690558 -0.667641
    +vn 0.278184 0.690558 -0.667641
    +vn 0.141952 0.689990 -0.709762
    +vn 0.195231 0.094896 -0.976155
    +vn 0.382874 0.095044 -0.918898
    +vn 0.554426 0.095154 -0.826775
    +vn 0.402606 0.690981 -0.600378
    +vn 0.402606 0.690981 -0.600378
    +vn 0.278184 0.690558 -0.667641
    +vn 0.382874 0.095044 -0.918898
    +vn 0.554426 0.095154 -0.826775
    +vn 0.703896 0.095193 -0.703896
    +vn 0.511047 0.691131 -0.511047
    +vn 0.511047 0.691131 -0.511047
    +vn 0.402606 0.690981 -0.600378
    +vn 0.554426 0.095154 -0.826775
    +vn 0.703896 0.095193 -0.703896
    +vn 0.826775 0.095154 -0.554426
    +vn 0.600378 0.690981 -0.402606
    +vn 0.600378 0.690981 -0.402606
    +vn 0.511047 0.691131 -0.511047
    +vn 0.703896 0.095193 -0.703896
    +vn 0.826775 0.095154 -0.554426
    +vn 0.918898 0.095044 -0.382874
    +vn 0.667641 0.690558 -0.278184
    +vn 0.667641 0.690558 -0.278184
    +vn 0.600378 0.690981 -0.402606
    +vn 0.826775 0.095154 -0.554426
    +vn 0.918898 0.095044 -0.382874
    +vn 0.976155 0.094896 -0.195231
    +vn 0.709762 0.689990 -0.141952
    +vn 0.709762 0.689990 -0.141952
    +vn 0.667641 0.690558 -0.278184
    +vn 0.918898 0.095044 -0.382874
    +vn 0.976155 0.094896 -0.195231
    +vn 0.995495 0.094809 -0.000000
    +vn 0.724138 0.689655 0.000000
    +vn 0.724138 0.689655 0.000000
    +vn 0.709762 0.689990 -0.141952
    +vn 0.976155 0.094896 -0.195231
    +vn 0.000000 0.689655 -0.724138
    +vn 0.141952 0.689990 -0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.689655 -0.724138
    +vn 0.141952 0.689990 -0.709762
    +vn 0.278184 0.690558 -0.667641
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.141952 0.689990 -0.709762
    +vn 0.278184 0.690558 -0.667641
    +vn 0.402606 0.690981 -0.600378
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.278184 0.690558 -0.667641
    +vn 0.402606 0.690981 -0.600378
    +vn 0.511047 0.691131 -0.511047
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.402606 0.690981 -0.600378
    +vn 0.511047 0.691131 -0.511047
    +vn 0.600378 0.690981 -0.402606
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.511047 0.691131 -0.511047
    +vn 0.600378 0.690981 -0.402606
    +vn 0.667641 0.690558 -0.278184
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.600378 0.690981 -0.402606
    +vn 0.667641 0.690558 -0.278184
    +vn 0.709762 0.689990 -0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.667641 0.690558 -0.278184
    +vn 0.709762 0.689990 -0.141952
    +vn 0.724138 0.689655 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.709762 0.689990 -0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.091095 0.885575 0.455476
    +vn -0.091095 0.885575 0.455476
    +vn 0.000000 0.885398 0.464834
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.178432 0.885875 0.428238
    +vn -0.178432 0.885875 0.428238
    +vn -0.091095 0.885575 0.455476
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.258146 0.886098 0.384955
    +vn -0.258146 0.886098 0.384955
    +vn -0.178432 0.885875 0.428238
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.327636 0.886177 0.327636
    +vn -0.327636 0.886177 0.327636
    +vn -0.258146 0.886098 0.384955
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.384955 0.886098 0.258146
    +vn -0.384955 0.886098 0.258146
    +vn -0.327636 0.886177 0.327636
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.428238 0.885875 0.178432
    +vn -0.428238 0.885875 0.178432
    +vn -0.384955 0.886098 0.258146
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.455476 0.885575 0.091095
    +vn -0.455476 0.885575 0.091095
    +vn -0.428238 0.885875 0.178432
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.464834 0.885398 0.000000
    +vn -0.464834 0.885398 0.000000
    +vn -0.455476 0.885575 0.091095
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.885398 0.464834
    +vn -0.091095 0.885575 0.455476
    +vn -0.135348 0.723675 0.676739
    +vn -0.135348 0.723675 0.676739
    +vn 0.000000 0.723356 0.690476
    +vn 0.000000 0.885398 0.464834
    +vn -0.091095 0.885575 0.455476
    +vn -0.178432 0.885875 0.428238
    +vn -0.265220 0.724216 0.636529
    +vn -0.265220 0.724216 0.636529
    +vn -0.135348 0.723675 0.676739
    +vn -0.091095 0.885575 0.455476
    +vn -0.178432 0.885875 0.428238
    +vn -0.258146 0.886098 0.384955
    +vn -0.383824 0.724620 0.572369
    +vn -0.383824 0.724620 0.572369
    +vn -0.265220 0.724216 0.636529
    +vn -0.178432 0.885875 0.428238
    +vn -0.258146 0.886098 0.384955
    +vn -0.327636 0.886177 0.327636
    +vn -0.487196 0.724762 0.487196
    +vn -0.487196 0.724762 0.487196
    +vn -0.383824 0.724620 0.572369
    +vn -0.258146 0.886098 0.384955
    +vn -0.327636 0.886177 0.327636
    +vn -0.384955 0.886098 0.258146
    +vn -0.572369 0.724620 0.383824
    +vn -0.572369 0.724620 0.383824
    +vn -0.487196 0.724762 0.487196
    +vn -0.327636 0.886177 0.327636
    +vn -0.384955 0.886098 0.258146
    +vn -0.428238 0.885875 0.178432
    +vn -0.636529 0.724216 0.265220
    +vn -0.636529 0.724216 0.265220
    +vn -0.572369 0.724620 0.383824
    +vn -0.384955 0.886098 0.258146
    +vn -0.428238 0.885875 0.178432
    +vn -0.455476 0.885575 0.091095
    +vn -0.676739 0.723675 0.135348
    +vn -0.676739 0.723675 0.135348
    +vn -0.636529 0.724216 0.265220
    +vn -0.428238 0.885875 0.178432
    +vn -0.455476 0.885575 0.091095
    +vn -0.464834 0.885398 0.000000
    +vn -0.690476 0.723356 0.000000
    +vn -0.690476 0.723356 0.000000
    +vn -0.676739 0.723675 0.135348
    +vn -0.455476 0.885575 0.091095
    +vn 0.000000 0.723356 0.690476
    +vn -0.135348 0.723675 0.676739
    +vn -0.160736 0.572946 0.803677
    +vn -0.160736 0.572946 0.803677
    +vn 0.000000 0.572589 0.819843
    +vn 0.000000 0.723356 0.690476
    +vn -0.135348 0.723675 0.676739
    +vn -0.265220 0.724216 0.636529
    +vn -0.315066 0.573550 0.756158
    +vn -0.315066 0.573550 0.756158
    +vn -0.160736 0.572946 0.803677
    +vn -0.135348 0.723675 0.676739
    +vn -0.265220 0.724216 0.636529
    +vn -0.383824 0.724620 0.572369
    +vn -0.456064 0.574001 0.680095
    +vn -0.456064 0.574001 0.680095
    +vn -0.315066 0.573550 0.756158
    +vn -0.265220 0.724216 0.636529
    +vn -0.383824 0.724620 0.572369
    +vn -0.487196 0.724762 0.487196
    +vn -0.578939 0.574160 0.578939
    +vn -0.578939 0.574160 0.578939
    +vn -0.456064 0.574001 0.680095
    +vn -0.383824 0.724620 0.572369
    +vn -0.487196 0.724762 0.487196
    +vn -0.572369 0.724620 0.383824
    +vn -0.680095 0.574001 0.456064
    +vn -0.680095 0.574001 0.456064
    +vn -0.578939 0.574160 0.578939
    +vn -0.487196 0.724762 0.487196
    +vn -0.572369 0.724620 0.383824
    +vn -0.636529 0.724216 0.265220
    +vn -0.756158 0.573550 0.315066
    +vn -0.756158 0.573550 0.315066
    +vn -0.680095 0.574001 0.456064
    +vn -0.572369 0.724620 0.383824
    +vn -0.636529 0.724216 0.265220
    +vn -0.676739 0.723675 0.135348
    +vn -0.803677 0.572946 0.160736
    +vn -0.803677 0.572946 0.160736
    +vn -0.756158 0.573550 0.315066
    +vn -0.636529 0.724216 0.265220
    +vn -0.676739 0.723675 0.135348
    +vn -0.690476 0.723356 0.000000
    +vn -0.819843 0.572589 0.000000
    +vn -0.819843 0.572589 0.000000
    +vn -0.803677 0.572946 0.160736
    +vn -0.676739 0.723675 0.135348
    +vn 0.000000 0.572589 0.819843
    +vn -0.160736 0.572946 0.803677
    +vn -0.177035 0.430259 0.885176
    +vn -0.177035 0.430259 0.885176
    +vn 0.000000 0.429934 0.902860
    +vn 0.000000 0.572589 0.819843
    +vn -0.160736 0.572946 0.803677
    +vn -0.315066 0.573550 0.756158
    +vn -0.347093 0.430809 0.833024
    +vn -0.347093 0.430809 0.833024
    +vn -0.177035 0.430259 0.885176
    +vn -0.160736 0.572946 0.803677
    +vn -0.315066 0.573550 0.756158
    +vn -0.456064 0.574001 0.680095
    +vn -0.502509 0.431220 0.749355
    +vn -0.502509 0.431220 0.749355
    +vn -0.347093 0.430809 0.833024
    +vn -0.315066 0.573550 0.756158
    +vn -0.456064 0.574001 0.680095
    +vn -0.578939 0.574160 0.578939
    +vn -0.637936 0.431366 0.637936
    +vn -0.637936 0.431366 0.637936
    +vn -0.502509 0.431220 0.749355
    +vn -0.456064 0.574001 0.680095
    +vn -0.578939 0.574160 0.578939
    +vn -0.680095 0.574001 0.456064
    +vn -0.749355 0.431220 0.502509
    +vn -0.749355 0.431220 0.502509
    +vn -0.637936 0.431366 0.637936
    +vn -0.578939 0.574160 0.578939
    +vn -0.680095 0.574001 0.456064
    +vn -0.756158 0.573550 0.315066
    +vn -0.833024 0.430809 0.347093
    +vn -0.833024 0.430809 0.347093
    +vn -0.749355 0.431220 0.502509
    +vn -0.680095 0.574001 0.456064
    +vn -0.756158 0.573550 0.315066
    +vn -0.803677 0.572946 0.160736
    +vn -0.885176 0.430259 0.177035
    +vn -0.885176 0.430259 0.177035
    +vn -0.833024 0.430809 0.347093
    +vn -0.756158 0.573550 0.315066
    +vn -0.803677 0.572946 0.160736
    +vn -0.819843 0.572589 0.000000
    +vn -0.902860 0.429934 0.000000
    +vn -0.902860 0.429934 0.000000
    +vn -0.885176 0.430259 0.177035
    +vn -0.803677 0.572946 0.160736
    +vn 0.902860 -0.429934 -0.000000
    +vn 0.885176 -0.430259 0.177035
    +vn 0.950356 -0.246368 0.190071
    +vn 0.950356 -0.246368 0.190071
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.902860 -0.429934 -0.000000
    +vn 0.885176 -0.430259 0.177035
    +vn 0.833024 -0.430809 0.347093
    +vn 0.894539 -0.246732 0.372725
    +vn 0.894539 -0.246732 0.372725
    +vn 0.950356 -0.246368 0.190071
    +vn 0.885176 -0.430259 0.177035
    +vn 0.833024 -0.430809 0.347093
    +vn 0.749355 -0.431220 0.502509
    +vn 0.804809 -0.247004 0.539696
    +vn 0.804809 -0.247004 0.539696
    +vn 0.894539 -0.246732 0.372725
    +vn 0.833024 -0.430809 0.347093
    +vn 0.749355 -0.431220 0.502509
    +vn 0.637936 -0.431366 0.637936
    +vn 0.685179 -0.247100 0.685179
    +vn 0.685179 -0.247100 0.685179
    +vn 0.804809 -0.247004 0.539696
    +vn 0.749355 -0.431220 0.502509
    +vn 0.637936 -0.431366 0.637936
    +vn 0.502509 -0.431220 0.749355
    +vn 0.539696 -0.247004 0.804809
    +vn 0.539696 -0.247004 0.804809
    +vn 0.685179 -0.247100 0.685179
    +vn 0.637936 -0.431366 0.637936
    +vn 0.502509 -0.431220 0.749355
    +vn 0.347093 -0.430809 0.833024
    +vn 0.372725 -0.246732 0.894539
    +vn 0.372725 -0.246732 0.894539
    +vn 0.539696 -0.247004 0.804809
    +vn 0.502509 -0.431220 0.749355
    +vn 0.347093 -0.430809 0.833024
    +vn 0.177035 -0.430259 0.885176
    +vn 0.190071 -0.246368 0.950356
    +vn 0.190071 -0.246368 0.950356
    +vn 0.372725 -0.246732 0.894539
    +vn 0.347093 -0.430809 0.833024
    +vn 0.177035 -0.430259 0.885176
    +vn 0.000000 -0.429934 0.902860
    +vn 0.000000 -0.246154 0.969231
    +vn 0.000000 -0.246154 0.969231
    +vn 0.190071 -0.246368 0.950356
    +vn 0.177035 -0.430259 0.885176
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.950356 -0.246368 0.190071
    +vn 0.976155 0.094896 0.195231
    +vn 0.976155 0.094896 0.195231
    +vn 0.995495 0.094809 0.000000
    +vn 0.969231 -0.246154 -0.000000
    +vn 0.950356 -0.246368 0.190071
    +vn 0.894539 -0.246732 0.372725
    +vn 0.918898 0.095044 0.382874
    +vn 0.918898 0.095044 0.382874
    +vn 0.976155 0.094896 0.195231
    +vn 0.950356 -0.246368 0.190071
    +vn 0.894539 -0.246732 0.372725
    +vn 0.804809 -0.247004 0.539696
    +vn 0.826775 0.095154 0.554426
    +vn 0.826775 0.095154 0.554426
    +vn 0.918898 0.095044 0.382874
    +vn 0.894539 -0.246732 0.372725
    +vn 0.804809 -0.247004 0.539696
    +vn 0.685179 -0.247100 0.685179
    +vn 0.703896 0.095193 0.703896
    +vn 0.703896 0.095193 0.703896
    +vn 0.826775 0.095154 0.554426
    +vn 0.804809 -0.247004 0.539696
    +vn 0.685179 -0.247100 0.685179
    +vn 0.539696 -0.247004 0.804809
    +vn 0.554426 0.095154 0.826775
    +vn 0.554426 0.095154 0.826775
    +vn 0.703896 0.095193 0.703896
    +vn 0.685179 -0.247100 0.685179
    +vn 0.539696 -0.247004 0.804809
    +vn 0.372725 -0.246732 0.894539
    +vn 0.382874 0.095044 0.918898
    +vn 0.382874 0.095044 0.918898
    +vn 0.554426 0.095154 0.826775
    +vn 0.539696 -0.247004 0.804809
    +vn 0.372725 -0.246732 0.894539
    +vn 0.190071 -0.246368 0.950356
    +vn 0.195231 0.094896 0.976155
    +vn 0.195231 0.094896 0.976155
    +vn 0.382874 0.095044 0.918898
    +vn 0.372725 -0.246732 0.894539
    +vn 0.190071 -0.246368 0.950356
    +vn 0.000000 -0.246154 0.969231
    +vn 0.000000 0.094809 0.995495
    +vn 0.000000 0.094809 0.995495
    +vn 0.195231 0.094896 0.976155
    +vn 0.190071 -0.246368 0.950356
    +vn 0.995495 0.094809 0.000000
    +vn 0.976155 0.094896 0.195231
    +vn 0.709762 0.689990 0.141952
    +vn 0.709762 0.689990 0.141952
    +vn 0.724138 0.689655 0.000000
    +vn 0.995495 0.094809 0.000000
    +vn 0.976155 0.094896 0.195231
    +vn 0.918898 0.095044 0.382874
    +vn 0.667641 0.690558 0.278184
    +vn 0.667641 0.690558 0.278184
    +vn 0.709762 0.689990 0.141952
    +vn 0.976155 0.094896 0.195231
    +vn 0.918898 0.095044 0.382874
    +vn 0.826775 0.095154 0.554426
    +vn 0.600378 0.690981 0.402606
    +vn 0.600378 0.690981 0.402606
    +vn 0.667641 0.690558 0.278184
    +vn 0.918898 0.095044 0.382874
    +vn 0.826775 0.095154 0.554426
    +vn 0.703896 0.095193 0.703896
    +vn 0.511047 0.691131 0.511047
    +vn 0.511047 0.691131 0.511047
    +vn 0.600378 0.690981 0.402606
    +vn 0.826775 0.095154 0.554426
    +vn 0.703896 0.095193 0.703896
    +vn 0.554426 0.095154 0.826775
    +vn 0.402606 0.690981 0.600378
    +vn 0.402606 0.690981 0.600378
    +vn 0.511047 0.691131 0.511047
    +vn 0.703896 0.095193 0.703896
    +vn 0.554426 0.095154 0.826775
    +vn 0.382874 0.095044 0.918898
    +vn 0.278184 0.690558 0.667641
    +vn 0.278184 0.690558 0.667641
    +vn 0.402606 0.690981 0.600378
    +vn 0.554426 0.095154 0.826775
    +vn 0.382874 0.095044 0.918898
    +vn 0.195231 0.094896 0.976155
    +vn 0.141952 0.689990 0.709762
    +vn 0.141952 0.689990 0.709762
    +vn 0.278184 0.690558 0.667641
    +vn 0.382874 0.095044 0.918898
    +vn 0.195231 0.094896 0.976155
    +vn 0.000000 0.094809 0.995495
    +vn 0.000000 0.689655 0.724138
    +vn 0.000000 0.689655 0.724138
    +vn 0.141952 0.689990 0.709762
    +vn 0.195231 0.094896 0.976155
    +vn 0.724138 0.689655 0.000000
    +vn 0.709762 0.689990 0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.724138 0.689655 0.000000
    +vn 0.709762 0.689990 0.141952
    +vn 0.667641 0.690558 0.278184
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.709762 0.689990 0.141952
    +vn 0.667641 0.690558 0.278184
    +vn 0.600378 0.690981 0.402606
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.667641 0.690558 0.278184
    +vn 0.600378 0.690981 0.402606
    +vn 0.511047 0.691131 0.511047
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.600378 0.690981 0.402606
    +vn 0.511047 0.691131 0.511047
    +vn 0.402606 0.690981 0.600378
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.511047 0.691131 0.511047
    +vn 0.402606 0.690981 0.600378
    +vn 0.278184 0.690558 0.667641
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.402606 0.690981 0.600378
    +vn 0.278184 0.690558 0.667641
    +vn 0.141952 0.689990 0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.278184 0.690558 0.667641
    +vn 0.141952 0.689990 0.709762
    +vn 0.000000 0.689655 0.724138
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.141952 0.689990 0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.455476 0.885575 -0.091095
    +vn -0.455476 0.885575 -0.091095
    +vn -0.464834 0.885398 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.428238 0.885875 -0.178432
    +vn -0.428238 0.885875 -0.178432
    +vn -0.455476 0.885575 -0.091095
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.384955 0.886098 -0.258146
    +vn -0.384955 0.886098 -0.258146
    +vn -0.428238 0.885875 -0.178432
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.327636 0.886177 -0.327636
    +vn -0.327636 0.886177 -0.327636
    +vn -0.384955 0.886098 -0.258146
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.258146 0.886098 -0.384955
    +vn -0.258146 0.886098 -0.384955
    +vn -0.327636 0.886177 -0.327636
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.178432 0.885875 -0.428238
    +vn -0.178432 0.885875 -0.428238
    +vn -0.258146 0.886098 -0.384955
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.091095 0.885575 -0.455476
    +vn -0.091095 0.885575 -0.455476
    +vn -0.178432 0.885875 -0.428238
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.000000 0.885398 -0.464834
    +vn -0.000000 0.885398 -0.464834
    +vn -0.091095 0.885575 -0.455476
    +vn 0.000000 1.000000 0.000000
    +vn -0.464834 0.885398 0.000000
    +vn -0.455476 0.885575 -0.091095
    +vn -0.676739 0.723675 -0.135348
    +vn -0.676739 0.723675 -0.135348
    +vn -0.690476 0.723356 0.000000
    +vn -0.464834 0.885398 0.000000
    +vn -0.455476 0.885575 -0.091095
    +vn -0.428238 0.885875 -0.178432
    +vn -0.636529 0.724216 -0.265220
    +vn -0.636529 0.724216 -0.265220
    +vn -0.676739 0.723675 -0.135348
    +vn -0.455476 0.885575 -0.091095
    +vn -0.428238 0.885875 -0.178432
    +vn -0.384955 0.886098 -0.258146
    +vn -0.572369 0.724620 -0.383824
    +vn -0.572369 0.724620 -0.383824
    +vn -0.636529 0.724216 -0.265220
    +vn -0.428238 0.885875 -0.178432
    +vn -0.384955 0.886098 -0.258146
    +vn -0.327636 0.886177 -0.327636
    +vn -0.487196 0.724762 -0.487196
    +vn -0.487196 0.724762 -0.487196
    +vn -0.572369 0.724620 -0.383824
    +vn -0.384955 0.886098 -0.258146
    +vn -0.327636 0.886177 -0.327636
    +vn -0.258146 0.886098 -0.384955
    +vn -0.383824 0.724620 -0.572369
    +vn -0.383824 0.724620 -0.572369
    +vn -0.487196 0.724762 -0.487196
    +vn -0.327636 0.886177 -0.327636
    +vn -0.258146 0.886098 -0.384955
    +vn -0.178432 0.885875 -0.428238
    +vn -0.265220 0.724216 -0.636529
    +vn -0.265220 0.724216 -0.636529
    +vn -0.383824 0.724620 -0.572369
    +vn -0.258146 0.886098 -0.384955
    +vn -0.178432 0.885875 -0.428238
    +vn -0.091095 0.885575 -0.455476
    +vn -0.135348 0.723675 -0.676739
    +vn -0.135348 0.723675 -0.676739
    +vn -0.265220 0.724216 -0.636529
    +vn -0.178432 0.885875 -0.428238
    +vn -0.091095 0.885575 -0.455476
    +vn -0.000000 0.885398 -0.464834
    +vn -0.000000 0.723356 -0.690476
    +vn -0.000000 0.723356 -0.690476
    +vn -0.135348 0.723675 -0.676739
    +vn -0.091095 0.885575 -0.455476
    +vn -0.690476 0.723356 0.000000
    +vn -0.676739 0.723675 -0.135348
    +vn -0.803677 0.572946 -0.160736
    +vn -0.803677 0.572946 -0.160736
    +vn -0.819843 0.572589 0.000000
    +vn -0.690476 0.723356 0.000000
    +vn -0.676739 0.723675 -0.135348
    +vn -0.636529 0.724216 -0.265220
    +vn -0.756158 0.573550 -0.315066
    +vn -0.756158 0.573550 -0.315066
    +vn -0.803677 0.572946 -0.160736
    +vn -0.676739 0.723675 -0.135348
    +vn -0.636529 0.724216 -0.265220
    +vn -0.572369 0.724620 -0.383824
    +vn -0.680095 0.574001 -0.456064
    +vn -0.680095 0.574001 -0.456064
    +vn -0.756158 0.573550 -0.315066
    +vn -0.636529 0.724216 -0.265220
    +vn -0.572369 0.724620 -0.383824
    +vn -0.487196 0.724762 -0.487196
    +vn -0.578939 0.574160 -0.578939
    +vn -0.578939 0.574160 -0.578939
    +vn -0.680095 0.574001 -0.456064
    +vn -0.572369 0.724620 -0.383824
    +vn -0.487196 0.724762 -0.487196
    +vn -0.383824 0.724620 -0.572369
    +vn -0.456064 0.574001 -0.680095
    +vn -0.456064 0.574001 -0.680095
    +vn -0.578939 0.574160 -0.578939
    +vn -0.487196 0.724762 -0.487196
    +vn -0.383824 0.724620 -0.572369
    +vn -0.265220 0.724216 -0.636529
    +vn -0.315066 0.573550 -0.756158
    +vn -0.315066 0.573550 -0.756158
    +vn -0.456064 0.574001 -0.680095
    +vn -0.383824 0.724620 -0.572369
    +vn -0.265220 0.724216 -0.636529
    +vn -0.135348 0.723675 -0.676739
    +vn -0.160736 0.572946 -0.803677
    +vn -0.160736 0.572946 -0.803677
    +vn -0.315066 0.573550 -0.756158
    +vn -0.265220 0.724216 -0.636529
    +vn -0.135348 0.723675 -0.676739
    +vn -0.000000 0.723356 -0.690476
    +vn -0.000000 0.572589 -0.819843
    +vn -0.000000 0.572589 -0.819843
    +vn -0.160736 0.572946 -0.803677
    +vn -0.135348 0.723675 -0.676739
    +vn -0.819843 0.572589 0.000000
    +vn -0.803677 0.572946 -0.160736
    +vn -0.885176 0.430259 -0.177035
    +vn -0.885176 0.430259 -0.177035
    +vn -0.902860 0.429934 0.000000
    +vn -0.819843 0.572589 0.000000
    +vn -0.803677 0.572946 -0.160736
    +vn -0.756158 0.573550 -0.315066
    +vn -0.833024 0.430809 -0.347093
    +vn -0.833024 0.430809 -0.347093
    +vn -0.885176 0.430259 -0.177035
    +vn -0.803677 0.572946 -0.160736
    +vn -0.756158 0.573550 -0.315066
    +vn -0.680095 0.574001 -0.456064
    +vn -0.749355 0.431220 -0.502509
    +vn -0.749355 0.431220 -0.502509
    +vn -0.833024 0.430809 -0.347093
    +vn -0.756158 0.573550 -0.315066
    +vn -0.680095 0.574001 -0.456064
    +vn -0.578939 0.574160 -0.578939
    +vn -0.637936 0.431366 -0.637936
    +vn -0.637936 0.431366 -0.637936
    +vn -0.749355 0.431220 -0.502509
    +vn -0.680095 0.574001 -0.456064
    +vn -0.578939 0.574160 -0.578939
    +vn -0.456064 0.574001 -0.680095
    +vn -0.502509 0.431220 -0.749355
    +vn -0.502509 0.431220 -0.749355
    +vn -0.637936 0.431366 -0.637936
    +vn -0.578939 0.574160 -0.578939
    +vn -0.456064 0.574001 -0.680095
    +vn -0.315066 0.573550 -0.756158
    +vn -0.347093 0.430809 -0.833024
    +vn -0.347093 0.430809 -0.833024
    +vn -0.502509 0.431220 -0.749355
    +vn -0.456064 0.574001 -0.680095
    +vn -0.315066 0.573550 -0.756158
    +vn -0.160736 0.572946 -0.803677
    +vn -0.177035 0.430259 -0.885176
    +vn -0.177035 0.430259 -0.885176
    +vn -0.347093 0.430809 -0.833024
    +vn -0.315066 0.573550 -0.756158
    +vn -0.160736 0.572946 -0.803677
    +vn -0.000000 0.572589 -0.819843
    +vn -0.000000 0.429934 -0.902860
    +vn -0.000000 0.429934 -0.902860
    +vn -0.177035 0.430259 -0.885176
    +vn -0.160736 0.572946 -0.803677
    +vn 0.000000 -0.429934 0.902860
    +vn -0.177035 -0.430259 0.885176
    +vn -0.190071 -0.246368 0.950356
    +vn -0.190071 -0.246368 0.950356
    +vn 0.000000 -0.246154 0.969231
    +vn 0.000000 -0.429934 0.902860
    +vn -0.177035 -0.430259 0.885176
    +vn -0.347093 -0.430809 0.833024
    +vn -0.372725 -0.246732 0.894539
    +vn -0.372725 -0.246732 0.894539
    +vn -0.190071 -0.246368 0.950356
    +vn -0.177035 -0.430259 0.885176
    +vn -0.347093 -0.430809 0.833024
    +vn -0.502509 -0.431220 0.749355
    +vn -0.539696 -0.247004 0.804809
    +vn -0.539696 -0.247004 0.804809
    +vn -0.372725 -0.246732 0.894539
    +vn -0.347093 -0.430809 0.833024
    +vn -0.502509 -0.431220 0.749355
    +vn -0.637936 -0.431366 0.637936
    +vn -0.685179 -0.247100 0.685179
    +vn -0.685179 -0.247100 0.685179
    +vn -0.539696 -0.247004 0.804809
    +vn -0.502509 -0.431220 0.749355
    +vn -0.637936 -0.431366 0.637936
    +vn -0.749355 -0.431220 0.502509
    +vn -0.804809 -0.247004 0.539696
    +vn -0.804809 -0.247004 0.539696
    +vn -0.685179 -0.247100 0.685179
    +vn -0.637936 -0.431366 0.637936
    +vn -0.749355 -0.431220 0.502509
    +vn -0.833024 -0.430809 0.347093
    +vn -0.894539 -0.246732 0.372725
    +vn -0.894539 -0.246732 0.372725
    +vn -0.804809 -0.247004 0.539696
    +vn -0.749355 -0.431220 0.502509
    +vn -0.833024 -0.430809 0.347093
    +vn -0.885176 -0.430259 0.177035
    +vn -0.950356 -0.246368 0.190071
    +vn -0.950356 -0.246368 0.190071
    +vn -0.894539 -0.246732 0.372725
    +vn -0.833024 -0.430809 0.347093
    +vn -0.885176 -0.430259 0.177035
    +vn -0.902860 -0.429934 0.000000
    +vn -0.969231 -0.246154 0.000000
    +vn -0.969231 -0.246154 0.000000
    +vn -0.950356 -0.246368 0.190071
    +vn -0.885176 -0.430259 0.177035
    +vn 0.000000 -0.246154 0.969231
    +vn -0.190071 -0.246368 0.950356
    +vn -0.195231 0.094896 0.976155
    +vn -0.195231 0.094896 0.976155
    +vn 0.000000 0.094809 0.995495
    +vn 0.000000 -0.246154 0.969231
    +vn -0.190071 -0.246368 0.950356
    +vn -0.372725 -0.246732 0.894539
    +vn -0.382874 0.095044 0.918898
    +vn -0.382874 0.095044 0.918898
    +vn -0.195231 0.094896 0.976155
    +vn -0.190071 -0.246368 0.950356
    +vn -0.372725 -0.246732 0.894539
    +vn -0.539696 -0.247004 0.804809
    +vn -0.554426 0.095154 0.826775
    +vn -0.554426 0.095154 0.826775
    +vn -0.382874 0.095044 0.918898
    +vn -0.372725 -0.246732 0.894539
    +vn -0.539696 -0.247004 0.804809
    +vn -0.685179 -0.247100 0.685179
    +vn -0.703896 0.095193 0.703896
    +vn -0.703896 0.095193 0.703896
    +vn -0.554426 0.095154 0.826775
    +vn -0.539696 -0.247004 0.804809
    +vn -0.685179 -0.247100 0.685179
    +vn -0.804809 -0.247004 0.539696
    +vn -0.826775 0.095154 0.554426
    +vn -0.826775 0.095154 0.554426
    +vn -0.703896 0.095193 0.703896
    +vn -0.685179 -0.247100 0.685179
    +vn -0.804809 -0.247004 0.539696
    +vn -0.894539 -0.246732 0.372725
    +vn -0.918898 0.095044 0.382874
    +vn -0.918898 0.095044 0.382874
    +vn -0.826775 0.095154 0.554426
    +vn -0.804809 -0.247004 0.539696
    +vn -0.894539 -0.246732 0.372725
    +vn -0.950356 -0.246368 0.190071
    +vn -0.976155 0.094896 0.195231
    +vn -0.976155 0.094896 0.195231
    +vn -0.918898 0.095044 0.382874
    +vn -0.894539 -0.246732 0.372725
    +vn -0.950356 -0.246368 0.190071
    +vn -0.969231 -0.246154 0.000000
    +vn -0.995495 0.094809 0.000000
    +vn -0.995495 0.094809 0.000000
    +vn -0.976155 0.094896 0.195231
    +vn -0.950356 -0.246368 0.190071
    +vn 0.000000 0.094809 0.995495
    +vn -0.195231 0.094896 0.976155
    +vn -0.141952 0.689990 0.709762
    +vn -0.141952 0.689990 0.709762
    +vn 0.000000 0.689655 0.724138
    +vn 0.000000 0.094809 0.995495
    +vn -0.195231 0.094896 0.976155
    +vn -0.382874 0.095044 0.918898
    +vn -0.278184 0.690558 0.667641
    +vn -0.278184 0.690558 0.667641
    +vn -0.141952 0.689990 0.709762
    +vn -0.195231 0.094896 0.976155
    +vn -0.382874 0.095044 0.918898
    +vn -0.554426 0.095154 0.826775
    +vn -0.402606 0.690981 0.600378
    +vn -0.402606 0.690981 0.600378
    +vn -0.278184 0.690558 0.667641
    +vn -0.382874 0.095044 0.918898
    +vn -0.554426 0.095154 0.826775
    +vn -0.703896 0.095193 0.703896
    +vn -0.511047 0.691131 0.511047
    +vn -0.511047 0.691131 0.511047
    +vn -0.402606 0.690981 0.600378
    +vn -0.554426 0.095154 0.826775
    +vn -0.703896 0.095193 0.703896
    +vn -0.826775 0.095154 0.554426
    +vn -0.600378 0.690981 0.402606
    +vn -0.600378 0.690981 0.402606
    +vn -0.511047 0.691131 0.511047
    +vn -0.703896 0.095193 0.703896
    +vn -0.826775 0.095154 0.554426
    +vn -0.918898 0.095044 0.382874
    +vn -0.667641 0.690558 0.278184
    +vn -0.667641 0.690558 0.278184
    +vn -0.600378 0.690981 0.402606
    +vn -0.826775 0.095154 0.554426
    +vn -0.918898 0.095044 0.382874
    +vn -0.976155 0.094896 0.195231
    +vn -0.709762 0.689990 0.141952
    +vn -0.709762 0.689990 0.141952
    +vn -0.667641 0.690558 0.278184
    +vn -0.918898 0.095044 0.382874
    +vn -0.976155 0.094896 0.195231
    +vn -0.995495 0.094809 0.000000
    +vn -0.724138 0.689655 0.000000
    +vn -0.724138 0.689655 0.000000
    +vn -0.709762 0.689990 0.141952
    +vn -0.976155 0.094896 0.195231
    +vn 0.000000 0.689655 0.724138
    +vn -0.141952 0.689990 0.709762
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.689655 0.724138
    +vn -0.141952 0.689990 0.709762
    +vn -0.278184 0.690558 0.667641
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.141952 0.689990 0.709762
    +vn -0.278184 0.690558 0.667641
    +vn -0.402606 0.690981 0.600378
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.278184 0.690558 0.667641
    +vn -0.402606 0.690981 0.600378
    +vn -0.511047 0.691131 0.511047
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.402606 0.690981 0.600378
    +vn -0.511047 0.691131 0.511047
    +vn -0.600378 0.690981 0.402606
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.511047 0.691131 0.511047
    +vn -0.600378 0.690981 0.402606
    +vn -0.667641 0.690558 0.278184
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.600378 0.690981 0.402606
    +vn -0.667641 0.690558 0.278184
    +vn -0.709762 0.689990 0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.667641 0.690558 0.278184
    +vn -0.709762 0.689990 0.141952
    +vn -0.724138 0.689655 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.709762 0.689990 0.141952
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.091095 0.885575 -0.455476
    +vn 0.091095 0.885575 -0.455476
    +vn 0.000000 0.885398 -0.464834
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.178432 0.885875 -0.428238
    +vn 0.178432 0.885875 -0.428238
    +vn 0.091095 0.885575 -0.455476
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.258146 0.886098 -0.384955
    +vn 0.258146 0.886098 -0.384955
    +vn 0.178432 0.885875 -0.428238
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.327636 0.886177 -0.327636
    +vn 0.327636 0.886177 -0.327636
    +vn 0.258146 0.886098 -0.384955
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.384955 0.886098 -0.258146
    +vn 0.384955 0.886098 -0.258146
    +vn 0.327636 0.886177 -0.327636
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.428238 0.885875 -0.178432
    +vn 0.428238 0.885875 -0.178432
    +vn 0.384955 0.886098 -0.258146
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.455476 0.885575 -0.091095
    +vn 0.455476 0.885575 -0.091095
    +vn 0.428238 0.885875 -0.178432
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.464834 0.885398 0.000000
    +vn 0.464834 0.885398 0.000000
    +vn 0.455476 0.885575 -0.091095
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.885398 -0.464834
    +vn 0.091095 0.885575 -0.455476
    +vn 0.135348 0.723675 -0.676739
    +vn 0.135348 0.723675 -0.676739
    +vn 0.000000 0.723356 -0.690476
    +vn 0.000000 0.885398 -0.464834
    +vn 0.091095 0.885575 -0.455476
    +vn 0.178432 0.885875 -0.428238
    +vn 0.265220 0.724216 -0.636529
    +vn 0.265220 0.724216 -0.636529
    +vn 0.135348 0.723675 -0.676739
    +vn 0.091095 0.885575 -0.455476
    +vn 0.178432 0.885875 -0.428238
    +vn 0.258146 0.886098 -0.384955
    +vn 0.383824 0.724620 -0.572369
    +vn 0.383824 0.724620 -0.572369
    +vn 0.265220 0.724216 -0.636529
    +vn 0.178432 0.885875 -0.428238
    +vn 0.258146 0.886098 -0.384955
    +vn 0.327636 0.886177 -0.327636
    +vn 0.487196 0.724762 -0.487196
    +vn 0.487196 0.724762 -0.487196
    +vn 0.383824 0.724620 -0.572369
    +vn 0.258146 0.886098 -0.384955
    +vn 0.327636 0.886177 -0.327636
    +vn 0.384955 0.886098 -0.258146
    +vn 0.572369 0.724620 -0.383824
    +vn 0.572369 0.724620 -0.383824
    +vn 0.487196 0.724762 -0.487196
    +vn 0.327636 0.886177 -0.327636
    +vn 0.384955 0.886098 -0.258146
    +vn 0.428238 0.885875 -0.178432
    +vn 0.636529 0.724216 -0.265220
    +vn 0.636529 0.724216 -0.265220
    +vn 0.572369 0.724620 -0.383824
    +vn 0.384955 0.886098 -0.258146
    +vn 0.428238 0.885875 -0.178432
    +vn 0.455476 0.885575 -0.091095
    +vn 0.676739 0.723675 -0.135348
    +vn 0.676739 0.723675 -0.135348
    +vn 0.636529 0.724216 -0.265220
    +vn 0.428238 0.885875 -0.178432
    +vn 0.455476 0.885575 -0.091095
    +vn 0.464834 0.885398 0.000000
    +vn 0.690476 0.723356 0.000000
    +vn 0.690476 0.723356 0.000000
    +vn 0.676739 0.723675 -0.135348
    +vn 0.455476 0.885575 -0.091095
    +vn 0.000000 0.723356 -0.690476
    +vn 0.135348 0.723675 -0.676739
    +vn 0.160736 0.572946 -0.803677
    +vn 0.160736 0.572946 -0.803677
    +vn 0.000000 0.572589 -0.819843
    +vn 0.000000 0.723356 -0.690476
    +vn 0.135348 0.723675 -0.676739
    +vn 0.265220 0.724216 -0.636529
    +vn 0.315066 0.573550 -0.756158
    +vn 0.315066 0.573550 -0.756158
    +vn 0.160736 0.572946 -0.803677
    +vn 0.135348 0.723675 -0.676739
    +vn 0.265220 0.724216 -0.636529
    +vn 0.383824 0.724620 -0.572369
    +vn 0.456064 0.574001 -0.680095
    +vn 0.456064 0.574001 -0.680095
    +vn 0.315066 0.573550 -0.756158
    +vn 0.265220 0.724216 -0.636529
    +vn 0.383824 0.724620 -0.572369
    +vn 0.487196 0.724762 -0.487196
    +vn 0.578939 0.574160 -0.578939
    +vn 0.578939 0.574160 -0.578939
    +vn 0.456064 0.574001 -0.680095
    +vn 0.383824 0.724620 -0.572369
    +vn 0.487196 0.724762 -0.487196
    +vn 0.572369 0.724620 -0.383824
    +vn 0.680095 0.574001 -0.456064
    +vn 0.680095 0.574001 -0.456064
    +vn 0.578939 0.574160 -0.578939
    +vn 0.487196 0.724762 -0.487196
    +vn 0.572369 0.724620 -0.383824
    +vn 0.636529 0.724216 -0.265220
    +vn 0.756158 0.573550 -0.315066
    +vn 0.756158 0.573550 -0.315066
    +vn 0.680095 0.574001 -0.456064
    +vn 0.572369 0.724620 -0.383824
    +vn 0.636529 0.724216 -0.265220
    +vn 0.676739 0.723675 -0.135348
    +vn 0.803677 0.572946 -0.160736
    +vn 0.803677 0.572946 -0.160736
    +vn 0.756158 0.573550 -0.315066
    +vn 0.636529 0.724216 -0.265220
    +vn 0.676739 0.723675 -0.135348
    +vn 0.690476 0.723356 0.000000
    +vn 0.819843 0.572589 0.000000
    +vn 0.819843 0.572589 0.000000
    +vn 0.803677 0.572946 -0.160736
    +vn 0.676739 0.723675 -0.135348
    +vn 0.000000 0.572589 -0.819843
    +vn 0.160736 0.572946 -0.803677
    +vn 0.177035 0.430259 -0.885176
    +vn 0.177035 0.430259 -0.885176
    +vn 0.000000 0.429934 -0.902860
    +vn 0.000000 0.572589 -0.819843
    +vn 0.160736 0.572946 -0.803677
    +vn 0.315066 0.573550 -0.756158
    +vn 0.347093 0.430809 -0.833024
    +vn 0.347093 0.430809 -0.833024
    +vn 0.177035 0.430259 -0.885176
    +vn 0.160736 0.572946 -0.803677
    +vn 0.315066 0.573550 -0.756158
    +vn 0.456064 0.574001 -0.680095
    +vn 0.502509 0.431220 -0.749355
    +vn 0.502509 0.431220 -0.749355
    +vn 0.347093 0.430809 -0.833024
    +vn 0.315066 0.573550 -0.756158
    +vn 0.456064 0.574001 -0.680095
    +vn 0.578939 0.574160 -0.578939
    +vn 0.637936 0.431366 -0.637936
    +vn 0.637936 0.431366 -0.637936
    +vn 0.502509 0.431220 -0.749355
    +vn 0.456064 0.574001 -0.680095
    +vn 0.578939 0.574160 -0.578939
    +vn 0.680095 0.574001 -0.456064
    +vn 0.749355 0.431220 -0.502509
    +vn 0.749355 0.431220 -0.502509
    +vn 0.637936 0.431366 -0.637936
    +vn 0.578939 0.574160 -0.578939
    +vn 0.680095 0.574001 -0.456064
    +vn 0.756158 0.573550 -0.315066
    +vn 0.833024 0.430809 -0.347093
    +vn 0.833024 0.430809 -0.347093
    +vn 0.749355 0.431220 -0.502509
    +vn 0.680095 0.574001 -0.456064
    +vn 0.756158 0.573550 -0.315066
    +vn 0.803677 0.572946 -0.160736
    +vn 0.885176 0.430259 -0.177035
    +vn 0.885176 0.430259 -0.177035
    +vn 0.833024 0.430809 -0.347093
    +vn 0.756158 0.573550 -0.315066
    +vn 0.803677 0.572946 -0.160736
    +vn 0.819843 0.572589 0.000000
    +vn 0.902860 0.429934 0.000000
    +vn 0.902860 0.429934 0.000000
    +vn 0.885176 0.430259 -0.177035
    +vn 0.803677 0.572946 -0.160736
    +vn 0.902860 0.429934 0.000000
    +vn 0.885176 0.430259 0.177035
    +vn 0.887369 0.425535 0.177474
    +vn 0.887369 0.425535 0.177474
    +vn 0.905094 0.425212 0.000000
    +vn 0.902860 0.429934 0.000000
    +vn 0.885176 0.430259 0.177035
    +vn 0.833024 0.430809 0.347093
    +vn 0.835093 0.426082 0.347956
    +vn 0.835093 0.426082 0.347956
    +vn 0.887369 0.425535 0.177474
    +vn 0.885176 0.430259 0.177035
    +vn 0.833024 0.430809 0.347093
    +vn 0.749355 0.431220 0.502509
    +vn 0.751220 0.426491 0.503759
    +vn 0.751220 0.426491 0.503759
    +vn 0.835093 0.426082 0.347956
    +vn 0.833024 0.430809 0.347093
    +vn 0.749355 0.431220 0.502509
    +vn 0.637936 0.431366 0.637936
    +vn 0.639524 0.426636 0.639524
    +vn 0.639524 0.426636 0.639524
    +vn 0.751220 0.426491 0.503759
    +vn 0.749355 0.431220 0.502509
    +vn 0.637936 0.431366 0.637936
    +vn 0.502509 0.431220 0.749355
    +vn 0.503759 0.426491 0.751220
    +vn 0.503759 0.426491 0.751220
    +vn 0.639524 0.426636 0.639524
    +vn 0.637936 0.431366 0.637936
    +vn 0.502509 0.431220 0.749355
    +vn 0.347093 0.430809 0.833024
    +vn 0.347956 0.426082 0.835093
    +vn 0.347956 0.426082 0.835093
    +vn 0.503759 0.426491 0.751220
    +vn 0.502509 0.431220 0.749355
    +vn 0.347093 0.430809 0.833024
    +vn 0.177035 0.430259 0.885176
    +vn 0.177474 0.425535 0.887369
    +vn 0.177474 0.425535 0.887369
    +vn 0.347956 0.426082 0.835093
    +vn 0.347093 0.430809 0.833024
    +vn 0.177035 0.430259 0.885176
    +vn 0.000000 0.429934 0.902860
    +vn 0.000000 0.425212 0.905094
    +vn 0.000000 0.425212 0.905094
    +vn 0.177474 0.425535 0.887369
    +vn 0.177035 0.430259 0.885176
    +vn 0.905094 0.425212 0.000000
    +vn 0.887369 0.425535 0.177474
    +vn 0.893922 0.411023 0.178784
    +vn 0.893922 0.411023 0.178784
    +vn 0.911768 0.410706 0.000000
    +vn 0.905094 0.425212 0.000000
    +vn 0.887369 0.425535 0.177474
    +vn 0.835093 0.426082 0.347956
    +vn 0.841277 0.411559 0.350532
    +vn 0.841277 0.411559 0.350532
    +vn 0.893922 0.411023 0.178784
    +vn 0.887369 0.425535 0.177474
    +vn 0.835093 0.426082 0.347956
    +vn 0.751220 0.426491 0.503759
    +vn 0.756793 0.411960 0.507497
    +vn 0.756793 0.411960 0.507497
    +vn 0.841277 0.411559 0.350532
    +vn 0.835093 0.426082 0.347956
    +vn 0.751220 0.426491 0.503759
    +vn 0.639524 0.426636 0.639524
    +vn 0.644272 0.412102 0.644272
    +vn 0.644272 0.412102 0.644272
    +vn 0.756793 0.411960 0.507497
    +vn 0.751220 0.426491 0.503759
    +vn 0.639524 0.426636 0.639524
    +vn 0.503759 0.426491 0.751220
    +vn 0.507497 0.411960 0.756793
    +vn 0.507497 0.411960 0.756793
    +vn 0.644272 0.412102 0.644272
    +vn 0.639524 0.426636 0.639524
    +vn 0.503759 0.426491 0.751220
    +vn 0.347956 0.426082 0.835093
    +vn 0.350532 0.411559 0.841277
    +vn 0.350532 0.411559 0.841277
    +vn 0.507497 0.411960 0.756793
    +vn 0.503759 0.426491 0.751220
    +vn 0.347956 0.426082 0.835093
    +vn 0.177474 0.425535 0.887369
    +vn 0.178784 0.411023 0.893922
    +vn 0.178784 0.411023 0.893922
    +vn 0.350532 0.411559 0.841277
    +vn 0.347956 0.426082 0.835093
    +vn 0.177474 0.425535 0.887369
    +vn 0.000000 0.425212 0.905094
    +vn 0.000000 0.410706 0.911768
    +vn 0.000000 0.410706 0.911768
    +vn 0.178784 0.411023 0.893922
    +vn 0.177474 0.425535 0.887369
    +vn 0.911768 0.410706 0.000000
    +vn 0.893922 0.411023 0.178784
    +vn 0.904721 0.385666 0.180944
    +vn 0.904721 0.385666 0.180944
    +vn 0.922766 0.385362 0.000000
    +vn 0.911768 0.410706 0.000000
    +vn 0.893922 0.411023 0.178784
    +vn 0.841277 0.411559 0.350532
    +vn 0.851467 0.386181 0.354778
    +vn 0.851467 0.386181 0.354778
    +vn 0.904721 0.385666 0.180944
    +vn 0.893922 0.411023 0.178784
    +vn 0.841277 0.411559 0.350532
    +vn 0.756793 0.411960 0.507497
    +vn 0.765979 0.386567 0.513656
    +vn 0.765979 0.386567 0.513656
    +vn 0.851467 0.386181 0.354778
    +vn 0.841277 0.411559 0.350532
    +vn 0.756793 0.411960 0.507497
    +vn 0.644272 0.412102 0.644272
    +vn 0.652097 0.386703 0.652097
    +vn 0.652097 0.386703 0.652097
    +vn 0.765979 0.386567 0.513656
    +vn 0.756793 0.411960 0.507497
    +vn 0.644272 0.412102 0.644272
    +vn 0.507497 0.411960 0.756793
    +vn 0.513656 0.386567 0.765979
    +vn 0.513656 0.386567 0.765979
    +vn 0.652097 0.386703 0.652097
    +vn 0.644272 0.412102 0.644272
    +vn 0.507497 0.411960 0.756793
    +vn 0.350532 0.411559 0.841277
    +vn 0.354778 0.386181 0.851467
    +vn 0.354778 0.386181 0.851467
    +vn 0.513656 0.386567 0.765979
    +vn 0.507497 0.411960 0.756793
    +vn 0.350532 0.411559 0.841277
    +vn 0.178784 0.411023 0.893922
    +vn 0.180944 0.385666 0.904721
    +vn 0.180944 0.385666 0.904721
    +vn 0.354778 0.386181 0.851467
    +vn 0.350532 0.411559 0.841277
    +vn 0.178784 0.411023 0.893922
    +vn 0.000000 0.410706 0.911768
    +vn 0.000000 0.385362 0.922766
    +vn 0.000000 0.385362 0.922766
    +vn 0.180944 0.385666 0.904721
    +vn 0.178784 0.411023 0.893922
    +vn 0.922766 0.385362 0.000000
    +vn 0.904721 0.385666 0.180944
    +vn 0.919435 0.347598 0.183887
    +vn 0.919435 0.347598 0.183887
    +vn 0.937749 0.347314 0.000000
    +vn 0.922766 0.385362 0.000000
    +vn 0.904721 0.385666 0.180944
    +vn 0.851467 0.386181 0.354778
    +vn 0.865353 0.348078 0.360564
    +vn 0.865353 0.348078 0.360564
    +vn 0.919435 0.347598 0.183887
    +vn 0.904721 0.385666 0.180944
    +vn 0.851467 0.386181 0.354778
    +vn 0.765979 0.386567 0.513656
    +vn 0.778496 0.348436 0.522050
    +vn 0.778496 0.348436 0.522050
    +vn 0.865353 0.348078 0.360564
    +vn 0.851467 0.386181 0.354778
    +vn 0.765979 0.386567 0.513656
    +vn 0.652097 0.386703 0.652097
    +vn 0.662761 0.348563 0.662761
    +vn 0.662761 0.348563 0.662761
    +vn 0.778496 0.348436 0.522050
    +vn 0.765979 0.386567 0.513656
    +vn 0.652097 0.386703 0.652097
    +vn 0.513656 0.386567 0.765979
    +vn 0.522050 0.348436 0.778496
    +vn 0.522050 0.348436 0.778496
    +vn 0.662761 0.348563 0.662761
    +vn 0.652097 0.386703 0.652097
    +vn 0.513656 0.386567 0.765979
    +vn 0.354778 0.386181 0.851467
    +vn 0.360564 0.348078 0.865353
    +vn 0.360564 0.348078 0.865353
    +vn 0.522050 0.348436 0.778496
    +vn 0.513656 0.386567 0.765979
    +vn 0.354778 0.386181 0.851467
    +vn 0.180944 0.385666 0.904721
    +vn 0.183887 0.347598 0.919435
    +vn 0.183887 0.347598 0.919435
    +vn 0.360564 0.348078 0.865353
    +vn 0.354778 0.386181 0.851467
    +vn 0.180944 0.385666 0.904721
    +vn 0.000000 0.385362 0.922766
    +vn 0.000000 0.347314 0.937749
    +vn 0.000000 0.347314 0.937749
    +vn 0.183887 0.347598 0.919435
    +vn 0.180944 0.385666 0.904721
    +vn 0.937749 0.347314 0.000000
    +vn 0.919435 0.347598 0.183887
    +vn 0.937239 0.294017 0.187448
    +vn 0.937239 0.294017 0.187448
    +vn 0.955877 0.293768 0.000000
    +vn 0.937749 0.347314 0.000000
    +vn 0.919435 0.347598 0.183887
    +vn 0.865353 0.348078 0.360564
    +vn 0.882157 0.294439 0.367565
    +vn 0.882157 0.294439 0.367565
    +vn 0.937239 0.294017 0.187448
    +vn 0.919435 0.347598 0.183887
    +vn 0.865353 0.348078 0.360564
    +vn 0.778496 0.348436 0.522050
    +vn 0.793646 0.294754 0.532209
    +vn 0.793646 0.294754 0.532209
    +vn 0.882157 0.294439 0.367565
    +vn 0.865353 0.348078 0.360564
    +vn 0.778496 0.348436 0.522050
    +vn 0.662761 0.348563 0.662761
    +vn 0.675668 0.294866 0.675668
    +vn 0.675668 0.294866 0.675668
    +vn 0.793646 0.294754 0.532209
    +vn 0.778496 0.348436 0.522050
    +vn 0.662761 0.348563 0.662761
    +vn 0.522050 0.348436 0.778496
    +vn 0.532209 0.294754 0.793646
    +vn 0.532209 0.294754 0.793646
    +vn 0.675668 0.294866 0.675668
    +vn 0.662761 0.348563 0.662761
    +vn 0.522050 0.348436 0.778496
    +vn 0.360564 0.348078 0.865353
    +vn 0.367565 0.294439 0.882157
    +vn 0.367565 0.294439 0.882157
    +vn 0.532209 0.294754 0.793646
    +vn 0.522050 0.348436 0.778496
    +vn 0.360564 0.348078 0.865353
    +vn 0.183887 0.347598 0.919435
    +vn 0.187448 0.294017 0.937239
    +vn 0.187448 0.294017 0.937239
    +vn 0.367565 0.294439 0.882157
    +vn 0.360564 0.348078 0.865353
    +vn 0.183887 0.347598 0.919435
    +vn 0.000000 0.347314 0.937749
    +vn 0.000000 0.293768 0.955877
    +vn 0.000000 0.293768 0.955877
    +vn 0.187448 0.294017 0.937239
    +vn 0.183887 0.347598 0.919435
    +vn 0.955877 0.293768 0.000000
    +vn 0.937239 0.294017 0.187448
    +vn 0.956305 0.221134 0.191261
    +vn 0.956305 0.221134 0.191261
    +vn 0.975288 0.220939 0.000000
    +vn 0.955877 0.293768 0.000000
    +vn 0.937239 0.294017 0.187448
    +vn 0.882157 0.294439 0.367565
    +vn 0.900156 0.221464 0.375065
    +vn 0.900156 0.221464 0.375065
    +vn 0.956305 0.221134 0.191261
    +vn 0.937239 0.294017 0.187448
    +vn 0.882157 0.294439 0.367565
    +vn 0.793646 0.294754 0.532209
    +vn 0.809874 0.221711 0.543092
    +vn 0.809874 0.221711 0.543092
    +vn 0.900156 0.221464 0.375065
    +vn 0.882157 0.294439 0.367565
    +vn 0.793646 0.294754 0.532209
    +vn 0.675668 0.294866 0.675668
    +vn 0.689494 0.221799 0.689494
    +vn 0.689494 0.221799 0.689494
    +vn 0.809874 0.221711 0.543092
    +vn 0.793646 0.294754 0.532209
    +vn 0.675668 0.294866 0.675668
    +vn 0.532209 0.294754 0.793646
    +vn 0.543092 0.221711 0.809874
    +vn 0.543092 0.221711 0.809874
    +vn 0.689494 0.221799 0.689494
    +vn 0.675668 0.294866 0.675668
    +vn 0.532209 0.294754 0.793646
    +vn 0.367565 0.294439 0.882157
    +vn 0.375065 0.221464 0.900156
    +vn 0.375065 0.221464 0.900156
    +vn 0.543092 0.221711 0.809874
    +vn 0.532209 0.294754 0.793646
    +vn 0.367565 0.294439 0.882157
    +vn 0.187448 0.294017 0.937239
    +vn 0.191261 0.221134 0.956305
    +vn 0.191261 0.221134 0.956305
    +vn 0.375065 0.221464 0.900156
    +vn 0.367565 0.294439 0.882157
    +vn 0.187448 0.294017 0.937239
    +vn 0.000000 0.293768 0.955877
    +vn 0.000000 0.220939 0.975288
    +vn 0.000000 0.220939 0.975288
    +vn 0.191261 0.221134 0.956305
    +vn 0.187448 0.294017 0.937239
    +vn 0.975288 0.220939 0.000000
    +vn 0.956305 0.221134 0.191261
    +vn 0.972957 0.124454 0.194591
    +vn 0.972957 0.124454 0.194591
    +vn 0.992240 0.124341 0.000000
    +vn 0.975288 0.220939 0.000000
    +vn 0.956305 0.221134 0.191261
    +vn 0.900156 0.221464 0.375065
    +vn 0.915878 0.124647 0.381616
    +vn 0.915878 0.124647 0.381616
    +vn 0.972957 0.124454 0.194591
    +vn 0.956305 0.221134 0.191261
    +vn 0.900156 0.221464 0.375065
    +vn 0.809874 0.221711 0.543092
    +vn 0.824052 0.124791 0.552599
    +vn 0.824052 0.124791 0.552599
    +vn 0.915878 0.124647 0.381616
    +vn 0.900156 0.221464 0.375065
    +vn 0.809874 0.221711 0.543092
    +vn 0.689494 0.221799 0.689494
    +vn 0.701575 0.124842 0.701575
    +vn 0.701575 0.124842 0.701575
    +vn 0.824052 0.124791 0.552599
    +vn 0.809874 0.221711 0.543092
    +vn 0.689494 0.221799 0.689494
    +vn 0.543092 0.221711 0.809874
    +vn 0.552599 0.124791 0.824052
    +vn 0.552599 0.124791 0.824052
    +vn 0.701575 0.124842 0.701575
    +vn 0.689494 0.221799 0.689494
    +vn 0.543092 0.221711 0.809874
    +vn 0.375065 0.221464 0.900156
    +vn 0.381616 0.124647 0.915878
    +vn 0.381616 0.124647 0.915878
    +vn 0.552599 0.124791 0.824052
    +vn 0.543092 0.221711 0.809874
    +vn 0.375065 0.221464 0.900156
    +vn 0.191261 0.221134 0.956305
    +vn 0.194591 0.124454 0.972957
    +vn 0.194591 0.124454 0.972957
    +vn 0.381616 0.124647 0.915878
    +vn 0.375065 0.221464 0.900156
    +vn 0.191261 0.221134 0.956305
    +vn 0.000000 0.220939 0.975288
    +vn 0.000000 0.124341 0.992240
    +vn 0.000000 0.124341 0.992240
    +vn 0.194591 0.124454 0.972957
    +vn 0.191261 0.221134 0.956305
    +vn 0.992240 0.124341 0.000000
    +vn 0.972957 0.124454 0.194591
    +vn 0.980581 -0.000000 0.196116
    +vn 0.980581 -0.000000 0.196116
    +vn 1.000000 0.000000 0.000000
    +vn 0.992240 0.124341 0.000000
    +vn 0.972957 0.124454 0.194591
    +vn 0.915878 0.124647 0.381616
    +vn 0.923077 -0.000000 0.384615
    +vn 0.923077 -0.000000 0.384615
    +vn 0.980581 -0.000000 0.196116
    +vn 0.972957 0.124454 0.194591
    +vn 0.915878 0.124647 0.381616
    +vn 0.824052 0.124791 0.552599
    +vn 0.830544 -0.000000 0.556953
    +vn 0.830544 -0.000000 0.556953
    +vn 0.923077 -0.000000 0.384615
    +vn 0.915878 0.124647 0.381616
    +vn 0.824052 0.124791 0.552599
    +vn 0.701575 0.124842 0.701575
    +vn 0.707107 -0.000000 0.707107
    +vn 0.707107 -0.000000 0.707107
    +vn 0.830544 -0.000000 0.556953
    +vn 0.824052 0.124791 0.552599
    +vn 0.701575 0.124842 0.701575
    +vn 0.552599 0.124791 0.824052
    +vn 0.556953 -0.000000 0.830544
    +vn 0.556953 -0.000000 0.830544
    +vn 0.707107 -0.000000 0.707107
    +vn 0.701575 0.124842 0.701575
    +vn 0.552599 0.124791 0.824052
    +vn 0.381616 0.124647 0.915878
    +vn 0.384615 -0.000000 0.923077
    +vn 0.384615 -0.000000 0.923077
    +vn 0.556953 -0.000000 0.830544
    +vn 0.552599 0.124791 0.824052
    +vn 0.381616 0.124647 0.915878
    +vn 0.194591 0.124454 0.972957
    +vn 0.196116 -0.000000 0.980581
    +vn 0.196116 -0.000000 0.980581
    +vn 0.384615 -0.000000 0.923077
    +vn 0.381616 0.124647 0.915878
    +vn 0.194591 0.124454 0.972957
    +vn 0.000000 0.124341 0.992240
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.196116 -0.000000 0.980581
    +vn 0.194591 0.124454 0.972957
    +vn 0.000000 0.429934 0.902860
    +vn -0.177035 0.430259 0.885176
    +vn -0.177474 0.425535 0.887369
    +vn -0.177474 0.425535 0.887369
    +vn 0.000000 0.425212 0.905094
    +vn 0.000000 0.429934 0.902860
    +vn -0.177035 0.430259 0.885176
    +vn -0.347093 0.430809 0.833024
    +vn -0.347956 0.426082 0.835093
    +vn -0.347956 0.426082 0.835093
    +vn -0.177474 0.425535 0.887369
    +vn -0.177035 0.430259 0.885176
    +vn -0.347093 0.430809 0.833024
    +vn -0.502509 0.431220 0.749355
    +vn -0.503759 0.426491 0.751220
    +vn -0.503759 0.426491 0.751220
    +vn -0.347956 0.426082 0.835093
    +vn -0.347093 0.430809 0.833024
    +vn -0.502509 0.431220 0.749355
    +vn -0.637936 0.431366 0.637936
    +vn -0.639524 0.426636 0.639524
    +vn -0.639524 0.426636 0.639524
    +vn -0.503759 0.426491 0.751220
    +vn -0.502509 0.431220 0.749355
    +vn -0.637936 0.431366 0.637936
    +vn -0.749355 0.431220 0.502509
    +vn -0.751220 0.426491 0.503759
    +vn -0.751220 0.426491 0.503759
    +vn -0.639524 0.426636 0.639524
    +vn -0.637936 0.431366 0.637936
    +vn -0.749355 0.431220 0.502509
    +vn -0.833024 0.430809 0.347093
    +vn -0.835093 0.426082 0.347956
    +vn -0.835093 0.426082 0.347956
    +vn -0.751220 0.426491 0.503759
    +vn -0.749355 0.431220 0.502509
    +vn -0.833024 0.430809 0.347093
    +vn -0.885176 0.430259 0.177035
    +vn -0.887369 0.425535 0.177474
    +vn -0.887369 0.425535 0.177474
    +vn -0.835093 0.426082 0.347956
    +vn -0.833024 0.430809 0.347093
    +vn -0.885176 0.430259 0.177035
    +vn -0.902860 0.429934 0.000000
    +vn -0.905094 0.425212 0.000000
    +vn -0.905094 0.425212 0.000000
    +vn -0.887369 0.425535 0.177474
    +vn -0.885176 0.430259 0.177035
    +vn 0.000000 0.425212 0.905094
    +vn -0.177474 0.425535 0.887369
    +vn -0.178784 0.411023 0.893922
    +vn -0.178784 0.411023 0.893922
    +vn 0.000000 0.410706 0.911768
    +vn 0.000000 0.425212 0.905094
    +vn -0.177474 0.425535 0.887369
    +vn -0.347956 0.426082 0.835093
    +vn -0.350532 0.411559 0.841277
    +vn -0.350532 0.411559 0.841277
    +vn -0.178784 0.411023 0.893922
    +vn -0.177474 0.425535 0.887369
    +vn -0.347956 0.426082 0.835093
    +vn -0.503759 0.426491 0.751220
    +vn -0.507497 0.411960 0.756793
    +vn -0.507497 0.411960 0.756793
    +vn -0.350532 0.411559 0.841277
    +vn -0.347956 0.426082 0.835093
    +vn -0.503759 0.426491 0.751220
    +vn -0.639524 0.426636 0.639524
    +vn -0.644272 0.412102 0.644272
    +vn -0.644272 0.412102 0.644272
    +vn -0.507497 0.411960 0.756793
    +vn -0.503759 0.426491 0.751220
    +vn -0.639524 0.426636 0.639524
    +vn -0.751220 0.426491 0.503759
    +vn -0.756793 0.411960 0.507497
    +vn -0.756793 0.411960 0.507497
    +vn -0.644272 0.412102 0.644272
    +vn -0.639524 0.426636 0.639524
    +vn -0.751220 0.426491 0.503759
    +vn -0.835093 0.426082 0.347956
    +vn -0.841277 0.411559 0.350532
    +vn -0.841277 0.411559 0.350532
    +vn -0.756793 0.411960 0.507497
    +vn -0.751220 0.426491 0.503759
    +vn -0.835093 0.426082 0.347956
    +vn -0.887369 0.425535 0.177474
    +vn -0.893922 0.411023 0.178784
    +vn -0.893922 0.411023 0.178784
    +vn -0.841277 0.411559 0.350532
    +vn -0.835093 0.426082 0.347956
    +vn -0.887369 0.425535 0.177474
    +vn -0.905094 0.425212 0.000000
    +vn -0.911768 0.410706 0.000000
    +vn -0.911768 0.410706 0.000000
    +vn -0.893922 0.411023 0.178784
    +vn -0.887369 0.425535 0.177474
    +vn 0.000000 0.410706 0.911768
    +vn -0.178784 0.411023 0.893922
    +vn -0.180944 0.385666 0.904721
    +vn -0.180944 0.385666 0.904721
    +vn 0.000000 0.385362 0.922766
    +vn 0.000000 0.410706 0.911768
    +vn -0.178784 0.411023 0.893922
    +vn -0.350532 0.411559 0.841277
    +vn -0.354778 0.386181 0.851467
    +vn -0.354778 0.386181 0.851467
    +vn -0.180944 0.385666 0.904721
    +vn -0.178784 0.411023 0.893922
    +vn -0.350532 0.411559 0.841277
    +vn -0.507497 0.411960 0.756793
    +vn -0.513656 0.386567 0.765979
    +vn -0.513656 0.386567 0.765979
    +vn -0.354778 0.386181 0.851467
    +vn -0.350532 0.411559 0.841277
    +vn -0.507497 0.411960 0.756793
    +vn -0.644272 0.412102 0.644272
    +vn -0.652097 0.386703 0.652097
    +vn -0.652097 0.386703 0.652097
    +vn -0.513656 0.386567 0.765979
    +vn -0.507497 0.411960 0.756793
    +vn -0.644272 0.412102 0.644272
    +vn -0.756793 0.411960 0.507497
    +vn -0.765979 0.386567 0.513656
    +vn -0.765979 0.386567 0.513656
    +vn -0.652097 0.386703 0.652097
    +vn -0.644272 0.412102 0.644272
    +vn -0.756793 0.411960 0.507497
    +vn -0.841277 0.411559 0.350532
    +vn -0.851467 0.386181 0.354778
    +vn -0.851467 0.386181 0.354778
    +vn -0.765979 0.386567 0.513656
    +vn -0.756793 0.411960 0.507497
    +vn -0.841277 0.411559 0.350532
    +vn -0.893922 0.411023 0.178784
    +vn -0.904721 0.385666 0.180944
    +vn -0.904721 0.385666 0.180944
    +vn -0.851467 0.386181 0.354778
    +vn -0.841277 0.411559 0.350532
    +vn -0.893922 0.411023 0.178784
    +vn -0.911768 0.410706 0.000000
    +vn -0.922766 0.385362 0.000000
    +vn -0.922766 0.385362 0.000000
    +vn -0.904721 0.385666 0.180944
    +vn -0.893922 0.411023 0.178784
    +vn 0.000000 0.385362 0.922766
    +vn -0.180944 0.385666 0.904721
    +vn -0.183887 0.347598 0.919435
    +vn -0.183887 0.347598 0.919435
    +vn 0.000000 0.347314 0.937749
    +vn 0.000000 0.385362 0.922766
    +vn -0.180944 0.385666 0.904721
    +vn -0.354778 0.386181 0.851467
    +vn -0.360564 0.348078 0.865353
    +vn -0.360564 0.348078 0.865353
    +vn -0.183887 0.347598 0.919435
    +vn -0.180944 0.385666 0.904721
    +vn -0.354778 0.386181 0.851467
    +vn -0.513656 0.386567 0.765979
    +vn -0.522050 0.348436 0.778496
    +vn -0.522050 0.348436 0.778496
    +vn -0.360564 0.348078 0.865353
    +vn -0.354778 0.386181 0.851467
    +vn -0.513656 0.386567 0.765979
    +vn -0.652097 0.386703 0.652097
    +vn -0.662761 0.348563 0.662761
    +vn -0.662761 0.348563 0.662761
    +vn -0.522050 0.348436 0.778496
    +vn -0.513656 0.386567 0.765979
    +vn -0.652097 0.386703 0.652097
    +vn -0.765979 0.386567 0.513656
    +vn -0.778496 0.348436 0.522050
    +vn -0.778496 0.348436 0.522050
    +vn -0.662761 0.348563 0.662761
    +vn -0.652097 0.386703 0.652097
    +vn -0.765979 0.386567 0.513656
    +vn -0.851467 0.386181 0.354778
    +vn -0.865353 0.348078 0.360564
    +vn -0.865353 0.348078 0.360564
    +vn -0.778496 0.348436 0.522050
    +vn -0.765979 0.386567 0.513656
    +vn -0.851467 0.386181 0.354778
    +vn -0.904721 0.385666 0.180944
    +vn -0.919435 0.347598 0.183887
    +vn -0.919435 0.347598 0.183887
    +vn -0.865353 0.348078 0.360564
    +vn -0.851467 0.386181 0.354778
    +vn -0.904721 0.385666 0.180944
    +vn -0.922766 0.385362 0.000000
    +vn -0.937749 0.347314 0.000000
    +vn -0.937749 0.347314 0.000000
    +vn -0.919435 0.347598 0.183887
    +vn -0.904721 0.385666 0.180944
    +vn 0.000000 0.347314 0.937749
    +vn -0.183887 0.347598 0.919435
    +vn -0.187448 0.294017 0.937239
    +vn -0.187448 0.294017 0.937239
    +vn 0.000000 0.293768 0.955877
    +vn 0.000000 0.347314 0.937749
    +vn -0.183887 0.347598 0.919435
    +vn -0.360564 0.348078 0.865353
    +vn -0.367565 0.294439 0.882157
    +vn -0.367565 0.294439 0.882157
    +vn -0.187448 0.294017 0.937239
    +vn -0.183887 0.347598 0.919435
    +vn -0.360564 0.348078 0.865353
    +vn -0.522050 0.348436 0.778496
    +vn -0.532209 0.294754 0.793646
    +vn -0.532209 0.294754 0.793646
    +vn -0.367565 0.294439 0.882157
    +vn -0.360564 0.348078 0.865353
    +vn -0.522050 0.348436 0.778496
    +vn -0.662761 0.348563 0.662761
    +vn -0.675668 0.294866 0.675668
    +vn -0.675668 0.294866 0.675668
    +vn -0.532209 0.294754 0.793646
    +vn -0.522050 0.348436 0.778496
    +vn -0.662761 0.348563 0.662761
    +vn -0.778496 0.348436 0.522050
    +vn -0.793646 0.294754 0.532209
    +vn -0.793646 0.294754 0.532209
    +vn -0.675668 0.294866 0.675668
    +vn -0.662761 0.348563 0.662761
    +vn -0.778496 0.348436 0.522050
    +vn -0.865353 0.348078 0.360564
    +vn -0.882157 0.294439 0.367565
    +vn -0.882157 0.294439 0.367565
    +vn -0.793646 0.294754 0.532209
    +vn -0.778496 0.348436 0.522050
    +vn -0.865353 0.348078 0.360564
    +vn -0.919435 0.347598 0.183887
    +vn -0.937239 0.294017 0.187448
    +vn -0.937239 0.294017 0.187448
    +vn -0.882157 0.294439 0.367565
    +vn -0.865353 0.348078 0.360564
    +vn -0.919435 0.347598 0.183887
    +vn -0.937749 0.347314 0.000000
    +vn -0.955877 0.293768 0.000000
    +vn -0.955877 0.293768 0.000000
    +vn -0.937239 0.294017 0.187448
    +vn -0.919435 0.347598 0.183887
    +vn 0.000000 0.293768 0.955877
    +vn -0.187448 0.294017 0.937239
    +vn -0.191261 0.221134 0.956305
    +vn -0.191261 0.221134 0.956305
    +vn 0.000000 0.220939 0.975288
    +vn 0.000000 0.293768 0.955877
    +vn -0.187448 0.294017 0.937239
    +vn -0.367565 0.294439 0.882157
    +vn -0.375065 0.221464 0.900156
    +vn -0.375065 0.221464 0.900156
    +vn -0.191261 0.221134 0.956305
    +vn -0.187448 0.294017 0.937239
    +vn -0.367565 0.294439 0.882157
    +vn -0.532209 0.294754 0.793646
    +vn -0.543092 0.221711 0.809874
    +vn -0.543092 0.221711 0.809874
    +vn -0.375065 0.221464 0.900156
    +vn -0.367565 0.294439 0.882157
    +vn -0.532209 0.294754 0.793646
    +vn -0.675668 0.294866 0.675668
    +vn -0.689494 0.221799 0.689494
    +vn -0.689494 0.221799 0.689494
    +vn -0.543092 0.221711 0.809874
    +vn -0.532209 0.294754 0.793646
    +vn -0.675668 0.294866 0.675668
    +vn -0.793646 0.294754 0.532209
    +vn -0.809874 0.221711 0.543092
    +vn -0.809874 0.221711 0.543092
    +vn -0.689494 0.221799 0.689494
    +vn -0.675668 0.294866 0.675668
    +vn -0.793646 0.294754 0.532209
    +vn -0.882157 0.294439 0.367565
    +vn -0.900156 0.221464 0.375065
    +vn -0.900156 0.221464 0.375065
    +vn -0.809874 0.221711 0.543092
    +vn -0.793646 0.294754 0.532209
    +vn -0.882157 0.294439 0.367565
    +vn -0.937239 0.294017 0.187448
    +vn -0.956305 0.221134 0.191261
    +vn -0.956305 0.221134 0.191261
    +vn -0.900156 0.221464 0.375065
    +vn -0.882157 0.294439 0.367565
    +vn -0.937239 0.294017 0.187448
    +vn -0.955877 0.293768 0.000000
    +vn -0.975288 0.220939 0.000000
    +vn -0.975288 0.220939 0.000000
    +vn -0.956305 0.221134 0.191261
    +vn -0.937239 0.294017 0.187448
    +vn 0.000000 0.220939 0.975288
    +vn -0.191261 0.221134 0.956305
    +vn -0.194591 0.124454 0.972957
    +vn -0.194591 0.124454 0.972957
    +vn 0.000000 0.124341 0.992240
    +vn 0.000000 0.220939 0.975288
    +vn -0.191261 0.221134 0.956305
    +vn -0.375065 0.221464 0.900156
    +vn -0.381616 0.124647 0.915878
    +vn -0.381616 0.124647 0.915878
    +vn -0.194591 0.124454 0.972957
    +vn -0.191261 0.221134 0.956305
    +vn -0.375065 0.221464 0.900156
    +vn -0.543092 0.221711 0.809874
    +vn -0.552599 0.124791 0.824052
    +vn -0.552599 0.124791 0.824052
    +vn -0.381616 0.124647 0.915878
    +vn -0.375065 0.221464 0.900156
    +vn -0.543092 0.221711 0.809874
    +vn -0.689494 0.221799 0.689494
    +vn -0.701575 0.124842 0.701575
    +vn -0.701575 0.124842 0.701575
    +vn -0.552599 0.124791 0.824052
    +vn -0.543092 0.221711 0.809874
    +vn -0.689494 0.221799 0.689494
    +vn -0.809874 0.221711 0.543092
    +vn -0.824052 0.124791 0.552599
    +vn -0.824052 0.124791 0.552599
    +vn -0.701575 0.124842 0.701575
    +vn -0.689494 0.221799 0.689494
    +vn -0.809874 0.221711 0.543092
    +vn -0.900156 0.221464 0.375065
    +vn -0.915878 0.124647 0.381616
    +vn -0.915878 0.124647 0.381616
    +vn -0.824052 0.124791 0.552599
    +vn -0.809874 0.221711 0.543092
    +vn -0.900156 0.221464 0.375065
    +vn -0.956305 0.221134 0.191261
    +vn -0.972957 0.124454 0.194591
    +vn -0.972957 0.124454 0.194591
    +vn -0.915878 0.124647 0.381616
    +vn -0.900156 0.221464 0.375065
    +vn -0.956305 0.221134 0.191261
    +vn -0.975288 0.220939 0.000000
    +vn -0.992240 0.124341 0.000000
    +vn -0.992240 0.124341 0.000000
    +vn -0.972957 0.124454 0.194591
    +vn -0.956305 0.221134 0.191261
    +vn 0.000000 0.124341 0.992240
    +vn -0.194591 0.124454 0.972957
    +vn -0.196116 -0.000000 0.980581
    +vn -0.196116 -0.000000 0.980581
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 0.124341 0.992240
    +vn -0.194591 0.124454 0.972957
    +vn -0.381616 0.124647 0.915878
    +vn -0.384615 -0.000000 0.923077
    +vn -0.384615 -0.000000 0.923077
    +vn -0.196116 -0.000000 0.980581
    +vn -0.194591 0.124454 0.972957
    +vn -0.381616 0.124647 0.915878
    +vn -0.552599 0.124791 0.824052
    +vn -0.556953 -0.000000 0.830544
    +vn -0.556953 -0.000000 0.830544
    +vn -0.384615 -0.000000 0.923077
    +vn -0.381616 0.124647 0.915878
    +vn -0.552599 0.124791 0.824052
    +vn -0.701575 0.124842 0.701575
    +vn -0.707107 -0.000000 0.707107
    +vn -0.707107 -0.000000 0.707107
    +vn -0.556953 -0.000000 0.830544
    +vn -0.552599 0.124791 0.824052
    +vn -0.701575 0.124842 0.701575
    +vn -0.824052 0.124791 0.552599
    +vn -0.830544 -0.000000 0.556953
    +vn -0.830544 -0.000000 0.556953
    +vn -0.707107 -0.000000 0.707107
    +vn -0.701575 0.124842 0.701575
    +vn -0.824052 0.124791 0.552599
    +vn -0.915878 0.124647 0.381616
    +vn -0.923077 -0.000000 0.384615
    +vn -0.923077 -0.000000 0.384615
    +vn -0.830544 -0.000000 0.556953
    +vn -0.824052 0.124791 0.552599
    +vn -0.915878 0.124647 0.381616
    +vn -0.972957 0.124454 0.194591
    +vn -0.980581 0.000000 0.196116
    +vn -0.980581 0.000000 0.196116
    +vn -0.923077 -0.000000 0.384615
    +vn -0.915878 0.124647 0.381616
    +vn -0.972957 0.124454 0.194591
    +vn -0.992240 0.124341 0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -0.980581 0.000000 0.196116
    +vn -0.972957 0.124454 0.194591
    +vn -0.902860 0.429934 0.000000
    +vn -0.885176 0.430259 -0.177035
    +vn -0.887369 0.425535 -0.177474
    +vn -0.887369 0.425535 -0.177474
    +vn -0.905094 0.425212 0.000000
    +vn -0.902860 0.429934 0.000000
    +vn -0.885176 0.430259 -0.177035
    +vn -0.833024 0.430809 -0.347093
    +vn -0.835093 0.426082 -0.347956
    +vn -0.835093 0.426082 -0.347956
    +vn -0.887369 0.425535 -0.177474
    +vn -0.885176 0.430259 -0.177035
    +vn -0.833024 0.430809 -0.347093
    +vn -0.749355 0.431220 -0.502509
    +vn -0.751220 0.426491 -0.503759
    +vn -0.751220 0.426491 -0.503759
    +vn -0.835093 0.426082 -0.347956
    +vn -0.833024 0.430809 -0.347093
    +vn -0.749355 0.431220 -0.502509
    +vn -0.637936 0.431366 -0.637936
    +vn -0.639524 0.426636 -0.639524
    +vn -0.639524 0.426636 -0.639524
    +vn -0.751220 0.426491 -0.503759
    +vn -0.749355 0.431220 -0.502509
    +vn -0.637936 0.431366 -0.637936
    +vn -0.502509 0.431220 -0.749355
    +vn -0.503759 0.426491 -0.751220
    +vn -0.503759 0.426491 -0.751220
    +vn -0.639524 0.426636 -0.639524
    +vn -0.637936 0.431366 -0.637936
    +vn -0.502509 0.431220 -0.749355
    +vn -0.347093 0.430809 -0.833024
    +vn -0.347956 0.426082 -0.835093
    +vn -0.347956 0.426082 -0.835093
    +vn -0.503759 0.426491 -0.751220
    +vn -0.502509 0.431220 -0.749355
    +vn -0.347093 0.430809 -0.833024
    +vn -0.177035 0.430259 -0.885176
    +vn -0.177474 0.425535 -0.887369
    +vn -0.177474 0.425535 -0.887369
    +vn -0.347956 0.426082 -0.835093
    +vn -0.347093 0.430809 -0.833024
    +vn -0.177035 0.430259 -0.885176
    +vn -0.000000 0.429934 -0.902860
    +vn -0.000000 0.425212 -0.905094
    +vn -0.000000 0.425212 -0.905094
    +vn -0.177474 0.425535 -0.887369
    +vn -0.177035 0.430259 -0.885176
    +vn -0.905094 0.425212 0.000000
    +vn -0.887369 0.425535 -0.177474
    +vn -0.893922 0.411023 -0.178784
    +vn -0.893922 0.411023 -0.178784
    +vn -0.911768 0.410706 0.000000
    +vn -0.905094 0.425212 0.000000
    +vn -0.887369 0.425535 -0.177474
    +vn -0.835093 0.426082 -0.347956
    +vn -0.841277 0.411559 -0.350532
    +vn -0.841277 0.411559 -0.350532
    +vn -0.893922 0.411023 -0.178784
    +vn -0.887369 0.425535 -0.177474
    +vn -0.835093 0.426082 -0.347956
    +vn -0.751220 0.426491 -0.503759
    +vn -0.756793 0.411960 -0.507497
    +vn -0.756793 0.411960 -0.507497
    +vn -0.841277 0.411559 -0.350532
    +vn -0.835093 0.426082 -0.347956
    +vn -0.751220 0.426491 -0.503759
    +vn -0.639524 0.426636 -0.639524
    +vn -0.644272 0.412102 -0.644272
    +vn -0.644272 0.412102 -0.644272
    +vn -0.756793 0.411960 -0.507497
    +vn -0.751220 0.426491 -0.503759
    +vn -0.639524 0.426636 -0.639524
    +vn -0.503759 0.426491 -0.751220
    +vn -0.507497 0.411960 -0.756793
    +vn -0.507497 0.411960 -0.756793
    +vn -0.644272 0.412102 -0.644272
    +vn -0.639524 0.426636 -0.639524
    +vn -0.503759 0.426491 -0.751220
    +vn -0.347956 0.426082 -0.835093
    +vn -0.350532 0.411559 -0.841277
    +vn -0.350532 0.411559 -0.841277
    +vn -0.507497 0.411960 -0.756793
    +vn -0.503759 0.426491 -0.751220
    +vn -0.347956 0.426082 -0.835093
    +vn -0.177474 0.425535 -0.887369
    +vn -0.178784 0.411023 -0.893922
    +vn -0.178784 0.411023 -0.893922
    +vn -0.350532 0.411559 -0.841277
    +vn -0.347956 0.426082 -0.835093
    +vn -0.177474 0.425535 -0.887369
    +vn -0.000000 0.425212 -0.905094
    +vn 0.000000 0.410706 -0.911768
    +vn 0.000000 0.410706 -0.911768
    +vn -0.178784 0.411023 -0.893922
    +vn -0.177474 0.425535 -0.887369
    +vn -0.911768 0.410706 0.000000
    +vn -0.893922 0.411023 -0.178784
    +vn -0.904721 0.385666 -0.180944
    +vn -0.904721 0.385666 -0.180944
    +vn -0.922766 0.385362 0.000000
    +vn -0.911768 0.410706 0.000000
    +vn -0.893922 0.411023 -0.178784
    +vn -0.841277 0.411559 -0.350532
    +vn -0.851467 0.386181 -0.354778
    +vn -0.851467 0.386181 -0.354778
    +vn -0.904721 0.385666 -0.180944
    +vn -0.893922 0.411023 -0.178784
    +vn -0.841277 0.411559 -0.350532
    +vn -0.756793 0.411960 -0.507497
    +vn -0.765979 0.386567 -0.513656
    +vn -0.765979 0.386567 -0.513656
    +vn -0.851467 0.386181 -0.354778
    +vn -0.841277 0.411559 -0.350532
    +vn -0.756793 0.411960 -0.507497
    +vn -0.644272 0.412102 -0.644272
    +vn -0.652097 0.386703 -0.652097
    +vn -0.652097 0.386703 -0.652097
    +vn -0.765979 0.386567 -0.513656
    +vn -0.756793 0.411960 -0.507497
    +vn -0.644272 0.412102 -0.644272
    +vn -0.507497 0.411960 -0.756793
    +vn -0.513656 0.386567 -0.765979
    +vn -0.513656 0.386567 -0.765979
    +vn -0.652097 0.386703 -0.652097
    +vn -0.644272 0.412102 -0.644272
    +vn -0.507497 0.411960 -0.756793
    +vn -0.350532 0.411559 -0.841277
    +vn -0.354778 0.386181 -0.851467
    +vn -0.354778 0.386181 -0.851467
    +vn -0.513656 0.386567 -0.765979
    +vn -0.507497 0.411960 -0.756793
    +vn -0.350532 0.411559 -0.841277
    +vn -0.178784 0.411023 -0.893922
    +vn -0.180944 0.385666 -0.904721
    +vn -0.180944 0.385666 -0.904721
    +vn -0.354778 0.386181 -0.851467
    +vn -0.350532 0.411559 -0.841277
    +vn -0.178784 0.411023 -0.893922
    +vn 0.000000 0.410706 -0.911768
    +vn -0.000000 0.385362 -0.922766
    +vn -0.000000 0.385362 -0.922766
    +vn -0.180944 0.385666 -0.904721
    +vn -0.178784 0.411023 -0.893922
    +vn -0.922766 0.385362 0.000000
    +vn -0.904721 0.385666 -0.180944
    +vn -0.919435 0.347598 -0.183887
    +vn -0.919435 0.347598 -0.183887
    +vn -0.937749 0.347314 0.000000
    +vn -0.922766 0.385362 0.000000
    +vn -0.904721 0.385666 -0.180944
    +vn -0.851467 0.386181 -0.354778
    +vn -0.865353 0.348078 -0.360564
    +vn -0.865353 0.348078 -0.360564
    +vn -0.919435 0.347598 -0.183887
    +vn -0.904721 0.385666 -0.180944
    +vn -0.851467 0.386181 -0.354778
    +vn -0.765979 0.386567 -0.513656
    +vn -0.778496 0.348436 -0.522050
    +vn -0.778496 0.348436 -0.522050
    +vn -0.865353 0.348078 -0.360564
    +vn -0.851467 0.386181 -0.354778
    +vn -0.765979 0.386567 -0.513656
    +vn -0.652097 0.386703 -0.652097
    +vn -0.662761 0.348563 -0.662761
    +vn -0.662761 0.348563 -0.662761
    +vn -0.778496 0.348436 -0.522050
    +vn -0.765979 0.386567 -0.513656
    +vn -0.652097 0.386703 -0.652097
    +vn -0.513656 0.386567 -0.765979
    +vn -0.522050 0.348436 -0.778496
    +vn -0.522050 0.348436 -0.778496
    +vn -0.662761 0.348563 -0.662761
    +vn -0.652097 0.386703 -0.652097
    +vn -0.513656 0.386567 -0.765979
    +vn -0.354778 0.386181 -0.851467
    +vn -0.360564 0.348078 -0.865353
    +vn -0.360564 0.348078 -0.865353
    +vn -0.522050 0.348436 -0.778496
    +vn -0.513656 0.386567 -0.765979
    +vn -0.354778 0.386181 -0.851467
    +vn -0.180944 0.385666 -0.904721
    +vn -0.183887 0.347598 -0.919435
    +vn -0.183887 0.347598 -0.919435
    +vn -0.360564 0.348078 -0.865353
    +vn -0.354778 0.386181 -0.851467
    +vn -0.180944 0.385666 -0.904721
    +vn -0.000000 0.385362 -0.922766
    +vn 0.000000 0.347314 -0.937749
    +vn 0.000000 0.347314 -0.937749
    +vn -0.183887 0.347598 -0.919435
    +vn -0.180944 0.385666 -0.904721
    +vn -0.937749 0.347314 0.000000
    +vn -0.919435 0.347598 -0.183887
    +vn -0.937239 0.294017 -0.187448
    +vn -0.937239 0.294017 -0.187448
    +vn -0.955877 0.293768 0.000000
    +vn -0.937749 0.347314 0.000000
    +vn -0.919435 0.347598 -0.183887
    +vn -0.865353 0.348078 -0.360564
    +vn -0.882157 0.294439 -0.367565
    +vn -0.882157 0.294439 -0.367565
    +vn -0.937239 0.294017 -0.187448
    +vn -0.919435 0.347598 -0.183887
    +vn -0.865353 0.348078 -0.360564
    +vn -0.778496 0.348436 -0.522050
    +vn -0.793646 0.294754 -0.532209
    +vn -0.793646 0.294754 -0.532209
    +vn -0.882157 0.294439 -0.367565
    +vn -0.865353 0.348078 -0.360564
    +vn -0.778496 0.348436 -0.522050
    +vn -0.662761 0.348563 -0.662761
    +vn -0.675668 0.294866 -0.675668
    +vn -0.675668 0.294866 -0.675668
    +vn -0.793646 0.294754 -0.532209
    +vn -0.778496 0.348436 -0.522050
    +vn -0.662761 0.348563 -0.662761
    +vn -0.522050 0.348436 -0.778496
    +vn -0.532209 0.294754 -0.793646
    +vn -0.532209 0.294754 -0.793646
    +vn -0.675668 0.294866 -0.675668
    +vn -0.662761 0.348563 -0.662761
    +vn -0.522050 0.348436 -0.778496
    +vn -0.360564 0.348078 -0.865353
    +vn -0.367565 0.294439 -0.882157
    +vn -0.367565 0.294439 -0.882157
    +vn -0.532209 0.294754 -0.793646
    +vn -0.522050 0.348436 -0.778496
    +vn -0.360564 0.348078 -0.865353
    +vn -0.183887 0.347598 -0.919435
    +vn -0.187448 0.294017 -0.937239
    +vn -0.187448 0.294017 -0.937239
    +vn -0.367565 0.294439 -0.882157
    +vn -0.360564 0.348078 -0.865353
    +vn -0.183887 0.347598 -0.919435
    +vn 0.000000 0.347314 -0.937749
    +vn -0.000000 0.293768 -0.955877
    +vn -0.000000 0.293768 -0.955877
    +vn -0.187448 0.294017 -0.937239
    +vn -0.183887 0.347598 -0.919435
    +vn -0.955877 0.293768 0.000000
    +vn -0.937239 0.294017 -0.187448
    +vn -0.956305 0.221134 -0.191261
    +vn -0.956305 0.221134 -0.191261
    +vn -0.975288 0.220939 0.000000
    +vn -0.955877 0.293768 0.000000
    +vn -0.937239 0.294017 -0.187448
    +vn -0.882157 0.294439 -0.367565
    +vn -0.900156 0.221464 -0.375065
    +vn -0.900156 0.221464 -0.375065
    +vn -0.956305 0.221134 -0.191261
    +vn -0.937239 0.294017 -0.187448
    +vn -0.882157 0.294439 -0.367565
    +vn -0.793646 0.294754 -0.532209
    +vn -0.809874 0.221711 -0.543092
    +vn -0.809874 0.221711 -0.543092
    +vn -0.900156 0.221464 -0.375065
    +vn -0.882157 0.294439 -0.367565
    +vn -0.793646 0.294754 -0.532209
    +vn -0.675668 0.294866 -0.675668
    +vn -0.689494 0.221799 -0.689494
    +vn -0.689494 0.221799 -0.689494
    +vn -0.809874 0.221711 -0.543092
    +vn -0.793646 0.294754 -0.532209
    +vn -0.675668 0.294866 -0.675668
    +vn -0.532209 0.294754 -0.793646
    +vn -0.543092 0.221711 -0.809874
    +vn -0.543092 0.221711 -0.809874
    +vn -0.689494 0.221799 -0.689494
    +vn -0.675668 0.294866 -0.675668
    +vn -0.532209 0.294754 -0.793646
    +vn -0.367565 0.294439 -0.882157
    +vn -0.375065 0.221464 -0.900156
    +vn -0.375065 0.221464 -0.900156
    +vn -0.543092 0.221711 -0.809874
    +vn -0.532209 0.294754 -0.793646
    +vn -0.367565 0.294439 -0.882157
    +vn -0.187448 0.294017 -0.937239
    +vn -0.191261 0.221134 -0.956305
    +vn -0.191261 0.221134 -0.956305
    +vn -0.375065 0.221464 -0.900156
    +vn -0.367565 0.294439 -0.882157
    +vn -0.187448 0.294017 -0.937239
    +vn -0.000000 0.293768 -0.955877
    +vn 0.000000 0.220939 -0.975288
    +vn 0.000000 0.220939 -0.975288
    +vn -0.191261 0.221134 -0.956305
    +vn -0.187448 0.294017 -0.937239
    +vn -0.975288 0.220939 0.000000
    +vn -0.956305 0.221134 -0.191261
    +vn -0.972957 0.124454 -0.194591
    +vn -0.972957 0.124454 -0.194591
    +vn -0.992240 0.124341 0.000000
    +vn -0.975288 0.220939 0.000000
    +vn -0.956305 0.221134 -0.191261
    +vn -0.900156 0.221464 -0.375065
    +vn -0.915878 0.124647 -0.381616
    +vn -0.915878 0.124647 -0.381616
    +vn -0.972957 0.124454 -0.194591
    +vn -0.956305 0.221134 -0.191261
    +vn -0.900156 0.221464 -0.375065
    +vn -0.809874 0.221711 -0.543092
    +vn -0.824052 0.124791 -0.552599
    +vn -0.824052 0.124791 -0.552599
    +vn -0.915878 0.124647 -0.381616
    +vn -0.900156 0.221464 -0.375065
    +vn -0.809874 0.221711 -0.543092
    +vn -0.689494 0.221799 -0.689494
    +vn -0.701575 0.124842 -0.701575
    +vn -0.701575 0.124842 -0.701575
    +vn -0.824052 0.124791 -0.552599
    +vn -0.809874 0.221711 -0.543092
    +vn -0.689494 0.221799 -0.689494
    +vn -0.543092 0.221711 -0.809874
    +vn -0.552599 0.124791 -0.824052
    +vn -0.552599 0.124791 -0.824052
    +vn -0.701575 0.124842 -0.701575
    +vn -0.689494 0.221799 -0.689494
    +vn -0.543092 0.221711 -0.809874
    +vn -0.375065 0.221464 -0.900156
    +vn -0.381616 0.124647 -0.915878
    +vn -0.381616 0.124647 -0.915878
    +vn -0.552599 0.124791 -0.824052
    +vn -0.543092 0.221711 -0.809874
    +vn -0.375065 0.221464 -0.900156
    +vn -0.191261 0.221134 -0.956305
    +vn -0.194591 0.124454 -0.972957
    +vn -0.194591 0.124454 -0.972957
    +vn -0.381616 0.124647 -0.915878
    +vn -0.375065 0.221464 -0.900156
    +vn -0.191261 0.221134 -0.956305
    +vn 0.000000 0.220939 -0.975288
    +vn -0.000000 0.124341 -0.992240
    +vn -0.000000 0.124341 -0.992240
    +vn -0.194591 0.124454 -0.972957
    +vn -0.191261 0.221134 -0.956305
    +vn -0.992240 0.124341 0.000000
    +vn -0.972957 0.124454 -0.194591
    +vn -0.980581 0.000000 -0.196116
    +vn -0.980581 0.000000 -0.196116
    +vn -1.000000 0.000000 0.000000
    +vn -0.992240 0.124341 0.000000
    +vn -0.972957 0.124454 -0.194591
    +vn -0.915878 0.124647 -0.381616
    +vn -0.923077 0.000000 -0.384615
    +vn -0.923077 0.000000 -0.384615
    +vn -0.980581 0.000000 -0.196116
    +vn -0.972957 0.124454 -0.194591
    +vn -0.915878 0.124647 -0.381616
    +vn -0.824052 0.124791 -0.552599
    +vn -0.830544 0.000000 -0.556953
    +vn -0.830544 0.000000 -0.556953
    +vn -0.923077 0.000000 -0.384615
    +vn -0.915878 0.124647 -0.381616
    +vn -0.824052 0.124791 -0.552599
    +vn -0.701575 0.124842 -0.701575
    +vn -0.707107 0.000000 -0.707107
    +vn -0.707107 0.000000 -0.707107
    +vn -0.830544 0.000000 -0.556953
    +vn -0.824052 0.124791 -0.552599
    +vn -0.701575 0.124842 -0.701575
    +vn -0.552599 0.124791 -0.824052
    +vn -0.556953 0.000000 -0.830544
    +vn -0.556953 0.000000 -0.830544
    +vn -0.707107 0.000000 -0.707107
    +vn -0.701575 0.124842 -0.701575
    +vn -0.552599 0.124791 -0.824052
    +vn -0.381616 0.124647 -0.915878
    +vn -0.384615 0.000000 -0.923077
    +vn -0.384615 0.000000 -0.923077
    +vn -0.556953 0.000000 -0.830544
    +vn -0.552599 0.124791 -0.824052
    +vn -0.381616 0.124647 -0.915878
    +vn -0.194591 0.124454 -0.972957
    +vn -0.196116 0.000000 -0.980581
    +vn -0.196116 0.000000 -0.980581
    +vn -0.384615 0.000000 -0.923077
    +vn -0.381616 0.124647 -0.915878
    +vn -0.194591 0.124454 -0.972957
    +vn -0.000000 0.124341 -0.992240
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.196116 0.000000 -0.980581
    +vn -0.194591 0.124454 -0.972957
    +vn 0.000000 0.429934 -0.902860
    +vn 0.177035 0.430259 -0.885176
    +vn 0.177474 0.425535 -0.887369
    +vn 0.177474 0.425535 -0.887369
    +vn 0.000000 0.425212 -0.905094
    +vn 0.000000 0.429934 -0.902860
    +vn 0.177035 0.430259 -0.885176
    +vn 0.347093 0.430809 -0.833024
    +vn 0.347956 0.426082 -0.835093
    +vn 0.347956 0.426082 -0.835093
    +vn 0.177474 0.425535 -0.887369
    +vn 0.177035 0.430259 -0.885176
    +vn 0.347093 0.430809 -0.833024
    +vn 0.502509 0.431220 -0.749355
    +vn 0.503759 0.426491 -0.751220
    +vn 0.503759 0.426491 -0.751220
    +vn 0.347956 0.426082 -0.835093
    +vn 0.347093 0.430809 -0.833024
    +vn 0.502509 0.431220 -0.749355
    +vn 0.637936 0.431366 -0.637936
    +vn 0.639524 0.426636 -0.639524
    +vn 0.639524 0.426636 -0.639524
    +vn 0.503759 0.426491 -0.751220
    +vn 0.502509 0.431220 -0.749355
    +vn 0.637936 0.431366 -0.637936
    +vn 0.749355 0.431220 -0.502509
    +vn 0.751220 0.426491 -0.503759
    +vn 0.751220 0.426491 -0.503759
    +vn 0.639524 0.426636 -0.639524
    +vn 0.637936 0.431366 -0.637936
    +vn 0.749355 0.431220 -0.502509
    +vn 0.833024 0.430809 -0.347093
    +vn 0.835093 0.426082 -0.347956
    +vn 0.835093 0.426082 -0.347956
    +vn 0.751220 0.426491 -0.503759
    +vn 0.749355 0.431220 -0.502509
    +vn 0.833024 0.430809 -0.347093
    +vn 0.885176 0.430259 -0.177035
    +vn 0.887369 0.425535 -0.177474
    +vn 0.887369 0.425535 -0.177474
    +vn 0.835093 0.426082 -0.347956
    +vn 0.833024 0.430809 -0.347093
    +vn 0.885176 0.430259 -0.177035
    +vn 0.902860 0.429934 0.000000
    +vn 0.905094 0.425212 0.000000
    +vn 0.905094 0.425212 0.000000
    +vn 0.887369 0.425535 -0.177474
    +vn 0.885176 0.430259 -0.177035
    +vn 0.000000 0.425212 -0.905094
    +vn 0.177474 0.425535 -0.887369
    +vn 0.178784 0.411023 -0.893922
    +vn 0.178784 0.411023 -0.893922
    +vn 0.000000 0.410706 -0.911768
    +vn 0.000000 0.425212 -0.905094
    +vn 0.177474 0.425535 -0.887369
    +vn 0.347956 0.426082 -0.835093
    +vn 0.350532 0.411559 -0.841277
    +vn 0.350532 0.411559 -0.841277
    +vn 0.178784 0.411023 -0.893922
    +vn 0.177474 0.425535 -0.887369
    +vn 0.347956 0.426082 -0.835093
    +vn 0.503759 0.426491 -0.751220
    +vn 0.507497 0.411960 -0.756793
    +vn 0.507497 0.411960 -0.756793
    +vn 0.350532 0.411559 -0.841277
    +vn 0.347956 0.426082 -0.835093
    +vn 0.503759 0.426491 -0.751220
    +vn 0.639524 0.426636 -0.639524
    +vn 0.644272 0.412102 -0.644272
    +vn 0.644272 0.412102 -0.644272
    +vn 0.507497 0.411960 -0.756793
    +vn 0.503759 0.426491 -0.751220
    +vn 0.639524 0.426636 -0.639524
    +vn 0.751220 0.426491 -0.503759
    +vn 0.756793 0.411960 -0.507497
    +vn 0.756793 0.411960 -0.507497
    +vn 0.644272 0.412102 -0.644272
    +vn 0.639524 0.426636 -0.639524
    +vn 0.751220 0.426491 -0.503759
    +vn 0.835093 0.426082 -0.347956
    +vn 0.841277 0.411559 -0.350532
    +vn 0.841277 0.411559 -0.350532
    +vn 0.756793 0.411960 -0.507497
    +vn 0.751220 0.426491 -0.503759
    +vn 0.835093 0.426082 -0.347956
    +vn 0.887369 0.425535 -0.177474
    +vn 0.893922 0.411023 -0.178784
    +vn 0.893922 0.411023 -0.178784
    +vn 0.841277 0.411559 -0.350532
    +vn 0.835093 0.426082 -0.347956
    +vn 0.887369 0.425535 -0.177474
    +vn 0.905094 0.425212 0.000000
    +vn 0.911768 0.410706 0.000000
    +vn 0.911768 0.410706 0.000000
    +vn 0.893922 0.411023 -0.178784
    +vn 0.887369 0.425535 -0.177474
    +vn 0.000000 0.410706 -0.911768
    +vn 0.178784 0.411023 -0.893922
    +vn 0.180944 0.385666 -0.904721
    +vn 0.180944 0.385666 -0.904721
    +vn 0.000000 0.385362 -0.922766
    +vn 0.000000 0.410706 -0.911768
    +vn 0.178784 0.411023 -0.893922
    +vn 0.350532 0.411559 -0.841277
    +vn 0.354778 0.386181 -0.851467
    +vn 0.354778 0.386181 -0.851467
    +vn 0.180944 0.385666 -0.904721
    +vn 0.178784 0.411023 -0.893922
    +vn 0.350532 0.411559 -0.841277
    +vn 0.507497 0.411960 -0.756793
    +vn 0.513656 0.386567 -0.765979
    +vn 0.513656 0.386567 -0.765979
    +vn 0.354778 0.386181 -0.851467
    +vn 0.350532 0.411559 -0.841277
    +vn 0.507497 0.411960 -0.756793
    +vn 0.644272 0.412102 -0.644272
    +vn 0.652097 0.386703 -0.652097
    +vn 0.652097 0.386703 -0.652097
    +vn 0.513656 0.386567 -0.765979
    +vn 0.507497 0.411960 -0.756793
    +vn 0.644272 0.412102 -0.644272
    +vn 0.756793 0.411960 -0.507497
    +vn 0.765979 0.386567 -0.513656
    +vn 0.765979 0.386567 -0.513656
    +vn 0.652097 0.386703 -0.652097
    +vn 0.644272 0.412102 -0.644272
    +vn 0.756793 0.411960 -0.507497
    +vn 0.841277 0.411559 -0.350532
    +vn 0.851467 0.386181 -0.354778
    +vn 0.851467 0.386181 -0.354778
    +vn 0.765979 0.386567 -0.513656
    +vn 0.756793 0.411960 -0.507497
    +vn 0.841277 0.411559 -0.350532
    +vn 0.893922 0.411023 -0.178784
    +vn 0.904721 0.385666 -0.180944
    +vn 0.904721 0.385666 -0.180944
    +vn 0.851467 0.386181 -0.354778
    +vn 0.841277 0.411559 -0.350532
    +vn 0.893922 0.411023 -0.178784
    +vn 0.911768 0.410706 0.000000
    +vn 0.922766 0.385362 -0.000000
    +vn 0.922766 0.385362 -0.000000
    +vn 0.904721 0.385666 -0.180944
    +vn 0.893922 0.411023 -0.178784
    +vn 0.000000 0.385362 -0.922766
    +vn 0.180944 0.385666 -0.904721
    +vn 0.183887 0.347598 -0.919435
    +vn 0.183887 0.347598 -0.919435
    +vn 0.000000 0.347314 -0.937749
    +vn 0.000000 0.385362 -0.922766
    +vn 0.180944 0.385666 -0.904721
    +vn 0.354778 0.386181 -0.851467
    +vn 0.360564 0.348078 -0.865353
    +vn 0.360564 0.348078 -0.865353
    +vn 0.183887 0.347598 -0.919435
    +vn 0.180944 0.385666 -0.904721
    +vn 0.354778 0.386181 -0.851467
    +vn 0.513656 0.386567 -0.765979
    +vn 0.522050 0.348436 -0.778496
    +vn 0.522050 0.348436 -0.778496
    +vn 0.360564 0.348078 -0.865353
    +vn 0.354778 0.386181 -0.851467
    +vn 0.513656 0.386567 -0.765979
    +vn 0.652097 0.386703 -0.652097
    +vn 0.662761 0.348563 -0.662761
    +vn 0.662761 0.348563 -0.662761
    +vn 0.522050 0.348436 -0.778496
    +vn 0.513656 0.386567 -0.765979
    +vn 0.652097 0.386703 -0.652097
    +vn 0.765979 0.386567 -0.513656
    +vn 0.778496 0.348436 -0.522050
    +vn 0.778496 0.348436 -0.522050
    +vn 0.662761 0.348563 -0.662761
    +vn 0.652097 0.386703 -0.652097
    +vn 0.765979 0.386567 -0.513656
    +vn 0.851467 0.386181 -0.354778
    +vn 0.865353 0.348078 -0.360564
    +vn 0.865353 0.348078 -0.360564
    +vn 0.778496 0.348436 -0.522050
    +vn 0.765979 0.386567 -0.513656
    +vn 0.851467 0.386181 -0.354778
    +vn 0.904721 0.385666 -0.180944
    +vn 0.919435 0.347598 -0.183887
    +vn 0.919435 0.347598 -0.183887
    +vn 0.865353 0.348078 -0.360564
    +vn 0.851467 0.386181 -0.354778
    +vn 0.904721 0.385666 -0.180944
    +vn 0.922766 0.385362 -0.000000
    +vn 0.937749 0.347314 0.000000
    +vn 0.937749 0.347314 0.000000
    +vn 0.919435 0.347598 -0.183887
    +vn 0.904721 0.385666 -0.180944
    +vn 0.000000 0.347314 -0.937749
    +vn 0.183887 0.347598 -0.919435
    +vn 0.187448 0.294017 -0.937239
    +vn 0.187448 0.294017 -0.937239
    +vn 0.000000 0.293768 -0.955877
    +vn 0.000000 0.347314 -0.937749
    +vn 0.183887 0.347598 -0.919435
    +vn 0.360564 0.348078 -0.865353
    +vn 0.367565 0.294439 -0.882157
    +vn 0.367565 0.294439 -0.882157
    +vn 0.187448 0.294017 -0.937239
    +vn 0.183887 0.347598 -0.919435
    +vn 0.360564 0.348078 -0.865353
    +vn 0.522050 0.348436 -0.778496
    +vn 0.532209 0.294754 -0.793646
    +vn 0.532209 0.294754 -0.793646
    +vn 0.367565 0.294439 -0.882157
    +vn 0.360564 0.348078 -0.865353
    +vn 0.522050 0.348436 -0.778496
    +vn 0.662761 0.348563 -0.662761
    +vn 0.675668 0.294866 -0.675668
    +vn 0.675668 0.294866 -0.675668
    +vn 0.532209 0.294754 -0.793646
    +vn 0.522050 0.348436 -0.778496
    +vn 0.662761 0.348563 -0.662761
    +vn 0.778496 0.348436 -0.522050
    +vn 0.793646 0.294754 -0.532209
    +vn 0.793646 0.294754 -0.532209
    +vn 0.675668 0.294866 -0.675668
    +vn 0.662761 0.348563 -0.662761
    +vn 0.778496 0.348436 -0.522050
    +vn 0.865353 0.348078 -0.360564
    +vn 0.882157 0.294439 -0.367565
    +vn 0.882157 0.294439 -0.367565
    +vn 0.793646 0.294754 -0.532209
    +vn 0.778496 0.348436 -0.522050
    +vn 0.865353 0.348078 -0.360564
    +vn 0.919435 0.347598 -0.183887
    +vn 0.937239 0.294017 -0.187448
    +vn 0.937239 0.294017 -0.187448
    +vn 0.882157 0.294439 -0.367565
    +vn 0.865353 0.348078 -0.360564
    +vn 0.919435 0.347598 -0.183887
    +vn 0.937749 0.347314 0.000000
    +vn 0.955877 0.293768 -0.000000
    +vn 0.955877 0.293768 -0.000000
    +vn 0.937239 0.294017 -0.187448
    +vn 0.919435 0.347598 -0.183887
    +vn 0.000000 0.293768 -0.955877
    +vn 0.187448 0.294017 -0.937239
    +vn 0.191261 0.221134 -0.956305
    +vn 0.191261 0.221134 -0.956305
    +vn 0.000000 0.220939 -0.975288
    +vn 0.000000 0.293768 -0.955877
    +vn 0.187448 0.294017 -0.937239
    +vn 0.367565 0.294439 -0.882157
    +vn 0.375065 0.221464 -0.900156
    +vn 0.375065 0.221464 -0.900156
    +vn 0.191261 0.221134 -0.956305
    +vn 0.187448 0.294017 -0.937239
    +vn 0.367565 0.294439 -0.882157
    +vn 0.532209 0.294754 -0.793646
    +vn 0.543092 0.221711 -0.809874
    +vn 0.543092 0.221711 -0.809874
    +vn 0.375065 0.221464 -0.900156
    +vn 0.367565 0.294439 -0.882157
    +vn 0.532209 0.294754 -0.793646
    +vn 0.675668 0.294866 -0.675668
    +vn 0.689494 0.221799 -0.689494
    +vn 0.689494 0.221799 -0.689494
    +vn 0.543092 0.221711 -0.809874
    +vn 0.532209 0.294754 -0.793646
    +vn 0.675668 0.294866 -0.675668
    +vn 0.793646 0.294754 -0.532209
    +vn 0.809874 0.221711 -0.543092
    +vn 0.809874 0.221711 -0.543092
    +vn 0.689494 0.221799 -0.689494
    +vn 0.675668 0.294866 -0.675668
    +vn 0.793646 0.294754 -0.532209
    +vn 0.882157 0.294439 -0.367565
    +vn 0.900156 0.221464 -0.375065
    +vn 0.900156 0.221464 -0.375065
    +vn 0.809874 0.221711 -0.543092
    +vn 0.793646 0.294754 -0.532209
    +vn 0.882157 0.294439 -0.367565
    +vn 0.937239 0.294017 -0.187448
    +vn 0.956305 0.221134 -0.191261
    +vn 0.956305 0.221134 -0.191261
    +vn 0.900156 0.221464 -0.375065
    +vn 0.882157 0.294439 -0.367565
    +vn 0.937239 0.294017 -0.187448
    +vn 0.955877 0.293768 -0.000000
    +vn 0.975288 0.220939 0.000000
    +vn 0.975288 0.220939 0.000000
    +vn 0.956305 0.221134 -0.191261
    +vn 0.937239 0.294017 -0.187448
    +vn 0.000000 0.220939 -0.975288
    +vn 0.191261 0.221134 -0.956305
    +vn 0.194591 0.124454 -0.972957
    +vn 0.194591 0.124454 -0.972957
    +vn 0.000000 0.124341 -0.992240
    +vn 0.000000 0.220939 -0.975288
    +vn 0.191261 0.221134 -0.956305
    +vn 0.375065 0.221464 -0.900156
    +vn 0.381616 0.124647 -0.915878
    +vn 0.381616 0.124647 -0.915878
    +vn 0.194591 0.124454 -0.972957
    +vn 0.191261 0.221134 -0.956305
    +vn 0.375065 0.221464 -0.900156
    +vn 0.543092 0.221711 -0.809874
    +vn 0.552599 0.124791 -0.824052
    +vn 0.552599 0.124791 -0.824052
    +vn 0.381616 0.124647 -0.915878
    +vn 0.375065 0.221464 -0.900156
    +vn 0.543092 0.221711 -0.809874
    +vn 0.689494 0.221799 -0.689494
    +vn 0.701575 0.124842 -0.701575
    +vn 0.701575 0.124842 -0.701575
    +vn 0.552599 0.124791 -0.824052
    +vn 0.543092 0.221711 -0.809874
    +vn 0.689494 0.221799 -0.689494
    +vn 0.809874 0.221711 -0.543092
    +vn 0.824052 0.124791 -0.552599
    +vn 0.824052 0.124791 -0.552599
    +vn 0.701575 0.124842 -0.701575
    +vn 0.689494 0.221799 -0.689494
    +vn 0.809874 0.221711 -0.543092
    +vn 0.900156 0.221464 -0.375065
    +vn 0.915878 0.124647 -0.381616
    +vn 0.915878 0.124647 -0.381616
    +vn 0.824052 0.124791 -0.552599
    +vn 0.809874 0.221711 -0.543092
    +vn 0.900156 0.221464 -0.375065
    +vn 0.956305 0.221134 -0.191261
    +vn 0.972957 0.124454 -0.194591
    +vn 0.972957 0.124454 -0.194591
    +vn 0.915878 0.124647 -0.381616
    +vn 0.900156 0.221464 -0.375065
    +vn 0.956305 0.221134 -0.191261
    +vn 0.975288 0.220939 0.000000
    +vn 0.992240 0.124341 -0.000000
    +vn 0.992240 0.124341 -0.000000
    +vn 0.972957 0.124454 -0.194591
    +vn 0.956305 0.221134 -0.191261
    +vn 0.000000 0.124341 -0.992240
    +vn 0.194591 0.124454 -0.972957
    +vn 0.196116 0.000000 -0.980581
    +vn 0.196116 0.000000 -0.980581
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.124341 -0.992240
    +vn 0.194591 0.124454 -0.972957
    +vn 0.381616 0.124647 -0.915878
    +vn 0.384615 0.000000 -0.923077
    +vn 0.384615 0.000000 -0.923077
    +vn 0.196116 0.000000 -0.980581
    +vn 0.194591 0.124454 -0.972957
    +vn 0.381616 0.124647 -0.915878
    +vn 0.552599 0.124791 -0.824052
    +vn 0.556953 0.000000 -0.830544
    +vn 0.556953 0.000000 -0.830544
    +vn 0.384615 0.000000 -0.923077
    +vn 0.381616 0.124647 -0.915878
    +vn 0.552599 0.124791 -0.824052
    +vn 0.701575 0.124842 -0.701575
    +vn 0.707107 0.000000 -0.707107
    +vn 0.707107 0.000000 -0.707107
    +vn 0.556953 0.000000 -0.830544
    +vn 0.552599 0.124791 -0.824052
    +vn 0.701575 0.124842 -0.701575
    +vn 0.824052 0.124791 -0.552599
    +vn 0.830544 0.000000 -0.556953
    +vn 0.830544 0.000000 -0.556953
    +vn 0.707107 0.000000 -0.707107
    +vn 0.701575 0.124842 -0.701575
    +vn 0.824052 0.124791 -0.552599
    +vn 0.915878 0.124647 -0.381616
    +vn 0.923077 0.000000 -0.384615
    +vn 0.923077 0.000000 -0.384615
    +vn 0.830544 0.000000 -0.556953
    +vn 0.824052 0.124791 -0.552599
    +vn 0.915878 0.124647 -0.381616
    +vn 0.972957 0.124454 -0.194591
    +vn 0.980581 0.000000 -0.196116
    +vn 0.980581 0.000000 -0.196116
    +vn 0.923077 0.000000 -0.384615
    +vn 0.915878 0.124647 -0.381616
    +vn 0.972957 0.124454 -0.194591
    +vn 0.992240 0.124341 -0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 0.980581 0.000000 -0.196116
    +vn 0.972957 0.124454 -0.194591
    +vn 1.000000 0.000000 0.000000
    +vn 0.980581 -0.000000 0.196116
    +vn 0.944945 -0.267136 0.188989
    +vn 0.944945 -0.267136 0.188989
    +vn 0.963723 -0.266906 -0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 0.980581 -0.000000 0.196116
    +vn 0.923077 -0.000000 0.384615
    +vn 0.889431 -0.267526 0.370596
    +vn 0.889431 -0.267526 0.370596
    +vn 0.944945 -0.267136 0.188989
    +vn 0.980581 -0.000000 0.196116
    +vn 0.923077 -0.000000 0.384615
    +vn 0.830544 -0.000000 0.556953
    +vn 0.800204 -0.267817 0.536607
    +vn 0.800204 -0.267817 0.536607
    +vn 0.889431 -0.267526 0.370596
    +vn 0.923077 -0.000000 0.384615
    +vn 0.830544 -0.000000 0.556953
    +vn 0.707107 -0.000000 0.707107
    +vn 0.681256 -0.267920 0.681256
    +vn 0.681256 -0.267920 0.681256
    +vn 0.800204 -0.267817 0.536607
    +vn 0.830544 -0.000000 0.556953
    +vn 0.707107 -0.000000 0.707107
    +vn 0.556953 -0.000000 0.830544
    +vn 0.536607 -0.267817 0.800204
    +vn 0.536607 -0.267817 0.800204
    +vn 0.681256 -0.267920 0.681256
    +vn 0.707107 -0.000000 0.707107
    +vn 0.556953 -0.000000 0.830544
    +vn 0.384615 -0.000000 0.923077
    +vn 0.370596 -0.267526 0.889431
    +vn 0.370596 -0.267526 0.889431
    +vn 0.536607 -0.267817 0.800204
    +vn 0.556953 -0.000000 0.830544
    +vn 0.384615 -0.000000 0.923077
    +vn 0.196116 -0.000000 0.980581
    +vn 0.188989 -0.267136 0.944945
    +vn 0.188989 -0.267136 0.944945
    +vn 0.370596 -0.267526 0.889431
    +vn 0.384615 -0.000000 0.923077
    +vn 0.196116 -0.000000 0.980581
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.266906 0.963723
    +vn 0.000000 -0.266906 0.963723
    +vn 0.188989 -0.267136 0.944945
    +vn 0.196116 -0.000000 0.980581
    +vn 0.963723 -0.266906 -0.000000
    +vn 0.944945 -0.267136 0.188989
    +vn 0.859761 -0.480877 0.171952
    +vn 0.859761 -0.480877 0.171952
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.963723 -0.266906 -0.000000
    +vn 0.944945 -0.267136 0.188989
    +vn 0.889431 -0.267526 0.370596
    +vn 0.809049 -0.481458 0.337104
    +vn 0.809049 -0.481458 0.337104
    +vn 0.859761 -0.480877 0.171952
    +vn 0.944945 -0.267136 0.188989
    +vn 0.889431 -0.267526 0.370596
    +vn 0.800204 -0.267817 0.536607
    +vn 0.727749 -0.481891 0.488019
    +vn 0.727749 -0.481891 0.488019
    +vn 0.809049 -0.481458 0.337104
    +vn 0.889431 -0.267526 0.370596
    +vn 0.800204 -0.267817 0.536607
    +vn 0.681256 -0.267920 0.681256
    +vn 0.619529 -0.482045 0.619529
    +vn 0.619529 -0.482045 0.619529
    +vn 0.727749 -0.481891 0.488019
    +vn 0.800204 -0.267817 0.536607
    +vn 0.681256 -0.267920 0.681256
    +vn 0.536607 -0.267817 0.800204
    +vn 0.488019 -0.481891 0.727749
    +vn 0.488019 -0.481891 0.727749
    +vn 0.619529 -0.482045 0.619529
    +vn 0.681256 -0.267920 0.681256
    +vn 0.536607 -0.267817 0.800204
    +vn 0.370596 -0.267526 0.889431
    +vn 0.337104 -0.481458 0.809049
    +vn 0.337104 -0.481458 0.809049
    +vn 0.488019 -0.481891 0.727749
    +vn 0.536607 -0.267817 0.800204
    +vn 0.370596 -0.267526 0.889431
    +vn 0.188989 -0.267136 0.944945
    +vn 0.171952 -0.480877 0.859761
    +vn 0.171952 -0.480877 0.859761
    +vn 0.337104 -0.481458 0.809049
    +vn 0.370596 -0.267526 0.889431
    +vn 0.188989 -0.267136 0.944945
    +vn 0.000000 -0.266906 0.963723
    +vn 0.000000 -0.480535 0.876976
    +vn 0.000000 -0.480535 0.876976
    +vn 0.171952 -0.480877 0.859761
    +vn 0.188989 -0.267136 0.944945
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.859761 -0.480877 0.171952
    +vn 0.764227 -0.626574 0.152845
    +vn 0.764227 -0.626574 0.152845
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.859761 -0.480877 0.171952
    +vn 0.809049 -0.481458 0.337104
    +vn 0.718967 -0.627171 0.299570
    +vn 0.718967 -0.627171 0.299570
    +vn 0.764227 -0.626574 0.152845
    +vn 0.859761 -0.480877 0.171952
    +vn 0.809049 -0.481458 0.337104
    +vn 0.727749 -0.481891 0.488019
    +vn 0.646597 -0.627617 0.433600
    +vn 0.646597 -0.627617 0.433600
    +vn 0.718967 -0.627171 0.299570
    +vn 0.809049 -0.481458 0.337104
    +vn 0.727749 -0.481891 0.488019
    +vn 0.619529 -0.482045 0.619529
    +vn 0.550408 -0.627775 0.550408
    +vn 0.550408 -0.627775 0.550408
    +vn 0.646597 -0.627617 0.433600
    +vn 0.727749 -0.481891 0.488019
    +vn 0.619529 -0.482045 0.619529
    +vn 0.488019 -0.481891 0.727749
    +vn 0.433600 -0.627617 0.646597
    +vn 0.433600 -0.627617 0.646597
    +vn 0.550408 -0.627775 0.550408
    +vn 0.619529 -0.482045 0.619529
    +vn 0.488019 -0.481891 0.727749
    +vn 0.337104 -0.481458 0.809049
    +vn 0.299570 -0.627171 0.718967
    +vn 0.299570 -0.627171 0.718967
    +vn 0.433600 -0.627617 0.646597
    +vn 0.488019 -0.481891 0.727749
    +vn 0.337104 -0.481458 0.809049
    +vn 0.171952 -0.480877 0.859761
    +vn 0.152845 -0.626574 0.764227
    +vn 0.152845 -0.626574 0.764227
    +vn 0.299570 -0.627171 0.718967
    +vn 0.337104 -0.481458 0.809049
    +vn 0.171952 -0.480877 0.859761
    +vn 0.000000 -0.480535 0.876976
    +vn 0.000000 -0.626221 0.779645
    +vn 0.000000 -0.626221 0.779645
    +vn 0.152845 -0.626574 0.764227
    +vn 0.171952 -0.480877 0.859761
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.764227 -0.626574 0.152845
    +vn 0.684218 -0.716324 0.136844
    +vn 0.684218 -0.716324 0.136844
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.764227 -0.626574 0.152845
    +vn 0.718967 -0.627171 0.299570
    +vn 0.643575 -0.716871 0.268156
    +vn 0.643575 -0.716871 0.268156
    +vn 0.684218 -0.716324 0.136844
    +vn 0.764227 -0.626574 0.152845
    +vn 0.718967 -0.627171 0.299570
    +vn 0.646597 -0.627617 0.433600
    +vn 0.578711 -0.717279 0.388077
    +vn 0.578711 -0.717279 0.388077
    +vn 0.643575 -0.716871 0.268156
    +vn 0.718967 -0.627171 0.299570
    +vn 0.646597 -0.627617 0.433600
    +vn 0.550408 -0.627775 0.550408
    +vn 0.492597 -0.717423 0.492597
    +vn 0.492597 -0.717423 0.492597
    +vn 0.578711 -0.717279 0.388077
    +vn 0.646597 -0.627617 0.433600
    +vn 0.550408 -0.627775 0.550408
    +vn 0.433600 -0.627617 0.646597
    +vn 0.388077 -0.717279 0.578711
    +vn 0.388077 -0.717279 0.578711
    +vn 0.492597 -0.717423 0.492597
    +vn 0.550408 -0.627775 0.550408
    +vn 0.433600 -0.627617 0.646597
    +vn 0.299570 -0.627171 0.718967
    +vn 0.268156 -0.716871 0.643575
    +vn 0.268156 -0.716871 0.643575
    +vn 0.388077 -0.717279 0.578711
    +vn 0.433600 -0.627617 0.646597
    +vn 0.299570 -0.627171 0.718967
    +vn 0.152845 -0.626574 0.764227
    +vn 0.136844 -0.716324 0.684218
    +vn 0.136844 -0.716324 0.684218
    +vn 0.268156 -0.716871 0.643575
    +vn 0.299570 -0.627171 0.718967
    +vn 0.152845 -0.626574 0.764227
    +vn 0.000000 -0.626221 0.779645
    +vn 0.000000 -0.716000 0.698100
    +vn 0.000000 -0.716000 0.698100
    +vn 0.136844 -0.716324 0.684218
    +vn 0.152845 -0.626574 0.764227
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.684218 -0.716324 0.136844
    +vn 0.632552 -0.764116 0.126510
    +vn 0.632552 -0.764116 0.126510
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.684218 -0.716324 0.136844
    +vn 0.643575 -0.716871 0.268156
    +vn 0.594912 -0.764614 0.247880
    +vn 0.594912 -0.764614 0.247880
    +vn 0.632552 -0.764116 0.126510
    +vn 0.684218 -0.716324 0.136844
    +vn 0.643575 -0.716871 0.268156
    +vn 0.578711 -0.717279 0.388077
    +vn 0.534909 -0.764987 0.358704
    +vn 0.534909 -0.764987 0.358704
    +vn 0.594912 -0.764614 0.247880
    +vn 0.643575 -0.716871 0.268156
    +vn 0.578711 -0.717279 0.388077
    +vn 0.492597 -0.717423 0.492597
    +vn 0.455299 -0.765118 0.455299
    +vn 0.455299 -0.765118 0.455299
    +vn 0.534909 -0.764987 0.358704
    +vn 0.578711 -0.717279 0.388077
    +vn 0.492597 -0.717423 0.492597
    +vn 0.388077 -0.717279 0.578711
    +vn 0.358704 -0.764987 0.534909
    +vn 0.358704 -0.764987 0.534909
    +vn 0.455299 -0.765118 0.455299
    +vn 0.492597 -0.717423 0.492597
    +vn 0.388077 -0.717279 0.578711
    +vn 0.268156 -0.716871 0.643575
    +vn 0.247880 -0.764614 0.594912
    +vn 0.247880 -0.764614 0.594912
    +vn 0.358704 -0.764987 0.534909
    +vn 0.388077 -0.717279 0.578711
    +vn 0.268156 -0.716871 0.643575
    +vn 0.136844 -0.716324 0.684218
    +vn 0.126510 -0.764116 0.632552
    +vn 0.126510 -0.764116 0.632552
    +vn 0.247880 -0.764614 0.594912
    +vn 0.268156 -0.716871 0.643575
    +vn 0.136844 -0.716324 0.684218
    +vn 0.000000 -0.716000 0.698100
    +vn -0.000000 -0.763821 0.645428
    +vn -0.000000 -0.763821 0.645428
    +vn 0.126510 -0.764116 0.632552
    +vn 0.136844 -0.716324 0.684218
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.632552 -0.764116 0.126510
    +vn 0.623680 -0.771663 0.124736
    +vn 0.623680 -0.771663 0.124736
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.632552 -0.764116 0.126510
    +vn 0.594912 -0.764614 0.247880
    +vn 0.586557 -0.772153 0.244399
    +vn 0.586557 -0.772153 0.244399
    +vn 0.623680 -0.771663 0.124736
    +vn 0.632552 -0.764116 0.126510
    +vn 0.594912 -0.764614 0.247880
    +vn 0.534909 -0.764987 0.358704
    +vn 0.527390 -0.772518 0.353661
    +vn 0.527390 -0.772518 0.353661
    +vn 0.586557 -0.772153 0.244399
    +vn 0.594912 -0.764614 0.247880
    +vn 0.534909 -0.764987 0.358704
    +vn 0.455299 -0.765118 0.455299
    +vn 0.448897 -0.772647 0.448897
    +vn 0.448897 -0.772647 0.448897
    +vn 0.527390 -0.772518 0.353661
    +vn 0.534909 -0.764987 0.358704
    +vn 0.455299 -0.765118 0.455299
    +vn 0.358704 -0.764987 0.534909
    +vn 0.353661 -0.772518 0.527390
    +vn 0.353661 -0.772518 0.527390
    +vn 0.448897 -0.772647 0.448897
    +vn 0.455299 -0.765118 0.455299
    +vn 0.358704 -0.764987 0.534909
    +vn 0.247880 -0.764614 0.594912
    +vn 0.244399 -0.772153 0.586557
    +vn 0.244399 -0.772153 0.586557
    +vn 0.353661 -0.772518 0.527390
    +vn 0.358704 -0.764987 0.534909
    +vn 0.247880 -0.764614 0.594912
    +vn 0.126510 -0.764116 0.632552
    +vn 0.124736 -0.771663 0.623680
    +vn 0.124736 -0.771663 0.623680
    +vn 0.244399 -0.772153 0.586557
    +vn 0.247880 -0.764614 0.594912
    +vn 0.126510 -0.764116 0.632552
    +vn -0.000000 -0.763821 0.645428
    +vn 0.000000 -0.771373 0.636383
    +vn 0.000000 -0.771373 0.636383
    +vn 0.124736 -0.771663 0.623680
    +vn 0.126510 -0.764116 0.632552
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.623680 -0.771663 0.124736
    +vn 0.706287 -0.693690 0.141257
    +vn 0.706287 -0.693690 0.141257
    +vn 0.720595 -0.693356 -0.000000
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.623680 -0.771663 0.124736
    +vn 0.586557 -0.772153 0.244399
    +vn 0.664366 -0.694255 0.276819
    +vn 0.664366 -0.694255 0.276819
    +vn 0.706287 -0.693690 0.141257
    +vn 0.623680 -0.771663 0.124736
    +vn 0.586557 -0.772153 0.244399
    +vn 0.527390 -0.772518 0.353661
    +vn 0.597429 -0.694676 0.400629
    +vn 0.597429 -0.694676 0.400629
    +vn 0.664366 -0.694255 0.276819
    +vn 0.586557 -0.772153 0.244399
    +vn 0.527390 -0.772518 0.353661
    +vn 0.448897 -0.772647 0.448897
    +vn 0.508536 -0.694825 0.508536
    +vn 0.508536 -0.694825 0.508536
    +vn 0.597429 -0.694676 0.400629
    +vn 0.527390 -0.772518 0.353661
    +vn 0.448897 -0.772647 0.448897
    +vn 0.353661 -0.772518 0.527390
    +vn 0.400629 -0.694676 0.597429
    +vn 0.400629 -0.694676 0.597429
    +vn 0.508536 -0.694825 0.508536
    +vn 0.448897 -0.772647 0.448897
    +vn 0.353661 -0.772518 0.527390
    +vn 0.244399 -0.772153 0.586557
    +vn 0.276819 -0.694255 0.664366
    +vn 0.276819 -0.694255 0.664366
    +vn 0.400629 -0.694676 0.597429
    +vn 0.353661 -0.772518 0.527390
    +vn 0.244399 -0.772153 0.586557
    +vn 0.124736 -0.771663 0.623680
    +vn 0.141257 -0.693690 0.706287
    +vn 0.141257 -0.693690 0.706287
    +vn 0.276819 -0.694255 0.664366
    +vn 0.244399 -0.772153 0.586557
    +vn 0.124736 -0.771663 0.623680
    +vn 0.000000 -0.771373 0.636383
    +vn 0.000000 -0.693356 0.720595
    +vn 0.000000 -0.693356 0.720595
    +vn 0.141257 -0.693690 0.706287
    +vn 0.124736 -0.771663 0.623680
    +vn 0.720595 -0.693356 -0.000000
    +vn 0.706287 -0.693690 0.141257
    +vn 0.980581 -0.000000 0.196116
    +vn 0.980581 -0.000000 0.196116
    +vn 1.000000 0.000000 0.000000
    +vn 0.720595 -0.693356 -0.000000
    +vn 0.706287 -0.693690 0.141257
    +vn 0.664366 -0.694255 0.276819
    +vn 0.923077 -0.000000 0.384615
    +vn 0.923077 -0.000000 0.384615
    +vn 0.980581 -0.000000 0.196116
    +vn 0.706287 -0.693690 0.141257
    +vn 0.664366 -0.694255 0.276819
    +vn 0.597429 -0.694676 0.400629
    +vn 0.830544 -0.000000 0.556953
    +vn 0.830544 -0.000000 0.556953
    +vn 0.923077 -0.000000 0.384615
    +vn 0.664366 -0.694255 0.276819
    +vn 0.597429 -0.694676 0.400629
    +vn 0.508536 -0.694825 0.508536
    +vn 0.707107 -0.000000 0.707107
    +vn 0.707107 -0.000000 0.707107
    +vn 0.830544 -0.000000 0.556953
    +vn 0.597429 -0.694676 0.400629
    +vn 0.508536 -0.694825 0.508536
    +vn 0.400629 -0.694676 0.597429
    +vn 0.556953 -0.000000 0.830544
    +vn 0.556953 -0.000000 0.830544
    +vn 0.707107 -0.000000 0.707107
    +vn 0.508536 -0.694825 0.508536
    +vn 0.400629 -0.694676 0.597429
    +vn 0.276819 -0.694255 0.664366
    +vn 0.384615 -0.000000 0.923077
    +vn 0.384615 -0.000000 0.923077
    +vn 0.556953 -0.000000 0.830544
    +vn 0.400629 -0.694676 0.597429
    +vn 0.276819 -0.694255 0.664366
    +vn 0.141257 -0.693690 0.706287
    +vn 0.196116 -0.000000 0.980581
    +vn 0.196116 -0.000000 0.980581
    +vn 0.384615 -0.000000 0.923077
    +vn 0.276819 -0.694255 0.664366
    +vn 0.141257 -0.693690 0.706287
    +vn 0.000000 -0.693356 0.720595
    +vn -0.000000 -0.000000 1.000000
    +vn -0.000000 -0.000000 1.000000
    +vn 0.196116 -0.000000 0.980581
    +vn 0.141257 -0.693690 0.706287
    +vn 0.000000 -0.000000 1.000000
    +vn -0.196116 -0.000000 0.980581
    +vn -0.188989 -0.267136 0.944945
    +vn -0.188989 -0.267136 0.944945
    +vn 0.000000 -0.266906 0.963723
    +vn 0.000000 -0.000000 1.000000
    +vn -0.196116 -0.000000 0.980581
    +vn -0.384615 -0.000000 0.923077
    +vn -0.370596 -0.267526 0.889431
    +vn -0.370596 -0.267526 0.889431
    +vn -0.188989 -0.267136 0.944945
    +vn -0.196116 -0.000000 0.980581
    +vn -0.384615 -0.000000 0.923077
    +vn -0.556953 -0.000000 0.830544
    +vn -0.536607 -0.267817 0.800204
    +vn -0.536607 -0.267817 0.800204
    +vn -0.370596 -0.267526 0.889431
    +vn -0.384615 -0.000000 0.923077
    +vn -0.556953 -0.000000 0.830544
    +vn -0.707107 -0.000000 0.707107
    +vn -0.681256 -0.267920 0.681256
    +vn -0.681256 -0.267920 0.681256
    +vn -0.536607 -0.267817 0.800204
    +vn -0.556953 -0.000000 0.830544
    +vn -0.707107 -0.000000 0.707107
    +vn -0.830544 -0.000000 0.556953
    +vn -0.800204 -0.267817 0.536607
    +vn -0.800204 -0.267817 0.536607
    +vn -0.681256 -0.267920 0.681256
    +vn -0.707107 -0.000000 0.707107
    +vn -0.830544 -0.000000 0.556953
    +vn -0.923077 -0.000000 0.384615
    +vn -0.889431 -0.267526 0.370596
    +vn -0.889431 -0.267526 0.370596
    +vn -0.800204 -0.267817 0.536607
    +vn -0.830544 -0.000000 0.556953
    +vn -0.923077 -0.000000 0.384615
    +vn -0.980581 -0.000000 0.196116
    +vn -0.944945 -0.267136 0.188989
    +vn -0.944945 -0.267136 0.188989
    +vn -0.889431 -0.267526 0.370596
    +vn -0.923077 -0.000000 0.384615
    +vn -0.980581 -0.000000 0.196116
    +vn -1.000000 0.000000 0.000000
    +vn -0.963723 -0.266906 -0.000000
    +vn -0.963723 -0.266906 -0.000000
    +vn -0.944945 -0.267136 0.188989
    +vn -0.980581 -0.000000 0.196116
    +vn 0.000000 -0.266906 0.963723
    +vn -0.188989 -0.267136 0.944945
    +vn -0.171952 -0.480877 0.859761
    +vn -0.171952 -0.480877 0.859761
    +vn 0.000000 -0.480535 0.876976
    +vn 0.000000 -0.266906 0.963723
    +vn -0.188989 -0.267136 0.944945
    +vn -0.370596 -0.267526 0.889431
    +vn -0.337104 -0.481458 0.809049
    +vn -0.337104 -0.481458 0.809049
    +vn -0.171952 -0.480877 0.859761
    +vn -0.188989 -0.267136 0.944945
    +vn -0.370596 -0.267526 0.889431
    +vn -0.536607 -0.267817 0.800204
    +vn -0.488019 -0.481891 0.727749
    +vn -0.488019 -0.481891 0.727749
    +vn -0.337104 -0.481458 0.809049
    +vn -0.370596 -0.267526 0.889431
    +vn -0.536607 -0.267817 0.800204
    +vn -0.681256 -0.267920 0.681256
    +vn -0.619529 -0.482045 0.619529
    +vn -0.619529 -0.482045 0.619529
    +vn -0.488019 -0.481891 0.727749
    +vn -0.536607 -0.267817 0.800204
    +vn -0.681256 -0.267920 0.681256
    +vn -0.800204 -0.267817 0.536607
    +vn -0.727749 -0.481891 0.488019
    +vn -0.727749 -0.481891 0.488019
    +vn -0.619529 -0.482045 0.619529
    +vn -0.681256 -0.267920 0.681256
    +vn -0.800204 -0.267817 0.536607
    +vn -0.889431 -0.267526 0.370596
    +vn -0.809049 -0.481458 0.337104
    +vn -0.809049 -0.481458 0.337104
    +vn -0.727749 -0.481891 0.488019
    +vn -0.800204 -0.267817 0.536607
    +vn -0.889431 -0.267526 0.370596
    +vn -0.944945 -0.267136 0.188989
    +vn -0.859761 -0.480877 0.171952
    +vn -0.859761 -0.480877 0.171952
    +vn -0.809049 -0.481458 0.337104
    +vn -0.889431 -0.267526 0.370596
    +vn -0.944945 -0.267136 0.188989
    +vn -0.963723 -0.266906 -0.000000
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.859761 -0.480877 0.171952
    +vn -0.944945 -0.267136 0.188989
    +vn 0.000000 -0.480535 0.876976
    +vn -0.171952 -0.480877 0.859761
    +vn -0.152845 -0.626574 0.764227
    +vn -0.152845 -0.626574 0.764227
    +vn 0.000000 -0.626221 0.779645
    +vn 0.000000 -0.480535 0.876976
    +vn -0.171952 -0.480877 0.859761
    +vn -0.337104 -0.481458 0.809049
    +vn -0.299570 -0.627171 0.718967
    +vn -0.299570 -0.627171 0.718967
    +vn -0.152845 -0.626574 0.764227
    +vn -0.171952 -0.480877 0.859761
    +vn -0.337104 -0.481458 0.809049
    +vn -0.488019 -0.481891 0.727749
    +vn -0.433600 -0.627617 0.646597
    +vn -0.433600 -0.627617 0.646597
    +vn -0.299570 -0.627171 0.718967
    +vn -0.337104 -0.481458 0.809049
    +vn -0.488019 -0.481891 0.727749
    +vn -0.619529 -0.482045 0.619529
    +vn -0.550408 -0.627775 0.550408
    +vn -0.550408 -0.627775 0.550408
    +vn -0.433600 -0.627617 0.646597
    +vn -0.488019 -0.481891 0.727749
    +vn -0.619529 -0.482045 0.619529
    +vn -0.727749 -0.481891 0.488019
    +vn -0.646597 -0.627617 0.433600
    +vn -0.646597 -0.627617 0.433600
    +vn -0.550408 -0.627775 0.550408
    +vn -0.619529 -0.482045 0.619529
    +vn -0.727749 -0.481891 0.488019
    +vn -0.809049 -0.481458 0.337104
    +vn -0.718967 -0.627171 0.299570
    +vn -0.718967 -0.627171 0.299570
    +vn -0.646597 -0.627617 0.433600
    +vn -0.727749 -0.481891 0.488019
    +vn -0.809049 -0.481458 0.337104
    +vn -0.859761 -0.480877 0.171952
    +vn -0.764227 -0.626574 0.152845
    +vn -0.764227 -0.626574 0.152845
    +vn -0.718967 -0.627171 0.299570
    +vn -0.809049 -0.481458 0.337104
    +vn -0.859761 -0.480877 0.171952
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.764227 -0.626574 0.152845
    +vn -0.859761 -0.480877 0.171952
    +vn 0.000000 -0.626221 0.779645
    +vn -0.152845 -0.626574 0.764227
    +vn -0.136844 -0.716324 0.684218
    +vn -0.136844 -0.716324 0.684218
    +vn 0.000000 -0.716000 0.698100
    +vn 0.000000 -0.626221 0.779645
    +vn -0.152845 -0.626574 0.764227
    +vn -0.299570 -0.627171 0.718967
    +vn -0.268156 -0.716871 0.643575
    +vn -0.268156 -0.716871 0.643575
    +vn -0.136844 -0.716324 0.684218
    +vn -0.152845 -0.626574 0.764227
    +vn -0.299570 -0.627171 0.718967
    +vn -0.433600 -0.627617 0.646597
    +vn -0.388077 -0.717279 0.578711
    +vn -0.388077 -0.717279 0.578711
    +vn -0.268156 -0.716871 0.643575
    +vn -0.299570 -0.627171 0.718967
    +vn -0.433600 -0.627617 0.646597
    +vn -0.550408 -0.627775 0.550408
    +vn -0.492597 -0.717423 0.492597
    +vn -0.492597 -0.717423 0.492597
    +vn -0.388077 -0.717279 0.578711
    +vn -0.433600 -0.627617 0.646597
    +vn -0.550408 -0.627775 0.550408
    +vn -0.646597 -0.627617 0.433600
    +vn -0.578711 -0.717279 0.388077
    +vn -0.578711 -0.717279 0.388077
    +vn -0.492597 -0.717423 0.492597
    +vn -0.550408 -0.627775 0.550408
    +vn -0.646597 -0.627617 0.433600
    +vn -0.718967 -0.627171 0.299570
    +vn -0.643575 -0.716871 0.268156
    +vn -0.643575 -0.716871 0.268156
    +vn -0.578711 -0.717279 0.388077
    +vn -0.646597 -0.627617 0.433600
    +vn -0.718967 -0.627171 0.299570
    +vn -0.764227 -0.626574 0.152845
    +vn -0.684218 -0.716324 0.136844
    +vn -0.684218 -0.716324 0.136844
    +vn -0.643575 -0.716871 0.268156
    +vn -0.718967 -0.627171 0.299570
    +vn -0.764227 -0.626574 0.152845
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.684218 -0.716324 0.136844
    +vn -0.764227 -0.626574 0.152845
    +vn 0.000000 -0.716000 0.698100
    +vn -0.136844 -0.716324 0.684218
    +vn -0.126510 -0.764116 0.632552
    +vn -0.126510 -0.764116 0.632552
    +vn 0.000000 -0.763821 0.645428
    +vn 0.000000 -0.716000 0.698100
    +vn -0.136844 -0.716324 0.684218
    +vn -0.268156 -0.716871 0.643575
    +vn -0.247880 -0.764614 0.594912
    +vn -0.247880 -0.764614 0.594912
    +vn -0.126510 -0.764116 0.632552
    +vn -0.136844 -0.716324 0.684218
    +vn -0.268156 -0.716871 0.643575
    +vn -0.388077 -0.717279 0.578711
    +vn -0.358704 -0.764987 0.534909
    +vn -0.358704 -0.764987 0.534909
    +vn -0.247880 -0.764614 0.594912
    +vn -0.268156 -0.716871 0.643575
    +vn -0.388077 -0.717279 0.578711
    +vn -0.492597 -0.717423 0.492597
    +vn -0.455299 -0.765118 0.455299
    +vn -0.455299 -0.765118 0.455299
    +vn -0.358704 -0.764987 0.534909
    +vn -0.388077 -0.717279 0.578711
    +vn -0.492597 -0.717423 0.492597
    +vn -0.578711 -0.717279 0.388077
    +vn -0.534909 -0.764987 0.358704
    +vn -0.534909 -0.764987 0.358704
    +vn -0.455299 -0.765118 0.455299
    +vn -0.492597 -0.717423 0.492597
    +vn -0.578711 -0.717279 0.388077
    +vn -0.643575 -0.716871 0.268156
    +vn -0.594912 -0.764614 0.247880
    +vn -0.594912 -0.764614 0.247880
    +vn -0.534909 -0.764987 0.358704
    +vn -0.578711 -0.717279 0.388077
    +vn -0.643575 -0.716871 0.268156
    +vn -0.684218 -0.716324 0.136844
    +vn -0.632552 -0.764116 0.126510
    +vn -0.632552 -0.764116 0.126510
    +vn -0.594912 -0.764614 0.247880
    +vn -0.643575 -0.716871 0.268156
    +vn -0.684218 -0.716324 0.136844
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.632552 -0.764116 0.126510
    +vn -0.684218 -0.716324 0.136844
    +vn 0.000000 -0.763821 0.645428
    +vn -0.126510 -0.764116 0.632552
    +vn -0.124736 -0.771663 0.623680
    +vn -0.124736 -0.771663 0.623680
    +vn 0.000000 -0.771373 0.636383
    +vn 0.000000 -0.763821 0.645428
    +vn -0.126510 -0.764116 0.632552
    +vn -0.247880 -0.764614 0.594912
    +vn -0.244399 -0.772153 0.586557
    +vn -0.244399 -0.772153 0.586557
    +vn -0.124736 -0.771663 0.623680
    +vn -0.126510 -0.764116 0.632552
    +vn -0.247880 -0.764614 0.594912
    +vn -0.358704 -0.764987 0.534909
    +vn -0.353661 -0.772518 0.527390
    +vn -0.353661 -0.772518 0.527390
    +vn -0.244399 -0.772153 0.586557
    +vn -0.247880 -0.764614 0.594912
    +vn -0.358704 -0.764987 0.534909
    +vn -0.455299 -0.765118 0.455299
    +vn -0.448897 -0.772647 0.448897
    +vn -0.448897 -0.772647 0.448897
    +vn -0.353661 -0.772518 0.527390
    +vn -0.358704 -0.764987 0.534909
    +vn -0.455299 -0.765118 0.455299
    +vn -0.534909 -0.764987 0.358704
    +vn -0.527390 -0.772518 0.353661
    +vn -0.527390 -0.772518 0.353661
    +vn -0.448897 -0.772647 0.448897
    +vn -0.455299 -0.765118 0.455299
    +vn -0.534909 -0.764987 0.358704
    +vn -0.594912 -0.764614 0.247880
    +vn -0.586557 -0.772153 0.244399
    +vn -0.586557 -0.772153 0.244399
    +vn -0.527390 -0.772518 0.353661
    +vn -0.534909 -0.764987 0.358704
    +vn -0.594912 -0.764614 0.247880
    +vn -0.632552 -0.764116 0.126510
    +vn -0.623680 -0.771663 0.124736
    +vn -0.623680 -0.771663 0.124736
    +vn -0.586557 -0.772153 0.244399
    +vn -0.594912 -0.764614 0.247880
    +vn -0.632552 -0.764116 0.126510
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.623680 -0.771663 0.124736
    +vn -0.632552 -0.764116 0.126510
    +vn 0.000000 -0.771373 0.636383
    +vn -0.124736 -0.771663 0.623680
    +vn -0.141257 -0.693690 0.706287
    +vn -0.141257 -0.693690 0.706287
    +vn 0.000000 -0.693356 0.720595
    +vn 0.000000 -0.771373 0.636383
    +vn -0.124736 -0.771663 0.623680
    +vn -0.244399 -0.772153 0.586557
    +vn -0.276819 -0.694255 0.664366
    +vn -0.276819 -0.694255 0.664366
    +vn -0.141257 -0.693690 0.706287
    +vn -0.124736 -0.771663 0.623680
    +vn -0.244399 -0.772153 0.586557
    +vn -0.353661 -0.772518 0.527390
    +vn -0.400629 -0.694676 0.597429
    +vn -0.400629 -0.694676 0.597429
    +vn -0.276819 -0.694255 0.664366
    +vn -0.244399 -0.772153 0.586557
    +vn -0.353661 -0.772518 0.527390
    +vn -0.448897 -0.772647 0.448897
    +vn -0.508536 -0.694825 0.508536
    +vn -0.508536 -0.694825 0.508536
    +vn -0.400629 -0.694676 0.597429
    +vn -0.353661 -0.772518 0.527390
    +vn -0.448897 -0.772647 0.448897
    +vn -0.527390 -0.772518 0.353661
    +vn -0.597429 -0.694676 0.400629
    +vn -0.597429 -0.694676 0.400629
    +vn -0.508536 -0.694825 0.508536
    +vn -0.448897 -0.772647 0.448897
    +vn -0.527390 -0.772518 0.353661
    +vn -0.586557 -0.772153 0.244399
    +vn -0.664366 -0.694255 0.276819
    +vn -0.664366 -0.694255 0.276819
    +vn -0.597429 -0.694676 0.400629
    +vn -0.527390 -0.772518 0.353661
    +vn -0.586557 -0.772153 0.244399
    +vn -0.623680 -0.771663 0.124736
    +vn -0.706287 -0.693690 0.141257
    +vn -0.706287 -0.693690 0.141257
    +vn -0.664366 -0.694255 0.276819
    +vn -0.586557 -0.772153 0.244399
    +vn -0.623680 -0.771663 0.124736
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.720595 -0.693356 -0.000000
    +vn -0.720595 -0.693356 -0.000000
    +vn -0.706287 -0.693690 0.141257
    +vn -0.623680 -0.771663 0.124736
    +vn 0.000000 -0.693356 0.720595
    +vn -0.141257 -0.693690 0.706287
    +vn -0.196116 -0.000000 0.980581
    +vn -0.196116 -0.000000 0.980581
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.693356 0.720595
    +vn -0.141257 -0.693690 0.706287
    +vn -0.276819 -0.694255 0.664366
    +vn -0.384615 -0.000000 0.923077
    +vn -0.384615 -0.000000 0.923077
    +vn -0.196116 -0.000000 0.980581
    +vn -0.141257 -0.693690 0.706287
    +vn -0.276819 -0.694255 0.664366
    +vn -0.400629 -0.694676 0.597429
    +vn -0.556953 -0.000000 0.830544
    +vn -0.556953 -0.000000 0.830544
    +vn -0.384615 -0.000000 0.923077
    +vn -0.276819 -0.694255 0.664366
    +vn -0.400629 -0.694676 0.597429
    +vn -0.508536 -0.694825 0.508536
    +vn -0.707107 -0.000000 0.707107
    +vn -0.707107 -0.000000 0.707107
    +vn -0.556953 -0.000000 0.830544
    +vn -0.400629 -0.694676 0.597429
    +vn -0.508536 -0.694825 0.508536
    +vn -0.597429 -0.694676 0.400629
    +vn -0.830544 -0.000000 0.556953
    +vn -0.830544 -0.000000 0.556953
    +vn -0.707107 -0.000000 0.707107
    +vn -0.508536 -0.694825 0.508536
    +vn -0.597429 -0.694676 0.400629
    +vn -0.664366 -0.694255 0.276819
    +vn -0.923077 -0.000000 0.384615
    +vn -0.923077 -0.000000 0.384615
    +vn -0.830544 -0.000000 0.556953
    +vn -0.597429 -0.694676 0.400629
    +vn -0.664366 -0.694255 0.276819
    +vn -0.706287 -0.693690 0.141257
    +vn -0.980581 -0.000000 0.196116
    +vn -0.980581 -0.000000 0.196116
    +vn -0.923077 -0.000000 0.384615
    +vn -0.664366 -0.694255 0.276819
    +vn -0.706287 -0.693690 0.141257
    +vn -0.720595 -0.693356 -0.000000
    +vn -1.000000 -0.000000 -0.000000
    +vn -1.000000 -0.000000 -0.000000
    +vn -0.980581 -0.000000 0.196116
    +vn -0.706287 -0.693690 0.141257
    +vn -1.000000 0.000000 0.000000
    +vn -0.980581 0.000000 -0.196116
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.963723 -0.266906 -0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -0.980581 0.000000 -0.196116
    +vn -0.923077 0.000000 -0.384615
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.980581 0.000000 -0.196116
    +vn -0.923077 0.000000 -0.384615
    +vn -0.830544 0.000000 -0.556953
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.923077 0.000000 -0.384615
    +vn -0.830544 0.000000 -0.556953
    +vn -0.707107 0.000000 -0.707107
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.830544 0.000000 -0.556953
    +vn -0.707107 0.000000 -0.707107
    +vn -0.556953 0.000000 -0.830544
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.707107 0.000000 -0.707107
    +vn -0.556953 0.000000 -0.830544
    +vn -0.384615 0.000000 -0.923077
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.556953 0.000000 -0.830544
    +vn -0.384615 0.000000 -0.923077
    +vn -0.196116 0.000000 -0.980581
    +vn -0.188989 -0.267136 -0.944945
    +vn -0.188989 -0.267136 -0.944945
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.384615 0.000000 -0.923077
    +vn -0.196116 0.000000 -0.980581
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 -0.266906 -0.963723
    +vn 0.000000 -0.266906 -0.963723
    +vn -0.188989 -0.267136 -0.944945
    +vn -0.196116 0.000000 -0.980581
    +vn -0.963723 -0.266906 -0.000000
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.963723 -0.266906 -0.000000
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.944945 -0.267136 -0.188989
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.889431 -0.267526 -0.370596
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.800204 -0.267817 -0.536607
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.681256 -0.267920 -0.681256
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.536607 -0.267817 -0.800204
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.188989 -0.267136 -0.944945
    +vn -0.171952 -0.480877 -0.859761
    +vn -0.171952 -0.480877 -0.859761
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.370596 -0.267526 -0.889431
    +vn -0.188989 -0.267136 -0.944945
    +vn 0.000000 -0.266906 -0.963723
    +vn 0.000000 -0.480535 -0.876976
    +vn 0.000000 -0.480535 -0.876976
    +vn -0.171952 -0.480877 -0.859761
    +vn -0.188989 -0.267136 -0.944945
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.876976 -0.480535 -0.000000
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.859761 -0.480877 -0.171952
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.809049 -0.481458 -0.337104
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.727749 -0.481891 -0.488019
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.619529 -0.482045 -0.619529
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.488019 -0.481891 -0.727749
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.171952 -0.480877 -0.859761
    +vn -0.152845 -0.626574 -0.764227
    +vn -0.152845 -0.626574 -0.764227
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.337104 -0.481458 -0.809049
    +vn -0.171952 -0.480877 -0.859761
    +vn 0.000000 -0.480535 -0.876976
    +vn 0.000000 -0.626221 -0.779645
    +vn 0.000000 -0.626221 -0.779645
    +vn -0.152845 -0.626574 -0.764227
    +vn -0.171952 -0.480877 -0.859761
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.779645 -0.626221 -0.000000
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.764227 -0.626574 -0.152845
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.718967 -0.627171 -0.299570
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.646597 -0.627617 -0.433600
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.550408 -0.627775 -0.550408
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.433600 -0.627617 -0.646597
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.152845 -0.626574 -0.764227
    +vn -0.136844 -0.716324 -0.684218
    +vn -0.136844 -0.716324 -0.684218
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.299570 -0.627171 -0.718967
    +vn -0.152845 -0.626574 -0.764227
    +vn 0.000000 -0.626221 -0.779645
    +vn 0.000000 -0.716000 -0.698100
    +vn 0.000000 -0.716000 -0.698100
    +vn -0.136844 -0.716324 -0.684218
    +vn -0.152845 -0.626574 -0.764227
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.698100 -0.716000 -0.000000
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.684218 -0.716324 -0.136844
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.643575 -0.716871 -0.268156
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.578711 -0.717279 -0.388077
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.492597 -0.717423 -0.492597
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.388077 -0.717279 -0.578711
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.136844 -0.716324 -0.684218
    +vn -0.126510 -0.764116 -0.632552
    +vn -0.126510 -0.764116 -0.632552
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.268156 -0.716871 -0.643575
    +vn -0.136844 -0.716324 -0.684218
    +vn 0.000000 -0.716000 -0.698100
    +vn 0.000000 -0.763821 -0.645428
    +vn 0.000000 -0.763821 -0.645428
    +vn -0.126510 -0.764116 -0.632552
    +vn -0.136844 -0.716324 -0.684218
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.645428 -0.763821 -0.000000
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.632552 -0.764116 -0.126510
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.594912 -0.764614 -0.247880
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.534909 -0.764987 -0.358704
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.455299 -0.765118 -0.455299
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.358704 -0.764987 -0.534909
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.126510 -0.764116 -0.632552
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.247880 -0.764614 -0.594912
    +vn -0.126510 -0.764116 -0.632552
    +vn 0.000000 -0.763821 -0.645428
    +vn -0.000000 -0.771373 -0.636383
    +vn -0.000000 -0.771373 -0.636383
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.126510 -0.764116 -0.632552
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.720595 -0.693356 -0.000000
    +vn -0.636383 -0.771373 -0.000000
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.623680 -0.771663 -0.124736
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.586557 -0.772153 -0.244399
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.527390 -0.772518 -0.353661
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.448897 -0.772647 -0.448897
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.353661 -0.772518 -0.527390
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.141257 -0.693690 -0.706287
    +vn -0.141257 -0.693690 -0.706287
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.244399 -0.772153 -0.586557
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.000000 -0.771373 -0.636383
    +vn -0.000000 -0.693356 -0.720595
    +vn -0.000000 -0.693356 -0.720595
    +vn -0.141257 -0.693690 -0.706287
    +vn -0.124736 -0.771663 -0.623680
    +vn -0.720595 -0.693356 -0.000000
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.980581 -0.000000 -0.196116
    +vn -0.980581 -0.000000 -0.196116
    +vn -1.000000 0.000000 0.000000
    +vn -0.720595 -0.693356 -0.000000
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.923077 -0.000000 -0.384615
    +vn -0.923077 -0.000000 -0.384615
    +vn -0.980581 -0.000000 -0.196116
    +vn -0.706287 -0.693690 -0.141257
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.830544 -0.000000 -0.556953
    +vn -0.830544 -0.000000 -0.556953
    +vn -0.923077 -0.000000 -0.384615
    +vn -0.664366 -0.694255 -0.276819
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.707107 -0.000000 -0.707107
    +vn -0.707107 -0.000000 -0.707107
    +vn -0.830544 -0.000000 -0.556953
    +vn -0.597429 -0.694676 -0.400629
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.707107 -0.000000 -0.707107
    +vn -0.508536 -0.694825 -0.508536
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.400629 -0.694676 -0.597429
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.141257 -0.693690 -0.706287
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.276819 -0.694255 -0.664366
    +vn -0.141257 -0.693690 -0.706287
    +vn -0.000000 -0.693356 -0.720595
    +vn 0.000000 -0.000000 -1.000000
    +vn 0.000000 -0.000000 -1.000000
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.141257 -0.693690 -0.706287
    +vn 0.000000 0.000000 -1.000000
    +vn 0.196116 0.000000 -0.980581
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.000000 -0.266906 -0.963723
    +vn 0.000000 0.000000 -1.000000
    +vn 0.196116 0.000000 -0.980581
    +vn 0.384615 0.000000 -0.923077
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.196116 0.000000 -0.980581
    +vn 0.384615 0.000000 -0.923077
    +vn 0.556953 0.000000 -0.830544
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.384615 0.000000 -0.923077
    +vn 0.556953 0.000000 -0.830544
    +vn 0.707107 0.000000 -0.707107
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.556953 0.000000 -0.830544
    +vn 0.707107 0.000000 -0.707107
    +vn 0.830544 0.000000 -0.556953
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.707107 0.000000 -0.707107
    +vn 0.830544 0.000000 -0.556953
    +vn 0.923077 0.000000 -0.384615
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.830544 0.000000 -0.556953
    +vn 0.923077 0.000000 -0.384615
    +vn 0.980581 0.000000 -0.196116
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.923077 0.000000 -0.384615
    +vn 0.980581 0.000000 -0.196116
    +vn 1.000000 0.000000 0.000000
    +vn 0.963723 -0.266906 -0.000000
    +vn 0.963723 -0.266906 -0.000000
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.980581 0.000000 -0.196116
    +vn 0.000000 -0.266906 -0.963723
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.000000 -0.480535 -0.876976
    +vn 0.000000 -0.266906 -0.963723
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.188989 -0.267136 -0.944945
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.370596 -0.267526 -0.889431
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.536607 -0.267817 -0.800204
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.681256 -0.267920 -0.681256
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.800204 -0.267817 -0.536607
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.889431 -0.267526 -0.370596
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.963723 -0.266906 -0.000000
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.944945 -0.267136 -0.188989
    +vn 0.000000 -0.480535 -0.876976
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.000000 -0.626221 -0.779645
    +vn 0.000000 -0.480535 -0.876976
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.171952 -0.480877 -0.859761
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.337104 -0.481458 -0.809049
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.488019 -0.481891 -0.727749
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.619529 -0.482045 -0.619529
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.727749 -0.481891 -0.488019
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.809049 -0.481458 -0.337104
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.876976 -0.480535 -0.000000
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.859761 -0.480877 -0.171952
    +vn 0.000000 -0.626221 -0.779645
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.000000 -0.716000 -0.698100
    +vn 0.000000 -0.626221 -0.779645
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.152845 -0.626574 -0.764227
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.299570 -0.627171 -0.718967
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.433600 -0.627617 -0.646597
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.550408 -0.627775 -0.550408
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.646597 -0.627617 -0.433600
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.718967 -0.627171 -0.299570
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.779645 -0.626221 -0.000000
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.764227 -0.626574 -0.152845
    +vn 0.000000 -0.716000 -0.698100
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.000000 -0.763821 -0.645428
    +vn 0.000000 -0.716000 -0.698100
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.136844 -0.716324 -0.684218
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.268156 -0.716871 -0.643575
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.388077 -0.717279 -0.578711
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.492597 -0.717423 -0.492597
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.578711 -0.717279 -0.388077
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.643575 -0.716871 -0.268156
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.698100 -0.716000 -0.000000
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.684218 -0.716324 -0.136844
    +vn 0.000000 -0.763821 -0.645428
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.000000 -0.771373 -0.636383
    +vn 0.000000 -0.763821 -0.645428
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.126510 -0.764116 -0.632552
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.247880 -0.764614 -0.594912
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.358704 -0.764987 -0.534909
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.455299 -0.765118 -0.455299
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.534909 -0.764987 -0.358704
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.594912 -0.764614 -0.247880
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.645428 -0.763821 -0.000000
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.632552 -0.764116 -0.126510
    +vn 0.000000 -0.771373 -0.636383
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.000000 -0.693356 -0.720595
    +vn 0.000000 -0.771373 -0.636383
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.124736 -0.771663 -0.623680
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.244399 -0.772153 -0.586557
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.353661 -0.772518 -0.527390
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.448897 -0.772647 -0.448897
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.527390 -0.772518 -0.353661
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.586557 -0.772153 -0.244399
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.636383 -0.771373 -0.000000
    +vn 0.720595 -0.693356 -0.000000
    +vn 0.720595 -0.693356 -0.000000
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.623680 -0.771663 -0.124736
    +vn 0.000000 -0.693356 -0.720595
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.196116 0.000000 -0.980581
    +vn 0.196116 0.000000 -0.980581
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 -0.693356 -0.720595
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.384615 0.000000 -0.923077
    +vn 0.384615 0.000000 -0.923077
    +vn 0.196116 0.000000 -0.980581
    +vn 0.141257 -0.693690 -0.706287
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.556953 -0.000000 -0.830544
    +vn 0.556953 -0.000000 -0.830544
    +vn 0.384615 0.000000 -0.923077
    +vn 0.276819 -0.694255 -0.664366
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.707107 -0.000000 -0.707107
    +vn 0.707107 -0.000000 -0.707107
    +vn 0.556953 -0.000000 -0.830544
    +vn 0.400629 -0.694676 -0.597429
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.707107 -0.000000 -0.707107
    +vn 0.508536 -0.694825 -0.508536
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.597429 -0.694676 -0.400629
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.664366 -0.694255 -0.276819
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.720595 -0.693356 -0.000000
    +vn 1.000000 -0.000000 0.000000
    +vn 1.000000 -0.000000 0.000000
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.706287 -0.693690 -0.141257
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.976900 0.213697
    +vn 0.005648 -0.976968 0.213313
    +vn 0.005648 -0.976968 0.213313
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.976900 0.213697
    +vn 0.000000 -0.871576 0.490261
    +vn 0.005348 -0.871953 0.489560
    +vn 0.005348 -0.871953 0.489560
    +vn 0.005648 -0.976968 0.213313
    +vn 0.000000 -0.976900 0.213697
    +vn 0.000000 -0.871576 0.490261
    +vn 0.000000 -0.579524 0.814955
    +vn 0.003820 -0.580235 0.814440
    +vn 0.003820 -0.580235 0.814440
    +vn 0.005348 -0.871953 0.489560
    +vn 0.000000 -0.871576 0.490261
    +vn 0.000000 -0.579524 0.814955
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.003820 -0.580235 0.814440
    +vn 0.000000 -0.579524 0.814955
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 0.579524 0.814955
    +vn -0.004318 0.580229 0.814442
    +vn -0.004318 0.580229 0.814442
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 0.579524 0.814955
    +vn 0.000000 0.871576 0.490261
    +vn -0.006763 0.871941 0.489565
    +vn -0.006763 0.871941 0.489565
    +vn -0.004318 0.580229 0.814442
    +vn 0.000000 0.579524 0.814955
    +vn 0.000000 0.871576 0.490261
    +vn 0.000000 0.976900 0.213697
    +vn -0.007778 0.976952 0.213316
    +vn -0.007778 0.976952 0.213316
    +vn -0.006763 0.871941 0.489565
    +vn 0.000000 0.871576 0.490261
    +vn 0.000000 0.976900 0.213697
    +vn 0.000000 1.000000 0.000000
    +vn -0.008035 0.999968 0.000000
    +vn -0.008035 0.999968 0.000000
    +vn -0.007778 0.976952 0.213316
    +vn 0.000000 0.976900 0.213697
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.005648 -0.976968 0.213313
    +vn 0.025925 -0.976799 0.212581
    +vn 0.025925 -0.976799 0.212581
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.005648 -0.976968 0.213313
    +vn 0.005348 -0.871953 0.489560
    +vn 0.024623 -0.872243 0.488453
    +vn 0.024623 -0.872243 0.488453
    +vn 0.025925 -0.976799 0.212581
    +vn 0.005648 -0.976968 0.213313
    +vn 0.005348 -0.871953 0.489560
    +vn 0.003820 -0.580235 0.814440
    +vn 0.017655 -0.580819 0.813842
    +vn 0.017655 -0.580819 0.813842
    +vn 0.024623 -0.872243 0.488453
    +vn 0.005348 -0.871953 0.489560
    +vn 0.003820 -0.580235 0.814440
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.017655 -0.580819 0.813842
    +vn 0.003820 -0.580235 0.814440
    +vn 0.000000 -0.000000 1.000000
    +vn -0.004318 0.580229 0.814442
    +vn -0.020059 0.580154 0.814260
    +vn -0.020059 0.580154 0.814260
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.004318 0.580229 0.814442
    +vn -0.006763 0.871941 0.489565
    +vn -0.031478 0.871421 0.489524
    +vn -0.031478 0.871421 0.489524
    +vn -0.020059 0.580154 0.814260
    +vn -0.004318 0.580229 0.814442
    +vn -0.006763 0.871941 0.489565
    +vn -0.007778 0.976952 0.213316
    +vn -0.036253 0.976299 0.213368
    +vn -0.036253 0.976299 0.213368
    +vn -0.031478 0.871421 0.489524
    +vn -0.006763 0.871941 0.489565
    +vn -0.007778 0.976952 0.213316
    +vn -0.008035 0.999968 0.000000
    +vn -0.037474 0.999298 0.000000
    +vn -0.037474 0.999298 0.000000
    +vn -0.036253 0.976299 0.213368
    +vn -0.007778 0.976952 0.213316
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.025925 -0.976799 0.212581
    +vn 0.068733 -0.974727 0.212562
    +vn 0.068733 -0.974727 0.212562
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.025925 -0.976799 0.212581
    +vn 0.024623 -0.872243 0.488453
    +vn 0.065389 -0.869669 0.489285
    +vn 0.065389 -0.869669 0.489285
    +vn 0.068733 -0.974727 0.212562
    +vn 0.025925 -0.976799 0.212581
    +vn 0.024623 -0.872243 0.488453
    +vn 0.017655 -0.580819 0.813842
    +vn 0.046877 -0.577183 0.815268
    +vn 0.046877 -0.577183 0.815268
    +vn 0.065389 -0.869669 0.489285
    +vn 0.024623 -0.872243 0.488453
    +vn 0.017655 -0.580819 0.813842
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.046877 -0.577183 0.815268
    +vn 0.017655 -0.580819 0.813842
    +vn 0.000000 -0.000000 1.000000
    +vn -0.020059 0.580154 0.814260
    +vn -0.053340 0.573847 0.817224
    +vn -0.053340 0.573847 0.817224
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.020059 0.580154 0.814260
    +vn -0.031478 0.871421 0.489524
    +vn -0.084209 0.865177 0.494345
    +vn -0.084209 0.865177 0.494345
    +vn -0.053340 0.573847 0.817224
    +vn -0.020059 0.580154 0.814260
    +vn -0.031478 0.871421 0.489524
    +vn -0.036253 0.976299 0.213368
    +vn -0.097345 0.971464 0.216292
    +vn -0.097345 0.971464 0.216292
    +vn -0.084209 0.865177 0.494345
    +vn -0.031478 0.871421 0.489524
    +vn -0.036253 0.976299 0.213368
    +vn -0.037474 0.999298 0.000000
    +vn -0.100735 0.994913 0.000000
    +vn -0.100735 0.994913 0.000000
    +vn -0.097345 0.971464 0.216292
    +vn -0.036253 0.976299 0.213368
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.068733 -0.974727 0.212562
    +vn 0.148853 -0.965097 0.215478
    +vn 0.148853 -0.965097 0.215478
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.068733 -0.974727 0.212562
    +vn 0.065389 -0.869669 0.489285
    +vn 0.141188 -0.856453 0.496542
    +vn 0.141188 -0.856453 0.496542
    +vn 0.148853 -0.965097 0.215478
    +vn 0.068733 -0.974727 0.212562
    +vn 0.065389 -0.869669 0.489285
    +vn 0.046877 -0.577183 0.815268
    +vn 0.100071 -0.560239 0.822264
    +vn 0.100071 -0.560239 0.822264
    +vn 0.141188 -0.856453 0.496542
    +vn 0.065389 -0.869669 0.489285
    +vn 0.046877 -0.577183 0.815268
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.100071 -0.560239 0.822264
    +vn 0.046877 -0.577183 0.815268
    +vn 0.000000 -0.000000 1.000000
    +vn -0.053340 0.573847 0.817224
    +vn -0.113165 0.550215 0.827319
    +vn -0.113165 0.550215 0.827319
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.053340 0.573847 0.817224
    +vn -0.084209 0.865177 0.494345
    +vn -0.181468 0.840701 0.510188
    +vn -0.181468 0.840701 0.510188
    +vn -0.113165 0.550215 0.827319
    +vn -0.053340 0.573847 0.817224
    +vn -0.084209 0.865177 0.494345
    +vn -0.097345 0.971464 0.216292
    +vn -0.211634 0.950923 0.225736
    +vn -0.211634 0.950923 0.225736
    +vn -0.181468 0.840701 0.510188
    +vn -0.084209 0.865177 0.494345
    +vn -0.097345 0.971464 0.216292
    +vn -0.100735 0.994913 0.000000
    +vn -0.219512 0.975610 0.000000
    +vn -0.219512 0.975610 0.000000
    +vn -0.211634 0.950923 0.225736
    +vn -0.097345 0.971464 0.216292
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.148853 -0.965097 0.215478
    +vn 0.293834 -0.928823 0.225719
    +vn 0.293834 -0.928823 0.225719
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.148853 -0.965097 0.215478
    +vn 0.141188 -0.856453 0.496542
    +vn 0.274589 -0.810212 0.517840
    +vn 0.274589 -0.810212 0.517840
    +vn 0.293834 -0.928823 0.225719
    +vn 0.148853 -0.965097 0.215478
    +vn 0.141188 -0.856453 0.496542
    +vn 0.100071 -0.560239 0.822264
    +vn 0.187980 -0.510352 0.839169
    +vn 0.187980 -0.510352 0.839169
    +vn 0.274589 -0.810212 0.517840
    +vn 0.141188 -0.856453 0.496542
    +vn 0.100071 -0.560239 0.822264
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.187980 -0.510352 0.839169
    +vn 0.100071 -0.560239 0.822264
    +vn 0.000000 -0.000000 1.000000
    +vn -0.113165 0.550215 0.827319
    +vn -0.208262 0.488129 0.847560
    +vn -0.208262 0.488129 0.847560
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.113165 0.550215 0.827319
    +vn -0.181468 0.840701 0.510188
    +vn -0.343858 0.766201 0.542860
    +vn -0.343858 0.766201 0.542860
    +vn -0.208262 0.488129 0.847560
    +vn -0.113165 0.550215 0.827319
    +vn -0.181468 0.840701 0.510188
    +vn -0.211634 0.950923 0.225736
    +vn -0.407589 0.879546 0.245501
    +vn -0.407589 0.879546 0.245501
    +vn -0.343858 0.766201 0.542860
    +vn -0.181468 0.840701 0.510188
    +vn -0.211634 0.950923 0.225736
    +vn -0.219512 0.975610 0.000000
    +vn -0.424434 0.905459 0.000000
    +vn -0.424434 0.905459 0.000000
    +vn -0.407589 0.879546 0.245501
    +vn -0.211634 0.950923 0.225736
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.293834 -0.928823 0.225719
    +vn 0.540740 -0.803596 0.248664
    +vn 0.540740 -0.803596 0.248664
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.293834 -0.928823 0.225719
    +vn 0.274589 -0.810212 0.517840
    +vn 0.485844 -0.672432 0.558383
    +vn 0.485844 -0.672432 0.558383
    +vn 0.540740 -0.803596 0.248664
    +vn 0.293834 -0.928823 0.225719
    +vn 0.274589 -0.810212 0.517840
    +vn 0.187980 -0.510352 0.839169
    +vn 0.310948 -0.394822 0.864538
    +vn 0.310948 -0.394822 0.864538
    +vn 0.485844 -0.672432 0.558383
    +vn 0.274589 -0.810212 0.517840
    +vn 0.187980 -0.510352 0.839169
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.310948 -0.394822 0.864538
    +vn 0.187980 -0.510352 0.839169
    +vn 0.000000 -0.000000 1.000000
    +vn -0.208262 0.488129 0.847560
    +vn -0.331034 0.360742 0.871942
    +vn -0.331034 0.360742 0.871942
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.208262 0.488129 0.847560
    +vn -0.343858 0.766201 0.542860
    +vn -0.564287 0.583298 0.584246
    +vn -0.564287 0.583298 0.584246
    +vn -0.331034 0.360742 0.871942
    +vn -0.208262 0.488129 0.847560
    +vn -0.343858 0.766201 0.542860
    +vn -0.407589 0.879546 0.245501
    +vn -0.680756 0.680471 0.271166
    +vn -0.680756 0.680471 0.271166
    +vn -0.564287 0.583298 0.584246
    +vn -0.343858 0.766201 0.542860
    +vn -0.407589 0.879546 0.245501
    +vn -0.424434 0.905459 0.000000
    +vn -0.711485 0.702701 0.000000
    +vn -0.711485 0.702701 0.000000
    +vn -0.680756 0.680471 0.271166
    +vn -0.407589 0.879546 0.245501
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.540740 -0.803596 0.248664
    +vn 0.840939 -0.466081 0.274935
    +vn 0.840939 -0.466081 0.274935
    +vn 0.868243 -0.496139 -0.000000
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.540740 -0.803596 0.248664
    +vn 0.485844 -0.672432 0.558383
    +vn 0.714311 -0.367903 0.595322
    +vn 0.714311 -0.367903 0.595322
    +vn 0.840939 -0.466081 0.274935
    +vn 0.540740 -0.803596 0.248664
    +vn 0.485844 -0.672432 0.558383
    +vn 0.310948 -0.394822 0.864538
    +vn 0.427231 -0.201287 0.881452
    +vn 0.427231 -0.201287 0.881452
    +vn 0.714311 -0.367903 0.595322
    +vn 0.485844 -0.672432 0.558383
    +vn 0.310948 -0.394822 0.864538
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.427231 -0.201287 0.881452
    +vn 0.310948 -0.394822 0.864538
    +vn 0.000000 -0.000000 1.000000
    +vn -0.331034 0.360742 0.871942
    +vn -0.434909 0.174841 0.883337
    +vn -0.434909 0.174841 0.883337
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.331034 0.360742 0.871942
    +vn -0.564287 0.583298 0.584246
    +vn -0.745699 0.283732 0.602851
    +vn -0.745699 0.283732 0.602851
    +vn -0.434909 0.174841 0.883337
    +vn -0.331034 0.360742 0.871942
    +vn -0.564287 0.583298 0.584246
    +vn -0.680756 0.680471 0.271166
    +vn -0.900489 0.330833 0.282256
    +vn -0.900489 0.330833 0.282256
    +vn -0.745699 0.283732 0.602851
    +vn -0.564287 0.583298 0.584246
    +vn -0.680756 0.680471 0.271166
    +vn -0.711485 0.702701 0.000000
    +vn -0.940042 0.341058 0.000000
    +vn -0.940042 0.341058 0.000000
    +vn -0.900489 0.330833 0.282256
    +vn -0.680756 0.680471 0.271166
    +vn 0.868243 -0.496139 -0.000000
    +vn 0.840939 -0.466081 0.274935
    +vn 0.960000 -0.000000 0.280000
    +vn 0.960000 -0.000000 0.280000
    +vn 1.000000 0.000000 0.000000
    +vn 0.868243 -0.496139 -0.000000
    +vn 0.840939 -0.466081 0.274935
    +vn 0.714311 -0.367903 0.595322
    +vn 0.800000 -0.000000 0.600000
    +vn 0.800000 -0.000000 0.600000
    +vn 0.960000 -0.000000 0.280000
    +vn 0.840939 -0.466081 0.274935
    +vn 0.714311 -0.367903 0.595322
    +vn 0.427231 -0.201287 0.881452
    +vn 0.470588 -0.000000 0.882353
    +vn 0.470588 -0.000000 0.882353
    +vn 0.800000 -0.000000 0.600000
    +vn 0.714311 -0.367903 0.595322
    +vn 0.427231 -0.201287 0.881452
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.470588 -0.000000 0.882353
    +vn 0.427231 -0.201287 0.881452
    +vn 0.000000 -0.000000 1.000000
    +vn -0.434909 0.174841 0.883337
    +vn -0.470588 -0.000000 0.882353
    +vn -0.470588 -0.000000 0.882353
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.434909 0.174841 0.883337
    +vn -0.745699 0.283732 0.602851
    +vn -0.800000 -0.000000 0.600000
    +vn -0.800000 -0.000000 0.600000
    +vn -0.470588 -0.000000 0.882353
    +vn -0.434909 0.174841 0.883337
    +vn -0.745699 0.283732 0.602851
    +vn -0.900489 0.330833 0.282256
    +vn -0.960000 -0.000000 0.280000
    +vn -0.960000 -0.000000 0.280000
    +vn -0.800000 -0.000000 0.600000
    +vn -0.745699 0.283732 0.602851
    +vn -0.900489 0.330833 0.282256
    +vn -0.940042 0.341058 0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -0.960000 -0.000000 0.280000
    +vn -0.900489 0.330833 0.282256
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.976900 -0.213697
    +vn -0.007778 0.976952 -0.213316
    +vn -0.007778 0.976952 -0.213316
    +vn -0.008035 0.999968 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.976900 -0.213697
    +vn 0.000000 0.871576 -0.490261
    +vn -0.006763 0.871941 -0.489565
    +vn -0.006763 0.871941 -0.489565
    +vn -0.007778 0.976952 -0.213316
    +vn 0.000000 0.976900 -0.213697
    +vn 0.000000 0.871576 -0.490261
    +vn 0.000000 0.579524 -0.814955
    +vn -0.004318 0.580229 -0.814442
    +vn -0.004318 0.580229 -0.814442
    +vn -0.006763 0.871941 -0.489565
    +vn 0.000000 0.871576 -0.490261
    +vn 0.000000 0.579524 -0.814955
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.004318 0.580229 -0.814442
    +vn 0.000000 0.579524 -0.814955
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 -0.579524 -0.814955
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 -0.579524 -0.814955
    +vn 0.000000 -0.871576 -0.490261
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.000000 -0.579524 -0.814955
    +vn 0.000000 -0.871576 -0.490261
    +vn 0.000000 -0.976900 -0.213697
    +vn 0.005648 -0.976968 -0.213313
    +vn 0.005648 -0.976968 -0.213313
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.000000 -0.871576 -0.490261
    +vn 0.000000 -0.976900 -0.213697
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.005648 -0.976968 -0.213313
    +vn 0.000000 -0.976900 -0.213697
    +vn -0.008035 0.999968 0.000000
    +vn -0.007778 0.976952 -0.213316
    +vn -0.036253 0.976299 -0.213368
    +vn -0.036253 0.976299 -0.213368
    +vn -0.037474 0.999298 0.000000
    +vn -0.008035 0.999968 0.000000
    +vn -0.007778 0.976952 -0.213316
    +vn -0.006763 0.871941 -0.489565
    +vn -0.031478 0.871421 -0.489524
    +vn -0.031478 0.871421 -0.489524
    +vn -0.036253 0.976299 -0.213368
    +vn -0.007778 0.976952 -0.213316
    +vn -0.006763 0.871941 -0.489565
    +vn -0.004318 0.580229 -0.814442
    +vn -0.020059 0.580154 -0.814260
    +vn -0.020059 0.580154 -0.814260
    +vn -0.031478 0.871421 -0.489524
    +vn -0.006763 0.871941 -0.489565
    +vn -0.004318 0.580229 -0.814442
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.020059 0.580154 -0.814260
    +vn -0.004318 0.580229 -0.814442
    +vn 0.000000 0.000000 -1.000000
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.003820 -0.580235 -0.814440
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.005648 -0.976968 -0.213313
    +vn 0.025925 -0.976799 -0.212581
    +vn 0.025925 -0.976799 -0.212581
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.005348 -0.871953 -0.489560
    +vn 0.005648 -0.976968 -0.213313
    +vn 0.005639 -0.999984 -0.000000
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.025925 -0.976799 -0.212581
    +vn 0.005648 -0.976968 -0.213313
    +vn -0.037474 0.999298 0.000000
    +vn -0.036253 0.976299 -0.213368
    +vn -0.097345 0.971464 -0.216292
    +vn -0.097345 0.971464 -0.216292
    +vn -0.100735 0.994913 0.000000
    +vn -0.037474 0.999298 0.000000
    +vn -0.036253 0.976299 -0.213368
    +vn -0.031478 0.871421 -0.489524
    +vn -0.084209 0.865177 -0.494345
    +vn -0.084209 0.865177 -0.494345
    +vn -0.097345 0.971464 -0.216292
    +vn -0.036253 0.976299 -0.213368
    +vn -0.031478 0.871421 -0.489524
    +vn -0.020059 0.580154 -0.814260
    +vn -0.053340 0.573847 -0.817224
    +vn -0.053340 0.573847 -0.817224
    +vn -0.084209 0.865177 -0.494345
    +vn -0.031478 0.871421 -0.489524
    +vn -0.020059 0.580154 -0.814260
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.053340 0.573847 -0.817224
    +vn -0.020059 0.580154 -0.814260
    +vn 0.000000 0.000000 -1.000000
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.017655 -0.580819 -0.813842
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.025925 -0.976799 -0.212581
    +vn 0.068733 -0.974727 -0.212562
    +vn 0.068733 -0.974727 -0.212562
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.024623 -0.872243 -0.488453
    +vn 0.025925 -0.976799 -0.212581
    +vn 0.025853 -0.999666 -0.000000
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.068733 -0.974727 -0.212562
    +vn 0.025925 -0.976799 -0.212581
    +vn -0.100735 0.994913 0.000000
    +vn -0.097345 0.971464 -0.216292
    +vn -0.211634 0.950923 -0.225736
    +vn -0.211634 0.950923 -0.225736
    +vn -0.219512 0.975610 0.000000
    +vn -0.100735 0.994913 0.000000
    +vn -0.097345 0.971464 -0.216292
    +vn -0.084209 0.865177 -0.494345
    +vn -0.181468 0.840701 -0.510188
    +vn -0.181468 0.840701 -0.510188
    +vn -0.211634 0.950923 -0.225736
    +vn -0.097345 0.971464 -0.216292
    +vn -0.084209 0.865177 -0.494345
    +vn -0.053340 0.573847 -0.817224
    +vn -0.113165 0.550215 -0.827319
    +vn -0.113165 0.550215 -0.827319
    +vn -0.181468 0.840701 -0.510188
    +vn -0.084209 0.865177 -0.494345
    +vn -0.053340 0.573847 -0.817224
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.113165 0.550215 -0.827319
    +vn -0.053340 0.573847 -0.817224
    +vn 0.000000 0.000000 -1.000000
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.046877 -0.577183 -0.815268
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.068733 -0.974727 -0.212562
    +vn 0.148853 -0.965097 -0.215478
    +vn 0.148853 -0.965097 -0.215478
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.065389 -0.869669 -0.489285
    +vn 0.068733 -0.974727 -0.212562
    +vn 0.068483 -0.997652 -0.000000
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.148853 -0.965097 -0.215478
    +vn 0.068733 -0.974727 -0.212562
    +vn -0.219512 0.975610 0.000000
    +vn -0.211634 0.950923 -0.225736
    +vn -0.407589 0.879546 -0.245501
    +vn -0.407589 0.879546 -0.245501
    +vn -0.424434 0.905459 0.000000
    +vn -0.219512 0.975610 0.000000
    +vn -0.211634 0.950923 -0.225736
    +vn -0.181468 0.840701 -0.510188
    +vn -0.343858 0.766201 -0.542860
    +vn -0.343858 0.766201 -0.542860
    +vn -0.407589 0.879546 -0.245501
    +vn -0.211634 0.950923 -0.225736
    +vn -0.181468 0.840701 -0.510188
    +vn -0.113165 0.550215 -0.827319
    +vn -0.208262 0.488129 -0.847560
    +vn -0.208262 0.488129 -0.847560
    +vn -0.343858 0.766201 -0.542860
    +vn -0.181468 0.840701 -0.510188
    +vn -0.113165 0.550215 -0.827319
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.208262 0.488129 -0.847560
    +vn -0.113165 0.550215 -0.827319
    +vn 0.000000 0.000000 -1.000000
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.100071 -0.560239 -0.822264
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.148853 -0.965097 -0.215478
    +vn 0.293834 -0.928823 -0.225719
    +vn 0.293834 -0.928823 -0.225719
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.141188 -0.856453 -0.496542
    +vn 0.148853 -0.965097 -0.215478
    +vn 0.148340 -0.988936 -0.000000
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.293834 -0.928823 -0.225719
    +vn 0.148853 -0.965097 -0.215478
    +vn -0.424434 0.905459 0.000000
    +vn -0.407589 0.879546 -0.245501
    +vn -0.680756 0.680471 -0.271166
    +vn -0.680756 0.680471 -0.271166
    +vn -0.711485 0.702701 0.000000
    +vn -0.424434 0.905459 0.000000
    +vn -0.407589 0.879546 -0.245501
    +vn -0.343858 0.766201 -0.542860
    +vn -0.564287 0.583298 -0.584246
    +vn -0.564287 0.583298 -0.584246
    +vn -0.680756 0.680471 -0.271166
    +vn -0.407589 0.879546 -0.245501
    +vn -0.343858 0.766201 -0.542860
    +vn -0.208262 0.488129 -0.847560
    +vn -0.331034 0.360742 -0.871942
    +vn -0.331034 0.360742 -0.871942
    +vn -0.564287 0.583298 -0.584246
    +vn -0.343858 0.766201 -0.542860
    +vn -0.208262 0.488129 -0.847560
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.331034 0.360742 -0.871942
    +vn -0.208262 0.488129 -0.847560
    +vn 0.000000 0.000000 -1.000000
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.187980 -0.510352 -0.839169
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.293834 -0.928823 -0.225719
    +vn 0.540740 -0.803596 -0.248664
    +vn 0.540740 -0.803596 -0.248664
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.274589 -0.810212 -0.517840
    +vn 0.293834 -0.928823 -0.225719
    +vn 0.293811 -0.955864 -0.000000
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.540740 -0.803596 -0.248664
    +vn 0.293834 -0.928823 -0.225719
    +vn -0.711485 0.702701 0.000000
    +vn -0.680756 0.680471 -0.271166
    +vn -0.900489 0.330833 -0.282256
    +vn -0.900489 0.330833 -0.282256
    +vn -0.940042 0.341058 0.000000
    +vn -0.711485 0.702701 0.000000
    +vn -0.680756 0.680471 -0.271166
    +vn -0.564287 0.583298 -0.584246
    +vn -0.745699 0.283732 -0.602851
    +vn -0.745699 0.283732 -0.602851
    +vn -0.900489 0.330833 -0.282256
    +vn -0.680756 0.680471 -0.271166
    +vn -0.564287 0.583298 -0.584246
    +vn -0.331034 0.360742 -0.871942
    +vn -0.434909 0.174841 -0.883337
    +vn -0.434909 0.174841 -0.883337
    +vn -0.745699 0.283732 -0.602851
    +vn -0.564287 0.583298 -0.584246
    +vn -0.331034 0.360742 -0.871942
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.434909 0.174841 -0.883337
    +vn -0.331034 0.360742 -0.871942
    +vn 0.000000 0.000000 -1.000000
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.310948 -0.394822 -0.864538
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.540740 -0.803596 -0.248664
    +vn 0.840939 -0.466081 -0.274935
    +vn 0.840939 -0.466081 -0.274935
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.485844 -0.672432 -0.558383
    +vn 0.540740 -0.803596 -0.248664
    +vn 0.546885 -0.837207 -0.000000
    +vn 0.868243 -0.496139 -0.000000
    +vn 0.868243 -0.496139 -0.000000
    +vn 0.840939 -0.466081 -0.274935
    +vn 0.540740 -0.803596 -0.248664
    +vn -0.940042 0.341058 0.000000
    +vn -0.900489 0.330833 -0.282256
    +vn -0.960000 0.000000 -0.280000
    +vn -0.960000 0.000000 -0.280000
    +vn -1.000000 0.000000 0.000000
    +vn -0.940042 0.341058 0.000000
    +vn -0.900489 0.330833 -0.282256
    +vn -0.745699 0.283732 -0.602851
    +vn -0.800000 0.000000 -0.600000
    +vn -0.800000 0.000000 -0.600000
    +vn -0.960000 0.000000 -0.280000
    +vn -0.900489 0.330833 -0.282256
    +vn -0.745699 0.283732 -0.602851
    +vn -0.434909 0.174841 -0.883337
    +vn -0.470588 0.000000 -0.882353
    +vn -0.470588 0.000000 -0.882353
    +vn -0.800000 0.000000 -0.600000
    +vn -0.745699 0.283732 -0.602851
    +vn -0.434909 0.174841 -0.883337
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.470588 0.000000 -0.882353
    +vn -0.434909 0.174841 -0.883337
    +vn 0.000000 0.000000 -1.000000
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.470588 0.000000 -0.882353
    +vn 0.470588 0.000000 -0.882353
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.800000 0.000000 -0.600000
    +vn 0.800000 0.000000 -0.600000
    +vn 0.470588 0.000000 -0.882353
    +vn 0.427231 -0.201287 -0.881452
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.840939 -0.466081 -0.274935
    +vn 0.960000 0.000000 -0.280000
    +vn 0.960000 0.000000 -0.280000
    +vn 0.800000 0.000000 -0.600000
    +vn 0.714311 -0.367903 -0.595322
    +vn 0.840939 -0.466081 -0.274935
    +vn 0.868243 -0.496139 -0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 0.960000 0.000000 -0.280000
    +vn 0.840939 -0.466081 -0.274935
    +vn 1.000000 0.000000 0.000000
    +vn 0.960000 -0.000000 0.280000
    +vn 0.942950 0.178105 0.281290
    +vn 0.942950 0.178105 0.281290
    +vn 0.982777 0.184796 0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 0.960000 -0.000000 0.280000
    +vn 0.800000 -0.000000 0.600000
    +vn 0.784361 0.149749 0.601957
    +vn 0.784361 0.149749 0.601957
    +vn 0.942950 0.178105 0.281290
    +vn 0.960000 -0.000000 0.280000
    +vn 0.800000 -0.000000 0.600000
    +vn 0.470588 -0.000000 0.882353
    +vn 0.460148 0.088992 0.883371
    +vn 0.460148 0.088992 0.883371
    +vn 0.784361 0.149749 0.601957
    +vn 0.800000 -0.000000 0.600000
    +vn 0.470588 -0.000000 0.882353
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.460148 0.088992 0.883371
    +vn 0.470588 -0.000000 0.882353
    +vn 0.000000 -0.000000 1.000000
    +vn -0.470588 -0.000000 0.882353
    +vn -0.459689 -0.090928 0.883413
    +vn -0.459689 -0.090928 0.883413
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.470588 -0.000000 0.882353
    +vn -0.800000 -0.000000 0.600000
    +vn -0.783006 -0.156068 0.602116
    +vn -0.783006 -0.156068 0.602116
    +vn -0.459689 -0.090928 0.883413
    +vn -0.470588 -0.000000 0.882353
    +vn -0.800000 -0.000000 0.600000
    +vn -0.960000 -0.000000 0.280000
    +vn -0.940895 -0.188441 0.281437
    +vn -0.940895 -0.188441 0.281437
    +vn -0.783006 -0.156068 0.602116
    +vn -0.800000 -0.000000 0.600000
    +vn -0.960000 -0.000000 0.280000
    +vn -1.000000 0.000000 0.000000
    +vn -0.980463 -0.196702 0.000000
    +vn -0.980463 -0.196702 0.000000
    +vn -0.940895 -0.188441 0.281437
    +vn -0.960000 -0.000000 0.280000
    +vn 0.982777 0.184796 0.000000
    +vn 0.942950 0.178105 0.281290
    +vn 0.907027 0.315324 0.279057
    +vn 0.907027 0.315324 0.279057
    +vn 0.945778 0.324813 0.000000
    +vn 0.982777 0.184796 0.000000
    +vn 0.942950 0.178105 0.281290
    +vn 0.784361 0.149749 0.601957
    +vn 0.753916 0.269989 0.598930
    +vn 0.753916 0.269989 0.598930
    +vn 0.907027 0.315324 0.279057
    +vn 0.942950 0.178105 0.281290
    +vn 0.784361 0.149749 0.601957
    +vn 0.460148 0.088992 0.883371
    +vn 0.441746 0.164120 0.882001
    +vn 0.441746 0.164120 0.882001
    +vn 0.753916 0.269989 0.598930
    +vn 0.784361 0.149749 0.601957
    +vn 0.460148 0.088992 0.883371
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.441746 0.164120 0.882001
    +vn 0.460148 0.088992 0.883371
    +vn 0.000000 -0.000000 1.000000
    +vn -0.459689 -0.090928 0.883413
    +vn -0.437443 -0.173802 0.882291
    +vn -0.437443 -0.173802 0.882291
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.459689 -0.090928 0.883413
    +vn -0.783006 -0.156068 0.602116
    +vn -0.740997 -0.301462 0.600037
    +vn -0.740997 -0.301462 0.600037
    +vn -0.437443 -0.173802 0.882291
    +vn -0.459689 -0.090928 0.883413
    +vn -0.783006 -0.156068 0.602116
    +vn -0.940895 -0.188441 0.281437
    +vn -0.887267 -0.366482 0.280085
    +vn -0.887267 -0.366482 0.280085
    +vn -0.740997 -0.301462 0.600037
    +vn -0.783006 -0.156068 0.602116
    +vn -0.940895 -0.188441 0.281437
    +vn -0.980463 -0.196702 0.000000
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.887267 -0.366482 0.280085
    +vn -0.940895 -0.188441 0.281437
    +vn 0.945778 0.324813 0.000000
    +vn 0.907027 0.315324 0.279057
    +vn 0.859822 0.433795 0.269310
    +vn 0.859822 0.433795 0.269310
    +vn 0.895694 0.444671 0.000000
    +vn 0.945778 0.324813 0.000000
    +vn 0.907027 0.315324 0.279057
    +vn 0.753916 0.269989 0.598930
    +vn 0.718361 0.377098 0.584597
    +vn 0.718361 0.377098 0.584597
    +vn 0.859822 0.433795 0.269310
    +vn 0.907027 0.315324 0.279057
    +vn 0.753916 0.269989 0.598930
    +vn 0.441746 0.164120 0.882001
    +vn 0.424205 0.234127 0.874777
    +vn 0.424205 0.234127 0.874777
    +vn 0.718361 0.377098 0.584597
    +vn 0.753916 0.269989 0.598930
    +vn 0.441746 0.164120 0.882001
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.424205 0.234127 0.874777
    +vn 0.441746 0.164120 0.882001
    +vn 0.000000 -0.000000 1.000000
    +vn -0.437443 -0.173802 0.882291
    +vn -0.413284 -0.250678 0.875418
    +vn -0.413284 -0.250678 0.875418
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.437443 -0.173802 0.882291
    +vn -0.740997 -0.301462 0.600037
    +vn -0.685726 -0.430428 0.586952
    +vn -0.685726 -0.430428 0.586952
    +vn -0.413284 -0.250678 0.875418
    +vn -0.437443 -0.173802 0.882291
    +vn -0.740997 -0.301462 0.600037
    +vn -0.887267 -0.366482 0.280085
    +vn -0.809985 -0.519848 0.271444
    +vn -0.809985 -0.519848 0.271444
    +vn -0.685726 -0.430428 0.586952
    +vn -0.740997 -0.301462 0.600037
    +vn -0.887267 -0.366482 0.280085
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.809985 -0.519848 0.271444
    +vn -0.887267 -0.366482 0.280085
    +vn 0.895694 0.444671 0.000000
    +vn 0.859822 0.433795 0.269310
    +vn 0.800722 0.543293 0.252344
    +vn 0.800722 0.543293 0.252344
    +vn 0.832050 0.554700 0.000000
    +vn 0.895694 0.444671 0.000000
    +vn 0.859822 0.433795 0.269310
    +vn 0.718361 0.377098 0.584597
    +vn 0.676838 0.479735 0.558341
    +vn 0.676838 0.479735 0.558341
    +vn 0.800722 0.543293 0.252344
    +vn 0.859822 0.433795 0.269310
    +vn 0.718361 0.377098 0.584597
    +vn 0.424205 0.234127 0.874777
    +vn 0.407612 0.305490 0.860539
    +vn 0.407612 0.305490 0.860539
    +vn 0.676838 0.479735 0.558341
    +vn 0.718361 0.377098 0.584597
    +vn 0.424205 0.234127 0.874777
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.407612 0.305490 0.860539
    +vn 0.424205 0.234127 0.874777
    +vn 0.000000 -0.000000 1.000000
    +vn -0.413284 -0.250678 0.875418
    +vn -0.389439 -0.324899 0.861846
    +vn -0.389439 -0.324899 0.861846
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.413284 -0.250678 0.875418
    +vn -0.685726 -0.430428 0.586952
    +vn -0.624268 -0.541870 0.562731
    +vn -0.624268 -0.541870 0.562731
    +vn -0.389439 -0.324899 0.861846
    +vn -0.413284 -0.250678 0.875418
    +vn -0.685726 -0.430428 0.586952
    +vn -0.809985 -0.519848 0.271444
    +vn -0.721797 -0.642977 0.256103
    +vn -0.721797 -0.642977 0.256103
    +vn -0.624268 -0.541870 0.562731
    +vn -0.685726 -0.430428 0.586952
    +vn -0.809985 -0.519848 0.271444
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.721797 -0.642977 0.256103
    +vn -0.809985 -0.519848 0.271444
    +vn 0.832050 0.554700 0.000000
    +vn 0.800722 0.543293 0.252344
    +vn 0.726756 0.646692 0.231549
    +vn 0.726756 0.646692 0.231549
    +vn 0.752687 0.658379 0.000000
    +vn 0.832050 0.554700 0.000000
    +vn 0.800722 0.543293 0.252344
    +vn 0.676838 0.479735 0.558341
    +vn 0.623999 0.579478 0.524244
    +vn 0.623999 0.579478 0.524244
    +vn 0.726756 0.646692 0.231549
    +vn 0.800722 0.543293 0.252344
    +vn 0.676838 0.479735 0.558341
    +vn 0.407612 0.305490 0.860539
    +vn 0.387072 0.379733 0.840225
    +vn 0.387072 0.379733 0.840225
    +vn 0.623999 0.579478 0.524244
    +vn 0.676838 0.479735 0.558341
    +vn 0.407612 0.305490 0.860539
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.387072 0.379733 0.840225
    +vn 0.407612 0.305490 0.860539
    +vn 0.000000 -0.000000 1.000000
    +vn -0.389439 -0.324899 0.861846
    +vn -0.363519 -0.396679 0.842911
    +vn -0.363519 -0.396679 0.842911
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.389439 -0.324899 0.861846
    +vn -0.624268 -0.541870 0.562731
    +vn -0.559541 -0.635304 0.532261
    +vn -0.559541 -0.635304 0.532261
    +vn -0.363519 -0.396679 0.842911
    +vn -0.389439 -0.324899 0.861846
    +vn -0.624268 -0.541870 0.562731
    +vn -0.721797 -0.642977 0.256103
    +vn -0.632505 -0.737102 0.237943
    +vn -0.632505 -0.737102 0.237943
    +vn -0.559541 -0.635304 0.532261
    +vn -0.624268 -0.541870 0.562731
    +vn -0.721797 -0.642977 0.256103
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.632505 -0.737102 0.237943
    +vn -0.721797 -0.642977 0.256103
    +vn 0.752687 0.658379 0.000000
    +vn 0.726756 0.646692 0.231549
    +vn 0.635220 0.742311 0.213237
    +vn 0.635220 0.742311 0.213237
    +vn 0.655687 0.755033 0.000000
    +vn 0.752687 0.658379 0.000000
    +vn 0.726756 0.646692 0.231549
    +vn 0.623999 0.579478 0.524244
    +vn 0.553858 0.671389 0.492422
    +vn 0.553858 0.671389 0.492422
    +vn 0.635220 0.742311 0.213237
    +vn 0.726756 0.646692 0.231549
    +vn 0.623999 0.579478 0.524244
    +vn 0.387072 0.379733 0.840225
    +vn 0.354718 0.450715 0.819165
    +vn 0.354718 0.450715 0.819165
    +vn 0.553858 0.671389 0.492422
    +vn 0.623999 0.579478 0.524244
    +vn 0.387072 0.379733 0.840225
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.354718 0.450715 0.819165
    +vn 0.387072 0.379733 0.840225
    +vn 0.000000 -0.000000 1.000000
    +vn -0.363519 -0.396679 0.842911
    +vn -0.330887 -0.460563 0.823648
    +vn -0.330887 -0.460563 0.823648
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.363519 -0.396679 0.842911
    +vn -0.559541 -0.635304 0.532261
    +vn -0.492524 -0.709202 0.504433
    +vn -0.492524 -0.709202 0.504433
    +vn -0.330887 -0.460563 0.823648
    +vn -0.363519 -0.396679 0.842911
    +vn -0.559541 -0.635304 0.532261
    +vn -0.632505 -0.737102 0.237943
    +vn -0.547802 -0.806539 0.222278
    +vn -0.547802 -0.806539 0.222278
    +vn -0.492524 -0.709202 0.504433
    +vn -0.559541 -0.635304 0.532261
    +vn -0.632505 -0.737102 0.237943
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.547802 -0.806539 0.222278
    +vn -0.632505 -0.737102 0.237943
    +vn 0.655687 0.755033 0.000000
    +vn 0.635220 0.742311 0.213237
    +vn 0.525519 0.825404 0.206246
    +vn 0.525519 0.825404 0.206246
    +vn 0.540758 0.841178 0.000000
    +vn 0.655687 0.755033 0.000000
    +vn 0.635220 0.742311 0.213237
    +vn 0.553858 0.671389 0.492422
    +vn 0.463364 0.745396 0.479249
    +vn 0.463364 0.745396 0.479249
    +vn 0.525519 0.825404 0.206246
    +vn 0.635220 0.742311 0.213237
    +vn 0.553858 0.671389 0.492422
    +vn 0.354718 0.450715 0.819165
    +vn 0.303342 0.503069 0.809262
    +vn 0.303342 0.503069 0.809262
    +vn 0.463364 0.745396 0.479249
    +vn 0.553858 0.671389 0.492422
    +vn 0.354718 0.450715 0.819165
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.303342 0.503069 0.809262
    +vn 0.354718 0.450715 0.819165
    +vn 0.000000 -0.000000 1.000000
    +vn -0.330887 -0.460563 0.823648
    +vn -0.287396 -0.505140 0.813780
    +vn -0.287396 -0.505140 0.813780
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.330887 -0.460563 0.823648
    +vn -0.492524 -0.709202 0.504433
    +vn -0.423945 -0.761196 0.490766
    +vn -0.423945 -0.761196 0.490766
    +vn -0.287396 -0.505140 0.813780
    +vn -0.330887 -0.460563 0.823648
    +vn -0.492524 -0.709202 0.504433
    +vn -0.547802 -0.806539 0.222278
    +vn -0.470202 -0.856044 0.214705
    +vn -0.470202 -0.856044 0.214705
    +vn -0.423945 -0.761196 0.490766
    +vn -0.492524 -0.709202 0.504433
    +vn -0.547802 -0.806539 0.222278
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.470202 -0.856044 0.214705
    +vn -0.547802 -0.806539 0.222278
    +vn 0.540758 0.841178 0.000000
    +vn 0.525519 0.825404 0.206246
    +vn 0.400263 0.889473 0.220515
    +vn 0.400263 0.889473 0.220515
    +vn 0.410365 0.911921 0.000000
    +vn 0.540758 0.841178 0.000000
    +vn 0.525519 0.825404 0.206246
    +vn 0.463364 0.745396 0.479249
    +vn 0.354770 0.788378 0.502591
    +vn 0.354770 0.788378 0.502591
    +vn 0.400263 0.889473 0.220515
    +vn 0.525519 0.825404 0.206246
    +vn 0.463364 0.745396 0.479249
    +vn 0.303342 0.503069 0.809262
    +vn 0.232611 0.516912 0.823829
    +vn 0.232611 0.516912 0.823829
    +vn 0.354770 0.788378 0.502591
    +vn 0.463364 0.745396 0.479249
    +vn 0.303342 0.503069 0.809262
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn 0.232611 0.516912 0.823829
    +vn 0.303342 0.503069 0.809262
    +vn 0.000000 -0.000000 1.000000
    +vn -0.287396 -0.505140 0.813780
    +vn -0.232611 -0.516912 0.823829
    +vn -0.232611 -0.516912 0.823829
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.287396 -0.505140 0.813780
    +vn -0.423945 -0.761196 0.490766
    +vn -0.354770 -0.788378 0.502591
    +vn -0.354770 -0.788378 0.502591
    +vn -0.232611 -0.516912 0.823829
    +vn -0.287396 -0.505140 0.813780
    +vn -0.423945 -0.761196 0.490766
    +vn -0.470202 -0.856044 0.214705
    +vn -0.400263 -0.889473 0.220515
    +vn -0.400263 -0.889473 0.220515
    +vn -0.354770 -0.788378 0.502591
    +vn -0.423945 -0.761196 0.490766
    +vn -0.470202 -0.856044 0.214705
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.410365 -0.911921 -0.000000
    +vn -0.410365 -0.911921 -0.000000
    +vn -0.400263 -0.889473 0.220515
    +vn -0.470202 -0.856044 0.214705
    +vn -1.000000 0.000000 0.000000
    +vn -0.960000 0.000000 -0.280000
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.980463 -0.196702 -0.000000
    +vn -1.000000 0.000000 0.000000
    +vn -0.960000 0.000000 -0.280000
    +vn -0.800000 0.000000 -0.600000
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.960000 0.000000 -0.280000
    +vn -0.800000 0.000000 -0.600000
    +vn -0.470588 0.000000 -0.882353
    +vn -0.459689 -0.090928 -0.883413
    +vn -0.459689 -0.090928 -0.883413
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.800000 0.000000 -0.600000
    +vn -0.470588 0.000000 -0.882353
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.459689 -0.090928 -0.883413
    +vn -0.470588 0.000000 -0.882353
    +vn 0.000000 0.000000 -1.000000
    +vn 0.470588 0.000000 -0.882353
    +vn 0.460148 0.088992 -0.883371
    +vn 0.460148 0.088992 -0.883371
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.470588 0.000000 -0.882353
    +vn 0.800000 0.000000 -0.600000
    +vn 0.784361 0.149749 -0.601957
    +vn 0.784361 0.149749 -0.601957
    +vn 0.460148 0.088992 -0.883371
    +vn 0.470588 0.000000 -0.882353
    +vn 0.800000 0.000000 -0.600000
    +vn 0.960000 0.000000 -0.280000
    +vn 0.942950 0.178105 -0.281290
    +vn 0.942950 0.178105 -0.281290
    +vn 0.784361 0.149749 -0.601957
    +vn 0.800000 0.000000 -0.600000
    +vn 0.960000 0.000000 -0.280000
    +vn 1.000000 0.000000 0.000000
    +vn 0.982777 0.184796 -0.000000
    +vn 0.982777 0.184796 -0.000000
    +vn 0.942950 0.178105 -0.281290
    +vn 0.960000 0.000000 -0.280000
    +vn -0.980463 -0.196702 -0.000000
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.980463 -0.196702 -0.000000
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.940895 -0.188441 -0.281437
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.459689 -0.090928 -0.883413
    +vn -0.437443 -0.173802 -0.882291
    +vn -0.437443 -0.173802 -0.882291
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.783006 -0.156068 -0.602116
    +vn -0.459689 -0.090928 -0.883413
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.437443 -0.173802 -0.882291
    +vn -0.459689 -0.090928 -0.883413
    +vn 0.000000 0.000000 -1.000000
    +vn 0.460148 0.088992 -0.883371
    +vn 0.441746 0.164120 -0.882001
    +vn 0.441746 0.164120 -0.882001
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.460148 0.088992 -0.883371
    +vn 0.784361 0.149749 -0.601957
    +vn 0.753916 0.269989 -0.598930
    +vn 0.753916 0.269989 -0.598930
    +vn 0.441746 0.164120 -0.882001
    +vn 0.460148 0.088992 -0.883371
    +vn 0.784361 0.149749 -0.601957
    +vn 0.942950 0.178105 -0.281290
    +vn 0.907027 0.315324 -0.279057
    +vn 0.907027 0.315324 -0.279057
    +vn 0.753916 0.269989 -0.598930
    +vn 0.784361 0.149749 -0.601957
    +vn 0.942950 0.178105 -0.281290
    +vn 0.982777 0.184796 -0.000000
    +vn 0.945778 0.324813 0.000000
    +vn 0.945778 0.324813 0.000000
    +vn 0.907027 0.315324 -0.279057
    +vn 0.942950 0.178105 -0.281290
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.923524 -0.383540 -0.000000
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.887267 -0.366482 -0.280085
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.437443 -0.173802 -0.882291
    +vn -0.413284 -0.250678 -0.875418
    +vn -0.413284 -0.250678 -0.875418
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.740997 -0.301462 -0.600037
    +vn -0.437443 -0.173802 -0.882291
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.413284 -0.250678 -0.875418
    +vn -0.437443 -0.173802 -0.882291
    +vn 0.000000 0.000000 -1.000000
    +vn 0.441746 0.164120 -0.882001
    +vn 0.424205 0.234127 -0.874777
    +vn 0.424205 0.234127 -0.874777
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.441746 0.164120 -0.882001
    +vn 0.753916 0.269989 -0.598930
    +vn 0.718361 0.377098 -0.584597
    +vn 0.718361 0.377098 -0.584597
    +vn 0.424205 0.234127 -0.874777
    +vn 0.441746 0.164120 -0.882001
    +vn 0.753916 0.269989 -0.598930
    +vn 0.907027 0.315324 -0.279057
    +vn 0.859822 0.433795 -0.269310
    +vn 0.859822 0.433795 -0.269310
    +vn 0.718361 0.377098 -0.584597
    +vn 0.753916 0.269989 -0.598930
    +vn 0.907027 0.315324 -0.279057
    +vn 0.945778 0.324813 0.000000
    +vn 0.895694 0.444671 0.000000
    +vn 0.895694 0.444671 0.000000
    +vn 0.859822 0.433795 -0.269310
    +vn 0.907027 0.315324 -0.279057
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.839602 -0.543202 -0.000000
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.809985 -0.519848 -0.271444
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.413284 -0.250678 -0.875418
    +vn -0.389439 -0.324899 -0.861846
    +vn -0.389439 -0.324899 -0.861846
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.685726 -0.430428 -0.586952
    +vn -0.413284 -0.250678 -0.875418
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.389439 -0.324899 -0.861846
    +vn -0.413284 -0.250678 -0.875418
    +vn 0.000000 0.000000 -1.000000
    +vn 0.424205 0.234127 -0.874777
    +vn 0.407612 0.305490 -0.860539
    +vn 0.407612 0.305490 -0.860539
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.424205 0.234127 -0.874777
    +vn 0.718361 0.377098 -0.584597
    +vn 0.676838 0.479735 -0.558341
    +vn 0.676838 0.479735 -0.558341
    +vn 0.407612 0.305490 -0.860539
    +vn 0.424205 0.234127 -0.874777
    +vn 0.718361 0.377098 -0.584597
    +vn 0.859822 0.433795 -0.269310
    +vn 0.800722 0.543293 -0.252344
    +vn 0.800722 0.543293 -0.252344
    +vn 0.676838 0.479735 -0.558341
    +vn 0.718361 0.377098 -0.584597
    +vn 0.859822 0.433795 -0.269310
    +vn 0.895694 0.444671 0.000000
    +vn 0.832050 0.554700 0.000000
    +vn 0.832050 0.554700 0.000000
    +vn 0.800722 0.543293 -0.252344
    +vn 0.859822 0.433795 -0.269310
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.743581 -0.668646 -0.000000
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.721797 -0.642977 -0.256103
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.389439 -0.324899 -0.861846
    +vn -0.363519 -0.396679 -0.842911
    +vn -0.363519 -0.396679 -0.842911
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.624268 -0.541870 -0.562731
    +vn -0.389439 -0.324899 -0.861846
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.363519 -0.396679 -0.842911
    +vn -0.389439 -0.324899 -0.861846
    +vn 0.000000 0.000000 -1.000000
    +vn 0.407612 0.305490 -0.860539
    +vn 0.387072 0.379733 -0.840225
    +vn 0.387072 0.379733 -0.840225
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.407612 0.305490 -0.860539
    +vn 0.676838 0.479735 -0.558341
    +vn 0.623999 0.579478 -0.524244
    +vn 0.623999 0.579478 -0.524244
    +vn 0.387072 0.379733 -0.840225
    +vn 0.407612 0.305490 -0.860539
    +vn 0.676838 0.479735 -0.558341
    +vn 0.800722 0.543293 -0.252344
    +vn 0.726756 0.646692 -0.231549
    +vn 0.726756 0.646692 -0.231549
    +vn 0.623999 0.579478 -0.524244
    +vn 0.676838 0.479735 -0.558341
    +vn 0.800722 0.543293 -0.252344
    +vn 0.832050 0.554700 0.000000
    +vn 0.752687 0.658379 0.000000
    +vn 0.752687 0.658379 0.000000
    +vn 0.726756 0.646692 -0.231549
    +vn 0.800722 0.543293 -0.252344
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.647648 -0.761939 -0.000000
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.632505 -0.737102 -0.237943
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.363519 -0.396679 -0.842911
    +vn -0.330887 -0.460563 -0.823648
    +vn -0.330887 -0.460563 -0.823648
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.559541 -0.635304 -0.532261
    +vn -0.363519 -0.396679 -0.842911
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn -0.330887 -0.460563 -0.823648
    +vn -0.363519 -0.396679 -0.842911
    +vn 0.000000 0.000000 -1.000000
    +vn 0.387072 0.379733 -0.840225
    +vn 0.354718 0.450715 -0.819165
    +vn 0.354718 0.450715 -0.819165
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.387072 0.379733 -0.840225
    +vn 0.623999 0.579478 -0.524244
    +vn 0.553858 0.671389 -0.492422
    +vn 0.553858 0.671389 -0.492422
    +vn 0.354718 0.450715 -0.819165
    +vn 0.387072 0.379733 -0.840225
    +vn 0.623999 0.579478 -0.524244
    +vn 0.726756 0.646692 -0.231549
    +vn 0.635220 0.742311 -0.213237
    +vn 0.635220 0.742311 -0.213237
    +vn 0.553858 0.671389 -0.492422
    +vn 0.623999 0.579478 -0.524244
    +vn 0.726756 0.646692 -0.231549
    +vn 0.752687 0.658379 0.000000
    +vn 0.655687 0.755033 0.000000
    +vn 0.655687 0.755033 0.000000
    +vn 0.635220 0.742311 -0.213237
    +vn 0.726756 0.646692 -0.231549
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.558748 -0.829337 -0.000000
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.547802 -0.806539 -0.222278
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.330887 -0.460563 -0.823648
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.492524 -0.709202 -0.504433
    +vn -0.330887 -0.460563 -0.823648
    +vn 0.000000 0.000000 -1.000000
    +vn -0.000000 0.000000 -1.000000
    +vn -0.000000 0.000000 -1.000000
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.330887 -0.460563 -0.823648
    +vn 0.000000 0.000000 -1.000000
    +vn 0.354718 0.450715 -0.819165
    +vn 0.303342 0.503069 -0.809262
    +vn 0.303342 0.503069 -0.809262
    +vn -0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.354718 0.450715 -0.819165
    +vn 0.553858 0.671389 -0.492422
    +vn 0.463364 0.745396 -0.479249
    +vn 0.463364 0.745396 -0.479249
    +vn 0.303342 0.503069 -0.809262
    +vn 0.354718 0.450715 -0.819165
    +vn 0.553858 0.671389 -0.492422
    +vn 0.635220 0.742311 -0.213237
    +vn 0.525519 0.825404 -0.206246
    +vn 0.525519 0.825404 -0.206246
    +vn 0.463364 0.745396 -0.479249
    +vn 0.553858 0.671389 -0.492422
    +vn 0.635220 0.742311 -0.213237
    +vn 0.655687 0.755033 0.000000
    +vn 0.540758 0.841178 0.000000
    +vn 0.540758 0.841178 0.000000
    +vn 0.525519 0.825404 -0.206246
    +vn 0.635220 0.742311 -0.213237
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.400263 -0.889473 -0.220515
    +vn -0.400263 -0.889473 -0.220515
    +vn -0.410365 -0.911921 -0.000000
    +vn -0.479572 -0.877503 -0.000000
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.354770 -0.788378 -0.502591
    +vn -0.354770 -0.788378 -0.502591
    +vn -0.400263 -0.889473 -0.220515
    +vn -0.470202 -0.856044 -0.214705
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.232611 -0.516912 -0.823829
    +vn -0.232611 -0.516912 -0.823829
    +vn -0.354770 -0.788378 -0.502591
    +vn -0.423945 -0.761196 -0.490766
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.000000 0.000000 -1.000000
    +vn -0.000000 0.000000 -1.000000
    +vn -0.000000 0.000000 -1.000000
    +vn -0.232611 -0.516912 -0.823829
    +vn -0.287396 -0.505140 -0.813780
    +vn -0.000000 0.000000 -1.000000
    +vn 0.303342 0.503069 -0.809262
    +vn 0.232611 0.516912 -0.823829
    +vn 0.232611 0.516912 -0.823829
    +vn -0.000000 0.000000 -1.000000
    +vn -0.000000 0.000000 -1.000000
    +vn 0.303342 0.503069 -0.809262
    +vn 0.463364 0.745396 -0.479249
    +vn 0.354770 0.788378 -0.502591
    +vn 0.354770 0.788378 -0.502591
    +vn 0.232611 0.516912 -0.823829
    +vn 0.303342 0.503069 -0.809262
    +vn 0.463364 0.745396 -0.479249
    +vn 0.525519 0.825404 -0.206246
    +vn 0.400263 0.889473 -0.220515
    +vn 0.400263 0.889473 -0.220515
    +vn 0.354770 0.788378 -0.502591
    +vn 0.463364 0.745396 -0.479249
    +vn 0.525519 0.825404 -0.206246
    +vn 0.540758 0.841178 0.000000
    +vn 0.410365 0.911921 0.000000
    +vn 0.410365 0.911921 0.000000
    +vn 0.400263 0.889473 -0.220515
    +vn 0.525519 0.825404 -0.206246
    +vn 0.000000 1.000000 0.000000
    +vn -0.009857 0.939462 0.342512
    +vn -0.221511 0.921327 0.319515
    +vn -0.221511 0.921327 0.319515
    +vn -0.235151 0.971959 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.009857 0.939462 0.342512
    +vn -0.026212 0.729287 0.683706
    +vn -0.166025 0.736945 0.655246
    +vn -0.166025 0.736945 0.655246
    +vn -0.221511 0.921327 0.319515
    +vn -0.009857 0.939462 0.342512
    +vn -0.026212 0.729287 0.683706
    +vn -0.026392 0.392302 0.919458
    +vn -0.060363 0.414895 0.907865
    +vn -0.060363 0.414895 0.907865
    +vn -0.166025 0.736945 0.655246
    +vn -0.026212 0.729287 0.683706
    +vn -0.026392 0.392302 0.919458
    +vn 0.000000 -0.000000 1.000000
    +vn 0.079637 0.016280 0.996691
    +vn 0.079637 0.016280 0.996691
    +vn -0.060363 0.414895 0.907865
    +vn -0.026392 0.392302 0.919458
    +vn 0.000000 -0.000000 1.000000
    +vn 0.048550 -0.391976 0.918694
    +vn 0.225037 -0.376837 0.898528
    +vn 0.225037 -0.376837 0.898528
    +vn 0.079637 0.016280 0.996691
    +vn 0.000000 -0.000000 1.000000
    +vn 0.048550 -0.391976 0.918694
    +vn 0.104204 -0.725566 0.680218
    +vn 0.342857 -0.685525 0.642266
    +vn 0.342857 -0.685525 0.642266
    +vn 0.225037 -0.376837 0.898528
    +vn 0.048550 -0.391976 0.918694
    +vn 0.104204 -0.725566 0.680218
    +vn 0.145201 -0.929551 0.338899
    +vn 0.409288 -0.857703 0.311173
    +vn 0.409288 -0.857703 0.311173
    +vn 0.342857 -0.685525 0.642266
    +vn 0.104204 -0.725566 0.680218
    +vn 0.145201 -0.929551 0.338899
    +vn 0.158678 -0.987330 -0.000000
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.409288 -0.857703 0.311173
    +vn 0.145201 -0.929551 0.338899
    +vn -0.235151 0.971959 0.000000
    +vn -0.221511 0.921327 0.319515
    +vn -0.507151 0.807936 0.300063
    +vn -0.507151 0.807936 0.300063
    +vn -0.544548 0.838730 0.000000
    +vn -0.235151 0.971959 0.000000
    +vn -0.221511 0.921327 0.319515
    +vn -0.166025 0.736945 0.655246
    +vn -0.371255 0.679599 0.632704
    +vn -0.371255 0.679599 0.632704
    +vn -0.507151 0.807936 0.300063
    +vn -0.221511 0.921327 0.319515
    +vn -0.166025 0.736945 0.655246
    +vn -0.060363 0.414895 0.907865
    +vn -0.127540 0.418375 0.899275
    +vn -0.127540 0.418375 0.899275
    +vn -0.371255 0.679599 0.632704
    +vn -0.166025 0.736945 0.655246
    +vn -0.060363 0.414895 0.907865
    +vn 0.079637 0.016280 0.996691
    +vn 0.169987 0.065129 0.983292
    +vn 0.169987 0.065129 0.983292
    +vn -0.127540 0.418375 0.899275
    +vn -0.060363 0.414895 0.907865
    +vn 0.079637 0.016280 0.996691
    +vn 0.225037 -0.376837 0.898528
    +vn 0.435204 -0.278159 0.856286
    +vn 0.435204 -0.278159 0.856286
    +vn 0.169987 0.065129 0.983292
    +vn 0.079637 0.016280 0.996691
    +vn 0.225037 -0.376837 0.898528
    +vn 0.342857 -0.685525 0.642266
    +vn 0.612946 -0.528311 0.587524
    +vn 0.612946 -0.528311 0.587524
    +vn 0.435204 -0.278159 0.856286
    +vn 0.225037 -0.376837 0.898528
    +vn 0.342857 -0.685525 0.642266
    +vn 0.409288 -0.857703 0.311173
    +vn 0.697917 -0.660148 0.277699
    +vn 0.697917 -0.660148 0.277699
    +vn 0.612946 -0.528311 0.587524
    +vn 0.342857 -0.685525 0.642266
    +vn 0.409288 -0.857703 0.311173
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.697917 -0.660148 0.277699
    +vn 0.409288 -0.857703 0.311173
    +vn -0.544548 0.838730 0.000000
    +vn -0.507151 0.807936 0.300063
    +vn -0.756221 0.594190 0.273986
    +vn -0.756221 0.594190 0.273986
    +vn -0.801883 0.597481 0.000000
    +vn -0.544548 0.838730 0.000000
    +vn -0.507151 0.807936 0.300063
    +vn -0.371255 0.679599 0.632704
    +vn -0.577558 0.549507 0.603712
    +vn -0.577558 0.549507 0.603712
    +vn -0.756221 0.594190 0.273986
    +vn -0.507151 0.807936 0.300063
    +vn -0.371255 0.679599 0.632704
    +vn -0.127540 0.418375 0.899275
    +vn -0.219348 0.394768 0.892213
    +vn -0.219348 0.394768 0.892213
    +vn -0.577558 0.549507 0.603712
    +vn -0.371255 0.679599 0.632704
    +vn -0.127540 0.418375 0.899275
    +vn 0.169987 0.065129 0.983292
    +vn 0.227878 0.130531 0.964901
    +vn 0.227878 0.130531 0.964901
    +vn -0.219348 0.394768 0.892213
    +vn -0.127540 0.418375 0.899275
    +vn 0.169987 0.065129 0.983292
    +vn 0.435204 -0.278159 0.856286
    +vn 0.583760 -0.132820 0.800989
    +vn 0.583760 -0.132820 0.800989
    +vn 0.227878 0.130531 0.964901
    +vn 0.169987 0.065129 0.983292
    +vn 0.435204 -0.278159 0.856286
    +vn 0.612946 -0.528311 0.587524
    +vn 0.788583 -0.316816 0.527033
    +vn 0.788583 -0.316816 0.527033
    +vn 0.583760 -0.132820 0.800989
    +vn 0.435204 -0.278159 0.856286
    +vn 0.612946 -0.528311 0.587524
    +vn 0.697917 -0.660148 0.277699
    +vn 0.877178 -0.413402 0.244250
    +vn 0.877178 -0.413402 0.244250
    +vn 0.788583 -0.316816 0.527033
    +vn 0.612946 -0.528311 0.587524
    +vn 0.697917 -0.660148 0.277699
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.877178 -0.413402 0.244250
    +vn 0.697917 -0.660148 0.277699
    +vn -0.801883 0.597481 0.000000
    +vn -0.756221 0.594190 0.273986
    +vn -0.876420 0.404706 0.260963
    +vn -0.876420 0.404706 0.260963
    +vn -0.920582 0.390550 0.000000
    +vn -0.801883 0.597481 0.000000
    +vn -0.756221 0.594190 0.273986
    +vn -0.577558 0.549507 0.603712
    +vn -0.692633 0.417885 0.587904
    +vn -0.692633 0.417885 0.587904
    +vn -0.876420 0.404706 0.260963
    +vn -0.756221 0.594190 0.273986
    +vn -0.577558 0.549507 0.603712
    +vn -0.219348 0.394768 0.892213
    +vn -0.295910 0.354900 0.886839
    +vn -0.295910 0.354900 0.886839
    +vn -0.692633 0.417885 0.587904
    +vn -0.577558 0.549507 0.603712
    +vn -0.219348 0.394768 0.892213
    +vn 0.227878 0.130531 0.964901
    +vn 0.214084 0.180281 0.960035
    +vn 0.214084 0.180281 0.960035
    +vn -0.295910 0.354900 0.886839
    +vn -0.219348 0.394768 0.892213
    +vn 0.227878 0.130531 0.964901
    +vn 0.583760 -0.132820 0.800989
    +vn 0.612672 -0.022207 0.790025
    +vn 0.612672 -0.022207 0.790025
    +vn 0.214084 0.180281 0.960035
    +vn 0.227878 0.130531 0.964901
    +vn 0.583760 -0.132820 0.800989
    +vn 0.788583 -0.316816 0.527033
    +vn 0.837683 -0.175387 0.517230
    +vn 0.837683 -0.175387 0.517230
    +vn 0.612672 -0.022207 0.790025
    +vn 0.583760 -0.132820 0.800989
    +vn 0.788583 -0.316816 0.527033
    +vn 0.877178 -0.413402 0.244250
    +vn 0.935040 -0.261407 0.239512
    +vn 0.935040 -0.261407 0.239512
    +vn 0.837683 -0.175387 0.517230
    +vn 0.788583 -0.316816 0.527033
    +vn 0.877178 -0.413402 0.244250
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.957826 -0.287348 0.000000
    +vn 0.957826 -0.287348 0.000000
    +vn 0.935040 -0.261407 0.239512
    +vn 0.877178 -0.413402 0.244250
    +vn -0.920582 0.390550 0.000000
    +vn -0.876420 0.404706 0.260963
    +vn -0.899576 0.332944 0.282685
    +vn -0.899576 0.332944 0.282685
    +vn -0.950213 0.311601 0.000000
    +vn -0.920582 0.390550 0.000000
    +vn -0.876420 0.404706 0.260963
    +vn -0.692633 0.417885 0.587904
    +vn -0.700914 0.362599 0.614200
    +vn -0.700914 0.362599 0.614200
    +vn -0.899576 0.332944 0.282685
    +vn -0.876420 0.404706 0.260963
    +vn -0.692633 0.417885 0.587904
    +vn -0.295910 0.354900 0.886839
    +vn -0.320459 0.327123 0.888986
    +vn -0.320459 0.327123 0.888986
    +vn -0.700914 0.362599 0.614200
    +vn -0.692633 0.417885 0.587904
    +vn -0.295910 0.354900 0.886839
    +vn 0.214084 0.180281 0.960035
    +vn 0.141672 0.194556 0.970607
    +vn 0.141672 0.194556 0.970607
    +vn -0.320459 0.327123 0.888986
    +vn -0.295910 0.354900 0.886839
    +vn 0.214084 0.180281 0.960035
    +vn 0.612672 -0.022207 0.790025
    +vn 0.538856 0.013092 0.842296
    +vn 0.538856 0.013092 0.842296
    +vn 0.141672 0.194556 0.970607
    +vn 0.214084 0.180281 0.960035
    +vn 0.612672 -0.022207 0.790025
    +vn 0.837683 -0.175387 0.517230
    +vn 0.801020 -0.150222 0.579483
    +vn 0.801020 -0.150222 0.579483
    +vn 0.538856 0.013092 0.842296
    +vn 0.612672 -0.022207 0.790025
    +vn 0.837683 -0.175387 0.517230
    +vn 0.935040 -0.261407 0.239512
    +vn 0.927567 -0.252791 0.275167
    +vn 0.927567 -0.252791 0.275167
    +vn 0.801020 -0.150222 0.579483
    +vn 0.837683 -0.175387 0.517230
    +vn 0.935040 -0.261407 0.239512
    +vn 0.957826 -0.287348 0.000000
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.927567 -0.252791 0.275167
    +vn 0.935040 -0.261407 0.239512
    +vn -0.950213 0.311601 0.000000
    +vn -0.899576 0.332944 0.282685
    +vn -0.857730 0.387671 0.337654
    +vn -0.857730 0.387671 0.337654
    +vn -0.928477 0.371391 0.000000
    +vn -0.950213 0.311601 0.000000
    +vn -0.899576 0.332944 0.282685
    +vn -0.700914 0.362599 0.614200
    +vn -0.630340 0.390920 0.670711
    +vn -0.630340 0.390920 0.670711
    +vn -0.857730 0.387671 0.337654
    +vn -0.899576 0.332944 0.282685
    +vn -0.700914 0.362599 0.614200
    +vn -0.320459 0.327123 0.888986
    +vn -0.297304 0.323837 0.898187
    +vn -0.297304 0.323837 0.898187
    +vn -0.630340 0.390920 0.670711
    +vn -0.700914 0.362599 0.614200
    +vn -0.320459 0.327123 0.888986
    +vn 0.141672 0.194556 0.970607
    +vn 0.062719 0.177893 0.982049
    +vn 0.062719 0.177893 0.982049
    +vn -0.297304 0.323837 0.898187
    +vn -0.320459 0.327123 0.888986
    +vn 0.141672 0.194556 0.970607
    +vn 0.538856 0.013092 0.842296
    +vn 0.408632 -0.026429 0.912316
    +vn 0.408632 -0.026429 0.912316
    +vn 0.062719 0.177893 0.982049
    +vn 0.141672 0.194556 0.970607
    +vn 0.538856 0.013092 0.842296
    +vn 0.801020 -0.150222 0.579483
    +vn 0.693057 -0.241127 0.679360
    +vn 0.693057 -0.241127 0.679360
    +vn 0.408632 -0.026429 0.912316
    +vn 0.538856 0.013092 0.842296
    +vn 0.801020 -0.150222 0.579483
    +vn 0.927567 -0.252791 0.275167
    +vn 0.855731 -0.392184 0.337515
    +vn 0.855731 -0.392184 0.337515
    +vn 0.693057 -0.241127 0.679360
    +vn 0.801020 -0.150222 0.579483
    +vn 0.927567 -0.252791 0.275167
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.897727 -0.440551 0.000000
    +vn 0.897727 -0.440551 0.000000
    +vn 0.855731 -0.392184 0.337515
    +vn 0.927567 -0.252791 0.275167
    +vn -0.928477 0.371391 0.000000
    +vn -0.857730 0.387671 0.337654
    +vn -0.740695 0.545202 0.392587
    +vn -0.740695 0.545202 0.392587
    +vn -0.828869 0.559443 0.000000
    +vn -0.928477 0.371391 0.000000
    +vn -0.857730 0.387671 0.337654
    +vn -0.630340 0.390920 0.670711
    +vn -0.515054 0.473366 0.714593
    +vn -0.515054 0.473366 0.714593
    +vn -0.740695 0.545202 0.392587
    +vn -0.857730 0.387671 0.337654
    +vn -0.630340 0.390920 0.670711
    +vn -0.297304 0.323837 0.898187
    +vn -0.251586 0.335928 0.907665
    +vn -0.251586 0.335928 0.907665
    +vn -0.515054 0.473366 0.714593
    +vn -0.630340 0.390920 0.670711
    +vn -0.297304 0.323837 0.898187
    +vn 0.062719 0.177893 0.982049
    +vn 0.013886 0.131195 0.991259
    +vn 0.013886 0.131195 0.991259
    +vn -0.251586 0.335928 0.907665
    +vn -0.297304 0.323837 0.898187
    +vn 0.062719 0.177893 0.982049
    +vn 0.408632 -0.026429 0.912316
    +vn 0.284578 -0.144077 0.947764
    +vn 0.284578 -0.144077 0.947764
    +vn 0.013886 0.131195 0.991259
    +vn 0.062719 0.177893 0.982049
    +vn 0.408632 -0.026429 0.912316
    +vn 0.693057 -0.241127 0.679360
    +vn 0.527113 -0.442216 0.725670
    +vn 0.527113 -0.442216 0.725670
    +vn 0.284578 -0.144077 0.947764
    +vn 0.408632 -0.026429 0.912316
    +vn 0.693057 -0.241127 0.679360
    +vn 0.855731 -0.392184 0.337515
    +vn 0.669122 -0.648591 0.362774
    +vn 0.669122 -0.648591 0.362774
    +vn 0.527113 -0.442216 0.725670
    +vn 0.693057 -0.241127 0.679360
    +vn 0.855731 -0.392184 0.337515
    +vn 0.897727 -0.440551 0.000000
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.669122 -0.648591 0.362774
    +vn 0.855731 -0.392184 0.337515
    +vn -0.828869 0.559443 0.000000
    +vn -0.740695 0.545202 0.392587
    +vn -0.540569 0.751399 0.378398
    +vn -0.540569 0.751399 0.378398
    +vn -0.600000 0.800000 0.000000
    +vn -0.828869 0.559443 0.000000
    +vn -0.740695 0.545202 0.392587
    +vn -0.515054 0.473366 0.714593
    +vn -0.389466 0.597377 0.701040
    +vn -0.389466 0.597377 0.701040
    +vn -0.540569 0.751399 0.378398
    +vn -0.740695 0.545202 0.392587
    +vn -0.515054 0.473366 0.714593
    +vn -0.251586 0.335928 0.907665
    +vn -0.203182 0.350343 0.914318
    +vn -0.203182 0.350343 0.914318
    +vn -0.389466 0.597377 0.701040
    +vn -0.515054 0.473366 0.714593
    +vn -0.251586 0.335928 0.907665
    +vn 0.013886 0.131195 0.991259
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.203182 0.350343 0.914318
    +vn -0.251586 0.335928 0.907665
    +vn 0.013886 0.131195 0.991259
    +vn 0.284578 -0.144077 0.947764
    +vn 0.197221 -0.416483 0.887494
    +vn 0.197221 -0.416483 0.887494
    +vn 0.000000 -0.000000 1.000000
    +vn 0.013886 0.131195 0.991259
    +vn 0.284578 -0.144077 0.947764
    +vn 0.527113 -0.442216 0.725670
    +vn 0.326890 -0.739545 0.588402
    +vn 0.326890 -0.739545 0.588402
    +vn 0.197221 -0.416483 0.887494
    +vn 0.284578 -0.144077 0.947764
    +vn 0.527113 -0.442216 0.725670
    +vn 0.669122 -0.648591 0.362774
    +vn 0.375987 -0.888462 0.263191
    +vn 0.375987 -0.888462 0.263191
    +vn 0.326890 -0.739545 0.588402
    +vn 0.527113 -0.442216 0.725670
    +vn 0.669122 -0.648591 0.362774
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.375987 -0.888462 0.263191
    +vn 0.669122 -0.648591 0.362774
    +vn 0.158678 -0.987330 -0.000000
    +vn 0.145201 -0.929551 -0.338899
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.158678 -0.987330 -0.000000
    +vn 0.145201 -0.929551 -0.338899
    +vn 0.104204 -0.725566 -0.680218
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.145201 -0.929551 -0.338899
    +vn 0.104204 -0.725566 -0.680218
    +vn 0.048550 -0.391976 -0.918694
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.104204 -0.725566 -0.680218
    +vn 0.048550 -0.391976 -0.918694
    +vn 0.000000 0.000000 -1.000000
    +vn 0.079637 0.016280 -0.996691
    +vn 0.079637 0.016280 -0.996691
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.048550 -0.391976 -0.918694
    +vn 0.000000 0.000000 -1.000000
    +vn -0.026392 0.392302 -0.919458
    +vn -0.060363 0.414895 -0.907865
    +vn -0.060363 0.414895 -0.907865
    +vn 0.079637 0.016280 -0.996691
    +vn 0.000000 0.000000 -1.000000
    +vn -0.026392 0.392302 -0.919458
    +vn -0.026212 0.729287 -0.683706
    +vn -0.166025 0.736945 -0.655246
    +vn -0.166025 0.736945 -0.655246
    +vn -0.060363 0.414895 -0.907865
    +vn -0.026392 0.392302 -0.919458
    +vn -0.026212 0.729287 -0.683706
    +vn -0.009857 0.939462 -0.342512
    +vn -0.221511 0.921327 -0.319515
    +vn -0.221511 0.921327 -0.319515
    +vn -0.166025 0.736945 -0.655246
    +vn -0.026212 0.729287 -0.683706
    +vn -0.009857 0.939462 -0.342512
    +vn 0.000000 1.000000 0.000000
    +vn -0.235151 0.971959 0.000000
    +vn -0.235151 0.971959 0.000000
    +vn -0.221511 0.921327 -0.319515
    +vn -0.009857 0.939462 -0.342512
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.427110 -0.904200 -0.000000
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.409288 -0.857703 -0.311173
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.342857 -0.685525 -0.642266
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.079637 0.016280 -0.996691
    +vn 0.169987 0.065129 -0.983292
    +vn 0.169987 0.065129 -0.983292
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.225037 -0.376837 -0.898528
    +vn 0.079637 0.016280 -0.996691
    +vn -0.060363 0.414895 -0.907865
    +vn -0.127540 0.418375 -0.899275
    +vn -0.127540 0.418375 -0.899275
    +vn 0.169987 0.065129 -0.983292
    +vn 0.079637 0.016280 -0.996691
    +vn -0.060363 0.414895 -0.907865
    +vn -0.166025 0.736945 -0.655246
    +vn -0.371255 0.679599 -0.632704
    +vn -0.371255 0.679599 -0.632704
    +vn -0.127540 0.418375 -0.899275
    +vn -0.060363 0.414895 -0.907865
    +vn -0.166025 0.736945 -0.655246
    +vn -0.221511 0.921327 -0.319515
    +vn -0.507151 0.807936 -0.300063
    +vn -0.507151 0.807936 -0.300063
    +vn -0.371255 0.679599 -0.632704
    +vn -0.166025 0.736945 -0.655246
    +vn -0.221511 0.921327 -0.319515
    +vn -0.235151 0.971959 0.000000
    +vn -0.544548 0.838730 0.000000
    +vn -0.544548 0.838730 0.000000
    +vn -0.507151 0.807936 -0.300063
    +vn -0.221511 0.921327 -0.319515
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.718240 -0.695795 -0.000000
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.697917 -0.660148 -0.277699
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.612946 -0.528311 -0.587524
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.169987 0.065129 -0.983292
    +vn 0.227878 0.130531 -0.964901
    +vn 0.227878 0.130531 -0.964901
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.435204 -0.278159 -0.856286
    +vn 0.169987 0.065129 -0.983292
    +vn -0.127540 0.418375 -0.899275
    +vn -0.219348 0.394768 -0.892213
    +vn -0.219348 0.394768 -0.892213
    +vn 0.227878 0.130531 -0.964901
    +vn 0.169987 0.065129 -0.983292
    +vn -0.127540 0.418375 -0.899275
    +vn -0.371255 0.679599 -0.632704
    +vn -0.577558 0.549507 -0.603712
    +vn -0.577558 0.549507 -0.603712
    +vn -0.219348 0.394768 -0.892213
    +vn -0.127540 0.418375 -0.899275
    +vn -0.371255 0.679599 -0.632704
    +vn -0.507151 0.807936 -0.300063
    +vn -0.756221 0.594190 -0.273986
    +vn -0.756221 0.594190 -0.273986
    +vn -0.577558 0.549507 -0.603712
    +vn -0.371255 0.679599 -0.632704
    +vn -0.507151 0.807936 -0.300063
    +vn -0.544548 0.838730 0.000000
    +vn -0.801883 0.597481 0.000000
    +vn -0.801883 0.597481 0.000000
    +vn -0.756221 0.594190 -0.273986
    +vn -0.507151 0.807936 -0.300063
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.957826 -0.287348 -0.000000
    +vn 0.897596 -0.440819 -0.000000
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.877178 -0.413402 -0.244250
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.788583 -0.316816 -0.527033
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.227878 0.130531 -0.964901
    +vn 0.214084 0.180281 -0.960035
    +vn 0.214084 0.180281 -0.960035
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.583760 -0.132820 -0.800989
    +vn 0.227878 0.130531 -0.964901
    +vn -0.219348 0.394768 -0.892213
    +vn -0.295910 0.354900 -0.886839
    +vn -0.295910 0.354900 -0.886839
    +vn 0.214084 0.180281 -0.960035
    +vn 0.227878 0.130531 -0.964901
    +vn -0.219348 0.394768 -0.892213
    +vn -0.577558 0.549507 -0.603712
    +vn -0.692633 0.417885 -0.587904
    +vn -0.692633 0.417885 -0.587904
    +vn -0.295910 0.354900 -0.886839
    +vn -0.219348 0.394768 -0.892213
    +vn -0.577558 0.549507 -0.603712
    +vn -0.756221 0.594190 -0.273986
    +vn -0.876420 0.404706 -0.260963
    +vn -0.876420 0.404706 -0.260963
    +vn -0.692633 0.417885 -0.587904
    +vn -0.577558 0.549507 -0.603712
    +vn -0.756221 0.594190 -0.273986
    +vn -0.801883 0.597481 0.000000
    +vn -0.920582 0.390550 0.000000
    +vn -0.920582 0.390550 0.000000
    +vn -0.876420 0.404706 -0.260963
    +vn -0.756221 0.594190 -0.273986
    +vn 0.957826 -0.287348 -0.000000
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.957826 -0.287348 -0.000000
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.935040 -0.261407 -0.239512
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.538856 0.013092 -0.842296
    +vn 0.538856 0.013092 -0.842296
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.837683 -0.175387 -0.517230
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.214084 0.180281 -0.960035
    +vn 0.141672 0.194556 -0.970607
    +vn 0.141672 0.194556 -0.970607
    +vn 0.538856 0.013092 -0.842296
    +vn 0.612672 -0.022207 -0.790025
    +vn 0.214084 0.180281 -0.960035
    +vn -0.295910 0.354900 -0.886839
    +vn -0.320459 0.327123 -0.888986
    +vn -0.320459 0.327123 -0.888986
    +vn 0.141672 0.194556 -0.970607
    +vn 0.214084 0.180281 -0.960035
    +vn -0.295910 0.354900 -0.886839
    +vn -0.692633 0.417885 -0.587904
    +vn -0.700914 0.362599 -0.614200
    +vn -0.700914 0.362599 -0.614200
    +vn -0.320459 0.327123 -0.888986
    +vn -0.295910 0.354900 -0.886839
    +vn -0.692633 0.417885 -0.587904
    +vn -0.876420 0.404706 -0.260963
    +vn -0.899576 0.332944 -0.282685
    +vn -0.899576 0.332944 -0.282685
    +vn -0.700914 0.362599 -0.614200
    +vn -0.692633 0.417885 -0.587904
    +vn -0.876420 0.404706 -0.260963
    +vn -0.920582 0.390550 0.000000
    +vn -0.950213 0.311601 0.000000
    +vn -0.950213 0.311601 0.000000
    +vn -0.899576 0.332944 -0.282685
    +vn -0.876420 0.404706 -0.260963
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.897727 -0.440551 -0.000000
    +vn 0.958492 -0.285121 -0.000000
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.927567 -0.252791 -0.275167
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.538856 0.013092 -0.842296
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.801020 -0.150222 -0.579483
    +vn 0.538856 0.013092 -0.842296
    +vn 0.141672 0.194556 -0.970607
    +vn 0.062719 0.177893 -0.982049
    +vn 0.062719 0.177893 -0.982049
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.538856 0.013092 -0.842296
    +vn 0.141672 0.194556 -0.970607
    +vn -0.320459 0.327123 -0.888986
    +vn -0.297304 0.323837 -0.898187
    +vn -0.297304 0.323837 -0.898187
    +vn 0.062719 0.177893 -0.982049
    +vn 0.141672 0.194556 -0.970607
    +vn -0.320459 0.327123 -0.888986
    +vn -0.700914 0.362599 -0.614200
    +vn -0.630340 0.390920 -0.670711
    +vn -0.630340 0.390920 -0.670711
    +vn -0.297304 0.323837 -0.898187
    +vn -0.320459 0.327123 -0.888986
    +vn -0.700914 0.362599 -0.614200
    +vn -0.899576 0.332944 -0.282685
    +vn -0.857730 0.387671 -0.337654
    +vn -0.857730 0.387671 -0.337654
    +vn -0.630340 0.390920 -0.670711
    +vn -0.700914 0.362599 -0.614200
    +vn -0.899576 0.332944 -0.282685
    +vn -0.950213 0.311601 0.000000
    +vn -0.928477 0.371391 -0.000000
    +vn -0.928477 0.371391 -0.000000
    +vn -0.857730 0.387671 -0.337654
    +vn -0.899576 0.332944 -0.282685
    +vn 0.897727 -0.440551 -0.000000
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.897727 -0.440551 -0.000000
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.855731 -0.392184 -0.337515
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.693057 -0.241127 -0.679360
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.062719 0.177893 -0.982049
    +vn 0.013886 0.131195 -0.991259
    +vn 0.013886 0.131195 -0.991259
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.408632 -0.026429 -0.912316
    +vn 0.062719 0.177893 -0.982049
    +vn -0.297304 0.323837 -0.898187
    +vn -0.251586 0.335928 -0.907665
    +vn -0.251586 0.335928 -0.907665
    +vn 0.013886 0.131195 -0.991259
    +vn 0.062719 0.177893 -0.982049
    +vn -0.297304 0.323837 -0.898187
    +vn -0.630340 0.390920 -0.670711
    +vn -0.515054 0.473366 -0.714593
    +vn -0.515054 0.473366 -0.714593
    +vn -0.251586 0.335928 -0.907665
    +vn -0.297304 0.323837 -0.898187
    +vn -0.630340 0.390920 -0.670711
    +vn -0.857730 0.387671 -0.337654
    +vn -0.740695 0.545202 -0.392587
    +vn -0.740695 0.545202 -0.392587
    +vn -0.515054 0.473366 -0.714593
    +vn -0.630340 0.390920 -0.670711
    +vn -0.857730 0.387671 -0.337654
    +vn -0.928477 0.371391 -0.000000
    +vn -0.828869 0.559443 0.000000
    +vn -0.828869 0.559443 0.000000
    +vn -0.740695 0.545202 -0.392587
    +vn -0.857730 0.387671 -0.337654
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.704117 -0.710084 -0.000000
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.669122 -0.648591 -0.362774
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.527113 -0.442216 -0.725670
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.013886 0.131195 -0.991259
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.284578 -0.144077 -0.947764
    +vn 0.013886 0.131195 -0.991259
    +vn -0.251586 0.335928 -0.907665
    +vn -0.203182 0.350343 -0.914318
    +vn -0.203182 0.350343 -0.914318
    +vn 0.000000 0.000000 -1.000000
    +vn 0.013886 0.131195 -0.991259
    +vn -0.251586 0.335928 -0.907665
    +vn -0.515054 0.473366 -0.714593
    +vn -0.389466 0.597377 -0.701040
    +vn -0.389466 0.597377 -0.701040
    +vn -0.203182 0.350343 -0.914318
    +vn -0.251586 0.335928 -0.907665
    +vn -0.515054 0.473366 -0.714593
    +vn -0.740695 0.545202 -0.392587
    +vn -0.540569 0.751399 -0.378398
    +vn -0.540569 0.751399 -0.378398
    +vn -0.389466 0.597377 -0.701040
    +vn -0.515054 0.473366 -0.714593
    +vn -0.740695 0.545202 -0.392587
    +vn -0.828869 0.559443 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.540569 0.751399 -0.378398
    +vn -0.740695 0.545202 -0.392587
    +vn -0.600000 0.800000 0.000000
    +vn -0.540569 0.751399 0.378398
    +vn -0.451571 0.827864 0.332755
    +vn -0.451571 0.827864 0.332755
    +vn -0.502136 0.864789 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.540569 0.751399 0.378398
    +vn -0.389466 0.597377 0.701040
    +vn -0.327654 0.714253 0.618454
    +vn -0.327654 0.714253 0.618454
    +vn -0.451571 0.827864 0.332755
    +vn -0.540569 0.751399 0.378398
    +vn -0.389466 0.597377 0.701040
    +vn -0.203182 0.350343 0.914318
    +vn -0.177042 0.532541 0.827681
    +vn -0.177042 0.532541 0.827681
    +vn -0.327654 0.714253 0.618454
    +vn -0.389466 0.597377 0.701040
    +vn -0.203182 0.350343 0.914318
    +vn 0.000000 -0.000000 1.000000
    +vn -0.002720 0.248952 0.968512
    +vn -0.002720 0.248952 0.968512
    +vn -0.177042 0.532541 0.827681
    +vn -0.203182 0.350343 0.914318
    +vn 0.000000 -0.000000 1.000000
    +vn 0.197221 -0.416483 0.887494
    +vn 0.201186 -0.178948 0.963069
    +vn 0.201186 -0.178948 0.963069
    +vn -0.002720 0.248952 0.968512
    +vn 0.000000 -0.000000 1.000000
    +vn 0.197221 -0.416483 0.887494
    +vn 0.326890 -0.739545 0.588402
    +vn 0.366803 -0.617053 0.696205
    +vn 0.366803 -0.617053 0.696205
    +vn 0.201186 -0.178948 0.963069
    +vn 0.197221 -0.416483 0.887494
    +vn 0.326890 -0.739545 0.588402
    +vn 0.375987 -0.888462 0.263191
    +vn 0.429874 -0.845676 0.316293
    +vn 0.429874 -0.845676 0.316293
    +vn 0.366803 -0.617053 0.696205
    +vn 0.326890 -0.739545 0.588402
    +vn 0.375987 -0.888462 0.263191
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.429874 -0.845676 0.316293
    +vn 0.375987 -0.888462 0.263191
    +vn -0.502136 0.864789 0.000000
    +vn -0.451571 0.827864 0.332755
    +vn -0.353812 0.896031 0.268226
    +vn -0.353812 0.896031 0.268226
    +vn -0.393919 0.919145 0.000000
    +vn -0.502136 0.864789 0.000000
    +vn -0.451571 0.827864 0.332755
    +vn -0.327654 0.714253 0.618454
    +vn -0.259222 0.827456 0.498117
    +vn -0.259222 0.827456 0.498117
    +vn -0.353812 0.896031 0.268226
    +vn -0.451571 0.827864 0.332755
    +vn -0.327654 0.714253 0.618454
    +vn -0.177042 0.532541 0.827681
    +vn -0.146646 0.720404 0.677874
    +vn -0.146646 0.720404 0.677874
    +vn -0.259222 0.827456 0.498117
    +vn -0.327654 0.714253 0.618454
    +vn -0.177042 0.532541 0.827681
    +vn -0.002720 0.248952 0.968512
    +vn -0.011162 0.544063 0.838970
    +vn -0.011162 0.544063 0.838970
    +vn -0.146646 0.720404 0.677874
    +vn -0.177042 0.532541 0.827681
    +vn -0.002720 0.248952 0.968512
    +vn 0.201186 -0.178948 0.963069
    +vn 0.182693 0.207446 0.961036
    +vn 0.182693 0.207446 0.961036
    +vn -0.011162 0.544063 0.838970
    +vn -0.002720 0.248952 0.968512
    +vn 0.201186 -0.178948 0.963069
    +vn 0.366803 -0.617053 0.696205
    +vn 0.417102 -0.338738 0.843376
    +vn 0.417102 -0.338738 0.843376
    +vn 0.182693 0.207446 0.961036
    +vn 0.201186 -0.178948 0.963069
    +vn 0.366803 -0.617053 0.696205
    +vn 0.429874 -0.845676 0.316293
    +vn 0.527595 -0.744179 0.409684
    +vn 0.527595 -0.744179 0.409684
    +vn 0.417102 -0.338738 0.843376
    +vn 0.366803 -0.617053 0.696205
    +vn 0.429874 -0.845676 0.316293
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.537133 -0.843498 0.000000
    +vn 0.537133 -0.843498 0.000000
    +vn 0.527595 -0.744179 0.409684
    +vn 0.429874 -0.845676 0.316293
    +vn -0.393919 0.919145 0.000000
    +vn -0.353812 0.896031 0.268226
    +vn -0.227673 0.959007 0.168732
    +vn -0.227673 0.959007 0.168732
    +vn -0.252422 0.967617 0.000000
    +vn -0.393919 0.919145 0.000000
    +vn -0.353812 0.896031 0.268226
    +vn -0.259222 0.827456 0.498117
    +vn -0.171151 0.934243 0.312886
    +vn -0.171151 0.934243 0.312886
    +vn -0.227673 0.959007 0.168732
    +vn -0.353812 0.896031 0.268226
    +vn -0.259222 0.827456 0.498117
    +vn -0.146646 0.720404 0.677874
    +vn -0.104987 0.896989 0.429405
    +vn -0.104987 0.896989 0.429405
    +vn -0.171151 0.934243 0.312886
    +vn -0.259222 0.827456 0.498117
    +vn -0.146646 0.720404 0.677874
    +vn -0.011162 0.544063 0.838970
    +vn -0.024062 0.837832 0.545398
    +vn -0.024062 0.837832 0.545398
    +vn -0.104987 0.896989 0.429405
    +vn -0.146646 0.720404 0.677874
    +vn -0.011162 0.544063 0.838970
    +vn 0.182693 0.207446 0.961036
    +vn 0.105490 0.721726 0.684093
    +vn 0.105490 0.721726 0.684093
    +vn -0.024062 0.837832 0.545398
    +vn -0.011162 0.544063 0.838970
    +vn 0.182693 0.207446 0.961036
    +vn 0.417102 -0.338738 0.843376
    +vn 0.366895 0.434634 0.822485
    +vn 0.366895 0.434634 0.822485
    +vn 0.105490 0.721726 0.684093
    +vn 0.182693 0.207446 0.961036
    +vn 0.417102 -0.338738 0.843376
    +vn 0.527595 -0.744179 0.409684
    +vn 0.753923 -0.182071 0.631229
    +vn 0.753923 -0.182071 0.631229
    +vn 0.366895 0.434634 0.822485
    +vn 0.417102 -0.338738 0.843376
    +vn 0.527595 -0.744179 0.409684
    +vn 0.537133 -0.843498 0.000000
    +vn 0.859738 -0.510735 0.000000
    +vn 0.859738 -0.510735 0.000000
    +vn 0.753923 -0.182071 0.631229
    +vn 0.527595 -0.744179 0.409684
    +vn -0.252422 0.967617 0.000000
    +vn -0.227673 0.959007 0.168732
    +vn -0.011687 0.999722 -0.020474
    +vn -0.011687 0.999722 -0.020474
    +vn 0.000000 1.000000 0.000000
    +vn -0.252422 0.967617 0.000000
    +vn -0.227673 0.959007 0.168732
    +vn -0.171151 0.934243 0.312886
    +vn -0.029866 0.999488 -0.011512
    +vn -0.029866 0.999488 -0.011512
    +vn -0.011687 0.999722 -0.020474
    +vn -0.227673 0.959007 0.168732
    +vn -0.171151 0.934243 0.312886
    +vn -0.104987 0.896989 0.429405
    +vn -0.038461 0.999062 0.019900
    +vn -0.038461 0.999062 0.019900
    +vn -0.029866 0.999488 -0.011512
    +vn -0.171151 0.934243 0.312886
    +vn -0.104987 0.896989 0.429405
    +vn -0.024062 0.837832 0.545398
    +vn -0.034891 0.997622 0.059444
    +vn -0.034891 0.997622 0.059444
    +vn -0.038461 0.999062 0.019900
    +vn -0.104987 0.896989 0.429405
    +vn -0.024062 0.837832 0.545398
    +vn 0.105490 0.721726 0.684093
    +vn -0.017520 0.995060 0.097716
    +vn -0.017520 0.995060 0.097716
    +vn -0.034891 0.997622 0.059444
    +vn -0.024062 0.837832 0.545398
    +vn 0.105490 0.721726 0.684093
    +vn 0.366895 0.434634 0.822485
    +vn 0.018525 0.992551 0.120410
    +vn 0.018525 0.992551 0.120410
    +vn -0.017520 0.995060 0.097716
    +vn 0.105490 0.721726 0.684093
    +vn 0.366895 0.434634 0.822485
    +vn 0.753923 -0.182071 0.631229
    +vn 0.072995 0.992822 0.094744
    +vn 0.072995 0.992822 0.094744
    +vn 0.018525 0.992551 0.120410
    +vn 0.366895 0.434634 0.822485
    +vn 0.753923 -0.182071 0.631229
    +vn 0.859738 -0.510735 0.000000
    +vn 0.106533 0.994309 0.000000
    +vn 0.106533 0.994309 0.000000
    +vn 0.072995 0.992822 0.094744
    +vn 0.753923 -0.182071 0.631229
    +vn 0.000000 1.000000 0.000000
    +vn -0.011687 0.999722 -0.020474
    +vn 0.462453 0.767551 -0.443849
    +vn 0.462453 0.767551 -0.443849
    +vn 0.650791 0.759257 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.011687 0.999722 -0.020474
    +vn -0.029866 0.999488 -0.011512
    +vn 0.211819 0.799294 -0.562371
    +vn 0.211819 0.799294 -0.562371
    +vn 0.462453 0.767551 -0.443849
    +vn -0.011687 0.999722 -0.020474
    +vn -0.029866 0.999488 -0.011512
    +vn -0.038461 0.999062 0.019900
    +vn 0.060321 0.841918 -0.536223
    +vn 0.060321 0.841918 -0.536223
    +vn 0.211819 0.799294 -0.562371
    +vn -0.029866 0.999488 -0.011512
    +vn -0.038461 0.999062 0.019900
    +vn -0.034891 0.997622 0.059444
    +vn -0.033567 0.880809 -0.472280
    +vn -0.033567 0.880809 -0.472280
    +vn 0.060321 0.841918 -0.536223
    +vn -0.038461 0.999062 0.019900
    +vn -0.034891 0.997622 0.059444
    +vn -0.017520 0.995060 0.097716
    +vn -0.101985 0.915417 -0.389371
    +vn -0.101985 0.915417 -0.389371
    +vn -0.033567 0.880809 -0.472280
    +vn -0.034891 0.997622 0.059444
    +vn -0.017520 0.995060 0.097716
    +vn 0.018525 0.992551 0.120410
    +vn -0.157383 0.946542 -0.281583
    +vn -0.157383 0.946542 -0.281583
    +vn -0.101985 0.915417 -0.389371
    +vn -0.017520 0.995060 0.097716
    +vn 0.018525 0.992551 0.120410
    +vn 0.072995 0.992822 0.094744
    +vn -0.197522 0.969523 -0.144947
    +vn -0.197522 0.969523 -0.144947
    +vn -0.157383 0.946542 -0.281583
    +vn 0.018525 0.992551 0.120410
    +vn 0.072995 0.992822 0.094744
    +vn 0.106533 0.994309 0.000000
    +vn -0.212234 0.977219 0.000000
    +vn -0.212234 0.977219 0.000000
    +vn -0.197522 0.969523 -0.144947
    +vn 0.072995 0.992822 0.094744
    +vn 0.650791 0.759257 0.000000
    +vn 0.462453 0.767551 -0.443849
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.650791 0.759257 0.000000
    +vn 0.462453 0.767551 -0.443849
    +vn 0.211819 0.799294 -0.562371
    +vn 0.387319 0.145682 -0.910363
    +vn 0.387319 0.145682 -0.910363
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.462453 0.767551 -0.443849
    +vn 0.211819 0.799294 -0.562371
    +vn 0.060321 0.841918 -0.536223
    +vn 0.143868 0.380414 -0.913558
    +vn 0.143868 0.380414 -0.913558
    +vn 0.387319 0.145682 -0.910363
    +vn 0.211819 0.799294 -0.562371
    +vn 0.060321 0.841918 -0.536223
    +vn -0.033567 0.880809 -0.472280
    +vn -0.020406 0.566191 -0.824022
    +vn -0.020406 0.566191 -0.824022
    +vn 0.143868 0.380414 -0.913558
    +vn 0.060321 0.841918 -0.536223
    +vn -0.033567 0.880809 -0.472280
    +vn -0.101985 0.915417 -0.389371
    +vn -0.142672 0.722871 -0.676093
    +vn -0.142672 0.722871 -0.676093
    +vn -0.020406 0.566191 -0.824022
    +vn -0.033567 0.880809 -0.472280
    +vn -0.101985 0.915417 -0.389371
    +vn -0.157383 0.946542 -0.281583
    +vn -0.234699 0.849060 -0.473301
    +vn -0.234699 0.849060 -0.473301
    +vn -0.142672 0.722871 -0.676093
    +vn -0.101985 0.915417 -0.389371
    +vn -0.157383 0.946542 -0.281583
    +vn -0.197522 0.969523 -0.144947
    +vn -0.291852 0.927637 -0.233050
    +vn -0.291852 0.927637 -0.233050
    +vn -0.234699 0.849060 -0.473301
    +vn -0.157383 0.946542 -0.281583
    +vn -0.197522 0.969523 -0.144947
    +vn -0.212234 0.977219 0.000000
    +vn -0.309738 0.950822 0.000000
    +vn -0.309738 0.950822 0.000000
    +vn -0.291852 0.927637 -0.233050
    +vn -0.197522 0.969523 -0.144947
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.387319 0.145682 -0.910363
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.736920 -0.147034 -0.659796
    +vn 0.387319 0.145682 -0.910363
    +vn 0.143868 0.380414 -0.913558
    +vn 0.178219 -0.044939 -0.982964
    +vn 0.178219 -0.044939 -0.982964
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.387319 0.145682 -0.910363
    +vn 0.143868 0.380414 -0.913558
    +vn -0.020406 0.566191 -0.824022
    +vn -0.006166 0.244167 -0.969714
    +vn -0.006166 0.244167 -0.969714
    +vn 0.178219 -0.044939 -0.982964
    +vn 0.143868 0.380414 -0.913558
    +vn -0.020406 0.566191 -0.824022
    +vn -0.142672 0.722871 -0.676093
    +vn -0.163540 0.527144 -0.833891
    +vn -0.163540 0.527144 -0.833891
    +vn -0.006166 0.244167 -0.969714
    +vn -0.020406 0.566191 -0.824022
    +vn -0.142672 0.722871 -0.676093
    +vn -0.234699 0.849060 -0.473301
    +vn -0.282901 0.759680 -0.585537
    +vn -0.282901 0.759680 -0.585537
    +vn -0.163540 0.527144 -0.833891
    +vn -0.142672 0.722871 -0.676093
    +vn -0.234699 0.849060 -0.473301
    +vn -0.291852 0.927637 -0.233050
    +vn -0.349059 0.893691 -0.281911
    +vn -0.349059 0.893691 -0.281911
    +vn -0.282901 0.759680 -0.585537
    +vn -0.234699 0.849060 -0.473301
    +vn -0.291852 0.927637 -0.233050
    +vn -0.309738 0.950822 0.000000
    +vn -0.366863 0.930275 0.000000
    +vn -0.366863 0.930275 0.000000
    +vn -0.349059 0.893691 -0.281911
    +vn -0.291852 0.927637 -0.233050
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.531838 -0.738946 -0.413652
    +vn 0.531838 -0.738946 -0.413652
    +vn 0.600000 -0.800000 -0.000000
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.369348 -0.563836 -0.738696
    +vn 0.369348 -0.563836 -0.738696
    +vn 0.531838 -0.738946 -0.413652
    +vn 0.621976 -0.581532 -0.524372
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.178219 -0.044939 -0.982964
    +vn 0.186075 -0.315878 -0.930375
    +vn 0.186075 -0.315878 -0.930375
    +vn 0.369348 -0.563836 -0.738696
    +vn 0.394729 -0.328668 -0.858001
    +vn 0.178219 -0.044939 -0.982964
    +vn -0.006166 0.244167 -0.969714
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.186075 -0.315878 -0.930375
    +vn 0.178219 -0.044939 -0.982964
    +vn -0.006166 0.244167 -0.969714
    +vn -0.163540 0.527144 -0.833891
    +vn -0.182420 0.367142 -0.912102
    +vn -0.182420 0.367142 -0.912102
    +vn 0.000000 0.000000 -1.000000
    +vn -0.006166 0.244167 -0.969714
    +vn -0.163540 0.527144 -0.833891
    +vn -0.282901 0.759680 -0.585537
    +vn -0.324210 0.688797 -0.648419
    +vn -0.324210 0.688797 -0.648419
    +vn -0.182420 0.367142 -0.912102
    +vn -0.163540 0.527144 -0.833891
    +vn -0.282901 0.759680 -0.585537
    +vn -0.349059 0.893691 -0.281911
    +vn -0.394390 0.866234 -0.306748
    +vn -0.394390 0.866234 -0.306748
    +vn -0.324210 0.688797 -0.648419
    +vn -0.282901 0.759680 -0.585537
    +vn -0.349059 0.893691 -0.281911
    +vn -0.366863 0.930275 0.000000
    +vn -0.410365 0.911921 0.000000
    +vn -0.410365 0.911921 0.000000
    +vn -0.394390 0.866234 -0.306748
    +vn -0.349059 0.893691 -0.281911
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.384615 -0.923077 -0.000000
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.375987 -0.888462 -0.263191
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.201186 -0.178948 -0.963069
    +vn 0.201186 -0.178948 -0.963069
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.326890 -0.739545 -0.588402
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.000000 0.000000 -1.000000
    +vn -0.002720 0.248952 -0.968512
    +vn -0.002720 0.248952 -0.968512
    +vn 0.201186 -0.178948 -0.963069
    +vn 0.197221 -0.416483 -0.887494
    +vn 0.000000 0.000000 -1.000000
    +vn -0.203182 0.350343 -0.914318
    +vn -0.177042 0.532541 -0.827681
    +vn -0.177042 0.532541 -0.827681
    +vn -0.002720 0.248952 -0.968512
    +vn 0.000000 0.000000 -1.000000
    +vn -0.203182 0.350343 -0.914318
    +vn -0.389466 0.597377 -0.701040
    +vn -0.327654 0.714253 -0.618454
    +vn -0.327654 0.714253 -0.618454
    +vn -0.177042 0.532541 -0.827681
    +vn -0.203182 0.350343 -0.914318
    +vn -0.389466 0.597377 -0.701040
    +vn -0.540569 0.751399 -0.378398
    +vn -0.451571 0.827864 -0.332755
    +vn -0.451571 0.827864 -0.332755
    +vn -0.327654 0.714253 -0.618454
    +vn -0.389466 0.597377 -0.701040
    +vn -0.540569 0.751399 -0.378398
    +vn -0.600000 0.800000 0.000000
    +vn -0.502136 0.864789 0.000000
    +vn -0.502136 0.864789 0.000000
    +vn -0.451571 0.827864 -0.332755
    +vn -0.540569 0.751399 -0.378398
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.537133 -0.843498 -0.000000
    +vn 0.438412 -0.898774 -0.000000
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.429874 -0.845676 -0.316293
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.201186 -0.178948 -0.963069
    +vn 0.182693 0.207446 -0.961036
    +vn 0.182693 0.207446 -0.961036
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.366803 -0.617053 -0.696205
    +vn 0.201186 -0.178948 -0.963069
    +vn -0.002720 0.248952 -0.968512
    +vn -0.011162 0.544063 -0.838970
    +vn -0.011162 0.544063 -0.838970
    +vn 0.182693 0.207446 -0.961036
    +vn 0.201186 -0.178948 -0.963069
    +vn -0.002720 0.248952 -0.968512
    +vn -0.177042 0.532541 -0.827681
    +vn -0.146646 0.720404 -0.677874
    +vn -0.146646 0.720404 -0.677874
    +vn -0.011162 0.544063 -0.838970
    +vn -0.002720 0.248952 -0.968512
    +vn -0.177042 0.532541 -0.827681
    +vn -0.327654 0.714253 -0.618454
    +vn -0.259222 0.827456 -0.498117
    +vn -0.259222 0.827456 -0.498117
    +vn -0.146646 0.720404 -0.677874
    +vn -0.177042 0.532541 -0.827681
    +vn -0.327654 0.714253 -0.618454
    +vn -0.451571 0.827864 -0.332755
    +vn -0.353812 0.896031 -0.268226
    +vn -0.353812 0.896031 -0.268226
    +vn -0.259222 0.827456 -0.498117
    +vn -0.327654 0.714253 -0.618454
    +vn -0.451571 0.827864 -0.332755
    +vn -0.502136 0.864789 0.000000
    +vn -0.393919 0.919145 0.000000
    +vn -0.393919 0.919145 0.000000
    +vn -0.353812 0.896031 -0.268226
    +vn -0.451571 0.827864 -0.332755
    +vn 0.537133 -0.843498 -0.000000
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.859738 -0.510735 -0.000000
    +vn 0.537133 -0.843498 -0.000000
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.366895 0.434634 -0.822485
    +vn 0.366895 0.434634 -0.822485
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.527595 -0.744179 -0.409684
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.182693 0.207446 -0.961036
    +vn 0.105490 0.721726 -0.684093
    +vn 0.105490 0.721726 -0.684093
    +vn 0.366895 0.434634 -0.822485
    +vn 0.417102 -0.338738 -0.843376
    +vn 0.182693 0.207446 -0.961036
    +vn -0.011162 0.544063 -0.838970
    +vn -0.024062 0.837832 -0.545398
    +vn -0.024062 0.837832 -0.545398
    +vn 0.105490 0.721726 -0.684093
    +vn 0.182693 0.207446 -0.961036
    +vn -0.011162 0.544063 -0.838970
    +vn -0.146646 0.720404 -0.677874
    +vn -0.104987 0.896989 -0.429405
    +vn -0.104987 0.896989 -0.429405
    +vn -0.024062 0.837832 -0.545398
    +vn -0.011162 0.544063 -0.838970
    +vn -0.146646 0.720404 -0.677874
    +vn -0.259222 0.827456 -0.498117
    +vn -0.171151 0.934243 -0.312886
    +vn -0.171151 0.934243 -0.312886
    +vn -0.104987 0.896989 -0.429405
    +vn -0.146646 0.720404 -0.677874
    +vn -0.259222 0.827456 -0.498117
    +vn -0.353812 0.896031 -0.268226
    +vn -0.227673 0.959007 -0.168732
    +vn -0.227673 0.959007 -0.168732
    +vn -0.171151 0.934243 -0.312886
    +vn -0.259222 0.827456 -0.498117
    +vn -0.353812 0.896031 -0.268226
    +vn -0.393919 0.919145 0.000000
    +vn -0.252422 0.967617 0.000000
    +vn -0.252422 0.967617 0.000000
    +vn -0.227673 0.959007 -0.168732
    +vn -0.353812 0.896031 -0.268226
    +vn 0.859738 -0.510735 -0.000000
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.072995 0.992822 -0.094744
    +vn 0.072995 0.992822 -0.094744
    +vn 0.106533 0.994309 0.000000
    +vn 0.859738 -0.510735 -0.000000
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.366895 0.434634 -0.822485
    +vn 0.018525 0.992551 -0.120410
    +vn 0.018525 0.992551 -0.120410
    +vn 0.072995 0.992822 -0.094744
    +vn 0.753923 -0.182071 -0.631229
    +vn 0.366895 0.434634 -0.822485
    +vn 0.105490 0.721726 -0.684093
    +vn -0.017520 0.995060 -0.097716
    +vn -0.017520 0.995060 -0.097716
    +vn 0.018525 0.992551 -0.120410
    +vn 0.366895 0.434634 -0.822485
    +vn 0.105490 0.721726 -0.684093
    +vn -0.024062 0.837832 -0.545398
    +vn -0.034891 0.997622 -0.059444
    +vn -0.034891 0.997622 -0.059444
    +vn -0.017520 0.995060 -0.097716
    +vn 0.105490 0.721726 -0.684093
    +vn -0.024062 0.837832 -0.545398
    +vn -0.104987 0.896989 -0.429405
    +vn -0.038461 0.999062 -0.019900
    +vn -0.038461 0.999062 -0.019900
    +vn -0.034891 0.997622 -0.059444
    +vn -0.024062 0.837832 -0.545398
    +vn -0.104987 0.896989 -0.429405
    +vn -0.171151 0.934243 -0.312886
    +vn -0.029866 0.999488 0.011512
    +vn -0.029866 0.999488 0.011512
    +vn -0.038461 0.999062 -0.019900
    +vn -0.104987 0.896989 -0.429405
    +vn -0.171151 0.934243 -0.312886
    +vn -0.227673 0.959007 -0.168732
    +vn -0.011687 0.999722 0.020474
    +vn -0.011687 0.999722 0.020474
    +vn -0.029866 0.999488 0.011512
    +vn -0.171151 0.934243 -0.312886
    +vn -0.227673 0.959007 -0.168732
    +vn -0.252422 0.967617 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.011687 0.999722 0.020474
    +vn -0.227673 0.959007 -0.168732
    +vn 0.106533 0.994309 0.000000
    +vn 0.072995 0.992822 -0.094744
    +vn -0.197522 0.969523 0.144947
    +vn -0.197522 0.969523 0.144947
    +vn -0.212234 0.977219 0.000000
    +vn 0.106533 0.994309 0.000000
    +vn 0.072995 0.992822 -0.094744
    +vn 0.018525 0.992551 -0.120410
    +vn -0.157383 0.946542 0.281583
    +vn -0.157383 0.946542 0.281583
    +vn -0.197522 0.969523 0.144947
    +vn 0.072995 0.992822 -0.094744
    +vn 0.018525 0.992551 -0.120410
    +vn -0.017520 0.995060 -0.097716
    +vn -0.101985 0.915417 0.389371
    +vn -0.101985 0.915417 0.389371
    +vn -0.157383 0.946542 0.281583
    +vn 0.018525 0.992551 -0.120410
    +vn -0.017520 0.995060 -0.097716
    +vn -0.034891 0.997622 -0.059444
    +vn -0.033567 0.880809 0.472280
    +vn -0.033567 0.880809 0.472280
    +vn -0.101985 0.915417 0.389371
    +vn -0.017520 0.995060 -0.097716
    +vn -0.034891 0.997622 -0.059444
    +vn -0.038461 0.999062 -0.019900
    +vn 0.060321 0.841918 0.536223
    +vn 0.060321 0.841918 0.536223
    +vn -0.033567 0.880809 0.472280
    +vn -0.034891 0.997622 -0.059444
    +vn -0.038461 0.999062 -0.019900
    +vn -0.029866 0.999488 0.011512
    +vn 0.211819 0.799294 0.562371
    +vn 0.211819 0.799294 0.562371
    +vn 0.060321 0.841918 0.536223
    +vn -0.038461 0.999062 -0.019900
    +vn -0.029866 0.999488 0.011512
    +vn -0.011687 0.999722 0.020474
    +vn 0.462453 0.767551 0.443849
    +vn 0.462453 0.767551 0.443849
    +vn 0.211819 0.799294 0.562371
    +vn -0.029866 0.999488 0.011512
    +vn -0.011687 0.999722 0.020474
    +vn 0.000000 1.000000 0.000000
    +vn 0.650791 0.759257 0.000000
    +vn 0.650791 0.759257 0.000000
    +vn 0.462453 0.767551 0.443849
    +vn -0.011687 0.999722 0.020474
    +vn -0.212234 0.977219 0.000000
    +vn -0.197522 0.969523 0.144947
    +vn -0.291852 0.927637 0.233050
    +vn -0.291852 0.927637 0.233050
    +vn -0.309738 0.950822 0.000000
    +vn -0.212234 0.977219 0.000000
    +vn -0.197522 0.969523 0.144947
    +vn -0.157383 0.946542 0.281583
    +vn -0.234699 0.849060 0.473301
    +vn -0.234699 0.849060 0.473301
    +vn -0.291852 0.927637 0.233050
    +vn -0.197522 0.969523 0.144947
    +vn -0.157383 0.946542 0.281583
    +vn -0.101985 0.915417 0.389371
    +vn -0.142672 0.722871 0.676093
    +vn -0.142672 0.722871 0.676093
    +vn -0.234699 0.849060 0.473301
    +vn -0.157383 0.946542 0.281583
    +vn -0.101985 0.915417 0.389371
    +vn -0.033567 0.880809 0.472280
    +vn -0.020406 0.566191 0.824022
    +vn -0.020406 0.566191 0.824022
    +vn -0.142672 0.722871 0.676093
    +vn -0.101985 0.915417 0.389371
    +vn -0.033567 0.880809 0.472280
    +vn 0.060321 0.841918 0.536223
    +vn 0.143868 0.380414 0.913558
    +vn 0.143868 0.380414 0.913558
    +vn -0.020406 0.566191 0.824022
    +vn -0.033567 0.880809 0.472280
    +vn 0.060321 0.841918 0.536223
    +vn 0.211819 0.799294 0.562371
    +vn 0.387319 0.145682 0.910363
    +vn 0.387319 0.145682 0.910363
    +vn 0.143868 0.380414 0.913558
    +vn 0.060321 0.841918 0.536223
    +vn 0.211819 0.799294 0.562371
    +vn 0.462453 0.767551 0.443849
    +vn 0.736920 -0.147034 0.659796
    +vn 0.736920 -0.147034 0.659796
    +vn 0.387319 0.145682 0.910363
    +vn 0.211819 0.799294 0.562371
    +vn 0.462453 0.767551 0.443849
    +vn 0.650791 0.759257 0.000000
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.736920 -0.147034 0.659796
    +vn 0.462453 0.767551 0.443849
    +vn -0.309738 0.950822 0.000000
    +vn -0.291852 0.927637 0.233050
    +vn -0.349059 0.893691 0.281911
    +vn -0.349059 0.893691 0.281911
    +vn -0.366863 0.930275 0.000000
    +vn -0.309738 0.950822 0.000000
    +vn -0.291852 0.927637 0.233050
    +vn -0.234699 0.849060 0.473301
    +vn -0.282901 0.759680 0.585537
    +vn -0.282901 0.759680 0.585537
    +vn -0.349059 0.893691 0.281911
    +vn -0.291852 0.927637 0.233050
    +vn -0.234699 0.849060 0.473301
    +vn -0.142672 0.722871 0.676093
    +vn -0.163540 0.527144 0.833891
    +vn -0.163540 0.527144 0.833891
    +vn -0.282901 0.759680 0.585537
    +vn -0.234699 0.849060 0.473301
    +vn -0.142672 0.722871 0.676093
    +vn -0.020406 0.566191 0.824022
    +vn -0.006166 0.244167 0.969714
    +vn -0.006166 0.244167 0.969714
    +vn -0.163540 0.527144 0.833891
    +vn -0.142672 0.722871 0.676093
    +vn -0.020406 0.566191 0.824022
    +vn 0.143868 0.380414 0.913558
    +vn 0.178219 -0.044939 0.982964
    +vn 0.178219 -0.044939 0.982964
    +vn -0.006166 0.244167 0.969714
    +vn -0.020406 0.566191 0.824022
    +vn 0.143868 0.380414 0.913558
    +vn 0.387319 0.145682 0.910363
    +vn 0.394729 -0.328668 0.858001
    +vn 0.394729 -0.328668 0.858001
    +vn 0.178219 -0.044939 0.982964
    +vn 0.143868 0.380414 0.913558
    +vn 0.387319 0.145682 0.910363
    +vn 0.736920 -0.147034 0.659796
    +vn 0.621976 -0.581532 0.524372
    +vn 0.621976 -0.581532 0.524372
    +vn 0.394729 -0.328668 0.858001
    +vn 0.387319 0.145682 0.910363
    +vn 0.736920 -0.147034 0.659796
    +vn 0.948683 -0.316228 -0.000000
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.621976 -0.581532 0.524372
    +vn 0.736920 -0.147034 0.659796
    +vn -0.366863 0.930275 0.000000
    +vn -0.349059 0.893691 0.281911
    +vn -0.394390 0.866234 0.306748
    +vn -0.394390 0.866234 0.306748
    +vn -0.410365 0.911921 0.000000
    +vn -0.366863 0.930275 0.000000
    +vn -0.349059 0.893691 0.281911
    +vn -0.282901 0.759680 0.585537
    +vn -0.324210 0.688797 0.648419
    +vn -0.324210 0.688797 0.648419
    +vn -0.394390 0.866234 0.306748
    +vn -0.349059 0.893691 0.281911
    +vn -0.282901 0.759680 0.585537
    +vn -0.163540 0.527144 0.833891
    +vn -0.182420 0.367142 0.912102
    +vn -0.182420 0.367142 0.912102
    +vn -0.324210 0.688797 0.648419
    +vn -0.282901 0.759680 0.585537
    +vn -0.163540 0.527144 0.833891
    +vn -0.006166 0.244167 0.969714
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 -0.000000 1.000000
    +vn -0.182420 0.367142 0.912102
    +vn -0.163540 0.527144 0.833891
    +vn -0.006166 0.244167 0.969714
    +vn 0.178219 -0.044939 0.982964
    +vn 0.186075 -0.315878 0.930375
    +vn 0.186075 -0.315878 0.930375
    +vn 0.000000 -0.000000 1.000000
    +vn -0.006166 0.244167 0.969714
    +vn 0.178219 -0.044939 0.982964
    +vn 0.394729 -0.328668 0.858001
    +vn 0.369348 -0.563836 0.738696
    +vn 0.369348 -0.563836 0.738696
    +vn 0.186075 -0.315878 0.930375
    +vn 0.178219 -0.044939 0.982964
    +vn 0.394729 -0.328668 0.858001
    +vn 0.621976 -0.581532 0.524372
    +vn 0.531838 -0.738946 0.413652
    +vn 0.531838 -0.738946 0.413652
    +vn 0.369348 -0.563836 0.738696
    +vn 0.394729 -0.328668 0.858001
    +vn 0.621976 -0.581532 0.524372
    +vn 0.727013 -0.686624 -0.000000
    +vn 0.600000 -0.800000 -0.000000
    +vn 0.600000 -0.800000 -0.000000
    +vn 0.531838 -0.738946 0.413652
    +vn 0.621976 -0.581532 0.524372
    +vn 0.149366 0.988337 0.029652
    +vn 0.152452 0.988311 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn 0.140386 0.988384 0.058209
    +vn 0.149366 0.988337 0.029652
    +vn 0.000000 1.000000 0.000000
    +vn 0.126119 0.988421 0.084370
    +vn 0.140386 0.988384 0.058209
    +vn 0.000000 1.000000 0.000000
    +vn 0.107234 0.988434 0.107234
    +vn 0.126119 0.988421 0.084370
    +vn 0.000000 1.000000 0.000000
    +vn 0.084370 0.988421 0.126119
    +vn 0.107234 0.988434 0.107234
    +vn 0.000000 1.000000 0.000000
    +vn 0.058209 0.988384 0.140386
    +vn 0.084370 0.988421 0.126119
    +vn 0.000000 1.000000 0.000000
    +vn 0.029652 0.988337 0.149366
    +vn 0.058209 0.988384 0.140386
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.988311 0.152452
    +vn 0.029652 0.988337 0.149366
    +vn 0.000000 1.000000 0.000000
    +vn 0.152452 0.988311 0.000000
    +vn 0.149366 0.988337 0.029652
    +vn 0.588086 0.800327 0.116752
    +vn 0.588086 0.800327 0.116752
    +vn 0.600000 0.800000 0.000000
    +vn 0.152452 0.988311 0.000000
    +vn 0.149366 0.988337 0.029652
    +vn 0.140386 0.988384 0.058209
    +vn 0.553123 0.800907 0.229354
    +vn 0.553123 0.800907 0.229354
    +vn 0.588086 0.800327 0.116752
    +vn 0.149366 0.988337 0.029652
    +vn 0.140386 0.988384 0.058209
    +vn 0.126119 0.988421 0.084370
    +vn 0.497187 0.801359 0.332609
    +vn 0.497187 0.801359 0.332609
    +vn 0.553123 0.800907 0.229354
    +vn 0.140386 0.988384 0.058209
    +vn 0.126119 0.988421 0.084370
    +vn 0.107234 0.988434 0.107234
    +vn 0.422824 0.801523 0.422824
    +vn 0.422824 0.801523 0.422824
    +vn 0.497187 0.801359 0.332609
    +vn 0.126119 0.988421 0.084370
    +vn 0.107234 0.988434 0.107234
    +vn 0.084370 0.988421 0.126119
    +vn 0.332609 0.801359 0.497187
    +vn 0.332609 0.801359 0.497187
    +vn 0.422824 0.801523 0.422824
    +vn 0.107234 0.988434 0.107234
    +vn 0.084370 0.988421 0.126119
    +vn 0.058209 0.988384 0.140386
    +vn 0.229354 0.800907 0.553123
    +vn 0.229354 0.800907 0.553123
    +vn 0.332609 0.801359 0.497187
    +vn 0.084370 0.988421 0.126119
    +vn 0.058209 0.988384 0.140386
    +vn 0.029652 0.988337 0.149366
    +vn 0.116752 0.800327 0.588086
    +vn 0.116752 0.800327 0.588086
    +vn 0.229354 0.800907 0.553123
    +vn 0.058209 0.988384 0.140386
    +vn 0.029652 0.988337 0.149366
    +vn 0.000000 0.988311 0.152452
    +vn 0.000000 0.800000 0.600000
    +vn 0.000000 0.800000 0.600000
    +vn 0.116752 0.800327 0.588086
    +vn 0.029652 0.988337 0.149366
    +vn 0.600000 0.800000 0.000000
    +vn 0.588086 0.800327 0.116752
    +vn 0.959361 -0.208184 0.190490
    +vn 0.959361 -0.208184 0.190490
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.588086 0.800327 0.116752
    +vn 0.553123 0.800907 0.229354
    +vn 0.903387 -0.208673 0.374629
    +vn 0.903387 -0.208673 0.374629
    +vn 0.959361 -0.208184 0.190490
    +vn 0.588086 0.800327 0.116752
    +vn 0.553123 0.800907 0.229354
    +vn 0.497187 0.801359 0.332609
    +vn 0.812782 -0.209064 0.543762
    +vn 0.812782 -0.209064 0.543762
    +vn 0.903387 -0.208673 0.374629
    +vn 0.553123 0.800907 0.229354
    +vn 0.497187 0.801359 0.332609
    +vn 0.422824 0.801523 0.422824
    +vn 0.691459 -0.209208 0.691459
    +vn 0.691459 -0.209208 0.691459
    +vn 0.812782 -0.209064 0.543762
    +vn 0.497187 0.801359 0.332609
    +vn 0.422824 0.801523 0.422824
    +vn 0.332609 0.801359 0.497187
    +vn 0.543762 -0.209064 0.812782
    +vn 0.543762 -0.209064 0.812782
    +vn 0.691459 -0.209208 0.691459
    +vn 0.422824 0.801523 0.422824
    +vn 0.332609 0.801359 0.497187
    +vn 0.229354 0.800907 0.553123
    +vn 0.374629 -0.208673 0.903387
    +vn 0.374629 -0.208673 0.903387
    +vn 0.543762 -0.209064 0.812782
    +vn 0.332609 0.801359 0.497187
    +vn 0.229354 0.800907 0.553123
    +vn 0.116752 0.800327 0.588086
    +vn 0.190490 -0.208184 0.959361
    +vn 0.190490 -0.208184 0.959361
    +vn 0.374629 -0.208673 0.903387
    +vn 0.229354 0.800907 0.553123
    +vn 0.116752 0.800327 0.588086
    +vn 0.000000 0.800000 0.600000
    +vn 0.000000 -0.207915 0.978147
    +vn 0.000000 -0.207915 0.978147
    +vn 0.190490 -0.208184 0.959361
    +vn 0.116752 0.800327 0.588086
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.959361 -0.208184 0.190490
    +vn 0.765536 -0.625166 0.152058
    +vn 0.765536 -0.625166 0.152058
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.959361 -0.208184 0.190490
    +vn 0.903387 -0.208673 0.374629
    +vn 0.720308 -0.626010 0.298777
    +vn 0.720308 -0.626010 0.298777
    +vn 0.765536 -0.625166 0.152058
    +vn 0.959361 -0.208184 0.190490
    +vn 0.903387 -0.208673 0.374629
    +vn 0.812782 -0.209064 0.543762
    +vn 0.647675 -0.626676 0.433353
    +vn 0.647675 -0.626676 0.433353
    +vn 0.720308 -0.626010 0.298777
    +vn 0.903387 -0.208673 0.374629
    +vn 0.812782 -0.209064 0.543762
    +vn 0.691459 -0.209208 0.691459
    +vn 0.550896 -0.626919 0.550896
    +vn 0.550896 -0.626919 0.550896
    +vn 0.647675 -0.626676 0.433353
    +vn 0.812782 -0.209064 0.543762
    +vn 0.691459 -0.209208 0.691459
    +vn 0.543762 -0.209064 0.812782
    +vn 0.433353 -0.626676 0.647675
    +vn 0.433353 -0.626676 0.647675
    +vn 0.550896 -0.626919 0.550896
    +vn 0.691459 -0.209208 0.691459
    +vn 0.543762 -0.209064 0.812782
    +vn 0.374629 -0.208673 0.903387
    +vn 0.298777 -0.626010 0.720308
    +vn 0.298777 -0.626010 0.720308
    +vn 0.433353 -0.626676 0.647675
    +vn 0.543762 -0.209064 0.812782
    +vn 0.374629 -0.208673 0.903387
    +vn 0.190490 -0.208184 0.959361
    +vn 0.152058 -0.625166 0.765536
    +vn 0.152058 -0.625166 0.765536
    +vn 0.298777 -0.626010 0.720308
    +vn 0.374629 -0.208673 0.903387
    +vn 0.190490 -0.208184 0.959361
    +vn 0.000000 -0.207915 0.978147
    +vn 0.000000 -0.624695 0.780869
    +vn 0.000000 -0.624695 0.780869
    +vn 0.152058 -0.625166 0.765536
    +vn 0.190490 -0.208184 0.959361
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.765536 -0.625166 0.152058
    +vn 0.719416 -0.679697 0.143016
    +vn 0.719416 -0.679697 0.143016
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.765536 -0.625166 0.152058
    +vn 0.720308 -0.626010 0.298777
    +vn 0.676759 -0.680523 0.280866
    +vn 0.676759 -0.680523 0.280866
    +vn 0.719416 -0.679697 0.143016
    +vn 0.765536 -0.625166 0.152058
    +vn 0.720308 -0.626010 0.298777
    +vn 0.647675 -0.626676 0.433353
    +vn 0.608429 -0.681176 0.407203
    +vn 0.608429 -0.681176 0.407203
    +vn 0.676759 -0.680523 0.280866
    +vn 0.720308 -0.626010 0.298777
    +vn 0.647675 -0.626676 0.433353
    +vn 0.550896 -0.626919 0.550896
    +vn 0.517530 -0.681414 0.517530
    +vn 0.517530 -0.681414 0.517530
    +vn 0.608429 -0.681176 0.407203
    +vn 0.647675 -0.626676 0.433353
    +vn 0.550896 -0.626919 0.550896
    +vn 0.433353 -0.626676 0.647675
    +vn 0.407203 -0.681176 0.608429
    +vn 0.407203 -0.681176 0.608429
    +vn 0.517530 -0.681414 0.517530
    +vn 0.550896 -0.626919 0.550896
    +vn 0.433353 -0.626676 0.647675
    +vn 0.298777 -0.626010 0.720308
    +vn 0.280866 -0.680523 0.676759
    +vn 0.280866 -0.680523 0.676759
    +vn 0.407203 -0.681176 0.608429
    +vn 0.433353 -0.626676 0.647675
    +vn 0.298777 -0.626010 0.720308
    +vn 0.152058 -0.625166 0.765536
    +vn 0.143016 -0.679697 0.719416
    +vn 0.143016 -0.679697 0.719416
    +vn 0.280866 -0.680523 0.676759
    +vn 0.298777 -0.626010 0.720308
    +vn 0.152058 -0.625166 0.765536
    +vn 0.000000 -0.624695 0.780869
    +vn 0.000000 -0.679236 0.733920
    +vn 0.000000 -0.679236 0.733920
    +vn 0.143016 -0.679697 0.719416
    +vn 0.152058 -0.625166 0.765536
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.719416 -0.679697 0.143016
    +vn 0.803695 -0.573111 0.160057
    +vn 0.803695 -0.573111 0.160057
    +vn 0.819843 -0.572589 -0.000000
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.719416 -0.679697 0.143016
    +vn 0.676759 -0.680523 0.280866
    +vn 0.756142 -0.574055 0.314181
    +vn 0.756142 -0.574055 0.314181
    +vn 0.803695 -0.573111 0.160057
    +vn 0.719416 -0.679697 0.143016
    +vn 0.676759 -0.680523 0.280866
    +vn 0.608429 -0.681176 0.407203
    +vn 0.679917 -0.574807 0.455314
    +vn 0.679917 -0.574807 0.455314
    +vn 0.756142 -0.574055 0.314181
    +vn 0.676759 -0.680523 0.280866
    +vn 0.608429 -0.681176 0.407203
    +vn 0.517530 -0.681414 0.517530
    +vn 0.578481 -0.575083 0.578481
    +vn 0.578481 -0.575083 0.578481
    +vn 0.679917 -0.574807 0.455314
    +vn 0.608429 -0.681176 0.407203
    +vn 0.517530 -0.681414 0.517530
    +vn 0.407203 -0.681176 0.608429
    +vn 0.455314 -0.574807 0.679917
    +vn 0.455314 -0.574807 0.679917
    +vn 0.578481 -0.575083 0.578481
    +vn 0.517530 -0.681414 0.517530
    +vn 0.407203 -0.681176 0.608429
    +vn 0.280866 -0.680523 0.676759
    +vn 0.314181 -0.574055 0.756142
    +vn 0.314181 -0.574055 0.756142
    +vn 0.455314 -0.574807 0.679917
    +vn 0.407203 -0.681176 0.608429
    +vn 0.280866 -0.680523 0.676759
    +vn 0.143016 -0.679697 0.719416
    +vn 0.160057 -0.573111 0.803695
    +vn 0.160057 -0.573111 0.803695
    +vn 0.314181 -0.574055 0.756142
    +vn 0.280866 -0.680523 0.676759
    +vn 0.143016 -0.679697 0.719416
    +vn 0.000000 -0.679236 0.733920
    +vn -0.000000 -0.572589 0.819843
    +vn -0.000000 -0.572589 0.819843
    +vn 0.160057 -0.573111 0.803695
    +vn 0.143016 -0.679697 0.719416
    +vn 0.819843 -0.572589 -0.000000
    +vn 0.803695 -0.573111 0.160057
    +vn 0.979302 -0.052142 0.195574
    +vn 0.979302 -0.052142 0.195574
    +vn 0.998653 -0.051878 -0.000000
    +vn 0.819843 -0.572589 -0.000000
    +vn 0.803695 -0.573111 0.160057
    +vn 0.756142 -0.574055 0.314181
    +vn 0.921927 -0.052662 0.383767
    +vn 0.921927 -0.052662 0.383767
    +vn 0.979302 -0.052142 0.195574
    +vn 0.803695 -0.573111 0.160057
    +vn 0.756142 -0.574055 0.314181
    +vn 0.679917 -0.574807 0.455314
    +vn 0.829494 -0.053108 0.555984
    +vn 0.829494 -0.053108 0.555984
    +vn 0.921927 -0.052662 0.383767
    +vn 0.756142 -0.574055 0.314181
    +vn 0.679917 -0.574807 0.455314
    +vn 0.578481 -0.575083 0.578481
    +vn 0.706102 -0.053279 0.706102
    +vn 0.706102 -0.053279 0.706102
    +vn 0.829494 -0.053108 0.555984
    +vn 0.679917 -0.574807 0.455314
    +vn 0.578481 -0.575083 0.578481
    +vn 0.455314 -0.574807 0.679917
    +vn 0.555984 -0.053108 0.829494
    +vn 0.555984 -0.053108 0.829494
    +vn 0.706102 -0.053279 0.706102
    +vn 0.578481 -0.575083 0.578481
    +vn 0.455314 -0.574807 0.679917
    +vn 0.314181 -0.574055 0.756142
    +vn 0.383767 -0.052662 0.921927
    +vn 0.383767 -0.052662 0.921927
    +vn 0.555984 -0.053108 0.829494
    +vn 0.455314 -0.574807 0.679917
    +vn 0.314181 -0.574055 0.756142
    +vn 0.160057 -0.573111 0.803695
    +vn 0.195574 -0.052142 0.979302
    +vn 0.195574 -0.052142 0.979302
    +vn 0.383767 -0.052662 0.921927
    +vn 0.314181 -0.574055 0.756142
    +vn 0.160057 -0.573111 0.803695
    +vn -0.000000 -0.572589 0.819843
    +vn -0.000000 -0.051878 0.998653
    +vn -0.000000 -0.051878 0.998653
    +vn 0.195574 -0.052142 0.979302
    +vn 0.160057 -0.573111 0.803695
    +vn 0.998653 -0.051878 -0.000000
    +vn 0.979302 -0.052142 0.195574
    +vn 0.587999 0.800267 0.117600
    +vn 0.587999 0.800267 0.117600
    +vn 0.600000 0.800000 0.000000
    +vn 0.998653 -0.051878 -0.000000
    +vn 0.979302 -0.052142 0.195574
    +vn 0.921927 -0.052662 0.383767
    +vn 0.552961 0.800718 0.230400
    +vn 0.552961 0.800718 0.230400
    +vn 0.587999 0.800267 0.117600
    +vn 0.979302 -0.052142 0.195574
    +vn 0.921927 -0.052662 0.383767
    +vn 0.829494 -0.053108 0.555984
    +vn 0.497156 0.801055 0.333387
    +vn 0.497156 0.801055 0.333387
    +vn 0.552961 0.800718 0.230400
    +vn 0.921927 -0.052662 0.383767
    +vn 0.829494 -0.053108 0.555984
    +vn 0.706102 -0.053279 0.706102
    +vn 0.423155 0.801174 0.423155
    +vn 0.423155 0.801174 0.423155
    +vn 0.497156 0.801055 0.333387
    +vn 0.829494 -0.053108 0.555984
    +vn 0.706102 -0.053279 0.706102
    +vn 0.555984 -0.053108 0.829494
    +vn 0.333387 0.801055 0.497156
    +vn 0.333387 0.801055 0.497156
    +vn 0.423155 0.801174 0.423155
    +vn 0.706102 -0.053279 0.706102
    +vn 0.555984 -0.053108 0.829494
    +vn 0.383767 -0.052662 0.921927
    +vn 0.230400 0.800718 0.552961
    +vn 0.230400 0.800718 0.552961
    +vn 0.333387 0.801055 0.497156
    +vn 0.555984 -0.053108 0.829494
    +vn 0.383767 -0.052662 0.921927
    +vn 0.195574 -0.052142 0.979302
    +vn 0.117600 0.800267 0.587999
    +vn 0.117600 0.800267 0.587999
    +vn 0.230400 0.800718 0.552961
    +vn 0.383767 -0.052662 0.921927
    +vn 0.195574 -0.052142 0.979302
    +vn -0.000000 -0.051878 0.998653
    +vn -0.000000 0.800000 0.600000
    +vn -0.000000 0.800000 0.600000
    +vn 0.117600 0.800267 0.587999
    +vn 0.195574 -0.052142 0.979302
    +vn -0.029652 0.988337 0.149366
    +vn 0.000000 0.988311 0.152452
    +vn 0.000000 1.000000 0.000000
    +vn -0.058209 0.988384 0.140386
    +vn -0.029652 0.988337 0.149366
    +vn 0.000000 1.000000 0.000000
    +vn -0.084370 0.988421 0.126119
    +vn -0.058209 0.988384 0.140386
    +vn 0.000000 1.000000 0.000000
    +vn -0.107234 0.988434 0.107234
    +vn -0.084370 0.988421 0.126119
    +vn 0.000000 1.000000 0.000000
    +vn -0.126119 0.988421 0.084370
    +vn -0.107234 0.988434 0.107234
    +vn 0.000000 1.000000 0.000000
    +vn -0.140386 0.988384 0.058209
    +vn -0.126119 0.988421 0.084370
    +vn 0.000000 1.000000 0.000000
    +vn -0.149366 0.988337 0.029652
    +vn -0.140386 0.988384 0.058209
    +vn 0.000000 1.000000 0.000000
    +vn -0.152452 0.988311 0.000000
    +vn -0.149366 0.988337 0.029652
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.988311 0.152452
    +vn -0.029652 0.988337 0.149366
    +vn -0.116752 0.800327 0.588086
    +vn -0.116752 0.800327 0.588086
    +vn 0.000000 0.800000 0.600000
    +vn 0.000000 0.988311 0.152452
    +vn -0.029652 0.988337 0.149366
    +vn -0.058209 0.988384 0.140386
    +vn -0.229354 0.800907 0.553123
    +vn -0.229354 0.800907 0.553123
    +vn -0.116752 0.800327 0.588086
    +vn -0.029652 0.988337 0.149366
    +vn -0.058209 0.988384 0.140386
    +vn -0.084370 0.988421 0.126119
    +vn -0.332609 0.801359 0.497187
    +vn -0.332609 0.801359 0.497187
    +vn -0.229354 0.800907 0.553123
    +vn -0.058209 0.988384 0.140386
    +vn -0.084370 0.988421 0.126119
    +vn -0.107234 0.988434 0.107234
    +vn -0.422824 0.801523 0.422824
    +vn -0.422824 0.801523 0.422824
    +vn -0.332609 0.801359 0.497187
    +vn -0.084370 0.988421 0.126119
    +vn -0.107234 0.988434 0.107234
    +vn -0.126119 0.988421 0.084370
    +vn -0.497187 0.801359 0.332609
    +vn -0.497187 0.801359 0.332609
    +vn -0.422824 0.801523 0.422824
    +vn -0.107234 0.988434 0.107234
    +vn -0.126119 0.988421 0.084370
    +vn -0.140386 0.988384 0.058209
    +vn -0.553123 0.800907 0.229354
    +vn -0.553123 0.800907 0.229354
    +vn -0.497187 0.801359 0.332609
    +vn -0.126119 0.988421 0.084370
    +vn -0.140386 0.988384 0.058209
    +vn -0.149366 0.988337 0.029652
    +vn -0.588086 0.800327 0.116752
    +vn -0.588086 0.800327 0.116752
    +vn -0.553123 0.800907 0.229354
    +vn -0.140386 0.988384 0.058209
    +vn -0.149366 0.988337 0.029652
    +vn -0.152452 0.988311 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.588086 0.800327 0.116752
    +vn -0.149366 0.988337 0.029652
    +vn 0.000000 0.800000 0.600000
    +vn -0.116752 0.800327 0.588086
    +vn -0.190490 -0.208184 0.959361
    +vn -0.190490 -0.208184 0.959361
    +vn 0.000000 -0.207915 0.978147
    +vn 0.000000 0.800000 0.600000
    +vn -0.116752 0.800327 0.588086
    +vn -0.229354 0.800907 0.553123
    +vn -0.374629 -0.208673 0.903387
    +vn -0.374629 -0.208673 0.903387
    +vn -0.190490 -0.208184 0.959361
    +vn -0.116752 0.800327 0.588086
    +vn -0.229354 0.800907 0.553123
    +vn -0.332609 0.801359 0.497187
    +vn -0.543762 -0.209064 0.812782
    +vn -0.543762 -0.209064 0.812782
    +vn -0.374629 -0.208673 0.903387
    +vn -0.229354 0.800907 0.553123
    +vn -0.332609 0.801359 0.497187
    +vn -0.422824 0.801523 0.422824
    +vn -0.691459 -0.209208 0.691459
    +vn -0.691459 -0.209208 0.691459
    +vn -0.543762 -0.209064 0.812782
    +vn -0.332609 0.801359 0.497187
    +vn -0.422824 0.801523 0.422824
    +vn -0.497187 0.801359 0.332609
    +vn -0.812782 -0.209064 0.543762
    +vn -0.812782 -0.209064 0.543762
    +vn -0.691459 -0.209208 0.691459
    +vn -0.422824 0.801523 0.422824
    +vn -0.497187 0.801359 0.332609
    +vn -0.553123 0.800907 0.229354
    +vn -0.903387 -0.208673 0.374629
    +vn -0.903387 -0.208673 0.374629
    +vn -0.812782 -0.209064 0.543762
    +vn -0.497187 0.801359 0.332609
    +vn -0.553123 0.800907 0.229354
    +vn -0.588086 0.800327 0.116752
    +vn -0.959361 -0.208184 0.190490
    +vn -0.959361 -0.208184 0.190490
    +vn -0.903387 -0.208673 0.374629
    +vn -0.553123 0.800907 0.229354
    +vn -0.588086 0.800327 0.116752
    +vn -0.600000 0.800000 0.000000
    +vn -0.978147 -0.207915 0.000000
    +vn -0.978147 -0.207915 0.000000
    +vn -0.959361 -0.208184 0.190490
    +vn -0.588086 0.800327 0.116752
    +vn 0.000000 -0.207915 0.978147
    +vn -0.190490 -0.208184 0.959361
    +vn -0.152058 -0.625166 0.765536
    +vn -0.152058 -0.625166 0.765536
    +vn 0.000000 -0.624695 0.780869
    +vn 0.000000 -0.207915 0.978147
    +vn -0.190490 -0.208184 0.959361
    +vn -0.374629 -0.208673 0.903387
    +vn -0.298777 -0.626010 0.720308
    +vn -0.298777 -0.626010 0.720308
    +vn -0.152058 -0.625166 0.765536
    +vn -0.190490 -0.208184 0.959361
    +vn -0.374629 -0.208673 0.903387
    +vn -0.543762 -0.209064 0.812782
    +vn -0.433353 -0.626676 0.647675
    +vn -0.433353 -0.626676 0.647675
    +vn -0.298777 -0.626010 0.720308
    +vn -0.374629 -0.208673 0.903387
    +vn -0.543762 -0.209064 0.812782
    +vn -0.691459 -0.209208 0.691459
    +vn -0.550896 -0.626919 0.550896
    +vn -0.550896 -0.626919 0.550896
    +vn -0.433353 -0.626676 0.647675
    +vn -0.543762 -0.209064 0.812782
    +vn -0.691459 -0.209208 0.691459
    +vn -0.812782 -0.209064 0.543762
    +vn -0.647675 -0.626676 0.433353
    +vn -0.647675 -0.626676 0.433353
    +vn -0.550896 -0.626919 0.550896
    +vn -0.691459 -0.209208 0.691459
    +vn -0.812782 -0.209064 0.543762
    +vn -0.903387 -0.208673 0.374629
    +vn -0.720308 -0.626010 0.298777
    +vn -0.720308 -0.626010 0.298777
    +vn -0.647675 -0.626676 0.433353
    +vn -0.812782 -0.209064 0.543762
    +vn -0.903387 -0.208673 0.374629
    +vn -0.959361 -0.208184 0.190490
    +vn -0.765536 -0.625166 0.152058
    +vn -0.765536 -0.625166 0.152058
    +vn -0.720308 -0.626010 0.298777
    +vn -0.903387 -0.208673 0.374629
    +vn -0.959361 -0.208184 0.190490
    +vn -0.978147 -0.207915 0.000000
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.765536 -0.625166 0.152058
    +vn -0.959361 -0.208184 0.190490
    +vn 0.000000 -0.624695 0.780869
    +vn -0.152058 -0.625166 0.765536
    +vn -0.143016 -0.679697 0.719416
    +vn -0.143016 -0.679697 0.719416
    +vn 0.000000 -0.679236 0.733920
    +vn 0.000000 -0.624695 0.780869
    +vn -0.152058 -0.625166 0.765536
    +vn -0.298777 -0.626010 0.720308
    +vn -0.280866 -0.680523 0.676759
    +vn -0.280866 -0.680523 0.676759
    +vn -0.143016 -0.679697 0.719416
    +vn -0.152058 -0.625166 0.765536
    +vn -0.298777 -0.626010 0.720308
    +vn -0.433353 -0.626676 0.647675
    +vn -0.407203 -0.681176 0.608429
    +vn -0.407203 -0.681176 0.608429
    +vn -0.280866 -0.680523 0.676759
    +vn -0.298777 -0.626010 0.720308
    +vn -0.433353 -0.626676 0.647675
    +vn -0.550896 -0.626919 0.550896
    +vn -0.517530 -0.681414 0.517530
    +vn -0.517530 -0.681414 0.517530
    +vn -0.407203 -0.681176 0.608429
    +vn -0.433353 -0.626676 0.647675
    +vn -0.550896 -0.626919 0.550896
    +vn -0.647675 -0.626676 0.433353
    +vn -0.608429 -0.681176 0.407203
    +vn -0.608429 -0.681176 0.407203
    +vn -0.517530 -0.681414 0.517530
    +vn -0.550896 -0.626919 0.550896
    +vn -0.647675 -0.626676 0.433353
    +vn -0.720308 -0.626010 0.298777
    +vn -0.676759 -0.680523 0.280866
    +vn -0.676759 -0.680523 0.280866
    +vn -0.608429 -0.681176 0.407203
    +vn -0.647675 -0.626676 0.433353
    +vn -0.720308 -0.626010 0.298777
    +vn -0.765536 -0.625166 0.152058
    +vn -0.719416 -0.679697 0.143016
    +vn -0.719416 -0.679697 0.143016
    +vn -0.676759 -0.680523 0.280866
    +vn -0.720308 -0.626010 0.298777
    +vn -0.765536 -0.625166 0.152058
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.719416 -0.679697 0.143016
    +vn -0.765536 -0.625166 0.152058
    +vn 0.000000 -0.679236 0.733920
    +vn -0.143016 -0.679697 0.719416
    +vn -0.160057 -0.573111 0.803695
    +vn -0.160057 -0.573111 0.803695
    +vn 0.000000 -0.572589 0.819843
    +vn 0.000000 -0.679236 0.733920
    +vn -0.143016 -0.679697 0.719416
    +vn -0.280866 -0.680523 0.676759
    +vn -0.314181 -0.574055 0.756142
    +vn -0.314181 -0.574055 0.756142
    +vn -0.160057 -0.573111 0.803695
    +vn -0.143016 -0.679697 0.719416
    +vn -0.280866 -0.680523 0.676759
    +vn -0.407203 -0.681176 0.608429
    +vn -0.455314 -0.574807 0.679917
    +vn -0.455314 -0.574807 0.679917
    +vn -0.314181 -0.574055 0.756142
    +vn -0.280866 -0.680523 0.676759
    +vn -0.407203 -0.681176 0.608429
    +vn -0.517530 -0.681414 0.517530
    +vn -0.578481 -0.575083 0.578481
    +vn -0.578481 -0.575083 0.578481
    +vn -0.455314 -0.574807 0.679917
    +vn -0.407203 -0.681176 0.608429
    +vn -0.517530 -0.681414 0.517530
    +vn -0.608429 -0.681176 0.407203
    +vn -0.679917 -0.574807 0.455314
    +vn -0.679917 -0.574807 0.455314
    +vn -0.578481 -0.575083 0.578481
    +vn -0.517530 -0.681414 0.517530
    +vn -0.608429 -0.681176 0.407203
    +vn -0.676759 -0.680523 0.280866
    +vn -0.756142 -0.574055 0.314181
    +vn -0.756142 -0.574055 0.314181
    +vn -0.679917 -0.574807 0.455314
    +vn -0.608429 -0.681176 0.407203
    +vn -0.676759 -0.680523 0.280866
    +vn -0.719416 -0.679697 0.143016
    +vn -0.803695 -0.573111 0.160057
    +vn -0.803695 -0.573111 0.160057
    +vn -0.756142 -0.574055 0.314181
    +vn -0.676759 -0.680523 0.280866
    +vn -0.719416 -0.679697 0.143016
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.803695 -0.573111 0.160057
    +vn -0.719416 -0.679697 0.143016
    +vn 0.000000 -0.572589 0.819843
    +vn -0.160057 -0.573111 0.803695
    +vn -0.195574 -0.052142 0.979302
    +vn -0.195574 -0.052142 0.979302
    +vn 0.000000 -0.051878 0.998653
    +vn 0.000000 -0.572589 0.819843
    +vn -0.160057 -0.573111 0.803695
    +vn -0.314181 -0.574055 0.756142
    +vn -0.383767 -0.052662 0.921927
    +vn -0.383767 -0.052662 0.921927
    +vn -0.195574 -0.052142 0.979302
    +vn -0.160057 -0.573111 0.803695
    +vn -0.314181 -0.574055 0.756142
    +vn -0.455314 -0.574807 0.679917
    +vn -0.555984 -0.053108 0.829494
    +vn -0.555984 -0.053108 0.829494
    +vn -0.383767 -0.052662 0.921927
    +vn -0.314181 -0.574055 0.756142
    +vn -0.455314 -0.574807 0.679917
    +vn -0.578481 -0.575083 0.578481
    +vn -0.706102 -0.053279 0.706102
    +vn -0.706102 -0.053279 0.706102
    +vn -0.555984 -0.053108 0.829494
    +vn -0.455314 -0.574807 0.679917
    +vn -0.578481 -0.575083 0.578481
    +vn -0.679917 -0.574807 0.455314
    +vn -0.829494 -0.053108 0.555984
    +vn -0.829494 -0.053108 0.555984
    +vn -0.706102 -0.053279 0.706102
    +vn -0.578481 -0.575083 0.578481
    +vn -0.679917 -0.574807 0.455314
    +vn -0.756142 -0.574055 0.314181
    +vn -0.921927 -0.052662 0.383767
    +vn -0.921927 -0.052662 0.383767
    +vn -0.829494 -0.053108 0.555984
    +vn -0.679917 -0.574807 0.455314
    +vn -0.756142 -0.574055 0.314181
    +vn -0.803695 -0.573111 0.160057
    +vn -0.979302 -0.052142 0.195574
    +vn -0.979302 -0.052142 0.195574
    +vn -0.921927 -0.052662 0.383767
    +vn -0.756142 -0.574055 0.314181
    +vn -0.803695 -0.573111 0.160057
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.979302 -0.052142 0.195574
    +vn -0.803695 -0.573111 0.160057
    +vn 0.000000 -0.051878 0.998653
    +vn -0.195574 -0.052142 0.979302
    +vn -0.117600 0.800267 0.587999
    +vn -0.117600 0.800267 0.587999
    +vn 0.000000 0.800000 0.600000
    +vn 0.000000 -0.051878 0.998653
    +vn -0.195574 -0.052142 0.979302
    +vn -0.383767 -0.052662 0.921927
    +vn -0.230400 0.800718 0.552961
    +vn -0.230400 0.800718 0.552961
    +vn -0.117600 0.800267 0.587999
    +vn -0.195574 -0.052142 0.979302
    +vn -0.383767 -0.052662 0.921927
    +vn -0.555984 -0.053108 0.829494
    +vn -0.333387 0.801055 0.497156
    +vn -0.333387 0.801055 0.497156
    +vn -0.230400 0.800718 0.552961
    +vn -0.383767 -0.052662 0.921927
    +vn -0.555984 -0.053108 0.829494
    +vn -0.706102 -0.053279 0.706102
    +vn -0.423155 0.801174 0.423155
    +vn -0.423155 0.801174 0.423155
    +vn -0.333387 0.801055 0.497156
    +vn -0.555984 -0.053108 0.829494
    +vn -0.706102 -0.053279 0.706102
    +vn -0.829494 -0.053108 0.555984
    +vn -0.497156 0.801055 0.333387
    +vn -0.497156 0.801055 0.333387
    +vn -0.423155 0.801174 0.423155
    +vn -0.706102 -0.053279 0.706102
    +vn -0.829494 -0.053108 0.555984
    +vn -0.921927 -0.052662 0.383767
    +vn -0.552961 0.800718 0.230400
    +vn -0.552961 0.800718 0.230400
    +vn -0.497156 0.801055 0.333387
    +vn -0.829494 -0.053108 0.555984
    +vn -0.921927 -0.052662 0.383767
    +vn -0.979302 -0.052142 0.195574
    +vn -0.587999 0.800267 0.117600
    +vn -0.587999 0.800267 0.117600
    +vn -0.552961 0.800718 0.230400
    +vn -0.921927 -0.052662 0.383767
    +vn -0.979302 -0.052142 0.195574
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.600000 0.800000 -0.000000
    +vn -0.600000 0.800000 -0.000000
    +vn -0.587999 0.800267 0.117600
    +vn -0.979302 -0.052142 0.195574
    +vn -0.149366 0.988337 -0.029652
    +vn -0.152452 0.988311 0.000000
    +vn 0.000000 1.000000 0.000000
    +vn -0.140386 0.988384 -0.058209
    +vn -0.149366 0.988337 -0.029652
    +vn 0.000000 1.000000 0.000000
    +vn -0.126119 0.988421 -0.084370
    +vn -0.140386 0.988384 -0.058209
    +vn 0.000000 1.000000 0.000000
    +vn -0.107234 0.988434 -0.107234
    +vn -0.126119 0.988421 -0.084370
    +vn 0.000000 1.000000 0.000000
    +vn -0.084370 0.988421 -0.126119
    +vn -0.107234 0.988434 -0.107234
    +vn 0.000000 1.000000 0.000000
    +vn -0.058209 0.988384 -0.140386
    +vn -0.084370 0.988421 -0.126119
    +vn 0.000000 1.000000 0.000000
    +vn -0.029652 0.988337 -0.149366
    +vn -0.058209 0.988384 -0.140386
    +vn 0.000000 1.000000 0.000000
    +vn -0.000000 0.988311 -0.152452
    +vn -0.029652 0.988337 -0.149366
    +vn 0.000000 1.000000 0.000000
    +vn -0.152452 0.988311 0.000000
    +vn -0.149366 0.988337 -0.029652
    +vn -0.588086 0.800327 -0.116752
    +vn -0.588086 0.800327 -0.116752
    +vn -0.600000 0.800000 0.000000
    +vn -0.152452 0.988311 0.000000
    +vn -0.149366 0.988337 -0.029652
    +vn -0.140386 0.988384 -0.058209
    +vn -0.553123 0.800907 -0.229354
    +vn -0.553123 0.800907 -0.229354
    +vn -0.588086 0.800327 -0.116752
    +vn -0.149366 0.988337 -0.029652
    +vn -0.140386 0.988384 -0.058209
    +vn -0.126119 0.988421 -0.084370
    +vn -0.497187 0.801359 -0.332609
    +vn -0.497187 0.801359 -0.332609
    +vn -0.553123 0.800907 -0.229354
    +vn -0.140386 0.988384 -0.058209
    +vn -0.126119 0.988421 -0.084370
    +vn -0.107234 0.988434 -0.107234
    +vn -0.422824 0.801523 -0.422824
    +vn -0.422824 0.801523 -0.422824
    +vn -0.497187 0.801359 -0.332609
    +vn -0.126119 0.988421 -0.084370
    +vn -0.107234 0.988434 -0.107234
    +vn -0.084370 0.988421 -0.126119
    +vn -0.332609 0.801359 -0.497187
    +vn -0.332609 0.801359 -0.497187
    +vn -0.422824 0.801523 -0.422824
    +vn -0.107234 0.988434 -0.107234
    +vn -0.084370 0.988421 -0.126119
    +vn -0.058209 0.988384 -0.140386
    +vn -0.229354 0.800907 -0.553123
    +vn -0.229354 0.800907 -0.553123
    +vn -0.332609 0.801359 -0.497187
    +vn -0.084370 0.988421 -0.126119
    +vn -0.058209 0.988384 -0.140386
    +vn -0.029652 0.988337 -0.149366
    +vn -0.116752 0.800327 -0.588086
    +vn -0.116752 0.800327 -0.588086
    +vn -0.229354 0.800907 -0.553123
    +vn -0.058209 0.988384 -0.140386
    +vn -0.029652 0.988337 -0.149366
    +vn -0.000000 0.988311 -0.152452
    +vn -0.000000 0.800000 -0.600000
    +vn -0.000000 0.800000 -0.600000
    +vn -0.116752 0.800327 -0.588086
    +vn -0.029652 0.988337 -0.149366
    +vn -0.600000 0.800000 0.000000
    +vn -0.588086 0.800327 -0.116752
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.978147 -0.207915 -0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.588086 0.800327 -0.116752
    +vn -0.553123 0.800907 -0.229354
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.588086 0.800327 -0.116752
    +vn -0.553123 0.800907 -0.229354
    +vn -0.497187 0.801359 -0.332609
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.553123 0.800907 -0.229354
    +vn -0.497187 0.801359 -0.332609
    +vn -0.422824 0.801523 -0.422824
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.497187 0.801359 -0.332609
    +vn -0.422824 0.801523 -0.422824
    +vn -0.332609 0.801359 -0.497187
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.422824 0.801523 -0.422824
    +vn -0.332609 0.801359 -0.497187
    +vn -0.229354 0.800907 -0.553123
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.332609 0.801359 -0.497187
    +vn -0.229354 0.800907 -0.553123
    +vn -0.116752 0.800327 -0.588086
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.229354 0.800907 -0.553123
    +vn -0.116752 0.800327 -0.588086
    +vn -0.000000 0.800000 -0.600000
    +vn -0.000000 -0.207915 -0.978147
    +vn -0.000000 -0.207915 -0.978147
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.116752 0.800327 -0.588086
    +vn -0.978147 -0.207915 -0.000000
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.978147 -0.207915 -0.000000
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.959361 -0.208184 -0.190490
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.903387 -0.208673 -0.374629
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.812782 -0.209064 -0.543762
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.691459 -0.209208 -0.691459
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.543762 -0.209064 -0.812782
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.374629 -0.208673 -0.903387
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.000000 -0.207915 -0.978147
    +vn -0.000000 -0.624695 -0.780869
    +vn -0.000000 -0.624695 -0.780869
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.190490 -0.208184 -0.959361
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.780869 -0.624695 -0.000000
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.765536 -0.625166 -0.152058
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.720308 -0.626010 -0.298777
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.647675 -0.626676 -0.433353
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.550896 -0.626919 -0.550896
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.433353 -0.626676 -0.647675
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.143016 -0.679697 -0.719416
    +vn -0.143016 -0.679697 -0.719416
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.298777 -0.626010 -0.720308
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.000000 -0.624695 -0.780869
    +vn 0.000000 -0.679236 -0.733920
    +vn 0.000000 -0.679236 -0.733920
    +vn -0.143016 -0.679697 -0.719416
    +vn -0.152058 -0.625166 -0.765536
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.733920 -0.679236 -0.000000
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.719416 -0.679697 -0.143016
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.676759 -0.680523 -0.280866
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.608429 -0.681176 -0.407203
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.517530 -0.681414 -0.517530
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.407203 -0.681176 -0.608429
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.143016 -0.679697 -0.719416
    +vn -0.160057 -0.573111 -0.803695
    +vn -0.160057 -0.573111 -0.803695
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.280866 -0.680523 -0.676759
    +vn -0.143016 -0.679697 -0.719416
    +vn 0.000000 -0.679236 -0.733920
    +vn 0.000000 -0.572589 -0.819843
    +vn 0.000000 -0.572589 -0.819843
    +vn -0.160057 -0.573111 -0.803695
    +vn -0.143016 -0.679697 -0.719416
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.819843 -0.572589 -0.000000
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.803695 -0.573111 -0.160057
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.756142 -0.574055 -0.314181
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.679917 -0.574807 -0.455314
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.578481 -0.575083 -0.578481
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.455314 -0.574807 -0.679917
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.160057 -0.573111 -0.803695
    +vn -0.195574 -0.052142 -0.979302
    +vn -0.195574 -0.052142 -0.979302
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.314181 -0.574055 -0.756142
    +vn -0.160057 -0.573111 -0.803695
    +vn 0.000000 -0.572589 -0.819843
    +vn 0.000000 -0.051878 -0.998653
    +vn 0.000000 -0.051878 -0.998653
    +vn -0.195574 -0.052142 -0.979302
    +vn -0.160057 -0.573111 -0.803695
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.587999 0.800267 -0.117600
    +vn -0.587999 0.800267 -0.117600
    +vn -0.600000 0.800000 0.000000
    +vn -0.998653 -0.051878 -0.000000
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.552961 0.800718 -0.230400
    +vn -0.552961 0.800718 -0.230400
    +vn -0.587999 0.800267 -0.117600
    +vn -0.979302 -0.052142 -0.195574
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.497156 0.801055 -0.333387
    +vn -0.497156 0.801055 -0.333387
    +vn -0.552961 0.800718 -0.230400
    +vn -0.921927 -0.052662 -0.383767
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.423155 0.801174 -0.423155
    +vn -0.423155 0.801174 -0.423155
    +vn -0.497156 0.801055 -0.333387
    +vn -0.829494 -0.053108 -0.555984
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.333387 0.801055 -0.497156
    +vn -0.333387 0.801055 -0.497156
    +vn -0.423155 0.801174 -0.423155
    +vn -0.706102 -0.053279 -0.706102
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.230400 0.800718 -0.552961
    +vn -0.230400 0.800718 -0.552961
    +vn -0.333387 0.801055 -0.497156
    +vn -0.555984 -0.053108 -0.829494
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.195574 -0.052142 -0.979302
    +vn -0.117600 0.800267 -0.587999
    +vn -0.117600 0.800267 -0.587999
    +vn -0.230400 0.800718 -0.552961
    +vn -0.383767 -0.052662 -0.921927
    +vn -0.195574 -0.052142 -0.979302
    +vn 0.000000 -0.051878 -0.998653
    +vn 0.000000 0.800000 -0.600000
    +vn 0.000000 0.800000 -0.600000
    +vn -0.117600 0.800267 -0.587999
    +vn -0.195574 -0.052142 -0.979302
    +vn 0.029652 0.988337 -0.149366
    +vn 0.000000 0.988311 -0.152452
    +vn 0.000000 1.000000 0.000000
    +vn 0.058209 0.988384 -0.140386
    +vn 0.029652 0.988337 -0.149366
    +vn 0.000000 1.000000 0.000000
    +vn 0.084370 0.988421 -0.126119
    +vn 0.058209 0.988384 -0.140386
    +vn 0.000000 1.000000 0.000000
    +vn 0.107234 0.988434 -0.107234
    +vn 0.084370 0.988421 -0.126119
    +vn 0.000000 1.000000 0.000000
    +vn 0.126119 0.988421 -0.084370
    +vn 0.107234 0.988434 -0.107234
    +vn 0.000000 1.000000 0.000000
    +vn 0.140386 0.988384 -0.058209
    +vn 0.126119 0.988421 -0.084370
    +vn 0.000000 1.000000 0.000000
    +vn 0.149366 0.988337 -0.029652
    +vn 0.140386 0.988384 -0.058209
    +vn 0.000000 1.000000 0.000000
    +vn 0.152452 0.988311 0.000000
    +vn 0.149366 0.988337 -0.029652
    +vn 0.000000 1.000000 0.000000
    +vn 0.000000 0.988311 -0.152452
    +vn 0.029652 0.988337 -0.149366
    +vn 0.116752 0.800327 -0.588086
    +vn 0.116752 0.800327 -0.588086
    +vn 0.000000 0.800000 -0.600000
    +vn 0.000000 0.988311 -0.152452
    +vn 0.029652 0.988337 -0.149366
    +vn 0.058209 0.988384 -0.140386
    +vn 0.229354 0.800907 -0.553123
    +vn 0.229354 0.800907 -0.553123
    +vn 0.116752 0.800327 -0.588086
    +vn 0.029652 0.988337 -0.149366
    +vn 0.058209 0.988384 -0.140386
    +vn 0.084370 0.988421 -0.126119
    +vn 0.332609 0.801359 -0.497187
    +vn 0.332609 0.801359 -0.497187
    +vn 0.229354 0.800907 -0.553123
    +vn 0.058209 0.988384 -0.140386
    +vn 0.084370 0.988421 -0.126119
    +vn 0.107234 0.988434 -0.107234
    +vn 0.422824 0.801523 -0.422824
    +vn 0.422824 0.801523 -0.422824
    +vn 0.332609 0.801359 -0.497187
    +vn 0.084370 0.988421 -0.126119
    +vn 0.107234 0.988434 -0.107234
    +vn 0.126119 0.988421 -0.084370
    +vn 0.497187 0.801359 -0.332609
    +vn 0.497187 0.801359 -0.332609
    +vn 0.422824 0.801523 -0.422824
    +vn 0.107234 0.988434 -0.107234
    +vn 0.126119 0.988421 -0.084370
    +vn 0.140386 0.988384 -0.058209
    +vn 0.553123 0.800907 -0.229354
    +vn 0.553123 0.800907 -0.229354
    +vn 0.497187 0.801359 -0.332609
    +vn 0.126119 0.988421 -0.084370
    +vn 0.140386 0.988384 -0.058209
    +vn 0.149366 0.988337 -0.029652
    +vn 0.588086 0.800327 -0.116752
    +vn 0.588086 0.800327 -0.116752
    +vn 0.553123 0.800907 -0.229354
    +vn 0.140386 0.988384 -0.058209
    +vn 0.149366 0.988337 -0.029652
    +vn 0.152452 0.988311 0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.588086 0.800327 -0.116752
    +vn 0.149366 0.988337 -0.029652
    +vn 0.000000 0.800000 -0.600000
    +vn 0.116752 0.800327 -0.588086
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.000000 -0.207915 -0.978147
    +vn 0.000000 0.800000 -0.600000
    +vn 0.116752 0.800327 -0.588086
    +vn 0.229354 0.800907 -0.553123
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.116752 0.800327 -0.588086
    +vn 0.229354 0.800907 -0.553123
    +vn 0.332609 0.801359 -0.497187
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.229354 0.800907 -0.553123
    +vn 0.332609 0.801359 -0.497187
    +vn 0.422824 0.801523 -0.422824
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.332609 0.801359 -0.497187
    +vn 0.422824 0.801523 -0.422824
    +vn 0.497187 0.801359 -0.332609
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.422824 0.801523 -0.422824
    +vn 0.497187 0.801359 -0.332609
    +vn 0.553123 0.800907 -0.229354
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.497187 0.801359 -0.332609
    +vn 0.553123 0.800907 -0.229354
    +vn 0.588086 0.800327 -0.116752
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.553123 0.800907 -0.229354
    +vn 0.588086 0.800327 -0.116752
    +vn 0.600000 0.800000 0.000000
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.588086 0.800327 -0.116752
    +vn 0.000000 -0.207915 -0.978147
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.000000 -0.624695 -0.780869
    +vn 0.000000 -0.207915 -0.978147
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.190490 -0.208184 -0.959361
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.374629 -0.208673 -0.903387
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.543762 -0.209064 -0.812782
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.691459 -0.209208 -0.691459
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.812782 -0.209064 -0.543762
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.903387 -0.208673 -0.374629
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.978147 -0.207915 -0.000000
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.959361 -0.208184 -0.190490
    +vn 0.000000 -0.624695 -0.780869
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.000000 -0.679236 -0.733920
    +vn 0.000000 -0.624695 -0.780869
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.152058 -0.625166 -0.765536
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.298777 -0.626010 -0.720308
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.433353 -0.626676 -0.647675
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.550896 -0.626919 -0.550896
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.647675 -0.626676 -0.433353
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.720308 -0.626010 -0.298777
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.780869 -0.624695 -0.000000
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.765536 -0.625166 -0.152058
    +vn 0.000000 -0.679236 -0.733920
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.000000 -0.572589 -0.819843
    +vn 0.000000 -0.679236 -0.733920
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.143016 -0.679697 -0.719416
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.280866 -0.680523 -0.676759
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.407203 -0.681176 -0.608429
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.517530 -0.681414 -0.517530
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.608429 -0.681176 -0.407203
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.676759 -0.680523 -0.280866
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.733920 -0.679236 -0.000000
    +vn 0.819843 -0.572589 0.000000
    +vn 0.819843 -0.572589 0.000000
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.719416 -0.679697 -0.143016
    +vn 0.000000 -0.572589 -0.819843
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.000000 -0.051878 -0.998653
    +vn 0.000000 -0.572589 -0.819843
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.160057 -0.573111 -0.803695
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.314181 -0.574055 -0.756142
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.455314 -0.574807 -0.679917
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.578481 -0.575083 -0.578481
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.679917 -0.574807 -0.455314
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.756142 -0.574055 -0.314181
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.819843 -0.572589 0.000000
    +vn 0.998653 -0.051878 0.000000
    +vn 0.998653 -0.051878 0.000000
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.803695 -0.573111 -0.160057
    +vn 0.000000 -0.051878 -0.998653
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.117600 0.800267 -0.587999
    +vn 0.117600 0.800267 -0.587999
    +vn 0.000000 0.800000 -0.600000
    +vn 0.000000 -0.051878 -0.998653
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.230400 0.800718 -0.552961
    +vn 0.230400 0.800718 -0.552961
    +vn 0.117600 0.800267 -0.587999
    +vn 0.195574 -0.052142 -0.979302
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.333387 0.801055 -0.497156
    +vn 0.333387 0.801055 -0.497156
    +vn 0.230400 0.800718 -0.552961
    +vn 0.383767 -0.052662 -0.921927
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.423155 0.801174 -0.423155
    +vn 0.423155 0.801174 -0.423155
    +vn 0.333387 0.801055 -0.497156
    +vn 0.555984 -0.053108 -0.829494
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.497156 0.801055 -0.333387
    +vn 0.497156 0.801055 -0.333387
    +vn 0.423155 0.801174 -0.423155
    +vn 0.706102 -0.053279 -0.706102
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.552961 0.800718 -0.230400
    +vn 0.552961 0.800718 -0.230400
    +vn 0.497156 0.801055 -0.333387
    +vn 0.829494 -0.053108 -0.555984
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.587999 0.800267 -0.117600
    +vn 0.587999 0.800267 -0.117600
    +vn 0.552961 0.800718 -0.230400
    +vn 0.921927 -0.052662 -0.383767
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.998653 -0.051878 0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.587999 0.800267 -0.117600
    +vn 0.979302 -0.052142 -0.195574
    +vn 0.600000 0.800000 0.000000
    +vn 0.587999 0.800267 0.117600
    +vn 0.311072 0.948348 0.062214
    +vn 0.311072 0.948348 0.062214
    +vn 0.317497 0.948259 0.000000
    +vn 0.600000 0.800000 0.000000
    +vn 0.587999 0.800267 0.117600
    +vn 0.552961 0.800718 0.230400
    +vn 0.292417 0.948497 0.121840
    +vn 0.292417 0.948497 0.121840
    +vn 0.311072 0.948348 0.062214
    +vn 0.587999 0.800267 0.117600
    +vn 0.552961 0.800718 0.230400
    +vn 0.497156 0.801055 0.333387
    +vn 0.262827 0.948609 0.176249
    +vn 0.262827 0.948609 0.176249
    +vn 0.292417 0.948497 0.121840
    +vn 0.552961 0.800718 0.230400
    +vn 0.497156 0.801055 0.333387
    +vn 0.423155 0.801174 0.423155
    +vn 0.223681 0.948648 0.223681
    +vn 0.223681 0.948648 0.223681
    +vn 0.262827 0.948609 0.176249
    +vn 0.497156 0.801055 0.333387
    +vn 0.423155 0.801174 0.423155
    +vn 0.333387 0.801055 0.497156
    +vn 0.176249 0.948609 0.262827
    +vn 0.176249 0.948609 0.262827
    +vn 0.223681 0.948648 0.223681
    +vn 0.423155 0.801174 0.423155
    +vn 0.333387 0.801055 0.497156
    +vn 0.230400 0.800718 0.552961
    +vn 0.121840 0.948497 0.292417
    +vn 0.121840 0.948497 0.292417
    +vn 0.176249 0.948609 0.262827
    +vn 0.333387 0.801055 0.497156
    +vn 0.230400 0.800718 0.552961
    +vn 0.117600 0.800267 0.587999
    +vn 0.062214 0.948348 0.311072
    +vn 0.062214 0.948348 0.311072
    +vn 0.121840 0.948497 0.292417
    +vn 0.230400 0.800718 0.552961
    +vn 0.117600 0.800267 0.587999
    +vn 0.000000 0.800000 0.600000
    +vn -0.000000 0.948259 0.317497
    +vn -0.000000 0.948259 0.317497
    +vn 0.062214 0.948348 0.311072
    +vn 0.117600 0.800267 0.587999
    +vn 0.317497 0.948259 0.000000
    +vn 0.311072 0.948348 0.062214
    +vn 0.199816 0.979018 0.039963
    +vn 0.199816 0.979018 0.039963
    +vn 0.203954 0.978980 0.000000
    +vn 0.317497 0.948259 0.000000
    +vn 0.311072 0.948348 0.062214
    +vn 0.292417 0.948497 0.121840
    +vn 0.187815 0.979082 0.078256
    +vn 0.187815 0.979082 0.078256
    +vn 0.199816 0.979018 0.039963
    +vn 0.311072 0.948348 0.062214
    +vn 0.292417 0.948497 0.121840
    +vn 0.262827 0.948609 0.176249
    +vn 0.168798 0.979129 0.113194
    +vn 0.168798 0.979129 0.113194
    +vn 0.187815 0.979082 0.078256
    +vn 0.292417 0.948497 0.121840
    +vn 0.262827 0.948609 0.176249
    +vn 0.223681 0.948648 0.223681
    +vn 0.143654 0.979146 0.143654
    +vn 0.143654 0.979146 0.143654
    +vn 0.168798 0.979129 0.113194
    +vn 0.262827 0.948609 0.176249
    +vn 0.223681 0.948648 0.223681
    +vn 0.176249 0.948609 0.262827
    +vn 0.113194 0.979129 0.168798
    +vn 0.113194 0.979129 0.168798
    +vn 0.143654 0.979146 0.143654
    +vn 0.223681 0.948648 0.223681
    +vn 0.176249 0.948609 0.262827
    +vn 0.121840 0.948497 0.292417
    +vn 0.078256 0.979082 0.187815
    +vn 0.078256 0.979082 0.187815
    +vn 0.113194 0.979129 0.168798
    +vn 0.176249 0.948609 0.262827
    +vn 0.121840 0.948497 0.292417
    +vn 0.062214 0.948348 0.311072
    +vn 0.039963 0.979018 0.199816
    +vn 0.039963 0.979018 0.199816
    +vn 0.078256 0.979082 0.187815
    +vn 0.121840 0.948497 0.292417
    +vn 0.062214 0.948348 0.311072
    +vn -0.000000 0.948259 0.317497
    +vn -0.000000 0.978980 0.203954
    +vn -0.000000 0.978980 0.203954
    +vn 0.039963 0.979018 0.199816
    +vn 0.062214 0.948348 0.311072
    +vn 0.203954 0.978980 0.000000
    +vn 0.199816 0.979018 0.039963
    +vn 0.154193 0.987559 0.030839
    +vn 0.154193 0.987559 0.030839
    +vn 0.157389 0.987537 0.000000
    +vn 0.203954 0.978980 0.000000
    +vn 0.199816 0.979018 0.039963
    +vn 0.187815 0.979082 0.078256
    +vn 0.144928 0.987598 0.060387
    +vn 0.144928 0.987598 0.060387
    +vn 0.154193 0.987559 0.030839
    +vn 0.199816 0.979018 0.039963
    +vn 0.187815 0.979082 0.078256
    +vn 0.168798 0.979129 0.113194
    +vn 0.130251 0.987626 0.087345
    +vn 0.130251 0.987626 0.087345
    +vn 0.144928 0.987598 0.060387
    +vn 0.187815 0.979082 0.078256
    +vn 0.168798 0.979129 0.113194
    +vn 0.143654 0.979146 0.143654
    +vn 0.110848 0.987636 0.110848
    +vn 0.110848 0.987636 0.110848
    +vn 0.130251 0.987626 0.087345
    +vn 0.168798 0.979129 0.113194
    +vn 0.143654 0.979146 0.143654
    +vn 0.113194 0.979129 0.168798
    +vn 0.087345 0.987626 0.130251
    +vn 0.087345 0.987626 0.130251
    +vn 0.110848 0.987636 0.110848
    +vn 0.143654 0.979146 0.143654
    +vn 0.113194 0.979129 0.168798
    +vn 0.078256 0.979082 0.187815
    +vn 0.060387 0.987598 0.144928
    +vn 0.060387 0.987598 0.144928
    +vn 0.087345 0.987626 0.130251
    +vn 0.113194 0.979129 0.168798
    +vn 0.078256 0.979082 0.187815
    +vn 0.039963 0.979018 0.199816
    +vn 0.030839 0.987559 0.154193
    +vn 0.030839 0.987559 0.154193
    +vn 0.060387 0.987598 0.144928
    +vn 0.078256 0.979082 0.187815
    +vn 0.039963 0.979018 0.199816
    +vn -0.000000 0.978980 0.203954
    +vn 0.000000 0.987537 0.157389
    +vn 0.000000 0.987537 0.157389
    +vn 0.030839 0.987559 0.154193
    +vn 0.039963 0.979018 0.199816
    +vn 0.157389 0.987537 0.000000
    +vn 0.154193 0.987559 0.030839
    +vn 0.145328 0.988957 0.029066
    +vn 0.145328 0.988957 0.029066
    +vn 0.148340 0.988936 0.000000
    +vn 0.157389 0.987537 0.000000
    +vn 0.154193 0.987559 0.030839
    +vn 0.144928 0.987598 0.060387
    +vn 0.136596 0.988991 0.056915
    +vn 0.136596 0.988991 0.056915
    +vn 0.145328 0.988957 0.029066
    +vn 0.154193 0.987559 0.030839
    +vn 0.144928 0.987598 0.060387
    +vn 0.130251 0.987626 0.087345
    +vn 0.122762 0.989016 0.082323
    +vn 0.122762 0.989016 0.082323
    +vn 0.136596 0.988991 0.056915
    +vn 0.144928 0.987598 0.060387
    +vn 0.130251 0.987626 0.087345
    +vn 0.110848 0.987636 0.110848
    +vn 0.104474 0.989025 0.104474
    +vn 0.104474 0.989025 0.104474
    +vn 0.122762 0.989016 0.082323
    +vn 0.130251 0.987626 0.087345
    +vn 0.110848 0.987636 0.110848
    +vn 0.087345 0.987626 0.130251
    +vn 0.082323 0.989016 0.122762
    +vn 0.082323 0.989016 0.122762
    +vn 0.104474 0.989025 0.104474
    +vn 0.110848 0.987636 0.110848
    +vn 0.087345 0.987626 0.130251
    +vn 0.060387 0.987598 0.144928
    +vn 0.056915 0.988991 0.136596
    +vn 0.056915 0.988991 0.136596
    +vn 0.082323 0.989016 0.122762
    +vn 0.087345 0.987626 0.130251
    +vn 0.060387 0.987598 0.144928
    +vn 0.030839 0.987559 0.154193
    +vn 0.029066 0.988957 0.145328
    +vn 0.029066 0.988957 0.145328
    +vn 0.056915 0.988991 0.136596
    +vn 0.060387 0.987598 0.144928
    +vn 0.030839 0.987559 0.154193
    +vn 0.000000 0.987537 0.157389
    +vn -0.000000 0.988936 0.148340
    +vn -0.000000 0.988936 0.148340
    +vn 0.029066 0.988957 0.145328
    +vn 0.030839 0.987559 0.154193
    +vn 0.148340 0.988936 0.000000
    +vn 0.145328 0.988957 0.029066
    +vn 0.170831 0.984708 0.034166
    +vn 0.170831 0.984708 0.034166
    +vn 0.174370 0.984680 0.000000
    +vn 0.148340 0.988936 0.000000
    +vn 0.145328 0.988957 0.029066
    +vn 0.136596 0.988991 0.056915
    +vn 0.160568 0.984755 0.066903
    +vn 0.160568 0.984755 0.066903
    +vn 0.170831 0.984708 0.034166
    +vn 0.145328 0.988957 0.029066
    +vn 0.136596 0.988991 0.056915
    +vn 0.122762 0.989016 0.082323
    +vn 0.144308 0.984790 0.096771
    +vn 0.144308 0.984790 0.096771
    +vn 0.160568 0.984755 0.066903
    +vn 0.136596 0.988991 0.056915
    +vn 0.122762 0.989016 0.082323
    +vn 0.104474 0.989025 0.104474
    +vn 0.122811 0.984802 0.122811
    +vn 0.122811 0.984802 0.122811
    +vn 0.144308 0.984790 0.096771
    +vn 0.122762 0.989016 0.082323
    +vn 0.104474 0.989025 0.104474
    +vn 0.082323 0.989016 0.122762
    +vn 0.096771 0.984790 0.144308
    +vn 0.096771 0.984790 0.144308
    +vn 0.122811 0.984802 0.122811
    +vn 0.104474 0.989025 0.104474
    +vn 0.082323 0.989016 0.122762
    +vn 0.056915 0.988991 0.136596
    +vn 0.066903 0.984755 0.160568
    +vn 0.066903 0.984755 0.160568
    +vn 0.096771 0.984790 0.144308
    +vn 0.082323 0.989016 0.122762
    +vn 0.056915 0.988991 0.136596
    +vn 0.029066 0.988957 0.145328
    +vn 0.034166 0.984708 0.170831
    +vn 0.034166 0.984708 0.170831
    +vn 0.066903 0.984755 0.160568
    +vn 0.056915 0.988991 0.136596
    +vn 0.029066 0.988957 0.145328
    +vn -0.000000 0.988936 0.148340
    +vn 0.000000 0.984680 0.174370
    +vn 0.000000 0.984680 0.174370
    +vn 0.034166 0.984708 0.170831
    +vn 0.029066 0.988957 0.145328
    +vn 0.174370 0.984680 0.000000
    +vn 0.170831 0.984708 0.034166
    +vn 0.253492 0.966008 0.050698
    +vn 0.253492 0.966008 0.050698
    +vn 0.258736 0.965948 0.000000
    +vn 0.174370 0.984680 0.000000
    +vn 0.170831 0.984708 0.034166
    +vn 0.160568 0.984755 0.066903
    +vn 0.238277 0.966109 0.099282
    +vn 0.238277 0.966109 0.099282
    +vn 0.253492 0.966008 0.050698
    +vn 0.170831 0.984708 0.034166
    +vn 0.160568 0.984755 0.066903
    +vn 0.144308 0.984790 0.096771
    +vn 0.214157 0.966185 0.143611
    +vn 0.214157 0.966185 0.143611
    +vn 0.238277 0.966109 0.099282
    +vn 0.160568 0.984755 0.066903
    +vn 0.144308 0.984790 0.096771
    +vn 0.122811 0.984802 0.122811
    +vn 0.182258 0.966211 0.182258
    +vn 0.182258 0.966211 0.182258
    +vn 0.214157 0.966185 0.143611
    +vn 0.144308 0.984790 0.096771
    +vn 0.122811 0.984802 0.122811
    +vn 0.096771 0.984790 0.144308
    +vn 0.143611 0.966185 0.214157
    +vn 0.143611 0.966185 0.214157
    +vn 0.182258 0.966211 0.182258
    +vn 0.122811 0.984802 0.122811
    +vn 0.096771 0.984790 0.144308
    +vn 0.066903 0.984755 0.160568
    +vn 0.099282 0.966109 0.238277
    +vn 0.099282 0.966109 0.238277
    +vn 0.143611 0.966185 0.214157
    +vn 0.096771 0.984790 0.144308
    +vn 0.066903 0.984755 0.160568
    +vn 0.034166 0.984708 0.170831
    +vn 0.050698 0.966008 0.253492
    +vn 0.050698 0.966008 0.253492
    +vn 0.099282 0.966109 0.238277
    +vn 0.066903 0.984755 0.160568
    +vn 0.034166 0.984708 0.170831
    +vn 0.000000 0.984680 0.174370
    +vn -0.000000 0.965948 0.258736
    +vn -0.000000 0.965948 0.258736
    +vn 0.050698 0.966008 0.253492
    +vn 0.034166 0.984708 0.170831
    +vn 0.258736 0.965948 0.000000
    +vn 0.253492 0.966008 0.050698
    +vn 0.495387 0.863004 0.099077
    +vn 0.495387 0.863004 0.099077
    +vn 0.505547 0.862799 0.000000
    +vn 0.258736 0.965948 0.000000
    +vn 0.253492 0.966008 0.050698
    +vn 0.238277 0.966109 0.099282
    +vn 0.465791 0.863349 0.194080
    +vn 0.465791 0.863349 0.194080
    +vn 0.495387 0.863004 0.099077
    +vn 0.253492 0.966008 0.050698
    +vn 0.238277 0.966109 0.099282
    +vn 0.214157 0.966185 0.143611
    +vn 0.418732 0.863607 0.280797
    +vn 0.418732 0.863607 0.280797
    +vn 0.465791 0.863349 0.194080
    +vn 0.238277 0.966109 0.099282
    +vn 0.214157 0.966185 0.143611
    +vn 0.182258 0.966211 0.182258
    +vn 0.356389 0.863698 0.356389
    +vn 0.356389 0.863698 0.356389
    +vn 0.418732 0.863607 0.280797
    +vn 0.214157 0.966185 0.143611
    +vn 0.182258 0.966211 0.182258
    +vn 0.143611 0.966185 0.214157
    +vn 0.280797 0.863607 0.418732
    +vn 0.280797 0.863607 0.418732
    +vn 0.356389 0.863698 0.356389
    +vn 0.182258 0.966211 0.182258
    +vn 0.143611 0.966185 0.214157
    +vn 0.099282 0.966109 0.238277
    +vn 0.194080 0.863349 0.465791
    +vn 0.194080 0.863349 0.465791
    +vn 0.280797 0.863607 0.418732
    +vn 0.143611 0.966185 0.214157
    +vn 0.099282 0.966109 0.238277
    +vn 0.050698 0.966008 0.253492
    +vn 0.099077 0.863004 0.495387
    +vn 0.099077 0.863004 0.495387
    +vn 0.194080 0.863349 0.465791
    +vn 0.099282 0.966109 0.238277
    +vn 0.050698 0.966008 0.253492
    +vn -0.000000 0.965948 0.258736
    +vn -0.000000 0.862799 0.505547
    +vn -0.000000 0.862799 0.505547
    +vn 0.099077 0.863004 0.495387
    +vn 0.050698 0.966008 0.253492
    +vn 0.505547 0.862799 0.000000
    +vn 0.495387 0.863004 0.099077
    +vn 0.980581 -0.000000 0.196116
    +vn 0.980581 -0.000000 0.196116
    +vn 1.000000 0.000000 0.000000
    +vn 0.505547 0.862799 0.000000
    +vn 0.495387 0.863004 0.099077
    +vn 0.465791 0.863349 0.194080
    +vn 0.923077 -0.000000 0.384615
    +vn 0.923077 -0.000000 0.384615
    +vn 0.980581 -0.000000 0.196116
    +vn 0.495387 0.863004 0.099077
    +vn 0.465791 0.863349 0.194080
    +vn 0.418732 0.863607 0.280797
    +vn 0.830544 -0.000000 0.556953
    +vn 0.830544 -0.000000 0.556953
    +vn 0.923077 -0.000000 0.384615
    +vn 0.465791 0.863349 0.194080
    +vn 0.418732 0.863607 0.280797
    +vn 0.356389 0.863698 0.356389
    +vn 0.707107 -0.000000 0.707107
    +vn 0.707107 -0.000000 0.707107
    +vn 0.830544 -0.000000 0.556953
    +vn 0.418732 0.863607 0.280797
    +vn 0.356389 0.863698 0.356389
    +vn 0.280797 0.863607 0.418732
    +vn 0.556953 -0.000000 0.830544
    +vn 0.556953 -0.000000 0.830544
    +vn 0.707107 -0.000000 0.707107
    +vn 0.356389 0.863698 0.356389
    +vn 0.280797 0.863607 0.418732
    +vn 0.194080 0.863349 0.465791
    +vn 0.384615 -0.000000 0.923077
    +vn 0.384615 -0.000000 0.923077
    +vn 0.556953 -0.000000 0.830544
    +vn 0.280797 0.863607 0.418732
    +vn 0.194080 0.863349 0.465791
    +vn 0.099077 0.863004 0.495387
    +vn 0.196116 -0.000000 0.980581
    +vn 0.196116 -0.000000 0.980581
    +vn 0.384615 -0.000000 0.923077
    +vn 0.194080 0.863349 0.465791
    +vn 0.099077 0.863004 0.495387
    +vn -0.000000 0.862799 0.505547
    +vn -0.000000 -0.000000 1.000000
    +vn -0.000000 -0.000000 1.000000
    +vn 0.196116 -0.000000 0.980581
    +vn 0.099077 0.863004 0.495387
    +vn 0.000000 0.800000 0.600000
    +vn -0.117600 0.800267 0.587999
    +vn -0.062214 0.948348 0.311072
    +vn -0.062214 0.948348 0.311072
    +vn 0.000000 0.948259 0.317497
    +vn 0.000000 0.800000 0.600000
    +vn -0.117600 0.800267 0.587999
    +vn -0.230400 0.800718 0.552961
    +vn -0.121840 0.948497 0.292417
    +vn -0.121840 0.948497 0.292417
    +vn -0.062214 0.948348 0.311072
    +vn -0.117600 0.800267 0.587999
    +vn -0.230400 0.800718 0.552961
    +vn -0.333387 0.801055 0.497156
    +vn -0.176249 0.948609 0.262827
    +vn -0.176249 0.948609 0.262827
    +vn -0.121840 0.948497 0.292417
    +vn -0.230400 0.800718 0.552961
    +vn -0.333387 0.801055 0.497156
    +vn -0.423155 0.801174 0.423155
    +vn -0.223681 0.948648 0.223681
    +vn -0.223681 0.948648 0.223681
    +vn -0.176249 0.948609 0.262827
    +vn -0.333387 0.801055 0.497156
    +vn -0.423155 0.801174 0.423155
    +vn -0.497156 0.801055 0.333387
    +vn -0.262827 0.948609 0.176249
    +vn -0.262827 0.948609 0.176249
    +vn -0.223681 0.948648 0.223681
    +vn -0.423155 0.801174 0.423155
    +vn -0.497156 0.801055 0.333387
    +vn -0.552961 0.800718 0.230400
    +vn -0.292417 0.948497 0.121840
    +vn -0.292417 0.948497 0.121840
    +vn -0.262827 0.948609 0.176249
    +vn -0.497156 0.801055 0.333387
    +vn -0.552961 0.800718 0.230400
    +vn -0.587999 0.800267 0.117600
    +vn -0.311072 0.948348 0.062214
    +vn -0.311072 0.948348 0.062214
    +vn -0.292417 0.948497 0.121840
    +vn -0.552961 0.800718 0.230400
    +vn -0.587999 0.800267 0.117600
    +vn -0.600000 0.800000 0.000000
    +vn -0.317497 0.948259 0.000000
    +vn -0.317497 0.948259 0.000000
    +vn -0.311072 0.948348 0.062214
    +vn -0.587999 0.800267 0.117600
    +vn 0.000000 0.948259 0.317497
    +vn -0.062214 0.948348 0.311072
    +vn -0.039963 0.979018 0.199816
    +vn -0.039963 0.979018 0.199816
    +vn 0.000000 0.978980 0.203954
    +vn 0.000000 0.948259 0.317497
    +vn -0.062214 0.948348 0.311072
    +vn -0.121840 0.948497 0.292417
    +vn -0.078256 0.979082 0.187815
    +vn -0.078256 0.979082 0.187815
    +vn -0.039963 0.979018 0.199816
    +vn -0.062214 0.948348 0.311072
    +vn -0.121840 0.948497 0.292417
    +vn -0.176249 0.948609 0.262827
    +vn -0.113194 0.979129 0.168798
    +vn -0.113194 0.979129 0.168798
    +vn -0.078256 0.979082 0.187815
    +vn -0.121840 0.948497 0.292417
    +vn -0.176249 0.948609 0.262827
    +vn -0.223681 0.948648 0.223681
    +vn -0.143654 0.979146 0.143654
    +vn -0.143654 0.979146 0.143654
    +vn -0.113194 0.979129 0.168798
    +vn -0.176249 0.948609 0.262827
    +vn -0.223681 0.948648 0.223681
    +vn -0.262827 0.948609 0.176249
    +vn -0.168798 0.979129 0.113194
    +vn -0.168798 0.979129 0.113194
    +vn -0.143654 0.979146 0.143654
    +vn -0.223681 0.948648 0.223681
    +vn -0.262827 0.948609 0.176249
    +vn -0.292417 0.948497 0.121840
    +vn -0.187815 0.979082 0.078256
    +vn -0.187815 0.979082 0.078256
    +vn -0.168798 0.979129 0.113194
    +vn -0.262827 0.948609 0.176249
    +vn -0.292417 0.948497 0.121840
    +vn -0.311072 0.948348 0.062214
    +vn -0.199816 0.979018 0.039963
    +vn -0.199816 0.979018 0.039963
    +vn -0.187815 0.979082 0.078256
    +vn -0.292417 0.948497 0.121840
    +vn -0.311072 0.948348 0.062214
    +vn -0.317497 0.948259 0.000000
    +vn -0.203954 0.978980 0.000000
    +vn -0.203954 0.978980 0.000000
    +vn -0.199816 0.979018 0.039963
    +vn -0.311072 0.948348 0.062214
    +vn 0.000000 0.978980 0.203954
    +vn -0.039963 0.979018 0.199816
    +vn -0.030839 0.987559 0.154193
    +vn -0.030839 0.987559 0.154193
    +vn 0.000000 0.987537 0.157389
    +vn 0.000000 0.978980 0.203954
    +vn -0.039963 0.979018 0.199816
    +vn -0.078256 0.979082 0.187815
    +vn -0.060387 0.987598 0.144928
    +vn -0.060387 0.987598 0.144928
    +vn -0.030839 0.987559 0.154193
    +vn -0.039963 0.979018 0.199816
    +vn -0.078256 0.979082 0.187815
    +vn -0.113194 0.979129 0.168798
    +vn -0.087345 0.987626 0.130251
    +vn -0.087345 0.987626 0.130251
    +vn -0.060387 0.987598 0.144928
    +vn -0.078256 0.979082 0.187815
    +vn -0.113194 0.979129 0.168798
    +vn -0.143654 0.979146 0.143654
    +vn -0.110848 0.987636 0.110848
    +vn -0.110848 0.987636 0.110848
    +vn -0.087345 0.987626 0.130251
    +vn -0.113194 0.979129 0.168798
    +vn -0.143654 0.979146 0.143654
    +vn -0.168798 0.979129 0.113194
    +vn -0.130251 0.987626 0.087345
    +vn -0.130251 0.987626 0.087345
    +vn -0.110848 0.987636 0.110848
    +vn -0.143654 0.979146 0.143654
    +vn -0.168798 0.979129 0.113194
    +vn -0.187815 0.979082 0.078256
    +vn -0.144928 0.987598 0.060387
    +vn -0.144928 0.987598 0.060387
    +vn -0.130251 0.987626 0.087345
    +vn -0.168798 0.979129 0.113194
    +vn -0.187815 0.979082 0.078256
    +vn -0.199816 0.979018 0.039963
    +vn -0.154193 0.987559 0.030839
    +vn -0.154193 0.987559 0.030839
    +vn -0.144928 0.987598 0.060387
    +vn -0.187815 0.979082 0.078256
    +vn -0.199816 0.979018 0.039963
    +vn -0.203954 0.978980 0.000000
    +vn -0.157389 0.987537 0.000000
    +vn -0.157389 0.987537 0.000000
    +vn -0.154193 0.987559 0.030839
    +vn -0.199816 0.979018 0.039963
    +vn 0.000000 0.987537 0.157389
    +vn -0.030839 0.987559 0.154193
    +vn -0.029066 0.988957 0.145328
    +vn -0.029066 0.988957 0.145328
    +vn 0.000000 0.988936 0.148340
    +vn 0.000000 0.987537 0.157389
    +vn -0.030839 0.987559 0.154193
    +vn -0.060387 0.987598 0.144928
    +vn -0.056915 0.988991 0.136596
    +vn -0.056915 0.988991 0.136596
    +vn -0.029066 0.988957 0.145328
    +vn -0.030839 0.987559 0.154193
    +vn -0.060387 0.987598 0.144928
    +vn -0.087345 0.987626 0.130251
    +vn -0.082323 0.989016 0.122762
    +vn -0.082323 0.989016 0.122762
    +vn -0.056915 0.988991 0.136596
    +vn -0.060387 0.987598 0.144928
    +vn -0.087345 0.987626 0.130251
    +vn -0.110848 0.987636 0.110848
    +vn -0.104474 0.989025 0.104474
    +vn -0.104474 0.989025 0.104474
    +vn -0.082323 0.989016 0.122762
    +vn -0.087345 0.987626 0.130251
    +vn -0.110848 0.987636 0.110848
    +vn -0.130251 0.987626 0.087345
    +vn -0.122762 0.989016 0.082323
    +vn -0.122762 0.989016 0.082323
    +vn -0.104474 0.989025 0.104474
    +vn -0.110848 0.987636 0.110848
    +vn -0.130251 0.987626 0.087345
    +vn -0.144928 0.987598 0.060387
    +vn -0.136596 0.988991 0.056915
    +vn -0.136596 0.988991 0.056915
    +vn -0.122762 0.989016 0.082323
    +vn -0.130251 0.987626 0.087345
    +vn -0.144928 0.987598 0.060387
    +vn -0.154193 0.987559 0.030839
    +vn -0.145328 0.988957 0.029066
    +vn -0.145328 0.988957 0.029066
    +vn -0.136596 0.988991 0.056915
    +vn -0.144928 0.987598 0.060387
    +vn -0.154193 0.987559 0.030839
    +vn -0.157389 0.987537 0.000000
    +vn -0.148340 0.988936 0.000000
    +vn -0.148340 0.988936 0.000000
    +vn -0.145328 0.988957 0.029066
    +vn -0.154193 0.987559 0.030839
    +vn 0.000000 0.988936 0.148340
    +vn -0.029066 0.988957 0.145328
    +vn -0.034166 0.984708 0.170831
    +vn -0.034166 0.984708 0.170831
    +vn 0.000000 0.984680 0.174370
    +vn 0.000000 0.988936 0.148340
    +vn -0.029066 0.988957 0.145328
    +vn -0.056915 0.988991 0.136596
    +vn -0.066903 0.984755 0.160568
    +vn -0.066903 0.984755 0.160568
    +vn -0.034166 0.984708 0.170831
    +vn -0.029066 0.988957 0.145328
    +vn -0.056915 0.988991 0.136596
    +vn -0.082323 0.989016 0.122762
    +vn -0.096771 0.984790 0.144308
    +vn -0.096771 0.984790 0.144308
    +vn -0.066903 0.984755 0.160568
    +vn -0.056915 0.988991 0.136596
    +vn -0.082323 0.989016 0.122762
    +vn -0.104474 0.989025 0.104474
    +vn -0.122811 0.984802 0.122811
    +vn -0.122811 0.984802 0.122811
    +vn -0.096771 0.984790 0.144308
    +vn -0.082323 0.989016 0.122762
    +vn -0.104474 0.989025 0.104474
    +vn -0.122762 0.989016 0.082323
    +vn -0.144308 0.984790 0.096771
    +vn -0.144308 0.984790 0.096771
    +vn -0.122811 0.984802 0.122811
    +vn -0.104474 0.989025 0.104474
    +vn -0.122762 0.989016 0.082323
    +vn -0.136596 0.988991 0.056915
    +vn -0.160568 0.984755 0.066903
    +vn -0.160568 0.984755 0.066903
    +vn -0.144308 0.984790 0.096771
    +vn -0.122762 0.989016 0.082323
    +vn -0.136596 0.988991 0.056915
    +vn -0.145328 0.988957 0.029066
    +vn -0.170831 0.984708 0.034166
    +vn -0.170831 0.984708 0.034166
    +vn -0.160568 0.984755 0.066903
    +vn -0.136596 0.988991 0.056915
    +vn -0.145328 0.988957 0.029066
    +vn -0.148340 0.988936 0.000000
    +vn -0.174370 0.984680 0.000000
    +vn -0.174370 0.984680 0.000000
    +vn -0.170831 0.984708 0.034166
    +vn -0.145328 0.988957 0.029066
    +vn 0.000000 0.984680 0.174370
    +vn -0.034166 0.984708 0.170831
    +vn -0.050698 0.966008 0.253492
    +vn -0.050698 0.966008 0.253492
    +vn 0.000000 0.965948 0.258736
    +vn 0.000000 0.984680 0.174370
    +vn -0.034166 0.984708 0.170831
    +vn -0.066903 0.984755 0.160568
    +vn -0.099282 0.966109 0.238277
    +vn -0.099282 0.966109 0.238277
    +vn -0.050698 0.966008 0.253492
    +vn -0.034166 0.984708 0.170831
    +vn -0.066903 0.984755 0.160568
    +vn -0.096771 0.984790 0.144308
    +vn -0.143611 0.966185 0.214157
    +vn -0.143611 0.966185 0.214157
    +vn -0.099282 0.966109 0.238277
    +vn -0.066903 0.984755 0.160568
    +vn -0.096771 0.984790 0.144308
    +vn -0.122811 0.984802 0.122811
    +vn -0.182258 0.966211 0.182258
    +vn -0.182258 0.966211 0.182258
    +vn -0.143611 0.966185 0.214157
    +vn -0.096771 0.984790 0.144308
    +vn -0.122811 0.984802 0.122811
    +vn -0.144308 0.984790 0.096771
    +vn -0.214157 0.966185 0.143611
    +vn -0.214157 0.966185 0.143611
    +vn -0.182258 0.966211 0.182258
    +vn -0.122811 0.984802 0.122811
    +vn -0.144308 0.984790 0.096771
    +vn -0.160568 0.984755 0.066903
    +vn -0.238277 0.966109 0.099282
    +vn -0.238277 0.966109 0.099282
    +vn -0.214157 0.966185 0.143611
    +vn -0.144308 0.984790 0.096771
    +vn -0.160568 0.984755 0.066903
    +vn -0.170831 0.984708 0.034166
    +vn -0.253492 0.966008 0.050698
    +vn -0.253492 0.966008 0.050698
    +vn -0.238277 0.966109 0.099282
    +vn -0.160568 0.984755 0.066903
    +vn -0.170831 0.984708 0.034166
    +vn -0.174370 0.984680 0.000000
    +vn -0.258736 0.965948 0.000000
    +vn -0.258736 0.965948 0.000000
    +vn -0.253492 0.966008 0.050698
    +vn -0.170831 0.984708 0.034166
    +vn 0.000000 0.965948 0.258736
    +vn -0.050698 0.966008 0.253492
    +vn -0.099077 0.863004 0.495387
    +vn -0.099077 0.863004 0.495387
    +vn 0.000000 0.862799 0.505547
    +vn 0.000000 0.965948 0.258736
    +vn -0.050698 0.966008 0.253492
    +vn -0.099282 0.966109 0.238277
    +vn -0.194080 0.863349 0.465791
    +vn -0.194080 0.863349 0.465791
    +vn -0.099077 0.863004 0.495387
    +vn -0.050698 0.966008 0.253492
    +vn -0.099282 0.966109 0.238277
    +vn -0.143611 0.966185 0.214157
    +vn -0.280797 0.863607 0.418732
    +vn -0.280797 0.863607 0.418732
    +vn -0.194080 0.863349 0.465791
    +vn -0.099282 0.966109 0.238277
    +vn -0.143611 0.966185 0.214157
    +vn -0.182258 0.966211 0.182258
    +vn -0.356389 0.863698 0.356389
    +vn -0.356389 0.863698 0.356389
    +vn -0.280797 0.863607 0.418732
    +vn -0.143611 0.966185 0.214157
    +vn -0.182258 0.966211 0.182258
    +vn -0.214157 0.966185 0.143611
    +vn -0.418732 0.863607 0.280797
    +vn -0.418732 0.863607 0.280797
    +vn -0.356389 0.863698 0.356389
    +vn -0.182258 0.966211 0.182258
    +vn -0.214157 0.966185 0.143611
    +vn -0.238277 0.966109 0.099282
    +vn -0.465791 0.863349 0.194080
    +vn -0.465791 0.863349 0.194080
    +vn -0.418732 0.863607 0.280797
    +vn -0.214157 0.966185 0.143611
    +vn -0.238277 0.966109 0.099282
    +vn -0.253492 0.966008 0.050698
    +vn -0.495387 0.863004 0.099077
    +vn -0.495387 0.863004 0.099077
    +vn -0.465791 0.863349 0.194080
    +vn -0.238277 0.966109 0.099282
    +vn -0.253492 0.966008 0.050698
    +vn -0.258736 0.965948 0.000000
    +vn -0.505547 0.862799 0.000000
    +vn -0.505547 0.862799 0.000000
    +vn -0.495387 0.863004 0.099077
    +vn -0.253492 0.966008 0.050698
    +vn 0.000000 0.862799 0.505547
    +vn -0.099077 0.863004 0.495387
    +vn -0.196116 -0.000000 0.980581
    +vn -0.196116 -0.000000 0.980581
    +vn 0.000000 -0.000000 1.000000
    +vn 0.000000 0.862799 0.505547
    +vn -0.099077 0.863004 0.495387
    +vn -0.194080 0.863349 0.465791
    +vn -0.384615 -0.000000 0.923077
    +vn -0.384615 -0.000000 0.923077
    +vn -0.196116 -0.000000 0.980581
    +vn -0.099077 0.863004 0.495387
    +vn -0.194080 0.863349 0.465791
    +vn -0.280797 0.863607 0.418732
    +vn -0.556953 -0.000000 0.830544
    +vn -0.556953 -0.000000 0.830544
    +vn -0.384615 -0.000000 0.923077
    +vn -0.194080 0.863349 0.465791
    +vn -0.280797 0.863607 0.418732
    +vn -0.356389 0.863698 0.356389
    +vn -0.707107 -0.000000 0.707107
    +vn -0.707107 -0.000000 0.707107
    +vn -0.556953 -0.000000 0.830544
    +vn -0.280797 0.863607 0.418732
    +vn -0.356389 0.863698 0.356389
    +vn -0.418732 0.863607 0.280797
    +vn -0.830544 -0.000000 0.556953
    +vn -0.830544 -0.000000 0.556953
    +vn -0.707107 -0.000000 0.707107
    +vn -0.356389 0.863698 0.356389
    +vn -0.418732 0.863607 0.280797
    +vn -0.465791 0.863349 0.194080
    +vn -0.923077 -0.000000 0.384615
    +vn -0.923077 -0.000000 0.384615
    +vn -0.830544 -0.000000 0.556953
    +vn -0.418732 0.863607 0.280797
    +vn -0.465791 0.863349 0.194080
    +vn -0.495387 0.863004 0.099077
    +vn -0.980581 -0.000000 0.196116
    +vn -0.980581 -0.000000 0.196116
    +vn -0.923077 -0.000000 0.384615
    +vn -0.465791 0.863349 0.194080
    +vn -0.495387 0.863004 0.099077
    +vn -0.505547 0.862799 0.000000
    +vn -1.000000 -0.000000 -0.000000
    +vn -1.000000 -0.000000 -0.000000
    +vn -0.980581 -0.000000 0.196116
    +vn -0.495387 0.863004 0.099077
    +vn -0.600000 0.800000 0.000000
    +vn -0.587999 0.800267 -0.117600
    +vn -0.311072 0.948348 -0.062214
    +vn -0.311072 0.948348 -0.062214
    +vn -0.317497 0.948259 0.000000
    +vn -0.600000 0.800000 0.000000
    +vn -0.587999 0.800267 -0.117600
    +vn -0.552961 0.800718 -0.230400
    +vn -0.292417 0.948497 -0.121840
    +vn -0.292417 0.948497 -0.121840
    +vn -0.311072 0.948348 -0.062214
    +vn -0.587999 0.800267 -0.117600
    +vn -0.552961 0.800718 -0.230400
    +vn -0.497156 0.801055 -0.333387
    +vn -0.262827 0.948609 -0.176249
    +vn -0.262827 0.948609 -0.176249
    +vn -0.292417 0.948497 -0.121840
    +vn -0.552961 0.800718 -0.230400
    +vn -0.497156 0.801055 -0.333387
    +vn -0.423155 0.801174 -0.423155
    +vn -0.223681 0.948648 -0.223681
    +vn -0.223681 0.948648 -0.223681
    +vn -0.262827 0.948609 -0.176249
    +vn -0.497156 0.801055 -0.333387
    +vn -0.423155 0.801174 -0.423155
    +vn -0.333387 0.801055 -0.497156
    +vn -0.176249 0.948609 -0.262827
    +vn -0.176249 0.948609 -0.262827
    +vn -0.223681 0.948648 -0.223681
    +vn -0.423155 0.801174 -0.423155
    +vn -0.333387 0.801055 -0.497156
    +vn -0.230400 0.800718 -0.552961
    +vn -0.121840 0.948497 -0.292417
    +vn -0.121840 0.948497 -0.292417
    +vn -0.176249 0.948609 -0.262827
    +vn -0.333387 0.801055 -0.497156
    +vn -0.230400 0.800718 -0.552961
    +vn -0.117600 0.800267 -0.587999
    +vn -0.062214 0.948348 -0.311072
    +vn -0.062214 0.948348 -0.311072
    +vn -0.121840 0.948497 -0.292417
    +vn -0.230400 0.800718 -0.552961
    +vn -0.117600 0.800267 -0.587999
    +vn -0.000000 0.800000 -0.600000
    +vn 0.000000 0.948259 -0.317497
    +vn 0.000000 0.948259 -0.317497
    +vn -0.062214 0.948348 -0.311072
    +vn -0.117600 0.800267 -0.587999
    +vn -0.317497 0.948259 0.000000
    +vn -0.311072 0.948348 -0.062214
    +vn -0.199816 0.979018 -0.039963
    +vn -0.199816 0.979018 -0.039963
    +vn -0.203954 0.978980 0.000000
    +vn -0.317497 0.948259 0.000000
    +vn -0.311072 0.948348 -0.062214
    +vn -0.292417 0.948497 -0.121840
    +vn -0.187815 0.979082 -0.078256
    +vn -0.187815 0.979082 -0.078256
    +vn -0.199816 0.979018 -0.039963
    +vn -0.311072 0.948348 -0.062214
    +vn -0.292417 0.948497 -0.121840
    +vn -0.262827 0.948609 -0.176249
    +vn -0.168798 0.979129 -0.113194
    +vn -0.168798 0.979129 -0.113194
    +vn -0.187815 0.979082 -0.078256
    +vn -0.292417 0.948497 -0.121840
    +vn -0.262827 0.948609 -0.176249
    +vn -0.223681 0.948648 -0.223681
    +vn -0.143654 0.979146 -0.143654
    +vn -0.143654 0.979146 -0.143654
    +vn -0.168798 0.979129 -0.113194
    +vn -0.262827 0.948609 -0.176249
    +vn -0.223681 0.948648 -0.223681
    +vn -0.176249 0.948609 -0.262827
    +vn -0.113194 0.979129 -0.168798
    +vn -0.113194 0.979129 -0.168798
    +vn -0.143654 0.979146 -0.143654
    +vn -0.223681 0.948648 -0.223681
    +vn -0.176249 0.948609 -0.262827
    +vn -0.121840 0.948497 -0.292417
    +vn -0.078256 0.979082 -0.187815
    +vn -0.078256 0.979082 -0.187815
    +vn -0.113194 0.979129 -0.168798
    +vn -0.176249 0.948609 -0.262827
    +vn -0.121840 0.948497 -0.292417
    +vn -0.062214 0.948348 -0.311072
    +vn -0.039963 0.979018 -0.199816
    +vn -0.039963 0.979018 -0.199816
    +vn -0.078256 0.979082 -0.187815
    +vn -0.121840 0.948497 -0.292417
    +vn -0.062214 0.948348 -0.311072
    +vn 0.000000 0.948259 -0.317497
    +vn 0.000000 0.978980 -0.203954
    +vn 0.000000 0.978980 -0.203954
    +vn -0.039963 0.979018 -0.199816
    +vn -0.062214 0.948348 -0.311072
    +vn -0.203954 0.978980 0.000000
    +vn -0.199816 0.979018 -0.039963
    +vn -0.154193 0.987559 -0.030839
    +vn -0.154193 0.987559 -0.030839
    +vn -0.157389 0.987537 0.000000
    +vn -0.203954 0.978980 0.000000
    +vn -0.199816 0.979018 -0.039963
    +vn -0.187815 0.979082 -0.078256
    +vn -0.144928 0.987598 -0.060387
    +vn -0.144928 0.987598 -0.060387
    +vn -0.154193 0.987559 -0.030839
    +vn -0.199816 0.979018 -0.039963
    +vn -0.187815 0.979082 -0.078256
    +vn -0.168798 0.979129 -0.113194
    +vn -0.130251 0.987626 -0.087345
    +vn -0.130251 0.987626 -0.087345
    +vn -0.144928 0.987598 -0.060387
    +vn -0.187815 0.979082 -0.078256
    +vn -0.168798 0.979129 -0.113194
    +vn -0.143654 0.979146 -0.143654
    +vn -0.110848 0.987636 -0.110848
    +vn -0.110848 0.987636 -0.110848
    +vn -0.130251 0.987626 -0.087345
    +vn -0.168798 0.979129 -0.113194
    +vn -0.143654 0.979146 -0.143654
    +vn -0.113194 0.979129 -0.168798
    +vn -0.087345 0.987626 -0.130251
    +vn -0.087345 0.987626 -0.130251
    +vn -0.110848 0.987636 -0.110848
    +vn -0.143654 0.979146 -0.143654
    +vn -0.113194 0.979129 -0.168798
    +vn -0.078256 0.979082 -0.187815
    +vn -0.060387 0.987598 -0.144928
    +vn -0.060387 0.987598 -0.144928
    +vn -0.087345 0.987626 -0.130251
    +vn -0.113194 0.979129 -0.168798
    +vn -0.078256 0.979082 -0.187815
    +vn -0.039963 0.979018 -0.199816
    +vn -0.030839 0.987559 -0.154193
    +vn -0.030839 0.987559 -0.154193
    +vn -0.060387 0.987598 -0.144928
    +vn -0.078256 0.979082 -0.187815
    +vn -0.039963 0.979018 -0.199816
    +vn 0.000000 0.978980 -0.203954
    +vn -0.000000 0.987537 -0.157389
    +vn -0.000000 0.987537 -0.157389
    +vn -0.030839 0.987559 -0.154193
    +vn -0.039963 0.979018 -0.199816
    +vn -0.157389 0.987537 0.000000
    +vn -0.154193 0.987559 -0.030839
    +vn -0.145328 0.988957 -0.029066
    +vn -0.145328 0.988957 -0.029066
    +vn -0.148340 0.988936 0.000000
    +vn -0.157389 0.987537 0.000000
    +vn -0.154193 0.987559 -0.030839
    +vn -0.144928 0.987598 -0.060387
    +vn -0.136596 0.988991 -0.056915
    +vn -0.136596 0.988991 -0.056915
    +vn -0.145328 0.988957 -0.029066
    +vn -0.154193 0.987559 -0.030839
    +vn -0.144928 0.987598 -0.060387
    +vn -0.130251 0.987626 -0.087345
    +vn -0.122762 0.989016 -0.082323
    +vn -0.122762 0.989016 -0.082323
    +vn -0.136596 0.988991 -0.056915
    +vn -0.144928 0.987598 -0.060387
    +vn -0.130251 0.987626 -0.087345
    +vn -0.110848 0.987636 -0.110848
    +vn -0.104474 0.989025 -0.104474
    +vn -0.104474 0.989025 -0.104474
    +vn -0.122762 0.989016 -0.082323
    +vn -0.130251 0.987626 -0.087345
    +vn -0.110848 0.987636 -0.110848
    +vn -0.087345 0.987626 -0.130251
    +vn -0.082323 0.989016 -0.122762
    +vn -0.082323 0.989016 -0.122762
    +vn -0.104474 0.989025 -0.104474
    +vn -0.110848 0.987636 -0.110848
    +vn -0.087345 0.987626 -0.130251
    +vn -0.060387 0.987598 -0.144928
    +vn -0.056915 0.988991 -0.136596
    +vn -0.056915 0.988991 -0.136596
    +vn -0.082323 0.989016 -0.122762
    +vn -0.087345 0.987626 -0.130251
    +vn -0.060387 0.987598 -0.144928
    +vn -0.030839 0.987559 -0.154193
    +vn -0.029066 0.988957 -0.145328
    +vn -0.029066 0.988957 -0.145328
    +vn -0.056915 0.988991 -0.136596
    +vn -0.060387 0.987598 -0.144928
    +vn -0.030839 0.987559 -0.154193
    +vn -0.000000 0.987537 -0.157389
    +vn 0.000000 0.988936 -0.148340
    +vn 0.000000 0.988936 -0.148340
    +vn -0.029066 0.988957 -0.145328
    +vn -0.030839 0.987559 -0.154193
    +vn -0.148340 0.988936 0.000000
    +vn -0.145328 0.988957 -0.029066
    +vn -0.170831 0.984708 -0.034166
    +vn -0.170831 0.984708 -0.034166
    +vn -0.174370 0.984680 0.000000
    +vn -0.148340 0.988936 0.000000
    +vn -0.145328 0.988957 -0.029066
    +vn -0.136596 0.988991 -0.056915
    +vn -0.160568 0.984755 -0.066903
    +vn -0.160568 0.984755 -0.066903
    +vn -0.170831 0.984708 -0.034166
    +vn -0.145328 0.988957 -0.029066
    +vn -0.136596 0.988991 -0.056915
    +vn -0.122762 0.989016 -0.082323
    +vn -0.144308 0.984790 -0.096771
    +vn -0.144308 0.984790 -0.096771
    +vn -0.160568 0.984755 -0.066903
    +vn -0.136596 0.988991 -0.056915
    +vn -0.122762 0.989016 -0.082323
    +vn -0.104474 0.989025 -0.104474
    +vn -0.122811 0.984802 -0.122811
    +vn -0.122811 0.984802 -0.122811
    +vn -0.144308 0.984790 -0.096771
    +vn -0.122762 0.989016 -0.082323
    +vn -0.104474 0.989025 -0.104474
    +vn -0.082323 0.989016 -0.122762
    +vn -0.096771 0.984790 -0.144308
    +vn -0.096771 0.984790 -0.144308
    +vn -0.122811 0.984802 -0.122811
    +vn -0.104474 0.989025 -0.104474
    +vn -0.082323 0.989016 -0.122762
    +vn -0.056915 0.988991 -0.136596
    +vn -0.066903 0.984755 -0.160568
    +vn -0.066903 0.984755 -0.160568
    +vn -0.096771 0.984790 -0.144308
    +vn -0.082323 0.989016 -0.122762
    +vn -0.056915 0.988991 -0.136596
    +vn -0.029066 0.988957 -0.145328
    +vn -0.034166 0.984708 -0.170831
    +vn -0.034166 0.984708 -0.170831
    +vn -0.066903 0.984755 -0.160568
    +vn -0.056915 0.988991 -0.136596
    +vn -0.029066 0.988957 -0.145328
    +vn 0.000000 0.988936 -0.148340
    +vn 0.000000 0.984680 -0.174370
    +vn 0.000000 0.984680 -0.174370
    +vn -0.034166 0.984708 -0.170831
    +vn -0.029066 0.988957 -0.145328
    +vn -0.174370 0.984680 0.000000
    +vn -0.170831 0.984708 -0.034166
    +vn -0.253492 0.966008 -0.050698
    +vn -0.253492 0.966008 -0.050698
    +vn -0.258736 0.965948 0.000000
    +vn -0.174370 0.984680 0.000000
    +vn -0.170831 0.984708 -0.034166
    +vn -0.160568 0.984755 -0.066903
    +vn -0.238277 0.966109 -0.099282
    +vn -0.238277 0.966109 -0.099282
    +vn -0.253492 0.966008 -0.050698
    +vn -0.170831 0.984708 -0.034166
    +vn -0.160568 0.984755 -0.066903
    +vn -0.144308 0.984790 -0.096771
    +vn -0.214157 0.966185 -0.143611
    +vn -0.214157 0.966185 -0.143611
    +vn -0.238277 0.966109 -0.099282
    +vn -0.160568 0.984755 -0.066903
    +vn -0.144308 0.984790 -0.096771
    +vn -0.122811 0.984802 -0.122811
    +vn -0.182258 0.966211 -0.182258
    +vn -0.182258 0.966211 -0.182258
    +vn -0.214157 0.966185 -0.143611
    +vn -0.144308 0.984790 -0.096771
    +vn -0.122811 0.984802 -0.122811
    +vn -0.096771 0.984790 -0.144308
    +vn -0.143611 0.966185 -0.214157
    +vn -0.143611 0.966185 -0.214157
    +vn -0.182258 0.966211 -0.182258
    +vn -0.122811 0.984802 -0.122811
    +vn -0.096771 0.984790 -0.144308
    +vn -0.066903 0.984755 -0.160568
    +vn -0.099282 0.966109 -0.238277
    +vn -0.099282 0.966109 -0.238277
    +vn -0.143611 0.966185 -0.214157
    +vn -0.096771 0.984790 -0.144308
    +vn -0.066903 0.984755 -0.160568
    +vn -0.034166 0.984708 -0.170831
    +vn -0.050698 0.966008 -0.253492
    +vn -0.050698 0.966008 -0.253492
    +vn -0.099282 0.966109 -0.238277
    +vn -0.066903 0.984755 -0.160568
    +vn -0.034166 0.984708 -0.170831
    +vn 0.000000 0.984680 -0.174370
    +vn 0.000000 0.965948 -0.258736
    +vn 0.000000 0.965948 -0.258736
    +vn -0.050698 0.966008 -0.253492
    +vn -0.034166 0.984708 -0.170831
    +vn -0.258736 0.965948 0.000000
    +vn -0.253492 0.966008 -0.050698
    +vn -0.495387 0.863004 -0.099077
    +vn -0.495387 0.863004 -0.099077
    +vn -0.505547 0.862799 0.000000
    +vn -0.258736 0.965948 0.000000
    +vn -0.253492 0.966008 -0.050698
    +vn -0.238277 0.966109 -0.099282
    +vn -0.465791 0.863349 -0.194080
    +vn -0.465791 0.863349 -0.194080
    +vn -0.495387 0.863004 -0.099077
    +vn -0.253492 0.966008 -0.050698
    +vn -0.238277 0.966109 -0.099282
    +vn -0.214157 0.966185 -0.143611
    +vn -0.418732 0.863607 -0.280797
    +vn -0.418732 0.863607 -0.280797
    +vn -0.465791 0.863349 -0.194080
    +vn -0.238277 0.966109 -0.099282
    +vn -0.214157 0.966185 -0.143611
    +vn -0.182258 0.966211 -0.182258
    +vn -0.356389 0.863698 -0.356389
    +vn -0.356389 0.863698 -0.356389
    +vn -0.418732 0.863607 -0.280797
    +vn -0.214157 0.966185 -0.143611
    +vn -0.182258 0.966211 -0.182258
    +vn -0.143611 0.966185 -0.214157
    +vn -0.280797 0.863607 -0.418732
    +vn -0.280797 0.863607 -0.418732
    +vn -0.356389 0.863698 -0.356389
    +vn -0.182258 0.966211 -0.182258
    +vn -0.143611 0.966185 -0.214157
    +vn -0.099282 0.966109 -0.238277
    +vn -0.194080 0.863349 -0.465791
    +vn -0.194080 0.863349 -0.465791
    +vn -0.280797 0.863607 -0.418732
    +vn -0.143611 0.966185 -0.214157
    +vn -0.099282 0.966109 -0.238277
    +vn -0.050698 0.966008 -0.253492
    +vn -0.099077 0.863004 -0.495387
    +vn -0.099077 0.863004 -0.495387
    +vn -0.194080 0.863349 -0.465791
    +vn -0.099282 0.966109 -0.238277
    +vn -0.050698 0.966008 -0.253492
    +vn 0.000000 0.965948 -0.258736
    +vn 0.000000 0.862799 -0.505547
    +vn 0.000000 0.862799 -0.505547
    +vn -0.099077 0.863004 -0.495387
    +vn -0.050698 0.966008 -0.253492
    +vn -0.505547 0.862799 0.000000
    +vn -0.495387 0.863004 -0.099077
    +vn -0.980581 0.000000 -0.196116
    +vn -0.980581 0.000000 -0.196116
    +vn -1.000000 0.000000 0.000000
    +vn -0.505547 0.862799 0.000000
    +vn -0.495387 0.863004 -0.099077
    +vn -0.465791 0.863349 -0.194080
    +vn -0.923077 0.000000 -0.384615
    +vn -0.923077 0.000000 -0.384615
    +vn -0.980581 0.000000 -0.196116
    +vn -0.495387 0.863004 -0.099077
    +vn -0.465791 0.863349 -0.194080
    +vn -0.418732 0.863607 -0.280797
    +vn -0.830544 0.000000 -0.556953
    +vn -0.830544 0.000000 -0.556953
    +vn -0.923077 0.000000 -0.384615
    +vn -0.465791 0.863349 -0.194080
    +vn -0.418732 0.863607 -0.280797
    +vn -0.356389 0.863698 -0.356389
    +vn -0.707107 0.000000 -0.707107
    +vn -0.707107 0.000000 -0.707107
    +vn -0.830544 0.000000 -0.556953
    +vn -0.418732 0.863607 -0.280797
    +vn -0.356389 0.863698 -0.356389
    +vn -0.280797 0.863607 -0.418732
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.707107 0.000000 -0.707107
    +vn -0.356389 0.863698 -0.356389
    +vn -0.280797 0.863607 -0.418732
    +vn -0.194080 0.863349 -0.465791
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.556953 -0.000000 -0.830544
    +vn -0.280797 0.863607 -0.418732
    +vn -0.194080 0.863349 -0.465791
    +vn -0.099077 0.863004 -0.495387
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.384615 -0.000000 -0.923077
    +vn -0.194080 0.863349 -0.465791
    +vn -0.099077 0.863004 -0.495387
    +vn 0.000000 0.862799 -0.505547
    +vn 0.000000 -0.000000 -1.000000
    +vn 0.000000 -0.000000 -1.000000
    +vn -0.196116 -0.000000 -0.980581
    +vn -0.099077 0.863004 -0.495387
    +vn 0.000000 0.800000 -0.600000
    +vn 0.117600 0.800267 -0.587999
    +vn 0.062214 0.948348 -0.311072
    +vn 0.062214 0.948348 -0.311072
    +vn 0.000000 0.948259 -0.317497
    +vn 0.000000 0.800000 -0.600000
    +vn 0.117600 0.800267 -0.587999
    +vn 0.230400 0.800718 -0.552961
    +vn 0.121840 0.948497 -0.292417
    +vn 0.121840 0.948497 -0.292417
    +vn 0.062214 0.948348 -0.311072
    +vn 0.117600 0.800267 -0.587999
    +vn 0.230400 0.800718 -0.552961
    +vn 0.333387 0.801055 -0.497156
    +vn 0.176249 0.948609 -0.262827
    +vn 0.176249 0.948609 -0.262827
    +vn 0.121840 0.948497 -0.292417
    +vn 0.230400 0.800718 -0.552961
    +vn 0.333387 0.801055 -0.497156
    +vn 0.423155 0.801174 -0.423155
    +vn 0.223681 0.948648 -0.223681
    +vn 0.223681 0.948648 -0.223681
    +vn 0.176249 0.948609 -0.262827
    +vn 0.333387 0.801055 -0.497156
    +vn 0.423155 0.801174 -0.423155
    +vn 0.497156 0.801055 -0.333387
    +vn 0.262827 0.948609 -0.176249
    +vn 0.262827 0.948609 -0.176249
    +vn 0.223681 0.948648 -0.223681
    +vn 0.423155 0.801174 -0.423155
    +vn 0.497156 0.801055 -0.333387
    +vn 0.552961 0.800718 -0.230400
    +vn 0.292417 0.948497 -0.121840
    +vn 0.292417 0.948497 -0.121840
    +vn 0.262827 0.948609 -0.176249
    +vn 0.497156 0.801055 -0.333387
    +vn 0.552961 0.800718 -0.230400
    +vn 0.587999 0.800267 -0.117600
    +vn 0.311072 0.948348 -0.062214
    +vn 0.311072 0.948348 -0.062214
    +vn 0.292417 0.948497 -0.121840
    +vn 0.552961 0.800718 -0.230400
    +vn 0.587999 0.800267 -0.117600
    +vn 0.600000 0.800000 0.000000
    +vn 0.317497 0.948259 0.000000
    +vn 0.317497 0.948259 0.000000
    +vn 0.311072 0.948348 -0.062214
    +vn 0.587999 0.800267 -0.117600
    +vn 0.000000 0.948259 -0.317497
    +vn 0.062214 0.948348 -0.311072
    +vn 0.039963 0.979018 -0.199816
    +vn 0.039963 0.979018 -0.199816
    +vn 0.000000 0.978980 -0.203954
    +vn 0.000000 0.948259 -0.317497
    +vn 0.062214 0.948348 -0.311072
    +vn 0.121840 0.948497 -0.292417
    +vn 0.078256 0.979082 -0.187815
    +vn 0.078256 0.979082 -0.187815
    +vn 0.039963 0.979018 -0.199816
    +vn 0.062214 0.948348 -0.311072
    +vn 0.121840 0.948497 -0.292417
    +vn 0.176249 0.948609 -0.262827
    +vn 0.113194 0.979129 -0.168798
    +vn 0.113194 0.979129 -0.168798
    +vn 0.078256 0.979082 -0.187815
    +vn 0.121840 0.948497 -0.292417
    +vn 0.176249 0.948609 -0.262827
    +vn 0.223681 0.948648 -0.223681
    +vn 0.143654 0.979146 -0.143654
    +vn 0.143654 0.979146 -0.143654
    +vn 0.113194 0.979129 -0.168798
    +vn 0.176249 0.948609 -0.262827
    +vn 0.223681 0.948648 -0.223681
    +vn 0.262827 0.948609 -0.176249
    +vn 0.168798 0.979129 -0.113194
    +vn 0.168798 0.979129 -0.113194
    +vn 0.143654 0.979146 -0.143654
    +vn 0.223681 0.948648 -0.223681
    +vn 0.262827 0.948609 -0.176249
    +vn 0.292417 0.948497 -0.121840
    +vn 0.187815 0.979082 -0.078256
    +vn 0.187815 0.979082 -0.078256
    +vn 0.168798 0.979129 -0.113194
    +vn 0.262827 0.948609 -0.176249
    +vn 0.292417 0.948497 -0.121840
    +vn 0.311072 0.948348 -0.062214
    +vn 0.199816 0.979018 -0.039963
    +vn 0.199816 0.979018 -0.039963
    +vn 0.187815 0.979082 -0.078256
    +vn 0.292417 0.948497 -0.121840
    +vn 0.311072 0.948348 -0.062214
    +vn 0.317497 0.948259 0.000000
    +vn 0.203954 0.978980 0.000000
    +vn 0.203954 0.978980 0.000000
    +vn 0.199816 0.979018 -0.039963
    +vn 0.311072 0.948348 -0.062214
    +vn 0.000000 0.978980 -0.203954
    +vn 0.039963 0.979018 -0.199816
    +vn 0.030839 0.987559 -0.154193
    +vn 0.030839 0.987559 -0.154193
    +vn 0.000000 0.987537 -0.157389
    +vn 0.000000 0.978980 -0.203954
    +vn 0.039963 0.979018 -0.199816
    +vn 0.078256 0.979082 -0.187815
    +vn 0.060387 0.987598 -0.144928
    +vn 0.060387 0.987598 -0.144928
    +vn 0.030839 0.987559 -0.154193
    +vn 0.039963 0.979018 -0.199816
    +vn 0.078256 0.979082 -0.187815
    +vn 0.113194 0.979129 -0.168798
    +vn 0.087345 0.987626 -0.130251
    +vn 0.087345 0.987626 -0.130251
    +vn 0.060387 0.987598 -0.144928
    +vn 0.078256 0.979082 -0.187815
    +vn 0.113194 0.979129 -0.168798
    +vn 0.143654 0.979146 -0.143654
    +vn 0.110848 0.987636 -0.110848
    +vn 0.110848 0.987636 -0.110848
    +vn 0.087345 0.987626 -0.130251
    +vn 0.113194 0.979129 -0.168798
    +vn 0.143654 0.979146 -0.143654
    +vn 0.168798 0.979129 -0.113194
    +vn 0.130251 0.987626 -0.087345
    +vn 0.130251 0.987626 -0.087345
    +vn 0.110848 0.987636 -0.110848
    +vn 0.143654 0.979146 -0.143654
    +vn 0.168798 0.979129 -0.113194
    +vn 0.187815 0.979082 -0.078256
    +vn 0.144928 0.987598 -0.060387
    +vn 0.144928 0.987598 -0.060387
    +vn 0.130251 0.987626 -0.087345
    +vn 0.168798 0.979129 -0.113194
    +vn 0.187815 0.979082 -0.078256
    +vn 0.199816 0.979018 -0.039963
    +vn 0.154193 0.987559 -0.030839
    +vn 0.154193 0.987559 -0.030839
    +vn 0.144928 0.987598 -0.060387
    +vn 0.187815 0.979082 -0.078256
    +vn 0.199816 0.979018 -0.039963
    +vn 0.203954 0.978980 0.000000
    +vn 0.157389 0.987537 0.000000
    +vn 0.157389 0.987537 0.000000
    +vn 0.154193 0.987559 -0.030839
    +vn 0.199816 0.979018 -0.039963
    +vn 0.000000 0.987537 -0.157389
    +vn 0.030839 0.987559 -0.154193
    +vn 0.029066 0.988957 -0.145328
    +vn 0.029066 0.988957 -0.145328
    +vn 0.000000 0.988936 -0.148340
    +vn 0.000000 0.987537 -0.157389
    +vn 0.030839 0.987559 -0.154193
    +vn 0.060387 0.987598 -0.144928
    +vn 0.056915 0.988991 -0.136596
    +vn 0.056915 0.988991 -0.136596
    +vn 0.029066 0.988957 -0.145328
    +vn 0.030839 0.987559 -0.154193
    +vn 0.060387 0.987598 -0.144928
    +vn 0.087345 0.987626 -0.130251
    +vn 0.082323 0.989016 -0.122762
    +vn 0.082323 0.989016 -0.122762
    +vn 0.056915 0.988991 -0.136596
    +vn 0.060387 0.987598 -0.144928
    +vn 0.087345 0.987626 -0.130251
    +vn 0.110848 0.987636 -0.110848
    +vn 0.104474 0.989025 -0.104474
    +vn 0.104474 0.989025 -0.104474
    +vn 0.082323 0.989016 -0.122762
    +vn 0.087345 0.987626 -0.130251
    +vn 0.110848 0.987636 -0.110848
    +vn 0.130251 0.987626 -0.087345
    +vn 0.122762 0.989016 -0.082323
    +vn 0.122762 0.989016 -0.082323
    +vn 0.104474 0.989025 -0.104474
    +vn 0.110848 0.987636 -0.110848
    +vn 0.130251 0.987626 -0.087345
    +vn 0.144928 0.987598 -0.060387
    +vn 0.136596 0.988991 -0.056915
    +vn 0.136596 0.988991 -0.056915
    +vn 0.122762 0.989016 -0.082323
    +vn 0.130251 0.987626 -0.087345
    +vn 0.144928 0.987598 -0.060387
    +vn 0.154193 0.987559 -0.030839
    +vn 0.145328 0.988957 -0.029066
    +vn 0.145328 0.988957 -0.029066
    +vn 0.136596 0.988991 -0.056915
    +vn 0.144928 0.987598 -0.060387
    +vn 0.154193 0.987559 -0.030839
    +vn 0.157389 0.987537 0.000000
    +vn 0.148340 0.988936 0.000000
    +vn 0.148340 0.988936 0.000000
    +vn 0.145328 0.988957 -0.029066
    +vn 0.154193 0.987559 -0.030839
    +vn 0.000000 0.988936 -0.148340
    +vn 0.029066 0.988957 -0.145328
    +vn 0.034166 0.984708 -0.170831
    +vn 0.034166 0.984708 -0.170831
    +vn 0.000000 0.984680 -0.174370
    +vn 0.000000 0.988936 -0.148340
    +vn 0.029066 0.988957 -0.145328
    +vn 0.056915 0.988991 -0.136596
    +vn 0.066903 0.984755 -0.160568
    +vn 0.066903 0.984755 -0.160568
    +vn 0.034166 0.984708 -0.170831
    +vn 0.029066 0.988957 -0.145328
    +vn 0.056915 0.988991 -0.136596
    +vn 0.082323 0.989016 -0.122762
    +vn 0.096771 0.984790 -0.144308
    +vn 0.096771 0.984790 -0.144308
    +vn 0.066903 0.984755 -0.160568
    +vn 0.056915 0.988991 -0.136596
    +vn 0.082323 0.989016 -0.122762
    +vn 0.104474 0.989025 -0.104474
    +vn 0.122811 0.984802 -0.122811
    +vn 0.122811 0.984802 -0.122811
    +vn 0.096771 0.984790 -0.144308
    +vn 0.082323 0.989016 -0.122762
    +vn 0.104474 0.989025 -0.104474
    +vn 0.122762 0.989016 -0.082323
    +vn 0.144308 0.984790 -0.096771
    +vn 0.144308 0.984790 -0.096771
    +vn 0.122811 0.984802 -0.122811
    +vn 0.104474 0.989025 -0.104474
    +vn 0.122762 0.989016 -0.082323
    +vn 0.136596 0.988991 -0.056915
    +vn 0.160568 0.984755 -0.066903
    +vn 0.160568 0.984755 -0.066903
    +vn 0.144308 0.984790 -0.096771
    +vn 0.122762 0.989016 -0.082323
    +vn 0.136596 0.988991 -0.056915
    +vn 0.145328 0.988957 -0.029066
    +vn 0.170831 0.984708 -0.034166
    +vn 0.170831 0.984708 -0.034166
    +vn 0.160568 0.984755 -0.066903
    +vn 0.136596 0.988991 -0.056915
    +vn 0.145328 0.988957 -0.029066
    +vn 0.148340 0.988936 0.000000
    +vn 0.174370 0.984680 0.000000
    +vn 0.174370 0.984680 0.000000
    +vn 0.170831 0.984708 -0.034166
    +vn 0.145328 0.988957 -0.029066
    +vn 0.000000 0.984680 -0.174370
    +vn 0.034166 0.984708 -0.170831
    +vn 0.050698 0.966008 -0.253492
    +vn 0.050698 0.966008 -0.253492
    +vn 0.000000 0.965948 -0.258736
    +vn 0.000000 0.984680 -0.174370
    +vn 0.034166 0.984708 -0.170831
    +vn 0.066903 0.984755 -0.160568
    +vn 0.099282 0.966109 -0.238277
    +vn 0.099282 0.966109 -0.238277
    +vn 0.050698 0.966008 -0.253492
    +vn 0.034166 0.984708 -0.170831
    +vn 0.066903 0.984755 -0.160568
    +vn 0.096771 0.984790 -0.144308
    +vn 0.143611 0.966185 -0.214157
    +vn 0.143611 0.966185 -0.214157
    +vn 0.099282 0.966109 -0.238277
    +vn 0.066903 0.984755 -0.160568
    +vn 0.096771 0.984790 -0.144308
    +vn 0.122811 0.984802 -0.122811
    +vn 0.182258 0.966211 -0.182258
    +vn 0.182258 0.966211 -0.182258
    +vn 0.143611 0.966185 -0.214157
    +vn 0.096771 0.984790 -0.144308
    +vn 0.122811 0.984802 -0.122811
    +vn 0.144308 0.984790 -0.096771
    +vn 0.214157 0.966185 -0.143611
    +vn 0.214157 0.966185 -0.143611
    +vn 0.182258 0.966211 -0.182258
    +vn 0.122811 0.984802 -0.122811
    +vn 0.144308 0.984790 -0.096771
    +vn 0.160568 0.984755 -0.066903
    +vn 0.238277 0.966109 -0.099282
    +vn 0.238277 0.966109 -0.099282
    +vn 0.214157 0.966185 -0.143611
    +vn 0.144308 0.984790 -0.096771
    +vn 0.160568 0.984755 -0.066903
    +vn 0.170831 0.984708 -0.034166
    +vn 0.253492 0.966008 -0.050698
    +vn 0.253492 0.966008 -0.050698
    +vn 0.238277 0.966109 -0.099282
    +vn 0.160568 0.984755 -0.066903
    +vn 0.170831 0.984708 -0.034166
    +vn 0.174370 0.984680 0.000000
    +vn 0.258736 0.965948 0.000000
    +vn 0.258736 0.965948 0.000000
    +vn 0.253492 0.966008 -0.050698
    +vn 0.170831 0.984708 -0.034166
    +vn 0.000000 0.965948 -0.258736
    +vn 0.050698 0.966008 -0.253492
    +vn 0.099077 0.863004 -0.495387
    +vn 0.099077 0.863004 -0.495387
    +vn 0.000000 0.862799 -0.505547
    +vn 0.000000 0.965948 -0.258736
    +vn 0.050698 0.966008 -0.253492
    +vn 0.099282 0.966109 -0.238277
    +vn 0.194080 0.863349 -0.465791
    +vn 0.194080 0.863349 -0.465791
    +vn 0.099077 0.863004 -0.495387
    +vn 0.050698 0.966008 -0.253492
    +vn 0.099282 0.966109 -0.238277
    +vn 0.143611 0.966185 -0.214157
    +vn 0.280797 0.863607 -0.418732
    +vn 0.280797 0.863607 -0.418732
    +vn 0.194080 0.863349 -0.465791
    +vn 0.099282 0.966109 -0.238277
    +vn 0.143611 0.966185 -0.214157
    +vn 0.182258 0.966211 -0.182258
    +vn 0.356389 0.863698 -0.356389
    +vn 0.356389 0.863698 -0.356389
    +vn 0.280797 0.863607 -0.418732
    +vn 0.143611 0.966185 -0.214157
    +vn 0.182258 0.966211 -0.182258
    +vn 0.214157 0.966185 -0.143611
    +vn 0.418732 0.863607 -0.280797
    +vn 0.418732 0.863607 -0.280797
    +vn 0.356389 0.863698 -0.356389
    +vn 0.182258 0.966211 -0.182258
    +vn 0.214157 0.966185 -0.143611
    +vn 0.238277 0.966109 -0.099282
    +vn 0.465791 0.863349 -0.194080
    +vn 0.465791 0.863349 -0.194080
    +vn 0.418732 0.863607 -0.280797
    +vn 0.214157 0.966185 -0.143611
    +vn 0.238277 0.966109 -0.099282
    +vn 0.253492 0.966008 -0.050698
    +vn 0.495387 0.863004 -0.099077
    +vn 0.495387 0.863004 -0.099077
    +vn 0.465791 0.863349 -0.194080
    +vn 0.238277 0.966109 -0.099282
    +vn 0.253492 0.966008 -0.050698
    +vn 0.258736 0.965948 0.000000
    +vn 0.505547 0.862799 0.000000
    +vn 0.505547 0.862799 0.000000
    +vn 0.495387 0.863004 -0.099077
    +vn 0.253492 0.966008 -0.050698
    +vn 0.000000 0.862799 -0.505547
    +vn 0.099077 0.863004 -0.495387
    +vn 0.196116 0.000000 -0.980581
    +vn 0.196116 0.000000 -0.980581
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.862799 -0.505547
    +vn 0.099077 0.863004 -0.495387
    +vn 0.194080 0.863349 -0.465791
    +vn 0.384615 0.000000 -0.923077
    +vn 0.384615 0.000000 -0.923077
    +vn 0.196116 0.000000 -0.980581
    +vn 0.099077 0.863004 -0.495387
    +vn 0.194080 0.863349 -0.465791
    +vn 0.280797 0.863607 -0.418732
    +vn 0.556953 0.000000 -0.830544
    +vn 0.556953 0.000000 -0.830544
    +vn 0.384615 0.000000 -0.923077
    +vn 0.194080 0.863349 -0.465791
    +vn 0.280797 0.863607 -0.418732
    +vn 0.356389 0.863698 -0.356389
    +vn 0.707107 0.000000 -0.707107
    +vn 0.707107 0.000000 -0.707107
    +vn 0.556953 0.000000 -0.830544
    +vn 0.280797 0.863607 -0.418732
    +vn 0.356389 0.863698 -0.356389
    +vn 0.418732 0.863607 -0.280797
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.707107 0.000000 -0.707107
    +vn 0.356389 0.863698 -0.356389
    +vn 0.418732 0.863607 -0.280797
    +vn 0.465791 0.863349 -0.194080
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.830544 -0.000000 -0.556953
    +vn 0.418732 0.863607 -0.280797
    +vn 0.465791 0.863349 -0.194080
    +vn 0.495387 0.863004 -0.099077
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.923077 -0.000000 -0.384615
    +vn 0.465791 0.863349 -0.194080
    +vn 0.495387 0.863004 -0.099077
    +vn 0.505547 0.862799 0.000000
    +vn 1.000000 -0.000000 0.000000
    +vn 1.000000 -0.000000 0.000000
    +vn 0.980581 -0.000000 -0.196116
    +vn 0.495387 0.863004 -0.099077
    +vn 0.015548 -0.999874 -0.003110
    +vn 0.015871 -0.999874 -0.000000
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.014614 -0.999875 -0.006089
    +vn 0.015548 -0.999874 -0.003110
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.013133 -0.999875 -0.008807
    +vn 0.014614 -0.999875 -0.006089
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.011177 -0.999875 -0.011177
    +vn 0.013133 -0.999875 -0.008807
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.008807 -0.999875 -0.013133
    +vn 0.011177 -0.999875 -0.011177
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.006089 -0.999875 -0.014614
    +vn 0.008807 -0.999875 -0.013133
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.003110 -0.999874 -0.015548
    +vn 0.006089 -0.999875 -0.014614
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.999874 -0.015871
    +vn 0.003110 -0.999874 -0.015548
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.015871 -0.999874 -0.000000
    +vn 0.015548 -0.999874 -0.003110
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.015871 -0.999874 -0.000000
    +vn 0.015548 -0.999874 -0.003110
    +vn 0.014614 -0.999875 -0.006089
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.015548 -0.999874 -0.003110
    +vn 0.014614 -0.999875 -0.006089
    +vn 0.013133 -0.999875 -0.008807
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.014614 -0.999875 -0.006089
    +vn 0.013133 -0.999875 -0.008807
    +vn 0.011177 -0.999875 -0.011177
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.013133 -0.999875 -0.008807
    +vn 0.011177 -0.999875 -0.011177
    +vn 0.008807 -0.999875 -0.013133
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.011177 -0.999875 -0.011177
    +vn 0.008807 -0.999875 -0.013133
    +vn 0.006089 -0.999875 -0.014614
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.008807 -0.999875 -0.013133
    +vn 0.006089 -0.999875 -0.014614
    +vn 0.003110 -0.999874 -0.015548
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.006089 -0.999875 -0.014614
    +vn 0.003110 -0.999874 -0.015548
    +vn 0.000000 -0.999874 -0.015871
    +vn 0.000000 -0.999219 -0.039517
    +vn 0.000000 -0.999219 -0.039517
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.003110 -0.999874 -0.015548
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.038714 -0.999220 -0.007743
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.036386 -0.999223 -0.015161
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.032701 -0.999225 -0.021929
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.027829 -0.999225 -0.027829
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.021929 -0.999225 -0.032701
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.015161 -0.999223 -0.036386
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.000000 -0.999219 -0.039517
    +vn 0.000000 -0.997031 -0.076999
    +vn 0.000000 -0.997031 -0.076999
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.007743 -0.999220 -0.038714
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.075434 -0.997037 -0.015087
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.070899 -0.997046 -0.029541
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.063718 -0.997053 -0.042728
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.054226 -0.997055 -0.054226
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.042728 -0.997053 -0.063718
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.029541 -0.997046 -0.070899
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.000000 -0.997031 -0.076999
    +vn 0.000000 -0.989950 -0.141421
    +vn 0.000000 -0.989950 -0.141421
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.015087 -0.997037 -0.075434
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.138549 -0.989968 -0.027710
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.130224 -0.989999 -0.054260
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.117035 -0.990022 -0.078482
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.099601 -0.990030 -0.099601
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.078482 -0.990022 -0.117035
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.051716 -0.964604 -0.258581
    +vn 0.051716 -0.964604 -0.258581
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.054260 -0.989999 -0.130224
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.000000 -0.989950 -0.141421
    +vn -0.000000 -0.964542 -0.263929
    +vn -0.000000 -0.964542 -0.263929
    +vn 0.051716 -0.964604 -0.258581
    +vn 0.027710 -0.989968 -0.138549
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.258581 -0.964604 -0.051716
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.243062 -0.964709 -0.101276
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.218458 -0.964788 -0.146495
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.185918 -0.964815 -0.185918
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.146495 -0.964788 -0.218458
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.051716 -0.964604 -0.258581
    +vn 0.100832 -0.857703 -0.504161
    +vn 0.100832 -0.857703 -0.504161
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.101276 -0.964709 -0.243062
    +vn 0.051716 -0.964604 -0.258581
    +vn -0.000000 -0.964542 -0.263929
    +vn -0.000000 -0.857493 -0.514496
    +vn -0.000000 -0.857493 -0.514496
    +vn 0.100832 -0.857703 -0.504161
    +vn 0.051716 -0.964604 -0.258581
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.885832 -0.464007 -0.000000
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.504161 -0.857703 -0.100832
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.474047 -0.858059 -0.197520
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.426159 -0.858324 -0.285777
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.362712 -0.858417 -0.362712
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.285777 -0.858324 -0.426159
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.100832 -0.857703 -0.504161
    +vn 0.173691 -0.464345 -0.868456
    +vn 0.173691 -0.464345 -0.868456
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.197520 -0.858059 -0.474047
    +vn 0.100832 -0.857703 -0.504161
    +vn -0.000000 -0.857493 -0.514496
    +vn 0.000000 -0.464007 -0.885832
    +vn 0.000000 -0.464007 -0.885832
    +vn 0.173691 -0.464345 -0.868456
    +vn 0.100832 -0.857703 -0.504161
    +vn 0.885832 -0.464007 -0.000000
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.980581 0.000000 -0.196116
    +vn 0.980581 0.000000 -0.196116
    +vn 1.000000 0.000000 0.000000
    +vn 0.885832 -0.464007 -0.000000
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.923077 0.000000 -0.384615
    +vn 0.923077 0.000000 -0.384615
    +vn 0.980581 0.000000 -0.196116
    +vn 0.868456 -0.464345 -0.173691
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.830544 0.000000 -0.556953
    +vn 0.830544 0.000000 -0.556953
    +vn 0.923077 0.000000 -0.384615
    +vn 0.817250 -0.464917 -0.340521
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.707107 0.000000 -0.707107
    +vn 0.707107 0.000000 -0.707107
    +vn 0.830544 0.000000 -0.556953
    +vn 0.735139 -0.465344 -0.492976
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.556953 0.000000 -0.830544
    +vn 0.556953 0.000000 -0.830544
    +vn 0.707107 0.000000 -0.707107
    +vn 0.625825 -0.465495 -0.625825
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.384615 0.000000 -0.923077
    +vn 0.384615 0.000000 -0.923077
    +vn 0.556953 0.000000 -0.830544
    +vn 0.492976 -0.465344 -0.735139
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.173691 -0.464345 -0.868456
    +vn 0.196116 0.000000 -0.980581
    +vn 0.196116 0.000000 -0.980581
    +vn 0.384615 0.000000 -0.923077
    +vn 0.340521 -0.464917 -0.817250
    +vn 0.173691 -0.464345 -0.868456
    +vn 0.000000 -0.464007 -0.885832
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 0.000000 -1.000000
    +vn 0.196116 0.000000 -0.980581
    +vn 0.173691 -0.464345 -0.868456
    +vn -0.003110 -0.999874 -0.015548
    +vn 0.000000 -0.999874 -0.015871
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.006089 -0.999875 -0.014614
    +vn -0.003110 -0.999874 -0.015548
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.008807 -0.999875 -0.013133
    +vn -0.006089 -0.999875 -0.014614
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.011177 -0.999875 -0.011177
    +vn -0.008807 -0.999875 -0.013133
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.013133 -0.999875 -0.008807
    +vn -0.011177 -0.999875 -0.011177
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.014614 -0.999875 -0.006089
    +vn -0.013133 -0.999875 -0.008807
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.015548 -0.999874 -0.003110
    +vn -0.014614 -0.999875 -0.006089
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.015871 -0.999874 -0.000000
    +vn -0.015548 -0.999874 -0.003110
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.999874 -0.015871
    +vn -0.003110 -0.999874 -0.015548
    +vn -0.007743 -0.999220 -0.038714
    +vn -0.007743 -0.999220 -0.038714
    +vn 0.000000 -0.999219 -0.039517
    +vn 0.000000 -0.999874 -0.015871
    +vn -0.003110 -0.999874 -0.015548
    +vn -0.006089 -0.999875 -0.014614
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.007743 -0.999220 -0.038714
    +vn -0.003110 -0.999874 -0.015548
    +vn -0.006089 -0.999875 -0.014614
    +vn -0.008807 -0.999875 -0.013133
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.006089 -0.999875 -0.014614
    +vn -0.008807 -0.999875 -0.013133
    +vn -0.011177 -0.999875 -0.011177
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.008807 -0.999875 -0.013133
    +vn -0.011177 -0.999875 -0.011177
    +vn -0.013133 -0.999875 -0.008807
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.011177 -0.999875 -0.011177
    +vn -0.013133 -0.999875 -0.008807
    +vn -0.014614 -0.999875 -0.006089
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.013133 -0.999875 -0.008807
    +vn -0.014614 -0.999875 -0.006089
    +vn -0.015548 -0.999874 -0.003110
    +vn -0.038714 -0.999220 -0.007743
    +vn -0.038714 -0.999220 -0.007743
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.014614 -0.999875 -0.006089
    +vn -0.015548 -0.999874 -0.003110
    +vn -0.015871 -0.999874 -0.000000
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.038714 -0.999220 -0.007743
    +vn -0.015548 -0.999874 -0.003110
    +vn 0.000000 -0.999219 -0.039517
    +vn -0.007743 -0.999220 -0.038714
    +vn -0.015087 -0.997037 -0.075434
    +vn -0.015087 -0.997037 -0.075434
    +vn 0.000000 -0.997031 -0.076999
    +vn 0.000000 -0.999219 -0.039517
    +vn -0.007743 -0.999220 -0.038714
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.015087 -0.997037 -0.075434
    +vn -0.007743 -0.999220 -0.038714
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.015161 -0.999223 -0.036386
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.021929 -0.999225 -0.032701
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.027829 -0.999225 -0.027829
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.032701 -0.999225 -0.021929
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.038714 -0.999220 -0.007743
    +vn -0.075434 -0.997037 -0.015087
    +vn -0.075434 -0.997037 -0.015087
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.036386 -0.999223 -0.015161
    +vn -0.038714 -0.999220 -0.007743
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.075434 -0.997037 -0.015087
    +vn -0.038714 -0.999220 -0.007743
    +vn 0.000000 -0.997031 -0.076999
    +vn -0.015087 -0.997037 -0.075434
    +vn -0.027710 -0.989968 -0.138549
    +vn -0.027710 -0.989968 -0.138549
    +vn 0.000000 -0.989950 -0.141421
    +vn 0.000000 -0.997031 -0.076999
    +vn -0.015087 -0.997037 -0.075434
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.027710 -0.989968 -0.138549
    +vn -0.015087 -0.997037 -0.075434
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.029541 -0.997046 -0.070899
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.042728 -0.997053 -0.063718
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.054226 -0.997055 -0.054226
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.063718 -0.997053 -0.042728
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.075434 -0.997037 -0.015087
    +vn -0.138549 -0.989968 -0.027710
    +vn -0.138549 -0.989968 -0.027710
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.070899 -0.997046 -0.029541
    +vn -0.075434 -0.997037 -0.015087
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.138549 -0.989968 -0.027710
    +vn -0.075434 -0.997037 -0.015087
    +vn 0.000000 -0.989950 -0.141421
    +vn -0.027710 -0.989968 -0.138549
    +vn -0.051716 -0.964604 -0.258581
    +vn -0.051716 -0.964604 -0.258581
    +vn 0.000000 -0.964542 -0.263929
    +vn 0.000000 -0.989950 -0.141421
    +vn -0.027710 -0.989968 -0.138549
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.051716 -0.964604 -0.258581
    +vn -0.027710 -0.989968 -0.138549
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.054260 -0.989999 -0.130224
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.078482 -0.990022 -0.117035
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.099601 -0.990030 -0.099601
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.117035 -0.990022 -0.078482
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.138549 -0.989968 -0.027710
    +vn -0.258581 -0.964604 -0.051716
    +vn -0.258581 -0.964604 -0.051716
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.130224 -0.989999 -0.054260
    +vn -0.138549 -0.989968 -0.027710
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.258581 -0.964604 -0.051716
    +vn -0.138549 -0.989968 -0.027710
    +vn 0.000000 -0.964542 -0.263929
    +vn -0.051716 -0.964604 -0.258581
    +vn -0.100832 -0.857703 -0.504161
    +vn -0.100832 -0.857703 -0.504161
    +vn 0.000000 -0.857493 -0.514496
    +vn 0.000000 -0.964542 -0.263929
    +vn -0.051716 -0.964604 -0.258581
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.100832 -0.857703 -0.504161
    +vn -0.051716 -0.964604 -0.258581
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.101276 -0.964709 -0.243062
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.146495 -0.964788 -0.218458
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.185918 -0.964815 -0.185918
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.218458 -0.964788 -0.146495
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.258581 -0.964604 -0.051716
    +vn -0.504161 -0.857703 -0.100832
    +vn -0.504161 -0.857703 -0.100832
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.243062 -0.964709 -0.101276
    +vn -0.258581 -0.964604 -0.051716
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.504161 -0.857703 -0.100832
    +vn -0.258581 -0.964604 -0.051716
    +vn 0.000000 -0.857493 -0.514496
    +vn -0.100832 -0.857703 -0.504161
    +vn -0.173691 -0.464345 -0.868456
    +vn -0.173691 -0.464345 -0.868456
    +vn 0.000000 -0.464007 -0.885832
    +vn 0.000000 -0.857493 -0.514496
    +vn -0.100832 -0.857703 -0.504161
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.173691 -0.464345 -0.868456
    +vn -0.100832 -0.857703 -0.504161
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.197520 -0.858059 -0.474047
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.285777 -0.858324 -0.426159
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.362712 -0.858417 -0.362712
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.426159 -0.858324 -0.285777
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.504161 -0.857703 -0.100832
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.474047 -0.858059 -0.197520
    +vn -0.504161 -0.857703 -0.100832
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.885832 -0.464007 -0.000000
    +vn -0.885832 -0.464007 -0.000000
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.504161 -0.857703 -0.100832
    +vn 0.000000 -0.464007 -0.885832
    +vn -0.173691 -0.464345 -0.868456
    +vn -0.196116 0.000000 -0.980581
    +vn -0.196116 0.000000 -0.980581
    +vn 0.000000 0.000000 -1.000000
    +vn 0.000000 -0.464007 -0.885832
    +vn -0.173691 -0.464345 -0.868456
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.384615 0.000000 -0.923077
    +vn -0.384615 0.000000 -0.923077
    +vn -0.196116 0.000000 -0.980581
    +vn -0.173691 -0.464345 -0.868456
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.556953 0.000000 -0.830544
    +vn -0.556953 0.000000 -0.830544
    +vn -0.384615 0.000000 -0.923077
    +vn -0.340521 -0.464917 -0.817250
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.707107 0.000000 -0.707107
    +vn -0.707107 0.000000 -0.707107
    +vn -0.556953 0.000000 -0.830544
    +vn -0.492976 -0.465344 -0.735139
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.830544 0.000000 -0.556953
    +vn -0.830544 0.000000 -0.556953
    +vn -0.707107 0.000000 -0.707107
    +vn -0.625825 -0.465495 -0.625825
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.923077 0.000000 -0.384615
    +vn -0.923077 0.000000 -0.384615
    +vn -0.830544 0.000000 -0.556953
    +vn -0.735139 -0.465344 -0.492976
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.980581 0.000000 -0.196116
    +vn -0.980581 0.000000 -0.196116
    +vn -0.923077 0.000000 -0.384615
    +vn -0.817250 -0.464917 -0.340521
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.885832 -0.464007 -0.000000
    +vn -1.000000 0.000000 -0.000000
    +vn -1.000000 0.000000 -0.000000
    +vn -0.980581 0.000000 -0.196116
    +vn -0.868456 -0.464345 -0.173691
    +vn -0.015548 -0.999874 0.003110
    +vn -0.015871 -0.999874 -0.000000
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.014614 -0.999875 0.006089
    +vn -0.015548 -0.999874 0.003110
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.013133 -0.999875 0.008807
    +vn -0.014614 -0.999875 0.006089
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.011177 -0.999875 0.011177
    +vn -0.013133 -0.999875 0.008807
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.008807 -0.999875 0.013133
    +vn -0.011177 -0.999875 0.011177
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.006089 -0.999875 0.014614
    +vn -0.008807 -0.999875 0.013133
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.003110 -0.999874 0.015548
    +vn -0.006089 -0.999875 0.014614
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.999874 0.015871
    +vn -0.003110 -0.999874 0.015548
    +vn 0.000000 -1.000000 -0.000000
    +vn -0.015871 -0.999874 -0.000000
    +vn -0.015548 -0.999874 0.003110
    +vn -0.038714 -0.999220 0.007743
    +vn -0.038714 -0.999220 0.007743
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.015871 -0.999874 -0.000000
    +vn -0.015548 -0.999874 0.003110
    +vn -0.014614 -0.999875 0.006089
    +vn -0.036386 -0.999223 0.015161
    +vn -0.036386 -0.999223 0.015161
    +vn -0.038714 -0.999220 0.007743
    +vn -0.015548 -0.999874 0.003110
    +vn -0.014614 -0.999875 0.006089
    +vn -0.013133 -0.999875 0.008807
    +vn -0.032701 -0.999225 0.021929
    +vn -0.032701 -0.999225 0.021929
    +vn -0.036386 -0.999223 0.015161
    +vn -0.014614 -0.999875 0.006089
    +vn -0.013133 -0.999875 0.008807
    +vn -0.011177 -0.999875 0.011177
    +vn -0.027829 -0.999225 0.027829
    +vn -0.027829 -0.999225 0.027829
    +vn -0.032701 -0.999225 0.021929
    +vn -0.013133 -0.999875 0.008807
    +vn -0.011177 -0.999875 0.011177
    +vn -0.008807 -0.999875 0.013133
    +vn -0.021929 -0.999225 0.032701
    +vn -0.021929 -0.999225 0.032701
    +vn -0.027829 -0.999225 0.027829
    +vn -0.011177 -0.999875 0.011177
    +vn -0.008807 -0.999875 0.013133
    +vn -0.006089 -0.999875 0.014614
    +vn -0.015161 -0.999223 0.036386
    +vn -0.015161 -0.999223 0.036386
    +vn -0.021929 -0.999225 0.032701
    +vn -0.008807 -0.999875 0.013133
    +vn -0.006089 -0.999875 0.014614
    +vn -0.003110 -0.999874 0.015548
    +vn -0.007743 -0.999220 0.038714
    +vn -0.007743 -0.999220 0.038714
    +vn -0.015161 -0.999223 0.036386
    +vn -0.006089 -0.999875 0.014614
    +vn -0.003110 -0.999874 0.015548
    +vn 0.000000 -0.999874 0.015871
    +vn -0.000000 -0.999219 0.039517
    +vn -0.000000 -0.999219 0.039517
    +vn -0.007743 -0.999220 0.038714
    +vn -0.003110 -0.999874 0.015548
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.038714 -0.999220 0.007743
    +vn -0.075434 -0.997037 0.015087
    +vn -0.075434 -0.997037 0.015087
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.039517 -0.999219 -0.000000
    +vn -0.038714 -0.999220 0.007743
    +vn -0.036386 -0.999223 0.015161
    +vn -0.070899 -0.997046 0.029541
    +vn -0.070899 -0.997046 0.029541
    +vn -0.075434 -0.997037 0.015087
    +vn -0.038714 -0.999220 0.007743
    +vn -0.036386 -0.999223 0.015161
    +vn -0.032701 -0.999225 0.021929
    +vn -0.063718 -0.997053 0.042728
    +vn -0.063718 -0.997053 0.042728
    +vn -0.070899 -0.997046 0.029541
    +vn -0.036386 -0.999223 0.015161
    +vn -0.032701 -0.999225 0.021929
    +vn -0.027829 -0.999225 0.027829
    +vn -0.054226 -0.997055 0.054226
    +vn -0.054226 -0.997055 0.054226
    +vn -0.063718 -0.997053 0.042728
    +vn -0.032701 -0.999225 0.021929
    +vn -0.027829 -0.999225 0.027829
    +vn -0.021929 -0.999225 0.032701
    +vn -0.042728 -0.997053 0.063718
    +vn -0.042728 -0.997053 0.063718
    +vn -0.054226 -0.997055 0.054226
    +vn -0.027829 -0.999225 0.027829
    +vn -0.021929 -0.999225 0.032701
    +vn -0.015161 -0.999223 0.036386
    +vn -0.029541 -0.997046 0.070899
    +vn -0.029541 -0.997046 0.070899
    +vn -0.042728 -0.997053 0.063718
    +vn -0.021929 -0.999225 0.032701
    +vn -0.015161 -0.999223 0.036386
    +vn -0.007743 -0.999220 0.038714
    +vn -0.015087 -0.997037 0.075434
    +vn -0.015087 -0.997037 0.075434
    +vn -0.029541 -0.997046 0.070899
    +vn -0.015161 -0.999223 0.036386
    +vn -0.007743 -0.999220 0.038714
    +vn -0.000000 -0.999219 0.039517
    +vn -0.000000 -0.997031 0.076999
    +vn -0.000000 -0.997031 0.076999
    +vn -0.015087 -0.997037 0.075434
    +vn -0.007743 -0.999220 0.038714
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.075434 -0.997037 0.015087
    +vn -0.138549 -0.989968 0.027710
    +vn -0.138549 -0.989968 0.027710
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.076999 -0.997031 -0.000000
    +vn -0.075434 -0.997037 0.015087
    +vn -0.070899 -0.997046 0.029541
    +vn -0.130224 -0.989999 0.054260
    +vn -0.130224 -0.989999 0.054260
    +vn -0.138549 -0.989968 0.027710
    +vn -0.075434 -0.997037 0.015087
    +vn -0.070899 -0.997046 0.029541
    +vn -0.063718 -0.997053 0.042728
    +vn -0.117035 -0.990022 0.078482
    +vn -0.117035 -0.990022 0.078482
    +vn -0.130224 -0.989999 0.054260
    +vn -0.070899 -0.997046 0.029541
    +vn -0.063718 -0.997053 0.042728
    +vn -0.054226 -0.997055 0.054226
    +vn -0.099601 -0.990030 0.099601
    +vn -0.099601 -0.990030 0.099601
    +vn -0.117035 -0.990022 0.078482
    +vn -0.063718 -0.997053 0.042728
    +vn -0.054226 -0.997055 0.054226
    +vn -0.042728 -0.997053 0.063718
    +vn -0.078482 -0.990022 0.117035
    +vn -0.078482 -0.990022 0.117035
    +vn -0.099601 -0.990030 0.099601
    +vn -0.054226 -0.997055 0.054226
    +vn -0.042728 -0.997053 0.063718
    +vn -0.029541 -0.997046 0.070899
    +vn -0.054260 -0.989999 0.130224
    +vn -0.054260 -0.989999 0.130224
    +vn -0.078482 -0.990022 0.117035
    +vn -0.042728 -0.997053 0.063718
    +vn -0.029541 -0.997046 0.070899
    +vn -0.015087 -0.997037 0.075434
    +vn -0.027710 -0.989968 0.138549
    +vn -0.027710 -0.989968 0.138549
    +vn -0.054260 -0.989999 0.130224
    +vn -0.029541 -0.997046 0.070899
    +vn -0.015087 -0.997037 0.075434
    +vn -0.000000 -0.997031 0.076999
    +vn -0.000000 -0.989950 0.141421
    +vn -0.000000 -0.989950 0.141421
    +vn -0.027710 -0.989968 0.138549
    +vn -0.015087 -0.997037 0.075434
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.138549 -0.989968 0.027710
    +vn -0.258581 -0.964604 0.051716
    +vn -0.258581 -0.964604 0.051716
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.141421 -0.989950 -0.000000
    +vn -0.138549 -0.989968 0.027710
    +vn -0.130224 -0.989999 0.054260
    +vn -0.243062 -0.964709 0.101276
    +vn -0.243062 -0.964709 0.101276
    +vn -0.258581 -0.964604 0.051716
    +vn -0.138549 -0.989968 0.027710
    +vn -0.130224 -0.989999 0.054260
    +vn -0.117035 -0.990022 0.078482
    +vn -0.218458 -0.964788 0.146495
    +vn -0.218458 -0.964788 0.146495
    +vn -0.243062 -0.964709 0.101276
    +vn -0.130224 -0.989999 0.054260
    +vn -0.117035 -0.990022 0.078482
    +vn -0.099601 -0.990030 0.099601
    +vn -0.185918 -0.964815 0.185918
    +vn -0.185918 -0.964815 0.185918
    +vn -0.218458 -0.964788 0.146495
    +vn -0.117035 -0.990022 0.078482
    +vn -0.099601 -0.990030 0.099601
    +vn -0.078482 -0.990022 0.117035
    +vn -0.146495 -0.964788 0.218458
    +vn -0.146495 -0.964788 0.218458
    +vn -0.185918 -0.964815 0.185918
    +vn -0.099601 -0.990030 0.099601
    +vn -0.078482 -0.990022 0.117035
    +vn -0.054260 -0.989999 0.130224
    +vn -0.101276 -0.964709 0.243062
    +vn -0.101276 -0.964709 0.243062
    +vn -0.146495 -0.964788 0.218458
    +vn -0.078482 -0.990022 0.117035
    +vn -0.054260 -0.989999 0.130224
    +vn -0.027710 -0.989968 0.138549
    +vn -0.051716 -0.964604 0.258581
    +vn -0.051716 -0.964604 0.258581
    +vn -0.101276 -0.964709 0.243062
    +vn -0.054260 -0.989999 0.130224
    +vn -0.027710 -0.989968 0.138549
    +vn -0.000000 -0.989950 0.141421
    +vn 0.000000 -0.964542 0.263929
    +vn 0.000000 -0.964542 0.263929
    +vn -0.051716 -0.964604 0.258581
    +vn -0.027710 -0.989968 0.138549
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.258581 -0.964604 0.051716
    +vn -0.504161 -0.857703 0.100832
    +vn -0.504161 -0.857703 0.100832
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.263929 -0.964542 -0.000000
    +vn -0.258581 -0.964604 0.051716
    +vn -0.243062 -0.964709 0.101276
    +vn -0.474047 -0.858059 0.197520
    +vn -0.474047 -0.858059 0.197520
    +vn -0.504161 -0.857703 0.100832
    +vn -0.258581 -0.964604 0.051716
    +vn -0.243062 -0.964709 0.101276
    +vn -0.218458 -0.964788 0.146495
    +vn -0.426159 -0.858324 0.285777
    +vn -0.426159 -0.858324 0.285777
    +vn -0.474047 -0.858059 0.197520
    +vn -0.243062 -0.964709 0.101276
    +vn -0.218458 -0.964788 0.146495
    +vn -0.185918 -0.964815 0.185918
    +vn -0.362712 -0.858417 0.362712
    +vn -0.362712 -0.858417 0.362712
    +vn -0.426159 -0.858324 0.285777
    +vn -0.218458 -0.964788 0.146495
    +vn -0.185918 -0.964815 0.185918
    +vn -0.146495 -0.964788 0.218458
    +vn -0.285777 -0.858324 0.426159
    +vn -0.285777 -0.858324 0.426159
    +vn -0.362712 -0.858417 0.362712
    +vn -0.185918 -0.964815 0.185918
    +vn -0.146495 -0.964788 0.218458
    +vn -0.101276 -0.964709 0.243062
    +vn -0.197520 -0.858059 0.474047
    +vn -0.197520 -0.858059 0.474047
    +vn -0.285777 -0.858324 0.426159
    +vn -0.146495 -0.964788 0.218458
    +vn -0.101276 -0.964709 0.243062
    +vn -0.051716 -0.964604 0.258581
    +vn -0.100832 -0.857703 0.504161
    +vn -0.100832 -0.857703 0.504161
    +vn -0.197520 -0.858059 0.474047
    +vn -0.101276 -0.964709 0.243062
    +vn -0.051716 -0.964604 0.258581
    +vn 0.000000 -0.964542 0.263929
    +vn 0.000000 -0.857493 0.514496
    +vn 0.000000 -0.857493 0.514496
    +vn -0.100832 -0.857703 0.504161
    +vn -0.051716 -0.964604 0.258581
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.504161 -0.857703 0.100832
    +vn -0.868456 -0.464345 0.173691
    +vn -0.868456 -0.464345 0.173691
    +vn -0.885832 -0.464007 -0.000000
    +vn -0.514496 -0.857493 -0.000000
    +vn -0.504161 -0.857703 0.100832
    +vn -0.474047 -0.858059 0.197520
    +vn -0.817250 -0.464917 0.340521
    +vn -0.817250 -0.464917 0.340521
    +vn -0.868456 -0.464345 0.173691
    +vn -0.504161 -0.857703 0.100832
    +vn -0.474047 -0.858059 0.197520
    +vn -0.426159 -0.858324 0.285777
    +vn -0.735139 -0.465344 0.492976
    +vn -0.735139 -0.465344 0.492976
    +vn -0.817250 -0.464917 0.340521
    +vn -0.474047 -0.858059 0.197520
    +vn -0.426159 -0.858324 0.285777
    +vn -0.362712 -0.858417 0.362712
    +vn -0.625825 -0.465495 0.625825
    +vn -0.625825 -0.465495 0.625825
    +vn -0.735139 -0.465344 0.492976
    +vn -0.426159 -0.858324 0.285777
    +vn -0.362712 -0.858417 0.362712
    +vn -0.285777 -0.858324 0.426159
    +vn -0.492976 -0.465344 0.735139
    +vn -0.492976 -0.465344 0.735139
    +vn -0.625825 -0.465495 0.625825
    +vn -0.362712 -0.858417 0.362712
    +vn -0.285777 -0.858324 0.426159
    +vn -0.197520 -0.858059 0.474047
    +vn -0.340521 -0.464917 0.817250
    +vn -0.340521 -0.464917 0.817250
    +vn -0.492976 -0.465344 0.735139
    +vn -0.285777 -0.858324 0.426159
    +vn -0.197520 -0.858059 0.474047
    +vn -0.100832 -0.857703 0.504161
    +vn -0.173691 -0.464345 0.868456
    +vn -0.173691 -0.464345 0.868456
    +vn -0.340521 -0.464917 0.817250
    +vn -0.197520 -0.858059 0.474047
    +vn -0.100832 -0.857703 0.504161
    +vn 0.000000 -0.857493 0.514496
    +vn -0.000000 -0.464007 0.885832
    +vn -0.000000 -0.464007 0.885832
    +vn -0.173691 -0.464345 0.868456
    +vn -0.100832 -0.857703 0.504161
    +vn -0.885832 -0.464007 -0.000000
    +vn -0.868456 -0.464345 0.173691
    +vn -0.980581 0.000000 0.196116
    +vn -0.980581 0.000000 0.196116
    +vn -1.000000 0.000000 0.000000
    +vn -0.885832 -0.464007 -0.000000
    +vn -0.868456 -0.464345 0.173691
    +vn -0.817250 -0.464917 0.340521
    +vn -0.923077 0.000000 0.384615
    +vn -0.923077 0.000000 0.384615
    +vn -0.980581 0.000000 0.196116
    +vn -0.868456 -0.464345 0.173691
    +vn -0.817250 -0.464917 0.340521
    +vn -0.735139 -0.465344 0.492976
    +vn -0.830544 0.000000 0.556953
    +vn -0.830544 0.000000 0.556953
    +vn -0.923077 0.000000 0.384615
    +vn -0.817250 -0.464917 0.340521
    +vn -0.735139 -0.465344 0.492976
    +vn -0.625825 -0.465495 0.625825
    +vn -0.707107 0.000000 0.707107
    +vn -0.707107 0.000000 0.707107
    +vn -0.830544 0.000000 0.556953
    +vn -0.735139 -0.465344 0.492976
    +vn -0.625825 -0.465495 0.625825
    +vn -0.492976 -0.465344 0.735139
    +vn -0.556953 0.000000 0.830544
    +vn -0.556953 0.000000 0.830544
    +vn -0.707107 0.000000 0.707107
    +vn -0.625825 -0.465495 0.625825
    +vn -0.492976 -0.465344 0.735139
    +vn -0.340521 -0.464917 0.817250
    +vn -0.384615 0.000000 0.923077
    +vn -0.384615 0.000000 0.923077
    +vn -0.556953 0.000000 0.830544
    +vn -0.492976 -0.465344 0.735139
    +vn -0.340521 -0.464917 0.817250
    +vn -0.173691 -0.464345 0.868456
    +vn -0.196116 0.000000 0.980581
    +vn -0.196116 0.000000 0.980581
    +vn -0.384615 0.000000 0.923077
    +vn -0.340521 -0.464917 0.817250
    +vn -0.173691 -0.464345 0.868456
    +vn -0.000000 -0.464007 0.885832
    +vn -0.000000 0.000000 1.000000
    +vn -0.000000 0.000000 1.000000
    +vn -0.196116 0.000000 0.980581
    +vn -0.173691 -0.464345 0.868456
    +vn 0.003110 -0.999874 0.015548
    +vn 0.000000 -0.999874 0.015871
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.006089 -0.999875 0.014614
    +vn 0.003110 -0.999874 0.015548
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.008807 -0.999875 0.013133
    +vn 0.006089 -0.999875 0.014614
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.011177 -0.999875 0.011177
    +vn 0.008807 -0.999875 0.013133
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.013133 -0.999875 0.008807
    +vn 0.011177 -0.999875 0.011177
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.014614 -0.999875 0.006089
    +vn 0.013133 -0.999875 0.008807
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.015548 -0.999874 0.003110
    +vn 0.014614 -0.999875 0.006089
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.015871 -0.999874 -0.000000
    +vn 0.015548 -0.999874 0.003110
    +vn 0.000000 -1.000000 -0.000000
    +vn 0.000000 -0.999874 0.015871
    +vn 0.003110 -0.999874 0.015548
    +vn 0.007743 -0.999220 0.038714
    +vn 0.007743 -0.999220 0.038714
    +vn 0.000000 -0.999219 0.039517
    +vn 0.000000 -0.999874 0.015871
    +vn 0.003110 -0.999874 0.015548
    +vn 0.006089 -0.999875 0.014614
    +vn 0.015161 -0.999223 0.036386
    +vn 0.015161 -0.999223 0.036386
    +vn 0.007743 -0.999220 0.038714
    +vn 0.003110 -0.999874 0.015548
    +vn 0.006089 -0.999875 0.014614
    +vn 0.008807 -0.999875 0.013133
    +vn 0.021929 -0.999225 0.032701
    +vn 0.021929 -0.999225 0.032701
    +vn 0.015161 -0.999223 0.036386
    +vn 0.006089 -0.999875 0.014614
    +vn 0.008807 -0.999875 0.013133
    +vn 0.011177 -0.999875 0.011177
    +vn 0.027829 -0.999225 0.027829
    +vn 0.027829 -0.999225 0.027829
    +vn 0.021929 -0.999225 0.032701
    +vn 0.008807 -0.999875 0.013133
    +vn 0.011177 -0.999875 0.011177
    +vn 0.013133 -0.999875 0.008807
    +vn 0.032701 -0.999225 0.021929
    +vn 0.032701 -0.999225 0.021929
    +vn 0.027829 -0.999225 0.027829
    +vn 0.011177 -0.999875 0.011177
    +vn 0.013133 -0.999875 0.008807
    +vn 0.014614 -0.999875 0.006089
    +vn 0.036386 -0.999223 0.015161
    +vn 0.036386 -0.999223 0.015161
    +vn 0.032701 -0.999225 0.021929
    +vn 0.013133 -0.999875 0.008807
    +vn 0.014614 -0.999875 0.006089
    +vn 0.015548 -0.999874 0.003110
    +vn 0.038714 -0.999220 0.007743
    +vn 0.038714 -0.999220 0.007743
    +vn 0.036386 -0.999223 0.015161
    +vn 0.014614 -0.999875 0.006089
    +vn 0.015548 -0.999874 0.003110
    +vn 0.015871 -0.999874 -0.000000
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.038714 -0.999220 0.007743
    +vn 0.015548 -0.999874 0.003110
    +vn 0.000000 -0.999219 0.039517
    +vn 0.007743 -0.999220 0.038714
    +vn 0.015087 -0.997037 0.075434
    +vn 0.015087 -0.997037 0.075434
    +vn 0.000000 -0.997031 0.076999
    +vn 0.000000 -0.999219 0.039517
    +vn 0.007743 -0.999220 0.038714
    +vn 0.015161 -0.999223 0.036386
    +vn 0.029541 -0.997046 0.070899
    +vn 0.029541 -0.997046 0.070899
    +vn 0.015087 -0.997037 0.075434
    +vn 0.007743 -0.999220 0.038714
    +vn 0.015161 -0.999223 0.036386
    +vn 0.021929 -0.999225 0.032701
    +vn 0.042728 -0.997053 0.063718
    +vn 0.042728 -0.997053 0.063718
    +vn 0.029541 -0.997046 0.070899
    +vn 0.015161 -0.999223 0.036386
    +vn 0.021929 -0.999225 0.032701
    +vn 0.027829 -0.999225 0.027829
    +vn 0.054226 -0.997055 0.054226
    +vn 0.054226 -0.997055 0.054226
    +vn 0.042728 -0.997053 0.063718
    +vn 0.021929 -0.999225 0.032701
    +vn 0.027829 -0.999225 0.027829
    +vn 0.032701 -0.999225 0.021929
    +vn 0.063718 -0.997053 0.042728
    +vn 0.063718 -0.997053 0.042728
    +vn 0.054226 -0.997055 0.054226
    +vn 0.027829 -0.999225 0.027829
    +vn 0.032701 -0.999225 0.021929
    +vn 0.036386 -0.999223 0.015161
    +vn 0.070899 -0.997046 0.029541
    +vn 0.070899 -0.997046 0.029541
    +vn 0.063718 -0.997053 0.042728
    +vn 0.032701 -0.999225 0.021929
    +vn 0.036386 -0.999223 0.015161
    +vn 0.038714 -0.999220 0.007743
    +vn 0.075434 -0.997037 0.015087
    +vn 0.075434 -0.997037 0.015087
    +vn 0.070899 -0.997046 0.029541
    +vn 0.036386 -0.999223 0.015161
    +vn 0.038714 -0.999220 0.007743
    +vn 0.039517 -0.999219 -0.000000
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.075434 -0.997037 0.015087
    +vn 0.038714 -0.999220 0.007743
    +vn 0.000000 -0.997031 0.076999
    +vn 0.015087 -0.997037 0.075434
    +vn 0.027710 -0.989968 0.138549
    +vn 0.027710 -0.989968 0.138549
    +vn 0.000000 -0.989950 0.141421
    +vn 0.000000 -0.997031 0.076999
    +vn 0.015087 -0.997037 0.075434
    +vn 0.029541 -0.997046 0.070899
    +vn 0.054260 -0.989999 0.130224
    +vn 0.054260 -0.989999 0.130224
    +vn 0.027710 -0.989968 0.138549
    +vn 0.015087 -0.997037 0.075434
    +vn 0.029541 -0.997046 0.070899
    +vn 0.042728 -0.997053 0.063718
    +vn 0.078482 -0.990022 0.117035
    +vn 0.078482 -0.990022 0.117035
    +vn 0.054260 -0.989999 0.130224
    +vn 0.029541 -0.997046 0.070899
    +vn 0.042728 -0.997053 0.063718
    +vn 0.054226 -0.997055 0.054226
    +vn 0.099601 -0.990030 0.099601
    +vn 0.099601 -0.990030 0.099601
    +vn 0.078482 -0.990022 0.117035
    +vn 0.042728 -0.997053 0.063718
    +vn 0.054226 -0.997055 0.054226
    +vn 0.063718 -0.997053 0.042728
    +vn 0.117035 -0.990022 0.078482
    +vn 0.117035 -0.990022 0.078482
    +vn 0.099601 -0.990030 0.099601
    +vn 0.054226 -0.997055 0.054226
    +vn 0.063718 -0.997053 0.042728
    +vn 0.070899 -0.997046 0.029541
    +vn 0.130224 -0.989999 0.054260
    +vn 0.130224 -0.989999 0.054260
    +vn 0.117035 -0.990022 0.078482
    +vn 0.063718 -0.997053 0.042728
    +vn 0.070899 -0.997046 0.029541
    +vn 0.075434 -0.997037 0.015087
    +vn 0.138549 -0.989968 0.027710
    +vn 0.138549 -0.989968 0.027710
    +vn 0.130224 -0.989999 0.054260
    +vn 0.070899 -0.997046 0.029541
    +vn 0.075434 -0.997037 0.015087
    +vn 0.076999 -0.997031 -0.000000
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.138549 -0.989968 0.027710
    +vn 0.075434 -0.997037 0.015087
    +vn 0.000000 -0.989950 0.141421
    +vn 0.027710 -0.989968 0.138549
    +vn 0.051716 -0.964604 0.258581
    +vn 0.051716 -0.964604 0.258581
    +vn 0.000000 -0.964542 0.263929
    +vn 0.000000 -0.989950 0.141421
    +vn 0.027710 -0.989968 0.138549
    +vn 0.054260 -0.989999 0.130224
    +vn 0.101276 -0.964709 0.243062
    +vn 0.101276 -0.964709 0.243062
    +vn 0.051716 -0.964604 0.258581
    +vn 0.027710 -0.989968 0.138549
    +vn 0.054260 -0.989999 0.130224
    +vn 0.078482 -0.990022 0.117035
    +vn 0.146495 -0.964788 0.218458
    +vn 0.146495 -0.964788 0.218458
    +vn 0.101276 -0.964709 0.243062
    +vn 0.054260 -0.989999 0.130224
    +vn 0.078482 -0.990022 0.117035
    +vn 0.099601 -0.990030 0.099601
    +vn 0.185918 -0.964815 0.185918
    +vn 0.185918 -0.964815 0.185918
    +vn 0.146495 -0.964788 0.218458
    +vn 0.078482 -0.990022 0.117035
    +vn 0.099601 -0.990030 0.099601
    +vn 0.117035 -0.990022 0.078482
    +vn 0.218458 -0.964788 0.146495
    +vn 0.218458 -0.964788 0.146495
    +vn 0.185918 -0.964815 0.185918
    +vn 0.099601 -0.990030 0.099601
    +vn 0.117035 -0.990022 0.078482
    +vn 0.130224 -0.989999 0.054260
    +vn 0.243062 -0.964709 0.101276
    +vn 0.243062 -0.964709 0.101276
    +vn 0.218458 -0.964788 0.146495
    +vn 0.117035 -0.990022 0.078482
    +vn 0.130224 -0.989999 0.054260
    +vn 0.138549 -0.989968 0.027710
    +vn 0.258581 -0.964604 0.051716
    +vn 0.258581 -0.964604 0.051716
    +vn 0.243062 -0.964709 0.101276
    +vn 0.130224 -0.989999 0.054260
    +vn 0.138549 -0.989968 0.027710
    +vn 0.141421 -0.989950 -0.000000
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.258581 -0.964604 0.051716
    +vn 0.138549 -0.989968 0.027710
    +vn 0.000000 -0.964542 0.263929
    +vn 0.051716 -0.964604 0.258581
    +vn 0.100832 -0.857703 0.504161
    +vn 0.100832 -0.857703 0.504161
    +vn 0.000000 -0.857493 0.514496
    +vn 0.000000 -0.964542 0.263929
    +vn 0.051716 -0.964604 0.258581
    +vn 0.101276 -0.964709 0.243062
    +vn 0.197520 -0.858059 0.474047
    +vn 0.197520 -0.858059 0.474047
    +vn 0.100832 -0.857703 0.504161
    +vn 0.051716 -0.964604 0.258581
    +vn 0.101276 -0.964709 0.243062
    +vn 0.146495 -0.964788 0.218458
    +vn 0.285777 -0.858324 0.426159
    +vn 0.285777 -0.858324 0.426159
    +vn 0.197520 -0.858059 0.474047
    +vn 0.101276 -0.964709 0.243062
    +vn 0.146495 -0.964788 0.218458
    +vn 0.185918 -0.964815 0.185918
    +vn 0.362712 -0.858417 0.362712
    +vn 0.362712 -0.858417 0.362712
    +vn 0.285777 -0.858324 0.426159
    +vn 0.146495 -0.964788 0.218458
    +vn 0.185918 -0.964815 0.185918
    +vn 0.218458 -0.964788 0.146495
    +vn 0.426159 -0.858324 0.285777
    +vn 0.426159 -0.858324 0.285777
    +vn 0.362712 -0.858417 0.362712
    +vn 0.185918 -0.964815 0.185918
    +vn 0.218458 -0.964788 0.146495
    +vn 0.243062 -0.964709 0.101276
    +vn 0.474047 -0.858059 0.197520
    +vn 0.474047 -0.858059 0.197520
    +vn 0.426159 -0.858324 0.285777
    +vn 0.218458 -0.964788 0.146495
    +vn 0.243062 -0.964709 0.101276
    +vn 0.258581 -0.964604 0.051716
    +vn 0.504161 -0.857703 0.100832
    +vn 0.504161 -0.857703 0.100832
    +vn 0.474047 -0.858059 0.197520
    +vn 0.243062 -0.964709 0.101276
    +vn 0.258581 -0.964604 0.051716
    +vn 0.263929 -0.964542 -0.000000
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.504161 -0.857703 0.100832
    +vn 0.258581 -0.964604 0.051716
    +vn 0.000000 -0.857493 0.514496
    +vn 0.100832 -0.857703 0.504161
    +vn 0.173691 -0.464345 0.868456
    +vn 0.173691 -0.464345 0.868456
    +vn 0.000000 -0.464007 0.885832
    +vn 0.000000 -0.857493 0.514496
    +vn 0.100832 -0.857703 0.504161
    +vn 0.197520 -0.858059 0.474047
    +vn 0.340521 -0.464917 0.817250
    +vn 0.340521 -0.464917 0.817250
    +vn 0.173691 -0.464345 0.868456
    +vn 0.100832 -0.857703 0.504161
    +vn 0.197520 -0.858059 0.474047
    +vn 0.285777 -0.858324 0.426159
    +vn 0.492976 -0.465344 0.735139
    +vn 0.492976 -0.465344 0.735139
    +vn 0.340521 -0.464917 0.817250
    +vn 0.197520 -0.858059 0.474047
    +vn 0.285777 -0.858324 0.426159
    +vn 0.362712 -0.858417 0.362712
    +vn 0.625825 -0.465495 0.625825
    +vn 0.625825 -0.465495 0.625825
    +vn 0.492976 -0.465344 0.735139
    +vn 0.285777 -0.858324 0.426159
    +vn 0.362712 -0.858417 0.362712
    +vn 0.426159 -0.858324 0.285777
    +vn 0.735139 -0.465344 0.492976
    +vn 0.735139 -0.465344 0.492976
    +vn 0.625825 -0.465495 0.625825
    +vn 0.362712 -0.858417 0.362712
    +vn 0.426159 -0.858324 0.285777
    +vn 0.474047 -0.858059 0.197520
    +vn 0.817250 -0.464917 0.340521
    +vn 0.817250 -0.464917 0.340521
    +vn 0.735139 -0.465344 0.492976
    +vn 0.426159 -0.858324 0.285777
    +vn 0.474047 -0.858059 0.197520
    +vn 0.504161 -0.857703 0.100832
    +vn 0.868456 -0.464345 0.173691
    +vn 0.868456 -0.464345 0.173691
    +vn 0.817250 -0.464917 0.340521
    +vn 0.474047 -0.858059 0.197520
    +vn 0.504161 -0.857703 0.100832
    +vn 0.514496 -0.857493 -0.000000
    +vn 0.885832 -0.464007 0.000000
    +vn 0.885832 -0.464007 0.000000
    +vn 0.868456 -0.464345 0.173691
    +vn 0.504161 -0.857703 0.100832
    +vn 0.000000 -0.464007 0.885832
    +vn 0.173691 -0.464345 0.868456
    +vn 0.196116 0.000000 0.980581
    +vn 0.196116 0.000000 0.980581
    +vn 0.000000 0.000000 1.000000
    +vn 0.000000 -0.464007 0.885832
    +vn 0.173691 -0.464345 0.868456
    +vn 0.340521 -0.464917 0.817250
    +vn 0.384615 0.000000 0.923077
    +vn 0.384615 0.000000 0.923077
    +vn 0.196116 0.000000 0.980581
    +vn 0.173691 -0.464345 0.868456
    +vn 0.340521 -0.464917 0.817250
    +vn 0.492976 -0.465344 0.735139
    +vn 0.556953 0.000000 0.830544
    +vn 0.556953 0.000000 0.830544
    +vn 0.384615 0.000000 0.923077
    +vn 0.340521 -0.464917 0.817250
    +vn 0.492976 -0.465344 0.735139
    +vn 0.625825 -0.465495 0.625825
    +vn 0.707107 0.000000 0.707107
    +vn 0.707107 0.000000 0.707107
    +vn 0.556953 0.000000 0.830544
    +vn 0.492976 -0.465344 0.735139
    +vn 0.625825 -0.465495 0.625825
    +vn 0.735139 -0.465344 0.492976
    +vn 0.830544 0.000000 0.556953
    +vn 0.830544 0.000000 0.556953
    +vn 0.707107 0.000000 0.707107
    +vn 0.625825 -0.465495 0.625825
    +vn 0.735139 -0.465344 0.492976
    +vn 0.817250 -0.464917 0.340521
    +vn 0.923077 0.000000 0.384615
    +vn 0.923077 0.000000 0.384615
    +vn 0.830544 0.000000 0.556953
    +vn 0.735139 -0.465344 0.492976
    +vn 0.817250 -0.464917 0.340521
    +vn 0.868456 -0.464345 0.173691
    +vn 0.980581 0.000000 0.196116
    +vn 0.980581 0.000000 0.196116
    +vn 0.923077 0.000000 0.384615
    +vn 0.817250 -0.464917 0.340521
    +vn 0.868456 -0.464345 0.173691
    +vn 0.885832 -0.464007 0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 1.000000 0.000000 0.000000
    +vn 0.980581 0.000000 0.196116
    +vn 0.868456 -0.464345 0.173691
    +f 1//1 2//2 3//3
    +f 4//4 5//5 6//6
    +f 7//7 8//8 9//9
    +f 10//10 11//11 12//12
    +f 13//13 14//14 15//15
    +f 16//16 17//17 18//18
    +f 19//19 20//20 21//21
    +f 22//22 23//23 24//24
    +f 25//25 26//26 27//27
    +f 28//28 29//29 30//30
    +f 31//31 32//32 33//33
    +f 34//34 35//35 36//36
    +f 37//37 38//38 39//39
    +f 40//40 41//41 42//42
    +f 43//43 44//44 45//45
    +f 46//46 47//47 48//48
    +f 49//49 50//50 51//51
    +f 52//52 53//53 54//54
    +f 55//55 56//56 57//57
    +f 58//58 59//59 60//60
    +f 61//61 62//62 63//63
    +f 64//64 65//65 66//66
    +f 67//67 68//68 69//69
    +f 70//70 71//71 72//72
    +f 73//73 74//74 75//75
    +f 76//76 77//77 78//78
    +f 79//79 80//80 81//81
    +f 82//82 83//83 84//84
    +f 85//85 86//86 87//87
    +f 88//88 89//89 90//90
    +f 91//91 92//92 93//93
    +f 94//94 95//95 96//96
    +f 97//97 98//98 99//99
    +f 100//100 101//101 102//102
    +f 103//103 104//104 105//105
    +f 106//106 107//107 108//108
    +f 109//109 110//110 111//111
    +f 112//112 113//113 114//114
    +f 115//115 116//116 117//117
    +f 118//118 119//119 120//120
    +f 121//121 122//122 123//123
    +f 124//124 125//125 126//126
    +f 127//127 128//128 129//129
    +f 130//130 131//131 132//132
    +f 133//133 134//134 135//135
    +f 136//136 137//137 138//138
    +f 139//139 140//140 141//141
    +f 142//142 143//143 144//144
    +f 145//145 146//146 147//147
    +f 148//148 149//149 150//150
    +f 151//151 152//152 153//153
    +f 154//154 155//155 156//156
    +f 157//157 158//158 159//159
    +f 160//160 161//161 162//162
    +f 163//163 164//164 165//165
    +f 166//166 167//167 168//168
    +f 169//169 170//170 171//171
    +f 172//172 173//173 174//174
    +f 175//175 176//176 177//177
    +f 178//178 179//179 180//180
    +f 181//181 182//182 183//183
    +f 184//184 185//185 186//186
    +f 187//187 188//188 189//189
    +f 190//190 191//191 192//192
    +f 193//193 194//194 195//195
    +f 196//196 197//197 198//198
    +f 199//199 200//200 201//201
    +f 202//202 203//203 204//204
    +f 205//205 206//206 207//207
    +f 208//208 209//209 210//210
    +f 211//211 212//212 213//213
    +f 214//214 215//215 216//216
    +f 217//217 218//218 219//219
    +f 220//220 221//221 222//222
    +f 223//223 224//224 225//225
    +f 226//226 227//227 228//228
    +f 229//229 230//230 231//231
    +f 232//232 233//233 234//234
    +f 235//235 236//236 237//237
    +f 238//238 239//239 240//240
    +f 241//241 242//242 243//243
    +f 244//244 245//245 246//246
    +f 247//247 248//248 249//249
    +f 250//250 251//251 252//252
    +f 253//253 254//254 255//255
    +f 256//256 257//257 258//258
    +f 259//259 260//260 261//261
    +f 262//262 263//263 264//264
    +f 265//265 266//266 267//267
    +f 268//268 269//269 270//270
    +f 271//271 272//272 273//273
    +f 274//274 275//275 276//276
    +f 277//277 278//278 279//279
    +f 280//280 281//281 282//282
    +f 283//283 284//284 285//285
    +f 286//286 287//287 288//288
    +f 289//289 290//290 291//291
    +f 292//292 293//293 294//294
    +f 295//295 296//296 297//297
    +f 298//298 299//299 300//300
    +f 301//301 302//302 303//303
    +f 304//304 305//305 306//306
    +f 307//307 308//308 309//309
    +f 310//310 311//311 312//312
    +f 313//313 314//314 315//315
    +f 316//316 317//317 318//318
    +f 319//319 320//320 321//321
    +f 322//322 323//323 324//324
    +f 325//325 326//326 327//327
    +f 328//328 329//329 330//330
    +f 331//331 332//332 333//333
    +f 334//334 335//335 336//336
    +f 337//337 338//338 339//339
    +f 340//340 341//341 342//342
    +f 343//343 344//344 345//345
    +f 346//346 347//347 348//348
    +f 349//349 350//350 351//351
    +f 352//352 353//353 354//354
    +f 355//355 356//356 357//357
    +f 358//358 359//359 360//360
    +f 361//361 362//362 363//363
    +f 364//364 365//365 366//366
    +f 367//367 368//368 369//369
    +f 370//370 371//371 372//372
    +f 373//373 374//374 375//375
    +f 376//376 377//377 378//378
    +f 379//379 380//380 381//381
    +f 382//382 383//383 384//384
    +f 385//385 386//386 387//387
    +f 388//388 389//389 390//390
    +f 391//391 392//392 393//393
    +f 394//394 395//395 396//396
    +f 397//397 398//398 399//399
    +f 400//400 401//401 402//402
    +f 403//403 404//404 405//405
    +f 406//406 407//407 408//408
    +f 409//409 410//410 411//411
    +f 412//412 413//413 414//414
    +f 415//415 416//416 417//417
    +f 418//418 419//419 420//420
    +f 421//421 422//422 423//423
    +f 424//424 425//425 426//426
    +f 427//427 428//428 429//429
    +f 430//430 431//431 432//432
    +f 433//433 434//434 435//435
    +f 436//436 437//437 438//438
    +f 439//439 440//440 441//441
    +f 442//442 443//443 444//444
    +f 445//445 446//446 447//447
    +f 448//448 449//449 450//450
    +f 451//451 452//452 453//453
    +f 454//454 455//455 456//456
    +f 457//457 458//458 459//459
    +f 460//460 461//461 462//462
    +f 463//463 464//464 465//465
    +f 466//466 467//467 468//468
    +f 469//469 470//470 471//471
    +f 472//472 473//473 474//474
    +f 475//475 476//476 477//477
    +f 478//478 479//479 480//480
    +f 481//481 482//482 483//483
    +f 484//484 485//485 486//486
    +f 487//487 488//488 489//489
    +f 490//490 491//491 492//492
    +f 493//493 494//494 495//495
    +f 496//496 497//497 498//498
    +f 499//499 500//500 501//501
    +f 502//502 503//503 504//504
    +f 505//505 506//506 507//507
    +f 508//508 509//509 510//510
    +f 511//511 512//512 513//513
    +f 514//514 515//515 516//516
    +f 517//517 518//518 519//519
    +f 520//520 521//521 522//522
    +f 523//523 524//524 525//525
    +f 526//526 527//527 528//528
    +f 529//529 530//530 531//531
    +f 532//532 533//533 534//534
    +f 535//535 536//536 537//537
    +f 538//538 539//539 540//540
    +f 541//541 542//542 543//543
    +f 544//544 545//545 546//546
    +f 547//547 548//548 549//549
    +f 550//550 551//551 552//552
    +f 553//553 554//554 555//555
    +f 556//556 557//557 558//558
    +f 559//559 560//560 561//561
    +f 562//562 563//563 564//564
    +f 565//565 566//566 567//567
    +f 568//568 569//569 570//570
    +f 571//571 572//572 573//573
    +f 574//574 575//575 576//576
    +f 577//577 578//578 579//579
    +f 580//580 581//581 582//582
    +f 583//583 584//584 585//585
    +f 586//586 587//587 588//588
    +f 589//589 590//590 591//591
    +f 592//592 593//593 594//594
    +f 595//595 596//596 597//597
    +f 598//598 599//599 600//600
    +f 601//601 602//602 603//603
    +f 604//604 605//605 606//606
    +f 607//607 608//608 609//609
    +f 610//610 611//611 612//612
    +f 613//613 614//614 615//615
    +f 616//616 617//617 618//618
    +f 619//619 620//620 621//621
    +f 622//622 623//623 624//624
    +f 625//625 626//626 627//627
    +f 628//628 629//629 630//630
    +f 631//631 632//632 633//633
    +f 634//634 635//635 636//636
    +f 637//637 638//638 639//639
    +f 640//640 641//641 642//642
    +f 643//643 644//644 645//645
    +f 646//646 647//647 648//648
    +f 649//649 650//650 651//651
    +f 652//652 653//653 654//654
    +f 655//655 656//656 657//657
    +f 658//658 659//659 660//660
    +f 661//661 662//662 663//663
    +f 664//664 665//665 666//666
    +f 667//667 668//668 669//669
    +f 670//670 671//671 672//672
    +f 673//673 674//674 675//675
    +f 676//676 677//677 678//678
    +f 679//679 680//680 681//681
    +f 682//682 683//683 684//684
    +f 685//685 686//686 687//687
    +f 688//688 689//689 690//690
    +f 691//691 692//692 693//693
    +f 694//694 695//695 696//696
    +f 697//697 698//698 699//699
    +f 700//700 701//701 702//702
    +f 703//703 704//704 705//705
    +f 706//706 707//707 708//708
    +f 709//709 710//710 711//711
    +f 712//712 713//713 714//714
    +f 715//715 716//716 717//717
    +f 718//718 719//719 720//720
    +f 721//721 722//722 723//723
    +f 724//724 725//725 726//726
    +f 727//727 728//728 729//729
    +f 730//730 731//731 732//732
    +f 733//733 734//734 735//735
    +f 736//736 737//737 738//738
    +f 739//739 740//740 741//741
    +f 742//742 743//743 744//744
    +f 745//745 746//746 747//747
    +f 748//748 749//749 750//750
    +f 751//751 752//752 753//753
    +f 754//754 755//755 756//756
    +f 757//757 758//758 759//759
    +f 760//760 761//761 762//762
    +f 763//763 764//764 765//765
    +f 766//766 767//767 768//768
    +f 769//769 770//770 771//771
    +f 772//772 773//773 774//774
    +f 775//775 776//776 777//777
    +f 778//778 779//779 780//780
    +f 781//781 782//782 783//783
    +f 784//784 785//785 786//786
    +f 787//787 788//788 789//789
    +f 790//790 791//791 792//792
    +f 793//793 794//794 795//795
    +f 796//796 797//797 798//798
    +f 799//799 800//800 801//801
    +f 802//802 803//803 804//804
    +f 805//805 806//806 807//807
    +f 808//808 809//809 810//810
    +f 811//811 812//812 813//813
    +f 814//814 815//815 816//816
    +f 817//817 818//818 819//819
    +f 820//820 821//821 822//822
    +f 823//823 824//824 825//825
    +f 826//826 827//827 828//828
    +f 829//829 830//830 831//831
    +f 832//832 833//833 834//834
    +f 835//835 836//836 837//837
    +f 838//838 839//839 840//840
    +f 841//841 842//842 843//843
    +f 844//844 845//845 846//846
    +f 847//847 848//848 849//849
    +f 850//850 851//851 852//852
    +f 853//853 854//854 855//855
    +f 856//856 857//857 858//858
    +f 859//859 860//860 861//861
    +f 862//862 863//863 864//864
    +f 865//865 866//866 867//867
    +f 868//868 869//869 870//870
    +f 871//871 872//872 873//873
    +f 874//874 875//875 876//876
    +f 877//877 878//878 879//879
    +f 880//880 881//881 882//882
    +f 883//883 884//884 885//885
    +f 886//886 887//887 888//888
    +f 889//889 890//890 891//891
    +f 892//892 893//893 894//894
    +f 895//895 896//896 897//897
    +f 898//898 899//899 900//900
    +f 901//901 902//902 903//903
    +f 904//904 905//905 906//906
    +f 907//907 908//908 909//909
    +f 910//910 911//911 912//912
    +f 913//913 914//914 915//915
    +f 916//916 917//917 918//918
    +f 919//919 920//920 921//921
    +f 922//922 923//923 924//924
    +f 925//925 926//926 927//927
    +f 928//928 929//929 930//930
    +f 931//931 932//932 933//933
    +f 934//934 935//935 936//936
    +f 937//937 938//938 939//939
    +f 940//940 941//941 942//942
    +f 943//943 944//944 945//945
    +f 946//946 947//947 948//948
    +f 949//949 950//950 951//951
    +f 952//952 953//953 954//954
    +f 955//955 956//956 957//957
    +f 958//958 959//959 960//960
    +f 961//961 962//962 963//963
    +f 964//964 965//965 966//966
    +f 967//967 968//968 969//969
    +f 970//970 971//971 972//972
    +f 973//973 974//974 975//975
    +f 976//976 977//977 978//978
    +f 979//979 980//980 981//981
    +f 982//982 983//983 984//984
    +f 985//985 986//986 987//987
    +f 988//988 989//989 990//990
    +f 991//991 992//992 993//993
    +f 994//994 995//995 996//996
    +f 997//997 998//998 999//999
    +f 1000//1000 1001//1001 1002//1002
    +f 1003//1003 1004//1004 1005//1005
    +f 1006//1006 1007//1007 1008//1008
    +f 1009//1009 1010//1010 1011//1011
    +f 1012//1012 1013//1013 1014//1014
    +f 1015//1015 1016//1016 1017//1017
    +f 1018//1018 1019//1019 1020//1020
    +f 1021//1021 1022//1022 1023//1023
    +f 1024//1024 1025//1025 1026//1026
    +f 1027//1027 1028//1028 1029//1029
    +f 1030//1030 1031//1031 1032//1032
    +f 1033//1033 1034//1034 1035//1035
    +f 1036//1036 1037//1037 1038//1038
    +f 1039//1039 1040//1040 1041//1041
    +f 1042//1042 1043//1043 1044//1044
    +f 1045//1045 1046//1046 1047//1047
    +f 1048//1048 1049//1049 1050//1050
    +f 1051//1051 1052//1052 1053//1053
    +f 1054//1054 1055//1055 1056//1056
    +f 1057//1057 1058//1058 1059//1059
    +f 1060//1060 1061//1061 1062//1062
    +f 1063//1063 1064//1064 1065//1065
    +f 1066//1066 1067//1067 1068//1068
    +f 1069//1069 1070//1070 1071//1071
    +f 1072//1072 1073//1073 1074//1074
    +f 1075//1075 1076//1076 1077//1077
    +f 1078//1078 1079//1079 1080//1080
    +f 1081//1081 1082//1082 1083//1083
    +f 1084//1084 1085//1085 1086//1086
    +f 1087//1087 1088//1088 1089//1089
    +f 1090//1090 1091//1091 1092//1092
    +f 1093//1093 1094//1094 1095//1095
    +f 1096//1096 1097//1097 1098//1098
    +f 1099//1099 1100//1100 1101//1101
    +f 1102//1102 1103//1103 1104//1104
    +f 1105//1105 1106//1106 1107//1107
    +f 1108//1108 1109//1109 1110//1110
    +f 1111//1111 1112//1112 1113//1113
    +f 1114//1114 1115//1115 1116//1116
    +f 1117//1117 1118//1118 1119//1119
    +f 1120//1120 1121//1121 1122//1122
    +f 1123//1123 1124//1124 1125//1125
    +f 1126//1126 1127//1127 1128//1128
    +f 1129//1129 1130//1130 1131//1131
    +f 1132//1132 1133//1133 1134//1134
    +f 1135//1135 1136//1136 1137//1137
    +f 1138//1138 1139//1139 1140//1140
    +f 1141//1141 1142//1142 1143//1143
    +f 1144//1144 1145//1145 1146//1146
    +f 1147//1147 1148//1148 1149//1149
    +f 1150//1150 1151//1151 1152//1152
    +f 1153//1153 1154//1154 1155//1155
    +f 1156//1156 1157//1157 1158//1158
    +f 1159//1159 1160//1160 1161//1161
    +f 1162//1162 1163//1163 1164//1164
    +f 1165//1165 1166//1166 1167//1167
    +f 1168//1168 1169//1169 1170//1170
    +f 1171//1171 1172//1172 1173//1173
    +f 1174//1174 1175//1175 1176//1176
    +f 1177//1177 1178//1178 1179//1179
    +f 1180//1180 1181//1181 1182//1182
    +f 1183//1183 1184//1184 1185//1185
    +f 1186//1186 1187//1187 1188//1188
    +f 1189//1189 1190//1190 1191//1191
    +f 1192//1192 1193//1193 1194//1194
    +f 1195//1195 1196//1196 1197//1197
    +f 1198//1198 1199//1199 1200//1200
    +f 1201//1201 1202//1202 1203//1203
    +f 1204//1204 1205//1205 1206//1206
    +f 1207//1207 1208//1208 1209//1209
    +f 1210//1210 1211//1211 1212//1212
    +f 1213//1213 1214//1214 1215//1215
    +f 1216//1216 1217//1217 1218//1218
    +f 1219//1219 1220//1220 1221//1221
    +f 1222//1222 1223//1223 1224//1224
    +f 1225//1225 1226//1226 1227//1227
    +f 1228//1228 1229//1229 1230//1230
    +f 1231//1231 1232//1232 1233//1233
    +f 1234//1234 1235//1235 1236//1236
    +f 1237//1237 1238//1238 1239//1239
    +f 1240//1240 1241//1241 1242//1242
    +f 1243//1243 1244//1244 1245//1245
    +f 1246//1246 1247//1247 1248//1248
    +f 1249//1249 1250//1250 1251//1251
    +f 1252//1252 1253//1253 1254//1254
    +f 1255//1255 1256//1256 1257//1257
    +f 1258//1258 1259//1259 1260//1260
    +f 1261//1261 1262//1262 1263//1263
    +f 1264//1264 1265//1265 1266//1266
    +f 1267//1267 1268//1268 1269//1269
    +f 1270//1270 1271//1271 1272//1272
    +f 1273//1273 1274//1274 1275//1275
    +f 1276//1276 1277//1277 1278//1278
    +f 1279//1279 1280//1280 1281//1281
    +f 1282//1282 1283//1283 1284//1284
    +f 1285//1285 1286//1286 1287//1287
    +f 1288//1288 1289//1289 1290//1290
    +f 1291//1291 1292//1292 1293//1293
    +f 1294//1294 1295//1295 1296//1296
    +f 1297//1297 1298//1298 1299//1299
    +f 1300//1300 1301//1301 1302//1302
    +f 1303//1303 1304//1304 1305//1305
    +f 1306//1306 1307//1307 1308//1308
    +f 1309//1309 1310//1310 1311//1311
    +f 1312//1312 1313//1313 1314//1314
    +f 1315//1315 1316//1316 1317//1317
    +f 1318//1318 1319//1319 1320//1320
    +f 1321//1321 1322//1322 1323//1323
    +f 1324//1324 1325//1325 1326//1326
    +f 1327//1327 1328//1328 1329//1329
    +f 1330//1330 1331//1331 1332//1332
    +f 1333//1333 1334//1334 1335//1335
    +f 1336//1336 1337//1337 1338//1338
    +f 1339//1339 1340//1340 1341//1341
    +f 1342//1342 1343//1343 1344//1344
    +f 1345//1345 1346//1346 1347//1347
    +f 1348//1348 1349//1349 1350//1350
    +f 1351//1351 1352//1352 1353//1353
    +f 1354//1354 1355//1355 1356//1356
    +f 1357//1357 1358//1358 1359//1359
    +f 1360//1360 1361//1361 1362//1362
    +f 1363//1363 1364//1364 1365//1365
    +f 1366//1366 1367//1367 1368//1368
    +f 1369//1369 1370//1370 1371//1371
    +f 1372//1372 1373//1373 1374//1374
    +f 1375//1375 1376//1376 1377//1377
    +f 1378//1378 1379//1379 1380//1380
    +f 1381//1381 1382//1382 1383//1383
    +f 1384//1384 1385//1385 1386//1386
    +f 1387//1387 1388//1388 1389//1389
    +f 1390//1390 1391//1391 1392//1392
    +f 1393//1393 1394//1394 1395//1395
    +f 1396//1396 1397//1397 1398//1398
    +f 1399//1399 1400//1400 1401//1401
    +f 1402//1402 1403//1403 1404//1404
    +f 1405//1405 1406//1406 1407//1407
    +f 1408//1408 1409//1409 1410//1410
    +f 1411//1411 1412//1412 1413//1413
    +f 1414//1414 1415//1415 1416//1416
    +f 1417//1417 1418//1418 1419//1419
    +f 1420//1420 1421//1421 1422//1422
    +f 1423//1423 1424//1424 1425//1425
    +f 1426//1426 1427//1427 1428//1428
    +f 1429//1429 1430//1430 1431//1431
    +f 1432//1432 1433//1433 1434//1434
    +f 1435//1435 1436//1436 1437//1437
    +f 1438//1438 1439//1439 1440//1440
    +f 1441//1441 1442//1442 1443//1443
    +f 1444//1444 1445//1445 1446//1446
    +f 1447//1447 1448//1448 1449//1449
    +f 1450//1450 1451//1451 1452//1452
    +f 1453//1453 1454//1454 1455//1455
    +f 1456//1456 1457//1457 1458//1458
    +f 1459//1459 1460//1460 1461//1461
    +f 1462//1462 1463//1463 1464//1464
    +f 1465//1465 1466//1466 1467//1467
    +f 1468//1468 1469//1469 1470//1470
    +f 1471//1471 1472//1472 1473//1473
    +f 1474//1474 1475//1475 1476//1476
    +f 1477//1477 1478//1478 1479//1479
    +f 1480//1480 1481//1481 1482//1482
    +f 1483//1483 1484//1484 1485//1485
    +f 1486//1486 1487//1487 1488//1488
    +f 1489//1489 1490//1490 1491//1491
    +f 1492//1492 1493//1493 1494//1494
    +f 1495//1495 1496//1496 1497//1497
    +f 1498//1498 1499//1499 1500//1500
    +f 1501//1501 1502//1502 1503//1503
    +f 1504//1504 1505//1505 1506//1506
    +f 1507//1507 1508//1508 1509//1509
    +f 1510//1510 1511//1511 1512//1512
    +f 1513//1513 1514//1514 1515//1515
    +f 1516//1516 1517//1517 1518//1518
    +f 1519//1519 1520//1520 1521//1521
    +f 1522//1522 1523//1523 1524//1524
    +f 1525//1525 1526//1526 1527//1527
    +f 1528//1528 1529//1529 1530//1530
    +f 1531//1531 1532//1532 1533//1533
    +f 1534//1534 1535//1535 1536//1536
    +f 1537//1537 1538//1538 1539//1539
    +f 1540//1540 1541//1541 1542//1542
    +f 1543//1543 1544//1544 1545//1545
    +f 1546//1546 1547//1547 1548//1548
    +f 1549//1549 1550//1550 1551//1551
    +f 1552//1552 1553//1553 1554//1554
    +f 1555//1555 1556//1556 1557//1557
    +f 1558//1558 1559//1559 1560//1560
    +f 1561//1561 1562//1562 1563//1563
    +f 1564//1564 1565//1565 1566//1566
    +f 1567//1567 1568//1568 1569//1569
    +f 1570//1570 1571//1571 1572//1572
    +f 1573//1573 1574//1574 1575//1575
    +f 1576//1576 1577//1577 1578//1578
    +f 1579//1579 1580//1580 1581//1581
    +f 1582//1582 1583//1583 1584//1584
    +f 1585//1585 1586//1586 1587//1587
    +f 1588//1588 1589//1589 1590//1590
    +f 1591//1591 1592//1592 1593//1593
    +f 1594//1594 1595//1595 1596//1596
    +f 1597//1597 1598//1598 1599//1599
    +f 1600//1600 1601//1601 1602//1602
    +f 1603//1603 1604//1604 1605//1605
    +f 1606//1606 1607//1607 1608//1608
    +f 1609//1609 1610//1610 1611//1611
    +f 1612//1612 1613//1613 1614//1614
    +f 1615//1615 1616//1616 1617//1617
    +f 1618//1618 1619//1619 1620//1620
    +f 1621//1621 1622//1622 1623//1623
    +f 1624//1624 1625//1625 1626//1626
    +f 1627//1627 1628//1628 1629//1629
    +f 1630//1630 1631//1631 1632//1632
    +f 1633//1633 1634//1634 1635//1635
    +f 1636//1636 1637//1637 1638//1638
    +f 1639//1639 1640//1640 1641//1641
    +f 1642//1642 1643//1643 1644//1644
    +f 1645//1645 1646//1646 1647//1647
    +f 1648//1648 1649//1649 1650//1650
    +f 1651//1651 1652//1652 1653//1653
    +f 1654//1654 1655//1655 1656//1656
    +f 1657//1657 1658//1658 1659//1659
    +f 1660//1660 1661//1661 1662//1662
    +f 1663//1663 1664//1664 1665//1665
    +f 1666//1666 1667//1667 1668//1668
    +f 1669//1669 1670//1670 1671//1671
    +f 1672//1672 1673//1673 1674//1674
    +f 1675//1675 1676//1676 1677//1677
    +f 1678//1678 1679//1679 1680//1680
    +f 1681//1681 1682//1682 1683//1683
    +f 1684//1684 1685//1685 1686//1686
    +f 1687//1687 1688//1688 1689//1689
    +f 1690//1690 1691//1691 1692//1692
    +f 1693//1693 1694//1694 1695//1695
    +f 1696//1696 1697//1697 1698//1698
    +f 1699//1699 1700//1700 1701//1701
    +f 1702//1702 1703//1703 1704//1704
    +f 1705//1705 1706//1706 1707//1707
    +f 1708//1708 1709//1709 1710//1710
    +f 1711//1711 1712//1712 1713//1713
    +f 1714//1714 1715//1715 1716//1716
    +f 1717//1717 1718//1718 1719//1719
    +f 1720//1720 1721//1721 1722//1722
    +f 1723//1723 1724//1724 1725//1725
    +f 1726//1726 1727//1727 1728//1728
    +f 1729//1729 1730//1730 1731//1731
    +f 1732//1732 1733//1733 1734//1734
    +f 1735//1735 1736//1736 1737//1737
    +f 1738//1738 1739//1739 1740//1740
    +f 1741//1741 1742//1742 1743//1743
    +f 1744//1744 1745//1745 1746//1746
    +f 1747//1747 1748//1748 1749//1749
    +f 1750//1750 1751//1751 1752//1752
    +f 1753//1753 1754//1754 1755//1755
    +f 1756//1756 1757//1757 1758//1758
    +f 1759//1759 1760//1760 1761//1761
    +f 1762//1762 1763//1763 1764//1764
    +f 1765//1765 1766//1766 1767//1767
    +f 1768//1768 1769//1769 1770//1770
    +f 1771//1771 1772//1772 1773//1773
    +f 1774//1774 1775//1775 1776//1776
    +f 1777//1777 1778//1778 1779//1779
    +f 1780//1780 1781//1781 1782//1782
    +f 1783//1783 1784//1784 1785//1785
    +f 1786//1786 1787//1787 1788//1788
    +f 1789//1789 1790//1790 1791//1791
    +f 1792//1792 1793//1793 1794//1794
    +f 1795//1795 1796//1796 1797//1797
    +f 1798//1798 1799//1799 1800//1800
    +f 1801//1801 1802//1802 1803//1803
    +f 1804//1804 1805//1805 1806//1806
    +f 1807//1807 1808//1808 1809//1809
    +f 1810//1810 1811//1811 1812//1812
    +f 1813//1813 1814//1814 1815//1815
    +f 1816//1816 1817//1817 1818//1818
    +f 1819//1819 1820//1820 1821//1821
    +f 1822//1822 1823//1823 1824//1824
    +f 1825//1825 1826//1826 1827//1827
    +f 1828//1828 1829//1829 1830//1830
    +f 1831//1831 1832//1832 1833//1833
    +f 1834//1834 1835//1835 1836//1836
    +f 1837//1837 1838//1838 1839//1839
    +f 1840//1840 1841//1841 1842//1842
    +f 1843//1843 1844//1844 1845//1845
    +f 1846//1846 1847//1847 1848//1848
    +f 1849//1849 1850//1850 1851//1851
    +f 1852//1852 1853//1853 1854//1854
    +f 1855//1855 1856//1856 1857//1857
    +f 1858//1858 1859//1859 1860//1860
    +f 1861//1861 1862//1862 1863//1863
    +f 1864//1864 1865//1865 1866//1866
    +f 1867//1867 1868//1868 1869//1869
    +f 1870//1870 1871//1871 1872//1872
    +f 1873//1873 1874//1874 1875//1875
    +f 1876//1876 1877//1877 1878//1878
    +f 1879//1879 1880//1880 1881//1881
    +f 1882//1882 1883//1883 1884//1884
    +f 1885//1885 1886//1886 1887//1887
    +f 1888//1888 1889//1889 1890//1890
    +f 1891//1891 1892//1892 1893//1893
    +f 1894//1894 1895//1895 1896//1896
    +f 1897//1897 1898//1898 1899//1899
    +f 1900//1900 1901//1901 1902//1902
    +f 1903//1903 1904//1904 1905//1905
    +f 1906//1906 1907//1907 1908//1908
    +f 1909//1909 1910//1910 1911//1911
    +f 1912//1912 1913//1913 1914//1914
    +f 1915//1915 1916//1916 1917//1917
    +f 1918//1918 1919//1919 1920//1920
    +f 1921//1921 1922//1922 1923//1923
    +f 1924//1924 1925//1925 1926//1926
    +f 1927//1927 1928//1928 1929//1929
    +f 1930//1930 1931//1931 1932//1932
    +f 1933//1933 1934//1934 1935//1935
    +f 1936//1936 1937//1937 1938//1938
    +f 1939//1939 1940//1940 1941//1941
    +f 1942//1942 1943//1943 1944//1944
    +f 1945//1945 1946//1946 1947//1947
    +f 1948//1948 1949//1949 1950//1950
    +f 1951//1951 1952//1952 1953//1953
    +f 1954//1954 1955//1955 1956//1956
    +f 1957//1957 1958//1958 1959//1959
    +f 1960//1960 1961//1961 1962//1962
    +f 1963//1963 1964//1964 1965//1965
    +f 1966//1966 1967//1967 1968//1968
    +f 1969//1969 1970//1970 1971//1971
    +f 1972//1972 1973//1973 1974//1974
    +f 1975//1975 1976//1976 1977//1977
    +f 1978//1978 1979//1979 1980//1980
    +f 1981//1981 1982//1982 1983//1983
    +f 1984//1984 1985//1985 1986//1986
    +f 1987//1987 1988//1988 1989//1989
    +f 1990//1990 1991//1991 1992//1992
    +f 1993//1993 1994//1994 1995//1995
    +f 1996//1996 1997//1997 1998//1998
    +f 1999//1999 2000//2000 2001//2001
    +f 2002//2002 2003//2003 2004//2004
    +f 2005//2005 2006//2006 2007//2007
    +f 2008//2008 2009//2009 2010//2010
    +f 2011//2011 2012//2012 2013//2013
    +f 2014//2014 2015//2015 2016//2016
    +f 2017//2017 2018//2018 2019//2019
    +f 2020//2020 2021//2021 2022//2022
    +f 2023//2023 2024//2024 2025//2025
    +f 2026//2026 2027//2027 2028//2028
    +f 2029//2029 2030//2030 2031//2031
    +f 2032//2032 2033//2033 2034//2034
    +f 2035//2035 2036//2036 2037//2037
    +f 2038//2038 2039//2039 2040//2040
    +f 2041//2041 2042//2042 2043//2043
    +f 2044//2044 2045//2045 2046//2046
    +f 2047//2047 2048//2048 2049//2049
    +f 2050//2050 2051//2051 2052//2052
    +f 2053//2053 2054//2054 2055//2055
    +f 2056//2056 2057//2057 2058//2058
    +f 2059//2059 2060//2060 2061//2061
    +f 2062//2062 2063//2063 2064//2064
    +f 2065//2065 2066//2066 2067//2067
    +f 2068//2068 2069//2069 2070//2070
    +f 2071//2071 2072//2072 2073//2073
    +f 2074//2074 2075//2075 2076//2076
    +f 2077//2077 2078//2078 2079//2079
    +f 2080//2080 2081//2081 2082//2082
    +f 2083//2083 2084//2084 2085//2085
    +f 2086//2086 2087//2087 2088//2088
    +f 2089//2089 2090//2090 2091//2091
    +f 2092//2092 2093//2093 2094//2094
    +f 2095//2095 2096//2096 2097//2097
    +f 2098//2098 2099//2099 2100//2100
    +f 2101//2101 2102//2102 2103//2103
    +f 2104//2104 2105//2105 2106//2106
    +f 2107//2107 2108//2108 2109//2109
    +f 2110//2110 2111//2111 2112//2112
    +f 2113//2113 2114//2114 2115//2115
    +f 2116//2116 2117//2117 2118//2118
    +f 2119//2119 2120//2120 2121//2121
    +f 2122//2122 2123//2123 2124//2124
    +f 2125//2125 2126//2126 2127//2127
    +f 2128//2128 2129//2129 2130//2130
    +f 2131//2131 2132//2132 2133//2133
    +f 2134//2134 2135//2135 2136//2136
    +f 2137//2137 2138//2138 2139//2139
    +f 2140//2140 2141//2141 2142//2142
    +f 2143//2143 2144//2144 2145//2145
    +f 2146//2146 2147//2147 2148//2148
    +f 2149//2149 2150//2150 2151//2151
    +f 2152//2152 2153//2153 2154//2154
    +f 2155//2155 2156//2156 2157//2157
    +f 2158//2158 2159//2159 2160//2160
    +f 2161//2161 2162//2162 2163//2163
    +f 2164//2164 2165//2165 2166//2166
    +f 2167//2167 2168//2168 2169//2169
    +f 2170//2170 2171//2171 2172//2172
    +f 2173//2173 2174//2174 2175//2175
    +f 2176//2176 2177//2177 2178//2178
    +f 2179//2179 2180//2180 2181//2181
    +f 2182//2182 2183//2183 2184//2184
    +f 2185//2185 2186//2186 2187//2187
    +f 2188//2188 2189//2189 2190//2190
    +f 2191//2191 2192//2192 2193//2193
    +f 2194//2194 2195//2195 2196//2196
    +f 2197//2197 2198//2198 2199//2199
    +f 2200//2200 2201//2201 2202//2202
    +f 2203//2203 2204//2204 2205//2205
    +f 2206//2206 2207//2207 2208//2208
    +f 2209//2209 2210//2210 2211//2211
    +f 2212//2212 2213//2213 2214//2214
    +f 2215//2215 2216//2216 2217//2217
    +f 2218//2218 2219//2219 2220//2220
    +f 2221//2221 2222//2222 2223//2223
    +f 2224//2224 2225//2225 2226//2226
    +f 2227//2227 2228//2228 2229//2229
    +f 2230//2230 2231//2231 2232//2232
    +f 2233//2233 2234//2234 2235//2235
    +f 2236//2236 2237//2237 2238//2238
    +f 2239//2239 2240//2240 2241//2241
    +f 2242//2242 2243//2243 2244//2244
    +f 2245//2245 2246//2246 2247//2247
    +f 2248//2248 2249//2249 2250//2250
    +f 2251//2251 2252//2252 2253//2253
    +f 2254//2254 2255//2255 2256//2256
    +f 2257//2257 2258//2258 2259//2259
    +f 2260//2260 2261//2261 2262//2262
    +f 2263//2263 2264//2264 2265//2265
    +f 2266//2266 2267//2267 2268//2268
    +f 2269//2269 2270//2270 2271//2271
    +f 2272//2272 2273//2273 2274//2274
    +f 2275//2275 2276//2276 2277//2277
    +f 2278//2278 2279//2279 2280//2280
    +f 2281//2281 2282//2282 2283//2283
    +f 2284//2284 2285//2285 2286//2286
    +f 2287//2287 2288//2288 2289//2289
    +f 2290//2290 2291//2291 2292//2292
    +f 2293//2293 2294//2294 2295//2295
    +f 2296//2296 2297//2297 2298//2298
    +f 2299//2299 2300//2300 2301//2301
    +f 2302//2302 2303//2303 2304//2304
    +f 2305//2305 2306//2306 2307//2307
    +f 2308//2308 2309//2309 2310//2310
    +f 2311//2311 2312//2312 2313//2313
    +f 2314//2314 2315//2315 2316//2316
    +f 2317//2317 2318//2318 2319//2319
    +f 2320//2320 2321//2321 2322//2322
    +f 2323//2323 2324//2324 2325//2325
    +f 2326//2326 2327//2327 2328//2328
    +f 2329//2329 2330//2330 2331//2331
    +f 2332//2332 2333//2333 2334//2334
    +f 2335//2335 2336//2336 2337//2337
    +f 2338//2338 2339//2339 2340//2340
    +f 2341//2341 2342//2342 2343//2343
    +f 2344//2344 2345//2345 2346//2346
    +f 2347//2347 2348//2348 2349//2349
    +f 2350//2350 2351//2351 2352//2352
    +f 2353//2353 2354//2354 2355//2355
    +f 2356//2356 2357//2357 2358//2358
    +f 2359//2359 2360//2360 2361//2361
    +f 2362//2362 2363//2363 2364//2364
    +f 2365//2365 2366//2366 2367//2367
    +f 2368//2368 2369//2369 2370//2370
    +f 2371//2371 2372//2372 2373//2373
    +f 2374//2374 2375//2375 2376//2376
    +f 2377//2377 2378//2378 2379//2379
    +f 2380//2380 2381//2381 2382//2382
    +f 2383//2383 2384//2384 2385//2385
    +f 2386//2386 2387//2387 2388//2388
    +f 2389//2389 2390//2390 2391//2391
    +f 2392//2392 2393//2393 2394//2394
    +f 2395//2395 2396//2396 2397//2397
    +f 2398//2398 2399//2399 2400//2400
    +f 2401//2401 2402//2402 2403//2403
    +f 2404//2404 2405//2405 2406//2406
    +f 2407//2407 2408//2408 2409//2409
    +f 2410//2410 2411//2411 2412//2412
    +f 2413//2413 2414//2414 2415//2415
    +f 2416//2416 2417//2417 2418//2418
    +f 2419//2419 2420//2420 2421//2421
    +f 2422//2422 2423//2423 2424//2424
    +f 2425//2425 2426//2426 2427//2427
    +f 2428//2428 2429//2429 2430//2430
    +f 2431//2431 2432//2432 2433//2433
    +f 2434//2434 2435//2435 2436//2436
    +f 2437//2437 2438//2438 2439//2439
    +f 2440//2440 2441//2441 2442//2442
    +f 2443//2443 2444//2444 2445//2445
    +f 2446//2446 2447//2447 2448//2448
    +f 2449//2449 2450//2450 2451//2451
    +f 2452//2452 2453//2453 2454//2454
    +f 2455//2455 2456//2456 2457//2457
    +f 2458//2458 2459//2459 2460//2460
    +f 2461//2461 2462//2462 2463//2463
    +f 2464//2464 2465//2465 2466//2466
    +f 2467//2467 2468//2468 2469//2469
    +f 2470//2470 2471//2471 2472//2472
    +f 2473//2473 2474//2474 2475//2475
    +f 2476//2476 2477//2477 2478//2478
    +f 2479//2479 2480//2480 2481//2481
    +f 2482//2482 2483//2483 2484//2484
    +f 2485//2485 2486//2486 2487//2487
    +f 2488//2488 2489//2489 2490//2490
    +f 2491//2491 2492//2492 2493//2493
    +f 2494//2494 2495//2495 2496//2496
    +f 2497//2497 2498//2498 2499//2499
    +f 2500//2500 2501//2501 2502//2502
    +f 2503//2503 2504//2504 2505//2505
    +f 2506//2506 2507//2507 2508//2508
    +f 2509//2509 2510//2510 2511//2511
    +f 2512//2512 2513//2513 2514//2514
    +f 2515//2515 2516//2516 2517//2517
    +f 2518//2518 2519//2519 2520//2520
    +f 2521//2521 2522//2522 2523//2523
    +f 2524//2524 2525//2525 2526//2526
    +f 2527//2527 2528//2528 2529//2529
    +f 2530//2530 2531//2531 2532//2532
    +f 2533//2533 2534//2534 2535//2535
    +f 2536//2536 2537//2537 2538//2538
    +f 2539//2539 2540//2540 2541//2541
    +f 2542//2542 2543//2543 2544//2544
    +f 2545//2545 2546//2546 2547//2547
    +f 2548//2548 2549//2549 2550//2550
    +f 2551//2551 2552//2552 2553//2553
    +f 2554//2554 2555//2555 2556//2556
    +f 2557//2557 2558//2558 2559//2559
    +f 2560//2560 2561//2561 2562//2562
    +f 2563//2563 2564//2564 2565//2565
    +f 2566//2566 2567//2567 2568//2568
    +f 2569//2569 2570//2570 2571//2571
    +f 2572//2572 2573//2573 2574//2574
    +f 2575//2575 2576//2576 2577//2577
    +f 2578//2578 2579//2579 2580//2580
    +f 2581//2581 2582//2582 2583//2583
    +f 2584//2584 2585//2585 2586//2586
    +f 2587//2587 2588//2588 2589//2589
    +f 2590//2590 2591//2591 2592//2592
    +f 2593//2593 2594//2594 2595//2595
    +f 2596//2596 2597//2597 2598//2598
    +f 2599//2599 2600//2600 2601//2601
    +f 2602//2602 2603//2603 2604//2604
    +f 2605//2605 2606//2606 2607//2607
    +f 2608//2608 2609//2609 2610//2610
    +f 2611//2611 2612//2612 2613//2613
    +f 2614//2614 2615//2615 2616//2616
    +f 2617//2617 2618//2618 2619//2619
    +f 2620//2620 2621//2621 2622//2622
    +f 2623//2623 2624//2624 2625//2625
    +f 2626//2626 2627//2627 2628//2628
    +f 2629//2629 2630//2630 2631//2631
    +f 2632//2632 2633//2633 2634//2634
    +f 2635//2635 2636//2636 2637//2637
    +f 2638//2638 2639//2639 2640//2640
    +f 2641//2641 2642//2642 2643//2643
    +f 2644//2644 2645//2645 2646//2646
    +f 2647//2647 2648//2648 2649//2649
    +f 2650//2650 2651//2651 2652//2652
    +f 2653//2653 2654//2654 2655//2655
    +f 2656//2656 2657//2657 2658//2658
    +f 2659//2659 2660//2660 2661//2661
    +f 2662//2662 2663//2663 2664//2664
    +f 2665//2665 2666//2666 2667//2667
    +f 2668//2668 2669//2669 2670//2670
    +f 2671//2671 2672//2672 2673//2673
    +f 2674//2674 2675//2675 2676//2676
    +f 2677//2677 2678//2678 2679//2679
    +f 2680//2680 2681//2681 2682//2682
    +f 2683//2683 2684//2684 2685//2685
    +f 2686//2686 2687//2687 2688//2688
    +f 2689//2689 2690//2690 2691//2691
    +f 2692//2692 2693//2693 2694//2694
    +f 2695//2695 2696//2696 2697//2697
    +f 2698//2698 2699//2699 2700//2700
    +f 2701//2701 2702//2702 2703//2703
    +f 2704//2704 2705//2705 2706//2706
    +f 2707//2707 2708//2708 2709//2709
    +f 2710//2710 2711//2711 2712//2712
    +f 2713//2713 2714//2714 2715//2715
    +f 2716//2716 2717//2717 2718//2718
    +f 2719//2719 2720//2720 2721//2721
    +f 2722//2722 2723//2723 2724//2724
    +f 2725//2725 2726//2726 2727//2727
    +f 2728//2728 2729//2729 2730//2730
    +f 2731//2731 2732//2732 2733//2733
    +f 2734//2734 2735//2735 2736//2736
    +f 2737//2737 2738//2738 2739//2739
    +f 2740//2740 2741//2741 2742//2742
    +f 2743//2743 2744//2744 2745//2745
    +f 2746//2746 2747//2747 2748//2748
    +f 2749//2749 2750//2750 2751//2751
    +f 2752//2752 2753//2753 2754//2754
    +f 2755//2755 2756//2756 2757//2757
    +f 2758//2758 2759//2759 2760//2760
    +f 2761//2761 2762//2762 2763//2763
    +f 2764//2764 2765//2765 2766//2766
    +f 2767//2767 2768//2768 2769//2769
    +f 2770//2770 2771//2771 2772//2772
    +f 2773//2773 2774//2774 2775//2775
    +f 2776//2776 2777//2777 2778//2778
    +f 2779//2779 2780//2780 2781//2781
    +f 2782//2782 2783//2783 2784//2784
    +f 2785//2785 2786//2786 2787//2787
    +f 2788//2788 2789//2789 2790//2790
    +f 2791//2791 2792//2792 2793//2793
    +f 2794//2794 2795//2795 2796//2796
    +f 2797//2797 2798//2798 2799//2799
    +f 2800//2800 2801//2801 2802//2802
    +f 2803//2803 2804//2804 2805//2805
    +f 2806//2806 2807//2807 2808//2808
    +f 2809//2809 2810//2810 2811//2811
    +f 2812//2812 2813//2813 2814//2814
    +f 2815//2815 2816//2816 2817//2817
    +f 2818//2818 2819//2819 2820//2820
    +f 2821//2821 2822//2822 2823//2823
    +f 2824//2824 2825//2825 2826//2826
    +f 2827//2827 2828//2828 2829//2829
    +f 2830//2830 2831//2831 2832//2832
    +f 2833//2833 2834//2834 2835//2835
    +f 2836//2836 2837//2837 2838//2838
    +f 2839//2839 2840//2840 2841//2841
    +f 2842//2842 2843//2843 2844//2844
    +f 2845//2845 2846//2846 2847//2847
    +f 2848//2848 2849//2849 2850//2850
    +f 2851//2851 2852//2852 2853//2853
    +f 2854//2854 2855//2855 2856//2856
    +f 2857//2857 2858//2858 2859//2859
    +f 2860//2860 2861//2861 2862//2862
    +f 2863//2863 2864//2864 2865//2865
    +f 2866//2866 2867//2867 2868//2868
    +f 2869//2869 2870//2870 2871//2871
    +f 2872//2872 2873//2873 2874//2874
    +f 2875//2875 2876//2876 2877//2877
    +f 2878//2878 2879//2879 2880//2880
    +f 2881//2881 2882//2882 2883//2883
    +f 2884//2884 2885//2885 2886//2886
    +f 2887//2887 2888//2888 2889//2889
    +f 2890//2890 2891//2891 2892//2892
    +f 2893//2893 2894//2894 2895//2895
    +f 2896//2896 2897//2897 2898//2898
    +f 2899//2899 2900//2900 2901//2901
    +f 2902//2902 2903//2903 2904//2904
    +f 2905//2905 2906//2906 2907//2907
    +f 2908//2908 2909//2909 2910//2910
    +f 2911//2911 2912//2912 2913//2913
    +f 2914//2914 2915//2915 2916//2916
    +f 2917//2917 2918//2918 2919//2919
    +f 2920//2920 2921//2921 2922//2922
    +f 2923//2923 2924//2924 2925//2925
    +f 2926//2926 2927//2927 2928//2928
    +f 2929//2929 2930//2930 2931//2931
    +f 2932//2932 2933//2933 2934//2934
    +f 2935//2935 2936//2936 2937//2937
    +f 2938//2938 2939//2939 2940//2940
    +f 2941//2941 2942//2942 2943//2943
    +f 2944//2944 2945//2945 2946//2946
    +f 2947//2947 2948//2948 2949//2949
    +f 2950//2950 2951//2951 2952//2952
    +f 2953//2953 2954//2954 2955//2955
    +f 2956//2956 2957//2957 2958//2958
    +f 2959//2959 2960//2960 2961//2961
    +f 2962//2962 2963//2963 2964//2964
    +f 2965//2965 2966//2966 2967//2967
    +f 2968//2968 2969//2969 2970//2970
    +f 2971//2971 2972//2972 2973//2973
    +f 2974//2974 2975//2975 2976//2976
    +f 2977//2977 2978//2978 2979//2979
    +f 2980//2980 2981//2981 2982//2982
    +f 2983//2983 2984//2984 2985//2985
    +f 2986//2986 2987//2987 2988//2988
    +f 2989//2989 2990//2990 2991//2991
    +f 2992//2992 2993//2993 2994//2994
    +f 2995//2995 2996//2996 2997//2997
    +f 2998//2998 2999//2999 3000//3000
    +f 3001//3001 3002//3002 3003//3003
    +f 3004//3004 3005//3005 3006//3006
    +f 3007//3007 3008//3008 3009//3009
    +f 3010//3010 3011//3011 3012//3012
    +f 3013//3013 3014//3014 3015//3015
    +f 3016//3016 3017//3017 3018//3018
    +f 3019//3019 3020//3020 3021//3021
    +f 3022//3022 3023//3023 3024//3024
    +f 3025//3025 3026//3026 3027//3027
    +f 3028//3028 3029//3029 3030//3030
    +f 3031//3031 3032//3032 3033//3033
    +f 3034//3034 3035//3035 3036//3036
    +f 3037//3037 3038//3038 3039//3039
    +f 3040//3040 3041//3041 3042//3042
    +f 3043//3043 3044//3044 3045//3045
    +f 3046//3046 3047//3047 3048//3048
    +f 3049//3049 3050//3050 3051//3051
    +f 3052//3052 3053//3053 3054//3054
    +f 3055//3055 3056//3056 3057//3057
    +f 3058//3058 3059//3059 3060//3060
    +f 3061//3061 3062//3062 3063//3063
    +f 3064//3064 3065//3065 3066//3066
    +f 3067//3067 3068//3068 3069//3069
    +f 3070//3070 3071//3071 3072//3072
    +f 3073//3073 3074//3074 3075//3075
    +f 3076//3076 3077//3077 3078//3078
    +f 3079//3079 3080//3080 3081//3081
    +f 3082//3082 3083//3083 3084//3084
    +f 3085//3085 3086//3086 3087//3087
    +f 3088//3088 3089//3089 3090//3090
    +f 3091//3091 3092//3092 3093//3093
    +f 3094//3094 3095//3095 3096//3096
    +f 3097//3097 3098//3098 3099//3099
    +f 3100//3100 3101//3101 3102//3102
    +f 3103//3103 3104//3104 3105//3105
    +f 3106//3106 3107//3107 3108//3108
    +f 3109//3109 3110//3110 3111//3111
    +f 3112//3112 3113//3113 3114//3114
    +f 3115//3115 3116//3116 3117//3117
    +f 3118//3118 3119//3119 3120//3120
    +f 3121//3121 3122//3122 3123//3123
    +f 3124//3124 3125//3125 3126//3126
    +f 3127//3127 3128//3128 3129//3129
    +f 3130//3130 3131//3131 3132//3132
    +f 3133//3133 3134//3134 3135//3135
    +f 3136//3136 3137//3137 3138//3138
    +f 3139//3139 3140//3140 3141//3141
    +f 3142//3142 3143//3143 3144//3144
    +f 3145//3145 3146//3146 3147//3147
    +f 3148//3148 3149//3149 3150//3150
    +f 3151//3151 3152//3152 3153//3153
    +f 3154//3154 3155//3155 3156//3156
    +f 3157//3157 3158//3158 3159//3159
    +f 3160//3160 3161//3161 3162//3162
    +f 3163//3163 3164//3164 3165//3165
    +f 3166//3166 3167//3167 3168//3168
    +f 3169//3169 3170//3170 3171//3171
    +f 3172//3172 3173//3173 3174//3174
    +f 3175//3175 3176//3176 3177//3177
    +f 3178//3178 3179//3179 3180//3180
    +f 3181//3181 3182//3182 3183//3183
    +f 3184//3184 3185//3185 3186//3186
    +f 3187//3187 3188//3188 3189//3189
    +f 3190//3190 3191//3191 3192//3192
    +f 3193//3193 3194//3194 3195//3195
    +f 3196//3196 3197//3197 3198//3198
    +f 3199//3199 3200//3200 3201//3201
    +f 3202//3202 3203//3203 3204//3204
    +f 3205//3205 3206//3206 3207//3207
    +f 3208//3208 3209//3209 3210//3210
    +f 3211//3211 3212//3212 3213//3213
    +f 3214//3214 3215//3215 3216//3216
    +f 3217//3217 3218//3218 3219//3219
    +f 3220//3220 3221//3221 3222//3222
    +f 3223//3223 3224//3224 3225//3225
    +f 3226//3226 3227//3227 3228//3228
    +f 3229//3229 3230//3230 3231//3231
    +f 3232//3232 3233//3233 3234//3234
    +f 3235//3235 3236//3236 3237//3237
    +f 3238//3238 3239//3239 3240//3240
    +f 3241//3241 3242//3242 3243//3243
    +f 3244//3244 3245//3245 3246//3246
    +f 3247//3247 3248//3248 3249//3249
    +f 3250//3250 3251//3251 3252//3252
    +f 3253//3253 3254//3254 3255//3255
    +f 3256//3256 3257//3257 3258//3258
    +f 3259//3259 3260//3260 3261//3261
    +f 3262//3262 3263//3263 3264//3264
    +f 3265//3265 3266//3266 3267//3267
    +f 3268//3268 3269//3269 3270//3270
    +f 3271//3271 3272//3272 3273//3273
    +f 3274//3274 3275//3275 3276//3276
    +f 3277//3277 3278//3278 3279//3279
    +f 3280//3280 3281//3281 3282//3282
    +f 3283//3283 3284//3284 3285//3285
    +f 3286//3286 3287//3287 3288//3288
    +f 3289//3289 3290//3290 3291//3291
    +f 3292//3292 3293//3293 3294//3294
    +f 3295//3295 3296//3296 3297//3297
    +f 3298//3298 3299//3299 3300//3300
    +f 3301//3301 3302//3302 3303//3303
    +f 3304//3304 3305//3305 3306//3306
    +f 3307//3307 3308//3308 3309//3309
    +f 3310//3310 3311//3311 3312//3312
    +f 3313//3313 3314//3314 3315//3315
    +f 3316//3316 3317//3317 3318//3318
    +f 3319//3319 3320//3320 3321//3321
    +f 3322//3322 3323//3323 3324//3324
    +f 3325//3325 3326//3326 3327//3327
    +f 3328//3328 3329//3329 3330//3330
    +f 3331//3331 3332//3332 3333//3333
    +f 3334//3334 3335//3335 3336//3336
    +f 3337//3337 3338//3338 3339//3339
    +f 3340//3340 3341//3341 3342//3342
    +f 3343//3343 3344//3344 3345//3345
    +f 3346//3346 3347//3347 3348//3348
    +f 3349//3349 3350//3350 3351//3351
    +f 3352//3352 3353//3353 3354//3354
    +f 3355//3355 3356//3356 3357//3357
    +f 3358//3358 3359//3359 3360//3360
    +f 3361//3361 3362//3362 3363//3363
    +f 3364//3364 3365//3365 3366//3366
    +f 3367//3367 3368//3368 3369//3369
    +f 3370//3370 3371//3371 3372//3372
    +f 3373//3373 3374//3374 3375//3375
    +f 3376//3376 3377//3377 3378//3378
    +f 3379//3379 3380//3380 3381//3381
    +f 3382//3382 3383//3383 3384//3384
    +f 3385//3385 3386//3386 3387//3387
    +f 3388//3388 3389//3389 3390//3390
    +f 3391//3391 3392//3392 3393//3393
    +f 3394//3394 3395//3395 3396//3396
    +f 3397//3397 3398//3398 3399//3399
    +f 3400//3400 3401//3401 3402//3402
    +f 3403//3403 3404//3404 3405//3405
    +f 3406//3406 3407//3407 3408//3408
    +f 3409//3409 3410//3410 3411//3411
    +f 3412//3412 3413//3413 3414//3414
    +f 3415//3415 3416//3416 3417//3417
    +f 3418//3418 3419//3419 3420//3420
    +f 3421//3421 3422//3422 3423//3423
    +f 3424//3424 3425//3425 3426//3426
    +f 3427//3427 3428//3428 3429//3429
    +f 3430//3430 3431//3431 3432//3432
    +f 3433//3433 3434//3434 3435//3435
    +f 3436//3436 3437//3437 3438//3438
    +f 3439//3439 3440//3440 3441//3441
    +f 3442//3442 3443//3443 3444//3444
    +f 3445//3445 3446//3446 3447//3447
    +f 3448//3448 3449//3449 3450//3450
    +f 3451//3451 3452//3452 3453//3453
    +f 3454//3454 3455//3455 3456//3456
    +f 3457//3457 3458//3458 3459//3459
    +f 3460//3460 3461//3461 3462//3462
    +f 3463//3463 3464//3464 3465//3465
    +f 3466//3466 3467//3467 3468//3468
    +f 3469//3469 3470//3470 3471//3471
    +f 3472//3472 3473//3473 3474//3474
    +f 3475//3475 3476//3476 3477//3477
    +f 3478//3478 3479//3479 3480//3480
    +f 3481//3481 3482//3482 3483//3483
    +f 3484//3484 3485//3485 3486//3486
    +f 3487//3487 3488//3488 3489//3489
    +f 3490//3490 3491//3491 3492//3492
    +f 3493//3493 3494//3494 3495//3495
    +f 3496//3496 3497//3497 3498//3498
    +f 3499//3499 3500//3500 3501//3501
    +f 3502//3502 3503//3503 3504//3504
    +f 3505//3505 3506//3506 3507//3507
    +f 3508//3508 3509//3509 3510//3510
    +f 3511//3511 3512//3512 3513//3513
    +f 3514//3514 3515//3515 3516//3516
    +f 3517//3517 3518//3518 3519//3519
    +f 3520//3520 3521//3521 3522//3522
    +f 3523//3523 3524//3524 3525//3525
    +f 3526//3526 3527//3527 3528//3528
    +f 3529//3529 3530//3530 3531//3531
    +f 3532//3532 3533//3533 3534//3534
    +f 3535//3535 3536//3536 3537//3537
    +f 3538//3538 3539//3539 3540//3540
    +f 3541//3541 3542//3542 3543//3543
    +f 3544//3544 3545//3545 3546//3546
    +f 3547//3547 3548//3548 3549//3549
    +f 3550//3550 3551//3551 3552//3552
    +f 3553//3553 3554//3554 3555//3555
    +f 3556//3556 3557//3557 3558//3558
    +f 3559//3559 3560//3560 3561//3561
    +f 3562//3562 3563//3563 3564//3564
    +f 3565//3565 3566//3566 3567//3567
    +f 3568//3568 3569//3569 3570//3570
    +f 3571//3571 3572//3572 3573//3573
    +f 3574//3574 3575//3575 3576//3576
    +f 3577//3577 3578//3578 3579//3579
    +f 3580//3580 3581//3581 3582//3582
    +f 3583//3583 3584//3584 3585//3585
    +f 3586//3586 3587//3587 3588//3588
    +f 3589//3589 3590//3590 3591//3591
    +f 3592//3592 3593//3593 3594//3594
    +f 3595//3595 3596//3596 3597//3597
    +f 3598//3598 3599//3599 3600//3600
    +f 3601//3601 3602//3602 3603//3603
    +f 3604//3604 3605//3605 3606//3606
    +f 3607//3607 3608//3608 3609//3609
    +f 3610//3610 3611//3611 3612//3612
    +f 3613//3613 3614//3614 3615//3615
    +f 3616//3616 3617//3617 3618//3618
    +f 3619//3619 3620//3620 3621//3621
    +f 3622//3622 3623//3623 3624//3624
    +f 3625//3625 3626//3626 3627//3627
    +f 3628//3628 3629//3629 3630//3630
    +f 3631//3631 3632//3632 3633//3633
    +f 3634//3634 3635//3635 3636//3636
    +f 3637//3637 3638//3638 3639//3639
    +f 3640//3640 3641//3641 3642//3642
    +f 3643//3643 3644//3644 3645//3645
    +f 3646//3646 3647//3647 3648//3648
    +f 3649//3649 3650//3650 3651//3651
    +f 3652//3652 3653//3653 3654//3654
    +f 3655//3655 3656//3656 3657//3657
    +f 3658//3658 3659//3659 3660//3660
    +f 3661//3661 3662//3662 3663//3663
    +f 3664//3664 3665//3665 3666//3666
    +f 3667//3667 3668//3668 3669//3669
    +f 3670//3670 3671//3671 3672//3672
    +f 3673//3673 3674//3674 3675//3675
    +f 3676//3676 3677//3677 3678//3678
    +f 3679//3679 3680//3680 3681//3681
    +f 3682//3682 3683//3683 3684//3684
    +f 3685//3685 3686//3686 3687//3687
    +f 3688//3688 3689//3689 3690//3690
    +f 3691//3691 3692//3692 3693//3693
    +f 3694//3694 3695//3695 3696//3696
    +f 3697//3697 3698//3698 3699//3699
    +f 3700//3700 3701//3701 3702//3702
    +f 3703//3703 3704//3704 3705//3705
    +f 3706//3706 3707//3707 3708//3708
    +f 3709//3709 3710//3710 3711//3711
    +f 3712//3712 3713//3713 3714//3714
    +f 3715//3715 3716//3716 3717//3717
    +f 3718//3718 3719//3719 3720//3720
    +f 3721//3721 3722//3722 3723//3723
    +f 3724//3724 3725//3725 3726//3726
    +f 3727//3727 3728//3728 3729//3729
    +f 3730//3730 3731//3731 3732//3732
    +f 3733//3733 3734//3734 3735//3735
    +f 3736//3736 3737//3737 3738//3738
    +f 3739//3739 3740//3740 3741//3741
    +f 3742//3742 3743//3743 3744//3744
    +f 3745//3745 3746//3746 3747//3747
    +f 3748//3748 3749//3749 3750//3750
    +f 3751//3751 3752//3752 3753//3753
    +f 3754//3754 3755//3755 3756//3756
    +f 3757//3757 3758//3758 3759//3759
    +f 3760//3760 3761//3761 3762//3762
    +f 3763//3763 3764//3764 3765//3765
    +f 3766//3766 3767//3767 3768//3768
    +f 3769//3769 3770//3770 3771//3771
    +f 3772//3772 3773//3773 3774//3774
    +f 3775//3775 3776//3776 3777//3777
    +f 3778//3778 3779//3779 3780//3780
    +f 3781//3781 3782//3782 3783//3783
    +f 3784//3784 3785//3785 3786//3786
    +f 3787//3787 3788//3788 3789//3789
    +f 3790//3790 3791//3791 3792//3792
    +f 3793//3793 3794//3794 3795//3795
    +f 3796//3796 3797//3797 3798//3798
    +f 3799//3799 3800//3800 3801//3801
    +f 3802//3802 3803//3803 3804//3804
    +f 3805//3805 3806//3806 3807//3807
    +f 3808//3808 3809//3809 3810//3810
    +f 3811//3811 3812//3812 3813//3813
    +f 3814//3814 3815//3815 3816//3816
    +f 3817//3817 3818//3818 3819//3819
    +f 3820//3820 3821//3821 3822//3822
    +f 3823//3823 3824//3824 3825//3825
    +f 3826//3826 3827//3827 3828//3828
    +f 3829//3829 3830//3830 3831//3831
    +f 3832//3832 3833//3833 3834//3834
    +f 3835//3835 3836//3836 3837//3837
    +f 3838//3838 3839//3839 3840//3840
    +f 3841//3841 3842//3842 3843//3843
    +f 3844//3844 3845//3845 3846//3846
    +f 3847//3847 3848//3848 3849//3849
    +f 3850//3850 3851//3851 3852//3852
    +f 3853//3853 3854//3854 3855//3855
    +f 3856//3856 3857//3857 3858//3858
    +f 3859//3859 3860//3860 3861//3861
    +f 3862//3862 3863//3863 3864//3864
    +f 3865//3865 3866//3866 3867//3867
    +f 3868//3868 3869//3869 3870//3870
    +f 3871//3871 3872//3872 3873//3873
    +f 3874//3874 3875//3875 3876//3876
    +f 3877//3877 3878//3878 3879//3879
    +f 3880//3880 3881//3881 3882//3882
    +f 3883//3883 3884//3884 3885//3885
    +f 3886//3886 3887//3887 3888//3888
    +f 3889//3889 3890//3890 3891//3891
    +f 3892//3892 3893//3893 3894//3894
    +f 3895//3895 3896//3896 3897//3897
    +f 3898//3898 3899//3899 3900//3900
    +f 3901//3901 3902//3902 3903//3903
    +f 3904//3904 3905//3905 3906//3906
    +f 3907//3907 3908//3908 3909//3909
    +f 3910//3910 3911//3911 3912//3912
    +f 3913//3913 3914//3914 3915//3915
    +f 3916//3916 3917//3917 3918//3918
    +f 3919//3919 3920//3920 3921//3921
    +f 3922//3922 3923//3923 3924//3924
    +f 3925//3925 3926//3926 3927//3927
    +f 3928//3928 3929//3929 3930//3930
    +f 3931//3931 3932//3932 3933//3933
    +f 3934//3934 3935//3935 3936//3936
    +f 3937//3937 3938//3938 3939//3939
    +f 3940//3940 3941//3941 3942//3942
    +f 3943//3943 3944//3944 3945//3945
    +f 3946//3946 3947//3947 3948//3948
    +f 3949//3949 3950//3950 3951//3951
    +f 3952//3952 3953//3953 3954//3954
    +f 3955//3955 3956//3956 3957//3957
    +f 3958//3958 3959//3959 3960//3960
    +f 3961//3961 3962//3962 3963//3963
    +f 3964//3964 3965//3965 3966//3966
    +f 3967//3967 3968//3968 3969//3969
    +f 3970//3970 3971//3971 3972//3972
    +f 3973//3973 3974//3974 3975//3975
    +f 3976//3976 3977//3977 3978//3978
    +f 3979//3979 3980//3980 3981//3981
    +f 3982//3982 3983//3983 3984//3984
    +f 3985//3985 3986//3986 3987//3987
    +f 3988//3988 3989//3989 3990//3990
    +f 3991//3991 3992//3992 3993//3993
    +f 3994//3994 3995//3995 3996//3996
    +f 3997//3997 3998//3998 3999//3999
    +f 4000//4000 4001//4001 4002//4002
    +f 4003//4003 4004//4004 4005//4005
    +f 4006//4006 4007//4007 4008//4008
    +f 4009//4009 4010//4010 4011//4011
    +f 4012//4012 4013//4013 4014//4014
    +f 4015//4015 4016//4016 4017//4017
    +f 4018//4018 4019//4019 4020//4020
    +f 4021//4021 4022//4022 4023//4023
    +f 4024//4024 4025//4025 4026//4026
    +f 4027//4027 4028//4028 4029//4029
    +f 4030//4030 4031//4031 4032//4032
    +f 4033//4033 4034//4034 4035//4035
    +f 4036//4036 4037//4037 4038//4038
    +f 4039//4039 4040//4040 4041//4041
    +f 4042//4042 4043//4043 4044//4044
    +f 4045//4045 4046//4046 4047//4047
    +f 4048//4048 4049//4049 4050//4050
    +f 4051//4051 4052//4052 4053//4053
    +f 4054//4054 4055//4055 4056//4056
    +f 4057//4057 4058//4058 4059//4059
    +f 4060//4060 4061//4061 4062//4062
    +f 4063//4063 4064//4064 4065//4065
    +f 4066//4066 4067//4067 4068//4068
    +f 4069//4069 4070//4070 4071//4071
    +f 4072//4072 4073//4073 4074//4074
    +f 4075//4075 4076//4076 4077//4077
    +f 4078//4078 4079//4079 4080//4080
    +f 4081//4081 4082//4082 4083//4083
    +f 4084//4084 4085//4085 4086//4086
    +f 4087//4087 4088//4088 4089//4089
    +f 4090//4090 4091//4091 4092//4092
    +f 4093//4093 4094//4094 4095//4095
    +f 4096//4096 4097//4097 4098//4098
    +f 4099//4099 4100//4100 4101//4101
    +f 4102//4102 4103//4103 4104//4104
    +f 4105//4105 4106//4106 4107//4107
    +f 4108//4108 4109//4109 4110//4110
    +f 4111//4111 4112//4112 4113//4113
    +f 4114//4114 4115//4115 4116//4116
    +f 4117//4117 4118//4118 4119//4119
    +f 4120//4120 4121//4121 4122//4122
    +f 4123//4123 4124//4124 4125//4125
    +f 4126//4126 4127//4127 4128//4128
    +f 4129//4129 4130//4130 4131//4131
    +f 4132//4132 4133//4133 4134//4134
    +f 4135//4135 4136//4136 4137//4137
    +f 4138//4138 4139//4139 4140//4140
    +f 4141//4141 4142//4142 4143//4143
    +f 4144//4144 4145//4145 4146//4146
    +f 4147//4147 4148//4148 4149//4149
    +f 4150//4150 4151//4151 4152//4152
    +f 4153//4153 4154//4154 4155//4155
    +f 4156//4156 4157//4157 4158//4158
    +f 4159//4159 4160//4160 4161//4161
    +f 4162//4162 4163//4163 4164//4164
    +f 4165//4165 4166//4166 4167//4167
    +f 4168//4168 4169//4169 4170//4170
    +f 4171//4171 4172//4172 4173//4173
    +f 4174//4174 4175//4175 4176//4176
    +f 4177//4177 4178//4178 4179//4179
    +f 4180//4180 4181//4181 4182//4182
    +f 4183//4183 4184//4184 4185//4185
    +f 4186//4186 4187//4187 4188//4188
    +f 4189//4189 4190//4190 4191//4191
    +f 4192//4192 4193//4193 4194//4194
    +f 4195//4195 4196//4196 4197//4197
    +f 4198//4198 4199//4199 4200//4200
    +f 4201//4201 4202//4202 4203//4203
    +f 4204//4204 4205//4205 4206//4206
    +f 4207//4207 4208//4208 4209//4209
    +f 4210//4210 4211//4211 4212//4212
    +f 4213//4213 4214//4214 4215//4215
    +f 4216//4216 4217//4217 4218//4218
    +f 4219//4219 4220//4220 4221//4221
    +f 4222//4222 4223//4223 4224//4224
    +f 4225//4225 4226//4226 4227//4227
    +f 4228//4228 4229//4229 4230//4230
    +f 4231//4231 4232//4232 4233//4233
    +f 4234//4234 4235//4235 4236//4236
    +f 4237//4237 4238//4238 4239//4239
    +f 4240//4240 4241//4241 4242//4242
    +f 4243//4243 4244//4244 4245//4245
    +f 4246//4246 4247//4247 4248//4248
    +f 4249//4249 4250//4250 4251//4251
    +f 4252//4252 4253//4253 4254//4254
    +f 4255//4255 4256//4256 4257//4257
    +f 4258//4258 4259//4259 4260//4260
    +f 4261//4261 4262//4262 4263//4263
    +f 4264//4264 4265//4265 4266//4266
    +f 4267//4267 4268//4268 4269//4269
    +f 4270//4270 4271//4271 4272//4272
    +f 4273//4273 4274//4274 4275//4275
    +f 4276//4276 4277//4277 4278//4278
    +f 4279//4279 4280//4280 4281//4281
    +f 4282//4282 4283//4283 4284//4284
    +f 4285//4285 4286//4286 4287//4287
    +f 4288//4288 4289//4289 4290//4290
    +f 4291//4291 4292//4292 4293//4293
    +f 4294//4294 4295//4295 4296//4296
    +f 4297//4297 4298//4298 4299//4299
    +f 4300//4300 4301//4301 4302//4302
    +f 4303//4303 4304//4304 4305//4305
    +f 4306//4306 4307//4307 4308//4308
    +f 4309//4309 4310//4310 4311//4311
    +f 4312//4312 4313//4313 4314//4314
    +f 4315//4315 4316//4316 4317//4317
    +f 4318//4318 4319//4319 4320//4320
    +f 4321//4321 4322//4322 4323//4323
    +f 4324//4324 4325//4325 4326//4326
    +f 4327//4327 4328//4328 4329//4329
    +f 4330//4330 4331//4331 4332//4332
    +f 4333//4333 4334//4334 4335//4335
    +f 4336//4336 4337//4337 4338//4338
    +f 4339//4339 4340//4340 4341//4341
    +f 4342//4342 4343//4343 4344//4344
    +f 4345//4345 4346//4346 4347//4347
    +f 4348//4348 4349//4349 4350//4350
    +f 4351//4351 4352//4352 4353//4353
    +f 4354//4354 4355//4355 4356//4356
    +f 4357//4357 4358//4358 4359//4359
    +f 4360//4360 4361//4361 4362//4362
    +f 4363//4363 4364//4364 4365//4365
    +f 4366//4366 4367//4367 4368//4368
    +f 4369//4369 4370//4370 4371//4371
    +f 4372//4372 4373//4373 4374//4374
    +f 4375//4375 4376//4376 4377//4377
    +f 4378//4378 4379//4379 4380//4380
    +f 4381//4381 4382//4382 4383//4383
    +f 4384//4384 4385//4385 4386//4386
    +f 4387//4387 4388//4388 4389//4389
    +f 4390//4390 4391//4391 4392//4392
    +f 4393//4393 4394//4394 4395//4395
    +f 4396//4396 4397//4397 4398//4398
    +f 4399//4399 4400//4400 4401//4401
    +f 4402//4402 4403//4403 4404//4404
    +f 4405//4405 4406//4406 4407//4407
    +f 4408//4408 4409//4409 4410//4410
    +f 4411//4411 4412//4412 4413//4413
    +f 4414//4414 4415//4415 4416//4416
    +f 4417//4417 4418//4418 4419//4419
    +f 4420//4420 4421//4421 4422//4422
    +f 4423//4423 4424//4424 4425//4425
    +f 4426//4426 4427//4427 4428//4428
    +f 4429//4429 4430//4430 4431//4431
    +f 4432//4432 4433//4433 4434//4434
    +f 4435//4435 4436//4436 4437//4437
    +f 4438//4438 4439//4439 4440//4440
    +f 4441//4441 4442//4442 4443//4443
    +f 4444//4444 4445//4445 4446//4446
    +f 4447//4447 4448//4448 4449//4449
    +f 4450//4450 4451//4451 4452//4452
    +f 4453//4453 4454//4454 4455//4455
    +f 4456//4456 4457//4457 4458//4458
    +f 4459//4459 4460//4460 4461//4461
    +f 4462//4462 4463//4463 4464//4464
    +f 4465//4465 4466//4466 4467//4467
    +f 4468//4468 4469//4469 4470//4470
    +f 4471//4471 4472//4472 4473//4473
    +f 4474//4474 4475//4475 4476//4476
    +f 4477//4477 4478//4478 4479//4479
    +f 4480//4480 4481//4481 4482//4482
    +f 4483//4483 4484//4484 4485//4485
    +f 4486//4486 4487//4487 4488//4488
    +f 4489//4489 4490//4490 4491//4491
    +f 4492//4492 4493//4493 4494//4494
    +f 4495//4495 4496//4496 4497//4497
    +f 4498//4498 4499//4499 4500//4500
    +f 4501//4501 4502//4502 4503//4503
    +f 4504//4504 4505//4505 4506//4506
    +f 4507//4507 4508//4508 4509//4509
    +f 4510//4510 4511//4511 4512//4512
    +f 4513//4513 4514//4514 4515//4515
    +f 4516//4516 4517//4517 4518//4518
    +f 4519//4519 4520//4520 4521//4521
    +f 4522//4522 4523//4523 4524//4524
    +f 4525//4525 4526//4526 4527//4527
    +f 4528//4528 4529//4529 4530//4530
    +f 4531//4531 4532//4532 4533//4533
    +f 4534//4534 4535//4535 4536//4536
    +f 4537//4537 4538//4538 4539//4539
    +f 4540//4540 4541//4541 4542//4542
    +f 4543//4543 4544//4544 4545//4545
    +f 4546//4546 4547//4547 4548//4548
    +f 4549//4549 4550//4550 4551//4551
    +f 4552//4552 4553//4553 4554//4554
    +f 4555//4555 4556//4556 4557//4557
    +f 4558//4558 4559//4559 4560//4560
    +f 4561//4561 4562//4562 4563//4563
    +f 4564//4564 4565//4565 4566//4566
    +f 4567//4567 4568//4568 4569//4569
    +f 4570//4570 4571//4571 4572//4572
    +f 4573//4573 4574//4574 4575//4575
    +f 4576//4576 4577//4577 4578//4578
    +f 4579//4579 4580//4580 4581//4581
    +f 4582//4582 4583//4583 4584//4584
    +f 4585//4585 4586//4586 4587//4587
    +f 4588//4588 4589//4589 4590//4590
    +f 4591//4591 4592//4592 4593//4593
    +f 4594//4594 4595//4595 4596//4596
    +f 4597//4597 4598//4598 4599//4599
    +f 4600//4600 4601//4601 4602//4602
    +f 4603//4603 4604//4604 4605//4605
    +f 4606//4606 4607//4607 4608//4608
    +f 4609//4609 4610//4610 4611//4611
    +f 4612//4612 4613//4613 4614//4614
    +f 4615//4615 4616//4616 4617//4617
    +f 4618//4618 4619//4619 4620//4620
    +f 4621//4621 4622//4622 4623//4623
    +f 4624//4624 4625//4625 4626//4626
    +f 4627//4627 4628//4628 4629//4629
    +f 4630//4630 4631//4631 4632//4632
    +f 4633//4633 4634//4634 4635//4635
    +f 4636//4636 4637//4637 4638//4638
    +f 4639//4639 4640//4640 4641//4641
    +f 4642//4642 4643//4643 4644//4644
    +f 4645//4645 4646//4646 4647//4647
    +f 4648//4648 4649//4649 4650//4650
    +f 4651//4651 4652//4652 4653//4653
    +f 4654//4654 4655//4655 4656//4656
    +f 4657//4657 4658//4658 4659//4659
    +f 4660//4660 4661//4661 4662//4662
    +f 4663//4663 4664//4664 4665//4665
    +f 4666//4666 4667//4667 4668//4668
    +f 4669//4669 4670//4670 4671//4671
    +f 4672//4672 4673//4673 4674//4674
    +f 4675//4675 4676//4676 4677//4677
    +f 4678//4678 4679//4679 4680//4680
    +f 4681//4681 4682//4682 4683//4683
    +f 4684//4684 4685//4685 4686//4686
    +f 4687//4687 4688//4688 4689//4689
    +f 4690//4690 4691//4691 4692//4692
    +f 4693//4693 4694//4694 4695//4695
    +f 4696//4696 4697//4697 4698//4698
    +f 4699//4699 4700//4700 4701//4701
    +f 4702//4702 4703//4703 4704//4704
    +f 4705//4705 4706//4706 4707//4707
    +f 4708//4708 4709//4709 4710//4710
    +f 4711//4711 4712//4712 4713//4713
    +f 4714//4714 4715//4715 4716//4716
    +f 4717//4717 4718//4718 4719//4719
    +f 4720//4720 4721//4721 4722//4722
    +f 4723//4723 4724//4724 4725//4725
    +f 4726//4726 4727//4727 4728//4728
    +f 4729//4729 4730//4730 4731//4731
    +f 4732//4732 4733//4733 4734//4734
    +f 4735//4735 4736//4736 4737//4737
    +f 4738//4738 4739//4739 4740//4740
    +f 4741//4741 4742//4742 4743//4743
    +f 4744//4744 4745//4745 4746//4746
    +f 4747//4747 4748//4748 4749//4749
    +f 4750//4750 4751//4751 4752//4752
    +f 4753//4753 4754//4754 4755//4755
    +f 4756//4756 4757//4757 4758//4758
    +f 4759//4759 4760//4760 4761//4761
    +f 4762//4762 4763//4763 4764//4764
    +f 4765//4765 4766//4766 4767//4767
    +f 4768//4768 4769//4769 4770//4770
    +f 4771//4771 4772//4772 4773//4773
    +f 4774//4774 4775//4775 4776//4776
    +f 4777//4777 4778//4778 4779//4779
    +f 4780//4780 4781//4781 4782//4782
    +f 4783//4783 4784//4784 4785//4785
    +f 4786//4786 4787//4787 4788//4788
    +f 4789//4789 4790//4790 4791//4791
    +f 4792//4792 4793//4793 4794//4794
    +f 4795//4795 4796//4796 4797//4797
    +f 4798//4798 4799//4799 4800//4800
    +f 4801//4801 4802//4802 4803//4803
    +f 4804//4804 4805//4805 4806//4806
    +f 4807//4807 4808//4808 4809//4809
    +f 4810//4810 4811//4811 4812//4812
    +f 4813//4813 4814//4814 4815//4815
    +f 4816//4816 4817//4817 4818//4818
    +f 4819//4819 4820//4820 4821//4821
    +f 4822//4822 4823//4823 4824//4824
    +f 4825//4825 4826//4826 4827//4827
    +f 4828//4828 4829//4829 4830//4830
    +f 4831//4831 4832//4832 4833//4833
    +f 4834//4834 4835//4835 4836//4836
    +f 4837//4837 4838//4838 4839//4839
    +f 4840//4840 4841//4841 4842//4842
    +f 4843//4843 4844//4844 4845//4845
    +f 4846//4846 4847//4847 4848//4848
    +f 4849//4849 4850//4850 4851//4851
    +f 4852//4852 4853//4853 4854//4854
    +f 4855//4855 4856//4856 4857//4857
    +f 4858//4858 4859//4859 4860//4860
    +f 4861//4861 4862//4862 4863//4863
    +f 4864//4864 4865//4865 4866//4866
    +f 4867//4867 4868//4868 4869//4869
    +f 4870//4870 4871//4871 4872//4872
    +f 4873//4873 4874//4874 4875//4875
    +f 4876//4876 4877//4877 4878//4878
    +f 4879//4879 4880//4880 4881//4881
    +f 4882//4882 4883//4883 4884//4884
    +f 4885//4885 4886//4886 4887//4887
    +f 4888//4888 4889//4889 4890//4890
    +f 4891//4891 4892//4892 4893//4893
    +f 4894//4894 4895//4895 4896//4896
    +f 4897//4897 4898//4898 4899//4899
    +f 4900//4900 4901//4901 4902//4902
    +f 4903//4903 4904//4904 4905//4905
    +f 4906//4906 4907//4907 4908//4908
    +f 4909//4909 4910//4910 4911//4911
    +f 4912//4912 4913//4913 4914//4914
    +f 4915//4915 4916//4916 4917//4917
    +f 4918//4918 4919//4919 4920//4920
    +f 4921//4921 4922//4922 4923//4923
    +f 4924//4924 4925//4925 4926//4926
    +f 4927//4927 4928//4928 4929//4929
    +f 4930//4930 4931//4931 4932//4932
    +f 4933//4933 4934//4934 4935//4935
    +f 4936//4936 4937//4937 4938//4938
    +f 4939//4939 4940//4940 4941//4941
    +f 4942//4942 4943//4943 4944//4944
    +f 4945//4945 4946//4946 4947//4947
    +f 4948//4948 4949//4949 4950//4950
    +f 4951//4951 4952//4952 4953//4953
    +f 4954//4954 4955//4955 4956//4956
    +f 4957//4957 4958//4958 4959//4959
    +f 4960//4960 4961//4961 4962//4962
    +f 4963//4963 4964//4964 4965//4965
    +f 4966//4966 4967//4967 4968//4968
    +f 4969//4969 4970//4970 4971//4971
    +f 4972//4972 4973//4973 4974//4974
    +f 4975//4975 4976//4976 4977//4977
    +f 4978//4978 4979//4979 4980//4980
    +f 4981//4981 4982//4982 4983//4983
    +f 4984//4984 4985//4985 4986//4986
    +f 4987//4987 4988//4988 4989//4989
    +f 4990//4990 4991//4991 4992//4992
    +f 4993//4993 4994//4994 4995//4995
    +f 4996//4996 4997//4997 4998//4998
    +f 4999//4999 5000//5000 5001//5001
    +f 5002//5002 5003//5003 5004//5004
    +f 5005//5005 5006//5006 5007//5007
    +f 5008//5008 5009//5009 5010//5010
    +f 5011//5011 5012//5012 5013//5013
    +f 5014//5014 5015//5015 5016//5016
    +f 5017//5017 5018//5018 5019//5019
    +f 5020//5020 5021//5021 5022//5022
    +f 5023//5023 5024//5024 5025//5025
    +f 5026//5026 5027//5027 5028//5028
    +f 5029//5029 5030//5030 5031//5031
    +f 5032//5032 5033//5033 5034//5034
    +f 5035//5035 5036//5036 5037//5037
    +f 5038//5038 5039//5039 5040//5040
    +f 5041//5041 5042//5042 5043//5043
    +f 5044//5044 5045//5045 5046//5046
    +f 5047//5047 5048//5048 5049//5049
    +f 5050//5050 5051//5051 5052//5052
    +f 5053//5053 5054//5054 5055//5055
    +f 5056//5056 5057//5057 5058//5058
    +f 5059//5059 5060//5060 5061//5061
    +f 5062//5062 5063//5063 5064//5064
    +f 5065//5065 5066//5066 5067//5067
    +f 5068//5068 5069//5069 5070//5070
    +f 5071//5071 5072//5072 5073//5073
    +f 5074//5074 5075//5075 5076//5076
    +f 5077//5077 5078//5078 5079//5079
    +f 5080//5080 5081//5081 5082//5082
    +f 5083//5083 5084//5084 5085//5085
    +f 5086//5086 5087//5087 5088//5088
    +f 5089//5089 5090//5090 5091//5091
    +f 5092//5092 5093//5093 5094//5094
    +f 5095//5095 5096//5096 5097//5097
    +f 5098//5098 5099//5099 5100//5100
    +f 5101//5101 5102//5102 5103//5103
    +f 5104//5104 5105//5105 5106//5106
    +f 5107//5107 5108//5108 5109//5109
    +f 5110//5110 5111//5111 5112//5112
    +f 5113//5113 5114//5114 5115//5115
    +f 5116//5116 5117//5117 5118//5118
    +f 5119//5119 5120//5120 5121//5121
    +f 5122//5122 5123//5123 5124//5124
    +f 5125//5125 5126//5126 5127//5127
    +f 5128//5128 5129//5129 5130//5130
    +f 5131//5131 5132//5132 5133//5133
    +f 5134//5134 5135//5135 5136//5136
    +f 5137//5137 5138//5138 5139//5139
    +f 5140//5140 5141//5141 5142//5142
    +f 5143//5143 5144//5144 5145//5145
    +f 5146//5146 5147//5147 5148//5148
    +f 5149//5149 5150//5150 5151//5151
    +f 5152//5152 5153//5153 5154//5154
    +f 5155//5155 5156//5156 5157//5157
    +f 5158//5158 5159//5159 5160//5160
    +f 5161//5161 5162//5162 5163//5163
    +f 5164//5164 5165//5165 5166//5166
    +f 5167//5167 5168//5168 5169//5169
    +f 5170//5170 5171//5171 5172//5172
    +f 5173//5173 5174//5174 5175//5175
    +f 5176//5176 5177//5177 5178//5178
    +f 5179//5179 5180//5180 5181//5181
    +f 5182//5182 5183//5183 5184//5184
    +f 5185//5185 5186//5186 5187//5187
    +f 5188//5188 5189//5189 5190//5190
    +f 5191//5191 5192//5192 5193//5193
    +f 5194//5194 5195//5195 5196//5196
    +f 5197//5197 5198//5198 5199//5199
    +f 5200//5200 5201//5201 5202//5202
    +f 5203//5203 5204//5204 5205//5205
    +f 5206//5206 5207//5207 5208//5208
    +f 5209//5209 5210//5210 5211//5211
    +f 5212//5212 5213//5213 5214//5214
    +f 5215//5215 5216//5216 5217//5217
    +f 5218//5218 5219//5219 5220//5220
    +f 5221//5221 5222//5222 5223//5223
    +f 5224//5224 5225//5225 5226//5226
    +f 5227//5227 5228//5228 5229//5229
    +f 5230//5230 5231//5231 5232//5232
    +f 5233//5233 5234//5234 5235//5235
    +f 5236//5236 5237//5237 5238//5238
    +f 5239//5239 5240//5240 5241//5241
    +f 5242//5242 5243//5243 5244//5244
    +f 5245//5245 5246//5246 5247//5247
    +f 5248//5248 5249//5249 5250//5250
    +f 5251//5251 5252//5252 5253//5253
    +f 5254//5254 5255//5255 5256//5256
    +f 5257//5257 5258//5258 5259//5259
    +f 5260//5260 5261//5261 5262//5262
    +f 5263//5263 5264//5264 5265//5265
    +f 5266//5266 5267//5267 5268//5268
    +f 5269//5269 5270//5270 5271//5271
    +f 5272//5272 5273//5273 5274//5274
    +f 5275//5275 5276//5276 5277//5277
    +f 5278//5278 5279//5279 5280//5280
    +f 5281//5281 5282//5282 5283//5283
    +f 5284//5284 5285//5285 5286//5286
    +f 5287//5287 5288//5288 5289//5289
    +f 5290//5290 5291//5291 5292//5292
    +f 5293//5293 5294//5294 5295//5295
    +f 5296//5296 5297//5297 5298//5298
    +f 5299//5299 5300//5300 5301//5301
    +f 5302//5302 5303//5303 5304//5304
    +f 5305//5305 5306//5306 5307//5307
    +f 5308//5308 5309//5309 5310//5310
    +f 5311//5311 5312//5312 5313//5313
    +f 5314//5314 5315//5315 5316//5316
    +f 5317//5317 5318//5318 5319//5319
    +f 5320//5320 5321//5321 5322//5322
    +f 5323//5323 5324//5324 5325//5325
    +f 5326//5326 5327//5327 5328//5328
    +f 5329//5329 5330//5330 5331//5331
    +f 5332//5332 5333//5333 5334//5334
    +f 5335//5335 5336//5336 5337//5337
    +f 5338//5338 5339//5339 5340//5340
    +f 5341//5341 5342//5342 5343//5343
    +f 5344//5344 5345//5345 5346//5346
    +f 5347//5347 5348//5348 5349//5349
    +f 5350//5350 5351//5351 5352//5352
    +f 5353//5353 5354//5354 5355//5355
    +f 5356//5356 5357//5357 5358//5358
    +f 5359//5359 5360//5360 5361//5361
    +f 5362//5362 5363//5363 5364//5364
    +f 5365//5365 5366//5366 5367//5367
    +f 5368//5368 5369//5369 5370//5370
    +f 5371//5371 5372//5372 5373//5373
    +f 5374//5374 5375//5375 5376//5376
    +f 5377//5377 5378//5378 5379//5379
    +f 5380//5380 5381//5381 5382//5382
    +f 5383//5383 5384//5384 5385//5385
    +f 5386//5386 5387//5387 5388//5388
    +f 5389//5389 5390//5390 5391//5391
    +f 5392//5392 5393//5393 5394//5394
    +f 5395//5395 5396//5396 5397//5397
    +f 5398//5398 5399//5399 5400//5400
    +f 5401//5401 5402//5402 5403//5403
    +f 5404//5404 5405//5405 5406//5406
    +f 5407//5407 5408//5408 5409//5409
    +f 5410//5410 5411//5411 5412//5412
    +f 5413//5413 5414//5414 5415//5415
    +f 5416//5416 5417//5417 5418//5418
    +f 5419//5419 5420//5420 5421//5421
    +f 5422//5422 5423//5423 5424//5424
    +f 5425//5425 5426//5426 5427//5427
    +f 5428//5428 5429//5429 5430//5430
    +f 5431//5431 5432//5432 5433//5433
    +f 5434//5434 5435//5435 5436//5436
    +f 5437//5437 5438//5438 5439//5439
    +f 5440//5440 5441//5441 5442//5442
    +f 5443//5443 5444//5444 5445//5445
    +f 5446//5446 5447//5447 5448//5448
    +f 5449//5449 5450//5450 5451//5451
    +f 5452//5452 5453//5453 5454//5454
    +f 5455//5455 5456//5456 5457//5457
    +f 5458//5458 5459//5459 5460//5460
    +f 5461//5461 5462//5462 5463//5463
    +f 5464//5464 5465//5465 5466//5466
    +f 5467//5467 5468//5468 5469//5469
    +f 5470//5470 5471//5471 5472//5472
    +f 5473//5473 5474//5474 5475//5475
    +f 5476//5476 5477//5477 5478//5478
    +f 5479//5479 5480//5480 5481//5481
    +f 5482//5482 5483//5483 5484//5484
    +f 5485//5485 5486//5486 5487//5487
    +f 5488//5488 5489//5489 5490//5490
    +f 5491//5491 5492//5492 5493//5493
    +f 5494//5494 5495//5495 5496//5496
    +f 5497//5497 5498//5498 5499//5499
    +f 5500//5500 5501//5501 5502//5502
    +f 5503//5503 5504//5504 5505//5505
    +f 5506//5506 5507//5507 5508//5508
    +f 5509//5509 5510//5510 5511//5511
    +f 5512//5512 5513//5513 5514//5514
    +f 5515//5515 5516//5516 5517//5517
    +f 5518//5518 5519//5519 5520//5520
    +f 5521//5521 5522//5522 5523//5523
    +f 5524//5524 5525//5525 5526//5526
    +f 5527//5527 5528//5528 5529//5529
    +f 5530//5530 5531//5531 5532//5532
    +f 5533//5533 5534//5534 5535//5535
    +f 5536//5536 5537//5537 5538//5538
    +f 5539//5539 5540//5540 5541//5541
    +f 5542//5542 5543//5543 5544//5544
    +f 5545//5545 5546//5546 5547//5547
    +f 5548//5548 5549//5549 5550//5550
    +f 5551//5551 5552//5552 5553//5553
    +f 5554//5554 5555//5555 5556//5556
    +f 5557//5557 5558//5558 5559//5559
    +f 5560//5560 5561//5561 5562//5562
    +f 5563//5563 5564//5564 5565//5565
    +f 5566//5566 5567//5567 5568//5568
    +f 5569//5569 5570//5570 5571//5571
    +f 5572//5572 5573//5573 5574//5574
    +f 5575//5575 5576//5576 5577//5577
    +f 5578//5578 5579//5579 5580//5580
    +f 5581//5581 5582//5582 5583//5583
    +f 5584//5584 5585//5585 5586//5586
    +f 5587//5587 5588//5588 5589//5589
    +f 5590//5590 5591//5591 5592//5592
    +f 5593//5593 5594//5594 5595//5595
    +f 5596//5596 5597//5597 5598//5598
    +f 5599//5599 5600//5600 5601//5601
    +f 5602//5602 5603//5603 5604//5604
    +f 5605//5605 5606//5606 5607//5607
    +f 5608//5608 5609//5609 5610//5610
    +f 5611//5611 5612//5612 5613//5613
    +f 5614//5614 5615//5615 5616//5616
    +f 5617//5617 5618//5618 5619//5619
    +f 5620//5620 5621//5621 5622//5622
    +f 5623//5623 5624//5624 5625//5625
    +f 5626//5626 5627//5627 5628//5628
    +f 5629//5629 5630//5630 5631//5631
    +f 5632//5632 5633//5633 5634//5634
    +f 5635//5635 5636//5636 5637//5637
    +f 5638//5638 5639//5639 5640//5640
    +f 5641//5641 5642//5642 5643//5643
    +f 5644//5644 5645//5645 5646//5646
    +f 5647//5647 5648//5648 5649//5649
    +f 5650//5650 5651//5651 5652//5652
    +f 5653//5653 5654//5654 5655//5655
    +f 5656//5656 5657//5657 5658//5658
    +f 5659//5659 5660//5660 5661//5661
    +f 5662//5662 5663//5663 5664//5664
    +f 5665//5665 5666//5666 5667//5667
    +f 5668//5668 5669//5669 5670//5670
    +f 5671//5671 5672//5672 5673//5673
    +f 5674//5674 5675//5675 5676//5676
    +f 5677//5677 5678//5678 5679//5679
    +f 5680//5680 5681//5681 5682//5682
    +f 5683//5683 5684//5684 5685//5685
    +f 5686//5686 5687//5687 5688//5688
    +f 5689//5689 5690//5690 5691//5691
    +f 5692//5692 5693//5693 5694//5694
    +f 5695//5695 5696//5696 5697//5697
    +f 5698//5698 5699//5699 5700//5700
    +f 5701//5701 5702//5702 5703//5703
    +f 5704//5704 5705//5705 5706//5706
    +f 5707//5707 5708//5708 5709//5709
    +f 5710//5710 5711//5711 5712//5712
    +f 5713//5713 5714//5714 5715//5715
    +f 5716//5716 5717//5717 5718//5718
    +f 5719//5719 5720//5720 5721//5721
    +f 5722//5722 5723//5723 5724//5724
    +f 5725//5725 5726//5726 5727//5727
    +f 5728//5728 5729//5729 5730//5730
    +f 5731//5731 5732//5732 5733//5733
    +f 5734//5734 5735//5735 5736//5736
    +f 5737//5737 5738//5738 5739//5739
    +f 5740//5740 5741//5741 5742//5742
    +f 5743//5743 5744//5744 5745//5745
    +f 5746//5746 5747//5747 5748//5748
    +f 5749//5749 5750//5750 5751//5751
    +f 5752//5752 5753//5753 5754//5754
    +f 5755//5755 5756//5756 5757//5757
    +f 5758//5758 5759//5759 5760//5760
    +f 5761//5761 5762//5762 5763//5763
    +f 5764//5764 5765//5765 5766//5766
    +f 5767//5767 5768//5768 5769//5769
    +f 5770//5770 5771//5771 5772//5772
    +f 5773//5773 5774//5774 5775//5775
    +f 5776//5776 5777//5777 5778//5778
    +f 5779//5779 5780//5780 5781//5781
    +f 5782//5782 5783//5783 5784//5784
    +f 5785//5785 5786//5786 5787//5787
    +f 5788//5788 5789//5789 5790//5790
    +f 5791//5791 5792//5792 5793//5793
    +f 5794//5794 5795//5795 5796//5796
    +f 5797//5797 5798//5798 5799//5799
    +f 5800//5800 5801//5801 5802//5802
    +f 5803//5803 5804//5804 5805//5805
    +f 5806//5806 5807//5807 5808//5808
    +f 5809//5809 5810//5810 5811//5811
    +f 5812//5812 5813//5813 5814//5814
    +f 5815//5815 5816//5816 5817//5817
    +f 5818//5818 5819//5819 5820//5820
    +f 5821//5821 5822//5822 5823//5823
    +f 5824//5824 5825//5825 5826//5826
    +f 5827//5827 5828//5828 5829//5829
    +f 5830//5830 5831//5831 5832//5832
    +f 5833//5833 5834//5834 5835//5835
    +f 5836//5836 5837//5837 5838//5838
    +f 5839//5839 5840//5840 5841//5841
    +f 5842//5842 5843//5843 5844//5844
    +f 5845//5845 5846//5846 5847//5847
    +f 5848//5848 5849//5849 5850//5850
    +f 5851//5851 5852//5852 5853//5853
    +f 5854//5854 5855//5855 5856//5856
    +f 5857//5857 5858//5858 5859//5859
    +f 5860//5860 5861//5861 5862//5862
    +f 5863//5863 5864//5864 5865//5865
    +f 5866//5866 5867//5867 5868//5868
    +f 5869//5869 5870//5870 5871//5871
    +f 5872//5872 5873//5873 5874//5874
    +f 5875//5875 5876//5876 5877//5877
    +f 5878//5878 5879//5879 5880//5880
    +f 5881//5881 5882//5882 5883//5883
    +f 5884//5884 5885//5885 5886//5886
    +f 5887//5887 5888//5888 5889//5889
    +f 5890//5890 5891//5891 5892//5892
    +f 5893//5893 5894//5894 5895//5895
    +f 5896//5896 5897//5897 5898//5898
    +f 5899//5899 5900//5900 5901//5901
    +f 5902//5902 5903//5903 5904//5904
    +f 5905//5905 5906//5906 5907//5907
    +f 5908//5908 5909//5909 5910//5910
    +f 5911//5911 5912//5912 5913//5913
    +f 5914//5914 5915//5915 5916//5916
    +f 5917//5917 5918//5918 5919//5919
    +f 5920//5920 5921//5921 5922//5922
    +f 5923//5923 5924//5924 5925//5925
    +f 5926//5926 5927//5927 5928//5928
    +f 5929//5929 5930//5930 5931//5931
    +f 5932//5932 5933//5933 5934//5934
    +f 5935//5935 5936//5936 5937//5937
    +f 5938//5938 5939//5939 5940//5940
    +f 5941//5941 5942//5942 5943//5943
    +f 5944//5944 5945//5945 5946//5946
    +f 5947//5947 5948//5948 5949//5949
    +f 5950//5950 5951//5951 5952//5952
    +f 5953//5953 5954//5954 5955//5955
    +f 5956//5956 5957//5957 5958//5958
    +f 5959//5959 5960//5960 5961//5961
    +f 5962//5962 5963//5963 5964//5964
    +f 5965//5965 5966//5966 5967//5967
    +f 5968//5968 5969//5969 5970//5970
    +f 5971//5971 5972//5972 5973//5973
    +f 5974//5974 5975//5975 5976//5976
    +f 5977//5977 5978//5978 5979//5979
    +f 5980//5980 5981//5981 5982//5982
    +f 5983//5983 5984//5984 5985//5985
    +f 5986//5986 5987//5987 5988//5988
    +f 5989//5989 5990//5990 5991//5991
    +f 5992//5992 5993//5993 5994//5994
    +f 5995//5995 5996//5996 5997//5997
    +f 5998//5998 5999//5999 6000//6000
    +f 6001//6001 6002//6002 6003//6003
    +f 6004//6004 6005//6005 6006//6006
    +f 6007//6007 6008//6008 6009//6009
    +f 6010//6010 6011//6011 6012//6012
    +f 6013//6013 6014//6014 6015//6015
    +f 6016//6016 6017//6017 6018//6018
    +f 6019//6019 6020//6020 6021//6021
    +f 6022//6022 6023//6023 6024//6024
    +f 6025//6025 6026//6026 6027//6027
    +f 6028//6028 6029//6029 6030//6030
    +f 6031//6031 6032//6032 6033//6033
    +f 6034//6034 6035//6035 6036//6036
    +f 6037//6037 6038//6038 6039//6039
    +f 6040//6040 6041//6041 6042//6042
    +f 6043//6043 6044//6044 6045//6045
    +f 6046//6046 6047//6047 6048//6048
    +f 6049//6049 6050//6050 6051//6051
    +f 6052//6052 6053//6053 6054//6054
    +f 6055//6055 6056//6056 6057//6057
    +f 6058//6058 6059//6059 6060//6060
    +f 6061//6061 6062//6062 6063//6063
    +f 6064//6064 6065//6065 6066//6066
    +f 6067//6067 6068//6068 6069//6069
    +f 6070//6070 6071//6071 6072//6072
    +f 6073//6073 6074//6074 6075//6075
    +f 6076//6076 6077//6077 6078//6078
    +f 6079//6079 6080//6080 6081//6081
    +f 6082//6082 6083//6083 6084//6084
    +f 6085//6085 6086//6086 6087//6087
    +f 6088//6088 6089//6089 6090//6090
    +f 6091//6091 6092//6092 6093//6093
    +f 6094//6094 6095//6095 6096//6096
    +f 6097//6097 6098//6098 6099//6099
    +f 6100//6100 6101//6101 6102//6102
    +f 6103//6103 6104//6104 6105//6105
    +f 6106//6106 6107//6107 6108//6108
    +f 6109//6109 6110//6110 6111//6111
    +f 6112//6112 6113//6113 6114//6114
    +f 6115//6115 6116//6116 6117//6117
    +f 6118//6118 6119//6119 6120//6120
    +f 6121//6121 6122//6122 6123//6123
    +f 6124//6124 6125//6125 6126//6126
    +f 6127//6127 6128//6128 6129//6129
    +f 6130//6130 6131//6131 6132//6132
    +f 6133//6133 6134//6134 6135//6135
    +f 6136//6136 6137//6137 6138//6138
    +f 6139//6139 6140//6140 6141//6141
    +f 6142//6142 6143//6143 6144//6144
    +f 6145//6145 6146//6146 6147//6147
    +f 6148//6148 6149//6149 6150//6150
    +f 6151//6151 6152//6152 6153//6153
    +f 6154//6154 6155//6155 6156//6156
    +f 6157//6157 6158//6158 6159//6159
    +f 6160//6160 6161//6161 6162//6162
    +f 6163//6163 6164//6164 6165//6165
    +f 6166//6166 6167//6167 6168//6168
    +f 6169//6169 6170//6170 6171//6171
    +f 6172//6172 6173//6173 6174//6174
    +f 6175//6175 6176//6176 6177//6177
    +f 6178//6178 6179//6179 6180//6180
    +f 6181//6181 6182//6182 6183//6183
    +f 6184//6184 6185//6185 6186//6186
    +f 6187//6187 6188//6188 6189//6189
    +f 6190//6190 6191//6191 6192//6192
    +f 6193//6193 6194//6194 6195//6195
    +f 6196//6196 6197//6197 6198//6198
    +f 6199//6199 6200//6200 6201//6201
    +f 6202//6202 6203//6203 6204//6204
    +f 6205//6205 6206//6206 6207//6207
    +f 6208//6208 6209//6209 6210//6210
    +f 6211//6211 6212//6212 6213//6213
    +f 6214//6214 6215//6215 6216//6216
    +f 6217//6217 6218//6218 6219//6219
    +f 6220//6220 6221//6221 6222//6222
    +f 6223//6223 6224//6224 6225//6225
    +f 6226//6226 6227//6227 6228//6228
    +f 6229//6229 6230//6230 6231//6231
    +f 6232//6232 6233//6233 6234//6234
    +f 6235//6235 6236//6236 6237//6237
    +f 6238//6238 6239//6239 6240//6240
    +f 6241//6241 6242//6242 6243//6243
    +f 6244//6244 6245//6245 6246//6246
    +f 6247//6247 6248//6248 6249//6249
    +f 6250//6250 6251//6251 6252//6252
    +f 6253//6253 6254//6254 6255//6255
    +f 6256//6256 6257//6257 6258//6258
    +f 6259//6259 6260//6260 6261//6261
    +f 6262//6262 6263//6263 6264//6264
    +f 6265//6265 6266//6266 6267//6267
    +f 6268//6268 6269//6269 6270//6270
    +f 6271//6271 6272//6272 6273//6273
    +f 6274//6274 6275//6275 6276//6276
    +f 6277//6277 6278//6278 6279//6279
    +f 6280//6280 6281//6281 6282//6282
    +f 6283//6283 6284//6284 6285//6285
    +f 6286//6286 6287//6287 6288//6288
    +f 6289//6289 6290//6290 6291//6291
    +f 6292//6292 6293//6293 6294//6294
    +f 6295//6295 6296//6296 6297//6297
    +f 6298//6298 6299//6299 6300//6300
    +f 6301//6301 6302//6302 6303//6303
    +f 6304//6304 6305//6305 6306//6306
    +f 6307//6307 6308//6308 6309//6309
    +f 6310//6310 6311//6311 6312//6312
    +f 6313//6313 6314//6314 6315//6315
    +f 6316//6316 6317//6317 6318//6318
    +f 6319//6319 6320//6320 6321//6321
    +f 6322//6322 6323//6323 6324//6324
    +f 6325//6325 6326//6326 6327//6327
    +f 6328//6328 6329//6329 6330//6330
    +f 6331//6331 6332//6332 6333//6333
    +f 6334//6334 6335//6335 6336//6336
    +f 6337//6337 6338//6338 6339//6339
    +f 6340//6340 6341//6341 6342//6342
    +f 6343//6343 6344//6344 6345//6345
    +f 6346//6346 6347//6347 6348//6348
    +f 6349//6349 6350//6350 6351//6351
    +f 6352//6352 6353//6353 6354//6354
    +f 6355//6355 6356//6356 6357//6357
    +f 6358//6358 6359//6359 6360//6360
    +f 6361//6361 6362//6362 6363//6363
    +f 6364//6364 6365//6365 6366//6366
    +f 6367//6367 6368//6368 6369//6369
    +f 6370//6370 6371//6371 6372//6372
    +f 6373//6373 6374//6374 6375//6375
    +f 6376//6376 6377//6377 6378//6378
    +f 6379//6379 6380//6380 6381//6381
    +f 6382//6382 6383//6383 6384//6384
    +f 6385//6385 6386//6386 6387//6387
    +f 6388//6388 6389//6389 6390//6390
    +f 6391//6391 6392//6392 6393//6393
    +f 6394//6394 6395//6395 6396//6396
    +f 6397//6397 6398//6398 6399//6399
    +f 6400//6400 6401//6401 6402//6402
    +f 6403//6403 6404//6404 6405//6405
    +f 6406//6406 6407//6407 6408//6408
    +f 6409//6409 6410//6410 6411//6411
    +f 6412//6412 6413//6413 6414//6414
    +f 6415//6415 6416//6416 6417//6417
    +f 6418//6418 6419//6419 6420//6420
    +f 6421//6421 6422//6422 6423//6423
    +f 6424//6424 6425//6425 6426//6426
    +f 6427//6427 6428//6428 6429//6429
    +f 6430//6430 6431//6431 6432//6432
    +f 6433//6433 6434//6434 6435//6435
    +f 6436//6436 6437//6437 6438//6438
    +f 6439//6439 6440//6440 6441//6441
    +f 6442//6442 6443//6443 6444//6444
    +f 6445//6445 6446//6446 6447//6447
    +f 6448//6448 6449//6449 6450//6450
    +f 6451//6451 6452//6452 6453//6453
    +f 6454//6454 6455//6455 6456//6456
    +f 6457//6457 6458//6458 6459//6459
    +f 6460//6460 6461//6461 6462//6462
    +f 6463//6463 6464//6464 6465//6465
    +f 6466//6466 6467//6467 6468//6468
    +f 6469//6469 6470//6470 6471//6471
    +f 6472//6472 6473//6473 6474//6474
    +f 6475//6475 6476//6476 6477//6477
    +f 6478//6478 6479//6479 6480//6480
    +f 6481//6481 6482//6482 6483//6483
    +f 6484//6484 6485//6485 6486//6486
    +f 6487//6487 6488//6488 6489//6489
    +f 6490//6490 6491//6491 6492//6492
    +f 6493//6493 6494//6494 6495//6495
    +f 6496//6496 6497//6497 6498//6498
    +f 6499//6499 6500//6500 6501//6501
    +f 6502//6502 6503//6503 6504//6504
    +f 6505//6505 6506//6506 6507//6507
    +f 6508//6508 6509//6509 6510//6510
    +f 6511//6511 6512//6512 6513//6513
    +f 6514//6514 6515//6515 6516//6516
    +f 6517//6517 6518//6518 6519//6519
    +f 6520//6520 6521//6521 6522//6522
    +f 6523//6523 6524//6524 6525//6525
    +f 6526//6526 6527//6527 6528//6528
    +f 6529//6529 6530//6530 6531//6531
    +f 6532//6532 6533//6533 6534//6534
    +f 6535//6535 6536//6536 6537//6537
    +f 6538//6538 6539//6539 6540//6540
    +f 6541//6541 6542//6542 6543//6543
    +f 6544//6544 6545//6545 6546//6546
    +f 6547//6547 6548//6548 6549//6549
    +f 6550//6550 6551//6551 6552//6552
    +f 6553//6553 6554//6554 6555//6555
    +f 6556//6556 6557//6557 6558//6558
    +f 6559//6559 6560//6560 6561//6561
    +f 6562//6562 6563//6563 6564//6564
    +f 6565//6565 6566//6566 6567//6567
    +f 6568//6568 6569//6569 6570//6570
    +f 6571//6571 6572//6572 6573//6573
    +f 6574//6574 6575//6575 6576//6576
    +f 6577//6577 6578//6578 6579//6579
    +f 6580//6580 6581//6581 6582//6582
    +f 6583//6583 6584//6584 6585//6585
    +f 6586//6586 6587//6587 6588//6588
    +f 6589//6589 6590//6590 6591//6591
    +f 6592//6592 6593//6593 6594//6594
    +f 6595//6595 6596//6596 6597//6597
    +f 6598//6598 6599//6599 6600//6600
    +f 6601//6601 6602//6602 6603//6603
    +f 6604//6604 6605//6605 6606//6606
    +f 6607//6607 6608//6608 6609//6609
    +f 6610//6610 6611//6611 6612//6612
    +f 6613//6613 6614//6614 6615//6615
    +f 6616//6616 6617//6617 6618//6618
    +f 6619//6619 6620//6620 6621//6621
    +f 6622//6622 6623//6623 6624//6624
    +f 6625//6625 6626//6626 6627//6627
    +f 6628//6628 6629//6629 6630//6630
    +f 6631//6631 6632//6632 6633//6633
    +f 6634//6634 6635//6635 6636//6636
    +f 6637//6637 6638//6638 6639//6639
    +f 6640//6640 6641//6641 6642//6642
    +f 6643//6643 6644//6644 6645//6645
    +f 6646//6646 6647//6647 6648//6648
    +f 6649//6649 6650//6650 6651//6651
    +f 6652//6652 6653//6653 6654//6654
    +f 6655//6655 6656//6656 6657//6657
    +f 6658//6658 6659//6659 6660//6660
    +f 6661//6661 6662//6662 6663//6663
    +f 6664//6664 6665//6665 6666//6666
    +f 6667//6667 6668//6668 6669//6669
    +f 6670//6670 6671//6671 6672//6672
    +f 6673//6673 6674//6674 6675//6675
    +f 6676//6676 6677//6677 6678//6678
    +f 6679//6679 6680//6680 6681//6681
    +f 6682//6682 6683//6683 6684//6684
    +f 6685//6685 6686//6686 6687//6687
    +f 6688//6688 6689//6689 6690//6690
    +f 6691//6691 6692//6692 6693//6693
    +f 6694//6694 6695//6695 6696//6696
    +f 6697//6697 6698//6698 6699//6699
    +f 6700//6700 6701//6701 6702//6702
    +f 6703//6703 6704//6704 6705//6705
    +f 6706//6706 6707//6707 6708//6708
    +f 6709//6709 6710//6710 6711//6711
    +f 6712//6712 6713//6713 6714//6714
    +f 6715//6715 6716//6716 6717//6717
    +f 6718//6718 6719//6719 6720//6720
    +f 6721//6721 6722//6722 6723//6723
    +f 6724//6724 6725//6725 6726//6726
    +f 6727//6727 6728//6728 6729//6729
    +f 6730//6730 6731//6731 6732//6732
    +f 6733//6733 6734//6734 6735//6735
    +f 6736//6736 6737//6737 6738//6738
    +f 6739//6739 6740//6740 6741//6741
    +f 6742//6742 6743//6743 6744//6744
    +f 6745//6745 6746//6746 6747//6747
    +f 6748//6748 6749//6749 6750//6750
    +f 6751//6751 6752//6752 6753//6753
    +f 6754//6754 6755//6755 6756//6756
    +f 6757//6757 6758//6758 6759//6759
    +f 6760//6760 6761//6761 6762//6762
    +f 6763//6763 6764//6764 6765//6765
    +f 6766//6766 6767//6767 6768//6768
    +f 6769//6769 6770//6770 6771//6771
    +f 6772//6772 6773//6773 6774//6774
    +f 6775//6775 6776//6776 6777//6777
    +f 6778//6778 6779//6779 6780//6780
    +f 6781//6781 6782//6782 6783//6783
    +f 6784//6784 6785//6785 6786//6786
    +f 6787//6787 6788//6788 6789//6789
    +f 6790//6790 6791//6791 6792//6792
    +f 6793//6793 6794//6794 6795//6795
    +f 6796//6796 6797//6797 6798//6798
    +f 6799//6799 6800//6800 6801//6801
    +f 6802//6802 6803//6803 6804//6804
    +f 6805//6805 6806//6806 6807//6807
    +f 6808//6808 6809//6809 6810//6810
    +f 6811//6811 6812//6812 6813//6813
    +f 6814//6814 6815//6815 6816//6816
    +f 6817//6817 6818//6818 6819//6819
    +f 6820//6820 6821//6821 6822//6822
    +f 6823//6823 6824//6824 6825//6825
    +f 6826//6826 6827//6827 6828//6828
    +f 6829//6829 6830//6830 6831//6831
    +f 6832//6832 6833//6833 6834//6834
    +f 6835//6835 6836//6836 6837//6837
    +f 6838//6838 6839//6839 6840//6840
    +f 6841//6841 6842//6842 6843//6843
    +f 6844//6844 6845//6845 6846//6846
    +f 6847//6847 6848//6848 6849//6849
    +f 6850//6850 6851//6851 6852//6852
    +f 6853//6853 6854//6854 6855//6855
    +f 6856//6856 6857//6857 6858//6858
    +f 6859//6859 6860//6860 6861//6861
    +f 6862//6862 6863//6863 6864//6864
    +f 6865//6865 6866//6866 6867//6867
    +f 6868//6868 6869//6869 6870//6870
    +f 6871//6871 6872//6872 6873//6873
    +f 6874//6874 6875//6875 6876//6876
    +f 6877//6877 6878//6878 6879//6879
    +f 6880//6880 6881//6881 6882//6882
    +f 6883//6883 6884//6884 6885//6885
    +f 6886//6886 6887//6887 6888//6888
    +f 6889//6889 6890//6890 6891//6891
    +f 6892//6892 6893//6893 6894//6894
    +f 6895//6895 6896//6896 6897//6897
    +f 6898//6898 6899//6899 6900//6900
    +f 6901//6901 6902//6902 6903//6903
    +f 6904//6904 6905//6905 6906//6906
    +f 6907//6907 6908//6908 6909//6909
    +f 6910//6910 6911//6911 6912//6912
    +f 6913//6913 6914//6914 6915//6915
    +f 6916//6916 6917//6917 6918//6918
    +f 6919//6919 6920//6920 6921//6921
    +f 6922//6922 6923//6923 6924//6924
    +f 6925//6925 6926//6926 6927//6927
    +f 6928//6928 6929//6929 6930//6930
    +f 6931//6931 6932//6932 6933//6933
    +f 6934//6934 6935//6935 6936//6936
    +f 6937//6937 6938//6938 6939//6939
    +f 6940//6940 6941//6941 6942//6942
    +f 6943//6943 6944//6944 6945//6945
    +f 6946//6946 6947//6947 6948//6948
    +f 6949//6949 6950//6950 6951//6951
    +f 6952//6952 6953//6953 6954//6954
    +f 6955//6955 6956//6956 6957//6957
    +f 6958//6958 6959//6959 6960//6960
    +f 6961//6961 6962//6962 6963//6963
    +f 6964//6964 6965//6965 6966//6966
    +f 6967//6967 6968//6968 6969//6969
    +f 6970//6970 6971//6971 6972//6972
    +f 6973//6973 6974//6974 6975//6975
    +f 6976//6976 6977//6977 6978//6978
    +f 6979//6979 6980//6980 6981//6981
    +f 6982//6982 6983//6983 6984//6984
    +f 6985//6985 6986//6986 6987//6987
    +f 6988//6988 6989//6989 6990//6990
    +f 6991//6991 6992//6992 6993//6993
    +f 6994//6994 6995//6995 6996//6996
    +f 6997//6997 6998//6998 6999//6999
    +f 7000//7000 7001//7001 7002//7002
    +f 7003//7003 7004//7004 7005//7005
    +f 7006//7006 7007//7007 7008//7008
    +f 7009//7009 7010//7010 7011//7011
    +f 7012//7012 7013//7013 7014//7014
    +f 7015//7015 7016//7016 7017//7017
    +f 7018//7018 7019//7019 7020//7020
    +f 7021//7021 7022//7022 7023//7023
    +f 7024//7024 7025//7025 7026//7026
    +f 7027//7027 7028//7028 7029//7029
    +f 7030//7030 7031//7031 7032//7032
    +f 7033//7033 7034//7034 7035//7035
    +f 7036//7036 7037//7037 7038//7038
    +f 7039//7039 7040//7040 7041//7041
    +f 7042//7042 7043//7043 7044//7044
    +f 7045//7045 7046//7046 7047//7047
    +f 7048//7048 7049//7049 7050//7050
    +f 7051//7051 7052//7052 7053//7053
    +f 7054//7054 7055//7055 7056//7056
    +f 7057//7057 7058//7058 7059//7059
    +f 7060//7060 7061//7061 7062//7062
    +f 7063//7063 7064//7064 7065//7065
    +f 7066//7066 7067//7067 7068//7068
    +f 7069//7069 7070//7070 7071//7071
    +f 7072//7072 7073//7073 7074//7074
    +f 7075//7075 7076//7076 7077//7077
    +f 7078//7078 7079//7079 7080//7080
    +f 7081//7081 7082//7082 7083//7083
    +f 7084//7084 7085//7085 7086//7086
    +f 7087//7087 7088//7088 7089//7089
    +f 7090//7090 7091//7091 7092//7092
    +f 7093//7093 7094//7094 7095//7095
    +f 7096//7096 7097//7097 7098//7098
    +f 7099//7099 7100//7100 7101//7101
    +f 7102//7102 7103//7103 7104//7104
    +f 7105//7105 7106//7106 7107//7107
    +f 7108//7108 7109//7109 7110//7110
    +f 7111//7111 7112//7112 7113//7113
    +f 7114//7114 7115//7115 7116//7116
    +f 7117//7117 7118//7118 7119//7119
    +f 7120//7120 7121//7121 7122//7122
    +f 7123//7123 7124//7124 7125//7125
    +f 7126//7126 7127//7127 7128//7128
    +f 7129//7129 7130//7130 7131//7131
    +f 7132//7132 7133//7133 7134//7134
    +f 7135//7135 7136//7136 7137//7137
    +f 7138//7138 7139//7139 7140//7140
    +f 7141//7141 7142//7142 7143//7143
    +f 7144//7144 7145//7145 7146//7146
    +f 7147//7147 7148//7148 7149//7149
    +f 7150//7150 7151//7151 7152//7152
    +f 7153//7153 7154//7154 7155//7155
    +f 7156//7156 7157//7157 7158//7158
    +f 7159//7159 7160//7160 7161//7161
    +f 7162//7162 7163//7163 7164//7164
    +f 7165//7165 7166//7166 7167//7167
    +f 7168//7168 7169//7169 7170//7170
    +f 7171//7171 7172//7172 7173//7173
    +f 7174//7174 7175//7175 7176//7176
    +f 7177//7177 7178//7178 7179//7179
    +f 7180//7180 7181//7181 7182//7182
    +f 7183//7183 7184//7184 7185//7185
    +f 7186//7186 7187//7187 7188//7188
    +f 7189//7189 7190//7190 7191//7191
    +f 7192//7192 7193//7193 7194//7194
    +f 7195//7195 7196//7196 7197//7197
    +f 7198//7198 7199//7199 7200//7200
    +f 7201//7201 7202//7202 7203//7203
    +f 7204//7204 7205//7205 7206//7206
    +f 7207//7207 7208//7208 7209//7209
    +f 7210//7210 7211//7211 7212//7212
    +f 7213//7213 7214//7214 7215//7215
    +f 7216//7216 7217//7217 7218//7218
    +f 7219//7219 7220//7220 7221//7221
    +f 7222//7222 7223//7223 7224//7224
    +f 7225//7225 7226//7226 7227//7227
    +f 7228//7228 7229//7229 7230//7230
    +f 7231//7231 7232//7232 7233//7233
    +f 7234//7234 7235//7235 7236//7236
    +f 7237//7237 7238//7238 7239//7239
    +f 7240//7240 7241//7241 7242//7242
    +f 7243//7243 7244//7244 7245//7245
    +f 7246//7246 7247//7247 7248//7248
    +f 7249//7249 7250//7250 7251//7251
    +f 7252//7252 7253//7253 7254//7254
    +f 7255//7255 7256//7256 7257//7257
    +f 7258//7258 7259//7259 7260//7260
    +f 7261//7261 7262//7262 7263//7263
    +f 7264//7264 7265//7265 7266//7266
    +f 7267//7267 7268//7268 7269//7269
    +f 7270//7270 7271//7271 7272//7272
    +f 7273//7273 7274//7274 7275//7275
    +f 7276//7276 7277//7277 7278//7278
    +f 7279//7279 7280//7280 7281//7281
    +f 7282//7282 7283//7283 7284//7284
    +f 7285//7285 7286//7286 7287//7287
    +f 7288//7288 7289//7289 7290//7290
    +f 7291//7291 7292//7292 7293//7293
    +f 7294//7294 7295//7295 7296//7296
    +f 7297//7297 7298//7298 7299//7299
    +f 7300//7300 7301//7301 7302//7302
    +f 7303//7303 7304//7304 7305//7305
    +f 7306//7306 7307//7307 7308//7308
    +f 7309//7309 7310//7310 7311//7311
    +f 7312//7312 7313//7313 7314//7314
    +f 7315//7315 7316//7316 7317//7317
    +f 7318//7318 7319//7319 7320//7320
    +f 7321//7321 7322//7322 7323//7323
    +f 7324//7324 7325//7325 7326//7326
    +f 7327//7327 7328//7328 7329//7329
    +f 7330//7330 7331//7331 7332//7332
    +f 7333//7333 7334//7334 7335//7335
    +f 7336//7336 7337//7337 7338//7338
    +f 7339//7339 7340//7340 7341//7341
    +f 7342//7342 7343//7343 7344//7344
    +f 7345//7345 7346//7346 7347//7347
    +f 7348//7348 7349//7349 7350//7350
    +f 7351//7351 7352//7352 7353//7353
    +f 7354//7354 7355//7355 7356//7356
    +f 7357//7357 7358//7358 7359//7359
    +f 7360//7360 7361//7361 7362//7362
    +f 7363//7363 7364//7364 7365//7365
    +f 7366//7366 7367//7367 7368//7368
    +f 7369//7369 7370//7370 7371//7371
    +f 7372//7372 7373//7373 7374//7374
    +f 7375//7375 7376//7376 7377//7377
    +f 7378//7378 7379//7379 7380//7380
    +f 7381//7381 7382//7382 7383//7383
    +f 7384//7384 7385//7385 7386//7386
    +f 7387//7387 7388//7388 7389//7389
    +f 7390//7390 7391//7391 7392//7392
    +f 7393//7393 7394//7394 7395//7395
    +f 7396//7396 7397//7397 7398//7398
    +f 7399//7399 7400//7400 7401//7401
    +f 7402//7402 7403//7403 7404//7404
    +f 7405//7405 7406//7406 7407//7407
    +f 7408//7408 7409//7409 7410//7410
    +f 7411//7411 7412//7412 7413//7413
    +f 7414//7414 7415//7415 7416//7416
    +f 7417//7417 7418//7418 7419//7419
    +f 7420//7420 7421//7421 7422//7422
    +f 7423//7423 7424//7424 7425//7425
    +f 7426//7426 7427//7427 7428//7428
    +f 7429//7429 7430//7430 7431//7431
    +f 7432//7432 7433//7433 7434//7434
    +f 7435//7435 7436//7436 7437//7437
    +f 7438//7438 7439//7439 7440//7440
    +f 7441//7441 7442//7442 7443//7443
    +f 7444//7444 7445//7445 7446//7446
    +f 7447//7447 7448//7448 7449//7449
    +f 7450//7450 7451//7451 7452//7452
    +f 7453//7453 7454//7454 7455//7455
    +f 7456//7456 7457//7457 7458//7458
    +f 7459//7459 7460//7460 7461//7461
    +f 7462//7462 7463//7463 7464//7464
    +f 7465//7465 7466//7466 7467//7467
    +f 7468//7468 7469//7469 7470//7470
    +f 7471//7471 7472//7472 7473//7473
    +f 7474//7474 7475//7475 7476//7476
    +f 7477//7477 7478//7478 7479//7479
    +f 7480//7480 7481//7481 7482//7482
    +f 7483//7483 7484//7484 7485//7485
    +f 7486//7486 7487//7487 7488//7488
    +f 7489//7489 7490//7490 7491//7491
    +f 7492//7492 7493//7493 7494//7494
    +f 7495//7495 7496//7496 7497//7497
    +f 7498//7498 7499//7499 7500//7500
    +f 7501//7501 7502//7502 7503//7503
    +f 7504//7504 7505//7505 7506//7506
    +f 7507//7507 7508//7508 7509//7509
    +f 7510//7510 7511//7511 7512//7512
    +f 7513//7513 7514//7514 7515//7515
    +f 7516//7516 7517//7517 7518//7518
    +f 7519//7519 7520//7520 7521//7521
    +f 7522//7522 7523//7523 7524//7524
    +f 7525//7525 7526//7526 7527//7527
    +f 7528//7528 7529//7529 7530//7530
    +f 7531//7531 7532//7532 7533//7533
    +f 7534//7534 7535//7535 7536//7536
    +f 7537//7537 7538//7538 7539//7539
    +f 7540//7540 7541//7541 7542//7542
    +f 7543//7543 7544//7544 7545//7545
    +f 7546//7546 7547//7547 7548//7548
    +f 7549//7549 7550//7550 7551//7551
    +f 7552//7552 7553//7553 7554//7554
    +f 7555//7555 7556//7556 7557//7557
    +f 7558//7558 7559//7559 7560//7560
    +f 7561//7561 7562//7562 7563//7563
    +f 7564//7564 7565//7565 7566//7566
    +f 7567//7567 7568//7568 7569//7569
    +f 7570//7570 7571//7571 7572//7572
    +f 7573//7573 7574//7574 7575//7575
    +f 7576//7576 7577//7577 7578//7578
    +f 7579//7579 7580//7580 7581//7581
    +f 7582//7582 7583//7583 7584//7584
    +f 7585//7585 7586//7586 7587//7587
    +f 7588//7588 7589//7589 7590//7590
    +f 7591//7591 7592//7592 7593//7593
    +f 7594//7594 7595//7595 7596//7596
    +f 7597//7597 7598//7598 7599//7599
    +f 7600//7600 7601//7601 7602//7602
    +f 7603//7603 7604//7604 7605//7605
    +f 7606//7606 7607//7607 7608//7608
    +f 7609//7609 7610//7610 7611//7611
    +f 7612//7612 7613//7613 7614//7614
    +f 7615//7615 7616//7616 7617//7617
    +f 7618//7618 7619//7619 7620//7620
    +f 7621//7621 7622//7622 7623//7623
    +f 7624//7624 7625//7625 7626//7626
    +f 7627//7627 7628//7628 7629//7629
    +f 7630//7630 7631//7631 7632//7632
    +f 7633//7633 7634//7634 7635//7635
    +f 7636//7636 7637//7637 7638//7638
    +f 7639//7639 7640//7640 7641//7641
    +f 7642//7642 7643//7643 7644//7644
    +f 7645//7645 7646//7646 7647//7647
    +f 7648//7648 7649//7649 7650//7650
    +f 7651//7651 7652//7652 7653//7653
    +f 7654//7654 7655//7655 7656//7656
    +f 7657//7657 7658//7658 7659//7659
    +f 7660//7660 7661//7661 7662//7662
    +f 7663//7663 7664//7664 7665//7665
    +f 7666//7666 7667//7667 7668//7668
    +f 7669//7669 7670//7670 7671//7671
    +f 7672//7672 7673//7673 7674//7674
    +f 7675//7675 7676//7676 7677//7677
    +f 7678//7678 7679//7679 7680//7680
    +f 7681//7681 7682//7682 7683//7683
    +f 7684//7684 7685//7685 7686//7686
    +f 7687//7687 7688//7688 7689//7689
    +f 7690//7690 7691//7691 7692//7692
    +f 7693//7693 7694//7694 7695//7695
    +f 7696//7696 7697//7697 7698//7698
    +f 7699//7699 7700//7700 7701//7701
    +f 7702//7702 7703//7703 7704//7704
    +f 7705//7705 7706//7706 7707//7707
    +f 7708//7708 7709//7709 7710//7710
    +f 7711//7711 7712//7712 7713//7713
    +f 7714//7714 7715//7715 7716//7716
    +f 7717//7717 7718//7718 7719//7719
    +f 7720//7720 7721//7721 7722//7722
    +f 7723//7723 7724//7724 7725//7725
    +f 7726//7726 7727//7727 7728//7728
    +f 7729//7729 7730//7730 7731//7731
    +f 7732//7732 7733//7733 7734//7734
    +f 7735//7735 7736//7736 7737//7737
    +f 7738//7738 7739//7739 7740//7740
    +f 7741//7741 7742//7742 7743//7743
    +f 7744//7744 7745//7745 7746//7746
    +f 7747//7747 7748//7748 7749//7749
    +f 7750//7750 7751//7751 7752//7752
    +f 7753//7753 7754//7754 7755//7755
    +f 7756//7756 7757//7757 7758//7758
    +f 7759//7759 7760//7760 7761//7761
    +f 7762//7762 7763//7763 7764//7764
    +f 7765//7765 7766//7766 7767//7767
    +f 7768//7768 7769//7769 7770//7770
    +f 7771//7771 7772//7772 7773//7773
    +f 7774//7774 7775//7775 7776//7776
    +f 7777//7777 7778//7778 7779//7779
    +f 7780//7780 7781//7781 7782//7782
    +f 7783//7783 7784//7784 7785//7785
    +f 7786//7786 7787//7787 7788//7788
    +f 7789//7789 7790//7790 7791//7791
    +f 7792//7792 7793//7793 7794//7794
    +f 7795//7795 7796//7796 7797//7797
    +f 7798//7798 7799//7799 7800//7800
    +f 7801//7801 7802//7802 7803//7803
    +f 7804//7804 7805//7805 7806//7806
    +f 7807//7807 7808//7808 7809//7809
    +f 7810//7810 7811//7811 7812//7812
    +f 7813//7813 7814//7814 7815//7815
    +f 7816//7816 7817//7817 7818//7818
    +f 7819//7819 7820//7820 7821//7821
    +f 7822//7822 7823//7823 7824//7824
    +f 7825//7825 7826//7826 7827//7827
    +f 7828//7828 7829//7829 7830//7830
    +f 7831//7831 7832//7832 7833//7833
    +f 7834//7834 7835//7835 7836//7836
    +f 7837//7837 7838//7838 7839//7839
    +f 7840//7840 7841//7841 7842//7842
    +f 7843//7843 7844//7844 7845//7845
    +f 7846//7846 7847//7847 7848//7848
    +f 7849//7849 7850//7850 7851//7851
    +f 7852//7852 7853//7853 7854//7854
    +f 7855//7855 7856//7856 7857//7857
    +f 7858//7858 7859//7859 7860//7860
    +f 7861//7861 7862//7862 7863//7863
    +f 7864//7864 7865//7865 7866//7866
    +f 7867//7867 7868//7868 7869//7869
    +f 7870//7870 7871//7871 7872//7872
    +f 7873//7873 7874//7874 7875//7875
    +f 7876//7876 7877//7877 7878//7878
    +f 7879//7879 7880//7880 7881//7881
    +f 7882//7882 7883//7883 7884//7884
    +f 7885//7885 7886//7886 7887//7887
    +f 7888//7888 7889//7889 7890//7890
    +f 7891//7891 7892//7892 7893//7893
    +f 7894//7894 7895//7895 7896//7896
    +f 7897//7897 7898//7898 7899//7899
    +f 7900//7900 7901//7901 7902//7902
    +f 7903//7903 7904//7904 7905//7905
    +f 7906//7906 7907//7907 7908//7908
    +f 7909//7909 7910//7910 7911//7911
    +f 7912//7912 7913//7913 7914//7914
    +f 7915//7915 7916//7916 7917//7917
    +f 7918//7918 7919//7919 7920//7920
    +f 7921//7921 7922//7922 7923//7923
    +f 7924//7924 7925//7925 7926//7926
    +f 7927//7927 7928//7928 7929//7929
    +f 7930//7930 7931//7931 7932//7932
    +f 7933//7933 7934//7934 7935//7935
    +f 7936//7936 7937//7937 7938//7938
    +f 7939//7939 7940//7940 7941//7941
    +f 7942//7942 7943//7943 7944//7944
    +f 7945//7945 7946//7946 7947//7947
    +f 7948//7948 7949//7949 7950//7950
    +f 7951//7951 7952//7952 7953//7953
    +f 7954//7954 7955//7955 7956//7956
    +f 7957//7957 7958//7958 7959//7959
    +f 7960//7960 7961//7961 7962//7962
    +f 7963//7963 7964//7964 7965//7965
    +f 7966//7966 7967//7967 7968//7968
    +f 7969//7969 7970//7970 7971//7971
    +f 7972//7972 7973//7973 7974//7974
    +f 7975//7975 7976//7976 7977//7977
    +f 7978//7978 7979//7979 7980//7980
    +f 7981//7981 7982//7982 7983//7983
    +f 7984//7984 7985//7985 7986//7986
    +f 7987//7987 7988//7988 7989//7989
    +f 7990//7990 7991//7991 7992//7992
    +f 7993//7993 7994//7994 7995//7995
    +f 7996//7996 7997//7997 7998//7998
    +f 7999//7999 8000//8000 8001//8001
    +f 8002//8002 8003//8003 8004//8004
    +f 8005//8005 8006//8006 8007//8007
    +f 8008//8008 8009//8009 8010//8010
    +f 8011//8011 8012//8012 8013//8013
    +f 8014//8014 8015//8015 8016//8016
    +f 8017//8017 8018//8018 8019//8019
    +f 8020//8020 8021//8021 8022//8022
    +f 8023//8023 8024//8024 8025//8025
    +f 8026//8026 8027//8027 8028//8028
    +f 8029//8029 8030//8030 8031//8031
    +f 8032//8032 8033//8033 8034//8034
    +f 8035//8035 8036//8036 8037//8037
    +f 8038//8038 8039//8039 8040//8040
    +f 8041//8041 8042//8042 8043//8043
    +f 8044//8044 8045//8045 8046//8046
    +f 8047//8047 8048//8048 8049//8049
    +f 8050//8050 8051//8051 8052//8052
    +f 8053//8053 8054//8054 8055//8055
    +f 8056//8056 8057//8057 8058//8058
    +f 8059//8059 8060//8060 8061//8061
    +f 8062//8062 8063//8063 8064//8064
    +f 8065//8065 8066//8066 8067//8067
    +f 8068//8068 8069//8069 8070//8070
    +f 8071//8071 8072//8072 8073//8073
    +f 8074//8074 8075//8075 8076//8076
    +f 8077//8077 8078//8078 8079//8079
    +f 8080//8080 8081//8081 8082//8082
    +f 8083//8083 8084//8084 8085//8085
    +f 8086//8086 8087//8087 8088//8088
    +f 8089//8089 8090//8090 8091//8091
    +f 8092//8092 8093//8093 8094//8094
    +f 8095//8095 8096//8096 8097//8097
    +f 8098//8098 8099//8099 8100//8100
    +f 8101//8101 8102//8102 8103//8103
    +f 8104//8104 8105//8105 8106//8106
    +f 8107//8107 8108//8108 8109//8109
    +f 8110//8110 8111//8111 8112//8112
    +f 8113//8113 8114//8114 8115//8115
    +f 8116//8116 8117//8117 8118//8118
    +f 8119//8119 8120//8120 8121//8121
    +f 8122//8122 8123//8123 8124//8124
    +f 8125//8125 8126//8126 8127//8127
    +f 8128//8128 8129//8129 8130//8130
    +f 8131//8131 8132//8132 8133//8133
    +f 8134//8134 8135//8135 8136//8136
    +f 8137//8137 8138//8138 8139//8139
    +f 8140//8140 8141//8141 8142//8142
    +f 8143//8143 8144//8144 8145//8145
    +f 8146//8146 8147//8147 8148//8148
    +f 8149//8149 8150//8150 8151//8151
    +f 8152//8152 8153//8153 8154//8154
    +f 8155//8155 8156//8156 8157//8157
    +f 8158//8158 8159//8159 8160//8160
    +f 8161//8161 8162//8162 8163//8163
    +f 8164//8164 8165//8165 8166//8166
    +f 8167//8167 8168//8168 8169//8169
    +f 8170//8170 8171//8171 8172//8172
    +f 8173//8173 8174//8174 8175//8175
    +f 8176//8176 8177//8177 8178//8178
    +f 8179//8179 8180//8180 8181//8181
    +f 8182//8182 8183//8183 8184//8184
    +f 8185//8185 8186//8186 8187//8187
    +f 8188//8188 8189//8189 8190//8190
    +f 8191//8191 8192//8192 8193//8193
    +f 8194//8194 8195//8195 8196//8196
    +f 8197//8197 8198//8198 8199//8199
    +f 8200//8200 8201//8201 8202//8202
    +f 8203//8203 8204//8204 8205//8205
    +f 8206//8206 8207//8207 8208//8208
    +f 8209//8209 8210//8210 8211//8211
    +f 8212//8212 8213//8213 8214//8214
    +f 8215//8215 8216//8216 8217//8217
    +f 8218//8218 8219//8219 8220//8220
    +f 8221//8221 8222//8222 8223//8223
    +f 8224//8224 8225//8225 8226//8226
    +f 8227//8227 8228//8228 8229//8229
    +f 8230//8230 8231//8231 8232//8232
    +f 8233//8233 8234//8234 8235//8235
    +f 8236//8236 8237//8237 8238//8238
    +f 8239//8239 8240//8240 8241//8241
    +f 8242//8242 8243//8243 8244//8244
    +f 8245//8245 8246//8246 8247//8247
    +f 8248//8248 8249//8249 8250//8250
    +f 8251//8251 8252//8252 8253//8253
    +f 8254//8254 8255//8255 8256//8256
    +f 8257//8257 8258//8258 8259//8259
    +f 8260//8260 8261//8261 8262//8262
    +f 8263//8263 8264//8264 8265//8265
    +f 8266//8266 8267//8267 8268//8268
    +f 8269//8269 8270//8270 8271//8271
    +f 8272//8272 8273//8273 8274//8274
    +f 8275//8275 8276//8276 8277//8277
    +f 8278//8278 8279//8279 8280//8280
    +f 8281//8281 8282//8282 8283//8283
    +f 8284//8284 8285//8285 8286//8286
    +f 8287//8287 8288//8288 8289//8289
    +f 8290//8290 8291//8291 8292//8292
    +f 8293//8293 8294//8294 8295//8295
    +f 8296//8296 8297//8297 8298//8298
    +f 8299//8299 8300//8300 8301//8301
    +f 8302//8302 8303//8303 8304//8304
    +f 8305//8305 8306//8306 8307//8307
    +f 8308//8308 8309//8309 8310//8310
    +f 8311//8311 8312//8312 8313//8313
    +f 8314//8314 8315//8315 8316//8316
    +f 8317//8317 8318//8318 8319//8319
    +f 8320//8320 8321//8321 8322//8322
    +f 8323//8323 8324//8324 8325//8325
    +f 8326//8326 8327//8327 8328//8328
    +f 8329//8329 8330//8330 8331//8331
    +f 8332//8332 8333//8333 8334//8334
    +f 8335//8335 8336//8336 8337//8337
    +f 8338//8338 8339//8339 8340//8340
    +f 8341//8341 8342//8342 8343//8343
    +f 8344//8344 8345//8345 8346//8346
    +f 8347//8347 8348//8348 8349//8349
    +f 8350//8350 8351//8351 8352//8352
    +f 8353//8353 8354//8354 8355//8355
    +f 8356//8356 8357//8357 8358//8358
    +f 8359//8359 8360//8360 8361//8361
    +f 8362//8362 8363//8363 8364//8364
    +f 8365//8365 8366//8366 8367//8367
    +f 8368//8368 8369//8369 8370//8370
    +f 8371//8371 8372//8372 8373//8373
    +f 8374//8374 8375//8375 8376//8376
    +f 8377//8377 8378//8378 8379//8379
    +f 8380//8380 8381//8381 8382//8382
    +f 8383//8383 8384//8384 8385//8385
    +f 8386//8386 8387//8387 8388//8388
    +f 8389//8389 8390//8390 8391//8391
    +f 8392//8392 8393//8393 8394//8394
    +f 8395//8395 8396//8396 8397//8397
    +f 8398//8398 8399//8399 8400//8400
    +f 8401//8401 8402//8402 8403//8403
    +f 8404//8404 8405//8405 8406//8406
    +f 8407//8407 8408//8408 8409//8409
    +f 8410//8410 8411//8411 8412//8412
    +f 8413//8413 8414//8414 8415//8415
    +f 8416//8416 8417//8417 8418//8418
    +f 8419//8419 8420//8420 8421//8421
    +f 8422//8422 8423//8423 8424//8424
    +f 8425//8425 8426//8426 8427//8427
    +f 8428//8428 8429//8429 8430//8430
    +f 8431//8431 8432//8432 8433//8433
    +f 8434//8434 8435//8435 8436//8436
    +f 8437//8437 8438//8438 8439//8439
    +f 8440//8440 8441//8441 8442//8442
    +f 8443//8443 8444//8444 8445//8445
    +f 8446//8446 8447//8447 8448//8448
    +f 8449//8449 8450//8450 8451//8451
    +f 8452//8452 8453//8453 8454//8454
    +f 8455//8455 8456//8456 8457//8457
    +f 8458//8458 8459//8459 8460//8460
    +f 8461//8461 8462//8462 8463//8463
    +f 8464//8464 8465//8465 8466//8466
    +f 8467//8467 8468//8468 8469//8469
    +f 8470//8470 8471//8471 8472//8472
    +f 8473//8473 8474//8474 8475//8475
    +f 8476//8476 8477//8477 8478//8478
    +f 8479//8479 8480//8480 8481//8481
    +f 8482//8482 8483//8483 8484//8484
    +f 8485//8485 8486//8486 8487//8487
    +f 8488//8488 8489//8489 8490//8490
    +f 8491//8491 8492//8492 8493//8493
    +f 8494//8494 8495//8495 8496//8496
    +f 8497//8497 8498//8498 8499//8499
    +f 8500//8500 8501//8501 8502//8502
    +f 8503//8503 8504//8504 8505//8505
    +f 8506//8506 8507//8507 8508//8508
    +f 8509//8509 8510//8510 8511//8511
    +f 8512//8512 8513//8513 8514//8514
    +f 8515//8515 8516//8516 8517//8517
    +f 8518//8518 8519//8519 8520//8520
    +f 8521//8521 8522//8522 8523//8523
    +f 8524//8524 8525//8525 8526//8526
    +f 8527//8527 8528//8528 8529//8529
    +f 8530//8530 8531//8531 8532//8532
    +f 8533//8533 8534//8534 8535//8535
    +f 8536//8536 8537//8537 8538//8538
    +f 8539//8539 8540//8540 8541//8541
    +f 8542//8542 8543//8543 8544//8544
    +f 8545//8545 8546//8546 8547//8547
    +f 8548//8548 8549//8549 8550//8550
    +f 8551//8551 8552//8552 8553//8553
    +f 8554//8554 8555//8555 8556//8556
    +f 8557//8557 8558//8558 8559//8559
    +f 8560//8560 8561//8561 8562//8562
    +f 8563//8563 8564//8564 8565//8565
    +f 8566//8566 8567//8567 8568//8568
    +f 8569//8569 8570//8570 8571//8571
    +f 8572//8572 8573//8573 8574//8574
    +f 8575//8575 8576//8576 8577//8577
    +f 8578//8578 8579//8579 8580//8580
    +f 8581//8581 8582//8582 8583//8583
    +f 8584//8584 8585//8585 8586//8586
    +f 8587//8587 8588//8588 8589//8589
    +f 8590//8590 8591//8591 8592//8592
    +f 8593//8593 8594//8594 8595//8595
    +f 8596//8596 8597//8597 8598//8598
    +f 8599//8599 8600//8600 8601//8601
    +f 8602//8602 8603//8603 8604//8604
    +f 8605//8605 8606//8606 8607//8607
    +f 8608//8608 8609//8609 8610//8610
    +f 8611//8611 8612//8612 8613//8613
    +f 8614//8614 8615//8615 8616//8616
    +f 8617//8617 8618//8618 8619//8619
    +f 8620//8620 8621//8621 8622//8622
    +f 8623//8623 8624//8624 8625//8625
    +f 8626//8626 8627//8627 8628//8628
    +f 8629//8629 8630//8630 8631//8631
    +f 8632//8632 8633//8633 8634//8634
    +f 8635//8635 8636//8636 8637//8637
    +f 8638//8638 8639//8639 8640//8640
    +f 8641//8641 8642//8642 8643//8643
    +f 8644//8644 8645//8645 8646//8646
    +f 8647//8647 8648//8648 8649//8649
    +f 8650//8650 8651//8651 8652//8652
    +f 8653//8653 8654//8654 8655//8655
    +f 8656//8656 8657//8657 8658//8658
    +f 8659//8659 8660//8660 8661//8661
    +f 8662//8662 8663//8663 8664//8664
    +f 8665//8665 8666//8666 8667//8667
    +f 8668//8668 8669//8669 8670//8670
    +f 8671//8671 8672//8672 8673//8673
    +f 8674//8674 8675//8675 8676//8676
    +f 8677//8677 8678//8678 8679//8679
    +f 8680//8680 8681//8681 8682//8682
    +f 8683//8683 8684//8684 8685//8685
    +f 8686//8686 8687//8687 8688//8688
    +f 8689//8689 8690//8690 8691//8691
    +f 8692//8692 8693//8693 8694//8694
    +f 8695//8695 8696//8696 8697//8697
    +f 8698//8698 8699//8699 8700//8700
    +f 8701//8701 8702//8702 8703//8703
    +f 8704//8704 8705//8705 8706//8706
    +f 8707//8707 8708//8708 8709//8709
    +f 8710//8710 8711//8711 8712//8712
    +f 8713//8713 8714//8714 8715//8715
    +f 8716//8716 8717//8717 8718//8718
    +f 8719//8719 8720//8720 8721//8721
    +f 8722//8722 8723//8723 8724//8724
    +f 8725//8725 8726//8726 8727//8727
    +f 8728//8728 8729//8729 8730//8730
    +f 8731//8731 8732//8732 8733//8733
    +f 8734//8734 8735//8735 8736//8736
    +f 8737//8737 8738//8738 8739//8739
    +f 8740//8740 8741//8741 8742//8742
    +f 8743//8743 8744//8744 8745//8745
    +f 8746//8746 8747//8747 8748//8748
    +f 8749//8749 8750//8750 8751//8751
    +f 8752//8752 8753//8753 8754//8754
    +f 8755//8755 8756//8756 8757//8757
    +f 8758//8758 8759//8759 8760//8760
    +f 8761//8761 8762//8762 8763//8763
    +f 8764//8764 8765//8765 8766//8766
    +f 8767//8767 8768//8768 8769//8769
    +f 8770//8770 8771//8771 8772//8772
    +f 8773//8773 8774//8774 8775//8775
    +f 8776//8776 8777//8777 8778//8778
    +f 8779//8779 8780//8780 8781//8781
    +f 8782//8782 8783//8783 8784//8784
    +f 8785//8785 8786//8786 8787//8787
    +f 8788//8788 8789//8789 8790//8790
    +f 8791//8791 8792//8792 8793//8793
    +f 8794//8794 8795//8795 8796//8796
    +f 8797//8797 8798//8798 8799//8799
    +f 8800//8800 8801//8801 8802//8802
    +f 8803//8803 8804//8804 8805//8805
    +f 8806//8806 8807//8807 8808//8808
    +f 8809//8809 8810//8810 8811//8811
    +f 8812//8812 8813//8813 8814//8814
    +f 8815//8815 8816//8816 8817//8817
    +f 8818//8818 8819//8819 8820//8820
    +f 8821//8821 8822//8822 8823//8823
    +f 8824//8824 8825//8825 8826//8826
    +f 8827//8827 8828//8828 8829//8829
    +f 8830//8830 8831//8831 8832//8832
    +f 8833//8833 8834//8834 8835//8835
    +f 8836//8836 8837//8837 8838//8838
    +f 8839//8839 8840//8840 8841//8841
    +f 8842//8842 8843//8843 8844//8844
    +f 8845//8845 8846//8846 8847//8847
    +f 8848//8848 8849//8849 8850//8850
    +f 8851//8851 8852//8852 8853//8853
    +f 8854//8854 8855//8855 8856//8856
    +f 8857//8857 8858//8858 8859//8859
    +f 8860//8860 8861//8861 8862//8862
    +f 8863//8863 8864//8864 8865//8865
    +f 8866//8866 8867//8867 8868//8868
    +f 8869//8869 8870//8870 8871//8871
    +f 8872//8872 8873//8873 8874//8874
    +f 8875//8875 8876//8876 8877//8877
    +f 8878//8878 8879//8879 8880//8880
    +f 8881//8881 8882//8882 8883//8883
    +f 8884//8884 8885//8885 8886//8886
    +f 8887//8887 8888//8888 8889//8889
    +f 8890//8890 8891//8891 8892//8892
    +f 8893//8893 8894//8894 8895//8895
    +f 8896//8896 8897//8897 8898//8898
    +f 8899//8899 8900//8900 8901//8901
    +f 8902//8902 8903//8903 8904//8904
    +f 8905//8905 8906//8906 8907//8907
    +f 8908//8908 8909//8909 8910//8910
    +f 8911//8911 8912//8912 8913//8913
    +f 8914//8914 8915//8915 8916//8916
    +f 8917//8917 8918//8918 8919//8919
    +f 8920//8920 8921//8921 8922//8922
    +f 8923//8923 8924//8924 8925//8925
    +f 8926//8926 8927//8927 8928//8928
    +f 8929//8929 8930//8930 8931//8931
    +f 8932//8932 8933//8933 8934//8934
    +f 8935//8935 8936//8936 8937//8937
    +f 8938//8938 8939//8939 8940//8940
    +f 8941//8941 8942//8942 8943//8943
    +f 8944//8944 8945//8945 8946//8946
    +f 8947//8947 8948//8948 8949//8949
    +f 8950//8950 8951//8951 8952//8952
    +f 8953//8953 8954//8954 8955//8955
    +f 8956//8956 8957//8957 8958//8958
    +f 8959//8959 8960//8960 8961//8961
    +f 8962//8962 8963//8963 8964//8964
    +f 8965//8965 8966//8966 8967//8967
    +f 8968//8968 8969//8969 8970//8970
    +f 8971//8971 8972//8972 8973//8973
    +f 8974//8974 8975//8975 8976//8976
    +f 8977//8977 8978//8978 8979//8979
    +f 8980//8980 8981//8981 8982//8982
    +f 8983//8983 8984//8984 8985//8985
    +f 8986//8986 8987//8987 8988//8988
    +f 8989//8989 8990//8990 8991//8991
    +f 8992//8992 8993//8993 8994//8994
    +f 8995//8995 8996//8996 8997//8997
    +f 8998//8998 8999//8999 9000//9000
    +f 9001//9001 9002//9002 9003//9003
    +f 9004//9004 9005//9005 9006//9006
    +f 9007//9007 9008//9008 9009//9009
    +f 9010//9010 9011//9011 9012//9012
    +f 9013//9013 9014//9014 9015//9015
    +f 9016//9016 9017//9017 9018//9018
    +f 9019//9019 9020//9020 9021//9021
    +f 9022//9022 9023//9023 9024//9024
    +f 9025//9025 9026//9026 9027//9027
    +f 9028//9028 9029//9029 9030//9030
    +f 9031//9031 9032//9032 9033//9033
    +f 9034//9034 9035//9035 9036//9036
    +f 9037//9037 9038//9038 9039//9039
    +f 9040//9040 9041//9041 9042//9042
    +f 9043//9043 9044//9044 9045//9045
    +f 9046//9046 9047//9047 9048//9048
    +f 9049//9049 9050//9050 9051//9051
    +f 9052//9052 9053//9053 9054//9054
    +f 9055//9055 9056//9056 9057//9057
    +f 9058//9058 9059//9059 9060//9060
    +f 9061//9061 9062//9062 9063//9063
    +f 9064//9064 9065//9065 9066//9066
    +f 9067//9067 9068//9068 9069//9069
    +f 9070//9070 9071//9071 9072//9072
    +f 9073//9073 9074//9074 9075//9075
    +f 9076//9076 9077//9077 9078//9078
    +f 9079//9079 9080//9080 9081//9081
    +f 9082//9082 9083//9083 9084//9084
    +f 9085//9085 9086//9086 9087//9087
    +f 9088//9088 9089//9089 9090//9090
    +f 9091//9091 9092//9092 9093//9093
    +f 9094//9094 9095//9095 9096//9096
    +f 9097//9097 9098//9098 9099//9099
    +f 9100//9100 9101//9101 9102//9102
    +f 9103//9103 9104//9104 9105//9105
    +f 9106//9106 9107//9107 9108//9108
    +f 9109//9109 9110//9110 9111//9111
    +f 9112//9112 9113//9113 9114//9114
    +f 9115//9115 9116//9116 9117//9117
    +f 9118//9118 9119//9119 9120//9120
    +f 9121//9121 9122//9122 9123//9123
    +f 9124//9124 9125//9125 9126//9126
    +f 9127//9127 9128//9128 9129//9129
    +f 9130//9130 9131//9131 9132//9132
    +f 9133//9133 9134//9134 9135//9135
    +f 9136//9136 9137//9137 9138//9138
    +f 9139//9139 9140//9140 9141//9141
    +f 9142//9142 9143//9143 9144//9144
    +f 9145//9145 9146//9146 9147//9147
    +f 9148//9148 9149//9149 9150//9150
    +f 9151//9151 9152//9152 9153//9153
    +f 9154//9154 9155//9155 9156//9156
    +f 9157//9157 9158//9158 9159//9159
    +f 9160//9160 9161//9161 9162//9162
    +f 9163//9163 9164//9164 9165//9165
    +f 9166//9166 9167//9167 9168//9168
    +f 9169//9169 9170//9170 9171//9171
    +f 9172//9172 9173//9173 9174//9174
    +f 9175//9175 9176//9176 9177//9177
    +f 9178//9178 9179//9179 9180//9180
    +f 9181//9181 9182//9182 9183//9183
    +f 9184//9184 9185//9185 9186//9186
    +f 9187//9187 9188//9188 9189//9189
    +f 9190//9190 9191//9191 9192//9192
    +f 9193//9193 9194//9194 9195//9195
    +f 9196//9196 9197//9197 9198//9198
    +f 9199//9199 9200//9200 9201//9201
    +f 9202//9202 9203//9203 9204//9204
    +f 9205//9205 9206//9206 9207//9207
    +f 9208//9208 9209//9209 9210//9210
    +f 9211//9211 9212//9212 9213//9213
    +f 9214//9214 9215//9215 9216//9216
    +f 9217//9217 9218//9218 9219//9219
    +f 9220//9220 9221//9221 9222//9222
    +f 9223//9223 9224//9224 9225//9225
    +f 9226//9226 9227//9227 9228//9228
    +f 9229//9229 9230//9230 9231//9231
    +f 9232//9232 9233//9233 9234//9234
    +f 9235//9235 9236//9236 9237//9237
    +f 9238//9238 9239//9239 9240//9240
    +f 9241//9241 9242//9242 9243//9243
    +f 9244//9244 9245//9245 9246//9246
    +f 9247//9247 9248//9248 9249//9249
    +f 9250//9250 9251//9251 9252//9252
    +f 9253//9253 9254//9254 9255//9255
    +f 9256//9256 9257//9257 9258//9258
    +f 9259//9259 9260//9260 9261//9261
    +f 9262//9262 9263//9263 9264//9264
    +f 9265//9265 9266//9266 9267//9267
    +f 9268//9268 9269//9269 9270//9270
    +f 9271//9271 9272//9272 9273//9273
    +f 9274//9274 9275//9275 9276//9276
    +f 9277//9277 9278//9278 9279//9279
    +f 9280//9280 9281//9281 9282//9282
    +f 9283//9283 9284//9284 9285//9285
    +f 9286//9286 9287//9287 9288//9288
    +f 9289//9289 9290//9290 9291//9291
    +f 9292//9292 9293//9293 9294//9294
    +f 9295//9295 9296//9296 9297//9297
    +f 9298//9298 9299//9299 9300//9300
    +f 9301//9301 9302//9302 9303//9303
    +f 9304//9304 9305//9305 9306//9306
    +f 9307//9307 9308//9308 9309//9309
    +f 9310//9310 9311//9311 9312//9312
    +f 9313//9313 9314//9314 9315//9315
    +f 9316//9316 9317//9317 9318//9318
    +f 9319//9319 9320//9320 9321//9321
    +f 9322//9322 9323//9323 9324//9324
    +f 9325//9325 9326//9326 9327//9327
    +f 9328//9328 9329//9329 9330//9330
    +f 9331//9331 9332//9332 9333//9333
    +f 9334//9334 9335//9335 9336//9336
    +f 9337//9337 9338//9338 9339//9339
    +f 9340//9340 9341//9341 9342//9342
    +f 9343//9343 9344//9344 9345//9345
    +f 9346//9346 9347//9347 9348//9348
    +f 9349//9349 9350//9350 9351//9351
    +f 9352//9352 9353//9353 9354//9354
    +f 9355//9355 9356//9356 9357//9357
    +f 9358//9358 9359//9359 9360//9360
    +f 9361//9361 9362//9362 9363//9363
    +f 9364//9364 9365//9365 9366//9366
    +f 9367//9367 9368//9368 9369//9369
    +f 9370//9370 9371//9371 9372//9372
    +f 9373//9373 9374//9374 9375//9375
    +f 9376//9376 9377//9377 9378//9378
    +f 9379//9379 9380//9380 9381//9381
    +f 9382//9382 9383//9383 9384//9384
    +f 9385//9385 9386//9386 9387//9387
    +f 9388//9388 9389//9389 9390//9390
    +f 9391//9391 9392//9392 9393//9393
    +f 9394//9394 9395//9395 9396//9396
    +f 9397//9397 9398//9398 9399//9399
    +f 9400//9400 9401//9401 9402//9402
    +f 9403//9403 9404//9404 9405//9405
    +f 9406//9406 9407//9407 9408//9408
    +f 9409//9409 9410//9410 9411//9411
    +f 9412//9412 9413//9413 9414//9414
    +f 9415//9415 9416//9416 9417//9417
    +f 9418//9418 9419//9419 9420//9420
    +f 9421//9421 9422//9422 9423//9423
    +f 9424//9424 9425//9425 9426//9426
    +f 9427//9427 9428//9428 9429//9429
    +f 9430//9430 9431//9431 9432//9432
    +f 9433//9433 9434//9434 9435//9435
    +f 9436//9436 9437//9437 9438//9438
    +f 9439//9439 9440//9440 9441//9441
    +f 9442//9442 9443//9443 9444//9444
    +f 9445//9445 9446//9446 9447//9447
    +f 9448//9448 9449//9449 9450//9450
    +f 9451//9451 9452//9452 9453//9453
    +f 9454//9454 9455//9455 9456//9456
    +f 9457//9457 9458//9458 9459//9459
    +f 9460//9460 9461//9461 9462//9462
    +f 9463//9463 9464//9464 9465//9465
    +f 9466//9466 9467//9467 9468//9468
    +f 9469//9469 9470//9470 9471//9471
    +f 9472//9472 9473//9473 9474//9474
    +f 9475//9475 9476//9476 9477//9477
    +f 9478//9478 9479//9479 9480//9480
    +f 9481//9481 9482//9482 9483//9483
    +f 9484//9484 9485//9485 9486//9486
    +f 9487//9487 9488//9488 9489//9489
    +f 9490//9490 9491//9491 9492//9492
    +f 9493//9493 9494//9494 9495//9495
    +f 9496//9496 9497//9497 9498//9498
    +f 9499//9499 9500//9500 9501//9501
    +f 9502//9502 9503//9503 9504//9504
    +f 9505//9505 9506//9506 9507//9507
    +f 9508//9508 9509//9509 9510//9510
    +f 9511//9511 9512//9512 9513//9513
    +f 9514//9514 9515//9515 9516//9516
    +f 9517//9517 9518//9518 9519//9519
    +f 9520//9520 9521//9521 9522//9522
    +f 9523//9523 9524//9524 9525//9525
    +f 9526//9526 9527//9527 9528//9528
    +f 9529//9529 9530//9530 9531//9531
    +f 9532//9532 9533//9533 9534//9534
    +f 9535//9535 9536//9536 9537//9537
    +f 9538//9538 9539//9539 9540//9540
    +f 9541//9541 9542//9542 9543//9543
    +f 9544//9544 9545//9545 9546//9546
    +f 9547//9547 9548//9548 9549//9549
    +f 9550//9550 9551//9551 9552//9552
    +f 9553//9553 9554//9554 9555//9555
    +f 9556//9556 9557//9557 9558//9558
    +f 9559//9559 9560//9560 9561//9561
    +f 9562//9562 9563//9563 9564//9564
    +f 9565//9565 9566//9566 9567//9567
    +f 9568//9568 9569//9569 9570//9570
    +f 9571//9571 9572//9572 9573//9573
    +f 9574//9574 9575//9575 9576//9576
    +f 9577//9577 9578//9578 9579//9579
    +f 9580//9580 9581//9581 9582//9582
    +f 9583//9583 9584//9584 9585//9585
    +f 9586//9586 9587//9587 9588//9588
    +f 9589//9589 9590//9590 9591//9591
    +f 9592//9592 9593//9593 9594//9594
    +f 9595//9595 9596//9596 9597//9597
    +f 9598//9598 9599//9599 9600//9600
    +f 9601//9601 9602//9602 9603//9603
    +f 9604//9604 9605//9605 9606//9606
    +f 9607//9607 9608//9608 9609//9609
    +f 9610//9610 9611//9611 9612//9612
    +f 9613//9613 9614//9614 9615//9615
    +f 9616//9616 9617//9617 9618//9618
    +f 9619//9619 9620//9620 9621//9621
    +f 9622//9622 9623//9623 9624//9624
    +f 9625//9625 9626//9626 9627//9627
    +f 9628//9628 9629//9629 9630//9630
    +f 9631//9631 9632//9632 9633//9633
    +f 9634//9634 9635//9635 9636//9636
    +f 9637//9637 9638//9638 9639//9639
    +f 9640//9640 9641//9641 9642//9642
    +f 9643//9643 9644//9644 9645//9645
    +f 9646//9646 9647//9647 9648//9648
    +f 9649//9649 9650//9650 9651//9651
    +f 9652//9652 9653//9653 9654//9654
    +f 9655//9655 9656//9656 9657//9657
    +f 9658//9658 9659//9659 9660//9660
    +f 9661//9661 9662//9662 9663//9663
    +f 9664//9664 9665//9665 9666//9666
    +f 9667//9667 9668//9668 9669//9669
    +f 9670//9670 9671//9671 9672//9672
    +f 9673//9673 9674//9674 9675//9675
    +f 9676//9676 9677//9677 9678//9678
    +f 9679//9679 9680//9680 9681//9681
    +f 9682//9682 9683//9683 9684//9684
    +f 9685//9685 9686//9686 9687//9687
    +f 9688//9688 9689//9689 9690//9690
    +f 9691//9691 9692//9692 9693//9693
    +f 9694//9694 9695//9695 9696//9696
    +f 9697//9697 9698//9698 9699//9699
    +f 9700//9700 9701//9701 9702//9702
    +f 9703//9703 9704//9704 9705//9705
    +f 9706//9706 9707//9707 9708//9708
    +f 9709//9709 9710//9710 9711//9711
    +f 9712//9712 9713//9713 9714//9714
    +f 9715//9715 9716//9716 9717//9717
    +f 9718//9718 9719//9719 9720//9720
    +f 9721//9721 9722//9722 9723//9723
    +f 9724//9724 9725//9725 9726//9726
    +f 9727//9727 9728//9728 9729//9729
    +f 9730//9730 9731//9731 9732//9732
    +f 9733//9733 9734//9734 9735//9735
    +f 9736//9736 9737//9737 9738//9738
    +f 9739//9739 9740//9740 9741//9741
    +f 9742//9742 9743//9743 9744//9744
    +f 9745//9745 9746//9746 9747//9747
    +f 9748//9748 9749//9749 9750//9750
    +f 9751//9751 9752//9752 9753//9753
    +f 9754//9754 9755//9755 9756//9756
    +f 9757//9757 9758//9758 9759//9759
    +f 9760//9760 9761//9761 9762//9762
    +f 9763//9763 9764//9764 9765//9765
    +f 9766//9766 9767//9767 9768//9768
    +f 9769//9769 9770//9770 9771//9771
    +f 9772//9772 9773//9773 9774//9774
    +f 9775//9775 9776//9776 9777//9777
    +f 9778//9778 9779//9779 9780//9780
    +f 9781//9781 9782//9782 9783//9783
    +f 9784//9784 9785//9785 9786//9786
    +f 9787//9787 9788//9788 9789//9789
    +f 9790//9790 9791//9791 9792//9792
    +f 9793//9793 9794//9794 9795//9795
    +f 9796//9796 9797//9797 9798//9798
    +f 9799//9799 9800//9800 9801//9801
    +f 9802//9802 9803//9803 9804//9804
    +f 9805//9805 9806//9806 9807//9807
    +f 9808//9808 9809//9809 9810//9810
    +f 9811//9811 9812//9812 9813//9813
    +f 9814//9814 9815//9815 9816//9816
    +f 9817//9817 9818//9818 9819//9819
    +f 9820//9820 9821//9821 9822//9822
    +f 9823//9823 9824//9824 9825//9825
    +f 9826//9826 9827//9827 9828//9828
    +f 9829//9829 9830//9830 9831//9831
    +f 9832//9832 9833//9833 9834//9834
    +f 9835//9835 9836//9836 9837//9837
    +f 9838//9838 9839//9839 9840//9840
    +f 9841//9841 9842//9842 9843//9843
    +f 9844//9844 9845//9845 9846//9846
    +f 9847//9847 9848//9848 9849//9849
    +f 9850//9850 9851//9851 9852//9852
    +f 9853//9853 9854//9854 9855//9855
    +f 9856//9856 9857//9857 9858//9858
    +f 9859//9859 9860//9860 9861//9861
    +f 9862//9862 9863//9863 9864//9864
    +f 9865//9865 9866//9866 9867//9867
    +f 9868//9868 9869//9869 9870//9870
    +f 9871//9871 9872//9872 9873//9873
    +f 9874//9874 9875//9875 9876//9876
    +f 9877//9877 9878//9878 9879//9879
    +f 9880//9880 9881//9881 9882//9882
    +f 9883//9883 9884//9884 9885//9885
    +f 9886//9886 9887//9887 9888//9888
    +f 9889//9889 9890//9890 9891//9891
    +f 9892//9892 9893//9893 9894//9894
    +f 9895//9895 9896//9896 9897//9897
    +f 9898//9898 9899//9899 9900//9900
    +f 9901//9901 9902//9902 9903//9903
    +f 9904//9904 9905//9905 9906//9906
    +f 9907//9907 9908//9908 9909//9909
    +f 9910//9910 9911//9911 9912//9912
    +f 9913//9913 9914//9914 9915//9915
    +f 9916//9916 9917//9917 9918//9918
    +f 9919//9919 9920//9920 9921//9921
    +f 9922//9922 9923//9923 9924//9924
    +f 9925//9925 9926//9926 9927//9927
    +f 9928//9928 9929//9929 9930//9930
    +f 9931//9931 9932//9932 9933//9933
    +f 9934//9934 9935//9935 9936//9936
    +f 9937//9937 9938//9938 9939//9939
    +f 9940//9940 9941//9941 9942//9942
    +f 9943//9943 9944//9944 9945//9945
    +f 9946//9946 9947//9947 9948//9948
    +f 9949//9949 9950//9950 9951//9951
    +f 9952//9952 9953//9953 9954//9954
    +f 9955//9955 9956//9956 9957//9957
    +f 9958//9958 9959//9959 9960//9960
    +f 9961//9961 9962//9962 9963//9963
    +f 9964//9964 9965//9965 9966//9966
    +f 9967//9967 9968//9968 9969//9969
    +f 9970//9970 9971//9971 9972//9972
    +f 9973//9973 9974//9974 9975//9975
    +f 9976//9976 9977//9977 9978//9978
    +f 9979//9979 9980//9980 9981//9981
    +f 9982//9982 9983//9983 9984//9984
    +f 9985//9985 9986//9986 9987//9987
    +f 9988//9988 9989//9989 9990//9990
    +f 9991//9991 9992//9992 9993//9993
    +f 9994//9994 9995//9995 9996//9996
    +f 9997//9997 9998//9998 9999//9999
    +f 10000//10000 10001//10001 10002//10002
    +f 10003//10003 10004//10004 10005//10005
    +f 10006//10006 10007//10007 10008//10008
    +f 10009//10009 10010//10010 10011//10011
    +f 10012//10012 10013//10013 10014//10014
    +f 10015//10015 10016//10016 10017//10017
    +f 10018//10018 10019//10019 10020//10020
    +f 10021//10021 10022//10022 10023//10023
    +f 10024//10024 10025//10025 10026//10026
    +f 10027//10027 10028//10028 10029//10029
    +f 10030//10030 10031//10031 10032//10032
    +f 10033//10033 10034//10034 10035//10035
    +f 10036//10036 10037//10037 10038//10038
    +f 10039//10039 10040//10040 10041//10041
    +f 10042//10042 10043//10043 10044//10044
    +f 10045//10045 10046//10046 10047//10047
    +f 10048//10048 10049//10049 10050//10050
    +f 10051//10051 10052//10052 10053//10053
    +f 10054//10054 10055//10055 10056//10056
    +f 10057//10057 10058//10058 10059//10059
    +f 10060//10060 10061//10061 10062//10062
    +f 10063//10063 10064//10064 10065//10065
    +f 10066//10066 10067//10067 10068//10068
    +f 10069//10069 10070//10070 10071//10071
    +f 10072//10072 10073//10073 10074//10074
    +f 10075//10075 10076//10076 10077//10077
    +f 10078//10078 10079//10079 10080//10080
    +f 10081//10081 10082//10082 10083//10083
    +f 10084//10084 10085//10085 10086//10086
    +f 10087//10087 10088//10088 10089//10089
    +f 10090//10090 10091//10091 10092//10092
    +f 10093//10093 10094//10094 10095//10095
    +f 10096//10096 10097//10097 10098//10098
    +f 10099//10099 10100//10100 10101//10101
    +f 10102//10102 10103//10103 10104//10104
    +f 10105//10105 10106//10106 10107//10107
    +f 10108//10108 10109//10109 10110//10110
    +f 10111//10111 10112//10112 10113//10113
    +f 10114//10114 10115//10115 10116//10116
    +f 10117//10117 10118//10118 10119//10119
    +f 10120//10120 10121//10121 10122//10122
    +f 10123//10123 10124//10124 10125//10125
    +f 10126//10126 10127//10127 10128//10128
    +f 10129//10129 10130//10130 10131//10131
    +f 10132//10132 10133//10133 10134//10134
    +f 10135//10135 10136//10136 10137//10137
    +f 10138//10138 10139//10139 10140//10140
    +f 10141//10141 10142//10142 10143//10143
    +f 10144//10144 10145//10145 10146//10146
    +f 10147//10147 10148//10148 10149//10149
    +f 10150//10150 10151//10151 10152//10152
    +f 10153//10153 10154//10154 10155//10155
    +f 10156//10156 10157//10157 10158//10158
    +f 10159//10159 10160//10160 10161//10161
    +f 10162//10162 10163//10163 10164//10164
    +f 10165//10165 10166//10166 10167//10167
    +f 10168//10168 10169//10169 10170//10170
    +f 10171//10171 10172//10172 10173//10173
    +f 10174//10174 10175//10175 10176//10176
    +f 10177//10177 10178//10178 10179//10179
    +f 10180//10180 10181//10181 10182//10182
    +f 10183//10183 10184//10184 10185//10185
    +f 10186//10186 10187//10187 10188//10188
    +f 10189//10189 10190//10190 10191//10191
    +f 10192//10192 10193//10193 10194//10194
    +f 10195//10195 10196//10196 10197//10197
    +f 10198//10198 10199//10199 10200//10200
    +f 10201//10201 10202//10202 10203//10203
    +f 10204//10204 10205//10205 10206//10206
    +f 10207//10207 10208//10208 10209//10209
    +f 10210//10210 10211//10211 10212//10212
    +f 10213//10213 10214//10214 10215//10215
    +f 10216//10216 10217//10217 10218//10218
    +f 10219//10219 10220//10220 10221//10221
    +f 10222//10222 10223//10223 10224//10224
    +f 10225//10225 10226//10226 10227//10227
    +f 10228//10228 10229//10229 10230//10230
    +f 10231//10231 10232//10232 10233//10233
    +f 10234//10234 10235//10235 10236//10236
    +f 10237//10237 10238//10238 10239//10239
    +f 10240//10240 10241//10241 10242//10242
    +f 10243//10243 10244//10244 10245//10245
    +f 10246//10246 10247//10247 10248//10248
    +f 10249//10249 10250//10250 10251//10251
    +f 10252//10252 10253//10253 10254//10254
    +f 10255//10255 10256//10256 10257//10257
    +f 10258//10258 10259//10259 10260//10260
    +f 10261//10261 10262//10262 10263//10263
    +f 10264//10264 10265//10265 10266//10266
    +f 10267//10267 10268//10268 10269//10269
    +f 10270//10270 10271//10271 10272//10272
    +f 10273//10273 10274//10274 10275//10275
    +f 10276//10276 10277//10277 10278//10278
    +f 10279//10279 10280//10280 10281//10281
    +f 10282//10282 10283//10283 10284//10284
    +f 10285//10285 10286//10286 10287//10287
    +f 10288//10288 10289//10289 10290//10290
    +f 10291//10291 10292//10292 10293//10293
    +f 10294//10294 10295//10295 10296//10296
    +f 10297//10297 10298//10298 10299//10299
    +f 10300//10300 10301//10301 10302//10302
    +f 10303//10303 10304//10304 10305//10305
    +f 10306//10306 10307//10307 10308//10308
    +f 10309//10309 10310//10310 10311//10311
    +f 10312//10312 10313//10313 10314//10314
    +f 10315//10315 10316//10316 10317//10317
    +f 10318//10318 10319//10319 10320//10320
    +f 10321//10321 10322//10322 10323//10323
    +f 10324//10324 10325//10325 10326//10326
    +f 10327//10327 10328//10328 10329//10329
    +f 10330//10330 10331//10331 10332//10332
    +f 10333//10333 10334//10334 10335//10335
    +f 10336//10336 10337//10337 10338//10338
    +f 10339//10339 10340//10340 10341//10341
    +f 10342//10342 10343//10343 10344//10344
    +f 10345//10345 10346//10346 10347//10347
    +f 10348//10348 10349//10349 10350//10350
    +f 10351//10351 10352//10352 10353//10353
    +f 10354//10354 10355//10355 10356//10356
    +f 10357//10357 10358//10358 10359//10359
    +f 10360//10360 10361//10361 10362//10362
    +f 10363//10363 10364//10364 10365//10365
    +f 10366//10366 10367//10367 10368//10368
    +f 10369//10369 10370//10370 10371//10371
    +f 10372//10372 10373//10373 10374//10374
    +f 10375//10375 10376//10376 10377//10377
    +f 10378//10378 10379//10379 10380//10380
    +f 10381//10381 10382//10382 10383//10383
    +f 10384//10384 10385//10385 10386//10386
    +f 10387//10387 10388//10388 10389//10389
    +f 10390//10390 10391//10391 10392//10392
    +f 10393//10393 10394//10394 10395//10395
    +f 10396//10396 10397//10397 10398//10398
    +f 10399//10399 10400//10400 10401//10401
    +f 10402//10402 10403//10403 10404//10404
    +f 10405//10405 10406//10406 10407//10407
    +f 10408//10408 10409//10409 10410//10410
    +f 10411//10411 10412//10412 10413//10413
    +f 10414//10414 10415//10415 10416//10416
    +f 10417//10417 10418//10418 10419//10419
    +f 10420//10420 10421//10421 10422//10422
    +f 10423//10423 10424//10424 10425//10425
    +f 10426//10426 10427//10427 10428//10428
    +f 10429//10429 10430//10430 10431//10431
    +f 10432//10432 10433//10433 10434//10434
    +f 10435//10435 10436//10436 10437//10437
    +f 10438//10438 10439//10439 10440//10440
    +f 10441//10441 10442//10442 10443//10443
    +f 10444//10444 10445//10445 10446//10446
    +f 10447//10447 10448//10448 10449//10449
    +f 10450//10450 10451//10451 10452//10452
    +f 10453//10453 10454//10454 10455//10455
    +f 10456//10456 10457//10457 10458//10458
    +f 10459//10459 10460//10460 10461//10461
    +f 10462//10462 10463//10463 10464//10464
    +f 10465//10465 10466//10466 10467//10467
    +f 10468//10468 10469//10469 10470//10470
    +f 10471//10471 10472//10472 10473//10473
    +f 10474//10474 10475//10475 10476//10476
    +f 10477//10477 10478//10478 10479//10479
    +f 10480//10480 10481//10481 10482//10482
    +f 10483//10483 10484//10484 10485//10485
    +f 10486//10486 10487//10487 10488//10488
    +f 10489//10489 10490//10490 10491//10491
    +f 10492//10492 10493//10493 10494//10494
    +f 10495//10495 10496//10496 10497//10497
    +f 10498//10498 10499//10499 10500//10500
    +f 10501//10501 10502//10502 10503//10503
    +f 10504//10504 10505//10505 10506//10506
    +f 10507//10507 10508//10508 10509//10509
    +f 10510//10510 10511//10511 10512//10512
    +f 10513//10513 10514//10514 10515//10515
    +f 10516//10516 10517//10517 10518//10518
    +f 10519//10519 10520//10520 10521//10521
    +f 10522//10522 10523//10523 10524//10524
    +f 10525//10525 10526//10526 10527//10527
    +f 10528//10528 10529//10529 10530//10530
    +f 10531//10531 10532//10532 10533//10533
    +f 10534//10534 10535//10535 10536//10536
    +f 10537//10537 10538//10538 10539//10539
    +f 10540//10540 10541//10541 10542//10542
    +f 10543//10543 10544//10544 10545//10545
    +f 10546//10546 10547//10547 10548//10548
    +f 10549//10549 10550//10550 10551//10551
    +f 10552//10552 10553//10553 10554//10554
    +f 10555//10555 10556//10556 10557//10557
    +f 10558//10558 10559//10559 10560//10560
    +f 10561//10561 10562//10562 10563//10563
    +f 10564//10564 10565//10565 10566//10566
    +f 10567//10567 10568//10568 10569//10569
    +f 10570//10570 10571//10571 10572//10572
    +f 10573//10573 10574//10574 10575//10575
    +f 10576//10576 10577//10577 10578//10578
    +f 10579//10579 10580//10580 10581//10581
    +f 10582//10582 10583//10583 10584//10584
    +f 10585//10585 10586//10586 10587//10587
    +f 10588//10588 10589//10589 10590//10590
    +f 10591//10591 10592//10592 10593//10593
    +f 10594//10594 10595//10595 10596//10596
    +f 10597//10597 10598//10598 10599//10599
    +f 10600//10600 10601//10601 10602//10602
    +f 10603//10603 10604//10604 10605//10605
    +f 10606//10606 10607//10607 10608//10608
    +f 10609//10609 10610//10610 10611//10611
    +f 10612//10612 10613//10613 10614//10614
    +f 10615//10615 10616//10616 10617//10617
    +f 10618//10618 10619//10619 10620//10620
    +f 10621//10621 10622//10622 10623//10623
    +f 10624//10624 10625//10625 10626//10626
    +f 10627//10627 10628//10628 10629//10629
    +f 10630//10630 10631//10631 10632//10632
    +f 10633//10633 10634//10634 10635//10635
    +f 10636//10636 10637//10637 10638//10638
    +f 10639//10639 10640//10640 10641//10641
    +f 10642//10642 10643//10643 10644//10644
    +f 10645//10645 10646//10646 10647//10647
    +f 10648//10648 10649//10649 10650//10650
    +f 10651//10651 10652//10652 10653//10653
    +f 10654//10654 10655//10655 10656//10656
    +f 10657//10657 10658//10658 10659//10659
    +f 10660//10660 10661//10661 10662//10662
    +f 10663//10663 10664//10664 10665//10665
    +f 10666//10666 10667//10667 10668//10668
    +f 10669//10669 10670//10670 10671//10671
    +f 10672//10672 10673//10673 10674//10674
    +f 10675//10675 10676//10676 10677//10677
    +f 10678//10678 10679//10679 10680//10680
    +f 10681//10681 10682//10682 10683//10683
    +f 10684//10684 10685//10685 10686//10686
    +f 10687//10687 10688//10688 10689//10689
    +f 10690//10690 10691//10691 10692//10692
    +f 10693//10693 10694//10694 10695//10695
    +f 10696//10696 10697//10697 10698//10698
    +f 10699//10699 10700//10700 10701//10701
    +f 10702//10702 10703//10703 10704//10704
    +f 10705//10705 10706//10706 10707//10707
    +f 10708//10708 10709//10709 10710//10710
    +f 10711//10711 10712//10712 10713//10713
    +f 10714//10714 10715//10715 10716//10716
    +f 10717//10717 10718//10718 10719//10719
    +f 10720//10720 10721//10721 10722//10722
    +f 10723//10723 10724//10724 10725//10725
    +f 10726//10726 10727//10727 10728//10728
    +f 10729//10729 10730//10730 10731//10731
    +f 10732//10732 10733//10733 10734//10734
    +f 10735//10735 10736//10736 10737//10737
    +f 10738//10738 10739//10739 10740//10740
    +f 10741//10741 10742//10742 10743//10743
    +f 10744//10744 10745//10745 10746//10746
    +f 10747//10747 10748//10748 10749//10749
    +f 10750//10750 10751//10751 10752//10752
    +f 10753//10753 10754//10754 10755//10755
    +f 10756//10756 10757//10757 10758//10758
    +f 10759//10759 10760//10760 10761//10761
    +f 10762//10762 10763//10763 10764//10764
    +f 10765//10765 10766//10766 10767//10767
    +f 10768//10768 10769//10769 10770//10770
    +f 10771//10771 10772//10772 10773//10773
    +f 10774//10774 10775//10775 10776//10776
    +f 10777//10777 10778//10778 10779//10779
    +f 10780//10780 10781//10781 10782//10782
    +f 10783//10783 10784//10784 10785//10785
    +f 10786//10786 10787//10787 10788//10788
    +f 10789//10789 10790//10790 10791//10791
    +f 10792//10792 10793//10793 10794//10794
    +f 10795//10795 10796//10796 10797//10797
    +f 10798//10798 10799//10799 10800//10800
    +f 10801//10801 10802//10802 10803//10803
    +f 10804//10804 10805//10805 10806//10806
    +f 10807//10807 10808//10808 10809//10809
    +f 10810//10810 10811//10811 10812//10812
    +f 10813//10813 10814//10814 10815//10815
    +f 10816//10816 10817//10817 10818//10818
    +f 10819//10819 10820//10820 10821//10821
    +f 10822//10822 10823//10823 10824//10824
    +f 10825//10825 10826//10826 10827//10827
    +f 10828//10828 10829//10829 10830//10830
    +f 10831//10831 10832//10832 10833//10833
    +f 10834//10834 10835//10835 10836//10836
    +f 10837//10837 10838//10838 10839//10839
    +f 10840//10840 10841//10841 10842//10842
    +f 10843//10843 10844//10844 10845//10845
    +f 10846//10846 10847//10847 10848//10848
    +f 10849//10849 10850//10850 10851//10851
    +f 10852//10852 10853//10853 10854//10854
    +f 10855//10855 10856//10856 10857//10857
    +f 10858//10858 10859//10859 10860//10860
    +f 10861//10861 10862//10862 10863//10863
    +f 10864//10864 10865//10865 10866//10866
    +f 10867//10867 10868//10868 10869//10869
    +f 10870//10870 10871//10871 10872//10872
    +f 10873//10873 10874//10874 10875//10875
    +f 10876//10876 10877//10877 10878//10878
    +f 10879//10879 10880//10880 10881//10881
    +f 10882//10882 10883//10883 10884//10884
    +f 10885//10885 10886//10886 10887//10887
    +f 10888//10888 10889//10889 10890//10890
    +f 10891//10891 10892//10892 10893//10893
    +f 10894//10894 10895//10895 10896//10896
    +f 10897//10897 10898//10898 10899//10899
    +f 10900//10900 10901//10901 10902//10902
    +f 10903//10903 10904//10904 10905//10905
    +f 10906//10906 10907//10907 10908//10908
    +f 10909//10909 10910//10910 10911//10911
    +f 10912//10912 10913//10913 10914//10914
    +f 10915//10915 10916//10916 10917//10917
    +f 10918//10918 10919//10919 10920//10920
    +f 10921//10921 10922//10922 10923//10923
    +f 10924//10924 10925//10925 10926//10926
    +f 10927//10927 10928//10928 10929//10929
    +f 10930//10930 10931//10931 10932//10932
    +f 10933//10933 10934//10934 10935//10935
    +f 10936//10936 10937//10937 10938//10938
    +f 10939//10939 10940//10940 10941//10941
    +f 10942//10942 10943//10943 10944//10944
    +f 10945//10945 10946//10946 10947//10947
    +f 10948//10948 10949//10949 10950//10950
    +f 10951//10951 10952//10952 10953//10953
    +f 10954//10954 10955//10955 10956//10956
    +f 10957//10957 10958//10958 10959//10959
    +f 10960//10960 10961//10961 10962//10962
    +f 10963//10963 10964//10964 10965//10965
    +f 10966//10966 10967//10967 10968//10968
    +f 10969//10969 10970//10970 10971//10971
    +f 10972//10972 10973//10973 10974//10974
    +f 10975//10975 10976//10976 10977//10977
    +f 10978//10978 10979//10979 10980//10980
    +f 10981//10981 10982//10982 10983//10983
    +f 10984//10984 10985//10985 10986//10986
    +f 10987//10987 10988//10988 10989//10989
    +f 10990//10990 10991//10991 10992//10992
    +f 10993//10993 10994//10994 10995//10995
    +f 10996//10996 10997//10997 10998//10998
    +f 10999//10999 11000//11000 11001//11001
    +f 11002//11002 11003//11003 11004//11004
    +f 11005//11005 11006//11006 11007//11007
    +f 11008//11008 11009//11009 11010//11010
    +f 11011//11011 11012//11012 11013//11013
    +f 11014//11014 11015//11015 11016//11016
    +f 11017//11017 11018//11018 11019//11019
    +f 11020//11020 11021//11021 11022//11022
    +f 11023//11023 11024//11024 11025//11025
    +f 11026//11026 11027//11027 11028//11028
    +f 11029//11029 11030//11030 11031//11031
    +f 11032//11032 11033//11033 11034//11034
    +f 11035//11035 11036//11036 11037//11037
    +f 11038//11038 11039//11039 11040//11040
    +f 11041//11041 11042//11042 11043//11043
    +f 11044//11044 11045//11045 11046//11046
    +f 11047//11047 11048//11048 11049//11049
    +f 11050//11050 11051//11051 11052//11052
    +f 11053//11053 11054//11054 11055//11055
    +f 11056//11056 11057//11057 11058//11058
    +f 11059//11059 11060//11060 11061//11061
    +f 11062//11062 11063//11063 11064//11064
    +f 11065//11065 11066//11066 11067//11067
    +f 11068//11068 11069//11069 11070//11070
    +f 11071//11071 11072//11072 11073//11073
    +f 11074//11074 11075//11075 11076//11076
    +f 11077//11077 11078//11078 11079//11079
    +f 11080//11080 11081//11081 11082//11082
    +f 11083//11083 11084//11084 11085//11085
    +f 11086//11086 11087//11087 11088//11088
    +f 11089//11089 11090//11090 11091//11091
    +f 11092//11092 11093//11093 11094//11094
    +f 11095//11095 11096//11096 11097//11097
    +f 11098//11098 11099//11099 11100//11100
    +f 11101//11101 11102//11102 11103//11103
    +f 11104//11104 11105//11105 11106//11106
    +f 11107//11107 11108//11108 11109//11109
    +f 11110//11110 11111//11111 11112//11112
    +f 11113//11113 11114//11114 11115//11115
    +f 11116//11116 11117//11117 11118//11118
    +f 11119//11119 11120//11120 11121//11121
    +f 11122//11122 11123//11123 11124//11124
    +f 11125//11125 11126//11126 11127//11127
    +f 11128//11128 11129//11129 11130//11130
    +f 11131//11131 11132//11132 11133//11133
    +f 11134//11134 11135//11135 11136//11136
    +f 11137//11137 11138//11138 11139//11139
    +f 11140//11140 11141//11141 11142//11142
    +f 11143//11143 11144//11144 11145//11145
    +f 11146//11146 11147//11147 11148//11148
    +f 11149//11149 11150//11150 11151//11151
    +f 11152//11152 11153//11153 11154//11154
    +f 11155//11155 11156//11156 11157//11157
    +f 11158//11158 11159//11159 11160//11160
    +f 11161//11161 11162//11162 11163//11163
    +f 11164//11164 11165//11165 11166//11166
    +f 11167//11167 11168//11168 11169//11169
    +f 11170//11170 11171//11171 11172//11172
    +f 11173//11173 11174//11174 11175//11175
    +f 11176//11176 11177//11177 11178//11178
    +f 11179//11179 11180//11180 11181//11181
    +f 11182//11182 11183//11183 11184//11184
    +f 11185//11185 11186//11186 11187//11187
    +f 11188//11188 11189//11189 11190//11190
    +f 11191//11191 11192//11192 11193//11193
    +f 11194//11194 11195//11195 11196//11196
    +f 11197//11197 11198//11198 11199//11199
    +f 11200//11200 11201//11201 11202//11202
    +f 11203//11203 11204//11204 11205//11205
    +f 11206//11206 11207//11207 11208//11208
    +f 11209//11209 11210//11210 11211//11211
    +f 11212//11212 11213//11213 11214//11214
    +f 11215//11215 11216//11216 11217//11217
    +f 11218//11218 11219//11219 11220//11220
    +f 11221//11221 11222//11222 11223//11223
    +f 11224//11224 11225//11225 11226//11226
    +f 11227//11227 11228//11228 11229//11229
    +f 11230//11230 11231//11231 11232//11232
    +f 11233//11233 11234//11234 11235//11235
    +f 11236//11236 11237//11237 11238//11238
    +f 11239//11239 11240//11240 11241//11241
    +f 11242//11242 11243//11243 11244//11244
    +f 11245//11245 11246//11246 11247//11247
    +f 11248//11248 11249//11249 11250//11250
    +f 11251//11251 11252//11252 11253//11253
    +f 11254//11254 11255//11255 11256//11256
    +f 11257//11257 11258//11258 11259//11259
    +f 11260//11260 11261//11261 11262//11262
    +f 11263//11263 11264//11264 11265//11265
    +f 11266//11266 11267//11267 11268//11268
    +f 11269//11269 11270//11270 11271//11271
    +f 11272//11272 11273//11273 11274//11274
    +f 11275//11275 11276//11276 11277//11277
    +f 11278//11278 11279//11279 11280//11280
    +f 11281//11281 11282//11282 11283//11283
    +f 11284//11284 11285//11285 11286//11286
    +f 11287//11287 11288//11288 11289//11289
    +f 11290//11290 11291//11291 11292//11292
    +f 11293//11293 11294//11294 11295//11295
    +f 11296//11296 11297//11297 11298//11298
    +f 11299//11299 11300//11300 11301//11301
    +f 11302//11302 11303//11303 11304//11304
    +f 11305//11305 11306//11306 11307//11307
    +f 11308//11308 11309//11309 11310//11310
    +f 11311//11311 11312//11312 11313//11313
    +f 11314//11314 11315//11315 11316//11316
    +f 11317//11317 11318//11318 11319//11319
    +f 11320//11320 11321//11321 11322//11322
    +f 11323//11323 11324//11324 11325//11325
    +f 11326//11326 11327//11327 11328//11328
    +f 11329//11329 11330//11330 11331//11331
    +f 11332//11332 11333//11333 11334//11334
    +f 11335//11335 11336//11336 11337//11337
    +f 11338//11338 11339//11339 11340//11340
    +f 11341//11341 11342//11342 11343//11343
    +f 11344//11344 11345//11345 11346//11346
    +f 11347//11347 11348//11348 11349//11349
    +f 11350//11350 11351//11351 11352//11352
    +f 11353//11353 11354//11354 11355//11355
    +f 11356//11356 11357//11357 11358//11358
    +f 11359//11359 11360//11360 11361//11361
    +f 11362//11362 11363//11363 11364//11364
    +f 11365//11365 11366//11366 11367//11367
    +f 11368//11368 11369//11369 11370//11370
    +f 11371//11371 11372//11372 11373//11373
    +f 11374//11374 11375//11375 11376//11376
    +f 11377//11377 11378//11378 11379//11379
    +f 11380//11380 11381//11381 11382//11382
    +f 11383//11383 11384//11384 11385//11385
    +f 11386//11386 11387//11387 11388//11388
    +f 11389//11389 11390//11390 11391//11391
    +f 11392//11392 11393//11393 11394//11394
    +f 11395//11395 11396//11396 11397//11397
    +f 11398//11398 11399//11399 11400//11400
    +f 11401//11401 11402//11402 11403//11403
    +f 11404//11404 11405//11405 11406//11406
    +f 11407//11407 11408//11408 11409//11409
    +f 11410//11410 11411//11411 11412//11412
    +f 11413//11413 11414//11414 11415//11415
    +f 11416//11416 11417//11417 11418//11418
    +f 11419//11419 11420//11420 11421//11421
    +f 11422//11422 11423//11423 11424//11424
    +f 11425//11425 11426//11426 11427//11427
    +f 11428//11428 11429//11429 11430//11430
    +f 11431//11431 11432//11432 11433//11433
    +f 11434//11434 11435//11435 11436//11436
    +f 11437//11437 11438//11438 11439//11439
    +f 11440//11440 11441//11441 11442//11442
    +f 11443//11443 11444//11444 11445//11445
    +f 11446//11446 11447//11447 11448//11448
    +f 11449//11449 11450//11450 11451//11451
    +f 11452//11452 11453//11453 11454//11454
    +f 11455//11455 11456//11456 11457//11457
    +f 11458//11458 11459//11459 11460//11460
    +f 11461//11461 11462//11462 11463//11463
    +f 11464//11464 11465//11465 11466//11466
    +f 11467//11467 11468//11468 11469//11469
    +f 11470//11470 11471//11471 11472//11472
    +f 11473//11473 11474//11474 11475//11475
    +f 11476//11476 11477//11477 11478//11478
    +f 11479//11479 11480//11480 11481//11481
    +f 11482//11482 11483//11483 11484//11484
    +f 11485//11485 11486//11486 11487//11487
    +f 11488//11488 11489//11489 11490//11490
    +f 11491//11491 11492//11492 11493//11493
    +f 11494//11494 11495//11495 11496//11496
    +f 11497//11497 11498//11498 11499//11499
    +f 11500//11500 11501//11501 11502//11502
    +f 11503//11503 11504//11504 11505//11505
    +f 11506//11506 11507//11507 11508//11508
    +f 11509//11509 11510//11510 11511//11511
    +f 11512//11512 11513//11513 11514//11514
    +f 11515//11515 11516//11516 11517//11517
    +f 11518//11518 11519//11519 11520//11520
    +f 11521//11521 11522//11522 11523//11523
    +f 11524//11524 11525//11525 11526//11526
    +f 11527//11527 11528//11528 11529//11529
    +f 11530//11530 11531//11531 11532//11532
    +f 11533//11533 11534//11534 11535//11535
    +f 11536//11536 11537//11537 11538//11538
    +f 11539//11539 11540//11540 11541//11541
    +f 11542//11542 11543//11543 11544//11544
    +f 11545//11545 11546//11546 11547//11547
    +f 11548//11548 11549//11549 11550//11550
    +f 11551//11551 11552//11552 11553//11553
    +f 11554//11554 11555//11555 11556//11556
    +f 11557//11557 11558//11558 11559//11559
    +f 11560//11560 11561//11561 11562//11562
    +f 11563//11563 11564//11564 11565//11565
    +f 11566//11566 11567//11567 11568//11568
    +f 11569//11569 11570//11570 11571//11571
    +f 11572//11572 11573//11573 11574//11574
    +f 11575//11575 11576//11576 11577//11577
    +f 11578//11578 11579//11579 11580//11580
    +f 11581//11581 11582//11582 11583//11583
    +f 11584//11584 11585//11585 11586//11586
    +f 11587//11587 11588//11588 11589//11589
    +f 11590//11590 11591//11591 11592//11592
    +f 11593//11593 11594//11594 11595//11595
    +f 11596//11596 11597//11597 11598//11598
    +f 11599//11599 11600//11600 11601//11601
    +f 11602//11602 11603//11603 11604//11604
    +f 11605//11605 11606//11606 11607//11607
    +f 11608//11608 11609//11609 11610//11610
    +f 11611//11611 11612//11612 11613//11613
    +f 11614//11614 11615//11615 11616//11616
    +f 11617//11617 11618//11618 11619//11619
    +f 11620//11620 11621//11621 11622//11622
    +f 11623//11623 11624//11624 11625//11625
    +f 11626//11626 11627//11627 11628//11628
    +f 11629//11629 11630//11630 11631//11631
    +f 11632//11632 11633//11633 11634//11634
    +f 11635//11635 11636//11636 11637//11637
    +f 11638//11638 11639//11639 11640//11640
    +f 11641//11641 11642//11642 11643//11643
    +f 11644//11644 11645//11645 11646//11646
    +f 11647//11647 11648//11648 11649//11649
    +f 11650//11650 11651//11651 11652//11652
    +f 11653//11653 11654//11654 11655//11655
    +f 11656//11656 11657//11657 11658//11658
    +f 11659//11659 11660//11660 11661//11661
    +f 11662//11662 11663//11663 11664//11664
    +f 11665//11665 11666//11666 11667//11667
    +f 11668//11668 11669//11669 11670//11670
    +f 11671//11671 11672//11672 11673//11673
    +f 11674//11674 11675//11675 11676//11676
    +f 11677//11677 11678//11678 11679//11679
    +f 11680//11680 11681//11681 11682//11682
    +f 11683//11683 11684//11684 11685//11685
    +f 11686//11686 11687//11687 11688//11688
    +f 11689//11689 11690//11690 11691//11691
    +f 11692//11692 11693//11693 11694//11694
    +f 11695//11695 11696//11696 11697//11697
    +f 11698//11698 11699//11699 11700//11700
    +f 11701//11701 11702//11702 11703//11703
    +f 11704//11704 11705//11705 11706//11706
    +f 11707//11707 11708//11708 11709//11709
    +f 11710//11710 11711//11711 11712//11712
    +f 11713//11713 11714//11714 11715//11715
    +f 11716//11716 11717//11717 11718//11718
    +f 11719//11719 11720//11720 11721//11721
    +f 11722//11722 11723//11723 11724//11724
    +f 11725//11725 11726//11726 11727//11727
    +f 11728//11728 11729//11729 11730//11730
    +f 11731//11731 11732//11732 11733//11733
    +f 11734//11734 11735//11735 11736//11736
    +f 11737//11737 11738//11738 11739//11739
    +f 11740//11740 11741//11741 11742//11742
    +f 11743//11743 11744//11744 11745//11745
    +f 11746//11746 11747//11747 11748//11748
    +f 11749//11749 11750//11750 11751//11751
    +f 11752//11752 11753//11753 11754//11754
    +f 11755//11755 11756//11756 11757//11757
    +f 11758//11758 11759//11759 11760//11760
    +f 11761//11761 11762//11762 11763//11763
    +f 11764//11764 11765//11765 11766//11766
    +f 11767//11767 11768//11768 11769//11769
    +f 11770//11770 11771//11771 11772//11772
    +f 11773//11773 11774//11774 11775//11775
    +f 11776//11776 11777//11777 11778//11778
    +f 11779//11779 11780//11780 11781//11781
    +f 11782//11782 11783//11783 11784//11784
    +f 11785//11785 11786//11786 11787//11787
    +f 11788//11788 11789//11789 11790//11790
    +f 11791//11791 11792//11792 11793//11793
    +f 11794//11794 11795//11795 11796//11796
    +f 11797//11797 11798//11798 11799//11799
    +f 11800//11800 11801//11801 11802//11802
    +f 11803//11803 11804//11804 11805//11805
    +f 11806//11806 11807//11807 11808//11808
    +f 11809//11809 11810//11810 11811//11811
    +f 11812//11812 11813//11813 11814//11814
    +f 11815//11815 11816//11816 11817//11817
    +f 11818//11818 11819//11819 11820//11820
    +f 11821//11821 11822//11822 11823//11823
    +f 11824//11824 11825//11825 11826//11826
    +f 11827//11827 11828//11828 11829//11829
    +f 11830//11830 11831//11831 11832//11832
    +f 11833//11833 11834//11834 11835//11835
    +f 11836//11836 11837//11837 11838//11838
    +f 11839//11839 11840//11840 11841//11841
    +f 11842//11842 11843//11843 11844//11844
    +f 11845//11845 11846//11846 11847//11847
    +f 11848//11848 11849//11849 11850//11850
    +f 11851//11851 11852//11852 11853//11853
    +f 11854//11854 11855//11855 11856//11856
    +f 11857//11857 11858//11858 11859//11859
    +f 11860//11860 11861//11861 11862//11862
    +f 11863//11863 11864//11864 11865//11865
    +f 11866//11866 11867//11867 11868//11868
    +f 11869//11869 11870//11870 11871//11871
    +f 11872//11872 11873//11873 11874//11874
    +f 11875//11875 11876//11876 11877//11877
    +f 11878//11878 11879//11879 11880//11880
    +f 11881//11881 11882//11882 11883//11883
    +f 11884//11884 11885//11885 11886//11886
    +f 11887//11887 11888//11888 11889//11889
    +f 11890//11890 11891//11891 11892//11892
    +f 11893//11893 11894//11894 11895//11895
    +f 11896//11896 11897//11897 11898//11898
    +f 11899//11899 11900//11900 11901//11901
    +f 11902//11902 11903//11903 11904//11904
    +f 11905//11905 11906//11906 11907//11907
    +f 11908//11908 11909//11909 11910//11910
    +f 11911//11911 11912//11912 11913//11913
    +f 11914//11914 11915//11915 11916//11916
    +f 11917//11917 11918//11918 11919//11919
    +f 11920//11920 11921//11921 11922//11922
    +f 11923//11923 11924//11924 11925//11925
    +f 11926//11926 11927//11927 11928//11928
    +f 11929//11929 11930//11930 11931//11931
    +f 11932//11932 11933//11933 11934//11934
    +f 11935//11935 11936//11936 11937//11937
    +f 11938//11938 11939//11939 11940//11940
    +f 11941//11941 11942//11942 11943//11943
    +f 11944//11944 11945//11945 11946//11946
    +f 11947//11947 11948//11948 11949//11949
    +f 11950//11950 11951//11951 11952//11952
    +f 11953//11953 11954//11954 11955//11955
    +f 11956//11956 11957//11957 11958//11958
    +f 11959//11959 11960//11960 11961//11961
    +f 11962//11962 11963//11963 11964//11964
    +f 11965//11965 11966//11966 11967//11967
    +f 11968//11968 11969//11969 11970//11970
    +f 11971//11971 11972//11972 11973//11973
    +f 11974//11974 11975//11975 11976//11976
    +f 11977//11977 11978//11978 11979//11979
    +f 11980//11980 11981//11981 11982//11982
    +f 11983//11983 11984//11984 11985//11985
    +f 11986//11986 11987//11987 11988//11988
    +f 11989//11989 11990//11990 11991//11991
    +f 11992//11992 11993//11993 11994//11994
    +f 11995//11995 11996//11996 11997//11997
    +f 11998//11998 11999//11999 12000//12000
    +f 12001//12001 12002//12002 12003//12003
    +f 12004//12004 12005//12005 12006//12006
    +f 12007//12007 12008//12008 12009//12009
    +f 12010//12010 12011//12011 12012//12012
    +f 12013//12013 12014//12014 12015//12015
    +f 12016//12016 12017//12017 12018//12018
    +f 12019//12019 12020//12020 12021//12021
    +f 12022//12022 12023//12023 12024//12024
    +f 12025//12025 12026//12026 12027//12027
    +f 12028//12028 12029//12029 12030//12030
    +f 12031//12031 12032//12032 12033//12033
    +f 12034//12034 12035//12035 12036//12036
    +f 12037//12037 12038//12038 12039//12039
    +f 12040//12040 12041//12041 12042//12042
    +f 12043//12043 12044//12044 12045//12045
    +f 12046//12046 12047//12047 12048//12048
    +f 12049//12049 12050//12050 12051//12051
    +f 12052//12052 12053//12053 12054//12054
    +f 12055//12055 12056//12056 12057//12057
    +f 12058//12058 12059//12059 12060//12060
    +f 12061//12061 12062//12062 12063//12063
    +f 12064//12064 12065//12065 12066//12066
    +f 12067//12067 12068//12068 12069//12069
    +f 12070//12070 12071//12071 12072//12072
    +f 12073//12073 12074//12074 12075//12075
    +f 12076//12076 12077//12077 12078//12078
    +f 12079//12079 12080//12080 12081//12081
    +f 12082//12082 12083//12083 12084//12084
    +f 12085//12085 12086//12086 12087//12087
    +f 12088//12088 12089//12089 12090//12090
    +f 12091//12091 12092//12092 12093//12093
    +f 12094//12094 12095//12095 12096//12096
    diff --git a/wt-3.1.7a/examples/webgl/texture.jpg b/wt-3.1.7a/examples/webgl/texture.jpg
    new file mode 100644
    index 0000000..c93cb2a
    Binary files /dev/null and b/wt-3.1.7a/examples/webgl/texture.jpg differ
    diff --git a/wt-3.1.7a/examples/webgl/webgl.C b/wt-3.1.7a/examples/webgl/webgl.C
    new file mode 100644
    index 0000000..f49358a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/webgl/webgl.C
    @@ -0,0 +1,441 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WText>
    +#include <Wt/WGLWidget>
    +
    +#include <Wt/WMatrix4x4>
    +#include <Wt/WGenericMatrix>
    +
    +using namespace Wt;
    +
    +const char *fragmentShaderSrc =
    +"#ifdef GL_ES\n"
    +"precision highp float;\n"
    +"#endif\n"
    +"\n"
    +"varying vec4 vColor;\n"
    +"\n"
    +"void main(void) {\n"
    +"  gl_FragColor = vColor;\n"
    +"}\n";
    +
    +const char *vertexShaderSrc =
    +"attribute vec3 aVertexPosition;\n"
    +"attribute vec4 aVertexColor;\n"
    +"\n"
    +"uniform mat4 uMVMatrix;\n"
    +"uniform mat4 uCMatrix;\n"
    +"uniform mat4 uPMatrix;\n"
    +"\n"
    +"varying vec4 vColor;\n"
    +"\n"
    +"void main(void) {\n"
    +"  gl_Position = uPMatrix * uCMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n"
    +"  vColor = aVertexColor;\n"
    +"}\n";
    +
    +const char *texFragmentShaderSrc =
    +"#ifdef GL_ES\n"
    +"precision highp float;\n"
    +"#endif\n"
    +""
    +"varying vec2 vTextureCoord;\n"
    +""
    +"uniform sampler2D uSampler;\n"
    +""
    +"void main(void) {\n"
    +"  gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n"
    +"}\n";
    +
    +const char *texVertexShaderSrc =
    +"attribute vec3 aVertexPosition;\n"
    +"attribute vec2 aTextureCoord;\n"
    +""
    +"uniform mat4 uMVMatrix;\n"
    +"uniform mat4 uCMatrix;\n"
    +"uniform mat4 uPMatrix;\n"
    +""
    +"varying vec2 vTextureCoord;\n"
    +""
    +"void main(void) {\n"
    +"  gl_Position = uPMatrix * uCMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n"
    +"  vTextureCoord = aTextureCoord;\n"
    +"}\n";
    +
    +class PaintWidget: public WGLWidget
    +{
    +public:
    +  PaintWidget(WContainerWidget *root):
    +    WGLWidget(root)
    +  {
    +  }
    +  
    +  void initializeGL()
    +  {
    +    jsMatrix_ = createJavaScriptMatrix4();
    +    WMatrix4x4 worldTransform;
    +    worldTransform.lookAt(0, 0, 5, 0, 0, -1, 0, 1, 0);
    +    setJavaScriptMatrix4(jsMatrix_, worldTransform);
    +
    +    //setClientSideWalkHandler(jsMatrix_, 1./20, 1./100);
    +    setClientSideLookAtHandler(jsMatrix_, 0, 0, 0, 0, 1, 0, 0.005, 0.005);
    +    // First, load a simple shader
    +    Shader fragmentShader = createShader(FRAGMENT_SHADER);
    +    shaderSource(fragmentShader, fragmentShaderSrc);
    +    compileShader(fragmentShader);
    +    Shader vertexShader = createShader(VERTEX_SHADER);
    +    shaderSource(vertexShader, vertexShaderSrc);
    +    compileShader(vertexShader);
    +    shaderProgram_ = createProgram();
    +    attachShader(shaderProgram_, vertexShader);
    +    attachShader(shaderProgram_, fragmentShader);
    +    linkProgram(shaderProgram_);
    +    useProgram(shaderProgram_);
    +
    +    vertexPositionAttribute_ = getAttribLocation(shaderProgram_, "aVertexPosition");
    +    enableVertexAttribArray(vertexPositionAttribute_);
    +
    +    vertexColorAttribute_ = getAttribLocation(shaderProgram_, "aVertexColor");
    +    enableVertexAttribArray(vertexColorAttribute_);
    +
    +    pMatrixUniform_ = getUniformLocation(shaderProgram_, "uPMatrix");
    +    cMatrixUniform_ = getUniformLocation(shaderProgram_, "uCMatrix");
    +    mvMatrixUniform_ = getUniformLocation(shaderProgram_, "uMVMatrix");
    +
    +    // Next, load a texture shader
    +    Shader texFragmentShader = createShader(FRAGMENT_SHADER);
    +    shaderSource(texFragmentShader, texFragmentShaderSrc);
    +    compileShader(texFragmentShader);
    +    Shader texVertexShader = createShader(VERTEX_SHADER);
    +    shaderSource(texVertexShader, texVertexShaderSrc);
    +    compileShader(texVertexShader);
    +    texShaderProgram_ = createProgram();
    +    attachShader(texShaderProgram_, texVertexShader);
    +    attachShader(texShaderProgram_, texFragmentShader);
    +    linkProgram(texShaderProgram_);
    +    useProgram(texShaderProgram_);
    +
    +    texVertexPositionAttribute_ = getAttribLocation(texShaderProgram_, "aVertexPosition");
    +    enableVertexAttribArray(texVertexPositionAttribute_);
    +
    +    texCoordAttribute_ = getAttribLocation(texShaderProgram_, "aTextureCoord");
    +    enableVertexAttribArray(texCoordAttribute_);
    +
    +    texPMatrixUniform_ = getUniformLocation(texShaderProgram_, "uPMatrix");
    +    texCMatrixUniform_ = getUniformLocation(shaderProgram_, "uCMatrix");
    +    texMvMatrixUniform_ = getUniformLocation(texShaderProgram_, "uMVMatrix");
    +    texSamplerUniform_ = getUniformLocation(texShaderProgram_, "uSampler");
    +
    +    // Now, preload buffers
    +    triangleVertexPositionBuffer_ = createBuffer();
    +    bindBuffer(ARRAY_BUFFER, triangleVertexPositionBuffer_);
    +    double trianglePosition[] = {
    +      0.0, 1.0, 0.0,
    +      -1.0,-1.0, 0.0,
    +      1.0,-1.0, 0.0
    +    };
    +    bufferDatafv(ARRAY_BUFFER, trianglePosition, 9, STATIC_DRAW);
    +
    +    triangleVertexColorBuffer_ = createBuffer();
    +    bindBuffer(ARRAY_BUFFER, triangleVertexColorBuffer_);
    +    double triangleColor[] = {
    +      1.0,0.0,0.0,1.0,
    +      0.0,1.0,0.0,1.0,
    +      0.0,0.0,1.0,1.0
    +    };
    +    bufferDatafv(ARRAY_BUFFER, triangleColor, 12, STATIC_DRAW);
    +
    +    squareVertexPositionBuffer_ = createBuffer();
    +    bindBuffer(ARRAY_BUFFER, squareVertexPositionBuffer_);
    +    double squarePosition[] = {
    +       1.0, 1.0,0.0,
    +      -1.0, 1.0,0.0,
    +       1.0,-1.0,0.0,
    +      -1.0,-1.0,0.0
    +    };
    +    bufferDatafv(ARRAY_BUFFER, squarePosition, 12, STATIC_DRAW);
    +
    +    squareVertexColorBuffer_ = createBuffer();
    +    bindBuffer(ARRAY_BUFFER, squareVertexColorBuffer_);
    +    double squareColor[] = {
    +      1.0,0.0,0.0,1.0,
    +      0.0,1.0,0.0,1.0,
    +      0.0,0.0,1.0,1.0,
    +      0.0,1.0,1.0,1.0
    +    };
    +    bufferDatafv(ARRAY_BUFFER, squareColor, 16, STATIC_DRAW);
    +
    +    squareElementBuffer_ = createBuffer();
    +    bindBuffer(ELEMENT_ARRAY_BUFFER, squareElementBuffer_);
    +    int elements[] = {
    +      0, 1, 2, 3
    +    };
    +    bufferDataiv(ELEMENT_ARRAY_BUFFER, elements, 4, STATIC_DRAW, DT_UNSIGNED_BYTE);
    +
    +    texture_ = createTextureAndLoad("texture.jpg");
    +    bindTexture(TEXTURE_2D, texture_);
    +    pixelStorei(UNPACK_FLIP_Y_WEBGL, true);
    +    texImage2D(TEXTURE_2D, 0, RGB, RGB, PT_UNSIGNED_BYTE, texture_);
    +    texParameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, LINEAR);
    +    texParameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, LINEAR);
    +    textureCoordBuffer_ = createBuffer();
    +    bindBuffer(ARRAY_BUFFER, textureCoordBuffer_);
    +    float textureCoords[] = {
    +      1, 1,
    +      0, 1,
    +      1, 0,
    +      0, 0
    +    };
    +    bufferDatafv(ARRAY_BUFFER, textureCoords, 8, STATIC_DRAW);
    +
    +  }
    +
    +  void paintGL()
    +  {
    +    // Drawing starts here!
    +    //clearColor(0.8, 0.8, 0.8, 1);
    +    clearColor(0, 0, 0, 1);
    +    clearDepth(1);
    +    disable(DEPTH_TEST);
    +    disable(CULL_FACE);
    +    depthFunc(LEQUAL);
    +    viewport(0, 0, 640, 360);
    +    clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT);
    +    WMatrix4x4 proj;
    +    proj.perspective(90, 1, 1, 40);
    +    useProgram(shaderProgram_);
    +    // Set projection matrix
    +    uniformMatrix4(pMatrixUniform_, proj);
    +    uniformMatrix4(cMatrixUniform_, jsMatrix_);
    +
    +    // Draw the scene
    +#if 0
    +    bindBuffer(ARRAY_BUFFER, triangleVertexPositionBuffer_);
    +    vertexAttribPointer(vertexPositionAttribute_, 3, FLOAT, false, 0, 0);
    +    bindBuffer(ARRAY_BUFFER, triangleVertexColorBuffer_);
    +    vertexAttribPointer(vertexColorAttribute_, 4, FLOAT, false, 0, 0);
    +    WMatrix4x4 modelMatrix1(
    +      1, 0, 0, 0,
    +      0, 1, 0, 0,
    +      0, 0, 1, 0,
    +      -2.0, 0, 0, 1
    +    );
    +    modelMatrix1.rotate(45, 0, 1, 0);
    +    uniformMatrix4fv(mvMatrixUniform_, false, modelMatrix1);
    +    drawArrays(TRIANGLES, 0, 3);
    +#endif
    +    bindBuffer(ARRAY_BUFFER, squareVertexPositionBuffer_);
    +    vertexAttribPointer(vertexPositionAttribute_, 3, FLOAT, false, 0, 0);
    +    bindBuffer(ARRAY_BUFFER, squareVertexColorBuffer_);
    +    vertexAttribPointer(vertexColorAttribute_, 4, FLOAT, false, 0, 0);
    +    WMatrix4x4 modelMatrix2(
    +      1, 0, 0, 0,
    +      0, 1, 0, 0,
    +      0, 0, 1, 0,
    +      0, 0, 0, 1
    +    );
    +    //modelMatrix2.rotate(45, 1, 0, 0);
    +    //modelMatrix2.translate(0, 0, -2);
    +    uniformMatrix4(mvMatrixUniform_, modelMatrix2);
    +    //drawArrays(TRIANGLE_STRIP, 0, 4);
    +    bindBuffer(ELEMENT_ARRAY_BUFFER, squareElementBuffer_);
    +    drawElements(TRIANGLE_STRIP, 4, DT_UNSIGNED_BYTE, 0);
    +
    +#if 0
    +    // now draw something textured
    +    useProgram(texShaderProgram_);
    +    uniformMatrix4fv(texPMatrixUniform_, false, projectionMatrix);
    +    //WMatrix4x4 mm3(
    +    //  2, 0, 0, 0,
    +     // 0, 1, 0, -2.5,
    +    //  0, 0, 1, 0,
    +    //  0, 0, 0, 1
    +    //  );
    +    WMatrix4x4 mm3;
    +    //mm3.scale(.5, 2, 1);
    +    mm3.rotate(45, 0, 0, 1);
    +
    +    uniformMatrix4fv(texMvMatrixUniform_, false, mm3.data());
    +    bindBuffer(ARRAY_BUFFER, textureCoordBuffer_);
    +    vertexAttribPointer(texCoordAttribute_, 2, FLOAT, false, 0, 0);
    +    activeTexture(TEXTURE0);
    +    bindTexture(TEXTURE_2D, texture_);
    +    uniform1i(texSamplerUniform_, 0);
    +
    +    bindBuffer(ARRAY_BUFFER, squareVertexPositionBuffer_);
    +    vertexAttribPointer(texVertexPositionAttribute_, 3, FLOAT, false, 0, 0);
    +    drawArrays(TRIANGLE_STRIP, 0, 4);
    +#endif
    +  }
    +
    +  void resizeGL(int width, int height)
    +  {
    +  }
    +private:
    +  Program shaderProgram_;
    +  AttribLocation vertexPositionAttribute_;
    +  AttribLocation vertexColorAttribute_;
    +  UniformLocation pMatrixUniform_;
    +  UniformLocation cMatrixUniform_;
    +  UniformLocation mvMatrixUniform_;
    +
    +  Program texShaderProgram_;
    +  AttribLocation texVertexPositionAttribute_;
    +  AttribLocation texCoordAttribute_;
    +  UniformLocation texPMatrixUniform_;
    +  UniformLocation texCMatrixUniform_;
    +  UniformLocation texMvMatrixUniform_;
    +  UniformLocation texSamplerUniform_;
    +
    +  JavaScriptMatrix4x4 jsMatrix_;
    +
    +  Buffer triangleVertexPositionBuffer_;
    +  Buffer triangleVertexColorBuffer_;
    +  Buffer squareVertexPositionBuffer_;
    +  Buffer squareVertexColorBuffer_;
    +  Buffer squareElementBuffer_;
    +
    +  Buffer textureCoordBuffer_;
    +  Texture texture_;
    +};
    +
    +/*
    + * A simple WebGL demo application
    + */
    +class WebGLDemo : public WApplication
    +{
    +public:
    +  WebGLDemo(const WEnvironment& env);
    +
    +};
    +
    +WebGLDemo::WebGLDemo(const WEnvironment& env)
    +  : WApplication(env)
    +{
    +  setTitle("WebGL Demo");
    +
    +  root()->addWidget(new WText("This is a preliminary WebGL demo. It will "
    +    "become more spectacular in time. This technology preview has only "
    +    "been tested on Chrome Canary builds. No 3D because I did "
    +    "not yet invest in 3D projection matrices."));
    +  root()->addWidget(new WBreak());
    +
    +  PaintWidget *gl = new PaintWidget(root());
    +  gl->resize(640, 640);
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new WebGLDemo(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +
    +  WGenericMatrix<double, 3, 6> gm1;
    +  WGenericMatrix<double, 3, 6> gm2(gm1);
    +  WGenericMatrix<double, 3, 6> gm3;
    +  WGenericMatrix<double, 6, 3> gm4;
    +  double foo[] = {1, 2, 3, 4};
    +  WGenericMatrix<double, 2, 2> gm5(foo);
    +  std::cout << gm5.constData()[0] << std::endl;
    +  std::cout << gm5(0, 0) << std::endl;
    +  std::cout << gm5 << std::endl;
    +  gm5.copyDataTo(foo);
    +  WGenericMatrix<double, 2, 2> const gm6(foo);
    +  std::cout << "equality test: " << (gm5 == gm6 ? "OK" : "NOK") << std::endl;
    +  std::cout << "inequality test: " << (gm5 != gm6 ? "NOK" : "OK") << std::endl;
    +  std::cout << gm5.data()[0] << std::endl;
    +  std::cout << gm6.constData()[0] << std::endl;
    +
    +  gm3.fill(42);
    +  std::cout << gm3 << std::endl;
    +  std::cout << gm3.transposed() << std::endl;
    +  std::cout << "isidentity non-square: " << (gm2.isIdentity() ? "OK" : "NOK") << std::endl;
    +  std::cout << "isidentity non-square: " << (!gm3.isIdentity() ? "OK" : "NOK") << std::endl;
    +  gm3.setToIdentity();
    +  std::cout << gm3 << std::endl;
    +  std::cout << "isidentity non-square: " << (gm3.isIdentity() ? "OK" : "NOK") << std::endl;
    +#if 1
    +  std::cout << gm1 << std::endl;
    +  gm3 = gm1 + gm2;
    +  std::cout << gm3 << std::endl;
    +  gm3 = gm1 - gm2;
    +  std::cout << gm3 << std::endl;
    +  gm3 = -gm2;
    +  std::cout << gm3 << std::endl;
    +  gm3 = gm2 * 2.0;
    +  std::cout << gm3 << std::endl;
    +  gm3 = gm2 / 2.0;
    +  std::cout << gm3 << std::endl;
    +  gm3 = 2.0 * gm2;
    +  std::cout << gm3 << std::endl;
    +  std::cout << gm3 * gm4 << std::endl;
    +  WGenericMatrix<double, 3, 3> gm7= gm3 * gm4;
    +#endif
    +  gm3 *= 2.0;
    +  std::cout << gm3 << std::endl;
    +  gm3 /= 2.0;
    +  std::cout << gm3 << std::endl;
    +  gm3 += gm1;
    +  std::cout << gm3 << std::endl;
    +  gm3 -= gm1;
    +  std::cout << gm3 << std::endl;
    +
    +
    +
    +  WMatrix4x4 m1;
    +  std::cout << m1 << std::endl;
    +  std::cout << "Determinant: " << m1.determinant() << std::endl;
    +  std::cout << "Inverted: ";
    +  std::cout << m1.inverted() << std::endl;
    +  std::cout << "Identity? " << m1.isIdentity() << std::endl;
    +
    +
    +  WMatrix4x4 m2;
    +  m2.rotate(0, 0, 0, 1);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(0, 0, 0, 2);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(0, 0, 2, 0);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(0, 2, 0, 0);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(0, 1, 1, 1);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(90, 1, 0, 0);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(-90, 1, 0, 0);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(45, 1, 0, 0);
    +  std::cout << m2 << std::endl;
    +  m2.rotate(-45, 1, 0, 0);
    +  std::cout << m2 << std::endl;
    +  WMatrix4x4 m3;
    +  m3 = m1 * m2;
    +  WMatrix4x4 m4(m1*m2);
    +  m3.setToIdentity();
    +  m3.lookAt(0, 0, 0, 0, 0, -1, 0, 1, 0);
    +  std::cout << m3 << std::endl;
    +  m3.setToIdentity();
    +  m3.lookAt(0, 0, 0, 0, 0, -2, 0, 8, 0);
    +  std::cout << m3 << std::endl;
    +  m3.setToIdentity();
    +  m3.lookAt(0, 0, -1, 0, 0, -2, 0, 1, 0);
    +  std::cout << m3 << std::endl;
    +  m3.setToIdentity();
    +  m3.lookAt(0, 0, 0, 0, 0, 0, 0, 1, 0);
    +  std::cout << m3 << std::endl;
    +  m3.setToIdentity();
    +  m3.lookAt(0, 0, 0,1, 1, 1, 0, 1, 0);
    +  std::cout << m3 << std::endl;
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/BasicControls.C b/wt-3.1.7a/examples/widgetgallery/BasicControls.C
    new file mode 100644
    index 0000000..6f86f41
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/BasicControls.C
    @@ -0,0 +1,408 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "BasicControls.h"
    +#include "EventDisplayer.h"
    +
    +#include <Wt/WAnchor>
    +#include <Wt/WBreak>
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WGroupBox>
    +#include <Wt/WImage>
    +#include <Wt/WIconPair>
    +#include <Wt/WLineEdit>
    +#include <Wt/WLength>
    +#include <Wt/WPanel>
    +#include <Wt/WProgressBar>
    +#include <Wt/WPushButton>
    +#include <Wt/WTable>
    +#include <Wt/WTabWidget>
    +#include <Wt/WTemplate>
    +#include <Wt/WText>
    +#include <Wt/WTree>
    +#include <Wt/WTreeNode>
    +#include <Wt/WTreeTable>
    +#include <Wt/WTreeTableNode>
    +
    +using namespace Wt;
    +
    +BasicControls::BasicControls(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("basics-intro"), this);
    +}
    +
    +void BasicControls::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("WContainerWidget", wContainerWidget());
    +  menu->addItem("WTemplate", wTemplate());
    +  menu->addItem("WText", wText());
    +  menu->addItem("WAnchor", wAnchor());
    +  menu->addItem("WBreak", wBreak());
    +  menu->addItem("WImage", wImage());
    +  menu->addItem("WGroupBox", wGroupBox());
    +  menu->addItem("WStackedWidget", wStackedWidget());
    +  menu->addItem("WTable", wTable());
    +  menu->addItem("WMenu", wMenu());
    +  menu->addItem("WTree", wTree());
    +  menu->addItem("WTreeTable", wTreeTable());
    +  menu->addItem("WPanel", wPanel());
    +  menu->addItem("WTabWidget", wTabWidget());
    +  menu->addItem("WProgressBar", wProgressBar());
    +}
    +
    +WWidget *BasicControls::wText()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WText", result);
    +  new WText(tr("basics-WText"), result);
    +  
    +  new WText("<p>This WText unexpectedly contains JavaScript, wich the "
    +	    "XSS attack preventer detects and disables. "
    +	    "<script>alert(\"You are under attack\");</script>"
    +	    "A warning is printed in Wt's log messages.</p>",
    +	    result);
    +    
    +  new WText("<p>This WText contains malformed XML <h1></h2>."
    +	    "It will be turned into a PlainText formatted string.</p>",
    +	    result);
    +
    +  new WText(tr("basics-WText-events"), result);
    +
    +  WText *text;
    +
    +  text = new WText("This text reacts to <tt>clicked()</tt><br/>",
    +		   result);
    +  text->setStyleClass("reactive");
    +  ed_->showSignal(text->clicked(), "Text was clicked");
    +
    +  text = new WText("This text reacts to <tt>doubleClicked()</tt><br/>",
    +		   result);
    +  text->setStyleClass("reactive");
    +  ed_->showSignal(text->doubleClicked(), "Text was double clicked");
    +
    +  text = new WText("This text reacts to <tt>mouseWentOver()</tt><br/>", result);
    +  text->setStyleClass("reactive");
    +  ed_->showSignal(text->mouseWentOver(), "Mouse went over text");
    +
    +  text = new WText("This text reacts to <tt>mouseWentOut()</tt><br/>", result);
    +  text->setStyleClass("reactive");
    +  ed_->showSignal(text->mouseWentOut(), "Mouse went out text");
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wTemplate()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WTemplate", result);
    +
    +  new WText(tr("basics-WTemplate"), result);
    +
    +  WTemplate *pre = new WTemplate("<pre>${text}</pre>", result);
    +  pre->bindString("text", tr("basics-WTemplate-example"), PlainText);
    +
    +  new WText(tr("basics-WTemplate2"), result);
    +
    +  WTemplate *temp = new WTemplate(tr("basics-WTemplate-example"), result);
    +
    +  temp->bindWidget("name-edit", new WLineEdit());
    +  temp->bindWidget("save-button", new WPushButton("Save"));
    +  temp->bindWidget("cancel-button", new WPushButton("Cancel"));
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wBreak()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WBreak", result);
    +
    +  new WText(tr("basics-WBreak"), result);
    +
    +  new WBreak(result); // does not really do anything useful :-)
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wAnchor()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WAnchor", result);
    +
    +  new WText(tr("basics-WAnchor"), result);
    +
    +  WAnchor *a1 = new WAnchor("http://www.webtoolkit.eu/",
    +			    "Wt homepage (in a new window)", result);
    +  a1->setTarget(TargetNewWindow);
    +
    +  new WText(tr("basics-WAnchor-more"), result);
    +
    +  WAnchor *a2 = new WAnchor("http://www.webtoolkit.eu/", result);
    +  a2->setTarget(TargetNewWindow);
    +  new WImage("icons/wt_powered.jpg", a2);
    +
    +  new WText(tr("basics-WAnchor-related"), result);
    +    
    +  return result;
    +}
    +
    +WWidget *BasicControls::wImage()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WImage", result);
    +
    +  new WText(tr("basics-WImage"), result);
    +
    +  new WText("An image: ", result);
    +  new WImage("icons/wt_powered.jpg", result);
    +
    +  new WText(tr("basics-WImage-more"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wTable()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTable", result);
    +  
    +  new WText(tr("basics-WTable"), result);
    +
    +  WTable *table = new WTable(result);
    +  table->setStyleClass("example-table");
    +
    +  new WText("First warning signal", table->elementAt(0, 0));
    +  new WText("09:25am", table->elementAt(0, 1));
    +  WImage *img = new WImage("icons/Pennant_One.png", table->elementAt(0, 2));
    +  img->resize(WLength::Auto, WLength(30, WLength::Pixel));
    +  new WText("First perparatory signal", table->elementAt(1, 0));
    +  new WText("09:26am", table->elementAt(1, 1));
    +  img = new WImage("icons/Pennant_One.png", table->elementAt(1, 2));
    +  img->resize(WLength::Auto, WLength(30, WLength::Pixel));
    +  img = new WImage("icons/Papa.png", table->elementAt(1, 2));
    +  img->resize(WLength::Auto, WLength(30, WLength::Pixel));
    +  new WText("Second perparatory signal", table->elementAt(2, 0));
    +  new WText("09:29am", table->elementAt(2, 1));
    +  img = new WImage("icons/Pennant_One.png", table->elementAt(2, 2));
    +  img->resize(WLength::Auto, WLength(30, WLength::Pixel));
    +  new WText("Start", table->elementAt(3, 0));
    +  new WText("09:30am", table->elementAt(3, 1));
    +
    +  new WText(tr("basics-WTable-more"), result);
    +
    +  return result;
    +}
    +
    +
    +WWidget *BasicControls::wTree()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTree", "WTreeNode", result);
    +
    +  new WText(tr("basics-WTree"), result);
    +
    +  WIconPair *folderIcon = new WIconPair("icons/yellow-folder-closed.png",
    +					"icons/yellow-folder-open.png", false);
    +
    +  WTree *tree = new WTree(result);
    +  tree->setSelectionMode(ExtendedSelection);
    +
    +  WTreeNode *node = new WTreeNode("Furniture", folderIcon);
    +  tree->setTreeRoot(node);
    +  node->label()->setTextFormat(PlainText);
    +  node->setLoadPolicy(WTreeNode::NextLevelLoading);
    +  node->addChildNode(new WTreeNode("Table"));
    +  node->addChildNode(new WTreeNode("Cupboard"));
    +
    +  WTreeNode *three = new WTreeNode("Chair");
    +  node->addChildNode(three);
    +  node->addChildNode(new WTreeNode("Coach"));
    +  node->expand();
    +  three->addChildNode(new WTreeNode("Doc"));
    +  three->addChildNode(new WTreeNode("Grumpy"));
    +  three->addChildNode(new WTreeNode("Happy"));
    +  three->addChildNode(new WTreeNode("Sneezy"));
    +  three->addChildNode(new WTreeNode("Dopey"));
    +  three->addChildNode(new WTreeNode("Bashful"));
    +  three->addChildNode(new WTreeNode("Sleepy"));
    +
    +  new WText(tr("basics-WTree-more"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wTreeTable()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTreeTable","WTreeTableNode", result);
    +  new WText(tr("basics-WTreeTable"), result);
    +
    +  WTreeTable *tt = new WTreeTable(result);
    +  tt->resize(650, 200);
    +  tt->tree()->setSelectionMode(ExtendedSelection);
    +  tt->addColumn("Yuppie Factor", 125);
    +  tt->addColumn("# Holidays", 125);
    +  tt->addColumn("Favorite Item", 125);
    +  WTreeTableNode *ttr = new WTreeTableNode("All Personnel");
    +  ttr->setImagePack("resources/");
    +  tt->setTreeRoot(ttr, "Emweb Organigram");
    +  WTreeTableNode *ttr1 = new WTreeTableNode("Upper Management", 0, ttr);
    +  WTreeTableNode *ttn;
    +  ttn = new WTreeTableNode("Chief Anything Officer", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("-2.8"));
    +  ttn->setColumnWidget(2, new WText("20"));
    +  ttn->setColumnWidget(3, new WText("Scepter"));
    +  ttn = new WTreeTableNode("Vice President of Parties", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("13.57"));
    +  ttn->setColumnWidget(2, new WText("365"));
    +  ttn->setColumnWidget(3, new WText("Flag"));
    +  ttn = new WTreeTableNode("Vice President of Staplery", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("3.42"));
    +  ttn->setColumnWidget(2, new WText("27"));
    +  ttn->setColumnWidget(3, new WText("Perforator"));
    +  ttr1 = new WTreeTableNode("Middle management", 0, ttr);
    +  ttn = new WTreeTableNode("Boss of the house", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("9.78"));
    +  ttn->setColumnWidget(2, new WText("35"));
    +  ttn->setColumnWidget(3, new WText("Happy Animals"));
    +  ttn = new WTreeTableNode("Xena caretaker", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("8.66"));
    +  ttn->setColumnWidget(2, new WText("10"));
    +  ttn->setColumnWidget(3, new WText("Yellow bag"));
    +  ttr1 = new WTreeTableNode("Actual Workforce", 0, ttr);
    +  ttn = new WTreeTableNode("The Dork", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("9.78"));
    +  ttn->setColumnWidget(2, new WText("22"));
    +  ttn->setColumnWidget(3, new WText("Mojito"));
    +  ttn = new WTreeTableNode("The Stud", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("8.66"));
    +  ttn->setColumnWidget(2, new WText("46"));
    +  ttn->setColumnWidget(3, new WText("Toothbrush"));
    +  ttn = new WTreeTableNode("The Ugly", 0, ttr1);
    +  ttn->setColumnWidget(1, new WText("13.0"));
    +  ttn->setColumnWidget(2, new WText("25"));
    +  ttn->setColumnWidget(3, new WText("Paper bag"));
    +  ttr->expand();
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wPanel()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WPanel", result);
    +
    +  new WText(tr("basics-WPanel"), result);
    +  WPanel *panel = new WPanel(result);
    +  panel->setCentralWidget(new WText("This is a default panel"));
    +  new WBreak(result);
    +  panel = new WPanel(result);
    +  panel->setTitle("My second WPanel.");
    +  panel->setCentralWidget(new WText("This is a panel with a title"));
    +  new WBreak(result);
    +  panel = new WPanel(result);
    +  panel->setTitle("My third WPanel");
    +  panel->setCentralWidget(new WText("This is a collapsible panel with "
    +				    "a title"));
    +  panel->setCollapsible(true);
    +
    +  new WText(tr("basics-WPanel-related"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wTabWidget()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTabWidget", result);
    +  new WText(tr("basics-WTabWidget"), result);    
    +  WTabWidget *tw = new WTabWidget(result);
    +  tw->addTab(new WText("These are the contents of the first tab"),
    +	     "Picadilly", WTabWidget::PreLoading);
    +  tw->addTab(new WText("The contents of these tabs are pre-loaded in "
    +		       "the browser to ensure swift switching."),
    +	     "Waterloo", WTabWidget::PreLoading);
    +  tw->addTab(new WText("This is yet another pre-loaded tab. "
    +		       "Look how good this works."),
    +	     "Victoria", WTabWidget::PreLoading);
    +  tw->addTab(new WText("The colors of the tab widget can be changed by "
    +		       "modifying some images."),
    +	     "Tottenham");
    +
    +  tw->setStyleClass("tabwidget");
    +
    +  new WText(tr("basics-WTabWidget-more"), result);    
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wContainerWidget()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WContainerWidget", result);
    +
    +  new WText(tr("basics-WContainerWidget"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wMenu()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WMenu", result);
    +  new WText(tr("basics-WMenu"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wGroupBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WGroupBox", result);
    +  new WText(tr("basics-WGroupBox"), result);
    +
    +  WGroupBox *gb = new WGroupBox("A group box", result);
    +  gb->addWidget(new WText(tr("basics-WGroupBox-contents")));
    +
    +  new WText(tr("basics-WGroupBox-related"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wStackedWidget()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WStackedWidget", result);
    +  new WText(tr("basics-WStackedWidget"), result);
    +
    +  return result;
    +}
    +
    +WWidget *BasicControls::wProgressBar()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WProgressBar", result);
    +
    +  result->addWidget(new WText(tr("basics-WProgressBar")));
    +  WProgressBar *pb = new WProgressBar(result);
    +  pb->setValue(27);
    +
    +  return result;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/BasicControls.h b/wt-3.1.7a/examples/widgetgallery/BasicControls.h
    new file mode 100644
    index 0000000..d945faf
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/BasicControls.h
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef BASIC_CONTROLS_H_
    +#define BASIC_CONTROLS_H_
    +
    +#include "ControlsWidget.h"
    +
    +class BasicControls : public ControlsWidget
    +{
    +public:
    +  BasicControls(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *wText();
    +  Wt::WWidget *wTemplate();
    +  Wt::WWidget *wBreak();
    +  Wt::WWidget *wAnchor();
    +  Wt::WWidget *wImage();
    +  Wt::WWidget *wTable();
    +  Wt::WWidget *wTree();
    +  Wt::WWidget *wTreeTable();
    +  Wt::WWidget *wPanel();
    +  Wt::WWidget *wTabWidget();
    +  Wt::WWidget *wContainerWidget();
    +  Wt::WWidget *wMenu();
    +  Wt::WWidget *wGroupBox();
    +  Wt::WWidget *wStackedWidget();
    +  Wt::WWidget *wProgressBar();
    +};
    +
    +#endif // BASIC_CONTROLS_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/CMakeLists.txt b/wt-3.1.7a/examples/widgetgallery/CMakeLists.txt
    new file mode 100644
    index 0000000..1689d9b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/CMakeLists.txt
    @@ -0,0 +1,43 @@
    +WT_ADD_EXAMPLE(widgetgallery.wt
    +  main.C
    +  BasicControls.C
    +  ChartWidgets.C
    +  ControlsWidget.C
    +  DialogWidgets.C
    +  EventsDemo.C
    +  EventDisplayer.C
    +  WidgetGallery.C
    +  ExtWidgets.C
    +  FormWidgets.C
    +  GraphicsWidgets.C
    +  SpecialPurposeWidgets.C
    +  MvcWidgets.C
    +  Validators.C
    +  StyleLayout.C
    +  PaintBrush.C
    +  EmwebLoadingIndicator.C
    +  ../charts/ChartsExample.C
    +  ../charts/ChartConfig.C
    +  ../charts/CsvUtil.C
    +  ../charts/PanelList.C
    +  ../dragdrop/Character.C
    +  ../dragdrop/DragExample.C
    +  ../painting/PaintExample.C
    +  ../painting/ShapesWidget.C
    +  ../treeview/TreeViewExample.C
    +)
    +TARGET_LINK_LIBRARIES(widgetgallery.wt wtext)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +  ../charts
    +  ../dragdrop
    +  ../painting
    +  ../treeview
    +)
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/widgetgallery/ChartWidgets.C b/wt-3.1.7a/examples/widgetgallery/ChartWidgets.C
    new file mode 100644
    index 0000000..ecf1b1f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ChartWidgets.C
    @@ -0,0 +1,56 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ChartWidgets.h"
    +#include "ChartsExample.h"
    +#include "DeferredWidget.h"
    +
    +#include <Wt/WText>
    +#include <Wt/WBreak>
    +
    +using namespace Wt;
    +
    +ChartWidgets::ChartWidgets(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("charts-intro"), this);
    +  new WText(tr("charts-introduction"), this);
    +}
    +
    +void ChartWidgets::populateSubMenu(Wt::WMenu *menu)
    +{
    +  menu->addItem("Category Charts",
    +		deferCreate(boost::bind(&ChartWidgets::category, this)));
    +  menu->addItem("Scatter Plots",
    +		deferCreate(boost::bind(&ChartWidgets::scatterplot, this)));
    +  menu->addItem("Pie Charts",
    +		deferCreate(boost::bind(&ChartWidgets::pie, this)));
    +}
    +
    +WWidget *ChartWidgets::category()
    +{
    +  WContainerWidget *retval = new WContainerWidget(0);
    +  topic("Chart::WCartesianChart", retval);
    +  new CategoryExample(retval);
    +  return retval;
    +}
    +
    +WWidget *ChartWidgets::scatterplot()
    +{
    +  WContainerWidget *retval = new WContainerWidget(0);
    +  topic("Chart::WCartesianChart", retval);
    +  new TimeSeriesExample(retval);
    +  new ScatterPlotExample(retval);
    +  return retval;
    +}
    +
    +WWidget *ChartWidgets::pie()
    +{
    +  WContainerWidget *retval = new WContainerWidget(0);
    +  topic("Chart::WPieChart", retval);
    +  new PieExample(retval);
    +  return retval;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/ChartWidgets.h b/wt-3.1.7a/examples/widgetgallery/ChartWidgets.h
    new file mode 100644
    index 0000000..46ae18b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ChartWidgets.h
    @@ -0,0 +1,26 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef CHARTWIDGETS_H_
    +#define CHARTWIDGETS_H_
    +
    +#include "ControlsWidget.h"
    +
    +class ChartWidgets : public ControlsWidget
    +{
    +public:
    +  ChartWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *category();
    +  Wt::WWidget *scatterplot();
    +  Wt::WWidget *pie();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/ControlsWidget.C b/wt-3.1.7a/examples/widgetgallery/ControlsWidget.C
    new file mode 100644
    index 0000000..7040fb8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ControlsWidget.C
    @@ -0,0 +1,104 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ControlsWidget.h"
    +#include <Wt/WText>
    +#include <sstream>
    +
    +#include <boost/algorithm/string.hpp>
    +
    +using namespace Wt;
    +
    +ControlsWidget::ControlsWidget(EventDisplayer *ed, bool hasSubMenu)
    +  : WContainerWidget(),
    +    ed_(ed),
    +    hasSubMenu_(hasSubMenu)
    +{ }
    +
    +void ControlsWidget::populateSubMenu(Wt::WMenu *menu)
    +{
    +  
    +}
    +
    +std::string ControlsWidget::escape(const std::string &name) const
    +{
    +  std::stringstream ss;
    +  for(unsigned int i = 0; i < name.size(); ++i) {
    +    if (name[i] != ':') {
    +      ss << name[i];
    +    } else {
    +      ss << "_1";
    +    }
    +  }
    +  return ss.str();
    +}
    +
    +std::string ControlsWidget::docAnchor(const std::string &classname) const
    +{
    +  std::stringstream ss;
    +
    +#if !defined(WT_TARGET_JAVA)
    +  ss << "<a href=\"http://www.webtoolkit.eu/wt/doc/reference/html/class"
    +     << escape("Wt::" + classname)
    +     << ".html\" target=\"_blank\">doc</a>";
    +#else
    +  std::string cn = boost::replace_all(classname, "Chart::","chart/");
    +  ss << "<a href=\"http://www.webtoolkit.eu/"
    +     << "jwt/latest/doc/javadoc/eu/webtoolkit/jwt/"
    +     << classname
    +    << ".html\" target=\"_blank\">doc</a>";
    +#endif
    +
    +  return ss.str();
    +}
    +
    +std::string ControlsWidget::title(const std::string& classname) const
    +{
    +  std::string cn;
    +#if defined(WT_TARGET_JAVA)
    +    cn = boost::replace_all(classname, "Chart::","");
    +#else
    +    cn = classname;
    +#endif
    +
    +    return std::string("<span class=\"title\">") + cn + "</span> "
    +      + "<span class=\"doc\">["
    +      + docAnchor(classname) + "]</span>";
    +}
    +
    +void ControlsWidget::topic(const std::string &classname,
    +			   WContainerWidget *parent) const
    +{
    +  new WText(title(classname) + "<br/>", parent);
    +}
    +
    +void ControlsWidget::topic(const std::string &classname1,
    +			   const std::string &classname2,
    +			   WContainerWidget *parent) const
    +{
    +  new WText(title(classname1) + " and " + title(classname2) + "<br/>",
    +            parent);
    +}
    +
    +void ControlsWidget::topic(const std::string &classname1,
    +			   const std::string &classname2,
    +			   const std::string &classname3,
    +			   WContainerWidget *parent) const
    +{
    +  new WText(title(classname1) + ", " + title(classname2) + " and "
    +	    + title(classname3) + "<br/>", parent);
    +}
    +
    +void ControlsWidget::topic(const std::string &classname1,
    +			   const std::string &classname2,
    +			   const std::string &classname3,
    +			   const std::string &classname4,
    +			   WContainerWidget *parent) const
    +{
    +  new WText(title(classname1) + ", " + title(classname2) + ", "
    +	    + title(classname3) + " and " + title(classname4) + "<br/>",
    +            parent);
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/ControlsWidget.h b/wt-3.1.7a/examples/widgetgallery/ControlsWidget.h
    new file mode 100644
    index 0000000..2770475
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ControlsWidget.h
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef CONTROLS_WIDGET_H_
    +#define CONTROLS_WIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WMenu>
    +#include <string>
    +
    +#include "ControlsWidget.h"
    +
    +class EventDisplayer;
    +
    +class ControlsWidget : public Wt::WContainerWidget
    +{
    +public:
    +  ControlsWidget(EventDisplayer *ed, bool hasSubMenu);
    +
    +  bool hasSubMenu() const { return hasSubMenu_; }
    +
    +  virtual void populateSubMenu(Wt::WMenu *menu);
    +
    +  // Inserts the classname in the parent, with a link to the
    +  // documentation
    +  void topic(const std::string &classname, WContainerWidget *parent) const;
    +  void topic(const std::string &classname1,
    +	     const std::string &classname2,
    +	     WContainerWidget *parent) const;
    +  void topic(const std::string &classname1,
    +	     const std::string &classname2,
    +	     const std::string &classname3,
    +	     WContainerWidget *parent) const;
    +  void topic(const std::string &classname1,
    +	     const std::string &classname2,
    +	     const std::string &classname3,
    +	     const std::string &classname4,
    +	     WContainerWidget *parent) const;
    +
    +protected:
    +  EventDisplayer *ed_;
    +
    +private:
    +  bool hasSubMenu_;
    +
    +  std::string docAnchor(const std::string &classname) const;
    +  std::string title(const std::string &classname) const;
    +  std::string escape(const std::string &name) const;
    +};
    +
    +#endif // CONTROLS_WIDGET_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/DeferredWidget.h b/wt-3.1.7a/examples/widgetgallery/DeferredWidget.h
    new file mode 100644
    index 0000000..53dc38d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/DeferredWidget.h
    @@ -0,0 +1,49 @@
    +#ifndef DEFERRED_WIDGET_H_
    +#define DEFERRED_WIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +/*
    + * A utility container widget which defers creation of its single
    + * child widget until the container is loaded (which is done on-demand
    + * by a WMenu). The constructor takes the create function for the
    + * widget as a parameter.
    + *
    + * We use this to defer widget creation until needed, which also defers
    + * loading auxiliary javascript libraries.
    + */
    +#if !defined(WT_TARGET_JAVA)
    +template <typename Function>
    +class DeferredWidget : public Wt::WContainerWidget
    +{
    +public:
    +  DeferredWidget(Function f)
    +    : f_(f) { }
    +
    +private:
    +  void load() {
    +    addWidget(f_());
    +    WContainerWidget::load();
    +  }
    +
    +  Function f_;
    +};
    +
    +template <typename Function>
    +DeferredWidget<Function> *deferCreate(Function f)
    +{
    +  return new DeferredWidget<Function>(f);
    +}
    +#else
    +class DeferredWidget : public Wt::WContainerWidget {
    +public:
    +  DeferredWidget(boost::bound f) {}
    +};
    +DeferredWidget *deferCreate(boost::bound b) 
    +{
    +  return new DeferredWidget(b);
    +}
    +
    +#endif
    +
    +#endif // DEFERRED_WIDGET_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/DialogWidgets.C b/wt-3.1.7a/examples/widgetgallery/DialogWidgets.C
    new file mode 100644
    index 0000000..d1eda8c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/DialogWidgets.C
    @@ -0,0 +1,336 @@
    +#include "DialogWidgets.h"
    +#include "EventDisplayer.h"
    +#include "DeferredWidget.h"
    +
    +#include <Wt/WText>
    +#include <Wt/WBreak>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/Ext/Button>
    +#include <Wt/Ext/Dialog>
    +#include <Wt/Ext/MessageBox>
    +#include <Wt/Ext/ProgressDialog>
    +#include <Wt/WBorderLayout>
    +#include <Wt/WFitLayout>
    +#include <Wt/WApplication>
    +#include <Wt/WString>
    +#ifdef WIN32
    +#include <windows.h>
    +#undef MessageBox
    +#endif
    +
    +using namespace Wt;
    +
    +NonModalDialog::NonModalDialog(const WString& title, EventDisplayer *ed)
    +  : WDialog(title)
    +{  
    +  setModal(false);
    +
    +  new WText("You can freely format the contents of a WDialog by "
    +	    "adding any widget you want to it.<br/>Here, we added WText, "
    +	    "WLineEdit and WPushButton to a dialog", contents());
    +  new WBreak(contents());
    +  new WText("Enter your name: ", contents());
    +  edit_ = new WLineEdit(contents());
    +  new WBreak(contents());
    +  ok_ = new WPushButton("Ok", contents());
    +
    +  edit_->enterPressed().connect(this, &NonModalDialog::welcome);
    +  ok_->clicked().connect(this, &NonModalDialog::welcome);
    +
    +  ed_ = ed;
    +}
    +
    +DialogWidgets::DialogWidgets(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("dialogs-intro"), this);
    +}
    +
    +void DialogWidgets::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("WDialog", wDialog());
    +  menu->addItem("WMessageBox", wMessageBox());
    +#ifndef WT_TARGET_JAVA
    +  menu->addItem("Ext Dialogs",
    +		deferCreate(boost::bind(&DialogWidgets::eDialogs, this)));
    +#endif
    +}
    +
    +WWidget *DialogWidgets::wDialog()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WDialog", result);
    +  new WText(tr("dialogs-WDialog"), result);
    +  WPushButton *button = new WPushButton("Modal dialog", result);
    +  button->clicked().connect(this, &DialogWidgets::customModal);
    +
    +  button = new WPushButton("Non-modal dialog", result);
    +  button->clicked().connect(this, &DialogWidgets::customNonModal);
    +
    +  return result;
    +}
    +
    +WWidget *DialogWidgets::wMessageBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WMessageBox", result);
    +  new WText(tr("dialogs-WMessageBox"),
    +	    result);
    +  
    +  WContainerWidget *ex = new WContainerWidget(result);
    +  
    +  WVBoxLayout *vLayout = new WVBoxLayout();
    +  ex->setLayout(vLayout, AlignTop);
    +  vLayout->setContentsMargins(0, 0, 0, 0);
    +  vLayout->setSpacing(3);
    +
    +  WPushButton *button;
    +  vLayout->addWidget(button = new WPushButton("One liner"));
    +  button->clicked().connect(this, &DialogWidgets::messageBox1);
    +  vLayout->addWidget(button = new WPushButton("Show some buttons"));
    +  button->clicked().connect(this, &DialogWidgets::messageBox2);
    +  vLayout->addWidget(button = new WPushButton("Need confirmation"));
    +  button->clicked().connect(this, &DialogWidgets::messageBox3);
    +  vLayout->addWidget(button = new WPushButton("Discard"));
    +  button->clicked().connect(this, &DialogWidgets::messageBox4);
    +
    +  return result;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WWidget *DialogWidgets::eDialogs()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::Dialog", "Ext::MessageBox", "Ext::ProgressDialog", result);
    +  new WText(tr("dialogs-ExtDialog"), result);
    +  WContainerWidget *ex = new WContainerWidget(result);
    +  
    +  WVBoxLayout *vLayout = new WVBoxLayout();
    +  ex->setLayout(vLayout, AlignTop);
    +  vLayout->setContentsMargins(0, 0, 0, 0);
    +  vLayout->setSpacing(3);
    +  
    +  
    +  WPushButton *button;
    +  
    +  vLayout->addWidget(button = new WPushButton("Ext Message Box"));
    +  button->clicked().connect(this, &DialogWidgets::createExtMessageBox);
    +  vLayout->addWidget(button = new WPushButton("Ext Dialog"));
    +  button->clicked().connect(this, &DialogWidgets::createExtDialog);
    +  vLayout->addWidget(button = new WPushButton("Ext Progress Bar"));
    +  button->clicked().connect(this, &DialogWidgets::createExtProgress);
    +
    +  return result;
    +}
    +#endif
    +
    +void DialogWidgets::messageBox1()
    +{
    +  WMessageBox::show("Information",
    +		    "One-liner dialogs have a simple constructor", Ok);
    +  ed_->setStatus("Ok'ed");
    +}
    +
    +void DialogWidgets::messageBox2()
    +{
    +  messageBox_
    +    = new WMessageBox("Question",
    +		      "This is a modal dialog that invokes a signal when a button is pushed",
    +		      NoIcon, Yes | No | Cancel);
    +
    +  messageBox_
    +    ->buttonClicked().connect(this, &DialogWidgets::messageBoxDone);
    +
    +  messageBox_->show();
    +}
    +
    +void DialogWidgets::messageBox3()
    +{
    +  StandardButton
    +    result = WMessageBox::show("Push it",
    +			       "Yes/No questions can be tested by "
    +			       "checking show()'s return value",
    +			       Ok | Cancel);
    +
    +  if (result == Ok)
    +    ed_->setStatus("Accepted!");
    +  else
    +    ed_->setStatus("Cancelled!");
    +}
    +
    +void DialogWidgets::messageBox4()
    +{
    +  messageBox_
    +    = new WMessageBox("Your work",
    +		      "Provide your own button text.<br/>"
    +		      "Your work is not saved",
    +		      NoIcon, NoButton);
    +
    +  messageBox_->addButton("Cancel modifications", Cancel);
    +  messageBox_->addButton("Continue modifying work", Ok);
    +
    +  messageBox_
    +    ->buttonClicked().connect(this, &DialogWidgets::messageBoxDone);
    +
    +  messageBox_->show();
    +}
    +
    +void DialogWidgets::messageBoxDone(StandardButton result)
    +{
    +  switch (result) {
    +  case Ok:
    +    ed_->setStatus("Ok'ed"); break;
    +  case Cancel:
    +    ed_->setStatus("Cancelled!"); break;
    +  case Yes:
    +    ed_->setStatus("Me too!"); break;
    +  case No:
    +    ed_->setStatus("Me neither!"); break;
    +  default:
    +    ed_->setStatus("Unkonwn result?");
    +  }
    +
    +  delete messageBox_;
    +  messageBox_ = 0;
    +}
    +
    +void DialogWidgets::customNonModal()
    +{
    +   NonModalDialog *dialog = new NonModalDialog("Personalia (non-modal)", ed_);
    +   dialog->show();
    +}
    +
    +void DialogWidgets::customModal()
    +{
    +  WDialog dialog("Personalia (modal)");
    +  dialog.setModal(true);
    +
    +  new WText("You can freely format the contents of a WDialog by "
    +	    "adding any widget you want to it.<br/>Here, we added WText, "
    +	    "WLineEdit and WPushButton to a dialog", dialog.contents());
    +  new WBreak(dialog.contents());
    +  new WText("Enter your name: ", dialog.contents());
    +  WLineEdit edit(dialog.contents());
    +  new WBreak(dialog.contents());
    +  WPushButton ok("Ok", dialog.contents());
    +
    +  edit.enterPressed().connect(&dialog, &WDialog::accept);
    +  ok.clicked().connect(&dialog, &WDialog::accept);
    +
    +  if (dialog.exec() == WDialog::Accepted) {
    +    ed_->setStatus("Welcome, " + edit.text());
    +  }
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void DialogWidgets::createExtMessageBox()
    +{
    +  Ext::MessageBox *mb = new Ext::MessageBox();
    +
    +  mb->setWindowTitle("Wt is magnificent");
    +  mb->setText("Isn't Wt the ruler of them all?");
    +
    +  mb->setButtons(Wt::Yes);
    +  mb->finished().connect(this, &DialogWidgets::deleteExtDialog);
    +
    +  mb->show();
    +
    +  extDialog_ = mb;
    +}
    +
    +void DialogWidgets::createExtDialog()
    +{
    +  Ext::Dialog *d = new Ext::Dialog();
    +  d->setWindowTitle("Ext::Dialog with WBorderLayout");
    +  d->resize(400,300);
    +  d->setStyleClass("dialog");
    +
    +  Ext::Button *okButton = new Ext::Button("Ok");
    +  okButton->activated().connect(d, &Ext::Dialog::accept);
    +  d->addButton(okButton);
    +  okButton->setDefault(true);
    +
    +  Ext::Button *cancelButton = new Ext::Button("Cancel");
    +  cancelButton->activated().connect(d, &Ext::Dialog::reject);
    +  d->addButton(cancelButton);
    +
    +  WBorderLayout *layout = new WBorderLayout();
    +  d->setLayout(layout);
    +
    +  Ext::Panel *west = new Ext::Panel();
    +  west->setTitle("West");
    +  west->setResizable(true);
    +  west->setCollapsible(true);
    +  west->resize(100, WLength::Auto);
    +  west->setLayout(new WFitLayout());
    +  west->layout()->addWidget(new WText("This is a resizable and collapsible "
    +				      "panel"));
    +  layout->addWidget(west, WBorderLayout::West);
    +
    +  Ext::Panel *center = new Ext::Panel();
    +  center->setTitle("Center");
    +
    +  WBorderLayout *nestedLayout = new WBorderLayout();
    +  center->setLayout(nestedLayout);
    +
    +  Ext::Panel *nestedNorth = new Ext::Panel();
    +  nestedLayout->addWidget(nestedNorth, WBorderLayout::North);
    +  nestedNorth->resize(WLength::Auto, 70);
    +  nestedNorth->layout()->addWidget(
    +    new WText("Ext Dialogs, like Wt Dialogs, can contain any widget. This "
    +	      "is a dialog with a layout manager. The left pane can be "
    +	      "resized."));
    +
    +  Ext::Panel *nestedCenter = new Ext::Panel();
    +  nestedLayout->addWidget(nestedCenter, WBorderLayout::Center);
    +  nestedCenter->layout()->addWidget(new WText("This is simply WText, but "
    +					      "could have been any widget."));
    +
    +  layout->addWidget(center, WBorderLayout::Center);
    +
    +  d->show();
    +  extDialog_ = d;
    +  extDialog_->finished().connect(this, &DialogWidgets::deleteExtDialog);
    +}
    +
    +void DialogWidgets::createExtProgress()
    +{
    +  Ext::ProgressDialog d("Please wait while calculating Pi ...", "Cancel", 0, 7);
    +  d.setWindowTitle("Calculator");
    +
    +  d.show();
    +
    +  for (unsigned i = 0; i < 7; ++i) {
    +    d.setValue(i);
    +    wApp->processEvents();
    +
    +    if (!d.wasCanceled()) {
    +      /* Do some work ... */
    +#ifdef WIN32
    +      Sleep(1000);
    +#else
    +      sleep(1);
    +#endif
    +    } else {
    +      Ext::MessageBox
    +	::show("Operation cancelled",
    +	       "It does not matter, Pi is overrated", Ok);
    +      break;
    +    }
    +  }
    +}
    +
    +void DialogWidgets::deleteExtDialog()
    +{
    +  if (extDialog_->result() == Ext::Dialog::Accepted) {
    +    ed_->setStatus("Ext dialog accecpted");
    +  } else {
    +    ed_->setStatus("Ext dialog rejected");
    +  }
    +  delete extDialog_;
    +}
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/DialogWidgets.h b/wt-3.1.7a/examples/widgetgallery/DialogWidgets.h
    new file mode 100644
    index 0000000..1ed11c0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/DialogWidgets.h
    @@ -0,0 +1,78 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef DIALOGWIDGETS_H_
    +#define DIALOGWIDGETS_H_
    +
    +#include <Wt/WMessageBox>
    +#include <Wt/WDialog>
    +#include <Wt/WString>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +
    +#include "ControlsWidget.h"
    +#include "EventDisplayer.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +    class Dialog;
    +  }
    +}
    +
    +class NonModalDialog : public Wt::WDialog
    +{
    +public:
    +  NonModalDialog(const Wt::WString& title, EventDisplayer *ed);
    +  
    +private:
    +  Wt::WLineEdit *edit_;
    +  Wt::WPushButton *ok_;
    +
    +  EventDisplayer *ed_;
    +
    +  void welcome() {
    +    ed_->setStatus("Welcome, " + edit_->text());
    +    setHidden(true);
    +  }
    +};
    +
    +class DialogWidgets : public ControlsWidget
    +{
    +public:
    +  DialogWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *wDialog();
    +  Wt::WWidget *wMessageBox();
    +  Wt::WWidget *eDialogs();
    +
    +  void messageBox1();
    +  void messageBox2();
    +  void messageBox3();
    +  void messageBox4();
    +  void customModal();
    +  void customNonModal();
    +
    +  void messageBoxDone(Wt::StandardButton result);
    +
    +  void setStatus(const Wt::WString& text);
    +
    +  Wt::WMessageBox *messageBox_;
    +  Wt::WText *status_;
    +
    +#ifndef WT_TARGET_JAVA
    +  void createExtDialog();
    +  void createExtMessageBox();
    +  void createExtProgress();
    +  void deleteExtDialog();
    +  Wt::Ext::Dialog *extDialog_;
    +#endif
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.C b/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.C
    new file mode 100644
    index 0000000..223a38a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.C
    @@ -0,0 +1,65 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "EmwebLoadingIndicator.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WText"
    +
    +using namespace Wt;
    +
    +EmwebLoadingIndicator::EmwebLoadingIndicator()
    +{
    +  setInline(false);
    +
    +  WApplication *app = WApplication::instance();
    +
    +  cover_ = new WContainerWidget(this);
    +  center_ = new WContainerWidget(this);
    +
    +  WImage *img = new WImage("icons/emweb.jpg", center_);
    +  img->setMargin(7, Top | Bottom);
    +
    +  text_ = new WText("Loading...", center_);
    +  text_->setInline(false);
    +  text_->setMargin(WLength::Auto, Left | Right);
    +
    +  if (app->environment().agentIsIE())
    +    app->styleSheet().addRule("body", "height: 100%; margin: 0;");
    +
    +    app->styleSheet().addRule("div#" + cover_->id(), std::string() +
    +			      "background: #DDDDDD;"
    +			      "height: 100%; width: 100%;"
    +			      "top: 0px; left: 0px;"
    +			      "opacity: 0.5; position: absolute;"
    +			      "-khtml-opacity: 0.5;"
    +			      "z-index: 10000;" +
    +			      (app->environment().agentIsIE() ?
    +			       "filter: alpha(opacity=50);"
    +			       :
    +			       "-moz-opacity:0.5;"
    +			       "-moz-background-clip: -moz-initial;"
    +			       "-moz-background-origin: -moz-initial;"
    +			       "-moz-background-inline-policy: -moz-initial;"
    +			       ));
    +
    +    app->styleSheet().addRule("div#" + center_->id(),
    +			      "background: white;"
    +			      "border: 3px solid #333333;"
    +			      "z-index: 10001; visibility: visible;"
    +			      "position: absolute; left: 50%; top: 50%;"
    +			      "margin-left: -120px; margin-top: -60px;"
    +			      "width: 240px; height: 120px;"
    +			      "font-family: arial,sans-serif;"
    +			      "text-align: center");
    +}
    +
    +void EmwebLoadingIndicator::setMessage(const WString& text)
    +{
    +  text_->setText(text);
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.h b/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.h
    new file mode 100644
    index 0000000..d25a3ee
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EmwebLoadingIndicator.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EMWEB_LOADING_INDICATOR_H_
    +#define EMWEB_LOADING_INDICATOR_H_
    +
    +#include <Wt/WText>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WLoadingIndicator>
    +
    +class EmwebLoadingIndicator : public Wt::WContainerWidget, 
    +			      public Wt::WLoadingIndicator
    +{
    +public:
    +  EmwebLoadingIndicator();
    +
    +  virtual Wt::WWidget *widget() { return this; }
    +  virtual void setMessage(const Wt::WString& text);
    +
    +private:
    +  Wt::WContainerWidget *cover_;
    +  Wt::WContainerWidget *center_;
    +  Wt::WText            *text_;
    +};
    +
    +#endif // EMWEB_LOADING_INDICATOR_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/EventDisplayer.C b/wt-3.1.7a/examples/widgetgallery/EventDisplayer.C
    new file mode 100644
    index 0000000..f713765
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EventDisplayer.C
    @@ -0,0 +1,48 @@
    +#include "EventDisplayer.h"
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +EventDisplayer::EventDisplayer(WContainerWidget *parent):
    +  WContainerWidget(parent),
    +  eventCount_(0),
    +  text_(new WText("Events will be shown here.", this))
    +{
    +  setStyleClass("events");
    +}
    +
    +void EventDisplayer::showSignal(Signal<WString>& signal,
    +				const std::string& data)
    +{
    +  signal.connect(boost::bind(&EventDisplayer::showWStringSignal,
    +			     this, data, _1));
    +}
    +
    +void EventDisplayer::showSignalImpl(const std::string& str)
    +{
    +  showEventImpl("Last activated signal: " + str);
    +}
    +
    +void EventDisplayer::showWStringSignal(const std::string& str,
    +				       const WString& wstr)
    +{
    +  showEventImpl("Last activated signal: " + str + wstr);
    +}
    +
    +void EventDisplayer::setStatus(const WString &msg)
    +{
    +  showEventImpl("Last status message: " + msg);
    +}
    +
    +void EventDisplayer::showEventImpl(const WString& str)
    +{
    +  if (str == lastEventStr_) {
    +    ++eventCount_;
    +    text_->setText(str + " (" + boost::lexical_cast<std::string>(eventCount_)
    +		   + " times)");
    +  } else {
    +    lastEventStr_ = str;
    +    eventCount_ = 1;
    +    text_->setText(str);
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/EventDisplayer.h b/wt-3.1.7a/examples/widgetgallery/EventDisplayer.h
    new file mode 100644
    index 0000000..1442de2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EventDisplayer.h
    @@ -0,0 +1,52 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EVENTDISPLAYER_H_
    +#define EVENTDISPLAYER_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WText;
    +}
    +
    +class EventDisplayer: public Wt::WContainerWidget
    +{
    +public:
    +  EventDisplayer(WContainerWidget *parent);
    +
    +  // Print a message on the displayer
    +  void setStatus(const Wt::WString& msg);
    +
    +  void showSignal(Wt::Signal<Wt::WString>& s, const std::string& data);
    +  template<typename T> void showSignal(T &s, const std::string& str);
    +  template<typename T> void showEvent(T &s, const Wt::WString& str);
    +
    +private:
    +  Wt::WString lastEventStr_;
    +  int eventCount_;
    +  Wt::WText *text_;
    +
    +  void showWStringSignal(const std::string& str, const Wt::WString& wstr);
    +  void showSignalImpl(const std::string& str);
    +  void showEventImpl(const Wt::WString& str);
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +template<typename T>
    +void EventDisplayer::showSignal(T &s, const std::string& str)
    +{
    +  s.connect(boost::bind(&EventDisplayer::showSignalImpl, this, str));
    +}
    +
    +template<typename T>
    +void EventDisplayer::showEvent(T &s, const Wt::WString& str)
    +{
    +  s.connect(boost::bind(&EventDisplayer::showEventImpl, this, str));
    +}
    +#endif
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/EventsDemo.C b/wt-3.1.7a/examples/widgetgallery/EventsDemo.C
    new file mode 100644
    index 0000000..bf49238
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EventsDemo.C
    @@ -0,0 +1,324 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "EventsDemo.h"
    +
    +#include <Wt/WText>
    +#include <Wt/WBreak>
    +#include <Wt/WCssDecorationStyle>
    +#include <sstream>
    +#include <boost/lexical_cast.hpp>
    +#include <Wt/WLineEdit>
    +#include <Wt/WHBoxLayout>
    +#include "DragExample.h"
    +
    +using namespace Wt;
    +
    +EventsDemo::EventsDemo(EventDisplayer *ed)
    +  : ControlsWidget(ed, true),
    +    keyEventRepeatCounter_(0)
    +{
    +  new WText(tr("events-intro"), this);
    +}
    +
    +void EventsDemo::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("WKeyEvent", wKeyEvent());
    +  menu->addItem("WMouseEvent", wMouseEvent());
    +  menu->addItem("WDropEvent", wDropEvent());
    +}
    +
    +WWidget *EventsDemo::wKeyEvent()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WKeyEvent", result);
    +  new WText(tr("events-WKeyEvent-1"), result);
    +  WLineEdit *l = new WLineEdit(result);
    +  l->setTextSize(50);
    +  l->keyWentUp().connect(this, &EventsDemo::showKeyWentUp);
    +  l->keyWentDown().connect(this, &EventsDemo::showKeyWentDown);
    +  
    +  new WText(tr("events-WKeyEvent-2"), result);
    +  l = new WLineEdit(result);
    +  l->setTextSize(50);
    +  l->keyPressed().connect(this, &EventsDemo::showKeyPressed);
    +  
    +  new WText(tr("events-WKeyEvent-3"), result);
    +  l = new WLineEdit(result);
    +  l->setTextSize(50);
    +  l->enterPressed().connect(this, &EventsDemo::showEnterPressed);
    +  l->escapePressed().connect(this, &EventsDemo::showEscapePressed);
    +  new WBreak(result);
    +  new WText("Last event: ", result);
    +  keyEventType_ = new WText(result);
    +  new WBreak(result);
    +  keyEventDescription_ = new WText(result);
    +
    +  return result;
    +}
    +
    +WWidget *EventsDemo::wMouseEvent()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WMouseEvent", result);
    +  new WText(tr("events-WMouseEvent"), result);
    +  WContainerWidget *c = new WContainerWidget(result);
    +  WHBoxLayout *hlayout = new WHBoxLayout;
    +  c->setLayout(hlayout);
    +  WContainerWidget *l = new WContainerWidget;
    +  WContainerWidget *r = new WContainerWidget;
    +  new WText("clicked<br/>doubleClicked<br/>mouseWentOut<br/>mouseWentOver",
    +	    l);
    +  new WText("mouseWentDown<br/>mouseWentUp<br/>mouseMoved<br/>mouseWheel", r);
    +  hlayout->addWidget(l);
    +  hlayout->addWidget(r);
    +  c->resize(600, 300);
    +  l->decorationStyle().setBackgroundColor(Wt::gray);
    +  r->decorationStyle().setBackgroundColor(Wt::gray);
    +  // prevent that firefox interprets drag as drag&drop action
    +  l->setStyleClass("unselectable");
    +  r->setStyleClass("unselectable");
    +  l->clicked().connect(this, &EventsDemo::showClicked);
    +  l->doubleClicked().connect(this, &EventsDemo::showDoubleClicked);
    +  l->mouseWentOut().connect(this, &EventsDemo::showMouseWentOut);
    +  l->mouseWentOver().connect(this, &EventsDemo::showMouseWentOver);
    +  r->mouseMoved().connect(this, &EventsDemo::showMouseMoved);
    +  r->mouseWentUp().connect(this, &EventsDemo::showMouseWentUp);
    +  r->mouseWentDown().connect(this, &EventsDemo::showMouseWentDown);
    +  r->mouseWheel().connect(this, &EventsDemo::showMouseWheel);
    +  r->mouseWheel().preventDefaultAction(true);
    +  new WBreak(result);
    +  new WText("Last event: ", result);
    +  mouseEventType_ = new WText(result);
    +  new WBreak(result);
    +  mouseEventDescription_ = new WText(result);
    +
    +  return result;
    +}
    +
    +WWidget *EventsDemo::wDropEvent()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WDropEvent", result);
    +  new WText(tr("events-WDropEvent"), result);
    +  new DragExample(result);
    +
    +  return result;
    +}
    +
    +namespace {
    +  std::ostream &operator<<(std::ostream &o, Wt::WMouseEvent::Button b)
    +  {
    +    switch (b) {
    +    case WMouseEvent::LeftButton:
    +      return o << "LeftButton";
    +    case WMouseEvent::RightButton:
    +      return o << "LeftButton";
    +    case WMouseEvent::MiddleButton:
    +      return o << "LeftButton";
    +    default:
    +      return o << "Unknown Button";
    +    }
    +  }
    +
    +  std::ostream &operator<<(std::ostream &o, Wt::Key k)
    +  {
    +    switch(k) {
    +    default:
    +    case Key_unknown : return o << "Key_unknown";
    +    case Key_Enter : return o << "Key_Enter";
    +    case Key_Tab : return o << "Key_Tab";
    +    case Key_Backspace : return o << "Key_Backspace";
    +    case Key_Shift : return o << "Key_Shift";
    +    case Key_Control : return o << "Key_Control";
    +    case Key_Alt : return o << "Key_Alt";
    +    case Key_PageUp : return o << "Key_PageUp";
    +    case Key_PageDown : return o << "Key_PageDown";
    +    case Key_End : return o << "Key_End";
    +    case Key_Home : return o << "Key_Home";
    +    case Key_Left : return o << "Key_Left";
    +    case Key_Up : return o << "Key_Up";
    +    case Key_Right : return o << "Key_Right";
    +    case Key_Down : return o << "Key_Down";
    +    case Key_Insert : return o << "Key_Insert";
    +    case Key_Delete : return o << "Key_Delete";
    +    case Key_Escape : return o << "Key_Escape";
    +    case Key_F1 : return o << "Key_F1";
    +    case Key_F2 : return o << "Key_F2";
    +    case Key_F3 : return o << "Key_F3";
    +    case Key_F4 : return o << "Key_F4";
    +    case Key_F5 : return o << "Key_F5";
    +    case Key_F6 : return o << "Key_F6";
    +    case Key_F7 : return o << "Key_F7";
    +    case Key_F8 : return o << "Key_F8";
    +    case Key_F9 : return o << "Key_F9";
    +    case Key_F10 : return o << "Key_F10";
    +    case Key_F11 : return o << "Key_F11";
    +    case Key_F12 : return o << "Key_F12";
    +    case Key_Space : return o << "Key_Space";
    +    case Key_A : return o << "Key_A";
    +    case Key_B : return o << "Key_B";
    +    case Key_C : return o << "Key_C";
    +    case Key_D : return o << "Key_D";
    +    case Key_E : return o << "Key_E";
    +    case Key_F : return o << "Key_F";
    +    case Key_G : return o << "Key_G";
    +    case Key_H : return o << "Key_H";
    +    case Key_I : return o << "Key_I";
    +    case Key_J : return o << "Key_J";
    +    case Key_K : return o << "Key_K";
    +    case Key_L : return o << "Key_L";
    +    case Key_M : return o << "Key_M";
    +    case Key_N : return o << "Key_N";
    +    case Key_O : return o << "Key_O";
    +    case Key_P : return o << "Key_P";
    +    case Key_Q : return o << "Key_Q";
    +    case Key_R : return o << "Key_R";
    +    case Key_S : return o << "Key_S";
    +    case Key_T : return o << "Key_T";
    +    case Key_U : return o << "Key_U";
    +    case Key_V : return o << "Key_V";
    +    case Key_W : return o << "Key_W";
    +    case Key_X : return o << "Key_X";
    +    case Key_Y : return o << "Key_Y";
    +    case Key_Z : return o << "Key_Z";
    +    }
    +  }
    +
    +  std::ostream &operator<<(std::ostream &o, Wt::WMouseEvent::Coordinates c)
    +  {
    +    return o << c.x << ", " << c.y;
    +  }
    +  std::string modifiersToString(const WFlags< KeyboardModifier >& modifiers)
    +  {
    +    std::stringstream o;
    +    if (modifiers & ShiftModifier) o << "Shift ";
    +    if (modifiers & ControlModifier) o << "Control ";
    +    if (modifiers & AltModifier) o << "Alt ";
    +    if (modifiers & MetaModifier) o << "Meta ";
    +    if (modifiers == 0) o << "No modifiers";
    +    return o.str();
    +  }
    +}
    +
    +void EventsDemo::setKeyType(const std::string &type, const WKeyEvent *e)
    +{
    +  std::string repeatString = "";
    +  if (lastKeyType_ == type) {
    +    keyEventRepeatCounter_++;
    +    repeatString = " ("
    +      + boost::lexical_cast<std::string>(keyEventRepeatCounter_) + " times)";
    +  } else {
    +    lastKeyType_ = type;
    +    keyEventRepeatCounter_ = 0;
    +  }
    +  keyEventType_->setText(type + repeatString);
    +  if (e) {
    +    describe(*e);
    +  } else {
    +    keyEventDescription_->setText("");
    +  }
    +}
    +
    +void EventsDemo::showKeyWentUp(const WKeyEvent &e)
    +{
    +  setKeyType("keyWentUp", &e);
    +}
    +
    +void EventsDemo::showKeyWentDown(const WKeyEvent &e)
    +{
    +  setKeyType("keyWentDown", &e);
    +}
    +
    +void EventsDemo::showKeyPressed(const WKeyEvent &e)
    +{
    +  setKeyType("keyPressed", &e);
    +}
    +
    +void EventsDemo::showEnterPressed()
    +{
    +  setKeyType("enterPressed");
    +}
    +
    +void EventsDemo::showEscapePressed()
    +{
    +  setKeyType("escapePressed");
    +}
    +
    +void EventsDemo::describe(const Wt::WKeyEvent &e)
    +{
    +  std::stringstream ss;
    +  ss << "Key: " << e.key() << "<br/>"
    +     << "Modifiers: " << modifiersToString(e.modifiers()) << "<br/>"
    +     << "Char code: " << (int)e.charCode() << "<br/>"
    +     << "text: " << e.text() << "<br/>";
    +  keyEventDescription_->setText(ss.str());
    +}
    +
    +void EventsDemo::showClicked(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("clicked");
    +  describe(e);
    +}
    +
    +void EventsDemo::showDoubleClicked(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("doubleClicked");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseWentOut(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseWentOut");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseWheel(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseWheel");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseWentOver(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseWentOver");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseMoved(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseMoved");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseWentUp(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseWentUp");
    +  describe(e);
    +}
    +
    +void EventsDemo::showMouseWentDown(const WMouseEvent &e)
    +{
    +  mouseEventType_->setText("mouseWentDown");
    +  describe(e);
    +}
    +
    +void EventsDemo::describe(const Wt::WMouseEvent &e)
    +{
    +  std::stringstream ss;
    +  ss << "Button: " << e.button() << "<br/>"
    +     << "Modifiers: " << modifiersToString(e.modifiers()) << "<br/>"
    +     << "Document coordinates: " << e.document() << "<br/>"
    +     << "Window coordinates: " << e.window() << "<br/>"
    +     << "Screen coordinates: " << e.screen() << "<br/>"
    +     << "Widget coordinates: " << e.widget() << "<br/>"
    +     << "DragDelta coordinates: " << e.dragDelta() << "<br/>"
    +     << "Wheel delta: " << e.wheelDelta() << "<br/>";
    +  mouseEventDescription_->setText(ss.str());
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/EventsDemo.h b/wt-3.1.7a/examples/widgetgallery/EventsDemo.h
    new file mode 100644
    index 0000000..6774d89
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/EventsDemo.h
    @@ -0,0 +1,59 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef EVENTSDEMO_H_
    +#define EVENTSDEMO_H_
    +
    +#include "ControlsWidget.h"
    +
    +namespace Wt {
    +  class WMouseEvent;
    +  class WKeyEvent;
    +  class WText;
    +}
    +
    +class EventsDemo : public ControlsWidget
    +{
    +public:
    +  EventsDemo(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *wKeyEvent();
    +  Wt::WWidget *wMouseEvent();
    +  Wt::WWidget *wDropEvent();
    +
    +  void showKeyWentUp(const Wt::WKeyEvent &e);
    +  void showKeyWentDown(const Wt::WKeyEvent &e);
    +  void showKeyPressed(const Wt::WKeyEvent &e);
    +  void showEnterPressed();
    +  void showEscapePressed();
    +  void describe(const Wt::WKeyEvent &e);
    +  void setKeyType(const std::string &type, const Wt::WKeyEvent *e = 0);
    +  Wt::WText *keyEventType_;
    +  Wt::WText *keyEventDescription_;
    +  std::string lastKeyType_;
    +  unsigned int keyEventRepeatCounter_;
    +
    +  void showClicked(const Wt::WMouseEvent &e);
    +  void showDoubleClicked(const Wt::WMouseEvent &e);
    +  void showMouseWentOut(const Wt::WMouseEvent &e);
    +  void showMouseWentOver(const Wt::WMouseEvent &e);
    +  void showMouseMoved(const Wt::WMouseEvent &e);
    +  void showMouseWentUp(const Wt::WMouseEvent &e);
    +  void showMouseWentDown(const Wt::WMouseEvent &e);
    +  void showMouseWheel(const Wt::WMouseEvent &e);
    +
    +  Wt::WText *mouseEventType_;
    +  Wt::WText *mouseEventDescription_;
    +
    +  void describe(const Wt::WMouseEvent &e);
    +};
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/ExtWidgets.C b/wt-3.1.7a/examples/widgetgallery/ExtWidgets.C
    new file mode 100644
    index 0000000..28051c1
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ExtWidgets.C
    @@ -0,0 +1,276 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "ExtWidgets.h"
    +#include "EventDisplayer.h"
    +#include "DeferredWidget.h"
    +
    +#include <Wt/Ext/Button>
    +#include <Wt/Ext/LineEdit>
    +#include <Wt/Ext/ComboBox>
    +#include <Wt/Ext/CheckBox>
    +#include <Wt/Ext/RadioButton>
    +#include <Wt/Ext/Calendar>
    +#include <Wt/Ext/DateField>
    +#include <Wt/Ext/Menu>
    +#include <Wt/Ext/ToolBar>
    +#include <Wt/Ext/NumberField>
    +#include <Wt/WButtonGroup>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +using namespace Wt::Ext;
    +
    +ExtWidgets::ExtWidgets(EventDisplayer *ed):
    +  ControlsWidget(ed, true)
    +{
    +  new WText(tr("ext-intro"), this);
    +}
    +
    +void ExtWidgets::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("Ext::Button",
    +		deferCreate(boost::bind(&ExtWidgets::eButton, this)));
    +  menu->addItem("Ext::LineEdit",
    +		deferCreate(boost::bind(&ExtWidgets::eLineEdit, this)));
    +  menu->addItem("Ext::NumberField",
    +		deferCreate(boost::bind(&ExtWidgets::eNumberField, this)));
    +  menu->addItem("Ext::CheckBox",
    +		deferCreate(boost::bind(&ExtWidgets::eCheckBox, this)));
    +  menu->addItem("Ext::ComboBox",
    +		deferCreate(boost::bind(&ExtWidgets::eComboBox, this)));
    +  menu->addItem("Ext::RadioButton",
    +		deferCreate(boost::bind(&ExtWidgets::eRadioButton, this)));
    +  menu->addItem("Ext::Calendar",
    +		deferCreate(boost::bind(&ExtWidgets::eCalendar, this)));
    +  menu->addItem("Ext::DateField",
    +		deferCreate(boost::bind(&ExtWidgets::eDateField, this)));
    +  menu->addItem("Ext::Menu/ToolBar",
    +		deferCreate(boost::bind(&ExtWidgets::eMenu, this)));
    +  menu->addItem("Ext::Dialog",
    +		deferCreate(boost::bind(&ExtWidgets::eDialog, this)));
    +  //menu->addItem("Ext::Splitter", new WText("TODO: Ext::Splitter"));
    +}
    +
    +WWidget *ExtWidgets::eButton()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::Button", result);
    +  new WText(tr("ext-Button"), result);
    +
    +  WContainerWidget *ex = new WContainerWidget(result);
    +  WVBoxLayout *vLayout = new WVBoxLayout();
    +  ex->setLayout(vLayout, AlignTop);
    +  vLayout->setContentsMargins(0, 0, 0, 0);
    +  vLayout->setSpacing(3);
    +
    +  Button *button;
    +  vLayout->addWidget(button = new Button("Push me!"));
    +  ed_->showSignal(button->clicked(), "Ext::Button clicked");
    +  vLayout->addWidget(button = new Button("Checkable button"));
    +  button->setCheckable(true);
    +  ed_->showSignal(button->clicked(), "Ext::Button (checkable) clicked");
    +  vLayout->addWidget(button = new Button("Button with icon"));
    +  button->setIcon("icons/yellow-folder-open.png");
    +  ed_->showSignal(button->clicked(), "Ext::Button (with icon) clicked");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eLineEdit()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::LineEdit", result);
    +
    +  new WText(tr("ext-LineEdit"), result);
    +  LineEdit *le;
    +  le = new LineEdit(result);
    +  le->setTextSize(50);
    +  ed_->showSignal(le->keyWentUp(), "Ext::LineEdit keyWentUp");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eNumberField()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::NumberField", result);
    +
    +  new WText(tr("ext-NumberField"), result);
    +  new WText("Total amount to pay: ", result);
    +  NumberField *nf = new NumberField(result);
    +  nf->setDecimalPrecision(2);
    +  nf->setInline(true);
    +  ed_->showSignal(nf->keyPressed(), "Ext::NumberField keyPressed");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eCheckBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::CheckBox", result);
    +  
    +  new WText(tr("ext-CheckBox"), result);
    +  CheckBox *cb;
    +  cb = new CheckBox("Check me!", result);
    +  ed_->showSignal(cb->checked(), "Ext::CheckBox checked");
    +  cb = new CheckBox("Check me too!", result);
    +  cb->setChecked(true);
    +  ed_->showSignal(cb->checked(), "Ext::CheckBox too checked");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eComboBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::ComboBox", result);
    +
    +  new WText(tr("ext-ComboBox"), result);
    +  ComboBox *cb = new ComboBox(result);
    +  cb->addItem("Stella");
    +  cb->addItem("Duvel");
    +  cb->addItem("Sloeber");
    +  cb->addItem("Westmalle");
    +  cb->addItem("Kwak");
    +  cb->addItem("Hoegaarden");
    +  cb->addItem("Palm");
    +  cb->addItem("Westvleteren");
    +  cb->setCurrentIndex(1);
    +  ed_->showSignal(cb->activated(), "Ext::ComboBox activated");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eRadioButton()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::RadioButton", result);
    +
    +  new WText(tr("ext-RadioButton"), result);
    +  WButtonGroup *bg = new WButtonGroup(result);
    +  RadioButton *rb;
    +  rb = new RadioButton("Kitchen", result);
    +  bg->addButton(rb);
    +  ed_->showSignal(rb->checked(), "Ext::RadioButton Kitchen checked");
    +  rb = new RadioButton("Dining room", result);
    +  bg->addButton(rb);
    +  ed_->showSignal(rb->checked(), "Ext::RadioButton Dining Room checked");
    +  rb = new RadioButton("Garden", result);
    +  bg->addButton(rb);
    +  ed_->showSignal(rb->checked(), "Ext::RadioButton Garden checked");
    +  rb = new RadioButton("Attic", result);
    +  bg->addButton(rb);
    +  ed_->showSignal(rb->checked(), "Ext::RadioButton Attic checked");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eCalendar()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::Calendar", result);
    +
    +  new WText(tr("ext-Calendar"), result);
    +  Calendar *c = new Calendar(false, result);
    +  ed_->showSignal(c->selectionChanged(), "Ext::Calendar selectionChanged");
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eDateField()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::DateField", result);
    +
    +  new WText(tr("ext-DateField"), result);
    +  DateField *df = new DateField(result);
    +  df->setFormat("ddd MMM d yyyy");
    +  df->setTextSize(25);
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eMenu()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::Menu", "Ext::ToolBar", result);
    +
    +  new WText(tr("ext-Menu"), result);
    +  Ext::Menu *menu = new Ext::Menu();
    +  Ext::MenuItem *item;
    +
    +  item = menu->addItem("File open...");
    +  item->setIcon("icons/yellow-folder-open.png");
    +
    +  item = menu->addItem("I dig Wt");
    +  item->setCheckable(true);
    +  item->setChecked(true);
    +  
    +  item = menu->addItem("I dig Wt too");
    +  item->setCheckable(true);
    +
    +  menu->addSeparator();
    +  menu->addItem("Menu item");
    +  menu->addSeparator();
    +
    +  // Add a sub menu
    +
    +  Ext::Menu *subMenu = new Ext::Menu();
    +  subMenu->addItem("Do this");
    +  subMenu->addItem("And that");
    +  
    +  item = menu->addMenu("More ...", subMenu);
    +  item->setIcon("icons/yellow-folder-open.png");
    +  
    +  // Create a tool bar
    +  
    +  Ext::ToolBar *toolBar = new Ext::ToolBar(result);
    +  
    +  Ext::Button *b
    +    = toolBar->addButton("Button w/Menu", menu);
    +  b->setIcon("icons/yellow-folder-closed.png");
    +  
    +  toolBar->addButton("Button");
    +  
    +  toolBar->addSeparator();
    +  toolBar->addButton("Separated");
    +  toolBar->addSeparator();
    +  Ext::Button *button = toolBar->addButton("Toggle me");
    +  button->setCheckable(true);
    +  
    +  Ext::ComboBox *cb = new Ext::ComboBox();
    +  cb->addItem("Winter");
    +  cb->addItem("Spring");
    +  cb->addItem("Summer");
    +  cb->addItem("Autumn");
    +  toolBar->add(cb);
    +
    +  return result;
    +}
    +
    +WWidget *ExtWidgets::eDialog()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Ext::Dialog", "Ext::MessageBox", "Ext::ProgressDialog", result);
    +
    +  new WText(tr("ext-Dialog"), result);
    +
    +  return result;
    +}
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/ExtWidgets.h b/wt-3.1.7a/examples/widgetgallery/ExtWidgets.h
    new file mode 100644
    index 0000000..ed6d876
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/ExtWidgets.h
    @@ -0,0 +1,35 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef EXTWIDGETS_H_
    +#define EXTWIDGETS_H_
    +
    +#include <string>
    +
    +#include "ControlsWidget.h"
    +
    +class ExtWidgets : public ControlsWidget
    +{
    +public:
    +  ExtWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *eButton();
    +  Wt::WWidget *eLineEdit();
    +  Wt::WWidget *eNumberField();
    +  Wt::WWidget *eCheckBox();
    +  Wt::WWidget *eComboBox();
    +  Wt::WWidget *eRadioButton();
    +  Wt::WWidget *eCalendar();
    +  Wt::WWidget *eDateField();
    +  Wt::WWidget *eMenu();
    +  Wt::WWidget *eDialog();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/FormWidgets.C b/wt-3.1.7a/examples/widgetgallery/FormWidgets.C
    new file mode 100644
    index 0000000..896454a
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/FormWidgets.C
    @@ -0,0 +1,418 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "FormWidgets.h"
    +#include "EventDisplayer.h"
    +#include "DeferredWidget.h"
    +
    +#include <Wt/WBreak>
    +#include <Wt/WButtonGroup>
    +#include <Wt/WCalendar>
    +#include <Wt/WCheckBox>
    +#include <Wt/WComboBox>
    +#include <Wt/WDatePicker>
    +#include <Wt/WFileUpload>
    +#include <Wt/WInPlaceEdit>
    +#include <Wt/WLineEdit>
    +#include <Wt/WProgressBar>
    +#include <Wt/WPushButton>
    +#include <Wt/WRadioButton>
    +#include <Wt/WSelectionBox>
    +#include <Wt/WSpinBox>
    +#include <Wt/WSuggestionPopup>
    +#include <Wt/WText>
    +#include <Wt/WTextArea>
    +#include <Wt/WTextEdit>
    +#include <Wt/WStandardItem>
    +#include <Wt/WPopupMenu>
    +#include <Wt/WPopupMenuItem>
    +#include <Wt/WLabel>
    +
    +using namespace Wt;
    +
    +FormWidgets::FormWidgets(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("formwidgets-intro"), this);
    +}
    +
    +void FormWidgets::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("WPushButton", wPushButton());
    +  menu->addItem("WCheckBox", wCheckBox());
    +  menu->addItem("WRadioButton", wRadioButton());
    +  menu->addItem("WComboBox", wComboBox());
    +  menu->addItem("WSelectionBox", wSelectionBox());
    +  menu->addItem("WLineEdit", wLineEdit());
    +  menu->addItem("WSpinBox", wSpinBox());
    +  menu->addItem("WTextArea", wTextArea());
    +  menu->addItem("WCalendar", wCalendar());
    +  menu->addItem("WDatePicker", wDatePicker());
    +  menu->addItem("WInPlaceEdit", wInPlaceEdit());
    +  menu->addItem("WSuggestionPopup", wSuggestionPopup());
    +  menu->addItem("WTextEdit",
    +		deferCreate(boost::bind(&FormWidgets::wTextEdit, this)));
    +  menu->addItem("WFileUpload", wFileUpload());
    +#ifndef WT_TARGET_JAVA
    +  menu->addItem("WPopupMenu", wPopupMenu());
    +#endif
    +}
    +
    +WWidget *FormWidgets::wPushButton()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WPushButton", result);
    +  new WText(tr("formwidgets-WPushButton"), result);
    +  WPushButton *pb = new WPushButton("Click me!", result);
    +  ed_->showSignal(pb->clicked(), "WPushButton click");
    +
    +  new WText(tr("formwidgets-WPushButton-more"), result);
    +  pb = new WPushButton("Try to click me...", result);
    +  pb->setEnabled(false);
    +  
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wCheckBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WCheckBox", result);
    +  new WText(tr("formwidgets-WCheckBox"), result);
    +  WCheckBox *cb = new WCheckBox("Check me!", result);
    +  cb->setChecked(true);
    +  ed_->showSignal(cb->checked(), "'Check me!' checked");
    +  new WBreak(result);
    +  cb = new WCheckBox("Check me too!", result);
    +  ed_->showSignal(cb->checked(), "'Check me too!' checked");
    +  new WBreak(result);
    +  cb = new WCheckBox("Check me, I'm tristate!", result);
    +  cb->setTristate();
    +  cb->setCheckState(PartiallyChecked);
    +  ed_->showSignal(cb->checked(), "'Check me, I'm tristate!' checked");
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wRadioButton()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WRadioButton", result);
    +  new WText(tr("formwidgets-WRadioButton"), result);
    +  WRadioButton *rb = 0;
    +  rb = new WRadioButton("Radio me!", result);
    +  ed_->showSignal(rb->checked(), "'Radio me!' checked (not in buttongroup)");
    +  new WBreak(result);
    +  rb = new WRadioButton("Radio me too!", result);
    +  ed_->showSignal(rb->checked(), "'Radio me too!' checked "
    +		 "(not in buttongroup)");
    +  
    +  new WText(tr("formwidgets-WRadioButton-group"), result);
    +  WButtonGroup *wgb = new WButtonGroup(result);
    +  rb = new WRadioButton("Radio me!", result);
    +  ed_->showSignal(rb->checked(), "'Radio me!' checked");
    +  wgb->addButton(rb);
    +  new WBreak(result);
    +  rb = new WRadioButton("No, radio me!", result);
    +  ed_->showSignal(rb->checked(), "'No, Radio me!' checked");
    +  wgb->addButton(rb);
    +  new WBreak(result);
    +  rb = new WRadioButton("Nono, radio me!", result);
    +  ed_->showSignal(rb->checked(), "'Nono, radio me!' checked");
    +  wgb->addButton(rb);
    +
    +  wgb->setSelectedButtonIndex(0);
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wComboBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WComboBox", result);
    +  new WText(tr("formwidgets-WComboBox"), result);
    +  WComboBox *cb = new WComboBox(result);
    +  cb->addItem("Heavy");
    +  cb->addItem("Medium");
    +  cb->addItem("Light");
    +  cb->setCurrentIndex(1); // select 'Medium'
    +  ed_->showSignal(cb->sactivated(), "Combo-box 1 activated: ");
    +
    +  new WText(tr("formwidgets-WComboBox-model"), result);
    +  
    +  new WText(tr("formwidgets-WComboBox-style"), result);
    +  WComboBox *colorCb = new WComboBox(result);
    +  WStandardItemModel* model = new WStandardItemModel(colorCb);
    +  model->insertColumns(0, 3);
    +  addColorElement(model, "Red", "combo-red");
    +  addColorElement(model, "Blue", "combo-blue");
    +  addColorElement(model, "Green", "combo-green");
    +  colorCb->setModel(model);
    +  colorCb->setCurrentIndex(0); // select 'Red'
    +  ed_->showSignal(colorCb->sactivated(), "Combo-box 2 activated: ");
    +
    +  return result;
    +}
    +
    +void FormWidgets::addColorElement(WStandardItemModel* model,
    +				  std::string name, 
    +				  std::string style)
    +{
    +  WStandardItem* item = new WStandardItem(name);
    +  item->setStyleClass(style);
    +  model->appendRow(item);
    +}
    +
    +
    +WWidget *FormWidgets::wSelectionBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WSelectionBox", result);
    +  new WText(tr("formwidgets-WSelectionBox"), result);
    +  WSelectionBox *sb1 = new WSelectionBox(result);
    +  sb1->addItem("Heavy");
    +  sb1->addItem("Medium");
    +  sb1->addItem("Light");
    +  sb1->setCurrentIndex(1); // Select 'medium'
    +  ed_->showSignal(sb1->sactivated(), "SelectionBox activated: ");
    +  new WText("<p>... or multiple options (use shift and/or ctrl-click "
    +	    "to select your pizza toppings)</p>", result);
    +  WSelectionBox *sb2 = new WSelectionBox(result);
    +  sb2->addItem("Bacon");
    +  sb2->addItem("Cheese");
    +  sb2->addItem("Mushrooms");
    +  sb2->addItem("Green peppers");
    +  sb2->addItem("Red peppers");
    +  sb2->addItem("Ham");
    +  sb2->addItem("Pepperoni");
    +  sb2->addItem("Turkey");
    +  sb2->setSelectionMode(ExtendedSelection);
    +  std::set<int> selection;
    +  selection.insert(1);
    +  selection.insert(2);
    +  selection.insert(5);
    +  sb2->setSelectedIndexes(selection);
    +  ed_->showSignal(sb2->changed(), "SelectionBox 2 changed");
    +
    +  new WText(tr("formwidgets-WSelectionBox-model"), result);
    +  
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wLineEdit()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WLineEdit", result);
    +  new WText(tr("formwidgets-WLineEdit"), result);
    +
    +  WLineEdit *le = new WLineEdit(result);
    +  le->setEmptyText("Edit me");
    +  ed_->showSignal(le->keyWentUp(), "Line edit key up event");
    +
    +  new WText("<p>The line edit on the following line reacts on the "
    +	    "enter button:</p>", result);
    +
    +  le = new WLineEdit(result);
    +  ed_->showSignal(le->enterPressed(), "Line edit enter pressed event");
    +
    +  new WText(tr("formwidgets-WLineEdit-more"), result);
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wSpinBox()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WSpinBox", result);
    +  new WText(tr("formwidgets-WSpinBox"), result);
    +
    +  new WText("Enter a number between 0 and 100: ", result);
    +  WSpinBox *le = new WSpinBox(result);
    +  ed_->showSignal(le->changed(), "Spin box value changed");
    +  le->setValue(30);
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wTextArea()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTextArea", result);
    +  new WText(tr("formwidgets-WTextArea"), result);
    +
    +  WTextArea *ta = new WTextArea(result);
    +  ta->setColumns(80);
    +  ta->setRows(15);
    +  ta->setText(tr("formwidgets-WTextArea-contents"));
    +  ed_->showSignal(ta->changed(), "Text area changed");
    + 
    +  new WText(tr("formwidgets-WTextArea-related"), result);
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wCalendar()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WCalendar", result);
    +
    +  new WText(tr("formwidgets-WCalendar"), result);
    +
    +  WCalendar *c = new WCalendar(result);
    +  ed_->showSignal(c->selectionChanged(), "First calendar's selection changed");
    +  new WText("<p>A flag indicates if multiple dates can be selected...</p>",
    +	    result);
    +  WCalendar *c2 = new WCalendar(result);
    +  c2->setSelectionMode(ExtendedSelection);
    +  ed_->showSignal(c2->selectionChanged(), "Second calendar's selection changed");
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wDatePicker()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WDatePicker", result);
    +  new WText("<p>The <tt>WDatePicker</tt> allows the entry of a date.</p>",
    +	    result);
    +
    +  WDatePicker* dp1 = new WDatePicker(result);
    +  ed_->showSignal(dp1->lineEdit()->changed(), "Date picker 1 changed");
    +  new WText("(format " + dp1->format() + ")", result);
    +  
    +  new WBreak(result);
    +  
    +  WDatePicker* dp2 = new WDatePicker(result);
    +  ed_->showSignal(dp2->lineEdit()->changed(), "Date picker 2 changed");
    +  dp2->setFormat("dd MM yyyy");
    +  new WText("(format " + dp2->format() + ")", result);
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wInPlaceEdit()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WInPlaceEdit", result);
    +  new WText("<p>This widget allows you to edit a text in-place by clicking "
    +	    "on it. You can enable the save/cancel buttons (like here below) "
    +	    "or disable them (as used in the <tt>WCalendar</tt> widget to edit "
    +	    "the year).</p>",
    +	    result);
    +  new WText("Try it here: ", result);
    +  WInPlaceEdit *ipe = new WInPlaceEdit("This is editable text", result);
    +  ipe->setStyleClass("in-place-edit");
    +  ed_->showSignal(ipe->valueChanged(), "In-place edit changed: ");
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wSuggestionPopup()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WSuggestionPopup", result);
    +  new WText(tr("formwidgets-WSuggestionPopup"), result);
    +
    +  // options for email address suggestions
    +  WSuggestionPopup::Options contactOptions;
    +  contactOptions.highlightBeginTag = "<span class=\"highlight\">";
    +  contactOptions.highlightEndTag = "</span>";
    +  contactOptions.listSeparator = ',';
    +  contactOptions.whitespace = " \\n";
    +  contactOptions.wordSeparators = "-., \"@\\n;";
    +  contactOptions.appendReplacedText = ", ";
    +
    +  WSuggestionPopup *sp =
    +    new WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
    +			 WSuggestionPopup::generateReplacerJS(contactOptions),
    +			 result);
    +  WLineEdit *le = new WLineEdit(result);
    +  le->setTextSize(50);
    +  le->setInline(false);
    +  sp->forEdit(le);
    +  sp->addSuggestion("John Tech <techie@mycompany.com>",
    +		    "John Tech <techie@mycompany.com>");
    +  sp->addSuggestion("Johnny Cash <cash@mycompany.com>", 
    +		    "Johnny Cash <cash@mycompany.com>");
    +  sp->addSuggestion("John Rambo <rambo@mycompany.com>",
    +		    "John Rambo <rambo@mycompany.com>");
    +  sp->addSuggestion("Johanna Tree <johanna@mycompany.com>",
    +		    "Johanna Tree <johanna@mycompany.com>");
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wTextEdit()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTextEdit", result);
    +  new WText("<p>The <tt>WTextEdit</tt> is a full-featured editor for rich text"
    +	    "editing. It is based on the TinyMCE editor, which must be "
    +	    "downloaded separately from its author's website. The TinyMCE "
    +	    "toolbar layout and plugins can be configured through Wt's "
    +	    "interface. The default, shown below, covers only a small "
    +	    "portion of TinyMCE's capabilities.</p>", result);
    +  WTextEdit *te = new WTextEdit(result);
    +  ed_->showSignal(te->changed(), "Text edit changed");
    +
    +  return result;
    +}
    +
    +WWidget *FormWidgets::wFileUpload()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WFileUpload", result);
    +  new WText(tr("formwidgets-WFileUpload"), result);
    +  WFileUpload *const fu = new WFileUpload(result);
    +  fu->setProgressBar(new WProgressBar());
    +  fu->changed().connect(fu, &WFileUpload::upload);
    +  ed_->showSignal(fu->changed(), "File upload changed");
    +  ed_->showSignal(fu->uploaded(), "File upload finished");
    +  new WText(tr("formwidgets-WFileUpload-more"), result);
    +
    +  return result;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WWidget *FormWidgets::wPopupMenu()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WPopupMenu", "WPopupMenuItem", result);
    +  new WText(tr("formwidgets-WPopupMenu"), result);
    +
    +  WPopupMenu *popup = new WPopupMenu();
    +  popup->addItem("icons/house.png", "Build a house");
    +  popup->addItem("Roof included")->setCheckable(true);
    +  popup->addItem("Add a door")->setDisabled(true);
    +  popup->addSeparator();
    +  popup->addItem("Add a window");
    +  WPopupMenu *subMenu = new WPopupMenu();
    +  subMenu->addItem("Add a chair");
    +  subMenu->addItem("Add a table");
    +  popup->addMenu("Add furniture", subMenu);
    +  
    +  WLabel* clickMe = new WLabel("Clicking here will show a popup menu.", result);
    +  clickMe->setStyleClass("popupmenuLabel");
    +  clickMe->clicked().connect(popup, &WPopupMenu::popup);
    +  
    +  return result;
    +}
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/FormWidgets.h b/wt-3.1.7a/examples/widgetgallery/FormWidgets.h
    new file mode 100644
    index 0000000..368b15f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/FormWidgets.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef FORMWIDGETS_H_
    +#define FORMWIDGETS_H_
    +
    +#include "ControlsWidget.h"
    +
    +#include "Wt/WStandardItemModel"
    +
    +class EventDisplayer;
    +
    +class FormWidgets: public ControlsWidget
    +{
    +public:
    +  FormWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *wPushButton();
    +  Wt::WWidget *wCheckBox();
    +  Wt::WWidget *wRadioButton();
    +  Wt::WWidget *wComboBox();
    +  Wt::WWidget *wSelectionBox();
    +  Wt::WWidget *wLineEdit();
    +  Wt::WWidget *wSpinBox();
    +  Wt::WWidget *wTextArea();
    +  Wt::WWidget *wCalendar();
    +  Wt::WWidget *wDatePicker();
    +  Wt::WWidget *wInPlaceEdit();
    +  Wt::WWidget *wSuggestionPopup();
    +  Wt::WWidget *wTextEdit();
    +  Wt::WWidget *wFileUpload();
    +#ifndef WT_TARGET_JAVA
    +  Wt::WWidget *wPopupMenu();
    +#endif
    +
    +  void addColorElement(Wt::WStandardItemModel* model,
    +		       std::string name, 
    +		       std::string style);
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.C b/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.C
    new file mode 100644
    index 0000000..a1e6873
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.C
    @@ -0,0 +1,81 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "GraphicsWidgets.h"
    +#include "PaintExample.h"
    +#include "PaintBrush.h"
    +
    +#include <Wt/WText>
    +#include <Wt/WGlobal>
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WBorder>
    +#include <Wt/WBreak>
    +#include <Wt/WPushButton>
    +
    +GraphicsWidgets::GraphicsWidgets(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  topic("WPaintedWidget", this);
    +  new WText(tr("graphics-intro"), this);
    +}
    +
    +void GraphicsWidgets::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("Emweb logo example", emwebLogo());
    +  menu->addItem("Paintbrush example", paintbrush());
    +}
    +
    +WWidget* GraphicsWidgets::emwebLogo()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WPaintedWidget", result);
    +  
    +  new PaintExample(result, false);
    +  
    +  return result;
    +}
    +
    +void addColor(PaintBrush *const canvas,
    +	      WTableCell *cell, 
    +	      const WColor& color)
    +{
    +  cell->decorationStyle().setBackgroundColor(color);
    +  cell->resize(15, 15);
    +
    +  const WColor *const javaColor = &color;
    +
    +  cell->clicked().connect(boost::bind(&PaintBrush::setColor, 
    +				      canvas, 
    +				      *javaColor));
    +}
    +
    +WWidget* GraphicsWidgets::paintbrush()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  
    +  topic("WPaintedWidget", result);
    +
    +  new WText(tr("graphics-paintbrush"), result);
    +
    +  WTable* layout = new WTable(result);
    +
    +  PaintBrush *const canvas = new PaintBrush(710, 400, layout->elementAt(0,0));
    +  canvas->decorationStyle().setBorder(WBorder(WBorder::Solid));
    +
    +  new WText("Color chooser:", layout->elementAt(0,1));
    +  WTable* colorTable = new WTable(layout->elementAt(0,1));
    +  addColor(canvas, colorTable->elementAt(0, 0), WColor(black));
    +  addColor(canvas, colorTable->elementAt(0, 1), WColor(red));
    +  addColor(canvas, colorTable->elementAt(1, 0), WColor(green));
    +  addColor(canvas, colorTable->elementAt(1, 1), WColor(blue));
    +  new WBreak(layout->elementAt(0,1));
    +  WPushButton* clearButton = new WPushButton("Clear", layout->elementAt(0,1));
    +  clearButton->clicked().connect(canvas, &PaintBrush::clear);
    +  layout->elementAt(0,1)->setPadding(3);
    +
    +  return result;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.h b/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.h
    new file mode 100644
    index 0000000..1bafbf7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/GraphicsWidgets.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef GRAPHICSWIDGETS_H_
    +#define GRAPHICSWIDGETS_H_
    +
    +#include "ControlsWidget.h"
    +
    +#include "Wt/WTable"
    +#include "Wt/WColor"
    +#include "Wt/WSignalMapper"
    +
    +class GraphicsWidgets : public ControlsWidget
    +{
    +public:
    +  GraphicsWidgets(EventDisplayer *ed);
    +  virtual ~GraphicsWidgets() {}
    +  virtual void populateSubMenu(Wt::WMenu *menu);
    +  
    +private:
    +  Wt::WWidget* emwebLogo();
    +  Wt::WWidget* paintbrush();
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/MvcWidgets.C b/wt-3.1.7a/examples/widgetgallery/MvcWidgets.C
    new file mode 100644
    index 0000000..b5a92e0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/MvcWidgets.C
    @@ -0,0 +1,238 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "MvcWidgets.h"
    +#include "TreeViewExample.h"
    +#include "DeferredWidget.h"
    +
    +#include <Wt/WBreak>
    +#include <Wt/WComboBox>
    +#include <Wt/WPanel>
    +#include <Wt/WPushButton>
    +#include <Wt/WSelectionBox>
    +#include <Wt/WStandardItem>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WStringListModel>
    +#include <Wt/WText>
    +#include <Wt/WTreeView>
    +#include <Wt/WTable>
    +#include <Wt/Ext/ComboBox>
    +#include <iostream>
    +using namespace Wt;
    +
    +MvcWidgets::MvcWidgets(EventDisplayer *ed):
    +  ControlsWidget(ed, true)
    +{
    +  new WText(tr("mvc-intro"), this);
    +
    +  stringList_ = new WStringListModel(this);
    +  std::vector<WString> strings;
    +  strings.push_back("Alfa");
    +  strings.push_back("Bravo");
    +  strings.push_back("Charly");
    +  strings.push_back("Delta");
    +  strings.push_back("Echo");
    +  strings.push_back("Foxtrot");
    +  strings.push_back("Golf");
    +  strings.push_back("Hotel");
    +  strings.push_back("Indiana Jones");
    +  stringList_->setStringList(strings);
    +
    +}
    +
    +void MvcWidgets::populateSubMenu(Wt::WMenu *menu)
    +{
    +  menu->addItem("The Models", models());
    +  menu->addItem("Proxy models", proxyModels());
    +  menu->addItem("Combobox Views",
    +		deferCreate(boost::bind(&MvcWidgets::viewsCombo, this)));
    +  menu->addItem("WTableView",
    +		deferCreate(boost::bind(&MvcWidgets::viewsTable, this)));
    +  menu->addItem("WTreeView",
    +		deferCreate(boost::bind(&MvcWidgets::viewsTree, this)));
    +  menu->addItem("Chart Views", viewsChart());
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void MvcWidgets::comboBoxAdd()
    +{
    +  if (extComboBox_->currentIndex() == -1) {
    +    std::vector<WString> sl = stringList_->stringList();
    +    sl.push_back(extComboBox_->currentText());
    +    stringList_->setStringList(sl);
    +  }
    +}
    +#endif
    +
    +WWidget *MvcWidgets::models()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WAbstractItemModel", "WAbstractListModel", "WStandardItemModel",
    +	"WStringListModel", result);
    +  new WText(tr("mvc-models"), result);
    +  return result;
    +}
    +
    +WWidget *MvcWidgets::proxyModels()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WAbstractProxyModel", "WSortFilterProxyModel", result);
    +  new WText(tr("mvc-proxymodels"), result);
    +
    +  WStandardItemModel* cocktails = new WStandardItemModel(result);
    +  cocktails->appendRow(new WStandardItem("The Last WordLime Rickey"));
    +  cocktails->appendRow(new WStandardItem("Gin pahit"));
    +  cocktails->appendRow(new WStandardItem("Alexander"));
    +  cocktails->appendRow(new WStandardItem("Montgomery"));
    +  cocktails->appendRow(new WStandardItem("Gin Sour"));
    +  cocktails->appendRow(new WStandardItem("Hanky-Panky"));
    +  cocktails->appendRow(new WStandardItem("Gimlet"));
    +  cocktails->appendRow(new WStandardItem("Chocolate Soldier"));
    +  cocktails->appendRow(new WStandardItem("Joker"));
    +  cocktails->appendRow(new WStandardItem("Mickey Slim"));
    +  cocktails->appendRow(new WStandardItem("Long Island Iced Tea"));
    +  cocktails->appendRow(new WStandardItem("Old Etonian"));
    +  cocktails->appendRow(new WStandardItem("Lorraine"));
    +  cocktails->appendRow(new WStandardItem("Bijou"));
    +  cocktails->appendRow(new WStandardItem("Bronx"));
    +  cocktails->appendRow(new WStandardItem("Gin and tonic"));
    +  cocktails->appendRow(new WStandardItem("Pall Mall"));
    +  cocktails->appendRow(new WStandardItem("Gin Fizz"));
    +  cocktails->appendRow(new WStandardItem("French 75"));
    +  cocktails->appendRow(new WStandardItem("Martini"));
    +  cocktails->appendRow(new WStandardItem("Negroni"));
    +  cocktails->appendRow(new WStandardItem("20th Century"));
    +  cocktails->appendRow(new WStandardItem("My Fair Lady"));
    +  cocktails->appendRow(new WStandardItem("Gibson"));
    +
    +  new WText("<b>Filter regular expression: </b>", result);
    +  regexpFilter = new WLineEdit(result);
    +  regexpFilter->setText("Gi.*");
    +  regexpFilter->enterPressed().
    +    connect(this, &MvcWidgets::changeRegexp);
    +  WPushButton *filter = new WPushButton("Apply", result);
    +  filter->clicked().
    +    connect(this, &MvcWidgets::changeRegexp);
    +  
    +  std::vector<WAbstractItemModel*> models;
    +  std::vector<WString> headers;
    +
    +  headers.push_back(WString("<b>Source:</b>"));
    +  models.push_back(cocktails);
    +
    +  headers.push_back(WString("<b>Sorted proxy:</b>"));
    +  WSortFilterProxyModel *sortedCocktails = new WSortFilterProxyModel(this);
    +  sortedCocktails->setSourceModel(cocktails);
    +  sortedCocktails->setDynamicSortFilter(true);
    +  sortedCocktails->sort(0);
    +  models.push_back(sortedCocktails);
    +
    +  headers.push_back(WString("<b>Filtered proxy:</b>"));
    +  filteredCocktails = new WSortFilterProxyModel(this);
    +  filteredCocktails->setSourceModel(cocktails);
    +  filteredCocktails->setDynamicSortFilter(true);
    +  filteredCocktails->setFilterKeyColumn(0);
    +  filteredCocktails->setFilterRole(Wt::DisplayRole);
    +  filteredCocktails->setFilterRegExp(regexpFilter->text());
    +  models.push_back(filteredCocktails);
    +
    +  headers.push_back(WString("<b>Sorted and filtered proxy:</b>"));
    +  filteredSortedCocktails = new WSortFilterProxyModel(this);
    +  filteredSortedCocktails->setSourceModel(cocktails);
    +  filteredSortedCocktails->setDynamicSortFilter(true);
    +  filteredSortedCocktails->setFilterKeyColumn(0);
    +  filteredSortedCocktails->setFilterRole(Wt::DisplayRole);
    +  filteredSortedCocktails->setFilterRegExp(regexpFilter->text());
    +  filteredSortedCocktails->sort(0);
    +  models.push_back(filteredSortedCocktails);
    +
    +  WTable *layout = new WTable(result);
    +
    +  for (int i = 0; i < headers.size(); ++i) {
    +    layout->columnAt(i)->setWidth(WLength(25, WLength::Percentage));
    +    layout->elementAt(0, i)->setPadding(4);
    +    layout->elementAt(0, i)->setContentAlignment(AlignCenter);
    +
    +    new WText(headers[i], layout->elementAt(0, i));
    +    new WBreak(layout->elementAt(0, i));
    +
    +    WSelectionBox *view = new WSelectionBox(layout->elementAt(0, i));
    +    view->setModel(models[i]);
    +    view->setVerticalSize(cocktails->rowCount());
    +    view->resize(WLength(90, WLength::Percentage), WLength::Auto);
    +  }
    +
    +  return result;
    +}
    +
    +WWidget *MvcWidgets::viewsCombo()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  // WComboBox
    +  topic("WComboBox", "WSelectionBox", "Ext::ComboBox", result);
    +  new WText(tr("mvc-stringlistviews"), result);
    +  new WText("<h3>WComboBox</h3>", result);
    +  (new WComboBox(result))->setModel(stringList_);
    +
    +  // WSelectionBox
    +  new WText("<h3>WSelectionBox</h3>", result);
    +  (new WSelectionBox(result))->setModel(stringList_);
    +
    +#ifndef WT_TARGET_JAVA
    +  // Ext::ComboBox
    +  new WText("<h3>Ext::ComboBox</h3>", result);
    +  extComboBox_ = new Ext::ComboBox(result);
    +  extComboBox_->setModel(stringList_);
    +  extComboBox_->setEditable(true);
    +  WPushButton *pb = new WPushButton("Press here to add the edited value "
    +				    "to the model", result);
    +  pb->clicked().connect(this, &MvcWidgets::comboBoxAdd);
    +#endif
    +  
    +  return result;
    +}
    +
    +WWidget *MvcWidgets::viewsTable()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTableView", result);
    +  new WText(tr("mvc-WTableView"), result);
    +  return result;
    +}
    +
    +WWidget *MvcWidgets::viewsTree()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WTreeView", result);
    +
    +  WStandardItemModel *model = TreeViewExample::createModel(false, this);
    +
    +  TreeViewExample *tv1 = new TreeViewExample(model, tr("mvc-WTreeView"));
    +  result->addWidget(tv1);
    +
    +  TreeViewExample *tv2 = new TreeViewExample(model,
    +					     tr("mvc-WTreeView-column1Fixed"));
    +  result->addWidget(tv2);
    +
    +  tv2->treeView()->setColumn1Fixed(true);
    +  tv2->treeView()->setColumnWidth(0, 300);
    +
    +  return result;
    +}
    +
    +WWidget *MvcWidgets::viewsChart()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("Chart::WCartesianChart", "Chart::WPieChart", result);
    +  new WText(tr("mvc-Chart"), result);
    +  return result;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/MvcWidgets.h b/wt-3.1.7a/examples/widgetgallery/MvcWidgets.h
    new file mode 100644
    index 0000000..a933c0d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/MvcWidgets.h
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef MVCWIDGETS_H_
    +#define MVCWIDGETS_H_
    +
    +#include "ControlsWidget.h"
    +
    +#include <Wt/WSortFilterProxyModel>
    +#include <Wt/WLineEdit>
    +
    +namespace Wt {
    +  class WStringListModel;
    +  namespace Ext {
    +    class ComboBox;
    +  }
    +}
    +
    +class MvcWidgets : public ControlsWidget
    +{
    +public:
    +  MvcWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WLineEdit *regexpFilter;
    +  Wt::WSortFilterProxyModel *filteredCocktails;
    +  Wt::WSortFilterProxyModel *filteredSortedCocktails;
    +
    +  Wt::WWidget *models();
    +  Wt::WWidget *proxyModels();
    +  Wt::WWidget *viewsCombo();
    +  Wt::WWidget *viewsTable();
    +  Wt::WWidget *viewsTree();
    +  Wt::WWidget *viewsChart();
    +
    +
    +  Wt::WStringListModel *stringList_;
    +#ifndef WT_TARGET_JAVA
    +  Wt::Ext::ComboBox *extComboBox_;
    +  void comboBoxAdd();
    +#endif
    +
    +  void changeRegexp() {
    +    filteredCocktails->setFilterRegExp(regexpFilter->text());
    +    filteredSortedCocktails->setFilterRegExp(regexpFilter->text());
    +  }
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/PaintBrush.C b/wt-3.1.7a/examples/widgetgallery/PaintBrush.C
    new file mode 100644
    index 0000000..2585fd7
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/PaintBrush.C
    @@ -0,0 +1,72 @@
    +#include <boost/lexical_cast.hpp>
    +#include <iostream>
    +
    +#include "PaintBrush.h"
    +
    +#include <Wt/WCssDecorationStyle>
    +#include <Wt/WPainter>
    +#include <Wt/WPainterPath>
    +#include <Wt/WPointF>
    +#include <Wt/WRectF>
    +
    +PaintBrush::PaintBrush(int width, int height, WContainerWidget *parent)
    +  : WPaintedWidget(parent)
    +{
    +  setSelectable(false);
    +
    +  resize(WLength(width), WLength(height));
    +
    +  decorationStyle().setCursor("icons/pencil.cur", CrossCursor);
    +
    +  mouseDragged().connect(this, &PaintBrush::mouseDrag);
    +  mouseWentDown().connect(this, &PaintBrush::mouseDown);
    +  touchStarted().connect(this, &PaintBrush::touchStart);
    +  touchMoved().connect(this, &PaintBrush::touchMove);
    +  touchMoved().preventDefaultAction();
    +  
    +  color_ = WColor(black);
    +
    +  // setPreferredMethod(PngImage);
    +}
    +
    +void PaintBrush::paintEvent(WPaintDevice *paintDevice)
    +{
    +  WPainter painter(paintDevice);
    +  painter.setRenderHint(WPainter::Antialiasing);
    +  
    +  WPen pen;
    +  pen.setWidth(3);
    +  pen.setColor(color_);
    +  painter.setPen(pen);
    +  painter.drawPath(path_);
    +
    +  path_ = WPainterPath(path_.currentPosition());
    +}
    +
    +void PaintBrush::mouseDown(const WMouseEvent& e)
    +{
    +  Coordinates c = e.widget();
    +  path_ = WPainterPath(WPointF(c.x, c.y));
    +}
    +
    +void PaintBrush::touchStart(const WTouchEvent& e)
    +{
    +  Coordinates c = e.touches()[0].widget();
    +  path_ = WPainterPath(WPointF(c.x, c.y));
    +}
    +
    +void PaintBrush::mouseDrag(const WMouseEvent& e)
    +{
    +  Coordinates c = e.widget();
    +  path_.lineTo(c.x, c.y);
    +
    +  update(PaintUpdate);
    +}
    +
    +void PaintBrush::touchMove(const WTouchEvent& e)
    +{
    +  Coordinates c = e.touches()[0].widget();
    +  path_.lineTo(c.x, c.y);
    +
    +  update(PaintUpdate);
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/PaintBrush.h b/wt-3.1.7a/examples/widgetgallery/PaintBrush.h
    new file mode 100644
    index 0000000..7408967
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/PaintBrush.h
    @@ -0,0 +1,40 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +
    +#include <Wt/WPaintedWidget>
    +#include <Wt/WPainterPath>
    +#include <Wt/WEvent>
    +
    +#include <vector>
    +
    +#ifndef PAINTBRUSH_H_
    +#define PAINTBRUSH_H_
    +
    +using namespace Wt;
    +
    +class PaintBrush : public WPaintedWidget
    +{
    +public:
    +  PaintBrush(int width, int height, WContainerWidget *parent = 0);
    +
    +  void clear() {
    +    update();
    +  }
    +
    +  void setColor(const WColor& c) {
    +    color_ = c;
    +  }
    +
    +protected:
    +  virtual void paintEvent(WPaintDevice *paintDevice);
    +
    +private:
    +  WPainterPath path_;
    +  WColor color_;
    +
    +  void mouseDown(const WMouseEvent& e); 
    +  void mouseDrag(const WMouseEvent& e);
    +  void touchStart(const WTouchEvent& e);
    +  void touchMove(const WTouchEvent& e);
    +};
    +
    +#endif // PAINTBRUSH_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.C b/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.C
    new file mode 100644
    index 0000000..9e0e66e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.C
    @@ -0,0 +1,276 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "SpecialPurposeWidgets.h"
    +#include "EventDisplayer.h"
    +#include "DeferredWidget.h"
    +
    +#include "Wt/WBreak"
    +#include "Wt/WCheckBox"
    +#include "Wt/WFlashObject"
    +#include "Wt/WHTML5Video"
    +#include "Wt/WImage"
    +#include "Wt/WPushButton"
    +#include "Wt/WSound"
    +#include "Wt/WTable"
    +#include "Wt/WText"
    +
    +using namespace Wt;
    +
    +SpecialPurposeWidgets::SpecialPurposeWidgets(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("specialpurposewidgets-intro"), this);
    +}
    +
    +void SpecialPurposeWidgets::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("WGoogleMap",
    +		deferCreate(boost::bind(&SpecialPurposeWidgets::wGoogleMap,
    +					this)));
    +  menu->addItem("WSound",
    +		deferCreate(boost::bind(&SpecialPurposeWidgets::wSound, this)));
    +  menu->addItem("WVideo",
    +		deferCreate(boost::bind(&SpecialPurposeWidgets::wVideo,
    +					this)));
    +  menu->addItem("WFlashObject",
    +		deferCreate(boost::bind(&SpecialPurposeWidgets::wFlashObject,
    +					this)));
    +}
    +
    +WWidget *SpecialPurposeWidgets::wGoogleMap()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  topic("WGoogleMap", result);
    +  new WText(tr("specialpurposewidgets-WGoogleMap"), result);
    +
    +  WTable* layout = new WTable(result);
    +  WGoogleMap *const map = new WGoogleMap(layout->elementAt(0,0));
    +  map->resize(700, 500);
    +
    +  map->setMapTypeControl(WGoogleMap::DefaultControl);
    +  map->enableScrollWheelZoom();
    +
    +  layout->elementAt(0,1)->setPadding(3);
    +
    +  WContainerWidget* zoomContainer = 
    +    new WContainerWidget(layout->elementAt(0,1));
    +  new WText("Zoom: ", zoomContainer);
    +  WPushButton* zoomIn = new WPushButton("+", zoomContainer);
    +  zoomIn->clicked().connect(map, &WGoogleMap::zoomIn);
    +  WPushButton* zoomOut = new WPushButton("-", zoomContainer);
    +  zoomOut->clicked().connect(map, &WGoogleMap::zoomOut);
    +
    +  std::vector<WGoogleMap::Coordinate> road;
    +  roadDescription(road);
    +  map->addPolyline(road, WColor(0, 191, 255));
    +
    +  map->setCenter(road[road.size()-1]);
    +
    +  map->openInfoWindow(road[0], 
    +  		      "<img src=\"http://emweb.be/img/emweb_small.jpg\" />"
    +  		      "<br/>"
    +  		      "<b>Emweb office</b>");
    +
    +  map->clicked().connect(this, &SpecialPurposeWidgets::googleMapClicked);
    +  map->doubleClicked()
    +    .connect(this, &SpecialPurposeWidgets::googleMapDoubleClicked);
    +
    +  return result;
    +}
    +
    +void SpecialPurposeWidgets::
    +roadDescription(std::vector<WGoogleMap::Coordinate>& roadDescription) 
    +{ 
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85342000000001, 4.7281));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85377, 4.72573));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85393, 4.72496));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85393, 4.72496));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85372, 4.72482));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85304, 4.72421));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8519, 4.72297));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85154, 4.72251));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85154, 4.72251));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85153, 4.72205));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85153, 4.72205));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85752, 4.7186));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85847, 4.71798));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.859, 4.71753));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8593, 4.71709));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.85986999999999, 4.71589));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8606, 4.7147));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8611, 4.71327));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86125999999999, 4.71293));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86184000000001, 4.71217));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86219, 4.71202));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86346, 4.71178));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86406, 4.71146));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86478, 4.71126));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86623000000001, 4.71111));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86659999999999, 4.71101));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8668, 4.71072));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86709, 4.71018));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86739, 4.70941));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86751, 4.70921));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86869, 4.70843));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8691, 4.70798));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8691, 4.70798));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86936, 4.70763));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86936, 4.70763));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86874, 4.70469));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86858, 4.70365));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86845999999999, 4.70269));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86839, 4.70152));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86843, 4.70043));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86851000000001, 4.69987));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.86881999999999, 4.69869));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8689, 4.69827));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87006, 4.6941));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87006, 4.6941));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87045999999999, 4.69348));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87172, 4.69233));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87229000000001, 4.69167));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87229000000001, 4.69167));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8725, 4.69123));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8725, 4.69123));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87408, 4.69142));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87423, 4.69125));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87464, 4.69116));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87579999999999, 4.69061));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87595, 4.69061));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87733, 4.69073));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87742, 4.69078));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87784, 4.69131));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87784, 4.69131));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87759, 4.69267));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.8775, 4.6935));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87751, 4.69395));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87768, 4.69545));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87769, 4.69666));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87759, 4.69742));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87734, 4.69823));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87734, 4.69823));
    +  roadDescription.push_back(WGoogleMap::Coordinate(50.87790999999999, 4.69861));
    +}
    +
    +void SpecialPurposeWidgets
    +::googleMapDoubleClicked(WGoogleMap::Coordinate c)
    +{
    +  std::ostringstream strm;
    +  strm << "Double clicked at coordinate (" 
    +       << c.latitude() 
    +       << "," 
    +       << c.longitude()
    +       << ")";
    +
    +  ed_->setStatus(strm.str());
    +}
    +
    +void SpecialPurposeWidgets
    +::googleMapClicked(WGoogleMap::Coordinate c)
    +{
    +  std::ostringstream strm;
    +  strm << "Clicked at coordinate (" 
    +       << c.latitude() 
    +       << "," 
    +       << c.longitude()
    +       << ")";
    +
    +  ed_->setStatus(strm.str());
    +}
    +
    +WWidget *SpecialPurposeWidgets::wSound()
    +{
    +  WContainerWidget *result = new WContainerWidget(); 
    +  topic("WSound", result);
    +  new WText(tr("specialpurposewidgets-WSound"), result);
    +
    +  new WText("The beep will be repeated 3 times.", result);
    +  new WBreak(result);
    +  WSound *const sound = new WSound("sounds/beep.mp3", result);
    +  sound->setLoops(3);
    +  WPushButton *playButton = new WPushButton("Beep!", result);
    +  playButton->setMargin(5);
    +  WPushButton *stopButton = new WPushButton("Make it stop!!!", result);
    +  stopButton->setMargin(5);
    +  playButton->clicked().connect(sound, &WSound::play);
    +  stopButton->clicked().connect(sound, &WSound::stop);
    +
    +  ed_->showSignal(playButton->clicked(), "Beeping started!");
    +  ed_->showSignal(stopButton->clicked(), "Beeping stopped!");
    +
    +  return result;
    +}
    +
    +WWidget *SpecialPurposeWidgets::wVideo()
    +{
    +  std::string ogvVideo =
    +    "http://www.webtoolkit.eu/videos/sintel_trailer.ogv";
    +  std::string mp4Video =
    +    "http://www.webtoolkit.eu/videos/sintel_trailer.mp4";
    +  std::string poster = "pics/sintel_trailer.jpg";
    +  WContainerWidget *result = new WContainerWidget(); 
    +  topic("WHTML5Video", result);
    +  new WText(tr("specialpurposewidgets-WHTML5Video"), result);
    +
    +  new WBreak(result);
    +
    +  new WText(tr("specialpurposewidgets-WHTML5Video-1"), result);
    +  WHTML5Video *v1 = new WHTML5Video(result);
    +  v1->addSource(mp4Video);
    +  v1->addSource(ogvVideo);
    +  v1->setPoster(poster);
    +  v1->setAlternativeContent(new WImage(poster));
    +  v1->resize(640, 360);
    +
    +  ed_->showEvent(v1->playbackStarted(), "Video 1 playing");
    +  ed_->showEvent(v1->playbackPaused(), "Video 1 paused");
    +  ed_->showEvent(v1->ended(), "Video 1 ended");
    +  ed_->showEvent(v1->volumeChanged(), "Video 1 volume changed");
    +
    +  new WText(tr("specialpurposewidgets-WHTML5Video-2"), result);
    +  WFlashObject *flash2 =
    +    new WFlashObject("http://www.webtoolkit.eu/videos/player_flv_maxi.swf");
    +  flash2->setFlashVariable("startimage", "pics/sintel_trailer.jpg");
    +  flash2->setFlashParameter("allowFullScreen", "true");
    +  flash2->setFlashVariable("flv", mp4Video);
    +  flash2->setFlashVariable("showvolume", "1");
    +  flash2->setFlashVariable("showfullscreen", "1");
    +  flash2->setAlternativeContent(new WImage(poster));
    +  flash2->resize(640, 360);
    +  WHTML5Video *v2 = new WHTML5Video(result);
    +  v2->addSource(mp4Video);
    +  v2->addSource(ogvVideo);
    +  v2->setAlternativeContent(flash2);
    +  v2->setPoster(poster);
    +  v2->resize(640, 360);
    +  ed_->showEvent(v2->playbackStarted(), "Video 2 playing");
    +  ed_->showEvent(v2->playbackPaused(), "Video 2 paused");
    +  ed_->showEvent(v2->ended(), "Video 2 ended");
    +  ed_->showEvent(v2->volumeChanged(), "Video 2 volume changed");
    +
    +
    +  new WText(tr("specialpurposewidgets-WHTML5Video-3"), result);
    +  WFlashObject *flash3 =
    +    new WFlashObject("http://www.youtube.com/v/HOfdboHvshg", result);
    +  flash3->setFlashParameter("allowFullScreen", "true");
    +  flash3->resize(640, 360);
    +
    +  return result;
    +}
    +
    +WWidget *SpecialPurposeWidgets::wFlashObject()
    +{
    +  WContainerWidget *result = new WContainerWidget(); 
    +  topic("WFlashObject", result);
    +  new WText(tr("specialpurposewidgets-WFlashObject"), result);
    +  WFlashObject *f =
    +    new WFlashObject("http://www.youtube.com/v/HOfdboHvshg", result);
    +  f->resize(640, 385);
    +  return result;
    +}
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.h b/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.h
    new file mode 100644
    index 0000000..f52656e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/SpecialPurposeWidgets.h
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SPECIALPURPOSEWIDGETS_H_
    +#define SPECIALPURPOSEWIDGETS_H_
    +
    +#include "ControlsWidget.h"
    +
    +#include "Wt/WGoogleMap"
    +
    +#include <vector>
    +
    +class EventDisplayer;
    +
    +class SpecialPurposeWidgets: public ControlsWidget
    +{
    +public:
    +  SpecialPurposeWidgets(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  Wt::WWidget *wGoogleMap();
    +  Wt::WWidget *wSound();
    +  Wt::WWidget *wVideo();
    +  Wt::WWidget *wFlashObject();
    +  void 
    +  roadDescription(std::vector<Wt::WGoogleMap::Coordinate>& roadDescription);
    +
    +  void googleMapDoubleClicked(Wt::WGoogleMap::Coordinate c);
    +  void googleMapClicked(Wt::WGoogleMap::Coordinate c);
    +};
    +
    +#endif
    diff --git a/wt-3.1.7a/examples/widgetgallery/StyleLayout.C b/wt-3.1.7a/examples/widgetgallery/StyleLayout.C
    new file mode 100644
    index 0000000..97b2bf4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/StyleLayout.C
    @@ -0,0 +1,281 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "StyleLayout.h"
    +#include "EventDisplayer.h"
    +
    +#include <Wt/WApplication>
    +
    +#include <Wt/WBorderLayout>
    +#include <Wt/WGridLayout>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WVBoxLayout>
    +
    +#include <Wt/WText>
    +#include <Wt/WComboBox>
    +#include <Wt/WPushButton>
    +
    +#include <Wt/WDefaultLoadingIndicator>
    +#include <Wt/WOverlayLoadingIndicator>
    +
    +#include "EmwebLoadingIndicator.h"
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +#include <boost/thread.hpp>
    +#endif
    +
    +using namespace Wt;
    +
    +StyleLayout::StyleLayout(EventDisplayer *ed)
    +  : ControlsWidget(ed, true)
    +{
    +  new WText(tr("style-layout-intro"), this);
    +}
    +
    +void StyleLayout::populateSubMenu(WMenu *menu)
    +{
    +  menu->addItem("CSS", css());
    +  menu->addItem("WLoadingIndicator", wLoadingIndicator());
    +  menu->addItem("WBoxLayout", wBoxLayout());
    +  menu->addItem("WGridLayout", wGridLayout());
    +  menu->addItem("WBorderLayout", wBorderLayout());
    +}
    +
    +WWidget *StyleLayout::css()
    +{
    +  return new WText(tr("style-and-layout-css"));
    +}
    +
    +WWidget *StyleLayout::wLoadingIndicator()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WLoadingIndicator", result);
    +
    +  new WText(tr("style-WLoadingIndicator"), result);
    +
    +  //fix for the WOverlayLoadingIndicator
    +  WApplication::instance()->styleSheet().addRule("body", "margin: 0px");
    +
    +  new WText("Select a loading indicator:  ", result);
    +  WComboBox *cb = new WComboBox(result);
    +  cb->addItem("WDefaultLoadingIndicator");
    +  cb->addItem("WOverlayLoadingIndicator");
    +  cb->addItem("EmwebLoadingIndicator");
    +  cb->setCurrentIndex(0);
    +  cb->sactivated().connect(this, &StyleLayout::loadingIndicatorSelected);
    +  new WBreak(result);
    +  WPushButton *load = new WPushButton("Load!", result);
    +  load->clicked().connect(this, &StyleLayout::load);
    +
    +  return result;
    +}
    +
    +void StyleLayout::loadingIndicatorSelected(WString indicator)
    +{
    +  if (indicator.value() == "WDefaultLoadingIndicator") {
    +    WApplication::instance()
    +      ->setLoadingIndicator(new WDefaultLoadingIndicator());
    +  } else if (indicator.value() == "WOverlayLoadingIndicator") {
    +    WApplication::instance()
    +      ->setLoadingIndicator(new WOverlayLoadingIndicator());
    +  } else if (indicator.value() == "EmwebLoadingIndicator") {
    +    WApplication::instance()
    +      ->setLoadingIndicator(new EmwebLoadingIndicator());
    +  }
    +}
    +
    +void StyleLayout::load(Wt::WMouseEvent) {
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  boost::this_thread::sleep(boost::posix_time::milliseconds(2000));
    +#else
    +  sleep(2);
    +#endif // WT_THREADED
    +}
    +
    +WWidget *StyleLayout::wBoxLayout()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WHBoxLayout", "WVBoxLayout", result);
    +
    +  new WText(tr("layout-WBoxLayout"), result);
    +
    +  WContainerWidget *container;
    +  WText *item;
    +  WHBoxLayout *hbox;
    +  WVBoxLayout *vbox;
    +
    +  /*
    +   * first hbox
    +   */
    +  container = new WContainerWidget(result);
    +  container->setStyleClass("yellow-box");
    +  hbox = new WHBoxLayout();
    +  container->setLayout(hbox);
    +
    +  item = new WText(tr("layout-item1"));
    +  item->setStyleClass("green-box");
    +  hbox->addWidget(item);
    +  
    +  item = new WText(tr("layout-item2"));
    +  item->setStyleClass("blue-box");
    +  hbox->addWidget(item);
    +
    +  new WText(tr("layout-WBoxLayout-stretch"), result);
    +
    +  /*
    +   * second hbox
    +   */
    +  container = new WContainerWidget(result);
    +  container->setStyleClass("yellow-box");
    +  hbox = new WHBoxLayout();
    +  container->setLayout(hbox);
    +
    +  item = new WText(tr("layout-item1"));
    +  item->setStyleClass("green-box");
    +  hbox->addWidget(item, 1);
    +  
    +  item = new WText(tr("layout-item2"));
    +  item->setStyleClass("blue-box");
    +  hbox->addWidget(item);
    +
    +  new WText(tr("layout-WBoxLayout-vbox"), result);
    +
    +  /*
    +   * first vbox
    +   */
    +  container = new WContainerWidget(result);
    +  container->resize(150, 150);
    +  container->setStyleClass("yellow-box centered");
    +  vbox = new WVBoxLayout();
    +  container->setLayout(vbox);
    +
    +  item = new WText(tr("layout-item1"));
    +  item->setStyleClass("green-box");
    +  vbox->addWidget(item);
    +  
    +  item = new WText(tr("layout-item2"));
    +  item->setStyleClass("blue-box");
    +  vbox->addWidget(item);
    +
    +  /*
    +   * second vbox
    +   */
    +  container = new WContainerWidget(result);
    +  container->resize(150, 150);
    +  container->setStyleClass("yellow-box centered");
    +  vbox = new WVBoxLayout();
    +  container->setLayout(vbox);
    +
    +  item = new WText(tr("layout-item1"));
    +  item->setStyleClass("green-box");
    +  vbox->addWidget(item, 1);
    +  
    +  item = new WText(tr("layout-item2"));
    +  item->setStyleClass("blue-box");
    +  vbox->addWidget(item);
    +
    +  new WText(tr("layout-WBoxLayout-nested"), result);
    +
    +  /*
    +   * nested boxes
    +   */
    +  container = new WContainerWidget(result);
    +  container->resize(200, 200);
    +  container->setStyleClass("yellow-box centered");
    +
    +  vbox = new WVBoxLayout();
    +  container->setLayout(vbox);
    +
    +  item = new WText(tr("layout-item1"));
    +  item->setStyleClass("green-box");
    +  vbox->addWidget(item, 1);
    +
    +  hbox = new WHBoxLayout();
    +  vbox->addLayout(hbox);
    +
    +  item = new WText(tr("layout-item2"));
    +  item->setStyleClass("green-box");
    +  hbox->addWidget(item);
    +
    +  item = new WText(tr("layout-item3"));
    +  item->setStyleClass("blue-box");
    +  hbox->addWidget(item);
    +
    +  return result;
    +}
    +
    +WWidget *StyleLayout::wGridLayout()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WGridLayout", result);
    +
    +  new WText(tr("layout-WGridLayout"), result);
    +
    +  WContainerWidget *container;
    +
    +  container = new WContainerWidget(result);
    +  container->resize(WLength::Auto, 400);
    +  container->setStyleClass("yellow-box");
    +  WGridLayout *grid = new WGridLayout();
    +  container->setLayout(grid);
    +
    +  for (int row = 0; row < 3; ++row) {
    +    for (int column = 0; column < 4; ++column) {
    +      WText *t = new WText(tr("grid-item").arg(row).arg(column));
    +      if (row == 1 || column == 1 || column == 2)
    +	t->setStyleClass("blue-box");
    +      else
    +	t->setStyleClass("green-box");
    +      grid->addWidget(t, row, column);
    +    }
    +  }
    +
    +  grid->setRowStretch(1, 1);
    +  grid->setColumnStretch(1, 1);
    +  grid->setColumnStretch(2, 1);
    +
    +  return result;
    +}
    +
    +WWidget *StyleLayout::wBorderLayout()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  topic("WBorderLayout", result);
    +
    +  new WText(tr("layout-WBorderLayout"), result);
    +
    +  WContainerWidget *container;
    +
    +  container = new WContainerWidget(result);
    +  container->resize(WLength::Auto, 400);
    +  container->setStyleClass("yellow-box");
    +  WBorderLayout *layout = new WBorderLayout();
    +  container->setLayout(layout);
    +
    +  WText *item;
    +
    +  item = new WText(tr("borderlayout-item").arg("North"));
    +  item->setStyleClass("green-box");
    +  layout->addWidget(item, WBorderLayout::North);
    +
    +  item = new WText(tr("borderlayout-item").arg("West"));
    +  item->setStyleClass("green-box");
    +  layout->addWidget(item, WBorderLayout::West);
    +
    +  item = new WText(tr("borderlayout-item").arg("East"));
    +  item->setStyleClass("green-box");
    +  layout->addWidget(item, WBorderLayout::East);
    +
    +  item = new WText(tr("borderlayout-item").arg("South"));
    +  item->setStyleClass("green-box");
    +  layout->addWidget(item, WBorderLayout::South);
    +
    +  item = new WText(tr("borderlayout-item").arg("Center"));
    +  item->setStyleClass("green-box");
    +  layout->addWidget(item, WBorderLayout::Center);
    +
    +  return result;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/StyleLayout.h b/wt-3.1.7a/examples/widgetgallery/StyleLayout.h
    new file mode 100644
    index 0000000..5e744c3
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/StyleLayout.h
    @@ -0,0 +1,33 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef STYLE_LAYOUT_H_
    +#define STYLE_LAYOUT_H_
    +
    +#include "ControlsWidget.h"
    +
    +#include <Wt/WString>
    +#include <Wt/WEvent>
    +
    +class StyleLayout : public ControlsWidget
    +{
    +public:
    +  StyleLayout(EventDisplayer *ed);
    +
    +  void populateSubMenu(Wt::WMenu *menu);
    +
    +private:
    +  WWidget *css();
    +  WWidget *wLoadingIndicator();
    +  void loadingIndicatorSelected(Wt::WString indicator);
    +  void load(Wt::WMouseEvent);
    +  WWidget *wBoxLayout();
    +  WWidget *wGridLayout();
    +  WWidget *wBorderLayout();
    +};
    +
    +#endif // STYLE_LAYOUT_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/Validators.C b/wt-3.1.7a/examples/widgetgallery/Validators.C
    new file mode 100644
    index 0000000..7d15a22
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/Validators.C
    @@ -0,0 +1,125 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Validators.h"
    +#include "EventDisplayer.h"
    +#include <Wt/WText>
    +#include <Wt/WLineEdit>
    +#include <Wt/WIntValidator>
    +#include <Wt/WDoubleValidator>
    +#include <Wt/WDateValidator>
    +#include <Wt/WLengthValidator>
    +#include <Wt/WRegExpValidator>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WTextArea>
    +#include <Wt/WPushButton>
    +#include <Wt/WBreak>
    +
    +using namespace Wt;
    +
    +Validators::Validators(EventDisplayer *ed)
    +  : ControlsWidget(ed, false)
    +{
    +  topic("WValidator", this);
    +
    +  new WText(tr("validators-intro"),
    +	    this);
    +
    +  new WText("<h2>Validator types</h2>", this);
    +  WTable *table = new WTable(this);
    +  table->setStyleClass("validators");
    +  WLineEdit *le;
    +
    +  new WText("<tt>WIntValidator</tt>: input is mandatory and in range [50 - 100]",
    +	    table->elementAt(0, 0));
    +  le = new WLineEdit(table->elementAt(0, 1));
    +  WIntValidator *iv = new WIntValidator(50, 100);
    +  iv->setMandatory(true);
    +  le->setValidator(iv);
    +  fields_.push_back(std::pair<WFormWidget *, WText *>
    +		    (le, new WText("", table->elementAt(0, 2))));
    +
    +  new WText("<tt>WDoubleValidator</tt>: range [-5.0 to 15.0]", table->elementAt(1, 0));
    +  le = new WLineEdit(table->elementAt(1, 1));
    +  le->setValidator(new WDoubleValidator(-5, 15));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>
    +		    (le, new WText("", table->elementAt(1, 2))));
    +
    +  new WText("<tt>WDateValidator</tt>, default format \"yyyy-MM-dd\"", table->elementAt(2, 0));
    +  le = new WLineEdit(table->elementAt(2, 1));
    +  le->setValidator(new WDateValidator());
    +  fields_.push_back(std::pair<WFormWidget *, WText *>
    +		    (le, new WText("", table->elementAt(2, 2))));
    +
    +  new WText("<tt>WDateValidator</tt>, format \"dd-MM-yy\"", table->elementAt(3, 0));
    +  le = new WLineEdit(table->elementAt(3, 1));
    +  le->setValidator(new WDateValidator("dd-MM-yy"));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>(le, new WText("", table->elementAt(3, 2))));
    +
    +  new WText("<tt>WDateValidator</tt>, format \"yy-MM-dd\", range 1 to 15 October 08",
    +	    table->elementAt(4, 0));
    +  le = new WLineEdit(table->elementAt(4, 1));
    +  le->setValidator(new WDateValidator("yy-MM-dd", WDate(2008, 10, 1),
    +				      WDate(2008, 10, 15)));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>(le, new WText("", table->elementAt(4, 2))));
    +
    +  new WText("<tt>WLengthValidator</tt>, 6 to 11 characters", table->elementAt(5, 0));
    +  le = new WLineEdit(table->elementAt(5, 1));
    +  le->setValidator(new WLengthValidator(6, 11));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>(le, new WText("", table->elementAt(5, 2))));
    +
    +  std::string ipRegexp =
    +    "((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}"
    +    "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
    +  new WText("<tt>WRegExpValidator</tt>, IP address", table->elementAt(6, 0));
    +  le = new WLineEdit(table->elementAt(6, 1));
    +  le->setValidator(new WRegExpValidator(ipRegexp));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>
    +		    (le, new WText("", table->elementAt(6, 2))));
    +  
    +  new WText("<p>The IP address validator regexp is: <tt>" + ipRegexp
    +	    + "</tt></p>", this);
    +
    +  new WText("<p>All WFormWidgets can have validators, so also the "
    +	    "WTextArea. Type up to 50 characters in the box below</p>", this);
    +  WTextArea *ta = new WTextArea(this);
    +  ta->setMargin(4, Right);
    +  ta->setValidator(new WLengthValidator(0, 50));
    +  fields_.push_back(std::pair<WFormWidget *, WText *>(ta, new WText("", this)));
    +
    +
    +  new WText("<h2>Server-side validation</h2>", this);
    +  new WText("<p>The button below causes the server to validate all "
    +	    "input fields above server-side, and puts the state of the "
    +	    "validation on the right of every widget: "
    +	    "<dl>"
    +	    " <dt><tt>Valid</tt></dt><dd>data is valid</dd>"
    +	    " <dt><tt>Invalid</tt></dt><dd>data is invalid</dd>"
    +	    " <dt><tt>InvalidEmpty</tt></dt><dd>field is empty, "
    +	    "but was indicated to be mandatory</dd>"
    +	    "</dl></p>", this);
    +  WPushButton *pb = new WPushButton("Validate server-side", this);
    +  pb->clicked().connect(this, &Validators::validateServerside);
    +  ed->showSignal(pb->clicked(), "WPushButton: request server-side validation");
    +}
    +
    +void Validators::validateServerside()
    +{
    +  for (unsigned int i = 0; i < fields_.size(); ++i) {
    +    switch (fields_[i].first->validate()) {
    +    case WValidator::Valid:
    +      fields_[i].second->setText("Valid");
    +      break;
    +    case WValidator::InvalidEmpty:
    +      fields_[i].second->setText("InvalidEmpty");
    +      break;
    +    case WValidator::Invalid:
    +      fields_[i].second->setText("Invalid");
    +      break;
    +    } 
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/Validators.h b/wt-3.1.7a/examples/widgetgallery/Validators.h
    new file mode 100644
    index 0000000..0593494
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/Validators.h
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef VALIDATORS_H_
    +#define VALIDATORS_H_
    +
    +#include <vector>
    +#include <utility>
    +
    +#include "ControlsWidget.h"
    +
    +namespace Wt {
    +  class WFormWidget;
    +  class WText;
    +}
    +
    +class Validators : public ControlsWidget
    +{
    +public:
    +  Validators(EventDisplayer *ed);
    +
    +private:
    +  void validateServerside();
    +  std::vector<std::pair<Wt::WFormWidget *, Wt::WText *> > fields_;
    +};
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/examples/widgetgallery/WidgetGallery.C b/wt-3.1.7a/examples/widgetgallery/WidgetGallery.C
    new file mode 100644
    index 0000000..a45f041
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/WidgetGallery.C
    @@ -0,0 +1,91 @@
    +#include "WidgetGallery.h"
    +#include "BasicControls.h"
    +#include "ChartWidgets.h"
    +#include "DialogWidgets.h"
    +#include "EventsDemo.h"
    +#include "EventDisplayer.h"
    +#include "ExtWidgets.h"
    +#include "FormWidgets.h"
    +#include "GraphicsWidgets.h"
    +#include "MvcWidgets.h"
    +#include "Validators.h"
    +#include "StyleLayout.h"
    +#include "SpecialPurposeWidgets.h"
    +
    +#include <Wt/WMenu>
    +#include <Wt/WSubMenuItem>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WStackedWidget>
    +#include <Wt/WText>
    +
    +using namespace Wt;
    +
    +WidgetGallery::WidgetGallery()
    +  : WContainerWidget()
    +{
    +  contentsStack_ = new WStackedWidget();
    +  // Show scrollbars when needed ...
    +  contentsStack_->setOverflow(WContainerWidget::OverflowAuto);
    +  // ... and work around a bug in IE (see setOverflow() documentation)
    +  contentsStack_->setPositionScheme(Relative);
    +  contentsStack_->setStyleClass("contents");
    +
    +  EventDisplayer *eventDisplayer = new EventDisplayer(0);
    +
    +  /*
    +   * Setup the menu (and submenus)
    +   */
    +  WMenu *menu = new WMenu(contentsStack_, Vertical, 0);
    +  menu->setRenderAsList(true);
    +  menu->setStyleClass("menu");
    +  menu->setInternalPathEnabled();
    +  menu->setInternalBasePath("/");
    +
    +  addToMenu(menu, "Basics", new BasicControls(eventDisplayer));
    +  addToMenu(menu, "Form Widgets", new FormWidgets(eventDisplayer));
    +  addToMenu(menu, "Form Validators", new Validators(eventDisplayer));
    +#ifndef WT_TARGET_JAVA
    +  addToMenu(menu, "Ext Widgets", new ExtWidgets(eventDisplayer));
    +#endif
    +  addToMenu(menu, "Vector Graphics", new GraphicsWidgets(eventDisplayer));
    +  addToMenu(menu, "Special Purpose", new SpecialPurposeWidgets(eventDisplayer));
    +  addToMenu(menu, "Dialogs", new DialogWidgets(eventDisplayer));
    +  addToMenu(menu, "Charts", new ChartWidgets(eventDisplayer));
    +  addToMenu(menu, "MVC Widgets", new MvcWidgets(eventDisplayer));
    +  addToMenu(menu, "Events", new EventsDemo(eventDisplayer));
    +  addToMenu(menu, "Style and Layout", new StyleLayout(eventDisplayer));
    +
    +  /*
    +   * Add it all inside a layout
    +   */
    +  WHBoxLayout *horizLayout = new WHBoxLayout(this);
    +  WVBoxLayout *vertLayout = new WVBoxLayout;
    +
    +  horizLayout->addWidget(menu, 0);
    +  horizLayout->addLayout(vertLayout, 1);
    +  vertLayout->addWidget(contentsStack_, 1);
    +  vertLayout->addWidget(eventDisplayer);
    +
    +  horizLayout->setResizable(0, true);
    +}
    +
    +void WidgetGallery::addToMenu(WMenu *menu, const WString& name,
    +			      ControlsWidget *controls)
    +{
    +  if (controls->hasSubMenu()) {
    +    WSubMenuItem *smi = new WSubMenuItem(name, controls);
    +    WMenu *subMenu = new WMenu(contentsStack_, Vertical, 0);
    +    subMenu->setRenderAsList(true);
    +
    +    smi->setSubMenu(subMenu);
    +    menu->addItem(smi);
    +
    +    subMenu->setInternalPathEnabled();
    +    subMenu->setInternalBasePath("/" + smi->pathComponent());
    +    subMenu->setStyleClass("menu submenu");
    +
    +    controls->populateSubMenu(subMenu);
    +  } else
    +    menu->addItem(name, controls);
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/WidgetGallery.h b/wt-3.1.7a/examples/widgetgallery/WidgetGallery.h
    new file mode 100644
    index 0000000..4758972
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/WidgetGallery.h
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef WIDGET_GALLERY_APPLICATION_H_
    +#define WIDGET_GALLERY_APPLICATION_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WMenu;
    +  class WStackedWidget;
    +}
    +
    +class ControlsWidget;
    +
    +class WidgetGallery : public Wt::WContainerWidget
    +{
    +public:
    +  WidgetGallery();
    +
    +private:
    +  Wt::WStackedWidget *contentsStack_;
    +
    +  void addToMenu(Wt::WMenu *menu, const Wt::WString& name,
    +		 ControlsWidget *controls);
    +};
    +
    +#endif // WIDGET_GALLERY_H_
    diff --git a/wt-3.1.7a/examples/widgetgallery/category.csv b/wt-3.1.7a/examples/widgetgallery/category.csv
    new file mode 100644
    index 0000000..b966804
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/category.csv
    @@ -0,0 +1,6 @@
    +"Age","Rural Male","Rural Female","Urban Male","Urban Female"
    +"70-74",66.0,54.3,71.1,50.0
    +"65-69",41.0,30.9,54.6,35.1
    +"60-64",126.9,20.3,37.0,19.3
    +"55-59",18.1,149.0,24.3,13.6
    +"50-54",11.7,8.7,15.4,8.4
    diff --git a/wt-3.1.7a/examples/widgetgallery/charts.xml b/wt-3.1.7a/examples/widgetgallery/charts.xml
    new file mode 100644
    index 0000000..9997edb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/charts.xml
    @@ -0,0 +1,119 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="error-missing-data">
    +
    +    <div>The data file "{1}" could not be found. Check your deployment.</div>
    +    
    +  </message>
    +  <message id="charts-introduction">
    +
    +<h2><span>Introduction</span></h2>
    +
    +<p class="p">
    +  This example demonstrates some of the capabilities of
    +  the <a href="http://www.webtoolkit.eu/wt/doc/reference/html/namespaceWt_1_1Chart.html"
    +  target="_new">Wt charting widgets</a>. These widgets are implemented
    +  using
    +  the <a href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WPaintedWidget.html"
    +  target="_new">Wt painting API</a>, which provides cross-browser
    +  native painting, using VML, SVG, or the Html 5 canvas tag.
    +</p>
    +
    +<p class="p">
    +  The two main chart widgets are <a
    +  href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Chart_1_1WCartesianChart.html"
    +  target="_new"><tt>WCartesianChart</tt></a>, which provides category
    +  charts and scatter plots, and <a
    +  href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Chart_1_1WPieChart.html"
    +  target="_new"><tt>WPieChart</tt></a> which provides pie
    +  charts. These widgets are based on the MVC mechanism, and retrieve
    +  their data from a <a
    +  href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WAbstractItemModel.html"
    +  target="_new"><tt>WAbstractItemModel</tt></a>.
    +</p>
    +
    +<p class="p">
    +  Many aspects of the charts may be customized. By default, style
    +  information for rendering data series are taken from a
    +  <a href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Chart_1_1WChartPalette.html" target="_new"><tt>WChartPalette</tt></a>. It
    +  is straight forward to specialize this class to provide different
    +  styles from the standard styles provided by <a href="http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Chart_1_1WStandardPalette.html" target="_new"><tt>WStandardPalette</tt></a>.
    +</p>
    +
    +<p class="p">
    +  Btw, would you expect this example to work when Ajax/JavaScript are
    +  not available or disabled?
    +</p>
    +
    +  </message>
    +  <message id="category chart">
    +
    +<h2><span>Category Chart</span></h2>
    +
    +<p class="p">
    +  A category chart uses categories on the X axis, and displays one or
    +  more data series on the Y axes. The values corresponding to each
    +  category are plotted consecutively (this is the main difference with
    +  a scatterp lot). Each data series corresponds to a column from the
    +  model.
    +</p>
    +
    +<p class="p">
    +  A cartesian chart provides automatic configuration of the axes, and
    +  support for a second Y axis. In addition, you may use a simple
    +  built-in legend, or extend the class to provide a specialized
    +  legend. In the example below, we use a manual Y axis configuration,
    +  with a break as would be commonly used when your data has a few
    +  outliers.
    +</p>
    +
    +<p class="p">
    +  The table view allows editing of the model, which is automatically
    +  reflected in the chart.
    +</p>
    +
    +  </message>
    +  <message id="scatter plot">
    +
    +<h2><span>Scatter Plot (time series)</span></h2>
    +
    +<p class="p">
    +  A scatter plot is very much like a category chart, but uses
    +  numerical data on the X axis. By default, these numerical data are
    +  mapped linearly on the X axis, but may also be log transformed (as
    +  can be configured for the Y axes). In addition, there is special
    +  support for displaying date series, by means of smart heuristics for
    +  chosing the labels on the X axis.
    +</p>
    +
    +<p class="p">
    +  Below is an extract from historical financial market data.
    +</p>
    +
    +  </message>
    +  <message id="scatter plot 2">
    +
    +<h2><span>Scatter Plot (sine function)</span></h2>
    +
    +<p class="p">
    +  Below we plot a single sine curves. We use 'curve' data series,
    +  which creates a smooth spline curve that interpolates the data
    +  points. As is typical when showing mathematical functions, we let
    +  the axes cross each other at the origin (0, 0).
    +</p>
    +
    +  </message>
    +  <message id="pie chart">
    +
    +<h2><span>Pie chart</span></h2>
    +
    +<p class="p">
    +  The pie chart is provided by the <tt>WPieChart</tt> widget. A pie
    +  chart can only display data from one data series. The class supports
    +  both plain 2D pies, as well as a 3D effect (as used below). As shown
    +  below for the first segment, these may be separated from the pie to
    +  show emphasis.
    +</p>
    +
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/Papa.png b/wt-3.1.7a/examples/widgetgallery/icons/Papa.png
    new file mode 100644
    index 0000000..4c264a7
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/Papa.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/Pennant_One.png b/wt-3.1.7a/examples/widgetgallery/icons/Pennant_One.png
    new file mode 100644
    index 0000000..18f02e2
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/Pennant_One.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/blue-pill-small.png b/wt-3.1.7a/examples/widgetgallery/icons/blue-pill-small.png
    new file mode 100644
    index 0000000..558027d
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/blue-pill-small.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/blue-pill.jpg b/wt-3.1.7a/examples/widgetgallery/icons/blue-pill.jpg
    new file mode 100644
    index 0000000..a9b2fb6
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/blue-pill.jpg differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/cloudy01.png b/wt-3.1.7a/examples/widgetgallery/icons/cloudy01.png
    new file mode 100644
    index 0000000..cf4a583
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/cloudy01.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/emweb.jpg b/wt-3.1.7a/examples/widgetgallery/icons/emweb.jpg
    new file mode 100644
    index 0000000..23e30b0
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/emweb.jpg differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/flag_be.png b/wt-3.1.7a/examples/widgetgallery/icons/flag_be.png
    new file mode 100644
    index 0000000..5b59cc5
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/flag_be.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/flag_fr.png b/wt-3.1.7a/examples/widgetgallery/icons/flag_fr.png
    new file mode 100644
    index 0000000..bf10103
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/flag_fr.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/flag_ma.png b/wt-3.1.7a/examples/widgetgallery/icons/flag_ma.png
    new file mode 100644
    index 0000000..ffce531
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/flag_ma.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/flag_sp.png b/wt-3.1.7a/examples/widgetgallery/icons/flag_sp.png
    new file mode 100644
    index 0000000..81647e3
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/flag_sp.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/house.png b/wt-3.1.7a/examples/widgetgallery/icons/house.png
    new file mode 100644
    index 0000000..fed6221
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/house.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/pencil.cur b/wt-3.1.7a/examples/widgetgallery/icons/pencil.cur
    new file mode 100644
    index 0000000..0dbb46f
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/pencil.cur differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/rain.png b/wt-3.1.7a/examples/widgetgallery/icons/rain.png
    new file mode 100644
    index 0000000..d46c187
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/rain.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/red-pill-small.png b/wt-3.1.7a/examples/widgetgallery/icons/red-pill-small.png
    new file mode 100644
    index 0000000..c3ab183
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/red-pill-small.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/red-pill.jpg b/wt-3.1.7a/examples/widgetgallery/icons/red-pill.jpg
    new file mode 100644
    index 0000000..7debee2
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/red-pill.jpg differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/snow.png b/wt-3.1.7a/examples/widgetgallery/icons/snow.png
    new file mode 100644
    index 0000000..c03a6d4
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/snow.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/storm.png b/wt-3.1.7a/examples/widgetgallery/icons/storm.png
    new file mode 100644
    index 0000000..3a2ba44
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/storm.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/sun01.png b/wt-3.1.7a/examples/widgetgallery/icons/sun01.png
    new file mode 100644
    index 0000000..4da0e72
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/sun01.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/w_cloud.png b/wt-3.1.7a/examples/widgetgallery/icons/w_cloud.png
    new file mode 100644
    index 0000000..f27be17
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/w_cloud.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/wt_powered.jpg b/wt-3.1.7a/examples/widgetgallery/icons/wt_powered.jpg
    new file mode 100644
    index 0000000..7a6a1ec
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/wt_powered.jpg differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-closed.png b/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-closed.png
    new file mode 100644
    index 0000000..0215874
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-closed.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-open.png b/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-open.png
    new file mode 100644
    index 0000000..97ce9f8
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/icons/yellow-folder-open.png differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/main.C b/wt-3.1.7a/examples/widgetgallery/main.C
    new file mode 100644
    index 0000000..8f5d3ab
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/main.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WApplication>
    +#include <Wt/WHBoxLayout>
    +
    +#include "WidgetGallery.h"
    +
    +using namespace Wt;
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  WApplication* app = new WApplication(env);
    + 
    +  app->setCssTheme("polished");
    + 
    +  WHBoxLayout *layout = new WHBoxLayout(app->root());
    +  layout->setContentsMargins(0, 0, 0, 0);
    +  layout->addWidget(new WidgetGallery());
    +
    +  app->setTitle("Wt widgets demo");
    +
    +  app->addMetaHeader("viewport", "width=700, height=1200");
    +
    +  // load text bundles (for the tr() function)
    +  app->messageResourceBundle().use(app->appRoot() + "text");
    +  app->messageResourceBundle().use(app->appRoot() + "charts");
    +  app->messageResourceBundle().use(app->appRoot() + "treeview");
    +
    +  app->useStyleSheet("style/everywidget.css");
    +  app->useStyleSheet("style/dragdrop.css");
    +  app->useStyleSheet("style/combostyle.css");
    +
    +  return app;
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/pics/sintel_trailer.jpg b/wt-3.1.7a/examples/widgetgallery/pics/sintel_trailer.jpg
    new file mode 100644
    index 0000000..3f7de31
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/pics/sintel_trailer.jpg differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/pie.csv b/wt-3.1.7a/examples/widgetgallery/pie.csv
    new file mode 100644
    index 0000000..b3a875e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/pie.csv
    @@ -0,0 +1,7 @@
    +"Item","Sales"
    +"Blueberry",120
    +"Cherry",30
    +"Apple",260
    +"Boston Cream",160
    +"Other",40
    +"Vanilla Cream",120
    diff --git a/wt-3.1.7a/examples/widgetgallery/sounds/beep.mp3 b/wt-3.1.7a/examples/widgetgallery/sounds/beep.mp3
    new file mode 100644
    index 0000000..b9febba
    Binary files /dev/null and b/wt-3.1.7a/examples/widgetgallery/sounds/beep.mp3 differ
    diff --git a/wt-3.1.7a/examples/widgetgallery/style/combostyle.css b/wt-3.1.7a/examples/widgetgallery/style/combostyle.css
    new file mode 100644
    index 0000000..055319e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/style/combostyle.css
    @@ -0,0 +1,11 @@
    +.combo-red {
    +    color:red
    +}
    +
    +.combo-green {
    +    color:green
    +}
    +
    +.combo-blue {
    +    color:blue
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/widgetgallery/style/dragdrop.css b/wt-3.1.7a/examples/widgetgallery/style/dragdrop.css
    new file mode 100644
    index 0000000..a7078a8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/style/dragdrop.css
    @@ -0,0 +1,21 @@
    +.character {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +}
    +
    +.blue-drop-site {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +
    +  background-color: #e0ecff;
    +}
    +
    +.red-drop-site {
    +  padding: 10px;
    +  margin: 10px;
    +  border: 1px solid #000;
    +
    +  background-color: #ffece0;
    +}
    diff --git a/wt-3.1.7a/examples/widgetgallery/style/everywidget.css b/wt-3.1.7a/examples/widgetgallery/style/everywidget.css
    new file mode 100644
    index 0000000..de4311f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/style/everywidget.css
    @@ -0,0 +1,283 @@
    +body, html {
    +    font-family:arial,sans-serif;
    +    height: 100%;
    +    width: 100%;
    +    margin: 0px; padding: 0px; border: none;
    +    overflow: hidden;
    +}
    +
    +tt {
    +    font-family: andale mono;
    +    color: #570;
    +    font-size: 90%;
    +}
    +
    +a {
    +    outline: none;
    +    color: #570;
    +}
    +
    +a:visited {
    +    outline: none;
    +    color: #570;
    +}
    +
    +ul {
    +    list-style-type: disc;
    +    list-style-position: outside;
    +    margin: 1.12em 0;
    +}
    +
    +.contents p, .contents li {
    +    margin: 16px 0px;
    +    line-height: 130%;
    +}
    +
    +.contents h1 {
    +    font-size: 150%;
    +    font-weight: bold;
    +    color: #528B12; 
    +    margin: 7px 0px;
    +}
    +
    +.contents h2 {
    +    font-size: 120%;
    +    font-weight: bold;
    +    color: #528B12;
    +    margin: 7px 0px;
    +}
    +
    +.contents h2 span {
    +    border-bottom: 0.2em solid #000;
    +}
    +
    +.contents h3 {
    +    font-size: 100%;
    +    font-weight: bold;
    +    color: #528B12;
    +    margin: 7px 0px;
    +}
    +
    +.trhead {
    +    font-family: sans-serif;
    +    font-size: 10pt;
    +    font-weight: bold;
    +    border-bottom: 1px solid black;
    +}
    +
    +.trhead td {
    +    padding-left: 4px;
    +    padding-right: 4px;
    +}
    +
    +.trdata {
    +    font-family: sans-serif;
    +    font-size: 10pt;
    +}
    +
    +.trdata td {
    +    vertical-align: middle;
    +    padding-left: 4px;
    +    padding-right: 4px;
    +}
    +
    +.trdata td input[type="checkbox"] {
    +    text-align: center;
    +    margin: 0px auto;
    +    display: block;
    +}
    +
    +.tdhead {
    +    font-family: sans-serif;
    +    font-size: 10pt;
    +    font-weight: bold;
    +    padding-right: 8px;
    +    text-align: right;
    +}
    +
    +.tddata {
    +    font-family: sans-serif;
    +    font-size: 10pt;
    +    padding-left: 4px;
    +}
    +
    +.Wt-suggest .highlight {
    +    padding: 0px;
    +    font-weight: bold;
    +    text-decoration: underline;
    +}
    +
    +ul.menu {
    +    margin: 0px;
    +    padding: 0px;
    +    text-indent:5px;
    +    list-style:none;
    +    width:200px;
    +    overflow: auto;
    +}
    +
    +ul.menu li {
    +    padding-top: 8px;
    +}
    +
    +ul.menu a {
    +    letter-spacing:1px;
    +    text-decoration:none;
    +    padding-bottom:5px;
    +    width:200px;
    +}
    +
    +ul.menu .itemselected, ul.menu .itemselected a, ul.menu .itemselected a {
    +    color: black;
    +}
    +
    +ul.menu .item, ul.menu a.item, ul.menu .item a {
    +    color: #7E7E7E;
    +}
    +
    +ul.menu a:hover, ul.menu .item a:hover {
    +    color: #70BD1A;
    +    text-decoration: none;
    +}
    +
    +ul.submenu {
    +    font-size: 90%;
    +    margin-left: 15px;
    +    padding-bottom: 0px;
    +    width: auto;
    +    border-right: 0px;
    +}
    +
    +ul.submenu li {
    +    padding-top: 4px;
    +}
    +
    +ul.submenu li a {
    +    padding-bottom: 0px;
    +}
    +
    +span.title {
    +    font-size: 150%;
    +    font-weight: bold;
    +    color: #528B12;
    +}
    +
    +span.doc {
    +    vertical-align: top;
    +}
    +
    +span.doc a {
    +    color: #7E7E7E;
    +    text-decoration: none;
    +    vertical-align: top;
    +}
    +
    +span.doc a:hover {
    +    color: #70BD1A;
    +    text-decoration: none;
    +}
    +
    +span.reactive {
    +    display: block;
    +    background-color: #CCCCCC;
    +    cursor: pointer;cursor:hand;
    +    margin: 3px 0px;
    +}
    +
    +div.contents {
    +    padding: 6px;
    +}
    +
    +.example-table {
    +    margin: 5px auto;
    +    border: 1px solid gray;
    +}
    +
    +.example-table td {
    +    padding: 3px 5px;
    +    border-right: 1px solid gray;
    +}
    +
    +.example-tree .selected {
    +    background-color: yellow;
    +}
    +
    +.tabwidget {
    +    border-bottom: 1px solid gray;
    +    padding-bottom: 3px;
    +    height: 100px;
    +}
    +
    +.in-place-edit span {
    +    margin:1px
    +}
    +
    +.in-place-edit span:hover{
    +    background-color:#FFFFCC;
    +    margin:0px;
    +    border:1px solid #CCCCCC;
    +}
    +
    +.tree-table .header * {
    +  font-weight: bold;
    +}
    +
    +.tree-table .header {
    +  border-bottom: solid 1px;
    +}
    +
    +.validators td {
    +    padding: 3px;
    +}
    +
    +.centered {
    +    margin-left: auto;
    +    margin-right: auto;
    +}
    +
    +.yellow-box {
    +    background-color: #ffffb4;
    +    border: 1px solid black;
    +    white-space: nowrap;
    +    margin-top: 1ex;
    +    margin-bottom: 1ex;
    +}
    +
    +.green-box {
    +    background-color: #c4ffb4;
    +    min-height: 30px;
    +    text-align: center;
    +    padding: 3px;
    +    white-space: nowrap;
    +}
    +
    +.blue-box {
    +    background-color: #65dae8;
    +    min-height: 30px;
    +    text-align: center;
    +    padding: 3px;
    +    white-space: nowrap;
    +}
    +
    +.events {
    +    border: 4px solid #528B12;
    +    padding: 5px;
    +}
    +
    +.popupmenuLabel {
    +    padding: 5px;
    +    background-color: #E7E5E0;
    +    cursor: default;   
    +}
    +
    +.form {
    +    background: #DDD;
    +    text-align: center;
    +    width: 40ex;
    +    padding: 3px;
    +    margin: 0px auto;
    +}
    +
    +.form p {
    +    margin: 5px;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/widgetgallery/text.xml b/wt-3.1.7a/examples/widgetgallery/text.xml
    new file mode 100644
    index 0000000..ad555bc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/text.xml
    @@ -0,0 +1,1571 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<messages>
    +  <message id="basics-intro">
    +    
    +    <h1>Basic widgets</h1>
    +
    +    <p>
    +      As basic widgets, we consider the basic building blocks to
    +      organize your user-interface and visualize information. Some of
    +      the widgets listed here correspond to HTML elements, while
    +      others have a non-trivial implementation.
    +    </p>
    +
    +    <p>
    +      They are often used to build more complex composite
    +      widgets. Wt's widgets all inherit from <a
    +      href="/wt/doc/reference/html/classWt_1_1WWidget.html"><tt>WWidget</tt></a>. Widgets
    +      are rendered by inserting them in the widget tree
    +      hierarchy. You have the following possibilities to structurally organize your widgets:
    +      <ul>
    +	<li>
    +	  Adding a widget to a <a
    +	  href="#/basics/wcontainerwidget"><tt>WContainerWidget</tt></a>
    +	  (or more conveniently, passing the container as a parent
    +	  during construction). You'll need to use CSS to arrange your
    +	  widgets inside the container widget.
    +	</li>
    +	<li>
    +	  Binding a widget in a <a
    +	  href="#/basics/wtemplate"><tt>WTemplate</tt></a>. This is
    +	  the most natural way of organizing your widgets if you are
    +	  using CSS for layout.
    +	</li>
    +	<li>
    +	  By adding a widget to a layout manager <a
    +	  href="#/style-and-layout">layout manager</a>, you can
    +	  circumvent the limitations of CSS-based layout managenet, and
    +	  benefit from splitters to allow the user to adjust the
    +	  layout.
    +	</li>
    +      </ul>
    +    </p>
    +    
    +    <p>
    +      User interaction can be implemented using Wt's signal/slot
    +      implementation. You may respond to CGI post-backs or JavaScript
    +      events by connecting C++ method invocations to corresponding
    +      <i>signals</i> exposed by widgets. For example, the descendants
    +      of <a
    +      href="/wt/doc/reference/html/classWt_1_1WInteractWidget.html"><tt>WInteractWidget</tt></a>
    +      emit events such as key events (<tt>keyPressed()</tt>,
    +      <tt>keyWentDown()</tt>, <tt>keyWentUp()</tt>, ...) and mouse
    +      events (<tt>clicked()</tt>, <tt>doubleClicked()</tt>, but also
    +      <tt>mouseWentOver()</tt> and <tt>mouseMoved()</tt>). Except for
    +      mouse clicks, these events can only be handled when JavaScript
    +      is available.
    +    </p>
    +    
    +    <p>
    +      In this widget demo application, occasionally selected events
    +      are demonstrated and shown in the event window at the bottom of
    +      the browser window. <a
    +      href="/wt/doc/reference/html/index.html">The reference
    +      manual</a> provides a complete reference API reference for each
    +      widget, including all events implemented by a widget.
    +    </p>
    +
    +    <p>
    +      Basic widgets have only a limited amount of styling. This allows
    +      you to customize the look of these widgets using CSS to fit
    +      within your design.
    +    </p>
    +    
    +    <p>
    +      Related topics: <a href="#/events">Events</a> and <a
    +      href="#/style-and-layout">Style and Layout</a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WText">
    +    <p>
    +      A <tt>WText</tt> corresponds to an HTML <tt>&lt;span&gt;</tt> or
    +      <tt>&lt;div&gt;</tt> element. It can display XHTML formatted
    +      text or plain text.
    +    </p>
    +
    +    <p>
    +      <tt>WText</tt> displays a <a
    +      href="/wt/doc/reference/html/classWt_1_1WString.html"
    +      target="_blank">WString</a>. This string class provides at the
    +      same time support for localization and internationalization:
    +      <ul>
    +	<li>it implements a Unicode string (internally representated
    +	as UTF-8).</li>
    +	<li>it implements a localizable string (see also <a
    +	href="/wt/doc/reference/html/classWt_1_1WString.html#0afc7dc0f9897456d71b569a86ca26c1" target="_blank">WString::tr()</a>). The
    +	actual value corresponding to a key is retrieved from a <a
    +	href="/wt/doc/reference/html/classWt_1_1WLocalizedStrings.html"
    +	target="_blank">WLocalizedStrings</a> instance, taking into
    +	account the current locale. The default implementation of this
    +	interface class uses XML files, which are convenient for
    +	specifying XHTML snippets.</li>
    +      </ul>
    +    </p>
    +    
    +    <p>
    +      <tt>WText</tt> allows the text to be formatted as XHTML or as
    +      plain text (escaping all special HTML characters). All XHTML
    +      text content, that is not read from a localized strings
    +      interface (which is considered safe by definition), is protected
    +      against unwanted side effects from Cross-Site Scripting (XSS)
    +      attacks. The text of a e.g. an XHTML-formatted <tt>WText</tt> is
    +      passed through an XML parser and all malicious tags are filtered
    +      (unless this feature is explicitly by-passed by using the
    +      <tt>XHTMLUnsafeText</tt> text format).
    +    </p>
    +
    +  </message>
    +
    +  <message id="basics-WTemplate">
    +    <p>
    +      A <tt>WTemplate</tt> is a widget which displays an XHTML
    +      fragment in which other widgets or strings may be bound. This is
    +      especially useful as an alternative to a container widget if you
    +      want to use CSS for style and layout, and the contents is well
    +      specified (i.e. not dynamic).
    +    </p>
    +
    +    <p>
    +      In a template, <tt>${<i>var</i>}</tt> indicates a place holder
    +      which is substituted with a widget or string that is bound to
    +      the template.
    +    </p>
    +
    +    <p>
    +      The template text can be provided by a <tt>WString</tt> and is
    +      thus easily localized and internalitionalized using a message
    +      resource bundle.
    +    </p>
    +
    +    <p>
    +      Below is an example of a template:
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTemplate2">
    +    <p>
    +      When instantiated and bound using a <tt>WLineEdit</tt> and two
    +      <tt>WPushButtons</tt>, this becomes:
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTemplate-example">
    +    <div class="form">
    +      <p>
    +	<label>Please enter your name: ${name-edit}</label>
    +      </p>
    +      <p>
    +	${save-button} ${cancel-button}
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="basics-WText-events">
    +    <p>
    +      Although the functionality of <tt>WText</tt> is very basic, it
    +      derives, like many widgets, from <a
    +      href="/wt/doc/reference/html/classWt_1_1WInteractWidget.html">WInteractWidget</a>
    +      and thus may respond to mouse events, and keyboard events if it
    +      can be given keyboard focus. A few mouse events are demonstrated
    +      below.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WBreak">
    +    <p>
    +    A <tt>WBreak</tt> corresponds to an HTML <tt>&lt;br/&gt;</tt> element.
    +    </p>
    +
    +    <p>
    +      <tt>WBreak</tt> forces a line break between <i>inline</i>
    +      widgets. To force inline widgets on a separate line, it is
    +      usually more convenient to arrange them in different container
    +      widgets. By default, Wt uses CSS to lay out contents, and an
    +      important property of each widgets being layed out is whether it
    +      is <i>inline</i> (and thus behaves like words organized in lines), or
    +      <i>block</i>.
    +    </p>
    +
    +    <p>Related topics: <a href="#/style-and-layout">Style and Layout</a>.</p>
    +  </message>
    +
    +  <message id="basics-WAnchor">
    +    <p>
    +      A <tt>WAnchor</tt> corresponds to an HTML <tt>&lt;a&gt;</tt>
    +      element, and provides a link to an URL:
    +    </p>
    +  </message>
    +
    +  <message id="basics-WAnchor-more">
    +    <p>
    +      When an anchor is activated, by default the browser will
    +      replace the Wt application with the targeted document. This may be
    +      changed to suggest the browser to follow the link in a new window,
    +      using the <tt>setTarget()</tt> method.
    +    </p>
    +
    +    <p>
    +      You may specify the anchor's target URL directly, but anchors
    +      can also be pointed to a <a
    +      href="/wt/doc/reference/html/classWt_1_1WResource.html"
    +      target="_blank">WResource</a>. This allows you to serve
    +      auxiliary files related to a particular application session, and
    +      perhaps dynamically generate the content. Wt includes <a
    +      href="/wt/doc/reference/html/classWt_1_1WFileResource.html"
    +      target="_blank">WFileResource</a> to stream a file and <a
    +      href="/wt/doc/reference/html/classWt_1_1WMemoryResource.html"
    +      target="_blank">WMemoryResource</a> to stream a data vector.
    +    </p>
    +    
    +    <p>
    +      <tt>WAnchor</tt> may also play an important role for navigation
    +      within your application, using Wt's internal paths, since they
    +      provide support for bookmarks, the browser back/forward buttons,
    +      and following links in new windows. For example, the <a
    +      href="#/basics/wmenu">WMenu</a> widget (used here to navigate Wt
    +      widgets) uses anchors for its items by default.
    +    </p>
    +
    +    <p>
    +      <tt>WAnchor</tt> derives from <tt>WContainerWidget</tt>, and as
    +      a consequence, any <tt>WWidget</tt> can be the clickable content
    +      of an anchor. It may be a table, a table cell, an image
    +      (demonstrated below), ...
    +    </p>
    +  </message>
    +
    +  <message id="basics-WAnchor-related">
    +    <p>
    +      Related topics: <a href="#/internal_paths">Internal paths</a>.
    +    </p>    
    +  </message>
    +
    +  <message id="basics-WImage">
    +    <p>
    +      A <tt>WImage</tt> corresponds to an HTML <tt>&lt;img&gt;</tt> element,
    +      and displays an image.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WImage-more">
    +    <p>
    +      Like an anchor, you may set the image URL directly, or point the
    +      image to a <tt>WResource</tt> to perhaps generate an image on
    +      the fly.
    +    </p>
    +
    +    <p>
    +      There are alternative methods to display or generate graphics
    +      in Wt:
    +    </p>
    +    <ul>
    +      <li>
    +	You may use the CSS background-image property when using
    +	images as styling objects (see <a
    +	href="#/style-and-layout">Style and Layout</a>).
    +      </li>
    +      <li>
    +	You can also use the vector graphics API to use graphics
    +	primitives to paint graphics (see <a
    +	href="#/vector-graphics">Vector Graphics</a>)
    +      </li>
    +    </ul>
    +
    +    <p>
    +      Since <tt>WImage</tt> derives from <tt>WInteractWidget</tt>, it
    +      provides the usual keyboard and mouse event handling. But images
    +      also have support for a more fine-grained event by defining
    +      interactive areas (see <a href="#/events/areas">Event
    +      areas</a>).
    +    </p>
    +
    +    <p>
    +      Related topics: <a href="#/events/areas">Event areas</a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTable">
    +    <p>
    +      A <tt>WTable</tt> corresponds to an HTML <tt>&lt;table&gt;</tt>
    +      element, and organizes content in a tabular structure.
    +    </p>
    +
    +    <p>
    +      The <tt>WTable</tt> widget uses the companion classes <a
    +      href="/wt/doc/reference/html/classWt_1_1WTableRow.html"
    +      target="_blank">WTableRow</a> and <a
    +      href="/wt/doc/reference/html/classWt_1_1WTableColumn.html"
    +      target="_blank">WTableColumn</a> to represent table rows
    +      (<tt>&lt;tr&gt;</tt>) and columns (<tt>&lt;td&gt;</tt>). Each
    +      table cell corresponds to a <a
    +      href="/wt/doc/reference/html/classWt_1_1WTableCell.html"
    +      target="_blank">WTableCell</a> widget, which is a specialized
    +      <tt>WContainerWidget</tt>.
    +    </p>
    +
    +    <p>
    +      An example of a <tt>WTable</tt>:
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTable-more">
    +    <p>
    +      While flexible, in many cases Wt provides more specialized
    +      widgets to deal with certain uses of <tt>WTable</tt>.
    +    </p>
    +
    +    <p>
    +      If you want to create a tabular layout you should consider the
    +      <a
    +      href="#/style-and-layout/wgridlayout"><tt>WGridLayout</tt></a>
    +      layout class instead. If you wish to present a lot of data in a
    +      table, you can also use one of the Model-View-Classes (<a
    +      href="#/mvc-widgets/wtreeview"><tt>WTreeView</tt></a> or <a
    +      href="#/mvc-widgets/ext__tableview"><tt>Ext::TableView</tt></a>), as
    +      these may offer a higher performance and other benefits such as
    +      controls for interactive column resizing and headers.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTree">
    +    <p>
    +      The <tt>WTreeNode</tt> class is a flexible building blocks for
    +      creating a hierarchical tree. Through specialization, the tree
    +      contents can be customized to contain abitrary widgets.
    +    </p>
    +
    +    <p>
    +      The tree supports several options for progressively loading the
    +      tree contents, and all expand/collapse behaviour is optimized to
    +      client-side when JavaScript is available (although the entire tree
    +      is implemented purely in C++).
    +    </p>
    +
    +    <p>
    +      The <tt>WTree</tt> class manages a hierarchy of
    +      <tt>WTreeNode</tt> nodes, and provides support for single or
    +      multiple selection.
    +    </p>
    +
    +    <p>
    +      This example also uses a small class called <a
    +      href="/wt/doc/reference/html/classWt_1_1WIconPair.html"
    +      target="_blank"><tt>WIconPair</tt></a>, which provides an easy interface
    +      to showing one of two icons.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTree-more">
    +    <p>
    +      The flexibility of the <tt>WTree</tt> class comes at a cost (in
    +      terms of client-side and server-side resources). In many cases,
    +      the <a href="#/mvc-widgets/wtreeview"><tt>WTreeView</tt></a> class may be
    +      more suitable for displaying large data models, using a MVC
    +      (Model-View-Controller) approach.
    +    </p>
    +
    +    <p>
    +      Related topics: <a href="#/mvc-widgets/wtreeview"><tt>WTreeView</tt></a>.
    +    </p>    
    +  </message>
    +
    +  <message id="basics-WTreeTable">
    +    <p>
    +      The <tt>WTreeTable</tt> combines the functionality of a <a
    +      href="#/basics/wtree"><tt>WTree</tt></a> and a <a
    +      href="#/basics/wtable"><tt>WTable</tt></a>. It is a table where the first
    +      column contains a collapsible tree. The <a
    +      href="#/mvc-widgets/wtreeview"><tt>WTreeView</tt></a> is the MVC
    +      equivalent of a <tt>WTreeTable</tt>, but less flexible. With a
    +      <tt>WTreeTable</tt>, each row can have a different height, and
    +      any widget can be contained within a cell.
    +    </p>
    +
    +    <p>
    +      Related topics: <a href="#/mvc-widgets/wtreeview"><tt>WTreeView</tt></a>,
    +      <a href="#/basics/wtable"><tt>WTable</tt></a>,
    +      <a href="#/basics/wtree"><tt>WTree</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WPanel">
    +    <p>
    +      <tt>WPanel</tt> provides basic panels that may be used to
    +      organize different window areas of your application.
    +    </p>
    +
    +    <p>
    +      The can be thought of as a <tt>WContainerWidget</tt> with an
    +      optional title and whose contents can be collapsed.
    +    </p>
    +  </message>
    +  
    +  <message id="basics-WPanel-related">
    +    <p>
    +      Related topics: <a href="#/basics/wgroupbox"><tt>WGroupBox</tt></a>.
    +    </p>    
    +  </message>
    +
    +  <message id="basics-WTabWidget">
    +    <p>
    +      <tt>WTabWidget</tt> organizes content in tab panes. Any widget
    +      of any complexity can provide the content for each of the tabs.
    +    </p>
    +
    +    <p>
    +      <tt>WTabWidget</tt> is in fact a specialization of
    +      <tt>WMenu</tt>, and therefore offers all of the features of that
    +      class, including support for internal paths. It also shows how a
    +      menu can be customized to provide a distinct look and feel.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WTabWidget-more">
    +    <p>
    +      Related topics: <a href="#/basics/wmenu"><tt>WMenu</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WContainerWidget">
    +    <p>
    +      A <tt>WContainerWidget</tt> corresponds to an HTML
    +      <tt>&lt;div&gt;</tt> or <tt>&lt;span&gt;</tt> element, and
    +      groups other widgets.
    +    </p>
    +
    +    <p>
    +      One of the most fundamental building blocks of Wt, the widget
    +      itself is usually invisible. The widgets that are contained
    +      within the container widget can be layed out using CSS or one of
    +      Wt's layout managers. CSS is usually the best option, but does
    +      not work if you require vertical fitting or stretching of
    +      children to the height of the container, or if you need to
    +      layout children in a grid.
    +    </p>
    +
    +    <p>
    +      Wt also provides some specialized WContainerWidget classes that
    +      have additional markup or behaviour:
    +      <ul>
    +	<li><a href="#/basics/wanchor"><tt>WAnchor</tt></a> links to a URL</li>
    +	<li><a href="#/basics/wgroupbox"><tt>WGroupBox</tt></a> adds a title
    +	and a frame</li>
    +	<li><a href="#/basics/wstackedwidget"><tt>WStackedWidget</tt></a>
    +	displays only one of the children at a time</li>
    +	<li><a href="#/basics/wtable"><tt>WTableCell</tt></a> represents a cell
    +	in a <tt>WTable</tt></li>
    +      </ul>
    +    </p>
    +
    +    <p>
    +      Related topics: <a href="#/style-and-layout">Style and Layout</a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WMenu">
    +    <p>
    +      A <tt>WMenu</tt> provides a list of items which are associated
    +      with some contents, and of which one is selected at a time.
    +    </p>
    +
    +    <p>
    +      A <tt>WMenu</tt> works in conjunction with a <a
    +      href="#/basics/wstackedwidget"><tt>WStackedWidget</tt></a>, which manages
    +      the contents.
    +    </p>
    +
    +    <p>
    +      By default, the menu does not provide any styling, and can be
    +      rendered using HTML <tt>&lt;ul&gt;</tt> and <tt>&lt;li&gt;</tt>
    +      elements. It should be styled using CSS. The look and behaviour
    +      of menu items can be customized by reimplementing these
    +      items. For example, the <a
    +      href="#/basics/wtabwidget"><tt>WTabWidget</tt></a> is merely a
    +      specialized menu.
    +    </p>
    +
    +    <p>
    +      You can create items with submenus by using the <a
    +      href="/wt/doc/reference/html/classWt_1_1WSubMenuItem.html"><tt>WSubMenuItem</tt></a>
    +      rather than the default <a
    +      href="/wt/doc/reference/html/classWt_1_1WMenuItem.html"
    +      target="_blank"><tt>WMenuItem</tt></a>.
    +    </p>
    +
    +    <p>
    +      A menu has full support for bookmarks and the back button, by
    +      rendering its items using <a href="#/basics/wanchor"><tt>WAnchor</tt></a>
    +      and making use of internal paths.
    +    </p>
    +
    +    <p>
    +      The panel at the left is implemented using a <tt>WMenu</tt>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WGroupBox">
    +    <p>
    +      A <tt>WGroupBox</tt> corresponds to an HTML
    +      <tt>&lt;fieldset&gt;</tt> element, and provides a frame and
    +      title around a group of widgets.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WGroupBox-contents">
    +    <p>
    +      Some contents goes here.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WGroupBox-related">
    +    <p>
    +      Related topics: <a
    +      href="#/basics/wcontainerwidget"><tt>WContainerWidget</tt></a>
    +      and <a href="#/basics/wpanel"><tt>WPanel</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WStackedWidget">
    +    <p>
    +      A <tt>WStackedWidget</tt> is a container widget which only
    +      displays a single child at a time.
    +    </p>
    +    <p>
    +      Related topics: <a
    +      href="#/basics/wcontainerwidget"><tt>WContainerWidget</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="basics-WProgressBar">
    +    <p>
    +      A progress bar can be used to indicate progress of a long
    +      operation. Usually you will be using this in combination with a
    +      <tt>WTimer</tt> or with server-side events. Another use is in
    +      combination with a <a
    +      href="#/form-widgets/wfileupload"><tt>WFileUpload</tt></a> to
    +      indicate the progress of a file being uploaded.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-intro">
    +    <h1>Form widgets</h1>
    +
    +    <p>
    +      Form widgets implement controls for the user to enter data.
    +    </p>
    +
    +    <p>
    +      The form widgets listed here are the <i>native</i> widgets
    +      offered by Wt. Alternatively, you can use <a
    +      href="#/ext-widgets">Ext Form Widgets</a>, which rely on
    +      presence of JavaScript and a third party JavaScript library.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WPushButton">
    +    <p>
    +      A <tt>WPushButton</tt> corresponds to an HTML
    +      <tt>&lt;button&gt;</tt> element.
    +    </p>
    +    
    +    <p>
    +      A push button typically responsd to <tt>clicked()</tt> events.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WPushButton-more">
    +    <p>
    +      You may decorate a push button with a background image to create
    +      a clickable image. As a descendant of class
    +      <tt>WFormWidget</tt>, push buttons can be disabled or enabled.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WCheckBox">
    +    <p>
    +      A <tt>WCheckBox</tt> corresponds to an HTML <tt>&lt;input
    +      type="checkbox"&gt;</tt> element.
    +    </p>
    +    <p>
    +      Next to being checked or unchecked, a checkbox can be configured
    +      to allow a third state, <tt>Wt::PartiallyChecked</tt>, which can
    +      be used to indicate that it it isn't <i>entirely</i>
    +      checked. The third checkbox demonstrates this tristate behaviour
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WRadioButton">
    +    <p>
    +      A <tt>WRadioButton</tt> corresponds to an HTML <tt>&lt;input
    +      type="radio"&gt;</tt> element.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WRadioButton-group">
    +    <p>
    +      In most cases, you'll group them together in a
    +      <tt>WButtonGroup</tt>, so that only one can be selected at a
    +      time.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WComboBox">
    +    <p>
    +      A <tt>WComboBox</tt> corresponds to an HTML
    +      <tt>&lt;select&gt;</tt> element.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WComboBox-model">
    +    <p>
    +      <tt>WComboBox</tt> is a View widget (see also <a
    +      href="#/mvc-widgets/">Model-View-Controller</a>) which
    +      instantiates its own <tt>WStringListModel</tt> by default. You
    +      can use the widget also in conjunction with another model.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WComboBox-style">
    +    <p>
    +      <tt>WComboBox</tt> interprets <tt>StyleClassRole</tt> data to
    +      provide combo items with a specific style.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WSelectionBox">
    +    <p>
    +      A <tt>WSelectionBox</tt> corresponds to an HTML
    +      <tt>&lt;select&gt;</tt> element.
    +    </p>
    +
    +    <p>
    +      A <tt>WSelectionBox</tt> lets the user select one option...
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WSelectionBox-model">
    +    <p>
    +      <tt>WSelectionBox</tt> is a View widget (see also <a
    +      href="#/mvc-widgets/">Model-View-Controller</a>) which
    +      instantiates its own <tt>WStringListModel</tt> by default. You
    +      can use the widget also in conjunction with another model.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WLineEdit">
    +    <p>
    +      A <tt>WLineEdit</tt> corresponds to an HTML <tt>&lt;input
    +      type="text"&gt;</tt> element.
    +    </p>
    +
    +    <p>
    +      The line edit below reacts on every 'key up' event, and shows
    +      how you can embed the label within the control (when empty).
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WLineEdit-more">
    +    <p>
    +      <a href="#/form-validators">Form validators</a> can be used to
    +      to validate the user's input with immediate client-side
    +      feedback.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WSpinBox">
    +    <p>
    +      A <tt>WSpinBox</tt> corresponds to an HTML5 <tt>&lt;input
    +      type="number"&gt;</tt> element.
    +    </p>
    +
    +    <p>
    +      In browser which do not yet implement this input type (which is
    +      currently all of them ASFAIK), a spin box is implemented using
    +      JavaScript.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WTextArea">
    +    <p>
    +      A <tt>WTextArea</tt> corresponds to an HTML
    +      <tt>&lt;textarea&gt;</tt> element.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WTextArea-contents">A text area is a multi-line text editing area.
    +
    +In contrast to a WTextEdit, which is a HTML editor and has rich text editing functionality (bold, underline, adjustable font sizes etc), a text area has no formatting capabilities.
    +  </message>
    +
    +  <message id="formwidgets-WTextArea-related">
    +    <p>
    +      <a href="#/form-validators">Form validators</a> can be used to
    +      to validate the user's input with immediate client-side
    +      feedback.
    +    </p>
    +
    +    <p>
    +      Related topics: <a href="#/form-widgets/wtextedit"><tt>WTextEdit</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WCalendar">
    +    <p>
    +      A <tt>WCalendar</tt> widget displays a simple calendar, which
    +      can be used to input one or more dates.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WTextEdit">
    +    <p>
    +      A <tt>WTextEdit</tt> corresponds to an HTML
    +      <tt>&lt;textarea&gt;</tt> element.
    +    </p>
    +
    +    <p>
    +      <a href="#/form-validators">Form validators</a> can be used to
    +      to validate the user's input with immediate client-side
    +      feedback.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WSuggestionPopup">
    +    <p>
    +      A <tt>WSuggestionPopup</tt> can be used in conjunction with a <a
    +      href="#/form-widgets/wlineedit"><tt>WLineEdit</tt></a> or <a
    +      href="#/form-widgets/wtextarea"><tt>WTextArea</tt></a> to offer
    +      auto-completion suggestions.
    +    </p>
    +
    +    <p>
    +      Try to enter John's email address below:
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WPopupMenu">
    +    <p>
    +      The <tt>WPopupMenu</tt> shows a popup menu, with possible sub
    +      menus. A popup menu can be shown at a coordinate (typically the
    +      position of a mouse event), or bordering a particular
    +      widget. The latter may be used to create a drop down menu.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WFileUpload">
    +    <p>
    +      <tt>WFileUpload</tt> is a widget to upload one or more files.
    +    </p>
    +  </message>
    +
    +  <message id="formwidgets-WFileUpload-more">
    +    <p>
    +      During the upload you may monitor its progress using a <a
    +      href="#/basics/wprogressbar">progress bar</a>. Once uploaded,
    +      the files are spooled to temporary files at the server. You may
    +      configure the control to allow the selection of multiple files
    +      at once, for more recent browsers that support this. The client
    +      filenames, the temporary spool file names, and the content types
    +      can be inspected for each uploaded file when the upload was
    +      completed.
    +    </p>
    +
    +    <p>
    +      File uploads can be started in the background by connecting the
    +      <tt>changed()</tt> signal to the <tt>upload()</tt> function.
    +    </p>
    +  </message>
    +
    +  <message id="validators-intro">
    +    <p>
    +      A validator is a rule set that validates user input, and can be
    +      associated with any <tt>WFormWidget</tt>.
    +    </p>
    +
    +    <p>
    +      Validation takes place both at the client side (in the browser)
    +      and server side. The advantage of client-side validation is that
    +      the user receives feedback without a server round-trip time, but
    +      this requires JavaScript support, and this can also easily be
    +      tampered with or circumvented. Therefore, server-side validation
    +      is always required in any case. All built-in validators provide
    +      both client-side and server-side validation. If you implement a
    +      custom validator, client-side validation (in JavaScript) may be
    +      optional. You could consider to reimplement
    +      <tt>WRegExpValidator</tt>, as it is quite flexible and will give
    +      you client-side validation out-of-the-box.
    +    </p>
    +    <p>
    +      Wt supplies validators for dates, doubles, integers, string
    +      length (minimum and maximum) and regular expressions. You can
    +      also implement your own server-side/client-side validators.
    +    </p>
    +    <p>
    +      The example below uses a red background to indicate invalid 
    +      fields, the default in Wt.
    +    </p>
    +  </message>
    +
    +  <message id="ext-intro">
    +    <h1>Ext Widgets</h1>
    +    <p>
    +      Wt's Ext widgets are a layer around the ExtJS JavaScript
    +      library. The Ext controls can now be used in Wt in the same way
    +      as native Wt widgets, but they have a different look.
    +    </p>
    +
    +    <p>
    +      Since ExtJS was originally included in Wt, its native widgets
    +      have expanded to include most of the functionality that was
    +      provided by these ExtJS widgets, without any of the drawbacks
    +      from ExtJS. The ExtJS widgets are considered deprecated. If you
    +      are missing functionality (or esthetics) with the native
    +      widgets, please consider <a
    +      href="http://redmine.emweb.be/projects/wt/issues/new">filing an
    +      issue</a>.
    +    </p>
    +
    +    <p>
    +      Download Ext and obtain a proper license from ExtJs. ExtJs is
    +      not included in the Wt download.
    +    </p>
    +  </message>
    +
    +  <message id="ext-Button">
    +    <p>
    +      <tt>Ext::Button</tt> is similar to <a
    +      href="#/form-widgets/wpushbutton"><tt>WPushButton</tt></a>. You'll
    +      usually connect a signal handler to the <tt>clicked()</tt>
    +      signal.
    +    </p>
    +  </message>
    +
    +  <message id="ext-LineEdit">
    +    <p>
    +      This class represents the ExtJs equivalent of a
    +      <tt>WLineEdit</tt>. Use <a
    +      href="#/form-validators">Validators</a> to validate the contents
    +      of an <tt>Ext::LineEdit</tt> client and server side. In the
    +      example below, the <tt>keyWentUp()</tt> signal is shown when
    +      activated.
    +    </p>
    +  </message>
    +
    +  <message id="ext-NumberField">
    +    <p>
    +      The <tt>NumerField</tt> input class allows a user to type in a
    +      numeric value with a specified decimal precision. The example
    +      below has its precision set to 2.
    +    </p>
    +  </message>
    +
    +  <message id="ext-CheckBox">
    +    <p>
    +      The Ext equivalent of a <a
    +      href="#/form-widgets/wcheckbox"><tt>WCheckBox</tt></a>. The
    +      examples demonstrate the checked event.
    +    </p>
    +  </message>
    +
    +  <message id="ext-ComboBox">
    +    <p>
    +      The Ext equivalent of a <a
    +      href="#/form-widgets/wcombobox"><tt>WComboBox</tt></a>. The Ext
    +      combobox suggests possible completions as you type, similar to
    +      the <a
    +      href="#/form-widgets/wsuggestionpopup"><tt>WSuggestionPopup</tt></a>.
    +      Select your favorite Belgian beer below.
    +    </p>
    +  </message>
    +
    +  <message id="ext-RadioButton">
    +    <p>
    +      The Ext radio button looks like this, and behaves similar to <a
    +      href="#/form-widgets/wradiobutton">Wt's native radio button</a>.
    +      <tt>Ext::RadioButton</tt> must be added to a <a
    +      href="/wt/doc/reference/html/classWt_1_1WButtonGroup.html">
    +      <tt>WButtonGroup</tt></a> to give them their typical exclusive
    +      selection behavior. The following radio buttons all belong to
    +      the same button group.
    +    </p>
    +  </message>
    +
    +  <message id="ext-Calendar">
    +    <p>
    +      The <tt>Ext::Calendar</tt> provides the same functionality as
    +      the <a href="#/form-widgets/wcalendar"><tt>WCalendar</tt></a>,
    +      but looks different.
    +    </p>
    +  </message>
    +
    +  <message id="ext-DateField">
    +    <p>
    +      An <tt>Ext::DateField</tt> is an input method for a date. It is
    +      Ext's equivalent for the <a
    +      href="#/form-widgets/wdatepicker"><tt>WDatePicker</tt></a>
    +      class.
    +    </p>
    +  </message>
    +
    +  <message id="ext-Menu">
    +    <p>
    +      The <tt>Ext::Menu</tt> class offers a desktop-application style
    +      menu, like Wt's <a
    +      href="#/formwidgets/wpopupmenu"><tt>WPopupMenu</tt></a>.
    +    </p>
    +    <p>
    +      The menu is under the first button of the <tt>Ext::ToolBar</tt>,
    +      which you can see below. The example demonstrates how other
    +      widgets can be added to the toolbar.
    +    </p>
    +  </message>
    +
    +  <message id="ext-Dialog">
    +    <p>
    +      These classes are demonstrated in the <a
    +      href="#/dialogs/ext-dialogs">dialogs</a> section.
    +    </p>
    +  </message>
    +
    +  <message id="graphics-intro">
    +    <p>
    +      These examples show some capibilities of Wt's vector graphics
    +      API.
    +    </p>
    +    <p>Wt's <tt>WPaintedWidget</tt> renders as SVG, VML or HTML5
    +    graphics depending on the capabilities of the browser. The backend
    +    decides how to render the graphics, the application programmer has
    +    to draw his graphics using the available methods in the
    +    <tt>WPainter</tt> API. The drawing primitives include points,
    +    lines, arcs, cubic splines, text, etc.
    +    </p>
    +  </message>
    +
    +  <message id="graphics-paintbrush">
    +    <p>
    +      An example demonstrating the use of <tt>WPaintedWidget</tt> with
    +      the <tt>PaintUpdate</tt> rendering flag.
    +    </p>
    +    <p>
    +      In some cases, you would like to update the canvas without
    +      clearing the previously painted contents (which is the default
    +      behavior). You may do this by passing the <tt>PaintUpdate</tt>
    +      rendering flag to the <tt>update()</tt> method.
    +    </p>
    +    <p>
    +      This example demonstrates this by implementing a simple painting
    +      device. The example is quite silly on its own: it sends every
    +      mouse drag operation to the server, which in turn updates the
    +      canvas. But you could imagine more interesting uses, such as a
    +      multi-user white board, or interactive visualizations.
    +    </p>
    +    <p>
    +      The example uses a custom cursor image (pencil), this is done by
    +      providing a cursor image to <a
    +      href="/wt/doc/reference/html/classWt_1_1WCssDecorationStyle.html"
    +      target="_blank"><tt>WCssDecorationStyle</tt></a>.
    +    </p>
    +  </message>
    +
    +  <message id="specialpurposewidgets-intro">
    +    <h1>
    +      Special purpose widgets
    +    </h1>
    +    <p>
    +      This section groups widgets with special functionality, such as
    +      usage of Google maps, Wt's integrated sound and video support, and
    +      Flash objects.
    +    </p>
    +  </message>
    +
    +  <message id="specialpurposewidgets-WGoogleMap">
    +    <p>
    +      <tt>WGoogleMap</tt> implements a Wt wrapper around the Google
    +      Maps functionality.
    +      <br/>
    +      The example demonstrates multiple controls and shows a polyline
    +      representing a road description from the Emweb office to the old
    +      market of Leuven.
    +    </p>
    +  </message>
    +
    +  <message id="specialpurposewidgets-WSound">
    +    <p>
    +      <tt>WSound</tt> provides a way to play a sound asynchonously. It is
    +      intended for auditive user interface feed-back.
    +    </p>
    +    <p>
    +      The current implementation uses a small Adobe Flash application,
    +      but future releases are expected to use the native HTML5 audio
    +      tags, as these are appearing in modern browsers.
    +    </p>
    +  </message>
    +  <message id="specialpurposewidgets-WHTML5Video">
    +    <p>
    +      Wt's video support is work in progress, but there are already a
    +      few ways to play video in Wt. Currently, methods based on the
    +      HTML5 Video element and Flash are provided.
    +    </p>
    +    <p>
    +      As there is no single method to insert video in a web page so
    +      that it plays on all browser types supported by Wt, the video
    +      playing classes have fallback support, so that if a video cannot
    +      be played by one class, (e.g. <tt>WHHTML5Video</tt>), it can
    +      fall back to another method (e.g. using
    +      <tt>WFlashObject</tt>). As such you can create a chain of video
    +      players that will each attempt to play the video, and if they
    +      fail pass on control to the next player.
    +    </p>
    +    <p>
    +      The trailer below is <a href="http://durian.blender.org/"
    +      target="_blank">Sintel</a>, (c) copyright Blender Foundation |
    +      durian.blender.org
    +    </p>
    +  </message>
    +  <message id="specialpurposewidgets-WHTML5Video-1">
    +    <h2>HTML5 Playback</h2>
    +    <p>
    +      Below is the video class, with a <tt>WImage</tt> (a static JPEG
    +      image) as fallback. The HTML5 video will play on browsers that
    +      support MP4 or OGV video streams (firefox, chrome, safari, ...),
    +      and show the image on other browsers (Internet Explorer, opera,
    +      ...).
    +    </p>
    +  </message>
    +  <message id="specialpurposewidgets-WHTML5Video-2">
    +    <h2>HTML5 Playback with Flash fallback</h2>
    +    <p>
    +      For browsers that support HTML5 video, the video below looks
    +      exactly like the one above. On other browsers, the player below
    +      falls back to a Flash player, which plays an MP4 video. If flash
    +      is not supported on your system, a static image is shown.
    +    </p>
    +    <p>
    +      The Flash-based video player can be any player. The example
    +      below uses <a href="http://flv-player.net/" target="_blank">FLV
    +      Player</a> as fallback for HTML5 video, but any flash player can
    +      do the job.
    +    </p>
    +  </message>
    +  <message id="specialpurposewidgets-WHTML5Video-3">
    +    <h2>Youtube video</h2>
    +    <p>
    +      Another way to play videos, which has been available in Wt for a
    +      long time, is to use plain flash to play your videos. Below we
    +      use YouTube to play the video.
    +    </p>
    +  </message>
    +  <message id="specialpurposewidgets-WFlashObject">
    +    <p>
    +      Any Flash object can easily be integrated in Wt. Instantiate a
    +      <tt>WFlashObject</tt>, set Flash parameters and variables,
    +      resize the object, and you're done. If flash is not supported,
    +      you can provide any <tt>WWidget</tt> as alternative content
    +      (including e.g. a link that sends the user to a page where flash
    +      can be downloaded).
    +    </p>
    +  </message>
    +
    +  <message id="dialogs-intro">
    +    <h1>Wt Dialog Widgets</h1>
    +    
    +    <p>
    +      Wt supports modal and non-modal dialogs. There are four classes
    +      involved in dialogs:
    +      <dl>
    +        <dt><tt>WDialog</tt></dt>
    +	<dd>
    +	  a widget that displays contents within a window drawn on
    +	  top of the screen. Any widget can be inserted in a dialog.
    +	</dd>
    +        <dt><tt>WMessageBox</tt></dt>
    +	<dd>
    +	  a dialog that contains only a single line of text and some
    +	  configurable buttons. It is convenient to use this class if
    +	  you only have to display a simple message.
    +        </dd>
    +	<dt><tt>Ext::Dialog</tt></dt>
    +	<dd>The ExtJs implementation of a dialog.</dd>
    +        <dt><tt>Ext::MessageBox</tt></dt>
    +	<dd>The ExtJs implementation of a message box.</dd>
    +      </dl>
    +    </p>
    +    <p>
    +      Dialogs can be used in two ways. The traditional method,
    +      borrowed from desktop GUI toolkits, involves calling
    +      <tt>exec()</tt>. This starts a local event loop which returns
    +      when the dialog is closed. While this method is convenient and
    +      familiar, it usually does not scale for web applications, as
    +      every session displaying a dialog keeps a thread occupied for an
    +      extended period of time. This may not be a problem if you plan
    +      to deploy every user session in its own process, but otherwise
    +      sessions will stall as the server runs out of threads. The
    +      scalable alternative to the local event loop is not to invoke is
    +      to simply <tt>show()</tt> the dialog similar to what you would
    +      do with any other widget, and delete when the
    +      <tt>finished()</tt> signal is triggered.
    +    </p>
    +  </message>
    +
    +  <message id="dialogs-WDialog">
    +    <p>
    +      <tt>WDialog</tt> implements the functionality of a dialog box.
    +      Any widget or combination of widgets can be displayed inside a
    +      dialog.
    +      <br/>
    +      Both modal and non-modal dialogs are supported. 
    +    </p>
    +  </message>
    +
    +  <message id="dialogs-WMessageBox">
    +    <p>
    +      <tt>WMessageBox</tt> is a convenience class for simple modal
    +      dialog boxes. They contain a line of text (the message) and a
    +      number of buttons.
    +    </p>
    +    <p>
    +      With respect to programming style, the first and the third example
    +      use a local event loop, the second and the last button don't. The
    +      difference is invisible; it is usually better not to use a local
    +      event loop.
    +    </p>
    +  </message>
    +
    +  <message id="dialogs-ExtDialog">
    +    <p>
    +      Ext dialogs and message boxes have similar functionality as the
    +      Wt dialogs. <tt>MessageBox</tt> contains text messages, while
    +      <tt>Dialog</tt> can contain any content. A progress dialog is a
    +      dialog containing a progress bar.
    +    </p>
    +    <p>
    +      The progress bar example occupies a session thread, while
    +      the dialog and the message box don't. This is a programming style
    +      difference that is invisible to the users of the application. As
    +      with Wt's dialogs, both can be used in the mode of your choice,
    +      though it is usually required not to lock up session threads.
    +    </p>
    +  </message>
    +
    +  <message id="charts-intro">
    +    <h1>The Charting library</h1>
    +
    +    <p>
    +      The example below demonstrates pretty much the complete
    +      interface of the charting library. This widget is identical
    +      to the separate charting example, so it also demonstrates how
    +      Object-Oriented widgets can be easily reused in other
    +      applications without having to worry about naming conflicts
    +      or HTML identifier clashes.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-intro">
    +    <h1>The Model-View-Controller pattern</h1>
    +
    +    <p>
    +      Wt implements the MVC design pattern in its user interface. With
    +      this pattern, user interface is separated from business logic and
    +      storage of the data itself (be it in memory, in a database, in files,
    +      ...).
    +    </p>
    +
    +    <p>
    +      The MVC views (such as <tt>WTreeView</tt>, but also
    +      <tt>WComboBox</tt> and charts) are classes to display the
    +      data. The models (inherited from <tt>WAbstractItemModel</tt>)
    +      represent the data itself. The control is everything that you
    +      write around the model and the view, to let the data change in
    +      response to user actions; the 'business logic'.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-models">
    +    <h2>WAbstractItemModel, WAbstractListModel</h2>
    +    <p>
    +      The abstract model interfaces are used within the view, so these
    +      are the classes you must implement for your data, which may
    +      e.g. be stored in a database. Wt includes two implementations of
    +      models for in-memory storage of data: the
    +      <tt>WStandardItemModel</tt> and the
    +      <tt>WStringListModel</tt>. They are convenience models but can
    +      also be used as examples to implement your own model.
    +    </p>
    +    <p>
    +      An <tt>AbstractItemModel</tt> can represent tables, trees and/or
    +      treetables.
    +    </p>
    +
    +    <h2>WStandardItemModel</h2>
    +    <p>
    +      This is a ready-to-use in-memory model that supports all
    +      features of the WAbstractItemModel.
    +    </p>
    +
    +    <h2>WStringListModel</h2>
    +    <p>
    +      This is a simple, single-dimensional list of strings.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-proxymodels">
    +    <p>
    +      A proxy model does not store data, but presents data from a source model 
    +      in another way. It may provide filtering, sorting, or other computed 
    +      changes to the source model. A proxy model may be a fully functional 
    +      model, that also allows modification of the underlying model.
    +    </p>
    +    <p>
    +      The example demonstrates the use of a
    +      <tt>WSortFilterProxyModel</tt> by sorting and/or filtering on a
    +      model containing different cocktails.  You can also change the
    +      filtering regular expresssion.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-stringlistviews">
    +    <p>
    +      <tt>WComboBox</tt>, <tt>WSelectionBox</tt> and
    +      <tt>Ext::ComboBox</tt> can either be filled by traditional
    +      <tt>insertItem()</tt> calls, or by making a reference to a
    +      model.  The three examples below are three views on the same
    +      model. With the Ext combobox, you can modify the model. Type a
    +      new item in the text field of the combobox, press the button,
    +      and watch how the new item also becomes available in the
    +      <tt>WComboBox</tt> and the <tt>WSelectionBox</tt> without
    +      writing a single line of code.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-WTableView">
    +    <p>
    +      The <tt>WTableView</tt> is part of Wt's MVC widgets, and
    +      provides the same functionality as a <tt>WTreeView</tt>, but for
    +      tabular models (where as the treeview supports trees, tables or
    +      tree-tables).
    +    </p>
    +
    +    <p>
    +      The widget supports very large models by loading only the
    +      visible region (with some margin) in the browser, and does this
    +      both for rows and columns. This results in low memory consumption
    +      (on client and server) and fast load times.
    +    </p>
    +
    +    <p>
    +      The <tt>WTableView</tt> can be seen in action in <a
    +      href="#/charts/pie-charts">the Charts section</a> of this
    +      gallery. Double-click on a value in a table to modify the
    +      model. The table and the chart are both views on the same model;
    +      the changes in the model are immediately reflected in the chart
    +      too.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-WTreeView">
    +    <h2>WTreeView example</h2>
    +
    +    <p>
    +      This example illustrates the <tt>WTreeView</tt> widget. This
    +      widget is part of Wt's MVC widgets, and are an alternative to
    +      the <tt>WTree</tt>, and <tt>WTreeTable</tt> widgets which are
    +      not MVC.
    +    </p>
    +
    +    <p>
    +      The widget supports very large models by loading only the
    +      visible region (with some margin) in the browser. This results in
    +      low memory consumption (on client and server) and fast load
    +      times.
    +    </p>
    +
    +    <p>
    +      This example uses a <tt>WStandardItemModel</tt> to populate the
    +      tree table. As is demonstrated, various roles may be used to
    +      indicate text, icons, selectable items (through check boxes),
    +      and also URLs or internal paths.
    +    </p>
    +
    +    <p>
    +      Many aspects of the tree view widget are not illustrated here,
    +      such as the various supported selection behaviors and modes, and
    +      reacting to item click events.
    +    </p>
    +
    +    <p>
    +      Except for the selection of items, the view does not yet offer
    +      the possibility to modify the model. Together with more fine
    +      grained control of how to display the data through delegates,
    +      support for editing will be added in the near future.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-WTreeView-column1Fixed">
    +    <p>
    +      The following example uses the same data model, and demonstrates
    +      how to keep the first column fixed while scrolling
    +      horizontally. This is useful when the <tt>WTreeView</tt>
    +      contains a large number of auxiliary columns which cannot all be
    +      displayed simultaneously, and there is a need to keep the first
    +      column visible while scrolling through the columns horizontally.
    +    </p>
    +  </message>
    +
    +  <message id="mvc-Chart">
    +    <p>
    +      These classes are graphical views that visualize the data
    +      of the model. They can be seen in action in
    +      <a href="#/charts/pie-charts">the Charts section</a> of this
    +      demo. Click on any value in a table to modify the model using
    +      editing provided by <a href="/wt/doc/reference/html/classWt_1_1WItemDelegate.html">WItemDelegate</a>. The
    +      table and the chart are both views on the same model; the
    +      changes in the model are immediately reflected in the charts
    +      too.
    +    </p>
    +  </message>
    +
    +  <message id="events-intro">
    +    <h1>Browser-Generated Events in Wt</h1>
    +
    +    <p>
    +      This section demonstrates the basic events that an application
    +      can receive from the browser: mouse events, keyboard events and
    +      drag and drop events. These events are generated by every widget
    +      that inherits from <tt>WInteractWidget</tt>, which most widgets
    +      do. When listening for these events, the browser forwards these
    +      events to the server, and the slots bound to the corresponding
    +      signals are invoked. As such, a Wt application can react to
    +      events entirely in C++ code.
    +    </p>
    +    <p>
    +      Specific widgets emit of course events specific to their
    +      functionality.  A <tt>WTreeNode</tt> for example can be
    +      expanded, collapsed, or selected. Each of these actions is
    +      causes a signal to be emitted. Refer to the reference
    +      documentation of the widget you are working with to find out
    +      what signals a widget emits.
    +    </p>
    +    <p>
    +      For a generic overview of events in Wt, including a description
    +      of the client-side event handling (avoids round-trip to the
    +      server) and how to write your own JavaScript events, please take
    +      a look in the
    +      <a href="/wt/doc/reference/html/overview.html" target="_blank">
    +      library overview</a>.
    +    </p>
    +  </message>
    +
    +  <message id="events-WKeyEvent-1">
    +    <p>
    +      The <tt>WKeyEvent</tt> provides detailed information for a
    +      keyboard event. Type in the line edits below to demonstrate the
    +      events. In general, keyboard events can be generated by every <a
    +      href="/wt/doc/reference/html/classWt_1_1WInteractWidget.html"
    +      target="_blank">WInteractWidget</a>, provided that either the
    +      widget itself has keyboard focus, or one of its children. While
    +      form widgets can receive keyboard focus out of the box, this
    +      must be enabled for other passive widgets by adding them to the
    +      tab chain using <tt>setTabIndex(0)</tt>, and will not work on
    +      older browsers.
    +    </p>
    +    <p>
    +      This line edit listens to <tt>keyWentUp()</tt> and
    +      <tt>keyWentDown()</tt> events.
    +    </p>
    +  </message>
    +
    +  <message id="events-WKeyEvent-2">
    +    <p>
    +      The next line edit listens to <tt>keyPressed()</tt> events.
    +    </p>
    +  </message>
    +
    +  <message id="events-WKeyEvent-3">
    +    <p>
    +      In the line edit below, the events <tt>enterPressed()</tt> and
    +      <tt>escapePressed()</tt> are shown (note however that catching
    +      escape is a major problem in most browsers; do not expect it to
    +      work).
    +    </p>
    +  </message>
    +
    +  <message id="events-WMouseEvent">
    +    <p>
    +      <tt>WMouseEvent</tt> gives detailed information for signals
    +      related to mouse operations. Mouse events can be intercepted
    +      from any <a
    +      href="/wt/doc/reference/html/classWt_1_1WInteractWidget.html"><tt>
    +      WInteractWidget</tt></a>.
    +    </p>
    +    <p>
    +      In the gray area on the left <tt>clicked()</tt>,
    +      <tt>doubleClicked()</tt>, <tt>mouseWentOut()</tt> and
    +      <tt>mouseWentOver()</tt> are shown. The area on the right
    +      demonstrates <tt>mouseWentDown()</tt>, <tt>mouseWentUp()</tt>
    +      and <tt>mouseMoved()</tt>.
    +    </p>
    +  </message>
    +
    +  <message id="events-WDropEvent">
    +    <p>
    +      This example demonstrates the use of drop events.
    +    </p>
    +  </message>
    +
    +  <message id="style-layout-intro">
    +    <h1>Style and layout</h1>
    +    <p>
    +      The layout of a Wt application and the style can be specified
    +      using Cascading Style Sheets (CSS). Wt provides several API
    +      methods and classes to specify and manipulate your internal or
    +      external style sheets.
    +    </p>
    +
    +    <p>
    +      Unfortunately, with respect to layout, CSS (and HTML) do not
    +      provide the designer with useful tools when it comes to vertical
    +      layout: the contents simply flows from top to bottom, in a
    +      single page. The page-style may work in many cases, but for
    +      those situations where you want to have more control of the
    +      organization of your content in the browser window, Wt also
    +      provides standard layout managers.
    +    </p>
    +  </message>
    +
    +  <message id="style-and-layout-css">
    +    <h1>Cascading Style Sheets (CSS)</h1>
    +
    +    <p>
    +      Using CSS, you can provide rules that specify both markup and
    +      layout properties of widgets. These rules are linked to certain
    +      widgets using <i>selectors</i>. Selectors may match widgets
    +      based on the style class or widget id of the widget or one of
    +      its ancestors.
    +    </p>
    +
    +    <p>
    +      The important API methods and class for working with your
    +      application stylesheet are:
    +      <ul>
    +	<li>WApplication::useStyleSheet()</li>
    +	<li>WApplication::styleSheet() returns the internal stylesheet
    +	(an instance of WCssStyleSheet), which can be manipulated
    +	dynamically to add, modify or removing rules.</li>
    +	<li>WWidget::setStyleClass()</li>
    +	<li>WWidget::setId()</li>
    +      </ul>
    +    </p>
    +
    +    <p>
    +      Most of the capabilities of CSS are also exposed in the WWidget
    +      API, and can thus be directly specified for a single
    +      widget. Properties that are related to layout can be specified
    +      using methods of WWidget, while properties that are decorative
    +      can be set in methods of WCssDecorationStyle, which can be
    +      accessed using WWidget::decorationStyle().
    +    </p>
    +
    +  </message>
    +  
    +  <message id="style-WLoadingIndicator">
    +    <p>
    +      The loading indicator displays a message while a response from the server
    +      is pending. By implementing WLoadingIndicator a custom indicator can be 
    +      provided.
    +    </p>
    +  </message>
    +  
    +
    +  <message id="layout-WBoxLayout">
    +    <p>
    +      These classes provide a horizontal or vertical layout of widgets
    +      inside a <a
    +      href="#/basics/wcontainerwidget"><tt>WContainerWidget</tt></a>.
    +    </p>
    +    <p>
    +      In the example below, a WHBoxLayout with default padding (9
    +      pixels) and spacing (6 pixels) is used to manage two child
    +      widgets. If no stretch factors have been specified, space is
    +      evenly distributed to all widgets.
    +    </p>
    +  </message>
    +
    +  <message id="layout-WBoxLayout-stretch">
    +    <p>
    +      If we give Item 1 a non-zero stretch factor, then Item 2 will
    +      only use its minimum width, and Item 1 will get all remaining
    +      space, as illustrated below.
    +    </p>
    +  </message>
    +
    +  <message id="layout-WBoxLayout-vbox">
    +    <p>
    +      WVBoxLayout works in exactly the same way, but stacks children
    +      vertically.
    +    </p>
    +  </message>
    +
    +  <message id="layout-WBoxLayout-nested">
    +    <p>
    +      Layout managers may be arbitrarily nested to create complex
    +      layouts. In the example below, we nested a WHBoxLayout with
    +      items 2 and 3 inside a WVBoxLayout with item 1.
    +    </p>
    +  </message>
    +
    +  <message id="layout-item1">
    +    <div>
    +      Item 1
    +    </div>
    +  </message>
    +
    +  <message id="layout-item2">
    +    <div>
    +      Item 2
    +    </div>
    +  </message>
    +
    +  <message id="layout-item3">
    +    <div>
    +      Item 3
    +    </div>
    +  </message>
    +
    +  <message id="layout-WGridLayout">
    +    <p>
    +      This class organizes children widgets inside a <a
    +      href="#/basics/wcontainerwidget"><tt>WContainerWidget</tt></a>
    +      in a grid.
    +    </p>
    +
    +    <p>
    +      Like <a
    +      href="#/style-and-layout/wboxlayout"><tt>WBoxLayout</tt></a>, a
    +      stretch factor defined for rows or columns is used to distribute
    +      excess space. In the example below, row 1 and columns 1 and 2
    +      are given a non-zero stretch factor.
    +    </p>
    +  </message>
    +
    +  <message id="grid-item">
    +    <div>
    +      Item ({1}, {2})
    +    </div>
    +  </message>
    +
    +  <message id="layout-WBorderLayout">
    +    <p>
    +      A layout manager that organizes the container space in up to 5
    +      regions, with a central region consuming any excess space.
    +    </p>
    +    <p>
    +      Any of the regions can be omitted.
    +    </p>
    +  </message>
    +
    +  <message id="borderlayout-item">
    +    <div>
    +      {1} item
    +    </div>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/widgetgallery/timeseries.csv b/wt-3.1.7a/examples/widgetgallery/timeseries.csv
    new file mode 100644
    index 0000000..c98b66c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/timeseries.csv
    @@ -0,0 +1,500 @@
    +"Date","AMSTEOE","DAXINDX","FTSE100","HNGKNGI","JAPDOWA","SNGALLS","SPCOMP"
    +06/01/86,275.76,1425.56,1424.1,1796.59,13053.8,233.63,210.65
    +07/01/86,275.43,1428.54,1415.2,1815.53,12991.2,237.37,213.8
    +08/01/86,278.76,1474.24,1404.2,1826.84,13056.4,240.99,207.97
    +09/01/86,272.29,1461.18,1379.6,1798.51,13034.2,239.68,206.11
    +10/01/86,272.89,1448.97,1394.5,1807.94,12998.2,238.95,205.96
    +13/01/86,268.02,1451.64,1383.2,1799.61,12977.02,237.78,206.72
    +14/01/86,270.22,1472.09,1370.1,1782.23,12928.6,236.81,206.34
    +15/01/86,274.42,1507.77,1390.5,1783.66,12928.6,235.79,208.26
    +16/01/86,277.62,1490.79,1394.5,1797.22,13027.1,233.91,209.17
    +17/01/86,276.45,1504.64,1396,1806.86,13009.7,232.72,208.43
    +20/01/86,273.74,1491.04,1378.3,1775.82,12952,228.57,207.53
    +21/01/86,274.35,1462.65,1378.1,1776.19,12881.5,229.25,205.79
    +22/01/86,271.41,1424.05,1390.9,1737.94,12923.3,225.52,203.49
    +23/01/86,261.18,1398.42,1382.8,1762.29,12888.89,225.32,204.25
    +24/01/86,268.01,1449.78,1392,1745.8,12904.2,226.8,206.43
    +27/01/86,269.28,1460.25,1405,1744.11,12983.4,226.98,207.39
    +28/01/86,266.62,1418.45,1426.3,1754.38,12993.7,226.99,209.81
    +29/01/86,264.49,1409.21,1421,1736.35,12957.1,224.3,210.29
    +30/01/86,259.52,1380.06,1421,1720.21,12949,224.32,209.33
    +31/01/86,263.4,1387.12,1435,1695.78,13024.3,225.85,211.78
    +03/02/86,267.21,1394.78,1425.1,1702.38,13086.5,227.08,213.96
    +04/02/86,269.95,1416.79,1431.6,1728.81,13138.1,227.57,216.24
    +05/02/86,268.88,1435,1424.1,1723.08,13185.7,229.17,212.96
    +06/02/86,268,1436,1426.9,1719.67,13186.6,228.79,213.47
    +07/02/86,259.85,1434.14,1445,1734.04,13212.13,226.43,214.56
    +10/02/86,266.87,1437,1461.5,1734.04,13226.1,226.43,216.24
    +11/02/86,264.56,1444.17,1453.9,1734.04,13226.1,226.43,215.92
    +12/02/86,262.57,1434.96,1470,1743.03,13300.6,227.43,215.97
    +13/02/86,260.84,1402.35,1473.5,1746.4,13293.8,227.49,217.4
    +14/02/86,261.76,1392.66,1477.9,1777.54,13342.78,227.18,219.76
    +17/02/86,261.33,1364,1475.3,1783.08,13447.9,225.7,219.76
    +18/02/86,260.54,1406.91,1491.9,1771.41,13436.2,226.95,222.45
    +19/02/86,256.66,1394.5,1491.4,1751.67,13466.6,228.68,219.76
    +20/02/86,255.04,1380.4,1492.1,1733.17,13355.4,233.15,222.22
    +21/02/86,254.61,1395.74,1518,1747.06,13394.31,232.97,224.62
    +24/02/86,251.88,1393.77,1533,1742.37,13503.5,230.42,224.34
    +25/02/86,248,1358.19,1527.7,1746.05,13576.2,229.01,223.79
    +26/02/86,248.85,1344.44,1534.6,1746.3,13621.7,228.1,224.04
    +27/02/86,246.46,1323.93,1549.5,1720.51,13642.1,227.83,226.77
    +28/02/86,247.69,1357.34,1543.9,1685.3,13640.83,226.27,226.74
    +03/03/86,245.27,1361.01,1534.7,1685.06,13757.6,225.89,225.42
    +04/03/86,252.23,1404.3,1548.9,1695.77,13784.3,226.14,224.38
    +05/03/86,257.02,1421.8,1569.1,1664.33,13807.5,223.39,224.34
    +06/03/86,259.66,1421.67,1566.1,1668.51,13901.6,222.46,225.13
    +07/03/86,259.66,1421.06,1573.8,1682.65,13994.6,221.2,225.57
    +10/03/86,263.97,1435.86,1572.2,1667.07,14056.5,219.87,226.58
    +11/03/86,264.31,1455.77,1597.1,1639.15,14066.19,219.28,231.69
    +12/03/86,264.31,1473.7,1624.5,1590.39,14238.13,217.29,232.54
    +13/03/86,266.9,1465.5,1616.7,1612.67,14414.69,213.71,233.19
    +14/03/86,265.45,1473.21,1624.4,1607.63,14516.77,211.84,236.55
    +17/03/86,264.08,1476.99,1622.6,1566.49,14655.5,211.44,234.67
    +18/03/86,265.5,1457.57,1644.4,1561.72,14639.3,210.95,235.78
    +19/03/86,266.61,1481.46,1659.8,1559.94,14476.5,210.44,235.6
    +20/03/86,268.04,1473.97,1690.1,1605.7,14753.3,211.01,236.54
    +21/03/86,267.08,1460.02,1688.3,1611.73,14753.3,213.13,233.34
    +24/03/86,265.9,1443.81,1663.9,1635.29,14975.5,213.87,235.33
    +25/03/86,263.63,1457.02,1633.8,1626.71,14826.86,215.51,234.72
    +26/03/86,263.63,1472.91,1653.9,1618.8,15059.7,219.33,237.3
    +27/03/86,269.81,1481.63,1668.8,1625.94,15337.18,218.95,238.97
    +28/03/86,269.81,1481.63,1668.8,1625.94,15364.3,218.95,238.97
    +31/03/86,269.81,1481.63,1668.8,1625.94,15859.69,216,238.9
    +01/04/86,273.64,1496.95,1684,1625.94,15745.89,216.47,235.14
    +02/04/86,273.82,1497.41,1702.9,1603.27,15555.5,217.36,235.71
    +03/04/86,275.37,1514.94,1717.6,1625.2,15272.19,215.73,232.47
    +04/04/86,274.47,1510.38,1709.7,1643.8,15019.81,213.83,228.69
    +07/04/86,275.1,1531.83,1688.5,1691.6,15062,212.95,228.63
    +08/04/86,272.14,1541.74,1675.7,1727.93,15014.1,212.74,233.52
    +09/04/86,273.33,1535.77,1659,1752.34,15110.19,211.95,233.75
    +10/04/86,271.89,1523.85,1690.3,1758.57,15203.6,211.07,236.44
    +11/04/86,272.9,1544.74,1694.1,1784.21,15326.3,210.98,235.98
    +14/04/86,277.62,1570.48,1683.1,1785.45,15396.8,208.51,237.79
    +15/04/86,273.64,1549.74,1654.8,1763.73,15352.32,209.74,237.73
    +16/04/86,276.06,1572.26,1662,1791.19,15358.39,209.98,242.22
    +17/04/86,277.33,1586.04,1680.9,1812,15486.8,210.89,243.03
    +18/04/86,275.18,1579.07,1680.2,1790.4,15758.61,212.08,242.38
    +21/04/86,274.35,1563.47,1668.5,1788.38,15827.3,212.19,244.74
    +22/04/86,274.32,1558.18,1665.2,1792.9,15712.89,211.74,242.42
    +23/04/86,270.3,1525.88,1632.7,1783.19,15748,209.99,241.75
    +24/04/86,270.18,1512.93,1615.5,1824.51,15682,209.21,242.02
    +25/04/86,269.95,1509.61,1622.6,1834.62,15689.88,208.8,241.98
    +28/04/86,260.95,1472.21,1628.8,1848.65,15757.9,206.73,243.08
    +29/04/86,264.71,1516.3,1650.1,1826.29,15757.9,208.74,240.51
    +30/04/86,264.71,1507.32,1660.5,1836.99,15825.5,207.62,235.52
    +01/05/86,261.86,1507.32,1640.1,1848.65,15782.6,207.62,235.16
    +02/05/86,261.33,1491.7,1652.5,1843.14,15868.44,207.46,234.79
    +05/05/86,260.59,1462.49,1652.5,1842.44,15868.44,207.54,237.73
    +06/05/86,263.97,1483.76,1636.2,1858.16,15900.14,208.43,237.24
    +07/05/86,258.71,1465.68,1610.1,1865.65,15953.85,209,236.08
    +08/05/86,258.71,1465.68,1602.6,1864.21,16078.23,209.43,237.96
    +09/05/86,255.61,1442.59,1601.6,1852.21,16194.98,209.2,237.85
    +12/05/86,253.15,1398.92,1603.8,1832.5,16105.19,210.08,237.58
    +13/05/86,251.08,1388.24,1623.3,1803.73,15982.3,212.36,236.43
    +14/05/86,254.3,1412.63,1594.3,1820.68,15943.69,213.68,237.54
    +15/05/86,256.21,1383.21,1575.7,1794.17,15924.7,213.23,234.43
    +16/05/86,254.93,1370.09,1564.9,1787.08,15739.05,211.57,232.75
    +19/05/86,254.93,1370.09,1573.1,1765.02,15697.5,210.72,233.2
    +20/05/86,258.07,1336.64,1585.8,1777.27,15690,209.52,236.11
    +21/05/86,265.31,1360.14,1591.9,1794.94,15808.1,210.76,235.45
    +22/05/86,265.31,1403.9,1598.8,1820.98,15917.3,211.34,240.12
    +23/05/86,265.31,1401.32,1617.4,1815.92,16204.98,211.34,241.35
    +26/05/86,277.73,1394.34,1617.4,1811.87,16409.5,214.38,241.35
    +27/05/86,275.67,1366.2,1612.1,1816.3,16467.3,217.36,244.75
    +28/05/86,278.04,1363.46,1624.8,1777.47,16553.39,218.07,246.63
    +29/05/86,277.74,1363.46,1609,1772.76,16610.6,219.64,247.98
    +30/05/86,277.98,1380.47,1602.8,1787.96,16670.77,221.66,247.35
    +02/06/86,278.97,1369.47,1596.5,1781.94,16739.3,227.7,245.04
    +03/06/86,275.95,1329.3,1602.2,1757.91,16669.5,230.23,245.51
    +04/06/86,277.51,1345.72,1601.4,1756.67,16802.7,230.54,243.94
    +05/06/86,274.66,1355.58,1612.6,1748.56,16811,228.94,245.65
    +06/06/86,273.56,1366.54,1611.9,1747.09,16817.9,230.61,245.67
    +09/06/86,273.68,1394.43,1604.6,1748.24,17008.3,230.61,239.96
    +10/06/86,272.43,1384.11,1586.5,1751.36,16967.69,237.35,239.58
    +11/06/86,272.93,1386.39,1571.4,1751.36,17096.39,237.59,241.13
    +12/06/86,273.88,1408.88,1571.8,1752.79,17131.19,237,241.49
    +13/06/86,279.03,1420.79,1582.4,1765.65,17205.97,234.8,245.72
    +16/06/86,277.48,1449.28,1593.6,1765.65,17185.6,236.67,246.13
    +17/06/86,277.33,1449.28,1605.3,1789.34,17075.89,239.63,244.35
    +18/06/86,276,1422.16,1619,1789.78,17177.06,243.53,244.99
    +19/06/86,275.77,1400.69,1629.6,1778.29,17277.59,245.5,244.06
    +20/06/86,275.62,1386.02,1637.2,1781.04,17403.13,247.8,247.56
    +23/06/86,276.27,1397.01,1622.8,1777.15,17457.89,252.65,245.26
    +24/06/86,274.06,1368.33,1624.9,1763.9,17342.39,250.47,247.03
    +25/06/86,275.35,1361.97,1629.4,1759.72,17516.63,252.41,248.93
    +26/06/86,275.35,1361.4,1637.5,1750.38,17600.94,248.62,248.74
    +27/06/86,274.56,1381.33,1634.5,1750.98,17500.43,248.29,249.6
    +30/06/86,272.45,1357.45,1649.8,1739.11,17654.19,244.64,250.84
    +01/07/86,269.94,1342.77,1660.8,1733.51,17622.69,245.4,252.04
    +02/07/86,272.56,1354.93,1656.7,1760.21,17669.89,246.09,252.7
    +03/07/86,272.56,1341.01,1656.2,1757.58,17691.8,242.19,251.79
    +04/07/86,274.82,1315.73,1649,1756.76,17597.73,241.98,251.79
    +07/07/86,274.29,1284.47,1631,1761.52,17714.1,239.5,244.05
    +08/07/86,269.64,1288.99,1599,1752.24,17734.1,241.28,241.59
    +09/07/86,272.75,1297.12,1614.6,1747.61,17506.1,236.49,242.82
    +10/07/86,274.09,1327.04,1626.7,1718.3,17469.8,238.08,243.01
    +11/07/86,275.5,1339.04,1626.4,1721.69,17670.77,240.29,242.22
    +14/07/86,273.01,1342.22,1597.3,1739.93,17820.6,241.53,238.11
    +15/07/86,270.4,1309.55,1593,1764.13,17882.8,239.95,233.66
    +16/07/86,268.49,1271.42,1597.3,1763.38,17700.89,239.57,235.01
    +17/07/86,268.34,1290.27,1609.3,1759.71,17725.6,240.34,236.07
    +18/07/86,267.42,1290.51,1584.4,1759.6,17838.84,239.89,236.36
    +21/07/86,264.08,1257.54,1560.2,1777.73,17522.19,237.01,236.24
    +22/07/86,261.61,1248.58,1559.2,1791.53,17639.3,236.8,238.18
    +23/07/86,262.42,1269.15,1572.3,1816.96,17860.1,236.16,238.67
    +24/07/86,260.67,1292.25,1547.7,1836,18026.19,234.55,237.95
    +25/07/86,261.38,1306.12,1545.8,1843.57,18050.59,234.91,240.22
    +28/07/86,262.19,1289.92,1549.4,1847.29,18038.89,235.87,236.01
    +29/07/86,259.35,1285.91,1556.4,1860.01,17728.89,238.76,234.55
    +30/07/86,261.62,1292.39,1566.3,1847.94,17799,239.08,236.59
    +31/07/86,262.27,1288.6,1558.1,1855.46,17509.69,238.65,236.12
    +01/08/86,264.73,1282.63,1561.8,1874.11,17321.93,238.66,234.91
    +04/08/86,265.63,1294.34,1545.4,1906.28,17263.1,241.68,235.99
    +05/08/86,267.8,1320.67,1561.6,1889.04,17414.8,243.21,237.03
    +06/08/86,265.7,1324.01,1540.4,1887.83,17353.5,242.38,236.84
    +07/08/86,265.75,1337.34,1529.9,1920.18,17422.39,241.7,237.04
    +08/08/86,269.53,1391.97,1526.7,1931.29,17435.52,241.21,236.88
    +11/08/86,273.46,1415.58,1542.8,1927.04,17479.1,242.09,240.68
    +12/08/86,275.46,1415.86,1558.2,1905,17794.69,242.71,243.34
    +13/08/86,277.29,1437.88,1581,1908.02,18000.76,247.14,245.67
    +14/08/86,276.64,1439.17,1588.2,1925.16,18264.69,249.31,246.22
    +15/08/86,266.83,1425.87,1601.9,1935.76,18376.39,251.3,247.15
    +18/08/86,268.67,1442.75,1609,1950.12,18597.39,252.04,247.38
    +19/08/86,268.18,1472.66,1604.4,1935.69,18792.6,250.58,246.51
    +20/08/86,267.71,1447.38,1604.6,1941.28,18936.19,250.3,249.77
    +21/08/86,269.66,1466.61,1606.8,1941.36,18675.6,251.97,249.67
    +22/08/86,265.78,1469.06,1607.1,1946.03,18441.31,251.86,250.19
    +25/08/86,262.35,1483.33,1607.1,1946.03,18565.6,253.66,247.81
    +26/08/86,264.45,1464.63,1616.2,1917,18640.81,252.42,252.84
    +27/08/86,268.29,1484.53,1629.8,1932.99,18503.27,256.19,253
    +28/08/86,265.74,1479.73,1636.8,1934.2,18367.98,257.39,252.84
    +29/08/86,265.39,1497.5,1661.2,1913,18553.68,259.59,252.93
    +01/09/86,269.98,1502.7,1672.8,1903.02,18820.75,264.7,252.93
    +02/09/86,273.11,1506.04,1667.8,1930.61,18694.93,264.7,248.52
    +03/09/86,273.11,1488.58,1670.7,1944.99,18505.44,262.09,250.08
    +04/09/86,275.26,1486.12,1680.3,1946.7,18559.64,261.85,253.82
    +05/09/86,276.09,1497.62,1684.8,1968.53,18775.07,264.39,250.48
    +08/09/86,271.75,1477.99,1666.6,1969.98,18552.2,264.1,248.14
    +09/09/86,273.07,1467.4,1673.4,1966.02,18474.1,262.56,247.67
    +10/09/86,271.09,1479.75,1663.5,1976.16,18619.3,259.71,247.06
    +11/09/86,269.97,1478,1636.5,1997.92,18561.25,262.6,235.18
    +12/09/86,262.33,1456.21,1608.6,1966.33,18100.52,260.55,230.68
    +15/09/86,263.68,1456.87,1628.3,1942.34,18100.52,258.65,231.94
    +16/09/86,258.89,1449.63,1596.7,1927.97,17463.19,256.5,231.72
    +17/09/86,258.07,1420.57,1610.4,1921.99,17336.6,258.83,231.68
    +18/09/86,255.38,1397.96,1615.5,1925.82,17478.3,258.06,232.31
    +19/09/86,255.38,1410.57,1600.4,1925.82,17523.39,256.36,232.21
    +22/09/86,258.18,1417.2,1617.1,1953.6,17706.3,254.53,234.93
    +23/09/86,262.58,1447,1610,1992.6,17706.3,256.47,235.67
    +24/09/86,262.05,1436.13,1603.4,2008.3,17955.8,258.37,236.28
    +25/09/86,259.79,1438.67,1575.9,2011.7,17988.3,255.56,231.83
    +26/09/86,256.36,1416.51,1568.6,2034.36,17960.69,256.64,232.23
    +29/09/86,249.92,1401.63,1539.2,2064.3,18106.31,256.64,229.91
    +30/09/86,253.98,1408.02,1555.8,2068.44,17852.89,256.64,231.32
    +01/10/86,256.84,1443.2,1578.3,2090.24,17564.39,256.64,233.6
    +02/10/86,256.84,1448.99,1573.1,2120.14,17019.1,256.64,233.92
    +03/10/86,255.05,1444.66,1560.8,2134.8,17240.22,256.64,233.71
    +06/10/86,254.89,1440.81,1578.9,2084.93,17435.3,256.64,234.78
    +07/10/86,256.84,1454.64,1592.3,2162.76,17604.39,256.64,234.41
    +08/10/86,259.41,1443.42,1587.8,2204.41,17514.8,256.64,236.68
    +09/10/86,255.56,1440.44,1608.6,2271.15,17650.19,256.64,235.85
    +10/10/86,255.56,1429.54,1599.4,2279.52,17650.19,256.64,235.48
    +13/10/86,249.77,1421.69,1612.3,2279.52,17338.69,256.64,235.91
    +14/10/86,251.52,1433.18,1592.5,2249.22,17318,256.64,235.37
    +15/10/86,251.21,1418.42,1607.5,2289.65,16970.1,256.64,238.8
    +16/10/86,251.69,1420.94,1605,2277.77,16871.89,256.64,239.53
    +17/10/86,251.86,1399.79,1610,2234.89,16701.34,256.64,238.84
    +20/10/86,249.36,1395.07,1590.2,2227.76,16523.39,256.64,235.97
    +21/10/86,249.35,1406.79,1591.2,2238.29,16205.8,256.64,235.88
    +22/10/86,248.44,1401.68,1589.6,2238.29,15819.5,256.64,236.26
    +23/10/86,248.09,1410.61,1572.5,2254.79,16308.3,256.64,239.28
    +24/10/86,251.69,1429.15,1577.1,2286.07,16284,256.64,238.26
    +27/10/86,250.89,1420.61,1586.1,2343.66,16157.8,256.64,238.77
    +28/10/86,250.02,1400.72,1583.6,2355.93,16397.8,256.64,239.26
    +29/10/86,247.07,1384.13,1597,2345.24,16505.39,256.64,240.94
    +30/10/86,255.65,1410.16,1615.8,2312.81,17010.89,253.91,243.71
    +31/10/86,255.76,1426.32,1632.1,2315.63,16910.63,251.95,243.98
    +03/11/86,256.58,1432.73,1639.2,2258.78,16910.63,290.72,245.8
    +04/11/86,256.58,1437.4,1637.7,2265.82,16786.89,289.37,246.2
    +05/11/86,254.67,1424.2,1644.4,2203.71,16713.69,285.08,246.58
    +06/11/86,257.34,1429.39,1648.5,2230.65,16758.3,283.45,245.87
    +07/11/86,260.6,1429.93,1662.6,2218.38,16973.6,281,245.77
    +10/11/86,259.71,1425.68,1656.2,2206.76,17053.2,275.59,246.13
    +11/11/86,261.51,1412.39,1660.9,2207.25,17300.6,275.27,247.08
    +12/11/86,260.07,1403.01,1654.3,2239.71,17447.89,278.82,246.64
    +13/11/86,256.81,1411.26,1644.6,2261.45,17438.5,278.74,243.02
    +14/11/86,255.31,1408.84,1644.3,2244.03,17390.5,277.21,244.5
    +17/11/86,253.47,1396.35,1628,2242.89,17208.1,275.33,243.21
    +18/11/86,256.06,1402.91,1617.5,2249.97,17273.52,279.51,236.78
    +19/11/86,255.3,1402.91,1604.3,2243.34,17283.81,278.5,237.66
    +20/11/86,258.4,1411.98,1610.7,2245.95,17304.6,278.3,242.05
    +21/11/86,258.4,1435.01,1624.9,2273.98,17489.57,272.05,245.86
    +24/11/86,263.15,1451.7,1636.5,2343.59,17489.57,271.43,247.45
    +25/11/86,260.14,1456.91,1619.3,2361.12,17747.5,275.95,248.17
    +26/11/86,260.57,1456.91,1633.2,2377.71,17727.89,274.43,248.77
    +27/11/86,261.54,1461.71,1632.5,2354.33,17883.65,272.43,248.77
    +28/11/86,262.23,1466.28,1636.7,2418.75,18083,271.37,249.22
    +01/12/86,259.74,1453.12,1617.8,2452.15,18308,272.66,249.05
    +02/12/86,261.78,1452.67,1625.5,2458.2,18191,275.94,254
    +03/12/86,263.88,1470.41,1615.1,2460,18455.1,275.82,253.83
    +04/12/86,262.36,1460.22,1610.1,2430.52,18623.89,274.77,253.04
    +05/12/86,261.93,1463.9,1613.5,2400.72,18637.39,275.29,251.17
    +08/12/86,262.39,1455.94,1623.4,2431.29,18710.69,274.86,251.16
    +09/12/86,262.8,1455.31,1635.9,2440.35,18602.69,272.71,249.28
    +10/12/86,261.83,1452.82,1634.6,2442.59,18776.19,272.6,250.96
    +11/12/86,264.5,1448.1,1634,2467.13,18731.19,273.07,248.17
    +12/12/86,262.99,1444.15,1629.8,2463.23,18830.6,273.66,247.35
    +15/12/86,258.32,1436.27,1637,2449.43,18788.89,272.03,248.21
    +16/12/86,258.32,1446.98,1637.9,2440.68,18933.1,271.5,250.04
    +17/12/86,255.11,1436.98,1636.3,2411.08,18847.89,272.9,247.56
    +18/12/86,254.45,1429.95,1630.6,2422.22,18723.69,274.74,246.78
    +19/12/86,256.82,1428.2,1632.2,2463.81,18930,275.12,249.44
    +22/12/86,256.82,1421.62,1652.2,2503.77,18825.39,273.35,248.75
    +23/12/86,254.6,1435.64,1660.9,2501.94,18808.5,273.56,246.34
    +24/12/86,254.37,1435.64,1665.1,2523.92,18902.85,274.39,246.75
    +25/12/86,254.37,1435.64,1665.1,2523.92,18902.85,274.39,246.75
    +26/12/86,254.37,1435.64,1665.1,2523.92,18820.64,274.48,246.92
    +29/12/86,254.37,1434.26,1671.6,2552.45,18820.64,270.44,244.67
    +30/12/86,252.75,1432.25,1673.1,2559.36,18820.64,273.42,243.37
    +31/12/86,252.75,1432.25,1679,2568.3,18820.64,273.42,242.17
    +01/01/87,252.75,1432.25,1679,2568.3,18820.64,270.75,242.17
    +02/01/87,252.67,1413.17,1681.1,2540.06,18820.64,271.14,246.45
    +05/01/87,253.04,1421.88,1680,2552.4,18820.5,270.82,252.19
    +06/01/87,251.22,1434.26,1690.7,2583.87,18936.8,270.42,252.78
    +07/01/87,251.96,1418.05,1722.2,2607.11,18842.39,270.72,255.33
    +08/01/87,251.96,1382.34,1733.1,2603.33,18778.69,273.4,257.28
    +09/01/87,251.96,1348.72,1752.3,2561.73,18810.3,278.7,258.73
    +12/01/87,236.97,1336.44,1755.6,2614.87,18669,284.7,260.3
    +13/01/87,237.85,1326.7,1763.3,2590.83,18544,285.82,259.95
    +14/01/87,239.99,1331.2,1765.2,2578.23,18784.64,288.88,262.64
    +15/01/87,242.95,1353.4,1789,2559.12,18784.64,285.78,265.49
    +16/01/87,244.44,1356.79,1789,2542.57,19149.63,286.93,266.28
    +19/01/87,240.37,1328.3,1778.4,2460.46,19188.7,287.97,269.34
    +20/01/87,240.9,1330.49,1778.9,2449.88,19216.1,285.18,269.04
    +21/01/87,239.94,1332.32,1761.6,2533.9,19429.19,287.97,267.84
    +22/01/87,239.59,1336.78,1777.5,2536.94,19380.5,286.79,273.91
    +23/01/87,239.47,1347.75,1795.3,2499.43,19456.6,284.94,270.11
    +26/01/87,233.45,1309.03,1781.8,2484.35,19554.69,284.04,269.61
    +27/01/87,232.73,1294.76,1814.4,2524.01,19686.8,283.88,273.75
    +28/01/87,227.21,1249.94,1812.1,2553.25,19789.89,288.72,275.4
    +29/01/87,231.2,1272.92,1798.1,2553.25,19921,288.72,274.24
    +30/01/87,235.24,1294.45,1808.3,2553.25,20048.3,288.72,274.08
    +02/02/87,233.02,1276.38,1832.8,2585.22,20072.1,291.32,276.45
    +03/02/87,230.65,1241.23,1828.6,2606.38,19956.3,292.97,275.99
    +04/02/87,230.03,1216.31,1846.7,2636.63,19973.89,294.08,279.64
    +05/02/87,231.48,1229.63,1866.1,2652.14,19795.1,295.18,281.16
    +06/02/87,231.7,1250.68,1898.4,2673.57,19668.81,294.29,280.04
    +09/02/87,230.16,1269.94,1910.7,2713.67,19679.31,296.33,278.16
    +10/02/87,228.8,1254.36,1874.9,2694.85,19814,299.08,275.07
    +11/02/87,230.81,1253.62,1895.8,2739.47,19814,300.8,277.54
    +12/02/87,233.42,1265.63,1878.6,2754.72,19874.89,304.3,278.04
    +13/02/87,232.89,1277.46,1898.1,2740.49,19628.86,305.23,279.7
    +16/02/87,232.15,1260.31,1925.8,2766.06,19532.5,309.1,279.7
    +17/02/87,233.77,1232.9,1942,2792.08,19637.89,306.83,285.49
    +18/02/87,235.35,1249.04,1952,2801.48,19881.8,309.5,285.42
    +19/02/87,236.47,1276.75,1930.1,2775.82,20228.1,313.84,285.57
    +20/02/87,237.98,1265.44,1961.5,2827.4,20080.39,317.97,285.48
    +23/02/87,235.26,1242.94,1939.7,2879.01,19940.5,315.63,282.38
    +24/02/87,235.54,1239.86,1946.8,2848.19,20076.5,315.2,282.88
    +25/02/87,236.24,1250.98,1973.1,2873.58,20186.3,317.81,284
    +26/02/87,235.27,1243.87,1980.2,2843.6,20453.89,317.31,282.96
    +27/02/87,233.95,1244.36,1979.2,2877.87,20421.64,318.31,284.2
    +02/03/87,235.27,1236.55,1983.1,2894.26,20933.8,317.93,283
    +03/03/87,231.18,1244.02,1998.3,2939.05,20971.39,316.05,284.12
    +04/03/87,234.08,1256.7,2002.7,2890.93,21031.69,318.93,288.62
    +05/03/87,236.76,1273.63,2002.8,2798.44,21176.02,321.35,290.52
    +06/03/87,236.48,1262.8,1998.2,2798.24,21105.8,321.93,290.66
    +09/03/87,236.56,1275.19,1973.7,2820.38,21166.39,322.18,288.3
    +10/03/87,237.21,1264.03,1987.7,2731.05,21214.5,322.32,290.86
    +11/03/87,240.62,1253.39,1979.4,2760.9,21313,320.49,290.31
    +12/03/87,242.07,1250.23,1989.7,2750.14,21470.19,318.75,291.22
    +13/03/87,243.77,1243.09,2000,2721.17,21497.89,313.99,289.89
    +16/03/87,241.31,1238.37,1991.8,2669.57,21415.39,312.78,288.23
    +17/03/87,241.27,1220.85,2006.3,2629.28,21514.69,307.34,292.47
    +18/03/87,244.49,1214.38,2006.6,2724.01,21705.1,311.17,292.78
    +19/03/87,239.92,1179.83,1991,2721.28,21644.3,312.17,294.08
    +20/03/87,241.28,1196.12,2017.5,2780.55,21657.6,318.43,298.17
    +23/03/87,242.68,1217.32,2033,2813.4,21588.19,318.87,301.16
    +24/03/87,241.29,1235.58,2056.2,2828.07,21435.3,315.47,301.64
    +25/03/87,238.78,1240.45,2042.9,2831.5,21473,319.97,300.38
    +26/03/87,239.27,1270.5,2037.8,2783.12,21558.8,319.93,300.93
    +27/03/87,242.3,1306.8,2048.6,2798.74,22026.6,319.15,296.13
    +30/03/87,244.8,1296.76,2002.5,2774.88,21627.6,317.27,289.2
    +31/03/87,241.56,1301.71,1997.6,2713.81,21566.69,314.02,291.7
    +01/04/87,241.56,1332.54,1973.1,2695.91,22040.19,309.83,292.39
    +02/04/87,246.91,1334.32,1987.7,2709.41,22367.69,313.64,293.63
    +03/04/87,247.19,1335.33,1965.1,2679.99,22410.8,316.37,300.41
    +06/04/87,253.87,1358.2,1989.6,2679.99,22586.1,317.86,301.95
    +07/04/87,255.99,1331.35,1987,2664.7,22784.6,316.47,296.69
    +08/04/87,256.01,1337.45,1976.7,2729.55,22913,319.28,297.26
    +09/04/87,253.57,1327.37,1962.8,2785.47,22922.19,322.75,292.86
    +10/04/87,249.28,1297.95,1936.7,2766.41,23216.5,323.57,292.49
    +13/04/87,248.01,1282.22,1917.1,2708.94,22919.5,326.7,285.62
    +14/04/87,244.44,1299.96,1908.9,2668.35,23524.1,326.02,279.16
    +15/04/87,246.84,1312.12,1922.2,2693.62,23510.69,325.77,284.44
    +16/04/87,248.98,1323.28,1949.4,2721.12,23868.43,325.77,286.91
    +17/04/87,248.98,1323.28,1949.4,2721.12,23868.43,325.77,286.91
    +20/04/87,248.98,1323.28,1949.4,2721.12,23868.43,329.28,286.09
    +21/04/87,246.1,1312.6,1940.2,2713.36,23886.1,334.03,293.07
    +22/04/87,248.93,1343.66,1955.7,2716.89,24097.69,338.46,287.19
    +23/04/87,246.88,1336.11,1968.3,2719.89,24024.6,336.28,286.82
    +24/04/87,244.44,1315.21,2001.5,2707.61,24006.3,337.16,281.52
    +27/04/87,239.04,1282.11,1986.6,2636.47,23072.39,338.03,281.83
    +28/04/87,239.04,1310.52,2022.1,2617.08,22889.89,337.68,282.51
    +29/04/87,241.68,1314.43,2038.6,2589.54,22889.89,335.09,284.57
    +30/04/87,241.68,1308.14,2050.5,2659.85,23274.8,334.57,288.36
    +01/05/87,240.89,1308.14,2068.5,2685.37,23680.8,334.57,288.03
    +04/05/87,239.08,1309.63,2068.5,2685.75,23680.8,334.55,289.36
    +05/05/87,238.56,1311.41,2065.1,2713.83,23680.8,336.54,295.34
    +06/05/87,242.23,1326.7,2086.5,2792.89,23918.5,336.8,295.47
    +07/05/87,244.2,1328.86,2077.9,2785.56,24207.55,336.24,294.71
    +08/05/87,244.87,1324.95,2126.5,2805.06,24589.23,336.87,293.37
    +11/05/87,246.76,1323.35,2163.3,2846.93,24608.22,340.96,291.57
    +12/05/87,245.36,1314.05,2143.3,2853.42,24535.85,340.96,293.3
    +13/05/87,245.49,1324.88,2163.4,2833.53,24363.19,347.42,293.98
    +14/05/87,245.28,1312.46,2180,2853.92,24651.44,352.28,294.24
    +15/05/87,244.87,1310.82,2189.7,2872.19,24729.02,353.85,287.43
    +18/05/87,244.84,1294.83,2192.1,2875.45,24298.98,354.08,286.65
    +19/05/87,246.07,1299.21,2214.3,2881.47,24077.88,355.63,279.62
    +20/05/87,240.32,1270.99,2174,2878.1,23419.6,356.38,278.21
    +21/05/87,242,1283.18,2153.7,2870.91,23754.01,357.95,280.17
    +22/05/87,240.37,1283.3,2167.5,2897.62,24156.69,354.82,282.16
    +25/05/87,238.95,1280.73,2167.5,2926.1,24582.77,358.01,282.16
    +26/05/87,240.66,1293,2153.4,2935.88,24580.85,358.88,289.11
    +27/05/87,240.2,1306.39,2145.7,2942.92,24539.75,357.94,288.73
    +28/05/87,240.2,1306.39,2157.4,2949.06,24433.64,360.88,290.76
    +29/05/87,240.2,1316.43,2203,2919.7,24772.39,360.88,290.1
    +01/06/87,240.76,1328.89,2228.2,2919.7,24992.77,367.46,289.83
    +02/06/87,237.43,1310.67,2219.6,2934.19,24902.63,366.87,288.46
    +03/06/87,238.21,1311.79,2235.4,2985.1,25049.39,369.11,293.47
    +04/06/87,239.77,1306.28,2214.2,3023.6,25366.1,367.95,295.09
    +05/06/87,238.56,1308.18,2228.8,3064.33,25271.3,368.56,293.45
    +08/06/87,238.56,1308.18,2228.4,3068.06,25523.89,368.92,296.72
    +09/06/87,238.36,1302.49,2265.2,3108.57,25379.88,363.56,297.28
    +10/06/87,238.36,1303.79,2256.1,3097.33,25738.95,364.86,297.47
    +11/06/87,239.41,1311.34,2249.3,3087.52,25890.94,364.55,298.73
    +12/06/87,239.99,1313.16,2289.5,3129.88,25894.27,364.39,301.62
    +15/06/87,242.3,1339.27,2307.6,3129.88,25756.44,361.48,302.69
    +16/06/87,244.28,1346.26,2309,3170.88,25738.85,362.91,304.76
    +17/06/87,247.99,1346.26,2320.4,3178.62,25929.42,365.5,304.81
    +18/06/87,247.27,1346.26,2293.2,3133.74,25750.55,365.31,305.69
    +19/06/87,250.12,1377.69,2266.1,3165.64,25288.1,365.32,306.97
    +22/06/87,254.3,1390.45,2244.6,3131.19,24640.35,367.19,309.65
    +23/06/87,253.97,1401.61,2265.5,3110.41,24794.89,368.13,308.43
    +24/06/87,253.42,1371.03,2284,3178.98,24892.75,368.98,306.86
    +25/06/87,258.15,1395.02,2277.2,3136.31,25031.35,370.09,308.96
    +26/06/87,259.16,1408.56,2291.3,3138.68,25049.81,370.87,307.16
    +29/06/87,259.16,1397.78,2289.3,3151.98,24509.39,372.13,307.9
    +30/06/87,259.07,1382.56,2284.1,3178.19,24176.39,371.04,304
    +01/07/87,256.5,1383.05,2269.8,3163.99,24252.38,370.77,302.94
    +02/07/87,259.69,1399.97,2297.4,3229.15,24636.44,372.99,305.63
    +03/07/87,262.85,1419.27,2328.1,3208.84,24465.48,376.66,305.63
    +06/07/87,265.04,1408.11,2351.9,3220.68,23870.85,381.82,304.92
    +07/07/87,264.26,1414.21,2365.4,3236.41,23816.09,383.88,307.4
    +08/07/87,263.07,1419.2,2356.9,3251.38,23472.42,383.54,308.29
    +09/07/87,261.36,1411.28,2371,3225.97,23755.89,387.17,307.52
    +10/07/87,262.02,1419.76,2382,3207.21,24102.98,391.44,308.37
    +13/07/87,263.32,1431.03,2386.6,3216.11,24118.01,393.99,307.63
    +14/07/87,264.98,1440.47,2403,3253.42,23931.52,390.23,310.68
    +15/07/87,264.5,1462.16,2419.2,3262.3,23969.76,395.71,310.42
    +16/07/87,267.96,1455.8,2443.4,3305.82,24003.6,398.28,312.1
    +17/07/87,271.72,1472.57,2428.7,3342.13,23983.44,399.03,314.59
    +20/07/87,271.28,1483.84,2400.7,3386.09,23328.64,396.94,311.39
    +21/07/87,272.47,1472.94,2390.5,3353.78,23078.35,399.67,308.55
    +22/07/87,269.67,1460.33,2344.5,3380.41,22702.73,397.44,308.47
    +23/07/87,267.98,1443.78,2340.2,3366.82,23036.52,393.27,307.81
    +24/07/87,268.23,1459.66,2346.9,3343.6,23942.94,390.89,309.27
    +27/07/87,268.77,1454.49,2333.9,3346.87,24104.98,385.55,310.65
    +28/07/87,268.99,1468.89,2359.9,3337.46,24385.81,394.38,312.33
    +29/07/87,270.97,1478.07,2383.1,3389.73,24427.1,395.37,315.65
    +30/07/87,274.73,1501.88,2370.5,3419.28,24510.35,397.66,318.05
    +31/07/87,273.57,1510.54,2360.9,3479.24,24488.1,397.98,318.66
    +03/08/87,270.28,1507.38,2334.3,3514.25,24483.81,395.63,317.57
    +04/08/87,270.28,1520.21,2307.8,3531.88,24172.6,398.92,316.23
    +05/08/87,279.28,1536.73,2317.4,3517.13,24297.14,404.52,318.45
    +06/08/87,280.99,1550.19,2261.4,3497.95,24658.23,404.52,322.09
    +07/08/87,283.25,1559.53,2226.2,3536.19,24800.94,408.99,323
    +10/08/87,284.95,1552.98,2242.2,3543.76,25119.69,408.99,328
    +11/08/87,286.05,1559.3,2275.4,3546.52,25282.97,410.79,333.33
    +12/08/87,283.06,1548.89,2286.1,3557.43,25559.23,409.21,332.39
    +13/08/87,282.6,1542.83,2290.1,3514.27,25575.73,406.09,334.65
    +14/08/87,281.64,1563.06,2295.4,3512.15,25494.01,404.62,333.99
    +17/08/87,282.12,1570.28,2259.6,3510.66,25378.88,398.34,334.11
    +18/08/87,275.4,1552.68,2224.8,3504.87,25344.34,401.81,329.25
    +19/08/87,276.42,1530,2197.6,3450.64,25231.59,395.86,329.83
    +20/08/87,279,1544.2,2185.3,3408.01,25396.56,393.86,334.84
    +21/08/87,280.21,1546.66,2205.8,3446.59,25559.18,394.51,335.9
    +24/08/87,280.39,1536.06,2225.1,3391.26,25754.31,399,333.33
    +25/08/87,282.6,1529.62,2248.1,3447.3,25643.39,404.17,336.77
    +26/08/87,282.52,1536.58,2249.6,3526.26,25875.73,401.91,334.57
    +27/08/87,277.35,1531.82,2245.8,3583.33,25968.77,399.72,331.38
    +28/08/87,275.72,1540.15,2249.7,3611.74,25974.96,396.77,327.04
    +31/08/87,272.32,1537.81,2249.7,3611.74,26029.22,391.17,329.79
    +01/09/87,274.81,1547.7,2272.8,3644.28,26118.42,381.66,323.4
    +02/09/87,269.99,1537.21,2249.5,3635.86,25946.6,384.61,321.68
    +03/09/87,269.18,1516.75,2268.1,3653.95,25649.88,376.71,320.21
    +04/09/87,266.95,1500.17,2274.9,3654.48,25744.03,380.45,316.7
    +07/09/87,262.35,1471.83,2283.6,3646.33,25004.09,384.21,316.7
    +08/09/87,265.58,1481.42,2275,3601.54,25204.09,390.55,313.56
    +09/09/87,266.56,1491.95,2249.1,3577.64,24937.93,391.26,313.92
    +10/09/87,269.72,1507.2,2253.2,3600.96,24795.24,389.97,317.13
    +11/09/87,268.24,1509.88,2261.2,3660.5,24828.27,391.47,321.98
    +14/09/87,273.16,1531.07,2271.8,3649.84,24954.02,391.22,323.08
    +15/09/87,272.02,1524.79,2264.5,3646.92,24954.02,388.05,317.74
    +16/09/87,268.87,1515.38,2279.8,3604.64,24967.73,383.4,314.86
    +17/09/87,265.44,1509.73,2304.5,3571.36,24855.31,380.98,314.93
    +18/09/87,266.12,1502.62,2328.3,3649.96,24844.84,376.57,314.86
    +21/09/87,265.65,1496.86,2334.8,3667.95,24912.42,368.35,310.54
    +22/09/87,261.93,1495.74,2335.5,3695.53,24866.06,372.54,319.5
    +23/09/87,268.7,1503.11,2352.4,3763.11,24866.06,373.83,321.19
    +24/09/87,264.56,1498.34,2353.4,3764.42,24944.9,375.51,319.72
    +25/09/87,265.6,1492.62,2342.6,3840.11,25095.8,376.86,320.16
    +28/09/87,267.9,1493.21,2368.1,3884.65,25837.3,384.01,323.2
    +29/09/87,267.99,1505.26,2368.3,3859.48,25998,384.36,321.69
    +30/09/87,267.31,1500.17,2366,3943.64,26010.88,380.12,321.83
    +01/10/87,268.13,1519.99,2373.8,3949.73,25721.74,380.99,327.34
    +02/10/87,268.11,1543.05,2382.2,3932.04,25862.45,383.68,328.07
    +05/10/87,268.88,1538.07,2385.8,3944.24,26018.33,386.35,328.08
    +06/10/87,265.95,1525.23,2367.9,3906.44,26088.97,389.1,319.22
    +07/10/87,263.1,1517.65,2359.8,3936.13,25952.27,388.11,318.54
    +08/10/87,263.83,1519.77,2375.5,3936.13,26286.75,388.45,314.16
    +09/10/87,260.06,1478.86,2366.5,3882.42,26338.77,389.21,311.05
    +12/10/87,256.77,1480.16,2338.5,3900.17,26284.65,386.38,309.39
    +13/10/87,258.81,1500.91,2350.2,3841.28,26400.63,384.54,314.52
    +14/10/87,253.93,1497.38,2322.9,3844.48,26646.43,383.71,305.23
    +15/10/87,248.52,1460.59,2301.9,3828.64,26428.22,382.55,298.08
    +16/10/87,247.09,1458.54,2301.9,3783.2,26366.74,375.47,282.7
    +19/10/87,217.43,1321.61,2052.3,3362.39,25746.56,341.93,224.99
    +20/10/87,204.57,1302.8,1801.6,3362.39,21910.08,341.93,236.83
    +21/10/87,223.42,1379.53,1943.8,3362.39,23947.4,341.93,258.38
    +22/10/87,207.24,1287.58,1833.2,3362.39,24404.45,314.32,248.25
    +23/10/87,207.7,1292.67,1795.2,3362.39,23201.22,288.1,248.22
    +26/10/87,188.43,1193.31,1684.1,2241.69,22202.56,277.77,227.67
    +27/10/87,194.57,1225.47,1703.3,2395.72,22834.96,274.06,233.19
    +28/10/87,182.99,1142.17,1658.4,2370.16,22577.53,260.15,233.28
    +29/10/87,183.45,1104.4,1682,2204.52,22033.89,258.68,244.77
    +30/10/87,193.72,1177.38,1749.8,2240.13,22765.04,267.27,251.79
    +02/11/87,188.3,1163.87,1723.7,2203.23,23358.6,273.74,255.74
    +03/11/87,178.25,1129.99,1653.9,2180.74,23358.6,273.45,250.82
    +04/11/87,171.52,1097.52,1608.1,2077.11,23060.53,267.02,248.96
    +05/11/87,171.1,1093.39,1638.8,1960.9,22629.56,261.38,254.48
    +06/11/87,171.63,1067.36,1620.8,2113.67,22795.02,262.45,250.41
    +09/11/87,159.4,1012.09,1565.2,2139.31,22418.37,262.44,243.17
    +10/11/87,152.36,945.91,1573.5,2043.24,21686.46,256.65,239
    +11/11/87,170.38,988.19,1639.3,2046.18,21036.76,251.22,241.9
    +12/11/87,185.22,1061.64,1702.5,2150.87,21546.5,254.9,249.9
    +13/11/87,180.13,1075.87,1678.3,2226.74,22448.25,259.92,245.64
    +16/11/87,187.27,1082.72,1684.7,2310.86,22615.43,262.77,246.76
    +17/11/87,179.95,1063.38,1660.1,2290.37,22344.28,257.52,243.04
    +18/11/87,182.01,1063.38,1663.7,2285.15,22734.49,259.32,245.55
    +19/11/87,177.34,1055.6,1639.1,2257.6,22668.8,257.04,240.05
    +20/11/87,170.27,1027.34,1633.4,2214.7,22705.56,256.19,242
    +23/11/87,175.41,1037.3,1657.7,2141.71,22705.56,256.21,242.99
    +24/11/87,179.27,1080.39,1689.1,2134.84,22856.02,254.46,246.39
    +25/11/87,174.95,1067.24,1664.1,2184.41,23219.69,255.21,244.1
    +26/11/87,171.78,1058.65,1660.7,2179.58,23282.19,253.3,244.1
    +27/11/87,170.96,1052.55,1651.6,2194.19,23268.2,252.86,240.34
    +30/11/87,159.26,1022.84,1579.9,2138.39,22686.78,250.17,230.3
    +01/12/87,162.59,1030.24,1578.5,2108.55,22832.89,246.21,232
    +02/12/87,164.26,1044.78,1590.3,2100.83,22915.49,245.28,233.45
    +03/12/87,163.47,1037.94,1588.4,2057.43,22808.16,239.69,225.21
    diff --git a/wt-3.1.7a/examples/widgetgallery/treeview.xml b/wt-3.1.7a/examples/widgetgallery/treeview.xml
    new file mode 100644
    index 0000000..496c1b2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/widgetgallery/treeview.xml
    @@ -0,0 +1,29 @@
    +<?xml version="1.0" encoding="ISO-8859-1" ?>
    +<messages>
    +  <message id="treeview-introduction">
    +    <h2>WTreeView example</h2>
    +
    +    <p>This example illustrates the WTreeView widget. This widget is
    +    part of Wt's MVC widgets, and are an alternative to the WTree, and
    +    WTreeTable widgets which are not MVC.</p>
    +
    +    <p>The widget supports very large models by loading only the
    +    visible region (with some margin) in the browser. This results in
    +    low memory consumption (on client and server) and fast load
    +    times.</p>
    +
    +    <p>This example uses a WStandardItemModel to populate the tree
    +    table. As is demonstrated, various roles may be used to indicate
    +    text, icons, selectable items (through check boxes), and also URLs
    +    or internal paths.</p>
    +
    +    <p>Many aspects of the tree view widget are not illustrated here,
    +    such as the various supported selection behaviors and modes, and
    +    reacting to item click events</p>
    +
    +    <p>Except for the selection of items, the view does not yet offer
    +    the possibility to modify the model. Together with more fine
    +    grained control of how to display the data through delegates,
    +    support for editing will be added in the near future.</p>
    +  </message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/wt-homepage/CMakeLists.txt b/wt-3.1.7a/examples/wt-homepage/CMakeLists.txt
    new file mode 100644
    index 0000000..43a2d47
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/CMakeLists.txt
    @@ -0,0 +1,54 @@
    +IF(BOOST_FS_LIB)
    +
    +INCLUDE(CheckFunctionExists)
    +
    +WT_ADD_EXAMPLE(Home.wt
    +	main.C
    +	Home.C
    +	WtHome.C
    +	JWtHome.C
    +	FileItem.C
    +	SourceView.C
    +	ExampleSourceViewer.C
    +	../blog/BlogSession.C
    +	../blog/BlogRSSFeed.C
    +        ../blog/view/BlogView.C
    +	../blog/view/CommentView.C
    +	../blog/view/PostView.C
    +  	../blog/view/EditUsers.C
    +	../blog/model/Comment.C
    +	../blog/model/Post.C
    +	../blog/model/Tag.C
    +	../blog/model/User.C
    +	../blog/asciidoc/asciidoc.C
    +)
    +
    +TARGET_LINK_LIBRARIES(Home.wt wtdbo wtdbosqlite3 ${BOOST_FS_LIB})
    +
    +# Test whether crypt(3) is provided by libc. If it's not, check if
    +# libcrypt exists and if it provides crypt(3).
    +CHECK_FUNCTION_EXISTS(crypt CRYPT_EXISTS)
    +IF(NOT CRYPT_EXISTS)
    +  CHECK_LIBRARY_EXISTS(crypt crypt "" CRYPT_LIB_EXISTS)
    +  IF(CRYPT_LIB_EXISTS)
    +    SET(CMAKE_REQUIRED_LIBRARIES "crypt")
    +    CHECK_FUNCTION_EXISTS(crypt CRYPT_EXISTS)
    +  ENDIF(CRYPT_LIB_EXISTS)
    +ENDIF(NOT CRYPT_EXISTS)
    +
    +IF(CRYPT_LIB_EXISTS)
    +  TARGET_LINK_LIBRARIES(Home.wt crypt)
    +ENDIF(CRYPT_LIB_EXISTS)
    +
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src
    +  ${WT_SOURCE_DIR}/examples/blog
    +  )
    +
    +ADD_DEPENDENCIES(Home.wt wt ${EXAMPLES_CONNECTOR})
    +
    +ELSE(BOOST_FS_LIB)
    +  
    +  MESSAGE(STATUS "** Not building wt-homepage example: requires boost_filesystem library.")
    +
    +ENDIF(BOOST_FS_LIB)
    diff --git a/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.C b/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.C
    new file mode 100644
    index 0000000..f0fea7d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.C
    @@ -0,0 +1,365 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +#include <stdlib.h>
    +#include <algorithm>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLineEdit>
    +#include <Wt/WGridLayout>
    +#include <Wt/WHBoxLayout>
    +#include <Wt/WPushButton>
    +#include <Wt/WTable>
    +#include <Wt/WText>
    +#include <Wt/WTreeView>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WViewWidget>
    +
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/filesystem/exception.hpp>
    +#include <boost/filesystem/convenience.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include "ExampleSourceViewer.h"
    +#include "FileItem.h"
    +
    +using namespace Wt; 
    +namespace fs = boost::filesystem;
    +
    +// Same as p.filename() in latest boost::filesystem
    +static std::string filename(const fs::path& p)
    +{
    +  return p.empty() ? std::string() : *--p.end();
    +}
    +
    +// Same as p.stem() in latest boost::filesystem
    +static std::string stem(const fs::path& p)
    +{
    +  std::string fn = filename(p);
    +  std::size_t pos = fn.find('.');
    +  if (pos == std::string::npos)
    +    return fn;
    +  else
    +    return fn.substr(0, pos);
    +}
    +
    +// Should be same as p.parent_path() in latest boost::filesystem
    +// This is not entirely according to fs::path::parent_path() in 1.39.0
    +fs::path parent_path(const fs::path& p)
    +{
    +  std::string fn = filename(p);
    +  std::string path = p.string();
    +
    +  return path.substr(0, path.length() - fn.length() - 1);
    +}
    +
    +static bool comparePaths(const fs::path& p1, const fs::path& p2)
    +{
    +  return filename(p1) > filename(p2);
    +}
    +
    +ExampleSourceViewer::ExampleSourceViewer(const std::string& deployPath,
    +					 const std::string& examplesRoot,
    +					 const std::string& examplesType)
    +  : deployPath_(deployPath),
    +    examplesRoot_(examplesRoot),
    +    examplesType_(examplesType)
    +{
    +  wApp->internalPathChanged().connect
    +    (this, &ExampleSourceViewer::handlePathChange);
    +
    +  handlePathChange();
    +}
    +
    +void ExampleSourceViewer::handlePathChange()
    +{
    +  WApplication *app = wApp;
    +
    +  if (app->internalPathMatches(deployPath_)) {
    +    std::string example = app->internalPathNextPart(deployPath_);
    +
    +    if (example.find("..") != std::string::npos
    +	|| example.find('/') != std::string::npos
    +	|| example.find('\\') != std::string::npos)
    +      setExample("INVALID_DIR", "INVALID");
    +    else
    +      setExample(examplesRoot_ + example, example);
    +  }
    +}
    +
    +void ExampleSourceViewer::setExample(const std::string& exampleDir,
    +				     const std::string& example)
    +{
    +  clear();
    +
    +  bool exists = false;
    +  try {
    +    exists = fs::exists(exampleDir);
    +  } catch (std::exception&) {
    +  }
    +
    +  if (!exists) {
    +    addWidget(new WText("No such example: " + exampleDir));
    +    return;
    +  }
    +
    +  model_ = new WStandardItemModel(0, 1, this);
    +  if (examplesType_ == "CPP") {
    +    cppTraverseDir(model_->invisibleRootItem(), exampleDir);
    +  } else if (examplesType_ == "JAVA") {
    +    javaTraverseDir(model_->invisibleRootItem(), exampleDir);
    +  }
    +
    +  WApplication::instance()->setTitle(tr("srcview.title." + example));
    +  WText *title = 
    +    new WText(tr("srcview.title." + examplesType_ + "." + example));
    +
    +  exampleView_ = new WTreeView();
    +  exampleView_->setHeaderHeight(0);
    +  exampleView_->resize(300, WLength::Auto);
    +  exampleView_->setSortingEnabled(false);
    +  exampleView_->setModel(model_);
    +  exampleView_->expandToDepth(1);
    +  exampleView_->setSelectionMode(SingleSelection);
    +  exampleView_->setAlternatingRowColors(false);
    +  exampleView_->selectionChanged().connect
    +    (this, &ExampleSourceViewer::showFile);
    +
    +  sourceView_ = new SourceView(FileItem::FileNameRole, 
    +			       FileItem::ContentsRole,
    +			       FileItem::FilePathRole);
    +  sourceView_->setStyleClass("source-view");
    +
    +  /*
    +   * Expand path to first file, to show something in the source viewer
    +   */
    +  WStandardItem *w = model_->item(0);
    +  do {
    +    exampleView_->setExpanded(w->index(), true);
    +    if (w->rowCount() > 0)
    +      w = w->child(0);
    +    else {
    +      exampleView_->select(w->index(), Select);
    +      w = 0;
    +    }
    +  } while (w);
    +
    +  WVBoxLayout *topLayout = new WVBoxLayout();
    +  topLayout->addWidget(title, 0, AlignTop | AlignJustify);
    +
    +  WHBoxLayout *gitLayout = new WHBoxLayout();
    +  gitLayout->addWidget(exampleView_, 0);
    +  gitLayout->addWidget(sourceView_, 1);
    +  topLayout->addLayout(gitLayout, 1);
    +  gitLayout->setResizable(0);
    +
    +  setLayout(topLayout);
    +  setStyleClass("maindiv");
    +}
    +
    +/*
    + * Return the companion implementation/header file for a C++ source file.
    + */
    +static fs::path getCompanion(const fs::path& path) 
    +{
    +  std::string ext = fs::extension(path);
    +
    +  if (ext == ".h")
    +    return parent_path(path) / (stem(path) + ".C");
    +  else if (ext == ".C" || ext == ".cpp")
    +    return parent_path(path) / (stem(path) + ".h");
    +  else
    +    return fs::path();
    +}
    +
    +void ExampleSourceViewer::cppTraverseDir(WStandardItem* parent, 
    +					 const fs::path& path)
    +{
    +  static const char *supportedFiles[] = {
    +    ".C", ".cpp", ".h", ".css", ".xml", ".png", ".gif", ".csv", ".ico", 0
    +  };
    +
    +  FileItem* dir = new FileItem("icons/yellow-folder-open.png", filename(path),
    +			       "");
    +  parent->appendRow(dir);
    +  parent = dir;
    +  try {
    +    std::set<fs::path> paths;
    +
    +    fs::directory_iterator end_itr;
    +    for (fs::directory_iterator i(path); i != end_itr; ++i) 
    +      paths.insert(*i);
    +
    +    std::vector<FileItem*> classes, files;
    +    std::vector<fs::path> dirs;
    +
    +    while (!paths.empty()) {
    +      fs::path p = *paths.begin();
    +      paths.erase(p);
    +
    +      // skip symbolic links and other files
    +      if (fs::is_symlink(p))
    +	continue;
    +
    +      // skip files with an extension we do not want to handle
    +      if (fs::is_regular(p)) {
    +	std::string ext = fs::extension(p);
    +	bool supported = false;
    +	for (const char **s = supportedFiles; *s != 0; ++s)
    +	  if (*s == ext) {
    +	    supported = true;
    +	    break;
    +	  }
    +	
    +	if (!supported)
    +	  continue;
    +      }
    +
    +      // see if we have one file of a class (.C, .h)
    +      fs::path companion = getCompanion(p);
    +      if (!companion.empty()) {
    +	std::set<fs::path>::iterator it_companion = paths.find(companion);
    + 
    +	  if (it_companion != paths.end()) {
    +	    std::string className = stem(p);
    +	    escapeText(className);
    +	    std::string label = "<i>class</i> " + className;
    +
    +	    FileItem *classItem = 
    +	      new FileItem("icons/cppclass.png", label, std::string());
    +	    classItem->setFlags(classItem->flags() | ItemIsXHTMLText);
    +
    +	    FileItem *header = new FileItem("icons/document.png", filename(p),
    +					    p.string());
    +	    FileItem *cpp = new FileItem("icons/document.png",
    +					 filename(*it_companion),
    +					 (*it_companion).string());
    +	    classItem->appendRow(header);
    +	    classItem->appendRow(cpp);
    +	  
    +	    classes.push_back(classItem);
    +	    paths.erase(it_companion);
    +	  } else {
    +	    FileItem *file = new FileItem("icons/document.png", filename(p),
    +					  p.string());
    +	    files.push_back(file);
    +	  }
    +      } else if (fs::is_directory(p)) {
    +	dirs.push_back(p);
    +      } else {
    +	FileItem *file = new FileItem("icons/document.png", filename(p),
    +				      p.string());
    +	files.push_back(file);
    +      }
    +    }
    +
    +    std::sort(dirs.begin(), dirs.end(), comparePaths);
    +
    +    for (unsigned int i = 0; i < classes.size(); i++)
    +      parent->appendRow(classes[i]);
    +
    +    for (unsigned int i = 0; i < files.size(); i++)
    +      parent->appendRow(files[i]);
    +
    +    for (unsigned int i = 0; i < dirs.size(); i++)
    +      cppTraverseDir(parent, dirs[i]);
    +  } catch (fs::filesystem_error& e) {
    +    std::cerr << e.what() << std::endl;
    +  }
    +}
    +
    +void ExampleSourceViewer::javaTraversePackages(WStandardItem *parent,
    +					       const fs::path& srcPath,
    +					       const std::string packageName)
    +{
    +  fs::directory_iterator end_itr;
    +
    +  FileItem *packageItem = 0;
    +  for (fs::directory_iterator i(srcPath); i != end_itr; ++i) {
    +    fs::path p = *i;
    +    if (fs::is_regular(p)) {
    +      if (!packageItem) {
    +	packageItem = new FileItem("icons/package.png", packageName, "");
    +	parent->appendRow(packageItem);
    +      }
    +
    +      FileItem *file = new FileItem("icons/javaclass.png", filename(p),
    +				    p.string());
    +      packageItem->appendRow(file);
    +    }
    +  }
    +
    +  for (fs::directory_iterator i(srcPath); i != end_itr; ++i) {
    +    fs::path p = *i;
    +    if (fs::is_directory(p)) {  
    +      std::string pn = packageName;
    +      if (!pn.empty())
    +	pn += ".";
    +      pn += filename(p);
    +
    +      javaTraversePackages(parent, p, pn);
    +    }
    +  }
    +}
    +
    +void ExampleSourceViewer::javaTraverseDir(WStandardItem* parent, 
    +					  const fs::path& path)
    +{
    +  FileItem* dir = new FileItem("icons/yellow-folder-open.png", filename(path),
    +			       "");
    +  parent->appendRow(dir);
    +  parent = dir;
    +
    +  std::vector<fs::path> files, dirs;
    +
    +  fs::directory_iterator end_itr;
    +  for (fs::directory_iterator i(path); i != end_itr; ++i) {
    +    fs::path p = *i;
    +    if (fs::is_directory(p)) {
    +      if (filename(p) == "src") {
    +	FileItem* dir = new FileItem("icons/package-folder-open.png",
    +				     filename(p), "");
    +	parent->appendRow(dir);
    +	javaTraversePackages(dir, p, "");
    +      } else
    +	dirs.push_back(p);
    +    } else {
    +      files.push_back(p);
    +    }
    +  }
    +
    +  std::sort(dirs.begin(), dirs.end(), comparePaths);
    +  std::sort(files.begin(), files.end(), comparePaths);
    +
    +  for (unsigned int i = 0; i < dirs.size(); i++)
    +    javaTraverseDir(parent, dirs[i]);
    +
    +  for (unsigned int i = 0; i < files.size(); i++) {
    +    FileItem *file = new FileItem("icons/document.png", filename(files[i]),
    +				  files[i].string());
    +    parent->appendRow(file);
    +  }
    +}
    +
    +/*! \brief Displayed the currently selected file.
    + */
    +void ExampleSourceViewer::showFile() {
    +  if (exampleView_->selectedIndexes().empty())
    +    return;
    +
    +  WModelIndex selected = *exampleView_->selectedIndexes().begin();
    +
    +  // expand a folder when clicked
    +  if (exampleView_->model()->rowCount(selected) > 0
    +      && !exampleView_->isExpanded(selected))
    +    exampleView_->setExpanded(selected, true);
    +
    +  // (for a file,) load data in source viewer
    +  sourceView_->setIndex(selected);
    +}
    diff --git a/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.h b/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.h
    new file mode 100644
    index 0000000..bd42ccc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/ExampleSourceViewer.h
    @@ -0,0 +1,56 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba 
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +#include <stdlib.h>
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WTreeView>
    +#include <Wt/WStandardItemModel>
    +
    +#include "FileItem.h"
    +#include "SourceView.h"
    +
    +/*! \class ExampleSourceViewer 
    + *  \brief A simple widget to visualise a set of example source files.
    + */
    +class ExampleSourceViewer: public Wt::WContainerWidget
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  ExampleSourceViewer(const std::string& deployPath,
    +		      const std::string& examplesRoot,
    +		      const std::string& examplesType); 
    +
    +private:
    +  Wt::WTreeView  *exampleView_;
    +  SourceView *sourceView_;
    +
    +  std::string deployPath_;
    +  std::string examplesRoot_;
    +  std::string examplesType_;
    +
    +  Wt::WStandardItemModel *model_;
    +
    +  void cppTraverseDir(Wt::WStandardItem* parent, 
    +		      const boost::filesystem::path& path);
    +  void javaTraverseDir(Wt::WStandardItem* parent, 
    +		       const boost::filesystem::path& path);
    +  void javaTraversePackages(Wt::WStandardItem *parent,
    +			    const boost::filesystem::path& srcPath,
    +			    const std::string packageName);
    +
    +  /*! \brief Displayed the currently selected file.
    +   */
    +  void showFile(); 
    +
    +  void handlePathChange();
    +
    +  void setExample(const std::string& exampleDir,
    +		  const std::string& example);
    +};
    diff --git a/wt-3.1.7a/examples/wt-homepage/FileItem.C b/wt-3.1.7a/examples/wt-homepage/FileItem.C
    new file mode 100644
    index 0000000..7bd9bfc
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/FileItem.C
    @@ -0,0 +1,8 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "FileItem.h"
    diff --git a/wt-3.1.7a/examples/wt-homepage/FileItem.h b/wt-3.1.7a/examples/wt-homepage/FileItem.h
    new file mode 100644
    index 0000000..7aba808
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/FileItem.h
    @@ -0,0 +1,44 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef EXAMPLE_ITEM_H
    +#define EXAMPLE_ITEM_H
    +
    +#include <string.h>
    +
    +#include "Wt/WStandardItem"
    +#include "Wt/WStandardItemModel"
    +#include "Wt/WString"
    +
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/filesystem/exception.hpp>
    +
    +/*! \class FileItem
    + *  \brief WStandardItem which stores a file.
    + *
    + * The SourceView class reads data from 3 additional roles:
    + *  - ContentsRole: file contents
    + *  - FilePathRole: the path which holds the file contents
    + *  - FileNameRole: the original file name (used to derive the file type)
    + */
    +class FileItem : public Wt::WStandardItem
    +{
    +public:
    +  static const int ContentsRole = Wt::UserRole;
    +  static const int FilePathRole = Wt::UserRole + 1;
    +  static const int FileNameRole = Wt::UserRole + 2;
    +  
    +  FileItem(const std::string& iconUri, const Wt::WString& text,
    +	   const std::string& fileName)
    +    : WStandardItem(iconUri, text)
    +  { 
    +    setData(fileName, FileNameRole);
    +    setData(fileName, FilePathRole);
    +  }
    +};
    + 
    +#endif // FILE_ITEM_H
    diff --git a/wt-3.1.7a/examples/wt-homepage/Home.C b/wt-3.1.7a/examples/wt-homepage/Home.C
    new file mode 100644
    index 0000000..f710940
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/Home.C
    @@ -0,0 +1,364 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <fstream>
    +#include <iostream>
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/tokenizer.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include <Wt/WAnchor>
    +#include <Wt/WApplication>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLogger>
    +#include <Wt/WMenu>
    +#include <Wt/WStackedWidget>
    +#include <Wt/WVBoxLayout>
    +#include <Wt/WTabWidget>
    +#include <Wt/WTable>
    +#include <Wt/WTableCell>
    +#include <Wt/WText>
    +#include <Wt/WViewWidget>
    +
    +#include "Home.h"
    +#include "view/BlogView.h"
    +
    +static const std::string SRC_INTERNAL_PATH = "src";
    +
    +/* Shortcut for a <div id=""> */
    +class Div : public WContainerWidget
    +{
    +public:
    +  Div(WContainerWidget *parent, const std::string& id)
    +    : WContainerWidget(parent)
    +  {
    +    setId(id);
    +  }
    +};
    +
    +Home::~Home() 
    +{
    +}
    +
    +Home::Home(const WEnvironment& env, const std::string& title,
    +	   const std::string& resourceBundle, const std::string& cssPath)
    +  : WApplication(env),
    +    releases_(0),
    +    homePage_(0),
    +    sourceViewer_(0)
    +{
    +  messageResourceBundle().use(appRoot() + resourceBundle, false);
    +  useStyleSheet(cssPath + "/wt.css");
    +  useStyleSheet(cssPath + "/wt_ie.css", "lt IE 7");
    +  useStyleSheet("css/home.css");
    +  useStyleSheet("css/sourceview.css");
    +  setTitle(title);
    +
    +  setLocale("");
    +  language_ = 0;
    +}
    +
    +void Home::init()
    +{
    +  internalPathChanged().connect(this, &Home::setup);
    +  internalPathChanged().connect(this, &Home::setLanguageFromPath);
    +  internalPathChanged().connect(this, &Home::logInternalPath);
    +
    +  setup();
    +
    +  setLanguageFromPath();
    +}
    +
    +void Home::setup()
    +{
    +  /*
    +   * This function switches between the two major components of the homepage,
    +   * depending on the internal path:
    +   * /src -> source viewer
    +   * /... -> homepage
    +   */
    +  std::string base = internalPathNextPart("/");
    +
    +  if (base == SRC_INTERNAL_PATH) {
    +    if (!sourceViewer_) {
    +      delete homePage_;
    +      homePage_ = 0;
    +
    +      root()->clear();
    +
    +      sourceViewer_ = sourceViewer("/" + SRC_INTERNAL_PATH + "/");
    +      WVBoxLayout *layout = new WVBoxLayout();
    +      layout->setContentsMargins(0, 0, 0, 0);
    +      layout->addWidget(sourceViewer_);
    +      root()->setLayout(layout);
    +    }
    +  } else {
    +    if (!homePage_) {
    +      delete sourceViewer_;
    +      sourceViewer_ = 0;
    +
    +      root()->clear();
    +
    +      homePage_ = initHome();
    +      root()->addWidget(homePage_);
    +    }
    +  }
    +}
    +
    +WWidget *Home::initHome()
    +{
    +  WContainerWidget *result = new WContainerWidget(root());
    +  Div *topWrapper = new Div(result, "top_wrapper");
    +  Div *topContent = new Div(topWrapper, "top_content");
    +
    +  Div *languagesDiv = new Div(topContent, "top_languages");
    +
    +  for (unsigned i = 0; i < languages.size(); ++i) {
    +    if (i != 0)
    +      new WText("- ", languagesDiv);
    +
    +    const Lang& l = languages[i];
    +
    +    WAnchor *a = new WAnchor("", WString::fromUTF8(l.longDescription_),
    +			     languagesDiv);
    +    a->setRefInternalPath(l.path_);
    +  }
    +
    +  WText *topWt = new WText(tr("top_wt"), topContent);
    +  topWt->setInline(false);
    +  topWt->setId("top_wt");
    +
    +  WText *bannerWt = new WText(tr("banner_wrapper"), result);
    +  bannerWt->setId("banner_wrapper");
    +
    +  Div *mainWrapper = new Div(result, "main_wrapper");
    +  Div *mainContent = new Div(mainWrapper, "main_content");
    +  Div *mainMenu = new Div(mainContent, "main_menu");
    +
    +  WStackedWidget *contents = new WStackedWidget();
    +  contents->setId("main_page");
    +
    +  mainMenu_ = new WMenu(contents, Vertical, mainMenu);
    +  mainMenu_->setRenderAsList(true);
    +
    +  mainMenu_->addItem
    +    (tr("introduction"), introduction())->setPathComponent("");
    +
    +  mainMenu_->addItem
    +    (tr("blog"), deferCreate(boost::bind(&Home::blog, this)));
    +
    +  mainMenu_->addItem
    +    (tr("features"), wrapView(&Home::features),  WMenuItem::PreLoading);
    +
    +  mainMenu_->addItem
    +    (tr("documentation"), wrapView(&Home::documentation),
    +     WMenuItem::PreLoading);
    +
    +  mainMenu_->addItem
    +    (tr("examples"), examples(),
    +     WMenuItem::PreLoading)->setPathComponent("examples/");
    +
    +  mainMenu_->addItem
    +    (tr("download"), deferCreate(boost::bind(&Home::download, this)),
    +     WMenuItem::PreLoading);
    +
    +  mainMenu_->addItem
    +    (tr("community"), wrapView(&Home::community), WMenuItem::PreLoading);
    +
    +  mainMenu_->addItem
    +    (tr("other-language"), wrapView(&Home::otherLanguage),
    +     WMenuItem::PreLoading);
    +
    +  mainMenu_->itemSelectRendered().connect(this, &Home::updateTitle);
    +
    +  mainMenu_->itemSelected().connect(this, &Home::googleAnalyticsLogger);
    +
    +  // Make the menu be internal-path aware.
    +  mainMenu_->setInternalPathEnabled("/");
    +
    +  sideBarContent_ = new WContainerWidget(mainMenu);
    +
    +  mainContent->addWidget(contents);
    +  WContainerWidget *clearAll = new WContainerWidget(mainContent);
    +  clearAll->setStyleClass("clearall");
    +
    +  WText *footerWrapper = new WText(tr("footer_wrapper"), result);
    +  footerWrapper->setId("footer_wrapper");
    +
    +  return result;
    +}
    +
    +void Home::setLanguage(int index)
    +{
    +  if (homePage_) {
    +    const Lang& l = languages[index];
    +
    +    setLocale(l.code_);
    +
    +    std::string langPath = l.path_;
    +    mainMenu_->setInternalBasePath(langPath);
    +    examplesMenu_->setInternalBasePath(langPath + "examples");
    +    updateTitle();
    +
    +    language_ = index;
    +  }
    +}
    +
    +WWidget *Home::linkSourceBrowser(const std::string& example)
    +{
    +  WAnchor *a = new WAnchor("", tr("source-browser"));
    +  a->setRefInternalPath("/" + SRC_INTERNAL_PATH + "/" + example);
    +  return a;
    +}
    +
    +void Home::setLanguageFromPath()
    +{
    +  std::string langPath = internalPathNextPart("/");
    +
    +  if (langPath.empty())
    +    langPath = '/';
    +  else
    +    langPath = '/' + langPath + '/';
    +
    +  int newLanguage = 0;
    +
    +  for (unsigned i = 0; i < languages.size(); ++i) {
    +    if (languages[i].path_ == langPath) {
    +      newLanguage = i;
    +      break;
    +    }
    +  }
    +
    +  if (newLanguage != language_)
    +    setLanguage(newLanguage);
    +}
    +
    +void Home::updateTitle()
    +{
    +  if (mainMenu_->currentItem()) {
    +    setTitle(tr("wt") + " - " + mainMenu_->currentItem()->text());
    +  }
    +}
    +
    +void Home::logInternalPath(const std::string& path)
    +{
    +  // simulate an access log for the interal paths
    +  log("path") << path;
    +
    +  // If this goes to /src, we need to invoke google analytics method too
    +  if (path.size() >= 4 && path.substr(0, 4) == "/src") {
    +    googleAnalyticsLogger();
    +  }
    +}
    +
    +WWidget *Home::introduction()
    +{
    +  return new WText(tr("home.intro"));
    +}
    +
    +WWidget *Home::blog()
    +{
    +  return new BlogView("/blog/", appRoot() + "blog.db", "/wt/blog/feed/");
    +}
    +
    +WWidget *Home::status()
    +{
    +  return new WText(tr("home.status"));
    +}
    +
    +WWidget *Home::features()
    +{
    +  return new WText(tr("home.features"));
    +}
    +
    +WWidget *Home::documentation()
    +{
    +  return new WText(tr("home.documentation"));
    +}
    +
    +WWidget *Home::otherLanguage()
    +{
    +  return new WText(tr("home.other-language"));
    +}
    +
    +WWidget *Home::wrapView(WWidget *(Home::*createWidget)())
    +{
    +  return makeStaticModel(boost::bind(createWidget, this));
    +}
    +
    +std::string Home::href(const std::string& url, const std::string& description)
    +{
    +  return "<a href=\"" + url + "\" target=\"_blank\">" + description + "</a>";
    +}
    +
    +WWidget *Home::community()
    +{
    +  return new WText(tr("home.community"));
    +}
    +
    +void Home::readReleases(WTable *releaseTable)
    +{
    +  std::ifstream f((filePrefix() + "releases.txt").c_str());
    +
    +  releaseTable->clear();
    +
    +  releaseTable->elementAt(0, 0)
    +    ->addWidget(new WText(tr("home.download.version")));
    +  releaseTable->elementAt(0, 1)
    +    ->addWidget(new WText(tr("home.download.date")));
    +  releaseTable->elementAt(0, 2)
    +    ->addWidget(new WText(tr("home.download.description")));
    +
    +  releaseTable->elementAt(0, 0)->resize(WLength(15, WLength::FontEx),
    +					WLength::Auto);
    +  releaseTable->elementAt(0, 1)->resize(WLength(15, WLength::FontEx),
    +					WLength::Auto);
    +
    +  int row = 1;
    +
    +  while (f) {
    +    std::string line;
    +    getline(f, line);
    +
    +    if (f) {
    +      typedef boost::tokenizer<boost::escaped_list_separator<char> >
    +	CsvTokenizer;
    +      CsvTokenizer tok(line);
    +
    +      CsvTokenizer::iterator i=tok.begin();
    +
    +      std::string fileName = *i;
    +      std::string description = *(++i);
    +      releaseTable->elementAt(row, 0)->addWidget
    +	(new WText(href("http://prdownloads.sourceforge.net/witty/" 
    +			+ fileName + "?download", description)));
    +      releaseTable->elementAt(row, 1)->addWidget(new WText(*(++i)));
    +      releaseTable->elementAt(row, 2)->addWidget(new WText(*(++i)));
    +
    +      ++row;
    +    }
    +  }
    +}
    +
    +WString Home::tr(const char *key)
    +{
    +  return WString::tr(key);
    +}
    +
    +void Home::googleAnalyticsLogger()
    +{
    +  std::string googleCmd = 
    +    "if (window.pageTracker) {"
    +    """try {"
    +    ""  "window.pageTracker._trackPageview(\""
    +    + environment().deploymentPath() + internalPath() + "\");"
    +    """} catch (e) { }"
    +    "}";
    +
    +  doJavaScript(googleCmd);
    +}
    +
    diff --git a/wt-3.1.7a/examples/wt-homepage/Home.h b/wt-3.1.7a/examples/wt-homepage/Home.h
    new file mode 100644
    index 0000000..3970674
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/Home.h
    @@ -0,0 +1,132 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HOME_H_
    +#define HOME_H_
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +  class WMenu;
    +  class WStackedWidget;
    +  class WTabWidget;
    +  class WTreeNode;
    +  class WTable;
    +}
    +
    +using namespace Wt;
    +
    +struct Lang {
    +  Lang(const std::string& code, const std::string& path,
    +       const std::string& shortDescription,
    +       const std::string& longDescription) :
    +    code_(code),
    +    path_(path),
    +    shortDescription_(shortDescription),
    +    longDescription_(longDescription) {
    +  }
    +
    +  std::string code_, path_, shortDescription_, longDescription_;
    +};
    +
    +/*
    + * A utility container widget which defers creation of its single
    + * child widget until the container is loaded (which is done on-demand
    + * by a WMenu). The constructor takes the create function for the
    + * widget as a parameter.
    + *
    + * We use this to defer widget creation until needed.
    + */
    +template <typename Function>
    +class DeferredWidget : public WContainerWidget
    +{
    +public:
    +  DeferredWidget(Function f)
    +    : f_(f) { }
    +
    +private:
    +  void load() {
    +    WContainerWidget::load();
    +    if (count() == 0)
    +      addWidget(f_());
    +  }
    +
    +  Function f_;
    +};
    +
    +template <typename Function>
    +DeferredWidget<Function> *deferCreate(Function f)
    +{
    +  return new DeferredWidget<Function>(f);
    +}
    +
    +class Home : public WApplication
    +{
    +public:
    +  Home(const WEnvironment& env,
    +       const std::string& title,
    +       const std::string& resourceBundle, const std::string& cssPath);
    +  
    +  virtual ~Home();
    +
    +  void googleAnalyticsLogger();
    +
    +protected:
    +  virtual WWidget *examples() = 0;
    +  virtual WWidget *download() = 0;
    +  virtual WWidget *sourceViewer(const std::string &deployPath) = 0;
    +  virtual std::string filePrefix() const = 0;
    +
    +  void init();
    +  
    +  void addLanguage(const Lang& l) { languages.push_back(l); }
    +  WWidget *linkSourceBrowser(const std::string& examplePath);
    +
    +  WTabWidget *examplesMenu_;
    +  
    +  WString tr(const char *key);
    +  std::string href(const std::string& url, const std::string& description);
    +
    +  WTable *releases_;
    +  void readReleases(WTable *releaseTable);
    +
    +private:
    +  WWidget *homePage_;
    +  WWidget *sourceViewer_;
    +
    +  WStackedWidget *contents_;
    +
    +  WWidget *initHome();
    +
    +  WWidget *introduction();
    +  WWidget *blog();
    +  WWidget *status();
    +  WWidget *features();
    +  WWidget *documentation();
    +  WWidget *community();
    +  WWidget *otherLanguage();
    +
    +  WMenu *mainMenu_;
    +
    +  int language_;
    +
    +  void readNews(WTable *newsTable, const std::string& newsfile);
    +  
    +  WWidget *wrapView(WWidget *(Home::*createFunction)());
    +
    +  void updateTitle();
    +  void setLanguage(int language);
    +  void setLanguageFromPath();
    +  void setup();
    +  void logInternalPath(const std::string& path);
    +
    +  WContainerWidget *sideBarContent_;
    +  
    +  std::vector<Lang> languages;
    +};
    +
    +#endif // HOME_H_
    diff --git a/wt-3.1.7a/examples/wt-homepage/JWtHome.C b/wt-3.1.7a/examples/wt-homepage/JWtHome.C
    new file mode 100644
    index 0000000..ae3024b
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/JWtHome.C
    @@ -0,0 +1,150 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "JWtHome.h"
    +
    +#include <Wt/WText>
    +#include <Wt/WAnchor>
    +#include <Wt/WTreeNode>
    +#include <Wt/WWidget>
    +#include <Wt/WViewWidget>
    +#include <Wt/WTabWidget>
    +#include <Wt/WMenuItem>
    +#include <Wt/WTable>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLogger>
    +
    +#include "ExampleSourceViewer.h"
    +
    +JWtHome::JWtHome(const WEnvironment& env)
    +  : Home(env, 
    +      "JWt, Java Web Toolkit",
    +      "jwt-home", "css/jwt")
    +{
    +  addLanguage(Lang("en", "/", "en", "English"));
    +
    +  char* jwtExamplePath  = getenv("JWT_EXAMPLE_PATH");
    +  if (jwtExamplePath)
    +    jwtExamplePath_ = jwtExamplePath;
    +  else
    +    jwtExamplePath_ = "/home/pieter/projects/jwt/wt-port/java/examples/";
    +
    +  init();
    +}
    +
    +WWidget *JWtHome::examples()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  result->addWidget(new WText(tr("home.examples")));
    +
    +  examplesMenu_ = new WTabWidget(AlignTop | AlignJustify, result);
    +
    +  /*
    +   * The following code is functionally equivalent to:
    +   *
    +   *   examplesMenu_->addTab(helloWorldExample(), "Hello world");
    +   *
    +   * However, we optimize here for memory consumption (it is a homepage
    +   * after all, and we hope to be slashdotted some day)
    +   *
    +   * Therefore, we wrap all the static content (including the tree
    +   * widgets), into WViewWidgets with static models. In this way the
    +   * widgets are not actually stored in memory on the server.
    +   */
    +
    +  // The call ->setPathComponent() is to use "/examples/" instead of
    +  // "/examples/hello_world" as internal path
    +  examplesMenu_->addTab(wrapView(&JWtHome::helloWorldExample),
    +  			tr("hello-world"))->setPathComponent("");
    +  examplesMenu_->addTab(wrapView(&JWtHome::chartExample),
    +  			tr("charts"));
    +  examplesMenu_->addTab(wrapView(&JWtHome::treeviewExample),
    +			tr("treeview"));
    +  examplesMenu_->addTab(wrapView(&JWtHome::composerExample),
    +			tr("mail-composer"));
    +  examplesMenu_->addTab(wrapView(&JWtHome::chatExample),
    +			tr("chat"));
    +  examplesMenu_->addTab(wrapView(&JWtHome::figtreeExample),
    +			tr("figtree"));
    +  
    +  // Enable internal paths for the example menu
    +  examplesMenu_->setInternalPathEnabled("/examples");
    +  examplesMenu_->currentChanged().connect(this, &Home::googleAnalyticsLogger);
    +
    +  return result;
    +}
    +
    +WWidget *JWtHome::download()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  result->addWidget(new WText(tr("home.download")));
    +  result->addWidget(new WText(tr("home.download.license")));
    +  result->addWidget(new WText(tr("home.download.packages")));
    +
    +  releases_ = new WTable();
    +  readReleases(releases_);
    +  result->addWidget(releases_);
    +  result->addWidget(new WText(tr("home.download.requirements")));
    +  result->addWidget(new WText(tr("home.download.cvs")));
    +
    +  return result;
    +}
    +
    +WWidget *JWtHome::sourceViewer(const std::string &deployPath)
    +{
    +  return new ExampleSourceViewer(deployPath, jwtExamplePath_ + "/", "JAVA");
    +}
    +
    +WWidget *JWtHome::example(const char *textKey, const std::string& sourceDir)
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  new WText(tr(textKey), result);
    +  result->addWidget(linkSourceBrowser(sourceDir));
    +  return result;
    +}
    +
    +WWidget *JWtHome::helloWorldExample()
    +{
    +  return example("home.examples.hello", "hello");
    +}
    +
    +WWidget *JWtHome::chartExample()
    +{
    +  return example("home.examples.chart", "charts");
    +}
    +
    +WWidget *JWtHome::treeviewExample()
    +{
    +  return example("home.examples.treeview", "treeviewdragdrop");
    +}
    +
    +WWidget *JWtHome::composerExample()
    +{
    +  return example("home.examples.composer", "composer");
    +}
    +
    +WWidget *JWtHome::chatExample()
    +{
    +  return example("home.examples.chat", "simplechat");
    +}
    +
    +WWidget *JWtHome::figtreeExample()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  new WText(tr("home.examples.figtree"), result);
    +  return result;
    +}
    +
    +WWidget *JWtHome::wrapView(WWidget *(JWtHome::*createWidget)())
    +{
    +  return makeStaticModel(boost::bind(createWidget, this));
    +}
    +
    +WApplication *createJWtHomeApplication(const WEnvironment& env)
    +{
    +  return new JWtHome(env);
    +}
    diff --git a/wt-3.1.7a/examples/wt-homepage/JWtHome.h b/wt-3.1.7a/examples/wt-homepage/JWtHome.h
    new file mode 100644
    index 0000000..35afe12
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/JWtHome.h
    @@ -0,0 +1,44 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef JWT_HOME_H_
    +#define JWT_HOME_H_
    +
    +#include <Wt/WApplication>
    +
    +#include "Home.h"
    +
    +using namespace Wt;
    +
    +class JWtHome : public Home 
    +{
    +public:
    +  JWtHome(const WEnvironment& env);
    +
    +protected:
    +  virtual WWidget *examples();
    +  virtual WWidget *download();
    +  virtual WWidget *sourceViewer(const std::string& deployPath);
    +  virtual std::string filePrefix() const { return "jwt-"; }
    +
    +  WWidget *wrapView(WWidget *(JWtHome::*createFunction)());
    +
    +private:
    +  WWidget *example(const char *textKey, const std::string& sourceDir);
    +
    +  WWidget *helloWorldExample();
    +  WWidget *chartExample();
    +  WWidget *composerExample();
    +  WWidget *treeviewExample();
    +  WWidget *chatExample();
    +  WWidget *figtreeExample();
    +
    +  std::string jwtExamplePath_;
    +};
    +
    +WApplication *createJWtHomeApplication(const WEnvironment& env);
    +
    +#endif // JWT_HOME_H_
    diff --git a/wt-3.1.7a/examples/wt-homepage/SourceView.C b/wt-3.1.7a/examples/wt-homepage/SourceView.C
    new file mode 100644
    index 0000000..7666a2d
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/SourceView.C
    @@ -0,0 +1,218 @@
    +#include "SourceView.h"
    +
    +#include <iostream>
    +#include <fstream>
    +#include <sstream>
    +
    +#include <stdlib.h>
    +
    +#include <boost/algorithm/string.hpp>
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/filesystem/convenience.hpp>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WText>
    +#include <Wt/WImage>
    +
    +using namespace Wt;
    +namespace fs = boost::filesystem;
    +
    +SourceView::SourceView(int fileNameRole, int contentRole, int filePathRole)
    +    : fileNameRole_(fileNameRole),
    +      contentRole_(contentRole),
    +      filePathRole_(filePathRole),
    +      imageResource_(0)
    +{}
    +
    +SourceView::~SourceView() 
    +{ }
    +
    +bool SourceView::setIndex(const WModelIndex& index) 
    +{
    +  if (index != index_ && index.isValid()) {
    +    std::string fp = index.data(filePathRole_).empty() ? std::string()
    +      : boost::any_cast<std::string>(index.data(filePathRole_));
    +
    +    if (!index.data(contentRole_).empty()
    +	|| (!fp.empty() && !fs::is_directory(fp))) {
    +      index_ = index;
    +      update();
    +
    +      return true;
    +    }
    +  }
    +
    +  return false;
    +}
    +
    +std::string tempFileName() 
    +{
    +#ifndef WIN32
    +  char spool[20];
    +  strcpy(spool, "/tmp/wtXXXXXX");
    +
    +  int i = mkstemp(spool);
    +  close(i);
    +#else
    +  char spool[2 * L_tmpnam];
    +  tmpnam(spool);
    +#endif
    +  return std::string(spool);
    +}
    +
    +std::string getLanguageFromFileExtension(const std::string &fileName)
    +{
    +  if (boost::iends_with(fileName, ".h")
    +      || boost::iends_with(fileName, ".C")
    +      || boost::iends_with(fileName, ".cpp"))
    +    return "cpp";
    +  else if (boost::iends_with(fileName, ".xml"))
    +    return "xml";
    +  else if (boost::iends_with(fileName, ".html"))
    +    return "html";
    +  else if (boost::iends_with(fileName, ".java")) 
    +    return "java";
    +  else if (boost::iends_with(fileName, ".js")) 
    +    return "javascript";
    +  else if (boost::iends_with(fileName, ".css")) 
    +    return "css";
    +  else
    +    return std::string();
    +} 
    +
    +std::string readFileToString(const std::string& fileName) 
    +{
    +  std::size_t outputFileSize = (std::size_t)fs::file_size(fileName);
    +  std::fstream file (fileName.c_str(), std::ios::in | std::ios::binary);
    +  char* memblock = new char [outputFileSize];
    +  file.read(memblock, (std::streamsize)outputFileSize);
    +  file.close();
    +  std::string data = std::string(memblock, outputFileSize);
    +  delete [] memblock;
    +  return data;
    +}
    +
    +WWidget * SourceView::renderView() 
    +{
    +  if (!index_.isValid()) {
    +    // no content
    +    WText *result = new WText();
    +    result->setInline(false);
    +    return result;
    +  }
    +
    +  /*
    +   * read the contents, from string or file name
    +   */
    +  boost::any contentsData = index_.data(contentRole_);
    +  std::string content;
    +  if (!contentsData.empty())
    +   content = boost::any_cast<const std::string&>(contentsData);
    +  boost::any fileNameData = index_.data(fileNameRole_);
    +  std::string fileName = 
    +    boost::any_cast<const std::string&>(fileNameData);
    +  boost::any filePathData = index_.data(filePathRole_);
    +  std::string filePath;
    +  if (!filePathData.empty())
    +    filePath = boost::any_cast<const std::string&>(filePathData);
    +
    +  /*
    +   * determine source language, for source highlight
    +   */
    +  std::string lang = getLanguageFromFileExtension(fileName);
    +  if (content != "" && content.substr(0, 100).find("-*- C++ -*-")
    +      != std::string::npos)
    +    lang = "cpp";
    +
    +  std::string outputFileName;
    +
    +  if (lang != "") {
    +    std::string inputFileName;
    +
    +    if (!filePathData.empty())
    +      inputFileName = filePath;
    +    else {
    +      inputFileName = tempFileName();
    +      std::ofstream out(inputFileName.c_str(), 
    +			std::ios::out | std::ios::binary);
    +      out.write(content.c_str(), (std::streamsize)content.length());
    +      out.close();
    +    }
    +    
    +    outputFileName = tempFileName();
    +
    +    std::string sourceHighlightCommand = "source-highlight ";
    +    sourceHighlightCommand += "--src-lang=" + lang + " ";
    +    sourceHighlightCommand += "--out-format=xhtml ";
    +    sourceHighlightCommand += "--input=" + inputFileName + " ";
    +    sourceHighlightCommand += "--output=" + outputFileName + " ";
    +
    +    std::cerr << sourceHighlightCommand << std::endl;
    +    bool sourceHighlightOk = system(sourceHighlightCommand.c_str()) == 0;
    +
    +    if (sourceHighlightOk)
    +      content = readFileToString(outputFileName);
    +    else {
    +      content = readFileToString(inputFileName);
    +      lang = "";
    +    }
    +    unlink(outputFileName.c_str());
    +
    +    if (filePathData.empty())
    +      unlink(inputFileName.c_str());
    +  } 
    +
    +  if (content == "")
    +    // do not load binary files, we would need to perform proper UTF-8
    +    // transcoding to display them
    +    if (!boost::iends_with(fileName, ".jar")
    +	&& !boost::iends_with(fileName, ".war")
    +	&& !boost::iends_with(fileName, ".class"))
    +      content = readFileToString(fileName);
    +
    +  delete imageResource_;
    +  imageResource_ = 0;
    +
    +  WWidget *result = 0;
    +
    +  if (!imageExtension(fileName).empty()) {
    +    WImage *image = new WImage();
    +    imageResource_ = new WMemoryResource(this);
    +    imageResource_->setMimeType("mime/" + imageExtension(fileName));
    +    imageResource_->setData((const unsigned char*)content.data(),
    +			    (int)content.length());
    +    image->setResource(imageResource_);
    +    result = image;
    +  } else if (lang != "") {
    +    WText *text = new WText();
    +    text->setTextFormat(XHTMLUnsafeText);
    +    text->setText(WString::fromUTF8(content));
    +    result = text;
    +  } else {
    +    WText *text = new WText();
    +    text->setTextFormat(PlainText);
    +    text->setText(WString::fromUTF8(content));
    +    result = text;
    +  }
    +
    +  result->setInline(false);
    +  WApplication::instance()
    +    ->doJavaScript(result->jsRef() + ".parentNode.scrollTop = 0;");
    +  return result;
    +}
    +
    +std::string SourceView::imageExtension(const std::string& fileName)
    +{
    +  static const char *imageExtensions[] = {
    +    ".png", ".gif", ".jpg", "jpeg", ".ico", 0
    +  };
    +
    +  fs::path p(fileName);
    +  std::string extension = fs::extension(p);
    +
    +  for (const char **s = imageExtensions; *s != 0; ++s)
    +    if (*s == extension)
    +      return extension.substr(1);
    +
    +  return std::string();
    +}
    diff --git a/wt-3.1.7a/examples/wt-homepage/SourceView.h b/wt-3.1.7a/examples/wt-homepage/SourceView.h
    new file mode 100644
    index 0000000..d7cd3b9
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/SourceView.h
    @@ -0,0 +1,72 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba 
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef SOURCEVIEW_H
    +#define SOURCEVIEW_H
    +
    +#include <Wt/WViewWidget>
    +#include <Wt/WModelIndex>
    +#include <Wt/WMemoryResource>
    +
    +/**
    + * \defgroup gitmodelexample Git model example
    + */
    +/*@{*/
    +
    +/*! \class SourceView
    + *  \brief View class for source code.
    + *
    + * A view class is used so that no server-side memory is used while displaying
    + * a potentially large file.
    + */
    +class SourceView : public Wt::WViewWidget
    +{
    +public:
    +  /*! \brief Constructor.
    +   *
    +   * The <i>fileNameRole</i> will be used to retrieve data from a file
    +   * to be displayed. If no data is set for this role, then
    +   * <i>contentRole</i> should hold the data as a string.
    +   */
    +  SourceView(int fileNameRole, int contentRole, int filePathRole);
    + 
    +  /*! \brief Destructor
    +   */
    +  virtual ~SourceView();
    +
    +  /*! \brief Sets the model index.
    +   *
    +   * Returns true whether the view will be rerendered. The view will only
    +   * be rerendered if the index contains new data.
    +   */
    +  bool setIndex(const Wt::WModelIndex& index); 
    +
    +  /*! \brief Returns the widget that renders the view.
    +   *
    +   * Returns he view contents: renders the file to a WText widget.
    +   * WViewWidget deletes this widget after every rendering step.
    +   */
    +  virtual Wt::WWidget *renderView(); 
    +  
    +private:
    +  /// The index that is currently displayed.
    +  Wt::WModelIndex index_;
    +
    +  /// The role that is currently displayed.
    +  int fileNameRole_;
    +  int contentRole_;
    +  int filePathRole_;
    +
    +  Wt::WMemoryResource* imageResource_;
    +
    +private: 
    +  std::string imageExtension(const std::string& fileName);
    +};
    +
    +/*@}*/
    +
    +#endif //SOURCEVIEW_H
    diff --git a/wt-3.1.7a/examples/wt-homepage/WtHome.C b/wt-3.1.7a/examples/wt-homepage/WtHome.C
    new file mode 100644
    index 0000000..1bf4e71
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/WtHome.C
    @@ -0,0 +1,223 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "WtHome.h"
    +
    +#include <Wt/WAnchor>
    +#include <Wt/WEnvironment>
    +#include <Wt/WLogger>
    +#include <Wt/WMenuItem>
    +#include <Wt/WTable>
    +#include <Wt/WTabWidget>
    +#include <Wt/WText>
    +#include <Wt/WTreeNode>
    +#include <Wt/WViewWidget>
    +#include <Wt/WWidget>
    +
    +#include "ExampleSourceViewer.h"
    +
    +WtHome::WtHome(const WEnvironment& env)
    +  : Home(env, "Wt, C++ Web Toolkit", "wt-home", "css/wt")
    +{
    +  addLanguage(Lang("en", "/", "en", "English"));
    +  addLanguage(Lang("cn", "/cn/", "汉语", "中文 (Chinese)"));
    +
    +  char* wtExamplePath  = getenv("WT_EXAMPLE_PATH");
    +  if (wtExamplePath)
    +    wtExamplePath_ = wtExamplePath;
    +  else
    +    wtExamplePath_ = "../";
    +
    +  init();
    +}
    +
    +WWidget *WtHome::example(const char *textKey, const std::string& sourceDir)
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  new WText(tr(textKey), result);
    +  result->addWidget(linkSourceBrowser(sourceDir));
    +  return result;
    +}
    +
    +WWidget *WtHome::helloWorldExample()
    +{
    +  return example("home.examples.hello", "hello");
    +}
    +
    +WWidget *WtHome::chartExample()
    +{
    +  return example("home.examples.chart", "charts");
    +}
    +
    +WWidget *WtHome::homepageExample()
    +{
    +  return example("home.examples.wt", "wt-homepage");
    +}
    +
    +WWidget *WtHome::treeviewExample()
    +{
    +  return example("home.examples.treeview", "treeview-dragdrop");
    +}
    +
    +WWidget *WtHome::gitExample()
    +{
    +  return example("home.examples.git", "gitmodel");
    +}
    +
    +WWidget *WtHome::chatExample()
    +{
    +  return example("home.examples.chat", "simplechat");
    +}
    +
    +WWidget *WtHome::composerExample()
    +{
    +  return example("home.examples.composer", "composer");
    +}
    +
    +WWidget *WtHome::widgetGalleryExample()
    +{
    +  return example("home.examples.widgetgallery", "widgetgallery");
    +}
    +
    +WWidget *WtHome::examples()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  result->addWidget(new WText(tr("home.examples")));
    +
    +  examplesMenu_ = new WTabWidget(AlignTop | AlignJustify, result);
    +
    +  /*
    +   * The following code is functionally equivalent to:
    +   *
    +   *   examplesMenu_->addTab(helloWorldExample(), "Hello world");
    +   *
    +   * However, we optimize here for memory consumption (it is a homepage
    +   * after all, and we hope to be slashdotted some day)
    +   *
    +   * Therefore, we wrap all the static content (including the tree
    +   * widgets), into WViewWidgets with static models. In this way the
    +   * widgets are not actually stored in memory on the server.
    +   */
    +
    +  // The call ->setPathComponent() is to use "/examples/" instead of
    +  // "/examples/hello_world" as internal path
    +  examplesMenu_->addTab(wrapView(&WtHome::helloWorldExample),
    +			tr("hello-world"))->setPathComponent("");
    +  examplesMenu_->addTab(wrapView(&WtHome::chartExample),
    +  			tr("charts"));
    +  examplesMenu_->addTab(wrapView(&WtHome::homepageExample),
    +			tr("wt-homepage"));
    +  examplesMenu_->addTab(wrapView(&WtHome::treeviewExample),
    +			tr("treeview"));
    +  examplesMenu_->addTab(wrapView(&WtHome::gitExample),
    +			tr("git"));
    +  examplesMenu_->addTab(wrapView(&WtHome::chatExample),
    +			tr("chat"));
    +  examplesMenu_->addTab(wrapView(&WtHome::composerExample),
    +			tr("mail-composer"));
    +  examplesMenu_->addTab(wrapView(&WtHome::widgetGalleryExample),
    +			tr("widget-gallery"));
    +
    +  // Enable internal paths for the example menu
    +  examplesMenu_->setInternalPathEnabled("/examples");
    +  examplesMenu_->currentChanged().connect(this, &Home::googleAnalyticsLogger);
    +
    +  return result;
    +}
    +
    +WWidget *WtHome::download()
    +{
    +  WContainerWidget *result = new WContainerWidget();
    +  result->addWidget(new WText(tr("home.download")));
    +  result->addWidget(new WText(tr("home.download.license")));
    +  result->addWidget(new WText(tr("home.download.packages")));
    +
    +  releases_ = new WTable();
    +  readReleases(releases_);
    +  result->addWidget(releases_);
    +  
    +  result->addWidget
    +    (new WText("<p>Older releases are still available at "
    +	       + href("http://sourceforge.net/project/showfiles.php?"
    +		      "group_id=153710#files",
    +		      "sourceforge.net")
    +	       + "</p>"));
    +
    +  result->addWidget(new WText(tr("home.download.requirements")));
    +  result->addWidget(new WText(tr("home.download.cvs")));
    +
    +  return result;
    +}
    +
    +WWidget *WtHome::sourceViewer(const std::string& deployPath)
    +{
    +  return new ExampleSourceViewer(deployPath, wtExamplePath_ + "/", "CPP");
    +}
    +
    +WWidget *WtHome::wrapView(WWidget *(WtHome::*createWidget)())
    +{
    +  return makeStaticModel(boost::bind(createWidget, this));
    +}
    +
    +WApplication *createWtHomeApplication(const WEnvironment& env)
    +{
    +  // support for old (< Wt-2.2) homepage URLS: redirect from "states"
    +  // to "internal paths"
    +  // this contains the initial "history state" in old Wt versions
    +  const std::string *historyKey = env.getParameter("historyKey");
    +
    +  if (historyKey) {
    +    const char *mainStr[]
    +      = { "main:0", "/",
    +	  "main:1", "/news",
    +	  "main:2", "/features",
    +	  "main:4", "/examples",
    +	  "main:3", "/documentation",
    +	  "main:5", "/download",
    +	  "main:6", "/community" };
    +
    +    const char *exampleStr[]
    +      = { "example:0", "/examples",
    +	  "example:1", "/examples/charts",
    +	  "example:2", "/examples/wt-homepage",
    +	  "example:3", "/examples/treelist",
    +	  "example:4", "/examples/hangman",
    +	  "example:5", "/examples/chat",
    +	  "example:6", "/examples/mail-composer",
    +	  "example:7", "/examples/drag-and-drop",
    +	  "example:8", "/examples/file-explorer",
    +	  "example:9", "/examples/calendar" };
    +
    +    if (historyKey->find("main:4") != std::string::npos) {
    +      for (unsigned i = 0; i < 10; ++i)
    +	if (historyKey->find(exampleStr[i*2]) != std::string::npos) {
    +	  WApplication *app = new WApplication(env);
    +	  app->log("notice") << "redirecting old style URL '"
    +			     << *historyKey << "' to internal path: '"
    +			     << exampleStr[i*2+1] << "'";
    +	  app->redirect(app->bookmarkUrl(exampleStr[i*2+1]));
    +	  app->quit();
    +	  return app;
    +	}
    +    } else
    +      for (unsigned i = 0; i < 6; ++i)
    +	if (historyKey->find(mainStr[i*2]) != std::string::npos) {
    +	  WApplication *app = new WApplication(env);
    +
    +	  app->log("notice") << "redirecting old style URL '"
    +			     << *historyKey << "' to internal path: '"
    +			     << mainStr[i*2+1] << "'";
    +	  app->redirect(app->bookmarkUrl(mainStr[i*2+1]));
    +	  app->quit();
    +	  return app;
    +	}
    +
    +    // unknown history key, just continue
    +  }
    +
    +  return new WtHome(env);
    +}
    diff --git a/wt-3.1.7a/examples/wt-homepage/WtHome.h b/wt-3.1.7a/examples/wt-homepage/WtHome.h
    new file mode 100644
    index 0000000..0232e3e
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/WtHome.h
    @@ -0,0 +1,46 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_HOME_H_
    +#define WT_HOME_H_
    +
    +#include <Wt/WApplication>
    +
    +#include "Home.h"
    +
    +using namespace Wt;
    +
    +class WtHome : public Home 
    +{
    +public:
    +  WtHome(const WEnvironment& env);
    +
    +protected:
    +  virtual WWidget *examples();
    +  virtual WWidget *download();
    +  virtual WWidget *sourceViewer(const std::string &internalPath);
    +  virtual std::string filePrefix() const { return "wt-"; }
    +
    +private:
    +  std::string wtExamplePath_;
    +
    +  WWidget *example(const char *textKey, const std::string& sourceDir);
    +
    +  WWidget *helloWorldExample();
    +  WWidget *chartExample();
    +  WWidget *homepageExample();
    +  WWidget *treeviewExample();
    +  WWidget *gitExample();
    +  WWidget *chatExample();
    +  WWidget *composerExample();
    +  WWidget *widgetGalleryExample();
    +
    +  WWidget *wrapView(WWidget *(WtHome::*createFunction)());
    +};
    +
    +WApplication *createWtHomeApplication(const WEnvironment& env);
    +
    +#endif // WT_HOME_H_
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/home.css b/wt-3.1.7a/examples/wt-homepage/css/home.css
    new file mode 100644
    index 0000000..4015c1f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/home.css
    @@ -0,0 +1,87 @@
    +.Wt-tabs {
    +    margin-top: 5px;
    +    margin-bottom: 0px;
    +}
    +
    +.Wt-tabs span {
    +    border-bottom:1px solid #accf8a;
    +}
    +
    +.Wt-tabs span span {
    +    color:#777777;
    +}
    +
    +.Wt-tabs a {
    +    border-bottom:1px solid #accf8a;
    +    text-decoration: none;
    +}
    +
    +.Wt-tabs span.itemselected span {
    +    color:black;
    +}
    +
    +.Wt-tabs span:hover {
    +    text-decoration: none;
    +    color: #70BD1A;
    +}
    +
    +ol, ul {
    +    list-style: bullet;
    +}
    +
    +.fragment {
    +    font-family:monospace,fixed;
    +}
    +
    +pre.fragment {
    +    background-color: #F5F5F5;
    +    border: 1px solid #CCCCCC;
    +    margin: 4px 8px 4px 2px;
    +    padding: 4px 6px;
    +}
    +
    +td.sponsor-logo {
    +    text-align: center;
    +    vertical-align: middle;
    +    padding: 5px;
    +    white-space: nowrap;
    +}
    +
    +td.sponsor-role {
    +    vertical-align: middle;
    +    padding: 5px;
    +}
    +
    +ul.languages {
    +    list-style: none;
    +    padding-left: 0px;
    +}
    +
    +ul.languages li {
    +    margin: 40px 0px;
    +}
    +
    +img.language-icon {
    +    float: left;
    +    margin-right: 30px;
    +}
    +
    +img.java-language-icon {
    +    float: left;
    +    margin-right: 30px;
    +    margin-left: 25px;
    +}
    +
    +.run {
    +    font-size: 130%;
    +    margin: 0px 5px;
    +    text-decoration: none;
    +    text-align: top;
    +}
    +
    +.emph {
    +    font-size: 10pt;
    +    font-style: italic;
    +    color: #CC1111;
    +    vertical-align: top;
    +} 
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_large.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_large.jpg
    new file mode 100644
    index 0000000..651de17
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_large.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_powered.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_powered.jpg
    new file mode 100644
    index 0000000..ecd2f95
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_powered.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_small.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_small.jpg
    new file mode 100644
    index 0000000..f35eac6
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/emweb_small.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/favicon.ico b/wt-3.1.7a/examples/wt-homepage/css/jwt/favicon.ico
    new file mode 100644
    index 0000000..3b2c1bd
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/favicon.ico differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small.jpg
    new file mode 100644
    index 0000000..9388fbb
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small2.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small2.jpg
    new file mode 100644
    index 0000000..7af198e
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/main_page_banner_small2.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/old_wt_banner.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/old_wt_banner.jpg
    new file mode 100644
    index 0000000..9ff7a71
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/old_wt_banner.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/wt.css b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt.css
    new file mode 100644
    index 0000000..2bcc630
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt.css
    @@ -0,0 +1,315 @@
    +/* CSS Document */
    +
    +@import url("../reset.css");
    +
    +body {
    +    color: #333333;
    +    font-family:  arial,sans-serif;
    +    font-size: 80%;
    +    font-size-adjust:none;
    +    font-stretch:normal;
    +    font-style:normal;
    +    font-variant:normal;
    +    font-weight:normal;
    +    line-height:1.5em;
    +    background-color:#FFF;
    +    min-width:750px;
    +    overflow-x: hidden;
    +} 
    +
    +a {
    +    text-decoration: underline;
    +    color: #CF6900; /*#70BD1A;*/
    +}
    +
    +.link {
    +    color: #CF6900; /*#70BD1A;*/
    +}
    +
    +a.blank {
    +    text-decoration: none;
    +}
    +
    +a:hover {
    +    text-decoration: underline;
    +}
    +
    +h1 {
    +    background:url(main_page_banner.jpg) no-repeat right top;
    +    font-size: 1.8em;
    +    font-weight:600;
    +    letter-spacing:2px;
    +    line-height: 1.8;
    +    padding:5px;
    +    padding-left:30px;
    +    margin-top:5px;
    +    margin-bottom:15px;
    +    color: #FFFFFF;
    +    max-width:640px;
    +    height:157px;
    +    display:block;
    +}
    +
    +h4 {
    +    font-size: 1.5em;
    +    line-height: 1.8;
    +    border-top : 1px solid  #CF6900;
    +    padding-bottom:10px;
    +    margin-top:15px;
    +    color: #CF6900;
    +    display: block;
    +}
    +
    +h4.example {
    +    border-top: 0;
    +}
    +
    +h2 {
    +    background:#CF6900 url(main_page_banner_small.jpg) no-repeat left top;
    +    font-size: 1.6em;
    +    font-weight:600;
    +    letter-spacing:2px;
    +    line-height: 1.8;
    +    //padding:5px;
    +    padding-left:30px;
    +    margin-top:5px;
    +    margin-bottom:15px;
    +    color: #FFFFFF;
    +    height:78px;
    +}
    +
    +h3 {
    +    background:#CF6900 url(main_page_banner_small2.jpg) no-repeat right top;
    +    font-size: 1.6em;
    +    font-weight:600;
    +    letter-spacing:2px;
    +    line-height: 1.8;
    +    padding-left:30px;
    +    padding-bottom:0px;
    +    padding-top:0px;
    +    margin:0px;
    +    color: #FFFFFF;
    +    height:52px;
    +    display:block;
    +}		
    +
    +h3 span {
    +    display: block;
    +    padding: 5px;
    +}
    +
    +p {
    +    font-size: 1.1em;
    +    font-weight: normal;
    +    line-height: 1.4;
    +    margin-bottom : 15px;
    +    color: #333333;
    +}
    +p.intro {
    +    font-size: 1.3em;
    +    font-weight: normal;
    +    line-height: 1.4;
    +    padding-bottom : 15px;
    +    color: #333333;
    +}
    +
    +div#top_wrapper {
    +    border-left: 20px solid #BEBEBE;
    +    border-right: 20px solid #BEBEBE;
    +    background-color: #E1E1E1;
    +    height:22px;
    +}
    +
    +div#top_content {
    +    background-color: #DADADA;
    +    margin-left: 30px;
    +    margin-right: 10px;  
    +    min-width:750px;
    +    max-width:950px;
    +    height:22px;
    +}
    +
    +div#top_languages  {
    +    float:left;
    +    padding-left:5px;
    +    height:22px;
    +}
    +
    +div#top_languages a {
    +    display: inline;
    +    color:#666666;
    +    padding-right: 5px;
    +    text-align:left;
    +    text-decoration: none;
    +    font:arial,sans-serif;
    +    font-size:10px;
    +    font-size-adjust:none;
    +    font-weight:bold;
    +}
    +
    +div#top_languages a:hover {
    +    color: #CF6900;
    +    text-decoration: underline;
    +}
    +
    +div#top_wt  {
    +    float:right;
    +    width:56px;
    +    height:22px;
    +    background-color:#DADADA;
    +}
    +
    +div#banner_wrapper {
    +    border-left: 20px solid #D6D6D6;
    +    border-right: 20px solid #D6D6D6;
    +    background-color: #FFF;
    +}
    +
    +div#banner_content {
    +    background-color: #F7F7F7;
    +    padding-top:30px;
    +    padding-bottom:20px;
    +    margin-left: 30px;
    +    margin-right: 10px;
    +    min-width:750px;
    +    max-width:950px;
    +    height:96px;
    +}
    +
    +div#banner  {
    +    position:relative;
    +    background: url(wt_banner.jpg) no-repeat left top;
    +    margin-left:-50px;
    +    height:96px;
    +}
    +
    +div#banner_end {
    +    position:relative;
    +    height:96px;
    +    background: url(wt_banner_right.jpg) no-repeat right top;
    +    z-index:20; 
    +}
    +
    +div#banner a {
    +    margin: 0 0 0 -2000px;
    +}
    +
    +
    +div#main_wrapper {
    +    border-left: 20px solid #D6D6D6;
    +    border-right: 20px solid #D6D6D6;
    +    background-color: #FFF;
    +    display:block;
    +}
    +
    +div#main_content {
    +    background-color: #F7F7F7;
    +    padding-top:20px;
    +    margin-left: 30px; 
    +    margin-right: 10px; 
    +    min-width:750px;
    +    max-width:950px;
    +    display:block;
    +} 
    +
    +div #main_menu{
    +    padding:0;
    +    margin:0;
    +    left:10px;
    +    padding-left:0px;
    +    width:200px;
    +    float:left;
    +    position:relative;
    +}
    +
    +div #main_menu ul{
    +    margin:0px;
    +    padding-left:0px;
    +    padding-bottom:30px;
    +    text-indent:5px;
    +    list-style:none;
    +}
    +
    +div #main_menu ul ul{
    +    padding-bottom:0px;
    +    margin-bottom:0px;
    +    text-indent:25px;
    +    list-style:none;
    +}
    +
    +div #main_menu li{
    +    padding-top: 8px;
    +    width:200px;
    +}
    +
    +div#main_menu a {
    +    color: #BEBEBE;
    +    font-size: 1.25em;
    +    font-weight:600;
    +    letter-spacing:2px;
    +    text-decoration:none;
    +    font-size-adjust:.65;
    +    padding-bottom:5px;
    +    border-bottom: 1px dashed #999999;
    +    display: block;
    +    width:200px;
    +}
    +
    +div#main_menu .itemselected{
    +    color: black;
    +}
    +
    +div#main_menu a:hover {
    +    color: #CF6900;
    +    text-decoration: none;
    +}
    +
    +
    +div#main_page{
    +    margin:0px;
    +    margin-left:64px;
    +    margin-right:5px;
    +    padding-bottom:30px;
    +    position:relative;	
    +    float:left;
    +    width:63%;
    +    min-width:380px;
    +    max-width:640px;
    +}
    +
    +div#footer_wrapper {
    +    border-left: 20px solid #BEBEBE;
    +    border-right: 20px solid #BEBEBE;
    +    border-bottom: 20px solid #BEBEBE;
    +    background-color: #E1E1E1;
    +}
    +
    +div#footer_content {
    +    background-color: #DADADA;
    +    margin-left: 30px; 
    +    margin-right: 10px; 
    +    min-width:750px;
    +    max-width:950px;
    +}
    +
    +div#footer_copyright  {
    +    float:left;
    +    /*position:relative;*/
    +    padding:15px;
    +    font-size: 1em;
    +    font-weight: normal;
    +    line-height: 1.6;
    +}
    +
    +div#footer_menu  {
    +    float:right;
    +    /*position:relative;*/
    +    padding:15px;
    +    font-size: 1em;
    +    font-weight: normal;
    +    line-height: 1.6;
    +}
    +
    +.clearall{
    +    clear: both;
    +}	
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner.jpg
    new file mode 100644
    index 0000000..0188ece
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner_right.jpg b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner_right.jpg
    new file mode 100644
    index 0000000..6a2fe71
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_banner_right.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_ie.css b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_ie.css
    new file mode 100644
    index 0000000..3ea860f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/jwt/wt_ie.css
    @@ -0,0 +1,10 @@
    +/*
    + * threshold differs 80 (margins + border) + 18 (scrollbar)
    +*/
    +div#top_content, div#banner_content, div#main_content, div#footer_content {
    +    width: expression(document.documentElement.offsetWidth > 848 ? (document.documentElement.offsetWidth < 1048 ? "auto" : "950px") : "750px");
    +}
    +
    +html {
    +  overflow-y: scroll !important;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/reset.css b/wt-3.1.7a/examples/wt-homepage/css/reset.css
    new file mode 100644
    index 0000000..fde0884
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/reset.css
    @@ -0,0 +1,50 @@
    +/* http://meyerweb.com/eric/tools/css/reset/ */
    +/* v1.0 | 20080212 */
    +
    +html, body, div, span, applet, object, iframe,
    +h1, h2, h3, h4, h5, h6, blockquote, pre,
    +a, abbr, acronym, address, big, cite, code,
    +del, dfn, em, font, img, ins, kbd, q, s, samp,
    +small, strike, strong, sub, sup, tt, var,
    +b, u, i, center,
    +dl, dt, dd,
    +fieldset, form, label, legend,
    +table, caption {
    +	margin: 0;
    +	padding: 0;
    +	border: 0;
    +	outline: 0;
    +	font-size: 100%;
    +	vertical-align: baseline;
    +	background: transparent;
    +}
    +body {
    +	line-height: 1;
    +}
    +blockquote, q {
    +	quotes: none;
    +}
    +blockquote:before, blockquote:after,
    +q:before, q:after {
    +	content: '';
    +	content: none;
    +}
    +
    +/* remember to define focus styles! */
    +:focus {
    +	outline: 0;
    +}
    +
    +/* remember to highlight inserts somehow! */
    +ins {
    +	text-decoration: none;
    +}
    +del {
    +	text-decoration: line-through;
    +}
    +
    +/* tables still need 'cellspacing="0"' in the markup */
    +/*table {
    +	border-collapse: collapse;
    +	border-spacing: 0;
    +} */
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/sourceview.css b/wt-3.1.7a/examples/wt-homepage/css/sourceview.css
    new file mode 100644
    index 0000000..f543758
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/sourceview.css
    @@ -0,0 +1,44 @@
    +.maindiv {
    +    background-color: #d6d6d6
    +}
    +
    +.Wt-treeview {
    +    background-color: white;
    +    border: 1px solid #a0a0a0;
    +}
    +
    +.source-view {
    +    background-color: white;
    +    overflow: auto;
    +    white-space: pre;
    +    font-family: 'Bitstream Vera Sans Mono','Courier',monospace;
    +    font-size: 100%;
    +    color: #444444;
    +    border: 1px solid #a0a0a0;
    +    zoom: 1;
    +}
    +
    +.source-view div {
    +    padding: 6px;
    +    line-height: 1.3;
    +    font-family: Verdana, Helvetica, sans-serif;
    +    font-size: 9pt;
    +    /* zoom: 1; */
    +}
    +
    +.srcviewtitle {
    +    background-color: #eeeeee;
    +    /* border: 1px solid #a0a0a0; */
    +    padding: 4px 9px;
    +}
    +
    +.srcviewtitle h2 {
    +    background: transparent;
    +    color: black;
    +    padding: 0px;
    +    height: auto;
    +}
    +
    +.srcviewtitle p {
    +    margin-bottom: 0px;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_large.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_large.jpg
    new file mode 100644
    index 0000000..c70afb1
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_large.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_powered.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_powered.jpg
    new file mode 100644
    index 0000000..40e41d6
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_powered.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_small.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_small.jpg
    new file mode 100644
    index 0000000..8800d02
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/emweb_small.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/favicon.ico b/wt-3.1.7a/examples/wt-homepage/css/wt/favicon.ico
    new file mode 100644
    index 0000000..2ec6e50
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/favicon.ico differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner.jpg
    new file mode 100644
    index 0000000..7319d20
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small.jpg
    new file mode 100644
    index 0000000..19fcd9e
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small2.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small2.jpg
    new file mode 100644
    index 0000000..cfcef61
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/main_page_banner_small2.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/uiloog.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/uiloog.jpg
    new file mode 100644
    index 0000000..48feeba
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/uiloog.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/wt.css b/wt-3.1.7a/examples/wt-homepage/css/wt/wt.css
    new file mode 100644
    index 0000000..cf6995c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/wt/wt.css
    @@ -0,0 +1,315 @@
    +/* CSS Document */
    +
    +@import url("../reset.css");
    +
    +body {
    +	color: #333333;
    +	font-family:  arial,sans-serif;
    +	font-size: 80%;
    +	font-size-adjust:none;
    +	font-stretch:normal;
    +	font-style:normal;
    +	font-variant:normal;
    +	font-weight:normal;
    +	line-height:1.5em;
    +	background-color:#FFF;
    +	min-width:750px;
    +	overflow-x: hidden;
    +} 
    +
    +a {
    +	text-decoration: underline;
    +	color: #528B12; /*#70BD1A;*/
    +}
    +
    +.link {
    +    color: #528B12; /*#70BD1A;*/
    +}
    +
    +a.blank {
    +        text-decoration: none;
    +}
    +
    +a:hover {
    +	text-decoration: underline;
    +}
    +
    +h1 {
    +	background:url(main_page_banner.jpg) no-repeat right top;
    +	font-size: 1.8em;
    +	font-weight:600;
    +	letter-spacing:2px;
    +	line-height: 1.8;
    +	padding:5px;
    +	padding-left:30px;
    +	margin-top:5px;
    +	margin-bottom:15px;
    +	color: #FFFFFF;
    +	max-width:640px;
    +	height:157px;
    +	display:block;
    +	}
    +	
    +h4 {
    +	font-size: 1.5em;
    +	line-height: 1.8;
    +	border-top : 1px solid  #528B12;
    +	padding-bottom:10px;
    +	margin-top:15px;
    +	color: #528B12;
    +	display: block;
    +	}
    +
    +h4.example {
    +	border-top: 0;
    +	}
    +	
    +h2 {
    +	background:#70BD1A url(main_page_banner_small.jpg) no-repeat left top;
    +	font-size: 1.6em;
    +	font-weight:600;
    +	letter-spacing:2px;
    +	line-height: 1.8;
    +	//padding:5px;
    +	padding-left:30px;
    +	margin-top:5px;
    +	margin-bottom:15px;
    +	color: #FFFFFF;
    +	height:78px;
    +	}
    +	
    +h3 {
    +	background:#70BD1A url(main_page_banner_small2.jpg) no-repeat right top;
    +	font-size: 1.6em;
    +	font-weight:600;
    +	letter-spacing:2px;
    +	line-height: 1.8;
    +	padding-left:30px;
    +	padding-bottom:0px;
    +	padding-top:0px;
    +	margin:0px;
    +	color: #FFFFFF;
    +	height:52px;
    +	display:block;
    +	}		
    +
    +h3 span {
    +    display: block;
    +    padding: 5px;
    +}
    +
    +p {
    +	font-size: 1.1em;
    +	font-weight: normal;
    +	line-height: 1.4;
    +	margin-bottom : 15px;
    +	color: #333333;
    +	}
    +p.intro {
    +	font-size: 1.3em;
    +	font-weight: normal;
    +	line-height: 1.4;
    +	padding-bottom : 15px;
    +	color: #333333;
    +	}
    +
    +div#top_wrapper {
    +	border-left: 20px solid #BEBEBE;
    +	border-right: 20px solid #BEBEBE;
    +	background-color: #E1E1E1;
    +	height:22px;
    +}
    +
    +div#top_content {
    +	background-color: #DADADA;
    +	margin-left: 30px;
    +	margin-right: 10px;  
    +	min-width:750px;
    +	max-width:950px;
    +	height:22px;
    +}
    +
    +div#top_languages  {
    +	float:left;
    +	padding-left:5px;
    +	height:22px;
    +}
    +
    +div#top_languages a {
    +	display: inline;
    +	color:#666666;
    +	padding-right: 5px;
    +	text-align:left;
    +	text-decoration: none;
    +	font:arial,sans-serif;
    +	font-size:10px;
    +	font-size-adjust:none;
    +	font-weight:bold;
    +}
    +
    +div#top_languages a:hover {
    +	color: #70BD1A;
    +	text-decoration: underline;
    +	}
    +
    +div#top_wt  {
    +	float:right;
    +	width:56px;
    +	height:22px;
    +	background-color:#DADADA;
    +}
    +
    +div#banner_wrapper {
    +	border-left: 20px solid #D6D6D6;
    +	border-right: 20px solid #D6D6D6;
    +	background-color: #FFF;
    +}
    +
    +div#banner_content {
    +	background-color: #F7F7F7;
    +	padding-top:30px;
    +	padding-bottom:20px;
    +	margin-left: 30px;
    +	margin-right: 10px;
    +	min-width:750px;
    +	max-width:950px;
    +	height:96px;
    +}
    +
    +div#banner  {
    +	position:relative;
    +	background: url(wt_banner.jpg) no-repeat left top;
    +	margin-left:-50px;
    +	height:96px;
    +}
    +
    +div#banner_end {
    +        position:relative;
    +	height:96px;
    +	background: url(wt_banner_right.jpg) no-repeat right top;
    +	z-index:20; 
    +}
    +
    +div#banner a {
    +margin: 0 0 0 -2000px;
    +}
    +
    +
    +div#main_wrapper {
    +	border-left: 20px solid #D6D6D6;
    +	border-right: 20px solid #D6D6D6;
    +	background-color: #FFF;
    +	display:block;
    +}
    +
    +div#main_content {
    +	background-color: #F7F7F7;
    +	padding-top:20px;
    +	margin-left: 30px; 
    +	margin-right: 10px; 
    +	min-width:750px;
    +	max-width:950px;
    +	display:block;
    +} 
    +
    +div #main_menu{
    +	padding:0;
    +	margin:0;
    +	left:10px;
    +	padding-left:0px;
    +	width:200px;
    +	float:left;
    +	position:relative;
    +}
    +
    +div #main_menu ul{
    +        margin:0px;
    +	padding-left:0px;
    +	padding-bottom:30px;
    +	text-indent:5px;
    +	list-style:none;
    +	}
    +
    +div #main_menu ul ul{
    +       padding-bottom:0px;
    +       margin-bottom:0px;
    +       text-indent:25px;
    +       list-style:none;
    +       }
    +	
    +div #main_menu li{
    +	padding-top: 8px;
    +	width:200px;
    +	}
    +	
    +div#main_menu a {
    +	color: #BEBEBE;
    +	font-size: 1.25em;
    +	font-weight:600;
    +	letter-spacing:2px;
    +	text-decoration:none;
    +	font-size-adjust:.65;
    +	padding-bottom:5px;
    +        border-bottom: 1px dashed #528B12;
    +        display: block;
    +        width:200px;
    +	}
    +
    +div#main_menu .itemselected{
    +	 color: black;
    +	}
    +
    +div#main_menu a:hover {
    +	color: #70BD1A;
    +	text-decoration: none;
    +	}
    +	
    +	
    +div#main_page{
    +	margin:0px;
    +	margin-left:64px;
    +	margin-right:5px;
    +	padding-bottom:30px;
    +	position:relative;	
    +	float:left;
    +	width:63%;
    +	min-width:380px;
    +	max-width:640px;
    +	}
    +
    +div#footer_wrapper {
    +	border-left: 20px solid #BEBEBE;
    +	border-right: 20px solid #BEBEBE;
    +	border-bottom: 20px solid #BEBEBE;
    +	background-color: #E1E1E1;
    +}
    +
    +div#footer_content {
    +	background-color: #DADADA;
    +	margin-left: 30px; 
    +	margin-right: 10px; 
    +	min-width:750px;
    +	max-width:950px;
    +}
    +
    +div#footer_copyright  {
    +	float:left;
    +	/*position:relative;*/
    +	padding:15px;
    +	font-size: 1em;
    +	font-weight: normal;
    +	line-height: 1.6;
    +}
    +
    +div#footer_menu  {
    +	float:right;
    +	/*position:relative;*/
    +	padding:15px;
    +	font-size: 1em;
    +	font-weight: normal;
    +	line-height: 1.6;
    +}
    +
    +.clearall{
    +	clear: both;
    +	}	
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner.jpg
    new file mode 100644
    index 0000000..1eb0009
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner_right.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner_right.jpg
    new file mode 100644
    index 0000000..983be6d
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_banner_right.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/wt_ie.css b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_ie.css
    new file mode 100644
    index 0000000..3ea860f
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_ie.css
    @@ -0,0 +1,10 @@
    +/*
    + * threshold differs 80 (margins + border) + 18 (scrollbar)
    +*/
    +div#top_content, div#banner_content, div#main_content, div#footer_content {
    +    width: expression(document.documentElement.offsetWidth > 848 ? (document.documentElement.offsetWidth < 1048 ? "auto" : "950px") : "750px");
    +}
    +
    +html {
    +  overflow-y: scroll !important;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/examples/wt-homepage/css/wt/wt_powered.jpg b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_powered.jpg
    new file mode 100644
    index 0000000..7a6a1ec
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/css/wt/wt_powered.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/clojure-logo.png b/wt-3.1.7a/examples/wt-homepage/icons/clojure-logo.png
    new file mode 100644
    index 0000000..37220d6
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/clojure-logo.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/cpp-logo.jpg b/wt-3.1.7a/examples/wt-homepage/icons/cpp-logo.jpg
    new file mode 100644
    index 0000000..5e42bba
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/cpp-logo.jpg differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/cppclass.png b/wt-3.1.7a/examples/wt-homepage/icons/cppclass.png
    new file mode 100644
    index 0000000..a87cf84
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/cppclass.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/document.png b/wt-3.1.7a/examples/wt-homepage/icons/document.png
    new file mode 100644
    index 0000000..208908a
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/document.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/green-play.png b/wt-3.1.7a/examples/wt-homepage/icons/green-play.png
    new file mode 100644
    index 0000000..f69d934
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/green-play.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/invalid.png b/wt-3.1.7a/examples/wt-homepage/icons/invalid.png
    new file mode 100644
    index 0000000..22202b3
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/invalid.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/java-logo.png b/wt-3.1.7a/examples/wt-homepage/icons/java-logo.png
    new file mode 100644
    index 0000000..7d6aba5
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/java-logo.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/javaclass.png b/wt-3.1.7a/examples/wt-homepage/icons/javaclass.png
    new file mode 100644
    index 0000000..a285e3e
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/javaclass.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/orange-play.png b/wt-3.1.7a/examples/wt-homepage/icons/orange-play.png
    new file mode 100644
    index 0000000..d6e4a61
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/orange-play.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/package-folder-open.png b/wt-3.1.7a/examples/wt-homepage/icons/package-folder-open.png
    new file mode 100644
    index 0000000..efbc1fd
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/package-folder-open.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/package.png b/wt-3.1.7a/examples/wt-homepage/icons/package.png
    new file mode 100644
    index 0000000..9f0b3c2
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/package.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/rss.png b/wt-3.1.7a/examples/wt-homepage/icons/rss.png
    new file mode 100644
    index 0000000..09e756e
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/rss.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/ruby-logo-R.png b/wt-3.1.7a/examples/wt-homepage/icons/ruby-logo-R.png
    new file mode 100644
    index 0000000..babbee4
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/ruby-logo-R.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-closed.png b/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-closed.png
    new file mode 100644
    index 0000000..0215874
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-closed.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-open.png b/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-open.png
    new file mode 100644
    index 0000000..97ce9f8
    Binary files /dev/null and b/wt-3.1.7a/examples/wt-homepage/icons/yellow-folder-open.png differ
    diff --git a/wt-3.1.7a/examples/wt-homepage/jwt-home.xml b/wt-3.1.7a/examples/wt-homepage/jwt-home.xml
    new file mode 100644
    index 0000000..bac4e2c
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/jwt-home.xml
    @@ -0,0 +1,847 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<messages>
    +  <message id="top_wt">
    +    <a href="http://www.emweb.be/">
    +      <img src="/css/jwt/emweb_powered.jpg" alt="Emweb" height="22" />
    +    </a> 
    +  </message>
    +
    +  <message id="banner_wrapper">
    +    <div id="banner_content">
    +      <div id="banner_end"> <div id="banner"><a href="#">JWt</a></div> </div>
    +    </div>
    +  </message>
    +
    +  <message id="footer_wrapper">
    +    <div id="footer_content">
    +      <div id="footer_copyright"> 
    +	<a href="http://www.emweb.be/">
    +	  <img src="/css/jwt/emweb_large.jpg" height="25" width="101"
    +	       alt="Emweb.be" title="emweb.be"/></a>
    +	Solutions for web-based systems<br/>
    +	<a href="http://www.emweb.be/">www.emweb.be</a>
    +      </div>
    +
    +      <div id="footer_menu"> 
    +	<a href="http://www.webtoolkit.eu/wt/">Home</a>
    +	| <a href="http://www.emweb.be/?page=contact">Contact</a>
    +      </div>
    +      <div class="clearall"></div>
    +    </div>
    +    <script type="text/javascript">
    +      /*<![CDATA[*/
    +      window.pageTracker = null;
    +      loadScript("http://www.google-analytics.com/ga.js", function() {
    +        window.pageTracker = _gat._getTracker('UA-4345578-1');
    +        window.pageTracker._initData();
    +        window.pageTracker._trackPageview();
    +      });
    +      /* ]]> */
    +    </script>
    +  </message>
    +
    +  <message id="wt">JWt, Java Web Toolkit</message>
    +
    +  <message id="introduction">Introduction</message>
    +  <message id="blog">Blog</message>
    +  <message id="features">Features</message>
    +  <message id="documentation">Documentation</message>
    +  <message id="examples">Examples</message>
    +  <message id="download">Download</message>
    +  <message id="community">Community</message>
    +  <message id="other-language">!Java</message>
    +
    +  <message id="hello-world">Hello world</message>
    +  <message id="charts">Charts</message>
    +  <message id="wt-homepage">Wt homepage</message>
    +  <message id="treeview">Treeview</message>
    +  <message id="git">Git explorer</message>
    +  <message id="chat">Chat</message>
    +  <message id="mail-composer">Mail composer</message>
    +  <message id="figtree">FigTree</message>
    +  <message id="widget-gallery">Widget gallery</message>
    +
    +  <message id="home.news">
    +    <h3><span>News</span></h3>
    +  </message>
    +  <message id="home.latest-news">
    +    <h4><span>Latest News</span></h4>
    +  </message>
    +  <message id="home.historical-news">
    +    <h4><span>Historical News</span></h4>
    +  </message>
    +  
    +  <message id="source-browser">
    +    Browse the source code
    +  </message>
    +
    +  <message id="src-title">
    +    <div>
    +    </div>
    +  </message>
    +
    +
    +  <message id="home.intro">
    +
    +<h3><span>JWt: an introduction</span></h3>
    +
    +<p>JWt is a Java library for developing interactive web applications
    +that may be deployed within standard Java Servlet containers.</p>
    +
    +<p>The API is <b>widget-centric</b> and and uses well-tested patterns
    +of desktop GUI APIs, tailored to the web. To the developer, it offers
    +complete abstraction of any web-specific implementation details,
    +including event handling, graphics support, graceful degradation (or
    +progressive enhancement) and pretty URLs.</p>
    +
    +<p>Unlike many page-based frameworks, JWt was designed for creating
    +stateful applications that are at the same time highly interactive
    +(leveraging techinques such as Ajax to their fullest) and accessible
    +(supporting plain HTML browsers), using automatic <b>graceful
    +degradation or progressive enhancement</b>.</p>
    +
    +<h4>Interactive, secure and accessible</h4>
    +
    +<p>Page-based frameworks (based on PHP, JSP/JSF, Ruby on Rails,
    +etc...) do not make abstraction of the underlying technologies
    +(HTML/XHTML, JavaScript, CSS, Ajax, Forms, DHTML, SVG/VML/Canvas). As
    +a consequence, a developer needs to be familiar with all of these
    +evolving technologies and is also responsible for graceful degradation
    +when browser support is lacking. The structure of the application
    +follows mostly the page-centric paradigm of early day HTML. This means
    +that not only will you need to implement a controller to indicate how
    +a user moves from page to page, but when using advanced Ajax
    +techniques you will need to design and maintain manually your
    +client-server communication.</p>
    +
    +<p>Pure Ajax frameworks on the other hand require tedious JavaScript
    +programming to deal with browser quirks and client-server programming
    +to interact securely with server resources, and all this programming
    +is exposed. These applications usually are not compliant with
    +accessibility guidelines and cannot be indexed by a search robot.</p>
    +
    +<p>In either case, generating HTML code or filling HTML templates is
    +prone to security problems such as <a
    +href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS
    +(Cross-Site-Scripting)</a> by unwillingly allowing JavaScript to be
    +inserted in the page, and <a
    +href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF
    +(Cross-Site Request Forgery)</a> by trusting cookies for
    +authentication. These security problems are hard to avoid when as a
    +developer you need to be able to insert self-written JavaScript to
    +improve your web application and thus the framework cannot filter it
    +out.</p>
    +
    +<p>In contrast, a web application developed with JWt can be developed
    +in only one compiled language (Java), from which the library generates
    +the necessary HTML/XHTML, Javascript, CGI, SVG/VML/Canvas and Ajax
    +code. The responsibility of writing secure and browser-portable web
    +applications is handled by Wt. For example, if available, Wt will
    +maximally use JavaScript and Ajax, but applications developed using Wt
    +will also function correctly when Ajax is not available. Wt will start
    +with a plain HTML/CGI application and progressively enhance to a rich
    +Ajax application if possible.</p>
    +
    +<p>By using standard Java and JVMs, JWt applications can benefit from
    +any existing Java libraries and JVM features including its support for
    +scripting languages.</p>
    +
    +<h4>Typical use scenarios:</h4>
    +
    +<ul>
    +  <li>Complex web-based <b>enterprise applications</b> (with a
    +    database backend) that require a responsive and dynamic user
    +    interface and benefit from the use of Java, if only to use Java
    +    refactoring tools while keeping track of ever changing
    +    requirements.</li>
    +
    +  <li>Web applications which maximally benefit from modern browser
    +    capabilities but with <b>graceful degradation</b> to adhere to W3C
    +    accessibility guidelines and be search engine friendly.</li>
    +
    +  <li>Porting of <b>Java desktop applications</b> to the web.</li>
    +</ul>
    +
    +<h4>Some benefits of using JWt</h4>
    +
    +<ul>
    +  <li>The library allows you to develop web applications much like you
    +    develop Java desktop applications, using your favourite JVM
    +    programming language, while benefitting fully from the powerful
    +    tools available for (Java) development such as flexible debugging
    +    and source code refactoring.</li>
    +  <li>There are no fragile string-based bindings of parameters in
    +    templates or XML files, nor do you need to implement tedious (and
    +    security critical) request/response controller logic.</li>
    +  <li>Just a library: no need for new conventions which imply behavior
    +    or requirements for organizing your source code.</li>
    +  <li>JWt applications have automatic fall-back for non-JavaScript
    +    browsers where possible, allowing you to create fully accessible
    +    applications, which benefit from Ajax where available.</li>
    +  <li>Optionally, use XHTML and CSS for layout and decoration.</li>
    +  <li>Generates standards compliant HTML or XHTML code.</li>
    +  <li>Portable, anti-aliased graphics optimized for web usage (using
    +    inline VML, inline SVG, HTML 5 canvas or PNG images).</li>
    +  <li>Avoid common security problems since Wt has complete control
    +    over the presentation layer and proactively filters out
    +  <i>active</i> tags and attributes, does not expose business logic,
    +    and simplifies authentication using a stateful design.</li>
    +  <li>Ultra-fast load time and low bandwidth usage, which are affected
    +    only by screen complexity, not application size. Wt implements all
    +    the common tips and tricks for optimizing application
    +    responsiveness and even optimizes per browser.</li>
    +  <li>Integrates well with modern object relational mapping techniques such
    +    as the Java Persistence API (e.g. Hibernate).</li>
    +</ul>
    +
    +  </message>
    +  <message id="home.features">
    +
    +<h3><span>Features</span></h3>
    +
    +<h4>Core library</h4>
    +
    +<ul>
    +  <li>Supports all major browsers (Firefox/Gecko, Internet Explorer,
    +    Safari, Chrome, Konqueror, and Opera) but also plain HTML browsers
    +    (tested with Links and Lynx).</li>
    +  <li>Simple deployment in standard servlet containers and JEE
    +    application servers. </li>
    +  <li>No need for IDE plugins, because the library is a plain Java
    +    library.</li>
    +  <li>Equal behavior with or without support for JavaScript or Ajax,
    +    as far as possible, by using graceful degradation or progressive
    +    enhancement (the latter using the progressive bootstrap method).</li>
    +  <li>When Ajax is available, only changes are rendered.</li>
    +  <li>Two-phased rendering of changes to the web page, with first
    +    visible, and in the background invisible changes (when Ajax is
    +    available). When Ajax is not available, only visible contents is
    +    rendered.</li>
    +  <li>Support for browser history navigation (back/forward buttons and
    +    bookmarks), pretty URLs, and search engine optimization with a
    +    unified behavior for plain HTML or Ajax sessions.</li>
    +  <li>Widget centric API that promotes component reuse and increases
    +    productivity.</li>
    +</ul>
    +
    +<h4>Event handling</h4>
    +
    +<ul>
    +  <li>Uses an event listener system for server-side event handling, 
    +    comparable to Java GUI frameworks (SWT, Swing).</li>
    +  <li>Listen for keyboard, mouse, focus and scroll events, and get
    +    event details (such as mouse position, modifier buttons, or
    +    keyboard key).</li>
    +  <li>Automatic synchronization of form field data.</li>
    +  <li>Possibility to hook in custom JavaScript (e.g. for client-side
    +    only event handling), and <i>emit</i> Java signals from this
    +    custom JavaScript.</li>
    +  <li>Flexible Drag&amp;Drop API.</li>
    +</ul>
    +
    +<h4>Native painting system</h4>
    +
    +<ul>
    +  <li>Unified painting API which uses the browsers native (vector)
    +    graphics support (inline VML, inline SVG, or HTML 5 canvas).</li>
    +  <li>Supports arbitrary painter paths, clipping, text, images,
    +    transformations, drop shadow.</li>
    +  <li>Use the painting API to paint a widget, or to create an SVG or
    +    PNG/GIF image.</li>
    +</ul>
    +
    +<h4>GUI components</h4>
    +
    +See also the <a href="http://www.webtoolkit.eu/widgets">Widget
    +gallery</a> for an interactive overview of built-in functionality.
    +
    +<ul>
    +  <li>Basic widgets: buttons, HTML anchors, checkboxes and radio
    +    buttons, combo boxes, containers, file upload control, images,
    +    labels, line edits, buttons, etc..</li>
    +  <li>Form widgets have built-in support for client-side and
    +    server-side validation using WValidator classes.</li>
    +  <li>Composite widgets (that are built on top of basic widgets, and
    +    use only the JWt public API): calendars, sliders, trees and tree
    +    tables, menus, in-place edits, suggestion popups, virtual images,
    +    panels.</li>
    +  <li>Modal and non-modal windows (dialogs and message boxes).</li>
    +  <li>Built-in internationalization using messages resource bundles.</li>
    +  <li>Multi-media (sound and video).</li>
    +  <li>Flexible charting widgets (cartesian charts and pie charts)
    +    based on the native painting API, and JWt's MVC infrastructure.</li>
    +</ul>
    +
    +<h4>Built-in security</h4>
    +
    +<ul>
    +  <li>Enables continuous use of HTTPS through low bandwidth
    +    requirements.</li>
    +  <li>Built-in Cross-Site Scripting (XSS) prevention. Rendered text is
    +    always filtered against potentially malicious code, making XSS
    +    attacks against JWt applications (close to) impossible.</li>
    +  <li>Not vulnerable to Cross-site Request Forgery (CSRF) because
    +    cookies are not needed for session tracking.</li>
    +  <li>Not vulnerable to breaking the application logic by skipping to
    +    a particular URL, since only those events exposed in the interface
    +    can be triggered.</li>
    +</ul>
    +
    +<h4>Testing</h4>
    +
    +With JWt, event handling code constructs and manipulates a widget
    +tree, which can easily be inspected by test code. Therefore, a <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WTestEnvironment.html">test
    +environment</a> allows your application to be instantiated and events
    +to be simulated in absence of a browser, short-cutting the underlying
    +request/response cycle that would otherwise require a simulated
    +browser.
    +
    +<h4>Deployment</h4>
    +<ul>
    +  <li>Deploy into servlet containers (Tomcat, Jetty) and application
    +    servers (JBoss).</li>
    +  <li>Consists out of (currently four) jar files that need to be
    +    included in the IDE or used in war/ear archives.</li>
    +  <li>No XML, except for JEE's web.xml and message resource bundles.</li>
    +</ul>
    +
    +  </message>
    +  <message id="home.examples">
    +
    +<h3><span>Examples</span></h3>
    +
    +<p>Explore some live examples of JWt below.</p>
    +
    +<p>
    +  The source code of these (and many more) examples is included in the
    +  JWt source distribution. You may also browse through the source code
    +  of each example using the <a href="#/src">source code viewer</a>.
    +</p>
    +
    +  </message>
    +
    +  <message id="home.examples.hello">
    +<div>
    +<h4 class="example">Hello world!</h4>
    +
    +<p>
    +  <a href="http://jwt.emweb.be/jwt-hello" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>This simple example illustrates basic JWt concepts:</p>
    +<ul>
    +  <li>
    +    How to create a simple Ajax web application that degrades
    +    gracefully to plain HTML post-backs, using <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WApplication.html">WApplication</a> that corresponds to a new session.
    +  </li>
    +  <li>
    +    <b>Creating widgets</b>, and adding them to <b>the widget tree</b>.
    +  </li>
    +  <li>
    +    Reacting to events using <b>event listeners</b>.
    +  </li>
    +  <li>
    +    Reading user input and updating widgets.
    +  </li>
    +</ul>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.treeview">
    +<div>
    +<h4 class="example">Treeview</h4>
    +<p>
    +  <a href="http://jwt.emweb.be/jwt-treeviewdragdrop/treeviewdragdrop" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +<p>
    +  This example demonstrates the following features:
    +</p>
    +<ul>
    +  <li>
    +    Using <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WTreeView.html">WTreeView</a>
    +    and <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WTableView.html">WTableView"</a>
    +    for rendering a Model's data in a tree or a table.
    +  </li>
    +  <li>
    +    The use of <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WSortFilterProxyModel.html">WSortFilterProxyModel</a>
    +    to implement sorting and filtering of another model.
    +  </li>
    +  <li>
    +    How to implement drag and drop from a selection of items.
    +  </li>
    +  <li>
    +    Using nested layout managers (horizontal and vertical <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WBoxLayout.html">WBoxLayout</a>)
    +    for an automatic window-filling layout.
    +  </li>
    +  <li>
    +    How to use a <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WDialog.html">WDialog</a>
    +    to present a simple form, using a <a
    +    href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WGridLayout.html">WGridLayout</a>
    +    for layout.
    +  </li>
    +</ul>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.chart">
    +<div>
    +<h4 class="example">Charts example</h4>
    +
    +<p>
    +  <a href="http://jwt.emweb.be/jwt-charts/charts" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>This example demonstrates the <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/chart/package-summary.html">JWt
    +charting widgets</a> that are implemented on top of JWt's
    +cross-browser painting API. This painting API uses built-in browser
    +support for generating high quality graphics (instead of the more
    +common approach of rendering PNG/GIF images at the server), thereby
    +off-loading CPU intensive computations to the browser and at the same
    +time reducing bandwidth. Depending on the browser, inline VML, inline
    +SVG, or the HTML 5 canvas is used to render painted contents in a <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WPaintedWidget.html">WPaintedWidget</a>.
    +</p>
    +
    +<p>This example demonstrates JWt's MVC infrastructure. Both the <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WTreeView.html">table
    +view</a> and the charts implement Views on a single <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WAbstractItemModel.html">model</a>. In
    +this way, all changes in the model are automatically reflected in
    +updated views. The models may contain strings, numbers or dates.</p>
    +
    +<p>The example also shows how one may easily use multiple input
    +widgets, react to input changes, and set and read their contents, and
    +use <a
    +href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WComboBox.html">WComboBox</a>
    +in conjunction with MVC models. Behind the scenes, the library makes
    +sure that data is synchronized between browser and server.</p>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.composer">
    +<div>
    +<h4 class="example">Mail composer</h4>
    +
    +<p>
    +  <a href="http://jwt.emweb.be/jwt-composer/composer" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>
    +  This example implements a GMail-like mail composer and shows among
    +  other things how you can easily upload files asynchronously.
    +</p>
    +
    +<p>
    +  Some notes about this example:
    +</p>
    +
    +  <ul>
    +    <li>
    +      The <i>ContactSuggestions</i> class provides auto-completion of
    +      the addressees in the To: Cc: and Bcc: fields. The widget
    +      derives from the <a
    +      href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WSuggestionPopup.html">WSuggestionPopup</a>
    +      class, which uses a number of <a
    +      href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/JSlot.html">JSlot</a>
    +      objects. These are slots for which the event handling code is
    +      specified as JavaScript. In this way, the sorting through
    +      available contacts for suitable suggestions is done entirely
    +      client-side. Note that the contacts for this suggestion box are
    +      automatically transferred in the background after the page has
    +      been rendered, simply because they are invisible and Wt does
    +      this for all invisible contents.
    +    </li>
    +    <li>
    +      The <i>AttachmentEdit</i> widget also demonstrates the use of <a
    +      href="/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WFileUpload.html">WFileUpload</a>
    +      which allows for <b>asynchronous transfer of files</b>, in this
    +      case for uploading the attachments while editing the message.
    +    </li>
    +  </ul>
    +</div>
    +  </message>
    +
    + <message id="home.examples.chat">
    +<div>
    +<h4 class="example">Simple Chat</h4>
    +
    +<p>
    +  <a href="http://jwt.emweb.be/jwt-simplechat/simplechat" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>
    +  This example implements a simple chat client and server for a
    +  multi-user chat application. It illustrates how one can easily let
    +  multiple users interact, for example using <b>server-initiated
    +  updates</b> to push information from one user to other users.
    +</p>
    +
    +<p>
    +  It also illustrates nice benefits of a class-based approach to web
    +  application development: you can easily instantiate the same widget
    +  class multiple times. The SimpleChatClient widget may be intantiated
    +  as easily as you use basic JWt widgets such as a push button.
    +</p>
    +
    +<p>
    +  Interactive applications like these, which allow users to post HTML
    +  text to other users, are notorious for <b>cross-site-scripting (XSS)
    +  attacks</b>: a user enters malicious (javascript) code as part of
    +  his message. When another user renders this message, it may transmit
    +  unwanted private information retrieved from, for example, browser
    +  cookies. JWt prevents such attacks completely, and without any
    +  responsibility to the developer, since widgets such as WText ensure
    +  that what is displayed is only passive text, discarding anything
    +  that is not strictly text.
    +</p>
    +</div>
    +  </message>
    +
    + <message id="home.examples.figtree">
    +<div>
    +<h4 class="example">FigTree</h4>
    +
    +<p>
    +  <a href="http://jwt.emweb.be/figtree/figtree" class="run" target="_blank">
    +    <img src="/icons/orange-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>
    +  <a href="http://tree.bio.ed.ac.uk/software/figtree/"
    +  target="_blank">FigTree</a> is an application created by Andrew
    +  Rambaut for visualizing
    +  <a href="http://en.wikipedia.org/wiki/Phylogenetic_tree"
    +  target="_blank">phylogenetic trees</a> estimated from molecular
    +  data. It is a Java Swing application with a basic UI available as a
    +  Java applet.</p>
    +
    +<p>
    +  In no more than 500 lines Java code, we reimplemented the applet
    +  version as a real web application, reusing much of the existing
    +  application. In fact, we needed only a single line code change and
    +  both versions are based on the same code base.
    +</p>
    +
    +<p>
    +  The source code of this example is not part of the JWt source
    +  distribution, but you can find it (including the web version which
    +  we contributed) on
    +  the <a href="http://code.google.com/p/figtree/source/checkout"
    +  target="_blank">FigTree project page</a>.
    +</p>
    +
    +<p>
    +  See also
    +  our <a href="http://www.webtoolkit.eu/jwt/blog/2010/10/25/fun_with_jwt_and_swing__webgraphics2d"
    +  target="_blank">blog post</a> on porting this application.
    +</p>
    +</div>
    +  </message>
    +
    +  <message id="home.download">
    +    <h3><span>Download</span></h3>
    +  </message>
    +  <message id="home.download.license">
    +<h4>License</h4>
    +
    +<p>JWt may be used using either the GPL or a Commercial License.</p>
    +
    +<p>If you wish to use the library using the <b>GNU General Public
    +License (GPL)</b>, you may build a web application with JWt, and
    +deploy it to your own intranet or Internet web server, for any
    +purpose, without the requirement to make the source code freely
    +available.
    +</p>
    +
    +<p>Note that if you are passing on your web application in binary
    +form, be it selling or giving away for free, then you must include the
    +source code, as per terms of the GPL. This also applies to
    +redistribution of the JWt library, in original or modified form.</p>
    +
    +<p><b>The Commercial License</b> has no such limitations. Please visit
    +our <a href="http://www.emweb.be/?page=license-wt">Licensing
    +information</a> page for license terms, pricing and ordering.</p>
    +
    +<p>You may also obtain <a
    +href="http://www.emweb.be/?page=services">support and training</a>
    +options, directly from the library authors.</p>
    +  </message>
    +
    +  <message id="home.download.cvs">
    +<h4>Git repository</h4>
    +
    +<p>If you want to keep track of the latest changes, or participate in
    +Wt development, you may want to use the git repository.</p>
    +
    +<p>
    +To obtain a clone of JWt:
    +<div class="fragment">
    +  <pre class="fragment">$ git clone http://www.webtoolkit.eu/git/jwt.git</pre>
    +</div>
    +</p>
    +  </message>
    +
    +  <message id="home.download.requirements">
    +<h4>System requirements</h4>
    +
    +For building and using the latest version of JWt, you should follow the  <a
    +href="http://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html#getting-started"> Getting started tutorial
    +</a>, this tutorial explains on how to build JWt and run the examples.
    +  </message>
    +  <message id="home.download.packages">
    +    <h4><span>Available packages</span></h4>
    +  </message>
    +  <message id="home.download.version"><b>Version</b></message>
    +  <message id="home.download.date"><b>Date</b></message>
    +  <message id="home.download.description"><b>Description</b></message>
    +
    +  <message id="home.community">
    +<h3><span>Community</span></h3>
    +
    +<h4>Authors</h4>
    +
    +<p>
    +JWt is mainted by <a href="http://www.emweb.be/">Emweb bvba</a>, and
    +is derived from the latest version of its sibling C++ solution,
    +<a href="http://www.webtoolkit.eu/wt">Wt</a>.
    +</p>
    +
    +<h4>Wiki</h4>
    +
    +<p>
    +There is a community-run <a
    +href="http://redmine.webtoolkit.eu/wiki/jwt/Main">JWt Wiki</a> where
    +you may share tips, notes and experiences using JWt.
    +</p>
    +
    +<h4>Support</h4>
    +
    +<p>You can obtain <a href="http://www.emweb.be/?page=services">support
    +and training</a> options directly from the library authors.</p>
    +
    +<p>Community help is available in the <a
    +href="http://redmine.webtoolkit.eu/projects/jwt/boards">public
    +forums</a>.</p>
    +
    +<h4>Contributions</h4>
    +
    +<p>User contributions are welcomed, ranging from simple patches to
    +widgets, widget sets, and core improvements.</p>
    +
    +<p>However, because JWt is dual-licensed under an Open Source and
    +commercial license, and to legally protect the code base of JWt as a
    +whole by one entity without having to worry about the copyrights for
    +different pieces, we require a copyright assignment from contributors
    +to <a href="http://www.emweb.be/">Emweb</a> before
    +accepting the contribution.</p>
    +  </message>
    +
    +  <message id="home.other-language">
    +
    +<h3><span>!Java ?</span></h3>
    +
    +<p>You like the functionality, but do not grock Java for your project?</p>
    +
    +<p>Do not despair. JWt exists in a native variant or through bindings
    +in other languages:
    +
    +<ul class="languages">
    +
    +<li>
    +<div>
    +<img class="language-icon" src="/icons/clojure-logo.png" alt="Clojure"></img>
    +
    +Leveraging the JVM's support for other languages, such
    +as <b>Clojure</b>, a LISP variant, Raphael Bauduin is experimenting
    +with <a href="http://www.nsa.be/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure">using
    +JWt from within Clojure</a>, documenting his experience in his blog
    +and eventually developing a small support library.
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +
    +<li>
    +<div>
    +<img class="language-icon" src="/icons/cpp-logo.jpg" alt="C++"></img>
    +
    +If you prefer <b>C++</b>, you should consider
    +using <a href="/wt">Wt</a>, the C++ version, which is developed and
    +maintained together with the Java version, and from which the Java
    +version is derived. It comes with application server included.
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +<li>
    +<div>
    +<img class="language-icon" src="/icons/ruby-logo-R.png" alt="Ruby"></img>
    +
    +Richard Dale is
    +maintaining <a href="http://github.com/rdale/wtruby/tree/master">WtRuby</a>,
    +<b>Ruby</b> bindings to Wt, using the same framework used for generating Ruby
    +bindings to Qt and KDE.
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +
    +</ul>
    +</p>
    +
    +  </message>
    +
    +  <message id="home.documentation">
    + 
    +<h3><span>Documentation</span></h3>
    +
    +<h4>Build and install</h4>
    +
    +<p>A <a href="http://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html" target="_blank">User Guide</a> is available (in a new window). This user guide consists of a <a href="http://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html#_library_overview" target="_blank">library overview</a> section and a <a href="http://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html#getting-started" target="_blank">getting started</a> section.</p>
    +
    +<h4>Introduction and tutorials</h4>
    +
    +<p>Learn about the benefits of using JWt compared to traditional web
    +application frameworks using our <a
    +href="/doc/Wt-WhitePaper.pdf">white paper</a>.</p>
    +
    +<p>More introductory material and tutorials are currently lacking. In
    +the mean time, you can use the documentation available for <a
    +href="/wt/documentation">the C++ library</a>, as they are the same
    +code base.</p>
    +
    +<h4>Reference manual</h4>
    +
    +<p>There is a <a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/"
    +target="_blank"> reference manual (in a new window)</a>, generated
    +from the source code using javadoc. 
    +</p>
    +
    +<h4>Wiki</h4>
    +
    +<p>
    +There is a community-run <a
    +href="http://redmine.webtoolkit.eu/wiki/jwt/Main">JWt Wiki</a> where
    +you may share tips, notes and experiences using JWt.
    +</p>
    +  </message>
    +
    +  <message id="srcview.title.JAVA.">
    +    <div class="srcviewtitle">
    +      <h2>Source code for JWt examples</h2>
    +
    +      <p>
    +	Browse below the source code for all examples included in 
    +	<a href="http://www.webtoolkit.eu/jwt">JWt</a>.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.">JWt examples</message>
    +
    +  <message id="srcview.title.JAVA.hello">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Hello world</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for JWt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/hello_world">
    +	  Hello world</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.hello">Example: Hello world</message>
    +
    +  <message id="srcview.title.JAVA.hello">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Hello world</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for JWt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/hello_world">
    +	  Hello world</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.hello_world">Example: Hello world</message>
    +
    +  <message id="srcview.title.JAVA.charts">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Charts</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for JWt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/charts">
    +	  Charts</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.charts">Example: Charts</message>
    +
    +  <message id="srcview.title.JAVA.treeviewdragdrop">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Treeview</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for JWt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/treeview">
    +	  Treeview</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.treeviewdragdrop">Example: Treeview</message>
    +
    +  <message id="srcview.title.JAVA.composer">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Mail composer</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for JWt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/composer">
    +	  Mail composer</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.composer">Example: Mail composer</message>
    +
    +  <message id="srcview.title.JAVA.simplechat">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Chat</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/jwt/examples/simplechat">
    +	  Chat</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.simplechat">Example: Chat</message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/wt-homepage/main.C b/wt-3.1.7a/examples/wt-homepage/main.C
    new file mode 100644
    index 0000000..0f14a76
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/main.C
    @@ -0,0 +1,40 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WServer>
    +
    +#include "BlogRSSFeed.h"
    +#include "WtHome.h"
    +#include "JWtHome.h"
    +
    +int main(int argc, char **argv)
    +{
    +  try {
    +    WServer server(argv[0]);
    +
    +    server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
    +
    +    BlogRSSFeed rssFeed(server.appRoot() + "blog.db", "Wt and JWt blog",
    +      "http://www.webtoolkit.eu/wt/blog",
    +      "We care about our webtoolkits.");
    +
    +    server.addResource(&rssFeed, "/wt/blog/feed/");
    +
    +    server.addEntryPoint(Application, createJWtHomeApplication,
    +      "/jwt", "/css/jwt/favicon.ico");
    +    server.addEntryPoint(Application, createWtHomeApplication,
    +      "", "/css/wt/favicon.ico");
    +
    +    if (server.start()) {
    +      WServer::waitForShutdown();
    +      server.stop();
    +    }
    +  } catch (Wt::WServer::Exception& e) {
    +    std::cerr << e.what() << std::endl;
    +  } catch (std::exception &e) {
    +    std::cerr << "exception: " << e.what() << std::endl;
    +  }
    +}
    diff --git a/wt-3.1.7a/examples/wt-homepage/wt-home.xml b/wt-3.1.7a/examples/wt-homepage/wt-home.xml
    new file mode 100644
    index 0000000..ef171e8
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/wt-home.xml
    @@ -0,0 +1,1266 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<messages>
    +  <message id="top_wt">
    +      <a href="http://www.emweb.be/">
    +	<img src="/css/wt/emweb_powered.jpg" alt="Emweb" height="22" />
    +      </a> 
    +  </message>
    +
    +  <message id="banner_wrapper">
    +    <div id="banner_content">
    +      <div id="banner_end"> <div id="banner"><a href="#">Wt</a></div> </div>
    +    </div>
    +  </message>
    +
    +  <message id="footer_wrapper">
    +    <div id="footer_content">
    +      <div id="footer_copyright"> 
    +	<a href="http://www.emweb.be/">
    +	  <img src="/css/wt/emweb_large.jpg" height="25" width="101"
    +	       alt="Emweb.be" title="emweb.be"/></a>
    +	Solutions for web-based systems<br/>
    +	<a href="http://www.emweb.be/">www.emweb.be</a>
    +      </div>
    +
    +      <div id="footer_menu"> 
    +	<a href="http://www.webtoolkit.eu/wt/">Home</a>
    +	| <a href="http://www.emweb.be/?page=contact">Contact</a>
    +      </div>
    +      <div class="clearall"></div>
    +    </div>
    +    <script type="text/javascript">
    +      /*<![CDATA[*/
    +      window.pageTracker = null;
    +      loadScript("http://www.google-analytics.com/ga.js", function() {
    +        window.pageTracker = _gat._getTracker('UA-4345578-1');
    +        window.pageTracker._initData();
    +        window.pageTracker._trackPageview();
    +      });
    +      /* ]]> */
    +    </script>
    +  </message>
    +
    +  <message id="wt">Wt, C++ Web Toolkit</message>
    +
    +  <message id="introduction">Introduction</message>
    +  <message id="blog">Blog</message>
    +  <message id="features">Features</message>
    +  <message id="documentation">Documentation</message>
    +  <message id="examples">Examples</message>
    +  <message id="download">Download</message>
    +  <message id="community">Community</message>
    +  <message id="other-language">!C++</message>
    +
    +  <message id="hello-world">Hello world</message>
    +  <message id="charts">Charts</message>
    +  <message id="wt-homepage">Wt homepage</message>
    +  <message id="treeview">Treeview</message>
    +  <message id="git">Git explorer</message>
    +  <message id="chat">Chat</message>
    +  <message id="mail-composer">Mail composer</message>
    +  <message id="widget-gallery">Widget gallery</message>
    +
    +  <message id="home.news">
    +    <h3><span>News</span></h3>
    +  </message>
    +  <message id="home.latest-news">
    +    <h4><span>Latest News</span></h4>
    +  </message>
    +  <message id="home.historical-news">
    +    <h4><span>Historical News</span></h4>
    +  </message>
    +
    +  <message id="source-browser">
    +    Browse the source code
    +  </message>
    +
    +  <message id="src-title">
    +    <div>
    +    </div>
    +  </message>
    +
    +  <message id="home.intro">
    +
    +<h3><span>Wt: an introduction</span></h3>
    +
    +<p>Wt (we pronounce that as 'witty') is a C++ library for developing
    +interactive web applications.</p>
    +
    +<p>The API is <b>widget-centric</b> and uses well-tested patterns of
    +desktop GUI APIs, tailored to the web. To the developer, it offers
    +complete abstraction of any web-specific implementation details,
    +including event handling, graphics support, graceful degradation (or
    +progressive enhancement), and pretty URLs.</p>
    +
    +<p>Unlike many page-based frameworks, Wt was designed for creating
    +stateful applications that are at the same time highly interactive
    +(leveraging techinques such as Ajax to their fullest) and accessible
    +(supporting plain HTML browsers), using automatic <b>graceful
    +degradation or progressive enhancement</b>.</p>
    +
    +<p>The library comes with an application server that acts as a
    +stand-alone web server or integrates through FastCGI with other web
    +servers.</p>
    +
    +<h4>Interactive, secure and accessible</h4>
    +
    +<p>Page-based frameworks (based on PHP, JSP/JSF, Ruby on Rails,
    +etc...) do not make abstraction of the underlying technologies
    +(HTML/XHTML, JavaScript, CSS, Ajax, Forms, DHTML, SVG/VML/Canvas). As
    +a consequence, a developer needs to be familiar with all of these
    +evolving technologies and is also responsible for graceful degradation
    +when browser support is lacking. The structure of the application
    +follows mostly the page-centric paradigm of early day HTML. This means
    +that not only will you need to implement a controller to indicate how
    +a user moves from page to page, but when using advanced Ajax
    +techniques you will need to design and maintain manually your
    +client-server communication.</p>
    +
    +<p>Pure Ajax frameworks on the other hand require tedious JavaScript
    +programming to deal with browser quirks and client-server programming
    +to interact securely with server resources, and all this programming
    +is exposed. These applications usually are not compliant with
    +accessibility guidelines and cannot be indexed by a search robot.</p>
    +
    +<p>Generating HTML code or filling HTML templates is prone to security
    +problems such as <a
    +href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS
    +(Cross-Site-Scripting)</a> by unwillingly allowing JavaScript to be
    +inserted in the page, and <a
    +href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF
    +(Cross-Site Request Forgery)</a> by trusting cookies for
    +authentication. These security problems are hard to avoid when as a
    +developer you need to be able to insert self-written JavaScript to
    +improve your web application and thus the framework cannot filter it
    +out.</p>
    +
    +<p>In contrast, a web application developed with Wt can be developed
    +entirely in C++, from which the library generates the necessary
    +HTML/XHTML, CSS, Javascript, CGI, SVG/VML/Canvas and Ajax code. The
    +responsibility of writing secure and browser-portable web applications
    +is handled by Wt. For example, if available, Wt will maximally use
    +JavaScript and Ajax, but applications developed using Wt will also
    +function correctly when Ajax is not available. Wt will start with a
    +plain HTML/CGI application and progressively enhance to a rich Ajax
    +application if possible. With Wt, security is built-in and by
    +default.</p>
    +
    +<h4>Typical use scenarios:</h4>
    +
    +<ul>
    +  <li>Web-based GUIs for <b>embedded systems</b> benefit from the low
    +  footprint of a C++ web application server.</li>
    +  <li>Web-based GUIs that require <b>integration with (existing) C++
    +  libraries</b>, for example for scientific or engineering
    +  applications.</li>
    +  <li>Creating a port of <b>existing C++ desktop applications</b> to
    +  the web.</li>
    +  <li><b>High performance, complex</b> web applications which are
    +  fully personalized (and thus cannot benefit from caching), fully
    +  Ajax enabled and at the same time entirely accessible and Search
    +  Engine Optimized.</li>
    +</ul>
    +
    +<h4>Other benefits of using Wt</h4>
    +
    +<ul>
    +  <li>Develop web applications using familiar desktop GUI
    +  patterns.</li>
    +  <li>Provides an extensive set of widgets, which work regardless of
    +  JavaScript availability (but benefit from JavaScript
    +  availability).</li>
    +  <li>A single specification for both client- and server-side
    +  validation and event handling.</li>
    +  <li>Optionally, use XHTML and CSS for layout and decoration.</li>
    +  <li>Generates standards compliant HTML or XHTML code.</li>
    +  <li>Portable, anti-aliased graphics optimized for web usage (using
    +  inline VML, inline SVG, HTML 5 canvas or PNG images), which can also
    +  be used to render to PDF.</li>
    +  <li>Avoid common security problems since Wt has complete control
    +  over the presentation layer and proactively filters out
    +  <i>active</i> tags and attributes, does not expose business logic,
    +  and simplifies authentication using a stateful design.</li>
    +  <li>Ultra-fast load time and low bandwidth usage, which are affected
    +  only by screen complexity, not application size. Wt implements all
    +  the common tips and tricks for optimizing application
    +  responsiveness and even optimizes per browser.</li>
    +  <li>A simple API with a robust cross-browser implementation for
    +  server-initiated events aka <i>server push</i> or
    +  <i>comet</i>).</li>
    +  <li>Use the built-in httpd for easy development and deployment, or
    +  use the FastCGI/ISAPI connectors to deploy in existing web
    +  servers.</li>
    +</ul>
    +
    +  </message>
    +  <message id="home.features">
    +
    +<h3><span>Features</span></h3>
    +
    +<h4>Core library</h4>
    +
    +<ul>
    +  <li>Supports all major browsers (Firefox/Gecko, Internet Explorer,
    +    Safari, Chrome, Konqueror, and Opera) but also plain HTML browsers
    +    (tested with Links and Lynx).</li>
    +  <li>Develop and deploy on Unix/GNU Linux (gcc) or Microsoft Windows
    +    (Visual Studio).</li>
    +  <li>Equal behavior with or without support for JavaScript or Ajax,
    +    as far as possible, by using graceful degradation or progressive
    +    enhancement (the latter using the progressive bootstrap method).</li>
    +  <li>Integrated Unicode support (UTF8/UTF16) and pervasive
    +    localization.</li>
    +  <li>When Ajax is available, only changes are rendered.</li>
    +  <li>Two-phased rendering of changes to the web page, with first
    +    visible, and in the background invisible changes (when Ajax is
    +    available). When Ajax is not available, only visible contents is
    +    rendered.</li>
    +  <li>Configurable session tracking options that include URL rewriting
    +    and cookies.</li>
    +  <li>Support for browser history navigation (back/forward buttons and
    +    bookmarks), pretty URLs, and search engine optimization with a
    +    unified behavior for plain HTML or Ajax sessions.</li>
    +  <li>High performance, allowing deployment on low-end embedded
    +    devices, or energy-, space- and budget-friendly deployment of
    +    Internet or extranet web sites.</li>
    +  <li>Completely based on event-driven async I/O: sessions are not
    +    tied to threads, and neither do delayed responses (e.g. for server
    +    push) block threads. Instead, threads are needed only to improve
    +    concurrent request handling or for reentrant event loops.</li>
    +</ul>
    +
    +<h4>Event handling</h4>
    +
    +<ul>
    +  <li>Uses a typesafe template-based signal/slot system for event
    +    handling.</li>
    +  <li>Listen for keyboard, mouse and focus events, and get event
    +    details (such as mouse position, modifier buttons, or keyboard
    +    key).</li>
    +  <li>Automatic synchronization of form field data.</li>
    +  <li>Dynamic C++-to-JavaScript translation, by specifying
    +    <i>stateless slot</i> implementations. A single C++ slot implementation
    +    provides both client-side and server-side event handling: visual changes
    +    at client-side and application state at server side.</li>
    +  <li>Possibility to hook in custom JavaScript (e.g. for client-side only event
    +    handling), and <i>emit</i> C++ signals from this custom JavaScript.</li>
    +  <li>Drag&amp;Drop API.</li> 
    +  <li>Supports timed events and built-in support for server-initiated
    +    updates ("server push")</li>
    +</ul>
    +
    +<h4>Native painting system</h4>
    +
    +<ul>
    +  <li>Unified painting API which uses the browsers native (vector)
    +    graphics support (inline VML, inline SVG, or HTML 5 canvas), or
    +    renders to common image formats (PNG, GIF, ...) or vector formats
    +    (SVG, PDF).</li>
    +  <li>Supports arbitrary painter paths, clipping, text, images,
    +    transformations, drop shadow.</li>
    +  <li>Use the painting API to paint a widget, or to create an SVG, PDF
    +    or PNG/GIF image.</li>
    +</ul>
    +
    +<h4>GUI components</h4>
    +
    +See also the <a href="http://www.webtoolkit.eu/widgets">Widget
    +gallery</a> for an interactive overview of built-in functionality.
    +
    +<ul>
    +  <li>Basic HTML widgets: buttons, HTML anchors, checkboxes and radio
    +    buttons, combo boxes, containers, file upload control, images,
    +    labels, line edits, buttons, etc..</li>
    +  <li>Form widgets have built-in support for client-side and
    +    server-side validation using WValidator classes.</li>
    +  <li>Composite widgets that are built on top of basic widgets, and
    +    use only the Wt public API: calendars, sliders, trees and tree
    +    tables, menus, popup menus, in-place edits, suggestion popups,
    +    virtual images, panels.</li>
    +  <li>Modal and non-modal windows (dialog and message boxes).</li>
    +  <li>Built-in internationalization using messages resource bundles.</li>
    +  <li>Multi-media (sound and video).</li>
    +  <li>Flexible charting widgets (cartesian charts and pie charts)
    +    based on the native painting API, and Wt's MVC infrastructure.</li>
    +</ul>
    +
    +<h4>Built-in security</h4>
    +
    +<ul>
    +  <li>Kernel-level memory protection protects against privacy issues
    +    arising from programming bugs, since sessions can be completely
    +    isolated from each other (in dedicated-process mode).</li>
    +  <li>Supports encryption and server authentication using Secure Sockets
    +    Layer (SSL) or Transport Layer Security (TLS) through HTTPS.</li>
    +  <li>Enables continuous use of HTTPS through low bandwidth
    +    requirements (fine-grained Ajax).</li>
    +  <li>Built-in Cross-Site Scripting (XSS) prevention. Rendered text is
    +    always filtered against potentially malicious code, making XSS
    +    attacks against Wt applications (close to) impossible.</li>
    +  <li>Not vulnerable to Cross-site Request Forgery (CSRF) because
    +    cookies for session tracking are optional, and even when used, they
    +    are never solely relied on for requests that trigger event handling
    +    code.</li>
    +  <li>Not vulnerable to breaking the application logic by skipping to
    +    a particular URL, since only those events exposed in the interface
    +    can be triggered.</li>
    +</ul>
    +
    +<h4>Object Relational Mapping library</h4>
    +
    +Wt comes with Wt::Dbo, a self-contained library which implements
    +Object-Relational mapping, and thus a convenient way to interact with
    +SQL databases from C++. Although features like optimistic concurrency
    +control make this an ideal technology for a database driven web
    +application (and it provides good integration with Wt's MVC classes),
    +the library can also be used for off-line or other applications (and
    +does not depend on Wt).
    +
    +The ORM library (which diserves an introduction by it own in <a
    +href="http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html">this
    +tutorial</a>) has the following features:
    +
    +<ul>
    +  <li>No code generation, no macro hacks, no XML configuration, just
    +    modern C++!</li>
    +  <li>Uses a templated visitor pattern which requires a single
    +    template method to provide the mapping: DRY and as efficient as
    +    conceivable!</li>
    +  <li>You can indicate surrogate auto-incremental keys or map natural
    +    keys of any C++ type, which may also be composite (i.e. require more
    +    than one database field).</li>
    +  <li>Supports <a
    +    href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">
    +    optimistic concurrency control</a> using a version field.</li>
    +  <li>Maps Many-to-One and Many-to-Many relations to STL-compatible
    +    collections.</li>
    +  <li>Provides schema generation (aka DDL: data definition language)
    +    and CRUD operations (aka DML: data manipulation language).</li>
    +  <li>Prepared statements throughout.</li>
    +  <li>Each session tracks dirty objects and provides a first-level cache.</li>
    +  <li>Flexible querying which can query individual fields, objects, or
    +    tuples of any these (using Boost.Tuple).</li>
    +  <li>Use a single connection or share connection pools between
    +    multiple sessions from which connections are used only during an
    +    active transaction.</li>
    +  <li>Comes with Sqlite3 and PostgreSQL backends, and a <a
    +    href="http://wtdbomysql.sourceforge.net/">MySQL backend (GPL
    +    only)</a> is maintained by the community (Paul Harisson).</li>
    +</ul>
    +
    +<h4>Testing</h4>
    +
    +With Wt, event handling code constructs and manipulates a widget tree,
    +which can easily be inspected by test code. Therefore, a <a href="
    +http://webtoolkit.eu/wt/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html">test
    +environment</a> allows your application to be instantiated and events
    +to be simulated in absence of a browser, short-cutting the underlying
    +request/response cycle that would otherwise require a simulated browser.
    +
    +<h4>Deployment</h4>
    +
    +<p>
    +The library abstracts different deployment options as connectors
    +libraries, which connect Wt with the outer world. Switching deployment
    +option is a matter of (re)linking to one of these connector libraries!
    +</p>
    +
    +<h5>a) Built-in httpd</h5>
    +
    +<ul>
    +  <li>Simple, high-performance web application server (multi-threaded,
    +    asynchronous I/O) based on the C++ asio library.</li>
    +  <li>Supports both HTTP and HTTPS using the OpenSSL library.</li>
    +  <li>Supports response chunking and compression</li>
    +  <li>Single process (convenient for development and debugging), and
    +    embeddable in an existing application.</li>
    +  <li>Supports deployment behind a ProxyPass'ing (and if needed,
    +    load-balancing) web server.</li>
    +  <li>Available for both UNIX and Win32 platforms.</li>
    +</ul>
    +
    +<h5>b) FastCGI</h5>
    +
    +<ul>
    +  <li>Integrates with most common web servers (apache, lighttpd).</li>
    +  <li>Different session-to-process mapping strategies.</li>
    +  <li>Hot deployment: new sessions use the new application version while 
    +    older sessions may continue with their application version.</li>
    +  <li>Available only for UNIX platforms.</li>
    +</ul>
    +
    +<h5>c) ISAPI</h5>
    +
    +<ul>
    +  <li>Integrates with Microsoft IIS server.</li>
    +  <li>Uses the ISAPI asynchronous API for maximum performance.</li>
    +  <li>Available for the Win32 platform.</li>
    +</ul>
    +  </message>
    +  <message id="home.examples">
    +
    +<h3><span>Examples</span></h3>
    +
    +<p>Explore some live examples of Wt below.</p>
    +
    +<p>
    +  The source code of these (and many more) examples is included in the
    +  Wt source distribution. You may also browse through the source code
    +  of each example using the <a href="#/src">source code viewer</a>,
    +  following the link below each example.
    +</p>
    +
    +<p>
    +  Cross-linked source code for these examples is also in
    +  <a href="/wt/doc/examples/html/modules.html" target="_blank">
    +  doxygen documentation (in a new window)</a>.
    +</p>
    +
    +  </message>
    +  <message id="home.examples.hello">
    +<div>
    +<h4 class="example">Hello world!</h4>
    +
    +<p>
    +  <a href="/wt/examples/hello/hello.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/> Run example
    +  </a>
    +</p>
    +
    +<p>This simple example illustrates basic Wt concepts:</p>
    +<ul>
    +  <li>
    +    How to make a minimal Wt application, using <b>WRun()</b> to start
    +    the web server, and a function to create a new <a
    +    href="/wt/doc/reference/html/classWt_1_1WApplication.html"
    +    target="_blank">WApplication</a>, corresponding to a new session.
    +  </li>
    +  <li>
    +    <b>Creating widgets</b>, and adding them to <b>the widget tree</b>.
    +  </li>
    +  <li>
    +    Reacting to events using the <b>signal/slot</b> mechanism.
    +  </li>
    +  <li>
    +    Reading user input and updating widgets.
    +  </li>
    +</ul>
    +
    +<p>For a thorough (although slightly out-dated) explanation of the
    +hello world example, see also the <a
    +href="http://www.codeguru.com/cpp/i-n/internet/browsercontrol/article.php/c15275/"
    +target="_blank">nice introduction to Wt</a> written by Victor Venkman.</p>
    +</div>
    +  </message>
    +  <message id="home.examples.wt">
    +<div>
    +<h4 class="example">Wt homepage</h4>
    +<p>We eat our own dog food: this website itself is a Wt application. </p>
    +
    +<p>
    +  Not a very interactive application, the wt-homepage illustrates how
    +  Wt not only shines for highly interactive Ajax applications but may
    +  also be used for content-driven websites. To that extent, Wt
    +  supports pretty URLs all the same for both Ajax and plain HTML
    +  sessions, which allows for browser history navigation and bookmarks,
    +  and search engine optimization. The application also uses the <a
    +  href="/wt/doc/reference/html/classWt_1_1WViewWidget.html">WViewWidget</a>
    +  to increase scalability by minimizing server-side memory usage.
    +</p>
    +
    +<p>
    +  Navigation is provided by the <a
    +  href="/wt/doc/reference/html/classWt_1_1WMenu.html"
    +  target="_blank">WMenu</a> and <a
    +  href="/wt/doc/reference/html/classWt_1_1WTabWidget.html"
    +  target="_blank">WTabWidget</a> widgets. These widgets share the same
    +  feature set. For Ajax sessions, they supports <b>pre-loading</b> and
    +  <b>lazy loading</b> of the contents associated with each item, which
    +  may be <a
    +  href="/wt/doc/reference/html/classWt_1_1WMenu.html#d7840197cc0caf0430792b9f4a0df60d"
    +  target="_blank">specified</a> for each item separately. The
    +  pre-loading of contents does not increase the load time because the
    +  Wt rendering engine optimizes the response time by only transmitting
    +  visual widgets or changes first. Everything invisible (such as the
    +  contents for other pre-loaded menu items) is transmitted in the
    +  background, after rendering the visible contents. Automatically.
    +</p>
    +
    +<p>
    +  Menu navigation is implemented using C++ stateless slots, and
    +  therefore results in <b>client-side</b> event handling code.
    +</p>
    +<p>
    +  The <b>internal path</b> features of WMenu allow it to generate URLs
    +  for each menu entry, and in this way participate in browser
    +  navigation history and bookmarking. When the user browses through
    +  the history, each menu listens for changes that affect their own
    +  contents, by listening to the <a
    +  href="/wt/doc/reference/html/classWt_1_1WApplication.html#3e68c4b6bb387f27a614e7962e11967b"
    +  target="_blank">the internalPathChanged signal</a> of the
    +  WApplication object. Similarly, when a user bookmarks a URL to
    +  revisit it later, widgets read the initial internal path when
    +  created to set the initial content accordingly.
    +</p>
    +
    +<p>
    +  Although Wt is very lightweight in CPU usage at the server, it does
    +  require to keep some widget state at the server. This is not
    +  necessarily a problem, provided enough memory (and swap
    +  space). Since the Wt homepage is deployed on a VPS, we still were
    +  careful to minimize server state, by using the <a
    +  href="/wt/doc/reference/html/classWt_1_1WViewWidget.html"
    +  target="_blank">WViewWidget</a> where possible.
    +</p>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.treeview">
    +<div>
    +<h4 class="example">Treeview</h4>
    +
    +<p>
    +  <a href="/wt/examples/treeview-dragdrop/treeview-dragdrop.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Run example
    +  </a>
    +</p>
    +
    +This example shows functionality provided by Wt's Views (WTreeView,
    +WTableView and PieChart) and models.
    +
    +<ul>
    +  <li>
    +    Using <a href="/wt/doc/reference/html/classWt_1_1WTreeView.html"
    +    target="_blank">WTreeView</a>
    +    and <a href="/wt/doc/reference/html/classWt_1_1WTableView.html"
    +    target="_blank">WTableView</a> widgets for rendering a Model's
    +    data in a tree or a table.
    +  </li>
    +  <li>
    +    The use of <a
    +    href="/wt/doc/reference/html/classWt_1_1WSortFilterProxyModel.html"
    +    target="_blank">WSortFilterProxyModel</a>
    +    to implement sorting and filtering of another model.
    +  </li>
    +  <li>
    +    How to implement drag and drop from a selection of items.
    +  </li>
    +  <li>
    +    Using nested layout managers (horizontal and
    +    vertical
    +    <a href="/wt/doc/reference/html/classWt_1_1WBoxLayout.html" target="_blank">
    +      WBoxLayout</a>)
    +    for an automatic window-filling layout.
    +  </li>
    +  <li>
    +    How to use a
    +    modal <a href="/wt/doc/reference/html/classWt_1_1WDialog.html"
    +    target="_blank"> WDialog</a> to present a simple form, using a
    +    <a href="/wt/doc/reference/html/classWt_1_1WGridLayout.html"
    +       target="_blank">WGridLayout</a> for layout.
    +  </li>
    +  <li>
    +    How to show a context-sensitive
    +    <a href="/wt/doc/reference/html/classWt_1_1WPopupMenu.html" target="_blank">
    +      WPopupMenu</a>.
    +  </li>
    +</ul>
    +</div>
    +  </message>
    +  <message id="home.examples.chart">
    +<div>
    +<h4 class="example">Charts example</h4>
    +
    +<p>
    +  <a href="/wt/examples/charts/charts.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Run example
    +  </a>
    +</p>
    +
    +<p>This example demonstrates the <a
    +href="/wt/doc/reference/html/group__charts.html" target="_blank">Wt
    +charting widgets</a> that are implemented on top of Wt's cross-browser
    +painting API. This painting API uses built-in browser support for
    +generating high quality graphics (instead of the tradditional approach
    +of rendering PNG/GIF images at the server). Depending on the browser,
    +inline VML, inline SVG, HTML 5 canvas, or a PNG image is used to
    +render painted contents in a <a
    +href="/wt/doc/reference/html/classWt_1_1WPaintedWidget.html"
    +target="_blank">WPaintedWidget</a>.
    +</p>
    +
    +<p>This example also demonstrates Wt's MVC infrastructure. Both
    +the <a href="/wt/doc/reference/html/classWt_1_1WTableView.html"
    +target="_blank">table view</a> and the charts implement Views on a
    +single <a href="/wt/doc/reference/html/classWt_1_1WAbstractItemModel.html"
    +target="_blank">model</a>. In this way, all changes in the model are
    +automatically reflected in updated views. The model may contain
    +strings, numbers
    +or <a href="/wt/doc/reference/html/classWt_1_1WDate.html"
    +target="_blank">dates</a>. You can see this in action by editing the
    +data using the table view.</p>
    +
    +<p>The example also shows how one may easily use multiple input
    +widgets, react to input changes, and set and read their contents, and
    +use <a href="/wt/doc/reference/html/classWt_1_1WComboBox.html"
    +target="_blank">WComboBox</a> in conjunction with MVC models.  Behind
    +the scenes, the library makes sure that data is synchronized between
    +browser and server.</p>
    +</div>
    +  </message>
    +  <message id="home.examples.git">
    +<div>
    +<h4 class="example">Git explorer</h4>
    +
    +<p>
    +  <a href="/wt/examples/gitmodel/gitview.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Run example
    +  </a>
    +</p>
    +
    +<p>
    +  This example shows how to implement a custom model for Wt's
    +  MVC-based view classes, such as
    +  <a href="/wt/doc/reference/html/classWt_1_1WTreeView.html" target="_blank">
    +    WTreeView</a>.
    +</p>
    +<p>
    +  Wt provides
    +  a <a href="/wt/doc/reference/html/classWt_1_1WStandardItemModel"
    +  target="_blank">WStandardItemModel</a> which can be populated with
    +  data retrieved from for example a database. A draw-back is however
    +  that all data is stored in memory and must be retrieved in advance.
    +  By
    +  reimplementing <a href="/wt/doc/reference/html/classWt_1_1WAbstractItemModel"
    +  target="_blank">WAbstractItemModel</a>, you can implement a model
    +  that retrieves data only when needed, and provides a trade-off
    +  between loading data in memory or keeping it elsewhere. In this
    +  example, we implement a tree model that navigates a revision of a
    +  <a href="http://git-scm.com/">git repository</a>. The model
    +  lazy-stores identification of folder nodes in memory, in order to
    +  generate unique ID's for folders. Initially we thought the SHA-1
    +  id's could be used, but folders with the same content in different
    +  places of the git repository have the same SHA-1 ID's while
    +  representing
    +  different <a href="/wt/doc/reference/html/classWt_1_1WModelIndex.html"
    +  target="_blank">model indexes</a>.
    +</p>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.composer">
    +<div>
    +<h4 class="example">Mail composer</h4>
    +
    +<p>
    +  <a href="/wt/examples/composer/composer.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Run example
    +  </a>
    +</p>
    +
    +<p>
    +  This example implements a GMail-like mail composer and shows among
    +  other things how you can easily upload files asynchronously.
    +</p>
    +
    +  <ul>
    +    <li>
    +      The <i>ContactSuggestions</i> class provides auto-completion of
    +      the addressees in the To: Cc: and Bcc: fields. The widget
    +      derives from
    +      the <a href="/wt/doc/reference/html/classWt_1_1WSuggestionPopup.html"
    +	     target="_blank">WSuggestionPopup</a>
    +      class, which uses a number of
    +      <a href="/wt/doc/reference/html/classWt_1_1JSlot.html"
    +	 target="_blank">JSlot</a>
    +      objects. These are slots for which the client-side JavaScript
    +      event handling code is specified in custom JavaScript (in
    +      contrast to stateless slots, for which client-side JavaScript is
    +      "learned" through invocation). In this way, the sorting through
    +      available contacts for suitable suggestions is done entirely
    +      client-side. Note that the contacts for this suggestion box are
    +      automatically transferred in the background, simply because they
    +      are invisible.
    +    </li>
    +    <li>
    +      The <i>AttachmentEdit</i> widget also demonstrates the use of
    +      <a href="/wt/doc/reference/html/classWt_1_1WFileUpload.html"
    +	 target="_blank">WFileUpload</a>
    +      which allows for <b>asynchronous transfer of files</b>, in this
    +      case for uploading the attachments while editing the message.
    +    </li>
    +    <li>
    +      The <i>Option</i> and <i>OptionList</i> classes show how
    +      stateless slots may be used even when the behaviour is not
    +      entirely stateless. In this case, the hiding of an Option
    +      affects neighboring visible options: an option needs a separator
    +      only if there is a neighbouring option. By <b>invalidating the
    +      stateless slot implementations</b> when state has changed, we
    +      can still use a stateless slot implementation and enjoy
    +      client-side event handling performance!
    +    </li>
    +  </ul>
    +</div>
    +  </message>
    +  <message id="home.examples.chat">
    +<div>
    +<h4 class="example">Simple Chat</h4>
    +
    +<p>
    +  <a href="/wt/examples/simplechat/simplechat.wt" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Run example
    +  </a>
    +</p>
    +
    +<p>
    +  This example implements a simple chat client and server for a
    +  multi-user chat application. It illustrates how one can easily let
    +  multiple users interact, for example using <b>server-initiated
    +  updates</b> to push information from one user to other users.
    +</p>
    +
    +<p>
    +  It also illustrates nice benefits of a class-based approach to web
    +  application development: you can easily instantiate the same widget
    +  class multiple times. The SimpleChatClient widget may be intantiated
    +  as easily as you use basic Wt widgets such as a push button.
    +</p>
    +
    +<p>
    +  Interactive applications like these, which allow users to post HTML
    +  text to other users, are notorious for <b>cross-site-scripting (XSS)
    +  attacks</b>: a user enters malicious (javascript) code as part of
    +  his message. When another user renders this message, it may transmit
    +  unwanted private information retrieved from, for example, browser
    +  cookies. Wt prevents such attacks completely, and without any
    +  responsibility to the developer, since widgets such as WText ensure
    +  that what is displayed is only passive text, discarding anything
    +  that is not strictly text.
    +</p>
    +</div>
    +  </message>
    +  <message id="home.examples.widgetgallery">
    +<div>
    +<h4 class="example">Widget gallery</h4>
    +
    +<p>
    +  <a href="/widgets" class="run" target="_blank">
    +    <img src="/icons/green-play.png" style="vertical-align: top"/>  Go to widget gallery
    +  </a>
    +</p>
    +
    +<p>
    + This example demonstrates most widgets provided by Wt, in addition to
    + other aspects such as event handling and layout classes. Useful as an
    + executable reference to widgets and features provided by the library.
    +</p>
    +
    +</div>
    +  </message>
    +
    +  <message id="home.download">
    +    <h3><span>Download</span></h3>
    +  </message>
    +  <message id="home.download.license">
    +<h4>License</h4>
    +
    +<p>Wt may be used using either the GPL or a Commercial License.</p>
    +
    +<p>If you wish to use the library using the <b>GNU General Public
    +License (GPL)</b>, you may build a web application with Wt, and deploy
    +it to your own intranet or Internet web server, for any purpose,
    +without the requirement to make the source code freely available.
    +</p>
    +
    +<p>Note that if you are passing on your web application in binary form,
    +be it selling or giving away for free, then you must include the source
    +code, as per terms of the GPL. This also applies to redistribution of
    +the Wt library, in original or modified form.</p>
    +
    +<p><b>The Commercial License</b> has no such limitations. Please visit
    +our <a href="http://www.emweb.be/?page=license-wt">Licensing
    +information</a> page for license terms, pricing and ordering.</p>
    +
    +<p>You may also obtain <a
    +href="http://www.emweb.be/?page=services">support and training</a>
    +options, directly from the library authors.</p>
    +  </message>
    +  <message id="home.download.requirements">
    +
    +<h4>The Wt installer: winst <span class="emph">(new!)</span></h4>
    +
    +If you are curious about Wt and would like to try it out but your OS
    +or distribution does not provide an up-to-date package, then this may
    +be just what you need. This package will download and build Wt and its
    +dependencies in a <b>UNIX(-like) environment</b>, and provides also
    +a script to run the examples.
    +<p>
    +This requires <tt>CMake</tt> and <tt>GNU make</tt> and will try to
    +download software using <tt>wget</tt>.
    +</p>
    +<p>
    +Download the package
    +(<a href="http://www.webtoolkit.eu/packages/winst-0.2.tar.gz">winst-0.2.tar.gz</a>)
    +or get the latest git version:
    +<div class="fragment">
    +  <pre class="fragment">$ git clone http://www.webtoolkit.eu/git/winst.git</pre>
    +</div>
    +</p>
    +
    +<h4>System requirements</h4>
    +
    +For building and installing the latest version of Wt, you need at
    +least the following two packages:
    +<ul>
    +  <li><a href="http://www.cmake.org/">CMake</a> cross-platform make configure
    +    utility.<br />
    +
    +    CMake &gt;= 2.6 is preferred (although by the act of a miracle,
    +    2.4 still works).
    +  </li>
    +  <li>
    +    The indispensable <a href="http://www.boost.org/">
    +    boost C++ library</a>: boost-1.36 or later. <br />
    +
    +    The following boost libraries (which are not headers only) are
    +      needed: <tt>boost_date_time</tt>, <tt>boost_regex</tt>,
    +      <tt>boost_program_options</tt>, <tt>boost_signals</tt>,
    +      <tt>boost_system</tt>, and optionally (but highly recommended)
    +      <tt>boost_thread</tt>.
    +  </li>
    +</ul>
    +
    +The following packages are optional, and availability enables additional
    +features in Wt:
    +<ul>
    +  <li><a href="http://www.postgresql.org/">PostgreSQL</a>: if
    +    available, then also a
    +    <a href="/wt/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html">postgres
    +    connector</a> will be built for the ORM library
    +    (<a href="/wt/doc/tutorial/dbo/tutorial.html">Wt::Dbo</a>)</li>
    +  <li><a href="http://libharu.org/wiki/Main_Page">libharu</a>: if
    +    available,
    +    a <a href="/wt/doc/reference/html/classWt_1_1WPdfImage.html">WPdfImage</a>
    +    paint device will be built, allowing to integrate graphics into
    +    PDF documents or be served as a PDF document.</li>
    +  <li><a href="http://www.graphicsmagick.org/">GraphicsMagick</a>: if
    +    available,
    +    a <a href="/wt/doc/reference/html/classWt_1_1WRasterImage.html">WRasterImage</a>
    +    paint device will be built, allowing to paint graphics on a raster
    +    image (like PNG or GIF).</li>
    +</ul>
    +
    +<p>The other requirements depend on the connector support you would
    +like. The connector is what makes your Wt application communicate with
    +the browser:</p>
    +
    +<h5>For FastCGI (Unix only):</h5>
    +
    +<ul>
    +  <li>Apache 1 or 2, or another web server which supports the FastCGI
    +  protocol.</li>
    +  <li>
    +    <a href="http://www.fastcgi.com/#TheDevKit">FastCGI development kit</a>
    +    : fcgi-2.4.0
    +  </li>
    +
    +   <li>
    +     When using apache:
    +     Apache <a href="http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz">mod_fastcgi</a>:
    +     mod_fastcgi-2.4.x.<br />Alternatively you may
    +     use <a href="http://httpd.apache.org/download.cgi#mod_fcgid">mod_fcgid</a>:
    +     mod_fcgid-2.3.5.
    +  </li> 
    +</ul>
    +
    +<h5>For the built-in http deamon, wthttpd:</h5>
    +
    +<ul>
    +  <li>The built-in httpd requires the boost asio C++ library, which is a
    +    header-only library included in boost.
    +  </li>
    +  <li>Optionally, libz (for compression-over-HTTP) and openssl (for
    +    HTTPS support).
    +  </li>
    +</ul>
    +
    +<h5>For ISAPI (Win32 only):</h5>
    +
    +<ul>
    +  <li>The ISAPI connector only works for deploying Wt applications withing a
    +    Microsoft IIS server.</li>
    +</ul>
    +
    +Follow the <a
    +href="/wt/doc/reference/html/Installation.html">Installation
    +instructions</a> to build Wt and run the examples, or see if your
    +platform is listed in the <a
    +href="http://redmine.webtoolkit.eu/wiki/wt/Wt_Installation">platform specific
    +installation instructions</a>.
    +  </message>
    +  <message id="home.download.cvs">
    +<h4>Git repository</h4>
    +
    +<p>If you want to keep track of the latest changes, or participate in
    +Wt development, you may want to use the git repository.</p>
    +
    +<p>
    +To checkout wt:
    +<div class="fragment">
    +  <pre class="fragment">$ git clone http://www.webtoolkit.eu/git/wt.git</pre>
    +</div>
    +</p>
    +  </message>
    +  <message id="home.download.packages">
    +    <h4><span>Available packages</span></h4>
    +  </message>
    +  <message id="home.download.version"><b>Version</b></message>
    +  <message id="home.download.date"><b>Date</b></message>
    +  <message id="home.download.description"><b>Description</b></message>
    +
    +  <message id="home.community">
    +<h3><span>Community</span></h3>
    +
    +<h4>Authors</h4>
    +
    +<p>
    +The software was originally developed by <a
    +href="mailto:koen@emweb.be">Koen Deforche</a>, and is currently
    +maintained by <a href="http://www.emweb.be/">Emweb bvba</a>.</p>
    +
    +<p>We are greateful to these projects from which we borrowed code:</p>
    +<ul>
    +<li>The built-in httpd is based on an example of the <a
    +href="http://asio.sourceforge.net/">asio C++
    +library</a>, developed by Christopher M. Kohlhoff. <a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a></li>
    +<li><a href="http://threadpool.sourceforge.net/">Thread pool</a>
    +implementation from Philipp Henkel.  <a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a></li>
    +<li>The <a href='http://rapidxml.sourceforge.net/'>RapidXML</a>
    +library by Marcin Kalicinski.  <a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a></li>
    +</ul>
    +
    +<h4>Wiki</h4>
    +
    +<p>
    +There is a community-run <a
    +href="http://redmine.webtoolkit.eu/wiki/wt">Wt Wiki</a> with useful
    +information, including installation notes for several Linux
    +distributions.
    +</p>
    +
    +<h4>Support</h4>
    +
    +<p>You can obtain <a href="http://www.emweb.be/?page=services">support
    +and training</a> options directly from the library authors.</p>
    +
    +<p>Community help is available in the <a
    +href="http://redmine.webtoolkit.eu/projects/wt/boards">public
    +forums</a>. Until September 2009, there was only a <a
    +href="mailto:witty-interest@lists.sourceforge.net">mailing list</a>
    +(<a
    +href="http://lists.sourceforge.net/lists/listinfo/witty-interest">how
    +to join</a>), and the old dogs haven't left yet. You may search or
    +browse the mailing list archives using the <a
    +href="http://gmane.org/info.php?group=gmane.comp.web.witty.general">Gmane
    +gateway</a> (kudos to Pau Garcia i Quiles for setting this up).
    +</p>
    +
    +<h4>Contributions</h4>
    +
    +<p>Development of Wt is sponsored by the following companies and
    +organisations:</p>
    +
    +<p>
    +<table>
    +  <tr>
    +    <td class="sponsor-logo"><a href="http://www.emweb.be/">
    +      Emweb bvba</a>
    +    </td>
    +    <td class="sponsor-role">
    +      Creators, official maintainers, and support
    +    </td>
    +  </tr>
    +  <tr>
    +    <td class="sponsor-logo">
    +      <a href="http://www.eurofer.be/">
    +      Eurofer</a>
    +    </td>
    +    <td class="sponsor-role">
    +      Sponsored the development of the charting library, WTreeView and
    +      hierachical item models.
    +    </td>
    +  </tr>
    +</table>
    +</p>
    +
    +<p>User contributions are welcomed, ranging from simple patches to
    +widgets, widget sets, and core improvements.</p>
    +
    +<p>However, because Wt is dual-licensed under an Open Source and
    +commercial license, and to legally protect the code base of Wt as a
    +whole by one entity without having to worry about the copyrights for
    +different pieces, we require a copyright assignment from contributors
    +to <a href="http://www.emweb.be/">Emweb</a> before
    +accepting the contribution.</p>
    +
    +<h4>Translations</h4>
    +
    +The Chinese translation of the homepage was provided by Zhimin Song.
    +
    +<h4>Sourceforge</h4>
    +
    +<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=153710&amp;type=1" style="vertical-align:middle" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
    +The Wt project is hosted at sourceforge <a href="http://sourceforge.net/projects/witty/">here</a>.
    +  </message>
    +  <message id="home.other-language">
    +
    +<h3><span>!C++ ?</span></h3>
    +
    +<p>You like the library functionality, but do not grock C++ for your
    +project?</p>
    +
    +<p>Do not despair. Wt exists in a native variant or through bindings
    +in other languages:
    +
    +<ul class="languages">
    +<li>
    +<div>
    +<img class="java-language-icon" src="/icons/java-logo.png" alt="Java"></img>
    +
    +You can use <a href="/jwt">JWt</a>, a native <b>Java</b> version of Wt
    +developed and maintained together with the C++ version. It has, with
    +few exceptions, the same features as Wt, but runs natively in the JVM
    +and can be deployed into any Servlet container.
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +<li>
    +<div>
    +<img class="language-icon" src="/icons/ruby-logo-R.png" alt="Ruby"></img>
    +
    +Richard Dale is
    +maintaining <a href="http://github.com/rdale/wtruby/tree/master">WtRuby</a>,
    +<b>Ruby</b> bindings to Wt, using the same framework used for generating Ruby
    +bindings to Qt and KDE.
    +</div>
    +
    +
    +<br style="clear: both" />
    +
    +</li>
    +
    +<li>
    +<div>
    +<img class="language-icon" src="/icons/clojure-logo.png" alt="Clojure"></img>
    +
    +Leveraging the JVM's support for other languages, such as <b>Clojure</b>, a
    +LISP variant, Raphael Bauduin is experimenting with <a
    +href="http://www.nsa.be/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure">using JWt from within Clojure</a>, documenting his experience in his blog
    +and eventually developing a small support library.
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +</ul>
    +</p>
    +
    +  </message>
    +  <message id="home.documentation">
    + 
    +<h3><span>Documentation</span></h3>
    +
    +<h4>Build and install</h4>
    +
    +<p>
    +Generic installation instructions (UNIX)
    +are <a href="/wt/doc/reference/html/Installation.html">here</a>, which
    +is also included in the source package (INSTALL or INSTALL.html).</p>
    +<p>
    +In addition, the <a href="http://redmine.webtoolkit.eu/wiki/wt">Wt
    +Wiki</a> has a section dedicated
    +to <a href="http://redmine.webtoolkit.eu/wiki/wt/Wt_Installation">platform
    +specific installation notes</a>.
    +</p>
    +
    +<h4>Introduction and tutorials</h4>
    +
    +<ul>
    +<li>Learn about the benefits of using Wt compared to traditional web
    +application frameworks using our <a
    +href="/doc/Wt-WhitePaper.pdf">white paper</a>.</li>
    +
    +<li>Dr Dobbs Journal has a good <a href="http://www.ddj.com/cpp/206401952">
    +introductary article on Wt</a> (February 2008).</li>
    +
    +<li>The reference manual contains
    +a <a href="http://www.webtoolkit.eu/wt/doc/reference/html/overview.html">library
    +overview</a> which is a good starting point.</li>
    +
    +<li>Software Developers Journal has a (slighly outdated) tutorial
    +(April 2006). The tutorial uses the Hangman example code (see also in
    +the examples section!). You can view a copy of the article <a
    +href="/wt/doc/tutorial/wt-sdj.xhtml">on-line</a> or grab a
    +<a href="/wt/doc/tutorial/wt-sdj.pdf">PDF copy</a>.</li>
    +
    +<li>Victor Venkman wrote a
    +<a href="http://www.codeguru.com/cpp/i-n/internet/browsercontrol/article.php/c15275/">nice introduction to Wt</a>, with a close examination of
    +the <a href="/wt/examples">hello world example</a>.</li>
    +
    +</ul>
    +
    +<h4>Reference manual</h4>
    +
    +<p>There is a a <a href="/wt/doc/reference/html/index.html"
    +target="_blank"> reference manual (in a new window)</a>, generated
    +from the source code using doxygen. This also contains a small
    +tutorial on the tree list example, focusing in particular on the
    +stateless slot implementation mechanism, which is a more advanced
    +feature of Wt to allow optimisation of event handling to client side
    +code.</p>
    +
    +<h4>Annotated examples</h4>
    +
    +<p>Source-level documentation has also been generated for the examples
    +and can be viewed <a href="/wt/doc/examples/html/modules.html"
    +target="_blank">here (in a new window)</a>.</p>
    +
    +<h4>Wiki</h4>
    +
    +<p>
    +There is a community-run <a href="http://redmine.webtoolkit.eu/wiki/wt">Wt Wiki</a> with useful information such as a FAQ and
    +tips and tricks.
    +</p>
    +
    +  </message>
    +
    +  <message id="srcview.title.CPP.">
    +    <div class="srcviewtitle">
    +      <h2>Source code for Wt examples</h2>
    +
    +      <p>
    +	Browse below the source code for all examples included in 
    +	<a href="http://www.webtoolkit.eu/wt">Wt</a>.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.">Wt examples</message>
    +
    +  <message id="srcview.title.CPP.hello">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Hello world</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/hello_world">
    +	  Hello world</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.hello">Example: Hello world</message>
    +
    +  <message id="srcview.title.CPP.charts">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Charts</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/charts">
    +	  Charts</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.charts">Example: Charts</message>
    +
    +  <message id="srcview.title.CPP.treeview-dragdrop">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Treeview</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/treeview">
    +	  Treeview</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.treeview-dragdrop">Example: Treeview</message>
    +
    +  <message id="srcview.title.CPP.composer">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Mail composer</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/composer">
    +	  Mail composer</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.composer">Example: Mail composer</message>
    +  
    +  <message id="srcview.title.CPP.wt-homepage">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Wt homepage</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/wt-homepage">
    +	  Homepage </a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.wt-homepage">Example: Wt Homepage</message>
    +
    +  <message id="srcview.title.CPP.gitmodel">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Git explorer</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/gitmodel">
    +	  Git explorer</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.gitmodel">Example: Git explorer</message>
    +
    +  <message id="srcview.title.CPP.simplechat">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Chat</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/simplechat">
    +	  Chat</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.simplechat">Example: Chat</message>
    +
    +  <message id="srcview.title.CPP.widgetgallery">
    +    <div class="srcviewtitle">
    +      <h2>Source code of the <i>Widget gallery</i> example</h2>
    +
    +      <p>
    +	Browse below the source code for Wt's 
    +	<a href="http://www.webtoolkit.eu/wt/examples/widgetgallery">
    +	  Widget gallery</a> example.
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.widgetgallery">Example: Widget gallery</message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/wt-homepage/wt-home_cn.xml b/wt-3.1.7a/examples/wt-homepage/wt-home_cn.xml
    new file mode 100644
    index 0000000..455bb27
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wt-homepage/wt-home_cn.xml
    @@ -0,0 +1,1148 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<messages>
    +  <message id="top_wt">
    +      <a href="http://www.emweb.be/">
    +	<img src="/css/wt/emweb_powered.jpg" alt="Emweb" height="22" />
    +      </a> 
    +  </message>
    +
    +  <message id="banner_wrapper">
    +    <div id="banner_content">
    +      <div id="banner_end"> <div id="banner"><a href="#">Wt</a></div> </div>
    +    </div>
    +  </message>
    +
    +  <message id="footer_wrapper">
    +    <div id="footer_content">
    +      <div id="footer_copyright"> 
    +	<a href="http://www.emweb.be/">
    +	  <img src="/css/wt/emweb_large.jpg" height="25" width="101"
    +	       alt="Emweb.be" title="emweb.be"/></a>
    +	基于WEB的应用系统解决方案<br/>
    +	<a href="http://www.emweb.be/">www.emweb.be</a>
    +      </div>
    +
    +      <div id="footer_menu"> 
    +	<a href="http://www.webtoolkit.eu/wt/">首页</a>
    +	| <a href="http://www.emweb.be/?page=contact">è”系我们</a>
    +      </div>
    +      <div class="clearall"></div>
    +    </div>
    +    <script type="text/javascript">
    +      /*<![CDATA[*/
    +      window.pageTracker = null;
    +      loadScript("http://www.google-analytics.com/ga.js", function() {
    +        window.pageTracker = _gat._getTracker('UA-4345578-1');
    +        window.pageTracker._initData();
    +        window.pageTracker._trackPageview();
    +      });
    +      /* ]]> */
    +    </script>
    +  </message>
    +
    +  <message id="wt">Wt,C++ 网络开å‘工具包</message>
    +
    +  <message id="introduction">简介</message>
    +  <message id="blog">åšå®¢</message>
    +  <message id="features">特点</message>
    +  <message id="documentation">文档</message>
    +  <message id="examples">示例</message>
    +  <message id="download">下载</message>
    +  <message id="community">社区</message>
    +  <message id="other-language">!C++</message>
    +
    +  <message id="hello-world">Hello world</message>
    +  <message id="charts">图表示例</message>
    +  <message id="wt-homepage">Wt网站示例</message>
    +  <message id="treeview">树视图</message>
    +  <message id="git">Git查看器</message>
    +  <message id="chat">简å•èŠå¤©ç¤ºä¾‹</message>
    +  <message id="mail-composer">邮件编辑器</message>
    +  <message id="widget-gallery">Widget展示库</message>
    +
    +  <message id="home.news">
    +    <h3><span>æ–°é—»</span></h3>
    +  </message>
    +  <message id="home.latest-news">
    +    <h4><span>最新消æ¯</span></h4>
    +  </message>
    +  <message id="home.historical-news">
    +    <h4><span>é‡è¦æ¶ˆæ¯</span></h4>
    +  </message>
    +
    +  <message id="source-browser">
    +    查看æºä»£ç 
    +  </message>
    +
    +  <message id="src-title">
    +    <div>
    +    </div>
    +  </message>
    +
    +  <message id="home.intro">
    +
    +<h3><span>Wt:简介</span></h3>
    +
    +<p>Wt(音åŒ'witty')是一个C++库,用以开å‘交互性Web应用。</p>
    +
    +<p>Wtçš„API<b>以widget为中心</b>,将桌é¢GUI APIs的良好测试模å¼å¼•å…¥Webå¼€å‘。
    +Wt为开å‘者æ供了几乎所有Web实现细节的抽象,其中包括事件处ç†ã€å›¾åƒæ”¯æŒã€
    +优雅é™çº§ï¼ˆæˆ–æ¸è¿›å¢žå¼ºï¼‰ã€åŠè‰¯å¥½çš„URL处ç†ã€‚</p>
    +
    +<p>与其他诸多基于页é¢çš„å¼€å‘框架相比,Wtå¯ä»¥åˆ›å»ºçŠ¶æ€åŒ–的应用,åŒæ—¶
    +实现了高度的交互性和å¯è®¿é—®æ€§ï¼›å…¶äº¤äº’性体现在Wtå¯ä»¥ç»¼åˆä½¿ç”¨å„ç§æŠ€æœ¯ï¼Œ
    +如Ajax等;其å¯è®¿é—®æ€§ä½“现在Wtå¯ä»¥ä½¿åº”用在必è¦çš„时候支æŒçº¯HTMLæµè§ˆå™¨ï¼›
    +这些特性的获得充分利用了自动的<b>优雅é™çº§æˆ–æ¸è¿›å¢žå¼º</b>。</p>
    +
    +<p>Wt库还自带了应用æœåŠ¡å™¨ç¨‹åºï¼Œå¯é…置为独立的WebæœåŠ¡å™¨ï¼Œå½“然也å…许
    +通过FastCGIè¿žåŒå…¶ä»–WebæœåŠ¡å™¨è¿›è¡Œæ•´åˆã€‚</p>
    +
    +<h4>交互性ã€å®‰å…¨æ€§ã€å¯è®¿é—®æ€§</h4>
    +
    +<p>基于页é¢çš„å¼€å‘框架(如PHPã€JSP/JSFã€Ruby on Rails等)没有实现底层基础
    +技术的抽象,这些技术包括HTML/XHTMLã€JavaScriptã€CSSã€Ajaxã€Formsã€DHTML
    +ã€SVG/VML/Canvas等。显然,基于页é¢çš„å¼€å‘框架必须è¦æ±‚å¼€å‘者éšæ—¶ç†Ÿæ‚‰å’ŒæŽŒæ¡
    +这些基本技术,åŒæ—¶å½“æµè§ˆå™¨ä¸æ”¯æŒæ—¶ï¼Œè¿˜è¦ä¸ºåº”用的优雅é™çº§è´Ÿè´£ã€‚å¦å¤–,如果
    +应用采å–早期HTML页é¢ä¸ºä¸­å¿ƒçš„设计模å¼ï¼Œå¼€å‘者ä¸ä»…è¦å®žçŽ°æŽ§åˆ¶å™¨ä»¥å‘Šè¯‰ç”¨æˆ·å¦‚何
    +从一个页é¢è·³è½¬åˆ°å¦ä¸€ä¸ªé¡µé¢ï¼Œè€Œä¸”还è¦åœ¨é‡‡ç”¨ä¸€äº›é«˜çº§Ajax技术时手工设计和维护
    +客户端与æœåŠ¡å™¨ç«¯çš„通讯。</p>
    +
    +<p>å¦ä¸€æ–¹é¢ï¼Œå°±ç®—是纯粹的Ajax框架,也è¦æ±‚å¼€å‘者通过ç¹æ‚çš„JavaScript编程æ¥
    +处ç†æµè§ˆå™¨çš„怪异行为和客户端与æœåŠ¡å™¨ç«¯é—´çš„安全通讯,这些处ç†ä»»ä½•äººéƒ½ä¸èƒ½
    +跳过去ä¸ä¸Žç†ä¼šã€‚åŒæ—¶ï¼Œè¿™äº›åº”用通常ä¸èƒ½ç¬¦åˆå¯è®¿é—®æ€§çš„原则,也ä¸èƒ½å¾ˆå¥½è¢«æœç´¢
    +机器人索引到。</p>
    +
    +<p>安全方é¢ï¼Œç”ŸæˆHTML或填充HTML模版很容易导致安全问题,如<a 
    +href="http://en.wikipedia.org/wiki/Cross-site_scripting">跨站脚本(XSS)
    +</a>和<a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">
    +跨站请求伪造(CSRF)</a>ï¼›XSS问题一般由(ç–忽)å…许嵌入JavaScript代ç å¼•èµ·ï¼Œ
    +CSRF问题一般由(相信)Cookies(å¯ï¼‰ä½œä¸ºè®¤è¯æ‰‹æ®µå¼•èµ·ã€‚作为开å‘者,
    +这些安全问题将是很难é¿å…的,因为我们有时需è¦å…许用户æ’入自己的JavaScript
    +代ç æ¥å®žçŽ°æŸäº›åŠŸèƒ½ï¼Œä½†å¼€å‘框架本身å´æ²¡æ供给我们过滤机制。</p>
    +
    +<p>相å,使用Wtæ¥éƒ¨ç½²Web应用å¯ä»¥å®Œå…¨ç”¨C++æ¥å¼€å‘,Wt自动产生所必须的
    +HTML/XHTMLã€CSSã€Javascriptã€CGIã€SVG/VML/Canvaså’ŒAjax代ç ï¼›ä¸Žæ­¤åŒæ—¶ï¼Œ
    +代ç çš„安全性和æµè§ˆå™¨å…¼å®¹æ€§ç­‰é—®é¢˜éƒ½å°†è½¬äº¤ç»™Wt。例如,在å¯èƒ½çš„情况下,
    +Wt将最大é™åº¦çš„使用JavaScriptå’ŒAjax,但在Ajax功能å—é™æ—¶ï¼ŒWt也能ä¿è¯
    +系统功能è¿è¡Œæ­£å¸¸ã€‚其原ç†æ˜¯Wt将先å¯ç”¨çº¯HTML/CGI应用,éšåŽåœ¨å¯èƒ½çš„情况
    +下æ¸è¿›å¢žå¼ºè‡³Ajax应用。å¦å¤–,Wtæ供了内置的安全性考虑。</p>
    +
    +<h4>典型应用举隅:</h4>
    +
    +<ul>
    +  <li>由于Wt C++ Web应用æœåŠ¡å™¨å ç”¨è¾ƒå°çš„物ç†ç©ºé—´ï¼Œæ•…而å¯ä»¥ä¸º<b>嵌入å¼ç³»ç»Ÿ</b>
    +  æ供基于Webçš„GUIsï¼›</li>
    +
    +  <li>Wtå¯ä»¥ä¸ºéœ€è¦<b>æ•´åˆçŽ°æœ‰C++库</b>的应用æ供基于Webçš„GUIs, 这些
    +  应用å¯èƒ½åŒ…括科学上的或工程上的应用;</li>
    +
    +  <li>Wtå¯ä»¥åˆ›å»ºä»Ž<b>现有C++æ¡Œé¢åº”用</b>到Web的有效渠é“ï¼›</li>
    +
    +  <li>Wt还å¯ä»¥åº”用于一些<b>高性能ã€å¤æ‚çš„</b>Web应用,这样的应用
    +  一般具有高度定制ã€å……分利用Ajax的特点,åŒæ—¶å…·æœ‰å®Œå…¨çš„å¯è®¿é—®æ€§å’Œè¾ƒé«˜çš„
    +  æœç´¢å¼•æ“Žä¼˜åŒ–(SEO)需求</li>
    +</ul>
    +
    +<h4>使用Wt的其他好处</h4>
    +
    +<ul>
    +  <li>å¯ä»¥ä½¿ç”¨æˆ‘们熟悉的桌é¢GUI模å¼å¼€å‘Web应用;</li>
    +
    +  <li>Wt为我们æ供了广阔的widgets集,这些widgetså¯ä»¥åœ¨çŽ¯å¢ƒä¸æ”¯æŒ
    +  JavaScript的情况下照常工作(当然,如果支æŒåˆ™æ•ˆæžœæ›´ä½³ï¼‰ï¼›</li>
    +
    +  <li>在Wt中客户端与æœåŠ¡å™¨ç«¯çš„验è¯å’Œäº‹ä»¶å¤„ç†é‡‡ç”¨åŒä¸€è§„范;</li>
    +
    +  <li>Wtå…许开å‘者选择XHTMLå’ŒCSSæ¥è¿›è¡Œå¸ƒå±€å’Œæ ·å¼ç¼–辑;</li>
    +
    +  <li>Wtå¯ç”Ÿæˆæ ‡å‡†çš„ã€å…¼å®¹çš„HTML或XHTML代ç ï¼›</li>
    +
    +  <li>Wt采用内è”VMLã€å†…è”SVGã€HTML 5 画布或PNGå¯ç”Ÿæˆåº”用于Webçš„å¯ç§»æ¤çš„ã€
    +  å锯齿的图åƒï¼Œå½“然这些图åƒè¿˜å¯ä»¥è½»æ¾æ¸²æŸ“为PDFæ ¼å¼ï¼›</li>
    +
    +  <li></li>
    +
    +  <li>Wtå¯ä»¥é¿å…常è§çš„安全问题,因为Wt拥有对表示层的完全控制,并能够主动
    +  过滤掉<i>处于活动状æ€çš„</i>标签和属性;WtåŒæ—¶å®žçŽ°äº†ä¸šåŠ¡é€»è¾‘çš„éšè—,并
    +  通过状æ€åŒ–的设计简化了认è¯æœºåˆ¶ï¼›</li>
    +
    +  <li>基于Wt的应用的载入时间æžçŸ­ä¸”å ç”¨å¸¦å®½ä¹Ÿå¾ˆä½Žï¼Œç©¶å…¶åŽŸå› æ˜¯Wt中这些特点
    +  ä»…å—é™äºŽé¡µé¢æ˜¾ç¤ºçš„å¤æ‚程度,而ä¸æ˜¯åº”用程åºè‡ªèº«çš„尺寸;Wt还实现了所有的
    +  常用技巧和方法,以优化应用的快速å应,Wt几乎åšåˆ°äº†é’ˆå¯¹æ‰€æœ‰æµè§ˆå™¨çš„优化;</li>
    +
    +  <li>Wtæ供了æœåŠ¡å™¨ç«¯åˆå§‹çš„事件处ç†ï¼Œå³<i>æœåŠ¡å™¨æŽ¨</i>或<i>Comet</i>,
    +  这部分API使用简å•ã€ç¨³å®šä¸”在所有æµè§ˆå™¨ä¸Šå‡èƒ½å®žçŽ°ï¼›</li>
    +
    +  <li>Wt在æœåŠ¡å™¨éƒ¨ç½²ä¸Šï¼Œæ—¢å¯ä»¥ä½¿ç”¨å†…置的httpd,åˆå¯ä»¥ä½¿ç”¨FastCGI/ISAPI,
    +  当然å‰è€…实施起æ¥æ›´ç®€ä¾¿æ˜“行。</li>
    +</ul>
    +
    +  </message>
    +  <message id="home.features">
    +
    +<h3><span>特点</span></h3>
    +
    +<h4>核心库特点</h4>
    +
    +<ul>
    +  <li>支æŒæ‰€æœ‰ä¸»æµæµè§ˆå™¨ï¼ˆåŒ…括Firefox/Geckoã€Internet Explorerã€Safariã€
    +	Chromeã€Konqueror以åŠOpera),åŒæ—¶åœ¨çº¯HTMLæµè§ˆå™¨ä¸Šäº¦èƒ½æ­£å¸¸å·¥ä½œ
    +	(已ç»æµ‹è¯•è¿‡çš„有Linkså’ŒLynx);</li>
    +
    +  <li>æ—¢å¯ä»¥åœ¨Unix/GNU Linux(gcc)上开å‘和部署,åˆå¯ä»¥åœ¨MS Windows
    +   (Visual Studio)上;</li>
    +
    +  <li>Wt利用优雅é™ä½Žä¸Žæ¸è¿›å¢žå¼ºå¯ä»¥ä¿è¯åº”用在有无JavaScript或Ajax支æŒ
    +	的情况下动作行为尽å¯èƒ½ä¸€è‡´ï¼ˆæ¸è¿›å¢žåŠ é¡»ä½¿ç”¨æ¸è¿›å¯åŠ¨æ–¹æ³•ï¼‰ï¼›</li>
    +
    +  <li>Wtæ•´åˆäº†Unicode支æŒï¼ˆUTF8/UTF16),便于全é¢å®žçŽ°æœ¬åœ°åŒ–ï¼›</li>
    +
    +  <li>当Ajax获得支æŒæ—¶ï¼ŒåŸºäºŽWt的应用åªæœ‰å˜åŒ–æ‰è¢«æ¸²æŸ“ï¼›</li>
    +
    +  <li>在Wt中,页é¢å˜åŒ–有å¯è§å˜åŒ–和背景中ä¸å¯è§å˜åŒ–两类,当Ajax被支æŒæ—¶ï¼Œ
    +	两类都会得到渲染,而当Ajaxä¸è¢«æ”¯æŒæ—¶ï¼Œåªæœ‰å¯è§å†…容的å˜åŒ–被渲染;</li>
    +
    +  <li>Wt中的会è¯è·Ÿè¸ªé€‰é¡¹æ˜¯å¯ä»¥æŒ‰éœ€é…置的,主è¦åŒ…括URLé‡å†™å’ŒCookies两ç§ï¼›</li>
    +
    +  <li>Wt中纯HTML页é¢æˆ–Ajax会è¯çš„动作行为是统一的,因此Wt支æŒæµè§ˆå™¨åŽ†å²
    +	导航æ“作(å‘åŽã€å‘å‰æŒ‰é’®å’Œä¹¦ç­¾ï¼‰ï¼Œå¯ç”Ÿæˆè‰¯å¥½URL地å€ï¼Œåˆ©äºŽæœç´¢å¼•æ“Ž
    +	优化工作;</li>
    +
    +  <li>Wt拥有高性能的特点,å…许部署在低端嵌入å¼è®¾å¤‡ä¸Šï¼Œæˆ–者部署在所用功耗ã€
    +	物ç†ç©ºé—´ã€ç»è´¹é¢„算等相对平衡的Internet或extranet网站上;</li>
    +
    +  <li>Wt采用了完全基于事件驱动的异步I/O机制:会è¯ä¸ç”¨ç»‘定于线程,也ä¸ä¼šå»¶è¿Ÿåº”ç­”
    +	(如æœåŠ¡å™¨æŽ¨ï¼‰æˆ–é”定线程;相å,线程åªä¼šè¢«ç”¨æ¥æ高并å‘请求处ç†æˆ–事件循环
    +	çš„é‡æ–°è¿›å…¥ã€‚</li>
    +</ul>
    +
    +<h4>事件处ç†</h4>
    +
    +<ul>
    +  <li>Wt使用类型安全的ã€åŸºäºŽæ¨¡ç‰ˆçš„ä¿¡å·/槽系统æ¥å¤„ç†äº‹ä»¶ï¼›</li>
    +  <li>支æŒå¯¹é”®ç›˜ã€é¼ æ ‡åŠç„¦ç‚¹äº‹ä»¶çš„监å¬ï¼ŒåŒæ—¶å¯ä»¥èŽ·å¾—事件细节,比如鼠标键ä½ã€
    +    键盘键ä½ç­‰ï¼›</li>
    +  <li>自动åŒæ­¥è¡¨å•æ•°æ®ï¼›</li>
    +  <li>Wt通过无状æ€æ§½å®žçŽ°èŽ·å¾—了C++至JavaScript的动æ€è½¬æ¢ï¼›åœ¨æ­¤ï¼Œå•ä¸€C++槽的实现
    +	æ供了客户端和æœåŠ¡å™¨ç«¯åŒé‡äº‹ä»¶å¤„ç†ï¼šå³å®¢æˆ·ç«¯å®žçŽ°æ˜¾ç¤ºçš„å˜åŒ–,æœåŠ¡å™¨ç«¯å®žçŽ°
    +	应用状æ€çš„å˜åŒ–ï¼›</li>
    +  <li>Wt还æ供了é¢å‘å¼€å‘者自定义的JavaScript代ç çš„钩技术,比如让原本仅用于客户端
    +	  事件处ç†çš„JavaScript代ç åœ¨æ‰§è¡ŒåŽé‡Šæ”¾å‡ºC++ä¿¡å·ï¼›</li>
    +  <li>Wtæ供了拖放APIï¼›</li>
    +  <li>Wt支æŒå®šæ—¶äº‹ä»¶ï¼ŒåŒæ—¶å†…置支æŒæœåŠ¡å™¨ç«¯åˆå§‹æ›´æ–°ï¼ˆâ€œæœåŠ¡å™¨æŽ¨â€ï¼‰ã€‚</li>
    +</ul>
    +
    +<h4>原生的绘图系统</h4>
    +
    +<ul>
    +  <li>Wtæ供统一的绘图API,此系统使用了æµè§ˆå™¨åŽŸç”Ÿçš„(å‘é‡ï¼‰å›¾åƒæ”¯æŒ
    +	(如内è”VMLã€å†…è”SVGã€HTML 5画布),也å¯ä»¥æ¸²æŸ“到通用的图片格å¼
    +	(如PNGã€GIF等等)或å‘é‡æ ¼å¼ï¼ˆå¦‚SVGã€PDF等);</li>
    +  <li>Wt支æŒä»»æ„画笔路径ã€è£å‰ªã€è¾“入文本ã€å›¾åƒã€å˜å½¢ã€æŠ•å½±ç­‰</li>
    +  <li>使用绘图APIå¯ä»¥ç»˜åˆ¶widget,或者创建SVGã€PDFåŠPNG/GIF图åƒã€‚</li>
    +</ul>
    +
    +<h4>GUI组件</h4>
    +
    +具体å¯è¿›å…¥<a href="http://www.webtoolkit.eu/widgets">Widget展示库</a>
    +进行交互å¼ä½“验。
    +
    +<ul>
    +  <li>基本的HTML widgets,包括按钮ã€HTML锚ã€å¯é€‰æ¡†ã€å¯é€‰æŒ‰é’®ã€ä¸‹æ‹‰èœå•æ¡†ã€
    +	å„ç§å®¹å™¨ç»„件ã€æ–‡ä»¶ä¸Šä¼ æŽ§åˆ¶ã€å›¾åƒã€æ ‡ç­¾ã€æ–‡æœ¬æ¡†ã€æŒ‰é’®ç­‰ç­‰ï¼›</li>
    +  <li>表å•widgets,内置通过WValidator类支æŒå®¢æˆ·ç«¯å’ŒæœåŠ¡å™¨ç«¯éªŒè¯ï¼›</li>
    +  <li>å¤åˆwidgets,包括日历ã€æ»šåŠ¨æ¡ã€æ ‘ã€æ ‘表ã€èœå•ã€å¼¹å‡ºèœå•ã€å°±åœ°ç¼–辑ã€
    +	建议弹出组件ã€è™šæ‹Ÿå›¾åƒã€é¢æ¿ï¼Œè¿™äº›å¤åˆwidgets建立在基本widgets之上,
    +	并仅使用Wt公共API;</li>
    +  <li>Wt还包å«æ¨¡æ€ä¸Žéžæ¨¡æ€çª—å£ï¼ˆå¯¹è¯æ¡†å’Œæ¶ˆæ¯ç›’);</li>
    +  <li>内置使用文本资æºé›†æ¥å®žçŽ°I18Nï¼›</li>
    +  <li>Wtæ供多媒体组件(声音和视频播放);</li>
    +  <li>çµæ´»æ€§å¾ˆå¤§çš„图表widget,包括笛å¡å°”å标图ã€é¥¼å›¾ç­‰ï¼Œè¿™äº›å›¾è¡¨widget是
    +    建立在Wt原生的绘图API和Wt的MVC架构之上的。</li>
    +</ul>
    +
    +<h4>内置安全性</h4>
    +
    +<ul>
    +  <li>Wt采用Kernel级的内存ä¿æŠ¤æ–¹æ¡ˆï¼Œç‰¹åˆ«æ˜¯åœ¨é‡‡ç”¨ä¸“属进程模å¼ä¸‹ï¼Œ
    +    会è¯ä¹‹é—´å®Œå…¨éš”离,这样Wt完全å¯ä»¥ä¿æŠ¤éšç§æ•°æ®å…å—程åºé”™è¯¯çš„å½±å“ï¼›</li>
    +  <li>Wt使用安全套接字å议层(SSL)或传输层安全å议(TLS)通过HTTPS
    +	æ¥æ”¯æŒåŠ å¯†å’ŒæœåŠ¡å™¨è®¤è¯ï¼›</li>
    +  <li>Wt满足低带宽下HTTPSæŒç»­ä½¿ç”¨çš„å„ç§éœ€æ±‚(细粒度Ajax);</li>
    +  <li>Wtæ供内置跨站脚本(XSS)ä¿æŠ¤ï¼Œé€šè¿‡é¢„先过滤掉渲染文本中的æ¶æ„代ç ï¼Œ
    +	使Wt应用å…å—XSS的攻击;</li>
    +  <li>Wt应用能够对跨站请求伪造(CSRF)有一定的防护,因为用于会è¯è·Ÿè¸ªçš„
    +	Cookies是å¯é€‰çš„,å³ä½¿æ˜¯å¦‚此,Cookies也永远ä¸ä¼šä¸¥æ ¼ä¾èµ–于触å‘事件处ç†ä»£ç 
    +	的请求;</li>
    +  <li>Wt对跳过特定URL而对应用逻辑的破å也有一定的防护,因为åªæœ‰ç•Œé¢
    +	明确的事件æ‰ä¼šè¢«è§¦å‘ï¼›</li>
    +</ul>
    +
    +<h4>对象关系映射库</h4>
    +
    +Wtæ供了Wt::Dbo,这是Wt自带的一个库,实现了对象关系映射,Wt::Dbo为C++
    +应用程åºä¸ŽSQLæ•°æ®åº“之间的æ供了一ç§æ–¹ä¾¿çš„处ç†æ–¹æ³•ã€‚虽然我们说Wt::Dbo拥有的
    +一些特点,如最佳并å‘控制等,使这一技术æˆä¸ºæ•°æ®åº“驱动的Web应用的ç†æƒ³é€‰æ‹©
    +(当然与Wtçš„MVC框架结åˆæœ€ä½³ï¼‰ï¼Œä½†æˆ‘们还è¦è¯´Wt::Dbo还å¯ä»¥è¢«ç”¨åœ¨ç¦»çº¿åº”用
    +或其他éžWt的应用中。
    +
    +Wtçš„ORM库(教程å‚è§<a
    +href="http://www.webtoolkit.eu/wt/doc/tutorial/dbo/tutorial.html">此处</a>)
    +有如下特点:
    +
    +<ul>
    +  <li>没有所谓代ç ç”Ÿæˆã€æ²¡æœ‰å®ã€æ²¡æœ‰XMLé…置,仅é¢å‘C++ï¼</li>
    +  <li>使用模æ¿åŒ–的访问者模å¼ï¼Œè¯¥æ¨¡å¼è¦æ±‚å•ä¸€æ¨¡ç‰ˆæ–¹æ³•ä»¥æ供映射,也就是
    +	常说的“ä¸è¦é‡å¤â€ï¼ˆDRY)或尽最大å¯èƒ½é«˜æ•ˆï¼</li>
    +  <li>在该库中,你å¯ä»¥æŒ‡å®šä»£ç†è‡ªå¢žé”®ï¼Œæˆ–映射任æ„C++类型的自然键,当然也
    +	å¯ä»¥æ˜¯ç»„åˆç±»åž‹ï¼ˆä¾‹å¦‚,当需è¦ä¸æ­¢ä¸€ä¸ªæ•°æ®åº“字段时);</li>
    +  <li>支æŒ<a
    +    href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">
    +	最佳并å‘控制</a>(利用版本字段)</li>
    +  <li>Dbo支æŒå¤šå¯¹ä¸€å’Œå¤šå¯¹å¤šå…³ç³»åˆ°æ ‡å‡†æ¨¡æ¿åº“(兼容)集åˆçš„映射</li>
    +  <li>支æŒæ¨¡å¼ç”Ÿæˆï¼ˆå³æ•°æ®å®šä¹‰è¯­è¨€DDL)和CRUDæ“作(å³æ•°æ®æ“作语言DML);</li>
    +  <li>Dbo使用了预备语å¥ï¼›</li>
    +  <li>æ¯ä¸ªä¼šè¯éƒ½ä¼šè¿½è¸ªè„对象并æ供第一层缓存;</li>
    +  <li>æä¾›çµæ´»çš„ã€é’ˆå¯¹å•ä¸ªå­—段ã€å¯¹è±¡ä»¥åŠä»–们组åˆï¼ˆä½¿ç”¨Boost.Tuple)的查询;</li>
    +  <li>使用å•ä¸ªè¿žæŽ¥æˆ–多个会è¯é—´å…±äº«è¿žæŽ¥æ± ï¼Œè¿™äº›è¿žæŽ¥åªæœ‰å½“交互处于活动状æ€æ—¶
    +	æ‰è¢«ä½¿ç”¨ï¼›</li>
    +  <li>Dbo默认支æŒSqlite3å’ŒPostgreSQLåŽç«¯ï¼ŒåŒæ—¶<a
    +	href="http://wtdbomysql.sourceforge.net/">MySQLåŽç«¯(GPLåè®®)</a>
    +    正由社区爱好者开å‘和维护(作者Paul Harisson)。</li>
    +</ul>
    +
    +<h4>测试</h4>
    +
    +Wt使用事件处ç†ä»£ç æž„建和æ“作widget树,因此这很容易使用测试代ç æ£€æŸ¥ï¼Œ
    +所以Wt的<a href="
    +http://webtoolkit.eu/wt/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html">
    +测试环境</a>å…许你的应用实例化,且å…许在没有æµè§ˆå™¨çš„情况下模拟事件处ç†ï¼Œ
    +这样我们å¯ä»¥ç¼©å‡åº•å±‚请求/应答循环的测试环节。
    +
    +<h4>部署方å¼</h4>
    +
    +<p>
    +Wt库将ä¸åŒçš„部署选项抽象为连接器库,连接器库将Wt连接到ä¸åŒçš„外部环境,
    +选择部署方å¼ï¼ˆé€‰é¡¹ï¼‰å…¶å®žå°±æ˜¯å°†Wt应用连接或é‡è¿žæŽ¥åˆ°æŸä¸ªè¿žæŽ¥åº“上。
    +</p>
    +
    +<h5>a) 内置httpd部署</h5>
    +
    +<ul>
    +  <li>该模å¼ä¸‹Wt是简å•ã€ä¸”适åˆäºŽåŸºäºŽC++ asio库的高性能Web应用æœåŠ¡å™¨
    +	(支æŒå¤šçº¿ç¨‹ã€å¼‚步输入输出);</li>
    +  <li>既支æŒHTTP,也支æŒOpenSSL下的HTTPSï¼›</li>
    +  <li>支æŒåº”答分割与压缩;</li>
    +  <li>支æŒå•ä¸€è¿›ç¨‹ï¼ˆæ–¹ä¾¿éƒ¨ç½²å’Œè°ƒè¯•ï¼‰ï¼Œä¹Ÿæ–¹ä¾¿åµŒå…¥å·²æœ‰åº”用;</li>
    +  <li>支æŒé€šè¿‡ä»£ç†æˆ–为了å‡è¡¡è´Ÿè½½çš„webæœåŠ¡å™¨ç«¯éƒ¨ç½²ï¼›</li>
    +  <li>æ—¢å¯ä»¥éƒ¨ç½²äºŽUNIXå¹³å°ã€åˆå¯éƒ¨ç½²äºŽWin32。</li>
    +</ul>
    +
    +<h5>b) FastCGI部署</h5>
    +
    +<ul>
    +  <li>该模å¼èƒ½ä¸Žå¤šæ•°é€šç”¨webæœåŠ¡å™¨(如apache, lighttpd)æ•´åˆåœ¨ä¸€èµ·ï¼›</li>
    +  <li>æä¾›ä¸åŒçš„会è¯-进程映射策略;</li>
    +  <li>支æŒçƒ­éƒ¨ç½²ï¼Œå³æ–°ä¼šè¯ä½¿ç”¨æ–°çš„应用版本,åŒæ—¶éƒ¨ç½²æ—¶æœªç»ˆæ­¢çš„旧会è¯ä»å¯ä»¥
    +	按旧的应用版本继续è¿è¡Œï¼›</li>
    +  <li>该模å¼ä»…用于UNIXå¹³å°ã€‚</li>
    +</ul>
    +
    +<h5>c) ISAPI部署</h5>
    +
    +<ul>
    +  <li>该模å¼æ•´åˆäº†Microsoft IISæœåŠ¡å™¨ï¼›</li>
    +  <li>使用ISAPI异步API使性能最大化;</li>
    +  <li>仅用于Win32å¹³å°ã€‚</li>
    +</ul>
    +  </message>
    +  <message id="home.examples">
    +
    +<h3><span>示例</span></h3>
    +
    +<p>欢迎æµè§ˆWt的一些在线示例。</p>
    +
    +<p>
    +  这些示例的æºä»£ç å‡åŒ…å«åœ¨Wtçš„æºä»£ç å‘行包中。你å¯ä»¥é€šè¿‡æ¯ä¸ªç¤ºä¾‹ä¸‹çš„
    +  <a href="#/src">æºä»£ç æµè§ˆå™¨</a>查看。
    +</p>
    +
    +<p>
    +  示例æºä»£ç ä¹Ÿä»¥äº¤å‰é“¾æŽ¥çš„å½¢å¼å‡ºçŽ°åœ¨
    +  <a href="/wt/doc/examples/html/modules.html" target="_blank">
    +  Wt示例doxygen文档中</a>(自动开å¯æ–°çª—å£)。
    +</p>
    +
    +  </message>
    +  <message id="home.examples.hello">
    +<div>
    +<h4 class="example">Hello world!</h4>
    +
    +<p>
    +  <a href="/wt/examples/hello/hello.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +<p>这个简å•çš„例å­å±•ç¤ºäº†Wt的基本概念:</p>
    +<ul>
    +  <li>
    +	如何创建一个最å°çš„Wt应用,如何使用<b>WRun()</b>å¯åŠ¨webæœåŠ¡å™¨ï¼Œä»¥åŠ
    +    如何创建一个新的<a
    +    href="/wt/doc/reference/html/classWt_1_1WApplication.html"
    +    target="_blank">WApplication</a>实例(新会è¯ï¼‰ï¼›
    +  </li>
    +  <li>
    +    <b>如何创建widgets</b>,以åŠå¦‚何将其添加到<b>widgetsæ ‘</b>ï¼›
    +  </li>
    +  <li>
    +    如何使用<b>ä¿¡å·/槽</b>机制对事件åšå‡ºå应;
    +  </li>
    +  <li>
    +    如何读å–用户输入和更新widgets树。
    +  </li>
    +</ul>
    +
    +<p>对hello world示例的完整é˜è¿°è¯·å‚è§ç”±Victor Venkman撰写的<a 
    +href="http://www.codeguru.com/cpp/i-n/internet/browsercontrol/article.php/c15275/"
    +target="_blank">Wt介ç»</a>(å¯èƒ½æœ‰ç‚¹è¿‡æ—¶ï¼‰ã€‚
    +</p>
    +
    +</div>
    +  </message>
    +  <message id="home.examples.wt">
    +<div>
    +<h4 class="example">Wt网站示例</h4>
    +<p>Wt首先为己所用了,本网站自身å³æ˜¯ä¸€ä¸ªWt应用实例。 </p>
    +
    +<p>
    +  虽然ä¸æ˜¯ä¸€ä¸ªäº¤äº’性很强的应用,但Wt的网站ä¸ä»…展示了Wt如何实现高度交互的Ajax应用,
    +  åŒæ—¶è¯´æ˜ŽWt适åˆäºŽå†…容驱动的网站建设。Wt为纯HTML会è¯å’ŒAjaxæ供良好的URL支æŒï¼Œ
    +  è¿™å…许æµè§ˆå™¨å¯¼èˆªã€ä¹¦ç­¾ç­‰æ“作,还有利于æœç´¢å¼•æ“Žä¼˜åŒ–。å¦å¤–,Wt使用<a
    +  href="/wt/doc/reference/html/classWt_1_1WViewWidget.html">WViewWidget</a>
    +  æ¥æœ€å°åŒ–æœåŠ¡å™¨ç«¯å†…存使用以æ高应用的规模。
    +</p>
    +
    +<p>
    +  导航功能由<a
    +  href="/wt/doc/reference/html/classWt_1_1WMenu.html"
    +  target="_blank">WMenu</a>和<a
    +  href="/wt/doc/reference/html/classWt_1_1WTabWidget.html"
    +  target="_blank">WTabWidget</a>æ供。这些widgets分享了共åŒçš„特性集。
    +  对于Ajax会è¯ï¼Œä»–们å‡æ”¯æŒå¯¼èˆªæ¡ç›®å…³è”内容的<b>预先载入</b>å’Œ<b>滞åŽè½½å…¥</b>,
    +  åŒæ—¶å¯ä»¥é’ˆå¯¹ä¸åŒå­æ¡ç›®åˆ†åˆ«<a
    +  href="/wt/doc/reference/html/classWt_1_1WMenu.html#d7840197cc0caf0430792b9f4a0df60d"
    +  target="_blank">指定载入模å¼</a>。
    +  需è¦è¯´æ˜Žçš„是,预先载入ä¸ä¼šå¢žåŠ è½½å…¥æ—¶é—´ï¼Œå› ä¸ºWt渲染引擎总是首先传输å¯è§çš„
    +  widgetå’ŒæŸäº›å˜åŒ–,以此æ¥ä¼˜åŒ–应答时间。ä¸å¯è§éƒ¨åˆ†(如其他预先载入的导航å­é¡¹ç›®çš„内容)
    +  则进行éšå¼ä¼ è¾“,而且这ç§ä¼ è¾“是在渲染å¯è§éƒ¨åˆ†å®Œæˆä¹‹åŽè¿›è¡Œã€‚
    +</p>
    +
    +<p>
    +  èœå•å¯¼èˆªæ éƒ¨åˆ†é‡‡ç”¨C++无状æ€æ§½ï¼Œå…¶å®žçŽ°ç»“果是<b>客户端</b>事件处ç†ã€‚
    +</p>
    +<p>
    +  WMenuçš„<b>内部路径</b>特点å…许为æ¯ä¸ªèœå•æ¡ç›®ç”ŸæˆURL,
    +  è¿™å¯ä»¥ç”¨äºŽå½¢æˆæµè§ˆå™¨åŽ†å²è®°å½•å’Œä¹¦ç­¾æ“作。当用户通过历å²è®°å½•æµè§ˆæ—¶ï¼Œ
    +  应用å¯ä»¥é€šè¿‡ç›‘å¬WApplication对象的
    +  <a href="/wt/doc/reference/html/classWt_1_1WApplication.html#41c9bda19b28526e47e70b1b6045e7cf">
    +  内部路径å˜åŒ–ä¿¡å·ï¼ˆinternalPathChanged)</a>,直接引起èœå•æ¡ç›®æŒ‡å‘内容的å˜åŒ–。åŒæ ·åœ°ï¼Œ
    +  当用户将一个URL加入书签中,并在日åŽé‡æ–°è®¿é—®æ—¶ï¼Œwidgets将读å–该URLåˆå§‹çš„内部路径,并创建
    +  相应的内容以显示。
    +</p>
    +
    +<p>
    +  虽然说Wtå ç”¨å¾ˆå°çš„æœåŠ¡å™¨CPU使用,但它确实也需è¦ä¸€éƒ¨åˆ†å†…å­˜æ¥ä¿æŒwidget状æ€ã€‚当然,如果
    +  我们能够æ供足够的内存(和交æ¢ç©ºé—´ï¼‰ï¼Œè¿™å°†ä¸æˆé—®é¢˜ã€‚å¦å¤–,由于Wt网站部署在虚拟专用æœåŠ¡å™¨
    +  (VPS)上,所以我们对此éžå¸¸å°å¿ƒï¼Œå¹¶é€šè¿‡
    +  <a href="/wt/doc/reference/html/classWt_1_1WViewWidget.html">WViewWidget</a>
    +  å°½å¯èƒ½åœ°å‡å°æœåŠ¡å™¨èµ„æºä½¿ç”¨ã€‚
    +</p>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.treeview">
    +<div>
    +<h4 class="example">树视图</h4>
    +
    +<p>
    +  <a href="/wt/examples/treeview-dragdrop/treeview-dragdrop.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +该示例展示了Wt的视图(WTreeViewã€WTableViewå’ŒPieChart)和数æ®æ¨¡åž‹ç­‰ç›¸å…³åŠŸèƒ½ã€‚
    +
    +<ul>
    +  <li>
    +    该示例使用了<a href="/wt/doc/reference/html/classWt_1_1WTreeView.html"
    +    target="_blank">WTreeView</a>
    +    和<a href="/wt/doc/reference/html/classWt_1_1WTableView.html"
    +    target="_blank">WTableView</a>在树或表中渲染模型数æ®ï¼›
    +  </li>
    +  <li>
    +    使用了<a
    +    href="/wt/doc/reference/html/classWt_1_1WSortFilterProxyModel.html"
    +    target="_blank">WSortFilterProxyModel</a>
    +    æ¥å®žçŽ°åˆ«ä¸€ä¸ªæ¨¡åž‹æ•°æ®çš„排åºå’Œè¿‡æ»¤ï¼›
    +  </li>
    +  <li>
    +	该示例还展示如何实现选中æ¡ç›®çš„拖放效果;
    +  </li>
    +  <li>
    +    使用了å¯åµŒå¥—的布局管ç†å™¨ï¼ˆæ°´å¹³æ–¹å‘和垂直方å‘çš„
    +    <a href="/wt/doc/reference/html/classWt_1_1WBoxLayout.html" target="_blank">
    +      WBoxLayout</a>)æ¥å®žçŽ°è‡ªåŠ¨å¡«å……的布局;
    +  </li>
    +  <li>
    +    展示了如何使用模æ€
    +    <a href="/wt/doc/reference/html/classWt_1_1WDialog.html"
    +    target="_blank"> WDialog</a>显示一个简å•çš„表å•ï¼Œç¤ºä¾‹ä¸­è¡¨å•ä½¿ç”¨äº†
    +    <a href="/wt/doc/reference/html/classWt_1_1WGridLayout.html"
    +       target="_blank">WGridLayout</a>作为布局管ç†å™¨ï¼›
    +  </li>
    +  <li>
    +    展示了如何使用基于上下文的
    +    <a href="/wt/doc/reference/html/classWt_1_1WPopupMenu.html" target="_blank">
    +      WPopupMenu</a>。
    +  </li>
    +</ul>
    +</div>
    +  </message>
    +  <message id="home.examples.chart">
    +<div>
    +<h4 class="example">图表</h4>
    +
    +<p>
    +  <a href="/wt/examples/charts/charts.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +<p>该示例展示了<a
    +href="/wt/doc/reference/html/group__charts.html" target="_blank">Wt
    +的图表widgets</a>,这些widgets基于Wtçš„è·¨æµè§ˆå™¨ç»˜å›¾API实现。
    +绘图API使用了内置于æµè§ˆå™¨çš„高质é‡å›¾å½¢æ”¯æŒï¼ˆæ³¨æ„:ä¸æ˜¯åˆ©ç”¨ä¼ ç»Ÿçš„在æœåŠ¡å™¨ç«¯
    +渲染PNG/GIF图åƒçš„方法),主è¦ä¾èµ–æµè§ˆå™¨çš„内è”VMLã€å†…è”SVGã€HTML 5画布或
    +PNG图åƒç­‰å°†ç»˜åˆ¶å†…容渲染于<a
    +href="/wt/doc/reference/html/classWt_1_1WPaintedWidget.html"
    +target="_blank">WPaintedWidget</a>。
    +</p>
    +
    +<p>该示例åŒæ—¶å±•ç¤ºäº†Wtçš„MVC框架,包括
    +<a href="/wt/doc/reference/html/classWt_1_1WTableView.html"
    +target="_blank">表视图</a>和图表所基于的
    +<a href="/wt/doc/reference/html/classWt_1_1WAbstractItemModel.html"
    +target="_blank">æ•°æ®æ¨¡åž‹</a>。Wt采用这ç§æ–¹å¼ï¼Œèƒ½å¤Ÿå°†æ•°æ®æ¨¡åž‹çš„æ¯ä¸ªå˜åŒ–自动
    +å应于视图的更新中。当然,数æ®æ¨¡åž‹å¯ä»¥æ˜¯å­—符串ã€æ•°å€¼æˆ–者
    +<a href="/wt/doc/reference/html/classWt_1_1WDate.html"
    +target="_blank">日期型</a>。你å¯ä»¥é€šè¿‡ç¼–辑表视图的数æ®æ¥ç›´æŽ¥è§‚察以上动作机制。
    +</p>
    +
    +<p>最åŽï¼Œæˆ‘们还å¯ä»¥çŸ¥é“如何使用多项输入widgetsã€å¦‚何对输入的å˜åŒ–åšå‡ºå应ã€
    +如何设置和读å–选项的内容ã€ä»¥åŠå¦‚何使用
    +<a href="/wt/doc/reference/html/classWt_1_1WComboBox.html"
    +target="_blank">WComboBox</a>与MVCæ•°æ®æ¨¡åž‹å…³è”,在以上背景下,Wt库实现了数æ®
    +在æµè§ˆå™¨ç«¯å’ŒæœåŠ¡å™¨ç«¯çš„åŒæ­¥ã€‚</p>
    +</div>
    +  </message>
    +  <message id="home.examples.git">
    +<div>
    +<h4 class="example">Git查看器</h4>
    +
    +<p>
    +  <a href="/wt/examples/gitmodel/gitview.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +<p>
    +  该示例展示了如何为Wt的MVC视图类(如
    +  <a href="/wt/doc/reference/html/classWt_1_1WTreeView.html" target="_blank">
    +  WTreeView</a>)实现定制数æ®æ¨¡åž‹ã€‚
    +</p>
    +<p>
    +  Wtæ供了
    +  <a href="/wt/doc/reference/html/classWt_1_1WStandardItemModel"
    +  target="_blank">WStandardItemModel</a>,该类å¯ä»¥è¢«å¡«å……以数æ®
    +  (如由数æ®åº“获得),其缺点是所有数æ®å­˜å‚¨åœ¨å†…存中且须æå‰èŽ·å–。但是,
    +  通过é‡æ–°å®žçŽ°<a href="/wt/doc/reference/html/classWt_1_1WAbstractItemModel"
    +  target="_blank">WAbstractItemModel</a>,我们å¯ä»¥å®žçŽ°å¦ä¸€ç±»æ•°æ®æ¨¡åž‹ï¼Œå³
    +  仅在需è¦æ—¶èŽ·å–æ•°æ®ï¼Œè¿™å°±æ供了一ç§æ•°æ®è½½å…¥ä¸Žæ•°æ®å­˜å‚¨çš„平衡。
    +  该示例中,我们实现了树模型,该树å¯åœ¨<a href="http://git-scm.com/">
    +  git仓库</a>的修改中导航。该模型将文件夹节点标识符滞åŽå­˜å‚¨åœ¨å†…存中,
    +  以生æˆæ¯ä¸ªæ–‡ä»¶å¤¹çš„唯一ID。最åˆï¼Œæˆ‘们认为å¯ä»¥ä½¿ç”¨SHA-1 ID,但具有相åŒ
    +  内容ã€åœ¨git仓库ä¸åŒä½ç½®çš„文件夹å´å…·æœ‰ç›¸åŒçš„SHA-1 ID,而我们åˆæƒ³é‡‡ç”¨
    +  ä¸åŒçš„<a href="/wt/doc/reference/html/classWt_1_1WModelIndex.html"
    +  target="_blank">模型索引</a>æ¥è¡¨è¾¾ï¼Œå› æ­¤é‡‡ç”¨äº†ä¸Šé¢çš„方法。
    +</p>
    +</div>
    +  </message>
    +
    +  <message id="home.examples.composer">
    +<div>
    +<h4 class="example">邮件编辑器</h4>
    +
    +<p>
    +  <a href="/wt/examples/composer/composer.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +<p>
    +  该示例实现了一个酷似GMail的邮件编辑器,除此还展示了如何轻æ¾å®žçŽ°æ–‡ä»¶å¼‚步上传。
    +</p>
    +
    +  <ul>
    +    <li>
    +	  其中<i>ContactSuggestions</i>ç±»æ供了“收件人â€ã€â€œæŠ„é€â€ã€â€œå¯†é€â€åœ°å€çš„
    +	  自动补全功能,该类继承自
    +      <a href="/wt/doc/reference/html/classWt_1_1WSuggestionPopup.html"
    +	  target="_blank">WSuggestionPopup</a>类,此类使用了诸多
    +      <a href="/wt/doc/reference/html/classWt_1_1JSlot.html"
    +	  target="_blank">JSlot</a>对象。对这些槽,客户端JavaScript事件处ç†ä»£ç 
    +	  由开å‘者自定义的JavaScript决定(这ä¸åŒäºŽæ— çŠ¶æ€æ§½ä¸­å®¢æˆ·ç«¯JavaScript
    +	  代ç ç”±ç¬¬ä¸€æ¬¡è°ƒç”¨æ—¶â€œå­¦ä¹ â€å¾—到的方å¼ï¼‰ã€‚Wt采用这ç§æ–¹å¼ï¼Œå¼¹å‡ºçš„å¯èƒ½é€‚åˆ
    +	  çš„è”系人列表的排åºå®Œå…¨ç”±å®¢æˆ·ç«¯å†³å®šã€‚注æ„:建议框中的è”系人是在背景中
    +	  自动传递的,原因很简å•ï¼Œå› ä¸ºä»–们是ä¸å¯è§çš„。
    +    </li>
    +    <li>
    +      其中的<i>AttachmentEdit</i>展示了
    +      <a href="/wt/doc/reference/html/classWt_1_1WFileUpload.html"
    +	  target="_blank">WFileUpload</a>的使用,该类å…许
    +      <b>文件的异步传输</b>,也就是说我们å¯ä»¥å®žçŽ°ç¼–辑邮件内容的åŒæ—¶ä¸Šä¼ é™„件。
    +    </li>
    +    <li>
    +	  其中的<i>Option</i>å’Œ<i>OptionList</i>类展示了无状æ€æ§½æ˜¯å¦‚何在行为ä¸å®Œå…¨
    +	  是无状æ€çš„情况下使用的。在这ç§æƒ…况下,一个Optionçš„éšè—å½±å“了临近å¯è§Option:
    +	  å³åªæœ‰å½“存在æŸä¸ªä¸´è¿‘选项时,一个选项æ‰éœ€è¦åˆ†éš”线。当状æ€å˜åŒ–åŽï¼Œé€šè¿‡
    +	  <b>使无状æ€æ§½çš„实现失效</b>,我们ä»èƒ½å¤Ÿä½¿ç”¨æ— çŠ¶æ€æ§½çš„实现,并体验到
    +	  客户端事件处ç†çš„高效ï¼
    +    </li>
    +  </ul>
    +</div>
    +  </message>
    +  <message id="home.examples.chat">
    +<div>
    +<h4 class="example">简å•èŠå¤©ç¤ºä¾‹</h4>
    +
    +<p>
    +  <a href="/wt/examples/simplechat/simplechat.wt" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>è¿è¡Œè¯¥ç¤ºä¾‹
    +  </a>
    +</p>
    +
    +<p>
    +  该示例实现了一个简å•çš„ã€å¤šç”¨æˆ·çš„èŠå¤©åº”用,它展示了Wt中如何轻æ¾åœ°è®©å¤šä¸ªç”¨æˆ·
    +  å³æ—¶äº’动,这里å³ç”¨åˆ°<b>æœåŠ¡å™¨ç«¯åˆå§‹æ›´æ–°</b>将信æ¯ç”±ä¸€ä¸ªç”¨æˆ·æŽ¨å‘其他用户。
    +</p>
    +
    +<p>
    +  该示例还å‘你展示了基于类的webå¼€å‘方法的良好效果,在这ç§æ–¹æ³•ä¸­ï¼Œä½ å¯ä»¥è½»æ¾å®žçŽ°
    +  对åŒä¸€widget的多次实例化,示例中的SimpleChatClient widgetå°±å¯ä»¥è±¡ä½¿ç”¨Wt基本类
    +  (如按钮)一样,轻æ¾å®žä¾‹åŒ–。
    +</p>
    +
    +<p>
    +  象èŠå¤©è¿™æ ·çš„一些交互应用,å¯ä»¥å…许用户传输HTML文本给其他用户,众所周知,这éžå¸¸
    +  容易引起<b>跨站脚本攻击(XSS)</b>,因为用户å¯ä»¥ä¸è¢«é™åˆ¶åœ°è¾“å…¥æ¶æ„代ç (javascript)并作为
    +  å…¶å‘出文本的一部分。当对应用户渲染收到的文本时,它å¯èƒ½å°†ä»Žè¯¥ç”¨æˆ·(如æµè§ˆå™¨
    +  cookies)获得的一些éšç§ä¿¡æ¯å‘é€å‡ºåŽ»ã€‚Wt则完全阻止了这样的进攻,åŒæ—¶ä¸ä¼šç»™å¼€å‘者带æ¥
    +  负担,因为象WText这样的widgets自然ä¿è¯äº†æ‰€æ˜¾ç¤ºçš„åªæœ‰å®‰å…¨æ–‡æœ¬(passive text),自动
    +  èˆå¼ƒä»»ä½•ä¸¥æ ¼æ„义上ä¸æ˜¯æ–‡æœ¬çš„东西。
    +</p>
    +</div>
    +  </message>
    +  <message id="home.examples.widgetgallery">
    +<div>
    +<h4 class="example">Widget展示库</h4>
    +
    +<p>
    +  <a href="/widgets" class="run" target="_blank">
    +    <img src="icons/green-play.png" style="vertical-align: top"/>å‰å¾€widget展示库 
    +  </a>
    +</p>
    +
    +<p> 
    + 该示例展示了Wt中大部分widget,å¦å¤–还展示了相应的事件处ç†ã€å¸ƒå±€ç±»ç­‰ã€‚
    + è¿™å¯ä»¥ä½œä¸ºWt库中å¯æ‰§è¡Œçš„widgetåŠå…¶ç›¸å…³ç‰¹æ€§çš„å‚考,是有一定帮助作用的。
    +</p>
    +
    +</div>
    +  </message>
    +
    +  <message id="home.download">
    +    <h3><span>下载</span></h3>
    +  </message>
    +  <message id="home.download.license">
    +<h4>许å¯</h4>
    +
    +<p>Wtå¯ä»¥åœ¨GNU通用公共许å¯(GPL)或商业许å¯ä¸‹ä½¿ç”¨ã€‚</p>
    +
    +<p>如果你希望在<b>GPL</b>下使用Wt库,那么你å¯ä»¥ä»¥ä»»ä½•ç›®çš„创建web应用,
    + 并部署在你自己的intranet或InternetæœåŠ¡å™¨ä¸Šï¼Œè€Œæ²¡æœ‰å¿…须开放æºä»£ç çš„è¦æ±‚。
    +</p>
    +
    +<p>注æ„,根æ®GPLæ¡æ¬¾è§„定,如果你正以二进制形å¼å°†ä½ çš„web应用转给其他方使用,
    + 其方å¼æˆ–为销售,或å…è´¹æ供,此时你必须在å‘布版上附带程åºæºä»£ç ï¼›åŒæ—¶ï¼Œè¿™
    + 一è¦æ±‚亦适用于针对Wt库原始形å¼æˆ–修改形å¼çš„å†å‘布。
    +</p>
    +
    +<p>所谓<b>商业许å¯</b>则没有以上é™åˆ¶ï¼Œå…·ä½“请访问我们的
    + <a href="http://www.emweb.be/?page=license-wt">许å¯ä¿¡æ¯</a>
    + 页é¢ï¼Œä»¥èŽ·å¾—对许å¯æ¡æ¬¾ã€å”®ä»·ã€è®¢è´­çš„具体è¦æ±‚。
    +</p>
    +
    +<p>注:网站所有中译文,特别是与法律许å¯ç­‰ç›¸å…³çš„内容最终以英文为准。
    +</p>
    +
    +<p>åŒæ—¶ï¼Œä½ è¿˜å¯ä»¥ç›´æŽ¥ä»ŽWt库作者处获得
    + <a href="http://www.emweb.be/?page=services">支æŒä¸ŽåŸ¹è®­</a>。
    +</p>
    +  </message>
    +  <message id="home.download.requirements">
    +
    +<h4>Wt库安装器:winst <span class="emph">(new!)</span></h4>
    +
    +如果你现在对Wt特别好奇,想å°è¯•ä¸€ä¸‹ï¼Œä½†æ˜¯ä½ çš„系统或å‘行版还没有æä¾›
    +最新的å‡çº§åŒ…,那么这个安装器å¯èƒ½éžå¸¸é€‚åˆä½ ã€‚这个安装器将下载并将Wt
    +安装在<b>ç±»UNIX环境</b>下,åŒæ—¶æ供了用于è¿è¡Œç¤ºä¾‹çš„脚本。
    +
    +<p>
    +Wt安装器需è¦<tt>CMake</tt>å’Œ<tt>GNU make</tt>,åŒæ—¶å¯èƒ½ä¼šé€šè¿‡<tt>wget</tt>
    +下载软件。
    +</p>
    +<p>
    +下载该软件包
    +(<a href="http://www.webtoolkit.eu/packages/winst-0.1.tar.gz">winst-0.1.tar.gz</a>)
    +或者直接获得最新的 git 版本:
    +<div class="fragment">
    +  <pre class="fragment">$ git clone http://www.webtoolkit.eu/git/winst.git</pre>
    +</div>
    +</p>
    +
    +<h4>系统需求</h4>
    +
    +为了能够编译和安装最新版的Wt库,你至少需è¦å®‰è£…以下两个包:
    +<ul>
    +  <li><a href="http://www.cmake.org/">CMake</a> 交å‰å¹³å°makeé…置工具<br />
    +
    +    建议 CMake &gt;= 2.6(尽管2.4也能工作)。
    +  </li>
    +  <li>
    +    å¿…ä¸å¯å°‘çš„<a href="http://www.boost.org/">
    +    boost C++ 库</a>: boost-1.36 或更高版本。 <br />
    +
    +	下é¢çš„boost库需è¦å®‰è£…(ä¸åªæ˜¯å¤´æ–‡ä»¶ï¼‰ï¼š
    +      <tt>boost_date_time</tt>ã€<tt>boost_regex</tt>ã€
    +      <tt>boost_program_options</tt>ã€<tt>boost_signals</tt>ã€
    +      <tt>boost_system</tt>å’Œå¯é€‰çš„(但强力推è)
    +      <tt>boost_thread</tt>。
    +  </li>
    +</ul>
    +
    +下é¢çš„包是å¯é€‰çš„,但如果能有å¯ä»¥ä½“验到更多的Wt特性:
    +<ul>
    +  <li><a href="http://www.postgresql.org/">PostgreSQL</a>:如果安装上,那么
    +    <a href="/wt/doc/reference/html/classWt_1_1Dbo_1_1backend_1_1Postgres.html">postgres
    +    连接器</a>将会为实现ORM库(<a href="/wt/doc/tutorial/dbo/tutorial.html">Wt::Dbo</a>)
    +	而被编译;</li>
    +  <li><a href="http://libharu.org/wiki/Main_Page">libharu</a>:如果安装上,那么
    +	<a href="/wt/doc/reference/html/classWt_1_1WPdfImage.html">WPdfImage</a>绘图设备
    +	将被编译,这样就能够将图片整åˆè¿›PDF文件或作为PDF文件处ç†ï¼›</li>
    +  <li><a href="http://www.graphicsmagick.org/">GraphicsMagick</a>:如果安装上,那么
    +    <a href="/wt/doc/reference/html/classWt_1_1WRasterImage.html">WRasterImage</a>
    +	绘图设备将被编译,这样就能够在光栅扫æ图åƒï¼ˆPNG或GIF)上绘图了;</li>
    +</ul>
    +
    +<p>其他必需部分ä¾èµ–于你所选择的连接器支æŒï¼Œè¿žæŽ¥å™¨æ˜¯èƒ½å¤Ÿå®žçŽ°ä½ çš„Wt应用与æµè§ˆå™¨é€šè®¯çš„工具:</p>
    +
    +<h5>对于FastCGI(é™äºŽUnix):</h5>
    +
    +<ul>
    +  <li>Apache 1 或 2,或其他支æŒFastCGIå议的webæœåŠ¡å™¨</li>
    +  <li>
    +    <a href="http://www.fastcgi.com/#TheDevKit">FastCGIå¼€å‘工具包</a>
    +    :fcgi-2.4.0
    +  </li>
    +
    +   <li>
    +	 使用apache时:
    +     Apache <a href="http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz">mod_fastcgi</a>:
    +     mod_fastcgi-2.4.x.<br />或者也å¯ä»¥ä½¿ç”¨
    +     <a href="http://httpd.apache.org/download.cgi#mod_fcgid">mod_fcgid</a>:
    +     mod_fcgid-2.3.5。
    +  </li> 
    +</ul>
    +
    +<h5>对于内置 httpd(wthttpd):</h5>
    +
    +<ul>
    +  <li>内置httpd需è¦boost asio C++ 库(仅包å«å¤´æ–‡ä»¶çš„库);</li>
    +  <li>å¯é€‰çš„:libz(用于HTTP压缩)和openssl(用于HTTPS支æŒï¼‰ï¼›</li>
    +</ul>
    +
    +<h5>对于ISAPI(é™äºŽWin32):</h5>
    +
    +<ul>
    +  <li>ISAPI连接器åªæœ‰é…åˆMS IISæœåŠ¡å™¨æ‰èƒ½éƒ¨ç½²Wt应用。</li>
    +</ul>
    +
    +ä½ å¯ä»¥ä¾ç…§<a
    +href="/wt/doc/reference/html/Installation.html">安装指å—
    +</a>编译Wt并è¿è¡Œç›¸å…³ç¤ºä¾‹ï¼Œæˆ–者如果你的è¿è¡Œå¹³å°åŒ…å«åœ¨åˆ—表
    +<a href="http://redmine.webtoolkit.eu/wiki/wt/Wt_Installation">å¹³å°ç›¸å…³å®‰è£…指å—</a>
    +中的è¯ï¼Œä¹Ÿå¯å‚照执行。
    +  </message>
    +  <message id="home.download.cvs">
    +<h4>Git仓库</h4>
    +
    +<p>如果你希望跟踪最新的å˜åŒ–,或者å‚与到Wtçš„å¼€å‘中,你å¯èƒ½å¸Œæœ›ä½¿ç”¨git仓库。</p>
    +
    +<p>
    +检出æ“作:
    +<div class="fragment">
    +  <pre class="fragment">$ git clone http://www.webtoolkit.eu/git/wt.git</pre>
    +</div>
    +</p>
    +  </message>
    +  <message id="home.download.packages">
    +    <h4><span>å¯ç”¨ç‰ˆæœ¬</span></h4>
    +  </message>
    +  <message id="home.download.version"><b>版本</b></message>
    +  <message id="home.download.date"><b>日期</b></message>
    +  <message id="home.download.description"><b>æè¿°</b></message>
    +
    +  <message id="home.community">
    +<h3><span>社区</span></h3>
    +
    +<h4>作者</h4>
    +
    +<p>
    +Wt最åˆç”±<a
    +href="mailto:koen@emweb.be">Koen Deforche</a>å¼€å‘,目å‰ç”±
    +<a href="http://www.emweb.be/">Emweb bvba</a>å…¬å¸ç»´æŠ¤ã€‚</p>
    +
    +<p>我们éžå¸¸æ„Ÿè°¢ä»¥ä¸‹å¼€æºé¡¹ç›®ï¼ˆä»£ç å€Ÿé‰´ï¼‰ï¼š</p>
    +<ul>
    +<li>Wt内置的httpd基于<a
    +href="http://asio.sourceforge.net/">asio C++库
    +</a>的一个示例开å‘,该库由Christopher M. Kohlhoffå¼€å‘(éµå¾ª<a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>);</li>
    +<li>Wtçš„<a href="http://threadpool.sourceforge.net/">Thread pool</a>
    +实现æ¥è‡ªäºŽPhilipp Henkel(éµå¾ª<a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>);</li>
    +<li>Wtçš„<a href='http://rapidxml.sourceforge.net/'>RapidXML</a>
    +库由Marcin Kalicinskiå¼€å‘(éµå¾ª<a
    +href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>)。</li>
    +</ul>
    +
    +<h4>Wiki</h4>
    +
    +<p>
    +<a href="http://redmine.webtoolkit.eu/wiki/wt">Wt Wiki</a>
    +由社区维护,包括很多有用信æ¯ï¼Œå¦‚针对ä¸åŒLinuxå‘行版的安装说明等。
    +</p>
    +
    +<h4>支æŒ</h4>
    +
    +<p>ä½ å¯ä»¥ç›´æŽ¥ä»ŽWt库作者处获得
    +<a href="http://www.emweb.be/?page=services">支æŒä¸ŽåŸ¹è®­</a>
    +</p>
    +
    +<p>å¦å¤–,你还å¯ä»¥ä»Žæˆ‘们的<a
    +href="http://redmine.webtoolkit.eu/projects/wt/boards">社区论å›
    +</a>获å–帮助, 当然还有<a
    +href="mailto:witty-interest@lists.sourceforge.net">邮件列表</a>
    +(<a
    +href="http://lists.sourceforge.net/lists/listinfo/witty-interest">
    +如何加入</a>),你å¯ä»¥é€šè¿‡<a
    +href="http://gmane.org/info.php?group=gmane.comp.web.witty.general">Gmane
    +gateway</a>æœç´¢æˆ–æµè§ˆé‚®ä»¶åˆ—表存档内容(å‘建立者 Pau Garcia i Quiles 致敬)
    +</p>
    +
    +<h4>贡献</h4>
    +
    +<p>Wtçš„å¼€å‘得到以下公å¸æˆ–组织的资助:</p>
    +
    +<p>
    +<table>
    +  <tr>
    +    <td class="sponsor-logo"><a href="http://www.emweb.be/">
    +      Emweb bvba</a>
    +    </td>
    +    <td class="sponsor-role">
    +      Wt创建者ã€å®˜æ–¹ç»´æŠ¤è€…以åŠç›¸å…³æ”¯æŒçš„æ供者
    +    </td>
    +  </tr>
    +  <tr>
    +    <td class="sponsor-logo">
    +      <a href="http://www.eurofer.be/">
    +      Eurofer</a>
    +    </td>
    +    <td class="sponsor-role">
    +      Wt图表库ã€WTreeViewã€åŠåˆ†å±‚æ•°æ®æ¨¡åž‹ç­‰å¼€å‘的资助者
    +    </td>
    +  </tr>
    +</table>
    +</p>
    +
    +<p>我们欢迎用户为Wt献计献策,这å¯èƒ½åŒ…括æŸäº›widgetsçš„å°è¡¥ä¸ã€
    +widget集以åŠWt核心性能æ高等。</p>
    +
    +<p>然而,由于Wt采用开æºä¸Žå•†ä¸šåŒé‡è®¸å¯ï¼Œå¹¶å°†Wt作为一个整体在法律上予以ä¿æŠ¤ï¼Œ
    +å³å°†Wt作为一个实体,而对于æ¯ä¸ªéƒ¨åˆ†çš„版æƒä¸äºˆè€ƒè™‘,因此我们在接å—用户贡献之å‰
    +è¦æ±‚贡献者将版æƒæŒ‡è®¤ç»™<a href="http://www.emweb.be/">Emweb</a>。
    +</p>
    +<p>注:网站所有中译文,特别是与法律许å¯ç­‰ç›¸å…³çš„内容最终以英文为准。
    +</p>
    +
    +<h4>翻译</h4>
    +
    +Wt网站的中文翻译工作由中央民æ—大学宋志民å助完æˆã€‚
    +
    +<h4>Sourceforge</h4>
    +
    +<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=153710&amp;type=1" style="vertical-align:middle" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
    +Wt在Sourceforge的主页请点击<a href="http://sourceforge.net/projects/witty/">此处</a>。
    +  </message>
    +  <message id="home.other-language">
    +
    +<h3><span>!C++ ?</span></h3>
    +
    +<p>你是å¦å–œæ¬¢Wt库的功能,但åˆä¸å¤ªå€¾å‘于C++编程?</p>
    +
    +<p>ä¸è¦å¤±æœ›ï¼ŒWt还有其他语言的原生å˜ä½“或å¯ä¸Žå…¶ä»–语言绑定使用:
    +
    +<ul class="languages">
    +<li>
    +<div>
    +<img class="java-language-icon" src="icons/java-logo.png" alt="Java"></img>
    +
    +ä½ å¯ä»¥ä½¿ç”¨æˆ‘们的<a href="/jwt">JWt</a>,JWt是Wt原生的<b>Java</b>版。JWt
    +与WtåŒæ—¶å¼€å‘与维护,虽然他们之间有些许差异,但功能和特点几乎相åŒã€‚JWtå¯ä»¥
    +è¿è¡Œåœ¨JVM中,并å¯ä»¥éƒ¨ç½²äºŽä»»ä½•Servlet内。
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +<li>
    +<div>
    +<img class="language-icon" src="icons/ruby-logo-R.png" alt="Ruby"></img>
    +
    +Richard Dale 正在开å‘和维护
    +<a href="http://github.com/rdale/wtruby/tree/master">WtRuby</a>,也就是将
    +<b>Ruby</b>绑定到Wt,WtRuby实施原ç†ä¸Žå°†Ruby绑定到Qtå’ŒKDE相åŒã€‚
    +</div>
    +
    +
    +<br style="clear: both" />
    +
    +</li>
    +
    +<li>
    +<div>
    +<img class="language-icon" src="icons/clojure-logo.png" alt="Clojure"></img>
    +
    +为了达到JVM对其他语言的支æŒï¼ŒRaphael Bauduin正在实验<a
    +href="http://www.nsa.be/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure">
    +从<b>Clojure</b>(LISPå˜ä½“)中使用JWt</a>,链接中记录了他的实验过程,该项目最终
    +将开å‘出一个å°åž‹æ”¯æŒåº“。
    +</div>
    +
    +<br style="clear: both" />
    +
    +</li>
    +</ul>
    +</p>
    +
    +  </message>
    +  <message id="home.documentation">
    + 
    +<h3><span>文档</span></h3>
    +
    +<h4>编译和安装</h4>
    +
    +<p>
    +通用安装指å—(UNIX)请点击
    +<a href="/wt/doc/reference/html/Installation.html">此处</a>,此文档也å¯
    +在æºæ–‡ä»¶åŒ…中找到,分别为INSTALL或INSTALL.html文件。</p>
    +<p>
    +å¦å¤–,<a href="http://redmine.webtoolkit.eu/wiki/wt">Wt Wiki</a> 还有一部分涉åŠåˆ°
    +<a href="http://redmine.webtoolkit.eu/wiki/wt/Wt_Installation">å¹³å°ç›¸å…³å®‰è£…说明</a>。
    +</p>
    +
    +<h4>介ç»å’Œå…¥é—¨</h4>
    +
    +<ul>
    +<li>请å‚考我们的<a
    +href="/doc/Wt-WhitePaper.pdf">白皮书</a>以了解使用Wt较之于其他传统webå¼€å‘框架的好处。
    +</li>
    +
    +<li>Dr Dobbs Journal上有一篇很好的<a href="http://www.ddj.com/cpp/206401952">
    +介ç»æ€§æ–‡ç« </a> (2008å¹´2月)。</li>
    +
    +<li>Wtå‚考手册中包å«ä¸€ç¯‡
    +<a href="http://www.webtoolkit.eu/wt/doc/reference/html/overview.html">Wt库概览
    +</a>,这是一篇很好的入门文章。</li>
    +
    +<li>Software Developers Journal上有一篇入门性文章(
    +   <a href="/wt/doc/tutorial/wt-sdj.xhtml">在线阅读</a>,
    +   <a href="/wt/doc/tutorial/wt-sdj.pdf">PDF版</a>)
    +   (写于2006å¹´4月,ç¨å¾®æœ‰ç‚¹è¿‡æ—¶ï¼‰ï¼Œ
    +   这篇入门文章使用了Hangman猜è¯æ¸¸æˆç¤ºä¾‹çš„代ç ï¼ˆä¹Ÿå¯å‚看æºæ–‡ä»¶ï¼‰è¿›è¡Œä»‹ç»ã€‚
    +</li>
    +
    +<li>Victor Venkman所写的
    +<a href="http://www.codeguru.com/cpp/i-n/internet/browsercontrol/article.php/c15275/">Wt介ç»</a>中,对
    +<a href="/wt/examples/">hello world 示例</a>进行了评测。
    +</li>
    +
    +</ul>
    +
    +<h4>å‚考手册</h4>
    +
    +<p><a href="/wt/doc/reference/html/index.html"
    +target="_blank"> Wtå‚考手册</a>(在新窗å£ä¸­å¼€å¯ï¼‰ç›´æŽ¥ç”±doxygen从æºç ä¸­ç”Ÿæˆï¼Œ
    +手册中也包å«äº†å…³äºŽæ ‘表示例的入门教程,特别是针对无状æ€æ§½çš„实现机制进行了
    +说明,å¦å¤–还强调了Wtå…许客户端代ç åœ¨äº‹ä»¶å¤„ç†ä¸­å¯è¿›ä¸€æ­¥ä¼˜åŒ–的一些高级特性。
    +</p>
    +
    +<h4>注释性示例</h4>
    +
    +<p>示例的æºç çº§æ–‡æ¡£ä¹Ÿå·²ç»åˆ¶ä½œå®Œæˆï¼Œ<a href="/wt/doc/examples/html/modules.html"
    +target="_blank">在此查看</a>(新窗å£ä¸­æ‰“开)。</p>
    +
    +<h4>Wiki</h4>
    +
    +<p>由社区维护的<a href="http://redmine.webtoolkit.eu/wiki/wt">Wt Wiki</a>也å¯ä»¥æŸ¥çœ‹ï¼Œé‡Œé¢æœ‰
    +   很多有用信æ¯ï¼Œæ¯”如FAQ和一些技巧等。
    +</p>
    +
    +  </message>
    +
    +  <message id="srcview.title.CPP.">
    +    <div class="srcviewtitle">
    +      <h2>Wt示例æºä»£ç </h2>
    +
    +      <p>
    +	  æµè§ˆ<a href="http://www.webtoolkit.eu/wt">Wt</a>中所有示例的æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.">Wt示例</message>
    +
    +  <message id="srcview.title.CPP.hello">
    +    <div class="srcviewtitle">
    +      <h2><i>Hello world</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹ 
    +	<a href="http://www.webtoolkit.eu/wt/examples/hello_world">
    +	  Hello world</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.hello">示例:Hello world</message>
    +
    +  <message id="srcview.title.CPP.charts">
    +    <div class="srcviewtitle">
    +      <h2><i>图表</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/charts">
    +	  图表</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.charts">示例:图表</message>
    +
    +  <message id="srcview.title.CPP.treeview-dragdrop">
    +    <div class="srcviewtitle">
    +      <h2><i>树视图</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/treeview">
    +	  树视图</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.treeview-dragdrop">示例:树视图</message>
    +
    +  <message id="srcview.title.CPP.composer">
    +    <div class="srcviewtitle">
    +      <h2><i>邮件编辑器</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/composer">
    +	  邮件编辑器</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.composer">示例:邮件编辑器</message>
    +  
    +  <message id="srcview.title.CPP.wt-homepage">
    +    <div class="srcviewtitle">
    +      <h2><i>Wt网站</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/wt-homepage">
    +	  Wt网站</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.wt-homepage">示例:Wt网站</message>
    +
    +  <message id="srcview.title.CPP.gitmodel">
    +    <div class="srcviewtitle">
    +      <h2><i>Git查看器</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/gitmodel">
    +	  Git查看器</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.gitmodel">示例:Git查看器</message>
    +
    +  <message id="srcview.title.CPP.simplechat">
    +    <div class="srcviewtitle">
    +      <h2><i>简å•èŠå¤©</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/simplechat">
    +	  简å•èŠå¤©</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.simplechat">示例:简å•èŠå¤©</message>
    +
    +  <message id="srcview.title.CPP.widgetgallery">
    +    <div class="srcviewtitle">
    +      <h2><i>Widget展示库</i>示例æºä»£ç </h2>
    +
    +      <p>
    +	æµè§ˆä»¥ä¸‹
    +	<a href="http://www.webtoolkit.eu/wt/examples/widgetgallery">
    +	  Widget展示库</a>示例æºä»£ç ã€‚
    +      </p>
    +    </div>
    +  </message>
    +
    +  <message id="srcview.title.widgetgallery">示例:Widget展示库</message>
    +</messages>
    diff --git a/wt-3.1.7a/examples/wtwithqt/CMakeLists.txt b/wt-3.1.7a/examples/wtwithqt/CMakeLists.txt
    new file mode 100644
    index 0000000..ab56acb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/CMakeLists.txt
    @@ -0,0 +1,51 @@
    +IF(COMMAND cmake_policy)
    +  CMAKE_POLICY(SET CMP0003 NEW)
    +ENDIF(COMMAND cmake_policy)
    +
    +SET(BUILD_WTWITHQT true)
    +IF (NOT MULTI_THREADED_BUILD)
    +  SET(BUILD_WTWITHQT false)
    +ENDIF (NOT MULTI_THREADED_BUILD)
    +IF (NOT QT_FOUND)
    +  SET(BUILD_WTWITHQT false)
    +ENDIF (NOT QT_FOUND)
    +
    +IF (NOT BUILD_WTWITHQT)
    +
    +  MESSAGE(STATUS "** Not building wtwithqt example.")
    +  MESSAGE(STATUS "   wtwithqt example requires a Qt4 installation.")
    +
    +ELSE (NOT BUILD_WTWITHQT)
    +
    +  SUBDIRS(lib)
    +
    +  ADD_DEFINITIONS(-DWT_NO_SLOT_MACROS)
    +
    +  QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/QtObject.h
    +                   ${CMAKE_CURRENT_BINARY_DIR}/moccedQtObject.C)
    +
    +  WT_ADD_EXAMPLE(helloqt.wt
    +    hello.C
    +    QtObject.C
    +    ${CMAKE_CURRENT_BINARY_DIR}/moccedQtObject.C
    +  )
    +
    +  TARGET_LINK_LIBRARIES(helloqt.wt
    +    wtwithqt
    +    ${QT_LIBRARIES}
    +  )
    +
    +  #
    +  # If you have Wt installed somehwere, you should use the
    +  # installed Wt header files for your own Wt projects.
    +  # e.g. INCLUDE_DIRECTORIES(/usr/local/wt/include)
    +  # instead of the following:
    +  #
    +  INCLUDE_DIRECTORIES(
    +    ${WT_SOURCE_DIR}/src
    +    ${CMAKE_CURRENT_SOURCE_DIR}/lib
    +    ${QT_QTCORE_INCLUDE_DIR} ${QT_INCLUDE_DIR}
    +  )
    +
    +ENDIF (NOT BUILD_WTWITHQT)
    +
    diff --git a/wt-3.1.7a/examples/wtwithqt/HelloApplication.h b/wt-3.1.7a/examples/wtwithqt/HelloApplication.h
    new file mode 100644
    index 0000000..6c57fbb
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/HelloApplication.h
    @@ -0,0 +1,65 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#ifndef HELLO_APPLICATION_H_
    +#define HELLO_APPLICATION_H_
    +
    +#include "WQApplication"
    +
    +class QtObject;
    +class QString;
    +
    +using namespace Wt;
    +
    +namespace Wt {
    +  class WLineEdit;
    +  class WText;
    +}
    +
    +/*! \class HelloApplication
    + *  \brief The 'hello' application modified to use QtCore
    + * 
    + * A sample application that uses objects from the QtCore library.
    + */
    +class HelloApplication : public WQApplication
    +{
    +public:
    +  HelloApplication(const WEnvironment& env);
    +
    +  void doGreet(const QString&);
    +
    +  virtual void create();
    +  virtual void destroy();
    +
    +private:
    +  WLineEdit *nameEdit_;
    +  WText     *greeting_;
    +
    +  QtObject  *qtSender_, *qtReceiver_;
    +
    +  void propagateGreet();
    +};
    +
    +#endif // HELLO_APPLICATION_H_
    diff --git a/wt-3.1.7a/examples/wtwithqt/LICENSE b/wt-3.1.7a/examples/wtwithqt/LICENSE
    new file mode 100644
    index 0000000..c44bde5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/LICENSE
    @@ -0,0 +1,22 @@
    +Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    +
    +Permission is hereby granted, free of charge, to any person
    +obtaining a copy of this software and associated documentation
    +files (the "Software"), to deal in the Software without
    +restriction, including without limitation the rights to use,
    +copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the
    +Software is furnished to do so, subject to the following
    +conditions:
    +
    +The above copyright notice and this permission notice shall be
    +included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    +OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/examples/wtwithqt/QtObject.C b/wt-3.1.7a/examples/wtwithqt/QtObject.C
    new file mode 100644
    index 0000000..9ab4c70
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/QtObject.C
    @@ -0,0 +1,42 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +
    +#include "HelloApplication.h"
    +#include "QtObject.h"
    +
    +QtObject::QtObject(HelloApplication *wt, QObject *parent)
    +  : QObject(parent),
    +    wt_(wt)
    +{ }
    +
    +void QtObject::passGreet(const QString& name)
    +{
    +  emit greet(name);
    +}
    +
    +void QtObject::doGreet(const QString& name)
    +{
    +  wt_->doGreet(name);
    +}
    diff --git a/wt-3.1.7a/examples/wtwithqt/QtObject.h b/wt-3.1.7a/examples/wtwithqt/QtObject.h
    new file mode 100644
    index 0000000..5bc2720
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/QtObject.h
    @@ -0,0 +1,58 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#ifndef QTOBJECT_H_
    +#define QTOBJECT_H_
    +
    +#include <QThread>
    +
    +class HelloApplication;
    +
    +/*! \class QtObject
    + *  \brief A simple Qt object with sample signal and slot.
    + *
    + * This simple object class demonstrates that the Qt signal/slot
    + * mechanism may be used alonglisde Wt's signal/slot mechanism.
    + */
    +class QtObject : public QObject
    +{
    +  Q_OBJECT;
    +
    +public:
    +  QtObject(HelloApplication *wt_, QObject *parent = 0);
    +
    +  void passGreet(const QString&);
    +
    +signals:
    +  void greet(const QString&);
    +
    +public slots:
    +  void doGreet(const QString&);
    +
    +private:
    +  HelloApplication *wt_;
    +};
    +
    +#endif // QTOBJECT_H_
    diff --git a/wt-3.1.7a/examples/wtwithqt/README.txt b/wt-3.1.7a/examples/wtwithqt/README.txt
    new file mode 100644
    index 0000000..e1b67d4
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/README.txt
    @@ -0,0 +1,33 @@
    +Wt/Qt interopability example
    +============================
    +
    +IMPORTANT! The Wt/Qt interopability example and library are licensed
    +under the MIT License. This license is different from the license that
    +covers the Wt libraries and other examples, AND ONLY APPLIES TO FILES
    +IN THIS DIRECTORY. See below for the complete license terms.
    +
    +LICENSE
    +=======
    +
    +Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    +
    +Permission is hereby granted, free of charge, to any person
    +obtaining a copy of this software and associated documentation
    +files (the "Software"), to deal in the Software without
    +restriction, including without limitation the rights to use,
    +copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the
    +Software is furnished to do so, subject to the following
    +conditions:
    +
    +The above copyright notice and this permission notice shall be
    +included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    +OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/examples/wtwithqt/hello.C b/wt-3.1.7a/examples/wtwithqt/hello.C
    new file mode 100644
    index 0000000..acb3d41
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/hello.C
    @@ -0,0 +1,101 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +
    +#include <iostream>
    +
    +#include <Wt/WBreak>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WLineEdit>
    +#include <Wt/WPushButton>
    +#include <Wt/WText>
    +
    +#include "HelloApplication.h"
    +#include "QtObject.h"
    +
    +using namespace Wt;
    +
    +HelloApplication::HelloApplication(const WEnvironment& env)
    +  : WQApplication(env)
    +{
    +  /*
    +   * Note: do not create any Qt objects from here. Initialize your
    +   * application from within the virtual create() method.
    +   */
    +}
    +
    +void HelloApplication::create()
    +{
    +  setTitle("Hello world");
    +
    +  root()->addWidget(new WText("Your name, please ? "));
    +  nameEdit_ = new WLineEdit(root());
    +  nameEdit_->setFocus();
    +
    +  WPushButton *b = new WPushButton("Greet me.", root());
    +  b->setMargin(5, Left);
    +
    +  root()->addWidget(new WBreak());
    +
    +  greeting_ = new WText(root());
    +
    +  b->clicked().connect(this, &HelloApplication::propagateGreet);
    +  nameEdit_->enterPressed().connect(this, &HelloApplication::propagateGreet);
    +
    +  qtSender_ = new QtObject(this);
    +  qtReceiver_ = new QtObject(this);
    +
    +  QObject::connect(qtSender_, SIGNAL(greet(const QString&)),
    +		   qtReceiver_, SLOT(doGreet(const QString&)));
    +}
    +
    +void HelloApplication::destroy()
    +{
    +  /*
    +   * Note: Delete any Qt object from here.
    +   */
    +  delete qtSender_;
    +  delete qtReceiver_;
    +}
    +
    +void HelloApplication::propagateGreet()
    +{
    +  qtSender_->passGreet(toQString(nameEdit_->text()));
    +}
    +
    +void HelloApplication::doGreet(const QString& qname)
    +{
    +  greeting_->setText("Hello there, " + toWString(qname));
    +}
    +
    +WApplication *createApplication(const WEnvironment& env)
    +{
    +  return new HelloApplication(env);
    +}
    +
    +int main(int argc, char **argv)
    +{
    +  return WRun(argc, argv, &createApplication);
    +}
    +
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/CMakeLists.txt b/wt-3.1.7a/examples/wtwithqt/lib/CMakeLists.txt
    new file mode 100644
    index 0000000..b8528e5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/CMakeLists.txt
    @@ -0,0 +1,20 @@
    +QT4_GENERATE_MOC (${CMAKE_CURRENT_SOURCE_DIR}/DispatchThread.h
    +		  ${CMAKE_CURRENT_BINARY_DIR}/moccedDispatchThread.C)
    +
    +ADD_LIBRARY(wtwithqt STATIC
    +  WQApplication.C
    +  DispatchThread.C
    +
    +  ${CMAKE_CURRENT_BINARY_DIR}/moccedDispatchThread.C
    +)
    +
    +#
    +# If you have Wt installed somehwere, you should use the
    +# installed Wt header files for your own Wt projects.
    +# e.g. INCLUDE_DIRECTORIES(/usr/local/wt/include)
    +# instead of the following:
    +#
    +INCLUDE_DIRECTORIES(
    +  ${WT_SOURCE_DIR}/src/wt
    +  ${QT_QTCORE_INCLUDE_DIR} ${QT_INCLUDE_DIR}
    +)
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.C b/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.C
    new file mode 100644
    index 0000000..9516010
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.C
    @@ -0,0 +1,165 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#include "WQApplication"
    +
    +#include "DispatchThread.h"
    +
    +namespace Wt {
    +
    +DispatchObject::DispatchObject(DispatchThread *thread)
    +  : thread_(thread)
    +{
    +  connect(this, SIGNAL(doEvent()), this, SLOT(onEvent()));
    +}
    +
    +void DispatchObject::propagateEvent()
    +{
    +  emit doEvent();
    +}
    +
    +void DispatchObject::onEvent()
    +{
    +  thread_->doEvent();
    +}
    +
    +DispatchThread::DispatchThread(WQApplication *app,
    +			       bool withEventLoop)
    +  : QThread(),
    +    app_(app),
    +    qtEventLoop_(withEventLoop),
    +    dispatchObject_(0),
    +    event_(0),
    +    done_(false),
    +    newEvent_(false)
    +{ }
    +
    +void DispatchThread::run()
    +{
    +  app_->attachThread();
    +  app_->create();
    +
    +  if (qtEventLoop_)
    +    dispatchObject_ = new DispatchObject(this);
    +
    +  signalDone();
    +
    +  if (qtEventLoop_)
    +    exec();
    +  else
    +    myExec();
    +
    +  delete dispatchObject_;
    +
    +  signalDone();
    +}
    +
    +void DispatchThread::myExec()
    +{
    +  boost::mutex::scoped_lock lock(newEventMutex_);
    +
    +  for (;;) {
    +    if (!newEvent_)
    +      newEventCondition_.wait(lock);
    +
    +    if (doEvent())
    +      return;
    +
    +    newEvent_ = false;
    +  }
    +}
    +
    +void DispatchThread::myPropagateEvent()
    +{
    +  boost::mutex::scoped_lock lock(newEventMutex_);
    +  newEvent_ = true;
    +  newEventCondition_.notify_one();
    +}
    +
    +void DispatchThread::signalDone()
    +{
    +  boost::mutex::scoped_lock lock(doneMutex_);
    +  done_ = true;
    +  doneCondition_.notify_one();
    +}
    +
    +void DispatchThread::waitDone()
    +{
    +  boost::mutex::scoped_lock lock(doneMutex_);
    +
    +  if (done_)
    +    return;
    +  else
    +    doneCondition_.wait(lock);
    + }
    +
    +void DispatchThread::notify(const WEvent& event)
    +{
    +  event_ = &event;
    +
    +  done_ = false;
    +
    +  if (dispatchObject_)
    +    dispatchObject_->propagateEvent();
    +  else
    +    myPropagateEvent();
    +
    +  waitDone();
    +}
    +
    +void DispatchThread::destroy()
    +{
    +  event_ = 0;
    +
    +  done_ = false;
    +
    +  if (dispatchObject_)
    +    dispatchObject_->propagateEvent();
    +  else
    +    myPropagateEvent();
    +
    +  waitDone();
    +
    +  wait();
    +}
    +
    +bool DispatchThread::doEvent()
    +{
    +  app_->attachThread();
    +  if (event_) {
    +    app_->realNotify(*event_);
    +    signalDone();
    +
    +    return false;
    +  } else {
    +    app_->destroy();
    +
    +    if (qtEventLoop_)
    +      QThread::exit();
    +
    +    return true;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.h b/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.h
    new file mode 100644
    index 0000000..7d84ab2
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/DispatchThread.h
    @@ -0,0 +1,106 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#ifndef DISPATCH_THREAD_H_
    +#define DISPATCH_THREAD_H_
    +
    +#include <QThread>
    +#include <boost/thread.hpp>
    +#include <boost/thread/condition.hpp>
    +
    +namespace Wt {
    +
    +class WQApplication;
    +class WEvent;
    +class DispatchThread;
    +
    +/*
    + * Help object used to dispatch an event into a Qt event loop.
    + */
    +class DispatchObject : public QObject
    +{
    +  Q_OBJECT;
    +
    +public:
    +  DispatchObject(DispatchThread *thread);
    +
    +  void propagateEvent();
    +
    +signals:
    +  void doEvent();
    +
    +private slots:
    +  void onEvent();
    +
    +private:
    +  DispatchThread *thread_;
    +};
    +
    +/*
    + * Thread in which all interaction with Qt objects is done.
    + *
    + * If constructed <i>withEventLoop</i>, then QThread::exec() is
    + * called, starting a new Qt event loop, and signal/slot events can be
    + * delivered within the event loop handling. Otherwise, plain thread
    + * synchronization is implemented.
    + */
    +class DispatchThread : public QThread
    +{
    +public:
    +  DispatchThread(WQApplication *app, bool withEventLoop);
    +
    +  virtual void run();
    +
    +  void notify(const WEvent& event);
    +  void destroy();
    +
    +  void waitDone();
    +
    +private:
    +  WQApplication    *app_;
    +  bool              qtEventLoop_;
    +  DispatchObject   *dispatchObject_;
    +  const WEvent     *event_;
    +
    +  boost::mutex      doneMutex_;
    +  bool              done_;
    +  boost::condition  doneCondition_;
    +
    +  boost::mutex      newEventMutex_;
    +  bool              newEvent_;
    +  boost::condition  newEventCondition_;
    +
    +  bool doEvent();
    +
    +  void signalDone();
    +  void myExec();
    +  void myPropagateEvent();
    +
    +  friend class DispatchObject;
    +};
    +
    +}
    +
    +#endif // DISPATCH_THREAD_H_
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/LICENSE b/wt-3.1.7a/examples/wtwithqt/lib/LICENSE
    new file mode 100644
    index 0000000..c44bde5
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/LICENSE
    @@ -0,0 +1,22 @@
    +Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    +
    +Permission is hereby granted, free of charge, to any person
    +obtaining a copy of this software and associated documentation
    +files (the "Software"), to deal in the Software without
    +restriction, including without limitation the rights to use,
    +copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the
    +Software is furnished to do so, subject to the following
    +conditions:
    +
    +The above copyright notice and this permission notice shall be
    +included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    +OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/README.txt b/wt-3.1.7a/examples/wtwithqt/lib/README.txt
    new file mode 100644
    index 0000000..b713a97
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/README.txt
    @@ -0,0 +1,96 @@
    +Wt/Qt interopability library
    +============================
    +
    +This library contains interopability classes for using Wt in
    +conjunction with Qt4 (http://trolltech.com/products/qt).
    +
    +IMPORTANT! The Wt/Qt interopability library is licensed under the MIT
    +License. This license is different from the license that covers the Wt
    +libraries and other examples, and AND ONLY APPLIES TO FILES IN THIS
    +DIRECTORY. See below for the complete license terms.
    +
    +The easiest way to use this library, is by linking the two source
    +files into your project.
    +
    +Currently, this library provides:
    +
    +1) Support for using QtCore library, and Qt's signal/slot mechanism
    +within a Wt application.
    +
    +Atlhough from the surface, one should be able to simply use QtCore
    +within a Wt application, it turns out this is not possible. The reason
    +is that Qt makes a number of assumptions that are invalid within Wt's
    +multi-threaded event loop dispatching.
    +
    +This is needed because Qt's object model, which defines a hierarchy of
    +QObjects, requires that every QObject in the hierarchy is created from
    +within the same thread. In addition, Qt's signal/slot system is
    +thread-aware and behaves very differently when a signal is emitted
    +from within a different thread than the thread in which the receiver
    +object lives.
    +
    +Wt on the other hand does not guarantee that every event is dispatched
    +within the same thread. This is a side effect of the fact that Wt uses
    +thread pools in combination with asynchronous I/O to be able to serve
    +multiple connections simultaneously without requiring a high number of
    +threads.
    +
    +Therefore, you cannot manipulate a QObject hierarchy, or propagate
    +events using Qt's signal/slot system, in a multi-threaded Wt
    +application server, since this is likely to violate Qt's thread/object
    +assumptions, without taking precautions (which are implemented by this
    +library).
    +
    +To be able to QtCore objects within a Wt application, you should
    +reimplement WQApplication instead of WApplication. This application
    +class spawns a QThread that is dedicated to a single application
    +instance, and used for event handling, after your application is
    +constructed. You should not create any Qt objects from the
    +constructor, but rather from the WQApplication::create() method, which
    +runs within the context of this thread. Likewise, you should not
    +destroy Qt objects from the application destructor, but from the
    +WQApplication::destroy() method, which also runs in this thread.
    +
    +You may enable a Qt event loop in this QThread, by setting the option
    +in the constructor. In this way, you can use QTcpSocket and other Qt
    +classes which rely on the presence of an event loop. Note that Qt
    +requires that you instantiate a QApplication object before you can use
    +a Qt event loop (only one is needed per process, so it may be shared
    +between multiple Wt sessions). You need to do this yourself, and a
    +convenient location could be within your main() function.
    +
    +You will want to add -DWT_NO_SLOT_MACROS, which disables the definition
    +of SLOT by Wt (this macro definition does not really add any value
    +to Wt, but was intended to make Qt users of Wt feel easier at home?).
    +
    +2) Conversion between QString and WString
    +
    +The same file (WQApplication) provides toWString() and toQString()
    +functions for converting between WString and QString. Since both
    +classes fully support unicode, this conversion is lossless.
    +
    +LICENSE
    +=======
    +
    +Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    +
    +Permission is hereby granted, free of charge, to any person
    +obtaining a copy of this software and associated documentation
    +files (the "Software"), to deal in the Software without
    +restriction, including without limitation the rights to use,
    +copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the
    +Software is furnished to do so, subject to the following
    +conditions:
    +
    +The above copyright notice and this permission notice shall be
    +included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    +OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/WQApplication b/wt-3.1.7a/examples/wtwithqt/lib/WQApplication
    new file mode 100644
    index 0000000..172f679
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/WQApplication
    @@ -0,0 +1,157 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#ifndef WQAPPLICATION_H_
    +#define WQAPPLICATION_H_
    +
    +#include <Wt/WApplication>
    +#include <boost/thread.hpp>
    +
    +/*! \file WQApplication */
    +
    +class QString;
    +
    +namespace Wt {
    +
    +class DispatchThread;
    +
    +/*! \class WQApplication WQApplication WQApplication
    + *  \brief An application class that provides interopability between
    + *         Wt and Qt.
    + *
    + * This class provides interopability between the Wt's multi threading
    + * model and Qt's threading requirements for QObject. This is needed
    + * because Qt's object model, which defines a hierarchy of QObjects,
    + * requires that every QObject in the hierarchy is created from within
    + * the same thread. In addition, Qt's signal/slot system is
    + * thread-aware and behaves very differently when a signal is emitted
    + * from within a different thread than the thread in which the
    + * receiver object lives.
    + *
    + * Wt on the other hand does not guarantee that every event is
    + * dispatched within the same thread. This is a side effect of the
    + * fact that Wt uses thread pools in combination with asynchronous I/O
    + * to be able to serve multiple connections simultaneously without
    + * requiring a high number of threads.
    + *
    + * Therefore, you cannot manipulate a QObject hierarchy, or propagate
    + * events using Qt's signal/slot system, in a multi-threaded Wt
    + * application server, since this is likely to violate Qt's
    + * thread/object assumptions, without taking precautions (as are
    + * implemented in this application class).
    + *
    + * This class spawns a QThread that is dedicated to a single
    + * application instance, and used for event handling, after your
    + * application is constructed. You should not create any Qt objects
    + * from the constructor, but rather from the create() method, which
    + * runs within the context of this thread. Likewise, you should not
    + * destroy Qt objects from the application destructor, but from the
    + * destroy() method, which also runs in this thread.
    + *
    + * You may enable a Qt event loop in this QThread, by setting the
    + * option in the constructor. In this way, you can use QTcpSocket and
    + * other Qt classes which rely on the presence of an event loop. Note
    + * that Qt requires that you instantiate a QApplication object before
    + * you can use a Qt event loop (only one is needed per process, so it
    + * may be shared between multiple Wt sessions). You need to do this
    + * yourself, and a convenient location could be within your main()
    + * function.
    + */
    +class WQApplication : public WApplication
    +{
    +public:
    +  /*! \brief Constructor.
    +   *
    +   * Create a new application with Qt threading support.
    +   *
    +   * Set <i>enableQtEventLoop</i> if you wish to enable a Qt event
    +   * loop within the thread context, e.g. when you wish to use certain
    +   * non-GUI classes that require the presence of an event loop (such
    +   * as QTimer, QTcpSocket, ...).
    +   *
    +   * Note: you should not create Qt objects from within the
    +   * constructor. Instead, reimplement create(), which is called after
    +   * construction, from within the QThread.
    +   */
    +  WQApplication(const WEnvironment& env, bool enableQtEventLoop = false);
    +
    +protected:
    +
    +  /*! \brief Initialize Qt objects in your application within the
    +   *         QThread context.
    +   *
    +   * Reimplement this method to construct your Wt widget and Qt object
    +   * hierarchy within the context of the dedicatd QThread.
    +   *
    +   * This method is called from within the library after your
    +   * application is created.
    +   */
    +  virtual void create() = 0;
    +
    +  /*! \brief Finalize your application within the QThread context.
    +   *
    +   * Reimplement this method to safely destroy Qt object hierarchy.
    +   *
    +   * This method is called from within the library before your
    +   * application is deleted.
    +   */
    +  virtual void destroy() = 0;
    +
    +  /*! \brief Notify an event to the application within the QThread
    +   *         context.
    +   *
    +   * This method is the equivalent of WApplication::notify(), but runs
    +   * inside the QThread context. The default implementation simply
    +   * calls WApplication::notify().
    +   */
    +  virtual void realNotify(const WEvent& e);
    +
    +  virtual void notify(const WEvent& e);
    +  virtual void initialize();
    +  virtual void finalize();
    +
    +private:
    +  bool            withEventLoop_;
    +  DispatchThread *thread_;
    +  bool            finalize_;
    +
    +  friend class DispatchThread;
    +};
    +
    +/*! \brief Conversion function from QString to WString
    + *
    + * Lossless conversion between these two unicode string classes.
    + */
    +extern WString toWString(const QString& s);
    +
    +/*! \brief Conversion function from WString to QString
    + *
    + * Lossless conversion between these two unicode string classes.
    + */
    +extern QString toQString(const WString& s);
    +
    +}
    +
    +#endif // WQAPPLICATION_H_
    diff --git a/wt-3.1.7a/examples/wtwithqt/lib/WQApplication.C b/wt-3.1.7a/examples/wtwithqt/lib/WQApplication.C
    new file mode 100644
    index 0000000..f170bf0
    --- /dev/null
    +++ b/wt-3.1.7a/examples/wtwithqt/lib/WQApplication.C
    @@ -0,0 +1,89 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * Permission is hereby granted, free of charge, to any person
    + * obtaining a copy of this software and associated documentation
    + * files (the "Software"), to deal in the Software without
    + * restriction, including without limitation the rights to use,
    + * copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the
    + * Software is furnished to do so, subject to the following
    + * conditions:
    + * 
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + * 
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    + * OTHER DEALINGS IN THE SOFTWARE.
    + */
    +#include <iostream>
    +#include <boost/thread/condition.hpp>
    +
    +#include "WQApplication"
    +#include "DispatchThread.h"
    +
    +namespace {
    +}
    +
    +namespace Wt {
    +
    +WQApplication::WQApplication(const WEnvironment& env, bool withEventLoop)
    +  : WApplication(env),
    +    withEventLoop_(withEventLoop),
    +    thread_(0),
    +    finalize_(false)
    +{ }
    +
    +void WQApplication::initialize()
    +{
    +  if (thread_)
    +    return;
    +
    +  thread_ = new DispatchThread(this, withEventLoop_);
    +  thread_->start();
    +  thread_->waitDone();
    +}
    +
    +void WQApplication::finalize()
    +{
    +  finalize_ = true;
    +}
    +
    +void WQApplication::notify(const WEvent& e)
    +{
    +  if (thread_) {
    +    thread_->notify(e);
    +
    +    if (finalize_) {
    +      thread_->destroy();
    +
    +      delete thread_;
    +      thread_ = 0;
    +    }
    +  } else
    +    // not yet initialized, could be the initialize() call itself.
    +    realNotify(e);
    +}
    +
    +void WQApplication::realNotify(const WEvent& e)
    +{
    +  WApplication::notify(e);
    +}
    +
    +WString toWString(const QString& s)
    +{
    +  return WString::fromUTF8((const char *)s.toUtf8());
    +}
    +
    +QString toQString(const WString& s)
    +{
    +  return QString::fromUtf8(s.toUTF8().c_str());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/resources/WtSoundManager.swf b/wt-3.1.7a/resources/WtSoundManager.swf
    new file mode 100755
    index 0000000..a53a26d
    Binary files /dev/null and b/wt-3.1.7a/resources/WtSoundManager.swf differ
    diff --git a/wt-3.1.7a/resources/ajax-loading.gif b/wt-3.1.7a/resources/ajax-loading.gif
    new file mode 100644
    index 0000000..3288d10
    Binary files /dev/null and b/wt-3.1.7a/resources/ajax-loading.gif differ
    diff --git a/wt-3.1.7a/resources/calendar_edit.png b/wt-3.1.7a/resources/calendar_edit.png
    new file mode 100644
    index 0000000..d1d2d6e
    Binary files /dev/null and b/wt-3.1.7a/resources/calendar_edit.png differ
    diff --git a/wt-3.1.7a/resources/closeicons-mi.png b/wt-3.1.7a/resources/closeicons-mi.png
    new file mode 100644
    index 0000000..294a139
    Binary files /dev/null and b/wt-3.1.7a/resources/closeicons-mi.png differ
    diff --git a/wt-3.1.7a/resources/closeicons-tab.png b/wt-3.1.7a/resources/closeicons-tab.png
    new file mode 100644
    index 0000000..8844cb8
    Binary files /dev/null and b/wt-3.1.7a/resources/closeicons-tab.png differ
    diff --git a/wt-3.1.7a/resources/collapse.gif b/wt-3.1.7a/resources/collapse.gif
    new file mode 100644
    index 0000000..440de3e
    Binary files /dev/null and b/wt-3.1.7a/resources/collapse.gif differ
    diff --git a/wt-3.1.7a/resources/expand.gif b/wt-3.1.7a/resources/expand.gif
    new file mode 100644
    index 0000000..24e10c5
    Binary files /dev/null and b/wt-3.1.7a/resources/expand.gif differ
    diff --git a/wt-3.1.7a/resources/items-not-ok.gif b/wt-3.1.7a/resources/items-not-ok.gif
    new file mode 100644
    index 0000000..94459b1
    Binary files /dev/null and b/wt-3.1.7a/resources/items-not-ok.gif differ
    diff --git a/wt-3.1.7a/resources/items-ok.gif b/wt-3.1.7a/resources/items-ok.gif
    new file mode 100644
    index 0000000..6c2d9f9
    Binary files /dev/null and b/wt-3.1.7a/resources/items-ok.gif differ
    diff --git a/wt-3.1.7a/resources/items.gif b/wt-3.1.7a/resources/items.gif
    new file mode 100644
    index 0000000..26df56b
    Binary files /dev/null and b/wt-3.1.7a/resources/items.gif differ
    diff --git a/wt-3.1.7a/resources/line-last.gif b/wt-3.1.7a/resources/line-last.gif
    new file mode 100644
    index 0000000..0ada2a6
    Binary files /dev/null and b/wt-3.1.7a/resources/line-last.gif differ
    diff --git a/wt-3.1.7a/resources/line-middle.gif b/wt-3.1.7a/resources/line-middle.gif
    new file mode 100644
    index 0000000..22aec2d
    Binary files /dev/null and b/wt-3.1.7a/resources/line-middle.gif differ
    diff --git a/wt-3.1.7a/resources/line-trunk.gif b/wt-3.1.7a/resources/line-trunk.gif
    new file mode 100644
    index 0000000..161fbd4
    Binary files /dev/null and b/wt-3.1.7a/resources/line-trunk.gif differ
    diff --git a/wt-3.1.7a/resources/loading.png b/wt-3.1.7a/resources/loading.png
    new file mode 100644
    index 0000000..a947498
    Binary files /dev/null and b/wt-3.1.7a/resources/loading.png differ
    diff --git a/wt-3.1.7a/resources/minus.gif b/wt-3.1.7a/resources/minus.gif
    new file mode 100644
    index 0000000..5812ddf
    Binary files /dev/null and b/wt-3.1.7a/resources/minus.gif differ
    diff --git a/wt-3.1.7a/resources/plus.gif b/wt-3.1.7a/resources/plus.gif
    new file mode 100644
    index 0000000..79195d5
    Binary files /dev/null and b/wt-3.1.7a/resources/plus.gif differ
    diff --git a/wt-3.1.7a/resources/right-arrow.gif b/wt-3.1.7a/resources/right-arrow.gif
    new file mode 100644
    index 0000000..fec6d7d
    Binary files /dev/null and b/wt-3.1.7a/resources/right-arrow.gif differ
    diff --git a/wt-3.1.7a/resources/tab_b.gif b/wt-3.1.7a/resources/tab_b.gif
    new file mode 100644
    index 0000000..0d62348
    Binary files /dev/null and b/wt-3.1.7a/resources/tab_b.gif differ
    diff --git a/wt-3.1.7a/resources/tab_l.gif b/wt-3.1.7a/resources/tab_l.gif
    new file mode 100644
    index 0000000..9b1e633
    Binary files /dev/null and b/wt-3.1.7a/resources/tab_l.gif differ
    diff --git a/wt-3.1.7a/resources/tab_r.gif b/wt-3.1.7a/resources/tab_r.gif
    new file mode 100644
    index 0000000..ce9dd9f
    Binary files /dev/null and b/wt-3.1.7a/resources/tab_r.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/dropdown.png b/wt-3.1.7a/resources/themes/default/dropdown.png
    new file mode 100644
    index 0000000..96ab504
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/dropdown.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/nav-minus.gif b/wt-3.1.7a/resources/themes/default/nav-minus.gif
    new file mode 100644
    index 0000000..336d6d5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/nav-minus.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/nav-plus.gif b/wt-3.1.7a/resources/themes/default/nav-plus.gif
    new file mode 100644
    index 0000000..dd376ba
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/nav-plus.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/generate.sh b/wt-3.1.7a/resources/themes/default/no-stripes/generate.sh
    new file mode 100755
    index 0000000..8337a3f
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/default/no-stripes/generate.sh
    @@ -0,0 +1,10 @@
    +#!/bin/sh
    +#
    +# This script uses imagemagick to generate the stripe-XXpx.gif's.
    +#
    +
    +for i in `seq 10 40`; do
    +	convert -size 30x$[2*$i] xc:white \
    +	    -fill '#FFFFFF' -draw "rectangle 0,$i 30,$[2*$i]" \
    +	no-stripe-${i}px.gif
    +done
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-10px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-10px.gif
    new file mode 100644
    index 0000000..2908cd6
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-10px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-11px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-11px.gif
    new file mode 100644
    index 0000000..b7f33c2
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-11px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-12px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-12px.gif
    new file mode 100644
    index 0000000..9d148cd
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-12px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-13px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-13px.gif
    new file mode 100644
    index 0000000..adfabc5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-13px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-14px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-14px.gif
    new file mode 100644
    index 0000000..57c3106
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-14px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-15px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-15px.gif
    new file mode 100644
    index 0000000..adfd8dc
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-15px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-16px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-16px.gif
    new file mode 100644
    index 0000000..c968a87
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-16px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-17px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-17px.gif
    new file mode 100644
    index 0000000..04825fe
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-17px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-18px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-18px.gif
    new file mode 100644
    index 0000000..a7fe228
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-18px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-19px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-19px.gif
    new file mode 100644
    index 0000000..7bc5d42
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-19px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-20px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-20px.gif
    new file mode 100644
    index 0000000..63e3403
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-20px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-21px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-21px.gif
    new file mode 100644
    index 0000000..6fd76b8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-21px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-22px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-22px.gif
    new file mode 100644
    index 0000000..4058368
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-22px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-23px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-23px.gif
    new file mode 100644
    index 0000000..e048cf4
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-23px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-24px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-24px.gif
    new file mode 100644
    index 0000000..52ed437
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-24px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-25px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-25px.gif
    new file mode 100644
    index 0000000..6c4a003
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-25px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-26px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-26px.gif
    new file mode 100644
    index 0000000..9ff6890
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-26px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-27px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-27px.gif
    new file mode 100644
    index 0000000..73df632
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-27px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-28px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-28px.gif
    new file mode 100644
    index 0000000..7a2ce16
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-28px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-29px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-29px.gif
    new file mode 100644
    index 0000000..268459e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-29px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-30px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-30px.gif
    new file mode 100644
    index 0000000..8a6987e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-30px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-31px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-31px.gif
    new file mode 100644
    index 0000000..6b346b8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-31px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-32px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-32px.gif
    new file mode 100644
    index 0000000..ad9aa31
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-32px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-33px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-33px.gif
    new file mode 100644
    index 0000000..8154b78
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-33px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-34px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-34px.gif
    new file mode 100644
    index 0000000..584cf16
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-34px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-35px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-35px.gif
    new file mode 100644
    index 0000000..b1e8d69
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-35px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-36px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-36px.gif
    new file mode 100644
    index 0000000..f022782
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-36px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-37px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-37px.gif
    new file mode 100644
    index 0000000..a6a4411
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-37px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-38px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-38px.gif
    new file mode 100644
    index 0000000..b57986d
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-38px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-39px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-39px.gif
    new file mode 100644
    index 0000000..687ec29
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-39px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-40px.gif b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-40px.gif
    new file mode 100644
    index 0000000..b5b2713
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/no-stripes/no-stripe-40px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/slider-thumb-h.gif b/wt-3.1.7a/resources/themes/default/slider-thumb-h.gif
    new file mode 100644
    index 0000000..c91a332
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/slider-thumb-h.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/slider-thumb-v.gif b/wt-3.1.7a/resources/themes/default/slider-thumb-v.gif
    new file mode 100644
    index 0000000..9942f7b
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/slider-thumb-v.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/sort-arrow-down.gif b/wt-3.1.7a/resources/themes/default/sort-arrow-down.gif
    new file mode 100644
    index 0000000..a7098bb
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/sort-arrow-down.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/sort-arrow-none.gif b/wt-3.1.7a/resources/themes/default/sort-arrow-none.gif
    new file mode 100644
    index 0000000..63f17ef
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/sort-arrow-none.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/sort-arrow-up.gif b/wt-3.1.7a/resources/themes/default/sort-arrow-up.gif
    new file mode 100644
    index 0000000..ce9ca7f
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/sort-arrow-up.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/spin-buttons-dn.png b/wt-3.1.7a/resources/themes/default/spin-buttons-dn.png
    new file mode 100644
    index 0000000..f3a3e04
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/spin-buttons-dn.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/spin-buttons-up.png b/wt-3.1.7a/resources/themes/default/spin-buttons-up.png
    new file mode 100644
    index 0000000..71cbfb1
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/spin-buttons-up.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/spin-buttons.png b/wt-3.1.7a/resources/themes/default/spin-buttons.png
    new file mode 100644
    index 0000000..24388ec
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/spin-buttons.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/splitter-h.png b/wt-3.1.7a/resources/themes/default/splitter-h.png
    new file mode 100644
    index 0000000..f4d0e57
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/splitter-h.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/splitter-v.png b/wt-3.1.7a/resources/themes/default/splitter-v.png
    new file mode 100644
    index 0000000..40e7373
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/splitter-v.png differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/generate.sh b/wt-3.1.7a/resources/themes/default/stripes/generate.sh
    new file mode 100755
    index 0000000..390846d
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/default/stripes/generate.sh
    @@ -0,0 +1,10 @@
    +#!/bin/sh
    +#
    +# This script uses imagemagick to generate the stripe-XXpx.gif's.
    +#
    +
    +for i in `seq 10 40`; do
    +	convert -size 30x$[2*$i] xc:white \
    +	    -fill '#e8fffc' -draw "rectangle 0,$i 30,$[2*$i]" \
    +	stripe-${i}px.gif
    +done
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-10px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-10px.gif
    new file mode 100644
    index 0000000..3e63513
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-10px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-11px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-11px.gif
    new file mode 100644
    index 0000000..717ea94
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-11px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-12px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-12px.gif
    new file mode 100644
    index 0000000..1141d26
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-12px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-13px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-13px.gif
    new file mode 100644
    index 0000000..b80c0ce
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-13px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-14px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-14px.gif
    new file mode 100644
    index 0000000..06d5f20
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-14px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-15px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-15px.gif
    new file mode 100644
    index 0000000..0924d4c
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-15px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-16px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-16px.gif
    new file mode 100644
    index 0000000..e6fadcc
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-16px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-17px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-17px.gif
    new file mode 100644
    index 0000000..413a027
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-17px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-18px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-18px.gif
    new file mode 100644
    index 0000000..0f3d50e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-18px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-19px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-19px.gif
    new file mode 100644
    index 0000000..5b6cd2a
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-19px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-20px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-20px.gif
    new file mode 100644
    index 0000000..7ae97ea
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-20px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-21px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-21px.gif
    new file mode 100644
    index 0000000..a88c6a2
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-21px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-22px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-22px.gif
    new file mode 100644
    index 0000000..69ced7f
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-22px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-23px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-23px.gif
    new file mode 100644
    index 0000000..f05a1fe
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-23px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-24px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-24px.gif
    new file mode 100644
    index 0000000..7620716
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-24px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-25px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-25px.gif
    new file mode 100644
    index 0000000..f95907d
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-25px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-26px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-26px.gif
    new file mode 100644
    index 0000000..3220c64
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-26px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-27px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-27px.gif
    new file mode 100644
    index 0000000..6feb9bc
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-27px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-28px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-28px.gif
    new file mode 100644
    index 0000000..eaccc1e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-28px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-29px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-29px.gif
    new file mode 100644
    index 0000000..d95c137
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-29px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-30px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-30px.gif
    new file mode 100644
    index 0000000..1979fd3
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-30px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-31px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-31px.gif
    new file mode 100644
    index 0000000..50c56e7
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-31px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-32px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-32px.gif
    new file mode 100644
    index 0000000..6067999
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-32px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-33px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-33px.gif
    new file mode 100644
    index 0000000..346a35f
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-33px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-34px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-34px.gif
    new file mode 100644
    index 0000000..e2ad17f
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-34px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-35px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-35px.gif
    new file mode 100644
    index 0000000..ae055dd
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-35px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-36px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-36px.gif
    new file mode 100644
    index 0000000..2abd3ac
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-36px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-37px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-37px.gif
    new file mode 100644
    index 0000000..018c0e7
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-37px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-38px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-38px.gif
    new file mode 100644
    index 0000000..f46bd9f
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-38px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-39px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-39px.gif
    new file mode 100644
    index 0000000..0bb015e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-39px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/stripes/stripe-40px.gif b/wt-3.1.7a/resources/themes/default/stripes/stripe-40px.gif
    new file mode 100644
    index 0000000..87010de
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/default/stripes/stripe-40px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/default/wt.css b/wt-3.1.7a/resources/themes/default/wt.css
    new file mode 100644
    index 0000000..5b985a8
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/default/wt.css
    @@ -0,0 +1,684 @@
    +/*
    + * Outset
    + */
    +.Wt-outset {
    +    border: 1px solid #888888;
    +}
    +
    +/*
    + * WFormWidget
    + */
    +.Wt-edit-emptyText {
    +    color: gray;
    +}
    +
    +/*
    + * Silk screen
    + */
    +.Wt-dialogcover {
    +    background: #CCCCCC;
    +}
    +
    +/*
    + * WCalendar
    + */
    +.Wt-cal {
    +    padding: 0px;
    +}
    +
    +.Wt-cal table {
    +    border-left: 1px solid #E0E0E0;
    +    border-collapse:separate;
    +    background-color: #fff;
    +    text-align: center;
    +    font-size: 10pt;
    +    line-height: 140%;
    +}
    +
    +.Wt-cal table.d1 {
    +    width: 170px;
    +}
    +
    +.Wt-cal table.d1 td {
    +    width: 20px;
    +}
    +
    +.Wt-cal table.d3 {
    +    width: 220px;
    +}
    +
    +.Wt-cal table.d3 td {
    +    width: 30px;
    +}
    +
    +.Wt-cal table.dlong {
    +    width: 560px;
    +}
    +
    +.Wt-cal table.dlong td {
    +    width: 80px;
    +}
    +
    +.Wt-cal caption {
    +    margin: 0;
    +    padding: 0;
    +    text-align: center;
    +    background: #EEEEEE;
    +}
    +
    +.Wt-cal caption select {
    +    cursor: pointer; cursor: hand;
    +    margin: 2px 0px;
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal-navbutton {
    +    color: #FFFFFF;
    +    background-color:#6699CC;
    +    cursor: pointer; cursor: hand;
    +    padding: 0px 2px 2px;
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal-year {
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal-year span {
    +    padding: 2px 2px;
    +}
    +
    +.Wt-cal-year span:hover {
    +    background-color:#FFFFCC;
    +}
    +
    +.Wt-cal th {
    +    color: #666666;
    +    border: 0px;
    +    border-right: 1px solid #E0E0E0;
    +    border-bottom: 1px solid #E0E0E0;
    +    border-top: 1px solid #E0E0E0;    
    +    line-height: 140%;
    +}
    +
    +.Wt-cal td {
    +    color: #003DB8;
    +    border-right: 1px solid #E0E0E0;
    +    border-bottom: 1px solid #E0E0E0;
    +    cursor: pointer; cursor: hand;
    +    text-align: center;
    +}
    +
    +.Wt-cal-oom {
    +    color: #999999;
    +    cursor: default;
    +    background-color: transparent;
    +}
    +
    +.Wt-cal-oor {
    +    color: #999999;
    +    cursor: default;
    +    background-color: transparent;
    +}
    +
    +.Wt-cal-sel {
    +    background-color:#FFF19F;
    +}
    +
    +.Wt-cal-now {
    +    color: black;
    +    background: #EEEEEE;
    +}
    +
    +/*
    + * WDatePicker
    + */
    +.Wt-datepicker {
    +    background-color: #EEEEEE;
    +}
    +
    +/*
    + * WDialog
    + */
    +.Wt-dialog {
    +    background-color: #EEEEEE;
    +}
    +
    +.Wt-dialog .titlebar {
    +    background: #888888; color: #FFFFFF;
    +    cursor: move;
    +    padding: 2px 6px 3px;
    +}
    +
    +.Wt-dialog .body {
    +    background: #EEEEEE;
    +    padding: 4px 6px 4px;
    +}
    +
    +/*
    + * WMenuItem
    + */
    +.Wt-closeicon {
    +    background: transparent url(../../closeicons-mi.png) no-repeat scroll right top;
    +    height: 8px;
    +    width: 9px;
    +    margin: 0px 5px 0px 2px;
    +    padding: 0px;
    +    font-size: 0px;
    +    cursor: default;
    +}
    +
    +.Wt-closeicon:hover {
    +    background-position: right -8px;
    +}
    +
    +/* 
    + * WMessageBox
    + */
    +.Wt-msgbox-buttons button {
    +    padding: 1px 4px 1px;
    +    margin: 2px;
    +}
    +
    +/*
    + * WGridLayout
    + */
    +
    +.Wt-hrh div, .Wt-vsh {
    +    cursor: row-resize;
    +    margin: 2px;
    +}
    +
    +.Wt-vrh div, .Wt-hsh {
    +    cursor: col-resize;
    +    margin: 0px 2px;
    +}
    +
    +.Wt-hrh div {
    +    background: url(splitter-v.png) no-repeat 50% 50%;
    +}
    +
    +.Wt-vrh div {
    +    background: url(splitter-h.png) no-repeat 50% 50%;
    +}
    +
    +.Wt-hrh div, .Wt-vrh div {
    +    background-color: #CCCCCC;
    +}
    +
    +.Wt-hsh, .Wt-vsh {
    +    background-color: #EEEEEE;
    +}
    +
    +.Wt-hrh div:hover, .Wt-vrh div:hover {
    +    background-color: #EEEEEE;
    +}
    +
    +/*
    + * WItemDelegate, when editable
    + */
    +.Wt-delegate-edit {
    +  line-height: 0px;
    +}
    +
    +/*
    + * WPanel
    + */
    +.Wt-panel {
    +  border: 3px solid #888888;
    +  background: #EEEEEE none repeat scroll 0%;
    +}
    +.Wt-panel .titlebar {
    +  padding: 0px 6px 3px;
    +  background: #888888; color: #FFFFFF;
    +  font-size: 10pt;
    +}
    +
    +.Wt-panel .body {
    +  background: #FFFFFF;
    +  padding: 4px 6px 4px;
    +}
    +
    +/*
    + * WPopupMenu
    + */
    +.Wt-popupmenu {
    +    background: white;
    +    color: black;
    +    border: 1px solid #666666;
    +    z-index: 200;
    +    cursor: default;
    +}
    +
    +.Wt-popupmenu .Wt-item, .Wt-popupmenu .Wt-selected {
    +    padding: 2px 0px;
    +}
    +
    +.Wt-popupmenu .Wt-selected {
    +    background: blue;
    +    color: white;
    +}
    +
    +.Wt-popupmenu .Wt-disabled {
    +    color: #AAAAAA;
    +}
    + 
    +.Wt-popupmenu .Wt-separator {
    +    border-top: 1px solid #CCCCCC;
    +    border-bottom: 1px solid #DDDDDD;
    +    margin: 0px 3px;
    +}
    +
    +/*
    + * WProgressBar
    + */
    +.Wt-progressbar
    +{
    +   background: #333;
    +   position: relative;
    +   border-width: 1px;
    +   border-style: solid;
    +   border-color: black;
    +   overflow: hidden;
    +   color: #FFF;
    +   font-weight: bold;
    +   width: 200px;
    +   height: 1em;
    +   line-height: 1em;
    + }
    +
    +.Wt-progressbar .Wt-pgb-bar
    +{
    +   position: absolute;
    +   left: 0px;
    +   top: 0px;
    +   height: 100%;
    +   background: #292;
    +}
    +
    +.Wt-progressbar .Wt-pgb-label
    +{
    +   position: absolute;
    +   left: 0px;
    +   width: 100%;
    +   text-align: center;
    +   font-size: 0.8em;
    +   top:0.1em;
    +}
    +
    +/* 
    + * WSuggestionPopup
    + */
    +.Wt-suggest {
    +    background-color: #e0ecff;
    +    color: #1010cc;
    +    border: 1px solid #666666;
    +    cursor: default;
    +    font-size: smaller;
    +}
    +
    +.Wt-suggest .content {
    +    overflow-y: auto;
    +    padding: 2px;
    +}
    +
    +.Wt-suggest .content div {
    +    padding: 0px 3px;
    +}
    +
    +.Wt-suggest .sel {
    +    background-color: #C3D9FF;
    +}
    +
    +.Wt-suggest-dropdown {
    +    background-image: url('dropdown.png');
    +    background-repeat: no-repeat;
    +    background-position: right center;
    +}
    +
    +/*
    + * WSlider
    + */
    +.Wt-slider .handle-h {
    +    background: url(slider-thumb-h.gif) no-repeat
    +}
    +
    +.Wt-slider .handle-v {
    +    background: url(slider-thumb-v.gif) no-repeat
    +}
    +
    +/*
    + * WSpinBox
    + */
    +.Wt-spinbox {
    +    background-image: url('spin-buttons.png');
    +    background-repeat: no-repeat;
    +    background-position: right center;
    +}
    +
    +.Wt-spinbox-up {
    +    background-image: url('spin-buttons-up.png');
    +}
    +
    +.Wt-spinbox-dn {
    +    background-image: url('spin-buttons-dn.png');
    +}
    +
    +/*
    + * WTabWidget
    + */
    +.Wt-tabs {
    +    margin-bottom: 4px;
    +    zoom: 1;
    +    width: 100%;
    +}
    +
    +.Wt-tabs li {
    +    display: inline;
    +}
    +
    +.Wt-tabs ul {
    +    margin: 0px;
    +    padding-left: 10px;
    +    list-style-type: none;
    +    list-style-position: outside;
    +    background: transparent url(../../tab_b.gif) repeat-x scroll center bottom;
    +    overflow: auto;
    +}
    +
    +.Wt-tabs span {
    +    background: transparent url(../../tab_r.gif) no-repeat scroll right top;
    +    border-bottom:1px solid #84B0C7;
    +    float:left; display:block;
    +    cursor:pointer;cursor:hand;
    +    font-size: small; font-weight: bold;
    +}
    +
    +.Wt-tabs span.itemselected, .Wt-tabs span.citemselected {
    +    background-position:100% -150px;
    +}
    +
    +.Wt-tabs span span {
    +    background: transparent url(../../tab_l.gif) no-repeat scroll left top;
    +    border-bottom: 0px;
    +    white-space: nowrap;
    +    padding:5px 9px;color:#1A419D;
    +}
    +
    +.Wt-tabs span.itemselected span, .Wt-tabs span.citemselected span {
    +    background-position:0% -150px;
    +}
    +
    +.Wt-tabs .Wt-closeicon, .Wt-tabs span.citemselected .Wt-closeicon {
    +    background: transparent url(../../closeicons-tab.png) no-repeat scroll right top;
    +    margin: 6px 4px 0px 0px;
    +    height: 13px;
    +    width: 13px;
    +    border: 0px;
    +    padding: 0px;
    +    cursor: default;
    +}
    +
    +.Wt-tabs .Wt-closeicon:hover, .Wt-tabs span.citemselected .Wt-closeicon:hover {
    +    background-position: right -13px;
    +}
    +
    +/*
    + * WTree(node)
    + */
    +
    +.Wt-tree {
    +    table-layout: fixed;
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    white-space: nowrap;   
    +}
    +
    +/* nodes */
    +.Wt-tree .Wt-trunk {
    +    background: url(../../line-trunk.gif) repeat-y;
    +    width: 19px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-end {
    +    background: url(../../line-last.gif) no-repeat 0 0;
    +    width: 19px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-expand {
    +    width: 19px;
    +    height: 18px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-collapse {
    +    width: 19px;
    +    height: 18px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-noexpand {
    +    width: 19px;
    +    height: 18px;
    +    background: url(../../line-middle.gif) no-repeat 0 0;
    +    display: block;
    +    padding: 0px;
    +}
    +
    +.Wt-sentinel {
    +    table-layout: auto;
    +}
    +
    +.Wt-treetable div.Wt-header {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    font-weight: bold;
    +    cursor: default;
    +    background-color: #EEEEEE;
    +    white-space: normal;
    +    text-overflow: ellipsis;
    +    padding: 3px 0px;
    +}
    +
    +/* selection */
    +.Wt-tree .Wt-selected {
    +    background-color: #FFFFAA;
    +}
    +
    +/* label */
    +.Wt-tree .Wt-label {
    +    padding: 0px 2px;
    +    line-height: 150%;
    +}
    +
    +/*
    + * WTableView
    + */
    +.Wt-tableview {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +}
    +
    +.Wt-tableview .Wt-spacer {
    +    background: url(../../loading.png);
    +    position: relative;
    +    overflow: hidden;
    +}
    +
    +/* header */
    +
    +.Wt-tableview {
    +    white-space: nowrap
    +}
    +
    +.Wt-tableview .Wt-headertable,
    +.Wt-tableview .Wt-headertable .Wt-rowc,
    +.Wt-tableview th {
    +    background-color: #EEEEEE;
    +}
    +
    +.Wt-tableview th {
    +    padding: 0px;
    +}
    +
    +.Wt-tableview table {
    +    background-position: left bottom;
    +}
    +
    +.Wt-tableview .Wt-header .Wt-label {
    +    font-weight: bold;
    +    text-overflow: ellipsis;
    +    overflow: hidden;
    +}
    +
    +.Wt-tableview .Wt-tv-rh:hover {
    +    background-color: #DDDDDD;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-none {
    +    background: url(sort-arrow-none.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-up {
    +    background: url(sort-arrow-up.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-down {
    +    background: url(sort-arrow-down.gif) no-repeat 0 6px;
    +}
    +
    +/* selection */
    +.Wt-tableview .Wt-selected {
    +    background-color: #FFFFAA;
    +}
    +
    +/* item drag & drop */
    +.Wt-tableview .Wt-drop-site {
    +    background-color: #EEEEEE;
    +    outline: 1px dotted black;
    +}
    +
    +.Wt-tableview .Wt-tv-contents {
    +    position: absolute;
    +}
    +
    +/* borders */
    +.Wt-tableview .Wt-tv-br,
    +.Wt-tableview .Wt-tv-contents .Wt-tv-c,
    +.Wt-tableview .Wt-plaintable tbody .Wt-tv-c {
    +    border-right: 1px solid #FFFFFF;
    +}
    +
    +/*
    + * WTreeView
    + */
    +.Wt-treeview {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    white-space: nowrap;
    +}
    +
    +.Wt-treeview .Wt-spacer {
    +    background: url(../../loading.png);
    +}
    +
    +/* header */
    +.Wt-treeview .Wt-headerdiv, .Wt-treeview .Wt-headerdiv .Wt-tv-rowc {
    +    background-color: #EEEEEE;
    +}
    +
    +.Wt-treeview .Wt-headerdiv .background {
    +    background-color: #FFFFFF;
    +}
    +
    +.Wt-treeview .Wt-header div.Wt-label {
    +    white-space: normal;
    +    font-weight: bold;
    +    text-overflow: ellipsis;
    +    overflow: hidden;
    +}
    +
    +.Wt-treeview .Wt-tv-rh:hover {
    +    background-color: #DDDDDD;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-none {
    +    background: url(sort-arrow-none.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-up {
    +    background: url(sort-arrow-up.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-down {
    +    background: url(sort-arrow-down.gif) no-repeat 0 6px;
    +}
    +
    +/* nodes */
    +.Wt-treeview .Wt-trunk {
    +    background: url(../../line-trunk.gif) repeat-y;
    +}
    +
    +.Wt-treeview .Wt-end {
    +    background: url(../../tv-line-last.gif) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-expand {
    +    width: 19px;
    +    height: 18px;
    +    background: url(nav-plus.gif) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-collapse {
    +    width: 19px;
    +    height: 18px;
    +    background: url(nav-minus.gif) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-noexpand {
    +    width: 19px;
    +    height: 18px;
    +    background: url(../../line-middle.gif) no-repeat 0 center;
    +}
    +
    +/* selection */
    +.Wt-treeview .Wt-selected {
    +    background-color: #FFFFAA;
    +}
    +
    +/* item drag & drop */
    +.Wt-treeview .Wt-drop-site {
    +    background-color: #EEEEEE;
    +    outline: 1px dotted black;
    +}
    +
    +/*
    + * WTreeView and WTableView default paging bar
    + */
    +.Wt-pagingbar {
    +    text-align: center;
    +    padding: 2px;
    +    height: 25px;
    +    line-height: 25px;
    +}
    +
    +.Wt-pagingbar span {
    +    margin: 0px 4px;
    +}
    +
    +.Wt-pagingbar button {
    +    margin: 0px 4px;
    +}
    +
    +/*
    + * For Ext::TableView
    + */
    +
    +table.x-grid3-row-table {
    +    table-layout: fixed;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/resources/themes/default/wt_ie.css b/wt-3.1.7a/resources/themes/default/wt_ie.css
    new file mode 100644
    index 0000000..8c2cf19
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/default/wt_ie.css
    @@ -0,0 +1,40 @@
    +/* additional style rules for IE */
    +
    +/*
    + * WItemDelegate
    + */
    +.Wt-delegate-edit input {
    +    font-size: 9pt;
    +    padding-top: 0px;
    +    padding-bottom: 0px;
    +}
    +
    +/*
    + * WSuggestionPopup
    + */
    +.Wt-suggest .content {
    +    overflow-x: hidden;
    +}
    +
    +/*
    + * WTableView
    + */
    +.Wt-tableview div {
    +    white-space: nowrap
    +}
    +
    +/*
    + * WTree
    + */
    +.Wt-tree div, .Wt-tree span {
    +    white-space: nowrap;   
    +}
    +
    +/*
    + * WTreeView
    + */
    +
    +/* IE ignores white-space on a table or td */
    +.Wt-treeview div, .Wt-treeview span {
    +    white-space: nowrap;
    +}
    diff --git a/wt-3.1.7a/resources/themes/default/wt_ie6.css b/wt-3.1.7a/resources/themes/default/wt_ie6.css
    new file mode 100644
    index 0000000..7c821f8
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/default/wt_ie6.css
    @@ -0,0 +1,10 @@
    +/* additional style rules for ie */
    +
    +/*
    + * WCalendar
    + */
    +
    +.Wt-cal td div {
    +    zoom: 1;
    +}
    +
    diff --git a/wt-3.1.7a/resources/themes/polished/closeicons-tab.png b/wt-3.1.7a/resources/themes/polished/closeicons-tab.png
    new file mode 100644
    index 0000000..0b0c2e0
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/closeicons-tab.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/dropdown.png b/wt-3.1.7a/resources/themes/polished/dropdown.png
    new file mode 100644
    index 0000000..c351b48
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/dropdown.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/dropshadow.png b/wt-3.1.7a/resources/themes/polished/dropshadow.png
    new file mode 100644
    index 0000000..dc5f733
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/dropshadow.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/gradient.png b/wt-3.1.7a/resources/themes/polished/gradient.png
    new file mode 100644
    index 0000000..8b31bf3
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/gradient.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/nav-minus.gif b/wt-3.1.7a/resources/themes/polished/nav-minus.gif
    new file mode 100644
    index 0000000..59254f6
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/nav-minus.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/nav-minus.png b/wt-3.1.7a/resources/themes/polished/nav-minus.png
    new file mode 100644
    index 0000000..96ab504
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/nav-minus.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/nav-plus.gif b/wt-3.1.7a/resources/themes/polished/nav-plus.gif
    new file mode 100644
    index 0000000..6afc3c9
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/nav-plus.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/nav-plus.png b/wt-3.1.7a/resources/themes/polished/nav-plus.png
    new file mode 100644
    index 0000000..549b993
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/nav-plus.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/generate.sh b/wt-3.1.7a/resources/themes/polished/no-stripes/generate.sh
    new file mode 100755
    index 0000000..8337a3f
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/polished/no-stripes/generate.sh
    @@ -0,0 +1,10 @@
    +#!/bin/sh
    +#
    +# This script uses imagemagick to generate the stripe-XXpx.gif's.
    +#
    +
    +for i in `seq 10 40`; do
    +	convert -size 30x$[2*$i] xc:white \
    +	    -fill '#FFFFFF' -draw "rectangle 0,$i 30,$[2*$i]" \
    +	no-stripe-${i}px.gif
    +done
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-10px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-10px.gif
    new file mode 100644
    index 0000000..2908cd6
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-10px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-11px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-11px.gif
    new file mode 100644
    index 0000000..b7f33c2
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-11px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-12px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-12px.gif
    new file mode 100644
    index 0000000..9d148cd
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-12px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-13px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-13px.gif
    new file mode 100644
    index 0000000..adfabc5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-13px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-14px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-14px.gif
    new file mode 100644
    index 0000000..57c3106
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-14px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-15px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-15px.gif
    new file mode 100644
    index 0000000..adfd8dc
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-15px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-16px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-16px.gif
    new file mode 100644
    index 0000000..c968a87
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-16px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-17px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-17px.gif
    new file mode 100644
    index 0000000..04825fe
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-17px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-18px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-18px.gif
    new file mode 100644
    index 0000000..a7fe228
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-18px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-19px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-19px.gif
    new file mode 100644
    index 0000000..7bc5d42
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-19px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-20px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-20px.gif
    new file mode 100644
    index 0000000..63e3403
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-20px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-21px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-21px.gif
    new file mode 100644
    index 0000000..6fd76b8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-21px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-22px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-22px.gif
    new file mode 100644
    index 0000000..4058368
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-22px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-23px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-23px.gif
    new file mode 100644
    index 0000000..e048cf4
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-23px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-24px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-24px.gif
    new file mode 100644
    index 0000000..52ed437
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-24px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-25px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-25px.gif
    new file mode 100644
    index 0000000..6c4a003
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-25px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-26px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-26px.gif
    new file mode 100644
    index 0000000..9ff6890
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-26px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-27px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-27px.gif
    new file mode 100644
    index 0000000..73df632
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-27px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-28px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-28px.gif
    new file mode 100644
    index 0000000..7a2ce16
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-28px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-29px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-29px.gif
    new file mode 100644
    index 0000000..268459e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-29px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-30px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-30px.gif
    new file mode 100644
    index 0000000..8a6987e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-30px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-31px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-31px.gif
    new file mode 100644
    index 0000000..6b346b8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-31px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-32px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-32px.gif
    new file mode 100644
    index 0000000..ad9aa31
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-32px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-33px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-33px.gif
    new file mode 100644
    index 0000000..8154b78
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-33px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-34px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-34px.gif
    new file mode 100644
    index 0000000..584cf16
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-34px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-35px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-35px.gif
    new file mode 100644
    index 0000000..b1e8d69
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-35px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-36px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-36px.gif
    new file mode 100644
    index 0000000..f022782
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-36px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-37px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-37px.gif
    new file mode 100644
    index 0000000..a6a4411
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-37px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-38px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-38px.gif
    new file mode 100644
    index 0000000..b57986d
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-38px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-39px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-39px.gif
    new file mode 100644
    index 0000000..687ec29
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-39px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-40px.gif b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-40px.gif
    new file mode 100644
    index 0000000..b5b2713
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/no-stripes/no-stripe-40px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/slider-thumb-h.gif b/wt-3.1.7a/resources/themes/polished/slider-thumb-h.gif
    new file mode 100644
    index 0000000..c91a332
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/slider-thumb-h.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/slider-thumb-v.gif b/wt-3.1.7a/resources/themes/polished/slider-thumb-v.gif
    new file mode 100644
    index 0000000..9942f7b
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/slider-thumb-v.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/sort-arrow-down.gif b/wt-3.1.7a/resources/themes/polished/sort-arrow-down.gif
    new file mode 100644
    index 0000000..6924801
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/sort-arrow-down.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/sort-arrow-none.gif b/wt-3.1.7a/resources/themes/polished/sort-arrow-none.gif
    new file mode 100644
    index 0000000..0aa4e1e
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/sort-arrow-none.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/sort-arrow-up.gif b/wt-3.1.7a/resources/themes/polished/sort-arrow-up.gif
    new file mode 100644
    index 0000000..4afda14
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/sort-arrow-up.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/splitter-h.png b/wt-3.1.7a/resources/themes/polished/splitter-h.png
    new file mode 100644
    index 0000000..f4d0e57
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/splitter-h.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/splitter-v.png b/wt-3.1.7a/resources/themes/polished/splitter-v.png
    new file mode 100644
    index 0000000..40e7373
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/splitter-v.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/generate.sh b/wt-3.1.7a/resources/themes/polished/stripes/generate.sh
    new file mode 100755
    index 0000000..5b3adca
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/polished/stripes/generate.sh
    @@ -0,0 +1,12 @@
    +#!/bin/sh
    +#
    +# This script uses imagemagick to generate the stripe-XXpx.gif's.
    +#
    +
    +for i in `seq 10 40`; do
    +	convert -size 30x$[2*$i] xc:white \
    +	    -fill '#f2f2f2' -draw "rectangle 0,$i 30,$[2*$i]" \
    +	    -fill '#dcdfe8' -draw "line 0,$[$i-1] 30,$[$i-1]" \
    +	    -fill '#dcdfe8' -draw "line 0,$[2*$i-1] 30,$[2*$i-1]" \
    +	stripe-${i}px.gif
    +done
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-10px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-10px.gif
    new file mode 100644
    index 0000000..9526bc5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-10px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-11px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-11px.gif
    new file mode 100644
    index 0000000..410ba60
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-11px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-12px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-12px.gif
    new file mode 100644
    index 0000000..41fa4cb
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-12px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-13px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-13px.gif
    new file mode 100644
    index 0000000..e087005
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-13px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-14px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-14px.gif
    new file mode 100644
    index 0000000..69cf3a6
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-14px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-15px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-15px.gif
    new file mode 100644
    index 0000000..c144dd0
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-15px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-16px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-16px.gif
    new file mode 100644
    index 0000000..c3354c5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-16px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-17px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-17px.gif
    new file mode 100644
    index 0000000..97e3af0
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-17px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-18px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-18px.gif
    new file mode 100644
    index 0000000..4bfa46c
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-18px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-19px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-19px.gif
    new file mode 100644
    index 0000000..f5f3121
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-19px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-20px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-20px.gif
    new file mode 100644
    index 0000000..3c8e08a
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-20px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-21px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-21px.gif
    new file mode 100644
    index 0000000..5c967ba
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-21px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-22px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-22px.gif
    new file mode 100644
    index 0000000..a8680a8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-22px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-23px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-23px.gif
    new file mode 100644
    index 0000000..c021b54
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-23px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-24px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-24px.gif
    new file mode 100644
    index 0000000..a31052c
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-24px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-25px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-25px.gif
    new file mode 100644
    index 0000000..051c8c1
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-25px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-26px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-26px.gif
    new file mode 100644
    index 0000000..4441496
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-26px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-27px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-27px.gif
    new file mode 100644
    index 0000000..2e9562d
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-27px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-28px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-28px.gif
    new file mode 100644
    index 0000000..1069b28
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-28px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-29px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-29px.gif
    new file mode 100644
    index 0000000..9f18723
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-29px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-30px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-30px.gif
    new file mode 100644
    index 0000000..8a6e954
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-30px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-31px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-31px.gif
    new file mode 100644
    index 0000000..30c75e7
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-31px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-32px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-32px.gif
    new file mode 100644
    index 0000000..62ce990
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-32px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-33px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-33px.gif
    new file mode 100644
    index 0000000..bd134f5
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-33px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-34px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-34px.gif
    new file mode 100644
    index 0000000..6631ed3
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-34px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-35px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-35px.gif
    new file mode 100644
    index 0000000..cb1dd18
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-35px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-36px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-36px.gif
    new file mode 100644
    index 0000000..b1647ee
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-36px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-37px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-37px.gif
    new file mode 100644
    index 0000000..42766e8
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-37px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-38px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-38px.gif
    new file mode 100644
    index 0000000..c748eeb
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-38px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-39px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-39px.gif
    new file mode 100644
    index 0000000..31605c0
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-39px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/stripes/stripe-40px.gif b/wt-3.1.7a/resources/themes/polished/stripes/stripe-40px.gif
    new file mode 100644
    index 0000000..bfd800a
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/stripes/stripe-40px.gif differ
    diff --git a/wt-3.1.7a/resources/themes/polished/suggest-dropdown.png b/wt-3.1.7a/resources/themes/polished/suggest-dropdown.png
    new file mode 100644
    index 0000000..96ab504
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/suggest-dropdown.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/title-gradient.png b/wt-3.1.7a/resources/themes/polished/title-gradient.png
    new file mode 100644
    index 0000000..adff62a
    Binary files /dev/null and b/wt-3.1.7a/resources/themes/polished/title-gradient.png differ
    diff --git a/wt-3.1.7a/resources/themes/polished/wt.css b/wt-3.1.7a/resources/themes/polished/wt.css
    new file mode 100644
    index 0000000..6e0d505
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/polished/wt.css
    @@ -0,0 +1,789 @@
    +/*
    + * Effects
    + */
    +
    +/*
    + * Outset using a dropshadow
    + */
    +.Wt-outset {
    +    border: 1px solid white;
    +    position: relative;
    +    margin: 6px;
    +}
    +
    +.Wt-outset .Wt-x1, .Wt-outset .Wt-x1a,
    +.Wt-outset .Wt-x2, .Wt-outset .Wt-x2a {
    +    background:transparent url(dropshadow.png) no-repeat scroll 0 0;
    +    position:absolute;
    +    height:100%;
    +    width:100%;
    +}
    +
    +.Wt-outset .Wt-x1 {
    +    background-position:0 0;
    +    bottom:0;
    +    left:-7px;
    +    padding:0 0 2px 0;
    +    top:-7px;
    +    z-index:-2;
    +}
    +
    +.Wt-outset .Wt-x1 .Wt-x1a {
    +    background-position:100% 0;
    +    height: 12px;
    +    right:-14px;
    +    top:0;
    +    width:14px;
    +}
    +
    +.Wt-outset .Wt-x2 {
    +    background-position:100% 100%;
    +    bottom:-7px;
    +    padding:2px 0 0 0;
    +    right:-7px;
    +    z-index:-1;
    +}
    +
    +.Wt-outset .Wt-x2 .Wt-x2a {
    +    background-position:0 100%;
    +    bottom:0;
    +    height:12px;
    +    left:-14px;
    +    width:14px;
    +}
    +
    +/*
    + * WFormWidget
    + */
    +.Wt-edit-emptyText {
    +    color: gray;
    +}
    +
    +/*
    + * Silk screen
    + */
    +.Wt-dialogcover {
    +    background: #CCCCCC;
    +}
    +
    +/*
    + * WCalendar
    + */
    +.Wt-cal {
    +    padding: 0px;
    +}
    +
    +.Wt-cal table {
    +    border-left: 1px solid #727D9C;
    +    font: normal 13px/22px "Trebuchet MS", Verdana, Arial, Helvetica,
    +      sans-serif;
    +    color: #515B66;
    +    text-align: center;
    +    background-color: #fff;
    +    border-collapse: separate;
    +}
    +
    +.Wt-cal table.d1 {
    +    width: 155px;
    +}
    +
    +.Wt-cal table.d1 td {
    +    width: 20px;
    +}
    +
    +.Wt-cal table.d3 {
    +    width: 220px;
    +}
    +
    +.Wt-cal table.d3 td {
    +    width: 30px;
    +}
    +
    +.Wt-cal table.dlong {
    +    width: 490px;
    +}
    +
    +.Wt-cal table.dlong td {
    +    width: 70px;
    +}
    +
    +.Wt-cal caption {
    +    margin: 0;
    +    padding: 0;
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    color: #fff;
    +    font: bold 13px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
    +    text-align: center;
    +}
    +
    +.Wt-cal-navbutton {
    +    cursor: pointer; cursor: hand;
    +    font: bold 20px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal caption select {
    +    cursor: pointer; cursor: hand;
    +    font: 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
    +    margin: 2px 0px;
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal-year {
    +    vertical-align: middle;
    +}
    +
    +.Wt-cal-year span {
    +    padding: 1px 2px;
    +}
    +
    +.Wt-cal-year span:hover {
    +    color: #6880A0;
    +    background-color: #F0F0F0;
    +}
    +
    +.Wt-cal th {
    +    font: bold 12px/22px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
    +    color: #515B66;
    +    background: #D9E2E1;
    +    border-right: 1px solid #6880A0;
    +    border-bottom: 1px solid #6880A0;
    +    border-top: 1px solid #6880A0;
    +    cursor: default;
    +}
    +
    +.Wt-cal td {
    +    border-right: 1px solid #6880A0;
    +    border-bottom: 1px solid #6880A0;
    +    text-align: center;
    +    cursor: default;
    +}
    +
    +.Wt-cal-oom {
    +    color: #CCCCCC;
    +}
    +
    +.Wt-cal-oor {
    +    color: #CCCCCC;
    +}
    +
    +.Wt-cal-sel {
    +    background-color:#FFF19F;
    +}
    +
    +.Wt-cal-now {
    +    color: #F6F4DA;
    +    font-weight: bold;
    +    background: #AAAAAA;
    +}
    +
    +/*
    + * WDatePicker
    + */
    +.Wt-datepicker {
    +    background-color: white;
    +}
    +
    +/*
    + * WDialog
    + */
    +.Wt-dialog {
    +    background-color: white;
    +}
    +
    +.Wt-dialog .titlebar {
    +    color: #FFFFFF;
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    cursor: move;
    +    font: bold 12px Verdana;
    +    padding: 3px 6px;
    +}
    +
    +.Wt-dialog .body {
    +    padding: 4px 6px;
    +}
    +
    +/*
    + * WMessageBox
    + */
    +.Wt-msgbox-buttons button {
    +    padding: 1px 4px 1px;
    +    margin: 2px;
    +}
    +
    +/*
    + * WGridLayout
    + */
    +
    +.Wt-hrh div, .Wt-vsh {
    +    cursor: row-resize;
    +    margin: 2px;
    +}
    +
    +.Wt-vrh div, .Wt-hsh {
    +    cursor: col-resize;
    +    margin: 0px 2px;
    +}
    +
    +.Wt-hrh div {
    +    background: url(splitter-v.png) no-repeat 50% 50%;
    +}
    +
    +.Wt-vrh div {
    +    background: url(splitter-h.png) no-repeat 50% 50%;
    +}
    +
    +.Wt-hrh div, .Wt-vrh div {
    +    background-color: #EEEEEE;
    +}
    +
    +.Wt-hsh, .Wt-vsh {
    +    background-color: #8ea2bd;
    +}
    +
    +.Wt-hrh div:hover, .Wt-vrh div:hover {
    +    background-color: #8ea2bd;
    +}
    +
    +/*
    + * WItemDelegate, when editable
    + */
    +.Wt-delegate-edit {
    +  line-height: 0px;
    +}
    +
    +/*
    + * WPanel
    + */
    +.Wt-panel {
    +}
    +
    +.Wt-panel .titlebar {
    +    color: #FFFFFF;
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    font: bold 12px Verdana;
    +    padding: 3px 6px;
    +    cursor: default;
    +}
    +
    +.Wt-panel .body {
    +    padding: 4px 6px;
    +}
    +
    +/*
    + * WPopupMenu
    + */
    +.Wt-popupmenu {
    +    background: #FAFAFA;
    +    font: normal 13px/22px "Trebuchet MS", Verdana, Arial, Helvetica,
    +      sans-serif;
    +    color: #515B66;
    +    z-index: 200;
    +    cursor: default;
    +    white-space: nowrap;
    +}
    +
    +.Wt-popupmenu .Wt-item, .Wt-popupmenu .Wt-selected {
    +    padding: 2px 0px;
    +}
    +
    +.Wt-popupmenu .Wt-item input, .Wt-popupmenu .Wt-selected input {
    +    margin-left: 4px;
    +}
    +
    +.Wt-popupmenu .Wt-selected {
    +    background: #6880A0;
    +    color: white;
    +}
    +
    +.Wt-popupmenu .Wt-disabled {
    +    color: #AAAAAA;
    +}
    +
    +.Wt-popupmenu .Wt-separator {
    +    border-top: 1px solid #CCCCCC;
    +    border-bottom: 1px solid #DDDDDD;
    +    margin: 0px 3px;
    +    line-height: 0px;
    +}
    +
    +/*
    + * WProgressBar
    + */
    +.Wt-progressbar
    +{
    +   font: normal 1em "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
    +   background: gray;
    +   border: 1px solid #555;
    +   position: relative;
    +   overflow: hidden;
    +   color: white;
    +   font-weight: bold;
    +   width: 200px;
    +   height: 1em;
    +   line-height: 1em;
    + }
    +
    +.Wt-progressbar .Wt-pgb-bar
    +{
    +   position: absolute;
    +   left: 0px;
    +   top: 0px;
    +   height: 100%;
    +   background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +}
    +
    +.Wt-progressbar .Wt-pgb-label
    +{
    +   font-size: 0.8em;
    +   position: absolute;
    +   left: 0px;
    +   width: 100%;
    +   text-align: center;
    +}
    +
    +/*
    + * WPushButton
    + */
    +.Wt-btn:hover {
    +    border-color:#99CCFF #6699EE #6699EE #77AAFF;
    +}
    +
    +.Wt-btn {
    +    background: transparent url(gradient.png) repeat-x scroll 0 0;
    +    border: 1px outset #CCCCCC;
    +    cursor: pointer;
    +    font-size: small;
    +    margin: 0px 2px;
    +    padding: 2px 5px;
    +    text-decoration: none;
    +}
    +
    +.Wt-btn:active {
    +    border: 1px inset #CCCCCC;
    +}
    +
    +/*
    + * WSlider
    + */
    +.Wt-slider .handle-h {
    +    background: url(slider-thumb-h.gif) no-repeat
    +}
    +
    +.Wt-slider .handle-v {
    +    background: url(slider-thumb-v.gif) no-repeat
    +}
    +
    +/* 
    + * WSuggestionPopup
    + */
    +.Wt-suggest {
    +    background: #FAFAFA;
    +    font: normal 13px/22px "Trebuchet MS", Verdana, Arial, Helvetica,
    +      sans-serif;
    +    color: #515B66;
    +    cursor: default;
    +}
    +
    +.Wt-suggest .content {
    +    overflow-y: auto;
    +}
    +
    +.Wt-suggest .content div {
    +    padding: 0px 3px;
    +}
    +
    +.Wt-suggest .sel {
    +    background: #6880A0;
    +    color: white;
    +}
    +
    +.Wt-suggest-dropdown {
    +    background-image: url('suggest-dropdown.png');
    +    background-repeat: no-repeat;
    +    background-position: right center;
    +}
    +
    +/*
    + * WSpinBox -- todo: polish this
    + */
    +.Wt-spinbox {
    +    background-image: url('../default/spin-buttons.png');
    +    background-repeat: no-repeat;
    +    background-position: right center;
    +}
    +
    +.Wt-spinbox-up {
    +    background-image: url('../default/spin-buttons-up.png');
    +}
    +
    +.Wt-spinbox-dn {
    +    background-image: url('../default/spin-buttons-dn.png');
    +}
    +
    +/*
    + * WTabWidget
    + */
    +.Wt-tabs-clear {
    +    clear: both;
    +}
    +
    +.Wt-tabs {
    +    border-bottom: 1px solid gray;
    +}
    +
    +.Wt-tabs ul {
    +    padding: 3px 3px 0px;
    +    font: bold 12px Verdana;
    +    list-style-type: none;
    +    margin: 0px;
    +}
    +
    +.Wt-tabs li {
    +    display: inline;
    +    white-space: nowrap;
    +    margin: 0;
    +}
    +
    +.Wt-tabs .item, .Wt-tabs .itemselected,
    +.Wt-tabs .citem, .Wt-tabs .citemselected {
    +    display: block;
    +    float: left;
    +    padding: 2px 6px 3px;
    +    margin-right: 3px;
    +    border: 1px solid gray;
    +    border-bottom: none;
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    color: #FFFFFF;
    +}
    +
    +.Wt-tabs li a, .Wt-tabs li button {
    +   text-decoration: none;
    +   color: inherit;
    +}
    +
    +.Wt-tabs li button a {
    +    padding: 0;
    +    margin: 0;
    +    border: 0;
    +    color: inherit;
    +    background: transparent;
    +}
    +
    +.Wt-tabs li:hover .item, .Wt-tabs .itemselected,
    +.Wt-tabs li:hover .citem, .Wt-tabs .citemselected,
    +.Wt-tabs li:hover a {
    +    background: white;
    +    color: black;
    +    border-bottom: 1px solid white;
    +    margin-bottom: -1px;
    +}
    +
    +.Wt-tabs li .itemselected a, .Wt-tabs li .itemselected button {
    +    background: white;
    +    color: black;
    +}
    +
    +.Wt-tabs .Wt-closeicon, .Wt-tabs span.citemselected .Wt-closeicon {
    +    background: transparent url(../../closeicons-tab.png) no-repeat scroll right top;
    +    background-position: right 3px;
    +    border-width: 3px 0px 0px 0px;
    +    padding: 0px 6px 0px 7px;
    +    cursor: default;
    +    margin-left: 3px;
    +    vertical-align: top;
    +}
    +
    +.Wt-tabs .Wt-closeicon:hover, .Wt-tabs span.citemselected .Wt-closeicon:hover {
    +    background-position: right -10px;
    +}
    +
    +/*
    + * WTree(node)
    + */
    +.Wt-tree {
    +    table-layout: fixed;
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    white-space: nowrap;
    +}
    +
    +/* nodes */
    +.Wt-tree .Wt-trunk {
    +    width: 19px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-end {
    +    width: 19px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-expand {
    +    width: 19px;
    +    height: 18px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-collapse {
    +    width: 19px;
    +    height: 18px;
    +    padding: 0px;
    +}
    +
    +.Wt-tree .Wt-noexpand {
    +    width: 19px;
    +    height: 18px;
    +    display: block;
    +    padding: 0px;
    +}
    +
    +.Wt-sentinel {
    +    table-layout: auto;
    +}
    +
    +.Wt-treetable {
    +    background: white;
    +    border: 1px solid #dcdfe8;
    +}
    +
    +.Wt-treetable .Wt-header {
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    color: white;
    +    cursor: default;
    +    white-space: nowrap;
    +    text-overflow: ellipsis;
    +    padding: 3px 0px 3px 3px;
    +}
    +
    +/* selection */
    +.Wt-tree .Wt-selected {
    +    background-color: #999999;
    +    color: white;
    +}
    +
    +/* label */
    +.Wt-tree .Wt-label {
    +    padding: 0px 2px;
    +    line-height: 150%;
    +}
    +
    +/*
    + * WTableView
    + */
    +.Wt-tableview {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    white-space: nowrap;
    +    background: white;
    +    border: 1px solid #dcdfe8;
    +}
    +
    +.Wt-tableview .Wt-spacer {
    +    background: url(../../loading.png);
    +    position: relative;
    +    overflow: hidden;
    +}
    +
    +/* header */
    +
    +.Wt-tableview {
    +    white-space: nowrap
    +}
    +
    +.Wt-tableview .Wt-headertable,
    +.Wt-tableview .Wt-headertable .Wt-rowc,
    +.Wt-tableview th {
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    color: white;
    +}
    +
    +.Wt-tableview th {
    +    padding: 0px;
    +}
    +
    +.Wt-tableview table {
    +    background-position: left bottom;
    +}
    +
    +.Wt-tableview .Wt-header .Wt-label {
    +    font-weight: bold;
    +    text-overflow: ellipsis;
    +    overflow: hidden;
    +}
    +
    +.Wt-tableview .Wt-tv-rh:hover {
    +    background-color: #DDDDDD;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-none {
    +    background: url(sort-arrow-none.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-up {
    +    background: url(sort-arrow-up.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-tableview .Wt-tv-sh-down {
    +    background: url(sort-arrow-down.gif) no-repeat 0 6px;
    +}
    +
    +/* selection */
    +.Wt-tableview .Wt-selected {
    +    background-color: #999999;
    +    color: white;
    +}
    +
    +/* item drag & drop */
    +.Wt-tableview .Wt-drop-site {
    +    background-color: #EEEEEE;
    +    outline: 1px dotted black;
    +}
    +
    +.Wt-tableview .Wt-tv-contents {
    +    position: absolute;
    +}
    +
    +/* borders */
    +.Wt-tableview .Wt-tv-br {
    +    border-right: 1px solid #dcdfe8;
    +}
    +
    +/* borders */
    +.Wt-tableview .Wt-tv-contents .Wt-tv-c,
    +.Wt-tableview .Wt-plaintable tbody .Wt-tv-c {
    +    border-right: 0px;
    +    margin-right: 1px;
    +}
    +
    +/*
    + * WTreeView
    + */
    +.Wt-treeview {
    +    font-family: verdana,helvetica,tahoma,sans-serif;
    +    font-size: 9pt;
    +    cursor: default;
    +    white-space: nowrap;
    +    background: white;
    +    border: 1px solid #dcdfe8;
    +}
    +
    +.Wt-treeview .Wt-spacer {
    +    background: url(../../loading.png);
    +}
    +
    +/* header */
    +.Wt-treeview .Wt-headerdiv, .Wt-treeview .Wt-headerdiv .Wt-tv-rowc {
    +    background: #6880A0 url(title-gradient.png) repeat-x scroll 0 -20px;
    +    color: white;
    +}
    +
    +.Wt-treeview .Wt-headerdiv .background {
    +    background-color: #FFFFFF;
    +}
    +
    +.Wt-treeview .Wt-header .Wt-label {
    +    white-space: normal;
    +    text-overflow: ellipsis;
    +    overflow: hidden;
    +}
    +
    +.Wt-treeview .Wt-tv-rh:hover {
    +    background-color: #DDDDDD;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-none {
    +    background: url(sort-arrow-none.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-up {
    +    background: url(sort-arrow-up.gif) no-repeat 0 6px;
    +}
    +
    +.Wt-treeview .Wt-tv-sh-down {
    +    background: url(sort-arrow-down.gif) no-repeat 0 6px;
    +}
    +
    +/* nodes */
    +.Wt-treeview .Wt-tv-node {
    +    /* table-layout: fixed; could be done if we improve our CSS !*/
    +}
    +
    +.Wt-treeview .Wt-trunk {
    +}
    +
    +.Wt-treeview .Wt-end {
    +}
    +
    +.Wt-treeview .Wt-expand {
    +    width: 19px;
    +    height: 18px;
    +    background: url(nav-plus.png) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-collapse {
    +    width: 19px;
    +    height: 18px;
    +    background: url(nav-minus.png) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-noexpand {
    +    width: 19px;
    +    height: 18px;
    +}
    +
    +/* selection */
    +.Wt-treeview .Wt-selected {
    +    background-color: #999999;
    +    color: white;
    +}
    +
    +/* item drag & drop */
    +.Wt-treeview .Wt-drop-site {
    +    background-color: #EEEEEE;
    +    outline: 1px dotted black;
    +}
    +
    +/* borders */
    +.Wt-treeview .Wt-tv-br {
    +    border-right: 1px solid #dcdfe8;
    +}
    +
    +/* borders */
    +.Wt-treeview .Wt-tv-node .Wt-tv-row .Wt-tv-c {
    +    border-right: 0px;
    +    margin-right: 1px;
    +}
    +
    +/*
    + * WTreeView and WTableView default paging bar
    + */
    +.Wt-pagingbar {
    +    text-align: center;
    +    height: 25px;
    +    line-height: 25px;
    +}
    +
    +.Wt-pagingbar span {
    +    margin: 0px 4px;
    +}
    +
    +.Wt-pagingbar button {
    +    margin: 0px 4px;
    +    padding: 0px 3px;
    +    vertical-align: middle;
    +    line-height: 20px;
    +}
    +
    +/*
    + * For Ext::TableView
    + */
    +
    +table.x-grid3-row-table {
    +    table-layout: fixed;
    +}
    \ No newline at end of file
    diff --git a/wt-3.1.7a/resources/themes/polished/wt_ie.css b/wt-3.1.7a/resources/themes/polished/wt_ie.css
    new file mode 100644
    index 0000000..1a478b1
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/polished/wt_ie.css
    @@ -0,0 +1,78 @@
    +/* additional style rules for ie */
    +
    +/*
    + * WCalendar
    + */
    +
    +.Wt-cal td div {
    +    zoom: 1;
    +}
    +
    +/*
    + * WItemDelegate
    + */
    +.Wt-delegate-edit input {
    +    font-size: 9pt;
    +    padding-top: 0px;
    +    padding-bottom: 0px;
    +}
    +
    +/*
    + * WSuggestionPopup
    + */
    +.Wt-suggest .content {
    +    overflow-x: hidden;
    +}
    +
    +/*
    + * WTableView
    + */
    +.Wt-tableview div {
    +    white-space: nowrap
    +}
    +
    +.Wt-tabs {
    +    padding-bottom: 2px; /* should be 1px when we have close icons ... */
    +}
    +
    +.Wt-tabs li a, .Wt-tabs li button {
    +    color: white;
    +}
    +
    +.Wt-tabs li .citemselected a {
    +    color: black;
    +}
    +
    +.Wt-tabs .Wt-closeicon, .Wt-tabs span.citemselected .Wt-closeicon {
    +    background-position: right 1px;
    +    zoom: 1;
    +}
    +
    +.Wt-tabs .Wt-closeicon:hover, .Wt-tabs span.citemselected .Wt-closeicon:hover {
    +    background-position: right -12px;
    +}
    +
    +/*
    + * WTree
    + */
    +.Wt-tree div, .Wt-tree span {
    +    white-space: nowrap;   
    +}
    +
    +/*
    + * WTreeView
    + */
    +
    +/* IE ignores white-space on a table or td */
    +.Wt-treeview div, .Wt-treeview span {
    +    white-space: nowrap;
    +}
    +
    +/* nodes */
    +.Wt-treeview .Wt-expand {
    +    background: url(nav-plus.gif) no-repeat 0 center;
    +}
    +
    +.Wt-treeview .Wt-collapse {
    +    background: url(nav-minus.gif) no-repeat 0 center;
    +}
    diff --git a/wt-3.1.7a/resources/themes/polished/wt_ie6.css b/wt-3.1.7a/resources/themes/polished/wt_ie6.css
    new file mode 100644
    index 0000000..8c032c2
    --- /dev/null
    +++ b/wt-3.1.7a/resources/themes/polished/wt_ie6.css
    @@ -0,0 +1,19 @@
    +/* additional style rules for ie6 */
    +
    +/*
    + * Wt-outset
    + */
    +.Wt-outset {
    +    border: 1px solid black;
    +}
    +
    +.Wt-outset .Wt-x1, .Wt-outset .Wt-x1a, .Wt-outset .Wt-x2, .Wt-outset .Wt-x2a {
    +    background: transparent;
    +}
    +
    +/*
    + * WPanel
    + */
    +.Wt-panel {
    +    position: static;
    +}
    diff --git a/wt-3.1.7a/resources/tv-line-last.gif b/wt-3.1.7a/resources/tv-line-last.gif
    new file mode 100644
    index 0000000..736433a
    Binary files /dev/null and b/wt-3.1.7a/resources/tv-line-last.gif differ
    diff --git a/wt-3.1.7a/src/CMakeLists.txt b/wt-3.1.7a/src/CMakeLists.txt
    new file mode 100644
    index 0000000..9355bd1
    --- /dev/null
    +++ b/wt-3.1.7a/src/CMakeLists.txt
    @@ -0,0 +1,311 @@
    +SUBDIRS(web Wt)
    +
    +INCLUDE_DIRECTORIES(
    +  ${CMAKE_CURRENT_SOURCE_DIR}/web
    +  ${CMAKE_CURRENT_SOURCE_DIR}
    +  ${CMAKE_CURRENT_BINARY_DIR} # for WConfig.h
    +  ${BOOST_INCLUDE_DIRS}
    +  Wt/Dbo/backend/amalgamation # for sqlite3.h
    +)
    +
    +LINK_DIRECTORIES(${BOOST_LIB_DIRS})
    +
    +MACRO (FILE_TO_STRING infile outfile var)
    +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${outfile}
    +	           COMMAND ${CMAKE_COMMAND}
    +                   ARGS -Dinfile:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/${infile}
    +                        -Doutfile:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${outfile}
    +                        -Dvar:STRING=${var}
    +                        -P ${CMAKE_CURRENT_SOURCE_DIR}/filetostring.cmake
    +		   MAIN_DEPENDENCY
    +		        ${CMAKE_CURRENT_SOURCE_DIR}/${infile}
    +)
    +ENDMACRO (FILE_TO_STRING)
    +
    +FILE_TO_STRING(web/skeleton/Plain.html    Plain_html.C      Plain_html)
    +FILE_TO_STRING(web/skeleton/Hybrid.html   Hybrid_html.C     Hybrid_html)
    +FILE_TO_STRING(web/skeleton/Boot.html     Boot_html.C       Boot_html)
    +
    +IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
    +  FILE_TO_STRING(web/skeleton/Wt.js     Wt_js.C         Wt_js)
    +ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
    +  FILE_TO_STRING(web/skeleton/Wt.min.js     Wt_js.C         Wt_js)
    +ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
    +
    +FILE_TO_STRING(web/skeleton/CommAjax.js   CommAjax_js.C   CommAjax_js)
    +FILE_TO_STRING(web/skeleton/CommScript.js CommScript_js.C CommScript_js)
    +FILE_TO_STRING(web/skeleton/jquery.min.js JQuery_js.C     JQuery_js)
    +
    +FILE_TO_STRING(xml/wt.xml                 WtMessages_xml.C  WtMessages_xml)
    +
    +SET(libsources
    +Wt/SizeHandle.C
    +Wt/StdGridLayoutImpl.C
    +Wt/StdLayoutImpl.C
    +Wt/StdLayoutItemImpl.C
    +Wt/StdWidgetItemImpl.C
    +Wt/WAbstractArea.C
    +Wt/WAbstractItemDelegate.C
    +Wt/WAbstractItemModel.C
    +Wt/WAbstractItemView.C
    +Wt/WAbstractListModel.C
    +Wt/WAbstractProxyModel.C
    +Wt/WAbstractServer.C
    +Wt/WAbstractTableModel.C
    +Wt/WAbstractToggleButton.C
    +Wt/WAccordionLayout.C
    +Wt/WAggregateProxyModel.C
    +Wt/WAnchor.C
    +Wt/WApplication.C
    +Wt/WBatchEditProxyModel.C
    +Wt/WBoostAny.C
    +Wt/WBorder.C
    +Wt/WBorderLayout.C
    +Wt/WBoxLayout.C
    +Wt/WBreak.C
    +Wt/WBrush.C
    +Wt/WButtonGroup.C
    +Wt/WCalendar.C
    +Wt/WCanvasPaintDevice.C
    +Wt/WCheckBox.C
    +Wt/WCircleArea.C
    +Wt/WColor.C
    +Wt/WCombinedLocalizedStrings.C
    +Wt/WComboBox.C
    +Wt/WCompositeWidget.C
    +Wt/WContainerWidget.C
    +Wt/WCssDecorationStyle.C
    +Wt/WCssStyleSheet.C
    +Wt/WDate.C
    +Wt/WDatePicker.C
    +Wt/WDateTime.C
    +Wt/WDateValidator.C
    +Wt/WDefaultLayout.C
    +Wt/WDefaultLoadingIndicator.C
    +Wt/WDialog.C
    +Wt/WDoubleValidator.C
    +Wt/WEnvironment.C
    +Wt/WEvent.C
    +Wt/WFileResource.C
    +Wt/WFileUpload.C
    +Wt/WFitLayout.C
    +Wt/WFlashObject.C
    +Wt/WFont.C
    +Wt/WFormWidget.C
    +Wt/WGLWidget.C
    +Wt/WGoogleMap.C
    +Wt/WGridLayout.C
    +Wt/WGroupBox.C
    +Wt/WHBoxLayout.C
    +Wt/WHTML5Audio.C
    +Wt/WHTML5Media.C
    +Wt/WHTML5Video.C
    +Wt/WIconPair.C
    +Wt/WImage.C
    +Wt/WInPlaceEdit.C
    +Wt/WIntValidator.C
    +Wt/WInteractWidget.C
    +Wt/WItemDelegate.C
    +Wt/WItemSelectionModel.C
    +Wt/WJavaScript.C
    +Wt/WJavaScriptSlot.C
    +Wt/WLabel.C
    +Wt/WLayout.C
    +Wt/WLayoutItem.C
    +Wt/WLayoutItemImpl.C
    +Wt/WLength.C
    +Wt/WLengthValidator.C
    +Wt/WLineEdit.C
    +Wt/WLineF.C
    +Wt/WLoadingIndicator.C
    +Wt/WLocalizedStrings.C
    +Wt/WLogger.C
    +Wt/WMatrix4x4.C
    +Wt/WMemoryResource.C
    +Wt/WMenu.C
    +Wt/WMenuItem.C
    +Wt/WMessageBox.C
    +Wt/WMessageResourceBundle.C
    +Wt/WMessageResources.C
    +Wt/WModelIndex.C
    +Wt/WObject.C
    +Wt/WOverlayLoadingIndicator.C
    +Wt/WPaintDevice.C
    +Wt/WPaintedWidget.C
    +Wt/WPainter.C
    +Wt/WPainterPath.C
    +Wt/WPanel.C
    +Wt/WPen.C
    +Wt/WPoint.C
    +Wt/WPointF.C
    +Wt/WPolygonArea.C
    +Wt/WPopupMenu.C
    +Wt/WPopupMenuItem.C
    +Wt/WProgressBar.C
    +Wt/WPushButton.C
    +Wt/WRadioButton.C
    +Wt/WRectArea.C
    +Wt/WRectF.C
    +Wt/WRegExp.C
    +Wt/WRegExpValidator.C
    +Wt/WResource.C
    +Wt/WScrollArea.C
    +Wt/WScrollBar.C
    +Wt/WSelectionBox.C
    +Wt/WShadow.C
    +Wt/WSignal.C
    +Wt/WSlider.C
    +Wt/WSocketNotifier.C
    +Wt/WSortFilterProxyModel.C
    +Wt/WSpinBox.C
    +Wt/WSound.C
    +Wt/WStackedWidget.C
    +Wt/WStandardItem.C
    +Wt/WStandardItemModel.C
    +Wt/WStatelessSlot.C
    +Wt/WString.C
    +Wt/WSubMenuItem.C
    +Wt/WStringListModel.C
    +Wt/WStringUtil.C
    +Wt/WSuggestionPopup.C
    +Wt/WSvgImage.C
    +Wt/WTabWidget.C
    +Wt/WTable.C
    +Wt/WTableCell.C
    +Wt/WTableColumn.C
    +Wt/WTableRow.C
    +Wt/WTemplate.C
    +Wt/WTableView.C
    +Wt/WText.C
    +Wt/WTextArea.C
    +Wt/WTextEdit.C
    +Wt/WTime.C
    +Wt/WTimer.C
    +Wt/WTimerWidget.C
    +Wt/WTransform.C
    +Wt/WTree.C
    +Wt/WTreeNode.C
    +Wt/WTreeTable.C
    +Wt/WTreeTableNode.C
    +Wt/WTreeView.C
    +Wt/WValidationStatus.C
    +Wt/WValidator.C
    +Wt/WVBoxLayout.C
    +Wt/WVectorImage.C
    +Wt/WVmlImage.C
    +Wt/WViewWidget.C
    +Wt/WVirtualImage.C
    +Wt/WWebWidget.C
    +Wt/WWidget.C
    +Wt/WWidgetItem.C
    +Wt/Http/Client.C
    +Wt/Http/Request.C
    +Wt/Http/Response.C
    +Wt/Http/ResponseContinuation.C
    +Wt/Test/WTestEnvironment.C
    +web/CgiParser.C
    +web/Configuration.C
    +web/DomElement.C
    +web/EscapeOStream.C
    +web/FileServe.C
    +web/SoundManager.C
    +web/Utils.C
    +web/XSSFilter.C
    +web/XSSUtils.C
    +web/WebRequest.C
    +web/WebStream.C
    +web/WebSession.C
    +web/WebSocketMessage.C
    +web/WebRenderer.C
    +web/WebController.C
    +web/WtException.C
    +web/WtRandom.C
    +web/TimeUtil.C
    +web/random_device.cpp
    +Plain_html.C
    +Boot_html.C
    +Hybrid_html.C
    +Wt_js.C
    +WtMessages_xml.C
    +CommAjax_js.C
    +CommScript_js.C
    +JQuery_js.C
    +Wt/Chart/WAbstractChart.C
    +Wt/Chart/WAxis.C
    +Wt/Chart/WDataSeries.C
    +Wt/Chart/WPieChart.C
    +Wt/Chart/WCartesianChart.C
    +Wt/Chart/WChart2DRenderer.C
    +Wt/Chart/WChartPalette.C
    +Wt/Chart/WStandardPalette.C
    +)
    +
    +IF (MULTI_THREADED_BUILD)
    +  SET(libsources ${libsources} web/SocketNotifier.C)
    +ENDIF(MULTI_THREADED_BUILD)
    +
    +IF(HAVE_HARU)
    +  SET(libsources ${libsources} Wt/WPdfImage.C)
    +ENDIF(HAVE_HARU)
    +
    +IF(HAVE_GM)
    +  SET(libsources ${libsources} Wt/WRasterImage.C)
    +ENDIF(HAVE_GM)
    +
    +ADD_LIBRARY(wt ${libsources})
    +TARGET_LINK_LIBRARIES(wt ${BOOST_WT_LIBRARIES})
    +
    +IF(HAVE_HARU)
    +  TARGET_LINK_LIBRARIES(wt ${HARU_LIBRARIES})
    +  INCLUDE_DIRECTORIES(${HARU_INCLUDE_DIRS})
    +ELSE(HAVE_HARU)
    +  MESSAGE("** Disabling PDF support (WPdfImage): requires libharu.")
    +  IF(ENABLE_HARU)
    +    MESSAGE("   Indicate the location of your haru library using -DHARU_PREFIX=...")
    +  ENDIF(ENABLE_HARU)
    +ENDIF(HAVE_HARU)
    +
    +IF(HAVE_GM)
    +  TARGET_LINK_LIBRARIES(wt ${GM_LIBRARIES})
    +  INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS})
    +  ADD_DEFINITIONS(-DHAVE_RASTER_IMAGE)
    +ELSE(HAVE_GM)
    +  MESSAGE("** Disabling raster image support (WRasterImage): requires graphicsmagick.")
    +  IF(ENABLE_GM)
    +    MESSAGE("   Indicate the location of your graphicsmagick library using -DGM_PREFIX=...")
    +  ENDIF(ENABLE_GM)
    +ENDIF(HAVE_GM)
    +
    +IF(MULTI_THREADED_BUILD)
    +  TARGET_LINK_LIBRARIES(wt ${CMAKE_THREAD_LIBS_INIT})
    +ENDIF(MULTI_THREADED_BUILD)
    +
    +INSTALL(TARGETS wt
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +CONFIGURE_FILE(
    +  ${WT_SOURCE_DIR}/WtInstall.cmake
    +  ${WT_BINARY_DIR}/WtInstall.cmake
    +)
    +
    +SET_TARGET_PROPERTIES(
    +  wt
    +PROPERTIES
    +  POST_INSTALL_SCRIPT ${WT_BINARY_DIR}/WtInstall.cmake
    +  VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +  SOVERSION ${WT_SOVERSION}
    +  DEBUG_POSTFIX "d"
    +)
    +
    +IF(WIN32)
    +  TARGET_LINK_LIBRARIES(wt ws2_32)
    +ENDIF(WIN32)
    +
    +IF(MSVC)
    +  SET_TARGET_PROPERTIES(wt PROPERTIES COMPILE_FLAGS "${BUILD_PARALLEL} /wd4251 /wd4275 /wd4355 /wd4800 /wd4996 /wd4101 /wd4267")
    +  TARGET_LINK_LIBRARIES(wt winmm)
    +ENDIF(MSVC)
    +
    +SUBDIRS(isapi fcgi http)
    diff --git a/wt-3.1.7a/src/Wt/CMakeLists.txt b/wt-3.1.7a/src/Wt/CMakeLists.txt
    new file mode 100644
    index 0000000..7c7bbfb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/CMakeLists.txt
    @@ -0,0 +1,16 @@
    +SUBDIRS(Chart Http Test)
    +
    +SUBDIRS(Dbo)
    +
    +IF(ENABLE_EXT)
    +  SUBDIRS(Ext)
    +ENDIF(ENABLE_EXT)
    +
    +INSTALL_FILES(/include/Wt "^W.*[^C~]$")
    +INSTALL_FILES(/include/Wt "SyncLock")
    +#INSTALL(
    +#  FILES
    +#    "^W.*[^C~]$"
    +#    ${WCONFIG_H_PATH}
    +#  DESTINATION include
    +#)
    diff --git a/wt-3.1.7a/src/Wt/Chart/CMakeLists.txt b/wt-3.1.7a/src/Wt/Chart/CMakeLists.txt
    new file mode 100644
    index 0000000..d6607e3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/CMakeLists.txt
    @@ -0,0 +1 @@
    +INSTALL_FILES(/include/Wt/Chart "^W.*[^C~]$")
    diff --git a/wt-3.1.7a/src/Wt/Chart/WAbstractChart b/wt-3.1.7a/src/Wt/Chart/WAbstractChart
    new file mode 100644
    index 0000000..3d0dc25
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WAbstractChart
    @@ -0,0 +1,257 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WABSTRACT_CHART_H_
    +#define CHART_WABSTRACT_CHART_H_
    +
    +#include <Wt/WBrush>
    +#include <Wt/WFont>
    +#include <Wt/WPaintedWidget>
    +#include <Wt/WRectF>
    +
    +namespace Wt {
    +
    +  class WAbstractItemModel;
    +  class WModelIndex;
    +  class WPainter;
    +  class WRectF;
    +
    +  /*! \brief Namespace for the \ref charts
    +   */
    +  namespace Chart {
    +
    +    class WChartPalette;
    +
    +/*! \defgroup charts Charts
    + *  \brief A charting library implemented using the %Wt \ref painting
    + *
    + * The charting library contains two main chart widget classes,
    + * WCartesianChart and WPieChart, and a number of utility classes
    + * for drawing simple to complex charts.
    + */
    +
    +/*! \class WAbstractChart Wt/Chart/WAbstractChart Wt/Chart/WAbstractChart
    + *  \brief Abstract base class for MVC-based charts.
    + *
    + * This is an abstract class and should not be used directly.
    + *
    + * As an abstract base for MVC-based charts, this class manages the
    + * model setModel() and provides virtual methods that listen to
    + * model changes. In addition, it gives access to generic chart
    + * properties such as the title setTitle() and title font
    + * setTitleFont(), the chart palette setPalette(), plot area
    + * padding setPlotAreaPadding(), and the background fill color
    + * setBackground().
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * \sa WCartesianChart, WPieChart
    + *
    + * \ingroup charts modelview
    + */
    +class WT_API WAbstractChart : public WPaintedWidget
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WAbstractChart();
    +
    +  /*! \brief Set the model.
    +   *
    +   * The model is used by the chart to get its data. Ownership of the
    +   * model is not transferred, and if a previous model was set it is
    +   * not deleted.
    +   *
    +   * The default model is a 0 model.
    +   *
    +   * \sa model()
    +   */
    +  void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Returns the model.
    +   *
    +   * \sa setModel(WAbstractItemModel *)
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Sets a background for the chart.
    +   *
    +   * Set the background color for the main plot area.
    +   *
    +   * The default is a completely transparent background.
    +   *
    +   * \sa background()
    +   */
    +  void setBackground(const WBrush& background);
    +
    +  /*! \brief Returns the background of the chart.
    +   *
    +   * \sa setBackground(const WBrush&)
    +   */
    +  const WBrush& background() const { return background_; }
    +
    +  /*! \brief Set a palette for the chart.
    +   *
    +   * A palette is used to provide the style information to render the
    +   * chart series. Ownership of the palette is transferred to the chart.
    +   *
    +   * The default palette is dependent on the chart type.
    +   *
    +   * \sa palette()
    +   */
    +  void setPalette(WChartPalette *palette);
    +
    +  /*! \brief Returns the palette for the chart.
    +   *
    +   * \sa setPalette(WChartPalette *palette)
    +   */
    +  WChartPalette *palette() const { return palette_; }
    +
    +  /*! \brief Set an internal margin for the main plot area.
    +   *
    +   * This configures the area (in pixels) around the plot area that is
    +   * available for axes, labels, and titles. You need to set this
    +   * appropriately so that labels fit inside these margins.
    +   *
    +   * The default is dependent on the chart type.
    +   */
    +  void setPlotAreaPadding(int padding, WFlags<Side> sides = All);
    +
    +  /*! \brief Returns the internal margin for the main plot area.
    +   *
    +   * \sa setPlotAreaPadding(int, WFlags<Side>)
    +   */
    +  int plotAreaPadding(Side side) const;
    +
    +  /*! \brief Set a chart title.
    +   *
    +   * The title is displayed on top of the chart, using the titleFont().
    +   *
    +   * The default title is an empty title ("").
    +   *
    +   * \sa title()
    +   */
    +  void setTitle(const WString& title);
    +
    +  /*! \brief Return the chart title.
    +   *
    +   * \sa title()
    +   */
    +  const WString& title() const { return title_; }
    +
    +  /*! \brief Set the font for the chart title.
    +   *
    +   * Changes the font for the chart title.
    +   *
    +   * The default title font is a 15 point Sans Serif font.
    +   *
    +   * \sa titleFont(), setTitle(const WString&)
    +   */
    +  void setTitleFont(const WFont& titleFont);
    +
    +  /*! \brief Returns the font for the chart title.
    +   *
    +   * \sa setTitleFont(const WFont&)
    +   */
    +  const WFont& titleFont() const { return titleFont_; }
    +
    +  void setAxisTitleFont(const WFont& titleFont);
    +  const WFont& axisTitleFont() const { return titleFont_; }
    +
    +  /*! \brief Paint the chart in a rectangle of the given painter.
    +   *
    +   * Paints the chart inside the <i>painter</i>, in the area indicated
    +   * by <i>rectangle</i>.  When <i>rectangle</i> is a null rectangle,
    +   * the entire painter \link WPainter::window() window\endlink is
    +   * used.
    +   */
    +  virtual void paint(WPainter& painter, const WRectF& rectangle = WRectF())
    +    const = 0;
    +
    +protected:
    +  WAbstractChart(WContainerWidget *parent);
    +
    +private:
    +  WAbstractItemModel *model_;
    +  WBrush              background_;
    +  WChartPalette      *palette_;
    +  int                 padding_[4];
    +  WString             title_;
    +  WFont               titleFont_;
    +  WFont               axisTitleFont_;
    +
    +  // connections with the current model, used to disconnect from a model
    +  // when the model changes.
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  /*! \brief Method called whenever the entire model was changed.
    +   *
    +   * \sa setModel(WAbstractItemModel *)
    +   */
    +  virtual void modelChanged();
    +
    +  /*! \brief Method called whenever the entire model was reset.
    +   *
    +   * Bound to the WAbstractItemModel::modelReset() and
    +   * WAbstractItemModel::layoutChanged() signals.
    +   */
    +  virtual void modelReset();
    +
    +  /*! \brief Method called when colums have been inserted in the model.
    +   *
    +   * \sa WAbstractItemModel::columnsInserted
    +   */
    +  virtual void modelColumnsInserted(const WModelIndex& parent,
    +				    int start, int end) = 0;
    +
    +  /*! \brief Method called when colums have been removed from the model.
    +   *
    +   * \sa WAbstractItemModel::columnsRemoved
    +   */
    +  virtual void modelColumnsRemoved(const WModelIndex& parent,
    +				   int start, int end) = 0;
    +
    +  /*! \brief Method called when rows have been inserted from the model.
    +   *
    +   * \sa WAbstractItemModel::rowsInserted
    +   */
    +  virtual void modelRowsInserted(const WModelIndex& parent,
    +				 int start, int end) = 0;
    +
    +  /*! \brief Method called when rows have been removed from the model.
    +   *
    +   * \sa WAbstractItemModel::rowsRemoved
    +   */
    +  virtual void modelRowsRemoved(const WModelIndex& parent,
    +				int start, int end) = 0;
    +
    +  /*! \brief Method called when data has been changed in the model.
    +   *
    +   * \sa WAbstractItemModel::dataChanged
    +   */
    +  virtual void modelDataChanged(const WModelIndex& topLeft,
    +				const WModelIndex& bottomRight) = 0;
    +
    +  template <typename T>
    +  void set(T& m, const T& v);
    +};
    +
    +template <typename T>
    +void WAbstractChart::set(T& m, const T& v)
    +{
    +  if (m != v) {
    +    m = v;
    +    update();
    +  }
    +}
    +
    +
    +  }
    +}
    +
    +#endif // CHART_WABSTRACT_CHART_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WAbstractChart.C b/wt-3.1.7a/src/Wt/Chart/WAbstractChart.C
    new file mode 100644
    index 0000000..7ef88b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WAbstractChart.C
    @@ -0,0 +1,128 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/Chart/WAbstractChart"
    +#include "Wt/Chart/WChartPalette"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WAbstractChart::WAbstractChart(WContainerWidget *parent)
    +  : WPaintedWidget(parent),
    +    model_(0),
    +    background_(white),
    +    palette_(0)
    +{
    +  titleFont_.setFamily(WFont::SansSerif);
    +  titleFont_.setSize(WFont::FixedSize, WLength(15, WLength::Point));
    +
    +  setPlotAreaPadding(5, Left | Right);
    +  setPlotAreaPadding(5, Top | Bottom);
    +}
    +
    +WAbstractChart::~WAbstractChart()
    +{
    +  delete palette_;
    +}
    +
    +void WAbstractChart::setPalette(WChartPalette *palette)
    +{
    +  delete palette_;
    +  palette_ = palette;
    +
    +  update();
    +}
    +
    +void WAbstractChart::setPlotAreaPadding(int padding, WFlags<Side> sides)
    +{
    +  if (sides & Top)
    +    padding_[0] = padding;
    +  if (sides & Right)
    +    padding_[1] = padding;
    +  if (sides & Bottom)
    +    padding_[2] = padding;
    +  if (sides & Left)
    +    padding_[3] = padding;
    +}
    +
    +int WAbstractChart::plotAreaPadding(Side side) const
    +{
    +  switch (side) {
    +  case Top:
    +    return padding_[0];
    +  case Right:
    +    return padding_[1];
    +  case Bottom:
    +    return padding_[2];
    +  case Left:
    +    return padding_[3];
    +  default:
    +    throw WtException("WAbstractChart::plotAreaPadding(Side) with "
    +		      "invalid side.");
    +  }
    +}
    +
    +void WAbstractChart::setBackground(const WBrush& background)
    +{
    +  set(background_, background);
    +}
    +
    +void WAbstractChart::setTitle(const WString& title)
    +{
    +  set(title_, title);
    +}
    +
    +void WAbstractChart::setTitleFont(const WFont& titleFont)
    +{
    +  set(titleFont_, titleFont);
    +}
    +
    +void WAbstractChart::setAxisTitleFont(const WFont& titleFont)
    +{
    +  set(axisTitleFont_, titleFont);
    +}
    +
    +void WAbstractChart::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +
    +  /* connect slots to new model */
    +  modelConnections_.push_back(model_->columnsInserted().connect
    +		      (this, &WAbstractChart::modelColumnsInserted));
    +  modelConnections_.push_back(model_->columnsRemoved().connect
    +		      (this, &WAbstractChart::modelColumnsRemoved));
    +  modelConnections_.push_back(model_->rowsInserted().connect
    +		      (this, &WAbstractChart::modelRowsInserted));
    +  modelConnections_.push_back(model_->rowsRemoved().connect
    +		      (this, &WAbstractChart::modelRowsRemoved));
    +  modelConnections_.push_back(model_->dataChanged().connect
    +		      (this, &WAbstractChart::modelDataChanged));
    +  modelConnections_.push_back(model_->layoutChanged().connect
    +		      (this, &WAbstractChart::modelReset));
    +  modelConnections_.push_back(model_->modelReset().connect
    +		      (this, &WAbstractChart::modelReset));
    +
    +  modelChanged();
    +}
    +
    +void WAbstractChart::modelChanged()
    +{ }
    +
    +void WAbstractChart::modelReset()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WAxis b/wt-3.1.7a/src/Wt/Chart/WAxis
    new file mode 100644
    index 0000000..f6aa37f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WAxis
    @@ -0,0 +1,560 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WAXIS_H_
    +#define CHART_WAXIS_H_
    +
    +#include <Wt/WFont>
    +#include <Wt/WPen>
    +#include <Wt/WString>
    +#include <Wt/WDateTime>
    +#include <boost/any.hpp>
    +#include <cfloat>
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +class WCartesianChart;
    +class WChart2DRenderer;
    +
    +/*! \brief Enumeration that indicates a chart axis.
    + *
    + * \sa WCartesianChart::axis(Axis)
    + *
    + * \ingroup charts
    + */
    +enum Axis {
    +  XAxis = 0,            //!< X axis.
    +  YAxis = 1,            //!< First Y axis (== Y1Axis).
    +  Y1Axis = YAxis,       //!< First Y axis (== YAxis).
    +  Y2Axis = 2,           //!< Second Y Axis.
    +  OrdinateAxis = YAxis  //!< Ordinate axis (== Y1Axis for a 2D plot).
    +  /* Future:
    +   ,XAxis_3D = 0,
    +    ZAxis_3D = 1, // = Y
    +    YAxis_3D = 2
    +   */
    +};
    +
    +/*! \brief Enumeration that indicates a logical location for an axis.
    + *
    + * The location is dependent on the values of the other axis.
    + *
    + * \sa WAxis::setLocation(AxisValue)
    + *
    + * \ingroup charts
    + */
    +enum AxisValue {
    +  MinimumValue = 0x1,  //!< At the minimum value.
    +  MaximumValue = 0x2,  //!< At the maximum value.
    +  ZeroValue = 0x4      //!< At the zero value (if displayed).
    +};
    +
    +// for < 3.0.1 compatibility
    +typedef AxisValue AxisLocation;
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(AxisValue)
    +
    +/*! \brief Enumeration that indicates a scale for an axis.
    + *
    + * The scale determines how values are mapped onto an axis.
    + *
    + * \sa WAxis::setScale(AxisScale scale)
    + *
    + * \ingroup charts
    + */
    +enum AxisScale {
    +  /*! A category scale is set as the scale for the X axis in a \link
    +   * Chart::CategoryChart CategoryChart\endlink, and is only
    +   * applicable there. It lists all values, evenly spaced, and
    +   * consecutively in the order of the model.
    +   */
    +  CategoryScale = 0,
    +
    +  /*! A linear scale is the default scale for all axes, except for the
    +   * X scale in a CategoryScale. It maps values in a linear
    +   * fashion on the axis.
    +   */
    +  LinearScale = 1,
    +
    +  /*! A logarithmic scale is useful for plotting values with of a
    +   * large range, but only works for positive values.
    +   */
    +  LogScale = 2,
    +
    +  /*! A date scale is a special linear scale, which is useful for the
    +   * X axis in a ScatterPlot, when the X series contain dates (of type
    +   * WDate).
    +   */
    +  DateScale = 3,
    +
    +  /*! A datetime scale is a special linear scale, which is useful for the
    +   * X axis in a ScatterPlot, when the X series contain timedates (of type
    +   * WDateTime).
    +   */
    +  DateTimeScale = 4
    +};
    +
    +/*! \class WAxis Wt/Chart/WAxis Wt/Chart/WAxis
    + *  \brief Class which represents an axis of a cartesian chart.
    + *
    + * A cartesian chart has two or three axes: an X axis (\link
    + * Chart::XAxis XAxis\endlink), a Y axis (\link Chart::YAxis
    + * YAxis\endlink) and optionally a second Y axis (\link Chart::Y2Axis
    + * Y2Axis\endlink). Each of the up to three axes in a cartesian
    + * chart has a unique id() that identifies which of these three axes
    + * it is in the enclosing chart().
    + *
    + * Use setVisible(bool) to change the visibility of an axis,
    + * setGridLinesEnabled(bool) to show grid lines for an axis. The pen
    + * styles for rendering the axis or grid lines may be changed using
    + * setPen() and setGridLinesPen(). A margin between the axis and the
    + * main plot area may be configured using setMargin().
    + *
    + * By default, the axis will automatically adjust its range so that
    + * all data will be visible. You may manually specify a range using
    + * setMinimum(), setMaximum or setRange(). The interval between labels
    + * is by default automatically adjusted depending on the axis length
    + * and the range, but may be manually specified using
    + * setLabelInterval().
    + *
    + * The axis has support for being "broken", to support displaying data
    + * with a few outliers which would otherwise swamp the chart. This is
    + * not done automatically, but instead you need to use setBreak() to
    + * specify the value range that needs to be omitted from the axis. The
    + * omission is rendered in the axis and in bars that cross the break.
    + *
    + * The labels are shown using a "%.4g" format string for numbers, and
    + * "dd/MM/yyyy" (for \link Chart::DateScale DateScale\endlink). The
    + * format may be customized using setLabelFormat(). The angle of the
    + * label text may be changed using setLabelAngle(double). By default,
    + * all labels are printed horizontally.
    + * 
    + * \sa WCartesianChart
    + *
    + * \ingroup charts
    + */
    +class WT_API WAxis
    +{
    +public:
    +  /*! \brief Constant which indicates automatic minimum calculation.
    +   *
    +   * \sa setMinimum()
    +   */
    +  static const double AUTO_MINIMUM;
    +
    +  /*! \brief Constant which indicates automatic maximum calculation
    +   *
    +   * \sa setMaximum()
    +   */
    +  static const double AUTO_MAXIMUM;
    +
    +  /*! \brief Returns the axis id.
    +   *
    +   * \sa chart(), WCartesianChart::axis(Axis)
    +   */
    +  Axis id() const { return axis_; }
    +
    +  /*! \brief Sets whether this axis is visible.
    +   *
    +   * Changes whether the axis is displayed, including ticks and
    +   * labels. The rendering of the grid lines is controlled seperately
    +   * by setGridLinesEnabled(bool).
    +   *
    +   * The default value is true for the X axis and first Y axis, but false
    +   * for the second Y axis.
    +   *
    +   * \sa setGridLinesEnabled(bool).
    +   */
    +  void setVisible(bool visible);
    +
    +  /*! \brief Returns whether this axis is visible.
    +   *
    +   * \sa setVisible(bool)
    +   */
    +  bool isVisible() const { return visible_; }
    +
    +  /*! \brief Sets the axis location.
    +   *
    +   * Configures the location of the axis, relative to values on the
    +   * other values (i.e. Y values for the X axis, and X values for the
    +   * Y axis).
    +   *
    +   * The default value is Chart::MinimumValue.
    +   *
    +   * \sa location()
    +   */
    +  void setLocation(AxisValue value);
    +
    +  /*! \brief Returns the axis location.
    +   *
    +   * \sa setLocation(AxisValue)
    +   */
    +  AxisValue location() const { return location_; }
    +
    +  /*! \brief Sets the scale of the axis.
    +   *
    +   * For the X scale in a \link Chart::CategoryChart
    +   * CategoryChart\endlink, the scale should be left unchanged to
    +   * \link Chart::CategoryScale CategoryScale\endlink.
    +   *
    +   * For all other axes, the default value is \link Chart::LinearScale
    +   * LinearScale\endlink, but this may be changed to \link
    +   * Chart::LogScale LogScale\endlink or \link Chart::DateScale
    +   * DateScale\endlink. \link Chart::DateScale DateScale\endlink is
    +   * only useful for the X axis in a ScatterPlot which contains WDate
    +   * values.
    +   *
    +   * \sa scale()
    +   */
    +  void setScale(AxisScale scale);
    +
    +  /*! \brief Returns the scale of the axis.
    +   *
    +   * \sa setScale(AxisScale)
    +   */
    +  AxisScale scale() const { return scale_; }
    +
    +  /*! \brief Sets the minimum value displayed on the axis.
    +   *
    +   * Specify the minimum value to be displayed on the axis. By
    +   * default, the minimum and maximum values are determined
    +   * automatically so that all the data can be displayed.
    +   *
    +   * \sa minimum(), setMaximum(double)
    +   */
    +  void setMinimum(double minimum);
    +
    +  /*! \brief Returns the minimum value displayed on the axis.
    +   *
    +   * This returned the minimum value that was set using setMinimum(),
    +   * or otherwise the automatically calculated minimum.
    +   *
    +   * \sa maximum(), setMinimum(double), setAutoLimits()
    +   */
    +  double minimum() const;
    +
    +  /*! \brief Sets the maximum value for the axis displayed on the axis.
    +   *
    +   * Specify the maximum value to be displayed on the axis. By
    +   * default, the minimum and maximum values are determined
    +   * automatically so that all the data can be displayed.
    +   *
    +   * \sa minimum(), setMinimum(double)
    +   */
    +  void setMaximum(double maximum);
    +
    +  /*! \brief Returns the maximum value displayed on the axis.
    +   *
    +   * This returned the maximum value that was set using setMaximum(),
    +   * or otherwise the automatically calculated maximum.
    +   *
    +   * \sa minimum(), setMaximum(double)
    +   */
    +  double maximum() const;
    +
    +  /*! \brief Sets the axis range (minimum and maximum values) manually.
    +   *
    +   * Specifies both minimum and maximum value for the axis.
    +   * This automatically disables automatic range calculation.
    +   *
    +   * \sa setMinimum(double), setMaximum(double)
    +   */
    +  void setRange(double minimum, double maximum);
    +
    +  /*! \brief Let the minimum and/or maximum be calculated from the
    +   *         data.
    +   *
    +   * Using this method, you can indicate that you want to have
    +   * automatic limits, rather than limits set manually using
    +   * setMinimum() or setMaximum().
    +   *
    +   * \p locations can be Chart::MinimumValue and/or Chart::MaximumValue.
    +   *
    +   * The default value is Chart::MinimumValue | Chart::MaximumValue.
    +   */
    +  void setAutoLimits(WFlags<AxisValue> locations);
    +
    +  /*! \brief Returns the limits that are calculated automatically.
    +   *
    +   * This returns the limits (Chart::MinimumValue and/or
    +   * Chart::MaximumValue) that are calculated automatically from the
    +   * data, rather than being specified manually using setMinimum()
    +   * and/or setMaximum().
    +   *
    +   * \sa setAutoLimits()
    +   */
    +  WFlags<AxisValue> autoLimits() const;
    +
    +  /*! \brief Specify a range that needs to be omitted from the axis.
    +   *
    +   * This is useful to display data with a few outliers which would
    +   * otherwise swamp the chart. This is not done automatically, but
    +   * instead you need to use setBreak() to specify the value range
    +   * that needs to be omitted from the axis. The omission is rendered
    +   * in the axis and in BarSeries that cross the break.
    +   */
    +  void setBreak(double minimum, double maximum);
    +
    +  /*! \brief Sets the label interval.
    +   *
    +   * Specifies the interval for displaying labels (and ticks) on the axis.
    +   * The default value is 0.0, and indicates that the interval should be
    +   * computed automatically.
    +   *
    +   * \sa setLabelFormat(const WString&)
    +   */
    +  void setLabelInterval(double labelInterval);
    +
    +  /*! \brief Returns the label interval.
    +   *
    +   * \sa setLabelInterval(double)
    +   */
    +  double labelInterval() const { return labelInterval_; }
    +
    +  /*! \brief Sets the label format.
    +   *
    +   * Sets a format string which is used to format values, both for the
    +   * axis labels as well as data series values (see
    +   * WDataSeries::setLabelsEnabled(Axis, bool)).
    +   *
    +   * For an axis with a \link Chart::LinearScale LinearScale\endlink
    +   * or \link Chart::LogScale LogScale\endlink scale, the format string
    +   * must be a format string that is accepted by snprintf() and which
    +   * formats one double. If the format string is an empty string,
    +   * "%.4g" is used.
    +   *
    +   * For an axis with a \link Chart::DateScale DateScale\endlink
    +   * scale, the format string must be a format string accepted by
    +   * WDate::toString(const WString&), to format a date. If the format
    +   * string is an empty string, "dd/MM/yyyy", "MMM yy" or "yyyy" is
    +   * used depending on the situation.
    +   *
    +   * The default value is an empty string ("").
    +   *
    +   * \sa labelFormat()
    +   */
    +  void setLabelFormat(const WString& format);
    +
    +  /*! \brief Returns the label format string.
    +   *
    +   * \sa setLabelFormat(const WString&)
    +   */
    +  const WString& labelFormat() const { return labelFormat_; }
    +
    +  /*! \brief Sets the label angle.
    +   *
    +   * Sets the angle used for displaying the labels (in degrees). A 0 angle
    +   * corresponds to horizontal text. Note that this option is only supported
    +   * by the InlineSvgVml renderers, but not by HtmlCanvas.
    +   *
    +   * The default value is 0.0 ("horizontal text").
    +   *
    +   * \sa labelAngle()
    +   */
    +  void setLabelAngle(double angle);
    +
    +  /*! \brief Returns the label angle.
    +   *
    +   * \sa setLabelAngle(double)
    +   */
    +  double labelAngle() const { return labelAngle_; }
    +
    +  /*! \brief Sets whether gridlines are displayed for this axis.
    +   *
    +   * When <i>enabled</i>, gird lines are drawn for each tick on this axis,
    +   * using the gridLinesPen().
    +   *
    +   * Unlike all other visual aspects of an axis, rendering of the
    +   * gridlines is not controlled by setDisplayEnabled(bool).
    +   *
    +   * \sa setGridLinesPen(const WPen&), isGridLinesEnabled()
    +   */
    +  void setGridLinesEnabled(bool enabled);
    +
    +  /*! \brief Returns whether gridlines are displayed for this axis.
    +   *
    +   * \sa setGridLinesEnabled(bool)
    +   */
    +  bool isGridLinesEnabled() const { return gridLines_; }
    +
    +  /*! \brief Changes the pen used for rendering the axis and ticks.
    +   *
    +   * The default value is a black pen of 0 width.
    +   *
    +   * \sa setGridLinesPen(const WPen&).
    +   */
    +  void setPen(const WPen& pen);
    +
    +  /*! \brief Returns the pen used for rendering the axis and ticks.
    +   *
    +   * \sa setPen(const WPen&)
    +   */
    +  const WPen& pen() const { return pen_; }
    +
    +  /*! \brief Changes the pen used for rendering the grid lines.
    +   *
    +   * The default value is a gray pen of 0 width.
    +   *
    +   * \sa setPen(const WPen&), gridLinesPen().
    +   */
    +  void setGridLinesPen(const WPen& pen);
    +
    +  /*! \brief Returns the pen used for rendering the grid lines.
    +   *
    +   * \sa setGridLinesPen(const WPen&)
    +   */
    +  const WPen& gridLinesPen() const { return gridLinesPen_; }
    +
    +  /*! \brief Sets the margin between the axis and the plot area.
    +   *
    +   * The margin is defined in pixels.
    +   *
    +   * The default value is 0.
    +   *
    +   * \sa margin()
    +   */
    +  void setMargin(int pixels);
    +
    +  /*! \brief Returns the margin between the axis and the plot area.
    +   *
    +   * \sa setMargin(int)
    +   */
    +  int margin() const { return margin_; }
    +
    +  /*! \brief Sets the axis title.
    +   *
    +   * The default title is empty.
    +   *
    +   * \sa title()
    +   */
    +  void setTitle(const WString& title);
    +
    +  /*! \brief Returns the axis title.
    +   *
    +   * \sa setTitle()
    +   */
    +  const WString& title() const { return title_; }
    +
    +  /*! \brief Sets the axis title font.
    +   *
    +   * The default title font is a 12 point Sans Serif font.
    +   *
    +   * \sa titleFont()
    +   */
    +  void setTitleFont(const WFont& titleFont);
    +
    +  /*! \brief Returns the axis title font.
    +   *
    +   * \sa setTitleFont()
    +   */
    +  const WFont& titleFont() const { return titleFont_; }
    +
    +  /*! \brief Sets the axis label font.
    +   *
    +   * The default label font is a 10 point Sans Serif font.
    +   *
    +   * \sa labelFont()
    +   */
    +  void setLabelFont(const WFont& labelFont);
    +
    +  /*! \brief Returns the axis label font.
    +   *
    +   * \sa setLabelFont()
    +   */
    +  const WFont& labelFont() const { return labelFont_; }
    +
    +  WString label(double u) const;
    +
    +  /*! \brief Returns the chart to which this axis belongs.
    +   *
    +   * \sa WCartesianChart::axis()
    +   */
    +  WCartesianChart *chart() const { return chart_; }
    +
    +  int segmentCount() const { return (int)segments_.size(); }
    +
    +private:
    +  WCartesianChart *chart_;
    +  Axis             axis_;
    +  bool             visible_;
    +  AxisValue        location_;
    +  AxisScale        scale_;
    +  double           labelInterval_;
    +  WString          labelFormat_;
    +  bool             gridLines_;
    +  WPen             pen_, gridLinesPen_;
    +  int              margin_;
    +  double           labelAngle_;
    +  WString          title_;
    +  WFont            titleFont_, labelFont_;
    +
    +  struct Segment {
    +    double minimum, maximum;
    +
    +    mutable double renderMinimum, renderMaximum, renderLength, renderStart;
    +
    +    Segment();
    +  };
    +
    +  std::vector<Segment> segments_;
    +
    +  mutable double renderInterval_;
    +
    +  WAxis();
    +  void init(WCartesianChart *chart, Axis axis);
    +  void update();
    +
    +  template <typename T>
    +  bool set(T& m, const T& v);
    +
    +  void prepareRender(WChart2DRenderer& renderer) const;
    +  void computeRange(WChart2DRenderer& renderer, const Segment& segment) const;
    +  void setOtherAxisLocation(AxisValue otherLocation) const;
    +
    +  struct TickLabel {
    +    enum TickLength { Zero, Short, Long };
    +
    +    double u;
    +    TickLength tickLength;
    +    WString    label;
    +
    +    TickLabel(double v, TickLength length, const WString& l = WString());
    +  };
    +
    +  void getLabelTicks(WChart2DRenderer& renderer, std::vector<TickLabel>& ticks,
    +		     int segment) const;
    +
    +  double getValue(const boost::any& v) const;
    +  static double getDateValue(const boost::any& value);
    +
    +  double calcAutoNumLabels(const Segment& s) const;
    +
    +  double mapFromDevice(double d) const;
    +  double mapToDevice(const boost::any& value, int segment = 0) const;
    +  double mapToDevice(double value, int segment = 0) const;
    +
    +  long getDateNumber(Wt::WDateTime dt) const;
    +
    +  friend class WCartesianChart;
    +  friend class WChart2DRenderer;
    +};
    +
    +template <typename T>
    +bool WAxis::set(T& m, const T& v)
    +{
    +  if (m != v) {
    +    m = v;
    +    update();
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +  }
    +}
    +
    +#endif // CHART_WAXIS_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WAxis.C b/wt-3.1.7a/src/Wt/Chart/WAxis.C
    new file mode 100644
    index 0000000..8128255
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WAxis.C
    @@ -0,0 +1,950 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cmath>
    +#include <limits>
    +#include <stdio.h>
    +#include <math.h>
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "WtException.h"
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WDate"
    +
    +#include "Wt/Chart/WAxis"
    +#include "Wt/Chart/WCartesianChart"
    +#include "Wt/Chart/WChart2DRenderer"
    +
    +#include "Utils.h"
    +
    +namespace {
    +  const int AXIS_MARGIN = 4;
    +  const int AUTO_V_LABEL_PIXELS = 25;
    +  const int AUTO_H_LABEL_PIXELS = 60;
    +
    +#ifndef __linux__
    +  double round(double d)
    +  {
    +    return (int)(d + 0.5);
    +  }
    +#endif
    +
    +  double round125(double v) {
    +    double n = std::pow(10, std::floor(std::log10(v)));
    +    double msd = v / n;
    +
    +    if (msd < 1.5)
    +      return n;
    +    else if (msd < 3.3)
    +      return 2*n;
    +    else if (msd < 7)
    +      return 5*n;
    +    else
    +      return 10*n;
    +  }
    +
    +  double roundUp125(double v, double t) {
    +    return t * std::ceil((v - std::numeric_limits<double>::epsilon()) / t);
    +  }
    +
    +  double roundDown125(double v, double t) {
    +    return t * std::floor((v + std::numeric_limits<double>::epsilon()) / t);
    +  }
    +}
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +class ExtremesIterator : public SeriesIterator
    +{
    +public:
    +  ExtremesIterator(Axis axis, AxisScale scale)
    +    : axis_(axis),scale_(scale),
    +      minimum_(WAxis::AUTO_MINIMUM),
    +      maximum_(WAxis::AUTO_MAXIMUM)
    +  { }
    +
    +  virtual bool startSeries(const WDataSeries& series, double groupWidth,
    +			   int numBarGroups, int currentBarGroup)
    +  {
    +    return series.axis() == axis_;
    +  }
    +
    +  virtual void newValue(const WDataSeries& series, double x, double y,
    +			double stackY, const WModelIndex& xIndex,
    +			const WModelIndex& yIndex)
    +  {
    +    if (!Utils::isNaN(y) && (scale_!=LogScale || y>0.0)) {
    +      maximum_ = std::max(y, maximum_);
    +      minimum_ = std::min(y, minimum_);
    +    }
    +  }
    +
    +  double minimum() { return minimum_; }
    +  double maximum() { return maximum_; }
    +
    +private:
    +  Axis axis_;
    +  AxisScale scale_;
    +  double minimum_, maximum_;
    +};
    +
    +WAxis::TickLabel::TickLabel(double v, TickLength length, const WString& l)
    +  : u(v),
    +    tickLength(length),
    +    label(l)
    +{ }
    +
    +const double WAxis::AUTO_MINIMUM = DBL_MAX;
    +const double WAxis::AUTO_MAXIMUM = -DBL_MAX;
    +
    +WAxis::Segment::Segment()
    +  : minimum(AUTO_MINIMUM),
    +    maximum(AUTO_MAXIMUM),
    +    renderLength(AUTO_MAXIMUM),
    +    renderStart(AUTO_MAXIMUM)
    +{ }
    +
    +WAxis::WAxis()
    +  : chart_(0),
    +    axis_(XAxis),
    +    visible_(true),
    +    location_(MinimumValue),
    +    scale_(LinearScale),
    +    labelInterval_(0),
    +    gridLines_(false),
    +    gridLinesPen_(gray),
    +    margin_(0),
    +    labelAngle_(0)
    +{
    +  titleFont_.setFamily(WFont::SansSerif);
    +  titleFont_.setSize(WFont::FixedSize, WLength(12, WLength::Point));
    +  labelFont_.setFamily(WFont::SansSerif);
    +  labelFont_.setSize(WFont::FixedSize, WLength(10, WLength::Point));
    +
    +  segments_.push_back(Segment());
    +}
    +
    +void WAxis::init(WCartesianChart *chart, Axis axis)
    +{
    +  chart_ = chart;
    +  axis_ = axis;
    +
    +  if (axis == XAxis) {
    +    if (chart->type() == CategoryChart)
    +      scale_ = CategoryScale;
    +    else if (scale_ != DateScale)
    +      scale_ = LinearScale;
    +  }
    +
    +  if (axis == Y2Axis)
    +    visible_ = false;
    +}
    +
    +void WAxis::setVisible(bool visible)
    +{
    +  set(visible_, visible);
    +}
    +
    +void WAxis::setScale(AxisScale scale)
    +{
    +  set(scale_, scale);
    +}
    +
    +void WAxis::setLocation(AxisValue location)
    +{
    +  set(location_, location);
    +}
    +
    +void WAxis::setMinimum(double minimum)
    +{
    +  Segment& s = segments_.front();
    +
    +#ifndef WT_TARGET_JAVA
    +  if (set(s.minimum, minimum))
    +    s.maximum = std::max(s.minimum, s.maximum);
    +#else
    +  set(s.minimum, minimum);
    +  set(s.maximum, std::max(s.minimum, s.maximum));
    +#endif // WT_TARGET_JAVA
    +}
    +
    +double WAxis::minimum() const
    +{
    +  return autoLimits() & MinimumValue ? segments_.front().renderMinimum
    +    : segments_.front().minimum;
    +}
    +
    +void WAxis::setMaximum(double maximum)
    +{
    +  Segment& s = segments_.back();
    +
    +#ifndef WT_TARGET_JAVA
    +  if (set(s.maximum, maximum))
    +    s.minimum = std::min(s.minimum, s.maximum);
    +#else
    +  set(s.maximum, maximum);
    +  set(s.minimum, std::min(s.minimum, s.maximum));
    +#endif // WT_TARGET_JAVA
    +}
    +
    +double WAxis::maximum() const
    +{
    +  const Segment& s = segments_.back();
    +
    +  return autoLimits() & MaximumValue ? s.renderMaximum
    +    : s.maximum;
    +}
    +
    +void WAxis::setRange(double minimum, double maximum)
    +{
    +  if (maximum > minimum) {
    +    segments_.front().minimum = minimum;
    +    segments_.back().maximum = maximum;
    +
    +    update();
    +  }
    +}
    +
    +void WAxis::setAutoLimits(WFlags<AxisValue> locations)
    +{
    +  if (locations & MinimumValue)
    +    set(segments_.front().minimum, AUTO_MINIMUM);
    +  if (locations & MaximumValue)
    +    set(segments_.back().maximum, AUTO_MAXIMUM);
    +}
    +
    +WFlags<AxisValue> WAxis::autoLimits() const
    +{
    +  WFlags<AxisValue> result = 0;
    +
    +  if (segments_.front().minimum == AUTO_MINIMUM)
    +    result |= MinimumValue;
    +
    +  if (segments_.back().maximum == AUTO_MAXIMUM)
    +    result |= MaximumValue;
    +
    +  return result;
    +}
    +
    +void WAxis::setBreak(double minimum, double maximum)
    +{
    +  if (segments_.size() != 2) {
    +    segments_.push_back(Segment());
    +    segments_[1].maximum = segments_[0].maximum;
    +  }
    +
    +  segments_[0].maximum = minimum;
    +  segments_[1].minimum = maximum;
    +
    +  update();
    +}
    +
    +void WAxis::setLabelInterval(double labelInterval)
    +{
    +  set(labelInterval_, labelInterval);
    +}
    +
    +void WAxis::setLabelFormat(const WString& format)
    +{
    +  set(labelFormat_, format);
    +}
    +
    +void WAxis::setLabelAngle(double angle)
    +{
    +  set(labelAngle_, angle);
    +}
    +
    +void WAxis::setGridLinesEnabled(bool enabled)
    +{
    +  set(gridLines_, enabled);
    +}
    +
    +void WAxis::setPen(const WPen& pen)
    +{
    +  set(pen_, pen);
    +}
    +
    +void WAxis::setGridLinesPen(const WPen& pen)
    +{
    +  set(gridLinesPen_, pen);
    +}
    +
    +void WAxis::setMargin(int pixels)
    +{
    +  set(margin_, pixels);
    +}
    +
    +void WAxis::setTitle(const WString& title)
    +{
    +  set(title_, title);
    +}
    +
    +void WAxis::setTitleFont(const WFont& titleFont)
    +{
    +  set(titleFont_, titleFont);
    +}
    +
    +void WAxis::setLabelFont(const WFont& labelFont)
    +{
    +  set(labelFont_, labelFont);
    +}
    +
    +void WAxis::update()
    +{
    +  if (chart_)
    +    chart_->update();
    +}
    +
    +void WAxis::prepareRender(WChart2DRenderer& renderer) const
    +{
    +  double totalRenderRange = 0;
    +
    +  for (unsigned i = 0; i < segments_.size(); ++i) {
    +    const Segment& s = segments_[i];
    +
    +    computeRange(renderer, s);
    +    totalRenderRange += s.renderMaximum - s.renderMinimum;
    +  }
    +
    +  bool vertical = axis_ != XAxis;
    +
    +  static const int CLIP_MARGIN = 5;
    +
    +  double clipMin = segments_.front().renderMinimum == 0 ? 0 : CLIP_MARGIN;
    +  double clipMax = segments_.back().renderMaximum == 0 ? 0 : CLIP_MARGIN;
    +
    +  double totalRenderLength
    +    = vertical ? renderer.chartArea().height() : renderer.chartArea().width();
    +  double totalRenderStart
    +    = vertical ? renderer.chartArea().bottom() - clipMin
    +    : renderer.chartArea().left() + clipMin;
    +
    +  const double SEGMENT_MARGIN = 40;
    +
    +  // 6 pixels additional margin to avoid clipping lines that render
    +  // the extreme values
    +  totalRenderLength
    +    -= SEGMENT_MARGIN * (segments_.size() - 1) + clipMin + clipMax;
    +
    +  /*
    +   * Iterate twice, since we adjust the render extrema based on the size
    +   * and vice-versa
    +   */
    +  for (unsigned it = 0; it < 2; ++it) {
    +    double rs = totalRenderStart;
    +    double TRR = totalRenderRange;
    +    totalRenderRange = 0;
    +
    +    for (unsigned i = 0; i < segments_.size(); ++i) {
    +      const Segment& s = segments_[i];
    +
    +      double diff = s.renderMaximum - s.renderMinimum;
    +
    +      s.renderStart = rs;
    +      s.renderLength = diff / TRR * totalRenderLength;
    +
    +      if (i == 0) {
    +	renderInterval_ = labelInterval_;
    +	if (renderInterval_ == 0) {
    +	  if (scale_ == CategoryScale) {
    +	    double numLabels = calcAutoNumLabels(s) / 1.5;
    +
    +	    renderInterval_
    +	      = std::max(1.0, std::floor(chart_->model()->rowCount() / numLabels));
    +	  } else if (scale_ == LinearScale) {
    +	    double numLabels = calcAutoNumLabels(s);
    +
    +	    renderInterval_ = round125(diff / numLabels);
    +	  }
    +	}
    +      }
    +
    +      if (scale_ == LinearScale) {
    +	if (it == 0) {
    +	  if (s.minimum == AUTO_MINIMUM)
    +	    s.renderMinimum
    +	      = roundDown125(s.renderMinimum, renderInterval_);
    +      
    +	  if (s.maximum == AUTO_MAXIMUM)
    +	    s.renderMaximum
    +	      = roundUp125(s.renderMaximum, renderInterval_);
    +	}
    +      }
    +
    +      totalRenderRange += s.renderMaximum - s.renderMinimum;
    +
    +      if (axis_ == XAxis)
    +	rs += s.renderLength + SEGMENT_MARGIN;
    +      else
    +	rs -= s.renderLength + SEGMENT_MARGIN;
    +    }
    +  }
    +}
    +
    +void WAxis::setOtherAxisLocation(AxisValue otherLocation) const
    +{
    +  if (scale_ != LogScale) {
    +    for (unsigned i = 0; i < segments_.size(); ++i) {
    +      const Segment& s = segments_[i];
    +
    +      int borderMin, borderMax;
    +
    +      if (scale_ == CategoryScale)
    +	borderMin = borderMax = 5;
    +      else {
    +	borderMin = (s.renderMinimum == 0 && otherLocation == ZeroValue)
    +	  ? 0 : 5;
    +	borderMax = (s.renderMinimum == 0 && otherLocation == ZeroValue)
    +	  ? 0 : 5;
    +      }
    +
    +      s.renderLength -= (borderMin + borderMax);
    +
    +      if (axis_ == XAxis)
    +	s.renderStart += borderMin;
    +      else
    +	s.renderStart -= borderMin;
    +    }
    +  }
    +}
    +
    +void WAxis::computeRange(WChart2DRenderer& renderer, const Segment& segment)
    +  const
    +{
    +  if (scale_ == CategoryScale) {
    +    segment.renderMinimum = -0.5;
    +    segment.renderMaximum = chart_->model()->rowCount() - 0.5;    
    +  } else {
    +    segment.renderMinimum = segment.minimum;
    +    segment.renderMaximum = segment.maximum;
    +
    +    bool findMinimum = segment.renderMinimum == AUTO_MINIMUM;
    +    bool findMaximum = segment.renderMaximum == AUTO_MAXIMUM;
    +
    +    if (findMinimum || findMaximum) {
    +      double minimum = std::numeric_limits<double>::max();
    +      double maximum = -std::numeric_limits<double>::max();
    +
    +      if (axis_ == XAxis) {
    +	int dataColumn = chart_->XSeriesColumn();
    +
    +	if (dataColumn != -1) {
    +	  WAbstractItemModel *model = chart_->model();
    +
    +	  for (int i = 0; i < model->rowCount(); ++i) {
    +	    double v = getValue(model->data(i, dataColumn));
    +
    +	    if (Utils::isNaN(v))
    +	      continue;
    +
    +	    if (findMaximum)
    +	      maximum = std::max(v, maximum);
    +	    if (findMinimum)
    +	      minimum = std::min(v, minimum);
    +	  }
    +	}
    +      } else {
    +	ExtremesIterator iterator(axis_, scale_);
    +	renderer.iterateSeries(&iterator);
    +
    +	minimum = iterator.minimum();
    +	maximum = iterator.maximum();
    +      }
    +
    +      if (minimum == std::numeric_limits<double>::max()) {
    +	if (scale_ == LogScale)
    +	  minimum = 1;
    +	else if (scale_ == DateScale)
    +	  minimum = WDate::currentDate().toJulianDay() - 10;
    +	else
    +	  minimum = 0;
    +      }
    +
    +      if (maximum == -std::numeric_limits<double>::max()) {
    +	if (scale_ == LogScale)
    +	  maximum = 10;
    +	else if (scale_ == DateScale)
    +	  maximum = WDate::currentDate().toJulianDay();
    +	else
    +	  maximum = 100;
    +      }
    +
    +      if (findMinimum)
    +	segment.renderMinimum
    +	  = std::min(minimum, findMaximum ? maximum : segment.maximum);
    +
    +      if (findMaximum)
    +	segment.renderMaximum
    +	  = std::max(maximum, findMinimum ? minimum : segment.minimum);
    +    }
    +    
    +    double diff = segment.renderMaximum - segment.renderMinimum;
    +
    +    if (std::fabs(diff) < std::numeric_limits<double>::epsilon()) {
    +      /*
    +       * When the two values or equal, there is no way of knowing what
    +       * is a plausible range. Take the surrounding integer values
    +       */
    +      if (scale_ == LogScale) {
    +	if (findMinimum)
    +	  segment.renderMinimum
    +	    = std::pow(10,
    +		       (std::floor(std::log10(segment.renderMinimum - 0.1))));
    +	if (findMaximum)
    +	  segment.renderMaximum
    +	    = std::pow(10,
    +		       (std::ceil(std::log10(segment.renderMaximum + 0.1))));
    +      } else {
    +	if (findMinimum)
    +	  segment.renderMinimum = std::floor(segment.renderMinimum - 1E-4);
    +	if (findMaximum)
    +	  segment.renderMaximum = std::ceil(segment.renderMaximum + 1E-4);
    +      }
    +
    +      diff = segment.renderMaximum - segment.renderMinimum;
    +    }
    +
    +    if (scale_ == LinearScale) {
    +      if (findMinimum && segment.renderMinimum >= 0
    +	  && (segment.renderMinimum - 0.50 * diff <= 0))
    +	segment.renderMinimum = 0;
    +
    +      if (findMaximum && segment.renderMaximum <= 0
    +	  && (segment.renderMaximum + 0.50 * diff >= 0))
    +	segment.renderMaximum = 0;
    +    } else if (scale_ == LogScale) {
    +      double minLog10 = std::floor(std::log10(segment.renderMinimum));
    +      double maxLog10 = std::ceil(std::log10(segment.renderMaximum));
    +
    +      if (findMinimum)
    +	segment.renderMinimum = std::pow(10, (minLog10));
    +
    +      if (findMinimum)
    +	segment.renderMaximum = std::pow(10, (maxLog10));
    +    }
    +  }
    +}
    +
    +double WAxis::mapToDevice(const boost::any& value, int segment) const
    +{
    +  assert (scale_ != CategoryScale);
    +
    +  return mapToDevice(getValue(value), segment);
    +}
    +
    +double WAxis::getValue(const boost::any& v) const
    +{
    +  switch (scale_) {
    +  case LinearScale:
    +  case LogScale:
    +    return asNumber(v);
    +  case DateScale:
    +    if (v.type() == typeid(WDate)) {
    +      WDate d = boost::any_cast<WDate>(v);
    +      return static_cast<double>(d.toJulianDay());
    +    } 
    +
    +#ifndef WT_TARGET_JAVA
    +    else if (v.type() == typeid(WDateTime)) {
    +      WDateTime dt = boost::any_cast<WDateTime>(v);
    +      return static_cast<double>(dt.date().toJulianDay());
    +    } 
    +#endif
    +
    +    else {
    +      return std::numeric_limits<double>::signaling_NaN();
    +    }
    +  case DateTimeScale:
    +    if (v.type() == typeid(WDate)) {
    +      WDate d = boost::any_cast<WDate>(v);
    +      WDateTime dt;
    +      dt.setDate(d);
    +      return (double)dt.toTime_t();
    +    }
    +
    +#ifndef WT_TARGET_JAVA
    +    else if (v.type() == typeid(WDateTime)) {
    +      WDateTime dt = boost::any_cast<WDateTime>(v);
    +      return static_cast<double>(dt.toTime_t());
    +    }
    +#endif
    +
    +    else {
    +      return std::numeric_limits<double>::signaling_NaN();
    +    }
    +  default:
    +    return -1.0;
    +  }
    +}
    +
    +double WAxis::mapToDevice(double u, int segment) const
    +{
    +  if (Utils::isNaN(u))
    +      return u;
    +
    +  const Segment& s = segments_[segment];
    +
    +  double d;
    +  if (scale_ != LogScale) {
    +    d = (u - s.renderMinimum)
    +      / (s.renderMaximum - s.renderMinimum)
    +      * s.renderLength;
    +  } else {
    +    u = std::max(s.renderMinimum, u);
    +    d = (std::log(u) - std::log(s.renderMinimum))
    +      / (std::log(s.renderMaximum) - std::log(s.renderMinimum))
    +      * s.renderLength;
    +  }
    +
    +  if (axis_ == XAxis)
    +    return s.renderStart + d;
    +  else
    +    return s.renderStart - d;
    +}
    +
    +double WAxis::mapFromDevice(double d) const
    +{
    +  for (unsigned i = 0; i < segments_.size(); ++i) {
    +    const Segment& s = segments_[i];
    +
    +    bool lastSegment = (i == segments_.size() - 1);
    +
    +    if (lastSegment || d < mapToDevice(s.renderMaximum, i)) {
    +      if (axis_ == XAxis)
    +	d = d - s.renderStart;
    +      else
    +	d = s.renderStart - d;
    +
    +      if (scale_ != LogScale) {
    +	return s.renderMinimum + d * (s.renderMaximum - s.renderMinimum)
    +	  / s.renderLength;
    +      } else {
    +	return std::exp(std::log(s.renderMinimum)
    +			+ d * (std::log(s.renderMaximum)
    +			       - std::log(s.renderMinimum)) / s.renderLength);
    +      }
    +    }
    +  }
    +
    +  return 0;
    +}
    +
    +WString WAxis::label(double u) const
    +{
    +#ifndef WT_TARGET_JAVA
    +  char buf[30];
    +#else
    +  char *buf = 0;
    +#endif // WT_TARGET_JAVA
    +
    +  WString text;
    +
    +  if (scale_ == CategoryScale) {
    +    if (chart_->XSeriesColumn() != -1) {
    +      text = asString(chart_->model()->data((int)u, chart_->XSeriesColumn()));
    +    } else {
    +#ifdef WT_TARGET_JAVA
    +      buf =
    +#endif // WT_TARGET_JAVA
    +	sprintf(buf, "%.4g", u+1);
    +      text = WString::fromUTF8(buf);
    +    }
    +  } else if (scale_ == DateScale) {
    +    WDate d = WDate::fromJulianDay(static_cast<int>(u));
    +    WString format = labelFormat_;
    +
    +    if (format.empty()) {
    +      return d.toString("dd/MM/yyyy");
    +    } else
    +      return d.toString(format);
    +  } else {
    +    std::string format = labelFormat_.toUTF8();
    +
    +    if (format.empty())
    +      format = "%.4g";
    +
    +#ifdef WT_TARGET_JAVA
    +    buf =
    +#endif // WT_TARGET_JAVA
    +      sprintf(buf, format.c_str(), u);
    +
    +    text = WString::fromUTF8(buf);
    +  }
    +
    +  return text;
    +}
    +
    +void WAxis::getLabelTicks(WChart2DRenderer& renderer,
    +			  std::vector<TickLabel>& ticks, int segment) const
    +{
    +  static double EPSILON = 1E-3;
    +
    +  const Segment& s = segments_[segment];
    +
    +  switch (scale_) {
    +  case CategoryScale: {
    +    int renderInterval = std::max(1, static_cast<int>(renderInterval_));
    +    if (renderInterval == 1) {
    +      ticks.push_back(TickLabel(-0.5, TickLabel::Long));
    +      for (int i = 0; i < chart_->model()->rowCount(); ++i) {
    +	ticks.push_back(TickLabel(i + 0.5, TickLabel::Long));
    +	ticks.push_back(TickLabel(i, TickLabel::Zero,
    +				  label(static_cast<double>(i))));
    +      }
    +    } else {
    +      /*
    +       * We could do a special effort for date X series here...
    +       */
    +      for (int i = 0; i < chart_->model()->rowCount(); i += renderInterval) {
    +	ticks.push_back(TickLabel(i, TickLabel::Long,
    +				  label(static_cast<double>(i))));
    +      }
    +    }
    +    break;
    +  }
    +  case LinearScale: {
    +    for (int i = 0;; ++i) {
    +      double v = s.renderMinimum + renderInterval_ * i;
    +
    +      if (v - s.renderMaximum > EPSILON * renderInterval_)
    +	break;
    +
    +      WString t;
    +
    +      if (i % 2 == 0)
    +	t = label(v);
    + 
    +      ticks.push_back
    +	(TickLabel(v, i % 2 == 0 ? TickLabel::Long : TickLabel::Short, t));
    +    }
    +
    +    break;
    +  }
    +  case LogScale: {
    +    double v = s.renderMinimum > 0 ? s.renderMinimum : 0.0001;
    +    double p = v;
    +    int i = 0;
    +    for (;; ++i) {
    +      if (v - s.renderMaximum > EPSILON * s.renderMaximum)
    +	break;
    +
    +      if (i == 9) {
    +	v = p = 10 * p;
    +	i = 0;
    +      }
    +
    +      if (i == 0)
    +	ticks.push_back(TickLabel(v, TickLabel::Long, label(v)));
    +      else
    +	ticks.push_back(TickLabel(v, TickLabel::Short));
    +
    +      v += p;
    +    }
    +
    +    break;
    +  }
    +  case DateTimeScale:
    +  case DateScale: {
    +    double daysRange = 0.0;
    +    WDateTime dt;
    +    switch (scale_) {
    +    case DateScale:
    +      daysRange = static_cast<double>(s.renderMaximum - s.renderMinimum);
    +      dt.setDate(WDate::fromJulianDay(static_cast<int>(s.renderMinimum)));
    +      if (!dt.isValid()) {
    +	std::string exception = "Invalid julian day: ";
    +	exception += boost::lexical_cast<std::string>(s.renderMinimum);
    +	throw WtException(exception);
    +      }
    +      break;
    +    case DateTimeScale:
    +      daysRange = static_cast<double>((s.renderMaximum - s.renderMinimum) 
    +				    / (60.0 * 60.0 * 24));
    +      dt = WDateTime::fromTime_t((time_t)s.renderMinimum);
    +      break;
    +    default:
    +      assert(false); // CategoryScale, LinearScale
    +    }
    +
    +    double numLabels = calcAutoNumLabels(s);
    +
    +    double days = daysRange / numLabels;
    +
    +    enum { Days, Months, Years, Hours, Minutes } unit;
    +    int interval;
    +
    +    if (days > 200) {
    +      unit = Years;
    +      interval = std::max(1, static_cast<int>(round125(days / 365)));
    +	
    +      if (dt.date().day() != 1 && dt.date().month() != 1)
    +	dt.date().setDate(dt.date().year(), 1, 1);
    +    } else if (days > 20) {
    +      unit = Months;
    +      double i = days / 30;
    +      if (i < 1.3)
    +	interval = 1;
    +      else if (i < 2.3)
    +	interval = 2;
    +      else if (i < 3.3)
    +	interval = 3;
    +      else if (i < 4.3)
    +	interval = 4;
    +      else
    +	interval = 6;
    +	
    +      if (dt.date().day() != 1) {
    +	dt.date().setDate(dt.date().year(), dt.date().month(), 1);
    +      }
    +	
    +      if ((dt.date().month() - 1) % interval != 0) {
    +	int m = (((dt.date().month() - 1) / interval) * interval) + 1;
    +	dt.date().setDate(dt.date().year(), m, 1);
    +      }
    +    } else if (days > 0.6) {
    +      unit = Days;
    +      if (days < 1.3)
    +	interval = 1;
    +      else
    +	interval = 7 * std::max(1, static_cast<int>((days + 5) / 7));
    +    } else {
    +      double minutes = days * 24 * 60;
    +      if (minutes > 40) {
    +	unit = Hours;
    +	double i = minutes / 60;
    +	if (i < 1.3)
    +	  interval = 1;
    +	else if (i < 2.3)
    +	  interval = 2;
    +	else if (i < 3.3)
    +	  interval = 3;
    +	else if (i < 4.3)
    +	  interval = 4;
    +	else if (i < 6.3)
    +	  interval = 6;
    +	else
    +	  interval = 12;
    +      } else {
    +	unit = Minutes;
    +	  if (minutes < 1.3)
    +	    interval = 1;
    +	  else if (minutes < 2.3)
    +	    interval = 2;
    +	  else if (minutes < 5.3)
    +	    interval = 5;
    +	  else if (minutes < 10.3)
    +	    interval = 10;
    +	  else if (minutes < 15.3)
    +	    interval = 15;
    +	  else if (minutes < 20.3)
    +	    interval = 20;
    +	  else
    +	    interval = 30;
    +      }
    +    }
    +
    +    bool atTick = (interval > 1) || (unit <= Days);
    +
    +    for (;;) {
    +      long dl = getDateNumber(dt);
    +      
    +      if (dl > s.renderMaximum)
    +	break;
    +
    +      WDateTime next;
    +      switch (unit) {
    +      case Years:
    +	next = dt.addYears(interval); break;
    +      case Months:
    +	next = dt.addMonths(interval); break;
    +      case Days:
    +	next = dt.addDays(interval); break;
    +      case Hours:
    +	next = dt.addSecs(interval * 60 * 60); break;
    +      case Minutes:
    +	next = dt.addSecs(interval * 60); break;
    +      }
    +
    +      WString text;
    +
    +      if (!labelFormat_.empty())
    +	text = dt.toString(labelFormat_);
    +      else {
    +	if (atTick) 
    +	  switch (unit) {
    +	  case Months:
    +	  case Years:
    +	  case Days:
    +	    text = dt.toString("dd/MM/yy"); break;
    +	  case Hours:
    +	    text = dt.toString("h'h' dd/MM"); break;
    +	  case Minutes:
    +	    text = dt.toString("hh:mm"); break;
    +	  default:
    +	    break;
    +	  }
    +	else
    +	  switch (unit) {
    +	  case Months:
    +	    text = dt.toString("MMM yy"); break;
    +	  case Years:
    +	    text = dt.toString("yyyy"); break;
    +	  case Hours:
    +	    text = dt.toString("h'h' dd/MM"); break;
    +	  case Minutes:
    +	    text = dt.toString("hh:mm"); break;
    +	  default:
    +	    break;
    +	  }
    +      }
    +
    +      if (dl >= s.renderMinimum)
    +	ticks.push_back(TickLabel(static_cast<double>(dl),
    +				  TickLabel::Long,
    +				  atTick ? text : WString()));
    +
    +      if (!atTick) {
    +	double tl = (getDateNumber(next) + dl)/2;
    +
    +	if (tl >= s.renderMinimum && tl <= s.renderMaximum) {
    +	  ticks.push_back(TickLabel(static_cast<double>(tl), TickLabel::Zero,
    +				    text));
    +	}
    +      }
    +
    +      dt = next;
    +    }
    +
    +    break;
    +  }
    +  }
    +}
    +
    +long WAxis::getDateNumber(WDateTime dt) const
    +{
    +  switch (scale_) {
    +  case DateScale:
    +    return static_cast<long>(dt.date().toJulianDay());
    +  case DateTimeScale:
    +    return static_cast<long>(dt.toTime_t());
    +  default:
    +    return 1;
    +  }
    +}
    +
    +double WAxis::calcAutoNumLabels(const Segment& s) const
    +{
    +  bool vertical = (axis_ != XAxis) == (chart_->orientation() == Vertical);
    +
    +  return s.renderLength
    +    / (vertical ? AUTO_V_LABEL_PIXELS : AUTO_H_LABEL_PIXELS);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WCartesianChart b/wt-3.1.7a/src/Wt/Chart/WCartesianChart
    new file mode 100644
    index 0000000..3b714f8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WCartesianChart
    @@ -0,0 +1,469 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WCARTESIAN_CHART_H_
    +#define CHART_WCARTESIAN_CHART_H_
    +
    +#include <Wt/Chart/WAbstractChart>
    +#include <Wt/Chart/WAxis>
    +#include <Wt/Chart/WDataSeries>
    +#include <Wt/WPaintDevice>
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +
    +class WAbstractItemModel;
    +class WPainter;
    +class WPainterPath;
    +
    +  namespace Chart {
    +
    +class WChart2DRenderer;
    +class WChartPalette;
    +
    +/*! \class WCartesianChart Wt/Chart/WCartesianChart Wt/Chart/WCartesianChart
    + *  \brief A cartesian chart.
    + *
    + * A cartesian chart is a chart that uses X and Y axes. It can display
    + * one or multiple data series, which each may be rendered using bars,
    + * lines, areas, or points.
    + *
    + * To use a cartesian chart, the minimum you need to do is set a model
    + * using setModel(), set the model column that holds the X data using
    + * setXSeriesColumn(), and add one or more series using
    + * addSeries(const WDataSeries&). Each series corresponds to one data
    + * column that holds Y data.
    + *
    + * A cartesian chart is either a \link Chart::CategoryChart
    + * CategoryChart\endlink or a \link Chart::ScatterPlot
    + * ScatterPlot\endlink.
    + *
    + * In a <b>CategoryChart</b>, the X series represent different
    + * categories, which are listed consecutively in model row order. The
    + * X axis scale is set to \link Chart::CategoryScale
    + * CategoryScale\endlink.
    + *
    + * \image html ChartWCartesianChart-1.png "A category chart with bar series"
    + *
    + * Each series may be rendered differently, and this is configured in
    + * the data series (see WDataSeries for more information).
    + *
    + * In a <b>ScatterPlot</b>, the X series data are interpreted as
    + * numbers on a numerical scale. The scale for the X axis defaults to
    + * a \link Chart::LinearScale LinearScale\endlink, but this may be
    + * changed to a \link Chart::DateScale DateScale\endlink when the X
    + * series contains dates (of type WDate) to create a time series
    + * chart, or to a \link Chart::LogScale LogScale\endlink. A
    + * ScatterPlot supports the same types of data series as a
    + * CategoryChart, but does not support stacking. In a scatter plot, the
    + * X series do not need to be ordered in increasing values.
    + *
    + * \image html ChartWCartesianChart-2.png "A time series scatter plot with line series"
    + *
    + * Missing data in a model series Y values is interpreted as a
    + * <i>break</i>. For curve-like series, this breaks the curve (or
    + * line). This may also be used to use different X series per Y series
    + * in a scatter plot.
    + *
    + * The cartesian chart has support for dual Y axes. Each data series may
    + * be bound to one of the two Y axes. By default, only the first Y axis
    + * is displayed. To show the second Y axis you will need to call:
    + * 
    + * \if cpp
    + * \code
    + * chart->axis(Y2Axis).setVisible(true);
    + * \endcode
    + * \endif
    + *
    + * By default a chart has a horizontal X axis and a vertical Y axis,
    + * which corresponds to a \link Wt::Vertical Vertical\endlink
    + * orientation. The orientation may be changed to \link Wt::Horizontal
    + * Horizontal\endlink using setOrientation().
    + *
    + * The styling of the series data are dictated by a palette which may
    + * be set using setPalette(WChartPalette *), but may be overridden by
    + * settings in each data series.
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * \sa WDataSeries, WAxis
    + * \sa WPieChart
    + *
    + * \ingroup charts modelview
    + */
    +class WT_API WCartesianChart : public WAbstractChart
    +{
    +public:
    +  /*! \brief Creates a new cartesian chart.
    +   *
    +   * Creates a cartesian chart of type CategoryChart.
    +   */
    +  WCartesianChart(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a new cartesian chart.
    +   *
    +   * Creates a cartesian chart of the indicated <i>type</i>.
    +   */
    +  WCartesianChart(ChartType type, WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the chart type.
    +   *
    +   * The chart type determines how (x,y) data are interpreted. In a
    +   * CategoryChart, the X values are categories, and these are plotted
    +   * consecutively, evenly spaced, and in row order. In a ScatterPlot,
    +   * the X values are interpreted numerically (as for Y values).
    +   *
    +   * The default chart type is a CategoryChart.
    +   *
    +   * \sa type()
    +   * \sa WAxis::setScale(), axis(Axis)
    +   */
    +  void setType(ChartType type);
    +
    +  /*! \brief Returns the chart type.
    +   *
    +   * \sa setType(ChartType type)
    +   */
    +  ChartType type() const { return type_; }
    +
    +  /*! \brief Sets the chart orientation.
    +   *
    +   * Sets the chart orientation, which corresponds to the orientation of
    +   * the Y axis: a Vertical orientation corresponds to the conventional
    +   * way of a horizontal X axis and vertical Y axis. A Horizontal
    +   * orientation is the other way around.
    +   *
    +   * The default orientation is Vertical.
    +   *
    +   * \sa orientation()
    +   */
    +  void setOrientation(Orientation orientation);
    +
    +  /*! \brief Returns the chart orientation.
    +   *
    +   * \sa setOrientation(Orientation)
    +   */  
    +  Orientation orientation() const { return orientation_; }
    +
    +  /*! \brief Sets the the model column for the X series.
    +   *
    +   * Use this method to specify the data for the X series. For a
    +   * ScatterPlot this is mandatory, while for a CategoryChart, if
    +   * not specified, an increasing series of integer numbers will
    +   * be used (1, 2, ...).
    +   *
    +   * The default value is -1 (not specified).
    +   *
    +   * \sa XSeriesColumn()
    +   */
    +  void setXSeriesColumn(int modelColumn);
    +
    +  /*! \brief Returns the model column for the X series.
    +   *
    +   * \sa setXSeriesColumn(int)
    +   */
    +  int XSeriesColumn() const { return XSeriesColumn_; }
    +
    +  //later, activates a 3D plot
    +  //void setXYData(int modelColumnX, int modelColumnY);
    +  //bool is3D() const;
    +
    +  /*! \brief Adds a data series.
    +   *
    +   * A single chart may display one or more data series. Each data series
    +   * displays data from a single model column in the chart. Series are
    +   * plotted in the order that they have been added to the chart.
    +   *
    +   * \sa removeSeries(int), setSeries(const std::vector<WDataSeries>&)
    +   */
    +  void addSeries(const WDataSeries& series);
    +
    +  /*! \brief Removes a data series.
    +   *
    +   * This removes the first data series which plots the given
    +   * <i>modelColumn</i>.
    +   *
    +   * \sa addSeries(const WDataSeries&)
    +   * \sa setSeries(const std::vector<WDataSeries>&).
    +   */
    +  void removeSeries(int modelColumn);
    +
    +  /*! \brief Sets all data series.
    +   *
    +   * Replaces the current list of series with the new list.
    +   *
    +   * \sa series(), addSeries(const WDataSeries&), removeSeries(int)
    +   */
    +  void setSeries(const std::vector<WDataSeries>& series);
    +
    +  /*! \brief Returns a data series corresponding to a data column.
    +   *
    +   * Returns a reference to the first data series that plots data
    +   * from <i>modelColumn</i>.
    +   */
    +  WDataSeries& series(int modelColumn);
    +
    +  /*! \brief Returns a data series corresponding to a data column.
    +   *
    +   * Returns a const reference to the first data series that plots data
    +   * from <i>modelColumn</i>.
    +   */
    +  const WDataSeries& series(int modelColumn) const;
    +
    +  /*! \brief Returns a list with the current data series.
    +   *
    +   * Returns the complete list of current data series.
    +   *
    +   * \sa setSeries(const std::vector<WDataSeries>&)
    +   */
    +  const std::vector<WDataSeries>& series() const { return series_; }
    +
    +  /*! \brief Returns a chart axis.
    +   *
    +   * Returns a reference to the specified <i>axis</i>.
    +   */
    +  WAxis& axis(Axis axis);
    +
    +  /*! \brief Accesses a chart axis.
    +   *
    +   * Returns a const reference to the specified <i>axis</i>.
    +   */
    +  const WAxis& axis(Axis axis) const;
    +
    +  /*! \brief Sets the margin between bars of different series.
    +   *
    +   * Use this method to change the margin that is set between bars of
    +   * different series. The margin is specified as a fraction of the
    +   * width. For example, a value of 0.1 adds a 10% margin between bars
    +   * of each series. Negative values are also allowed. For example, use
    +   * a margin of -1 to plot the bars of different series on top of
    +   * each other.
    +   *
    +   * The default value is 0.
    +   */
    +  void setBarMargin(double margin);
    +
    +  /*! \brief Returns the margin between bars of different series.
    +   *
    +   * \sa setBarMargin(double)
    +   */
    +  double barMargin() const { return barMargin_; }
    +
    +  /*! \brief Enables the legend.
    +   *
    +   * If <i>enabled</i> is true, then a default legend is added to the right
    +   * of the chart. You should provide space for the legend using
    +   * the setChartPadding() method. Only series for which the legend
    +   * is enabled or included in this legend (see
    +   * WDataSeries::isLegendEnabled()).
    +   *
    +   * To have more control over the legend, you could reimplement the
    +   * renderLegendItem() method to customize how one item in the legend
    +   * is rendered, or, alternatively you could reimplement the paint()
    +   * method in which you use the renderLegendItem() method repeatedly
    +   * to render a legend at an arbitrary position.
    +   *
    +   * The default value is false.
    +   *
    +   * \sa WDataSeries::setLegendEnabled(bool)
    +   */
    +  void setLegendEnabled(bool enabled);
    +
    +  /*! \brief Returns whether the legend is enabled.
    +   *
    +   * \sa setLegendEnabled(bool)
    +   */
    +  bool isLegendEnabled() const { return legend_; }
    +  
    +  virtual void paint(WPainter& painter, const WRectF& rectangle = WRectF())
    +    const;
    +
    +  /*! \brief Draws the marker for a given data series.
    +   *
    +   * Draws the marker for the indicated <i>series</i> in the <i>result</i>.
    +   * This method is called while painting the chart, and you may
    +   * want to reimplement this method if you wish to provide a custom
    +   * marker for a particular data series.
    +   *
    +   * \sa setLegendEnabled(bool)
    +   */
    +  virtual void drawMarker(const WDataSeries& series, WPainterPath& result)
    +    const;
    +
    +
    +  /*! \brief Renders the legend icon for a given data series.
    +   *
    +   * Renders the legend icon for the indicated <i>series</i> in the
    +   * <i>painter</i> at position <i>pos</i>.
    +   *
    +   * This method is called while rendering a legend item, and you may
    +   * want to reimplement this method if you wish to provide a custom
    +   * legend icon for a particular data series.
    +   *
    +   * \sa renderLegendItem()
    +   */
    +  virtual void renderLegendIcon(WPainter& painter, const WPointF& pos,
    +				const WDataSeries& series) const;
    +
    +  /*! \brief Renders the legend item for a given data series.
    +   *
    +   * Renders the legend item for the indicated <i>series</i> in the
    +   * <i>painter</i> at position <i>pos</i>. The default implementation
    +   * draws the marker, and the series description to the right. The
    +   * series description is taken from the model's header data for that
    +   * series' data column.
    +   *
    +   * This method is called while painting the chart, and you may
    +   * want to reimplement this method if you wish to provide a custom
    +   * marker for a particular data series.
    +   *
    +   * \sa setLegendEnabled(bool)
    +   */
    +  virtual void renderLegendItem(WPainter& painter, const WPointF& pos,
    +				const WDataSeries& series) const;
    +
    +  /*! \brief Maps from device coordinates to model coordinates.
    +   *
    +   * Maps a position in the chart back to model coordinates.
    +   *
    +   * This uses the axis dimensions that are based on the latest chart
    +   * rendering. If you have not yet rendered the chart, or wish to already
    +   * the mapping reflect model changes since the last rendering, you should
    +   * call initLayout() first.
    +   *
    +   * \sa mapToDevice()
    +   */
    +  WPointF mapFromDevice(const WPointF& point,
    +			Axis ordinateAxis = OrdinateAxis) const;
    +
    +  /*! \brief Maps model values onto chart coordinates.
    +   *
    +   * This returns the chart device coordinates for a (x,y) pair of model
    +   * values.
    +   *
    +   * This uses the axis dimensions that are based on the latest chart
    +   * rendering. If you have not yet rendered the chart, or wish to already
    +   * the mapping reflect model changes since the last rendering, you should
    +   * call initLayout() first.
    +   *
    +   * The \p xSegment and \p ySegment arguments are relevant only when
    +   * the corresponding axis is broken using WAxis::setBreak(). Then,
    +   * its possible values may be 0 (below the break) or 1 (above the
    +   * break).
    +   *
    +   * \sa mapFromDevice()
    +   */
    +  WPointF mapToDevice(const boost::any& xValue, const boost::any& yValue,
    +		      Axis axis = OrdinateAxis, int xSegment = 0,
    +		      int ySegment = 0) const;
    +
    +  /*! \brief Initializes the chart layout.
    +   *
    +   * A cartesian chart delegates the rendering and layout of the chart
    +   * and its axes to a WChart2DRenderer. As a consequence, the mapping
    +   * between model and device coordinates is also established by this
    +   * class, which is only created on-demand when painging.
    +   *
    +   * If you wish to establish the layout, in order to use the
    +   * mapFromDevice() and mapToDevice() methods before the chart has
    +   * been rendered, you should call this method.
    +   *
    +   * Unless a specific chart rectangle is specified, the entire widget
    +   * area is assumed.
    +   */
    +  void initLayout(const WRectF& rectangle = WRectF());
    +
    +  /*! \brief Creates a widget which renders the a legend item.
    +   * 
    +   * The legend item widget will contain a text and a WPaintedWidget 
    +   * which draws the series' symbol.
    +   */
    +  WWidget* createLegendItemWidget(int index);
    +
    +  /*! \brief Adds a data point area (used for displaying e.g. tooltips).
    +   *
    +   * You may want to specialize this is if you wish to modify (or delete) the area.
    +   *
    +   * \note Currently, an area is only created if the ToolTipRole data at the
    +   *       data point is not empty.
    +   */
    +  virtual void addDataPointArea(const WDataSeries& series,
    +				const WModelIndex& xIndex,
    +				WAbstractArea *area);
    +
    +protected:
    +  void paintEvent(WPaintDevice *paintDevice);
    +
    +  /*! \brief Creates a renderer which renders the chart.
    +   *
    +   * The rendering of the chart is delegated to a WChart2DRenderer
    +   * class, which will render the chart within the <i>rectangle</i> of
    +   * the <i>painter</i>.
    +   *
    +   * You may want to reimplement this method if you wish to override
    +   * one or more aspects of the rendering, by returning an new instance
    +   * of a specialized WChart2DRenderer class.
    +   *
    +   * After rendering, the renderer is deleted.
    +   *
    +   * \sa WChart2DRenderer::render()
    +   */
    +  virtual WChart2DRenderer *createRenderer(WPainter& painter,
    +					   const WRectF& rectangle) const;
    +
    +private:
    +  Orientation               orientation_;
    +  int                       XSeriesColumn_;
    +  ChartType                 type_;
    +  std::vector<WDataSeries>  series_;
    +  WAxis                     axes_[3];
    +  double                    barMargin_;
    +  bool                      legend_;
    +
    +  void init();
    +  virtual void modelColumnsInserted(const WModelIndex& parent,
    +				    int start, int end);
    +  virtual void modelColumnsRemoved(const WModelIndex& parent,
    +				   int start, int end);
    +  virtual void modelRowsInserted(const WModelIndex& parent,
    +				 int start, int end);
    +  virtual void modelRowsRemoved(const WModelIndex& parent,
    +				int start, int end);
    +  virtual void modelDataChanged(const WModelIndex& topLeft,
    +			        const WModelIndex& bottomRight);
    +
    +  virtual void modelChanged();
    +  virtual void modelReset();
    +
    +  int seriesIndexOf(int modelColumn) const;
    +
    +  WPointF hv(double x, double y, double width) const;
    +  WPointF inverseHv(double x, double y, double width) const;
    +
    +  class IconWidget : public WPaintedWidget {
    +  public:
    +    IconWidget(WCartesianChart *chart, 
    +	       int index, 
    +	       WContainerWidget *parent = 0);
    +    
    +  protected:
    +    virtual void paintEvent(WPaintDevice *paintDevice);
    +    
    +  private:
    +    WCartesianChart* chart_;
    +    int index_;
    +  };
    +
    +  friend class WDataSeries;
    +  friend class WChart2DRenderer;
    +};
    +
    +  }
    +}
    +
    +#endif // CHART_WCARTESIAN_CHART_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WCartesianChart.C b/wt-3.1.7a/src/Wt/Chart/WCartesianChart.C
    new file mode 100644
    index 0000000..c5e4f33
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WCartesianChart.C
    @@ -0,0 +1,480 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Chart/WChart2DRenderer"
    +#include "Wt/Chart/WDataSeries"
    +#include "Wt/Chart/WCartesianChart"
    +#include "Wt/Chart/WStandardPalette"
    +
    +#include "Wt/WAbstractArea"
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WPainter"
    +#include "Wt/WText"
    +
    +#include "WtException.h"
    +
    +namespace {
    +  
    +class PlotException : public std::exception
    +{
    +public:
    +  PlotException(const std::string what)
    +    : what_(what) { }
    +  ~PlotException() throw() { }
    +
    +  const char *what() const throw() { return what_.c_str(); }
    +  
    +private:
    +  std::string what_;
    +};
    +
    +}
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WCartesianChart::WCartesianChart(WContainerWidget *parent)
    +  : WAbstractChart(parent),
    +    orientation_(Vertical),
    +    XSeriesColumn_(-1),
    +    type_(CategoryChart),
    +    barMargin_(0),
    +    legend_(false)
    +{
    +  init();
    +}
    +
    +WCartesianChart::WCartesianChart(ChartType type, WContainerWidget *parent)
    +  : WAbstractChart(parent),
    +    orientation_(Vertical),
    +    XSeriesColumn_(-1),
    +    type_(type),
    +    barMargin_(0),
    +    legend_(false)
    +{
    +  init();
    +}
    +
    +void WCartesianChart::init()
    +{
    +  setPalette(new WStandardPalette(WStandardPalette::Muted));
    +  //setPreferredMethod(InlineSvgVml);
    +	
    +#ifdef WT_TARGET_JAVA
    +  for (int i = 0; i < 3; ++i)
    +    axes_[i] = WAxis();
    +#endif //WT_TARGET_JAVA
    +	
    +  axes_[XAxis].init(this, XAxis);
    +  axes_[YAxis].init(this, YAxis);
    +  axes_[Y2Axis].init(this, Y2Axis);
    +
    +  setPlotAreaPadding(40, Left | Right);
    +  setPlotAreaPadding(30, Top | Bottom);
    +}
    +
    +void WCartesianChart::setOrientation(Orientation orientation)
    +{
    +  if (orientation_ != orientation) {
    +    orientation_ = orientation;
    +    update();
    +  }
    +}
    +
    +void WCartesianChart::setXSeriesColumn(int modelColumn)
    +{
    +  if (XSeriesColumn_ != modelColumn) {
    +    XSeriesColumn_ = modelColumn;
    +    update();
    +  }
    +}
    +
    +void WCartesianChart::setType(ChartType type)
    +{
    +  if (type_ != type) {
    +    type_ = type;
    +    axes_[XAxis].init(this, XAxis);
    +    update();
    +  }
    +}
    +
    +void WCartesianChart::addSeries(const WDataSeries& series)
    +{
    +  series_.push_back(series);
    +  series_.back().setChart(this);
    +  update();
    +}
    +
    +void WCartesianChart::removeSeries(int modelColumn)
    +{
    +  int index = seriesIndexOf(modelColumn);
    +
    +  if (index != -1) {
    +    series_.erase(series_.begin() + index);
    +    update();
    +  }
    +}
    +
    +int WCartesianChart::seriesIndexOf(int modelColumn) const
    +{
    +  for (unsigned i = 0; i < series_.size(); ++i)
    +    if (series_[i].modelColumn() == modelColumn)
    +      return i;
    +
    +  return -1;
    +}
    +
    +WDataSeries& WCartesianChart::series(int modelColumn)
    +{
    +  int index = seriesIndexOf(modelColumn);
    +
    +  if (index != -1)
    +    return series_[index];
    +
    +  throw PlotException("Column " + boost::lexical_cast<std::string>(modelColumn)
    +		      + " not in plot");
    +}
    +
    +const WDataSeries& WCartesianChart::series(int modelColumn) const
    +{
    +  int index = seriesIndexOf(modelColumn);
    +
    +  if (index != -1)
    +    return series_[index];
    +
    +  throw PlotException("Column " + boost::lexical_cast<std::string>(modelColumn)
    +		      + " not in plot");
    +}
    +
    +void WCartesianChart::setSeries(const std::vector<WDataSeries>& series)
    +{
    +  series_ = series;
    +
    +  for (unsigned i = 0; i < series_.size(); ++i)
    +    series_[i].setChart(this);
    +
    +  update();
    +}
    +
    +WAxis& WCartesianChart::axis(Axis axis)
    +{
    +  return axes_[axis];
    +}
    +
    +const WAxis& WCartesianChart::axis(Axis axis) const
    +{
    +  return axes_[axis];
    +}
    +
    +void WCartesianChart::setBarMargin(double margin)
    +{
    +  if (barMargin_ != margin) {
    +    barMargin_ = margin;
    +
    +    update();
    +  }
    +}
    +
    +void WCartesianChart::setLegendEnabled(bool enabled)
    +{
    +  if (legend_ != enabled) {
    +    legend_ = enabled;
    +
    +    update();
    +  }
    +}
    +
    +void WCartesianChart::paint(WPainter& painter, const WRectF& rectangle) const
    +{
    +  if (!painter.isActive())
    +    throw WtException("WCartesianChart::paint(): painter is not active.");
    +
    +  WRectF rect = rectangle;
    +
    +  if (rect.isEmpty())
    +    rect = painter.window();
    +
    +  WChart2DRenderer *renderer = createRenderer(painter, rect);
    +  renderer->render();
    +  delete renderer;
    +}
    +
    +WChart2DRenderer *WCartesianChart::createRenderer(WPainter& painter,
    +						  const WRectF& rectangle) const
    +{
    +  return new WChart2DRenderer(const_cast<WCartesianChart *>(this),
    +			      painter, rectangle);
    +}
    +
    +void WCartesianChart::paintEvent(WPaintDevice *paintDevice)
    +{
    +  while (!areas().empty())
    +    delete areas().front();
    +
    +  WPainter painter(paintDevice);
    +  painter.setRenderHint(WPainter::Antialiasing);
    +  paint(painter);
    +}
    +
    +void WCartesianChart::drawMarker(const WDataSeries& series,
    +				 WPainterPath& result)
    +  const
    +{
    +  const double size = series.markerSize();
    +  const double hsize = size/2;
    +
    +  switch (series.marker()) {
    +  case CircleMarker:
    +    result.addEllipse(-hsize, -hsize, size, size);
    +    break;
    +  case SquareMarker:
    +    result.addRect(WRectF(-hsize, -hsize, size, size));
    +    break;
    +  case CrossMarker:
    +    result.moveTo(-1.3 * hsize, 0);
    +    result.lineTo(1.3 * hsize, 0);
    +    result.moveTo(0, -1.3 * hsize);
    +    result.lineTo(0, 1.3 * hsize);
    +    break;
    +  case XCrossMarker:
    +    result.moveTo(-hsize, -hsize);
    +    result.lineTo(hsize, hsize);
    +    result.moveTo(-hsize, hsize);
    +    result.lineTo(hsize, -hsize);
    +    break;
    +  case TriangleMarker:
    +    result.moveTo(0, -hsize);
    +    result.lineTo(hsize, 0.6 * hsize);
    +    result.lineTo(-hsize, 0.6 * hsize);
    +    result.closeSubPath();
    +    break;
    +  default:
    +    ;
    +  }
    +}
    +
    +void WCartesianChart::renderLegendIcon(WPainter& painter,
    +				       const WPointF& pos,
    +				       const WDataSeries& series) const
    +{
    +  switch (series.type()) {
    +  case BarSeries: {
    +    WPainterPath path;
    +    path.moveTo(-6, 8);
    +    path.lineTo(-6, -8);
    +    path.lineTo(6, -8);
    +    path.lineTo(6, 8);
    +    painter.setPen(series.pen());
    +    painter.setBrush(series.brush());
    +    painter.translate(pos.x() + 7.5, pos.y());  
    +    painter.drawPath(path);
    +    painter.translate(-(pos.x() + 7.5), -pos.y());
    +    break;
    +  }
    +  case LineSeries:
    +  case CurveSeries: {
    +    painter.setPen(series.pen());
    +    double offset = (series.pen().width() == 0 ? 0.5 : 0);
    +    painter.drawLine(pos.x(), pos.y() + offset, pos.x() + 16, pos.y() + offset);
    +  }
    +    // no break;
    +  case PointSeries: {
    +    WPainterPath path;
    +    drawMarker(series, path);
    +    if (!path.isEmpty()) {
    +      painter.translate(pos.x() + 8, pos.y());  
    +      painter.setPen(series.markerPen());
    +      painter.setBrush(series.markerBrush());
    +      painter.drawPath(path);
    +      painter.translate(- (pos.x() + 8), -pos.y());
    +    }
    +
    +    break;
    +  }
    +  }
    +}
    +
    +void WCartesianChart::renderLegendItem(WPainter& painter,
    +				      const WPointF& pos,
    +				      const WDataSeries& series) const
    +{
    +  WPen fontPen = painter.pen();
    +
    +  renderLegendIcon(painter, pos, series);
    +
    +  painter.setPen(fontPen);
    +  painter.drawText(pos.x() + 17, pos.y() - 10, 100, 20,
    +		   AlignLeft | AlignMiddle,
    +		   asString(model()->headerData(series.modelColumn())));
    +}
    +
    +WWidget* WCartesianChart::createLegendItemWidget(int index)
    +{
    +  WContainerWidget* legendItem = new WContainerWidget();
    +
    +  legendItem->addWidget(new IconWidget(this, index));
    +  WText* label = new WText(asString(model()->headerData(index)));
    +  label->setVerticalAlignment(AlignTop);
    +  legendItem->addWidget(label);
    +
    +  return legendItem;
    +}
    +
    +void WCartesianChart::addDataPointArea(const WDataSeries& series,
    +				       const WModelIndex& xIndex,
    +				       WAbstractArea *area)
    +{
    +  addArea(area);
    +}
    +
    +void WCartesianChart::initLayout(const WRectF& rectangle)
    +{
    +  WRectF rect = rectangle;
    +
    +  if (rect.isEmpty())
    +    rect = WRectF(0, 0, width().toPixels(), height().toPixels());
    +
    +  WPainter painter;
    +  WChart2DRenderer *renderer = createRenderer(painter, rect);
    +  renderer->initLayout();
    +  delete renderer;
    +}
    +
    +WPointF WCartesianChart::mapFromDevice(const WPointF& point, Axis ordinateAxis)
    +  const
    +{
    +  const WAxis& xAxis = axis(XAxis);
    +  const WAxis& yAxis = axis(ordinateAxis);
    +
    +  WPointF p = inverseHv(point.x(), point.y(), width().toPixels());
    +
    +  return WPointF(xAxis.mapFromDevice(p.x()), yAxis.mapFromDevice(p.y()));
    +}
    +
    +WPointF WCartesianChart::mapToDevice(const boost::any& xValue,
    +				     const boost::any& yValue,
    +				     Axis ordinateAxis, int xSegment,
    +				     int ySegment) const
    +{
    +  const WAxis& xAxis = axis(XAxis);
    +  const WAxis& yAxis = axis(ordinateAxis);
    +  
    +  return hv(xAxis.mapToDevice(xValue, xSegment),
    +	    yAxis.mapToDevice(yValue, ySegment),
    +	    width().toPixels());
    +}
    +
    +WPointF WCartesianChart::hv(double x, double y,
    +			    double width) const
    +{
    +  if (orientation_ == Vertical)
    +    return WPointF(x, y);
    +  else
    +    return WPointF(width - y, x);
    +}
    +
    +WPointF WCartesianChart::inverseHv(double x, double y, double width) const
    +{
    +   if (orientation_ == Vertical)
    +    return WPointF(x, y);
    +  else
    +    return WPointF(y, width - x); 
    +}
    +
    +void WCartesianChart::modelColumnsInserted(const WModelIndex& parent,
    +					   int start, int end)
    +{
    +  for (unsigned i = 0; i < series_.size(); ++i)
    +    if (series_[i].modelColumn() >= start)
    +      series_[i].modelColumn_ += (end - start + 1);
    +}
    +
    +void WCartesianChart::modelColumnsRemoved(const WModelIndex& parent,
    +					  int start, int end)
    +{
    +  bool needUpdate = false;
    +
    +  for (unsigned i = 0; i < series_.size(); ++i)
    +    if (series_[i].modelColumn() >= start) {
    +      if (series_[i].modelColumn() <= end) {
    +	series_.erase(series_.begin() + i);
    +	needUpdate = true;
    +	--i;
    +      } else {
    +	series_[i].modelColumn_ -= (end - start + 1);
    +      }
    +    }
    +
    +  if (needUpdate)
    +    update();
    +}
    +
    +void WCartesianChart::modelRowsInserted(const WModelIndex& parent,
    +					int start, int end)
    +{
    +  update();
    +}
    +
    +void WCartesianChart::modelRowsRemoved(const WModelIndex& parent,
    +				       int start, int end)
    +{
    +  update();
    +}
    +
    +void WCartesianChart::modelDataChanged(const WModelIndex& topLeft,
    +				       const WModelIndex& bottomRight)
    +{
    +  if (XSeriesColumn_ <= topLeft.column()
    +      && XSeriesColumn_ >= bottomRight.column()) {
    +    update();
    +    return;
    +  }
    +
    +  for (unsigned i = 0; i < series_.size(); ++i) {
    +    if (series_[i].modelColumn() >= topLeft.column()
    +	&& series_[i].modelColumn() <= bottomRight.column()) {
    +      update();
    +      break;
    +    }
    +  }
    +}
    +
    +void WCartesianChart::modelChanged()
    +{
    +  XSeriesColumn_ = -1;
    +  series_.clear();
    +
    +  update();
    +}
    +
    +void WCartesianChart::modelReset()
    +{
    +  update();
    +}
    +
    +WCartesianChart::IconWidget::IconWidget(WCartesianChart *chart, 
    +					int index, 
    +					WContainerWidget *parent) 
    +  : WPaintedWidget(parent),
    +    chart_(chart),
    +    index_(index)
    +{
    +  setInline(true);
    +  resize(20, 20);
    +}
    +
    +void WCartesianChart::IconWidget::paintEvent(Wt::WPaintDevice *paintDevice) 
    +{
    +  Wt::WPainter painter(paintDevice);
    +  chart_->renderLegendIcon(painter, 
    +			   WPointF(2.5, 10.0), 
    +			   chart_->series(index_));
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer b/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer
    new file mode 100644
    index 0000000..074a294
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer
    @@ -0,0 +1,359 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WCHART_2D_RENDERER_H_
    +#define CHART_WCHART_2D_RENDERER_H_
    +
    +#include <Wt/Chart/WAxis>
    +
    +#include <Wt/WPainterPath>
    +#include <Wt/WRectF>
    +#include <Wt/WGlobal>
    +
    +namespace Wt {
    +
    +class WColor;
    +class WModelIndex;
    +class WPointF;
    +class WPainter;
    +class WString;
    +
    +  namespace Chart {
    +
    +class WDataSeries;
    +class WCartesianChart;
    +
    +/*! \class SeriesIterator Wt/Chart/WChart2DRenderer Wt/Chart/WChart2DRenderer
    + *  \brief Abstract base class for iterating over series data in
    + *         WChart2DRenderer.
    + *
    + * This class is specialized for rendering series data.
    + *
    + * \sa WChart2DRenderer::iterateSeries()
    + *
    + * \ingroup charts
    + */
    +class WT_API SeriesIterator {
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~SeriesIterator();
    +
    +  /*! \brief Start handling a new segment.
    +   *
    +   * Because of a 'break' specified in an axis, axes may be divided in
    +   * one or two segments (in fact only the API limits this now to
    +   * two). The iterator will iterate all segments seperately, but each time
    +   * with a different clipping region specified in the painter, corresponding
    +   * to that segment.
    +   *
    +   * The <i>currentSegmentArea</i> specifies the clipping area.
    +   */
    +  virtual void startSegment(int currentXSegment, int currentYSegment,
    +			    const WRectF& currentSegmentArea);
    +
    +  /*! \brief End handling a particular segment.
    +   *
    +   * \sa startSegment()
    +   */
    +  virtual void endSegment();
    +
    +  /*! \brief Start iterating a particular series.
    +   *
    +   * Returns whether the series values should be iterated.
    +   * The <i>groupWidth</i> is the width (in pixels) of a single bar
    +   * group. The chart contains <i>numBarGroups</i>, and the current
    +   * series is in the <i>currentBarGroup</i>'th group.
    +   */
    +  virtual bool startSeries(const WDataSeries& series, double groupWidth,
    +			   int numBarGroups, int currentBarGroup);
    +
    +  /*! \brief End iterating a particular series.
    +   */
    +  virtual void endSeries();
    +
    +  /*! \brief Process a value.
    +   *
    +   * Processes a value with model coordinates (<i>x</i>,
    +   * <i>y</i>). The y value may differ from the model's y value,
    +   * because of stacked series. The y value here corresponds to the
    +   * location on the chart, after stacking.
    +   *
    +   * The <i>stackY</i> argument is the y value from the previous
    +   * series (also after stacking). It will be 0, unless this series is
    +   * stacked.
    +   */
    +  virtual void newValue(const WDataSeries& series, double x, double y,
    +			double stackY, const WModelIndex& xIndex,
    +			const WModelIndex& yIndex);
    +
    +  /*! \brief Returns the current X segment.
    +   */
    +  int currentXSegment() const { return currentXSegment_; }
    +
    +  /*! \brief Returns the current Y segment.
    +   */
    +  int currentYSegment() const { return currentYSegment_; }
    +
    +private:
    +  int currentXSegment_, currentYSegment_;
    +};
    +
    +/*! \class WChart2DRenderer Wt/Chart/WChart2DRenderer Wt/Chart/WChart2DRenderer
    + *  \brief Helper class for rendering a cartesian chart.
    + *
    + * This class is used by WCartesianChart during rendering, and
    + * normally, you will not need to use this class directly. You may want to
    + * specialize this class if you want to override particular aspects of how
    + * the chart is renderered. In that case, you will want to instantiate the
    + * specialized class in WCartesianChart::createRenderer().
    + *
    + * To simplify the simulatenous handling of Horizontal and Vertical
    + * charts, the renderer makes abstraction of the orientation of the
    + * chart: regardless of the chart orientation, the width() corresponds
    + * to the length along the X axis, and height() corresponds to the
    + * length along the Y axis. Similarly, calcChartArea() and chartArea()
    + * return a rectangle where the bottom side corresponds to the lowest
    + * displayed Y values, and the left side corresponds to the lowest
    + * displayed X values. To map these "chart coordinates" to painter
    + * coordinates, use one of the hv() methods.
    + *
    + * <i>Note, this class is part of the internal charting API, and may
    + * be subject of changes and refactorings.</i>
    + *
    + * \ingroup charts
    + */
    +class WT_API WChart2DRenderer
    +{
    +public:
    +  /*! \brief Creates a renderer.
    +   *
    +   * Creates a renderer for the cartesian chart <i>chart</i>, for rendering
    +   * in the specified <i>rectangle</i> of the <i>painter</i>.
    +   */
    +  WChart2DRenderer(WCartesianChart *chart,
    +		   WPainter& painter, const WRectF& rectangle);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WChart2DRenderer();
    +
    +  /*! \brief Returns the corresponding chart.
    +   */
    +  WCartesianChart *chart() { return chart_; }
    +
    +  /*! \brief Returns a reference to the painter.
    +   */
    +  WPainter& painter() { return painter_; }
    +
    +  /*! \brief Returns the main plotting area rectangle.
    +   *
    +   * This area is calculated and cached by calcChartArea().
    +   */
    +  WRectF chartArea() { return chartArea_; }
    +
    +  /*! \brief Calculates the main plotting area rectangle.
    +   *
    +   * This method calculates the main plotting area, and stores it in
    +   * the member chartArea_. The default implementation simply removes
    +   * the plot area padding from the entire painting rectangle.
    +   *
    +   * \sa WCartesianChart::plotAreaPadding().
    +   */
    +  virtual void calcChartArea();
    +
    +  /*! \brief Initializes the layout.
    +   *
    +   * This computes the chart plotting area dimensions, and intializes
    +   * the axes so that they provide a suitable mapping from logical
    +   * coordinates to device coordinates.
    +   */
    +  void initLayout();
    +
    +  /*! \brief Renders the chart.
    +   *
    +   * This method renders the chart. The default implementation does
    +   * the following:
    +   * \if cpp
    +   * \code
    +   * calcChartArea();           // sets chartArea_
    +   * prepareAxes();             // provides logical dimensions to the axes
    +   *
    +   * renderBackground();        // render the background
    +   * renderAxes(Grid);          // render the grid
    +   * renderSeries();            // render the data series
    +   * renderAxes(Line | Labels); // render the axes (lines & labels)
    +   * renderLegend();            // render legend and titles
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * calcChartArea();           // sets chartArea_
    +   * prepareAxes();             // provides logical dimensions to the axes
    +   * 
    +   * renderBackground();        // render the background
    +   * renderAxes(Grid);          // render the grid
    +   * renderSeries();            // render the data series
    +   * renderAxes(AxisProperty.Line, AxisProperty.Labels); // render the axes (lines & labels) 
    +   * renderLegend();            // render legend and titles
    +   * \endcode
    +   * \endif
    +   *
    +   * You may want to reimplement this method to change the sequence of
    +   * steps for rendering the chart.
    +   */
    +  virtual void render();
    +
    +  /*! \brief Maps a (X, Y) point to chart coordinates.
    +   *
    +   * This method maps the point with given (<i>xValue</i>,
    +   * <i>yValue</i>) to chart coordinates. The y value is mapped by one
    +   * of the Y axes indicated by <i>axis</i>.
    +   *
    +   * Note that chart coordinates may not be the same as painter
    +   * coordinates, because of the chart orientation. To map from chart
    +   * coordinates to painter coordinates, use hv().
    +   *
    +   * The <i>currentXSegment</i> and <i>currentYSegment</i> specify the
    +   * axis segments in which you wish to map the point.
    +   */
    +  virtual WPointF map(double xValue, double yValue, Axis axis = OrdinateAxis,
    +		      int currentXSegment = 0, int currentYSegment = 0)
    +    const;
    +
    +  /*! \brief Utility function for rendering text.
    +   *
    +   * This method renders text on the chart position <i>pos</i>, with a
    +   * particular alignment <i>flags</i>. These are both specified in
    +   * chart coordinates. The position is converted to painter
    +   * coordinates using hv(), and the alignment flags are changed
    +   * accordingly. The rotation, indicated by <i>angle</i> is specified
    +   * in painter coordinates and thus an angle of 0 always indicates
    +   * horizontal text, regardless of the chart orientation.
    +   */
    +  void renderLabel(const WString& text, const WPointF& pos,
    +		   const WColor& color, WFlags<AlignmentFlag> flags,
    +		   double angle, int margin);
    +
    +  /*! \brief Conversion between chart and painter coordinates.
    +   *
    +   * Converts from chart coordinates to painter coordinates, taking
    +   * into account the chart orientation.
    +   */
    +  WPointF hv(double x, double y) const;
    +
    +  /*! \brief Conversion between chart and painter coordinates.
    +   *
    +   * Converts from chart coordinates to painter coordinates, taking
    +   * into account the chart orientation.
    +   */
    +  WPointF hv(const WPointF& f) const;
    +
    +  /*! \brief Conversion between chart and painter coordinates.
    +   *
    +   * Converts from chart coordinates to painter coordinates, taking
    +   * into account the chart orientation.
    +   */
    +  WRectF hv(const WRectF& f) const;
    +
    +  /*! \brief Returns the segment area for a combination of X and Y
    +   *         segments.
    +   *
    +   * This segment area is used for clipping when rendering in a
    +   * particular segment.
    +   */
    +  WRectF chartSegmentArea(WAxis yAxis, int xSegment, int ySegment) const;
    +
    +  /*! \brief Enumeration that specifies a property of the axes.
    +   */
    +  enum AxisProperty {
    +    Labels = 0x1,  //! Labels property. 
    +    Grid = 0x2,    //! Grid property.
    +    Line = 0x4     //! Line property.
    +  };
    +
    +protected:
    +  /*! \brief Prepares the axes for rendering.
    +   *
    +   * Computes axis properties such as the range (if not manually
    +   * specified), label interval (if not manually specified) and axis
    +   * locations. These properties are stored within the axes (we may
    +   * want to change that later to allow for reentrant rendering by
    +   * multiple renderers ?).
    +   */
    +  virtual void prepareAxes();
    +
    +  /*! \brief Renders the background.
    +   */
    +  virtual void renderBackground();
    +
    +  /*! \brief Renders one or more properties of the axes.
    +   */
    +  virtual void renderAxes(WFlags<AxisProperty> properties);
    +
    +  /*! \brief Renders all series data, including value labels.
    +   */
    +  virtual void renderSeries();
    +
    +  /*! \brief Renders the (default) legend and chart titles.
    +   */
    +  virtual void renderLegend();
    +
    +  /*! \brief Returns the width along the X axis (as if orientation is Vertical)
    +   */
    +  int width() const { return width_; }
    +
    +  /*! \brief Returns the height along the Y axis (as if orientation is Vertical)
    +   */
    +  int height() const { return height_; }
    +
    +  /*! \brief Returns the segment margin.
    +   *
    +   * This is the separation between segments, and defaults to 40 pixels.
    +   */
    +  int segmentMargin() const { return segmentMargin_; }
    +
    +private:
    +  WCartesianChart *chart_;
    +
    +  WPainter& painter_;
    +  int       width_;
    +  int       height_;
    +  int       segmentMargin_;
    +
    +  WRectF    chartArea_;
    +
    +  WPainterPath tildeStartMarker_, tildeEndMarker_;
    +
    +protected:
    +  /*! \brief The computed axis locations.
    +   *
    +   * \sa prepareAxes()
    +   */
    +  AxisValue location_[3];
    +
    +  /*! \brief Renders properties of one axis.
    +   *
    +   * \sa renderAxes()
    +   */
    +  void renderAxis(const WAxis& axis, WFlags<AxisProperty> properties);
    +
    +  /*! \brief Calculates the total number of bar groups.
    +   */
    +  int calcNumBarGroups();
    +
    +  /*! \brief Iterates over the series using an iterator.
    +   */
    +  void iterateSeries(SeriesIterator *iterator, bool reverseStacked = false);
    +
    +  friend class WAxis;
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WChart2DRenderer::AxisProperty)
    +
    +  }
    +}
    +
    +#endif // CHART_WCHART_2D_RENDERER_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer.C b/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer.C
    new file mode 100644
    index 0000000..1ee39e8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WChart2DRenderer.C
    @@ -0,0 +1,1474 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cmath>
    +
    +#include "Wt/Chart/WChart2DRenderer"
    +#include "Wt/Chart/WCartesianChart"
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WCircleArea"
    +#include "Wt/WDate"
    +#include "Wt/WPainter"
    +#include "Wt/WPolygonArea"
    +#include "Wt/WRectArea"
    +
    +#include "Utils.h"
    +
    +#include <limits>
    +#include <float.h>
    +
    +namespace {
    +  const int TICK_LENGTH = 5;
    +}
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +SeriesIterator::~SeriesIterator()
    +{ }
    +
    +void SeriesIterator::startSegment(int currentXSegment, int currentYSegment,
    +				  const WRectF& currentSegmentArea)
    +{
    +  currentXSegment_ = currentXSegment;
    +  currentYSegment_ = currentYSegment;
    +}
    +
    +void SeriesIterator::endSegment()
    +{
    +}
    +
    +bool SeriesIterator::startSeries(const WDataSeries& series, double groupWidth,
    +				 int numBarGroups, int currentBarGroup)
    +{
    +  return true;
    +}
    +
    +void SeriesIterator::endSeries()
    +{ }
    +
    +void SeriesIterator::newValue(const WDataSeries& series,
    +			      double x, double y, double stackY,
    +			      const WModelIndex& xIndex,
    +			      const WModelIndex& yIndex)
    +{ }
    +
    +class SeriesRenderer;
    +
    +class SeriesRenderIterator : public SeriesIterator
    +{
    +public:
    +  SeriesRenderIterator(WChart2DRenderer& renderer);
    +
    +  virtual void startSegment(int currentXSegment, int currentYSegment,
    +			    const WRectF& currentSegmentArea);
    +  virtual void endSegment();
    +
    +  virtual bool startSeries(const WDataSeries& series, double groupWidth,
    +			   int numBarGroups, int currentBarGroup);
    +  virtual void endSeries();
    +
    +  virtual void newValue(const WDataSeries& series, double x, double y,
    +			double stackY,
    +			const WModelIndex& xIndex,
    +			const WModelIndex& yIndex);
    +
    +  double breakY(double y);
    +
    +private:
    +  WChart2DRenderer&  renderer_;
    +  const WDataSeries *series_;
    +  SeriesRenderer    *seriesRenderer_;
    +  double             minY_, maxY_;
    +};
    +
    +class SeriesRenderer {
    +public:
    +  virtual ~SeriesRenderer() { }
    +  virtual void addValue(double x, double y, double stacky,
    +			const WModelIndex& xIndex, const WModelIndex& yIndex) = 0;
    +  virtual void paint() = 0;
    +
    +protected:
    +  WChart2DRenderer&  renderer_;
    +  const WDataSeries& series_;
    +
    +  SeriesRenderer(WChart2DRenderer& renderer, const WDataSeries& series,
    +		 SeriesRenderIterator& it)
    +    : renderer_(renderer),
    +      series_(series),
    +      it_(it)
    +  { }
    +
    +  static double crisp(double u) {
    +    return std::floor(u) + 0.5;
    +  }
    +
    +  WPointF hv(const WPointF& p) {
    +    return renderer_.hv(p);
    +  }
    +
    +  WPointF hv(double x, double y) {
    +    return renderer_.hv(x, y);
    +  }
    +
    +protected:
    +  SeriesRenderIterator& it_;
    +};
    +
    +class LineSeriesRenderer : public SeriesRenderer {
    +public:
    +  LineSeriesRenderer(WChart2DRenderer& renderer,
    +		     const WDataSeries& series,
    +		     SeriesRenderIterator& it)
    +    : SeriesRenderer(renderer, series, it),
    +      curveLength_(0)
    +  { }
    +
    +  void addValue(double x, double y, double stacky,
    +		const WModelIndex& xIndex, const WModelIndex& yIndex) {
    +    WPointF p = renderer_.map(x, y, series_.axis(),
    +			      it_.currentXSegment(), it_.currentYSegment());
    +
    +    if (curveLength_ == 0) {
    +      curve_.moveTo(hv(p));
    +
    +      if (series_.fillRange() != NoFill
    +	  && series_.brush() != NoBrush) {
    +	fill_.moveTo(hv(fillOtherPoint(x)));
    +	fill_.lineTo(hv(p));
    +      }
    +    } else {
    +      if (series_.type() == LineSeries) {
    +	curve_.lineTo(hv(p));
    +	fill_.lineTo(hv(p));
    +      } else {
    +	if (curveLength_ == 1) {
    +	  computeC(p0, p, c_);
    +	} else {
    +	  WPointF c1, c2;
    +	  computeC(p_1, p0, p, c1, c2);
    +	  curve_.cubicTo(hv(c_), hv(c1), hv(p0));
    +	  fill_.cubicTo(hv(c_), hv(c1), hv(p0));
    +	  c_ = c2;
    +	}
    +      }
    +    }
    +
    +    p_1 = p0;
    +    p0 = p;
    +    lastX_ = x;
    +    ++curveLength_;
    +  }
    +
    +  void paint() {
    +    if (curveLength_ > 1) {
    +      if (series_.type() == CurveSeries) {
    +	WPointF c1;
    +	computeC(p0, p_1, c1);
    +	curve_.cubicTo(hv(c_), hv(c1), hv(p0));
    +	fill_.cubicTo(hv(c_), hv(c1), hv(p0));
    +      }
    +
    +      if (series_.fillRange() != NoFill
    +	  && series_.brush() != NoBrush) {
    +	fill_.lineTo(hv(fillOtherPoint(lastX_)));
    +	fill_.closeSubPath();
    +	renderer_.painter().setShadow(series_.shadow());
    +	renderer_.painter().fillPath(fill_, series_.brush());
    +      }
    +
    +      if (series_.fillRange() == NoFill)
    +	renderer_.painter().setShadow(series_.shadow());
    +      else
    +	renderer_.painter().setShadow(WShadow());
    +
    +      renderer_.painter().strokePath(curve_, series_.pen());
    +    }
    +
    +    curveLength_ = 0;
    +    curve_ = WPainterPath();
    +    fill_ = WPainterPath();
    +  }
    +
    +private:
    +  int curveLength_;
    +  WPainterPath curve_;
    +  WPainterPath fill_;
    +
    +  double  lastX_;
    +  WPointF p_1, p0, c_;
    +
    +  static double dist(const WPointF& p1, const WPointF& p2) {
    +    double dx = p2.x() - p1.x();
    +    double dy = p2.y() - p1.y();
    +    return std::sqrt (dx*dx + dy*dy);
    +  }
    +
    +  static void computeC(const WPointF& p, const WPointF& p1, WPointF& c) {
    +    c.setX(p.x() + 0.3 * (p1.x() - p.x()));
    +    c.setY(p.y() + 0.3 * (p1.y() - p.y()));
    +  }
    +
    +  static void computeC(const WPointF& p_1, const WPointF& p0, const WPointF& p1,
    +		       WPointF& c1, WPointF& c2) {
    +    double m1x = (p_1.x() + p0.x())/2.0;
    +    double m1y = (p_1.y() + p0.y())/2.0;
    +
    +    double m2x = (p0.x() + p1.x())/2.0;
    +    double m2y = (p0.y() + p1.y())/2.0;
    +
    +    double L1 = dist(p_1, p0);
    +    double L2 = dist(p0, p1);
    +    double r = L1/(L1 + L2);
    +
    +    c1.setX(p0.x() - r * (m2x - m1x));
    +    c1.setY(p0.y() - r * (m2y - m1y));
    +
    +    r = 1-r;
    +
    +    c2.setX(p0.x() - r * (m1x - m2x));
    +    c2.setY(p0.y() - r * (m1y - m2y));
    +  }
    +
    +  WPointF fillOtherPoint(double x) const {
    +    FillRangeType fr = series_.fillRange();
    +
    +    switch (fr) {
    +    case MinimumValueFill:
    +      return WPointF(renderer_.map(x, 0, series_.axis(),
    +				   it_.currentXSegment(),
    +				   it_.currentYSegment()).x(),
    +		     renderer_.chartArea().bottom());
    +    case MaximumValueFill:
    +      return WPointF(renderer_.map(x, 0, series_.axis(),
    +				   it_.currentXSegment(),
    +				   it_.currentYSegment()).x(),
    +		     renderer_.chartArea().top());
    +    case ZeroValueFill:
    +      return WPointF(renderer_.map(x, 0, series_.axis(),
    +				   it_.currentXSegment(),
    +				   it_.currentYSegment()));
    +    default:
    +      return WPointF();
    +    }
    +  }
    +};
    +
    +class BarSeriesRenderer : public SeriesRenderer {
    +public:
    +  BarSeriesRenderer(WChart2DRenderer& renderer, const WDataSeries& series,
    +		    SeriesRenderIterator& it,
    +		    double groupWidth, int numGroups, int group)
    +    : SeriesRenderer(renderer, series, it),
    +      groupWidth_(groupWidth),
    +      numGroups_(numGroups),
    +      group_(group)
    +  { }
    +
    +  void addValue(double x, double y, double stacky,
    +		const WModelIndex& xIndex, const WModelIndex& yIndex) {
    +    WPainterPath bar;
    +    const WAxis& yAxis = renderer_.chart()->axis(series_.axis());
    +
    +    WPointF topMid = renderer_.map(x, y, yAxis.id(),
    +				   it_.currentXSegment(),
    +				   it_.currentYSegment());
    +    WPointF bottomMid = renderer_.map(x, stacky, yAxis.id(),
    +				      it_.currentXSegment(),
    +				      it_.currentYSegment());
    +
    +    double g = numGroups_ + (numGroups_ - 1) * renderer_.chart()->barMargin();
    +
    +    double width = groupWidth_ / g;
    +    double left = topMid.x() - groupWidth_ / 2
    +      + group_ * width * (1 + renderer_.chart()->barMargin());
    +
    +    bar.moveTo(hv(crisp(left), crisp(topMid.y())));
    +    bar.lineTo(hv(crisp(left + width), crisp(topMid.y())));
    +    bar.lineTo(hv(crisp(left + width), crisp(bottomMid.y())));
    +    bar.lineTo(hv(crisp(left), crisp(bottomMid.y())));
    +    bar.closeSubPath();
    +
    +    renderer_.painter().setShadow(series_.shadow());
    +    renderer_.painter().fillPath(bar, series_.brush());
    +    renderer_.painter().setShadow(WShadow());
    +    renderer_.painter().strokePath(bar, series_.pen());
    +
    +    boost::any toolTip = yIndex.data(ToolTipRole);
    +    if (!toolTip.empty()) {
    +      WTransform t = renderer_.painter().worldTransform();
    +
    +      WPointF tl = t.map(segmentPoint(bar, 0));
    +      WPointF tr = t.map(segmentPoint(bar, 1));
    +      WPointF br = t.map(segmentPoint(bar, 2));
    +      WPointF bl = t.map(segmentPoint(bar, 3));
    +
    +      double tlx = 0, tly = 0, brx = 0, bry = 0;
    +      bool useRect = false;
    +      if (fequal(tl.y(), tr.y())) {
    +	tlx = std::min(tl.x(), tr.x());
    +	brx = std::max(tl.x(), tr.x());
    +	tly = std::min(tl.y(), bl.y());
    +	bry = std::max(tl.y(), br.y());
    +
    +	useRect = true;
    +      } else if (fequal(tl.x(), tr.x())) {
    +	tlx = std::min(tl.x(), bl.x());
    +	brx = std::max(tl.x(), bl.x());
    +	tly = std::min(tl.y(), tr.y());
    +	bry = std::max(tl.y(), tr.y());
    +
    +	useRect = true;
    +      }
    +
    +      WAbstractArea *area;
    +      if (useRect)
    +	area = new WRectArea(tlx, tly, (brx - tlx), (bry - tly));
    +      else {
    +	WPolygonArea *poly = new WPolygonArea();
    +	poly->addPoint(tl.x(), tl.y());
    +	poly->addPoint(tr.x(), tr.y());
    +	poly->addPoint(br.x(), br.y());
    +	poly->addPoint(bl.x(), bl.y());
    +	area = poly;
    +      }
    +
    +      area->setToolTip(asString(toolTip));
    +      renderer_.chart()->addDataPointArea(series_, xIndex, area);
    +    }
    +
    +    double bTopMidY = it_.breakY(topMid.y());
    +    double bBottomMidY = it_.breakY(bottomMid.y());
    +
    +    if (bTopMidY > topMid.y() && bBottomMidY <= bottomMid.y()) {
    +      WPainterPath breakPath;
    +      breakPath.moveTo(hv(left - 10, bTopMidY + 10));
    +      breakPath.lineTo(hv(left + width + 10, bTopMidY + 1));
    +      breakPath.lineTo(hv(left + width + 10, bTopMidY - 1));
    +      breakPath.lineTo(hv(left - 10, bTopMidY - 1));
    +      renderer_.painter().setPen(NoPen);
    +      renderer_.painter().setBrush(renderer_.chart()->background());
    +      renderer_.painter().drawPath(breakPath);
    +      renderer_.painter().setPen(WPen());
    +      renderer_.painter().drawLine(hv(left - 10, bTopMidY + 10),
    +				   hv(left + width + 10, bTopMidY + 1));
    +    }
    +
    +    if (bBottomMidY < bottomMid.y() && bTopMidY >= topMid.y()) {
    +      WPainterPath breakPath;
    +      breakPath.moveTo(hv(left + width + 10, bBottomMidY - 10));
    +      breakPath.lineTo(hv(left - 10, bBottomMidY - 1));
    +      breakPath.lineTo(hv(left - 10, bBottomMidY + 1));
    +      breakPath.lineTo(hv(left + width + 10, bBottomMidY + 1));
    +      renderer_.painter().setBrush(renderer_.chart()->background());
    +      renderer_.painter().setPen(NoPen);
    +      renderer_.painter().drawPath(breakPath);
    +      renderer_.painter().setPen(WPen());
    +      renderer_.painter().drawLine(hv(left - 10, bBottomMidY - 1),
    +				   hv(left + width + 10, bBottomMidY - 10));
    +    }
    +  }
    +
    +  void paint() { }
    +
    +private:
    +  static Wt::WPointF segmentPoint(const Wt::WPainterPath& path, int segment)
    +  {
    +    const Wt::WPainterPath::Segment& s = path.segments()[segment];
    +    return Wt::WPointF(s.x(), s.y());
    +  }
    +
    +  static bool fequal(double d1, double d2) {
    +    return std::fabs(d1 - d2) < 1E-5;
    +  }
    +
    +private:
    +  double groupWidth_;
    +  int numGroups_;
    +  int group_;
    +};
    +
    +SeriesRenderIterator::SeriesRenderIterator(WChart2DRenderer& renderer)
    +  : renderer_(renderer),
    +    series_(0)
    +{ }
    +
    +void SeriesRenderIterator::startSegment(int currentXSegment,
    +					int currentYSegment,
    +					const WRectF& currentSegmentArea)
    +{
    +  SeriesIterator::startSegment(currentXSegment, currentYSegment,
    +			       currentSegmentArea);
    +
    +  const WAxis& yAxis = renderer_.chart()->axis(series_->axis());
    +
    +  if (currentYSegment == 0)
    +    maxY_ = DBL_MAX;
    +  else
    +    maxY_ = currentSegmentArea.bottom();
    +
    +  if (currentYSegment == yAxis.segmentCount() - 1)
    +    minY_ = -DBL_MAX;
    +  else
    +    minY_ = currentSegmentArea.top();
    +}
    +
    +void SeriesRenderIterator::endSegment()
    +{
    +  SeriesIterator::endSegment();
    +
    +  seriesRenderer_->paint();
    +}
    +
    +bool SeriesRenderIterator::startSeries(const WDataSeries& series,
    +				       double groupWidth,
    +				       int numBarGroups, int currentBarGroup)
    +{
    +  seriesRenderer_ = 0;
    +
    +  switch (series.type()) {
    +  case LineSeries:
    +  case CurveSeries:
    +    seriesRenderer_ = new LineSeriesRenderer(renderer_, series, *this);
    +    break;
    +  case BarSeries:
    +    seriesRenderer_ = new BarSeriesRenderer(renderer_, series, *this,
    +					    groupWidth,
    +					    numBarGroups, currentBarGroup);
    +  default:
    +    break;
    +  }
    +
    +  series_ = &series;
    +
    +  renderer_.painter().save();
    +
    +  return seriesRenderer_ != 0;
    +}
    +
    +void SeriesRenderIterator::endSeries()
    +{
    +  seriesRenderer_->paint();
    +  renderer_.painter().restore();
    +
    +  delete seriesRenderer_;
    +  series_ = 0;
    +}
    +
    +void SeriesRenderIterator::newValue(const WDataSeries& series,
    +				    double x, double y,
    +				    double stackY,
    +				    const WModelIndex& xIndex,
    +				    const WModelIndex& yIndex)
    +{
    +  if (Utils::isNaN(x) || Utils::isNaN(y))
    +    seriesRenderer_->paint();
    +  else
    +    seriesRenderer_->addValue(x, y, stackY, xIndex, yIndex);
    +}
    +
    +double SeriesRenderIterator::breakY(double y)
    +{
    +  if (y < minY_)
    +    return minY_;
    +  else if (y > maxY_)
    +    return maxY_;
    +  else
    +    return y;
    +}
    +
    +class LabelRenderIterator : public SeriesIterator
    +{
    +public:
    +  LabelRenderIterator(WChart2DRenderer& renderer)
    +    : renderer_(renderer)
    +  { }
    +
    +  virtual bool startSeries(const WDataSeries& series, double groupWidth,
    +			   int numBarGroups, int currentBarGroup)
    +  {
    +    if (series.isLabelsEnabled(XAxis)
    +	|| series.isLabelsEnabled(YAxis)) {
    +      groupWidth_ = groupWidth;
    +      numGroups_ = numBarGroups;
    +      group_ = currentBarGroup;
    +      return true;
    +    } else
    +      return false;
    +  }
    +
    +  virtual void newValue(const WDataSeries& series, double x, double y,
    +			double stackY,
    +			const WModelIndex& xIndex,
    +			const WModelIndex& yIndex)
    +  {
    +    if (Utils::isNaN(x) || Utils::isNaN(y))
    +      return;
    +
    +    WString text;
    +
    +    if (series.isLabelsEnabled(XAxis)) {
    +      text = renderer_.chart()->axis(XAxis).label(x);
    +    }
    +
    +    if (series.isLabelsEnabled(YAxis)) {
    +      if (!text.empty())
    +	text += ": ";
    +      text += renderer_.chart()->axis(series.axis()).label(y - stackY);
    +    }
    +
    +    if (!text.empty()) {
    +      WPointF p = renderer_.map(x, y, series.axis(),
    +				currentXSegment(), currentYSegment());
    +      if (series.type() == BarSeries) {
    +	double g = numGroups_ + (numGroups_ - 1)
    +	  * renderer_.chart()->barMargin();
    +
    +	double width = groupWidth_ / g;
    +	double left = p.x() - groupWidth_ / 2 
    +	  + group_ * width * (1 + renderer_.chart()->barMargin());
    +
    +	p = WPointF(left + width/2, p.y());
    +      }
    +
    +      WColor c(black);
    +
    +      WFlags<AlignmentFlag> alignment;
    +      if (series.type() == BarSeries) {
    +	if (y < 0)
    +	  alignment = AlignCenter | AlignBottom;
    +	else
    +	  alignment = AlignCenter | AlignTop;
    +
    +	c = series.labelColor();
    +      } else {
    +	alignment = AlignCenter | AlignBottom;
    +	p.setY(p.y() - 3);
    +      }
    +
    +      renderer_.renderLabel(text, p, c, alignment, 0, 3);
    +    }
    +  }
    +
    +private:
    +  WChart2DRenderer& renderer_;
    +
    +  double groupWidth_;
    +  int numGroups_;
    +  int group_;
    +};
    +
    +class MarkerRenderIterator : public SeriesIterator
    +{
    +public:
    +  MarkerRenderIterator(WChart2DRenderer& renderer)
    +    : renderer_(renderer)
    +  { }
    +
    +  virtual bool startSeries(const WDataSeries& series, double groupWidth,
    +			   int numBarGroups, int currentBarGroup)
    +  {
    +    marker_ = WPainterPath();
    +
    +    if (series.marker() != NoMarker) {
    +      renderer_.chart()->drawMarker(series, marker_);
    +      renderer_.painter().save();
    +      renderer_.painter().setShadow(series.shadow());
    +    }
    +
    +    return true;
    +  }
    +
    +  virtual void endSeries()
    +  {
    +    renderer_.painter().restore();
    +  }
    +
    +  virtual void newValue(const WDataSeries& series, double x, double y,
    +			double stackY,
    +			const WModelIndex& xIndex,
    +			const WModelIndex& yIndex)
    +  {
    +    if (!Utils::isNaN(x) && !Utils::isNaN(y)) {
    +      WPointF p = renderer_.map(x, y, series.axis(),
    +				currentXSegment(), currentYSegment());
    +      
    +      if (!marker_.isEmpty()) {
    +	WPainter& painter = renderer_.painter();
    +	painter.save();
    +	painter.translate(hv(p));
    +
    +	WPen pen = WPen(series.markerPen());
    +
    +	boost::any penColor = yIndex.data(MarkerPenColorRole);
    +	if (penColor.empty() && xIndex.isValid())
    +	  penColor = xIndex.data(MarkerPenColorRole);
    +
    +	if (!penColor.empty())
    +	  pen.setColor(boost::any_cast<WColor>(penColor));
    +
    +	painter.setPen(pen);
    +
    +	WBrush brush = WBrush(series.markerBrush());
    +
    +	boost::any brushColor = yIndex.data(MarkerBrushColorRole);
    +	if (brushColor.empty() && xIndex.isValid())
    +	  brushColor = xIndex.data(MarkerBrushColorRole);
    +
    +	if (!brushColor.empty())
    +	  brush.setColor(boost::any_cast<WColor>(brushColor));
    +
    +	painter.setBrush(brush);
    +
    +	painter.drawPath(marker_);
    +	painter.restore();
    +      }
    +
    +      if (series.type() != BarSeries) {
    +	boost::any toolTip = yIndex.data(ToolTipRole);
    +	if (!toolTip.empty()) {
    +	  WTransform t = renderer_.painter().worldTransform();
    +
    +	  p = t.map(hv(p));
    +
    +	  WCircleArea *circleArea
    +	    = new WCircleArea(static_cast<int>(p.x()), static_cast<int>(p.y()), 5);
    +	  circleArea->setToolTip(asString(toolTip));
    +
    +	  renderer_.chart()->addDataPointArea(series, xIndex, circleArea);
    +	}
    +      }
    +    }
    +  }
    +
    +  WPointF hv(const WPointF& p) {
    +    return renderer_.hv(p);
    +  }
    +
    +  WPointF hv(double x, double y) {
    +    return renderer_.hv(x, y);
    +  }
    +
    +private:
    +  WChart2DRenderer& renderer_;
    +  WPainterPath      marker_;
    +};
    +
    +WChart2DRenderer::WChart2DRenderer(WCartesianChart *chart,
    +				   WPainter& painter, const WRectF& rectangle)
    +  : chart_(chart),
    +    painter_(painter)
    +{
    +  segmentMargin_ = 40;
    +
    +  painter_.save();
    +
    +  if (chart_->orientation() == Vertical) {
    +    painter_.translate(rectangle.topLeft());
    +
    +    width_ = (int)rectangle.width();
    +    height_ = (int)rectangle.height();
    +  } else {
    +    painter_.translate(rectangle.topLeft());
    +
    +    width_ = (int)rectangle.height();
    +    height_ = (int)rectangle.width();
    +  }
    +
    +  for (int i = 0; i < 3; ++i)
    +    location_[i] = MinimumValue;
    +}
    +
    +WChart2DRenderer::~WChart2DRenderer()
    +{
    +  painter_.restore();
    +}
    +
    +void WChart2DRenderer::initLayout()
    +{
    +  calcChartArea();           // sets chartArea_
    +  prepareAxes();             // provides logical dimensions to the axes
    +}
    +
    +void WChart2DRenderer::render()
    +{
    +  tildeStartMarker_ = WPainterPath();
    +  tildeStartMarker_.moveTo(0, 0);
    +  tildeStartMarker_.lineTo(0, segmentMargin_ - 25);
    +  tildeStartMarker_.moveTo(-15, segmentMargin_ - 10);
    +  tildeStartMarker_.lineTo(15, segmentMargin_ - 20);
    +
    +  tildeEndMarker_ = WPainterPath();
    +  tildeEndMarker_.moveTo(0, 0);
    +  tildeEndMarker_.lineTo(0, -(segmentMargin_ - 25));
    +  tildeEndMarker_.moveTo(-15, -(segmentMargin_ - 20));
    +  tildeEndMarker_.lineTo(15, -(segmentMargin_ - 10));
    +
    +  initLayout();
    +
    +  renderBackground();        // render the background
    +  renderAxes(Grid);          // render the grid
    +  renderSeries();            // render the data series
    +  renderAxes(Line | Labels); // render the axes (lines & labels)
    +  renderLegend();            // render legend and titles
    +}
    +
    +void WChart2DRenderer::prepareAxes()
    +{
    +  chart_->axis(XAxis).prepareRender(*this);
    +  chart_->axis(Y1Axis).prepareRender(*this);
    +  chart_->axis(Y2Axis).prepareRender(*this);
    +
    +  const WAxis& xAxis = chart_->axis(XAxis);
    +  const WAxis& yAxis = chart_->axis(YAxis);
    +  const WAxis& y2Axis = chart_->axis(Y2Axis);
    +
    +  if (xAxis.scale() == CategoryScale) {
    +    switch (xAxis.location()) {
    +    case MinimumValue:
    +    case ZeroValue:
    +      location_[XAxis] = MinimumValue;
    +      break;
    +    case MaximumValue:
    +      location_[XAxis] = MaximumValue;
    +    }
    +  }
    +
    +  for (int i = 0; i < 2; ++i) {
    +    WAxis axis = i == 0 ? xAxis : yAxis;
    +    WAxis other = i == 0 ? yAxis : xAxis;
    +    AxisValue location = axis.location();
    +
    +    if (location == ZeroValue) {
    +      if (other.segments_.front().renderMaximum < 0)
    +	location = MaximumValue;
    +      else if (other.segments_.front().renderMinimum > 0)
    +	location = MinimumValue;
    +    } else if (location == MinimumValue) {
    +      if (other.segments_.front().renderMinimum == 0)
    +	location = ZeroValue;
    +    } else
    +      if (other.segments_.front().renderMaximum == 0)
    +	location = MaximumValue;
    +
    +    location_[axis.id()] = location;
    +  }
    +
    +  // force Y axes to the sides when dual Y axes
    +  if (y2Axis.isVisible()) {
    +    if (!(location_[Y1Axis] == ZeroValue
    +	  && (xAxis.segments_.front().renderMinimum == 0)))
    +      location_[Y1Axis] = MinimumValue;
    +
    +    location_[Y2Axis] = MaximumValue;
    +  } else
    +    location_[Y2Axis] = MaximumValue;
    +
    +  // adjust axis borders to make them look neat and polished
    +  xAxis.setOtherAxisLocation(location_[YAxis]);
    +  yAxis.setOtherAxisLocation(location_[XAxis]);
    +  y2Axis.setOtherAxisLocation(location_[XAxis]);
    +}
    +
    +WPointF WChart2DRenderer::map(double xValue, double yValue,
    +			      Axis axis, int currentXSegment,
    +			      int currentYSegment) const
    +{
    +  const WAxis& xAxis = chart_->axis(XAxis);
    +  const WAxis& yAxis = chart_->axis(axis);
    +
    +  return WPointF(xAxis.mapToDevice(xValue, currentXSegment),
    +		 yAxis.mapToDevice(yValue, currentYSegment));
    +}
    +
    +void WChart2DRenderer::calcChartArea()
    +{
    +  if (chart_->orientation() == Vertical)
    +    chartArea_ = WRectF(chart_->plotAreaPadding(Left),
    +			chart_->plotAreaPadding(Top),
    +			std::max(1, width_ - chart_->plotAreaPadding(Left)
    +				 - chart_->plotAreaPadding(Right)),
    +			std::max(1, height_ - chart_->plotAreaPadding(Top)
    +				 - chart_->plotAreaPadding(Bottom)));
    +  else
    +    chartArea_ = WRectF(chart_->plotAreaPadding(Top),
    +			chart_->plotAreaPadding(Right),
    +			std::max(1, width_ - chart_->plotAreaPadding(Top)
    +				 - chart_->plotAreaPadding(Bottom)),
    +			std::max(1, height_ - chart_->plotAreaPadding(Right)
    +				 - chart_->plotAreaPadding(Left)));
    +}
    +
    +WRectF WChart2DRenderer::chartSegmentArea(WAxis yAxis, int xSegment,
    +					  int ySegment) const
    +{
    +  const WAxis& xAxis = chart_->axis(XAxis);
    +
    +  const WAxis::Segment& xs = xAxis.segments_[xSegment];
    +  const WAxis::Segment& ys = yAxis.segments_[ySegment];
    +
    +  // margin used when clipping, see also WAxis::prepareRender(),
    +  // when the renderMinimum/maximum is 0, clipping is done exact
    +  const int CLIP_MARGIN = 5;
    +
    +  double x1 = xs.renderStart
    +    + (xSegment == 0
    +       ? (xs.renderMinimum == 0 ? 0 : -CLIP_MARGIN)
    +       : -segmentMargin_/2);
    +  double x2 = xs.renderStart + xs.renderLength
    +    + (xSegment == xAxis.segmentCount() - 1
    +       ? (xs.renderMaximum == 0 ? 0 : CLIP_MARGIN)
    +       : segmentMargin_/2);
    +
    +  double y1 = ys.renderStart - ys.renderLength
    +    - (ySegment == yAxis.segmentCount() - 1
    +       ? (ys.renderMaximum == 0 ? 0 : CLIP_MARGIN)
    +       : segmentMargin_/2);
    +  double y2 = ys.renderStart
    +    + (ySegment == 0
    +       ? (ys.renderMinimum == 0 ? 0 : CLIP_MARGIN)
    +       : segmentMargin_/2);
    +
    +  return WRectF(std::floor(x1 + 0.5), std::floor(y1 + 0.5),
    +		std::floor(x2 - x1 + 0.5), std::floor(y2 - y1 + 0.5));
    +}
    +
    +void WChart2DRenderer::renderBackground()
    +{
    +  if (chart_->background().style() != NoBrush)
    +    painter_.fillRect(hv(chartArea_), chart_->background());
    +}
    +
    +void WChart2DRenderer::renderAxis(const WAxis& axis,
    +				  WFlags<AxisProperty> properties)
    +{
    +  bool vertical = axis.id() != XAxis;
    +
    +  WFont oldFont1 = painter_.font();
    +  WFont labelFont = axis.labelFont();
    +  painter_.setFont(labelFont);
    +
    +  double u = 0;
    +  enum { Left = 0x1, Right = 0x2, Both = 0x3 } tickPos = Left;
    +  AlignmentFlag labelHFlag = AlignLeft;
    +
    +  switch (location_[axis.id()]) {
    +  case MinimumValue:
    +    tickPos = Left;
    +
    +    if (vertical) {
    +      labelHFlag = AlignRight;
    +      u = chartArea_.left() - 0.5 - axis.margin();
    +    } else {
    +      labelHFlag = AlignTop;
    +      u = chartArea_.bottom() + 0.5 + axis.margin();
    +    }
    +
    +    break;
    +  case MaximumValue:
    +    tickPos = Right;
    +
    +    if (vertical) {
    +      labelHFlag = AlignLeft;
    +      u = chartArea_.right() + 0.5 + axis.margin();
    +    } else {
    +      labelHFlag = AlignBottom;
    +      u = chartArea_.top() - 0.5 - axis.margin();
    +    }
    +    break;
    +  case ZeroValue:
    +    tickPos = Both;
    +
    +    if (vertical) {
    +      labelHFlag = AlignRight;
    +      u = std::floor(map(0, 0, YAxis).x()) + 0.5;
    +    } else {
    +      labelHFlag = AlignTop;
    +      u = std::floor(map(0, 0, YAxis).y()) + 0.5;
    +    }
    +    break;
    +  }
    +
    +  for (int segment = 0; segment < axis.segmentCount(); ++segment) {
    +    const WAxis::Segment& s = axis.segments_[segment];
    +
    +    if ((properties & Line) && axis.isVisible()) { 
    +      painter_.setPen(axis.pen());
    +
    +      WPointF begin, end;
    +
    +      if (vertical) {
    +	begin = hv(u, s.renderStart);
    +	end = hv(u, s.renderStart - s.renderLength);
    +      } else {
    +	begin = hv(s.renderStart, u);
    +	end = hv(s.renderStart + s.renderLength, u);
    +      }
    +
    +      painter_.drawLine(begin, end);
    +
    +      bool rotate = (chart_->orientation() == Vertical) != vertical;
    +
    +      if (segment != 0) {
    +	painter_.save();
    +	painter_.translate(begin);
    +	if (rotate)
    +	  painter_.rotate(90);
    +	painter_.drawPath(tildeStartMarker_);
    +	painter_.restore();
    +      }
    +
    +      if (segment != axis.segmentCount() - 1) {
    +	painter_.save();
    +	painter_.translate(end);
    +	if (rotate)
    +	  painter_.rotate(90);
    +	painter_.drawPath(tildeEndMarker_);
    +	painter_.restore();	
    +      }
    +    }
    +
    +    WPainterPath gridPath;
    +    WPainterPath ticksPath;
    +
    +    std::vector<WAxis::TickLabel> ticks;
    +    axis.getLabelTicks(*this, ticks, segment);
    +
    +    const WAxis& other
    +      = axis.id() == XAxis ? chart_->axis(Y1Axis) : chart_->axis(XAxis);
    +    const WAxis::Segment& s0 = other.segments_.front();
    +    const WAxis::Segment& sn = other.segments_.back();
    +
    +    for (unsigned i = 0; i < ticks.size(); ++i) {
    +      double d = ticks[i].u;
    +
    +      double dd = axis.mapToDevice(d, segment);
    +
    +      dd = std::floor(dd) + 0.5;
    +
    +      int tickLength = ticks[i].tickLength == WAxis::TickLabel::Long
    +	? TICK_LENGTH : TICK_LENGTH / 2;
    +
    +      WPointF labelPos;
    +
    +      switch (location_[axis.id()]) {
    +      case MinimumValue:
    +	if (vertical)
    +	  labelPos = WPointF(u - tickLength, dd);
    +	else
    +	  labelPos = WPointF(dd, u + tickLength);
    +
    +	break;
    +      case MaximumValue:
    +	if (vertical)
    +	  labelPos = WPointF(u + tickLength, dd);
    +	else
    +	  labelPos = WPointF(dd, u - tickLength);
    +
    +	break;
    +      case ZeroValue:
    +	if (vertical) {
    +	  /* force labels at bottom and left even if axis is in middle */
    +	  if (chart_->type() == CategoryChart)
    +	    labelPos = WPointF(chartArea_.left() - 0.5
    +			       - axis.margin() - tickLength,
    +			       dd);
    +	  else
    +	    labelPos = WPointF(u - tickLength, dd);
    +      } else {
    +	  /* force labels at bottom and left even if axis is in middle */
    +	  if (chart_->type() == CategoryChart)
    +	    labelPos = WPointF(dd, chartArea_.bottom() + 0.5
    +			       + axis.margin() + tickLength);
    +	  else
    +	    labelPos = WPointF(dd, u + tickLength);
    +	}
    +      }
    +
    +      if (ticks[i].tickLength != WAxis::TickLabel::Zero) {
    +	if (vertical) {
    +	  ticksPath.moveTo(hv(u + (tickPos & Left ? -tickLength : 0), dd));
    +	  ticksPath.lineTo(hv(u + (tickPos & Right ? +tickLength : 0), dd));
    +	  if (ticks[i].tickLength == WAxis::TickLabel::Long) {
    +	    gridPath.moveTo(hv(s0.renderStart, dd));
    +	    gridPath.lineTo(hv(sn.renderStart + sn.renderLength, dd));
    +	  }
    +	} else {
    +	  ticksPath.moveTo(hv(dd, u + (tickPos & Right ? -tickLength : 0)));
    +	  ticksPath.lineTo(hv(dd, u + (tickPos & Left ? +tickLength : 0)));
    +	  if (ticks[i].tickLength == WAxis::TickLabel::Long) {
    +	    gridPath.moveTo(hv(dd, s0.renderStart));
    +	    gridPath.lineTo(hv(dd, sn.renderStart - sn.renderLength));
    +	  }
    +	}
    +      }
    +
    +      if ((properties & Labels) && !ticks[i].label.empty()
    +	  && axis.isVisible()) {
    +	WFlags<AlignmentFlag> labelFlags = labelHFlag;
    +
    +	if (vertical)
    +	  if (axis.labelAngle() == 0)
    +	    labelFlags |= AlignMiddle;
    +	  else if (axis.labelAngle() > 0)
    +	    labelFlags |= AlignTop;
    +	  else
    +	    labelFlags |= AlignBottom;
    +	else
    +	  if (axis.labelAngle() == 0)
    +	    labelFlags |= AlignCenter;
    +	  else if (axis.labelAngle() > 0)
    +	    labelFlags |= AlignRight;
    +	  else
    +	    labelFlags |= AlignLeft;
    +
    +	renderLabel(ticks[i].label,
    +		    labelPos, black, labelFlags, axis.labelAngle(), 3);
    +      }
    +    }
    +
    +    if ((properties & Grid) && axis.isGridLinesEnabled())
    +      painter_.strokePath(gridPath, axis.gridLinesPen());
    +
    +    if ((properties & Line) && axis.isVisible())
    +      painter_.strokePath(ticksPath, axis.pen());
    +
    +    if (segment == 0 && (properties & Labels) && !axis.title().empty()) {
    +      WFont oldFont2 = painter_.font();
    +      WFont titleFont = axis.titleFont();
    +      painter_.setFont(titleFont);
    +
    +      bool chartVertical = chart_->orientation() == Vertical;
    +
    +      if (vertical) {
    +	if (chartVertical)
    +	  renderLabel(axis.title(),
    +		      WPointF(u + (labelHFlag == AlignRight ? 15 : -15),
    +			      chartArea_.top() - 8),
    +		      black, labelHFlag | AlignBottom, 0, 0);
    +	else
    +	  renderLabel(axis.title(),
    +		      WPointF(u + (labelHFlag == AlignRight ? -40 : +40),
    +			      chartArea_.center().y()),
    +		      black,
    +		      (labelHFlag == AlignRight ? AlignLeft : AlignRight) |
    +		      AlignMiddle, 0, 0);
    +      } else {
    +	if (chartVertical)
    +	  renderLabel(axis.title(),
    +		      WPointF(chartArea_.center().x(), u + 22),
    +		      black, AlignTop | AlignCenter, 0, 0);
    +	else
    +	  renderLabel(axis.title(),
    +		      WPointF(chartArea_.right(), u),
    +		      black, AlignTop | AlignLeft, 0, 8);
    +      }
    +
    +      painter_.setFont(oldFont2);
    +    }
    +  }
    +
    +  painter_.setFont(oldFont1);
    +}
    +
    +void WChart2DRenderer::renderAxes(WFlags<AxisProperty> properties)
    +{
    +  renderAxis(chart_->axis(XAxis), properties);
    +  renderAxis(chart_->axis(Y1Axis), properties);
    +  renderAxis(chart_->axis(Y2Axis), properties);
    +}
    +
    +void WChart2DRenderer::iterateSeries(SeriesIterator *iterator,
    +				     bool reverseStacked)
    +{
    +  const std::vector<WDataSeries>& series = chart_->series();
    +  WAbstractItemModel *model = chart_->model();
    +  unsigned rows = model->rowCount();
    +
    +  double groupWidth;
    +  int numBarGroups;
    +  int currentBarGroup;
    +
    +#ifndef WT_TARGET_JAVA
    +  std::vector<double> stackedValuesInit(rows);
    +#else
    +  std::vector<double> stackedValuesInit;
    +  stackedValuesInit.insert(stackedValuesInit.begin(), rows, 0.0);
    +#endif // WT_TARGET_JAVA
    +
    +  const bool scatterPlot = chart_->type() == ScatterPlot;
    +
    +  if (scatterPlot) {
    +    numBarGroups = 1;
    +    currentBarGroup = 0;
    +  } else {
    +    numBarGroups = calcNumBarGroups();
    +    currentBarGroup = 0;
    +  }
    +
    +  bool containsBars = false;
    +  for (unsigned g = 0; g < series.size(); ++g) {
    +    if (series[g].isHidden())
    +      continue;
    +
    +    groupWidth = series[g].barWidth() * (map(2, 0).x() - map(1, 0).x());
    +
    +    if (containsBars)
    +      ++currentBarGroup;
    +    containsBars = false;
    +
    +    int startSeries, endSeries;
    +
    +    if (scatterPlot) {
    +      startSeries = endSeries = g;
    +    } else {
    +      for (unsigned i = 0; i < rows; ++i)
    +	stackedValuesInit[i] = 0.0;
    +
    +      if (reverseStacked) {
    +	endSeries = g;
    +
    +	Axis a = series[g].axis();
    +
    +	for (;;) {
    +	  if (g < series.size()
    +	      && (((int)g == endSeries) || series[g].isStacked())
    +	      && (series[g].axis() == a)) {
    +	    if (series[g].type() == BarSeries)
    +	      containsBars = true;
    +
    +	    for (unsigned row = 0; row < rows; ++row) {
    +	      double y
    +		= asNumber(model->data(row, series[g].modelColumn()));
    +
    +	      if (!Utils::isNaN(y))
    +		stackedValuesInit[row] += y;
    +	    }
    +
    +	    ++g;
    +	  } else
    +	    break;
    +	}
    +
    +	--g;
    +	startSeries = g;
    +      } else {
    +	startSeries = g;
    +
    +	Axis a = series[g].axis();
    +
    +	if (series[g].type() == BarSeries)
    +	  containsBars = true;
    +	++g;
    +
    +	for (;;) {
    +	  if (g < series.size() && series[g].isStacked()
    +	      && series[g].axis() == a) {
    +	    if (series[g].type() == BarSeries)
    +	      containsBars = true;
    +	    ++g;
    +	  } else
    +	    break;
    +	}
    +
    +	--g;
    +
    +	endSeries = g;
    +      }
    +    }
    +
    +    int i = startSeries;
    +    for (;;) {
    +      bool doSeries = 
    +	iterator->startSeries(series[i], groupWidth, numBarGroups,
    +			      currentBarGroup);
    +
    +      std::vector<double> stackedValues;
    +
    +      if (doSeries ||
    +	  (!scatterPlot && i != endSeries)) {
    +
    +	for (int currentXSegment = 0;
    +	     currentXSegment < chart_->axis(XAxis).segmentCount();
    +	     ++currentXSegment) {
    +
    +	  for (int currentYSegment = 0;
    +	       currentYSegment < chart_->axis(series[i].axis()).segmentCount();
    +	       ++currentYSegment) {
    +
    +	    stackedValues.clear();
    +	    Utils::insert(stackedValues, stackedValuesInit);
    +
    +	    WRectF csa = chartSegmentArea(chart_->axis(series[i].axis()),
    +					  currentXSegment, currentYSegment);
    +
    +	    iterator->startSegment(currentXSegment, currentYSegment, csa);
    +
    +	    painter_.save();
    +
    +	    WPainterPath clipPath;
    +	    clipPath.addRect(hv(csa));
    +	    painter_.setClipPath(clipPath);
    +	    painter_.setClipping(true);
    +
    +	    for (unsigned row = 0; row < rows; ++row) {
    +	      WModelIndex xIndex, yIndex;
    +
    +	      double x;
    +	      if (scatterPlot)
    +		if (chart_->XSeriesColumn() != -1) {
    +		  xIndex = model->index(row, chart_->XSeriesColumn());
    +		  x = asNumber(model->data(xIndex));
    +		} else
    +		  x = row;
    +	      else
    +		x = row;
    +
    +	      yIndex = model->index(row, series[i].modelColumn());
    +	      double y = asNumber(model->data(yIndex));
    +
    +	      double prevStack;
    +
    +	      if (scatterPlot)
    +		iterator->newValue(series[i], x, y, 0, xIndex, yIndex);
    +	      else {
    +		prevStack = stackedValues[row];
    +
    +		double nextStack = stackedValues[row];
    +		if (!Utils::isNaN(y)) {
    +		  if (reverseStacked)
    +		    nextStack -= y;
    +		  else
    +		    nextStack += y;
    +		}
    +
    +		stackedValues[row] = nextStack;
    +
    +		if (doSeries) {
    +		  if (reverseStacked)
    +		    iterator->newValue(series[i], x, prevStack, nextStack,
    +				       xIndex, yIndex);
    +		  else
    +		    iterator->newValue(series[i], x, nextStack, prevStack,
    +				       xIndex, yIndex);
    +		}
    +	      }
    +	    }
    +
    +	    iterator->endSegment();
    +
    +	    painter_.restore();
    +	  }
    +	}
    +
    +	stackedValuesInit.clear();
    +	Utils::insert(stackedValuesInit, stackedValues);
    +      }
    +
    +      if (doSeries)
    +	iterator->endSeries();
    +
    +      if (i == endSeries)
    +	break;
    +      else {
    +	if (endSeries < startSeries)
    +	  --i;
    +	else
    +	  ++i;
    +      }
    +    }
    +  }
    +}
    +
    +void WChart2DRenderer::renderSeries()
    +{
    +  {
    +    SeriesRenderIterator iterator(*this);
    +    iterateSeries(&iterator, true);
    +  }
    +
    +  {
    +    LabelRenderIterator iterator(*this);
    +    iterateSeries(&iterator);
    +  }
    +
    +  {
    +    MarkerRenderIterator iterator(*this);
    +    iterateSeries(&iterator);
    +  }
    +}
    +
    +int WChart2DRenderer::calcNumBarGroups()
    +{
    +  const std::vector<WDataSeries>& series = chart_->series();
    +
    +  int numBarGroups = 0;
    +
    +  bool newGroup = true;
    +  for (unsigned i = 0; i < series.size(); ++i)
    +    if (series[i].type() == BarSeries) {
    +      if (newGroup || !series[i].isStacked())
    +	++numBarGroups;
    +      newGroup = false;
    +    } else
    +      newGroup = true;
    +
    +  return numBarGroups;
    +}
    +
    +void WChart2DRenderer::renderLegend()
    +{
    +  bool vertical = chart_->orientation() == Vertical;
    +
    +  if (chart_->isLegendEnabled()) {
    +    int numSeriesWithLegend = 0;
    +
    +    for (unsigned i = 0; i < chart_->series().size(); ++i)
    +      if (chart_->series()[i].isLegendEnabled())
    +	++numSeriesWithLegend;
    +
    +    const int lineHeight = 25;
    +
    +    int x = int(vertical ? chartArea_.right()
    +		: height_ - chartArea_.top()) + 20;
    +
    +    if (vertical && chart_->axis(Y2Axis).isVisible())
    +      x += 40;
    +
    +    int y = (vertical
    +	     ? int(chartArea_.center().y()) : int(chartArea_.center().x()))
    +      - lineHeight * numSeriesWithLegend / 2; 
    +
    +    painter_.setPen(WPen());
    +
    +    for (unsigned i = 0; i < chart_->series().size(); ++i)
    +      if (chart_->series()[i].isLegendEnabled()) {
    +	chart_->renderLegendItem(painter_, WPointF(x, y + lineHeight/2),
    +				 chart_->series()[i]);
    +	y += lineHeight;
    +      }
    +  }
    +
    +  if (!chart_->title().empty()) {
    +    int x = (vertical ? width_/2 : height_/2);
    +    WFont oldFont = painter_.font();
    +    WFont titleFont = chart_->titleFont();
    +    painter_.setFont(titleFont);
    +    painter_.drawText(x - 50, 5, 100, 50,
    +		      AlignCenter | AlignTop,
    +		      chart_->title());
    +    painter_.setFont(oldFont);
    +  }
    +}
    +
    +void WChart2DRenderer::renderLabel(const WString& text, const WPointF& p,
    +				   const WColor& color,
    +				   WFlags<AlignmentFlag> flags,
    +				   double angle, int margin)
    +{
    +  AlignmentFlag horizontalAlign = flags & AlignHorizontalMask;
    +  AlignmentFlag verticalAlign = flags & AlignVerticalMask;
    +
    +  AlignmentFlag rHorizontalAlign = horizontalAlign;
    +  AlignmentFlag rVerticalAlign = verticalAlign;
    +
    +  double width = 100;
    +  double height = 20;
    +
    +  WPointF pos = hv(p);
    +
    +  double left = pos.x();
    +  double top = pos.y();
    +
    +  if (chart_->orientation() == Horizontal) {
    +    switch (horizontalAlign) {
    +    case AlignLeft:
    +      rVerticalAlign = AlignTop; break;
    +    case AlignCenter:
    +      rVerticalAlign = AlignMiddle; break;
    +    case AlignRight:
    +      rVerticalAlign = AlignBottom; break;
    +    default:
    +      break;
    +    }
    +
    +    switch (verticalAlign) {
    +    case AlignTop:
    +      rHorizontalAlign = AlignRight; break;
    +    case AlignMiddle:
    +      rHorizontalAlign = AlignCenter; break;
    +    case AlignBottom:
    +      rHorizontalAlign = AlignLeft; break;
    +    default:
    +      break;
    +    }
    +  }
    +
    +  switch (rHorizontalAlign) {
    +  case AlignLeft:
    +    left = pos.x() + margin; break;
    +  case AlignCenter:
    +    left = pos.x() - width/2; break;
    +  case AlignRight:
    +    left = pos.x() - width - margin;
    +  default:
    +    break;
    + }
    +
    +  switch (rVerticalAlign) {
    +  case AlignTop:
    +    top = pos.y() + margin; break;
    +  case AlignMiddle:
    +    top = pos.y() - height/2; break;
    +  case AlignBottom:
    +    top = pos.y() - height - margin; break;
    +  default:
    +    break;
    +  }
    +
    +  WPen pen(color);
    +  WPen oldPen = painter_.pen();
    +  painter_.setPen(pen);
    +
    +  if (angle == 0)
    +    painter_.drawText(WRectF(left, top, width, height),
    +		      rHorizontalAlign | rVerticalAlign, text);
    +  else {
    +    painter_.save();
    +    painter_.translate(pos);
    +    painter_.rotate(-angle);
    +    painter_.drawText(WRectF(left - pos.x(), top - pos.y(), width, height),
    +		      rHorizontalAlign | rVerticalAlign, text);
    +    painter_.restore();
    +  }
    +
    +  painter_.setPen(oldPen);
    +}
    +
    +WPointF WChart2DRenderer::hv(const WPointF& p) const
    +{
    +  return hv(p.x(), p.y());
    +}
    +
    +WPointF WChart2DRenderer::hv(double x, double y) const
    +{
    +  return chart_->hv(x, y, height_);
    +}
    +
    +WRectF WChart2DRenderer::hv(const WRectF& r) const
    +{
    +  if (chart_->orientation() == Vertical)
    +    return r;
    +  else {
    +    WPointF tl = hv(r.bottomLeft());
    +    return WRectF(tl.x(), tl.y(), r.height(), r.width());
    +  }
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WChartGlobal b/wt-3.1.7a/src/Wt/Chart/WChartGlobal
    new file mode 100644
    index 0000000..c3c0b14
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WChartGlobal
    @@ -0,0 +1,73 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCHARTGLOBAL_H_
    +#define WCHARTGLOBAL_H_
    +
    +namespace Wt {
    +  namespace Chart {
    +/*! \brief Enumeration that specifies the type of a chart series.
    + *
    + * \sa WDataSeries::setType(SeriesType)
    + * \sa WCartesianChart
    + *
    + * \ingroup charts
    + */
    +enum SeriesType {
    +  PointSeries,  //!< Series rendered solely as point markers.
    +  LineSeries,   //!< Series rendered as points connected by straight lines.
    +  CurveSeries,  //!< Series rendered as points connected by curves.
    +  BarSeries     //!< Series rendered as bars.
    +};
    +
    +/*! \brief Enumeration that specifies a type of point marker.
    + *
    + * \sa WDataSeries::setMarker(MarkerType marker)
    + * \sa WCartesianChart
    + *
    + * \ingroup charts
    + */
    +enum MarkerType {
    +  NoMarker,       //!< Do not draw point markers.
    +  SquareMarker,   //!< Mark points using a square.
    +  CircleMarker,   //!< Mark points using a circle.
    +  CrossMarker,    //!< Mark points using a cross (+).
    +  XCrossMarker,   //!< Mark points using a cross (x).
    +  TriangleMarker  //!< Mark points using a triangle.
    +};
    +
    +/*! \brief Enumeration that specifies how an area should be filled.
    + *
    + * Data series of type LineSeries or CurveSerie may be filled under or
    + * above the line or curve. This enumeration specifies the other limit
    + * of this fill.
    + *
    + * \sa WDataSeries::setFillRange(FillRangeType range)
    + * \sa WCartesianChart
    + *
    + * \ingroup charts
    + */
    +enum FillRangeType {
    +  NoFill,           //!< Do not fill under the curve.
    +  MinimumValueFill, //!< Fill from the curve to the chart bottom (min)
    +  MaximumValueFill, //!< Fill from the curve to the chart top
    +  ZeroValueFill     //!< Fill from the curve to the zero Y value.
    +};
    +
    +/*! \brief Enumeration type that indicates a chart type for a cartesian
    + *         chart.
    + *
    + * \ingroup charts
    + */
    +enum ChartType {
    +  CategoryChart, //!< The X series are categories
    +  ScatterPlot    //!< The X series must be interpreted as numerical data
    +};
    +
    +  }
    +}
    +
    +#endif // WCHARTGLOBAL_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WChartPalette b/wt-3.1.7a/src/Wt/Chart/WChartPalette
    new file mode 100644
    index 0000000..c0e389f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WChartPalette
    @@ -0,0 +1,80 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WCHART_PALETTE_H_
    +#define CHART_WCHART_PALETTE_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WBrush;
    +class WColor;
    +class WPen;
    +
    +  namespace Chart {
    +
    +/*! \class WChartPalette Wt/Chart/WChartPalette Wt/Chart/WChartPalette
    + *  \brief Abstract base class for styling rendered data series in charts.
    + *
    + * This class provides an interface for a palette which sets strokes
    + * and fill strokes for data in a \link WAbstractChart
    + * chart\endlink. A palette is an ordered list of styles, which is
    + * indexed by the chart to get a suitable style for a particular
    + * series (in case of WCartesianChart) or data row (in case of
    + * WPieChart). Each style is defined by a brush, two pen styles (one
    + * for borders, and one for plain lines), and a font color that is
    + * appropriate for drawing text within the brushed area.
    + *
    + * To use a custom palette, you should reimplement this class, and then
    + * use WAbstractChart::setPalette() to use an instance of the palette.
    + *
    + * \ingroup charts
    + */
    +class WT_API WChartPalette
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WChartPalette();
    +
    +  /*! \brief Returns a brush from the palette.
    +   *
    +   * Returns the brush for the style with given <i>index</i>.
    +   */
    +  virtual WBrush brush(int index) const = 0;
    +
    +  /*! \brief Returns a border pen from the palette.
    +   *
    +   * Returns the pen for stroking borders around an area filled using the
    +   * brush at the same <i>index</i>.
    +   *
    +   * \sa strokePen(), brush()
    +   */
    +  virtual WPen borderPen(int index) const = 0;
    +
    +  /*! \brief Returns a stroke pen from the palette.
    +   *
    +   * Returns the pen for stroking lines for the style with given <i>index</i>.
    +   *
    +   * \sa strokePen()
    +   */
    +  virtual WPen strokePen(int index) const = 0;
    +
    +  /*! \brief Returns a font color from the palette.
    +   *
    +   * Returns a font color suitable for rendering text in the area filled
    +   * with the brush at the same <i>index</i>.
    +   *
    +   * \sa brush()
    +   */
    +  virtual WColor fontColor(int index) const = 0;
    +};
    +
    +  }
    +}
    +
    +#endif // CHART_WCHART_PALETTE_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WChartPalette.C b/wt-3.1.7a/src/Wt/Chart/WChartPalette.C
    new file mode 100644
    index 0000000..b6168de
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WChartPalette.C
    @@ -0,0 +1,16 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/Chart/WChartPalette>
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WChartPalette::~WChartPalette()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WDataSeries b/wt-3.1.7a/src/Wt/Chart/WDataSeries
    new file mode 100644
    index 0000000..f0cfabb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WDataSeries
    @@ -0,0 +1,464 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WDATA_SERIES_H_
    +#define CHART_WDATA_SERIES_H_
    +
    +#include <Wt/Chart/WAxis>
    +#include <Wt/WBrush>
    +#include <Wt/WPen>
    +#include <Wt/WShadow>
    +#include <Wt/Chart/WChartGlobal>
    +
    +namespace Wt {
    +
    +  class WPointF;
    +
    +  namespace Chart {
    +
    +/*! \class WDataSeries Wt/Chart/WDataSeries Wt/Chart/WDataSeries
    + *  \brief A single data series in a cartesian chart.
    + *
    + * This class configures all aspects for rendering a single data series
    + * in a cartesian chart. A data series renders Y data from a single
    + * model column against the X series configured for the chart.
    + *
    + * \if cpp
    + * The data column should contain data that can be converted to
    + * a number, but should not necessarily be of a number type, see
    + * also asNumber(const boost::any&).
    + * \elseif java
    + * The data column should contain data that can be converted to
    + * a number, but should not necessarily be of a number type, see
    + * also {javadoclink eu.webtoolkit.jwt.StringUtils#asNumber(Object)}.
    + * \endif
    + *
    + * Multiple series of different types may be combined on a single chart.
    + *
    + * \image html ChartWDataSeries-1.png "Different styles of data series"
    + * 
    + * For a category chart, series may be stacked on top of each other.
    + * This is controlled by setStacked(bool stacked) for a series, which
    + * if enabled, will stack that series on top of the preceding data
    + * series. This works regardless of whether they are of the same type,
    + * but obviously works visually best if these series are of the same
    + * type. When not stacked, bar series are rendered next to each other.
    + * The margin between bars of different data series is controlled using
    + * WCartesianChart::setBarMargin(double).
    + *
    + * The line and color type are by default based on the \link
    + * WCartesianChart::palette() chart palette\endlink, but may be
    + * overridden for a series using setPen(const WPen&),
    + * setBrush(const WBrush&), etc...
    + *
    + * \sa WCartesianChart::addSeries(const WDataSeries&)
    + *
    + * \ingroup charts
    + */
    +class WT_API WDataSeries
    +{
    +public:
    +  /*! \brief Enumeration that indicates an aspect of the look.
    +   *
    +   * These flags are used to keep track of which aspects of the look
    +   * that are overridden from the values provided by the chart palette,
    +   * using one of the methods in this class.
    +   *
    +   * \sa setPen(), setBrush(), setMarkerPen(), setMarkerBrush(), setLabelColor()
    +   */
    +  enum CustomFlag {
    +    CustomPen = 0x1,         //!< A custom pen is set.
    +    CustomBrush = 0x2,       //!< A custom brush is set.
    +    CustomMarkerPen = 0x4,   //!< A custom marker pen is set.
    +    CustomMarkerBrush = 0x8, //!< A custom marker brush is set.
    +    CustomLabelColor = 0x10  //!< A custom label color is set.
    +  };
    +
    +  /*! \brief Constructs a new data series.
    +   *
    +   * Creates a new data series which plots the Y values from the
    +   * model column <i>modelColumn</i>, with the indicated
    +   * <i>seriesType</i>. The Y values are mapped to the indicated
    +   * <i>axis</i>, which should correspond to one of the two Y axes.
    +   *
    +   * \sa WCartesianChart::addSeries(const WDataSeries&)
    +   */
    +  WDataSeries(int modelColumn, SeriesType seriesType = PointSeries,
    +	      Axis axis = Y1Axis);
    +
    +  /*! \brief Sets the bar width.
    +   *
    +   * The bar width specifies the bar width (in axis dimensions).  For
    +   * category plots, which may have several bars for different series
    +   * next to each other, you will want to specify the same bar width
    +   * for each series.
    +   *
    +   * For scatter plots, you may want to set the bar width to a natural
    +   * size. E.g. if you are plotting weekly measurements, you could set
    +   * the width to correspond to a week (=7).
    +   *
    +   * The default value is 0.8 (which leaves a 20% margin between bars
    +   * for different categories in a category chart.
    +   *
    +   * \sa WCartesianChart::setBarMargin()
    +   */
    +  void setBarWidth(const double width);
    +
    +  /*! \brief Returns the bar width.
    +   *
    +   * \sa setBarWidth(double) 
    +   */
    +  double barWidth() const;
    +
    +  /*! \brief Sets the series type.
    +   *
    +   * The series type specifies how the data is plotted, i.e. using
    +   * mere point markers, lines, curves, or bars.
    +   */
    +  void setType(SeriesType t);
    +
    +  /*! \brief Returns the series type.
    +   *
    +   * \sa setType(SeriesType)
    +   */
    +  SeriesType type() const { return type_; }
    +
    +  /*! \brief Sets the model column.
    +   *
    +   * This specifies the model column from which the Y data is retrieved
    +   * that is plotted by this series.
    +   *
    +   * The data column should contain data that can be converted to
    +   * a number (but should not necessarily be of a number type).
    +   * \if java 
    +   * See also {javadoclink eu.webtoolkit.jwt.StringUtils#asNumber(Object)}.
    +   * \endif
    +   *
    +   * \if cpp
    +   * \sa asNumber(const boost::any&)
    +   * \endif
    +   */
    +  void setModelColumn(int modelColumn);
    +
    +  /*! \brief Returns the model column.
    +   *
    +   * \sa setModelColumn(int)
    +   */
    +  int modelColumn() const { return modelColumn_; }
    +
    +  /*! \brief Sets whether this series is stacked on top of the preceding series.
    +   *
    +   * For category charts, data from different series may be rendered
    +   * stacked on top of each other. The rendered value is the sum of the
    +   * value of this series plus the rendered value of the preceding
    +   * series. For line series, you probably will want to add filling
    +   * under the curve. A stacked bar series is rendered by a bar on top
    +   * of the preceding bar series.
    +   *
    +   * The default value is false.
    +   */
    +  void setStacked(bool stacked);
    +
    +  /*! \brief Returns whether this series is stacked on top of the preceding
    +   *         series.
    +   *
    +   * \sa setStacked(bool)
    +   */
    +  bool isStacked() const { return stacked_; }
    +
    +  /*! \brief Binds this series to a chart axis.
    +   *
    +   * A data series may be bound to either the first or second Y axis.
    +   * Note that the second Y axis is by default not displayed.
    +   *
    +   * The default value is the first Y axis.
    +   *
    +   * \sa WAxis::setVisible()
    +   */
    +  void bindToAxis(Axis axis);
    +
    +  /*! \brief Returns the chart axis used for this series.
    +   *
    +   * \sa bindToAxis(Axis)
    +   */
    +  Axis axis() const { return axis_; }
    +
    +  /*! \brief Sets which aspects of the look are overriden.
    +   *
    +   * Set which aspects of the look, that are by default based on the
    +   * chart palette, are overridden by custom settings.
    +   *
    +   * The default value is 0 (nothing overridden).
    +   */
    +  void setCustomFlags(WFlags<CustomFlag> customFlags);
    +
    +  /*! \brief Returns which aspects of the look are overriden.
    +   *
    +   * \sa setCustomFlags(WFlags<CustomFlag>)
    +   */
    +  WFlags<CustomFlag> curstomFlags() const { return customFlags_; }
    +
    +  /*! \brief Overrides the pen used for drawing lines for this series.
    +   *
    +   * Overrides the pen that is used to draw this series. Calling this
    +   * method automatically adds CustomPen to the custom flags.
    +   *
    +   * The default value is a default WPen().
    +   *
    +   * \sa WChartPalette::strokePen(), WChartPalette::borderPen()
    +   */
    +  void setPen(const WPen& pen);
    +
    +  /*! \brief Returns the pen used for drawing lines for this series.
    +   *
    +   * \sa setPen(const WPen&)
    +   */
    +  WPen pen() const;
    +
    +  /*! \brief Overrides the brush used for filling areas for this series.
    +   *
    +   * Overrides the brush that is used to draw this series which is
    +   * otherwise provided by the chart palette. For a bar plot, this is the
    +   * brush used to fill the bars. For a line chart, this is the brush
    +   * used to fill the area under (or above) the line. Calling this
    +   * method automatically adds CustomBrush to the custom flags.
    +   *
    +   * \sa WChartPalette::brush()
    +   */
    +  void setBrush(const WBrush& brush);
    +
    +  /*! \brief Returns the brush used for filling areas for this series.
    +   *
    +   * \sa setBrush(const WBrush&)
    +   */
    +  WBrush brush() const;
    +
    +  /*! \brief Sets a shadow used for stroking lines for this series.
    +   */
    +  void setShadow(const WShadow& shadow);
    +
    +  /*! \brief Returns the shadow used for stroking lines for this series.
    +   *
    +   * \sa setShadow(const WShadow&)
    +   */
    +  const WShadow& shadow() const;
    +
    +  /*! \brief Sets the fill range for line or curve series.
    +   *
    +   * Line or curve series may be filled under or above the curve, using the
    +   * brush(). This setting specifies the range that is filled.
    +   */
    +  void setFillRange(FillRangeType fillRange);
    +
    +  /*! \brief Returns the fill range for line or curve series.
    +   *
    +   * \sa setFillRange(FillRangeType)
    +   */
    +  FillRangeType fillRange() const { return fillRange_; }
    +
    +  /*! \brief Sets the data point marker.
    +   *
    +   * Specifies a marker that is displayed at the (X,Y) coordinate for each
    +   * series data point.
    +   *
    +   * The default value is a CircleMarker for a PointSeries, or NoMarker
    +   * otherwise.
    +   *
    +   * \sa setMarkerPen(const WPen&), setMarkerBrush(const WBrush&).
    +   */
    +  void setMarker(MarkerType marker);
    +
    +  /*! \brief Returns the data point marker.
    +   *
    +   * \sa setMarker(MarkerType)
    +   */
    +  MarkerType marker() const { return marker_; }
    +
    +  /*! \brief Sets the marker size.
    +   *
    +   * The default marker size is 6 pixels.
    +   */
    +  void setMarkerSize(double size);
    +
    +  /*! \brief Returns the marker size.
    +   *
    +   * \sa setMarkerSize()
    +   */
    +  double markerSize() const { return markerSize_; }
    +
    +  /*! \brief Sets the marker pen.
    +   *
    +   * Overrides the pen used for stroking the marker. By default the
    +   * marker pen is the same as pen(). Calling this method automatically adds
    +   * CustomMarkerPen to the custom flags.
    +   *
    +   * \sa setPen(const WPen&), setMarkerBrush(const WBrush&)
    +   */
    +  void setMarkerPen(const WPen& pen);
    +
    +  /*! \brief Returns the marker pen.
    +   *
    +   * \sa setMarkerPen(const WPen&)
    +   */
    +  WPen markerPen() const;
    +
    +  /*! \brief Sets the marker brush.
    +   *
    +   * Overrides the brush used for filling the marker. By default the
    +   * marker brush is the same as brush(). Calling this method
    +   * automatically adds CustomMarkerBrush to the custom flags.
    +   *
    +   * \sa setBrush(const WBrush&), setMarkerPen(const WPen&)
    +   */
    +  void setMarkerBrush(const WBrush& brush);
    +
    +  /*! \brief Returns the marker brush.
    +   *
    +   * \sa setMarkerBrush(const WBrush&)
    +   */
    +  WBrush markerBrush() const;
    +
    +  /*! \brief Enables the entry for this series in the legend.
    +   *
    +   * When <i>enabled</i>, this series is added to the chart
    +   * legend.
    +   *
    +   * The default value is true.
    +   *
    +   * \sa WCartesianChart::setLegendEnabled(bool).
    +   */
    +  void setLegendEnabled(bool enabled);
    +
    +  /*! \brief Returns whether this series has an entry in the legend.
    +   *
    +   * \sa setLegendEnabled(bool)
    +   */
    +  bool isLegendEnabled() const;
    +
    +  /*! \brief Enables a label that is shown at the series data points.
    +   *
    +   * You may enable labels for the XAxis, YAxis or both axes. The
    +   * label that is displayed is the corresponding value on that
    +   * axis. If both labels are enabled then they are combined in a
    +   * single text using the format: "<x-value>: <y-value>".
    +   *
    +   * The default values are false for both axes (no labels).
    +   *
    +   * \sa isLabelsEnabled()
    +   */
    +  void setLabelsEnabled(Axis axis, bool enabled = true);
    +
    +  /*! \brief Returns whether labels are enabled for the given axis.
    +   *
    +   * \sa setLabelsEnabled(Axis, bool)
    +   */
    +  bool isLabelsEnabled(Axis axis) const;
    +
    +  /*! \brief Sets the label color.
    +   *
    +   * Specify the color used for the rendering labels at the data
    +   * points.
    +   *
    +   * \sa setLabelsEnabled(Axis, bool)
    +   */
    +  void setLabelColor(const WColor& color);
    +
    +  /*! \brief Returns the label color.
    +   *
    +   * \sa setLabelColor(const WColor&)
    +   */
    +  WColor labelColor() const;
    +
    +  /*! \brief Hide/unhide this series.
    +   *
    +   * A hidden series will not be show in the chart and legend.
    +   */
    +  void setHidden(bool hidden);
    +
    +  /*! \brief Return whether the series is hidden.
    +   *
    +   * /sa setHidden()
    +   */
    +  bool isHidden() const;
    +
    +  /*! \brief Maps from device coordinates to model coordinates.
    +   *
    +   * Maps a position in the chart back to model coordinates, for data
    +   * in this data series.
    +   *
    +   * This uses WChart::mapFromDevice() passing the axis() to which this
    +   * series is bound.
    +   *
    +   * This method uses the axis dimensions that are based on the latest
    +   * chart rendering. If you have not yet rendered the chart, or wish
    +   * to already the mapping reflect model changes since the last
    +   * rendering, you should call WCartesianChart::initLayout() first.
    +   *
    +   * \sa mapToDevice()
    +   */ 
    +  WPointF mapFromDevice(const WPointF& deviceCoordinates) const;
    +
    +  /*! \brief Maps from model values to device coordinates.
    +   *
    +   * Maps model values to device coordinates, for data in this data series.
    +   *
    +   * This uses WChart::mapToDevice() passing the axis() to which this
    +   * series is bound.
    +   *
    +   * This method uses the axis dimensions that are based on the latest
    +   * chart rendering. If you have not yet rendered the chart, or wish
    +   * to already the mapping reflect model changes since the last
    +   * rendering, you should call WCartesianChart::initLayout() first.
    +   *
    +   * \sa mapFromDevice()
    +   */ 
    +  WPointF mapToDevice(const boost::any& xValue, const boost::any& yValue,
    +		      int segment = 0) const;
    +
    +private:
    +  WCartesianChart   *chart_;
    +  int                modelColumn_;
    +  bool               stacked_;
    +  SeriesType         type_;
    +  Axis               axis_;
    +  WFlags<CustomFlag> customFlags_;
    +  WPen               pen_, markerPen_;
    +  WBrush             brush_, markerBrush_;
    +  WColor             labelColor_;
    +  WShadow            shadow_;
    +  FillRangeType      fillRange_;
    +  MarkerType         marker_;
    +  double             markerSize_;
    +  bool               legend_;
    +  bool               xLabel_;
    +  bool               yLabel_;
    +  double             barWidth_;
    +  bool               hidden_;
    +
    +  template <typename T>
    +  bool set(T& m, const T& v);
    +
    +  void setChart(WCartesianChart *chart);
    +  void update();
    +
    +  friend class WCartesianChart;
    +};
    +
    +template <typename T>
    +bool WDataSeries::set(T& m, const T& v)
    +{
    +  if (m != v) {
    +    m = v;
    +    update();
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +  }
    +}
    +
    +#endif // CHART_WDATA_SERIES_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WDataSeries.C b/wt-3.1.7a/src/Wt/Chart/WDataSeries.C
    new file mode 100644
    index 0000000..b882f04
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WDataSeries.C
    @@ -0,0 +1,247 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WPointF>
    +#include <Wt/Chart/WChartPalette>
    +#include <Wt/Chart/WDataSeries>
    +#include <Wt/Chart/WCartesianChart>
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WDataSeries::WDataSeries(int modelColumn, SeriesType type, Axis axis)
    +  : chart_(0),
    +    modelColumn_(modelColumn),
    +    stacked_(false),
    +    type_(type),
    +    axis_(axis),
    +    customFlags_(0),
    +    fillRange_(NoFill),
    +    marker_(type == PointSeries ? CircleMarker : NoMarker),
    +    markerSize_(6),
    +    legend_(true),
    +    xLabel_(false),
    +    yLabel_(false),
    +    barWidth_(0.8),
    +    hidden_(false)
    +{ }
    +
    +void WDataSeries::setBarWidth(const double width) 
    +{
    +  barWidth_ = width;
    +}
    +
    +double WDataSeries::barWidth() const 
    +{
    +  return barWidth_;
    +}
    +
    +void WDataSeries::setType(SeriesType type)
    +{
    +  set(type_, type);
    +}
    +
    +void WDataSeries::setStacked(bool stacked)
    +{
    +  set(stacked_, stacked);
    +}
    +
    +void WDataSeries::setModelColumn(int modelColumn)
    +{
    +  set(modelColumn_, modelColumn);
    +}
    +
    +void WDataSeries::bindToAxis(Axis axis)
    +{
    +  set(axis_, axis);
    +}
    +
    +void WDataSeries::setCustomFlags(WFlags<CustomFlag> flags)
    +{
    +  set(customFlags_, flags);
    +}
    +
    +void WDataSeries::setPen(const WPen& pen)
    +{
    +  set(pen_, pen);
    +
    +  customFlags_ |= CustomPen;
    +}
    +
    +void WDataSeries::setShadow(const WShadow& shadow)
    +{
    +  set(shadow_, shadow);
    +}
    +
    +const WShadow& WDataSeries::shadow() const
    +{
    +  return shadow_;
    +}
    +
    +WPen WDataSeries::pen() const
    +{
    +  if (customFlags_ & CustomPen)
    +    return pen_;
    +  else
    +    if (chart_)
    +      if (type_ == BarSeries)
    +	return chart_->palette()
    +	  ->borderPen(chart_->seriesIndexOf(modelColumn_));
    +      else
    +	return chart_->palette()
    +	  ->strokePen(chart_->seriesIndexOf(modelColumn_));
    +    else
    +      return WPen();
    +}
    +
    +void WDataSeries::setBrush(const WBrush& brush)
    +{
    +  set(brush_, brush);
    +
    +  customFlags_ |= CustomBrush;
    +}
    +
    +WBrush WDataSeries::brush() const
    +{
    +  if (customFlags_ & CustomBrush)
    +    return brush_;
    +  else
    +    if (chart_)
    +      return chart_->palette()->brush(chart_->seriesIndexOf(modelColumn_));
    +    else
    +      return WBrush();
    +}
    +
    +WColor WDataSeries::labelColor() const
    +{
    +  if (customFlags_ & CustomLabelColor)
    +    return labelColor_;
    +  else
    +    if (chart_)
    +      return chart_->palette()->fontColor(chart_->seriesIndexOf(modelColumn_));
    +    else
    +      return black;
    +}
    +
    +void WDataSeries::setLabelColor(const WColor& color)
    +{
    +  set(labelColor_, color);
    +}
    +
    +void WDataSeries::setFillRange(FillRangeType fillRange)
    +{
    +  set(fillRange_, fillRange);
    +}
    +
    +void WDataSeries::setMarker(MarkerType marker)
    +{
    +  set(marker_, marker);
    +}
    +
    +void WDataSeries::setMarkerSize(double size)
    +{
    +  set(markerSize_, size);
    +}
    +
    +void WDataSeries::setMarkerPen(const WPen& pen)
    +{
    +  set(markerPen_, pen);
    +
    +  customFlags_ |= CustomMarkerPen;
    +}
    +
    +WPen WDataSeries::markerPen() const
    +{
    +  if (customFlags_ & CustomMarkerPen)
    +    return markerPen_;
    +  else
    +    return pen();
    +}
    +
    +void WDataSeries::setMarkerBrush(const WBrush& brush)
    +{
    +  set(markerBrush_, brush);
    +
    +  customFlags_ |= CustomMarkerBrush;
    +}
    +
    +WBrush WDataSeries::markerBrush() const
    +{
    +  if (customFlags_ & CustomMarkerBrush)
    +    return markerBrush_;
    +  else
    +    return brush();
    +}
    +
    +void WDataSeries::setLegendEnabled(bool enabled)
    +{
    +  set(legend_, enabled);
    +}
    +
    +bool WDataSeries::isLegendEnabled() const
    +{
    +  if (!isHidden())
    +    return legend_;
    +  else
    +    return false;
    +}
    +
    +void WDataSeries::setLabelsEnabled(Axis axis, bool enabled)
    +{
    +  if (axis == XAxis)
    +    xLabel_ = enabled;
    +  else
    +    yLabel_ = enabled;
    +
    +  update();
    +}
    +
    +bool WDataSeries::isLabelsEnabled(Axis axis) const
    +{
    +  return axis == XAxis ? xLabel_ : yLabel_;
    +}
    +
    +void WDataSeries::setHidden(bool hidden)
    +{
    +  hidden_ = hidden;
    +}
    +
    +bool WDataSeries::isHidden() const 
    +{
    +  return hidden_;
    +}
    +
    +void WDataSeries::setChart(WCartesianChart *chart)
    +{
    +  chart_ = chart;
    +}
    +
    +void WDataSeries::update()
    +{
    +  if (chart_)
    +    chart_->update();
    +}
    +
    +WPointF WDataSeries::mapFromDevice(const WPointF& deviceCoordinates) const
    +{
    +  if (chart_)
    +    return chart_->mapFromDevice(deviceCoordinates, axis_);
    +  else
    +    return WPointF();
    +}
    +
    +WPointF WDataSeries::mapToDevice(const boost::any& xValue,
    +				 const boost::any& yValue,
    +				 int segment) const
    +{
    +  if (chart_)
    +    return chart_->mapToDevice(xValue, yValue, axis_, segment);
    +  else
    +    return WPointF();
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WPieChart b/wt-3.1.7a/src/Wt/Chart/WPieChart
    new file mode 100644
    index 0000000..32b9a63
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WPieChart
    @@ -0,0 +1,288 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WPIE_CHART_H_
    +#define CHART_WPIE_CHART_H_
    +
    +#include <Wt/Chart/WAbstractChart>
    +
    +#include <Wt/WRectF>
    +
    +namespace Wt {
    +
    +  class WModelIndex;
    +  class WPainter;
    +
    +  namespace Chart {
    +
    +    class WChartPalette;
    +
    +/*! \brief Enumeration that specifies options for the labels.
    + *
    + * \sa WPieChart::setDisplayLabels(WFlags<LabelOption>)
    + *
    + * \ingroup charts
    + */
    +enum LabelOption {
    +  NoLabels       = 0x00, //!< Do not display labels (default).
    +  Inside         = 0x01, //!< Display labels inside each segment.
    +  Outside        = 0x02, //!< Display labels outside each segment.
    +  TextLabel      = 0x10, //!< Display the label text
    +  TextPercentage = 0x20  //!< Display the value (as percentage)
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(LabelOption);
    +
    +/*! \class WPieChart Wt/Chart/WPieChart Wt/Chart/WPieChart
    + *  \brief A pie chart.
    + *
    + * A pie chart renders a single data series as segments of a circle, so that
    + * the area of each segment is proportional to the value in the data series.
    + *
    + * To use a pie chart, you need to set a model using setModel(), and use
    + * setLabelsColumn() and setDataColumn() to specify the model column that
    + * contains the category labels and data.
    + *
    + * The pie chart may be customized visually by enabling a 3D effect
    + * (setPerspectiveEnabled()), or by specifying the angle of the first
    + * segment. One or more segments may be exploded, which seperates the
    + * segment from the rest of the pie chart, using setExplode().
    + *
    + * The segments may be labeled in various ways using
    + * setDisplayLabels().
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * \image html ChartWPieChart-1.png "Example of a pie chart" 
    + *
    + * \sa WCartesianChart
    + *
    + * \ingroup charts modelview
    + */
    +class WT_API WPieChart : public WAbstractChart
    +{
    +public:
    +  /*! \brief Creates a new pie chart.
    +   */
    +  WPieChart(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the model column that holds the labels.
    +   *
    +   * The labels are used only when setDisplayLabels() is called with
    +   * the \link Chart::TextLabel TextLabel\endlink option.
    +   *
    +   * The default value is -1 (not defined).
    +   *
    +   * \sa setModel(WAbstractItemModel *), setDisplayLabels(), setDataColumn(int)
    +   */
    +  void setLabelsColumn(int column);
    +
    +  /*! \brief Returns the model column used for the labels.
    +   *
    +   * \sa setLabelsColumn(int)
    +   */
    +  int labelsColumn() const { return labelsColumn_; }
    +
    +  /*! \brief Sets the model column that holds the data.
    +   *
    +   * \if cpp 
    +   * The data column should contain data that can be converted to
    +   * a number, but should not necessarily be of a number type, see
    +   * also asNumber(const boost::any&).
    +   * \elseif java
    +   * The data column should contain data that can be converted to
    +   * a number, but should not necessarily be of a number type, see
    +   * also {javadoclink StringUtils#asNumber(Object)}.
    +   * \endif
    +   *
    +   * The default value is -1 (not defined).
    +   *
    +   * \sa setModel(WAbstractItemModel *), setLabelsColumn(int)
    +   */
    +  void setDataColumn(int modelColumn);
    +
    +  /*! \brief Returns the model column used for the data.
    +   *
    +   * \sa setDataColumn(int)
    +   */
    +  int dataColumn() const { return dataColumn_; }
    +
    +  /*! \brief Customizes the brush used for a pie segment.
    +   *
    +   * By default, the brush is taken from the palette(). You can use
    +   * this method to override the palette's brush for a particular
    +   * <i>modelRow</i>.
    +   *
    +   * \sa setPalette(WChartPalette *)
    +   */
    +  void setBrush(int modelRow, const WBrush& brush);
    +
    +  /*! \brief Returns the brush used for a pie segment.
    +   *
    +   * \sa setBrush(int, const WBrush&)
    +   */
    +  WBrush brush(int modelRow) const;
    +
    +  /*! \brief Sets the explosion factor for a pie segment.
    +   *
    +   * Separates the segment corresponding to model row <i>modelRow</i>
    +   * from the rest of the pie. The <i>factor</i> is a positive number
    +   * that represents the distance from the center as a fraction of the
    +   * pie radius. Thus, 0 corresponds to no separation, and 0.1 to a
    +   * 10% separation, and 1 to a separation where the segment tip is on
    +   * the outer perimeter of the pie.
    +   *
    +   * The default value is 0.
    +   */
    +  void setExplode(int modelRow, double factor);
    +
    +  /*! \brief Returns the explosion factor for a segment.
    +   *
    +   * \sa setExplode(int, double)
    +   */
    +  double explode(int modelRow) const;
    +
    +  /*! \brief Enables a 3D perspective effect on the pie.
    +   *
    +   * A 3D perspective effect is added, which may be customized by
    +   * specifying the simulated <i>height</i> of the pie. The height is
    +   * defined as a fraction of the pie radius.
    +   *
    +   * The default value is false.
    +   */
    +  void setPerspectiveEnabled(bool enabled, double height = 1.0);
    +
    +  /*! \brief Returns whether a 3D effect is enabled.
    +   *
    +   * \sa setPerspectiveEnabled(bool, double)
    +   */
    +  bool isPerspectiveEnabled() const { return height_ > 0.0; }
    +
    +  /*! \brief Enables a shadow effect.
    +   *
    +   * A soft shadow effect is added.
    +   *
    +   * The default value is false.
    +   */
    +  void setShadowEnabled(bool enabled);
    +
    +  /*! \brief Returns whether a shadow effect is enabled.
    +   *
    +   * \sa setShadowEnabled()
    +   */
    +  bool isShadowEnabled() const { return shadow_; }
    +
    +  /*! \brief Sets the angle of the first segment.
    +   *
    +   * The default value is 45 degrees.
    +   */
    +  void setStartAngle(double degrees);
    +
    +  /*! \brief Returns the angle of the first segment.
    +   *
    +   * \sa setStartAngle(double)
    +   */
    +  double startAngle() const { return startAngle_; }
    +
    +  /*! \brief Configures if and how labels should be displayed
    +   *
    +   * The <i>options</i> must be the logical OR of a placement option
    +   * (\link Chart::Inside Inside\endlink or \link
    +   * Chart::Outside Outside\endlink) and \link
    +   * Chart::TextLabel TextLabel\endlink and/or \link
    +   * Chart::TextPercentage TextPercentage\endlink. If both
    +   * TextLabel and TextPercentage are specified, then these are
    +   * combined as "<label>: <percentage>".
    +   *
    +   * The default value is \link Chart::NoLabels NoLabels\endlink.
    +   */
    +  void setDisplayLabels(WFlags<LabelOption> options);
    +
    +  /*! \brief Returns options set for displaying labels.
    +   *
    +   * \sa WPieChart::setDisplayLabels()
    +   */
    +  WFlags<LabelOption> displayLabels() const { return labelOptions_; }
    +
    +  /*! \brief Creates a widget which renders the a legend item.
    +   * 
    +   * Depending on the passed LabelOption flags, the legend item widget,
    +   * will contain a text (with or without the percentage) and/or a span with
    +   * the segment's color.
    +   */
    +  WWidget* createLegendItemWidget(int index, WFlags<LabelOption> options);
    +
    +  /*! \brief Adds a data point area (used for displaying e.g. tooltips).
    +   *
    +   * You may want to specialize this is if you wish to modify (or delete) the area.
    +   *
    +   * \note Currently, an area is only created if the ToolTipRole data at the
    +   *       data point is not empty.
    +   */
    +  virtual void addDataPointArea(const WModelIndex& index, WAbstractArea *area) const;
    +
    +  virtual void paint(WPainter& painter, const WRectF& rectangle = WRectF()) const;
    +
    +protected:
    +  void paintEvent(Wt::WPaintDevice *paintDevice);
    +
    +private:
    +  int                  labelsColumn_;
    +  int                  dataColumn_;
    +  double               height_;
    +  double               startAngle_;
    +  WFlags<LabelOption> labelOptions_;
    +  bool                 shadow_;
    +
    +  struct PieData {
    +    bool customBrush;
    +    WBrush brush;
    +    double explode;
    +
    +    PieData();
    +  };
    +
    +  std::vector<PieData> pie_;
    +
    +  virtual void modelChanged();
    +  virtual void modelReset();
    +  virtual void modelColumnsInserted(const WModelIndex& parent,
    +				    int start, int end);
    +  virtual void modelColumnsRemoved(const WModelIndex& parent,
    +				   int start, int end);
    +  virtual void modelRowsInserted(const WModelIndex& parent,
    +				 int start, int end);
    +  virtual void modelRowsRemoved(const WModelIndex& parent,
    +				int start, int end);
    +  virtual void modelDataChanged(const WModelIndex& topLeft,
    +				const WModelIndex& bottomRight);
    +
    +  void drawPie(WPainter& painter, double cx, double cy, double r, double h,
    +	       double total) const;
    +  void drawSlices(WPainter& painter, double cx, double cy, double r,
    +		  double total, bool ignoreBrush) const;
    +  void drawSide(WPainter& painter, double pcx, double pcy, double r,
    +		double angle, double h) const;
    +  void drawOuter(WPainter& painter, double pcx, double pcy, double r,
    +		 double a1, double a2, double h) const;
    +
    +  void setShadow(WPainter& painter) const;
    +
    +  int prevIndex(int i) const;
    +  int nextIndex(int i) const;
    +
    +  static WBrush darken(const WBrush& brush);
    +
    +  WString labelText(int index, double v, double total, 
    +		    WFlags<LabelOption> options) const;
    +};
    +
    +  }
    +}
    +
    +#endif // CHART_WPIE_CHART_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WPieChart.C b/wt-3.1.7a/src/Wt/Chart/WPieChart.C
    new file mode 100644
    index 0000000..9a31449
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WPieChart.C
    @@ -0,0 +1,751 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cmath>
    +#include <stdio.h>
    +#include <float.h>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Chart/WPieChart"
    +#include "Wt/Chart/WStandardPalette"
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WText"
    +#include "Wt/WSvgImage"
    +#include "Wt/WPaintDevice"
    +#include "Wt/WPainter"
    +#include "Wt/WPolygonArea"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +namespace {
    +
    +class PlotException : public std::exception
    +{
    +public:
    +  PlotException(const std::string what)
    +    : what_(what) { }
    +  ~PlotException() throw() { }
    +
    +  const char *what() const throw() { return what_.c_str(); }
    +
    +private:
    +  std::string what_;
    +};
    +
    +}
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WPieChart::PieData::PieData()
    +  : customBrush(false),
    +    explode(0)
    +{ }
    +
    +WPieChart::WPieChart(WContainerWidget *parent)
    +  : WAbstractChart(parent),
    +    labelsColumn_(-1),
    +    dataColumn_(-1),
    +    height_(0.0),
    +    startAngle_(45),
    +    labelOptions_(0),
    +    shadow_(false)
    +{
    +  setPalette(new WStandardPalette(WStandardPalette::Neutral));
    +  setPreferredMethod(InlineSvgVml);
    +  setPlotAreaPadding(5);
    +}
    +
    +void WPieChart::setLabelsColumn(int modelColumn)
    +{
    +  if (labelsColumn_ != modelColumn) {
    +    labelsColumn_ = modelColumn;
    +    update();
    +  }
    +}
    +
    +void WPieChart::setDataColumn(int modelColumn)
    +{
    +  if (dataColumn_ != modelColumn) {
    +    dataColumn_ = modelColumn;
    +    update();
    +  }
    +}
    +
    +void WPieChart::setBrush(int modelRow, const WBrush& brush)
    +{
    +  pie_[modelRow].customBrush = true;
    +  pie_[modelRow].brush = brush;
    +  update();
    +}
    +
    +WBrush WPieChart::brush(int modelRow) const
    +{
    +  if (pie_[modelRow].customBrush)
    +    return pie_[modelRow].brush;
    +  else
    +    return palette()->brush(modelRow);
    +}
    +
    +void WPieChart::setExplode(int modelRow, double factor)
    +{
    +  pie_[modelRow].explode = factor;
    +  update();
    +}
    +
    +double WPieChart::explode(int modelRow) const
    +{
    +  return pie_[modelRow].explode;
    +}
    +
    +void WPieChart::setPerspectiveEnabled(bool enabled, double height)
    +{
    +  if ((!enabled && height_ != 0.0) || height_ != height) {
    +    height_ = height;
    +    update();
    +  }
    +}
    +
    +void WPieChart::setShadowEnabled(bool enabled)
    +{
    +  if (shadow_ != enabled) {
    +    shadow_ = enabled;
    +    update();
    +  }
    +}
    +
    +void WPieChart::setStartAngle(double startAngle)
    +{
    +  if (startAngle_ != startAngle) {
    +    startAngle_ = startAngle;
    +    update();
    +  }
    +}
    +
    +void WPieChart::setDisplayLabels(WFlags<LabelOption> options)
    +{
    +  labelOptions_ = options;
    +
    +  update();
    +}
    +
    +WWidget* WPieChart::createLegendItemWidget(int index, 
    +					   WFlags<LabelOption> options)
    +{
    +  WContainerWidget* legendItem = new WContainerWidget();
    +  legendItem->setPadding(4);
    +  
    +  WText* colorText = new WText();
    +  legendItem->addWidget(colorText);
    +  colorText->setPadding(10, Left | Right);
    +  colorText->decorationStyle().setBackgroundColor(brush(index).color());
    +
    +  if (WApplication::instance()->environment().agentIsIE())
    +    colorText->setAttributeValue("style", "zoom: 1;");
    +
    +  double total = 0;
    +
    +  if (dataColumn_ != -1)
    +    for (int i = 0; i < model()->rowCount(); ++i) {
    +      double v = asNumber(model()->data(i, dataColumn_));
    +      if (!Utils::isNaN(v))
    +	total += v;
    +    }
    +
    +  double value = asNumber(model()->data(index, dataColumn_));
    +  if (!Utils::isNaN(value)) {
    +    WString label = labelText(index, value, total, options);
    +    if (!label.empty()) {
    +      WText* l = new WText(label);
    +      l->setPadding(5, Left);
    +      legendItem->addWidget(l);
    +    }
    +  }
    +
    +  return legendItem;
    +}
    +
    +void WPieChart::paint(WPainter& painter, const WRectF& rectangle) const
    +{
    +  double total = 0;
    +
    +  if (dataColumn_ != -1)
    +    for (int i = 0; i < model()->rowCount(); ++i) {
    +      double v = asNumber(model()->data(i, dataColumn_));
    +      if (!Utils::isNaN(v))
    +	total += v;
    +    }
    +
    +  if (!painter.isActive())
    +    throw WtException("WPieChart::paint(): painter is not active.");
    +
    +  WRectF rect = rectangle;
    +
    +  if (rect.isEmpty())
    +    rect = painter.window();
    +
    +  rect.setX(rect.x() + plotAreaPadding(Left));
    +  rect.setY(rect.y() + plotAreaPadding(Top));
    +  rect.setWidth(rect.width() - plotAreaPadding(Left) - plotAreaPadding(Right));
    +  rect.setHeight(rect.height() - plotAreaPadding(Top)
    +		 - plotAreaPadding(Bottom));
    +
    +  double side = std::min(rect.width(), rect.height());
    +
    +  painter.save();
    +  painter.translate(rect.left() + (rect.width() - side)/2,
    +		    rect.top() + (rect.height() - side)/2);
    +
    +  if (!title().empty())
    +    painter.translate(0, 15);
    +
    +  double cx = std::floor(side/2) + 0.5;
    +  double cy = cx;
    +  double r = (int)(side/2 + 0.5);
    +  double h = height_ * r;
    +
    +  painter.save();
    +  if (h > 0.0) {
    +    painter.translate(0, r/2 - h/4);
    +    painter.scale(1, 0.5);
    +  }
    +
    +  drawPie(painter, cx, cy, r, h, total);
    +  painter.restore();
    +
    +  painter.translate(0, -h/4);
    +  if (labelOptions_) {
    +    if (total != 0) {
    +      double currentAngle = startAngle_;
    +
    +      for (int i = 0; i < model()->rowCount(); ++i) {
    +	double v = asNumber(model()->data(i, dataColumn_));
    +	if (Utils::isNaN(v))
    +	  continue;
    +
    +	double spanAngle = -v / total * 360;
    +	double midAngle = currentAngle + spanAngle / 2.0;
    +	double endAngle = currentAngle + spanAngle;
    +	if (endAngle < 0)
    +	  endAngle += 360;
    +	if (midAngle < 0)
    +	  midAngle += 360;
    +
    +	double width = 200;
    +	double height = 30;
    +	double left;
    +	double top;
    +
    +	double f;
    +	if (labelOptions_ & Outside)
    +	  f = pie_[i].explode + 1.1;
    +	else
    +	  f = pie_[i].explode + 0.7;
    +
    +	double px = cx + f * r * std::cos(-midAngle / 180.0 * M_PI);
    +	double py = cy + f * r * std::sin(-midAngle / 180.0 * M_PI)
    +	  * (h > 0 ? 0.5 : 1);
    +
    +	WFlags<AlignmentFlag> alignment;
    +
    +	WColor c = painter.pen().color();
    +	if (labelOptions_ & Outside) {
    +	  if (midAngle < 90) {
    +	    left = px;
    +	    top = py - height;
    +	    alignment = AlignLeft | AlignBottom;
    +	  } else if (midAngle < 180) {
    +	    left = px - width;
    +	    top = py - height;
    +	    alignment = AlignRight | AlignBottom;
    +	  } else if (midAngle < 270) {
    +	    left = px - width;
    +	    top = py + h/2;
    +	    alignment = AlignRight | AlignTop;
    +	  } else {
    +	    left = px;
    +	    top = py + h/2;
    +	    alignment = AlignLeft | AlignTop;
    +	  }
    +	} else {
    +	  left = px - width/2;
    +	  top = py - height/2;
    +	  alignment = AlignCenter | AlignMiddle;
    +	  c = palette()->fontColor(i);
    +	}
    +
    +	painter.setPen(WPen(c));
    +	painter.drawText(WRectF(left, top, width, height),
    +			 alignment, labelText(i, v, total, labelOptions_));
    +
    +	currentAngle = endAngle;
    +      }
    +    }
    +  }
    +
    +  if (!title().empty()) {
    +    WFont oldFont = painter.font();
    +    painter.setFont(titleFont());
    +    painter.drawText(cx - 50, cy - r, 100, 50,
    +		     AlignCenter | AlignTop, title());
    +    painter.setFont(oldFont);
    +  }
    +
    +  painter.restore();
    +}
    +
    +WString WPieChart::labelText(int index, double v, double total, 
    +			     WFlags<LabelOption> options) const
    +{
    +  WString text;
    +
    +  if (options & TextLabel)
    +    if (labelsColumn_ != -1)
    +      text = asString(model()->data(index, labelsColumn_));
    +  
    +  if (options & TextPercentage) {
    +#ifndef WT_TARGET_JAVA
    +    char buf[20];
    +#else
    +    char *buf = 0;
    +    buf =
    +#endif // WT_TARGET_JAVA
    +      snprintf(buf, 20, "%.3g%%", v / total * 100);
    +    if (!text.empty())
    +      text += ": ";
    +    text += buf;
    +  }
    +
    +  return text;
    +}
    +
    +void WPieChart::setShadow(WPainter& painter) const
    +{
    +  painter.setShadow(WShadow(5, 15, WColor(0, 0, 0, 20), 40));
    +}
    +
    +void WPieChart::drawPie(WPainter& painter, double cx, double cy,
    +			double r, double h, double total) const
    +{
    +  /*
    +   * Draw sides where applicable
    +   */
    +  if (h > 0) {
    +    if (total == 0) {
    +      if (shadow_)
    +	setShadow(painter);
    +      drawOuter(painter, cx, cy, r, 0, -180, h);
    +      if (shadow_)
    +	painter.setShadow(WShadow());
    +    } else {
    +      if (shadow_) {
    +	setShadow(painter);
    +	painter.setBrush(WBrush(black));
    +	drawSlices(painter, cx, cy + h, r, total, true);
    +	painter.setShadow(WShadow());
    +      }
    +
    +      /*
    +       * Pre-processing: determine start and mid angles of each pie,
    +       * and get the index of the one that contains 90 degrees (which is
    +       * the one at the back
    +       */
    +#ifndef WT_TARGET_JAVA
    +      std::vector<double> startAngles(model()->rowCount());
    +      std::vector<double> midAngles(model()->rowCount());
    +#else
    +      std::vector<double> startAngles, midAngles;
    +      startAngles.insert(startAngles.end(), model()->rowCount(), 0.0);
    +      midAngles.insert(midAngles.end(), model()->rowCount(), 0.0);
    +#endif // WT_TARGET_JAVA
    +
    +      int index90 = 0;
    +
    +      double currentAngle = startAngle_;
    +      for (int i = 0; i < model()->rowCount(); ++i) {
    +	startAngles[i] = currentAngle;
    +
    +	double v = asNumber(model()->data(i, dataColumn_));
    +	if (Utils::isNaN(v))
    +	  continue;
    +
    +	double spanAngle = -v / total * 360;
    +	midAngles[i] = currentAngle + spanAngle / 2.0;
    +
    +	double endAngle = currentAngle + spanAngle;
    +
    +	double to90 = currentAngle - 90;
    +	if (to90 < 0)
    +	  to90 += 360;
    +
    +	if (spanAngle <= -to90)
    +	  index90 = i;
    +
    +	if (endAngle < 0)
    +	  endAngle += 360;	
    +
    +	currentAngle = endAngle;
    +      }
    +
    +      /*
    +       * Draw clock wise side
    +       */
    +      for (int j = 0; j < model()->rowCount(); ++j) {
    +	int i = (index90 + j) % model()->rowCount();
    +
    +	double v = asNumber(model()->data(i, dataColumn_));
    +	if (Utils::isNaN(v))
    +	  continue;
    +
    +	double midAngle = midAngles[i];
    +	double endAngle = startAngles[(i + 1) % model()->rowCount()];
    +
    +	int n = nextIndex(i);
    +
    +	bool visible = (endAngle <= 90) || (endAngle >= 270);
    +
    +	bool drawS2 = visible
    +	  && ((pie_[i].explode > 0.0) || (pie_[n].explode > 0.0));
    +
    +	if (drawS2) {
    +	  double pcx = cx + r * pie_[i].explode * std::cos(-midAngle / 180.0 * M_PI);
    +	  double pcy = cy + r * pie_[i].explode * std::sin(-midAngle / 180.0 * M_PI);
    +
    +	  painter.setBrush(darken(brush(i)));
    +
    +	  drawSide(painter, pcx, pcy, r, endAngle, h);
    +	}
    +
    +	if (!visible)
    +	  break;
    +      }
    +
    +      /*
    +       * Draw counter-clock wise side
    +       */
    +      for (int j = model()->rowCount(); j > 0; --j) {
    +	int i = (index90 + j) % model()->rowCount();
    +
    +	double v = asNumber(model()->data(i, dataColumn_));
    +	if (Utils::isNaN(v))
    +	  continue;
    +
    +	double startAngle = startAngles[i];
    +	double midAngle = midAngles[i];
    +
    +	int p = prevIndex(i);
    +
    +	bool visible = (startAngle >= 90) && (startAngle <= 270);
    +
    +	bool drawS1 = visible
    +	  && ((pie_[i].explode > 0.0) || (pie_[p].explode > 0.0));
    +
    +	if (drawS1) {
    +	  double pcx = cx + r * pie_[i].explode * std::cos(-midAngle / 180.0 * M_PI);
    +	  double pcy = cy + r * pie_[i].explode * std::sin(-midAngle / 180.0 * M_PI);
    +
    +	  painter.setBrush(darken(brush(i)));
    +	  drawSide(painter, pcx, pcy, r, startAngle, h);
    +	}
    +
    +	if (!visible)
    +	  break;
    +      }
    +
    +      /*
    +       * Outside
    +       */
    +      for (int j = 0; j < model()->rowCount(); ++j) {
    +	int i = (index90 + j) % model()->rowCount();
    +
    +	double v = asNumber(model()->data(i, dataColumn_));
    +	if (Utils::isNaN(v))
    +	  continue;
    +
    +	double startAngle = startAngles[i];
    +	double midAngle = midAngles[i];
    +	double endAngle = startAngles[(i + 1) % model()->rowCount()];
    +
    +	double spanAngle = endAngle - startAngle;
    +
    +	if (spanAngle > 0)
    +	  spanAngle -= 360;
    +
    +	bool drawBorder = startAngle > 180 || endAngle > 180
    +	  || spanAngle < -180 || model()->rowCount() == 1;
    +
    +	if (drawBorder) {
    +	  painter.setBrush(darken(brush(i)));
    +
    +	  double pcx = cx + r * pie_[i].explode * std::cos(-midAngle / 180.0 * M_PI);
    +	  double pcy = cy + r * pie_[i].explode * std::sin(-midAngle / 180.0 * M_PI);
    +
    +	  double a1 = (startAngle < 180 ? 360 : startAngle);
    +	  double a2 = (endAngle < 180 ? 180 : endAngle);
    +
    +	  drawOuter(painter, pcx, pcy, r, a1, a2, h);
    +	}
    +      }
    +    }
    +  }
    +
    +  /*
    +   * Draw top
    +   */
    +  if (total == 0)
    +    painter.drawArc(cx - r, cy - r, r*2, r*2, 0, 16*360);
    +  else
    +    drawSlices(painter, cx, cy, r, total, false);
    +}
    +
    +void WPieChart::drawSlices(WPainter& painter,
    +			   double cx, double cy, double r, double total,
    +			   bool shadow) const
    +{
    +  double currentAngle = startAngle_;
    +
    +  for (int i = 0; i < model()->rowCount(); ++i) {
    +    double v = asNumber(model()->data(i, dataColumn_));
    +    if (Utils::isNaN(v))
    +      continue;
    +
    +    double spanAngle = -v / total * 360;
    +    double midAngle = currentAngle + spanAngle / 2.0;
    +
    +    double pcx = cx + r * pie_[i].explode * std::cos(-midAngle / 180.0 * M_PI);
    +    double pcy = cy + r * pie_[i].explode * std::sin(-midAngle / 180.0 * M_PI);
    +
    +    if (!shadow)
    +      painter.setBrush(brush(i));
    +
    +    if (v/total != 1.0)
    +      painter.drawPie(pcx - r, pcy - r, r*2, r*2,
    +		      static_cast<int>(currentAngle * 16),
    +		      static_cast<int>(spanAngle * 16));
    +    else
    +      painter.drawEllipse(pcx - r, pcy - r, r*2, r*2);
    +
    +    /*
    +     * See if we need to add an interactive area
    +     */
    +    if (!shadow) {
    +      WModelIndex index = model()->index(i, dataColumn_);
    +      
    +      boost::any toolTip = index.data(ToolTipRole);
    +      if (!toolTip.empty()) {
    +	const int SEGMENT_ANGLE = 20;
    +
    +	WPolygonArea *area = new WPolygonArea();
    +	WTransform t = painter.worldTransform();
    +
    +	area->addPoint(t.map(WPointF(pcx, pcy)));
    +
    +	double sa = std::fabs(spanAngle);
    +
    +	for (double d = 0; d < sa; d += SEGMENT_ANGLE) {
    +	  double a;
    +	  if (spanAngle < 0)
    +	    a = currentAngle - d;
    +	  else
    +	    a = currentAngle + d;
    +	  area->addPoint(t.map(WPointF(pcx + r * std::cos(-a / 180.0 * M_PI),
    +				       pcy + r * std::sin(-a / 180.0 * M_PI))));
    +	}
    +
    +	double a = currentAngle + spanAngle;
    +	area->addPoint(t.map(WPointF(pcx + r * std::cos(-a / 180.0 * M_PI),
    +				     pcy + r * std::sin(-a / 180.0 * M_PI))));
    +
    +	area->setToolTip(asString(toolTip));
    +
    +	addDataPointArea(index, area);
    +      }
    +    }
    +
    +    double endAngle = currentAngle + spanAngle;
    +    if (endAngle < 0)
    +      endAngle += 360;
    +
    +    currentAngle = endAngle;
    +  }
    +}
    +
    +void WPieChart::addDataPointArea(const WModelIndex& index, WAbstractArea *area) const
    +{
    +  (const_cast<WPieChart *>(this))->addArea(area);
    +}
    +
    +WBrush WPieChart::darken(const WBrush& brush)
    +{
    +  WBrush result = brush;
    +  WColor c = result.color();
    +
    +  c.setRgb(c.red() * 3/4,
    +	   c.green() * 3/4,
    +	   c.blue() * 3/4,
    +	   c.alpha());
    +
    +  result.setColor(c);
    +
    +  return result;
    +}
    +
    +void WPieChart::drawSide(WPainter& painter, double pcx, double pcy, double r,
    +			 double angle, double h) const
    +{
    +  WPainterPath path;
    +  path.arcMoveTo(pcx - r, pcy - r, 2 * r, 2 * r, angle);
    +  path.lineTo(path.currentPosition().x(), path.currentPosition().y() + h);
    +  path.lineTo(pcx, pcy + h);
    +  path.lineTo(pcx, pcy);
    +  path.closeSubPath();
    +
    +  painter.drawPath(path);
    +}
    +
    +void WPieChart::drawOuter(WPainter& painter, double pcx, double pcy, double r,
    +			  double a1, double a2, double h) const
    +{
    +  WPainterPath path;
    +  path.arcMoveTo(pcx - r, pcy - r, 2 * r, 2 * r, a1);
    +  path.lineTo(path.currentPosition().x(), path.currentPosition().y() + h);
    +  path.arcTo(pcx, pcy + h, r, a1, a2 - a1);
    +  path.arcTo(pcx, pcy, r, a2, a1 - a2);
    +  path.closeSubPath();
    +
    +  painter.drawPath(path);
    +}
    +
    +void WPieChart::paintEvent(WPaintDevice *paintDevice)
    +{
    +  while (!areas().empty())
    +    delete areas().front();
    +
    +  WPainter painter(paintDevice);
    +  painter.setRenderHint(WPainter::Antialiasing, true);
    +  paint(painter);
    +}
    +
    +int WPieChart::nextIndex(int i) const
    +{
    +  int r = model()->rowCount();
    +  for (int n = (i + 1) % r; n != i; ++n) {
    +    double v = asNumber(model()->data(n, dataColumn_));
    +    if (!Utils::isNaN(v))
    +      return n;
    +  }
    +
    +  return i;
    +}
    +
    +int WPieChart::prevIndex(int i) const
    +{
    +  int r = model()->rowCount();
    +  for (int p = i - 1; p != i; --p) {
    +    if (p < 0)
    +      p += r;
    +    double v = asNumber(model()->data(p, dataColumn_));
    +    if (!Utils::isNaN(v))
    +      return p;
    +  }
    +
    +  return i;
    +}
    +
    +void WPieChart::modelReset()
    +{
    +  if (model()->rowCount() != (int)pie_.size())
    +    modelChanged();
    +  else
    +    update();
    +}
    +
    +void WPieChart::modelChanged()
    +{
    +  pie_.clear();
    +  pie_.insert(pie_.begin(), model()->rowCount(), PieData());
    +
    +  update();
    +}
    +
    +void WPieChart::modelColumnsInserted(const WModelIndex& parent,
    +				     int start, int end)
    +{
    +  if (labelsColumn_ >= start)
    +    labelsColumn_ += (end - start + 1);
    +
    +  if (dataColumn_ >= start)
    +    dataColumn_ += (end - start + 1);
    +}
    +
    +void WPieChart::modelColumnsRemoved(const WModelIndex& parent,
    +				    int start, int end)
    +{
    +  bool needUpdate = false;
    +
    +  if (labelsColumn_ >= start) {
    +    if (labelsColumn_ <= end) {
    +      labelsColumn_ = -1;
    +      needUpdate = true;
    +    } else
    +      labelsColumn_ -= (end - start + 1);
    +  }
    +
    +  if (dataColumn_ >= start) {
    +    if (dataColumn_ <= end) {
    +      dataColumn_ = -1;
    +      needUpdate = true;
    +    } else
    +      dataColumn_ -= (end - start + 1);
    +  }
    +
    +  if (needUpdate)
    +    update();
    +}
    +
    +void WPieChart::modelRowsInserted(const WModelIndex& parent,
    +				  int start, int end)
    +{
    +  for (int i = start; i <= end; ++i)
    +    pie_.insert(pie_.begin() + i, PieData());
    +
    +  update();
    +}
    +
    +void WPieChart::modelRowsRemoved(const WModelIndex& parent,
    +				 int start, int end)
    +{
    +  for (int i = end; i >= start; --i)
    +    pie_.erase(pie_.begin() + i);
    +
    +  update();
    +}
    +
    +void WPieChart::modelDataChanged(const WModelIndex& topLeft,
    +				 const WModelIndex& bottomRight)
    +{
    +  if ((labelsColumn_ >= topLeft.column()
    +       && labelsColumn_ <= bottomRight.column())
    +      || (dataColumn_ >= topLeft.column()
    +	  && dataColumn_ <= bottomRight.column()))
    +    update();
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Chart/WStandardPalette b/wt-3.1.7a/src/Wt/Chart/WStandardPalette
    new file mode 100644
    index 0000000..7080e0e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WStandardPalette
    @@ -0,0 +1,126 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CHART_WSTANDARD_PALETTE_H_
    +#define CHART_WSTANDARD_PALETTE_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/Chart/WChartPalette>
    +
    +namespace Wt {
    +
    +class WColor;
    +
    +  namespace Chart {
    +
    +/*! \class WStandardPalette Wt/Chart/WStandardPalette Wt/Chart/WStandardPalette
    + *  \brief Standard styling for rendering series in charts.
    + *
    + * This class provides four standard palettes, each composed of eight
    + * different colors (these are recycled at index 8).
    + *
    + * The three colored palettes are a variation on those defined at
    + * http://www.modernlifeisrubbish.co.uk/article/web-2.0-colour-palette.
    + *
    + * The following table lists the background color, and font color of the
    + * different palettes:
    + *
    + * <table style="margin-left:auto; margin-right:auto;">
    + *   <tr>
    + *     <td style="width: 10ex; text-align:center"><b>Neutral</b></td>
    + *     <td style="width: 10ex; text-align:center"><b>Bold</b></td>
    + *     <td style="width: 10ex; text-align:center"><b>Muted</b></td>
    + *     <td style="width: 10ex; text-align:center"><b>GrayScale</b></td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#c3d9ff">Gmail blue</td>
    + *     <td style="background-color:#ff1a00">Mozilla red</td>
    + *     <td style="background-color:#b02b2c; color:white">Ruby on Rails red</td>
    + *     <td style="background-color:rgb(255,255,255);">Gray #1</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#eeeeee">Shiny silver</td>
    + *     <td style="background-color:#4096ee">Flock blue</td>
    + *     <td style="background-color:#3f4c6b; color:white">Mozilla blue</td>
    + *     <td style="background-color:rgb(223,223,223);">Gray #2</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#ffff88">Interactive action yellow</td>
    + *     <td style="background-color:#ff7400; color:white">RSS orange</td>
    + *     <td style="background-color:#d15600; color:white">Etsy vermillion</td>
    + *     <td style="background-color:rgb(191,191,191);">Gray #3</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#cdeb8b">Qoop mint</td>
    + *     <td style="background-color:#008c00; color:white">Techcrunch green</td>
    + *     <td style="background-color:#356aa0; color:white">Digg blue</td>
    + *     <td style="background-color:rgb(159,159,159);">Gray #4</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#356aa0; color:white">Digg blue</td>
    + *     <td style="background-color:#ff0084">Flickr pink</td>
    + *     <td style="background-color:#c79810; color:white">43 Things gold</td>
    + *     <td style="background-color:rgb(127,127,127); color:white">Gray #5</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#36393d; color:white">Shadows grey</td>
    + *     <td style="background-color:#006e2e; color:white">Newsvine green</td>
    + *     <td style="background-color:#73880a; color:white">Writely olive</td>
    + *     <td style="background-color:rgb(95,95,95); color:white">Gray #6</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#f9f7ed">Magnolia Mag.nolia</td>
    + *     <td style="background-color:#f9f7ed">Magnolia Mag.nolia</td>
    + *     <td style="background-color:#d01f3c; color:white">Last.fm crimson</td>
    + *     <td style="background-color:rgb(63,63,63); color:white">Gray #7</td>
    + *   </tr>
    + *   <tr>
    + *     <td style="background-color:#ff7400; color:white">RSS orange</td>
    + *     <td style="background-color:#cc0000; color:white">Rollyo red</td>
    + *     <td style="background-color:#6bba70">Basecamp green</td>
    + *     <td style="background-color:rgb(31,31,31); color:white">Gray #8</td>
    + *   </tr>
    + *  </table>
    + *
    + * The border pen is in all cases a gray pen of 0 width, while the stroke
    + * pen is a line of width 2 in the background color.
    + *
    + * \ingroup charts
    + */
    +class WT_API WStandardPalette : public WChartPalette
    +{
    +public:
    +  /*! \brief Enumeration that indicates the palette flavour.
    +   */
    +  enum Flavour {
    +    Neutral = 0,     //!< Neutral palette
    +    Bold = 1,        //!< Bold palette
    +    Muted = 2,       //!< Muted palette
    +    GrayScale = 255  //!< Grayscale palette
    +  };
    +
    +  /*! \brief Creates a standard palette of a particular flavour.
    +   */
    +  WStandardPalette(Flavour flavour);
    +
    +  virtual WBrush brush(int index) const;
    +  virtual WPen   borderPen(int index) const;
    +  virtual WPen   strokePen(int index) const;
    +  virtual WColor fontColor(int index) const;
    +
    +  /*! \brief Returns the color for the given index.
    +   */
    +  virtual WColor color(int index) const;
    +
    +private:
    +  Flavour flavour_;
    +  bool    filled_;
    +};
    +
    +  }
    +}
    +
    +#endif // CHART_WSTANDARD_PALETTE_H_
    diff --git a/wt-3.1.7a/src/Wt/Chart/WStandardPalette.C b/wt-3.1.7a/src/Wt/Chart/WStandardPalette.C
    new file mode 100644
    index 0000000..45f1a23
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Chart/WStandardPalette.C
    @@ -0,0 +1,108 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/Chart/WStandardPalette>
    +
    +#include <Wt/WBrush>
    +#include <Wt/WColor>
    +#include <Wt/WPen>
    +
    +namespace {
    +
    +  /*
    +   * From http://www.modernlifeisrubbish.co.uk/article/web-2.0-colour-palette
    +   */
    +  unsigned long standardColors[][8] = {
    +    {
    +      /* Neutrals */
    +      0xC3D9FF, // Gmail blue
    +      0xEEEEEE, // Shiny silver
    +      0xFFFF88, // Interactive action yellow
    +      0xCDEB8B, // Qoop mint
    +      0x356AA0, // Digg blue
    +      0x36393D, // Shadows grey
    +      0xF9F7ED, // Magnolia Mag.nolia
    +      0xFF7400  // RSS orange
    +    },
    +
    +    {
    +      /* Bold */
    +      0xFF1A00, // Mozilla red
    +      0x4096EE, // Flock blue
    +      0xFF7400, // RSS orange
    +      0x008C00, // Techcrunch green
    +      0xFF0084, // Flickr pink
    +      0x006E2E, // Newsvine green
    +      0xF9F7ED, // Magnolia Mag.nolia
    +      0xCC0000, // Rollyo red
    +    },
    +
    +    {
    +      /* Muted */
    +      0xB02B2C, // Ruby on Rails red
    +      0x3F4C6B, // Mozilla blue
    +      0xD15600, // Etsy vermillion
    +      0x356AA0, // Digg blue
    +      0xC79810, // 43 Things gold
    +      0x73880A, // Writely olive
    +      0xD01F3C, // Last.fm crimson
    +      0x6BBA70  // Basecamp green
    +    }
    +  };
    +}
    +
    +namespace Wt {
    +  namespace Chart {
    +
    +WStandardPalette::WStandardPalette(Flavour flavour)
    +  : flavour_(flavour)
    +{ }
    +
    +WBrush WStandardPalette::brush(int index) const
    +{
    +  return WBrush(color(index));
    +}
    +
    +WPen WStandardPalette::borderPen(int index) const
    +{
    +  return WPen(WColor(0x44, 0x44, 0x44));
    +}
    +
    +WPen WStandardPalette::strokePen(int index) const
    +{
    +  WPen p(color(index));
    +  p.setWidth(2);
    +  p.setJoinStyle(BevelJoin);
    +  p.setCapStyle(FlatCap);
    +  return p;
    +}
    +
    +WColor WStandardPalette::fontColor(int index) const
    +{
    +  WColor c = color(index);
    +  if (c.red() + c.green() + c.blue() > 3*128) {
    +    return black;
    +  } else
    +    return white;
    +}
    +
    +WColor WStandardPalette::color(int index) const
    +{
    +  if (flavour_ != GrayScale) {
    +    unsigned long rgb = standardColors[flavour_][index % 8];
    +
    +    return WColor((rgb & 0xFF0000) >> 16,
    +		  (rgb & 0x00FF00) >> 8,
    +		  (rgb & 0x0000FF));
    +  } else {
    +    int v = 255 - (index % 8) * 32;
    +
    +    return WColor(v, v, v);
    +  }
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/CMakeLists.txt b/wt-3.1.7a/src/Wt/Dbo/CMakeLists.txt
    new file mode 100644
    index 0000000..9edf60d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/CMakeLists.txt
    @@ -0,0 +1,59 @@
    +ADD_LIBRARY(wtdbo
    +  ptr.C
    +  Call.C
    +  DbAction.C
    +  Exception.C
    +  FixedSqlConnectionPool.C
    +  Query.C
    +  QueryColumn.C
    +  SqlQueryParse.C
    +  Session.C
    +  SqlConnection.C
    +  SqlConnectionPool.C
    +  SqlStatement.C
    +  SqlTraits.C
    +  StdSqlTraits.C
    +  Transaction.C
    +  WtSqlTraits.C
    +)
    +
    +IF(MULTI_THREADED_BUILD)
    +  TARGET_LINK_LIBRARIES(wtdbo ${BOOST_THREAD_LIB} ${CMAKE_THREAD_LIBS_INIT} ${BOOST_DT_LIB})
    +ELSE(MULTI_THREADED_BUILD)
    +  TARGET_LINK_LIBRARIES(wtdbo ${BOOST_DT_LIB})
    +ENDIF(MULTI_THREADED_BUILD)
    +
    +INSTALL(TARGETS wtdbo
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +SET_TARGET_PROPERTIES(
    +  wtdbo
    +PROPERTIES
    +  VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +  SOVERSION ${WTDBO_SOVERSION}
    +  DEBUG_POSTFIX "d"
    +)
    +IF(MSVC)
    +  SET_TARGET_PROPERTIES(
    +    wtdbo
    +  PROPERTIES
    +    COMPILE_FLAGS "${BUILD_PARALLEL} /wd4251 /wd4275 /wd4267"
    +  )
    +ENDIF(MSVC)
    +
    +SUBDIRS(backend)
    +
    +INSTALL_FILES(/include/Wt/Dbo "^[^.]+\\.h$")
    +INSTALL_FILES(/include/Wt/Dbo "^[^b.][^.]+$")
    +
    +IF (ASCIIDOC_FOUND)
    +  IF(NOT WIN32)
    +    ADD_CUSTOM_TARGET(doc)
    +  ENDIF(NOT WIN32)
    +  ASCIIDOC_FILE(dbo-tutorial
    +    ${CMAKE_SOURCE_DIR}/doc/tutorial/dbo/tutorial.doc
    +    ${CMAKE_SOURCE_DIR}/doc/tutorial/dbo/tutorial.html)
    +ENDIF (ASCIIDOC_FOUND)
    +
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Call b/wt-3.1.7a/src/Wt/Dbo/Call
    new file mode 100644
    index 0000000..7d50a98
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Call
    @@ -0,0 +1,65 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_CALL_H_
    +#define WT_DBO_CALL_H_
    +
    +#include <Wt/Dbo/WDboDllDefs.h>
    +#include <string>
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class Session;
    +class SqlStatement;
    +
    +/*! \class Call Wt/Dbo/Call Wt/Dbo/Call
    + *  \brief A database call.
    + *
    + * A call can be used to execute a database command (e.g. an update,
    + * or a stored procedure call).
    + *
    + * \sa Query
    + */
    +class WTDBO_API Call
    +{
    +public:
    +  /*! \brief Destructor.
    +   *
    +   * This executes the call if it wasn't run() yet, and the call has not
    +   * been copied.
    +   */
    +  ~Call();
    +
    +  /*! \brief Copy constructor.
    +   *
    +   * This transfer the call "token" to the copy.
    +   */
    +  Call(const Call& other);
    +
    +  /*! \brief Binds a value to the next positional marker.
    +   *
    +   * This binds the \p value to the next positional marker.
    +   */
    +  template<typename T> Call& bind(const T& value);
    +
    +  void run();
    +
    +private:
    +  bool copied_, run_;
    +  SqlStatement *statement_;
    +  int column_;
    +
    +  Call(Session& session, const std::string& sql);
    +
    +  friend class Session;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_CALL
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Call.C b/wt-3.1.7a/src/Wt/Dbo/Call.C
    new file mode 100644
    index 0000000..0ccdb12
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Call.C
    @@ -0,0 +1,38 @@
    +#include <Wt/Dbo/Call>
    +#include <Wt/Dbo/Session>
    +#include <Wt/Dbo/SqlStatement>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +Call::~Call()
    +{
    +  if (!copied_ && !run_)
    +    run();
    +}
    +
    +Call::Call(const Call& other)
    +  : copied_(false),
    +    run_(false),
    +    statement_(other.statement_),
    +    column_(other.column_)
    +{
    +  const_cast<Call&>(other).copied_ = true;
    +}
    +
    +void Call::run()
    +{
    +  statement_->execute();
    +  statement_->done();
    +}
    +
    +Call::Call(Session& session, const std::string& sql)
    +  : copied_(false),
    +    run_(false)
    +{
    +  statement_ = session.getOrPrepareStatement(sql);
    +  column_ = 0;
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Call_impl.h b/wt-3.1.7a/src/Wt/Dbo/Call_impl.h
    new file mode 100644
    index 0000000..2ea75c6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Call_impl.h
    @@ -0,0 +1,24 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_CALL_IMPL_H_
    +#define WT_DBO_CALL_IMPL_H_
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template<typename T> Call& Call::bind(const T& value)
    +{
    +  sql_value_traits<T>::bind(value, statement_, column_++, -1);
    +
    +  return *this;
    +}
    +
    +  }
    +}
    +
    +
    +#endif // WT_DBO_CALL_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/DbAction b/wt-3.1.7a/src/Wt/Dbo/DbAction
    new file mode 100644
    index 0000000..8f97276
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/DbAction
    @@ -0,0 +1,290 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_DBACTION_H_
    +#define WT_DBO_DBACTION_H_
    +
    +#include <set>
    +#include <string>
    +#include <sstream>
    +#include <vector>
    +
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/collection>
    +#include <Wt/Dbo/Field>
    +#include <Wt/Dbo/SqlStatement>
    +#include <Wt/Dbo/Session>
    +
    +#include <boost/utility/enable_if.hpp>
    +#include <boost/type_traits/is_base_of.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <class C, class Enable = void>
    +struct persist
    +{
    +  template <class A> static void apply(C& obj, A& action);
    +};
    +
    +class SqlStatement;
    +
    +class WTDBO_API InitSchema
    +{
    +public:
    +  InitSchema(Session& session, Session::MappingInfo& mapping);
    +
    +  template<class C> void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +private:
    +  Session& session_;
    +  Session::MappingInfo& mapping_;
    +
    +  bool idField_;
    +  std::string foreignKeyTable_, foreignKeyName_;
    +};
    +
    +class WTDBO_API DropSchema
    +{
    +public:
    +  DropSchema(Session& session, const char *tableName,
    +	     std::set<std::string>& tablesCreated);
    +
    +  template<class C> void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +private:
    +  Session& session_;
    +  const char *tableName_;
    +  std::set<std::string>& tablesDropped_;
    +
    +  void drop(const std::string& tableName);
    +};
    +
    +class WTDBO_API DboAction
    +{
    +public:
    +  DboAction();
    +  DboAction(MetaDboBase& dbo, Session::MappingInfo& mapping);
    +
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +protected:
    +  MetaDboBase& dbo() { return *dbo_; }
    +  Session::MappingInfo& mapping() { return *mapping_; }
    +  int setStatementIdx() const { return setStatementIdx_; }
    +  
    +private:
    +  MetaDboBase *dbo_;
    +  Session::MappingInfo *mapping_;
    +
    +  int setStatementIdx_;
    +};
    +
    +class WTDBO_API LoadBaseAction : public DboAction
    +{
    +public:
    +  LoadBaseAction(MetaDboBase& dbo, Session::MappingInfo& mapping,
    +		 SqlStatement *statement, int& column);
    +
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class D> void actPtr(const PtrRef<D>& field);
    +
    +  bool setsValue() const;
    +
    +protected:
    +  SqlStatement *statement_;
    +  int& column_;
    +
    +  void start();
    +};
    +
    +template <class C>
    +class LoadDbAction : public LoadBaseAction
    +{
    +public:
    +  LoadDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping,
    +	       SqlStatement *statement, int& column);
    +
    +  void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +
    +private:
    +  MetaDbo<C>& dbo_;
    +};
    +
    +class WTDBO_API SaveBaseAction : public DboAction
    +{
    +public:
    +  /*
    +   * Provide a statement and column if you want to abuse this action
    +   * to simply bind values to a statement using field().
    +   */
    +  SaveBaseAction(SqlStatement *statement, int column);
    +
    +  SaveBaseAction(MetaDboBase& dbo, Session::MappingInfo& mapping,
    +		 SqlStatement *statement = 0, int column = 0);
    +
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +
    +  int column() const { return column_; }
    +
    +protected:
    +  SqlStatement *statement_;
    +  bool isInsert_;
    +  int column_;
    +  bool bindNull_;
    +
    +  enum { Dependencies, Self, Sets } pass_;
    +  bool needSetsPass_;
    +
    +  void startDependencyPass();
    +  void startSelfPass();
    +  void startSetsPass();
    +
    +  void exec();
    +};
    +
    +template <class C>
    +class SaveDbAction : public SaveBaseAction
    +{
    +public:
    +  SaveDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping);
    +
    +  void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +
    +private:
    +  MetaDbo<C>& dbo_;
    +};
    +
    +class WTDBO_API TransactionDoneAction : public DboAction
    +{
    +public:
    +  TransactionDoneAction(MetaDboBase& dbo, Session::MappingInfo& mapping,
    +			bool success);
    +
    +  template<class C> void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +
    +private:
    +  Session *session_;
    +  bool success_;
    +  int dummy_;
    +};
    +
    +class WTDBO_API SessionAddAction
    +{
    +public:
    +  SessionAddAction(Session *session);
    +
    +  template<class C> void visit(C& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +private:
    +  Session *session_;
    +};
    +
    +class WTDBO_API ToAnysAction
    +{
    +public:
    +  ToAnysAction(std::vector<boost::any>& result);
    +
    +  template<class C> void visit(const ptr<C>& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +private:
    +  Session *session_;
    +  std::vector<boost::any>& result_;
    +  bool allEmpty_;
    +};
    +
    +class WTDBO_API FromAnyAction
    +{
    +public:
    +  FromAnyAction(int& index, const boost::any& value);
    +
    +  template<class C> void visit(const ptr<C>& obj);
    +
    +  template<typename V> void actId(V& value, const std::string& name, int size);
    +  template<typename V> void act(const FieldRef<V>& field);
    +  template<class C> void actPtr(const PtrRef<C>& field);
    +  template<class C> void actCollection(const CollectionRef<C>& field);
    +
    +  bool getsValue() const;
    +  bool setsValue() const;
    +  bool isSchema() const;
    +
    +private:
    +  Session *session_;
    +  int& index_;
    +  const boost::any& value_;
    +};
    +
    +template<typename V>
    +void SaveBaseAction::act(const FieldRef<V>& field)
    +{
    +  if (pass_ == Self) {
    +    if (bindNull_)
    +      statement_->bindNull(column_++);
    +    else
    +      field.bindValue(statement_, column_++);
    +  }
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_DBACTION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/DbAction.C b/wt-3.1.7a/src/Wt/Dbo/DbAction.C
    new file mode 100644
    index 0000000..9427f84
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/DbAction.C
    @@ -0,0 +1,172 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +#include <sstream>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Dbo/DbAction"
    +#include "Wt/Dbo/Exception"
    +#include "Wt/Dbo/Session"
    +#include "Wt/Dbo/SqlConnection"
    +#include "Wt/Dbo/SqlStatement"
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +InitSchema::InitSchema(Session& session, Session::MappingInfo& mapping)
    +  : session_(session),
    +    mapping_(mapping),
    +    idField_(false)
    +{ }
    +
    +bool InitSchema::getsValue() const { return false; }
    +bool InitSchema::setsValue() const { return false; }
    +bool InitSchema::isSchema() const { return true; }
    +
    +DropSchema::DropSchema(Session& session, const char *tableName,
    +		       std::set<std::string>& tablesDropped)
    +  : session_(session),
    +    tableName_(tableName),
    +    tablesDropped_(tablesDropped)
    +{
    +  tablesDropped_.insert(tableName);
    +}
    +
    +void DropSchema::drop(const std::string& table)
    +{
    +  tablesDropped_.insert(table);
    +  session_.connection(true)
    +    ->executeSql("drop table \"" + Impl::quoteSchemaDot(table) + "\"");
    +}
    +
    +bool DropSchema::getsValue() const { return false; }
    +bool DropSchema::setsValue() const { return false; }
    +bool DropSchema::isSchema() const { return true; }
    +
    +DboAction::DboAction()
    +  : dbo_(0),
    +    mapping_(0),
    +    setStatementIdx_(0)
    +{ }
    +
    +DboAction::DboAction(MetaDboBase& dbo, Session::MappingInfo& mapping)
    +  : dbo_(&dbo),
    +    mapping_(&mapping),
    +    setStatementIdx_(0)
    +{ }
    +
    +bool DboAction::getsValue() const { return false; }
    +bool DboAction::setsValue() const { return false; }
    +bool DboAction::isSchema() const { return false; }
    +
    +LoadBaseAction::LoadBaseAction(MetaDboBase& dbo, Session::MappingInfo& mapping,
    +			       SqlStatement *statement, int& column)
    +  : DboAction(dbo, mapping),
    +    statement_(statement),
    +    column_(column)
    +{ }
    +
    +void LoadBaseAction::start()
    +{
    +  if (mapping().versionFieldName) {
    +    int version;
    +    statement_->getResult(column_++, &version);
    +    dbo().setVersion(version);
    +  }
    +}
    +
    +bool LoadBaseAction::setsValue() const { return true; }
    +
    +SaveBaseAction::SaveBaseAction(SqlStatement *statement, int column)
    +  : DboAction(),
    +    statement_(statement),
    +    column_(column),
    +    bindNull_(false)
    +{
    +  pass_ = Self;
    +}
    +
    +SaveBaseAction::SaveBaseAction(MetaDboBase& dbo, Session::MappingInfo& mapping,
    +			       SqlStatement *statement, int column)
    +  : DboAction(dbo, mapping),
    +    statement_(statement),
    +    column_(column),
    +    bindNull_(false)
    +{
    +  pass_ = Self;
    +}
    +
    +void SaveBaseAction::startDependencyPass()
    +{
    +  pass_ = Dependencies;
    +}
    +
    +void SaveBaseAction::startSelfPass()
    +{
    +  pass_ = Self;
    +  needSetsPass_ = false;
    +
    +  statement_->reset();
    +  column_ = 0;
    +
    +  if (mapping().versionFieldName)
    +    statement_->bind(column_++, dbo().version() + 1);
    +}
    +
    +void SaveBaseAction::exec()
    +{
    +  statement_->execute();
    +
    +  if (isInsert_ && mapping().surrogateIdFieldName)
    +    dbo().setAutogeneratedId(statement_->insertedId());
    +
    +  dbo().setTransactionState(MetaDboBase::SavedInTransaction);
    +}
    +
    +void SaveBaseAction::startSetsPass()
    +{
    +  pass_ = Sets;
    +}
    +
    +bool SaveBaseAction::getsValue() const { return true; }
    +
    +TransactionDoneAction::TransactionDoneAction(MetaDboBase& dbo,
    +					     Session::MappingInfo& mapping,
    +					     bool success)
    +  : DboAction(dbo, mapping),
    +    success_(success)
    +{ }
    +
    +bool TransactionDoneAction::getsValue() const { return true; }
    +
    +SessionAddAction::SessionAddAction(Session *session)
    +  : session_(session)
    +{ }
    +
    +bool SessionAddAction::getsValue() const { return true; }
    +bool SessionAddAction::setsValue() const { return false; }
    +bool SessionAddAction::isSchema() const { return false; }
    +
    +ToAnysAction::ToAnysAction(std::vector<boost::any>& result)
    +  : result_(result)
    +{ }
    +
    +bool ToAnysAction::getsValue() const { return true; }
    +bool ToAnysAction::setsValue() const { return false; }
    +bool ToAnysAction::isSchema() const { return false; }
    +
    +FromAnyAction::FromAnyAction(int& index, const boost::any& value)
    +  : index_(index),
    +    value_(value)
    +{ }
    +
    +bool FromAnyAction::getsValue() const { return false; }
    +bool FromAnyAction::setsValue() const { return true; }
    +bool FromAnyAction::isSchema() const { return false; }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/DbAction_impl.h b/wt-3.1.7a/src/Wt/Dbo/DbAction_impl.h
    new file mode 100644
    index 0000000..f5fff53
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/DbAction_impl.h
    @@ -0,0 +1,635 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_DBACTION_IMPL_H_
    +#define WT_DBO_DBACTION_IMPL_H_
    +
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <class C, class Enable>
    +template <class A>
    +void persist<C, Enable>::apply(C& obj, A& action)
    +{
    +  obj.persist(action);
    +}
    +
    +    /*
    +     * InitSchema
    +     */
    +
    +template<class C>
    +void InitSchema::visit(C& obj)
    +{
    +  mapping_.surrogateIdFieldName = dbo_traits<C>::surrogateIdField();
    +  mapping_.versionFieldName = dbo_traits<C>::versionField();
    +
    +  persist<C>::apply(obj, *this);
    +}
    +
    +template<typename V>
    +void InitSchema::actId(V& value, const std::string& name, int size)
    +{
    +  mapping_.naturalIdFieldName = name;
    +  mapping_.naturalIdFieldSize = size;
    +
    +  if (mapping_.surrogateIdFieldName)
    +    throw std::logic_error("Error: Wt::Dbo::id() called for class C "
    +			   "with surrogate key: "
    +			   "Wt::Dbo::dbo_traits<C>::surrogateIdField() != 0");
    +
    +  idField_ = true;
    +  field(*this, value, name, size);
    +  idField_ = false;
    +}
    +
    +template<typename V>
    +void InitSchema::act(const FieldRef<V>& field)
    +{
    +  if (idField_) {
    +    // Natural id
    +    mapping_.fields.push_back
    +      (FieldInfo(field.name(), &typeid(V), field.sqlType(session_),
    +		 FieldInfo::Mutable | FieldInfo::NeedsQuotes
    +		 | FieldInfo::NaturalId));
    +  } else if (!foreignKeyName_.empty())
    +    // Foreign key
    +    mapping_.fields.push_back
    +      (FieldInfo(field.name(), &typeid(V), field.sqlType(session_),
    +		 foreignKeyTable_, foreignKeyName_,
    +		 FieldInfo::Mutable | FieldInfo::NeedsQuotes
    +		 | FieldInfo::ForeignKey));
    +  else
    +    // Normal field
    +    mapping_.fields.push_back
    +      (FieldInfo(field.name(), &typeid(V), field.sqlType(session_),
    +		 FieldInfo::Mutable | FieldInfo::NeedsQuotes));
    +}
    +
    +template<class C>
    +void InitSchema::actPtr(const PtrRef<C>& field)
    +{
    +  Session::Mapping<C> *mapping = session_.getMapping<C>();
    +
    +  foreignKeyName_ = field.name();
    +  foreignKeyTable_ = mapping->tableName;
    +
    +  field.visit(*this, &session_);
    +
    +  foreignKeyName_.clear();
    +  foreignKeyTable_.clear();
    +}
    +
    +template<class C>
    +void InitSchema::actCollection(const CollectionRef<C>& field)
    +{
    +  const char *joinTableName = session_.tableName<C>();
    +
    +  mapping_.sets.push_back
    +    (Session::SetInfo(joinTableName, field.type(), field.joinName(),
    +		      field.joinId()));
    +}
    +
    +    /*
    +     * DropSchema
    +     */
    +
    +template<class C>
    +void DropSchema::visit(C& obj)
    +{
    +  persist<C>::apply(obj, *this);
    +
    +  drop(tableName_);
    +}
    +
    +template<typename V>
    +void DropSchema::actId(V& value, const std::string& name, int size)
    +{ }
    +
    +template<typename V>
    +void DropSchema::act(const FieldRef<V>& field)
    +{ }
    +
    +template<class C>
    +void DropSchema::actPtr(const PtrRef<C>& field)
    +{ }
    +
    +template<class C>
    +void DropSchema::actCollection(const CollectionRef<C>& field)
    +{
    +  if (field.type() == ManyToMany) {
    +    if (tablesDropped_.count(field.joinName()) == 0)
    +      drop(field.joinName());
    +  } else {
    +    const char *tableName = session_.tableName<C>();
    +    if (tablesDropped_.count(tableName) == 0) {
    +      DropSchema action(session_, tableName, tablesDropped_);
    +      C dummy;
    +      action.visit(dummy);
    +    }
    +  }
    +}
    +
    +    /*
    +     * DboAction
    +     */
    +
    +template<class C>
    +void DboAction::actCollection(const CollectionRef<C>& field)
    +{
    +  if (dbo_->isPersisted()) {
    +    int statementIdx = Session::FirstSqlSelectSet + setStatementIdx_;
    +
    +    const std::string& sql
    +      = dbo_->session()->getStatementSql(mapping_->tableName, statementIdx);
    +
    +    field.value().setRelationData(dbo_->session(), &sql, dbo_);
    +  } else
    +    field.value().setRelationData(0, 0, 0);
    +
    +  if (field.type() == ManyToOne)
    +    setStatementIdx_ += 1;
    +  else
    +    setStatementIdx_ += 3;
    +}
    +
    +    /*
    +     * LoadDbAction
    +     */
    +
    +template<typename V>
    +void LoadBaseAction::act(const FieldRef<V>& field)
    +{
    +  field.setValue(*dbo().session(), statement_, column_++);
    +}
    +
    +template<class C>
    +void LoadBaseAction::actPtr(const PtrRef<C>& field)
    +{
    +  field.visit(*this, dbo().session());
    +}
    +
    +template <class C>
    +LoadDbAction<C>::LoadDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping,
    +			      SqlStatement *statement, int& column)
    +  : LoadBaseAction(dbo, mapping, statement, column),
    +    dbo_(dbo)
    +{ }
    +
    +template<class C>
    +void LoadDbAction<C>::visit(C& obj)
    +{
    +  ScopedStatementUse use(statement_);
    +
    +  bool continueStatement = statement_ != 0;
    +  Session *session = dbo_.session();
    +
    +  if (!continueStatement) {
    +    use(statement_ = session->template getStatement<C>(Session::SqlSelectById));
    +    statement_->reset();
    +
    +    int column = 0;
    +    dbo_.bindId(statement_, column);
    +
    +    statement_->execute();
    +
    +    if (!statement_->nextRow()) {
    +      throw ObjectNotFoundException
    +	(boost::lexical_cast<std::string>(dbo_.id()));
    +    }
    +  }
    +
    +  start();
    +
    +  persist<C>::apply(obj, *this);
    +
    +  if (!continueStatement && statement_->nextRow())
    +    throw Exception("Dbo load: multiple rows for id "
    +		    + boost::lexical_cast<std::string>(dbo_.id()) + " ??");
    +
    +  if (continueStatement)
    +    use(0);
    +}
    +
    +template<class C>
    +template<typename V>
    +void LoadDbAction<C>::actId(V& value, const std::string& name, int size)
    +{
    +  field(*this, value, name, size);
    +
    +  dbo_.setId(value);
    +}
    +
    +    /*
    +     * SaveDbAction
    +     */
    +
    +template<class C>
    +void SaveBaseAction::actPtr(const PtrRef<C>& field)
    +{
    +  switch (pass_) {
    +  case Dependencies:
    +    field.value().flush();
    +
    +    break;
    +  case Self:
    +    bindNull_ = !field.value();
    +    field.visit(*this, dbo().session());
    +    bindNull_ = false;
    +
    +    break;
    +  case Sets:
    +    break;
    +  }
    +}
    +
    +template<class C>
    +void SaveBaseAction::actCollection(const CollectionRef<C>& field)
    +{
    +  switch (pass_) {
    +  case Dependencies:
    +    break;
    +
    +  case Self:
    +    if (isInsert_ || field.type() == ManyToMany)
    +      needSetsPass_ = true;
    +
    +    break;
    +  case Sets:
    +    if (field.type() == ManyToMany) {
    +      typename collection< ptr<C> >::Activity *activity
    +	= field.value().activity();
    +
    +      if (activity) {
    +	std::set< ptr<C> >& inserted = activity->inserted;
    +
    +	// Sql insert
    +	int statementIdx
    +	  = Session::FirstSqlSelectSet + setStatementIdx() + 1;
    +
    +	SqlStatement *statement;
    +
    +	statement = dbo().session()->getStatement(mapping().tableName,
    +						  statementIdx);
    +	{
    +	  ScopedStatementUse use(statement);
    +
    +	  for (typename std::set< ptr<C> >::iterator i = inserted.begin();
    +	       i != inserted.end(); ++i) {
    +	    // Make sure it is saved
    +	    i->flush();
    +
    +	    statement->reset();
    +	    int column = 0;
    +
    +	    dbo().bindId(statement, column);
    +	    i->obj()->bindId(statement, column);
    +
    +	    statement->execute();
    +	  }
    +	}
    +
    +	std::set< ptr<C> >& erased = activity->erased;
    +
    +	// Sql delete
    +	++statementIdx;
    +
    +	statement = dbo().session()->getStatement(mapping().tableName,
    +						  statementIdx);
    +
    +	{
    +	  ScopedStatementUse use(statement);
    +	  for (typename std::set< ptr<C> >::iterator i = erased.begin();
    +	       i != erased.end(); ++i) {
    +	    // Make sure it is saved (?)
    +	    i->flush();
    +
    +	    statement->reset();
    +	    int column = 0;
    +
    +	    dbo().bindId(statement, column);
    +	    i->obj()->bindId(statement, column);
    +
    +	    statement->execute();
    +	  }
    +	}
    +
    +	activity->transactionInserted.insert(activity->inserted.begin(),
    +					     activity->inserted.end());
    +	activity->transactionErased.insert(activity->erased.begin(),
    +					   activity->erased.end());
    +
    +	activity->inserted.clear();
    +	activity->erased.clear();
    +      }
    +    }
    +
    +    DboAction::actCollection(field);
    +  }
    +}
    +
    +template <class C>
    +SaveDbAction<C>::SaveDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping)
    +  : SaveBaseAction(dbo, mapping),
    +    dbo_(dbo)
    +{ }
    +
    +template<class C>
    +void SaveDbAction<C>::visit(C& obj)
    +{
    +  /*
    +   * (1) Dependencies
    +   */
    +  startDependencyPass();
    +
    +  persist<C>::apply(obj, *this);
    +
    +  /*
    +   * (2) Self
    +   */
    +  {
    +    ScopedStatementUse use(statement_);
    +    if (!statement_) {
    +      isInsert_ = dbo_.deletedInTransaction()
    +	|| (dbo_.isNew() && !dbo_.savedInTransaction());
    +
    +      use(statement_ = isInsert_
    +	  ? dbo_.session()->template getStatement<C>(Session::SqlInsert)
    +	  : dbo_.session()->template getStatement<C>(Session::SqlUpdate));
    +    } else
    +      isInsert_ = false;
    +
    +    startSelfPass();
    +    persist<C>::apply(obj, *this);
    +
    +    if (!isInsert_) {
    +      dbo_.bindId(statement_, column_);
    +
    +      if (mapping().versionFieldName) {
    +	// when saved in the transaction, we will be at version() + 1
    +	statement_->bind(column_++, dbo_.version()
    +			 + (dbo_.savedInTransaction() ? 1 : 0));
    +      }
    +    }
    +
    +    exec();
    +
    +    if (!isInsert_) {
    +      int modifiedCount = statement_->affectedRowCount();
    +      if (modifiedCount != 1) {
    +	MetaDbo<C>& dbo = static_cast< MetaDbo<C>& >(dbo_);
    +	std::string idString = boost::lexical_cast<std::string>(dbo.id());
    +
    +	throw StaleObjectException(idString, dbo_.version());
    +      }
    +    }
    +  }
    +
    +  /*
    +   * (3) collections:
    +   *  - references in select queries (for ManyToOne and ManyToMany)
    +   *  - inserts in ManyToMany collections
    +   *  - deletes from ManyToMany collections
    +   */
    +  if (needSetsPass_) {
    +    startSetsPass();
    +    persist<C>::apply(obj, *this);
    +  }
    +}
    +
    +template<class C>
    +template<typename V>
    +void SaveDbAction<C>::actId(V& value, const std::string& name, int size)
    +{
    +  field(*this, value, name, size);
    +
    +  /* Later, we may also want to support id changes ? */
    +  if (pass_ == Self && isInsert_)
    +    dbo_.setId(value);
    +}
    +
    +    /*
    +     * TransactionDoneAction
    +     */
    +
    +template<class C>
    +void TransactionDoneAction::visit(C& obj)
    +{
    +  persist<C>::apply(obj, *this);
    +}
    +
    +template<typename V>
    +void TransactionDoneAction::actId(V& value, const std::string& name, int size)
    +{ 
    +  field(*this, value, name, size);
    +}
    +
    +template<typename V>
    +void TransactionDoneAction::act(const FieldRef<V>& field)
    +{ }
    +
    +template<class C>
    +void TransactionDoneAction::actPtr(const PtrRef<C>& field)
    +{ }
    +
    +template<class C>
    +void TransactionDoneAction::actCollection(const CollectionRef<C>& field)
    +{
    +  if (!success_)
    +    DboAction::actCollection(field);
    +
    +  if (field.type() == ManyToMany) {
    +    if (success_)
    +      field.value().resetActivity();
    +    else {
    +      typename collection< ptr<C> >::Activity *activity
    +	= field.value().activity();
    +
    +      if (activity) {
    +	activity->inserted = activity->transactionInserted;
    +	activity->transactionInserted.clear();
    +	activity->erased = activity->transactionErased;
    +	activity->transactionErased.clear();
    +      }
    +    }
    +  }
    +}
    +
    +    /*
    +     * SessionAddAction
    +     */
    +
    +template<class C>
    +void SessionAddAction::visit(C& obj)
    +{
    +  persist<C>::apply(obj, *this);
    +}
    +
    +template<typename V>
    +void SessionAddAction::actId(V& value, const std::string& name, int size)
    +{ 
    +  field(*this, value, name, size);
    +}
    +
    +template<typename V>
    +void SessionAddAction::act(const FieldRef<V>& field)
    +{ }
    +
    +template<class C>
    +void SessionAddAction::actPtr(const PtrRef<C>& field)
    +{ }
    +
    +template<class C>
    +void SessionAddAction::actCollection(const CollectionRef<C>& field)
    +{
    +  if (field.value().session() != session_)
    +    field.value().setRelationData(session_, 0, 0);
    +
    +  // FIXME: cascade add ?
    +}
    +
    +    /*
    +     * ToAnysAction
    +     */
    +
    +template<class C>
    +void ToAnysAction::visit(const ptr<C>& obj)
    +{
    +  if (dbo_traits<C>::surrogateIdField())
    +    result_.push_back(obj.id());
    +
    +  if (dbo_traits<C>::versionField())
    +    result_.push_back(obj.version());
    +
    +  if (obj) {
    +    allEmpty_ = false;
    +    persist<C>::apply(const_cast<C&>(*obj), *this);
    +  } else {
    +    C dummy;
    +    allEmpty_ = true;
    +    persist<C>::apply(dummy, *this);
    +  }
    +}
    +
    +template <typename V, class Enable = void>
    +struct ToAny
    +{
    +  static boost::any convert(const V& v) {
    +    return v;
    +  }  
    +};
    +
    +template <typename Enum>
    +struct ToAny<Enum, typename boost::enable_if<boost::is_enum<Enum> >::type> 
    +{
    +  static boost::any convert(const Enum& v) {
    +    return static_cast<int>(v);
    +  }
    +};
    +
    +template <typename V>
    +boost::any convertToAny(const V& v) {
    +  return ToAny<V>::convert(v);
    +}
    +
    +template<typename V>
    +void ToAnysAction::actId(V& value, const std::string& name, int size)
    +{ 
    +  field(*this, value, name, size);
    +}
    +
    +template<typename V>
    +void ToAnysAction::act(const FieldRef<V>& field)
    +{ 
    +  if (allEmpty_)
    +    result_.push_back(boost::any());
    +  else
    +    result_.push_back(convertToAny(field.value()));
    +}
    +
    +template<class C>
    +void ToAnysAction::actPtr(const PtrRef<C>& field)
    +{
    +  field.visit(*this, 0);
    +}
    +
    +template<class C>
    +void ToAnysAction::actCollection(const CollectionRef<C>& field)
    +{
    +}
    +
    +    /*
    +     * FromAnyAction
    +     */
    +
    +template<class C>
    +void FromAnyAction::visit(const ptr<C>& obj)
    +{
    +  if (dbo_traits<C>::surrogateIdField()) {
    +    if (index_ == 0)
    +      throw std::logic_error("dbo_result_traits::setValues(): "
    +			     "cannot set surrogate id.");
    +    --index_;
    +  }
    +
    +  if (dbo_traits<C>::versionField()) {
    +    if (index_ == 0)
    +      throw std::logic_error("dbo_result_traits::setValues(): "
    +			     "cannot set version field.");
    +    --index_;
    +  }
    +
    +  persist<C>::apply(const_cast<C&>(*obj), *this);
    +
    +  if (index_ == -1)
    +    obj.modify();
    +}
    +
    +template <typename V, class Enable = void>
    +struct FromAny
    +{
    +  static V convert(const boost::any& v) {
    +    return boost::any_cast<V>(v);
    +  }  
    +};
    +
    +template <typename Enum>
    +struct FromAny<Enum, typename boost::enable_if<boost::is_enum<Enum> >::type> 
    +{
    +  static Enum convert(const boost::any& v) {
    +    return static_cast<Enum>(boost::any_cast<int>(v));
    +  }
    +};
    +
    +template<typename V>
    +void FromAnyAction::act(const FieldRef<V>& field)
    +{
    +  if (index_ == 0) {
    +    field.setValue(FromAny<V>::convert(value_));
    +
    +    index_ = -1;
    +  } else if (index_ > 0)
    +    --index_;
    +}
    +
    +template<class C>
    +void FromAnyAction::actPtr(const PtrRef<C>& field)
    +{
    +  field.visit(*this, 0);
    +}
    +
    +template<class C>
    +void FromAnyAction::actCollection(const CollectionRef<C>& field)
    +{
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_DBACTION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Dbo b/wt-3.1.7a/src/Wt/Dbo/Dbo
    new file mode 100644
    index 0000000..d3cb11a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Dbo
    @@ -0,0 +1,13 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_DBO_H_
    +#define WT_DBO_DBO_H_
    +
    +#include <Wt/Dbo/Types>
    +#include <Wt/Dbo/Impl>
    +
    +#endif // WT_DBO_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Exception b/wt-3.1.7a/src/Wt/Dbo/Exception
    new file mode 100644
    index 0000000..530c27d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Exception
    @@ -0,0 +1,92 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_EXCEPTION_H_
    +#define WT_DBO_EXCEPTION_H_
    +
    +#include <string>
    +#include <stdexcept>
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +/*! \class Exception Wt/Dbo/Exception Wt/Dbo/Exception
    + *  \brief %Exception base class for %Wt::%Dbo.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API Exception : public std::runtime_error
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  Exception(const std::string& error);
    +};
    +
    +/*! \class StaleObjectException Wt/Dbo/Exception Wt/Dbo/Exception
    + *  \brief %Exception thrown when %Wt::%Dbo detects a concurrent modification
    + *
    + * %Wt::%Dbo uses optimistic locking for detecting and preventing
    + * concurrent modification of database objects. When trying to save an
    + * object that has been modified concurrently by another session, since
    + * it was read from the database, this exception is thrown.
    + *
    + * This exception is thrown during flushing from Session::flush() or
    + * ptr::flush(). Since flushing will also be done automatically when
    + * needed (e.g. before running a query or before committing a
    + * transaction), you should be prepared to catch this exception from most
    + * library API calls.
    + *
    + * \note We should perhaps also have a ptr::isStale() method to find out
    + *       what database object is stale ?
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API StaleObjectException : public Exception
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  StaleObjectException(const std::string& id, int version);
    +};
    +
    +/*! \class ObjectNotFoundException Wt/Dbo/Exception Wt/Dbo/Exception
    + *  \brief %Exception thrown when trying to load a non-existing object.
    + *
    + * This %Exception is thrown by Session::load() when trying to load an object
    + * that does not exist.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API ObjectNotFoundException : public Exception
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  ObjectNotFoundException(const std::string& id);
    +};
    +
    +/*! \class NoUniqueResultException Wt/Dbo/Exception Wt/Dbo/Exception
    + *  \brief %Exception thrown when a query unexpectedly finds a non-unique result.
    + *
    + * This %Exception is thrown by Query::resultValue() when the query has
    + * more than one result.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API NoUniqueResultException : public Exception
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  NoUniqueResultException();
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_EXCEPTION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Exception.C b/wt-3.1.7a/src/Wt/Dbo/Exception.C
    new file mode 100644
    index 0000000..ddbdaa9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Exception.C
    @@ -0,0 +1,31 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/Exception"
    +
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +Exception::Exception(const std::string& error)
    +  : std::runtime_error(error)
    +{ }
    +
    +StaleObjectException::StaleObjectException(const std::string& id, int version)
    +  : Exception("Stale object, id = " + id + ", version = "
    +	      + boost::lexical_cast<std::string>(version))
    +{ }
    +
    +ObjectNotFoundException::ObjectNotFoundException(const std::string& id)
    +  : Exception("Object not found, id = " + id)
    +{ }
    +
    +NoUniqueResultException::NoUniqueResultException()
    +  : Exception("Query: resultValue(): more than one result")
    +{ }
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Field b/wt-3.1.7a/src/Wt/Dbo/Field
    new file mode 100644
    index 0000000..da5cc8a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Field
    @@ -0,0 +1,214 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_FIELD_H_
    +#define WT_DBO_FIELD_H_
    +
    +#include <string>
    +
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/collection>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class Session;
    +class SqlStatement;
    +
    +template <typename V>
    +class FieldRef
    +{
    +public:
    +  FieldRef(V& value, const std::string& name, int size);
    +
    +  const std::string& name() const;
    +  int size() const;
    +
    +  std::string sqlType(Session& session) const;
    +  const std::type_info *type() const;
    +  const V& value() const { return value_; }
    +  void setValue(const V& value) const { value_ = value; }
    +
    +  void bindValue(SqlStatement *statement, int column) const;
    +  void setValue(Session& session, SqlStatement *statement, int column) const;
    +
    +private:
    +  V& value_;
    +  std::string name_;
    +  int size_;
    +};
    +
    +/*! \brief Type of an SQL relation.
    + *
    + * \ingroup dbo
    + */
    +enum RelationType {
    +  ManyToOne,  //!< Many-to-One relationship
    +  ManyToMany  //!< Many-to-Many relationship
    +};
    +
    +template <class C>
    +class CollectionRef
    +{
    +public:
    +  CollectionRef(collection< ptr<C> >& value, RelationType type,
    +		const std::string& joinName, const std::string& joinId);
    +
    +  collection< ptr<C> >& value() const { return value_; }
    +  const std::string& joinName() const { return joinName_; }
    +  const std::string& joinId() const { return joinId_; }
    +  RelationType type() const { return type_; }
    +
    +private:
    +  collection< ptr<C> >& value_;
    +  std::string joinName_, joinId_;
    +  RelationType type_;
    +};
    +
    +template <class C>
    +class PtrRef
    +{
    +public:
    +  PtrRef(ptr<C>& value, const std::string& name, int size);
    +
    +  const std::string& name() const { return name_; }
    +  const ptr<C>& value() const { return value_; }
    +  typename dbo_traits<C>::IdType id() const { return value_.id(); }
    +
    +  const std::type_info *type() const;
    +
    +  /*
    +   * If session = 0, the visited foreign key fields will not be named
    +   * correctly (ok when e.g. reading/writing data)
    +   */
    +  template <typename A> void visit(A& action, Session *session) const;
    +
    +private:
    +  ptr<C>& value_;
    +  std::string name_;
    +  int size_;
    +};
    +
    +/*! \brief Maps a natural primary key (id) field.
    + *
    + * A natural primary key field is optional. If you define one and its
    + * type is not <tt>long long</tt>, you must specialize
    + * Wt::Dbo::dbo_traits to match the type \p V as the IdType for this
    + * class. When not specified for a class, an auto-generated surrogate
    + * key field is used with the name specified by
    + * Wt::Dbo::dbo_traits::surrogateIdField(), which defaults to "id".
    + *
    + * Unlike the default surrogate key, a natural id is not
    + * auto-generated and thus you need to give each object a unique value
    + * when creating a new object.
    + *
    + * The id may be a composite type. In that case, you need to
    + * specialize Wt::Dbo::field().
    + *
    + * \ingroup dbo
    + */
    +template <class Action, typename V>
    +void id(Action& action, V& value, const std::string& name = "id",
    +	int size = -1);
    +
    +/*! \brief Maps a database object field.
    + *
    + * This function binds the field \p value to the database field \p name.
    + *
    + * The optional \p size may be used as a hint for the needed
    + * storage. It is only useful for <i>std::string</i> or
    + * <i>Wt::WString</i> fields, and causes the schema to use a
    + * <tt>varchar(</tt><i><tt>size</tt></i><tt>)</tt> for storing the
    + * field instead of an unlimited length string type.
    + *
    + * You may want to specialize this method for a particular composite
    + * type which should be persisted in multiple database fields but not as
    + * a separate table (e.g. for natural composite primary keys, see id()).
    + *
    + * For example:
    + * \code
    + * struct Coordinate {
    + *   int x, y;
    + * };
    + *
    + * namespace Wt {
    + *   namespace Dbo {
    + *
    + *     template <class Action>
    + *     void field(Action& action, Coordinate& coordinate, const std::string& name, int size = -1)
    + *     {
    + *       field(action, coordinate.x, name + "_x");
    + *       field(action, coordinate.y, name + "_y");
    + *     }
    + *
    + *   } // namespace Dbo
    + * } // namespace Wt
    + * \endcode
    + *
    + * To support a custom type that needs to be persisted as a single
    + * field, you should specialize sql_value_traits instead.
    + *
    + * \ingroup dbo
    + */
    +template <class Action, typename V>
    +void field(Action& action, V& value, const std::string& name, int size = -1);
    +
    +template <class Action, class C>
    +void field(Action& action, ptr<C>& value, const std::string& name,
    +	   int size = -1);
    +
    +/*! \brief Maps the "One"-side of a ManyToOne relation.
    + *
    + * This function binds the pointer field \p value to the database
    + * field \p name <tt>+ "_id"</tt>.
    + *
    + * A belongsTo() will usually have a counter-part hasMany() declaration
    + * in the referenced class \p C.
    + *
    + * \sa hasMany()
    + *
    + * \ingroup dbo
    + */
    +template <class Action, class C>
    +void belongsTo(Action& action, ptr<C>& value, const std::string& name,
    +	       int size = -1);
    +
    +/*! \brief Maps the "Many"-side of a ManyToOne or ManyToMany relation.
    + *
    + * This function binds the collection field \p value to contain objects
    + * (of type \p C).
    + *
    + * For a \link Wt::Dbo::ManyToOne ManyToOne\endlink relation, the
    + * query is defined by the database field \p joinName <tt>+ "_id"</tt>
    + * in the table that matches \p C. This should be the same name as
    + * passed to the matching belongsTo() method for the other side of the
    + * relation.
    + *
    + * For a \link Wt::Dbo::ManyToMany ManyToMany\endlink relation, the \p
    + * joinName is the name of a linker table (this linker table may be
    + * schema qualified, e.g. <tt>"myschema.posts_tags"</tt>. Thus, also
    + * for a ManyToMany relation, both sides of the relationship will have
    + * the same joinName passed to them. You may optionally specify the \p
    + * joinId which is used to reference this side of the relationship in
    + * the join table. If \p joinId is left blank, the value will be
    + * table name of the current class + "_id".
    + *
    + * A hasMany() must have a counter-part belongsTo() or hasMany()
    + * declaration in the referenced class \p C.
    + *
    + * \sa belongsTo()
    + *
    + * \ingroup dbo
    + */
    +template <class Action, class C>
    +void hasMany(Action& action, collection< ptr<C> >& value,
    +	     RelationType type, const std::string& joinName,
    +	     const std::string& joinId = "");
    +
    +  }
    +}
    +
    +#endif // WT_DBO_FIELD
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Field_impl.h b/wt-3.1.7a/src/Wt/Dbo/Field_impl.h
    new file mode 100644
    index 0000000..c3d9de8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Field_impl.h
    @@ -0,0 +1,156 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_FIELD_IMPL_H_
    +#define WT_DBO_FIELD_IMPL_H_
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/Dbo/Session>
    +#include <Wt/Dbo/Exception>
    +#include <Wt/Dbo/SqlStatement>
    +#include <Wt/Dbo/SqlTraits>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <typename V>
    +FieldRef<V>::FieldRef(V& value, const std::string& name, int size)
    +  : value_(value),
    +    name_(name),
    +    size_(size)
    +{ }
    +
    +template <typename V>
    +const std::string& FieldRef<V>::name() const
    +{
    +  return name_;
    +}
    +
    +template <typename V>
    +int FieldRef<V>::size() const
    +{
    +  return size_;
    +}
    +
    +template <typename V>
    +std::string FieldRef<V>::sqlType(Session& session) const
    +{
    +  return sql_value_traits<V>::type(session.connection(false), size_);
    +}
    +
    +template <typename V>
    +const std::type_info *FieldRef<V>::type() const
    +{
    +  return &typeid(V);
    +}
    +
    +template <typename V>
    +void FieldRef<V>::bindValue(SqlStatement *statement, int column) const
    +{
    +  sql_value_traits<V>::bind(value_, statement, column, size_);
    +}
    +
    +template <typename V>
    +void FieldRef<V>::setValue(Session& session, SqlStatement *statement,
    +			   int column) const
    +{
    +  sql_value_traits<V>::read(value_, statement, column, size_);
    +}
    +
    +template <class C>
    +CollectionRef<C>::CollectionRef(collection< ptr<C> >& value,
    +				RelationType type,
    +				const std::string& joinName,
    +				const std::string& joinId)
    +  : value_(value), joinName_(joinName), joinId_(joinId), type_(type)
    +{ }
    +
    +template <class C>
    +PtrRef<C>::PtrRef(ptr<C>& value, const std::string& name, int size)
    +  : value_(value),
    +    name_(name),
    +    size_(size)
    +{ }
    +
    +template <class C>
    +template <class A>
    +void PtrRef<C>::visit(A& action, Session *session) const
    +{
    +  typename dbo_traits<C>::IdType id;
    +
    +  if (action.setsValue())
    +    id = dbo_traits<C>::invalidId();
    +  else
    +    id = value_.id();
    +
    +  std::string idFieldName = "stub";
    +  int size = size_;
    +
    +  if (session) {
    +    Session::MappingInfo *mapping = session->getMapping<C>();
    +    idFieldName = mapping->naturalIdFieldName;
    +    size = mapping->naturalIdFieldSize;
    +
    +    if (idFieldName.empty())
    +      idFieldName = mapping->surrogateIdFieldName;
    +  }
    +
    +  field(action, id, name_ + "_" + idFieldName, size);
    +
    +  if (action.setsValue()) {
    +    if (!(id == dbo_traits<C>::invalidId())) {
    +      if (session)
    +	value_ = session->loadLazy<C>(id);
    +      else
    +	throw std::logic_error("Could not load referenced Dbo::ptr, "
    +			       "no session?");
    +    }
    +  }
    +}
    +
    +template <class C>
    +const std::type_info *PtrRef<C>::type() const
    +{
    +  return &typeid(typename dbo_traits<C>::IdType);
    +}
    +
    +template <class A, typename V>
    +void id(A& action, V& value, const std::string& name, int size)
    +{
    +  action.actId(value, name, size);
    +}
    +
    +template <class A, typename V>
    +void field(A& action, V& value, const std::string& name, int size)
    +{
    +  action.act(FieldRef<V>(value, name, size));
    +}
    +
    +template <class A, class C>
    +void field(A& action, ptr<C>& value, const std::string& name, int size)
    +{
    +  action.actPtr(PtrRef<C>(value, name, size));
    +}
    +
    +template <class A, class C>
    +void belongsTo(A& action, ptr<C>& value, const std::string& name, int size)
    +{
    +  action.actPtr(PtrRef<C>(value, name, size));
    +}
    +
    +template <class A, class C>
    +void hasMany(A& action, collection< ptr<C> >& value,
    +	     RelationType type, const std::string& joinName,
    +	     const std::string& joinId)
    +{
    +  action.actCollection(CollectionRef<C>(value, type, joinName, joinId));
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_FIELD_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool b/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool
    new file mode 100644
    index 0000000..47a0755
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool
    @@ -0,0 +1,58 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_FIXED_SQL_CONNECTION_POOL_H_
    +#define WT_DBO_FIXED_SQL_CONNECTION_POOL_H_
    +
    +#include <Wt/Dbo/SqlConnectionPool>
    +
    +#include <vector>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +      struct FixedSqlConnectionPoolImpl;
    +    }
    +
    +/*! \class FixedSqlConnectionPool Wt/Dbo/FixedSqlConnectionPool Wt/Dbo/FixedSqlConnectionPool
    + *  \brief A connection pool of fixed size.
    + *
    + * This provides a connection pool of fixed size: its size is determined at
    + * startup time, and the pool will not grow as more connections are needed.
    + *
    + * This is adequate when the number of threads (which need different
    + * connections to work with) is also bounded, like when using a fixed
    + * size thread pool. This is for example the case when used in
    + * conjunction with %Wt. Note that you do not need as many connections
    + * as sessions, since Session will only use a connection while
    + * processing a transaction.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API FixedSqlConnectionPool : public SqlConnectionPool
    +{
    +public:
    +  /*! \brief Creates a fixed connection pool.
    +   *
    +   * The pool is initialized with the provided \p connection, which is
    +   * cloned (\p size - 1) times.
    +   *
    +   * The pool thus takes ownership of the given connection.
    +   */
    +  FixedSqlConnectionPool(SqlConnection *connection, int size);
    +
    +  virtual ~FixedSqlConnectionPool();
    +  virtual SqlConnection *getConnection();
    +  virtual void returnConnection(SqlConnection *);
    +
    +private:
    +  Impl::FixedSqlConnectionPoolImpl *impl_;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_CONNECTION_POOL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool.C b/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool.C
    new file mode 100644
    index 0000000..b489ee8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/FixedSqlConnectionPool.C
    @@ -0,0 +1,84 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/FixedSqlConnectionPool"
    +#include "Wt/Dbo/SqlConnection"
    +#include "Wt/Dbo/Exception"
    +
    +#ifdef WT_THREADED
    +#include <boost/thread.hpp>
    +#include <boost/thread/condition.hpp>
    +#endif // WT_THREADED
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +struct FixedSqlConnectionPoolImpl {
    +#ifdef WT_THREADED
    +  boost::mutex mutex;
    +  boost::condition connectionAvailable;
    +#endif // WT_THREADED
    +
    +  std::vector<SqlConnection *> freeList;
    +};
    +
    +    }
    +
    +FixedSqlConnectionPool::FixedSqlConnectionPool(SqlConnection *connection,
    +					       int size)
    +{
    +  impl_ = new Impl::FixedSqlConnectionPoolImpl();
    +  
    +  impl_->freeList.push_back(connection);
    +
    +  for (int i = 1; i < size; ++i)
    +    impl_->freeList.push_back(connection->clone());
    +}
    +
    +FixedSqlConnectionPool::~FixedSqlConnectionPool()
    +{
    +  for (unsigned i = 0; i < impl_->freeList.size(); ++i)
    +    delete impl_->freeList[i];
    +
    +  delete impl_;
    +}
    +
    +SqlConnection *FixedSqlConnectionPool::getConnection()
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(impl_->mutex);
    +
    +  while (impl_->freeList.empty())
    +    impl_->connectionAvailable.wait(impl_->mutex);
    +#else
    +  if (impl_->freeList.empty())
    +    throw Exception("FixedSqlConnectionPool::getConnection(): "
    +		    "no connection available but single-threaded build?");
    +#endif // WT_THREADED
    +
    +  SqlConnection *result = impl_->freeList.back();
    +  impl_->freeList.pop_back();
    +
    +  return result;
    +}
    +
    +void FixedSqlConnectionPool::returnConnection(SqlConnection *connection)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(impl_->mutex);
    +#endif // WT_THREADED
    +
    +  impl_->freeList.push_back(connection);
    +
    +#ifdef WT_THREADED
    +  if (impl_->freeList.size() == 1)
    +    impl_->connectionAvailable.notify_one();
    +#endif // WT_THREADED
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Impl b/wt-3.1.7a/src/Wt/Dbo/Impl
    new file mode 100644
    index 0000000..87e762d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Impl
    @@ -0,0 +1,49 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_IMPL_H_
    +#define WT_DBO_IMPL_H_
    +
    +#include <Wt/Dbo/Types>
    +
    +#include <Wt/Dbo/collection_impl.h>
    +#include <Wt/Dbo/ptr_impl.h>
    +#include <Wt/Dbo/Call_impl.h>
    +#include <Wt/Dbo/DbAction_impl.h>
    +#include <Wt/Dbo/Query_impl.h>
    +#include <Wt/Dbo/Field_impl.h>
    +#include <Wt/Dbo/SqlTraits_impl.h>
    +#include <Wt/Dbo/Session_impl.h>
    +
    +#if !defined(_MSC_VER) && !defined(__SUNPRO_C)
    +#define DBO_INSTANTIATE_TEMPLATES(C)					\
    +  template class Wt::Dbo::ptr<C>;					\
    +  template class Wt::Dbo::Dbo<C>;					\
    +  template class Wt::Dbo::MetaDbo<C>;					\
    +  template class Wt::Dbo::collection< Wt::Dbo::ptr<C> >;		\
    +  template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,			\
    +				 Wt::Dbo::DynamicBinding >;		\
    +  template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,			\
    +				 Wt::Dbo::DirectBinding >;		\
    +  template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(ptr<C>&);		\
    +  template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(C *);		\
    +  template Wt::Dbo::ptr<C> Wt::Dbo::Session::load<C>			\
    +         (const dbo_traits<C>::IdType&);				\
    +  template void Wt::Dbo::Session::mapClass<C>(const char *);		\
    +  template struct Wt::Dbo::Session::Mapping<C>;				\
    +  template Wt::Dbo::Query< Wt::Dbo::ptr<C>, Wt::Dbo::DynamicBinding >	\
    +	Wt::Dbo::Session::find<C, Wt::Dbo::DynamicBinding>		\
    +	(const std::string&);						\
    +  template Wt::Dbo::Query< Wt::Dbo::ptr<C>, Wt::Dbo::DirectBinding >	\
    +	Wt::Dbo::Session::find<C, Wt::Dbo::DirectBinding>		\
    +	(const std::string&);
    +#else
    +// Functionality is broken on MSVC 2005 and 2008
    +// Functionality is broken on Sun Studio Express
    +#define DBO_INSTANTIATE_TEMPLATES(C)
    +#endif
    +
    +#endif // WT_DBO_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Query b/wt-3.1.7a/src/Wt/Dbo/Query
    new file mode 100644
    index 0000000..64e8e69
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Query
    @@ -0,0 +1,345 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_QUERY_H_
    +#define WT_DBO_QUERY_H_
    +
    +#include <vector>
    +
    +#include <Wt/Dbo/SqlTraits>
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/collection>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +      struct SelectField
    +      {
    +	std::size_t begin, end;
    +      };
    +
    +      typedef std::vector<SelectField> SelectFieldList;
    +      typedef std::vector<SelectFieldList> SelectFieldLists;
    +
    +      template <class Result>
    +      class QueryBase {
    +      protected:
    +	std::vector<FieldInfo> fields() const;
    +	void fieldsForSelect(const SelectFieldList& list,
    +			     std::vector<FieldInfo>& result) const;
    +	std::pair<SqlStatement *, SqlStatement *>
    +	statements(const std::string& where, const std::string& groupBy,
    +		   const std::string& orderBy, int limit, int offset) const;
    +	Session& session() const;
    +
    +	QueryBase();
    +	QueryBase(Session& session, const std::string& sql);
    +	QueryBase(Session& session, const std::string& table,
    +		  const std::string& where);
    +
    +	QueryBase& operator=(const QueryBase& other);
    +
    +	Result singleResult(const collection<Result>& results) const;
    +
    +	Session *session_;
    +	std::string sql_;
    +	SelectFieldLists selectFieldLists_;
    +	bool simpleCount_;
    +      };
    +    }
    +
    +/*! \class DirectBinding Wt/Dbo/Query Wt/Dbo/Query
    + *
    + * Bind strategy indicating that parameters are bound directly to an underlying
    + * prepared statement.
    + */
    +struct DirectBinding { };
    +
    +/*! \class DynamicBinding Wt/Dbo/Query Wt/Dbo/Query
    + *
    + * Bind strategy indicating that binding to the underlying prepared statement
    + * is deferred and parameter values are temporarily stored first in a dynamic
    + * value vector.
    + */
    +struct DynamicBinding { };
    +
    +class Session;
    +class SqlConnection;
    +
    +/*! \class Query Wt/Dbo/Query Wt/DboQuery
    + *  \brief A database query.
    + *
    + * The query fetches results of type \p Result from the database. This
    + * can be any type for which query_result_traits are properly
    + * implemented. The library provides these implementations for
    + * primitive values (see sql_value_traits), database objects (ptr) and
    + * <tt>boost::tuple</tt>.
    + *
    + * Simple queries can be done using Session::find(), while more elaborate
    + * queries (with arbitrary result types) using Session::query().
    + *
    + * You may insert positional holders for parameters (in the conditional where
    + * part) using '?', and bind these to actual values using bind().
    + *
    + * The query result may be fetched using resultValue() or resultList().
    + *
    + * Usage example:
    + * \code
    + * typedef Wt::Dbo::ptr<Account> AccountPtr;
    + * typedef Wt::Dbo::collection<AccountPtr> Accounts;
    + *
    + * Wt::Dbo::Query<AccountPtr> query = session.find<Account>().where("balance > ?").bind(100000);
    + * Accounts accounts = query.resultList();
    + *
    + * for (Accounts::const_iterator i = accounts.begin(); i != accounts.end(); ++i)
    + *   std::cerr << "Name: " << i->name << std::end;
    + * \endcode
    + *
    + * The \p BindStrategy specifies how you want to bind parameters to
    + * your query (if any).
    + *
    + * When using DynamicBinding (which is the default), parameter binding
    + * to an actual sql statement is deferred until the query is run. This
    + * has the advantage that you can compose the query definition using
    + * helper methods provided in the query object (where(), orderBy() and
    + * groupBy()), possibly intermixing this with parameter binding, and
    + * you can keep the query around and run the query multiple times,
    + * perhaps with different parameter values or to scroll through the
    + * query results.
    + *
    + * When using DirectBinding, parameters are directly bound to an
    + * underlying sql statement. Therefore, the query must be specified
    + * entirely when created. Because of this reliance on an sql
    + * statement, it can be run only once (one call to resultValue() or
    + * resultList()) after which it should be discarded. You should not
    + * try to keep a query object around when using this parameter binding
    + * strategy (that will amost always not do what you would hope it to
    + * do).
    + *
    + * \ingroup dbo
    + */
    +template <class Result, typename BindStrategy = DynamicBinding>
    +class Query
    +{
    +#ifdef DOXYGEN_ONLY
    +public:
    +  /*! \brief Default constructor.
    +   */
    +  Query();
    +
    +  /*! \brief Destructor.
    +   */
    +  ~Query();
    +
    +  /*! \brief Copy constructor.
    +   */
    +  Query(const Query& other);
    +
    +  /*! \brief Assignment operator.
    +   */
    +  Query& operator= (const Query& other);
    +
    +  /*! \brief Returns the result fields.
    +   */
    +  std::vector<FieldInfo> fields() const;
    +
    +  Session& session() const;
    +
    +  /*! \brief Binds a value to the next positional marker.
    +   *
    +   * This binds the \p value to the next positional marker in the
    +   * query condition.
    +   */
    +  template<typename T>
    +  Query<Result, BindStrategy>& bind(const T& value);
    +
    +  /*! \brief Returns a unique result value.
    +   *
    +   * You can use this method if you are expecting the query to return
    +   * at most one result. If the query returns more than one result a
    +   * NoUniqueResultException is thrown.
    +   *
    +   * When using a DynamicBinding bind strategy, after a result has
    +   * been fetched, the query can no longer be used.
    +   */
    +  Result resultValue() const;
    +
    +  /*! \brief Returns a result list.
    +   *
    +   * This returns a collection which is backed by the underlying query.
    +   * The query is not actually run until this collection is traversed
    +   * or its size is asked.
    +   *
    +   * When using a DynamicBinding bind strategy, after a result has
    +   * been fetched, the query can no longer be used.
    +   */
    +  collection< Result > resultList() const;
    +
    +  /*! \brief Returns a unique result value.
    +   *
    +   * This is a convenience conversion operator that calls resultValue().
    +   */
    +  operator Result () const;
    +
    +  /*! \brief Returns a result list.
    +   *
    +   * This is a convenience conversion operator that calls resultList().
    +   */
    +  operator collection< Result > () const;
    +
    +  /** @name Methods for composing a query (DynamicBinding only)
    +   */
    +  //@{
    +  /*! \brief Adds a query condition.
    +   *
    +   * The condition must be a valid SQL condition expression.
    +   *
    +   * Multiple conditions may be provided, which must each be fulfilled,
    +   * and are concatenated together using 'and').
    +   *
    +   * A condition may contain positional markers '?' to which values may
    +   * be bound using bind().
    +   *
    +   * This provides the <i>where</i> part of an SQL query.
    +   *
    +   * \note This method is not available when using a DirectBinding binding
    +   *       strategy.
    +   */
    +  Query<Result, BindStrategy>& where(const std::string& condition);
    +
    +  /*! \brief Sets the result order.
    +   *
    +   * Orders the results based on the given field name (or multiple
    +   * names, comma-separated).
    +   *
    +   * This provides the <i>order by</i> part of an SQL query.
    +   *
    +   * \note This method is not available when using a DirectBinding binding
    +   *       strategy.
    +   */
    +  Query<Result, BindStrategy>& orderBy(const std::string& fieldName);
    +
    +  /*! \brief Sets the grouping field(s).
    +   *
    +   * Groups results based on unique values of the indicated field(s),
    +   * which is a comma separated list of fields. Only fields on which
    +   * you group and aggregate functions can be selected by a query.
    +   *
    +   * A field that refers to a database object that is selected by the
    +   * query is expanded to all the corresponding fields of that
    +   * database object (as in the select statement).
    +   *
    +   * This provides the <i>group by</i> part of an SQL query.
    +   *
    +   * \note This method is not available when using a DirectBinding binding
    +   *       strategy.
    +   */
    +  Query<Result, BindStrategy>& groupBy(const std::string& fields);
    +
    +  /*! \brief Sets a result offset.
    +   *
    +   * Sets a result offset. This has the effect that the next
    +   * resultList() call will skip as many results as the offset
    +   * indicates. Use -1 to indicate no offset.
    +   *
    +   * This provides the (non standard) <i>offset</i> part of an SQL query.
    +   *
    +   * \sa limit()
    +   *
    +   * \note This method is not available when using a DirectBinding binding
    +   *       strategy.
    +   */
    +  Query<Result, BindStrategy>& offset(int count);
    +
    +  /*! \brief Sets a result limit.
    +   *
    +   * Sets a result limit. This has the effect that the next
    +   * resultList() call will return up to \p count results. Use -1 to
    +   * indicate no limit.
    +   *
    +   * This provides the (non standard) <i>limit</i> part of an SQL query.
    +   *
    +   * \sa offset()
    +   *
    +   * \note This method is not available when using a DirectBinding binding
    +   *       strategy.
    +   */
    +  Query<Result, BindStrategy>& limit(int count);
    +  //@}
    +
    +#endif // DOXYGEN_ONLY
    + };
    +
    +template <class Result>
    +class Query<Result, DirectBinding> : private Impl::QueryBase<Result>
    +{
    +public:
    +  using Impl::QueryBase<Result>::fields;
    +  using Impl::QueryBase<Result>::session;
    +
    +  Query();
    +  ~Query();
    +  template<typename T> Query<Result, DirectBinding>& bind(const T& value);
    +  Result resultValue() const;
    +  collection< Result > resultList() const;
    +  operator Result () const;
    +  operator collection< Result > () const;
    +
    +private:
    +  Query(Session& session, const std::string& sql);
    +  Query(Session& session, const std::string& table, const std::string& where);
    +
    +  mutable int column_;
    +  mutable SqlStatement *statement_, *countStatement_;
    +
    +  void prepareStatements() const;
    +
    +  friend class Session;
    +};
    +
    +template <class Result>
    +class Query<Result, DynamicBinding> : private Impl::QueryBase<Result>
    +{
    +public:
    +  using Impl::QueryBase<Result>::fields;
    +  using Impl::QueryBase<Result>::session;
    +
    +  Query();
    +  ~Query();
    +  Query(const Query& other);
    +  Query& operator= (const Query& other);
    +  template<typename T> Query<Result, DynamicBinding>& bind(const T& value);
    +  Query<Result, DynamicBinding>& where(const std::string& condition);
    +  Query<Result, DynamicBinding>& orderBy(const std::string& fieldName);
    +  Query<Result, DynamicBinding>& groupBy(const std::string& fields);
    +  Query<Result, DynamicBinding>& offset(int count);
    +  Query<Result, DynamicBinding>& limit(int count);
    +  Result resultValue() const;
    +  collection< Result > resultList() const;
    +  operator Result () const;
    +  operator collection< Result > () const;
    +
    +private:
    +  Query(Session& session, const std::string& sql);
    +  Query(Session& session, const std::string& table, const std::string& where);
    +
    +  std::string where_, groupBy_, orderBy_;
    +  int limit_, offset_;
    +
    +  std::vector<Impl::ParameterBase *> parameters_;
    +
    +  void reset();
    +  void bindParameters(SqlStatement *statement) const;
    +
    +  friend class Session;
    +  template <class C> friend class collection;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_QUERY
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Query.C b/wt-3.1.7a/src/Wt/Dbo/Query.C
    new file mode 100644
    index 0000000..1acc5ed
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Query.C
    @@ -0,0 +1,213 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Query"
    +#include "Query_impl.h"
    +#include "DbAction"
    +
    +#include <iostream>
    +#include <string>
    +#include <boost/algorithm/string.hpp>
    +#include <stdexcept>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +std::size_t ifind(const std::string& s, const std::string& needle)
    +{
    +  boost::iterator_range<std::string::const_iterator> i
    +    = boost::ifind_first(s, needle);
    +  if (!i)
    +    return std::string::npos;
    +  else
    +    return i.begin() - s.begin();
    +}
    +
    +std::string selectColumns(const std::vector<FieldInfo>& fields) {
    +  std::string result;
    +
    +  for (unsigned i = 0; i < fields.size(); ++i) {
    +    const FieldInfo& field = fields[i];
    +    if (!result.empty())
    +      result += ", ";
    +
    +    result += field.sql();
    +  }
    +
    +  return result;
    +}
    +
    +ParameterBase::~ParameterBase()
    +{ }
    +
    +void addGroupBy(std::string& result, const std::string& groupBy,
    +		const std::vector<FieldInfo>& fields)
    +{		      
    +  std::vector<std::string> groupByFields;
    +  boost::split(groupByFields, groupBy, boost::is_any_of(","));
    +
    +  for (unsigned i = 0; i < groupByFields.size(); ++i) {
    +    boost::trim(groupByFields[i]);
    +
    +    std::string g;
    +    for (unsigned j = 0; j < fields.size(); ++j)
    +      if (fields[j].qualifier() == groupByFields[i]) {
    +	if (!g.empty())
    +	  g += ", ";
    +	g += fields[j].sql();
    +      }
    +
    +    if (!g.empty())
    +      groupByFields[i] = g;
    +  }
    +
    +  result += " group by ";
    +  for (unsigned i = 0; i < groupByFields.size(); ++i) {
    +    if (i != 0)
    +      result += ", ";
    +    result += groupByFields[i];
    +  }
    +}
    +
    +std::string completeQuerySelectSql(const std::string& sql,
    +				   const std::string& where,
    +				   const std::string& groupBy,
    +				   const std::string& orderBy,
    +				   int limit, int offset,
    +				   const std::vector<FieldInfo>& fields)
    +{
    +  std::string result = sql;
    +
    +  if (!where.empty())
    +    result += " where " + where;
    +
    +  if (!groupBy.empty())
    +    addGroupBy(result, groupBy, fields);
    +
    +  if (!orderBy.empty())
    +    result += " order by " + orderBy;
    +
    +  if (limit != -1)
    +    result += " limit ?";
    +
    +  if (offset != -1)
    +    result += " offset ?";
    +
    +  return result;
    +}
    +
    +std::string createQuerySelectSql(const std::string& from,
    +				 const std::string& where,
    +				 const std::string& groupBy,
    +				 const std::string& orderBy,
    +				 int limit, int offset,
    +				 const std::vector<FieldInfo>& fields)
    +{
    +  std::string result = "select " + selectColumns(fields) + ' ' + from;
    +
    +  if (!where.empty())
    +    result += " where " + where;
    +
    +  if (!groupBy.empty())
    +    addGroupBy(result, groupBy, fields);
    +
    +  if (!orderBy.empty())
    +    result += " order by " + orderBy;
    +
    +  if (limit != -1)
    +    result += " limit ?";
    +
    +  if (offset != -1)
    +    result += " offset ?";
    +
    +  return result;
    +}
    +
    +std::string createWrappedQueryCountSql(const std::string& query)
    +{
    +  return "select count(1) from (" + query + ") as dbocount";
    +}
    +
    +std::string createQueryCountSql(const std::string& query,
    +				const std::string& from,
    +				const std::string& where,
    +				const std::string& groupBy,
    +				const std::string& orderBy,
    +				int limit, int offset)
    +{
    +  /*
    +   * If there is a " group by ", then we cannot simply substitute
    +   * count(1), that still gives multiple results for each group.
    +   *
    +   * We cannot have " order by " in our query (e.g. on PostgreSQL)
    +   * except when ordering by the count (e.g. when we have a group by),
    +   * but we cannot simply junk evertything after " order by " since
    +   * there may still be parameters referenced in the " limit " or "
    +   * offset " clause.
    +   *
    +   * The Internet consensus is that wrapping like this is not really
    +   * a performance loss so we do not take any risk here.
    +   *
    +   * Also, we cannot count like this when we have a limit or offset
    +   * parameter.
    +   */
    +  if (!groupBy.empty() || ifind(from, "group by") != std::string::npos
    +      || !orderBy.empty() || ifind(from, "order by") != std::string::npos
    +      || limit != -1 || offset != -1)
    +    return createWrappedQueryCountSql(query);
    +  else {
    +    std::string result = "select count(1) " + from;
    +
    +    if (!where.empty())
    +      result += " where " + where;
    +
    +    if (limit != -1)
    +      result += " limit ?";
    +
    +    if (offset != -1)
    +      result += " offset ?";
    +
    +    return result;
    +  }
    +}
    +
    +void substituteFields(const SelectFieldList& list,
    +		      const std::vector<FieldInfo>& fs,
    +		      std::string& sql,
    +		      int offset)
    +{
    +  for (unsigned i = 0, j = 0; j < list.size(); ++j) {
    +    if (fs[i].isFirstDboField()) {
    +      std::string dboFields;
    +
    +      for (;;) {
    +	if (!dboFields.empty())
    +	  dboFields += ", ";
    +
    +	dboFields += fs[i].sql();
    +
    +	++i;
    +	if (i >= fs.size()
    +	    || fs[i].qualifier().empty()
    +	    || fs[i].isFirstDboField())
    +	  break;
    +      }
    +
    +      int start = list[j].begin + offset;
    +      int count = list[j].end - list[j].begin;
    +
    +      sql.replace(start, count, dboFields);
    +
    +      offset += (dboFields.length() - (list[j].end - list[j].begin));
    +    } else
    +      ++i;
    +  }
    +}
    +
    +    }
    +  }
    +}
    +				 
    diff --git a/wt-3.1.7a/src/Wt/Dbo/QueryColumn b/wt-3.1.7a/src/Wt/Dbo/QueryColumn
    new file mode 100644
    index 0000000..e39ecde
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/QueryColumn
    @@ -0,0 +1,62 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_QUERY_COLUMN_H_
    +#define WT_DBO_QUERY_COLUMN_H_
    +
    +#include <Wt/WModelIndex>
    +#include <Wt/WString>
    +#include <Wt/Dbo/Dbo>
    +
    +namespace Wt {
    +class WAbstractTableModel;
    +
    +  namespace Dbo {
    +
    +// TODO figure out a nice syntax for qualified fields ?
    +class QueryColumn 
    +{
    +  QueryColumn(const std::string& field,
    +	      const WString& header,
    +	      WFlags<ItemFlag> flags);
    +
    +  /*
    +  QueryColumn(const std::string& field,
    +	      WAbstractTableModel *editValuesModel);
    +  */
    +
    +private:
    +  typedef std::map<int, boost::any> HeaderData;
    +
    +  std::string field_;
    +  WFlags<ItemFlag> flags_;
    +  int fieldIdx_;
    +  HeaderData headerData_;
    +
    +  WAbstractTableModel *editValuesModel_;
    +
    +  template <class Result> friend class QueryModel;
    +};
    +
    +/*
    + * Defined in the header file to avoid a link-time dependency on
    + * libwt.so
    + */
    +inline QueryColumn::QueryColumn(const std::string& field,
    +				const WString& header,
    +				WFlags<ItemFlag> flags)
    +  : field_(field),
    +    flags_(flags),
    +    fieldIdx_(-1)
    +{ 
    +  headerData_[DisplayRole] = header;
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_QUERY_COLUMN_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/Dbo/QueryColumn.C b/wt-3.1.7a/src/Wt/Dbo/QueryColumn.C
    new file mode 100644
    index 0000000..43ca62a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/QueryColumn.C
    @@ -0,0 +1,44 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/Dbo/QueryColumn>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +  /*
    +   Editing ramblings
    +
    +   Scenario:
    +    - query a Post, join its author User, and the number of comments
    +
    +   Three different kinds of edits:
    +    - change a Post property
    +    - change a User property
    +    - change the author
    +    - cannot change the number of comments
    +
    +   Idea of the night for foreign keys and combo-box editing
    +    - two more ItemDataRoles:
    +      - OptionsModel
    +        a WAbstractItemModel: column 0 has entries with data of two roles:
    +        - EditRole: the primary key
    +	- DisplayRole: the value to display
    +      - Validator
    +        a WValidator: used to validate the data
    +
    +    typedef boost::function<WString (const Result&)> ResultValueFunction;
    +
    +    addColumn(const ResultValueFunction& function,
    +              const std::string& editField = "",
    +	      WAbstractItemModel *editOptions = 0);
    +
    +    Let WItemDelegate support better editing:
    +     - if validator is a WDateValidator, then display a date picker
    +     - if OptionsModel data is not empty, then display a combo box
    + */
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/QueryModel b/wt-3.1.7a/src/Wt/Dbo/QueryModel
    new file mode 100644
    index 0000000..ae8939f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/QueryModel
    @@ -0,0 +1,359 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_QUERY_MODEL_H_
    +#define WT_DBO_QUERY_MODEL_H_
    +
    +#include <Wt/WAbstractTableModel>
    +#include <Wt/Dbo/Dbo>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class QueryColumn;
    +
    +/*! \class QueryModel Wt/Dbo/QueryModel Wt/Dbo/QueryModel
    + *  \brief A %Wt MVC Model to view/edit query results.
    + *
    + * The model fetches results from the query and presents the data in a
    + * table. It supports sorting the underlying SQL query using
    + * Query::orderBy().
    + *
    + * The default implementation of data() converts %Query results to
    + * model data using query_result_traits<Result>::getValues(). You may
    + * define your own data presentation using the underlying \p Result by
    + * specializing data() and accessing data from resultRow().
    + *
    + * You may selectively add fields that you want to display using
    + * addColumn(), or you can also add all columns based on the query
    + * using addAllFieldsAsColumns().
    + *
    + * The model supports editing of the underlying data (even if the
    + * underlying query fetches results from multiple tables!). Values in
    + * columns that correspond to fields that have been mapped (and are
    + * writable) in a Database Object can be edited. The default
    + * implementation of setData() uses
    + * query_result_traits<Result>::setValue() to manipulate the database
    + * object, and thus uses the same write-behind properties as
    + * ptr<C>::modify(). To customize editing, you can specialize
    + * setData() and use resultRow() to modify the result object
    + * directly.
    + *
    + * The model supports also inserting rows (only at the end), and
    + * removing rows, which are reflected in object additions and removals
    + * from the Session.
    + *
    + * Editing is directly to the underlying database objects (change,
    + * insert and remove). Note that these changes will be flushed to the
    + * database whenever a transaction is committed, or before a query is
    + * run. The model will not explicitly create a transaction for the
    + * modification, but since the model uses a query for reading data,
    + * the change may be committed to the database depending on how the
    + * model is loading data. Still, this implies that usually inserting a
    + * row and setting its data happens within a single SQL
    + * <tt>"insert"</tt> statement.
    + *
    + * \ingroup dbo modelview
    + */
    +template <class Result>
    +class QueryModel : public WAbstractTableModel
    +{
    +public:
    +  using WAbstractItemModel::data;
    +  using WAbstractItemModel::setData;
    +
    +  /*! \brief Creates a new query model.
    +   *
    +   * You need to seed the model with a query using setQuery().
    +   */
    +  QueryModel(WObject *parent = 0);
    +
    +  /*! \brief Sets the query.
    +   *
    +   * The \p query is used to query the database.
    +   *
    +   * Unless \p keepColumns is \c true, this resets the column list, so
    +   * you will need to (re-)add one or more columns using
    +   * addColumn().
    +   *
    +   * When keeping the current columns, a LayoutChange rather than a
    +   * Reset is emitted by the model, allowing views to keep their
    +   * column geometry as well.
    +   */
    +  void setQuery(const Query<Result>& query, bool keepColumns = false);
    +
    +  /*! \brief Returns the query.
    +   *
    +   * \sa setQuery()
    +   */
    +  const Query<Result>& query() const { return query_; }
    +
    +  /*! \brief Adds a column.
    +   *
    +   * The \p field name may be a qualified or unqualified field
    +   * name. The list of available fields can be inspected using
    +   * fields().
    +   *
    +   * The \p header is used as Wt::DisplayRole for the column header
    +   * data.
    +   *
    +   * For the column items, flags() will returned the given \p
    +   * flags. For example, to indicate that a field is editable, you can
    +   * set the Wt::ItemIsEditable flag.
    +   *
    +   * \sa fields()
    +   */
    +  int addColumn(const std::string& field,
    +		const WString& header,
    +		WFlags<ItemFlag> flags = ItemIsSelectable);
    +
    +  /*! \brief Adds a column.
    +   *
    +   * This is an overloaded function for convenience, which uses the
    +   * field name as the header value.
    +   *
    +   * \sa setHeaderData()
    +   */
    +  int addColumn(const std::string& field,
    +		WFlags<ItemFlag> flags = ItemIsSelectable);
    +
    +  /*! \brief Sets column item flags.
    +   *
    +   * For items in column \p column, flags() will returned the given \p
    +   * flags. For example, to indicate that a field is editable, you can
    +   * set the Wt::ItemIsEditable flag.
    +   */
    +  void setColumnFlags(int column, WFlags<ItemFlag> flags);
    +
    +  /*! \brief Returns column item flags.
    +   *
    +   * \sa setColumnFlags()
    +   */
    +  WFlags<ItemFlag> columnFlags(int column) const;
    +
    +  // later
    +  int addColumn(const QueryColumn& column);
    +
    +  /*! \brief Adds all the columns from the field list.
    +   *
    +   * All fields are added as columns. Fields that are mutable are marked
    +   * as editable columns.
    +   *
    +   * This is a convenient alternative to selectively adding columns
    +   * using addColumn().
    +   *
    +   * \sa fields()
    +   */
    +  void addAllFieldsAsColumns();
    +
    +  /*! \brief Returns a result row.
    +   *
    +   * This returns the result corresponding to a particular row, and
    +   * could be used to customize the model behaviour, e.g. by
    +   * specializing data() for certain columns.
    +   *
    +   * Returns a const reference to an entry in the result cache.
    +   */
    +  const Result& resultRow(int row) const;
    +
    +  /*! \brief Returns a result row.
    +   *
    +   * This returns the result corresponding to a particular row, and
    +   * could be used to customize the model behaviour, e.g. by
    +   * specializing setData() for certain columns.
    +   *
    +   * Returns a reference to an entry in the result cache.
    +   *
    +   * \sa resultRow(int row) const
    +   */
    +  Result& resultRow(int row);
    +
    +  /*! \brief Rereads the data from the database.
    +   *
    +   * This invalidates the current (cached) data and informs views that
    +   * they should rerender.
    +   *
    +   * The model keeps the following data cached:
    +   *  - rowCount()
    +   *  - a batch of data, controlled by setBatchSize()
    +   */
    +  void reload();
    +
    +  /*! \brief Sets the batch size for fetching results.
    +   *
    +   * The model fetches results from the query in batch, and caches
    +   * these in memory to avoid repetitive querying of the database.
    +   *
    +   * The default batch size is 40.
    +   */
    +  void setBatchSize(int count);
    +
    +  /*! \brief Returns the batch size for fetching results.
    +   *
    +   * \sa setBatchSize()
    +   */
    +  int batchSize() const { return batchSize_; }
    +
    +  /*! \brief Returns the query field list.
    +   *
    +   * This returns the field list from the underlying query.
    +   */
    +  const std::vector<FieldInfo>& fields() const;
    +
    +  /*! \brief Returns the FieldInfo structure for a column
    +   */
    +  const FieldInfo &fieldInfo(int column);
    +
    +  /*! \brief Returns the field name for the a column
    +   */
    +  const std::string &fieldName(int column);
    +
    +  /*! \brief Returns the number of columns.
    +   *
    +   * Returns the number of columns that have been added using
    +   * addColumn() or addAllFieldsAsColumns().
    +   *
    +   * Since the query model implements a flat table model, this returns
    +   * 0 when \p parent is valid.
    +   */
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  /*! \brief Returns the number of rows.
    +   *
    +   * Returns the number of rows return from the underlying query.
    +   *
    +   * Since the query model implements a flat table model, this returns
    +   * 0 when \p parent is valid.
    +   */
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  /*! \brief Returns the flags for an item.
    +   *
    +   * Returns the flags set for the column using setColumnFlags().
    +   */
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the data for an item.
    +   *
    +   * Returns data of type Wt::DisplayRole or Wt::EditRole based on the
    +   * field value corresponding to the index. If necessary, this
    +   * fetches a batch of results from the underlying database.
    +   */
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const;
    +
    +  /*! \brief Sets data at the given model index.
    +   *
    +   * If \p role = Wt::EditRole, sets the value for the field
    +   * corresponding to the index. All other editing is ignored.
    +   *
    +   * \sa setCachedResult()
    +   */
    +  virtual bool setData(const WModelIndex& index,
    +		       const boost::any& value, int role = EditRole);
    +
    +  /*! \brief Sorts the model according to a particular column.
    +   *
    +   * This sorts the model by changing the query using
    +   * Query<BindStrategy>::orderBy().
    +   */
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +  /*! \brief Inserts one or more rows.
    +   *
    +   * Row insertions are only supported at the end (\p row ==
    +   * rowCount()). For each added row, a new result is added to the
    +   * underlying database.
    +   */
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes one or more rows.
    +   *
    +   * For each removed row, the result is removed from the underlying database.
    +   */
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Sets header data for a column.
    +   *
    +   * The model will return this data in headerData(). Only column headers
    +   * are supported (orientation == Wt::Horizontal).
    +   */
    +  virtual bool setHeaderData(int column, Orientation orientation,
    +			     const boost::any& value,
    +			     int role = EditRole);
    +
    +  /*! \brief Returns header data.
    +   *
    +   * \sa setHeaderData()
    +   */
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +protected:
    +  /*! \brief Creates a new row.
    +   *
    +   * This method is called from within insertRows() to create a new
    +   * row.
    +   *
    +   * The default implementation uses query_result_traits<Result>::create().
    +   */
    +  virtual Result createRow();
    +
    +  /*! \brief Adds a row to the session.
    +   *
    +   * This method is called from within insertRows() to add (and save)
    +   * a new result row to the Dbo session.
    +   *
    +   * The default implementation uses query_result_traits<Result>::add().
    +   */
    +  virtual void addRow(Result& result);
    +
    +  /*! \brief Deletes a row from the session.
    +   *
    +   * This method is called from within removeRows() to remove (and
    +   * delete) a new result row from the Dbo session.
    +   *
    +   * The default implementation uses query_result_traits<Result>::remove().
    +   */
    +  virtual void deleteRow(Result& result);
    +
    +private:
    +  typedef std::vector<boost::any> AnyList;
    +  typedef std::map<unsigned, AnyList> AnyListMap;
    +  typedef std::map<WModelIndex, boost::any> ValueMap;
    +  typedef std::map<int, Result> ResultMap;
    +
    +  std::vector<QueryColumn> columns_;
    +
    +  mutable Query<Result> query_;
    +  int batchSize_;
    +
    +  mutable int cachedRowCount_;
    +  mutable int cacheStart_;
    +  mutable std::vector<Result> cache_;
    +
    +  mutable int currentRow_;
    +  mutable AnyList rowValues_;
    +
    +  std::vector<FieldInfo> fields_;
    +
    +  int getFieldIndex(const std::string& field);
    +
    +  void setCurrentRow(int row) const;
    +  void invalidateData();
    +  void invalidateRow(int row);
    +  void dataReloaded();
    +};
    +
    +  }
    +}
    +
    +#include <Wt/Dbo/QueryModel_impl.h>
    +
    +#endif // WT_DBO_QUERY_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/QueryModel_impl.h b/wt-3.1.7a/src/Wt/Dbo/QueryModel_impl.h
    new file mode 100644
    index 0000000..b7810fc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/QueryModel_impl.h
    @@ -0,0 +1,398 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_QUERY_MODEL_IMPL_H_
    +#define WT_DBO_QUERY_MODEL_IMPL_H_
    +
    +#include <Wt/Dbo/QueryColumn>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <class Result>
    +QueryModel<Result>::QueryModel(WObject *parent)
    +  : WAbstractTableModel(parent),
    +    batchSize_(40),
    +    cachedRowCount_(-1),
    +    cacheStart_(-1),
    +    currentRow_(-1)
    +{ }
    +
    +template <class Result>
    +void QueryModel<Result>::setQuery(const Query<Result>& query,
    +				  bool keepColumns)
    +{
    +  if (!keepColumns) {
    +    query_ = query;
    +    fields_ = query_.fields();
    +    columns_.clear();
    +    reset();
    +  } else {
    +    invalidateData();
    +    query_ = query;
    +    fields_ = query_.fields();
    +    dataReloaded();
    +  }
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::setBatchSize(int count)
    +{
    +  batchSize_ = count;
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::addColumn(const std::string& field,
    +				  const WString& header,
    +				  WFlags<ItemFlag> flags)
    +{
    +  return addColumn(QueryColumn(field, header, flags));  
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::addColumn(const std::string& field,
    +				  WFlags<ItemFlag> flags)
    +{
    +  return addColumn(QueryColumn(field, WString::fromUTF8(field), flags));
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::addColumn(const QueryColumn& column)
    +{
    +  columns_.push_back(column);
    +  columns_.back().fieldIdx_ = getFieldIndex(column.field_);
    +
    +  return static_cast<int>(columns_.size() - 1);
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::addAllFieldsAsColumns()
    +{
    +  for (unsigned i = 0; i < fields_.size(); ++i) {
    +    WFlags<ItemFlag> flags = ItemIsSelectable;
    +
    +    if (fields_[i].isMutable())
    +      flags |= ItemIsEditable;
    +
    +    if (fields_[i].qualifier().empty())
    +      addColumn(fields_[i].name(), flags);
    +    else
    +      addColumn(fields_[i].qualifier() + "." + fields_[i].name(), flags);
    +  }
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::columnCount(const WModelIndex& parent) const
    +{
    +  if (parent.isValid())
    +    return 0;
    +
    +  return static_cast<int>(columns_.size());
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::rowCount(const WModelIndex& parent) const
    +{
    +  if (parent.isValid())
    +    return 0;
    +
    +  if (cachedRowCount_ == -1) {
    +    Transaction transaction(query_.session());
    +
    +    query_.limit(-1);
    +    query_.offset(-1);
    +    cachedRowCount_ = static_cast<int>(query_.resultList().size());
    +
    +    transaction.commit();
    +  }
    +
    +  return cachedRowCount_;
    +}
    +
    +template <class Result>
    +WFlags<ItemFlag> QueryModel<Result>::flags(const WModelIndex& index) const
    +{
    +  return columns_[index.column()].flags_;
    +}
    +
    +template <class Result>
    +boost::any QueryModel<Result>::data(const WModelIndex& index, int role) const
    +{
    +  setCurrentRow(index.row());
    +
    +  if (role == DisplayRole || role == EditRole)
    +    return rowValues_[columns_[index.column()].fieldIdx_];
    +  else
    +    return boost::any();
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::setCurrentRow(int row) const
    +{
    +  if (currentRow_ != row) {
    +    const Result& result = resultRow(row);
    +    rowValues_.clear();
    +    query_result_traits<Result>::getValues(result, rowValues_);
    +
    +    currentRow_ = row;
    +  }
    +}
    +
    +template <class Result>
    +bool QueryModel<Result>::setData(const WModelIndex& index,
    +				 const boost::any& value, int role)
    +{
    +  if (role == EditRole) {
    +    Transaction transaction(query_.session());
    +
    +    Result& result = resultRow(index.row());
    +
    +    int column = columns_[index.column()].fieldIdx_;
    +
    +    const FieldInfo& field = fields()[column];
    +
    +    boost::any dbValue = Wt::convertAnyToAny(value, *field.type());
    +
    +    query_result_traits<Result>::setValue(result, column, dbValue);
    +
    +    invalidateRow(index.row());
    +
    +    transaction.commit();
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::invalidateData()
    +{
    +  layoutAboutToBeChanged().emit();
    +
    +  cachedRowCount_ = cacheStart_ = currentRow_ = -1;
    +  cache_.clear();
    +  rowValues_.clear();
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::dataReloaded()
    +{
    +  layoutChanged().emit();  
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::sort(int column, SortOrder order)
    +{
    +  /*
    +   * This should not change the row count
    +   */
    +  int rc = cachedRowCount_;
    +
    +  invalidateData();
    +
    +  query_.orderBy(fields_[columns_[column].fieldIdx_].sql() + " "
    +		 + (order == AscendingOrder ? "asc" : "desc"));
    +
    +  cachedRowCount_ = rc;
    +  dataReloaded();
    +}
    +
    +template <class Result>
    +Result& QueryModel<Result>::resultRow(int row)
    +{
    +  if (row < cacheStart_
    +      || row >= cacheStart_ + static_cast<int>(cache_.size())) {
    +    cacheStart_ = std::max(row - batchSize_ / 4, 0);
    +
    +    query_.offset(cacheStart_);
    +    query_.limit(batchSize_);
    +
    +    Transaction transaction(query_.session());
    +
    +    collection<Result> results = query_.resultList();
    +    cache_.clear();
    +    cache_.insert(cache_.end(), results.begin(), results.end());   
    +
    +    if (row >= cacheStart_ + static_cast<int>(cache_.size()))
    +      throw Exception("QueryModel: geometry inconsistent with database");
    +
    +    transaction.commit();
    +  }
    +
    +  return cache_[row - cacheStart_];
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::invalidateRow(int row)
    +{
    +  if (row == currentRow_)
    +    currentRow_ = -1;
    +
    +  WModelIndex start = index(row, 0);
    +  WModelIndex end = index(row, columnCount() - 1);
    +  dataChanged().emit(start, end);
    +}
    +
    +template <class Result>
    +const Result& QueryModel<Result>::resultRow(int row) const
    +{
    +  return const_cast<const Result&>
    +    (const_cast<QueryModel<Result> *>(this)->resultRow(row));
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::reload()
    +{
    +  invalidateData();
    +  dataReloaded();
    +}
    +
    +template <class Result>
    +int QueryModel<Result>::getFieldIndex(const std::string& field)
    +{
    +  for (unsigned i = 0; i < fields_.size(); ++i) {
    +    if (fields_[i].name() == field)
    +      return i;
    +    if (!fields_[i].qualifier().empty())
    +      if (fields_[i].qualifier() + "." + fields_[i].name() == field)
    +	return i;
    +  }
    +
    +  throw Exception("QueryModel: could not find field: '" + field + "'");
    +}
    +
    +template <class Result>
    +const std::vector<FieldInfo>& QueryModel<Result>::fields() const
    +{
    +  return fields_;
    +}
    +
    +template <class Result>
    +const FieldInfo &QueryModel<Result>::fieldInfo(int column)
    +{
    +  return fields_[columns_[column].fieldIdx_];
    +}
    +
    +template <class Result>
    +const std::string &QueryModel<Result>::fieldName(int column)
    +{
    +  return columns_[column].field_;
    +}
    +
    +template <class Result>
    +WFlags<ItemFlag> QueryModel<Result>::columnFlags(int column) const
    +{
    +  return columns_[column].flags_;
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::setColumnFlags(int column, WFlags<ItemFlag> flags)
    +{
    +  columns_[column].flags_ = flags;
    +}
    +
    +template <class Result>
    +Result QueryModel<Result>::createRow()
    +{
    +  return query_result_traits<Result>::create();
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::addRow(Result& result)
    +{
    +  query_result_traits<Result>::add(query_.session(), result);
    +}
    +
    +template <class Result>
    +void QueryModel<Result>::deleteRow(Result& result)
    +{
    +  query_result_traits<Result>::remove(result);
    +}
    +
    +template <class Result>
    +bool QueryModel<Result>::insertRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  if (row != rowCount())
    +    throw Exception("QueryModel: only supporting row insertion at end");
    +
    +  beginInsertRows(parent, row, row + count - 1);
    +
    +  for (int i = 0; i < count; ++i) {
    +    Result r = createRow();
    +    addRow(r);
    +
    +    /*
    +     * Insert also into cache, this avoids a useless insert+query
    +     * when insertion is followed by setData() calls.
    +     */
    +    if (cacheStart_ != -1
    +	&& cacheStart_ + (int)cache_.size() == row + i)
    +      cache_.push_back(r);
    +  }
    +
    +  cachedRowCount_ += count;
    +
    +  endInsertRows();
    +
    +  return true;
    +}
    +
    +template <class Result>
    +bool QueryModel<Result>::removeRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  beginRemoveRows(parent, row, row + count - 1);
    +  
    +  for (int i = 0; i < count; ++i) {
    +    deleteRow(resultRow(row));
    +    cache_.erase(cache_.begin() + (row - cacheStart_));
    +  }
    +
    +  cachedRowCount_ -= count;
    +
    +  endRemoveRows();
    +
    +  return true;
    +}
    +
    +template <class Result>
    +bool QueryModel<Result>::setHeaderData(int section, Orientation orientation,
    +				       const boost::any& value,
    +				       int role)
    +{
    +  if (orientation == Horizontal) {
    +    if (role == EditRole)
    +      role = DisplayRole;
    +
    +    columns_[section].headerData_[role] = value;
    +
    +    return true;
    +  } else
    +    return WAbstractTableModel::setHeaderData(section, orientation,
    +					      value, role);
    +}
    +
    +template <class Result>
    +boost::any QueryModel<Result>::headerData(int section, Orientation orientation,
    +					  int role) const
    +{
    +  if (orientation == Horizontal) {
    +    QueryColumn::HeaderData::const_iterator i
    +      = columns_[section].headerData_.find(role);
    +
    +    if (i != columns_[section].headerData_.end())
    +      return i->second;
    +    else
    +      return boost::any();
    +  } else
    +    return WAbstractTableModel::headerData(section, orientation, role);
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_QUERY_MODEL_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Query_impl.h b/wt-3.1.7a/src/Wt/Dbo/Query_impl.h
    new file mode 100644
    index 0000000..2b4f5f3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Query_impl.h
    @@ -0,0 +1,512 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_QUERY_IMPL_H_
    +#define WT_DBO_QUERY_IMPL_H_
    +
    +#include <stdexcept>
    +#include <boost/tuple/tuple.hpp>
    +
    +#include <Wt/Dbo/Exception>
    +#include <Wt/Dbo/Field>
    +#include <Wt/Dbo/SqlStatement>
    +
    +#include <Wt/Dbo/Field_impl.h>
    +
    +#ifndef DOXYGEN_ONLY
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +extern std::string WTDBO_API
    +completeQuerySelectSql(const std::string& sql,
    +		       const std::string& where,
    +		       const std::string& groupBy,
    +		       const std::string& orderBy,
    +		       int limit, int offset,
    +		       const std::vector<FieldInfo>& fields);
    +
    +extern std::string WTDBO_API
    +createQuerySelectSql(const std::string& from,
    +		     const std::string& where,
    +		     const std::string& groupBy,
    +		     const std::string& orderBy,
    +		     int limit, int offset,
    +		     const std::vector<FieldInfo>& fields);
    +
    +extern std::string WTDBO_API
    +createWrappedQueryCountSql(const std::string& query);
    +
    +extern std::string WTDBO_API
    +createQueryCountSql(const std::string& query,
    +		    const std::string& from,
    +		    const std::string& where,
    +		    const std::string& groupBy,
    +		    const std::string& orderBy,
    +		    int limit, int offset);
    +
    +extern void WTDBO_API
    +substituteFields(const SelectFieldList& list,
    +		      const std::vector<FieldInfo>& fs,
    +		      std::string& sql,
    +		      int offset);
    +
    +extern void WTDBO_API 
    +parseSql(const std::string& sql, SelectFieldLists& fieldLists,
    +	 bool& simpleSelectCount);
    +
    +template <class Result>
    +QueryBase<Result>::QueryBase()
    +  : session_(0)
    +{ }
    +
    +template <class Result>
    +QueryBase<Result>::QueryBase(Session& session, const std::string& sql)
    +  : session_(&session),
    +    sql_(sql)
    +{
    +  parseSql(sql_, selectFieldLists_, simpleCount_);
    +}
    +
    +template <class Result>
    +QueryBase<Result>::QueryBase(Session& session, const std::string& table,
    +			     const std::string& where)
    +  : session_(&session)
    +{
    +  sql_ = "from \"" + table + "\" " + where;
    +  simpleCount_ = true;
    +}
    +
    +template <class Result>
    +QueryBase<Result>& QueryBase<Result>::operator=(const QueryBase<Result>& other)
    +{
    +  session_ = other.session_;
    +  sql_ = other.sql_;
    +  selectFieldLists_ = other.selectFieldLists_;
    +  simpleCount_ = other.simpleCount_;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +std::vector<FieldInfo> QueryBase<Result>::fields() const
    +{
    +  std::vector<FieldInfo> result;
    +
    +  if (selectFieldLists_.empty())
    +    query_result_traits<Result>::getFields(*session_, 0, result);
    +  else {
    +    /*
    +     * We'll build only the aliases from the first selection list
    +     * (this matters only for compound selects
    +     */
    +    fieldsForSelect(selectFieldLists_[0], result);
    +  }
    +
    +  return result;
    +}
    +
    +template <class Result>
    +std::pair<SqlStatement *, SqlStatement *>
    +QueryBase<Result>::statements(const std::string& where,
    +			      const std::string& groupBy,
    +			      const std::string& orderBy,
    +			      int limit, int offset) const
    +{
    +  SqlStatement *statement, *countStatement;
    +
    +  if (selectFieldLists_.empty()) {
    +    /*
    +     * sql_ is "from ..."
    +     */
    +    std::string sql;
    +
    +    std::vector<FieldInfo> fs = this->fields();
    +    sql = Impl::createQuerySelectSql(sql_, where, groupBy, orderBy,
    +				     limit, offset, fs);
    +    statement = this->session_->getOrPrepareStatement(sql);
    +
    +    if (simpleCount_)
    +      sql = Impl::createQueryCountSql(sql, sql_, where, groupBy, orderBy,
    +				      limit, offset);
    +    else
    +      sql = Impl::createWrappedQueryCountSql(sql);
    +
    +    countStatement = this->session_->getOrPrepareStatement(sql);
    +  } else {
    +    /*
    +     * sql_ is complete "[with ...] select ..."
    +     */
    +    std::string sql = sql_;
    +    int sql_offset = 0;
    +
    +    std::vector<FieldInfo> fs;
    +    for (unsigned i = 0; i < selectFieldLists_.size(); ++i) {
    +      const SelectFieldList& list = selectFieldLists_[i];
    +
    +      fs.clear();
    +      this->fieldsForSelect(list, fs);
    +
    +      Impl::substituteFields(list, fs, sql, sql_offset);
    +    }
    +
    +    sql = Impl::completeQuerySelectSql(sql, where, groupBy, orderBy,
    +				       limit, offset, fs);
    +
    +    statement = this->session_->getOrPrepareStatement(sql);
    +
    +    if (simpleCount_) {
    +      std::string from = sql_.substr(selectFieldLists_.front().back().end);
    +      sql = Impl::createQueryCountSql(sql, from, where, groupBy, orderBy,
    +				      limit, offset);
    +    } else
    +      sql = Impl::createWrappedQueryCountSql(sql);
    +
    +    countStatement = this->session_->getOrPrepareStatement(sql);
    +  }
    +
    +  return std::make_pair(statement, countStatement);
    +}
    +
    +template <class Result>
    +void QueryBase<Result>::fieldsForSelect(const SelectFieldList& list,
    +					std::vector<FieldInfo>& result) const
    +{
    +  std::vector<std::string> aliases;
    +  for (unsigned i = 0; i < list.size(); ++i) {
    +    const SelectField& field = list[i];
    +    aliases.push_back(sql_.substr(field.begin, field.end - field.begin));
    +  }
    +
    +  query_result_traits<Result>::getFields(*session_, &aliases, result);
    +  if (!aliases.empty())
    +    throw std::logic_error("Session::query(): too many aliases for result");
    +}
    +
    +template <class Result>
    +Session& QueryBase<Result>::session() const
    +{
    +  return *session_;
    +}
    +
    +template <class Result>
    +Result QueryBase<Result>::singleResult(const collection<Result>& results) const
    +{
    +  typename collection<Result>::const_iterator i = results.begin();
    +  if (i == results.end())
    +    return Result();
    +  else {
    +    Result result = *i;
    +    ++i;
    +    if (i != results.end())
    +      throw NoUniqueResultException();
    +    return result;
    +  }
    +}
    +    }
    +
    +template <class Result>
    +Query<Result, DirectBinding>::Query()
    +  : statement_(0),
    +    countStatement_(0)
    +{ }
    +
    +template <class Result>
    +Query<Result, DirectBinding>::Query(Session& session, const std::string& sql)
    +  : Impl::QueryBase<Result>(session, sql),
    +    statement_(0),
    +    countStatement_(0)
    +{
    +  prepareStatements();
    +}
    +
    +template <class Result>
    +Query<Result, DirectBinding>::Query(Session& session, const std::string& table,
    +				    const std::string& where)
    +  : Impl::QueryBase<Result>(session, table, where),
    +    statement_(0),
    +    countStatement_(0)
    +{
    +  prepareStatements();
    +}
    +
    +template <class Result>
    +Query<Result, DirectBinding>::~Query()
    +{
    +  if (statement_)
    +    statement_->done();
    +  if (countStatement_)
    +    countStatement_->done();
    +}
    +
    +template <class Result>
    +template <typename T>
    +Query<Result, DirectBinding>&
    +Query<Result, DirectBinding>::bind(const T& value)
    +{
    +  sql_value_traits<T>::bind(value, this->statement_, column_, -1);
    +  sql_value_traits<T>::bind(value, this->countStatement_, column_, -1);
    +
    +  ++column_;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Result Query<Result, DirectBinding>::resultValue() const
    +{
    +  return this->singleResult(resultList());
    +}
    +
    +template <class Result>
    +collection<Result> Query<Result, DirectBinding>::resultList() const
    +{
    +  if (!this->session_)
    +    return collection<Result>();
    +
    +  if (!statement_)
    +    throw std::logic_error("Query<Result, DirectBinding>::resultList() "
    +			   "may be called only once");
    +
    +  SqlStatement *s = this->statement_, *cs = this->countStatement_;
    +  this->statement_ = this->countStatement_ = 0;
    +
    +  return collection<Result>(this->session_, s, cs);
    +}
    +
    +template <class Result>
    +Query<Result, DirectBinding>::operator Result () const
    +{
    +  return resultValue();
    +}
    +
    +template <class Result>
    +Query<Result, DirectBinding>::operator collection<Result> () const
    +{
    +  return resultList();
    +}
    +
    +template <class Result>
    +void Query<Result, DirectBinding>::prepareStatements() const
    +{
    +  if (!this->session_)
    +    return;
    +
    +  this->session_->flush();
    +
    +  boost::tie(this->statement_, this->countStatement_)
    +    = this->statements(std::string(), std::string(), std::string(), -1, -1);
    +
    +  column_ = 0;
    +}
    +
    +namespace Impl {
    +  template <typename T>
    +  void Parameter<T>::bind(SaveBaseAction& binder)
    +  {
    +    field(binder, v_, "parameter");
    +  }
    +
    +  template <typename T>
    +  Parameter<T> *Parameter<T>::clone() const
    +  {
    +    return new Parameter<T>(v_);
    +  }
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::Query()
    +  : limit_(-1),
    +    offset_(-1)
    +{ }
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::Query(Session& session, const std::string& sql)
    +  : Impl::QueryBase<Result>(session, sql),
    +    limit_(-1),
    +    offset_(-1)
    +{ }
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::Query(Session& session,
    +				     const std::string& table,
    +				     const std::string& where)
    +  : Impl::QueryBase<Result>(session, table, where),
    +    limit_(-1),
    +    offset_(-1)
    +{ }
    +
    +template <class Result>
    +Query<Result, DynamicBinding>
    +::Query(const Query<Result, DynamicBinding>& other)
    +  : Impl::QueryBase<Result>(other),
    +    where_(other.where_),
    +    groupBy_(other.groupBy_),
    +    orderBy_(other.orderBy_),
    +    limit_(-1),
    +    offset_(-1)
    +{ 
    +  for (unsigned i = 0; i < other.parameters_.size(); ++i)
    +    parameters_.push_back(other.parameters_[i]->clone());
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::operator=
    +(const Query<Result, DynamicBinding>& other)
    +{
    +  Impl::QueryBase<Result>::operator=(other);
    +  where_ = other.where_;
    +  groupBy_ = other.groupBy_;
    +  orderBy_ = other.orderBy_;
    +  limit_ = other.limit_;
    +  offset_ = other.offset_;
    +
    +  reset();
    +
    +  for (unsigned i = 0; i < other.parameters_.size(); ++i)
    +    parameters_.push_back(other.parameters_[i]->clone());
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::~Query()
    +{
    +  reset();
    +}
    +
    +template <class Result>
    +template <typename T>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::bind(const T& value)
    +{
    +  parameters_.push_back(new Impl::Parameter<T>(value));
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::where(const std::string& where)
    +{
    +  if (!where_.empty())
    +    where_ += " and ";
    +
    +  where_ += "(" + where + ")";
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::orderBy(const std::string& orderBy)
    +{
    +  orderBy_ = orderBy;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::groupBy(const std::string& groupBy)
    +{
    +  groupBy_ = groupBy;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::offset(int offset)
    +{
    +  offset_ = offset;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>&
    +Query<Result, DynamicBinding>::limit(int limit)
    +{
    +  limit_ = limit;
    +
    +  return *this;
    +}
    +
    +template <class Result>
    +Result Query<Result, DynamicBinding>::resultValue() const
    +{
    +  return this->singleResult(resultList());
    +}
    +
    +template <class Result>
    +collection<Result> Query<Result, DynamicBinding>::resultList() const
    +{
    +  if (!this->session_)
    +    return collection<Result>();
    +
    +  this->session_->flush();
    +
    +  SqlStatement *statement, *countStatement;
    +
    +  boost::tie(statement, countStatement)
    +    = this->statements(where_, groupBy_, orderBy_, limit_, offset_);
    +
    +  bindParameters(statement);
    +  bindParameters(countStatement);
    +
    +  return collection<Result>(this->session_, statement, countStatement);
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::operator Result () const
    +{
    +  return resultValue();
    +}
    +
    +template <class Result>
    +Query<Result, DynamicBinding>::operator collection<Result> () const
    +{
    +  return resultList();
    +}
    +
    +template <class Result>
    +void Query<Result, DynamicBinding>::bindParameters(SqlStatement *statement)
    +  const
    +{
    +  SaveBaseAction binder(statement, 0);
    +
    +  for (unsigned i = 0; i < parameters_.size(); ++i)
    +    parameters_[i]->bind(binder);
    +
    +  if (limit_ != -1) {
    +    int v = limit_;
    +    field(binder, v, "limit");
    +  }
    +
    +  if (offset_ != -1) {
    +    int v = offset_;
    +    field(binder, v, "offset");
    +  }
    +}
    +
    +template <class Result>
    +void Query<Result, DynamicBinding>::reset()
    +{
    +  for (unsigned i = 0; i < parameters_.size(); ++i)
    +    delete parameters_[i];
    +
    +  parameters_.clear();
    +}
    +
    +  }
    +}
    +
    +#endif // DOXYGEN_ONLY
    +
    +#endif // WT_DBO_QUERY_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Session b/wt-3.1.7a/src/Wt/Dbo/Session
    new file mode 100644
    index 0000000..fe3e3f6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Session
    @@ -0,0 +1,496 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SESSION_H_
    +#define WT_DBO_SESSION_H_
    +
    +#include <map>
    +#include <set>
    +#include <string>
    +#include <typeinfo>
    +
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/collection>
    +#include <Wt/Dbo/Field>
    +#include <Wt/Dbo/Query>
    +#include <Wt/Dbo/Transaction>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +      extern WTDBO_API std::string quoteSchemaDot(const std::string& table);
    +      template <class C, typename T> struct LoadHelper;
    +    }
    +
    +struct NullType {
    +  static NullType null_;
    +};
    +
    +class Call;
    +class SqlConnection;
    +class SqlConnectionPool;
    +class SqlStatement;
    +template <typename Result, typename BindStrategy> class Query;
    +struct DirectBinding;
    +struct DynamicBinding;
    +
    +/*! \class Session Wt/Dbo/Session Wt/Dbo/Session
    + *  \brief A database session.
    + *
    + * A database session manages meta data about the mapping of C++
    + * classes to database tables, and keeps track of a working set of
    + * in-memory objects (objects which are referenced from your code or
    + * from within a transaction).
    + *
    + * It also manages an active transaction, which you need to access
    + * database objects.
    + *
    + * You can provide the session with a dedicated database connection
    + * using setConnection(), or with a connection pool (from which it
    + * will take a connection while processing a transaction) using
    + * setConnectionPool(). In either case, the session does not take
    + * ownership of the connection or connection pool.
    + *
    + * A session will typically be a long-lived object in your
    + * application.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API Session
    +{
    +public:
    +  /*! \brief Creates a database session.
    +   */
    +  Session();
    +
    +  /*! \brief Destructor.
    +   *
    +   * A session must survive all database objects that have been loaded
    +   * through it, and will warning during this destructor if there are
    +   * still database objects that are being referenced from a ptr.
    +   */
    +  ~Session();
    +
    +  /*! \brief Sets a dedicated connection.
    +   *
    +   * The connection will be used exclusively by this session.
    +   *
    +   * \sa setConnectionPool()
    +   */
    +  void setConnection(SqlConnection& connection);
    +
    +  /*! \brief Sets a connection pool.
    +   *
    +   * The connection pool is typically shared with other sessions.
    +   *
    +   * \sa setConnection()
    +   */
    +  void setConnectionPool(SqlConnectionPool& pool);
    +
    +  /*! \brief Maps a class to a database table.
    +   *
    +   * The class \p C is mapped to table with name \p tableName. You
    +   * need to map classes to tables.
    +   *
    +   * You may provide a schema-qualified table name, if the underlying
    +   * database supports this, eg. <tt>"myschema.users"</tt>.
    +   */
    +  template <class C> void mapClass(const char *tableName);
    +
    +  /*! \brief Returns the mapped table name for a class.
    +   *
    +   * \sa mapClass()
    +   */
    +  template <class C> const char *tableName() const;
    +
    +  /*! \brief Persists a transient object.
    +   *
    +   * The transient object pointed to by \p ptr is added to the
    +   * session, and will be persisted when the session is flushed.
    +   *
    +   * A transient object is usually a newly created object which want
    +   * to add to the database.
    +   *
    +   * The method returns \p ptr.
    +   */
    +  template <class C> ptr<C> add(ptr<C>& ptr);
    +
    +  /*! \brief Persists a transient object.
    +   *
    +   * This is an overloaded method for convenience, and is implemented as:
    +   * \code
    +   * return add(ptr<C>(obj));
    +   * \endcode
    +   *
    +   * The method returns a database pointer to the object.
    +   */
    +  template <class C> ptr<C> add(C *obj);
    +
    +  /*! \brief Loads a persisted object.
    +   *
    +   * This method returns a database object with the given object
    +   * id. If the object was already loaded in the session, the loaded
    +   * object is returned, otherwise the object is loaded from the
    +   * database.
    +   *
    +   * Throws an ObjectNotFoundException when the object was not found.
    +   *
    +   * \sa ptr::id()
    +   */
    +  template <class C> ptr<C> load(const typename dbo_traits<C>::IdType& id);
    +
    +#ifndef DOXYGEN_ONLY
    +  template <class C>
    +    Query< ptr<C> > find(const std::string& condition = std::string()) {
    +    // implemented in-line because otherwise it crashes gcc 4.0.1
    +    return find<C, DynamicBinding>(condition);
    +  }
    +#endif // DOXYGEN_ONLY
    +
    +  /*! \brief Finds database objects.
    +   *
    +   * This method creates a query for finding objects of type \p C.
    +   *
    +   * When passing an empty \p condition parameter, it will return all
    +   * objects of type \p C. Otherwise, it will add the condition, by
    +   * generating an SQL <i>where</i> clause.
    +   *
    +   * The \p BindStrategy specifies how you want to bind parameters to
    +   * your query (if any).
    +   *
    +   * When using \p DynamicBinding (which is the default), you will
    +   * defer the binding until the query is run. This has the advantage
    +   * that you can compose the query definition using helper methods
    +   * provided in the query object, you can keep the query around and
    +   * run the query multiple times, perhaps with different parameter
    +   * values or to scroll through the query results.
    +   *
    +   * When using \p DirectBinding, the query must be specified entirely
    +   * using the \p condition, and can be run only once. This method
    +   * does have the benefit of binding parameters directly to the
    +   * underlying prepared statement.
    +   *
    +   * This method is convenient when you are querying only results from a
    +   * single table. For more generic query support, see query().
    +   *
    +   * Usage example:
    +   * \code
    +   * // Bart is missing, let's find him.
    +   * Wt::Dbo::ptr<User> bart = session.find<User>().where("name = ?").bind("Bart");
    +   *
    +   * // Find all users, order by name
    +   * typedef Wt::Dbo::collection< Wt::Dbo::ptr<User> > Users;
    +   * Users users = session.find<User>().orderBy("name");
    +   * \endcode
    +   *
    +   * \sa query()
    +   */
    +#ifdef DOXYGEN_ONLY
    +  template <class C, typename BindStrategy = DynamicBinding>
    +#else
    +  template <class C, typename BindStrategy>
    +#endif
    +    Query< ptr<C>, BindStrategy>
    +    find(const std::string& condition = std::string());
    +
    +#ifndef DOXYGEN_ONLY
    +  template <class Result> Query<Result> query(const std::string& sql);
    +#endif // DOXYGEN_ONLY
    +
    +  /*! \brief Creates a query.
    +   *
    +   * The sql statement should be a complete SQL statement, starting
    +   * with a "select ". The items listed in the "select" must match the
    +   * \p Result type. An item that corresponds to a database object
    +   * (ptr) is substituted with the selection of all the fields in the
    +   * dbo.
    +   *
    +   * For example, the following query (class User is mapped onto table 'user'):
    +   * \code
    +   * session.query< ptr<User> >("select u from user u").where("u.name = ?").bind("Bart");
    +   * \endcode
    +   * is the more general version of:
    +   * \code
    +   * session.find<User>().where("name = ?").bind("Bart");
    +   * \endcode
    +   *
    +   * Note that "u" in this query will be expanded to select the fields of the
    +   * user table (u.id, u.version, u.name, ...). The same expansion happens when
    +   * using an alias in Query::groupBy().
    +   *
    +   * The additional flexibility offered by %query() over find() is
    +   * however that it may support other result types.
    +   *
    +   * Thus, it may return plain values:
    +   * \code
    +   * session.query<int>("select count(1) from ...");
    +   * \endcode
    +   *
    +   * Or Boost.Tuple for an arbitrary combination of result values:
    +   *
    +   * \code
    +   * session.query< boost::tuple<int, int> >("select A.id, B.id from table_a A, table_b B").where("...");
    +   * \endcode
    +   *
    +   * A tuple may combine any kind of object that is supported as a result,
    +   * including database objects (see also ptr_tuple):
    +   * \code
    +   * session.query< boost::tuple<ptr<A>, ptr<B> >("select A, B from table_a A, table_b B").where("...");
    +   * \endcode
    +   *
    +   * The \p BindStrategy specifies how you want to bind parameters to
    +   * your query (if any).
    +   *
    +   * When using \p DynamicBinding (which is the default), you will
    +   * defer the binding until the query is run. This has the advantage
    +   * that you can compose the query using helper methods provided in
    +   * the Query object, you can keep the query around and run the query
    +   * multiple times, perhaps with different parameter values or to
    +   * scroll through the query results.
    +   *
    +   * When using \p DirectBinding, the query must be specified entirely
    +   * using the \p sql, and can be run only once. This method does have
    +   * the benefit of binding parameters directly to the underlying
    +   * prepared statement.
    +   *
    +   * This method uses query_result_traits to unmarshal the query result
    +   * into the \p Result type.
    +   */
    +#ifdef DOXYGEN_ONLY
    +  template <class Result, typename BindStrategy = DynamicBinding>
    +#else
    +  template <class Result, typename BindStrategy>
    +#endif
    +    Query<Result, BindStrategy> query(const std::string& sql);
    +
    +  /*! \brief Executs an Sql command.
    +   *
    +   * This executs an Sql command. It differs from query() in that no
    +   * result is expected from the call.
    +   *
    +   * Usage example:
    +   * \code
    +   * session.execute("update user set name = ? where name = ?").bind("Bart").bind("Sarah");
    +   * \endcode
    +   */
    +  Call execute(const std::string& sql);
    +
    +  /*! \brief Creates the database schema.
    +   *
    +   * This will create the database schema of the mapped tables. Schema
    +   * creation will fail if one or more tables already existed.
    +   *
    +   * \sa mapClass(), dropTables()
    +   */
    +  void createTables();
    +
    +  /*! \brief Drops the database schema.
    +   *
    +   * This will drop the database schema. Dropping the schema will fail
    +   * if one or more tables did not exist.
    +   *
    +   * \sa createTables()
    +   */
    +  void dropTables();
    +
    +  /*! \brief Flushes the session.
    +   *
    +   * This flushes all modified objects to the database. This does not
    +   * commit the transaction.
    +   *
    +   * Normally, you need not to call this method as the session is
    +   * flushed automatically before committing a transaction, or before
    +   * running a query (to be sure to take into account pending
    +   * modifications).
    +   */
    +  void flush();
    +
    +  /*! \brief Rereads all objects.
    +   *
    +   * This rereads all objects from the database, possibly discarding
    +   * unflushed modifications. This is a catch-all solution for a
    +   * StaleObjectException.
    +   *
    +   * \sa ptr::reread()
    +   */
    +  void rereadAll();
    +
    +  void getFields(const char *tableName, std::vector<FieldInfo>& result);
    +  
    +private:
    +  Session(const Session& s);
    +
    +  typedef std::set<MetaDboBase *> MetaDboBaseSet;
    +
    +  enum {SqlInsert = 0,
    +	SqlUpdate = 1,
    +	SqlDelete = 2,
    +	SqlDeleteVersioned = 3,
    +	SqlSelectById = 4,
    +	FirstSqlSelectSet = 5};
    +
    +  struct JoinId {
    +    std::string joinIdName;
    +    std::string tableIdName;
    +    std::string sqlType;
    +
    +    JoinId(const std::string& aJoinIdName,
    +	   const std::string& aTableIdName,
    +	   const std::string& aSqlType);
    +  };
    +
    +  struct WTDBO_API SetInfo {
    +    const char *tableName;
    +    std::string joinName;
    +    std::string joinSelfId, joinOtherId;
    +    RelationType type;
    +
    +    SetInfo(const char *aTableName, RelationType type,
    +	    const std::string& aJoinName,
    +	    const std::string& aJoinSelfId);
    +  };
    +
    +  struct WTDBO_API MappingInfo {
    +    bool initialized_;
    +    const char *tableName;
    +    const char *versionFieldName;
    +    const char *surrogateIdFieldName;
    +
    +    std::string naturalIdFieldName; // for non-auto generated id
    +    int naturalIdFieldSize;         // for non-auto generated id
    +
    +    std::vector<FieldInfo> fields;
    +    std::vector<SetInfo> sets;
    +
    +    std::vector<std::string> statements;
    +
    +    MappingInfo();
    +    virtual ~MappingInfo();
    +    virtual void init(Session& session);
    +    virtual void dropTable(Session& session,
    +			   std::set<std::string>& tablesDropped);
    +    virtual void rereadAll();
    +
    +    std::string primaryKeys() const;
    +  };
    +
    +  template <class C>
    +  struct Mapping : public MappingInfo
    +  {
    +    typedef std::map<typename dbo_traits<C>::IdType, MetaDbo<C> *> Registry;
    +    Registry registry_;
    +
    +    virtual ~Mapping();
    +    virtual void init(Session& session);
    +    virtual void dropTable(Session& session,
    +			   std::set<std::string>& tablesDropped);
    +    virtual void rereadAll();
    +  };
    +
    +  typedef std::map<const std::type_info *, MappingInfo *> ClassRegistry;
    +  typedef std::map<std::string, MappingInfo *> TableRegistry;
    +
    +  ClassRegistry      classRegistry_;
    +  TableRegistry      tableRegistry_;
    +  bool               schemaInitialized_;
    +
    +  MetaDboBaseSet     dirtyObjects_;
    +  SqlConnection     *connection_;
    +  SqlConnectionPool *connectionPool_;
    +  Transaction::Impl *transaction_;
    +
    +  void initSchema() const;
    +  void resolveJoinIds(MappingInfo *mapping);
    +  void prepareStatements(MappingInfo *mapping);
    +  std::vector<JoinId> getJoinIds(MappingInfo *mapping, 
    +				 const std::string& joinId);
    +
    +  void createTable(MappingInfo *mapping);
    +  void createRelations(MappingInfo *mapping,
    +		       std::set<std::string>& joinTablesCreated);
    +  void createJoinTable(const std::string& joinName,
    +		       MappingInfo *mapping1, MappingInfo *mapping2,
    +		       const std::string& joinId1,
    +		       const std::string& joinId2);
    +  void addJoinTableFields(MappingInfo& joinTableMapping,
    +			  MappingInfo *mapping, const std::string& joinId,
    +			  const std::string& foreignKeyName);
    +  void createJoinIndex(MappingInfo& joinTableMapping,
    +		       MappingInfo *mapping,
    +		       const std::string& joinId,
    +		       const std::string& foreignKeyName);
    +
    +  void needsFlush(MetaDboBase *dbo);
    +
    +  template <class C> Mapping<C> *getMapping() const;
    +  MappingInfo *getMapping(const char *tableName) const;
    +  template <class C> ptr<C> loadLazy(const typename dbo_traits<C>::IdType& id);
    +  template <class C> ptr<C> load(SqlStatement *statement, int& column);
    +
    +  template <class C>
    +    ptr<C> loadWithNaturalId(SqlStatement *statement, int& column);
    +  template <class C>
    +    ptr<C> loadWithLongLongId(SqlStatement *statement, int& column);
    +
    +  void discardChanges(MetaDboBase *obj);
    +  template <class C> void prune(MetaDbo<C> *obj);
    +
    +  template<class C> void implSave(MetaDbo<C>& dbo);
    +  template<class C> void implDelete(MetaDbo<C>& dbo);
    +  template<class C> void implTransactionDone(MetaDbo<C>& dbo, bool success);
    +  template<class C> void implLoad(MetaDbo<C>& dbo, SqlStatement *statement,
    +				  int& column);
    +
    +  static std::string statementId(const char *table, int statementIdx);
    +
    +  template <class C> SqlStatement *getStatement(int statementIdx);
    +  SqlStatement *getStatement(const std::string& id);
    +  SqlStatement *getStatement(const char *tableName, int statementIdx);
    +  const std::string& getStatementSql(const char *tableName, int statementIdx);
    +
    +  SqlStatement *prepareStatement(const std::string& id,
    +				 const std::string& sql);
    +  SqlStatement *getOrPrepareStatement(const std::string& sql);
    +
    +  template <class C> void prepareStatements();
    +  template <class C> std::string manyToManyJoinId(const std::string& joinName,
    +						  const std::string& notId);
    +
    +  SqlConnection *useConnection();
    +  void returnConnection(SqlConnection *connection);
    +  SqlConnection *connection(bool openTransaction);
    +
    +  friend class MetaDboBase;
    +  template <class C> friend class MetaDbo;
    +
    +  template <class C> friend class collection;
    +  template <class C, typename S> friend class Query;
    +  template <class C> friend class Impl::QueryBase;
    +  template <typename V> friend class FieldRef;
    +  template <class C> friend struct query_result_traits;
    +  friend class Call;
    +  friend class Transaction;
    +  friend struct Transaction::Impl;
    +
    +  friend class CollectionHelper;
    +  friend class InitSchema;
    +  friend class DboAction;
    +  friend class SaveBaseAction;
    +  template <class C> friend class SaveDbAction;
    +  friend class LoadBaseAction;
    +  template <class C> friend class LoadDbAction;
    +  template <class C> friend class PtrRef;
    +  friend class TransactionDoneAction;
    +  friend class DropSchema;
    +  friend class ToAnysAction;
    +  friend class FromAnyAction;
    +  template <class C, typename T> friend struct Impl::LoadHelper;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_SESSION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Session.C b/wt-3.1.7a/src/Wt/Dbo/Session.C
    new file mode 100644
    index 0000000..61f60b9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Session.C
    @@ -0,0 +1,946 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/Call"
    +#include "Wt/Dbo/Exception"
    +#include "Wt/Dbo/Session"
    +#include "Wt/Dbo/SqlConnection"
    +#include "Wt/Dbo/SqlConnectionPool"
    +#include "Wt/Dbo/SqlStatement"
    +#include "Wt/Dbo/StdSqlTraits"
    +
    +#include <cassert>
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +std::string& replace(std::string& s, char c, const std::string& r)
    +{
    +  std::string::size_type p = 0;
    +
    +  while ((p = s.find(c, p)) != std::string::npos) {
    +    s.replace(p, 1, r);
    +    p += r.length();
    +  }
    +
    +  return s;
    +}
    +
    +std::string quoteSchemaDot(const std::string& table) {
    +  std::string result = table;
    +  replace(result, '.', "\".\"");
    +  return result;
    +}
    +
    +    } // end namespace Impl
    +
    +Session::JoinId::JoinId(const std::string& aJoinIdName,
    +			const std::string& aTableIdName,
    +			const std::string& aSqlType)
    +  : joinIdName(aJoinIdName),
    +    tableIdName(aTableIdName),
    +    sqlType(aSqlType)
    +{ }
    +
    +Session::SetInfo::SetInfo(const char *aTableName,
    +			  RelationType aType,
    +			  const std::string& aJoinName,
    +			  const std::string& aJoinSelfId)
    +  : tableName(aTableName),
    +    joinName(aJoinName),
    +    joinSelfId(aJoinSelfId),
    +    type(aType)
    +{ }
    +
    +Session::MappingInfo::MappingInfo()
    +  : initialized_(false)
    +{ }
    +
    +Session::MappingInfo::~MappingInfo()
    +{ }
    +
    +void Session::MappingInfo::init(Session& session)
    +{ 
    +  throw std::logic_error("Not to be done.");
    +}
    +
    +void Session::MappingInfo::dropTable(Session& session,
    +				     std::set<std::string>& tablesDropped)
    +{
    +  throw std::logic_error("Not to be done.");
    +}
    +
    +void Session::MappingInfo::rereadAll()
    +{ 
    +  throw std::logic_error("Not to be done.");
    +}
    +
    +std::string Session::MappingInfo::primaryKeys() const
    +{
    +  if (surrogateIdFieldName)
    +    return std::string("\"") + surrogateIdFieldName + "\"";
    +  else {
    +    std::stringstream result;
    +
    +    bool firstField = true;
    +    for (unsigned i = 0; i < fields.size(); ++i)
    +      if (fields[i].isIdField()) {
    +	if (!firstField)
    +	  result << ", ";
    +	result << "\"" << fields[i].name() << "\"";
    +	firstField = false;
    +      }
    +
    +    return result.str();
    +  }
    +}
    +
    +Session::Session()
    +  : schemaInitialized_(false),
    +    connection_(0),
    +    connectionPool_(0),
    +    transaction_(0)
    +{ }
    +
    +Session::~Session()
    +{
    +  if (!dirtyObjects_.empty())
    +    std::cerr << "Warning: Wt::Dbo::Session exiting with "
    +	      << dirtyObjects_.size() << " dirty objects" << std::endl;
    +
    +  while (!dirtyObjects_.empty()) {
    +    MetaDboBase *b = *dirtyObjects_.begin();
    +    b->decRef();
    +  }
    +
    +  dirtyObjects_.clear();
    +
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    delete i->second;
    +}
    +
    +void Session::setConnection(SqlConnection& connection)
    +{
    +  connection_ = &connection;
    +}
    +
    +void Session::setConnectionPool(SqlConnectionPool& pool)
    +{
    +  connectionPool_ = &pool;
    +}
    +
    +SqlConnection *Session::connection(bool openTransaction)
    +{
    +  if (!transaction_)
    +    throw std::logic_error("Operation requires an active transaction");
    +
    +  if (openTransaction)
    +    transaction_->open();
    +
    +  return transaction_->connection_;
    +}
    +
    +SqlConnection *Session::useConnection()
    +{
    +  if (connectionPool_)
    +    return connectionPool_->getConnection();
    +  else
    +    return connection_;
    +}
    +
    +void Session::returnConnection(SqlConnection *connection)
    +{
    +  if (connectionPool_)
    +    connectionPool_->returnConnection(connection);
    +}
    +
    +void Session::discardChanges(MetaDboBase *obj)
    +{
    +  if (dirtyObjects_.erase(obj) > 0)
    +    obj->decRef();
    +}
    +
    +Call Session::execute(const std::string& sql)
    +{
    +  initSchema();
    +
    +  if (!transaction_)
    +    throw std::logic_error("Dbo execute(): no active transaction");
    +
    +  return Call(*this, sql);
    +}
    +
    +void Session::initSchema() const
    +{
    +  if (schemaInitialized_)
    +    return;
    +
    +  Session *self = const_cast<Session *>(this);
    +  self->schemaInitialized_ = true;
    +
    +  Transaction t(*self);
    +
    +  for (ClassRegistry::const_iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    i->second->init(*self);
    +
    +  for (ClassRegistry::const_iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    self->resolveJoinIds(i->second);
    +
    +  for (ClassRegistry::const_iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    self->prepareStatements(i->second);
    +
    +  self->schemaInitialized_ = true;
    +
    +  t.commit();
    +}
    +
    +void Session::prepareStatements(MappingInfo *mapping)
    +{
    +  std::stringstream sql;
    +
    +  std::string table = Impl::quoteSchemaDot(mapping->tableName);
    +
    +  /*
    +   * SqlInsert
    +   */
    +  sql << "insert into \"" << table << "\" (";
    +
    +  bool firstField = true;
    +
    +  if (mapping->versionFieldName) {
    +    sql << "\"" << mapping->versionFieldName << "\"";
    +    firstField = false;
    +  }
    +
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    if (!firstField)
    +      sql << ", ";
    +    sql << "\"" << mapping->fields[i].name() << "\"";
    +    firstField = false;
    +  }
    +
    +  sql << ") values (";
    +
    +  firstField = true;
    +  if (mapping->versionFieldName) {
    +    sql << "?";
    +    firstField = false;
    +  }
    +
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    if (!firstField)
    +      sql << ", ";
    +    sql << "?";
    +    firstField = false;
    +  }
    +
    +  sql << ")";
    +
    +  if (mapping->surrogateIdFieldName) {
    +    SqlConnection *conn = useConnection();
    +    sql << conn->autoincrementInsertSuffix();
    +    returnConnection(conn);
    +  }
    +
    +  mapping->statements.push_back(sql.str()); // SqlInsert
    +
    +  /*
    +   * SqlUpdate
    +   */
    +
    +  sql.str("");
    +
    +  sql << "update \"" << table << "\" set ";
    +
    +  firstField = true;
    +
    +  if (mapping->versionFieldName) {
    +    sql << "\"" << mapping->versionFieldName << "\" = ?";
    +    firstField = false;
    +  }
    +  
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    if (!firstField)
    +      sql << ", ";
    +    sql << "\"" << mapping->fields[i].name() << "\" = ?";
    +
    +    firstField = false;
    +  }
    +
    +  sql << " where ";
    +
    +  std::string idCondition;
    +
    +  if (!mapping->surrogateIdFieldName) {
    +    firstField = true;
    +
    +    for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +      if (mapping->fields[i].isNaturalIdField()) {
    +	if (!firstField)
    +	  idCondition += " and ";
    +	idCondition += "\"" + mapping->fields[i].name() + "\" = ?";
    +
    +	firstField = false;
    +      }
    +    }
    +  } else
    +    idCondition
    +      += std::string() + "\"" + mapping->surrogateIdFieldName + "\" = ?";
    +
    +  sql << idCondition;
    +
    +  if (mapping->versionFieldName)
    +    sql << " and \"" << mapping->versionFieldName << "\" = ?";
    +
    +  mapping->statements.push_back(sql.str()); // SqlUpdate
    +
    +  /*
    +   * SqlDelete
    +   */
    +
    +  sql.str("");
    +
    +  sql << "delete from \"" << table << "\" where " << idCondition;
    +
    +  mapping->statements.push_back(sql.str()); // SqlDelete
    +
    +  /*
    +   * SqlDeleteVersioned
    +   */
    +  if (mapping->versionFieldName)
    +    sql << " and \"" << mapping->versionFieldName << "\" = ?";
    +
    +  mapping->statements.push_back(sql.str()); // SqlDeleteVersioned
    +
    +  /*
    +   * SelectedById
    +   */
    +
    +  sql.str("");
    +
    +  sql << "select ";
    +
    +  firstField = true;
    +  if (mapping->versionFieldName) {
    +    sql << "\"" << mapping->versionFieldName << "\"";
    +    firstField = false;
    +  }
    +
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    if (!firstField)
    +      sql << ", ";
    +    sql << "\"" << mapping->fields[i].name() << "\"";
    +    firstField = false;
    +  }
    +
    +  sql << " from \"" << table << "\" where " << idCondition;
    +
    +  mapping->statements.push_back(sql.str()); // SelectById
    +
    +  /*
    +   * Collections SQL
    +   */
    +  for (unsigned i = 0; i < mapping->sets.size(); ++i) {
    +    const SetInfo& info = mapping->sets[i];
    +
    +    sql.str("");
    +
    +    MappingInfo *otherMapping = getMapping(info.tableName);
    +
    +    // select [surrogate id,] version, ... from other
    +
    +    sql << "select ";
    +
    +    firstField = true;
    +    if (otherMapping->surrogateIdFieldName) {
    +      sql << "\"" << otherMapping->surrogateIdFieldName << "\"";
    +      firstField = false;
    +    }
    +
    +    if (otherMapping->versionFieldName) {
    +      if (!firstField)
    +	sql << ", ";
    +      sql << "\"" << otherMapping->versionFieldName << "\"";
    +      firstField = false;
    +    }
    +
    +    std::string fkConditions;
    +
    +    for (unsigned i = 0; i < otherMapping->fields.size(); ++i) {
    +      if (!firstField)
    +	sql << ", ";
    +      firstField = false;
    +
    +      const FieldInfo& field = otherMapping->fields[i];
    +      sql << "\"" << field.name() << "\"";
    +
    +      if (field.isForeignKey()
    +	  && field.foreignKeyName() == info.joinName
    +	  && field.foreignKeyTable() == mapping->tableName) {
    +	if (!fkConditions.empty())
    +	  fkConditions += " and ";
    +	fkConditions += std::string("\"") + field.name() + "\" = ?";
    +      }
    +    }
    +
    +    sql << " from \"" << Impl::quoteSchemaDot(otherMapping->tableName);
    +    
    +    switch (info.type) {
    +    case ManyToOne:
    +      // where joinfield_id(s) = ?
    +
    +      sql << "\" where " << fkConditions;
    +
    +      mapping->statements.push_back(sql.str());
    +      break;
    +    case ManyToMany:
    +      // (1) select for collection
    +
    +      //     join "joinName" on "joinName"."joinId(s) = this."id(s)
    +      //     where joinfield_id(s) = ?
    +
    +      std::string joinName = Impl::quoteSchemaDot(info.joinName);
    +      std::string tableName = Impl::quoteSchemaDot(info.tableName);
    +
    +      sql << "\" join \"" << joinName
    +	  << "\" on ";
    +
    +      std::vector<JoinId> otherJoinIds
    +	= getJoinIds(otherMapping, info.joinOtherId);
    +
    +      if (otherJoinIds.size() > 1)
    +	sql << "(";
    +
    +      for (unsigned i = 0; i < otherJoinIds.size(); ++i) {
    +	if (i != 0)
    +	  sql << " and ";
    +	sql << "\"" << joinName << "\".\"" << otherJoinIds[i].joinIdName
    +	    << "\" = \""
    +	    << tableName << "\".\"" << otherJoinIds[i].tableIdName << "\"";
    +      }
    +
    +      if (otherJoinIds.size() > 1)
    +	sql << ")";
    +
    +      sql << " where ";
    +
    +      std::vector<JoinId> selfJoinIds
    +	= getJoinIds(mapping, info.joinSelfId);
    +
    +      for (unsigned i = 0; i < selfJoinIds.size(); ++i) {
    +	if (i != 0)
    +	  sql << " and ";
    +	sql << "\"" << joinName << "\".\"" << selfJoinIds[i].joinIdName
    +	    << "\" = ?";
    +      }
    +
    +      mapping->statements.push_back(sql.str());
    +
    +      // (2) insert into collection
    +
    +      sql.str("");
    +
    +      sql << "insert into \"" << joinName
    +	  << "\" (";
    +
    +      firstField = true;
    +      for (unsigned i = 0; i < selfJoinIds.size(); ++i) {
    +	if (!firstField)
    +	  sql << ", ";
    +	firstField = false;
    +
    +	sql << "\"" << selfJoinIds[i].joinIdName << "\"";
    +      }
    +
    +      for (unsigned i = 0; i < otherJoinIds.size(); ++i) {
    +	if (!firstField)
    +	  sql << ", ";
    +	firstField = false;
    +
    +	sql << "\"" << otherJoinIds[i].joinIdName << "\"";
    +      }
    +
    +      sql << ") values (";
    +
    +      for (unsigned i = 0; i < selfJoinIds.size() + otherJoinIds.size(); ++i) {
    +	if (i != 0)
    +	  sql << ", ";
    +	sql << "?";
    +      }
    +
    +      sql << ")";
    +
    +      mapping->statements.push_back(sql.str());
    +
    +      // (3) delete from collections
    +
    +      sql.str("");
    +
    +      sql << "delete from \"" << joinName << "\" where ";
    +
    +      firstField = true;
    +      for (unsigned i = 0; i < selfJoinIds.size(); ++i) {
    +	if (!firstField)
    +	  sql << " and ";
    +	firstField = false;
    +
    +	sql << "\"" << selfJoinIds[i].joinIdName << "\" = ?";
    +      }
    +
    +      for (unsigned i = 0; i < otherJoinIds.size(); ++i) {
    +	if (!firstField)
    +	  sql << " and ";
    +	firstField = false;
    +
    +	sql << "\"" << otherJoinIds[i].joinIdName << "\" = ?";
    +      }
    +
    +      mapping->statements.push_back(sql.str());
    +    }
    +  }
    +}
    +
    +/*
    +void Session::mergeDuplicates(MappingInfo *mapping)
    +{
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    FieldInfo& f = mapping->fields[i];
    +    for (unsigned j = i + 1; j < mapping->fields.size(); ++j) {
    +      FieldInfo& f2 = mapping->fields[j];
    +      if (f.name() == f2.name()) {
    +	if (f.sqlType() != f2.sqlType())
    +	  throw Exception("Table: " + mapping->tableName + ": field '"
    +			  + f.name() + "' mapped multiple times");
    +			  "for " + mapping->tableName + "."
    +			  + set.joinName);
    +	  
    +      }
    +    }
    +  }
    +}
    +*/
    +
    +void Session::resolveJoinIds(MappingInfo *mapping)
    +{
    +  for (unsigned i = 0; i < mapping->sets.size(); ++i) {
    +    SetInfo& set = mapping->sets[i];
    +
    +    if (set.type == ManyToMany) {
    +      MappingInfo *other = getMapping(set.tableName);
    +
    +      bool found = false;
    +      for (unsigned j = 0; j < other->sets.size(); ++j) {
    +	const SetInfo& otherSet = other->sets[j];
    +
    +	if (otherSet.joinName == set.joinName) {
    +	  // second check make sure we find the other id if Many-To-Many between
    +	  // same table
    +	  if (mapping != other || i != j) {
    +	    set.joinOtherId = otherSet.joinSelfId;
    +	    found = true;
    +	    break;
    +	  }
    +	}
    +      }
    +
    +      if (!found)
    +	throw Exception("Could not find corresponding Many-To-Many collection: "
    +			"for " + std::string(mapping->tableName) + "."
    +			+ set.joinName);
    +    }
    +  }
    +}
    +
    +void Session::createTables()
    +{
    +  initSchema();
    +
    +  Transaction t(*this);
    +
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    i->second->initialized_ = false; // to do ordered table creation
    +  
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    createTable(i->second);
    +
    +  std::set<std::string> joinTablesCreated;
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    createRelations(i->second, joinTablesCreated);
    +
    +  t.commit();
    +}
    +
    +void Session::createTable(MappingInfo *mapping)
    +{
    +  if (mapping->initialized_)
    +    return;
    +
    +  mapping->initialized_ = true;
    +
    +  std::stringstream sql;
    +
    +  sql << "create table \"" << Impl::quoteSchemaDot(mapping->tableName)
    +      << "\" (\n";
    +
    +  bool firstField = true;
    +
    +  // Auto-generated id
    +  if (mapping->surrogateIdFieldName) {
    +    sql << "  \"" << mapping->surrogateIdFieldName << "\" "
    +	<< connection(false)->autoincrementType()
    +	<< " primary key "
    +	<< connection(false)->autoincrementSql() << "";
    +    firstField = false;
    +  }
    +
    +  // Optimistic locking version field
    +  if (mapping->versionFieldName) {
    +    if (!firstField)
    +      sql << ",\n";
    +
    +    sql << "  \"" << mapping->versionFieldName << "\" "
    +	<< sql_value_traits<int>::type(0, 0);
    +
    +    firstField = false;
    +  }
    +
    +  std::string primaryKey;
    +  for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +    const FieldInfo& field = mapping->fields[i];
    +
    +    if (!field.isVersionField()) {
    +      if (!firstField)
    +	sql << ",\n";
    +
    +      std::string sqlType = field.sqlType();
    +      if (field.isForeignKey()) {
    +	if (sqlType.length() > 9
    +	    && sqlType.substr(sqlType.length() - 9) == " not null")
    +	  sqlType = sqlType.substr(0, sqlType.length() - 9);
    +      }
    +
    +      sql << "  \"" << field.name() << "\" " << sqlType;
    +
    +      firstField = false;
    +
    +      if (field.isNaturalIdField()) {
    +	if (!primaryKey.empty())
    +	  primaryKey += ", ";
    +	primaryKey += "\"" + field.name() + "\"";
    +      }
    +    }
    +  }
    +
    +  if (!primaryKey.empty()) {
    +    if (!firstField)
    +      sql << ",\n";
    +
    +    sql << "  primary key (" << primaryKey << ")";
    +  }
    +
    +  for (unsigned i = 0; i < mapping->fields.size();) {
    +    const FieldInfo& field = mapping->fields[i];
    +
    +    if (field.isForeignKey()) {
    +      if (!firstField)
    +	sql << ",\n";
    +
    +      sql << "  constraint \"fk_"
    +	  << mapping->tableName << "_" << field.foreignKeyName() << "\""
    +	  << " foreign key (\"" << field.name() << "\"";
    +
    +      unsigned j = i + 1;
    +      while (j < mapping->fields.size()) {
    +	const FieldInfo& nextField = mapping->fields[j];
    +	if (nextField.foreignKeyName() == field.foreignKeyName()) {
    +	  sql << ", \"" << nextField.name() << "\"";
    +	  ++j;
    +	} else
    +	  break;
    +      }
    +
    +      MappingInfo *otherMapping = getMapping(field.foreignKeyTable().c_str());
    +
    +      if (!otherMapping->initialized_)
    +	createTable(otherMapping);
    +
    +      sql << ") references \"" << Impl::quoteSchemaDot(field.foreignKeyTable())
    +	  << "\" (" << otherMapping->primaryKeys() << ")";
    +
    +      i = j;
    +    } else
    +      ++i;
    +  }
    +
    +  sql << "\n)\n";
    +
    +  connection(true)->executeSql(sql.str());
    +}
    +
    +void Session::createRelations(MappingInfo *mapping,
    +			      std::set<std::string>& joinTablesCreated)
    +{
    +  for (unsigned i = 0; i < mapping->sets.size(); ++i) {
    +    const SetInfo& set = mapping->sets[i];
    +
    +    if (set.type == ManyToMany) {
    +      if (joinTablesCreated.count(set.joinName) == 0) {
    +	joinTablesCreated.insert(set.joinName);
    +
    +	MappingInfo *other = getMapping(set.tableName);
    +
    +	createJoinTable(set.joinName, mapping, other,
    +			set.joinSelfId, set.joinOtherId);
    +      }
    +    }
    +  }
    +}
    +
    +void Session::createJoinTable(const std::string& joinName,
    +			      MappingInfo *mapping1, MappingInfo *mapping2,
    +			      const std::string& joinId1,
    +			      const std::string& joinId2)
    +{
    +  MappingInfo joinTableMapping;
    +
    +  joinTableMapping.tableName = joinName.c_str();
    +  joinTableMapping.versionFieldName = 0;
    +  joinTableMapping.surrogateIdFieldName = 0;
    +
    +  addJoinTableFields(joinTableMapping, mapping1, joinId1, "key1");
    +  addJoinTableFields(joinTableMapping, mapping2, joinId2, "key2");
    +
    +  createTable(&joinTableMapping);
    +
    +  std::set<std::string> dummy;
    +  createRelations(&joinTableMapping, dummy);
    +
    +  createJoinIndex(joinTableMapping, mapping1, joinId1, "key1");
    +  createJoinIndex(joinTableMapping, mapping2, joinId2, "key2");
    +}
    +
    +void Session::createJoinIndex(MappingInfo& joinTableMapping,
    +			      MappingInfo *mapping,
    +			      const std::string& joinId,
    +			      const std::string& foreignKeyName)
    +{
    +  std::stringstream sql;
    +
    +  sql << "create index \"" << joinTableMapping.tableName << "_"
    +      << mapping->tableName;
    +
    +  if (!joinId.empty())
    +    sql << "_" << joinId;
    +
    +  sql << "\" on \"" << Impl::quoteSchemaDot(joinTableMapping.tableName)
    +      << "\" (";
    +
    +  bool firstField = true;
    +  for (unsigned int i = 0; i < joinTableMapping.fields.size(); ++i) {
    +    const FieldInfo& f = joinTableMapping.fields[i];
    +    if (f.foreignKeyName() == foreignKeyName) {
    +      if (!firstField)
    +	sql << ", ";
    +      firstField = false;
    +
    +      sql << "\"" << f.name() << "\"";
    +    }
    +  }
    +
    +  sql << ")";
    +
    +  connection(true)->executeSql(sql.str());
    +}
    +
    +std::vector<Session::JoinId> 
    +Session::getJoinIds(MappingInfo *mapping, const std::string& joinId)
    +{
    +  std::vector<Session::JoinId> result;
    +
    +  if (mapping->surrogateIdFieldName) {
    +    std::string idName;
    +
    +    if (joinId.empty())
    +      idName = std::string(mapping->tableName)
    +	+ "_" + mapping->surrogateIdFieldName;
    +    else
    +      idName = joinId;
    +
    +    result.push_back
    +      (JoinId(idName, mapping->surrogateIdFieldName,
    +	      sql_value_traits<long long>::type(0, 0)));
    +
    +  } else {
    +    std::string foreignKeyName;
    +
    +    if (joinId.empty())
    +      foreignKeyName = std::string(mapping->tableName);
    +    else
    +      foreignKeyName = joinId;
    +
    +    for (unsigned i = 0; i < mapping->fields.size(); ++i) {
    +      const FieldInfo& field = mapping->fields[i];
    +
    +      if (field.isNaturalIdField()) {
    +	std::string idName = foreignKeyName + "_" + field.name();
    +	result.push_back(JoinId(idName, field.name(), field.sqlType()));
    +      }
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +void Session::addJoinTableFields(MappingInfo& result, MappingInfo *mapping,
    +				 const std::string& joinId,
    +				 const std::string& keyName)
    +{
    +  std::vector<JoinId> joinIds = getJoinIds(mapping, joinId);
    +
    +  for (unsigned i = 0; i < joinIds.size(); ++i)
    +    result.fields.push_back
    +      (FieldInfo(joinIds[i].joinIdName, &typeid(long long),
    +		 joinIds[i].sqlType + " not null",
    +		 mapping->tableName, keyName,
    +		 FieldInfo::NaturalId | FieldInfo::ForeignKey));
    +}
    +
    +void Session::dropTables()
    +{
    +  initSchema();
    +
    +  Transaction t(*this);
    +
    +  flush();
    +
    +  std::set<std::string> tablesDropped;
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    i->second->dropTable(*this, tablesDropped);
    +
    +  t.commit();
    +}
    +
    +Session::MappingInfo *Session::getMapping(const char *tableName) const
    +{
    +  TableRegistry::const_iterator i = tableRegistry_.find(tableName);
    +
    +  if (i != tableRegistry_.end())
    +    return i->second;
    +  else
    +    return 0;
    +}
    +
    +void Session::needsFlush(MetaDboBase *obj)
    +{
    +  if (dirtyObjects_.insert(obj).second)
    +    obj->incRef();
    +}
    +
    +void Session::flush()
    +{
    +  while (!dirtyObjects_.empty()) {
    +    MetaDboBaseSet::iterator i = dirtyObjects_.begin();
    +    MetaDboBase *dbo = *i;
    +    dbo->flush();
    +    dirtyObjects_.erase(i);
    +    dbo->decRef();
    +  }
    +}
    +
    +void Session::rereadAll()
    +{
    +  for (ClassRegistry::iterator i = classRegistry_.begin();
    +       i != classRegistry_.end(); ++i)
    +    i->second->rereadAll();
    +}
    +
    +std::string Session::statementId(const char *tableName, int statementIdx)
    +{  
    +  return std::string(tableName) + ":"
    +    + boost::lexical_cast<std::string>(statementIdx);
    +}
    +
    +SqlStatement *Session::getStatement(const std::string& id)
    +{
    +  return connection(true)->getStatement(id);
    +}
    +
    +SqlStatement *Session::getOrPrepareStatement(const std::string& sql)
    +{
    +  SqlStatement *s = getStatement(sql);
    +
    +  if (!s)
    +    s = prepareStatement(sql, sql);
    +
    +  return s;
    +}
    +
    +SqlStatement *Session::getStatement(const char *tableName, int statementIdx)
    +{
    +  std::string id = statementId(tableName, statementIdx);
    +  SqlStatement *result = getStatement(id);
    +
    +  if (!result)
    +    result = prepareStatement(id, getStatementSql(tableName, statementIdx));
    +
    +  return result;
    +}
    +
    +const std::string&
    +Session::getStatementSql(const char *tableName, int statementIdx)
    +{
    +  return getMapping(tableName)->statements[statementIdx];
    +}
    +
    +SqlStatement *Session::prepareStatement(const std::string& id,
    +					const std::string& sql)
    +{
    +  SqlConnection *conn = connection(false);
    +  SqlStatement *result = conn->prepareStatement(sql);
    +  conn->saveStatement(id, result);
    +  result->use();
    +
    +  return result;
    +}
    +
    +void Session::getFields(const char *tableName,
    +			std::vector<FieldInfo>& result)
    +{
    +  initSchema();
    +
    +  MappingInfo *mapping = getMapping(tableName);
    +  if (!mapping)
    +    throw std::logic_error(std::string("Table ") + tableName
    +			   + " was not mapped.");
    +
    +  if (mapping->surrogateIdFieldName)
    +    result.push_back(FieldInfo(mapping->surrogateIdFieldName,
    +			       &typeid(long long),
    +			       sql_value_traits<long long>::type(0, 0),
    +			       FieldInfo::SurrogateId));
    +
    +  if (mapping->versionFieldName)
    +    result.push_back(FieldInfo(mapping->versionFieldName, &typeid(int),
    +			       sql_value_traits<int>::type(0, 0),
    +			       FieldInfo::Version));
    +
    +  result.insert(result.end(), mapping->fields.begin(), mapping->fields.end());
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Session_impl.h b/wt-3.1.7a/src/Wt/Dbo/Session_impl.h
    new file mode 100644
    index 0000000..894351d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Session_impl.h
    @@ -0,0 +1,371 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SESSION_IMPL_H_
    +#define WT_DBO_SESSION_IMPL_H_
    +
    +#include <iostream>
    +#include <stdexcept>
    +
    +#include <Wt/Dbo/SqlConnection>
    +#include <Wt/Dbo/Query>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +      template <class C, typename T>
    +      struct LoadHelper
    +      {
    +	static ptr<C> load(Session *session, SqlStatement *statement,
    +			   int& column)
    +	{
    +	  return session->loadWithNaturalId<C>(statement, column);
    +	};
    +      };
    +
    +      template <class C>
    +      struct LoadHelper<C, long long>
    +      {
    +	static ptr<C> load(Session *session, SqlStatement *statement,
    +			   int& column)
    +	{
    +	  return session->loadWithLongLongId<C>(statement, column);
    +	}
    +      };
    +    }
    +
    +template <class C>
    +void Session::mapClass(const char *tableName)
    +{
    +  if (schemaInitialized_)
    +    throw std::logic_error("Cannot map tables after schema was initialized.");
    +
    +  if (classRegistry_.find(&typeid(C)) != classRegistry_.end())
    +    return;
    +
    +  Mapping<C> *mapping = new Mapping<C>();
    +  mapping->tableName = tableName;
    +
    +  classRegistry_[&typeid(C)] = mapping;
    +  tableRegistry_[tableName] = mapping;
    +}
    +
    +template <class C>
    +SqlStatement *Session::getStatement(int statementIdx)
    +{
    +  initSchema();
    +
    +  ClassRegistry::iterator i = classRegistry_.find(&typeid(C));
    +  MappingInfo *mapping = i->second;
    +
    +  std::string id = statementId(mapping->tableName, statementIdx);
    +
    +  SqlStatement *result = getStatement(id);
    +
    +  if (!result)
    +    result = prepareStatement(id, mapping->statements[statementIdx]);
    +
    +  return result;
    +}
    +
    +template <class C>
    +const char *Session::tableName() const
    +{
    +  ClassRegistry::const_iterator i = classRegistry_.find(&typeid(C));
    +  if (i != classRegistry_.end())
    +    return dynamic_cast< Mapping<C> *>(i->second)->tableName;
    +  else
    +    throw std::logic_error(std::string("Class ")
    +			   + typeid(C).name() + " was not mapped.");
    +}
    +
    +template <class C>
    +Session::Mapping<C> *Session::getMapping() const
    +{
    +  if (!schemaInitialized_)
    +    initSchema();
    +
    +  ClassRegistry::const_iterator i = classRegistry_.find(&typeid(C));
    +  if (i != classRegistry_.end()) {
    +    Session::Mapping<C> *mapping = dynamic_cast< Mapping<C> *>(i->second);
    +    if (!mapping->initialized_)
    +      mapping->init(*const_cast<Session *>(this));
    +    return mapping;
    +  } else
    +    throw std::logic_error(std::string("Class ")
    +			   + typeid(C).name() + " was not mapped.");
    +}
    +
    +template <class C>
    +ptr<C> Session::load(SqlStatement *statement, int& column)
    +{
    +  return Impl::LoadHelper<C, typename dbo_traits<C>::IdType>
    +    ::load(this, statement, column);
    +}
    +
    +template <class C>
    +ptr<C> Session::loadWithNaturalId(SqlStatement *statement, int& column)
    +{
    +  Mapping<C> *mapping = getMapping<C>();
    +
    +  /* Natural id is possibly multiple fields anywhere */
    +  MetaDbo<C> *dbo = new MetaDbo<C>(dbo_traits<C>::invalidId(), -1,
    +				   MetaDboBase::Persisted, *this, 0);
    +  implLoad<C>(*dbo, statement, column);
    +
    +  typename Mapping<C>::Registry::iterator i
    +    = mapping->registry_.find(dbo->id());
    +
    +  if (i == mapping->registry_.end()) {
    +    mapping->registry_[dbo->id()] = dbo;
    +    return ptr<C>(dbo);
    +  } else {
    +    dbo->setSession(0);
    +    delete dbo;
    +    return ptr<C>(i->second);
    +  }
    +}
    +
    +template <class C>
    +ptr<C> Session::loadWithLongLongId(SqlStatement *statement, int& column)
    +{
    +  Mapping<C> *mapping = getMapping<C>();
    +
    +  if (mapping->surrogateIdFieldName) {
    +    /*
    +     * If mapping uses surrogate keys, then we can first read the id and
    +     * decide if we already have it.
    +     *
    +     * If not, then we need to first read the object, get the id, and if
    +     * we already had it, delete the redundant copy.
    +     */
    +    long long id;
    +
    +    /* Auto-generated surrogate key is first field */
    +    statement->getResult(column++, &id);
    +
    +    typename Mapping<C>::Registry::iterator i = mapping->registry_.find(id);
    +
    +    if (i == mapping->registry_.end()) {
    +      MetaDbo<C> *dbo
    +	= new MetaDbo<C>(id, -1, MetaDboBase::Persisted, *this, 0);
    +      implLoad<C>(*dbo, statement, column);
    +
    +      mapping->registry_[id] = dbo;
    +
    +      return ptr<C>(dbo);
    +    } else {
    +      column += (int)mapping->fields.size() + 1; // + version
    +
    +      return ptr<C>(i->second);
    +    }
    +  } else
    +    return loadWithNaturalId<C>(statement, column);
    +}
    +
    +template <class C>
    +ptr<C> Session::add(ptr<C>& obj)
    +{
    +  initSchema();
    +
    +  MetaDbo<C> *dbo = obj.obj();
    +  if (dbo && !dbo->session()) {
    +    dbo->setSession(this);
    +    dirtyObjects_.insert(dbo);
    +    dbo->incRef();
    +
    +    SessionAddAction act(this);
    +    act.visit(*dbo->obj());
    +  }
    +
    +  return obj;
    +}
    +
    +template <class C>
    +ptr<C> Session::add(C *obj)
    +{
    +  ptr<C> result(obj);
    +  return add(result);
    +}
    +
    +template <class C>
    +ptr<C> Session::load(const typename dbo_traits<C>::IdType& id)
    +{
    +  ptr<C> result = loadLazy<C>(id);
    +  *result; // Dereference to do actual load or throw exception
    +  return result;
    +}
    +
    +template <class C>
    +ptr<C> Session::loadLazy(const typename dbo_traits<C>::IdType& id)
    +{
    +  initSchema();
    +
    +  Mapping<C> *mapping = getMapping<C>();
    +  typename Mapping<C>::Registry::iterator i = mapping->registry_.find(id);
    +
    +  if (i == mapping->registry_.end()) {
    +    MetaDbo<C> *dbo = new MetaDbo<C>(id, -1, MetaDboBase::Persisted, *this, 0);
    +    mapping->registry_[id] = dbo;
    +    return ptr<C>(dbo);
    +  } else
    +    return ptr<C>(i->second);
    +}
    +
    +template <class C, typename BindStrategy>
    +Query< ptr<C>, BindStrategy > Session::find(const std::string& where)
    +{
    +  initSchema();
    +
    +  return Query< ptr<C>, BindStrategy >
    +    (*this, Impl::quoteSchemaDot(tableName<C>()), where);
    +}
    +
    +template <class Result>
    +Query<Result> Session::query(const std::string& sql)
    +{
    +  return query<Result, DynamicBinding>(sql);
    +}
    +
    +template <class Result, typename BindStrategy>
    +Query<Result, BindStrategy> Session::query(const std::string& sql)
    +{
    +  initSchema();
    +
    +  return Query<Result, BindStrategy>(*this, sql);
    +}
    +
    +template<class C>
    +void Session::prune(MetaDbo<C> *obj)
    +{
    +  getMapping<C>()->registry_.erase(obj->id());
    +
    +  discardChanges(obj);
    +}
    +
    +template<class C>
    +void Session::implSave(MetaDbo<C>& dbo)
    +{
    +  if (!transaction_)
    +    throw std::logic_error("Dbo save(): no active transaction");
    +
    +  if (!dbo.savedInTransaction())
    +    transaction_->objects_.push_back(new ptr<C>(&dbo));
    +
    +  Session::Mapping<C> *mapping = getMapping<C>();
    +
    +  SaveDbAction<C> action(dbo, *mapping);
    +  action.visit(*dbo.obj());
    +
    +  mapping->registry_[dbo.id()] = &dbo;
    +}
    +
    +template<class C>
    +void Session::implDelete(MetaDbo<C>& dbo)
    +{
    +  if (!transaction_)
    +    throw std::logic_error("Dbo save(): no active transaction");
    +
    +  // when saved in transaction, we are already in this list
    +  if (!dbo.savedInTransaction())
    +    transaction_->objects_.push_back(new ptr<C>(&dbo));
    +
    +  bool versioned = getMapping<C>()->versionFieldName && dbo.obj() != 0;
    +  SqlStatement *statement
    +    = getStatement<C>(versioned ? SqlDeleteVersioned : SqlDelete);
    +
    +  // when saved in the transaction, we will be at version() + 1
    +
    +  statement->reset();
    +  ScopedStatementUse use(statement);
    +
    +  int column = 0;
    +  dbo.bindId(statement, column);
    +
    +  int version = -1;
    +  if (versioned) {
    +    version = dbo.version() + (dbo.savedInTransaction() ? 1 : 0);
    +    statement->bind(column++, version);
    +  }
    +
    +  statement->execute();
    +
    +  if (versioned) {
    +    statement->nextRow();
    +    int modifiedCount = statement->affectedRowCount();
    +    if (modifiedCount != 1)
    +      throw StaleObjectException(boost::lexical_cast<std::string>(dbo.id()),
    +				 version);
    +  }
    +}
    +
    +template<class C>
    +void Session::implTransactionDone(MetaDbo<C>& dbo, bool success)
    +{
    +  TransactionDoneAction action(dbo, *getMapping<C>(), success);
    +  action.visit(*dbo.obj());
    +}
    +
    +template <class C>
    +void Session::implLoad(MetaDbo<C>& dbo, SqlStatement *statement, int& column)
    +{
    +  if (!transaction_)
    +    throw std::logic_error("Dbo load(): no active transaction");
    +
    +  LoadDbAction<C> action(dbo, *getMapping<C>(), statement, column);
    +
    +  C *obj = new C();
    +  try {
    +    action.visit(*obj);
    +    dbo.setObj(obj);
    +  } catch (...) {
    +    delete obj;
    +    throw;
    +  }
    +}
    +
    +template <class C>
    +Session::Mapping<C>::~Mapping()
    +{
    +  for (typename Registry::iterator i = registry_.begin();
    +       i != registry_.end(); ++i) {
    +    i->second->setState(MetaDboBase::Orphaned);
    +  }
    +}
    +
    +template <class C>
    +void Session::Mapping<C>
    +::dropTable(Session& session, std::set<std::string>& tablesDropped)
    +{
    +  if (tablesDropped.count(tableName) == 0) {
    +    DropSchema action(session, tableName, tablesDropped);
    +    C dummy;
    +    action.visit(dummy);
    +  }
    +}
    +
    +template <class C> void Session::Mapping<C>::rereadAll()
    +{
    +  for (typename Registry::iterator i = registry_.begin(); i != registry_.end(); ++i)
    +    i->second->reread();
    +}
    +
    +template <class C>
    +void Session::Mapping<C>::init(Session& session)
    +{
    +  if (!initialized_) {
    +    initialized_ = true;
    +
    +    InitSchema action(session, *this);
    +    C dummy;
    +    action.visit(dummy);
    +  }
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SESSION_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlConnection b/wt-3.1.7a/src/Wt/Dbo/SqlConnection
    new file mode 100644
    index 0000000..94af518
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlConnection
    @@ -0,0 +1,174 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SQL_CONNECTION_H_
    +#define WT_DBO_SQL_CONNECTION_H_
    +
    +#include <map>
    +#include <string>
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +/*! \brief Enum that defines a date time type.
    + */
    +enum SqlDateTimeType {
    +  SqlDate,    //!< Date only
    +  SqlDateTime,//!< Date and time
    +  SqlTime     //!< Time duration
    +};
    +
    +class SqlStatement;
    +
    +/*! \class SqlConnection Wt/Dbo/SqlConnection Wt/Dbo/SqlConnection
    + *  \brief Abstract base class for an SQL connection.
    + *
    + * An sql connection manages a single connection to a database. It
    + * also manages a map of previously prepared statements indexed by
    + * id's.
    + *
    + * This class is part of Wt::Dbo's backend API, and should not be used
    + * directly.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API SqlConnection
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~SqlConnection();
    +
    +  /*! \brief Clones the connection.
    +   *
    +   * Returns a new connection object that is configured like this
    +   * object. This is used by connection pool implementations to create
    +   * its connections.
    +   */
    +  virtual SqlConnection *clone() const = 0;
    +
    +  /*! \brief Executes an SQL statement.
    +   *
    +   * This is a convenience method for preparing a statement, executing
    +   * it, and deleting it.
    +   */
    +  virtual void executeSql(const std::string& sql);
    +
    +  /*! \brief Starts a transaction
    +   *
    +   * This function starts a transaction. 
    +   */
    +  virtual void startTransaction() = 0;
    +  
    +  /*! \brief Commits a transaction
    +   *
    +   * This function commits a transaction.
    +   */
    +  virtual void commitTransaction() = 0;
    +  
    +  /*! \brief Rolls back a transaction
    +   *
    +   * This function rolls back a transaction.
    +   */
    +  virtual void rollbackTransaction() = 0;
    +  
    +  /*! \brief Returns the statement with the given id.
    +   *
    +   * Returns 0 if no such statement was already added.
    +   *
    +   * \sa saveStatement()
    +   */
    +  virtual SqlStatement *getStatement(const std::string& id) const;
    +
    +  /*! \brief Saves a statement with the given id.
    +   *
    +   * Saves the statement for future reuse using getStatement()
    +   */
    +  virtual void saveStatement(const std::string& id,
    +			     SqlStatement *statement);
    +
    +  /*! \brief Prepares a statement.
    +   *
    +   * Returns the prepared statement.
    +   */
    +  virtual SqlStatement *prepareStatement(const std::string& sql) = 0;
    +
    +  /*! \brief Sets a property.
    +   *
    +   * Properties may tailor the backend behavior. Some properties are
    +   * applicable to all backends, while some are backend specific.
    +   *
    +   * General properties are:
    +   * - <tt>show-queries</tt>: when value is "true", queries are shown
    +   *   as they are executed.
    +   */
    +  void setProperty(const std::string& name, const std::string& value);
    +
    +  /*! \brief Returns a property.
    +   *
    +   * Returns the property value, or an empty string if the property was
    +   * not set.
    +   *
    +   * \sa setProperty()
    +   */
    +  std::string property(const std::string& name) const;
    +
    +  /** @name Methods that return dialect information
    +   */
    +  //@{
    +  /*! \brief Returns the 'autoincrement' SQL type modifier.
    +   *
    +   * This is used by Session::createTables() to create the <i>id</i>
    +   * column.
    +   */
    +  virtual std::string autoincrementSql() const = 0;
    +
    +  /*! \brief Returns the 'autoincrement' SQL type.
    +   *
    +   * This is used by Session::createTables() to create the <i>id</i>
    +   * column.
    +   */
    +  virtual std::string autoincrementType() const = 0;
    +
    +  /*! \brief Returns the suffix for an 'autoincrement' insert statement.
    +   *
    +   * This is appended to the <tt>insert</tt> statement, since some back-ends
    +   * need to be indicated that they should return the autoincrement id.
    +   */
    +  virtual std::string autoincrementInsertSuffix() const = 0;
    +  
    +  /*! \brief Returns the date/time type.
    +   *
    +   * \sa SqlStatement::bind(int, const boost::posix_time::ptime&, SqlDateTimeType)
    +   */
    +  virtual const char *dateTimeType(SqlDateTimeType type) const = 0;
    +
    +  /*! \brief Returns the blob type.
    +   *
    +   * \sa SqlStatement::bind(int, const std::vector<unsigned char>&)
    +   */
    +  virtual const char *blobType() const = 0;
    +  //@}
    +
    +  bool showQueries() const;
    +
    +protected:
    +  SqlConnection();
    +  SqlConnection(const SqlConnection& other);
    +  void clearStatementCache();
    +
    +private:
    +  typedef std::map<std::string, SqlStatement *> StatementMap;
    +
    +  StatementMap statementCache_;
    +  std::map<std::string, std::string> properties_;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_STATEMENT_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlConnection.C b/wt-3.1.7a/src/Wt/Dbo/SqlConnection.C
    new file mode 100644
    index 0000000..d5ef2bc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlConnection.C
    @@ -0,0 +1,90 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/SqlConnection"
    +#include "Wt/Dbo/SqlStatement"
    +#include "Wt/Dbo/Exception"
    +
    +#include <cassert>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +SqlConnection::SqlConnection()
    +{ }
    +
    +SqlConnection::SqlConnection(const SqlConnection& other)
    +  : properties_(other.properties_)
    +{ }
    +
    +SqlConnection::~SqlConnection()
    +{
    +  assert(statementCache_.empty());
    +}
    +
    +void SqlConnection::clearStatementCache()
    +{
    +  for (StatementMap::iterator i = statementCache_.begin();
    +       i != statementCache_.end(); ++i)
    +    delete i->second;
    +
    +  statementCache_.clear();
    +}
    +
    +void SqlConnection::executeSql(const std::string& sql)
    +{
    +  SqlStatement *s = prepareStatement(sql);
    +  s->execute();
    +  delete s;
    +}
    +
    +SqlStatement *SqlConnection::getStatement(const std::string& id) const
    +{
    +  StatementMap::const_iterator i = statementCache_.find(id);
    +  if (i != statementCache_.end()) {
    +    SqlStatement *result = i->second;
    +    /*
    +     * Later, if already in use, manage reentrant use by cloning the statement
    +     * and adding it to a linked list in the statementCache_
    +     */
    +    if (!result->use())
    +      throw Exception("A collection for '" + id + "' is already in use."
    +		      " Reentrant statement use is not yet implemented."); 
    +
    +    return result;
    +  } else
    +    return 0;
    +}
    +
    +void SqlConnection::saveStatement(const std::string& id,
    +				  SqlStatement *statement)
    +{
    +  statementCache_[id] = statement;
    +}
    +
    +std::string SqlConnection::property(const std::string& name) const
    +{
    +  std::map<std::string, std::string>::const_iterator i = properties_.find(name);
    +
    +  if (i != properties_.end())
    +    return i->second;
    +  else
    +    return std::string();
    +}
    +
    +void SqlConnection::setProperty(const std::string& name,
    +				const std::string& value)
    +{
    +  properties_[name] = value;
    +}
    +
    +bool SqlConnection::showQueries() const
    +{
    +  return property("show-queries") == "true";
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool b/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool
    new file mode 100644
    index 0000000..8352fb4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool
    @@ -0,0 +1,57 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SQL_CONNECTION_POOL_H_
    +#define WT_DBO_SQL_CONNECTION_POOL_H_
    +
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class SqlConnection;
    +
    +/*! \class SqlConnectionPool Wt/Dbo/SqlConnectionPool Wt/Dbo/SqlConnectionPool
    + *  \brief Abstract base class for a SQL connection pool.
    + *
    + * An sql connection pool manages a pool of connections. It is shared
    + * between multiple sessions to allow these sessions to use a
    + * connection while handling a transaction. Note that a session only
    + * needs a connection while in-transaction, and thus you only need as
    + * much connections as the number of concurrent transactions.
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API SqlConnectionPool
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~SqlConnectionPool();
    +
    +  /*! \brief Uses a connection from the pool.
    +   *
    +   * This returns a connection from the pool that can be used. If the
    +   * pool has no more connection available, the pool may decide to
    +   * grow or block until a connection is returned.
    +   *
    +   * This method is called by a Session when a new transaction is
    +   * started.
    +   */
    +  virtual SqlConnection *getConnection() = 0;
    +
    +  /*! \brief Returns a connection to the pool.
    +   *
    +   * This returns a connection to the pool. This method is called by a
    +   * Session after a transaction has been finished.
    +   */
    +  virtual void returnConnection(SqlConnection *) = 0;  
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_CONNECTION_POOL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool.C b/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool.C
    new file mode 100644
    index 0000000..59af4ad
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlConnectionPool.C
    @@ -0,0 +1,16 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/SqlConnectionPool"
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +SqlConnectionPool::~SqlConnectionPool()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlQueryParse.C b/wt-3.1.7a/src/Wt/Dbo/SqlQueryParse.C
    new file mode 100644
    index 0000000..611d619
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlQueryParse.C
    @@ -0,0 +1,276 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Query"
    +#include "Query_impl.h"
    +#include "DbAction"
    +
    +#include <boost/version.hpp>
    +
    +#if BOOST_VERSION >= 104100
    +#define SPIRIT_QUERY_PARSE
    +#endif // BOOST_VERSION
    +
    +#ifdef SPIRIT_QUERY_PARSE
    +
    +#include <boost/spirit/include/qi.hpp>
    +#include <boost/spirit/include/phoenix_core.hpp>
    +#include <boost/spirit/include/phoenix_operator.hpp>
    +#include <boost/spirit/include/phoenix_object.hpp>
    +#include <boost/spirit/home/phoenix/statement/throw.hpp>
    +#include <boost/bind.hpp>
    +#include <iostream>
    +
    +#else
    +#include <boost/range/iterator_range.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#endif // SPIRIT_QUERY_PARSE
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +#ifndef SPIRIT_QUERY_PARSE
    +void parseSql(const std::string& sql, SelectFieldLists& fieldLists,
    +	      bool& simpleSelectCount)
    +{
    +  fieldLists.clear();
    +  simpleSelectCount = true;
    +
    +  std::string::const_iterator i = sql.begin();
    +
    +  std::size_t selectPos = ifind(sql, "select ");
    +  if (selectPos != 0)
    +    throw std::logic_error("Session::query(): query should start with 'select '"
    +			   " (sql='" + sql + "')");
    +
    +  i += 7;
    +
    +  std::size_t distinctPos = ifind(sql.substr(i - sql.begin()), "distinct ");
    +  if (distinctPos == 0) {
    +    simpleSelectCount = false;
    +    i += 9;
    +  } else {
    +    std::size_t allPos = ifind(sql.substr(i - sql.begin()), "all ");
    +    if (allPos == 0) {
    +      simpleSelectCount = false;
    +      i += 4;
    +    }
    +  }
    +
    +  std::string aliasStr;
    +  std::size_t fromPos = ifind(sql.substr(i - sql.begin()), " from ");
    +  if (fromPos != std::string::npos)
    +    aliasStr = sql.substr(i - sql.begin(), fromPos);
    +  else
    +    aliasStr = sql.substr(i - sql.begin());
    +
    +  typedef std::vector<boost::iterator_range<std::string::iterator> >
    +    SplitVector;
    +
    +  SplitVector aliases;
    +  boost::split(aliases, aliasStr, boost::is_any_of(","));
    +
    +  fieldLists.push_back(SelectFieldList());
    +
    +  int aliasStart = i - sql.begin();
    +  for (unsigned i = 0; i < aliases.size(); ++i) {
    +    std::string alias = std::string(aliases[i].begin(), aliases[i].end());
    +    std::string a1 = boost::trim_left_copy(alias);
    +    std::string a2 = boost::trim_right_copy(a1);
    +
    +    SelectField f;
    +    f.begin = aliasStart + (aliases[i].begin() - aliasStr.begin())
    +      + alias.size() - a1.size();
    +    f.end = f.begin + a2.size();
    +
    +    fieldLists.back().push_back(f);
    +  }
    +}
    +
    +#else // SPIRIT_QUERY_PARSE
    +
    +namespace qi = boost::spirit::qi;
    +namespace ascii = boost::spirit::ascii;
    +namespace phoenix = boost::phoenix;
    +
    +/*
    + * Grammar that parses SQL select statements:
    + *
    + *   http://www.sqlite.org/lang_select.html
    + *   http://www.postgresql.org/docs/8.4/static/queries-with.html
    + */
    +template <typename Iterator>
    +struct sql_query_grammar : qi::grammar<Iterator, ascii::space_type>
    +{
    +  typedef sql_query_grammar<Iterator> Self;
    +
    +  sql_query_grammar(Iterator parseBegin, SelectFieldLists& fieldLists,
    +		    bool& simpleSelectCount)
    +    : sql_query_grammar::base_type(query_expression),
    +      parseBegin_(parseBegin),
    +      fieldLists_(fieldLists),
    +      simpleSelectCount_(simpleSelectCount)
    +  {
    +    using qi::lit;
    +    using qi::lexeme;
    +    using qi::no_case;
    +    using qi::raw;
    +    using qi::on_error;
    +    using qi::fail;
    +    using ascii::char_;
    +    using ascii::graph;
    +
    +    using phoenix::construct;
    +    using phoenix::val;
    +    using phoenix::throw_;
    +
    +    query_expression 
    +      = select_expression % compound_operator[
    +					      boost::bind(&Self::notSimple,this)
    +					      ]
    +      ;
    +
    +    select_expression 
    +      = with_clause
    +        >> no_case["select"][
    +			     boost::bind(&Self::handleSelect, this)
    +			     ]
    +	>> -( no_case["distinct"][
    +				  boost::bind(&Self::notSimple,this)
    +				  ]
    +	      | no_case["all"][
    +			       boost::bind(&Self::notSimple,this)
    +			       ]
    +	      )
    +	>> fields
    +	>> -( no_case["from"] > from_clause )
    +      ;
    +
    +    compound_operator
    +      = ( no_case["union"] >> -no_case["all"] )
    +      | no_case["intersect"]
    +      | no_case["except"]
    +      ;
    +
    +    with_clause
    +      = *(sql_word[
    +		   boost::bind(&Self::notSimple, this)
    +		   ] - no_case["select"])
    +      ;
    +
    +    from_clause
    +      = +(sql_word - compound_operator)
    +      ;
    +
    +    fields
    +      = raw[field][
    +		   boost::bind(&Self::handleField, this, _1)
    +		   ] 
    +        % ','
    +      ;
    +
    +    field
    +      = *(sql_word - (no_case["from"] | lit(',')))
    +      ;
    +
    +    sql_word
    +      = ',' | identifier | sub_expression
    +      ;
    +
    +    sub_expression
    +      = '(' > *sql_word > ')'
    +      ;
    +
    +    identifier
    +      = squoted
    +      | dquoted
    +      | other;
    +
    +    squoted = lexeme[ '\'' > ( *(char_ - '\'') % "''" ) > '\'' ];
    +    dquoted = lexeme[ '"' > *(char_ - '"') > '"' ];
    +    other = lexeme[ +(graph - special) ];
    +    special = char_("()'\",");
    +
    +    /*
    +    on_error<fail>
    +      (query_expression,
    +       throw_(construct<std::logic_error>
    +	      (val("Error parsing SQL query: Expected ")
    +	       + boost::spirit::_4
    +	       + val(" here: \"")
    +	       + construct<std::string>(boost::spirit::_3, boost::spirit::_2)
    +	       + val("\""))));
    +    */
    +    on_error<fail>
    +      (query_expression,
    +       std::cerr 
    +       << val("Error parsing SQL query: Expected ")
    +       << boost::spirit::_4
    +       << val(" here: \"")
    +       << construct<std::string>(boost::spirit::_3, boost::spirit::_2)
    +       << val("\"")
    +       << std::endl);
    +
    +    simpleSelectCount_ = true;
    +  }
    +
    +  Iterator parseBegin_;
    +  SelectFieldLists& fieldLists_;
    +  bool& simpleSelectCount_;
    +
    +  qi::rule<Iterator, ascii::space_type> query_expression,
    +    select_expression, compound_operator, with_clause, from_clause,
    +    fields, field, sql_word, sub_expression, identifier, squoted, dquoted,
    +    other;
    +
    +  qi::rule<Iterator> special;
    +
    +  void notSimple()
    +  {
    +    simpleSelectCount_ = false;
    +  }
    +
    +  void handleSelect()
    +  {
    +    fieldLists_.push_back(SelectFieldList());
    +  }
    +  
    +  void handleField(const boost::iterator_range<std::string::const_iterator>& s)
    +  {
    +    SelectField field;
    +    field.begin = s.begin() - parseBegin_;
    +    field.end = s.end() - parseBegin_;
    +    fieldLists_.back().push_back(field);
    +  }
    +};
    +
    +void parseSql(const std::string& sql, SelectFieldLists& fieldLists,
    +	      bool& simpleSelectCount)
    +{
    +  std::string::const_iterator iter = sql.begin();
    +  std::string::const_iterator end = sql.end();
    +
    +  sql_query_grammar<std::string::const_iterator>
    +    sql_grammar(iter, fieldLists, simpleSelectCount);
    +
    +  bool success = qi::phrase_parse(iter, end, sql_grammar, ascii::space);
    +
    +  if (success) {
    +    if (iter != end)
    +      throw std::logic_error("Error parsing SQL query: Expected end here:\""
    +			     + std::string(iter, end) + "\"");
    +  } else
    +    throw std::logic_error("Error parsing SQL query: \""
    +			   + sql + "\"");
    +}
    +
    +#endif // SPIRIT_QUERY_PARSE
    +
    +    }
    +  }
    +}
    +				 
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlStatement b/wt-3.1.7a/src/Wt/Dbo/SqlStatement
    new file mode 100644
    index 0000000..0255c40
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlStatement
    @@ -0,0 +1,207 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SQL_STATEMENT_H_
    +#define WT_DBO_SQL_STATEMENT_H_
    +
    +#include <string>
    +#include <vector>
    +
    +#include <boost/date_time/posix_time/posix_time_types.hpp>
    +#include <Wt/Dbo/SqlConnection>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +/*! \brief Abstract base class for a prepared SQL statement.
    + *
    + * The statement may be used multiple times, but cannot be used
    + * concurrently. It also cannot be copied.
    + *
    + * This class is part of Wt::Dbo's backend API, and should not be used
    + * directly. Its interface must be reimplemented for each backend
    + * corresponding to a supported database.
    + *
    + * \sa SqlConnection
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API SqlStatement
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~SqlStatement();
    +
    +  /*! \brief Uses the statement.
    +   *
    +   * Marks the statement as in-use. If the statement is already in
    +   * use, return false. In that case, we will later provision that a
    +   * statement can be cloned and that a list of equivalent statement
    +   * is kept in the statement cache of a connectin.
    +   */
    +  bool use();
    +
    +  /*! \brief Finish statement use.
    +   *
    +   * Marks the statement as no longer used and resets the statement.
    +   *
    +   * \sa use()
    +   */
    +  void done();
    +
    +  /*! \brief Resets the statement.
    +   */
    +  virtual void reset() = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, const std::string& value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, short value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, int value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, long long value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, float value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, double value) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, const boost::posix_time::ptime& value,
    +		    SqlDateTimeType type) = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, const boost::posix_time::time_duration& value)
    +    = 0;
    +
    +  /*! \brief Binds a value to a column.
    +   */
    +  virtual void bind(int column, const std::vector<unsigned char>& value) = 0;
    +
    +  /*! \brief Binds \c null to a column.
    +   */
    +  virtual void bindNull(int column) = 0;
    +
    +  /*! \brief Executes the statement.
    +   */
    +  virtual void execute() = 0;
    +
    +  /*! \brief Returns the id if the statement was an SQL <tt>insert</tt>.
    +   */
    +  virtual long long insertedId() = 0;
    +
    +  /*! \brief Returns the affected number of rows.
    +   *
    +   * This is only useful for an SQL <tt>update</tt> or <tt>delete</tt>
    +   * statement.
    +   */
    +  virtual int affectedRowCount() = 0;
    +
    +  /*! \brief Fetches the next result row.
    +   *
    +   * Returns \c true if there was one more row to be fetched.
    +   */
    +  virtual bool nextRow() = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, std::string *value, int size) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, short *value) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, int *value) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, long long *value) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, float *value) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, double *value) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, boost::posix_time::ptime *value,
    +			 SqlDateTimeType type) = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, boost::posix_time::time_duration *value)
    +    = 0;
    +
    +  /*! \brief Fetches a result value.
    +   *
    +   * Returns \c true when the value was not \c null.
    +   */
    +  virtual bool getResult(int column, std::vector<unsigned char> *value,
    +			 int size) = 0;
    +
    +  /*! \brief Returns the prepared SQL string.
    +   */
    +  virtual std::string sql() const = 0;
    +
    +protected:
    +  SqlStatement();
    +
    +private:
    +  SqlStatement(const SqlStatement&); // non-copyable
    +
    +  bool inuse_;
    +};
    +
    +class WTDBO_API ScopedStatementUse
    +{
    +public:
    +  ScopedStatementUse(SqlStatement *statement = 0);
    +  void operator()(SqlStatement *statement);
    +  ~ScopedStatementUse();
    +
    +private:
    +  SqlStatement *s_;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_STATEMENT_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlStatement.C b/wt-3.1.7a/src/Wt/Dbo/SqlStatement.C
    new file mode 100644
    index 0000000..bd2c41c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlStatement.C
    @@ -0,0 +1,50 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/SqlStatement"
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +SqlStatement::SqlStatement()
    +  : inuse_(false)
    +{ }
    +
    +SqlStatement::~SqlStatement()
    +{ }
    +
    +bool SqlStatement::use()
    +{
    +  if (!inuse_) {
    +    inuse_ = true;
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void SqlStatement::done()
    +{
    +  reset();
    +  inuse_ = false;
    +}
    +
    +ScopedStatementUse::ScopedStatementUse(SqlStatement *statement)
    +  : s_(statement)
    +{ }
    +
    +void ScopedStatementUse::operator()(SqlStatement *statement)
    +{
    +  s_ = statement;
    +}
    +
    +ScopedStatementUse::~ScopedStatementUse()
    +{
    +  if (s_)
    +    s_->done();
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlTraits b/wt-3.1.7a/src/Wt/Dbo/SqlTraits
    new file mode 100644
    index 0000000..57df3d8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlTraits
    @@ -0,0 +1,292 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SQL_TRAITS_H_
    +#define WT_DBO_SQL_TRAITS_H_
    +
    +#include <string>
    +#include <vector>
    +#include <boost/any.hpp>
    +
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class Session;
    +class SqlStatement;
    +
    +/*! \class sql_value_traits Wt/Dbo/SqlTraits Wt/Dbo/SqlTraits
    + *  \brief Traits class for value types.
    + *
    + * This traits class may be specialized for a custom type \p V, to add
    + * dbo support for custom types. A value type has a one-to-one mapping
    + * to a single database column.
    + *
    + * The library has built-in support for:
    + *  - std::string
    + *  - char const * (read-only: only as a bound parameter for a query)
    + *  - short, int, long, long long
    + *  - float, double
    + *  - enum types
    + *  - std::vector<unsigned char> (binary data)
    + *  - boost::optional<T>: to make the type optionally <tt>null</tt>
    + *
    + * In <Wt/Dbo/WtSqlTraits>, traits classes are also provided for:
    + *  - WDate
    + *  - WDateTime
    + *  - WTime
    + *  - WString
    + *
    + * \sa query_result_traits
    + *
    + * \ingroup dbo
    + */
    +template <typename V, class Enable = void>
    +struct sql_value_traits
    +{
    +  static const bool not_specialized = true;
    +
    +#ifdef DOXYGEN_ONLY
    +  /*! \brief Returns the SQL type name.
    +   *
    +   * The \p size (for strings) is a hint and may be ignored by a back-end.
    +   *
    +   * This will usually return a type ending with " not null" except
    +   * for C++ types that support \c null values. For a normal c++ value
    +   * type \p T, boost::optional<T> has been specialized to allow for
    +   * \c null values.
    +   */
    +  static const char *type(SqlConnection *connection, int size);
    +
    +  /*! \brief Binds a value to a statement parameter.
    +   *
    +   * The value \p v must be bound to parameter with index \p index in the
    +   * \p statement.
    +   *
    +   * \sa SqlStatement::bind()
    +   */
    +  static void bind(const V& v, SqlStatement *statement, int index, int size);
    +
    +  /*! \brief Reads a result from an executed query.
    +   *
    +   * The value \p v must be read from result column \p column in the \p
    +   * statement.
    +   *
    +   * Returns \c true if the value was not \c null. This result may be
    +   * used by the boost::optional<V> specialization to support fields that
    +   * may have \c null values.
    +   *
    +   * \sa SqlStatement::getResult()
    +   */
    +  static bool read(V& v, SqlStatement *statement, int column, int size);
    +#endif // DOXYGEN_ONLY
    +
    +  static void bind(const char *v, SqlStatement *statement, int column,
    +		   int size);
    +};
    +
    +/*! \class FieldInfo Wt/Dbo/SqlTraits Wt/Dbo/SqlTraits
    + *  \brief Description of a field.
    + *
    + * \sa query_result_traits::getFields(), Query::fields()
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API FieldInfo
    +{
    +public:
    +  /*! \brief Flags
    +   */
    +  enum Flags {
    +    SurrogateId = 0x1, //!< Field is a surrogate id
    +    NaturalId = 0x2,   //!< Field is (part of) a natural id
    +    Version = 0x4,     //!< Field is an optimistic concurrency version field
    +    Mutable = 0x8,     //!< Field can be edited
    +    NeedsQuotes = 0x10,//!< Field name needs quotes when using in SQL
    +    ForeignKey = 0x20, //!< Field is (part of) a foreign key
    +    FirstDboField = 0x40
    +  };
    +
    +  /*! \brief Creates a field description.
    +   */
    +  FieldInfo(const std::string& name, const std::type_info *type,
    +	    const std::string& sqlType, int flags);
    +
    +  /*! \brief Creates a field description.
    +   */
    +  FieldInfo(const std::string& name, const std::type_info *type,
    +	    const std::string& sqlType,
    +	    const std::string& foreignKeyTable,
    +	    const std::string& foreignKeyName,
    +	    int flags);
    +
    +  /*! \brief Sets a qualifier for the field.
    +   */
    +  void setQualifier(const std::string& qualifier, bool firstQualified = false);
    +
    +  /*! \brief Returns the field name.
    +   */
    +  const std::string& name() const { return name_; }
    +
    +  /*! \brief Returns the field SQL type.
    +   */
    +  const std::string& sqlType() const { return sqlType_; }
    +
    +  /*! \brief Returns the field qualifier.
    +   */
    +  const std::string& qualifier() const { return qualifier_; }
    +
    +  /*! \brief Returns the field type.
    +   */
    +  const std::type_info *type() const { return type_; }
    +
    +  /*! \brief Returns whether the field is an Id field.
    +   */
    +  bool isIdField() const { return (flags_ & (SurrogateId | NaturalId)) != 0; }
    +
    +  /*! \brief Returns whether the field is a Natural Id field.
    +   */
    +  bool isNaturalIdField() const { return (flags_ & NaturalId) != 0; }
    +
    +  /*! \brief Returns whether the field is a Surroaget Id field.
    +   */
    +  bool isSurrogateIdField() const { return flags_ & SurrogateId; }
    +
    +  /*! \brief Returns whether the field is a Version field.
    +   */
    +  bool isVersionField() const { return (flags_ & Version) != 0; }
    +
    +  /*! \brief Returns whether the field is mutable.
    +   */
    +  bool isMutable() const { return (flags_ & Mutable) != 0; }
    +
    +  /*! \brief Returns whether the field name needs to be quoted.
    +   */
    +  bool needsQuotes() const { return (flags_ & NeedsQuotes) != 0; }
    +
    +  /*! \brief Returns whether the field is part of a foreign key.
    +   */
    +  bool isForeignKey() const { return (flags_ & ForeignKey) != 0; }
    +
    +  bool isFirstDboField() const { return (flags_ & FirstDboField) != 0; }
    +  std::string foreignKeyName() const { return foreignKeyName_; }
    +  std::string foreignKeyTable() const { return foreignKeyTable_; }
    +
    +  std::string sql() const;
    +
    +private:
    +  std::string name_, sqlType_, qualifier_;
    +  std::string foreignKeyName_, foreignKeyTable_;
    +  const std::type_info *type_;
    +  int flags_;
    +};
    +
    +/*! \class query_result_traits Wt/Dbo/SqlTraits Wt/Dbo/SqlTraits
    + *  \brief Traits class for result types.
    + *
    + * This traits class may be used to add support for using classes or structs
    + * as a result for a Session::query().
    + *
    + * The library provides by default support for primitive types, using
    + * sql_value_traits, mapped objects held by ptr types, and
    + * boost::tuple<> of any combination of these.
    + *
    + * \sa sql_value_traits, ptr
    + *
    + * \ingroup dbo
    + */
    +template <typename Result>
    +struct query_result_traits
    +{
    +  /*! \brief Obtains the list of fields in this result.
    +   *
    +   * This is used to build the <i>select</i> clause of an Sql query.
    +   *
    +   * The given \p aliases may be used to qualify fields that correspond to
    +   * entire tables (popping values from the front of this vector). An
    +   * exception is thrown if not enough aliases were provided.
    +   *
    +   * This method is needed when you want to use Result as the result
    +   * of query.
    +   */
    +  static void getFields(Session& session,
    +			std::vector<std::string> *aliases,
    +			std::vector<FieldInfo>& result);
    +
    +  /*! \brief Reads a result from an executed query.
    +   *
    +   * This reads the value from the \p statement, starting at column \p
    +   * column, and advancing the column pointer for as many columns as
    +   * needed (and according to the number of fields returned by
    +   * getFields()).
    +   *
    +   * This method is needed when you want to use Result as the result
    +   * of query.
    +   */
    +  static Result load(Session& session, SqlStatement& statement,
    +		     int& column);
    +
    +  /*! \brief Returns result values.
    +   *
    +   * This returns the individual field values in the given \p result.
    +   *
    +   * This method needs to be implemented only if you want to display
    +   * the result in a QueryModel (which implements Wt's MVC item
    +   * model).
    +   */
    +  static void getValues(const Result& result, std::vector<boost::any>& values);
    +
    +  /*! \brief Sets a result value.
    +   *
    +   * Sets the value at \p index, where index indicates the field whose
    +   * value needs to be updated.
    +   *
    +   * When \p index is out-of-bounds, it should be decremented with as
    +   * many fields as there are in this result type. Otherwise, index
    +   * should be set to -1 after the value has been set.
    +   *
    +   * This method needs to be implemented only if you want to modify
    +   * the result from a QueryModel (which implements Wt's MVC item
    +   * model).
    +   */
    +  static void setValue(Result& result, int& index, const boost::any& value);
    +
    +  /*! \brief Creates a new result.
    +   *
    +   * Creates a new result. This should initialize a result so that its values
    +   * can be set using setValue() or read using getValues().
    +   *
    +   * The result should not yet be associated with a session.
    +   *
    +   * This method needs to be implemented only if you want to create
    +   * new results from a QueryModel (which implements Wt's MVC item
    +   * model).
    +   */
    +  static Result create();
    +
    +  /*! \brief Adds a new result to the session.
    +   *
    +   * Adds a (newly created) result to a session.
    +   *
    +   * This method needs to be implemented only if you want to create
    +   * new results from a QueryModel (which implements Wt's MVC item
    +   * model).
    +   */
    +  static void add(Session& session, Result& result);
    +
    +  /*! \brief Removes a result from the session.
    +   *
    +   * This method needs to be implemented only if you want to remove
    +   * results from a QueryModel (which implements Wt's MVC item model).
    +   */
    +  static void remove(Result& result);
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_TRAITS
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlTraits.C b/wt-3.1.7a/src/Wt/Dbo/SqlTraits.C
    new file mode 100644
    index 0000000..4fe61b0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlTraits.C
    @@ -0,0 +1,59 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/SqlTraits"
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +FieldInfo::FieldInfo(const std::string& name,
    +		     const std::type_info *type,
    +		     const std::string& sqlType,
    +		     int flags)
    +  : name_(name),
    +    sqlType_(sqlType),
    +    type_(type),
    +    flags_(flags)
    +{ }
    +
    +FieldInfo::FieldInfo(const std::string& name, const std::type_info *type,
    +		     const std::string& sqlType,
    +		     const std::string& foreignKeyTable,
    +		     const std::string& foreignKeyName,
    +		     int flags)
    +  : name_(name),
    +    sqlType_(sqlType),
    +    foreignKeyName_(foreignKeyName),
    +    foreignKeyTable_(foreignKeyTable),
    +    type_(type),
    +    flags_(flags)
    +{ }
    +
    +
    +void FieldInfo::setQualifier(const std::string& qualifier, bool firstDboField)
    +{
    +  qualifier_ = qualifier;
    +  if (firstDboField)
    +    flags_ |= FirstDboField;
    +}
    +
    +std::string FieldInfo::sql() const
    +{
    +  std::string result;
    +
    +  if (!qualifier_.empty())
    +    result = qualifier_ + '.';
    +
    +  if (needsQuotes())
    +    result += '"' + name() + '"';
    +  else
    +    result += name();
    +
    +  return result;
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/SqlTraits_impl.h b/wt-3.1.7a/src/Wt/Dbo/SqlTraits_impl.h
    new file mode 100644
    index 0000000..80ec68e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/SqlTraits_impl.h
    @@ -0,0 +1,84 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_SQL_TRAITS_IMPL_H_
    +#define WT_DBO_SQL_TRAITS_IMPL_H_
    +
    +#include <Wt/Dbo/SqlStatement>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <typename V, class Enable>
    +void sql_value_traits<V, Enable>::bind(const char *v, SqlStatement *statement,
    +				       int column, int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +template <typename Result>
    +void query_result_traits<Result>::getFields(Session& session,
    +					  std::vector<std::string> *aliases,
    +					  std::vector<FieldInfo>& result)
    +{
    +  /* Adds an immutable single value field */
    +
    +  if (!aliases || aliases->empty())
    +    throw std::logic_error("Session::query(): not enough aliases for results");
    +  std::string name = aliases->front();
    +  aliases->erase(aliases->begin());
    +
    +  std::string sqlType = "??"; // FIXME, get from session ?
    +
    +  result.push_back(FieldInfo(name, &typeid(Result), sqlType, 0));
    +}
    +
    +template <typename Result>
    +Result query_result_traits<Result>::load(Session& session,
    +				       SqlStatement& statement,
    +				       int& column)
    +{
    +  Result result;
    +  sql_value_traits<Result>::read(result, &statement, column++, -1);
    +  return result;
    +}
    +
    +template <typename Result>
    +void query_result_traits<Result>::getValues(const Result& result,
    +					    std::vector<boost::any>& values)
    +{
    +  values.push_back(result);
    +}
    +
    +template <typename Result>
    +void query_result_traits<Result>::setValue(Result& result,
    +					   int& index, const boost::any& value)
    +{
    +  if (index == 0)
    +    result = boost::any_cast<Result>(value);
    +  --index;
    +}
    +
    +template <typename Result>
    +Result query_result_traits<Result>::create()
    +{
    +  return Result();
    +}
    +
    +template <typename Result>
    +void query_result_traits<Result>::add(Session& session, Result& result)
    +{
    +}
    +
    +template <typename Result>
    +void query_result_traits<Result>::remove(Result& result)
    +{
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_SQL_TRAITS_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits b/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits
    new file mode 100644
    index 0000000..4fe6b1a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits
    @@ -0,0 +1,149 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_STD_SQL_TRAITS_H_
    +#define WT_DBO_STD_SQL_TRAITS_H_
    +
    +#include <string>
    +#include <vector>
    +#include <Wt/Dbo/SqlTraits>
    +#include <Wt/Dbo/SqlStatement>
    +
    +#include <boost/optional.hpp>
    +#include <boost/utility/enable_if.hpp>
    +#include <boost/type_traits/is_enum.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template<>
    +struct WTDBO_API sql_value_traits<std::string, void>
    +{
    +  static const bool specialized = true;
    +
    +  static std::string type(SqlConnection *conn, int size);
    +  static void bind(const std::string& v, SqlStatement *statement, int column,
    +		   int size);
    +  static bool read(std::string& v, SqlStatement *statement, int column,
    +		   int size);
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<long long, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(long long v, SqlStatement *statement, int column, int size);
    +  static bool read(long long& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<int, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(int v, SqlStatement *statement, int column, int size);
    +  static bool read(int& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<short, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(short v, SqlStatement *statement, int column, int size);
    +  static bool read(short& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<float, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(float v, SqlStatement *statement, int column, int size);
    +  static bool read(float& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<double, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(double v, SqlStatement *statement, int column, int size);
    +  static bool read(double& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template <typename Enum>
    +struct WTDBO_API sql_value_traits<Enum,
    +			typename boost::enable_if<boost::is_enum<Enum> >::type> 
    +: public sql_value_traits<int>
    +{
    +  static void bind(Enum v, SqlStatement *statement, int column, int size) {
    +    sql_value_traits<int>::bind(static_cast<int>(v), statement, column, size);
    +  }
    +
    +  static bool read(Enum& v, SqlStatement *statement, int column, int size) {
    +    return sql_value_traits<int>::read(reinterpret_cast<int&>(v), statement,
    +				       column, size);
    +  }
    +};
    +
    +template<>
    +struct WTDBO_API sql_value_traits<std::vector<unsigned char>, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(const std::vector<unsigned char>& v,
    +		   SqlStatement *statement, int column, int size);
    +  static bool read(std::vector<unsigned char>& v, SqlStatement *statement,
    +		   int column, int size);
    +};
    +
    +template<typename T>
    +struct sql_value_traits<boost::optional<T>, void>
    +{
    +  static const bool specialized = true;
    +
    +  static std::string type(SqlConnection *conn, int size) {
    +    std::string nested = sql_value_traits<T>::type(conn, size);
    +    if (nested.length() > 9
    +	&& nested.substr(nested.length() - 9) == " not null")
    +      return nested.substr(0, nested.length() - 9);
    +    else
    +      return nested;
    +  }
    +
    +  static void bind(const boost::optional<T>& v,
    +		   SqlStatement *statement, int column, int size) {
    +    if (v)
    +      sql_value_traits<T>::bind(v.get(), statement, column, size);
    +    else
    +      statement->bindNull(column);
    +  }
    +
    +  static bool read(boost::optional<T>& v, SqlStatement *statement, int column,
    +                   int size) {
    +    T result;
    +    if (sql_value_traits<T>::read(result, statement, column, size)) {
    +      v = result;
    +      return true;
    +    } else {
    +      v = boost::optional<T>();
    +      return false;
    +    }
    +  }
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_STD_SQL_TRAITS_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits.C b/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits.C
    new file mode 100644
    index 0000000..140723d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/StdSqlTraits.C
    @@ -0,0 +1,153 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/StdSqlTraits"
    +#include "Wt/Dbo/SqlStatement"
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#ifndef DOXYGEN_ONLY
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +std::string sql_value_traits<std::string>::type(SqlConnection *conn, int size)
    +{
    +  if (size == -1)
    +    return "text not null";
    +  else
    +    return "varchar(" + boost::lexical_cast<std::string>(size) + ") not null";
    +}
    +
    +void sql_value_traits<std::string>::bind(const std::string& v,
    +					 SqlStatement *statement, int column,
    +					 int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<std::string>::read(std::string& v,
    +					 SqlStatement *statement, int column,
    +					 int size)
    +{
    +  if (!statement->getResult(column, &v, size)) {
    +    v.clear();
    +    return false;
    +  } else
    +    return true;
    +}
    +
    +const char *sql_value_traits<long long>::type(SqlConnection *conn, int size)
    +{
    +  return "bigint not null";
    +}
    +
    +void sql_value_traits<long long>::bind(long long v,
    +				       SqlStatement *statement, int column,
    +				       int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<long long>::read(long long& v,
    +				       SqlStatement *statement, int column,
    +				       int size)
    +{
    +  return statement->getResult(column, &v);
    +}
    +const char *sql_value_traits<int>::type(SqlConnection *conn, int size)
    +{
    +  return "integer not null";
    +}
    +
    +void sql_value_traits<int>::bind(int v, SqlStatement *statement, int column,
    +				 int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<int>::read(int& v, SqlStatement *statement, int column,
    +				 int size)
    +{
    +  return statement->getResult(column, &v);
    +}
    +
    +const char *sql_value_traits<short>::type(SqlConnection *conn,
    +					  int size)
    +{
    +  return "smallint not null";
    +}
    +
    +void sql_value_traits<short>::bind(short v, SqlStatement *statement, int column,
    +				   int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<short>::read(short& v, SqlStatement *statement,
    +				   int column, int size)
    +{
    +  return statement->getResult(column, &v);
    +}
    +
    +const char *sql_value_traits<float>::type(SqlConnection *conn, int size)
    +{
    +  return "real not null";
    +}
    +
    +void sql_value_traits<float>::bind(float v, SqlStatement *statement,
    +				   int column, int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<float>::read(float& v, SqlStatement *statement,
    +				   int column, int size)
    +{
    +  return statement->getResult(column, &v);
    +}
    +
    +const char *sql_value_traits<double>::type(SqlConnection *conn, int size)
    +{
    +  return "double precision not null";
    +}
    +
    +void sql_value_traits<double>::bind(double v, SqlStatement *statement,
    +				    int column, int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<double>::read(double& v, SqlStatement *statement,
    +				    int column, int size)
    +{
    +  return statement->getResult(column, &v);
    +}
    +
    +const char *sql_value_traits<std::vector<unsigned char> >
    +::type(SqlConnection *conn, int size)
    +{
    +  return conn->blobType();
    +}
    +
    +void sql_value_traits<std::vector<unsigned char> >
    +::bind(const std::vector<unsigned char>& v, SqlStatement *statement,
    +       int column, int size)
    +{
    +  statement->bind(column, v);
    +}
    +
    +bool sql_value_traits<std::vector<unsigned char> >
    +::read(std::vector<unsigned char>& v, SqlStatement *statement, int column,
    +       int size)
    +{
    +  return statement->getResult(column, &v, size);
    +}
    +
    +  }
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Transaction b/wt-3.1.7a/src/Wt/Dbo/Transaction
    new file mode 100644
    index 0000000..4c64ea3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Transaction
    @@ -0,0 +1,137 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_TRANSACTION_H_
    +#define WT_DBO_TRANSACTION_H_
    +
    +#include <vector>
    +#include <Wt/Dbo/WDboDllDefs.h>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +class Session;
    +class SqlConnection;
    +
    +class ptr_base;
    +
    +/*! \class Transaction Wt/Dbo/Transaction Wt/Dbo/Transaction
    + *  \brief A database transaction.
    + * 
    + * This class implements a RAII transaction. Most dbo manipulations
    + * require that a transaction is active, and database changes will not
    + * be committed to the database until the active transaction is
    + * committed using commit().
    + *
    + * A transaction is active until it is either committed or rolled
    + * back. When a transaction is rolled back or fails, the modified
    + * database objects are not successfully synchronized with the
    + * database. The in memory database objects remain unchanged so
    + * they may possibly be synchronized later in a new transaction.
    + *
    + * In most occasions you will want to guard a single method with a
    + * transaction object on the stack. Unless the object is committed
    + * before returning from the method, the transaction will be rolled
    + * back.
    + *
    + * You may create multiple (nested) transaction objects at the same
    + * time: in this way you can guard a method with a transaction object
    + * even if it is called from another method which also defines a
    + * transaction with a wider scope. Nested transactions act in concert
    + * and reference the same logical transaction: the logical transaction
    + * will fail if at least one transaction fails, and will be committed only
    + * if all transactions are committed.
    + *
    + * Usage example:
    + * \code
    + * void doSomething(Wt::Dbo::Session& session)
    + * {
    + *   Wt::Dbo::Transaction transaction(session);
    + *
    + *   Wt::Dbo::ptr<Account> a = session.load<Account>(42);
    + *   ...
    + *
    + *   transaction.commit();
    + * }
    + * \endcode
    + *
    + * \ingroup dbo
    + */
    +class WTDBO_API Transaction
    +{
    +public:
    +  /*! \brief Constructor.
    +   *
    +   * Opens a transaction for the given \p session. If a transaction is
    +   * already open for the session, this transaction is added. All open
    +   * transactions must commit successfully for the entire transaction to
    +   * succeed.
    +   */
    +  explicit Transaction(Session& session);
    +
    +  /*! \brief Destructor.
    +   *
    +   * If the transaction is still active, it is rolled back.
    +   */
    +  ~Transaction();
    +
    +  /*! \brief Returns whether the transaction is still active.
    +   *
    +   * A transaction is active unless it has been committed or rolled
    +   * back.
    +   *
    +   * While a transaction is active, new transactions for the same
    +   * session are treated as nested transactions.
    +   */
    +  bool isActive() const;
    +
    +  /*! \brief Commits the transaction.
    +   *
    +   * If this is the last open transaction for the session, the session
    +   * is flushed and pending changes are committed to the database.
    +   *
    +   * Returns whether the transaction was flushed to the database
    +   * (i.e. whether this was indeed the last open transaction).
    +   *
    +   * \sa rollback()
    +   */
    +  bool commit();
    +
    +  /*! \brief Rolls back the transaction.
    +   *
    +   * \sa commit(), ~Transaction()
    +   */
    +  void rollback();
    +
    +private:
    +  struct Impl {
    +    Session& session_;
    +    bool active_;
    +    bool open_;
    +
    +    int transactionCount_;
    +    std::vector<ptr_base *> objects_;
    +
    +    SqlConnection *connection_;
    +
    +    void open();
    +    void commit();
    +    void rollback();
    +
    +    Impl(Session& session_);
    +  };
    +
    +  bool committed_;
    +  Session& session_;
    +  Impl *impl_;
    +
    +  friend class Session;
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_TRANSACTION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Transaction.C b/wt-3.1.7a/src/Wt/Dbo/Transaction.C
    new file mode 100644
    index 0000000..b9b1ac7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Transaction.C
    @@ -0,0 +1,132 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +
    +#include "Wt/Dbo/Transaction"
    +#include "Wt/Dbo/SqlConnection"
    +#include "Wt/Dbo/Session"
    +#include "Wt/Dbo/ptr"
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +Transaction::Transaction(Session& session)
    +  : committed_(false),
    +    session_(session)
    +{ 
    +  if (!session_.transaction_)
    +    session_.transaction_ = new Impl(session_);
    +
    +  impl_ = session_.transaction_;
    +
    +  ++impl_->transactionCount_;
    +}
    +
    +Transaction::~Transaction()
    +{
    +  --impl_->transactionCount_;
    +
    +  // Either this Transaction shell was not committed, or the commit failed.
    +  if (!committed_ || (impl_->transactionCount_ == 0 && isActive())) {
    +    try {
    +      rollback();
    +      if (impl_->transactionCount_ == 0)
    +	delete impl_;
    +    } catch (std::exception& e) {
    +      if (impl_->transactionCount_ == 0)
    +	delete impl_;
    +      throw e;
    +    }
    +  } else if (impl_->transactionCount_ == 0)
    +    delete impl_;
    +}
    +
    +bool Transaction::isActive() const
    +{
    +  return impl_->active_;
    +}
    +
    +bool Transaction::commit()
    +{
    +  if (isActive()) {
    +    committed_ = true;
    +
    +    if (impl_->transactionCount_ == 1) {
    +      impl_->commit();
    +
    +      return true;
    +    } else
    +      return false;
    +  } else
    +    return false;
    +}
    +
    +void Transaction::rollback()
    +{
    +  if (isActive())
    +    impl_->rollback();
    +}
    +
    +Transaction::Impl::Impl(Session& session)
    +  : session_(session),
    +    active_(true),
    +    open_(false),
    +    transactionCount_(0)
    +{ 
    +  connection_ = session_.useConnection();
    +}
    +
    +void Transaction::Impl::open()
    +{
    +  if (!open_) {
    +    open_ = true;
    +    connection_->startTransaction();
    +  }
    +}
    +
    +void Transaction::Impl::commit()
    +{
    +  session_.flush();
    +
    +  for (unsigned i = 0; i < objects_.size(); ++i) {
    +    objects_[i]->transactionDone(true);
    +    delete objects_[i];
    +  }
    +
    +  if (open_)
    +    connection_->commitTransaction();
    +
    +  session_.returnConnection(connection_);
    +  session_.transaction_ = 0;
    +  active_ = false;
    +
    +  objects_.clear();
    +}
    +
    +void Transaction::Impl::rollback()
    +{
    +  try {
    +    if (open_)
    +      connection_->rollbackTransaction();
    +  } catch (const std::exception& e) {
    +    std::cerr << "Transaction::rollback(): " << e.what() << std::endl;
    +  }
    +
    +  for (unsigned i = 0; i < objects_.size(); ++i) {
    +    objects_[i]->transactionDone(false);
    +    delete objects_[i];
    +  }
    +
    +  session_.returnConnection(connection_);
    +  session_.transaction_ = 0;
    +  active_ = false;
    +
    +  objects_.clear();
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/Types b/wt-3.1.7a/src/Wt/Dbo/Types
    new file mode 100644
    index 0000000..023a520
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/Types
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_TYPES_H_
    +#define WT_DBO_TYPES_H_
    +
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/collection>
    +#include <Wt/Dbo/Call>
    +#include <Wt/Dbo/DbAction>
    +#include <Wt/Dbo/Field>
    +#include <Wt/Dbo/Query>
    +#include <Wt/Dbo/Session>
    +#include <Wt/Dbo/StdSqlTraits>
    +#include <Wt/Dbo/ptr_tuple>
    +
    +#include <Wt/Dbo/Query_impl.h>
    +
    +#if !defined(_MSC_VER) && !defined(__SUNPRO_C)
    +#define DBO_EXTERN_TEMPLATES(C)						\
    +  extern template class Wt::Dbo::ptr<C>;				\
    +  extern template class Wt::Dbo::Dbo<C>;				\
    +  extern template class Wt::Dbo::MetaDbo<C>;				\
    +  extern template class Wt::Dbo::collection< Wt::Dbo::ptr<C> >;		\
    +  extern template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,		\
    +					Wt::Dbo::DynamicBinding >;	\
    +  extern template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,		\
    +					Wt::Dbo::DirectBinding >;	\
    +  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(ptr<C>&);	\
    +  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(C *);	\
    +  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::load<C>		\
    +  	(const dbo_traits<C>::IdType&);					\
    +  extern template void Wt::Dbo::Session::mapClass<C>(const char *);	\
    +  extern template struct Wt::Dbo::Session::Mapping<C>;			\
    +  extern template Wt::Dbo::Query< Wt::Dbo::ptr<C>,			\
    +				  Wt::Dbo::DynamicBinding>		\
    +	Wt::Dbo::Session::find<C, Wt::Dbo::DynamicBinding>		\
    +	(const std::string&);						\
    +  extern template Wt::Dbo::Query< Wt::Dbo::ptr<C>,			\
    +				  Wt::Dbo::DirectBinding>		\
    +	Wt::Dbo::Session::find<C, Wt::Dbo::DirectBinding>		\
    +	(const std::string&);
    +
    +#else
    +// Broken on MSVC 2005 and 2008 (cannot redeclare extern declared template
    +// methods to be defined after all)
    +// Broken on SUN StudioExpress
    +#define DBO_EXTERN_TEMPLATES(C)
    +#include <Wt/Dbo/Impl>
    +#endif
    +
    +#endif // WT_DBO_TYPES_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/WDboDllDefs.h b/wt-3.1.7a/src/Wt/Dbo/WDboDllDefs.h
    new file mode 100644
    index 0000000..efec8d1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/WDboDllDefs.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2006 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDBODLLDEFS_H_
    +#define WDBODLLDEFS_H_
    +
    +#include <Wt/WConfig.h>
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WTDBO_IMPORT __declspec(dllimport)
    +  #define WTDBO_EXPORT __declspec(dllexport)
    +  #define WTDBO_DLLLOCAL
    +  #define WTDBO_DLLPUBLIC
    +#else
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WTDBO_IMPORT __attribute__ ((visibility("default")))
    +    #define WTDBO_EXPORT __attribute__ ((visibility("default")))
    +    #define WTDBO_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WTDBO_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WTDBO_IMPORT
    +    #define WTDBO_EXPORT
    +    #define WTDBO_DLLLOCAL
    +    #define WTDBO_DLLPUBLIC
    +  #endif
    +#endif
    +
    +// Define wt_EXPORTS for DLL builds
    +#ifdef WIN32
    +  #ifdef wtdbo_EXPORTS
    +    #define WTDBO_API WTDBO_EXPORT
    +  #else
    +    #ifdef WTDBO_STATIC
    +      #define WTDBO_API
    +    #else
    +      #define WTDBO_API WTDBO_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WTDBO_API
    +#endif
    +
    +#endif // DLLDEFS_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits b/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits
    new file mode 100644
    index 0000000..e373f91
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits
    @@ -0,0 +1,223 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_WT_TYPE_TRAITS_H_
    +#define WT_DBO_WT_TYPE_TRAITS_H_
    +
    +#include <string>
    +
    +#include <Wt/WDate>
    +#include <Wt/WDateTime>
    +#include <Wt/WTime>
    +#include <Wt/WString>
    +
    +#include <Wt/Dbo/SqlTraits>
    +#include <Wt/Dbo/SqlStatement>
    +
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template<>
    +struct sql_value_traits<WDate, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *format;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(const WDate& v, SqlStatement *statement, int column, int size);
    +  static bool read(WDate& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct sql_value_traits<WDateTime, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(const WDateTime& v, SqlStatement *statement, int column,
    +		   int size);
    +  static bool read(WDateTime& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct sql_value_traits<WTime, void>
    +{
    +  static const bool specialized = true;
    +
    +  static const char *format;
    +
    +  static const char *type(SqlConnection *conn, int size);
    +  static void bind(const WTime& v, SqlStatement *statement, int column, int size);
    +  static bool read(WTime& v, SqlStatement *statement, int column, int size);
    +};
    +
    +template<>
    +struct sql_value_traits<WString, void>
    +{
    +  static const bool specialized = true;
    +
    +  static std::string type(SqlConnection *conn, int size);
    +  static void bind(const WString& v, SqlStatement *statement, int column,
    +		   int size);
    +  static bool read(WString& v, SqlStatement *statement, int column, int size);
    +};
    +
    +    /*
    +     * WDate
    +     */
    +
    +inline const char *sql_value_traits<WDate, void>::type(SqlConnection *conn,
    +						       int size)
    +{
    +  return conn->dateTimeType(SqlDate);
    +}
    +
    +inline void sql_value_traits<WDate, void>
    +::bind(const WDate& v, SqlStatement *statement, int column, int size)
    +{
    +  if (v.isNull())
    +    statement->bindNull(column);
    +  else
    +    statement->bind(column, Wt::WDateTime(v).toPosixTime(), SqlDate);
    +}
    +
    +inline bool sql_value_traits<WDate, void>
    +::read(WDate& v, SqlStatement *statement, int column, int size)
    +{
    +  boost::posix_time::ptime t;
    +
    +  if (statement->getResult(column, &t, SqlDate)) {
    +    boost::gregorian::date d = t.date();
    +    v.setDate(d.year(), d.month(), d.day());
    +    return true;
    +  } else {
    +    v = WDate();
    +    return false;
    +  }
    +}
    +
    +    /*
    +     * WTime
    +     */
    +
    +inline const char *sql_value_traits<WTime, void>::type(SqlConnection *conn,
    +						       int size)
    +{
    +  return conn->dateTimeType(SqlTime);
    +}
    +
    +inline void sql_value_traits<WTime, void>
    +::bind(const WTime& v, SqlStatement *statement, int column, int size)
    +{
    +  if (v.isNull())
    +    statement->bindNull(column);
    +  else {
    +    boost::posix_time::time_duration::fractional_seconds_type ticks_per_msec =
    +      boost::posix_time::time_duration::ticks_per_second() / 1000;
    +
    +    statement->bind
    +      (column,
    +       boost::posix_time::time_duration(v.hour(), v.minute(), v.second(),
    +					v.msec() * ticks_per_msec));
    +  }
    +}
    +
    +inline bool sql_value_traits<WTime, void>
    +::read(WTime& v, SqlStatement *statement, int column, int size)
    +{
    +  boost::posix_time::time_duration t;
    + 
    +  if (statement->getResult(column, &t)) {
    +    int h = t.hours();
    +    int m = t.minutes();
    +    int s = t.seconds();
    +    int ms = static_cast<int>(t.total_milliseconds() % 1000);
    +
    +    if (!v.setHMS (h, m, s, ms)) {
    +      std::cerr << "Wt::Dbo: WTime can only hold durations < 24h"
    +		<< std::endl;
    +      return true;
    +    } else
    +      return false;
    +
    +  } else {
    +    v = WTime();
    +    return false;
    +  }
    +}
    +
    +    /*
    +     * WDateTime
    +     */
    +
    +inline const char *sql_value_traits<WDateTime, void>::type(SqlConnection *conn,
    +							   int size)
    +{
    +  return conn->dateTimeType(SqlDateTime);
    +}
    +
    +inline void sql_value_traits<WDateTime, void>
    +::bind(const WDateTime& v, SqlStatement *statement, int column, int size)
    +{
    +  if (v.isNull())
    +    statement->bindNull(column);
    +  else
    +    statement->bind(column, v.toPosixTime(), SqlDateTime);
    +}
    +
    +inline bool sql_value_traits<WDateTime, void>
    +::read(WDateTime& v, SqlStatement *statement, int column, int size)
    +{
    +  boost::posix_time::ptime t;
    +
    +  if (statement->getResult(column, &t, SqlDateTime)) {
    +    v = WDateTime::fromPosixTime(t);
    +    return true;
    +  } else {
    +    v = WDateTime();
    +    return false;
    +  }
    +}
    +
    +    /*
    +     * WString
    +     */
    +
    +inline std::string sql_value_traits<WString, void>::type(SqlConnection *conn,
    +							 int size)
    +{
    +  if (size == -1)
    +    return "text not null";
    +  else
    +    return "varchar(" + boost::lexical_cast<std::string>(size) + ") not null";
    +}
    +
    +inline void sql_value_traits<WString, void>
    +::bind(const WString& v, SqlStatement *statement, int column, int size)
    +{
    +  statement->bind(column, v.toUTF8());
    +}
    +
    +inline bool sql_value_traits<WString, void>
    +::read(WString& v, SqlStatement *statement, int column, int size)
    +{
    +  std::string d;
    +  if (statement->getResult(column, &d, size)) {
    +    v = WString::fromUTF8(d);
    +    return true;
    +  } else {
    +    v = WString::Empty;
    +    return false;
    +  }
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_WT_TYPE_TRAITS_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits.C b/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits.C
    new file mode 100644
    index 0000000..fab14b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/WtSqlTraits.C
    @@ -0,0 +1,7 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/CMakeLists.txt b/wt-3.1.7a/src/Wt/Dbo/backend/CMakeLists.txt
    new file mode 100644
    index 0000000..d8ab954
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/CMakeLists.txt
    @@ -0,0 +1,85 @@
    +IF(ENABLE_SQLITE)
    +
    +  OPTION(USE_SYSTEM_SQLITE3 "Use system-wide Sqlite3 instead of Wt's version" OFF)
    +
    +  IF(USE_SYSTEM_SQLITE3)
    +    FIND_PACKAGE( Sqlite3 REQUIRED)
    +  ELSE(USE_SYSTEM_SQLITE3)
    +    SET(Sqlite3_SRCS amalgamation/sqlite3.c)
    +  ENDIF(USE_SYSTEM_SQLITE3)
    +
    +  SET(HAVE_SQLITE true)
    +
    +  ADD_LIBRARY(wtdbosqlite3
    +    Sqlite3.C
    +    ${Sqlite3_SRCS}
    +    )
    +
    +  MESSAGE("** Wt::Dbo: building SQLite3 backend.")
    +
    +  TARGET_LINK_LIBRARIES(wtdbosqlite3 wtdbo ${SQLITE3_LIBRARIES} ${BOOST_DT_LIB})
    +
    +  IF(NOT WIN32)
    +    FIND_LIBRARY(DL_LIB
    +      NAMES
    +      dl
    +      )
    +    IF(DL_LIB)
    +      TARGET_LINK_LIBRARIES(wtdbosqlite3 ${DL_LIB})
    +    ENDIF(DL_LIB)
    +  ENDIF(NOT WIN32)
    +
    +  INSTALL(TARGETS wtdbosqlite3
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +  SET_TARGET_PROPERTIES(
    +    wtdbosqlite3
    +  PROPERTIES
    +    VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +    SOVERSION ${WTDBOSQLITE3_SOVERSION}
    +    DEBUG_POSTFIX "d"
    +    )
    +
    +  INSTALL_FILES(/include/Wt/Dbo/backend "^Sqlite3$")
    +  INSTALL_FILES(/include/Wt/Dbo/backend "^.*Sqlite3.*h$")
    +
    +ENDIF(ENABLE_SQLITE)
    +
    +IF(ENABLE_POSTGRES AND POSTGRES_FOUND)
    +
    +  SET(HAVE_POSTGRES true)
    +
    +  MESSAGE("** Wt::Dbo: building Postgres backend.")
    +  ADD_LIBRARY(wtdbopostgres
    +    Postgres.C
    +    )
    +  TARGET_LINK_LIBRARIES(wtdbopostgres wtdbo ${POSTGRES_LIBRARIES} ${BOOST_DT_LIB})
    +
    +  INCLUDE_DIRECTORIES(${POSTGRES_INCLUDE})
    +
    +  INSTALL(TARGETS wtdbopostgres
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +  SET_TARGET_PROPERTIES(
    +    wtdbopostgres
    +  PROPERTIES
    +    VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +    SOVERSION ${WTDBOPOSTGRES_SOVERSION}
    +    DEBUG_POSTFIX "d"
    +  )
    +
    +  INSTALL_FILES(/include/Wt/Dbo/backend "^Postgres$")
    +  INSTALL_FILES(/include/Wt/Dbo/backend "^.*Postgres.*h$")
    +ELSE(ENABLE_POSTGRES AND POSTGRES_FOUND)
    +  MESSAGE("** Wt::Dbo: not building Postgres backend.")
    +
    +  IF(ENABLE_POSTGRES)
    +    MESSAGE("    Indicate the location of your postgres installation using -DPOSTGRES_PREFIX=...")
    +  ENDIF(ENABLE_POSTGRES)
    +
    +ENDIF(ENABLE_POSTGRES AND POSTGRES_FOUND)
    +
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/MySQL.txt b/wt-3.1.7a/src/Wt/Dbo/backend/MySQL.txt
    new file mode 100644
    index 0000000..4a7716a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/MySQL.txt
    @@ -0,0 +1,3 @@
    +The MySQL backend is not redistributed with Wt because of license issues.
    +
    +A backend is maintained by the community and available from https://sourceforge.net/projects/wtdbomysql/
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/Postgres b/wt-3.1.7a/src/Wt/Dbo/backend/Postgres
    new file mode 100644
    index 0000000..e9061b1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/Postgres
    @@ -0,0 +1,95 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + *
    + * Contributed by: Hilary Cheng
    + */
    +#ifndef WT_DBO_BACKEND_POSTGRES_H_
    +#define WT_DBO_BACKEND_POSTGRES_H_
    +
    +#include <Wt/Dbo/SqlConnection>
    +#include <Wt/Dbo/SqlStatement>
    +#include <Wt/Dbo/backend/WDboPostgresDllDefs.h>
    +
    +struct pg_conn;
    +typedef struct pg_conn PGconn;
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace backend {
    +
    +/*! \class Postgres Wt/Dbo/backend/Postgres Wt/Dbo/backend/Postgres
    + *  \brief A PostgreSQL connection
    + *
    + * This class provides the backend implementation for PostgreSQL databases.
    + *
    + * \ingroup dbo
    + */
    +class WTDBOPOSTGRES_API Postgres : public SqlConnection
    +{
    +public:
    +  /*! \brief Creates new PostgreSQL backend connection.
    +   *
    +   * The connection is not yet open, and requires a connect() before it
    +   * can be used.
    +   */
    +  Postgres();
    +
    +  /*! \brief Opens a new PostgreSQL backend connection.
    +   *
    +   * The \p db may be any of the values supported by PQconnectdb().
    +   */
    +  Postgres(const std::string& db);
    +
    +  /*! \brief Copies a PostgreSQL connection.
    +   */
    +  Postgres(const Postgres& other);
    +
    +  /*! \brief Destructor.
    +   *
    +   * Closes the connection.
    +   */
    +  ~Postgres();
    +
    +  virtual Postgres *clone() const;
    +
    +  /*! \brief Tries to connect.
    +   *
    +   * Throws an exception if there was a problem, otherwise true.
    +   */
    +  bool connect(const std::string& db);
    +
    +  /*! \brief Returns the underlying connection.
    +   */
    +  PGconn *connection() { return conn_; }
    +
    +  virtual void executeSql(const std::string &sql);
    +
    +  virtual void startTransaction();
    +  virtual void commitTransaction();
    +  virtual void rollbackTransaction();
    +
    +  virtual SqlStatement *prepareStatement(const std::string& sql);
    +
    +  /** @name Methods that return dialect information
    +   */
    +  //@{
    +  virtual std::string autoincrementSql() const;
    +  virtual std::string autoincrementType() const;
    +  virtual std::string autoincrementInsertSuffix() const;
    +  virtual const char *dateTimeType(SqlDateTimeType type) const;
    +  virtual const char *blobType() const;
    +  //@}
    +
    +private:
    +  std::string connInfo_;
    +  PGconn *conn_;
    +};
    +
    +    }
    +  }
    +}
    +
    +#endif // WT_DBO_BACKEND_POSTGRES_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/Postgres.C b/wt-3.1.7a/src/Wt/Dbo/backend/Postgres.C
    new file mode 100644
    index 0000000..4338d0a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/Postgres.C
    @@ -0,0 +1,605 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + *
    + * Contributed by: Hilary Cheng
    + */
    +#include "Wt/Dbo/backend/Postgres"
    +#include "Wt/Dbo/Exception"
    +
    +#include <libpq-fe.h>
    +#include <boost/lexical_cast.hpp>
    +#include <iostream>
    +#include <vector>
    +#include <sstream>
    +
    +#include <boost/date_time/posix_time/posix_time.hpp>
    +#include <boost/date_time/gregorian/gregorian.hpp>
    +#include <boost/date_time/posix_time/time_parsers.hpp> 
    +
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +#define BYTEAOID 17
    +
    +//#define DEBUG(x) x
    +#define DEBUG(x)
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace backend {
    +
    +class PostgresException : public Exception
    +{
    +public:
    +  PostgresException(const std::string& msg)
    +    : Exception(msg)
    +  { }
    +};
    +
    +class PostgresStatement : public SqlStatement
    +{
    +public:
    +  PostgresStatement(Postgres& conn, const std::string& sql)
    +    : conn_(conn),
    +      sql_(convertToNumberedPlaceholders(sql))
    +  {
    +    lastId_ = -1;
    +    row_ = affectedRows_ = 0;
    +    result_ = 0;
    +
    +    paramValues_ = 0;
    +    paramTypes_ = paramLengths_ = paramFormats_ = 0;
    + 
    +    snprintf(name_, 64, "SQL%p%08X", this, rand());
    +
    +    DEBUG(std::cerr << this << " for: " << sql_ << std::endl);
    +
    +    state_ = Done;
    +  }
    +
    +  virtual ~PostgresStatement()
    +  {
    +    PQclear(result_);
    +    delete[] paramValues_;
    +    delete[] paramTypes_;
    +  }
    +
    +  virtual void reset()
    +  {
    +    state_ = Done;
    +  }
    +
    +  virtual void bind(int column, const std::string& value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    setValue(column, value);
    +  }
    +
    +  virtual void bind(int column, short value)
    +  {
    +    bind(column, static_cast<int>(value));
    +  }
    +
    +  virtual void bind(int column, int value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    setValue(column, boost::lexical_cast<std::string>(value));
    +  }
    +
    +  virtual void bind(int column, long long value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    setValue(column, boost::lexical_cast<std::string>(value));
    +  }
    +
    +  virtual void bind(int column, float value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    setValue(column, boost::lexical_cast<std::string>(value));
    +  }
    +
    +  virtual void bind(int column, double value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    setValue(column, boost::lexical_cast<std::string>(value));
    +  }
    +
    +  virtual void bind(int column, const boost::posix_time::time_duration & value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << boost::posix_time::to_simple_string(value) << std::endl);
    +
    +    std::string v = boost::posix_time::to_simple_string(value);   
    +
    +    setValue(column, v);
    +  }
    +
    +  virtual void bind(int column, const boost::posix_time::ptime& value,
    +		    SqlDateTimeType type)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " "
    +	  << boost::posix_time::to_simple_string(value) << std::endl);
    +
    +    std::string v;
    +    if (type == SqlDate)
    +      v = boost::gregorian::to_iso_extended_string(value.date());
    +    else {
    +      v = boost::posix_time::to_iso_extended_string(value);
    +      v[v.find('T')] = ' ';
    +    }
    +
    +    setValue(column, v);
    +  }
    +
    +  virtual void bind(int column, const std::vector<unsigned char>& value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " (blob, size=" <<
    +	  value.size() << ")" << std::endl);
    +
    +    for (int i = (int)params_.size(); i <= column; ++i)
    +      params_.push_back(Param());
    +
    +    Param& p = params_[column];
    +    p.value.resize(value.size());
    +    memcpy(const_cast<char *>(p.value.data()), &(*value.begin()), value.size());
    +    p.isbinary = true;
    +    p.isnull = false;
    +
    +    // FIXME if first null was bound, check here and invalidate the prepared
    +    // statement if necessary because the type changes
    +  }
    +
    +  virtual void bindNull(int column)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " null" << std::endl);
    +
    +    for (int i = (int)params_.size(); i <= column; ++i)
    +      params_.push_back(Param());
    +
    +    params_[column].isnull = true;
    +  }
    +
    +  virtual void execute()
    +  {
    +    if (conn_.showQueries())
    +      std::cerr << sql_ << std::endl;
    +
    +    if (!result_) {
    +      paramValues_ = new char *[params_.size()];
    +
    +      for (unsigned i = 0; i < params_.size(); ++i) {
    +	if (params_[i].isbinary) {
    +	  paramTypes_ = new int[params_.size() * 3];
    +	  paramLengths_ = paramTypes_ + params_.size();
    +	  paramFormats_ = paramLengths_ + params_.size();
    +	  for (unsigned j = 0; j < params_.size(); ++j) {
    +	    paramTypes_[j] = params_[j].isbinary ? BYTEAOID : 0;
    +	    paramFormats_[j] = params_[j].isbinary ? 1 : 0;
    +	    paramLengths_[j] = 0;
    +	  }
    +
    +	  break;
    +	}
    +      }
    +
    +      result_ = PQprepare(conn_.connection(), name_, sql_.c_str(),
    +			  paramTypes_ ? params_.size() : 0, (Oid *)paramTypes_);
    +      handleErr(PQresultStatus(result_));
    +    }
    +
    +    for (unsigned i = 0; i < params_.size(); ++i) {
    +      if (params_[i].isnull)
    +	paramValues_[i] = 0;
    +      else
    +	if (params_[i].isbinary) {
    +	  paramValues_[i] = const_cast<char *>(params_[i].value.data());
    +	  paramLengths_[i] = params_[i].value.length();
    +	} else
    +	  paramValues_[i] = const_cast<char *>(params_[i].value.c_str());
    +    }
    +
    +    PQclear(result_);
    +    result_ = PQexecPrepared(conn_.connection(), name_, params_.size(),
    +			     paramValues_, paramLengths_, paramFormats_, 0);
    +
    +    row_ = 0;
    +    if (PQresultStatus(result_) == PGRES_COMMAND_OK) {
    +      std::string s = PQcmdTuples(result_);
    +      if (!s.empty())
    +	affectedRows_ = boost::lexical_cast<int>(s);
    +      else
    +	affectedRows_ = 0;
    +    } else if (PQresultStatus(result_) == PGRES_TUPLES_OK)
    +      affectedRows_ = PQntuples(result_);
    +    if (affectedRows_ == 1 && sql_.rfind("returning id") != std::string::npos) {
    +      state_ = NoFirstRow;
    +      if (PQntuples(result_) == 1 && PQnfields(result_) == 1) {
    +	lastId_ = boost::lexical_cast<int>(PQgetvalue(result_, 0, 0));
    +      }
    +    } else {
    +      if (PQntuples(result_) == 0) {
    +	state_ = NoFirstRow;
    +      } else {
    +	state_ = FirstRow;
    +      }
    +    }
    +
    +    handleErr(PQresultStatus(result_));
    +  }
    +
    +  virtual long long insertedId()
    +  {
    +    return lastId_;
    +  }
    +
    +  virtual int affectedRowCount()
    +  {
    +    return affectedRows_;
    +  }
    +  
    +  virtual bool nextRow()
    +  {
    +    switch (state_) {
    +    case NoFirstRow:
    +      state_ = Done;
    +      return false;
    +    case FirstRow:
    +      state_ = NextRow;
    +      return true;
    +    case NextRow:
    +      if (row_ + 1 < PQntuples(result_)) {
    +	row_++;
    +	return true;
    +      } else {
    +	state_ = Done;
    +	return false;
    +      }
    +      break;
    +    case Done:
    +      throw PostgresException("Postgres: nextRow(): statement already "
    +			      "finished");
    +    }
    +
    +    return false;
    +  }
    +
    +  virtual bool getResult(int column, std::string *value, int size)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    *value = PQgetvalue(result_, row_, column);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result string " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, short *value)
    +  {
    +    int intValue;
    +    if (getResult(column, &intValue)) {
    +      *value = intValue;
    +      return true;
    +    } else
    +      return false;
    +  }
    +
    +  virtual bool getResult(int column, int *value)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    *value = boost::lexical_cast<int>(PQgetvalue(result_, row_, column));
    +
    +    DEBUG(std::cerr << this 
    +	  << " result int " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, long long *value)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    *value
    +      = boost::lexical_cast<long long>(PQgetvalue(result_, row_, column));
    +
    +    DEBUG(std::cerr << this 
    +	  << " result long long " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +  
    +  virtual bool getResult(int column, float *value)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    *value = boost::lexical_cast<float>(PQgetvalue(result_, row_, column));
    +
    +    DEBUG(std::cerr << this 
    +	  << " result float " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, double *value)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    *value = boost::lexical_cast<double>(PQgetvalue(result_, row_, column));
    +
    +    DEBUG(std::cerr << this 
    +	  << " result double " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, boost::posix_time::ptime *value,
    +			 SqlDateTimeType type)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    std::string v;
    +    v = PQgetvalue(result_, row_, column);
    +
    +    if (type == SqlDate)
    +      *value = boost::posix_time::ptime(boost::gregorian::from_string(v),
    +					boost::posix_time::hours(0));
    +    else
    +      *value = boost::posix_time::time_from_string(v);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result time_duration " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, boost::posix_time::time_duration *value)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    std::string v;
    +    v = PQgetvalue(result_, row_, column);
    +
    +    *value = boost::posix_time::time_duration
    +      (boost::posix_time::duration_from_string(v));
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, std::vector<unsigned char> *value,
    +			 int size)
    +  {
    +    if (PQgetisnull(result_, row_, column))
    +      return false;
    +
    +    const char *escaped = PQgetvalue(result_, row_, column);
    +
    +    std::size_t vlength;
    +    unsigned char *v = PQunescapeBytea((unsigned char *)escaped, &vlength);
    +
    +    value->resize(vlength);
    +    std::copy(v, v + vlength, value->begin());
    +    free(v);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result blob " << column << " (blob, size = " << vlength << ")"
    +	  << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual std::string sql() const {
    +    return sql_;
    +  }
    +
    +private:
    +  struct Param {
    +    std::string value;
    +    bool isnull, isbinary;
    +
    +    Param() : isnull(true), isbinary(false) { }
    +  };
    +
    +  Postgres& conn_;
    +  std::string sql_;
    +  char name_[64];
    +  PGresult *result_;
    +  enum { NoFirstRow, FirstRow, NextRow, Done } state_;
    +  std::vector<Param> params_;
    +
    +  char **paramValues_;
    +  int *paramTypes_, *paramLengths_, *paramFormats_;
    + 
    +  int lastId_, row_, affectedRows_;
    +
    +  void handleErr(int err)
    +  {
    +    if (err != PGRES_COMMAND_OK && err != PGRES_TUPLES_OK)
    +      throw PostgresException(PQerrorMessage(conn_.connection()));
    +  }
    +
    +  void setValue(int column, const std::string& value) {
    +    for (int i = (int)params_.size(); i <= column; ++i)
    +      params_.push_back(Param());
    +
    +    params_[column].value = value;
    +    params_[column].isnull = false;
    +  }
    +
    +  std::string convertToNumberedPlaceholders(const std::string& sql)
    +  {
    +    std::stringstream result;
    +
    +    enum { Statement, SQuote, DQuote } state = Statement;
    +    int placeholder = 1;
    +
    +    for (unsigned i = 0; i < sql.length(); ++i) {
    +      switch (state) {
    +      case Statement:
    +	if (sql[i] == '\'')
    +	  state = SQuote;
    +	else if (sql[i] == '"')
    +	  state = DQuote;
    +	else if (sql[i] == '?') {
    +	  result << '$' << placeholder++;
    +	  continue;
    +	}
    +	break;
    +      case SQuote:
    +	if (sql[i] == '\'') {
    +	  if (i + 1 == sql.length())
    +	    state = Statement;
    +	  else if (sql[i + 1] == '\'') {
    +	    result << sql[i];
    +	    ++i; // skip to next
    +	  } else
    +	    state = Statement;
    +	}
    +	break;
    +      case DQuote:
    +	if (sql[i] == '"')
    +	  state = Statement;
    +	break;
    +      }
    +      result << sql[i];
    +    }
    +
    +    return result.str();
    +  }
    +};
    +
    +Postgres::Postgres(const std::string& db)
    +  : conn_(NULL)
    +{
    +  if (!db.empty())
    +    connect(db);
    +}
    +
    +Postgres::Postgres(const Postgres& other)
    +  : SqlConnection(other)
    +{
    +  if (!other.connInfo_.empty())
    +    connect(other.connInfo_);
    +}
    +
    +Postgres::~Postgres()
    +{
    +  clearStatementCache();
    +  if (conn_)
    +    PQfinish(conn_);
    +}
    +
    +Postgres *Postgres::clone() const
    +{
    +  return new Postgres(*this);
    +}
    +
    +bool Postgres::connect(const std::string& db)
    +{
    +  connInfo_ = db;
    +  conn_ = PQconnectdb(db.c_str());
    +
    +  if (PQstatus(conn_) != CONNECTION_OK) {
    +    std::string error = PQerrorMessage(conn_);
    +    PQfinish(conn_);
    +    conn_ = 0;
    +    throw PostgresException("Could not connect to: " + error);
    +  }
    +
    +  return true;
    +}
    +
    +SqlStatement *Postgres::prepareStatement(const std::string& sql)
    +{
    +  return new PostgresStatement(*this, sql);
    +}
    +
    +void Postgres::executeSql(const std::string &sql)
    +{
    +  PGresult *result;
    +  int err;
    +
    +  if (showQueries())
    +    std::cerr << sql << std::endl;
    +			
    +  result = PQexec(conn_, sql.c_str());
    +  err = PQresultStatus(result);
    +  if (err != PGRES_COMMAND_OK && err != PGRES_TUPLES_OK) {
    +    PQclear(result);
    +    throw PostgresException(PQerrorMessage(conn_));
    +  }
    +  PQclear(result);
    +}
    +
    +std::string Postgres::autoincrementType() const
    +{
    +  return "serial";
    +}
    +  
    +std::string Postgres::autoincrementSql() const
    +{
    +  return std::string();
    +}
    +
    +std::string Postgres::autoincrementInsertSuffix() const
    +{
    +  return " returning id";
    +}
    +  
    +const char *Postgres::dateTimeType(SqlDateTimeType type) const
    +{
    +  switch (type) {
    +  case SqlDate:
    +    return "date";
    +  case SqlDateTime:
    +    return "timestamp";
    +  case SqlTime:
    +    return "interval";
    +  }
    +
    +  std::stringstream ss;
    +  ss << __FILE__ << ":" << __LINE__ << ": implementation error";
    +  throw PostgresException(ss.str());
    +}
    +
    +const char *Postgres::blobType() const
    +{
    +  return "bytea not null";
    +}
    +
    +void Postgres::startTransaction()
    +{
    +  PGresult *result = PQexec(conn_, "start transaction");
    +  PQclear(result);
    +}
    +
    +void Postgres::commitTransaction()
    +{
    +  PGresult *result = PQexec(conn_, "commit transaction");
    +  PQclear(result);
    +}
    +
    +void Postgres::rollbackTransaction()
    +{
    +  PGresult *result = PQexec(conn_, "rollback transaction");
    +  PQclear(result);
    +}
    +
    +    }
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3 b/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3
    new file mode 100644
    index 0000000..e5b36b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3
    @@ -0,0 +1,115 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_BACKEND_SQLITE3_H_
    +#define WT_DBO_BACKEND_SQLITE3_H_
    +
    +#include <Wt/Dbo/SqlConnection>
    +#include <Wt/Dbo/SqlStatement>
    +#include <Wt/Dbo/backend/WDboSqlite3DllDefs.h>
    +
    +extern "C" {
    +  struct sqlite3;
    +}
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace backend {
    +
    +/*! \class Sqlite3 Wt/Dbo/backend/Sqlite3 Wt/Dbo/backend/Sqlite3
    + *  \brief An SQLite3 connection
    + *
    + * This class provides the backend implementation for SQLite3 databases.
    + *
    + * \ingroup dbo
    + */
    +class WTDBOSQLITE3_API Sqlite3 : public SqlConnection
    +{
    +public:
    +  /*! \brief Configuration of date time storage.
    +   *
    +   * SQlite3 does not provide real type support for date time. Instead,
    +   * it offers 3 choices for storing a date time, each of these compatible
    +   * with the use of the built-in arithmetic functions.
    +   */
    +  enum DateTimeStorage {
    +    /*!
    +     * As 'text' in ISO8601 format.
    +     */
    +    ISO8601AsText,
    +
    +    /*!
    +     * As 'real', the number of julian days. Note that this does not support
    +     * second accuracy for a date time, but is the preferred format for a
    +     * plain date.
    +     */
    +    JulianDaysAsReal,
    +
    +    /*!
    +     * As 'integer', number of seconds since UNIX Epoch.
    +     */
    +    UnixTimeAsInteger
    +  };
    +
    +  /*! \brief Opens a new SQLite3 backend connection.
    +   *
    +   * The \p db may be any of the values supported by sqlite3_open().
    +   */
    +  Sqlite3(const std::string& db);
    +
    +  /*! \brief Copies an SQLite3 connection.
    +   */
    +  Sqlite3(const Sqlite3& other);
    +
    +  /*! \brief Destructor.
    +   *
    +   * Closes the connection.
    +   */
    +  ~Sqlite3();
    +
    +  virtual Sqlite3 *clone() const;
    +
    +  /*! \brief Returns the underlying connection.
    +   */
    +  sqlite3 *connection() { return db_; }
    +
    +  /*! \brief Configures how to store date or date time.
    +   *
    +   * The default format is ISO8601AsText.
    +   */
    +  void setDateTimeStorage(SqlDateTimeType type, DateTimeStorage format);
    +
    +  /*! \brief Returns the date time storage.
    +   */
    +  DateTimeStorage dateTimeStorage(SqlDateTimeType type) const;
    +
    +  virtual void startTransaction();
    +  virtual void commitTransaction();
    +  virtual void rollbackTransaction();
    +
    +  virtual SqlStatement *prepareStatement(const std::string& sql);
    +  
    +  /** @name Methods that return dialect information
    +   */
    +  //@{
    +  virtual std::string autoincrementSql() const;
    +  virtual std::string autoincrementType() const;
    +  virtual std::string autoincrementInsertSuffix() const;
    +  virtual const char *dateTimeType(SqlDateTimeType type) const;
    +  virtual const char *blobType() const;
    +  //@}
    +private:
    +  DateTimeStorage dateTimeStorage_[2];
    +
    +  std::string conn_;
    +  sqlite3 *db_;
    +};
    +
    +    }
    +  }
    +}
    +
    +#endif // WT_DBO_BACKEND_SQLITE3_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3.C b/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3.C
    new file mode 100644
    index 0000000..8faa35f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/Sqlite3.C
    @@ -0,0 +1,590 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Dbo/backend/Sqlite3"
    +#include "Wt/Dbo/Exception"
    +
    +#include <sqlite3.h>
    +#include <iostream>
    +#include <math.h>
    +#include <boost/date_time/posix_time/posix_time.hpp>
    +#include <boost/date_time/gregorian/gregorian.hpp>
    +
    +//#define DEBUG(x) x
    +#define DEBUG(x)
    +#define USEC_PER_DAY (24.0 * 60 * 60 * 1000 * 1000)
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace backend {
    +
    +class Sqlite3Exception : public Exception
    +{
    +public:
    +  Sqlite3Exception(const std::string& msg)
    +    : Exception(msg)
    +  { }
    +};
    +
    +class Sqlite3Statement : public SqlStatement
    +{
    +public:
    +  Sqlite3Statement(Sqlite3& db, const std::string& sql)
    +    : db_(db),
    +      sql_(sql)
    +  {
    +    DEBUG(std::cerr << this << " for: " << sql << std::endl);
    +
    +#if SQLITE_VERSION_NUMBER >= 3003009
    +    int err = sqlite3_prepare_v2(db_.connection(), sql.c_str(),
    +				 static_cast<int>(sql.length() + 1), &st_, 0);
    +#else
    +    int err = sqlite3_prepare(db_.connection(), sql.c_str(),
    +			      static_cast<int>(sql.length() + 1), &st_, 0);
    +#endif
    +
    +    handleErr(err);
    +
    +    state_ = Done;
    +  }
    +
    +  virtual ~Sqlite3Statement()
    +  {
    +    sqlite3_finalize(st_);
    +  }
    +
    +  virtual void reset()
    +  {
    +    int err = sqlite3_reset(st_);
    +
    +    handleErr(err);
    +
    +    state_ = Done;
    +  }
    +
    +  virtual void bind(int column, const std::string& value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    int err = sqlite3_bind_text(st_, column + 1, value.c_str(),
    +				static_cast<int>(value.length()), SQLITE_TRANSIENT);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bind(int column, short value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    int err = sqlite3_bind_int(st_, column + 1, value);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bind(int column, int value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    int err = sqlite3_bind_int(st_, column + 1, value);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bind(int column, long long value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    int err = sqlite3_bind_int64(st_, column + 1, value);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bind(int column, float value)
    +  {
    +    bind(column, static_cast<double>(value));
    +  }
    +
    +  virtual void bind(int column, double value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
    +
    +    int err = sqlite3_bind_double(st_, column + 1, value);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bind(int column, const boost::posix_time::time_duration & value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " "
    +	  << boost::posix_time::to_simple_string(value) << std::endl);
    +
    +    long long msec = value.total_milliseconds();   
    +
    +    int err = sqlite3_bind_int64(st_, column + 1, msec);
    +  }
    +
    +  virtual void bind(int column, const boost::posix_time::ptime& value,
    +		    SqlDateTimeType type)
    +  {
    +    switch (db_.dateTimeStorage(type)) {
    +    case Sqlite3::ISO8601AsText: {
    +      std::string v;
    +      if (type == SqlDate)
    +	v = boost::gregorian::to_iso_extended_string(value.date());
    +      else {
    +	v = boost::posix_time::to_iso_extended_string(value);
    +	v[v.find('T')] = ' ';
    +      }
    +
    +      bind(column, v);
    +      break;
    +    }
    +    case Sqlite3::JulianDaysAsReal:
    +      if (type == SqlDate)
    +	bind(column, static_cast<double>(value.date().julian_day()));
    +      else {
    +	bind(column, value.date().julian_day()
    +	     + value.time_of_day().total_microseconds() / USEC_PER_DAY);
    +      }
    +      break;
    +    case Sqlite3::UnixTimeAsInteger:
    +      bind(column,
    +	   static_cast<long long>
    +	   ((value - boost::posix_time::ptime
    +	     (boost::gregorian::date(1970, 1, 1))).total_seconds()));
    +      break;
    +    };
    +  }
    +
    +  virtual void bind(int column, const std::vector<unsigned char>& value)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " (blob, size=" <<
    +	  value.size() << ")" << std::endl);
    +
    +    int err;
    +
    +    if (value.size() == 0)
    +      err = sqlite3_bind_blob(st_, column + 1, "", 0, SQLITE_TRANSIENT);
    +    else 
    +      err = sqlite3_bind_blob(st_, column + 1, &(*(value.begin())),
    +			      static_cast<int>(value.size()), SQLITE_STATIC);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void bindNull(int column)
    +  {
    +    DEBUG(std::cerr << this << " bind " << column << " null" << std::endl);
    +
    +    int err = sqlite3_bind_null(st_, column + 1);
    +
    +    handleErr(err);
    +  }
    +
    +  virtual void execute()
    +  {
    +    if (db_.showQueries())
    +      std::cerr << sql_ << std::endl;
    +
    +    int result = sqlite3_step(st_);
    +
    +    if (result == SQLITE_ROW)
    +      state_ = FirstRow;
    +    else if (result == SQLITE_DONE)
    +      state_ = NoFirstRow;
    +    else {
    +      state_ = Done;
    +
    +      handleErr(result);
    +    }
    +  }
    +
    +  virtual long long insertedId()
    +  {
    +    return sqlite3_last_insert_rowid(db_.connection());
    +  }
    +
    +  virtual int affectedRowCount()
    +  {
    +    return sqlite3_changes(db_.connection());
    +  }
    +  
    +  virtual bool nextRow()
    +  {
    +    switch (state_) {
    +    case NoFirstRow:
    +      state_ = Done;
    +      return false;
    +    case FirstRow:
    +      state_ = NextRow;
    +      return true;
    +    case NextRow:
    +      {
    +	int result = sqlite3_step(st_);
    +
    +	if (result == SQLITE_ROW)
    +	  return true;
    +	else {
    +	  state_ = Done;
    +	  if (result == SQLITE_DONE)
    +	    return false;
    +
    +	  handleErr(result);
    +	}
    +      }
    +      break;
    +    case Done:
    +      done();
    +      throw Sqlite3Exception("Sqlite3: nextRow(): statement already finished");
    +    }      
    +
    +    return false;
    +  }
    +
    +  virtual bool getResult(int column, std::string *value, int size)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    *value = (const char *)sqlite3_column_text(st_, column);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result string " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, short *value)
    +  {
    +    int intValue;
    +    if (getResult(column, &intValue)) {
    +      *value = intValue;
    +      return true;
    +    } else
    +      return false;
    +  }
    +
    +  virtual bool getResult(int column, int *value)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    *value = 42;
    +    *value = sqlite3_column_int(st_, column);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result int " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, long long *value)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    *value = sqlite3_column_int64(st_, column);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result long long " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, float *value)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    *value = static_cast<float>(sqlite3_column_double(st_, column));
    +
    +    DEBUG(std::cerr << this 
    +	  << " result float " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, double *value)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    *value = sqlite3_column_double(st_, column);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result double " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, boost::posix_time::time_duration *value)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    long long msec = sqlite3_column_int64(st_, column);
    +    boost::posix_time::time_duration::fractional_seconds_type ticks_per_msec =
    +      boost::posix_time::time_duration::ticks_per_second() / 1000;
    +
    +    *value = boost::posix_time::time_duration(0, 0, 0,
    +					      msec * ticks_per_msec);
    +
    +    DEBUG(std::cerr << this 
    +	  << " result time_duration " << column << " " << *value << std::endl);
    +
    +    return true;
    +  }
    +
    +  virtual bool getResult(int column, boost::posix_time::ptime *value,
    +			 SqlDateTimeType type)
    +  {
    +    switch (db_.dateTimeStorage(type)) {
    +    case Sqlite3::ISO8601AsText: {
    +      std::string v;
    +      if (!getResult(column, &v, -1))
    +	return false;
    +
    +      if (type == SqlDate)
    +	*value = boost::posix_time::ptime(boost::gregorian::from_string(v),
    +					  boost::posix_time::hours(0));
    +      else
    +	*value = boost::posix_time::time_from_string(v);
    +
    +      return true;
    +    }
    +    case Sqlite3::JulianDaysAsReal: {
    +      double v;
    +      if (!getResult(column, &v))
    +	return false;
    +
    +      int vi = static_cast<int>(v);
    +
    +      if (type == SqlDate)
    +	*value = boost::posix_time::ptime(fromJulianDay(vi),
    +					  boost::posix_time::hours(0));
    +      else {
    +	double vf = modf(v, &v);
    +	boost::gregorian::date d = fromJulianDay(vi);
    +	boost::posix_time::time_duration t
    +          = boost::posix_time::microseconds((long long)(vf * USEC_PER_DAY));
    +	*value = boost::posix_time::ptime(d, t);
    +      }
    +
    +      return true;
    +    }
    +    case Sqlite3::UnixTimeAsInteger: {
    +      long long v;
    +
    +      if (!getResult(column, &v))
    +	return false;
    +
    +      boost::posix_time::ptime t
    +	= boost::posix_time::from_time_t(static_cast<std::time_t>(v));
    +      if (type == SqlDate)
    +	*value = boost::posix_time::ptime(t.date(),
    +					  boost::posix_time::hours(0));
    +      else
    +	*value = t;
    +
    +      return true;
    +    }
    +    }
    +    std::stringstream ss;
    +    ss << __FILE__ << ":" << __LINE__ << ": implementation error";
    +    throw Sqlite3Exception(ss.str());
    +  }
    +
    +
    +  virtual bool getResult(int column, std::vector<unsigned char> *value,
    +			 int size)
    +  {
    +    if (sqlite3_column_type(st_, column) == SQLITE_NULL)
    +      return false;
    +
    +    int s = sqlite3_column_bytes(st_, column);
    +    unsigned char *v = (unsigned char *)sqlite3_column_blob(st_, column);
    +
    +    value->resize(s);
    +    std::copy(v, v + s, value->begin());
    +
    +    DEBUG(std::cerr << this 
    +	  << " result blob " << column << " (blob, size = " << s << ")"
    +	  << std::endl);
    +
    +    return true;
    +  }
    +
    + 
    +  virtual std::string sql() const {
    +    return sql_;
    +  }
    +
    +private:
    +  Sqlite3& db_;
    +  sqlite3_stmt *st_;
    +  std::string sql_;
    +  enum { NoFirstRow, FirstRow, NextRow, Done } state_;
    +
    +  void handleErr(int err)
    +  {
    +    if (err != SQLITE_OK) {
    +      std::string msg = "Sqlite3: " + sql_ + ": "
    +	+ sqlite3_errmsg(db_.connection());
    +      try {
    +	done();
    +      }	catch (...) { }
    +
    +      throw Sqlite3Exception(msg);
    +    }
    +  }
    +
    +  boost::gregorian::date fromJulianDay(int julian) {
    +    int day, month, year;
    +
    +    if (julian < 0) {
    +      julian = 0;
    +    }
    +
    +    int a = julian;
    +
    +    if (julian >= 2299161) {
    +      int jadj = (int)(((float)(julian - 1867216) - 0.25) / 36524.25);
    +      a += 1 + jadj - (int)(0.25 * jadj);
    +    }
    +
    +    int b = a + 1524;
    +    int c = (int)(6680.0 + ((float)(b - 2439870) - 122.1) / 365.25);
    +    int d = (int)(365 * c + (0.25 * c));
    +    int e = (int)((b - d) / 30.6001);
    +
    +    day = b - d - (int)(30.6001 * e);
    +    month = e - 1;
    +
    +  if (month > 12) {
    +    month -= 12;
    +  }
    +
    +  year = c - 4715;
    +
    +  if (month > 2) {
    +    --year;
    +  }
    +
    +  if (year <= 0) {
    +    --year;
    +  }
    +
    +  return boost::gregorian::date(year, month, day);
    +  }
    +};
    +
    +Sqlite3::Sqlite3(const std::string& db)
    +  : conn_(db)
    +{
    +  dateTimeStorage_[SqlDate] = ISO8601AsText;
    +  dateTimeStorage_[SqlDateTime] = ISO8601AsText;
    +
    +  int err = sqlite3_open(conn_.c_str(), &db_);
    +
    +  if (err != SQLITE_OK)
    +    throw Sqlite3Exception(sqlite3_errmsg(db_));
    +}
    +
    +Sqlite3::Sqlite3(const Sqlite3& other)
    +  : SqlConnection(other),
    +    conn_(other.conn_)
    +{
    +  dateTimeStorage_[SqlDate] = other.dateTimeStorage_[SqlDate];
    +  dateTimeStorage_[SqlDateTime] = other.dateTimeStorage_[SqlDateTime];
    +
    +  int err = sqlite3_open(conn_.c_str(), &db_);
    +
    +  if (err != SQLITE_OK)
    +    throw Sqlite3Exception(sqlite3_errmsg(db_));
    +}
    +
    +Sqlite3::~Sqlite3()
    +{
    +  clearStatementCache();
    +
    +  sqlite3_close(db_);
    +}
    +
    +Sqlite3 *Sqlite3::clone() const
    +{
    +  return new Sqlite3(*this);
    +}
    +
    +SqlStatement *Sqlite3::prepareStatement(const std::string& sql)
    +{
    +  return new Sqlite3Statement(*this, sql);
    +}
    +
    +std::string Sqlite3::autoincrementType() const
    +{
    +  return "integer";
    +}
    +
    +std::string Sqlite3::autoincrementSql() const
    +{
    +  return "autoincrement";
    +}
    +
    +std::string Sqlite3::autoincrementInsertSuffix() const
    +{
    +  return std::string();
    +}
    +
    +const char *Sqlite3::dateTimeType(SqlDateTimeType type) const
    +{
    +  if (type == SqlTime)
    +    return "integer";
    +  else switch (dateTimeStorage(type)) {
    +  case ISO8601AsText:
    +    return "text";
    +  case JulianDaysAsReal:
    +    return "real";
    +  case UnixTimeAsInteger:
    +    return "integer";
    +  }
    +  std::stringstream ss;
    +  ss << __FILE__ << ":" << __LINE__ << ": implementation error";
    +  throw Sqlite3Exception(ss.str());
    +}
    +
    +const char *Sqlite3::blobType() const
    +{
    +  return "blob not null";
    +}
    +
    +void Sqlite3::setDateTimeStorage(SqlDateTimeType type,
    +				 DateTimeStorage storage)
    +{
    +  dateTimeStorage_[type] = storage;
    +}
    +
    +Sqlite3::DateTimeStorage Sqlite3::dateTimeStorage(SqlDateTimeType type) const
    +{
    +  return dateTimeStorage_[type];
    +}
    +
    +void Sqlite3::startTransaction() 
    +{
    +  executeSql("begin transaction");
    +}
    +
    +void Sqlite3::commitTransaction() 
    +{
    +  executeSql("commit transaction");
    +}
    +
    +void Sqlite3::rollbackTransaction() 
    +{
    +  executeSql("rollback transaction");
    +}
    +    }
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/WDboPostgresDllDefs.h b/wt-3.1.7a/src/Wt/Dbo/backend/WDboPostgresDllDefs.h
    new file mode 100644
    index 0000000..3c6978c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/WDboPostgresDllDefs.h
    @@ -0,0 +1,47 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDBOPOSTGRESDLLDEFS_H_
    +#define WDBOPOSTGRESDLLDEFS_H_
    +
    +#include <Wt/WConfig.h>
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WTDBOPOSTGRES_IMPORT __declspec(dllimport)
    +  #define WTDBOPOSTGRES_EXPORT __declspec(dllexport)
    +  #define WTDBOPOSTGRES_DLLLOCAL
    +  #define WTDBOPOSTGRES_DLLPUBLIC
    +#else
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WTDBOPOSTGRES_IMPORT __attribute__ ((visibility("default")))
    +    #define WTDBOPOSTGRES_EXPORT __attribute__ ((visibility("default")))
    +    #define WTDBOPOSTGRES_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WTDBOPOSTGRES_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WTDBOPOSTGRES_IMPORT
    +    #define WTDBOPOSTGRES_EXPORT
    +    #define WTDBOPOSTGRES_DLLLOCAL
    +    #define WTDBOPOSTGRES_DLLPUBLIC
    +  #endif
    +#endif
    +
    +#ifdef WIN32
    +  #ifdef wtdbopostgres_EXPORTS
    +    #define WTDBOPOSTGRES_API WTDBOPOSTGRES_EXPORT
    +  #else
    +    #ifdef WTDBOPOSTGRES_STATIC
    +      #define WTDBOPOSTGRES_API
    +    #else
    +      #define WTDBOPOSTGRES_API WTDBOPOSTGRES_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WTDBOPOSTGRES_API
    +#endif
    +
    +#endif // DLLDEFS_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/WDboSqlite3DllDefs.h b/wt-3.1.7a/src/Wt/Dbo/backend/WDboSqlite3DllDefs.h
    new file mode 100644
    index 0000000..8116d46
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/WDboSqlite3DllDefs.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2006 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDBOSQLITE3DLLDEFS_H_
    +#define WDBOSQLITE3DLLDEFS_H_
    +
    +#include <Wt/WConfig.h>
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WTDBOSQLITE3_IMPORT __declspec(dllimport)
    +  #define WTDBOSQLITE3_EXPORT __declspec(dllexport)
    +  #define WTDBOSQLITE3_DLLLOCAL
    +  #define WTDBOSQLITE3_DLLPUBLIC
    +#else
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WTDBOSQLITE3_IMPORT __attribute__ ((visibility("default")))
    +    #define WTDBOSQLITE3_EXPORT __attribute__ ((visibility("default")))
    +    #define WTDBOSQLITE3_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WTDBOSQLITE3_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WTDBOSQLITE3_IMPORT
    +    #define WTDBOSQLITE3_EXPORT
    +    #define WTDBOSQLITE3_DLLLOCAL
    +    #define WTDBOSQLITE3_DLLPUBLIC
    +  #endif
    +#endif
    +
    +// Define wt_EXPORTS for DLL builds
    +#ifdef WIN32
    +  #ifdef wtdbosqlite3_EXPORTS
    +    #define WTDBOSQLITE3_API WTDBOSQLITE3_EXPORT
    +  #else
    +    #ifdef WTDBOSQLITE3_STATIC
    +      #define WTDBOSQLITE3_API
    +    #else
    +      #define WTDBOSQLITE3_API WTDBOSQLITE3_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WTDBOSQLITE3_API
    +#endif
    +
    +#endif // DLLDEFS_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.c b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.c
    new file mode 100644
    index 0000000..53c5988
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.c
    @@ -0,0 +1,110844 @@
    +#pragma warning( disable : 4244 )
    +/******************************************************************************
    +** This file is an amalgamation of many separate C source files from SQLite
    +** version 3.6.20.  By combining all the individual C code files into this 
    +** single large file, the entire code can be compiled as a one translation
    +** unit.  This allows many compilers to do optimizations that would not be
    +** possible if the files were compiled separately.  Performance improvements
    +** of 5% are more are commonly seen when SQLite is compiled as a single
    +** translation unit.
    +**
    +** This file is all you need to compile SQLite.  To use SQLite in other
    +** programs, you need this file and the "sqlite3.h" header file that defines
    +** the programming interface to the SQLite library.  (If you do not have 
    +** the "sqlite3.h" header file at hand, you will find a copy embedded within
    +** the text of this file.  Search for "Begin file sqlite3.h" to find the start
    +** of the embedded sqlite3.h header file.) Additional code files may be needed
    +** if you want a wrapper to interface SQLite with your choice of programming
    +** language. The code for the "sqlite3" command-line shell is also in a
    +** separate file. This file contains only code for the core SQLite library.
    +*/
    +#define SQLITE_CORE 1
    +#define SQLITE_AMALGAMATION 1
    +#ifndef SQLITE_PRIVATE
    +# define SQLITE_PRIVATE static
    +#endif
    +#ifndef SQLITE_API
    +# define SQLITE_API
    +#endif
    +/************** Begin file sqliteInt.h ***************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Internal interface definitions for SQLite.
    +**
    +*/
    +#ifndef _SQLITEINT_H_
    +#define _SQLITEINT_H_
    +
    +/*
    +** These #defines should enable >2GB file support on POSIX if the
    +** underlying operating system supports it.  If the OS lacks
    +** large file support, or if the OS is windows, these should be no-ops.
    +**
    +** Ticket #2739:  The _LARGEFILE_SOURCE macro must appear before any
    +** system #includes.  Hence, this block of code must be the very first
    +** code in all source files.
    +**
    +** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch
    +** on the compiler command line.  This is necessary if you are compiling
    +** on a recent machine (ex: Red Hat 7.2) but you want your code to work
    +** on an older machine (ex: Red Hat 6.0).  If you compile on Red Hat 7.2
    +** without this option, LFS is enable.  But LFS does not exist in the kernel
    +** in Red Hat 6.0, so the code won't work.  Hence, for maximum binary
    +** portability you should omit LFS.
    +**
    +** Similar is true for Mac OS X.  LFS is only supported on Mac OS X 9 and later.
    +*/
    +#ifndef SQLITE_DISABLE_LFS
    +# define _LARGE_FILE       1
    +# ifndef _FILE_OFFSET_BITS
    +#   define _FILE_OFFSET_BITS 64
    +# endif
    +# define _LARGEFILE_SOURCE 1
    +#endif
    +
    +/*
    +** Include the configuration header output by 'configure' if we're using the
    +** autoconf-based build
    +*/
    +#ifdef _HAVE_SQLITE_CONFIG_H
    +#include "config.h"
    +#endif
    +
    +/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
    +/************** Begin file sqliteLimit.h *************************************/
    +/*
    +** 2007 May 7
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** 
    +** This file defines various limits of what SQLite can process.
    +**
    +** @(#) $Id: sqliteLimit.h,v 1.10 2009/01/10 16:15:09 danielk1977 Exp $
    +*/
    +
    +/*
    +** The maximum length of a TEXT or BLOB in bytes.   This also
    +** limits the size of a row in a table or index.
    +**
    +** The hard limit is the ability of a 32-bit signed integer
    +** to count the size: 2^31-1 or 2147483647.
    +*/
    +#ifndef SQLITE_MAX_LENGTH
    +# define SQLITE_MAX_LENGTH 1000000000
    +#endif
    +
    +/*
    +** This is the maximum number of
    +**
    +**    * Columns in a table
    +**    * Columns in an index
    +**    * Columns in a view
    +**    * Terms in the SET clause of an UPDATE statement
    +**    * Terms in the result set of a SELECT statement
    +**    * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.
    +**    * Terms in the VALUES clause of an INSERT statement
    +**
    +** The hard upper limit here is 32676.  Most database people will
    +** tell you that in a well-normalized database, you usually should
    +** not have more than a dozen or so columns in any table.  And if
    +** that is the case, there is no point in having more than a few
    +** dozen values in any of the other situations described above.
    +*/
    +#ifndef SQLITE_MAX_COLUMN
    +# define SQLITE_MAX_COLUMN 2000
    +#endif
    +
    +/*
    +** The maximum length of a single SQL statement in bytes.
    +**
    +** It used to be the case that setting this value to zero would
    +** turn the limit off.  That is no longer true.  It is not possible
    +** to turn this limit off.
    +*/
    +#ifndef SQLITE_MAX_SQL_LENGTH
    +# define SQLITE_MAX_SQL_LENGTH 1000000000
    +#endif
    +
    +/*
    +** The maximum depth of an expression tree. This is limited to 
    +** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might 
    +** want to place more severe limits on the complexity of an 
    +** expression.
    +**
    +** A value of 0 used to mean that the limit was not enforced.
    +** But that is no longer true.  The limit is now strictly enforced
    +** at all times.
    +*/
    +#ifndef SQLITE_MAX_EXPR_DEPTH
    +# define SQLITE_MAX_EXPR_DEPTH 1000
    +#endif
    +
    +/*
    +** The maximum number of terms in a compound SELECT statement.
    +** The code generator for compound SELECT statements does one
    +** level of recursion for each term.  A stack overflow can result
    +** if the number of terms is too large.  In practice, most SQL
    +** never has more than 3 or 4 terms.  Use a value of 0 to disable
    +** any limit on the number of terms in a compount SELECT.
    +*/
    +#ifndef SQLITE_MAX_COMPOUND_SELECT
    +# define SQLITE_MAX_COMPOUND_SELECT 500
    +#endif
    +
    +/*
    +** The maximum number of opcodes in a VDBE program.
    +** Not currently enforced.
    +*/
    +#ifndef SQLITE_MAX_VDBE_OP
    +# define SQLITE_MAX_VDBE_OP 25000
    +#endif
    +
    +/*
    +** The maximum number of arguments to an SQL function.
    +*/
    +#ifndef SQLITE_MAX_FUNCTION_ARG
    +# define SQLITE_MAX_FUNCTION_ARG 127
    +#endif
    +
    +/*
    +** The maximum number of in-memory pages to use for the main database
    +** table and for temporary tables.  The SQLITE_DEFAULT_CACHE_SIZE
    +*/
    +#ifndef SQLITE_DEFAULT_CACHE_SIZE
    +# define SQLITE_DEFAULT_CACHE_SIZE  2000
    +#endif
    +#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE
    +# define SQLITE_DEFAULT_TEMP_CACHE_SIZE  500
    +#endif
    +
    +/*
    +** The maximum number of attached databases.  This must be between 0
    +** and 30.  The upper bound on 30 is because a 32-bit integer bitmap
    +** is used internally to track attached databases.
    +*/
    +#ifndef SQLITE_MAX_ATTACHED
    +# define SQLITE_MAX_ATTACHED 10
    +#endif
    +
    +
    +/*
    +** The maximum value of a ?nnn wildcard that the parser will accept.
    +*/
    +#ifndef SQLITE_MAX_VARIABLE_NUMBER
    +# define SQLITE_MAX_VARIABLE_NUMBER 999
    +#endif
    +
    +/* Maximum page size.  The upper bound on this value is 32768.  This a limit
    +** imposed by the necessity of storing the value in a 2-byte unsigned integer
    +** and the fact that the page size must be a power of 2.
    +**
    +** If this limit is changed, then the compiled library is technically
    +** incompatible with an SQLite library compiled with a different limit. If
    +** a process operating on a database with a page-size of 65536 bytes 
    +** crashes, then an instance of SQLite compiled with the default page-size 
    +** limit will not be able to rollback the aborted transaction. This could
    +** lead to database corruption.
    +*/
    +#ifndef SQLITE_MAX_PAGE_SIZE
    +# define SQLITE_MAX_PAGE_SIZE 32768
    +#endif
    +
    +
    +/*
    +** The default size of a database page.
    +*/
    +#ifndef SQLITE_DEFAULT_PAGE_SIZE
    +# define SQLITE_DEFAULT_PAGE_SIZE 1024
    +#endif
    +#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
    +# undef SQLITE_DEFAULT_PAGE_SIZE
    +# define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
    +#endif
    +
    +/*
    +** Ordinarily, if no value is explicitly provided, SQLite creates databases
    +** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain
    +** device characteristics (sector-size and atomic write() support),
    +** SQLite may choose a larger value. This constant is the maximum value
    +** SQLite will choose on its own.
    +*/
    +#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE
    +# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192
    +#endif
    +#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
    +# undef SQLITE_MAX_DEFAULT_PAGE_SIZE
    +# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
    +#endif
    +
    +
    +/*
    +** Maximum number of pages in one database file.
    +**
    +** This is really just the default value for the max_page_count pragma.
    +** This value can be lowered (or raised) at run-time using that the
    +** max_page_count macro.
    +*/
    +#ifndef SQLITE_MAX_PAGE_COUNT
    +# define SQLITE_MAX_PAGE_COUNT 1073741823
    +#endif
    +
    +/*
    +** Maximum length (in bytes) of the pattern in a LIKE or GLOB
    +** operator.
    +*/
    +#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH
    +# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000
    +#endif
    +
    +/*
    +** Maximum depth of recursion for triggers.
    +**
    +** A value of 1 means that a trigger program will not be able to itself
    +** fire any triggers. A value of 0 means that no trigger programs at all 
    +** may be executed.
    +*/
    +#ifndef SQLITE_MAX_TRIGGER_DEPTH
    +#if defined(SQLITE_SMALL_STACK)
    +# define SQLITE_MAX_TRIGGER_DEPTH 10
    +#else
    +# define SQLITE_MAX_TRIGGER_DEPTH 1000
    +#endif
    +#endif
    +
    +/************** End of sqliteLimit.h *****************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +
    +/* Disable nuisance warnings on Borland compilers */
    +#if defined(__BORLANDC__)
    +#pragma warn -rch /* unreachable code */
    +#pragma warn -ccc /* Condition is always true or false */
    +#pragma warn -aus /* Assigned value is never used */
    +#pragma warn -csu /* Comparing signed and unsigned */
    +#pragma warn -spa /* Suspicious pointer arithmetic */
    +#endif
    +
    +/* Needed for various definitions... */
    +#ifndef _GNU_SOURCE
    +# define _GNU_SOURCE
    +#endif
    +
    +/*
    +** Include standard header files as necessary
    +*/
    +#ifdef HAVE_STDINT_H
    +#include <stdint.h>
    +#endif
    +#ifdef HAVE_INTTYPES_H
    +#include <inttypes.h>
    +#endif
    +
    +#define SQLITE_INDEX_SAMPLES 10
    +
    +/*
    +** This macro is used to "hide" some ugliness in casting an int
    +** value to a ptr value under the MSVC 64-bit compiler.   Casting
    +** non 64-bit values to ptr types results in a "hard" error with 
    +** the MSVC 64-bit compiler which this attempts to avoid.  
    +**
    +** A simple compiler pragma or casting sequence could not be found
    +** to correct this in all situations, so this macro was introduced.
    +**
    +** It could be argued that the intptr_t type could be used in this
    +** case, but that type is not available on all compilers, or 
    +** requires the #include of specific headers which differs between
    +** platforms.
    +**
    +** Ticket #3860:  The llvm-gcc-4.2 compiler from Apple chokes on
    +** the ((void*)&((char*)0)[X]) construct.  But MSVC chokes on ((void*)(X)).
    +** So we have to define the macros in different ways depending on the
    +** compiler.
    +*/
    +#if defined(__GNUC__)
    +# if defined(HAVE_STDINT_H)
    +#   define SQLITE_INT_TO_PTR(X)  ((void*)(intptr_t)(X))
    +#   define SQLITE_PTR_TO_INT(X)  ((int)(intptr_t)(X))
    +# else
    +#   define SQLITE_INT_TO_PTR(X)  ((void*)(X))
    +#   define SQLITE_PTR_TO_INT(X)  ((int)(X))
    +# endif
    +#else
    +# define SQLITE_INT_TO_PTR(X)   ((void*)&((char*)0)[X])
    +# define SQLITE_PTR_TO_INT(X)   ((int)(((char*)X)-(char*)0))
    +#endif
    +
    +
    +/*
    +** The SQLITE_THREADSAFE macro must be defined as either 0 or 1.
    +** Older versions of SQLite used an optional THREADSAFE macro.
    +** We support that for legacy
    +*/
    +#if !defined(SQLITE_THREADSAFE)
    +#if defined(THREADSAFE)
    +# define SQLITE_THREADSAFE THREADSAFE
    +#else
    +# define SQLITE_THREADSAFE 1
    +#endif
    +#endif
    +
    +/*
    +** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.
    +** It determines whether or not the features related to 
    +** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can
    +** be overridden at runtime using the sqlite3_config() API.
    +*/
    +#if !defined(SQLITE_DEFAULT_MEMSTATUS)
    +# define SQLITE_DEFAULT_MEMSTATUS 1
    +#endif
    +
    +/*
    +** Exactly one of the following macros must be defined in order to
    +** specify which memory allocation subsystem to use.
    +**
    +**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()
    +**     SQLITE_MEMDEBUG               // Debugging version of system malloc()
    +**     SQLITE_MEMORY_SIZE            // internal allocator #1
    +**     SQLITE_MMAP_HEAP_SIZE         // internal mmap() allocator
    +**     SQLITE_POW2_MEMORY_SIZE       // internal power-of-two allocator
    +**
    +** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
    +** the default.
    +*/
    +#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
    +    defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
    +    defined(SQLITE_POW2_MEMORY_SIZE)>1
    +# error "At most one of the following compile-time configuration options\
    + is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\
    + SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE"
    +#endif
    +#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\
    +    defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\
    +    defined(SQLITE_POW2_MEMORY_SIZE)==0
    +# define SQLITE_SYSTEM_MALLOC 1
    +#endif
    +
    +/*
    +** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the
    +** sizes of memory allocations below this value where possible.
    +*/
    +#if !defined(SQLITE_MALLOC_SOFT_LIMIT)
    +# define SQLITE_MALLOC_SOFT_LIMIT 1024
    +#endif
    +
    +/*
    +** We need to define _XOPEN_SOURCE as follows in order to enable
    +** recursive mutexes on most Unix systems.  But Mac OS X is different.
    +** The _XOPEN_SOURCE define causes problems for Mac OS X we are told,
    +** so it is omitted there.  See ticket #2673.
    +**
    +** Later we learn that _XOPEN_SOURCE is poorly or incorrectly
    +** implemented on some systems.  So we avoid defining it at all
    +** if it is already defined or if it is unneeded because we are
    +** not doing a threadsafe build.  Ticket #2681.
    +**
    +** See also ticket #2741.
    +*/
    +#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
    +#  define _XOPEN_SOURCE 500  /* Needed to enable pthread recursive mutexes */
    +#endif
    +
    +/*
    +** The TCL headers are only needed when compiling the TCL bindings.
    +*/
    +#if defined(SQLITE_TCL) || defined(TCLSH)
    +# include <tcl.h>
    +#endif
    +
    +/*
    +** Many people are failing to set -DNDEBUG=1 when compiling SQLite.
    +** Setting NDEBUG makes the code smaller and run faster.  So the following
    +** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1
    +** option is set.  Thus NDEBUG becomes an opt-in rather than an opt-out
    +** feature.
    +*/
    +#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
    +# define NDEBUG 1
    +#endif
    +
    +/*
    +** The testcase() macro is used to aid in coverage testing.  When 
    +** doing coverage testing, the condition inside the argument to
    +** testcase() must be evaluated both true and false in order to
    +** get full branch coverage.  The testcase() macro is inserted
    +** to help ensure adequate test coverage in places where simple
    +** condition/decision coverage is inadequate.  For example, testcase()
    +** can be used to make sure boundary values are tested.  For
    +** bitmask tests, testcase() can be used to make sure each bit
    +** is significant and used at least once.  On switch statements
    +** where multiple cases go to the same block of code, testcase()
    +** can insure that all cases are evaluated.
    +**
    +*/
    +#ifdef SQLITE_COVERAGE_TEST
    +SQLITE_PRIVATE   void sqlite3Coverage(int);
    +# define testcase(X)  if( X ){ sqlite3Coverage(__LINE__); }
    +#else
    +# define testcase(X)
    +#endif
    +
    +/*
    +** The TESTONLY macro is used to enclose variable declarations or
    +** other bits of code that are needed to support the arguments
    +** within testcase() and assert() macros.
    +*/
    +#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST)
    +# define TESTONLY(X)  X
    +#else
    +# define TESTONLY(X)
    +#endif
    +
    +/*
    +** Sometimes we need a small amount of code such as a variable initialization
    +** to setup for a later assert() statement.  We do not want this code to
    +** appear when assert() is disabled.  The following macro is therefore
    +** used to contain that setup code.  The "VVA" acronym stands for
    +** "Verification, Validation, and Accreditation".  In other words, the
    +** code within VVA_ONLY() will only run during verification processes.
    +*/
    +#ifndef NDEBUG
    +# define VVA_ONLY(X)  X
    +#else
    +# define VVA_ONLY(X)
    +#endif
    +
    +/*
    +** The ALWAYS and NEVER macros surround boolean expressions which 
    +** are intended to always be true or false, respectively.  Such
    +** expressions could be omitted from the code completely.  But they
    +** are included in a few cases in order to enhance the resilience
    +** of SQLite to unexpected behavior - to make the code "self-healing"
    +** or "ductile" rather than being "brittle" and crashing at the first
    +** hint of unplanned behavior.
    +**
    +** In other words, ALWAYS and NEVER are added for defensive code.
    +**
    +** When doing coverage testing ALWAYS and NEVER are hard-coded to
    +** be true and false so that the unreachable code then specify will
    +** not be counted as untested code.
    +*/
    +#if defined(SQLITE_COVERAGE_TEST)
    +# define ALWAYS(X)      (1)
    +# define NEVER(X)       (0)
    +#elif !defined(NDEBUG)
    +# define ALWAYS(X)      ((X)?1:(assert(0),0))
    +# define NEVER(X)       ((X)?(assert(0),1):0)
    +#else
    +# define ALWAYS(X)      (X)
    +# define NEVER(X)       (X)
    +#endif
    +
    +/*
    +** The macro unlikely() is a hint that surrounds a boolean
    +** expression that is usually false.  Macro likely() surrounds
    +** a boolean expression that is usually true.  GCC is able to
    +** use these hints to generate better code, sometimes.
    +*/
    +#if defined(__GNUC__) && 0
    +# define likely(X)    __builtin_expect((X),1)
    +# define unlikely(X)  __builtin_expect((X),0)
    +#else
    +# define likely(X)    !!(X)
    +# define unlikely(X)  !!(X)
    +#endif
    +
    +/************** Include sqlite3.h in the middle of sqliteInt.h ***************/
    +/************** Begin file sqlite3.h *****************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the interface that the SQLite library
    +** presents to client programs.  If a C-function, structure, datatype,
    +** or constant definition does not appear in this file, then it is
    +** not a published API of SQLite, is subject to change without
    +** notice, and should not be referenced by programs that use SQLite.
    +**
    +** Some of the definitions that are in this file are marked as
    +** "experimental".  Experimental interfaces are normally new
    +** features recently added to SQLite.  We do not anticipate changes
    +** to experimental interfaces but reserve the right to make minor changes
    +** if experience from use "in the wild" suggest such changes are prudent.
    +**
    +** The official C-language API documentation for SQLite is derived
    +** from comments in this file.  This file is the authoritative source
    +** on how SQLite interfaces are suppose to operate.
    +**
    +** The name of this file under configuration management is "sqlite.h.in".
    +** The makefile makes some minor changes to this file (such as inserting
    +** the version number) and changes its name to "sqlite3.h" as
    +** part of the build process.
    +*/
    +#ifndef _SQLITE3_H_
    +#define _SQLITE3_H_
    +#include <stdarg.h>     /* Needed for the definition of va_list */
    +
    +/*
    +** Make sure we can call this stuff from C++.
    +*/
    +#if 0
    +extern "C" {
    +#endif
    +
    +
    +/*
    +** Add the ability to override 'extern'
    +*/
    +#ifndef SQLITE_EXTERN
    +# define SQLITE_EXTERN extern
    +#endif
    +
    +#ifndef SQLITE_API
    +# define SQLITE_API
    +#endif
    +
    +
    +/*
    +** These no-op macros are used in front of interfaces to mark those
    +** interfaces as either deprecated or experimental.  New applications
    +** should not use deprecated interfaces - they are support for backwards
    +** compatibility only.  Application writers should be aware that
    +** experimental interfaces are subject to change in point releases.
    +**
    +** These macros used to resolve to various kinds of compiler magic that
    +** would generate warning messages when they were used.  But that
    +** compiler magic ended up generating such a flurry of bug reports
    +** that we have taken it all out and gone back to using simple
    +** noop macros.
    +*/
    +#define SQLITE_DEPRECATED
    +#define SQLITE_EXPERIMENTAL
    +
    +/*
    +** Ensure these symbols were not defined by some previous header file.
    +*/
    +#ifdef SQLITE_VERSION
    +# undef SQLITE_VERSION
    +#endif
    +#ifdef SQLITE_VERSION_NUMBER
    +# undef SQLITE_VERSION_NUMBER
    +#endif
    +
    +/*
    +** CAPI3REF: Compile-Time Library Version Numbers {H10010} <S60100>
    +**
    +** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in
    +** the sqlite3.h file specify the version of SQLite with which
    +** that header file is associated.
    +**
    +** The "version" of SQLite is a string of the form "W.X.Y" or "W.X.Y.Z".
    +** The W value is major version number and is always 3 in SQLite3.
    +** The W value only changes when backwards compatibility is
    +** broken and we intend to never break backwards compatibility.
    +** The X value is the minor version number and only changes when
    +** there are major feature enhancements that are forwards compatible
    +** but not backwards compatible.
    +** The Y value is the release number and is incremented with
    +** each release but resets back to 0 whenever X is incremented.
    +** The Z value only appears on branch releases.
    +**
    +** The SQLITE_VERSION_NUMBER is an integer that is computed as
    +** follows:
    +**
    +** <blockquote><pre>
    +** SQLITE_VERSION_NUMBER = W*1000000 + X*1000 + Y
    +** </pre></blockquote>
    +**
    +** Since version 3.6.18, SQLite source code has been stored in the
    +** <a href="http://www.fossil-scm.org/">fossil configuration management
    +** system</a>.  The SQLITE_SOURCE_ID
    +** macro is a string which identifies a particular check-in of SQLite
    +** within its configuration management system.  The string contains the
    +** date and time of the check-in (UTC) and an SHA1 hash of the entire
    +** source tree.
    +**
    +** See also: [sqlite3_libversion()],
    +** [sqlite3_libversion_number()], [sqlite3_sourceid()],
    +** [sqlite_version()] and [sqlite_source_id()].
    +**
    +** Requirements: [H10011] [H10014]
    +*/
    +#define SQLITE_VERSION        "3.6.20"
    +#define SQLITE_VERSION_NUMBER 3006020
    +#define SQLITE_SOURCE_ID      "2009-11-04 13:30:02 eb7a544fe49d1626bacecfe53ddc03fe082e3243"
    +
    +/*
    +** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
    +** KEYWORDS: sqlite3_version
    +**
    +** These interfaces provide the same information as the [SQLITE_VERSION],
    +** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] #defines in the header,
    +** but are associated with the library instead of the header file.  Cautious
    +** programmers might include assert() statements in their application to
    +** verify that values returned by these interfaces match the macros in
    +** the header, and thus insure that the application is
    +** compiled with matching library and header files.
    +**
    +** <blockquote><pre>
    +** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
    +** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
    +** assert( strcmp(sqlite3_libversion,SQLITE_VERSION)==0 );
    +** </pre></blockquote>
    +**
    +** The sqlite3_libversion() function returns the same information as is
    +** in the sqlite3_version[] string constant.  The function is provided
    +** for use in DLLs since DLL users usually do not have direct access to string
    +** constants within the DLL.  Similarly, the sqlite3_sourceid() function
    +** returns the same information as is in the [SQLITE_SOURCE_ID] #define of
    +** the header file.
    +**
    +** See also: [sqlite_version()] and [sqlite_source_id()].
    +**
    +** Requirements: [H10021] [H10022] [H10023]
    +*/
    +SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
    +SQLITE_API const char *sqlite3_libversion(void);
    +SQLITE_API const char *sqlite3_sourceid(void);
    +SQLITE_API int sqlite3_libversion_number(void);
    +
    +/*
    +** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} <S60100>
    +**
    +** SQLite can be compiled with or without mutexes.  When
    +** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
    +** are enabled and SQLite is threadsafe.  When the
    +** [SQLITE_THREADSAFE] macro is 0, 
    +** the mutexes are omitted.  Without the mutexes, it is not safe
    +** to use SQLite concurrently from more than one thread.
    +**
    +** Enabling mutexes incurs a measurable performance penalty.
    +** So if speed is of utmost importance, it makes sense to disable
    +** the mutexes.  But for maximum safety, mutexes should be enabled.
    +** The default behavior is for mutexes to be enabled.
    +**
    +** This interface can be used by an application to make sure that the
    +** version of SQLite that it is linking against was compiled with
    +** the desired setting of the [SQLITE_THREADSAFE] macro.
    +**
    +** This interface only reports on the compile-time mutex setting
    +** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with
    +** SQLITE_THREADSAFE=1 then mutexes are enabled by default but
    +** can be fully or partially disabled using a call to [sqlite3_config()]
    +** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
    +** or [SQLITE_CONFIG_MUTEX].  The return value of this function shows
    +** only the default compile-time setting, not any run-time changes
    +** to that setting.
    +**
    +** See the [threading mode] documentation for additional information.
    +**
    +** Requirements: [H10101] [H10102]
    +*/
    +SQLITE_API int sqlite3_threadsafe(void);
    +
    +/*
    +** CAPI3REF: Database Connection Handle {H12000} <S40200>
    +** KEYWORDS: {database connection} {database connections}
    +**
    +** Each open SQLite database is represented by a pointer to an instance of
    +** the opaque structure named "sqlite3".  It is useful to think of an sqlite3
    +** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
    +** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
    +** is its destructor.  There are many other interfaces (such as
    +** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
    +** [sqlite3_busy_timeout()] to name but three) that are methods on an
    +** sqlite3 object.
    +*/
    +typedef struct sqlite3 sqlite3;
    +
    +/*
    +** CAPI3REF: 64-Bit Integer Types {H10200} <S10110>
    +** KEYWORDS: sqlite_int64 sqlite_uint64
    +**
    +** Because there is no cross-platform way to specify 64-bit integer types
    +** SQLite includes typedefs for 64-bit signed and unsigned integers.
    +**
    +** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
    +** The sqlite_int64 and sqlite_uint64 types are supported for backwards
    +** compatibility only.
    +**
    +** Requirements: [H10201] [H10202]
    +*/
    +#ifdef SQLITE_INT64_TYPE
    +  typedef SQLITE_INT64_TYPE sqlite_int64;
    +  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
    +#elif defined(_MSC_VER) || defined(__BORLANDC__)
    +  typedef __int64 sqlite_int64;
    +  typedef unsigned __int64 sqlite_uint64;
    +#else
    +  typedef long long int sqlite_int64;
    +  typedef unsigned long long int sqlite_uint64;
    +#endif
    +typedef sqlite_int64 sqlite3_int64;
    +typedef sqlite_uint64 sqlite3_uint64;
    +
    +/*
    +** If compiling for a processor that lacks floating point support,
    +** substitute integer for floating-point.
    +*/
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +# define double sqlite3_int64
    +#endif
    +
    +/*
    +** CAPI3REF: Closing A Database Connection {H12010} <S30100><S40200>
    +**
    +** This routine is the destructor for the [sqlite3] object.
    +**
    +** Applications must [sqlite3_finalize | finalize] all [prepared statements]
    +** and [sqlite3_blob_close | close] all [BLOB handles] associated with
    +** the [sqlite3] object prior to attempting to close the object.
    +**
    +** If [sqlite3_close()] is invoked while a transaction is open,
    +** the transaction is automatically rolled back.
    +**
    +** The C parameter to [sqlite3_close(C)] must be either a NULL
    +** pointer or an [sqlite3] object pointer obtained
    +** from [sqlite3_open()], [sqlite3_open16()], or
    +** [sqlite3_open_v2()], and not previously closed.
    +**
    +** Requirements:
    +** [H12011] [H12012] [H12013] [H12014] [H12015] [H12019]
    +*/
    +SQLITE_API int sqlite3_close(sqlite3 *);
    +
    +/*
    +** The type for a callback function.
    +** This is legacy and deprecated.  It is included for historical
    +** compatibility and is not documented.
    +*/
    +typedef int (*sqlite3_callback)(void*,int,char**, char**);
    +
    +/*
    +** CAPI3REF: One-Step Query Execution Interface {H12100} <S10000>
    +**
    +** The sqlite3_exec() interface is a convenient way of running one or more
    +** SQL statements without having to write a lot of C code.  The UTF-8 encoded
    +** SQL statements are passed in as the second parameter to sqlite3_exec().
    +** The statements are evaluated one by one until either an error or
    +** an interrupt is encountered, or until they are all done.  The 3rd parameter
    +** is an optional callback that is invoked once for each row of any query
    +** results produced by the SQL statements.  The 5th parameter tells where
    +** to write any error messages.
    +**
    +** The error message passed back through the 5th parameter is held
    +** in memory obtained from [sqlite3_malloc()].  To avoid a memory leak,
    +** the calling application should call [sqlite3_free()] on any error
    +** message returned through the 5th parameter when it has finished using
    +** the error message.
    +**
    +** If the SQL statement in the 2nd parameter is NULL or an empty string
    +** or a string containing only whitespace and comments, then no SQL
    +** statements are evaluated and the database is not changed.
    +**
    +** The sqlite3_exec() interface is implemented in terms of
    +** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].
    +** The sqlite3_exec() routine does nothing to the database that cannot be done
    +** by [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].
    +**
    +** The first parameter to [sqlite3_exec()] must be an valid and open
    +** [database connection].
    +**
    +** The database connection must not be closed while
    +** [sqlite3_exec()] is running.
    +**
    +** The calling function should use [sqlite3_free()] to free
    +** the memory that *errmsg is left pointing at once the error
    +** message is no longer needed.
    +**
    +** The SQL statement text in the 2nd parameter to [sqlite3_exec()]
    +** must remain unchanged while [sqlite3_exec()] is running.
    +**
    +** Requirements:
    +** [H12101] [H12102] [H12104] [H12105] [H12107] [H12110] [H12113] [H12116]
    +** [H12119] [H12122] [H12125] [H12131] [H12134] [H12137] [H12138]
    +*/
    +SQLITE_API int sqlite3_exec(
    +  sqlite3*,                                  /* An open database */
    +  const char *sql,                           /* SQL to be evaluated */
    +  int (*callback)(void*,int,char**,char**),  /* Callback function */
    +  void *,                                    /* 1st argument to callback */
    +  char **errmsg                              /* Error msg written here */
    +);
    +
    +/*
    +** CAPI3REF: Result Codes {H10210} <S10700>
    +** KEYWORDS: SQLITE_OK {error code} {error codes}
    +** KEYWORDS: {result code} {result codes}
    +**
    +** Many SQLite functions return an integer result code from the set shown
    +** here in order to indicates success or failure.
    +**
    +** New error codes may be added in future versions of SQLite.
    +**
    +** See also: [SQLITE_IOERR_READ | extended result codes]
    +*/
    +#define SQLITE_OK           0   /* Successful result */
    +/* beginning-of-error-codes */
    +#define SQLITE_ERROR        1   /* SQL error or missing database */
    +#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
    +#define SQLITE_PERM         3   /* Access permission denied */
    +#define SQLITE_ABORT        4   /* Callback routine requested an abort */
    +#define SQLITE_BUSY         5   /* The database file is locked */
    +#define SQLITE_LOCKED       6   /* A table in the database is locked */
    +#define SQLITE_NOMEM        7   /* A malloc() failed */
    +#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
    +#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
    +#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
    +#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
    +#define SQLITE_NOTFOUND    12   /* NOT USED. Table or record not found */
    +#define SQLITE_FULL        13   /* Insertion failed because database is full */
    +#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
    +#define SQLITE_PROTOCOL    15   /* NOT USED. Database lock protocol error */
    +#define SQLITE_EMPTY       16   /* Database is empty */
    +#define SQLITE_SCHEMA      17   /* The database schema changed */
    +#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
    +#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
    +#define SQLITE_MISMATCH    20   /* Data type mismatch */
    +#define SQLITE_MISUSE      21   /* Library used incorrectly */
    +#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
    +#define SQLITE_AUTH        23   /* Authorization denied */
    +#define SQLITE_FORMAT      24   /* Auxiliary database format error */
    +#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
    +#define SQLITE_NOTADB      26   /* File opened that is not a database file */
    +#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
    +#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
    +/* end-of-error-codes */
    +
    +/*
    +** CAPI3REF: Extended Result Codes {H10220} <S10700>
    +** KEYWORDS: {extended error code} {extended error codes}
    +** KEYWORDS: {extended result code} {extended result codes}
    +**
    +** In its default configuration, SQLite API routines return one of 26 integer
    +** [SQLITE_OK | result codes].  However, experience has shown that many of
    +** these result codes are too coarse-grained.  They do not provide as
    +** much information about problems as programmers might like.  In an effort to
    +** address this, newer versions of SQLite (version 3.3.8 and later) include
    +** support for additional result codes that provide more detailed information
    +** about errors. The extended result codes are enabled or disabled
    +** on a per database connection basis using the
    +** [sqlite3_extended_result_codes()] API.
    +**
    +** Some of the available extended result codes are listed here.
    +** One may expect the number of extended result codes will be expand
    +** over time.  Software that uses extended result codes should expect
    +** to see new result codes in future releases of SQLite.
    +**
    +** The SQLITE_OK result code will never be extended.  It will always
    +** be exactly zero.
    +*/
    +#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
    +#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
    +#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
    +#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
    +#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
    +#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
    +#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))
    +#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))
    +#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))
    +#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))
    +#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))
    +#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))
    +#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))
    +#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
    +#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))
    +#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))
    +#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))
    +#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED | (1<<8) )
    +
    +/*
    +** CAPI3REF: Flags For File Open Operations {H10230} <H11120> <H12700>
    +**
    +** These bit values are intended for use in the
    +** 3rd parameter to the [sqlite3_open_v2()] interface and
    +** in the 4th parameter to the xOpen method of the
    +** [sqlite3_vfs] object.
    +*/
    +#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */
    +#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */
    +#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */
    +#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */
    +#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */
    +#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */
    +#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */
    +#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */
    +#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */
    +#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */
    +
    +/*
    +** CAPI3REF: Device Characteristics {H10240} <H11120>
    +**
    +** The xDeviceCapabilities method of the [sqlite3_io_methods]
    +** object returns an integer which is a vector of the these
    +** bit values expressing I/O characteristics of the mass storage
    +** device that holds the file that the [sqlite3_io_methods]
    +** refers to.
    +**
    +** The SQLITE_IOCAP_ATOMIC property means that all writes of
    +** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
    +** mean that writes of blocks that are nnn bytes in size and
    +** are aligned to an address which is an integer multiple of
    +** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
    +** that when data is appended to a file, the data is appended
    +** first then the size of the file is extended, never the other
    +** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
    +** information is written to disk in the same order as calls
    +** to xWrite().
    +*/
    +#define SQLITE_IOCAP_ATOMIC          0x00000001
    +#define SQLITE_IOCAP_ATOMIC512       0x00000002
    +#define SQLITE_IOCAP_ATOMIC1K        0x00000004
    +#define SQLITE_IOCAP_ATOMIC2K        0x00000008
    +#define SQLITE_IOCAP_ATOMIC4K        0x00000010
    +#define SQLITE_IOCAP_ATOMIC8K        0x00000020
    +#define SQLITE_IOCAP_ATOMIC16K       0x00000040
    +#define SQLITE_IOCAP_ATOMIC32K       0x00000080
    +#define SQLITE_IOCAP_ATOMIC64K       0x00000100
    +#define SQLITE_IOCAP_SAFE_APPEND     0x00000200
    +#define SQLITE_IOCAP_SEQUENTIAL      0x00000400
    +
    +/*
    +** CAPI3REF: File Locking Levels {H10250} <H11120> <H11310>
    +**
    +** SQLite uses one of these integer values as the second
    +** argument to calls it makes to the xLock() and xUnlock() methods
    +** of an [sqlite3_io_methods] object.
    +*/
    +#define SQLITE_LOCK_NONE          0
    +#define SQLITE_LOCK_SHARED        1
    +#define SQLITE_LOCK_RESERVED      2
    +#define SQLITE_LOCK_PENDING       3
    +#define SQLITE_LOCK_EXCLUSIVE     4
    +
    +/*
    +** CAPI3REF: Synchronization Type Flags {H10260} <H11120>
    +**
    +** When SQLite invokes the xSync() method of an
    +** [sqlite3_io_methods] object it uses a combination of
    +** these integer values as the second argument.
    +**
    +** When the SQLITE_SYNC_DATAONLY flag is used, it means that the
    +** sync operation only needs to flush data to mass storage.  Inode
    +** information need not be flushed. If the lower four bits of the flag
    +** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
    +** If the lower four bits equal SQLITE_SYNC_FULL, that means
    +** to use Mac OS X style fullsync instead of fsync().
    +*/
    +#define SQLITE_SYNC_NORMAL        0x00002
    +#define SQLITE_SYNC_FULL          0x00003
    +#define SQLITE_SYNC_DATAONLY      0x00010
    +
    +/*
    +** CAPI3REF: OS Interface Open File Handle {H11110} <S20110>
    +**
    +** An [sqlite3_file] object represents an open file in the 
    +** [sqlite3_vfs | OS interface layer].  Individual OS interface
    +** implementations will
    +** want to subclass this object by appending additional fields
    +** for their own use.  The pMethods entry is a pointer to an
    +** [sqlite3_io_methods] object that defines methods for performing
    +** I/O operations on the open file.
    +*/
    +typedef struct sqlite3_file sqlite3_file;
    +struct sqlite3_file {
    +  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
    +};
    +
    +/*
    +** CAPI3REF: OS Interface File Virtual Methods Object {H11120} <S20110>
    +**
    +** Every file opened by the [sqlite3_vfs] xOpen method populates an
    +** [sqlite3_file] object (or, more commonly, a subclass of the
    +** [sqlite3_file] object) with a pointer to an instance of this object.
    +** This object defines the methods used to perform various operations
    +** against the open file represented by the [sqlite3_file] object.
    +**
    +** If the xOpen method sets the sqlite3_file.pMethods element 
    +** to a non-NULL pointer, then the sqlite3_io_methods.xClose method
    +** may be invoked even if the xOpen reported that it failed.  The
    +** only way to prevent a call to xClose following a failed xOpen
    +** is for the xOpen to set the sqlite3_file.pMethods element to NULL.
    +**
    +** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
    +** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
    +** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
    +** flag may be ORed in to indicate that only the data of the file
    +** and not its inode needs to be synced.
    +**
    +** The integer values to xLock() and xUnlock() are one of
    +** <ul>
    +** <li> [SQLITE_LOCK_NONE],
    +** <li> [SQLITE_LOCK_SHARED],
    +** <li> [SQLITE_LOCK_RESERVED],
    +** <li> [SQLITE_LOCK_PENDING], or
    +** <li> [SQLITE_LOCK_EXCLUSIVE].
    +** </ul>
    +** xLock() increases the lock. xUnlock() decreases the lock.
    +** The xCheckReservedLock() method checks whether any database connection,
    +** either in this process or in some other process, is holding a RESERVED,
    +** PENDING, or EXCLUSIVE lock on the file.  It returns true
    +** if such a lock exists and false otherwise.
    +**
    +** The xFileControl() method is a generic interface that allows custom
    +** VFS implementations to directly control an open file using the
    +** [sqlite3_file_control()] interface.  The second "op" argument is an
    +** integer opcode.  The third argument is a generic pointer intended to
    +** point to a structure that may contain arguments or space in which to
    +** write return values.  Potential uses for xFileControl() might be
    +** functions to enable blocking locks with timeouts, to change the
    +** locking strategy (for example to use dot-file locks), to inquire
    +** about the status of a lock, or to break stale locks.  The SQLite
    +** core reserves all opcodes less than 100 for its own use.
    +** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
    +** Applications that define a custom xFileControl method should use opcodes
    +** greater than 100 to avoid conflicts.
    +**
    +** The xSectorSize() method returns the sector size of the
    +** device that underlies the file.  The sector size is the
    +** minimum write that can be performed without disturbing
    +** other bytes in the file.  The xDeviceCharacteristics()
    +** method returns a bit vector describing behaviors of the
    +** underlying device:
    +**
    +** <ul>
    +** <li> [SQLITE_IOCAP_ATOMIC]
    +** <li> [SQLITE_IOCAP_ATOMIC512]
    +** <li> [SQLITE_IOCAP_ATOMIC1K]
    +** <li> [SQLITE_IOCAP_ATOMIC2K]
    +** <li> [SQLITE_IOCAP_ATOMIC4K]
    +** <li> [SQLITE_IOCAP_ATOMIC8K]
    +** <li> [SQLITE_IOCAP_ATOMIC16K]
    +** <li> [SQLITE_IOCAP_ATOMIC32K]
    +** <li> [SQLITE_IOCAP_ATOMIC64K]
    +** <li> [SQLITE_IOCAP_SAFE_APPEND]
    +** <li> [SQLITE_IOCAP_SEQUENTIAL]
    +** </ul>
    +**
    +** The SQLITE_IOCAP_ATOMIC property means that all writes of
    +** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
    +** mean that writes of blocks that are nnn bytes in size and
    +** are aligned to an address which is an integer multiple of
    +** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
    +** that when data is appended to a file, the data is appended
    +** first then the size of the file is extended, never the other
    +** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
    +** information is written to disk in the same order as calls
    +** to xWrite().
    +**
    +** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
    +** in the unread portions of the buffer with zeros.  A VFS that
    +** fails to zero-fill short reads might seem to work.  However,
    +** failure to zero-fill short reads will eventually lead to
    +** database corruption.
    +*/
    +typedef struct sqlite3_io_methods sqlite3_io_methods;
    +struct sqlite3_io_methods {
    +  int iVersion;
    +  int (*xClose)(sqlite3_file*);
    +  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
    +  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
    +  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
    +  int (*xSync)(sqlite3_file*, int flags);
    +  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
    +  int (*xLock)(sqlite3_file*, int);
    +  int (*xUnlock)(sqlite3_file*, int);
    +  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
    +  int (*xFileControl)(sqlite3_file*, int op, void *pArg);
    +  int (*xSectorSize)(sqlite3_file*);
    +  int (*xDeviceCharacteristics)(sqlite3_file*);
    +  /* Additional methods may be added in future releases */
    +};
    +
    +/*
    +** CAPI3REF: Standard File Control Opcodes {H11310} <S30800>
    +**
    +** These integer constants are opcodes for the xFileControl method
    +** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
    +** interface.
    +**
    +** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This
    +** opcode causes the xFileControl method to write the current state of
    +** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],
    +** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])
    +** into an integer that the pArg argument points to. This capability
    +** is used during testing and only needs to be supported when SQLITE_TEST
    +** is defined.
    +*/
    +#define SQLITE_FCNTL_LOCKSTATE        1
    +#define SQLITE_GET_LOCKPROXYFILE      2
    +#define SQLITE_SET_LOCKPROXYFILE      3
    +#define SQLITE_LAST_ERRNO             4
    +
    +/*
    +** CAPI3REF: Mutex Handle {H17110} <S20130>
    +**
    +** The mutex module within SQLite defines [sqlite3_mutex] to be an
    +** abstract type for a mutex object.  The SQLite core never looks
    +** at the internal representation of an [sqlite3_mutex].  It only
    +** deals with pointers to the [sqlite3_mutex] object.
    +**
    +** Mutexes are created using [sqlite3_mutex_alloc()].
    +*/
    +typedef struct sqlite3_mutex sqlite3_mutex;
    +
    +/*
    +** CAPI3REF: OS Interface Object {H11140} <S20100>
    +**
    +** An instance of the sqlite3_vfs object defines the interface between
    +** the SQLite core and the underlying operating system.  The "vfs"
    +** in the name of the object stands for "virtual file system".
    +**
    +** The value of the iVersion field is initially 1 but may be larger in
    +** future versions of SQLite.  Additional fields may be appended to this
    +** object when the iVersion value is increased.  Note that the structure
    +** of the sqlite3_vfs object changes in the transaction between
    +** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
    +** modified.
    +**
    +** The szOsFile field is the size of the subclassed [sqlite3_file]
    +** structure used by this VFS.  mxPathname is the maximum length of
    +** a pathname in this VFS.
    +**
    +** Registered sqlite3_vfs objects are kept on a linked list formed by
    +** the pNext pointer.  The [sqlite3_vfs_register()]
    +** and [sqlite3_vfs_unregister()] interfaces manage this list
    +** in a thread-safe way.  The [sqlite3_vfs_find()] interface
    +** searches the list.  Neither the application code nor the VFS
    +** implementation should use the pNext pointer.
    +**
    +** The pNext field is the only field in the sqlite3_vfs
    +** structure that SQLite will ever modify.  SQLite will only access
    +** or modify this field while holding a particular static mutex.
    +** The application should never modify anything within the sqlite3_vfs
    +** object once the object has been registered.
    +**
    +** The zName field holds the name of the VFS module.  The name must
    +** be unique across all VFS modules.
    +**
    +** SQLite will guarantee that the zFilename parameter to xOpen
    +** is either a NULL pointer or string obtained
    +** from xFullPathname().  SQLite further guarantees that
    +** the string will be valid and unchanged until xClose() is
    +** called. Because of the previous sentence,
    +** the [sqlite3_file] can safely store a pointer to the
    +** filename if it needs to remember the filename for some reason.
    +** If the zFilename parameter is xOpen is a NULL pointer then xOpen
    +** must invent its own temporary name for the file.  Whenever the 
    +** xFilename parameter is NULL it will also be the case that the
    +** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
    +**
    +** The flags argument to xOpen() includes all bits set in
    +** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
    +** or [sqlite3_open16()] is used, then flags includes at least
    +** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. 
    +** If xOpen() opens a file read-only then it sets *pOutFlags to
    +** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
    +**
    +** SQLite will also add one of the following flags to the xOpen()
    +** call, depending on the object being opened:
    +**
    +** <ul>
    +** <li>  [SQLITE_OPEN_MAIN_DB]
    +** <li>  [SQLITE_OPEN_MAIN_JOURNAL]
    +** <li>  [SQLITE_OPEN_TEMP_DB]
    +** <li>  [SQLITE_OPEN_TEMP_JOURNAL]
    +** <li>  [SQLITE_OPEN_TRANSIENT_DB]
    +** <li>  [SQLITE_OPEN_SUBJOURNAL]
    +** <li>  [SQLITE_OPEN_MASTER_JOURNAL]
    +** </ul>
    +**
    +** The file I/O implementation can use the object type flags to
    +** change the way it deals with files.  For example, an application
    +** that does not care about crash recovery or rollback might make
    +** the open of a journal file a no-op.  Writes to this journal would
    +** also be no-ops, and any attempt to read the journal would return
    +** SQLITE_IOERR.  Or the implementation might recognize that a database
    +** file will be doing page-aligned sector reads and writes in a random
    +** order and set up its I/O subsystem accordingly.
    +**
    +** SQLite might also add one of the following flags to the xOpen method:
    +**
    +** <ul>
    +** <li> [SQLITE_OPEN_DELETEONCLOSE]
    +** <li> [SQLITE_OPEN_EXCLUSIVE]
    +** </ul>
    +**
    +** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
    +** deleted when it is closed.  The [SQLITE_OPEN_DELETEONCLOSE]
    +** will be set for TEMP  databases, journals and for subjournals.
    +**
    +** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
    +** with the [SQLITE_OPEN_CREATE] flag, which are both directly
    +** analogous to the O_EXCL and O_CREAT flags of the POSIX open()
    +** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the 
    +** SQLITE_OPEN_CREATE, is used to indicate that file should always
    +** be created, and that it is an error if it already exists.
    +** It is <i>not</i> used to indicate the file should be opened 
    +** for exclusive access.
    +**
    +** At least szOsFile bytes of memory are allocated by SQLite
    +** to hold the  [sqlite3_file] structure passed as the third
    +** argument to xOpen.  The xOpen method does not have to
    +** allocate the structure; it should just fill it in.  Note that
    +** the xOpen method must set the sqlite3_file.pMethods to either
    +** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
    +** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
    +** element will be valid after xOpen returns regardless of the success
    +** or failure of the xOpen call.
    +**
    +** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
    +** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
    +** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
    +** to test whether a file is at least readable.   The file can be a
    +** directory.
    +**
    +** SQLite will always allocate at least mxPathname+1 bytes for the
    +** output buffer xFullPathname.  The exact size of the output buffer
    +** is also passed as a parameter to both  methods. If the output buffer
    +** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
    +** handled as a fatal error by SQLite, vfs implementations should endeavor
    +** to prevent this by setting mxPathname to a sufficiently large value.
    +**
    +** The xRandomness(), xSleep(), and xCurrentTime() interfaces
    +** are not strictly a part of the filesystem, but they are
    +** included in the VFS structure for completeness.
    +** The xRandomness() function attempts to return nBytes bytes
    +** of good-quality randomness into zOut.  The return value is
    +** the actual number of bytes of randomness obtained.
    +** The xSleep() method causes the calling thread to sleep for at
    +** least the number of microseconds given.  The xCurrentTime()
    +** method returns a Julian Day Number for the current date and time.
    +**
    +*/
    +typedef struct sqlite3_vfs sqlite3_vfs;
    +struct sqlite3_vfs {
    +  int iVersion;            /* Structure version number */
    +  int szOsFile;            /* Size of subclassed sqlite3_file */
    +  int mxPathname;          /* Maximum file pathname length */
    +  sqlite3_vfs *pNext;      /* Next registered VFS */
    +  const char *zName;       /* Name of this virtual file system */
    +  void *pAppData;          /* Pointer to application-specific data */
    +  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
    +               int flags, int *pOutFlags);
    +  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
    +  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
    +  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
    +  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
    +  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
    +  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
    +  void (*xDlClose)(sqlite3_vfs*, void*);
    +  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
    +  int (*xSleep)(sqlite3_vfs*, int microseconds);
    +  int (*xCurrentTime)(sqlite3_vfs*, double*);
    +  int (*xGetLastError)(sqlite3_vfs*, int, char *);
    +  /* New fields may be appended in figure versions.  The iVersion
    +  ** value will increment whenever this happens. */
    +};
    +
    +/*
    +** CAPI3REF: Flags for the xAccess VFS method {H11190} <H11140>
    +**
    +** These integer constants can be used as the third parameter to
    +** the xAccess method of an [sqlite3_vfs] object. {END}  They determine
    +** what kind of permissions the xAccess method is looking for.
    +** With SQLITE_ACCESS_EXISTS, the xAccess method
    +** simply checks whether the file exists.
    +** With SQLITE_ACCESS_READWRITE, the xAccess method
    +** checks whether the file is both readable and writable.
    +** With SQLITE_ACCESS_READ, the xAccess method
    +** checks whether the file is readable.
    +*/
    +#define SQLITE_ACCESS_EXISTS    0
    +#define SQLITE_ACCESS_READWRITE 1
    +#define SQLITE_ACCESS_READ      2
    +
    +/*
    +** CAPI3REF: Initialize The SQLite Library {H10130} <S20000><S30100>
    +**
    +** The sqlite3_initialize() routine initializes the
    +** SQLite library.  The sqlite3_shutdown() routine
    +** deallocates any resources that were allocated by sqlite3_initialize().
    +** This routines are designed to aid in process initialization and
    +** shutdown on embedded systems.  Workstation applications using
    +** SQLite normally do not need to invoke either of these routines.
    +**
    +** A call to sqlite3_initialize() is an "effective" call if it is
    +** the first time sqlite3_initialize() is invoked during the lifetime of
    +** the process, or if it is the first time sqlite3_initialize() is invoked
    +** following a call to sqlite3_shutdown().  Only an effective call
    +** of sqlite3_initialize() does any initialization.  All other calls
    +** are harmless no-ops.
    +**
    +** A call to sqlite3_shutdown() is an "effective" call if it is the first
    +** call to sqlite3_shutdown() since the last sqlite3_initialize().  Only
    +** an effective call to sqlite3_shutdown() does any deinitialization.
    +** All other valid calls to sqlite3_shutdown() are harmless no-ops.
    +**
    +** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
    +** is not.  The sqlite3_shutdown() interface must only be called from a
    +** single thread.  All open [database connections] must be closed and all
    +** other SQLite resources must be deallocated prior to invoking
    +** sqlite3_shutdown().
    +**
    +** Among other things, sqlite3_initialize() will invoke
    +** sqlite3_os_init().  Similarly, sqlite3_shutdown()
    +** will invoke sqlite3_os_end().
    +**
    +** The sqlite3_initialize() routine returns [SQLITE_OK] on success.
    +** If for some reason, sqlite3_initialize() is unable to initialize
    +** the library (perhaps it is unable to allocate a needed resource such
    +** as a mutex) it returns an [error code] other than [SQLITE_OK].
    +**
    +** The sqlite3_initialize() routine is called internally by many other
    +** SQLite interfaces so that an application usually does not need to
    +** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]
    +** calls sqlite3_initialize() so the SQLite library will be automatically
    +** initialized when [sqlite3_open()] is called if it has not be initialized
    +** already.  However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
    +** compile-time option, then the automatic calls to sqlite3_initialize()
    +** are omitted and the application must call sqlite3_initialize() directly
    +** prior to using any other SQLite interface.  For maximum portability,
    +** it is recommended that applications always invoke sqlite3_initialize()
    +** directly prior to using any other SQLite interface.  Future releases
    +** of SQLite may require this.  In other words, the behavior exhibited
    +** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
    +** default behavior in some future release of SQLite.
    +**
    +** The sqlite3_os_init() routine does operating-system specific
    +** initialization of the SQLite library.  The sqlite3_os_end()
    +** routine undoes the effect of sqlite3_os_init().  Typical tasks
    +** performed by these routines include allocation or deallocation
    +** of static resources, initialization of global variables,
    +** setting up a default [sqlite3_vfs] module, or setting up
    +** a default configuration using [sqlite3_config()].
    +**
    +** The application should never invoke either sqlite3_os_init()
    +** or sqlite3_os_end() directly.  The application should only invoke
    +** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()
    +** interface is called automatically by sqlite3_initialize() and
    +** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate
    +** implementations for sqlite3_os_init() and sqlite3_os_end()
    +** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
    +** When [custom builds | built for other platforms]
    +** (using the [SQLITE_OS_OTHER=1] compile-time
    +** option) the application must supply a suitable implementation for
    +** sqlite3_os_init() and sqlite3_os_end().  An application-supplied
    +** implementation of sqlite3_os_init() or sqlite3_os_end()
    +** must return [SQLITE_OK] on success and some other [error code] upon
    +** failure.
    +*/
    +SQLITE_API int sqlite3_initialize(void);
    +SQLITE_API int sqlite3_shutdown(void);
    +SQLITE_API int sqlite3_os_init(void);
    +SQLITE_API int sqlite3_os_end(void);
    +
    +/*
    +** CAPI3REF: Configuring The SQLite Library {H14100} <S20000><S30200>
    +** EXPERIMENTAL
    +**
    +** The sqlite3_config() interface is used to make global configuration
    +** changes to SQLite in order to tune SQLite to the specific needs of
    +** the application.  The default configuration is recommended for most
    +** applications and so this routine is usually not necessary.  It is
    +** provided to support rare applications with unusual needs.
    +**
    +** The sqlite3_config() interface is not threadsafe.  The application
    +** must insure that no other SQLite interfaces are invoked by other
    +** threads while sqlite3_config() is running.  Furthermore, sqlite3_config()
    +** may only be invoked prior to library initialization using
    +** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
    +** Note, however, that sqlite3_config() can be called as part of the
    +** implementation of an application-defined [sqlite3_os_init()].
    +**
    +** The first argument to sqlite3_config() is an integer
    +** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines
    +** what property of SQLite is to be configured.  Subsequent arguments
    +** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]
    +** in the first argument.
    +**
    +** When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
    +** If the option is unknown or SQLite is unable to set the option
    +** then this routine returns a non-zero [error code].
    +**
    +** Requirements:
    +** [H14103] [H14106] [H14120] [H14123] [H14126] [H14129] [H14132] [H14135]
    +** [H14138] [H14141] [H14144] [H14147] [H14150] [H14153] [H14156] [H14159]
    +** [H14162] [H14165] [H14168]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);
    +
    +/*
    +** CAPI3REF: Configure database connections  {H14200} <S20000>
    +** EXPERIMENTAL
    +**
    +** The sqlite3_db_config() interface is used to make configuration
    +** changes to a [database connection].  The interface is similar to
    +** [sqlite3_config()] except that the changes apply to a single
    +** [database connection] (specified in the first argument).  The
    +** sqlite3_db_config() interface can only be used immediately after
    +** the database connection is created using [sqlite3_open()],
    +** [sqlite3_open16()], or [sqlite3_open_v2()].  
    +**
    +** The second argument to sqlite3_db_config(D,V,...)  is the
    +** configuration verb - an integer code that indicates what
    +** aspect of the [database connection] is being configured.
    +** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE].
    +** New verbs are likely to be added in future releases of SQLite.
    +** Additional arguments depend on the verb.
    +**
    +** Requirements:
    +** [H14203] [H14206] [H14209] [H14212] [H14215]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);
    +
    +/*
    +** CAPI3REF: Memory Allocation Routines {H10155} <S20120>
    +** EXPERIMENTAL
    +**
    +** An instance of this object defines the interface between SQLite
    +** and low-level memory allocation routines.
    +**
    +** This object is used in only one place in the SQLite interface.
    +** A pointer to an instance of this object is the argument to
    +** [sqlite3_config()] when the configuration option is
    +** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].  
    +** By creating an instance of this object
    +** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
    +** during configuration, an application can specify an alternative
    +** memory allocation subsystem for SQLite to use for all of its
    +** dynamic memory needs.
    +**
    +** Note that SQLite comes with several [built-in memory allocators]
    +** that are perfectly adequate for the overwhelming majority of applications
    +** and that this object is only useful to a tiny minority of applications
    +** with specialized memory allocation requirements.  This object is
    +** also used during testing of SQLite in order to specify an alternative
    +** memory allocator that simulates memory out-of-memory conditions in
    +** order to verify that SQLite recovers gracefully from such
    +** conditions.
    +**
    +** The xMalloc and xFree methods must work like the
    +** malloc() and free() functions from the standard C library.
    +** The xRealloc method must work like realloc() from the standard C library
    +** with the exception that if the second argument to xRealloc is zero,
    +** xRealloc must be a no-op - it must not perform any allocation or
    +** deallocation.  SQLite guaranteeds that the second argument to
    +** xRealloc is always a value returned by a prior call to xRoundup.
    +** And so in cases where xRoundup always returns a positive number,
    +** xRealloc can perform exactly as the standard library realloc() and
    +** still be in compliance with this specification.
    +**
    +** xSize should return the allocated size of a memory allocation
    +** previously obtained from xMalloc or xRealloc.  The allocated size
    +** is always at least as big as the requested size but may be larger.
    +**
    +** The xRoundup method returns what would be the allocated size of
    +** a memory allocation given a particular requested size.  Most memory
    +** allocators round up memory allocations at least to the next multiple
    +** of 8.  Some allocators round up to a larger multiple or to a power of 2.
    +** Every memory allocation request coming in through [sqlite3_malloc()]
    +** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0, 
    +** that causes the corresponding memory allocation to fail.
    +**
    +** The xInit method initializes the memory allocator.  (For example,
    +** it might allocate any require mutexes or initialize internal data
    +** structures.  The xShutdown method is invoked (indirectly) by
    +** [sqlite3_shutdown()] and should deallocate any resources acquired
    +** by xInit.  The pAppData pointer is used as the only parameter to
    +** xInit and xShutdown.
    +**
    +** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes
    +** the xInit method, so the xInit method need not be threadsafe.  The
    +** xShutdown method is only called from [sqlite3_shutdown()] so it does
    +** not need to be threadsafe either.  For all other methods, SQLite
    +** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
    +** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
    +** it is by default) and so the methods are automatically serialized.
    +** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
    +** methods must be threadsafe or else make their own arrangements for
    +** serialization.
    +**
    +** SQLite will never invoke xInit() more than once without an intervening
    +** call to xShutdown().
    +*/
    +typedef struct sqlite3_mem_methods sqlite3_mem_methods;
    +struct sqlite3_mem_methods {
    +  void *(*xMalloc)(int);         /* Memory allocation function */
    +  void (*xFree)(void*);          /* Free a prior allocation */
    +  void *(*xRealloc)(void*,int);  /* Resize an allocation */
    +  int (*xSize)(void*);           /* Return the size of an allocation */
    +  int (*xRoundup)(int);          /* Round up request size to allocation size */
    +  int (*xInit)(void*);           /* Initialize the memory allocator */
    +  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
    +  void *pAppData;                /* Argument to xInit() and xShutdown() */
    +};
    +
    +/*
    +** CAPI3REF: Configuration Options {H10160} <S20000>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer configuration options that
    +** can be passed as the first argument to the [sqlite3_config()] interface.
    +**
    +** New configuration options may be added in future releases of SQLite.
    +** Existing configuration options might be discontinued.  Applications
    +** should check the return code from [sqlite3_config()] to make sure that
    +** the call worked.  The [sqlite3_config()] interface will return a
    +** non-zero [error code] if a discontinued or unsupported configuration option
    +** is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>
    +** <dd>There are no arguments to this option.  This option disables
    +** all mutexing and puts SQLite into a mode where it can only be used
    +** by a single thread.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MULTITHREAD</dt>
    +** <dd>There are no arguments to this option.  This option disables
    +** mutexing on [database connection] and [prepared statement] objects.
    +** The application is responsible for serializing access to
    +** [database connections] and [prepared statements].  But other mutexes
    +** are enabled so that SQLite will be safe to use in a multi-threaded
    +** environment as long as no two threads attempt to use the same
    +** [database connection] at the same time.  See the [threading mode]
    +** documentation for additional information.</dd>
    +**
    +** <dt>SQLITE_CONFIG_SERIALIZED</dt>
    +** <dd>There are no arguments to this option.  This option enables
    +** all mutexes including the recursive
    +** mutexes on [database connection] and [prepared statement] objects.
    +** In this mode (which is the default when SQLite is compiled with
    +** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access
    +** to [database connections] and [prepared statements] so that the
    +** application is free to use the same [database connection] or the
    +** same [prepared statement] in different threads at the same time.
    +** See the [threading mode] documentation for additional information.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MALLOC</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mem_methods] structure.  The argument specifies
    +** alternative low-level memory allocation routines to be used in place of
    +** the memory allocation routines built into SQLite.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETMALLOC</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]
    +** structure is filled with the currently defined memory allocation routines.
    +** This option can be used to overload the default memory allocation
    +** routines with a wrapper that simulations memory allocation failure or
    +** tracks memory usage, for example.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MEMSTATUS</dt>
    +** <dd>This option takes single argument of type int, interpreted as a 
    +** boolean, which enables or disables the collection of memory allocation 
    +** statistics. When disabled, the following SQLite interfaces become 
    +** non-operational:
    +**   <ul>
    +**   <li> [sqlite3_memory_used()]
    +**   <li> [sqlite3_memory_highwater()]
    +**   <li> [sqlite3_soft_heap_limit()]
    +**   <li> [sqlite3_status()]
    +**   </ul>
    +** </dd>
    +**
    +** <dt>SQLITE_CONFIG_SCRATCH</dt>
    +** <dd>This option specifies a static memory buffer that SQLite can use for
    +** scratch memory.  There are three arguments:  A pointer an 8-byte
    +** aligned memory buffer from which the scrach allocations will be
    +** drawn, the size of each scratch allocation (sz),
    +** and the maximum number of scratch allocations (N).  The sz
    +** argument must be a multiple of 16. The sz parameter should be a few bytes
    +** larger than the actual scratch space required due to internal overhead.
    +** The first argument should pointer to an 8-byte aligned buffer
    +** of at least sz*N bytes of memory.
    +** SQLite will use no more than one scratch buffer at once per thread, so
    +** N should be set to the expected maximum number of threads.  The sz
    +** parameter should be 6 times the size of the largest database page size.
    +** Scratch buffers are used as part of the btree balance operation.  If
    +** The btree balancer needs additional memory beyond what is provided by
    +** scratch buffers or if no scratch buffer space is specified, then SQLite
    +** goes to [sqlite3_malloc()] to obtain the memory it needs.</dd>
    +**
    +** <dt>SQLITE_CONFIG_PAGECACHE</dt>
    +** <dd>This option specifies a static memory buffer that SQLite can use for
    +** the database page cache with the default page cache implemenation.  
    +** This configuration should not be used if an application-define page
    +** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.
    +** There are three arguments to this option: A pointer to 8-byte aligned
    +** memory, the size of each page buffer (sz), and the number of pages (N).
    +** The sz argument should be the size of the largest database page
    +** (a power of two between 512 and 32768) plus a little extra for each
    +** page header.  The page header size is 20 to 40 bytes depending on
    +** the host architecture.  It is harmless, apart from the wasted memory,
    +** to make sz a little too large.  The first
    +** argument should point to an allocation of at least sz*N bytes of memory.
    +** SQLite will use the memory provided by the first argument to satisfy its
    +** memory needs for the first N pages that it adds to cache.  If additional
    +** page cache memory is needed beyond what is provided by this option, then
    +** SQLite goes to [sqlite3_malloc()] for the additional storage space.
    +** The implementation might use one or more of the N buffers to hold 
    +** memory accounting information. The pointer in the first argument must
    +** be aligned to an 8-byte boundary or subsequent behavior of SQLite
    +** will be undefined.</dd>
    +**
    +** <dt>SQLITE_CONFIG_HEAP</dt>
    +** <dd>This option specifies a static memory buffer that SQLite will use
    +** for all of its dynamic memory allocation needs beyond those provided
    +** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
    +** There are three arguments: An 8-byte aligned pointer to the memory,
    +** the number of bytes in the memory buffer, and the minimum allocation size.
    +** If the first pointer (the memory pointer) is NULL, then SQLite reverts
    +** to using its default memory allocator (the system malloc() implementation),
    +** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  If the
    +** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
    +** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
    +** allocator is engaged to handle all of SQLites memory allocation needs.
    +** The first pointer (the memory pointer) must be aligned to an 8-byte
    +** boundary or subsequent behavior of SQLite will be undefined.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MUTEX</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mutex_methods] structure.  The argument specifies
    +** alternative low-level mutex routines to be used in place
    +** the mutex routines built into SQLite.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETMUTEX</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mutex_methods] structure.  The
    +** [sqlite3_mutex_methods]
    +** structure is filled with the currently defined mutex routines.
    +** This option can be used to overload the default mutex allocation
    +** routines with a wrapper used to track mutex usage for performance
    +** profiling or testing, for example.</dd>
    +**
    +** <dt>SQLITE_CONFIG_LOOKASIDE</dt>
    +** <dd>This option takes two arguments that determine the default
    +** memory allocation lookaside optimization.  The first argument is the
    +** size of each lookaside buffer slot and the second is the number of
    +** slots allocated to each database connection.  This option sets the
    +** <i>default</i> lookaside size.  The [SQLITE_DBCONFIG_LOOKASIDE]
    +** verb to [sqlite3_db_config()] can be used to change the lookaside
    +** configuration on individual connections.</dd>
    +**
    +** <dt>SQLITE_CONFIG_PCACHE</dt>
    +** <dd>This option takes a single argument which is a pointer to
    +** an [sqlite3_pcache_methods] object.  This object specifies the interface
    +** to a custom page cache implementation.  SQLite makes a copy of the
    +** object and uses it for page cache memory allocations.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETPCACHE</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** [sqlite3_pcache_methods] object.  SQLite copies of the current
    +** page cache implementation into that object.</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
    +#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
    +#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
    +#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
    +#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
    +#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
    +#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
    +#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
    +#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
    +#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
    +#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
    +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ 
    +#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
    +#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */
    +#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */
    +
    +/*
    +** CAPI3REF: Configuration Options {H10170} <S20000>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer configuration options that
    +** can be passed as the second argument to the [sqlite3_db_config()] interface.
    +**
    +** New configuration options may be added in future releases of SQLite.
    +** Existing configuration options might be discontinued.  Applications
    +** should check the return code from [sqlite3_db_config()] to make sure that
    +** the call worked.  The [sqlite3_db_config()] interface will return a
    +** non-zero [error code] if a discontinued or unsupported configuration option
    +** is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
    +** <dd>This option takes three additional arguments that determine the 
    +** [lookaside memory allocator] configuration for the [database connection].
    +** The first argument (the third parameter to [sqlite3_db_config()] is a
    +** pointer to an memory buffer to use for lookaside memory.
    +** The first argument may be NULL in which case SQLite will allocate the
    +** lookaside buffer itself using [sqlite3_malloc()].  The second argument is the
    +** size of each lookaside buffer slot and the third argument is the number of
    +** slots.  The size of the buffer in the first argument must be greater than
    +** or equal to the product of the second and third arguments.  The buffer
    +** must be aligned to an 8-byte boundary.  If the second argument is not
    +** a multiple of 8, it is internally rounded down to the next smaller
    +** multiple of 8.  See also: [SQLITE_CONFIG_LOOKASIDE]</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_DBCONFIG_LOOKASIDE    1001  /* void* int int */
    +
    +
    +/*
    +** CAPI3REF: Enable Or Disable Extended Result Codes {H12200} <S10700>
    +**
    +** The sqlite3_extended_result_codes() routine enables or disables the
    +** [extended result codes] feature of SQLite. The extended result
    +** codes are disabled by default for historical compatibility considerations.
    +**
    +** Requirements:
    +** [H12201] [H12202]
    +*/
    +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
    +
    +/*
    +** CAPI3REF: Last Insert Rowid {H12220} <S10700>
    +**
    +** Each entry in an SQLite table has a unique 64-bit signed
    +** integer key called the [ROWID | "rowid"]. The rowid is always available
    +** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
    +** names are not also used by explicitly declared columns. If
    +** the table has a column of type [INTEGER PRIMARY KEY] then that column
    +** is another alias for the rowid.
    +**
    +** This routine returns the [rowid] of the most recent
    +** successful [INSERT] into the database from the [database connection]
    +** in the first argument.  If no successful [INSERT]s
    +** have ever occurred on that database connection, zero is returned.
    +**
    +** If an [INSERT] occurs within a trigger, then the [rowid] of the inserted
    +** row is returned by this routine as long as the trigger is running.
    +** But once the trigger terminates, the value returned by this routine
    +** reverts to the last value inserted before the trigger fired.
    +**
    +** An [INSERT] that fails due to a constraint violation is not a
    +** successful [INSERT] and does not change the value returned by this
    +** routine.  Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
    +** and INSERT OR ABORT make no changes to the return value of this
    +** routine when their insertion fails.  When INSERT OR REPLACE
    +** encounters a constraint violation, it does not fail.  The
    +** INSERT continues to completion after deleting rows that caused
    +** the constraint problem so INSERT OR REPLACE will always change
    +** the return value of this interface.
    +**
    +** For the purposes of this routine, an [INSERT] is considered to
    +** be successful even if it is subsequently rolled back.
    +**
    +** Requirements:
    +** [H12221] [H12223]
    +**
    +** If a separate thread performs a new [INSERT] on the same
    +** database connection while the [sqlite3_last_insert_rowid()]
    +** function is running and thus changes the last insert [rowid],
    +** then the value returned by [sqlite3_last_insert_rowid()] is
    +** unpredictable and might not equal either the old or the new
    +** last insert [rowid].
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
    +
    +/*
    +** CAPI3REF: Count The Number Of Rows Modified {H12240} <S10600>
    +**
    +** This function returns the number of database rows that were changed
    +** or inserted or deleted by the most recently completed SQL statement
    +** on the [database connection] specified by the first parameter.
    +** Only changes that are directly specified by the [INSERT], [UPDATE],
    +** or [DELETE] statement are counted.  Auxiliary changes caused by
    +** triggers or [foreign key actions] are not counted. Use the
    +** [sqlite3_total_changes()] function to find the total number of changes
    +** including changes caused by triggers and foreign key actions.
    +**
    +** Changes to a view that are simulated by an [INSTEAD OF trigger]
    +** are not counted.  Only real table changes are counted.
    +**
    +** A "row change" is a change to a single row of a single table
    +** caused by an INSERT, DELETE, or UPDATE statement.  Rows that
    +** are changed as side effects of [REPLACE] constraint resolution,
    +** rollback, ABORT processing, [DROP TABLE], or by any other
    +** mechanisms do not count as direct row changes.
    +**
    +** A "trigger context" is a scope of execution that begins and
    +** ends with the script of a [CREATE TRIGGER | trigger]. 
    +** Most SQL statements are
    +** evaluated outside of any trigger.  This is the "top level"
    +** trigger context.  If a trigger fires from the top level, a
    +** new trigger context is entered for the duration of that one
    +** trigger.  Subtriggers create subcontexts for their duration.
    +**
    +** Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
    +** not create a new trigger context.
    +**
    +** This function returns the number of direct row changes in the
    +** most recent INSERT, UPDATE, or DELETE statement within the same
    +** trigger context.
    +**
    +** Thus, when called from the top level, this function returns the
    +** number of changes in the most recent INSERT, UPDATE, or DELETE
    +** that also occurred at the top level.  Within the body of a trigger,
    +** the sqlite3_changes() interface can be called to find the number of
    +** changes in the most recently completed INSERT, UPDATE, or DELETE
    +** statement within the body of the same trigger.
    +** However, the number returned does not include changes
    +** caused by subtriggers since those have their own context.
    +**
    +** See also the [sqlite3_total_changes()] interface and the
    +** [count_changes pragma].
    +**
    +** Requirements:
    +** [H12241] [H12243]
    +**
    +** If a separate thread makes changes on the same database connection
    +** while [sqlite3_changes()] is running then the value returned
    +** is unpredictable and not meaningful.
    +*/
    +SQLITE_API int sqlite3_changes(sqlite3*);
    +
    +/*
    +** CAPI3REF: Total Number Of Rows Modified {H12260} <S10600>
    +**
    +** This function returns the number of row changes caused by [INSERT],
    +** [UPDATE] or [DELETE] statements since the [database connection] was opened.
    +** The count includes all changes from all [CREATE TRIGGER | trigger] 
    +** contexts and changes made by [foreign key actions]. However,
    +** the count does not include changes used to implement [REPLACE] constraints,
    +** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The
    +** count does not include rows of views that fire an [INSTEAD OF trigger],
    +** though if the INSTEAD OF trigger makes changes of its own, those changes 
    +** are counted.
    +** The changes are counted as soon as the statement that makes them is
    +** completed (when the statement handle is passed to [sqlite3_reset()] or
    +** [sqlite3_finalize()]).
    +**
    +** See also the [sqlite3_changes()] interface and the
    +** [count_changes pragma].
    +**
    +** Requirements:
    +** [H12261] [H12263]
    +**
    +** If a separate thread makes changes on the same database connection
    +** while [sqlite3_total_changes()] is running then the value
    +** returned is unpredictable and not meaningful.
    +*/
    +SQLITE_API int sqlite3_total_changes(sqlite3*);
    +
    +/*
    +** CAPI3REF: Interrupt A Long-Running Query {H12270} <S30500>
    +**
    +** This function causes any pending database operation to abort and
    +** return at its earliest opportunity. This routine is typically
    +** called in response to a user action such as pressing "Cancel"
    +** or Ctrl-C where the user wants a long query operation to halt
    +** immediately.
    +**
    +** It is safe to call this routine from a thread different from the
    +** thread that is currently running the database operation.  But it
    +** is not safe to call this routine with a [database connection] that
    +** is closed or might close before sqlite3_interrupt() returns.
    +**
    +** If an SQL operation is very nearly finished at the time when
    +** sqlite3_interrupt() is called, then it might not have an opportunity
    +** to be interrupted and might continue to completion.
    +**
    +** An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
    +** If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
    +** that is inside an explicit transaction, then the entire transaction
    +** will be rolled back automatically.
    +**
    +** The sqlite3_interrupt(D) call is in effect until all currently running
    +** SQL statements on [database connection] D complete.  Any new SQL statements
    +** that are started after the sqlite3_interrupt() call and before the 
    +** running statements reaches zero are interrupted as if they had been
    +** running prior to the sqlite3_interrupt() call.  New SQL statements
    +** that are started after the running statement count reaches zero are
    +** not effected by the sqlite3_interrupt().
    +** A call to sqlite3_interrupt(D) that occurs when there are no running
    +** SQL statements is a no-op and has no effect on SQL statements
    +** that are started after the sqlite3_interrupt() call returns.
    +**
    +** Requirements:
    +** [H12271] [H12272]
    +**
    +** If the database connection closes while [sqlite3_interrupt()]
    +** is running then bad things will likely happen.
    +*/
    +SQLITE_API void sqlite3_interrupt(sqlite3*);
    +
    +/*
    +** CAPI3REF: Determine If An SQL Statement Is Complete {H10510} <S70200>
    +**
    +** These routines are useful during command-line input to determine if the
    +** currently entered text seems to form a complete SQL statement or
    +** if additional input is needed before sending the text into
    +** SQLite for parsing.  These routines return 1 if the input string
    +** appears to be a complete SQL statement.  A statement is judged to be
    +** complete if it ends with a semicolon token and is not a prefix of a
    +** well-formed CREATE TRIGGER statement.  Semicolons that are embedded within
    +** string literals or quoted identifier names or comments are not
    +** independent tokens (they are part of the token in which they are
    +** embedded) and thus do not count as a statement terminator.  Whitespace
    +** and comments that follow the final semicolon are ignored.
    +**
    +** These routines return 0 if the statement is incomplete.  If a
    +** memory allocation fails, then SQLITE_NOMEM is returned.
    +**
    +** These routines do not parse the SQL statements thus
    +** will not detect syntactically incorrect SQL.
    +**
    +** If SQLite has not been initialized using [sqlite3_initialize()] prior 
    +** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
    +** automatically by sqlite3_complete16().  If that initialization fails,
    +** then the return value from sqlite3_complete16() will be non-zero
    +** regardless of whether or not the input SQL is complete.
    +**
    +** Requirements: [H10511] [H10512]
    +**
    +** The input to [sqlite3_complete()] must be a zero-terminated
    +** UTF-8 string.
    +**
    +** The input to [sqlite3_complete16()] must be a zero-terminated
    +** UTF-16 string in native byte order.
    +*/
    +SQLITE_API int sqlite3_complete(const char *sql);
    +SQLITE_API int sqlite3_complete16(const void *sql);
    +
    +/*
    +** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors {H12310} <S40400>
    +**
    +** This routine sets a callback function that might be invoked whenever
    +** an attempt is made to open a database table that another thread
    +** or process has locked.
    +**
    +** If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
    +** is returned immediately upon encountering the lock. If the busy callback
    +** is not NULL, then the callback will be invoked with two arguments.
    +**
    +** The first argument to the handler is a copy of the void* pointer which
    +** is the third argument to sqlite3_busy_handler().  The second argument to
    +** the handler callback is the number of times that the busy handler has
    +** been invoked for this locking event.  If the
    +** busy callback returns 0, then no additional attempts are made to
    +** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
    +** If the callback returns non-zero, then another attempt
    +** is made to open the database for reading and the cycle repeats.
    +**
    +** The presence of a busy handler does not guarantee that it will be invoked
    +** when there is lock contention. If SQLite determines that invoking the busy
    +** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
    +** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
    +** Consider a scenario where one process is holding a read lock that
    +** it is trying to promote to a reserved lock and
    +** a second process is holding a reserved lock that it is trying
    +** to promote to an exclusive lock.  The first process cannot proceed
    +** because it is blocked by the second and the second process cannot
    +** proceed because it is blocked by the first.  If both processes
    +** invoke the busy handlers, neither will make any progress.  Therefore,
    +** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
    +** will induce the first process to release its read lock and allow
    +** the second process to proceed.
    +**
    +** The default busy callback is NULL.
    +**
    +** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
    +** when SQLite is in the middle of a large transaction where all the
    +** changes will not fit into the in-memory cache.  SQLite will
    +** already hold a RESERVED lock on the database file, but it needs
    +** to promote this lock to EXCLUSIVE so that it can spill cache
    +** pages into the database file without harm to concurrent
    +** readers.  If it is unable to promote the lock, then the in-memory
    +** cache will be left in an inconsistent state and so the error
    +** code is promoted from the relatively benign [SQLITE_BUSY] to
    +** the more severe [SQLITE_IOERR_BLOCKED].  This error code promotion
    +** forces an automatic rollback of the changes.  See the
    +** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
    +** CorruptionFollowingBusyError</a> wiki page for a discussion of why
    +** this is important.
    +**
    +** There can only be a single busy handler defined for each
    +** [database connection].  Setting a new busy handler clears any
    +** previously set handler.  Note that calling [sqlite3_busy_timeout()]
    +** will also set or clear the busy handler.
    +**
    +** The busy callback should not take any actions which modify the
    +** database connection that invoked the busy handler.  Any such actions
    +** result in undefined behavior.
    +** 
    +** Requirements:
    +** [H12311] [H12312] [H12314] [H12316] [H12318]
    +**
    +** A busy handler must not close the database connection
    +** or [prepared statement] that invoked the busy handler.
    +*/
    +SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
    +
    +/*
    +** CAPI3REF: Set A Busy Timeout {H12340} <S40410>
    +**
    +** This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
    +** for a specified amount of time when a table is locked.  The handler
    +** will sleep multiple times until at least "ms" milliseconds of sleeping
    +** have accumulated. {H12343} After "ms" milliseconds of sleeping,
    +** the handler returns 0 which causes [sqlite3_step()] to return
    +** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
    +**
    +** Calling this routine with an argument less than or equal to zero
    +** turns off all busy handlers.
    +**
    +** There can only be a single busy handler for a particular
    +** [database connection] any any given moment.  If another busy handler
    +** was defined  (using [sqlite3_busy_handler()]) prior to calling
    +** this routine, that other busy handler is cleared.
    +**
    +** Requirements:
    +** [H12341] [H12343] [H12344]
    +*/
    +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
    +
    +/*
    +** CAPI3REF: Convenience Routines For Running Queries {H12370} <S10000>
    +**
    +** Definition: A <b>result table</b> is memory data structure created by the
    +** [sqlite3_get_table()] interface.  A result table records the
    +** complete query results from one or more queries.
    +**
    +** The table conceptually has a number of rows and columns.  But
    +** these numbers are not part of the result table itself.  These
    +** numbers are obtained separately.  Let N be the number of rows
    +** and M be the number of columns.
    +**
    +** A result table is an array of pointers to zero-terminated UTF-8 strings.
    +** There are (N+1)*M elements in the array.  The first M pointers point
    +** to zero-terminated strings that  contain the names of the columns.
    +** The remaining entries all point to query results.  NULL values result
    +** in NULL pointers.  All other values are in their UTF-8 zero-terminated
    +** string representation as returned by [sqlite3_column_text()].
    +**
    +** A result table might consist of one or more memory allocations.
    +** It is not safe to pass a result table directly to [sqlite3_free()].
    +** A result table should be deallocated using [sqlite3_free_table()].
    +**
    +** As an example of the result table format, suppose a query result
    +** is as follows:
    +**
    +** <blockquote><pre>
    +**        Name        | Age
    +**        -----------------------
    +**        Alice       | 43
    +**        Bob         | 28
    +**        Cindy       | 21
    +** </pre></blockquote>
    +**
    +** There are two column (M==2) and three rows (N==3).  Thus the
    +** result table has 8 entries.  Suppose the result table is stored
    +** in an array names azResult.  Then azResult holds this content:
    +**
    +** <blockquote><pre>
    +**        azResult&#91;0] = "Name";
    +**        azResult&#91;1] = "Age";
    +**        azResult&#91;2] = "Alice";
    +**        azResult&#91;3] = "43";
    +**        azResult&#91;4] = "Bob";
    +**        azResult&#91;5] = "28";
    +**        azResult&#91;6] = "Cindy";
    +**        azResult&#91;7] = "21";
    +** </pre></blockquote>
    +**
    +** The sqlite3_get_table() function evaluates one or more
    +** semicolon-separated SQL statements in the zero-terminated UTF-8
    +** string of its 2nd parameter.  It returns a result table to the
    +** pointer given in its 3rd parameter.
    +**
    +** After the calling function has finished using the result, it should
    +** pass the pointer to the result table to sqlite3_free_table() in order to
    +** release the memory that was malloced.  Because of the way the
    +** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
    +** function must not try to call [sqlite3_free()] directly.  Only
    +** [sqlite3_free_table()] is able to release the memory properly and safely.
    +**
    +** The sqlite3_get_table() interface is implemented as a wrapper around
    +** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access
    +** to any internal data structures of SQLite.  It uses only the public
    +** interface defined here.  As a consequence, errors that occur in the
    +** wrapper layer outside of the internal [sqlite3_exec()] call are not
    +** reflected in subsequent calls to [sqlite3_errcode()] or [sqlite3_errmsg()].
    +**
    +** Requirements:
    +** [H12371] [H12373] [H12374] [H12376] [H12379] [H12382]
    +*/
    +SQLITE_API int sqlite3_get_table(
    +  sqlite3 *db,          /* An open database */
    +  const char *zSql,     /* SQL to be evaluated */
    +  char ***pazResult,    /* Results of the query */
    +  int *pnRow,           /* Number of result rows written here */
    +  int *pnColumn,        /* Number of result columns written here */
    +  char **pzErrmsg       /* Error msg written here */
    +);
    +SQLITE_API void sqlite3_free_table(char **result);
    +
    +/*
    +** CAPI3REF: Formatted String Printing Functions {H17400} <S70000><S20000>
    +**
    +** These routines are work-alikes of the "printf()" family of functions
    +** from the standard C library.
    +**
    +** The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
    +** results into memory obtained from [sqlite3_malloc()].
    +** The strings returned by these two routines should be
    +** released by [sqlite3_free()].  Both routines return a
    +** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
    +** memory to hold the resulting string.
    +**
    +** In sqlite3_snprintf() routine is similar to "snprintf()" from
    +** the standard C library.  The result is written into the
    +** buffer supplied as the second parameter whose size is given by
    +** the first parameter. Note that the order of the
    +** first two parameters is reversed from snprintf().  This is an
    +** historical accident that cannot be fixed without breaking
    +** backwards compatibility.  Note also that sqlite3_snprintf()
    +** returns a pointer to its buffer instead of the number of
    +** characters actually written into the buffer.  We admit that
    +** the number of characters written would be a more useful return
    +** value but we cannot change the implementation of sqlite3_snprintf()
    +** now without breaking compatibility.
    +**
    +** As long as the buffer size is greater than zero, sqlite3_snprintf()
    +** guarantees that the buffer is always zero-terminated.  The first
    +** parameter "n" is the total size of the buffer, including space for
    +** the zero terminator.  So the longest string that can be completely
    +** written will be n-1 characters.
    +**
    +** These routines all implement some additional formatting
    +** options that are useful for constructing SQL statements.
    +** All of the usual printf() formatting options apply.  In addition, there
    +** is are "%q", "%Q", and "%z" options.
    +**
    +** The %q option works like %s in that it substitutes a null-terminated
    +** string from the argument list.  But %q also doubles every '\'' character.
    +** %q is designed for use inside a string literal.  By doubling each '\''
    +** character it escapes that character and allows it to be inserted into
    +** the string.
    +**
    +** For example, assume the string variable zText contains text as follows:
    +**
    +** <blockquote><pre>
    +**  char *zText = "It's a happy day!";
    +** </pre></blockquote>
    +**
    +** One can use this text in an SQL statement as follows:
    +**
    +** <blockquote><pre>
    +**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
    +**  sqlite3_exec(db, zSQL, 0, 0, 0);
    +**  sqlite3_free(zSQL);
    +** </pre></blockquote>
    +**
    +** Because the %q format string is used, the '\'' character in zText
    +** is escaped and the SQL generated is as follows:
    +**
    +** <blockquote><pre>
    +**  INSERT INTO table1 VALUES('It''s a happy day!')
    +** </pre></blockquote>
    +**
    +** This is correct.  Had we used %s instead of %q, the generated SQL
    +** would have looked like this:
    +**
    +** <blockquote><pre>
    +**  INSERT INTO table1 VALUES('It's a happy day!');
    +** </pre></blockquote>
    +**
    +** This second example is an SQL syntax error.  As a general rule you should
    +** always use %q instead of %s when inserting text into a string literal.
    +**
    +** The %Q option works like %q except it also adds single quotes around
    +** the outside of the total string.  Additionally, if the parameter in the
    +** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
    +** single quotes) in place of the %Q option.  So, for example, one could say:
    +**
    +** <blockquote><pre>
    +**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
    +**  sqlite3_exec(db, zSQL, 0, 0, 0);
    +**  sqlite3_free(zSQL);
    +** </pre></blockquote>
    +**
    +** The code above will render a correct SQL statement in the zSQL
    +** variable even if the zText variable is a NULL pointer.
    +**
    +** The "%z" formatting option works exactly like "%s" with the
    +** addition that after the string has been read and copied into
    +** the result, [sqlite3_free()] is called on the input string. {END}
    +**
    +** Requirements:
    +** [H17403] [H17406] [H17407]
    +*/
    +SQLITE_API char *sqlite3_mprintf(const char*,...);
    +SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
    +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
    +
    +/*
    +** CAPI3REF: Memory Allocation Subsystem {H17300} <S20000>
    +**
    +** The SQLite core  uses these three routines for all of its own
    +** internal memory allocation needs. "Core" in the previous sentence
    +** does not include operating-system specific VFS implementation.  The
    +** Windows VFS uses native malloc() and free() for some operations.
    +**
    +** The sqlite3_malloc() routine returns a pointer to a block
    +** of memory at least N bytes in length, where N is the parameter.
    +** If sqlite3_malloc() is unable to obtain sufficient free
    +** memory, it returns a NULL pointer.  If the parameter N to
    +** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
    +** a NULL pointer.
    +**
    +** Calling sqlite3_free() with a pointer previously returned
    +** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
    +** that it might be reused.  The sqlite3_free() routine is
    +** a no-op if is called with a NULL pointer.  Passing a NULL pointer
    +** to sqlite3_free() is harmless.  After being freed, memory
    +** should neither be read nor written.  Even reading previously freed
    +** memory might result in a segmentation fault or other severe error.
    +** Memory corruption, a segmentation fault, or other severe error
    +** might result if sqlite3_free() is called with a non-NULL pointer that
    +** was not obtained from sqlite3_malloc() or sqlite3_realloc().
    +**
    +** The sqlite3_realloc() interface attempts to resize a
    +** prior memory allocation to be at least N bytes, where N is the
    +** second parameter.  The memory allocation to be resized is the first
    +** parameter.  If the first parameter to sqlite3_realloc()
    +** is a NULL pointer then its behavior is identical to calling
    +** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
    +** If the second parameter to sqlite3_realloc() is zero or
    +** negative then the behavior is exactly the same as calling
    +** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
    +** sqlite3_realloc() returns a pointer to a memory allocation
    +** of at least N bytes in size or NULL if sufficient memory is unavailable.
    +** If M is the size of the prior allocation, then min(N,M) bytes
    +** of the prior allocation are copied into the beginning of buffer returned
    +** by sqlite3_realloc() and the prior allocation is freed.
    +** If sqlite3_realloc() returns NULL, then the prior allocation
    +** is not freed.
    +**
    +** The memory returned by sqlite3_malloc() and sqlite3_realloc()
    +** is always aligned to at least an 8 byte boundary. {END}
    +**
    +** The default implementation of the memory allocation subsystem uses
    +** the malloc(), realloc() and free() provided by the standard C library.
    +** {H17382} However, if SQLite is compiled with the
    +** SQLITE_MEMORY_SIZE=<i>NNN</i> C preprocessor macro (where <i>NNN</i>
    +** is an integer), then SQLite create a static array of at least
    +** <i>NNN</i> bytes in size and uses that array for all of its dynamic
    +** memory allocation needs. {END}  Additional memory allocator options
    +** may be added in future releases.
    +**
    +** In SQLite version 3.5.0 and 3.5.1, it was possible to define
    +** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
    +** implementation of these routines to be omitted.  That capability
    +** is no longer provided.  Only built-in memory allocators can be used.
    +**
    +** The Windows OS interface layer calls
    +** the system malloc() and free() directly when converting
    +** filenames between the UTF-8 encoding used by SQLite
    +** and whatever filename encoding is used by the particular Windows
    +** installation.  Memory allocation errors are detected, but
    +** they are reported back as [SQLITE_CANTOPEN] or
    +** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
    +**
    +** Requirements:
    +** [H17303] [H17304] [H17305] [H17306] [H17310] [H17312] [H17315] [H17318]
    +** [H17321] [H17322] [H17323]
    +**
    +** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
    +** must be either NULL or else pointers obtained from a prior
    +** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
    +** not yet been released.
    +**
    +** The application must not read or write any part of
    +** a block of memory after it has been released using
    +** [sqlite3_free()] or [sqlite3_realloc()].
    +*/
    +SQLITE_API void *sqlite3_malloc(int);
    +SQLITE_API void *sqlite3_realloc(void*, int);
    +SQLITE_API void sqlite3_free(void*);
    +
    +/*
    +** CAPI3REF: Memory Allocator Statistics {H17370} <S30210>
    +**
    +** SQLite provides these two interfaces for reporting on the status
    +** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
    +** routines, which form the built-in memory allocation subsystem.
    +**
    +** Requirements:
    +** [H17371] [H17373] [H17374] [H17375]
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
    +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
    +
    +/*
    +** CAPI3REF: Pseudo-Random Number Generator {H17390} <S20000>
    +**
    +** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
    +** select random [ROWID | ROWIDs] when inserting new records into a table that
    +** already uses the largest possible [ROWID].  The PRNG is also used for
    +** the build-in random() and randomblob() SQL functions.  This interface allows
    +** applications to access the same PRNG for other purposes.
    +**
    +** A call to this routine stores N bytes of randomness into buffer P.
    +**
    +** The first time this routine is invoked (either internally or by
    +** the application) the PRNG is seeded using randomness obtained
    +** from the xRandomness method of the default [sqlite3_vfs] object.
    +** On all subsequent invocations, the pseudo-randomness is generated
    +** internally and without recourse to the [sqlite3_vfs] xRandomness
    +** method.
    +**
    +** Requirements:
    +** [H17392]
    +*/
    +SQLITE_API void sqlite3_randomness(int N, void *P);
    +
    +/*
    +** CAPI3REF: Compile-Time Authorization Callbacks {H12500} <S70100>
    +**
    +** This routine registers a authorizer callback with a particular
    +** [database connection], supplied in the first argument.
    +** The authorizer callback is invoked as SQL statements are being compiled
    +** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
    +** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()].  At various
    +** points during the compilation process, as logic is being created
    +** to perform various actions, the authorizer callback is invoked to
    +** see if those actions are allowed.  The authorizer callback should
    +** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
    +** specific action but allow the SQL statement to continue to be
    +** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
    +** rejected with an error.  If the authorizer callback returns
    +** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
    +** then the [sqlite3_prepare_v2()] or equivalent call that triggered
    +** the authorizer will fail with an error message.
    +**
    +** When the callback returns [SQLITE_OK], that means the operation
    +** requested is ok.  When the callback returns [SQLITE_DENY], the
    +** [sqlite3_prepare_v2()] or equivalent call that triggered the
    +** authorizer will fail with an error message explaining that
    +** access is denied. 
    +**
    +** The first parameter to the authorizer callback is a copy of the third
    +** parameter to the sqlite3_set_authorizer() interface. The second parameter
    +** to the callback is an integer [SQLITE_COPY | action code] that specifies
    +** the particular action to be authorized. The third through sixth parameters
    +** to the callback are zero-terminated strings that contain additional
    +** details about the action to be authorized.
    +**
    +** If the action code is [SQLITE_READ]
    +** and the callback returns [SQLITE_IGNORE] then the
    +** [prepared statement] statement is constructed to substitute
    +** a NULL value in place of the table column that would have
    +** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]
    +** return can be used to deny an untrusted user access to individual
    +** columns of a table.
    +** If the action code is [SQLITE_DELETE] and the callback returns
    +** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
    +** [truncate optimization] is disabled and all rows are deleted individually.
    +**
    +** An authorizer is used when [sqlite3_prepare | preparing]
    +** SQL statements from an untrusted source, to ensure that the SQL statements
    +** do not try to access data they are not allowed to see, or that they do not
    +** try to execute malicious statements that damage the database.  For
    +** example, an application may allow a user to enter arbitrary
    +** SQL queries for evaluation by a database.  But the application does
    +** not want the user to be able to make arbitrary changes to the
    +** database.  An authorizer could then be put in place while the
    +** user-entered SQL is being [sqlite3_prepare | prepared] that
    +** disallows everything except [SELECT] statements.
    +**
    +** Applications that need to process SQL from untrusted sources
    +** might also consider lowering resource limits using [sqlite3_limit()]
    +** and limiting database size using the [max_page_count] [PRAGMA]
    +** in addition to using an authorizer.
    +**
    +** Only a single authorizer can be in place on a database connection
    +** at a time.  Each call to sqlite3_set_authorizer overrides the
    +** previous call.  Disable the authorizer by installing a NULL callback.
    +** The authorizer is disabled by default.
    +**
    +** The authorizer callback must not do anything that will modify
    +** the database connection that invoked the authorizer callback.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** When [sqlite3_prepare_v2()] is used to prepare a statement, the
    +** statement might be re-prepared during [sqlite3_step()] due to a 
    +** schema change.  Hence, the application should ensure that the
    +** correct authorizer callback remains in place during the [sqlite3_step()].
    +**
    +** Note that the authorizer callback is invoked only during
    +** [sqlite3_prepare()] or its variants.  Authorization is not
    +** performed during statement evaluation in [sqlite3_step()], unless
    +** as stated in the previous paragraph, sqlite3_step() invokes
    +** sqlite3_prepare_v2() to reprepare a statement after a schema change.
    +**
    +** Requirements:
    +** [H12501] [H12502] [H12503] [H12504] [H12505] [H12506] [H12507] [H12510]
    +** [H12511] [H12512] [H12520] [H12521] [H12522]
    +*/
    +SQLITE_API int sqlite3_set_authorizer(
    +  sqlite3*,
    +  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
    +  void *pUserData
    +);
    +
    +/*
    +** CAPI3REF: Authorizer Return Codes {H12590} <H12500>
    +**
    +** The [sqlite3_set_authorizer | authorizer callback function] must
    +** return either [SQLITE_OK] or one of these two constants in order
    +** to signal SQLite whether or not the action is permitted.  See the
    +** [sqlite3_set_authorizer | authorizer documentation] for additional
    +** information.
    +*/
    +#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
    +#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
    +
    +/*
    +** CAPI3REF: Authorizer Action Codes {H12550} <H12500>
    +**
    +** The [sqlite3_set_authorizer()] interface registers a callback function
    +** that is invoked to authorize certain SQL statement actions.  The
    +** second parameter to the callback is an integer code that specifies
    +** what action is being authorized.  These are the integer action codes that
    +** the authorizer callback may be passed.
    +**
    +** These action code values signify what kind of operation is to be
    +** authorized.  The 3rd and 4th parameters to the authorization
    +** callback function will be parameters or NULL depending on which of these
    +** codes is used as the second parameter.  The 5th parameter to the
    +** authorizer callback is the name of the database ("main", "temp",
    +** etc.) if applicable.  The 6th parameter to the authorizer callback
    +** is the name of the inner-most trigger or view that is responsible for
    +** the access attempt or NULL if this access attempt is directly from
    +** top-level SQL code.
    +**
    +** Requirements:
    +** [H12551] [H12552] [H12553] [H12554]
    +*/
    +/******************************************* 3rd ************ 4th ***********/
    +#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
    +#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
    +#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
    +#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
    +#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
    +#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
    +#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
    +#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
    +#define SQLITE_DELETE                9   /* Table Name      NULL            */
    +#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
    +#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
    +#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
    +#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
    +#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
    +#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
    +#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
    +#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
    +#define SQLITE_INSERT               18   /* Table Name      NULL            */
    +#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
    +#define SQLITE_READ                 20   /* Table Name      Column Name     */
    +#define SQLITE_SELECT               21   /* NULL            NULL            */
    +#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
    +#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
    +#define SQLITE_ATTACH               24   /* Filename        NULL            */
    +#define SQLITE_DETACH               25   /* Database Name   NULL            */
    +#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
    +#define SQLITE_REINDEX              27   /* Index Name      NULL            */
    +#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
    +#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
    +#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
    +#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
    +#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
    +#define SQLITE_COPY                  0   /* No longer used */
    +
    +/*
    +** CAPI3REF: Tracing And Profiling Functions {H12280} <S60400>
    +** EXPERIMENTAL
    +**
    +** These routines register callback functions that can be used for
    +** tracing and profiling the execution of SQL statements.
    +**
    +** The callback function registered by sqlite3_trace() is invoked at
    +** various times when an SQL statement is being run by [sqlite3_step()].
    +** The callback returns a UTF-8 rendering of the SQL statement text
    +** as the statement first begins executing.  Additional callbacks occur
    +** as each triggered subprogram is entered.  The callbacks for triggers
    +** contain a UTF-8 SQL comment that identifies the trigger.
    +**
    +** The callback function registered by sqlite3_profile() is invoked
    +** as each SQL statement finishes.  The profile callback contains
    +** the original statement text and an estimate of wall-clock time
    +** of how long that statement took to run.
    +**
    +** Requirements:
    +** [H12281] [H12282] [H12283] [H12284] [H12285] [H12287] [H12288] [H12289]
    +** [H12290]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
    +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
    +   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
    +
    +/*
    +** CAPI3REF: Query Progress Callbacks {H12910} <S60400>
    +**
    +** This routine configures a callback function - the
    +** progress callback - that is invoked periodically during long
    +** running calls to [sqlite3_exec()], [sqlite3_step()] and
    +** [sqlite3_get_table()].  An example use for this
    +** interface is to keep a GUI updated during a large query.
    +**
    +** If the progress callback returns non-zero, the operation is
    +** interrupted.  This feature can be used to implement a
    +** "Cancel" button on a GUI progress dialog box.
    +**
    +** The progress handler must not do anything that will modify
    +** the database connection that invoked the progress handler.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** Requirements:
    +** [H12911] [H12912] [H12913] [H12914] [H12915] [H12916] [H12917] [H12918]
    +**
    +*/
    +SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
    +
    +/*
    +** CAPI3REF: Opening A New Database Connection {H12700} <S40200>
    +**
    +** These routines open an SQLite database file whose name is given by the
    +** filename argument. The filename argument is interpreted as UTF-8 for
    +** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
    +** order for sqlite3_open16(). A [database connection] handle is usually
    +** returned in *ppDb, even if an error occurs.  The only exception is that
    +** if SQLite is unable to allocate memory to hold the [sqlite3] object,
    +** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
    +** object. If the database is opened (and/or created) successfully, then
    +** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.  The
    +** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
    +** an English language description of the error.
    +**
    +** The default encoding for the database will be UTF-8 if
    +** sqlite3_open() or sqlite3_open_v2() is called and
    +** UTF-16 in the native byte order if sqlite3_open16() is used.
    +**
    +** Whether or not an error occurs when it is opened, resources
    +** associated with the [database connection] handle should be released by
    +** passing it to [sqlite3_close()] when it is no longer required.
    +**
    +** The sqlite3_open_v2() interface works like sqlite3_open()
    +** except that it accepts two additional parameters for additional control
    +** over the new database connection.  The flags parameter can take one of
    +** the following three values, optionally combined with the 
    +** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
    +** and/or [SQLITE_OPEN_PRIVATECACHE] flags:
    +**
    +** <dl>
    +** <dt>[SQLITE_OPEN_READONLY]</dt>
    +** <dd>The database is opened in read-only mode.  If the database does not
    +** already exist, an error is returned.</dd>
    +**
    +** <dt>[SQLITE_OPEN_READWRITE]</dt>
    +** <dd>The database is opened for reading and writing if possible, or reading
    +** only if the file is write protected by the operating system.  In either
    +** case the database must already exist, otherwise an error is returned.</dd>
    +**
    +** <dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
    +** <dd>The database is opened for reading and writing, and is creates it if
    +** it does not already exist. This is the behavior that is always used for
    +** sqlite3_open() and sqlite3_open16().</dd>
    +** </dl>
    +**
    +** If the 3rd parameter to sqlite3_open_v2() is not one of the
    +** combinations shown above or one of the combinations shown above combined
    +** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],
    +** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags,
    +** then the behavior is undefined.
    +**
    +** If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
    +** opens in the multi-thread [threading mode] as long as the single-thread
    +** mode has not been set at compile-time or start-time.  If the
    +** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
    +** in the serialized [threading mode] unless single-thread was
    +** previously selected at compile-time or start-time.
    +** The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
    +** eligible to use [shared cache mode], regardless of whether or not shared
    +** cache is enabled using [sqlite3_enable_shared_cache()].  The
    +** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
    +** participate in [shared cache mode] even if it is enabled.
    +**
    +** If the filename is ":memory:", then a private, temporary in-memory database
    +** is created for the connection.  This in-memory database will vanish when
    +** the database connection is closed.  Future versions of SQLite might
    +** make use of additional special filenames that begin with the ":" character.
    +** It is recommended that when a database filename actually does begin with
    +** a ":" character you should prefix the filename with a pathname such as
    +** "./" to avoid ambiguity.
    +**
    +** If the filename is an empty string, then a private, temporary
    +** on-disk database will be created.  This private database will be
    +** automatically deleted as soon as the database connection is closed.
    +**
    +** The fourth parameter to sqlite3_open_v2() is the name of the
    +** [sqlite3_vfs] object that defines the operating system interface that
    +** the new database connection should use.  If the fourth parameter is
    +** a NULL pointer then the default [sqlite3_vfs] object is used.
    +**
    +** <b>Note to Windows users:</b>  The encoding used for the filename argument
    +** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
    +** codepage is currently defined.  Filenames containing international
    +** characters must be converted to UTF-8 prior to passing them into
    +** sqlite3_open() or sqlite3_open_v2().
    +**
    +** Requirements:
    +** [H12701] [H12702] [H12703] [H12704] [H12706] [H12707] [H12709] [H12711]
    +** [H12712] [H12713] [H12714] [H12717] [H12719] [H12721] [H12723]
    +*/
    +SQLITE_API int sqlite3_open(
    +  const char *filename,   /* Database filename (UTF-8) */
    +  sqlite3 **ppDb          /* OUT: SQLite db handle */
    +);
    +SQLITE_API int sqlite3_open16(
    +  const void *filename,   /* Database filename (UTF-16) */
    +  sqlite3 **ppDb          /* OUT: SQLite db handle */
    +);
    +SQLITE_API int sqlite3_open_v2(
    +  const char *filename,   /* Database filename (UTF-8) */
    +  sqlite3 **ppDb,         /* OUT: SQLite db handle */
    +  int flags,              /* Flags */
    +  const char *zVfs        /* Name of VFS module to use */
    +);
    +
    +/*
    +** CAPI3REF: Error Codes And Messages {H12800} <S60200>
    +**
    +** The sqlite3_errcode() interface returns the numeric [result code] or
    +** [extended result code] for the most recent failed sqlite3_* API call
    +** associated with a [database connection]. If a prior API call failed
    +** but the most recent API call succeeded, the return value from
    +** sqlite3_errcode() is undefined.  The sqlite3_extended_errcode()
    +** interface is the same except that it always returns the 
    +** [extended result code] even when extended result codes are
    +** disabled.
    +**
    +** The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
    +** text that describes the error, as either UTF-8 or UTF-16 respectively.
    +** Memory to hold the error message string is managed internally.
    +** The application does not need to worry about freeing the result.
    +** However, the error string might be overwritten or deallocated by
    +** subsequent calls to other SQLite interface functions.
    +**
    +** When the serialized [threading mode] is in use, it might be the
    +** case that a second error occurs on a separate thread in between
    +** the time of the first error and the call to these interfaces.
    +** When that happens, the second error will be reported since these
    +** interfaces always report the most recent result.  To avoid
    +** this, each thread can obtain exclusive use of the [database connection] D
    +** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
    +** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
    +** all calls to the interfaces listed here are completed.
    +**
    +** If an interface fails with SQLITE_MISUSE, that means the interface
    +** was invoked incorrectly by the application.  In that case, the
    +** error code and message may or may not be set.
    +**
    +** Requirements:
    +** [H12801] [H12802] [H12803] [H12807] [H12808] [H12809]
    +*/
    +SQLITE_API int sqlite3_errcode(sqlite3 *db);
    +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
    +SQLITE_API const char *sqlite3_errmsg(sqlite3*);
    +SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
    +
    +/*
    +** CAPI3REF: SQL Statement Object {H13000} <H13010>
    +** KEYWORDS: {prepared statement} {prepared statements}
    +**
    +** An instance of this object represents a single SQL statement.
    +** This object is variously known as a "prepared statement" or a
    +** "compiled SQL statement" or simply as a "statement".
    +**
    +** The life of a statement object goes something like this:
    +**
    +** <ol>
    +** <li> Create the object using [sqlite3_prepare_v2()] or a related
    +**      function.
    +** <li> Bind values to [host parameters] using the sqlite3_bind_*()
    +**      interfaces.
    +** <li> Run the SQL by calling [sqlite3_step()] one or more times.
    +** <li> Reset the statement using [sqlite3_reset()] then go back
    +**      to step 2.  Do this zero or more times.
    +** <li> Destroy the object using [sqlite3_finalize()].
    +** </ol>
    +**
    +** Refer to documentation on individual methods above for additional
    +** information.
    +*/
    +typedef struct sqlite3_stmt sqlite3_stmt;
    +
    +/*
    +** CAPI3REF: Run-time Limits {H12760} <S20600>
    +**
    +** This interface allows the size of various constructs to be limited
    +** on a connection by connection basis.  The first parameter is the
    +** [database connection] whose limit is to be set or queried.  The
    +** second parameter is one of the [limit categories] that define a
    +** class of constructs to be size limited.  The third parameter is the
    +** new limit for that construct.  The function returns the old limit.
    +**
    +** If the new limit is a negative number, the limit is unchanged.
    +** For the limit category of SQLITE_LIMIT_XYZ there is a 
    +** [limits | hard upper bound]
    +** set by a compile-time C preprocessor macro named 
    +** [limits | SQLITE_MAX_XYZ].
    +** (The "_LIMIT_" in the name is changed to "_MAX_".)
    +** Attempts to increase a limit above its hard upper bound are
    +** silently truncated to the hard upper limit.
    +**
    +** Run time limits are intended for use in applications that manage
    +** both their own internal database and also databases that are controlled
    +** by untrusted external sources.  An example application might be a
    +** web browser that has its own databases for storing history and
    +** separate databases controlled by JavaScript applications downloaded
    +** off the Internet.  The internal databases can be given the
    +** large, default limits.  Databases managed by external sources can
    +** be given much smaller limits designed to prevent a denial of service
    +** attack.  Developers might also want to use the [sqlite3_set_authorizer()]
    +** interface to further control untrusted SQL.  The size of the database
    +** created by an untrusted script can be contained using the
    +** [max_page_count] [PRAGMA].
    +**
    +** New run-time limit categories may be added in future releases.
    +**
    +** Requirements:
    +** [H12762] [H12766] [H12769]
    +*/
    +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
    +
    +/*
    +** CAPI3REF: Run-Time Limit Categories {H12790} <H12760>
    +** KEYWORDS: {limit category} {*limit categories}
    +**
    +** These constants define various performance limits
    +** that can be lowered at run-time using [sqlite3_limit()].
    +** The synopsis of the meanings of the various limits is shown below.
    +** Additional information is available at [limits | Limits in SQLite].
    +**
    +** <dl>
    +** <dt>SQLITE_LIMIT_LENGTH</dt>
    +** <dd>The maximum size of any string or BLOB or table row.<dd>
    +**
    +** <dt>SQLITE_LIMIT_SQL_LENGTH</dt>
    +** <dd>The maximum length of an SQL statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_COLUMN</dt>
    +** <dd>The maximum number of columns in a table definition or in the
    +** result set of a [SELECT] or the maximum number of columns in an index
    +** or in an ORDER BY or GROUP BY clause.</dd>
    +**
    +** <dt>SQLITE_LIMIT_EXPR_DEPTH</dt>
    +** <dd>The maximum depth of the parse tree on any expression.</dd>
    +**
    +** <dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>
    +** <dd>The maximum number of terms in a compound SELECT statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_VDBE_OP</dt>
    +** <dd>The maximum number of instructions in a virtual machine program
    +** used to implement an SQL statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
    +** <dd>The maximum number of arguments on a function.</dd>
    +**
    +** <dt>SQLITE_LIMIT_ATTACHED</dt>
    +** <dd>The maximum number of [ATTACH | attached databases].</dd>
    +**
    +** <dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>
    +** <dd>The maximum length of the pattern argument to the [LIKE] or
    +** [GLOB] operators.</dd>
    +**
    +** <dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
    +** <dd>The maximum number of variables in an SQL statement that can
    +** be bound.</dd>
    +**
    +** <dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
    +** <dd>The maximum depth of recursion for triggers.</dd>
    +** </dl>
    +*/
    +#define SQLITE_LIMIT_LENGTH                    0
    +#define SQLITE_LIMIT_SQL_LENGTH                1
    +#define SQLITE_LIMIT_COLUMN                    2
    +#define SQLITE_LIMIT_EXPR_DEPTH                3
    +#define SQLITE_LIMIT_COMPOUND_SELECT           4
    +#define SQLITE_LIMIT_VDBE_OP                   5
    +#define SQLITE_LIMIT_FUNCTION_ARG              6
    +#define SQLITE_LIMIT_ATTACHED                  7
    +#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
    +#define SQLITE_LIMIT_VARIABLE_NUMBER           9
    +#define SQLITE_LIMIT_TRIGGER_DEPTH            10
    +
    +/*
    +** CAPI3REF: Compiling An SQL Statement {H13010} <S10000>
    +** KEYWORDS: {SQL statement compiler}
    +**
    +** To execute an SQL query, it must first be compiled into a byte-code
    +** program using one of these routines.
    +**
    +** The first argument, "db", is a [database connection] obtained from a
    +** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
    +** [sqlite3_open16()].  The database connection must not have been closed.
    +**
    +** The second argument, "zSql", is the statement to be compiled, encoded
    +** as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
    +** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
    +** use UTF-16.
    +**
    +** If the nByte argument is less than zero, then zSql is read up to the
    +** first zero terminator. If nByte is non-negative, then it is the maximum
    +** number of  bytes read from zSql.  When nByte is non-negative, the
    +** zSql string ends at either the first '\000' or '\u0000' character or
    +** the nByte-th byte, whichever comes first. If the caller knows
    +** that the supplied string is nul-terminated, then there is a small
    +** performance advantage to be gained by passing an nByte parameter that
    +** is equal to the number of bytes in the input string <i>including</i>
    +** the nul-terminator bytes.
    +**
    +** If pzTail is not NULL then *pzTail is made to point to the first byte
    +** past the end of the first SQL statement in zSql.  These routines only
    +** compile the first statement in zSql, so *pzTail is left pointing to
    +** what remains uncompiled.
    +**
    +** *ppStmt is left pointing to a compiled [prepared statement] that can be
    +** executed using [sqlite3_step()].  If there is an error, *ppStmt is set
    +** to NULL.  If the input text contains no SQL (if the input is an empty
    +** string or a comment) then *ppStmt is set to NULL.
    +** The calling procedure is responsible for deleting the compiled
    +** SQL statement using [sqlite3_finalize()] after it has finished with it.
    +** ppStmt may not be NULL.
    +**
    +** On success, [SQLITE_OK] is returned, otherwise an [error code] is returned.
    +**
    +** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
    +** recommended for all new programs. The two older interfaces are retained
    +** for backwards compatibility, but their use is discouraged.
    +** In the "v2" interfaces, the prepared statement
    +** that is returned (the [sqlite3_stmt] object) contains a copy of the
    +** original SQL text. This causes the [sqlite3_step()] interface to
    +** behave a differently in three ways:
    +**
    +** <ol>
    +** <li>
    +** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
    +** always used to do, [sqlite3_step()] will automatically recompile the SQL
    +** statement and try to run it again.  If the schema has changed in
    +** a way that makes the statement no longer valid, [sqlite3_step()] will still
    +** return [SQLITE_SCHEMA].  But unlike the legacy behavior, [SQLITE_SCHEMA] is
    +** now a fatal error.  Calling [sqlite3_prepare_v2()] again will not make the
    +** error go away.  Note: use [sqlite3_errmsg()] to find the text
    +** of the parsing error that results in an [SQLITE_SCHEMA] return.
    +** </li>
    +**
    +** <li>
    +** When an error occurs, [sqlite3_step()] will return one of the detailed
    +** [error codes] or [extended error codes].  The legacy behavior was that
    +** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
    +** and you would have to make a second call to [sqlite3_reset()] in order
    +** to find the underlying cause of the problem. With the "v2" prepare
    +** interfaces, the underlying reason for the error is returned immediately.
    +** </li>
    +**
    +** <li>
    +** ^If the value of a [parameter | host parameter] in the WHERE clause might
    +** change the query plan for a statement, then the statement may be
    +** automatically recompiled (as if there had been a schema change) on the first 
    +** [sqlite3_step()] call following any change to the 
    +** [sqlite3_bind_text | bindings] of the [parameter]. 
    +** </li>
    +** </ol>
    +**
    +** Requirements:
    +** [H13011] [H13012] [H13013] [H13014] [H13015] [H13016] [H13019] [H13021]
    +**
    +*/
    +SQLITE_API int sqlite3_prepare(
    +  sqlite3 *db,            /* Database handle */
    +  const char *zSql,       /* SQL statement, UTF-8 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare_v2(
    +  sqlite3 *db,            /* Database handle */
    +  const char *zSql,       /* SQL statement, UTF-8 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare16(
    +  sqlite3 *db,            /* Database handle */
    +  const void *zSql,       /* SQL statement, UTF-16 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare16_v2(
    +  sqlite3 *db,            /* Database handle */
    +  const void *zSql,       /* SQL statement, UTF-16 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +
    +/*
    +** CAPI3REF: Retrieving Statement SQL {H13100} <H13000>
    +**
    +** This interface can be used to retrieve a saved copy of the original
    +** SQL text used to create a [prepared statement] if that statement was
    +** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
    +**
    +** Requirements:
    +** [H13101] [H13102] [H13103]
    +*/
    +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Dynamically Typed Value Object {H15000} <S20200>
    +** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
    +**
    +** SQLite uses the sqlite3_value object to represent all values
    +** that can be stored in a database table. SQLite uses dynamic typing
    +** for the values it stores. Values stored in sqlite3_value objects
    +** can be integers, floating point values, strings, BLOBs, or NULL.
    +**
    +** An sqlite3_value object may be either "protected" or "unprotected".
    +** Some interfaces require a protected sqlite3_value.  Other interfaces
    +** will accept either a protected or an unprotected sqlite3_value.
    +** Every interface that accepts sqlite3_value arguments specifies
    +** whether or not it requires a protected sqlite3_value.
    +**
    +** The terms "protected" and "unprotected" refer to whether or not
    +** a mutex is held.  A internal mutex is held for a protected
    +** sqlite3_value object but no mutex is held for an unprotected
    +** sqlite3_value object.  If SQLite is compiled to be single-threaded
    +** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
    +** or if SQLite is run in one of reduced mutex modes 
    +** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
    +** then there is no distinction between protected and unprotected
    +** sqlite3_value objects and they can be used interchangeably.  However,
    +** for maximum code portability it is recommended that applications
    +** still make the distinction between between protected and unprotected
    +** sqlite3_value objects even when not strictly required.
    +**
    +** The sqlite3_value objects that are passed as parameters into the
    +** implementation of [application-defined SQL functions] are protected.
    +** The sqlite3_value object returned by
    +** [sqlite3_column_value()] is unprotected.
    +** Unprotected sqlite3_value objects may only be used with
    +** [sqlite3_result_value()] and [sqlite3_bind_value()].
    +** The [sqlite3_value_blob | sqlite3_value_type()] family of
    +** interfaces require protected sqlite3_value objects.
    +*/
    +typedef struct Mem sqlite3_value;
    +
    +/*
    +** CAPI3REF: SQL Function Context Object {H16001} <S20200>
    +**
    +** The context in which an SQL function executes is stored in an
    +** sqlite3_context object.  A pointer to an sqlite3_context object
    +** is always first parameter to [application-defined SQL functions].
    +** The application-defined SQL function implementation will pass this
    +** pointer through into calls to [sqlite3_result_int | sqlite3_result()],
    +** [sqlite3_aggregate_context()], [sqlite3_user_data()],
    +** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
    +** and/or [sqlite3_set_auxdata()].
    +*/
    +typedef struct sqlite3_context sqlite3_context;
    +
    +/*
    +** CAPI3REF: Binding Values To Prepared Statements {H13500} <S70300>
    +** KEYWORDS: {host parameter} {host parameters} {host parameter name}
    +** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
    +**
    +** In the SQL strings input to [sqlite3_prepare_v2()] and its variants,
    +** literals may be replaced by a [parameter] that matches one of following
    +** templates:
    +**
    +** <ul>
    +** <li>  ?
    +** <li>  ?NNN
    +** <li>  :VVV
    +** <li>  @VVV
    +** <li>  $VVV
    +** </ul>
    +**
    +** In the templates above, NNN represents an integer literal,
    +** and VVV represents an alphanumeric identifer.  The values of these
    +** parameters (also called "host parameter names" or "SQL parameters")
    +** can be set using the sqlite3_bind_*() routines defined here.
    +**
    +** The first argument to the sqlite3_bind_*() routines is always
    +** a pointer to the [sqlite3_stmt] object returned from
    +** [sqlite3_prepare_v2()] or its variants.
    +**
    +** The second argument is the index of the SQL parameter to be set.
    +** The leftmost SQL parameter has an index of 1.  When the same named
    +** SQL parameter is used more than once, second and subsequent
    +** occurrences have the same index as the first occurrence.
    +** The index for named parameters can be looked up using the
    +** [sqlite3_bind_parameter_index()] API if desired.  The index
    +** for "?NNN" parameters is the value of NNN.
    +** The NNN value must be between 1 and the [sqlite3_limit()]
    +** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
    +**
    +** The third argument is the value to bind to the parameter.
    +**
    +** In those routines that have a fourth argument, its value is the
    +** number of bytes in the parameter.  To be clear: the value is the
    +** number of <u>bytes</u> in the value, not the number of characters.
    +** If the fourth parameter is negative, the length of the string is
    +** the number of bytes up to the first zero terminator.
    +**
    +** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
    +** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
    +** string after SQLite has finished with it. If the fifth argument is
    +** the special value [SQLITE_STATIC], then SQLite assumes that the
    +** information is in static, unmanaged space and does not need to be freed.
    +** If the fifth argument has the value [SQLITE_TRANSIENT], then
    +** SQLite makes its own private copy of the data immediately, before
    +** the sqlite3_bind_*() routine returns.
    +**
    +** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
    +** is filled with zeroes.  A zeroblob uses a fixed amount of memory
    +** (just an integer to hold its size) while it is being processed.
    +** Zeroblobs are intended to serve as placeholders for BLOBs whose
    +** content is later written using
    +** [sqlite3_blob_open | incremental BLOB I/O] routines.
    +** A negative value for the zeroblob results in a zero-length BLOB.
    +**
    +** The sqlite3_bind_*() routines must be called after
    +** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and
    +** before [sqlite3_step()].
    +** Bindings are not cleared by the [sqlite3_reset()] routine.
    +** Unbound parameters are interpreted as NULL.
    +**
    +** These routines return [SQLITE_OK] on success or an error code if
    +** anything goes wrong.  [SQLITE_RANGE] is returned if the parameter
    +** index is out of range.  [SQLITE_NOMEM] is returned if malloc() fails.
    +** [SQLITE_MISUSE] might be returned if these routines are called on a
    +** virtual machine that is the wrong state or which has already been finalized.
    +** Detection of misuse is unreliable.  Applications should not depend
    +** on SQLITE_MISUSE returns.  SQLITE_MISUSE is intended to indicate a
    +** a logic error in the application.  Future versions of SQLite might
    +** panic rather than return SQLITE_MISUSE.
    +**
    +** See also: [sqlite3_bind_parameter_count()],
    +** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13506] [H13509] [H13512] [H13515] [H13518] [H13521] [H13524] [H13527]
    +** [H13530] [H13533] [H13536] [H13539] [H13542] [H13545] [H13548] [H13551]
    +**
    +*/
    +SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
    +SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
    +SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
    +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
    +SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
    +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
    +SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
    +SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
    +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
    +
    +/*
    +** CAPI3REF: Number Of SQL Parameters {H13600} <S70300>
    +**
    +** This routine can be used to find the number of [SQL parameters]
    +** in a [prepared statement].  SQL parameters are tokens of the
    +** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
    +** placeholders for values that are [sqlite3_bind_blob | bound]
    +** to the parameters at a later time.
    +**
    +** This routine actually returns the index of the largest (rightmost)
    +** parameter. For all forms except ?NNN, this will correspond to the
    +** number of unique parameters.  If parameters of the ?NNN are used,
    +** there may be gaps in the list.
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_name()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13601]
    +*/
    +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Name Of A Host Parameter {H13620} <S70300>
    +**
    +** This routine returns a pointer to the name of the n-th
    +** [SQL parameter] in a [prepared statement].
    +** SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
    +** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
    +** respectively.
    +** In other words, the initial ":" or "$" or "@" or "?"
    +** is included as part of the name.
    +** Parameters of the form "?" without a following integer have no name
    +** and are also referred to as "anonymous parameters".
    +**
    +** The first host parameter has an index of 1, not 0.
    +**
    +** If the value n is out of range or if the n-th parameter is
    +** nameless, then NULL is returned.  The returned string is
    +** always in UTF-8 encoding even if the named parameter was
    +** originally specified as UTF-16 in [sqlite3_prepare16()] or
    +** [sqlite3_prepare16_v2()].
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_count()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13621]
    +*/
    +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
    +
    +/*
    +** CAPI3REF: Index Of A Parameter With A Given Name {H13640} <S70300>
    +**
    +** Return the index of an SQL parameter given its name.  The
    +** index value returned is suitable for use as the second
    +** parameter to [sqlite3_bind_blob|sqlite3_bind()].  A zero
    +** is returned if no matching parameter is found.  The parameter
    +** name must be given in UTF-8 even if the original statement
    +** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_count()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13641]
    +*/
    +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
    +
    +/*
    +** CAPI3REF: Reset All Bindings On A Prepared Statement {H13660} <S70300>
    +**
    +** Contrary to the intuition of many, [sqlite3_reset()] does not reset
    +** the [sqlite3_bind_blob | bindings] on a [prepared statement].
    +** Use this routine to reset all host parameters to NULL.
    +**
    +** Requirements:
    +** [H13661]
    +*/
    +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Number Of Columns In A Result Set {H13710} <S10700>
    +**
    +** Return the number of columns in the result set returned by the
    +** [prepared statement]. This routine returns 0 if pStmt is an SQL
    +** statement that does not return data (for example an [UPDATE]).
    +**
    +** Requirements:
    +** [H13711]
    +*/
    +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Column Names In A Result Set {H13720} <S10700>
    +**
    +** These routines return the name assigned to a particular column
    +** in the result set of a [SELECT] statement.  The sqlite3_column_name()
    +** interface returns a pointer to a zero-terminated UTF-8 string
    +** and sqlite3_column_name16() returns a pointer to a zero-terminated
    +** UTF-16 string.  The first parameter is the [prepared statement]
    +** that implements the [SELECT] statement. The second parameter is the
    +** column number.  The leftmost column is number 0.
    +**
    +** The returned string pointer is valid until either the [prepared statement]
    +** is destroyed by [sqlite3_finalize()] or until the next call to
    +** sqlite3_column_name() or sqlite3_column_name16() on the same column.
    +**
    +** If sqlite3_malloc() fails during the processing of either routine
    +** (for example during a conversion from UTF-8 to UTF-16) then a
    +** NULL pointer is returned.
    +**
    +** The name of a result column is the value of the "AS" clause for
    +** that column, if there is an AS clause.  If there is no AS clause
    +** then the name of the column is unspecified and may change from
    +** one release of SQLite to the next.
    +**
    +** Requirements:
    +** [H13721] [H13723] [H13724] [H13725] [H13726] [H13727]
    +*/
    +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
    +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
    +
    +/*
    +** CAPI3REF: Source Of Data In A Query Result {H13740} <S10700>
    +**
    +** These routines provide a means to determine what column of what
    +** table in which database a result of a [SELECT] statement comes from.
    +** The name of the database or table or column can be returned as
    +** either a UTF-8 or UTF-16 string.  The _database_ routines return
    +** the database name, the _table_ routines return the table name, and
    +** the origin_ routines return the column name.
    +** The returned string is valid until the [prepared statement] is destroyed
    +** using [sqlite3_finalize()] or until the same information is requested
    +** again in a different encoding.
    +**
    +** The names returned are the original un-aliased names of the
    +** database, table, and column.
    +**
    +** The first argument to the following calls is a [prepared statement].
    +** These functions return information about the Nth column returned by
    +** the statement, where N is the second function argument.
    +**
    +** If the Nth column returned by the statement is an expression or
    +** subquery and is not a column value, then all of these functions return
    +** NULL.  These routine might also return NULL if a memory allocation error
    +** occurs.  Otherwise, they return the name of the attached database, table
    +** and column that query result column was extracted from.
    +**
    +** As with all other SQLite APIs, those postfixed with "16" return
    +** UTF-16 encoded strings, the other functions return UTF-8. {END}
    +**
    +** These APIs are only available if the library was compiled with the
    +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
    +**
    +** {A13751}
    +** If two or more threads call one or more of these routines against the same
    +** prepared statement and column at the same time then the results are
    +** undefined.
    +**
    +** Requirements:
    +** [H13741] [H13742] [H13743] [H13744] [H13745] [H13746] [H13748]
    +**
    +** If two or more threads call one or more
    +** [sqlite3_column_database_name | column metadata interfaces]
    +** for the same [prepared statement] and result column
    +** at the same time then the results are undefined.
    +*/
    +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
    +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
    +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
    +
    +/*
    +** CAPI3REF: Declared Datatype Of A Query Result {H13760} <S10700>
    +**
    +** The first parameter is a [prepared statement].
    +** If this statement is a [SELECT] statement and the Nth column of the
    +** returned result set of that [SELECT] is a table column (not an
    +** expression or subquery) then the declared type of the table
    +** column is returned.  If the Nth column of the result set is an
    +** expression or subquery, then a NULL pointer is returned.
    +** The returned string is always UTF-8 encoded. {END}
    +**
    +** For example, given the database schema:
    +**
    +** CREATE TABLE t1(c1 VARIANT);
    +**
    +** and the following statement to be compiled:
    +**
    +** SELECT c1 + 1, c1 FROM t1;
    +**
    +** this routine would return the string "VARIANT" for the second result
    +** column (i==1), and a NULL pointer for the first result column (i==0).
    +**
    +** SQLite uses dynamic run-time typing.  So just because a column
    +** is declared to contain a particular type does not mean that the
    +** data stored in that column is of the declared type.  SQLite is
    +** strongly typed, but the typing is dynamic not static.  Type
    +** is associated with individual values, not with the containers
    +** used to hold those values.
    +**
    +** Requirements:
    +** [H13761] [H13762] [H13763]
    +*/
    +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
    +
    +/*
    +** CAPI3REF: Evaluate An SQL Statement {H13200} <S10000>
    +**
    +** After a [prepared statement] has been prepared using either
    +** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
    +** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
    +** must be called one or more times to evaluate the statement.
    +**
    +** The details of the behavior of the sqlite3_step() interface depend
    +** on whether the statement was prepared using the newer "v2" interface
    +** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
    +** interface [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the
    +** new "v2" interface is recommended for new applications but the legacy
    +** interface will continue to be supported.
    +**
    +** In the legacy interface, the return value will be either [SQLITE_BUSY],
    +** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
    +** With the "v2" interface, any of the other [result codes] or
    +** [extended result codes] might be returned as well.
    +**
    +** [SQLITE_BUSY] means that the database engine was unable to acquire the
    +** database locks it needs to do its job.  If the statement is a [COMMIT]
    +** or occurs outside of an explicit transaction, then you can retry the
    +** statement.  If the statement is not a [COMMIT] and occurs within a
    +** explicit transaction then you should rollback the transaction before
    +** continuing.
    +**
    +** [SQLITE_DONE] means that the statement has finished executing
    +** successfully.  sqlite3_step() should not be called again on this virtual
    +** machine without first calling [sqlite3_reset()] to reset the virtual
    +** machine back to its initial state.
    +**
    +** If the SQL statement being executed returns any data, then [SQLITE_ROW]
    +** is returned each time a new row of data is ready for processing by the
    +** caller. The values may be accessed using the [column access functions].
    +** sqlite3_step() is called again to retrieve the next row of data.
    +**
    +** [SQLITE_ERROR] means that a run-time error (such as a constraint
    +** violation) has occurred.  sqlite3_step() should not be called again on
    +** the VM. More information may be found by calling [sqlite3_errmsg()].
    +** With the legacy interface, a more specific error code (for example,
    +** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
    +** can be obtained by calling [sqlite3_reset()] on the
    +** [prepared statement].  In the "v2" interface,
    +** the more specific error code is returned directly by sqlite3_step().
    +**
    +** [SQLITE_MISUSE] means that the this routine was called inappropriately.
    +** Perhaps it was called on a [prepared statement] that has
    +** already been [sqlite3_finalize | finalized] or on one that had
    +** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
    +** be the case that the same database connection is being used by two or
    +** more threads at the same moment in time.
    +**
    +** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
    +** API always returns a generic error code, [SQLITE_ERROR], following any
    +** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
    +** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
    +** specific [error codes] that better describes the error.
    +** We admit that this is a goofy design.  The problem has been fixed
    +** with the "v2" interface.  If you prepare all of your SQL statements
    +** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
    +** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
    +** then the more specific [error codes] are returned directly
    +** by sqlite3_step().  The use of the "v2" interface is recommended.
    +**
    +** Requirements:
    +** [H13202] [H15304] [H15306] [H15308] [H15310]
    +*/
    +SQLITE_API int sqlite3_step(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Number of columns in a result set {H13770} <S10700>
    +**
    +** Returns the number of values in the current row of the result set.
    +**
    +** Requirements:
    +** [H13771] [H13772]
    +*/
    +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Fundamental Datatypes {H10265} <S10110><S10120>
    +** KEYWORDS: SQLITE_TEXT
    +**
    +** {H10266} Every value in SQLite has one of five fundamental datatypes:
    +**
    +** <ul>
    +** <li> 64-bit signed integer
    +** <li> 64-bit IEEE floating point number
    +** <li> string
    +** <li> BLOB
    +** <li> NULL
    +** </ul> {END}
    +**
    +** These constants are codes for each of those types.
    +**
    +** Note that the SQLITE_TEXT constant was also used in SQLite version 2
    +** for a completely different meaning.  Software that links against both
    +** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
    +** SQLITE_TEXT.
    +*/
    +#define SQLITE_INTEGER  1
    +#define SQLITE_FLOAT    2
    +#define SQLITE_BLOB     4
    +#define SQLITE_NULL     5
    +#ifdef SQLITE_TEXT
    +# undef SQLITE_TEXT
    +#else
    +# define SQLITE_TEXT     3
    +#endif
    +#define SQLITE3_TEXT     3
    +
    +/*
    +** CAPI3REF: Result Values From A Query {H13800} <S10700>
    +** KEYWORDS: {column access functions}
    +**
    +** These routines form the "result set query" interface.
    +**
    +** These routines return information about a single column of the current
    +** result row of a query.  In every case the first argument is a pointer
    +** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
    +** that was returned from [sqlite3_prepare_v2()] or one of its variants)
    +** and the second argument is the index of the column for which information
    +** should be returned.  The leftmost column of the result set has the index 0.
    +** The number of columns in the result can be determined using
    +** [sqlite3_column_count()].
    +**
    +** If the SQL statement does not currently point to a valid row, or if the
    +** column index is out of range, the result is undefined.
    +** These routines may only be called when the most recent call to
    +** [sqlite3_step()] has returned [SQLITE_ROW] and neither
    +** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
    +** If any of these routines are called after [sqlite3_reset()] or
    +** [sqlite3_finalize()] or after [sqlite3_step()] has returned
    +** something other than [SQLITE_ROW], the results are undefined.
    +** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
    +** are called from a different thread while any of these routines
    +** are pending, then the results are undefined.
    +**
    +** The sqlite3_column_type() routine returns the
    +** [SQLITE_INTEGER | datatype code] for the initial data type
    +** of the result column.  The returned value is one of [SQLITE_INTEGER],
    +** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].  The value
    +** returned by sqlite3_column_type() is only meaningful if no type
    +** conversions have occurred as described below.  After a type conversion,
    +** the value returned by sqlite3_column_type() is undefined.  Future
    +** versions of SQLite may change the behavior of sqlite3_column_type()
    +** following a type conversion.
    +**
    +** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
    +** routine returns the number of bytes in that BLOB or string.
    +** If the result is a UTF-16 string, then sqlite3_column_bytes() converts
    +** the string to UTF-8 and then returns the number of bytes.
    +** If the result is a numeric value then sqlite3_column_bytes() uses
    +** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
    +** the number of bytes in that string.
    +** The value returned does not include the zero terminator at the end
    +** of the string.  For clarity: the value returned is the number of
    +** bytes in the string, not the number of characters.
    +**
    +** Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
    +** even empty strings, are always zero terminated.  The return
    +** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary
    +** pointer, possibly even a NULL pointer.
    +**
    +** The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes()
    +** but leaves the result in UTF-16 in native byte order instead of UTF-8.
    +** The zero terminator is not included in this count.
    +**
    +** The object returned by [sqlite3_column_value()] is an
    +** [unprotected sqlite3_value] object.  An unprotected sqlite3_value object
    +** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
    +** If the [unprotected sqlite3_value] object returned by
    +** [sqlite3_column_value()] is used in any other way, including calls
    +** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
    +** or [sqlite3_value_bytes()], then the behavior is undefined.
    +**
    +** These routines attempt to convert the value where appropriate.  For
    +** example, if the internal representation is FLOAT and a text result
    +** is requested, [sqlite3_snprintf()] is used internally to perform the
    +** conversion automatically.  The following table details the conversions
    +** that are applied:
    +**
    +** <blockquote>
    +** <table border="1">
    +** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion
    +**
    +** <tr><td>  NULL    <td> INTEGER   <td> Result is 0
    +** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0
    +** <tr><td>  NULL    <td>   TEXT    <td> Result is NULL pointer
    +** <tr><td>  NULL    <td>   BLOB    <td> Result is NULL pointer
    +** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float
    +** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer
    +** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT
    +** <tr><td>  FLOAT   <td> INTEGER   <td> Convert from float to integer
    +** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float
    +** <tr><td>  FLOAT   <td>   BLOB    <td> Same as FLOAT->TEXT
    +** <tr><td>  TEXT    <td> INTEGER   <td> Use atoi()
    +** <tr><td>  TEXT    <td>  FLOAT    <td> Use atof()
    +** <tr><td>  TEXT    <td>   BLOB    <td> No change
    +** <tr><td>  BLOB    <td> INTEGER   <td> Convert to TEXT then use atoi()
    +** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()
    +** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed
    +** </table>
    +** </blockquote>
    +**
    +** The table above makes reference to standard C library functions atoi()
    +** and atof().  SQLite does not really use these functions.  It has its
    +** own equivalent internal routines.  The atoi() and atof() names are
    +** used in the table for brevity and because they are familiar to most
    +** C programmers.
    +**
    +** Note that when type conversions occur, pointers returned by prior
    +** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
    +** sqlite3_column_text16() may be invalidated.
    +** Type conversions and pointer invalidations might occur
    +** in the following cases:
    +**
    +** <ul>
    +** <li> The initial content is a BLOB and sqlite3_column_text() or
    +**      sqlite3_column_text16() is called.  A zero-terminator might
    +**      need to be added to the string.</li>
    +** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or
    +**      sqlite3_column_text16() is called.  The content must be converted
    +**      to UTF-16.</li>
    +** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or
    +**      sqlite3_column_text() is called.  The content must be converted
    +**      to UTF-8.</li>
    +** </ul>
    +**
    +** Conversions between UTF-16be and UTF-16le are always done in place and do
    +** not invalidate a prior pointer, though of course the content of the buffer
    +** that the prior pointer points to will have been modified.  Other kinds
    +** of conversion are done in place when it is possible, but sometimes they
    +** are not possible and in those cases prior pointers are invalidated.
    +**
    +** The safest and easiest to remember policy is to invoke these routines
    +** in one of the following ways:
    +**
    +** <ul>
    +**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>
    +**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>
    +**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>
    +** </ul>
    +**
    +** In other words, you should call sqlite3_column_text(),
    +** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
    +** into the desired format, then invoke sqlite3_column_bytes() or
    +** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls
    +** to sqlite3_column_text() or sqlite3_column_blob() with calls to
    +** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
    +** with calls to sqlite3_column_bytes().
    +**
    +** The pointers returned are valid until a type conversion occurs as
    +** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
    +** [sqlite3_finalize()] is called.  The memory space used to hold strings
    +** and BLOBs is freed automatically.  Do <b>not</b> pass the pointers returned
    +** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
    +** [sqlite3_free()].
    +**
    +** If a memory allocation error occurs during the evaluation of any
    +** of these routines, a default value is returned.  The default value
    +** is either the integer 0, the floating point number 0.0, or a NULL
    +** pointer.  Subsequent calls to [sqlite3_errcode()] will return
    +** [SQLITE_NOMEM].
    +**
    +** Requirements:
    +** [H13803] [H13806] [H13809] [H13812] [H13815] [H13818] [H13821] [H13824]
    +** [H13827] [H13830]
    +*/
    +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
    +SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
    +SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
    +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
    +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
    +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
    +
    +/*
    +** CAPI3REF: Destroy A Prepared Statement Object {H13300} <S70300><S30100>
    +**
    +** The sqlite3_finalize() function is called to delete a [prepared statement].
    +** If the statement was executed successfully or not executed at all, then
    +** SQLITE_OK is returned. If execution of the statement failed then an
    +** [error code] or [extended error code] is returned.
    +**
    +** This routine can be called at any point during the execution of the
    +** [prepared statement].  If the virtual machine has not
    +** completed execution when this routine is called, that is like
    +** encountering an error or an [sqlite3_interrupt | interrupt].
    +** Incomplete updates may be rolled back and transactions canceled,
    +** depending on the circumstances, and the
    +** [error code] returned will be [SQLITE_ABORT].
    +**
    +** Requirements:
    +** [H11302] [H11304]
    +*/
    +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Reset A Prepared Statement Object {H13330} <S70300>
    +**
    +** The sqlite3_reset() function is called to reset a [prepared statement]
    +** object back to its initial state, ready to be re-executed.
    +** Any SQL statement variables that had values bound to them using
    +** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
    +** Use [sqlite3_clear_bindings()] to reset the bindings.
    +**
    +** {H11332} The [sqlite3_reset(S)] interface resets the [prepared statement] S
    +**          back to the beginning of its program.
    +**
    +** {H11334} If the most recent call to [sqlite3_step(S)] for the
    +**          [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
    +**          or if [sqlite3_step(S)] has never before been called on S,
    +**          then [sqlite3_reset(S)] returns [SQLITE_OK].
    +**
    +** {H11336} If the most recent call to [sqlite3_step(S)] for the
    +**          [prepared statement] S indicated an error, then
    +**          [sqlite3_reset(S)] returns an appropriate [error code].
    +**
    +** {H11338} The [sqlite3_reset(S)] interface does not change the values
    +**          of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
    +*/
    +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Create Or Redefine SQL Functions {H16100} <S20200>
    +** KEYWORDS: {function creation routines}
    +** KEYWORDS: {application-defined SQL function}
    +** KEYWORDS: {application-defined SQL functions}
    +**
    +** These two functions (collectively known as "function creation routines")
    +** are used to add SQL functions or aggregates or to redefine the behavior
    +** of existing SQL functions or aggregates.  The only difference between the
    +** two is that the second parameter, the name of the (scalar) function or
    +** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16
    +** for sqlite3_create_function16().
    +**
    +** The first parameter is the [database connection] to which the SQL
    +** function is to be added.  If a single program uses more than one database
    +** connection internally, then SQL functions must be added individually to
    +** each database connection.
    +**
    +** The second parameter is the name of the SQL function to be created or
    +** redefined.  The length of the name is limited to 255 bytes, exclusive of
    +** the zero-terminator.  Note that the name length limit is in bytes, not
    +** characters.  Any attempt to create a function with a longer name
    +** will result in [SQLITE_ERROR] being returned.
    +**
    +** The third parameter (nArg)
    +** is the number of arguments that the SQL function or
    +** aggregate takes. If this parameter is -1, then the SQL function or
    +** aggregate may take any number of arguments between 0 and the limit
    +** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third
    +** parameter is less than -1 or greater than 127 then the behavior is
    +** undefined.
    +**
    +** The fourth parameter, eTextRep, specifies what
    +** [SQLITE_UTF8 | text encoding] this SQL function prefers for
    +** its parameters.  Any SQL function implementation should be able to work
    +** work with UTF-8, UTF-16le, or UTF-16be.  But some implementations may be
    +** more efficient with one encoding than another.  An application may
    +** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
    +** times with the same function but with different values of eTextRep.
    +** When multiple implementations of the same function are available, SQLite
    +** will pick the one that involves the least amount of data conversion.
    +** If there is only a single implementation which does not care what text
    +** encoding is used, then the fourth argument should be [SQLITE_ANY].
    +**
    +** The fifth parameter is an arbitrary pointer.  The implementation of the
    +** function can gain access to this pointer using [sqlite3_user_data()].
    +**
    +** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are
    +** pointers to C-language functions that implement the SQL function or
    +** aggregate. A scalar SQL function requires an implementation of the xFunc
    +** callback only, NULL pointers should be passed as the xStep and xFinal
    +** parameters. An aggregate SQL function requires an implementation of xStep
    +** and xFinal and NULL should be passed for xFunc. To delete an existing
    +** SQL function or aggregate, pass NULL for all three function callbacks.
    +**
    +** It is permitted to register multiple implementations of the same
    +** functions with the same name but with either differing numbers of
    +** arguments or differing preferred text encodings.  SQLite will use
    +** the implementation that most closely matches the way in which the
    +** SQL function is used.  A function implementation with a non-negative
    +** nArg parameter is a better match than a function implementation with
    +** a negative nArg.  A function where the preferred text encoding
    +** matches the database encoding is a better
    +** match than a function where the encoding is different.  
    +** A function where the encoding difference is between UTF16le and UTF16be
    +** is a closer match than a function where the encoding difference is
    +** between UTF8 and UTF16.
    +**
    +** Built-in functions may be overloaded by new application-defined functions.
    +** The first application-defined function with a given name overrides all
    +** built-in functions in the same [database connection] with the same name.
    +** Subsequent application-defined functions of the same name only override 
    +** prior application-defined functions that are an exact match for the
    +** number of parameters and preferred encoding.
    +**
    +** An application-defined function is permitted to call other
    +** SQLite interfaces.  However, such calls must not
    +** close the database connection nor finalize or reset the prepared
    +** statement in which the function is running.
    +**
    +** Requirements:
    +** [H16103] [H16106] [H16109] [H16112] [H16118] [H16121] [H16127]
    +** [H16130] [H16133] [H16136] [H16139] [H16142]
    +*/
    +SQLITE_API int sqlite3_create_function(
    +  sqlite3 *db,
    +  const char *zFunctionName,
    +  int nArg,
    +  int eTextRep,
    +  void *pApp,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xFinal)(sqlite3_context*)
    +);
    +SQLITE_API int sqlite3_create_function16(
    +  sqlite3 *db,
    +  const void *zFunctionName,
    +  int nArg,
    +  int eTextRep,
    +  void *pApp,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xFinal)(sqlite3_context*)
    +);
    +
    +/*
    +** CAPI3REF: Text Encodings {H10267} <S50200> <H16100>
    +**
    +** These constant define integer codes that represent the various
    +** text encodings supported by SQLite.
    +*/
    +#define SQLITE_UTF8           1
    +#define SQLITE_UTF16LE        2
    +#define SQLITE_UTF16BE        3
    +#define SQLITE_UTF16          4    /* Use native byte order */
    +#define SQLITE_ANY            5    /* sqlite3_create_function only */
    +#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
    +
    +/*
    +** CAPI3REF: Deprecated Functions
    +** DEPRECATED
    +**
    +** These functions are [deprecated].  In order to maintain
    +** backwards compatibility with older code, these functions continue 
    +** to be supported.  However, new applications should avoid
    +** the use of these functions.  To help encourage people to avoid
    +** using these functions, we are not going to tell you what they do.
    +*/
    +#ifndef SQLITE_OMIT_DEPRECATED
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
    +SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
    +#endif
    +
    +/*
    +** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} <S20200>
    +**
    +** The C-language implementation of SQL functions and aggregates uses
    +** this set of interface routines to access the parameter values on
    +** the function or aggregate.
    +**
    +** The xFunc (for scalar functions) or xStep (for aggregates) parameters
    +** to [sqlite3_create_function()] and [sqlite3_create_function16()]
    +** define callbacks that implement the SQL functions and aggregates.
    +** The 4th parameter to these callbacks is an array of pointers to
    +** [protected sqlite3_value] objects.  There is one [sqlite3_value] object for
    +** each parameter to the SQL function.  These routines are used to
    +** extract values from the [sqlite3_value] objects.
    +**
    +** These routines work only with [protected sqlite3_value] objects.
    +** Any attempt to use these routines on an [unprotected sqlite3_value]
    +** object results in undefined behavior.
    +**
    +** These routines work just like the corresponding [column access functions]
    +** except that  these routines take a single [protected sqlite3_value] object
    +** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
    +**
    +** The sqlite3_value_text16() interface extracts a UTF-16 string
    +** in the native byte-order of the host machine.  The
    +** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
    +** extract UTF-16 strings as big-endian and little-endian respectively.
    +**
    +** The sqlite3_value_numeric_type() interface attempts to apply
    +** numeric affinity to the value.  This means that an attempt is
    +** made to convert the value to an integer or floating point.  If
    +** such a conversion is possible without loss of information (in other
    +** words, if the value is a string that looks like a number)
    +** then the conversion is performed.  Otherwise no conversion occurs.
    +** The [SQLITE_INTEGER | datatype] after conversion is returned.
    +**
    +** Please pay particular attention to the fact that the pointer returned
    +** from [sqlite3_value_blob()], [sqlite3_value_text()], or
    +** [sqlite3_value_text16()] can be invalidated by a subsequent call to
    +** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
    +** or [sqlite3_value_text16()].
    +**
    +** These routines must be called from the same thread as
    +** the SQL function that supplied the [sqlite3_value*] parameters.
    +**
    +** Requirements:
    +** [H15103] [H15106] [H15109] [H15112] [H15115] [H15118] [H15121] [H15124]
    +** [H15127] [H15130] [H15133] [H15136]
    +*/
    +SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
    +SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
    +SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
    +SQLITE_API double sqlite3_value_double(sqlite3_value*);
    +SQLITE_API int sqlite3_value_int(sqlite3_value*);
    +SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
    +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
    +SQLITE_API int sqlite3_value_type(sqlite3_value*);
    +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
    +
    +/*
    +** CAPI3REF: Obtain Aggregate Function Context {H16210} <S20200>
    +**
    +** The implementation of aggregate SQL functions use this routine to allocate
    +** a structure for storing their state.
    +**
    +** The first time the sqlite3_aggregate_context() routine is called for a
    +** particular aggregate, SQLite allocates nBytes of memory, zeroes out that
    +** memory, and returns a pointer to it. On second and subsequent calls to
    +** sqlite3_aggregate_context() for the same aggregate function index,
    +** the same buffer is returned. The implementation of the aggregate can use
    +** the returned buffer to accumulate data.
    +**
    +** SQLite automatically frees the allocated buffer when the aggregate
    +** query concludes.
    +**
    +** The first parameter should be a copy of the
    +** [sqlite3_context | SQL function context] that is the first parameter
    +** to the callback routine that implements the aggregate function.
    +**
    +** This routine must be called from the same thread in which
    +** the aggregate SQL function is running.
    +**
    +** Requirements:
    +** [H16211] [H16213] [H16215] [H16217]
    +*/
    +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
    +
    +/*
    +** CAPI3REF: User Data For Functions {H16240} <S20200>
    +**
    +** The sqlite3_user_data() interface returns a copy of
    +** the pointer that was the pUserData parameter (the 5th parameter)
    +** of the [sqlite3_create_function()]
    +** and [sqlite3_create_function16()] routines that originally
    +** registered the application defined function. {END}
    +**
    +** This routine must be called from the same thread in which
    +** the application-defined function is running.
    +**
    +** Requirements:
    +** [H16243]
    +*/
    +SQLITE_API void *sqlite3_user_data(sqlite3_context*);
    +
    +/*
    +** CAPI3REF: Database Connection For Functions {H16250} <S60600><S20200>
    +**
    +** The sqlite3_context_db_handle() interface returns a copy of
    +** the pointer to the [database connection] (the 1st parameter)
    +** of the [sqlite3_create_function()]
    +** and [sqlite3_create_function16()] routines that originally
    +** registered the application defined function.
    +**
    +** Requirements:
    +** [H16253]
    +*/
    +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
    +
    +/*
    +** CAPI3REF: Function Auxiliary Data {H16270} <S20200>
    +**
    +** The following two functions may be used by scalar SQL functions to
    +** associate metadata with argument values. If the same value is passed to
    +** multiple invocations of the same SQL function during query execution, under
    +** some circumstances the associated metadata may be preserved. This may
    +** be used, for example, to add a regular-expression matching scalar
    +** function. The compiled version of the regular expression is stored as
    +** metadata associated with the SQL value passed as the regular expression
    +** pattern.  The compiled regular expression can be reused on multiple
    +** invocations of the same function so that the original pattern string
    +** does not need to be recompiled on each invocation.
    +**
    +** The sqlite3_get_auxdata() interface returns a pointer to the metadata
    +** associated by the sqlite3_set_auxdata() function with the Nth argument
    +** value to the application-defined function. If no metadata has been ever
    +** been set for the Nth argument of the function, or if the corresponding
    +** function parameter has changed since the meta-data was set,
    +** then sqlite3_get_auxdata() returns a NULL pointer.
    +**
    +** The sqlite3_set_auxdata() interface saves the metadata
    +** pointed to by its 3rd parameter as the metadata for the N-th
    +** argument of the application-defined function.  Subsequent
    +** calls to sqlite3_get_auxdata() might return this data, if it has
    +** not been destroyed.
    +** If it is not NULL, SQLite will invoke the destructor
    +** function given by the 4th parameter to sqlite3_set_auxdata() on
    +** the metadata when the corresponding function parameter changes
    +** or when the SQL statement completes, whichever comes first.
    +**
    +** SQLite is free to call the destructor and drop metadata on any
    +** parameter of any function at any time.  The only guarantee is that
    +** the destructor will be called before the metadata is dropped.
    +**
    +** In practice, metadata is preserved between function calls for
    +** expressions that are constant at compile time. This includes literal
    +** values and SQL variables.
    +**
    +** These routines must be called from the same thread in which
    +** the SQL function is running.
    +**
    +** Requirements:
    +** [H16272] [H16274] [H16276] [H16277] [H16278] [H16279]
    +*/
    +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
    +SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
    +
    +
    +/*
    +** CAPI3REF: Constants Defining Special Destructor Behavior {H10280} <S30100>
    +**
    +** These are special values for the destructor that is passed in as the
    +** final argument to routines like [sqlite3_result_blob()].  If the destructor
    +** argument is SQLITE_STATIC, it means that the content pointer is constant
    +** and will never change.  It does not need to be destroyed.  The
    +** SQLITE_TRANSIENT value means that the content will likely change in
    +** the near future and that SQLite should make its own private copy of
    +** the content before returning.
    +**
    +** The typedef is necessary to work around problems in certain
    +** C++ compilers.  See ticket #2191.
    +*/
    +typedef void (*sqlite3_destructor_type)(void*);
    +#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
    +#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
    +
    +/*
    +** CAPI3REF: Setting The Result Of An SQL Function {H16400} <S20200>
    +**
    +** These routines are used by the xFunc or xFinal callbacks that
    +** implement SQL functions and aggregates.  See
    +** [sqlite3_create_function()] and [sqlite3_create_function16()]
    +** for additional information.
    +**
    +** These functions work very much like the [parameter binding] family of
    +** functions used to bind values to host parameters in prepared statements.
    +** Refer to the [SQL parameter] documentation for additional information.
    +**
    +** The sqlite3_result_blob() interface sets the result from
    +** an application-defined function to be the BLOB whose content is pointed
    +** to by the second parameter and which is N bytes long where N is the
    +** third parameter.
    +**
    +** The sqlite3_result_zeroblob() interfaces set the result of
    +** the application-defined function to be a BLOB containing all zero
    +** bytes and N bytes in size, where N is the value of the 2nd parameter.
    +**
    +** The sqlite3_result_double() interface sets the result from
    +** an application-defined function to be a floating point value specified
    +** by its 2nd argument.
    +**
    +** The sqlite3_result_error() and sqlite3_result_error16() functions
    +** cause the implemented SQL function to throw an exception.
    +** SQLite uses the string pointed to by the
    +** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
    +** as the text of an error message.  SQLite interprets the error
    +** message string from sqlite3_result_error() as UTF-8. SQLite
    +** interprets the string from sqlite3_result_error16() as UTF-16 in native
    +** byte order.  If the third parameter to sqlite3_result_error()
    +** or sqlite3_result_error16() is negative then SQLite takes as the error
    +** message all text up through the first zero character.
    +** If the third parameter to sqlite3_result_error() or
    +** sqlite3_result_error16() is non-negative then SQLite takes that many
    +** bytes (not characters) from the 2nd parameter as the error message.
    +** The sqlite3_result_error() and sqlite3_result_error16()
    +** routines make a private copy of the error message text before
    +** they return.  Hence, the calling function can deallocate or
    +** modify the text after they return without harm.
    +** The sqlite3_result_error_code() function changes the error code
    +** returned by SQLite as a result of an error in a function.  By default,
    +** the error code is SQLITE_ERROR.  A subsequent call to sqlite3_result_error()
    +** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
    +**
    +** The sqlite3_result_toobig() interface causes SQLite to throw an error
    +** indicating that a string or BLOB is to long to represent.
    +**
    +** The sqlite3_result_nomem() interface causes SQLite to throw an error
    +** indicating that a memory allocation failed.
    +**
    +** The sqlite3_result_int() interface sets the return value
    +** of the application-defined function to be the 32-bit signed integer
    +** value given in the 2nd argument.
    +** The sqlite3_result_int64() interface sets the return value
    +** of the application-defined function to be the 64-bit signed integer
    +** value given in the 2nd argument.
    +**
    +** The sqlite3_result_null() interface sets the return value
    +** of the application-defined function to be NULL.
    +**
    +** The sqlite3_result_text(), sqlite3_result_text16(),
    +** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
    +** set the return value of the application-defined function to be
    +** a text string which is represented as UTF-8, UTF-16 native byte order,
    +** UTF-16 little endian, or UTF-16 big endian, respectively.
    +** SQLite takes the text result from the application from
    +** the 2nd parameter of the sqlite3_result_text* interfaces.
    +** If the 3rd parameter to the sqlite3_result_text* interfaces
    +** is negative, then SQLite takes result text from the 2nd parameter
    +** through the first zero character.
    +** If the 3rd parameter to the sqlite3_result_text* interfaces
    +** is non-negative, then as many bytes (not characters) of the text
    +** pointed to by the 2nd parameter are taken as the application-defined
    +** function result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces
    +** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
    +** function as the destructor on the text or BLOB result when it has
    +** finished using that result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces or to
    +** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
    +** assumes that the text or BLOB result is in constant space and does not
    +** copy the content of the parameter nor call a destructor on the content
    +** when it has finished using that result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces
    +** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
    +** then SQLite makes a copy of the result into space obtained from
    +** from [sqlite3_malloc()] before it returns.
    +**
    +** The sqlite3_result_value() interface sets the result of
    +** the application-defined function to be a copy the
    +** [unprotected sqlite3_value] object specified by the 2nd parameter.  The
    +** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
    +** so that the [sqlite3_value] specified in the parameter may change or
    +** be deallocated after sqlite3_result_value() returns without harm.
    +** A [protected sqlite3_value] object may always be used where an
    +** [unprotected sqlite3_value] object is required, so either
    +** kind of [sqlite3_value] object can be used with this interface.
    +**
    +** If these routines are called from within the different thread
    +** than the one containing the application-defined function that received
    +** the [sqlite3_context] pointer, the results are undefined.
    +**
    +** Requirements:
    +** [H16403] [H16406] [H16409] [H16412] [H16415] [H16418] [H16421] [H16424]
    +** [H16427] [H16430] [H16433] [H16436] [H16439] [H16442] [H16445] [H16448]
    +** [H16451] [H16454] [H16457] [H16460] [H16463]
    +*/
    +SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
    +SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
    +SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
    +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
    +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
    +SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
    +SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
    +SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
    +SQLITE_API void sqlite3_result_null(sqlite3_context*);
    +SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
    +SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
    +SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
    +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
    +
    +/*
    +** CAPI3REF: Define New Collating Sequences {H16600} <S20300>
    +**
    +** These functions are used to add new collation sequences to the
    +** [database connection] specified as the first argument.
    +**
    +** The name of the new collation sequence is specified as a UTF-8 string
    +** for sqlite3_create_collation() and sqlite3_create_collation_v2()
    +** and a UTF-16 string for sqlite3_create_collation16(). In all cases
    +** the name is passed as the second function argument.
    +**
    +** The third argument may be one of the constants [SQLITE_UTF8],
    +** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied
    +** routine expects to be passed pointers to strings encoded using UTF-8,
    +** UTF-16 little-endian, or UTF-16 big-endian, respectively. The
    +** third argument might also be [SQLITE_UTF16] to indicate that the routine
    +** expects pointers to be UTF-16 strings in the native byte order, or the
    +** argument can be [SQLITE_UTF16_ALIGNED] if the
    +** the routine expects pointers to 16-bit word aligned strings
    +** of UTF-16 in the native byte order.
    +**
    +** A pointer to the user supplied routine must be passed as the fifth
    +** argument.  If it is NULL, this is the same as deleting the collation
    +** sequence (so that SQLite cannot call it anymore).
    +** Each time the application supplied function is invoked, it is passed
    +** as its first parameter a copy of the void* passed as the fourth argument
    +** to sqlite3_create_collation() or sqlite3_create_collation16().
    +**
    +** The remaining arguments to the application-supplied routine are two strings,
    +** each represented by a (length, data) pair and encoded in the encoding
    +** that was passed as the third argument when the collation sequence was
    +** registered. {END}  The application defined collation routine should
    +** return negative, zero or positive if the first string is less than,
    +** equal to, or greater than the second string. i.e. (STRING1 - STRING2).
    +**
    +** The sqlite3_create_collation_v2() works like sqlite3_create_collation()
    +** except that it takes an extra argument which is a destructor for
    +** the collation.  The destructor is called when the collation is
    +** destroyed and is passed a copy of the fourth parameter void* pointer
    +** of the sqlite3_create_collation_v2().
    +** Collations are destroyed when they are overridden by later calls to the
    +** collation creation functions or when the [database connection] is closed
    +** using [sqlite3_close()].
    +**
    +** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
    +**
    +** Requirements:
    +** [H16603] [H16604] [H16606] [H16609] [H16612] [H16615] [H16618] [H16621]
    +** [H16624] [H16627] [H16630]
    +*/
    +SQLITE_API int sqlite3_create_collation(
    +  sqlite3*, 
    +  const char *zName, 
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +);
    +SQLITE_API int sqlite3_create_collation_v2(
    +  sqlite3*, 
    +  const char *zName, 
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*),
    +  void(*xDestroy)(void*)
    +);
    +SQLITE_API int sqlite3_create_collation16(
    +  sqlite3*, 
    +  const void *zName,
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +);
    +
    +/*
    +** CAPI3REF: Collation Needed Callbacks {H16700} <S20300>
    +**
    +** To avoid having to register all collation sequences before a database
    +** can be used, a single callback function may be registered with the
    +** [database connection] to be called whenever an undefined collation
    +** sequence is required.
    +**
    +** If the function is registered using the sqlite3_collation_needed() API,
    +** then it is passed the names of undefined collation sequences as strings
    +** encoded in UTF-8. {H16703} If sqlite3_collation_needed16() is used,
    +** the names are passed as UTF-16 in machine native byte order.
    +** A call to either function replaces any existing callback.
    +**
    +** When the callback is invoked, the first argument passed is a copy
    +** of the second argument to sqlite3_collation_needed() or
    +** sqlite3_collation_needed16().  The second argument is the database
    +** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
    +** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
    +** sequence function required.  The fourth parameter is the name of the
    +** required collation sequence.
    +**
    +** The callback function should register the desired collation using
    +** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
    +** [sqlite3_create_collation_v2()].
    +**
    +** Requirements:
    +** [H16702] [H16704] [H16706]
    +*/
    +SQLITE_API int sqlite3_collation_needed(
    +  sqlite3*, 
    +  void*, 
    +  void(*)(void*,sqlite3*,int eTextRep,const char*)
    +);
    +SQLITE_API int sqlite3_collation_needed16(
    +  sqlite3*, 
    +  void*,
    +  void(*)(void*,sqlite3*,int eTextRep,const void*)
    +);
    +
    +/*
    +** Specify the key for an encrypted database.  This routine should be
    +** called right after sqlite3_open().
    +**
    +** The code to implement this API is not available in the public release
    +** of SQLite.
    +*/
    +SQLITE_API int sqlite3_key(
    +  sqlite3 *db,                   /* Database to be rekeyed */
    +  const void *pKey, int nKey     /* The key */
    +);
    +
    +/*
    +** Change the key on an open database.  If the current database is not
    +** encrypted, this routine will encrypt it.  If pNew==0 or nNew==0, the
    +** database is decrypted.
    +**
    +** The code to implement this API is not available in the public release
    +** of SQLite.
    +*/
    +SQLITE_API int sqlite3_rekey(
    +  sqlite3 *db,                   /* Database to be rekeyed */
    +  const void *pKey, int nKey     /* The new key */
    +);
    +
    +/*
    +** CAPI3REF: Suspend Execution For A Short Time {H10530} <S40410>
    +**
    +** The sqlite3_sleep() function causes the current thread to suspend execution
    +** for at least a number of milliseconds specified in its parameter.
    +**
    +** If the operating system does not support sleep requests with
    +** millisecond time resolution, then the time will be rounded up to
    +** the nearest second. The number of milliseconds of sleep actually
    +** requested from the operating system is returned.
    +**
    +** SQLite implements this interface by calling the xSleep()
    +** method of the default [sqlite3_vfs] object.
    +**
    +** Requirements: [H10533] [H10536]
    +*/
    +SQLITE_API int sqlite3_sleep(int);
    +
    +/*
    +** CAPI3REF: Name Of The Folder Holding Temporary Files {H10310} <S20000>
    +**
    +** If this global variable is made to point to a string which is
    +** the name of a folder (a.k.a. directory), then all temporary files
    +** created by SQLite will be placed in that directory.  If this variable
    +** is a NULL pointer, then SQLite performs a search for an appropriate
    +** temporary file directory.
    +**
    +** It is not safe to read or modify this variable in more than one
    +** thread at a time.  It is not safe to read or modify this variable
    +** if a [database connection] is being used at the same time in a separate
    +** thread.
    +** It is intended that this variable be set once
    +** as part of process initialization and before any SQLite interface
    +** routines have been called and that this variable remain unchanged
    +** thereafter.
    +**
    +** The [temp_store_directory pragma] may modify this variable and cause
    +** it to point to memory obtained from [sqlite3_malloc].  Furthermore,
    +** the [temp_store_directory pragma] always assumes that any string
    +** that this variable points to is held in memory obtained from 
    +** [sqlite3_malloc] and the pragma may attempt to free that memory
    +** using [sqlite3_free].
    +** Hence, if this variable is modified directly, either it should be
    +** made NULL or made to point to memory obtained from [sqlite3_malloc]
    +** or else the use of the [temp_store_directory pragma] should be avoided.
    +*/
    +SQLITE_API char *sqlite3_temp_directory;
    +
    +/*
    +** CAPI3REF: Test For Auto-Commit Mode {H12930} <S60200>
    +** KEYWORDS: {autocommit mode}
    +**
    +** The sqlite3_get_autocommit() interface returns non-zero or
    +** zero if the given database connection is or is not in autocommit mode,
    +** respectively.  Autocommit mode is on by default.
    +** Autocommit mode is disabled by a [BEGIN] statement.
    +** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
    +**
    +** If certain kinds of errors occur on a statement within a multi-statement
    +** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
    +** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
    +** transaction might be rolled back automatically.  The only way to
    +** find out whether SQLite automatically rolled back the transaction after
    +** an error is to use this function.
    +**
    +** If another thread changes the autocommit status of the database
    +** connection while this routine is running, then the return value
    +** is undefined.
    +**
    +** Requirements: [H12931] [H12932] [H12933] [H12934]
    +*/
    +SQLITE_API int sqlite3_get_autocommit(sqlite3*);
    +
    +/*
    +** CAPI3REF: Find The Database Handle Of A Prepared Statement {H13120} <S60600>
    +**
    +** The sqlite3_db_handle interface returns the [database connection] handle
    +** to which a [prepared statement] belongs.  The [database connection]
    +** returned by sqlite3_db_handle is the same [database connection] that was the first argument
    +** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
    +** create the statement in the first place.
    +**
    +** Requirements: [H13123]
    +*/
    +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Find the next prepared statement {H13140} <S60600>
    +**
    +** This interface returns a pointer to the next [prepared statement] after
    +** pStmt associated with the [database connection] pDb.  If pStmt is NULL
    +** then this interface returns a pointer to the first prepared statement
    +** associated with the database connection pDb.  If no prepared statement
    +** satisfies the conditions of this routine, it returns NULL.
    +**
    +** The [database connection] pointer D in a call to
    +** [sqlite3_next_stmt(D,S)] must refer to an open database
    +** connection and in particular must not be a NULL pointer.
    +**
    +** Requirements: [H13143] [H13146] [H13149] [H13152]
    +*/
    +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Commit And Rollback Notification Callbacks {H12950} <S60400>
    +**
    +** The sqlite3_commit_hook() interface registers a callback
    +** function to be invoked whenever a transaction is [COMMIT | committed].
    +** Any callback set by a previous call to sqlite3_commit_hook()
    +** for the same database connection is overridden.
    +** The sqlite3_rollback_hook() interface registers a callback
    +** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
    +** Any callback set by a previous call to sqlite3_commit_hook()
    +** for the same database connection is overridden.
    +** The pArg argument is passed through to the callback.
    +** If the callback on a commit hook function returns non-zero,
    +** then the commit is converted into a rollback.
    +**
    +** If another function was previously registered, its
    +** pArg value is returned.  Otherwise NULL is returned.
    +**
    +** The callback implementation must not do anything that will modify
    +** the database connection that invoked the callback.  Any actions
    +** to modify the database connection must be deferred until after the
    +** completion of the [sqlite3_step()] call that triggered the commit
    +** or rollback hook in the first place.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** Registering a NULL function disables the callback.
    +**
    +** When the commit hook callback routine returns zero, the [COMMIT]
    +** operation is allowed to continue normally.  If the commit hook
    +** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
    +** The rollback hook is invoked on a rollback that results from a commit
    +** hook returning non-zero, just as it would be with any other rollback.
    +**
    +** For the purposes of this API, a transaction is said to have been
    +** rolled back if an explicit "ROLLBACK" statement is executed, or
    +** an error or constraint causes an implicit rollback to occur.
    +** The rollback callback is not invoked if a transaction is
    +** automatically rolled back because the database connection is closed.
    +** The rollback callback is not invoked if a transaction is
    +** rolled back because a commit callback returned non-zero.
    +** <todo> Check on this </todo>
    +**
    +** See also the [sqlite3_update_hook()] interface.
    +**
    +** Requirements:
    +** [H12951] [H12952] [H12953] [H12954] [H12955]
    +** [H12961] [H12962] [H12963] [H12964]
    +*/
    +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
    +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
    +
    +/*
    +** CAPI3REF: Data Change Notification Callbacks {H12970} <S60400>
    +**
    +** The sqlite3_update_hook() interface registers a callback function
    +** with the [database connection] identified by the first argument
    +** to be invoked whenever a row is updated, inserted or deleted.
    +** Any callback set by a previous call to this function
    +** for the same database connection is overridden.
    +**
    +** The second argument is a pointer to the function to invoke when a
    +** row is updated, inserted or deleted.
    +** The first argument to the callback is a copy of the third argument
    +** to sqlite3_update_hook().
    +** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
    +** or [SQLITE_UPDATE], depending on the operation that caused the callback
    +** to be invoked.
    +** The third and fourth arguments to the callback contain pointers to the
    +** database and table name containing the affected row.
    +** The final callback parameter is the [rowid] of the row.
    +** In the case of an update, this is the [rowid] after the update takes place.
    +**
    +** The update hook is not invoked when internal system tables are
    +** modified (i.e. sqlite_master and sqlite_sequence).
    +**
    +** In the current implementation, the update hook
    +** is not invoked when duplication rows are deleted because of an
    +** [ON CONFLICT | ON CONFLICT REPLACE] clause.  Nor is the update hook
    +** invoked when rows are deleted using the [truncate optimization].
    +** The exceptions defined in this paragraph might change in a future
    +** release of SQLite.
    +**
    +** The update hook implementation must not do anything that will modify
    +** the database connection that invoked the update hook.  Any actions
    +** to modify the database connection must be deferred until after the
    +** completion of the [sqlite3_step()] call that triggered the update hook.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** If another function was previously registered, its pArg value
    +** is returned.  Otherwise NULL is returned.
    +**
    +** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
    +** interfaces.
    +**
    +** Requirements:
    +** [H12971] [H12973] [H12975] [H12977] [H12979] [H12981] [H12983] [H12986]
    +*/
    +SQLITE_API void *sqlite3_update_hook(
    +  sqlite3*, 
    +  void(*)(void *,int ,char const *,char const *,sqlite3_int64),
    +  void*
    +);
    +
    +/*
    +** CAPI3REF: Enable Or Disable Shared Pager Cache {H10330} <S30900>
    +** KEYWORDS: {shared cache}
    +**
    +** This routine enables or disables the sharing of the database cache
    +** and schema data structures between [database connection | connections]
    +** to the same database. Sharing is enabled if the argument is true
    +** and disabled if the argument is false.
    +**
    +** Cache sharing is enabled and disabled for an entire process.
    +** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
    +** sharing was enabled or disabled for each thread separately.
    +**
    +** The cache sharing mode set by this interface effects all subsequent
    +** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
    +** Existing database connections continue use the sharing mode
    +** that was in effect at the time they were opened.
    +**
    +** Virtual tables cannot be used with a shared cache.  When shared
    +** cache is enabled, the [sqlite3_create_module()] API used to register
    +** virtual tables will always return an error.
    +**
    +** This routine returns [SQLITE_OK] if shared cache was enabled or disabled
    +** successfully.  An [error code] is returned otherwise.
    +**
    +** Shared cache is disabled by default. But this might change in
    +** future releases of SQLite.  Applications that care about shared
    +** cache setting should set it explicitly.
    +**
    +** See Also:  [SQLite Shared-Cache Mode]
    +**
    +** Requirements: [H10331] [H10336] [H10337] [H10339]
    +*/
    +SQLITE_API int sqlite3_enable_shared_cache(int);
    +
    +/*
    +** CAPI3REF: Attempt To Free Heap Memory {H17340} <S30220>
    +**
    +** The sqlite3_release_memory() interface attempts to free N bytes
    +** of heap memory by deallocating non-essential memory allocations
    +** held by the database library. {END}  Memory used to cache database
    +** pages to improve performance is an example of non-essential memory.
    +** sqlite3_release_memory() returns the number of bytes actually freed,
    +** which might be more or less than the amount requested.
    +**
    +** Requirements: [H17341] [H17342]
    +*/
    +SQLITE_API int sqlite3_release_memory(int);
    +
    +/*
    +** CAPI3REF: Impose A Limit On Heap Size {H17350} <S30220>
    +**
    +** The sqlite3_soft_heap_limit() interface places a "soft" limit
    +** on the amount of heap memory that may be allocated by SQLite.
    +** If an internal allocation is requested that would exceed the
    +** soft heap limit, [sqlite3_release_memory()] is invoked one or
    +** more times to free up some space before the allocation is performed.
    +**
    +** The limit is called "soft", because if [sqlite3_release_memory()]
    +** cannot free sufficient memory to prevent the limit from being exceeded,
    +** the memory is allocated anyway and the current operation proceeds.
    +**
    +** A negative or zero value for N means that there is no soft heap limit and
    +** [sqlite3_release_memory()] will only be called when memory is exhausted.
    +** The default value for the soft heap limit is zero.
    +**
    +** SQLite makes a best effort to honor the soft heap limit.
    +** But if the soft heap limit cannot be honored, execution will
    +** continue without error or notification.  This is why the limit is
    +** called a "soft" limit.  It is advisory only.
    +**
    +** Prior to SQLite version 3.5.0, this routine only constrained the memory
    +** allocated by a single thread - the same thread in which this routine
    +** runs.  Beginning with SQLite version 3.5.0, the soft heap limit is
    +** applied to all threads. The value specified for the soft heap limit
    +** is an upper bound on the total memory allocation for all threads. In
    +** version 3.5.0 there is no mechanism for limiting the heap usage for
    +** individual threads.
    +**
    +** Requirements:
    +** [H16351] [H16352] [H16353] [H16354] [H16355] [H16358]
    +*/
    +SQLITE_API void sqlite3_soft_heap_limit(int);
    +
    +/*
    +** CAPI3REF: Extract Metadata About A Column Of A Table {H12850} <S60300>
    +**
    +** This routine returns metadata about a specific column of a specific
    +** database table accessible using the [database connection] handle
    +** passed as the first function argument.
    +**
    +** The column is identified by the second, third and fourth parameters to
    +** this function. The second parameter is either the name of the database
    +** (i.e. "main", "temp" or an attached database) containing the specified
    +** table or NULL. If it is NULL, then all attached databases are searched
    +** for the table using the same algorithm used by the database engine to
    +** resolve unqualified table references.
    +**
    +** The third and fourth parameters to this function are the table and column
    +** name of the desired column, respectively. Neither of these parameters
    +** may be NULL.
    +**
    +** Metadata is returned by writing to the memory locations passed as the 5th
    +** and subsequent parameters to this function. Any of these arguments may be
    +** NULL, in which case the corresponding element of metadata is omitted.
    +**
    +** <blockquote>
    +** <table border="1">
    +** <tr><th> Parameter <th> Output<br>Type <th>  Description
    +**
    +** <tr><td> 5th <td> const char* <td> Data type
    +** <tr><td> 6th <td> const char* <td> Name of default collation sequence
    +** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint
    +** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY
    +** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]
    +** </table>
    +** </blockquote>
    +**
    +** The memory pointed to by the character pointers returned for the
    +** declaration type and collation sequence is valid only until the next
    +** call to any SQLite API function.
    +**
    +** If the specified table is actually a view, an [error code] is returned.
    +**
    +** If the specified column is "rowid", "oid" or "_rowid_" and an
    +** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
    +** parameters are set for the explicitly declared column. If there is no
    +** explicitly declared [INTEGER PRIMARY KEY] column, then the output
    +** parameters are set as follows:
    +**
    +** <pre>
    +**     data type: "INTEGER"
    +**     collation sequence: "BINARY"
    +**     not null: 0
    +**     primary key: 1
    +**     auto increment: 0
    +** </pre>
    +**
    +** This function may load one or more schemas from database files. If an
    +** error occurs during this process, or if the requested table or column
    +** cannot be found, an [error code] is returned and an error message left
    +** in the [database connection] (to be retrieved using sqlite3_errmsg()).
    +**
    +** This API is only available if the library was compiled with the
    +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
    +*/
    +SQLITE_API int sqlite3_table_column_metadata(
    +  sqlite3 *db,                /* Connection handle */
    +  const char *zDbName,        /* Database name or NULL */
    +  const char *zTableName,     /* Table name */
    +  const char *zColumnName,    /* Column name */
    +  char const **pzDataType,    /* OUTPUT: Declared data type */
    +  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
    +  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
    +  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
    +  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
    +);
    +
    +/*
    +** CAPI3REF: Load An Extension {H12600} <S20500>
    +**
    +** This interface loads an SQLite extension library from the named file.
    +**
    +** {H12601} The sqlite3_load_extension() interface attempts to load an
    +**          SQLite extension library contained in the file zFile.
    +**
    +** {H12602} The entry point is zProc.
    +**
    +** {H12603} zProc may be 0, in which case the name of the entry point
    +**          defaults to "sqlite3_extension_init".
    +**
    +** {H12604} The sqlite3_load_extension() interface shall return
    +**          [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
    +**
    +** {H12605} If an error occurs and pzErrMsg is not 0, then the
    +**          [sqlite3_load_extension()] interface shall attempt to
    +**          fill *pzErrMsg with error message text stored in memory
    +**          obtained from [sqlite3_malloc()]. {END}  The calling function
    +**          should free this memory by calling [sqlite3_free()].
    +**
    +** {H12606} Extension loading must be enabled using
    +**          [sqlite3_enable_load_extension()] prior to calling this API,
    +**          otherwise an error will be returned.
    +*/
    +SQLITE_API int sqlite3_load_extension(
    +  sqlite3 *db,          /* Load the extension into this database connection */
    +  const char *zFile,    /* Name of the shared library containing extension */
    +  const char *zProc,    /* Entry point.  Derived from zFile if 0 */
    +  char **pzErrMsg       /* Put error message here if not 0 */
    +);
    +
    +/*
    +** CAPI3REF: Enable Or Disable Extension Loading {H12620} <S20500>
    +**
    +** So as not to open security holes in older applications that are
    +** unprepared to deal with extension loading, and as a means of disabling
    +** extension loading while evaluating user-entered SQL, the following API
    +** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
    +**
    +** Extension loading is off by default. See ticket #1863.
    +**
    +** {H12621} Call the sqlite3_enable_load_extension() routine with onoff==1
    +**          to turn extension loading on and call it with onoff==0 to turn
    +**          it back off again.
    +**
    +** {H12622} Extension loading is off by default.
    +*/
    +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
    +
    +/*
    +** CAPI3REF: Automatically Load An Extensions {H12640} <S20500>
    +**
    +** This API can be invoked at program startup in order to register
    +** one or more statically linked extensions that will be available
    +** to all new [database connections]. {END}
    +**
    +** This routine stores a pointer to the extension in an array that is
    +** obtained from [sqlite3_malloc()].  If you run a memory leak checker
    +** on your program and it reports a leak because of this array, invoke
    +** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory.
    +**
    +** {H12641} This function registers an extension entry point that is
    +**          automatically invoked whenever a new [database connection]
    +**          is opened using [sqlite3_open()], [sqlite3_open16()],
    +**          or [sqlite3_open_v2()].
    +**
    +** {H12642} Duplicate extensions are detected so calling this routine
    +**          multiple times with the same extension is harmless.
    +**
    +** {H12643} This routine stores a pointer to the extension in an array
    +**          that is obtained from [sqlite3_malloc()].
    +**
    +** {H12644} Automatic extensions apply across all threads.
    +*/
    +SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
    +
    +/*
    +** CAPI3REF: Reset Automatic Extension Loading {H12660} <S20500>
    +**
    +** This function disables all previously registered automatic
    +** extensions. {END}  It undoes the effect of all prior
    +** [sqlite3_auto_extension()] calls.
    +**
    +** {H12661} This function disables all previously registered
    +**          automatic extensions.
    +**
    +** {H12662} This function disables automatic extensions in all threads.
    +*/
    +SQLITE_API void sqlite3_reset_auto_extension(void);
    +
    +/*
    +****** EXPERIMENTAL - subject to change without notice **************
    +**
    +** The interface to the virtual-table mechanism is currently considered
    +** to be experimental.  The interface might change in incompatible ways.
    +** If this is a problem for you, do not use the interface at this time.
    +**
    +** When the virtual-table mechanism stabilizes, we will declare the
    +** interface fixed, support it indefinitely, and remove this comment.
    +*/
    +
    +/*
    +** Structures used by the virtual table interface
    +*/
    +typedef struct sqlite3_vtab sqlite3_vtab;
    +typedef struct sqlite3_index_info sqlite3_index_info;
    +typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
    +typedef struct sqlite3_module sqlite3_module;
    +
    +/*
    +** CAPI3REF: Virtual Table Object {H18000} <S20400>
    +** KEYWORDS: sqlite3_module {virtual table module}
    +** EXPERIMENTAL
    +**
    +** This structure, sometimes called a a "virtual table module", 
    +** defines the implementation of a [virtual tables].  
    +** This structure consists mostly of methods for the module.
    +**
    +** A virtual table module is created by filling in a persistent
    +** instance of this structure and passing a pointer to that instance
    +** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].
    +** The registration remains valid until it is replaced by a different
    +** module or until the [database connection] closes.  The content
    +** of this structure must not change while it is registered with
    +** any database connection.
    +*/
    +struct sqlite3_module {
    +  int iVersion;
    +  int (*xCreate)(sqlite3*, void *pAux,
    +               int argc, const char *const*argv,
    +               sqlite3_vtab **ppVTab, char**);
    +  int (*xConnect)(sqlite3*, void *pAux,
    +               int argc, const char *const*argv,
    +               sqlite3_vtab **ppVTab, char**);
    +  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
    +  int (*xDisconnect)(sqlite3_vtab *pVTab);
    +  int (*xDestroy)(sqlite3_vtab *pVTab);
    +  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
    +  int (*xClose)(sqlite3_vtab_cursor*);
    +  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
    +                int argc, sqlite3_value **argv);
    +  int (*xNext)(sqlite3_vtab_cursor*);
    +  int (*xEof)(sqlite3_vtab_cursor*);
    +  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
    +  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
    +  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
    +  int (*xBegin)(sqlite3_vtab *pVTab);
    +  int (*xSync)(sqlite3_vtab *pVTab);
    +  int (*xCommit)(sqlite3_vtab *pVTab);
    +  int (*xRollback)(sqlite3_vtab *pVTab);
    +  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
    +                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
    +                       void **ppArg);
    +  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
    +};
    +
    +/*
    +** CAPI3REF: Virtual Table Indexing Information {H18100} <S20400>
    +** KEYWORDS: sqlite3_index_info
    +** EXPERIMENTAL
    +**
    +** The sqlite3_index_info structure and its substructures is used to
    +** pass information into and receive the reply from the [xBestIndex]
    +** method of a [virtual table module].  The fields under **Inputs** are the
    +** inputs to xBestIndex and are read-only.  xBestIndex inserts its
    +** results into the **Outputs** fields.
    +**
    +** The aConstraint[] array records WHERE clause constraints of the form:
    +**
    +** <pre>column OP expr</pre>
    +**
    +** where OP is =, &lt;, &lt;=, &gt;, or &gt;=.  The particular operator is
    +** stored in aConstraint[].op.  The index of the column is stored in
    +** aConstraint[].iColumn.  aConstraint[].usable is TRUE if the
    +** expr on the right-hand side can be evaluated (and thus the constraint
    +** is usable) and false if it cannot.
    +**
    +** The optimizer automatically inverts terms of the form "expr OP column"
    +** and makes other simplifications to the WHERE clause in an attempt to
    +** get as many WHERE clause terms into the form shown above as possible.
    +** The aConstraint[] array only reports WHERE clause terms in the correct
    +** form that refer to the particular virtual table being queried.
    +**
    +** Information about the ORDER BY clause is stored in aOrderBy[].
    +** Each term of aOrderBy records a column of the ORDER BY clause.
    +**
    +** The [xBestIndex] method must fill aConstraintUsage[] with information
    +** about what parameters to pass to xFilter.  If argvIndex>0 then
    +** the right-hand side of the corresponding aConstraint[] is evaluated
    +** and becomes the argvIndex-th entry in argv.  If aConstraintUsage[].omit
    +** is true, then the constraint is assumed to be fully handled by the
    +** virtual table and is not checked again by SQLite.
    +**
    +** The idxNum and idxPtr values are recorded and passed into the
    +** [xFilter] method.
    +** [sqlite3_free()] is used to free idxPtr if and only iff
    +** needToFreeIdxPtr is true.
    +**
    +** The orderByConsumed means that output from [xFilter]/[xNext] will occur in
    +** the correct order to satisfy the ORDER BY clause so that no separate
    +** sorting step is required.
    +**
    +** The estimatedCost value is an estimate of the cost of doing the
    +** particular lookup.  A full scan of a table with N entries should have
    +** a cost of N.  A binary search of a table of N entries should have a
    +** cost of approximately log(N).
    +*/
    +struct sqlite3_index_info {
    +  /* Inputs */
    +  int nConstraint;           /* Number of entries in aConstraint */
    +  struct sqlite3_index_constraint {
    +     int iColumn;              /* Column on left-hand side of constraint */
    +     unsigned char op;         /* Constraint operator */
    +     unsigned char usable;     /* True if this constraint is usable */
    +     int iTermOffset;          /* Used internally - xBestIndex should ignore */
    +  } *aConstraint;            /* Table of WHERE clause constraints */
    +  int nOrderBy;              /* Number of terms in the ORDER BY clause */
    +  struct sqlite3_index_orderby {
    +     int iColumn;              /* Column number */
    +     unsigned char desc;       /* True for DESC.  False for ASC. */
    +  } *aOrderBy;               /* The ORDER BY clause */
    +  /* Outputs */
    +  struct sqlite3_index_constraint_usage {
    +    int argvIndex;           /* if >0, constraint is part of argv to xFilter */
    +    unsigned char omit;      /* Do not code a test for this constraint */
    +  } *aConstraintUsage;
    +  int idxNum;                /* Number used to identify the index */
    +  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
    +  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
    +  int orderByConsumed;       /* True if output is already ordered */
    +  double estimatedCost;      /* Estimated cost of using this index */
    +};
    +#define SQLITE_INDEX_CONSTRAINT_EQ    2
    +#define SQLITE_INDEX_CONSTRAINT_GT    4
    +#define SQLITE_INDEX_CONSTRAINT_LE    8
    +#define SQLITE_INDEX_CONSTRAINT_LT    16
    +#define SQLITE_INDEX_CONSTRAINT_GE    32
    +#define SQLITE_INDEX_CONSTRAINT_MATCH 64
    +
    +/*
    +** CAPI3REF: Register A Virtual Table Implementation {H18200} <S20400>
    +** EXPERIMENTAL
    +**
    +** This routine is used to register a new [virtual table module] name.
    +** Module names must be registered before
    +** creating a new [virtual table] using the module, or before using a
    +** preexisting [virtual table] for the module.
    +**
    +** The module name is registered on the [database connection] specified
    +** by the first parameter.  The name of the module is given by the 
    +** second parameter.  The third parameter is a pointer to
    +** the implementation of the [virtual table module].   The fourth
    +** parameter is an arbitrary client data pointer that is passed through
    +** into the [xCreate] and [xConnect] methods of the virtual table module
    +** when a new virtual table is be being created or reinitialized.
    +**
    +** This interface has exactly the same effect as calling
    +** [sqlite3_create_module_v2()] with a NULL client data destructor.
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module(
    +  sqlite3 *db,               /* SQLite connection to register module with */
    +  const char *zName,         /* Name of the module */
    +  const sqlite3_module *p,   /* Methods for the module */
    +  void *pClientData          /* Client data for xCreate/xConnect */
    +);
    +
    +/*
    +** CAPI3REF: Register A Virtual Table Implementation {H18210} <S20400>
    +** EXPERIMENTAL
    +**
    +** This routine is identical to the [sqlite3_create_module()] method,
    +** except that it has an extra parameter to specify 
    +** a destructor function for the client data pointer.  SQLite will
    +** invoke the destructor function (if it is not NULL) when SQLite
    +** no longer needs the pClientData pointer.  
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(
    +  sqlite3 *db,               /* SQLite connection to register module with */
    +  const char *zName,         /* Name of the module */
    +  const sqlite3_module *p,   /* Methods for the module */
    +  void *pClientData,         /* Client data for xCreate/xConnect */
    +  void(*xDestroy)(void*)     /* Module destructor function */
    +);
    +
    +/*
    +** CAPI3REF: Virtual Table Instance Object {H18010} <S20400>
    +** KEYWORDS: sqlite3_vtab
    +** EXPERIMENTAL
    +**
    +** Every [virtual table module] implementation uses a subclass
    +** of the following structure to describe a particular instance
    +** of the [virtual table].  Each subclass will
    +** be tailored to the specific needs of the module implementation.
    +** The purpose of this superclass is to define certain fields that are
    +** common to all module implementations.
    +**
    +** Virtual tables methods can set an error message by assigning a
    +** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should
    +** take care that any prior string is freed by a call to [sqlite3_free()]
    +** prior to assigning a new string to zErrMsg.  After the error message
    +** is delivered up to the client application, the string will be automatically
    +** freed by sqlite3_free() and the zErrMsg field will be zeroed.
    +*/
    +struct sqlite3_vtab {
    +  const sqlite3_module *pModule;  /* The module for this virtual table */
    +  int nRef;                       /* NO LONGER USED */
    +  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
    +  /* Virtual table implementations will typically add additional fields */
    +};
    +
    +/*
    +** CAPI3REF: Virtual Table Cursor Object  {H18020} <S20400>
    +** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
    +** EXPERIMENTAL
    +**
    +** Every [virtual table module] implementation uses a subclass of the
    +** following structure to describe cursors that point into the
    +** [virtual table] and are used
    +** to loop through the virtual table.  Cursors are created using the
    +** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed
    +** by the [sqlite3_module.xClose | xClose] method.  Cussors are used
    +** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods
    +** of the module.  Each module implementation will define
    +** the content of a cursor structure to suit its own needs.
    +**
    +** This superclass exists in order to define fields of the cursor that
    +** are common to all implementations.
    +*/
    +struct sqlite3_vtab_cursor {
    +  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
    +  /* Virtual table implementations will typically add additional fields */
    +};
    +
    +/*
    +** CAPI3REF: Declare The Schema Of A Virtual Table {H18280} <S20400>
    +** EXPERIMENTAL
    +**
    +** The [xCreate] and [xConnect] methods of a
    +** [virtual table module] call this interface
    +** to declare the format (the names and datatypes of the columns) of
    +** the virtual tables they implement.
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
    +
    +/*
    +** CAPI3REF: Overload A Function For A Virtual Table {H18300} <S20400>
    +** EXPERIMENTAL
    +**
    +** Virtual tables can provide alternative implementations of functions
    +** using the [xFindFunction] method of the [virtual table module].  
    +** But global versions of those functions
    +** must exist in order to be overloaded.
    +**
    +** This API makes sure a global version of a function with a particular
    +** name and number of parameters exists.  If no such function exists
    +** before this API is called, a new function is created.  The implementation
    +** of the new function always causes an exception to be thrown.  So
    +** the new function is not good for anything by itself.  Its only
    +** purpose is to be a placeholder function that can be overloaded
    +** by a [virtual table].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
    +
    +/*
    +** The interface to the virtual-table mechanism defined above (back up
    +** to a comment remarkably similar to this one) is currently considered
    +** to be experimental.  The interface might change in incompatible ways.
    +** If this is a problem for you, do not use the interface at this time.
    +**
    +** When the virtual-table mechanism stabilizes, we will declare the
    +** interface fixed, support it indefinitely, and remove this comment.
    +**
    +****** EXPERIMENTAL - subject to change without notice **************
    +*/
    +
    +/*
    +** CAPI3REF: A Handle To An Open BLOB {H17800} <S30230>
    +** KEYWORDS: {BLOB handle} {BLOB handles}
    +**
    +** An instance of this object represents an open BLOB on which
    +** [sqlite3_blob_open | incremental BLOB I/O] can be performed.
    +** Objects of this type are created by [sqlite3_blob_open()]
    +** and destroyed by [sqlite3_blob_close()].
    +** The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces
    +** can be used to read or write small subsections of the BLOB.
    +** The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
    +*/
    +typedef struct sqlite3_blob sqlite3_blob;
    +
    +/*
    +** CAPI3REF: Open A BLOB For Incremental I/O {H17810} <S30230>
    +**
    +** This interfaces opens a [BLOB handle | handle] to the BLOB located
    +** in row iRow, column zColumn, table zTable in database zDb;
    +** in other words, the same BLOB that would be selected by:
    +**
    +** <pre>
    +**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
    +** </pre> {END}
    +**
    +** If the flags parameter is non-zero, then the BLOB is opened for read
    +** and write access. If it is zero, the BLOB is opened for read access.
    +** It is not possible to open a column that is part of an index or primary 
    +** key for writing. ^If [foreign key constraints] are enabled, it is 
    +** not possible to open a column that is part of a [child key] for writing.
    +**
    +** Note that the database name is not the filename that contains
    +** the database but rather the symbolic name of the database that
    +** is assigned when the database is connected using [ATTACH].
    +** For the main database file, the database name is "main".
    +** For TEMP tables, the database name is "temp".
    +**
    +** On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
    +** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
    +** to be a null pointer.
    +** This function sets the [database connection] error code and message
    +** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
    +** functions.  Note that the *ppBlob variable is always initialized in a
    +** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
    +** regardless of the success or failure of this routine.
    +**
    +** If the row that a BLOB handle points to is modified by an
    +** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
    +** then the BLOB handle is marked as "expired".
    +** This is true if any column of the row is changed, even a column
    +** other than the one the BLOB handle is open on.
    +** Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
    +** a expired BLOB handle fail with an return code of [SQLITE_ABORT].
    +** Changes written into a BLOB prior to the BLOB expiring are not
    +** rollback by the expiration of the BLOB.  Such changes will eventually
    +** commit if the transaction continues to completion.
    +**
    +** Use the [sqlite3_blob_bytes()] interface to determine the size of
    +** the opened blob.  The size of a blob may not be changed by this
    +** interface.  Use the [UPDATE] SQL command to change the size of a
    +** blob.
    +**
    +** The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
    +** and the built-in [zeroblob] SQL function can be used, if desired,
    +** to create an empty, zero-filled blob in which to read or write using
    +** this interface.
    +**
    +** To avoid a resource leak, every open [BLOB handle] should eventually
    +** be released by a call to [sqlite3_blob_close()].
    +**
    +** Requirements:
    +** [H17813] [H17814] [H17816] [H17819] [H17821] [H17824]
    +*/
    +SQLITE_API int sqlite3_blob_open(
    +  sqlite3*,
    +  const char *zDb,
    +  const char *zTable,
    +  const char *zColumn,
    +  sqlite3_int64 iRow,
    +  int flags,
    +  sqlite3_blob **ppBlob
    +);
    +
    +/*
    +** CAPI3REF: Close A BLOB Handle {H17830} <S30230>
    +**
    +** Closes an open [BLOB handle].
    +**
    +** Closing a BLOB shall cause the current transaction to commit
    +** if there are no other BLOBs, no pending prepared statements, and the
    +** database connection is in [autocommit mode].
    +** If any writes were made to the BLOB, they might be held in cache
    +** until the close operation if they will fit.
    +**
    +** Closing the BLOB often forces the changes
    +** out to disk and so if any I/O errors occur, they will likely occur
    +** at the time when the BLOB is closed.  Any errors that occur during
    +** closing are reported as a non-zero return value.
    +**
    +** The BLOB is closed unconditionally.  Even if this routine returns
    +** an error code, the BLOB is still closed.
    +**
    +** Calling this routine with a null pointer (which as would be returned
    +** by failed call to [sqlite3_blob_open()]) is a harmless no-op.
    +**
    +** Requirements:
    +** [H17833] [H17836] [H17839]
    +*/
    +SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
    +
    +/*
    +** CAPI3REF: Return The Size Of An Open BLOB {H17840} <S30230>
    +**
    +** Returns the size in bytes of the BLOB accessible via the 
    +** successfully opened [BLOB handle] in its only argument.  The
    +** incremental blob I/O routines can only read or overwriting existing
    +** blob content; they cannot change the size of a blob.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** Requirements:
    +** [H17843]
    +*/
    +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
    +
    +/*
    +** CAPI3REF: Read Data From A BLOB Incrementally {H17850} <S30230>
    +**
    +** This function is used to read data from an open [BLOB handle] into a
    +** caller-supplied buffer. N bytes of data are copied into buffer Z
    +** from the open BLOB, starting at offset iOffset.
    +**
    +** If offset iOffset is less than N bytes from the end of the BLOB,
    +** [SQLITE_ERROR] is returned and no data is read.  If N or iOffset is
    +** less than zero, [SQLITE_ERROR] is returned and no data is read.
    +** The size of the blob (and hence the maximum value of N+iOffset)
    +** can be determined using the [sqlite3_blob_bytes()] interface.
    +**
    +** An attempt to read from an expired [BLOB handle] fails with an
    +** error code of [SQLITE_ABORT].
    +**
    +** On success, SQLITE_OK is returned.
    +** Otherwise, an [error code] or an [extended error code] is returned.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** See also: [sqlite3_blob_write()].
    +**
    +** Requirements:
    +** [H17853] [H17856] [H17859] [H17862] [H17863] [H17865] [H17868]
    +*/
    +SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
    +
    +/*
    +** CAPI3REF: Write Data Into A BLOB Incrementally {H17870} <S30230>
    +**
    +** This function is used to write data into an open [BLOB handle] from a
    +** caller-supplied buffer. N bytes of data are copied from the buffer Z
    +** into the open BLOB, starting at offset iOffset.
    +**
    +** If the [BLOB handle] passed as the first argument was not opened for
    +** writing (the flags parameter to [sqlite3_blob_open()] was zero),
    +** this function returns [SQLITE_READONLY].
    +**
    +** This function may only modify the contents of the BLOB; it is
    +** not possible to increase the size of a BLOB using this API.
    +** If offset iOffset is less than N bytes from the end of the BLOB,
    +** [SQLITE_ERROR] is returned and no data is written.  If N is
    +** less than zero [SQLITE_ERROR] is returned and no data is written.
    +** The size of the BLOB (and hence the maximum value of N+iOffset)
    +** can be determined using the [sqlite3_blob_bytes()] interface.
    +**
    +** An attempt to write to an expired [BLOB handle] fails with an
    +** error code of [SQLITE_ABORT].  Writes to the BLOB that occurred
    +** before the [BLOB handle] expired are not rolled back by the
    +** expiration of the handle, though of course those changes might
    +** have been overwritten by the statement that expired the BLOB handle
    +** or by other independent statements.
    +**
    +** On success, SQLITE_OK is returned.
    +** Otherwise, an  [error code] or an [extended error code] is returned.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** See also: [sqlite3_blob_read()].
    +**
    +** Requirements:
    +** [H17873] [H17874] [H17875] [H17876] [H17877] [H17879] [H17882] [H17885]
    +** [H17888]
    +*/
    +SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
    +
    +/*
    +** CAPI3REF: Virtual File System Objects {H11200} <S20100>
    +**
    +** A virtual filesystem (VFS) is an [sqlite3_vfs] object
    +** that SQLite uses to interact
    +** with the underlying operating system.  Most SQLite builds come with a
    +** single default VFS that is appropriate for the host computer.
    +** New VFSes can be registered and existing VFSes can be unregistered.
    +** The following interfaces are provided.
    +**
    +** The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
    +** Names are case sensitive.
    +** Names are zero-terminated UTF-8 strings.
    +** If there is no match, a NULL pointer is returned.
    +** If zVfsName is NULL then the default VFS is returned.
    +**
    +** New VFSes are registered with sqlite3_vfs_register().
    +** Each new VFS becomes the default VFS if the makeDflt flag is set.
    +** The same VFS can be registered multiple times without injury.
    +** To make an existing VFS into the default VFS, register it again
    +** with the makeDflt flag set.  If two different VFSes with the
    +** same name are registered, the behavior is undefined.  If a
    +** VFS is registered with a name that is NULL or an empty string,
    +** then the behavior is undefined.
    +**
    +** Unregister a VFS with the sqlite3_vfs_unregister() interface.
    +** If the default VFS is unregistered, another VFS is chosen as
    +** the default.  The choice for the new VFS is arbitrary.
    +**
    +** Requirements:
    +** [H11203] [H11206] [H11209] [H11212] [H11215] [H11218]
    +*/
    +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
    +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
    +
    +/*
    +** CAPI3REF: Mutexes {H17000} <S20000>
    +**
    +** The SQLite core uses these routines for thread
    +** synchronization. Though they are intended for internal
    +** use by SQLite, code that links against SQLite is
    +** permitted to use any of these routines.
    +**
    +** The SQLite source code contains multiple implementations
    +** of these mutex routines.  An appropriate implementation
    +** is selected automatically at compile-time.  The following
    +** implementations are available in the SQLite core:
    +**
    +** <ul>
    +** <li>   SQLITE_MUTEX_OS2
    +** <li>   SQLITE_MUTEX_PTHREAD
    +** <li>   SQLITE_MUTEX_W32
    +** <li>   SQLITE_MUTEX_NOOP
    +** </ul>
    +**
    +** The SQLITE_MUTEX_NOOP implementation is a set of routines
    +** that does no real locking and is appropriate for use in
    +** a single-threaded application.  The SQLITE_MUTEX_OS2,
    +** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
    +** are appropriate for use on OS/2, Unix, and Windows.
    +**
    +** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
    +** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
    +** implementation is included with the library. In this case the
    +** application must supply a custom mutex implementation using the
    +** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
    +** before calling sqlite3_initialize() or any other public sqlite3_
    +** function that calls sqlite3_initialize().
    +**
    +** {H17011} The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it. {H17012} If it returns NULL
    +** that means that a mutex could not be allocated. {H17013} SQLite
    +** will unwind its stack and return an error. {H17014} The argument
    +** to sqlite3_mutex_alloc() is one of these integer constants:
    +**
    +** <ul>
    +** <li>  SQLITE_MUTEX_FAST
    +** <li>  SQLITE_MUTEX_RECURSIVE
    +** <li>  SQLITE_MUTEX_STATIC_MASTER
    +** <li>  SQLITE_MUTEX_STATIC_MEM
    +** <li>  SQLITE_MUTEX_STATIC_MEM2
    +** <li>  SQLITE_MUTEX_STATIC_PRNG
    +** <li>  SQLITE_MUTEX_STATIC_LRU
    +** <li>  SQLITE_MUTEX_STATIC_LRU2
    +** </ul>
    +**
    +** {H17015} The first two constants cause sqlite3_mutex_alloc() to create
    +** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
    +** is used but not necessarily so when SQLITE_MUTEX_FAST is used. {END}
    +** The mutex implementation does not need to make a distinction
    +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
    +** not want to.  {H17016} But SQLite will only request a recursive mutex in
    +** cases where it really needs one.  {END} If a faster non-recursive mutex
    +** implementation is available on the host platform, the mutex subsystem
    +** might return such a mutex in response to SQLITE_MUTEX_FAST.
    +**
    +** {H17017} The other allowed parameters to sqlite3_mutex_alloc() each return
    +** a pointer to a static preexisting mutex. {END}  Six static mutexes are
    +** used by the current version of SQLite.  Future versions of SQLite
    +** may add additional static mutexes.  Static mutexes are for internal
    +** use by SQLite only.  Applications that use SQLite mutexes should
    +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
    +** SQLITE_MUTEX_RECURSIVE.
    +**
    +** {H17018} Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
    +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
    +** returns a different mutex on every call.  {H17034} But for the static
    +** mutex types, the same mutex is returned on every call that has
    +** the same type number.
    +**
    +** {H17019} The sqlite3_mutex_free() routine deallocates a previously
    +** allocated dynamic mutex. {H17020} SQLite is careful to deallocate every
    +** dynamic mutex that it allocates. {A17021} The dynamic mutexes must not be in
    +** use when they are deallocated. {A17022} Attempting to deallocate a static
    +** mutex results in undefined behavior. {H17023} SQLite never deallocates
    +** a static mutex. {END}
    +**
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex. {H17024} If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY. {H17025}  The sqlite3_mutex_try() interface returns [SQLITE_OK]
    +** upon successful entry.  {H17026} Mutexes created using
    +** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
    +** {H17027} In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  {A17028} If the same thread tries to enter any other
    +** kind of mutex more than once, the behavior is undefined.
    +** {H17029} SQLite will never exhibit
    +** such behavior in its own use of mutexes.
    +**
    +** Some systems (for example, Windows 95) do not support the operation
    +** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()
    +** will always return SQLITE_BUSY.  {H17030} The SQLite core only ever uses
    +** sqlite3_mutex_try() as an optimization so this is acceptable behavior.
    +**
    +** {H17031} The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  {A17032} The behavior
    +** is undefined if the mutex is not currently entered by the
    +** calling thread or is not currently allocated.  {H17033} SQLite will
    +** never do either. {END}
    +**
    +** If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
    +** sqlite3_mutex_leave() is a NULL pointer, then all three routines
    +** behave as no-ops.
    +**
    +** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
    +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
    +
    +/*
    +** CAPI3REF: Mutex Methods Object {H17120} <S20130>
    +** EXPERIMENTAL
    +**
    +** An instance of this structure defines the low-level routines
    +** used to allocate and use mutexes.
    +**
    +** Usually, the default mutex implementations provided by SQLite are
    +** sufficient, however the user has the option of substituting a custom
    +** implementation for specialized deployments or systems for which SQLite
    +** does not provide a suitable implementation. In this case, the user
    +** creates and populates an instance of this structure to pass
    +** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
    +** Additionally, an instance of this structure can be used as an
    +** output variable when querying the system for the current mutex
    +** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
    +**
    +** The xMutexInit method defined by this structure is invoked as
    +** part of system initialization by the sqlite3_initialize() function.
    +** {H17001} The xMutexInit routine shall be called by SQLite once for each
    +** effective call to [sqlite3_initialize()].
    +**
    +** The xMutexEnd method defined by this structure is invoked as
    +** part of system shutdown by the sqlite3_shutdown() function. The
    +** implementation of this method is expected to release all outstanding
    +** resources obtained by the mutex methods implementation, especially
    +** those obtained by the xMutexInit method. {H17003} The xMutexEnd()
    +** interface shall be invoked once for each call to [sqlite3_shutdown()].
    +**
    +** The remaining seven methods defined by this structure (xMutexAlloc,
    +** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
    +** xMutexNotheld) implement the following interfaces (respectively):
    +**
    +** <ul>
    +**   <li>  [sqlite3_mutex_alloc()] </li>
    +**   <li>  [sqlite3_mutex_free()] </li>
    +**   <li>  [sqlite3_mutex_enter()] </li>
    +**   <li>  [sqlite3_mutex_try()] </li>
    +**   <li>  [sqlite3_mutex_leave()] </li>
    +**   <li>  [sqlite3_mutex_held()] </li>
    +**   <li>  [sqlite3_mutex_notheld()] </li>
    +** </ul>
    +**
    +** The only difference is that the public sqlite3_XXX functions enumerated
    +** above silently ignore any invocations that pass a NULL pointer instead
    +** of a valid mutex handle. The implementations of the methods defined
    +** by this structure are not required to handle this case, the results
    +** of passing a NULL pointer instead of a valid mutex handle are undefined
    +** (i.e. it is acceptable to provide an implementation that segfaults if
    +** it is passed a NULL pointer).
    +**
    +** The xMutexInit() method must be threadsafe.  It must be harmless to
    +** invoke xMutexInit() mutiple times within the same process and without
    +** intervening calls to xMutexEnd().  Second and subsequent calls to
    +** xMutexInit() must be no-ops.
    +**
    +** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
    +** and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
    +** allocation for a static mutex.  However xMutexAlloc() may use SQLite
    +** memory allocation for a fast or recursive mutex.
    +**
    +** SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
    +** called, but only if the prior call to xMutexInit returned SQLITE_OK.
    +** If xMutexInit fails in any way, it is expected to clean up after itself
    +** prior to returning.
    +*/
    +typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
    +struct sqlite3_mutex_methods {
    +  int (*xMutexInit)(void);
    +  int (*xMutexEnd)(void);
    +  sqlite3_mutex *(*xMutexAlloc)(int);
    +  void (*xMutexFree)(sqlite3_mutex *);
    +  void (*xMutexEnter)(sqlite3_mutex *);
    +  int (*xMutexTry)(sqlite3_mutex *);
    +  void (*xMutexLeave)(sqlite3_mutex *);
    +  int (*xMutexHeld)(sqlite3_mutex *);
    +  int (*xMutexNotheld)(sqlite3_mutex *);
    +};
    +
    +/*
    +** CAPI3REF: Mutex Verification Routines {H17080} <S20130> <S30800>
    +**
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
    +** are intended for use inside assert() statements. {H17081} The SQLite core
    +** never uses these routines except inside an assert() and applications
    +** are advised to follow the lead of the core.  {H17082} The core only
    +** provides implementations for these routines when it is compiled
    +** with the SQLITE_DEBUG flag.  {A17087} External mutex implementations
    +** are only required to provide these routines if SQLITE_DEBUG is
    +** defined and if NDEBUG is not defined.
    +**
    +** {H17083} These routines should return true if the mutex in their argument
    +** is held or not held, respectively, by the calling thread.
    +**
    +** {X17084} The implementation is not required to provided versions of these
    +** routines that actually work. If the implementation does not provide working
    +** versions of these routines, it should at least provide stubs that always
    +** return true so that one does not get spurious assertion failures.
    +**
    +** {H17085} If the argument to sqlite3_mutex_held() is a NULL pointer then
    +** the routine should return 1.  {END} This seems counter-intuitive since
    +** clearly the mutex cannot be held if it does not exist.  But the
    +** the reason the mutex does not exist is because the build is not
    +** using mutexes.  And we do not want the assert() containing the
    +** call to sqlite3_mutex_held() to fail, so a non-zero return is
    +** the appropriate thing to do.  {H17086} The sqlite3_mutex_notheld()
    +** interface should also return 1 when given a NULL pointer.
    +*/
    +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
    +
    +/*
    +** CAPI3REF: Mutex Types {H17001} <H17000>
    +**
    +** The [sqlite3_mutex_alloc()] interface takes a single argument
    +** which is one of these integer constants.
    +**
    +** The set of static mutexes may change from one SQLite release to the
    +** next.  Applications that override the built-in mutex logic must be
    +** prepared to accommodate additional static mutexes.
    +*/
    +#define SQLITE_MUTEX_FAST             0
    +#define SQLITE_MUTEX_RECURSIVE        1
    +#define SQLITE_MUTEX_STATIC_MASTER    2
    +#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
    +#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */
    +#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */
    +#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
    +#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
    +#define SQLITE_MUTEX_STATIC_LRU2      7  /* lru page list */
    +
    +/*
    +** CAPI3REF: Retrieve the mutex for a database connection {H17002} <H17000>
    +**
    +** This interface returns a pointer the [sqlite3_mutex] object that 
    +** serializes access to the [database connection] given in the argument
    +** when the [threading mode] is Serialized.
    +** If the [threading mode] is Single-thread or Multi-thread then this
    +** routine returns a NULL pointer.
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
    +
    +/*
    +** CAPI3REF: Low-Level Control Of Database Files {H11300} <S30800>
    +**
    +** {H11301} The [sqlite3_file_control()] interface makes a direct call to the
    +** xFileControl method for the [sqlite3_io_methods] object associated
    +** with a particular database identified by the second argument. {H11302} The
    +** name of the database is the name assigned to the database by the
    +** <a href="lang_attach.html">ATTACH</a> SQL command that opened the
    +** database. {H11303} To control the main database file, use the name "main"
    +** or a NULL pointer. {H11304} The third and fourth parameters to this routine
    +** are passed directly through to the second and third parameters of
    +** the xFileControl method.  {H11305} The return value of the xFileControl
    +** method becomes the return value of this routine.
    +**
    +** {H11306} If the second parameter (zDbName) does not match the name of any
    +** open database file, then SQLITE_ERROR is returned. {H11307} This error
    +** code is not remembered and will not be recalled by [sqlite3_errcode()]
    +** or [sqlite3_errmsg()]. {A11308} The underlying xFileControl method might
    +** also return SQLITE_ERROR.  {A11309} There is no way to distinguish between
    +** an incorrect zDbName and an SQLITE_ERROR return from the underlying
    +** xFileControl method. {END}
    +**
    +** See also: [SQLITE_FCNTL_LOCKSTATE]
    +*/
    +SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
    +
    +/*
    +** CAPI3REF: Testing Interface {H11400} <S30800>
    +**
    +** The sqlite3_test_control() interface is used to read out internal
    +** state of SQLite and to inject faults into SQLite for testing
    +** purposes.  The first parameter is an operation code that determines
    +** the number, meaning, and operation of all subsequent parameters.
    +**
    +** This interface is not for use by applications.  It exists solely
    +** for verifying the correct operation of the SQLite library.  Depending
    +** on how the SQLite library is compiled, this interface might not exist.
    +**
    +** The details of the operation codes, their meanings, the parameters
    +** they take, and what they do are all subject to change without notice.
    +** Unlike most of the SQLite API, this function is not guaranteed to
    +** operate consistently from one release to the next.
    +*/
    +SQLITE_API int sqlite3_test_control(int op, ...);
    +
    +/*
    +** CAPI3REF: Testing Interface Operation Codes {H11410} <H11400>
    +**
    +** These constants are the valid operation code parameters used
    +** as the first argument to [sqlite3_test_control()].
    +**
    +** These parameters and their meanings are subject to change
    +** without notice.  These values are for testing purposes only.
    +** Applications should not use any of these parameters or the
    +** [sqlite3_test_control()] interface.
    +*/
    +#define SQLITE_TESTCTRL_PRNG_SAVE                5
    +#define SQLITE_TESTCTRL_PRNG_RESTORE             6
    +#define SQLITE_TESTCTRL_PRNG_RESET               7
    +#define SQLITE_TESTCTRL_BITVEC_TEST              8
    +#define SQLITE_TESTCTRL_FAULT_INSTALL            9
    +#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10
    +#define SQLITE_TESTCTRL_PENDING_BYTE            11
    +#define SQLITE_TESTCTRL_ASSERT                  12
    +#define SQLITE_TESTCTRL_ALWAYS                  13
    +#define SQLITE_TESTCTRL_RESERVE                 14
    +
    +/*
    +** CAPI3REF: SQLite Runtime Status {H17200} <S60200>
    +** EXPERIMENTAL
    +**
    +** This interface is used to retrieve runtime status information
    +** about the preformance of SQLite, and optionally to reset various
    +** highwater marks.  The first argument is an integer code for
    +** the specific parameter to measure.  Recognized integer codes
    +** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].
    +** The current value of the parameter is returned into *pCurrent.
    +** The highest recorded value is returned in *pHighwater.  If the
    +** resetFlag is true, then the highest record value is reset after
    +** *pHighwater is written. Some parameters do not record the highest
    +** value.  For those parameters
    +** nothing is written into *pHighwater and the resetFlag is ignored.
    +** Other parameters record only the highwater mark and not the current
    +** value.  For these latter parameters nothing is written into *pCurrent.
    +**
    +** This routine returns SQLITE_OK on success and a non-zero
    +** [error code] on failure.
    +**
    +** This routine is threadsafe but is not atomic.  This routine can be
    +** called while other threads are running the same or different SQLite
    +** interfaces.  However the values returned in *pCurrent and
    +** *pHighwater reflect the status of SQLite at different points in time
    +** and it is possible that another thread might change the parameter
    +** in between the times when *pCurrent and *pHighwater are written.
    +**
    +** See also: [sqlite3_db_status()]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    +
    +
    +/*
    +** CAPI3REF: Status Parameters {H17250} <H17200>
    +** EXPERIMENTAL
    +**
    +** These integer constants designate various run-time status parameters
    +** that can be returned by [sqlite3_status()].
    +**
    +** <dl>
    +** <dt>SQLITE_STATUS_MEMORY_USED</dt>
    +** <dd>This parameter is the current amount of memory checked out
    +** using [sqlite3_malloc()], either directly or indirectly.  The
    +** figure includes calls made to [sqlite3_malloc()] by the application
    +** and internal memory usage by the SQLite library.  Scratch memory
    +** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
    +** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
    +** this parameter.  The amount returned is the sum of the allocation
    +** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>
    +**
    +** <dt>SQLITE_STATUS_MALLOC_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their
    +** internal equivalents).  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_USED</dt>
    +** <dd>This parameter returns the number of pages used out of the
    +** [pagecache memory allocator] that was configured using 
    +** [SQLITE_CONFIG_PAGECACHE].  The
    +** value returned is in pages, not in bytes.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
    +** <dd>This parameter returns the number of bytes of page cache
    +** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE]
    +** buffer and where forced to overflow to [sqlite3_malloc()].  The
    +** returned value includes allocations that overflowed because they
    +** where too large (they were larger than the "sz" parameter to
    +** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
    +** no space was left in the page cache.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [pagecache memory allocator].  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_USED</dt>
    +** <dd>This parameter returns the number of allocations used out of the
    +** [scratch memory allocator] configured using
    +** [SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not
    +** in bytes.  Since a single thread may only have one scratch allocation
    +** outstanding at time, this parameter also reports the number of threads
    +** using scratch memory at the same time.</dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
    +** <dd>This parameter returns the number of bytes of scratch memory
    +** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH]
    +** buffer and where forced to overflow to [sqlite3_malloc()].  The values
    +** returned include overflows because the requested allocation was too
    +** larger (that is, because the requested allocation was larger than the
    +** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
    +** slots were available.
    +** </dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [scratch memory allocator].  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_PARSER_STACK</dt>
    +** <dd>This parameter records the deepest parser stack.  It is only
    +** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>
    +** </dl>
    +**
    +** New status parameters may be added from time to time.
    +*/
    +#define SQLITE_STATUS_MEMORY_USED          0
    +#define SQLITE_STATUS_PAGECACHE_USED       1
    +#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
    +#define SQLITE_STATUS_SCRATCH_USED         3
    +#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
    +#define SQLITE_STATUS_MALLOC_SIZE          5
    +#define SQLITE_STATUS_PARSER_STACK         6
    +#define SQLITE_STATUS_PAGECACHE_SIZE       7
    +#define SQLITE_STATUS_SCRATCH_SIZE         8
    +
    +/*
    +** CAPI3REF: Database Connection Status {H17500} <S60200>
    +** EXPERIMENTAL
    +**
    +** This interface is used to retrieve runtime status information 
    +** about a single [database connection].  The first argument is the
    +** database connection object to be interrogated.  The second argument
    +** is the parameter to interrogate.  Currently, the only allowed value
    +** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED].
    +** Additional options will likely appear in future releases of SQLite.
    +**
    +** The current value of the requested parameter is written into *pCur
    +** and the highest instantaneous value is written into *pHiwtr.  If
    +** the resetFlg is true, then the highest instantaneous value is
    +** reset back down to the current value.
    +**
    +** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
    +
    +/*
    +** CAPI3REF: Status Parameters for database connections {H17520} <H17500>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer "verbs" that can be passed as
    +** the second argument to the [sqlite3_db_status()] interface.
    +**
    +** New verbs may be added in future releases of SQLite. Existing verbs
    +** might be discontinued. Applications should check the return code from
    +** [sqlite3_db_status()] to make sure that the call worked.
    +** The [sqlite3_db_status()] interface will return a non-zero error code
    +** if a discontinued or unsupported verb is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>
    +** <dd>This parameter returns the number of lookaside memory slots currently
    +** checked out.</dd>
    +** </dl>
    +*/
    +#define SQLITE_DBSTATUS_LOOKASIDE_USED     0
    +
    +
    +/*
    +** CAPI3REF: Prepared Statement Status {H17550} <S60200>
    +** EXPERIMENTAL
    +**
    +** Each prepared statement maintains various
    +** [SQLITE_STMTSTATUS_SORT | counters] that measure the number
    +** of times it has performed specific operations.  These counters can
    +** be used to monitor the performance characteristics of the prepared
    +** statements.  For example, if the number of table steps greatly exceeds
    +** the number of table searches or result rows, that would tend to indicate
    +** that the prepared statement is using a full table scan rather than
    +** an index.  
    +**
    +** This interface is used to retrieve and reset counter values from
    +** a [prepared statement].  The first argument is the prepared statement
    +** object to be interrogated.  The second argument
    +** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
    +** to be interrogated. 
    +** The current value of the requested counter is returned.
    +** If the resetFlg is true, then the counter is reset to zero after this
    +** interface call returns.
    +**
    +** See also: [sqlite3_status()] and [sqlite3_db_status()].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
    +
    +/*
    +** CAPI3REF: Status Parameters for prepared statements {H17570} <H17550>
    +** EXPERIMENTAL
    +**
    +** These preprocessor macros define integer codes that name counter
    +** values associated with the [sqlite3_stmt_status()] interface.
    +** The meanings of the various counters are as follows:
    +**
    +** <dl>
    +** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>
    +** <dd>This is the number of times that SQLite has stepped forward in
    +** a table as part of a full table scan.  Large numbers for this counter
    +** may indicate opportunities for performance improvement through 
    +** careful use of indices.</dd>
    +**
    +** <dt>SQLITE_STMTSTATUS_SORT</dt>
    +** <dd>This is the number of sort operations that have occurred.
    +** A non-zero value in this counter may indicate an opportunity to
    +** improvement performance through careful use of indices.</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1
    +#define SQLITE_STMTSTATUS_SORT              2
    +
    +/*
    +** CAPI3REF: Custom Page Cache Object
    +** EXPERIMENTAL
    +**
    +** The sqlite3_pcache type is opaque.  It is implemented by
    +** the pluggable module.  The SQLite core has no knowledge of
    +** its size or internal structure and never deals with the
    +** sqlite3_pcache object except by holding and passing pointers
    +** to the object.
    +**
    +** See [sqlite3_pcache_methods] for additional information.
    +*/
    +typedef struct sqlite3_pcache sqlite3_pcache;
    +
    +/*
    +** CAPI3REF: Application Defined Page Cache.
    +** KEYWORDS: {page cache}
    +** EXPERIMENTAL
    +**
    +** The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can
    +** register an alternative page cache implementation by passing in an 
    +** instance of the sqlite3_pcache_methods structure. The majority of the 
    +** heap memory used by SQLite is used by the page cache to cache data read 
    +** from, or ready to be written to, the database file. By implementing a 
    +** custom page cache using this API, an application can control more 
    +** precisely the amount of memory consumed by SQLite, the way in which 
    +** that memory is allocated and released, and the policies used to 
    +** determine exactly which parts of a database file are cached and for 
    +** how long.
    +**
    +** The contents of the sqlite3_pcache_methods structure are copied to an
    +** internal buffer by SQLite within the call to [sqlite3_config].  Hence
    +** the application may discard the parameter after the call to
    +** [sqlite3_config()] returns.
    +**
    +** The xInit() method is called once for each call to [sqlite3_initialize()]
    +** (usually only once during the lifetime of the process). It is passed
    +** a copy of the sqlite3_pcache_methods.pArg value. It can be used to set
    +** up global structures and mutexes required by the custom page cache 
    +** implementation. 
    +**
    +** The xShutdown() method is called from within [sqlite3_shutdown()], 
    +** if the application invokes this API. It can be used to clean up 
    +** any outstanding resources before process shutdown, if required.
    +**
    +** SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes
    +** the xInit method, so the xInit method need not be threadsafe.  The
    +** xShutdown method is only called from [sqlite3_shutdown()] so it does
    +** not need to be threadsafe either.  All other methods must be threadsafe
    +** in multithreaded applications.
    +**
    +** SQLite will never invoke xInit() more than once without an intervening
    +** call to xShutdown().
    +**
    +** The xCreate() method is used to construct a new cache instance.  SQLite
    +** will typically create one cache instance for each open database file,
    +** though this is not guaranteed. The
    +** first parameter, szPage, is the size in bytes of the pages that must
    +** be allocated by the cache.  szPage will not be a power of two.  szPage
    +** will the page size of the database file that is to be cached plus an
    +** increment (here called "R") of about 100 or 200.  SQLite will use the
    +** extra R bytes on each page to store metadata about the underlying
    +** database page on disk.  The value of R depends
    +** on the SQLite version, the target platform, and how SQLite was compiled.
    +** R is constant for a particular build of SQLite.  The second argument to
    +** xCreate(), bPurgeable, is true if the cache being created will
    +** be used to cache database pages of a file stored on disk, or
    +** false if it is used for an in-memory database. The cache implementation
    +** does not have to do anything special based with the value of bPurgeable;
    +** it is purely advisory.  On a cache where bPurgeable is false, SQLite will
    +** never invoke xUnpin() except to deliberately delete a page.
    +** In other words, a cache created with bPurgeable set to false will
    +** never contain any unpinned pages.
    +**
    +** The xCachesize() method may be called at any time by SQLite to set the
    +** suggested maximum cache-size (number of pages stored by) the cache
    +** instance passed as the first argument. This is the value configured using
    +** the SQLite "[PRAGMA cache_size]" command. As with the bPurgeable parameter,
    +** the implementation is not required to do anything with this
    +** value; it is advisory only.
    +**
    +** The xPagecount() method should return the number of pages currently
    +** stored in the cache.
    +** 
    +** The xFetch() method is used to fetch a page and return a pointer to it. 
    +** A 'page', in this context, is a buffer of szPage bytes aligned at an
    +** 8-byte boundary. The page to be fetched is determined by the key. The
    +** mimimum key value is 1. After it has been retrieved using xFetch, the page 
    +** is considered to be "pinned".
    +**
    +** If the requested page is already in the page cache, then the page cache
    +** implementation must return a pointer to the page buffer with its content
    +** intact.  If the requested page is not already in the cache, then the
    +** behavior of the cache implementation is determined by the value of the
    +** createFlag parameter passed to xFetch, according to the following table:
    +**
    +** <table border=1 width=85% align=center>
    +** <tr><th> createFlag <th> Behaviour when page is not already in cache
    +** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
    +** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
    +**                 Otherwise return NULL.
    +** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
    +**                 NULL if allocating a new page is effectively impossible.
    +** </table>
    +**
    +** SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  If
    +** a call to xFetch() with createFlag==1 returns NULL, then SQLite will
    +** attempt to unpin one or more cache pages by spilling the content of
    +** pinned pages to disk and synching the operating system disk cache. After
    +** attempting to unpin pages, the xFetch() method will be invoked again with
    +** a createFlag of 2.
    +**
    +** xUnpin() is called by SQLite with a pointer to a currently pinned page
    +** as its second argument. If the third parameter, discard, is non-zero,
    +** then the page should be evicted from the cache. In this case SQLite 
    +** assumes that the next time the page is retrieved from the cache using
    +** the xFetch() method, it will be zeroed. If the discard parameter is
    +** zero, then the page is considered to be unpinned. The cache implementation
    +** may choose to evict unpinned pages at any time.
    +**
    +** The cache is not required to perform any reference counting. A single 
    +** call to xUnpin() unpins the page regardless of the number of prior calls 
    +** to xFetch().
    +**
    +** The xRekey() method is used to change the key value associated with the
    +** page passed as the second argument from oldKey to newKey. If the cache
    +** previously contains an entry associated with newKey, it should be
    +** discarded. Any prior cache entry associated with newKey is guaranteed not
    +** to be pinned.
    +**
    +** When SQLite calls the xTruncate() method, the cache must discard all
    +** existing cache entries with page numbers (keys) greater than or equal
    +** to the value of the iLimit parameter passed to xTruncate(). If any
    +** of these pages are pinned, they are implicitly unpinned, meaning that
    +** they can be safely discarded.
    +**
    +** The xDestroy() method is used to delete a cache allocated by xCreate().
    +** All resources associated with the specified cache should be freed. After
    +** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
    +** handle invalid, and will not use it with any other sqlite3_pcache_methods
    +** functions.
    +*/
    +typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
    +struct sqlite3_pcache_methods {
    +  void *pArg;
    +  int (*xInit)(void*);
    +  void (*xShutdown)(void*);
    +  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
    +  void (*xCachesize)(sqlite3_pcache*, int nCachesize);
    +  int (*xPagecount)(sqlite3_pcache*);
    +  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
    +  void (*xUnpin)(sqlite3_pcache*, void*, int discard);
    +  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
    +  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
    +  void (*xDestroy)(sqlite3_pcache*);
    +};
    +
    +/*
    +** CAPI3REF: Online Backup Object
    +** EXPERIMENTAL
    +**
    +** The sqlite3_backup object records state information about an ongoing
    +** online backup operation.  The sqlite3_backup object is created by
    +** a call to [sqlite3_backup_init()] and is destroyed by a call to
    +** [sqlite3_backup_finish()].
    +**
    +** See Also: [Using the SQLite Online Backup API]
    +*/
    +typedef struct sqlite3_backup sqlite3_backup;
    +
    +/*
    +** CAPI3REF: Online Backup API.
    +** EXPERIMENTAL
    +**
    +** This API is used to overwrite the contents of one database with that
    +** of another. It is useful either for creating backups of databases or
    +** for copying in-memory databases to or from persistent files. 
    +**
    +** See Also: [Using the SQLite Online Backup API]
    +**
    +** Exclusive access is required to the destination database for the 
    +** duration of the operation. However the source database is only
    +** read-locked while it is actually being read, it is not locked
    +** continuously for the entire operation. Thus, the backup may be
    +** performed on a live database without preventing other users from
    +** writing to the database for an extended period of time.
    +** 
    +** To perform a backup operation: 
    +**   <ol>
    +**     <li><b>sqlite3_backup_init()</b> is called once to initialize the
    +**         backup, 
    +**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer 
    +**         the data between the two databases, and finally
    +**     <li><b>sqlite3_backup_finish()</b> is called to release all resources 
    +**         associated with the backup operation. 
    +**   </ol>
    +** There should be exactly one call to sqlite3_backup_finish() for each
    +** successful call to sqlite3_backup_init().
    +**
    +** <b>sqlite3_backup_init()</b>
    +**
    +** The first two arguments passed to [sqlite3_backup_init()] are the database
    +** handle associated with the destination database and the database name 
    +** used to attach the destination database to the handle. The database name
    +** is "main" for the main database, "temp" for the temporary database, or
    +** the name specified as part of the [ATTACH] statement if the destination is
    +** an attached database. The third and fourth arguments passed to 
    +** sqlite3_backup_init() identify the [database connection]
    +** and database name used
    +** to access the source database. The values passed for the source and 
    +** destination [database connection] parameters must not be the same.
    +**
    +** If an error occurs within sqlite3_backup_init(), then NULL is returned
    +** and an error code and error message written into the [database connection] 
    +** passed as the first argument. They may be retrieved using the
    +** [sqlite3_errcode()], [sqlite3_errmsg()], and [sqlite3_errmsg16()] functions.
    +** Otherwise, if successful, a pointer to an [sqlite3_backup] object is
    +** returned. This pointer may be used with the sqlite3_backup_step() and
    +** sqlite3_backup_finish() functions to perform the specified backup 
    +** operation.
    +**
    +** <b>sqlite3_backup_step()</b>
    +**
    +** Function [sqlite3_backup_step()] is used to copy up to nPage pages between 
    +** the source and destination databases, where nPage is the value of the 
    +** second parameter passed to sqlite3_backup_step(). If nPage is a negative
    +** value, all remaining source pages are copied. If the required pages are 
    +** succesfully copied, but there are still more pages to copy before the 
    +** backup is complete, it returns [SQLITE_OK]. If no error occured and there 
    +** are no more pages to copy, then [SQLITE_DONE] is returned. If an error 
    +** occurs, then an SQLite error code is returned. As well as [SQLITE_OK] and
    +** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
    +** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
    +**
    +** As well as the case where the destination database file was opened for
    +** read-only access, sqlite3_backup_step() may return [SQLITE_READONLY] if
    +** the destination is an in-memory database with a different page size
    +** from the source database.
    +**
    +** If sqlite3_backup_step() cannot obtain a required file-system lock, then
    +** the [sqlite3_busy_handler | busy-handler function]
    +** is invoked (if one is specified). If the 
    +** busy-handler returns non-zero before the lock is available, then 
    +** [SQLITE_BUSY] is returned to the caller. In this case the call to
    +** sqlite3_backup_step() can be retried later. If the source
    +** [database connection]
    +** is being used to write to the source database when sqlite3_backup_step()
    +** is called, then [SQLITE_LOCKED] is returned immediately. Again, in this
    +** case the call to sqlite3_backup_step() can be retried later on. If
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
    +** [SQLITE_READONLY] is returned, then 
    +** there is no point in retrying the call to sqlite3_backup_step(). These 
    +** errors are considered fatal. At this point the application must accept 
    +** that the backup operation has failed and pass the backup operation handle 
    +** to the sqlite3_backup_finish() to release associated resources.
    +**
    +** Following the first call to sqlite3_backup_step(), an exclusive lock is
    +** obtained on the destination file. It is not released until either 
    +** sqlite3_backup_finish() is called or the backup operation is complete 
    +** and sqlite3_backup_step() returns [SQLITE_DONE]. Additionally, each time 
    +** a call to sqlite3_backup_step() is made a [shared lock] is obtained on
    +** the source database file. This lock is released before the
    +** sqlite3_backup_step() call returns. Because the source database is not
    +** locked between calls to sqlite3_backup_step(), it may be modified mid-way
    +** through the backup procedure. If the source database is modified by an
    +** external process or via a database connection other than the one being
    +** used by the backup operation, then the backup will be transparently
    +** restarted by the next call to sqlite3_backup_step(). If the source 
    +** database is modified by the using the same database connection as is used
    +** by the backup operation, then the backup database is transparently 
    +** updated at the same time.
    +**
    +** <b>sqlite3_backup_finish()</b>
    +**
    +** Once sqlite3_backup_step() has returned [SQLITE_DONE], or when the 
    +** application wishes to abandon the backup operation, the [sqlite3_backup]
    +** object should be passed to sqlite3_backup_finish(). This releases all
    +** resources associated with the backup operation. If sqlite3_backup_step()
    +** has not yet returned [SQLITE_DONE], then any active write-transaction on the
    +** destination database is rolled back. The [sqlite3_backup] object is invalid
    +** and may not be used following a call to sqlite3_backup_finish().
    +**
    +** The value returned by sqlite3_backup_finish is [SQLITE_OK] if no error
    +** occurred, regardless or whether or not sqlite3_backup_step() was called
    +** a sufficient number of times to complete the backup operation. Or, if
    +** an out-of-memory condition or IO error occured during a call to
    +** sqlite3_backup_step() then [SQLITE_NOMEM] or an
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] error code
    +** is returned. In this case the error code and an error message are
    +** written to the destination [database connection].
    +**
    +** A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() is
    +** not a permanent error and does not affect the return value of
    +** sqlite3_backup_finish().
    +**
    +** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>
    +**
    +** Each call to sqlite3_backup_step() sets two values stored internally
    +** by an [sqlite3_backup] object. The number of pages still to be backed
    +** up, which may be queried by sqlite3_backup_remaining(), and the total
    +** number of pages in the source database file, which may be queried by
    +** sqlite3_backup_pagecount().
    +**
    +** The values returned by these functions are only updated by
    +** sqlite3_backup_step(). If the source database is modified during a backup
    +** operation, then the values are not updated to account for any extra
    +** pages that need to be updated or the size of the source database file
    +** changing.
    +**
    +** <b>Concurrent Usage of Database Handles</b>
    +**
    +** The source [database connection] may be used by the application for other
    +** purposes while a backup operation is underway or being initialized.
    +** If SQLite is compiled and configured to support threadsafe database
    +** connections, then the source database connection may be used concurrently
    +** from within other threads.
    +**
    +** However, the application must guarantee that the destination database
    +** connection handle is not passed to any other API (by any thread) after 
    +** sqlite3_backup_init() is called and before the corresponding call to
    +** sqlite3_backup_finish(). Unfortunately SQLite does not currently check
    +** for this, if the application does use the destination [database connection]
    +** for some other purpose during a backup operation, things may appear to
    +** work correctly but in fact be subtly malfunctioning.  Use of the
    +** destination database connection while a backup is in progress might
    +** also cause a mutex deadlock.
    +**
    +** Furthermore, if running in [shared cache mode], the application must
    +** guarantee that the shared cache used by the destination database
    +** is not accessed while the backup is running. In practice this means
    +** that the application must guarantee that the file-system file being 
    +** backed up to is not accessed by any connection within the process,
    +** not just the specific connection that was passed to sqlite3_backup_init().
    +**
    +** The [sqlite3_backup] object itself is partially threadsafe. Multiple 
    +** threads may safely make multiple concurrent calls to sqlite3_backup_step().
    +** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
    +** APIs are not strictly speaking threadsafe. If they are invoked at the
    +** same time as another thread is invoking sqlite3_backup_step() it is
    +** possible that they return invalid values.
    +*/
    +SQLITE_API sqlite3_backup *sqlite3_backup_init(
    +  sqlite3 *pDest,                        /* Destination database handle */
    +  const char *zDestName,                 /* Destination database name */
    +  sqlite3 *pSource,                      /* Source database handle */
    +  const char *zSourceName                /* Source database name */
    +);
    +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
    +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
    +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
    +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
    +
    +/*
    +** CAPI3REF: Unlock Notification
    +** EXPERIMENTAL
    +**
    +** When running in shared-cache mode, a database operation may fail with
    +** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
    +** individual tables within the shared-cache cannot be obtained. See
    +** [SQLite Shared-Cache Mode] for a description of shared-cache locking. 
    +** This API may be used to register a callback that SQLite will invoke 
    +** when the connection currently holding the required lock relinquishes it.
    +** This API is only available if the library was compiled with the
    +** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
    +**
    +** See Also: [Using the SQLite Unlock Notification Feature].
    +**
    +** Shared-cache locks are released when a database connection concludes
    +** its current transaction, either by committing it or rolling it back. 
    +**
    +** When a connection (known as the blocked connection) fails to obtain a
    +** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
    +** identity of the database connection (the blocking connection) that
    +** has locked the required resource is stored internally. After an 
    +** application receives an SQLITE_LOCKED error, it may call the
    +** sqlite3_unlock_notify() method with the blocked connection handle as 
    +** the first argument to register for a callback that will be invoked
    +** when the blocking connections current transaction is concluded. The
    +** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
    +** call that concludes the blocking connections transaction.
    +**
    +** If sqlite3_unlock_notify() is called in a multi-threaded application,
    +** there is a chance that the blocking connection will have already
    +** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
    +** If this happens, then the specified callback is invoked immediately,
    +** from within the call to sqlite3_unlock_notify().
    +**
    +** If the blocked connection is attempting to obtain a write-lock on a
    +** shared-cache table, and more than one other connection currently holds
    +** a read-lock on the same table, then SQLite arbitrarily selects one of 
    +** the other connections to use as the blocking connection.
    +**
    +** There may be at most one unlock-notify callback registered by a 
    +** blocked connection. If sqlite3_unlock_notify() is called when the
    +** blocked connection already has a registered unlock-notify callback,
    +** then the new callback replaces the old. If sqlite3_unlock_notify() is
    +** called with a NULL pointer as its second argument, then any existing
    +** unlock-notify callback is cancelled. The blocked connections 
    +** unlock-notify callback may also be canceled by closing the blocked
    +** connection using [sqlite3_close()].
    +**
    +** The unlock-notify callback is not reentrant. If an application invokes
    +** any sqlite3_xxx API functions from within an unlock-notify callback, a
    +** crash or deadlock may be the result.
    +**
    +** Unless deadlock is detected (see below), sqlite3_unlock_notify() always
    +** returns SQLITE_OK.
    +**
    +** <b>Callback Invocation Details</b>
    +**
    +** When an unlock-notify callback is registered, the application provides a 
    +** single void* pointer that is passed to the callback when it is invoked.
    +** However, the signature of the callback function allows SQLite to pass
    +** it an array of void* context pointers. The first argument passed to
    +** an unlock-notify callback is a pointer to an array of void* pointers,
    +** and the second is the number of entries in the array.
    +**
    +** When a blocking connections transaction is concluded, there may be
    +** more than one blocked connection that has registered for an unlock-notify
    +** callback. If two or more such blocked connections have specified the
    +** same callback function, then instead of invoking the callback function
    +** multiple times, it is invoked once with the set of void* context pointers
    +** specified by the blocked connections bundled together into an array.
    +** This gives the application an opportunity to prioritize any actions 
    +** related to the set of unblocked database connections.
    +**
    +** <b>Deadlock Detection</b>
    +**
    +** Assuming that after registering for an unlock-notify callback a 
    +** database waits for the callback to be issued before taking any further
    +** action (a reasonable assumption), then using this API may cause the
    +** application to deadlock. For example, if connection X is waiting for
    +** connection Y's transaction to be concluded, and similarly connection
    +** Y is waiting on connection X's transaction, then neither connection
    +** will proceed and the system may remain deadlocked indefinitely.
    +**
    +** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
    +** detection. If a given call to sqlite3_unlock_notify() would put the
    +** system in a deadlocked state, then SQLITE_LOCKED is returned and no
    +** unlock-notify callback is registered. The system is said to be in
    +** a deadlocked state if connection A has registered for an unlock-notify
    +** callback on the conclusion of connection B's transaction, and connection
    +** B has itself registered for an unlock-notify callback when connection
    +** A's transaction is concluded. Indirect deadlock is also detected, so
    +** the system is also considered to be deadlocked if connection B has
    +** registered for an unlock-notify callback on the conclusion of connection
    +** C's transaction, where connection C is waiting on connection A. Any
    +** number of levels of indirection are allowed.
    +**
    +** <b>The "DROP TABLE" Exception</b>
    +**
    +** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost 
    +** always appropriate to call sqlite3_unlock_notify(). There is however,
    +** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
    +** SQLite checks if there are any currently executing SELECT statements
    +** that belong to the same connection. If there are, SQLITE_LOCKED is
    +** returned. In this case there is no "blocking connection", so invoking
    +** sqlite3_unlock_notify() results in the unlock-notify callback being
    +** invoked immediately. If the application then re-attempts the "DROP TABLE"
    +** or "DROP INDEX" query, an infinite loop might be the result.
    +**
    +** One way around this problem is to check the extended error code returned
    +** by an sqlite3_step() call. If there is a blocking connection, then the
    +** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
    +** the special "DROP TABLE/INDEX" case, the extended error code is just 
    +** SQLITE_LOCKED.
    +*/
    +SQLITE_API int sqlite3_unlock_notify(
    +  sqlite3 *pBlocked,                          /* Waiting connection */
    +  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */
    +  void *pNotifyArg                            /* Argument to pass to xNotify */
    +);
    +
    +
    +/*
    +** CAPI3REF: String Comparison
    +** EXPERIMENTAL
    +**
    +** The [sqlite3_strnicmp()] API allows applications and extensions to
    +** compare the contents of two buffers containing UTF-8 strings in a
    +** case-indendent fashion, using the same definition of case independence 
    +** that SQLite uses internally when comparing identifiers.
    +*/
    +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
    +
    +/*
    +** Undo the hack that converts floating point types to integer for
    +** builds on processors without floating point support.
    +*/
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +# undef double
    +#endif
    +
    +#if 0
    +}  /* End of the 'extern "C"' block */
    +#endif
    +#endif
    +
    +
    +/************** End of sqlite3.h *********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include hash.h in the middle of sqliteInt.h ******************/
    +/************** Begin file hash.h ********************************************/
    +/*
    +** 2001 September 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the header file for the generic hash-table implemenation
    +** used in SQLite.
    +**
    +** $Id: hash.h,v 1.15 2009/05/02 13:29:38 drh Exp $
    +*/
    +#ifndef _SQLITE_HASH_H_
    +#define _SQLITE_HASH_H_
    +
    +/* Forward declarations of structures. */
    +typedef struct Hash Hash;
    +typedef struct HashElem HashElem;
    +
    +/* A complete hash table is an instance of the following structure.
    +** The internals of this structure are intended to be opaque -- client
    +** code should not attempt to access or modify the fields of this structure
    +** directly.  Change this structure only by using the routines below.
    +** However, some of the "procedures" and "functions" for modifying and
    +** accessing this structure are really macros, so we can't really make
    +** this structure opaque.
    +**
    +** All elements of the hash table are on a single doubly-linked list.
    +** Hash.first points to the head of this list.
    +**
    +** There are Hash.htsize buckets.  Each bucket points to a spot in
    +** the global doubly-linked list.  The contents of the bucket are the
    +** element pointed to plus the next _ht.count-1 elements in the list.
    +**
    +** Hash.htsize and Hash.ht may be zero.  In that case lookup is done
    +** by a linear search of the global list.  For small tables, the 
    +** Hash.ht table is never allocated because if there are few elements
    +** in the table, it is faster to do a linear search than to manage
    +** the hash table.
    +*/
    +struct Hash {
    +  unsigned int htsize;      /* Number of buckets in the hash table */
    +  unsigned int count;       /* Number of entries in this table */
    +  HashElem *first;          /* The first element of the array */
    +  struct _ht {              /* the hash table */
    +    int count;                 /* Number of entries with this hash */
    +    HashElem *chain;           /* Pointer to first entry with this hash */
    +  } *ht;
    +};
    +
    +/* Each element in the hash table is an instance of the following 
    +** structure.  All elements are stored on a single doubly-linked list.
    +**
    +** Again, this structure is intended to be opaque, but it can't really
    +** be opaque because it is used by macros.
    +*/
    +struct HashElem {
    +  HashElem *next, *prev;       /* Next and previous elements in the table */
    +  void *data;                  /* Data associated with this element */
    +  const char *pKey; int nKey;  /* Key associated with this element */
    +};
    +
    +/*
    +** Access routines.  To delete, insert a NULL pointer.
    +*/
    +SQLITE_PRIVATE void sqlite3HashInit(Hash*);
    +SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData);
    +SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey);
    +SQLITE_PRIVATE void sqlite3HashClear(Hash*);
    +
    +/*
    +** Macros for looping over all elements of a hash table.  The idiom is
    +** like this:
    +**
    +**   Hash h;
    +**   HashElem *p;
    +**   ...
    +**   for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){
    +**     SomeStructure *pData = sqliteHashData(p);
    +**     // do something with pData
    +**   }
    +*/
    +#define sqliteHashFirst(H)  ((H)->first)
    +#define sqliteHashNext(E)   ((E)->next)
    +#define sqliteHashData(E)   ((E)->data)
    +/* #define sqliteHashKey(E)    ((E)->pKey) // NOT USED */
    +/* #define sqliteHashKeysize(E) ((E)->nKey)  // NOT USED */
    +
    +/*
    +** Number of entries in a hash table
    +*/
    +/* #define sqliteHashCount(H)  ((H)->count) // NOT USED */
    +
    +#endif /* _SQLITE_HASH_H_ */
    +
    +/************** End of hash.h ************************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include parse.h in the middle of sqliteInt.h *****************/
    +/************** Begin file parse.h *******************************************/
    +#define TK_SEMI                            1
    +#define TK_EXPLAIN                         2
    +#define TK_QUERY                           3
    +#define TK_PLAN                            4
    +#define TK_BEGIN                           5
    +#define TK_TRANSACTION                     6
    +#define TK_DEFERRED                        7
    +#define TK_IMMEDIATE                       8
    +#define TK_EXCLUSIVE                       9
    +#define TK_COMMIT                         10
    +#define TK_END                            11
    +#define TK_ROLLBACK                       12
    +#define TK_SAVEPOINT                      13
    +#define TK_RELEASE                        14
    +#define TK_TO                             15
    +#define TK_TABLE                          16
    +#define TK_CREATE                         17
    +#define TK_IF                             18
    +#define TK_NOT                            19
    +#define TK_EXISTS                         20
    +#define TK_TEMP                           21
    +#define TK_LP                             22
    +#define TK_RP                             23
    +#define TK_AS                             24
    +#define TK_COMMA                          25
    +#define TK_ID                             26
    +#define TK_INDEXED                        27
    +#define TK_ABORT                          28
    +#define TK_ACTION                         29
    +#define TK_AFTER                          30
    +#define TK_ANALYZE                        31
    +#define TK_ASC                            32
    +#define TK_ATTACH                         33
    +#define TK_BEFORE                         34
    +#define TK_BY                             35
    +#define TK_CASCADE                        36
    +#define TK_CAST                           37
    +#define TK_COLUMNKW                       38
    +#define TK_CONFLICT                       39
    +#define TK_DATABASE                       40
    +#define TK_DESC                           41
    +#define TK_DETACH                         42
    +#define TK_EACH                           43
    +#define TK_FAIL                           44
    +#define TK_FOR                            45
    +#define TK_IGNORE                         46
    +#define TK_INITIALLY                      47
    +#define TK_INSTEAD                        48
    +#define TK_LIKE_KW                        49
    +#define TK_MATCH                          50
    +#define TK_NO                             51
    +#define TK_KEY                            52
    +#define TK_OF                             53
    +#define TK_OFFSET                         54
    +#define TK_PRAGMA                         55
    +#define TK_RAISE                          56
    +#define TK_REPLACE                        57
    +#define TK_RESTRICT                       58
    +#define TK_ROW                            59
    +#define TK_TRIGGER                        60
    +#define TK_VACUUM                         61
    +#define TK_VIEW                           62
    +#define TK_VIRTUAL                        63
    +#define TK_REINDEX                        64
    +#define TK_RENAME                         65
    +#define TK_CTIME_KW                       66
    +#define TK_ANY                            67
    +#define TK_OR                             68
    +#define TK_AND                            69
    +#define TK_IS                             70
    +#define TK_BETWEEN                        71
    +#define TK_IN                             72
    +#define TK_ISNULL                         73
    +#define TK_NOTNULL                        74
    +#define TK_NE                             75
    +#define TK_EQ                             76
    +#define TK_GT                             77
    +#define TK_LE                             78
    +#define TK_LT                             79
    +#define TK_GE                             80
    +#define TK_ESCAPE                         81
    +#define TK_BITAND                         82
    +#define TK_BITOR                          83
    +#define TK_LSHIFT                         84
    +#define TK_RSHIFT                         85
    +#define TK_PLUS                           86
    +#define TK_MINUS                          87
    +#define TK_STAR                           88
    +#define TK_SLASH                          89
    +#define TK_REM                            90
    +#define TK_CONCAT                         91
    +#define TK_COLLATE                        92
    +#define TK_BITNOT                         93
    +#define TK_STRING                         94
    +#define TK_JOIN_KW                        95
    +#define TK_CONSTRAINT                     96
    +#define TK_DEFAULT                        97
    +#define TK_NULL                           98
    +#define TK_PRIMARY                        99
    +#define TK_UNIQUE                         100
    +#define TK_CHECK                          101
    +#define TK_REFERENCES                     102
    +#define TK_AUTOINCR                       103
    +#define TK_ON                             104
    +#define TK_DELETE                         105
    +#define TK_UPDATE                         106
    +#define TK_SET                            107
    +#define TK_DEFERRABLE                     108
    +#define TK_FOREIGN                        109
    +#define TK_DROP                           110
    +#define TK_UNION                          111
    +#define TK_ALL                            112
    +#define TK_EXCEPT                         113
    +#define TK_INTERSECT                      114
    +#define TK_SELECT                         115
    +#define TK_DISTINCT                       116
    +#define TK_DOT                            117
    +#define TK_FROM                           118
    +#define TK_JOIN                           119
    +#define TK_USING                          120
    +#define TK_ORDER                          121
    +#define TK_GROUP                          122
    +#define TK_HAVING                         123
    +#define TK_LIMIT                          124
    +#define TK_WHERE                          125
    +#define TK_INTO                           126
    +#define TK_VALUES                         127
    +#define TK_INSERT                         128
    +#define TK_INTEGER                        129
    +#define TK_FLOAT                          130
    +#define TK_BLOB                           131
    +#define TK_REGISTER                       132
    +#define TK_VARIABLE                       133
    +#define TK_CASE                           134
    +#define TK_WHEN                           135
    +#define TK_THEN                           136
    +#define TK_ELSE                           137
    +#define TK_INDEX                          138
    +#define TK_ALTER                          139
    +#define TK_ADD                            140
    +#define TK_TO_TEXT                        141
    +#define TK_TO_BLOB                        142
    +#define TK_TO_NUMERIC                     143
    +#define TK_TO_INT                         144
    +#define TK_TO_REAL                        145
    +#define TK_ISNOT                          146
    +#define TK_END_OF_FILE                    147
    +#define TK_ILLEGAL                        148
    +#define TK_SPACE                          149
    +#define TK_UNCLOSED_STRING                150
    +#define TK_FUNCTION                       151
    +#define TK_COLUMN                         152
    +#define TK_AGG_FUNCTION                   153
    +#define TK_AGG_COLUMN                     154
    +#define TK_CONST_FUNC                     155
    +#define TK_UMINUS                         156
    +#define TK_UPLUS                          157
    +
    +/************** End of parse.h ***********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +#include <stdio.h>
    +#include <stdlib.h>
    +#include <string.h>
    +#include <assert.h>
    +#include <stddef.h>
    +
    +/*
    +** If compiling for a processor that lacks floating point support,
    +** substitute integer for floating-point
    +*/
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +# define double sqlite_int64
    +# define LONGDOUBLE_TYPE sqlite_int64
    +# ifndef SQLITE_BIG_DBL
    +#   define SQLITE_BIG_DBL (((sqlite3_int64)1)<<50)
    +# endif
    +# define SQLITE_OMIT_DATETIME_FUNCS 1
    +# define SQLITE_OMIT_TRACE 1
    +# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
    +# undef SQLITE_HAVE_ISNAN
    +#endif
    +#ifndef SQLITE_BIG_DBL
    +# define SQLITE_BIG_DBL (1e99)
    +#endif
    +
    +/*
    +** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0
    +** afterward. Having this macro allows us to cause the C compiler 
    +** to omit code used by TEMP tables without messy #ifndef statements.
    +*/
    +#ifdef SQLITE_OMIT_TEMPDB
    +#define OMIT_TEMPDB 1
    +#else
    +#define OMIT_TEMPDB 0
    +#endif
    +
    +/*
    +** If the following macro is set to 1, then NULL values are considered
    +** distinct when determining whether or not two entries are the same
    +** in a UNIQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,
    +** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this
    +** is the way things are suppose to work.
    +**
    +** If the following macro is set to 0, the NULLs are indistinct for
    +** a UNIQUE index.  In this mode, you can only have a single NULL entry
    +** for a column declared UNIQUE.  This is the way Informix and SQL Server
    +** work.
    +*/
    +#define NULL_DISTINCT_FOR_UNIQUE 1
    +
    +/*
    +** The "file format" number is an integer that is incremented whenever
    +** the VDBE-level file format changes.  The following macros define the
    +** the default file format for new databases and the maximum file format
    +** that the library can read.
    +*/
    +#define SQLITE_MAX_FILE_FORMAT 4
    +#ifndef SQLITE_DEFAULT_FILE_FORMAT
    +# define SQLITE_DEFAULT_FILE_FORMAT 1
    +#endif
    +
    +#ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS
    +# define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0
    +#endif
    +
    +/*
    +** Provide a default value for SQLITE_TEMP_STORE in case it is not specified
    +** on the command-line
    +*/
    +#ifndef SQLITE_TEMP_STORE
    +# define SQLITE_TEMP_STORE 1
    +#endif
    +
    +/*
    +** GCC does not define the offsetof() macro so we'll have to do it
    +** ourselves.
    +*/
    +#ifndef offsetof
    +#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
    +#endif
    +
    +/*
    +** Check to see if this machine uses EBCDIC.  (Yes, believe it or
    +** not, there are still machines out there that use EBCDIC.)
    +*/
    +#if 'A' == '\301'
    +# define SQLITE_EBCDIC 1
    +#else
    +# define SQLITE_ASCII 1
    +#endif
    +
    +/*
    +** Integers of known sizes.  These typedefs might change for architectures
    +** where the sizes very.  Preprocessor macros are available so that the
    +** types can be conveniently redefined at compile-type.  Like this:
    +**
    +**         cc '-DUINTPTR_TYPE=long long int' ...
    +*/
    +#ifndef UINT32_TYPE
    +# ifdef HAVE_UINT32_T
    +#  define UINT32_TYPE uint32_t
    +# else
    +#  define UINT32_TYPE unsigned int
    +# endif
    +#endif
    +#ifndef UINT16_TYPE
    +# ifdef HAVE_UINT16_T
    +#  define UINT16_TYPE uint16_t
    +# else
    +#  define UINT16_TYPE unsigned short int
    +# endif
    +#endif
    +#ifndef INT16_TYPE
    +# ifdef HAVE_INT16_T
    +#  define INT16_TYPE int16_t
    +# else
    +#  define INT16_TYPE short int
    +# endif
    +#endif
    +#ifndef UINT8_TYPE
    +# ifdef HAVE_UINT8_T
    +#  define UINT8_TYPE uint8_t
    +# else
    +#  define UINT8_TYPE unsigned char
    +# endif
    +#endif
    +#ifndef INT8_TYPE
    +# ifdef HAVE_INT8_T
    +#  define INT8_TYPE int8_t
    +# else
    +#  define INT8_TYPE signed char
    +# endif
    +#endif
    +#ifndef LONGDOUBLE_TYPE
    +# define LONGDOUBLE_TYPE long double
    +#endif
    +typedef sqlite_int64 i64;          /* 8-byte signed integer */
    +typedef sqlite_uint64 u64;         /* 8-byte unsigned integer */
    +typedef UINT32_TYPE u32;           /* 4-byte unsigned integer */
    +typedef UINT16_TYPE u16;           /* 2-byte unsigned integer */
    +typedef INT16_TYPE i16;            /* 2-byte signed integer */
    +typedef UINT8_TYPE u8;             /* 1-byte unsigned integer */
    +typedef INT8_TYPE i8;              /* 1-byte signed integer */
    +
    +/*
    +** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value
    +** that can be stored in a u32 without loss of data.  The value
    +** is 0x00000000ffffffff.  But because of quirks of some compilers, we
    +** have to specify the value in the less intuitive manner shown:
    +*/
    +#define SQLITE_MAX_U32  ((((u64)1)<<32)-1)
    +
    +/*
    +** Macros to determine whether the machine is big or little endian,
    +** evaluated at runtime.
    +*/
    +#ifdef SQLITE_AMALGAMATION
    +SQLITE_PRIVATE const int sqlite3one = 1;
    +#else
    +SQLITE_PRIVATE const int sqlite3one;
    +#endif
    +#if defined(i386) || defined(__i386__) || defined(_M_IX86)\
    +                             || defined(__x86_64) || defined(__x86_64__)
    +# define SQLITE_BIGENDIAN    0
    +# define SQLITE_LITTLEENDIAN 1
    +# define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
    +#else
    +# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
    +# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
    +# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
    +#endif
    +
    +/*
    +** Constants for the largest and smallest possible 64-bit signed integers.
    +** These macros are designed to work correctly on both 32-bit and 64-bit
    +** compilers.
    +*/
    +#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))
    +#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
    +
    +/* 
    +** Round up a number to the next larger multiple of 8.  This is used
    +** to force 8-byte alignment on 64-bit architectures.
    +*/
    +#define ROUND8(x)     (((x)+7)&~7)
    +
    +/*
    +** Round down to the nearest multiple of 8
    +*/
    +#define ROUNDDOWN8(x) ((x)&~7)
    +
    +/*
    +** Assert that the pointer X is aligned to an 8-byte boundary.
    +*/
    +#define EIGHT_BYTE_ALIGNMENT(X)   ((((char*)(X) - (char*)0)&7)==0)
    +
    +
    +/*
    +** An instance of the following structure is used to store the busy-handler
    +** callback for a given sqlite handle. 
    +**
    +** The sqlite.busyHandler member of the sqlite struct contains the busy
    +** callback for the database handle. Each pager opened via the sqlite
    +** handle is passed a pointer to sqlite.busyHandler. The busy-handler
    +** callback is currently invoked only from within pager.c.
    +*/
    +typedef struct BusyHandler BusyHandler;
    +struct BusyHandler {
    +  int (*xFunc)(void *,int);  /* The busy callback */
    +  void *pArg;                /* First arg to busy callback */
    +  int nBusy;                 /* Incremented with each busy call */
    +};
    +
    +/*
    +** Name of the master database table.  The master database table
    +** is a special table that holds the names and attributes of all
    +** user tables and indices.
    +*/
    +#define MASTER_NAME       "sqlite_master"
    +#define TEMP_MASTER_NAME  "sqlite_temp_master"
    +
    +/*
    +** The root-page of the master database table.
    +*/
    +#define MASTER_ROOT       1
    +
    +/*
    +** The name of the schema table.
    +*/
    +#define SCHEMA_TABLE(x)  ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME)
    +
    +/*
    +** A convenience macro that returns the number of elements in
    +** an array.
    +*/
    +#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))
    +
    +/*
    +** The following value as a destructor means to use sqlite3DbFree().
    +** This is an internal extension to SQLITE_STATIC and SQLITE_TRANSIENT.
    +*/
    +#define SQLITE_DYNAMIC   ((sqlite3_destructor_type)sqlite3DbFree)
    +
    +/*
    +** When SQLITE_OMIT_WSD is defined, it means that the target platform does
    +** not support Writable Static Data (WSD) such as global and static variables.
    +** All variables must either be on the stack or dynamically allocated from
    +** the heap.  When WSD is unsupported, the variable declarations scattered
    +** throughout the SQLite code must become constants instead.  The SQLITE_WSD
    +** macro is used for this purpose.  And instead of referencing the variable
    +** directly, we use its constant as a key to lookup the run-time allocated
    +** buffer that holds real variable.  The constant is also the initializer
    +** for the run-time allocated buffer.
    +**
    +** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL
    +** macros become no-ops and have zero performance impact.
    +*/
    +#ifdef SQLITE_OMIT_WSD
    +  #define SQLITE_WSD const
    +  #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
    +  #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
    +SQLITE_API   int sqlite3_wsd_init(int N, int J);
    +SQLITE_API   void *sqlite3_wsd_find(void *K, int L);
    +#else
    +  #define SQLITE_WSD 
    +  #define GLOBAL(t,v) v
    +  #define sqlite3GlobalConfig sqlite3Config
    +#endif
    +
    +/*
    +** The following macros are used to suppress compiler warnings and to
    +** make it clear to human readers when a function parameter is deliberately 
    +** left unused within the body of a function. This usually happens when
    +** a function is called via a function pointer. For example the 
    +** implementation of an SQL aggregate step callback may not use the
    +** parameter indicating the number of arguments passed to the aggregate,
    +** if it knows that this is enforced elsewhere.
    +**
    +** When a function parameter is not used at all within the body of a function,
    +** it is generally named "NotUsed" or "NotUsed2" to make things even clearer.
    +** However, these macros may also be used to suppress warnings related to
    +** parameters that may or may not be used depending on compilation options.
    +** For example those parameters only used in assert() statements. In these
    +** cases the parameters are named as per the usual conventions.
    +*/
    +#define UNUSED_PARAMETER(x) (void)(x)
    +#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y)
    +
    +/*
    +** Forward references to structures
    +*/
    +typedef struct AggInfo AggInfo;
    +typedef struct AuthContext AuthContext;
    +typedef struct AutoincInfo AutoincInfo;
    +typedef struct Bitvec Bitvec;
    +typedef struct RowSet RowSet;
    +typedef struct CollSeq CollSeq;
    +typedef struct Column Column;
    +typedef struct Db Db;
    +typedef struct Schema Schema;
    +typedef struct Expr Expr;
    +typedef struct ExprList ExprList;
    +typedef struct ExprSpan ExprSpan;
    +typedef struct FKey FKey;
    +typedef struct FuncDef FuncDef;
    +typedef struct FuncDefHash FuncDefHash;
    +typedef struct IdList IdList;
    +typedef struct Index Index;
    +typedef struct IndexSample IndexSample;
    +typedef struct KeyClass KeyClass;
    +typedef struct KeyInfo KeyInfo;
    +typedef struct Lookaside Lookaside;
    +typedef struct LookasideSlot LookasideSlot;
    +typedef struct Module Module;
    +typedef struct NameContext NameContext;
    +typedef struct Parse Parse;
    +typedef struct Savepoint Savepoint;
    +typedef struct Select Select;
    +typedef struct SrcList SrcList;
    +typedef struct StrAccum StrAccum;
    +typedef struct Table Table;
    +typedef struct TableLock TableLock;
    +typedef struct Token Token;
    +typedef struct TriggerPrg TriggerPrg;
    +typedef struct TriggerStep TriggerStep;
    +typedef struct Trigger Trigger;
    +typedef struct UnpackedRecord UnpackedRecord;
    +typedef struct VTable VTable;
    +typedef struct Walker Walker;
    +typedef struct WherePlan WherePlan;
    +typedef struct WhereInfo WhereInfo;
    +typedef struct WhereLevel WhereLevel;
    +
    +/*
    +** Defer sourcing vdbe.h and btree.h until after the "u8" and 
    +** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
    +** pointer types (i.e. FuncDef) defined above.
    +*/
    +/************** Include btree.h in the middle of sqliteInt.h *****************/
    +/************** Begin file btree.h *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the interface that the sqlite B-Tree file
    +** subsystem.  See comments in the source code for a detailed description
    +** of what each interface routine does.
    +**
    +** @(#) $Id: btree.h,v 1.120 2009/07/22 00:35:24 drh Exp $
    +*/
    +#ifndef _BTREE_H_
    +#define _BTREE_H_
    +
    +/* TODO: This definition is just included so other modules compile. It
    +** needs to be revisited.
    +*/
    +#define SQLITE_N_BTREE_META 10
    +
    +/*
    +** If defined as non-zero, auto-vacuum is enabled by default. Otherwise
    +** it must be turned on for each database using "PRAGMA auto_vacuum = 1".
    +*/
    +#ifndef SQLITE_DEFAULT_AUTOVACUUM
    +  #define SQLITE_DEFAULT_AUTOVACUUM 0
    +#endif
    +
    +#define BTREE_AUTOVACUUM_NONE 0        /* Do not do auto-vacuum */
    +#define BTREE_AUTOVACUUM_FULL 1        /* Do full auto-vacuum */
    +#define BTREE_AUTOVACUUM_INCR 2        /* Incremental vacuum */
    +
    +/*
    +** Forward declarations of structure
    +*/
    +typedef struct Btree Btree;
    +typedef struct BtCursor BtCursor;
    +typedef struct BtShared BtShared;
    +typedef struct BtreeMutexArray BtreeMutexArray;
    +
    +/*
    +** This structure records all of the Btrees that need to hold
    +** a mutex before we enter sqlite3VdbeExec().  The Btrees are
    +** are placed in aBtree[] in order of aBtree[]->pBt.  That way,
    +** we can always lock and unlock them all quickly.
    +*/
    +struct BtreeMutexArray {
    +  int nMutex;
    +  Btree *aBtree[SQLITE_MAX_ATTACHED+1];
    +};
    +
    +
    +SQLITE_PRIVATE int sqlite3BtreeOpen(
    +  const char *zFilename,   /* Name of database file to open */
    +  sqlite3 *db,             /* Associated database connection */
    +  Btree **ppBtree,         /* Return open Btree* here */
    +  int flags,               /* Flags */
    +  int vfsFlags             /* Flags passed through to VFS open */
    +);
    +
    +/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the
    +** following values.
    +**
    +** NOTE:  These values must match the corresponding PAGER_ values in
    +** pager.h.
    +*/
    +#define BTREE_OMIT_JOURNAL  1  /* Do not use journal.  No argument */
    +#define BTREE_NO_READLOCK   2  /* Omit readlocks on readonly files */
    +#define BTREE_MEMORY        4  /* In-memory DB.  No argument */
    +#define BTREE_READONLY      8  /* Open the database in read-only mode */
    +#define BTREE_READWRITE    16  /* Open for both reading and writing */
    +#define BTREE_CREATE       32  /* Create the database if it does not exist */
    +
    +SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
    +SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int);
    +SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
    +SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
    +SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
    +SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
    +SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int);
    +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
    +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int);
    +SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags);
    +SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*);
    +SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*);
    +SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *));
    +SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);
    +SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
    +SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int);
    +
    +SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);
    +SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *);
    +SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *);
    +
    +SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);
    +
    +/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR
    +** of the following flags:
    +*/
    +#define BTREE_INTKEY     1    /* Table has only 64-bit signed integer keys */
    +#define BTREE_ZERODATA   2    /* Table has keys only - no data */
    +#define BTREE_LEAFDATA   4    /* Data stored in leaves only.  Implies INTKEY */
    +
    +SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*);
    +SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*);
    +SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree*, int);
    +
    +SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
    +SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
    +
    +/*
    +** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta
    +** should be one of the following values. The integer values are assigned 
    +** to constants so that the offset of the corresponding field in an
    +** SQLite database header may be found using the following formula:
    +**
    +**   offset = 36 + (idx * 4)
    +**
    +** For example, the free-page-count field is located at byte offset 36 of
    +** the database file header. The incr-vacuum-flag field is located at
    +** byte offset 64 (== 36+4*7).
    +*/
    +#define BTREE_FREE_PAGE_COUNT     0
    +#define BTREE_SCHEMA_VERSION      1
    +#define BTREE_FILE_FORMAT         2
    +#define BTREE_DEFAULT_CACHE_SIZE  3
    +#define BTREE_LARGEST_ROOT_PAGE   4
    +#define BTREE_TEXT_ENCODING       5
    +#define BTREE_USER_VERSION        6
    +#define BTREE_INCR_VACUUM         7
    +
    +SQLITE_PRIVATE int sqlite3BtreeCursor(
    +  Btree*,                              /* BTree containing table to open */
    +  int iTable,                          /* Index of root page */
    +  int wrFlag,                          /* 1 for writing.  0 for read-only */
    +  struct KeyInfo*,                     /* First argument to compare function */
    +  BtCursor *pCursor                    /* Space to write cursor structure */
    +);
    +SQLITE_PRIVATE int sqlite3BtreeCursorSize(void);
    +
    +SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*);
    +SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
    +  BtCursor*,
    +  UnpackedRecord *pUnKey,
    +  i64 intKey,
    +  int bias,
    +  int *pRes
    +);
    +SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*, int*);
    +SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*);
    +SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
    +                                  const void *pData, int nData,
    +                                  int nZero, int bias, int seekResult);
    +SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes);
    +SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes);
    +SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes);
    +SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*);
    +SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes);
    +SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize);
    +SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*);
    +SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt);
    +SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt);
    +SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize);
    +SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*);
    +SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor*, sqlite3_int64);
    +SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor*);
    +
    +SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
    +SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*);
    +
    +SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
    +SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *);
    +SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *);
    +
    +#ifndef NDEBUG
    +SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*);
    +#endif
    +
    +#ifndef SQLITE_OMIT_BTREECOUNT
    +SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *, i64 *);
    +#endif
    +
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int);
    +SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*);
    +#endif
    +
    +/*
    +** If we are not using shared cache, then there is no need to
    +** use mutexes to access the BtShared structures.  So make the
    +** Enter and Leave procedures no-ops.
    +*/
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +SQLITE_PRIVATE   void sqlite3BtreeEnter(Btree*);
    +SQLITE_PRIVATE   void sqlite3BtreeEnterAll(sqlite3*);
    +#else
    +# define sqlite3BtreeEnter(X) 
    +# define sqlite3BtreeEnterAll(X)
    +#endif
    +
    +#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
    +SQLITE_PRIVATE   void sqlite3BtreeLeave(Btree*);
    +SQLITE_PRIVATE   void sqlite3BtreeEnterCursor(BtCursor*);
    +SQLITE_PRIVATE   void sqlite3BtreeLeaveCursor(BtCursor*);
    +SQLITE_PRIVATE   void sqlite3BtreeLeaveAll(sqlite3*);
    +SQLITE_PRIVATE   void sqlite3BtreeMutexArrayEnter(BtreeMutexArray*);
    +SQLITE_PRIVATE   void sqlite3BtreeMutexArrayLeave(BtreeMutexArray*);
    +SQLITE_PRIVATE   void sqlite3BtreeMutexArrayInsert(BtreeMutexArray*, Btree*);
    +#ifndef NDEBUG
    +  /* These routines are used inside assert() statements only. */
    +SQLITE_PRIVATE   int sqlite3BtreeHoldsMutex(Btree*);
    +SQLITE_PRIVATE   int sqlite3BtreeHoldsAllMutexes(sqlite3*);
    +#endif
    +#else
    +
    +# define sqlite3BtreeLeave(X)
    +# define sqlite3BtreeEnterCursor(X)
    +# define sqlite3BtreeLeaveCursor(X)
    +# define sqlite3BtreeLeaveAll(X)
    +# define sqlite3BtreeMutexArrayEnter(X)
    +# define sqlite3BtreeMutexArrayLeave(X)
    +# define sqlite3BtreeMutexArrayInsert(X,Y)
    +
    +# define sqlite3BtreeHoldsMutex(X) 1
    +# define sqlite3BtreeHoldsAllMutexes(X) 1
    +#endif
    +
    +
    +#endif /* _BTREE_H_ */
    +
    +/************** End of btree.h ***********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include vdbe.h in the middle of sqliteInt.h ******************/
    +/************** Begin file vdbe.h ********************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Header file for the Virtual DataBase Engine (VDBE)
    +**
    +** This header defines the interface to the virtual database engine
    +** or VDBE.  The VDBE implements an abstract machine that runs a
    +** simple program to access and modify the underlying database.
    +**
    +** $Id: vdbe.h,v 1.142 2009/07/24 17:58:53 danielk1977 Exp $
    +*/
    +#ifndef _SQLITE_VDBE_H_
    +#define _SQLITE_VDBE_H_
    +
    +/*
    +** A single VDBE is an opaque structure named "Vdbe".  Only routines
    +** in the source file sqliteVdbe.c are allowed to see the insides
    +** of this structure.
    +*/
    +typedef struct Vdbe Vdbe;
    +
    +/*
    +** The names of the following types declared in vdbeInt.h are required
    +** for the VdbeOp definition.
    +*/
    +typedef struct VdbeFunc VdbeFunc;
    +typedef struct Mem Mem;
    +typedef struct SubProgram SubProgram;
    +
    +/*
    +** A single instruction of the virtual machine has an opcode
    +** and as many as three operands.  The instruction is recorded
    +** as an instance of the following structure:
    +*/
    +struct VdbeOp {
    +  u8 opcode;          /* What operation to perform */
    +  signed char p4type; /* One of the P4_xxx constants for p4 */
    +  u8 opflags;         /* Not currently used */
    +  u8 p5;              /* Fifth parameter is an unsigned character */
    +  int p1;             /* First operand */
    +  int p2;             /* Second parameter (often the jump destination) */
    +  int p3;             /* The third parameter */
    +  union {             /* fourth parameter */
    +    int i;                 /* Integer value if p4type==P4_INT32 */
    +    void *p;               /* Generic pointer */
    +    char *z;               /* Pointer to data for string (char array) types */
    +    i64 *pI64;             /* Used when p4type is P4_INT64 */
    +    double *pReal;         /* Used when p4type is P4_REAL */
    +    FuncDef *pFunc;        /* Used when p4type is P4_FUNCDEF */
    +    VdbeFunc *pVdbeFunc;   /* Used when p4type is P4_VDBEFUNC */
    +    CollSeq *pColl;        /* Used when p4type is P4_COLLSEQ */
    +    Mem *pMem;             /* Used when p4type is P4_MEM */
    +    VTable *pVtab;         /* Used when p4type is P4_VTAB */
    +    KeyInfo *pKeyInfo;     /* Used when p4type is P4_KEYINFO */
    +    int *ai;               /* Used when p4type is P4_INTARRAY */
    +    SubProgram *pProgram;  /* Used when p4type is P4_SUBPROGRAM */
    +  } p4;
    +#ifdef SQLITE_DEBUG
    +  char *zComment;          /* Comment to improve readability */
    +#endif
    +#ifdef VDBE_PROFILE
    +  int cnt;                 /* Number of times this instruction was executed */
    +  u64 cycles;              /* Total time spent executing this instruction */
    +#endif
    +};
    +typedef struct VdbeOp VdbeOp;
    +
    +
    +/*
    +** A sub-routine used to implement a trigger program.
    +*/
    +struct SubProgram {
    +  VdbeOp *aOp;                  /* Array of opcodes for sub-program */
    +  int nOp;                      /* Elements in aOp[] */
    +  int nMem;                     /* Number of memory cells required */
    +  int nCsr;                     /* Number of cursors required */
    +  int nRef;                     /* Number of pointers to this structure */
    +  void *token;                  /* id that may be used to recursive triggers */
    +};
    +
    +/*
    +** A smaller version of VdbeOp used for the VdbeAddOpList() function because
    +** it takes up less space.
    +*/
    +struct VdbeOpList {
    +  u8 opcode;          /* What operation to perform */
    +  signed char p1;     /* First operand */
    +  signed char p2;     /* Second parameter (often the jump destination) */
    +  signed char p3;     /* Third parameter */
    +};
    +typedef struct VdbeOpList VdbeOpList;
    +
    +/*
    +** Allowed values of VdbeOp.p4type
    +*/
    +#define P4_NOTUSED    0   /* The P4 parameter is not used */
    +#define P4_DYNAMIC  (-1)  /* Pointer to a string obtained from sqliteMalloc() */
    +#define P4_STATIC   (-2)  /* Pointer to a static string */
    +#define P4_COLLSEQ  (-4)  /* P4 is a pointer to a CollSeq structure */
    +#define P4_FUNCDEF  (-5)  /* P4 is a pointer to a FuncDef structure */
    +#define P4_KEYINFO  (-6)  /* P4 is a pointer to a KeyInfo structure */
    +#define P4_VDBEFUNC (-7)  /* P4 is a pointer to a VdbeFunc structure */
    +#define P4_MEM      (-8)  /* P4 is a pointer to a Mem*    structure */
    +#define P4_TRANSIENT (-9) /* P4 is a pointer to a transient string */
    +#define P4_VTAB     (-10) /* P4 is a pointer to an sqlite3_vtab structure */
    +#define P4_MPRINTF  (-11) /* P4 is a string obtained from sqlite3_mprintf() */
    +#define P4_REAL     (-12) /* P4 is a 64-bit floating point value */
    +#define P4_INT64    (-13) /* P4 is a 64-bit signed integer */
    +#define P4_INT32    (-14) /* P4 is a 32-bit signed integer */
    +#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
    +#define P4_SUBPROGRAM  (-18) /* P4 is a pointer to a SubProgram structure */
    +
    +/* When adding a P4 argument using P4_KEYINFO, a copy of the KeyInfo structure
    +** is made.  That copy is freed when the Vdbe is finalized.  But if the
    +** argument is P4_KEYINFO_HANDOFF, the passed in pointer is used.  It still
    +** gets freed when the Vdbe is finalized so it still should be obtained
    +** from a single sqliteMalloc().  But no copy is made and the calling
    +** function should *not* try to free the KeyInfo.
    +*/
    +#define P4_KEYINFO_HANDOFF (-16)
    +#define P4_KEYINFO_STATIC  (-17)
    +
    +/*
    +** The Vdbe.aColName array contains 5n Mem structures, where n is the 
    +** number of columns of data returned by the statement.
    +*/
    +#define COLNAME_NAME     0
    +#define COLNAME_DECLTYPE 1
    +#define COLNAME_DATABASE 2
    +#define COLNAME_TABLE    3
    +#define COLNAME_COLUMN   4
    +#ifdef SQLITE_ENABLE_COLUMN_METADATA
    +# define COLNAME_N        5      /* Number of COLNAME_xxx symbols */
    +#else
    +# ifdef SQLITE_OMIT_DECLTYPE
    +#   define COLNAME_N      1      /* Store only the name */
    +# else
    +#   define COLNAME_N      2      /* Store the name and decltype */
    +# endif
    +#endif
    +
    +/*
    +** The following macro converts a relative address in the p2 field
    +** of a VdbeOp structure into a negative number so that 
    +** sqlite3VdbeAddOpList() knows that the address is relative.  Calling
    +** the macro again restores the address.
    +*/
    +#define ADDR(X)  (-1-(X))
    +
    +/*
    +** The makefile scans the vdbe.c source file and creates the "opcodes.h"
    +** header file that defines a number for each opcode used by the VDBE.
    +*/
    +/************** Include opcodes.h in the middle of vdbe.h ********************/
    +/************** Begin file opcodes.h *****************************************/
    +/* Automatically generated.  Do not edit */
    +/* See the mkopcodeh.awk script for details */
    +#define OP_Goto                                 1
    +#define OP_Gosub                                2
    +#define OP_Return                               3
    +#define OP_Yield                                4
    +#define OP_HaltIfNull                           5
    +#define OP_Halt                                 6
    +#define OP_Integer                              7
    +#define OP_Int64                                8
    +#define OP_Real                               130   /* same as TK_FLOAT    */
    +#define OP_String8                             94   /* same as TK_STRING   */
    +#define OP_String                               9
    +#define OP_Null                                10
    +#define OP_Blob                                11
    +#define OP_Variable                            12
    +#define OP_Move                                13
    +#define OP_Copy                                14
    +#define OP_SCopy                               15
    +#define OP_ResultRow                           16
    +#define OP_Concat                              91   /* same as TK_CONCAT   */
    +#define OP_Add                                 86   /* same as TK_PLUS     */
    +#define OP_Subtract                            87   /* same as TK_MINUS    */
    +#define OP_Multiply                            88   /* same as TK_STAR     */
    +#define OP_Divide                              89   /* same as TK_SLASH    */
    +#define OP_Remainder                           90   /* same as TK_REM      */
    +#define OP_CollSeq                             17
    +#define OP_Function                            18
    +#define OP_BitAnd                              82   /* same as TK_BITAND   */
    +#define OP_BitOr                               83   /* same as TK_BITOR    */
    +#define OP_ShiftLeft                           84   /* same as TK_LSHIFT   */
    +#define OP_ShiftRight                          85   /* same as TK_RSHIFT   */
    +#define OP_AddImm                              20
    +#define OP_MustBeInt                           21
    +#define OP_RealAffinity                        22
    +#define OP_ToText                             141   /* same as TK_TO_TEXT  */
    +#define OP_ToBlob                             142   /* same as TK_TO_BLOB  */
    +#define OP_ToNumeric                          143   /* same as TK_TO_NUMERIC*/
    +#define OP_ToInt                              144   /* same as TK_TO_INT   */
    +#define OP_ToReal                             145   /* same as TK_TO_REAL  */
    +#define OP_Eq                                  76   /* same as TK_EQ       */
    +#define OP_Ne                                  75   /* same as TK_NE       */
    +#define OP_Lt                                  79   /* same as TK_LT       */
    +#define OP_Le                                  78   /* same as TK_LE       */
    +#define OP_Gt                                  77   /* same as TK_GT       */
    +#define OP_Ge                                  80   /* same as TK_GE       */
    +#define OP_Permutation                         23
    +#define OP_Compare                             24
    +#define OP_Jump                                25
    +#define OP_And                                 69   /* same as TK_AND      */
    +#define OP_Or                                  68   /* same as TK_OR       */
    +#define OP_Not                                 19   /* same as TK_NOT      */
    +#define OP_BitNot                              93   /* same as TK_BITNOT   */
    +#define OP_If                                  26
    +#define OP_IfNot                               27
    +#define OP_IsNull                              73   /* same as TK_ISNULL   */
    +#define OP_NotNull                             74   /* same as TK_NOTNULL  */
    +#define OP_Column                              28
    +#define OP_Affinity                            29
    +#define OP_MakeRecord                          30
    +#define OP_Count                               31
    +#define OP_Savepoint                           32
    +#define OP_AutoCommit                          33
    +#define OP_Transaction                         34
    +#define OP_ReadCookie                          35
    +#define OP_SetCookie                           36
    +#define OP_VerifyCookie                        37
    +#define OP_OpenRead                            38
    +#define OP_OpenWrite                           39
    +#define OP_OpenEphemeral                       40
    +#define OP_OpenPseudo                          41
    +#define OP_Close                               42
    +#define OP_SeekLt                              43
    +#define OP_SeekLe                              44
    +#define OP_SeekGe                              45
    +#define OP_SeekGt                              46
    +#define OP_Seek                                47
    +#define OP_NotFound                            48
    +#define OP_Found                               49
    +#define OP_IsUnique                            50
    +#define OP_NotExists                           51
    +#define OP_Sequence                            52
    +#define OP_NewRowid                            53
    +#define OP_Insert                              54
    +#define OP_InsertInt                           55
    +#define OP_Delete                              56
    +#define OP_ResetCount                          57
    +#define OP_RowKey                              58
    +#define OP_RowData                             59
    +#define OP_Rowid                               60
    +#define OP_NullRow                             61
    +#define OP_Last                                62
    +#define OP_Sort                                63
    +#define OP_Rewind                              64
    +#define OP_Prev                                65
    +#define OP_Next                                66
    +#define OP_IdxInsert                           67
    +#define OP_IdxDelete                           70
    +#define OP_IdxRowid                            71
    +#define OP_IdxLT                               72
    +#define OP_IdxGE                               81
    +#define OP_Destroy                             92
    +#define OP_Clear                               95
    +#define OP_CreateIndex                         96
    +#define OP_CreateTable                         97
    +#define OP_ParseSchema                         98
    +#define OP_LoadAnalysis                        99
    +#define OP_DropTable                          100
    +#define OP_DropIndex                          101
    +#define OP_DropTrigger                        102
    +#define OP_IntegrityCk                        103
    +#define OP_RowSetAdd                          104
    +#define OP_RowSetRead                         105
    +#define OP_RowSetTest                         106
    +#define OP_Program                            107
    +#define OP_Param                              108
    +#define OP_FkCounter                          109
    +#define OP_FkIfZero                           110
    +#define OP_MemMax                             111
    +#define OP_IfPos                              112
    +#define OP_IfNeg                              113
    +#define OP_IfZero                             114
    +#define OP_AggStep                            115
    +#define OP_AggFinal                           116
    +#define OP_Vacuum                             117
    +#define OP_IncrVacuum                         118
    +#define OP_Expire                             119
    +#define OP_TableLock                          120
    +#define OP_VBegin                             121
    +#define OP_VCreate                            122
    +#define OP_VDestroy                           123
    +#define OP_VOpen                              124
    +#define OP_VFilter                            125
    +#define OP_VColumn                            126
    +#define OP_VNext                              127
    +#define OP_VRename                            128
    +#define OP_VUpdate                            129
    +#define OP_Pagecount                          131
    +#define OP_Trace                              132
    +#define OP_Noop                               133
    +#define OP_Explain                            134
    +
    +/* The following opcode values are never used */
    +#define OP_NotUsed_135                        135
    +#define OP_NotUsed_136                        136
    +#define OP_NotUsed_137                        137
    +#define OP_NotUsed_138                        138
    +#define OP_NotUsed_139                        139
    +#define OP_NotUsed_140                        140
    +
    +
    +/* Properties such as "out2" or "jump" that are specified in
    +** comments following the "case" for each opcode in the vdbe.c
    +** are encoded into bitvectors as follows:
    +*/
    +#define OPFLG_JUMP            0x0001  /* jump:  P2 holds jmp target */
    +#define OPFLG_OUT2_PRERELEASE 0x0002  /* out2-prerelease: */
    +#define OPFLG_IN1             0x0004  /* in1:   P1 is an input */
    +#define OPFLG_IN2             0x0008  /* in2:   P2 is an input */
    +#define OPFLG_IN3             0x0010  /* in3:   P3 is an input */
    +#define OPFLG_OUT3            0x0020  /* out3:  P3 is an output */
    +#define OPFLG_INITIALIZER {\
    +/*   0 */ 0x00, 0x01, 0x01, 0x04, 0x04, 0x10, 0x00, 0x02,\
    +/*   8 */ 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x04, 0x04,\
    +/*  16 */ 0x00, 0x00, 0x00, 0x04, 0x04, 0x05, 0x04, 0x00,\
    +/*  24 */ 0x00, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\
    +/*  32 */ 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,\
    +/*  40 */ 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x08,\
    +/*  48 */ 0x11, 0x11, 0x11, 0x11, 0x02, 0x02, 0x00, 0x00,\
    +/*  56 */ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01,\
    +/*  64 */ 0x01, 0x01, 0x01, 0x08, 0x2c, 0x2c, 0x00, 0x02,\
    +/*  72 */ 0x11, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\
    +/*  80 */ 0x15, 0x11, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c,\
    +/*  88 */ 0x2c, 0x2c, 0x2c, 0x2c, 0x02, 0x04, 0x02, 0x00,\
    +/*  96 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
    +/* 104 */ 0x08, 0x21, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\
    +/* 112 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00,\
    +/* 120 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,\
    +/* 128 */ 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,\
    +/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04,\
    +/* 144 */ 0x04, 0x04,}
    +
    +/************** End of opcodes.h *********************************************/
    +/************** Continuing where we left off in vdbe.h ***********************/
    +
    +/*
    +** Prototypes for the VDBE interface.  See comments on the implementation
    +** for a description of what each of these routines does.
    +*/
    +SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*);
    +SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int);
    +SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int);
    +SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int);
    +SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);
    +SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
    +SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp);
    +SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
    +SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);
    +SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);
    +SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
    +SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
    +SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N);
    +SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
    +SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
    +SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
    +SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
    +SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*);
    +SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int,int,int);
    +SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*);
    +SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int);
    +SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*);
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE   int sqlite3VdbeAssertMayAbort(Vdbe *, int);
    +SQLITE_PRIVATE   void sqlite3VdbeTrace(Vdbe*,FILE*);
    +#endif
    +SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*);
    +SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*);
    +SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int);
    +SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
    +SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*);
    +SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
    +SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
    +SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*);
    +SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);
    +SQLITE_PRIVATE void sqlite3VdbeProgramDelete(sqlite3 *, SubProgram *, int);
    +SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe*, int, u8);
    +SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe*, int);
    +
    +SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,char*,int);
    +SQLITE_PRIVATE void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord*);
    +SQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);
    +
    +
    +#ifndef NDEBUG
    +SQLITE_PRIVATE   void sqlite3VdbeComment(Vdbe*, const char*, ...);
    +# define VdbeComment(X)  sqlite3VdbeComment X
    +SQLITE_PRIVATE   void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);
    +# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X
    +#else
    +# define VdbeComment(X)
    +# define VdbeNoopComment(X)
    +#endif
    +
    +#endif
    +
    +/************** End of vdbe.h ************************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include pager.h in the middle of sqliteInt.h *****************/
    +/************** Begin file pager.h *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the interface that the sqlite page cache
    +** subsystem.  The page cache subsystem reads and writes a file a page
    +** at a time and provides a journal for rollback.
    +**
    +** @(#) $Id: pager.h,v 1.104 2009/07/24 19:01:19 drh Exp $
    +*/
    +
    +#ifndef _PAGER_H_
    +#define _PAGER_H_
    +
    +/*
    +** Default maximum size for persistent journal files. A negative 
    +** value means no limit. This value may be overridden using the 
    +** sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit".
    +*/
    +#ifndef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT
    +  #define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1
    +#endif
    +
    +/*
    +** The type used to represent a page number.  The first page in a file
    +** is called page 1.  0 is used to represent "not a page".
    +*/
    +typedef u32 Pgno;
    +
    +/*
    +** Each open file is managed by a separate instance of the "Pager" structure.
    +*/
    +typedef struct Pager Pager;
    +
    +/*
    +** Handle type for pages.
    +*/
    +typedef struct PgHdr DbPage;
    +
    +/*
    +** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is
    +** reserved for working around a windows/posix incompatibility). It is
    +** used in the journal to signify that the remainder of the journal file 
    +** is devoted to storing a master journal name - there are no more pages to
    +** roll back. See comments for function writeMasterJournal() in pager.c 
    +** for details.
    +*/
    +#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))
    +
    +/*
    +** Allowed values for the flags parameter to sqlite3PagerOpen().
    +**
    +** NOTE: These values must match the corresponding BTREE_ values in btree.h.
    +*/
    +#define PAGER_OMIT_JOURNAL  0x0001    /* Do not use a rollback journal */
    +#define PAGER_NO_READLOCK   0x0002    /* Omit readlocks on readonly files */
    +
    +/*
    +** Valid values for the second argument to sqlite3PagerLockingMode().
    +*/
    +#define PAGER_LOCKINGMODE_QUERY      -1
    +#define PAGER_LOCKINGMODE_NORMAL      0
    +#define PAGER_LOCKINGMODE_EXCLUSIVE   1
    +
    +/*
    +** Valid values for the second argument to sqlite3PagerJournalMode().
    +*/
    +#define PAGER_JOURNALMODE_QUERY      -1
    +#define PAGER_JOURNALMODE_DELETE      0   /* Commit by deleting journal file */
    +#define PAGER_JOURNALMODE_PERSIST     1   /* Commit by zeroing journal header */
    +#define PAGER_JOURNALMODE_OFF         2   /* Journal omitted.  */
    +#define PAGER_JOURNALMODE_TRUNCATE    3   /* Commit by truncating journal */
    +#define PAGER_JOURNALMODE_MEMORY      4   /* In-memory journal file */
    +
    +/*
    +** The remainder of this file contains the declarations of the functions
    +** that make up the Pager sub-system API. See source code comments for 
    +** a detailed description of each routine.
    +*/
    +
    +/* Open and close a Pager connection. */ 
    +SQLITE_PRIVATE int sqlite3PagerOpen(
    +  sqlite3_vfs*,
    +  Pager **ppPager,
    +  const char*,
    +  int,
    +  int,
    +  int,
    +  void(*)(DbPage*)
    +);
    +SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager);
    +SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
    +
    +/* Functions used to configure a Pager object. */
    +SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);
    +SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u16*, int);
    +SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int);
    +SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int);
    +SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int);
    +SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int);
    +SQLITE_PRIVATE int sqlite3PagerJournalMode(Pager *, int);
    +SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64);
    +SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
    +
    +/* Functions used to obtain and release page references. */ 
    +SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
    +#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)
    +SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
    +SQLITE_PRIVATE void sqlite3PagerRef(DbPage*);
    +SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*);
    +
    +/* Operations on page references. */
    +SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*);
    +SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*);
    +SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);
    +SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*);
    +SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); 
    +SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); 
    +
    +/* Functions used to manage pager transactions and savepoints. */
    +SQLITE_PRIVATE int sqlite3PagerPagecount(Pager*, int*);
    +SQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int);
    +SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
    +SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager);
    +SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*);
    +SQLITE_PRIVATE int sqlite3PagerRollback(Pager*);
    +SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n);
    +SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);
    +SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager);
    +
    +/* Functions used to query pager state and configuration. */
    +SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*);
    +SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*);
    +SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*);
    +SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*);
    +SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);
    +SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
    +SQLITE_PRIVATE int sqlite3PagerNosync(Pager*);
    +SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
    +SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
    +
    +/* Functions used to truncate the database file. */
    +SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
    +
    +/* Functions to support testing and debugging. */
    +#if !defined(NDEBUG) || defined(SQLITE_TEST)
    +SQLITE_PRIVATE   Pgno sqlite3PagerPagenumber(DbPage*);
    +SQLITE_PRIVATE   int sqlite3PagerIswriteable(DbPage*);
    +#endif
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE   int *sqlite3PagerStats(Pager*);
    +SQLITE_PRIVATE   void sqlite3PagerRefdump(Pager*);
    +  void disable_simulated_io_errors(void);
    +  void enable_simulated_io_errors(void);
    +#else
    +# define disable_simulated_io_errors()
    +# define enable_simulated_io_errors()
    +#endif
    +
    +#endif /* _PAGER_H_ */
    +
    +/************** End of pager.h ***********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include pcache.h in the middle of sqliteInt.h ****************/
    +/************** Begin file pcache.h ******************************************/
    +/*
    +** 2008 August 05
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the interface that the sqlite page cache
    +** subsystem. 
    +**
    +** @(#) $Id: pcache.h,v 1.20 2009/07/25 11:46:49 danielk1977 Exp $
    +*/
    +
    +#ifndef _PCACHE_H_
    +
    +typedef struct PgHdr PgHdr;
    +typedef struct PCache PCache;
    +
    +/*
    +** Every page in the cache is controlled by an instance of the following
    +** structure.
    +*/
    +struct PgHdr {
    +  void *pData;                   /* Content of this page */
    +  void *pExtra;                  /* Extra content */
    +  PgHdr *pDirty;                 /* Transient list of dirty pages */
    +  Pgno pgno;                     /* Page number for this page */
    +  Pager *pPager;                 /* The pager this page is part of */
    +#ifdef SQLITE_CHECK_PAGES
    +  u32 pageHash;                  /* Hash of page content */
    +#endif
    +  u16 flags;                     /* PGHDR flags defined below */
    +
    +  /**********************************************************************
    +  ** Elements above are public.  All that follows is private to pcache.c
    +  ** and should not be accessed by other modules.
    +  */
    +  i16 nRef;                      /* Number of users of this page */
    +  PCache *pCache;                /* Cache that owns this page */
    +
    +  PgHdr *pDirtyNext;             /* Next element in list of dirty pages */
    +  PgHdr *pDirtyPrev;             /* Previous element in list of dirty pages */
    +};
    +
    +/* Bit values for PgHdr.flags */
    +#define PGHDR_DIRTY             0x002  /* Page has changed */
    +#define PGHDR_NEED_SYNC         0x004  /* Fsync the rollback journal before
    +                                       ** writing this page to the database */
    +#define PGHDR_NEED_READ         0x008  /* Content is unread */
    +#define PGHDR_REUSE_UNLIKELY    0x010  /* A hint that reuse is unlikely */
    +#define PGHDR_DONT_WRITE        0x020  /* Do not write content to disk */
    +
    +/* Initialize and shutdown the page cache subsystem */
    +SQLITE_PRIVATE int sqlite3PcacheInitialize(void);
    +SQLITE_PRIVATE void sqlite3PcacheShutdown(void);
    +
    +/* Page cache buffer management:
    +** These routines implement SQLITE_CONFIG_PAGECACHE.
    +*/
    +SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n);
    +
    +/* Create a new pager cache.
    +** Under memory stress, invoke xStress to try to make pages clean.
    +** Only clean and unpinned pages can be reclaimed.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheOpen(
    +  int szPage,                    /* Size of every page */
    +  int szExtra,                   /* Extra space associated with each page */
    +  int bPurgeable,                /* True if pages are on backing store */
    +  int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */
    +  void *pStress,                 /* Argument to xStress */
    +  PCache *pToInit                /* Preallocated space for the PCache */
    +);
    +
    +/* Modify the page-size after the cache has been created. */
    +SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *, int);
    +
    +/* Return the size in bytes of a PCache object.  Used to preallocate
    +** storage space.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheSize(void);
    +
    +/* One release per successful fetch.  Page is pinned until released.
    +** Reference counted. 
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**);
    +SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr*);
    +
    +SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*);         /* Remove page from cache */
    +SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*);    /* Make sure page is marked dirty */
    +SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*);    /* Mark a single page as clean */
    +SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*);    /* Mark all dirty list pages as clean */
    +
    +/* Change a page number.  Used by incr-vacuum. */
    +SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno);
    +
    +/* Remove all pages with pgno>x.  Reset the cache if x==0 */
    +SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x);
    +
    +/* Get a list of all dirty pages in the cache, sorted by page number */
    +SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache*);
    +
    +/* Reset and close the cache object */
    +SQLITE_PRIVATE void sqlite3PcacheClose(PCache*);
    +
    +/* Clear flags from pages of the page cache */
    +SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *);
    +
    +/* Discard the contents of the cache */
    +SQLITE_PRIVATE void sqlite3PcacheClear(PCache*);
    +
    +/* Return the total number of outstanding page references */
    +SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*);
    +
    +/* Increment the reference count of an existing page */
    +SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*);
    +
    +SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*);
    +
    +/* Return the total number of pages stored in the cache */
    +SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*);
    +
    +#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
    +/* Iterate through all dirty pages currently stored in the cache. This
    +** interface is only available if SQLITE_CHECK_PAGES is defined when the 
    +** library is built.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *));
    +#endif
    +
    +/* Set and get the suggested cache-size for the specified pager-cache.
    +**
    +** If no global maximum is configured, then the system attempts to limit
    +** the total number of pages cached by purgeable pager-caches to the sum
    +** of the suggested cache-sizes.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *, int);
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *);
    +#endif
    +
    +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
    +/* Try to return memory used by the pcache module to the main memory heap */
    +SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int);
    +#endif
    +
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*);
    +#endif
    +
    +SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
    +
    +#endif /* _PCACHE_H_ */
    +
    +/************** End of pcache.h **********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +
    +/************** Include os.h in the middle of sqliteInt.h ********************/
    +/************** Begin file os.h **********************************************/
    +/*
    +** 2001 September 16
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This header file (together with is companion C source-code file
    +** "os.c") attempt to abstract the underlying operating system so that
    +** the SQLite library will work on both POSIX and windows systems.
    +**
    +** This header file is #include-ed by sqliteInt.h and thus ends up
    +** being included by every source file.
    +**
    +** $Id: os.h,v 1.108 2009/02/05 16:31:46 drh Exp $
    +*/
    +#ifndef _SQLITE_OS_H_
    +#define _SQLITE_OS_H_
    +
    +/*
    +** Figure out if we are dealing with Unix, Windows, or some other
    +** operating system.  After the following block of preprocess macros,
    +** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
    +** will defined to either 1 or 0.  One of the four will be 1.  The other 
    +** three will be 0.
    +*/
    +#if defined(SQLITE_OS_OTHER)
    +# if SQLITE_OS_OTHER==1
    +#   undef SQLITE_OS_UNIX
    +#   define SQLITE_OS_UNIX 0
    +#   undef SQLITE_OS_WIN
    +#   define SQLITE_OS_WIN 0
    +#   undef SQLITE_OS_OS2
    +#   define SQLITE_OS_OS2 0
    +# else
    +#   undef SQLITE_OS_OTHER
    +# endif
    +#endif
    +#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
    +# define SQLITE_OS_OTHER 0
    +# ifndef SQLITE_OS_WIN
    +#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
    +#     define SQLITE_OS_WIN 1
    +#     define SQLITE_OS_UNIX 0
    +#     define SQLITE_OS_OS2 0
    +#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__)
    +#     define SQLITE_OS_WIN 0
    +#     define SQLITE_OS_UNIX 0
    +#     define SQLITE_OS_OS2 1
    +#   else
    +#     define SQLITE_OS_WIN 0
    +#     define SQLITE_OS_UNIX 1
    +#     define SQLITE_OS_OS2 0
    +#  endif
    +# else
    +#  define SQLITE_OS_UNIX 0
    +#  define SQLITE_OS_OS2 0
    +# endif
    +#else
    +# ifndef SQLITE_OS_WIN
    +#  define SQLITE_OS_WIN 0
    +# endif
    +#endif
    +
    +/*
    +** Determine if we are dealing with WindowsCE - which has a much
    +** reduced API.
    +*/
    +#if defined(_WIN32_WCE)
    +# define SQLITE_OS_WINCE 1
    +#else
    +# define SQLITE_OS_WINCE 0
    +#endif
    +
    +
    +/*
    +** Define the maximum size of a temporary filename
    +*/
    +#if SQLITE_OS_WIN
    +# include <windows.h>
    +# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
    +#elif SQLITE_OS_OS2
    +# if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY)
    +#  include <os2safe.h> /* has to be included before os2.h for linking to work */
    +# endif
    +# define INCL_DOSDATETIME
    +# define INCL_DOSFILEMGR
    +# define INCL_DOSERRORS
    +# define INCL_DOSMISC
    +# define INCL_DOSPROCESS
    +# define INCL_DOSMODULEMGR
    +# define INCL_DOSSEMAPHORES
    +# include <os2.h>
    +# include <uconv.h>
    +# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)
    +#else
    +# define SQLITE_TEMPNAME_SIZE 200
    +#endif
    +
    +/* If the SET_FULLSYNC macro is not defined above, then make it
    +** a no-op
    +*/
    +#ifndef SET_FULLSYNC
    +# define SET_FULLSYNC(x,y)
    +#endif
    +
    +/*
    +** The default size of a disk sector
    +*/
    +#ifndef SQLITE_DEFAULT_SECTOR_SIZE
    +# define SQLITE_DEFAULT_SECTOR_SIZE 512
    +#endif
    +
    +/*
    +** Temporary files are named starting with this prefix followed by 16 random
    +** alphanumeric characters, and no file extension. They are stored in the
    +** OS's standard temporary file directory, and are deleted prior to exit.
    +** If sqlite is being embedded in another program, you may wish to change the
    +** prefix to reflect your program's name, so that if your program exits
    +** prematurely, old temporary files can be easily identified. This can be done
    +** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line.
    +**
    +** 2006-10-31:  The default prefix used to be "sqlite_".  But then
    +** Mcafee started using SQLite in their anti-virus product and it
    +** started putting files with the "sqlite" name in the c:/temp folder.
    +** This annoyed many windows users.  Those users would then do a 
    +** Google search for "sqlite", find the telephone numbers of the
    +** developers and call to wake them up at night and complain.
    +** For this reason, the default name prefix is changed to be "sqlite" 
    +** spelled backwards.  So the temp files are still identified, but
    +** anybody smart enough to figure out the code is also likely smart
    +** enough to know that calling the developer will not help get rid
    +** of the file.
    +*/
    +#ifndef SQLITE_TEMP_FILE_PREFIX
    +# define SQLITE_TEMP_FILE_PREFIX "etilqs_"
    +#endif
    +
    +/*
    +** The following values may be passed as the second argument to
    +** sqlite3OsLock(). The various locks exhibit the following semantics:
    +**
    +** SHARED:    Any number of processes may hold a SHARED lock simultaneously.
    +** RESERVED:  A single process may hold a RESERVED lock on a file at
    +**            any time. Other processes may hold and obtain new SHARED locks.
    +** PENDING:   A single process may hold a PENDING lock on a file at
    +**            any one time. Existing SHARED locks may persist, but no new
    +**            SHARED locks may be obtained by other processes.
    +** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.
    +**
    +** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a
    +** process that requests an EXCLUSIVE lock may actually obtain a PENDING
    +** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to
    +** sqlite3OsLock().
    +*/
    +#define NO_LOCK         0
    +#define SHARED_LOCK     1
    +#define RESERVED_LOCK   2
    +#define PENDING_LOCK    3
    +#define EXCLUSIVE_LOCK  4
    +
    +/*
    +** File Locking Notes:  (Mostly about windows but also some info for Unix)
    +**
    +** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because
    +** those functions are not available.  So we use only LockFile() and
    +** UnlockFile().
    +**
    +** LockFile() prevents not just writing but also reading by other processes.
    +** A SHARED_LOCK is obtained by locking a single randomly-chosen 
    +** byte out of a specific range of bytes. The lock byte is obtained at 
    +** random so two separate readers can probably access the file at the 
    +** same time, unless they are unlucky and choose the same lock byte.
    +** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.
    +** There can only be one writer.  A RESERVED_LOCK is obtained by locking
    +** a single byte of the file that is designated as the reserved lock byte.
    +** A PENDING_LOCK is obtained by locking a designated byte different from
    +** the RESERVED_LOCK byte.
    +**
    +** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available,
    +** which means we can use reader/writer locks.  When reader/writer locks
    +** are used, the lock is placed on the same range of bytes that is used
    +** for probabilistic locking in Win95/98/ME.  Hence, the locking scheme
    +** will support two or more Win95 readers or two or more WinNT readers.
    +** But a single Win95 reader will lock out all WinNT readers and a single
    +** WinNT reader will lock out all other Win95 readers.
    +**
    +** The following #defines specify the range of bytes used for locking.
    +** SHARED_SIZE is the number of bytes available in the pool from which
    +** a random byte is selected for a shared lock.  The pool of bytes for
    +** shared locks begins at SHARED_FIRST. 
    +**
    +** The same locking strategy and
    +** byte ranges are used for Unix.  This leaves open the possiblity of having
    +** clients on win95, winNT, and unix all talking to the same shared file
    +** and all locking correctly.  To do so would require that samba (or whatever
    +** tool is being used for file sharing) implements locks correctly between
    +** windows and unix.  I'm guessing that isn't likely to happen, but by
    +** using the same locking range we are at least open to the possibility.
    +**
    +** Locking in windows is manditory.  For this reason, we cannot store
    +** actual data in the bytes used for locking.  The pager never allocates
    +** the pages involved in locking therefore.  SHARED_SIZE is selected so
    +** that all locks will fit on a single page even at the minimum page size.
    +** PENDING_BYTE defines the beginning of the locks.  By default PENDING_BYTE
    +** is set high so that we don't have to allocate an unused page except
    +** for very large databases.  But one should test the page skipping logic 
    +** by setting PENDING_BYTE low and running the entire regression suite.
    +**
    +** Changing the value of PENDING_BYTE results in a subtly incompatible
    +** file format.  Depending on how it is changed, you might not notice
    +** the incompatibility right away, even running a full regression test.
    +** The default location of PENDING_BYTE is the first byte past the
    +** 1GB boundary.
    +**
    +*/
    +#define PENDING_BYTE      sqlite3PendingByte
    +#define RESERVED_BYTE     (PENDING_BYTE+1)
    +#define SHARED_FIRST      (PENDING_BYTE+2)
    +#define SHARED_SIZE       510
    +
    +/*
    +** Wrapper around OS specific sqlite3_os_init() function.
    +*/
    +SQLITE_PRIVATE int sqlite3OsInit(void);
    +
    +/* 
    +** Functions for accessing sqlite3_file methods 
    +*/
    +SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*);
    +SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);
    +SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);
    +SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
    +SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);
    +SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);
    +SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);
    +SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);
    +SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);
    +SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);
    +#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0
    +SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
    +SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);
    +
    +/* 
    +** Functions for accessing sqlite3_vfs methods 
    +*/
    +SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
    +SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
    +SQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut);
    +SQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);
    +SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *);
    +SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void);
    +SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *);
    +#endif /* SQLITE_OMIT_LOAD_EXTENSION */
    +SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
    +SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int);
    +SQLITE_PRIVATE int sqlite3OsCurrentTime(sqlite3_vfs *, double*);
    +
    +/*
    +** Convenience functions for opening and closing files using 
    +** sqlite3_malloc() to obtain space for the file-handle structure.
    +*/
    +SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
    +SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
    +
    +#endif /* _SQLITE_OS_H_ */
    +
    +/************** End of os.h **************************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +/************** Include mutex.h in the middle of sqliteInt.h *****************/
    +/************** Begin file mutex.h *******************************************/
    +/*
    +** 2007 August 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains the common header for all mutex implementations.
    +** The sqliteInt.h header #includes this file so that it is available
    +** to all source files.  We break it out in an effort to keep the code
    +** better organized.
    +**
    +** NOTE:  source files should *not* #include this header file directly.
    +** Source files should #include the sqliteInt.h file and let that file
    +** include this one indirectly.
    +**
    +** $Id: mutex.h,v 1.9 2008/10/07 15:25:48 drh Exp $
    +*/
    +
    +
    +/*
    +** Figure out what version of the code to use.  The choices are
    +**
    +**   SQLITE_MUTEX_OMIT         No mutex logic.  Not even stubs.  The
    +**                             mutexes implemention cannot be overridden
    +**                             at start-time.
    +**
    +**   SQLITE_MUTEX_NOOP         For single-threaded applications.  No
    +**                             mutual exclusion is provided.  But this
    +**                             implementation can be overridden at
    +**                             start-time.
    +**
    +**   SQLITE_MUTEX_PTHREADS     For multi-threaded applications on Unix.
    +**
    +**   SQLITE_MUTEX_W32          For multi-threaded applications on Win32.
    +**
    +**   SQLITE_MUTEX_OS2          For multi-threaded applications on OS/2.
    +*/
    +#if !SQLITE_THREADSAFE
    +# define SQLITE_MUTEX_OMIT
    +#endif
    +#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP)
    +#  if SQLITE_OS_UNIX
    +#    define SQLITE_MUTEX_PTHREADS
    +#  elif SQLITE_OS_WIN
    +#    define SQLITE_MUTEX_W32
    +#  elif SQLITE_OS_OS2
    +#    define SQLITE_MUTEX_OS2
    +#  else
    +#    define SQLITE_MUTEX_NOOP
    +#  endif
    +#endif
    +
    +#ifdef SQLITE_MUTEX_OMIT
    +/*
    +** If this is a no-op implementation, implement everything as macros.
    +*/
    +#define sqlite3_mutex_alloc(X)    ((sqlite3_mutex*)8)
    +#define sqlite3_mutex_free(X)
    +#define sqlite3_mutex_enter(X)
    +#define sqlite3_mutex_try(X)      SQLITE_OK
    +#define sqlite3_mutex_leave(X)
    +#define sqlite3_mutex_held(X)     1
    +#define sqlite3_mutex_notheld(X)  1
    +#define sqlite3MutexAlloc(X)      ((sqlite3_mutex*)8)
    +#define sqlite3MutexInit()        SQLITE_OK
    +#define sqlite3MutexEnd()
    +#endif /* defined(SQLITE_MUTEX_OMIT) */
    +
    +/************** End of mutex.h ***********************************************/
    +/************** Continuing where we left off in sqliteInt.h ******************/
    +
    +
    +/*
    +** Each database file to be accessed by the system is an instance
    +** of the following structure.  There are normally two of these structures
    +** in the sqlite.aDb[] array.  aDb[0] is the main database file and
    +** aDb[1] is the database file used to hold temporary tables.  Additional
    +** databases may be attached.
    +*/
    +struct Db {
    +  char *zName;         /* Name of this database */
    +  Btree *pBt;          /* The B*Tree structure for this database file */
    +  u8 inTrans;          /* 0: not writable.  1: Transaction.  2: Checkpoint */
    +  u8 safety_level;     /* How aggressive at syncing data to disk */
    +  Schema *pSchema;     /* Pointer to database schema (possibly shared) */
    +};
    +
    +/*
    +** An instance of the following structure stores a database schema.
    +**
    +** If there are no virtual tables configured in this schema, the
    +** Schema.db variable is set to NULL. After the first virtual table
    +** has been added, it is set to point to the database connection 
    +** used to create the connection. Once a virtual table has been
    +** added to the Schema structure and the Schema.db variable populated, 
    +** only that database connection may use the Schema to prepare 
    +** statements.
    +*/
    +struct Schema {
    +  int schema_cookie;   /* Database schema version number for this file */
    +  Hash tblHash;        /* All tables indexed by name */
    +  Hash idxHash;        /* All (named) indices indexed by name */
    +  Hash trigHash;       /* All triggers indexed by name */
    +  Hash fkeyHash;       /* All foreign keys by referenced table name */
    +  Table *pSeqTab;      /* The sqlite_sequence table used by AUTOINCREMENT */
    +  u8 file_format;      /* Schema format version for this file */
    +  u8 enc;              /* Text encoding used by this database */
    +  u16 flags;           /* Flags associated with this schema */
    +  int cache_size;      /* Number of pages to use in the cache */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  sqlite3 *db;         /* "Owner" connection. See comment above */
    +#endif
    +};
    +
    +/*
    +** These macros can be used to test, set, or clear bits in the 
    +** Db.flags field.
    +*/
    +#define DbHasProperty(D,I,P)     (((D)->aDb[I].pSchema->flags&(P))==(P))
    +#define DbHasAnyProperty(D,I,P)  (((D)->aDb[I].pSchema->flags&(P))!=0)
    +#define DbSetProperty(D,I,P)     (D)->aDb[I].pSchema->flags|=(P)
    +#define DbClearProperty(D,I,P)   (D)->aDb[I].pSchema->flags&=~(P)
    +
    +/*
    +** Allowed values for the DB.flags field.
    +**
    +** The DB_SchemaLoaded flag is set after the database schema has been
    +** read into internal hash tables.
    +**
    +** DB_UnresetViews means that one or more views have column names that
    +** have been filled out.  If the schema changes, these column names might
    +** changes and so the view will need to be reset.
    +*/
    +#define DB_SchemaLoaded    0x0001  /* The schema has been loaded */
    +#define DB_UnresetViews    0x0002  /* Some views have defined column names */
    +#define DB_Empty           0x0004  /* The file is empty (length 0 bytes) */
    +
    +/*
    +** The number of different kinds of things that can be limited
    +** using the sqlite3_limit() interface.
    +*/
    +#define SQLITE_N_LIMIT (SQLITE_LIMIT_TRIGGER_DEPTH+1)
    +
    +/*
    +** Lookaside malloc is a set of fixed-size buffers that can be used
    +** to satisfy small transient memory allocation requests for objects
    +** associated with a particular database connection.  The use of
    +** lookaside malloc provides a significant performance enhancement
    +** (approx 10%) by avoiding numerous malloc/free requests while parsing
    +** SQL statements.
    +**
    +** The Lookaside structure holds configuration information about the
    +** lookaside malloc subsystem.  Each available memory allocation in
    +** the lookaside subsystem is stored on a linked list of LookasideSlot
    +** objects.
    +**
    +** Lookaside allocations are only allowed for objects that are associated
    +** with a particular database connection.  Hence, schema information cannot
    +** be stored in lookaside because in shared cache mode the schema information
    +** is shared by multiple database connections.  Therefore, while parsing
    +** schema information, the Lookaside.bEnabled flag is cleared so that
    +** lookaside allocations are not used to construct the schema objects.
    +*/
    +struct Lookaside {
    +  u16 sz;                 /* Size of each buffer in bytes */
    +  u8 bEnabled;            /* False to disable new lookaside allocations */
    +  u8 bMalloced;           /* True if pStart obtained from sqlite3_malloc() */
    +  int nOut;               /* Number of buffers currently checked out */
    +  int mxOut;              /* Highwater mark for nOut */
    +  LookasideSlot *pFree;   /* List of available buffers */
    +  void *pStart;           /* First byte of available memory space */
    +  void *pEnd;             /* First byte past end of available space */
    +};
    +struct LookasideSlot {
    +  LookasideSlot *pNext;    /* Next buffer in the list of free buffers */
    +};
    +
    +/*
    +** A hash table for function definitions.
    +**
    +** Hash each FuncDef structure into one of the FuncDefHash.a[] slots.
    +** Collisions are on the FuncDef.pHash chain.
    +*/
    +struct FuncDefHash {
    +  FuncDef *a[23];       /* Hash table for functions */
    +};
    +
    +/*
    +** Each database is an instance of the following structure.
    +**
    +** The sqlite.lastRowid records the last insert rowid generated by an
    +** insert statement.  Inserts on views do not affect its value.  Each
    +** trigger has its own context, so that lastRowid can be updated inside
    +** triggers as usual.  The previous value will be restored once the trigger
    +** exits.  Upon entering a before or instead of trigger, lastRowid is no
    +** longer (since after version 2.8.12) reset to -1.
    +**
    +** The sqlite.nChange does not count changes within triggers and keeps no
    +** context.  It is reset at start of sqlite3_exec.
    +** The sqlite.lsChange represents the number of changes made by the last
    +** insert, update, or delete statement.  It remains constant throughout the
    +** length of a statement and is then updated by OP_SetCounts.  It keeps a
    +** context stack just like lastRowid so that the count of changes
    +** within a trigger is not seen outside the trigger.  Changes to views do not
    +** affect the value of lsChange.
    +** The sqlite.csChange keeps track of the number of current changes (since
    +** the last statement) and is used to update sqlite_lsChange.
    +**
    +** The member variables sqlite.errCode, sqlite.zErrMsg and sqlite.zErrMsg16
    +** store the most recent error code and, if applicable, string. The
    +** internal function sqlite3Error() is used to set these variables
    +** consistently.
    +*/
    +struct sqlite3 {
    +  sqlite3_vfs *pVfs;            /* OS Interface */
    +  int nDb;                      /* Number of backends currently in use */
    +  Db *aDb;                      /* All backends */
    +  int flags;                    /* Miscellaneous flags. See below */
    +  int openFlags;                /* Flags passed to sqlite3_vfs.xOpen() */
    +  int errCode;                  /* Most recent error code (SQLITE_*) */
    +  int errMask;                  /* & result codes with this before returning */
    +  u8 autoCommit;                /* The auto-commit flag. */
    +  u8 temp_store;                /* 1: file 2: memory 0: default */
    +  u8 mallocFailed;              /* True if we have seen a malloc failure */
    +  u8 dfltLockMode;              /* Default locking-mode for attached dbs */
    +  u8 dfltJournalMode;           /* Default journal mode for attached dbs */
    +  signed char nextAutovac;      /* Autovac setting after VACUUM if >=0 */
    +  int nextPagesize;             /* Pagesize after VACUUM if >0 */
    +  int nTable;                   /* Number of tables in the database */
    +  CollSeq *pDfltColl;           /* The default collating sequence (BINARY) */
    +  i64 lastRowid;                /* ROWID of most recent insert (see above) */
    +  u32 magic;                    /* Magic number for detect library misuse */
    +  int nChange;                  /* Value returned by sqlite3_changes() */
    +  int nTotalChange;             /* Value returned by sqlite3_total_changes() */
    +  sqlite3_mutex *mutex;         /* Connection mutex */
    +  int aLimit[SQLITE_N_LIMIT];   /* Limits */
    +  struct sqlite3InitInfo {      /* Information used during initialization */
    +    int iDb;                    /* When back is being initialized */
    +    int newTnum;                /* Rootpage of table being initialized */
    +    u8 busy;                    /* TRUE if currently initializing */
    +    u8 orphanTrigger;           /* Last statement is orphaned TEMP trigger */
    +  } init;
    +  int nExtension;               /* Number of loaded extensions */
    +  void **aExtension;            /* Array of shared library handles */
    +  struct Vdbe *pVdbe;           /* List of active virtual machines */
    +  int activeVdbeCnt;            /* Number of VDBEs currently executing */
    +  int writeVdbeCnt;             /* Number of active VDBEs that are writing */
    +  void (*xTrace)(void*,const char*);        /* Trace function */
    +  void *pTraceArg;                          /* Argument to the trace function */
    +  void (*xProfile)(void*,const char*,u64);  /* Profiling function */
    +  void *pProfileArg;                        /* Argument to profile function */
    +  void *pCommitArg;                 /* Argument to xCommitCallback() */   
    +  int (*xCommitCallback)(void*);    /* Invoked at every commit. */
    +  void *pRollbackArg;               /* Argument to xRollbackCallback() */   
    +  void (*xRollbackCallback)(void*); /* Invoked at every commit. */
    +  void *pUpdateArg;
    +  void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64);
    +  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
    +  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
    +  void *pCollNeededArg;
    +  sqlite3_value *pErr;          /* Most recent error message */
    +  char *zErrMsg;                /* Most recent error message (UTF-8 encoded) */
    +  char *zErrMsg16;              /* Most recent error message (UTF-16 encoded) */
    +  union {
    +    volatile int isInterrupted; /* True if sqlite3_interrupt has been called */
    +    double notUsed1;            /* Spacer */
    +  } u1;
    +  Lookaside lookaside;          /* Lookaside malloc configuration */
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
    +                                /* Access authorization function */
    +  void *pAuthArg;               /* 1st argument to the access auth function */
    +#endif
    +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
    +  int (*xProgress)(void *);     /* The progress callback */
    +  void *pProgressArg;           /* Argument to the progress callback */
    +  int nProgressOps;             /* Number of opcodes for progress callback */
    +#endif
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  Hash aModule;                 /* populated by sqlite3_create_module() */
    +  Table *pVTab;                 /* vtab with active Connect/Create method */
    +  VTable **aVTrans;             /* Virtual tables with open transactions */
    +  int nVTrans;                  /* Allocated size of aVTrans */
    +  VTable *pDisconnect;    /* Disconnect these in next sqlite3_prepare() */
    +#endif
    +  FuncDefHash aFunc;            /* Hash table of connection functions */
    +  Hash aCollSeq;                /* All collating sequences */
    +  BusyHandler busyHandler;      /* Busy callback */
    +  int busyTimeout;              /* Busy handler timeout, in msec */
    +  Db aDbStatic[2];              /* Static space for the 2 default backends */
    +  Savepoint *pSavepoint;        /* List of active savepoints */
    +  int nSavepoint;               /* Number of non-transaction savepoints */
    +  int nStatement;               /* Number of nested statement-transactions  */
    +  u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */
    +  i64 nDeferredCons;            /* Net deferred constraints this transaction. */
    +
    +#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
    +  /* The following variables are all protected by the STATIC_MASTER 
    +  ** mutex, not by sqlite3.mutex. They are used by code in notify.c. 
    +  **
    +  ** When X.pUnlockConnection==Y, that means that X is waiting for Y to
    +  ** unlock so that it can proceed.
    +  **
    +  ** When X.pBlockingConnection==Y, that means that something that X tried
    +  ** tried to do recently failed with an SQLITE_LOCKED error due to locks
    +  ** held by Y.
    +  */
    +  sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */
    +  sqlite3 *pUnlockConnection;           /* Connection to watch for unlock */
    +  void *pUnlockArg;                     /* Argument to xUnlockNotify */
    +  void (*xUnlockNotify)(void **, int);  /* Unlock notify callback */
    +  sqlite3 *pNextBlocked;        /* Next in list of all blocked connections */
    +#endif
    +};
    +
    +/*
    +** A macro to discover the encoding of a database.
    +*/
    +#define ENC(db) ((db)->aDb[0].pSchema->enc)
    +
    +/*
    +** Possible values for the sqlite.flags and or Db.flags fields.
    +**
    +** On sqlite.flags, the SQLITE_InTrans value means that we have
    +** executed a BEGIN.  On Db.flags, SQLITE_InTrans means a statement
    +** transaction is active on that particular database file.
    +*/
    +#define SQLITE_VdbeTrace      0x00000001  /* True to trace VDBE execution */
    +#define SQLITE_InTrans        0x00000008  /* True if in a transaction */
    +#define SQLITE_InternChanges  0x00000010  /* Uncommitted Hash table changes */
    +#define SQLITE_FullColNames   0x00000020  /* Show full column names on SELECT */
    +#define SQLITE_ShortColNames  0x00000040  /* Show short columns names */
    +#define SQLITE_CountRows      0x00000080  /* Count rows changed by INSERT, */
    +                                          /*   DELETE, or UPDATE and return */
    +                                          /*   the count using a callback. */
    +#define SQLITE_NullCallback   0x00000100  /* Invoke the callback once if the */
    +                                          /*   result set is empty */
    +#define SQLITE_SqlTrace       0x00000200  /* Debug print SQL as it executes */
    +#define SQLITE_VdbeListing    0x00000400  /* Debug listings of VDBE programs */
    +#define SQLITE_WriteSchema    0x00000800  /* OK to update SQLITE_MASTER */
    +#define SQLITE_NoReadlock     0x00001000  /* Readlocks are omitted when 
    +                                          ** accessing read-only databases */
    +#define SQLITE_IgnoreChecks   0x00002000  /* Do not enforce check constraints */
    +#define SQLITE_ReadUncommitted 0x00004000 /* For shared-cache mode */
    +#define SQLITE_LegacyFileFmt  0x00008000  /* Create new databases in format 1 */
    +#define SQLITE_FullFSync      0x00010000  /* Use full fsync on the backend */
    +#define SQLITE_LoadExtension  0x00020000  /* Enable load_extension */
    +
    +#define SQLITE_RecoveryMode   0x00040000  /* Ignore schema errors */
    +#define SQLITE_ReverseOrder   0x00100000  /* Reverse unordered SELECTs */
    +#define SQLITE_RecTriggers    0x00200000  /* Enable recursive triggers */
    +#define SQLITE_ForeignKeys    0x00400000  /* Enforce foreign key constraints  */
    +
    +/*
    +** Possible values for the sqlite.magic field.
    +** The numbers are obtained at random and have no special meaning, other
    +** than being distinct from one another.
    +*/
    +#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */
    +#define SQLITE_MAGIC_CLOSED   0x9f3c2d33  /* Database is closed */
    +#define SQLITE_MAGIC_SICK     0x4b771290  /* Error and awaiting close */
    +#define SQLITE_MAGIC_BUSY     0xf03b7906  /* Database currently in use */
    +#define SQLITE_MAGIC_ERROR    0xb5357930  /* An SQLITE_MISUSE error occurred */
    +
    +/*
    +** Each SQL function is defined by an instance of the following
    +** structure.  A pointer to this structure is stored in the sqlite.aFunc
    +** hash table.  When multiple functions have the same name, the hash table
    +** points to a linked list of these structures.
    +*/
    +struct FuncDef {
    +  i16 nArg;            /* Number of arguments.  -1 means unlimited */
    +  u8 iPrefEnc;         /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */
    +  u8 flags;            /* Some combination of SQLITE_FUNC_* */
    +  void *pUserData;     /* User data parameter */
    +  FuncDef *pNext;      /* Next function with same name */
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */
    +  void (*xFinalize)(sqlite3_context*);                /* Aggregate finalizer */
    +  char *zName;         /* SQL name of the function. */
    +  FuncDef *pHash;      /* Next with a different name but the same hash */
    +};
    +
    +/*
    +** Possible values for FuncDef.flags
    +*/
    +#define SQLITE_FUNC_LIKE     0x01 /* Candidate for the LIKE optimization */
    +#define SQLITE_FUNC_CASE     0x02 /* Case-sensitive LIKE-type function */
    +#define SQLITE_FUNC_EPHEM    0x04 /* Ephemeral.  Delete with VDBE */
    +#define SQLITE_FUNC_NEEDCOLL 0x08 /* sqlite3GetFuncCollSeq() might be called */
    +#define SQLITE_FUNC_PRIVATE  0x10 /* Allowed for internal use only */
    +#define SQLITE_FUNC_COUNT    0x20 /* Built-in count(*) aggregate */
    +
    +/*
    +** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
    +** used to create the initializers for the FuncDef structures.
    +**
    +**   FUNCTION(zName, nArg, iArg, bNC, xFunc)
    +**     Used to create a scalar function definition of a function zName 
    +**     implemented by C function xFunc that accepts nArg arguments. The
    +**     value passed as iArg is cast to a (void*) and made available
    +**     as the user-data (sqlite3_user_data()) for the function. If 
    +**     argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set.
    +**
    +**   AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
    +**     Used to create an aggregate function definition implemented by
    +**     the C functions xStep and xFinal. The first four parameters
    +**     are interpreted in the same way as the first 4 parameters to
    +**     FUNCTION().
    +**
    +**   LIKEFUNC(zName, nArg, pArg, flags)
    +**     Used to create a scalar function definition of a function zName 
    +**     that accepts nArg arguments and is implemented by a call to C 
    +**     function likeFunc. Argument pArg is cast to a (void *) and made
    +**     available as the function user-data (sqlite3_user_data()). The
    +**     FuncDef.flags variable is set to the value passed as the flags
    +**     parameter.
    +*/
    +#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
    +  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
    +   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0}
    +#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
    +  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
    +   pArg, 0, xFunc, 0, 0, #zName, 0}
    +#define LIKEFUNC(zName, nArg, arg, flags) \
    +  {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0}
    +#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
    +  {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \
    +   SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0}
    +
    +/*
    +** All current savepoints are stored in a linked list starting at
    +** sqlite3.pSavepoint. The first element in the list is the most recently
    +** opened savepoint. Savepoints are added to the list by the vdbe
    +** OP_Savepoint instruction.
    +*/
    +struct Savepoint {
    +  char *zName;                        /* Savepoint name (nul-terminated) */
    +  i64 nDeferredCons;                  /* Number of deferred fk violations */
    +  Savepoint *pNext;                   /* Parent savepoint (if any) */
    +};
    +
    +/*
    +** The following are used as the second parameter to sqlite3Savepoint(),
    +** and as the P1 argument to the OP_Savepoint instruction.
    +*/
    +#define SAVEPOINT_BEGIN      0
    +#define SAVEPOINT_RELEASE    1
    +#define SAVEPOINT_ROLLBACK   2
    +
    +
    +/*
    +** Each SQLite module (virtual table definition) is defined by an
    +** instance of the following structure, stored in the sqlite3.aModule
    +** hash table.
    +*/
    +struct Module {
    +  const sqlite3_module *pModule;       /* Callback pointers */
    +  const char *zName;                   /* Name passed to create_module() */
    +  void *pAux;                          /* pAux passed to create_module() */
    +  void (*xDestroy)(void *);            /* Module destructor function */
    +};
    +
    +/*
    +** information about each column of an SQL table is held in an instance
    +** of this structure.
    +*/
    +struct Column {
    +  char *zName;     /* Name of this column */
    +  Expr *pDflt;     /* Default value of this column */
    +  char *zDflt;     /* Original text of the default value */
    +  char *zType;     /* Data type for this column */
    +  char *zColl;     /* Collating sequence.  If NULL, use the default */
    +  u8 notNull;      /* True if there is a NOT NULL constraint */
    +  u8 isPrimKey;    /* True if this column is part of the PRIMARY KEY */
    +  char affinity;   /* One of the SQLITE_AFF_... values */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  u8 isHidden;     /* True if this column is 'hidden' */
    +#endif
    +};
    +
    +/*
    +** A "Collating Sequence" is defined by an instance of the following
    +** structure. Conceptually, a collating sequence consists of a name and
    +** a comparison routine that defines the order of that sequence.
    +**
    +** There may two separate implementations of the collation function, one
    +** that processes text in UTF-8 encoding (CollSeq.xCmp) and another that
    +** processes text encoded in UTF-16 (CollSeq.xCmp16), using the machine
    +** native byte order. When a collation sequence is invoked, SQLite selects
    +** the version that will require the least expensive encoding
    +** translations, if any.
    +**
    +** The CollSeq.pUser member variable is an extra parameter that passed in
    +** as the first argument to the UTF-8 comparison function, xCmp.
    +** CollSeq.pUser16 is the equivalent for the UTF-16 comparison function,
    +** xCmp16.
    +**
    +** If both CollSeq.xCmp and CollSeq.xCmp16 are NULL, it means that the
    +** collating sequence is undefined.  Indices built on an undefined
    +** collating sequence may not be read or written.
    +*/
    +struct CollSeq {
    +  char *zName;          /* Name of the collating sequence, UTF-8 encoded */
    +  u8 enc;               /* Text encoding handled by xCmp() */
    +  u8 type;              /* One of the SQLITE_COLL_... values below */
    +  void *pUser;          /* First argument to xCmp() */
    +  int (*xCmp)(void*,int, const void*, int, const void*);
    +  void (*xDel)(void*);  /* Destructor for pUser */
    +};
    +
    +/*
    +** Allowed values of CollSeq.type:
    +*/
    +#define SQLITE_COLL_BINARY  1  /* The default memcmp() collating sequence */
    +#define SQLITE_COLL_NOCASE  2  /* The built-in NOCASE collating sequence */
    +#define SQLITE_COLL_REVERSE 3  /* The built-in REVERSE collating sequence */
    +#define SQLITE_COLL_USER    0  /* Any other user-defined collating sequence */
    +
    +/*
    +** A sort order can be either ASC or DESC.
    +*/
    +#define SQLITE_SO_ASC       0  /* Sort in ascending order */
    +#define SQLITE_SO_DESC      1  /* Sort in ascending order */
    +
    +/*
    +** Column affinity types.
    +**
    +** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and
    +** 't' for SQLITE_AFF_TEXT.  But we can save a little space and improve
    +** the speed a little by numbering the values consecutively.  
    +**
    +** But rather than start with 0 or 1, we begin with 'a'.  That way,
    +** when multiple affinity types are concatenated into a string and
    +** used as the P4 operand, they will be more readable.
    +**
    +** Note also that the numeric types are grouped together so that testing
    +** for a numeric type is a single comparison.
    +*/
    +#define SQLITE_AFF_TEXT     'a'
    +#define SQLITE_AFF_NONE     'b'
    +#define SQLITE_AFF_NUMERIC  'c'
    +#define SQLITE_AFF_INTEGER  'd'
    +#define SQLITE_AFF_REAL     'e'
    +
    +#define sqlite3IsNumericAffinity(X)  ((X)>=SQLITE_AFF_NUMERIC)
    +
    +/*
    +** The SQLITE_AFF_MASK values masks off the significant bits of an
    +** affinity value. 
    +*/
    +#define SQLITE_AFF_MASK     0x67
    +
    +/*
    +** Additional bit values that can be ORed with an affinity without
    +** changing the affinity.
    +*/
    +#define SQLITE_JUMPIFNULL   0x08  /* jumps if either operand is NULL */
    +#define SQLITE_STOREP2      0x10  /* Store result in reg[P2] rather than jump */
    +#define SQLITE_NULLEQ       0x80  /* NULL=NULL */
    +
    +/*
    +** An object of this type is created for each virtual table present in
    +** the database schema. 
    +**
    +** If the database schema is shared, then there is one instance of this
    +** structure for each database connection (sqlite3*) that uses the shared
    +** schema. This is because each database connection requires its own unique
    +** instance of the sqlite3_vtab* handle used to access the virtual table 
    +** implementation. sqlite3_vtab* handles can not be shared between 
    +** database connections, even when the rest of the in-memory database 
    +** schema is shared, as the implementation often stores the database
    +** connection handle passed to it via the xConnect() or xCreate() method
    +** during initialization internally. This database connection handle may
    +** then used by the virtual table implementation to access real tables 
    +** within the database. So that they appear as part of the callers 
    +** transaction, these accesses need to be made via the same database 
    +** connection as that used to execute SQL operations on the virtual table.
    +**
    +** All VTable objects that correspond to a single table in a shared
    +** database schema are initially stored in a linked-list pointed to by
    +** the Table.pVTable member variable of the corresponding Table object.
    +** When an sqlite3_prepare() operation is required to access the virtual
    +** table, it searches the list for the VTable that corresponds to the
    +** database connection doing the preparing so as to use the correct
    +** sqlite3_vtab* handle in the compiled query.
    +**
    +** When an in-memory Table object is deleted (for example when the
    +** schema is being reloaded for some reason), the VTable objects are not 
    +** deleted and the sqlite3_vtab* handles are not xDisconnect()ed 
    +** immediately. Instead, they are moved from the Table.pVTable list to
    +** another linked list headed by the sqlite3.pDisconnect member of the
    +** corresponding sqlite3 structure. They are then deleted/xDisconnected 
    +** next time a statement is prepared using said sqlite3*. This is done
    +** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
    +** Refer to comments above function sqlite3VtabUnlockList() for an
    +** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
    +** list without holding the corresponding sqlite3.mutex mutex.
    +**
    +** The memory for objects of this type is always allocated by 
    +** sqlite3DbMalloc(), using the connection handle stored in VTable.db as 
    +** the first argument.
    +*/
    +struct VTable {
    +  sqlite3 *db;              /* Database connection associated with this table */
    +  Module *pMod;             /* Pointer to module implementation */
    +  sqlite3_vtab *pVtab;      /* Pointer to vtab instance */
    +  int nRef;                 /* Number of pointers to this structure */
    +  VTable *pNext;            /* Next in linked list (see above) */
    +};
    +
    +/*
    +** Each SQL table is represented in memory by an instance of the
    +** following structure.
    +**
    +** Table.zName is the name of the table.  The case of the original
    +** CREATE TABLE statement is stored, but case is not significant for
    +** comparisons.
    +**
    +** Table.nCol is the number of columns in this table.  Table.aCol is a
    +** pointer to an array of Column structures, one for each column.
    +**
    +** If the table has an INTEGER PRIMARY KEY, then Table.iPKey is the index of
    +** the column that is that key.   Otherwise Table.iPKey is negative.  Note
    +** that the datatype of the PRIMARY KEY must be INTEGER for this field to
    +** be set.  An INTEGER PRIMARY KEY is used as the rowid for each row of
    +** the table.  If a table has no INTEGER PRIMARY KEY, then a random rowid
    +** is generated for each row of the table.  TF_HasPrimaryKey is set if
    +** the table has any PRIMARY KEY, INTEGER or otherwise.
    +**
    +** Table.tnum is the page number for the root BTree page of the table in the
    +** database file.  If Table.iDb is the index of the database table backend
    +** in sqlite.aDb[].  0 is for the main database and 1 is for the file that
    +** holds temporary tables and indices.  If TF_Ephemeral is set
    +** then the table is stored in a file that is automatically deleted
    +** when the VDBE cursor to the table is closed.  In this case Table.tnum 
    +** refers VDBE cursor number that holds the table open, not to the root
    +** page number.  Transient tables are used to hold the results of a
    +** sub-query that appears instead of a real table name in the FROM clause 
    +** of a SELECT statement.
    +*/
    +struct Table {
    +  sqlite3 *dbMem;      /* DB connection used for lookaside allocations. */
    +  char *zName;         /* Name of the table or view */
    +  int iPKey;           /* If not negative, use aCol[iPKey] as the primary key */
    +  int nCol;            /* Number of columns in this table */
    +  Column *aCol;        /* Information about each column */
    +  Index *pIndex;       /* List of SQL indexes on this table. */
    +  int tnum;            /* Root BTree node for this table (see note above) */
    +  Select *pSelect;     /* NULL for tables.  Points to definition if a view. */
    +  u16 nRef;            /* Number of pointers to this Table */
    +  u8 tabFlags;         /* Mask of TF_* values */
    +  u8 keyConf;          /* What to do in case of uniqueness conflict on iPKey */
    +  FKey *pFKey;         /* Linked list of all foreign keys in this table */
    +  char *zColAff;       /* String defining the affinity of each column */
    +#ifndef SQLITE_OMIT_CHECK
    +  Expr *pCheck;        /* The AND of all CHECK constraints */
    +#endif
    +#ifndef SQLITE_OMIT_ALTERTABLE
    +  int addColOffset;    /* Offset in CREATE TABLE stmt to add a new column */
    +#endif
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  VTable *pVTable;     /* List of VTable objects. */
    +  int nModuleArg;      /* Number of arguments to the module */
    +  char **azModuleArg;  /* Text of all module args. [0] is module name */
    +#endif
    +  Trigger *pTrigger;   /* List of triggers stored in pSchema */
    +  Schema *pSchema;     /* Schema that contains this table */
    +  Table *pNextZombie;  /* Next on the Parse.pZombieTab list */
    +};
    +
    +/*
    +** Allowed values for Tabe.tabFlags.
    +*/
    +#define TF_Readonly        0x01    /* Read-only system table */
    +#define TF_Ephemeral       0x02    /* An ephemeral table */
    +#define TF_HasPrimaryKey   0x04    /* Table has a primary key */
    +#define TF_Autoincrement   0x08    /* Integer primary key is autoincrement */
    +#define TF_Virtual         0x10    /* Is a virtual table */
    +#define TF_NeedMetadata    0x20    /* aCol[].zType and aCol[].pColl missing */
    +
    +
    +
    +/*
    +** Test to see whether or not a table is a virtual table.  This is
    +** done as a macro so that it will be optimized out when virtual
    +** table support is omitted from the build.
    +*/
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +#  define IsVirtual(X)      (((X)->tabFlags & TF_Virtual)!=0)
    +#  define IsHiddenColumn(X) ((X)->isHidden)
    +#else
    +#  define IsVirtual(X)      0
    +#  define IsHiddenColumn(X) 0
    +#endif
    +
    +/*
    +** Each foreign key constraint is an instance of the following structure.
    +**
    +** A foreign key is associated with two tables.  The "from" table is
    +** the table that contains the REFERENCES clause that creates the foreign
    +** key.  The "to" table is the table that is named in the REFERENCES clause.
    +** Consider this example:
    +**
    +**     CREATE TABLE ex1(
    +**       a INTEGER PRIMARY KEY,
    +**       b INTEGER CONSTRAINT fk1 REFERENCES ex2(x)
    +**     );
    +**
    +** For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2".
    +**
    +** Each REFERENCES clause generates an instance of the following structure
    +** which is attached to the from-table.  The to-table need not exist when
    +** the from-table is created.  The existence of the to-table is not checked.
    +*/
    +struct FKey {
    +  Table *pFrom;     /* Table containing the REFERENCES clause (aka: Child) */
    +  FKey *pNextFrom;  /* Next foreign key in pFrom */
    +  char *zTo;        /* Name of table that the key points to (aka: Parent) */
    +  FKey *pNextTo;    /* Next foreign key on table named zTo */
    +  FKey *pPrevTo;    /* Previous foreign key on table named zTo */
    +  int nCol;         /* Number of columns in this key */
    +  /* EV: R-30323-21917 */
    +  u8 isDeferred;    /* True if constraint checking is deferred till COMMIT */
    +  u8 aAction[2];          /* ON DELETE and ON UPDATE actions, respectively */
    +  Trigger *apTrigger[2];  /* Triggers for aAction[] actions */
    +  struct sColMap {  /* Mapping of columns in pFrom to columns in zTo */
    +    int iFrom;         /* Index of column in pFrom */
    +    char *zCol;        /* Name of column in zTo.  If 0 use PRIMARY KEY */
    +  } aCol[1];        /* One entry for each of nCol column s */
    +};
    +
    +/*
    +** SQLite supports many different ways to resolve a constraint
    +** error.  ROLLBACK processing means that a constraint violation
    +** causes the operation in process to fail and for the current transaction
    +** to be rolled back.  ABORT processing means the operation in process
    +** fails and any prior changes from that one operation are backed out,
    +** but the transaction is not rolled back.  FAIL processing means that
    +** the operation in progress stops and returns an error code.  But prior
    +** changes due to the same operation are not backed out and no rollback
    +** occurs.  IGNORE means that the particular row that caused the constraint
    +** error is not inserted or updated.  Processing continues and no error
    +** is returned.  REPLACE means that preexisting database rows that caused
    +** a UNIQUE constraint violation are removed so that the new insert or
    +** update can proceed.  Processing continues and no error is reported.
    +**
    +** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
    +** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the
    +** same as ROLLBACK for DEFERRED keys.  SETNULL means that the foreign
    +** key is set to NULL.  CASCADE means that a DELETE or UPDATE of the
    +** referenced table row is propagated into the row that holds the
    +** foreign key.
    +** 
    +** The following symbolic values are used to record which type
    +** of action to take.
    +*/
    +#define OE_None     0   /* There is no constraint to check */
    +#define OE_Rollback 1   /* Fail the operation and rollback the transaction */
    +#define OE_Abort    2   /* Back out changes but do no rollback transaction */
    +#define OE_Fail     3   /* Stop the operation but leave all prior changes */
    +#define OE_Ignore   4   /* Ignore the error. Do not do the INSERT or UPDATE */
    +#define OE_Replace  5   /* Delete existing record, then do INSERT or UPDATE */
    +
    +#define OE_Restrict 6   /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */
    +#define OE_SetNull  7   /* Set the foreign key value to NULL */
    +#define OE_SetDflt  8   /* Set the foreign key value to its default */
    +#define OE_Cascade  9   /* Cascade the changes */
    +
    +#define OE_Default  99  /* Do whatever the default action is */
    +
    +
    +/*
    +** An instance of the following structure is passed as the first
    +** argument to sqlite3VdbeKeyCompare and is used to control the 
    +** comparison of the two index keys.
    +*/
    +struct KeyInfo {
    +  sqlite3 *db;        /* The database connection */
    +  u8 enc;             /* Text encoding - one of the TEXT_Utf* values */
    +  u16 nField;         /* Number of entries in aColl[] */
    +  u8 *aSortOrder;     /* If defined an aSortOrder[i] is true, sort DESC */
    +  CollSeq *aColl[1];  /* Collating sequence for each term of the key */
    +};
    +
    +/*
    +** An instance of the following structure holds information about a
    +** single index record that has already been parsed out into individual
    +** values.
    +**
    +** A record is an object that contains one or more fields of data.
    +** Records are used to store the content of a table row and to store
    +** the key of an index.  A blob encoding of a record is created by
    +** the OP_MakeRecord opcode of the VDBE and is disassembled by the
    +** OP_Column opcode.
    +**
    +** This structure holds a record that has already been disassembled
    +** into its constituent fields.
    +*/
    +struct UnpackedRecord {
    +  KeyInfo *pKeyInfo;  /* Collation and sort-order information */
    +  u16 nField;         /* Number of entries in apMem[] */
    +  u16 flags;          /* Boolean settings.  UNPACKED_... below */
    +  i64 rowid;          /* Used by UNPACKED_PREFIX_SEARCH */
    +  Mem *aMem;          /* Values */
    +};
    +
    +/*
    +** Allowed values of UnpackedRecord.flags
    +*/
    +#define UNPACKED_NEED_FREE     0x0001  /* Memory is from sqlite3Malloc() */
    +#define UNPACKED_NEED_DESTROY  0x0002  /* apMem[]s should all be destroyed */
    +#define UNPACKED_IGNORE_ROWID  0x0004  /* Ignore trailing rowid on key1 */
    +#define UNPACKED_INCRKEY       0x0008  /* Make this key an epsilon larger */
    +#define UNPACKED_PREFIX_MATCH  0x0010  /* A prefix match is considered OK */
    +#define UNPACKED_PREFIX_SEARCH 0x0020  /* A prefix match is considered OK */
    +
    +/*
    +** Each SQL index is represented in memory by an
    +** instance of the following structure.
    +**
    +** The columns of the table that are to be indexed are described
    +** by the aiColumn[] field of this structure.  For example, suppose
    +** we have the following table and index:
    +**
    +**     CREATE TABLE Ex1(c1 int, c2 int, c3 text);
    +**     CREATE INDEX Ex2 ON Ex1(c3,c1);
    +**
    +** In the Table structure describing Ex1, nCol==3 because there are
    +** three columns in the table.  In the Index structure describing
    +** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed.
    +** The value of aiColumn is {2, 0}.  aiColumn[0]==2 because the 
    +** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].
    +** The second column to be indexed (c1) has an index of 0 in
    +** Ex1.aCol[], hence Ex2.aiColumn[1]==0.
    +**
    +** The Index.onError field determines whether or not the indexed columns
    +** must be unique and what to do if they are not.  When Index.onError=OE_None,
    +** it means this is not a unique index.  Otherwise it is a unique index
    +** and the value of Index.onError indicate the which conflict resolution 
    +** algorithm to employ whenever an attempt is made to insert a non-unique
    +** element.
    +*/
    +struct Index {
    +  char *zName;     /* Name of this index */
    +  int nColumn;     /* Number of columns in the table used by this index */
    +  int *aiColumn;   /* Which columns are used by this index.  1st is 0 */
    +  unsigned *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */
    +  Table *pTable;   /* The SQL table being indexed */
    +  int tnum;        /* Page containing root of this index in database file */
    +  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
    +  u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
    +  char *zColAff;   /* String defining the affinity of each column */
    +  Index *pNext;    /* The next index associated with the same table */
    +  Schema *pSchema; /* Schema containing this index */
    +  u8 *aSortOrder;  /* Array of size Index.nColumn. True==DESC, False==ASC */
    +  char **azColl;   /* Array of collation sequence names for index */
    +  IndexSample *aSample;    /* Array of SQLITE_INDEX_SAMPLES samples */
    +};
    +
    +/*
    +** Each sample stored in the sqlite_stat2 table is represented in memory 
    +** using a structure of this type.
    +*/
    +struct IndexSample {
    +  union {
    +    char *z;        /* Value if eType is SQLITE_TEXT or SQLITE_BLOB */
    +    double r;       /* Value if eType is SQLITE_FLOAT or SQLITE_INTEGER */
    +  } u;
    +  u8 eType;         /* SQLITE_NULL, SQLITE_INTEGER ... etc. */
    +  u8 nByte;         /* Size in byte of text or blob. */
    +};
    +
    +/*
    +** Each token coming out of the lexer is an instance of
    +** this structure.  Tokens are also used as part of an expression.
    +**
    +** Note if Token.z==0 then Token.dyn and Token.n are undefined and
    +** may contain random values.  Do not make any assumptions about Token.dyn
    +** and Token.n when Token.z==0.
    +*/
    +struct Token {
    +  const char *z;     /* Text of the token.  Not NULL-terminated! */
    +  unsigned int n;    /* Number of characters in this token */
    +};
    +
    +/*
    +** An instance of this structure contains information needed to generate
    +** code for a SELECT that contains aggregate functions.
    +**
    +** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a
    +** pointer to this structure.  The Expr.iColumn field is the index in
    +** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate
    +** code for that node.
    +**
    +** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the
    +** original Select structure that describes the SELECT statement.  These
    +** fields do not need to be freed when deallocating the AggInfo structure.
    +*/
    +struct AggInfo {
    +  u8 directMode;          /* Direct rendering mode means take data directly
    +                          ** from source tables rather than from accumulators */
    +  u8 useSortingIdx;       /* In direct mode, reference the sorting index rather
    +                          ** than the source table */
    +  int sortingIdx;         /* Cursor number of the sorting index */
    +  ExprList *pGroupBy;     /* The group by clause */
    +  int nSortingColumn;     /* Number of columns in the sorting index */
    +  struct AggInfo_col {    /* For each column used in source tables */
    +    Table *pTab;             /* Source table */
    +    int iTable;              /* Cursor number of the source table */
    +    int iColumn;             /* Column number within the source table */
    +    int iSorterColumn;       /* Column number in the sorting index */
    +    int iMem;                /* Memory location that acts as accumulator */
    +    Expr *pExpr;             /* The original expression */
    +  } *aCol;
    +  int nColumn;            /* Number of used entries in aCol[] */
    +  int nColumnAlloc;       /* Number of slots allocated for aCol[] */
    +  int nAccumulator;       /* Number of columns that show through to the output.
    +                          ** Additional columns are used only as parameters to
    +                          ** aggregate functions */
    +  struct AggInfo_func {   /* For each aggregate function */
    +    Expr *pExpr;             /* Expression encoding the function */
    +    FuncDef *pFunc;          /* The aggregate function implementation */
    +    int iMem;                /* Memory location that acts as accumulator */
    +    int iDistinct;           /* Ephemeral table used to enforce DISTINCT */
    +  } *aFunc;
    +  int nFunc;              /* Number of entries in aFunc[] */
    +  int nFuncAlloc;         /* Number of slots allocated for aFunc[] */
    +};
    +
    +/*
    +** The datatype ynVar is a signed integer, either 16-bit or 32-bit.
    +** Usually it is 16-bits.  But if SQLITE_MAX_VARIABLE_NUMBER is greater
    +** than 32767 we have to make it 32-bit.  16-bit is preferred because
    +** it uses less memory in the Expr object, which is a big memory user
    +** in systems with lots of prepared statements.  And few applications
    +** need more than about 10 or 20 variables.  But some extreme users want
    +** to have prepared statements with over 32767 variables, and for them
    +** the option is available (at compile-time).
    +*/
    +#if SQLITE_MAX_VARIABLE_NUMBER<=32767
    +typedef i64 ynVar;
    +#else
    +typedef int ynVar;
    +#endif
    +
    +/*
    +** Each node of an expression in the parse tree is an instance
    +** of this structure.
    +**
    +** Expr.op is the opcode. The integer parser token codes are reused
    +** as opcodes here. For example, the parser defines TK_GE to be an integer
    +** code representing the ">=" operator. This same integer code is reused
    +** to represent the greater-than-or-equal-to operator in the expression
    +** tree.
    +**
    +** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB, 
    +** or TK_STRING), then Expr.token contains the text of the SQL literal. If
    +** the expression is a variable (TK_VARIABLE), then Expr.token contains the 
    +** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),
    +** then Expr.token contains the name of the function.
    +**
    +** Expr.pRight and Expr.pLeft are the left and right subexpressions of a
    +** binary operator. Either or both may be NULL.
    +**
    +** Expr.x.pList is a list of arguments if the expression is an SQL function,
    +** a CASE expression or an IN expression of the form "<lhs> IN (<y>, <z>...)".
    +** Expr.x.pSelect is used if the expression is a sub-select or an expression of
    +** the form "<lhs> IN (SELECT ...)". If the EP_xIsSelect bit is set in the
    +** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is 
    +** valid.
    +**
    +** An expression of the form ID or ID.ID refers to a column in a table.
    +** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
    +** the integer cursor number of a VDBE cursor pointing to that table and
    +** Expr.iColumn is the column number for the specific column.  If the
    +** expression is used as a result in an aggregate SELECT, then the
    +** value is also stored in the Expr.iAgg column in the aggregate so that
    +** it can be accessed after all aggregates are computed.
    +**
    +** If the expression is an unbound variable marker (a question mark 
    +** character '?' in the original SQL) then the Expr.iTable holds the index 
    +** number for that variable.
    +**
    +** If the expression is a subquery then Expr.iColumn holds an integer
    +** register number containing the result of the subquery.  If the
    +** subquery gives a constant result, then iTable is -1.  If the subquery
    +** gives a different answer at different times during statement processing
    +** then iTable is the address of a subroutine that computes the subquery.
    +**
    +** If the Expr is of type OP_Column, and the table it is selecting from
    +** is a disk table or the "old.*" pseudo-table, then pTab points to the
    +** corresponding table definition.
    +**
    +** ALLOCATION NOTES:
    +**
    +** Expr objects can use a lot of memory space in database schema.  To
    +** help reduce memory requirements, sometimes an Expr object will be
    +** truncated.  And to reduce the number of memory allocations, sometimes
    +** two or more Expr objects will be stored in a single memory allocation,
    +** together with Expr.zToken strings.
    +**
    +** If the EP_Reduced and EP_TokenOnly flags are set when
    +** an Expr object is truncated.  When EP_Reduced is set, then all
    +** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees
    +** are contained within the same memory allocation.  Note, however, that
    +** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately
    +** allocated, regardless of whether or not EP_Reduced is set.
    +*/
    +struct Expr {
    +  u8 op;                 /* Operation performed by this node */
    +  char affinity;         /* The affinity of the column or 0 if not a column */
    +  u16 flags;             /* Various flags.  EP_* See below */
    +  union {
    +    char *zToken;          /* Token value. Zero terminated and dequoted */
    +    int iValue;            /* Integer value if EP_IntValue */
    +  } u;
    +
    +  /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no
    +  ** space is allocated for the fields below this point. An attempt to
    +  ** access them will result in a segfault or malfunction. 
    +  *********************************************************************/
    +
    +  Expr *pLeft;           /* Left subnode */
    +  Expr *pRight;          /* Right subnode */
    +  union {
    +    ExprList *pList;     /* Function arguments or in "<expr> IN (<expr-list)" */
    +    Select *pSelect;     /* Used for sub-selects and "<expr> IN (<select>)" */
    +  } x;
    +  CollSeq *pColl;        /* The collation type of the column or 0 */
    +
    +  /* If the EP_Reduced flag is set in the Expr.flags mask, then no
    +  ** space is allocated for the fields below this point. An attempt to
    +  ** access them will result in a segfault or malfunction.
    +  *********************************************************************/
    +
    +  int iTable;            /* TK_COLUMN: cursor number of table holding column
    +                         ** TK_REGISTER: register number
    +                         ** TK_TRIGGER: 1 -> new, 0 -> old */
    +  ynVar iColumn;         /* TK_COLUMN: column index.  -1 for rowid.
    +                         ** TK_VARIABLE: variable number (always >= 1). */
    +  i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
    +  i16 iRightJoinTable;   /* If EP_FromJoin, the right table of the join */
    +  u8 flags2;             /* Second set of flags.  EP2_... */
    +  u8 op2;                /* If a TK_REGISTER, the original value of Expr.op */
    +  AggInfo *pAggInfo;     /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
    +  Table *pTab;           /* Table for TK_COLUMN expressions. */
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +  int nHeight;           /* Height of the tree headed by this node */
    +#endif
    +};
    +
    +/*
    +** The following are the meanings of bits in the Expr.flags field.
    +*/
    +#define EP_FromJoin   0x0001  /* Originated in ON or USING clause of a join */
    +#define EP_Agg        0x0002  /* Contains one or more aggregate functions */
    +#define EP_Resolved   0x0004  /* IDs have been resolved to COLUMNs */
    +#define EP_Error      0x0008  /* Expression contains one or more errors */
    +#define EP_Distinct   0x0010  /* Aggregate function with DISTINCT keyword */
    +#define EP_VarSelect  0x0020  /* pSelect is correlated, not constant */
    +#define EP_DblQuoted  0x0040  /* token.z was originally in "..." */
    +#define EP_InfixFunc  0x0080  /* True for an infix function: LIKE, GLOB, etc */
    +#define EP_ExpCollate 0x0100  /* Collating sequence specified explicitly */
    +#define EP_AnyAff     0x0200  /* Can take a cached column of any affinity */
    +#define EP_FixedDest  0x0400  /* Result needed in a specific register */
    +#define EP_IntValue   0x0800  /* Integer value contained in u.iValue */
    +#define EP_xIsSelect  0x1000  /* x.pSelect is valid (otherwise x.pList is) */
    +
    +#define EP_Reduced    0x2000  /* Expr struct is EXPR_REDUCEDSIZE bytes only */
    +#define EP_TokenOnly  0x4000  /* Expr struct is EXPR_TOKENONLYSIZE bytes only */
    +#define EP_Static     0x8000  /* Held in memory not obtained from malloc() */
    +
    +/*
    +** The following are the meanings of bits in the Expr.flags2 field.
    +*/
    +#define EP2_MallocedToken  0x0001  /* Need to sqlite3DbFree() Expr.zToken */
    +#define EP2_Irreducible    0x0002  /* Cannot EXPRDUP_REDUCE this Expr */
    +
    +/*
    +** The pseudo-routine sqlite3ExprSetIrreducible sets the EP2_Irreducible
    +** flag on an expression structure.  This flag is used for VV&A only.  The
    +** routine is implemented as a macro that only works when in debugging mode,
    +** so as not to burden production code.
    +*/
    +#ifdef SQLITE_DEBUG
    +# define ExprSetIrreducible(X)  (X)->flags2 |= EP2_Irreducible
    +#else
    +# define ExprSetIrreducible(X)
    +#endif
    +
    +/*
    +** These macros can be used to test, set, or clear bits in the 
    +** Expr.flags field.
    +*/
    +#define ExprHasProperty(E,P)     (((E)->flags&(P))==(P))
    +#define ExprHasAnyProperty(E,P)  (((E)->flags&(P))!=0)
    +#define ExprSetProperty(E,P)     (E)->flags|=(P)
    +#define ExprClearProperty(E,P)   (E)->flags&=~(P)
    +
    +/*
    +** Macros to determine the number of bytes required by a normal Expr 
    +** struct, an Expr struct with the EP_Reduced flag set in Expr.flags 
    +** and an Expr struct with the EP_TokenOnly flag set.
    +*/
    +#define EXPR_FULLSIZE           sizeof(Expr)           /* Full size */
    +#define EXPR_REDUCEDSIZE        offsetof(Expr,iTable)  /* Common features */
    +#define EXPR_TOKENONLYSIZE      offsetof(Expr,pLeft)   /* Fewer features */
    +
    +/*
    +** Flags passed to the sqlite3ExprDup() function. See the header comment 
    +** above sqlite3ExprDup() for details.
    +*/
    +#define EXPRDUP_REDUCE         0x0001  /* Used reduced-size Expr nodes */
    +
    +/*
    +** A list of expressions.  Each expression may optionally have a
    +** name.  An expr/name combination can be used in several ways, such
    +** as the list of "expr AS ID" fields following a "SELECT" or in the
    +** list of "ID = expr" items in an UPDATE.  A list of expressions can
    +** also be used as the argument to a function, in which case the a.zName
    +** field is not used.
    +*/
    +struct ExprList {
    +  int nExpr;             /* Number of expressions on the list */
    +  int nAlloc;            /* Number of entries allocated below */
    +  int iECursor;          /* VDBE Cursor associated with this ExprList */
    +  struct ExprList_item {
    +    Expr *pExpr;           /* The list of expressions */
    +    char *zName;           /* Token associated with this expression */
    +    char *zSpan;           /* Original text of the expression */
    +    u8 sortOrder;          /* 1 for DESC or 0 for ASC */
    +    u8 done;               /* A flag to indicate when processing is finished */
    +    u16 iCol;              /* For ORDER BY, column number in result set */
    +    u16 iAlias;            /* Index into Parse.aAlias[] for zName */
    +  } *a;                  /* One entry for each expression */
    +};
    +
    +/*
    +** An instance of this structure is used by the parser to record both
    +** the parse tree for an expression and the span of input text for an
    +** expression.
    +*/
    +struct ExprSpan {
    +  Expr *pExpr;          /* The expression parse tree */
    +  const char *zStart;   /* First character of input text */
    +  const char *zEnd;     /* One character past the end of input text */
    +};
    +
    +/*
    +** An instance of this structure can hold a simple list of identifiers,
    +** such as the list "a,b,c" in the following statements:
    +**
    +**      INSERT INTO t(a,b,c) VALUES ...;
    +**      CREATE INDEX idx ON t(a,b,c);
    +**      CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...;
    +**
    +** The IdList.a.idx field is used when the IdList represents the list of
    +** column names after a table name in an INSERT statement.  In the statement
    +**
    +**     INSERT INTO t(a,b,c) ...
    +**
    +** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
    +*/
    +struct IdList {
    +  struct IdList_item {
    +    char *zName;      /* Name of the identifier */
    +    int idx;          /* Index in some Table.aCol[] of a column named zName */
    +  } *a;
    +  int nId;         /* Number of identifiers on the list */
    +  int nAlloc;      /* Number of entries allocated for a[] below */
    +};
    +
    +/*
    +** The bitmask datatype defined below is used for various optimizations.
    +**
    +** Changing this from a 64-bit to a 32-bit type limits the number of
    +** tables in a join to 32 instead of 64.  But it also reduces the size
    +** of the library by 738 bytes on ix86.
    +*/
    +typedef u64 Bitmask;
    +
    +/*
    +** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
    +*/
    +#define BMS  ((int)(sizeof(Bitmask)*8))
    +
    +/*
    +** The following structure describes the FROM clause of a SELECT statement.
    +** Each table or subquery in the FROM clause is a separate element of
    +** the SrcList.a[] array.
    +**
    +** With the addition of multiple database support, the following structure
    +** can also be used to describe a particular table such as the table that
    +** is modified by an INSERT, DELETE, or UPDATE statement.  In standard SQL,
    +** such a table must be a simple name: ID.  But in SQLite, the table can
    +** now be identified by a database name, a dot, then the table name: ID.ID.
    +**
    +** The jointype starts out showing the join type between the current table
    +** and the next table on the list.  The parser builds the list this way.
    +** But sqlite3SrcListShiftJoinType() later shifts the jointypes so that each
    +** jointype expresses the join between the table and the previous table.
    +*/
    +struct SrcList {
    +  i16 nSrc;        /* Number of tables or subqueries in the FROM clause */
    +  i16 nAlloc;      /* Number of entries allocated in a[] below */
    +  struct SrcList_item {
    +    char *zDatabase;  /* Name of database holding this table */
    +    char *zName;      /* Name of the table */
    +    char *zAlias;     /* The "B" part of a "A AS B" phrase.  zName is the "A" */
    +    Table *pTab;      /* An SQL table corresponding to zName */
    +    Select *pSelect;  /* A SELECT statement used in place of a table name */
    +    u8 isPopulated;   /* Temporary table associated with SELECT is populated */
    +    u8 jointype;      /* Type of join between this able and the previous */
    +    u8 notIndexed;    /* True if there is a NOT INDEXED clause */
    +    int iCursor;      /* The VDBE cursor number used to access this table */
    +    Expr *pOn;        /* The ON clause of a join */
    +    IdList *pUsing;   /* The USING clause of a join */
    +    Bitmask colUsed;  /* Bit N (1<<N) set if column N of pTab is used */
    +    char *zIndex;     /* Identifier from "INDEXED BY <zIndex>" clause */
    +    Index *pIndex;    /* Index structure corresponding to zIndex, if any */
    +  } a[1];             /* One entry for each identifier on the list */
    +};
    +
    +/*
    +** Permitted values of the SrcList.a.jointype field
    +*/
    +#define JT_INNER     0x0001    /* Any kind of inner or cross join */
    +#define JT_CROSS     0x0002    /* Explicit use of the CROSS keyword */
    +#define JT_NATURAL   0x0004    /* True for a "natural" join */
    +#define JT_LEFT      0x0008    /* Left outer join */
    +#define JT_RIGHT     0x0010    /* Right outer join */
    +#define JT_OUTER     0x0020    /* The "OUTER" keyword is present */
    +#define JT_ERROR     0x0040    /* unknown or unsupported join type */
    +
    +
    +/*
    +** A WherePlan object holds information that describes a lookup
    +** strategy.
    +**
    +** This object is intended to be opaque outside of the where.c module.
    +** It is included here only so that that compiler will know how big it
    +** is.  None of the fields in this object should be used outside of
    +** the where.c module.
    +**
    +** Within the union, pIdx is only used when wsFlags&WHERE_INDEXED is true.
    +** pTerm is only used when wsFlags&WHERE_MULTI_OR is true.  And pVtabIdx
    +** is only used when wsFlags&WHERE_VIRTUALTABLE is true.  It is never the
    +** case that more than one of these conditions is true.
    +*/
    +struct WherePlan {
    +  u32 wsFlags;                   /* WHERE_* flags that describe the strategy */
    +  u32 nEq;                       /* Number of == constraints */
    +  union {
    +    Index *pIdx;                   /* Index when WHERE_INDEXED is true */
    +    struct WhereTerm *pTerm;       /* WHERE clause term for OR-search */
    +    sqlite3_index_info *pVtabIdx;  /* Virtual table index to use */
    +  } u;
    +};
    +
    +/*
    +** For each nested loop in a WHERE clause implementation, the WhereInfo
    +** structure contains a single instance of this structure.  This structure
    +** is intended to be private the the where.c module and should not be
    +** access or modified by other modules.
    +**
    +** The pIdxInfo field is used to help pick the best index on a
    +** virtual table.  The pIdxInfo pointer contains indexing
    +** information for the i-th table in the FROM clause before reordering.
    +** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.
    +** All other information in the i-th WhereLevel object for the i-th table
    +** after FROM clause ordering.
    +*/
    +struct WhereLevel {
    +  WherePlan plan;       /* query plan for this element of the FROM clause */
    +  int iLeftJoin;        /* Memory cell used to implement LEFT OUTER JOIN */
    +  int iTabCur;          /* The VDBE cursor used to access the table */
    +  int iIdxCur;          /* The VDBE cursor used to access pIdx */
    +  int addrBrk;          /* Jump here to break out of the loop */
    +  int addrNxt;          /* Jump here to start the next IN combination */
    +  int addrCont;         /* Jump here to continue with the next loop cycle */
    +  int addrFirst;        /* First instruction of interior of the loop */
    +  u8 iFrom;             /* Which entry in the FROM clause */
    +  u8 op, p5;            /* Opcode and P5 of the opcode that ends the loop */
    +  int p1, p2;           /* Operands of the opcode used to ends the loop */
    +  union {               /* Information that depends on plan.wsFlags */
    +    struct {
    +      int nIn;              /* Number of entries in aInLoop[] */
    +      struct InLoop {
    +        int iCur;              /* The VDBE cursor used by this IN operator */
    +        int addrInTop;         /* Top of the IN loop */
    +      } *aInLoop;           /* Information about each nested IN operator */
    +    } in;                 /* Used when plan.wsFlags&WHERE_IN_ABLE */
    +  } u;
    +
    +  /* The following field is really not part of the current level.  But
    +  ** we need a place to cache virtual table index information for each
    +  ** virtual table in the FROM clause and the WhereLevel structure is
    +  ** a convenient place since there is one WhereLevel for each FROM clause
    +  ** element.
    +  */
    +  sqlite3_index_info *pIdxInfo;  /* Index info for n-th source table */
    +};
    +
    +/*
    +** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
    +** and the WhereInfo.wctrlFlags member.
    +*/
    +#define WHERE_ORDERBY_NORMAL   0x0000 /* No-op */
    +#define WHERE_ORDERBY_MIN      0x0001 /* ORDER BY processing for min() func */
    +#define WHERE_ORDERBY_MAX      0x0002 /* ORDER BY processing for max() func */
    +#define WHERE_ONEPASS_DESIRED  0x0004 /* Want to do one-pass UPDATE/DELETE */
    +#define WHERE_DUPLICATES_OK    0x0008 /* Ok to return a row more than once */
    +#define WHERE_OMIT_OPEN        0x0010 /* Table cursor are already open */
    +#define WHERE_OMIT_CLOSE       0x0020 /* Omit close of table & index cursors */
    +#define WHERE_FORCE_TABLE      0x0040 /* Do not use an index-only search */
    +
    +/*
    +** The WHERE clause processing routine has two halves.  The
    +** first part does the start of the WHERE loop and the second
    +** half does the tail of the WHERE loop.  An instance of
    +** this structure is returned by the first half and passed
    +** into the second half to give some continuity.
    +*/
    +struct WhereInfo {
    +  Parse *pParse;       /* Parsing and code generating context */
    +  u16 wctrlFlags;      /* Flags originally passed to sqlite3WhereBegin() */
    +  u8 okOnePass;        /* Ok to use one-pass algorithm for UPDATE or DELETE */
    +  SrcList *pTabList;             /* List of tables in the join */
    +  int iTop;                      /* The very beginning of the WHERE loop */
    +  int iContinue;                 /* Jump here to continue with next record */
    +  int iBreak;                    /* Jump here to break out of the loop */
    +  int nLevel;                    /* Number of nested loop */
    +  struct WhereClause *pWC;       /* Decomposition of the WHERE clause */
    +  WhereLevel a[1];               /* Information about each nest loop in WHERE */
    +};
    +
    +/*
    +** A NameContext defines a context in which to resolve table and column
    +** names.  The context consists of a list of tables (the pSrcList) field and
    +** a list of named expression (pEList).  The named expression list may
    +** be NULL.  The pSrc corresponds to the FROM clause of a SELECT or
    +** to the table being operated on by INSERT, UPDATE, or DELETE.  The
    +** pEList corresponds to the result set of a SELECT and is NULL for
    +** other statements.
    +**
    +** NameContexts can be nested.  When resolving names, the inner-most 
    +** context is searched first.  If no match is found, the next outer
    +** context is checked.  If there is still no match, the next context
    +** is checked.  This process continues until either a match is found
    +** or all contexts are check.  When a match is found, the nRef member of
    +** the context containing the match is incremented. 
    +**
    +** Each subquery gets a new NameContext.  The pNext field points to the
    +** NameContext in the parent query.  Thus the process of scanning the
    +** NameContext list corresponds to searching through successively outer
    +** subqueries looking for a match.
    +*/
    +struct NameContext {
    +  Parse *pParse;       /* The parser */
    +  SrcList *pSrcList;   /* One or more tables used to resolve names */
    +  ExprList *pEList;    /* Optional list of named expressions */
    +  int nRef;            /* Number of names resolved by this context */
    +  int nErr;            /* Number of errors encountered while resolving names */
    +  u8 allowAgg;         /* Aggregate functions allowed here */
    +  u8 hasAgg;           /* True if aggregates are seen */
    +  u8 isCheck;          /* True if resolving names in a CHECK constraint */
    +  int nDepth;          /* Depth of subquery recursion. 1 for no recursion */
    +  AggInfo *pAggInfo;   /* Information about aggregates at this level */
    +  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
    +};
    +
    +/*
    +** An instance of the following structure contains all information
    +** needed to generate code for a single SELECT statement.
    +**
    +** nLimit is set to -1 if there is no LIMIT clause.  nOffset is set to 0.
    +** If there is a LIMIT clause, the parser sets nLimit to the value of the
    +** limit and nOffset to the value of the offset (or 0 if there is not
    +** offset).  But later on, nLimit and nOffset become the memory locations
    +** in the VDBE that record the limit and offset counters.
    +**
    +** addrOpenEphm[] entries contain the address of OP_OpenEphemeral opcodes.
    +** These addresses must be stored so that we can go back and fill in
    +** the P4_KEYINFO and P2 parameters later.  Neither the KeyInfo nor
    +** the number of columns in P2 can be computed at the same time
    +** as the OP_OpenEphm instruction is coded because not
    +** enough information about the compound query is known at that point.
    +** The KeyInfo for addrOpenTran[0] and [1] contains collating sequences
    +** for the result set.  The KeyInfo for addrOpenTran[2] contains collating
    +** sequences for the ORDER BY clause.
    +*/
    +struct Select {
    +  ExprList *pEList;      /* The fields of the result */
    +  u8 op;                 /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
    +  char affinity;         /* MakeRecord with this affinity for SRT_Set */
    +  u16 selFlags;          /* Various SF_* values */
    +  SrcList *pSrc;         /* The FROM clause */
    +  Expr *pWhere;          /* The WHERE clause */
    +  ExprList *pGroupBy;    /* The GROUP BY clause */
    +  Expr *pHaving;         /* The HAVING clause */
    +  ExprList *pOrderBy;    /* The ORDER BY clause */
    +  Select *pPrior;        /* Prior select in a compound select statement */
    +  Select *pNext;         /* Next select to the left in a compound */
    +  Select *pRightmost;    /* Right-most select in a compound select statement */
    +  Expr *pLimit;          /* LIMIT expression. NULL means not used. */
    +  Expr *pOffset;         /* OFFSET expression. NULL means not used. */
    +  int iLimit, iOffset;   /* Memory registers holding LIMIT & OFFSET counters */
    +  int addrOpenEphm[3];   /* OP_OpenEphem opcodes related to this select */
    +};
    +
    +/*
    +** Allowed values for Select.selFlags.  The "SF" prefix stands for
    +** "Select Flag".
    +*/
    +#define SF_Distinct        0x0001  /* Output should be DISTINCT */
    +#define SF_Resolved        0x0002  /* Identifiers have been resolved */
    +#define SF_Aggregate       0x0004  /* Contains aggregate functions */
    +#define SF_UsesEphemeral   0x0008  /* Uses the OpenEphemeral opcode */
    +#define SF_Expanded        0x0010  /* sqlite3SelectExpand() called on this */
    +#define SF_HasTypeInfo     0x0020  /* FROM subqueries have Table metadata */
    +
    +
    +/*
    +** The results of a select can be distributed in several ways.  The
    +** "SRT" prefix means "SELECT Result Type".
    +*/
    +#define SRT_Union        1  /* Store result as keys in an index */
    +#define SRT_Except       2  /* Remove result from a UNION index */
    +#define SRT_Exists       3  /* Store 1 if the result is not empty */
    +#define SRT_Discard      4  /* Do not save the results anywhere */
    +
    +/* The ORDER BY clause is ignored for all of the above */
    +#define IgnorableOrderby(X) ((X->eDest)<=SRT_Discard)
    +
    +#define SRT_Output       5  /* Output each row of result */
    +#define SRT_Mem          6  /* Store result in a memory cell */
    +#define SRT_Set          7  /* Store results as keys in an index */
    +#define SRT_Table        8  /* Store result as data with an automatic rowid */
    +#define SRT_EphemTab     9  /* Create transient tab and store like SRT_Table */
    +#define SRT_Coroutine   10  /* Generate a single row of result */
    +
    +/*
    +** A structure used to customize the behavior of sqlite3Select(). See
    +** comments above sqlite3Select() for details.
    +*/
    +typedef struct SelectDest SelectDest;
    +struct SelectDest {
    +  u8 eDest;         /* How to dispose of the results */
    +  u8 affinity;      /* Affinity used when eDest==SRT_Set */
    +  int iParm;        /* A parameter used by the eDest disposal method */
    +  int iMem;         /* Base register where results are written */
    +  int nMem;         /* Number of registers allocated */
    +};
    +
    +/*
    +** During code generation of statements that do inserts into AUTOINCREMENT 
    +** tables, the following information is attached to the Table.u.autoInc.p
    +** pointer of each autoincrement table to record some side information that
    +** the code generator needs.  We have to keep per-table autoincrement
    +** information in case inserts are down within triggers.  Triggers do not
    +** normally coordinate their activities, but we do need to coordinate the
    +** loading and saving of autoincrement information.
    +*/
    +struct AutoincInfo {
    +  AutoincInfo *pNext;   /* Next info block in a list of them all */
    +  Table *pTab;          /* Table this info block refers to */
    +  int iDb;              /* Index in sqlite3.aDb[] of database holding pTab */
    +  int regCtr;           /* Memory register holding the rowid counter */
    +};
    +
    +/*
    +** Size of the column cache
    +*/
    +#ifndef SQLITE_N_COLCACHE
    +# define SQLITE_N_COLCACHE 10
    +#endif
    +
    +/*
    +** At least one instance of the following structure is created for each 
    +** trigger that may be fired while parsing an INSERT, UPDATE or DELETE
    +** statement. All such objects are stored in the linked list headed at
    +** Parse.pTriggerPrg and deleted once statement compilation has been
    +** completed.
    +**
    +** A Vdbe sub-program that implements the body and WHEN clause of trigger
    +** TriggerPrg.pTrigger, assuming a default ON CONFLICT clause of
    +** TriggerPrg.orconf, is stored in the TriggerPrg.pProgram variable.
    +** The Parse.pTriggerPrg list never contains two entries with the same
    +** values for both pTrigger and orconf.
    +**
    +** The TriggerPrg.oldmask variable is set to a mask of old.* columns
    +** accessed (or set to 0 for triggers fired as a result of INSERT 
    +** statements).
    +*/
    +struct TriggerPrg {
    +  Trigger *pTrigger;      /* Trigger this program was coded from */
    +  int orconf;             /* Default ON CONFLICT policy */
    +  SubProgram *pProgram;   /* Program implementing pTrigger/orconf */
    +  u32 oldmask;            /* Mask of old.* columns accessed */
    +  TriggerPrg *pNext;      /* Next entry in Parse.pTriggerPrg list */
    +};
    +
    +/*
    +** An SQL parser context.  A copy of this structure is passed through
    +** the parser and down into all the parser action routine in order to
    +** carry around information that is global to the entire parse.
    +**
    +** The structure is divided into two parts.  When the parser and code
    +** generate call themselves recursively, the first part of the structure
    +** is constant but the second part is reset at the beginning and end of
    +** each recursion.
    +**
    +** The nTableLock and aTableLock variables are only used if the shared-cache 
    +** feature is enabled (if sqlite3Tsd()->useSharedData is true). They are
    +** used to store the set of table-locks required by the statement being
    +** compiled. Function sqlite3TableLock() is used to add entries to the
    +** list.
    +*/
    +struct Parse {
    +  sqlite3 *db;         /* The main database structure */
    +  int rc;              /* Return code from execution */
    +  char *zErrMsg;       /* An error message */
    +  Vdbe *pVdbe;         /* An engine for executing database bytecode */
    +  u8 colNamesSet;      /* TRUE after OP_ColumnName has been issued to pVdbe */
    +  u8 nameClash;        /* A permanent table name clashes with temp table name */
    +  u8 checkSchema;      /* Causes schema cookie check after an error */
    +  u8 nested;           /* Number of nested calls to the parser/code generator */
    +  u8 parseError;       /* True after a parsing error.  Ticket #1794 */
    +  u8 nTempReg;         /* Number of temporary registers in aTempReg[] */
    +  u8 nTempInUse;       /* Number of aTempReg[] currently checked out */
    +  int aTempReg[8];     /* Holding area for temporary registers */
    +  int nRangeReg;       /* Size of the temporary register block */
    +  int iRangeReg;       /* First register in temporary register block */
    +  int nErr;            /* Number of errors seen */
    +  int nTab;            /* Number of previously allocated VDBE cursors */
    +  int nMem;            /* Number of memory cells used so far */
    +  int nSet;            /* Number of sets used so far */
    +  int ckBase;          /* Base register of data during check constraints */
    +  int iCacheLevel;     /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
    +  int iCacheCnt;       /* Counter used to generate aColCache[].lru values */
    +  u8 nColCache;        /* Number of entries in the column cache */
    +  u8 iColCache;        /* Next entry of the cache to replace */
    +  struct yColCache {
    +    int iTable;           /* Table cursor number */
    +    int iColumn;          /* Table column number */
    +    u8 affChange;         /* True if this register has had an affinity change */
    +    u8 tempReg;           /* iReg is a temp register that needs to be freed */
    +    int iLevel;           /* Nesting level */
    +    int iReg;             /* Reg with value of this column. 0 means none. */
    +    int lru;              /* Least recently used entry has the smallest value */
    +  } aColCache[SQLITE_N_COLCACHE];  /* One for each column cache entry */
    +  u32 writeMask;       /* Start a write transaction on these databases */
    +  u32 cookieMask;      /* Bitmask of schema verified databases */
    +  u8 isMultiWrite;     /* True if statement may affect/insert multiple rows */
    +  u8 mayAbort;         /* True if statement may throw an ABORT exception */
    +  int cookieGoto;      /* Address of OP_Goto to cookie verifier subroutine */
    +  int cookieValue[SQLITE_MAX_ATTACHED+2];  /* Values of cookies to verify */
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  int nTableLock;        /* Number of locks in aTableLock */
    +  TableLock *aTableLock; /* Required table locks for shared-cache mode */
    +#endif
    +  int regRowid;        /* Register holding rowid of CREATE TABLE entry */
    +  int regRoot;         /* Register holding root page number for new objects */
    +  AutoincInfo *pAinc;  /* Information about AUTOINCREMENT counters */
    +  int nMaxArg;         /* Max args passed to user function by sub-program */
    +
    +  /* Information used while coding trigger programs. */
    +  Parse *pToplevel;    /* Parse structure for main program (or NULL) */
    +  Table *pTriggerTab;  /* Table triggers are being coded for */
    +  u32 oldmask;         /* Mask of old.* columns referenced */
    +  u8 eTriggerOp;       /* TK_UPDATE, TK_INSERT or TK_DELETE */
    +  u8 eOrconf;          /* Default ON CONFLICT policy for trigger steps */
    +  u8 disableTriggers;  /* True to disable triggers */
    +
    +  /* Above is constant between recursions.  Below is reset before and after
    +  ** each recursion */
    +
    +  int nVar;            /* Number of '?' variables seen in the SQL so far */
    +  int nVarExpr;        /* Number of used slots in apVarExpr[] */
    +  int nVarExprAlloc;   /* Number of allocated slots in apVarExpr[] */
    +  Expr **apVarExpr;    /* Pointers to :aaa and $aaaa wildcard expressions */
    +  Vdbe *pReprepare;    /* VM being reprepared (sqlite3Reprepare()) */
    +  int nAlias;          /* Number of aliased result set columns */
    +  int nAliasAlloc;     /* Number of allocated slots for aAlias[] */
    +  int *aAlias;         /* Register used to hold aliased result */
    +  u8 explain;          /* True if the EXPLAIN flag is found on the query */
    +  Token sNameToken;    /* Token with unqualified schema object name */
    +  Token sLastToken;    /* The last token parsed */
    +  const char *zTail;   /* All SQL text past the last semicolon parsed */
    +  Table *pNewTable;    /* A table being constructed by CREATE TABLE */
    +  Trigger *pNewTrigger;     /* Trigger under construct by a CREATE TRIGGER */
    +  const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  Token sArg;                /* Complete text of a module argument */
    +  u8 declareVtab;            /* True if inside sqlite3_declare_vtab() */
    +  int nVtabLock;             /* Number of virtual tables to lock */
    +  Table **apVtabLock;        /* Pointer to virtual tables needing locking */
    +#endif
    +  int nHeight;            /* Expression tree height of current sub-select */
    +  Table *pZombieTab;      /* List of Table objects to delete after code gen */
    +  TriggerPrg *pTriggerPrg;    /* Linked list of coded triggers */
    +};
    +
    +#ifdef SQLITE_OMIT_VIRTUALTABLE
    +  #define IN_DECLARE_VTAB 0
    +#else
    +  #define IN_DECLARE_VTAB (pParse->declareVtab)
    +#endif
    +
    +/*
    +** An instance of the following structure can be declared on a stack and used
    +** to save the Parse.zAuthContext value so that it can be restored later.
    +*/
    +struct AuthContext {
    +  const char *zAuthContext;   /* Put saved Parse.zAuthContext here */
    +  Parse *pParse;              /* The Parse structure */
    +};
    +
    +/*
    +** Bitfield flags for P5 value in OP_Insert and OP_Delete
    +*/
    +#define OPFLAG_NCHANGE       0x01    /* Set to update db->nChange */
    +#define OPFLAG_LASTROWID     0x02    /* Set to update db->lastRowid */
    +#define OPFLAG_ISUPDATE      0x04    /* This OP_Insert is an sql UPDATE */
    +#define OPFLAG_APPEND        0x08    /* This is likely to be an append */
    +#define OPFLAG_USESEEKRESULT 0x10    /* Try to avoid a seek in BtreeInsert() */
    +#define OPFLAG_CLEARCACHE    0x20    /* Clear pseudo-table cache in OP_Column */
    +
    +/*
    + * Each trigger present in the database schema is stored as an instance of
    + * struct Trigger. 
    + *
    + * Pointers to instances of struct Trigger are stored in two ways.
    + * 1. In the "trigHash" hash table (part of the sqlite3* that represents the 
    + *    database). This allows Trigger structures to be retrieved by name.
    + * 2. All triggers associated with a single table form a linked list, using the
    + *    pNext member of struct Trigger. A pointer to the first element of the
    + *    linked list is stored as the "pTrigger" member of the associated
    + *    struct Table.
    + *
    + * The "step_list" member points to the first element of a linked list
    + * containing the SQL statements specified as the trigger program.
    + */
    +struct Trigger {
    +  char *zName;            /* The name of the trigger                        */
    +  char *table;            /* The table or view to which the trigger applies */
    +  u8 op;                  /* One of TK_DELETE, TK_UPDATE, TK_INSERT         */
    +  u8 tr_tm;               /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
    +  Expr *pWhen;            /* The WHEN clause of the expression (may be NULL) */
    +  IdList *pColumns;       /* If this is an UPDATE OF <column-list> trigger,
    +                             the <column-list> is stored here */
    +  Schema *pSchema;        /* Schema containing the trigger */
    +  Schema *pTabSchema;     /* Schema containing the table */
    +  TriggerStep *step_list; /* Link list of trigger program steps             */
    +  Trigger *pNext;         /* Next trigger associated with the table */
    +};
    +
    +/*
    +** A trigger is either a BEFORE or an AFTER trigger.  The following constants
    +** determine which. 
    +**
    +** If there are multiple triggers, you might of some BEFORE and some AFTER.
    +** In that cases, the constants below can be ORed together.
    +*/
    +#define TRIGGER_BEFORE  1
    +#define TRIGGER_AFTER   2
    +
    +/*
    + * An instance of struct TriggerStep is used to store a single SQL statement
    + * that is a part of a trigger-program. 
    + *
    + * Instances of struct TriggerStep are stored in a singly linked list (linked
    + * using the "pNext" member) referenced by the "step_list" member of the 
    + * associated struct Trigger instance. The first element of the linked list is
    + * the first step of the trigger-program.
    + * 
    + * The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or
    + * "SELECT" statement. The meanings of the other members is determined by the 
    + * value of "op" as follows:
    + *
    + * (op == TK_INSERT)
    + * orconf    -> stores the ON CONFLICT algorithm
    + * pSelect   -> If this is an INSERT INTO ... SELECT ... statement, then
    + *              this stores a pointer to the SELECT statement. Otherwise NULL.
    + * target    -> A token holding the quoted name of the table to insert into.
    + * pExprList -> If this is an INSERT INTO ... VALUES ... statement, then
    + *              this stores values to be inserted. Otherwise NULL.
    + * pIdList   -> If this is an INSERT INTO ... (<column-names>) VALUES ... 
    + *              statement, then this stores the column-names to be
    + *              inserted into.
    + *
    + * (op == TK_DELETE)
    + * target    -> A token holding the quoted name of the table to delete from.
    + * pWhere    -> The WHERE clause of the DELETE statement if one is specified.
    + *              Otherwise NULL.
    + * 
    + * (op == TK_UPDATE)
    + * target    -> A token holding the quoted name of the table to update rows of.
    + * pWhere    -> The WHERE clause of the UPDATE statement if one is specified.
    + *              Otherwise NULL.
    + * pExprList -> A list of the columns to update and the expressions to update
    + *              them to. See sqlite3Update() documentation of "pChanges"
    + *              argument.
    + * 
    + */
    +struct TriggerStep {
    +  u8 op;               /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
    +  u8 orconf;           /* OE_Rollback etc. */
    +  Trigger *pTrig;      /* The trigger that this step is a part of */
    +  Select *pSelect;     /* SELECT statment or RHS of INSERT INTO .. SELECT ... */
    +  Token target;        /* Target table for DELETE, UPDATE, INSERT */
    +  Expr *pWhere;        /* The WHERE clause for DELETE or UPDATE steps */
    +  ExprList *pExprList; /* SET clause for UPDATE.  VALUES clause for INSERT */
    +  IdList *pIdList;     /* Column names for INSERT */
    +  TriggerStep *pNext;  /* Next in the link-list */
    +  TriggerStep *pLast;  /* Last element in link-list. Valid for 1st elem only */
    +};
    +
    +/*
    +** The following structure contains information used by the sqliteFix...
    +** routines as they walk the parse tree to make database references
    +** explicit.  
    +*/
    +typedef struct DbFixer DbFixer;
    +struct DbFixer {
    +  Parse *pParse;      /* The parsing context.  Error messages written here */
    +  const char *zDb;    /* Make sure all objects are contained in this database */
    +  const char *zType;  /* Type of the container - used for error messages */
    +  const Token *pName; /* Name of the container - used for error messages */
    +};
    +
    +/*
    +** An objected used to accumulate the text of a string where we
    +** do not necessarily know how big the string will be in the end.
    +*/
    +struct StrAccum {
    +  sqlite3 *db;         /* Optional database for lookaside.  Can be NULL */
    +  char *zBase;         /* A base allocation.  Not from malloc. */
    +  char *zText;         /* The string collected so far */
    +  int  nChar;          /* Length of the string so far */
    +  int  nAlloc;         /* Amount of space allocated in zText */
    +  int  mxAlloc;        /* Maximum allowed string length */
    +  u8   mallocFailed;   /* Becomes true if any memory allocation fails */
    +  u8   useMalloc;      /* True if zText is enlargeable using realloc */
    +  u8   tooBig;         /* Becomes true if string size exceeds limits */
    +};
    +
    +/*
    +** A pointer to this structure is used to communicate information
    +** from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.
    +*/
    +typedef struct {
    +  sqlite3 *db;        /* The database being initialized */
    +  int iDb;            /* 0 for main database.  1 for TEMP, 2.. for ATTACHed */
    +  char **pzErrMsg;    /* Error message stored here */
    +  int rc;             /* Result code stored here */
    +} InitData;
    +
    +/*
    +** Structure containing global configuration data for the SQLite library.
    +**
    +** This structure also contains some state information.
    +*/
    +struct Sqlite3Config {
    +  int bMemstat;                     /* True to enable memory status */
    +  int bCoreMutex;                   /* True to enable core mutexing */
    +  int bFullMutex;                   /* True to enable full mutexing */
    +  int mxStrlen;                     /* Maximum string length */
    +  int szLookaside;                  /* Default lookaside buffer size */
    +  int nLookaside;                   /* Default lookaside buffer count */
    +  sqlite3_mem_methods m;            /* Low-level memory allocation interface */
    +  sqlite3_mutex_methods mutex;      /* Low-level mutex interface */
    +  sqlite3_pcache_methods pcache;    /* Low-level page-cache interface */
    +  void *pHeap;                      /* Heap storage space */
    +  int nHeap;                        /* Size of pHeap[] */
    +  int mnReq, mxReq;                 /* Min and max heap requests sizes */
    +  void *pScratch;                   /* Scratch memory */
    +  int szScratch;                    /* Size of each scratch buffer */
    +  int nScratch;                     /* Number of scratch buffers */
    +  void *pPage;                      /* Page cache memory */
    +  int szPage;                       /* Size of each page in pPage[] */
    +  int nPage;                        /* Number of pages in pPage[] */
    +  int mxParserStack;                /* maximum depth of the parser stack */
    +  int sharedCacheEnabled;           /* true if shared-cache mode enabled */
    +  /* The above might be initialized to non-zero.  The following need to always
    +  ** initially be zero, however. */
    +  int isInit;                       /* True after initialization has finished */
    +  int inProgress;                   /* True while initialization in progress */
    +  int isMutexInit;                  /* True after mutexes are initialized */
    +  int isMallocInit;                 /* True after malloc is initialized */
    +  int isPCacheInit;                 /* True after malloc is initialized */
    +  sqlite3_mutex *pInitMutex;        /* Mutex used by sqlite3_initialize() */
    +  int nRefInitMutex;                /* Number of users of pInitMutex */
    +};
    +
    +/*
    +** Context pointer passed down through the tree-walk.
    +*/
    +struct Walker {
    +  int (*xExprCallback)(Walker*, Expr*);     /* Callback for expressions */
    +  int (*xSelectCallback)(Walker*,Select*);  /* Callback for SELECTs */
    +  Parse *pParse;                            /* Parser context.  */
    +  union {                                   /* Extra data for callback */
    +    NameContext *pNC;                          /* Naming context */
    +    int i;                                     /* Integer value */
    +  } u;
    +};
    +
    +/* Forward declarations */
    +SQLITE_PRIVATE int sqlite3WalkExpr(Walker*, Expr*);
    +SQLITE_PRIVATE int sqlite3WalkExprList(Walker*, ExprList*);
    +SQLITE_PRIVATE int sqlite3WalkSelect(Walker*, Select*);
    +SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker*, Select*);
    +SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker*, Select*);
    +
    +/*
    +** Return code from the parse-tree walking primitives and their
    +** callbacks.
    +*/
    +#define WRC_Continue    0   /* Continue down into children */
    +#define WRC_Prune       1   /* Omit children but continue walking siblings */
    +#define WRC_Abort       2   /* Abandon the tree walk */
    +
    +/*
    +** Assuming zIn points to the first byte of a UTF-8 character,
    +** advance zIn to point to the first byte of the next UTF-8 character.
    +*/
    +#define SQLITE_SKIP_UTF8(zIn) {                        \
    +  if( (*(zIn++))>=0xc0 ){                              \
    +    while( (*zIn & 0xc0)==0x80 ){ zIn++; }             \
    +  }                                                    \
    +}
    +
    +/*
    +** The SQLITE_CORRUPT_BKPT macro can be either a constant (for production
    +** builds) or a function call (for debugging).  If it is a function call,
    +** it allows the operator to set a breakpoint at the spot where database
    +** corruption is first detected.
    +*/
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE   int sqlite3Corrupt(void);
    +# define SQLITE_CORRUPT_BKPT sqlite3Corrupt()
    +#else
    +# define SQLITE_CORRUPT_BKPT SQLITE_CORRUPT
    +#endif
    +
    +/*
    +** The ctype.h header is needed for non-ASCII systems.  It is also
    +** needed by FTS3 when FTS3 is included in the amalgamation.
    +*/
    +#if !defined(SQLITE_ASCII) || \
    +    (defined(SQLITE_ENABLE_FTS3) && defined(SQLITE_AMALGAMATION))
    +# include <ctype.h>
    +#endif
    +
    +/*
    +** The following macros mimic the standard library functions toupper(),
    +** isspace(), isalnum(), isdigit() and isxdigit(), respectively. The
    +** sqlite versions only work for ASCII characters, regardless of locale.
    +*/
    +#ifdef SQLITE_ASCII
    +# define sqlite3Toupper(x)  ((x)&~(sqlite3CtypeMap[(unsigned char)(x)]&0x20))
    +# define sqlite3Isspace(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x01)
    +# define sqlite3Isalnum(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x06)
    +# define sqlite3Isalpha(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x02)
    +# define sqlite3Isdigit(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x04)
    +# define sqlite3Isxdigit(x)  (sqlite3CtypeMap[(unsigned char)(x)]&0x08)
    +# define sqlite3Tolower(x)   (sqlite3UpperToLower[(unsigned char)(x)])
    +#else
    +# define sqlite3Toupper(x)   toupper((unsigned char)(x))
    +# define sqlite3Isspace(x)   isspace((unsigned char)(x))
    +# define sqlite3Isalnum(x)   isalnum((unsigned char)(x))
    +# define sqlite3Isalpha(x)   isalpha((unsigned char)(x))
    +# define sqlite3Isdigit(x)   isdigit((unsigned char)(x))
    +# define sqlite3Isxdigit(x)  isxdigit((unsigned char)(x))
    +# define sqlite3Tolower(x)   tolower((unsigned char)(x))
    +#endif
    +
    +/*
    +** Internal function prototypes
    +*/
    +SQLITE_PRIVATE int sqlite3StrICmp(const char *, const char *);
    +SQLITE_PRIVATE int sqlite3IsNumber(const char*, int*, u8);
    +SQLITE_PRIVATE int sqlite3Strlen30(const char*);
    +#define sqlite3StrNICmp sqlite3_strnicmp
    +
    +SQLITE_PRIVATE int sqlite3MallocInit(void);
    +SQLITE_PRIVATE void sqlite3MallocEnd(void);
    +SQLITE_PRIVATE void *sqlite3Malloc(int);
    +SQLITE_PRIVATE void *sqlite3MallocZero(int);
    +SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, int);
    +SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, int);
    +SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
    +SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
    +SQLITE_PRIVATE void *sqlite3Realloc(void*, int);
    +SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
    +SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, int);
    +SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
    +SQLITE_PRIVATE int sqlite3MallocSize(void*);
    +SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
    +SQLITE_PRIVATE void *sqlite3ScratchMalloc(int);
    +SQLITE_PRIVATE void sqlite3ScratchFree(void*);
    +SQLITE_PRIVATE void *sqlite3PageMalloc(int);
    +SQLITE_PRIVATE void sqlite3PageFree(void*);
    +SQLITE_PRIVATE void sqlite3MemSetDefault(void);
    +SQLITE_PRIVATE void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));
    +SQLITE_PRIVATE int sqlite3MemoryAlarm(void (*)(void*, sqlite3_int64, int), void*, sqlite3_int64);
    +
    +/*
    +** On systems with ample stack space and that support alloca(), make
    +** use of alloca() to obtain space for large automatic objects.  By default,
    +** obtain space from malloc().
    +**
    +** The alloca() routine never returns NULL.  This will cause code paths
    +** that deal with sqlite3StackAlloc() failures to be unreachable.
    +*/
    +#ifdef SQLITE_USE_ALLOCA
    +# define sqlite3StackAllocRaw(D,N)   alloca(N)
    +# define sqlite3StackAllocZero(D,N)  memset(alloca(N), 0, N)
    +# define sqlite3StackFree(D,P)       
    +#else
    +# define sqlite3StackAllocRaw(D,N)   sqlite3DbMallocRaw(D,N)
    +# define sqlite3StackAllocZero(D,N)  sqlite3DbMallocZero(D,N)
    +# define sqlite3StackFree(D,P)       sqlite3DbFree(D,P)
    +#endif
    +
    +#ifdef SQLITE_ENABLE_MEMSYS3
    +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
    +#endif
    +#ifdef SQLITE_ENABLE_MEMSYS5
    +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
    +#endif
    +
    +
    +#ifndef SQLITE_MUTEX_OMIT
    +SQLITE_PRIVATE   sqlite3_mutex_methods *sqlite3DefaultMutex(void);
    +SQLITE_PRIVATE   sqlite3_mutex *sqlite3MutexAlloc(int);
    +SQLITE_PRIVATE   int sqlite3MutexInit(void);
    +SQLITE_PRIVATE   int sqlite3MutexEnd(void);
    +#endif
    +
    +SQLITE_PRIVATE int sqlite3StatusValue(int);
    +SQLITE_PRIVATE void sqlite3StatusAdd(int, int);
    +SQLITE_PRIVATE void sqlite3StatusSet(int, int);
    +
    +SQLITE_PRIVATE int sqlite3IsNaN(double);
    +
    +SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, int, const char*, va_list);
    +SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
    +SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
    +SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
    +#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
    +SQLITE_PRIVATE   void sqlite3DebugPrintf(const char*, ...);
    +#endif
    +#if defined(SQLITE_TEST)
    +SQLITE_PRIVATE   void *sqlite3TestTextToPtr(const char*);
    +#endif
    +SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
    +SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);
    +SQLITE_PRIVATE void sqlite3ErrorClear(Parse*);
    +SQLITE_PRIVATE int sqlite3Dequote(char*);
    +SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);
    +SQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*, char **);
    +SQLITE_PRIVATE void sqlite3FinishCoding(Parse*);
    +SQLITE_PRIVATE int sqlite3GetTempReg(Parse*);
    +SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse*,int);
    +SQLITE_PRIVATE int sqlite3GetTempRange(Parse*,int);
    +SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse*,int,int);
    +SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
    +SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
    +SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
    +SQLITE_PRIVATE Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*, const Token*);
    +SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
    +SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*);
    +SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*);
    +SQLITE_PRIVATE void sqlite3ExprClear(sqlite3*, Expr*);
    +SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
    +SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);
    +SQLITE_PRIVATE void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);
    +SQLITE_PRIVATE void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);
    +SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
    +SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
    +SQLITE_PRIVATE int sqlite3InitCallback(void*, int, char**, char**);
    +SQLITE_PRIVATE void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
    +SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3*, int);
    +SQLITE_PRIVATE void sqlite3BeginParse(Parse*,int);
    +SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
    +SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*);
    +SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *, int);
    +SQLITE_PRIVATE void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);
    +SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token*);
    +SQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);
    +SQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
    +SQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*);
    +SQLITE_PRIVATE void sqlite3AddColumnType(Parse*,Token*);
    +SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,ExprSpan*);
    +SQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);
    +SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,Select*);
    +
    +SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
    +SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
    +SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
    +SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
    +SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec*);
    +SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
    +SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int,int*);
    +
    +SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
    +SQLITE_PRIVATE void sqlite3RowSetClear(RowSet*);
    +SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet*, i64);
    +SQLITE_PRIVATE int sqlite3RowSetTest(RowSet*, u8 iBatch, i64);
    +SQLITE_PRIVATE int sqlite3RowSetNext(RowSet*, i64*);
    +
    +SQLITE_PRIVATE void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int,int);
    +
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
    +SQLITE_PRIVATE   int sqlite3ViewGetColumnNames(Parse*,Table*);
    +#else
    +# define sqlite3ViewGetColumnNames(A,B) 0
    +#endif
    +
    +SQLITE_PRIVATE void sqlite3DropTable(Parse*, SrcList*, int, int);
    +SQLITE_PRIVATE void sqlite3DeleteTable(Table*);
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +SQLITE_PRIVATE   void sqlite3AutoincrementBegin(Parse *pParse);
    +SQLITE_PRIVATE   void sqlite3AutoincrementEnd(Parse *pParse);
    +#else
    +# define sqlite3AutoincrementBegin(X)
    +# define sqlite3AutoincrementEnd(X)
    +#endif
    +SQLITE_PRIVATE void sqlite3Insert(Parse*, SrcList*, ExprList*, Select*, IdList*, int);
    +SQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int,int*,int*,int*);
    +SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);
    +SQLITE_PRIVATE int sqlite3IdListIndex(IdList*,const char*);
    +SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);
    +SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);
    +SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(Parse*, SrcList*, Token*, Token*,
    +                                      Token*, Select*, Expr*, IdList*);
    +SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *, SrcList *, Token *);
    +SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *, struct SrcList_item *);
    +SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList*);
    +SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*);
    +SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
    +SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
    +SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
    +                        Token*, int, int);
    +SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
    +SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
    +SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
    +                         Expr*,ExprList*,int,Expr*,Expr*);
    +SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
    +SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
    +SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
    +SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);
    +#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
    +SQLITE_PRIVATE Expr *sqlite3LimitWhere(Parse *, SrcList *, Expr *, ExprList *, Expr *, Expr *, char *);
    +#endif
    +SQLITE_PRIVATE void sqlite3DeleteFrom(Parse*, SrcList*, Expr*);
    +SQLITE_PRIVATE void sqlite3Update(Parse*, SrcList*, ExprList*, Expr*, int);
    +SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(Parse*, SrcList*, Expr*, ExprList**, u16);
    +SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo*);
    +SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, int);
    +SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int);
    +SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, int, int, int);
    +SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse*, int, int, int);
    +SQLITE_PRIVATE void sqlite3ExprCachePush(Parse*);
    +SQLITE_PRIVATE void sqlite3ExprCachePop(Parse*, int);
    +SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse*, int);
    +SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse*);
    +SQLITE_PRIVATE void sqlite3ExprCacheAffinityChange(Parse*, int, int);
    +SQLITE_PRIVATE void sqlite3ExprHardCopy(Parse*,int,int);
    +SQLITE_PRIVATE int sqlite3ExprCode(Parse*, Expr*, int);
    +SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
    +SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
    +SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse*, Expr*, int);
    +SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse*, Expr*);
    +SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int);
    +SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int);
    +SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int);
    +SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
    +SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);
    +SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
    +SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
    +SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
    +SQLITE_PRIVATE void sqlite3Vacuum(Parse*);
    +SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
    +SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
    +SQLITE_PRIVATE int sqlite3ExprCompare(Expr*, Expr*);
    +SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
    +SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
    +SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*);
    +SQLITE_PRIVATE void sqlite3PrngSaveState(void);
    +SQLITE_PRIVATE void sqlite3PrngRestoreState(void);
    +SQLITE_PRIVATE void sqlite3PrngResetState(void);
    +SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*);
    +SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse*, int);
    +SQLITE_PRIVATE void sqlite3BeginTransaction(Parse*, int);
    +SQLITE_PRIVATE void sqlite3CommitTransaction(Parse*);
    +SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse*);
    +SQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*);
    +SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
    +SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr*);
    +SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr*);
    +SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*);
    +SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr*, int*);
    +SQLITE_PRIVATE int sqlite3IsRowid(const char*);
    +SQLITE_PRIVATE void sqlite3GenerateRowDelete(Parse*, Table*, int, int, int, Trigger *, int);
    +SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int*);
    +SQLITE_PRIVATE int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int);
    +SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(Parse*,Table*,int,int,
    +                                     int*,int,int,int,int,int*);
    +SQLITE_PRIVATE void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*, int, int, int);
    +SQLITE_PRIVATE int sqlite3OpenTableAndIndices(Parse*, Table*, int, int);
    +SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse*, int, int);
    +SQLITE_PRIVATE void sqlite3MultiWrite(Parse*);
    +SQLITE_PRIVATE void sqlite3MayAbort(Parse*);
    +SQLITE_PRIVATE void sqlite3HaltConstraint(Parse*, int, char*, int);
    +SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
    +SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
    +SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
    +SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,IdList*);
    +SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,Select*,int);
    +SQLITE_PRIVATE void sqlite3FuncDefInsert(FuncDefHash*, FuncDef*);
    +SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int);
    +SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
    +SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void);
    +SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void);
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE   int sqlite3SafetyOn(sqlite3*);
    +SQLITE_PRIVATE   int sqlite3SafetyOff(sqlite3*);
    +#else
    +# define sqlite3SafetyOn(A) 0
    +# define sqlite3SafetyOff(A) 0
    +#endif
    +SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
    +SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
    +SQLITE_PRIVATE void sqlite3ChangeCookie(Parse*, int);
    +
    +#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
    +SQLITE_PRIVATE void sqlite3MaterializeView(Parse*, Table*, Expr*, int);
    +#endif
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +SQLITE_PRIVATE   void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,
    +                           Expr*,int, int);
    +SQLITE_PRIVATE   void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);
    +SQLITE_PRIVATE   void sqlite3DropTrigger(Parse*, SrcList*, int);
    +SQLITE_PRIVATE   void sqlite3DropTriggerPtr(Parse*, Trigger*);
    +SQLITE_PRIVATE   Trigger *sqlite3TriggersExist(Parse *, Table*, int, ExprList*, int *pMask);
    +SQLITE_PRIVATE   Trigger *sqlite3TriggerList(Parse *, Table *);
    +SQLITE_PRIVATE   void sqlite3CodeRowTrigger(Parse*, Trigger *, int, ExprList*, int, Table *,
    +                            int, int, int);
    +SQLITE_PRIVATE   void sqlite3CodeRowTriggerDirect(Parse *, Trigger *, Table *, int, int, int);
    +  void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*);
    +SQLITE_PRIVATE   void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);
    +SQLITE_PRIVATE   TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
    +SQLITE_PRIVATE   TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
    +                                        ExprList*,Select*,u8);
    +SQLITE_PRIVATE   TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);
    +SQLITE_PRIVATE   TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
    +SQLITE_PRIVATE   void sqlite3DeleteTrigger(sqlite3*, Trigger*);
    +SQLITE_PRIVATE   void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
    +SQLITE_PRIVATE   u32 sqlite3TriggerOldmask(Parse*,Trigger*,ExprList*,Table*,int);
    +# define sqlite3ParseToplevel(p) ((p)->pToplevel ? (p)->pToplevel : (p))
    +#else
    +# define sqlite3TriggersExist(B,C,D,E,F) 0
    +# define sqlite3DeleteTrigger(A,B)
    +# define sqlite3DropTriggerPtr(A,B)
    +# define sqlite3UnlinkAndDeleteTrigger(A,B,C)
    +# define sqlite3CodeRowTrigger(A,B,C,D,E,F,G,H,I)
    +# define sqlite3CodeRowTriggerDirect(A,B,C,D,E,F)
    +# define sqlite3TriggerList(X, Y) 0
    +# define sqlite3ParseToplevel(p) p
    +# define sqlite3TriggerOldmask(A,B,C,D,E) 0
    +#endif
    +
    +SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);
    +SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);
    +SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +SQLITE_PRIVATE   void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);
    +SQLITE_PRIVATE   int sqlite3AuthCheck(Parse*,int, const char*, const char*, const char*);
    +SQLITE_PRIVATE   void sqlite3AuthContextPush(Parse*, AuthContext*, const char*);
    +SQLITE_PRIVATE   void sqlite3AuthContextPop(AuthContext*);
    +SQLITE_PRIVATE   int sqlite3AuthReadCol(Parse*, const char *, const char *, int);
    +#else
    +# define sqlite3AuthRead(a,b,c,d)
    +# define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK
    +# define sqlite3AuthContextPush(a,b,c)
    +# define sqlite3AuthContextPop(a)  ((void)(a))
    +#endif
    +SQLITE_PRIVATE void sqlite3Attach(Parse*, Expr*, Expr*, Expr*);
    +SQLITE_PRIVATE void sqlite3Detach(Parse*, Expr*);
    +SQLITE_PRIVATE int sqlite3BtreeFactory(sqlite3 *db, const char *zFilename,
    +                       int omitJournal, int nCache, int flags, Btree **ppBtree);
    +SQLITE_PRIVATE int sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);
    +SQLITE_PRIVATE int sqlite3FixSrcList(DbFixer*, SrcList*);
    +SQLITE_PRIVATE int sqlite3FixSelect(DbFixer*, Select*);
    +SQLITE_PRIVATE int sqlite3FixExpr(DbFixer*, Expr*);
    +SQLITE_PRIVATE int sqlite3FixExprList(DbFixer*, ExprList*);
    +SQLITE_PRIVATE int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
    +SQLITE_PRIVATE int sqlite3AtoF(const char *z, double*);
    +SQLITE_PRIVATE int sqlite3GetInt32(const char *, int*);
    +SQLITE_PRIVATE int sqlite3FitsIn64Bits(const char *, int);
    +SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *pData, int nChar);
    +SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
    +SQLITE_PRIVATE int sqlite3Utf8Read(const u8*, const u8**);
    +
    +/*
    +** Routines to read and write variable-length integers.  These used to
    +** be defined locally, but now we use the varint routines in the util.c
    +** file.  Code should use the MACRO forms below, as the Varint32 versions
    +** are coded to assume the single byte case is already handled (which 
    +** the MACRO form does).
    +*/
    +SQLITE_PRIVATE int sqlite3PutVarint(unsigned char*, u64);
    +SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char*, u32);
    +SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *, u64 *);
    +SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
    +SQLITE_PRIVATE int sqlite3VarintLen(u64 v);
    +
    +/*
    +** The header of a record consists of a sequence variable-length integers.
    +** These integers are almost always small and are encoded as a single byte.
    +** The following macros take advantage this fact to provide a fast encode
    +** and decode of the integers in a record header.  It is faster for the common
    +** case where the integer is a single byte.  It is a little slower when the
    +** integer is two or more bytes.  But overall it is faster.
    +**
    +** The following expressions are equivalent:
    +**
    +**     x = sqlite3GetVarint32( A, &B );
    +**     x = sqlite3PutVarint32( A, B );
    +**
    +**     x = getVarint32( A, B );
    +**     x = putVarint32( A, B );
    +**
    +*/
    +#define getVarint32(A,B)  (u8)((*(A)<(u8)0x80) ? ((B) = (u32)*(A)),1 : sqlite3GetVarint32((A), (u32 *)&(B)))
    +#define putVarint32(A,B)  (u8)(((u32)(B)<(u32)0x80) ? (*(A) = (unsigned char)(B)),1 : sqlite3PutVarint32((A), (B)))
    +#define getVarint    sqlite3GetVarint
    +#define putVarint    sqlite3PutVarint
    +
    +
    +SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *, Index *);
    +SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *, Table *);
    +SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2);
    +SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
    +SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr);
    +SQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*);
    +SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
    +SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
    +SQLITE_PRIVATE int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
    +SQLITE_PRIVATE const char *sqlite3ErrStr(int);
    +SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse);
    +SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
    +SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
    +SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr);
    +SQLITE_PRIVATE Expr *sqlite3ExprSetColl(Parse *pParse, Expr *, Token *);
    +SQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *, CollSeq *);
    +SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *, const char *);
    +SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
    +
    +SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8);
    +SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8);
    +SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8, 
    +                        void(*)(void*));
    +SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value*);
    +SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
    +SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int);
    +#ifdef SQLITE_ENABLE_STAT2
    +SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *);
    +#endif
    +SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
    +SQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
    +#ifndef SQLITE_AMALGAMATION
    +SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
    +SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
    +SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;
    +SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
    +SQLITE_PRIVATE int sqlite3PendingByte;
    +#endif
    +SQLITE_PRIVATE void sqlite3RootPageMoved(Db*, int, int);
    +SQLITE_PRIVATE void sqlite3Reindex(Parse*, Token*, Token*);
    +SQLITE_PRIVATE void sqlite3AlterFunctions(sqlite3*);
    +SQLITE_PRIVATE void sqlite3AlterRenameTable(Parse*, SrcList*, Token*);
    +SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
    +SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
    +SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
    +SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
    +SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
    +SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
    +SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
    +SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
    +SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
    +SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
    +SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);
    +SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(sqlite3*, u8, CollSeq *, const char*);
    +SQLITE_PRIVATE char sqlite3AffinityType(const char*);
    +SQLITE_PRIVATE void sqlite3Analyze(Parse*, Token*, Token*);
    +SQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler*);
    +SQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);
    +SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
    +SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);
    +SQLITE_PRIVATE void sqlite3DeleteIndexSamples(Index*);
    +SQLITE_PRIVATE void sqlite3DefaultRowEst(Index*);
    +SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
    +SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
    +SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse*, int, int);
    +SQLITE_PRIVATE void sqlite3SchemaFree(void *);
    +SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
    +SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
    +SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *, Index *);
    +SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *, 
    +  void (*)(sqlite3_context*,int,sqlite3_value **),
    +  void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*));
    +SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
    +SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *);
    +
    +SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, char*, int, int);
    +SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum*,const char*,int);
    +SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*);
    +SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum*);
    +SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest*,int,int);
    +SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
    +
    +SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *);
    +SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);
    +
    +/*
    +** The interface to the LEMON-generated parser
    +*/
    +SQLITE_PRIVATE void *sqlite3ParserAlloc(void*(*)(size_t));
    +SQLITE_PRIVATE void sqlite3ParserFree(void*, void(*)(void*));
    +SQLITE_PRIVATE void sqlite3Parser(void*, int, Token, Parse*);
    +#ifdef YYTRACKMAXSTACKDEPTH
    +SQLITE_PRIVATE   int sqlite3ParserStackPeak(void*);
    +#endif
    +
    +SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +SQLITE_PRIVATE   void sqlite3CloseExtensions(sqlite3*);
    +#else
    +# define sqlite3CloseExtensions(X)
    +#endif
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +SQLITE_PRIVATE   void sqlite3TableLock(Parse *, int, int, u8, const char *);
    +#else
    +  #define sqlite3TableLock(v,w,x,y,z)
    +#endif
    +
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE   int sqlite3Utf8To8(unsigned char*);
    +#endif
    +
    +#ifdef SQLITE_OMIT_VIRTUALTABLE
    +#  define sqlite3VtabClear(Y)
    +#  define sqlite3VtabSync(X,Y) SQLITE_OK
    +#  define sqlite3VtabRollback(X)
    +#  define sqlite3VtabCommit(X)
    +#  define sqlite3VtabInSync(db) 0
    +#  define sqlite3VtabLock(X) 
    +#  define sqlite3VtabUnlock(X)
    +#  define sqlite3VtabUnlockList(X)
    +#else
    +SQLITE_PRIVATE    void sqlite3VtabClear(Table*);
    +SQLITE_PRIVATE    int sqlite3VtabSync(sqlite3 *db, char **);
    +SQLITE_PRIVATE    int sqlite3VtabRollback(sqlite3 *db);
    +SQLITE_PRIVATE    int sqlite3VtabCommit(sqlite3 *db);
    +SQLITE_PRIVATE    void sqlite3VtabLock(VTable *);
    +SQLITE_PRIVATE    void sqlite3VtabUnlock(VTable *);
    +SQLITE_PRIVATE    void sqlite3VtabUnlockList(sqlite3*);
    +#  define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)
    +#endif
    +SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse*,Table*);
    +SQLITE_PRIVATE void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*);
    +SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse*, Token*);
    +SQLITE_PRIVATE void sqlite3VtabArgInit(Parse*);
    +SQLITE_PRIVATE void sqlite3VtabArgExtend(Parse*, Token*);
    +SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
    +SQLITE_PRIVATE int sqlite3VtabCallConnect(Parse*, Table*);
    +SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
    +SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);
    +SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);
    +SQLITE_PRIVATE void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);
    +SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *, sqlite3_stmt *);
    +SQLITE_PRIVATE int sqlite3Reprepare(Vdbe*);
    +SQLITE_PRIVATE void sqlite3ExprListCheckLength(Parse*, ExprList*, const char*);
    +SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
    +SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);
    +SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
    +
    +/* Declarations for functions in fkey.c. All of these are replaced by
    +** no-op macros if OMIT_FOREIGN_KEY is defined. In this case no foreign
    +** key functionality is available. If OMIT_TRIGGER is defined but
    +** OMIT_FOREIGN_KEY is not, only some of the functions are no-oped. In
    +** this case foreign keys are parsed, but no other functionality is 
    +** provided (enforcement of FK constraints requires the triggers sub-system).
    +*/
    +#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
    +SQLITE_PRIVATE   void sqlite3FkCheck(Parse*, Table*, int, int);
    +SQLITE_PRIVATE   void sqlite3FkDropTable(Parse*, SrcList *, Table*);
    +SQLITE_PRIVATE   void sqlite3FkActions(Parse*, Table*, ExprList*, int);
    +SQLITE_PRIVATE   int sqlite3FkRequired(Parse*, Table*, int*, int);
    +SQLITE_PRIVATE   u32 sqlite3FkOldmask(Parse*, Table*);
    +SQLITE_PRIVATE   FKey *sqlite3FkReferences(Table *);
    +#else
    +  #define sqlite3FkActions(a,b,c,d)
    +  #define sqlite3FkCheck(a,b,c,d)
    +  #define sqlite3FkDropTable(a,b,c)
    +  #define sqlite3FkOldmask(a,b)      0
    +  #define sqlite3FkRequired(a,b,c,d) 0
    +#endif
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +SQLITE_PRIVATE   void sqlite3FkDelete(Table*);
    +#else
    +  #define sqlite3FkDelete(a)
    +#endif
    +
    +
    +/*
    +** Available fault injectors.  Should be numbered beginning with 0.
    +*/
    +#define SQLITE_FAULTINJECTOR_MALLOC     0
    +#define SQLITE_FAULTINJECTOR_COUNT      1
    +
    +/*
    +** The interface to the code in fault.c used for identifying "benign"
    +** malloc failures. This is only present if SQLITE_OMIT_BUILTIN_TEST
    +** is not defined.
    +*/
    +#ifndef SQLITE_OMIT_BUILTIN_TEST
    +SQLITE_PRIVATE   void sqlite3BeginBenignMalloc(void);
    +SQLITE_PRIVATE   void sqlite3EndBenignMalloc(void);
    +#else
    +  #define sqlite3BeginBenignMalloc()
    +  #define sqlite3EndBenignMalloc()
    +#endif
    +
    +#define IN_INDEX_ROWID           1
    +#define IN_INDEX_EPH             2
    +#define IN_INDEX_INDEX           3
    +SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, int*);
    +
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +SQLITE_PRIVATE   int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
    +SQLITE_PRIVATE   int sqlite3JournalSize(sqlite3_vfs *);
    +SQLITE_PRIVATE   int sqlite3JournalCreate(sqlite3_file *);
    +#else
    +  #define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile)
    +#endif
    +
    +SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *);
    +SQLITE_PRIVATE int sqlite3MemJournalSize(void);
    +SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *);
    +
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +SQLITE_PRIVATE   void sqlite3ExprSetHeight(Parse *pParse, Expr *p);
    +SQLITE_PRIVATE   int sqlite3SelectExprHeight(Select *);
    +SQLITE_PRIVATE   int sqlite3ExprCheckHeight(Parse*, int);
    +#else
    +  #define sqlite3ExprSetHeight(x,y)
    +  #define sqlite3SelectExprHeight(x) 0
    +  #define sqlite3ExprCheckHeight(x,y)
    +#endif
    +
    +SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
    +SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
    +
    +#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
    +SQLITE_PRIVATE   void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);
    +SQLITE_PRIVATE   void sqlite3ConnectionUnlocked(sqlite3 *db);
    +SQLITE_PRIVATE   void sqlite3ConnectionClosed(sqlite3 *db);
    +#else
    +  #define sqlite3ConnectionBlocked(x,y)
    +  #define sqlite3ConnectionUnlocked(x)
    +  #define sqlite3ConnectionClosed(x)
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE   void sqlite3ParserTrace(FILE*, char *);
    +#endif
    +
    +/*
    +** If the SQLITE_ENABLE IOTRACE exists then the global variable
    +** sqlite3IoTrace is a pointer to a printf-like routine used to
    +** print I/O tracing messages. 
    +*/
    +#ifdef SQLITE_ENABLE_IOTRACE
    +# define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }
    +SQLITE_PRIVATE   void sqlite3VdbeIOTraceSql(Vdbe*);
    +SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*,...);
    +#else
    +# define IOTRACE(A)
    +# define sqlite3VdbeIOTraceSql(X)
    +#endif
    +
    +#endif
    +
    +/************** End of sqliteInt.h *******************************************/
    +/************** Begin file global.c ******************************************/
    +/*
    +** 2008 June 13
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains definitions of global variables and contants.
    +*/
    +
    +
    +/* An array to map all upper-case characters into their corresponding
    +** lower-case character. 
    +**
    +** SQLite only considers US-ASCII (or EBCDIC) characters.  We do not
    +** handle case conversions for the UTF character set since the tables
    +** involved are nearly as big or bigger than SQLite itself.
    +*/
    +SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
    +#ifdef SQLITE_ASCII
    +      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
    +     18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
    +     36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
    +     54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99,100,101,102,103,
    +    104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,
    +    122, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,
    +    108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,
    +    126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
    +    144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,
    +    162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,
    +    180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,
    +    198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,
    +    216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,
    +    234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,
    +    252,253,254,255
    +#endif
    +#ifdef SQLITE_EBCDIC
    +      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, /* 0x */
    +     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */
    +     32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */
    +     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */
    +     64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */
    +     80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */
    +     96, 97, 66, 67, 68, 69, 70, 71, 72, 73,106,107,108,109,110,111, /* 6x */
    +    112, 81, 82, 83, 84, 85, 86, 87, 88, 89,122,123,124,125,126,127, /* 7x */
    +    128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */
    +    144,145,146,147,148,149,150,151,152,153,154,155,156,157,156,159, /* 9x */
    +    160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */
    +    176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */
    +    192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */
    +    208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */
    +    224,225,162,163,164,165,166,167,168,169,232,203,204,205,206,207, /* Ex */
    +    239,240,241,242,243,244,245,246,247,248,249,219,220,221,222,255, /* Fx */
    +#endif
    +};
    +
    +/*
    +** The following 256 byte lookup table is used to support SQLites built-in
    +** equivalents to the following standard library functions:
    +**
    +**   isspace()                        0x01
    +**   isalpha()                        0x02
    +**   isdigit()                        0x04
    +**   isalnum()                        0x06
    +**   isxdigit()                       0x08
    +**   toupper()                        0x20
    +**
    +** Bit 0x20 is set if the mapped character requires translation to upper
    +** case. i.e. if the character is a lower-case ASCII character.
    +** If x is a lower-case ASCII character, then its upper-case equivalent
    +** is (x - 0x20). Therefore toupper() can be implemented as:
    +**
    +**   (x & ~(map[x]&0x20))
    +**
    +** Standard function tolower() is implemented using the sqlite3UpperToLower[]
    +** array. tolower() is used more often than toupper() by SQLite.
    +**
    +** SQLite's versions are identical to the standard versions assuming a
    +** locale of "C". They are implemented as macros in sqliteInt.h.
    +*/
    +#ifdef SQLITE_ASCII
    +SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 00..07    ........ */
    +  0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,  /* 08..0f    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 10..17    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 18..1f    ........ */
    +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 20..27     !"#$%&' */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 28..2f    ()*+,-./ */
    +  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,  /* 30..37    01234567 */
    +  0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 38..3f    89:;<=>? */
    +
    +  0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02,  /* 40..47    @ABCDEFG */
    +  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 48..4f    HIJKLMNO */
    +  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 50..57    PQRSTUVW */
    +  0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 58..5f    XYZ[\]^_ */
    +  0x00, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22,  /* 60..67    `abcdefg */
    +  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 68..6f    hijklmno */
    +  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 70..77    pqrstuvw */
    +  0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 78..7f    xyz{|}~. */
    +
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 80..87    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 88..8f    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 90..97    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 98..9f    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* a0..a7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* a8..af    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* b0..b7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* b8..bf    ........ */
    +
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* c0..c7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* c8..cf    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* d0..d7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* d8..df    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* e0..e7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* e8..ef    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* f0..f7    ........ */
    +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   /* f8..ff    ........ */
    +};
    +#endif
    +
    +
    +
    +/*
    +** The following singleton contains the global configuration for
    +** the SQLite library.
    +*/
    +SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
    +   SQLITE_DEFAULT_MEMSTATUS,  /* bMemstat */
    +   1,                         /* bCoreMutex */
    +   SQLITE_THREADSAFE==1,      /* bFullMutex */
    +   0x7ffffffe,                /* mxStrlen */
    +   100,                       /* szLookaside */
    +   500,                       /* nLookaside */
    +   {0,0,0,0,0,0,0,0},         /* m */
    +   {0,0,0,0,0,0,0,0,0},       /* mutex */
    +   {0,0,0,0,0,0,0,0,0,0,0},   /* pcache */
    +   (void*)0,                  /* pHeap */
    +   0,                         /* nHeap */
    +   0, 0,                      /* mnHeap, mxHeap */
    +   (void*)0,                  /* pScratch */
    +   0,                         /* szScratch */
    +   0,                         /* nScratch */
    +   (void*)0,                  /* pPage */
    +   0,                         /* szPage */
    +   0,                         /* nPage */
    +   0,                         /* mxParserStack */
    +   0,                         /* sharedCacheEnabled */
    +   /* All the rest should always be initialized to zero */
    +   0,                         /* isInit */
    +   0,                         /* inProgress */
    +   0,                         /* isMutexInit */
    +   0,                         /* isMallocInit */
    +   0,                         /* isPCacheInit */
    +   0,                         /* pInitMutex */
    +   0,                         /* nRefInitMutex */
    +};
    +
    +
    +/*
    +** Hash table for global functions - functions common to all
    +** database connections.  After initialization, this table is
    +** read-only.
    +*/
    +SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
    +
    +/*
    +** The value of the "pending" byte must be 0x40000000 (1 byte past the
    +** 1-gibabyte boundary) in a compatible database.  SQLite never uses
    +** the database page that contains the pending byte.  It never attempts
    +** to read or write that page.  The pending byte page is set assign
    +** for use by the VFS layers as space for managing file locks.
    +**
    +** During testing, it is often desirable to move the pending byte to
    +** a different position in the file.  This allows code that has to
    +** deal with the pending byte to run on files that are much smaller
    +** than 1 GiB.  The sqlite3_test_control() interface can be used to
    +** move the pending byte.
    +**
    +** IMPORTANT:  Changing the pending byte to any value other than
    +** 0x40000000 results in an incompatible database file format!
    +** Changing the pending byte during operating results in undefined
    +** and dileterious behavior.
    +*/
    +SQLITE_PRIVATE int sqlite3PendingByte = 0x40000000;
    +
    +/************** End of global.c **********************************************/
    +/************** Begin file status.c ******************************************/
    +/*
    +** 2008 June 18
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This module implements the sqlite3_status() interface and related
    +** functionality.
    +**
    +** $Id: status.c,v 1.9 2008/09/02 00:52:52 drh Exp $
    +*/
    +
    +/*
    +** Variables in which to record status information.
    +*/
    +typedef struct sqlite3StatType sqlite3StatType;
    +static SQLITE_WSD struct sqlite3StatType {
    +  int nowValue[9];         /* Current value */
    +  int mxValue[9];          /* Maximum value */
    +} sqlite3Stat = { {0,}, {0,} };
    +
    +
    +/* The "wsdStat" macro will resolve to the status information
    +** state vector.  If writable static data is unsupported on the target,
    +** we have to locate the state vector at run-time.  In the more common
    +** case where writable static data is supported, wsdStat can refer directly
    +** to the "sqlite3Stat" state vector declared above.
    +*/
    +#ifdef SQLITE_OMIT_WSD
    +# define wsdStatInit  sqlite3StatType *x = &GLOBAL(sqlite3StatType,sqlite3Stat)
    +# define wsdStat x[0]
    +#else
    +# define wsdStatInit
    +# define wsdStat sqlite3Stat
    +#endif
    +
    +/*
    +** Return the current value of a status parameter.
    +*/
    +SQLITE_PRIVATE int sqlite3StatusValue(int op){
    +  wsdStatInit;
    +  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
    +  return wsdStat.nowValue[op];
    +}
    +
    +/*
    +** Add N to the value of a status record.  It is assumed that the
    +** caller holds appropriate locks.
    +*/
    +SQLITE_PRIVATE void sqlite3StatusAdd(int op, int N){
    +  wsdStatInit;
    +  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
    +  wsdStat.nowValue[op] += N;
    +  if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){
    +    wsdStat.mxValue[op] = wsdStat.nowValue[op];
    +  }
    +}
    +
    +/*
    +** Set the value of a status to X.
    +*/
    +SQLITE_PRIVATE void sqlite3StatusSet(int op, int X){
    +  wsdStatInit;
    +  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
    +  wsdStat.nowValue[op] = X;
    +  if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){
    +    wsdStat.mxValue[op] = wsdStat.nowValue[op];
    +  }
    +}
    +
    +/*
    +** Query status information.
    +**
    +** This implementation assumes that reading or writing an aligned
    +** 32-bit integer is an atomic operation.  If that assumption is not true,
    +** then this routine is not threadsafe.
    +*/
    +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
    +  wsdStatInit;
    +  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
    +    return SQLITE_MISUSE;
    +  }
    +  *pCurrent = wsdStat.nowValue[op];
    +  *pHighwater = wsdStat.mxValue[op];
    +  if( resetFlag ){
    +    wsdStat.mxValue[op] = wsdStat.nowValue[op];
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Query status information for a single database connection
    +*/
    +SQLITE_API int sqlite3_db_status(
    +  sqlite3 *db,          /* The database connection whose status is desired */
    +  int op,               /* Status verb */
    +  int *pCurrent,        /* Write current value here */
    +  int *pHighwater,      /* Write high-water mark here */
    +  int resetFlag         /* Reset high-water mark if true */
    +){
    +  switch( op ){
    +    case SQLITE_DBSTATUS_LOOKASIDE_USED: {
    +      *pCurrent = db->lookaside.nOut;
    +      *pHighwater = db->lookaside.mxOut;
    +      if( resetFlag ){
    +        db->lookaside.mxOut = db->lookaside.nOut;
    +      }
    +      break;
    +    }
    +    default: {
    +      return SQLITE_ERROR;
    +    }
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/************** End of status.c **********************************************/
    +/************** Begin file date.c ********************************************/
    +/*
    +** 2003 October 31
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement date and time
    +** functions for SQLite.  
    +**
    +** There is only one exported symbol in this file - the function
    +** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
    +** All other code has file scope.
    +**
    +** $Id: date.c,v 1.107 2009/05/03 20:23:53 drh Exp $
    +**
    +** SQLite processes all times and dates as Julian Day numbers.  The
    +** dates and times are stored as the number of days since noon
    +** in Greenwich on November 24, 4714 B.C. according to the Gregorian
    +** calendar system. 
    +**
    +** 1970-01-01 00:00:00 is JD 2440587.5
    +** 2000-01-01 00:00:00 is JD 2451544.5
    +**
    +** This implemention requires years to be expressed as a 4-digit number
    +** which means that only dates between 0000-01-01 and 9999-12-31 can
    +** be represented, even though julian day numbers allow a much wider
    +** range of dates.
    +**
    +** The Gregorian calendar system is used for all dates and times,
    +** even those that predate the Gregorian calendar.  Historians usually
    +** use the Julian calendar for dates prior to 1582-10-15 and for some
    +** dates afterwards, depending on locale.  Beware of this difference.
    +**
    +** The conversion algorithms are implemented based on descriptions
    +** in the following text:
    +**
    +**      Jean Meeus
    +**      Astronomical Algorithms, 2nd Edition, 1998
    +**      ISBM 0-943396-61-1
    +**      Willmann-Bell, Inc
    +**      Richmond, Virginia (USA)
    +*/
    +#include <time.h>
    +
    +#ifndef SQLITE_OMIT_DATETIME_FUNCS
    +
    +/*
    +** On recent Windows platforms, the localtime_s() function is available
    +** as part of the "Secure CRT". It is essentially equivalent to 
    +** localtime_r() available under most POSIX platforms, except that the 
    +** order of the parameters is reversed.
    +**
    +** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
    +**
    +** If the user has not indicated to use localtime_r() or localtime_s()
    +** already, check for an MSVC build environment that provides 
    +** localtime_s().
    +*/
    +#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
    +     defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
    +#define HAVE_LOCALTIME_S 1
    +#endif
    +
    +/*
    +** A structure for holding a single date and time.
    +*/
    +typedef struct DateTime DateTime;
    +struct DateTime {
    +  sqlite3_int64 iJD; /* The julian day number times 86400000 */
    +  int Y, M, D;       /* Year, month, and day */
    +  int h, m;          /* Hour and minutes */
    +  int tz;            /* Timezone offset in minutes */
    +  double s;          /* Seconds */
    +  char validYMD;     /* True (1) if Y,M,D are valid */
    +  char validHMS;     /* True (1) if h,m,s are valid */
    +  char validJD;      /* True (1) if iJD is valid */
    +  char validTZ;      /* True (1) if tz is valid */
    +};
    +
    +
    +/*
    +** Convert zDate into one or more integers.  Additional arguments
    +** come in groups of 5 as follows:
    +**
    +**       N       number of digits in the integer
    +**       min     minimum allowed value of the integer
    +**       max     maximum allowed value of the integer
    +**       nextC   first character after the integer
    +**       pVal    where to write the integers value.
    +**
    +** Conversions continue until one with nextC==0 is encountered.
    +** The function returns the number of successful conversions.
    +*/
    +static int getDigits(const char *zDate, ...){
    +  va_list ap;
    +  int val;
    +  int N;
    +  int min;
    +  int max;
    +  int nextC;
    +  int *pVal;
    +  int cnt = 0;
    +  va_start(ap, zDate);
    +  do{
    +    N = va_arg(ap, int);
    +    min = va_arg(ap, int);
    +    max = va_arg(ap, int);
    +    nextC = va_arg(ap, int);
    +    pVal = va_arg(ap, int*);
    +    val = 0;
    +    while( N-- ){
    +      if( !sqlite3Isdigit(*zDate) ){
    +        goto end_getDigits;
    +      }
    +      val = val*10 + *zDate - '0';
    +      zDate++;
    +    }
    +    if( val<min || val>max || (nextC!=0 && nextC!=*zDate) ){
    +      goto end_getDigits;
    +    }
    +    *pVal = val;
    +    zDate++;
    +    cnt++;
    +  }while( nextC );
    +end_getDigits:
    +  va_end(ap);
    +  return cnt;
    +}
    +
    +/*
    +** Read text from z[] and convert into a floating point number.  Return
    +** the number of digits converted.
    +*/
    +#define getValue sqlite3AtoF
    +
    +/*
    +** Parse a timezone extension on the end of a date-time.
    +** The extension is of the form:
    +**
    +**        (+/-)HH:MM
    +**
    +** Or the "zulu" notation:
    +**
    +**        Z
    +**
    +** If the parse is successful, write the number of minutes
    +** of change in p->tz and return 0.  If a parser error occurs,
    +** return non-zero.
    +**
    +** A missing specifier is not considered an error.
    +*/
    +static int parseTimezone(const char *zDate, DateTime *p){
    +  int sgn = 0;
    +  int nHr, nMn;
    +  int c;
    +  while( sqlite3Isspace(*zDate) ){ zDate++; }
    +  p->tz = 0;
    +  c = *zDate;
    +  if( c=='-' ){
    +    sgn = -1;
    +  }else if( c=='+' ){
    +    sgn = +1;
    +  }else if( c=='Z' || c=='z' ){
    +    zDate++;
    +    goto zulu_time;
    +  }else{
    +    return c!=0;
    +  }
    +  zDate++;
    +  if( getDigits(zDate, 2, 0, 14, ':', &nHr, 2, 0, 59, 0, &nMn)!=2 ){
    +    return 1;
    +  }
    +  zDate += 5;
    +  p->tz = sgn*(nMn + nHr*60);
    +zulu_time:
    +  while( sqlite3Isspace(*zDate) ){ zDate++; }
    +  return *zDate!=0;
    +}
    +
    +/*
    +** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
    +** The HH, MM, and SS must each be exactly 2 digits.  The
    +** fractional seconds FFFF can be one or more digits.
    +**
    +** Return 1 if there is a parsing error and 0 on success.
    +*/
    +static int parseHhMmSs(const char *zDate, DateTime *p){
    +  int h, m, s;
    +  double ms = 0.0;
    +  if( getDigits(zDate, 2, 0, 24, ':', &h, 2, 0, 59, 0, &m)!=2 ){
    +    return 1;
    +  }
    +  zDate += 5;
    +  if( *zDate==':' ){
    +    zDate++;
    +    if( getDigits(zDate, 2, 0, 59, 0, &s)!=1 ){
    +      return 1;
    +    }
    +    zDate += 2;
    +    if( *zDate=='.' && sqlite3Isdigit(zDate[1]) ){
    +      double rScale = 1.0;
    +      zDate++;
    +      while( sqlite3Isdigit(*zDate) ){
    +        ms = ms*10.0 + *zDate - '0';
    +        rScale *= 10.0;
    +        zDate++;
    +      }
    +      ms /= rScale;
    +    }
    +  }else{
    +    s = 0;
    +  }
    +  p->validJD = 0;
    +  p->validHMS = 1;
    +  p->h = h;
    +  p->m = m;
    +  p->s = s + ms;
    +  if( parseTimezone(zDate, p) ) return 1;
    +  p->validTZ = (p->tz!=0)?1:0;
    +  return 0;
    +}
    +
    +/*
    +** Convert from YYYY-MM-DD HH:MM:SS to julian day.  We always assume
    +** that the YYYY-MM-DD is according to the Gregorian calendar.
    +**
    +** Reference:  Meeus page 61
    +*/
    +static void computeJD(DateTime *p){
    +  int Y, M, D, A, B, X1, X2;
    +
    +  if( p->validJD ) return;
    +  if( p->validYMD ){
    +    Y = p->Y;
    +    M = p->M;
    +    D = p->D;
    +  }else{
    +    Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */
    +    M = 1;
    +    D = 1;
    +  }
    +  if( M<=2 ){
    +    Y--;
    +    M += 12;
    +  }
    +  A = Y/100;
    +  B = 2 - A + (A/4);
    +  X1 = 36525*(Y+4716)/100;
    +  X2 = 306001*(M+1)/10000;
    +  p->iJD = (sqlite3_int64)((X1 + X2 + D + B - 1524.5 ) * 86400000);
    +  p->validJD = 1;
    +  if( p->validHMS ){
    +    p->iJD += p->h*3600000 + p->m*60000 + (sqlite3_int64)(p->s*1000);
    +    if( p->validTZ ){
    +      p->iJD -= p->tz*60000;
    +      p->validYMD = 0;
    +      p->validHMS = 0;
    +      p->validTZ = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** Parse dates of the form
    +**
    +**     YYYY-MM-DD HH:MM:SS.FFF
    +**     YYYY-MM-DD HH:MM:SS
    +**     YYYY-MM-DD HH:MM
    +**     YYYY-MM-DD
    +**
    +** Write the result into the DateTime structure and return 0
    +** on success and 1 if the input string is not a well-formed
    +** date.
    +*/
    +static int parseYyyyMmDd(const char *zDate, DateTime *p){
    +  int Y, M, D, neg;
    +
    +  if( zDate[0]=='-' ){
    +    zDate++;
    +    neg = 1;
    +  }else{
    +    neg = 0;
    +  }
    +  if( getDigits(zDate,4,0,9999,'-',&Y,2,1,12,'-',&M,2,1,31,0,&D)!=3 ){
    +    return 1;
    +  }
    +  zDate += 10;
    +  while( sqlite3Isspace(*zDate) || 'T'==*(u8*)zDate ){ zDate++; }
    +  if( parseHhMmSs(zDate, p)==0 ){
    +    /* We got the time */
    +  }else if( *zDate==0 ){
    +    p->validHMS = 0;
    +  }else{
    +    return 1;
    +  }
    +  p->validJD = 0;
    +  p->validYMD = 1;
    +  p->Y = neg ? -Y : Y;
    +  p->M = M;
    +  p->D = D;
    +  if( p->validTZ ){
    +    computeJD(p);
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Set the time to the current time reported by the VFS
    +*/
    +static void setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
    +  double r;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  sqlite3OsCurrentTime(db->pVfs, &r);
    +  p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);
    +  p->validJD = 1;
    +}
    +
    +/*
    +** Attempt to parse the given string into a Julian Day Number.  Return
    +** the number of errors.
    +**
    +** The following are acceptable forms for the input string:
    +**
    +**      YYYY-MM-DD HH:MM:SS.FFF  +/-HH:MM
    +**      DDDD.DD 
    +**      now
    +**
    +** In the first form, the +/-HH:MM is always optional.  The fractional
    +** seconds extension (the ".FFF") is optional.  The seconds portion
    +** (":SS.FFF") is option.  The year and date can be omitted as long
    +** as there is a time string.  The time string can be omitted as long
    +** as there is a year and date.
    +*/
    +static int parseDateOrTime(
    +  sqlite3_context *context, 
    +  const char *zDate, 
    +  DateTime *p
    +){
    +  int isRealNum;    /* Return from sqlite3IsNumber().  Not used */
    +  if( parseYyyyMmDd(zDate,p)==0 ){
    +    return 0;
    +  }else if( parseHhMmSs(zDate, p)==0 ){
    +    return 0;
    +  }else if( sqlite3StrICmp(zDate,"now")==0){
    +    setDateTimeToCurrent(context, p);
    +    return 0;
    +  }else if( sqlite3IsNumber(zDate, &isRealNum, SQLITE_UTF8) ){
    +    double r;
    +    getValue(zDate, &r);
    +    p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);
    +    p->validJD = 1;
    +    return 0;
    +  }
    +  return 1;
    +}
    +
    +/*
    +** Compute the Year, Month, and Day from the julian day number.
    +*/
    +static void computeYMD(DateTime *p){
    +  int Z, A, B, C, D, E, X1;
    +  if( p->validYMD ) return;
    +  if( !p->validJD ){
    +    p->Y = 2000;
    +    p->M = 1;
    +    p->D = 1;
    +  }else{
    +    Z = (int)((p->iJD + 43200000)/86400000);
    +    A = (int)((Z - 1867216.25)/36524.25);
    +    A = Z + 1 + A - (A/4);
    +    B = A + 1524;
    +    C = (int)((B - 122.1)/365.25);
    +    D = (36525*C)/100;
    +    E = (int)((B-D)/30.6001);
    +    X1 = (int)(30.6001*E);
    +    p->D = B - D - X1;
    +    p->M = E<14 ? E-1 : E-13;
    +    p->Y = p->M>2 ? C - 4716 : C - 4715;
    +  }
    +  p->validYMD = 1;
    +}
    +
    +/*
    +** Compute the Hour, Minute, and Seconds from the julian day number.
    +*/
    +static void computeHMS(DateTime *p){
    +  int s;
    +  if( p->validHMS ) return;
    +  computeJD(p);
    +  s = (int)((p->iJD + 43200000) % 86400000);
    +  p->s = s/1000.0;
    +  s = (int)p->s;
    +  p->s -= s;
    +  p->h = s/3600;
    +  s -= p->h*3600;
    +  p->m = s/60;
    +  p->s += s - p->m*60;
    +  p->validHMS = 1;
    +}
    +
    +/*
    +** Compute both YMD and HMS
    +*/
    +static void computeYMD_HMS(DateTime *p){
    +  computeYMD(p);
    +  computeHMS(p);
    +}
    +
    +/*
    +** Clear the YMD and HMS and the TZ
    +*/
    +static void clearYMD_HMS_TZ(DateTime *p){
    +  p->validYMD = 0;
    +  p->validHMS = 0;
    +  p->validTZ = 0;
    +}
    +
    +#ifndef SQLITE_OMIT_LOCALTIME
    +/*
    +** Compute the difference (in milliseconds)
    +** between localtime and UTC (a.k.a. GMT)
    +** for the time value p where p is in UTC.
    +*/
    +static sqlite3_int64 localtimeOffset(DateTime *p){
    +  DateTime x, y;
    +  time_t t;
    +  x = *p;
    +  computeYMD_HMS(&x);
    +  if( x.Y<1971 || x.Y>=2038 ){
    +    x.Y = 2000;
    +    x.M = 1;
    +    x.D = 1;
    +    x.h = 0;
    +    x.m = 0;
    +    x.s = 0.0;
    +  } else {
    +    int s = (int)(x.s + 0.5);
    +    x.s = s;
    +  }
    +  x.tz = 0;
    +  x.validJD = 0;
    +  computeJD(&x);
    +  t = (time_t)(x.iJD/1000 - 21086676*(i64)10000);
    +#ifdef HAVE_LOCALTIME_R
    +  {
    +    struct tm sLocal;
    +    localtime_r(&t, &sLocal);
    +    y.Y = sLocal.tm_year + 1900;
    +    y.M = sLocal.tm_mon + 1;
    +    y.D = sLocal.tm_mday;
    +    y.h = sLocal.tm_hour;
    +    y.m = sLocal.tm_min;
    +    y.s = sLocal.tm_sec;
    +  }
    +#elif defined(HAVE_LOCALTIME_S) && HAVE_LOCALTIME_S
    +  {
    +    struct tm sLocal;
    +    localtime_s(&sLocal, &t);
    +    y.Y = sLocal.tm_year + 1900;
    +    y.M = sLocal.tm_mon + 1;
    +    y.D = sLocal.tm_mday;
    +    y.h = sLocal.tm_hour;
    +    y.m = sLocal.tm_min;
    +    y.s = sLocal.tm_sec;
    +  }
    +#else
    +  {
    +    struct tm *pTm;
    +    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +    pTm = localtime(&t);
    +    y.Y = pTm->tm_year + 1900;
    +    y.M = pTm->tm_mon + 1;
    +    y.D = pTm->tm_mday;
    +    y.h = pTm->tm_hour;
    +    y.m = pTm->tm_min;
    +    y.s = pTm->tm_sec;
    +    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +  }
    +#endif
    +  y.validYMD = 1;
    +  y.validHMS = 1;
    +  y.validJD = 0;
    +  y.validTZ = 0;
    +  computeJD(&y);
    +  return y.iJD - x.iJD;
    +}
    +#endif /* SQLITE_OMIT_LOCALTIME */
    +
    +/*
    +** Process a modifier to a date-time stamp.  The modifiers are
    +** as follows:
    +**
    +**     NNN days
    +**     NNN hours
    +**     NNN minutes
    +**     NNN.NNNN seconds
    +**     NNN months
    +**     NNN years
    +**     start of month
    +**     start of year
    +**     start of week
    +**     start of day
    +**     weekday N
    +**     unixepoch
    +**     localtime
    +**     utc
    +**
    +** Return 0 on success and 1 if there is any kind of error.
    +*/
    +static int parseModifier(const char *zMod, DateTime *p){
    +  int rc = 1;
    +  int n;
    +  double r;
    +  char *z, zBuf[30];
    +  z = zBuf;
    +  for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){
    +    z[n] = (char)sqlite3UpperToLower[(u8)zMod[n]];
    +  }
    +  z[n] = 0;
    +  switch( z[0] ){
    +#ifndef SQLITE_OMIT_LOCALTIME
    +    case 'l': {
    +      /*    localtime
    +      **
    +      ** Assuming the current time value is UTC (a.k.a. GMT), shift it to
    +      ** show local time.
    +      */
    +      if( strcmp(z, "localtime")==0 ){
    +        computeJD(p);
    +        p->iJD += localtimeOffset(p);
    +        clearYMD_HMS_TZ(p);
    +        rc = 0;
    +      }
    +      break;
    +    }
    +#endif
    +    case 'u': {
    +      /*
    +      **    unixepoch
    +      **
    +      ** Treat the current value of p->iJD as the number of
    +      ** seconds since 1970.  Convert to a real julian day number.
    +      */
    +      if( strcmp(z, "unixepoch")==0 && p->validJD ){
    +        p->iJD = (p->iJD + 43200)/86400 + 21086676*(i64)10000000;
    +        clearYMD_HMS_TZ(p);
    +        rc = 0;
    +      }
    +#ifndef SQLITE_OMIT_LOCALTIME
    +      else if( strcmp(z, "utc")==0 ){
    +        sqlite3_int64 c1;
    +        computeJD(p);
    +        c1 = localtimeOffset(p);
    +        p->iJD -= c1;
    +        clearYMD_HMS_TZ(p);
    +        p->iJD += c1 - localtimeOffset(p);
    +        rc = 0;
    +      }
    +#endif
    +      break;
    +    }
    +    case 'w': {
    +      /*
    +      **    weekday N
    +      **
    +      ** Move the date to the same time on the next occurrence of
    +      ** weekday N where 0==Sunday, 1==Monday, and so forth.  If the
    +      ** date is already on the appropriate weekday, this is a no-op.
    +      */
    +      if( strncmp(z, "weekday ", 8)==0 && getValue(&z[8],&r)>0
    +                 && (n=(int)r)==r && n>=0 && r<7 ){
    +        sqlite3_int64 Z;
    +        computeYMD_HMS(p);
    +        p->validTZ = 0;
    +        p->validJD = 0;
    +        computeJD(p);
    +        Z = ((p->iJD + 129600000)/86400000) % 7;
    +        if( Z>n ) Z -= 7;
    +        p->iJD += (n - Z)*86400000;
    +        clearYMD_HMS_TZ(p);
    +        rc = 0;
    +      }
    +      break;
    +    }
    +    case 's': {
    +      /*
    +      **    start of TTTTT
    +      **
    +      ** Move the date backwards to the beginning of the current day,
    +      ** or month or year.
    +      */
    +      if( strncmp(z, "start of ", 9)!=0 ) break;
    +      z += 9;
    +      computeYMD(p);
    +      p->validHMS = 1;
    +      p->h = p->m = 0;
    +      p->s = 0.0;
    +      p->validTZ = 0;
    +      p->validJD = 0;
    +      if( strcmp(z,"month")==0 ){
    +        p->D = 1;
    +        rc = 0;
    +      }else if( strcmp(z,"year")==0 ){
    +        computeYMD(p);
    +        p->M = 1;
    +        p->D = 1;
    +        rc = 0;
    +      }else if( strcmp(z,"day")==0 ){
    +        rc = 0;
    +      }
    +      break;
    +    }
    +    case '+':
    +    case '-':
    +    case '0':
    +    case '1':
    +    case '2':
    +    case '3':
    +    case '4':
    +    case '5':
    +    case '6':
    +    case '7':
    +    case '8':
    +    case '9': {
    +      double rRounder;
    +      n = getValue(z, &r);
    +      assert( n>=1 );
    +      if( z[n]==':' ){
    +        /* A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the
    +        ** specified number of hours, minutes, seconds, and fractional seconds
    +        ** to the time.  The ".FFF" may be omitted.  The ":SS.FFF" may be
    +        ** omitted.
    +        */
    +        const char *z2 = z;
    +        DateTime tx;
    +        sqlite3_int64 day;
    +        if( !sqlite3Isdigit(*z2) ) z2++;
    +        memset(&tx, 0, sizeof(tx));
    +        if( parseHhMmSs(z2, &tx) ) break;
    +        computeJD(&tx);
    +        tx.iJD -= 43200000;
    +        day = tx.iJD/86400000;
    +        tx.iJD -= day*86400000;
    +        if( z[0]=='-' ) tx.iJD = -tx.iJD;
    +        computeJD(p);
    +        clearYMD_HMS_TZ(p);
    +        p->iJD += tx.iJD;
    +        rc = 0;
    +        break;
    +      }
    +      z += n;
    +      while( sqlite3Isspace(*z) ) z++;
    +      n = sqlite3Strlen30(z);
    +      if( n>10 || n<3 ) break;
    +      if( z[n-1]=='s' ){ z[n-1] = 0; n--; }
    +      computeJD(p);
    +      rc = 0;
    +      rRounder = r<0 ? -0.5 : +0.5;
    +      if( n==3 && strcmp(z,"day")==0 ){
    +        p->iJD += (sqlite3_int64)(r*86400000.0 + rRounder);
    +      }else if( n==4 && strcmp(z,"hour")==0 ){
    +        p->iJD += (sqlite3_int64)(r*(86400000.0/24.0) + rRounder);
    +      }else if( n==6 && strcmp(z,"minute")==0 ){
    +        p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0)) + rRounder);
    +      }else if( n==6 && strcmp(z,"second")==0 ){
    +        p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0*60.0)) + rRounder);
    +      }else if( n==5 && strcmp(z,"month")==0 ){
    +        int x, y;
    +        computeYMD_HMS(p);
    +        p->M += (int)r;
    +        x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;
    +        p->Y += x;
    +        p->M -= x*12;
    +        p->validJD = 0;
    +        computeJD(p);
    +        y = (int)r;
    +        if( y!=r ){
    +          p->iJD += (sqlite3_int64)((r - y)*30.0*86400000.0 + rRounder);
    +        }
    +      }else if( n==4 && strcmp(z,"year")==0 ){
    +        int y = (int)r;
    +        computeYMD_HMS(p);
    +        p->Y += y;
    +        p->validJD = 0;
    +        computeJD(p);
    +        if( y!=r ){
    +          p->iJD += (sqlite3_int64)((r - y)*365.0*86400000.0 + rRounder);
    +        }
    +      }else{
    +        rc = 1;
    +      }
    +      clearYMD_HMS_TZ(p);
    +      break;
    +    }
    +    default: {
    +      break;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Process time function arguments.  argv[0] is a date-time stamp.
    +** argv[1] and following are modifiers.  Parse them all and write
    +** the resulting time into the DateTime structure p.  Return 0
    +** on success and 1 if there are any errors.
    +**
    +** If there are zero parameters (if even argv[0] is undefined)
    +** then assume a default value of "now" for argv[0].
    +*/
    +static int isDate(
    +  sqlite3_context *context, 
    +  int argc, 
    +  sqlite3_value **argv, 
    +  DateTime *p
    +){
    +  int i;
    +  const unsigned char *z;
    +  int eType;
    +  memset(p, 0, sizeof(*p));
    +  if( argc==0 ){
    +    setDateTimeToCurrent(context, p);
    +  }else if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
    +                   || eType==SQLITE_INTEGER ){
    +    p->iJD = (sqlite3_int64)(sqlite3_value_double(argv[0])*86400000.0 + 0.5);
    +    p->validJD = 1;
    +  }else{
    +    z = sqlite3_value_text(argv[0]);
    +    if( !z || parseDateOrTime(context, (char*)z, p) ){
    +      return 1;
    +    }
    +  }
    +  for(i=1; i<argc; i++){
    +    if( (z = sqlite3_value_text(argv[i]))==0 || parseModifier((char*)z, p) ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +
    +/*
    +** The following routines implement the various date and time functions
    +** of SQLite.
    +*/
    +
    +/*
    +**    julianday( TIMESTRING, MOD, MOD, ...)
    +**
    +** Return the julian day number of the date specified in the arguments
    +*/
    +static void juliandayFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  DateTime x;
    +  if( isDate(context, argc, argv, &x)==0 ){
    +    computeJD(&x);
    +    sqlite3_result_double(context, x.iJD/86400000.0);
    +  }
    +}
    +
    +/*
    +**    datetime( TIMESTRING, MOD, MOD, ...)
    +**
    +** Return YYYY-MM-DD HH:MM:SS
    +*/
    +static void datetimeFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  DateTime x;
    +  if( isDate(context, argc, argv, &x)==0 ){
    +    char zBuf[100];
    +    computeYMD_HMS(&x);
    +    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d %02d:%02d:%02d",
    +                     x.Y, x.M, x.D, x.h, x.m, (int)(x.s));
    +    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
    +  }
    +}
    +
    +/*
    +**    time( TIMESTRING, MOD, MOD, ...)
    +**
    +** Return HH:MM:SS
    +*/
    +static void timeFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  DateTime x;
    +  if( isDate(context, argc, argv, &x)==0 ){
    +    char zBuf[100];
    +    computeHMS(&x);
    +    sqlite3_snprintf(sizeof(zBuf), zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s);
    +    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
    +  }
    +}
    +
    +/*
    +**    date( TIMESTRING, MOD, MOD, ...)
    +**
    +** Return YYYY-MM-DD
    +*/
    +static void dateFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  DateTime x;
    +  if( isDate(context, argc, argv, &x)==0 ){
    +    char zBuf[100];
    +    computeYMD(&x);
    +    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D);
    +    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
    +  }
    +}
    +
    +/*
    +**    strftime( FORMAT, TIMESTRING, MOD, MOD, ...)
    +**
    +** Return a string described by FORMAT.  Conversions as follows:
    +**
    +**   %d  day of month
    +**   %f  ** fractional seconds  SS.SSS
    +**   %H  hour 00-24
    +**   %j  day of year 000-366
    +**   %J  ** Julian day number
    +**   %m  month 01-12
    +**   %M  minute 00-59
    +**   %s  seconds since 1970-01-01
    +**   %S  seconds 00-59
    +**   %w  day of week 0-6  sunday==0
    +**   %W  week of year 00-53
    +**   %Y  year 0000-9999
    +**   %%  %
    +*/
    +static void strftimeFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  DateTime x;
    +  u64 n;
    +  size_t i,j;
    +  char *z;
    +  sqlite3 *db;
    +  const char *zFmt = (const char*)sqlite3_value_text(argv[0]);
    +  char zBuf[100];
    +  if( zFmt==0 || isDate(context, argc-1, argv+1, &x) ) return;
    +  db = sqlite3_context_db_handle(context);
    +  for(i=0, n=1; zFmt[i]; i++, n++){
    +    if( zFmt[i]=='%' ){
    +      switch( zFmt[i+1] ){
    +        case 'd':
    +        case 'H':
    +        case 'm':
    +        case 'M':
    +        case 'S':
    +        case 'W':
    +          n++;
    +          /* fall thru */
    +        case 'w':
    +        case '%':
    +          break;
    +        case 'f':
    +          n += 8;
    +          break;
    +        case 'j':
    +          n += 3;
    +          break;
    +        case 'Y':
    +          n += 8;
    +          break;
    +        case 's':
    +        case 'J':
    +          n += 50;
    +          break;
    +        default:
    +          return;  /* ERROR.  return a NULL */
    +      }
    +      i++;
    +    }
    +  }
    +  testcase( n==sizeof(zBuf)-1 );
    +  testcase( n==sizeof(zBuf) );
    +  testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
    +  testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH] );
    +  if( n<sizeof(zBuf) ){
    +    z = zBuf;
    +  }else if( n>(u64)db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    sqlite3_result_error_toobig(context);
    +    return;
    +  }else{
    +    z = sqlite3DbMallocRaw(db, (int)n);
    +    if( z==0 ){
    +      sqlite3_result_error_nomem(context);
    +      return;
    +    }
    +  }
    +  computeJD(&x);
    +  computeYMD_HMS(&x);
    +  for(i=j=0; zFmt[i]; i++){
    +    if( zFmt[i]!='%' ){
    +      z[j++] = zFmt[i];
    +    }else{
    +      i++;
    +      switch( zFmt[i] ){
    +        case 'd':  sqlite3_snprintf(3, &z[j],"%02d",x.D); j+=2; break;
    +        case 'f': {
    +          double s = x.s;
    +          if( s>59.999 ) s = 59.999;
    +          sqlite3_snprintf(7, &z[j],"%06.3f", s);
    +          j += sqlite3Strlen30(&z[j]);
    +          break;
    +        }
    +        case 'H':  sqlite3_snprintf(3, &z[j],"%02d",x.h); j+=2; break;
    +        case 'W': /* Fall thru */
    +        case 'j': {
    +          int nDay;             /* Number of days since 1st day of year */
    +          DateTime y = x;
    +          y.validJD = 0;
    +          y.M = 1;
    +          y.D = 1;
    +          computeJD(&y);
    +          nDay = (int)((x.iJD-y.iJD+43200000)/86400000);
    +          if( zFmt[i]=='W' ){
    +            int wd;   /* 0=Monday, 1=Tuesday, ... 6=Sunday */
    +            wd = (int)(((x.iJD+43200000)/86400000)%7);
    +            sqlite3_snprintf(3, &z[j],"%02d",(nDay+7-wd)/7);
    +            j += 2;
    +          }else{
    +            sqlite3_snprintf(4, &z[j],"%03d",nDay+1);
    +            j += 3;
    +          }
    +          break;
    +        }
    +        case 'J': {
    +          sqlite3_snprintf(20, &z[j],"%.16g",x.iJD/86400000.0);
    +          j+=sqlite3Strlen30(&z[j]);
    +          break;
    +        }
    +        case 'm':  sqlite3_snprintf(3, &z[j],"%02d",x.M); j+=2; break;
    +        case 'M':  sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
    +        case 's': {
    +          sqlite3_snprintf(30,&z[j],"%lld",
    +                           (i64)(x.iJD/1000 - 21086676*(i64)10000));
    +          j += sqlite3Strlen30(&z[j]);
    +          break;
    +        }
    +        case 'S':  sqlite3_snprintf(3,&z[j],"%02d",(int)x.s); j+=2; break;
    +        case 'w': {
    +          z[j++] = (char)(((x.iJD+129600000)/86400000) % 7) + '0';
    +          break;
    +        }
    +        case 'Y': {
    +          sqlite3_snprintf(5,&z[j],"%04d",x.Y); j+=sqlite3Strlen30(&z[j]);
    +          break;
    +        }
    +        default:   z[j++] = '%'; break;
    +      }
    +    }
    +  }
    +  z[j] = 0;
    +  sqlite3_result_text(context, z, -1,
    +                      z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC);
    +}
    +
    +/*
    +** current_time()
    +**
    +** This function returns the same value as time('now').
    +*/
    +static void ctimeFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  timeFunc(context, 0, 0);
    +}
    +
    +/*
    +** current_date()
    +**
    +** This function returns the same value as date('now').
    +*/
    +static void cdateFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  dateFunc(context, 0, 0);
    +}
    +
    +/*
    +** current_timestamp()
    +**
    +** This function returns the same value as datetime('now').
    +*/
    +static void ctimestampFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  datetimeFunc(context, 0, 0);
    +}
    +#endif /* !defined(SQLITE_OMIT_DATETIME_FUNCS) */
    +
    +#ifdef SQLITE_OMIT_DATETIME_FUNCS
    +/*
    +** If the library is compiled to omit the full-scale date and time
    +** handling (to get a smaller binary), the following minimal version
    +** of the functions current_time(), current_date() and current_timestamp()
    +** are included instead. This is to support column declarations that
    +** include "DEFAULT CURRENT_TIME" etc.
    +**
    +** This function uses the C-library functions time(), gmtime()
    +** and strftime(). The format string to pass to strftime() is supplied
    +** as the user-data for the function.
    +*/
    +static void currentTimeFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  time_t t;
    +  char *zFormat = (char *)sqlite3_user_data(context);
    +  sqlite3 *db;
    +  double rT;
    +  char zBuf[20];
    +
    +  UNUSED_PARAMETER(argc);
    +  UNUSED_PARAMETER(argv);
    +
    +  db = sqlite3_context_db_handle(context);
    +  sqlite3OsCurrentTime(db->pVfs, &rT);
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  t = 86400.0*(rT - 2440587.5) + 0.5;
    +#else
    +  /* without floating point support, rT will have
    +  ** already lost fractional day precision.
    +  */
    +  t = 86400 * (rT - 2440587) - 43200;
    +#endif
    +#ifdef HAVE_GMTIME_R
    +  {
    +    struct tm sNow;
    +    gmtime_r(&t, &sNow);
    +    strftime(zBuf, 20, zFormat, &sNow);
    +  }
    +#else
    +  {
    +    struct tm *pTm;
    +    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +    pTm = gmtime(&t);
    +    strftime(zBuf, 20, zFormat, pTm);
    +    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +  }
    +#endif
    +
    +  sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
    +}
    +#endif
    +
    +/*
    +** This function registered all of the above C functions as SQL
    +** functions.  This should be the only routine in this file with
    +** external linkage.
    +*/
    +SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
    +  static SQLITE_WSD FuncDef aDateTimeFuncs[] = {
    +#ifndef SQLITE_OMIT_DATETIME_FUNCS
    +    FUNCTION(julianday,        -1, 0, 0, juliandayFunc ),
    +    FUNCTION(date,             -1, 0, 0, dateFunc      ),
    +    FUNCTION(time,             -1, 0, 0, timeFunc      ),
    +    FUNCTION(datetime,         -1, 0, 0, datetimeFunc  ),
    +    FUNCTION(strftime,         -1, 0, 0, strftimeFunc  ),
    +    FUNCTION(current_time,      0, 0, 0, ctimeFunc     ),
    +    FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
    +    FUNCTION(current_date,      0, 0, 0, cdateFunc     ),
    +#else
    +    STR_FUNCTION(current_time,      0, "%H:%M:%S",          0, currentTimeFunc),
    +    STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d",          0, currentTimeFunc),
    +    STR_FUNCTION(current_date,      0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc),
    +#endif
    +  };
    +  int i;
    +  FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
    +  FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aDateTimeFuncs);
    +
    +  for(i=0; i<ArraySize(aDateTimeFuncs); i++){
    +    sqlite3FuncDefInsert(pHash, &aFunc[i]);
    +  }
    +}
    +
    +/************** End of date.c ************************************************/
    +/************** Begin file os.c **********************************************/
    +/*
    +** 2005 November 29
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains OS interface code that is common to all
    +** architectures.
    +**
    +** $Id: os.c,v 1.127 2009/07/27 11:41:21 danielk1977 Exp $
    +*/
    +#define _SQLITE_OS_C_ 1
    +#undef _SQLITE_OS_C_
    +
    +/*
    +** The default SQLite sqlite3_vfs implementations do not allocate
    +** memory (actually, os_unix.c allocates a small amount of memory
    +** from within OsOpen()), but some third-party implementations may.
    +** So we test the effects of a malloc() failing and the sqlite3OsXXX()
    +** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.
    +**
    +** The following functions are instrumented for malloc() failure 
    +** testing:
    +**
    +**     sqlite3OsOpen()
    +**     sqlite3OsRead()
    +**     sqlite3OsWrite()
    +**     sqlite3OsSync()
    +**     sqlite3OsLock()
    +**
    +*/
    +#if defined(SQLITE_TEST) && (SQLITE_OS_WIN==0)
    +  #define DO_OS_MALLOC_TEST(x) if (!x || !sqlite3IsMemJournal(x)) {     \
    +    void *pTstAlloc = sqlite3Malloc(10);                             \
    +    if (!pTstAlloc) return SQLITE_IOERR_NOMEM;                       \
    +    sqlite3_free(pTstAlloc);                                         \
    +  }
    +#else
    +  #define DO_OS_MALLOC_TEST(x)
    +#endif
    +
    +/*
    +** The following routines are convenience wrappers around methods
    +** of the sqlite3_file object.  This is mostly just syntactic sugar. All
    +** of this would be completely automatic if SQLite were coded using
    +** C++ instead of plain old C.
    +*/
    +SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file *pId){
    +  int rc = SQLITE_OK;
    +  if( pId->pMethods ){
    +    rc = pId->pMethods->xClose(pId);
    +    pId->pMethods = 0;
    +  }
    +  return rc;
    +}
    +SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xRead(id, pBuf, amt, offset);
    +}
    +SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xWrite(id, pBuf, amt, offset);
    +}
    +SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){
    +  return id->pMethods->xTruncate(id, size);
    +}
    +SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file *id, int flags){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xSync(id, flags);
    +}
    +SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xFileSize(id, pSize);
    +}
    +SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file *id, int lockType){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xLock(id, lockType);
    +}
    +SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file *id, int lockType){
    +  return id->pMethods->xUnlock(id, lockType);
    +}
    +SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){
    +  DO_OS_MALLOC_TEST(id);
    +  return id->pMethods->xCheckReservedLock(id, pResOut);
    +}
    +SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
    +  return id->pMethods->xFileControl(id, op, pArg);
    +}
    +SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id){
    +  int (*xSectorSize)(sqlite3_file*) = id->pMethods->xSectorSize;
    +  return (xSectorSize ? xSectorSize(id) : SQLITE_DEFAULT_SECTOR_SIZE);
    +}
    +SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id){
    +  return id->pMethods->xDeviceCharacteristics(id);
    +}
    +
    +/*
    +** The next group of routines are convenience wrappers around the
    +** VFS methods.
    +*/
    +SQLITE_PRIVATE int sqlite3OsOpen(
    +  sqlite3_vfs *pVfs, 
    +  const char *zPath, 
    +  sqlite3_file *pFile, 
    +  int flags, 
    +  int *pFlagsOut
    +){
    +  int rc;
    +  DO_OS_MALLOC_TEST(0);
    +  /* 0x7f1f is a mask of SQLITE_OPEN_ flags that are valid to be passed
    +  ** down into the VFS layer.  Some SQLITE_OPEN_ flags (for example,
    +  ** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
    +  ** reaching the VFS. */
    +  rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x7f1f, pFlagsOut);
    +  assert( rc==SQLITE_OK || pFile->pMethods==0 );
    +  return rc;
    +}
    +SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
    +  return pVfs->xDelete(pVfs, zPath, dirSync);
    +}
    +SQLITE_PRIVATE int sqlite3OsAccess(
    +  sqlite3_vfs *pVfs, 
    +  const char *zPath, 
    +  int flags, 
    +  int *pResOut
    +){
    +  DO_OS_MALLOC_TEST(0);
    +  return pVfs->xAccess(pVfs, zPath, flags, pResOut);
    +}
    +SQLITE_PRIVATE int sqlite3OsFullPathname(
    +  sqlite3_vfs *pVfs, 
    +  const char *zPath, 
    +  int nPathOut, 
    +  char *zPathOut
    +){
    +  return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);
    +}
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
    +  return pVfs->xDlOpen(pVfs, zPath);
    +}
    +SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
    +  pVfs->xDlError(pVfs, nByte, zBufOut);
    +}
    +SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *pVfs, void *pHdle, const char *zSym))(void){
    +  return pVfs->xDlSym(pVfs, pHdle, zSym);
    +}
    +SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *pVfs, void *pHandle){
    +  pVfs->xDlClose(pVfs, pHandle);
    +}
    +#endif /* SQLITE_OMIT_LOAD_EXTENSION */
    +SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
    +  return pVfs->xRandomness(pVfs, nByte, zBufOut);
    +}
    +SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *pVfs, int nMicro){
    +  return pVfs->xSleep(pVfs, nMicro);
    +}
    +SQLITE_PRIVATE int sqlite3OsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){
    +  return pVfs->xCurrentTime(pVfs, pTimeOut);
    +}
    +
    +SQLITE_PRIVATE int sqlite3OsOpenMalloc(
    +  sqlite3_vfs *pVfs, 
    +  const char *zFile, 
    +  sqlite3_file **ppFile, 
    +  int flags,
    +  int *pOutFlags
    +){
    +  int rc = SQLITE_NOMEM;
    +  sqlite3_file *pFile;
    +  pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile);
    +  if( pFile ){
    +    rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3_free(pFile);
    +    }else{
    +      *ppFile = pFile;
    +    }
    +  }
    +  return rc;
    +}
    +SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){
    +  int rc = SQLITE_OK;
    +  assert( pFile );
    +  rc = sqlite3OsClose(pFile);
    +  sqlite3_free(pFile);
    +  return rc;
    +}
    +
    +/*
    +** This function is a wrapper around the OS specific implementation of
    +** sqlite3_os_init(). The purpose of the wrapper is to provide the
    +** ability to simulate a malloc failure, so that the handling of an
    +** error in sqlite3_os_init() by the upper layers can be tested.
    +*/
    +SQLITE_PRIVATE int sqlite3OsInit(void){
    +  void *p = sqlite3_malloc(10);
    +  if( p==0 ) return SQLITE_NOMEM;
    +  sqlite3_free(p);
    +  return sqlite3_os_init();
    +}
    +
    +/*
    +** The list of all registered VFS implementations.
    +*/
    +static sqlite3_vfs * SQLITE_WSD vfsList = 0;
    +#define vfsList GLOBAL(sqlite3_vfs *, vfsList)
    +
    +/*
    +** Locate a VFS by name.  If no name is given, simply return the
    +** first VFS on the list.
    +*/
    +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
    +  sqlite3_vfs *pVfs = 0;
    +#if SQLITE_THREADSAFE
    +  sqlite3_mutex *mutex;
    +#endif
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  int rc = sqlite3_initialize();
    +  if( rc ) return 0;
    +#endif
    +#if SQLITE_THREADSAFE
    +  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +#endif
    +  sqlite3_mutex_enter(mutex);
    +  for(pVfs = vfsList; pVfs; pVfs=pVfs->pNext){
    +    if( zVfs==0 ) break;
    +    if( strcmp(zVfs, pVfs->zName)==0 ) break;
    +  }
    +  sqlite3_mutex_leave(mutex);
    +  return pVfs;
    +}
    +
    +/*
    +** Unlink a VFS from the linked list
    +*/
    +static void vfsUnlink(sqlite3_vfs *pVfs){
    +  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) );
    +  if( pVfs==0 ){
    +    /* No-op */
    +  }else if( vfsList==pVfs ){
    +    vfsList = pVfs->pNext;
    +  }else if( vfsList ){
    +    sqlite3_vfs *p = vfsList;
    +    while( p->pNext && p->pNext!=pVfs ){
    +      p = p->pNext;
    +    }
    +    if( p->pNext==pVfs ){
    +      p->pNext = pVfs->pNext;
    +    }
    +  }
    +}
    +
    +/*
    +** Register a VFS with the system.  It is harmless to register the same
    +** VFS multiple times.  The new VFS becomes the default if makeDflt is
    +** true.
    +*/
    +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
    +  sqlite3_mutex *mutex = 0;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  int rc = sqlite3_initialize();
    +  if( rc ) return rc;
    +#endif
    +  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +  sqlite3_mutex_enter(mutex);
    +  vfsUnlink(pVfs);
    +  if( makeDflt || vfsList==0 ){
    +    pVfs->pNext = vfsList;
    +    vfsList = pVfs;
    +  }else{
    +    pVfs->pNext = vfsList->pNext;
    +    vfsList->pNext = pVfs;
    +  }
    +  assert(vfsList);
    +  sqlite3_mutex_leave(mutex);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Unregister a VFS so that it is no longer accessible.
    +*/
    +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
    +#if SQLITE_THREADSAFE
    +  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +#endif
    +  sqlite3_mutex_enter(mutex);
    +  vfsUnlink(pVfs);
    +  sqlite3_mutex_leave(mutex);
    +  return SQLITE_OK;
    +}
    +
    +/************** End of os.c **************************************************/
    +/************** Begin file fault.c *******************************************/
    +/*
    +** 2008 Jan 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** $Id: fault.c,v 1.11 2008/09/02 00:52:52 drh Exp $
    +*/
    +
    +/*
    +** This file contains code to support the concept of "benign" 
    +** malloc failures (when the xMalloc() or xRealloc() method of the
    +** sqlite3_mem_methods structure fails to allocate a block of memory
    +** and returns 0). 
    +**
    +** Most malloc failures are non-benign. After they occur, SQLite
    +** abandons the current operation and returns an error code (usually
    +** SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily
    +** fatal. For example, if a malloc fails while resizing a hash table, this 
    +** is completely recoverable simply by not carrying out the resize. The 
    +** hash table will continue to function normally.  So a malloc failure 
    +** during a hash table resize is a benign fault.
    +*/
    +
    +
    +#ifndef SQLITE_OMIT_BUILTIN_TEST
    +
    +/*
    +** Global variables.
    +*/
    +typedef struct BenignMallocHooks BenignMallocHooks;
    +static SQLITE_WSD struct BenignMallocHooks {
    +  void (*xBenignBegin)(void);
    +  void (*xBenignEnd)(void);
    +} sqlite3Hooks = { 0, 0 };
    +
    +/* The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks
    +** structure.  If writable static data is unsupported on the target,
    +** we have to locate the state vector at run-time.  In the more common
    +** case where writable static data is supported, wsdHooks can refer directly
    +** to the "sqlite3Hooks" state vector declared above.
    +*/
    +#ifdef SQLITE_OMIT_WSD
    +# define wsdHooksInit \
    +  BenignMallocHooks *x = &GLOBAL(BenignMallocHooks,sqlite3Hooks)
    +# define wsdHooks x[0]
    +#else
    +# define wsdHooksInit
    +# define wsdHooks sqlite3Hooks
    +#endif
    +
    +
    +/*
    +** Register hooks to call when sqlite3BeginBenignMalloc() and
    +** sqlite3EndBenignMalloc() are called, respectively.
    +*/
    +SQLITE_PRIVATE void sqlite3BenignMallocHooks(
    +  void (*xBenignBegin)(void),
    +  void (*xBenignEnd)(void)
    +){
    +  wsdHooksInit;
    +  wsdHooks.xBenignBegin = xBenignBegin;
    +  wsdHooks.xBenignEnd = xBenignEnd;
    +}
    +
    +/*
    +** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
    +** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
    +** indicates that subsequent malloc failures are non-benign.
    +*/
    +SQLITE_PRIVATE void sqlite3BeginBenignMalloc(void){
    +  wsdHooksInit;
    +  if( wsdHooks.xBenignBegin ){
    +    wsdHooks.xBenignBegin();
    +  }
    +}
    +SQLITE_PRIVATE void sqlite3EndBenignMalloc(void){
    +  wsdHooksInit;
    +  if( wsdHooks.xBenignEnd ){
    +    wsdHooks.xBenignEnd();
    +  }
    +}
    +
    +#endif   /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
    +
    +/************** End of fault.c ***********************************************/
    +/************** Begin file mem0.c ********************************************/
    +/*
    +** 2008 October 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains a no-op memory allocation drivers for use when
    +** SQLITE_ZERO_MALLOC is defined.  The allocation drivers implemented
    +** here always fail.  SQLite will not operate with these drivers.  These
    +** are merely placeholders.  Real drivers must be substituted using
    +** sqlite3_config() before SQLite will operate.
    +**
    +** $Id: mem0.c,v 1.1 2008/10/28 18:58:20 drh Exp $
    +*/
    +
    +/*
    +** This version of the memory allocator is the default.  It is
    +** used when no other memory allocator is specified using compile-time
    +** macros.
    +*/
    +#ifdef SQLITE_ZERO_MALLOC
    +
    +/*
    +** No-op versions of all memory allocation routines
    +*/
    +static void *sqlite3MemMalloc(int nByte){ return 0; }
    +static void sqlite3MemFree(void *pPrior){ return; }
    +static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
    +static int sqlite3MemSize(void *pPrior){ return 0; }
    +static int sqlite3MemRoundup(int n){ return n; }
    +static int sqlite3MemInit(void *NotUsed){ return SQLITE_OK; }
    +static void sqlite3MemShutdown(void *NotUsed){ return; }
    +
    +/*
    +** This routine is the only routine in this file with external linkage.
    +**
    +** Populate the low-level memory allocation function pointers in
    +** sqlite3GlobalConfig.m with pointers to the routines in this file.
    +*/
    +SQLITE_PRIVATE void sqlite3MemSetDefault(void){
    +  static const sqlite3_mem_methods defaultMethods = {
    +     sqlite3MemMalloc,
    +     sqlite3MemFree,
    +     sqlite3MemRealloc,
    +     sqlite3MemSize,
    +     sqlite3MemRoundup,
    +     sqlite3MemInit,
    +     sqlite3MemShutdown,
    +     0
    +  };
    +  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
    +}
    +
    +#endif /* SQLITE_ZERO_MALLOC */
    +
    +/************** End of mem0.c ************************************************/
    +/************** Begin file mem1.c ********************************************/
    +/*
    +** 2007 August 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains low-level memory allocation drivers for when
    +** SQLite will use the standard C-library malloc/realloc/free interface
    +** to obtain the memory it needs.
    +**
    +** This file contains implementations of the low-level memory allocation
    +** routines specified in the sqlite3_mem_methods object.
    +**
    +** $Id: mem1.c,v 1.30 2009/03/23 04:33:33 danielk1977 Exp $
    +*/
    +
    +/*
    +** This version of the memory allocator is the default.  It is
    +** used when no other memory allocator is specified using compile-time
    +** macros.
    +*/
    +#ifdef SQLITE_SYSTEM_MALLOC
    +
    +/*
    +** Like malloc(), but remember the size of the allocation
    +** so that we can find it later using sqlite3MemSize().
    +**
    +** For this low-level routine, we are guaranteed that nByte>0 because
    +** cases of nByte<=0 will be intercepted and dealt with by higher level
    +** routines.
    +*/
    +static void *sqlite3MemMalloc(int nByte){
    +  sqlite3_int64 *p;
    +  assert( nByte>0 );
    +  nByte = ROUND8(nByte);
    +  p = malloc( nByte+8 );
    +  if( p ){
    +    p[0] = nByte;
    +    p++;
    +  }
    +  return (void *)p;
    +}
    +
    +/*
    +** Like free() but works for allocations obtained from sqlite3MemMalloc()
    +** or sqlite3MemRealloc().
    +**
    +** For this low-level routine, we already know that pPrior!=0 since
    +** cases where pPrior==0 will have been intecepted and dealt with
    +** by higher-level routines.
    +*/
    +static void sqlite3MemFree(void *pPrior){
    +  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
    +  assert( pPrior!=0 );
    +  p--;
    +  free(p);
    +}
    +
    +/*
    +** Like realloc().  Resize an allocation previously obtained from
    +** sqlite3MemMalloc().
    +**
    +** For this low-level interface, we know that pPrior!=0.  Cases where
    +** pPrior==0 while have been intercepted by higher-level routine and
    +** redirected to xMalloc.  Similarly, we know that nByte>0 becauses
    +** cases where nByte<=0 will have been intercepted by higher-level
    +** routines and redirected to xFree.
    +*/
    +static void *sqlite3MemRealloc(void *pPrior, int nByte){
    +  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
    +  assert( pPrior!=0 && nByte>0 );
    +  nByte = ROUND8(nByte);
    +  p = (sqlite3_int64*)pPrior;
    +  p--;
    +  p = realloc(p, nByte+8 );
    +  if( p ){
    +    p[0] = nByte;
    +    p++;
    +  }
    +  return (void*)p;
    +}
    +
    +/*
    +** Report the allocated size of a prior return from xMalloc()
    +** or xRealloc().
    +*/
    +static int sqlite3MemSize(void *pPrior){
    +  sqlite3_int64 *p;
    +  if( pPrior==0 ) return 0;
    +  p = (sqlite3_int64*)pPrior;
    +  p--;
    +  return (int)p[0];
    +}
    +
    +/*
    +** Round up a request size to the next valid allocation size.
    +*/
    +static int sqlite3MemRoundup(int n){
    +  return ROUND8(n);
    +}
    +
    +/*
    +** Initialize this module.
    +*/
    +static int sqlite3MemInit(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Deinitialize this module.
    +*/
    +static void sqlite3MemShutdown(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  return;
    +}
    +
    +/*
    +** This routine is the only routine in this file with external linkage.
    +**
    +** Populate the low-level memory allocation function pointers in
    +** sqlite3GlobalConfig.m with pointers to the routines in this file.
    +*/
    +SQLITE_PRIVATE void sqlite3MemSetDefault(void){
    +  static const sqlite3_mem_methods defaultMethods = {
    +     sqlite3MemMalloc,
    +     sqlite3MemFree,
    +     sqlite3MemRealloc,
    +     sqlite3MemSize,
    +     sqlite3MemRoundup,
    +     sqlite3MemInit,
    +     sqlite3MemShutdown,
    +     0
    +  };
    +  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
    +}
    +
    +#endif /* SQLITE_SYSTEM_MALLOC */
    +
    +/************** End of mem1.c ************************************************/
    +/************** Begin file mem2.c ********************************************/
    +/*
    +** 2007 August 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains low-level memory allocation drivers for when
    +** SQLite will use the standard C-library malloc/realloc/free interface
    +** to obtain the memory it needs while adding lots of additional debugging
    +** information to each allocation in order to help detect and fix memory
    +** leaks and memory usage errors.
    +**
    +** This file contains implementations of the low-level memory allocation
    +** routines specified in the sqlite3_mem_methods object.
    +**
    +** $Id: mem2.c,v 1.45 2009/03/23 04:33:33 danielk1977 Exp $
    +*/
    +
    +/*
    +** This version of the memory allocator is used only if the
    +** SQLITE_MEMDEBUG macro is defined
    +*/
    +#ifdef SQLITE_MEMDEBUG
    +
    +/*
    +** The backtrace functionality is only available with GLIBC
    +*/
    +#ifdef __GLIBC__
    +  extern int backtrace(void**,int);
    +  extern void backtrace_symbols_fd(void*const*,int,int);
    +#else
    +# define backtrace(A,B) 1
    +# define backtrace_symbols_fd(A,B,C)
    +#endif
    +
    +/*
    +** Each memory allocation looks like this:
    +**
    +**  ------------------------------------------------------------------------
    +**  | Title |  backtrace pointers |  MemBlockHdr |  allocation |  EndGuard |
    +**  ------------------------------------------------------------------------
    +**
    +** The application code sees only a pointer to the allocation.  We have
    +** to back up from the allocation pointer to find the MemBlockHdr.  The
    +** MemBlockHdr tells us the size of the allocation and the number of
    +** backtrace pointers.  There is also a guard word at the end of the
    +** MemBlockHdr.
    +*/
    +struct MemBlockHdr {
    +  i64 iSize;                          /* Size of this allocation */
    +  struct MemBlockHdr *pNext, *pPrev;  /* Linked list of all unfreed memory */
    +  char nBacktrace;                    /* Number of backtraces on this alloc */
    +  char nBacktraceSlots;               /* Available backtrace slots */
    +  short nTitle;                       /* Bytes of title; includes '\0' */
    +  int iForeGuard;                     /* Guard word for sanity */
    +};
    +
    +/*
    +** Guard words
    +*/
    +#define FOREGUARD 0x80F5E153
    +#define REARGUARD 0xE4676B53
    +
    +/*
    +** Number of malloc size increments to track.
    +*/
    +#define NCSIZE  1000
    +
    +/*
    +** All of the static variables used by this module are collected
    +** into a single structure named "mem".  This is to keep the
    +** static variables organized and to reduce namespace pollution
    +** when this module is combined with other in the amalgamation.
    +*/
    +static struct {
    +  
    +  /*
    +  ** Mutex to control access to the memory allocation subsystem.
    +  */
    +  sqlite3_mutex *mutex;
    +
    +  /*
    +  ** Head and tail of a linked list of all outstanding allocations
    +  */
    +  struct MemBlockHdr *pFirst;
    +  struct MemBlockHdr *pLast;
    +  
    +  /*
    +  ** The number of levels of backtrace to save in new allocations.
    +  */
    +  int nBacktrace;
    +  void (*xBacktrace)(int, int, void **);
    +
    +  /*
    +  ** Title text to insert in front of each block
    +  */
    +  int nTitle;        /* Bytes of zTitle to save.  Includes '\0' and padding */
    +  char zTitle[100];  /* The title text */
    +
    +  /* 
    +  ** sqlite3MallocDisallow() increments the following counter.
    +  ** sqlite3MallocAllow() decrements it.
    +  */
    +  int disallow; /* Do not allow memory allocation */
    +
    +  /*
    +  ** Gather statistics on the sizes of memory allocations.
    +  ** nAlloc[i] is the number of allocation attempts of i*8
    +  ** bytes.  i==NCSIZE is the number of allocation attempts for
    +  ** sizes more than NCSIZE*8 bytes.
    +  */
    +  int nAlloc[NCSIZE];      /* Total number of allocations */
    +  int nCurrent[NCSIZE];    /* Current number of allocations */
    +  int mxCurrent[NCSIZE];   /* Highwater mark for nCurrent */
    +
    +} mem;
    +
    +
    +/*
    +** Adjust memory usage statistics
    +*/
    +static void adjustStats(int iSize, int increment){
    +  int i = ROUND8(iSize)/8;
    +  if( i>NCSIZE-1 ){
    +    i = NCSIZE - 1;
    +  }
    +  if( increment>0 ){
    +    mem.nAlloc[i]++;
    +    mem.nCurrent[i]++;
    +    if( mem.nCurrent[i]>mem.mxCurrent[i] ){
    +      mem.mxCurrent[i] = mem.nCurrent[i];
    +    }
    +  }else{
    +    mem.nCurrent[i]--;
    +    assert( mem.nCurrent[i]>=0 );
    +  }
    +}
    +
    +/*
    +** Given an allocation, find the MemBlockHdr for that allocation.
    +**
    +** This routine checks the guards at either end of the allocation and
    +** if they are incorrect it asserts.
    +*/
    +static struct MemBlockHdr *sqlite3MemsysGetHeader(void *pAllocation){
    +  struct MemBlockHdr *p;
    +  int *pInt;
    +  u8 *pU8;
    +  int nReserve;
    +
    +  p = (struct MemBlockHdr*)pAllocation;
    +  p--;
    +  assert( p->iForeGuard==(int)FOREGUARD );
    +  nReserve = ROUND8(p->iSize);
    +  pInt = (int*)pAllocation;
    +  pU8 = (u8*)pAllocation;
    +  assert( pInt[nReserve/sizeof(int)]==(int)REARGUARD );
    +  /* This checks any of the "extra" bytes allocated due
    +  ** to rounding up to an 8 byte boundary to ensure 
    +  ** they haven't been overwritten.
    +  */
    +  while( nReserve-- > p->iSize ) assert( pU8[nReserve]==0x65 );
    +  return p;
    +}
    +
    +/*
    +** Return the number of bytes currently allocated at address p.
    +*/
    +static int sqlite3MemSize(void *p){
    +  struct MemBlockHdr *pHdr;
    +  if( !p ){
    +    return 0;
    +  }
    +  pHdr = sqlite3MemsysGetHeader(p);
    +  return pHdr->iSize;
    +}
    +
    +/*
    +** Initialize the memory allocation subsystem.
    +*/
    +static int sqlite3MemInit(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  assert( (sizeof(struct MemBlockHdr)&7) == 0 );
    +  if( !sqlite3GlobalConfig.bMemstat ){
    +    /* If memory status is enabled, then the malloc.c wrapper will already
    +    ** hold the STATIC_MEM mutex when the routines here are invoked. */
    +    mem.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Deinitialize the memory allocation subsystem.
    +*/
    +static void sqlite3MemShutdown(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  mem.mutex = 0;
    +}
    +
    +/*
    +** Round up a request size to the next valid allocation size.
    +*/
    +static int sqlite3MemRoundup(int n){
    +  return ROUND8(n);
    +}
    +
    +/*
    +** Allocate nByte bytes of memory.
    +*/
    +static void *sqlite3MemMalloc(int nByte){
    +  struct MemBlockHdr *pHdr;
    +  void **pBt;
    +  char *z;
    +  int *pInt;
    +  void *p = 0;
    +  int totalSize;
    +  int nReserve;
    +  sqlite3_mutex_enter(mem.mutex);
    +  assert( mem.disallow==0 );
    +  nReserve = ROUND8(nByte);
    +  totalSize = nReserve + sizeof(*pHdr) + sizeof(int) +
    +               mem.nBacktrace*sizeof(void*) + mem.nTitle;
    +  p = malloc(totalSize);
    +  if( p ){
    +    z = p;
    +    pBt = (void**)&z[mem.nTitle];
    +    pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];
    +    pHdr->pNext = 0;
    +    pHdr->pPrev = mem.pLast;
    +    if( mem.pLast ){
    +      mem.pLast->pNext = pHdr;
    +    }else{
    +      mem.pFirst = pHdr;
    +    }
    +    mem.pLast = pHdr;
    +    pHdr->iForeGuard = FOREGUARD;
    +    pHdr->nBacktraceSlots = mem.nBacktrace;
    +    pHdr->nTitle = mem.nTitle;
    +    if( mem.nBacktrace ){
    +      void *aAddr[40];
    +      pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;
    +      memcpy(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));
    +      assert(pBt[0]);
    +      if( mem.xBacktrace ){
    +        mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
    +      }
    +    }else{
    +      pHdr->nBacktrace = 0;
    +    }
    +    if( mem.nTitle ){
    +      memcpy(z, mem.zTitle, mem.nTitle);
    +    }
    +    pHdr->iSize = nByte;
    +    adjustStats(nByte, +1);
    +    pInt = (int*)&pHdr[1];
    +    pInt[nReserve/sizeof(int)] = REARGUARD;
    +    memset(pInt, 0x65, nReserve);
    +    p = (void*)pInt;
    +  }
    +  sqlite3_mutex_leave(mem.mutex);
    +  return p; 
    +}
    +
    +/*
    +** Free memory.
    +*/
    +static void sqlite3MemFree(void *pPrior){
    +  struct MemBlockHdr *pHdr;
    +  void **pBt;
    +  char *z;
    +  assert( sqlite3GlobalConfig.bMemstat || mem.mutex!=0 );
    +  pHdr = sqlite3MemsysGetHeader(pPrior);
    +  pBt = (void**)pHdr;
    +  pBt -= pHdr->nBacktraceSlots;
    +  sqlite3_mutex_enter(mem.mutex);
    +  if( pHdr->pPrev ){
    +    assert( pHdr->pPrev->pNext==pHdr );
    +    pHdr->pPrev->pNext = pHdr->pNext;
    +  }else{
    +    assert( mem.pFirst==pHdr );
    +    mem.pFirst = pHdr->pNext;
    +  }
    +  if( pHdr->pNext ){
    +    assert( pHdr->pNext->pPrev==pHdr );
    +    pHdr->pNext->pPrev = pHdr->pPrev;
    +  }else{
    +    assert( mem.pLast==pHdr );
    +    mem.pLast = pHdr->pPrev;
    +  }
    +  z = (char*)pBt;
    +  z -= pHdr->nTitle;
    +  adjustStats(pHdr->iSize, -1);
    +  memset(z, 0x2b, sizeof(void*)*pHdr->nBacktraceSlots + sizeof(*pHdr) +
    +                  pHdr->iSize + sizeof(int) + pHdr->nTitle);
    +  free(z);
    +  sqlite3_mutex_leave(mem.mutex);  
    +}
    +
    +/*
    +** Change the size of an existing memory allocation.
    +**
    +** For this debugging implementation, we *always* make a copy of the
    +** allocation into a new place in memory.  In this way, if the 
    +** higher level code is using pointer to the old allocation, it is 
    +** much more likely to break and we are much more liking to find
    +** the error.
    +*/
    +static void *sqlite3MemRealloc(void *pPrior, int nByte){
    +  struct MemBlockHdr *pOldHdr;
    +  void *pNew;
    +  assert( mem.disallow==0 );
    +  pOldHdr = sqlite3MemsysGetHeader(pPrior);
    +  pNew = sqlite3MemMalloc(nByte);
    +  if( pNew ){
    +    memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
    +    if( nByte>pOldHdr->iSize ){
    +      memset(&((char*)pNew)[pOldHdr->iSize], 0x2b, nByte - pOldHdr->iSize);
    +    }
    +    sqlite3MemFree(pPrior);
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** Populate the low-level memory allocation function pointers in
    +** sqlite3GlobalConfig.m with pointers to the routines in this file.
    +*/
    +SQLITE_PRIVATE void sqlite3MemSetDefault(void){
    +  static const sqlite3_mem_methods defaultMethods = {
    +     sqlite3MemMalloc,
    +     sqlite3MemFree,
    +     sqlite3MemRealloc,
    +     sqlite3MemSize,
    +     sqlite3MemRoundup,
    +     sqlite3MemInit,
    +     sqlite3MemShutdown,
    +     0
    +  };
    +  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
    +}
    +
    +/*
    +** Set the number of backtrace levels kept for each allocation.
    +** A value of zero turns off backtracing.  The number is always rounded
    +** up to a multiple of 2.
    +*/
    +SQLITE_PRIVATE void sqlite3MemdebugBacktrace(int depth){
    +  if( depth<0 ){ depth = 0; }
    +  if( depth>20 ){ depth = 20; }
    +  depth = (depth+1)&0xfe;
    +  mem.nBacktrace = depth;
    +}
    +
    +SQLITE_PRIVATE void sqlite3MemdebugBacktraceCallback(void (*xBacktrace)(int, int, void **)){
    +  mem.xBacktrace = xBacktrace;
    +}
    +
    +/*
    +** Set the title string for subsequent allocations.
    +*/
    +SQLITE_PRIVATE void sqlite3MemdebugSettitle(const char *zTitle){
    +  unsigned int n = sqlite3Strlen30(zTitle) + 1;
    +  sqlite3_mutex_enter(mem.mutex);
    +  if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;
    +  memcpy(mem.zTitle, zTitle, n);
    +  mem.zTitle[n] = 0;
    +  mem.nTitle = ROUND8(n);
    +  sqlite3_mutex_leave(mem.mutex);
    +}
    +
    +SQLITE_PRIVATE void sqlite3MemdebugSync(){
    +  struct MemBlockHdr *pHdr;
    +  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
    +    void **pBt = (void**)pHdr;
    +    pBt -= pHdr->nBacktraceSlots;
    +    mem.xBacktrace(pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
    +  }
    +}
    +
    +/*
    +** Open the file indicated and write a log of all unfreed memory 
    +** allocations into that log.
    +*/
    +SQLITE_PRIVATE void sqlite3MemdebugDump(const char *zFilename){
    +  FILE *out;
    +  struct MemBlockHdr *pHdr;
    +  void **pBt;
    +  int i;
    +  out = fopen(zFilename, "w");
    +  if( out==0 ){
    +    fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
    +                    zFilename);
    +    return;
    +  }
    +  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
    +    char *z = (char*)pHdr;
    +    z -= pHdr->nBacktraceSlots*sizeof(void*) + pHdr->nTitle;
    +    fprintf(out, "**** %lld bytes at %p from %s ****\n", 
    +            pHdr->iSize, &pHdr[1], pHdr->nTitle ? z : "???");
    +    if( pHdr->nBacktrace ){
    +      fflush(out);
    +      pBt = (void**)pHdr;
    +      pBt -= pHdr->nBacktraceSlots;
    +      backtrace_symbols_fd(pBt, pHdr->nBacktrace, fileno(out));
    +      fprintf(out, "\n");
    +    }
    +  }
    +  fprintf(out, "COUNTS:\n");
    +  for(i=0; i<NCSIZE-1; i++){
    +    if( mem.nAlloc[i] ){
    +      fprintf(out, "   %5d: %10d %10d %10d\n", 
    +            i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]);
    +    }
    +  }
    +  if( mem.nAlloc[NCSIZE-1] ){
    +    fprintf(out, "   %5d: %10d %10d %10d\n",
    +             NCSIZE*8-8, mem.nAlloc[NCSIZE-1],
    +             mem.nCurrent[NCSIZE-1], mem.mxCurrent[NCSIZE-1]);
    +  }
    +  fclose(out);
    +}
    +
    +/*
    +** Return the number of times sqlite3MemMalloc() has been called.
    +*/
    +SQLITE_PRIVATE int sqlite3MemdebugMallocCount(){
    +  int i;
    +  int nTotal = 0;
    +  for(i=0; i<NCSIZE; i++){
    +    nTotal += mem.nAlloc[i];
    +  }
    +  return nTotal;
    +}
    +
    +
    +#endif /* SQLITE_MEMDEBUG */
    +
    +/************** End of mem2.c ************************************************/
    +/************** Begin file mem3.c ********************************************/
    +/*
    +** 2007 October 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement a memory
    +** allocation subsystem for use by SQLite. 
    +**
    +** This version of the memory allocation subsystem omits all
    +** use of malloc(). The SQLite user supplies a block of memory
    +** before calling sqlite3_initialize() from which allocations
    +** are made and returned by the xMalloc() and xRealloc() 
    +** implementations. Once sqlite3_initialize() has been called,
    +** the amount of memory available to SQLite is fixed and cannot
    +** be changed.
    +**
    +** This version of the memory allocation subsystem is included
    +** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.
    +**
    +** $Id: mem3.c,v 1.25 2008/11/19 16:52:44 danielk1977 Exp $
    +*/
    +
    +/*
    +** This version of the memory allocator is only built into the library
    +** SQLITE_ENABLE_MEMSYS3 is defined. Defining this symbol does not
    +** mean that the library will use a memory-pool by default, just that
    +** it is available. The mempool allocator is activated by calling
    +** sqlite3_config().
    +*/
    +#ifdef SQLITE_ENABLE_MEMSYS3
    +
    +/*
    +** Maximum size (in Mem3Blocks) of a "small" chunk.
    +*/
    +#define MX_SMALL 10
    +
    +
    +/*
    +** Number of freelist hash slots
    +*/
    +#define N_HASH  61
    +
    +/*
    +** A memory allocation (also called a "chunk") consists of two or 
    +** more blocks where each block is 8 bytes.  The first 8 bytes are 
    +** a header that is not returned to the user.
    +**
    +** A chunk is two or more blocks that is either checked out or
    +** free.  The first block has format u.hdr.  u.hdr.size4x is 4 times the
    +** size of the allocation in blocks if the allocation is free.
    +** The u.hdr.size4x&1 bit is true if the chunk is checked out and
    +** false if the chunk is on the freelist.  The u.hdr.size4x&2 bit
    +** is true if the previous chunk is checked out and false if the
    +** previous chunk is free.  The u.hdr.prevSize field is the size of
    +** the previous chunk in blocks if the previous chunk is on the
    +** freelist. If the previous chunk is checked out, then
    +** u.hdr.prevSize can be part of the data for that chunk and should
    +** not be read or written.
    +**
    +** We often identify a chunk by its index in mem3.aPool[].  When
    +** this is done, the chunk index refers to the second block of
    +** the chunk.  In this way, the first chunk has an index of 1.
    +** A chunk index of 0 means "no such chunk" and is the equivalent
    +** of a NULL pointer.
    +**
    +** The second block of free chunks is of the form u.list.  The
    +** two fields form a double-linked list of chunks of related sizes.
    +** Pointers to the head of the list are stored in mem3.aiSmall[] 
    +** for smaller chunks and mem3.aiHash[] for larger chunks.
    +**
    +** The second block of a chunk is user data if the chunk is checked 
    +** out.  If a chunk is checked out, the user data may extend into
    +** the u.hdr.prevSize value of the following chunk.
    +*/
    +typedef struct Mem3Block Mem3Block;
    +struct Mem3Block {
    +  union {
    +    struct {
    +      u32 prevSize;   /* Size of previous chunk in Mem3Block elements */
    +      u32 size4x;     /* 4x the size of current chunk in Mem3Block elements */
    +    } hdr;
    +    struct {
    +      u32 next;       /* Index in mem3.aPool[] of next free chunk */
    +      u32 prev;       /* Index in mem3.aPool[] of previous free chunk */
    +    } list;
    +  } u;
    +};
    +
    +/*
    +** All of the static variables used by this module are collected
    +** into a single structure named "mem3".  This is to keep the
    +** static variables organized and to reduce namespace pollution
    +** when this module is combined with other in the amalgamation.
    +*/
    +static SQLITE_WSD struct Mem3Global {
    +  /*
    +  ** Memory available for allocation. nPool is the size of the array
    +  ** (in Mem3Blocks) pointed to by aPool less 2.
    +  */
    +  u32 nPool;
    +  Mem3Block *aPool;
    +
    +  /*
    +  ** True if we are evaluating an out-of-memory callback.
    +  */
    +  int alarmBusy;
    +  
    +  /*
    +  ** Mutex to control access to the memory allocation subsystem.
    +  */
    +  sqlite3_mutex *mutex;
    +  
    +  /*
    +  ** The minimum amount of free space that we have seen.
    +  */
    +  u32 mnMaster;
    +
    +  /*
    +  ** iMaster is the index of the master chunk.  Most new allocations
    +  ** occur off of this chunk.  szMaster is the size (in Mem3Blocks)
    +  ** of the current master.  iMaster is 0 if there is not master chunk.
    +  ** The master chunk is not in either the aiHash[] or aiSmall[].
    +  */
    +  u32 iMaster;
    +  u32 szMaster;
    +
    +  /*
    +  ** Array of lists of free blocks according to the block size 
    +  ** for smaller chunks, or a hash on the block size for larger
    +  ** chunks.
    +  */
    +  u32 aiSmall[MX_SMALL-1];   /* For sizes 2 through MX_SMALL, inclusive */
    +  u32 aiHash[N_HASH];        /* For sizes MX_SMALL+1 and larger */
    +} mem3 = { 97535575 };
    +
    +#define mem3 GLOBAL(struct Mem3Global, mem3)
    +
    +/*
    +** Unlink the chunk at mem3.aPool[i] from list it is currently
    +** on.  *pRoot is the list that i is a member of.
    +*/
    +static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
    +  u32 next = mem3.aPool[i].u.list.next;
    +  u32 prev = mem3.aPool[i].u.list.prev;
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  if( prev==0 ){
    +    *pRoot = next;
    +  }else{
    +    mem3.aPool[prev].u.list.next = next;
    +  }
    +  if( next ){
    +    mem3.aPool[next].u.list.prev = prev;
    +  }
    +  mem3.aPool[i].u.list.next = 0;
    +  mem3.aPool[i].u.list.prev = 0;
    +}
    +
    +/*
    +** Unlink the chunk at index i from 
    +** whatever list is currently a member of.
    +*/
    +static void memsys3Unlink(u32 i){
    +  u32 size, hash;
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
    +  assert( i>=1 );
    +  size = mem3.aPool[i-1].u.hdr.size4x/4;
    +  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
    +  assert( size>=2 );
    +  if( size <= MX_SMALL ){
    +    memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]);
    +  }else{
    +    hash = size % N_HASH;
    +    memsys3UnlinkFromList(i, &mem3.aiHash[hash]);
    +  }
    +}
    +
    +/*
    +** Link the chunk at mem3.aPool[i] so that is on the list rooted
    +** at *pRoot.
    +*/
    +static void memsys3LinkIntoList(u32 i, u32 *pRoot){
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  mem3.aPool[i].u.list.next = *pRoot;
    +  mem3.aPool[i].u.list.prev = 0;
    +  if( *pRoot ){
    +    mem3.aPool[*pRoot].u.list.prev = i;
    +  }
    +  *pRoot = i;
    +}
    +
    +/*
    +** Link the chunk at index i into either the appropriate
    +** small chunk list, or into the large chunk hash table.
    +*/
    +static void memsys3Link(u32 i){
    +  u32 size, hash;
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( i>=1 );
    +  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
    +  size = mem3.aPool[i-1].u.hdr.size4x/4;
    +  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
    +  assert( size>=2 );
    +  if( size <= MX_SMALL ){
    +    memsys3LinkIntoList(i, &mem3.aiSmall[size-2]);
    +  }else{
    +    hash = size % N_HASH;
    +    memsys3LinkIntoList(i, &mem3.aiHash[hash]);
    +  }
    +}
    +
    +/*
    +** If the STATIC_MEM mutex is not already held, obtain it now. The mutex
    +** will already be held (obtained by code in malloc.c) if
    +** sqlite3GlobalConfig.bMemStat is true.
    +*/
    +static void memsys3Enter(void){
    +  if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){
    +    mem3.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
    +  }
    +  sqlite3_mutex_enter(mem3.mutex);
    +}
    +static void memsys3Leave(void){
    +  sqlite3_mutex_leave(mem3.mutex);
    +}
    +
    +/*
    +** Called when we are unable to satisfy an allocation of nBytes.
    +*/
    +static void memsys3OutOfMemory(int nByte){
    +  if( !mem3.alarmBusy ){
    +    mem3.alarmBusy = 1;
    +    assert( sqlite3_mutex_held(mem3.mutex) );
    +    sqlite3_mutex_leave(mem3.mutex);
    +    sqlite3_release_memory(nByte);
    +    sqlite3_mutex_enter(mem3.mutex);
    +    mem3.alarmBusy = 0;
    +  }
    +}
    +
    +
    +/*
    +** Chunk i is a free chunk that has been unlinked.  Adjust its 
    +** size parameters for check-out and return a pointer to the 
    +** user portion of the chunk.
    +*/
    +static void *memsys3Checkout(u32 i, u32 nBlock){
    +  u32 x;
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( i>=1 );
    +  assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );
    +  assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );
    +  x = mem3.aPool[i-1].u.hdr.size4x;
    +  mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2);
    +  mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock;
    +  mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2;
    +  return &mem3.aPool[i];
    +}
    +
    +/*
    +** Carve a piece off of the end of the mem3.iMaster free chunk.
    +** Return a pointer to the new allocation.  Or, if the master chunk
    +** is not large enough, return 0.
    +*/
    +static void *memsys3FromMaster(u32 nBlock){
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( mem3.szMaster>=nBlock );
    +  if( nBlock>=mem3.szMaster-1 ){
    +    /* Use the entire master */
    +    void *p = memsys3Checkout(mem3.iMaster, mem3.szMaster);
    +    mem3.iMaster = 0;
    +    mem3.szMaster = 0;
    +    mem3.mnMaster = 0;
    +    return p;
    +  }else{
    +    /* Split the master block.  Return the tail. */
    +    u32 newi, x;
    +    newi = mem3.iMaster + mem3.szMaster - nBlock;
    +    assert( newi > mem3.iMaster+1 );
    +    mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock;
    +    mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x |= 2;
    +    mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1;
    +    mem3.szMaster -= nBlock;
    +    mem3.aPool[newi-1].u.hdr.prevSize = mem3.szMaster;
    +    x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
    +    mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
    +    if( mem3.szMaster < mem3.mnMaster ){
    +      mem3.mnMaster = mem3.szMaster;
    +    }
    +    return (void*)&mem3.aPool[newi];
    +  }
    +}
    +
    +/*
    +** *pRoot is the head of a list of free chunks of the same size
    +** or same size hash.  In other words, *pRoot is an entry in either
    +** mem3.aiSmall[] or mem3.aiHash[].  
    +**
    +** This routine examines all entries on the given list and tries
    +** to coalesce each entries with adjacent free chunks.  
    +**
    +** If it sees a chunk that is larger than mem3.iMaster, it replaces 
    +** the current mem3.iMaster with the new larger chunk.  In order for
    +** this mem3.iMaster replacement to work, the master chunk must be
    +** linked into the hash tables.  That is not the normal state of
    +** affairs, of course.  The calling routine must link the master
    +** chunk before invoking this routine, then must unlink the (possibly
    +** changed) master chunk once this routine has finished.
    +*/
    +static void memsys3Merge(u32 *pRoot){
    +  u32 iNext, prev, size, i, x;
    +
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  for(i=*pRoot; i>0; i=iNext){
    +    iNext = mem3.aPool[i].u.list.next;
    +    size = mem3.aPool[i-1].u.hdr.size4x;
    +    assert( (size&1)==0 );
    +    if( (size&2)==0 ){
    +      memsys3UnlinkFromList(i, pRoot);
    +      assert( i > mem3.aPool[i-1].u.hdr.prevSize );
    +      prev = i - mem3.aPool[i-1].u.hdr.prevSize;
    +      if( prev==iNext ){
    +        iNext = mem3.aPool[prev].u.list.next;
    +      }
    +      memsys3Unlink(prev);
    +      size = i + size/4 - prev;
    +      x = mem3.aPool[prev-1].u.hdr.size4x & 2;
    +      mem3.aPool[prev-1].u.hdr.size4x = size*4 | x;
    +      mem3.aPool[prev+size-1].u.hdr.prevSize = size;
    +      memsys3Link(prev);
    +      i = prev;
    +    }else{
    +      size /= 4;
    +    }
    +    if( size>mem3.szMaster ){
    +      mem3.iMaster = i;
    +      mem3.szMaster = size;
    +    }
    +  }
    +}
    +
    +/*
    +** Return a block of memory of at least nBytes in size.
    +** Return NULL if unable.
    +**
    +** This function assumes that the necessary mutexes, if any, are
    +** already held by the caller. Hence "Unsafe".
    +*/
    +static void *memsys3MallocUnsafe(int nByte){
    +  u32 i;
    +  u32 nBlock;
    +  u32 toFree;
    +
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( sizeof(Mem3Block)==8 );
    +  if( nByte<=12 ){
    +    nBlock = 2;
    +  }else{
    +    nBlock = (nByte + 11)/8;
    +  }
    +  assert( nBlock>=2 );
    +
    +  /* STEP 1:
    +  ** Look for an entry of the correct size in either the small
    +  ** chunk table or in the large chunk hash table.  This is
    +  ** successful most of the time (about 9 times out of 10).
    +  */
    +  if( nBlock <= MX_SMALL ){
    +    i = mem3.aiSmall[nBlock-2];
    +    if( i>0 ){
    +      memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]);
    +      return memsys3Checkout(i, nBlock);
    +    }
    +  }else{
    +    int hash = nBlock % N_HASH;
    +    for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){
    +      if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){
    +        memsys3UnlinkFromList(i, &mem3.aiHash[hash]);
    +        return memsys3Checkout(i, nBlock);
    +      }
    +    }
    +  }
    +
    +  /* STEP 2:
    +  ** Try to satisfy the allocation by carving a piece off of the end
    +  ** of the master chunk.  This step usually works if step 1 fails.
    +  */
    +  if( mem3.szMaster>=nBlock ){
    +    return memsys3FromMaster(nBlock);
    +  }
    +
    +
    +  /* STEP 3:  
    +  ** Loop through the entire memory pool.  Coalesce adjacent free
    +  ** chunks.  Recompute the master chunk as the largest free chunk.
    +  ** Then try again to satisfy the allocation by carving a piece off
    +  ** of the end of the master chunk.  This step happens very
    +  ** rarely (we hope!)
    +  */
    +  for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){
    +    memsys3OutOfMemory(toFree);
    +    if( mem3.iMaster ){
    +      memsys3Link(mem3.iMaster);
    +      mem3.iMaster = 0;
    +      mem3.szMaster = 0;
    +    }
    +    for(i=0; i<N_HASH; i++){
    +      memsys3Merge(&mem3.aiHash[i]);
    +    }
    +    for(i=0; i<MX_SMALL-1; i++){
    +      memsys3Merge(&mem3.aiSmall[i]);
    +    }
    +    if( mem3.szMaster ){
    +      memsys3Unlink(mem3.iMaster);
    +      if( mem3.szMaster>=nBlock ){
    +        return memsys3FromMaster(nBlock);
    +      }
    +    }
    +  }
    +
    +  /* If none of the above worked, then we fail. */
    +  return 0;
    +}
    +
    +/*
    +** Free an outstanding memory allocation.
    +**
    +** This function assumes that the necessary mutexes, if any, are
    +** already held by the caller. Hence "Unsafe".
    +*/
    +void memsys3FreeUnsafe(void *pOld){
    +  Mem3Block *p = (Mem3Block*)pOld;
    +  int i;
    +  u32 size, x;
    +  assert( sqlite3_mutex_held(mem3.mutex) );
    +  assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );
    +  i = p - mem3.aPool;
    +  assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );
    +  size = mem3.aPool[i-1].u.hdr.size4x/4;
    +  assert( i+size<=mem3.nPool+1 );
    +  mem3.aPool[i-1].u.hdr.size4x &= ~1;
    +  mem3.aPool[i+size-1].u.hdr.prevSize = size;
    +  mem3.aPool[i+size-1].u.hdr.size4x &= ~2;
    +  memsys3Link(i);
    +
    +  /* Try to expand the master using the newly freed chunk */
    +  if( mem3.iMaster ){
    +    while( (mem3.aPool[mem3.iMaster-1].u.hdr.size4x&2)==0 ){
    +      size = mem3.aPool[mem3.iMaster-1].u.hdr.prevSize;
    +      mem3.iMaster -= size;
    +      mem3.szMaster += size;
    +      memsys3Unlink(mem3.iMaster);
    +      x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
    +      mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
    +      mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
    +    }
    +    x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
    +    while( (mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x&1)==0 ){
    +      memsys3Unlink(mem3.iMaster+mem3.szMaster);
    +      mem3.szMaster += mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x/4;
    +      mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
    +      mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
    +    }
    +  }
    +}
    +
    +/*
    +** Return the size of an outstanding allocation, in bytes.  The
    +** size returned omits the 8-byte header overhead.  This only
    +** works for chunks that are currently checked out.
    +*/
    +static int memsys3Size(void *p){
    +  Mem3Block *pBlock;
    +  if( p==0 ) return 0;
    +  pBlock = (Mem3Block*)p;
    +  assert( (pBlock[-1].u.hdr.size4x&1)!=0 );
    +  return (pBlock[-1].u.hdr.size4x&~3)*2 - 4;
    +}
    +
    +/*
    +** Round up a request size to the next valid allocation size.
    +*/
    +static int memsys3Roundup(int n){
    +  if( n<=12 ){
    +    return 12;
    +  }else{
    +    return ((n+11)&~7) - 4;
    +  }
    +}
    +
    +/*
    +** Allocate nBytes of memory.
    +*/
    +static void *memsys3Malloc(int nBytes){
    +  sqlite3_int64 *p;
    +  assert( nBytes>0 );          /* malloc.c filters out 0 byte requests */
    +  memsys3Enter();
    +  p = memsys3MallocUnsafe(nBytes);
    +  memsys3Leave();
    +  return (void*)p; 
    +}
    +
    +/*
    +** Free memory.
    +*/
    +void memsys3Free(void *pPrior){
    +  assert( pPrior );
    +  memsys3Enter();
    +  memsys3FreeUnsafe(pPrior);
    +  memsys3Leave();
    +}
    +
    +/*
    +** Change the size of an existing memory allocation
    +*/
    +void *memsys3Realloc(void *pPrior, int nBytes){
    +  int nOld;
    +  void *p;
    +  if( pPrior==0 ){
    +    return sqlite3_malloc(nBytes);
    +  }
    +  if( nBytes<=0 ){
    +    sqlite3_free(pPrior);
    +    return 0;
    +  }
    +  nOld = memsys3Size(pPrior);
    +  if( nBytes<=nOld && nBytes>=nOld-128 ){
    +    return pPrior;
    +  }
    +  memsys3Enter();
    +  p = memsys3MallocUnsafe(nBytes);
    +  if( p ){
    +    if( nOld<nBytes ){
    +      memcpy(p, pPrior, nOld);
    +    }else{
    +      memcpy(p, pPrior, nBytes);
    +    }
    +    memsys3FreeUnsafe(pPrior);
    +  }
    +  memsys3Leave();
    +  return p;
    +}
    +
    +/*
    +** Initialize this module.
    +*/
    +static int memsys3Init(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  if( !sqlite3GlobalConfig.pHeap ){
    +    return SQLITE_ERROR;
    +  }
    +
    +  /* Store a pointer to the memory block in global structure mem3. */
    +  assert( sizeof(Mem3Block)==8 );
    +  mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap;
    +  mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2;
    +
    +  /* Initialize the master block. */
    +  mem3.szMaster = mem3.nPool;
    +  mem3.mnMaster = mem3.szMaster;
    +  mem3.iMaster = 1;
    +  mem3.aPool[0].u.hdr.size4x = (mem3.szMaster<<2) + 2;
    +  mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool;
    +  mem3.aPool[mem3.nPool].u.hdr.size4x = 1;
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Deinitialize this module.
    +*/
    +static void memsys3Shutdown(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  mem3.mutex = 0;
    +  return;
    +}
    +
    +
    +
    +/*
    +** Open the file indicated and write a log of all unfreed memory 
    +** allocations into that log.
    +*/
    +SQLITE_PRIVATE void sqlite3Memsys3Dump(const char *zFilename){
    +#ifdef SQLITE_DEBUG
    +  FILE *out;
    +  u32 i, j;
    +  u32 size;
    +  if( zFilename==0 || zFilename[0]==0 ){
    +    out = stdout;
    +  }else{
    +    out = fopen(zFilename, "w");
    +    if( out==0 ){
    +      fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
    +                      zFilename);
    +      return;
    +    }
    +  }
    +  memsys3Enter();
    +  fprintf(out, "CHUNKS:\n");
    +  for(i=1; i<=mem3.nPool; i+=size/4){
    +    size = mem3.aPool[i-1].u.hdr.size4x;
    +    if( size/4<=1 ){
    +      fprintf(out, "%p size error\n", &mem3.aPool[i]);
    +      assert( 0 );
    +      break;
    +    }
    +    if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){
    +      fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]);
    +      assert( 0 );
    +      break;
    +    }
    +    if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){
    +      fprintf(out, "%p tail checkout bit is incorrect\n", &mem3.aPool[i]);
    +      assert( 0 );
    +      break;
    +    }
    +    if( size&1 ){
    +      fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8);
    +    }else{
    +      fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8,
    +                  i==mem3.iMaster ? " **master**" : "");
    +    }
    +  }
    +  for(i=0; i<MX_SMALL-1; i++){
    +    if( mem3.aiSmall[i]==0 ) continue;
    +    fprintf(out, "small(%2d):", i);
    +    for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){
    +      fprintf(out, " %p(%d)", &mem3.aPool[j],
    +              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
    +    }
    +    fprintf(out, "\n"); 
    +  }
    +  for(i=0; i<N_HASH; i++){
    +    if( mem3.aiHash[i]==0 ) continue;
    +    fprintf(out, "hash(%2d):", i);
    +    for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){
    +      fprintf(out, " %p(%d)", &mem3.aPool[j],
    +              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
    +    }
    +    fprintf(out, "\n"); 
    +  }
    +  fprintf(out, "master=%d\n", mem3.iMaster);
    +  fprintf(out, "nowUsed=%d\n", mem3.nPool*8 - mem3.szMaster*8);
    +  fprintf(out, "mxUsed=%d\n", mem3.nPool*8 - mem3.mnMaster*8);
    +  sqlite3_mutex_leave(mem3.mutex);
    +  if( out==stdout ){
    +    fflush(stdout);
    +  }else{
    +    fclose(out);
    +  }
    +#else
    +  UNUSED_PARAMETER(zFilename);
    +#endif
    +}
    +
    +/*
    +** This routine is the only routine in this file with external 
    +** linkage.
    +**
    +** Populate the low-level memory allocation function pointers in
    +** sqlite3GlobalConfig.m with pointers to the routines in this file. The
    +** arguments specify the block of memory to manage.
    +**
    +** This routine is only called by sqlite3_config(), and therefore
    +** is not required to be threadsafe (it is not).
    +*/
    +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void){
    +  static const sqlite3_mem_methods mempoolMethods = {
    +     memsys3Malloc,
    +     memsys3Free,
    +     memsys3Realloc,
    +     memsys3Size,
    +     memsys3Roundup,
    +     memsys3Init,
    +     memsys3Shutdown,
    +     0
    +  };
    +  return &mempoolMethods;
    +}
    +
    +#endif /* SQLITE_ENABLE_MEMSYS3 */
    +
    +/************** End of mem3.c ************************************************/
    +/************** Begin file mem5.c ********************************************/
    +/*
    +** 2007 October 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement a memory
    +** allocation subsystem for use by SQLite. 
    +**
    +** This version of the memory allocation subsystem omits all
    +** use of malloc(). The application gives SQLite a block of memory
    +** before calling sqlite3_initialize() from which allocations
    +** are made and returned by the xMalloc() and xRealloc() 
    +** implementations. Once sqlite3_initialize() has been called,
    +** the amount of memory available to SQLite is fixed and cannot
    +** be changed.
    +**
    +** This version of the memory allocation subsystem is included
    +** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.
    +**
    +** This memory allocator uses the following algorithm:
    +**
    +**   1.  All memory allocations sizes are rounded up to a power of 2.
    +**
    +**   2.  If two adjacent free blocks are the halves of a larger block,
    +**       then the two blocks are coalesed into the single larger block.
    +**
    +**   3.  New memory is allocated from the first available free block.
    +**
    +** This algorithm is described in: J. M. Robson. "Bounds for Some Functions
    +** Concerning Dynamic Storage Allocation". Journal of the Association for
    +** Computing Machinery, Volume 21, Number 8, July 1974, pages 491-499.
    +** 
    +** Let n be the size of the largest allocation divided by the minimum
    +** allocation size (after rounding all sizes up to a power of 2.)  Let M
    +** be the maximum amount of memory ever outstanding at one time.  Let
    +** N be the total amount of memory available for allocation.  Robson
    +** proved that this memory allocator will never breakdown due to 
    +** fragmentation as long as the following constraint holds:
    +**
    +**      N >=  M*(1 + log2(n)/2) - n + 1
    +**
    +** The sqlite3_status() logic tracks the maximum values of n and M so
    +** that an application can, at any time, verify this constraint.
    +*/
    +
    +/*
    +** This version of the memory allocator is used only when 
    +** SQLITE_ENABLE_MEMSYS5 is defined.
    +*/
    +#ifdef SQLITE_ENABLE_MEMSYS5
    +
    +/*
    +** A minimum allocation is an instance of the following structure.
    +** Larger allocations are an array of these structures where the
    +** size of the array is a power of 2.
    +**
    +** The size of this object must be a power of two.  That fact is
    +** verified in memsys5Init().
    +*/
    +typedef struct Mem5Link Mem5Link;
    +struct Mem5Link {
    +  int next;       /* Index of next free chunk */
    +  int prev;       /* Index of previous free chunk */
    +};
    +
    +/*
    +** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
    +** mem5.szAtom is always at least 8 and 32-bit integers are used,
    +** it is not actually possible to reach this limit.
    +*/
    +#define LOGMAX 30
    +
    +/*
    +** Masks used for mem5.aCtrl[] elements.
    +*/
    +#define CTRL_LOGSIZE  0x1f    /* Log2 Size of this block */
    +#define CTRL_FREE     0x20    /* True if not checked out */
    +
    +/*
    +** All of the static variables used by this module are collected
    +** into a single structure named "mem5".  This is to keep the
    +** static variables organized and to reduce namespace pollution
    +** when this module is combined with other in the amalgamation.
    +*/
    +static SQLITE_WSD struct Mem5Global {
    +  /*
    +  ** Memory available for allocation
    +  */
    +  int szAtom;      /* Smallest possible allocation in bytes */
    +  int nBlock;      /* Number of szAtom sized blocks in zPool */
    +  u8 *zPool;       /* Memory available to be allocated */
    +  
    +  /*
    +  ** Mutex to control access to the memory allocation subsystem.
    +  */
    +  sqlite3_mutex *mutex;
    +
    +  /*
    +  ** Performance statistics
    +  */
    +  u64 nAlloc;         /* Total number of calls to malloc */
    +  u64 totalAlloc;     /* Total of all malloc calls - includes internal frag */
    +  u64 totalExcess;    /* Total internal fragmentation */
    +  u32 currentOut;     /* Current checkout, including internal fragmentation */
    +  u32 currentCount;   /* Current number of distinct checkouts */
    +  u32 maxOut;         /* Maximum instantaneous currentOut */
    +  u32 maxCount;       /* Maximum instantaneous currentCount */
    +  u32 maxRequest;     /* Largest allocation (exclusive of internal frag) */
    +  
    +  /*
    +  ** Lists of free blocks.  aiFreelist[0] is a list of free blocks of
    +  ** size mem5.szAtom.  aiFreelist[1] holds blocks of size szAtom*2.
    +  ** and so forth.
    +  */
    +  int aiFreelist[LOGMAX+1];
    +
    +  /*
    +  ** Space for tracking which blocks are checked out and the size
    +  ** of each block.  One byte per block.
    +  */
    +  u8 *aCtrl;
    +
    +} mem5 = { 0 };
    +
    +/*
    +** Access the static variable through a macro for SQLITE_OMIT_WSD
    +*/
    +#define mem5 GLOBAL(struct Mem5Global, mem5)
    +
    +/*
    +** Assuming mem5.zPool is divided up into an array of Mem5Link
    +** structures, return a pointer to the idx-th such lik.
    +*/
    +#define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))
    +
    +/*
    +** Unlink the chunk at mem5.aPool[i] from list it is currently
    +** on.  It should be found on mem5.aiFreelist[iLogsize].
    +*/
    +static void memsys5Unlink(int i, int iLogsize){
    +  int next, prev;
    +  assert( i>=0 && i<mem5.nBlock );
    +  assert( iLogsize>=0 && iLogsize<=LOGMAX );
    +  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );
    +
    +  next = MEM5LINK(i)->next;
    +  prev = MEM5LINK(i)->prev;
    +  if( prev<0 ){
    +    mem5.aiFreelist[iLogsize] = next;
    +  }else{
    +    MEM5LINK(prev)->next = next;
    +  }
    +  if( next>=0 ){
    +    MEM5LINK(next)->prev = prev;
    +  }
    +}
    +
    +/*
    +** Link the chunk at mem5.aPool[i] so that is on the iLogsize
    +** free list.
    +*/
    +static void memsys5Link(int i, int iLogsize){
    +  int x;
    +  assert( sqlite3_mutex_held(mem5.mutex) );
    +  assert( i>=0 && i<mem5.nBlock );
    +  assert( iLogsize>=0 && iLogsize<=LOGMAX );
    +  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );
    +
    +  x = MEM5LINK(i)->next = mem5.aiFreelist[iLogsize];
    +  MEM5LINK(i)->prev = -1;
    +  if( x>=0 ){
    +    assert( x<mem5.nBlock );
    +    MEM5LINK(x)->prev = i;
    +  }
    +  mem5.aiFreelist[iLogsize] = i;
    +}
    +
    +/*
    +** If the STATIC_MEM mutex is not already held, obtain it now. The mutex
    +** will already be held (obtained by code in malloc.c) if
    +** sqlite3GlobalConfig.bMemStat is true.
    +*/
    +static void memsys5Enter(void){
    +  sqlite3_mutex_enter(mem5.mutex);
    +}
    +static void memsys5Leave(void){
    +  sqlite3_mutex_leave(mem5.mutex);
    +}
    +
    +/*
    +** Return the size of an outstanding allocation, in bytes.  The
    +** size returned omits the 8-byte header overhead.  This only
    +** works for chunks that are currently checked out.
    +*/
    +static int memsys5Size(void *p){
    +  int iSize = 0;
    +  if( p ){
    +    int i = ((u8 *)p-mem5.zPool)/mem5.szAtom;
    +    assert( i>=0 && i<mem5.nBlock );
    +    iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));
    +  }
    +  return iSize;
    +}
    +
    +/*
    +** Find the first entry on the freelist iLogsize.  Unlink that
    +** entry and return its index. 
    +*/
    +static int memsys5UnlinkFirst(int iLogsize){
    +  int i;
    +  int iFirst;
    +
    +  assert( iLogsize>=0 && iLogsize<=LOGMAX );
    +  i = iFirst = mem5.aiFreelist[iLogsize];
    +  assert( iFirst>=0 );
    +  while( i>0 ){
    +    if( i<iFirst ) iFirst = i;
    +    i = MEM5LINK(i)->next;
    +  }
    +  memsys5Unlink(iFirst, iLogsize);
    +  return iFirst;
    +}
    +
    +/*
    +** Return a block of memory of at least nBytes in size.
    +** Return NULL if unable.  Return NULL if nBytes==0.
    +**
    +** The caller guarantees that nByte positive.
    +**
    +** The caller has obtained a mutex prior to invoking this
    +** routine so there is never any chance that two or more
    +** threads can be in this routine at the same time.
    +*/
    +static void *memsys5MallocUnsafe(int nByte){
    +  int i;           /* Index of a mem5.aPool[] slot */
    +  int iBin;        /* Index into mem5.aiFreelist[] */
    +  int iFullSz;     /* Size of allocation rounded up to power of 2 */
    +  int iLogsize;    /* Log2 of iFullSz/POW2_MIN */
    +
    +  /* nByte must be a positive */
    +  assert( nByte>0 );
    +
    +  /* Keep track of the maximum allocation request.  Even unfulfilled
    +  ** requests are counted */
    +  if( (u32)nByte>mem5.maxRequest ){
    +    mem5.maxRequest = nByte;
    +  }
    +
    +  /* Abort if the requested allocation size is larger than the largest
    +  ** power of two that we can represent using 32-bit signed integers.
    +  */
    +  if( nByte > 0x40000000 ){
    +    return 0;
    +  }
    +
    +  /* Round nByte up to the next valid power of two */
    +  for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
    +
    +  /* Make sure mem5.aiFreelist[iLogsize] contains at least one free
    +  ** block.  If not, then split a block of the next larger power of
    +  ** two in order to create a new free block of size iLogsize.
    +  */
    +  for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){}
    +  if( iBin>LOGMAX ) return 0;
    +  i = memsys5UnlinkFirst(iBin);
    +  while( iBin>iLogsize ){
    +    int newSize;
    +
    +    iBin--;
    +    newSize = 1 << iBin;
    +    mem5.aCtrl[i+newSize] = CTRL_FREE | iBin;
    +    memsys5Link(i+newSize, iBin);
    +  }
    +  mem5.aCtrl[i] = iLogsize;
    +
    +  /* Update allocator performance statistics. */
    +  mem5.nAlloc++;
    +  mem5.totalAlloc += iFullSz;
    +  mem5.totalExcess += iFullSz - nByte;
    +  mem5.currentCount++;
    +  mem5.currentOut += iFullSz;
    +  if( mem5.maxCount<mem5.currentCount ) mem5.maxCount = mem5.currentCount;
    +  if( mem5.maxOut<mem5.currentOut ) mem5.maxOut = mem5.currentOut;
    +
    +  /* Return a pointer to the allocated memory. */
    +  return (void*)&mem5.zPool[i*mem5.szAtom];
    +}
    +
    +/*
    +** Free an outstanding memory allocation.
    +*/
    +static void memsys5FreeUnsafe(void *pOld){
    +  u32 size, iLogsize;
    +  int iBlock;
    +
    +  /* Set iBlock to the index of the block pointed to by pOld in 
    +  ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.
    +  */
    +  iBlock = ((u8 *)pOld-mem5.zPool)/mem5.szAtom;
    +
    +  /* Check that the pointer pOld points to a valid, non-free block. */
    +  assert( iBlock>=0 && iBlock<mem5.nBlock );
    +  assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );
    +  assert( (mem5.aCtrl[iBlock] & CTRL_FREE)==0 );
    +
    +  iLogsize = mem5.aCtrl[iBlock] & CTRL_LOGSIZE;
    +  size = 1<<iLogsize;
    +  assert( iBlock+size-1<(u32)mem5.nBlock );
    +
    +  mem5.aCtrl[iBlock] |= CTRL_FREE;
    +  mem5.aCtrl[iBlock+size-1] |= CTRL_FREE;
    +  assert( mem5.currentCount>0 );
    +  assert( mem5.currentOut>=(size*mem5.szAtom) );
    +  mem5.currentCount--;
    +  mem5.currentOut -= size*mem5.szAtom;
    +  assert( mem5.currentOut>0 || mem5.currentCount==0 );
    +  assert( mem5.currentCount>0 || mem5.currentOut==0 );
    +
    +  mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;
    +  while( ALWAYS(iLogsize<LOGMAX) ){
    +    int iBuddy;
    +    if( (iBlock>>iLogsize) & 1 ){
    +      iBuddy = iBlock - size;
    +    }else{
    +      iBuddy = iBlock + size;
    +    }
    +    assert( iBuddy>=0 );
    +    if( (iBuddy+(1<<iLogsize))>mem5.nBlock ) break;
    +    if( mem5.aCtrl[iBuddy]!=(CTRL_FREE | iLogsize) ) break;
    +    memsys5Unlink(iBuddy, iLogsize);
    +    iLogsize++;
    +    if( iBuddy<iBlock ){
    +      mem5.aCtrl[iBuddy] = CTRL_FREE | iLogsize;
    +      mem5.aCtrl[iBlock] = 0;
    +      iBlock = iBuddy;
    +    }else{
    +      mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;
    +      mem5.aCtrl[iBuddy] = 0;
    +    }
    +    size *= 2;
    +  }
    +  memsys5Link(iBlock, iLogsize);
    +}
    +
    +/*
    +** Allocate nBytes of memory
    +*/
    +static void *memsys5Malloc(int nBytes){
    +  sqlite3_int64 *p = 0;
    +  if( nBytes>0 ){
    +    memsys5Enter();
    +    p = memsys5MallocUnsafe(nBytes);
    +    memsys5Leave();
    +  }
    +  return (void*)p; 
    +}
    +
    +/*
    +** Free memory.
    +**
    +** The outer layer memory allocator prevents this routine from
    +** being called with pPrior==0.
    +*/
    +static void memsys5Free(void *pPrior){
    +  assert( pPrior!=0 );
    +  memsys5Enter();
    +  memsys5FreeUnsafe(pPrior);
    +  memsys5Leave();  
    +}
    +
    +/*
    +** Change the size of an existing memory allocation.
    +**
    +** The outer layer memory allocator prevents this routine from
    +** being called with pPrior==0.  
    +**
    +** nBytes is always a value obtained from a prior call to
    +** memsys5Round().  Hence nBytes is always a non-negative power
    +** of two.  If nBytes==0 that means that an oversize allocation
    +** (an allocation larger than 0x40000000) was requested and this
    +** routine should return 0 without freeing pPrior.
    +*/
    +static void *memsys5Realloc(void *pPrior, int nBytes){
    +  int nOld;
    +  void *p;
    +  assert( pPrior!=0 );
    +  assert( (nBytes&(nBytes-1))==0 );
    +  assert( nBytes>=0 );
    +  if( nBytes==0 ){
    +    return 0;
    +  }
    +  nOld = memsys5Size(pPrior);
    +  if( nBytes<=nOld ){
    +    return pPrior;
    +  }
    +  memsys5Enter();
    +  p = memsys5MallocUnsafe(nBytes);
    +  if( p ){
    +    memcpy(p, pPrior, nOld);
    +    memsys5FreeUnsafe(pPrior);
    +  }
    +  memsys5Leave();
    +  return p;
    +}
    +
    +/*
    +** Round up a request size to the next valid allocation size.  If
    +** the allocation is too large to be handled by this allocation system,
    +** return 0.
    +**
    +** All allocations must be a power of two and must be expressed by a
    +** 32-bit signed integer.  Hence the largest allocation is 0x40000000
    +** or 1073741824 bytes.
    +*/
    +static int memsys5Roundup(int n){
    +  int iFullSz;
    +  if( n > 0x40000000 ) return 0;
    +  for(iFullSz=mem5.szAtom; iFullSz<n; iFullSz *= 2);
    +  return iFullSz;
    +}
    +
    +/*
    +** Return the ceiling of the logarithm base 2 of iValue.
    +**
    +** Examples:   memsys5Log(1) -> 0
    +**             memsys5Log(2) -> 1
    +**             memsys5Log(4) -> 2
    +**             memsys5Log(5) -> 3
    +**             memsys5Log(8) -> 3
    +**             memsys5Log(9) -> 4
    +*/
    +static int memsys5Log(int iValue){
    +  int iLog;
    +  for(iLog=0; (1<<iLog)<iValue; iLog++);
    +  return iLog;
    +}
    +
    +/*
    +** Initialize the memory allocator.
    +**
    +** This routine is not threadsafe.  The caller must be holding a mutex
    +** to prevent multiple threads from entering at the same time.
    +*/
    +static int memsys5Init(void *NotUsed){
    +  int ii;            /* Loop counter */
    +  int nByte;         /* Number of bytes of memory available to this allocator */
    +  u8 *zByte;         /* Memory usable by this allocator */
    +  int nMinLog;       /* Log base 2 of minimum allocation size in bytes */
    +  int iOffset;       /* An offset into mem5.aCtrl[] */
    +
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  /* For the purposes of this routine, disable the mutex */
    +  mem5.mutex = 0;
    +
    +  /* The size of a Mem5Link object must be a power of two.  Verify that
    +  ** this is case.
    +  */
    +  assert( (sizeof(Mem5Link)&(sizeof(Mem5Link)-1))==0 );
    +
    +  nByte = sqlite3GlobalConfig.nHeap;
    +  zByte = (u8*)sqlite3GlobalConfig.pHeap;
    +  assert( zByte!=0 );  /* sqlite3_config() does not allow otherwise */
    +
    +  nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq);
    +  mem5.szAtom = (1<<nMinLog);
    +  while( (int)sizeof(Mem5Link)>mem5.szAtom ){
    +    mem5.szAtom = mem5.szAtom << 1;
    +  }
    +
    +  mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
    +  mem5.zPool = zByte;
    +  mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];
    +
    +  for(ii=0; ii<=LOGMAX; ii++){
    +    mem5.aiFreelist[ii] = -1;
    +  }
    +
    +  iOffset = 0;
    +  for(ii=LOGMAX; ii>=0; ii--){
    +    int nAlloc = (1<<ii);
    +    if( (iOffset+nAlloc)<=mem5.nBlock ){
    +      mem5.aCtrl[iOffset] = ii | CTRL_FREE;
    +      memsys5Link(iOffset, ii);
    +      iOffset += nAlloc;
    +    }
    +    assert((iOffset+nAlloc)>mem5.nBlock);
    +  }
    +
    +  /* If a mutex is required for normal operation, allocate one */
    +  if( sqlite3GlobalConfig.bMemstat==0 ){
    +    mem5.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Deinitialize this module.
    +*/
    +static void memsys5Shutdown(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  mem5.mutex = 0;
    +  return;
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** Open the file indicated and write a log of all unfreed memory 
    +** allocations into that log.
    +*/
    +SQLITE_PRIVATE void sqlite3Memsys5Dump(const char *zFilename){
    +  FILE *out;
    +  int i, j, n;
    +  int nMinLog;
    +
    +  if( zFilename==0 || zFilename[0]==0 ){
    +    out = stdout;
    +  }else{
    +    out = fopen(zFilename, "w");
    +    if( out==0 ){
    +      fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
    +                      zFilename);
    +      return;
    +    }
    +  }
    +  memsys5Enter();
    +  nMinLog = memsys5Log(mem5.szAtom);
    +  for(i=0; i<=LOGMAX && i+nMinLog<32; i++){
    +    for(n=0, j=mem5.aiFreelist[i]; j>=0; j = MEM5LINK(j)->next, n++){}
    +    fprintf(out, "freelist items of size %d: %d\n", mem5.szAtom << i, n);
    +  }
    +  fprintf(out, "mem5.nAlloc       = %llu\n", mem5.nAlloc);
    +  fprintf(out, "mem5.totalAlloc   = %llu\n", mem5.totalAlloc);
    +  fprintf(out, "mem5.totalExcess  = %llu\n", mem5.totalExcess);
    +  fprintf(out, "mem5.currentOut   = %u\n", mem5.currentOut);
    +  fprintf(out, "mem5.currentCount = %u\n", mem5.currentCount);
    +  fprintf(out, "mem5.maxOut       = %u\n", mem5.maxOut);
    +  fprintf(out, "mem5.maxCount     = %u\n", mem5.maxCount);
    +  fprintf(out, "mem5.maxRequest   = %u\n", mem5.maxRequest);
    +  memsys5Leave();
    +  if( out==stdout ){
    +    fflush(stdout);
    +  }else{
    +    fclose(out);
    +  }
    +}
    +#endif
    +
    +/*
    +** This routine is the only routine in this file with external 
    +** linkage. It returns a pointer to a static sqlite3_mem_methods
    +** struct populated with the memsys5 methods.
    +*/
    +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void){
    +  static const sqlite3_mem_methods memsys5Methods = {
    +     memsys5Malloc,
    +     memsys5Free,
    +     memsys5Realloc,
    +     memsys5Size,
    +     memsys5Roundup,
    +     memsys5Init,
    +     memsys5Shutdown,
    +     0
    +  };
    +  return &memsys5Methods;
    +}
    +
    +#endif /* SQLITE_ENABLE_MEMSYS5 */
    +
    +/************** End of mem5.c ************************************************/
    +/************** Begin file mutex.c *******************************************/
    +/*
    +** 2007 August 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement mutexes.
    +**
    +** This file contains code that is common across all mutex implementations.
    +
    +**
    +** $Id: mutex.c,v 1.31 2009/07/16 18:21:18 drh Exp $
    +*/
    +
    +#if defined(SQLITE_DEBUG) && !defined(SQLITE_MUTEX_OMIT)
    +/*
    +** For debugging purposes, record when the mutex subsystem is initialized
    +** and uninitialized so that we can assert() if there is an attempt to
    +** allocate a mutex while the system is uninitialized.
    +*/
    +static SQLITE_WSD int mutexIsInit = 0;
    +#endif /* SQLITE_DEBUG */
    +
    +
    +#ifndef SQLITE_MUTEX_OMIT
    +/*
    +** Initialize the mutex system.
    +*/
    +SQLITE_PRIVATE int sqlite3MutexInit(void){ 
    +  int rc = SQLITE_OK;
    +  if( sqlite3GlobalConfig.bCoreMutex ){
    +    if( !sqlite3GlobalConfig.mutex.xMutexAlloc ){
    +      /* If the xMutexAlloc method has not been set, then the user did not
    +      ** install a mutex implementation via sqlite3_config() prior to 
    +      ** sqlite3_initialize() being called. This block copies pointers to
    +      ** the default implementation into the sqlite3GlobalConfig structure.
    +      */
    +      sqlite3_mutex_methods *pFrom = sqlite3DefaultMutex();
    +      sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex;
    +
    +      memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));
    +      memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,
    +             sizeof(*pTo) - offsetof(sqlite3_mutex_methods, xMutexFree));
    +      pTo->xMutexAlloc = pFrom->xMutexAlloc;
    +    }
    +    rc = sqlite3GlobalConfig.mutex.xMutexInit();
    +  }
    +
    +#ifdef SQLITE_DEBUG
    +  GLOBAL(int, mutexIsInit) = 1;
    +#endif
    +
    +  return rc;
    +}
    +
    +/*
    +** Shutdown the mutex system. This call frees resources allocated by
    +** sqlite3MutexInit().
    +*/
    +SQLITE_PRIVATE int sqlite3MutexEnd(void){
    +  int rc = SQLITE_OK;
    +  if( sqlite3GlobalConfig.mutex.xMutexEnd ){
    +    rc = sqlite3GlobalConfig.mutex.xMutexEnd();
    +  }
    +
    +#ifdef SQLITE_DEBUG
    +  GLOBAL(int, mutexIsInit) = 0;
    +#endif
    +
    +  return rc;
    +}
    +
    +/*
    +** Retrieve a pointer to a static mutex or allocate a new dynamic one.
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize() ) return 0;
    +#endif
    +  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
    +}
    +
    +SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){
    +  if( !sqlite3GlobalConfig.bCoreMutex ){
    +    return 0;
    +  }
    +  assert( GLOBAL(int, mutexIsInit) );
    +  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
    +}
    +
    +/*
    +** Free a dynamic mutex.
    +*/
    +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
    +  if( p ){
    +    sqlite3GlobalConfig.mutex.xMutexFree(p);
    +  }
    +}
    +
    +/*
    +** Obtain the mutex p. If some other thread already has the mutex, block
    +** until it can be obtained.
    +*/
    +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
    +  if( p ){
    +    sqlite3GlobalConfig.mutex.xMutexEnter(p);
    +  }
    +}
    +
    +/*
    +** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
    +** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
    +*/
    +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
    +  int rc = SQLITE_OK;
    +  if( p ){
    +    return sqlite3GlobalConfig.mutex.xMutexTry(p);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** The sqlite3_mutex_leave() routine exits a mutex that was previously
    +** entered by the same thread.  The behavior is undefined if the mutex 
    +** is not currently entered. If a NULL pointer is passed as an argument
    +** this function is a no-op.
    +*/
    +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
    +  if( p ){
    +    sqlite3GlobalConfig.mutex.xMutexLeave(p);
    +  }
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    +** intended for use inside assert() statements.
    +*/
    +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
    +  return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
    +}
    +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
    +  return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
    +}
    +#endif
    +
    +#endif /* SQLITE_MUTEX_OMIT */
    +
    +/************** End of mutex.c ***********************************************/
    +/************** Begin file mutex_noop.c **************************************/
    +/*
    +** 2008 October 07
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement mutexes.
    +**
    +** This implementation in this file does not provide any mutual
    +** exclusion and is thus suitable for use only in applications
    +** that use SQLite in a single thread.  The routines defined
    +** here are place-holders.  Applications can substitute working
    +** mutex routines at start-time using the
    +**
    +**     sqlite3_config(SQLITE_CONFIG_MUTEX,...)
    +**
    +** interface.
    +**
    +** If compiled with SQLITE_DEBUG, then additional logic is inserted
    +** that does error checking on mutexes to make sure they are being
    +** called correctly.
    +**
    +** $Id: mutex_noop.c,v 1.3 2008/12/05 17:17:08 drh Exp $
    +*/
    +
    +
    +#if defined(SQLITE_MUTEX_NOOP) && !defined(SQLITE_DEBUG)
    +/*
    +** Stub routines for all mutex methods.
    +**
    +** This routines provide no mutual exclusion or error checking.
    +*/
    +static int noopMutexHeld(sqlite3_mutex *p){ return 1; }
    +static int noopMutexNotheld(sqlite3_mutex *p){ return 1; }
    +static int noopMutexInit(void){ return SQLITE_OK; }
    +static int noopMutexEnd(void){ return SQLITE_OK; }
    +static sqlite3_mutex *noopMutexAlloc(int id){ return (sqlite3_mutex*)8; }
    +static void noopMutexFree(sqlite3_mutex *p){ return; }
    +static void noopMutexEnter(sqlite3_mutex *p){ return; }
    +static int noopMutexTry(sqlite3_mutex *p){ return SQLITE_OK; }
    +static void noopMutexLeave(sqlite3_mutex *p){ return; }
    +
    +SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){
    +  static sqlite3_mutex_methods sMutex = {
    +    noopMutexInit,
    +    noopMutexEnd,
    +    noopMutexAlloc,
    +    noopMutexFree,
    +    noopMutexEnter,
    +    noopMutexTry,
    +    noopMutexLeave,
    +
    +    noopMutexHeld,
    +    noopMutexNotheld
    +  };
    +
    +  return &sMutex;
    +}
    +#endif /* defined(SQLITE_MUTEX_NOOP) && !defined(SQLITE_DEBUG) */
    +
    +#if defined(SQLITE_MUTEX_NOOP) && defined(SQLITE_DEBUG)
    +/*
    +** In this implementation, error checking is provided for testing
    +** and debugging purposes.  The mutexes still do not provide any
    +** mutual exclusion.
    +*/
    +
    +/*
    +** The mutex object
    +*/
    +struct sqlite3_mutex {
    +  int id;     /* The mutex type */
    +  int cnt;    /* Number of entries without a matching leave */
    +};
    +
    +/*
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    +** intended for use inside assert() statements.
    +*/
    +static int debugMutexHeld(sqlite3_mutex *p){
    +  return p==0 || p->cnt>0;
    +}
    +static int debugMutexNotheld(sqlite3_mutex *p){
    +  return p==0 || p->cnt==0;
    +}
    +
    +/*
    +** Initialize and deinitialize the mutex subsystem.
    +*/
    +static int debugMutexInit(void){ return SQLITE_OK; }
    +static int debugMutexEnd(void){ return SQLITE_OK; }
    +
    +/*
    +** The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it.  If it returns NULL
    +** that means that a mutex could not be allocated. 
    +*/
    +static sqlite3_mutex *debugMutexAlloc(int id){
    +  static sqlite3_mutex aStatic[6];
    +  sqlite3_mutex *pNew = 0;
    +  switch( id ){
    +    case SQLITE_MUTEX_FAST:
    +    case SQLITE_MUTEX_RECURSIVE: {
    +      pNew = sqlite3Malloc(sizeof(*pNew));
    +      if( pNew ){
    +        pNew->id = id;
    +        pNew->cnt = 0;
    +      }
    +      break;
    +    }
    +    default: {
    +      assert( id-2 >= 0 );
    +      assert( id-2 < (int)(sizeof(aStatic)/sizeof(aStatic[0])) );
    +      pNew = &aStatic[id-2];
    +      pNew->id = id;
    +      break;
    +    }
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** This routine deallocates a previously allocated mutex.
    +*/
    +static void debugMutexFree(sqlite3_mutex *p){
    +  assert( p->cnt==0 );
    +  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
    +  sqlite3_free(p);
    +}
    +
    +/*
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex.  If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
    +** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
    +** be entered multiple times by the same thread.  In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  If the same thread tries to enter any other kind of mutex
    +** more than once, the behavior is undefined.
    +*/
    +static void debugMutexEnter(sqlite3_mutex *p){
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );
    +  p->cnt++;
    +}
    +static int debugMutexTry(sqlite3_mutex *p){
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );
    +  p->cnt++;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  The behavior
    +** is undefined if the mutex is not currently entered or
    +** is not currently allocated.  SQLite will never do either.
    +*/
    +static void debugMutexLeave(sqlite3_mutex *p){
    +  assert( debugMutexHeld(p) );
    +  p->cnt--;
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );
    +}
    +
    +SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){
    +  static sqlite3_mutex_methods sMutex = {
    +    debugMutexInit,
    +    debugMutexEnd,
    +    debugMutexAlloc,
    +    debugMutexFree,
    +    debugMutexEnter,
    +    debugMutexTry,
    +    debugMutexLeave,
    +
    +    debugMutexHeld,
    +    debugMutexNotheld
    +  };
    +
    +  return &sMutex;
    +}
    +#endif /* defined(SQLITE_MUTEX_NOOP) && defined(SQLITE_DEBUG) */
    +
    +/************** End of mutex_noop.c ******************************************/
    +/************** Begin file mutex_os2.c ***************************************/
    +/*
    +** 2007 August 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement mutexes for OS/2
    +**
    +** $Id: mutex_os2.c,v 1.11 2008/11/22 19:50:54 pweilbacher Exp $
    +*/
    +
    +/*
    +** The code in this file is only used if SQLITE_MUTEX_OS2 is defined.
    +** See the mutex.h file for details.
    +*/
    +#ifdef SQLITE_MUTEX_OS2
    +
    +/********************** OS/2 Mutex Implementation **********************
    +**
    +** This implementation of mutexes is built using the OS/2 API.
    +*/
    +
    +/*
    +** The mutex object
    +** Each recursive mutex is an instance of the following structure.
    +*/
    +struct sqlite3_mutex {
    +  HMTX mutex;       /* Mutex controlling the lock */
    +  int  id;          /* Mutex type */
    +  int  nRef;        /* Number of references */
    +  TID  owner;       /* Thread holding this mutex */
    +};
    +
    +#define OS2_MUTEX_INITIALIZER   0,0,0,0
    +
    +/*
    +** Initialize and deinitialize the mutex subsystem.
    +*/
    +static int os2MutexInit(void){ return SQLITE_OK; }
    +static int os2MutexEnd(void){ return SQLITE_OK; }
    +
    +/*
    +** The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it.  If it returns NULL
    +** that means that a mutex could not be allocated. 
    +** SQLite will unwind its stack and return an error.  The argument
    +** to sqlite3_mutex_alloc() is one of these integer constants:
    +**
    +** <ul>
    +** <li>  SQLITE_MUTEX_FAST               0
    +** <li>  SQLITE_MUTEX_RECURSIVE          1
    +** <li>  SQLITE_MUTEX_STATIC_MASTER      2
    +** <li>  SQLITE_MUTEX_STATIC_MEM         3
    +** <li>  SQLITE_MUTEX_STATIC_PRNG        4
    +** </ul>
    +**
    +** The first two constants cause sqlite3_mutex_alloc() to create
    +** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
    +** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
    +** The mutex implementation does not need to make a distinction
    +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
    +** not want to.  But SQLite will only request a recursive mutex in
    +** cases where it really needs one.  If a faster non-recursive mutex
    +** implementation is available on the host platform, the mutex subsystem
    +** might return such a mutex in response to SQLITE_MUTEX_FAST.
    +**
    +** The other allowed parameters to sqlite3_mutex_alloc() each return
    +** a pointer to a static preexisting mutex.  Three static mutexes are
    +** used by the current version of SQLite.  Future versions of SQLite
    +** may add additional static mutexes.  Static mutexes are for internal
    +** use by SQLite only.  Applications that use SQLite mutexes should
    +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
    +** SQLITE_MUTEX_RECURSIVE.
    +**
    +** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
    +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
    +** returns a different mutex on every call.  But for the static
    +** mutex types, the same mutex is returned on every call that has
    +** the same type number.
    +*/
    +static sqlite3_mutex *os2MutexAlloc(int iType){
    +  sqlite3_mutex *p = NULL;
    +  switch( iType ){
    +    case SQLITE_MUTEX_FAST:
    +    case SQLITE_MUTEX_RECURSIVE: {
    +      p = sqlite3MallocZero( sizeof(*p) );
    +      if( p ){
    +        p->id = iType;
    +        if( DosCreateMutexSem( 0, &p->mutex, 0, FALSE ) != NO_ERROR ){
    +          sqlite3_free( p );
    +          p = NULL;
    +        }
    +      }
    +      break;
    +    }
    +    default: {
    +      static volatile int isInit = 0;
    +      static sqlite3_mutex staticMutexes[] = {
    +        { OS2_MUTEX_INITIALIZER, },
    +        { OS2_MUTEX_INITIALIZER, },
    +        { OS2_MUTEX_INITIALIZER, },
    +        { OS2_MUTEX_INITIALIZER, },
    +        { OS2_MUTEX_INITIALIZER, },
    +        { OS2_MUTEX_INITIALIZER, },
    +      };
    +      if ( !isInit ){
    +        APIRET rc;
    +        PTIB ptib;
    +        PPIB ppib;
    +        HMTX mutex;
    +        char name[32];
    +        DosGetInfoBlocks( &ptib, &ppib );
    +        sqlite3_snprintf( sizeof(name), name, "\\SEM32\\SQLITE%04x",
    +                          ppib->pib_ulpid );
    +        while( !isInit ){
    +          mutex = 0;
    +          rc = DosCreateMutexSem( name, &mutex, 0, FALSE);
    +          if( rc == NO_ERROR ){
    +            unsigned int i;
    +            if( !isInit ){
    +              for( i = 0; i < sizeof(staticMutexes)/sizeof(staticMutexes[0]); i++ ){
    +                DosCreateMutexSem( 0, &staticMutexes[i].mutex, 0, FALSE );
    +              }
    +              isInit = 1;
    +            }
    +            DosCloseMutexSem( mutex );
    +          }else if( rc == ERROR_DUPLICATE_NAME ){
    +            DosSleep( 1 );
    +          }else{
    +            return p;
    +          }
    +        }
    +      }
    +      assert( iType-2 >= 0 );
    +      assert( iType-2 < sizeof(staticMutexes)/sizeof(staticMutexes[0]) );
    +      p = &staticMutexes[iType-2];
    +      p->id = iType;
    +      break;
    +    }
    +  }
    +  return p;
    +}
    +
    +
    +/*
    +** This routine deallocates a previously allocated mutex.
    +** SQLite is careful to deallocate every mutex that it allocates.
    +*/
    +static void os2MutexFree(sqlite3_mutex *p){
    +  if( p==0 ) return;
    +  assert( p->nRef==0 );
    +  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
    +  DosCloseMutexSem( p->mutex );
    +  sqlite3_free( p );
    +}
    +
    +/*
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex.  If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
    +** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
    +** be entered multiple times by the same thread.  In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  If the same thread tries to enter any other kind of mutex
    +** more than once, the behavior is undefined.
    +*/
    +static void os2MutexEnter(sqlite3_mutex *p){
    +  TID tid;
    +  PID holder1;
    +  ULONG holder2;
    +  if( p==0 ) return;
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || os2MutexNotheld(p) );
    +  DosRequestMutexSem(p->mutex, SEM_INDEFINITE_WAIT);
    +  DosQueryMutexSem(p->mutex, &holder1, &tid, &holder2);
    +  p->owner = tid;
    +  p->nRef++;
    +}
    +static int os2MutexTry(sqlite3_mutex *p){
    +  int rc;
    +  TID tid;
    +  PID holder1;
    +  ULONG holder2;
    +  if( p==0 ) return SQLITE_OK;
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || os2MutexNotheld(p) );
    +  if( DosRequestMutexSem(p->mutex, SEM_IMMEDIATE_RETURN) == NO_ERROR) {
    +    DosQueryMutexSem(p->mutex, &holder1, &tid, &holder2);
    +    p->owner = tid;
    +    p->nRef++;
    +    rc = SQLITE_OK;
    +  } else {
    +    rc = SQLITE_BUSY;
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  The behavior
    +** is undefined if the mutex is not currently entered or
    +** is not currently allocated.  SQLite will never do either.
    +*/
    +static void os2MutexLeave(sqlite3_mutex *p){
    +  TID tid;
    +  PID holder1;
    +  ULONG holder2;
    +  if( p==0 ) return;
    +  assert( p->nRef>0 );
    +  DosQueryMutexSem(p->mutex, &holder1, &tid, &holder2);
    +  assert( p->owner==tid );
    +  p->nRef--;
    +  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );
    +  DosReleaseMutexSem(p->mutex);
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    +** intended for use inside assert() statements.
    +*/
    +static int os2MutexHeld(sqlite3_mutex *p){
    +  TID tid;
    +  PID pid;
    +  ULONG ulCount;
    +  PTIB ptib;
    +  if( p!=0 ) {
    +    DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
    +  } else {
    +    DosGetInfoBlocks(&ptib, NULL);
    +    tid = ptib->tib_ptib2->tib2_ultid;
    +  }
    +  return p==0 || (p->nRef!=0 && p->owner==tid);
    +}
    +static int os2MutexNotheld(sqlite3_mutex *p){
    +  TID tid;
    +  PID pid;
    +  ULONG ulCount;
    +  PTIB ptib;
    +  if( p!= 0 ) {
    +    DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
    +  } else {
    +    DosGetInfoBlocks(&ptib, NULL);
    +    tid = ptib->tib_ptib2->tib2_ultid;
    +  }
    +  return p==0 || p->nRef==0 || p->owner!=tid;
    +}
    +#endif
    +
    +SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){
    +  static sqlite3_mutex_methods sMutex = {
    +    os2MutexInit,
    +    os2MutexEnd,
    +    os2MutexAlloc,
    +    os2MutexFree,
    +    os2MutexEnter,
    +    os2MutexTry,
    +    os2MutexLeave,
    +#ifdef SQLITE_DEBUG
    +    os2MutexHeld,
    +    os2MutexNotheld
    +#endif
    +  };
    +
    +  return &sMutex;
    +}
    +#endif /* SQLITE_MUTEX_OS2 */
    +
    +/************** End of mutex_os2.c *******************************************/
    +/************** Begin file mutex_unix.c **************************************/
    +/*
    +** 2007 August 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement mutexes for pthreads
    +**
    +** $Id: mutex_unix.c,v 1.16 2008/12/08 18:19:18 drh Exp $
    +*/
    +
    +/*
    +** The code in this file is only used if we are compiling threadsafe
    +** under unix with pthreads.
    +**
    +** Note that this implementation requires a version of pthreads that
    +** supports recursive mutexes.
    +*/
    +#ifdef SQLITE_MUTEX_PTHREADS
    +
    +#include <pthread.h>
    +
    +
    +/*
    +** Each recursive mutex is an instance of the following structure.
    +*/
    +struct sqlite3_mutex {
    +  pthread_mutex_t mutex;     /* Mutex controlling the lock */
    +  int id;                    /* Mutex type */
    +  int nRef;                  /* Number of entrances */
    +  pthread_t owner;           /* Thread that is within this mutex */
    +#ifdef SQLITE_DEBUG
    +  int trace;                 /* True to trace changes */
    +#endif
    +};
    +#ifdef SQLITE_DEBUG
    +#define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, 0, 0, (pthread_t)0, 0 }
    +#else
    +#define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, 0, 0, (pthread_t)0 }
    +#endif
    +
    +/*
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    +** intended for use only inside assert() statements.  On some platforms,
    +** there might be race conditions that can cause these routines to
    +** deliver incorrect results.  In particular, if pthread_equal() is
    +** not an atomic operation, then these routines might delivery
    +** incorrect results.  On most platforms, pthread_equal() is a 
    +** comparison of two integers and is therefore atomic.  But we are
    +** told that HPUX is not such a platform.  If so, then these routines
    +** will not always work correctly on HPUX.
    +**
    +** On those platforms where pthread_equal() is not atomic, SQLite
    +** should be compiled without -DSQLITE_DEBUG and with -DNDEBUG to
    +** make sure no assert() statements are evaluated and hence these
    +** routines are never called.
    +*/
    +#if !defined(NDEBUG) || defined(SQLITE_DEBUG)
    +static int pthreadMutexHeld(sqlite3_mutex *p){
    +  return (p->nRef!=0 && pthread_equal(p->owner, pthread_self()));
    +}
    +static int pthreadMutexNotheld(sqlite3_mutex *p){
    +  return p->nRef==0 || pthread_equal(p->owner, pthread_self())==0;
    +}
    +#endif
    +
    +/*
    +** Initialize and deinitialize the mutex subsystem.
    +*/
    +static int pthreadMutexInit(void){ return SQLITE_OK; }
    +static int pthreadMutexEnd(void){ return SQLITE_OK; }
    +
    +/*
    +** The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it.  If it returns NULL
    +** that means that a mutex could not be allocated.  SQLite
    +** will unwind its stack and return an error.  The argument
    +** to sqlite3_mutex_alloc() is one of these integer constants:
    +**
    +** <ul>
    +** <li>  SQLITE_MUTEX_FAST
    +** <li>  SQLITE_MUTEX_RECURSIVE
    +** <li>  SQLITE_MUTEX_STATIC_MASTER
    +** <li>  SQLITE_MUTEX_STATIC_MEM
    +** <li>  SQLITE_MUTEX_STATIC_MEM2
    +** <li>  SQLITE_MUTEX_STATIC_PRNG
    +** <li>  SQLITE_MUTEX_STATIC_LRU
    +** <li>  SQLITE_MUTEX_STATIC_LRU2
    +** </ul>
    +**
    +** The first two constants cause sqlite3_mutex_alloc() to create
    +** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
    +** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
    +** The mutex implementation does not need to make a distinction
    +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
    +** not want to.  But SQLite will only request a recursive mutex in
    +** cases where it really needs one.  If a faster non-recursive mutex
    +** implementation is available on the host platform, the mutex subsystem
    +** might return such a mutex in response to SQLITE_MUTEX_FAST.
    +**
    +** The other allowed parameters to sqlite3_mutex_alloc() each return
    +** a pointer to a static preexisting mutex.  Six static mutexes are
    +** used by the current version of SQLite.  Future versions of SQLite
    +** may add additional static mutexes.  Static mutexes are for internal
    +** use by SQLite only.  Applications that use SQLite mutexes should
    +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
    +** SQLITE_MUTEX_RECURSIVE.
    +**
    +** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
    +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
    +** returns a different mutex on every call.  But for the static 
    +** mutex types, the same mutex is returned on every call that has
    +** the same type number.
    +*/
    +static sqlite3_mutex *pthreadMutexAlloc(int iType){
    +  static sqlite3_mutex staticMutexes[] = {
    +    SQLITE3_MUTEX_INITIALIZER,
    +    SQLITE3_MUTEX_INITIALIZER,
    +    SQLITE3_MUTEX_INITIALIZER,
    +    SQLITE3_MUTEX_INITIALIZER,
    +    SQLITE3_MUTEX_INITIALIZER,
    +    SQLITE3_MUTEX_INITIALIZER
    +  };
    +  sqlite3_mutex *p;
    +  switch( iType ){
    +    case SQLITE_MUTEX_RECURSIVE: {
    +      p = sqlite3MallocZero( sizeof(*p) );
    +      if( p ){
    +#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
    +        /* If recursive mutexes are not available, we will have to
    +        ** build our own.  See below. */
    +        pthread_mutex_init(&p->mutex, 0);
    +#else
    +        /* Use a recursive mutex if it is available */
    +        pthread_mutexattr_t recursiveAttr;
    +        pthread_mutexattr_init(&recursiveAttr);
    +        pthread_mutexattr_settype(&recursiveAttr, PTHREAD_MUTEX_RECURSIVE);
    +        pthread_mutex_init(&p->mutex, &recursiveAttr);
    +        pthread_mutexattr_destroy(&recursiveAttr);
    +#endif
    +        p->id = iType;
    +      }
    +      break;
    +    }
    +    case SQLITE_MUTEX_FAST: {
    +      p = sqlite3MallocZero( sizeof(*p) );
    +      if( p ){
    +        p->id = iType;
    +        pthread_mutex_init(&p->mutex, 0);
    +      }
    +      break;
    +    }
    +    default: {
    +      assert( iType-2 >= 0 );
    +      assert( iType-2 < ArraySize(staticMutexes) );
    +      p = &staticMutexes[iType-2];
    +      p->id = iType;
    +      break;
    +    }
    +  }
    +  return p;
    +}
    +
    +
    +/*
    +** This routine deallocates a previously
    +** allocated mutex.  SQLite is careful to deallocate every
    +** mutex that it allocates.
    +*/
    +static void pthreadMutexFree(sqlite3_mutex *p){
    +  assert( p->nRef==0 );
    +  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
    +  pthread_mutex_destroy(&p->mutex);
    +  sqlite3_free(p);
    +}
    +
    +/*
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex.  If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
    +** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
    +** be entered multiple times by the same thread.  In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  If the same thread tries to enter any other kind of mutex
    +** more than once, the behavior is undefined.
    +*/
    +static void pthreadMutexEnter(sqlite3_mutex *p){
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );
    +
    +#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
    +  /* If recursive mutexes are not available, then we have to grow
    +  ** our own.  This implementation assumes that pthread_equal()
    +  ** is atomic - that it cannot be deceived into thinking self
    +  ** and p->owner are equal if p->owner changes between two values
    +  ** that are not equal to self while the comparison is taking place.
    +  ** This implementation also assumes a coherent cache - that 
    +  ** separate processes cannot read different values from the same
    +  ** address at the same time.  If either of these two conditions
    +  ** are not met, then the mutexes will fail and problems will result.
    +  */
    +  {
    +    pthread_t self = pthread_self();
    +    if( p->nRef>0 && pthread_equal(p->owner, self) ){
    +      p->nRef++;
    +    }else{
    +      pthread_mutex_lock(&p->mutex);
    +      assert( p->nRef==0 );
    +      p->owner = self;
    +      p->nRef = 1;
    +    }
    +  }
    +#else
    +  /* Use the built-in recursive mutexes if they are available.
    +  */
    +  pthread_mutex_lock(&p->mutex);
    +  p->owner = pthread_self();
    +  p->nRef++;
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +  if( p->trace ){
    +    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
    +  }
    +#endif
    +}
    +static int pthreadMutexTry(sqlite3_mutex *p){
    +  int rc;
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );
    +
    +#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
    +  /* If recursive mutexes are not available, then we have to grow
    +  ** our own.  This implementation assumes that pthread_equal()
    +  ** is atomic - that it cannot be deceived into thinking self
    +  ** and p->owner are equal if p->owner changes between two values
    +  ** that are not equal to self while the comparison is taking place.
    +  ** This implementation also assumes a coherent cache - that 
    +  ** separate processes cannot read different values from the same
    +  ** address at the same time.  If either of these two conditions
    +  ** are not met, then the mutexes will fail and problems will result.
    +  */
    +  {
    +    pthread_t self = pthread_self();
    +    if( p->nRef>0 && pthread_equal(p->owner, self) ){
    +      p->nRef++;
    +      rc = SQLITE_OK;
    +    }else if( pthread_mutex_trylock(&p->mutex)==0 ){
    +      assert( p->nRef==0 );
    +      p->owner = self;
    +      p->nRef = 1;
    +      rc = SQLITE_OK;
    +    }else{
    +      rc = SQLITE_BUSY;
    +    }
    +  }
    +#else
    +  /* Use the built-in recursive mutexes if they are available.
    +  */
    +  if( pthread_mutex_trylock(&p->mutex)==0 ){
    +    p->owner = pthread_self();
    +    p->nRef++;
    +    rc = SQLITE_OK;
    +  }else{
    +    rc = SQLITE_BUSY;
    +  }
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +  if( rc==SQLITE_OK && p->trace ){
    +    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
    +  }
    +#endif
    +  return rc;
    +}
    +
    +/*
    +** The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  The behavior
    +** is undefined if the mutex is not currently entered or
    +** is not currently allocated.  SQLite will never do either.
    +*/
    +static void pthreadMutexLeave(sqlite3_mutex *p){
    +  assert( pthreadMutexHeld(p) );
    +  p->nRef--;
    +  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );
    +
    +#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
    +  if( p->nRef==0 ){
    +    pthread_mutex_unlock(&p->mutex);
    +  }
    +#else
    +  pthread_mutex_unlock(&p->mutex);
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +  if( p->trace ){
    +    printf("leave mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
    +  }
    +#endif
    +}
    +
    +SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){
    +  static sqlite3_mutex_methods sMutex = {
    +    pthreadMutexInit,
    +    pthreadMutexEnd,
    +    pthreadMutexAlloc,
    +    pthreadMutexFree,
    +    pthreadMutexEnter,
    +    pthreadMutexTry,
    +    pthreadMutexLeave,
    +#ifdef SQLITE_DEBUG
    +    pthreadMutexHeld,
    +    pthreadMutexNotheld
    +#else
    +    0,
    +    0
    +#endif
    +  };
    +
    +  return &sMutex;
    +}
    +
    +#endif /* SQLITE_MUTEX_PTHREAD */
    +
    +/************** End of mutex_unix.c ******************************************/
    +/************** Begin file mutex_w32.c ***************************************/
    +/*
    +** 2007 August 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement mutexes for win32
    +**
    +** $Id: mutex_w32.c,v 1.18 2009/08/10 03:23:21 shane Exp $
    +*/
    +
    +/*
    +** The code in this file is only used if we are compiling multithreaded
    +** on a win32 system.
    +*/
    +#ifdef SQLITE_MUTEX_W32
    +
    +/*
    +** Each recursive mutex is an instance of the following structure.
    +*/
    +struct sqlite3_mutex {
    +  CRITICAL_SECTION mutex;    /* Mutex controlling the lock */
    +  int id;                    /* Mutex type */
    +  int nRef;                  /* Number of enterances */
    +  DWORD owner;               /* Thread holding this mutex */
    +};
    +
    +/*
    +** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,
    +** or WinCE.  Return false (zero) for Win95, Win98, or WinME.
    +**
    +** Here is an interesting observation:  Win95, Win98, and WinME lack
    +** the LockFileEx() API.  But we can still statically link against that
    +** API as long as we don't call it win running Win95/98/ME.  A call to
    +** this routine is used to determine if the host is Win95/98/ME or
    +** WinNT/2K/XP so that we will know whether or not we can safely call
    +** the LockFileEx() API.
    +**
    +** mutexIsNT() is only used for the TryEnterCriticalSection() API call,
    +** which is only available if your application was compiled with 
    +** _WIN32_WINNT defined to a value >= 0x0400.  Currently, the only
    +** call to TryEnterCriticalSection() is #ifdef'ed out, so #ifdef 
    +** this out as well.
    +*/
    +#if 0
    +#if SQLITE_OS_WINCE
    +# define mutexIsNT()  (1)
    +#else
    +  static int mutexIsNT(void){
    +    static int osType = 0;
    +    if( osType==0 ){
    +      OSVERSIONINFO sInfo;
    +      sInfo.dwOSVersionInfoSize = sizeof(sInfo);
    +      GetVersionEx(&sInfo);
    +      osType = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
    +    }
    +    return osType==2;
    +  }
    +#endif /* SQLITE_OS_WINCE */
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    +** intended for use only inside assert() statements.
    +*/
    +static int winMutexHeld(sqlite3_mutex *p){
    +  return p->nRef!=0 && p->owner==GetCurrentThreadId();
    +}
    +static int winMutexNotheld(sqlite3_mutex *p){
    +  return p->nRef==0 || p->owner!=GetCurrentThreadId();
    +}
    +#endif
    +
    +
    +/*
    +** Initialize and deinitialize the mutex subsystem.
    +*/
    +static sqlite3_mutex winMutex_staticMutexes[6];
    +static int winMutex_isInit = 0;
    +/* As winMutexInit() and winMutexEnd() are called as part
    +** of the sqlite3_initialize and sqlite3_shutdown()
    +** processing, the "interlocked" magic is probably not
    +** strictly necessary.
    +*/
    +static long winMutex_lock = 0;
    +
    +static int winMutexInit(void){ 
    +  /* The first to increment to 1 does actual initialization */
    +  if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
    +    int i;
    +    for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
    +      InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
    +    }
    +    winMutex_isInit = 1;
    +  }else{
    +    /* Someone else is in the process of initing the static mutexes */
    +    while( !winMutex_isInit ){
    +      Sleep(1);
    +    }
    +  }
    +  return SQLITE_OK; 
    +}
    +
    +static int winMutexEnd(void){ 
    +  /* The first to decrement to 0 does actual shutdown 
    +  ** (which should be the last to shutdown.) */
    +  if( InterlockedCompareExchange(&winMutex_lock, 0, 1)==1 ){
    +    if( winMutex_isInit==1 ){
    +      int i;
    +      for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
    +        DeleteCriticalSection(&winMutex_staticMutexes[i].mutex);
    +      }
    +      winMutex_isInit = 0;
    +    }
    +  }
    +  return SQLITE_OK; 
    +}
    +
    +/*
    +** The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it.  If it returns NULL
    +** that means that a mutex could not be allocated.  SQLite
    +** will unwind its stack and return an error.  The argument
    +** to sqlite3_mutex_alloc() is one of these integer constants:
    +**
    +** <ul>
    +** <li>  SQLITE_MUTEX_FAST
    +** <li>  SQLITE_MUTEX_RECURSIVE
    +** <li>  SQLITE_MUTEX_STATIC_MASTER
    +** <li>  SQLITE_MUTEX_STATIC_MEM
    +** <li>  SQLITE_MUTEX_STATIC_MEM2
    +** <li>  SQLITE_MUTEX_STATIC_PRNG
    +** <li>  SQLITE_MUTEX_STATIC_LRU
    +** <li>  SQLITE_MUTEX_STATIC_LRU2
    +** </ul>
    +**
    +** The first two constants cause sqlite3_mutex_alloc() to create
    +** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
    +** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
    +** The mutex implementation does not need to make a distinction
    +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
    +** not want to.  But SQLite will only request a recursive mutex in
    +** cases where it really needs one.  If a faster non-recursive mutex
    +** implementation is available on the host platform, the mutex subsystem
    +** might return such a mutex in response to SQLITE_MUTEX_FAST.
    +**
    +** The other allowed parameters to sqlite3_mutex_alloc() each return
    +** a pointer to a static preexisting mutex.  Six static mutexes are
    +** used by the current version of SQLite.  Future versions of SQLite
    +** may add additional static mutexes.  Static mutexes are for internal
    +** use by SQLite only.  Applications that use SQLite mutexes should
    +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
    +** SQLITE_MUTEX_RECURSIVE.
    +**
    +** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
    +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
    +** returns a different mutex on every call.  But for the static 
    +** mutex types, the same mutex is returned on every call that has
    +** the same type number.
    +*/
    +static sqlite3_mutex *winMutexAlloc(int iType){
    +  sqlite3_mutex *p;
    +
    +  switch( iType ){
    +    case SQLITE_MUTEX_FAST:
    +    case SQLITE_MUTEX_RECURSIVE: {
    +      p = sqlite3MallocZero( sizeof(*p) );
    +      if( p ){  
    +        p->id = iType;
    +        InitializeCriticalSection(&p->mutex);
    +      }
    +      break;
    +    }
    +    default: {
    +      assert( winMutex_isInit==1 );
    +      assert( iType-2 >= 0 );
    +      assert( iType-2 < ArraySize(winMutex_staticMutexes) );
    +      p = &winMutex_staticMutexes[iType-2];
    +      p->id = iType;
    +      break;
    +    }
    +  }
    +  return p;
    +}
    +
    +
    +/*
    +** This routine deallocates a previously
    +** allocated mutex.  SQLite is careful to deallocate every
    +** mutex that it allocates.
    +*/
    +static void winMutexFree(sqlite3_mutex *p){
    +  assert( p );
    +  assert( p->nRef==0 );
    +  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
    +  DeleteCriticalSection(&p->mutex);
    +  sqlite3_free(p);
    +}
    +
    +/*
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex.  If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
    +** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
    +** be entered multiple times by the same thread.  In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  If the same thread tries to enter any other kind of mutex
    +** more than once, the behavior is undefined.
    +*/
    +static void winMutexEnter(sqlite3_mutex *p){
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
    +  EnterCriticalSection(&p->mutex);
    +  p->owner = GetCurrentThreadId(); 
    +  p->nRef++;
    +}
    +static int winMutexTry(sqlite3_mutex *p){
    +  int rc = SQLITE_BUSY;
    +  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
    +  /*
    +  ** The sqlite3_mutex_try() routine is very rarely used, and when it
    +  ** is used it is merely an optimization.  So it is OK for it to always
    +  ** fail.  
    +  **
    +  ** The TryEnterCriticalSection() interface is only available on WinNT.
    +  ** And some windows compilers complain if you try to use it without
    +  ** first doing some #defines that prevent SQLite from building on Win98.
    +  ** For that reason, we will omit this optimization for now.  See
    +  ** ticket #2685.
    +  */
    +#if 0
    +  if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
    +    p->owner = GetCurrentThreadId();
    +    p->nRef++;
    +    rc = SQLITE_OK;
    +  }
    +#else
    +  UNUSED_PARAMETER(p);
    +#endif
    +  return rc;
    +}
    +
    +/*
    +** The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  The behavior
    +** is undefined if the mutex is not currently entered or
    +** is not currently allocated.  SQLite will never do either.
    +*/
    +static void winMutexLeave(sqlite3_mutex *p){
    +  assert( p->nRef>0 );
    +  assert( p->owner==GetCurrentThreadId() );
    +  p->nRef--;
    +  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );
    +  LeaveCriticalSection(&p->mutex);
    +}
    +
    +SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){
    +  static sqlite3_mutex_methods sMutex = {
    +    winMutexInit,
    +    winMutexEnd,
    +    winMutexAlloc,
    +    winMutexFree,
    +    winMutexEnter,
    +    winMutexTry,
    +    winMutexLeave,
    +#ifdef SQLITE_DEBUG
    +    winMutexHeld,
    +    winMutexNotheld
    +#else
    +    0,
    +    0
    +#endif
    +  };
    +
    +  return &sMutex;
    +}
    +#endif /* SQLITE_MUTEX_W32 */
    +
    +/************** End of mutex_w32.c *******************************************/
    +/************** Begin file malloc.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** Memory allocation functions used throughout sqlite.
    +**
    +** $Id: malloc.c,v 1.66 2009/07/17 11:44:07 drh Exp $
    +*/
    +
    +/*
    +** This routine runs when the memory allocator sees that the
    +** total memory allocation is about to exceed the soft heap
    +** limit.
    +*/
    +static void softHeapLimitEnforcer(
    +  void *NotUsed, 
    +  sqlite3_int64 NotUsed2,
    +  int allocSize
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_release_memory(allocSize);
    +}
    +
    +/*
    +** Set the soft heap-size limit for the library. Passing a zero or 
    +** negative value indicates no limit.
    +*/
    +SQLITE_API void sqlite3_soft_heap_limit(int n){
    +  sqlite3_uint64 iLimit;
    +  int overage;
    +  if( n<0 ){
    +    iLimit = 0;
    +  }else{
    +    iLimit = n;
    +  }
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  sqlite3_initialize();
    +#endif
    +  if( iLimit>0 ){
    +    sqlite3MemoryAlarm(softHeapLimitEnforcer, 0, iLimit);
    +  }else{
    +    sqlite3MemoryAlarm(0, 0, 0);
    +  }
    +  overage = (int)(sqlite3_memory_used() - (i64)n);
    +  if( overage>0 ){
    +    sqlite3_release_memory(overage);
    +  }
    +}
    +
    +/*
    +** Attempt to release up to n bytes of non-essential memory currently
    +** held by SQLite. An example of non-essential memory is memory used to
    +** cache database pages that are not currently in use.
    +*/
    +SQLITE_API int sqlite3_release_memory(int n){
    +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
    +  int nRet = 0;
    +  nRet += sqlite3PcacheReleaseMemory(n-nRet);
    +  return nRet;
    +#else
    +  UNUSED_PARAMETER(n);
    +  return SQLITE_OK;
    +#endif
    +}
    +
    +/*
    +** State information local to the memory allocation subsystem.
    +*/
    +static SQLITE_WSD struct Mem0Global {
    +  /* Number of free pages for scratch and page-cache memory */
    +  u32 nScratchFree;
    +  u32 nPageFree;
    +
    +  sqlite3_mutex *mutex;         /* Mutex to serialize access */
    +
    +  /*
    +  ** The alarm callback and its arguments.  The mem0.mutex lock will
    +  ** be held while the callback is running.  Recursive calls into
    +  ** the memory subsystem are allowed, but no new callbacks will be
    +  ** issued.
    +  */
    +  sqlite3_int64 alarmThreshold;
    +  void (*alarmCallback)(void*, sqlite3_int64,int);
    +  void *alarmArg;
    +
    +  /*
    +  ** Pointers to the end of sqlite3GlobalConfig.pScratch and
    +  ** sqlite3GlobalConfig.pPage to a block of memory that records
    +  ** which pages are available.
    +  */
    +  u32 *aScratchFree;
    +  u32 *aPageFree;
    +} mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
    +
    +#define mem0 GLOBAL(struct Mem0Global, mem0)
    +
    +/*
    +** Initialize the memory allocation subsystem.
    +*/
    +SQLITE_PRIVATE int sqlite3MallocInit(void){
    +  if( sqlite3GlobalConfig.m.xMalloc==0 ){
    +    sqlite3MemSetDefault();
    +  }
    +  memset(&mem0, 0, sizeof(mem0));
    +  if( sqlite3GlobalConfig.bCoreMutex ){
    +    mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
    +  }
    +  if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
    +      && sqlite3GlobalConfig.nScratch>=0 ){
    +    int i;
    +    sqlite3GlobalConfig.szScratch = ROUNDDOWN8(sqlite3GlobalConfig.szScratch-4);
    +    mem0.aScratchFree = (u32*)&((char*)sqlite3GlobalConfig.pScratch)
    +                  [sqlite3GlobalConfig.szScratch*sqlite3GlobalConfig.nScratch];
    +    for(i=0; i<sqlite3GlobalConfig.nScratch; i++){ mem0.aScratchFree[i] = i; }
    +    mem0.nScratchFree = sqlite3GlobalConfig.nScratch;
    +  }else{
    +    sqlite3GlobalConfig.pScratch = 0;
    +    sqlite3GlobalConfig.szScratch = 0;
    +  }
    +  if( sqlite3GlobalConfig.pPage && sqlite3GlobalConfig.szPage>=512
    +      && sqlite3GlobalConfig.nPage>=1 ){
    +    int i;
    +    int overhead;
    +    int sz = ROUNDDOWN8(sqlite3GlobalConfig.szPage);
    +    int n = sqlite3GlobalConfig.nPage;
    +    overhead = (4*n + sz - 1)/sz;
    +    sqlite3GlobalConfig.nPage -= overhead;
    +    mem0.aPageFree = (u32*)&((char*)sqlite3GlobalConfig.pPage)
    +                  [sqlite3GlobalConfig.szPage*sqlite3GlobalConfig.nPage];
    +    for(i=0; i<sqlite3GlobalConfig.nPage; i++){ mem0.aPageFree[i] = i; }
    +    mem0.nPageFree = sqlite3GlobalConfig.nPage;
    +  }else{
    +    sqlite3GlobalConfig.pPage = 0;
    +    sqlite3GlobalConfig.szPage = 0;
    +  }
    +  return sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
    +}
    +
    +/*
    +** Deinitialize the memory allocation subsystem.
    +*/
    +SQLITE_PRIVATE void sqlite3MallocEnd(void){
    +  if( sqlite3GlobalConfig.m.xShutdown ){
    +    sqlite3GlobalConfig.m.xShutdown(sqlite3GlobalConfig.m.pAppData);
    +  }
    +  memset(&mem0, 0, sizeof(mem0));
    +}
    +
    +/*
    +** Return the amount of memory currently checked out.
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
    +  int n, mx;
    +  sqlite3_int64 res;
    +  sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0);
    +  res = (sqlite3_int64)n;  /* Work around bug in Borland C. Ticket #3216 */
    +  return res;
    +}
    +
    +/*
    +** Return the maximum amount of memory that has ever been
    +** checked out since either the beginning of this process
    +** or since the most recent reset.
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
    +  int n, mx;
    +  sqlite3_int64 res;
    +  sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
    +  res = (sqlite3_int64)mx;  /* Work around bug in Borland C. Ticket #3216 */
    +  return res;
    +}
    +
    +/*
    +** Change the alarm callback
    +*/
    +SQLITE_PRIVATE int sqlite3MemoryAlarm(
    +  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
    +  void *pArg,
    +  sqlite3_int64 iThreshold
    +){
    +  sqlite3_mutex_enter(mem0.mutex);
    +  mem0.alarmCallback = xCallback;
    +  mem0.alarmArg = pArg;
    +  mem0.alarmThreshold = iThreshold;
    +  sqlite3_mutex_leave(mem0.mutex);
    +  return SQLITE_OK;
    +}
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** Deprecated external interface.  Internal/core SQLite code
    +** should call sqlite3MemoryAlarm.
    +*/
    +SQLITE_API int sqlite3_memory_alarm(
    +  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
    +  void *pArg,
    +  sqlite3_int64 iThreshold
    +){
    +  return sqlite3MemoryAlarm(xCallback, pArg, iThreshold);
    +}
    +#endif
    +
    +/*
    +** Trigger the alarm 
    +*/
    +static void sqlite3MallocAlarm(int nByte){
    +  void (*xCallback)(void*,sqlite3_int64,int);
    +  sqlite3_int64 nowUsed;
    +  void *pArg;
    +  if( mem0.alarmCallback==0 ) return;
    +  xCallback = mem0.alarmCallback;
    +  nowUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
    +  pArg = mem0.alarmArg;
    +  mem0.alarmCallback = 0;
    +  sqlite3_mutex_leave(mem0.mutex);
    +  xCallback(pArg, nowUsed, nByte);
    +  sqlite3_mutex_enter(mem0.mutex);
    +  mem0.alarmCallback = xCallback;
    +  mem0.alarmArg = pArg;
    +}
    +
    +/*
    +** Do a memory allocation with statistics and alarms.  Assume the
    +** lock is already held.
    +*/
    +static int mallocWithAlarm(int n, void **pp){
    +  int nFull;
    +  void *p;
    +  assert( sqlite3_mutex_held(mem0.mutex) );
    +  nFull = sqlite3GlobalConfig.m.xRoundup(n);
    +  sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, n);
    +  if( mem0.alarmCallback!=0 ){
    +    int nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
    +    if( nUsed+nFull >= mem0.alarmThreshold ){
    +      sqlite3MallocAlarm(nFull);
    +    }
    +  }
    +  p = sqlite3GlobalConfig.m.xMalloc(nFull);
    +  if( p==0 && mem0.alarmCallback ){
    +    sqlite3MallocAlarm(nFull);
    +    p = sqlite3GlobalConfig.m.xMalloc(nFull);
    +  }
    +  if( p ){
    +    nFull = sqlite3MallocSize(p);
    +    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, nFull);
    +  }
    +  *pp = p;
    +  return nFull;
    +}
    +
    +/*
    +** Allocate memory.  This routine is like sqlite3_malloc() except that it
    +** assumes the memory subsystem has already been initialized.
    +*/
    +SQLITE_PRIVATE void *sqlite3Malloc(int n){
    +  void *p;
    +  if( n<=0 || n>=0x7fffff00 ){
    +    /* A memory allocation of a number of bytes which is near the maximum
    +    ** signed integer value might cause an integer overflow inside of the
    +    ** xMalloc().  Hence we limit the maximum size to 0x7fffff00, giving
    +    ** 255 bytes of overhead.  SQLite itself will never use anything near
    +    ** this amount.  The only way to reach the limit is with sqlite3_malloc() */
    +    p = 0;
    +  }else if( sqlite3GlobalConfig.bMemstat ){
    +    sqlite3_mutex_enter(mem0.mutex);
    +    mallocWithAlarm(n, &p);
    +    sqlite3_mutex_leave(mem0.mutex);
    +  }else{
    +    p = sqlite3GlobalConfig.m.xMalloc(n);
    +  }
    +  return p;
    +}
    +
    +/*
    +** This version of the memory allocation is for use by the application.
    +** First make sure the memory subsystem is initialized, then do the
    +** allocation.
    +*/
    +SQLITE_API void *sqlite3_malloc(int n){
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize() ) return 0;
    +#endif
    +  return sqlite3Malloc(n);
    +}
    +
    +/*
    +** Each thread may only have a single outstanding allocation from
    +** xScratchMalloc().  We verify this constraint in the single-threaded
    +** case by setting scratchAllocOut to 1 when an allocation
    +** is outstanding clearing it when the allocation is freed.
    +*/
    +#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
    +static int scratchAllocOut = 0;
    +#endif
    +
    +
    +/*
    +** Allocate memory that is to be used and released right away.
    +** This routine is similar to alloca() in that it is not intended
    +** for situations where the memory might be held long-term.  This
    +** routine is intended to get memory to old large transient data
    +** structures that would not normally fit on the stack of an
    +** embedded processor.
    +*/
    +SQLITE_PRIVATE void *sqlite3ScratchMalloc(int n){
    +  void *p;
    +  assert( n>0 );
    +
    +#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
    +  /* Verify that no more than one scratch allocation per thread
    +  ** is outstanding at one time.  (This is only checked in the
    +  ** single-threaded case since checking in the multi-threaded case
    +  ** would be much more complicated.) */
    +  assert( scratchAllocOut==0 );
    +#endif
    +
    +  if( sqlite3GlobalConfig.szScratch<n ){
    +    goto scratch_overflow;
    +  }else{  
    +    sqlite3_mutex_enter(mem0.mutex);
    +    if( mem0.nScratchFree==0 ){
    +      sqlite3_mutex_leave(mem0.mutex);
    +      goto scratch_overflow;
    +    }else{
    +      int i;
    +      i = mem0.aScratchFree[--mem0.nScratchFree];
    +      i *= sqlite3GlobalConfig.szScratch;
    +      sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, 1);
    +      sqlite3StatusSet(SQLITE_STATUS_SCRATCH_SIZE, n);
    +      sqlite3_mutex_leave(mem0.mutex);
    +      p = (void*)&((char*)sqlite3GlobalConfig.pScratch)[i];
    +      assert(  (((u8*)p - (u8*)0) & 7)==0 );
    +    }
    +  }
    +#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
    +  scratchAllocOut = p!=0;
    +#endif
    +
    +  return p;
    +
    +scratch_overflow:
    +  if( sqlite3GlobalConfig.bMemstat ){
    +    sqlite3_mutex_enter(mem0.mutex);
    +    sqlite3StatusSet(SQLITE_STATUS_SCRATCH_SIZE, n);
    +    n = mallocWithAlarm(n, &p);
    +    if( p ) sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_OVERFLOW, n);
    +    sqlite3_mutex_leave(mem0.mutex);
    +  }else{
    +    p = sqlite3GlobalConfig.m.xMalloc(n);
    +  }
    +#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
    +  scratchAllocOut = p!=0;
    +#endif
    +  return p;    
    +}
    +SQLITE_PRIVATE void sqlite3ScratchFree(void *p){
    +  if( p ){
    +
    +#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
    +    /* Verify that no more than one scratch allocation per thread
    +    ** is outstanding at one time.  (This is only checked in the
    +    ** single-threaded case since checking in the multi-threaded case
    +    ** would be much more complicated.) */
    +    assert( scratchAllocOut==1 );
    +    scratchAllocOut = 0;
    +#endif
    +
    +    if( sqlite3GlobalConfig.pScratch==0
    +           || p<sqlite3GlobalConfig.pScratch
    +           || p>=(void*)mem0.aScratchFree ){
    +      if( sqlite3GlobalConfig.bMemstat ){
    +        int iSize = sqlite3MallocSize(p);
    +        sqlite3_mutex_enter(mem0.mutex);
    +        sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_OVERFLOW, -iSize);
    +        sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -iSize);
    +        sqlite3GlobalConfig.m.xFree(p);
    +        sqlite3_mutex_leave(mem0.mutex);
    +      }else{
    +        sqlite3GlobalConfig.m.xFree(p);
    +      }
    +    }else{
    +      int i;
    +      i = (int)((u8*)p - (u8*)sqlite3GlobalConfig.pScratch);
    +      i /= sqlite3GlobalConfig.szScratch;
    +      assert( i>=0 && i<sqlite3GlobalConfig.nScratch );
    +      sqlite3_mutex_enter(mem0.mutex);
    +      assert( mem0.nScratchFree<(u32)sqlite3GlobalConfig.nScratch );
    +      mem0.aScratchFree[mem0.nScratchFree++] = i;
    +      sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, -1);
    +      sqlite3_mutex_leave(mem0.mutex);
    +    }
    +  }
    +}
    +
    +/*
    +** TRUE if p is a lookaside memory allocation from db
    +*/
    +#ifndef SQLITE_OMIT_LOOKASIDE
    +static int isLookaside(sqlite3 *db, void *p){
    +  return db && p && p>=db->lookaside.pStart && p<db->lookaside.pEnd;
    +}
    +#else
    +#define isLookaside(A,B) 0
    +#endif
    +
    +/*
    +** Return the size of a memory allocation previously obtained from
    +** sqlite3Malloc() or sqlite3_malloc().
    +*/
    +SQLITE_PRIVATE int sqlite3MallocSize(void *p){
    +  return sqlite3GlobalConfig.m.xSize(p);
    +}
    +SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
    +  assert( db==0 || sqlite3_mutex_held(db->mutex) );
    +  if( isLookaside(db, p) ){
    +    return db->lookaside.sz;
    +  }else{
    +    return sqlite3GlobalConfig.m.xSize(p);
    +  }
    +}
    +
    +/*
    +** Free memory previously obtained from sqlite3Malloc().
    +*/
    +SQLITE_API void sqlite3_free(void *p){
    +  if( p==0 ) return;
    +  if( sqlite3GlobalConfig.bMemstat ){
    +    sqlite3_mutex_enter(mem0.mutex);
    +    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -sqlite3MallocSize(p));
    +    sqlite3GlobalConfig.m.xFree(p);
    +    sqlite3_mutex_leave(mem0.mutex);
    +  }else{
    +    sqlite3GlobalConfig.m.xFree(p);
    +  }
    +}
    +
    +/*
    +** Free memory that might be associated with a particular database
    +** connection.
    +*/
    +SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
    +  assert( db==0 || sqlite3_mutex_held(db->mutex) );
    +  if( isLookaside(db, p) ){
    +    LookasideSlot *pBuf = (LookasideSlot*)p;
    +    pBuf->pNext = db->lookaside.pFree;
    +    db->lookaside.pFree = pBuf;
    +    db->lookaside.nOut--;
    +  }else{
    +    sqlite3_free(p);
    +  }
    +}
    +
    +/*
    +** Change the size of an existing memory allocation
    +*/
    +SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, int nBytes){
    +  int nOld, nNew;
    +  void *pNew;
    +  if( pOld==0 ){
    +    return sqlite3Malloc(nBytes);
    +  }
    +  if( nBytes<=0 ){
    +    sqlite3_free(pOld);
    +    return 0;
    +  }
    +  if( nBytes>=0x7fffff00 ){
    +    /* The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() */
    +    return 0;
    +  }
    +  nOld = sqlite3MallocSize(pOld);
    +  nNew = sqlite3GlobalConfig.m.xRoundup(nBytes);
    +  if( nOld==nNew ){
    +    pNew = pOld;
    +  }else if( sqlite3GlobalConfig.bMemstat ){
    +    sqlite3_mutex_enter(mem0.mutex);
    +    sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, nBytes);
    +    if( sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)+nNew-nOld >= 
    +          mem0.alarmThreshold ){
    +      sqlite3MallocAlarm(nNew-nOld);
    +    }
    +    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
    +    if( pNew==0 && mem0.alarmCallback ){
    +      sqlite3MallocAlarm(nBytes);
    +      pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
    +    }
    +    if( pNew ){
    +      nNew = sqlite3MallocSize(pNew);
    +      sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, nNew-nOld);
    +    }
    +    sqlite3_mutex_leave(mem0.mutex);
    +  }else{
    +    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** The public interface to sqlite3Realloc.  Make sure that the memory
    +** subsystem is initialized prior to invoking sqliteRealloc.
    +*/
    +SQLITE_API void *sqlite3_realloc(void *pOld, int n){
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize() ) return 0;
    +#endif
    +  return sqlite3Realloc(pOld, n);
    +}
    +
    +
    +/*
    +** Allocate and zero memory.
    +*/ 
    +SQLITE_PRIVATE void *sqlite3MallocZero(int n){
    +  void *p = sqlite3Malloc(n);
    +  if( p ){
    +    memset(p, 0, n);
    +  }
    +  return p;
    +}
    +
    +/*
    +** Allocate and zero memory.  If the allocation fails, make
    +** the mallocFailed flag in the connection pointer.
    +*/
    +SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, int n){
    +  void *p = sqlite3DbMallocRaw(db, n);
    +  if( p ){
    +    memset(p, 0, n);
    +  }
    +  return p;
    +}
    +
    +/*
    +** Allocate and zero memory.  If the allocation fails, make
    +** the mallocFailed flag in the connection pointer.
    +**
    +** If db!=0 and db->mallocFailed is true (indicating a prior malloc
    +** failure on the same database connection) then always return 0.
    +** Hence for a particular database connection, once malloc starts
    +** failing, it fails consistently until mallocFailed is reset.
    +** This is an important assumption.  There are many places in the
    +** code that do things like this:
    +**
    +**         int *a = (int*)sqlite3DbMallocRaw(db, 100);
    +**         int *b = (int*)sqlite3DbMallocRaw(db, 200);
    +**         if( b ) a[10] = 9;
    +**
    +** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
    +** that all prior mallocs (ex: "a") worked too.
    +*/
    +SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
    +  void *p;
    +  assert( db==0 || sqlite3_mutex_held(db->mutex) );
    +#ifndef SQLITE_OMIT_LOOKASIDE
    +  if( db ){
    +    LookasideSlot *pBuf;
    +    if( db->mallocFailed ){
    +      return 0;
    +    }
    +    if( db->lookaside.bEnabled && n<=db->lookaside.sz
    +         && (pBuf = db->lookaside.pFree)!=0 ){
    +      db->lookaside.pFree = pBuf->pNext;
    +      db->lookaside.nOut++;
    +      if( db->lookaside.nOut>db->lookaside.mxOut ){
    +        db->lookaside.mxOut = db->lookaside.nOut;
    +      }
    +      return (void*)pBuf;
    +    }
    +  }
    +#else
    +  if( db && db->mallocFailed ){
    +    return 0;
    +  }
    +#endif
    +  p = sqlite3Malloc(n);
    +  if( !p && db ){
    +    db->mallocFailed = 1;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Resize the block of memory pointed to by p to n bytes. If the
    +** resize fails, set the mallocFailed flag in the connection object.
    +*/
    +SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
    +  void *pNew = 0;
    +  assert( db!=0 );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  if( db->mallocFailed==0 ){
    +    if( p==0 ){
    +      return sqlite3DbMallocRaw(db, n);
    +    }
    +    if( isLookaside(db, p) ){
    +      if( n<=db->lookaside.sz ){
    +        return p;
    +      }
    +      pNew = sqlite3DbMallocRaw(db, n);
    +      if( pNew ){
    +        memcpy(pNew, p, db->lookaside.sz);
    +        sqlite3DbFree(db, p);
    +      }
    +    }else{
    +      pNew = sqlite3_realloc(p, n);
    +      if( !pNew ){
    +        db->mallocFailed = 1;
    +      }
    +    }
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** Attempt to reallocate p.  If the reallocation fails, then free p
    +** and set the mallocFailed flag in the database connection.
    +*/
    +SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, int n){
    +  void *pNew;
    +  pNew = sqlite3DbRealloc(db, p, n);
    +  if( !pNew ){
    +    sqlite3DbFree(db, p);
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** Make a copy of a string in memory obtained from sqliteMalloc(). These 
    +** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This
    +** is because when memory debugging is turned on, these two functions are 
    +** called via macros that record the current file and line number in the
    +** ThreadData structure.
    +*/
    +SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
    +  char *zNew;
    +  size_t n;
    +  if( z==0 ){
    +    return 0;
    +  }
    +  n = sqlite3Strlen30(z) + 1;
    +  assert( (n&0x7fffffff)==n );
    +  zNew = sqlite3DbMallocRaw(db, (int)n);
    +  if( zNew ){
    +    memcpy(zNew, z, n);
    +  }
    +  return zNew;
    +}
    +SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
    +  char *zNew;
    +  if( z==0 ){
    +    return 0;
    +  }
    +  assert( (n&0x7fffffff)==n );
    +  zNew = sqlite3DbMallocRaw(db, n+1);
    +  if( zNew ){
    +    memcpy(zNew, z, n);
    +    zNew[n] = 0;
    +  }
    +  return zNew;
    +}
    +
    +/*
    +** Create a string from the zFromat argument and the va_list that follows.
    +** Store the string in memory obtained from sqliteMalloc() and make *pz
    +** point to that string.
    +*/
    +SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
    +  va_list ap;
    +  char *z;
    +
    +  va_start(ap, zFormat);
    +  z = sqlite3VMPrintf(db, zFormat, ap);
    +  va_end(ap);
    +  sqlite3DbFree(db, *pz);
    +  *pz = z;
    +}
    +
    +
    +/*
    +** This function must be called before exiting any API function (i.e. 
    +** returning control to the user) that has called sqlite3_malloc or
    +** sqlite3_realloc.
    +**
    +** The returned value is normally a copy of the second argument to this
    +** function. However, if a malloc() failure has occurred since the previous
    +** invocation SQLITE_NOMEM is returned instead. 
    +**
    +** If the first argument, db, is not NULL and a malloc() error has occurred,
    +** then the connection error-code (the value returned by sqlite3_errcode())
    +** is set to SQLITE_NOMEM.
    +*/
    +SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
    +  /* If the db handle is not NULL, then we must hold the connection handle
    +  ** mutex here. Otherwise the read (and possible write) of db->mallocFailed 
    +  ** is unsafe, as is the call to sqlite3Error().
    +  */
    +  assert( !db || sqlite3_mutex_held(db->mutex) );
    +  if( db && (db->mallocFailed || rc==SQLITE_IOERR_NOMEM) ){
    +    sqlite3Error(db, SQLITE_NOMEM, 0);
    +    db->mallocFailed = 0;
    +    rc = SQLITE_NOMEM;
    +  }
    +  return rc & (db ? db->errMask : 0xff);
    +}
    +
    +/************** End of malloc.c **********************************************/
    +/************** Begin file printf.c ******************************************/
    +/*
    +** The "printf" code that follows dates from the 1980's.  It is in
    +** the public domain.  The original comments are included here for
    +** completeness.  They are very out-of-date but might be useful as
    +** an historical reference.  Most of the "enhancements" have been backed
    +** out so that the functionality is now the same as standard printf().
    +**
    +** $Id: printf.c,v 1.104 2009/06/03 01:24:54 drh Exp $
    +**
    +**************************************************************************
    +**
    +** The following modules is an enhanced replacement for the "printf" subroutines
    +** found in the standard C library.  The following enhancements are
    +** supported:
    +**
    +**      +  Additional functions.  The standard set of "printf" functions
    +**         includes printf, fprintf, sprintf, vprintf, vfprintf, and
    +**         vsprintf.  This module adds the following:
    +**
    +**           *  snprintf -- Works like sprintf, but has an extra argument
    +**                          which is the size of the buffer written to.
    +**
    +**           *  mprintf --  Similar to sprintf.  Writes output to memory
    +**                          obtained from malloc.
    +**
    +**           *  xprintf --  Calls a function to dispose of output.
    +**
    +**           *  nprintf --  No output, but returns the number of characters
    +**                          that would have been output by printf.
    +**
    +**           *  A v- version (ex: vsnprintf) of every function is also
    +**              supplied.
    +**
    +**      +  A few extensions to the formatting notation are supported:
    +**
    +**           *  The "=" flag (similar to "-") causes the output to be
    +**              be centered in the appropriately sized field.
    +**
    +**           *  The %b field outputs an integer in binary notation.
    +**
    +**           *  The %c field now accepts a precision.  The character output
    +**              is repeated by the number of times the precision specifies.
    +**
    +**           *  The %' field works like %c, but takes as its character the
    +**              next character of the format string, instead of the next
    +**              argument.  For example,  printf("%.78'-")  prints 78 minus
    +**              signs, the same as  printf("%.78c",'-').
    +**
    +**      +  When compiled using GCC on a SPARC, this version of printf is
    +**         faster than the library printf for SUN OS 4.1.
    +**
    +**      +  All functions are fully reentrant.
    +**
    +*/
    +
    +/*
    +** Conversion types fall into various categories as defined by the
    +** following enumeration.
    +*/
    +#define etRADIX       1 /* Integer types.  %d, %x, %o, and so forth */
    +#define etFLOAT       2 /* Floating point.  %f */
    +#define etEXP         3 /* Exponentional notation. %e and %E */
    +#define etGENERIC     4 /* Floating or exponential, depending on exponent. %g */
    +#define etSIZE        5 /* Return number of characters processed so far. %n */
    +#define etSTRING      6 /* Strings. %s */
    +#define etDYNSTRING   7 /* Dynamically allocated strings. %z */
    +#define etPERCENT     8 /* Percent symbol. %% */
    +#define etCHARX       9 /* Characters. %c */
    +/* The rest are extensions, not normally found in printf() */
    +#define etSQLESCAPE  10 /* Strings with '\'' doubled.  %q */
    +#define etSQLESCAPE2 11 /* Strings with '\'' doubled and enclosed in '',
    +                          NULL pointers replaced by SQL NULL.  %Q */
    +#define etTOKEN      12 /* a pointer to a Token structure */
    +#define etSRCLIST    13 /* a pointer to a SrcList */
    +#define etPOINTER    14 /* The %p conversion */
    +#define etSQLESCAPE3 15 /* %w -> Strings with '\"' doubled */
    +#define etORDINAL    16 /* %r -> 1st, 2nd, 3rd, 4th, etc.  English only */
    +
    +#define etINVALID     0 /* Any unrecognized conversion type */
    +
    +
    +/*
    +** An "etByte" is an 8-bit unsigned value.
    +*/
    +typedef unsigned char etByte;
    +
    +/*
    +** Each builtin conversion character (ex: the 'd' in "%d") is described
    +** by an instance of the following structure
    +*/
    +typedef struct et_info {   /* Information about each format field */
    +  char fmttype;            /* The format field code letter */
    +  etByte base;             /* The base for radix conversion */
    +  etByte flags;            /* One or more of FLAG_ constants below */
    +  etByte type;             /* Conversion paradigm */
    +  etByte charset;          /* Offset into aDigits[] of the digits string */
    +  etByte prefix;           /* Offset into aPrefix[] of the prefix string */
    +} et_info;
    +
    +/*
    +** Allowed values for et_info.flags
    +*/
    +#define FLAG_SIGNED  1     /* True if the value to convert is signed */
    +#define FLAG_INTERN  2     /* True if for internal use only */
    +#define FLAG_STRING  4     /* Allow infinity precision */
    +
    +
    +/*
    +** The following table is searched linearly, so it is good to put the
    +** most frequently used conversion types first.
    +*/
    +static const char aDigits[] = "0123456789ABCDEF0123456789abcdef";
    +static const char aPrefix[] = "-x0\000X0";
    +static const et_info fmtinfo[] = {
    +  {  'd', 10, 1, etRADIX,      0,  0 },
    +  {  's',  0, 4, etSTRING,     0,  0 },
    +  {  'g',  0, 1, etGENERIC,    30, 0 },
    +  {  'z',  0, 4, etDYNSTRING,  0,  0 },
    +  {  'q',  0, 4, etSQLESCAPE,  0,  0 },
    +  {  'Q',  0, 4, etSQLESCAPE2, 0,  0 },
    +  {  'w',  0, 4, etSQLESCAPE3, 0,  0 },
    +  {  'c',  0, 0, etCHARX,      0,  0 },
    +  {  'o',  8, 0, etRADIX,      0,  2 },
    +  {  'u', 10, 0, etRADIX,      0,  0 },
    +  {  'x', 16, 0, etRADIX,      16, 1 },
    +  {  'X', 16, 0, etRADIX,      0,  4 },
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  {  'f',  0, 1, etFLOAT,      0,  0 },
    +  {  'e',  0, 1, etEXP,        30, 0 },
    +  {  'E',  0, 1, etEXP,        14, 0 },
    +  {  'G',  0, 1, etGENERIC,    14, 0 },
    +#endif
    +  {  'i', 10, 1, etRADIX,      0,  0 },
    +  {  'n',  0, 0, etSIZE,       0,  0 },
    +  {  '%',  0, 0, etPERCENT,    0,  0 },
    +  {  'p', 16, 0, etPOINTER,    0,  1 },
    +
    +/* All the rest have the FLAG_INTERN bit set and are thus for internal
    +** use only */
    +  {  'T',  0, 2, etTOKEN,      0,  0 },
    +  {  'S',  0, 2, etSRCLIST,    0,  0 },
    +  {  'r', 10, 3, etORDINAL,    0,  0 },
    +};
    +
    +/*
    +** If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point
    +** conversions will work.
    +*/
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +/*
    +** "*val" is a double such that 0.1 <= *val < 10.0
    +** Return the ascii code for the leading digit of *val, then
    +** multiply "*val" by 10.0 to renormalize.
    +**
    +** Example:
    +**     input:     *val = 3.14159
    +**     output:    *val = 1.4159    function return = '3'
    +**
    +** The counter *cnt is incremented each time.  After counter exceeds
    +** 16 (the number of significant digits in a 64-bit float) '0' is
    +** always returned.
    +*/
    +static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){
    +  int digit;
    +  LONGDOUBLE_TYPE d;
    +  if( (*cnt)++ >= 16 ) return '0';
    +  digit = (int)*val;
    +  d = digit;
    +  digit += '0';
    +  *val = (*val - d)*10.0;
    +  return (char)digit;
    +}
    +#endif /* SQLITE_OMIT_FLOATING_POINT */
    +
    +/*
    +** Append N space characters to the given string buffer.
    +*/
    +static void appendSpace(StrAccum *pAccum, int N){
    +  static const char zSpaces[] = "                             ";
    +  while( N>=(int)sizeof(zSpaces)-1 ){
    +    sqlite3StrAccumAppend(pAccum, zSpaces, sizeof(zSpaces)-1);
    +    N -= sizeof(zSpaces)-1;
    +  }
    +  if( N>0 ){
    +    sqlite3StrAccumAppend(pAccum, zSpaces, N);
    +  }
    +}
    +
    +/*
    +** On machines with a small stack size, you can redefine the
    +** SQLITE_PRINT_BUF_SIZE to be less than 350.
    +*/
    +#ifndef SQLITE_PRINT_BUF_SIZE
    +# if defined(SQLITE_SMALL_STACK)
    +#   define SQLITE_PRINT_BUF_SIZE 50
    +# else
    +#   define SQLITE_PRINT_BUF_SIZE 350
    +# endif
    +#endif
    +#define etBUFSIZE SQLITE_PRINT_BUF_SIZE  /* Size of the output buffer */
    +
    +/*
    +** The root program.  All variations call this core.
    +**
    +** INPUTS:
    +**   func   This is a pointer to a function taking three arguments
    +**            1. A pointer to anything.  Same as the "arg" parameter.
    +**            2. A pointer to the list of characters to be output
    +**               (Note, this list is NOT null terminated.)
    +**            3. An integer number of characters to be output.
    +**               (Note: This number might be zero.)
    +**
    +**   arg    This is the pointer to anything which will be passed as the
    +**          first argument to "func".  Use it for whatever you like.
    +**
    +**   fmt    This is the format string, as in the usual print.
    +**
    +**   ap     This is a pointer to a list of arguments.  Same as in
    +**          vfprint.
    +**
    +** OUTPUTS:
    +**          The return value is the total number of characters sent to
    +**          the function "func".  Returns -1 on a error.
    +**
    +** Note that the order in which automatic variables are declared below
    +** seems to make a big difference in determining how fast this beast
    +** will run.
    +*/
    +SQLITE_PRIVATE void sqlite3VXPrintf(
    +  StrAccum *pAccum,                  /* Accumulate results here */
    +  int useExtended,                   /* Allow extended %-conversions */
    +  const char *fmt,                   /* Format string */
    +  va_list ap                         /* arguments */
    +){
    +  int c;                     /* Next character in the format string */
    +  char *bufpt;               /* Pointer to the conversion buffer */
    +  int precision;             /* Precision of the current field */
    +  int length;                /* Length of the field */
    +  int idx;                   /* A general purpose loop counter */
    +  int width;                 /* Width of the current field */
    +  etByte flag_leftjustify;   /* True if "-" flag is present */
    +  etByte flag_plussign;      /* True if "+" flag is present */
    +  etByte flag_blanksign;     /* True if " " flag is present */
    +  etByte flag_alternateform; /* True if "#" flag is present */
    +  etByte flag_altform2;      /* True if "!" flag is present */
    +  etByte flag_zeropad;       /* True if field width constant starts with zero */
    +  etByte flag_long;          /* True if "l" flag is present */
    +  etByte flag_longlong;      /* True if the "ll" flag is present */
    +  etByte done;               /* Loop termination flag */
    +  sqlite_uint64 longvalue;   /* Value for integer types */
    +  LONGDOUBLE_TYPE realvalue; /* Value for real types */
    +  const et_info *infop;      /* Pointer to the appropriate info structure */
    +  char buf[etBUFSIZE];       /* Conversion buffer */
    +  char prefix;               /* Prefix character.  "+" or "-" or " " or '\0'. */
    +  etByte xtype = 0;          /* Conversion paradigm */
    +  char *zExtra;              /* Extra memory used for etTCLESCAPE conversions */
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  int  exp, e2;              /* exponent of real numbers */
    +  double rounder;            /* Used for rounding floating point values */
    +  etByte flag_dp;            /* True if decimal point should be shown */
    +  etByte flag_rtz;           /* True if trailing zeros should be removed */
    +  etByte flag_exp;           /* True to force display of the exponent */
    +  int nsd;                   /* Number of significant digits returned */
    +#endif
    +
    +  length = 0;
    +  bufpt = 0;
    +  for(; (c=(*fmt))!=0; ++fmt){
    +    if( c!='%' ){
    +      int amt;
    +      bufpt = (char *)fmt;
    +      amt = 1;
    +      while( (c=(*++fmt))!='%' && c!=0 ) amt++;
    +      sqlite3StrAccumAppend(pAccum, bufpt, amt);
    +      if( c==0 ) break;
    +    }
    +    if( (c=(*++fmt))==0 ){
    +      sqlite3StrAccumAppend(pAccum, "%", 1);
    +      break;
    +    }
    +    /* Find out what flags are present */
    +    flag_leftjustify = flag_plussign = flag_blanksign = 
    +     flag_alternateform = flag_altform2 = flag_zeropad = 0;
    +    done = 0;
    +    do{
    +      switch( c ){
    +        case '-':   flag_leftjustify = 1;     break;
    +        case '+':   flag_plussign = 1;        break;
    +        case ' ':   flag_blanksign = 1;       break;
    +        case '#':   flag_alternateform = 1;   break;
    +        case '!':   flag_altform2 = 1;        break;
    +        case '0':   flag_zeropad = 1;         break;
    +        default:    done = 1;                 break;
    +      }
    +    }while( !done && (c=(*++fmt))!=0 );
    +    /* Get the field width */
    +    width = 0;
    +    if( c=='*' ){
    +      width = va_arg(ap,int);
    +      if( width<0 ){
    +        flag_leftjustify = 1;
    +        width = -width;
    +      }
    +      c = *++fmt;
    +    }else{
    +      while( c>='0' && c<='9' ){
    +        width = width*10 + c - '0';
    +        c = *++fmt;
    +      }
    +    }
    +    if( width > etBUFSIZE-10 ){
    +      width = etBUFSIZE-10;
    +    }
    +    /* Get the precision */
    +    if( c=='.' ){
    +      precision = 0;
    +      c = *++fmt;
    +      if( c=='*' ){
    +        precision = va_arg(ap,int);
    +        if( precision<0 ) precision = -precision;
    +        c = *++fmt;
    +      }else{
    +        while( c>='0' && c<='9' ){
    +          precision = precision*10 + c - '0';
    +          c = *++fmt;
    +        }
    +      }
    +    }else{
    +      precision = -1;
    +    }
    +    /* Get the conversion type modifier */
    +    if( c=='l' ){
    +      flag_long = 1;
    +      c = *++fmt;
    +      if( c=='l' ){
    +        flag_longlong = 1;
    +        c = *++fmt;
    +      }else{
    +        flag_longlong = 0;
    +      }
    +    }else{
    +      flag_long = flag_longlong = 0;
    +    }
    +    /* Fetch the info entry for the field */
    +    infop = &fmtinfo[0];
    +    xtype = etINVALID;
    +    for(idx=0; idx<ArraySize(fmtinfo); idx++){
    +      if( c==fmtinfo[idx].fmttype ){
    +        infop = &fmtinfo[idx];
    +        if( useExtended || (infop->flags & FLAG_INTERN)==0 ){
    +          xtype = infop->type;
    +        }else{
    +          return;
    +        }
    +        break;
    +      }
    +    }
    +    zExtra = 0;
    +
    +
    +    /* Limit the precision to prevent overflowing buf[] during conversion */
    +    if( precision>etBUFSIZE-40 && (infop->flags & FLAG_STRING)==0 ){
    +      precision = etBUFSIZE-40;
    +    }
    +
    +    /*
    +    ** At this point, variables are initialized as follows:
    +    **
    +    **   flag_alternateform          TRUE if a '#' is present.
    +    **   flag_altform2               TRUE if a '!' is present.
    +    **   flag_plussign               TRUE if a '+' is present.
    +    **   flag_leftjustify            TRUE if a '-' is present or if the
    +    **                               field width was negative.
    +    **   flag_zeropad                TRUE if the width began with 0.
    +    **   flag_long                   TRUE if the letter 'l' (ell) prefixed
    +    **                               the conversion character.
    +    **   flag_longlong               TRUE if the letter 'll' (ell ell) prefixed
    +    **                               the conversion character.
    +    **   flag_blanksign              TRUE if a ' ' is present.
    +    **   width                       The specified field width.  This is
    +    **                               always non-negative.  Zero is the default.
    +    **   precision                   The specified precision.  The default
    +    **                               is -1.
    +    **   xtype                       The class of the conversion.
    +    **   infop                       Pointer to the appropriate info struct.
    +    */
    +    switch( xtype ){
    +      case etPOINTER:
    +        flag_longlong = sizeof(char*)==sizeof(i64);
    +        flag_long = sizeof(char*)==sizeof(long int);
    +        /* Fall through into the next case */
    +      case etORDINAL:
    +      case etRADIX:
    +        if( infop->flags & FLAG_SIGNED ){
    +          i64 v;
    +          if( flag_longlong ){
    +            v = va_arg(ap,i64);
    +          }else if( flag_long ){
    +            v = va_arg(ap,long int);
    +          }else{
    +            v = va_arg(ap,int);
    +          }
    +          if( v<0 ){
    +            longvalue = -v;
    +            prefix = '-';
    +          }else{
    +            longvalue = v;
    +            if( flag_plussign )        prefix = '+';
    +            else if( flag_blanksign )  prefix = ' ';
    +            else                       prefix = 0;
    +          }
    +        }else{
    +          if( flag_longlong ){
    +            longvalue = va_arg(ap,u64);
    +          }else if( flag_long ){
    +            longvalue = va_arg(ap,unsigned long int);
    +          }else{
    +            longvalue = va_arg(ap,unsigned int);
    +          }
    +          prefix = 0;
    +        }
    +        if( longvalue==0 ) flag_alternateform = 0;
    +        if( flag_zeropad && precision<width-(prefix!=0) ){
    +          precision = width-(prefix!=0);
    +        }
    +        bufpt = &buf[etBUFSIZE-1];
    +        if( xtype==etORDINAL ){
    +          static const char zOrd[] = "thstndrd";
    +          int x = (int)(longvalue % 10);
    +          if( x>=4 || (longvalue/10)%10==1 ){
    +            x = 0;
    +          }
    +          buf[etBUFSIZE-3] = zOrd[x*2];
    +          buf[etBUFSIZE-2] = zOrd[x*2+1];
    +          bufpt -= 2;
    +        }
    +        {
    +          register const char *cset;      /* Use registers for speed */
    +          register int base;
    +          cset = &aDigits[infop->charset];
    +          base = infop->base;
    +          do{                                           /* Convert to ascii */
    +            *(--bufpt) = cset[longvalue%base];
    +            longvalue = longvalue/base;
    +          }while( longvalue>0 );
    +        }
    +        length = (int)(&buf[etBUFSIZE-1]-bufpt);
    +        for(idx=precision-length; idx>0; idx--){
    +          *(--bufpt) = '0';                             /* Zero pad */
    +        }
    +        if( prefix ) *(--bufpt) = prefix;               /* Add sign */
    +        if( flag_alternateform && infop->prefix ){      /* Add "0" or "0x" */
    +          const char *pre;
    +          char x;
    +          pre = &aPrefix[infop->prefix];
    +          for(; (x=(*pre))!=0; pre++) *(--bufpt) = x;
    +        }
    +        length = (int)(&buf[etBUFSIZE-1]-bufpt);
    +        break;
    +      case etFLOAT:
    +      case etEXP:
    +      case etGENERIC:
    +        realvalue = va_arg(ap,double);
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +        if( precision<0 ) precision = 6;         /* Set default precision */
    +        if( precision>etBUFSIZE/2-10 ) precision = etBUFSIZE/2-10;
    +        if( realvalue<0.0 ){
    +          realvalue = -realvalue;
    +          prefix = '-';
    +        }else{
    +          if( flag_plussign )          prefix = '+';
    +          else if( flag_blanksign )    prefix = ' ';
    +          else                         prefix = 0;
    +        }
    +        if( xtype==etGENERIC && precision>0 ) precision--;
    +#if 0
    +        /* Rounding works like BSD when the constant 0.4999 is used.  Wierd! */
    +        for(idx=precision, rounder=0.4999; idx>0; idx--, rounder*=0.1);
    +#else
    +        /* It makes more sense to use 0.5 */
    +        for(idx=precision, rounder=0.5; idx>0; idx--, rounder*=0.1){}
    +#endif
    +        if( xtype==etFLOAT ) realvalue += rounder;
    +        /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
    +        exp = 0;
    +        if( sqlite3IsNaN((double)realvalue) ){
    +          bufpt = "NaN";
    +          length = 3;
    +          break;
    +        }
    +        if( realvalue>0.0 ){
    +          while( realvalue>=1e32 && exp<=350 ){ realvalue *= 1e-32; exp+=32; }
    +          while( realvalue>=1e8 && exp<=350 ){ realvalue *= 1e-8; exp+=8; }
    +          while( realvalue>=10.0 && exp<=350 ){ realvalue *= 0.1; exp++; }
    +          while( realvalue<1e-8 ){ realvalue *= 1e8; exp-=8; }
    +          while( realvalue<1.0 ){ realvalue *= 10.0; exp--; }
    +          if( exp>350 ){
    +            if( prefix=='-' ){
    +              bufpt = "-Inf";
    +            }else if( prefix=='+' ){
    +              bufpt = "+Inf";
    +            }else{
    +              bufpt = "Inf";
    +            }
    +            length = sqlite3Strlen30(bufpt);
    +            break;
    +          }
    +        }
    +        bufpt = buf;
    +        /*
    +        ** If the field type is etGENERIC, then convert to either etEXP
    +        ** or etFLOAT, as appropriate.
    +        */
    +        flag_exp = xtype==etEXP;
    +        if( xtype!=etFLOAT ){
    +          realvalue += rounder;
    +          if( realvalue>=10.0 ){ realvalue *= 0.1; exp++; }
    +        }
    +        if( xtype==etGENERIC ){
    +          flag_rtz = !flag_alternateform;
    +          if( exp<-4 || exp>precision ){
    +            xtype = etEXP;
    +          }else{
    +            precision = precision - exp;
    +            xtype = etFLOAT;
    +          }
    +        }else{
    +          flag_rtz = 0;
    +        }
    +        if( xtype==etEXP ){
    +          e2 = 0;
    +        }else{
    +          e2 = exp;
    +        }
    +        nsd = 0;
    +        flag_dp = (precision>0 ?1:0) | flag_alternateform | flag_altform2;
    +        /* The sign in front of the number */
    +        if( prefix ){
    +          *(bufpt++) = prefix;
    +        }
    +        /* Digits prior to the decimal point */
    +        if( e2<0 ){
    +          *(bufpt++) = '0';
    +        }else{
    +          for(; e2>=0; e2--){
    +            *(bufpt++) = et_getdigit(&realvalue,&nsd);
    +          }
    +        }
    +        /* The decimal point */
    +        if( flag_dp ){
    +          *(bufpt++) = '.';
    +        }
    +        /* "0" digits after the decimal point but before the first
    +        ** significant digit of the number */
    +        for(e2++; e2<0; precision--, e2++){
    +          assert( precision>0 );
    +          *(bufpt++) = '0';
    +        }
    +        /* Significant digits after the decimal point */
    +        while( (precision--)>0 ){
    +          *(bufpt++) = et_getdigit(&realvalue,&nsd);
    +        }
    +        /* Remove trailing zeros and the "." if no digits follow the "." */
    +        if( flag_rtz && flag_dp ){
    +          while( bufpt[-1]=='0' ) *(--bufpt) = 0;
    +          assert( bufpt>buf );
    +          if( bufpt[-1]=='.' ){
    +            if( flag_altform2 ){
    +              *(bufpt++) = '0';
    +            }else{
    +              *(--bufpt) = 0;
    +            }
    +          }
    +        }
    +        /* Add the "eNNN" suffix */
    +        if( flag_exp || xtype==etEXP ){
    +          *(bufpt++) = aDigits[infop->charset];
    +          if( exp<0 ){
    +            *(bufpt++) = '-'; exp = -exp;
    +          }else{
    +            *(bufpt++) = '+';
    +          }
    +          if( exp>=100 ){
    +            *(bufpt++) = (char)((exp/100)+'0');        /* 100's digit */
    +            exp %= 100;
    +          }
    +          *(bufpt++) = (char)(exp/10+'0');             /* 10's digit */
    +          *(bufpt++) = (char)(exp%10+'0');             /* 1's digit */
    +        }
    +        *bufpt = 0;
    +
    +        /* The converted number is in buf[] and zero terminated. Output it.
    +        ** Note that the number is in the usual order, not reversed as with
    +        ** integer conversions. */
    +        length = (int)(bufpt-buf);
    +        bufpt = buf;
    +
    +        /* Special case:  Add leading zeros if the flag_zeropad flag is
    +        ** set and we are not left justified */
    +        if( flag_zeropad && !flag_leftjustify && length < width){
    +          int i;
    +          int nPad = width - length;
    +          for(i=width; i>=nPad; i--){
    +            bufpt[i] = bufpt[i-nPad];
    +          }
    +          i = prefix!=0;
    +          while( nPad-- ) bufpt[i++] = '0';
    +          length = width;
    +        }
    +#endif
    +        break;
    +      case etSIZE:
    +        *(va_arg(ap,int*)) = pAccum->nChar;
    +        length = width = 0;
    +        break;
    +      case etPERCENT:
    +        buf[0] = '%';
    +        bufpt = buf;
    +        length = 1;
    +        break;
    +      case etCHARX:
    +        c = va_arg(ap,int);
    +        buf[0] = (char)c;
    +        if( precision>=0 ){
    +          for(idx=1; idx<precision; idx++) buf[idx] = (char)c;
    +          length = precision;
    +        }else{
    +          length =1;
    +        }
    +        bufpt = buf;
    +        break;
    +      case etSTRING:
    +      case etDYNSTRING:
    +        bufpt = va_arg(ap,char*);
    +        if( bufpt==0 ){
    +          bufpt = "";
    +        }else if( xtype==etDYNSTRING ){
    +          zExtra = bufpt;
    +        }
    +        if( precision>=0 ){
    +          for(length=0; length<precision && bufpt[length]; length++){}
    +        }else{
    +          length = sqlite3Strlen30(bufpt);
    +        }
    +        break;
    +      case etSQLESCAPE:
    +      case etSQLESCAPE2:
    +      case etSQLESCAPE3: {
    +        int i, j, n, isnull;
    +        int needQuote;
    +        char ch;
    +        char q = ((xtype==etSQLESCAPE3)?'"':'\'');   /* Quote character */
    +        char *escarg = va_arg(ap,char*);
    +        isnull = escarg==0;
    +        if( isnull ) escarg = (xtype==etSQLESCAPE2 ? "NULL" : "(NULL)");
    +        for(i=n=0; (ch=escarg[i])!=0; i++){
    +          if( ch==q )  n++;
    +        }
    +        needQuote = !isnull && xtype==etSQLESCAPE2;
    +        n += i + 1 + needQuote*2;
    +        if( n>etBUFSIZE ){
    +          bufpt = zExtra = sqlite3Malloc( n );
    +          if( bufpt==0 ){
    +            pAccum->mallocFailed = 1;
    +            return;
    +          }
    +        }else{
    +          bufpt = buf;
    +        }
    +        j = 0;
    +        if( needQuote ) bufpt[j++] = q;
    +        for(i=0; (ch=escarg[i])!=0; i++){
    +          bufpt[j++] = ch;
    +          if( ch==q ) bufpt[j++] = ch;
    +        }
    +        if( needQuote ) bufpt[j++] = q;
    +        bufpt[j] = 0;
    +        length = j;
    +        /* The precision is ignored on %q and %Q */
    +        /* if( precision>=0 && precision<length ) length = precision; */
    +        break;
    +      }
    +      case etTOKEN: {
    +        Token *pToken = va_arg(ap, Token*);
    +        if( pToken ){
    +          sqlite3StrAccumAppend(pAccum, (const char*)pToken->z, pToken->n);
    +        }
    +        length = width = 0;
    +        break;
    +      }
    +      case etSRCLIST: {
    +        SrcList *pSrc = va_arg(ap, SrcList*);
    +        int k = va_arg(ap, int);
    +        struct SrcList_item *pItem = &pSrc->a[k];
    +        assert( k>=0 && k<pSrc->nSrc );
    +        if( pItem->zDatabase ){
    +          sqlite3StrAccumAppend(pAccum, pItem->zDatabase, -1);
    +          sqlite3StrAccumAppend(pAccum, ".", 1);
    +        }
    +        sqlite3StrAccumAppend(pAccum, pItem->zName, -1);
    +        length = width = 0;
    +        break;
    +      }
    +      default: {
    +        assert( xtype==etINVALID );
    +        return;
    +      }
    +    }/* End switch over the format type */
    +    /*
    +    ** The text of the conversion is pointed to by "bufpt" and is
    +    ** "length" characters long.  The field width is "width".  Do
    +    ** the output.
    +    */
    +    if( !flag_leftjustify ){
    +      register int nspace;
    +      nspace = width-length;
    +      if( nspace>0 ){
    +        appendSpace(pAccum, nspace);
    +      }
    +    }
    +    if( length>0 ){
    +      sqlite3StrAccumAppend(pAccum, bufpt, length);
    +    }
    +    if( flag_leftjustify ){
    +      register int nspace;
    +      nspace = width-length;
    +      if( nspace>0 ){
    +        appendSpace(pAccum, nspace);
    +      }
    +    }
    +    if( zExtra ){
    +      sqlite3_free(zExtra);
    +    }
    +  }/* End for loop over the format string */
    +} /* End of function */
    +
    +/*
    +** Append N bytes of text from z to the StrAccum object.
    +*/
    +SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
    +  assert( z!=0 || N==0 );
    +  if( p->tooBig | p->mallocFailed ){
    +    testcase(p->tooBig);
    +    testcase(p->mallocFailed);
    +    return;
    +  }
    +  if( N<0 ){
    +    N = sqlite3Strlen30(z);
    +  }
    +  if( N==0 || NEVER(z==0) ){
    +    return;
    +  }
    +  if( p->nChar+N >= p->nAlloc ){
    +    char *zNew;
    +    if( !p->useMalloc ){
    +      p->tooBig = 1;
    +      N = p->nAlloc - p->nChar - 1;
    +      if( N<=0 ){
    +        return;
    +      }
    +    }else{
    +      i64 szNew = p->nChar;
    +      szNew += N + 1;
    +      if( szNew > p->mxAlloc ){
    +        sqlite3StrAccumReset(p);
    +        p->tooBig = 1;
    +        return;
    +      }else{
    +        p->nAlloc = (int)szNew;
    +      }
    +      zNew = sqlite3DbMallocRaw(p->db, p->nAlloc );
    +      if( zNew ){
    +        memcpy(zNew, p->zText, p->nChar);
    +        sqlite3StrAccumReset(p);
    +        p->zText = zNew;
    +      }else{
    +        p->mallocFailed = 1;
    +        sqlite3StrAccumReset(p);
    +        return;
    +      }
    +    }
    +  }
    +  memcpy(&p->zText[p->nChar], z, N);
    +  p->nChar += N;
    +}
    +
    +/*
    +** Finish off a string by making sure it is zero-terminated.
    +** Return a pointer to the resulting string.  Return a NULL
    +** pointer if any kind of error was encountered.
    +*/
    +SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
    +  if( p->zText ){
    +    p->zText[p->nChar] = 0;
    +    if( p->useMalloc && p->zText==p->zBase ){
    +      p->zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
    +      if( p->zText ){
    +        memcpy(p->zText, p->zBase, p->nChar+1);
    +      }else{
    +        p->mallocFailed = 1;
    +      }
    +    }
    +  }
    +  return p->zText;
    +}
    +
    +/*
    +** Reset an StrAccum string.  Reclaim all malloced memory.
    +*/
    +SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum *p){
    +  if( p->zText!=p->zBase ){
    +    sqlite3DbFree(p->db, p->zText);
    +  }
    +  p->zText = 0;
    +}
    +
    +/*
    +** Initialize a string accumulator
    +*/
    +SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum *p, char *zBase, int n, int mx){
    +  p->zText = p->zBase = zBase;
    +  p->db = 0;
    +  p->nChar = 0;
    +  p->nAlloc = n;
    +  p->mxAlloc = mx;
    +  p->useMalloc = 1;
    +  p->tooBig = 0;
    +  p->mallocFailed = 0;
    +}
    +
    +/*
    +** Print into memory obtained from sqliteMalloc().  Use the internal
    +** %-conversion extensions.
    +*/
    +SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
    +  char *z;
    +  char zBase[SQLITE_PRINT_BUF_SIZE];
    +  StrAccum acc;
    +  assert( db!=0 );
    +  sqlite3StrAccumInit(&acc, zBase, sizeof(zBase),
    +                      db->aLimit[SQLITE_LIMIT_LENGTH]);
    +  acc.db = db;
    +  sqlite3VXPrintf(&acc, 1, zFormat, ap);
    +  z = sqlite3StrAccumFinish(&acc);
    +  if( acc.mallocFailed ){
    +    db->mallocFailed = 1;
    +  }
    +  return z;
    +}
    +
    +/*
    +** Print into memory obtained from sqliteMalloc().  Use the internal
    +** %-conversion extensions.
    +*/
    +SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
    +  va_list ap;
    +  char *z;
    +  va_start(ap, zFormat);
    +  z = sqlite3VMPrintf(db, zFormat, ap);
    +  va_end(ap);
    +  return z;
    +}
    +
    +/*
    +** Like sqlite3MPrintf(), but call sqlite3DbFree() on zStr after formatting
    +** the string and before returnning.  This routine is intended to be used
    +** to modify an existing string.  For example:
    +**
    +**       x = sqlite3MPrintf(db, x, "prefix %s suffix", x);
    +**
    +*/
    +SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
    +  va_list ap;
    +  char *z;
    +  va_start(ap, zFormat);
    +  z = sqlite3VMPrintf(db, zFormat, ap);
    +  va_end(ap);
    +  sqlite3DbFree(db, zStr);
    +  return z;
    +}
    +
    +/*
    +** Print into memory obtained from sqlite3_malloc().  Omit the internal
    +** %-conversion extensions.
    +*/
    +SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
    +  char *z;
    +  char zBase[SQLITE_PRINT_BUF_SIZE];
    +  StrAccum acc;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize() ) return 0;
    +#endif
    +  sqlite3StrAccumInit(&acc, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);
    +  sqlite3VXPrintf(&acc, 0, zFormat, ap);
    +  z = sqlite3StrAccumFinish(&acc);
    +  return z;
    +}
    +
    +/*
    +** Print into memory obtained from sqlite3_malloc()().  Omit the internal
    +** %-conversion extensions.
    +*/
    +SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
    +  va_list ap;
    +  char *z;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize() ) return 0;
    +#endif
    +  va_start(ap, zFormat);
    +  z = sqlite3_vmprintf(zFormat, ap);
    +  va_end(ap);
    +  return z;
    +}
    +
    +/*
    +** sqlite3_snprintf() works like snprintf() except that it ignores the
    +** current locale settings.  This is important for SQLite because we
    +** are not able to use a "," as the decimal point in place of "." as
    +** specified by some locales.
    +*/
    +SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
    +  char *z;
    +  va_list ap;
    +  StrAccum acc;
    +
    +  if( n<=0 ){
    +    return zBuf;
    +  }
    +  sqlite3StrAccumInit(&acc, zBuf, n, 0);
    +  acc.useMalloc = 0;
    +  va_start(ap,zFormat);
    +  sqlite3VXPrintf(&acc, 0, zFormat, ap);
    +  va_end(ap);
    +  z = sqlite3StrAccumFinish(&acc);
    +  return z;
    +}
    +
    +#if defined(SQLITE_DEBUG)
    +/*
    +** A version of printf() that understands %lld.  Used for debugging.
    +** The printf() built into some versions of windows does not understand %lld
    +** and segfaults if you give it a long long int.
    +*/
    +SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
    +  va_list ap;
    +  StrAccum acc;
    +  char zBuf[500];
    +  sqlite3StrAccumInit(&acc, zBuf, sizeof(zBuf), 0);
    +  acc.useMalloc = 0;
    +  va_start(ap,zFormat);
    +  sqlite3VXPrintf(&acc, 0, zFormat, ap);
    +  va_end(ap);
    +  sqlite3StrAccumFinish(&acc);
    +  fprintf(stdout,"%s", zBuf);
    +  fflush(stdout);
    +}
    +#endif
    +
    +/************** End of printf.c **********************************************/
    +/************** Begin file random.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code to implement a pseudo-random number
    +** generator (PRNG) for SQLite.
    +**
    +** Random numbers are used by some of the database backends in order
    +** to generate random integer keys for tables or random filenames.
    +**
    +** $Id: random.c,v 1.29 2008/12/10 19:26:24 drh Exp $
    +*/
    +
    +
    +/* All threads share a single random number generator.
    +** This structure is the current state of the generator.
    +*/
    +static SQLITE_WSD struct sqlite3PrngType {
    +  unsigned char isInit;          /* True if initialized */
    +  unsigned char i, j;            /* State variables */
    +  unsigned char s[256];          /* State variables */
    +} sqlite3Prng;
    +
    +/*
    +** Get a single 8-bit random value from the RC4 PRNG.  The Mutex
    +** must be held while executing this routine.
    +**
    +** Why not just use a library random generator like lrand48() for this?
    +** Because the OP_NewRowid opcode in the VDBE depends on having a very
    +** good source of random numbers.  The lrand48() library function may
    +** well be good enough.  But maybe not.  Or maybe lrand48() has some
    +** subtle problems on some systems that could cause problems.  It is hard
    +** to know.  To minimize the risk of problems due to bad lrand48()
    +** implementations, SQLite uses this random number generator based
    +** on RC4, which we know works very well.
    +**
    +** (Later):  Actually, OP_NewRowid does not depend on a good source of
    +** randomness any more.  But we will leave this code in all the same.
    +*/
    +static u8 randomByte(void){
    +  unsigned char t;
    +
    +
    +  /* The "wsdPrng" macro will resolve to the pseudo-random number generator
    +  ** state vector.  If writable static data is unsupported on the target,
    +  ** we have to locate the state vector at run-time.  In the more common
    +  ** case where writable static data is supported, wsdPrng can refer directly
    +  ** to the "sqlite3Prng" state vector declared above.
    +  */
    +#ifdef SQLITE_OMIT_WSD
    +  struct sqlite3PrngType *p = &GLOBAL(struct sqlite3PrngType, sqlite3Prng);
    +# define wsdPrng p[0]
    +#else
    +# define wsdPrng sqlite3Prng
    +#endif
    +
    +
    +  /* Initialize the state of the random number generator once,
    +  ** the first time this routine is called.  The seed value does
    +  ** not need to contain a lot of randomness since we are not
    +  ** trying to do secure encryption or anything like that...
    +  **
    +  ** Nothing in this file or anywhere else in SQLite does any kind of
    +  ** encryption.  The RC4 algorithm is being used as a PRNG (pseudo-random
    +  ** number generator) not as an encryption device.
    +  */
    +  if( !wsdPrng.isInit ){
    +    int i;
    +    char k[256];
    +    wsdPrng.j = 0;
    +    wsdPrng.i = 0;
    +    sqlite3OsRandomness(sqlite3_vfs_find(0), 256, k);
    +    for(i=0; i<256; i++){
    +      wsdPrng.s[i] = (u8)i;
    +    }
    +    for(i=0; i<256; i++){
    +      wsdPrng.j += wsdPrng.s[i] + k[i];
    +      t = wsdPrng.s[wsdPrng.j];
    +      wsdPrng.s[wsdPrng.j] = wsdPrng.s[i];
    +      wsdPrng.s[i] = t;
    +    }
    +    wsdPrng.isInit = 1;
    +  }
    +
    +  /* Generate and return single random byte
    +  */
    +  wsdPrng.i++;
    +  t = wsdPrng.s[wsdPrng.i];
    +  wsdPrng.j += t;
    +  wsdPrng.s[wsdPrng.i] = wsdPrng.s[wsdPrng.j];
    +  wsdPrng.s[wsdPrng.j] = t;
    +  t += wsdPrng.s[wsdPrng.i];
    +  return wsdPrng.s[t];
    +}
    +
    +/*
    +** Return N random bytes.
    +*/
    +SQLITE_API void sqlite3_randomness(int N, void *pBuf){
    +  unsigned char *zBuf = pBuf;
    +#if SQLITE_THREADSAFE
    +  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
    +#endif
    +  sqlite3_mutex_enter(mutex);
    +  while( N-- ){
    +    *(zBuf++) = randomByte();
    +  }
    +  sqlite3_mutex_leave(mutex);
    +}
    +
    +#ifndef SQLITE_OMIT_BUILTIN_TEST
    +/*
    +** For testing purposes, we sometimes want to preserve the state of
    +** PRNG and restore the PRNG to its saved state at a later time, or
    +** to reset the PRNG to its initial state.  These routines accomplish
    +** those tasks.
    +**
    +** The sqlite3_test_control() interface calls these routines to
    +** control the PRNG.
    +*/
    +static SQLITE_WSD struct sqlite3PrngType sqlite3SavedPrng;
    +SQLITE_PRIVATE void sqlite3PrngSaveState(void){
    +  memcpy(
    +    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),
    +    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),
    +    sizeof(sqlite3Prng)
    +  );
    +}
    +SQLITE_PRIVATE void sqlite3PrngRestoreState(void){
    +  memcpy(
    +    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),
    +    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),
    +    sizeof(sqlite3Prng)
    +  );
    +}
    +SQLITE_PRIVATE void sqlite3PrngResetState(void){
    +  GLOBAL(struct sqlite3PrngType, sqlite3Prng).isInit = 0;
    +}
    +#endif /* SQLITE_OMIT_BUILTIN_TEST */
    +
    +/************** End of random.c **********************************************/
    +/************** Begin file utf.c *********************************************/
    +/*
    +** 2004 April 13
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains routines used to translate between UTF-8, 
    +** UTF-16, UTF-16BE, and UTF-16LE.
    +**
    +** $Id: utf.c,v 1.73 2009/04/01 18:40:32 drh Exp $
    +**
    +** Notes on UTF-8:
    +**
    +**   Byte-0    Byte-1    Byte-2    Byte-3    Value
    +**  0xxxxxxx                                 00000000 00000000 0xxxxxxx
    +**  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx
    +**  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx
    +**  11110uuu  10uuzzzz  10yyyyyy  10xxxxxx   000uuuuu zzzzyyyy yyxxxxxx
    +**
    +**
    +** Notes on UTF-16:  (with wwww+1==uuuuu)
    +**
    +**      Word-0               Word-1          Value
    +**  110110ww wwzzzzyy   110111yy yyxxxxxx    000uuuuu zzzzyyyy yyxxxxxx
    +**  zzzzyyyy yyxxxxxx                        00000000 zzzzyyyy yyxxxxxx
    +**
    +**
    +** BOM or Byte Order Mark:
    +**     0xff 0xfe   little-endian utf-16 follows
    +**     0xfe 0xff   big-endian utf-16 follows
    +**
    +*/
    +/************** Include vdbeInt.h in the middle of utf.c *********************/
    +/************** Begin file vdbeInt.h *****************************************/
    +/*
    +** 2003 September 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the header file for information that is private to the
    +** VDBE.  This information used to all be at the top of the single
    +** source code file "vdbe.c".  When that file became too big (over
    +** 6000 lines long) it was split up into several smaller files and
    +** this header information was factored out.
    +**
    +** $Id: vdbeInt.h,v 1.174 2009/06/23 14:15:04 drh Exp $
    +*/
    +#ifndef _VDBEINT_H_
    +#define _VDBEINT_H_
    +
    +/*
    +** SQL is translated into a sequence of instructions to be
    +** executed by a virtual machine.  Each instruction is an instance
    +** of the following structure.
    +*/
    +typedef struct VdbeOp Op;
    +
    +/*
    +** Boolean values
    +*/
    +typedef unsigned char Bool;
    +
    +/*
    +** A cursor is a pointer into a single BTree within a database file.
    +** The cursor can seek to a BTree entry with a particular key, or
    +** loop over all entries of the Btree.  You can also insert new BTree
    +** entries or retrieve the key or data from the entry that the cursor
    +** is currently pointing to.
    +** 
    +** Every cursor that the virtual machine has open is represented by an
    +** instance of the following structure.
    +**
    +** If the VdbeCursor.isTriggerRow flag is set it means that this cursor is
    +** really a single row that represents the NEW or OLD pseudo-table of
    +** a row trigger.  The data for the row is stored in VdbeCursor.pData and
    +** the rowid is in VdbeCursor.iKey.
    +*/
    +struct VdbeCursor {
    +  BtCursor *pCursor;    /* The cursor structure of the backend */
    +  int iDb;              /* Index of cursor database in db->aDb[] (or -1) */
    +  i64 lastRowid;        /* Last rowid from a Next or NextIdx operation */
    +  Bool zeroed;          /* True if zeroed out and ready for reuse */
    +  Bool rowidIsValid;    /* True if lastRowid is valid */
    +  Bool atFirst;         /* True if pointing to first entry */
    +  Bool useRandomRowid;  /* Generate new record numbers semi-randomly */
    +  Bool nullRow;         /* True if pointing to a row with no data */
    +  Bool deferredMoveto;  /* A call to sqlite3BtreeMoveto() is needed */
    +  Bool isTable;         /* True if a table requiring integer keys */
    +  Bool isIndex;         /* True if an index containing keys only - no data */
    +  i64 movetoTarget;     /* Argument to the deferred sqlite3BtreeMoveto() */
    +  Btree *pBt;           /* Separate file holding temporary table */
    +  int pseudoTableReg;   /* Register holding pseudotable content. */
    +  KeyInfo *pKeyInfo;    /* Info about index keys needed by index cursors */
    +  int nField;           /* Number of fields in the header */
    +  i64 seqCount;         /* Sequence counter */
    +  sqlite3_vtab_cursor *pVtabCursor;  /* The cursor for a virtual table */
    +  const sqlite3_module *pModule;     /* Module for cursor pVtabCursor */
    +
    +  /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or 
    +  ** OP_IsUnique opcode on this cursor. */
    +  int seekResult;
    +
    +  /* Cached information about the header for the data record that the
    +  ** cursor is currently pointing to.  Only valid if cacheStatus matches
    +  ** Vdbe.cacheCtr.  Vdbe.cacheCtr will never take on the value of
    +  ** CACHE_STALE and so setting cacheStatus=CACHE_STALE guarantees that
    +  ** the cache is out of date.
    +  **
    +  ** aRow might point to (ephemeral) data for the current row, or it might
    +  ** be NULL.
    +  */
    +  u32 cacheStatus;      /* Cache is valid if this matches Vdbe.cacheCtr */
    +  int payloadSize;      /* Total number of bytes in the record */
    +  u32 *aType;           /* Type values for all entries in the record */
    +  u32 *aOffset;         /* Cached offsets to the start of each columns data */
    +  u8 *aRow;             /* Data for the current row, if all on one page */
    +};
    +typedef struct VdbeCursor VdbeCursor;
    +
    +/*
    +** When a sub-program is executed (OP_Program), a structure of this type
    +** is allocated to store the current value of the program counter, as
    +** well as the current memory cell array and various other frame specific
    +** values stored in the Vdbe struct. When the sub-program is finished, 
    +** these values are copied back to the Vdbe from the VdbeFrame structure,
    +** restoring the state of the VM to as it was before the sub-program
    +** began executing.
    +**
    +** Frames are stored in a linked list headed at Vdbe.pParent. Vdbe.pParent
    +** is the parent of the current frame, or zero if the current frame
    +** is the main Vdbe program.
    +*/
    +typedef struct VdbeFrame VdbeFrame;
    +struct VdbeFrame {
    +  Vdbe *v;                /* VM this frame belongs to */
    +  int pc;                 /* Program Counter */
    +  Op *aOp;                /* Program instructions */
    +  int nOp;                /* Size of aOp array */
    +  Mem *aMem;              /* Array of memory cells */
    +  int nMem;               /* Number of entries in aMem */
    +  VdbeCursor **apCsr;     /* Element of Vdbe cursors */
    +  u16 nCursor;            /* Number of entries in apCsr */
    +  void *token;            /* Copy of SubProgram.token */
    +  int nChildMem;          /* Number of memory cells for child frame */
    +  int nChildCsr;          /* Number of cursors for child frame */
    +  i64 lastRowid;          /* Last insert rowid (sqlite3.lastRowid) */
    +  int nChange;            /* Statement changes (Vdbe.nChanges)     */
    +  VdbeFrame *pParent;     /* Parent of this frame */
    +};
    +
    +#define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
    +
    +/*
    +** A value for VdbeCursor.cacheValid that means the cache is always invalid.
    +*/
    +#define CACHE_STALE 0
    +
    +/*
    +** Internally, the vdbe manipulates nearly all SQL values as Mem
    +** structures. Each Mem struct may cache multiple representations (string,
    +** integer etc.) of the same value.  A value (and therefore Mem structure)
    +** has the following properties:
    +**
    +** Each value has a manifest type. The manifest type of the value stored
    +** in a Mem struct is returned by the MemType(Mem*) macro. The type is
    +** one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_REAL, SQLITE_TEXT or
    +** SQLITE_BLOB.
    +*/
    +struct Mem {
    +  union {
    +    i64 i;              /* Integer value. */
    +    int nZero;          /* Used when bit MEM_Zero is set in flags */
    +    FuncDef *pDef;      /* Used only when flags==MEM_Agg */
    +    RowSet *pRowSet;    /* Used only when flags==MEM_RowSet */
    +    VdbeFrame *pFrame;  /* Used when flags==MEM_Frame */
    +  } u;
    +  double r;           /* Real value */
    +  sqlite3 *db;        /* The associated database connection */
    +  char *z;            /* String or BLOB value */
    +  int n;              /* Number of characters in string value, excluding '\0' */
    +  u16 flags;          /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
    +  u8  type;           /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */
    +  u8  enc;            /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */
    +  void (*xDel)(void *);  /* If not null, call this function to delete Mem.z */
    +  char *zMalloc;      /* Dynamic buffer allocated by sqlite3_malloc() */
    +};
    +
    +/* One or more of the following flags are set to indicate the validOK
    +** representations of the value stored in the Mem struct.
    +**
    +** If the MEM_Null flag is set, then the value is an SQL NULL value.
    +** No other flags may be set in this case.
    +**
    +** If the MEM_Str flag is set then Mem.z points at a string representation.
    +** Usually this is encoded in the same unicode encoding as the main
    +** database (see below for exceptions). If the MEM_Term flag is also
    +** set, then the string is nul terminated. The MEM_Int and MEM_Real 
    +** flags may coexist with the MEM_Str flag.
    +**
    +** Multiple of these values can appear in Mem.flags.  But only one
    +** at a time can appear in Mem.type.
    +*/
    +#define MEM_Null      0x0001   /* Value is NULL */
    +#define MEM_Str       0x0002   /* Value is a string */
    +#define MEM_Int       0x0004   /* Value is an integer */
    +#define MEM_Real      0x0008   /* Value is a real number */
    +#define MEM_Blob      0x0010   /* Value is a BLOB */
    +#define MEM_RowSet    0x0020   /* Value is a RowSet object */
    +#define MEM_Frame     0x0040   /* Value is a VdbeFrame object */
    +#define MEM_TypeMask  0x00ff   /* Mask of type bits */
    +
    +/* Whenever Mem contains a valid string or blob representation, one of
    +** the following flags must be set to determine the memory management
    +** policy for Mem.z.  The MEM_Term flag tells us whether or not the
    +** string is \000 or \u0000 terminated
    +*/
    +#define MEM_Term      0x0200   /* String rep is nul terminated */
    +#define MEM_Dyn       0x0400   /* Need to call sqliteFree() on Mem.z */
    +#define MEM_Static    0x0800   /* Mem.z points to a static string */
    +#define MEM_Ephem     0x1000   /* Mem.z points to an ephemeral string */
    +#define MEM_Agg       0x2000   /* Mem.z points to an agg function context */
    +#define MEM_Zero      0x4000   /* Mem.i contains count of 0s appended to blob */
    +
    +#ifdef SQLITE_OMIT_INCRBLOB
    +  #undef MEM_Zero
    +  #define MEM_Zero 0x0000
    +#endif
    +
    +
    +/*
    +** Clear any existing type flags from a Mem and replace them with f
    +*/
    +#define MemSetTypeFlag(p, f) \
    +   ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f)
    +
    +
    +/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
    +** additional information about auxiliary information bound to arguments
    +** of the function.  This is used to implement the sqlite3_get_auxdata()
    +** and sqlite3_set_auxdata() APIs.  The "auxdata" is some auxiliary data
    +** that can be associated with a constant argument to a function.  This
    +** allows functions such as "regexp" to compile their constant regular
    +** expression argument once and reused the compiled code for multiple
    +** invocations.
    +*/
    +struct VdbeFunc {
    +  FuncDef *pFunc;               /* The definition of the function */
    +  int nAux;                     /* Number of entries allocated for apAux[] */
    +  struct AuxData {
    +    void *pAux;                   /* Aux data for the i-th argument */
    +    void (*xDelete)(void *);      /* Destructor for the aux data */
    +  } apAux[1];                   /* One slot for each function argument */
    +};
    +
    +/*
    +** The "context" argument for a installable function.  A pointer to an
    +** instance of this structure is the first argument to the routines used
    +** implement the SQL functions.
    +**
    +** There is a typedef for this structure in sqlite.h.  So all routines,
    +** even the public interface to SQLite, can use a pointer to this structure.
    +** But this file is the only place where the internal details of this
    +** structure are known.
    +**
    +** This structure is defined inside of vdbeInt.h because it uses substructures
    +** (Mem) which are only defined there.
    +*/
    +struct sqlite3_context {
    +  FuncDef *pFunc;       /* Pointer to function information.  MUST BE FIRST */
    +  VdbeFunc *pVdbeFunc;  /* Auxilary data, if created. */
    +  Mem s;                /* The return value is stored here */
    +  Mem *pMem;            /* Memory cell used to store aggregate context */
    +  int isError;          /* Error code returned by the function. */
    +  CollSeq *pColl;       /* Collating sequence */
    +};
    +
    +/*
    +** A Set structure is used for quick testing to see if a value
    +** is part of a small set.  Sets are used to implement code like
    +** this:
    +**            x.y IN ('hi','hoo','hum')
    +*/
    +typedef struct Set Set;
    +struct Set {
    +  Hash hash;             /* A set is just a hash table */
    +  HashElem *prev;        /* Previously accessed hash elemen */
    +};
    +
    +/*
    +** An instance of the virtual machine.  This structure contains the complete
    +** state of the virtual machine.
    +**
    +** The "sqlite3_stmt" structure pointer that is returned by sqlite3_compile()
    +** is really a pointer to an instance of this structure.
    +**
    +** The Vdbe.inVtabMethod variable is set to non-zero for the duration of
    +** any virtual table method invocations made by the vdbe program. It is
    +** set to 2 for xDestroy method calls and 1 for all other methods. This
    +** variable is used for two purposes: to allow xDestroy methods to execute
    +** "DROP TABLE" statements and to prevent some nasty side effects of
    +** malloc failure when SQLite is invoked recursively by a virtual table 
    +** method function.
    +*/
    +struct Vdbe {
    +  sqlite3 *db;            /* The database connection that owns this statement */
    +  Vdbe *pPrev,*pNext;     /* Linked list of VDBEs with the same Vdbe.db */
    +  int nOp;                /* Number of instructions in the program */
    +  int nOpAlloc;           /* Number of slots allocated for aOp[] */
    +  Op *aOp;                /* Space to hold the virtual machine's program */
    +  int nLabel;             /* Number of labels used */
    +  int nLabelAlloc;        /* Number of slots allocated in aLabel[] */
    +  int *aLabel;            /* Space to hold the labels */
    +  Mem **apArg;            /* Arguments to currently executing user function */
    +  Mem *aColName;          /* Column names to return */
    +  Mem *pResultSet;        /* Pointer to an array of results */
    +  u16 nResColumn;         /* Number of columns in one row of the result set */
    +  u16 nCursor;            /* Number of slots in apCsr[] */
    +  VdbeCursor **apCsr;     /* One element of this array for each open cursor */
    +  u8 errorAction;         /* Recovery action to do in case of an error */
    +  u8 okVar;               /* True if azVar[] has been initialized */
    +  ynVar nVar;             /* Number of entries in aVar[] */
    +  Mem *aVar;              /* Values for the OP_Variable opcode. */
    +  char **azVar;           /* Name of variables */
    +  u32 magic;              /* Magic number for sanity checking */
    +  int nMem;               /* Number of memory locations currently allocated */
    +  Mem *aMem;              /* The memory locations */
    +  u32 cacheCtr;           /* VdbeCursor row cache generation counter */
    +  int pc;                 /* The program counter */
    +  int rc;                 /* Value to return */
    +  char *zErrMsg;          /* Error message written here */
    +  u8 explain;             /* True if EXPLAIN present on SQL command */
    +  u8 changeCntOn;         /* True to update the change-counter */
    +  u8 expired;             /* True if the VM needs to be recompiled */
    +  u8 minWriteFileFormat;  /* Minimum file format for writable database files */
    +  u8 inVtabMethod;        /* See comments above */
    +  u8 usesStmtJournal;     /* True if uses a statement journal */
    +  u8 readOnly;            /* True for read-only statements */
    +  u8 isPrepareV2;         /* True if prepared with prepare_v2() */
    +  int nChange;            /* Number of db changes made since last reset */
    +  int btreeMask;          /* Bitmask of db->aDb[] entries referenced */
    +  i64 startTime;          /* Time when query started - used for profiling */
    +  BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */
    +  int aCounter[2];        /* Counters used by sqlite3_stmt_status() */
    +  char *zSql;             /* Text of the SQL statement that generated this */
    +  void *pFree;            /* Free this when deleting the vdbe */
    +  i64 nFkConstraint;      /* Number of imm. FK constraints this VM */
    +  i64 nStmtDefCons;       /* Number of def. constraints when stmt started */
    +  int iStatement;         /* Statement number (or 0 if has not opened stmt) */
    +#ifdef SQLITE_DEBUG
    +  FILE *trace;            /* Write an execution trace here, if not NULL */
    +#endif
    +  VdbeFrame *pFrame;      /* Parent frame */
    +  int nFrame;             /* Number of frames in pFrame list */
    +  u32 expmask;            /* Binding to these vars invalidates VM */
    +};
    +
    +/*
    +** The following are allowed values for Vdbe.magic
    +*/
    +#define VDBE_MAGIC_INIT     0x26bceaa5    /* Building a VDBE program */
    +#define VDBE_MAGIC_RUN      0xbdf20da3    /* VDBE is ready to execute */
    +#define VDBE_MAGIC_HALT     0x519c2973    /* VDBE has completed execution */
    +#define VDBE_MAGIC_DEAD     0xb606c3c8    /* The VDBE has been deallocated */
    +
    +/*
    +** Function prototypes
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);
    +void sqliteVdbePopStack(Vdbe*,int);
    +SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor*);
    +#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)
    +SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE*, int, Op*);
    +#endif
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int);
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
    +SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(VdbeFunc*, int);
    +
    +int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
    +SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);
    +SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
    +SQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
    +SQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);
    +SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
    +SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);
    +SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
    +SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
    +SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
    +SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
    +SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);
    +SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double);
    +SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);
    +SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);
    +SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, int);
    +SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem*);
    +SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem*);
    +SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);
    +SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
    +SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
    +SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p);
    +SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
    +SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
    +SQLITE_PRIVATE int sqlite3VdbeOpcodeHasProperty(int, int);
    +SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
    +SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
    +SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame*);
    +SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *);
    +SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem);
    +
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *, int);
    +#else
    +# define sqlite3VdbeCheckFk(p,i) 0
    +#endif
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +SQLITE_PRIVATE void sqlite3VdbeMutexArrayEnter(Vdbe *p);
    +#else
    +# define sqlite3VdbeMutexArrayEnter(p)
    +#endif
    +
    +SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE   void sqlite3VdbePrintSql(Vdbe*);
    +SQLITE_PRIVATE   void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
    +#endif
    +SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +SQLITE_PRIVATE   int sqlite3VdbeMemExpandBlob(Mem *);
    +#else
    +  #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK
    +#endif
    +
    +#endif /* !defined(_VDBEINT_H_) */
    +
    +/************** End of vdbeInt.h *********************************************/
    +/************** Continuing where we left off in utf.c ************************/
    +
    +#ifndef SQLITE_AMALGAMATION
    +/*
    +** The following constant value is used by the SQLITE_BIGENDIAN and
    +** SQLITE_LITTLEENDIAN macros.
    +*/
    +SQLITE_PRIVATE const int sqlite3one = 1;
    +#endif /* SQLITE_AMALGAMATION */
    +
    +/*
    +** This lookup table is used to help decode the first byte of
    +** a multi-byte UTF8 character.
    +*/
    +static const unsigned char sqlite3Utf8Trans1[] = {
    +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
    +  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    +  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
    +  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
    +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
    +  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
    +  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,
    +};
    +
    +
    +#define WRITE_UTF8(zOut, c) {                          \
    +  if( c<0x00080 ){                                     \
    +    *zOut++ = (u8)(c&0xFF);                            \
    +  }                                                    \
    +  else if( c<0x00800 ){                                \
    +    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \
    +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
    +  }                                                    \
    +  else if( c<0x10000 ){                                \
    +    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \
    +    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
    +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
    +  }else{                                               \
    +    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \
    +    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \
    +    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
    +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
    +  }                                                    \
    +}
    +
    +#define WRITE_UTF16LE(zOut, c) {                                    \
    +  if( c<=0xFFFF ){                                                  \
    +    *zOut++ = (u8)(c&0x00FF);                                       \
    +    *zOut++ = (u8)((c>>8)&0x00FF);                                  \
    +  }else{                                                            \
    +    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \
    +    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \
    +    *zOut++ = (u8)(c&0x00FF);                                       \
    +    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \
    +  }                                                                 \
    +}
    +
    +#define WRITE_UTF16BE(zOut, c) {                                    \
    +  if( c<=0xFFFF ){                                                  \
    +    *zOut++ = (u8)((c>>8)&0x00FF);                                  \
    +    *zOut++ = (u8)(c&0x00FF);                                       \
    +  }else{                                                            \
    +    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \
    +    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \
    +    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \
    +    *zOut++ = (u8)(c&0x00FF);                                       \
    +  }                                                                 \
    +}
    +
    +#define READ_UTF16LE(zIn, TERM, c){                                   \
    +  c = (*zIn++);                                                       \
    +  c += ((*zIn++)<<8);                                                 \
    +  if( c>=0xD800 && c<0xE000 && TERM ){                                \
    +    int c2 = (*zIn++);                                                \
    +    c2 += ((*zIn++)<<8);                                              \
    +    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \
    +  }                                                                   \
    +}
    +
    +#define READ_UTF16BE(zIn, TERM, c){                                   \
    +  c = ((*zIn++)<<8);                                                  \
    +  c += (*zIn++);                                                      \
    +  if( c>=0xD800 && c<0xE000 && TERM ){                                \
    +    int c2 = ((*zIn++)<<8);                                           \
    +    c2 += (*zIn++);                                                   \
    +    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \
    +  }                                                                   \
    +}
    +
    +/*
    +** Translate a single UTF-8 character.  Return the unicode value.
    +**
    +** During translation, assume that the byte that zTerm points
    +** is a 0x00.
    +**
    +** Write a pointer to the next unread byte back into *pzNext.
    +**
    +** Notes On Invalid UTF-8:
    +**
    +**  *  This routine never allows a 7-bit character (0x00 through 0x7f) to
    +**     be encoded as a multi-byte character.  Any multi-byte character that
    +**     attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd.
    +**
    +**  *  This routine never allows a UTF16 surrogate value to be encoded.
    +**     If a multi-byte character attempts to encode a value between
    +**     0xd800 and 0xe000 then it is rendered as 0xfffd.
    +**
    +**  *  Bytes in the range of 0x80 through 0xbf which occur as the first
    +**     byte of a character are interpreted as single-byte characters
    +**     and rendered as themselves even though they are technically
    +**     invalid characters.
    +**
    +**  *  This routine accepts an infinite number of different UTF8 encodings
    +**     for unicode values 0x80 and greater.  It do not change over-length
    +**     encodings to 0xfffd as some systems recommend.
    +*/
    +#define READ_UTF8(zIn, zTerm, c)                           \
    +  c = *(zIn++);                                            \
    +  if( c>=0xc0 ){                                           \
    +    c = sqlite3Utf8Trans1[c-0xc0];                         \
    +    while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){            \
    +      c = (c<<6) + (0x3f & *(zIn++));                      \
    +    }                                                      \
    +    if( c<0x80                                             \
    +        || (c&0xFFFFF800)==0xD800                          \
    +        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \
    +  }
    +SQLITE_PRIVATE int sqlite3Utf8Read(
    +  const unsigned char *zIn,       /* First byte of UTF-8 character */
    +  const unsigned char **pzNext    /* Write first byte past UTF-8 char here */
    +){
    +  int c;
    +
    +  /* Same as READ_UTF8() above but without the zTerm parameter.
    +  ** For this routine, we assume the UTF8 string is always zero-terminated.
    +  */
    +  c = *(zIn++);
    +  if( c>=0xc0 ){
    +    c = sqlite3Utf8Trans1[c-0xc0];
    +    while( (*zIn & 0xc0)==0x80 ){
    +      c = (c<<6) + (0x3f & *(zIn++));
    +    }
    +    if( c<0x80
    +        || (c&0xFFFFF800)==0xD800
    +        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }
    +  }
    +  *pzNext = zIn;
    +  return c;
    +}
    +
    +
    +
    +
    +/*
    +** If the TRANSLATE_TRACE macro is defined, the value of each Mem is
    +** printed on stderr on the way into and out of sqlite3VdbeMemTranslate().
    +*/ 
    +/* #define TRANSLATE_TRACE 1 */
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** This routine transforms the internal text encoding used by pMem to
    +** desiredEnc. It is an error if the string is already of the desired
    +** encoding, or if *pMem does not contain a string value.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){
    +  int len;                    /* Maximum length of output string in bytes */
    +  unsigned char *zOut;                  /* Output buffer */
    +  unsigned char *zIn;                   /* Input iterator */
    +  unsigned char *zTerm;                 /* End of input */
    +  unsigned char *z;                     /* Output iterator */
    +  unsigned int c;
    +
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( pMem->flags&MEM_Str );
    +  assert( pMem->enc!=desiredEnc );
    +  assert( pMem->enc!=0 );
    +  assert( pMem->n>=0 );
    +
    +#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)
    +  {
    +    char zBuf[100];
    +    sqlite3VdbeMemPrettyPrint(pMem, zBuf);
    +    fprintf(stderr, "INPUT:  %s\n", zBuf);
    +  }
    +#endif
    +
    +  /* If the translation is between UTF-16 little and big endian, then 
    +  ** all that is required is to swap the byte order. This case is handled
    +  ** differently from the others.
    +  */
    +  if( pMem->enc!=SQLITE_UTF8 && desiredEnc!=SQLITE_UTF8 ){
    +    u8 temp;
    +    int rc;
    +    rc = sqlite3VdbeMemMakeWriteable(pMem);
    +    if( rc!=SQLITE_OK ){
    +      assert( rc==SQLITE_NOMEM );
    +      return SQLITE_NOMEM;
    +    }
    +    zIn = (u8*)pMem->z;
    +    zTerm = &zIn[pMem->n&~1];
    +    while( zIn<zTerm ){
    +      temp = *zIn;
    +      *zIn = *(zIn+1);
    +      zIn++;
    +      *zIn++ = temp;
    +    }
    +    pMem->enc = desiredEnc;
    +    goto translate_out;
    +  }
    +
    +  /* Set len to the maximum number of bytes required in the output buffer. */
    +  if( desiredEnc==SQLITE_UTF8 ){
    +    /* When converting from UTF-16, the maximum growth results from
    +    ** translating a 2-byte character to a 4-byte UTF-8 character.
    +    ** A single byte is required for the output string
    +    ** nul-terminator.
    +    */
    +    pMem->n &= ~1;
    +    len = pMem->n * 2 + 1;
    +  }else{
    +    /* When converting from UTF-8 to UTF-16 the maximum growth is caused
    +    ** when a 1-byte UTF-8 character is translated into a 2-byte UTF-16
    +    ** character. Two bytes are required in the output buffer for the
    +    ** nul-terminator.
    +    */
    +    len = pMem->n * 2 + 2;
    +  }
    +
    +  /* Set zIn to point at the start of the input buffer and zTerm to point 1
    +  ** byte past the end.
    +  **
    +  ** Variable zOut is set to point at the output buffer, space obtained
    +  ** from sqlite3_malloc().
    +  */
    +  zIn = (u8*)pMem->z;
    +  zTerm = &zIn[pMem->n];
    +  zOut = sqlite3DbMallocRaw(pMem->db, len);
    +  if( !zOut ){
    +    return SQLITE_NOMEM;
    +  }
    +  z = zOut;
    +
    +  if( pMem->enc==SQLITE_UTF8 ){
    +    if( desiredEnc==SQLITE_UTF16LE ){
    +      /* UTF-8 -> UTF-16 Little-endian */
    +      while( zIn<zTerm ){
    +        /* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */
    +        READ_UTF8(zIn, zTerm, c);
    +        WRITE_UTF16LE(z, c);
    +      }
    +    }else{
    +      assert( desiredEnc==SQLITE_UTF16BE );
    +      /* UTF-8 -> UTF-16 Big-endian */
    +      while( zIn<zTerm ){
    +        /* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */
    +        READ_UTF8(zIn, zTerm, c);
    +        WRITE_UTF16BE(z, c);
    +      }
    +    }
    +    pMem->n = (int)(z - zOut);
    +    *z++ = 0;
    +  }else{
    +    assert( desiredEnc==SQLITE_UTF8 );
    +    if( pMem->enc==SQLITE_UTF16LE ){
    +      /* UTF-16 Little-endian -> UTF-8 */
    +      while( zIn<zTerm ){
    +        READ_UTF16LE(zIn, zIn<zTerm, c); 
    +        WRITE_UTF8(z, c);
    +      }
    +    }else{
    +      /* UTF-16 Big-endian -> UTF-8 */
    +      while( zIn<zTerm ){
    +        READ_UTF16BE(zIn, zIn<zTerm, c); 
    +        WRITE_UTF8(z, c);
    +      }
    +    }
    +    pMem->n = (int)(z - zOut);
    +  }
    +  *z = 0;
    +  assert( (pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len );
    +
    +  sqlite3VdbeMemRelease(pMem);
    +  pMem->flags &= ~(MEM_Static|MEM_Dyn|MEM_Ephem);
    +  pMem->enc = desiredEnc;
    +  pMem->flags |= (MEM_Term|MEM_Dyn);
    +  pMem->z = (char*)zOut;
    +  pMem->zMalloc = pMem->z;
    +
    +translate_out:
    +#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)
    +  {
    +    char zBuf[100];
    +    sqlite3VdbeMemPrettyPrint(pMem, zBuf);
    +    fprintf(stderr, "OUTPUT: %s\n", zBuf);
    +  }
    +#endif
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This routine checks for a byte-order mark at the beginning of the 
    +** UTF-16 string stored in *pMem. If one is present, it is removed and
    +** the encoding of the Mem adjusted. This routine does not do any
    +** byte-swapping, it just sets Mem.enc appropriately.
    +**
    +** The allocation (static, dynamic etc.) and encoding of the Mem may be
    +** changed by this function.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem){
    +  int rc = SQLITE_OK;
    +  u8 bom = 0;
    +
    +  assert( pMem->n>=0 );
    +  if( pMem->n>1 ){
    +    u8 b1 = *(u8 *)pMem->z;
    +    u8 b2 = *(((u8 *)pMem->z) + 1);
    +    if( b1==0xFE && b2==0xFF ){
    +      bom = SQLITE_UTF16BE;
    +    }
    +    if( b1==0xFF && b2==0xFE ){
    +      bom = SQLITE_UTF16LE;
    +    }
    +  }
    +  
    +  if( bom ){
    +    rc = sqlite3VdbeMemMakeWriteable(pMem);
    +    if( rc==SQLITE_OK ){
    +      pMem->n -= 2;
    +      memmove(pMem->z, &pMem->z[2], pMem->n);
    +      pMem->z[pMem->n] = '\0';
    +      pMem->z[pMem->n+1] = '\0';
    +      pMem->flags |= MEM_Term;
    +      pMem->enc = bom;
    +    }
    +  }
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
    +** return the number of unicode characters in pZ up to (but not including)
    +** the first 0x00 byte. If nByte is not less than zero, return the
    +** number of unicode characters in the first nByte of pZ (or up to 
    +** the first 0x00, whichever comes first).
    +*/
    +SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
    +  int r = 0;
    +  const u8 *z = (const u8*)zIn;
    +  const u8 *zTerm;
    +  if( nByte>=0 ){
    +    zTerm = &z[nByte];
    +  }else{
    +    zTerm = (const u8*)(-1);
    +  }
    +  assert( z<=zTerm );
    +  while( *z!=0 && z<zTerm ){
    +    SQLITE_SKIP_UTF8(z);
    +    r++;
    +  }
    +  return r;
    +}
    +
    +/* This test function is not currently used by the automated test-suite. 
    +** Hence it is only available in debug builds.
    +*/
    +#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
    +/*
    +** Translate UTF-8 to UTF-8.
    +**
    +** This has the effect of making sure that the string is well-formed
    +** UTF-8.  Miscoded characters are removed.
    +**
    +** The translation is done in-place (since it is impossible for the
    +** correct UTF-8 encoding to be longer than a malformed encoding).
    +*/
    +SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char *zIn){
    +  unsigned char *zOut = zIn;
    +  unsigned char *zStart = zIn;
    +  u32 c;
    +
    +  while( zIn[0] ){
    +    c = sqlite3Utf8Read(zIn, (const u8**)&zIn);
    +    if( c!=0xfffd ){
    +      WRITE_UTF8(zOut, c);
    +    }
    +  }
    +  *zOut = 0;
    +  return (int)(zOut - zStart);
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Convert a UTF-16 string in the native encoding into a UTF-8 string.
    +** Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must
    +** be freed by the calling function.
    +**
    +** NULL is returned if there is an allocation error.
    +*/
    +SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte){
    +  Mem m;
    +  memset(&m, 0, sizeof(m));
    +  m.db = db;
    +  sqlite3VdbeMemSetStr(&m, z, nByte, SQLITE_UTF16NATIVE, SQLITE_STATIC);
    +  sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8);
    +  if( db->mallocFailed ){
    +    sqlite3VdbeMemRelease(&m);
    +    m.z = 0;
    +  }
    +  assert( (m.flags & MEM_Term)!=0 || db->mallocFailed );
    +  assert( (m.flags & MEM_Str)!=0 || db->mallocFailed );
    +  return (m.flags & MEM_Dyn)!=0 ? m.z : sqlite3DbStrDup(db, m.z);
    +}
    +
    +/*
    +** Convert a UTF-8 string to the UTF-16 encoding specified by parameter
    +** enc. A pointer to the new string is returned, and the value of *pnOut
    +** is set to the length of the returned string in bytes. The call should
    +** arrange to call sqlite3DbFree() on the returned pointer when it is
    +** no longer required.
    +** 
    +** If a malloc failure occurs, NULL is returned and the db.mallocFailed
    +** flag set.
    +*/
    +#ifdef SQLITE_ENABLE_STAT2
    +SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
    +  Mem m;
    +  memset(&m, 0, sizeof(m));
    +  m.db = db;
    +  sqlite3VdbeMemSetStr(&m, z, n, SQLITE_UTF8, SQLITE_STATIC);
    +  if( sqlite3VdbeMemTranslate(&m, enc) ){
    +    assert( db->mallocFailed );
    +    return 0;
    +  }
    +  assert( m.z==m.zMalloc );
    +  *pnOut = m.n;
    +  return m.z;
    +}
    +#endif
    +
    +/*
    +** zIn is a UTF-16 encoded unicode string at least nChar characters long.
    +** Return the number of bytes in the first nChar unicode characters
    +** in pZ.  nChar must be non-negative.
    +*/
    +SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){
    +  int c;
    +  unsigned char const *z = zIn;
    +  int n = 0;
    +  
    +  if( SQLITE_UTF16NATIVE==SQLITE_UTF16BE ){
    +    while( n<nChar ){
    +      READ_UTF16BE(z, 1, c);
    +      n++;
    +    }
    +  }else{
    +    while( n<nChar ){
    +      READ_UTF16LE(z, 1, c);
    +      n++;
    +    }
    +  }
    +  return (int)(z-(unsigned char const *)zIn);
    +}
    +
    +#if defined(SQLITE_TEST)
    +/*
    +** This routine is called from the TCL test function "translate_selftest".
    +** It checks that the primitives for serializing and deserializing
    +** characters in each encoding are inverses of each other.
    +*/
    +SQLITE_PRIVATE void sqlite3UtfSelfTest(void){
    +  unsigned int i, t;
    +  unsigned char zBuf[20];
    +  unsigned char *z;
    +  int n;
    +  unsigned int c;
    +
    +  for(i=0; i<0x00110000; i++){
    +    z = zBuf;
    +    WRITE_UTF8(z, i);
    +    n = (int)(z-zBuf);
    +    assert( n>0 && n<=4 );
    +    z[0] = 0;
    +    z = zBuf;
    +    c = sqlite3Utf8Read(z, (const u8**)&z);
    +    t = i;
    +    if( i>=0xD800 && i<=0xDFFF ) t = 0xFFFD;
    +    if( (i&0xFFFFFFFE)==0xFFFE ) t = 0xFFFD;
    +    assert( c==t );
    +    assert( (z-zBuf)==n );
    +  }
    +  for(i=0; i<0x00110000; i++){
    +    if( i>=0xD800 && i<0xE000 ) continue;
    +    z = zBuf;
    +    WRITE_UTF16LE(z, i);
    +    n = (int)(z-zBuf);
    +    assert( n>0 && n<=4 );
    +    z[0] = 0;
    +    z = zBuf;
    +    READ_UTF16LE(z, 1, c);
    +    assert( c==i );
    +    assert( (z-zBuf)==n );
    +  }
    +  for(i=0; i<0x00110000; i++){
    +    if( i>=0xD800 && i<0xE000 ) continue;
    +    z = zBuf;
    +    WRITE_UTF16BE(z, i);
    +    n = (int)(z-zBuf);
    +    assert( n>0 && n<=4 );
    +    z[0] = 0;
    +    z = zBuf;
    +    READ_UTF16BE(z, 1, c);
    +    assert( c==i );
    +    assert( (z-zBuf)==n );
    +  }
    +}
    +#endif /* SQLITE_TEST */
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/************** End of utf.c *************************************************/
    +/************** Begin file util.c ********************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Utility functions used throughout sqlite.
    +**
    +** This file contains functions for allocating memory, comparing
    +** strings, and stuff like that.
    +**
    +*/
    +#ifdef SQLITE_HAVE_ISNAN
    +# include <math.h>
    +#endif
    +
    +/*
    +** Routine needed to support the testcase() macro.
    +*/
    +#ifdef SQLITE_COVERAGE_TEST
    +SQLITE_PRIVATE void sqlite3Coverage(int x){
    +  static int dummy = 0;
    +  dummy += x;
    +}
    +#endif
    +
    +/*
    +** Return true if the floating point value is Not a Number (NaN).
    +**
    +** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
    +** Otherwise, we have our own implementation that works on most systems.
    +*/
    +SQLITE_PRIVATE int sqlite3IsNaN(double x){
    +  int rc;   /* The value return */
    +#if !defined(SQLITE_HAVE_ISNAN)
    +  /*
    +  ** Systems that support the isnan() library function should probably
    +  ** make use of it by compiling with -DSQLITE_HAVE_ISNAN.  But we have
    +  ** found that many systems do not have a working isnan() function so
    +  ** this implementation is provided as an alternative.
    +  **
    +  ** This NaN test sometimes fails if compiled on GCC with -ffast-math.
    +  ** On the other hand, the use of -ffast-math comes with the following
    +  ** warning:
    +  **
    +  **      This option [-ffast-math] should never be turned on by any
    +  **      -O option since it can result in incorrect output for programs
    +  **      which depend on an exact implementation of IEEE or ISO 
    +  **      rules/specifications for math functions.
    +  **
    +  ** Under MSVC, this NaN test may fail if compiled with a floating-
    +  ** point precision mode other than /fp:precise.  From the MSDN 
    +  ** documentation:
    +  **
    +  **      The compiler [with /fp:precise] will properly handle comparisons 
    +  **      involving NaN. For example, x != x evaluates to true if x is NaN 
    +  **      ...
    +  */
    +#ifdef __FAST_MATH__
    +# error SQLite will not work correctly with the -ffast-math option of GCC.
    +#endif
    +  volatile double y = x;
    +  volatile double z = y;
    +  rc = (y!=z);
    +#else  /* if defined(SQLITE_HAVE_ISNAN) */
    +  rc = isnan(x);
    +#endif /* SQLITE_HAVE_ISNAN */
    +  testcase( rc );
    +  return rc;
    +}
    +
    +/*
    +** Compute a string length that is limited to what can be stored in
    +** lower 30 bits of a 32-bit signed integer.
    +**
    +** The value returned will never be negative.  Nor will it ever be greater
    +** than the actual length of the string.  For very long strings (greater
    +** than 1GiB) the value returned might be less than the true string length.
    +*/
    +SQLITE_PRIVATE int sqlite3Strlen30(const char *z){
    +  const char *z2 = z;
    +  if( z==0 ) return 0;
    +  while( *z2 ){ z2++; }
    +  return 0x3fffffff & (int)(z2 - z);
    +}
    +
    +/*
    +** Set the most recent error code and error string for the sqlite
    +** handle "db". The error code is set to "err_code".
    +**
    +** If it is not NULL, string zFormat specifies the format of the
    +** error string in the style of the printf functions: The following
    +** format characters are allowed:
    +**
    +**      %s      Insert a string
    +**      %z      A string that should be freed after use
    +**      %d      Insert an integer
    +**      %T      Insert a token
    +**      %S      Insert the first element of a SrcList
    +**
    +** zFormat and any string tokens that follow it are assumed to be
    +** encoded in UTF-8.
    +**
    +** To clear the most recent error for sqlite handle "db", sqlite3Error
    +** should be called with err_code set to SQLITE_OK and zFormat set
    +** to NULL.
    +*/
    +SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
    +  if( db && (db->pErr || (db->pErr = sqlite3ValueNew(db))!=0) ){
    +    db->errCode = err_code;
    +    if( zFormat ){
    +      char *z;
    +      va_list ap;
    +      va_start(ap, zFormat);
    +      z = sqlite3VMPrintf(db, zFormat, ap);
    +      va_end(ap);
    +      sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);
    +    }else{
    +      sqlite3ValueSetStr(db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
    +    }
    +  }
    +}
    +
    +/*
    +** Add an error message to pParse->zErrMsg and increment pParse->nErr.
    +** The following formatting characters are allowed:
    +**
    +**      %s      Insert a string
    +**      %z      A string that should be freed after use
    +**      %d      Insert an integer
    +**      %T      Insert a token
    +**      %S      Insert the first element of a SrcList
    +**
    +** This function should be used to report any error that occurs whilst
    +** compiling an SQL statement (i.e. within sqlite3_prepare()). The
    +** last thing the sqlite3_prepare() function does is copy the error
    +** stored by this function into the database handle using sqlite3Error().
    +** Function sqlite3Error() should be used during statement execution
    +** (sqlite3_step() etc.).
    +*/
    +SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
    +  va_list ap;
    +  sqlite3 *db = pParse->db;
    +  pParse->nErr++;
    +  sqlite3DbFree(db, pParse->zErrMsg);
    +  va_start(ap, zFormat);
    +  pParse->zErrMsg = sqlite3VMPrintf(db, zFormat, ap);
    +  va_end(ap);
    +  pParse->rc = SQLITE_ERROR;
    +}
    +
    +/*
    +** Clear the error message in pParse, if any
    +*/
    +SQLITE_PRIVATE void sqlite3ErrorClear(Parse *pParse){
    +  sqlite3DbFree(pParse->db, pParse->zErrMsg);
    +  pParse->zErrMsg = 0;
    +  pParse->nErr = 0;
    +}
    +
    +/*
    +** Convert an SQL-style quoted string into a normal string by removing
    +** the quote characters.  The conversion is done in-place.  If the
    +** input does not begin with a quote character, then this routine
    +** is a no-op.
    +**
    +** The input string must be zero-terminated.  A new zero-terminator
    +** is added to the dequoted string.
    +**
    +** The return value is -1 if no dequoting occurs or the length of the
    +** dequoted string, exclusive of the zero terminator, if dequoting does
    +** occur.
    +**
    +** 2002-Feb-14: This routine is extended to remove MS-Access style
    +** brackets from around identifers.  For example:  "[a-b-c]" becomes
    +** "a-b-c".
    +*/
    +SQLITE_PRIVATE int sqlite3Dequote(char *z){
    +  char quote;
    +  int i, j;
    +  if( z==0 ) return -1;
    +  quote = z[0];
    +  switch( quote ){
    +    case '\'':  break;
    +    case '"':   break;
    +    case '`':   break;                /* For MySQL compatibility */
    +    case '[':   quote = ']';  break;  /* For MS SqlServer compatibility */
    +    default:    return -1;
    +  }
    +  for(i=1, j=0; ALWAYS(z[i]); i++){
    +    if( z[i]==quote ){
    +      if( z[i+1]==quote ){
    +        z[j++] = quote;
    +        i++;
    +      }else{
    +        break;
    +      }
    +    }else{
    +      z[j++] = z[i];
    +    }
    +  }
    +  z[j] = 0;
    +  return j;
    +}
    +
    +/* Convenient short-hand */
    +#define UpperToLower sqlite3UpperToLower
    +
    +/*
    +** Some systems have stricmp().  Others have strcasecmp().  Because
    +** there is no consistency, we will define our own.
    +*/
    +SQLITE_PRIVATE int sqlite3StrICmp(const char *zLeft, const char *zRight){
    +  register unsigned char *a, *b;
    +  a = (unsigned char *)zLeft;
    +  b = (unsigned char *)zRight;
    +  while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
    +  return UpperToLower[*a] - UpperToLower[*b];
    +}
    +SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
    +  register unsigned char *a, *b;
    +  a = (unsigned char *)zLeft;
    +  b = (unsigned char *)zRight;
    +  while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
    +  return N<0 ? 0 : UpperToLower[*a] - UpperToLower[*b];
    +}
    +
    +/*
    +** Return TRUE if z is a pure numeric string.  Return FALSE and leave
    +** *realnum unchanged if the string contains any character which is not
    +** part of a number.
    +**
    +** If the string is pure numeric, set *realnum to TRUE if the string
    +** contains the '.' character or an "E+000" style exponentiation suffix.
    +** Otherwise set *realnum to FALSE.  Note that just becaue *realnum is
    +** false does not mean that the number can be successfully converted into
    +** an integer - it might be too big.
    +**
    +** An empty string is considered non-numeric.
    +*/
    +SQLITE_PRIVATE int sqlite3IsNumber(const char *z, int *realnum, u8 enc){
    +  int incr = (enc==SQLITE_UTF8?1:2);
    +  if( enc==SQLITE_UTF16BE ) z++;
    +  if( *z=='-' || *z=='+' ) z += incr;
    +  if( !sqlite3Isdigit(*z) ){
    +    return 0;
    +  }
    +  z += incr;
    +  *realnum = 0;
    +  while( sqlite3Isdigit(*z) ){ z += incr; }
    +  if( *z=='.' ){
    +    z += incr;
    +    if( !sqlite3Isdigit(*z) ) return 0;
    +    while( sqlite3Isdigit(*z) ){ z += incr; }
    +    *realnum = 1;
    +  }
    +  if( *z=='e' || *z=='E' ){
    +    z += incr;
    +    if( *z=='+' || *z=='-' ) z += incr;
    +    if( !sqlite3Isdigit(*z) ) return 0;
    +    while( sqlite3Isdigit(*z) ){ z += incr; }
    +    *realnum = 1;
    +  }
    +  return *z==0;
    +}
    +
    +/*
    +** The string z[] is an ASCII representation of a real number.
    +** Convert this string to a double.
    +**
    +** This routine assumes that z[] really is a valid number.  If it
    +** is not, the result is undefined.
    +**
    +** This routine is used instead of the library atof() function because
    +** the library atof() might want to use "," as the decimal point instead
    +** of "." depending on how locale is set.  But that would cause problems
    +** for SQL.  So this routine always uses "." regardless of locale.
    +*/
    +SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult){
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  const char *zBegin = z;
    +  /* sign * significand * (10 ^ (esign * exponent)) */
    +  int sign = 1;   /* sign of significand */
    +  i64 s = 0;      /* significand */
    +  int d = 0;      /* adjust exponent for shifting decimal point */
    +  int esign = 1;  /* sign of exponent */
    +  int e = 0;      /* exponent */
    +  double result;
    +  int nDigits = 0;
    +
    +  /* skip leading spaces */
    +  while( sqlite3Isspace(*z) ) z++;
    +  /* get sign of significand */
    +  if( *z=='-' ){
    +    sign = -1;
    +    z++;
    +  }else if( *z=='+' ){
    +    z++;
    +  }
    +  /* skip leading zeroes */
    +  while( z[0]=='0' ) z++, nDigits++;
    +
    +  /* copy max significant digits to significand */
    +  while( sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
    +    s = s*10 + (*z - '0');
    +    z++, nDigits++;
    +  }
    +  /* skip non-significant significand digits
    +  ** (increase exponent by d to shift decimal left) */
    +  while( sqlite3Isdigit(*z) ) z++, nDigits++, d++;
    +
    +  /* if decimal point is present */
    +  if( *z=='.' ){
    +    z++;
    +    /* copy digits from after decimal to significand
    +    ** (decrease exponent by d to shift decimal right) */
    +    while( sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
    +      s = s*10 + (*z - '0');
    +      z++, nDigits++, d--;
    +    }
    +    /* skip non-significant digits */
    +    while( sqlite3Isdigit(*z) ) z++, nDigits++;
    +  }
    +
    +  /* if exponent is present */
    +  if( *z=='e' || *z=='E' ){
    +    z++;
    +    /* get sign of exponent */
    +    if( *z=='-' ){
    +      esign = -1;
    +      z++;
    +    }else if( *z=='+' ){
    +      z++;
    +    }
    +    /* copy digits to exponent */
    +    while( sqlite3Isdigit(*z) ){
    +      e = e*10 + (*z - '0');
    +      z++;
    +    }
    +  }
    +
    +  /* adjust exponent by d, and update sign */
    +  e = (e*esign) + d;
    +  if( e<0 ) {
    +    esign = -1;
    +    e *= -1;
    +  } else {
    +    esign = 1;
    +  }
    +
    +  /* if 0 significand */
    +  if( !s ) {
    +    /* In the IEEE 754 standard, zero is signed.
    +    ** Add the sign if we've seen at least one digit */
    +    result = (sign<0 && nDigits) ? -(double)0 : (double)0;
    +  } else {
    +    /* attempt to reduce exponent */
    +    if( esign>0 ){
    +      while( s<(LARGEST_INT64/10) && e>0 ) e--,s*=10;
    +    }else{
    +      while( !(s%10) && e>0 ) e--,s/=10;
    +    }
    +
    +    /* adjust the sign of significand */
    +    s = sign<0 ? -s : s;
    +
    +    /* if exponent, scale significand as appropriate
    +    ** and store in result. */
    +    if( e ){
    +      double scale = 1.0;
    +      /* attempt to handle extremely small/large numbers better */
    +      if( e>307 && e<342 ){
    +        while( e%308 ) { scale *= 1.0e+1; e -= 1; }
    +        if( esign<0 ){
    +          result = s / scale;
    +          result /= 1.0e+308;
    +        }else{
    +          result = s * scale;
    +          result *= 1.0e+308;
    +        }
    +      }else{
    +        /* 1.0e+22 is the largest power of 10 than can be 
    +        ** represented exactly. */
    +        while( e%22 ) { scale *= 1.0e+1; e -= 1; }
    +        while( e>0 ) { scale *= 1.0e+22; e -= 22; }
    +        if( esign<0 ){
    +          result = s / scale;
    +        }else{
    +          result = s * scale;
    +        }
    +      }
    +    } else {
    +      result = (double)s;
    +    }
    +  }
    +
    +  /* store the result */
    +  *pResult = result;
    +
    +  /* return number of characters used */
    +  return (int)(z - zBegin);
    +#else
    +  return sqlite3Atoi64(z, pResult);
    +#endif /* SQLITE_OMIT_FLOATING_POINT */
    +}
    +
    +/*
    +** Compare the 19-character string zNum against the text representation
    +** value 2^63:  9223372036854775808.  Return negative, zero, or positive
    +** if zNum is less than, equal to, or greater than the string.
    +**
    +** Unlike memcmp() this routine is guaranteed to return the difference
    +** in the values of the last digit if the only difference is in the
    +** last digit.  So, for example,
    +**
    +**      compare2pow63("9223372036854775800")
    +**
    +** will return -8.
    +*/
    +static int compare2pow63(const char *zNum){
    +  int c;
    +  c = memcmp(zNum,"922337203685477580",18)*10;
    +  if( c==0 ){
    +    c = zNum[18] - '8';
    +  }
    +  return c;
    +}
    +
    +
    +/*
    +** Return TRUE if zNum is a 64-bit signed integer and write
    +** the value of the integer into *pNum.  If zNum is not an integer
    +** or is an integer that is too large to be expressed with 64 bits,
    +** then return false.
    +**
    +** When this routine was originally written it dealt with only
    +** 32-bit numbers.  At that time, it was much faster than the
    +** atoi() library routine in RedHat 7.2.
    +*/
    +SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum){
    +  i64 v = 0;
    +  int neg;
    +  int i, c;
    +  const char *zStart;
    +  while( sqlite3Isspace(*zNum) ) zNum++;
    +  if( *zNum=='-' ){
    +    neg = 1;
    +    zNum++;
    +  }else if( *zNum=='+' ){
    +    neg = 0;
    +    zNum++;
    +  }else{
    +    neg = 0;
    +  }
    +  zStart = zNum;
    +  while( zNum[0]=='0' ){ zNum++; } /* Skip over leading zeros. Ticket #2454 */
    +  for(i=0; (c=zNum[i])>='0' && c<='9'; i++){
    +    v = v*10 + c - '0';
    +  }
    +  *pNum = neg ? -v : v;
    +  if( c!=0 || (i==0 && zStart==zNum) || i>19 ){
    +    /* zNum is empty or contains non-numeric text or is longer
    +    ** than 19 digits (thus guaranting that it is too large) */
    +    return 0;
    +  }else if( i<19 ){
    +    /* Less than 19 digits, so we know that it fits in 64 bits */
    +    return 1;
    +  }else{
    +    /* 19-digit numbers must be no larger than 9223372036854775807 if positive
    +    ** or 9223372036854775808 if negative.  Note that 9223372036854665808
    +    ** is 2^63. */
    +    return compare2pow63(zNum)<neg;
    +  }
    +}
    +
    +/*
    +** The string zNum represents an unsigned integer.  The zNum string
    +** consists of one or more digit characters and is terminated by
    +** a zero character.  Any stray characters in zNum result in undefined
    +** behavior.
    +**
    +** If the unsigned integer that zNum represents will fit in a
    +** 64-bit signed integer, return TRUE.  Otherwise return FALSE.
    +**
    +** If the negFlag parameter is true, that means that zNum really represents
    +** a negative number.  (The leading "-" is omitted from zNum.)  This
    +** parameter is needed to determine a boundary case.  A string
    +** of "9223373036854775808" returns false if negFlag is false or true
    +** if negFlag is true.
    +**
    +** Leading zeros are ignored.
    +*/
    +SQLITE_PRIVATE int sqlite3FitsIn64Bits(const char *zNum, int negFlag){
    +  int i;
    +  int neg = 0;
    +
    +  assert( zNum[0]>='0' && zNum[0]<='9' ); /* zNum is an unsigned number */
    +
    +  if( negFlag ) neg = 1-neg;
    +  while( *zNum=='0' ){
    +    zNum++;   /* Skip leading zeros.  Ticket #2454 */
    +  }
    +  for(i=0; zNum[i]; i++){ assert( zNum[i]>='0' && zNum[i]<='9' ); }
    +  if( i<19 ){
    +    /* Guaranteed to fit if less than 19 digits */
    +    return 1;
    +  }else if( i>19 ){
    +    /* Guaranteed to be too big if greater than 19 digits */
    +    return 0;
    +  }else{
    +    /* Compare against 2^63. */
    +    return compare2pow63(zNum)<neg;
    +  }
    +}
    +
    +/*
    +** If zNum represents an integer that will fit in 32-bits, then set
    +** *pValue to that integer and return true.  Otherwise return false.
    +**
    +** Any non-numeric characters that following zNum are ignored.
    +** This is different from sqlite3Atoi64() which requires the
    +** input number to be zero-terminated.
    +*/
    +SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){
    +  sqlite_int64 v = 0;
    +  int i, c;
    +  int neg = 0;
    +  if( zNum[0]=='-' ){
    +    neg = 1;
    +    zNum++;
    +  }else if( zNum[0]=='+' ){
    +    zNum++;
    +  }
    +  while( zNum[0]=='0' ) zNum++;
    +  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
    +    v = v*10 + c;
    +  }
    +
    +  /* The longest decimal representation of a 32 bit integer is 10 digits:
    +  **
    +  **             1234567890
    +  **     2^31 -> 2147483648
    +  */
    +  if( i>10 ){
    +    return 0;
    +  }
    +  if( v-neg>2147483647 ){
    +    return 0;
    +  }
    +  if( neg ){
    +    v = -v;
    +  }
    +  *pValue = (int)v;
    +  return 1;
    +}
    +
    +/*
    +** The variable-length integer encoding is as follows:
    +**
    +** KEY:
    +**         A = 0xxxxxxx    7 bits of data and one flag bit
    +**         B = 1xxxxxxx    7 bits of data and one flag bit
    +**         C = xxxxxxxx    8 bits of data
    +**
    +**  7 bits - A
    +** 14 bits - BA
    +** 21 bits - BBA
    +** 28 bits - BBBA
    +** 35 bits - BBBBA
    +** 42 bits - BBBBBA
    +** 49 bits - BBBBBBA
    +** 56 bits - BBBBBBBA
    +** 64 bits - BBBBBBBBC
    +*/
    +
    +/*
    +** Write a 64-bit variable-length integer to memory starting at p[0].
    +** The length of data write will be between 1 and 9 bytes.  The number
    +** of bytes written is returned.
    +**
    +** A variable-length integer consists of the lower 7 bits of each byte
    +** for all bytes that have the 8th bit set and one byte with the 8th
    +** bit clear.  Except, if we get to the 9th byte, it stores the full
    +** 8 bits and is the last byte.
    +*/
    +SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
    +  int i, j, n;
    +  u8 buf[10];
    +  if( v & (((u64)0xff000000)<<32) ){
    +    p[8] = (u8)v;
    +    v >>= 8;
    +    for(i=7; i>=0; i--){
    +      p[i] = (u8)((v & 0x7f) | 0x80);
    +      v >>= 7;
    +    }
    +    return 9;
    +  }    
    +  n = 0;
    +  do{
    +    buf[n++] = (u8)((v & 0x7f) | 0x80);
    +    v >>= 7;
    +  }while( v!=0 );
    +  buf[0] &= 0x7f;
    +  assert( n<=9 );
    +  for(i=0, j=n-1; j>=0; j--, i++){
    +    p[i] = buf[j];
    +  }
    +  return n;
    +}
    +
    +/*
    +** This routine is a faster version of sqlite3PutVarint() that only
    +** works for 32-bit positive integers and which is optimized for
    +** the common case of small integers.  A MACRO version, putVarint32,
    +** is provided which inlines the single-byte case.  All code should use
    +** the MACRO version as this function assumes the single-byte case has
    +** already been handled.
    +*/
    +SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char *p, u32 v){
    +#ifndef putVarint32
    +  if( (v & ~0x7f)==0 ){
    +    p[0] = v;
    +    return 1;
    +  }
    +#endif
    +  if( (v & ~0x3fff)==0 ){
    +    p[0] = (u8)((v>>7) | 0x80);
    +    p[1] = (u8)(v & 0x7f);
    +    return 2;
    +  }
    +  return sqlite3PutVarint(p, v);
    +}
    +
    +/*
    +** Read a 64-bit variable-length integer from memory starting at p[0].
    +** Return the number of bytes read.  The value is stored in *v.
    +*/
    +SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){
    +  u32 a,b,s;
    +
    +  a = *p;
    +  /* a: p0 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    *v = a;
    +    return 1;
    +  }
    +
    +  p++;
    +  b = *p;
    +  /* b: p1 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    a &= 0x7f;
    +    a = a<<7;
    +    a |= b;
    +    *v = a;
    +    return 2;
    +  }
    +
    +  p++;
    +  a = a<<14;
    +  a |= *p;
    +  /* a: p0<<14 | p2 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    a &= (0x7f<<14)|(0x7f);
    +    b &= 0x7f;
    +    b = b<<7;
    +    a |= b;
    +    *v = a;
    +    return 3;
    +  }
    +
    +  /* CSE1 from below */
    +  a &= (0x7f<<14)|(0x7f);
    +  p++;
    +  b = b<<14;
    +  b |= *p;
    +  /* b: p1<<14 | p3 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    b &= (0x7f<<14)|(0x7f);
    +    /* moved CSE1 up */
    +    /* a &= (0x7f<<14)|(0x7f); */
    +    a = a<<7;
    +    a |= b;
    +    *v = a;
    +    return 4;
    +  }
    +
    +  /* a: p0<<14 | p2 (masked) */
    +  /* b: p1<<14 | p3 (unmasked) */
    +  /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
    +  /* moved CSE1 up */
    +  /* a &= (0x7f<<14)|(0x7f); */
    +  b &= (0x7f<<14)|(0x7f);
    +  s = a;
    +  /* s: p0<<14 | p2 (masked) */
    +
    +  p++;
    +  a = a<<14;
    +  a |= *p;
    +  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    /* we can skip these cause they were (effectively) done above in calc'ing s */
    +    /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
    +    /* b &= (0x7f<<14)|(0x7f); */
    +    b = b<<7;
    +    a |= b;
    +    s = s>>18;
    +    *v = ((u64)s)<<32 | a;
    +    return 5;
    +  }
    +
    +  /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
    +  s = s<<7;
    +  s |= b;
    +  /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
    +
    +  p++;
    +  b = b<<14;
    +  b |= *p;
    +  /* b: p1<<28 | p3<<14 | p5 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    /* we can skip this cause it was (effectively) done above in calc'ing s */
    +    /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
    +    a &= (0x7f<<14)|(0x7f);
    +    a = a<<7;
    +    a |= b;
    +    s = s>>18;
    +    *v = ((u64)s)<<32 | a;
    +    return 6;
    +  }
    +
    +  p++;
    +  a = a<<14;
    +  a |= *p;
    +  /* a: p2<<28 | p4<<14 | p6 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    a &= (0x1f<<28)|(0x7f<<14)|(0x7f);
    +    b &= (0x7f<<14)|(0x7f);
    +    b = b<<7;
    +    a |= b;
    +    s = s>>11;
    +    *v = ((u64)s)<<32 | a;
    +    return 7;
    +  }
    +
    +  /* CSE2 from below */
    +  a &= (0x7f<<14)|(0x7f);
    +  p++;
    +  b = b<<14;
    +  b |= *p;
    +  /* b: p3<<28 | p5<<14 | p7 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    b &= (0x1f<<28)|(0x7f<<14)|(0x7f);
    +    /* moved CSE2 up */
    +    /* a &= (0x7f<<14)|(0x7f); */
    +    a = a<<7;
    +    a |= b;
    +    s = s>>4;
    +    *v = ((u64)s)<<32 | a;
    +    return 8;
    +  }
    +
    +  p++;
    +  a = a<<15;
    +  a |= *p;
    +  /* a: p4<<29 | p6<<15 | p8 (unmasked) */
    +
    +  /* moved CSE2 up */
    +  /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */
    +  b &= (0x7f<<14)|(0x7f);
    +  b = b<<8;
    +  a |= b;
    +
    +  s = s<<4;
    +  b = p[-4];
    +  b &= 0x7f;
    +  b = b>>3;
    +  s |= b;
    +
    +  *v = ((u64)s)<<32 | a;
    +
    +  return 9;
    +}
    +
    +/*
    +** Read a 32-bit variable-length integer from memory starting at p[0].
    +** Return the number of bytes read.  The value is stored in *v.
    +**
    +** If the varint stored in p[0] is larger than can fit in a 32-bit unsigned
    +** integer, then set *v to 0xffffffff.
    +**
    +** A MACRO version, getVarint32, is provided which inlines the 
    +** single-byte case.  All code should use the MACRO version as 
    +** this function assumes the single-byte case has already been handled.
    +*/
    +SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
    +  u32 a,b;
    +
    +  /* The 1-byte case.  Overwhelmingly the most common.  Handled inline
    +  ** by the getVarin32() macro */
    +  a = *p;
    +  /* a: p0 (unmasked) */
    +#ifndef getVarint32
    +  if (!(a&0x80))
    +  {
    +    /* Values between 0 and 127 */
    +    *v = a;
    +    return 1;
    +  }
    +#endif
    +
    +  /* The 2-byte case */
    +  p++;
    +  b = *p;
    +  /* b: p1 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    /* Values between 128 and 16383 */
    +    a &= 0x7f;
    +    a = a<<7;
    +    *v = a | b;
    +    return 2;
    +  }
    +
    +  /* The 3-byte case */
    +  p++;
    +  a = a<<14;
    +  a |= *p;
    +  /* a: p0<<14 | p2 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    /* Values between 16384 and 2097151 */
    +    a &= (0x7f<<14)|(0x7f);
    +    b &= 0x7f;
    +    b = b<<7;
    +    *v = a | b;
    +    return 3;
    +  }
    +
    +  /* A 32-bit varint is used to store size information in btrees.
    +  ** Objects are rarely larger than 2MiB limit of a 3-byte varint.
    +  ** A 3-byte varint is sufficient, for example, to record the size
    +  ** of a 1048569-byte BLOB or string.
    +  **
    +  ** We only unroll the first 1-, 2-, and 3- byte cases.  The very
    +  ** rare larger cases can be handled by the slower 64-bit varint
    +  ** routine.
    +  */
    +#if 1
    +  {
    +    u64 v64;
    +    u8 n;
    +
    +    p -= 2;
    +    n = sqlite3GetVarint(p, &v64);
    +    assert( n>3 && n<=9 );
    +    if( (v64 & SQLITE_MAX_U32)!=v64 ){
    +      *v = 0xffffffff;
    +    }else{
    +      *v = (u32)v64;
    +    }
    +    return n;
    +  }
    +
    +#else
    +  /* For following code (kept for historical record only) shows an
    +  ** unrolling for the 3- and 4-byte varint cases.  This code is
    +  ** slightly faster, but it is also larger and much harder to test.
    +  */
    +  p++;
    +  b = b<<14;
    +  b |= *p;
    +  /* b: p1<<14 | p3 (unmasked) */
    +  if (!(b&0x80))
    +  {
    +    /* Values between 2097152 and 268435455 */
    +    b &= (0x7f<<14)|(0x7f);
    +    a &= (0x7f<<14)|(0x7f);
    +    a = a<<7;
    +    *v = a | b;
    +    return 4;
    +  }
    +
    +  p++;
    +  a = a<<14;
    +  a |= *p;
    +  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
    +  if (!(a&0x80))
    +  {
    +    /* Walues  between 268435456 and 34359738367 */
    +    a &= (0x1f<<28)|(0x7f<<14)|(0x7f);
    +    b &= (0x1f<<28)|(0x7f<<14)|(0x7f);
    +    b = b<<7;
    +    *v = a | b;
    +    return 5;
    +  }
    +
    +  /* We can only reach this point when reading a corrupt database
    +  ** file.  In that case we are not in any hurry.  Use the (relatively
    +  ** slow) general-purpose sqlite3GetVarint() routine to extract the
    +  ** value. */
    +  {
    +    u64 v64;
    +    u8 n;
    +
    +    p -= 4;
    +    n = sqlite3GetVarint(p, &v64);
    +    assert( n>5 && n<=9 );
    +    *v = (u32)v64;
    +    return n;
    +  }
    +#endif
    +}
    +
    +/*
    +** Return the number of bytes that will be needed to store the given
    +** 64-bit integer.
    +*/
    +SQLITE_PRIVATE int sqlite3VarintLen(u64 v){
    +  int i = 0;
    +  do{
    +    i++;
    +    v >>= 7;
    +  }while( v!=0 && ALWAYS(i<9) );
    +  return i;
    +}
    +
    +
    +/*
    +** Read or write a four-byte big-endian integer value.
    +*/
    +SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
    +  return (p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];
    +}
    +SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
    +  p[0] = (u8)(v>>24);
    +  p[1] = (u8)(v>>16);
    +  p[2] = (u8)(v>>8);
    +  p[3] = (u8)v;
    +}
    +
    +
    +
    +#if !defined(SQLITE_OMIT_BLOB_LITERAL) || defined(SQLITE_HAS_CODEC)
    +/*
    +** Translate a single byte of Hex into an integer.
    +** This routine only works if h really is a valid hexadecimal
    +** character:  0..9a..fA..F
    +*/
    +static u8 hexToInt(int h){
    +  assert( (h>='0' && h<='9') ||  (h>='a' && h<='f') ||  (h>='A' && h<='F') );
    +#ifdef SQLITE_ASCII
    +  h += 9*(1&(h>>6));
    +#endif
    +#ifdef SQLITE_EBCDIC
    +  h += 9*(1&~(h>>4));
    +#endif
    +  return (u8)(h & 0xf);
    +}
    +#endif /* !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */
    +
    +#if !defined(SQLITE_OMIT_BLOB_LITERAL) || defined(SQLITE_HAS_CODEC)
    +/*
    +** Convert a BLOB literal of the form "x'hhhhhh'" into its binary
    +** value.  Return a pointer to its binary value.  Space to hold the
    +** binary value has been obtained from malloc and must be freed by
    +** the calling routine.
    +*/
    +SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
    +  char *zBlob;
    +  int i;
    +
    +  zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
    +  n--;
    +  if( zBlob ){
    +    for(i=0; i<n; i+=2){
    +      zBlob[i/2] = (hexToInt(z[i])<<4) | hexToInt(z[i+1]);
    +    }
    +    zBlob[i/2] = 0;
    +  }
    +  return zBlob;
    +}
    +#endif /* !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */
    +
    +
    +/*
    +** Change the sqlite.magic from SQLITE_MAGIC_OPEN to SQLITE_MAGIC_BUSY.
    +** Return an error (non-zero) if the magic was not SQLITE_MAGIC_OPEN
    +** when this routine is called.
    +**
    +** This routine is called when entering an SQLite API.  The SQLITE_MAGIC_OPEN
    +** value indicates that the database connection passed into the API is
    +** open and is not being used by another thread.  By changing the value
    +** to SQLITE_MAGIC_BUSY we indicate that the connection is in use.
    +** sqlite3SafetyOff() below will change the value back to SQLITE_MAGIC_OPEN
    +** when the API exits. 
    +**
    +** This routine is a attempt to detect if two threads use the
    +** same sqlite* pointer at the same time.  There is a race 
    +** condition so it is possible that the error is not detected.
    +** But usually the problem will be seen.  The result will be an
    +** error which can be used to debug the application that is
    +** using SQLite incorrectly.
    +**
    +** Ticket #202:  If db->magic is not a valid open value, take care not
    +** to modify the db structure at all.  It could be that db is a stale
    +** pointer.  In other words, it could be that there has been a prior
    +** call to sqlite3_close(db) and db has been deallocated.  And we do
    +** not want to write into deallocated memory.
    +*/
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3SafetyOn(sqlite3 *db){
    +  if( db->magic==SQLITE_MAGIC_OPEN ){
    +    db->magic = SQLITE_MAGIC_BUSY;
    +    assert( sqlite3_mutex_held(db->mutex) );
    +    return 0;
    +  }else if( db->magic==SQLITE_MAGIC_BUSY ){
    +    db->magic = SQLITE_MAGIC_ERROR;
    +    db->u1.isInterrupted = 1;
    +  }
    +  return 1;
    +}
    +#endif
    +
    +/*
    +** Change the magic from SQLITE_MAGIC_BUSY to SQLITE_MAGIC_OPEN.
    +** Return an error (non-zero) if the magic was not SQLITE_MAGIC_BUSY
    +** when this routine is called.
    +*/
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3SafetyOff(sqlite3 *db){
    +  if( db->magic==SQLITE_MAGIC_BUSY ){
    +    db->magic = SQLITE_MAGIC_OPEN;
    +    assert( sqlite3_mutex_held(db->mutex) );
    +    return 0;
    +  }else{
    +    db->magic = SQLITE_MAGIC_ERROR;
    +    db->u1.isInterrupted = 1;
    +    return 1;
    +  }
    +}
    +#endif
    +
    +/*
    +** Check to make sure we have a valid db pointer.  This test is not
    +** foolproof but it does provide some measure of protection against
    +** misuse of the interface such as passing in db pointers that are
    +** NULL or which have been previously closed.  If this routine returns
    +** 1 it means that the db pointer is valid and 0 if it should not be
    +** dereferenced for any reason.  The calling function should invoke
    +** SQLITE_MISUSE immediately.
    +**
    +** sqlite3SafetyCheckOk() requires that the db pointer be valid for
    +** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
    +** open properly and is not fit for general use but which can be
    +** used as an argument to sqlite3_errmsg() or sqlite3_close().
    +*/
    +SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
    +  u32 magic;
    +  if( db==0 ) return 0;
    +  magic = db->magic;
    +  if( magic!=SQLITE_MAGIC_OPEN 
    +#ifdef SQLITE_DEBUG
    +     && magic!=SQLITE_MAGIC_BUSY
    +#endif
    +  ){
    +    return 0;
    +  }else{
    +    return 1;
    +  }
    +}
    +SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
    +  u32 magic;
    +  magic = db->magic;
    +  if( magic!=SQLITE_MAGIC_SICK &&
    +      magic!=SQLITE_MAGIC_OPEN &&
    +      magic!=SQLITE_MAGIC_BUSY ) return 0;
    +  return 1;
    +}
    +
    +/************** End of util.c ************************************************/
    +/************** Begin file hash.c ********************************************/
    +/*
    +** 2001 September 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the implementation of generic hash-tables
    +** used in SQLite.
    +**
    +** $Id: hash.c,v 1.38 2009/05/09 23:29:12 drh Exp $
    +*/
    +
    +/* Turn bulk memory into a hash table object by initializing the
    +** fields of the Hash structure.
    +**
    +** "pNew" is a pointer to the hash table that is to be initialized.
    +*/
    +SQLITE_PRIVATE void sqlite3HashInit(Hash *pNew){
    +  assert( pNew!=0 );
    +  pNew->first = 0;
    +  pNew->count = 0;
    +  pNew->htsize = 0;
    +  pNew->ht = 0;
    +}
    +
    +/* Remove all entries from a hash table.  Reclaim all memory.
    +** Call this routine to delete a hash table or to reset a hash table
    +** to the empty state.
    +*/
    +SQLITE_PRIVATE void sqlite3HashClear(Hash *pH){
    +  HashElem *elem;         /* For looping over all elements of the table */
    +
    +  assert( pH!=0 );
    +  elem = pH->first;
    +  pH->first = 0;
    +  sqlite3_free(pH->ht);
    +  pH->ht = 0;
    +  pH->htsize = 0;
    +  while( elem ){
    +    HashElem *next_elem = elem->next;
    +    sqlite3_free(elem);
    +    elem = next_elem;
    +  }
    +  pH->count = 0;
    +}
    +
    +/*
    +** The hashing function.
    +*/
    +static unsigned int strHash(const char *z, int nKey){
    +  int h = 0;
    +  assert( nKey>=0 );
    +  while( nKey > 0  ){
    +    h = (h<<3) ^ h ^ sqlite3UpperToLower[(unsigned char)*z++];
    +    nKey--;
    +  }
    +  return h;
    +}
    +
    +
    +/* Link pNew element into the hash table pH.  If pEntry!=0 then also
    +** insert pNew into the pEntry hash bucket.
    +*/
    +static void insertElement(
    +  Hash *pH,              /* The complete hash table */
    +  struct _ht *pEntry,    /* The entry into which pNew is inserted */
    +  HashElem *pNew         /* The element to be inserted */
    +){
    +  HashElem *pHead;       /* First element already in pEntry */
    +  if( pEntry ){
    +    pHead = pEntry->count ? pEntry->chain : 0;
    +    pEntry->count++;
    +    pEntry->chain = pNew;
    +  }else{
    +    pHead = 0;
    +  }
    +  if( pHead ){
    +    pNew->next = pHead;
    +    pNew->prev = pHead->prev;
    +    if( pHead->prev ){ pHead->prev->next = pNew; }
    +    else             { pH->first = pNew; }
    +    pHead->prev = pNew;
    +  }else{
    +    pNew->next = pH->first;
    +    if( pH->first ){ pH->first->prev = pNew; }
    +    pNew->prev = 0;
    +    pH->first = pNew;
    +  }
    +}
    +
    +
    +/* Resize the hash table so that it cantains "new_size" buckets.
    +**
    +** The hash table might fail to resize if sqlite3_malloc() fails or
    +** if the new size is the same as the prior size.
    +** Return TRUE if the resize occurs and false if not.
    +*/
    +static int rehash(Hash *pH, unsigned int new_size){
    +  struct _ht *new_ht;            /* The new hash table */
    +  HashElem *elem, *next_elem;    /* For looping over existing elements */
    +
    +#if SQLITE_MALLOC_SOFT_LIMIT>0
    +  if( new_size*sizeof(struct _ht)>SQLITE_MALLOC_SOFT_LIMIT ){
    +    new_size = SQLITE_MALLOC_SOFT_LIMIT/sizeof(struct _ht);
    +  }
    +  if( new_size==pH->htsize ) return 0;
    +#endif
    +
    +  /* The inability to allocates space for a larger hash table is
    +  ** a performance hit but it is not a fatal error.  So mark the
    +  ** allocation as a benign.
    +  */
    +  sqlite3BeginBenignMalloc();
    +  new_ht = (struct _ht *)sqlite3Malloc( new_size*sizeof(struct _ht) );
    +  sqlite3EndBenignMalloc();
    +
    +  if( new_ht==0 ) return 0;
    +  sqlite3_free(pH->ht);
    +  pH->ht = new_ht;
    +  pH->htsize = new_size = sqlite3MallocSize(new_ht)/sizeof(struct _ht);
    +  memset(new_ht, 0, new_size*sizeof(struct _ht));
    +  for(elem=pH->first, pH->first=0; elem; elem = next_elem){
    +    unsigned int h = strHash(elem->pKey, elem->nKey) % new_size;
    +    next_elem = elem->next;
    +    insertElement(pH, &new_ht[h], elem);
    +  }
    +  return 1;
    +}
    +
    +/* This function (for internal use only) locates an element in an
    +** hash table that matches the given key.  The hash for this key has
    +** already been computed and is passed as the 4th parameter.
    +*/
    +static HashElem *findElementGivenHash(
    +  const Hash *pH,     /* The pH to be searched */
    +  const char *pKey,   /* The key we are searching for */
    +  int nKey,           /* Bytes in key (not counting zero terminator) */
    +  unsigned int h      /* The hash for this key. */
    +){
    +  HashElem *elem;                /* Used to loop thru the element list */
    +  int count;                     /* Number of elements left to test */
    +
    +  if( pH->ht ){
    +    struct _ht *pEntry = &pH->ht[h];
    +    elem = pEntry->chain;
    +    count = pEntry->count;
    +  }else{
    +    elem = pH->first;
    +    count = pH->count;
    +  }
    +  while( count-- && ALWAYS(elem) ){
    +    if( elem->nKey==nKey && sqlite3StrNICmp(elem->pKey,pKey,nKey)==0 ){ 
    +      return elem;
    +    }
    +    elem = elem->next;
    +  }
    +  return 0;
    +}
    +
    +/* Remove a single entry from the hash table given a pointer to that
    +** element and a hash on the element's key.
    +*/
    +static void removeElementGivenHash(
    +  Hash *pH,         /* The pH containing "elem" */
    +  HashElem* elem,   /* The element to be removed from the pH */
    +  unsigned int h    /* Hash value for the element */
    +){
    +  struct _ht *pEntry;
    +  if( elem->prev ){
    +    elem->prev->next = elem->next; 
    +  }else{
    +    pH->first = elem->next;
    +  }
    +  if( elem->next ){
    +    elem->next->prev = elem->prev;
    +  }
    +  if( pH->ht ){
    +    pEntry = &pH->ht[h];
    +    if( pEntry->chain==elem ){
    +      pEntry->chain = elem->next;
    +    }
    +    pEntry->count--;
    +    assert( pEntry->count>=0 );
    +  }
    +  sqlite3_free( elem );
    +  pH->count--;
    +  if( pH->count<=0 ){
    +    assert( pH->first==0 );
    +    assert( pH->count==0 );
    +    sqlite3HashClear(pH);
    +  }
    +}
    +
    +/* Attempt to locate an element of the hash table pH with a key
    +** that matches pKey,nKey.  Return the data for this element if it is
    +** found, or NULL if there is no match.
    +*/
    +SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey, int nKey){
    +  HashElem *elem;    /* The element that matches key */
    +  unsigned int h;    /* A hash on key */
    +
    +  assert( pH!=0 );
    +  assert( pKey!=0 );
    +  assert( nKey>=0 );
    +  if( pH->ht ){
    +    h = strHash(pKey, nKey) % pH->htsize;
    +  }else{
    +    h = 0;
    +  }
    +  elem = findElementGivenHash(pH, pKey, nKey, h);
    +  return elem ? elem->data : 0;
    +}
    +
    +/* Insert an element into the hash table pH.  The key is pKey,nKey
    +** and the data is "data".
    +**
    +** If no element exists with a matching key, then a new
    +** element is created and NULL is returned.
    +**
    +** If another element already exists with the same key, then the
    +** new data replaces the old data and the old data is returned.
    +** The key is not copied in this instance.  If a malloc fails, then
    +** the new data is returned and the hash table is unchanged.
    +**
    +** If the "data" parameter to this function is NULL, then the
    +** element corresponding to "key" is removed from the hash table.
    +*/
    +SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, int nKey, void *data){
    +  unsigned int h;       /* the hash of the key modulo hash table size */
    +  HashElem *elem;       /* Used to loop thru the element list */
    +  HashElem *new_elem;   /* New element added to the pH */
    +
    +  assert( pH!=0 );
    +  assert( pKey!=0 );
    +  assert( nKey>=0 );
    +  if( pH->htsize ){
    +    h = strHash(pKey, nKey) % pH->htsize;
    +  }else{
    +    h = 0;
    +  }
    +  elem = findElementGivenHash(pH,pKey,nKey,h);
    +  if( elem ){
    +    void *old_data = elem->data;
    +    if( data==0 ){
    +      removeElementGivenHash(pH,elem,h);
    +    }else{
    +      elem->data = data;
    +      elem->pKey = pKey;
    +      assert(nKey==elem->nKey);
    +    }
    +    return old_data;
    +  }
    +  if( data==0 ) return 0;
    +  new_elem = (HashElem*)sqlite3Malloc( sizeof(HashElem) );
    +  if( new_elem==0 ) return data;
    +  new_elem->pKey = pKey;
    +  new_elem->nKey = nKey;
    +  new_elem->data = data;
    +  pH->count++;
    +  if( pH->count>=10 && pH->count > 2*pH->htsize ){
    +    if( rehash(pH, pH->count*2) ){
    +      assert( pH->htsize>0 );
    +      h = strHash(pKey, nKey) % pH->htsize;
    +    }
    +  }
    +  if( pH->ht ){
    +    insertElement(pH, &pH->ht[h], new_elem);
    +  }else{
    +    insertElement(pH, 0, new_elem);
    +  }
    +  return 0;
    +}
    +
    +/************** End of hash.c ************************************************/
    +/************** Begin file opcodes.c *****************************************/
    +/* Automatically generated.  Do not edit */
    +/* See the mkopcodec.awk script for details. */
    +#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
    +SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
    + static const char *const azName[] = { "?",
    +     /*   1 */ "Goto",
    +     /*   2 */ "Gosub",
    +     /*   3 */ "Return",
    +     /*   4 */ "Yield",
    +     /*   5 */ "HaltIfNull",
    +     /*   6 */ "Halt",
    +     /*   7 */ "Integer",
    +     /*   8 */ "Int64",
    +     /*   9 */ "String",
    +     /*  10 */ "Null",
    +     /*  11 */ "Blob",
    +     /*  12 */ "Variable",
    +     /*  13 */ "Move",
    +     /*  14 */ "Copy",
    +     /*  15 */ "SCopy",
    +     /*  16 */ "ResultRow",
    +     /*  17 */ "CollSeq",
    +     /*  18 */ "Function",
    +     /*  19 */ "Not",
    +     /*  20 */ "AddImm",
    +     /*  21 */ "MustBeInt",
    +     /*  22 */ "RealAffinity",
    +     /*  23 */ "Permutation",
    +     /*  24 */ "Compare",
    +     /*  25 */ "Jump",
    +     /*  26 */ "If",
    +     /*  27 */ "IfNot",
    +     /*  28 */ "Column",
    +     /*  29 */ "Affinity",
    +     /*  30 */ "MakeRecord",
    +     /*  31 */ "Count",
    +     /*  32 */ "Savepoint",
    +     /*  33 */ "AutoCommit",
    +     /*  34 */ "Transaction",
    +     /*  35 */ "ReadCookie",
    +     /*  36 */ "SetCookie",
    +     /*  37 */ "VerifyCookie",
    +     /*  38 */ "OpenRead",
    +     /*  39 */ "OpenWrite",
    +     /*  40 */ "OpenEphemeral",
    +     /*  41 */ "OpenPseudo",
    +     /*  42 */ "Close",
    +     /*  43 */ "SeekLt",
    +     /*  44 */ "SeekLe",
    +     /*  45 */ "SeekGe",
    +     /*  46 */ "SeekGt",
    +     /*  47 */ "Seek",
    +     /*  48 */ "NotFound",
    +     /*  49 */ "Found",
    +     /*  50 */ "IsUnique",
    +     /*  51 */ "NotExists",
    +     /*  52 */ "Sequence",
    +     /*  53 */ "NewRowid",
    +     /*  54 */ "Insert",
    +     /*  55 */ "InsertInt",
    +     /*  56 */ "Delete",
    +     /*  57 */ "ResetCount",
    +     /*  58 */ "RowKey",
    +     /*  59 */ "RowData",
    +     /*  60 */ "Rowid",
    +     /*  61 */ "NullRow",
    +     /*  62 */ "Last",
    +     /*  63 */ "Sort",
    +     /*  64 */ "Rewind",
    +     /*  65 */ "Prev",
    +     /*  66 */ "Next",
    +     /*  67 */ "IdxInsert",
    +     /*  68 */ "Or",
    +     /*  69 */ "And",
    +     /*  70 */ "IdxDelete",
    +     /*  71 */ "IdxRowid",
    +     /*  72 */ "IdxLT",
    +     /*  73 */ "IsNull",
    +     /*  74 */ "NotNull",
    +     /*  75 */ "Ne",
    +     /*  76 */ "Eq",
    +     /*  77 */ "Gt",
    +     /*  78 */ "Le",
    +     /*  79 */ "Lt",
    +     /*  80 */ "Ge",
    +     /*  81 */ "IdxGE",
    +     /*  82 */ "BitAnd",
    +     /*  83 */ "BitOr",
    +     /*  84 */ "ShiftLeft",
    +     /*  85 */ "ShiftRight",
    +     /*  86 */ "Add",
    +     /*  87 */ "Subtract",
    +     /*  88 */ "Multiply",
    +     /*  89 */ "Divide",
    +     /*  90 */ "Remainder",
    +     /*  91 */ "Concat",
    +     /*  92 */ "Destroy",
    +     /*  93 */ "BitNot",
    +     /*  94 */ "String8",
    +     /*  95 */ "Clear",
    +     /*  96 */ "CreateIndex",
    +     /*  97 */ "CreateTable",
    +     /*  98 */ "ParseSchema",
    +     /*  99 */ "LoadAnalysis",
    +     /* 100 */ "DropTable",
    +     /* 101 */ "DropIndex",
    +     /* 102 */ "DropTrigger",
    +     /* 103 */ "IntegrityCk",
    +     /* 104 */ "RowSetAdd",
    +     /* 105 */ "RowSetRead",
    +     /* 106 */ "RowSetTest",
    +     /* 107 */ "Program",
    +     /* 108 */ "Param",
    +     /* 109 */ "FkCounter",
    +     /* 110 */ "FkIfZero",
    +     /* 111 */ "MemMax",
    +     /* 112 */ "IfPos",
    +     /* 113 */ "IfNeg",
    +     /* 114 */ "IfZero",
    +     /* 115 */ "AggStep",
    +     /* 116 */ "AggFinal",
    +     /* 117 */ "Vacuum",
    +     /* 118 */ "IncrVacuum",
    +     /* 119 */ "Expire",
    +     /* 120 */ "TableLock",
    +     /* 121 */ "VBegin",
    +     /* 122 */ "VCreate",
    +     /* 123 */ "VDestroy",
    +     /* 124 */ "VOpen",
    +     /* 125 */ "VFilter",
    +     /* 126 */ "VColumn",
    +     /* 127 */ "VNext",
    +     /* 128 */ "VRename",
    +     /* 129 */ "VUpdate",
    +     /* 130 */ "Real",
    +     /* 131 */ "Pagecount",
    +     /* 132 */ "Trace",
    +     /* 133 */ "Noop",
    +     /* 134 */ "Explain",
    +     /* 135 */ "NotUsed_135",
    +     /* 136 */ "NotUsed_136",
    +     /* 137 */ "NotUsed_137",
    +     /* 138 */ "NotUsed_138",
    +     /* 139 */ "NotUsed_139",
    +     /* 140 */ "NotUsed_140",
    +     /* 141 */ "ToText",
    +     /* 142 */ "ToBlob",
    +     /* 143 */ "ToNumeric",
    +     /* 144 */ "ToInt",
    +     /* 145 */ "ToReal",
    +  };
    +  return azName[i];
    +}
    +#endif
    +
    +/************** End of opcodes.c *********************************************/
    +/************** Begin file os_os2.c ******************************************/
    +/*
    +** 2006 Feb 14
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains code that is specific to OS/2.
    +**
    +** $Id: os_os2.c,v 1.63 2008/12/10 19:26:24 drh Exp $
    +*/
    +
    +
    +#if SQLITE_OS_OS2
    +
    +/*
    +** A Note About Memory Allocation:
    +**
    +** This driver uses malloc()/free() directly rather than going through
    +** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
    +** are designed for use on embedded systems where memory is scarce and
    +** malloc failures happen frequently.  OS/2 does not typically run on
    +** embedded systems, and when it does the developers normally have bigger
    +** problems to worry about than running out of memory.  So there is not
    +** a compelling need to use the wrappers.
    +**
    +** But there is a good reason to not use the wrappers.  If we use the
    +** wrappers then we will get simulated malloc() failures within this
    +** driver.  And that causes all kinds of problems for our tests.  We
    +** could enhance SQLite to deal with simulated malloc failures within
    +** the OS driver, but the code to deal with those failure would not
    +** be exercised on Linux (which does not need to malloc() in the driver)
    +** and so we would have difficulty writing coverage tests for that
    +** code.  Better to leave the code out, we think.
    +**
    +** The point of this discussion is as follows:  When creating a new
    +** OS layer for an embedded system, if you use this file as an example,
    +** avoid the use of malloc()/free().  Those routines work ok on OS/2
    +** desktops but not so well in embedded systems.
    +*/
    +
    +/*
    +** Macros used to determine whether or not to use threads.
    +*/
    +#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE
    +# define SQLITE_OS2_THREADS 1
    +#endif
    +
    +/*
    +** Include code that is common to all os_*.c files
    +*/
    +/************** Include os_common.h in the middle of os_os2.c ****************/
    +/************** Begin file os_common.h ***************************************/
    +/*
    +** 2004 May 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains macros and a little bit of code that is common to
    +** all of the platform-specific files (os_*.c) and is #included into those
    +** files.
    +**
    +** This file should be #included by the os_*.c files only.  It is not a
    +** general purpose header file.
    +**
    +** $Id: os_common.h,v 1.38 2009/02/24 18:40:50 danielk1977 Exp $
    +*/
    +#ifndef _OS_COMMON_H_
    +#define _OS_COMMON_H_
    +
    +/*
    +** At least two bugs have slipped in because we changed the MEMORY_DEBUG
    +** macro to SQLITE_DEBUG and some older makefiles have not yet made the
    +** switch.  The following code should catch this problem at compile-time.
    +*/
    +#ifdef MEMORY_DEBUG
    +# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3OSTrace = 0;
    +#define OSTRACE1(X)         if( sqlite3OSTrace ) sqlite3DebugPrintf(X)
    +#define OSTRACE2(X,Y)       if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y)
    +#define OSTRACE3(X,Y,Z)     if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)   if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C,D)
    +#else
    +#define OSTRACE1(X)
    +#define OSTRACE2(X,Y)
    +#define OSTRACE3(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D)
    +#endif
    +
    +/*
    +** Macros for performance tracing.  Normally turned off.  Only works
    +** on i486 hardware.
    +*/
    +#ifdef SQLITE_PERFORMANCE_TRACE
    +
    +/* 
    +** hwtime.h contains inline assembler code for implementing 
    +** high-performance timing routines.
    +*/
    +/************** Include hwtime.h in the middle of os_common.h ****************/
    +/************** Begin file hwtime.h ******************************************/
    +/*
    +** 2008 May 27
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains inline asm code for retrieving "high-performance"
    +** counters for x86 class CPUs.
    +**
    +** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $
    +*/
    +#ifndef _HWTIME_H_
    +#define _HWTIME_H_
    +
    +/*
    +** The following routine only works on pentium-class (or newer) processors.
    +** It uses the RDTSC opcode to read the cycle count value out of the
    +** processor and returns that value.  This can be used for high-res
    +** profiling.
    +*/
    +#if (defined(__GNUC__) || defined(_MSC_VER)) && \
    +      (defined(i386) || defined(__i386__) || defined(_M_IX86))
    +
    +  #if defined(__GNUC__)
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +     unsigned int lo, hi;
    +     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
    +     return (sqlite_uint64)hi << 32 | lo;
    +  }
    +
    +  #elif defined(_MSC_VER)
    +
    +  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
    +     __asm {
    +        rdtsc
    +        ret       ; return value at EDX:EAX
    +     }
    +  }
    +
    +  #endif
    +
    +#elif (defined(__GNUC__) && defined(__x86_64__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long val;
    +      __asm__ __volatile__ ("rdtsc" : "=A" (val));
    +      return val;
    +  }
    + 
    +#elif (defined(__GNUC__) && defined(__ppc__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long long retval;
    +      unsigned long junk;
    +      __asm__ __volatile__ ("\n\
    +          1:      mftbu   %1\n\
    +                  mftb    %L0\n\
    +                  mftbu   %0\n\
    +                  cmpw    %0,%1\n\
    +                  bne     1b"
    +                  : "=r" (retval), "=r" (junk));
    +      return retval;
    +  }
    +
    +#else
    +
    +  #error Need implementation of sqlite3Hwtime() for your platform.
    +
    +  /*
    +  ** To compile without implementing sqlite3Hwtime() for your platform,
    +  ** you can remove the above #error and use the following
    +  ** stub function.  You will lose timing support for many
    +  ** of the debugging and testing utilities, but it should at
    +  ** least compile and run.
    +  */
    +SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
    +
    +#endif
    +
    +#endif /* !defined(_HWTIME_H_) */
    +
    +/************** End of hwtime.h **********************************************/
    +/************** Continuing where we left off in os_common.h ******************/
    +
    +static sqlite_uint64 g_start;
    +static sqlite_uint64 g_elapsed;
    +#define TIMER_START       g_start=sqlite3Hwtime()
    +#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
    +#define TIMER_ELAPSED     g_elapsed
    +#else
    +#define TIMER_START
    +#define TIMER_END
    +#define TIMER_ELAPSED     ((sqlite_uint64)0)
    +#endif
    +
    +/*
    +** If we compile with the SQLITE_TEST macro set, then the following block
    +** of code will give us the ability to simulate a disk I/O error.  This
    +** is used for testing the I/O recovery logic.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
    +SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
    +SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
    +SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
    +SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
    +SQLITE_API int sqlite3_diskfull_pending = 0;
    +SQLITE_API int sqlite3_diskfull = 0;
    +#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
    +#define SimulateIOError(CODE)  \
    +  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
    +       || sqlite3_io_error_pending-- == 1 )  \
    +              { local_ioerr(); CODE; }
    +static void local_ioerr(){
    +  IOTRACE(("IOERR\n"));
    +  sqlite3_io_error_hit++;
    +  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
    +}
    +#define SimulateDiskfullError(CODE) \
    +   if( sqlite3_diskfull_pending ){ \
    +     if( sqlite3_diskfull_pending == 1 ){ \
    +       local_ioerr(); \
    +       sqlite3_diskfull = 1; \
    +       sqlite3_io_error_hit = 1; \
    +       CODE; \
    +     }else{ \
    +       sqlite3_diskfull_pending--; \
    +     } \
    +   }
    +#else
    +#define SimulateIOErrorBenign(X)
    +#define SimulateIOError(A)
    +#define SimulateDiskfullError(A)
    +#endif
    +
    +/*
    +** When testing, keep a count of the number of open files.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_open_file_count = 0;
    +#define OpenCounter(X)  sqlite3_open_file_count+=(X)
    +#else
    +#define OpenCounter(X)
    +#endif
    +
    +#endif /* !defined(_OS_COMMON_H_) */
    +
    +/************** End of os_common.h *******************************************/
    +/************** Continuing where we left off in os_os2.c *********************/
    +
    +/*
    +** The os2File structure is subclass of sqlite3_file specific for the OS/2
    +** protability layer.
    +*/
    +typedef struct os2File os2File;
    +struct os2File {
    +  const sqlite3_io_methods *pMethod;  /* Always the first entry */
    +  HFILE h;                  /* Handle for accessing the file */
    +  char* pathToDel;          /* Name of file to delete on close, NULL if not */
    +  unsigned char locktype;   /* Type of lock currently held on this file */
    +};
    +
    +#define LOCK_TIMEOUT 10L /* the default locking timeout */
    +
    +/*****************************************************************************
    +** The next group of routines implement the I/O methods specified
    +** by the sqlite3_io_methods object.
    +******************************************************************************/
    +
    +/*
    +** Close a file.
    +*/
    +static int os2Close( sqlite3_file *id ){
    +  APIRET rc = NO_ERROR;
    +  os2File *pFile;
    +  if( id && (pFile = (os2File*)id) != 0 ){
    +    OSTRACE2( "CLOSE %d\n", pFile->h );
    +    rc = DosClose( pFile->h );
    +    pFile->locktype = NO_LOCK;
    +    if( pFile->pathToDel != NULL ){
    +      rc = DosForceDelete( (PSZ)pFile->pathToDel );
    +      free( pFile->pathToDel );
    +      pFile->pathToDel = NULL;
    +    }
    +    id = 0;
    +    OpenCounter( -1 );
    +  }
    +
    +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
    +}
    +
    +/*
    +** Read data from a file into a buffer.  Return SQLITE_OK if all
    +** bytes were read successfully and SQLITE_IOERR if anything goes
    +** wrong.
    +*/
    +static int os2Read(
    +  sqlite3_file *id,               /* File to read from */
    +  void *pBuf,                     /* Write content into this buffer */
    +  int amt,                        /* Number of bytes to read */
    +  sqlite3_int64 offset            /* Begin reading at this offset */
    +){
    +  ULONG fileLocation = 0L;
    +  ULONG got;
    +  os2File *pFile = (os2File*)id;
    +  assert( id!=0 );
    +  SimulateIOError( return SQLITE_IOERR_READ );
    +  OSTRACE3( "READ %d lock=%d\n", pFile->h, pFile->locktype );
    +  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
    +    return SQLITE_IOERR;
    +  }
    +  if( DosRead( pFile->h, pBuf, amt, &got ) != NO_ERROR ){
    +    return SQLITE_IOERR_READ;
    +  }
    +  if( got == (ULONG)amt )
    +    return SQLITE_OK;
    +  else {
    +    /* Unread portions of the input buffer must be zero-filled */
    +    memset(&((char*)pBuf)[got], 0, amt-got);
    +    return SQLITE_IOERR_SHORT_READ;
    +  }
    +}
    +
    +/*
    +** Write data from a buffer into a file.  Return SQLITE_OK on success
    +** or some other error code on failure.
    +*/
    +static int os2Write(
    +  sqlite3_file *id,               /* File to write into */
    +  const void *pBuf,               /* The bytes to be written */
    +  int amt,                        /* Number of bytes to write */
    +  sqlite3_int64 offset            /* Offset into the file to begin writing at */
    +){
    +  ULONG fileLocation = 0L;
    +  APIRET rc = NO_ERROR;
    +  ULONG wrote;
    +  os2File *pFile = (os2File*)id;
    +  assert( id!=0 );
    +  SimulateIOError( return SQLITE_IOERR_WRITE );
    +  SimulateDiskfullError( return SQLITE_FULL );
    +  OSTRACE3( "WRITE %d lock=%d\n", pFile->h, pFile->locktype );
    +  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
    +    return SQLITE_IOERR;
    +  }
    +  assert( amt>0 );
    +  while( amt > 0 &&
    +         ( rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote ) ) == NO_ERROR &&
    +         wrote > 0
    +  ){
    +    amt -= wrote;
    +    pBuf = &((char*)pBuf)[wrote];
    +  }
    +
    +  return ( rc != NO_ERROR || amt > (int)wrote ) ? SQLITE_FULL : SQLITE_OK;
    +}
    +
    +/*
    +** Truncate an open file to a specified size
    +*/
    +static int os2Truncate( sqlite3_file *id, i64 nByte ){
    +  APIRET rc = NO_ERROR;
    +  os2File *pFile = (os2File*)id;
    +  OSTRACE3( "TRUNCATE %d %lld\n", pFile->h, nByte );
    +  SimulateIOError( return SQLITE_IOERR_TRUNCATE );
    +  rc = DosSetFileSize( pFile->h, nByte );
    +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_TRUNCATE;
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** Count the number of fullsyncs and normal syncs.  This is used to test
    +** that syncs and fullsyncs are occuring at the right times.
    +*/
    +SQLITE_API int sqlite3_sync_count = 0;
    +SQLITE_API int sqlite3_fullsync_count = 0;
    +#endif
    +
    +/*
    +** Make sure all writes to a particular file are committed to disk.
    +*/
    +static int os2Sync( sqlite3_file *id, int flags ){
    +  os2File *pFile = (os2File*)id;
    +  OSTRACE3( "SYNC %d lock=%d\n", pFile->h, pFile->locktype );
    +#ifdef SQLITE_TEST
    +  if( flags & SQLITE_SYNC_FULL){
    +    sqlite3_fullsync_count++;
    +  }
    +  sqlite3_sync_count++;
    +#endif
    +  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
    +  ** no-op
    +  */
    +#ifdef SQLITE_NO_SYNC
    +  UNUSED_PARAMETER(pFile);
    +  return SQLITE_OK;
    +#else
    +  return DosResetBuffer( pFile->h ) == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
    +#endif
    +}
    +
    +/*
    +** Determine the current size of a file in bytes
    +*/
    +static int os2FileSize( sqlite3_file *id, sqlite3_int64 *pSize ){
    +  APIRET rc = NO_ERROR;
    +  FILESTATUS3 fsts3FileInfo;
    +  memset(&fsts3FileInfo, 0, sizeof(fsts3FileInfo));
    +  assert( id!=0 );
    +  SimulateIOError( return SQLITE_IOERR_FSTAT );
    +  rc = DosQueryFileInfo( ((os2File*)id)->h, FIL_STANDARD, &fsts3FileInfo, sizeof(FILESTATUS3) );
    +  if( rc == NO_ERROR ){
    +    *pSize = fsts3FileInfo.cbFile;
    +    return SQLITE_OK;
    +  }else{
    +    return SQLITE_IOERR_FSTAT;
    +  }
    +}
    +
    +/*
    +** Acquire a reader lock.
    +*/
    +static int getReadLock( os2File *pFile ){
    +  FILELOCK  LockArea,
    +            UnlockArea;
    +  APIRET res;
    +  memset(&LockArea, 0, sizeof(LockArea));
    +  memset(&UnlockArea, 0, sizeof(UnlockArea));
    +  LockArea.lOffset = SHARED_FIRST;
    +  LockArea.lRange = SHARED_SIZE;
    +  UnlockArea.lOffset = 0L;
    +  UnlockArea.lRange = 0L;
    +  res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 1L );
    +  OSTRACE3( "GETREADLOCK %d res=%d\n", pFile->h, res );
    +  return res;
    +}
    +
    +/*
    +** Undo a readlock
    +*/
    +static int unlockReadLock( os2File *id ){
    +  FILELOCK  LockArea,
    +            UnlockArea;
    +  APIRET res;
    +  memset(&LockArea, 0, sizeof(LockArea));
    +  memset(&UnlockArea, 0, sizeof(UnlockArea));
    +  LockArea.lOffset = 0L;
    +  LockArea.lRange = 0L;
    +  UnlockArea.lOffset = SHARED_FIRST;
    +  UnlockArea.lRange = SHARED_SIZE;
    +  res = DosSetFileLocks( id->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 1L );
    +  OSTRACE3( "UNLOCK-READLOCK file handle=%d res=%d?\n", id->h, res );
    +  return res;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  The os2Unlock() routine
    +** erases all locks at once and returns us immediately to locking level 0.
    +** It is not possible to lower the locking level one step at a time.  You
    +** must go straight to locking level 0.
    +*/
    +static int os2Lock( sqlite3_file *id, int locktype ){
    +  int rc = SQLITE_OK;       /* Return code from subroutines */
    +  APIRET res = NO_ERROR;    /* Result of an OS/2 lock call */
    +  int newLocktype;       /* Set pFile->locktype to this value before exiting */
    +  int gotPendingLock = 0;/* True if we acquired a PENDING lock this time */
    +  FILELOCK  LockArea,
    +            UnlockArea;
    +  os2File *pFile = (os2File*)id;
    +  memset(&LockArea, 0, sizeof(LockArea));
    +  memset(&UnlockArea, 0, sizeof(UnlockArea));
    +  assert( pFile!=0 );
    +  OSTRACE4( "LOCK %d %d was %d\n", pFile->h, locktype, pFile->locktype );
    +
    +  /* If there is already a lock of this type or more restrictive on the
    +  ** os2File, do nothing. Don't use the end_lock: exit path, as
    +  ** sqlite3_mutex_enter() hasn't been called yet.
    +  */
    +  if( pFile->locktype>=locktype ){
    +    OSTRACE3( "LOCK %d %d ok (already held)\n", pFile->h, locktype );
    +    return SQLITE_OK;
    +  }
    +
    +  /* Make sure the locking sequence is correct
    +  */
    +  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
    +  assert( locktype!=PENDING_LOCK );
    +  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
    +
    +  /* Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or
    +  ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of
    +  ** the PENDING_LOCK byte is temporary.
    +  */
    +  newLocktype = pFile->locktype;
    +  if( pFile->locktype==NO_LOCK
    +      || (locktype==EXCLUSIVE_LOCK && pFile->locktype==RESERVED_LOCK)
    +  ){
    +    LockArea.lOffset = PENDING_BYTE;
    +    LockArea.lRange = 1L;
    +    UnlockArea.lOffset = 0L;
    +    UnlockArea.lRange = 0L;
    +
    +    /* wait longer than LOCK_TIMEOUT here not to have to try multiple times */
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, 100L, 0L );
    +    if( res == NO_ERROR ){
    +      gotPendingLock = 1;
    +      OSTRACE3( "LOCK %d pending lock boolean set.  res=%d\n", pFile->h, res );
    +    }
    +  }
    +
    +  /* Acquire a shared lock
    +  */
    +  if( locktype==SHARED_LOCK && res == NO_ERROR ){
    +    assert( pFile->locktype==NO_LOCK );
    +    res = getReadLock(pFile);
    +    if( res == NO_ERROR ){
    +      newLocktype = SHARED_LOCK;
    +    }
    +    OSTRACE3( "LOCK %d acquire shared lock. res=%d\n", pFile->h, res );
    +  }
    +
    +  /* Acquire a RESERVED lock
    +  */
    +  if( locktype==RESERVED_LOCK && res == NO_ERROR ){
    +    assert( pFile->locktype==SHARED_LOCK );
    +    LockArea.lOffset = RESERVED_BYTE;
    +    LockArea.lRange = 1L;
    +    UnlockArea.lOffset = 0L;
    +    UnlockArea.lRange = 0L;
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    if( res == NO_ERROR ){
    +      newLocktype = RESERVED_LOCK;
    +    }
    +    OSTRACE3( "LOCK %d acquire reserved lock. res=%d\n", pFile->h, res );
    +  }
    +
    +  /* Acquire a PENDING lock
    +  */
    +  if( locktype==EXCLUSIVE_LOCK && res == NO_ERROR ){
    +    newLocktype = PENDING_LOCK;
    +    gotPendingLock = 0;
    +    OSTRACE2( "LOCK %d acquire pending lock. pending lock boolean unset.\n", pFile->h );
    +  }
    +
    +  /* Acquire an EXCLUSIVE lock
    +  */
    +  if( locktype==EXCLUSIVE_LOCK && res == NO_ERROR ){
    +    assert( pFile->locktype>=SHARED_LOCK );
    +    res = unlockReadLock(pFile);
    +    OSTRACE2( "unreadlock = %d\n", res );
    +    LockArea.lOffset = SHARED_FIRST;
    +    LockArea.lRange = SHARED_SIZE;
    +    UnlockArea.lOffset = 0L;
    +    UnlockArea.lRange = 0L;
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    if( res == NO_ERROR ){
    +      newLocktype = EXCLUSIVE_LOCK;
    +    }else{
    +      OSTRACE2( "OS/2 error-code = %d\n", res );
    +      getReadLock(pFile);
    +    }
    +    OSTRACE3( "LOCK %d acquire exclusive lock.  res=%d\n", pFile->h, res );
    +  }
    +
    +  /* If we are holding a PENDING lock that ought to be released, then
    +  ** release it now.
    +  */
    +  if( gotPendingLock && locktype==SHARED_LOCK ){
    +    int r;
    +    LockArea.lOffset = 0L;
    +    LockArea.lRange = 0L;
    +    UnlockArea.lOffset = PENDING_BYTE;
    +    UnlockArea.lRange = 1L;
    +    r = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    OSTRACE3( "LOCK %d unlocking pending/is shared. r=%d\n", pFile->h, r );
    +  }
    +
    +  /* Update the state of the lock has held in the file descriptor then
    +  ** return the appropriate result code.
    +  */
    +  if( res == NO_ERROR ){
    +    rc = SQLITE_OK;
    +  }else{
    +    OSTRACE4( "LOCK FAILED %d trying for %d but got %d\n", pFile->h,
    +              locktype, newLocktype );
    +    rc = SQLITE_BUSY;
    +  }
    +  pFile->locktype = newLocktype;
    +  OSTRACE3( "LOCK %d now %d\n", pFile->h, pFile->locktype );
    +  return rc;
    +}
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, return
    +** non-zero, otherwise zero.
    +*/
    +static int os2CheckReservedLock( sqlite3_file *id, int *pOut ){
    +  int r = 0;
    +  os2File *pFile = (os2File*)id;
    +  assert( pFile!=0 );
    +  if( pFile->locktype>=RESERVED_LOCK ){
    +    r = 1;
    +    OSTRACE3( "TEST WR-LOCK %d %d (local)\n", pFile->h, r );
    +  }else{
    +    FILELOCK  LockArea,
    +              UnlockArea;
    +    APIRET rc = NO_ERROR;
    +    memset(&LockArea, 0, sizeof(LockArea));
    +    memset(&UnlockArea, 0, sizeof(UnlockArea));
    +    LockArea.lOffset = RESERVED_BYTE;
    +    LockArea.lRange = 1L;
    +    UnlockArea.lOffset = 0L;
    +    UnlockArea.lRange = 0L;
    +    rc = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    OSTRACE3( "TEST WR-LOCK %d lock reserved byte rc=%d\n", pFile->h, rc );
    +    if( rc == NO_ERROR ){
    +      APIRET rcu = NO_ERROR; /* return code for unlocking */
    +      LockArea.lOffset = 0L;
    +      LockArea.lRange = 0L;
    +      UnlockArea.lOffset = RESERVED_BYTE;
    +      UnlockArea.lRange = 1L;
    +      rcu = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +      OSTRACE3( "TEST WR-LOCK %d unlock reserved byte r=%d\n", pFile->h, rcu );
    +    }
    +    r = !(rc == NO_ERROR);
    +    OSTRACE3( "TEST WR-LOCK %d %d (remote)\n", pFile->h, r );
    +  }
    +  *pOut = r;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor id to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +**
    +** It is not possible for this routine to fail if the second argument
    +** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine
    +** might return SQLITE_IOERR;
    +*/
    +static int os2Unlock( sqlite3_file *id, int locktype ){
    +  int type;
    +  os2File *pFile = (os2File*)id;
    +  APIRET rc = SQLITE_OK;
    +  APIRET res = NO_ERROR;
    +  FILELOCK  LockArea,
    +            UnlockArea;
    +  memset(&LockArea, 0, sizeof(LockArea));
    +  memset(&UnlockArea, 0, sizeof(UnlockArea));
    +  assert( pFile!=0 );
    +  assert( locktype<=SHARED_LOCK );
    +  OSTRACE4( "UNLOCK %d to %d was %d\n", pFile->h, locktype, pFile->locktype );
    +  type = pFile->locktype;
    +  if( type>=EXCLUSIVE_LOCK ){
    +    LockArea.lOffset = 0L;
    +    LockArea.lRange = 0L;
    +    UnlockArea.lOffset = SHARED_FIRST;
    +    UnlockArea.lRange = SHARED_SIZE;
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    OSTRACE3( "UNLOCK %d exclusive lock res=%d\n", pFile->h, res );
    +    if( locktype==SHARED_LOCK && getReadLock(pFile) != NO_ERROR ){
    +      /* This should never happen.  We should always be able to
    +      ** reacquire the read lock */
    +      OSTRACE3( "UNLOCK %d to %d getReadLock() failed\n", pFile->h, locktype );
    +      rc = SQLITE_IOERR_UNLOCK;
    +    }
    +  }
    +  if( type>=RESERVED_LOCK ){
    +    LockArea.lOffset = 0L;
    +    LockArea.lRange = 0L;
    +    UnlockArea.lOffset = RESERVED_BYTE;
    +    UnlockArea.lRange = 1L;
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    OSTRACE3( "UNLOCK %d reserved res=%d\n", pFile->h, res );
    +  }
    +  if( locktype==NO_LOCK && type>=SHARED_LOCK ){
    +    res = unlockReadLock(pFile);
    +    OSTRACE5( "UNLOCK %d is %d want %d res=%d\n", pFile->h, type, locktype, res );
    +  }
    +  if( type>=PENDING_LOCK ){
    +    LockArea.lOffset = 0L;
    +    LockArea.lRange = 0L;
    +    UnlockArea.lOffset = PENDING_BYTE;
    +    UnlockArea.lRange = 1L;
    +    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
    +    OSTRACE3( "UNLOCK %d pending res=%d\n", pFile->h, res );
    +  }
    +  pFile->locktype = locktype;
    +  OSTRACE3( "UNLOCK %d now %d\n", pFile->h, pFile->locktype );
    +  return rc;
    +}
    +
    +/*
    +** Control and query of the open file handle.
    +*/
    +static int os2FileControl(sqlite3_file *id, int op, void *pArg){
    +  switch( op ){
    +    case SQLITE_FCNTL_LOCKSTATE: {
    +      *(int*)pArg = ((os2File*)id)->locktype;
    +      OSTRACE3( "FCNTL_LOCKSTATE %d lock=%d\n", ((os2File*)id)->h, ((os2File*)id)->locktype );
    +      return SQLITE_OK;
    +    }
    +  }
    +  return SQLITE_ERROR;
    +}
    +
    +/*
    +** Return the sector size in bytes of the underlying block device for
    +** the specified file. This is almost always 512 bytes, but may be
    +** larger for some devices.
    +**
    +** SQLite code assumes this function cannot fail. It also assumes that
    +** if two files are created in the same file-system directory (i.e.
    +** a database and its journal file) that the sector size will be the
    +** same for both.
    +*/
    +static int os2SectorSize(sqlite3_file *id){
    +  return SQLITE_DEFAULT_SECTOR_SIZE;
    +}
    +
    +/*
    +** Return a vector of device characteristics.
    +*/
    +static int os2DeviceCharacteristics(sqlite3_file *id){
    +  return 0;
    +}
    +
    +
    +/*
    +** Character set conversion objects used by conversion routines.
    +*/
    +static UconvObject ucUtf8 = NULL; /* convert between UTF-8 and UCS-2 */
    +static UconvObject uclCp = NULL;  /* convert between local codepage and UCS-2 */
    +
    +/*
    +** Helper function to initialize the conversion objects from and to UTF-8.
    +*/
    +static void initUconvObjects( void ){
    +  if( UniCreateUconvObject( UTF_8, &ucUtf8 ) != ULS_SUCCESS )
    +    ucUtf8 = NULL;
    +  if ( UniCreateUconvObject( (UniChar *)L"@path=yes", &uclCp ) != ULS_SUCCESS )
    +    uclCp = NULL;
    +}
    +
    +/*
    +** Helper function to free the conversion objects from and to UTF-8.
    +*/
    +static void freeUconvObjects( void ){
    +  if ( ucUtf8 )
    +    UniFreeUconvObject( ucUtf8 );
    +  if ( uclCp )
    +    UniFreeUconvObject( uclCp );
    +  ucUtf8 = NULL;
    +  uclCp = NULL;
    +}
    +
    +/*
    +** Helper function to convert UTF-8 filenames to local OS/2 codepage.
    +** The two-step process: first convert the incoming UTF-8 string
    +** into UCS-2 and then from UCS-2 to the current codepage.
    +** The returned char pointer has to be freed.
    +*/
    +static char *convertUtf8PathToCp( const char *in ){
    +  UniChar tempPath[CCHMAXPATH];
    +  char *out = (char *)calloc( CCHMAXPATH, 1 );
    +
    +  if( !out )
    +    return NULL;
    +
    +  if( !ucUtf8 || !uclCp )
    +    initUconvObjects();
    +
    +  /* determine string for the conversion of UTF-8 which is CP1208 */
    +  if( UniStrToUcs( ucUtf8, tempPath, (char *)in, CCHMAXPATH ) != ULS_SUCCESS )
    +    return out; /* if conversion fails, return the empty string */
    +
    +  /* conversion for current codepage which can be used for paths */
    +  UniStrFromUcs( uclCp, out, tempPath, CCHMAXPATH );
    +
    +  return out;
    +}
    +
    +/*
    +** Helper function to convert filenames from local codepage to UTF-8.
    +** The two-step process: first convert the incoming codepage-specific
    +** string into UCS-2 and then from UCS-2 to the codepage of UTF-8.
    +** The returned char pointer has to be freed.
    +**
    +** This function is non-static to be able to use this in shell.c and
    +** similar applications that take command line arguments.
    +*/
    +char *convertCpPathToUtf8( const char *in ){
    +  UniChar tempPath[CCHMAXPATH];
    +  char *out = (char *)calloc( CCHMAXPATH, 1 );
    +
    +  if( !out )
    +    return NULL;
    +
    +  if( !ucUtf8 || !uclCp )
    +    initUconvObjects();
    +
    +  /* conversion for current codepage which can be used for paths */
    +  if( UniStrToUcs( uclCp, tempPath, (char *)in, CCHMAXPATH ) != ULS_SUCCESS )
    +    return out; /* if conversion fails, return the empty string */
    +
    +  /* determine string for the conversion of UTF-8 which is CP1208 */
    +  UniStrFromUcs( ucUtf8, out, tempPath, CCHMAXPATH );
    +
    +  return out;
    +}
    +
    +/*
    +** This vector defines all the methods that can operate on an
    +** sqlite3_file for os2.
    +*/
    +static const sqlite3_io_methods os2IoMethod = {
    +  1,                        /* iVersion */
    +  os2Close,
    +  os2Read,
    +  os2Write,
    +  os2Truncate,
    +  os2Sync,
    +  os2FileSize,
    +  os2Lock,
    +  os2Unlock,
    +  os2CheckReservedLock,
    +  os2FileControl,
    +  os2SectorSize,
    +  os2DeviceCharacteristics
    +};
    +
    +/***************************************************************************
    +** Here ends the I/O methods that form the sqlite3_io_methods object.
    +**
    +** The next block of code implements the VFS methods.
    +****************************************************************************/
    +
    +/*
    +** Create a temporary file name in zBuf.  zBuf must be big enough to
    +** hold at pVfs->mxPathname characters.
    +*/
    +static int getTempname(int nBuf, char *zBuf ){
    +  static const unsigned char zChars[] =
    +    "abcdefghijklmnopqrstuvwxyz"
    +    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    "0123456789";
    +  int i, j;
    +  char zTempPathBuf[3];
    +  PSZ zTempPath = (PSZ)&zTempPathBuf;
    +  if( sqlite3_temp_directory ){
    +    zTempPath = sqlite3_temp_directory;
    +  }else{
    +    if( DosScanEnv( (PSZ)"TEMP", &zTempPath ) ){
    +      if( DosScanEnv( (PSZ)"TMP", &zTempPath ) ){
    +        if( DosScanEnv( (PSZ)"TMPDIR", &zTempPath ) ){
    +           ULONG ulDriveNum = 0, ulDriveMap = 0;
    +           DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap );
    +           sprintf( (char*)zTempPath, "%c:", (char)( 'A' + ulDriveNum - 1 ) );
    +        }
    +      }
    +    }
    +  }
    +  /* Strip off a trailing slashes or backslashes, otherwise we would get *
    +   * multiple (back)slashes which causes DosOpen() to fail.              *
    +   * Trailing spaces are not allowed, either.                            */
    +  j = sqlite3Strlen30(zTempPath);
    +  while( j > 0 && ( zTempPath[j-1] == '\\' || zTempPath[j-1] == '/'
    +                    || zTempPath[j-1] == ' ' ) ){
    +    j--;
    +  }
    +  zTempPath[j] = '\0';
    +  if( !sqlite3_temp_directory ){
    +    char *zTempPathUTF = convertCpPathToUtf8( zTempPath );
    +    sqlite3_snprintf( nBuf-30, zBuf,
    +                      "%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPathUTF );
    +    free( zTempPathUTF );
    +  }else{
    +    sqlite3_snprintf( nBuf-30, zBuf,
    +                      "%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPath );
    +  }
    +  j = sqlite3Strlen30( zBuf );
    +  sqlite3_randomness( 20, &zBuf[j] );
    +  for( i = 0; i < 20; i++, j++ ){
    +    zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
    +  }
    +  zBuf[j] = 0;
    +  OSTRACE2( "TEMP FILENAME: %s\n", zBuf );
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Turn a relative pathname into a full pathname.  Write the full
    +** pathname into zFull[].  zFull[] will be at least pVfs->mxPathname
    +** bytes in size.
    +*/
    +static int os2FullPathname(
    +  sqlite3_vfs *pVfs,          /* Pointer to vfs object */
    +  const char *zRelative,      /* Possibly relative input path */
    +  int nFull,                  /* Size of output buffer in bytes */
    +  char *zFull                 /* Output buffer */
    +){
    +  char *zRelativeCp = convertUtf8PathToCp( zRelative );
    +  char zFullCp[CCHMAXPATH] = "\0";
    +  char *zFullUTF;
    +  APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
    +                                CCHMAXPATH );
    +  free( zRelativeCp );
    +  zFullUTF = convertCpPathToUtf8( zFullCp );
    +  sqlite3_snprintf( nFull, zFull, zFullUTF );
    +  free( zFullUTF );
    +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
    +}
    +
    +
    +/*
    +** Open a file.
    +*/
    +static int os2Open(
    +  sqlite3_vfs *pVfs,            /* Not used */
    +  const char *zName,            /* Name of the file */
    +  sqlite3_file *id,             /* Write the SQLite file handle here */
    +  int flags,                    /* Open mode flags */
    +  int *pOutFlags                /* Status return flags */
    +){
    +  HFILE h;
    +  ULONG ulFileAttribute = FILE_NORMAL;
    +  ULONG ulOpenFlags = 0;
    +  ULONG ulOpenMode = 0;
    +  os2File *pFile = (os2File*)id;
    +  APIRET rc = NO_ERROR;
    +  ULONG ulAction;
    +  char *zNameCp;
    +  char zTmpname[CCHMAXPATH+1];    /* Buffer to hold name of temp file */
    +
    +  /* If the second argument to this function is NULL, generate a 
    +  ** temporary file name to use 
    +  */
    +  if( !zName ){
    +    int rc = getTempname(CCHMAXPATH+1, zTmpname);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    zName = zTmpname;
    +  }
    +
    +
    +  memset( pFile, 0, sizeof(*pFile) );
    +
    +  OSTRACE2( "OPEN want %d\n", flags );
    +
    +  if( flags & SQLITE_OPEN_READWRITE ){
    +    ulOpenMode |= OPEN_ACCESS_READWRITE;
    +    OSTRACE1( "OPEN read/write\n" );
    +  }else{
    +    ulOpenMode |= OPEN_ACCESS_READONLY;
    +    OSTRACE1( "OPEN read only\n" );
    +  }
    +
    +  if( flags & SQLITE_OPEN_CREATE ){
    +    ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
    +    OSTRACE1( "OPEN open new/create\n" );
    +  }else{
    +    ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
    +    OSTRACE1( "OPEN open existing\n" );
    +  }
    +
    +  if( flags & SQLITE_OPEN_MAIN_DB ){
    +    ulOpenMode |= OPEN_SHARE_DENYNONE;
    +    OSTRACE1( "OPEN share read/write\n" );
    +  }else{
    +    ulOpenMode |= OPEN_SHARE_DENYWRITE;
    +    OSTRACE1( "OPEN share read only\n" );
    +  }
    +
    +  if( flags & SQLITE_OPEN_DELETEONCLOSE ){
    +    char pathUtf8[CCHMAXPATH];
    +#ifdef NDEBUG /* when debugging we want to make sure it is deleted */
    +    ulFileAttribute = FILE_HIDDEN;
    +#endif
    +    os2FullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 );
    +    pFile->pathToDel = convertUtf8PathToCp( pathUtf8 );
    +    OSTRACE1( "OPEN hidden/delete on close file attributes\n" );
    +  }else{
    +    pFile->pathToDel = NULL;
    +    OSTRACE1( "OPEN normal file attribute\n" );
    +  }
    +
    +  /* always open in random access mode for possibly better speed */
    +  ulOpenMode |= OPEN_FLAGS_RANDOM;
    +  ulOpenMode |= OPEN_FLAGS_FAIL_ON_ERROR;
    +  ulOpenMode |= OPEN_FLAGS_NOINHERIT;
    +
    +  zNameCp = convertUtf8PathToCp( zName );
    +  rc = DosOpen( (PSZ)zNameCp,
    +                &h,
    +                &ulAction,
    +                0L,
    +                ulFileAttribute,
    +                ulOpenFlags,
    +                ulOpenMode,
    +                (PEAOP2)NULL );
    +  free( zNameCp );
    +  if( rc != NO_ERROR ){
    +    OSTRACE7( "OPEN Invalid handle rc=%d: zName=%s, ulAction=%#lx, ulAttr=%#lx, ulFlags=%#lx, ulMode=%#lx\n",
    +              rc, zName, ulAction, ulFileAttribute, ulOpenFlags, ulOpenMode );
    +    if( pFile->pathToDel )
    +      free( pFile->pathToDel );
    +    pFile->pathToDel = NULL;
    +    if( flags & SQLITE_OPEN_READWRITE ){
    +      OSTRACE2( "OPEN %d Invalid handle\n", ((flags | SQLITE_OPEN_READONLY) & ~SQLITE_OPEN_READWRITE) );
    +      return os2Open( pVfs, zName, id,
    +                      ((flags | SQLITE_OPEN_READONLY) & ~SQLITE_OPEN_READWRITE),
    +                      pOutFlags );
    +    }else{
    +      return SQLITE_CANTOPEN;
    +    }
    +  }
    +
    +  if( pOutFlags ){
    +    *pOutFlags = flags & SQLITE_OPEN_READWRITE ? SQLITE_OPEN_READWRITE : SQLITE_OPEN_READONLY;
    +  }
    +
    +  pFile->pMethod = &os2IoMethod;
    +  pFile->h = h;
    +  OpenCounter(+1);
    +  OSTRACE3( "OPEN %d pOutFlags=%d\n", pFile->h, pOutFlags );
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Delete the named file.
    +*/
    +static int os2Delete(
    +  sqlite3_vfs *pVfs,                     /* Not used on os2 */
    +  const char *zFilename,                 /* Name of file to delete */
    +  int syncDir                            /* Not used on os2 */
    +){
    +  APIRET rc = NO_ERROR;
    +  char *zFilenameCp = convertUtf8PathToCp( zFilename );
    +  SimulateIOError( return SQLITE_IOERR_DELETE );
    +  rc = DosDelete( (PSZ)zFilenameCp );
    +  free( zFilenameCp );
    +  OSTRACE2( "DELETE \"%s\"\n", zFilename );
    +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_DELETE;
    +}
    +
    +/*
    +** Check the existance and status of a file.
    +*/
    +static int os2Access(
    +  sqlite3_vfs *pVfs,        /* Not used on os2 */
    +  const char *zFilename,    /* Name of file to check */
    +  int flags,                /* Type of test to make on this file */
    +  int *pOut                 /* Write results here */
    +){
    +  FILESTATUS3 fsts3ConfigInfo;
    +  APIRET rc = NO_ERROR;
    +  char *zFilenameCp = convertUtf8PathToCp( zFilename );
    +
    +  memset( &fsts3ConfigInfo, 0, sizeof(fsts3ConfigInfo) );
    +  rc = DosQueryPathInfo( (PSZ)zFilenameCp, FIL_STANDARD,
    +                         &fsts3ConfigInfo, sizeof(FILESTATUS3) );
    +  free( zFilenameCp );
    +  OSTRACE4( "ACCESS fsts3ConfigInfo.attrFile=%d flags=%d rc=%d\n",
    +            fsts3ConfigInfo.attrFile, flags, rc );
    +  switch( flags ){
    +    case SQLITE_ACCESS_READ:
    +    case SQLITE_ACCESS_EXISTS:
    +      rc = (rc == NO_ERROR);
    +      OSTRACE3( "ACCESS %s access of read and exists  rc=%d\n", zFilename, rc );
    +      break;
    +    case SQLITE_ACCESS_READWRITE:
    +      rc = (rc == NO_ERROR) && ( (fsts3ConfigInfo.attrFile & FILE_READONLY) == 0 );
    +      OSTRACE3( "ACCESS %s access of read/write  rc=%d\n", zFilename, rc );
    +      break;
    +    default:
    +      assert( !"Invalid flags argument" );
    +  }
    +  *pOut = rc;
    +  return SQLITE_OK;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +/*
    +** Interfaces for opening a shared library, finding entry points
    +** within the shared library, and closing the shared library.
    +*/
    +/*
    +** Interfaces for opening a shared library, finding entry points
    +** within the shared library, and closing the shared library.
    +*/
    +static void *os2DlOpen(sqlite3_vfs *pVfs, const char *zFilename){
    +  UCHAR loadErr[256];
    +  HMODULE hmod;
    +  APIRET rc;
    +  char *zFilenameCp = convertUtf8PathToCp(zFilename);
    +  rc = DosLoadModule((PSZ)loadErr, sizeof(loadErr), zFilenameCp, &hmod);
    +  free(zFilenameCp);
    +  return rc != NO_ERROR ? 0 : (void*)hmod;
    +}
    +/*
    +** A no-op since the error code is returned on the DosLoadModule call.
    +** os2Dlopen returns zero if DosLoadModule is not successful.
    +*/
    +static void os2DlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
    +/* no-op */
    +}
    +static void *os2DlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
    +  PFN pfn;
    +  APIRET rc;
    +  rc = DosQueryProcAddr((HMODULE)pHandle, 0L, zSymbol, &pfn);
    +  if( rc != NO_ERROR ){
    +    /* if the symbol itself was not found, search again for the same
    +     * symbol with an extra underscore, that might be needed depending
    +     * on the calling convention */
    +    char _zSymbol[256] = "_";
    +    strncat(_zSymbol, zSymbol, 255);
    +    rc = DosQueryProcAddr((HMODULE)pHandle, 0L, _zSymbol, &pfn);
    +  }
    +  return rc != NO_ERROR ? 0 : (void*)pfn;
    +}
    +static void os2DlClose(sqlite3_vfs *pVfs, void *pHandle){
    +  DosFreeModule((HMODULE)pHandle);
    +}
    +#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
    +  #define os2DlOpen 0
    +  #define os2DlError 0
    +  #define os2DlSym 0
    +  #define os2DlClose 0
    +#endif
    +
    +
    +/*
    +** Write up to nBuf bytes of randomness into zBuf.
    +*/
    +static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
    +  int n = 0;
    +#if defined(SQLITE_TEST)
    +  n = nBuf;
    +  memset(zBuf, 0, nBuf);
    +#else
    +  int sizeofULong = sizeof(ULONG);
    +  if( (int)sizeof(DATETIME) <= nBuf - n ){
    +    DATETIME x;
    +    DosGetDateTime(&x);
    +    memcpy(&zBuf[n], &x, sizeof(x));
    +    n += sizeof(x);
    +  }
    +
    +  if( sizeofULong <= nBuf - n ){
    +    PPIB ppib;
    +    DosGetInfoBlocks(NULL, &ppib);
    +    memcpy(&zBuf[n], &ppib->pib_ulpid, sizeofULong);
    +    n += sizeofULong;
    +  }
    +
    +  if( sizeofULong <= nBuf - n ){
    +    PTIB ptib;
    +    DosGetInfoBlocks(&ptib, NULL);
    +    memcpy(&zBuf[n], &ptib->tib_ptib2->tib2_ultid, sizeofULong);
    +    n += sizeofULong;
    +  }
    +
    +  /* if we still haven't filled the buffer yet the following will */
    +  /* grab everything once instead of making several calls for a single item */
    +  if( sizeofULong <= nBuf - n ){
    +    ULONG ulSysInfo[QSV_MAX];
    +    DosQuerySysInfo(1L, QSV_MAX, ulSysInfo, sizeofULong * QSV_MAX);
    +
    +    memcpy(&zBuf[n], &ulSysInfo[QSV_MS_COUNT - 1], sizeofULong);
    +    n += sizeofULong;
    +
    +    if( sizeofULong <= nBuf - n ){
    +      memcpy(&zBuf[n], &ulSysInfo[QSV_TIMER_INTERVAL - 1], sizeofULong);
    +      n += sizeofULong;
    +    }
    +    if( sizeofULong <= nBuf - n ){
    +      memcpy(&zBuf[n], &ulSysInfo[QSV_TIME_LOW - 1], sizeofULong);
    +      n += sizeofULong;
    +    }
    +    if( sizeofULong <= nBuf - n ){
    +      memcpy(&zBuf[n], &ulSysInfo[QSV_TIME_HIGH - 1], sizeofULong);
    +      n += sizeofULong;
    +    }
    +    if( sizeofULong <= nBuf - n ){
    +      memcpy(&zBuf[n], &ulSysInfo[QSV_TOTAVAILMEM - 1], sizeofULong);
    +      n += sizeofULong;
    +    }
    +  }
    +#endif
    +
    +  return n;
    +}
    +
    +/*
    +** Sleep for a little while.  Return the amount of time slept.
    +** The argument is the number of microseconds we want to sleep.
    +** The return value is the number of microseconds of sleep actually
    +** requested from the underlying operating system, a number which
    +** might be greater than or equal to the argument, but not less
    +** than the argument.
    +*/
    +static int os2Sleep( sqlite3_vfs *pVfs, int microsec ){
    +  DosSleep( (microsec/1000) );
    +  return microsec;
    +}
    +
    +/*
    +** The following variable, if set to a non-zero value, becomes the result
    +** returned from sqlite3OsCurrentTime().  This is used for testing.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_current_time = 0;
    +#endif
    +
    +/*
    +** Find the current time (in Universal Coordinated Time).  Write the
    +** current time and date as a Julian Day number into *prNow and
    +** return 0.  Return 1 if the time and date cannot be found.
    +*/
    +int os2CurrentTime( sqlite3_vfs *pVfs, double *prNow ){
    +  double now;
    +  SHORT minute; /* needs to be able to cope with negative timezone offset */
    +  USHORT second, hour,
    +         day, month, year;
    +  DATETIME dt;
    +  DosGetDateTime( &dt );
    +  second = (USHORT)dt.seconds;
    +  minute = (SHORT)dt.minutes + dt.timezone;
    +  hour = (USHORT)dt.hours;
    +  day = (USHORT)dt.day;
    +  month = (USHORT)dt.month;
    +  year = (USHORT)dt.year;
    +
    +  /* Calculations from http://www.astro.keele.ac.uk/~rno/Astronomy/hjd.html
    +     http://www.astro.keele.ac.uk/~rno/Astronomy/hjd-0.1.c */
    +  /* Calculate the Julian days */
    +  now = day - 32076 +
    +    1461*(year + 4800 + (month - 14)/12)/4 +
    +    367*(month - 2 - (month - 14)/12*12)/12 -
    +    3*((year + 4900 + (month - 14)/12)/100)/4;
    +
    +  /* Add the fractional hours, mins and seconds */
    +  now += (hour + 12.0)/24.0;
    +  now += minute/1440.0;
    +  now += second/86400.0;
    +  *prNow = now;
    +#ifdef SQLITE_TEST
    +  if( sqlite3_current_time ){
    +    *prNow = sqlite3_current_time/86400.0 + 2440587.5;
    +  }
    +#endif
    +  return 0;
    +}
    +
    +static int os2GetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
    +  return 0;
    +}
    +
    +/*
    +** Initialize and deinitialize the operating system interface.
    +*/
    +SQLITE_API int sqlite3_os_init(void){
    +  static sqlite3_vfs os2Vfs = {
    +    1,                 /* iVersion */
    +    sizeof(os2File),   /* szOsFile */
    +    CCHMAXPATH,        /* mxPathname */
    +    0,                 /* pNext */
    +    "os2",             /* zName */
    +    0,                 /* pAppData */
    +
    +    os2Open,           /* xOpen */
    +    os2Delete,         /* xDelete */
    +    os2Access,         /* xAccess */
    +    os2FullPathname,   /* xFullPathname */
    +    os2DlOpen,         /* xDlOpen */
    +    os2DlError,        /* xDlError */
    +    os2DlSym,          /* xDlSym */
    +    os2DlClose,        /* xDlClose */
    +    os2Randomness,     /* xRandomness */
    +    os2Sleep,          /* xSleep */
    +    os2CurrentTime,    /* xCurrentTime */
    +    os2GetLastError    /* xGetLastError */
    +  };
    +  sqlite3_vfs_register(&os2Vfs, 1);
    +  initUconvObjects();
    +  return SQLITE_OK;
    +}
    +SQLITE_API int sqlite3_os_end(void){
    +  freeUconvObjects();
    +  return SQLITE_OK;
    +}
    +
    +#endif /* SQLITE_OS_OS2 */
    +
    +/************** End of os_os2.c **********************************************/
    +/************** Begin file os_unix.c *****************************************/
    +/*
    +** 2004 May 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains the VFS implementation for unix-like operating systems
    +** include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others.
    +**
    +** There are actually several different VFS implementations in this file.
    +** The differences are in the way that file locking is done.  The default
    +** implementation uses Posix Advisory Locks.  Alternative implementations
    +** use flock(), dot-files, various proprietary locking schemas, or simply
    +** skip locking all together.
    +**
    +** This source file is organized into divisions where the logic for various
    +** subfunctions is contained within the appropriate division.  PLEASE
    +** KEEP THE STRUCTURE OF THIS FILE INTACT.  New code should be placed
    +** in the correct division and should be clearly labeled.
    +**
    +** The layout of divisions is as follows:
    +**
    +**   *  General-purpose declarations and utility functions.
    +**   *  Unique file ID logic used by VxWorks.
    +**   *  Various locking primitive implementations (all except proxy locking):
    +**      + for Posix Advisory Locks
    +**      + for no-op locks
    +**      + for dot-file locks
    +**      + for flock() locking
    +**      + for named semaphore locks (VxWorks only)
    +**      + for AFP filesystem locks (MacOSX only)
    +**   *  sqlite3_file methods not associated with locking.
    +**   *  Definitions of sqlite3_io_methods objects for all locking
    +**      methods plus "finder" functions for each locking method.
    +**   *  sqlite3_vfs method implementations.
    +**   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)
    +**   *  Definitions of sqlite3_vfs objects for all locking methods
    +**      plus implementations of sqlite3_os_init() and sqlite3_os_end().
    +*/
    +#if SQLITE_OS_UNIX              /* This file is used on unix only */
    +
    +/*
    +** There are various methods for file locking used for concurrency
    +** control:
    +**
    +**   1. POSIX locking (the default),
    +**   2. No locking,
    +**   3. Dot-file locking,
    +**   4. flock() locking,
    +**   5. AFP locking (OSX only),
    +**   6. Named POSIX semaphores (VXWorks only),
    +**   7. proxy locking. (OSX only)
    +**
    +** Styles 4, 5, and 7 are only available of SQLITE_ENABLE_LOCKING_STYLE
    +** is defined to 1.  The SQLITE_ENABLE_LOCKING_STYLE also enables automatic
    +** selection of the appropriate locking style based on the filesystem
    +** where the database is located.  
    +*/
    +#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
    +#  if defined(__APPLE__)
    +#    define SQLITE_ENABLE_LOCKING_STYLE 1
    +#  else
    +#    define SQLITE_ENABLE_LOCKING_STYLE 0
    +#  endif
    +#endif
    +
    +/*
    +** Define the OS_VXWORKS pre-processor macro to 1 if building on 
    +** vxworks, or 0 otherwise.
    +*/
    +#ifndef OS_VXWORKS
    +#  if defined(__RTP__) || defined(_WRS_KERNEL)
    +#    define OS_VXWORKS 1
    +#  else
    +#    define OS_VXWORKS 0
    +#  endif
    +#endif
    +
    +/*
    +** These #defines should enable >2GB file support on Posix if the
    +** underlying operating system supports it.  If the OS lacks
    +** large file support, these should be no-ops.
    +**
    +** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch
    +** on the compiler command line.  This is necessary if you are compiling
    +** on a recent machine (ex: RedHat 7.2) but you want your code to work
    +** on an older machine (ex: RedHat 6.0).  If you compile on RedHat 7.2
    +** without this option, LFS is enable.  But LFS does not exist in the kernel
    +** in RedHat 6.0, so the code won't work.  Hence, for maximum binary
    +** portability you should omit LFS.
    +**
    +** The previous paragraph was written in 2005.  (This paragraph is written
    +** on 2008-11-28.) These days, all Linux kernels support large files, so
    +** you should probably leave LFS enabled.  But some embedded platforms might
    +** lack LFS in which case the SQLITE_DISABLE_LFS macro might still be useful.
    +*/
    +#ifndef SQLITE_DISABLE_LFS
    +# define _LARGE_FILE       1
    +# ifndef _FILE_OFFSET_BITS
    +#   define _FILE_OFFSET_BITS 64
    +# endif
    +# define _LARGEFILE_SOURCE 1
    +#endif
    +
    +/*
    +** standard include files.
    +*/
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#include <fcntl.h>
    +#include <unistd.h>
    +#include <sys/time.h>
    +#include <errno.h>
    +
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +# include <sys/ioctl.h>
    +# if OS_VXWORKS
    +#  include <semaphore.h>
    +#  include <limits.h>
    +# else
    +#  include <sys/file.h>
    +#  include <sys/param.h>
    +#  include <sys/mount.h>
    +# endif
    +#endif /* SQLITE_ENABLE_LOCKING_STYLE */
    +
    +/*
    +** If we are to be thread-safe, include the pthreads header and define
    +** the SQLITE_UNIX_THREADS macro.
    +*/
    +#if SQLITE_THREADSAFE
    +# define SQLITE_UNIX_THREADS 1
    +#endif
    +
    +/*
    +** Default permissions when creating a new file
    +*/
    +#ifndef SQLITE_DEFAULT_FILE_PERMISSIONS
    +# define SQLITE_DEFAULT_FILE_PERMISSIONS 0644
    +#endif
    +
    +/*
    + ** Default permissions when creating auto proxy dir
    + */
    +#ifndef SQLITE_DEFAULT_PROXYDIR_PERMISSIONS
    +# define SQLITE_DEFAULT_PROXYDIR_PERMISSIONS 0755
    +#endif
    +
    +/*
    +** Maximum supported path-length.
    +*/
    +#define MAX_PATHNAME 512
    +
    +/*
    +** Only set the lastErrno if the error code is a real error and not 
    +** a normal expected return code of SQLITE_BUSY or SQLITE_OK
    +*/
    +#define IS_LOCK_ERROR(x)  ((x != SQLITE_OK) && (x != SQLITE_BUSY))
    +
    +
    +/*
    +** Sometimes, after a file handle is closed by SQLite, the file descriptor
    +** cannot be closed immediately. In these cases, instances of the following
    +** structure are used to store the file descriptor while waiting for an
    +** opportunity to either close or reuse it.
    +*/
    +typedef struct UnixUnusedFd UnixUnusedFd;
    +struct UnixUnusedFd {
    +  int fd;                   /* File descriptor to close */
    +  int flags;                /* Flags this file descriptor was opened with */
    +  UnixUnusedFd *pNext;      /* Next unused file descriptor on same file */
    +};
    +
    +/*
    +** The unixFile structure is subclass of sqlite3_file specific to the unix
    +** VFS implementations.
    +*/
    +typedef struct unixFile unixFile;
    +struct unixFile {
    +  sqlite3_io_methods const *pMethod;  /* Always the first entry */
    +  struct unixOpenCnt *pOpen;       /* Info about all open fd's on this inode */
    +  struct unixLockInfo *pLock;      /* Info about locks on this inode */
    +  int h;                           /* The file descriptor */
    +  int dirfd;                       /* File descriptor for the directory */
    +  unsigned char locktype;          /* The type of lock held on this fd */
    +  int lastErrno;                   /* The unix errno from the last I/O error */
    +  void *lockingContext;            /* Locking style specific state */
    +  UnixUnusedFd *pUnused;           /* Pre-allocated UnixUnusedFd */
    +  int fileFlags;                   /* Miscellanous flags */
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +  int openFlags;                   /* The flags specified at open() */
    +#endif
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +  pthread_t tid;                   /* The thread that "owns" this unixFile */
    +#endif
    +#if OS_VXWORKS
    +  int isDelete;                    /* Delete on close if true */
    +  struct vxworksFileId *pId;       /* Unique file ID */
    +#endif
    +#ifndef NDEBUG
    +  /* The next group of variables are used to track whether or not the
    +  ** transaction counter in bytes 24-27 of database files are updated
    +  ** whenever any part of the database changes.  An assertion fault will
    +  ** occur if a file is updated without also updating the transaction
    +  ** counter.  This test is made to avoid new problems similar to the
    +  ** one described by ticket #3584. 
    +  */
    +  unsigned char transCntrChng;   /* True if the transaction counter changed */
    +  unsigned char dbUpdate;        /* True if any part of database file changed */
    +  unsigned char inNormalWrite;   /* True if in a normal write operation */
    +#endif
    +#ifdef SQLITE_TEST
    +  /* In test mode, increase the size of this structure a bit so that 
    +  ** it is larger than the struct CrashFile defined in test6.c.
    +  */
    +  char aPadding[32];
    +#endif
    +};
    +
    +/*
    +** The following macros define bits in unixFile.fileFlags
    +*/
    +#define SQLITE_WHOLE_FILE_LOCKING  0x0001   /* Use whole-file locking */
    +
    +/*
    +** Include code that is common to all os_*.c files
    +*/
    +/************** Include os_common.h in the middle of os_unix.c ***************/
    +/************** Begin file os_common.h ***************************************/
    +/*
    +** 2004 May 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains macros and a little bit of code that is common to
    +** all of the platform-specific files (os_*.c) and is #included into those
    +** files.
    +**
    +** This file should be #included by the os_*.c files only.  It is not a
    +** general purpose header file.
    +**
    +** $Id: os_common.h,v 1.38 2009/02/24 18:40:50 danielk1977 Exp $
    +*/
    +#ifndef _OS_COMMON_H_
    +#define _OS_COMMON_H_
    +
    +/*
    +** At least two bugs have slipped in because we changed the MEMORY_DEBUG
    +** macro to SQLITE_DEBUG and some older makefiles have not yet made the
    +** switch.  The following code should catch this problem at compile-time.
    +*/
    +#ifdef MEMORY_DEBUG
    +# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3OSTrace = 0;
    +#define OSTRACE1(X)         if( sqlite3OSTrace ) sqlite3DebugPrintf(X)
    +#define OSTRACE2(X,Y)       if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y)
    +#define OSTRACE3(X,Y,Z)     if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)   if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C,D)
    +#else
    +#define OSTRACE1(X)
    +#define OSTRACE2(X,Y)
    +#define OSTRACE3(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D)
    +#endif
    +
    +/*
    +** Macros for performance tracing.  Normally turned off.  Only works
    +** on i486 hardware.
    +*/
    +#ifdef SQLITE_PERFORMANCE_TRACE
    +
    +/* 
    +** hwtime.h contains inline assembler code for implementing 
    +** high-performance timing routines.
    +*/
    +/************** Include hwtime.h in the middle of os_common.h ****************/
    +/************** Begin file hwtime.h ******************************************/
    +/*
    +** 2008 May 27
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains inline asm code for retrieving "high-performance"
    +** counters for x86 class CPUs.
    +**
    +** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $
    +*/
    +#ifndef _HWTIME_H_
    +#define _HWTIME_H_
    +
    +/*
    +** The following routine only works on pentium-class (or newer) processors.
    +** It uses the RDTSC opcode to read the cycle count value out of the
    +** processor and returns that value.  This can be used for high-res
    +** profiling.
    +*/
    +#if (defined(__GNUC__) || defined(_MSC_VER)) && \
    +      (defined(i386) || defined(__i386__) || defined(_M_IX86))
    +
    +  #if defined(__GNUC__)
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +     unsigned int lo, hi;
    +     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
    +     return (sqlite_uint64)hi << 32 | lo;
    +  }
    +
    +  #elif defined(_MSC_VER)
    +
    +  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
    +     __asm {
    +        rdtsc
    +        ret       ; return value at EDX:EAX
    +     }
    +  }
    +
    +  #endif
    +
    +#elif (defined(__GNUC__) && defined(__x86_64__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long val;
    +      __asm__ __volatile__ ("rdtsc" : "=A" (val));
    +      return val;
    +  }
    + 
    +#elif (defined(__GNUC__) && defined(__ppc__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long long retval;
    +      unsigned long junk;
    +      __asm__ __volatile__ ("\n\
    +          1:      mftbu   %1\n\
    +                  mftb    %L0\n\
    +                  mftbu   %0\n\
    +                  cmpw    %0,%1\n\
    +                  bne     1b"
    +                  : "=r" (retval), "=r" (junk));
    +      return retval;
    +  }
    +
    +#else
    +
    +  #error Need implementation of sqlite3Hwtime() for your platform.
    +
    +  /*
    +  ** To compile without implementing sqlite3Hwtime() for your platform,
    +  ** you can remove the above #error and use the following
    +  ** stub function.  You will lose timing support for many
    +  ** of the debugging and testing utilities, but it should at
    +  ** least compile and run.
    +  */
    +SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
    +
    +#endif
    +
    +#endif /* !defined(_HWTIME_H_) */
    +
    +/************** End of hwtime.h **********************************************/
    +/************** Continuing where we left off in os_common.h ******************/
    +
    +static sqlite_uint64 g_start;
    +static sqlite_uint64 g_elapsed;
    +#define TIMER_START       g_start=sqlite3Hwtime()
    +#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
    +#define TIMER_ELAPSED     g_elapsed
    +#else
    +#define TIMER_START
    +#define TIMER_END
    +#define TIMER_ELAPSED     ((sqlite_uint64)0)
    +#endif
    +
    +/*
    +** If we compile with the SQLITE_TEST macro set, then the following block
    +** of code will give us the ability to simulate a disk I/O error.  This
    +** is used for testing the I/O recovery logic.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
    +SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
    +SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
    +SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
    +SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
    +SQLITE_API int sqlite3_diskfull_pending = 0;
    +SQLITE_API int sqlite3_diskfull = 0;
    +#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
    +#define SimulateIOError(CODE)  \
    +  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
    +       || sqlite3_io_error_pending-- == 1 )  \
    +              { local_ioerr(); CODE; }
    +static void local_ioerr(){
    +  IOTRACE(("IOERR\n"));
    +  sqlite3_io_error_hit++;
    +  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
    +}
    +#define SimulateDiskfullError(CODE) \
    +   if( sqlite3_diskfull_pending ){ \
    +     if( sqlite3_diskfull_pending == 1 ){ \
    +       local_ioerr(); \
    +       sqlite3_diskfull = 1; \
    +       sqlite3_io_error_hit = 1; \
    +       CODE; \
    +     }else{ \
    +       sqlite3_diskfull_pending--; \
    +     } \
    +   }
    +#else
    +#define SimulateIOErrorBenign(X)
    +#define SimulateIOError(A)
    +#define SimulateDiskfullError(A)
    +#endif
    +
    +/*
    +** When testing, keep a count of the number of open files.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_open_file_count = 0;
    +#define OpenCounter(X)  sqlite3_open_file_count+=(X)
    +#else
    +#define OpenCounter(X)
    +#endif
    +
    +#endif /* !defined(_OS_COMMON_H_) */
    +
    +/************** End of os_common.h *******************************************/
    +/************** Continuing where we left off in os_unix.c ********************/
    +
    +/*
    +** Define various macros that are missing from some systems.
    +*/
    +#ifndef O_LARGEFILE
    +# define O_LARGEFILE 0
    +#endif
    +#ifdef SQLITE_DISABLE_LFS
    +# undef O_LARGEFILE
    +# define O_LARGEFILE 0
    +#endif
    +#ifndef O_NOFOLLOW
    +# define O_NOFOLLOW 0
    +#endif
    +#ifndef O_BINARY
    +# define O_BINARY 0
    +#endif
    +
    +/*
    +** The DJGPP compiler environment looks mostly like Unix, but it
    +** lacks the fcntl() system call.  So redefine fcntl() to be something
    +** that always succeeds.  This means that locking does not occur under
    +** DJGPP.  But it is DOS - what did you expect?
    +*/
    +#ifdef __DJGPP__
    +# define fcntl(A,B,C) 0
    +#endif
    +
    +/*
    +** The threadid macro resolves to the thread-id or to 0.  Used for
    +** testing and debugging only.
    +*/
    +#if SQLITE_THREADSAFE
    +#define threadid pthread_self()
    +#else
    +#define threadid 0
    +#endif
    +
    +
    +/*
    +** Helper functions to obtain and relinquish the global mutex. The
    +** global mutex is used to protect the unixOpenCnt, unixLockInfo and
    +** vxworksFileId objects used by this file, all of which may be 
    +** shared by multiple threads.
    +**
    +** Function unixMutexHeld() is used to assert() that the global mutex 
    +** is held when required. This function is only used as part of assert() 
    +** statements. e.g.
    +**
    +**   unixEnterMutex()
    +**     assert( unixMutexHeld() );
    +**   unixEnterLeave()
    +*/
    +static void unixEnterMutex(void){
    +  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +}
    +static void unixLeaveMutex(void){
    +  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +}
    +#ifdef SQLITE_DEBUG
    +static int unixMutexHeld(void) {
    +  return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +}
    +#endif
    +
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** Helper function for printing out trace information from debugging
    +** binaries. This returns the string represetation of the supplied
    +** integer lock-type.
    +*/
    +static const char *locktypeName(int locktype){
    +  switch( locktype ){
    +    case NO_LOCK: return "NONE";
    +    case SHARED_LOCK: return "SHARED";
    +    case RESERVED_LOCK: return "RESERVED";
    +    case PENDING_LOCK: return "PENDING";
    +    case EXCLUSIVE_LOCK: return "EXCLUSIVE";
    +  }
    +  return "ERROR";
    +}
    +#endif
    +
    +#ifdef SQLITE_LOCK_TRACE
    +/*
    +** Print out information about all locking operations.
    +**
    +** This routine is used for troubleshooting locks on multithreaded
    +** platforms.  Enable by compiling with the -DSQLITE_LOCK_TRACE
    +** command-line option on the compiler.  This code is normally
    +** turned off.
    +*/
    +static int lockTrace(int fd, int op, struct flock *p){
    +  char *zOpName, *zType;
    +  int s;
    +  int savedErrno;
    +  if( op==F_GETLK ){
    +    zOpName = "GETLK";
    +  }else if( op==F_SETLK ){
    +    zOpName = "SETLK";
    +  }else{
    +    s = fcntl(fd, op, p);
    +    sqlite3DebugPrintf("fcntl unknown %d %d %d\n", fd, op, s);
    +    return s;
    +  }
    +  if( p->l_type==F_RDLCK ){
    +    zType = "RDLCK";
    +  }else if( p->l_type==F_WRLCK ){
    +    zType = "WRLCK";
    +  }else if( p->l_type==F_UNLCK ){
    +    zType = "UNLCK";
    +  }else{
    +    assert( 0 );
    +  }
    +  assert( p->l_whence==SEEK_SET );
    +  s = fcntl(fd, op, p);
    +  savedErrno = errno;
    +  sqlite3DebugPrintf("fcntl %d %d %s %s %d %d %d %d\n",
    +     threadid, fd, zOpName, zType, (int)p->l_start, (int)p->l_len,
    +     (int)p->l_pid, s);
    +  if( s==(-1) && op==F_SETLK && (p->l_type==F_RDLCK || p->l_type==F_WRLCK) ){
    +    struct flock l2;
    +    l2 = *p;
    +    fcntl(fd, F_GETLK, &l2);
    +    if( l2.l_type==F_RDLCK ){
    +      zType = "RDLCK";
    +    }else if( l2.l_type==F_WRLCK ){
    +      zType = "WRLCK";
    +    }else if( l2.l_type==F_UNLCK ){
    +      zType = "UNLCK";
    +    }else{
    +      assert( 0 );
    +    }
    +    sqlite3DebugPrintf("fcntl-failure-reason: %s %d %d %d\n",
    +       zType, (int)l2.l_start, (int)l2.l_len, (int)l2.l_pid);
    +  }
    +  errno = savedErrno;
    +  return s;
    +}
    +#define fcntl lockTrace
    +#endif /* SQLITE_LOCK_TRACE */
    +
    +
    +
    +/*
    +** This routine translates a standard POSIX errno code into something
    +** useful to the clients of the sqlite3 functions.  Specifically, it is
    +** intended to translate a variety of "try again" errors into SQLITE_BUSY
    +** and a variety of "please close the file descriptor NOW" errors into 
    +** SQLITE_IOERR
    +** 
    +** Errors during initialization of locks, or file system support for locks,
    +** should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.
    +*/
    +static int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {
    +  switch (posixError) {
    +  case 0: 
    +    return SQLITE_OK;
    +    
    +  case EAGAIN:
    +  case ETIMEDOUT:
    +  case EBUSY:
    +  case EINTR:
    +  case ENOLCK:  
    +    /* random NFS retry error, unless during file system support 
    +     * introspection, in which it actually means what it says */
    +    return SQLITE_BUSY;
    +    
    +  case EACCES: 
    +    /* EACCES is like EAGAIN during locking operations, but not any other time*/
    +    if( (sqliteIOErr == SQLITE_IOERR_LOCK) || 
    +	(sqliteIOErr == SQLITE_IOERR_UNLOCK) || 
    +	(sqliteIOErr == SQLITE_IOERR_RDLOCK) ||
    +	(sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK) ){
    +      return SQLITE_BUSY;
    +    }
    +    /* else fall through */
    +  case EPERM: 
    +    return SQLITE_PERM;
    +    
    +  case EDEADLK:
    +    return SQLITE_IOERR_BLOCKED;
    +    
    +#if EOPNOTSUPP!=ENOTSUP
    +  case EOPNOTSUPP: 
    +    /* something went terribly awry, unless during file system support 
    +     * introspection, in which it actually means what it says */
    +#endif
    +#ifdef ENOTSUP
    +  case ENOTSUP: 
    +    /* invalid fd, unless during file system support introspection, in which 
    +     * it actually means what it says */
    +#endif
    +  case EIO:
    +  case EBADF:
    +  case EINVAL:
    +  case ENOTCONN:
    +  case ENODEV:
    +  case ENXIO:
    +  case ENOENT:
    +  case ESTALE:
    +  case ENOSYS:
    +    /* these should force the client to close the file and reconnect */
    +    
    +  default: 
    +    return sqliteIOErr;
    +  }
    +}
    +
    +
    +
    +/******************************************************************************
    +****************** Begin Unique File ID Utility Used By VxWorks ***************
    +**
    +** On most versions of unix, we can get a unique ID for a file by concatenating
    +** the device number and the inode number.  But this does not work on VxWorks.
    +** On VxWorks, a unique file id must be based on the canonical filename.
    +**
    +** A pointer to an instance of the following structure can be used as a
    +** unique file ID in VxWorks.  Each instance of this structure contains
    +** a copy of the canonical filename.  There is also a reference count.  
    +** The structure is reclaimed when the number of pointers to it drops to
    +** zero.
    +**
    +** There are never very many files open at one time and lookups are not
    +** a performance-critical path, so it is sufficient to put these
    +** structures on a linked list.
    +*/
    +struct vxworksFileId {
    +  struct vxworksFileId *pNext;  /* Next in a list of them all */
    +  int nRef;                     /* Number of references to this one */
    +  int nName;                    /* Length of the zCanonicalName[] string */
    +  char *zCanonicalName;         /* Canonical filename */
    +};
    +
    +#if OS_VXWORKS
    +/* 
    +** All unique filenames are held on a linked list headed by this
    +** variable:
    +*/
    +static struct vxworksFileId *vxworksFileList = 0;
    +
    +/*
    +** Simplify a filename into its canonical form
    +** by making the following changes:
    +**
    +**  * removing any trailing and duplicate /
    +**  * convert /./ into just /
    +**  * convert /A/../ where A is any simple name into just /
    +**
    +** Changes are made in-place.  Return the new name length.
    +**
    +** The original filename is in z[0..n-1].  Return the number of
    +** characters in the simplified name.
    +*/
    +static int vxworksSimplifyName(char *z, int n){
    +  int i, j;
    +  while( n>1 && z[n-1]=='/' ){ n--; }
    +  for(i=j=0; i<n; i++){
    +    if( z[i]=='/' ){
    +      if( z[i+1]=='/' ) continue;
    +      if( z[i+1]=='.' && i+2<n && z[i+2]=='/' ){
    +        i += 1;
    +        continue;
    +      }
    +      if( z[i+1]=='.' && i+3<n && z[i+2]=='.' && z[i+3]=='/' ){
    +        while( j>0 && z[j-1]!='/' ){ j--; }
    +        if( j>0 ){ j--; }
    +        i += 2;
    +        continue;
    +      }
    +    }
    +    z[j++] = z[i];
    +  }
    +  z[j] = 0;
    +  return j;
    +}
    +
    +/*
    +** Find a unique file ID for the given absolute pathname.  Return
    +** a pointer to the vxworksFileId object.  This pointer is the unique
    +** file ID.
    +**
    +** The nRef field of the vxworksFileId object is incremented before
    +** the object is returned.  A new vxworksFileId object is created
    +** and added to the global list if necessary.
    +**
    +** If a memory allocation error occurs, return NULL.
    +*/
    +static struct vxworksFileId *vxworksFindFileId(const char *zAbsoluteName){
    +  struct vxworksFileId *pNew;         /* search key and new file ID */
    +  struct vxworksFileId *pCandidate;   /* For looping over existing file IDs */
    +  int n;                              /* Length of zAbsoluteName string */
    +
    +  assert( zAbsoluteName[0]=='/' );
    +  n = (int)strlen(zAbsoluteName);
    +  pNew = sqlite3_malloc( sizeof(*pNew) + (n+1) );
    +  if( pNew==0 ) return 0;
    +  pNew->zCanonicalName = (char*)&pNew[1];
    +  memcpy(pNew->zCanonicalName, zAbsoluteName, n+1);
    +  n = vxworksSimplifyName(pNew->zCanonicalName, n);
    +
    +  /* Search for an existing entry that matching the canonical name.
    +  ** If found, increment the reference count and return a pointer to
    +  ** the existing file ID.
    +  */
    +  unixEnterMutex();
    +  for(pCandidate=vxworksFileList; pCandidate; pCandidate=pCandidate->pNext){
    +    if( pCandidate->nName==n 
    +     && memcmp(pCandidate->zCanonicalName, pNew->zCanonicalName, n)==0
    +    ){
    +       sqlite3_free(pNew);
    +       pCandidate->nRef++;
    +       unixLeaveMutex();
    +       return pCandidate;
    +    }
    +  }
    +
    +  /* No match was found.  We will make a new file ID */
    +  pNew->nRef = 1;
    +  pNew->nName = n;
    +  pNew->pNext = vxworksFileList;
    +  vxworksFileList = pNew;
    +  unixLeaveMutex();
    +  return pNew;
    +}
    +
    +/*
    +** Decrement the reference count on a vxworksFileId object.  Free
    +** the object when the reference count reaches zero.
    +*/
    +static void vxworksReleaseFileId(struct vxworksFileId *pId){
    +  unixEnterMutex();
    +  assert( pId->nRef>0 );
    +  pId->nRef--;
    +  if( pId->nRef==0 ){
    +    struct vxworksFileId **pp;
    +    for(pp=&vxworksFileList; *pp && *pp!=pId; pp = &((*pp)->pNext)){}
    +    assert( *pp==pId );
    +    *pp = pId->pNext;
    +    sqlite3_free(pId);
    +  }
    +  unixLeaveMutex();
    +}
    +#endif /* OS_VXWORKS */
    +/*************** End of Unique File ID Utility Used By VxWorks ****************
    +******************************************************************************/
    +
    +
    +/******************************************************************************
    +*************************** Posix Advisory Locking ****************************
    +**
    +** POSIX advisory locks are broken by design.  ANSI STD 1003.1 (1996)
    +** section 6.5.2.2 lines 483 through 490 specify that when a process
    +** sets or clears a lock, that operation overrides any prior locks set
    +** by the same process.  It does not explicitly say so, but this implies
    +** that it overrides locks set by the same process using a different
    +** file descriptor.  Consider this test case:
    +**
    +**       int fd1 = open("./file1", O_RDWR|O_CREAT, 0644);
    +**       int fd2 = open("./file2", O_RDWR|O_CREAT, 0644);
    +**
    +** Suppose ./file1 and ./file2 are really the same file (because
    +** one is a hard or symbolic link to the other) then if you set
    +** an exclusive lock on fd1, then try to get an exclusive lock
    +** on fd2, it works.  I would have expected the second lock to
    +** fail since there was already a lock on the file due to fd1.
    +** But not so.  Since both locks came from the same process, the
    +** second overrides the first, even though they were on different
    +** file descriptors opened on different file names.
    +**
    +** This means that we cannot use POSIX locks to synchronize file access
    +** among competing threads of the same process.  POSIX locks will work fine
    +** to synchronize access for threads in separate processes, but not
    +** threads within the same process.
    +**
    +** To work around the problem, SQLite has to manage file locks internally
    +** on its own.  Whenever a new database is opened, we have to find the
    +** specific inode of the database file (the inode is determined by the
    +** st_dev and st_ino fields of the stat structure that fstat() fills in)
    +** and check for locks already existing on that inode.  When locks are
    +** created or removed, we have to look at our own internal record of the
    +** locks to see if another thread has previously set a lock on that same
    +** inode.
    +**
    +** (Aside: The use of inode numbers as unique IDs does not work on VxWorks.
    +** For VxWorks, we have to use the alternative unique ID system based on
    +** canonical filename and implemented in the previous division.)
    +**
    +** The sqlite3_file structure for POSIX is no longer just an integer file
    +** descriptor.  It is now a structure that holds the integer file
    +** descriptor and a pointer to a structure that describes the internal
    +** locks on the corresponding inode.  There is one locking structure
    +** per inode, so if the same inode is opened twice, both unixFile structures
    +** point to the same locking structure.  The locking structure keeps
    +** a reference count (so we will know when to delete it) and a "cnt"
    +** field that tells us its internal lock status.  cnt==0 means the
    +** file is unlocked.  cnt==-1 means the file has an exclusive lock.
    +** cnt>0 means there are cnt shared locks on the file.
    +**
    +** Any attempt to lock or unlock a file first checks the locking
    +** structure.  The fcntl() system call is only invoked to set a 
    +** POSIX lock if the internal lock structure transitions between
    +** a locked and an unlocked state.
    +**
    +** But wait:  there are yet more problems with POSIX advisory locks.
    +**
    +** If you close a file descriptor that points to a file that has locks,
    +** all locks on that file that are owned by the current process are
    +** released.  To work around this problem, each unixFile structure contains
    +** a pointer to an unixOpenCnt structure.  There is one unixOpenCnt structure
    +** per open inode, which means that multiple unixFile can point to a single
    +** unixOpenCnt.  When an attempt is made to close an unixFile, if there are
    +** other unixFile open on the same inode that are holding locks, the call
    +** to close() the file descriptor is deferred until all of the locks clear.
    +** The unixOpenCnt structure keeps a list of file descriptors that need to
    +** be closed and that list is walked (and cleared) when the last lock
    +** clears.
    +**
    +** Yet another problem:  LinuxThreads do not play well with posix locks.
    +**
    +** Many older versions of linux use the LinuxThreads library which is
    +** not posix compliant.  Under LinuxThreads, a lock created by thread
    +** A cannot be modified or overridden by a different thread B.
    +** Only thread A can modify the lock.  Locking behavior is correct
    +** if the appliation uses the newer Native Posix Thread Library (NPTL)
    +** on linux - with NPTL a lock created by thread A can override locks
    +** in thread B.  But there is no way to know at compile-time which
    +** threading library is being used.  So there is no way to know at
    +** compile-time whether or not thread A can override locks on thread B.
    +** We have to do a run-time check to discover the behavior of the
    +** current process.
    +**
    +** On systems where thread A is unable to modify locks created by
    +** thread B, we have to keep track of which thread created each
    +** lock.  Hence there is an extra field in the key to the unixLockInfo
    +** structure to record this information.  And on those systems it
    +** is illegal to begin a transaction in one thread and finish it
    +** in another.  For this latter restriction, there is no work-around.
    +** It is a limitation of LinuxThreads.
    +*/
    +
    +/*
    +** Set or check the unixFile.tid field.  This field is set when an unixFile
    +** is first opened.  All subsequent uses of the unixFile verify that the
    +** same thread is operating on the unixFile.  Some operating systems do
    +** not allow locks to be overridden by other threads and that restriction
    +** means that sqlite3* database handles cannot be moved from one thread
    +** to another while locks are held.
    +**
    +** Version 3.3.1 (2006-01-15):  unixFile can be moved from one thread to
    +** another as long as we are running on a system that supports threads
    +** overriding each others locks (which is now the most common behavior)
    +** or if no locks are held.  But the unixFile.pLock field needs to be
    +** recomputed because its key includes the thread-id.  See the 
    +** transferOwnership() function below for additional information
    +*/
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +# define SET_THREADID(X)   (X)->tid = pthread_self()
    +# define CHECK_THREADID(X) (threadsOverrideEachOthersLocks==0 && \
    +                            !pthread_equal((X)->tid, pthread_self()))
    +#else
    +# define SET_THREADID(X)
    +# define CHECK_THREADID(X) 0
    +#endif
    +
    +/*
    +** An instance of the following structure serves as the key used
    +** to locate a particular unixOpenCnt structure given its inode.  This
    +** is the same as the unixLockKey except that the thread ID is omitted.
    +*/
    +struct unixFileId {
    +  dev_t dev;                  /* Device number */
    +#if OS_VXWORKS
    +  struct vxworksFileId *pId;  /* Unique file ID for vxworks. */
    +#else
    +  ino_t ino;                  /* Inode number */
    +#endif
    +};
    +
    +/*
    +** An instance of the following structure serves as the key used
    +** to locate a particular unixLockInfo structure given its inode.
    +**
    +** If threads cannot override each others locks (LinuxThreads), then we
    +** set the unixLockKey.tid field to the thread ID.  If threads can override
    +** each others locks (Posix and NPTL) then tid is always set to zero.
    +** tid is omitted if we compile without threading support or on an OS
    +** other than linux.
    +*/
    +struct unixLockKey {
    +  struct unixFileId fid;  /* Unique identifier for the file */
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +  pthread_t tid;  /* Thread ID of lock owner. Zero if not using LinuxThreads */
    +#endif
    +};
    +
    +/*
    +** An instance of the following structure is allocated for each open
    +** inode.  Or, on LinuxThreads, there is one of these structures for
    +** each inode opened by each thread.
    +**
    +** A single inode can have multiple file descriptors, so each unixFile
    +** structure contains a pointer to an instance of this object and this
    +** object keeps a count of the number of unixFile pointing to it.
    +*/
    +struct unixLockInfo {
    +  struct unixLockKey lockKey;     /* The lookup key */
    +  int cnt;                        /* Number of SHARED locks held */
    +  int locktype;                   /* One of SHARED_LOCK, RESERVED_LOCK etc. */
    +  int nRef;                       /* Number of pointers to this structure */
    +  struct unixLockInfo *pNext;     /* List of all unixLockInfo objects */
    +  struct unixLockInfo *pPrev;     /*    .... doubly linked */
    +};
    +
    +/*
    +** An instance of the following structure is allocated for each open
    +** inode.  This structure keeps track of the number of locks on that
    +** inode.  If a close is attempted against an inode that is holding
    +** locks, the close is deferred until all locks clear by adding the
    +** file descriptor to be closed to the pending list.
    +**
    +** TODO:  Consider changing this so that there is only a single file
    +** descriptor for each open file, even when it is opened multiple times.
    +** The close() system call would only occur when the last database
    +** using the file closes.
    +*/
    +struct unixOpenCnt {
    +  struct unixFileId fileId;   /* The lookup key */
    +  int nRef;                   /* Number of pointers to this structure */
    +  int nLock;                  /* Number of outstanding locks */
    +  UnixUnusedFd *pUnused;      /* Unused file descriptors to close */
    +#if OS_VXWORKS
    +  sem_t *pSem;                     /* Named POSIX semaphore */
    +  char aSemName[MAX_PATHNAME+2];   /* Name of that semaphore */
    +#endif
    +  struct unixOpenCnt *pNext, *pPrev;   /* List of all unixOpenCnt objects */
    +};
    +
    +/*
    +** Lists of all unixLockInfo and unixOpenCnt objects.  These used to be hash
    +** tables.  But the number of objects is rarely more than a dozen and
    +** never exceeds a few thousand.  And lookup is not on a critical
    +** path so a simple linked list will suffice.
    +*/
    +static struct unixLockInfo *lockList = 0;
    +static struct unixOpenCnt *openList = 0;
    +
    +/*
    +** This variable remembers whether or not threads can override each others
    +** locks.
    +**
    +**    0:  No.  Threads cannot override each others locks.  (LinuxThreads)
    +**    1:  Yes.  Threads can override each others locks.  (Posix & NLPT)
    +**   -1:  We don't know yet.
    +**
    +** On some systems, we know at compile-time if threads can override each
    +** others locks.  On those systems, the SQLITE_THREAD_OVERRIDE_LOCK macro
    +** will be set appropriately.  On other systems, we have to check at
    +** runtime.  On these latter systems, SQLTIE_THREAD_OVERRIDE_LOCK is
    +** undefined.
    +**
    +** This variable normally has file scope only.  But during testing, we make
    +** it a global so that the test code can change its value in order to verify
    +** that the right stuff happens in either case.
    +*/
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +#  ifndef SQLITE_THREAD_OVERRIDE_LOCK
    +#    define SQLITE_THREAD_OVERRIDE_LOCK -1
    +#  endif
    +#  ifdef SQLITE_TEST
    +int threadsOverrideEachOthersLocks = SQLITE_THREAD_OVERRIDE_LOCK;
    +#  else
    +static int threadsOverrideEachOthersLocks = SQLITE_THREAD_OVERRIDE_LOCK;
    +#  endif
    +#endif
    +
    +/*
    +** This structure holds information passed into individual test
    +** threads by the testThreadLockingBehavior() routine.
    +*/
    +struct threadTestData {
    +  int fd;                /* File to be locked */
    +  struct flock lock;     /* The locking operation */
    +  int result;            /* Result of the locking operation */
    +};
    +
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +/*
    +** This function is used as the main routine for a thread launched by
    +** testThreadLockingBehavior(). It tests whether the shared-lock obtained
    +** by the main thread in testThreadLockingBehavior() conflicts with a
    +** hypothetical write-lock obtained by this thread on the same file.
    +**
    +** The write-lock is not actually acquired, as this is not possible if 
    +** the file is open in read-only mode (see ticket #3472).
    +*/ 
    +static void *threadLockingTest(void *pArg){
    +  struct threadTestData *pData = (struct threadTestData*)pArg;
    +  pData->result = fcntl(pData->fd, F_GETLK, &pData->lock);
    +  return pArg;
    +}
    +#endif /* SQLITE_THREADSAFE && defined(__linux__) */
    +
    +
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +/*
    +** This procedure attempts to determine whether or not threads
    +** can override each others locks then sets the 
    +** threadsOverrideEachOthersLocks variable appropriately.
    +*/
    +static void testThreadLockingBehavior(int fd_orig){
    +  int fd;
    +  int rc;
    +  struct threadTestData d;
    +  struct flock l;
    +  pthread_t t;
    +
    +  fd = dup(fd_orig);
    +  if( fd<0 ) return;
    +  memset(&l, 0, sizeof(l));
    +  l.l_type = F_RDLCK;
    +  l.l_len = 1;
    +  l.l_start = 0;
    +  l.l_whence = SEEK_SET;
    +  rc = fcntl(fd_orig, F_SETLK, &l);
    +  if( rc!=0 ) return;
    +  memset(&d, 0, sizeof(d));
    +  d.fd = fd;
    +  d.lock = l;
    +  d.lock.l_type = F_WRLCK;
    +  if( pthread_create(&t, 0, threadLockingTest, &d)==0 ){
    +    pthread_join(t, 0);
    +  }
    +  close(fd);
    +  if( d.result!=0 ) return;
    +  threadsOverrideEachOthersLocks = (d.lock.l_type==F_UNLCK);
    +}
    +#endif /* SQLITE_THREADSAFE && defined(__linux__) */
    +
    +/*
    +** Release a unixLockInfo structure previously allocated by findLockInfo().
    +**
    +** The mutex entered using the unixEnterMutex() function must be held
    +** when this function is called.
    +*/
    +static void releaseLockInfo(struct unixLockInfo *pLock){
    +  assert( unixMutexHeld() );
    +  if( pLock ){
    +    pLock->nRef--;
    +    if( pLock->nRef==0 ){
    +      if( pLock->pPrev ){
    +        assert( pLock->pPrev->pNext==pLock );
    +        pLock->pPrev->pNext = pLock->pNext;
    +      }else{
    +        assert( lockList==pLock );
    +        lockList = pLock->pNext;
    +      }
    +      if( pLock->pNext ){
    +        assert( pLock->pNext->pPrev==pLock );
    +        pLock->pNext->pPrev = pLock->pPrev;
    +      }
    +      sqlite3_free(pLock);
    +    }
    +  }
    +}
    +
    +/*
    +** Release a unixOpenCnt structure previously allocated by findLockInfo().
    +**
    +** The mutex entered using the unixEnterMutex() function must be held
    +** when this function is called.
    +*/
    +static void releaseOpenCnt(struct unixOpenCnt *pOpen){
    +  assert( unixMutexHeld() );
    +  if( pOpen ){
    +    pOpen->nRef--;
    +    if( pOpen->nRef==0 ){
    +      if( pOpen->pPrev ){
    +        assert( pOpen->pPrev->pNext==pOpen );
    +        pOpen->pPrev->pNext = pOpen->pNext;
    +      }else{
    +        assert( openList==pOpen );
    +        openList = pOpen->pNext;
    +      }
    +      if( pOpen->pNext ){
    +        assert( pOpen->pNext->pPrev==pOpen );
    +        pOpen->pNext->pPrev = pOpen->pPrev;
    +      }
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +      assert( !pOpen->pUnused || threadsOverrideEachOthersLocks==0 );
    +#endif
    +
    +      /* If pOpen->pUnused is not null, then memory and file-descriptors
    +      ** are leaked.
    +      **
    +      ** This will only happen if, under Linuxthreads, the user has opened
    +      ** a transaction in one thread, then attempts to close the database
    +      ** handle from another thread (without first unlocking the db file).
    +      ** This is a misuse.  */
    +      sqlite3_free(pOpen);
    +    }
    +  }
    +}
    +
    +/*
    +** Given a file descriptor, locate unixLockInfo and unixOpenCnt structures that
    +** describes that file descriptor.  Create new ones if necessary.  The
    +** return values might be uninitialized if an error occurs.
    +**
    +** The mutex entered using the unixEnterMutex() function must be held
    +** when this function is called.
    +**
    +** Return an appropriate error code.
    +*/
    +static int findLockInfo(
    +  unixFile *pFile,               /* Unix file with file desc used in the key */
    +  struct unixLockInfo **ppLock,  /* Return the unixLockInfo structure here */
    +  struct unixOpenCnt **ppOpen    /* Return the unixOpenCnt structure here */
    +){
    +  int rc;                        /* System call return code */
    +  int fd;                        /* The file descriptor for pFile */
    +  struct unixLockKey lockKey;    /* Lookup key for the unixLockInfo structure */
    +  struct unixFileId fileId;      /* Lookup key for the unixOpenCnt struct */
    +  struct stat statbuf;           /* Low-level file information */
    +  struct unixLockInfo *pLock = 0;/* Candidate unixLockInfo object */
    +  struct unixOpenCnt *pOpen;     /* Candidate unixOpenCnt object */
    +
    +  assert( unixMutexHeld() );
    +
    +  /* Get low-level information about the file that we can used to
    +  ** create a unique name for the file.
    +  */
    +  fd = pFile->h;
    +  rc = fstat(fd, &statbuf);
    +  if( rc!=0 ){
    +    pFile->lastErrno = errno;
    +#ifdef EOVERFLOW
    +    if( pFile->lastErrno==EOVERFLOW ) return SQLITE_NOLFS;
    +#endif
    +    return SQLITE_IOERR;
    +  }
    +
    +#ifdef __APPLE__
    +  /* On OS X on an msdos filesystem, the inode number is reported
    +  ** incorrectly for zero-size files.  See ticket #3260.  To work
    +  ** around this problem (we consider it a bug in OS X, not SQLite)
    +  ** we always increase the file size to 1 by writing a single byte
    +  ** prior to accessing the inode number.  The one byte written is
    +  ** an ASCII 'S' character which also happens to be the first byte
    +  ** in the header of every SQLite database.  In this way, if there
    +  ** is a race condition such that another thread has already populated
    +  ** the first page of the database, no damage is done.
    +  */
    +  if( statbuf.st_size==0 ){
    +    rc = write(fd, "S", 1);
    +    if( rc!=1 ){
    +      return SQLITE_IOERR;
    +    }
    +    rc = fstat(fd, &statbuf);
    +    if( rc!=0 ){
    +      pFile->lastErrno = errno;
    +      return SQLITE_IOERR;
    +    }
    +  }
    +#endif
    +
    +  memset(&lockKey, 0, sizeof(lockKey));
    +  lockKey.fid.dev = statbuf.st_dev;
    +#if OS_VXWORKS
    +  lockKey.fid.pId = pFile->pId;
    +#else
    +  lockKey.fid.ino = statbuf.st_ino;
    +#endif
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +  if( threadsOverrideEachOthersLocks<0 ){
    +    testThreadLockingBehavior(fd);
    +  }
    +  lockKey.tid = threadsOverrideEachOthersLocks ? 0 : pthread_self();
    +#endif
    +  fileId = lockKey.fid;
    +  if( ppLock!=0 ){
    +    pLock = lockList;
    +    while( pLock && memcmp(&lockKey, &pLock->lockKey, sizeof(lockKey)) ){
    +      pLock = pLock->pNext;
    +    }
    +    if( pLock==0 ){
    +      pLock = sqlite3_malloc( sizeof(*pLock) );
    +      if( pLock==0 ){
    +        rc = SQLITE_NOMEM;
    +        goto exit_findlockinfo;
    +      }
    +      memcpy(&pLock->lockKey,&lockKey,sizeof(lockKey));
    +      pLock->nRef = 1;
    +      pLock->cnt = 0;
    +      pLock->locktype = 0;
    +      pLock->pNext = lockList;
    +      pLock->pPrev = 0;
    +      if( lockList ) lockList->pPrev = pLock;
    +      lockList = pLock;
    +    }else{
    +      pLock->nRef++;
    +    }
    +    *ppLock = pLock;
    +  }
    +  if( ppOpen!=0 ){
    +    pOpen = openList;
    +    while( pOpen && memcmp(&fileId, &pOpen->fileId, sizeof(fileId)) ){
    +      pOpen = pOpen->pNext;
    +    }
    +    if( pOpen==0 ){
    +      pOpen = sqlite3_malloc( sizeof(*pOpen) );
    +      if( pOpen==0 ){
    +        releaseLockInfo(pLock);
    +        rc = SQLITE_NOMEM;
    +        goto exit_findlockinfo;
    +      }
    +      memset(pOpen, 0, sizeof(*pOpen));
    +      pOpen->fileId = fileId;
    +      pOpen->nRef = 1;
    +      pOpen->pNext = openList;
    +      if( openList ) openList->pPrev = pOpen;
    +      openList = pOpen;
    +    }else{
    +      pOpen->nRef++;
    +    }
    +    *ppOpen = pOpen;
    +  }
    +
    +exit_findlockinfo:
    +  return rc;
    +}
    +
    +/*
    +** If we are currently in a different thread than the thread that the
    +** unixFile argument belongs to, then transfer ownership of the unixFile
    +** over to the current thread.
    +**
    +** A unixFile is only owned by a thread on systems that use LinuxThreads.
    +**
    +** Ownership transfer is only allowed if the unixFile is currently unlocked.
    +** If the unixFile is locked and an ownership is wrong, then return
    +** SQLITE_MISUSE.  SQLITE_OK is returned if everything works.
    +*/
    +#if SQLITE_THREADSAFE && defined(__linux__)
    +static int transferOwnership(unixFile *pFile){
    +  int rc;
    +  pthread_t hSelf;
    +  if( threadsOverrideEachOthersLocks ){
    +    /* Ownership transfers not needed on this system */
    +    return SQLITE_OK;
    +  }
    +  hSelf = pthread_self();
    +  if( pthread_equal(pFile->tid, hSelf) ){
    +    /* We are still in the same thread */
    +    OSTRACE1("No-transfer, same thread\n");
    +    return SQLITE_OK;
    +  }
    +  if( pFile->locktype!=NO_LOCK ){
    +    /* We cannot change ownership while we are holding a lock! */
    +    return SQLITE_MISUSE;
    +  }
    +  OSTRACE4("Transfer ownership of %d from %d to %d\n",
    +            pFile->h, pFile->tid, hSelf);
    +  pFile->tid = hSelf;
    +  if (pFile->pLock != NULL) {
    +    releaseLockInfo(pFile->pLock);
    +    rc = findLockInfo(pFile, &pFile->pLock, 0);
    +    OSTRACE5("LOCK    %d is now %s(%s,%d)\n", pFile->h,
    +           locktypeName(pFile->locktype),
    +           locktypeName(pFile->pLock->locktype), pFile->pLock->cnt);
    +    return rc;
    +  } else {
    +    return SQLITE_OK;
    +  }
    +}
    +#else  /* if not SQLITE_THREADSAFE */
    +  /* On single-threaded builds, ownership transfer is a no-op */
    +# define transferOwnership(X) SQLITE_OK
    +#endif /* SQLITE_THREADSAFE */
    +
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +*/
    +static int unixCheckReservedLock(sqlite3_file *id, int *pResOut){
    +  int rc = SQLITE_OK;
    +  int reserved = 0;
    +  unixFile *pFile = (unixFile*)id;
    +
    +  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
    +
    +  assert( pFile );
    +  unixEnterMutex(); /* Because pFile->pLock is shared across threads */
    +
    +  /* Check if a thread in this process holds such a lock */
    +  if( pFile->pLock->locktype>SHARED_LOCK ){
    +    reserved = 1;
    +  }
    +
    +  /* Otherwise see if some other process holds it.
    +  */
    +#ifndef __DJGPP__
    +  if( !reserved ){
    +    struct flock lock;
    +    lock.l_whence = SEEK_SET;
    +    lock.l_start = RESERVED_BYTE;
    +    lock.l_len = 1;
    +    lock.l_type = F_WRLCK;
    +    if (-1 == fcntl(pFile->h, F_GETLK, &lock)) {
    +      int tErrno = errno;
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_CHECKRESERVEDLOCK);
    +      pFile->lastErrno = tErrno;
    +    } else if( lock.l_type!=F_UNLCK ){
    +      reserved = 1;
    +    }
    +  }
    +#endif
    +  
    +  unixLeaveMutex();
    +  OSTRACE4("TEST WR-LOCK %d %d %d\n", pFile->h, rc, reserved);
    +
    +  *pResOut = reserved;
    +  return rc;
    +}
    +
    +/*
    +** Perform a file locking operation on a range of bytes in a file.
    +** The "op" parameter should be one of F_RDLCK, F_WRLCK, or F_UNLCK.
    +** Return 0 on success or -1 for failure.  On failure, write the error
    +** code into *pErrcode.
    +**
    +** If the SQLITE_WHOLE_FILE_LOCKING bit is clear, then only lock
    +** the range of bytes on the locking page between SHARED_FIRST and
    +** SHARED_SIZE.  If SQLITE_WHOLE_FILE_LOCKING is set, then lock all
    +** bytes from 0 up to but not including PENDING_BYTE, and all bytes
    +** that follow SHARED_FIRST.
    +**
    +** In other words, of SQLITE_WHOLE_FILE_LOCKING if false (the historical
    +** default case) then only lock a small range of bytes from SHARED_FIRST
    +** through SHARED_FIRST+SHARED_SIZE-1.  But if SQLITE_WHOLE_FILE_LOCKING is
    +** true then lock every byte in the file except for PENDING_BYTE and
    +** RESERVED_BYTE.
    +**
    +** SQLITE_WHOLE_FILE_LOCKING=true overlaps SQLITE_WHOLE_FILE_LOCKING=false
    +** and so the locking schemes are compatible.  One type of lock will
    +** effectively exclude the other type.  The reason for using the
    +** SQLITE_WHOLE_FILE_LOCKING=true is that by indicating the full range
    +** of bytes to be read or written, we give hints to NFS to help it
    +** maintain cache coherency.  On the other hand, whole file locking
    +** is slower, so we don't want to use it except for NFS.
    +*/
    +static int rangeLock(unixFile *pFile, int op, int *pErrcode){
    +  struct flock lock;
    +  int rc;
    +  lock.l_type = op;
    +  lock.l_start = SHARED_FIRST;
    +  lock.l_whence = SEEK_SET;
    +  if( (pFile->fileFlags & SQLITE_WHOLE_FILE_LOCKING)==0 ){
    +    lock.l_len = SHARED_SIZE;
    +    rc = fcntl(pFile->h, F_SETLK, &lock);
    +    *pErrcode = errno;
    +  }else{
    +    lock.l_len = 0;
    +    rc = fcntl(pFile->h, F_SETLK, &lock);
    +    *pErrcode = errno;
    +    if( NEVER(op==F_UNLCK) || rc!=(-1) ){
    +      lock.l_start = 0;
    +      lock.l_len = PENDING_BYTE;
    +      rc = fcntl(pFile->h, F_SETLK, &lock);
    +      if( ALWAYS(op!=F_UNLCK) && rc==(-1) ){
    +        *pErrcode = errno;
    +        lock.l_type = F_UNLCK;
    +        lock.l_start = SHARED_FIRST;
    +        lock.l_len = 0;
    +        fcntl(pFile->h, F_SETLK, &lock);
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +*/
    +static int unixLock(sqlite3_file *id, int locktype){
    +  /* The following describes the implementation of the various locks and
    +  ** lock transitions in terms of the POSIX advisory shared and exclusive
    +  ** lock primitives (called read-locks and write-locks below, to avoid
    +  ** confusion with SQLite lock names). The algorithms are complicated
    +  ** slightly in order to be compatible with windows systems simultaneously
    +  ** accessing the same database file, in case that is ever required.
    +  **
    +  ** Symbols defined in os.h indentify the 'pending byte' and the 'reserved
    +  ** byte', each single bytes at well known offsets, and the 'shared byte
    +  ** range', a range of 510 bytes at a well known offset.
    +  **
    +  ** To obtain a SHARED lock, a read-lock is obtained on the 'pending
    +  ** byte'.  If this is successful, a random byte from the 'shared byte
    +  ** range' is read-locked and the lock on the 'pending byte' released.
    +  **
    +  ** A process may only obtain a RESERVED lock after it has a SHARED lock.
    +  ** A RESERVED lock is implemented by grabbing a write-lock on the
    +  ** 'reserved byte'. 
    +  **
    +  ** A process may only obtain a PENDING lock after it has obtained a
    +  ** SHARED lock. A PENDING lock is implemented by obtaining a write-lock
    +  ** on the 'pending byte'. This ensures that no new SHARED locks can be
    +  ** obtained, but existing SHARED locks are allowed to persist. A process
    +  ** does not have to obtain a RESERVED lock on the way to a PENDING lock.
    +  ** This property is used by the algorithm for rolling back a journal file
    +  ** after a crash.
    +  **
    +  ** An EXCLUSIVE lock, obtained after a PENDING lock is held, is
    +  ** implemented by obtaining a write-lock on the entire 'shared byte
    +  ** range'. Since all other locks require a read-lock on one of the bytes
    +  ** within this range, this ensures that no other locks are held on the
    +  ** database. 
    +  **
    +  ** The reason a single byte cannot be used instead of the 'shared byte
    +  ** range' is that some versions of windows do not support read-locks. By
    +  ** locking a random byte from a range, concurrent SHARED locks may exist
    +  ** even if the locking primitive used is always a write-lock.
    +  */
    +  int rc = SQLITE_OK;
    +  unixFile *pFile = (unixFile*)id;
    +  struct unixLockInfo *pLock = pFile->pLock;
    +  struct flock lock;
    +  int s = 0;
    +  int tErrno;
    +
    +  assert( pFile );
    +  OSTRACE7("LOCK    %d %s was %s(%s,%d) pid=%d\n", pFile->h,
    +      locktypeName(locktype), locktypeName(pFile->locktype),
    +      locktypeName(pLock->locktype), pLock->cnt , getpid());
    +
    +  /* If there is already a lock of this type or more restrictive on the
    +  ** unixFile, do nothing. Don't use the end_lock: exit path, as
    +  ** unixEnterMutex() hasn't been called yet.
    +  */
    +  if( pFile->locktype>=locktype ){
    +    OSTRACE3("LOCK    %d %s ok (already held)\n", pFile->h,
    +            locktypeName(locktype));
    +    return SQLITE_OK;
    +  }
    +
    +  /* Make sure the locking sequence is correct.
    +  **  (1) We never move from unlocked to anything higher than shared lock.
    +  **  (2) SQLite never explicitly requests a pendig lock.
    +  **  (3) A shared lock is always held when a reserve lock is requested.
    +  */
    +  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
    +  assert( locktype!=PENDING_LOCK );
    +  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
    +
    +  /* This mutex is needed because pFile->pLock is shared across threads
    +  */
    +  unixEnterMutex();
    +
    +  /* Make sure the current thread owns the pFile.
    +  */
    +  rc = transferOwnership(pFile);
    +  if( rc!=SQLITE_OK ){
    +    unixLeaveMutex();
    +    return rc;
    +  }
    +  pLock = pFile->pLock;
    +
    +  /* If some thread using this PID has a lock via a different unixFile*
    +  ** handle that precludes the requested lock, return BUSY.
    +  */
    +  if( (pFile->locktype!=pLock->locktype && 
    +          (pLock->locktype>=PENDING_LOCK || locktype>SHARED_LOCK))
    +  ){
    +    rc = SQLITE_BUSY;
    +    goto end_lock;
    +  }
    +
    +  /* If a SHARED lock is requested, and some thread using this PID already
    +  ** has a SHARED or RESERVED lock, then increment reference counts and
    +  ** return SQLITE_OK.
    +  */
    +  if( locktype==SHARED_LOCK && 
    +      (pLock->locktype==SHARED_LOCK || pLock->locktype==RESERVED_LOCK) ){
    +    assert( locktype==SHARED_LOCK );
    +    assert( pFile->locktype==0 );
    +    assert( pLock->cnt>0 );
    +    pFile->locktype = SHARED_LOCK;
    +    pLock->cnt++;
    +    pFile->pOpen->nLock++;
    +    goto end_lock;
    +  }
    +
    +
    +  /* A PENDING lock is needed before acquiring a SHARED lock and before
    +  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will
    +  ** be released.
    +  */
    +  lock.l_len = 1L;
    +  lock.l_whence = SEEK_SET;
    +  if( locktype==SHARED_LOCK 
    +      || (locktype==EXCLUSIVE_LOCK && pFile->locktype<PENDING_LOCK)
    +  ){
    +    lock.l_type = (locktype==SHARED_LOCK?F_RDLCK:F_WRLCK);
    +    lock.l_start = PENDING_BYTE;
    +    s = fcntl(pFile->h, F_SETLK, &lock);
    +    if( s==(-1) ){
    +      tErrno = errno;
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
    +      if( IS_LOCK_ERROR(rc) ){
    +        pFile->lastErrno = tErrno;
    +      }
    +      goto end_lock;
    +    }
    +  }
    +
    +
    +  /* If control gets to this point, then actually go ahead and make
    +  ** operating system calls for the specified lock.
    +  */
    +  if( locktype==SHARED_LOCK ){
    +    assert( pLock->cnt==0 );
    +    assert( pLock->locktype==0 );
    +
    +    /* Now get the read-lock */
    +    s = rangeLock(pFile, F_RDLCK, &tErrno);
    +
    +    /* Drop the temporary PENDING lock */
    +    lock.l_start = PENDING_BYTE;
    +    lock.l_len = 1L;
    +    lock.l_type = F_UNLCK;
    +    if( fcntl(pFile->h, F_SETLK, &lock)!=0 ){
    +      if( s != -1 ){
    +        /* This could happen with a network mount */
    +        tErrno = errno; 
    +        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); 
    +        if( IS_LOCK_ERROR(rc) ){
    +          pFile->lastErrno = tErrno;
    +        }
    +        goto end_lock;
    +      }
    +    }
    +    if( s==(-1) ){
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
    +      if( IS_LOCK_ERROR(rc) ){
    +        pFile->lastErrno = tErrno;
    +      }
    +    }else{
    +      pFile->locktype = SHARED_LOCK;
    +      pFile->pOpen->nLock++;
    +      pLock->cnt = 1;
    +    }
    +  }else if( locktype==EXCLUSIVE_LOCK && pLock->cnt>1 ){
    +    /* We are trying for an exclusive lock but another thread in this
    +    ** same process is still holding a shared lock. */
    +    rc = SQLITE_BUSY;
    +  }else{
    +    /* The request was for a RESERVED or EXCLUSIVE lock.  It is
    +    ** assumed that there is a SHARED or greater lock on the file
    +    ** already.
    +    */
    +    assert( 0!=pFile->locktype );
    +    lock.l_type = F_WRLCK;
    +    switch( locktype ){
    +      case RESERVED_LOCK:
    +        lock.l_start = RESERVED_BYTE;
    +        s = fcntl(pFile->h, F_SETLK, &lock);
    +        tErrno = errno;
    +        break;
    +      case EXCLUSIVE_LOCK:
    +        s = rangeLock(pFile, F_WRLCK, &tErrno);
    +        break;
    +      default:
    +        assert(0);
    +    }
    +    if( s==(-1) ){
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
    +      if( IS_LOCK_ERROR(rc) ){
    +        pFile->lastErrno = tErrno;
    +      }
    +    }
    +  }
    +  
    +
    +#ifndef NDEBUG
    +  /* Set up the transaction-counter change checking flags when
    +  ** transitioning from a SHARED to a RESERVED lock.  The change
    +  ** from SHARED to RESERVED marks the beginning of a normal
    +  ** write operation (not a hot journal rollback).
    +  */
    +  if( rc==SQLITE_OK
    +   && pFile->locktype<=SHARED_LOCK
    +   && locktype==RESERVED_LOCK
    +  ){
    +    pFile->transCntrChng = 0;
    +    pFile->dbUpdate = 0;
    +    pFile->inNormalWrite = 1;
    +  }
    +#endif
    +
    +
    +  if( rc==SQLITE_OK ){
    +    pFile->locktype = locktype;
    +    pLock->locktype = locktype;
    +  }else if( locktype==EXCLUSIVE_LOCK ){
    +    pFile->locktype = PENDING_LOCK;
    +    pLock->locktype = PENDING_LOCK;
    +  }
    +
    +end_lock:
    +  unixLeaveMutex();
    +  OSTRACE4("LOCK    %d %s %s\n", pFile->h, locktypeName(locktype), 
    +      rc==SQLITE_OK ? "ok" : "failed");
    +  return rc;
    +}
    +
    +/*
    +** Close all file descriptors accumuated in the unixOpenCnt->pUnused list.
    +** If all such file descriptors are closed without error, the list is
    +** cleared and SQLITE_OK returned.
    +**
    +** Otherwise, if an error occurs, then successfully closed file descriptor
    +** entries are removed from the list, and SQLITE_IOERR_CLOSE returned. 
    +** not deleted and SQLITE_IOERR_CLOSE returned.
    +*/ 
    +static int closePendingFds(unixFile *pFile){
    +  int rc = SQLITE_OK;
    +  struct unixOpenCnt *pOpen = pFile->pOpen;
    +  UnixUnusedFd *pError = 0;
    +  UnixUnusedFd *p;
    +  UnixUnusedFd *pNext;
    +  for(p=pOpen->pUnused; p; p=pNext){
    +    pNext = p->pNext;
    +    if( close(p->fd) ){
    +      pFile->lastErrno = errno;
    +      rc = SQLITE_IOERR_CLOSE;
    +      p->pNext = pError;
    +      pError = p;
    +    }else{
    +      sqlite3_free(p);
    +    }
    +  }
    +  pOpen->pUnused = pError;
    +  return rc;
    +}
    +
    +/*
    +** Add the file descriptor used by file handle pFile to the corresponding
    +** pUnused list.
    +*/
    +static void setPendingFd(unixFile *pFile){
    +  struct unixOpenCnt *pOpen = pFile->pOpen;
    +  UnixUnusedFd *p = pFile->pUnused;
    +  p->pNext = pOpen->pUnused;
    +  pOpen->pUnused = p;
    +  pFile->h = -1;
    +  pFile->pUnused = 0;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +*/
    +static int unixUnlock(sqlite3_file *id, int locktype){
    +  unixFile *pFile = (unixFile*)id; /* The open file */
    +  struct unixLockInfo *pLock;      /* Structure describing current lock state */
    +  struct flock lock;               /* Information passed into fcntl() */
    +  int rc = SQLITE_OK;              /* Return code from this interface */
    +  int h;                           /* The underlying file descriptor */
    +  int tErrno;                      /* Error code from system call errors */
    +
    +  assert( pFile );
    +  OSTRACE7("UNLOCK  %d %d was %d(%d,%d) pid=%d\n", pFile->h, locktype,
    +      pFile->locktype, pFile->pLock->locktype, pFile->pLock->cnt, getpid());
    +
    +  assert( locktype<=SHARED_LOCK );
    +  if( pFile->locktype<=locktype ){
    +    return SQLITE_OK;
    +  }
    +  if( CHECK_THREADID(pFile) ){
    +    return SQLITE_MISUSE;
    +  }
    +  unixEnterMutex();
    +  h = pFile->h;
    +  pLock = pFile->pLock;
    +  assert( pLock->cnt!=0 );
    +  if( pFile->locktype>SHARED_LOCK ){
    +    assert( pLock->locktype==pFile->locktype );
    +    SimulateIOErrorBenign(1);
    +    SimulateIOError( h=(-1) )
    +    SimulateIOErrorBenign(0);
    +
    +#ifndef NDEBUG
    +    /* When reducing a lock such that other processes can start
    +    ** reading the database file again, make sure that the
    +    ** transaction counter was updated if any part of the database
    +    ** file changed.  If the transaction counter is not updated,
    +    ** other connections to the same file might not realize that
    +    ** the file has changed and hence might not know to flush their
    +    ** cache.  The use of a stale cache can lead to database corruption.
    +    */
    +    assert( pFile->inNormalWrite==0
    +         || pFile->dbUpdate==0
    +         || pFile->transCntrChng==1 );
    +    pFile->inNormalWrite = 0;
    +#endif
    +
    +
    +    if( locktype==SHARED_LOCK ){
    +      if( rangeLock(pFile, F_RDLCK, &tErrno)==(-1) ){
    +        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK);
    +        if( IS_LOCK_ERROR(rc) ){
    +          pFile->lastErrno = tErrno;
    +        }
    +        goto end_unlock;
    +      }
    +    }
    +    lock.l_type = F_UNLCK;
    +    lock.l_whence = SEEK_SET;
    +    lock.l_start = PENDING_BYTE;
    +    lock.l_len = 2L;  assert( PENDING_BYTE+1==RESERVED_BYTE );
    +    if( fcntl(h, F_SETLK, &lock)!=(-1) ){
    +      pLock->locktype = SHARED_LOCK;
    +    }else{
    +      tErrno = errno;
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
    +      if( IS_LOCK_ERROR(rc) ){
    +        pFile->lastErrno = tErrno;
    +      }
    +      goto end_unlock;
    +    }
    +  }
    +  if( locktype==NO_LOCK ){
    +    struct unixOpenCnt *pOpen;
    +
    +    /* Decrement the shared lock counter.  Release the lock using an
    +    ** OS call only when all threads in this same process have released
    +    ** the lock.
    +    */
    +    pLock->cnt--;
    +    if( pLock->cnt==0 ){
    +      lock.l_type = F_UNLCK;
    +      lock.l_whence = SEEK_SET;
    +      lock.l_start = lock.l_len = 0L;
    +      SimulateIOErrorBenign(1);
    +      SimulateIOError( h=(-1) )
    +      SimulateIOErrorBenign(0);
    +      if( fcntl(h, F_SETLK, &lock)!=(-1) ){
    +        pLock->locktype = NO_LOCK;
    +      }else{
    +        tErrno = errno;
    +        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
    +        if( IS_LOCK_ERROR(rc) ){
    +          pFile->lastErrno = tErrno;
    +        }
    +        pLock->locktype = NO_LOCK;
    +        pFile->locktype = NO_LOCK;
    +      }
    +    }
    +
    +    /* Decrement the count of locks against this same file.  When the
    +    ** count reaches zero, close any other file descriptors whose close
    +    ** was deferred because of outstanding locks.
    +    */
    +    pOpen = pFile->pOpen;
    +    pOpen->nLock--;
    +    assert( pOpen->nLock>=0 );
    +    if( pOpen->nLock==0 ){
    +      int rc2 = closePendingFds(pFile);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }
    +  }
    +	
    +end_unlock:
    +  unixLeaveMutex();
    +  if( rc==SQLITE_OK ) pFile->locktype = locktype;
    +  return rc;
    +}
    +
    +/*
    +** This function performs the parts of the "close file" operation 
    +** common to all locking schemes. It closes the directory and file
    +** handles, if they are valid, and sets all fields of the unixFile
    +** structure to 0.
    +**
    +** It is *not* necessary to hold the mutex when this routine is called,
    +** even on VxWorks.  A mutex will be acquired on VxWorks by the
    +** vxworksReleaseFileId() routine.
    +*/
    +static int closeUnixFile(sqlite3_file *id){
    +  unixFile *pFile = (unixFile*)id;
    +  if( pFile ){
    +    if( pFile->dirfd>=0 ){
    +      int err = close(pFile->dirfd);
    +      if( err ){
    +        pFile->lastErrno = errno;
    +        return SQLITE_IOERR_DIR_CLOSE;
    +      }else{
    +        pFile->dirfd=-1;
    +      }
    +    }
    +    if( pFile->h>=0 ){
    +      int err = close(pFile->h);
    +      if( err ){
    +        pFile->lastErrno = errno;
    +        return SQLITE_IOERR_CLOSE;
    +      }
    +    }
    +#if OS_VXWORKS
    +    if( pFile->pId ){
    +      if( pFile->isDelete ){
    +        unlink(pFile->pId->zCanonicalName);
    +      }
    +      vxworksReleaseFileId(pFile->pId);
    +      pFile->pId = 0;
    +    }
    +#endif
    +    OSTRACE2("CLOSE   %-3d\n", pFile->h);
    +    OpenCounter(-1);
    +    sqlite3_free(pFile->pUnused);
    +    memset(pFile, 0, sizeof(unixFile));
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close a file.
    +*/
    +static int unixClose(sqlite3_file *id){
    +  int rc = SQLITE_OK;
    +  if( id ){
    +    unixFile *pFile = (unixFile *)id;
    +    unixUnlock(id, NO_LOCK);
    +    unixEnterMutex();
    +    if( pFile->pOpen && pFile->pOpen->nLock ){
    +      /* If there are outstanding locks, do not actually close the file just
    +      ** yet because that would clear those locks.  Instead, add the file
    +      ** descriptor to pOpen->pUnused list.  It will be automatically closed 
    +      ** when the last lock is cleared.
    +      */
    +      setPendingFd(pFile);
    +    }
    +    releaseLockInfo(pFile->pLock);
    +    releaseOpenCnt(pFile->pOpen);
    +    rc = closeUnixFile(id);
    +    unixLeaveMutex();
    +  }
    +  return rc;
    +}
    +
    +/************** End of the posix advisory lock implementation *****************
    +******************************************************************************/
    +
    +/******************************************************************************
    +****************************** No-op Locking **********************************
    +**
    +** Of the various locking implementations available, this is by far the
    +** simplest:  locking is ignored.  No attempt is made to lock the database
    +** file for reading or writing.
    +**
    +** This locking mode is appropriate for use on read-only databases
    +** (ex: databases that are burned into CD-ROM, for example.)  It can
    +** also be used if the application employs some external mechanism to
    +** prevent simultaneous access of the same database by two or more
    +** database connections.  But there is a serious risk of database
    +** corruption if this locking mode is used in situations where multiple
    +** database connections are accessing the same database file at the same
    +** time and one or more of those connections are writing.
    +*/
    +
    +static int nolockCheckReservedLock(sqlite3_file *NotUsed, int *pResOut){
    +  UNUSED_PARAMETER(NotUsed);
    +  *pResOut = 0;
    +  return SQLITE_OK;
    +}
    +static int nolockLock(sqlite3_file *NotUsed, int NotUsed2){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  return SQLITE_OK;
    +}
    +static int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close the file.
    +*/
    +static int nolockClose(sqlite3_file *id) {
    +  return closeUnixFile(id);
    +}
    +
    +/******************* End of the no-op lock implementation *********************
    +******************************************************************************/
    +
    +/******************************************************************************
    +************************* Begin dot-file Locking ******************************
    +**
    +** The dotfile locking implementation uses the existance of separate lock
    +** files in order to control access to the database.  This works on just
    +** about every filesystem imaginable.  But there are serious downsides:
    +**
    +**    (1)  There is zero concurrency.  A single reader blocks all other
    +**         connections from reading or writing the database.
    +**
    +**    (2)  An application crash or power loss can leave stale lock files
    +**         sitting around that need to be cleared manually.
    +**
    +** Nevertheless, a dotlock is an appropriate locking mode for use if no
    +** other locking strategy is available.
    +**
    +** Dotfile locking works by creating a file in the same directory as the
    +** database and with the same name but with a ".lock" extension added.
    +** The existance of a lock file implies an EXCLUSIVE lock.  All other lock
    +** types (SHARED, RESERVED, PENDING) are mapped into EXCLUSIVE.
    +*/
    +
    +/*
    +** The file suffix added to the data base filename in order to create the
    +** lock file.
    +*/
    +#define DOTLOCK_SUFFIX ".lock"
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +**
    +** In dotfile locking, either a lock exists or it does not.  So in this
    +** variation of CheckReservedLock(), *pResOut is set to true if any lock
    +** is held on the file and false if the file is unlocked.
    +*/
    +static int dotlockCheckReservedLock(sqlite3_file *id, int *pResOut) {
    +  int rc = SQLITE_OK;
    +  int reserved = 0;
    +  unixFile *pFile = (unixFile*)id;
    +
    +  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
    +  
    +  assert( pFile );
    +
    +  /* Check if a thread in this process holds such a lock */
    +  if( pFile->locktype>SHARED_LOCK ){
    +    /* Either this connection or some other connection in the same process
    +    ** holds a lock on the file.  No need to check further. */
    +    reserved = 1;
    +  }else{
    +    /* The lock is held if and only if the lockfile exists */
    +    const char *zLockFile = (const char*)pFile->lockingContext;
    +    reserved = access(zLockFile, 0)==0;
    +  }
    +  OSTRACE4("TEST WR-LOCK %d %d %d\n", pFile->h, rc, reserved);
    +  *pResOut = reserved;
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +**
    +** With dotfile locking, we really only support state (4): EXCLUSIVE.
    +** But we track the other locking levels internally.
    +*/
    +static int dotlockLock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  int fd;
    +  char *zLockFile = (char *)pFile->lockingContext;
    +  int rc = SQLITE_OK;
    +
    +
    +  /* If we have any lock, then the lock file already exists.  All we have
    +  ** to do is adjust our internal record of the lock level.
    +  */
    +  if( pFile->locktype > NO_LOCK ){
    +    pFile->locktype = locktype;
    +#if !OS_VXWORKS
    +    /* Always update the timestamp on the old file */
    +    utimes(zLockFile, NULL);
    +#endif
    +    return SQLITE_OK;
    +  }
    +  
    +  /* grab an exclusive lock */
    +  fd = open(zLockFile,O_RDONLY|O_CREAT|O_EXCL,0600);
    +  if( fd<0 ){
    +    /* failed to open/create the file, someone else may have stolen the lock */
    +    int tErrno = errno;
    +    if( EEXIST == tErrno ){
    +      rc = SQLITE_BUSY;
    +    } else {
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
    +      if( IS_LOCK_ERROR(rc) ){
    +        pFile->lastErrno = tErrno;
    +      }
    +    }
    +    return rc;
    +  } 
    +  if( close(fd) ){
    +    pFile->lastErrno = errno;
    +    rc = SQLITE_IOERR_CLOSE;
    +  }
    +  
    +  /* got it, set the type and return ok */
    +  pFile->locktype = locktype;
    +  return rc;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +**
    +** When the locking level reaches NO_LOCK, delete the lock file.
    +*/
    +static int dotlockUnlock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  char *zLockFile = (char *)pFile->lockingContext;
    +
    +  assert( pFile );
    +  OSTRACE5("UNLOCK  %d %d was %d pid=%d\n", pFile->h, locktype,
    +	   pFile->locktype, getpid());
    +  assert( locktype<=SHARED_LOCK );
    +  
    +  /* no-op if possible */
    +  if( pFile->locktype==locktype ){
    +    return SQLITE_OK;
    +  }
    +
    +  /* To downgrade to shared, simply update our internal notion of the
    +  ** lock state.  No need to mess with the file on disk.
    +  */
    +  if( locktype==SHARED_LOCK ){
    +    pFile->locktype = SHARED_LOCK;
    +    return SQLITE_OK;
    +  }
    +  
    +  /* To fully unlock the database, delete the lock file */
    +  assert( locktype==NO_LOCK );
    +  if( unlink(zLockFile) ){
    +    int rc = 0;
    +    int tErrno = errno;
    +    if( ENOENT != tErrno ){
    +      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
    +    }
    +    if( IS_LOCK_ERROR(rc) ){
    +      pFile->lastErrno = tErrno;
    +    }
    +    return rc; 
    +  }
    +  pFile->locktype = NO_LOCK;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close a file.  Make sure the lock has been released before closing.
    +*/
    +static int dotlockClose(sqlite3_file *id) {
    +  int rc;
    +  if( id ){
    +    unixFile *pFile = (unixFile*)id;
    +    dotlockUnlock(id, NO_LOCK);
    +    sqlite3_free(pFile->lockingContext);
    +  }
    +  rc = closeUnixFile(id);
    +  return rc;
    +}
    +/****************** End of the dot-file lock implementation *******************
    +******************************************************************************/
    +
    +/******************************************************************************
    +************************** Begin flock Locking ********************************
    +**
    +** Use the flock() system call to do file locking.
    +**
    +** flock() locking is like dot-file locking in that the various
    +** fine-grain locking levels supported by SQLite are collapsed into
    +** a single exclusive lock.  In other words, SHARED, RESERVED, and
    +** PENDING locks are the same thing as an EXCLUSIVE lock.  SQLite
    +** still works when you do this, but concurrency is reduced since
    +** only a single process can be reading the database at a time.
    +**
    +** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off or if
    +** compiling for VXWORKS.
    +*/
    +#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +*/
    +static int flockCheckReservedLock(sqlite3_file *id, int *pResOut){
    +  int rc = SQLITE_OK;
    +  int reserved = 0;
    +  unixFile *pFile = (unixFile*)id;
    +  
    +  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
    +  
    +  assert( pFile );
    +  
    +  /* Check if a thread in this process holds such a lock */
    +  if( pFile->locktype>SHARED_LOCK ){
    +    reserved = 1;
    +  }
    +  
    +  /* Otherwise see if some other process holds it. */
    +  if( !reserved ){
    +    /* attempt to get the lock */
    +    int lrc = flock(pFile->h, LOCK_EX | LOCK_NB);
    +    if( !lrc ){
    +      /* got the lock, unlock it */
    +      lrc = flock(pFile->h, LOCK_UN);
    +      if ( lrc ) {
    +        int tErrno = errno;
    +        /* unlock failed with an error */
    +        lrc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); 
    +        if( IS_LOCK_ERROR(lrc) ){
    +          pFile->lastErrno = tErrno;
    +          rc = lrc;
    +        }
    +      }
    +    } else {
    +      int tErrno = errno;
    +      reserved = 1;
    +      /* someone else might have it reserved */
    +      lrc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK); 
    +      if( IS_LOCK_ERROR(lrc) ){
    +        pFile->lastErrno = tErrno;
    +        rc = lrc;
    +      }
    +    }
    +  }
    +  OSTRACE4("TEST WR-LOCK %d %d %d\n", pFile->h, rc, reserved);
    +
    +#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
    +  if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
    +    rc = SQLITE_OK;
    +    reserved=1;
    +  }
    +#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
    +  *pResOut = reserved;
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** flock() only really support EXCLUSIVE locks.  We track intermediate
    +** lock states in the sqlite3_file structure, but all locks SHARED or
    +** above are really EXCLUSIVE locks and exclude all other processes from
    +** access the file.
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +*/
    +static int flockLock(sqlite3_file *id, int locktype) {
    +  int rc = SQLITE_OK;
    +  unixFile *pFile = (unixFile*)id;
    +
    +  assert( pFile );
    +
    +  /* if we already have a lock, it is exclusive.  
    +  ** Just adjust level and punt on outta here. */
    +  if (pFile->locktype > NO_LOCK) {
    +    pFile->locktype = locktype;
    +    return SQLITE_OK;
    +  }
    +  
    +  /* grab an exclusive lock */
    +  
    +  if (flock(pFile->h, LOCK_EX | LOCK_NB)) {
    +    int tErrno = errno;
    +    /* didn't get, must be busy */
    +    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
    +    if( IS_LOCK_ERROR(rc) ){
    +      pFile->lastErrno = tErrno;
    +    }
    +  } else {
    +    /* got it, set the type and return ok */
    +    pFile->locktype = locktype;
    +  }
    +  OSTRACE4("LOCK    %d %s %s\n", pFile->h, locktypeName(locktype), 
    +           rc==SQLITE_OK ? "ok" : "failed");
    +#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
    +  if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
    +    rc = SQLITE_BUSY;
    +  }
    +#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
    +  return rc;
    +}
    +
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +*/
    +static int flockUnlock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  
    +  assert( pFile );
    +  OSTRACE5("UNLOCK  %d %d was %d pid=%d\n", pFile->h, locktype,
    +           pFile->locktype, getpid());
    +  assert( locktype<=SHARED_LOCK );
    +  
    +  /* no-op if possible */
    +  if( pFile->locktype==locktype ){
    +    return SQLITE_OK;
    +  }
    +  
    +  /* shared can just be set because we always have an exclusive */
    +  if (locktype==SHARED_LOCK) {
    +    pFile->locktype = locktype;
    +    return SQLITE_OK;
    +  }
    +  
    +  /* no, really, unlock. */
    +  int rc = flock(pFile->h, LOCK_UN);
    +  if (rc) {
    +    int r, tErrno = errno;
    +    r = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
    +    if( IS_LOCK_ERROR(r) ){
    +      pFile->lastErrno = tErrno;
    +    }
    +#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
    +    if( (r & SQLITE_IOERR) == SQLITE_IOERR ){
    +      r = SQLITE_BUSY;
    +    }
    +#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
    +    
    +    return r;
    +  } else {
    +    pFile->locktype = NO_LOCK;
    +    return SQLITE_OK;
    +  }
    +}
    +
    +/*
    +** Close a file.
    +*/
    +static int flockClose(sqlite3_file *id) {
    +  if( id ){
    +    flockUnlock(id, NO_LOCK);
    +  }
    +  return closeUnixFile(id);
    +}
    +
    +#endif /* SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORK */
    +
    +/******************* End of the flock lock implementation *********************
    +******************************************************************************/
    +
    +/******************************************************************************
    +************************ Begin Named Semaphore Locking ************************
    +**
    +** Named semaphore locking is only supported on VxWorks.
    +**
    +** Semaphore locking is like dot-lock and flock in that it really only
    +** supports EXCLUSIVE locking.  Only a single process can read or write
    +** the database file at a time.  This reduces potential concurrency, but
    +** makes the lock implementation much easier.
    +*/
    +#if OS_VXWORKS
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +*/
    +static int semCheckReservedLock(sqlite3_file *id, int *pResOut) {
    +  int rc = SQLITE_OK;
    +  int reserved = 0;
    +  unixFile *pFile = (unixFile*)id;
    +
    +  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
    +  
    +  assert( pFile );
    +
    +  /* Check if a thread in this process holds such a lock */
    +  if( pFile->locktype>SHARED_LOCK ){
    +    reserved = 1;
    +  }
    +  
    +  /* Otherwise see if some other process holds it. */
    +  if( !reserved ){
    +    sem_t *pSem = pFile->pOpen->pSem;
    +    struct stat statBuf;
    +
    +    if( sem_trywait(pSem)==-1 ){
    +      int tErrno = errno;
    +      if( EAGAIN != tErrno ){
    +        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_CHECKRESERVEDLOCK);
    +        pFile->lastErrno = tErrno;
    +      } else {
    +        /* someone else has the lock when we are in NO_LOCK */
    +        reserved = (pFile->locktype < SHARED_LOCK);
    +      }
    +    }else{
    +      /* we could have it if we want it */
    +      sem_post(pSem);
    +    }
    +  }
    +  OSTRACE4("TEST WR-LOCK %d %d %d\n", pFile->h, rc, reserved);
    +
    +  *pResOut = reserved;
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** Semaphore locks only really support EXCLUSIVE locks.  We track intermediate
    +** lock states in the sqlite3_file structure, but all locks SHARED or
    +** above are really EXCLUSIVE locks and exclude all other processes from
    +** access the file.
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +*/
    +static int semLock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  int fd;
    +  sem_t *pSem = pFile->pOpen->pSem;
    +  int rc = SQLITE_OK;
    +
    +  /* if we already have a lock, it is exclusive.  
    +  ** Just adjust level and punt on outta here. */
    +  if (pFile->locktype > NO_LOCK) {
    +    pFile->locktype = locktype;
    +    rc = SQLITE_OK;
    +    goto sem_end_lock;
    +  }
    +  
    +  /* lock semaphore now but bail out when already locked. */
    +  if( sem_trywait(pSem)==-1 ){
    +    rc = SQLITE_BUSY;
    +    goto sem_end_lock;
    +  }
    +
    +  /* got it, set the type and return ok */
    +  pFile->locktype = locktype;
    +
    + sem_end_lock:
    +  return rc;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +*/
    +static int semUnlock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  sem_t *pSem = pFile->pOpen->pSem;
    +
    +  assert( pFile );
    +  assert( pSem );
    +  OSTRACE5("UNLOCK  %d %d was %d pid=%d\n", pFile->h, locktype,
    +	   pFile->locktype, getpid());
    +  assert( locktype<=SHARED_LOCK );
    +  
    +  /* no-op if possible */
    +  if( pFile->locktype==locktype ){
    +    return SQLITE_OK;
    +  }
    +  
    +  /* shared can just be set because we always have an exclusive */
    +  if (locktype==SHARED_LOCK) {
    +    pFile->locktype = locktype;
    +    return SQLITE_OK;
    +  }
    +  
    +  /* no, really unlock. */
    +  if ( sem_post(pSem)==-1 ) {
    +    int rc, tErrno = errno;
    +    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
    +    if( IS_LOCK_ERROR(rc) ){
    +      pFile->lastErrno = tErrno;
    +    }
    +    return rc; 
    +  }
    +  pFile->locktype = NO_LOCK;
    +  return SQLITE_OK;
    +}
    +
    +/*
    + ** Close a file.
    + */
    +static int semClose(sqlite3_file *id) {
    +  if( id ){
    +    unixFile *pFile = (unixFile*)id;
    +    semUnlock(id, NO_LOCK);
    +    assert( pFile );
    +    unixEnterMutex();
    +    releaseLockInfo(pFile->pLock);
    +    releaseOpenCnt(pFile->pOpen);
    +    unixLeaveMutex();
    +    closeUnixFile(id);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#endif /* OS_VXWORKS */
    +/*
    +** Named semaphore locking is only available on VxWorks.
    +**
    +*************** End of the named semaphore lock implementation ****************
    +******************************************************************************/
    +
    +
    +/******************************************************************************
    +*************************** Begin AFP Locking *********************************
    +**
    +** AFP is the Apple Filing Protocol.  AFP is a network filesystem found
    +** on Apple Macintosh computers - both OS9 and OSX.
    +**
    +** Third-party implementations of AFP are available.  But this code here
    +** only works on OSX.
    +*/
    +
    +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
    +/*
    +** The afpLockingContext structure contains all afp lock specific state
    +*/
    +typedef struct afpLockingContext afpLockingContext;
    +struct afpLockingContext {
    +  unsigned long long sharedByte;
    +  const char *dbPath;             /* Name of the open file */
    +};
    +
    +struct ByteRangeLockPB2
    +{
    +  unsigned long long offset;        /* offset to first byte to lock */
    +  unsigned long long length;        /* nbr of bytes to lock */
    +  unsigned long long retRangeStart; /* nbr of 1st byte locked if successful */
    +  unsigned char unLockFlag;         /* 1 = unlock, 0 = lock */
    +  unsigned char startEndFlag;       /* 1=rel to end of fork, 0=rel to start */
    +  int fd;                           /* file desc to assoc this lock with */
    +};
    +
    +#define afpfsByteRangeLock2FSCTL        _IOWR('z', 23, struct ByteRangeLockPB2)
    +
    +/*
    +** This is a utility for setting or clearing a bit-range lock on an
    +** AFP filesystem.
    +** 
    +** Return SQLITE_OK on success, SQLITE_BUSY on failure.
    +*/
    +static int afpSetLock(
    +  const char *path,              /* Name of the file to be locked or unlocked */
    +  unixFile *pFile,               /* Open file descriptor on path */
    +  unsigned long long offset,     /* First byte to be locked */
    +  unsigned long long length,     /* Number of bytes to lock */
    +  int setLockFlag                /* True to set lock.  False to clear lock */
    +){
    +  struct ByteRangeLockPB2 pb;
    +  int err;
    +  
    +  pb.unLockFlag = setLockFlag ? 0 : 1;
    +  pb.startEndFlag = 0;
    +  pb.offset = offset;
    +  pb.length = length; 
    +  pb.fd = pFile->h;
    +  
    +  OSTRACE6("AFPSETLOCK [%s] for %d%s in range %llx:%llx\n", 
    +    (setLockFlag?"ON":"OFF"), pFile->h, (pb.fd==-1?"[testval-1]":""),
    +    offset, length);
    +  err = fsctl(path, afpfsByteRangeLock2FSCTL, &pb, 0);
    +  if ( err==-1 ) {
    +    int rc;
    +    int tErrno = errno;
    +    OSTRACE4("AFPSETLOCK failed to fsctl() '%s' %d %s\n",
    +             path, tErrno, strerror(tErrno));
    +#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
    +    rc = SQLITE_BUSY;
    +#else
    +    rc = sqliteErrorFromPosixError(tErrno,
    +                    setLockFlag ? SQLITE_IOERR_LOCK : SQLITE_IOERR_UNLOCK);
    +#endif /* SQLITE_IGNORE_AFP_LOCK_ERRORS */
    +    if( IS_LOCK_ERROR(rc) ){
    +      pFile->lastErrno = tErrno;
    +    }
    +    return rc;
    +  } else {
    +    return SQLITE_OK;
    +  }
    +}
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +*/
    +static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){
    +  int rc = SQLITE_OK;
    +  int reserved = 0;
    +  unixFile *pFile = (unixFile*)id;
    +  
    +  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
    +  
    +  assert( pFile );
    +  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
    +  
    +  /* Check if a thread in this process holds such a lock */
    +  if( pFile->locktype>SHARED_LOCK ){
    +    reserved = 1;
    +  }
    +  
    +  /* Otherwise see if some other process holds it.
    +   */
    +  if( !reserved ){
    +    /* lock the RESERVED byte */
    +    int lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);  
    +    if( SQLITE_OK==lrc ){
    +      /* if we succeeded in taking the reserved lock, unlock it to restore
    +      ** the original state */
    +      lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
    +    } else {
    +      /* if we failed to get the lock then someone else must have it */
    +      reserved = 1;
    +    }
    +    if( IS_LOCK_ERROR(lrc) ){
    +      rc=lrc;
    +    }
    +  }
    +  
    +  OSTRACE4("TEST WR-LOCK %d %d %d\n", pFile->h, rc, reserved);
    +  
    +  *pResOut = reserved;
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +*/
    +static int afpLock(sqlite3_file *id, int locktype){
    +  int rc = SQLITE_OK;
    +  unixFile *pFile = (unixFile*)id;
    +  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
    +  
    +  assert( pFile );
    +  OSTRACE5("LOCK    %d %s was %s pid=%d\n", pFile->h,
    +         locktypeName(locktype), locktypeName(pFile->locktype), getpid());
    +
    +  /* If there is already a lock of this type or more restrictive on the
    +  ** unixFile, do nothing. Don't use the afp_end_lock: exit path, as
    +  ** unixEnterMutex() hasn't been called yet.
    +  */
    +  if( pFile->locktype>=locktype ){
    +    OSTRACE3("LOCK    %d %s ok (already held)\n", pFile->h,
    +           locktypeName(locktype));
    +    return SQLITE_OK;
    +  }
    +
    +  /* Make sure the locking sequence is correct
    +  */
    +  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
    +  assert( locktype!=PENDING_LOCK );
    +  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
    +  
    +  /* This mutex is needed because pFile->pLock is shared across threads
    +  */
    +  unixEnterMutex();
    +
    +  /* Make sure the current thread owns the pFile.
    +  */
    +  rc = transferOwnership(pFile);
    +  if( rc!=SQLITE_OK ){
    +    unixLeaveMutex();
    +    return rc;
    +  }
    +    
    +  /* A PENDING lock is needed before acquiring a SHARED lock and before
    +  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will
    +  ** be released.
    +  */
    +  if( locktype==SHARED_LOCK 
    +      || (locktype==EXCLUSIVE_LOCK && pFile->locktype<PENDING_LOCK)
    +  ){
    +    int failed;
    +    failed = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 1);
    +    if (failed) {
    +      rc = failed;
    +      goto afp_end_lock;
    +    }
    +  }
    +  
    +  /* If control gets to this point, then actually go ahead and make
    +  ** operating system calls for the specified lock.
    +  */
    +  if( locktype==SHARED_LOCK ){
    +    int lk, lrc1, lrc2;
    +    int lrc1Errno = 0;
    +    
    +    /* Now get the read-lock SHARED_LOCK */
    +    /* note that the quality of the randomness doesn't matter that much */
    +    lk = random(); 
    +    context->sharedByte = (lk & 0x7fffffff)%(SHARED_SIZE - 1);
    +    lrc1 = afpSetLock(context->dbPath, pFile, 
    +          SHARED_FIRST+context->sharedByte, 1, 1);
    +    if( IS_LOCK_ERROR(lrc1) ){
    +      lrc1Errno = pFile->lastErrno;
    +    }
    +    /* Drop the temporary PENDING lock */
    +    lrc2 = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
    +    
    +    if( IS_LOCK_ERROR(lrc1) ) {
    +      pFile->lastErrno = lrc1Errno;
    +      rc = lrc1;
    +      goto afp_end_lock;
    +    } else if( IS_LOCK_ERROR(lrc2) ){
    +      rc = lrc2;
    +      goto afp_end_lock;
    +    } else if( lrc1 != SQLITE_OK ) {
    +      rc = lrc1;
    +    } else {
    +      pFile->locktype = SHARED_LOCK;
    +      pFile->pOpen->nLock++;
    +    }
    +  }else{
    +    /* The request was for a RESERVED or EXCLUSIVE lock.  It is
    +    ** assumed that there is a SHARED or greater lock on the file
    +    ** already.
    +    */
    +    int failed = 0;
    +    assert( 0!=pFile->locktype );
    +    if (locktype >= RESERVED_LOCK && pFile->locktype < RESERVED_LOCK) {
    +        /* Acquire a RESERVED lock */
    +        failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
    +    }
    +    if (!failed && locktype == EXCLUSIVE_LOCK) {
    +      /* Acquire an EXCLUSIVE lock */
    +        
    +      /* Remove the shared lock before trying the range.  we'll need to 
    +      ** reestablish the shared lock if we can't get the  afpUnlock
    +      */
    +      if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST +
    +                         context->sharedByte, 1, 0)) ){
    +        int failed2 = SQLITE_OK;
    +        /* now attemmpt to get the exclusive lock range */
    +        failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST, 
    +                               SHARED_SIZE, 1);
    +        if( failed && (failed2 = afpSetLock(context->dbPath, pFile, 
    +                       SHARED_FIRST + context->sharedByte, 1, 1)) ){
    +          /* Can't reestablish the shared lock.  Sqlite can't deal, this is
    +          ** a critical I/O error
    +          */
    +          rc = ((failed & SQLITE_IOERR) == SQLITE_IOERR) ? failed2 : 
    +               SQLITE_IOERR_LOCK;
    +          goto afp_end_lock;
    +        } 
    +      }else{
    +        rc = failed; 
    +      }
    +    }
    +    if( failed ){
    +      rc = failed;
    +    }
    +  }
    +  
    +  if( rc==SQLITE_OK ){
    +    pFile->locktype = locktype;
    +  }else if( locktype==EXCLUSIVE_LOCK ){
    +    pFile->locktype = PENDING_LOCK;
    +  }
    +  
    +afp_end_lock:
    +  unixLeaveMutex();
    +  OSTRACE4("LOCK    %d %s %s\n", pFile->h, locktypeName(locktype), 
    +         rc==SQLITE_OK ? "ok" : "failed");
    +  return rc;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +*/
    +static int afpUnlock(sqlite3_file *id, int locktype) {
    +  int rc = SQLITE_OK;
    +  unixFile *pFile = (unixFile*)id;
    +  afpLockingContext *pCtx = (afpLockingContext *) pFile->lockingContext;
    +
    +  assert( pFile );
    +  OSTRACE5("UNLOCK  %d %d was %d pid=%d\n", pFile->h, locktype,
    +         pFile->locktype, getpid());
    +
    +  assert( locktype<=SHARED_LOCK );
    +  if( pFile->locktype<=locktype ){
    +    return SQLITE_OK;
    +  }
    +  if( CHECK_THREADID(pFile) ){
    +    return SQLITE_MISUSE;
    +  }
    +  unixEnterMutex();
    +  if( pFile->locktype>SHARED_LOCK ){
    +    
    +    if( pFile->locktype==EXCLUSIVE_LOCK ){
    +      rc = afpSetLock(pCtx->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0);
    +      if( rc==SQLITE_OK && locktype==SHARED_LOCK ){
    +        /* only re-establish the shared lock if necessary */
    +        int sharedLockByte = SHARED_FIRST+pCtx->sharedByte;
    +        rc = afpSetLock(pCtx->dbPath, pFile, sharedLockByte, 1, 1);
    +      }
    +    }
    +    if( rc==SQLITE_OK && pFile->locktype>=PENDING_LOCK ){
    +      rc = afpSetLock(pCtx->dbPath, pFile, PENDING_BYTE, 1, 0);
    +    } 
    +    if( rc==SQLITE_OK && pFile->locktype>=RESERVED_LOCK ){
    +      rc = afpSetLock(pCtx->dbPath, pFile, RESERVED_BYTE, 1, 0);
    +    }
    +  }else if( locktype==NO_LOCK ){
    +    /* clear the shared lock */
    +    int sharedLockByte = SHARED_FIRST+pCtx->sharedByte;
    +    rc = afpSetLock(pCtx->dbPath, pFile, sharedLockByte, 1, 0);
    +  }
    +
    +  if( rc==SQLITE_OK ){
    +    if( locktype==NO_LOCK ){
    +      struct unixOpenCnt *pOpen = pFile->pOpen;
    +      pOpen->nLock--;
    +      assert( pOpen->nLock>=0 );
    +      if( pOpen->nLock==0 ){
    +        rc = closePendingFds(pFile);
    +      }
    +    }
    +  }
    +  unixLeaveMutex();
    +  if( rc==SQLITE_OK ){
    +    pFile->locktype = locktype;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Close a file & cleanup AFP specific locking context 
    +*/
    +static int afpClose(sqlite3_file *id) {
    +  if( id ){
    +    unixFile *pFile = (unixFile*)id;
    +    afpUnlock(id, NO_LOCK);
    +    unixEnterMutex();
    +    if( pFile->pOpen && pFile->pOpen->nLock ){
    +      /* If there are outstanding locks, do not actually close the file just
    +      ** yet because that would clear those locks.  Instead, add the file
    +      ** descriptor to pOpen->aPending.  It will be automatically closed when
    +      ** the last lock is cleared.
    +      */
    +      setPendingFd(pFile);
    +    }
    +    releaseOpenCnt(pFile->pOpen);
    +    sqlite3_free(pFile->lockingContext);
    +    closeUnixFile(id);
    +    unixLeaveMutex();
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
    +/*
    +** The code above is the AFP lock implementation.  The code is specific
    +** to MacOSX and does not work on other unix platforms.  No alternative
    +** is available.  If you don't compile for a mac, then the "unix-afp"
    +** VFS is not available.
    +**
    +********************* End of the AFP lock implementation **********************
    +******************************************************************************/
    +
    +
    +/******************************************************************************
    +**************** Non-locking sqlite3_file methods *****************************
    +**
    +** The next division contains implementations for all methods of the 
    +** sqlite3_file object other than the locking methods.  The locking
    +** methods were defined in divisions above (one locking method per
    +** division).  Those methods that are common to all locking modes
    +** are gather together into this division.
    +*/
    +
    +/*
    +** Seek to the offset passed as the second argument, then read cnt 
    +** bytes into pBuf. Return the number of bytes actually read.
    +**
    +** NB:  If you define USE_PREAD or USE_PREAD64, then it might also
    +** be necessary to define _XOPEN_SOURCE to be 500.  This varies from
    +** one system to another.  Since SQLite does not define USE_PREAD
    +** any any form by default, we will not attempt to define _XOPEN_SOURCE.
    +** See tickets #2741 and #2681.
    +**
    +** To avoid stomping the errno value on a failed read the lastErrno value
    +** is set before returning.
    +*/
    +static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
    +  int got;
    +  i64 newOffset;
    +  TIMER_START;
    +#if defined(USE_PREAD)
    +  got = pread(id->h, pBuf, cnt, offset);
    +  SimulateIOError( got = -1 );
    +#elif defined(USE_PREAD64)
    +  got = pread64(id->h, pBuf, cnt, offset);
    +  SimulateIOError( got = -1 );
    +#else
    +  newOffset = lseek(id->h, offset, SEEK_SET);
    +  SimulateIOError( newOffset-- );
    +  if( newOffset!=offset ){
    +    if( newOffset == -1 ){
    +      ((unixFile*)id)->lastErrno = errno;
    +    }else{
    +      ((unixFile*)id)->lastErrno = 0;			
    +    }
    +    return -1;
    +  }
    +  got = read(id->h, pBuf, cnt);
    +#endif
    +  TIMER_END;
    +  if( got<0 ){
    +    ((unixFile*)id)->lastErrno = errno;
    +  }
    +  OSTRACE5("READ    %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED);
    +  return got;
    +}
    +
    +/*
    +** Read data from a file into a buffer.  Return SQLITE_OK if all
    +** bytes were read successfully and SQLITE_IOERR if anything goes
    +** wrong.
    +*/
    +static int unixRead(
    +  sqlite3_file *id, 
    +  void *pBuf, 
    +  int amt,
    +  sqlite3_int64 offset
    +){
    +  unixFile *pFile = (unixFile *)id;
    +  int got;
    +  assert( id );
    +
    +  /* If this is a database file (not a journal, master-journal or temp
    +  ** file), the bytes in the locking range should never be read or written. */
    +  assert( pFile->pUnused==0
    +       || offset>=PENDING_BYTE+512
    +       || offset+amt<=PENDING_BYTE 
    +  );
    +
    +  got = seekAndRead(pFile, offset, pBuf, amt);
    +  if( got==amt ){
    +    return SQLITE_OK;
    +  }else if( got<0 ){
    +    /* lastErrno set by seekAndRead */
    +    return SQLITE_IOERR_READ;
    +  }else{
    +    pFile->lastErrno = 0; /* not a system error */
    +    /* Unread parts of the buffer must be zero-filled */
    +    memset(&((char*)pBuf)[got], 0, amt-got);
    +    return SQLITE_IOERR_SHORT_READ;
    +  }
    +}
    +
    +/*
    +** Seek to the offset in id->offset then read cnt bytes into pBuf.
    +** Return the number of bytes actually read.  Update the offset.
    +**
    +** To avoid stomping the errno value on a failed write the lastErrno value
    +** is set before returning.
    +*/
    +static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
    +  int got;
    +  i64 newOffset;
    +  TIMER_START;
    +#if defined(USE_PREAD)
    +  got = pwrite(id->h, pBuf, cnt, offset);
    +#elif defined(USE_PREAD64)
    +  got = pwrite64(id->h, pBuf, cnt, offset);
    +#else
    +  newOffset = lseek(id->h, offset, SEEK_SET);
    +  if( newOffset!=offset ){
    +    if( newOffset == -1 ){
    +      ((unixFile*)id)->lastErrno = errno;
    +    }else{
    +      ((unixFile*)id)->lastErrno = 0;			
    +    }
    +    return -1;
    +  }
    +  got = write(id->h, pBuf, cnt);
    +#endif
    +  TIMER_END;
    +  if( got<0 ){
    +    ((unixFile*)id)->lastErrno = errno;
    +  }
    +
    +  OSTRACE5("WRITE   %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED);
    +  return got;
    +}
    +
    +
    +/*
    +** Write data from a buffer into a file.  Return SQLITE_OK on success
    +** or some other error code on failure.
    +*/
    +static int unixWrite(
    +  sqlite3_file *id, 
    +  const void *pBuf, 
    +  int amt,
    +  sqlite3_int64 offset 
    +){
    +  unixFile *pFile = (unixFile*)id;
    +  int wrote = 0;
    +  assert( id );
    +  assert( amt>0 );
    +
    +  /* If this is a database file (not a journal, master-journal or temp
    +  ** file), the bytes in the locking range should never be read or written. */
    +  assert( pFile->pUnused==0
    +       || offset>=PENDING_BYTE+512
    +       || offset+amt<=PENDING_BYTE 
    +  );
    +
    +#ifndef NDEBUG
    +  /* If we are doing a normal write to a database file (as opposed to
    +  ** doing a hot-journal rollback or a write to some file other than a
    +  ** normal database file) then record the fact that the database
    +  ** has changed.  If the transaction counter is modified, record that
    +  ** fact too.
    +  */
    +  if( pFile->inNormalWrite ){
    +    pFile->dbUpdate = 1;  /* The database has been modified */
    +    if( offset<=24 && offset+amt>=27 ){
    +      int rc;
    +      char oldCntr[4];
    +      SimulateIOErrorBenign(1);
    +      rc = seekAndRead(pFile, 24, oldCntr, 4);
    +      SimulateIOErrorBenign(0);
    +      if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
    +        pFile->transCntrChng = 1;  /* The transaction counter has changed */
    +      }
    +    }
    +  }
    +#endif
    +
    +  while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
    +    amt -= wrote;
    +    offset += wrote;
    +    pBuf = &((char*)pBuf)[wrote];
    +  }
    +  SimulateIOError(( wrote=(-1), amt=1 ));
    +  SimulateDiskfullError(( wrote=0, amt=1 ));
    +  if( amt>0 ){
    +    if( wrote<0 ){
    +      /* lastErrno set by seekAndWrite */
    +      return SQLITE_IOERR_WRITE;
    +    }else{
    +      pFile->lastErrno = 0; /* not a system error */
    +      return SQLITE_FULL;
    +    }
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** Count the number of fullsyncs and normal syncs.  This is used to test
    +** that syncs and fullsyncs are occurring at the right times.
    +*/
    +SQLITE_API int sqlite3_sync_count = 0;
    +SQLITE_API int sqlite3_fullsync_count = 0;
    +#endif
    +
    +/*
    +** We do not trust systems to provide a working fdatasync().  Some do.
    +** Others do no.  To be safe, we will stick with the (slower) fsync().
    +** If you know that your system does support fdatasync() correctly,
    +** then simply compile with -Dfdatasync=fdatasync
    +*/
    +#if !defined(fdatasync) && !defined(__linux__)
    +# define fdatasync fsync
    +#endif
    +
    +/*
    +** Define HAVE_FULLFSYNC to 0 or 1 depending on whether or not
    +** the F_FULLFSYNC macro is defined.  F_FULLFSYNC is currently
    +** only available on Mac OS X.  But that could change.
    +*/
    +#ifdef F_FULLFSYNC
    +# define HAVE_FULLFSYNC 1
    +#else
    +# define HAVE_FULLFSYNC 0
    +#endif
    +
    +
    +/*
    +** The fsync() system call does not work as advertised on many
    +** unix systems.  The following procedure is an attempt to make
    +** it work better.
    +**
    +** The SQLITE_NO_SYNC macro disables all fsync()s.  This is useful
    +** for testing when we want to run through the test suite quickly.
    +** You are strongly advised *not* to deploy with SQLITE_NO_SYNC
    +** enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash
    +** or power failure will likely corrupt the database file.
    +**
    +** SQLite sets the dataOnly flag if the size of the file is unchanged.
    +** The idea behind dataOnly is that it should only write the file content
    +** to disk, not the inode.  We only set dataOnly if the file size is 
    +** unchanged since the file size is part of the inode.  However, 
    +** Ted Ts'o tells us that fdatasync() will also write the inode if the
    +** file size has changed.  The only real difference between fdatasync()
    +** and fsync(), Ted tells us, is that fdatasync() will not flush the
    +** inode if the mtime or owner or other inode attributes have changed.
    +** We only care about the file size, not the other file attributes, so
    +** as far as SQLite is concerned, an fdatasync() is always adequate.
    +** So, we always use fdatasync() if it is available, regardless of
    +** the value of the dataOnly flag.
    +*/
    +static int full_fsync(int fd, int fullSync, int dataOnly){
    +  int rc;
    +
    +  /* The following "ifdef/elif/else/" block has the same structure as
    +  ** the one below. It is replicated here solely to avoid cluttering 
    +  ** up the real code with the UNUSED_PARAMETER() macros.
    +  */
    +#ifdef SQLITE_NO_SYNC
    +  UNUSED_PARAMETER(fd);
    +  UNUSED_PARAMETER(fullSync);
    +  UNUSED_PARAMETER(dataOnly);
    +#elif HAVE_FULLFSYNC
    +  UNUSED_PARAMETER(dataOnly);
    +#else
    +  UNUSED_PARAMETER(fullSync);
    +  UNUSED_PARAMETER(dataOnly);
    +#endif
    +
    +  /* Record the number of times that we do a normal fsync() and 
    +  ** FULLSYNC.  This is used during testing to verify that this procedure
    +  ** gets called with the correct arguments.
    +  */
    +#ifdef SQLITE_TEST
    +  if( fullSync ) sqlite3_fullsync_count++;
    +  sqlite3_sync_count++;
    +#endif
    +
    +  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
    +  ** no-op
    +  */
    +#ifdef SQLITE_NO_SYNC
    +  rc = SQLITE_OK;
    +#elif HAVE_FULLFSYNC
    +  if( fullSync ){
    +    rc = fcntl(fd, F_FULLFSYNC, 0);
    +  }else{
    +    rc = 1;
    +  }
    +  /* If the FULLFSYNC failed, fall back to attempting an fsync().
    +  ** It shouldn't be possible for fullfsync to fail on the local 
    +  ** file system (on OSX), so failure indicates that FULLFSYNC
    +  ** isn't supported for this file system. So, attempt an fsync 
    +  ** and (for now) ignore the overhead of a superfluous fcntl call.  
    +  ** It'd be better to detect fullfsync support once and avoid 
    +  ** the fcntl call every time sync is called.
    +  */
    +  if( rc ) rc = fsync(fd);
    +
    +#else 
    +  rc = fdatasync(fd);
    +#if OS_VXWORKS
    +  if( rc==-1 && errno==ENOTSUP ){
    +    rc = fsync(fd);
    +  }
    +#endif /* OS_VXWORKS */
    +#endif /* ifdef SQLITE_NO_SYNC elif HAVE_FULLFSYNC */
    +
    +  if( OS_VXWORKS && rc!= -1 ){
    +    rc = 0;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Make sure all writes to a particular file are committed to disk.
    +**
    +** If dataOnly==0 then both the file itself and its metadata (file
    +** size, access time, etc) are synced.  If dataOnly!=0 then only the
    +** file data is synced.
    +**
    +** Under Unix, also make sure that the directory entry for the file
    +** has been created by fsync-ing the directory that contains the file.
    +** If we do not do this and we encounter a power failure, the directory
    +** entry for the journal might not exist after we reboot.  The next
    +** SQLite to access the file will not know that the journal exists (because
    +** the directory entry for the journal was never created) and the transaction
    +** will not roll back - possibly leading to database corruption.
    +*/
    +static int unixSync(sqlite3_file *id, int flags){
    +  int rc;
    +  unixFile *pFile = (unixFile*)id;
    +
    +  int isDataOnly = (flags&SQLITE_SYNC_DATAONLY);
    +  int isFullsync = (flags&0x0F)==SQLITE_SYNC_FULL;
    +
    +  /* Check that one of SQLITE_SYNC_NORMAL or FULL was passed */
    +  assert((flags&0x0F)==SQLITE_SYNC_NORMAL
    +      || (flags&0x0F)==SQLITE_SYNC_FULL
    +  );
    +
    +  /* Unix cannot, but some systems may return SQLITE_FULL from here. This
    +  ** line is to test that doing so does not cause any problems.
    +  */
    +  SimulateDiskfullError( return SQLITE_FULL );
    +
    +  assert( pFile );
    +  OSTRACE2("SYNC    %-3d\n", pFile->h);
    +  rc = full_fsync(pFile->h, isFullsync, isDataOnly);
    +  SimulateIOError( rc=1 );
    +  if( rc ){
    +    pFile->lastErrno = errno;
    +    return SQLITE_IOERR_FSYNC;
    +  }
    +  if( pFile->dirfd>=0 ){
    +    int err;
    +    OSTRACE4("DIRSYNC %-3d (have_fullfsync=%d fullsync=%d)\n", pFile->dirfd,
    +            HAVE_FULLFSYNC, isFullsync);
    +#ifndef SQLITE_DISABLE_DIRSYNC
    +    /* The directory sync is only attempted if full_fsync is
    +    ** turned off or unavailable.  If a full_fsync occurred above,
    +    ** then the directory sync is superfluous.
    +    */
    +    if( (!HAVE_FULLFSYNC || !isFullsync) && full_fsync(pFile->dirfd,0,0) ){
    +       /*
    +       ** We have received multiple reports of fsync() returning
    +       ** errors when applied to directories on certain file systems.
    +       ** A failed directory sync is not a big deal.  So it seems
    +       ** better to ignore the error.  Ticket #1657
    +       */
    +       /* pFile->lastErrno = errno; */
    +       /* return SQLITE_IOERR; */
    +    }
    +#endif
    +    err = close(pFile->dirfd); /* Only need to sync once, so close the */
    +    if( err==0 ){              /* directory when we are done */
    +      pFile->dirfd = -1;
    +    }else{
    +      pFile->lastErrno = errno;
    +      rc = SQLITE_IOERR_DIR_CLOSE;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Truncate an open file to a specified size
    +*/
    +static int unixTruncate(sqlite3_file *id, i64 nByte){
    +  int rc;
    +  assert( id );
    +  SimulateIOError( return SQLITE_IOERR_TRUNCATE );
    +  rc = ftruncate(((unixFile*)id)->h, (off_t)nByte);
    +  if( rc ){
    +    ((unixFile*)id)->lastErrno = errno;
    +    return SQLITE_IOERR_TRUNCATE;
    +  }else{
    +    return SQLITE_OK;
    +  }
    +}
    +
    +/*
    +** Determine the current size of a file in bytes
    +*/
    +static int unixFileSize(sqlite3_file *id, i64 *pSize){
    +  int rc;
    +  struct stat buf;
    +  assert( id );
    +  rc = fstat(((unixFile*)id)->h, &buf);
    +  SimulateIOError( rc=1 );
    +  if( rc!=0 ){
    +    ((unixFile*)id)->lastErrno = errno;
    +    return SQLITE_IOERR_FSTAT;
    +  }
    +  *pSize = buf.st_size;
    +
    +  /* When opening a zero-size database, the findLockInfo() procedure
    +  ** writes a single byte into that file in order to work around a bug
    +  ** in the OS-X msdos filesystem.  In order to avoid problems with upper
    +  ** layers, we need to report this file size as zero even though it is
    +  ** really 1.   Ticket #3260.
    +  */
    +  if( *pSize==1 ) *pSize = 0;
    +
    +
    +  return SQLITE_OK;
    +}
    +
    +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    +/*
    +** Handler for proxy-locking file-control verbs.  Defined below in the
    +** proxying locking division.
    +*/
    +static int proxyFileControl(sqlite3_file*,int,void*);
    +#endif
    +
    +
    +/*
    +** Information and control of an open file handle.
    +*/
    +static int unixFileControl(sqlite3_file *id, int op, void *pArg){
    +  switch( op ){
    +    case SQLITE_FCNTL_LOCKSTATE: {
    +      *(int*)pArg = ((unixFile*)id)->locktype;
    +      return SQLITE_OK;
    +    }
    +    case SQLITE_LAST_ERRNO: {
    +      *(int*)pArg = ((unixFile*)id)->lastErrno;
    +      return SQLITE_OK;
    +    }
    +#ifndef NDEBUG
    +    /* The pager calls this method to signal that it has done
    +    ** a rollback and that the database is therefore unchanged and
    +    ** it hence it is OK for the transaction change counter to be
    +    ** unchanged.
    +    */
    +    case SQLITE_FCNTL_DB_UNCHANGED: {
    +      ((unixFile*)id)->dbUpdate = 0;
    +      return SQLITE_OK;
    +    }
    +#endif
    +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    +    case SQLITE_SET_LOCKPROXYFILE:
    +    case SQLITE_GET_LOCKPROXYFILE: {
    +      return proxyFileControl(id,op,pArg);
    +    }
    +#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
    +  }
    +  return SQLITE_ERROR;
    +}
    +
    +/*
    +** Return the sector size in bytes of the underlying block device for
    +** the specified file. This is almost always 512 bytes, but may be
    +** larger for some devices.
    +**
    +** SQLite code assumes this function cannot fail. It also assumes that
    +** if two files are created in the same file-system directory (i.e.
    +** a database and its journal file) that the sector size will be the
    +** same for both.
    +*/
    +static int unixSectorSize(sqlite3_file *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  return SQLITE_DEFAULT_SECTOR_SIZE;
    +}
    +
    +/*
    +** Return the device characteristics for the file. This is always 0 for unix.
    +*/
    +static int unixDeviceCharacteristics(sqlite3_file *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  return 0;
    +}
    +
    +/*
    +** Here ends the implementation of all sqlite3_file methods.
    +**
    +********************** End sqlite3_file Methods *******************************
    +******************************************************************************/
    +
    +/*
    +** This division contains definitions of sqlite3_io_methods objects that
    +** implement various file locking strategies.  It also contains definitions
    +** of "finder" functions.  A finder-function is used to locate the appropriate
    +** sqlite3_io_methods object for a particular database file.  The pAppData
    +** field of the sqlite3_vfs VFS objects are initialized to be pointers to
    +** the correct finder-function for that VFS.
    +**
    +** Most finder functions return a pointer to a fixed sqlite3_io_methods
    +** object.  The only interesting finder-function is autolockIoFinder, which
    +** looks at the filesystem type and tries to guess the best locking
    +** strategy from that.
    +**
    +** For finder-funtion F, two objects are created:
    +**
    +**    (1) The real finder-function named "FImpt()".
    +**
    +**    (2) A constant pointer to this function named just "F".
    +**
    +**
    +** A pointer to the F pointer is used as the pAppData value for VFS
    +** objects.  We have to do this instead of letting pAppData point
    +** directly at the finder-function since C90 rules prevent a void*
    +** from be cast into a function pointer.
    +**
    +**
    +** Each instance of this macro generates two objects:
    +**
    +**   *  A constant sqlite3_io_methods object call METHOD that has locking
    +**      methods CLOSE, LOCK, UNLOCK, CKRESLOCK.
    +**
    +**   *  An I/O method finder function called FINDER that returns a pointer
    +**      to the METHOD object in the previous bullet.
    +*/
    +#define IOMETHODS(FINDER, METHOD, CLOSE, LOCK, UNLOCK, CKLOCK)               \
    +static const sqlite3_io_methods METHOD = {                                   \
    +   1,                          /* iVersion */                                \
    +   CLOSE,                      /* xClose */                                  \
    +   unixRead,                   /* xRead */                                   \
    +   unixWrite,                  /* xWrite */                                  \
    +   unixTruncate,               /* xTruncate */                               \
    +   unixSync,                   /* xSync */                                   \
    +   unixFileSize,               /* xFileSize */                               \
    +   LOCK,                       /* xLock */                                   \
    +   UNLOCK,                     /* xUnlock */                                 \
    +   CKLOCK,                     /* xCheckReservedLock */                      \
    +   unixFileControl,            /* xFileControl */                            \
    +   unixSectorSize,             /* xSectorSize */                             \
    +   unixDeviceCharacteristics   /* xDeviceCapabilities */                     \
    +};                                                                           \
    +static const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){   \
    +  UNUSED_PARAMETER(z); UNUSED_PARAMETER(p);                                  \
    +  return &METHOD;                                                            \
    +}                                                                            \
    +static const sqlite3_io_methods *(*const FINDER)(const char*,unixFile *p)    \
    +    = FINDER##Impl;
    +
    +/*
    +** Here are all of the sqlite3_io_methods objects for each of the
    +** locking strategies.  Functions that return pointers to these methods
    +** are also created.
    +*/
    +IOMETHODS(
    +  posixIoFinder,            /* Finder function name */
    +  posixIoMethods,           /* sqlite3_io_methods object name */
    +  unixClose,                /* xClose method */
    +  unixLock,                 /* xLock method */
    +  unixUnlock,               /* xUnlock method */
    +  unixCheckReservedLock     /* xCheckReservedLock method */
    +)
    +IOMETHODS(
    +  nolockIoFinder,           /* Finder function name */
    +  nolockIoMethods,          /* sqlite3_io_methods object name */
    +  nolockClose,              /* xClose method */
    +  nolockLock,               /* xLock method */
    +  nolockUnlock,             /* xUnlock method */
    +  nolockCheckReservedLock   /* xCheckReservedLock method */
    +)
    +IOMETHODS(
    +  dotlockIoFinder,          /* Finder function name */
    +  dotlockIoMethods,         /* sqlite3_io_methods object name */
    +  dotlockClose,             /* xClose method */
    +  dotlockLock,              /* xLock method */
    +  dotlockUnlock,            /* xUnlock method */
    +  dotlockCheckReservedLock  /* xCheckReservedLock method */
    +)
    +
    +#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
    +IOMETHODS(
    +  flockIoFinder,            /* Finder function name */
    +  flockIoMethods,           /* sqlite3_io_methods object name */
    +  flockClose,               /* xClose method */
    +  flockLock,                /* xLock method */
    +  flockUnlock,              /* xUnlock method */
    +  flockCheckReservedLock    /* xCheckReservedLock method */
    +)
    +#endif
    +
    +#if OS_VXWORKS
    +IOMETHODS(
    +  semIoFinder,              /* Finder function name */
    +  semIoMethods,             /* sqlite3_io_methods object name */
    +  semClose,                 /* xClose method */
    +  semLock,                  /* xLock method */
    +  semUnlock,                /* xUnlock method */
    +  semCheckReservedLock      /* xCheckReservedLock method */
    +)
    +#endif
    +
    +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
    +IOMETHODS(
    +  afpIoFinder,              /* Finder function name */
    +  afpIoMethods,             /* sqlite3_io_methods object name */
    +  afpClose,                 /* xClose method */
    +  afpLock,                  /* xLock method */
    +  afpUnlock,                /* xUnlock method */
    +  afpCheckReservedLock      /* xCheckReservedLock method */
    +)
    +#endif
    +
    +/*
    +** The "Whole File Locking" finder returns the same set of methods as
    +** the posix locking finder.  But it also sets the SQLITE_WHOLE_FILE_LOCKING
    +** flag to force the posix advisory locks to cover the whole file instead
    +** of just a small span of bytes near the 1GiB boundary.  Whole File Locking
    +** is useful on NFS-mounted files since it helps NFS to maintain cache
    +** coherency.  But it is a detriment to other filesystems since it runs
    +** slower.
    +*/
    +static const sqlite3_io_methods *posixWflIoFinderImpl(const char*z, unixFile*p){
    +  UNUSED_PARAMETER(z);
    +  p->fileFlags = SQLITE_WHOLE_FILE_LOCKING;
    +  return &posixIoMethods;
    +}
    +static const sqlite3_io_methods 
    +  *(*const posixWflIoFinder)(const char*,unixFile *p) = posixWflIoFinderImpl;
    +
    +/*
    +** The proxy locking method is a "super-method" in the sense that it
    +** opens secondary file descriptors for the conch and lock files and
    +** it uses proxy, dot-file, AFP, and flock() locking methods on those
    +** secondary files.  For this reason, the division that implements
    +** proxy locking is located much further down in the file.  But we need
    +** to go ahead and define the sqlite3_io_methods and finder function
    +** for proxy locking here.  So we forward declare the I/O methods.
    +*/
    +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
    +static int proxyClose(sqlite3_file*);
    +static int proxyLock(sqlite3_file*, int);
    +static int proxyUnlock(sqlite3_file*, int);
    +static int proxyCheckReservedLock(sqlite3_file*, int*);
    +IOMETHODS(
    +  proxyIoFinder,            /* Finder function name */
    +  proxyIoMethods,           /* sqlite3_io_methods object name */
    +  proxyClose,               /* xClose method */
    +  proxyLock,                /* xLock method */
    +  proxyUnlock,              /* xUnlock method */
    +  proxyCheckReservedLock    /* xCheckReservedLock method */
    +)
    +#endif
    +
    +
    +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
    +/* 
    +** This "finder" function attempts to determine the best locking strategy 
    +** for the database file "filePath".  It then returns the sqlite3_io_methods
    +** object that implements that strategy.
    +**
    +** This is for MacOSX only.
    +*/
    +static const sqlite3_io_methods *autolockIoFinderImpl(
    +  const char *filePath,    /* name of the database file */
    +  unixFile *pNew           /* open file object for the database file */
    +){
    +  static const struct Mapping {
    +    const char *zFilesystem;              /* Filesystem type name */
    +    const sqlite3_io_methods *pMethods;   /* Appropriate locking method */
    +  } aMap[] = {
    +    { "hfs",    &posixIoMethods },
    +    { "ufs",    &posixIoMethods },
    +    { "afpfs",  &afpIoMethods },
    +#ifdef SQLITE_ENABLE_AFP_LOCKING_SMB
    +    { "smbfs",  &afpIoMethods },
    +#else
    +    { "smbfs",  &flockIoMethods },
    +#endif
    +    { "webdav", &nolockIoMethods },
    +    { 0, 0 }
    +  };
    +  int i;
    +  struct statfs fsInfo;
    +  struct flock lockInfo;
    +
    +  if( !filePath ){
    +    /* If filePath==NULL that means we are dealing with a transient file
    +    ** that does not need to be locked. */
    +    return &nolockIoMethods;
    +  }
    +  if( statfs(filePath, &fsInfo) != -1 ){
    +    if( fsInfo.f_flags & MNT_RDONLY ){
    +      return &nolockIoMethods;
    +    }
    +    for(i=0; aMap[i].zFilesystem; i++){
    +      if( strcmp(fsInfo.f_fstypename, aMap[i].zFilesystem)==0 ){
    +        return aMap[i].pMethods;
    +      }
    +    }
    +  }
    +
    +  /* Default case. Handles, amongst others, "nfs".
    +  ** Test byte-range lock using fcntl(). If the call succeeds, 
    +  ** assume that the file-system supports POSIX style locks. 
    +  */
    +  lockInfo.l_len = 1;
    +  lockInfo.l_start = 0;
    +  lockInfo.l_whence = SEEK_SET;
    +  lockInfo.l_type = F_RDLCK;
    +  if( fcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {
    +    pNew->fileFlags = SQLITE_WHOLE_FILE_LOCKING;
    +    return &posixIoMethods;
    +  }else{
    +    return &dotlockIoMethods;
    +  }
    +}
    +static const sqlite3_io_methods 
    +  *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
    +
    +#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
    +
    +#if OS_VXWORKS && SQLITE_ENABLE_LOCKING_STYLE
    +/* 
    +** This "finder" function attempts to determine the best locking strategy 
    +** for the database file "filePath".  It then returns the sqlite3_io_methods
    +** object that implements that strategy.
    +**
    +** This is for VXWorks only.
    +*/
    +static const sqlite3_io_methods *autolockIoFinderImpl(
    +  const char *filePath,    /* name of the database file */
    +  unixFile *pNew           /* the open file object */
    +){
    +  struct flock lockInfo;
    +
    +  if( !filePath ){
    +    /* If filePath==NULL that means we are dealing with a transient file
    +    ** that does not need to be locked. */
    +    return &nolockIoMethods;
    +  }
    +
    +  /* Test if fcntl() is supported and use POSIX style locks.
    +  ** Otherwise fall back to the named semaphore method.
    +  */
    +  lockInfo.l_len = 1;
    +  lockInfo.l_start = 0;
    +  lockInfo.l_whence = SEEK_SET;
    +  lockInfo.l_type = F_RDLCK;
    +  if( fcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {
    +    return &posixIoMethods;
    +  }else{
    +    return &semIoMethods;
    +  }
    +}
    +static const sqlite3_io_methods 
    +  *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
    +
    +#endif /* OS_VXWORKS && SQLITE_ENABLE_LOCKING_STYLE */
    +
    +/*
    +** An abstract type for a pointer to a IO method finder function:
    +*/
    +typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
    +
    +
    +/****************************************************************************
    +**************************** sqlite3_vfs methods ****************************
    +**
    +** This division contains the implementation of methods on the
    +** sqlite3_vfs object.
    +*/
    +
    +/*
    +** Initialize the contents of the unixFile structure pointed to by pId.
    +*/
    +static int fillInUnixFile(
    +  sqlite3_vfs *pVfs,      /* Pointer to vfs object */
    +  int h,                  /* Open file descriptor of file being opened */
    +  int dirfd,              /* Directory file descriptor */
    +  sqlite3_file *pId,      /* Write to the unixFile structure here */
    +  const char *zFilename,  /* Name of the file being opened */
    +  int noLock,             /* Omit locking if true */
    +  int isDelete            /* Delete on close if true */
    +){
    +  const sqlite3_io_methods *pLockingStyle;
    +  unixFile *pNew = (unixFile *)pId;
    +  int rc = SQLITE_OK;
    +
    +  assert( pNew->pLock==NULL );
    +  assert( pNew->pOpen==NULL );
    +
    +  /* Parameter isDelete is only used on vxworks. Express this explicitly 
    +  ** here to prevent compiler warnings about unused parameters.
    +  */
    +  UNUSED_PARAMETER(isDelete);
    +
    +  OSTRACE3("OPEN    %-3d %s\n", h, zFilename);    
    +  pNew->h = h;
    +  pNew->dirfd = dirfd;
    +  SET_THREADID(pNew);
    +  pNew->fileFlags = 0;
    +
    +#if OS_VXWORKS
    +  pNew->pId = vxworksFindFileId(zFilename);
    +  if( pNew->pId==0 ){
    +    noLock = 1;
    +    rc = SQLITE_NOMEM;
    +  }
    +#endif
    +
    +  if( noLock ){
    +    pLockingStyle = &nolockIoMethods;
    +  }else{
    +    pLockingStyle = (**(finder_type*)pVfs->pAppData)(zFilename, pNew);
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +    /* Cache zFilename in the locking context (AFP and dotlock override) for
    +    ** proxyLock activation is possible (remote proxy is based on db name)
    +    ** zFilename remains valid until file is closed, to support */
    +    pNew->lockingContext = (void*)zFilename;
    +#endif
    +  }
    +
    +  if( pLockingStyle == &posixIoMethods ){
    +    unixEnterMutex();
    +    rc = findLockInfo(pNew, &pNew->pLock, &pNew->pOpen);
    +    if( rc!=SQLITE_OK ){
    +      /* If an error occured in findLockInfo(), close the file descriptor
    +      ** immediately, before releasing the mutex. findLockInfo() may fail
    +      ** in two scenarios:
    +      **
    +      **   (a) A call to fstat() failed.
    +      **   (b) A malloc failed.
    +      **
    +      ** Scenario (b) may only occur if the process is holding no other
    +      ** file descriptors open on the same file. If there were other file
    +      ** descriptors on this file, then no malloc would be required by
    +      ** findLockInfo(). If this is the case, it is quite safe to close
    +      ** handle h - as it is guaranteed that no posix locks will be released
    +      ** by doing so.
    +      **
    +      ** If scenario (a) caused the error then things are not so safe. The
    +      ** implicit assumption here is that if fstat() fails, things are in
    +      ** such bad shape that dropping a lock or two doesn't matter much.
    +      */
    +      close(h);
    +      h = -1;
    +    }
    +    unixLeaveMutex();
    +  }
    +
    +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    +  else if( pLockingStyle == &afpIoMethods ){
    +    /* AFP locking uses the file path so it needs to be included in
    +    ** the afpLockingContext.
    +    */
    +    afpLockingContext *pCtx;
    +    pNew->lockingContext = pCtx = sqlite3_malloc( sizeof(*pCtx) );
    +    if( pCtx==0 ){
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      /* NB: zFilename exists and remains valid until the file is closed
    +      ** according to requirement F11141.  So we do not need to make a
    +      ** copy of the filename. */
    +      pCtx->dbPath = zFilename;
    +      srandomdev();
    +      unixEnterMutex();
    +      rc = findLockInfo(pNew, NULL, &pNew->pOpen);
    +      unixLeaveMutex();        
    +    }
    +  }
    +#endif
    +
    +  else if( pLockingStyle == &dotlockIoMethods ){
    +    /* Dotfile locking uses the file path so it needs to be included in
    +    ** the dotlockLockingContext 
    +    */
    +    char *zLockFile;
    +    int nFilename;
    +    nFilename = (int)strlen(zFilename) + 6;
    +    zLockFile = (char *)sqlite3_malloc(nFilename);
    +    if( zLockFile==0 ){
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      sqlite3_snprintf(nFilename, zLockFile, "%s" DOTLOCK_SUFFIX, zFilename);
    +    }
    +    pNew->lockingContext = zLockFile;
    +  }
    +
    +#if OS_VXWORKS
    +  else if( pLockingStyle == &semIoMethods ){
    +    /* Named semaphore locking uses the file path so it needs to be
    +    ** included in the semLockingContext
    +    */
    +    unixEnterMutex();
    +    rc = findLockInfo(pNew, &pNew->pLock, &pNew->pOpen);
    +    if( (rc==SQLITE_OK) && (pNew->pOpen->pSem==NULL) ){
    +      char *zSemName = pNew->pOpen->aSemName;
    +      int n;
    +      sqlite3_snprintf(MAX_PATHNAME, zSemName, "/%s.sem",
    +                       pNew->pId->zCanonicalName);
    +      for( n=1; zSemName[n]; n++ )
    +        if( zSemName[n]=='/' ) zSemName[n] = '_';
    +      pNew->pOpen->pSem = sem_open(zSemName, O_CREAT, 0666, 1);
    +      if( pNew->pOpen->pSem == SEM_FAILED ){
    +        rc = SQLITE_NOMEM;
    +        pNew->pOpen->aSemName[0] = '\0';
    +      }
    +    }
    +    unixLeaveMutex();
    +  }
    +#endif
    +  
    +  pNew->lastErrno = 0;
    +#if OS_VXWORKS
    +  if( rc!=SQLITE_OK ){
    +    unlink(zFilename);
    +    isDelete = 0;
    +  }
    +  pNew->isDelete = isDelete;
    +#endif
    +  if( rc!=SQLITE_OK ){
    +    if( dirfd>=0 ) close(dirfd); /* silent leak if fail, already in error */
    +    if( h>=0 ) close(h);
    +  }else{
    +    pNew->pMethod = pLockingStyle;
    +    OpenCounter(+1);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Open a file descriptor to the directory containing file zFilename.
    +** If successful, *pFd is set to the opened file descriptor and
    +** SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM
    +** or SQLITE_CANTOPEN is returned and *pFd is set to an undefined
    +** value.
    +**
    +** If SQLITE_OK is returned, the caller is responsible for closing
    +** the file descriptor *pFd using close().
    +*/
    +static int openDirectory(const char *zFilename, int *pFd){
    +  int ii;
    +  int fd = -1;
    +  char zDirname[MAX_PATHNAME+1];
    +
    +  sqlite3_snprintf(MAX_PATHNAME, zDirname, "%s", zFilename);
    +  for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--);
    +  if( ii>0 ){
    +    zDirname[ii] = '\0';
    +    fd = open(zDirname, O_RDONLY|O_BINARY, 0);
    +    if( fd>=0 ){
    +#ifdef FD_CLOEXEC
    +      fcntl(fd, F_SETFD, fcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
    +#endif
    +      OSTRACE3("OPENDIR %-3d %s\n", fd, zDirname);
    +    }
    +  }
    +  *pFd = fd;
    +  return (fd>=0?SQLITE_OK:SQLITE_CANTOPEN);
    +}
    +
    +/*
    +** Create a temporary file name in zBuf.  zBuf must be allocated
    +** by the calling process and must be big enough to hold at least
    +** pVfs->mxPathname bytes.
    +*/
    +static int getTempname(int nBuf, char *zBuf){
    +  static const char *azDirs[] = {
    +     0,
    +     0,
    +     "/var/tmp",
    +     "/usr/tmp",
    +     "/tmp",
    +     ".",
    +  };
    +  static const unsigned char zChars[] =
    +    "abcdefghijklmnopqrstuvwxyz"
    +    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    "0123456789";
    +  unsigned int i, j;
    +  struct stat buf;
    +  const char *zDir = ".";
    +
    +  /* It's odd to simulate an io-error here, but really this is just
    +  ** using the io-error infrastructure to test that SQLite handles this
    +  ** function failing. 
    +  */
    +  SimulateIOError( return SQLITE_IOERR );
    +
    +  azDirs[0] = sqlite3_temp_directory;
    +  if (NULL == azDirs[1]) {
    +    azDirs[1] = getenv("TMPDIR");
    +  }
    +  
    +  for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); i++){
    +    if( azDirs[i]==0 ) continue;
    +    if( stat(azDirs[i], &buf) ) continue;
    +    if( !S_ISDIR(buf.st_mode) ) continue;
    +    if( access(azDirs[i], 07) ) continue;
    +    zDir = azDirs[i];
    +    break;
    +  }
    +
    +  /* Check that the output buffer is large enough for the temporary file 
    +  ** name. If it is not, return SQLITE_ERROR.
    +  */
    +  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 17) >= (size_t)nBuf ){
    +    return SQLITE_ERROR;
    +  }
    +
    +  do{
    +    sqlite3_snprintf(nBuf-17, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX, zDir);
    +    j = (int)strlen(zBuf);
    +    sqlite3_randomness(15, &zBuf[j]);
    +    for(i=0; i<15; i++, j++){
    +      zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
    +    }
    +    zBuf[j] = 0;
    +  }while( access(zBuf,0)==0 );
    +  return SQLITE_OK;
    +}
    +
    +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    +/*
    +** Routine to transform a unixFile into a proxy-locking unixFile.
    +** Implementation in the proxy-lock division, but used by unixOpen()
    +** if SQLITE_PREFER_PROXY_LOCKING is defined.
    +*/
    +static int proxyTransformUnixFile(unixFile*, const char*);
    +#endif
    +
    +/*
    +** Search for an unused file descriptor that was opened on the database 
    +** file (not a journal or master-journal file) identified by pathname
    +** zPath with SQLITE_OPEN_XXX flags matching those passed as the second
    +** argument to this function.
    +**
    +** Such a file descriptor may exist if a database connection was closed
    +** but the associated file descriptor could not be closed because some
    +** other file descriptor open on the same file is holding a file-lock.
    +** Refer to comments in the unixClose() function and the lengthy comment
    +** describing "Posix Advisory Locking" at the start of this file for 
    +** further details. Also, ticket #4018.
    +**
    +** If a suitable file descriptor is found, then it is returned. If no
    +** such file descriptor is located, -1 is returned.
    +*/
    +static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
    +  UnixUnusedFd *pUnused = 0;
    +
    +  /* Do not search for an unused file descriptor on vxworks. Not because
    +  ** vxworks would not benefit from the change (it might, we're not sure),
    +  ** but because no way to test it is currently available. It is better 
    +  ** not to risk breaking vxworks support for the sake of such an obscure 
    +  ** feature.  */
    +#if !OS_VXWORKS
    +  struct stat sStat;                   /* Results of stat() call */
    +
    +  /* A stat() call may fail for various reasons. If this happens, it is
    +  ** almost certain that an open() call on the same path will also fail.
    +  ** For this reason, if an error occurs in the stat() call here, it is
    +  ** ignored and -1 is returned. The caller will try to open a new file
    +  ** descriptor on the same path, fail, and return an error to SQLite.
    +  **
    +  ** Even if a subsequent open() call does succeed, the consequences of
    +  ** not searching for a resusable file descriptor are not dire.  */
    +  if( 0==stat(zPath, &sStat) ){
    +    struct unixOpenCnt *pO;
    +    struct unixFileId id;
    +    id.dev = sStat.st_dev;
    +    id.ino = sStat.st_ino;
    +
    +    unixEnterMutex();
    +    for(pO=openList; pO && memcmp(&id, &pO->fileId, sizeof(id)); pO=pO->pNext);
    +    if( pO ){
    +      UnixUnusedFd **pp;
    +      for(pp=&pO->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));
    +      pUnused = *pp;
    +      if( pUnused ){
    +        *pp = pUnused->pNext;
    +      }
    +    }
    +    unixLeaveMutex();
    +  }
    +#endif    /* if !OS_VXWORKS */
    +  return pUnused;
    +}
    +
    +/*
    +** Open the file zPath.
    +** 
    +** Previously, the SQLite OS layer used three functions in place of this
    +** one:
    +**
    +**     sqlite3OsOpenReadWrite();
    +**     sqlite3OsOpenReadOnly();
    +**     sqlite3OsOpenExclusive();
    +**
    +** These calls correspond to the following combinations of flags:
    +**
    +**     ReadWrite() ->     (READWRITE | CREATE)
    +**     ReadOnly()  ->     (READONLY) 
    +**     OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE)
    +**
    +** The old OpenExclusive() accepted a boolean argument - "delFlag". If
    +** true, the file was configured to be automatically deleted when the
    +** file handle closed. To achieve the same effect using this new 
    +** interface, add the DELETEONCLOSE flag to those specified above for 
    +** OpenExclusive().
    +*/
    +static int unixOpen(
    +  sqlite3_vfs *pVfs,           /* The VFS for which this is the xOpen method */
    +  const char *zPath,           /* Pathname of file to be opened */
    +  sqlite3_file *pFile,         /* The file descriptor to be filled in */
    +  int flags,                   /* Input flags to control the opening */
    +  int *pOutFlags               /* Output flags returned to SQLite core */
    +){
    +  unixFile *p = (unixFile *)pFile;
    +  int fd = -1;                   /* File descriptor returned by open() */
    +  int dirfd = -1;                /* Directory file descriptor */
    +  int openFlags = 0;             /* Flags to pass to open() */
    +  int eType = flags&0xFFFFFF00;  /* Type of file to open */
    +  int noLock;                    /* True to omit locking primitives */
    +  int rc = SQLITE_OK;            /* Function Return Code */
    +
    +  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);
    +  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);
    +  int isCreate     = (flags & SQLITE_OPEN_CREATE);
    +  int isReadonly   = (flags & SQLITE_OPEN_READONLY);
    +  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);
    +
    +  /* If creating a master or main-file journal, this function will open
    +  ** a file-descriptor on the directory too. The first time unixSync()
    +  ** is called the directory file descriptor will be fsync()ed and close()d.
    +  */
    +  int isOpenDirectory = (isCreate && 
    +      (eType==SQLITE_OPEN_MASTER_JOURNAL || eType==SQLITE_OPEN_MAIN_JOURNAL)
    +  );
    +
    +  /* If argument zPath is a NULL pointer, this function is required to open
    +  ** a temporary file. Use this buffer to store the file name in.
    +  */
    +  char zTmpname[MAX_PATHNAME+1];
    +  const char *zName = zPath;
    +
    +  /* Check the following statements are true: 
    +  **
    +  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and 
    +  **   (b) if CREATE is set, then READWRITE must also be set, and
    +  **   (c) if EXCLUSIVE is set, then CREATE must also be set.
    +  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.
    +  */
    +  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));
    +  assert(isCreate==0 || isReadWrite);
    +  assert(isExclusive==0 || isCreate);
    +  assert(isDelete==0 || isCreate);
    +
    +  /* The main DB, main journal, and master journal are never automatically
    +  ** deleted. Nor are they ever temporary files.  */
    +  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
    +  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
    +  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
    +
    +  /* Assert that the upper layer has set one of the "file-type" flags. */
    +  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB 
    +       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL 
    +       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_MASTER_JOURNAL 
    +       || eType==SQLITE_OPEN_TRANSIENT_DB
    +  );
    +
    +  memset(p, 0, sizeof(unixFile));
    +
    +  if( eType==SQLITE_OPEN_MAIN_DB ){
    +    UnixUnusedFd *pUnused;
    +    pUnused = findReusableFd(zName, flags);
    +    if( pUnused ){
    +      fd = pUnused->fd;
    +    }else{
    +      pUnused = sqlite3_malloc(sizeof(*pUnused));
    +      if( !pUnused ){
    +        return SQLITE_NOMEM;
    +      }
    +    }
    +    p->pUnused = pUnused;
    +  }else if( !zName ){
    +    /* If zName is NULL, the upper layer is requesting a temp file. */
    +    assert(isDelete && !isOpenDirectory);
    +    rc = getTempname(MAX_PATHNAME+1, zTmpname);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    zName = zTmpname;
    +  }
    +
    +  /* Determine the value of the flags parameter passed to POSIX function
    +  ** open(). These must be calculated even if open() is not called, as
    +  ** they may be stored as part of the file handle and used by the 
    +  ** 'conch file' locking functions later on.  */
    +  if( isReadonly )  openFlags |= O_RDONLY;
    +  if( isReadWrite ) openFlags |= O_RDWR;
    +  if( isCreate )    openFlags |= O_CREAT;
    +  if( isExclusive ) openFlags |= (O_EXCL|O_NOFOLLOW);
    +  openFlags |= (O_LARGEFILE|O_BINARY);
    +
    +  if( fd<0 ){
    +    mode_t openMode = (isDelete?0600:SQLITE_DEFAULT_FILE_PERMISSIONS);
    +    fd = open(zName, openFlags, openMode);
    +    OSTRACE4("OPENX   %-3d %s 0%o\n", fd, zName, openFlags);
    +    if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){
    +      /* Failed to open the file for read/write access. Try read-only. */
    +      flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
    +      openFlags &= ~(O_RDWR|O_CREAT);
    +      flags |= SQLITE_OPEN_READONLY;
    +      openFlags |= O_RDONLY;
    +      fd = open(zName, openFlags, openMode);
    +    }
    +    if( fd<0 ){
    +      rc = SQLITE_CANTOPEN;
    +      goto open_finished;
    +    }
    +  }
    +  assert( fd>=0 );
    +  if( pOutFlags ){
    +    *pOutFlags = flags;
    +  }
    +
    +  if( p->pUnused ){
    +    p->pUnused->fd = fd;
    +    p->pUnused->flags = flags;
    +  }
    +
    +  if( isDelete ){
    +#if OS_VXWORKS
    +    zPath = zName;
    +#else
    +    unlink(zName);
    +#endif
    +  }
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +  else{
    +    p->openFlags = openFlags;
    +  }
    +#endif
    +
    +  if( isOpenDirectory ){
    +    rc = openDirectory(zPath, &dirfd);
    +    if( rc!=SQLITE_OK ){
    +      /* It is safe to close fd at this point, because it is guaranteed not
    +      ** to be open on a database file. If it were open on a database file,
    +      ** it would not be safe to close as this would release any locks held
    +      ** on the file by this process.  */
    +      assert( eType!=SQLITE_OPEN_MAIN_DB );
    +      close(fd);             /* silently leak if fail, already in error */
    +      goto open_finished;
    +    }
    +  }
    +
    +#ifdef FD_CLOEXEC
    +  fcntl(fd, F_SETFD, fcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
    +#endif
    +
    +  noLock = eType!=SQLITE_OPEN_MAIN_DB;
    +
    +#if SQLITE_PREFER_PROXY_LOCKING
    +  if( zPath!=NULL && !noLock && pVfs->xOpen ){
    +    char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
    +    int useProxy = 0;
    +
    +    /* SQLITE_FORCE_PROXY_LOCKING==1 means force always use proxy, 0 means 
    +    ** never use proxy, NULL means use proxy for non-local files only.  */
    +    if( envforce!=NULL ){
    +      useProxy = atoi(envforce)>0;
    +    }else{
    +      struct statfs fsInfo;
    +      if( statfs(zPath, &fsInfo) == -1 ){
    +        /* In theory, the close(fd) call is sub-optimal. If the file opened
    +        ** with fd is a database file, and there are other connections open
    +        ** on that file that are currently holding advisory locks on it,
    +        ** then the call to close() will cancel those locks. In practice,
    +        ** we're assuming that statfs() doesn't fail very often. At least
    +        ** not while other file descriptors opened by the same process on
    +        ** the same file are working.  */
    +        p->lastErrno = errno;
    +        if( dirfd>=0 ){
    +          close(dirfd); /* silently leak if fail, in error */
    +        }
    +        close(fd); /* silently leak if fail, in error */
    +        rc = SQLITE_IOERR_ACCESS;
    +        goto open_finished;
    +      }
    +      useProxy = !(fsInfo.f_flags&MNT_LOCAL);
    +    }
    +    if( useProxy ){
    +      rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock, isDelete);
    +      if( rc==SQLITE_OK ){
    +        rc = proxyTransformUnixFile((unixFile*)pFile, ":auto:");
    +      }
    +      goto open_finished;
    +    }
    +  }
    +#endif
    +  
    +  rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock, isDelete);
    +open_finished:
    +  if( rc!=SQLITE_OK ){
    +    sqlite3_free(p->pUnused);
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Delete the file at zPath. If the dirSync argument is true, fsync()
    +** the directory after deleting the file.
    +*/
    +static int unixDelete(
    +  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
    +  const char *zPath,        /* Name of file to be deleted */
    +  int dirSync               /* If true, fsync() directory after deleting file */
    +){
    +  int rc = SQLITE_OK;
    +  UNUSED_PARAMETER(NotUsed);
    +  SimulateIOError(return SQLITE_IOERR_DELETE);
    +  unlink(zPath);
    +#ifndef SQLITE_DISABLE_DIRSYNC
    +  if( dirSync ){
    +    int fd;
    +    rc = openDirectory(zPath, &fd);
    +    if( rc==SQLITE_OK ){
    +#if OS_VXWORKS
    +      if( fsync(fd)==-1 )
    +#else
    +      if( fsync(fd) )
    +#endif
    +      {
    +        rc = SQLITE_IOERR_DIR_FSYNC;
    +      }
    +      if( close(fd)&&!rc ){
    +        rc = SQLITE_IOERR_DIR_CLOSE;
    +      }
    +    }
    +  }
    +#endif
    +  return rc;
    +}
    +
    +/*
    +** Test the existance of or access permissions of file zPath. The
    +** test performed depends on the value of flags:
    +**
    +**     SQLITE_ACCESS_EXISTS: Return 1 if the file exists
    +**     SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
    +**     SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
    +**
    +** Otherwise return 0.
    +*/
    +static int unixAccess(
    +  sqlite3_vfs *NotUsed,   /* The VFS containing this xAccess method */
    +  const char *zPath,      /* Path of the file to examine */
    +  int flags,              /* What do we want to learn about the zPath file? */
    +  int *pResOut            /* Write result boolean here */
    +){
    +  int amode = 0;
    +  UNUSED_PARAMETER(NotUsed);
    +  SimulateIOError( return SQLITE_IOERR_ACCESS; );
    +  switch( flags ){
    +    case SQLITE_ACCESS_EXISTS:
    +      amode = F_OK;
    +      break;
    +    case SQLITE_ACCESS_READWRITE:
    +      amode = W_OK|R_OK;
    +      break;
    +    case SQLITE_ACCESS_READ:
    +      amode = R_OK;
    +      break;
    +
    +    default:
    +      assert(!"Invalid flags argument");
    +  }
    +  *pResOut = (access(zPath, amode)==0);
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Turn a relative pathname into a full pathname. The relative path
    +** is stored as a nul-terminated string in the buffer pointed to by
    +** zPath. 
    +**
    +** zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes 
    +** (in this case, MAX_PATHNAME bytes). The full-path is written to
    +** this buffer before returning.
    +*/
    +static int unixFullPathname(
    +  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
    +  const char *zPath,            /* Possibly relative input path */
    +  int nOut,                     /* Size of output buffer in bytes */
    +  char *zOut                    /* Output buffer */
    +){
    +
    +  /* It's odd to simulate an io-error here, but really this is just
    +  ** using the io-error infrastructure to test that SQLite handles this
    +  ** function failing. This function could fail if, for example, the
    +  ** current working directory has been unlinked.
    +  */
    +  SimulateIOError( return SQLITE_ERROR );
    +
    +  assert( pVfs->mxPathname==MAX_PATHNAME );
    +  UNUSED_PARAMETER(pVfs);
    +
    +  zOut[nOut-1] = '\0';
    +  if( zPath[0]=='/' ){
    +    sqlite3_snprintf(nOut, zOut, "%s", zPath);
    +  }else{
    +    int nCwd;
    +    if( getcwd(zOut, nOut-1)==0 ){
    +      return SQLITE_CANTOPEN;
    +    }
    +    nCwd = (int)strlen(zOut);
    +    sqlite3_snprintf(nOut-nCwd, &zOut[nCwd], "/%s", zPath);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +/*
    +** Interfaces for opening a shared library, finding entry points
    +** within the shared library, and closing the shared library.
    +*/
    +#include <dlfcn.h>
    +static void *unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename){
    +  UNUSED_PARAMETER(NotUsed);
    +  return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);
    +}
    +
    +/*
    +** SQLite calls this function immediately after a call to unixDlSym() or
    +** unixDlOpen() fails (returns a null pointer). If a more detailed error
    +** message is available, it is written to zBufOut. If no error message
    +** is available, zBufOut is left unmodified and SQLite uses a default
    +** error message.
    +*/
    +static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){
    +  char *zErr;
    +  UNUSED_PARAMETER(NotUsed);
    +  unixEnterMutex();
    +  zErr = dlerror();
    +  if( zErr ){
    +    sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
    +  }
    +  unixLeaveMutex();
    +}
    +static void (*unixDlSym(sqlite3_vfs *NotUsed, void *p, const char*zSym))(void){
    +  /* 
    +  ** GCC with -pedantic-errors says that C90 does not allow a void* to be
    +  ** cast into a pointer to a function.  And yet the library dlsym() routine
    +  ** returns a void* which is really a pointer to a function.  So how do we
    +  ** use dlsym() with -pedantic-errors?
    +  **
    +  ** Variable x below is defined to be a pointer to a function taking
    +  ** parameters void* and const char* and returning a pointer to a function.
    +  ** We initialize x by assigning it a pointer to the dlsym() function.
    +  ** (That assignment requires a cast.)  Then we call the function that
    +  ** x points to.  
    +  **
    +  ** This work-around is unlikely to work correctly on any system where
    +  ** you really cannot cast a function pointer into void*.  But then, on the
    +  ** other hand, dlsym() will not work on such a system either, so we have
    +  ** not really lost anything.
    +  */
    +  void (*(*x)(void*,const char*))(void);
    +  UNUSED_PARAMETER(NotUsed);
    +  x = (void(*(*)(void*,const char*))(void))dlsym;
    +  return (*x)(p, zSym);
    +}
    +static void unixDlClose(sqlite3_vfs *NotUsed, void *pHandle){
    +  UNUSED_PARAMETER(NotUsed);
    +  dlclose(pHandle);
    +}
    +#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
    +  #define unixDlOpen  0
    +  #define unixDlError 0
    +  #define unixDlSym   0
    +  #define unixDlClose 0
    +#endif
    +
    +/*
    +** Write nBuf bytes of random data to the supplied buffer zBuf.
    +*/
    +static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
    +  UNUSED_PARAMETER(NotUsed);
    +  assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));
    +
    +  /* We have to initialize zBuf to prevent valgrind from reporting
    +  ** errors.  The reports issued by valgrind are incorrect - we would
    +  ** prefer that the randomness be increased by making use of the
    +  ** uninitialized space in zBuf - but valgrind errors tend to worry
    +  ** some users.  Rather than argue, it seems easier just to initialize
    +  ** the whole array and silence valgrind, even if that means less randomness
    +  ** in the random seed.
    +  **
    +  ** When testing, initializing zBuf[] to zero is all we do.  That means
    +  ** that we always use the same random number sequence.  This makes the
    +  ** tests repeatable.
    +  */
    +  memset(zBuf, 0, nBuf);
    +#if !defined(SQLITE_TEST)
    +  {
    +    int pid, fd;
    +    fd = open("/dev/urandom", O_RDONLY);
    +    if( fd<0 ){
    +      time_t t;
    +      time(&t);
    +      memcpy(zBuf, &t, sizeof(t));
    +      pid = getpid();
    +      memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
    +      assert( sizeof(t)+sizeof(pid)<=(size_t)nBuf );
    +      nBuf = sizeof(t) + sizeof(pid);
    +    }else{
    +      nBuf = read(fd, zBuf, nBuf);
    +      close(fd);
    +    }
    +  }
    +#endif
    +  return nBuf;
    +}
    +
    +
    +/*
    +** Sleep for a little while.  Return the amount of time slept.
    +** The argument is the number of microseconds we want to sleep.
    +** The return value is the number of microseconds of sleep actually
    +** requested from the underlying operating system, a number which
    +** might be greater than or equal to the argument, but not less
    +** than the argument.
    +*/
    +static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
    +#if OS_VXWORKS
    +  struct timespec sp;
    +
    +  sp.tv_sec = microseconds / 1000000;
    +  sp.tv_nsec = (microseconds % 1000000) * 1000;
    +  nanosleep(&sp, NULL);
    +  UNUSED_PARAMETER(NotUsed);
    +  return microseconds;
    +#elif defined(HAVE_USLEEP) && HAVE_USLEEP
    +  usleep(microseconds);
    +  UNUSED_PARAMETER(NotUsed);
    +  return microseconds;
    +#else
    +  int seconds = (microseconds+999999)/1000000;
    +  sleep(seconds);
    +  UNUSED_PARAMETER(NotUsed);
    +  return seconds*1000000;
    +#endif
    +}
    +
    +/*
    +** The following variable, if set to a non-zero value, is interpreted as
    +** the number of seconds since 1970 and is used to set the result of
    +** sqlite3OsCurrentTime() during testing.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_current_time = 0;  /* Fake system time in seconds since 1970. */
    +#endif
    +
    +/*
    +** Find the current time (in Universal Coordinated Time).  Write the
    +** current time and date as a Julian Day number into *prNow and
    +** return 0.  Return 1 if the time and date cannot be found.
    +*/
    +static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
    +#if defined(SQLITE_OMIT_FLOATING_POINT)
    +  time_t t;
    +  time(&t);
    +  *prNow = (((sqlite3_int64)t)/8640 + 24405875)/10;
    +#elif defined(NO_GETTOD)
    +  time_t t;
    +  time(&t);
    +  *prNow = t/86400.0 + 2440587.5;
    +#elif OS_VXWORKS
    +  struct timespec sNow;
    +  clock_gettime(CLOCK_REALTIME, &sNow);
    +  *prNow = 2440587.5 + sNow.tv_sec/86400.0 + sNow.tv_nsec/86400000000000.0;
    +#else
    +  struct timeval sNow;
    +  gettimeofday(&sNow, 0);
    +  *prNow = 2440587.5 + sNow.tv_sec/86400.0 + sNow.tv_usec/86400000000.0;
    +#endif
    +
    +#ifdef SQLITE_TEST
    +  if( sqlite3_current_time ){
    +    *prNow = sqlite3_current_time/86400.0 + 2440587.5;
    +  }
    +#endif
    +  UNUSED_PARAMETER(NotUsed);
    +  return 0;
    +}
    +
    +/*
    +** We added the xGetLastError() method with the intention of providing
    +** better low-level error messages when operating-system problems come up
    +** during SQLite operation.  But so far, none of that has been implemented
    +** in the core.  So this routine is never called.  For now, it is merely
    +** a place-holder.
    +*/
    +static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){
    +  UNUSED_PARAMETER(NotUsed);
    +  UNUSED_PARAMETER(NotUsed2);
    +  UNUSED_PARAMETER(NotUsed3);
    +  return 0;
    +}
    +
    +/*
    +************************ End of sqlite3_vfs methods ***************************
    +******************************************************************************/
    +
    +/******************************************************************************
    +************************** Begin Proxy Locking ********************************
    +**
    +** Proxy locking is a "uber-locking-method" in this sense:  It uses the
    +** other locking methods on secondary lock files.  Proxy locking is a
    +** meta-layer over top of the primitive locking implemented above.  For
    +** this reason, the division that implements of proxy locking is deferred
    +** until late in the file (here) after all of the other I/O methods have
    +** been defined - so that the primitive locking methods are available
    +** as services to help with the implementation of proxy locking.
    +**
    +****
    +**
    +** The default locking schemes in SQLite use byte-range locks on the
    +** database file to coordinate safe, concurrent access by multiple readers
    +** and writers [http://sqlite.org/lockingv3.html].  The five file locking
    +** states (UNLOCKED, PENDING, SHARED, RESERVED, EXCLUSIVE) are implemented
    +** as POSIX read & write locks over fixed set of locations (via fsctl),
    +** on AFP and SMB only exclusive byte-range locks are available via fsctl
    +** with _IOWR('z', 23, struct ByteRangeLockPB2) to track the same 5 states.
    +** To simulate a F_RDLCK on the shared range, on AFP a randomly selected
    +** address in the shared range is taken for a SHARED lock, the entire
    +** shared range is taken for an EXCLUSIVE lock):
    +**
    +**      PENDING_BYTE        0x40000000		   	
    +**      RESERVED_BYTE       0x40000001
    +**      SHARED_RANGE        0x40000002 -> 0x40000200
    +**
    +** This works well on the local file system, but shows a nearly 100x
    +** slowdown in read performance on AFP because the AFP client disables
    +** the read cache when byte-range locks are present.  Enabling the read
    +** cache exposes a cache coherency problem that is present on all OS X
    +** supported network file systems.  NFS and AFP both observe the
    +** close-to-open semantics for ensuring cache coherency
    +** [http://nfs.sourceforge.net/#faq_a8], which does not effectively
    +** address the requirements for concurrent database access by multiple
    +** readers and writers
    +** [http://www.nabble.com/SQLite-on-NFS-cache-coherency-td15655701.html].
    +**
    +** To address the performance and cache coherency issues, proxy file locking
    +** changes the way database access is controlled by limiting access to a
    +** single host at a time and moving file locks off of the database file
    +** and onto a proxy file on the local file system.  
    +**
    +**
    +** Using proxy locks
    +** -----------------
    +**
    +** C APIs
    +**
    +**  sqlite3_file_control(db, dbname, SQLITE_SET_LOCKPROXYFILE,
    +**                       <proxy_path> | ":auto:");
    +**  sqlite3_file_control(db, dbname, SQLITE_GET_LOCKPROXYFILE, &<proxy_path>);
    +**
    +**
    +** SQL pragmas
    +**
    +**  PRAGMA [database.]lock_proxy_file=<proxy_path> | :auto:
    +**  PRAGMA [database.]lock_proxy_file
    +**
    +** Specifying ":auto:" means that if there is a conch file with a matching
    +** host ID in it, the proxy path in the conch file will be used, otherwise
    +** a proxy path based on the user's temp dir
    +** (via confstr(_CS_DARWIN_USER_TEMP_DIR,...)) will be used and the
    +** actual proxy file name is generated from the name and path of the
    +** database file.  For example:
    +**
    +**       For database path "/Users/me/foo.db" 
    +**       The lock path will be "<tmpdir>/sqliteplocks/_Users_me_foo.db:auto:")
    +**
    +** Once a lock proxy is configured for a database connection, it can not
    +** be removed, however it may be switched to a different proxy path via
    +** the above APIs (assuming the conch file is not being held by another
    +** connection or process). 
    +**
    +**
    +** How proxy locking works
    +** -----------------------
    +**
    +** Proxy file locking relies primarily on two new supporting files: 
    +**
    +**   *  conch file to limit access to the database file to a single host
    +**      at a time
    +**
    +**   *  proxy file to act as a proxy for the advisory locks normally
    +**      taken on the database
    +**
    +** The conch file - to use a proxy file, sqlite must first "hold the conch"
    +** by taking an sqlite-style shared lock on the conch file, reading the
    +** contents and comparing the host's unique host ID (see below) and lock
    +** proxy path against the values stored in the conch.  The conch file is
    +** stored in the same directory as the database file and the file name
    +** is patterned after the database file name as ".<databasename>-conch".
    +** If the conch file does not exist, or it's contents do not match the
    +** host ID and/or proxy path, then the lock is escalated to an exclusive
    +** lock and the conch file contents is updated with the host ID and proxy
    +** path and the lock is downgraded to a shared lock again.  If the conch
    +** is held by another process (with a shared lock), the exclusive lock
    +** will fail and SQLITE_BUSY is returned.
    +**
    +** The proxy file - a single-byte file used for all advisory file locks
    +** normally taken on the database file.   This allows for safe sharing
    +** of the database file for multiple readers and writers on the same
    +** host (the conch ensures that they all use the same local lock file).
    +**
    +** There is a third file - the host ID file - used as a persistent record
    +** of a unique identifier for the host, a 128-byte unique host id file
    +** in the path defined by the HOSTIDPATH macro (default value is
    +** /Library/Caches/.com.apple.sqliteConchHostId).
    +**
    +** Requesting the lock proxy does not immediately take the conch, it is
    +** only taken when the first request to lock database file is made.  
    +** This matches the semantics of the traditional locking behavior, where
    +** opening a connection to a database file does not take a lock on it.
    +** The shared lock and an open file descriptor are maintained until 
    +** the connection to the database is closed. 
    +**
    +** The proxy file and the lock file are never deleted so they only need
    +** to be created the first time they are used.
    +**
    +** Configuration options
    +** ---------------------
    +**
    +**  SQLITE_PREFER_PROXY_LOCKING
    +**
    +**       Database files accessed on non-local file systems are
    +**       automatically configured for proxy locking, lock files are
    +**       named automatically using the same logic as
    +**       PRAGMA lock_proxy_file=":auto:"
    +**    
    +**  SQLITE_PROXY_DEBUG
    +**
    +**       Enables the logging of error messages during host id file
    +**       retrieval and creation
    +**
    +**  HOSTIDPATH
    +**
    +**       Overrides the default host ID file path location
    +**
    +**  LOCKPROXYDIR
    +**
    +**       Overrides the default directory used for lock proxy files that
    +**       are named automatically via the ":auto:" setting
    +**
    +**  SQLITE_DEFAULT_PROXYDIR_PERMISSIONS
    +**
    +**       Permissions to use when creating a directory for storing the
    +**       lock proxy files, only used when LOCKPROXYDIR is not set.
    +**    
    +**    
    +** As mentioned above, when compiled with SQLITE_PREFER_PROXY_LOCKING,
    +** setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will
    +** force proxy locking to be used for every database file opened, and 0
    +** will force automatic proxy locking to be disabled for all database
    +** files (explicity calling the SQLITE_SET_LOCKPROXYFILE pragma or
    +** sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING).
    +*/
    +
    +/*
    +** Proxy locking is only available on MacOSX 
    +*/
    +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
    +
    +#ifdef SQLITE_TEST
    +/* simulate multiple hosts by creating unique hostid file paths */
    +SQLITE_API int sqlite3_hostid_num = 0;
    +#endif
    +
    +/*
    +** The proxyLockingContext has the path and file structures for the remote 
    +** and local proxy files in it
    +*/
    +typedef struct proxyLockingContext proxyLockingContext;
    +struct proxyLockingContext {
    +  unixFile *conchFile;         /* Open conch file */
    +  char *conchFilePath;         /* Name of the conch file */
    +  unixFile *lockProxy;         /* Open proxy lock file */
    +  char *lockProxyPath;         /* Name of the proxy lock file */
    +  char *dbPath;                /* Name of the open file */
    +  int conchHeld;               /* True if the conch is currently held */
    +  void *oldLockingContext;     /* Original lockingcontext to restore on close */
    +  sqlite3_io_methods const *pOldMethod;     /* Original I/O methods for close */
    +};
    +
    +/* HOSTIDLEN and CONCHLEN both include space for the string 
    +** terminating nul 
    +*/
    +#define HOSTIDLEN         128
    +#define CONCHLEN          (MAXPATHLEN+HOSTIDLEN+1)
    +#ifndef HOSTIDPATH
    +# define HOSTIDPATH       "/Library/Caches/.com.apple.sqliteConchHostId"
    +#endif
    +
    +/* basically a copy of unixRandomness with different
    +** test behavior built in */
    +static int proxyGenerateHostID(char *pHostID){
    +  int pid, fd, len;
    +  unsigned char *key = (unsigned char *)pHostID;
    +  
    +  memset(key, 0, HOSTIDLEN);
    +  len = 0;
    +  fd = open("/dev/urandom", O_RDONLY);
    +  if( fd>=0 ){
    +    len = read(fd, key, HOSTIDLEN);
    +    close(fd); /* silently leak the fd if it fails */
    +  }
    +  if( len < HOSTIDLEN ){
    +    time_t t;
    +    time(&t);
    +    memcpy(key, &t, sizeof(t));
    +    pid = getpid();
    +    memcpy(&key[sizeof(t)], &pid, sizeof(pid));
    +  }
    +  
    +#ifdef MAKE_PRETTY_HOSTID
    +  {
    +    int i;
    +    /* filter the bytes into printable ascii characters and NUL terminate */
    +    key[(HOSTIDLEN-1)] = 0x00;
    +    for( i=0; i<(HOSTIDLEN-1); i++ ){
    +      unsigned char pa = key[i]&0x7F;
    +      if( pa<0x20 ){
    +        key[i] = (key[i]&0x80 == 0x80) ? pa+0x40 : pa+0x20;
    +      }else if( pa==0x7F ){
    +        key[i] = (key[i]&0x80 == 0x80) ? pa=0x20 : pa+0x7E;
    +      }
    +    }
    +  }
    +#endif
    +  return SQLITE_OK;
    +}
    +
    +/* writes the host id path to path, path should be an pre-allocated buffer
    +** with enough space for a path 
    +*/
    +static void proxyGetHostIDPath(char *path, size_t len){
    +  strlcpy(path, HOSTIDPATH, len);
    +#ifdef SQLITE_TEST
    +  if( sqlite3_hostid_num>0 ){
    +    char suffix[2] = "1";
    +    suffix[0] = suffix[0] + sqlite3_hostid_num;
    +    strlcat(path, suffix, len);
    +  }
    +#endif
    +  OSTRACE3("GETHOSTIDPATH  %s pid=%d\n", path, getpid());
    +}
    +
    +/* get the host ID from a sqlite hostid file stored in the 
    +** user-specific tmp directory, create the ID if it's not there already 
    +*/
    +static int proxyGetHostID(char *pHostID, int *pError){
    +  int fd;
    +  char path[MAXPATHLEN]; 
    +  size_t len;
    +  int rc=SQLITE_OK;
    +
    +  proxyGetHostIDPath(path, MAXPATHLEN);
    +  /* try to create the host ID file, if it already exists read the contents */
    +  fd = open(path, O_CREAT|O_WRONLY|O_EXCL, 0644);
    +  if( fd<0 ){
    +    int err=errno;
    +		
    +    if( err!=EEXIST ){
    +#ifdef SQLITE_PROXY_DEBUG /* set the sqlite error message instead */
    +      fprintf(stderr, "sqlite error creating host ID file %s: %s\n",
    +              path, strerror(err));
    +#endif
    +      return SQLITE_PERM;
    +    }
    +    /* couldn't create the file, read it instead */
    +    fd = open(path, O_RDONLY|O_EXCL);
    +    if( fd<0 ){
    +#ifdef SQLITE_PROXY_DEBUG /* set the sqlite error message instead */
    +      int err = errno;
    +      fprintf(stderr, "sqlite error opening host ID file %s: %s\n",
    +              path, strerror(err));
    +#endif
    +      return SQLITE_PERM;
    +    }
    +    len = pread(fd, pHostID, HOSTIDLEN, 0);
    +    if( len<0 ){
    +      *pError = errno;
    +      rc = SQLITE_IOERR_READ;
    +    }else if( len<HOSTIDLEN ){
    +      *pError = 0;
    +      rc = SQLITE_IOERR_SHORT_READ;
    +    }
    +    close(fd); /* silently leak the fd if it fails */
    +    OSTRACE3("GETHOSTID  read %s pid=%d\n", pHostID, getpid());
    +    return rc;
    +  }else{
    +    /* we're creating the host ID file (use a random string of bytes) */
    +    proxyGenerateHostID(pHostID);
    +    len = pwrite(fd, pHostID, HOSTIDLEN, 0);
    +    if( len<0 ){
    +      *pError = errno;
    +      rc = SQLITE_IOERR_WRITE;
    +    }else if( len<HOSTIDLEN ){
    +      *pError = 0;
    +      rc = SQLITE_IOERR_WRITE;
    +    }
    +    close(fd); /* silently leak the fd if it fails */
    +    OSTRACE3("GETHOSTID  wrote %s pid=%d\n", pHostID, getpid());
    +    return rc;
    +  }
    +}
    +
    +static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
    +  int len;
    +  int dbLen;
    +  int i;
    +
    +#ifdef LOCKPROXYDIR
    +  len = strlcpy(lPath, LOCKPROXYDIR, maxLen);
    +#else
    +# ifdef _CS_DARWIN_USER_TEMP_DIR
    +  {
    +    confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen);
    +    len = strlcat(lPath, "sqliteplocks", maxLen);
    +    if( mkdir(lPath, SQLITE_DEFAULT_PROXYDIR_PERMISSIONS) ){
    +      /* if mkdir fails, handle as lock file creation failure */
    +#  ifdef SQLITE_DEBUG
    +      int err = errno;
    +      if( err!=EEXIST ){
    +        fprintf(stderr, "proxyGetLockPath: mkdir(%s,0%o) error %d %s\n", lPath,
    +                SQLITE_DEFAULT_PROXYDIR_PERMISSIONS, err, strerror(err));
    +      }
    +#  endif
    +    }else{
    +      OSTRACE3("GETLOCKPATH  mkdir %s pid=%d\n", lPath, getpid());
    +    }
    +    
    +  }
    +# else
    +  len = strlcpy(lPath, "/tmp/", maxLen);
    +# endif
    +#endif
    +
    +  if( lPath[len-1]!='/' ){
    +    len = strlcat(lPath, "/", maxLen);
    +  }
    +  
    +  /* transform the db path to a unique cache name */
    +  dbLen = (int)strlen(dbPath);
    +  for( i=0; i<dbLen && (i+len+7)<maxLen; i++){
    +    char c = dbPath[i];
    +    lPath[i+len] = (c=='/')?'_':c;
    +  }
    +  lPath[i+len]='\0';
    +  strlcat(lPath, ":auto:", maxLen);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Create a new VFS file descriptor (stored in memory obtained from
    +** sqlite3_malloc) and open the file named "path" in the file descriptor.
    +**
    +** The caller is responsible not only for closing the file descriptor
    +** but also for freeing the memory associated with the file descriptor.
    +*/
    +static int proxyCreateUnixFile(const char *path, unixFile **ppFile) {
    +  unixFile *pNew;
    +  int flags = SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE;
    +  int rc = SQLITE_OK;
    +  sqlite3_vfs dummyVfs;
    +
    +  pNew = (unixFile *)sqlite3_malloc(sizeof(unixFile));
    +  if( !pNew ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(pNew, 0, sizeof(unixFile));
    +
    +  /* Call unixOpen() to open the proxy file. The flags passed to unixOpen()
    +  ** suggest that the file being opened is a "main database". This is
    +  ** necessary as other file types do not necessarily support locking. It
    +  ** is better to use unixOpen() instead of opening the file directly with
    +  ** open(), as unixOpen() sets up the various mechanisms required to
    +  ** make sure a call to close() does not cause the system to discard
    +  ** POSIX locks prematurely.
    +  **
    +  ** It is important that the xOpen member of the VFS object passed to 
    +  ** unixOpen() is NULL. This tells unixOpen() may try to open a proxy-file 
    +  ** for the proxy-file (creating a potential infinite loop).
    +  */
    +  dummyVfs.pAppData = (void*)&autolockIoFinder;
    +  dummyVfs.xOpen = 0;
    +  rc = unixOpen(&dummyVfs, path, (sqlite3_file *)pNew, flags, &flags);
    +  if( rc==SQLITE_OK && (flags&SQLITE_OPEN_READONLY) ){
    +    pNew->pMethod->xClose((sqlite3_file *)pNew);
    +    rc = SQLITE_CANTOPEN;
    +  }
    +
    +  if( rc!=SQLITE_OK ){
    +    sqlite3_free(pNew);
    +    pNew = 0;
    +  }
    +
    +  *ppFile = pNew;
    +  return rc;
    +}
    +
    +/* takes the conch by taking a shared lock and read the contents conch, if 
    +** lockPath is non-NULL, the host ID and lock file path must match.  A NULL 
    +** lockPath means that the lockPath in the conch file will be used if the 
    +** host IDs match, or a new lock path will be generated automatically 
    +** and written to the conch file.
    +*/
    +static int proxyTakeConch(unixFile *pFile){
    +  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; 
    +  
    +  if( pCtx->conchHeld>0 ){
    +    return SQLITE_OK;
    +  }else{
    +    unixFile *conchFile = pCtx->conchFile;
    +    char testValue[CONCHLEN];
    +    char conchValue[CONCHLEN];
    +    char lockPath[MAXPATHLEN];
    +    char *tLockPath = NULL;
    +    int rc = SQLITE_OK;
    +    int readRc = SQLITE_OK;
    +    int syncPerms = 0;
    +
    +    OSTRACE4("TAKECONCH  %d for %s pid=%d\n", conchFile->h,
    +             (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), getpid());
    +
    +    rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);
    +    if( rc==SQLITE_OK ){
    +      int pError = 0;
    +      memset(testValue, 0, CONCHLEN); /* conch is fixed size */
    +      rc = proxyGetHostID(testValue, &pError);
    +      if( (rc&0xff)==SQLITE_IOERR ){
    +        pFile->lastErrno = pError;
    +      }
    +      if( pCtx->lockProxyPath ){
    +        strlcpy(&testValue[HOSTIDLEN], pCtx->lockProxyPath, MAXPATHLEN);
    +      }
    +    }
    +    if( rc!=SQLITE_OK ){
    +      goto end_takeconch;
    +    }
    +    
    +    readRc = unixRead((sqlite3_file *)conchFile, conchValue, CONCHLEN, 0);
    +    if( readRc!=SQLITE_IOERR_SHORT_READ ){
    +      if( readRc!=SQLITE_OK ){
    +        if( (rc&0xff)==SQLITE_IOERR ){
    +          pFile->lastErrno = conchFile->lastErrno;
    +        }
    +        rc = readRc;
    +        goto end_takeconch;
    +      }
    +      /* if the conch has data compare the contents */
    +      if( !pCtx->lockProxyPath ){
    +        /* for auto-named local lock file, just check the host ID and we'll
    +         ** use the local lock file path that's already in there */
    +        if( !memcmp(testValue, conchValue, HOSTIDLEN) ){
    +          tLockPath = (char *)&conchValue[HOSTIDLEN];
    +          goto end_takeconch;
    +        }
    +      }else{
    +        /* we've got the conch if conchValue matches our path and host ID */
    +        if( !memcmp(testValue, conchValue, CONCHLEN) ){
    +          goto end_takeconch;
    +        }
    +      }
    +    }else{
    +      /* a short read means we're "creating" the conch (even though it could 
    +      ** have been user-intervention), if we acquire the exclusive lock,
    +      ** we'll try to match the current on-disk permissions of the database
    +      */
    +      syncPerms = 1;
    +    }
    +    
    +    /* either conch was emtpy or didn't match */
    +    if( !pCtx->lockProxyPath ){
    +      proxyGetLockPath(pCtx->dbPath, lockPath, MAXPATHLEN);
    +      tLockPath = lockPath;
    +      strlcpy(&testValue[HOSTIDLEN], lockPath, MAXPATHLEN);
    +    }
    +    
    +    /* update conch with host and path (this will fail if other process
    +     ** has a shared lock already) */
    +    rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, EXCLUSIVE_LOCK);
    +    if( rc==SQLITE_OK ){
    +      rc = unixWrite((sqlite3_file *)conchFile, testValue, CONCHLEN, 0);
    +      if( rc==SQLITE_OK && syncPerms ){
    +        struct stat buf;
    +        int err = fstat(pFile->h, &buf);
    +        if( err==0 ){
    +          /* try to match the database file permissions, ignore failure */
    +#ifndef SQLITE_PROXY_DEBUG
    +          fchmod(conchFile->h, buf.st_mode);
    +#else
    +          if( fchmod(conchFile->h, buf.st_mode)!=0 ){
    +            int code = errno;
    +            fprintf(stderr, "fchmod %o FAILED with %d %s\n",
    +                             buf.st_mode, code, strerror(code));
    +          } else {
    +            fprintf(stderr, "fchmod %o SUCCEDED\n",buf.st_mode);
    +          }
    +        }else{
    +          int code = errno;
    +          fprintf(stderr, "STAT FAILED[%d] with %d %s\n", 
    +                          err, code, strerror(code));
    +#endif
    +        }
    +      }
    +    }
    +    conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK);
    +  
    +end_takeconch:
    +    OSTRACE2("TRANSPROXY: CLOSE  %d\n", pFile->h);
    +    if( rc==SQLITE_OK && pFile->openFlags ){
    +      if( pFile->h>=0 ){
    +#ifdef STRICT_CLOSE_ERROR
    +        if( close(pFile->h) ){
    +          pFile->lastErrno = errno;
    +          return SQLITE_IOERR_CLOSE;
    +        }
    +#else
    +        close(pFile->h); /* silently leak fd if fail */
    +#endif
    +      }
    +      pFile->h = -1;
    +      int fd = open(pCtx->dbPath, pFile->openFlags,
    +                    SQLITE_DEFAULT_FILE_PERMISSIONS);
    +      OSTRACE2("TRANSPROXY: OPEN  %d\n", fd);
    +      if( fd>=0 ){
    +        pFile->h = fd;
    +      }else{
    +        rc=SQLITE_CANTOPEN; /* SQLITE_BUSY? proxyTakeConch called
    +                               during locking */
    +      }
    +    }
    +    if( rc==SQLITE_OK && !pCtx->lockProxy ){
    +      char *path = tLockPath ? tLockPath : pCtx->lockProxyPath;
    +      /* ACS: Need to make a copy of path sometimes */
    +      rc = proxyCreateUnixFile(path, &pCtx->lockProxy);
    +    }
    +    if( rc==SQLITE_OK ){
    +      pCtx->conchHeld = 1;
    +
    +      if( tLockPath ){
    +        pCtx->lockProxyPath = sqlite3DbStrDup(0, tLockPath);
    +        if( pCtx->lockProxy->pMethod == &afpIoMethods ){
    +          ((afpLockingContext *)pCtx->lockProxy->lockingContext)->dbPath =
    +                     pCtx->lockProxyPath;
    +        }
    +      }
    +    } else {
    +      conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
    +    }
    +    OSTRACE3("TAKECONCH  %d %s\n", conchFile->h, rc==SQLITE_OK?"ok":"failed");
    +    return rc;
    +  }
    +}
    +
    +/*
    +** If pFile holds a lock on a conch file, then release that lock.
    +*/
    +static int proxyReleaseConch(unixFile *pFile){
    +  int rc;                     /* Subroutine return code */
    +  proxyLockingContext *pCtx;  /* The locking context for the proxy lock */
    +  unixFile *conchFile;        /* Name of the conch file */
    +
    +  pCtx = (proxyLockingContext *)pFile->lockingContext;
    +  conchFile = pCtx->conchFile;
    +  OSTRACE4("RELEASECONCH  %d for %s pid=%d\n", conchFile->h,
    +           (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), 
    +           getpid());
    +  pCtx->conchHeld = 0;
    +  rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
    +  OSTRACE3("RELEASECONCH  %d %s\n", conchFile->h,
    +           (rc==SQLITE_OK ? "ok" : "failed"));
    +  return rc;
    +}
    +
    +/*
    +** Given the name of a database file, compute the name of its conch file.
    +** Store the conch filename in memory obtained from sqlite3_malloc().
    +** Make *pConchPath point to the new name.  Return SQLITE_OK on success
    +** or SQLITE_NOMEM if unable to obtain memory.
    +**
    +** The caller is responsible for ensuring that the allocated memory
    +** space is eventually freed.
    +**
    +** *pConchPath is set to NULL if a memory allocation error occurs.
    +*/
    +static int proxyCreateConchPathname(char *dbPath, char **pConchPath){
    +  int i;                        /* Loop counter */
    +  int len = (int)strlen(dbPath); /* Length of database filename - dbPath */
    +  char *conchPath;              /* buffer in which to construct conch name */
    +
    +  /* Allocate space for the conch filename and initialize the name to
    +  ** the name of the original database file. */  
    +  *pConchPath = conchPath = (char *)sqlite3_malloc(len + 8);
    +  if( conchPath==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  memcpy(conchPath, dbPath, len+1);
    +  
    +  /* now insert a "." before the last / character */
    +  for( i=(len-1); i>=0; i-- ){
    +    if( conchPath[i]=='/' ){
    +      i++;
    +      break;
    +    }
    +  }
    +  conchPath[i]='.';
    +  while ( i<len ){
    +    conchPath[i+1]=dbPath[i];
    +    i++;
    +  }
    +
    +  /* append the "-conch" suffix to the file */
    +  memcpy(&conchPath[i+1], "-conch", 7);
    +  assert( (int)strlen(conchPath) == len+7 );
    +
    +  return SQLITE_OK;
    +}
    +
    +
    +/* Takes a fully configured proxy locking-style unix file and switches
    +** the local lock file path 
    +*/
    +static int switchLockProxyPath(unixFile *pFile, const char *path) {
    +  proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
    +  char *oldPath = pCtx->lockProxyPath;
    +  int rc = SQLITE_OK;
    +
    +  if( pFile->locktype!=NO_LOCK ){
    +    return SQLITE_BUSY;
    +  }  
    +
    +  /* nothing to do if the path is NULL, :auto: or matches the existing path */
    +  if( !path || path[0]=='\0' || !strcmp(path, ":auto:") ||
    +    (oldPath && !strncmp(oldPath, path, MAXPATHLEN)) ){
    +    return SQLITE_OK;
    +  }else{
    +    unixFile *lockProxy = pCtx->lockProxy;
    +    pCtx->lockProxy=NULL;
    +    pCtx->conchHeld = 0;
    +    if( lockProxy!=NULL ){
    +      rc=lockProxy->pMethod->xClose((sqlite3_file *)lockProxy);
    +      if( rc ) return rc;
    +      sqlite3_free(lockProxy);
    +    }
    +    sqlite3_free(oldPath);
    +    pCtx->lockProxyPath = sqlite3DbStrDup(0, path);
    +  }
    +  
    +  return rc;
    +}
    +
    +/*
    +** pFile is a file that has been opened by a prior xOpen call.  dbPath
    +** is a string buffer at least MAXPATHLEN+1 characters in size.
    +**
    +** This routine find the filename associated with pFile and writes it
    +** int dbPath.
    +*/
    +static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
    +#if defined(__APPLE__)
    +  if( pFile->pMethod == &afpIoMethods ){
    +    /* afp style keeps a reference to the db path in the filePath field 
    +    ** of the struct */
    +    assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
    +    strcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath);
    +  }else
    +#endif
    +  if( pFile->pMethod == &dotlockIoMethods ){
    +    /* dot lock style uses the locking context to store the dot lock
    +    ** file path */
    +    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
    +    memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
    +  }else{
    +    /* all other styles use the locking context to store the db file path */
    +    assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
    +    strcpy(dbPath, (char *)pFile->lockingContext);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Takes an already filled in unix file and alters it so all file locking 
    +** will be performed on the local proxy lock file.  The following fields
    +** are preserved in the locking context so that they can be restored and 
    +** the unix structure properly cleaned up at close time:
    +**  ->lockingContext
    +**  ->pMethod
    +*/
    +static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
    +  proxyLockingContext *pCtx;
    +  char dbPath[MAXPATHLEN+1];       /* Name of the database file */
    +  char *lockPath=NULL;
    +  int rc = SQLITE_OK;
    +  
    +  if( pFile->locktype!=NO_LOCK ){
    +    return SQLITE_BUSY;
    +  }
    +  proxyGetDbPathForUnixFile(pFile, dbPath);
    +  if( !path || path[0]=='\0' || !strcmp(path, ":auto:") ){
    +    lockPath=NULL;
    +  }else{
    +    lockPath=(char *)path;
    +  }
    +  
    +  OSTRACE4("TRANSPROXY  %d for %s pid=%d\n", pFile->h,
    +           (lockPath ? lockPath : ":auto:"), getpid());
    +
    +  pCtx = sqlite3_malloc( sizeof(*pCtx) );
    +  if( pCtx==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(pCtx, 0, sizeof(*pCtx));
    +
    +  rc = proxyCreateConchPathname(dbPath, &pCtx->conchFilePath);
    +  if( rc==SQLITE_OK ){
    +    rc = proxyCreateUnixFile(pCtx->conchFilePath, &pCtx->conchFile);
    +  }  
    +  if( rc==SQLITE_OK && lockPath ){
    +    pCtx->lockProxyPath = sqlite3DbStrDup(0, lockPath);
    +  }
    +
    +  if( rc==SQLITE_OK ){
    +    /* all memory is allocated, proxys are created and assigned, 
    +    ** switch the locking context and pMethod then return.
    +    */
    +    pCtx->dbPath = sqlite3DbStrDup(0, dbPath);
    +    pCtx->oldLockingContext = pFile->lockingContext;
    +    pFile->lockingContext = pCtx;
    +    pCtx->pOldMethod = pFile->pMethod;
    +    pFile->pMethod = &proxyIoMethods;
    +  }else{
    +    if( pCtx->conchFile ){ 
    +      rc = pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile);
    +      if( rc ) return rc;
    +      sqlite3_free(pCtx->conchFile);
    +    }
    +    sqlite3_free(pCtx->conchFilePath); 
    +    sqlite3_free(pCtx);
    +  }
    +  OSTRACE3("TRANSPROXY  %d %s\n", pFile->h,
    +           (rc==SQLITE_OK ? "ok" : "failed"));
    +  return rc;
    +}
    +
    +
    +/*
    +** This routine handles sqlite3_file_control() calls that are specific
    +** to proxy locking.
    +*/
    +static int proxyFileControl(sqlite3_file *id, int op, void *pArg){
    +  switch( op ){
    +    case SQLITE_GET_LOCKPROXYFILE: {
    +      unixFile *pFile = (unixFile*)id;
    +      if( pFile->pMethod == &proxyIoMethods ){
    +        proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
    +        proxyTakeConch(pFile);
    +        if( pCtx->lockProxyPath ){
    +          *(const char **)pArg = pCtx->lockProxyPath;
    +        }else{
    +          *(const char **)pArg = ":auto: (not held)";
    +        }
    +      } else {
    +        *(const char **)pArg = NULL;
    +      }
    +      return SQLITE_OK;
    +    }
    +    case SQLITE_SET_LOCKPROXYFILE: {
    +      unixFile *pFile = (unixFile*)id;
    +      int rc = SQLITE_OK;
    +      int isProxyStyle = (pFile->pMethod == &proxyIoMethods);
    +      if( pArg==NULL || (const char *)pArg==0 ){
    +        if( isProxyStyle ){
    +          /* turn off proxy locking - not supported */
    +          rc = SQLITE_ERROR /*SQLITE_PROTOCOL? SQLITE_MISUSE?*/;
    +        }else{
    +          /* turn off proxy locking - already off - NOOP */
    +          rc = SQLITE_OK;
    +        }
    +      }else{
    +        const char *proxyPath = (const char *)pArg;
    +        if( isProxyStyle ){
    +          proxyLockingContext *pCtx = 
    +            (proxyLockingContext*)pFile->lockingContext;
    +          if( !strcmp(pArg, ":auto:") 
    +           || (pCtx->lockProxyPath &&
    +               !strncmp(pCtx->lockProxyPath, proxyPath, MAXPATHLEN))
    +          ){
    +            rc = SQLITE_OK;
    +          }else{
    +            rc = switchLockProxyPath(pFile, proxyPath);
    +          }
    +        }else{
    +          /* turn on proxy file locking */
    +          rc = proxyTransformUnixFile(pFile, proxyPath);
    +        }
    +      }
    +      return rc;
    +    }
    +    default: {
    +      assert( 0 );  /* The call assures that only valid opcodes are sent */
    +    }
    +  }
    +  /*NOTREACHED*/
    +  return SQLITE_ERROR;
    +}
    +
    +/*
    +** Within this division (the proxying locking implementation) the procedures
    +** above this point are all utilities.  The lock-related methods of the
    +** proxy-locking sqlite3_io_method object follow.
    +*/
    +
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, set *pResOut
    +** to a non-zero value otherwise *pResOut is set to zero.  The return value
    +** is set to SQLITE_OK unless an I/O error occurs during lock checking.
    +*/
    +static int proxyCheckReservedLock(sqlite3_file *id, int *pResOut) {
    +  unixFile *pFile = (unixFile*)id;
    +  int rc = proxyTakeConch(pFile);
    +  if( rc==SQLITE_OK ){
    +    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
    +    unixFile *proxy = pCtx->lockProxy;
    +    return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  Use the sqlite3OsUnlock()
    +** routine to lower a locking level.
    +*/
    +static int proxyLock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  int rc = proxyTakeConch(pFile);
    +  if( rc==SQLITE_OK ){
    +    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
    +    unixFile *proxy = pCtx->lockProxy;
    +    rc = proxy->pMethod->xLock((sqlite3_file*)proxy, locktype);
    +    pFile->locktype = proxy->locktype;
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Lower the locking level on file descriptor pFile to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +*/
    +static int proxyUnlock(sqlite3_file *id, int locktype) {
    +  unixFile *pFile = (unixFile*)id;
    +  int rc = proxyTakeConch(pFile);
    +  if( rc==SQLITE_OK ){
    +    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
    +    unixFile *proxy = pCtx->lockProxy;
    +    rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, locktype);
    +    pFile->locktype = proxy->locktype;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Close a file that uses proxy locks.
    +*/
    +static int proxyClose(sqlite3_file *id) {
    +  if( id ){
    +    unixFile *pFile = (unixFile*)id;
    +    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
    +    unixFile *lockProxy = pCtx->lockProxy;
    +    unixFile *conchFile = pCtx->conchFile;
    +    int rc = SQLITE_OK;
    +    
    +    if( lockProxy ){
    +      rc = lockProxy->pMethod->xUnlock((sqlite3_file*)lockProxy, NO_LOCK);
    +      if( rc ) return rc;
    +      rc = lockProxy->pMethod->xClose((sqlite3_file*)lockProxy);
    +      if( rc ) return rc;
    +      sqlite3_free(lockProxy);
    +      pCtx->lockProxy = 0;
    +    }
    +    if( conchFile ){
    +      if( pCtx->conchHeld ){
    +        rc = proxyReleaseConch(pFile);
    +        if( rc ) return rc;
    +      }
    +      rc = conchFile->pMethod->xClose((sqlite3_file*)conchFile);
    +      if( rc ) return rc;
    +      sqlite3_free(conchFile);
    +    }
    +    sqlite3_free(pCtx->lockProxyPath);
    +    sqlite3_free(pCtx->conchFilePath);
    +    sqlite3_free(pCtx->dbPath);
    +    /* restore the original locking context and pMethod then close it */
    +    pFile->lockingContext = pCtx->oldLockingContext;
    +    pFile->pMethod = pCtx->pOldMethod;
    +    sqlite3_free(pCtx);
    +    return pFile->pMethod->xClose(id);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +
    +
    +#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
    +/*
    +** The proxy locking style is intended for use with AFP filesystems.
    +** And since AFP is only supported on MacOSX, the proxy locking is also
    +** restricted to MacOSX.
    +** 
    +**
    +******************* End of the proxy lock implementation **********************
    +******************************************************************************/
    +
    +/*
    +** Initialize the operating system interface.
    +**
    +** This routine registers all VFS implementations for unix-like operating
    +** systems.  This routine, and the sqlite3_os_end() routine that follows,
    +** should be the only routines in this file that are visible from other
    +** files.
    +**
    +** This routine is called once during SQLite initialization and by a
    +** single thread.  The memory allocation and mutex subsystems have not
    +** necessarily been initialized when this routine is called, and so they
    +** should not be used.
    +*/
    +SQLITE_API int sqlite3_os_init(void){ 
    +  /* 
    +  ** The following macro defines an initializer for an sqlite3_vfs object.
    +  ** The name of the VFS is NAME.  The pAppData is a pointer to a pointer
    +  ** to the "finder" function.  (pAppData is a pointer to a pointer because
    +  ** silly C90 rules prohibit a void* from being cast to a function pointer
    +  ** and so we have to go through the intermediate pointer to avoid problems
    +  ** when compiling with -pedantic-errors on GCC.)
    +  **
    +  ** The FINDER parameter to this macro is the name of the pointer to the
    +  ** finder-function.  The finder-function returns a pointer to the
    +  ** sqlite_io_methods object that implements the desired locking
    +  ** behaviors.  See the division above that contains the IOMETHODS
    +  ** macro for addition information on finder-functions.
    +  **
    +  ** Most finders simply return a pointer to a fixed sqlite3_io_methods
    +  ** object.  But the "autolockIoFinder" available on MacOSX does a little
    +  ** more than that; it looks at the filesystem type that hosts the 
    +  ** database file and tries to choose an locking method appropriate for
    +  ** that filesystem time.
    +  */
    +  #define UNIXVFS(VFSNAME, FINDER) {                        \
    +    1,                    /* iVersion */                    \
    +    sizeof(unixFile),     /* szOsFile */                    \
    +    MAX_PATHNAME,         /* mxPathname */                  \
    +    0,                    /* pNext */                       \
    +    VFSNAME,              /* zName */                       \
    +    (void*)&FINDER,       /* pAppData */                    \
    +    unixOpen,             /* xOpen */                       \
    +    unixDelete,           /* xDelete */                     \
    +    unixAccess,           /* xAccess */                     \
    +    unixFullPathname,     /* xFullPathname */               \
    +    unixDlOpen,           /* xDlOpen */                     \
    +    unixDlError,          /* xDlError */                    \
    +    unixDlSym,            /* xDlSym */                      \
    +    unixDlClose,          /* xDlClose */                    \
    +    unixRandomness,       /* xRandomness */                 \
    +    unixSleep,            /* xSleep */                      \
    +    unixCurrentTime,      /* xCurrentTime */                \
    +    unixGetLastError      /* xGetLastError */               \
    +  }
    +
    +  /*
    +  ** All default VFSes for unix are contained in the following array.
    +  **
    +  ** Note that the sqlite3_vfs.pNext field of the VFS object is modified
    +  ** by the SQLite core when the VFS is registered.  So the following
    +  ** array cannot be const.
    +  */
    +  static sqlite3_vfs aVfs[] = {
    +#if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
    +    UNIXVFS("unix",          autolockIoFinder ),
    +#else
    +    UNIXVFS("unix",          posixIoFinder ),
    +#endif
    +    UNIXVFS("unix-none",     nolockIoFinder ),
    +    UNIXVFS("unix-dotfile",  dotlockIoFinder ),
    +    UNIXVFS("unix-wfl",      posixWflIoFinder ),
    +#if OS_VXWORKS
    +    UNIXVFS("unix-namedsem", semIoFinder ),
    +#endif
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +    UNIXVFS("unix-posix",    posixIoFinder ),
    +#if !OS_VXWORKS
    +    UNIXVFS("unix-flock",    flockIoFinder ),
    +#endif
    +#endif
    +#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    +    UNIXVFS("unix-afp",      afpIoFinder ),
    +    UNIXVFS("unix-proxy",    proxyIoFinder ),
    +#endif
    +  };
    +  unsigned int i;          /* Loop counter */
    +
    +  /* Register all VFSes defined in the aVfs[] array */
    +  for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
    +    sqlite3_vfs_register(&aVfs[i], i==0);
    +  }
    +  return SQLITE_OK; 
    +}
    +
    +/*
    +** Shutdown the operating system interface.
    +**
    +** Some operating systems might need to do some cleanup in this routine,
    +** to release dynamically allocated objects.  But not on unix.
    +** This routine is a no-op for unix.
    +*/
    +SQLITE_API int sqlite3_os_end(void){ 
    +  return SQLITE_OK; 
    +}
    + 
    +#endif /* SQLITE_OS_UNIX */
    +
    +/************** End of os_unix.c *********************************************/
    +/************** Begin file os_win.c ******************************************/
    +/*
    +** 2004 May 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains code that is specific to windows.
    +*/
    +#if SQLITE_OS_WIN               /* This file is used for windows only */
    +
    +
    +/*
    +** A Note About Memory Allocation:
    +**
    +** This driver uses malloc()/free() directly rather than going through
    +** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
    +** are designed for use on embedded systems where memory is scarce and
    +** malloc failures happen frequently.  Win32 does not typically run on
    +** embedded systems, and when it does the developers normally have bigger
    +** problems to worry about than running out of memory.  So there is not
    +** a compelling need to use the wrappers.
    +**
    +** But there is a good reason to not use the wrappers.  If we use the
    +** wrappers then we will get simulated malloc() failures within this
    +** driver.  And that causes all kinds of problems for our tests.  We
    +** could enhance SQLite to deal with simulated malloc failures within
    +** the OS driver, but the code to deal with those failure would not
    +** be exercised on Linux (which does not need to malloc() in the driver)
    +** and so we would have difficulty writing coverage tests for that
    +** code.  Better to leave the code out, we think.
    +**
    +** The point of this discussion is as follows:  When creating a new
    +** OS layer for an embedded system, if you use this file as an example,
    +** avoid the use of malloc()/free().  Those routines work ok on windows
    +** desktops but not so well in embedded systems.
    +*/
    +
    +#include <winbase.h>
    +
    +#ifdef __CYGWIN__
    +# include <sys/cygwin.h>
    +#endif
    +
    +/*
    +** Macros used to determine whether or not to use threads.
    +*/
    +#if defined(THREADSAFE) && THREADSAFE
    +# define SQLITE_W32_THREADS 1
    +#endif
    +
    +/*
    +** Include code that is common to all os_*.c files
    +*/
    +/************** Include os_common.h in the middle of os_win.c ****************/
    +/************** Begin file os_common.h ***************************************/
    +/*
    +** 2004 May 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains macros and a little bit of code that is common to
    +** all of the platform-specific files (os_*.c) and is #included into those
    +** files.
    +**
    +** This file should be #included by the os_*.c files only.  It is not a
    +** general purpose header file.
    +**
    +** $Id: os_common.h,v 1.38 2009/02/24 18:40:50 danielk1977 Exp $
    +*/
    +#ifndef _OS_COMMON_H_
    +#define _OS_COMMON_H_
    +
    +/*
    +** At least two bugs have slipped in because we changed the MEMORY_DEBUG
    +** macro to SQLITE_DEBUG and some older makefiles have not yet made the
    +** switch.  The following code should catch this problem at compile-time.
    +*/
    +#ifdef MEMORY_DEBUG
    +# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3OSTrace = 0;
    +#define OSTRACE1(X)         if( sqlite3OSTrace ) sqlite3DebugPrintf(X)
    +#define OSTRACE2(X,Y)       if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y)
    +#define OSTRACE3(X,Y,Z)     if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)   if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D) \
    +    if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C,D)
    +#else
    +#define OSTRACE1(X)
    +#define OSTRACE2(X,Y)
    +#define OSTRACE3(X,Y,Z)
    +#define OSTRACE4(X,Y,Z,A)
    +#define OSTRACE5(X,Y,Z,A,B)
    +#define OSTRACE6(X,Y,Z,A,B,C)
    +#define OSTRACE7(X,Y,Z,A,B,C,D)
    +#endif
    +
    +/*
    +** Macros for performance tracing.  Normally turned off.  Only works
    +** on i486 hardware.
    +*/
    +#ifdef SQLITE_PERFORMANCE_TRACE
    +
    +/* 
    +** hwtime.h contains inline assembler code for implementing 
    +** high-performance timing routines.
    +*/
    +/************** Include hwtime.h in the middle of os_common.h ****************/
    +/************** Begin file hwtime.h ******************************************/
    +/*
    +** 2008 May 27
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains inline asm code for retrieving "high-performance"
    +** counters for x86 class CPUs.
    +**
    +** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $
    +*/
    +#ifndef _HWTIME_H_
    +#define _HWTIME_H_
    +
    +/*
    +** The following routine only works on pentium-class (or newer) processors.
    +** It uses the RDTSC opcode to read the cycle count value out of the
    +** processor and returns that value.  This can be used for high-res
    +** profiling.
    +*/
    +#if (defined(__GNUC__) || defined(_MSC_VER)) && \
    +      (defined(i386) || defined(__i386__) || defined(_M_IX86))
    +
    +  #if defined(__GNUC__)
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +     unsigned int lo, hi;
    +     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
    +     return (sqlite_uint64)hi << 32 | lo;
    +  }
    +
    +  #elif defined(_MSC_VER)
    +
    +  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
    +     __asm {
    +        rdtsc
    +        ret       ; return value at EDX:EAX
    +     }
    +  }
    +
    +  #endif
    +
    +#elif (defined(__GNUC__) && defined(__x86_64__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long val;
    +      __asm__ __volatile__ ("rdtsc" : "=A" (val));
    +      return val;
    +  }
    + 
    +#elif (defined(__GNUC__) && defined(__ppc__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long long retval;
    +      unsigned long junk;
    +      __asm__ __volatile__ ("\n\
    +          1:      mftbu   %1\n\
    +                  mftb    %L0\n\
    +                  mftbu   %0\n\
    +                  cmpw    %0,%1\n\
    +                  bne     1b"
    +                  : "=r" (retval), "=r" (junk));
    +      return retval;
    +  }
    +
    +#else
    +
    +  #error Need implementation of sqlite3Hwtime() for your platform.
    +
    +  /*
    +  ** To compile without implementing sqlite3Hwtime() for your platform,
    +  ** you can remove the above #error and use the following
    +  ** stub function.  You will lose timing support for many
    +  ** of the debugging and testing utilities, but it should at
    +  ** least compile and run.
    +  */
    +SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
    +
    +#endif
    +
    +#endif /* !defined(_HWTIME_H_) */
    +
    +/************** End of hwtime.h **********************************************/
    +/************** Continuing where we left off in os_common.h ******************/
    +
    +static sqlite_uint64 g_start;
    +static sqlite_uint64 g_elapsed;
    +#define TIMER_START       g_start=sqlite3Hwtime()
    +#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
    +#define TIMER_ELAPSED     g_elapsed
    +#else
    +#define TIMER_START
    +#define TIMER_END
    +#define TIMER_ELAPSED     ((sqlite_uint64)0)
    +#endif
    +
    +/*
    +** If we compile with the SQLITE_TEST macro set, then the following block
    +** of code will give us the ability to simulate a disk I/O error.  This
    +** is used for testing the I/O recovery logic.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
    +SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
    +SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
    +SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
    +SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
    +SQLITE_API int sqlite3_diskfull_pending = 0;
    +SQLITE_API int sqlite3_diskfull = 0;
    +#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
    +#define SimulateIOError(CODE)  \
    +  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
    +       || sqlite3_io_error_pending-- == 1 )  \
    +              { local_ioerr(); CODE; }
    +static void local_ioerr(){
    +  IOTRACE(("IOERR\n"));
    +  sqlite3_io_error_hit++;
    +  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
    +}
    +#define SimulateDiskfullError(CODE) \
    +   if( sqlite3_diskfull_pending ){ \
    +     if( sqlite3_diskfull_pending == 1 ){ \
    +       local_ioerr(); \
    +       sqlite3_diskfull = 1; \
    +       sqlite3_io_error_hit = 1; \
    +       CODE; \
    +     }else{ \
    +       sqlite3_diskfull_pending--; \
    +     } \
    +   }
    +#else
    +#define SimulateIOErrorBenign(X)
    +#define SimulateIOError(A)
    +#define SimulateDiskfullError(A)
    +#endif
    +
    +/*
    +** When testing, keep a count of the number of open files.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_open_file_count = 0;
    +#define OpenCounter(X)  sqlite3_open_file_count+=(X)
    +#else
    +#define OpenCounter(X)
    +#endif
    +
    +#endif /* !defined(_OS_COMMON_H_) */
    +
    +/************** End of os_common.h *******************************************/
    +/************** Continuing where we left off in os_win.c *********************/
    +
    +/*
    +** Some microsoft compilers lack this definition.
    +*/
    +#ifndef INVALID_FILE_ATTRIBUTES
    +# define INVALID_FILE_ATTRIBUTES ((DWORD)-1) 
    +#endif
    +
    +/*
    +** Determine if we are dealing with WindowsCE - which has a much
    +** reduced API.
    +*/
    +#if SQLITE_OS_WINCE
    +# define AreFileApisANSI() 1
    +# define FormatMessageW(a,b,c,d,e,f,g) 0
    +#endif
    +
    +/*
    +** WinCE lacks native support for file locking so we have to fake it
    +** with some code of our own.
    +*/
    +#if SQLITE_OS_WINCE
    +typedef struct winceLock {
    +  int nReaders;       /* Number of reader locks obtained */
    +  BOOL bPending;      /* Indicates a pending lock has been obtained */
    +  BOOL bReserved;     /* Indicates a reserved lock has been obtained */
    +  BOOL bExclusive;    /* Indicates an exclusive lock has been obtained */
    +} winceLock;
    +#endif
    +
    +/*
    +** The winFile structure is a subclass of sqlite3_file* specific to the win32
    +** portability layer.
    +*/
    +typedef struct winFile winFile;
    +struct winFile {
    +  const sqlite3_io_methods *pMethod;/* Must be first */
    +  HANDLE h;               /* Handle for accessing the file */
    +  unsigned char locktype; /* Type of lock currently held on this file */
    +  short sharedLockByte;   /* Randomly chosen byte used as a shared lock */
    +  DWORD lastErrno;        /* The Windows errno from the last I/O error */
    +  DWORD sectorSize;       /* Sector size of the device file is on */
    +#if SQLITE_OS_WINCE
    +  WCHAR *zDeleteOnClose;  /* Name of file to delete when closing */
    +  HANDLE hMutex;          /* Mutex used to control access to shared lock */  
    +  HANDLE hShared;         /* Shared memory segment used for locking */
    +  winceLock local;        /* Locks obtained by this instance of winFile */
    +  winceLock *shared;      /* Global shared lock memory for the file  */
    +#endif
    +};
    +
    +/*
    +** Forward prototypes.
    +*/
    +static int getSectorSize(
    +    sqlite3_vfs *pVfs,
    +    const char *zRelative     /* UTF-8 file name */
    +);
    +
    +/*
    +** The following variable is (normally) set once and never changes
    +** thereafter.  It records whether the operating system is Win95
    +** or WinNT.
    +**
    +** 0:   Operating system unknown.
    +** 1:   Operating system is Win95.
    +** 2:   Operating system is WinNT.
    +**
    +** In order to facilitate testing on a WinNT system, the test fixture
    +** can manually set this value to 1 to emulate Win98 behavior.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_os_type = 0;
    +#else
    +static int sqlite3_os_type = 0;
    +#endif
    +
    +/*
    +** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,
    +** or WinCE.  Return false (zero) for Win95, Win98, or WinME.
    +**
    +** Here is an interesting observation:  Win95, Win98, and WinME lack
    +** the LockFileEx() API.  But we can still statically link against that
    +** API as long as we don't call it when running Win95/98/ME.  A call to
    +** this routine is used to determine if the host is Win95/98/ME or
    +** WinNT/2K/XP so that we will know whether or not we can safely call
    +** the LockFileEx() API.
    +*/
    +#if SQLITE_OS_WINCE
    +# define isNT()  (1)
    +#else
    +  static int isNT(void){
    +    if( sqlite3_os_type==0 ){
    +      OSVERSIONINFO sInfo;
    +      sInfo.dwOSVersionInfoSize = sizeof(sInfo);
    +      GetVersionEx(&sInfo);
    +      sqlite3_os_type = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
    +    }
    +    return sqlite3_os_type==2;
    +  }
    +#endif /* SQLITE_OS_WINCE */
    +
    +/*
    +** Convert a UTF-8 string to microsoft unicode (UTF-16?). 
    +**
    +** Space to hold the returned string is obtained from malloc.
    +*/
    +static WCHAR *utf8ToUnicode(const char *zFilename){
    +  int nChar;
    +  WCHAR *zWideFilename;
    +
    +  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
    +  zWideFilename = malloc( nChar*sizeof(zWideFilename[0]) );
    +  if( zWideFilename==0 ){
    +    return 0;
    +  }
    +  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename, nChar);
    +  if( nChar==0 ){
    +    free(zWideFilename);
    +    zWideFilename = 0;
    +  }
    +  return zWideFilename;
    +}
    +
    +/*
    +** Convert microsoft unicode to UTF-8.  Space to hold the returned string is
    +** obtained from malloc().
    +*/
    +static char *unicodeToUtf8(const WCHAR *zWideFilename){
    +  int nByte;
    +  char *zFilename;
    +
    +  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
    +  zFilename = malloc( nByte );
    +  if( zFilename==0 ){
    +    return 0;
    +  }
    +  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
    +                              0, 0);
    +  if( nByte == 0 ){
    +    free(zFilename);
    +    zFilename = 0;
    +  }
    +  return zFilename;
    +}
    +
    +/*
    +** Convert an ansi string to microsoft unicode, based on the
    +** current codepage settings for file apis.
    +** 
    +** Space to hold the returned string is obtained
    +** from malloc.
    +*/
    +static WCHAR *mbcsToUnicode(const char *zFilename){
    +  int nByte;
    +  WCHAR *zMbcsFilename;
    +  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
    +
    +  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*sizeof(WCHAR);
    +  zMbcsFilename = malloc( nByte*sizeof(zMbcsFilename[0]) );
    +  if( zMbcsFilename==0 ){
    +    return 0;
    +  }
    +  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte);
    +  if( nByte==0 ){
    +    free(zMbcsFilename);
    +    zMbcsFilename = 0;
    +  }
    +  return zMbcsFilename;
    +}
    +
    +/*
    +** Convert microsoft unicode to multibyte character string, based on the
    +** user's Ansi codepage.
    +**
    +** Space to hold the returned string is obtained from
    +** malloc().
    +*/
    +static char *unicodeToMbcs(const WCHAR *zWideFilename){
    +  int nByte;
    +  char *zFilename;
    +  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
    +
    +  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
    +  zFilename = malloc( nByte );
    +  if( zFilename==0 ){
    +    return 0;
    +  }
    +  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename, nByte,
    +                              0, 0);
    +  if( nByte == 0 ){
    +    free(zFilename);
    +    zFilename = 0;
    +  }
    +  return zFilename;
    +}
    +
    +/*
    +** Convert multibyte character string to UTF-8.  Space to hold the
    +** returned string is obtained from malloc().
    +*/
    +SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zFilename){
    +  char *zFilenameUtf8;
    +  WCHAR *zTmpWide;
    +
    +  zTmpWide = mbcsToUnicode(zFilename);
    +  if( zTmpWide==0 ){
    +    return 0;
    +  }
    +  zFilenameUtf8 = unicodeToUtf8(zTmpWide);
    +  free(zTmpWide);
    +  return zFilenameUtf8;
    +}
    +
    +/*
    +** Convert UTF-8 to multibyte character string.  Space to hold the 
    +** returned string is obtained from malloc().
    +*/
    +static char *utf8ToMbcs(const char *zFilename){
    +  char *zFilenameMbcs;
    +  WCHAR *zTmpWide;
    +
    +  zTmpWide = utf8ToUnicode(zFilename);
    +  if( zTmpWide==0 ){
    +    return 0;
    +  }
    +  zFilenameMbcs = unicodeToMbcs(zTmpWide);
    +  free(zTmpWide);
    +  return zFilenameMbcs;
    +}
    +
    +#if SQLITE_OS_WINCE
    +/*************************************************************************
    +** This section contains code for WinCE only.
    +*/
    +/*
    +** WindowsCE does not have a localtime() function.  So create a
    +** substitute.
    +*/
    +struct tm *__cdecl localtime(const time_t *t)
    +{
    +  static struct tm y;
    +  FILETIME uTm, lTm;
    +  SYSTEMTIME pTm;
    +  sqlite3_int64 t64;
    +  t64 = *t;
    +  t64 = (t64 + 11644473600)*10000000;
    +  uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF);
    +  uTm.dwHighDateTime= (DWORD)(t64 >> 32);
    +  FileTimeToLocalFileTime(&uTm,&lTm);
    +  FileTimeToSystemTime(&lTm,&pTm);
    +  y.tm_year = pTm.wYear - 1900;
    +  y.tm_mon = pTm.wMonth - 1;
    +  y.tm_wday = pTm.wDayOfWeek;
    +  y.tm_mday = pTm.wDay;
    +  y.tm_hour = pTm.wHour;
    +  y.tm_min = pTm.wMinute;
    +  y.tm_sec = pTm.wSecond;
    +  return &y;
    +}
    +
    +/* This will never be called, but defined to make the code compile */
    +#define GetTempPathA(a,b)
    +
    +#define LockFile(a,b,c,d,e)       winceLockFile(&a, b, c, d, e)
    +#define UnlockFile(a,b,c,d,e)     winceUnlockFile(&a, b, c, d, e)
    +#define LockFileEx(a,b,c,d,e,f)   winceLockFileEx(&a, b, c, d, e, f)
    +
    +#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
    +
    +/*
    +** Acquire a lock on the handle h
    +*/
    +static void winceMutexAcquire(HANDLE h){
    +   DWORD dwErr;
    +   do {
    +     dwErr = WaitForSingleObject(h, INFINITE);
    +   } while (dwErr != WAIT_OBJECT_0 && dwErr != WAIT_ABANDONED);
    +}
    +/*
    +** Release a lock acquired by winceMutexAcquire()
    +*/
    +#define winceMutexRelease(h) ReleaseMutex(h)
    +
    +/*
    +** Create the mutex and shared memory used for locking in the file
    +** descriptor pFile
    +*/
    +static BOOL winceCreateLock(const char *zFilename, winFile *pFile){
    +  WCHAR *zTok;
    +  WCHAR *zName = utf8ToUnicode(zFilename);
    +  BOOL bInit = TRUE;
    +
    +  /* Initialize the local lockdata */
    +  ZeroMemory(&pFile->local, sizeof(pFile->local));
    +
    +  /* Replace the backslashes from the filename and lowercase it
    +  ** to derive a mutex name. */
    +  zTok = CharLowerW(zName);
    +  for (;*zTok;zTok++){
    +    if (*zTok == '\\') *zTok = '_';
    +  }
    +
    +  /* Create/open the named mutex */
    +  pFile->hMutex = CreateMutexW(NULL, FALSE, zName);
    +  if (!pFile->hMutex){
    +    pFile->lastErrno = GetLastError();
    +    free(zName);
    +    return FALSE;
    +  }
    +
    +  /* Acquire the mutex before continuing */
    +  winceMutexAcquire(pFile->hMutex);
    +  
    +  /* Since the names of named mutexes, semaphores, file mappings etc are 
    +  ** case-sensitive, take advantage of that by uppercasing the mutex name
    +  ** and using that as the shared filemapping name.
    +  */
    +  CharUpperW(zName);
    +  pFile->hShared = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL,
    +                                       PAGE_READWRITE, 0, sizeof(winceLock),
    +                                       zName);  
    +
    +  /* Set a flag that indicates we're the first to create the memory so it 
    +  ** must be zero-initialized */
    +  if (GetLastError() == ERROR_ALREADY_EXISTS){
    +    bInit = FALSE;
    +  }
    +
    +  free(zName);
    +
    +  /* If we succeeded in making the shared memory handle, map it. */
    +  if (pFile->hShared){
    +    pFile->shared = (winceLock*)MapViewOfFile(pFile->hShared, 
    +             FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, sizeof(winceLock));
    +    /* If mapping failed, close the shared memory handle and erase it */
    +    if (!pFile->shared){
    +      pFile->lastErrno = GetLastError();
    +      CloseHandle(pFile->hShared);
    +      pFile->hShared = NULL;
    +    }
    +  }
    +
    +  /* If shared memory could not be created, then close the mutex and fail */
    +  if (pFile->hShared == NULL){
    +    winceMutexRelease(pFile->hMutex);
    +    CloseHandle(pFile->hMutex);
    +    pFile->hMutex = NULL;
    +    return FALSE;
    +  }
    +  
    +  /* Initialize the shared memory if we're supposed to */
    +  if (bInit) {
    +    ZeroMemory(pFile->shared, sizeof(winceLock));
    +  }
    +
    +  winceMutexRelease(pFile->hMutex);
    +  return TRUE;
    +}
    +
    +/*
    +** Destroy the part of winFile that deals with wince locks
    +*/
    +static void winceDestroyLock(winFile *pFile){
    +  if (pFile->hMutex){
    +    /* Acquire the mutex */
    +    winceMutexAcquire(pFile->hMutex);
    +
    +    /* The following blocks should probably assert in debug mode, but they
    +       are to cleanup in case any locks remained open */
    +    if (pFile->local.nReaders){
    +      pFile->shared->nReaders --;
    +    }
    +    if (pFile->local.bReserved){
    +      pFile->shared->bReserved = FALSE;
    +    }
    +    if (pFile->local.bPending){
    +      pFile->shared->bPending = FALSE;
    +    }
    +    if (pFile->local.bExclusive){
    +      pFile->shared->bExclusive = FALSE;
    +    }
    +
    +    /* De-reference and close our copy of the shared memory handle */
    +    UnmapViewOfFile(pFile->shared);
    +    CloseHandle(pFile->hShared);
    +
    +    /* Done with the mutex */
    +    winceMutexRelease(pFile->hMutex);    
    +    CloseHandle(pFile->hMutex);
    +    pFile->hMutex = NULL;
    +  }
    +}
    +
    +/* 
    +** An implementation of the LockFile() API of windows for wince
    +*/
    +static BOOL winceLockFile(
    +  HANDLE *phFile,
    +  DWORD dwFileOffsetLow,
    +  DWORD dwFileOffsetHigh,
    +  DWORD nNumberOfBytesToLockLow,
    +  DWORD nNumberOfBytesToLockHigh
    +){
    +  winFile *pFile = HANDLE_TO_WINFILE(phFile);
    +  BOOL bReturn = FALSE;
    +
    +  UNUSED_PARAMETER(dwFileOffsetHigh);
    +  UNUSED_PARAMETER(nNumberOfBytesToLockHigh);
    +
    +  if (!pFile->hMutex) return TRUE;
    +  winceMutexAcquire(pFile->hMutex);
    +
    +  /* Wanting an exclusive lock? */
    +  if (dwFileOffsetLow == (DWORD)SHARED_FIRST
    +       && nNumberOfBytesToLockLow == (DWORD)SHARED_SIZE){
    +    if (pFile->shared->nReaders == 0 && pFile->shared->bExclusive == 0){
    +       pFile->shared->bExclusive = TRUE;
    +       pFile->local.bExclusive = TRUE;
    +       bReturn = TRUE;
    +    }
    +  }
    +
    +  /* Want a read-only lock? */
    +  else if (dwFileOffsetLow == (DWORD)SHARED_FIRST &&
    +           nNumberOfBytesToLockLow == 1){
    +    if (pFile->shared->bExclusive == 0){
    +      pFile->local.nReaders ++;
    +      if (pFile->local.nReaders == 1){
    +        pFile->shared->nReaders ++;
    +      }
    +      bReturn = TRUE;
    +    }
    +  }
    +
    +  /* Want a pending lock? */
    +  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE && nNumberOfBytesToLockLow == 1){
    +    /* If no pending lock has been acquired, then acquire it */
    +    if (pFile->shared->bPending == 0) {
    +      pFile->shared->bPending = TRUE;
    +      pFile->local.bPending = TRUE;
    +      bReturn = TRUE;
    +    }
    +  }
    +
    +  /* Want a reserved lock? */
    +  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE && nNumberOfBytesToLockLow == 1){
    +    if (pFile->shared->bReserved == 0) {
    +      pFile->shared->bReserved = TRUE;
    +      pFile->local.bReserved = TRUE;
    +      bReturn = TRUE;
    +    }
    +  }
    +
    +  winceMutexRelease(pFile->hMutex);
    +  return bReturn;
    +}
    +
    +/*
    +** An implementation of the UnlockFile API of windows for wince
    +*/
    +static BOOL winceUnlockFile(
    +  HANDLE *phFile,
    +  DWORD dwFileOffsetLow,
    +  DWORD dwFileOffsetHigh,
    +  DWORD nNumberOfBytesToUnlockLow,
    +  DWORD nNumberOfBytesToUnlockHigh
    +){
    +  winFile *pFile = HANDLE_TO_WINFILE(phFile);
    +  BOOL bReturn = FALSE;
    +
    +  UNUSED_PARAMETER(dwFileOffsetHigh);
    +  UNUSED_PARAMETER(nNumberOfBytesToUnlockHigh);
    +
    +  if (!pFile->hMutex) return TRUE;
    +  winceMutexAcquire(pFile->hMutex);
    +
    +  /* Releasing a reader lock or an exclusive lock */
    +  if (dwFileOffsetLow == (DWORD)SHARED_FIRST){
    +    /* Did we have an exclusive lock? */
    +    if (pFile->local.bExclusive){
    +      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE);
    +      pFile->local.bExclusive = FALSE;
    +      pFile->shared->bExclusive = FALSE;
    +      bReturn = TRUE;
    +    }
    +
    +    /* Did we just have a reader lock? */
    +    else if (pFile->local.nReaders){
    +      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE || nNumberOfBytesToUnlockLow == 1);
    +      pFile->local.nReaders --;
    +      if (pFile->local.nReaders == 0)
    +      {
    +        pFile->shared->nReaders --;
    +      }
    +      bReturn = TRUE;
    +    }
    +  }
    +
    +  /* Releasing a pending lock */
    +  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE && nNumberOfBytesToUnlockLow == 1){
    +    if (pFile->local.bPending){
    +      pFile->local.bPending = FALSE;
    +      pFile->shared->bPending = FALSE;
    +      bReturn = TRUE;
    +    }
    +  }
    +  /* Releasing a reserved lock */
    +  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE && nNumberOfBytesToUnlockLow == 1){
    +    if (pFile->local.bReserved) {
    +      pFile->local.bReserved = FALSE;
    +      pFile->shared->bReserved = FALSE;
    +      bReturn = TRUE;
    +    }
    +  }
    +
    +  winceMutexRelease(pFile->hMutex);
    +  return bReturn;
    +}
    +
    +/*
    +** An implementation of the LockFileEx() API of windows for wince
    +*/
    +static BOOL winceLockFileEx(
    +  HANDLE *phFile,
    +  DWORD dwFlags,
    +  DWORD dwReserved,
    +  DWORD nNumberOfBytesToLockLow,
    +  DWORD nNumberOfBytesToLockHigh,
    +  LPOVERLAPPED lpOverlapped
    +){
    +  UNUSED_PARAMETER(dwReserved);
    +  UNUSED_PARAMETER(nNumberOfBytesToLockHigh);
    +
    +  /* If the caller wants a shared read lock, forward this call
    +  ** to winceLockFile */
    +  if (lpOverlapped->Offset == (DWORD)SHARED_FIRST &&
    +      dwFlags == 1 &&
    +      nNumberOfBytesToLockLow == (DWORD)SHARED_SIZE){
    +    return winceLockFile(phFile, SHARED_FIRST, 0, 1, 0);
    +  }
    +  return FALSE;
    +}
    +/*
    +** End of the special code for wince
    +*****************************************************************************/
    +#endif /* SQLITE_OS_WINCE */
    +
    +/*****************************************************************************
    +** The next group of routines implement the I/O methods specified
    +** by the sqlite3_io_methods object.
    +******************************************************************************/
    +
    +/*
    +** Close a file.
    +**
    +** It is reported that an attempt to close a handle might sometimes
    +** fail.  This is a very unreasonable result, but windows is notorious
    +** for being unreasonable so I do not doubt that it might happen.  If
    +** the close fails, we pause for 100 milliseconds and try again.  As
    +** many as MX_CLOSE_ATTEMPT attempts to close the handle are made before
    +** giving up and returning an error.
    +*/
    +#define MX_CLOSE_ATTEMPT 3
    +static int winClose(sqlite3_file *id){
    +  int rc, cnt = 0;
    +  winFile *pFile = (winFile*)id;
    +
    +  assert( id!=0 );
    +  OSTRACE2("CLOSE %d\n", pFile->h);
    +  do{
    +    rc = CloseHandle(pFile->h);
    +  }while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
    +#if SQLITE_OS_WINCE
    +#define WINCE_DELETION_ATTEMPTS 3
    +  winceDestroyLock(pFile);
    +  if( pFile->zDeleteOnClose ){
    +    int cnt = 0;
    +    while(
    +           DeleteFileW(pFile->zDeleteOnClose)==0
    +        && GetFileAttributesW(pFile->zDeleteOnClose)!=0xffffffff 
    +        && cnt++ < WINCE_DELETION_ATTEMPTS
    +    ){
    +       Sleep(100);  /* Wait a little before trying again */
    +    }
    +    free(pFile->zDeleteOnClose);
    +  }
    +#endif
    +  OpenCounter(-1);
    +  return rc ? SQLITE_OK : SQLITE_IOERR;
    +}
    +
    +/*
    +** Some microsoft compilers lack this definition.
    +*/
    +#ifndef INVALID_SET_FILE_POINTER
    +# define INVALID_SET_FILE_POINTER ((DWORD)-1)
    +#endif
    +
    +/*
    +** Read data from a file into a buffer.  Return SQLITE_OK if all
    +** bytes were read successfully and SQLITE_IOERR if anything goes
    +** wrong.
    +*/
    +static int winRead(
    +  sqlite3_file *id,          /* File to read from */
    +  void *pBuf,                /* Write content into this buffer */
    +  int amt,                   /* Number of bytes to read */
    +  sqlite3_int64 offset       /* Begin reading at this offset */
    +){
    +  LONG upperBits = (LONG)((offset>>32) & 0x7fffffff);
    +  LONG lowerBits = (LONG)(offset & 0xffffffff);
    +  DWORD rc;
    +  winFile *pFile = (winFile*)id;
    +  DWORD error;
    +  DWORD got;
    +
    +  assert( id!=0 );
    +  SimulateIOError(return SQLITE_IOERR_READ);
    +  OSTRACE3("READ %d lock=%d\n", pFile->h, pFile->locktype);
    +  rc = SetFilePointer(pFile->h, lowerBits, &upperBits, FILE_BEGIN);
    +  if( rc==INVALID_SET_FILE_POINTER && (error=GetLastError())!=NO_ERROR ){
    +    pFile->lastErrno = error;
    +    return SQLITE_FULL;
    +  }
    +  if( !ReadFile(pFile->h, pBuf, amt, &got, 0) ){
    +    pFile->lastErrno = GetLastError();
    +    return SQLITE_IOERR_READ;
    +  }
    +  if( got==(DWORD)amt ){
    +    return SQLITE_OK;
    +  }else{
    +    /* Unread parts of the buffer must be zero-filled */
    +    memset(&((char*)pBuf)[got], 0, amt-got);
    +    return SQLITE_IOERR_SHORT_READ;
    +  }
    +}
    +
    +/*
    +** Write data from a buffer into a file.  Return SQLITE_OK on success
    +** or some other error code on failure.
    +*/
    +static int winWrite(
    +  sqlite3_file *id,         /* File to write into */
    +  const void *pBuf,         /* The bytes to be written */
    +  int amt,                  /* Number of bytes to write */
    +  sqlite3_int64 offset      /* Offset into the file to begin writing at */
    +){
    +  LONG upperBits = (LONG)((offset>>32) & 0x7fffffff);
    +  LONG lowerBits = (LONG)(offset & 0xffffffff);
    +  DWORD rc;
    +  winFile *pFile = (winFile*)id;
    +  DWORD error;
    +  DWORD wrote = 0;
    +
    +  assert( id!=0 );
    +  SimulateIOError(return SQLITE_IOERR_WRITE);
    +  SimulateDiskfullError(return SQLITE_FULL);
    +  OSTRACE3("WRITE %d lock=%d\n", pFile->h, pFile->locktype);
    +  rc = SetFilePointer(pFile->h, lowerBits, &upperBits, FILE_BEGIN);
    +  if( rc==INVALID_SET_FILE_POINTER && (error=GetLastError())!=NO_ERROR ){
    +    pFile->lastErrno = error;
    +    return SQLITE_FULL;
    +  }
    +  assert( amt>0 );
    +  while(
    +     amt>0
    +     && (rc = WriteFile(pFile->h, pBuf, amt, &wrote, 0))!=0
    +     && wrote>0
    +  ){
    +    amt -= wrote;
    +    pBuf = &((char*)pBuf)[wrote];
    +  }
    +  if( !rc || amt>(int)wrote ){
    +    pFile->lastErrno = GetLastError();
    +    return SQLITE_FULL;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Truncate an open file to a specified size
    +*/
    +static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
    +  LONG upperBits = (LONG)((nByte>>32) & 0x7fffffff);
    +  LONG lowerBits = (LONG)(nByte & 0xffffffff);
    +  DWORD rc;
    +  winFile *pFile = (winFile*)id;
    +  DWORD error;
    +
    +  assert( id!=0 );
    +  OSTRACE3("TRUNCATE %d %lld\n", pFile->h, nByte);
    +  SimulateIOError(return SQLITE_IOERR_TRUNCATE);
    +  rc = SetFilePointer(pFile->h, lowerBits, &upperBits, FILE_BEGIN);
    +  if( rc==INVALID_SET_FILE_POINTER && (error=GetLastError())!=NO_ERROR ){
    +    pFile->lastErrno = error;
    +    return SQLITE_IOERR_TRUNCATE;
    +  }
    +  /* SetEndOfFile will fail if nByte is negative */
    +  if( !SetEndOfFile(pFile->h) ){
    +    pFile->lastErrno = GetLastError();
    +    return SQLITE_IOERR_TRUNCATE;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** Count the number of fullsyncs and normal syncs.  This is used to test
    +** that syncs and fullsyncs are occuring at the right times.
    +*/
    +SQLITE_API int sqlite3_sync_count = 0;
    +SQLITE_API int sqlite3_fullsync_count = 0;
    +#endif
    +
    +/*
    +** Make sure all writes to a particular file are committed to disk.
    +*/
    +static int winSync(sqlite3_file *id, int flags){
    +#ifndef SQLITE_NO_SYNC
    +  winFile *pFile = (winFile*)id;
    +
    +  assert( id!=0 );
    +  OSTRACE3("SYNC %d lock=%d\n", pFile->h, pFile->locktype);
    +#else
    +  UNUSED_PARAMETER(id);
    +#endif
    +#ifndef SQLITE_TEST
    +  UNUSED_PARAMETER(flags);
    +#else
    +  if( flags & SQLITE_SYNC_FULL ){
    +    sqlite3_fullsync_count++;
    +  }
    +  sqlite3_sync_count++;
    +#endif
    +  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
    +  ** no-op
    +  */
    +#ifdef SQLITE_NO_SYNC
    +    return SQLITE_OK;
    +#else
    +  if( FlushFileBuffers(pFile->h) ){
    +    return SQLITE_OK;
    +  }else{
    +    pFile->lastErrno = GetLastError();
    +    return SQLITE_IOERR;
    +  }
    +#endif
    +}
    +
    +/*
    +** Determine the current size of a file in bytes
    +*/
    +static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
    +  DWORD upperBits;
    +  DWORD lowerBits;
    +  winFile *pFile = (winFile*)id;
    +  DWORD error;
    +
    +  assert( id!=0 );
    +  SimulateIOError(return SQLITE_IOERR_FSTAT);
    +  lowerBits = GetFileSize(pFile->h, &upperBits);
    +  if(   (lowerBits == INVALID_FILE_SIZE)
    +     && ((error = GetLastError()) != NO_ERROR) )
    +  {
    +    pFile->lastErrno = error;
    +    return SQLITE_IOERR_FSTAT;
    +  }
    +  *pSize = (((sqlite3_int64)upperBits)<<32) + lowerBits;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems.
    +*/
    +#ifndef LOCKFILE_FAIL_IMMEDIATELY
    +# define LOCKFILE_FAIL_IMMEDIATELY 1
    +#endif
    +
    +/*
    +** Acquire a reader lock.
    +** Different API routines are called depending on whether or not this
    +** is Win95 or WinNT.
    +*/
    +static int getReadLock(winFile *pFile){
    +  int res;
    +  if( isNT() ){
    +    OVERLAPPED ovlp;
    +    ovlp.Offset = SHARED_FIRST;
    +    ovlp.OffsetHigh = 0;
    +    ovlp.hEvent = 0;
    +    res = LockFileEx(pFile->h, LOCKFILE_FAIL_IMMEDIATELY,
    +                     0, SHARED_SIZE, 0, &ovlp);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    int lk;
    +    sqlite3_randomness(sizeof(lk), &lk);
    +    pFile->sharedLockByte = (short)((lk & 0x7fffffff)%(SHARED_SIZE - 1));
    +    res = LockFile(pFile->h, SHARED_FIRST+pFile->sharedLockByte, 0, 1, 0);
    +#endif
    +  }
    +  if( res == 0 ){
    +    pFile->lastErrno = GetLastError();
    +  }
    +  return res;
    +}
    +
    +/*
    +** Undo a readlock
    +*/
    +static int unlockReadLock(winFile *pFile){
    +  int res;
    +  if( isNT() ){
    +    res = UnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    res = UnlockFile(pFile->h, SHARED_FIRST + pFile->sharedLockByte, 0, 1, 0);
    +#endif
    +  }
    +  if( res == 0 ){
    +    pFile->lastErrno = GetLastError();
    +  }
    +  return res;
    +}
    +
    +/*
    +** Lock the file with the lock specified by parameter locktype - one
    +** of the following:
    +**
    +**     (1) SHARED_LOCK
    +**     (2) RESERVED_LOCK
    +**     (3) PENDING_LOCK
    +**     (4) EXCLUSIVE_LOCK
    +**
    +** Sometimes when requesting one lock state, additional lock states
    +** are inserted in between.  The locking might fail on one of the later
    +** transitions leaving the lock state different from what it started but
    +** still short of its goal.  The following chart shows the allowed
    +** transitions and the inserted intermediate states:
    +**
    +**    UNLOCKED -> SHARED
    +**    SHARED -> RESERVED
    +**    SHARED -> (PENDING) -> EXCLUSIVE
    +**    RESERVED -> (PENDING) -> EXCLUSIVE
    +**    PENDING -> EXCLUSIVE
    +**
    +** This routine will only increase a lock.  The winUnlock() routine
    +** erases all locks at once and returns us immediately to locking level 0.
    +** It is not possible to lower the locking level one step at a time.  You
    +** must go straight to locking level 0.
    +*/
    +static int winLock(sqlite3_file *id, int locktype){
    +  int rc = SQLITE_OK;    /* Return code from subroutines */
    +  int res = 1;           /* Result of a windows lock call */
    +  int newLocktype;       /* Set pFile->locktype to this value before exiting */
    +  int gotPendingLock = 0;/* True if we acquired a PENDING lock this time */
    +  winFile *pFile = (winFile*)id;
    +  DWORD error = NO_ERROR;
    +
    +  assert( id!=0 );
    +  OSTRACE5("LOCK %d %d was %d(%d)\n",
    +          pFile->h, locktype, pFile->locktype, pFile->sharedLockByte);
    +
    +  /* If there is already a lock of this type or more restrictive on the
    +  ** OsFile, do nothing. Don't use the end_lock: exit path, as
    +  ** sqlite3OsEnterMutex() hasn't been called yet.
    +  */
    +  if( pFile->locktype>=locktype ){
    +    return SQLITE_OK;
    +  }
    +
    +  /* Make sure the locking sequence is correct
    +  */
    +  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
    +  assert( locktype!=PENDING_LOCK );
    +  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
    +
    +  /* Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or
    +  ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of
    +  ** the PENDING_LOCK byte is temporary.
    +  */
    +  newLocktype = pFile->locktype;
    +  if(   (pFile->locktype==NO_LOCK)
    +     || (   (locktype==EXCLUSIVE_LOCK)
    +         && (pFile->locktype==RESERVED_LOCK))
    +  ){
    +    int cnt = 3;
    +    while( cnt-->0 && (res = LockFile(pFile->h, PENDING_BYTE, 0, 1, 0))==0 ){
    +      /* Try 3 times to get the pending lock.  The pending lock might be
    +      ** held by another reader process who will release it momentarily.
    +      */
    +      OSTRACE2("could not get a PENDING lock. cnt=%d\n", cnt);
    +      Sleep(1);
    +    }
    +    gotPendingLock = res;
    +    if( !res ){
    +      error = GetLastError();
    +    }
    +  }
    +
    +  /* Acquire a shared lock
    +  */
    +  if( locktype==SHARED_LOCK && res ){
    +    assert( pFile->locktype==NO_LOCK );
    +    res = getReadLock(pFile);
    +    if( res ){
    +      newLocktype = SHARED_LOCK;
    +    }else{
    +      error = GetLastError();
    +    }
    +  }
    +
    +  /* Acquire a RESERVED lock
    +  */
    +  if( locktype==RESERVED_LOCK && res ){
    +    assert( pFile->locktype==SHARED_LOCK );
    +    res = LockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
    +    if( res ){
    +      newLocktype = RESERVED_LOCK;
    +    }else{
    +      error = GetLastError();
    +    }
    +  }
    +
    +  /* Acquire a PENDING lock
    +  */
    +  if( locktype==EXCLUSIVE_LOCK && res ){
    +    newLocktype = PENDING_LOCK;
    +    gotPendingLock = 0;
    +  }
    +
    +  /* Acquire an EXCLUSIVE lock
    +  */
    +  if( locktype==EXCLUSIVE_LOCK && res ){
    +    assert( pFile->locktype>=SHARED_LOCK );
    +    res = unlockReadLock(pFile);
    +    OSTRACE2("unreadlock = %d\n", res);
    +    res = LockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
    +    if( res ){
    +      newLocktype = EXCLUSIVE_LOCK;
    +    }else{
    +      error = GetLastError();
    +      OSTRACE2("error-code = %d\n", error);
    +      getReadLock(pFile);
    +    }
    +  }
    +
    +  /* If we are holding a PENDING lock that ought to be released, then
    +  ** release it now.
    +  */
    +  if( gotPendingLock && locktype==SHARED_LOCK ){
    +    UnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
    +  }
    +
    +  /* Update the state of the lock has held in the file descriptor then
    +  ** return the appropriate result code.
    +  */
    +  if( res ){
    +    rc = SQLITE_OK;
    +  }else{
    +    OSTRACE4("LOCK FAILED %d trying for %d but got %d\n", pFile->h,
    +           locktype, newLocktype);
    +    pFile->lastErrno = error;
    +    rc = SQLITE_BUSY;
    +  }
    +  pFile->locktype = (u8)newLocktype;
    +  return rc;
    +}
    +
    +/*
    +** This routine checks if there is a RESERVED lock held on the specified
    +** file by this or any other process. If such a lock is held, return
    +** non-zero, otherwise zero.
    +*/
    +static int winCheckReservedLock(sqlite3_file *id, int *pResOut){
    +  int rc;
    +  winFile *pFile = (winFile*)id;
    +
    +  assert( id!=0 );
    +  if( pFile->locktype>=RESERVED_LOCK ){
    +    rc = 1;
    +    OSTRACE3("TEST WR-LOCK %d %d (local)\n", pFile->h, rc);
    +  }else{
    +    rc = LockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
    +    if( rc ){
    +      UnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
    +    }
    +    rc = !rc;
    +    OSTRACE3("TEST WR-LOCK %d %d (remote)\n", pFile->h, rc);
    +  }
    +  *pResOut = rc;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Lower the locking level on file descriptor id to locktype.  locktype
    +** must be either NO_LOCK or SHARED_LOCK.
    +**
    +** If the locking level of the file descriptor is already at or below
    +** the requested locking level, this routine is a no-op.
    +**
    +** It is not possible for this routine to fail if the second argument
    +** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine
    +** might return SQLITE_IOERR;
    +*/
    +static int winUnlock(sqlite3_file *id, int locktype){
    +  int type;
    +  winFile *pFile = (winFile*)id;
    +  int rc = SQLITE_OK;
    +  assert( pFile!=0 );
    +  assert( locktype<=SHARED_LOCK );
    +  OSTRACE5("UNLOCK %d to %d was %d(%d)\n", pFile->h, locktype,
    +          pFile->locktype, pFile->sharedLockByte);
    +  type = pFile->locktype;
    +  if( type>=EXCLUSIVE_LOCK ){
    +    UnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
    +    if( locktype==SHARED_LOCK && !getReadLock(pFile) ){
    +      /* This should never happen.  We should always be able to
    +      ** reacquire the read lock */
    +      rc = SQLITE_IOERR_UNLOCK;
    +    }
    +  }
    +  if( type>=RESERVED_LOCK ){
    +    UnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
    +  }
    +  if( locktype==NO_LOCK && type>=SHARED_LOCK ){
    +    unlockReadLock(pFile);
    +  }
    +  if( type>=PENDING_LOCK ){
    +    UnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
    +  }
    +  pFile->locktype = (u8)locktype;
    +  return rc;
    +}
    +
    +/*
    +** Control and query of the open file handle.
    +*/
    +static int winFileControl(sqlite3_file *id, int op, void *pArg){
    +  switch( op ){
    +    case SQLITE_FCNTL_LOCKSTATE: {
    +      *(int*)pArg = ((winFile*)id)->locktype;
    +      return SQLITE_OK;
    +    }
    +    case SQLITE_LAST_ERRNO: {
    +      *(int*)pArg = (int)((winFile*)id)->lastErrno;
    +      return SQLITE_OK;
    +    }
    +  }
    +  return SQLITE_ERROR;
    +}
    +
    +/*
    +** Return the sector size in bytes of the underlying block device for
    +** the specified file. This is almost always 512 bytes, but may be
    +** larger for some devices.
    +**
    +** SQLite code assumes this function cannot fail. It also assumes that
    +** if two files are created in the same file-system directory (i.e.
    +** a database and its journal file) that the sector size will be the
    +** same for both.
    +*/
    +static int winSectorSize(sqlite3_file *id){
    +  assert( id!=0 );
    +  return (int)(((winFile*)id)->sectorSize);
    +}
    +
    +/*
    +** Return a vector of device characteristics.
    +*/
    +static int winDeviceCharacteristics(sqlite3_file *id){
    +  UNUSED_PARAMETER(id);
    +  return 0;
    +}
    +
    +/*
    +** This vector defines all the methods that can operate on an
    +** sqlite3_file for win32.
    +*/
    +static const sqlite3_io_methods winIoMethod = {
    +  1,                        /* iVersion */
    +  winClose,
    +  winRead,
    +  winWrite,
    +  winTruncate,
    +  winSync,
    +  winFileSize,
    +  winLock,
    +  winUnlock,
    +  winCheckReservedLock,
    +  winFileControl,
    +  winSectorSize,
    +  winDeviceCharacteristics
    +};
    +
    +/***************************************************************************
    +** Here ends the I/O methods that form the sqlite3_io_methods object.
    +**
    +** The next block of code implements the VFS methods.
    +****************************************************************************/
    +
    +/*
    +** Convert a UTF-8 filename into whatever form the underlying
    +** operating system wants filenames in.  Space to hold the result
    +** is obtained from malloc and must be freed by the calling
    +** function.
    +*/
    +static void *convertUtf8Filename(const char *zFilename){
    +  void *zConverted = 0;
    +  if( isNT() ){
    +    zConverted = utf8ToUnicode(zFilename);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    zConverted = utf8ToMbcs(zFilename);
    +#endif
    +  }
    +  /* caller will handle out of memory */
    +  return zConverted;
    +}
    +
    +/*
    +** Create a temporary file name in zBuf.  zBuf must be big enough to
    +** hold at pVfs->mxPathname characters.
    +*/
    +static int getTempname(int nBuf, char *zBuf){
    +  static char zChars[] =
    +    "abcdefghijklmnopqrstuvwxyz"
    +    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    "0123456789";
    +  size_t i, j;
    +  char zTempPath[MAX_PATH+1];
    +  if( sqlite3_temp_directory ){
    +    sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", sqlite3_temp_directory);
    +  }else if( isNT() ){
    +    char *zMulti;
    +    WCHAR zWidePath[MAX_PATH];
    +    GetTempPathW(MAX_PATH-30, zWidePath);
    +    zMulti = unicodeToUtf8(zWidePath);
    +    if( zMulti ){
    +      sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zMulti);
    +      free(zMulti);
    +    }else{
    +      return SQLITE_NOMEM;
    +    }
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    char *zUtf8;
    +    char zMbcsPath[MAX_PATH];
    +    GetTempPathA(MAX_PATH-30, zMbcsPath);
    +    zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
    +    if( zUtf8 ){
    +      sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zUtf8);
    +      free(zUtf8);
    +    }else{
    +      return SQLITE_NOMEM;
    +    }
    +#endif
    +  }
    +  for(i=sqlite3Strlen30(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){}
    +  zTempPath[i] = 0;
    +  sqlite3_snprintf(nBuf-30, zBuf,
    +                   "%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPath);
    +  j = sqlite3Strlen30(zBuf);
    +  sqlite3_randomness(20, &zBuf[j]);
    +  for(i=0; i<20; i++, j++){
    +    zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
    +  }
    +  zBuf[j] = 0;
    +  OSTRACE2("TEMP FILENAME: %s\n", zBuf);
    +  return SQLITE_OK; 
    +}
    +
    +/*
    +** The return value of getLastErrorMsg
    +** is zero if the error message fits in the buffer, or non-zero
    +** otherwise (if the message was truncated).
    +*/
    +static int getLastErrorMsg(int nBuf, char *zBuf){
    +  /* FormatMessage returns 0 on failure.  Otherwise it
    +  ** returns the number of TCHARs written to the output
    +  ** buffer, excluding the terminating null char.
    +  */
    +  DWORD error = GetLastError();
    +  DWORD dwLen = 0;
    +  char *zOut = 0;
    +
    +  if( isNT() ){
    +    WCHAR *zTempWide = NULL;
    +    dwLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
    +                           NULL,
    +                           error,
    +                           0,
    +                           (LPWSTR) &zTempWide,
    +                           0,
    +                           0);
    +    if( dwLen > 0 ){
    +      /* allocate a buffer and convert to UTF8 */
    +      zOut = unicodeToUtf8(zTempWide);
    +      /* free the system buffer allocated by FormatMessage */
    +      LocalFree(zTempWide);
    +    }
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    char *zTemp = NULL;
    +    dwLen = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
    +                           NULL,
    +                           error,
    +                           0,
    +                           (LPSTR) &zTemp,
    +                           0,
    +                           0);
    +    if( dwLen > 0 ){
    +      /* allocate a buffer and convert to UTF8 */
    +      zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
    +      /* free the system buffer allocated by FormatMessage */
    +      LocalFree(zTemp);
    +    }
    +#endif
    +  }
    +  if( 0 == dwLen ){
    +    sqlite3_snprintf(nBuf, zBuf, "OsError 0x%x (%u)", error, error);
    +  }else{
    +    /* copy a maximum of nBuf chars to output buffer */
    +    sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
    +    /* free the UTF8 buffer */
    +    free(zOut);
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Open a file.
    +*/
    +static int winOpen(
    +  sqlite3_vfs *pVfs,        /* Not used */
    +  const char *zName,        /* Name of the file (UTF-8) */
    +  sqlite3_file *id,         /* Write the SQLite file handle here */
    +  int flags,                /* Open mode flags */
    +  int *pOutFlags            /* Status return flags */
    +){
    +  HANDLE h;
    +  DWORD dwDesiredAccess;
    +  DWORD dwShareMode;
    +  DWORD dwCreationDisposition;
    +  DWORD dwFlagsAndAttributes = 0;
    +#if SQLITE_OS_WINCE
    +  int isTemp = 0;
    +#endif
    +  winFile *pFile = (winFile*)id;
    +  void *zConverted;                 /* Filename in OS encoding */
    +  const char *zUtf8Name = zName;    /* Filename in UTF-8 encoding */
    +  char zTmpname[MAX_PATH+1];        /* Buffer used to create temp filename */
    +
    +  assert( id!=0 );
    +  UNUSED_PARAMETER(pVfs);
    +
    +  /* If the second argument to this function is NULL, generate a 
    +  ** temporary file name to use 
    +  */
    +  if( !zUtf8Name ){
    +    int rc = getTempname(MAX_PATH+1, zTmpname);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    zUtf8Name = zTmpname;
    +  }
    +
    +  /* Convert the filename to the system encoding. */
    +  zConverted = convertUtf8Filename(zUtf8Name);
    +  if( zConverted==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  if( flags & SQLITE_OPEN_READWRITE ){
    +    dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;
    +  }else{
    +    dwDesiredAccess = GENERIC_READ;
    +  }
    +  /* SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is 
    +  ** created. SQLite doesn't use it to indicate "exclusive access" 
    +  ** as it is usually understood.
    +  */
    +  assert(!(flags & SQLITE_OPEN_EXCLUSIVE) || (flags & SQLITE_OPEN_CREATE));
    +  if( flags & SQLITE_OPEN_EXCLUSIVE ){
    +    /* Creates a new file, only if it does not already exist. */
    +    /* If the file exists, it fails. */
    +    dwCreationDisposition = CREATE_NEW;
    +  }else if( flags & SQLITE_OPEN_CREATE ){
    +    /* Open existing file, or create if it doesn't exist */
    +    dwCreationDisposition = OPEN_ALWAYS;
    +  }else{
    +    /* Opens a file, only if it exists. */
    +    dwCreationDisposition = OPEN_EXISTING;
    +  }
    +  dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
    +  if( flags & SQLITE_OPEN_DELETEONCLOSE ){
    +#if SQLITE_OS_WINCE
    +    dwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;
    +    isTemp = 1;
    +#else
    +    dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY
    +                               | FILE_ATTRIBUTE_HIDDEN
    +                               | FILE_FLAG_DELETE_ON_CLOSE;
    +#endif
    +  }else{
    +    dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
    +  }
    +  /* Reports from the internet are that performance is always
    +  ** better if FILE_FLAG_RANDOM_ACCESS is used.  Ticket #2699. */
    +#if SQLITE_OS_WINCE
    +  dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
    +#endif
    +  if( isNT() ){
    +    h = CreateFileW((WCHAR*)zConverted,
    +       dwDesiredAccess,
    +       dwShareMode,
    +       NULL,
    +       dwCreationDisposition,
    +       dwFlagsAndAttributes,
    +       NULL
    +    );
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    h = CreateFileA((char*)zConverted,
    +       dwDesiredAccess,
    +       dwShareMode,
    +       NULL,
    +       dwCreationDisposition,
    +       dwFlagsAndAttributes,
    +       NULL
    +    );
    +#endif
    +  }
    +  if( h==INVALID_HANDLE_VALUE ){
    +    free(zConverted);
    +    if( flags & SQLITE_OPEN_READWRITE ){
    +      return winOpen(pVfs, zName, id, 
    +             ((flags|SQLITE_OPEN_READONLY)&~SQLITE_OPEN_READWRITE), pOutFlags);
    +    }else{
    +      return SQLITE_CANTOPEN;
    +    }
    +  }
    +  if( pOutFlags ){
    +    if( flags & SQLITE_OPEN_READWRITE ){
    +      *pOutFlags = SQLITE_OPEN_READWRITE;
    +    }else{
    +      *pOutFlags = SQLITE_OPEN_READONLY;
    +    }
    +  }
    +  memset(pFile, 0, sizeof(*pFile));
    +  pFile->pMethod = &winIoMethod;
    +  pFile->h = h;
    +  pFile->lastErrno = NO_ERROR;
    +  pFile->sectorSize = getSectorSize(pVfs, zUtf8Name);
    +#if SQLITE_OS_WINCE
    +  if( (flags & (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)) ==
    +               (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)
    +       && !winceCreateLock(zName, pFile)
    +  ){
    +    CloseHandle(h);
    +    free(zConverted);
    +    return SQLITE_CANTOPEN;
    +  }
    +  if( isTemp ){
    +    pFile->zDeleteOnClose = zConverted;
    +  }else
    +#endif
    +  {
    +    free(zConverted);
    +  }
    +  OpenCounter(+1);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Delete the named file.
    +**
    +** Note that windows does not allow a file to be deleted if some other
    +** process has it open.  Sometimes a virus scanner or indexing program
    +** will open a journal file shortly after it is created in order to do
    +** whatever it does.  While this other process is holding the
    +** file open, we will be unable to delete it.  To work around this
    +** problem, we delay 100 milliseconds and try to delete again.  Up
    +** to MX_DELETION_ATTEMPTs deletion attempts are run before giving
    +** up and returning an error.
    +*/
    +#define MX_DELETION_ATTEMPTS 5
    +static int winDelete(
    +  sqlite3_vfs *pVfs,          /* Not used on win32 */
    +  const char *zFilename,      /* Name of file to delete */
    +  int syncDir                 /* Not used on win32 */
    +){
    +  int cnt = 0;
    +  DWORD rc;
    +  DWORD error = 0;
    +  void *zConverted = convertUtf8Filename(zFilename);
    +  UNUSED_PARAMETER(pVfs);
    +  UNUSED_PARAMETER(syncDir);
    +  if( zConverted==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  SimulateIOError(return SQLITE_IOERR_DELETE);
    +  if( isNT() ){
    +    do{
    +      DeleteFileW(zConverted);
    +    }while(   (   ((rc = GetFileAttributesW(zConverted)) != INVALID_FILE_ATTRIBUTES)
    +               || ((error = GetLastError()) == ERROR_ACCESS_DENIED))
    +           && (++cnt < MX_DELETION_ATTEMPTS)
    +           && (Sleep(100), 1) );
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    do{
    +      DeleteFileA(zConverted);
    +    }while(   (   ((rc = GetFileAttributesA(zConverted)) != INVALID_FILE_ATTRIBUTES)
    +               || ((error = GetLastError()) == ERROR_ACCESS_DENIED))
    +           && (++cnt < MX_DELETION_ATTEMPTS)
    +           && (Sleep(100), 1) );
    +#endif
    +  }
    +  free(zConverted);
    +  OSTRACE2("DELETE \"%s\"\n", zFilename);
    +  return (   (rc == INVALID_FILE_ATTRIBUTES) 
    +          && (error == ERROR_FILE_NOT_FOUND)) ? SQLITE_OK : SQLITE_IOERR_DELETE;
    +}
    +
    +/*
    +** Check the existance and status of a file.
    +*/
    +static int winAccess(
    +  sqlite3_vfs *pVfs,         /* Not used on win32 */
    +  const char *zFilename,     /* Name of file to check */
    +  int flags,                 /* Type of test to make on this file */
    +  int *pResOut               /* OUT: Result */
    +){
    +  DWORD attr;
    +  int rc = 0;
    +  void *zConverted = convertUtf8Filename(zFilename);
    +  UNUSED_PARAMETER(pVfs);
    +  if( zConverted==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  if( isNT() ){
    +    attr = GetFileAttributesW((WCHAR*)zConverted);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    attr = GetFileAttributesA((char*)zConverted);
    +#endif
    +  }
    +  free(zConverted);
    +  switch( flags ){
    +    case SQLITE_ACCESS_READ:
    +    case SQLITE_ACCESS_EXISTS:
    +      rc = attr!=INVALID_FILE_ATTRIBUTES;
    +      break;
    +    case SQLITE_ACCESS_READWRITE:
    +      rc = (attr & FILE_ATTRIBUTE_READONLY)==0;
    +      break;
    +    default:
    +      assert(!"Invalid flags argument");
    +  }
    +  *pResOut = rc;
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Turn a relative pathname into a full pathname.  Write the full
    +** pathname into zOut[].  zOut[] will be at least pVfs->mxPathname
    +** bytes in size.
    +*/
    +static int winFullPathname(
    +  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
    +  const char *zRelative,        /* Possibly relative input path */
    +  int nFull,                    /* Size of output buffer in bytes */
    +  char *zFull                   /* Output buffer */
    +){
    +  
    +#if defined(__CYGWIN__)
    +  UNUSED_PARAMETER(nFull);
    +  cygwin_conv_to_full_win32_path(zRelative, zFull);
    +  return SQLITE_OK;
    +#endif
    +
    +#if SQLITE_OS_WINCE
    +  UNUSED_PARAMETER(nFull);
    +  /* WinCE has no concept of a relative pathname, or so I am told. */
    +  sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zRelative);
    +  return SQLITE_OK;
    +#endif
    +
    +#if !SQLITE_OS_WINCE && !defined(__CYGWIN__)
    +  int nByte;
    +  void *zConverted;
    +  char *zOut;
    +  UNUSED_PARAMETER(nFull);
    +  zConverted = convertUtf8Filename(zRelative);
    +  if( isNT() ){
    +    WCHAR *zTemp;
    +    nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, 0) + 3;
    +    zTemp = malloc( nByte*sizeof(zTemp[0]) );
    +    if( zTemp==0 ){
    +      free(zConverted);
    +      return SQLITE_NOMEM;
    +    }
    +    GetFullPathNameW((WCHAR*)zConverted, nByte, zTemp, 0);
    +    free(zConverted);
    +    zOut = unicodeToUtf8(zTemp);
    +    free(zTemp);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    char *zTemp;
    +    nByte = GetFullPathNameA((char*)zConverted, 0, 0, 0) + 3;
    +    zTemp = malloc( nByte*sizeof(zTemp[0]) );
    +    if( zTemp==0 ){
    +      free(zConverted);
    +      return SQLITE_NOMEM;
    +    }
    +    GetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
    +    free(zConverted);
    +    zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
    +    free(zTemp);
    +#endif
    +  }
    +  if( zOut ){
    +    sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zOut);
    +    free(zOut);
    +    return SQLITE_OK;
    +  }else{
    +    return SQLITE_NOMEM;
    +  }
    +#endif
    +}
    +
    +/*
    +** Get the sector size of the device used to store
    +** file.
    +*/
    +static int getSectorSize(
    +    sqlite3_vfs *pVfs,
    +    const char *zRelative     /* UTF-8 file name */
    +){
    +  DWORD bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;
    +  /* GetDiskFreeSpace is not supported under WINCE */
    +#if SQLITE_OS_WINCE
    +  UNUSED_PARAMETER(pVfs);
    +  UNUSED_PARAMETER(zRelative);
    +#else
    +  char zFullpath[MAX_PATH+1];
    +  int rc;
    +  DWORD dwRet = 0;
    +  DWORD dwDummy;
    +
    +  /*
    +  ** We need to get the full path name of the file
    +  ** to get the drive letter to look up the sector
    +  ** size.
    +  */
    +  rc = winFullPathname(pVfs, zRelative, MAX_PATH, zFullpath);
    +  if( rc == SQLITE_OK )
    +  {
    +    void *zConverted = convertUtf8Filename(zFullpath);
    +    if( zConverted ){
    +      if( isNT() ){
    +        /* trim path to just drive reference */
    +        WCHAR *p = zConverted;
    +        for(;*p;p++){
    +          if( *p == '\\' ){
    +            *p = '\0';
    +            break;
    +          }
    +        }
    +        dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted,
    +                                  &dwDummy,
    +                                  &bytesPerSector,
    +                                  &dwDummy,
    +                                  &dwDummy);
    +      }else{
    +        /* trim path to just drive reference */
    +        char *p = (char *)zConverted;
    +        for(;*p;p++){
    +          if( *p == '\\' ){
    +            *p = '\0';
    +            break;
    +          }
    +        }
    +        dwRet = GetDiskFreeSpaceA((char*)zConverted,
    +                                  &dwDummy,
    +                                  &bytesPerSector,
    +                                  &dwDummy,
    +                                  &dwDummy);
    +      }
    +      free(zConverted);
    +    }
    +    if( !dwRet ){
    +      bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;
    +    }
    +  }
    +#endif
    +  return (int) bytesPerSector; 
    +}
    +
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +/*
    +** Interfaces for opening a shared library, finding entry points
    +** within the shared library, and closing the shared library.
    +*/
    +/*
    +** Interfaces for opening a shared library, finding entry points
    +** within the shared library, and closing the shared library.
    +*/
    +static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
    +  HANDLE h;
    +  void *zConverted = convertUtf8Filename(zFilename);
    +  UNUSED_PARAMETER(pVfs);
    +  if( zConverted==0 ){
    +    return 0;
    +  }
    +  if( isNT() ){
    +    h = LoadLibraryW((WCHAR*)zConverted);
    +/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
    +** Since the ASCII version of these Windows API do not exist for WINCE,
    +** it's important to not reference them for WINCE builds.
    +*/
    +#if SQLITE_OS_WINCE==0
    +  }else{
    +    h = LoadLibraryA((char*)zConverted);
    +#endif
    +  }
    +  free(zConverted);
    +  return (void*)h;
    +}
    +static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
    +  UNUSED_PARAMETER(pVfs);
    +  getLastErrorMsg(nBuf, zBufOut);
    +}
    +void (*winDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol))(void){
    +  UNUSED_PARAMETER(pVfs);
    +#if SQLITE_OS_WINCE
    +  /* The GetProcAddressA() routine is only available on wince. */
    +  return (void(*)(void))GetProcAddressA((HANDLE)pHandle, zSymbol);
    +#else
    +  /* All other windows platforms expect GetProcAddress() to take
    +  ** an Ansi string regardless of the _UNICODE setting */
    +  return (void(*)(void))GetProcAddress((HANDLE)pHandle, zSymbol);
    +#endif
    +}
    +void winDlClose(sqlite3_vfs *pVfs, void *pHandle){
    +  UNUSED_PARAMETER(pVfs);
    +  FreeLibrary((HANDLE)pHandle);
    +}
    +#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
    +  #define winDlOpen  0
    +  #define winDlError 0
    +  #define winDlSym   0
    +  #define winDlClose 0
    +#endif
    +
    +
    +/*
    +** Write up to nBuf bytes of randomness into zBuf.
    +*/
    +static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
    +  int n = 0;
    +  UNUSED_PARAMETER(pVfs);
    +#if defined(SQLITE_TEST)
    +  n = nBuf;
    +  memset(zBuf, 0, nBuf);
    +#else
    +  if( sizeof(SYSTEMTIME)<=nBuf-n ){
    +    SYSTEMTIME x;
    +    GetSystemTime(&x);
    +    memcpy(&zBuf[n], &x, sizeof(x));
    +    n += sizeof(x);
    +  }
    +  if( sizeof(DWORD)<=nBuf-n ){
    +    DWORD pid = GetCurrentProcessId();
    +    memcpy(&zBuf[n], &pid, sizeof(pid));
    +    n += sizeof(pid);
    +  }
    +  if( sizeof(DWORD)<=nBuf-n ){
    +    DWORD cnt = GetTickCount();
    +    memcpy(&zBuf[n], &cnt, sizeof(cnt));
    +    n += sizeof(cnt);
    +  }
    +  if( sizeof(LARGE_INTEGER)<=nBuf-n ){
    +    LARGE_INTEGER i;
    +    QueryPerformanceCounter(&i);
    +    memcpy(&zBuf[n], &i, sizeof(i));
    +    n += sizeof(i);
    +  }
    +#endif
    +  return n;
    +}
    +
    +
    +/*
    +** Sleep for a little while.  Return the amount of time slept.
    +*/
    +static int winSleep(sqlite3_vfs *pVfs, int microsec){
    +  Sleep((microsec+999)/1000);
    +  UNUSED_PARAMETER(pVfs);
    +  return ((microsec+999)/1000)*1000;
    +}
    +
    +/*
    +** The following variable, if set to a non-zero value, becomes the result
    +** returned from sqlite3OsCurrentTime().  This is used for testing.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_current_time = 0;
    +#endif
    +
    +/*
    +** Find the current time (in Universal Coordinated Time).  Write the
    +** current time and date as a Julian Day number into *prNow and
    +** return 0.  Return 1 if the time and date cannot be found.
    +*/
    +int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
    +  FILETIME ft;
    +  /* FILETIME structure is a 64-bit value representing the number of 
    +     100-nanosecond intervals since January 1, 1601 (= JD 2305813.5). 
    +  */
    +  sqlite3_int64 timeW;   /* Whole days */
    +  sqlite3_int64 timeF;   /* Fractional Days */
    +
    +  /* Number of 100-nanosecond intervals in a single day */
    +  static const sqlite3_int64 ntuPerDay = 
    +      10000000*(sqlite3_int64)86400;
    +
    +  /* Number of 100-nanosecond intervals in half of a day */
    +  static const sqlite3_int64 ntuPerHalfDay = 
    +      10000000*(sqlite3_int64)43200;
    +
    +  /* 2^32 - to avoid use of LL and warnings in gcc */
    +  static const sqlite3_int64 max32BitValue = 
    +      (sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 + (sqlite3_int64)294967296;
    +
    +#if SQLITE_OS_WINCE
    +  SYSTEMTIME time;
    +  GetSystemTime(&time);
    +  /* if SystemTimeToFileTime() fails, it returns zero. */
    +  if (!SystemTimeToFileTime(&time,&ft)){
    +    return 1;
    +  }
    +#else
    +  GetSystemTimeAsFileTime( &ft );
    +#endif
    +  UNUSED_PARAMETER(pVfs);
    +  timeW = (((sqlite3_int64)ft.dwHighDateTime)*max32BitValue) + (sqlite3_int64)ft.dwLowDateTime;
    +  timeF = timeW % ntuPerDay;          /* fractional days (100-nanoseconds) */
    +  timeW = timeW / ntuPerDay;          /* whole days */
    +  timeW = timeW + 2305813;            /* add whole days (from 2305813.5) */
    +  timeF = timeF + ntuPerHalfDay;      /* add half a day (from 2305813.5) */
    +  timeW = timeW + (timeF/ntuPerDay);  /* add whole day if half day made one */
    +  timeF = timeF % ntuPerDay;          /* compute new fractional days */
    +  *prNow = (double)timeW + ((double)timeF / (double)ntuPerDay);
    +#ifdef SQLITE_TEST
    +  if( sqlite3_current_time ){
    +    *prNow = ((double)sqlite3_current_time + (double)43200) / (double)86400 + (double)2440587;
    +  }
    +#endif
    +  return 0;
    +}
    +
    +/*
    +** The idea is that this function works like a combination of
    +** GetLastError() and FormatMessage() on windows (or errno and
    +** strerror_r() on unix). After an error is returned by an OS
    +** function, SQLite calls this function with zBuf pointing to
    +** a buffer of nBuf bytes. The OS layer should populate the
    +** buffer with a nul-terminated UTF-8 encoded error message
    +** describing the last IO error to have occurred within the calling
    +** thread.
    +**
    +** If the error message is too large for the supplied buffer,
    +** it should be truncated. The return value of xGetLastError
    +** is zero if the error message fits in the buffer, or non-zero
    +** otherwise (if the message was truncated). If non-zero is returned,
    +** then it is not necessary to include the nul-terminator character
    +** in the output buffer.
    +**
    +** Not supplying an error message will have no adverse effect
    +** on SQLite. It is fine to have an implementation that never
    +** returns an error message:
    +**
    +**   int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
    +**     assert(zBuf[0]=='\0');
    +**     return 0;
    +**   }
    +**
    +** However if an error message is supplied, it will be incorporated
    +** by sqlite into the error message available to the user using
    +** sqlite3_errmsg(), possibly making IO errors easier to debug.
    +*/
    +static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
    +  UNUSED_PARAMETER(pVfs);
    +  return getLastErrorMsg(nBuf, zBuf);
    +}
    +
    +/*
    +** Initialize and deinitialize the operating system interface.
    +*/
    +SQLITE_API int sqlite3_os_init(void){
    +  static sqlite3_vfs winVfs = {
    +    1,                 /* iVersion */
    +    sizeof(winFile),   /* szOsFile */
    +    MAX_PATH,          /* mxPathname */
    +    0,                 /* pNext */
    +    "win32",           /* zName */
    +    0,                 /* pAppData */
    + 
    +    winOpen,           /* xOpen */
    +    winDelete,         /* xDelete */
    +    winAccess,         /* xAccess */
    +    winFullPathname,   /* xFullPathname */
    +    winDlOpen,         /* xDlOpen */
    +    winDlError,        /* xDlError */
    +    winDlSym,          /* xDlSym */
    +    winDlClose,        /* xDlClose */
    +    winRandomness,     /* xRandomness */
    +    winSleep,          /* xSleep */
    +    winCurrentTime,    /* xCurrentTime */
    +    winGetLastError    /* xGetLastError */
    +  };
    +
    +  sqlite3_vfs_register(&winVfs, 1);
    +  return SQLITE_OK; 
    +}
    +SQLITE_API int sqlite3_os_end(void){ 
    +  return SQLITE_OK;
    +}
    +
    +#endif /* SQLITE_OS_WIN */
    +
    +/************** End of os_win.c **********************************************/
    +/************** Begin file bitvec.c ******************************************/
    +/*
    +** 2008 February 16
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file implements an object that represents a fixed-length
    +** bitmap.  Bits are numbered starting with 1.
    +**
    +** A bitmap is used to record which pages of a database file have been
    +** journalled during a transaction, or which pages have the "dont-write"
    +** property.  Usually only a few pages are meet either condition.
    +** So the bitmap is usually sparse and has low cardinality.
    +** But sometimes (for example when during a DROP of a large table) most
    +** or all of the pages in a database can get journalled.  In those cases, 
    +** the bitmap becomes dense with high cardinality.  The algorithm needs 
    +** to handle both cases well.
    +**
    +** The size of the bitmap is fixed when the object is created.
    +**
    +** All bits are clear when the bitmap is created.  Individual bits
    +** may be set or cleared one at a time.
    +**
    +** Test operations are about 100 times more common that set operations.
    +** Clear operations are exceedingly rare.  There are usually between
    +** 5 and 500 set operations per Bitvec object, though the number of sets can
    +** sometimes grow into tens of thousands or larger.  The size of the
    +** Bitvec object is the number of pages in the database file at the
    +** start of a transaction, and is thus usually less than a few thousand,
    +** but can be as large as 2 billion for a really big database.
    +**
    +** @(#) $Id: bitvec.c,v 1.17 2009/07/25 17:33:26 drh Exp $
    +*/
    +
    +/* Size of the Bitvec structure in bytes. */
    +#define BITVEC_SZ        (sizeof(void*)*128)  /* 512 on 32bit.  1024 on 64bit */
    +
    +/* Round the union size down to the nearest pointer boundary, since that's how 
    +** it will be aligned within the Bitvec struct. */
    +#define BITVEC_USIZE     (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))
    +
    +/* Type of the array "element" for the bitmap representation. 
    +** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE. 
    +** Setting this to the "natural word" size of your CPU may improve
    +** performance. */
    +#define BITVEC_TELEM     u8
    +/* Size, in bits, of the bitmap element. */
    +#define BITVEC_SZELEM    8
    +/* Number of elements in a bitmap array. */
    +#define BITVEC_NELEM     (BITVEC_USIZE/sizeof(BITVEC_TELEM))
    +/* Number of bits in the bitmap array. */
    +#define BITVEC_NBIT      (BITVEC_NELEM*BITVEC_SZELEM)
    +
    +/* Number of u32 values in hash table. */
    +#define BITVEC_NINT      (BITVEC_USIZE/sizeof(u32))
    +/* Maximum number of entries in hash table before 
    +** sub-dividing and re-hashing. */
    +#define BITVEC_MXHASH    (BITVEC_NINT/2)
    +/* Hashing function for the aHash representation.
    +** Empirical testing showed that the *37 multiplier 
    +** (an arbitrary prime)in the hash function provided 
    +** no fewer collisions than the no-op *1. */
    +#define BITVEC_HASH(X)   (((X)*1)%BITVEC_NINT)
    +
    +#define BITVEC_NPTR      (BITVEC_USIZE/sizeof(Bitvec *))
    +
    +
    +/*
    +** A bitmap is an instance of the following structure.
    +**
    +** This bitmap records the existance of zero or more bits
    +** with values between 1 and iSize, inclusive.
    +**
    +** There are three possible representations of the bitmap.
    +** If iSize<=BITVEC_NBIT, then Bitvec.u.aBitmap[] is a straight
    +** bitmap.  The least significant bit is bit 1.
    +**
    +** If iSize>BITVEC_NBIT and iDivisor==0 then Bitvec.u.aHash[] is
    +** a hash table that will hold up to BITVEC_MXHASH distinct values.
    +**
    +** Otherwise, the value i is redirected into one of BITVEC_NPTR
    +** sub-bitmaps pointed to by Bitvec.u.apSub[].  Each subbitmap
    +** handles up to iDivisor separate values of i.  apSub[0] holds
    +** values between 1 and iDivisor.  apSub[1] holds values between
    +** iDivisor+1 and 2*iDivisor.  apSub[N] holds values between
    +** N*iDivisor+1 and (N+1)*iDivisor.  Each subbitmap is normalized
    +** to hold deal with values between 1 and iDivisor.
    +*/
    +struct Bitvec {
    +  u32 iSize;      /* Maximum bit index.  Max iSize is 4,294,967,296. */
    +  u32 nSet;       /* Number of bits that are set - only valid for aHash
    +                  ** element.  Max is BITVEC_NINT.  For BITVEC_SZ of 512,
    +                  ** this would be 125. */
    +  u32 iDivisor;   /* Number of bits handled by each apSub[] entry. */
    +                  /* Should >=0 for apSub element. */
    +                  /* Max iDivisor is max(u32) / BITVEC_NPTR + 1.  */
    +                  /* For a BITVEC_SZ of 512, this would be 34,359,739. */
    +  union {
    +    BITVEC_TELEM aBitmap[BITVEC_NELEM];    /* Bitmap representation */
    +    u32 aHash[BITVEC_NINT];      /* Hash table representation */
    +    Bitvec *apSub[BITVEC_NPTR];  /* Recursive representation */
    +  } u;
    +};
    +
    +/*
    +** Create a new bitmap object able to handle bits between 0 and iSize,
    +** inclusive.  Return a pointer to the new object.  Return NULL if 
    +** malloc fails.
    +*/
    +SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
    +  Bitvec *p;
    +  assert( sizeof(*p)==BITVEC_SZ );
    +  p = sqlite3MallocZero( sizeof(*p) );
    +  if( p ){
    +    p->iSize = iSize;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Check to see if the i-th bit is set.  Return true or false.
    +** If p is NULL (if the bitmap has not been created) or if
    +** i is out of range, then return false.
    +*/
    +SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
    +  if( p==0 ) return 0;
    +  if( i>p->iSize || i==0 ) return 0;
    +  i--;
    +  while( p->iDivisor ){
    +    u32 bin = i/p->iDivisor;
    +    i = i%p->iDivisor;
    +    p = p->u.apSub[bin];
    +    if (!p) {
    +      return 0;
    +    }
    +  }
    +  if( p->iSize<=BITVEC_NBIT ){
    +    return (p->u.aBitmap[i/BITVEC_SZELEM] & (1<<(i&(BITVEC_SZELEM-1))))!=0;
    +  } else{
    +    u32 h = BITVEC_HASH(i++);
    +    while( p->u.aHash[h] ){
    +      if( p->u.aHash[h]==i ) return 1;
    +      h = (h+1) % BITVEC_NINT;
    +    }
    +    return 0;
    +  }
    +}
    +
    +/*
    +** Set the i-th bit.  Return 0 on success and an error code if
    +** anything goes wrong.
    +**
    +** This routine might cause sub-bitmaps to be allocated.  Failing
    +** to get the memory needed to hold the sub-bitmap is the only
    +** that can go wrong with an insert, assuming p and i are valid.
    +**
    +** The calling function must ensure that p is a valid Bitvec object
    +** and that the value for "i" is within range of the Bitvec object.
    +** Otherwise the behavior is undefined.
    +*/
    +SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
    +  u32 h;
    +  if( p==0 ) return SQLITE_OK;
    +  assert( i>0 );
    +  assert( i<=p->iSize );
    +  i--;
    +  while((p->iSize > BITVEC_NBIT) && p->iDivisor) {
    +    u32 bin = i/p->iDivisor;
    +    i = i%p->iDivisor;
    +    if( p->u.apSub[bin]==0 ){
    +      p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor );
    +      if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM;
    +    }
    +    p = p->u.apSub[bin];
    +  }
    +  if( p->iSize<=BITVEC_NBIT ){
    +    p->u.aBitmap[i/BITVEC_SZELEM] |= 1 << (i&(BITVEC_SZELEM-1));
    +    return SQLITE_OK;
    +  }
    +  h = BITVEC_HASH(i++);
    +  /* if there wasn't a hash collision, and this doesn't */
    +  /* completely fill the hash, then just add it without */
    +  /* worring about sub-dividing and re-hashing. */
    +  if( !p->u.aHash[h] ){
    +    if (p->nSet<(BITVEC_NINT-1)) {
    +      goto bitvec_set_end;
    +    } else {
    +      goto bitvec_set_rehash;
    +    }
    +  }
    +  /* there was a collision, check to see if it's already */
    +  /* in hash, if not, try to find a spot for it */
    +  do {
    +    if( p->u.aHash[h]==i ) return SQLITE_OK;
    +    h++;
    +    if( h>=BITVEC_NINT ) h = 0;
    +  } while( p->u.aHash[h] );
    +  /* we didn't find it in the hash.  h points to the first */
    +  /* available free spot. check to see if this is going to */
    +  /* make our hash too "full".  */
    +bitvec_set_rehash:
    +  if( p->nSet>=BITVEC_MXHASH ){
    +    unsigned int j;
    +    int rc;
    +    u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
    +    if( aiValues==0 ){
    +      return SQLITE_NOMEM;
    +    }else{
    +      memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
    +      memset(p->u.apSub, 0, sizeof(p->u.apSub));
    +      p->iDivisor = (p->iSize + BITVEC_NPTR - 1)/BITVEC_NPTR;
    +      rc = sqlite3BitvecSet(p, i);
    +      for(j=0; j<BITVEC_NINT; j++){
    +        if( aiValues[j] ) rc |= sqlite3BitvecSet(p, aiValues[j]);
    +      }
    +      sqlite3StackFree(0, aiValues);
    +      return rc;
    +    }
    +  }
    +bitvec_set_end:
    +  p->nSet++;
    +  p->u.aHash[h] = i;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Clear the i-th bit.
    +**
    +** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
    +** that BitvecClear can use to rebuilt its hash table.
    +*/
    +SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
    +  if( p==0 ) return;
    +  assert( i>0 );
    +  i--;
    +  while( p->iDivisor ){
    +    u32 bin = i/p->iDivisor;
    +    i = i%p->iDivisor;
    +    p = p->u.apSub[bin];
    +    if (!p) {
    +      return;
    +    }
    +  }
    +  if( p->iSize<=BITVEC_NBIT ){
    +    p->u.aBitmap[i/BITVEC_SZELEM] &= ~(1 << (i&(BITVEC_SZELEM-1)));
    +  }else{
    +    unsigned int j;
    +    u32 *aiValues = pBuf;
    +    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
    +    memset(p->u.aHash, 0, sizeof(p->u.aHash));
    +    p->nSet = 0;
    +    for(j=0; j<BITVEC_NINT; j++){
    +      if( aiValues[j] && aiValues[j]!=(i+1) ){
    +        u32 h = BITVEC_HASH(aiValues[j]-1);
    +        p->nSet++;
    +        while( p->u.aHash[h] ){
    +          h++;
    +          if( h>=BITVEC_NINT ) h = 0;
    +        }
    +        p->u.aHash[h] = aiValues[j];
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Destroy a bitmap object.  Reclaim all memory used.
    +*/
    +SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec *p){
    +  if( p==0 ) return;
    +  if( p->iDivisor ){
    +    unsigned int i;
    +    for(i=0; i<BITVEC_NPTR; i++){
    +      sqlite3BitvecDestroy(p->u.apSub[i]);
    +    }
    +  }
    +  sqlite3_free(p);
    +}
    +
    +/*
    +** Return the value of the iSize parameter specified when Bitvec *p
    +** was created.
    +*/
    +SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
    +  return p->iSize;
    +}
    +
    +#ifndef SQLITE_OMIT_BUILTIN_TEST
    +/*
    +** Let V[] be an array of unsigned characters sufficient to hold
    +** up to N bits.  Let I be an integer between 0 and N.  0<=I<N.
    +** Then the following macros can be used to set, clear, or test
    +** individual bits within V.
    +*/
    +#define SETBIT(V,I)      V[I>>3] |= (1<<(I&7))
    +#define CLEARBIT(V,I)    V[I>>3] &= ~(1<<(I&7))
    +#define TESTBIT(V,I)     (V[I>>3]&(1<<(I&7)))!=0
    +
    +/*
    +** This routine runs an extensive test of the Bitvec code.
    +**
    +** The input is an array of integers that acts as a program
    +** to test the Bitvec.  The integers are opcodes followed
    +** by 0, 1, or 3 operands, depending on the opcode.  Another
    +** opcode follows immediately after the last operand.
    +**
    +** There are 6 opcodes numbered from 0 through 5.  0 is the
    +** "halt" opcode and causes the test to end.
    +**
    +**    0          Halt and return the number of errors
    +**    1 N S X    Set N bits beginning with S and incrementing by X
    +**    2 N S X    Clear N bits beginning with S and incrementing by X
    +**    3 N        Set N randomly chosen bits
    +**    4 N        Clear N randomly chosen bits
    +**    5 N S X    Set N bits from S increment X in array only, not in bitvec
    +**
    +** The opcodes 1 through 4 perform set and clear operations are performed
    +** on both a Bitvec object and on a linear array of bits obtained from malloc.
    +** Opcode 5 works on the linear array only, not on the Bitvec.
    +** Opcode 5 is used to deliberately induce a fault in order to
    +** confirm that error detection works.
    +**
    +** At the conclusion of the test the linear array is compared
    +** against the Bitvec object.  If there are any differences,
    +** an error is returned.  If they are the same, zero is returned.
    +**
    +** If a memory allocation error occurs, return -1.
    +*/
    +SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int sz, int *aOp){
    +  Bitvec *pBitvec = 0;
    +  unsigned char *pV = 0;
    +  int rc = -1;
    +  int i, nx, pc, op;
    +  void *pTmpSpace;
    +
    +  /* Allocate the Bitvec to be tested and a linear array of
    +  ** bits to act as the reference */
    +  pBitvec = sqlite3BitvecCreate( sz );
    +  pV = sqlite3_malloc( (sz+7)/8 + 1 );
    +  pTmpSpace = sqlite3_malloc(BITVEC_SZ);
    +  if( pBitvec==0 || pV==0 || pTmpSpace==0  ) goto bitvec_end;
    +  memset(pV, 0, (sz+7)/8 + 1);
    +
    +  /* NULL pBitvec tests */
    +  sqlite3BitvecSet(0, 1);
    +  sqlite3BitvecClear(0, 1, pTmpSpace);
    +
    +  /* Run the program */
    +  pc = 0;
    +  while( (op = aOp[pc])!=0 ){
    +    switch( op ){
    +      case 1:
    +      case 2:
    +      case 5: {
    +        nx = 4;
    +        i = aOp[pc+2] - 1;
    +        aOp[pc+2] += aOp[pc+3];
    +        break;
    +      }
    +      case 3:
    +      case 4: 
    +      default: {
    +        nx = 2;
    +        sqlite3_randomness(sizeof(i), &i);
    +        break;
    +      }
    +    }
    +    if( (--aOp[pc+1]) > 0 ) nx = 0;
    +    pc += nx;
    +    i = (i & 0x7fffffff)%sz;
    +    if( (op & 1)!=0 ){
    +      SETBIT(pV, (i+1));
    +      if( op!=5 ){
    +        if( sqlite3BitvecSet(pBitvec, i+1) ) goto bitvec_end;
    +      }
    +    }else{
    +      CLEARBIT(pV, (i+1));
    +      sqlite3BitvecClear(pBitvec, i+1, pTmpSpace);
    +    }
    +  }
    +
    +  /* Test to make sure the linear array exactly matches the
    +  ** Bitvec object.  Start with the assumption that they do
    +  ** match (rc==0).  Change rc to non-zero if a discrepancy
    +  ** is found.
    +  */
    +  rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1)
    +          + sqlite3BitvecTest(pBitvec, 0)
    +          + (sqlite3BitvecSize(pBitvec) - sz);
    +  for(i=1; i<=sz; i++){
    +    if(  (TESTBIT(pV,i))!=sqlite3BitvecTest(pBitvec,i) ){
    +      rc = i;
    +      break;
    +    }
    +  }
    +
    +  /* Free allocated structure */
    +bitvec_end:
    +  sqlite3_free(pTmpSpace);
    +  sqlite3_free(pV);
    +  sqlite3BitvecDestroy(pBitvec);
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_BUILTIN_TEST */
    +
    +/************** End of bitvec.c **********************************************/
    +/************** Begin file pcache.c ******************************************/
    +/*
    +** 2008 August 05
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file implements that page cache.
    +**
    +** @(#) $Id: pcache.c,v 1.47 2009/07/25 11:46:49 danielk1977 Exp $
    +*/
    +
    +/*
    +** A complete page cache is an instance of this structure.
    +*/
    +struct PCache {
    +  PgHdr *pDirty, *pDirtyTail;         /* List of dirty pages in LRU order */
    +  PgHdr *pSynced;                     /* Last synced page in dirty page list */
    +  int nRef;                           /* Number of referenced pages */
    +  int nMax;                           /* Configured cache size */
    +  int szPage;                         /* Size of every page in this cache */
    +  int szExtra;                        /* Size of extra space for each page */
    +  int bPurgeable;                     /* True if pages are on backing store */
    +  int (*xStress)(void*,PgHdr*);       /* Call to try make a page clean */
    +  void *pStress;                      /* Argument to xStress */
    +  sqlite3_pcache *pCache;             /* Pluggable cache module */
    +  PgHdr *pPage1;                      /* Reference to page 1 */
    +};
    +
    +/*
    +** Some of the assert() macros in this code are too expensive to run
    +** even during normal debugging.  Use them only rarely on long-running
    +** tests.  Enable the expensive asserts using the
    +** -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 compile-time option.
    +*/
    +#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
    +# define expensive_assert(X)  assert(X)
    +#else
    +# define expensive_assert(X)
    +#endif
    +
    +/********************************** Linked List Management ********************/
    +
    +#if !defined(NDEBUG) && defined(SQLITE_ENABLE_EXPENSIVE_ASSERT)
    +/*
    +** Check that the pCache->pSynced variable is set correctly. If it
    +** is not, either fail an assert or return zero. Otherwise, return
    +** non-zero. This is only used in debugging builds, as follows:
    +**
    +**   expensive_assert( pcacheCheckSynced(pCache) );
    +*/
    +static int pcacheCheckSynced(PCache *pCache){
    +  PgHdr *p;
    +  for(p=pCache->pDirtyTail; p!=pCache->pSynced; p=p->pDirtyPrev){
    +    assert( p->nRef || (p->flags&PGHDR_NEED_SYNC) );
    +  }
    +  return (p==0 || p->nRef || (p->flags&PGHDR_NEED_SYNC)==0);
    +}
    +#endif /* !NDEBUG && SQLITE_ENABLE_EXPENSIVE_ASSERT */
    +
    +/*
    +** Remove page pPage from the list of dirty pages.
    +*/
    +static void pcacheRemoveFromDirtyList(PgHdr *pPage){
    +  PCache *p = pPage->pCache;
    +
    +  assert( pPage->pDirtyNext || pPage==p->pDirtyTail );
    +  assert( pPage->pDirtyPrev || pPage==p->pDirty );
    +
    +  /* Update the PCache1.pSynced variable if necessary. */
    +  if( p->pSynced==pPage ){
    +    PgHdr *pSynced = pPage->pDirtyPrev;
    +    while( pSynced && (pSynced->flags&PGHDR_NEED_SYNC) ){
    +      pSynced = pSynced->pDirtyPrev;
    +    }
    +    p->pSynced = pSynced;
    +  }
    +
    +  if( pPage->pDirtyNext ){
    +    pPage->pDirtyNext->pDirtyPrev = pPage->pDirtyPrev;
    +  }else{
    +    assert( pPage==p->pDirtyTail );
    +    p->pDirtyTail = pPage->pDirtyPrev;
    +  }
    +  if( pPage->pDirtyPrev ){
    +    pPage->pDirtyPrev->pDirtyNext = pPage->pDirtyNext;
    +  }else{
    +    assert( pPage==p->pDirty );
    +    p->pDirty = pPage->pDirtyNext;
    +  }
    +  pPage->pDirtyNext = 0;
    +  pPage->pDirtyPrev = 0;
    +
    +  expensive_assert( pcacheCheckSynced(p) );
    +}
    +
    +/*
    +** Add page pPage to the head of the dirty list (PCache1.pDirty is set to
    +** pPage).
    +*/
    +static void pcacheAddToDirtyList(PgHdr *pPage){
    +  PCache *p = pPage->pCache;
    +
    +  assert( pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage );
    +
    +  pPage->pDirtyNext = p->pDirty;
    +  if( pPage->pDirtyNext ){
    +    assert( pPage->pDirtyNext->pDirtyPrev==0 );
    +    pPage->pDirtyNext->pDirtyPrev = pPage;
    +  }
    +  p->pDirty = pPage;
    +  if( !p->pDirtyTail ){
    +    p->pDirtyTail = pPage;
    +  }
    +  if( !p->pSynced && 0==(pPage->flags&PGHDR_NEED_SYNC) ){
    +    p->pSynced = pPage;
    +  }
    +  expensive_assert( pcacheCheckSynced(p) );
    +}
    +
    +/*
    +** Wrapper around the pluggable caches xUnpin method. If the cache is
    +** being used for an in-memory database, this function is a no-op.
    +*/
    +static void pcacheUnpin(PgHdr *p){
    +  PCache *pCache = p->pCache;
    +  if( pCache->bPurgeable ){
    +    if( p->pgno==1 ){
    +      pCache->pPage1 = 0;
    +    }
    +    sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 0);
    +  }
    +}
    +
    +/*************************************************** General Interfaces ******
    +**
    +** Initialize and shutdown the page cache subsystem. Neither of these 
    +** functions are threadsafe.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheInitialize(void){
    +  if( sqlite3GlobalConfig.pcache.xInit==0 ){
    +    sqlite3PCacheSetDefault();
    +  }
    +  return sqlite3GlobalConfig.pcache.xInit(sqlite3GlobalConfig.pcache.pArg);
    +}
    +SQLITE_PRIVATE void sqlite3PcacheShutdown(void){
    +  if( sqlite3GlobalConfig.pcache.xShutdown ){
    +    sqlite3GlobalConfig.pcache.xShutdown(sqlite3GlobalConfig.pcache.pArg);
    +  }
    +}
    +
    +/*
    +** Return the size in bytes of a PCache object.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheSize(void){ return sizeof(PCache); }
    +
    +/*
    +** Create a new PCache object. Storage space to hold the object
    +** has already been allocated and is passed in as the p pointer. 
    +** The caller discovers how much space needs to be allocated by 
    +** calling sqlite3PcacheSize().
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheOpen(
    +  int szPage,                  /* Size of every page */
    +  int szExtra,                 /* Extra space associated with each page */
    +  int bPurgeable,              /* True if pages are on backing store */
    +  int (*xStress)(void*,PgHdr*),/* Call to try to make pages clean */
    +  void *pStress,               /* Argument to xStress */
    +  PCache *p                    /* Preallocated space for the PCache */
    +){
    +  memset(p, 0, sizeof(PCache));
    +  p->szPage = szPage;
    +  p->szExtra = szExtra;
    +  p->bPurgeable = bPurgeable;
    +  p->xStress = xStress;
    +  p->pStress = pStress;
    +  p->nMax = 100;
    +}
    +
    +/*
    +** Change the page size for PCache object. The caller must ensure that there
    +** are no outstanding page references when this function is called.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
    +  assert( pCache->nRef==0 && pCache->pDirty==0 );
    +  if( pCache->pCache ){
    +    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
    +    pCache->pCache = 0;
    +  }
    +  pCache->szPage = szPage;
    +}
    +
    +/*
    +** Try to obtain a page from the cache.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheFetch(
    +  PCache *pCache,       /* Obtain the page from this cache */
    +  Pgno pgno,            /* Page number to obtain */
    +  int createFlag,       /* If true, create page if it does not exist already */
    +  PgHdr **ppPage        /* Write the page here */
    +){
    +  PgHdr *pPage = 0;
    +  int eCreate;
    +
    +  assert( pCache!=0 );
    +  assert( createFlag==1 || createFlag==0 );
    +  assert( pgno>0 );
    +
    +  /* If the pluggable cache (sqlite3_pcache*) has not been allocated,
    +  ** allocate it now.
    +  */
    +  if( !pCache->pCache && createFlag ){
    +    sqlite3_pcache *p;
    +    int nByte;
    +    nByte = pCache->szPage + pCache->szExtra + sizeof(PgHdr);
    +    p = sqlite3GlobalConfig.pcache.xCreate(nByte, pCache->bPurgeable);
    +    if( !p ){
    +      return SQLITE_NOMEM;
    +    }
    +    sqlite3GlobalConfig.pcache.xCachesize(p, pCache->nMax);
    +    pCache->pCache = p;
    +  }
    +
    +  eCreate = createFlag * (1 + (!pCache->bPurgeable || !pCache->pDirty));
    +  if( pCache->pCache ){
    +    pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, eCreate);
    +  }
    +
    +  if( !pPage && eCreate==1 ){
    +    PgHdr *pPg;
    +
    +    /* Find a dirty page to write-out and recycle. First try to find a 
    +    ** page that does not require a journal-sync (one with PGHDR_NEED_SYNC
    +    ** cleared), but if that is not possible settle for any other 
    +    ** unreferenced dirty page.
    +    */
    +    expensive_assert( pcacheCheckSynced(pCache) );
    +    for(pPg=pCache->pSynced; 
    +        pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC)); 
    +        pPg=pPg->pDirtyPrev
    +    );
    +    if( !pPg ){
    +      for(pPg=pCache->pDirtyTail; pPg && pPg->nRef; pPg=pPg->pDirtyPrev);
    +    }
    +    if( pPg ){
    +      int rc;
    +      rc = pCache->xStress(pCache->pStress, pPg);
    +      if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
    +        return rc;
    +      }
    +    }
    +
    +    pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, 2);
    +  }
    +
    +  if( pPage ){
    +    if( !pPage->pData ){
    +      memset(pPage, 0, sizeof(PgHdr) + pCache->szExtra);
    +      pPage->pExtra = (void*)&pPage[1];
    +      pPage->pData = (void *)&((char *)pPage)[sizeof(PgHdr) + pCache->szExtra];
    +      pPage->pCache = pCache;
    +      pPage->pgno = pgno;
    +    }
    +    assert( pPage->pCache==pCache );
    +    assert( pPage->pgno==pgno );
    +    assert( pPage->pExtra==(void *)&pPage[1] );
    +
    +    if( 0==pPage->nRef ){
    +      pCache->nRef++;
    +    }
    +    pPage->nRef++;
    +    if( pgno==1 ){
    +      pCache->pPage1 = pPage;
    +    }
    +  }
    +  *ppPage = pPage;
    +  return (pPage==0 && eCreate) ? SQLITE_NOMEM : SQLITE_OK;
    +}
    +
    +/*
    +** Decrement the reference count on a page. If the page is clean and the
    +** reference count drops to 0, then it is made elible for recycling.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr *p){
    +  assert( p->nRef>0 );
    +  p->nRef--;
    +  if( p->nRef==0 ){
    +    PCache *pCache = p->pCache;
    +    pCache->nRef--;
    +    if( (p->flags&PGHDR_DIRTY)==0 ){
    +      pcacheUnpin(p);
    +    }else{
    +      /* Move the page to the head of the dirty list. */
    +      pcacheRemoveFromDirtyList(p);
    +      pcacheAddToDirtyList(p);
    +    }
    +  }
    +}
    +
    +/*
    +** Increase the reference count of a supplied page by 1.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){
    +  assert(p->nRef>0);
    +  p->nRef++;
    +}
    +
    +/*
    +** Drop a page from the cache. There must be exactly one reference to the
    +** page. This function deletes that reference, so after it returns the
    +** page pointed to by p is invalid.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
    +  PCache *pCache;
    +  assert( p->nRef==1 );
    +  if( p->flags&PGHDR_DIRTY ){
    +    pcacheRemoveFromDirtyList(p);
    +  }
    +  pCache = p->pCache;
    +  pCache->nRef--;
    +  if( p->pgno==1 ){
    +    pCache->pPage1 = 0;
    +  }
    +  sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 1);
    +}
    +
    +/*
    +** Make sure the page is marked as dirty. If it isn't dirty already,
    +** make it so.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
    +  p->flags &= ~PGHDR_DONT_WRITE;
    +  assert( p->nRef>0 );
    +  if( 0==(p->flags & PGHDR_DIRTY) ){
    +    p->flags |= PGHDR_DIRTY;
    +    pcacheAddToDirtyList( p);
    +  }
    +}
    +
    +/*
    +** Make sure the page is marked as clean. If it isn't clean already,
    +** make it so.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
    +  if( (p->flags & PGHDR_DIRTY) ){
    +    pcacheRemoveFromDirtyList(p);
    +    p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC);
    +    if( p->nRef==0 ){
    +      pcacheUnpin(p);
    +    }
    +  }
    +}
    +
    +/*
    +** Make every page in the cache clean.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache *pCache){
    +  PgHdr *p;
    +  while( (p = pCache->pDirty)!=0 ){
    +    sqlite3PcacheMakeClean(p);
    +  }
    +}
    +
    +/*
    +** Clear the PGHDR_NEED_SYNC flag from all dirty pages.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *pCache){
    +  PgHdr *p;
    +  for(p=pCache->pDirty; p; p=p->pDirtyNext){
    +    p->flags &= ~PGHDR_NEED_SYNC;
    +  }
    +  pCache->pSynced = pCache->pDirtyTail;
    +}
    +
    +/*
    +** Change the page number of page p to newPgno. 
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
    +  PCache *pCache = p->pCache;
    +  assert( p->nRef>0 );
    +  assert( newPgno>0 );
    +  sqlite3GlobalConfig.pcache.xRekey(pCache->pCache, p, p->pgno, newPgno);
    +  p->pgno = newPgno;
    +  if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){
    +    pcacheRemoveFromDirtyList(p);
    +    pcacheAddToDirtyList(p);
    +  }
    +}
    +
    +/*
    +** Drop every cache entry whose page number is greater than "pgno". The
    +** caller must ensure that there are no outstanding references to any pages
    +** other than page 1 with a page number greater than pgno.
    +**
    +** If there is a reference to page 1 and the pgno parameter passed to this
    +** function is 0, then the data area associated with page 1 is zeroed, but
    +** the page object is not dropped.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
    +  if( pCache->pCache ){
    +    PgHdr *p;
    +    PgHdr *pNext;
    +    for(p=pCache->pDirty; p; p=pNext){
    +      pNext = p->pDirtyNext;
    +      if( p->pgno>pgno ){
    +        assert( p->flags&PGHDR_DIRTY );
    +        sqlite3PcacheMakeClean(p);
    +      }
    +    }
    +    if( pgno==0 && pCache->pPage1 ){
    +      memset(pCache->pPage1->pData, 0, pCache->szPage);
    +      pgno = 1;
    +    }
    +    sqlite3GlobalConfig.pcache.xTruncate(pCache->pCache, pgno+1);
    +  }
    +}
    +
    +/*
    +** Close a cache.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheClose(PCache *pCache){
    +  if( pCache->pCache ){
    +    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
    +  }
    +}
    +
    +/* 
    +** Discard the contents of the cache.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheClear(PCache *pCache){
    +  sqlite3PcacheTruncate(pCache, 0);
    +}
    +
    +/*
    +** Merge two lists of pages connected by pDirty and in pgno order.
    +** Do not both fixing the pDirtyPrev pointers.
    +*/
    +static PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){
    +  PgHdr result, *pTail;
    +  pTail = &result;
    +  while( pA && pB ){
    +    if( pA->pgno<pB->pgno ){
    +      pTail->pDirty = pA;
    +      pTail = pA;
    +      pA = pA->pDirty;
    +    }else{
    +      pTail->pDirty = pB;
    +      pTail = pB;
    +      pB = pB->pDirty;
    +    }
    +  }
    +  if( pA ){
    +    pTail->pDirty = pA;
    +  }else if( pB ){
    +    pTail->pDirty = pB;
    +  }else{
    +    pTail->pDirty = 0;
    +  }
    +  return result.pDirty;
    +}
    +
    +/*
    +** Sort the list of pages in accending order by pgno.  Pages are
    +** connected by pDirty pointers.  The pDirtyPrev pointers are
    +** corrupted by this sort.
    +**
    +** Since there cannot be more than 2^31 distinct pages in a database,
    +** there cannot be more than 31 buckets required by the merge sorter.
    +** One extra bucket is added to catch overflow in case something
    +** ever changes to make the previous sentence incorrect.
    +*/
    +#define N_SORT_BUCKET  32
    +static PgHdr *pcacheSortDirtyList(PgHdr *pIn){
    +  PgHdr *a[N_SORT_BUCKET], *p;
    +  int i;
    +  memset(a, 0, sizeof(a));
    +  while( pIn ){
    +    p = pIn;
    +    pIn = p->pDirty;
    +    p->pDirty = 0;
    +    for(i=0; ALWAYS(i<N_SORT_BUCKET-1); i++){
    +      if( a[i]==0 ){
    +        a[i] = p;
    +        break;
    +      }else{
    +        p = pcacheMergeDirtyList(a[i], p);
    +        a[i] = 0;
    +      }
    +    }
    +    if( NEVER(i==N_SORT_BUCKET-1) ){
    +      /* To get here, there need to be 2^(N_SORT_BUCKET) elements in
    +      ** the input list.  But that is impossible.
    +      */
    +      a[i] = pcacheMergeDirtyList(a[i], p);
    +    }
    +  }
    +  p = a[0];
    +  for(i=1; i<N_SORT_BUCKET; i++){
    +    p = pcacheMergeDirtyList(p, a[i]);
    +  }
    +  return p;
    +}
    +
    +/*
    +** Return a list of all dirty pages in the cache, sorted by page number.
    +*/
    +SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){
    +  PgHdr *p;
    +  for(p=pCache->pDirty; p; p=p->pDirtyNext){
    +    p->pDirty = p->pDirtyNext;
    +  }
    +  return pcacheSortDirtyList(pCache->pDirty);
    +}
    +
    +/* 
    +** Return the total number of referenced pages held by the cache.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){
    +  return pCache->nRef;
    +}
    +
    +/*
    +** Return the number of references to the page supplied as an argument.
    +*/
    +SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr *p){
    +  return p->nRef;
    +}
    +
    +/* 
    +** Return the total number of pages in the cache.
    +*/
    +SQLITE_PRIVATE int sqlite3PcachePagecount(PCache *pCache){
    +  int nPage = 0;
    +  if( pCache->pCache ){
    +    nPage = sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache);
    +  }
    +  return nPage;
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** Get the suggested cache-size value.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *pCache){
    +  return pCache->nMax;
    +}
    +#endif
    +
    +/*
    +** Set the suggested cache-size value.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *pCache, int mxPage){
    +  pCache->nMax = mxPage;
    +  if( pCache->pCache ){
    +    sqlite3GlobalConfig.pcache.xCachesize(pCache->pCache, mxPage);
    +  }
    +}
    +
    +#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
    +/*
    +** For all dirty pages currently in the cache, invoke the specified
    +** callback. This is only used if the SQLITE_CHECK_PAGES macro is
    +** defined.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *)){
    +  PgHdr *pDirty;
    +  for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext){
    +    xIter(pDirty);
    +  }
    +}
    +#endif
    +
    +/************** End of pcache.c **********************************************/
    +/************** Begin file pcache1.c *****************************************/
    +/*
    +** 2008 November 05
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file implements the default page cache implementation (the
    +** sqlite3_pcache interface). It also contains part of the implementation
    +** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.
    +** If the default page cache implementation is overriden, then neither of
    +** these two features are available.
    +**
    +** @(#) $Id: pcache1.c,v 1.19 2009/07/17 11:44:07 drh Exp $
    +*/
    +
    +
    +typedef struct PCache1 PCache1;
    +typedef struct PgHdr1 PgHdr1;
    +typedef struct PgFreeslot PgFreeslot;
    +
    +/* Pointers to structures of this type are cast and returned as 
    +** opaque sqlite3_pcache* handles
    +*/
    +struct PCache1 {
    +  /* Cache configuration parameters. Page size (szPage) and the purgeable
    +  ** flag (bPurgeable) are set when the cache is created. nMax may be 
    +  ** modified at any time by a call to the pcache1CacheSize() method.
    +  ** The global mutex must be held when accessing nMax.
    +  */
    +  int szPage;                         /* Size of allocated pages in bytes */
    +  int bPurgeable;                     /* True if cache is purgeable */
    +  unsigned int nMin;                  /* Minimum number of pages reserved */
    +  unsigned int nMax;                  /* Configured "cache_size" value */
    +
    +  /* Hash table of all pages. The following variables may only be accessed
    +  ** when the accessor is holding the global mutex (see pcache1EnterMutex() 
    +  ** and pcache1LeaveMutex()).
    +  */
    +  unsigned int nRecyclable;           /* Number of pages in the LRU list */
    +  unsigned int nPage;                 /* Total number of pages in apHash */
    +  unsigned int nHash;                 /* Number of slots in apHash[] */
    +  PgHdr1 **apHash;                    /* Hash table for fast lookup by key */
    +
    +  unsigned int iMaxKey;               /* Largest key seen since xTruncate() */
    +};
    +
    +/*
    +** Each cache entry is represented by an instance of the following 
    +** structure. A buffer of PgHdr1.pCache->szPage bytes is allocated 
    +** directly before this structure in memory (see the PGHDR1_TO_PAGE() 
    +** macro below).
    +*/
    +struct PgHdr1 {
    +  unsigned int iKey;             /* Key value (page number) */
    +  PgHdr1 *pNext;                 /* Next in hash table chain */
    +  PCache1 *pCache;               /* Cache that currently owns this page */
    +  PgHdr1 *pLruNext;              /* Next in LRU list of unpinned pages */
    +  PgHdr1 *pLruPrev;              /* Previous in LRU list of unpinned pages */
    +};
    +
    +/*
    +** Free slots in the allocator used to divide up the buffer provided using
    +** the SQLITE_CONFIG_PAGECACHE mechanism.
    +*/
    +struct PgFreeslot {
    +  PgFreeslot *pNext;  /* Next free slot */
    +};
    +
    +/*
    +** Global data used by this cache.
    +*/
    +static SQLITE_WSD struct PCacheGlobal {
    +  sqlite3_mutex *mutex;               /* static mutex MUTEX_STATIC_LRU */
    +
    +  int nMaxPage;                       /* Sum of nMaxPage for purgeable caches */
    +  int nMinPage;                       /* Sum of nMinPage for purgeable caches */
    +  int nCurrentPage;                   /* Number of purgeable pages allocated */
    +  PgHdr1 *pLruHead, *pLruTail;        /* LRU list of unpinned pages */
    +
    +  /* Variables related to SQLITE_CONFIG_PAGECACHE settings. */
    +  int szSlot;                         /* Size of each free slot */
    +  void *pStart, *pEnd;                /* Bounds of pagecache malloc range */
    +  PgFreeslot *pFree;                  /* Free page blocks */
    +  int isInit;                         /* True if initialized */
    +} pcache1_g;
    +
    +/*
    +** All code in this file should access the global structure above via the
    +** alias "pcache1". This ensures that the WSD emulation is used when
    +** compiling for systems that do not support real WSD.
    +*/
    +#define pcache1 (GLOBAL(struct PCacheGlobal, pcache1_g))
    +
    +/*
    +** When a PgHdr1 structure is allocated, the associated PCache1.szPage
    +** bytes of data are located directly before it in memory (i.e. the total
    +** size of the allocation is sizeof(PgHdr1)+PCache1.szPage byte). The
    +** PGHDR1_TO_PAGE() macro takes a pointer to a PgHdr1 structure as
    +** an argument and returns a pointer to the associated block of szPage
    +** bytes. The PAGE_TO_PGHDR1() macro does the opposite: its argument is
    +** a pointer to a block of szPage bytes of data and the return value is
    +** a pointer to the associated PgHdr1 structure.
    +**
    +**   assert( PGHDR1_TO_PAGE(PAGE_TO_PGHDR1(pCache, X))==X );
    +*/
    +#define PGHDR1_TO_PAGE(p)    (void*)(((char*)p) - p->pCache->szPage)
    +#define PAGE_TO_PGHDR1(c, p) (PgHdr1*)(((char*)p) + c->szPage)
    +
    +/*
    +** Macros to enter and leave the global LRU mutex.
    +*/
    +#define pcache1EnterMutex() sqlite3_mutex_enter(pcache1.mutex)
    +#define pcache1LeaveMutex() sqlite3_mutex_leave(pcache1.mutex)
    +
    +/******************************************************************************/
    +/******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/
    +
    +/*
    +** This function is called during initialization if a static buffer is 
    +** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE
    +** verb to sqlite3_config(). Parameter pBuf points to an allocation large
    +** enough to contain 'n' buffers of 'sz' bytes each.
    +*/
    +SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
    +  if( pcache1.isInit ){
    +    PgFreeslot *p;
    +    sz = ROUNDDOWN8(sz);
    +    pcache1.szSlot = sz;
    +    pcache1.pStart = pBuf;
    +    pcache1.pFree = 0;
    +    while( n-- ){
    +      p = (PgFreeslot*)pBuf;
    +      p->pNext = pcache1.pFree;
    +      pcache1.pFree = p;
    +      pBuf = (void*)&((char*)pBuf)[sz];
    +    }
    +    pcache1.pEnd = pBuf;
    +  }
    +}
    +
    +/*
    +** Malloc function used within this file to allocate space from the buffer
    +** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no 
    +** such buffer exists or there is no space left in it, this function falls 
    +** back to sqlite3Malloc().
    +*/
    +static void *pcache1Alloc(int nByte){
    +  void *p;
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +  if( nByte<=pcache1.szSlot && pcache1.pFree ){
    +    assert( pcache1.isInit );
    +    p = (PgHdr1 *)pcache1.pFree;
    +    pcache1.pFree = pcache1.pFree->pNext;
    +    sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
    +    sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_USED, 1);
    +  }else{
    +
    +    /* Allocate a new buffer using sqlite3Malloc. Before doing so, exit the
    +    ** global pcache mutex and unlock the pager-cache object pCache. This is 
    +    ** so that if the attempt to allocate a new buffer causes the the 
    +    ** configured soft-heap-limit to be breached, it will be possible to
    +    ** reclaim memory from this pager-cache.
    +    */
    +    pcache1LeaveMutex();
    +    p = sqlite3Malloc(nByte);
    +    pcache1EnterMutex();
    +    if( p ){
    +      int sz = sqlite3MallocSize(p);
    +      sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);
    +    }
    +  }
    +  return p;
    +}
    +
    +/*
    +** Free an allocated buffer obtained from pcache1Alloc().
    +*/
    +static void pcache1Free(void *p){
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +  if( p==0 ) return;
    +  if( p>=pcache1.pStart && p<pcache1.pEnd ){
    +    PgFreeslot *pSlot;
    +    sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_USED, -1);
    +    pSlot = (PgFreeslot*)p;
    +    pSlot->pNext = pcache1.pFree;
    +    pcache1.pFree = pSlot;
    +  }else{
    +    int iSize = sqlite3MallocSize(p);
    +    sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_OVERFLOW, -iSize);
    +    sqlite3_free(p);
    +  }
    +}
    +
    +/*
    +** Allocate a new page object initially associated with cache pCache.
    +*/
    +static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
    +  int nByte = sizeof(PgHdr1) + pCache->szPage;
    +  void *pPg = pcache1Alloc(nByte);
    +  PgHdr1 *p;
    +  if( pPg ){
    +    p = PAGE_TO_PGHDR1(pCache, pPg);
    +    if( pCache->bPurgeable ){
    +      pcache1.nCurrentPage++;
    +    }
    +  }else{
    +    p = 0;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Free a page object allocated by pcache1AllocPage().
    +**
    +** The pointer is allowed to be NULL, which is prudent.  But it turns out
    +** that the current implementation happens to never call this routine
    +** with a NULL pointer, so we mark the NULL test with ALWAYS().
    +*/
    +static void pcache1FreePage(PgHdr1 *p){
    +  if( ALWAYS(p) ){
    +    if( p->pCache->bPurgeable ){
    +      pcache1.nCurrentPage--;
    +    }
    +    pcache1Free(PGHDR1_TO_PAGE(p));
    +  }
    +}
    +
    +/*
    +** Malloc function used by SQLite to obtain space from the buffer configured
    +** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
    +** exists, this function falls back to sqlite3Malloc().
    +*/
    +SQLITE_PRIVATE void *sqlite3PageMalloc(int sz){
    +  void *p;
    +  pcache1EnterMutex();
    +  p = pcache1Alloc(sz);
    +  pcache1LeaveMutex();
    +  return p;
    +}
    +
    +/*
    +** Free an allocated buffer obtained from sqlite3PageMalloc().
    +*/
    +SQLITE_PRIVATE void sqlite3PageFree(void *p){
    +  pcache1EnterMutex();
    +  pcache1Free(p);
    +  pcache1LeaveMutex();
    +}
    +
    +/******************************************************************************/
    +/******** General Implementation Functions ************************************/
    +
    +/*
    +** This function is used to resize the hash table used by the cache passed
    +** as the first argument.
    +**
    +** The global mutex must be held when this function is called.
    +*/
    +static int pcache1ResizeHash(PCache1 *p){
    +  PgHdr1 **apNew;
    +  unsigned int nNew;
    +  unsigned int i;
    +
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +
    +  nNew = p->nHash*2;
    +  if( nNew<256 ){
    +    nNew = 256;
    +  }
    +
    +  pcache1LeaveMutex();
    +  if( p->nHash ){ sqlite3BeginBenignMalloc(); }
    +  apNew = (PgHdr1 **)sqlite3_malloc(sizeof(PgHdr1 *)*nNew);
    +  if( p->nHash ){ sqlite3EndBenignMalloc(); }
    +  pcache1EnterMutex();
    +  if( apNew ){
    +    memset(apNew, 0, sizeof(PgHdr1 *)*nNew);
    +    for(i=0; i<p->nHash; i++){
    +      PgHdr1 *pPage;
    +      PgHdr1 *pNext = p->apHash[i];
    +      while( (pPage = pNext)!=0 ){
    +        unsigned int h = pPage->iKey % nNew;
    +        pNext = pPage->pNext;
    +        pPage->pNext = apNew[h];
    +        apNew[h] = pPage;
    +      }
    +    }
    +    sqlite3_free(p->apHash);
    +    p->apHash = apNew;
    +    p->nHash = nNew;
    +  }
    +
    +  return (p->apHash ? SQLITE_OK : SQLITE_NOMEM);
    +}
    +
    +/*
    +** This function is used internally to remove the page pPage from the 
    +** global LRU list, if is part of it. If pPage is not part of the global
    +** LRU list, then this function is a no-op.
    +**
    +** The global mutex must be held when this function is called.
    +*/
    +static void pcache1PinPage(PgHdr1 *pPage){
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +  if( pPage && (pPage->pLruNext || pPage==pcache1.pLruTail) ){
    +    if( pPage->pLruPrev ){
    +      pPage->pLruPrev->pLruNext = pPage->pLruNext;
    +    }
    +    if( pPage->pLruNext ){
    +      pPage->pLruNext->pLruPrev = pPage->pLruPrev;
    +    }
    +    if( pcache1.pLruHead==pPage ){
    +      pcache1.pLruHead = pPage->pLruNext;
    +    }
    +    if( pcache1.pLruTail==pPage ){
    +      pcache1.pLruTail = pPage->pLruPrev;
    +    }
    +    pPage->pLruNext = 0;
    +    pPage->pLruPrev = 0;
    +    pPage->pCache->nRecyclable--;
    +  }
    +}
    +
    +
    +/*
    +** Remove the page supplied as an argument from the hash table 
    +** (PCache1.apHash structure) that it is currently stored in.
    +**
    +** The global mutex must be held when this function is called.
    +*/
    +static void pcache1RemoveFromHash(PgHdr1 *pPage){
    +  unsigned int h;
    +  PCache1 *pCache = pPage->pCache;
    +  PgHdr1 **pp;
    +
    +  h = pPage->iKey % pCache->nHash;
    +  for(pp=&pCache->apHash[h]; (*pp)!=pPage; pp=&(*pp)->pNext);
    +  *pp = (*pp)->pNext;
    +
    +  pCache->nPage--;
    +}
    +
    +/*
    +** If there are currently more than pcache.nMaxPage pages allocated, try
    +** to recycle pages to reduce the number allocated to pcache.nMaxPage.
    +*/
    +static void pcache1EnforceMaxPage(void){
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +  while( pcache1.nCurrentPage>pcache1.nMaxPage && pcache1.pLruTail ){
    +    PgHdr1 *p = pcache1.pLruTail;
    +    pcache1PinPage(p);
    +    pcache1RemoveFromHash(p);
    +    pcache1FreePage(p);
    +  }
    +}
    +
    +/*
    +** Discard all pages from cache pCache with a page number (key value) 
    +** greater than or equal to iLimit. Any pinned pages that meet this 
    +** criteria are unpinned before they are discarded.
    +**
    +** The global mutex must be held when this function is called.
    +*/
    +static void pcache1TruncateUnsafe(
    +  PCache1 *pCache, 
    +  unsigned int iLimit 
    +){
    +  TESTONLY( unsigned int nPage = 0; )      /* Used to assert pCache->nPage is correct */
    +  unsigned int h;
    +  assert( sqlite3_mutex_held(pcache1.mutex) );
    +  for(h=0; h<pCache->nHash; h++){
    +    PgHdr1 **pp = &pCache->apHash[h]; 
    +    PgHdr1 *pPage;
    +    while( (pPage = *pp)!=0 ){
    +      if( pPage->iKey>=iLimit ){
    +        pCache->nPage--;
    +        *pp = pPage->pNext;
    +        pcache1PinPage(pPage);
    +        pcache1FreePage(pPage);
    +      }else{
    +        pp = &pPage->pNext;
    +        TESTONLY( nPage++; )
    +      }
    +    }
    +  }
    +  assert( pCache->nPage==nPage );
    +}
    +
    +/******************************************************************************/
    +/******** sqlite3_pcache Methods **********************************************/
    +
    +/*
    +** Implementation of the sqlite3_pcache.xInit method.
    +*/
    +static int pcache1Init(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  assert( pcache1.isInit==0 );
    +  memset(&pcache1, 0, sizeof(pcache1));
    +  if( sqlite3GlobalConfig.bCoreMutex ){
    +    pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
    +  }
    +  pcache1.isInit = 1;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xShutdown method.
    +** Note that the static mutex allocated in xInit does 
    +** not need to be freed.
    +*/
    +static void pcache1Shutdown(void *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  assert( pcache1.isInit!=0 );
    +  memset(&pcache1, 0, sizeof(pcache1));
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xCreate method.
    +**
    +** Allocate a new cache.
    +*/
    +static sqlite3_pcache *pcache1Create(int szPage, int bPurgeable){
    +  PCache1 *pCache;
    +
    +  pCache = (PCache1 *)sqlite3_malloc(sizeof(PCache1));
    +  if( pCache ){
    +    memset(pCache, 0, sizeof(PCache1));
    +    pCache->szPage = szPage;
    +    pCache->bPurgeable = (bPurgeable ? 1 : 0);
    +    if( bPurgeable ){
    +      pCache->nMin = 10;
    +      pcache1EnterMutex();
    +      pcache1.nMinPage += pCache->nMin;
    +      pcache1LeaveMutex();
    +    }
    +  }
    +  return (sqlite3_pcache *)pCache;
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xCachesize method. 
    +**
    +** Configure the cache_size limit for a cache.
    +*/
    +static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
    +  PCache1 *pCache = (PCache1 *)p;
    +  if( pCache->bPurgeable ){
    +    pcache1EnterMutex();
    +    pcache1.nMaxPage += (nMax - pCache->nMax);
    +    pCache->nMax = nMax;
    +    pcache1EnforceMaxPage();
    +    pcache1LeaveMutex();
    +  }
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xPagecount method. 
    +*/
    +static int pcache1Pagecount(sqlite3_pcache *p){
    +  int n;
    +  pcache1EnterMutex();
    +  n = ((PCache1 *)p)->nPage;
    +  pcache1LeaveMutex();
    +  return n;
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xFetch method. 
    +**
    +** Fetch a page by key value.
    +**
    +** Whether or not a new page may be allocated by this function depends on
    +** the value of the createFlag argument.  0 means do not allocate a new
    +** page.  1 means allocate a new page if space is easily available.  2 
    +** means to try really hard to allocate a new page.
    +**
    +** For a non-purgeable cache (a cache used as the storage for an in-memory
    +** database) there is really no difference between createFlag 1 and 2.  So
    +** the calling function (pcache.c) will never have a createFlag of 1 on
    +** a non-purgable cache.
    +**
    +** There are three different approaches to obtaining space for a page,
    +** depending on the value of parameter createFlag (which may be 0, 1 or 2).
    +**
    +**   1. Regardless of the value of createFlag, the cache is searched for a 
    +**      copy of the requested page. If one is found, it is returned.
    +**
    +**   2. If createFlag==0 and the page is not already in the cache, NULL is
    +**      returned.
    +**
    +**   3. If createFlag is 1, and the page is not already in the cache,
    +**      and if either of the following are true, return NULL:
    +**
    +**       (a) the number of pages pinned by the cache is greater than
    +**           PCache1.nMax, or
    +**       (b) the number of pages pinned by the cache is greater than
    +**           the sum of nMax for all purgeable caches, less the sum of 
    +**           nMin for all other purgeable caches. 
    +**
    +**   4. If none of the first three conditions apply and the cache is marked
    +**      as purgeable, and if one of the following is true:
    +**
    +**       (a) The number of pages allocated for the cache is already 
    +**           PCache1.nMax, or
    +**
    +**       (b) The number of pages allocated for all purgeable caches is
    +**           already equal to or greater than the sum of nMax for all
    +**           purgeable caches,
    +**
    +**      then attempt to recycle a page from the LRU list. If it is the right
    +**      size, return the recycled buffer. Otherwise, free the buffer and
    +**      proceed to step 5. 
    +**
    +**   5. Otherwise, allocate and return a new page buffer.
    +*/
    +static void *pcache1Fetch(sqlite3_pcache *p, unsigned int iKey, int createFlag){
    +  unsigned int nPinned;
    +  PCache1 *pCache = (PCache1 *)p;
    +  PgHdr1 *pPage = 0;
    +
    +  assert( pCache->bPurgeable || createFlag!=1 );
    +  pcache1EnterMutex();
    +  if( createFlag==1 ) sqlite3BeginBenignMalloc();
    +
    +  /* Search the hash table for an existing entry. */
    +  if( pCache->nHash>0 ){
    +    unsigned int h = iKey % pCache->nHash;
    +    for(pPage=pCache->apHash[h]; pPage&&pPage->iKey!=iKey; pPage=pPage->pNext);
    +  }
    +
    +  if( pPage || createFlag==0 ){
    +    pcache1PinPage(pPage);
    +    goto fetch_out;
    +  }
    +
    +  /* Step 3 of header comment. */
    +  nPinned = pCache->nPage - pCache->nRecyclable;
    +  if( createFlag==1 && (
    +        nPinned>=(pcache1.nMaxPage+pCache->nMin-pcache1.nMinPage)
    +     || nPinned>=(pCache->nMax * 9 / 10)
    +  )){
    +    goto fetch_out;
    +  }
    +
    +  if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
    +    goto fetch_out;
    +  }
    +
    +  /* Step 4. Try to recycle a page buffer if appropriate. */
    +  if( pCache->bPurgeable && pcache1.pLruTail && (
    +     (pCache->nPage+1>=pCache->nMax) || pcache1.nCurrentPage>=pcache1.nMaxPage
    +  )){
    +    pPage = pcache1.pLruTail;
    +    pcache1RemoveFromHash(pPage);
    +    pcache1PinPage(pPage);
    +    if( pPage->pCache->szPage!=pCache->szPage ){
    +      pcache1FreePage(pPage);
    +      pPage = 0;
    +    }else{
    +      pcache1.nCurrentPage -= (pPage->pCache->bPurgeable - pCache->bPurgeable);
    +    }
    +  }
    +
    +  /* Step 5. If a usable page buffer has still not been found, 
    +  ** attempt to allocate a new one. 
    +  */
    +  if( !pPage ){
    +    pPage = pcache1AllocPage(pCache);
    +  }
    +
    +  if( pPage ){
    +    unsigned int h = iKey % pCache->nHash;
    +    pCache->nPage++;
    +    pPage->iKey = iKey;
    +    pPage->pNext = pCache->apHash[h];
    +    pPage->pCache = pCache;
    +    pPage->pLruPrev = 0;
    +    pPage->pLruNext = 0;
    +    *(void **)(PGHDR1_TO_PAGE(pPage)) = 0;
    +    pCache->apHash[h] = pPage;
    +  }
    +
    +fetch_out:
    +  if( pPage && iKey>pCache->iMaxKey ){
    +    pCache->iMaxKey = iKey;
    +  }
    +  if( createFlag==1 ) sqlite3EndBenignMalloc();
    +  pcache1LeaveMutex();
    +  return (pPage ? PGHDR1_TO_PAGE(pPage) : 0);
    +}
    +
    +
    +/*
    +** Implementation of the sqlite3_pcache.xUnpin method.
    +**
    +** Mark a page as unpinned (eligible for asynchronous recycling).
    +*/
    +static void pcache1Unpin(sqlite3_pcache *p, void *pPg, int reuseUnlikely){
    +  PCache1 *pCache = (PCache1 *)p;
    +  PgHdr1 *pPage = PAGE_TO_PGHDR1(pCache, pPg);
    + 
    +  assert( pPage->pCache==pCache );
    +  pcache1EnterMutex();
    +
    +  /* It is an error to call this function if the page is already 
    +  ** part of the global LRU list.
    +  */
    +  assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
    +  assert( pcache1.pLruHead!=pPage && pcache1.pLruTail!=pPage );
    +
    +  if( reuseUnlikely || pcache1.nCurrentPage>pcache1.nMaxPage ){
    +    pcache1RemoveFromHash(pPage);
    +    pcache1FreePage(pPage);
    +  }else{
    +    /* Add the page to the global LRU list. Normally, the page is added to
    +    ** the head of the list (last page to be recycled). However, if the 
    +    ** reuseUnlikely flag passed to this function is true, the page is added
    +    ** to the tail of the list (first page to be recycled).
    +    */
    +    if( pcache1.pLruHead ){
    +      pcache1.pLruHead->pLruPrev = pPage;
    +      pPage->pLruNext = pcache1.pLruHead;
    +      pcache1.pLruHead = pPage;
    +    }else{
    +      pcache1.pLruTail = pPage;
    +      pcache1.pLruHead = pPage;
    +    }
    +    pCache->nRecyclable++;
    +  }
    +
    +  pcache1LeaveMutex();
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xRekey method. 
    +*/
    +static void pcache1Rekey(
    +  sqlite3_pcache *p,
    +  void *pPg,
    +  unsigned int iOld,
    +  unsigned int iNew
    +){
    +  PCache1 *pCache = (PCache1 *)p;
    +  PgHdr1 *pPage = PAGE_TO_PGHDR1(pCache, pPg);
    +  PgHdr1 **pp;
    +  unsigned int h; 
    +  assert( pPage->iKey==iOld );
    +  assert( pPage->pCache==pCache );
    +
    +  pcache1EnterMutex();
    +
    +  h = iOld%pCache->nHash;
    +  pp = &pCache->apHash[h];
    +  while( (*pp)!=pPage ){
    +    pp = &(*pp)->pNext;
    +  }
    +  *pp = pPage->pNext;
    +
    +  h = iNew%pCache->nHash;
    +  pPage->iKey = iNew;
    +  pPage->pNext = pCache->apHash[h];
    +  pCache->apHash[h] = pPage;
    +
    +  /* The xRekey() interface is only used to move pages earlier in the
    +  ** database file (in order to move all free pages to the end of the
    +  ** file where they can be truncated off.)  Hence, it is not possible
    +  ** for the new page number to be greater than the largest previously
    +  ** fetched page.  But we retain the following test in case xRekey()
    +  ** begins to be used in different ways in the future.
    +  */
    +  if( NEVER(iNew>pCache->iMaxKey) ){
    +    pCache->iMaxKey = iNew;
    +  }
    +
    +  pcache1LeaveMutex();
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xTruncate method. 
    +**
    +** Discard all unpinned pages in the cache with a page number equal to
    +** or greater than parameter iLimit. Any pinned pages with a page number
    +** equal to or greater than iLimit are implicitly unpinned.
    +*/
    +static void pcache1Truncate(sqlite3_pcache *p, unsigned int iLimit){
    +  PCache1 *pCache = (PCache1 *)p;
    +  pcache1EnterMutex();
    +  if( iLimit<=pCache->iMaxKey ){
    +    pcache1TruncateUnsafe(pCache, iLimit);
    +    pCache->iMaxKey = iLimit-1;
    +  }
    +  pcache1LeaveMutex();
    +}
    +
    +/*
    +** Implementation of the sqlite3_pcache.xDestroy method. 
    +**
    +** Destroy a cache allocated using pcache1Create().
    +*/
    +static void pcache1Destroy(sqlite3_pcache *p){
    +  PCache1 *pCache = (PCache1 *)p;
    +  pcache1EnterMutex();
    +  pcache1TruncateUnsafe(pCache, 0);
    +  pcache1.nMaxPage -= pCache->nMax;
    +  pcache1.nMinPage -= pCache->nMin;
    +  pcache1EnforceMaxPage();
    +  pcache1LeaveMutex();
    +  sqlite3_free(pCache->apHash);
    +  sqlite3_free(pCache);
    +}
    +
    +/*
    +** This function is called during initialization (sqlite3_initialize()) to
    +** install the default pluggable cache module, assuming the user has not
    +** already provided an alternative.
    +*/
    +SQLITE_PRIVATE void sqlite3PCacheSetDefault(void){
    +  static sqlite3_pcache_methods defaultMethods = {
    +    0,                       /* pArg */
    +    pcache1Init,             /* xInit */
    +    pcache1Shutdown,         /* xShutdown */
    +    pcache1Create,           /* xCreate */
    +    pcache1Cachesize,        /* xCachesize */
    +    pcache1Pagecount,        /* xPagecount */
    +    pcache1Fetch,            /* xFetch */
    +    pcache1Unpin,            /* xUnpin */
    +    pcache1Rekey,            /* xRekey */
    +    pcache1Truncate,         /* xTruncate */
    +    pcache1Destroy           /* xDestroy */
    +  };
    +  sqlite3_config(SQLITE_CONFIG_PCACHE, &defaultMethods);
    +}
    +
    +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
    +/*
    +** This function is called to free superfluous dynamically allocated memory
    +** held by the pager system. Memory in use by any SQLite pager allocated
    +** by the current thread may be sqlite3_free()ed.
    +**
    +** nReq is the number of bytes of memory required. Once this much has
    +** been released, the function returns. The return value is the total number 
    +** of bytes of memory released.
    +*/
    +SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
    +  int nFree = 0;
    +  if( pcache1.pStart==0 ){
    +    PgHdr1 *p;
    +    pcache1EnterMutex();
    +    while( (nReq<0 || nFree<nReq) && (p=pcache1.pLruTail) ){
    +      nFree += sqlite3MallocSize(PGHDR1_TO_PAGE(p));
    +      pcache1PinPage(p);
    +      pcache1RemoveFromHash(p);
    +      pcache1FreePage(p);
    +    }
    +    pcache1LeaveMutex();
    +  }
    +  return nFree;
    +}
    +#endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */
    +
    +#ifdef SQLITE_TEST
    +/*
    +** This function is used by test procedures to inspect the internal state
    +** of the global cache.
    +*/
    +SQLITE_PRIVATE void sqlite3PcacheStats(
    +  int *pnCurrent,      /* OUT: Total number of pages cached */
    +  int *pnMax,          /* OUT: Global maximum cache size */
    +  int *pnMin,          /* OUT: Sum of PCache1.nMin for purgeable caches */
    +  int *pnRecyclable    /* OUT: Total number of pages available for recycling */
    +){
    +  PgHdr1 *p;
    +  int nRecyclable = 0;
    +  for(p=pcache1.pLruHead; p; p=p->pLruNext){
    +    nRecyclable++;
    +  }
    +  *pnCurrent = pcache1.nCurrentPage;
    +  *pnMax = pcache1.nMaxPage;
    +  *pnMin = pcache1.nMinPage;
    +  *pnRecyclable = nRecyclable;
    +}
    +#endif
    +
    +/************** End of pcache1.c *********************************************/
    +/************** Begin file rowset.c ******************************************/
    +/*
    +** 2008 December 3
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This module implements an object we call a "RowSet".
    +**
    +** The RowSet object is a collection of rowids.  Rowids
    +** are inserted into the RowSet in an arbitrary order.  Inserts
    +** can be intermixed with tests to see if a given rowid has been
    +** previously inserted into the RowSet.
    +**
    +** After all inserts are finished, it is possible to extract the
    +** elements of the RowSet in sorted order.  Once this extraction
    +** process has started, no new elements may be inserted.
    +**
    +** Hence, the primitive operations for a RowSet are:
    +**
    +**    CREATE
    +**    INSERT
    +**    TEST
    +**    SMALLEST
    +**    DESTROY
    +**
    +** The CREATE and DESTROY primitives are the constructor and destructor,
    +** obviously.  The INSERT primitive adds a new element to the RowSet.
    +** TEST checks to see if an element is already in the RowSet.  SMALLEST
    +** extracts the least value from the RowSet.
    +**
    +** The INSERT primitive might allocate additional memory.  Memory is
    +** allocated in chunks so most INSERTs do no allocation.  There is an 
    +** upper bound on the size of allocated memory.  No memory is freed
    +** until DESTROY.
    +**
    +** The TEST primitive includes a "batch" number.  The TEST primitive
    +** will only see elements that were inserted before the last change
    +** in the batch number.  In other words, if an INSERT occurs between
    +** two TESTs where the TESTs have the same batch nubmer, then the
    +** value added by the INSERT will not be visible to the second TEST.
    +** The initial batch number is zero, so if the very first TEST contains
    +** a non-zero batch number, it will see all prior INSERTs.
    +**
    +** No INSERTs may occurs after a SMALLEST.  An assertion will fail if
    +** that is attempted.
    +**
    +** The cost of an INSERT is roughly constant.  (Sometime new memory
    +** has to be allocated on an INSERT.)  The cost of a TEST with a new
    +** batch number is O(NlogN) where N is the number of elements in the RowSet.
    +** The cost of a TEST using the same batch number is O(logN).  The cost
    +** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST
    +** primitives are constant time.  The cost of DESTROY is O(N).
    +**
    +** There is an added cost of O(N) when switching between TEST and
    +** SMALLEST primitives.
    +**
    +** $Id: rowset.c,v 1.7 2009/05/22 01:00:13 drh Exp $
    +*/
    +
    +
    +/*
    +** Target size for allocation chunks.
    +*/
    +#define ROWSET_ALLOCATION_SIZE 1024
    +
    +/*
    +** The number of rowset entries per allocation chunk.
    +*/
    +#define ROWSET_ENTRY_PER_CHUNK  \
    +                       ((ROWSET_ALLOCATION_SIZE-8)/sizeof(struct RowSetEntry))
    +
    +/*
    +** Each entry in a RowSet is an instance of the following object.
    +*/
    +struct RowSetEntry {            
    +  i64 v;                        /* ROWID value for this entry */
    +  struct RowSetEntry *pRight;   /* Right subtree (larger entries) or list */
    +  struct RowSetEntry *pLeft;    /* Left subtree (smaller entries) */
    +};
    +
    +/*
    +** RowSetEntry objects are allocated in large chunks (instances of the
    +** following structure) to reduce memory allocation overhead.  The
    +** chunks are kept on a linked list so that they can be deallocated
    +** when the RowSet is destroyed.
    +*/
    +struct RowSetChunk {
    +  struct RowSetChunk *pNextChunk;        /* Next chunk on list of them all */
    +  struct RowSetEntry aEntry[ROWSET_ENTRY_PER_CHUNK]; /* Allocated entries */
    +};
    +
    +/*
    +** A RowSet in an instance of the following structure.
    +**
    +** A typedef of this structure if found in sqliteInt.h.
    +*/
    +struct RowSet {
    +  struct RowSetChunk *pChunk;    /* List of all chunk allocations */
    +  sqlite3 *db;                   /* The database connection */
    +  struct RowSetEntry *pEntry;    /* List of entries using pRight */
    +  struct RowSetEntry *pLast;     /* Last entry on the pEntry list */
    +  struct RowSetEntry *pFresh;    /* Source of new entry objects */
    +  struct RowSetEntry *pTree;     /* Binary tree of entries */
    +  u16 nFresh;                    /* Number of objects on pFresh */
    +  u8 isSorted;                   /* True if pEntry is sorted */
    +  u8 iBatch;                     /* Current insert batch */
    +};
    +
    +/*
    +** Turn bulk memory into a RowSet object.  N bytes of memory
    +** are available at pSpace.  The db pointer is used as a memory context
    +** for any subsequent allocations that need to occur.
    +** Return a pointer to the new RowSet object.
    +**
    +** It must be the case that N is sufficient to make a Rowset.  If not
    +** an assertion fault occurs.
    +** 
    +** If N is larger than the minimum, use the surplus as an initial
    +** allocation of entries available to be filled.
    +*/
    +SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
    +  RowSet *p;
    +  assert( N >= ROUND8(sizeof(*p)) );
    +  p = pSpace;
    +  p->pChunk = 0;
    +  p->db = db;
    +  p->pEntry = 0;
    +  p->pLast = 0;
    +  p->pTree = 0;
    +  p->pFresh = (struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);
    +  p->nFresh = (u16)((N - ROUND8(sizeof(*p)))/sizeof(struct RowSetEntry));
    +  p->isSorted = 1;
    +  p->iBatch = 0;
    +  return p;
    +}
    +
    +/*
    +** Deallocate all chunks from a RowSet.  This frees all memory that
    +** the RowSet has allocated over its lifetime.  This routine is
    +** the destructor for the RowSet.
    +*/
    +SQLITE_PRIVATE void sqlite3RowSetClear(RowSet *p){
    +  struct RowSetChunk *pChunk, *pNextChunk;
    +  for(pChunk=p->pChunk; pChunk; pChunk = pNextChunk){
    +    pNextChunk = pChunk->pNextChunk;
    +    sqlite3DbFree(p->db, pChunk);
    +  }
    +  p->pChunk = 0;
    +  p->nFresh = 0;
    +  p->pEntry = 0;
    +  p->pLast = 0;
    +  p->pTree = 0;
    +  p->isSorted = 1;
    +}
    +
    +/*
    +** Insert a new value into a RowSet.
    +**
    +** The mallocFailed flag of the database connection is set if a
    +** memory allocation fails.
    +*/
    +SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){
    +  struct RowSetEntry *pEntry;  /* The new entry */
    +  struct RowSetEntry *pLast;   /* The last prior entry */
    +  assert( p!=0 );
    +  if( p->nFresh==0 ){
    +    struct RowSetChunk *pNew;
    +    pNew = sqlite3DbMallocRaw(p->db, sizeof(*pNew));
    +    if( pNew==0 ){
    +      return;
    +    }
    +    pNew->pNextChunk = p->pChunk;
    +    p->pChunk = pNew;
    +    p->pFresh = pNew->aEntry;
    +    p->nFresh = ROWSET_ENTRY_PER_CHUNK;
    +  }
    +  pEntry = p->pFresh++;
    +  p->nFresh--;
    +  pEntry->v = rowid;
    +  pEntry->pRight = 0;
    +  pLast = p->pLast;
    +  if( pLast ){
    +    if( p->isSorted && rowid<=pLast->v ){
    +      p->isSorted = 0;
    +    }
    +    pLast->pRight = pEntry;
    +  }else{
    +    assert( p->pEntry==0 ); /* Fires if INSERT after SMALLEST */
    +    p->pEntry = pEntry;
    +  }
    +  p->pLast = pEntry;
    +}
    +
    +/*
    +** Merge two lists of RowSetEntry objects.  Remove duplicates.
    +**
    +** The input lists are connected via pRight pointers and are 
    +** assumed to each already be in sorted order.
    +*/
    +static struct RowSetEntry *rowSetMerge(
    +  struct RowSetEntry *pA,    /* First sorted list to be merged */
    +  struct RowSetEntry *pB     /* Second sorted list to be merged */
    +){
    +  struct RowSetEntry head;
    +  struct RowSetEntry *pTail;
    +
    +  pTail = &head;
    +  while( pA && pB ){
    +    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
    +    assert( pB->pRight==0 || pB->v<=pB->pRight->v );
    +    if( pA->v<pB->v ){
    +      pTail->pRight = pA;
    +      pA = pA->pRight;
    +      pTail = pTail->pRight;
    +    }else if( pB->v<pA->v ){
    +      pTail->pRight = pB;
    +      pB = pB->pRight;
    +      pTail = pTail->pRight;
    +    }else{
    +      pA = pA->pRight;
    +    }
    +  }
    +  if( pA ){
    +    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
    +    pTail->pRight = pA;
    +  }else{
    +    assert( pB==0 || pB->pRight==0 || pB->v<=pB->pRight->v );
    +    pTail->pRight = pB;
    +  }
    +  return head.pRight;
    +}
    +
    +/*
    +** Sort all elements on the pEntry list of the RowSet into ascending order.
    +*/ 
    +static void rowSetSort(RowSet *p){
    +  unsigned int i;
    +  struct RowSetEntry *pEntry;
    +  struct RowSetEntry *aBucket[40];
    +
    +  assert( p->isSorted==0 );
    +  memset(aBucket, 0, sizeof(aBucket));
    +  while( p->pEntry ){
    +    pEntry = p->pEntry;
    +    p->pEntry = pEntry->pRight;
    +    pEntry->pRight = 0;
    +    for(i=0; aBucket[i]; i++){
    +      pEntry = rowSetMerge(aBucket[i], pEntry);
    +      aBucket[i] = 0;
    +    }
    +    aBucket[i] = pEntry;
    +  }
    +  pEntry = 0;
    +  for(i=0; i<sizeof(aBucket)/sizeof(aBucket[0]); i++){
    +    pEntry = rowSetMerge(pEntry, aBucket[i]);
    +  }
    +  p->pEntry = pEntry;
    +  p->pLast = 0;
    +  p->isSorted = 1;
    +}
    +
    +
    +/*
    +** The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.
    +** Convert this tree into a linked list connected by the pRight pointers
    +** and return pointers to the first and last elements of the new list.
    +*/
    +static void rowSetTreeToList(
    +  struct RowSetEntry *pIn,         /* Root of the input tree */
    +  struct RowSetEntry **ppFirst,    /* Write head of the output list here */
    +  struct RowSetEntry **ppLast      /* Write tail of the output list here */
    +){
    +  assert( pIn!=0 );
    +  if( pIn->pLeft ){
    +    struct RowSetEntry *p;
    +    rowSetTreeToList(pIn->pLeft, ppFirst, &p);
    +    p->pRight = pIn;
    +  }else{
    +    *ppFirst = pIn;
    +  }
    +  if( pIn->pRight ){
    +    rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
    +  }else{
    +    *ppLast = pIn;
    +  }
    +  assert( (*ppLast)->pRight==0 );
    +}
    +
    +
    +/*
    +** Convert a sorted list of elements (connected by pRight) into a binary
    +** tree with depth of iDepth.  A depth of 1 means the tree contains a single
    +** node taken from the head of *ppList.  A depth of 2 means a tree with
    +** three nodes.  And so forth.
    +**
    +** Use as many entries from the input list as required and update the
    +** *ppList to point to the unused elements of the list.  If the input
    +** list contains too few elements, then construct an incomplete tree
    +** and leave *ppList set to NULL.
    +**
    +** Return a pointer to the root of the constructed binary tree.
    +*/
    +static struct RowSetEntry *rowSetNDeepTree(
    +  struct RowSetEntry **ppList,
    +  int iDepth
    +){
    +  struct RowSetEntry *p;         /* Root of the new tree */
    +  struct RowSetEntry *pLeft;     /* Left subtree */
    +  if( *ppList==0 ){
    +    return 0;
    +  }
    +  if( iDepth==1 ){
    +    p = *ppList;
    +    *ppList = p->pRight;
    +    p->pLeft = p->pRight = 0;
    +    return p;
    +  }
    +  pLeft = rowSetNDeepTree(ppList, iDepth-1);
    +  p = *ppList;
    +  if( p==0 ){
    +    return pLeft;
    +  }
    +  p->pLeft = pLeft;
    +  *ppList = p->pRight;
    +  p->pRight = rowSetNDeepTree(ppList, iDepth-1);
    +  return p;
    +}
    +
    +/*
    +** Convert a sorted list of elements into a binary tree. Make the tree
    +** as deep as it needs to be in order to contain the entire list.
    +*/
    +static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
    +  int iDepth;           /* Depth of the tree so far */
    +  struct RowSetEntry *p;       /* Current tree root */
    +  struct RowSetEntry *pLeft;   /* Left subtree */
    +
    +  assert( pList!=0 );
    +  p = pList;
    +  pList = p->pRight;
    +  p->pLeft = p->pRight = 0;
    +  for(iDepth=1; pList; iDepth++){
    +    pLeft = p;
    +    p = pList;
    +    pList = p->pRight;
    +    p->pLeft = pLeft;
    +    p->pRight = rowSetNDeepTree(&pList, iDepth);
    +  }
    +  return p;
    +}
    +
    +/*
    +** Convert the list in p->pEntry into a sorted list if it is not
    +** sorted already.  If there is a binary tree on p->pTree, then
    +** convert it into a list too and merge it into the p->pEntry list.
    +*/
    +static void rowSetToList(RowSet *p){
    +  if( !p->isSorted ){
    +    rowSetSort(p);
    +  }
    +  if( p->pTree ){
    +    struct RowSetEntry *pHead, *pTail;
    +    rowSetTreeToList(p->pTree, &pHead, &pTail);
    +    p->pTree = 0;
    +    p->pEntry = rowSetMerge(p->pEntry, pHead);
    +  }
    +}
    +
    +/*
    +** Extract the smallest element from the RowSet.
    +** Write the element into *pRowid.  Return 1 on success.  Return
    +** 0 if the RowSet is already empty.
    +**
    +** After this routine has been called, the sqlite3RowSetInsert()
    +** routine may not be called again.  
    +*/
    +SQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){
    +  rowSetToList(p);
    +  if( p->pEntry ){
    +    *pRowid = p->pEntry->v;
    +    p->pEntry = p->pEntry->pRight;
    +    if( p->pEntry==0 ){
    +      sqlite3RowSetClear(p);
    +    }
    +    return 1;
    +  }else{
    +    return 0;
    +  }
    +}
    +
    +/*
    +** Check to see if element iRowid was inserted into the the rowset as
    +** part of any insert batch prior to iBatch.  Return 1 or 0.
    +*/
    +SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, u8 iBatch, sqlite3_int64 iRowid){
    +  struct RowSetEntry *p;
    +  if( iBatch!=pRowSet->iBatch ){
    +    if( pRowSet->pEntry ){
    +      rowSetToList(pRowSet);
    +      pRowSet->pTree = rowSetListToTree(pRowSet->pEntry);
    +      pRowSet->pEntry = 0;
    +      pRowSet->pLast = 0;
    +    }
    +    pRowSet->iBatch = iBatch;
    +  }
    +  p = pRowSet->pTree;
    +  while( p ){
    +    if( p->v<iRowid ){
    +      p = p->pRight;
    +    }else if( p->v>iRowid ){
    +      p = p->pLeft;
    +    }else{
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/************** End of rowset.c **********************************************/
    +/************** Begin file pager.c *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the implementation of the page cache subsystem or "pager".
    +** 
    +** The pager is used to access a database disk file.  It implements
    +** atomic commit and rollback through the use of a journal file that
    +** is separate from the database file.  The pager also implements file
    +** locking to prevent two processes from writing the same database
    +** file simultaneously, or one process from reading the database while
    +** another is writing.
    +**
    +** @(#) $Id: pager.c,v 1.629 2009/08/10 17:48:57 drh Exp $
    +*/
    +#ifndef SQLITE_OMIT_DISKIO
    +
    +/*
    +** Macros for troubleshooting.  Normally turned off
    +*/
    +#if 0
    +int sqlite3PagerTrace=1;  /* True to enable tracing */
    +#define sqlite3DebugPrintf printf
    +#define PAGERTRACE(X)     if( sqlite3PagerTrace ){ sqlite3DebugPrintf X; }
    +#else
    +#define PAGERTRACE(X)
    +#endif
    +
    +/*
    +** The following two macros are used within the PAGERTRACE() macros above
    +** to print out file-descriptors. 
    +**
    +** PAGERID() takes a pointer to a Pager struct as its argument. The
    +** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file
    +** struct as its argument.
    +*/
    +#define PAGERID(p) ((int)(p->fd))
    +#define FILEHANDLEID(fd) ((int)fd)
    +
    +/*
    +** The page cache as a whole is always in one of the following
    +** states:
    +**
    +**   PAGER_UNLOCK        The page cache is not currently reading or 
    +**                       writing the database file.  There is no
    +**                       data held in memory.  This is the initial
    +**                       state.
    +**
    +**   PAGER_SHARED        The page cache is reading the database.
    +**                       Writing is not permitted.  There can be
    +**                       multiple readers accessing the same database
    +**                       file at the same time.
    +**
    +**   PAGER_RESERVED      This process has reserved the database for writing
    +**                       but has not yet made any changes.  Only one process
    +**                       at a time can reserve the database.  The original
    +**                       database file has not been modified so other
    +**                       processes may still be reading the on-disk
    +**                       database file.
    +**
    +**   PAGER_EXCLUSIVE     The page cache is writing the database.
    +**                       Access is exclusive.  No other processes or
    +**                       threads can be reading or writing while one
    +**                       process is writing.
    +**
    +**   PAGER_SYNCED        The pager moves to this state from PAGER_EXCLUSIVE
    +**                       after all dirty pages have been written to the
    +**                       database file and the file has been synced to
    +**                       disk. All that remains to do is to remove or
    +**                       truncate the journal file and the transaction 
    +**                       will be committed.
    +**
    +** The page cache comes up in PAGER_UNLOCK.  The first time a
    +** sqlite3PagerGet() occurs, the state transitions to PAGER_SHARED.
    +** After all pages have been released using sqlite_page_unref(),
    +** the state transitions back to PAGER_UNLOCK.  The first time
    +** that sqlite3PagerWrite() is called, the state transitions to
    +** PAGER_RESERVED.  (Note that sqlite3PagerWrite() can only be
    +** called on an outstanding page which means that the pager must
    +** be in PAGER_SHARED before it transitions to PAGER_RESERVED.)
    +** PAGER_RESERVED means that there is an open rollback journal.
    +** The transition to PAGER_EXCLUSIVE occurs before any changes
    +** are made to the database file, though writes to the rollback
    +** journal occurs with just PAGER_RESERVED.  After an sqlite3PagerRollback()
    +** or sqlite3PagerCommitPhaseTwo(), the state can go back to PAGER_SHARED,
    +** or it can stay at PAGER_EXCLUSIVE if we are in exclusive access mode.
    +*/
    +#define PAGER_UNLOCK      0
    +#define PAGER_SHARED      1   /* same as SHARED_LOCK */
    +#define PAGER_RESERVED    2   /* same as RESERVED_LOCK */
    +#define PAGER_EXCLUSIVE   4   /* same as EXCLUSIVE_LOCK */
    +#define PAGER_SYNCED      5
    +
    +/*
    +** A macro used for invoking the codec if there is one
    +*/
    +#ifdef SQLITE_HAS_CODEC
    +# define CODEC1(P,D,N,X,E) \
    +    if( P->xCodec && P->xCodec(P->pCodec,D,N,X)==0 ){ E; }
    +# define CODEC2(P,D,N,X,E,O) \
    +    if( P->xCodec==0 ){ O=(char*)D; }else \
    +    if( (O=(char*)(P->xCodec(P->pCodec,D,N,X)))==0 ){ E; }
    +#else
    +# define CODEC1(P,D,N,X,E)   /* NO-OP */
    +# define CODEC2(P,D,N,X,E,O) O=(char*)D
    +#endif
    +
    +/*
    +** The maximum allowed sector size. 64KiB. If the xSectorsize() method 
    +** returns a value larger than this, then MAX_SECTOR_SIZE is used instead.
    +** This could conceivably cause corruption following a power failure on
    +** such a system. This is currently an undocumented limit.
    +*/
    +#define MAX_SECTOR_SIZE 0x10000
    +
    +/*
    +** An instance of the following structure is allocated for each active
    +** savepoint and statement transaction in the system. All such structures
    +** are stored in the Pager.aSavepoint[] array, which is allocated and
    +** resized using sqlite3Realloc().
    +**
    +** When a savepoint is created, the PagerSavepoint.iHdrOffset field is
    +** set to 0. If a journal-header is written into the main journal while
    +** the savepoint is active, then iHdrOffset is set to the byte offset 
    +** immediately following the last journal record written into the main
    +** journal before the journal-header. This is required during savepoint
    +** rollback (see pagerPlaybackSavepoint()).
    +*/
    +typedef struct PagerSavepoint PagerSavepoint;
    +struct PagerSavepoint {
    +  i64 iOffset;                 /* Starting offset in main journal */
    +  i64 iHdrOffset;              /* See above */
    +  Bitvec *pInSavepoint;        /* Set of pages in this savepoint */
    +  Pgno nOrig;                  /* Original number of pages in file */
    +  Pgno iSubRec;                /* Index of first record in sub-journal */
    +};
    +
    +/*
    +** A open page cache is an instance of the following structure.
    +**
    +** errCode
    +**
    +**   Pager.errCode may be set to SQLITE_IOERR, SQLITE_CORRUPT, or
    +**   or SQLITE_FULL. Once one of the first three errors occurs, it persists
    +**   and is returned as the result of every major pager API call.  The
    +**   SQLITE_FULL return code is slightly different. It persists only until the
    +**   next successful rollback is performed on the pager cache. Also,
    +**   SQLITE_FULL does not affect the sqlite3PagerGet() and sqlite3PagerLookup()
    +**   APIs, they may still be used successfully.
    +**
    +** dbSizeValid, dbSize, dbOrigSize, dbFileSize
    +**
    +**   Managing the size of the database file in pages is a little complicated.
    +**   The variable Pager.dbSize contains the number of pages that the database
    +**   image currently contains. As the database image grows or shrinks this
    +**   variable is updated. The variable Pager.dbFileSize contains the number
    +**   of pages in the database file. This may be different from Pager.dbSize
    +**   if some pages have been appended to the database image but not yet written
    +**   out from the cache to the actual file on disk. Or if the image has been
    +**   truncated by an incremental-vacuum operation. The Pager.dbOrigSize variable
    +**   contains the number of pages in the database image when the current
    +**   transaction was opened. The contents of all three of these variables is
    +**   only guaranteed to be correct if the boolean Pager.dbSizeValid is true.
    +**
    +**   TODO: Under what conditions is dbSizeValid set? Cleared?
    +**
    +** changeCountDone
    +**
    +**   This boolean variable is used to make sure that the change-counter 
    +**   (the 4-byte header field at byte offset 24 of the database file) is 
    +**   not updated more often than necessary. 
    +**
    +**   It is set to true when the change-counter field is updated, which 
    +**   can only happen if an exclusive lock is held on the database file.
    +**   It is cleared (set to false) whenever an exclusive lock is 
    +**   relinquished on the database file. Each time a transaction is committed,
    +**   The changeCountDone flag is inspected. If it is true, the work of
    +**   updating the change-counter is omitted for the current transaction.
    +**
    +**   This mechanism means that when running in exclusive mode, a connection 
    +**   need only update the change-counter once, for the first transaction
    +**   committed.
    +**
    +** dbModified
    +**
    +**   The dbModified flag is set whenever a database page is dirtied.
    +**   It is cleared at the end of each transaction.
    +**
    +**   It is used when committing or otherwise ending a transaction. If
    +**   the dbModified flag is clear then less work has to be done.
    +**
    +** journalStarted
    +**
    +**   This flag is set whenever the the main journal is synced. 
    +**
    +**   The point of this flag is that it must be set after the 
    +**   first journal header in a journal file has been synced to disk.
    +**   After this has happened, new pages appended to the database 
    +**   do not need the PGHDR_NEED_SYNC flag set, as they do not need
    +**   to wait for a journal sync before they can be written out to
    +**   the database file (see function pager_write()).
    +**   
    +** setMaster
    +**
    +**   This variable is used to ensure that the master journal file name
    +**   (if any) is only written into the journal file once.
    +**
    +**   When committing a transaction, the master journal file name (if any)
    +**   may be written into the journal file while the pager is still in
    +**   PAGER_RESERVED state (see CommitPhaseOne() for the action). It
    +**   then attempts to upgrade to an exclusive lock. If this attempt
    +**   fails, then SQLITE_BUSY may be returned to the user and the user
    +**   may attempt to commit the transaction again later (calling
    +**   CommitPhaseOne() again). This flag is used to ensure that the 
    +**   master journal name is only written to the journal file the first
    +**   time CommitPhaseOne() is called.
    +**
    +** doNotSync
    +**
    +**   This variable is set and cleared by sqlite3PagerWrite().
    +**
    +** needSync
    +**
    +**   TODO: It might be easier to set this variable in writeJournalHdr()
    +**   and writeMasterJournal() only. Change its meaning to "unsynced data
    +**   has been written to the journal".
    +**
    +** subjInMemory
    +**
    +**   This is a boolean variable. If true, then any required sub-journal
    +**   is opened as an in-memory journal file. If false, then in-memory
    +**   sub-journals are only used for in-memory pager files.
    +*/
    +struct Pager {
    +  sqlite3_vfs *pVfs;          /* OS functions to use for IO */
    +  u8 exclusiveMode;           /* Boolean. True if locking_mode==EXCLUSIVE */
    +  u8 journalMode;             /* On of the PAGER_JOURNALMODE_* values */
    +  u8 useJournal;              /* Use a rollback journal on this file */
    +  u8 noReadlock;              /* Do not bother to obtain readlocks */
    +  u8 noSync;                  /* Do not sync the journal if true */
    +  u8 fullSync;                /* Do extra syncs of the journal for robustness */
    +  u8 sync_flags;              /* One of SYNC_NORMAL or SYNC_FULL */
    +  u8 tempFile;                /* zFilename is a temporary file */
    +  u8 readOnly;                /* True for a read-only database */
    +  u8 memDb;                   /* True to inhibit all file I/O */
    +
    +  /* The following block contains those class members that are dynamically
    +  ** modified during normal operations. The other variables in this structure
    +  ** are either constant throughout the lifetime of the pager, or else
    +  ** used to store configuration parameters that affect the way the pager 
    +  ** operates.
    +  **
    +  ** The 'state' variable is described in more detail along with the
    +  ** descriptions of the values it may take - PAGER_UNLOCK etc. Many of the
    +  ** other variables in this block are described in the comment directly 
    +  ** above this class definition.
    +  */
    +  u8 state;                   /* PAGER_UNLOCK, _SHARED, _RESERVED, etc. */
    +  u8 dbModified;              /* True if there are any changes to the Db */
    +  u8 needSync;                /* True if an fsync() is needed on the journal */
    +  u8 journalStarted;          /* True if header of journal is synced */
    +  u8 changeCountDone;         /* Set after incrementing the change-counter */
    +  u8 setMaster;               /* True if a m-j name has been written to jrnl */
    +  u8 doNotSync;               /* Boolean. While true, do not spill the cache */
    +  u8 dbSizeValid;             /* Set when dbSize is correct */
    +  u8 subjInMemory;            /* True to use in-memory sub-journals */
    +  Pgno dbSize;                /* Number of pages in the database */
    +  Pgno dbOrigSize;            /* dbSize before the current transaction */
    +  Pgno dbFileSize;            /* Number of pages in the database file */
    +  int errCode;                /* One of several kinds of errors */
    +  int nRec;                   /* Pages journalled since last j-header written */
    +  u32 cksumInit;              /* Quasi-random value added to every checksum */
    +  u32 nSubRec;                /* Number of records written to sub-journal */
    +  Bitvec *pInJournal;         /* One bit for each page in the database file */
    +  sqlite3_file *fd;           /* File descriptor for database */
    +  sqlite3_file *jfd;          /* File descriptor for main journal */
    +  sqlite3_file *sjfd;         /* File descriptor for sub-journal */
    +  i64 journalOff;             /* Current write offset in the journal file */
    +  i64 journalHdr;             /* Byte offset to previous journal header */
    +  PagerSavepoint *aSavepoint; /* Array of active savepoints */
    +  int nSavepoint;             /* Number of elements in aSavepoint[] */
    +  char dbFileVers[16];        /* Changes whenever database file changes */
    +  u32 sectorSize;             /* Assumed sector size during rollback */
    +
    +  u16 nExtra;                 /* Add this many bytes to each in-memory page */
    +  i16 nReserve;               /* Number of unused bytes at end of each page */
    +  u32 vfsFlags;               /* Flags for sqlite3_vfs.xOpen() */
    +  int pageSize;               /* Number of bytes in a page */
    +  Pgno mxPgno;                /* Maximum allowed size of the database */
    +  char *zFilename;            /* Name of the database file */
    +  char *zJournal;             /* Name of the journal file */
    +  int (*xBusyHandler)(void*); /* Function to call when busy */
    +  void *pBusyHandlerArg;      /* Context argument for xBusyHandler */
    +#ifdef SQLITE_TEST
    +  int nHit, nMiss;            /* Cache hits and missing */
    +  int nRead, nWrite;          /* Database pages read/written */
    +#endif
    +  void (*xReiniter)(DbPage*); /* Call this routine when reloading pages */
    +#ifdef SQLITE_HAS_CODEC
    +  void *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */
    +  void (*xCodecSizeChng)(void*,int,int); /* Notify of page size changes */
    +  void (*xCodecFree)(void*);             /* Destructor for the codec */
    +  void *pCodec;               /* First argument to xCodec... methods */
    +#endif
    +  char *pTmpSpace;            /* Pager.pageSize bytes of space for tmp use */
    +  i64 journalSizeLimit;       /* Size limit for persistent journal files */
    +  PCache *pPCache;            /* Pointer to page cache object */
    +  sqlite3_backup *pBackup;    /* Pointer to list of ongoing backup processes */
    +};
    +
    +/*
    +** The following global variables hold counters used for
    +** testing purposes only.  These variables do not exist in
    +** a non-testing build.  These variables are not thread-safe.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_pager_readdb_count = 0;    /* Number of full pages read from DB */
    +SQLITE_API int sqlite3_pager_writedb_count = 0;   /* Number of full pages written to DB */
    +SQLITE_API int sqlite3_pager_writej_count = 0;    /* Number of pages written to journal */
    +# define PAGER_INCR(v)  v++
    +#else
    +# define PAGER_INCR(v)
    +#endif
    +
    +
    +
    +/*
    +** Journal files begin with the following magic string.  The data
    +** was obtained from /dev/random.  It is used only as a sanity check.
    +**
    +** Since version 2.8.0, the journal format contains additional sanity
    +** checking information.  If the power fails while the journal is being
    +** written, semi-random garbage data might appear in the journal
    +** file after power is restored.  If an attempt is then made
    +** to roll the journal back, the database could be corrupted.  The additional
    +** sanity checking data is an attempt to discover the garbage in the
    +** journal and ignore it.
    +**
    +** The sanity checking information for the new journal format consists
    +** of a 32-bit checksum on each page of data.  The checksum covers both
    +** the page number and the pPager->pageSize bytes of data for the page.
    +** This cksum is initialized to a 32-bit random value that appears in the
    +** journal file right after the header.  The random initializer is important,
    +** because garbage data that appears at the end of a journal is likely
    +** data that was once in other files that have now been deleted.  If the
    +** garbage data came from an obsolete journal file, the checksums might
    +** be correct.  But by initializing the checksum to random value which
    +** is different for every journal, we minimize that risk.
    +*/
    +static const unsigned char aJournalMagic[] = {
    +  0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd7,
    +};
    +
    +/*
    +** The size of the of each page record in the journal is given by
    +** the following macro.
    +*/
    +#define JOURNAL_PG_SZ(pPager)  ((pPager->pageSize) + 8)
    +
    +/*
    +** The journal header size for this pager. This is usually the same 
    +** size as a single disk sector. See also setSectorSize().
    +*/
    +#define JOURNAL_HDR_SZ(pPager) (pPager->sectorSize)
    +
    +/*
    +** The macro MEMDB is true if we are dealing with an in-memory database.
    +** We do this as a macro so that if the SQLITE_OMIT_MEMORYDB macro is set,
    +** the value of MEMDB will be a constant and the compiler will optimize
    +** out code that would never execute.
    +*/
    +#ifdef SQLITE_OMIT_MEMORYDB
    +# define MEMDB 0
    +#else
    +# define MEMDB pPager->memDb
    +#endif
    +
    +/*
    +** The maximum legal page number is (2^31 - 1).
    +*/
    +#define PAGER_MAX_PGNO 2147483647
    +
    +#ifndef NDEBUG 
    +/*
    +** Usage:
    +**
    +**   assert( assert_pager_state(pPager) );
    +*/
    +static int assert_pager_state(Pager *pPager){
    +
    +  /* A temp-file is always in PAGER_EXCLUSIVE or PAGER_SYNCED state. */
    +  assert( pPager->tempFile==0 || pPager->state>=PAGER_EXCLUSIVE );
    +
    +  /* The changeCountDone flag is always set for temp-files */
    +  assert( pPager->tempFile==0 || pPager->changeCountDone );
    +
    +  return 1;
    +}
    +#endif
    +
    +/*
    +** Return true if it is necessary to write page *pPg into the sub-journal.
    +** A page needs to be written into the sub-journal if there exists one
    +** or more open savepoints for which:
    +**
    +**   * The page-number is less than or equal to PagerSavepoint.nOrig, and
    +**   * The bit corresponding to the page-number is not set in
    +**     PagerSavepoint.pInSavepoint.
    +*/
    +static int subjRequiresPage(PgHdr *pPg){
    +  Pgno pgno = pPg->pgno;
    +  Pager *pPager = pPg->pPager;
    +  int i;
    +  for(i=0; i<pPager->nSavepoint; i++){
    +    PagerSavepoint *p = &pPager->aSavepoint[i];
    +    if( p->nOrig>=pgno && 0==sqlite3BitvecTest(p->pInSavepoint, pgno) ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Return true if the page is already in the journal file.
    +*/
    +static int pageInJournal(PgHdr *pPg){
    +  return sqlite3BitvecTest(pPg->pPager->pInJournal, pPg->pgno);
    +}
    +
    +/*
    +** Read a 32-bit integer from the given file descriptor.  Store the integer
    +** that is read in *pRes.  Return SQLITE_OK if everything worked, or an
    +** error code is something goes wrong.
    +**
    +** All values are stored on disk as big-endian.
    +*/
    +static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
    +  unsigned char ac[4];
    +  int rc = sqlite3OsRead(fd, ac, sizeof(ac), offset);
    +  if( rc==SQLITE_OK ){
    +    *pRes = sqlite3Get4byte(ac);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Write a 32-bit integer into a string buffer in big-endian byte order.
    +*/
    +#define put32bits(A,B)  sqlite3Put4byte((u8*)A,B)
    +
    +/*
    +** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK
    +** on success or an error code is something goes wrong.
    +*/
    +static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
    +  char ac[4];
    +  put32bits(ac, val);
    +  return sqlite3OsWrite(fd, ac, 4, offset);
    +}
    +
    +/*
    +** The argument to this macro is a file descriptor (type sqlite3_file*).
    +** Return 0 if it is not open, or non-zero (but not 1) if it is.
    +**
    +** This is so that expressions can be written as:
    +**
    +**   if( isOpen(pPager->jfd) ){ ...
    +**
    +** instead of
    +**
    +**   if( pPager->jfd->pMethods ){ ...
    +*/
    +#define isOpen(pFd) ((pFd)->pMethods)
    +
    +/*
    +** If file pFd is open, call sqlite3OsUnlock() on it.
    +*/
    +static int osUnlock(sqlite3_file *pFd, int eLock){
    +  if( !isOpen(pFd) ){
    +    return SQLITE_OK;
    +  }
    +  return sqlite3OsUnlock(pFd, eLock);
    +}
    +
    +/*
    +** This function determines whether or not the atomic-write optimization
    +** can be used with this pager. The optimization can be used if:
    +**
    +**  (a) the value returned by OsDeviceCharacteristics() indicates that
    +**      a database page may be written atomically, and
    +**  (b) the value returned by OsSectorSize() is less than or equal
    +**      to the page size.
    +**
    +** The optimization is also always enabled for temporary files. It is
    +** an error to call this function if pPager is opened on an in-memory
    +** database.
    +**
    +** If the optimization cannot be used, 0 is returned. If it can be used,
    +** then the value returned is the size of the journal file when it
    +** contains rollback data for exactly one page.
    +*/
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +static int jrnlBufferSize(Pager *pPager){
    +  assert( !MEMDB );
    +  if( !pPager->tempFile ){
    +    int dc;                           /* Device characteristics */
    +    int nSector;                      /* Sector size */
    +    int szPage;                       /* Page size */
    +
    +    assert( isOpen(pPager->fd) );
    +    dc = sqlite3OsDeviceCharacteristics(pPager->fd);
    +    nSector = pPager->sectorSize;
    +    szPage = pPager->pageSize;
    +
    +    assert(SQLITE_IOCAP_ATOMIC512==(512>>8));
    +    assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));
    +    if( 0==(dc&(SQLITE_IOCAP_ATOMIC|(szPage>>8)) || nSector>szPage) ){
    +      return 0;
    +    }
    +  }
    +
    +  return JOURNAL_HDR_SZ(pPager) + JOURNAL_PG_SZ(pPager);
    +}
    +#endif
    +
    +/*
    +** If SQLITE_CHECK_PAGES is defined then we do some sanity checking
    +** on the cache using a hash function.  This is used for testing
    +** and debugging only.
    +*/
    +#ifdef SQLITE_CHECK_PAGES
    +/*
    +** Return a 32-bit hash of the page data for pPage.
    +*/
    +static u32 pager_datahash(int nByte, unsigned char *pData){
    +  u32 hash = 0;
    +  int i;
    +  for(i=0; i<nByte; i++){
    +    hash = (hash*1039) + pData[i];
    +  }
    +  return hash;
    +}
    +static u32 pager_pagehash(PgHdr *pPage){
    +  return pager_datahash(pPage->pPager->pageSize, (unsigned char *)pPage->pData);
    +}
    +static void pager_set_pagehash(PgHdr *pPage){
    +  pPage->pageHash = pager_pagehash(pPage);
    +}
    +
    +/*
    +** The CHECK_PAGE macro takes a PgHdr* as an argument. If SQLITE_CHECK_PAGES
    +** is defined, and NDEBUG is not defined, an assert() statement checks
    +** that the page is either dirty or still matches the calculated page-hash.
    +*/
    +#define CHECK_PAGE(x) checkPage(x)
    +static void checkPage(PgHdr *pPg){
    +  Pager *pPager = pPg->pPager;
    +  assert( !pPg->pageHash || pPager->errCode
    +      || (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );
    +}
    +
    +#else
    +#define pager_datahash(X,Y)  0
    +#define pager_pagehash(X)  0
    +#define CHECK_PAGE(x)
    +#endif  /* SQLITE_CHECK_PAGES */
    +
    +/*
    +** When this is called the journal file for pager pPager must be open.
    +** This function attempts to read a master journal file name from the 
    +** end of the file and, if successful, copies it into memory supplied 
    +** by the caller. See comments above writeMasterJournal() for the format
    +** used to store a master journal file name at the end of a journal file.
    +**
    +** zMaster must point to a buffer of at least nMaster bytes allocated by
    +** the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is
    +** enough space to write the master journal name). If the master journal
    +** name in the journal is longer than nMaster bytes (including a
    +** nul-terminator), then this is handled as if no master journal name
    +** were present in the journal.
    +**
    +** If a master journal file name is present at the end of the journal
    +** file, then it is copied into the buffer pointed to by zMaster. A
    +** nul-terminator byte is appended to the buffer following the master
    +** journal file name.
    +**
    +** If it is determined that no master journal file name is present 
    +** zMaster[0] is set to 0 and SQLITE_OK returned.
    +**
    +** If an error occurs while reading from the journal file, an SQLite
    +** error code is returned.
    +*/
    +static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
    +  int rc;                    /* Return code */
    +  u32 len;                   /* Length in bytes of master journal name */
    +  i64 szJ;                   /* Total size in bytes of journal file pJrnl */
    +  u32 cksum;                 /* MJ checksum value read from journal */
    +  u32 u;                     /* Unsigned loop counter */
    +  unsigned char aMagic[8];   /* A buffer to hold the magic header */
    +  zMaster[0] = '\0';
    +
    +  if( SQLITE_OK!=(rc = sqlite3OsFileSize(pJrnl, &szJ))
    +   || szJ<16
    +   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))
    +   || len>=nMaster 
    +   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))
    +   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))
    +   || memcmp(aMagic, aJournalMagic, 8)
    +   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, zMaster, len, szJ-16-len))
    +  ){
    +    return rc;
    +  }
    +
    +  /* See if the checksum matches the master journal name */
    +  for(u=0; u<len; u++){
    +    cksum -= zMaster[u];
    +  }
    +  if( cksum ){
    +    /* If the checksum doesn't add up, then one or more of the disk sectors
    +    ** containing the master journal filename is corrupted. This means
    +    ** definitely roll back, so just return SQLITE_OK and report a (nul)
    +    ** master-journal filename.
    +    */
    +    len = 0;
    +  }
    +  zMaster[len] = '\0';
    +   
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Return the offset of the sector boundary at or immediately 
    +** following the value in pPager->journalOff, assuming a sector 
    +** size of pPager->sectorSize bytes.
    +**
    +** i.e for a sector size of 512:
    +**
    +**   Pager.journalOff          Return value
    +**   ---------------------------------------
    +**   0                         0
    +**   512                       512
    +**   100                       512
    +**   2000                      2048
    +** 
    +*/
    +static i64 journalHdrOffset(Pager *pPager){
    +  i64 offset = 0;
    +  i64 c = pPager->journalOff;
    +  if( c ){
    +    offset = ((c-1)/JOURNAL_HDR_SZ(pPager) + 1) * JOURNAL_HDR_SZ(pPager);
    +  }
    +  assert( offset%JOURNAL_HDR_SZ(pPager)==0 );
    +  assert( offset>=c );
    +  assert( (offset-c)<JOURNAL_HDR_SZ(pPager) );
    +  return offset;
    +}
    +
    +/*
    +** The journal file must be open when this function is called.
    +**
    +** This function is a no-op if the journal file has not been written to
    +** within the current transaction (i.e. if Pager.journalOff==0).
    +**
    +** If doTruncate is non-zero or the Pager.journalSizeLimit variable is
    +** set to 0, then truncate the journal file to zero bytes in size. Otherwise,
    +** zero the 28-byte header at the start of the journal file. In either case, 
    +** if the pager is not in no-sync mode, sync the journal file immediately 
    +** after writing or truncating it.
    +**
    +** If Pager.journalSizeLimit is set to a positive, non-zero value, and
    +** following the truncation or zeroing described above the size of the 
    +** journal file in bytes is larger than this value, then truncate the
    +** journal file to Pager.journalSizeLimit bytes. The journal file does
    +** not need to be synced following this operation.
    +**
    +** If an IO error occurs, abandon processing and return the IO error code.
    +** Otherwise, return SQLITE_OK.
    +*/
    +static int zeroJournalHdr(Pager *pPager, int doTruncate){
    +  int rc = SQLITE_OK;                               /* Return code */
    +  assert( isOpen(pPager->jfd) );
    +  if( pPager->journalOff ){
    +    const i64 iLimit = pPager->journalSizeLimit;    /* Local cache of jsl */
    +
    +    IOTRACE(("JZEROHDR %p\n", pPager))
    +    if( doTruncate || iLimit==0 ){
    +      rc = sqlite3OsTruncate(pPager->jfd, 0);
    +    }else{
    +      static const char zeroHdr[28] = {0};
    +      rc = sqlite3OsWrite(pPager->jfd, zeroHdr, sizeof(zeroHdr), 0);
    +    }
    +    if( rc==SQLITE_OK && !pPager->noSync ){
    +      rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_DATAONLY|pPager->sync_flags);
    +    }
    +
    +    /* At this point the transaction is committed but the write lock 
    +    ** is still held on the file. If there is a size limit configured for 
    +    ** the persistent journal and the journal file currently consumes more
    +    ** space than that limit allows for, truncate it now. There is no need
    +    ** to sync the file following this operation.
    +    */
    +    if( rc==SQLITE_OK && iLimit>0 ){
    +      i64 sz;
    +      rc = sqlite3OsFileSize(pPager->jfd, &sz);
    +      if( rc==SQLITE_OK && sz>iLimit ){
    +        rc = sqlite3OsTruncate(pPager->jfd, iLimit);
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** The journal file must be open when this routine is called. A journal
    +** header (JOURNAL_HDR_SZ bytes) is written into the journal file at the
    +** current location.
    +**
    +** The format for the journal header is as follows:
    +** - 8 bytes: Magic identifying journal format.
    +** - 4 bytes: Number of records in journal, or -1 no-sync mode is on.
    +** - 4 bytes: Random number used for page hash.
    +** - 4 bytes: Initial database page count.
    +** - 4 bytes: Sector size used by the process that wrote this journal.
    +** - 4 bytes: Database page size.
    +** 
    +** Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.
    +*/
    +static int writeJournalHdr(Pager *pPager){
    +  int rc = SQLITE_OK;                 /* Return code */
    +  char *zHeader = pPager->pTmpSpace;  /* Temporary space used to build header */
    +  u32 nHeader = pPager->pageSize;     /* Size of buffer pointed to by zHeader */
    +  u32 nWrite;                         /* Bytes of header sector written */
    +  int ii;                             /* Loop counter */
    +
    +  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */
    +
    +  if( nHeader>JOURNAL_HDR_SZ(pPager) ){
    +    nHeader = JOURNAL_HDR_SZ(pPager);
    +  }
    +
    +  /* If there are active savepoints and any of them were created 
    +  ** since the most recent journal header was written, update the 
    +  ** PagerSavepoint.iHdrOffset fields now.
    +  */
    +  for(ii=0; ii<pPager->nSavepoint; ii++){
    +    if( pPager->aSavepoint[ii].iHdrOffset==0 ){
    +      pPager->aSavepoint[ii].iHdrOffset = pPager->journalOff;
    +    }
    +  }
    +
    +  pPager->journalHdr = pPager->journalOff = journalHdrOffset(pPager);
    +
    +  /* 
    +  ** Write the nRec Field - the number of page records that follow this
    +  ** journal header. Normally, zero is written to this value at this time.
    +  ** After the records are added to the journal (and the journal synced, 
    +  ** if in full-sync mode), the zero is overwritten with the true number
    +  ** of records (see syncJournal()).
    +  **
    +  ** A faster alternative is to write 0xFFFFFFFF to the nRec field. When
    +  ** reading the journal this value tells SQLite to assume that the
    +  ** rest of the journal file contains valid page records. This assumption
    +  ** is dangerous, as if a failure occurred whilst writing to the journal
    +  ** file it may contain some garbage data. There are two scenarios
    +  ** where this risk can be ignored:
    +  **
    +  **   * When the pager is in no-sync mode. Corruption can follow a
    +  **     power failure in this case anyway.
    +  **
    +  **   * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees
    +  **     that garbage data is never appended to the journal file.
    +  */
    +  assert( isOpen(pPager->fd) || pPager->noSync );
    +  if( (pPager->noSync) || (pPager->journalMode==PAGER_JOURNALMODE_MEMORY)
    +   || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_SAFE_APPEND) 
    +  ){
    +    memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
    +    put32bits(&zHeader[sizeof(aJournalMagic)], 0xffffffff);
    +  }else{
    +    memset(zHeader, 0, sizeof(aJournalMagic)+4);
    +  }
    +
    +  /* The random check-hash initialiser */ 
    +  sqlite3_randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
    +  put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);
    +  /* The initial database size */
    +  put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbOrigSize);
    +  /* The assumed sector size for this process */
    +  put32bits(&zHeader[sizeof(aJournalMagic)+12], pPager->sectorSize);
    +
    +  /* The page size */
    +  put32bits(&zHeader[sizeof(aJournalMagic)+16], pPager->pageSize);
    +
    +  /* Initializing the tail of the buffer is not necessary.  Everything
    +  ** works find if the following memset() is omitted.  But initializing
    +  ** the memory prevents valgrind from complaining, so we are willing to
    +  ** take the performance hit.
    +  */
    +  memset(&zHeader[sizeof(aJournalMagic)+20], 0,
    +         nHeader-(sizeof(aJournalMagic)+20));
    +
    +  /* In theory, it is only necessary to write the 28 bytes that the 
    +  ** journal header consumes to the journal file here. Then increment the 
    +  ** Pager.journalOff variable by JOURNAL_HDR_SZ so that the next 
    +  ** record is written to the following sector (leaving a gap in the file
    +  ** that will be implicitly filled in by the OS).
    +  **
    +  ** However it has been discovered that on some systems this pattern can 
    +  ** be significantly slower than contiguously writing data to the file,
    +  ** even if that means explicitly writing data to the block of 
    +  ** (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what
    +  ** is done. 
    +  **
    +  ** The loop is required here in case the sector-size is larger than the 
    +  ** database page size. Since the zHeader buffer is only Pager.pageSize
    +  ** bytes in size, more than one call to sqlite3OsWrite() may be required
    +  ** to populate the entire journal header sector.
    +  */ 
    +  for(nWrite=0; rc==SQLITE_OK&&nWrite<JOURNAL_HDR_SZ(pPager); nWrite+=nHeader){
    +    IOTRACE(("JHDR %p %lld %d\n", pPager, pPager->journalHdr, nHeader))
    +    rc = sqlite3OsWrite(pPager->jfd, zHeader, nHeader, pPager->journalOff);
    +    pPager->journalOff += nHeader;
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** The journal file must be open when this is called. A journal header file
    +** (JOURNAL_HDR_SZ bytes) is read from the current location in the journal
    +** file. The current location in the journal file is given by
    +** pPager->journalOff. See comments above function writeJournalHdr() for
    +** a description of the journal header format.
    +**
    +** If the header is read successfully, *pNRec is set to the number of
    +** page records following this header and *pDbSize is set to the size of the
    +** database before the transaction began, in pages. Also, pPager->cksumInit
    +** is set to the value read from the journal header. SQLITE_OK is returned
    +** in this case.
    +**
    +** If the journal header file appears to be corrupted, SQLITE_DONE is
    +** returned and *pNRec and *PDbSize are undefined.  If JOURNAL_HDR_SZ bytes
    +** cannot be read from the journal file an error code is returned.
    +*/
    +static int readJournalHdr(
    +  Pager *pPager,               /* Pager object */
    +  int isHot,
    +  i64 journalSize,             /* Size of the open journal file in bytes */
    +  u32 *pNRec,                  /* OUT: Value read from the nRec field */
    +  u32 *pDbSize                 /* OUT: Value of original database size field */
    +){
    +  int rc;                      /* Return code */
    +  unsigned char aMagic[8];     /* A buffer to hold the magic header */
    +  i64 iHdrOff;                 /* Offset of journal header being read */
    +
    +  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */
    +
    +  /* Advance Pager.journalOff to the start of the next sector. If the
    +  ** journal file is too small for there to be a header stored at this
    +  ** point, return SQLITE_DONE.
    +  */
    +  pPager->journalOff = journalHdrOffset(pPager);
    +  if( pPager->journalOff+JOURNAL_HDR_SZ(pPager) > journalSize ){
    +    return SQLITE_DONE;
    +  }
    +  iHdrOff = pPager->journalOff;
    +
    +  /* Read in the first 8 bytes of the journal header. If they do not match
    +  ** the  magic string found at the start of each journal header, return
    +  ** SQLITE_DONE. If an IO error occurs, return an error code. Otherwise,
    +  ** proceed.
    +  */
    +  if( isHot || iHdrOff!=pPager->journalHdr ){
    +    rc = sqlite3OsRead(pPager->jfd, aMagic, sizeof(aMagic), iHdrOff);
    +    if( rc ){
    +      return rc;
    +    }
    +    if( memcmp(aMagic, aJournalMagic, sizeof(aMagic))!=0 ){
    +      return SQLITE_DONE;
    +    }
    +  }
    +
    +  /* Read the first three 32-bit fields of the journal header: The nRec
    +  ** field, the checksum-initializer and the database size at the start
    +  ** of the transaction. Return an error code if anything goes wrong.
    +  */
    +  if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+8, pNRec))
    +   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+12, &pPager->cksumInit))
    +   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+16, pDbSize))
    +  ){
    +    return rc;
    +  }
    +
    +  if( pPager->journalOff==0 ){
    +    u32 iPageSize;               /* Page-size field of journal header */
    +    u32 iSectorSize;             /* Sector-size field of journal header */
    +    u16 iPageSize16;             /* Copy of iPageSize in 16-bit variable */
    +
    +    /* Read the page-size and sector-size journal header fields. */
    +    if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+20, &iSectorSize))
    +     || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+24, &iPageSize))
    +    ){
    +      return rc;
    +    }
    +
    +    /* Check that the values read from the page-size and sector-size fields
    +    ** are within range. To be 'in range', both values need to be a power
    +    ** of two greater than or equal to 512, and not greater than their 
    +    ** respective compile time maximum limits.
    +    */
    +    if( iPageSize<512                  || iSectorSize<512
    +     || iPageSize>SQLITE_MAX_PAGE_SIZE || iSectorSize>MAX_SECTOR_SIZE
    +     || ((iPageSize-1)&iPageSize)!=0   || ((iSectorSize-1)&iSectorSize)!=0 
    +    ){
    +      /* If the either the page-size or sector-size in the journal-header is 
    +      ** invalid, then the process that wrote the journal-header must have 
    +      ** crashed before the header was synced. In this case stop reading 
    +      ** the journal file here.
    +      */
    +      return SQLITE_DONE;
    +    }
    +
    +    /* Update the page-size to match the value read from the journal. 
    +    ** Use a testcase() macro to make sure that malloc failure within 
    +    ** PagerSetPagesize() is tested.
    +    */
    +    iPageSize16 = (u16)iPageSize;
    +    rc = sqlite3PagerSetPagesize(pPager, &iPageSize16, -1);
    +    testcase( rc!=SQLITE_OK );
    +    assert( rc!=SQLITE_OK || iPageSize16==(u16)iPageSize );
    +
    +    /* Update the assumed sector-size to match the value used by 
    +    ** the process that created this journal. If this journal was
    +    ** created by a process other than this one, then this routine
    +    ** is being called from within pager_playback(). The local value
    +    ** of Pager.sectorSize is restored at the end of that routine.
    +    */
    +    pPager->sectorSize = iSectorSize;
    +  }
    +
    +  pPager->journalOff += JOURNAL_HDR_SZ(pPager);
    +  return rc;
    +}
    +
    +
    +/*
    +** Write the supplied master journal name into the journal file for pager
    +** pPager at the current location. The master journal name must be the last
    +** thing written to a journal file. If the pager is in full-sync mode, the
    +** journal file descriptor is advanced to the next sector boundary before
    +** anything is written. The format is:
    +**
    +**   + 4 bytes: PAGER_MJ_PGNO.
    +**   + N bytes: Master journal filename in utf-8.
    +**   + 4 bytes: N (length of master journal name in bytes, no nul-terminator).
    +**   + 4 bytes: Master journal name checksum.
    +**   + 8 bytes: aJournalMagic[].
    +**
    +** The master journal page checksum is the sum of the bytes in the master
    +** journal name, where each byte is interpreted as a signed 8-bit integer.
    +**
    +** If zMaster is a NULL pointer (occurs for a single database transaction), 
    +** this call is a no-op.
    +*/
    +static int writeMasterJournal(Pager *pPager, const char *zMaster){
    +  int rc;                          /* Return code */
    +  int nMaster;                     /* Length of string zMaster */
    +  i64 iHdrOff;                     /* Offset of header in journal file */
    +  i64 jrnlSize;                    /* Size of journal file on disk */
    +  u32 cksum = 0;                   /* Checksum of string zMaster */
    +
    +  if( !zMaster || pPager->setMaster
    +   || pPager->journalMode==PAGER_JOURNALMODE_MEMORY 
    +   || pPager->journalMode==PAGER_JOURNALMODE_OFF 
    +  ){
    +    return SQLITE_OK;
    +  }
    +  pPager->setMaster = 1;
    +  assert( isOpen(pPager->jfd) );
    +
    +  /* Calculate the length in bytes and the checksum of zMaster */
    +  for(nMaster=0; zMaster[nMaster]; nMaster++){
    +    cksum += zMaster[nMaster];
    +  }
    +
    +  /* If in full-sync mode, advance to the next disk sector before writing
    +  ** the master journal name. This is in case the previous page written to
    +  ** the journal has already been synced.
    +  */
    +  if( pPager->fullSync ){
    +    pPager->journalOff = journalHdrOffset(pPager);
    +  }
    +  iHdrOff = pPager->journalOff;
    +
    +  /* Write the master journal data to the end of the journal file. If
    +  ** an error occurs, return the error code to the caller.
    +  */
    +  if( (0 != (rc = write32bits(pPager->jfd, iHdrOff, PAGER_MJ_PGNO(pPager))))
    +   || (0 != (rc = sqlite3OsWrite(pPager->jfd, zMaster, nMaster, iHdrOff+4)))
    +   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster, nMaster)))
    +   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster+4, cksum)))
    +   || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8, iHdrOff+4+nMaster+8)))
    +  ){
    +    return rc;
    +  }
    +  pPager->journalOff += (nMaster+20);
    +  pPager->needSync = !pPager->noSync;
    +
    +  /* If the pager is in peristent-journal mode, then the physical 
    +  ** journal-file may extend past the end of the master-journal name
    +  ** and 8 bytes of magic data just written to the file. This is 
    +  ** dangerous because the code to rollback a hot-journal file
    +  ** will not be able to find the master-journal name to determine 
    +  ** whether or not the journal is hot. 
    +  **
    +  ** Easiest thing to do in this scenario is to truncate the journal 
    +  ** file to the required size.
    +  */ 
    +  if( SQLITE_OK==(rc = sqlite3OsFileSize(pPager->jfd, &jrnlSize))
    +   && jrnlSize>pPager->journalOff
    +  ){
    +    rc = sqlite3OsTruncate(pPager->jfd, pPager->journalOff);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Find a page in the hash table given its page number. Return
    +** a pointer to the page or NULL if the requested page is not 
    +** already in memory.
    +*/
    +static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){
    +  PgHdr *p;                         /* Return value */
    +
    +  /* It is not possible for a call to PcacheFetch() with createFlag==0 to
    +  ** fail, since no attempt to allocate dynamic memory will be made.
    +  */
    +  (void)sqlite3PcacheFetch(pPager->pPCache, pgno, 0, &p);
    +  return p;
    +}
    +
    +/*
    +** Unless the pager is in error-state, discard all in-memory pages. If
    +** the pager is in error-state, then this call is a no-op.
    +**
    +** TODO: Why can we not reset the pager while in error state?
    +*/
    +static void pager_reset(Pager *pPager){
    +  if( SQLITE_OK==pPager->errCode ){
    +    sqlite3BackupRestart(pPager->pBackup);
    +    sqlite3PcacheClear(pPager->pPCache);
    +    pPager->dbSizeValid = 0;
    +  }
    +}
    +
    +/*
    +** Free all structures in the Pager.aSavepoint[] array and set both
    +** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
    +** if it is open and the pager is not in exclusive mode.
    +*/
    +static void releaseAllSavepoints(Pager *pPager){
    +  int ii;               /* Iterator for looping through Pager.aSavepoint */
    +  for(ii=0; ii<pPager->nSavepoint; ii++){
    +    sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
    +  }
    +  if( !pPager->exclusiveMode || sqlite3IsMemJournal(pPager->sjfd) ){
    +    sqlite3OsClose(pPager->sjfd);
    +  }
    +  sqlite3_free(pPager->aSavepoint);
    +  pPager->aSavepoint = 0;
    +  pPager->nSavepoint = 0;
    +  pPager->nSubRec = 0;
    +}
    +
    +/*
    +** Set the bit number pgno in the PagerSavepoint.pInSavepoint 
    +** bitvecs of all open savepoints. Return SQLITE_OK if successful
    +** or SQLITE_NOMEM if a malloc failure occurs.
    +*/
    +static int addToSavepointBitvecs(Pager *pPager, Pgno pgno){
    +  int ii;                   /* Loop counter */
    +  int rc = SQLITE_OK;       /* Result code */
    +
    +  for(ii=0; ii<pPager->nSavepoint; ii++){
    +    PagerSavepoint *p = &pPager->aSavepoint[ii];
    +    if( pgno<=p->nOrig ){
    +      rc |= sqlite3BitvecSet(p->pInSavepoint, pgno);
    +      testcase( rc==SQLITE_NOMEM );
    +      assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Unlock the database file. This function is a no-op if the pager
    +** is in exclusive mode.
    +**
    +** If the pager is currently in error state, discard the contents of 
    +** the cache and reset the Pager structure internal state. If there is
    +** an open journal-file, then the next time a shared-lock is obtained
    +** on the pager file (by this or any other process), it will be
    +** treated as a hot-journal and rolled back.
    +*/
    +static void pager_unlock(Pager *pPager){
    +  if( !pPager->exclusiveMode ){
    +    int rc;                      /* Return code */
    +
    +    /* Always close the journal file when dropping the database lock.
    +    ** Otherwise, another connection with journal_mode=delete might
    +    ** delete the file out from under us.
    +    */
    +    sqlite3OsClose(pPager->jfd);
    +    sqlite3BitvecDestroy(pPager->pInJournal);
    +    pPager->pInJournal = 0;
    +    releaseAllSavepoints(pPager);
    +
    +    /* If the file is unlocked, somebody else might change it. The
    +    ** values stored in Pager.dbSize etc. might become invalid if
    +    ** this happens. TODO: Really, this doesn't need to be cleared
    +    ** until the change-counter check fails in PagerSharedLock().
    +    */
    +    pPager->dbSizeValid = 0;
    +
    +    rc = osUnlock(pPager->fd, NO_LOCK);
    +    if( rc ){
    +      pPager->errCode = rc;
    +    }
    +    IOTRACE(("UNLOCK %p\n", pPager))
    +
    +    /* If Pager.errCode is set, the contents of the pager cache cannot be
    +    ** trusted. Now that the pager file is unlocked, the contents of the
    +    ** cache can be discarded and the error code safely cleared.
    +    */
    +    if( pPager->errCode ){
    +      if( rc==SQLITE_OK ){
    +        pPager->errCode = SQLITE_OK;
    +      }
    +      pager_reset(pPager);
    +    }
    +
    +    pPager->changeCountDone = 0;
    +    pPager->state = PAGER_UNLOCK;
    +  }
    +}
    +
    +/*
    +** This function should be called when an IOERR, CORRUPT or FULL error
    +** may have occurred. The first argument is a pointer to the pager 
    +** structure, the second the error-code about to be returned by a pager 
    +** API function. The value returned is a copy of the second argument 
    +** to this function. 
    +**
    +** If the second argument is SQLITE_IOERR, SQLITE_CORRUPT, or SQLITE_FULL
    +** the error becomes persistent. Until the persisten error is cleared,
    +** subsequent API calls on this Pager will immediately return the same 
    +** error code.
    +**
    +** A persistent error indicates that the contents of the pager-cache 
    +** cannot be trusted. This state can be cleared by completely discarding 
    +** the contents of the pager-cache. If a transaction was active when
    +** the persistent error occurred, then the rollback journal may need
    +** to be replayed to restore the contents of the database file (as if
    +** it were a hot-journal).
    +*/
    +static int pager_error(Pager *pPager, int rc){
    +  int rc2 = rc & 0xff;
    +  assert( rc==SQLITE_OK || !MEMDB );
    +  assert(
    +       pPager->errCode==SQLITE_FULL ||
    +       pPager->errCode==SQLITE_OK ||
    +       (pPager->errCode & 0xff)==SQLITE_IOERR
    +  );
    +  if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){
    +    pPager->errCode = rc;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Execute a rollback if a transaction is active and unlock the 
    +** database file. 
    +**
    +** If the pager has already entered the error state, do not attempt 
    +** the rollback at this time. Instead, pager_unlock() is called. The
    +** call to pager_unlock() will discard all in-memory pages, unlock
    +** the database file and clear the error state. If this means that
    +** there is a hot-journal left in the file-system, the next connection
    +** to obtain a shared lock on the pager (which may be this one) will
    +** roll it back.
    +**
    +** If the pager has not already entered the error state, but an IO or
    +** malloc error occurs during a rollback, then this will itself cause 
    +** the pager to enter the error state. Which will be cleared by the
    +** call to pager_unlock(), as described above.
    +*/
    +static void pagerUnlockAndRollback(Pager *pPager){
    +  if( pPager->errCode==SQLITE_OK && pPager->state>=PAGER_RESERVED ){
    +    sqlite3BeginBenignMalloc();
    +    sqlite3PagerRollback(pPager);
    +    sqlite3EndBenignMalloc();
    +  }
    +  pager_unlock(pPager);
    +}
    +
    +/*
    +** This routine ends a transaction. A transaction is usually ended by 
    +** either a COMMIT or a ROLLBACK operation. This routine may be called 
    +** after rollback of a hot-journal, or if an error occurs while opening
    +** the journal file or writing the very first journal-header of a
    +** database transaction.
    +** 
    +** If the pager is in PAGER_SHARED or PAGER_UNLOCK state when this
    +** routine is called, it is a no-op (returns SQLITE_OK).
    +**
    +** Otherwise, any active savepoints are released.
    +**
    +** If the journal file is open, then it is "finalized". Once a journal 
    +** file has been finalized it is not possible to use it to roll back a 
    +** transaction. Nor will it be considered to be a hot-journal by this
    +** or any other database connection. Exactly how a journal is finalized
    +** depends on whether or not the pager is running in exclusive mode and
    +** the current journal-mode (Pager.journalMode value), as follows:
    +**
    +**   journalMode==MEMORY
    +**     Journal file descriptor is simply closed. This destroys an 
    +**     in-memory journal.
    +**
    +**   journalMode==TRUNCATE
    +**     Journal file is truncated to zero bytes in size.
    +**
    +**   journalMode==PERSIST
    +**     The first 28 bytes of the journal file are zeroed. This invalidates
    +**     the first journal header in the file, and hence the entire journal
    +**     file. An invalid journal file cannot be rolled back.
    +**
    +**   journalMode==DELETE
    +**     The journal file is closed and deleted using sqlite3OsDelete().
    +**
    +**     If the pager is running in exclusive mode, this method of finalizing
    +**     the journal file is never used. Instead, if the journalMode is
    +**     DELETE and the pager is in exclusive mode, the method described under
    +**     journalMode==PERSIST is used instead.
    +**
    +** After the journal is finalized, if running in non-exclusive mode, the
    +** pager moves to PAGER_SHARED state (and downgrades the lock on the
    +** database file accordingly).
    +**
    +** If the pager is running in exclusive mode and is in PAGER_SYNCED state,
    +** it moves to PAGER_EXCLUSIVE. No locks are downgraded when running in
    +** exclusive mode.
    +**
    +** SQLITE_OK is returned if no error occurs. If an error occurs during
    +** any of the IO operations to finalize the journal file or unlock the
    +** database then the IO error code is returned to the user. If the 
    +** operation to finalize the journal file fails, then the code still
    +** tries to unlock the database file if not in exclusive mode. If the
    +** unlock operation fails as well, then the first error code related
    +** to the first error encountered (the journal finalization one) is
    +** returned.
    +*/
    +static int pager_end_transaction(Pager *pPager, int hasMaster){
    +  int rc = SQLITE_OK;      /* Error code from journal finalization operation */
    +  int rc2 = SQLITE_OK;     /* Error code from db file unlock operation */
    +
    +  if( pPager->state<PAGER_RESERVED ){
    +    return SQLITE_OK;
    +  }
    +  releaseAllSavepoints(pPager);
    +
    +  assert( isOpen(pPager->jfd) || pPager->pInJournal==0 );
    +  if( isOpen(pPager->jfd) ){
    +
    +    /* Finalize the journal file. */
    +    if( sqlite3IsMemJournal(pPager->jfd) ){
    +      assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY );
    +      sqlite3OsClose(pPager->jfd);
    +    }else if( pPager->journalMode==PAGER_JOURNALMODE_TRUNCATE ){
    +      if( pPager->journalOff==0 ){
    +        rc = SQLITE_OK;
    +      }else{
    +        rc = sqlite3OsTruncate(pPager->jfd, 0);
    +      }
    +      pPager->journalOff = 0;
    +      pPager->journalStarted = 0;
    +    }else if( pPager->exclusiveMode 
    +     || pPager->journalMode==PAGER_JOURNALMODE_PERSIST
    +    ){
    +      rc = zeroJournalHdr(pPager, hasMaster);
    +      pager_error(pPager, rc);
    +      pPager->journalOff = 0;
    +      pPager->journalStarted = 0;
    +    }else{
    +      /* This branch may be executed with Pager.journalMode==MEMORY if
    +      ** a hot-journal was just rolled back. In this case the journal
    +      ** file should be closed and deleted. If this connection writes to
    +      ** the database file, it will do so using an in-memory journal.  */
    +      assert( pPager->journalMode==PAGER_JOURNALMODE_DELETE 
    +           || pPager->journalMode==PAGER_JOURNALMODE_MEMORY 
    +      );
    +      sqlite3OsClose(pPager->jfd);
    +      if( !pPager->tempFile ){
    +        rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
    +      }
    +    }
    +
    +#ifdef SQLITE_CHECK_PAGES
    +    sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);
    +#endif
    +
    +    sqlite3PcacheCleanAll(pPager->pPCache);
    +    sqlite3BitvecDestroy(pPager->pInJournal);
    +    pPager->pInJournal = 0;
    +    pPager->nRec = 0;
    +  }
    +
    +  if( !pPager->exclusiveMode ){
    +    rc2 = osUnlock(pPager->fd, SHARED_LOCK);
    +    pPager->state = PAGER_SHARED;
    +    pPager->changeCountDone = 0;
    +  }else if( pPager->state==PAGER_SYNCED ){
    +    pPager->state = PAGER_EXCLUSIVE;
    +  }
    +  pPager->setMaster = 0;
    +  pPager->needSync = 0;
    +  pPager->dbModified = 0;
    +
    +  /* TODO: Is this optimal? Why is the db size invalidated here 
    +  ** when the database file is not unlocked? */
    +  pPager->dbOrigSize = 0;
    +  sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
    +  if( !MEMDB ){
    +    pPager->dbSizeValid = 0;
    +  }
    +
    +  return (rc==SQLITE_OK?rc2:rc);
    +}
    +
    +/*
    +** Parameter aData must point to a buffer of pPager->pageSize bytes
    +** of data. Compute and return a checksum based ont the contents of the 
    +** page of data and the current value of pPager->cksumInit.
    +**
    +** This is not a real checksum. It is really just the sum of the 
    +** random initial value (pPager->cksumInit) and every 200th byte
    +** of the page data, starting with byte offset (pPager->pageSize%200).
    +** Each byte is interpreted as an 8-bit unsigned integer.
    +**
    +** Changing the formula used to compute this checksum results in an
    +** incompatible journal file format.
    +**
    +** If journal corruption occurs due to a power failure, the most likely 
    +** scenario is that one end or the other of the record will be changed. 
    +** It is much less likely that the two ends of the journal record will be
    +** correct and the middle be corrupt.  Thus, this "checksum" scheme,
    +** though fast and simple, catches the mostly likely kind of corruption.
    +*/
    +static u32 pager_cksum(Pager *pPager, const u8 *aData){
    +  u32 cksum = pPager->cksumInit;         /* Checksum value to return */
    +  int i = pPager->pageSize-200;          /* Loop counter */
    +  while( i>0 ){
    +    cksum += aData[i];
    +    i -= 200;
    +  }
    +  return cksum;
    +}
    +
    +/*
    +** Read a single page from either the journal file (if isMainJrnl==1) or
    +** from the sub-journal (if isMainJrnl==0) and playback that page.
    +** The page begins at offset *pOffset into the file. The *pOffset
    +** value is increased to the start of the next page in the journal.
    +**
    +** The isMainJrnl flag is true if this is the main rollback journal and
    +** false for the statement journal.  The main rollback journal uses
    +** checksums - the statement journal does not.
    +**
    +** If the page number of the page record read from the (sub-)journal file
    +** is greater than the current value of Pager.dbSize, then playback is
    +** skipped and SQLITE_OK is returned.
    +**
    +** If pDone is not NULL, then it is a record of pages that have already
    +** been played back.  If the page at *pOffset has already been played back
    +** (if the corresponding pDone bit is set) then skip the playback.
    +** Make sure the pDone bit corresponding to the *pOffset page is set
    +** prior to returning.
    +**
    +** If the page record is successfully read from the (sub-)journal file
    +** and played back, then SQLITE_OK is returned. If an IO error occurs
    +** while reading the record from the (sub-)journal file or while writing
    +** to the database file, then the IO error code is returned. If data
    +** is successfully read from the (sub-)journal file but appears to be
    +** corrupted, SQLITE_DONE is returned. Data is considered corrupted in
    +** two circumstances:
    +** 
    +**   * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or
    +**   * If the record is being rolled back from the main journal file
    +**     and the checksum field does not match the record content.
    +**
    +** Neither of these two scenarios are possible during a savepoint rollback.
    +**
    +** If this is a savepoint rollback, then memory may have to be dynamically
    +** allocated by this function. If this is the case and an allocation fails,
    +** SQLITE_NOMEM is returned.
    +*/
    +static int pager_playback_one_page(
    +  Pager *pPager,                /* The pager being played back */
    +  int isMainJrnl,               /* 1 -> main journal. 0 -> sub-journal. */
    +  int isUnsync,                 /* True if reading from unsynced main journal */
    +  i64 *pOffset,                 /* Offset of record to playback */
    +  int isSavepnt,                /* True for a savepoint rollback */
    +  Bitvec *pDone                 /* Bitvec of pages already played back */
    +){
    +  int rc;
    +  PgHdr *pPg;                   /* An existing page in the cache */
    +  Pgno pgno;                    /* The page number of a page in journal */
    +  u32 cksum;                    /* Checksum used for sanity checking */
    +  u8 *aData;                    /* Temporary storage for the page */
    +  sqlite3_file *jfd;            /* The file descriptor for the journal file */
    +
    +  assert( (isMainJrnl&~1)==0 );      /* isMainJrnl is 0 or 1 */
    +  assert( (isSavepnt&~1)==0 );       /* isSavepnt is 0 or 1 */
    +  assert( isMainJrnl || pDone );     /* pDone always used on sub-journals */
    +  assert( isSavepnt || pDone==0 );   /* pDone never used on non-savepoint */
    +
    +  aData = (u8*)pPager->pTmpSpace;
    +  assert( aData );         /* Temp storage must have already been allocated */
    +
    +  /* Read the page number and page data from the journal or sub-journal
    +  ** file. Return an error code to the caller if an IO error occurs.
    +  */
    +  jfd = isMainJrnl ? pPager->jfd : pPager->sjfd;
    +  rc = read32bits(jfd, *pOffset, &pgno);
    +  if( rc!=SQLITE_OK ) return rc;
    +  rc = sqlite3OsRead(jfd, aData, pPager->pageSize, (*pOffset)+4);
    +  if( rc!=SQLITE_OK ) return rc;
    +  *pOffset += pPager->pageSize + 4 + isMainJrnl*4;
    +
    +  /* Sanity checking on the page.  This is more important that I originally
    +  ** thought.  If a power failure occurs while the journal is being written,
    +  ** it could cause invalid data to be written into the journal.  We need to
    +  ** detect this invalid data (with high probability) and ignore it.
    +  */
    +  if( pgno==0 || pgno==PAGER_MJ_PGNO(pPager) ){
    +    assert( !isSavepnt );
    +    return SQLITE_DONE;
    +  }
    +  if( pgno>(Pgno)pPager->dbSize || sqlite3BitvecTest(pDone, pgno) ){
    +    return SQLITE_OK;
    +  }
    +  if( isMainJrnl ){
    +    rc = read32bits(jfd, (*pOffset)-4, &cksum);
    +    if( rc ) return rc;
    +    if( !isSavepnt && pager_cksum(pPager, aData)!=cksum ){
    +      return SQLITE_DONE;
    +    }
    +  }
    +
    +  if( pDone && (rc = sqlite3BitvecSet(pDone, pgno))!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  assert( pPager->state==PAGER_RESERVED || pPager->state>=PAGER_EXCLUSIVE );
    +
    +  /* If the pager is in RESERVED state, then there must be a copy of this
    +  ** page in the pager cache. In this case just update the pager cache,
    +  ** not the database file. The page is left marked dirty in this case.
    +  **
    +  ** An exception to the above rule: If the database is in no-sync mode
    +  ** and a page is moved during an incremental vacuum then the page may
    +  ** not be in the pager cache. Later: if a malloc() or IO error occurs
    +  ** during a Movepage() call, then the page may not be in the cache
    +  ** either. So the condition described in the above paragraph is not
    +  ** assert()able.
    +  **
    +  ** If in EXCLUSIVE state, then we update the pager cache if it exists
    +  ** and the main file. The page is then marked not dirty.
    +  **
    +  ** Ticket #1171:  The statement journal might contain page content that is
    +  ** different from the page content at the start of the transaction.
    +  ** This occurs when a page is changed prior to the start of a statement
    +  ** then changed again within the statement.  When rolling back such a
    +  ** statement we must not write to the original database unless we know
    +  ** for certain that original page contents are synced into the main rollback
    +  ** journal.  Otherwise, a power loss might leave modified data in the
    +  ** database file without an entry in the rollback journal that can
    +  ** restore the database to its original form.  Two conditions must be
    +  ** met before writing to the database files. (1) the database must be
    +  ** locked.  (2) we know that the original page content is fully synced
    +  ** in the main journal either because the page is not in cache or else
    +  ** the page is marked as needSync==0.
    +  **
    +  ** 2008-04-14:  When attempting to vacuum a corrupt database file, it
    +  ** is possible to fail a statement on a database that does not yet exist.
    +  ** Do not attempt to write if database file has never been opened.
    +  */
    +  pPg = pager_lookup(pPager, pgno);
    +  assert( pPg || !MEMDB );
    +  PAGERTRACE(("PLAYBACK %d page %d hash(%08x) %s\n",
    +               PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, aData),
    +               (isMainJrnl?"main-journal":"sub-journal")
    +  ));
    +  if( (pPager->state>=PAGER_EXCLUSIVE)
    +   && (pPg==0 || 0==(pPg->flags&PGHDR_NEED_SYNC))
    +   && isOpen(pPager->fd)
    +   && !isUnsync
    +  ){
    +    i64 ofst = (pgno-1)*(i64)pPager->pageSize;
    +    rc = sqlite3OsWrite(pPager->fd, aData, pPager->pageSize, ofst);
    +    if( pgno>pPager->dbFileSize ){
    +      pPager->dbFileSize = pgno;
    +    }
    +    if( pPager->pBackup ){
    +      CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM);
    +      sqlite3BackupUpdate(pPager->pBackup, pgno, aData);
    +      CODEC1(pPager, aData, pgno, 0, rc=SQLITE_NOMEM);
    +    }
    +  }else if( !isMainJrnl && pPg==0 ){
    +    /* If this is a rollback of a savepoint and data was not written to
    +    ** the database and the page is not in-memory, there is a potential
    +    ** problem. When the page is next fetched by the b-tree layer, it 
    +    ** will be read from the database file, which may or may not be 
    +    ** current. 
    +    **
    +    ** There are a couple of different ways this can happen. All are quite
    +    ** obscure. When running in synchronous mode, this can only happen 
    +    ** if the page is on the free-list at the start of the transaction, then
    +    ** populated, then moved using sqlite3PagerMovepage().
    +    **
    +    ** The solution is to add an in-memory page to the cache containing
    +    ** the data just read from the sub-journal. Mark the page as dirty 
    +    ** and if the pager requires a journal-sync, then mark the page as 
    +    ** requiring a journal-sync before it is written.
    +    */
    +    assert( isSavepnt );
    +    if( (rc = sqlite3PagerAcquire(pPager, pgno, &pPg, 1))!=SQLITE_OK ){
    +      return rc;
    +    }
    +    pPg->flags &= ~PGHDR_NEED_READ;
    +    sqlite3PcacheMakeDirty(pPg);
    +  }
    +  if( pPg ){
    +    /* No page should ever be explicitly rolled back that is in use, except
    +    ** for page 1 which is held in use in order to keep the lock on the
    +    ** database active. However such a page may be rolled back as a result
    +    ** of an internal error resulting in an automatic call to
    +    ** sqlite3PagerRollback().
    +    */
    +    void *pData;
    +    pData = pPg->pData;
    +    memcpy(pData, aData, pPager->pageSize);
    +    pPager->xReiniter(pPg);
    +    if( isMainJrnl && (!isSavepnt || *pOffset<=pPager->journalHdr) ){
    +      /* If the contents of this page were just restored from the main 
    +      ** journal file, then its content must be as they were when the 
    +      ** transaction was first opened. In this case we can mark the page
    +      ** as clean, since there will be no need to write it out to the.
    +      **
    +      ** There is one exception to this rule. If the page is being rolled
    +      ** back as part of a savepoint (or statement) rollback from an 
    +      ** unsynced portion of the main journal file, then it is not safe
    +      ** to mark the page as clean. This is because marking the page as
    +      ** clean will clear the PGHDR_NEED_SYNC flag. Since the page is
    +      ** already in the journal file (recorded in Pager.pInJournal) and
    +      ** the PGHDR_NEED_SYNC flag is cleared, if the page is written to
    +      ** again within this transaction, it will be marked as dirty but
    +      ** the PGHDR_NEED_SYNC flag will not be set. It could then potentially
    +      ** be written out into the database file before its journal file
    +      ** segment is synced. If a crash occurs during or following this,
    +      ** database corruption may ensue.
    +      */
    +      sqlite3PcacheMakeClean(pPg);
    +    }
    +#ifdef SQLITE_CHECK_PAGES
    +    pPg->pageHash = pager_pagehash(pPg);
    +#endif
    +    /* If this was page 1, then restore the value of Pager.dbFileVers.
    +    ** Do this before any decoding. */
    +    if( pgno==1 ){
    +      memcpy(&pPager->dbFileVers, &((u8*)pData)[24],sizeof(pPager->dbFileVers));
    +    }
    +
    +    /* Decode the page just read from disk */
    +    CODEC1(pPager, pData, pPg->pgno, 3, rc=SQLITE_NOMEM);
    +    sqlite3PcacheRelease(pPg);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Parameter zMaster is the name of a master journal file. A single journal
    +** file that referred to the master journal file has just been rolled back.
    +** This routine checks if it is possible to delete the master journal file,
    +** and does so if it is.
    +**
    +** Argument zMaster may point to Pager.pTmpSpace. So that buffer is not 
    +** available for use within this function.
    +**
    +** When a master journal file is created, it is populated with the names 
    +** of all of its child journals, one after another, formatted as utf-8 
    +** encoded text. The end of each child journal file is marked with a 
    +** nul-terminator byte (0x00). i.e. the entire contents of a master journal
    +** file for a transaction involving two databases might be:
    +**
    +**   "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00"
    +**
    +** A master journal file may only be deleted once all of its child 
    +** journals have been rolled back.
    +**
    +** This function reads the contents of the master-journal file into 
    +** memory and loops through each of the child journal names. For
    +** each child journal, it checks if:
    +**
    +**   * if the child journal exists, and if so
    +**   * if the child journal contains a reference to master journal 
    +**     file zMaster
    +**
    +** If a child journal can be found that matches both of the criteria
    +** above, this function returns without doing anything. Otherwise, if
    +** no such child journal can be found, file zMaster is deleted from
    +** the file-system using sqlite3OsDelete().
    +**
    +** If an IO error within this function, an error code is returned. This
    +** function allocates memory by calling sqlite3Malloc(). If an allocation
    +** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors 
    +** occur, SQLITE_OK is returned.
    +**
    +** TODO: This function allocates a single block of memory to load
    +** the entire contents of the master journal file. This could be
    +** a couple of kilobytes or so - potentially larger than the page 
    +** size.
    +*/
    +static int pager_delmaster(Pager *pPager, const char *zMaster){
    +  sqlite3_vfs *pVfs = pPager->pVfs;
    +  int rc;                   /* Return code */
    +  sqlite3_file *pMaster;    /* Malloc'd master-journal file descriptor */
    +  sqlite3_file *pJournal;   /* Malloc'd child-journal file descriptor */
    +  char *zMasterJournal = 0; /* Contents of master journal file */
    +  i64 nMasterJournal;       /* Size of master journal file */
    +
    +  /* Allocate space for both the pJournal and pMaster file descriptors.
    +  ** If successful, open the master journal file for reading.
    +  */
    +  pMaster = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile * 2);
    +  pJournal = (sqlite3_file *)(((u8 *)pMaster) + pVfs->szOsFile);
    +  if( !pMaster ){
    +    rc = SQLITE_NOMEM;
    +  }else{
    +    const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MASTER_JOURNAL);
    +    rc = sqlite3OsOpen(pVfs, zMaster, pMaster, flags, 0);
    +  }
    +  if( rc!=SQLITE_OK ) goto delmaster_out;
    +
    +  rc = sqlite3OsFileSize(pMaster, &nMasterJournal);
    +  if( rc!=SQLITE_OK ) goto delmaster_out;
    +
    +  if( nMasterJournal>0 ){
    +    char *zJournal;
    +    char *zMasterPtr = 0;
    +    int nMasterPtr = pVfs->mxPathname+1;
    +
    +    /* Load the entire master journal file into space obtained from
    +    ** sqlite3_malloc() and pointed to by zMasterJournal. 
    +    */
    +    zMasterJournal = sqlite3Malloc((int)nMasterJournal + nMasterPtr + 1);
    +    if( !zMasterJournal ){
    +      rc = SQLITE_NOMEM;
    +      goto delmaster_out;
    +    }
    +    zMasterPtr = &zMasterJournal[nMasterJournal+1];
    +    rc = sqlite3OsRead(pMaster, zMasterJournal, (int)nMasterJournal, 0);
    +    if( rc!=SQLITE_OK ) goto delmaster_out;
    +    zMasterJournal[nMasterJournal] = 0;
    +
    +    zJournal = zMasterJournal;
    +    while( (zJournal-zMasterJournal)<nMasterJournal ){
    +      int exists;
    +      rc = sqlite3OsAccess(pVfs, zJournal, SQLITE_ACCESS_EXISTS, &exists);
    +      if( rc!=SQLITE_OK ){
    +        goto delmaster_out;
    +      }
    +      if( exists ){
    +        /* One of the journals pointed to by the master journal exists.
    +        ** Open it and check if it points at the master journal. If
    +        ** so, return without deleting the master journal file.
    +        */
    +        int c;
    +        int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL);
    +        rc = sqlite3OsOpen(pVfs, zJournal, pJournal, flags, 0);
    +        if( rc!=SQLITE_OK ){
    +          goto delmaster_out;
    +        }
    +
    +        rc = readMasterJournal(pJournal, zMasterPtr, nMasterPtr);
    +        sqlite3OsClose(pJournal);
    +        if( rc!=SQLITE_OK ){
    +          goto delmaster_out;
    +        }
    +
    +        c = zMasterPtr[0]!=0 && strcmp(zMasterPtr, zMaster)==0;
    +        if( c ){
    +          /* We have a match. Do not delete the master journal file. */
    +          goto delmaster_out;
    +        }
    +      }
    +      zJournal += (sqlite3Strlen30(zJournal)+1);
    +    }
    +  }
    +  
    +  rc = sqlite3OsDelete(pVfs, zMaster, 0);
    +
    +delmaster_out:
    +  if( zMasterJournal ){
    +    sqlite3_free(zMasterJournal);
    +  }  
    +  if( pMaster ){
    +    sqlite3OsClose(pMaster);
    +    assert( !isOpen(pJournal) );
    +  }
    +  sqlite3_free(pMaster);
    +  return rc;
    +}
    +
    +
    +/*
    +** This function is used to change the actual size of the database 
    +** file in the file-system. This only happens when committing a transaction,
    +** or rolling back a transaction (including rolling back a hot-journal).
    +**
    +** If the main database file is not open, or an exclusive lock is not
    +** held, this function is a no-op. Otherwise, the size of the file is
    +** changed to nPage pages (nPage*pPager->pageSize bytes). If the file
    +** on disk is currently larger than nPage pages, then use the VFS
    +** xTruncate() method to truncate it.
    +**
    +** Or, it might might be the case that the file on disk is smaller than 
    +** nPage pages. Some operating system implementations can get confused if 
    +** you try to truncate a file to some size that is larger than it 
    +** currently is, so detect this case and write a single zero byte to 
    +** the end of the new file instead.
    +**
    +** If successful, return SQLITE_OK. If an IO error occurs while modifying
    +** the database file, return the error code to the caller.
    +*/
    +static int pager_truncate(Pager *pPager, Pgno nPage){
    +  int rc = SQLITE_OK;
    +  if( pPager->state>=PAGER_EXCLUSIVE && isOpen(pPager->fd) ){
    +    i64 currentSize, newSize;
    +    /* TODO: Is it safe to use Pager.dbFileSize here? */
    +    rc = sqlite3OsFileSize(pPager->fd, &currentSize);
    +    newSize = pPager->pageSize*(i64)nPage;
    +    if( rc==SQLITE_OK && currentSize!=newSize ){
    +      if( currentSize>newSize ){
    +        rc = sqlite3OsTruncate(pPager->fd, newSize);
    +      }else{
    +        rc = sqlite3OsWrite(pPager->fd, "", 1, newSize-1);
    +      }
    +      if( rc==SQLITE_OK ){
    +        pPager->dbFileSize = nPage;
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Set the value of the Pager.sectorSize variable for the given
    +** pager based on the value returned by the xSectorSize method
    +** of the open database file. The sector size will be used used 
    +** to determine the size and alignment of journal header and 
    +** master journal pointers within created journal files.
    +**
    +** For temporary files the effective sector size is always 512 bytes.
    +**
    +** Otherwise, for non-temporary files, the effective sector size is
    +** the value returned by the xSectorSize() method rounded up to 512 if
    +** it is less than 512, or rounded down to MAX_SECTOR_SIZE if it
    +** is greater than MAX_SECTOR_SIZE.
    +*/
    +static void setSectorSize(Pager *pPager){
    +  assert( isOpen(pPager->fd) || pPager->tempFile );
    +
    +  if( !pPager->tempFile ){
    +    /* Sector size doesn't matter for temporary files. Also, the file
    +    ** may not have been opened yet, in which case the OsSectorSize()
    +    ** call will segfault.
    +    */
    +    pPager->sectorSize = sqlite3OsSectorSize(pPager->fd);
    +  }
    +  if( pPager->sectorSize<512 ){
    +    pPager->sectorSize = 512;
    +  }
    +  if( pPager->sectorSize>MAX_SECTOR_SIZE ){
    +    assert( MAX_SECTOR_SIZE>=512 );
    +    pPager->sectorSize = MAX_SECTOR_SIZE;
    +  }
    +}
    +
    +/*
    +** Playback the journal and thus restore the database file to
    +** the state it was in before we started making changes.  
    +**
    +** The journal file format is as follows: 
    +**
    +**  (1)  8 byte prefix.  A copy of aJournalMagic[].
    +**  (2)  4 byte big-endian integer which is the number of valid page records
    +**       in the journal.  If this value is 0xffffffff, then compute the
    +**       number of page records from the journal size.
    +**  (3)  4 byte big-endian integer which is the initial value for the 
    +**       sanity checksum.
    +**  (4)  4 byte integer which is the number of pages to truncate the
    +**       database to during a rollback.
    +**  (5)  4 byte big-endian integer which is the sector size.  The header
    +**       is this many bytes in size.
    +**  (6)  4 byte big-endian integer which is the page size.
    +**  (7)  zero padding out to the next sector size.
    +**  (8)  Zero or more pages instances, each as follows:
    +**        +  4 byte page number.
    +**        +  pPager->pageSize bytes of data.
    +**        +  4 byte checksum
    +**
    +** When we speak of the journal header, we mean the first 7 items above.
    +** Each entry in the journal is an instance of the 8th item.
    +**
    +** Call the value from the second bullet "nRec".  nRec is the number of
    +** valid page entries in the journal.  In most cases, you can compute the
    +** value of nRec from the size of the journal file.  But if a power
    +** failure occurred while the journal was being written, it could be the
    +** case that the size of the journal file had already been increased but
    +** the extra entries had not yet made it safely to disk.  In such a case,
    +** the value of nRec computed from the file size would be too large.  For
    +** that reason, we always use the nRec value in the header.
    +**
    +** If the nRec value is 0xffffffff it means that nRec should be computed
    +** from the file size.  This value is used when the user selects the
    +** no-sync option for the journal.  A power failure could lead to corruption
    +** in this case.  But for things like temporary table (which will be
    +** deleted when the power is restored) we don't care.  
    +**
    +** If the file opened as the journal file is not a well-formed
    +** journal file then all pages up to the first corrupted page are rolled
    +** back (or no pages if the journal header is corrupted). The journal file
    +** is then deleted and SQLITE_OK returned, just as if no corruption had
    +** been encountered.
    +**
    +** If an I/O or malloc() error occurs, the journal-file is not deleted
    +** and an error code is returned.
    +**
    +** The isHot parameter indicates that we are trying to rollback a journal
    +** that might be a hot journal.  Or, it could be that the journal is 
    +** preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.
    +** If the journal really is hot, reset the pager cache prior rolling
    +** back any content.  If the journal is merely persistent, no reset is
    +** needed.
    +*/
    +static int pager_playback(Pager *pPager, int isHot){
    +  sqlite3_vfs *pVfs = pPager->pVfs;
    +  i64 szJ;                 /* Size of the journal file in bytes */
    +  u32 nRec;                /* Number of Records in the journal */
    +  u32 u;                   /* Unsigned loop counter */
    +  Pgno mxPg = 0;           /* Size of the original file in pages */
    +  int rc;                  /* Result code of a subroutine */
    +  int res = 1;             /* Value returned by sqlite3OsAccess() */
    +  char *zMaster = 0;       /* Name of master journal file if any */
    +  int needPagerReset;      /* True to reset page prior to first page rollback */
    +
    +  /* Figure out how many records are in the journal.  Abort early if
    +  ** the journal is empty.
    +  */
    +  assert( isOpen(pPager->jfd) );
    +  rc = sqlite3OsFileSize(pPager->jfd, &szJ);
    +  if( rc!=SQLITE_OK || szJ==0 ){
    +    goto end_playback;
    +  }
    +
    +  /* Read the master journal name from the journal, if it is present.
    +  ** If a master journal file name is specified, but the file is not
    +  ** present on disk, then the journal is not hot and does not need to be
    +  ** played back.
    +  **
    +  ** TODO: Technically the following is an error because it assumes that
    +  ** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that
    +  ** (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c,
    +  **  mxPathname is 512, which is the same as the minimum allowable value
    +  ** for pageSize.
    +  */
    +  zMaster = pPager->pTmpSpace;
    +  rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
    +  if( rc==SQLITE_OK && zMaster[0] ){
    +    rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS, &res);
    +  }
    +  zMaster = 0;
    +  if( rc!=SQLITE_OK || !res ){
    +    goto end_playback;
    +  }
    +  pPager->journalOff = 0;
    +  needPagerReset = isHot;
    +
    +  /* This loop terminates either when a readJournalHdr() or 
    +  ** pager_playback_one_page() call returns SQLITE_DONE or an IO error 
    +  ** occurs. 
    +  */
    +  while( 1 ){
    +    int isUnsync = 0;
    +
    +    /* Read the next journal header from the journal file.  If there are
    +    ** not enough bytes left in the journal file for a complete header, or
    +    ** it is corrupted, then a process must of failed while writing it.
    +    ** This indicates nothing more needs to be rolled back.
    +    */
    +    rc = readJournalHdr(pPager, isHot, szJ, &nRec, &mxPg);
    +    if( rc!=SQLITE_OK ){ 
    +      if( rc==SQLITE_DONE ){
    +        rc = SQLITE_OK;
    +      }
    +      goto end_playback;
    +    }
    +
    +    /* If nRec is 0xffffffff, then this journal was created by a process
    +    ** working in no-sync mode. This means that the rest of the journal
    +    ** file consists of pages, there are no more journal headers. Compute
    +    ** the value of nRec based on this assumption.
    +    */
    +    if( nRec==0xffffffff ){
    +      assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) );
    +      nRec = (int)((szJ - JOURNAL_HDR_SZ(pPager))/JOURNAL_PG_SZ(pPager));
    +    }
    +
    +    /* If nRec is 0 and this rollback is of a transaction created by this
    +    ** process and if this is the final header in the journal, then it means
    +    ** that this part of the journal was being filled but has not yet been
    +    ** synced to disk.  Compute the number of pages based on the remaining
    +    ** size of the file.
    +    **
    +    ** The third term of the test was added to fix ticket #2565.
    +    ** When rolling back a hot journal, nRec==0 always means that the next
    +    ** chunk of the journal contains zero pages to be rolled back.  But
    +    ** when doing a ROLLBACK and the nRec==0 chunk is the last chunk in
    +    ** the journal, it means that the journal might contain additional
    +    ** pages that need to be rolled back and that the number of pages 
    +    ** should be computed based on the journal file size.
    +    */
    +    if( nRec==0 && !isHot &&
    +        pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff ){
    +      nRec = (int)((szJ - pPager->journalOff) / JOURNAL_PG_SZ(pPager));
    +      isUnsync = 1;
    +    }
    +
    +    /* If this is the first header read from the journal, truncate the
    +    ** database file back to its original size.
    +    */
    +    if( pPager->journalOff==JOURNAL_HDR_SZ(pPager) ){
    +      rc = pager_truncate(pPager, mxPg);
    +      if( rc!=SQLITE_OK ){
    +        goto end_playback;
    +      }
    +      pPager->dbSize = mxPg;
    +    }
    +
    +    /* Copy original pages out of the journal and back into the 
    +    ** database file and/or page cache.
    +    */
    +    for(u=0; u<nRec; u++){
    +      if( needPagerReset ){
    +        pager_reset(pPager);
    +        needPagerReset = 0;
    +      }
    +      rc = pager_playback_one_page(pPager,1,isUnsync,&pPager->journalOff,0,0);
    +      if( rc!=SQLITE_OK ){
    +        if( rc==SQLITE_DONE ){
    +          rc = SQLITE_OK;
    +          pPager->journalOff = szJ;
    +          break;
    +        }else{
    +          /* If we are unable to rollback, quit and return the error
    +          ** code.  This will cause the pager to enter the error state
    +          ** so that no further harm will be done.  Perhaps the next
    +          ** process to come along will be able to rollback the database.
    +          */
    +          goto end_playback;
    +        }
    +      }
    +    }
    +  }
    +  /*NOTREACHED*/
    +  assert( 0 );
    +
    +end_playback:
    +  /* Following a rollback, the database file should be back in its original
    +  ** state prior to the start of the transaction, so invoke the
    +  ** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the
    +  ** assertion that the transaction counter was modified.
    +  */
    +  assert(
    +    pPager->fd->pMethods==0 ||
    +    sqlite3OsFileControl(pPager->fd,SQLITE_FCNTL_DB_UNCHANGED,0)>=SQLITE_OK
    +  );
    +
    +  /* If this playback is happening automatically as a result of an IO or 
    +  ** malloc error that occurred after the change-counter was updated but 
    +  ** before the transaction was committed, then the change-counter 
    +  ** modification may just have been reverted. If this happens in exclusive 
    +  ** mode, then subsequent transactions performed by the connection will not
    +  ** update the change-counter at all. This may lead to cache inconsistency
    +  ** problems for other processes at some point in the future. So, just
    +  ** in case this has happened, clear the changeCountDone flag now.
    +  */
    +  pPager->changeCountDone = pPager->tempFile;
    +
    +  if( rc==SQLITE_OK ){
    +    zMaster = pPager->pTmpSpace;
    +    rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
    +    testcase( rc!=SQLITE_OK );
    +  }
    +  if( rc==SQLITE_OK ){
    +    rc = pager_end_transaction(pPager, zMaster[0]!='\0');
    +    testcase( rc!=SQLITE_OK );
    +  }
    +  if( rc==SQLITE_OK && zMaster[0] && res ){
    +    /* If there was a master journal and this routine will return success,
    +    ** see if it is possible to delete the master journal.
    +    */
    +    rc = pager_delmaster(pPager, zMaster);
    +    testcase( rc!=SQLITE_OK );
    +  }
    +
    +  /* The Pager.sectorSize variable may have been updated while rolling
    +  ** back a journal created by a process with a different sector size
    +  ** value. Reset it to the correct value for this process.
    +  */
    +  setSectorSize(pPager);
    +  return rc;
    +}
    +
    +/*
    +** Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback
    +** the entire master journal file. The case pSavepoint==NULL occurs when 
    +** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction 
    +** savepoint.
    +**
    +** When pSavepoint is not NULL (meaning a non-transaction savepoint is 
    +** being rolled back), then the rollback consists of up to three stages,
    +** performed in the order specified:
    +**
    +**   * Pages are played back from the main journal starting at byte
    +**     offset PagerSavepoint.iOffset and continuing to 
    +**     PagerSavepoint.iHdrOffset, or to the end of the main journal
    +**     file if PagerSavepoint.iHdrOffset is zero.
    +**
    +**   * If PagerSavepoint.iHdrOffset is not zero, then pages are played
    +**     back starting from the journal header immediately following 
    +**     PagerSavepoint.iHdrOffset to the end of the main journal file.
    +**
    +**   * Pages are then played back from the sub-journal file, starting
    +**     with the PagerSavepoint.iSubRec and continuing to the end of
    +**     the journal file.
    +**
    +** Throughout the rollback process, each time a page is rolled back, the
    +** corresponding bit is set in a bitvec structure (variable pDone in the
    +** implementation below). This is used to ensure that a page is only
    +** rolled back the first time it is encountered in either journal.
    +**
    +** If pSavepoint is NULL, then pages are only played back from the main
    +** journal file. There is no need for a bitvec in this case.
    +**
    +** In either case, before playback commences the Pager.dbSize variable
    +** is reset to the value that it held at the start of the savepoint 
    +** (or transaction). No page with a page-number greater than this value
    +** is played back. If one is encountered it is simply skipped.
    +*/
    +static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
    +  i64 szJ;                 /* Effective size of the main journal */
    +  i64 iHdrOff;             /* End of first segment of main-journal records */
    +  int rc = SQLITE_OK;      /* Return code */
    +  Bitvec *pDone = 0;       /* Bitvec to ensure pages played back only once */
    +
    +  assert( pPager->state>=PAGER_SHARED );
    +
    +  /* Allocate a bitvec to use to store the set of pages rolled back */
    +  if( pSavepoint ){
    +    pDone = sqlite3BitvecCreate(pSavepoint->nOrig);
    +    if( !pDone ){
    +      return SQLITE_NOMEM;
    +    }
    +  }
    +
    +  /* Set the database size back to the value it was before the savepoint 
    +  ** being reverted was opened.
    +  */
    +  pPager->dbSize = pSavepoint ? pSavepoint->nOrig : pPager->dbOrigSize;
    +
    +  /* Use pPager->journalOff as the effective size of the main rollback
    +  ** journal.  The actual file might be larger than this in
    +  ** PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST.  But anything
    +  ** past pPager->journalOff is off-limits to us.
    +  */
    +  szJ = pPager->journalOff;
    +
    +  /* Begin by rolling back records from the main journal starting at
    +  ** PagerSavepoint.iOffset and continuing to the next journal header.
    +  ** There might be records in the main journal that have a page number
    +  ** greater than the current database size (pPager->dbSize) but those
    +  ** will be skipped automatically.  Pages are added to pDone as they
    +  ** are played back.
    +  */
    +  if( pSavepoint ){
    +    iHdrOff = pSavepoint->iHdrOffset ? pSavepoint->iHdrOffset : szJ;
    +    pPager->journalOff = pSavepoint->iOffset;
    +    while( rc==SQLITE_OK && pPager->journalOff<iHdrOff ){
    +      rc = pager_playback_one_page(pPager, 1, 0, &pPager->journalOff, 1, pDone);
    +    }
    +    assert( rc!=SQLITE_DONE );
    +  }else{
    +    pPager->journalOff = 0;
    +  }
    +
    +  /* Continue rolling back records out of the main journal starting at
    +  ** the first journal header seen and continuing until the effective end
    +  ** of the main journal file.  Continue to skip out-of-range pages and
    +  ** continue adding pages rolled back to pDone.
    +  */
    +  while( rc==SQLITE_OK && pPager->journalOff<szJ ){
    +    u32 ii;            /* Loop counter */
    +    u32 nJRec = 0;     /* Number of Journal Records */
    +    u32 dummy;
    +    rc = readJournalHdr(pPager, 0, szJ, &nJRec, &dummy);
    +    assert( rc!=SQLITE_DONE );
    +
    +    /*
    +    ** The "pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff"
    +    ** test is related to ticket #2565.  See the discussion in the
    +    ** pager_playback() function for additional information.
    +    */
    +    if( nJRec==0 
    +     && pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff
    +    ){
    +      nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
    +    }
    +    for(ii=0; rc==SQLITE_OK && ii<nJRec && pPager->journalOff<szJ; ii++){
    +      rc = pager_playback_one_page(pPager, 1, 0, &pPager->journalOff, 1, pDone);
    +    }
    +    assert( rc!=SQLITE_DONE );
    +  }
    +  assert( rc!=SQLITE_OK || pPager->journalOff==szJ );
    +
    +  /* Finally,  rollback pages from the sub-journal.  Page that were
    +  ** previously rolled back out of the main journal (and are hence in pDone)
    +  ** will be skipped.  Out-of-range pages are also skipped.
    +  */
    +  if( pSavepoint ){
    +    u32 ii;            /* Loop counter */
    +    i64 offset = pSavepoint->iSubRec*(4+pPager->pageSize);
    +    for(ii=pSavepoint->iSubRec; rc==SQLITE_OK && ii<pPager->nSubRec; ii++){
    +      assert( offset==ii*(4+pPager->pageSize) );
    +      rc = pager_playback_one_page(pPager, 0, 0, &offset, 1, pDone);
    +    }
    +    assert( rc!=SQLITE_DONE );
    +  }
    +
    +  sqlite3BitvecDestroy(pDone);
    +  if( rc==SQLITE_OK ){
    +    pPager->journalOff = szJ;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Change the maximum number of in-memory pages that are allowed.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager *pPager, int mxPage){
    +  sqlite3PcacheSetCachesize(pPager->pPCache, mxPage);
    +}
    +
    +/*
    +** Adjust the robustness of the database to damage due to OS crashes
    +** or power failures by changing the number of syncs()s when writing
    +** the rollback journal.  There are three levels:
    +**
    +**    OFF       sqlite3OsSync() is never called.  This is the default
    +**              for temporary and transient files.
    +**
    +**    NORMAL    The journal is synced once before writes begin on the
    +**              database.  This is normally adequate protection, but
    +**              it is theoretically possible, though very unlikely,
    +**              that an inopertune power failure could leave the journal
    +**              in a state which would cause damage to the database
    +**              when it is rolled back.
    +**
    +**    FULL      The journal is synced twice before writes begin on the
    +**              database (with some additional information - the nRec field
    +**              of the journal header - being written in between the two
    +**              syncs).  If we assume that writing a
    +**              single disk sector is atomic, then this mode provides
    +**              assurance that the journal will not be corrupted to the
    +**              point of causing damage to the database during rollback.
    +**
    +** Numeric values associated with these states are OFF==1, NORMAL=2,
    +** and FULL=3.
    +*/
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager *pPager, int level, int bFullFsync){
    +  pPager->noSync =  (level==1 || pPager->tempFile) ?1:0;
    +  pPager->fullSync = (level==3 && !pPager->tempFile) ?1:0;
    +  pPager->sync_flags = (bFullFsync?SQLITE_SYNC_FULL:SQLITE_SYNC_NORMAL);
    +  if( pPager->noSync ) pPager->needSync = 0;
    +}
    +#endif
    +
    +/*
    +** The following global variable is incremented whenever the library
    +** attempts to open a temporary file.  This information is used for
    +** testing and analysis only.  
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_opentemp_count = 0;
    +#endif
    +
    +/*
    +** Open a temporary file.
    +**
    +** Write the file descriptor into *pFile. Return SQLITE_OK on success 
    +** or some other error code if we fail. The OS will automatically 
    +** delete the temporary file when it is closed.
    +**
    +** The flags passed to the VFS layer xOpen() call are those specified
    +** by parameter vfsFlags ORed with the following:
    +**
    +**     SQLITE_OPEN_READWRITE
    +**     SQLITE_OPEN_CREATE
    +**     SQLITE_OPEN_EXCLUSIVE
    +**     SQLITE_OPEN_DELETEONCLOSE
    +*/
    +static int pagerOpentemp(
    +  Pager *pPager,        /* The pager object */
    +  sqlite3_file *pFile,  /* Write the file descriptor here */
    +  int vfsFlags          /* Flags passed through to the VFS */
    +){
    +  int rc;               /* Return code */
    +
    +#ifdef SQLITE_TEST
    +  sqlite3_opentemp_count++;  /* Used for testing and analysis only */
    +#endif
    +
    +  vfsFlags |=  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
    +            SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;
    +  rc = sqlite3OsOpen(pPager->pVfs, 0, pFile, vfsFlags, 0);
    +  assert( rc!=SQLITE_OK || isOpen(pFile) );
    +  return rc;
    +}
    +
    +/*
    +** Set the busy handler function.
    +**
    +** The pager invokes the busy-handler if sqlite3OsLock() returns 
    +** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,
    +** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE 
    +** lock. It does *not* invoke the busy handler when upgrading from
    +** SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE
    +** (which occurs during hot-journal rollback). Summary:
    +**
    +**   Transition                        | Invokes xBusyHandler
    +**   --------------------------------------------------------
    +**   NO_LOCK       -> SHARED_LOCK      | Yes
    +**   SHARED_LOCK   -> RESERVED_LOCK    | No
    +**   SHARED_LOCK   -> EXCLUSIVE_LOCK   | No
    +**   RESERVED_LOCK -> EXCLUSIVE_LOCK   | Yes
    +**
    +** If the busy-handler callback returns non-zero, the lock is 
    +** retried. If it returns zero, then the SQLITE_BUSY error is
    +** returned to the caller of the pager API function.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(
    +  Pager *pPager,                       /* Pager object */
    +  int (*xBusyHandler)(void *),         /* Pointer to busy-handler function */
    +  void *pBusyHandlerArg                /* Argument to pass to xBusyHandler */
    +){  
    +  pPager->xBusyHandler = xBusyHandler;
    +  pPager->pBusyHandlerArg = pBusyHandlerArg;
    +}
    +
    +/*
    +** Report the current page size and number of reserved bytes back
    +** to the codec.
    +*/
    +#ifdef SQLITE_HAS_CODEC
    +static void pagerReportSize(Pager *pPager){
    +  if( pPager->xCodecSizeChng ){
    +    pPager->xCodecSizeChng(pPager->pCodec, pPager->pageSize,
    +                           (int)pPager->nReserve);
    +  }
    +}
    +#else
    +# define pagerReportSize(X)     /* No-op if we do not support a codec */
    +#endif
    +
    +/*
    +** Change the page size used by the Pager object. The new page size 
    +** is passed in *pPageSize.
    +**
    +** If the pager is in the error state when this function is called, it
    +** is a no-op. The value returned is the error state error code (i.e. 
    +** one of SQLITE_IOERR, SQLITE_CORRUPT or SQLITE_FULL).
    +**
    +** Otherwise, if all of the following are true:
    +**
    +**   * the new page size (value of *pPageSize) is valid (a power 
    +**     of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and
    +**
    +**   * there are no outstanding page references, and
    +**
    +**   * the database is either not an in-memory database or it is
    +**     an in-memory database that currently consists of zero pages.
    +**
    +** then the pager object page size is set to *pPageSize.
    +**
    +** If the page size is changed, then this function uses sqlite3PagerMalloc() 
    +** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt 
    +** fails, SQLITE_NOMEM is returned and the page size remains unchanged. 
    +** In all other cases, SQLITE_OK is returned.
    +**
    +** If the page size is not changed, either because one of the enumerated
    +** conditions above is not true, the pager was in error state when this
    +** function was called, or because the memory allocation attempt failed, 
    +** then *pPageSize is set to the old, retained page size before returning.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u16 *pPageSize, int nReserve){
    +  int rc = pPager->errCode;
    +
    +  if( rc==SQLITE_OK ){
    +    u16 pageSize = *pPageSize;
    +    assert( pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE) );
    +    if( (pPager->memDb==0 || pPager->dbSize==0)
    +     && sqlite3PcacheRefCount(pPager->pPCache)==0 
    +     && pageSize && pageSize!=pPager->pageSize 
    +    ){
    +      char *pNew = (char *)sqlite3PageMalloc(pageSize);
    +      if( !pNew ){
    +        rc = SQLITE_NOMEM;
    +      }else{
    +        pager_reset(pPager);
    +        pPager->pageSize = pageSize;
    +        sqlite3PageFree(pPager->pTmpSpace);
    +        pPager->pTmpSpace = pNew;
    +        sqlite3PcacheSetPageSize(pPager->pPCache, pageSize);
    +      }
    +    }
    +    *pPageSize = (u16)pPager->pageSize;
    +    if( nReserve<0 ) nReserve = pPager->nReserve;
    +    assert( nReserve>=0 && nReserve<1000 );
    +    pPager->nReserve = (i16)nReserve;
    +    pagerReportSize(pPager);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return a pointer to the "temporary page" buffer held internally
    +** by the pager.  This is a buffer that is big enough to hold the
    +** entire content of a database page.  This buffer is used internally
    +** during rollback and will be overwritten whenever a rollback
    +** occurs.  But other modules are free to use it too, as long as
    +** no rollbacks are happening.
    +*/
    +SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager *pPager){
    +  return pPager->pTmpSpace;
    +}
    +
    +/*
    +** Attempt to set the maximum database page count if mxPage is positive. 
    +** Make no changes if mxPage is zero or negative.  And never reduce the
    +** maximum page count below the current size of the database.
    +**
    +** Regardless of mxPage, return the current maximum page count.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
    +  if( mxPage>0 ){
    +    pPager->mxPgno = mxPage;
    +  }
    +  sqlite3PagerPagecount(pPager, 0);
    +  return pPager->mxPgno;
    +}
    +
    +/*
    +** The following set of routines are used to disable the simulated
    +** I/O error mechanism.  These routines are used to avoid simulated
    +** errors in places where we do not care about errors.
    +**
    +** Unless -DSQLITE_TEST=1 is used, these routines are all no-ops
    +** and generate no code.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API extern int sqlite3_io_error_pending;
    +SQLITE_API extern int sqlite3_io_error_hit;
    +static int saved_cnt;
    +void disable_simulated_io_errors(void){
    +  saved_cnt = sqlite3_io_error_pending;
    +  sqlite3_io_error_pending = -1;
    +}
    +void enable_simulated_io_errors(void){
    +  sqlite3_io_error_pending = saved_cnt;
    +}
    +#else
    +# define disable_simulated_io_errors()
    +# define enable_simulated_io_errors()
    +#endif
    +
    +/*
    +** Read the first N bytes from the beginning of the file into memory
    +** that pDest points to. 
    +**
    +** If the pager was opened on a transient file (zFilename==""), or
    +** opened on a file less than N bytes in size, the output buffer is
    +** zeroed and SQLITE_OK returned. The rationale for this is that this 
    +** function is used to read database headers, and a new transient or
    +** zero sized database has a header than consists entirely of zeroes.
    +**
    +** If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,
    +** the error code is returned to the caller and the contents of the
    +** output buffer undefined.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){
    +  int rc = SQLITE_OK;
    +  memset(pDest, 0, N);
    +  assert( isOpen(pPager->fd) || pPager->tempFile );
    +  if( isOpen(pPager->fd) ){
    +    IOTRACE(("DBHDR %p 0 %d\n", pPager, N))
    +    rc = sqlite3OsRead(pPager->fd, pDest, N, 0);
    +    if( rc==SQLITE_IOERR_SHORT_READ ){
    +      rc = SQLITE_OK;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return the total number of pages in the database file associated 
    +** with pPager. Normally, this is calculated as (<db file size>/<page-size>).
    +** However, if the file is between 1 and <page-size> bytes in size, then 
    +** this is considered a 1 page file.
    +**
    +** If the pager is in error state when this function is called, then the
    +** error state error code is returned and *pnPage left unchanged. Or,
    +** if the file system has to be queried for the size of the file and
    +** the query attempt returns an IO error, the IO error code is returned
    +** and *pnPage is left unchanged.
    +**
    +** Otherwise, if everything is successful, then SQLITE_OK is returned
    +** and *pnPage is set to the number of pages in the database.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerPagecount(Pager *pPager, int *pnPage){
    +  Pgno nPage;               /* Value to return via *pnPage */
    +
    +  /* If the pager is already in the error state, return the error code. */
    +  if( pPager->errCode ){
    +    return pPager->errCode;
    +  }
    +
    +  /* Determine the number of pages in the file. Store this in nPage. */
    +  if( pPager->dbSizeValid ){
    +    nPage = pPager->dbSize;
    +  }else{
    +    int rc;                 /* Error returned by OsFileSize() */
    +    i64 n = 0;              /* File size in bytes returned by OsFileSize() */
    +
    +    assert( isOpen(pPager->fd) || pPager->tempFile );
    +    if( isOpen(pPager->fd) && (0 != (rc = sqlite3OsFileSize(pPager->fd, &n))) ){
    +      pager_error(pPager, rc);
    +      return rc;
    +    }
    +    if( n>0 && n<pPager->pageSize ){
    +      nPage = 1;
    +    }else{
    +      nPage = (Pgno)(n / pPager->pageSize);
    +    }
    +    if( pPager->state!=PAGER_UNLOCK ){
    +      pPager->dbSize = nPage;
    +      pPager->dbFileSize = nPage;
    +      pPager->dbSizeValid = 1;
    +    }
    +  }
    +
    +  /* If the current number of pages in the file is greater than the 
    +  ** configured maximum pager number, increase the allowed limit so
    +  ** that the file can be read.
    +  */
    +  if( nPage>pPager->mxPgno ){
    +    pPager->mxPgno = (Pgno)nPage;
    +  }
    +
    +  /* Set the output variable and return SQLITE_OK */
    +  if( pnPage ){
    +    *pnPage = nPage;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Try to obtain a lock of type locktype on the database file. If
    +** a similar or greater lock is already held, this function is a no-op
    +** (returning SQLITE_OK immediately).
    +**
    +** Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke 
    +** the busy callback if the lock is currently not available. Repeat 
    +** until the busy callback returns false or until the attempt to 
    +** obtain the lock succeeds.
    +**
    +** Return SQLITE_OK on success and an error code if we cannot obtain
    +** the lock. If the lock is obtained successfully, set the Pager.state 
    +** variable to locktype before returning.
    +*/
    +static int pager_wait_on_lock(Pager *pPager, int locktype){
    +  int rc;                              /* Return code */
    +
    +  /* The OS lock values must be the same as the Pager lock values */
    +  assert( PAGER_SHARED==SHARED_LOCK );
    +  assert( PAGER_RESERVED==RESERVED_LOCK );
    +  assert( PAGER_EXCLUSIVE==EXCLUSIVE_LOCK );
    +
    +  /* If the file is currently unlocked then the size must be unknown */
    +  assert( pPager->state>=PAGER_SHARED || pPager->dbSizeValid==0 );
    +
    +  /* Check that this is either a no-op (because the requested lock is 
    +  ** already held, or one of the transistions that the busy-handler
    +  ** may be invoked during, according to the comment above
    +  ** sqlite3PagerSetBusyhandler().
    +  */
    +  assert( (pPager->state>=locktype)
    +       || (pPager->state==PAGER_UNLOCK && locktype==PAGER_SHARED)
    +       || (pPager->state==PAGER_RESERVED && locktype==PAGER_EXCLUSIVE)
    +  );
    +
    +  if( pPager->state>=locktype ){
    +    rc = SQLITE_OK;
    +  }else{
    +    do {
    +      rc = sqlite3OsLock(pPager->fd, locktype);
    +    }while( rc==SQLITE_BUSY && pPager->xBusyHandler(pPager->pBusyHandlerArg) );
    +    if( rc==SQLITE_OK ){
    +      pPager->state = (u8)locktype;
    +      IOTRACE(("LOCK %p %d\n", pPager, locktype))
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Function assertTruncateConstraint(pPager) checks that one of the 
    +** following is true for all dirty pages currently in the page-cache:
    +**
    +**   a) The page number is less than or equal to the size of the 
    +**      current database image, in pages, OR
    +**
    +**   b) if the page content were written at this time, it would not
    +**      be necessary to write the current content out to the sub-journal
    +**      (as determined by function subjRequiresPage()).
    +**
    +** If the condition asserted by this function were not true, and the
    +** dirty page were to be discarded from the cache via the pagerStress()
    +** routine, pagerStress() would not write the current page content to
    +** the database file. If a savepoint transaction were rolled back after
    +** this happened, the correct behaviour would be to restore the current
    +** content of the page. However, since this content is not present in either
    +** the database file or the portion of the rollback journal and 
    +** sub-journal rolled back the content could not be restored and the
    +** database image would become corrupt. It is therefore fortunate that 
    +** this circumstance cannot arise.
    +*/
    +#if defined(SQLITE_DEBUG)
    +static void assertTruncateConstraintCb(PgHdr *pPg){
    +  assert( pPg->flags&PGHDR_DIRTY );
    +  assert( !subjRequiresPage(pPg) || pPg->pgno<=pPg->pPager->dbSize );
    +}
    +static void assertTruncateConstraint(Pager *pPager){
    +  sqlite3PcacheIterateDirty(pPager->pPCache, assertTruncateConstraintCb);
    +}
    +#else
    +# define assertTruncateConstraint(pPager)
    +#endif
    +
    +/*
    +** Truncate the in-memory database file image to nPage pages. This 
    +** function does not actually modify the database file on disk. It 
    +** just sets the internal state of the pager object so that the 
    +** truncation will be done when the current transaction is committed.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){
    +  assert( pPager->dbSizeValid );
    +  assert( pPager->dbSize>=nPage );
    +  assert( pPager->state>=PAGER_RESERVED );
    +  pPager->dbSize = nPage;
    +  assertTruncateConstraint(pPager);
    +}
    +
    +/*
    +** Shutdown the page cache.  Free all memory and close all files.
    +**
    +** If a transaction was in progress when this routine is called, that
    +** transaction is rolled back.  All outstanding pages are invalidated
    +** and their memory is freed.  Any attempt to use a page associated
    +** with this page cache after this function returns will likely
    +** result in a coredump.
    +**
    +** This function always succeeds. If a transaction is active an attempt
    +** is made to roll it back. If an error occurs during the rollback 
    +** a hot journal may be left in the filesystem but no error is returned
    +** to the caller.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager){
    +  disable_simulated_io_errors();
    +  sqlite3BeginBenignMalloc();
    +  pPager->errCode = 0;
    +  pPager->exclusiveMode = 0;
    +  pager_reset(pPager);
    +  if( MEMDB ){
    +    pager_unlock(pPager);
    +  }else{
    +    /* Set Pager.journalHdr to -1 for the benefit of the pager_playback() 
    +    ** call which may be made from within pagerUnlockAndRollback(). If it
    +    ** is not -1, then the unsynced portion of an open journal file may
    +    ** be played back into the database. If a power failure occurs while
    +    ** this is happening, the database may become corrupt.
    +    */
    +    pPager->journalHdr = -1;
    +    pagerUnlockAndRollback(pPager);
    +  }
    +  sqlite3EndBenignMalloc();
    +  enable_simulated_io_errors();
    +  PAGERTRACE(("CLOSE %d\n", PAGERID(pPager)));
    +  IOTRACE(("CLOSE %p\n", pPager))
    +  sqlite3OsClose(pPager->fd);
    +  sqlite3PageFree(pPager->pTmpSpace);
    +  sqlite3PcacheClose(pPager->pPCache);
    +
    +#ifdef SQLITE_HAS_CODEC
    +  if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
    +#endif
    +
    +  assert( !pPager->aSavepoint && !pPager->pInJournal );
    +  assert( !isOpen(pPager->jfd) && !isOpen(pPager->sjfd) );
    +
    +  sqlite3_free(pPager);
    +  return SQLITE_OK;
    +}
    +
    +#if !defined(NDEBUG) || defined(SQLITE_TEST)
    +/*
    +** Return the page number for page pPg.
    +*/
    +SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage *pPg){
    +  return pPg->pgno;
    +}
    +#endif
    +
    +/*
    +** Increment the reference count for page pPg.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerRef(DbPage *pPg){
    +  sqlite3PcacheRef(pPg);
    +}
    +
    +/*
    +** Sync the journal. In other words, make sure all the pages that have
    +** been written to the journal have actually reached the surface of the
    +** disk and can be restored in the event of a hot-journal rollback.
    +**
    +** If the Pager.needSync flag is not set, then this function is a
    +** no-op. Otherwise, the actions required depend on the journal-mode
    +** and the device characteristics of the the file-system, as follows:
    +**
    +**   * If the journal file is an in-memory journal file, no action need
    +**     be taken.
    +**
    +**   * Otherwise, if the device does not support the SAFE_APPEND property,
    +**     then the nRec field of the most recently written journal header
    +**     is updated to contain the number of journal records that have
    +**     been written following it. If the pager is operating in full-sync
    +**     mode, then the journal file is synced before this field is updated.
    +**
    +**   * If the device does not support the SEQUENTIAL property, then 
    +**     journal file is synced.
    +**
    +** Or, in pseudo-code:
    +**
    +**   if( NOT <in-memory journal> ){
    +**     if( NOT SAFE_APPEND ){
    +**       if( <full-sync mode> ) xSync(<journal file>);
    +**       <update nRec field>
    +**     } 
    +**     if( NOT SEQUENTIAL ) xSync(<journal file>);
    +**   }
    +**
    +** The Pager.needSync flag is never be set for temporary files, or any
    +** file operating in no-sync mode (Pager.noSync set to non-zero).
    +**
    +** If successful, this routine clears the PGHDR_NEED_SYNC flag of every 
    +** page currently held in memory before returning SQLITE_OK. If an IO
    +** error is encountered, then the IO error code is returned to the caller.
    +*/
    +static int syncJournal(Pager *pPager){
    +  if( pPager->needSync ){
    +    assert( !pPager->tempFile );
    +    if( pPager->journalMode!=PAGER_JOURNALMODE_MEMORY ){
    +      int rc;                              /* Return code */
    +      const int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);
    +      assert( isOpen(pPager->jfd) );
    +
    +      if( 0==(iDc&SQLITE_IOCAP_SAFE_APPEND) ){
    +        /* This block deals with an obscure problem. If the last connection
    +        ** that wrote to this database was operating in persistent-journal
    +        ** mode, then the journal file may at this point actually be larger
    +        ** than Pager.journalOff bytes. If the next thing in the journal
    +        ** file happens to be a journal-header (written as part of the
    +        ** previous connections transaction), and a crash or power-failure 
    +        ** occurs after nRec is updated but before this connection writes 
    +        ** anything else to the journal file (or commits/rolls back its 
    +        ** transaction), then SQLite may become confused when doing the 
    +        ** hot-journal rollback following recovery. It may roll back all
    +        ** of this connections data, then proceed to rolling back the old,
    +        ** out-of-date data that follows it. Database corruption.
    +        **
    +        ** To work around this, if the journal file does appear to contain
    +        ** a valid header following Pager.journalOff, then write a 0x00
    +        ** byte to the start of it to prevent it from being recognized.
    +        **
    +        ** Variable iNextHdrOffset is set to the offset at which this
    +        ** problematic header will occur, if it exists. aMagic is used 
    +        ** as a temporary buffer to inspect the first couple of bytes of
    +        ** the potential journal header.
    +        */
    +        i64 iNextHdrOffset;
    +        u8 aMagic[8];
    +	u8 zHeader[sizeof(aJournalMagic)+4];
    +
    +	memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
    +	put32bits(&zHeader[sizeof(aJournalMagic)], pPager->nRec);
    +
    +        iNextHdrOffset = journalHdrOffset(pPager);
    +        rc = sqlite3OsRead(pPager->jfd, aMagic, 8, iNextHdrOffset);
    +        if( rc==SQLITE_OK && 0==memcmp(aMagic, aJournalMagic, 8) ){
    +          static const u8 zerobyte = 0;
    +          rc = sqlite3OsWrite(pPager->jfd, &zerobyte, 1, iNextHdrOffset);
    +        }
    +        if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
    +          return rc;
    +        }
    +
    +        /* Write the nRec value into the journal file header. If in
    +        ** full-synchronous mode, sync the journal first. This ensures that
    +        ** all data has really hit the disk before nRec is updated to mark
    +        ** it as a candidate for rollback.
    +        **
    +        ** This is not required if the persistent media supports the
    +        ** SAFE_APPEND property. Because in this case it is not possible 
    +        ** for garbage data to be appended to the file, the nRec field
    +        ** is populated with 0xFFFFFFFF when the journal header is written
    +        ** and never needs to be updated.
    +        */
    +        if( pPager->fullSync && 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){
    +          PAGERTRACE(("SYNC journal of %d\n", PAGERID(pPager)));
    +          IOTRACE(("JSYNC %p\n", pPager))
    +          rc = sqlite3OsSync(pPager->jfd, pPager->sync_flags);
    +          if( rc!=SQLITE_OK ) return rc;
    +        }
    +        IOTRACE(("JHDR %p %lld\n", pPager, pPager->journalHdr));
    +        rc = sqlite3OsWrite(
    +            pPager->jfd, zHeader, sizeof(zHeader), pPager->journalHdr
    +	);
    +        if( rc!=SQLITE_OK ) return rc;
    +      }
    +      if( 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){
    +        PAGERTRACE(("SYNC journal of %d\n", PAGERID(pPager)));
    +        IOTRACE(("JSYNC %p\n", pPager))
    +        rc = sqlite3OsSync(pPager->jfd, pPager->sync_flags| 
    +          (pPager->sync_flags==SQLITE_SYNC_FULL?SQLITE_SYNC_DATAONLY:0)
    +        );
    +        if( rc!=SQLITE_OK ) return rc;
    +      }
    +    }
    +
    +    /* The journal file was just successfully synced. Set Pager.needSync 
    +    ** to zero and clear the PGHDR_NEED_SYNC flag on all pagess.
    +    */
    +    pPager->needSync = 0;
    +    pPager->journalStarted = 1;
    +    sqlite3PcacheClearSyncFlags(pPager->pPCache);
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** The argument is the first in a linked list of dirty pages connected
    +** by the PgHdr.pDirty pointer. This function writes each one of the
    +** in-memory pages in the list to the database file. The argument may
    +** be NULL, representing an empty list. In this case this function is
    +** a no-op.
    +**
    +** The pager must hold at least a RESERVED lock when this function
    +** is called. Before writing anything to the database file, this lock
    +** is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,
    +** SQLITE_BUSY is returned and no data is written to the database file.
    +** 
    +** If the pager is a temp-file pager and the actual file-system file
    +** is not yet open, it is created and opened before any data is 
    +** written out.
    +**
    +** Once the lock has been upgraded and, if necessary, the file opened,
    +** the pages are written out to the database file in list order. Writing
    +** a page is skipped if it meets either of the following criteria:
    +**
    +**   * The page number is greater than Pager.dbSize, or
    +**   * The PGHDR_DONT_WRITE flag is set on the page.
    +**
    +** If writing out a page causes the database file to grow, Pager.dbFileSize
    +** is updated accordingly. If page 1 is written out, then the value cached
    +** in Pager.dbFileVers[] is updated to match the new value stored in
    +** the database file.
    +**
    +** If everything is successful, SQLITE_OK is returned. If an IO error 
    +** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
    +** be obtained, SQLITE_BUSY is returned.
    +*/
    +static int pager_write_pagelist(PgHdr *pList){
    +  Pager *pPager;                       /* Pager object */
    +  int rc;                              /* Return code */
    +
    +  if( NEVER(pList==0) ) return SQLITE_OK;
    +  pPager = pList->pPager;
    +
    +  /* At this point there may be either a RESERVED or EXCLUSIVE lock on the
    +  ** database file. If there is already an EXCLUSIVE lock, the following
    +  ** call is a no-op.
    +  **
    +  ** Moving the lock from RESERVED to EXCLUSIVE actually involves going
    +  ** through an intermediate state PENDING.   A PENDING lock prevents new
    +  ** readers from attaching to the database but is unsufficient for us to
    +  ** write.  The idea of a PENDING lock is to prevent new readers from
    +  ** coming in while we wait for existing readers to clear.
    +  **
    +  ** While the pager is in the RESERVED state, the original database file
    +  ** is unchanged and we can rollback without having to playback the
    +  ** journal into the original database file.  Once we transition to
    +  ** EXCLUSIVE, it means the database file has been changed and any rollback
    +  ** will require a journal playback.
    +  */
    +  assert( pPager->state>=PAGER_RESERVED );
    +  rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
    +
    +  /* If the file is a temp-file has not yet been opened, open it now. It
    +  ** is not possible for rc to be other than SQLITE_OK if this branch
    +  ** is taken, as pager_wait_on_lock() is a no-op for temp-files.
    +  */
    +  if( !isOpen(pPager->fd) ){
    +    assert( pPager->tempFile && rc==SQLITE_OK );
    +    rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags);
    +  }
    +
    +  while( rc==SQLITE_OK && pList ){
    +    Pgno pgno = pList->pgno;
    +
    +    /* If there are dirty pages in the page cache with page numbers greater
    +    ** than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to
    +    ** make the file smaller (presumably by auto-vacuum code). Do not write
    +    ** any such pages to the file.
    +    **
    +    ** Also, do not write out any page that has the PGHDR_DONT_WRITE flag
    +    ** set (set by sqlite3PagerDontWrite()).
    +    */
    +    if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){
    +      i64 offset = (pgno-1)*(i64)pPager->pageSize;   /* Offset to write */
    +      char *pData;                                   /* Data to write */    
    +
    +      /* Encode the database */
    +      CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);
    +
    +      /* Write out the page data. */
    +      rc = sqlite3OsWrite(pPager->fd, pData, pPager->pageSize, offset);
    +
    +      /* If page 1 was just written, update Pager.dbFileVers to match
    +      ** the value now stored in the database file. If writing this 
    +      ** page caused the database file to grow, update dbFileSize. 
    +      */
    +      if( pgno==1 ){
    +        memcpy(&pPager->dbFileVers, &pData[24], sizeof(pPager->dbFileVers));
    +      }
    +      if( pgno>pPager->dbFileSize ){
    +        pPager->dbFileSize = pgno;
    +      }
    +
    +      /* Update any backup objects copying the contents of this pager. */
    +      sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)pList->pData);
    +
    +      PAGERTRACE(("STORE %d page %d hash(%08x)\n",
    +                   PAGERID(pPager), pgno, pager_pagehash(pList)));
    +      IOTRACE(("PGOUT %p %d\n", pPager, pgno));
    +      PAGER_INCR(sqlite3_pager_writedb_count);
    +      PAGER_INCR(pPager->nWrite);
    +    }else{
    +      PAGERTRACE(("NOSTORE %d page %d\n", PAGERID(pPager), pgno));
    +    }
    +#ifdef SQLITE_CHECK_PAGES
    +    pList->pageHash = pager_pagehash(pList);
    +#endif
    +    pList = pList->pDirty;
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Append a record of the current state of page pPg to the sub-journal. 
    +** It is the callers responsibility to use subjRequiresPage() to check 
    +** that it is really required before calling this function.
    +**
    +** If successful, set the bit corresponding to pPg->pgno in the bitvecs
    +** for all open savepoints before returning.
    +**
    +** This function returns SQLITE_OK if everything is successful, an IO
    +** error code if the attempt to write to the sub-journal fails, or 
    +** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
    +** bitvec.
    +*/
    +static int subjournalPage(PgHdr *pPg){
    +  int rc = SQLITE_OK;
    +  Pager *pPager = pPg->pPager;
    +  if( isOpen(pPager->sjfd) ){
    +    void *pData = pPg->pData;
    +    i64 offset = pPager->nSubRec*(4+pPager->pageSize);
    +    char *pData2;
    +
    +    CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
    +    PAGERTRACE(("STMT-JOURNAL %d page %d\n", PAGERID(pPager), pPg->pgno));
    +  
    +    assert( pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize );
    +    rc = write32bits(pPager->sjfd, offset, pPg->pgno);
    +    if( rc==SQLITE_OK ){
    +      rc = sqlite3OsWrite(pPager->sjfd, pData2, pPager->pageSize, offset+4);
    +    }
    +  }
    +  if( rc==SQLITE_OK ){
    +    pPager->nSubRec++;
    +    assert( pPager->nSavepoint>0 );
    +    rc = addToSavepointBitvecs(pPager, pPg->pgno);
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** This function is called by the pcache layer when it has reached some
    +** soft memory limit. The first argument is a pointer to a Pager object
    +** (cast as a void*). The pager is always 'purgeable' (not an in-memory
    +** database). The second argument is a reference to a page that is 
    +** currently dirty but has no outstanding references. The page
    +** is always associated with the Pager object passed as the first 
    +** argument.
    +**
    +** The job of this function is to make pPg clean by writing its contents
    +** out to the database file, if possible. This may involve syncing the
    +** journal file. 
    +**
    +** If successful, sqlite3PcacheMakeClean() is called on the page and
    +** SQLITE_OK returned. If an IO error occurs while trying to make the
    +** page clean, the IO error code is returned. If the page cannot be
    +** made clean for some other reason, but no error occurs, then SQLITE_OK
    +** is returned by sqlite3PcacheMakeClean() is not called.
    +*/
    +static int pagerStress(void *p, PgHdr *pPg){
    +  Pager *pPager = (Pager *)p;
    +  int rc = SQLITE_OK;
    +
    +  assert( pPg->pPager==pPager );
    +  assert( pPg->flags&PGHDR_DIRTY );
    +
    +  /* The doNotSync flag is set by the sqlite3PagerWrite() function while it
    +  ** is journalling a set of two or more database pages that are stored
    +  ** on the same disk sector. Syncing the journal is not allowed while
    +  ** this is happening as it is important that all members of such a
    +  ** set of pages are synced to disk together. So, if the page this function
    +  ** is trying to make clean will require a journal sync and the doNotSync
    +  ** flag is set, return without doing anything. The pcache layer will
    +  ** just have to go ahead and allocate a new page buffer instead of
    +  ** reusing pPg.
    +  **
    +  ** Similarly, if the pager has already entered the error state, do not
    +  ** try to write the contents of pPg to disk.
    +  */
    +  if( NEVER(pPager->errCode)
    +   || (pPager->doNotSync && pPg->flags&PGHDR_NEED_SYNC)
    +  ){
    +    return SQLITE_OK;
    +  }
    +
    +  /* Sync the journal file if required. */
    +  if( pPg->flags&PGHDR_NEED_SYNC ){
    +    rc = syncJournal(pPager);
    +    if( rc==SQLITE_OK && pPager->fullSync && 
    +      !(pPager->journalMode==PAGER_JOURNALMODE_MEMORY) &&
    +      !(sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_SAFE_APPEND)
    +    ){
    +      pPager->nRec = 0;
    +      rc = writeJournalHdr(pPager);
    +    }
    +  }
    +
    +  /* If the page number of this page is larger than the current size of
    +  ** the database image, it may need to be written to the sub-journal.
    +  ** This is because the call to pager_write_pagelist() below will not
    +  ** actually write data to the file in this case.
    +  **
    +  ** Consider the following sequence of events:
    +  **
    +  **   BEGIN;
    +  **     <journal page X>
    +  **     <modify page X>
    +  **     SAVEPOINT sp;
    +  **       <shrink database file to Y pages>
    +  **       pagerStress(page X)
    +  **     ROLLBACK TO sp;
    +  **
    +  ** If (X>Y), then when pagerStress is called page X will not be written
    +  ** out to the database file, but will be dropped from the cache. Then,
    +  ** following the "ROLLBACK TO sp" statement, reading page X will read
    +  ** data from the database file. This will be the copy of page X as it
    +  ** was when the transaction started, not as it was when "SAVEPOINT sp"
    +  ** was executed.
    +  **
    +  ** The solution is to write the current data for page X into the 
    +  ** sub-journal file now (if it is not already there), so that it will
    +  ** be restored to its current value when the "ROLLBACK TO sp" is 
    +  ** executed.
    +  */
    +  if( NEVER(
    +      rc==SQLITE_OK && pPg->pgno>pPager->dbSize && subjRequiresPage(pPg)
    +  ) ){
    +    rc = subjournalPage(pPg);
    +  }
    +
    +  /* Write the contents of the page out to the database file. */
    +  if( rc==SQLITE_OK ){
    +    pPg->pDirty = 0;
    +    rc = pager_write_pagelist(pPg);
    +  }
    +
    +  /* Mark the page as clean. */
    +  if( rc==SQLITE_OK ){
    +    PAGERTRACE(("STRESS %d page %d\n", PAGERID(pPager), pPg->pgno));
    +    sqlite3PcacheMakeClean(pPg);
    +  }
    +
    +  return pager_error(pPager, rc);
    +}
    +
    +
    +/*
    +** Allocate and initialize a new Pager object and put a pointer to it
    +** in *ppPager. The pager should eventually be freed by passing it
    +** to sqlite3PagerClose().
    +**
    +** The zFilename argument is the path to the database file to open.
    +** If zFilename is NULL then a randomly-named temporary file is created
    +** and used as the file to be cached. Temporary files are be deleted
    +** automatically when they are closed. If zFilename is ":memory:" then 
    +** all information is held in cache. It is never written to disk. 
    +** This can be used to implement an in-memory database.
    +**
    +** The nExtra parameter specifies the number of bytes of space allocated
    +** along with each page reference. This space is available to the user
    +** via the sqlite3PagerGetExtra() API.
    +**
    +** The flags argument is used to specify properties that affect the
    +** operation of the pager. It should be passed some bitwise combination
    +** of the PAGER_OMIT_JOURNAL and PAGER_NO_READLOCK flags.
    +**
    +** The vfsFlags parameter is a bitmask to pass to the flags parameter
    +** of the xOpen() method of the supplied VFS when opening files. 
    +**
    +** If the pager object is allocated and the specified file opened 
    +** successfully, SQLITE_OK is returned and *ppPager set to point to
    +** the new pager object. If an error occurs, *ppPager is set to NULL
    +** and error code returned. This function may return SQLITE_NOMEM
    +** (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or 
    +** various SQLITE_IO_XXX errors.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerOpen(
    +  sqlite3_vfs *pVfs,       /* The virtual file system to use */
    +  Pager **ppPager,         /* OUT: Return the Pager structure here */
    +  const char *zFilename,   /* Name of the database file to open */
    +  int nExtra,              /* Extra bytes append to each in-memory page */
    +  int flags,               /* flags controlling this file */
    +  int vfsFlags,            /* flags passed through to sqlite3_vfs.xOpen() */
    +  void (*xReinit)(DbPage*) /* Function to reinitialize pages */
    +){
    +  u8 *pPtr;
    +  Pager *pPager = 0;       /* Pager object to allocate and return */
    +  int rc = SQLITE_OK;      /* Return code */
    +  int tempFile = 0;        /* True for temp files (incl. in-memory files) */
    +  int memDb = 0;           /* True if this is an in-memory file */
    +  int readOnly = 0;        /* True if this is a read-only file */
    +  int journalFileSize;     /* Bytes to allocate for each journal fd */
    +  char *zPathname = 0;     /* Full path to database file */
    +  int nPathname = 0;       /* Number of bytes in zPathname */
    +  int useJournal = (flags & PAGER_OMIT_JOURNAL)==0; /* False to omit journal */
    +  int noReadlock = (flags & PAGER_NO_READLOCK)!=0;  /* True to omit read-lock */
    +  int pcacheSize = sqlite3PcacheSize();       /* Bytes to allocate for PCache */
    +  u16 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE;  /* Default page size */
    +
    +  /* Figure out how much space is required for each journal file-handle
    +  ** (there are two of them, the main journal and the sub-journal). This
    +  ** is the maximum space required for an in-memory journal file handle 
    +  ** and a regular journal file-handle. Note that a "regular journal-handle"
    +  ** may be a wrapper capable of caching the first portion of the journal
    +  ** file in memory to implement the atomic-write optimization (see 
    +  ** source file journal.c).
    +  */
    +  if( sqlite3JournalSize(pVfs)>sqlite3MemJournalSize() ){
    +    journalFileSize = ROUND8(sqlite3JournalSize(pVfs));
    +  }else{
    +    journalFileSize = ROUND8(sqlite3MemJournalSize());
    +  }
    +
    +  /* Set the output variable to NULL in case an error occurs. */
    +  *ppPager = 0;
    +
    +  /* Compute and store the full pathname in an allocated buffer pointed
    +  ** to by zPathname, length nPathname. Or, if this is a temporary file,
    +  ** leave both nPathname and zPathname set to 0.
    +  */
    +  if( zFilename && zFilename[0] ){
    +    nPathname = pVfs->mxPathname+1;
    +    zPathname = sqlite3Malloc(nPathname*2);
    +    if( zPathname==0 ){
    +      return SQLITE_NOMEM;
    +    }
    +#ifndef SQLITE_OMIT_MEMORYDB
    +    if( strcmp(zFilename,":memory:")==0 ){
    +      memDb = 1;
    +      zPathname[0] = 0;
    +    }else
    +#endif
    +    {
    +      zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */
    +      rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);
    +    }
    +
    +    nPathname = sqlite3Strlen30(zPathname);
    +    if( rc==SQLITE_OK && nPathname+8>pVfs->mxPathname ){
    +      /* This branch is taken when the journal path required by
    +      ** the database being opened will be more than pVfs->mxPathname
    +      ** bytes in length. This means the database cannot be opened,
    +      ** as it will not be possible to open the journal file or even
    +      ** check for a hot-journal before reading.
    +      */
    +      rc = SQLITE_CANTOPEN;
    +    }
    +    if( rc!=SQLITE_OK ){
    +      sqlite3_free(zPathname);
    +      return rc;
    +    }
    +  }
    +
    +  /* Allocate memory for the Pager structure, PCache object, the
    +  ** three file descriptors, the database file name and the journal 
    +  ** file name. The layout in memory is as follows:
    +  **
    +  **     Pager object                    (sizeof(Pager) bytes)
    +  **     PCache object                   (sqlite3PcacheSize() bytes)
    +  **     Database file handle            (pVfs->szOsFile bytes)
    +  **     Sub-journal file handle         (journalFileSize bytes)
    +  **     Main journal file handle        (journalFileSize bytes)
    +  **     Database file name              (nPathname+1 bytes)
    +  **     Journal file name               (nPathname+8+1 bytes)
    +  */
    +  pPtr = (u8 *)sqlite3MallocZero(
    +    ROUND8(sizeof(*pPager)) +      /* Pager structure */
    +    ROUND8(pcacheSize) +           /* PCache object */
    +    ROUND8(pVfs->szOsFile) +       /* The main db file */
    +    journalFileSize * 2 +          /* The two journal files */ 
    +    nPathname + 1 +                /* zFilename */
    +    nPathname + 8 + 1              /* zJournal */
    +  );
    +  assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) );
    +  if( !pPtr ){
    +    sqlite3_free(zPathname);
    +    return SQLITE_NOMEM;
    +  }
    +  pPager =              (Pager*)(pPtr);
    +  pPager->pPCache =    (PCache*)(pPtr += ROUND8(sizeof(*pPager)));
    +  pPager->fd =   (sqlite3_file*)(pPtr += ROUND8(pcacheSize));
    +  pPager->sjfd = (sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile));
    +  pPager->jfd =  (sqlite3_file*)(pPtr += journalFileSize);
    +  pPager->zFilename =    (char*)(pPtr += journalFileSize);
    +  assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );
    +
    +  /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */
    +  if( zPathname ){
    +    pPager->zJournal =   (char*)(pPtr += nPathname + 1);
    +    memcpy(pPager->zFilename, zPathname, nPathname);
    +    memcpy(pPager->zJournal, zPathname, nPathname);
    +    memcpy(&pPager->zJournal[nPathname], "-journal", 8);
    +    if( pPager->zFilename[0]==0 ) pPager->zJournal[0] = 0;
    +    sqlite3_free(zPathname);
    +  }
    +  pPager->pVfs = pVfs;
    +  pPager->vfsFlags = vfsFlags;
    +
    +  /* Open the pager file.
    +  */
    +  if( zFilename && zFilename[0] && !memDb ){
    +    int fout = 0;                    /* VFS flags returned by xOpen() */
    +    rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout);
    +    readOnly = (fout&SQLITE_OPEN_READONLY);
    +
    +    /* If the file was successfully opened for read/write access,
    +    ** choose a default page size in case we have to create the
    +    ** database file. The default page size is the maximum of:
    +    **
    +    **    + SQLITE_DEFAULT_PAGE_SIZE,
    +    **    + The value returned by sqlite3OsSectorSize()
    +    **    + The largest page size that can be written atomically.
    +    */
    +    if( rc==SQLITE_OK && !readOnly ){
    +      setSectorSize(pPager);
    +      assert(SQLITE_DEFAULT_PAGE_SIZE<=SQLITE_MAX_DEFAULT_PAGE_SIZE);
    +      if( szPageDflt<pPager->sectorSize ){
    +        if( pPager->sectorSize>SQLITE_MAX_DEFAULT_PAGE_SIZE ){
    +          szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;
    +        }else{
    +          szPageDflt = (u16)pPager->sectorSize;
    +        }
    +      }
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +      {
    +        int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);
    +        int ii;
    +        assert(SQLITE_IOCAP_ATOMIC512==(512>>8));
    +        assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));
    +        assert(SQLITE_MAX_DEFAULT_PAGE_SIZE<=65536);
    +        for(ii=szPageDflt; ii<=SQLITE_MAX_DEFAULT_PAGE_SIZE; ii=ii*2){
    +          if( iDc&(SQLITE_IOCAP_ATOMIC|(ii>>8)) ){
    +            szPageDflt = ii;
    +          }
    +        }
    +      }
    +#endif
    +    }
    +  }else{
    +    /* If a temporary file is requested, it is not opened immediately.
    +    ** In this case we accept the default page size and delay actually
    +    ** opening the file until the first call to OsWrite().
    +    **
    +    ** This branch is also run for an in-memory database. An in-memory
    +    ** database is the same as a temp-file that is never written out to
    +    ** disk and uses an in-memory rollback journal.
    +    */ 
    +    tempFile = 1;
    +    pPager->state = PAGER_EXCLUSIVE;
    +    readOnly = (vfsFlags&SQLITE_OPEN_READONLY);
    +  }
    +
    +  /* The following call to PagerSetPagesize() serves to set the value of 
    +  ** Pager.pageSize and to allocate the Pager.pTmpSpace buffer.
    +  */
    +  if( rc==SQLITE_OK ){
    +    assert( pPager->memDb==0 );
    +    rc = sqlite3PagerSetPagesize(pPager, &szPageDflt, -1);
    +    testcase( rc!=SQLITE_OK );
    +  }
    +
    +  /* If an error occurred in either of the blocks above, free the 
    +  ** Pager structure and close the file.
    +  */
    +  if( rc!=SQLITE_OK ){
    +    assert( !pPager->pTmpSpace );
    +    sqlite3OsClose(pPager->fd);
    +    sqlite3_free(pPager);
    +    return rc;
    +  }
    +
    +  /* Initialize the PCache object. */
    +  assert( nExtra<1000 );
    +  nExtra = ROUND8(nExtra);
    +  sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,
    +                    !memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
    +
    +  PAGERTRACE(("OPEN %d %s\n", FILEHANDLEID(pPager->fd), pPager->zFilename));
    +  IOTRACE(("OPEN %p %s\n", pPager, pPager->zFilename))
    +
    +  pPager->useJournal = (u8)useJournal;
    +  pPager->noReadlock = (noReadlock && readOnly) ?1:0;
    +  /* pPager->stmtOpen = 0; */
    +  /* pPager->stmtInUse = 0; */
    +  /* pPager->nRef = 0; */
    +  pPager->dbSizeValid = (u8)memDb;
    +  /* pPager->stmtSize = 0; */
    +  /* pPager->stmtJSize = 0; */
    +  /* pPager->nPage = 0; */
    +  pPager->mxPgno = SQLITE_MAX_PAGE_COUNT;
    +  /* pPager->state = PAGER_UNLOCK; */
    +  assert( pPager->state == (tempFile ? PAGER_EXCLUSIVE : PAGER_UNLOCK) );
    +  /* pPager->errMask = 0; */
    +  pPager->tempFile = (u8)tempFile;
    +  assert( tempFile==PAGER_LOCKINGMODE_NORMAL 
    +          || tempFile==PAGER_LOCKINGMODE_EXCLUSIVE );
    +  assert( PAGER_LOCKINGMODE_EXCLUSIVE==1 );
    +  pPager->exclusiveMode = (u8)tempFile; 
    +  pPager->changeCountDone = pPager->tempFile;
    +  pPager->memDb = (u8)memDb;
    +  pPager->readOnly = (u8)readOnly;
    +  /* pPager->needSync = 0; */
    +  assert( useJournal || pPager->tempFile );
    +  pPager->noSync = pPager->tempFile;
    +  pPager->fullSync = pPager->noSync ?0:1;
    +  pPager->sync_flags = SQLITE_SYNC_NORMAL;
    +  /* pPager->pFirst = 0; */
    +  /* pPager->pFirstSynced = 0; */
    +  /* pPager->pLast = 0; */
    +  pPager->nExtra = (u16)nExtra;
    +  pPager->journalSizeLimit = SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT;
    +  assert( isOpen(pPager->fd) || tempFile );
    +  setSectorSize(pPager);
    +  if( !useJournal ){
    +    pPager->journalMode = PAGER_JOURNALMODE_OFF;
    +  }else if( memDb ){
    +    pPager->journalMode = PAGER_JOURNALMODE_MEMORY;
    +  }
    +  /* pPager->xBusyHandler = 0; */
    +  /* pPager->pBusyHandlerArg = 0; */
    +  pPager->xReiniter = xReinit;
    +  /* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */
    +  *ppPager = pPager;
    +  return SQLITE_OK;
    +}
    +
    +
    +
    +/*
    +** This function is called after transitioning from PAGER_UNLOCK to
    +** PAGER_SHARED state. It tests if there is a hot journal present in
    +** the file-system for the given pager. A hot journal is one that 
    +** needs to be played back. According to this function, a hot-journal
    +** file exists if the following criteria are met:
    +**
    +**   * The journal file exists in the file system, and
    +**   * No process holds a RESERVED or greater lock on the database file, and
    +**   * The database file itself is greater than 0 bytes in size, and
    +**   * The first byte of the journal file exists and is not 0x00.
    +**
    +** If the current size of the database file is 0 but a journal file
    +** exists, that is probably an old journal left over from a prior
    +** database with the same name. In this case the journal file is
    +** just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK
    +** is returned.
    +**
    +** This routine does not check if there is a master journal filename
    +** at the end of the file. If there is, and that master journal file
    +** does not exist, then the journal file is not really hot. In this
    +** case this routine will return a false-positive. The pager_playback()
    +** routine will discover that the journal file is not really hot and 
    +** will not roll it back. 
    +**
    +** If a hot-journal file is found to exist, *pExists is set to 1 and 
    +** SQLITE_OK returned. If no hot-journal file is present, *pExists is
    +** set to 0 and SQLITE_OK returned. If an IO error occurs while trying
    +** to determine whether or not a hot-journal file exists, the IO error
    +** code is returned and the value of *pExists is undefined.
    +*/
    +static int hasHotJournal(Pager *pPager, int *pExists){
    +  sqlite3_vfs * const pVfs = pPager->pVfs;
    +  int rc;                       /* Return code */
    +  int exists;                   /* True if a journal file is present */
    +
    +  assert( pPager!=0 );
    +  assert( pPager->useJournal );
    +  assert( isOpen(pPager->fd) );
    +  assert( !isOpen(pPager->jfd) );
    +  assert( pPager->state <= PAGER_SHARED );
    +
    +  *pExists = 0;
    +  rc = sqlite3OsAccess(pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &exists);
    +  if( rc==SQLITE_OK && exists ){
    +    int locked;                 /* True if some process holds a RESERVED lock */
    +
    +    /* Race condition here:  Another process might have been holding the
    +    ** the RESERVED lock and have a journal open at the sqlite3OsAccess() 
    +    ** call above, but then delete the journal and drop the lock before
    +    ** we get to the following sqlite3OsCheckReservedLock() call.  If that
    +    ** is the case, this routine might think there is a hot journal when
    +    ** in fact there is none.  This results in a false-positive which will
    +    ** be dealt with by the playback routine.  Ticket #3883.
    +    */
    +    rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
    +    if( rc==SQLITE_OK && !locked ){
    +      int nPage;
    +
    +      /* Check the size of the database file. If it consists of 0 pages,
    +      ** then delete the journal file. See the header comment above for 
    +      ** the reasoning here.  Delete the obsolete journal file under
    +      ** a RESERVED lock to avoid race conditions and to avoid violating
    +      ** [H33020].
    +      */
    +      rc = sqlite3PagerPagecount(pPager, &nPage);
    +      if( rc==SQLITE_OK ){
    +        if( nPage==0 ){
    +          sqlite3BeginBenignMalloc();
    +          if( sqlite3OsLock(pPager->fd, RESERVED_LOCK)==SQLITE_OK ){
    +            sqlite3OsDelete(pVfs, pPager->zJournal, 0);
    +            sqlite3OsUnlock(pPager->fd, SHARED_LOCK);
    +          }
    +          sqlite3EndBenignMalloc();
    +        }else{
    +          /* The journal file exists and no other connection has a reserved
    +          ** or greater lock on the database file. Now check that there is
    +          ** at least one non-zero bytes at the start of the journal file.
    +          ** If there is, then we consider this journal to be hot. If not, 
    +          ** it can be ignored.
    +          */
    +          int f = SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL;
    +          rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &f);
    +          if( rc==SQLITE_OK ){
    +            u8 first = 0;
    +            rc = sqlite3OsRead(pPager->jfd, (void *)&first, 1, 0);
    +            if( rc==SQLITE_IOERR_SHORT_READ ){
    +              rc = SQLITE_OK;
    +            }
    +            sqlite3OsClose(pPager->jfd);
    +            *pExists = (first!=0);
    +          }else if( rc==SQLITE_CANTOPEN ){
    +            /* If we cannot open the rollback journal file in order to see if
    +            ** its has a zero header, that might be due to an I/O error, or
    +            ** it might be due to the race condition described above and in
    +            ** ticket #3883.  Either way, assume that the journal is hot.
    +            ** This might be a false positive.  But if it is, then the
    +            ** automatic journal playback and recovery mechanism will deal
    +            ** with it under an EXCLUSIVE lock where we do not need to
    +            ** worry so much with race conditions.
    +            */
    +            *pExists = 1;
    +            rc = SQLITE_OK;
    +          }
    +        }
    +      }
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Read the content for page pPg out of the database file and into 
    +** pPg->pData. A shared lock or greater must be held on the database
    +** file before this function is called.
    +**
    +** If page 1 is read, then the value of Pager.dbFileVers[] is set to
    +** the value read from the database file.
    +**
    +** If an IO error occurs, then the IO error is returned to the caller.
    +** Otherwise, SQLITE_OK is returned.
    +*/
    +static int readDbPage(PgHdr *pPg){
    +  Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */
    +  Pgno pgno = pPg->pgno;       /* Page number to read */
    +  int rc;                      /* Return code */
    +  i64 iOffset;                 /* Byte offset of file to read from */
    +
    +  assert( pPager->state>=PAGER_SHARED && !MEMDB );
    +  assert( isOpen(pPager->fd) );
    +
    +  if( NEVER(!isOpen(pPager->fd)) ){
    +    assert( pPager->tempFile );
    +    memset(pPg->pData, 0, pPager->pageSize);
    +    return SQLITE_OK;
    +  }
    +  iOffset = (pgno-1)*(i64)pPager->pageSize;
    +  rc = sqlite3OsRead(pPager->fd, pPg->pData, pPager->pageSize, iOffset);
    +  if( rc==SQLITE_IOERR_SHORT_READ ){
    +    rc = SQLITE_OK;
    +  }
    +  if( pgno==1 ){
    +    u8 *dbFileVers = &((u8*)pPg->pData)[24];
    +    memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers));
    +  }
    +  CODEC1(pPager, pPg->pData, pgno, 3, rc = SQLITE_NOMEM);
    +
    +  PAGER_INCR(sqlite3_pager_readdb_count);
    +  PAGER_INCR(pPager->nRead);
    +  IOTRACE(("PGIN %p %d\n", pPager, pgno));
    +  PAGERTRACE(("FETCH %d page %d hash(%08x)\n",
    +               PAGERID(pPager), pgno, pager_pagehash(pPg)));
    +
    +  return rc;
    +}
    +
    +/*
    +** This function is called to obtain a shared lock on the database file.
    +** It is illegal to call sqlite3PagerAcquire() until after this function
    +** has been successfully called. If a shared-lock is already held when
    +** this function is called, it is a no-op.
    +**
    +** The following operations are also performed by this function.
    +**
    +**   1) If the pager is currently in PAGER_UNLOCK state (no lock held
    +**      on the database file), then an attempt is made to obtain a
    +**      SHARED lock on the database file. Immediately after obtaining
    +**      the SHARED lock, the file-system is checked for a hot-journal,
    +**      which is played back if present. Following any hot-journal 
    +**      rollback, the contents of the cache are validated by checking
    +**      the 'change-counter' field of the database file header and
    +**      discarded if they are found to be invalid.
    +**
    +**   2) If the pager is running in exclusive-mode, and there are currently
    +**      no outstanding references to any pages, and is in the error state,
    +**      then an attempt is made to clear the error state by discarding
    +**      the contents of the page cache and rolling back any open journal
    +**      file.
    +**
    +** If the operation described by (2) above is not attempted, and if the
    +** pager is in an error state other than SQLITE_FULL when this is called,
    +** the error state error code is returned. It is permitted to read the
    +** database when in SQLITE_FULL error state.
    +**
    +** Otherwise, if everything is successful, SQLITE_OK is returned. If an
    +** IO error occurs while locking the database, checking for a hot-journal
    +** file or rolling back a journal file, the IO error code is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
    +  int rc = SQLITE_OK;                /* Return code */
    +  int isErrorReset = 0;              /* True if recovering from error state */
    +
    +  /* This routine is only called from b-tree and only when there are no
    +  ** outstanding pages */
    +  assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
    +  if( NEVER(MEMDB && pPager->errCode) ){ return pPager->errCode; }
    +
    +  /* If this database is in an error-state, now is a chance to clear
    +  ** the error. Discard the contents of the pager-cache and rollback
    +  ** any hot journal in the file-system.
    +  */
    +  if( pPager->errCode ){
    +    if( isOpen(pPager->jfd) || pPager->zJournal ){
    +      isErrorReset = 1;
    +    }
    +    pPager->errCode = SQLITE_OK;
    +    pager_reset(pPager);
    +  }
    +
    +  if( pPager->state==PAGER_UNLOCK || isErrorReset ){
    +    sqlite3_vfs * const pVfs = pPager->pVfs;
    +    int isHotJournal = 0;
    +    assert( !MEMDB );
    +    assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
    +    if( pPager->noReadlock ){
    +      assert( pPager->readOnly );
    +      pPager->state = PAGER_SHARED;
    +    }else{
    +      rc = pager_wait_on_lock(pPager, SHARED_LOCK);
    +      if( rc!=SQLITE_OK ){
    +        assert( pPager->state==PAGER_UNLOCK );
    +        return pager_error(pPager, rc);
    +      }
    +    }
    +    assert( pPager->state>=SHARED_LOCK );
    +
    +    /* If a journal file exists, and there is no RESERVED lock on the
    +    ** database file, then it either needs to be played back or deleted.
    +    */
    +    if( !isErrorReset ){
    +      assert( pPager->state <= PAGER_SHARED );
    +      rc = hasHotJournal(pPager, &isHotJournal);
    +      if( rc!=SQLITE_OK ){
    +        goto failed;
    +      }
    +    }
    +    if( isErrorReset || isHotJournal ){
    +      /* Get an EXCLUSIVE lock on the database file. At this point it is
    +      ** important that a RESERVED lock is not obtained on the way to the
    +      ** EXCLUSIVE lock. If it were, another process might open the
    +      ** database file, detect the RESERVED lock, and conclude that the
    +      ** database is safe to read while this process is still rolling the 
    +      ** hot-journal back.
    +      ** 
    +      ** Because the intermediate RESERVED lock is not requested, any
    +      ** other process attempting to access the database file will get to 
    +      ** this point in the code and fail to obtain its own EXCLUSIVE lock 
    +      ** on the database file.
    +      */
    +      if( pPager->state<EXCLUSIVE_LOCK ){
    +        rc = sqlite3OsLock(pPager->fd, EXCLUSIVE_LOCK);
    +        if( rc!=SQLITE_OK ){
    +          rc = pager_error(pPager, rc);
    +          goto failed;
    +        }
    +        pPager->state = PAGER_EXCLUSIVE;
    +      }
    + 
    +      /* Open the journal for read/write access. This is because in 
    +      ** exclusive-access mode the file descriptor will be kept open and
    +      ** possibly used for a transaction later on. On some systems, the
    +      ** OsTruncate() call used in exclusive-access mode also requires
    +      ** a read/write file handle.
    +      */
    +      if( !isOpen(pPager->jfd) ){
    +        int res;
    +        rc = sqlite3OsAccess(pVfs,pPager->zJournal,SQLITE_ACCESS_EXISTS,&res);
    +        if( rc==SQLITE_OK ){
    +          if( res ){
    +            int fout = 0;
    +            int f = SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_JOURNAL;
    +            assert( !pPager->tempFile );
    +            rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout);
    +            assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
    +            if( rc==SQLITE_OK && fout&SQLITE_OPEN_READONLY ){
    +              rc = SQLITE_CANTOPEN;
    +              sqlite3OsClose(pPager->jfd);
    +            }
    +          }else{
    +            /* If the journal does not exist, it usually means that some 
    +            ** other connection managed to get in and roll it back before 
    +            ** this connection obtained the exclusive lock above. Or, it 
    +            ** may mean that the pager was in the error-state when this
    +            ** function was called and the journal file does not exist.  */
    +            rc = pager_end_transaction(pPager, 0);
    +          }
    +        }
    +      }
    +      if( rc!=SQLITE_OK ){
    +        goto failed;
    +      }
    +
    +      /* TODO: Why are these cleared here? Is it necessary? */
    +      pPager->journalStarted = 0;
    +      pPager->journalOff = 0;
    +      pPager->setMaster = 0;
    +      pPager->journalHdr = 0;
    + 
    +      /* Playback and delete the journal.  Drop the database write
    +      ** lock and reacquire the read lock. Purge the cache before
    +      ** playing back the hot-journal so that we don't end up with
    +      ** an inconsistent cache.
    +      */
    +      if( isOpen(pPager->jfd) ){
    +        rc = pager_playback(pPager, 1);
    +        if( rc!=SQLITE_OK ){
    +          rc = pager_error(pPager, rc);
    +          goto failed;
    +        }
    +      }
    +      assert( (pPager->state==PAGER_SHARED)
    +           || (pPager->exclusiveMode && pPager->state>PAGER_SHARED)
    +      );
    +    }
    +
    +    if( pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0 ){
    +      /* The shared-lock has just been acquired on the database file
    +      ** and there are already pages in the cache (from a previous
    +      ** read or write transaction).  Check to see if the database
    +      ** has been modified.  If the database has changed, flush the
    +      ** cache.
    +      **
    +      ** Database changes is detected by looking at 15 bytes beginning
    +      ** at offset 24 into the file.  The first 4 of these 16 bytes are
    +      ** a 32-bit counter that is incremented with each change.  The
    +      ** other bytes change randomly with each file change when
    +      ** a codec is in use.
    +      ** 
    +      ** There is a vanishingly small chance that a change will not be 
    +      ** detected.  The chance of an undetected change is so small that
    +      ** it can be neglected.
    +      */
    +      char dbFileVers[sizeof(pPager->dbFileVers)];
    +      sqlite3PagerPagecount(pPager, 0);
    +
    +      if( pPager->errCode ){
    +        rc = pPager->errCode;
    +        goto failed;
    +      }
    +
    +      assert( pPager->dbSizeValid );
    +      if( pPager->dbSize>0 ){
    +        IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
    +        rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
    +        if( rc!=SQLITE_OK ){
    +          goto failed;
    +        }
    +      }else{
    +        memset(dbFileVers, 0, sizeof(dbFileVers));
    +      }
    +
    +      if( memcmp(pPager->dbFileVers, dbFileVers, sizeof(dbFileVers))!=0 ){
    +        pager_reset(pPager);
    +      }
    +    }
    +    assert( pPager->exclusiveMode || pPager->state==PAGER_SHARED );
    +  }
    +
    + failed:
    +  if( rc!=SQLITE_OK ){
    +    /* pager_unlock() is a no-op for exclusive mode and in-memory databases. */
    +    pager_unlock(pPager);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** If the reference count has reached zero, rollback any active
    +** transaction and unlock the pager.
    +**
    +** Except, in locking_mode=EXCLUSIVE when there is nothing to in
    +** the rollback journal, the unlock is not performed and there is
    +** nothing to rollback, so this routine is a no-op.
    +*/ 
    +static void pagerUnlockIfUnused(Pager *pPager){
    +  if( (sqlite3PcacheRefCount(pPager->pPCache)==0)
    +   && (!pPager->exclusiveMode || pPager->journalOff>0) 
    +  ){
    +    pagerUnlockAndRollback(pPager);
    +  }
    +}
    +
    +/*
    +** Acquire a reference to page number pgno in pager pPager (a page
    +** reference has type DbPage*). If the requested reference is 
    +** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.
    +**
    +** If the requested page is already in the cache, it is returned. 
    +** Otherwise, a new page object is allocated and populated with data
    +** read from the database file. In some cases, the pcache module may
    +** choose not to allocate a new page object and may reuse an existing
    +** object with no outstanding references.
    +**
    +** The extra data appended to a page is always initialized to zeros the 
    +** first time a page is loaded into memory. If the page requested is 
    +** already in the cache when this function is called, then the extra
    +** data is left as it was when the page object was last used.
    +**
    +** If the database image is smaller than the requested page or if a 
    +** non-zero value is passed as the noContent parameter and the 
    +** requested page is not already stored in the cache, then no 
    +** actual disk read occurs. In this case the memory image of the 
    +** page is initialized to all zeros. 
    +**
    +** If noContent is true, it means that we do not care about the contents
    +** of the page. This occurs in two seperate scenarios:
    +**
    +**   a) When reading a free-list leaf page from the database, and
    +**
    +**   b) When a savepoint is being rolled back and we need to load
    +**      a new page into the cache to populate with the data read
    +**      from the savepoint journal.
    +**
    +** If noContent is true, then the data returned is zeroed instead of
    +** being read from the database. Additionally, the bits corresponding
    +** to pgno in Pager.pInJournal (bitvec of pages already written to the
    +** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open
    +** savepoints are set. This means if the page is made writable at any
    +** point in the future, using a call to sqlite3PagerWrite(), its contents
    +** will not be journaled. This saves IO.
    +**
    +** The acquisition might fail for several reasons.  In all cases,
    +** an appropriate error code is returned and *ppPage is set to NULL.
    +**
    +** See also sqlite3PagerLookup().  Both this routine and Lookup() attempt
    +** to find a page in the in-memory cache first.  If the page is not already
    +** in memory, this routine goes to disk to read it in whereas Lookup()
    +** just returns 0.  This routine acquires a read-lock the first time it
    +** has to go to disk, and could also playback an old journal if necessary.
    +** Since Lookup() never goes to disk, it never has to deal with locks
    +** or journal files.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerAcquire(
    +  Pager *pPager,      /* The pager open on the database file */
    +  Pgno pgno,          /* Page number to fetch */
    +  DbPage **ppPage,    /* Write a pointer to the page here */
    +  int noContent       /* Do not bother reading content from disk if true */
    +){
    +  int rc;
    +  PgHdr *pPg;
    +
    +  assert( assert_pager_state(pPager) );
    +  assert( pPager->state>PAGER_UNLOCK );
    +
    +  if( pgno==0 ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +
    +  /* If the pager is in the error state, return an error immediately. 
    +  ** Otherwise, request the page from the PCache layer. */
    +  if( pPager->errCode!=SQLITE_OK && pPager->errCode!=SQLITE_FULL ){
    +    rc = pPager->errCode;
    +  }else{
    +    rc = sqlite3PcacheFetch(pPager->pPCache, pgno, 1, ppPage);
    +  }
    +
    +  if( rc!=SQLITE_OK ){
    +    /* Either the call to sqlite3PcacheFetch() returned an error or the
    +    ** pager was already in the error-state when this function was called.
    +    ** Set pPg to 0 and jump to the exception handler.  */
    +    pPg = 0;
    +    goto pager_acquire_err;
    +  }
    +  assert( (*ppPage)->pgno==pgno );
    +  assert( (*ppPage)->pPager==pPager || (*ppPage)->pPager==0 );
    +
    +  if( (*ppPage)->pPager ){
    +    /* In this case the pcache already contains an initialized copy of
    +    ** the page. Return without further ado.  */
    +    assert( pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager) );
    +    PAGER_INCR(pPager->nHit);
    +    return SQLITE_OK;
    +
    +  }else{
    +    /* The pager cache has created a new page. Its content needs to 
    +    ** be initialized.  */
    +    int nMax;
    +
    +    PAGER_INCR(pPager->nMiss);
    +    pPg = *ppPage;
    +    pPg->pPager = pPager;
    +
    +    /* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page
    +    ** number greater than this, or the unused locking-page, is requested. */
    +    if( pgno>PAGER_MAX_PGNO || pgno==PAGER_MJ_PGNO(pPager) ){
    +      rc = SQLITE_CORRUPT_BKPT;
    +      goto pager_acquire_err;
    +    }
    +
    +    rc = sqlite3PagerPagecount(pPager, &nMax);
    +    if( rc!=SQLITE_OK ){
    +      goto pager_acquire_err;
    +    }
    +
    +    if( nMax<(int)pgno || MEMDB || noContent ){
    +      if( pgno>pPager->mxPgno ){
    +	rc = SQLITE_FULL;
    +	goto pager_acquire_err;
    +      }
    +      if( noContent ){
    +        /* Failure to set the bits in the InJournal bit-vectors is benign.
    +        ** It merely means that we might do some extra work to journal a 
    +        ** page that does not need to be journaled.  Nevertheless, be sure 
    +        ** to test the case where a malloc error occurs while trying to set 
    +        ** a bit in a bit vector.
    +        */
    +        sqlite3BeginBenignMalloc();
    +        if( pgno<=pPager->dbOrigSize ){
    +          TESTONLY( rc = ) sqlite3BitvecSet(pPager->pInJournal, pgno);
    +          testcase( rc==SQLITE_NOMEM );
    +        }
    +        TESTONLY( rc = ) addToSavepointBitvecs(pPager, pgno);
    +        testcase( rc==SQLITE_NOMEM );
    +        sqlite3EndBenignMalloc();
    +      }else{
    +        memset(pPg->pData, 0, pPager->pageSize);
    +      }
    +      IOTRACE(("ZERO %p %d\n", pPager, pgno));
    +    }else{
    +      assert( pPg->pPager==pPager );
    +      rc = readDbPage(pPg);
    +      if( rc!=SQLITE_OK ){
    +        goto pager_acquire_err;
    +      }
    +    }
    +#ifdef SQLITE_CHECK_PAGES
    +    pPg->pageHash = pager_pagehash(pPg);
    +#endif
    +  }
    +
    +  return SQLITE_OK;
    +
    +pager_acquire_err:
    +  assert( rc!=SQLITE_OK );
    +  if( pPg ){
    +    sqlite3PcacheDrop(pPg);
    +  }
    +  pagerUnlockIfUnused(pPager);
    +
    +  *ppPage = 0;
    +  return rc;
    +}
    +
    +/*
    +** Acquire a page if it is already in the in-memory cache.  Do
    +** not read the page from disk.  Return a pointer to the page,
    +** or 0 if the page is not in cache. Also, return 0 if the 
    +** pager is in PAGER_UNLOCK state when this function is called,
    +** or if the pager is in an error state other than SQLITE_FULL.
    +**
    +** See also sqlite3PagerGet().  The difference between this routine
    +** and sqlite3PagerGet() is that _get() will go to the disk and read
    +** in the page if the page is not already in cache.  This routine
    +** returns NULL if the page is not in cache or if a disk I/O error 
    +** has ever happened.
    +*/
    +SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
    +  PgHdr *pPg = 0;
    +  assert( pPager!=0 );
    +  assert( pgno!=0 );
    +  assert( pPager->pPCache!=0 );
    +  assert( pPager->state > PAGER_UNLOCK );
    +  sqlite3PcacheFetch(pPager->pPCache, pgno, 0, &pPg);
    +  return pPg;
    +}
    +
    +/*
    +** Release a page reference.
    +**
    +** If the number of references to the page drop to zero, then the
    +** page is added to the LRU list.  When all references to all pages
    +** are released, a rollback occurs and the lock on the database is
    +** removed.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
    +  if( pPg ){
    +    Pager *pPager = pPg->pPager;
    +    sqlite3PcacheRelease(pPg);
    +    pagerUnlockIfUnused(pPager);
    +  }
    +}
    +
    +/*
    +** If the main journal file has already been opened, ensure that the
    +** sub-journal file is open too. If the main journal is not open,
    +** this function is a no-op.
    +**
    +** SQLITE_OK is returned if everything goes according to plan. 
    +** An SQLITE_IOERR_XXX error code is returned if a call to 
    +** sqlite3OsOpen() fails.
    +*/
    +static int openSubJournal(Pager *pPager){
    +  int rc = SQLITE_OK;
    +  if( isOpen(pPager->jfd) && !isOpen(pPager->sjfd) ){
    +    if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->subjInMemory ){
    +      sqlite3MemJournalOpen(pPager->sjfd);
    +    }else{
    +      rc = pagerOpentemp(pPager, pPager->sjfd, SQLITE_OPEN_SUBJOURNAL);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** This function is called at the start of every write transaction.
    +** There must already be a RESERVED or EXCLUSIVE lock on the database 
    +** file when this routine is called.
    +**
    +** Open the journal file for pager pPager and write a journal header
    +** to the start of it. If there are active savepoints, open the sub-journal
    +** as well. This function is only used when the journal file is being 
    +** opened to write a rollback log for a transaction. It is not used 
    +** when opening a hot journal file to roll it back.
    +**
    +** If the journal file is already open (as it may be in exclusive mode),
    +** then this function just writes a journal header to the start of the
    +** already open file. 
    +**
    +** Whether or not the journal file is opened by this function, the
    +** Pager.pInJournal bitvec structure is allocated.
    +**
    +** Return SQLITE_OK if everything is successful. Otherwise, return 
    +** SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or 
    +** an IO error code if opening or writing the journal file fails.
    +*/
    +static int pager_open_journal(Pager *pPager){
    +  int rc = SQLITE_OK;                        /* Return code */
    +  sqlite3_vfs * const pVfs = pPager->pVfs;   /* Local cache of vfs pointer */
    +
    +  assert( pPager->state>=PAGER_RESERVED );
    +  assert( pPager->useJournal );
    +  assert( pPager->journalMode!=PAGER_JOURNALMODE_OFF );
    +  assert( pPager->pInJournal==0 );
    +  
    +  /* If already in the error state, this function is a no-op.  But on
    +  ** the other hand, this routine is never called if we are already in
    +  ** an error state. */
    +  if( NEVER(pPager->errCode) ) return pPager->errCode;
    +
    +  /* TODO: Is it really possible to get here with dbSizeValid==0? If not,
    +  ** the call to PagerPagecount() can be removed.
    +  */
    +  testcase( pPager->dbSizeValid==0 );
    +  sqlite3PagerPagecount(pPager, 0);
    +
    +  pPager->pInJournal = sqlite3BitvecCreate(pPager->dbSize);
    +  if( pPager->pInJournal==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  /* Open the journal file if it is not already open. */
    +  if( !isOpen(pPager->jfd) ){
    +    if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ){
    +      sqlite3MemJournalOpen(pPager->jfd);
    +    }else{
    +      const int flags =                   /* VFS flags to open journal file */
    +        SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
    +        (pPager->tempFile ? 
    +          (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL):
    +          (SQLITE_OPEN_MAIN_JOURNAL)
    +        );
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +      rc = sqlite3JournalOpen(
    +          pVfs, pPager->zJournal, pPager->jfd, flags, jrnlBufferSize(pPager)
    +      );
    +#else
    +      rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
    +#endif
    +    }
    +    assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
    +  }
    +
    +
    +  /* Write the first journal header to the journal file and open 
    +  ** the sub-journal if necessary.
    +  */
    +  if( rc==SQLITE_OK ){
    +    /* TODO: Check if all of these are really required. */
    +    pPager->dbOrigSize = pPager->dbSize;
    +    pPager->journalStarted = 0;
    +    pPager->needSync = 0;
    +    pPager->nRec = 0;
    +    pPager->journalOff = 0;
    +    pPager->setMaster = 0;
    +    pPager->journalHdr = 0;
    +    rc = writeJournalHdr(pPager);
    +  }
    +  if( rc==SQLITE_OK && pPager->nSavepoint ){
    +    rc = openSubJournal(pPager);
    +  }
    +
    +  if( rc!=SQLITE_OK ){
    +    sqlite3BitvecDestroy(pPager->pInJournal);
    +    pPager->pInJournal = 0;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Begin a write-transaction on the specified pager object. If a 
    +** write-transaction has already been opened, this function is a no-op.
    +**
    +** If the exFlag argument is false, then acquire at least a RESERVED
    +** lock on the database file. If exFlag is true, then acquire at least
    +** an EXCLUSIVE lock. If such a lock is already held, no locking 
    +** functions need be called.
    +**
    +** If this is not a temporary or in-memory file and, the journal file is 
    +** opened if it has not been already. For a temporary file, the opening 
    +** of the journal file is deferred until there is an actual need to 
    +** write to the journal. TODO: Why handle temporary files differently?
    +**
    +** If the journal file is opened (or if it is already open), then a
    +** journal-header is written to the start of it.
    +**
    +** If the subjInMemory argument is non-zero, then any sub-journal opened
    +** within this transaction will be opened as an in-memory file. This
    +** has no effect if the sub-journal is already opened (as it may be when
    +** running in exclusive mode) or if the transaction does not require a
    +** sub-journal. If the subjInMemory argument is zero, then any required
    +** sub-journal is implemented in-memory if pPager is an in-memory database, 
    +** or using a temporary file otherwise.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory){
    +  int rc = SQLITE_OK;
    +  assert( pPager->state!=PAGER_UNLOCK );
    +  pPager->subjInMemory = (u8)subjInMemory;
    +  if( pPager->state==PAGER_SHARED ){
    +    assert( pPager->pInJournal==0 );
    +    assert( !MEMDB && !pPager->tempFile );
    +
    +    /* Obtain a RESERVED lock on the database file. If the exFlag parameter
    +    ** is true, then immediately upgrade this to an EXCLUSIVE lock. The
    +    ** busy-handler callback can be used when upgrading to the EXCLUSIVE
    +    ** lock, but not when obtaining the RESERVED lock.
    +    */
    +    rc = sqlite3OsLock(pPager->fd, RESERVED_LOCK);
    +    if( rc==SQLITE_OK ){
    +      pPager->state = PAGER_RESERVED;
    +      if( exFlag ){
    +        rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
    +      }
    +    }
    +
    +    /* If the required locks were successfully obtained, open the journal
    +    ** file and write the first journal-header to it.
    +    */
    +    if( rc==SQLITE_OK && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
    +      rc = pager_open_journal(pPager);
    +    }
    +  }else if( isOpen(pPager->jfd) && pPager->journalOff==0 ){
    +    /* This happens when the pager was in exclusive-access mode the last
    +    ** time a (read or write) transaction was successfully concluded
    +    ** by this connection. Instead of deleting the journal file it was 
    +    ** kept open and either was truncated to 0 bytes or its header was
    +    ** overwritten with zeros.
    +    */
    +    assert( pPager->nRec==0 );
    +    assert( pPager->dbOrigSize==0 );
    +    assert( pPager->pInJournal==0 );
    +    rc = pager_open_journal(pPager);
    +  }
    +
    +  PAGERTRACE(("TRANSACTION %d\n", PAGERID(pPager)));
    +  assert( !isOpen(pPager->jfd) || pPager->journalOff>0 || rc!=SQLITE_OK );
    +  if( rc!=SQLITE_OK ){
    +    assert( !pPager->dbModified );
    +    /* Ignore any IO error that occurs within pager_end_transaction(). The
    +    ** purpose of this call is to reset the internal state of the pager
    +    ** sub-system. It doesn't matter if the journal-file is not properly
    +    ** finalized at this point (since it is not a valid journal file anyway).
    +    */
    +    pager_end_transaction(pPager, 0);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Mark a single data page as writeable. The page is written into the 
    +** main journal or sub-journal as required. If the page is written into
    +** one of the journals, the corresponding bit is set in the 
    +** Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs
    +** of any open savepoints as appropriate.
    +*/
    +static int pager_write(PgHdr *pPg){
    +  void *pData = pPg->pData;
    +  Pager *pPager = pPg->pPager;
    +  int rc = SQLITE_OK;
    +
    +  /* This routine is not called unless a transaction has already been
    +  ** started.
    +  */
    +  assert( pPager->state>=PAGER_RESERVED );
    +
    +  /* If an error has been previously detected, we should not be
    +  ** calling this routine.  Repeat the error for robustness.
    +  */
    +  if( NEVER(pPager->errCode) )  return pPager->errCode;
    +
    +  /* Higher-level routines never call this function if database is not
    +  ** writable.  But check anyway, just for robustness. */
    +  if( NEVER(pPager->readOnly) ) return SQLITE_PERM;
    +
    +  assert( !pPager->setMaster );
    +
    +  CHECK_PAGE(pPg);
    +
    +  /* Mark the page as dirty.  If the page has already been written
    +  ** to the journal then we can return right away.
    +  */
    +  sqlite3PcacheMakeDirty(pPg);
    +  if( pageInJournal(pPg) && !subjRequiresPage(pPg) ){
    +    pPager->dbModified = 1;
    +  }else{
    +
    +    /* If we get this far, it means that the page needs to be
    +    ** written to the transaction journal or the ckeckpoint journal
    +    ** or both.
    +    **
    +    ** Higher level routines should have already started a transaction,
    +    ** which means they have acquired the necessary locks and opened
    +    ** a rollback journal.  Double-check to makes sure this is the case.
    +    */
    +    rc = sqlite3PagerBegin(pPager, 0, pPager->subjInMemory);
    +    if( NEVER(rc!=SQLITE_OK) ){
    +      return rc;
    +    }
    +    if( !isOpen(pPager->jfd) && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
    +      assert( pPager->useJournal );
    +      rc = pager_open_journal(pPager);
    +      if( rc!=SQLITE_OK ) return rc;
    +    }
    +    pPager->dbModified = 1;
    +  
    +    /* The transaction journal now exists and we have a RESERVED or an
    +    ** EXCLUSIVE lock on the main database file.  Write the current page to
    +    ** the transaction journal if it is not there already.
    +    */
    +    if( !pageInJournal(pPg) && isOpen(pPager->jfd) ){
    +      if( pPg->pgno<=pPager->dbOrigSize ){
    +        u32 cksum;
    +        char *pData2;
    +
    +        /* We should never write to the journal file the page that
    +        ** contains the database locks.  The following assert verifies
    +        ** that we do not. */
    +        assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );
    +        CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
    +        cksum = pager_cksum(pPager, (u8*)pData2);
    +        rc = write32bits(pPager->jfd, pPager->journalOff, pPg->pgno);
    +        if( rc==SQLITE_OK ){
    +          rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize,
    +                              pPager->journalOff + 4);
    +          pPager->journalOff += pPager->pageSize+4;
    +        }
    +        if( rc==SQLITE_OK ){
    +          rc = write32bits(pPager->jfd, pPager->journalOff, cksum);
    +          pPager->journalOff += 4;
    +        }
    +        IOTRACE(("JOUT %p %d %lld %d\n", pPager, pPg->pgno, 
    +                 pPager->journalOff, pPager->pageSize));
    +        PAGER_INCR(sqlite3_pager_writej_count);
    +        PAGERTRACE(("JOURNAL %d page %d needSync=%d hash(%08x)\n",
    +             PAGERID(pPager), pPg->pgno, 
    +             ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));
    +
    +        /* Even if an IO or diskfull error occurred while journalling the
    +        ** page in the block above, set the need-sync flag for the page.
    +        ** Otherwise, when the transaction is rolled back, the logic in
    +        ** playback_one_page() will think that the page needs to be restored
    +        ** in the database file. And if an IO error occurs while doing so,
    +        ** then corruption may follow.
    +        */
    +        if( !pPager->noSync ){
    +          pPg->flags |= PGHDR_NEED_SYNC;
    +          pPager->needSync = 1;
    +        }
    +
    +        /* An error has occurred writing to the journal file. The 
    +        ** transaction will be rolled back by the layer above.
    +        */
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +
    +        pPager->nRec++;
    +        assert( pPager->pInJournal!=0 );
    +        rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);
    +        testcase( rc==SQLITE_NOMEM );
    +        assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
    +        rc |= addToSavepointBitvecs(pPager, pPg->pgno);
    +        if( rc!=SQLITE_OK ){
    +          assert( rc==SQLITE_NOMEM );
    +          return rc;
    +        }
    +      }else{
    +        if( !pPager->journalStarted && !pPager->noSync ){
    +          pPg->flags |= PGHDR_NEED_SYNC;
    +          pPager->needSync = 1;
    +        }
    +        PAGERTRACE(("APPEND %d page %d needSync=%d\n",
    +                PAGERID(pPager), pPg->pgno,
    +               ((pPg->flags&PGHDR_NEED_SYNC)?1:0)));
    +      }
    +    }
    +  
    +    /* If the statement journal is open and the page is not in it,
    +    ** then write the current page to the statement journal.  Note that
    +    ** the statement journal format differs from the standard journal format
    +    ** in that it omits the checksums and the header.
    +    */
    +    if( subjRequiresPage(pPg) ){
    +      rc = subjournalPage(pPg);
    +    }
    +  }
    +
    +  /* Update the database size and return.
    +  */
    +  assert( pPager->state>=PAGER_SHARED );
    +  if( pPager->dbSize<pPg->pgno ){
    +    pPager->dbSize = pPg->pgno;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Mark a data page as writeable. This routine must be called before 
    +** making changes to a page. The caller must check the return value 
    +** of this function and be careful not to change any page data unless 
    +** this routine returns SQLITE_OK.
    +**
    +** The difference between this function and pager_write() is that this
    +** function also deals with the special case where 2 or more pages
    +** fit on a single disk sector. In this case all co-resident pages
    +** must have been written to the journal file before returning.
    +**
    +** If an error occurs, SQLITE_NOMEM or an IO error code is returned
    +** as appropriate. Otherwise, SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerWrite(DbPage *pDbPage){
    +  int rc = SQLITE_OK;
    +
    +  PgHdr *pPg = pDbPage;
    +  Pager *pPager = pPg->pPager;
    +  Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
    +
    +  if( nPagePerSector>1 ){
    +    Pgno nPageCount;          /* Total number of pages in database file */
    +    Pgno pg1;                 /* First page of the sector pPg is located on. */
    +    int nPage;                /* Number of pages starting at pg1 to journal */
    +    int ii;                   /* Loop counter */
    +    int needSync = 0;         /* True if any page has PGHDR_NEED_SYNC */
    +
    +    /* Set the doNotSync flag to 1. This is because we cannot allow a journal
    +    ** header to be written between the pages journaled by this function.
    +    */
    +    assert( !MEMDB );
    +    assert( pPager->doNotSync==0 );
    +    pPager->doNotSync = 1;
    +
    +    /* This trick assumes that both the page-size and sector-size are
    +    ** an integer power of 2. It sets variable pg1 to the identifier
    +    ** of the first page of the sector pPg is located on.
    +    */
    +    pg1 = ((pPg->pgno-1) & ~(nPagePerSector-1)) + 1;
    +
    +    sqlite3PagerPagecount(pPager, (int *)&nPageCount);
    +    if( pPg->pgno>nPageCount ){
    +      nPage = (pPg->pgno - pg1)+1;
    +    }else if( (pg1+nPagePerSector-1)>nPageCount ){
    +      nPage = nPageCount+1-pg1;
    +    }else{
    +      nPage = nPagePerSector;
    +    }
    +    assert(nPage>0);
    +    assert(pg1<=pPg->pgno);
    +    assert((pg1+nPage)>pPg->pgno);
    +
    +    for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){
    +      Pgno pg = pg1+ii;
    +      PgHdr *pPage;
    +      if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){
    +        if( pg!=PAGER_MJ_PGNO(pPager) ){
    +          rc = sqlite3PagerGet(pPager, pg, &pPage);
    +          if( rc==SQLITE_OK ){
    +            rc = pager_write(pPage);
    +            if( pPage->flags&PGHDR_NEED_SYNC ){
    +              needSync = 1;
    +              assert(pPager->needSync);
    +            }
    +            sqlite3PagerUnref(pPage);
    +          }
    +        }
    +      }else if( (pPage = pager_lookup(pPager, pg))!=0 ){
    +        if( pPage->flags&PGHDR_NEED_SYNC ){
    +          needSync = 1;
    +        }
    +        sqlite3PagerUnref(pPage);
    +      }
    +    }
    +
    +    /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages 
    +    ** starting at pg1, then it needs to be set for all of them. Because
    +    ** writing to any of these nPage pages may damage the others, the
    +    ** journal file must contain sync()ed copies of all of them
    +    ** before any of them can be written out to the database file.
    +    */
    +    if( rc==SQLITE_OK && needSync ){
    +      assert( !MEMDB && pPager->noSync==0 );
    +      for(ii=0; ii<nPage; ii++){
    +        PgHdr *pPage = pager_lookup(pPager, pg1+ii);
    +        if( pPage ){
    +          pPage->flags |= PGHDR_NEED_SYNC;
    +          sqlite3PagerUnref(pPage);
    +        }
    +      }
    +      assert(pPager->needSync);
    +    }
    +
    +    assert( pPager->doNotSync==1 );
    +    pPager->doNotSync = 0;
    +  }else{
    +    rc = pager_write(pDbPage);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return TRUE if the page given in the argument was previously passed
    +** to sqlite3PagerWrite().  In other words, return TRUE if it is ok
    +** to change the content of the page.
    +*/
    +#ifndef NDEBUG
    +SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){
    +  return pPg->flags&PGHDR_DIRTY;
    +}
    +#endif
    +
    +/*
    +** A call to this routine tells the pager that it is not necessary to
    +** write the information on page pPg back to the disk, even though
    +** that page might be marked as dirty.  This happens, for example, when
    +** the page has been added as a leaf of the freelist and so its
    +** content no longer matters.
    +**
    +** The overlying software layer calls this routine when all of the data
    +** on the given page is unused. The pager marks the page as clean so
    +** that it does not get written to disk.
    +**
    +** Tests show that this optimization can quadruple the speed of large 
    +** DELETE operations.
    +*/
    +SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
    +  Pager *pPager = pPg->pPager;
    +  if( (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){
    +    PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
    +    IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
    +    pPg->flags |= PGHDR_DONT_WRITE;
    +#ifdef SQLITE_CHECK_PAGES
    +    pPg->pageHash = pager_pagehash(pPg);
    +#endif
    +  }
    +}
    +
    +/*
    +** This routine is called to increment the value of the database file 
    +** change-counter, stored as a 4-byte big-endian integer starting at 
    +** byte offset 24 of the pager file.
    +**
    +** If the isDirectMode flag is zero, then this is done by calling 
    +** sqlite3PagerWrite() on page 1, then modifying the contents of the
    +** page data. In this case the file will be updated when the current
    +** transaction is committed.
    +**
    +** The isDirectMode flag may only be non-zero if the library was compiled
    +** with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,
    +** if isDirect is non-zero, then the database file is updated directly
    +** by writing an updated version of page 1 using a call to the 
    +** sqlite3OsWrite() function.
    +*/
    +static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
    +  int rc = SQLITE_OK;
    +
    +  /* Declare and initialize constant integer 'isDirect'. If the
    +  ** atomic-write optimization is enabled in this build, then isDirect
    +  ** is initialized to the value passed as the isDirectMode parameter
    +  ** to this function. Otherwise, it is always set to zero.
    +  **
    +  ** The idea is that if the atomic-write optimization is not
    +  ** enabled at compile time, the compiler can omit the tests of
    +  ** 'isDirect' below, as well as the block enclosed in the
    +  ** "if( isDirect )" condition.
    +  */
    +#ifndef SQLITE_ENABLE_ATOMIC_WRITE
    +# define DIRECT_MODE 0
    +  assert( isDirectMode==0 );
    +  UNUSED_PARAMETER(isDirectMode);
    +#else
    +# define DIRECT_MODE isDirectMode
    +#endif
    +
    +  assert( pPager->state>=PAGER_RESERVED );
    +  if( !pPager->changeCountDone && ALWAYS(pPager->dbSize>0) ){
    +    PgHdr *pPgHdr;                /* Reference to page 1 */
    +    u32 change_counter;           /* Initial value of change-counter field */
    +
    +    assert( !pPager->tempFile && isOpen(pPager->fd) );
    +
    +    /* Open page 1 of the file for writing. */
    +    rc = sqlite3PagerGet(pPager, 1, &pPgHdr);
    +    assert( pPgHdr==0 || rc==SQLITE_OK );
    +
    +    /* If page one was fetched successfully, and this function is not
    +    ** operating in direct-mode, make page 1 writable.  When not in 
    +    ** direct mode, page 1 is always held in cache and hence the PagerGet()
    +    ** above is always successful - hence the ALWAYS on rc==SQLITE_OK.
    +    */
    +    if( !DIRECT_MODE && ALWAYS(rc==SQLITE_OK) ){
    +      rc = sqlite3PagerWrite(pPgHdr);
    +    }
    +
    +    if( rc==SQLITE_OK ){
    +      /* Increment the value just read and write it back to byte 24. */
    +      change_counter = sqlite3Get4byte((u8*)pPager->dbFileVers);
    +      change_counter++;
    +      put32bits(((char*)pPgHdr->pData)+24, change_counter);
    +
    +      /* If running in direct mode, write the contents of page 1 to the file. */
    +      if( DIRECT_MODE ){
    +        const void *zBuf = pPgHdr->pData;
    +        assert( pPager->dbFileSize>0 );
    +        rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);
    +        if( rc==SQLITE_OK ){
    +          pPager->changeCountDone = 1;
    +        }
    +      }else{
    +        pPager->changeCountDone = 1;
    +      }
    +    }
    +
    +    /* Release the page reference. */
    +    sqlite3PagerUnref(pPgHdr);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Sync the pager file to disk. This is a no-op for in-memory files
    +** or pages with the Pager.noSync flag set.
    +**
    +** If successful, or called on a pager for which it is a no-op, this
    +** function returns SQLITE_OK. Otherwise, an IO error code is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager){
    +  int rc;                              /* Return code */
    +  assert( !MEMDB );
    +  if( pPager->noSync ){
    +    rc = SQLITE_OK;
    +  }else{
    +    rc = sqlite3OsSync(pPager->fd, pPager->sync_flags);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Sync the database file for the pager pPager. zMaster points to the name
    +** of a master journal file that should be written into the individual
    +** journal file. zMaster may be NULL, which is interpreted as no master
    +** journal (a single database transaction).
    +**
    +** This routine ensures that:
    +**
    +**   * The database file change-counter is updated,
    +**   * the journal is synced (unless the atomic-write optimization is used),
    +**   * all dirty pages are written to the database file, 
    +**   * the database file is truncated (if required), and
    +**   * the database file synced. 
    +**
    +** The only thing that remains to commit the transaction is to finalize 
    +** (delete, truncate or zero the first part of) the journal file (or 
    +** delete the master journal file if specified).
    +**
    +** Note that if zMaster==NULL, this does not overwrite a previous value
    +** passed to an sqlite3PagerCommitPhaseOne() call.
    +**
    +** If the final parameter - noSync - is true, then the database file itself
    +** is not synced. The caller must call sqlite3PagerSync() directly to
    +** sync the database file before calling CommitPhaseTwo() to delete the
    +** journal file in this case.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
    +  Pager *pPager,                  /* Pager object */
    +  const char *zMaster,            /* If not NULL, the master journal name */
    +  int noSync                      /* True to omit the xSync on the db file */
    +){
    +  int rc = SQLITE_OK;             /* Return code */
    +
    +  /* The dbOrigSize is never set if journal_mode=OFF */
    +  assert( pPager->journalMode!=PAGER_JOURNALMODE_OFF || pPager->dbOrigSize==0 );
    +
    +  /* If a prior error occurred, this routine should not be called.  ROLLBACK
    +  ** is the appropriate response to an error, not COMMIT.  Guard against
    +  ** coding errors by repeating the prior error. */
    +  if( NEVER(pPager->errCode) ) return pPager->errCode;
    +
    +  PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n", 
    +      pPager->zFilename, zMaster, pPager->dbSize));
    +
    +  if( MEMDB && pPager->dbModified ){
    +    /* If this is an in-memory db, or no pages have been written to, or this
    +    ** function has already been called, it is mostly a no-op.  However, any
    +    ** backup in progress needs to be restarted.
    +    */
    +    sqlite3BackupRestart(pPager->pBackup);
    +  }else if( pPager->state!=PAGER_SYNCED && pPager->dbModified ){
    +
    +    /* The following block updates the change-counter. Exactly how it
    +    ** does this depends on whether or not the atomic-update optimization
    +    ** was enabled at compile time, and if this transaction meets the 
    +    ** runtime criteria to use the operation: 
    +    **
    +    **    * The file-system supports the atomic-write property for
    +    **      blocks of size page-size, and 
    +    **    * This commit is not part of a multi-file transaction, and
    +    **    * Exactly one page has been modified and store in the journal file.
    +    **
    +    ** If the optimization was not enabled at compile time, then the
    +    ** pager_incr_changecounter() function is called to update the change
    +    ** counter in 'indirect-mode'. If the optimization is compiled in but
    +    ** is not applicable to this transaction, call sqlite3JournalCreate()
    +    ** to make sure the journal file has actually been created, then call
    +    ** pager_incr_changecounter() to update the change-counter in indirect
    +    ** mode. 
    +    **
    +    ** Otherwise, if the optimization is both enabled and applicable,
    +    ** then call pager_incr_changecounter() to update the change-counter
    +    ** in 'direct' mode. In this case the journal file will never be
    +    ** created for this transaction.
    +    */
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +    PgHdr *pPg;
    +    assert( isOpen(pPager->jfd) || pPager->journalMode==PAGER_JOURNALMODE_OFF );
    +    if( !zMaster && isOpen(pPager->jfd) 
    +     && pPager->journalOff==jrnlBufferSize(pPager) 
    +     && pPager->dbSize>=pPager->dbFileSize
    +     && (0==(pPg = sqlite3PcacheDirtyList(pPager->pPCache)) || 0==pPg->pDirty)
    +    ){
    +      /* Update the db file change counter via the direct-write method. The 
    +      ** following call will modify the in-memory representation of page 1 
    +      ** to include the updated change counter and then write page 1 
    +      ** directly to the database file. Because of the atomic-write 
    +      ** property of the host file-system, this is safe.
    +      */
    +      rc = pager_incr_changecounter(pPager, 1);
    +    }else{
    +      rc = sqlite3JournalCreate(pPager->jfd);
    +      if( rc==SQLITE_OK ){
    +        rc = pager_incr_changecounter(pPager, 0);
    +      }
    +    }
    +#else
    +    rc = pager_incr_changecounter(pPager, 0);
    +#endif
    +    if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +
    +    /* If this transaction has made the database smaller, then all pages
    +    ** being discarded by the truncation must be written to the journal
    +    ** file. This can only happen in auto-vacuum mode.
    +    **
    +    ** Before reading the pages with page numbers larger than the 
    +    ** current value of Pager.dbSize, set dbSize back to the value
    +    ** that it took at the start of the transaction. Otherwise, the
    +    ** calls to sqlite3PagerGet() return zeroed pages instead of 
    +    ** reading data from the database file.
    +    **
    +    ** When journal_mode==OFF the dbOrigSize is always zero, so this
    +    ** block never runs if journal_mode=OFF.
    +    */
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pPager->dbSize<pPager->dbOrigSize 
    +     && ALWAYS(pPager->journalMode!=PAGER_JOURNALMODE_OFF)
    +    ){
    +      Pgno i;                                   /* Iterator variable */
    +      const Pgno iSkip = PAGER_MJ_PGNO(pPager); /* Pending lock page */
    +      const Pgno dbSize = pPager->dbSize;       /* Database image size */ 
    +      pPager->dbSize = pPager->dbOrigSize;
    +      for( i=dbSize+1; i<=pPager->dbOrigSize; i++ ){
    +        if( !sqlite3BitvecTest(pPager->pInJournal, i) && i!=iSkip ){
    +          PgHdr *pPage;             /* Page to journal */
    +          rc = sqlite3PagerGet(pPager, i, &pPage);
    +          if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +          rc = sqlite3PagerWrite(pPage);
    +          sqlite3PagerUnref(pPage);
    +          if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +        }
    +      } 
    +      pPager->dbSize = dbSize;
    +    }
    +#endif
    +
    +    /* Write the master journal name into the journal file. If a master 
    +    ** journal file name has already been written to the journal file, 
    +    ** or if zMaster is NULL (no master journal), then this call is a no-op.
    +    */
    +    rc = writeMasterJournal(pPager, zMaster);
    +    if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +
    +    /* Sync the journal file. If the atomic-update optimization is being
    +    ** used, this call will not create the journal file or perform any
    +    ** real IO.
    +    */
    +    rc = syncJournal(pPager);
    +    if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +
    +    /* Write all dirty pages to the database file. */
    +    rc = pager_write_pagelist(sqlite3PcacheDirtyList(pPager->pPCache));
    +    if( rc!=SQLITE_OK ){
    +      assert( rc!=SQLITE_IOERR_BLOCKED );
    +      goto commit_phase_one_exit;
    +    }
    +    sqlite3PcacheCleanAll(pPager->pPCache);
    +
    +    /* If the file on disk is not the same size as the database image,
    +    ** then use pager_truncate to grow or shrink the file here.
    +    */
    +    if( pPager->dbSize!=pPager->dbFileSize ){
    +      Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_MJ_PGNO(pPager));
    +      assert( pPager->state>=PAGER_EXCLUSIVE );
    +      rc = pager_truncate(pPager, nNew);
    +      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
    +    }
    +
    +    /* Finally, sync the database file. */
    +    if( !pPager->noSync && !noSync ){
    +      rc = sqlite3OsSync(pPager->fd, pPager->sync_flags);
    +    }
    +    IOTRACE(("DBSYNC %p\n", pPager))
    +
    +    pPager->state = PAGER_SYNCED;
    +  }
    +
    +commit_phase_one_exit:
    +  return rc;
    +}
    +
    +
    +/*
    +** When this function is called, the database file has been completely
    +** updated to reflect the changes made by the current transaction and
    +** synced to disk. The journal file still exists in the file-system 
    +** though, and if a failure occurs at this point it will eventually
    +** be used as a hot-journal and the current transaction rolled back.
    +**
    +** This function finalizes the journal file, either by deleting, 
    +** truncating or partially zeroing it, so that it cannot be used 
    +** for hot-journal rollback. Once this is done the transaction is
    +** irrevocably committed.
    +**
    +** If an error occurs, an IO error code is returned and the pager
    +** moves into the error state. Otherwise, SQLITE_OK is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager *pPager){
    +  int rc = SQLITE_OK;                  /* Return code */
    +
    +  /* This routine should not be called if a prior error has occurred.
    +  ** But if (due to a coding error elsewhere in the system) it does get
    +  ** called, just return the same error code without doing anything. */
    +  if( NEVER(pPager->errCode) ) return pPager->errCode;
    +
    +  /* This function should not be called if the pager is not in at least
    +  ** PAGER_RESERVED state. And indeed SQLite never does this. But it is
    +  ** nice to have this defensive test here anyway.
    +  */
    +  if( NEVER(pPager->state<PAGER_RESERVED) ) return SQLITE_ERROR;
    +
    +  /* An optimization. If the database was not actually modified during
    +  ** this transaction, the pager is running in exclusive-mode and is
    +  ** using persistent journals, then this function is a no-op.
    +  **
    +  ** The start of the journal file currently contains a single journal 
    +  ** header with the nRec field set to 0. If such a journal is used as
    +  ** a hot-journal during hot-journal rollback, 0 changes will be made
    +  ** to the database file. So there is no need to zero the journal 
    +  ** header. Since the pager is in exclusive mode, there is no need
    +  ** to drop any locks either.
    +  */
    +  if( pPager->dbModified==0 && pPager->exclusiveMode 
    +   && pPager->journalMode==PAGER_JOURNALMODE_PERSIST
    +  ){
    +    assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) );
    +    return SQLITE_OK;
    +  }
    +
    +  PAGERTRACE(("COMMIT %d\n", PAGERID(pPager)));
    +  assert( pPager->state==PAGER_SYNCED || MEMDB || !pPager->dbModified );
    +  rc = pager_end_transaction(pPager, pPager->setMaster);
    +  return pager_error(pPager, rc);
    +}
    +
    +/*
    +** Rollback all changes. The database falls back to PAGER_SHARED mode.
    +**
    +** This function performs two tasks:
    +**
    +**   1) It rolls back the journal file, restoring all database file and 
    +**      in-memory cache pages to the state they were in when the transaction
    +**      was opened, and
    +**   2) It finalizes the journal file, so that it is not used for hot
    +**      rollback at any point in the future.
    +**
    +** subject to the following qualifications:
    +**
    +** * If the journal file is not yet open when this function is called,
    +**   then only (2) is performed. In this case there is no journal file
    +**   to roll back.
    +**
    +** * If in an error state other than SQLITE_FULL, then task (1) is 
    +**   performed. If successful, task (2). Regardless of the outcome
    +**   of either, the error state error code is returned to the caller
    +**   (i.e. either SQLITE_IOERR or SQLITE_CORRUPT).
    +**
    +** * If the pager is in PAGER_RESERVED state, then attempt (1). Whether
    +**   or not (1) is succussful, also attempt (2). If successful, return
    +**   SQLITE_OK. Otherwise, enter the error state and return the first 
    +**   error code encountered. 
    +**
    +**   In this case there is no chance that the database was written to. 
    +**   So is safe to finalize the journal file even if the playback 
    +**   (operation 1) failed. However the pager must enter the error state
    +**   as the contents of the in-memory cache are now suspect.
    +**
    +** * Finally, if in PAGER_EXCLUSIVE state, then attempt (1). Only
    +**   attempt (2) if (1) is successful. Return SQLITE_OK if successful,
    +**   otherwise enter the error state and return the error code from the 
    +**   failing operation.
    +**
    +**   In this case the database file may have been written to. So if the
    +**   playback operation did not succeed it would not be safe to finalize
    +**   the journal file. It needs to be left in the file-system so that
    +**   some other process can use it to restore the database state (by
    +**   hot-journal rollback).
    +*/
    +SQLITE_PRIVATE int sqlite3PagerRollback(Pager *pPager){
    +  int rc = SQLITE_OK;                  /* Return code */
    +  PAGERTRACE(("ROLLBACK %d\n", PAGERID(pPager)));
    +  if( !pPager->dbModified || !isOpen(pPager->jfd) ){
    +    rc = pager_end_transaction(pPager, pPager->setMaster);
    +  }else if( pPager->errCode && pPager->errCode!=SQLITE_FULL ){
    +    if( pPager->state>=PAGER_EXCLUSIVE ){
    +      pager_playback(pPager, 0);
    +    }
    +    rc = pPager->errCode;
    +  }else{
    +    if( pPager->state==PAGER_RESERVED ){
    +      int rc2;
    +      rc = pager_playback(pPager, 0);
    +      rc2 = pager_end_transaction(pPager, pPager->setMaster);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }else{
    +      rc = pager_playback(pPager, 0);
    +    }
    +
    +    if( !MEMDB ){
    +      pPager->dbSizeValid = 0;
    +    }
    +
    +    /* If an error occurs during a ROLLBACK, we can no longer trust the pager
    +    ** cache. So call pager_error() on the way out to make any error 
    +    ** persistent.
    +    */
    +    rc = pager_error(pPager, rc);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return TRUE if the database file is opened read-only.  Return FALSE
    +** if the database is (in theory) writable.
    +*/
    +SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager *pPager){
    +  return pPager->readOnly;
    +}
    +
    +/*
    +** Return the number of references to the pager.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerRefcount(Pager *pPager){
    +  return sqlite3PcacheRefCount(pPager->pPCache);
    +}
    +
    +/*
    +** Return the number of references to the specified page.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage *pPage){
    +  return sqlite3PcachePageRefcount(pPage);
    +}
    +
    +#ifdef SQLITE_TEST
    +/*
    +** This routine is used for testing and analysis only.
    +*/
    +SQLITE_PRIVATE int *sqlite3PagerStats(Pager *pPager){
    +  static int a[11];
    +  a[0] = sqlite3PcacheRefCount(pPager->pPCache);
    +  a[1] = sqlite3PcachePagecount(pPager->pPCache);
    +  a[2] = sqlite3PcacheGetCachesize(pPager->pPCache);
    +  a[3] = pPager->dbSizeValid ? (int) pPager->dbSize : -1;
    +  a[4] = pPager->state;
    +  a[5] = pPager->errCode;
    +  a[6] = pPager->nHit;
    +  a[7] = pPager->nMiss;
    +  a[8] = 0;  /* Used to be pPager->nOvfl */
    +  a[9] = pPager->nRead;
    +  a[10] = pPager->nWrite;
    +  return a;
    +}
    +#endif
    +
    +/*
    +** Return true if this is an in-memory pager.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager *pPager){
    +  return MEMDB;
    +}
    +
    +/*
    +** Check that there are at least nSavepoint savepoints open. If there are
    +** currently less than nSavepoints open, then open one or more savepoints
    +** to make up the difference. If the number of savepoints is already
    +** equal to nSavepoint, then this function is a no-op.
    +**
    +** If a memory allocation fails, SQLITE_NOMEM is returned. If an error 
    +** occurs while opening the sub-journal file, then an IO error code is
    +** returned. Otherwise, SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
    +  int rc = SQLITE_OK;                       /* Return code */
    +  int nCurrent = pPager->nSavepoint;        /* Current number of savepoints */
    +
    +  if( nSavepoint>nCurrent && pPager->useJournal ){
    +    int ii;                                 /* Iterator variable */
    +    PagerSavepoint *aNew;                   /* New Pager.aSavepoint array */
    +
    +    /* Either there is no active journal or the sub-journal is open or 
    +    ** the journal is always stored in memory */
    +    assert( pPager->nSavepoint==0 || isOpen(pPager->sjfd) ||
    +            pPager->journalMode==PAGER_JOURNALMODE_MEMORY );
    +
    +    /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM
    +    ** if the allocation fails. Otherwise, zero the new portion in case a 
    +    ** malloc failure occurs while populating it in the for(...) loop below.
    +    */
    +    aNew = (PagerSavepoint *)sqlite3Realloc(
    +        pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
    +    );
    +    if( !aNew ){
    +      return SQLITE_NOMEM;
    +    }
    +    memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));
    +    pPager->aSavepoint = aNew;
    +    pPager->nSavepoint = nSavepoint;
    +
    +    /* Populate the PagerSavepoint structures just allocated. */
    +    for(ii=nCurrent; ii<nSavepoint; ii++){
    +      assert( pPager->dbSizeValid );
    +      aNew[ii].nOrig = pPager->dbSize;
    +      if( isOpen(pPager->jfd) && ALWAYS(pPager->journalOff>0) ){
    +        aNew[ii].iOffset = pPager->journalOff;
    +      }else{
    +        aNew[ii].iOffset = JOURNAL_HDR_SZ(pPager);
    +      }
    +      aNew[ii].iSubRec = pPager->nSubRec;
    +      aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);
    +      if( !aNew[ii].pInSavepoint ){
    +        return SQLITE_NOMEM;
    +      }
    +    }
    +
    +    /* Open the sub-journal, if it is not already opened. */
    +    rc = openSubJournal(pPager);
    +    assertTruncateConstraint(pPager);
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** This function is called to rollback or release (commit) a savepoint.
    +** The savepoint to release or rollback need not be the most recently 
    +** created savepoint.
    +**
    +** Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE.
    +** If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with
    +** index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes
    +** that have occurred since the specified savepoint was created.
    +**
    +** The savepoint to rollback or release is identified by parameter 
    +** iSavepoint. A value of 0 means to operate on the outermost savepoint
    +** (the first created). A value of (Pager.nSavepoint-1) means operate
    +** on the most recently created savepoint. If iSavepoint is greater than
    +** (Pager.nSavepoint-1), then this function is a no-op.
    +**
    +** If a negative value is passed to this function, then the current
    +** transaction is rolled back. This is different to calling 
    +** sqlite3PagerRollback() because this function does not terminate
    +** the transaction or unlock the database, it just restores the 
    +** contents of the database to its original state. 
    +**
    +** In any case, all savepoints with an index greater than iSavepoint 
    +** are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE),
    +** then savepoint iSavepoint is also destroyed.
    +**
    +** This function may return SQLITE_NOMEM if a memory allocation fails,
    +** or an IO error code if an IO error occurs while rolling back a 
    +** savepoint. If no errors occur, SQLITE_OK is returned.
    +*/ 
    +SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
    +  int rc = SQLITE_OK;
    +
    +  assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
    +  assert( iSavepoint>=0 || op==SAVEPOINT_ROLLBACK );
    +
    +  if( iSavepoint<pPager->nSavepoint ){
    +    int ii;            /* Iterator variable */
    +    int nNew;          /* Number of remaining savepoints after this op. */
    +
    +    /* Figure out how many savepoints will still be active after this
    +    ** operation. Store this value in nNew. Then free resources associated 
    +    ** with any savepoints that are destroyed by this operation.
    +    */
    +    nNew = iSavepoint + (op==SAVEPOINT_ROLLBACK);
    +    for(ii=nNew; ii<pPager->nSavepoint; ii++){
    +      sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
    +    }
    +    pPager->nSavepoint = nNew;
    +
    +    /* If this is a rollback operation, playback the specified savepoint.
    +    ** If this is a temp-file, it is possible that the journal file has
    +    ** not yet been opened. In this case there have been no changes to
    +    ** the database file, so the playback operation can be skipped.
    +    */
    +    if( op==SAVEPOINT_ROLLBACK && isOpen(pPager->jfd) ){
    +      PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
    +      rc = pagerPlaybackSavepoint(pPager, pSavepoint);
    +      assert(rc!=SQLITE_DONE);
    +    }
    +  
    +    /* If this is a release of the outermost savepoint, truncate 
    +    ** the sub-journal to zero bytes in size. */
    +    if( nNew==0 && op==SAVEPOINT_RELEASE && isOpen(pPager->sjfd) ){
    +      assert( rc==SQLITE_OK );
    +      rc = sqlite3OsTruncate(pPager->sjfd, 0);
    +      pPager->nSubRec = 0;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return the full pathname of the database file.
    +*/
    +SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager *pPager){
    +  return pPager->zFilename;
    +}
    +
    +/*
    +** Return the VFS structure for the pager.
    +*/
    +SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager *pPager){
    +  return pPager->pVfs;
    +}
    +
    +/*
    +** Return the file handle for the database file associated
    +** with the pager.  This might return NULL if the file has
    +** not yet been opened.
    +*/
    +SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager *pPager){
    +  return pPager->fd;
    +}
    +
    +/*
    +** Return the full pathname of the journal file.
    +*/
    +SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager *pPager){
    +  return pPager->zJournal;
    +}
    +
    +/*
    +** Return true if fsync() calls are disabled for this pager.  Return FALSE
    +** if fsync()s are executed normally.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerNosync(Pager *pPager){
    +  return pPager->noSync;
    +}
    +
    +#ifdef SQLITE_HAS_CODEC
    +/*
    +** Set or retrieve the codec for this pager
    +*/
    +static void sqlite3PagerSetCodec(
    +  Pager *pPager,
    +  void *(*xCodec)(void*,void*,Pgno,int),
    +  void (*xCodecSizeChng)(void*,int,int),
    +  void (*xCodecFree)(void*),
    +  void *pCodec
    +){
    +  if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
    +  pPager->xCodec = xCodec;
    +  pPager->xCodecSizeChng = xCodecSizeChng;
    +  pPager->xCodecFree = xCodecFree;
    +  pPager->pCodec = pCodec;
    +  pagerReportSize(pPager);
    +}
    +static void *sqlite3PagerGetCodec(Pager *pPager){
    +  return pPager->pCodec;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +/*
    +** Move the page pPg to location pgno in the file.
    +**
    +** There must be no references to the page previously located at
    +** pgno (which we call pPgOld) though that page is allowed to be
    +** in cache.  If the page previously located at pgno is not already
    +** in the rollback journal, it is not put there by by this routine.
    +**
    +** References to the page pPg remain valid. Updating any
    +** meta-data associated with pPg (i.e. data stored in the nExtra bytes
    +** allocated along with the page) is the responsibility of the caller.
    +**
    +** A transaction must be active when this routine is called. It used to be
    +** required that a statement transaction was not active, but this restriction
    +** has been removed (CREATE INDEX needs to move a page when a statement
    +** transaction is active).
    +**
    +** If the fourth argument, isCommit, is non-zero, then this page is being
    +** moved as part of a database reorganization just before the transaction 
    +** is being committed. In this case, it is guaranteed that the database page 
    +** pPg refers to will not be written to again within this transaction.
    +**
    +** This function may return SQLITE_NOMEM or an IO error code if an error
    +** occurs. Otherwise, it returns SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
    +  PgHdr *pPgOld;               /* The page being overwritten. */
    +  Pgno needSyncPgno = 0;       /* Old value of pPg->pgno, if sync is required */
    +  int rc;                      /* Return code */
    +  Pgno origPgno;               /* The original page number */
    +
    +  assert( pPg->nRef>0 );
    +
    +  /* If the page being moved is dirty and has not been saved by the latest
    +  ** savepoint, then save the current contents of the page into the 
    +  ** sub-journal now. This is required to handle the following scenario:
    +  **
    +  **   BEGIN;
    +  **     <journal page X, then modify it in memory>
    +  **     SAVEPOINT one;
    +  **       <Move page X to location Y>
    +  **     ROLLBACK TO one;
    +  **
    +  ** If page X were not written to the sub-journal here, it would not
    +  ** be possible to restore its contents when the "ROLLBACK TO one"
    +  ** statement were is processed.
    +  **
    +  ** subjournalPage() may need to allocate space to store pPg->pgno into
    +  ** one or more savepoint bitvecs. This is the reason this function
    +  ** may return SQLITE_NOMEM.
    +  */
    +  if( pPg->flags&PGHDR_DIRTY 
    +   && subjRequiresPage(pPg)
    +   && SQLITE_OK!=(rc = subjournalPage(pPg))
    +  ){
    +    return rc;
    +  }
    +
    +  PAGERTRACE(("MOVE %d page %d (needSync=%d) moves to %d\n", 
    +      PAGERID(pPager), pPg->pgno, (pPg->flags&PGHDR_NEED_SYNC)?1:0, pgno));
    +  IOTRACE(("MOVE %p %d %d\n", pPager, pPg->pgno, pgno))
    +
    +  /* If the journal needs to be sync()ed before page pPg->pgno can
    +  ** be written to, store pPg->pgno in local variable needSyncPgno.
    +  **
    +  ** If the isCommit flag is set, there is no need to remember that
    +  ** the journal needs to be sync()ed before database page pPg->pgno 
    +  ** can be written to. The caller has already promised not to write to it.
    +  */
    +  if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){
    +    needSyncPgno = pPg->pgno;
    +    assert( pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize );
    +    assert( pPg->flags&PGHDR_DIRTY );
    +    assert( pPager->needSync );
    +  }
    +
    +  /* If the cache contains a page with page-number pgno, remove it
    +  ** from its hash chain. Also, if the PgHdr.needSync was set for 
    +  ** page pgno before the 'move' operation, it needs to be retained 
    +  ** for the page moved there.
    +  */
    +  pPg->flags &= ~PGHDR_NEED_SYNC;
    +  pPgOld = pager_lookup(pPager, pgno);
    +  assert( !pPgOld || pPgOld->nRef==1 );
    +  if( pPgOld ){
    +    pPg->flags |= (pPgOld->flags&PGHDR_NEED_SYNC);
    +    sqlite3PcacheDrop(pPgOld);
    +  }
    +
    +  origPgno = pPg->pgno;
    +  sqlite3PcacheMove(pPg, pgno);
    +  sqlite3PcacheMakeDirty(pPg);
    +  pPager->dbModified = 1;
    +
    +  if( needSyncPgno ){
    +    /* If needSyncPgno is non-zero, then the journal file needs to be 
    +    ** sync()ed before any data is written to database file page needSyncPgno.
    +    ** Currently, no such page exists in the page-cache and the 
    +    ** "is journaled" bitvec flag has been set. This needs to be remedied by
    +    ** loading the page into the pager-cache and setting the PgHdr.needSync 
    +    ** flag.
    +    **
    +    ** If the attempt to load the page into the page-cache fails, (due
    +    ** to a malloc() or IO failure), clear the bit in the pInJournal[]
    +    ** array. Otherwise, if the page is loaded and written again in
    +    ** this transaction, it may be written to the database file before
    +    ** it is synced into the journal file. This way, it may end up in
    +    ** the journal file twice, but that is not a problem.
    +    **
    +    ** The sqlite3PagerGet() call may cause the journal to sync. So make
    +    ** sure the Pager.needSync flag is set too.
    +    */
    +    PgHdr *pPgHdr;
    +    assert( pPager->needSync );
    +    rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr);
    +    if( rc!=SQLITE_OK ){
    +      if( needSyncPgno<=pPager->dbOrigSize ){
    +        assert( pPager->pTmpSpace!=0 );
    +        sqlite3BitvecClear(pPager->pInJournal, needSyncPgno, pPager->pTmpSpace);
    +      }
    +      return rc;
    +    }
    +    pPager->needSync = 1;
    +    assert( pPager->noSync==0 && !MEMDB );
    +    pPgHdr->flags |= PGHDR_NEED_SYNC;
    +    sqlite3PcacheMakeDirty(pPgHdr);
    +    sqlite3PagerUnref(pPgHdr);
    +  }
    +
    +  /*
    +  ** For an in-memory database, make sure the original page continues
    +  ** to exist, in case the transaction needs to roll back.  We allocate
    +  ** the page now, instead of at rollback, because we can better deal
    +  ** with an out-of-memory error now.  Ticket #3761.
    +  */
    +  if( MEMDB ){
    +    DbPage *pNew;
    +    rc = sqlite3PagerAcquire(pPager, origPgno, &pNew, 1);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3PcacheMove(pPg, origPgno);
    +      return rc;
    +    }
    +    sqlite3PagerUnref(pNew);
    +  }
    +
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +/*
    +** Return a pointer to the data for the specified page.
    +*/
    +SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *pPg){
    +  assert( pPg->nRef>0 || pPg->pPager->memDb );
    +  return pPg->pData;
    +}
    +
    +/*
    +** Return a pointer to the Pager.nExtra bytes of "extra" space 
    +** allocated along with the specified page.
    +*/
    +SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *pPg){
    +  return pPg->pExtra;
    +}
    +
    +/*
    +** Get/set the locking-mode for this pager. Parameter eMode must be one
    +** of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or 
    +** PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then
    +** the locking-mode is set to the value specified.
    +**
    +** The returned value is either PAGER_LOCKINGMODE_NORMAL or
    +** PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)
    +** locking-mode.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *pPager, int eMode){
    +  assert( eMode==PAGER_LOCKINGMODE_QUERY
    +            || eMode==PAGER_LOCKINGMODE_NORMAL
    +            || eMode==PAGER_LOCKINGMODE_EXCLUSIVE );
    +  assert( PAGER_LOCKINGMODE_QUERY<0 );
    +  assert( PAGER_LOCKINGMODE_NORMAL>=0 && PAGER_LOCKINGMODE_EXCLUSIVE>=0 );
    +  if( eMode>=0 && !pPager->tempFile ){
    +    pPager->exclusiveMode = (u8)eMode;
    +  }
    +  return (int)pPager->exclusiveMode;
    +}
    +
    +/*
    +** Get/set the journal-mode for this pager. Parameter eMode must be one of:
    +**
    +**    PAGER_JOURNALMODE_QUERY
    +**    PAGER_JOURNALMODE_DELETE
    +**    PAGER_JOURNALMODE_TRUNCATE
    +**    PAGER_JOURNALMODE_PERSIST
    +**    PAGER_JOURNALMODE_OFF
    +**    PAGER_JOURNALMODE_MEMORY
    +**
    +** If the parameter is not _QUERY, then the journal_mode is set to the
    +** value specified if the change is allowed.  The change is disallowed
    +** for the following reasons:
    +**
    +**   *  An in-memory database can only have its journal_mode set to _OFF
    +**      or _MEMORY.
    +**
    +**   *  The journal mode may not be changed while a transaction is active.
    +**
    +** The returned indicate the current (possibly updated) journal-mode.
    +*/
    +SQLITE_PRIVATE int sqlite3PagerJournalMode(Pager *pPager, int eMode){
    +  assert( eMode==PAGER_JOURNALMODE_QUERY
    +            || eMode==PAGER_JOURNALMODE_DELETE
    +            || eMode==PAGER_JOURNALMODE_TRUNCATE
    +            || eMode==PAGER_JOURNALMODE_PERSIST
    +            || eMode==PAGER_JOURNALMODE_OFF 
    +            || eMode==PAGER_JOURNALMODE_MEMORY );
    +  assert( PAGER_JOURNALMODE_QUERY<0 );
    +  if( eMode>=0
    +   && (!MEMDB || eMode==PAGER_JOURNALMODE_MEMORY 
    +              || eMode==PAGER_JOURNALMODE_OFF)
    +   && !pPager->dbModified
    +   && (!isOpen(pPager->jfd) || 0==pPager->journalOff)
    +  ){
    +    if( isOpen(pPager->jfd) ){
    +      sqlite3OsClose(pPager->jfd);
    +    }
    +    pPager->journalMode = (u8)eMode;
    +  }
    +  return (int)pPager->journalMode;
    +}
    +
    +/*
    +** Get/set the size-limit used for persistent journal files.
    +**
    +** Setting the size limit to -1 means no limit is enforced.
    +** An attempt to set a limit smaller than -1 is a no-op.
    +*/
    +SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
    +  if( iLimit>=-1 ){
    +    pPager->journalSizeLimit = iLimit;
    +  }
    +  return pPager->journalSizeLimit;
    +}
    +
    +/*
    +** Return a pointer to the pPager->pBackup variable. The backup module
    +** in backup.c maintains the content of this variable. This module
    +** uses it opaquely as an argument to sqlite3BackupRestart() and
    +** sqlite3BackupUpdate() only.
    +*/
    +SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
    +  return &pPager->pBackup;
    +}
    +
    +#endif /* SQLITE_OMIT_DISKIO */
    +
    +/************** End of pager.c ***********************************************/
    +/************** Begin file btmutex.c *****************************************/
    +/*
    +** 2007 August 27
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** $Id: btmutex.c,v 1.17 2009/07/20 12:33:33 drh Exp $
    +**
    +** This file contains code used to implement mutexes on Btree objects.
    +** This code really belongs in btree.c.  But btree.c is getting too
    +** big and we want to break it down some.  This packaged seemed like
    +** a good breakout.
    +*/
    +/************** Include btreeInt.h in the middle of btmutex.c ****************/
    +/************** Begin file btreeInt.h ****************************************/
    +/*
    +** 2004 April 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** $Id: btreeInt.h,v 1.52 2009/07/15 17:25:46 drh Exp $
    +**
    +** This file implements a external (disk-based) database using BTrees.
    +** For a detailed discussion of BTrees, refer to
    +**
    +**     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:
    +**     "Sorting And Searching", pages 473-480. Addison-Wesley
    +**     Publishing Company, Reading, Massachusetts.
    +**
    +** The basic idea is that each page of the file contains N database
    +** entries and N+1 pointers to subpages.
    +**
    +**   ----------------------------------------------------------------
    +**   |  Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) |
    +**   ----------------------------------------------------------------
    +**
    +** All of the keys on the page that Ptr(0) points to have values less
    +** than Key(0).  All of the keys on page Ptr(1) and its subpages have
    +** values greater than Key(0) and less than Key(1).  All of the keys
    +** on Ptr(N) and its subpages have values greater than Key(N-1).  And
    +** so forth.
    +**
    +** Finding a particular key requires reading O(log(M)) pages from the 
    +** disk where M is the number of entries in the tree.
    +**
    +** In this implementation, a single file can hold one or more separate 
    +** BTrees.  Each BTree is identified by the index of its root page.  The
    +** key and data for any entry are combined to form the "payload".  A
    +** fixed amount of payload can be carried directly on the database
    +** page.  If the payload is larger than the preset amount then surplus
    +** bytes are stored on overflow pages.  The payload for an entry
    +** and the preceding pointer are combined to form a "Cell".  Each 
    +** page has a small header which contains the Ptr(N) pointer and other
    +** information such as the size of key and data.
    +**
    +** FORMAT DETAILS
    +**
    +** The file is divided into pages.  The first page is called page 1,
    +** the second is page 2, and so forth.  A page number of zero indicates
    +** "no such page".  The page size can be any power of 2 between 512 and 32768.
    +** Each page can be either a btree page, a freelist page, an overflow
    +** page, or a pointer-map page.
    +**
    +** The first page is always a btree page.  The first 100 bytes of the first
    +** page contain a special header (the "file header") that describes the file.
    +** The format of the file header is as follows:
    +**
    +**   OFFSET   SIZE    DESCRIPTION
    +**      0      16     Header string: "SQLite format 3\000"
    +**     16       2     Page size in bytes.  
    +**     18       1     File format write version
    +**     19       1     File format read version
    +**     20       1     Bytes of unused space at the end of each page
    +**     21       1     Max embedded payload fraction
    +**     22       1     Min embedded payload fraction
    +**     23       1     Min leaf payload fraction
    +**     24       4     File change counter
    +**     28       4     Reserved for future use
    +**     32       4     First freelist page
    +**     36       4     Number of freelist pages in the file
    +**     40      60     15 4-byte meta values passed to higher layers
    +**
    +**     40       4     Schema cookie
    +**     44       4     File format of schema layer
    +**     48       4     Size of page cache
    +**     52       4     Largest root-page (auto/incr_vacuum)
    +**     56       4     1=UTF-8 2=UTF16le 3=UTF16be
    +**     60       4     User version
    +**     64       4     Incremental vacuum mode
    +**     68       4     unused
    +**     72       4     unused
    +**     76       4     unused
    +**
    +** All of the integer values are big-endian (most significant byte first).
    +**
    +** The file change counter is incremented when the database is changed
    +** This counter allows other processes to know when the file has changed
    +** and thus when they need to flush their cache.
    +**
    +** The max embedded payload fraction is the amount of the total usable
    +** space in a page that can be consumed by a single cell for standard
    +** B-tree (non-LEAFDATA) tables.  A value of 255 means 100%.  The default
    +** is to limit the maximum cell size so that at least 4 cells will fit
    +** on one page.  Thus the default max embedded payload fraction is 64.
    +**
    +** If the payload for a cell is larger than the max payload, then extra
    +** payload is spilled to overflow pages.  Once an overflow page is allocated,
    +** as many bytes as possible are moved into the overflow pages without letting
    +** the cell size drop below the min embedded payload fraction.
    +**
    +** The min leaf payload fraction is like the min embedded payload fraction
    +** except that it applies to leaf nodes in a LEAFDATA tree.  The maximum
    +** payload fraction for a LEAFDATA tree is always 100% (or 255) and it
    +** not specified in the header.
    +**
    +** Each btree pages is divided into three sections:  The header, the
    +** cell pointer array, and the cell content area.  Page 1 also has a 100-byte
    +** file header that occurs before the page header.
    +**
    +**      |----------------|
    +**      | file header    |   100 bytes.  Page 1 only.
    +**      |----------------|
    +**      | page header    |   8 bytes for leaves.  12 bytes for interior nodes
    +**      |----------------|
    +**      | cell pointer   |   |  2 bytes per cell.  Sorted order.
    +**      | array          |   |  Grows downward
    +**      |                |   v
    +**      |----------------|
    +**      | unallocated    |
    +**      | space          |
    +**      |----------------|   ^  Grows upwards
    +**      | cell content   |   |  Arbitrary order interspersed with freeblocks.
    +**      | area           |   |  and free space fragments.
    +**      |----------------|
    +**
    +** The page headers looks like this:
    +**
    +**   OFFSET   SIZE     DESCRIPTION
    +**      0       1      Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf
    +**      1       2      byte offset to the first freeblock
    +**      3       2      number of cells on this page
    +**      5       2      first byte of the cell content area
    +**      7       1      number of fragmented free bytes
    +**      8       4      Right child (the Ptr(N) value).  Omitted on leaves.
    +**
    +** The flags define the format of this btree page.  The leaf flag means that
    +** this page has no children.  The zerodata flag means that this page carries
    +** only keys and no data.  The intkey flag means that the key is a integer
    +** which is stored in the key size entry of the cell header rather than in
    +** the payload area.
    +**
    +** The cell pointer array begins on the first byte after the page header.
    +** The cell pointer array contains zero or more 2-byte numbers which are
    +** offsets from the beginning of the page to the cell content in the cell
    +** content area.  The cell pointers occur in sorted order.  The system strives
    +** to keep free space after the last cell pointer so that new cells can
    +** be easily added without having to defragment the page.
    +**
    +** Cell content is stored at the very end of the page and grows toward the
    +** beginning of the page.
    +**
    +** Unused space within the cell content area is collected into a linked list of
    +** freeblocks.  Each freeblock is at least 4 bytes in size.  The byte offset
    +** to the first freeblock is given in the header.  Freeblocks occur in
    +** increasing order.  Because a freeblock must be at least 4 bytes in size,
    +** any group of 3 or fewer unused bytes in the cell content area cannot
    +** exist on the freeblock chain.  A group of 3 or fewer free bytes is called
    +** a fragment.  The total number of bytes in all fragments is recorded.
    +** in the page header at offset 7.
    +**
    +**    SIZE    DESCRIPTION
    +**      2     Byte offset of the next freeblock
    +**      2     Bytes in this freeblock
    +**
    +** Cells are of variable length.  Cells are stored in the cell content area at
    +** the end of the page.  Pointers to the cells are in the cell pointer array
    +** that immediately follows the page header.  Cells is not necessarily
    +** contiguous or in order, but cell pointers are contiguous and in order.
    +**
    +** Cell content makes use of variable length integers.  A variable
    +** length integer is 1 to 9 bytes where the lower 7 bits of each 
    +** byte are used.  The integer consists of all bytes that have bit 8 set and
    +** the first byte with bit 8 clear.  The most significant byte of the integer
    +** appears first.  A variable-length integer may not be more than 9 bytes long.
    +** As a special case, all 8 bytes of the 9th byte are used as data.  This
    +** allows a 64-bit integer to be encoded in 9 bytes.
    +**
    +**    0x00                      becomes  0x00000000
    +**    0x7f                      becomes  0x0000007f
    +**    0x81 0x00                 becomes  0x00000080
    +**    0x82 0x00                 becomes  0x00000100
    +**    0x80 0x7f                 becomes  0x0000007f
    +**    0x8a 0x91 0xd1 0xac 0x78  becomes  0x12345678
    +**    0x81 0x81 0x81 0x81 0x01  becomes  0x10204081
    +**
    +** Variable length integers are used for rowids and to hold the number of
    +** bytes of key and data in a btree cell.
    +**
    +** The content of a cell looks like this:
    +**
    +**    SIZE    DESCRIPTION
    +**      4     Page number of the left child. Omitted if leaf flag is set.
    +**     var    Number of bytes of data. Omitted if the zerodata flag is set.
    +**     var    Number of bytes of key. Or the key itself if intkey flag is set.
    +**      *     Payload
    +**      4     First page of the overflow chain.  Omitted if no overflow
    +**
    +** Overflow pages form a linked list.  Each page except the last is completely
    +** filled with data (pagesize - 4 bytes).  The last page can have as little
    +** as 1 byte of data.
    +**
    +**    SIZE    DESCRIPTION
    +**      4     Page number of next overflow page
    +**      *     Data
    +**
    +** Freelist pages come in two subtypes: trunk pages and leaf pages.  The
    +** file header points to the first in a linked list of trunk page.  Each trunk
    +** page points to multiple leaf pages.  The content of a leaf page is
    +** unspecified.  A trunk page looks like this:
    +**
    +**    SIZE    DESCRIPTION
    +**      4     Page number of next trunk page
    +**      4     Number of leaf pointers on this page
    +**      *     zero or more pages numbers of leaves
    +*/
    +
    +
    +/* The following value is the maximum cell size assuming a maximum page
    +** size give above.
    +*/
    +#define MX_CELL_SIZE(pBt)  (pBt->pageSize-8)
    +
    +/* The maximum number of cells on a single page of the database.  This
    +** assumes a minimum cell size of 6 bytes  (4 bytes for the cell itself
    +** plus 2 bytes for the index to the cell in the page header).  Such
    +** small cells will be rare, but they are possible.
    +*/
    +#define MX_CELL(pBt) ((pBt->pageSize-8)/6)
    +
    +/* Forward declarations */
    +typedef struct MemPage MemPage;
    +typedef struct BtLock BtLock;
    +
    +/*
    +** This is a magic string that appears at the beginning of every
    +** SQLite database in order to identify the file as a real database.
    +**
    +** You can change this value at compile-time by specifying a
    +** -DSQLITE_FILE_HEADER="..." on the compiler command-line.  The
    +** header must be exactly 16 bytes including the zero-terminator so
    +** the string itself should be 15 characters long.  If you change
    +** the header, then your custom library will not be able to read 
    +** databases generated by the standard tools and the standard tools
    +** will not be able to read databases created by your custom library.
    +*/
    +#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */
    +#  define SQLITE_FILE_HEADER "SQLite format 3"
    +#endif
    +
    +/*
    +** Page type flags.  An ORed combination of these flags appear as the
    +** first byte of on-disk image of every BTree page.
    +*/
    +#define PTF_INTKEY    0x01
    +#define PTF_ZERODATA  0x02
    +#define PTF_LEAFDATA  0x04
    +#define PTF_LEAF      0x08
    +
    +/*
    +** As each page of the file is loaded into memory, an instance of the following
    +** structure is appended and initialized to zero.  This structure stores
    +** information about the page that is decoded from the raw file page.
    +**
    +** The pParent field points back to the parent page.  This allows us to
    +** walk up the BTree from any leaf to the root.  Care must be taken to
    +** unref() the parent page pointer when this page is no longer referenced.
    +** The pageDestructor() routine handles that chore.
    +**
    +** Access to all fields of this structure is controlled by the mutex
    +** stored in MemPage.pBt->mutex.
    +*/
    +struct MemPage {
    +  u8 isInit;           /* True if previously initialized. MUST BE FIRST! */
    +  u8 nOverflow;        /* Number of overflow cell bodies in aCell[] */
    +  u8 intKey;           /* True if intkey flag is set */
    +  u8 leaf;             /* True if leaf flag is set */
    +  u8 hasData;          /* True if this page stores data */
    +  u8 hdrOffset;        /* 100 for page 1.  0 otherwise */
    +  u8 childPtrSize;     /* 0 if leaf==1.  4 if leaf==0 */
    +  u16 maxLocal;        /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
    +  u16 minLocal;        /* Copy of BtShared.minLocal or BtShared.minLeaf */
    +  u16 cellOffset;      /* Index in aData of first cell pointer */
    +  u16 nFree;           /* Number of free bytes on the page */
    +  u16 nCell;           /* Number of cells on this page, local and ovfl */
    +  u16 maskPage;        /* Mask for page offset */
    +  struct _OvflCell {   /* Cells that will not fit on aData[] */
    +    u8 *pCell;          /* Pointers to the body of the overflow cell */
    +    u16 idx;            /* Insert this cell before idx-th non-overflow cell */
    +  } aOvfl[5];
    +  BtShared *pBt;       /* Pointer to BtShared that this page is part of */
    +  u8 *aData;           /* Pointer to disk image of the page data */
    +  DbPage *pDbPage;     /* Pager page handle */
    +  Pgno pgno;           /* Page number for this page */
    +};
    +
    +/*
    +** The in-memory image of a disk page has the auxiliary information appended
    +** to the end.  EXTRA_SIZE is the number of bytes of space needed to hold
    +** that extra information.
    +*/
    +#define EXTRA_SIZE sizeof(MemPage)
    +
    +/*
    +** A linked list of the following structures is stored at BtShared.pLock.
    +** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor 
    +** is opened on the table with root page BtShared.iTable. Locks are removed
    +** from this list when a transaction is committed or rolled back, or when
    +** a btree handle is closed.
    +*/
    +struct BtLock {
    +  Btree *pBtree;        /* Btree handle holding this lock */
    +  Pgno iTable;          /* Root page of table */
    +  u8 eLock;             /* READ_LOCK or WRITE_LOCK */
    +  BtLock *pNext;        /* Next in BtShared.pLock list */
    +};
    +
    +/* Candidate values for BtLock.eLock */
    +#define READ_LOCK     1
    +#define WRITE_LOCK    2
    +
    +/* A Btree handle
    +**
    +** A database connection contains a pointer to an instance of
    +** this object for every database file that it has open.  This structure
    +** is opaque to the database connection.  The database connection cannot
    +** see the internals of this structure and only deals with pointers to
    +** this structure.
    +**
    +** For some database files, the same underlying database cache might be 
    +** shared between multiple connections.  In that case, each connection
    +** has it own instance of this object.  But each instance of this object
    +** points to the same BtShared object.  The database cache and the
    +** schema associated with the database file are all contained within
    +** the BtShared object.
    +**
    +** All fields in this structure are accessed under sqlite3.mutex.
    +** The pBt pointer itself may not be changed while there exists cursors 
    +** in the referenced BtShared that point back to this Btree since those
    +** cursors have to do go through this Btree to find their BtShared and
    +** they often do so without holding sqlite3.mutex.
    +*/
    +struct Btree {
    +  sqlite3 *db;       /* The database connection holding this btree */
    +  BtShared *pBt;     /* Sharable content of this btree */
    +  u8 inTrans;        /* TRANS_NONE, TRANS_READ or TRANS_WRITE */
    +  u8 sharable;       /* True if we can share pBt with another db */
    +  u8 locked;         /* True if db currently has pBt locked */
    +  int wantToLock;    /* Number of nested calls to sqlite3BtreeEnter() */
    +  int nBackup;       /* Number of backup operations reading this btree */
    +  Btree *pNext;      /* List of other sharable Btrees from the same db */
    +  Btree *pPrev;      /* Back pointer of the same list */
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  BtLock lock;       /* Object used to lock page 1 */
    +#endif
    +};
    +
    +/*
    +** Btree.inTrans may take one of the following values.
    +**
    +** If the shared-data extension is enabled, there may be multiple users
    +** of the Btree structure. At most one of these may open a write transaction,
    +** but any number may have active read transactions.
    +*/
    +#define TRANS_NONE  0
    +#define TRANS_READ  1
    +#define TRANS_WRITE 2
    +
    +/*
    +** An instance of this object represents a single database file.
    +** 
    +** A single database file can be in use as the same time by two
    +** or more database connections.  When two or more connections are
    +** sharing the same database file, each connection has it own
    +** private Btree object for the file and each of those Btrees points
    +** to this one BtShared object.  BtShared.nRef is the number of
    +** connections currently sharing this database file.
    +**
    +** Fields in this structure are accessed under the BtShared.mutex
    +** mutex, except for nRef and pNext which are accessed under the
    +** global SQLITE_MUTEX_STATIC_MASTER mutex.  The pPager field
    +** may not be modified once it is initially set as long as nRef>0.
    +** The pSchema field may be set once under BtShared.mutex and
    +** thereafter is unchanged as long as nRef>0.
    +**
    +** isPending:
    +**
    +**   If a BtShared client fails to obtain a write-lock on a database
    +**   table (because there exists one or more read-locks on the table),
    +**   the shared-cache enters 'pending-lock' state and isPending is
    +**   set to true.
    +**
    +**   The shared-cache leaves the 'pending lock' state when either of
    +**   the following occur:
    +**
    +**     1) The current writer (BtShared.pWriter) concludes its transaction, OR
    +**     2) The number of locks held by other connections drops to zero.
    +**
    +**   while in the 'pending-lock' state, no connection may start a new
    +**   transaction.
    +**
    +**   This feature is included to help prevent writer-starvation.
    +*/
    +struct BtShared {
    +  Pager *pPager;        /* The page cache */
    +  sqlite3 *db;          /* Database connection currently using this Btree */
    +  BtCursor *pCursor;    /* A list of all open cursors */
    +  MemPage *pPage1;      /* First page of the database */
    +  u8 readOnly;          /* True if the underlying file is readonly */
    +  u8 pageSizeFixed;     /* True if the page size can no longer be changed */
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  u8 autoVacuum;        /* True if auto-vacuum is enabled */
    +  u8 incrVacuum;        /* True if incr-vacuum is enabled */
    +#endif
    +  u16 pageSize;         /* Total number of bytes on a page */
    +  u16 usableSize;       /* Number of usable bytes on each page */
    +  u16 maxLocal;         /* Maximum local payload in non-LEAFDATA tables */
    +  u16 minLocal;         /* Minimum local payload in non-LEAFDATA tables */
    +  u16 maxLeaf;          /* Maximum local payload in a LEAFDATA table */
    +  u16 minLeaf;          /* Minimum local payload in a LEAFDATA table */
    +  u8 inTransaction;     /* Transaction state */
    +  int nTransaction;     /* Number of open transactions (read + write) */
    +  void *pSchema;        /* Pointer to space allocated by sqlite3BtreeSchema() */
    +  void (*xFreeSchema)(void*);  /* Destructor for BtShared.pSchema */
    +  sqlite3_mutex *mutex; /* Non-recursive mutex required to access this struct */
    +  Bitvec *pHasContent;  /* Set of pages moved to free-list this transaction */
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  int nRef;             /* Number of references to this structure */
    +  BtShared *pNext;      /* Next on a list of sharable BtShared structs */
    +  BtLock *pLock;        /* List of locks held on this shared-btree struct */
    +  Btree *pWriter;       /* Btree with currently open write transaction */
    +  u8 isExclusive;       /* True if pWriter has an EXCLUSIVE lock on the db */
    +  u8 isPending;         /* If waiting for read-locks to clear */
    +#endif
    +  u8 *pTmpSpace;        /* BtShared.pageSize bytes of space for tmp use */
    +};
    +
    +/*
    +** An instance of the following structure is used to hold information
    +** about a cell.  The parseCellPtr() function fills in this structure
    +** based on information extract from the raw disk page.
    +*/
    +typedef struct CellInfo CellInfo;
    +struct CellInfo {
    +  u8 *pCell;     /* Pointer to the start of cell content */
    +  i64 nKey;      /* The key for INTKEY tables, or number of bytes in key */
    +  u32 nData;     /* Number of bytes of data */
    +  u32 nPayload;  /* Total amount of payload */
    +  u16 nHeader;   /* Size of the cell content header in bytes */
    +  u16 nLocal;    /* Amount of payload held locally */
    +  u16 iOverflow; /* Offset to overflow page number.  Zero if no overflow */
    +  u16 nSize;     /* Size of the cell content on the main b-tree page */
    +};
    +
    +/*
    +** Maximum depth of an SQLite B-Tree structure. Any B-Tree deeper than
    +** this will be declared corrupt. This value is calculated based on a
    +** maximum database size of 2^31 pages a minimum fanout of 2 for a
    +** root-node and 3 for all other internal nodes.
    +**
    +** If a tree that appears to be taller than this is encountered, it is
    +** assumed that the database is corrupt.
    +*/
    +#define BTCURSOR_MAX_DEPTH 20
    +
    +/*
    +** A cursor is a pointer to a particular entry within a particular
    +** b-tree within a database file.
    +**
    +** The entry is identified by its MemPage and the index in
    +** MemPage.aCell[] of the entry.
    +**
    +** A single database file can shared by two more database connections,
    +** but cursors cannot be shared.  Each cursor is associated with a
    +** particular database connection identified BtCursor.pBtree.db.
    +**
    +** Fields in this structure are accessed under the BtShared.mutex
    +** found at self->pBt->mutex. 
    +*/
    +struct BtCursor {
    +  Btree *pBtree;            /* The Btree to which this cursor belongs */
    +  BtShared *pBt;            /* The BtShared this cursor points to */
    +  BtCursor *pNext, *pPrev;  /* Forms a linked list of all cursors */
    +  struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
    +  Pgno pgnoRoot;            /* The root page of this tree */
    +  sqlite3_int64 cachedRowid; /* Next rowid cache.  0 means not valid */
    +  CellInfo info;            /* A parse of the cell we are pointing at */
    +  u8 wrFlag;                /* True if writable */
    +  u8 atLast;                /* Cursor pointing to the last entry */
    +  u8 validNKey;             /* True if info.nKey is valid */
    +  u8 eState;                /* One of the CURSOR_XXX constants (see below) */
    +  void *pKey;      /* Saved key that was cursor's last known position */
    +  i64 nKey;        /* Size of pKey, or last integer key */
    +  int skipNext;    /* Prev() is noop if negative. Next() is noop if positive */
    +#ifndef SQLITE_OMIT_INCRBLOB
    +  u8 isIncrblobHandle;      /* True if this cursor is an incr. io handle */
    +  Pgno *aOverflow;          /* Cache of overflow page locations */
    +#endif
    +  i16 iPage;                            /* Index of current page in apPage */
    +  MemPage *apPage[BTCURSOR_MAX_DEPTH];  /* Pages from root to current page */
    +  u16 aiIdx[BTCURSOR_MAX_DEPTH];        /* Current index in apPage[i] */
    +};
    +
    +/*
    +** Potential values for BtCursor.eState.
    +**
    +** CURSOR_VALID:
    +**   Cursor points to a valid entry. getPayload() etc. may be called.
    +**
    +** CURSOR_INVALID:
    +**   Cursor does not point to a valid entry. This can happen (for example) 
    +**   because the table is empty or because BtreeCursorFirst() has not been
    +**   called.
    +**
    +** CURSOR_REQUIRESEEK:
    +**   The table that this cursor was opened on still exists, but has been 
    +**   modified since the cursor was last used. The cursor position is saved
    +**   in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in 
    +**   this state, restoreCursorPosition() can be called to attempt to
    +**   seek the cursor to the saved position.
    +**
    +** CURSOR_FAULT:
    +**   A unrecoverable error (an I/O error or a malloc failure) has occurred
    +**   on a different connection that shares the BtShared cache with this
    +**   cursor.  The error has left the cache in an inconsistent state.
    +**   Do nothing else with this cursor.  Any attempt to use the cursor
    +**   should return the error code stored in BtCursor.skip
    +*/
    +#define CURSOR_INVALID           0
    +#define CURSOR_VALID             1
    +#define CURSOR_REQUIRESEEK       2
    +#define CURSOR_FAULT             3
    +
    +/* 
    +** The database page the PENDING_BYTE occupies. This page is never used.
    +*/
    +# define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
    +
    +/*
    +** These macros define the location of the pointer-map entry for a 
    +** database page. The first argument to each is the number of usable
    +** bytes on each page of the database (often 1024). The second is the
    +** page number to look up in the pointer map.
    +**
    +** PTRMAP_PAGENO returns the database page number of the pointer-map
    +** page that stores the required pointer. PTRMAP_PTROFFSET returns
    +** the offset of the requested map entry.
    +**
    +** If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page,
    +** then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be
    +** used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements
    +** this test.
    +*/
    +#define PTRMAP_PAGENO(pBt, pgno) ptrmapPageno(pBt, pgno)
    +#define PTRMAP_PTROFFSET(pgptrmap, pgno) (5*(pgno-pgptrmap-1))
    +#define PTRMAP_ISPAGE(pBt, pgno) (PTRMAP_PAGENO((pBt),(pgno))==(pgno))
    +
    +/*
    +** The pointer map is a lookup table that identifies the parent page for
    +** each child page in the database file.  The parent page is the page that
    +** contains a pointer to the child.  Every page in the database contains
    +** 0 or 1 parent pages.  (In this context 'database page' refers
    +** to any page that is not part of the pointer map itself.)  Each pointer map
    +** entry consists of a single byte 'type' and a 4 byte parent page number.
    +** The PTRMAP_XXX identifiers below are the valid types.
    +**
    +** The purpose of the pointer map is to facility moving pages from one
    +** position in the file to another as part of autovacuum.  When a page
    +** is moved, the pointer in its parent must be updated to point to the
    +** new location.  The pointer map is used to locate the parent page quickly.
    +**
    +** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not
    +**                  used in this case.
    +**
    +** PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number 
    +**                  is not used in this case.
    +**
    +** PTRMAP_OVERFLOW1: The database page is the first page in a list of 
    +**                   overflow pages. The page number identifies the page that
    +**                   contains the cell with a pointer to this overflow page.
    +**
    +** PTRMAP_OVERFLOW2: The database page is the second or later page in a list of
    +**                   overflow pages. The page-number identifies the previous
    +**                   page in the overflow page list.
    +**
    +** PTRMAP_BTREE: The database page is a non-root btree page. The page number
    +**               identifies the parent page in the btree.
    +*/
    +#define PTRMAP_ROOTPAGE 1
    +#define PTRMAP_FREEPAGE 2
    +#define PTRMAP_OVERFLOW1 3
    +#define PTRMAP_OVERFLOW2 4
    +#define PTRMAP_BTREE 5
    +
    +/* A bunch of assert() statements to check the transaction state variables
    +** of handle p (type Btree*) are internally consistent.
    +*/
    +#define btreeIntegrity(p) \
    +  assert( p->pBt->inTransaction!=TRANS_NONE || p->pBt->nTransaction==0 ); \
    +  assert( p->pBt->inTransaction>=p->inTrans ); 
    +
    +
    +/*
    +** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
    +** if the database supports auto-vacuum or not. Because it is used
    +** within an expression that is an argument to another macro 
    +** (sqliteMallocRaw), it is not possible to use conditional compilation.
    +** So, this macro is defined instead.
    +*/
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +#define ISAUTOVACUUM (pBt->autoVacuum)
    +#else
    +#define ISAUTOVACUUM 0
    +#endif
    +
    +
    +/*
    +** This structure is passed around through all the sanity checking routines
    +** in order to keep track of some global state information.
    +*/
    +typedef struct IntegrityCk IntegrityCk;
    +struct IntegrityCk {
    +  BtShared *pBt;    /* The tree being checked out */
    +  Pager *pPager;    /* The associated pager.  Also accessible by pBt->pPager */
    +  Pgno nPage;       /* Number of pages in the database */
    +  int *anRef;       /* Number of times each page is referenced */
    +  int mxErr;        /* Stop accumulating errors when this reaches zero */
    +  int nErr;         /* Number of messages written to zErrMsg so far */
    +  int mallocFailed; /* A memory allocation error has occurred */
    +  StrAccum errMsg;  /* Accumulate the error message text here */
    +};
    +
    +/*
    +** Read or write a two- and four-byte big-endian integer values.
    +*/
    +#define get2byte(x)   ((x)[0]<<8 | (x)[1])
    +#define put2byte(p,v) ((p)[0] = (u8)((v)>>8), (p)[1] = (u8)(v))
    +#define get4byte sqlite3Get4byte
    +#define put4byte sqlite3Put4byte
    +
    +/************** End of btreeInt.h ********************************************/
    +/************** Continuing where we left off in btmutex.c ********************/
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +#if SQLITE_THREADSAFE
    +
    +/*
    +** Obtain the BtShared mutex associated with B-Tree handle p. Also,
    +** set BtShared.db to the database handle associated with p and the
    +** p->locked boolean to true.
    +*/
    +static void lockBtreeMutex(Btree *p){
    +  assert( p->locked==0 );
    +  assert( sqlite3_mutex_notheld(p->pBt->mutex) );
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +
    +  sqlite3_mutex_enter(p->pBt->mutex);
    +  p->pBt->db = p->db;
    +  p->locked = 1;
    +}
    +
    +/*
    +** Release the BtShared mutex associated with B-Tree handle p and
    +** clear the p->locked boolean.
    +*/
    +static void unlockBtreeMutex(Btree *p){
    +  assert( p->locked==1 );
    +  assert( sqlite3_mutex_held(p->pBt->mutex) );
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  assert( p->db==p->pBt->db );
    +
    +  sqlite3_mutex_leave(p->pBt->mutex);
    +  p->locked = 0;
    +}
    +
    +/*
    +** Enter a mutex on the given BTree object.
    +**
    +** If the object is not sharable, then no mutex is ever required
    +** and this routine is a no-op.  The underlying mutex is non-recursive.
    +** But we keep a reference count in Btree.wantToLock so the behavior
    +** of this interface is recursive.
    +**
    +** To avoid deadlocks, multiple Btrees are locked in the same order
    +** by all database connections.  The p->pNext is a list of other
    +** Btrees belonging to the same database connection as the p Btree
    +** which need to be locked after p.  If we cannot get a lock on
    +** p, then first unlock all of the others on p->pNext, then wait
    +** for the lock to become available on p, then relock all of the
    +** subsequent Btrees that desire a lock.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
    +  Btree *pLater;
    +
    +  /* Some basic sanity checking on the Btree.  The list of Btrees
    +  ** connected by pNext and pPrev should be in sorted order by
    +  ** Btree.pBt value. All elements of the list should belong to
    +  ** the same connection. Only shared Btrees are on the list. */
    +  assert( p->pNext==0 || p->pNext->pBt>p->pBt );
    +  assert( p->pPrev==0 || p->pPrev->pBt<p->pBt );
    +  assert( p->pNext==0 || p->pNext->db==p->db );
    +  assert( p->pPrev==0 || p->pPrev->db==p->db );
    +  assert( p->sharable || (p->pNext==0 && p->pPrev==0) );
    +
    +  /* Check for locking consistency */
    +  assert( !p->locked || p->wantToLock>0 );
    +  assert( p->sharable || p->wantToLock==0 );
    +
    +  /* We should already hold a lock on the database connection */
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +
    +  /* Unless the database is sharable and unlocked, then BtShared.db
    +  ** should already be set correctly. */
    +  assert( (p->locked==0 && p->sharable) || p->pBt->db==p->db );
    +
    +  if( !p->sharable ) return;
    +  p->wantToLock++;
    +  if( p->locked ) return;
    +
    +  /* In most cases, we should be able to acquire the lock we
    +  ** want without having to go throught the ascending lock
    +  ** procedure that follows.  Just be sure not to block.
    +  */
    +  if( sqlite3_mutex_try(p->pBt->mutex)==SQLITE_OK ){
    +    p->pBt->db = p->db;
    +    p->locked = 1;
    +    return;
    +  }
    +
    +  /* To avoid deadlock, first release all locks with a larger
    +  ** BtShared address.  Then acquire our lock.  Then reacquire
    +  ** the other BtShared locks that we used to hold in ascending
    +  ** order.
    +  */
    +  for(pLater=p->pNext; pLater; pLater=pLater->pNext){
    +    assert( pLater->sharable );
    +    assert( pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt );
    +    assert( !pLater->locked || pLater->wantToLock>0 );
    +    if( pLater->locked ){
    +      unlockBtreeMutex(pLater);
    +    }
    +  }
    +  lockBtreeMutex(p);
    +  for(pLater=p->pNext; pLater; pLater=pLater->pNext){
    +    if( pLater->wantToLock ){
    +      lockBtreeMutex(pLater);
    +    }
    +  }
    +}
    +
    +/*
    +** Exit the recursive mutex on a Btree.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){
    +  if( p->sharable ){
    +    assert( p->wantToLock>0 );
    +    p->wantToLock--;
    +    if( p->wantToLock==0 ){
    +      unlockBtreeMutex(p);
    +    }
    +  }
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** Return true if the BtShared mutex is held on the btree, or if the
    +** B-Tree is not marked as sharable.
    +**
    +** This routine is used only from within assert() statements.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){
    +  assert( p->sharable==0 || p->locked==0 || p->wantToLock>0 );
    +  assert( p->sharable==0 || p->locked==0 || p->db==p->pBt->db );
    +  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex) );
    +  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex) );
    +
    +  return (p->sharable==0 || p->locked);
    +}
    +#endif
    +
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +/*
    +** Enter and leave a mutex on a Btree given a cursor owned by that
    +** Btree.  These entry points are used by incremental I/O and can be
    +** omitted if that module is not used.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor *pCur){
    +  sqlite3BtreeEnter(pCur->pBtree);
    +}
    +SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){
    +  sqlite3BtreeLeave(pCur->pBtree);
    +}
    +#endif /* SQLITE_OMIT_INCRBLOB */
    +
    +
    +/*
    +** Enter the mutex on every Btree associated with a database
    +** connection.  This is needed (for example) prior to parsing
    +** a statement since we will be comparing table and column names
    +** against all schemas and we do not want those schemas being
    +** reset out from under us.
    +**
    +** There is a corresponding leave-all procedures.
    +**
    +** Enter the mutexes in accending order by BtShared pointer address
    +** to avoid the possibility of deadlock when two threads with
    +** two or more btrees in common both try to lock all their btrees
    +** at the same instant.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
    +  int i;
    +  Btree *p, *pLater;
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  for(i=0; i<db->nDb; i++){
    +    p = db->aDb[i].pBt;
    +    assert( !p || (p->locked==0 && p->sharable) || p->pBt->db==p->db );
    +    if( p && p->sharable ){
    +      p->wantToLock++;
    +      if( !p->locked ){
    +        assert( p->wantToLock==1 );
    +        while( p->pPrev ) p = p->pPrev;
    +        /* Reason for ALWAYS:  There must be at least on unlocked Btree in
    +        ** the chain.  Otherwise the !p->locked test above would have failed */
    +        while( p->locked && ALWAYS(p->pNext) ) p = p->pNext;
    +        for(pLater = p->pNext; pLater; pLater=pLater->pNext){
    +          if( pLater->locked ){
    +            unlockBtreeMutex(pLater);
    +          }
    +        }
    +        while( p ){
    +          lockBtreeMutex(p);
    +          p = p->pNext;
    +        }
    +      }
    +    }
    +  }
    +}
    +SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
    +  int i;
    +  Btree *p;
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  for(i=0; i<db->nDb; i++){
    +    p = db->aDb[i].pBt;
    +    if( p && p->sharable ){
    +      assert( p->wantToLock>0 );
    +      p->wantToLock--;
    +      if( p->wantToLock==0 ){
    +        unlockBtreeMutex(p);
    +      }
    +    }
    +  }
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** Return true if the current thread holds the database connection
    +** mutex and all required BtShared mutexes.
    +**
    +** This routine is used inside assert() statements only.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
    +  int i;
    +  if( !sqlite3_mutex_held(db->mutex) ){
    +    return 0;
    +  }
    +  for(i=0; i<db->nDb; i++){
    +    Btree *p;
    +    p = db->aDb[i].pBt;
    +    if( p && p->sharable &&
    +         (p->wantToLock==0 || !sqlite3_mutex_held(p->pBt->mutex)) ){
    +      return 0;
    +    }
    +  }
    +  return 1;
    +}
    +#endif /* NDEBUG */
    +
    +/*
    +** Add a new Btree pointer to a BtreeMutexArray. 
    +** if the pointer can possibly be shared with
    +** another database connection.
    +**
    +** The pointers are kept in sorted order by pBtree->pBt.  That
    +** way when we go to enter all the mutexes, we can enter them
    +** in order without every having to backup and retry and without
    +** worrying about deadlock.
    +**
    +** The number of shared btrees will always be small (usually 0 or 1)
    +** so an insertion sort is an adequate algorithm here.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeMutexArrayInsert(BtreeMutexArray *pArray, Btree *pBtree){
    +  int i, j;
    +  BtShared *pBt;
    +  if( pBtree==0 || pBtree->sharable==0 ) return;
    +#ifndef NDEBUG
    +  {
    +    for(i=0; i<pArray->nMutex; i++){
    +      assert( pArray->aBtree[i]!=pBtree );
    +    }
    +  }
    +#endif
    +  assert( pArray->nMutex>=0 );
    +  assert( pArray->nMutex<ArraySize(pArray->aBtree)-1 );
    +  pBt = pBtree->pBt;
    +  for(i=0; i<pArray->nMutex; i++){
    +    assert( pArray->aBtree[i]!=pBtree );
    +    if( pArray->aBtree[i]->pBt>pBt ){
    +      for(j=pArray->nMutex; j>i; j--){
    +        pArray->aBtree[j] = pArray->aBtree[j-1];
    +      }
    +      pArray->aBtree[i] = pBtree;
    +      pArray->nMutex++;
    +      return;
    +    }
    +  }
    +  pArray->aBtree[pArray->nMutex++] = pBtree;
    +}
    +
    +/*
    +** Enter the mutex of every btree in the array.  This routine is
    +** called at the beginning of sqlite3VdbeExec().  The mutexes are
    +** exited at the end of the same function.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeMutexArrayEnter(BtreeMutexArray *pArray){
    +  int i;
    +  for(i=0; i<pArray->nMutex; i++){
    +    Btree *p = pArray->aBtree[i];
    +    /* Some basic sanity checking */
    +    assert( i==0 || pArray->aBtree[i-1]->pBt<p->pBt );
    +    assert( !p->locked || p->wantToLock>0 );
    +
    +    /* We should already hold a lock on the database connection */
    +    assert( sqlite3_mutex_held(p->db->mutex) );
    +
    +    /* The Btree is sharable because only sharable Btrees are entered
    +    ** into the array in the first place. */
    +    assert( p->sharable );
    +
    +    p->wantToLock++;
    +    if( !p->locked ){
    +      lockBtreeMutex(p);
    +    }
    +  }
    +}
    +
    +/*
    +** Leave the mutex of every btree in the group.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeMutexArrayLeave(BtreeMutexArray *pArray){
    +  int i;
    +  for(i=0; i<pArray->nMutex; i++){
    +    Btree *p = pArray->aBtree[i];
    +    /* Some basic sanity checking */
    +    assert( i==0 || pArray->aBtree[i-1]->pBt<p->pBt );
    +    assert( p->locked );
    +    assert( p->wantToLock>0 );
    +
    +    /* We should already hold a lock on the database connection */
    +    assert( sqlite3_mutex_held(p->db->mutex) );
    +
    +    p->wantToLock--;
    +    if( p->wantToLock==0 ){
    +      unlockBtreeMutex(p);
    +    }
    +  }
    +}
    +
    +#else
    +SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
    +  p->pBt->db = p->db;
    +}
    +SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
    +  int i;
    +  for(i=0; i<db->nDb; i++){
    +    Btree *p = db->aDb[i].pBt;
    +    if( p ){
    +      p->pBt->db = p->db;
    +    }
    +  }
    +}
    +#endif /* if SQLITE_THREADSAFE */
    +#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
    +
    +/************** End of btmutex.c *********************************************/
    +/************** Begin file btree.c *******************************************/
    +/*
    +** 2004 April 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** $Id: btree.c,v 1.705 2009/08/10 03:57:58 shane Exp $
    +**
    +** This file implements a external (disk-based) database using BTrees.
    +** See the header comment on "btreeInt.h" for additional information.
    +** Including a description of file format and an overview of operation.
    +*/
    +
    +/*
    +** The header string that appears at the beginning of every
    +** SQLite database.
    +*/
    +static const char zMagicHeader[] = SQLITE_FILE_HEADER;
    +
    +/*
    +** Set this global variable to 1 to enable tracing using the TRACE
    +** macro.
    +*/
    +#if 0
    +int sqlite3BtreeTrace=1;  /* True to enable tracing */
    +# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}
    +#else
    +# define TRACE(X)
    +#endif
    +
    +
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** A list of BtShared objects that are eligible for participation
    +** in shared cache.  This variable has file scope during normal builds,
    +** but the test harness needs to access it so we make it global for 
    +** test builds.
    +**
    +** Access to this variable is protected by SQLITE_MUTEX_STATIC_MASTER.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
    +#else
    +static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
    +#endif
    +#endif /* SQLITE_OMIT_SHARED_CACHE */
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** Enable or disable the shared pager and schema features.
    +**
    +** This routine has no effect on existing database connections.
    +** The shared cache setting effects only future calls to
    +** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
    +*/
    +SQLITE_API int sqlite3_enable_shared_cache(int enable){
    +  sqlite3GlobalConfig.sharedCacheEnabled = enable;
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +
    +
    +#ifdef SQLITE_OMIT_SHARED_CACHE
    +  /*
    +  ** The functions querySharedCacheTableLock(), setSharedCacheTableLock(),
    +  ** and clearAllSharedCacheTableLocks()
    +  ** manipulate entries in the BtShared.pLock linked list used to store
    +  ** shared-cache table level locks. If the library is compiled with the
    +  ** shared-cache feature disabled, then there is only ever one user
    +  ** of each BtShared structure and so this locking is not necessary. 
    +  ** So define the lock related functions as no-ops.
    +  */
    +  #define querySharedCacheTableLock(a,b,c) SQLITE_OK
    +  #define setSharedCacheTableLock(a,b,c) SQLITE_OK
    +  #define clearAllSharedCacheTableLocks(a)
    +  #define downgradeAllSharedCacheTableLocks(a)
    +  #define hasSharedCacheTableLock(a,b,c,d) 1
    +  #define hasReadConflicts(a, b) 0
    +#endif
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +**** This function is only used as part of an assert() statement. ***
    +**
    +** Check to see if pBtree holds the required locks to read or write to the 
    +** table with root page iRoot.   Return 1 if it does and 0 if not.
    +**
    +** For example, when writing to a table with root-page iRoot via 
    +** Btree connection pBtree:
    +**
    +**    assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );
    +**
    +** When writing to an index that resides in a sharable database, the 
    +** caller should have first obtained a lock specifying the root page of
    +** the corresponding table. This makes things a bit more complicated,
    +** as this module treats each table as a separate structure. To determine
    +** the table corresponding to the index being written, this
    +** function has to search through the database schema.
    +**
    +** Instead of a lock on the table/index rooted at page iRoot, the caller may
    +** hold a write-lock on the schema table (root page 1). This is also
    +** acceptable.
    +*/
    +static int hasSharedCacheTableLock(
    +  Btree *pBtree,         /* Handle that must hold lock */
    +  Pgno iRoot,            /* Root page of b-tree */
    +  int isIndex,           /* True if iRoot is the root of an index b-tree */
    +  int eLockType          /* Required lock type (READ_LOCK or WRITE_LOCK) */
    +){
    +  Schema *pSchema = (Schema *)pBtree->pBt->pSchema;
    +  Pgno iTab = 0;
    +  BtLock *pLock;
    +
    +  /* If this database is not shareable, or if the client is reading
    +  ** and has the read-uncommitted flag set, then no lock is required. 
    +  ** Return true immediately.
    +  */
    +  if( (pBtree->sharable==0)
    +   || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommitted))
    +  ){
    +    return 1;
    +  }
    +
    +  /* If the client is reading  or writing an index and the schema is
    +  ** not loaded, then it is too difficult to actually check to see if
    +  ** the correct locks are held.  So do not bother - just return true.
    +  ** This case does not come up very often anyhow.
    +  */
    +  if( isIndex && (!pSchema || (pSchema->flags&DB_SchemaLoaded)==0) ){
    +    return 1;
    +  }
    +
    +  /* Figure out the root-page that the lock should be held on. For table
    +  ** b-trees, this is just the root page of the b-tree being read or
    +  ** written. For index b-trees, it is the root page of the associated
    +  ** table.  */
    +  if( isIndex ){
    +    HashElem *p;
    +    for(p=sqliteHashFirst(&pSchema->idxHash); p; p=sqliteHashNext(p)){
    +      Index *pIdx = (Index *)sqliteHashData(p);
    +      if( pIdx->tnum==(int)iRoot ){
    +        iTab = pIdx->pTable->tnum;
    +      }
    +    }
    +  }else{
    +    iTab = iRoot;
    +  }
    +
    +  /* Search for the required lock. Either a write-lock on root-page iTab, a 
    +  ** write-lock on the schema table, or (if the client is reading) a
    +  ** read-lock on iTab will suffice. Return 1 if any of these are found.  */
    +  for(pLock=pBtree->pBt->pLock; pLock; pLock=pLock->pNext){
    +    if( pLock->pBtree==pBtree 
    +     && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
    +     && pLock->eLock>=eLockType 
    +    ){
    +      return 1;
    +    }
    +  }
    +
    +  /* Failed to find the required lock. */
    +  return 0;
    +}
    +#endif /* SQLITE_DEBUG */
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +**** This function may be used as part of assert() statements only. ****
    +**
    +** Return true if it would be illegal for pBtree to write into the
    +** table or index rooted at iRoot because other shared connections are
    +** simultaneously reading that same table or index.
    +**
    +** It is illegal for pBtree to write if some other Btree object that
    +** shares the same BtShared object is currently reading or writing
    +** the iRoot table.  Except, if the other Btree object has the
    +** read-uncommitted flag set, then it is OK for the other object to
    +** have a read cursor.
    +**
    +** For example, before writing to any part of the table or index
    +** rooted at page iRoot, one should call:
    +**
    +**    assert( !hasReadConflicts(pBtree, iRoot) );
    +*/
    +static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
    +  BtCursor *p;
    +  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
    +    if( p->pgnoRoot==iRoot 
    +     && p->pBtree!=pBtree
    +     && 0==(p->pBtree->db->flags & SQLITE_ReadUncommitted)
    +    ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +#endif    /* #ifdef SQLITE_DEBUG */
    +
    +/*
    +** Query to see if Btree handle p may obtain a lock of type eLock 
    +** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
    +** SQLITE_OK if the lock may be obtained (by calling
    +** setSharedCacheTableLock()), or SQLITE_LOCKED if not.
    +*/
    +static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
    +  BtShared *pBt = p->pBt;
    +  BtLock *pIter;
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );
    +  assert( p->db!=0 );
    +  assert( !(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 );
    +  
    +  /* If requesting a write-lock, then the Btree must have an open write
    +  ** transaction on this file. And, obviously, for this to be so there 
    +  ** must be an open write transaction on the file itself.
    +  */
    +  assert( eLock==READ_LOCK || (p==pBt->pWriter && p->inTrans==TRANS_WRITE) );
    +  assert( eLock==READ_LOCK || pBt->inTransaction==TRANS_WRITE );
    +  
    +  /* This routine is a no-op if the shared-cache is not enabled */
    +  if( !p->sharable ){
    +    return SQLITE_OK;
    +  }
    +
    +  /* If some other connection is holding an exclusive lock, the
    +  ** requested lock may not be obtained.
    +  */
    +  if( pBt->pWriter!=p && pBt->isExclusive ){
    +    sqlite3ConnectionBlocked(p->db, pBt->pWriter->db);
    +    return SQLITE_LOCKED_SHAREDCACHE;
    +  }
    +
    +  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
    +    /* The condition (pIter->eLock!=eLock) in the following if(...) 
    +    ** statement is a simplification of:
    +    **
    +    **   (eLock==WRITE_LOCK || pIter->eLock==WRITE_LOCK)
    +    **
    +    ** since we know that if eLock==WRITE_LOCK, then no other connection
    +    ** may hold a WRITE_LOCK on any table in this file (since there can
    +    ** only be a single writer).
    +    */
    +    assert( pIter->eLock==READ_LOCK || pIter->eLock==WRITE_LOCK );
    +    assert( eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK);
    +    if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
    +      sqlite3ConnectionBlocked(p->db, pIter->pBtree->db);
    +      if( eLock==WRITE_LOCK ){
    +        assert( p==pBt->pWriter );
    +        pBt->isPending = 1;
    +      }
    +      return SQLITE_LOCKED_SHAREDCACHE;
    +    }
    +  }
    +  return SQLITE_OK;
    +}
    +#endif /* !SQLITE_OMIT_SHARED_CACHE */
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** Add a lock on the table with root-page iTable to the shared-btree used
    +** by Btree handle p. Parameter eLock must be either READ_LOCK or 
    +** WRITE_LOCK.
    +**
    +** This function assumes the following:
    +**
    +**   (a) The specified Btree object p is connected to a sharable
    +**       database (one with the BtShared.sharable flag set), and
    +**
    +**   (b) No other Btree objects hold a lock that conflicts
    +**       with the requested lock (i.e. querySharedCacheTableLock() has
    +**       already been called and returned SQLITE_OK).
    +**
    +** SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM 
    +** is returned if a malloc attempt fails.
    +*/
    +static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
    +  BtShared *pBt = p->pBt;
    +  BtLock *pLock = 0;
    +  BtLock *pIter;
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );
    +  assert( p->db!=0 );
    +
    +  /* A connection with the read-uncommitted flag set will never try to
    +  ** obtain a read-lock using this function. The only read-lock obtained
    +  ** by a connection in read-uncommitted mode is on the sqlite_master 
    +  ** table, and that lock is obtained in BtreeBeginTrans().  */
    +  assert( 0==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK );
    +
    +  /* This function should only be called on a sharable b-tree after it 
    +  ** has been determined that no other b-tree holds a conflicting lock.  */
    +  assert( p->sharable );
    +  assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
    +
    +  /* First search the list for an existing lock on this table. */
    +  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
    +    if( pIter->iTable==iTable && pIter->pBtree==p ){
    +      pLock = pIter;
    +      break;
    +    }
    +  }
    +
    +  /* If the above search did not find a BtLock struct associating Btree p
    +  ** with table iTable, allocate one and link it into the list.
    +  */
    +  if( !pLock ){
    +    pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));
    +    if( !pLock ){
    +      return SQLITE_NOMEM;
    +    }
    +    pLock->iTable = iTable;
    +    pLock->pBtree = p;
    +    pLock->pNext = pBt->pLock;
    +    pBt->pLock = pLock;
    +  }
    +
    +  /* Set the BtLock.eLock variable to the maximum of the current lock
    +  ** and the requested lock. This means if a write-lock was already held
    +  ** and a read-lock requested, we don't incorrectly downgrade the lock.
    +  */
    +  assert( WRITE_LOCK>READ_LOCK );
    +  if( eLock>pLock->eLock ){
    +    pLock->eLock = eLock;
    +  }
    +
    +  return SQLITE_OK;
    +}
    +#endif /* !SQLITE_OMIT_SHARED_CACHE */
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** Release all the table locks (locks obtained via calls to
    +** the setSharedCacheTableLock() procedure) held by Btree object p.
    +**
    +** This function assumes that Btree p has an open read or write 
    +** transaction. If it does not, then the BtShared.isPending variable
    +** may be incorrectly cleared.
    +*/
    +static void clearAllSharedCacheTableLocks(Btree *p){
    +  BtShared *pBt = p->pBt;
    +  BtLock **ppIter = &pBt->pLock;
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( p->sharable || 0==*ppIter );
    +  assert( p->inTrans>0 );
    +
    +  while( *ppIter ){
    +    BtLock *pLock = *ppIter;
    +    assert( pBt->isExclusive==0 || pBt->pWriter==pLock->pBtree );
    +    assert( pLock->pBtree->inTrans>=pLock->eLock );
    +    if( pLock->pBtree==p ){
    +      *ppIter = pLock->pNext;
    +      assert( pLock->iTable!=1 || pLock==&p->lock );
    +      if( pLock->iTable!=1 ){
    +        sqlite3_free(pLock);
    +      }
    +    }else{
    +      ppIter = &pLock->pNext;
    +    }
    +  }
    +
    +  assert( pBt->isPending==0 || pBt->pWriter );
    +  if( pBt->pWriter==p ){
    +    pBt->pWriter = 0;
    +    pBt->isExclusive = 0;
    +    pBt->isPending = 0;
    +  }else if( pBt->nTransaction==2 ){
    +    /* This function is called when Btree p is concluding its 
    +    ** transaction. If there currently exists a writer, and p is not
    +    ** that writer, then the number of locks held by connections other
    +    ** than the writer must be about to drop to zero. In this case
    +    ** set the isPending flag to 0.
    +    **
    +    ** If there is not currently a writer, then BtShared.isPending must
    +    ** be zero already. So this next line is harmless in that case.
    +    */
    +    pBt->isPending = 0;
    +  }
    +}
    +
    +/*
    +** This function changes all write-locks held by Btree p into read-locks.
    +*/
    +static void downgradeAllSharedCacheTableLocks(Btree *p){
    +  BtShared *pBt = p->pBt;
    +  if( pBt->pWriter==p ){
    +    BtLock *pLock;
    +    pBt->pWriter = 0;
    +    pBt->isExclusive = 0;
    +    pBt->isPending = 0;
    +    for(pLock=pBt->pLock; pLock; pLock=pLock->pNext){
    +      assert( pLock->eLock==READ_LOCK || pLock->pBtree==p );
    +      pLock->eLock = READ_LOCK;
    +    }
    +  }
    +}
    +
    +#endif /* SQLITE_OMIT_SHARED_CACHE */
    +
    +static void releasePage(MemPage *pPage);  /* Forward reference */
    +
    +/*
    +***** This routine is used inside of assert() only ****
    +**
    +** Verify that the cursor holds the mutex on its BtShared
    +*/
    +#ifdef SQLITE_DEBUG
    +static int cursorHoldsMutex(BtCursor *p){
    +  return sqlite3_mutex_held(p->pBt->mutex);
    +}
    +#endif
    +
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +/*
    +** Invalidate the overflow page-list cache for cursor pCur, if any.
    +*/
    +static void invalidateOverflowCache(BtCursor *pCur){
    +  assert( cursorHoldsMutex(pCur) );
    +  sqlite3_free(pCur->aOverflow);
    +  pCur->aOverflow = 0;
    +}
    +
    +/*
    +** Invalidate the overflow page-list cache for all cursors opened
    +** on the shared btree structure pBt.
    +*/
    +static void invalidateAllOverflowCache(BtShared *pBt){
    +  BtCursor *p;
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  for(p=pBt->pCursor; p; p=p->pNext){
    +    invalidateOverflowCache(p);
    +  }
    +}
    +
    +/*
    +** This function is called before modifying the contents of a table
    +** to invalidate any incrblob cursors that are open on the
    +** row or one of the rows being modified.
    +**
    +** If argument isClearTable is true, then the entire contents of the
    +** table is about to be deleted. In this case invalidate all incrblob
    +** cursors open on any row within the table with root-page pgnoRoot.
    +**
    +** Otherwise, if argument isClearTable is false, then the row with
    +** rowid iRow is being replaced or deleted. In this case invalidate
    +** only those incrblob cursors open on that specific row.
    +*/
    +static void invalidateIncrblobCursors(
    +  Btree *pBtree,          /* The database file to check */
    +  i64 iRow,               /* The rowid that might be changing */
    +  int isClearTable        /* True if all rows are being deleted */
    +){
    +  BtCursor *p;
    +  BtShared *pBt = pBtree->pBt;
    +  assert( sqlite3BtreeHoldsMutex(pBtree) );
    +  for(p=pBt->pCursor; p; p=p->pNext){
    +    if( p->isIncrblobHandle && (isClearTable || p->info.nKey==iRow) ){
    +      p->eState = CURSOR_INVALID;
    +    }
    +  }
    +}
    +
    +#else
    +  /* Stub functions when INCRBLOB is omitted */
    +  #define invalidateOverflowCache(x)
    +  #define invalidateAllOverflowCache(x)
    +  #define invalidateIncrblobCursors(x,y,z)
    +#endif /* SQLITE_OMIT_INCRBLOB */
    +
    +/*
    +** Set bit pgno of the BtShared.pHasContent bitvec. This is called 
    +** when a page that previously contained data becomes a free-list leaf 
    +** page.
    +**
    +** The BtShared.pHasContent bitvec exists to work around an obscure
    +** bug caused by the interaction of two useful IO optimizations surrounding
    +** free-list leaf pages:
    +**
    +**   1) When all data is deleted from a page and the page becomes
    +**      a free-list leaf page, the page is not written to the database
    +**      (as free-list leaf pages contain no meaningful data). Sometimes
    +**      such a page is not even journalled (as it will not be modified,
    +**      why bother journalling it?).
    +**
    +**   2) When a free-list leaf page is reused, its content is not read
    +**      from the database or written to the journal file (why should it
    +**      be, if it is not at all meaningful?).
    +**
    +** By themselves, these optimizations work fine and provide a handy
    +** performance boost to bulk delete or insert operations. However, if
    +** a page is moved to the free-list and then reused within the same
    +** transaction, a problem comes up. If the page is not journalled when
    +** it is moved to the free-list and it is also not journalled when it
    +** is extracted from the free-list and reused, then the original data
    +** may be lost. In the event of a rollback, it may not be possible
    +** to restore the database to its original configuration.
    +**
    +** The solution is the BtShared.pHasContent bitvec. Whenever a page is 
    +** moved to become a free-list leaf page, the corresponding bit is
    +** set in the bitvec. Whenever a leaf page is extracted from the free-list,
    +** optimization 2 above is omitted if the corresponding bit is already
    +** set in BtShared.pHasContent. The contents of the bitvec are cleared
    +** at the end of every transaction.
    +*/
    +static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
    +  int rc = SQLITE_OK;
    +  if( !pBt->pHasContent ){
    +    int nPage = 100;
    +    sqlite3PagerPagecount(pBt->pPager, &nPage);
    +    /* If sqlite3PagerPagecount() fails there is no harm because the
    +    ** nPage variable is unchanged from its default value of 100 */
    +    pBt->pHasContent = sqlite3BitvecCreate((u32)nPage);
    +    if( !pBt->pHasContent ){
    +      rc = SQLITE_NOMEM;
    +    }
    +  }
    +  if( rc==SQLITE_OK && pgno<=sqlite3BitvecSize(pBt->pHasContent) ){
    +    rc = sqlite3BitvecSet(pBt->pHasContent, pgno);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Query the BtShared.pHasContent vector.
    +**
    +** This function is called when a free-list leaf page is removed from the
    +** free-list for reuse. It returns false if it is safe to retrieve the
    +** page from the pager layer with the 'no-content' flag set. True otherwise.
    +*/
    +static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
    +  Bitvec *p = pBt->pHasContent;
    +  return (p && (pgno>sqlite3BitvecSize(p) || sqlite3BitvecTest(p, pgno)));
    +}
    +
    +/*
    +** Clear (destroy) the BtShared.pHasContent bitvec. This should be
    +** invoked at the conclusion of each write-transaction.
    +*/
    +static void btreeClearHasContent(BtShared *pBt){
    +  sqlite3BitvecDestroy(pBt->pHasContent);
    +  pBt->pHasContent = 0;
    +}
    +
    +/*
    +** Save the current cursor position in the variables BtCursor.nKey 
    +** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
    +**
    +** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
    +** prior to calling this routine.  
    +*/
    +static int saveCursorPosition(BtCursor *pCur){
    +  int rc;
    +
    +  assert( CURSOR_VALID==pCur->eState );
    +  assert( 0==pCur->pKey );
    +  assert( cursorHoldsMutex(pCur) );
    +
    +  rc = sqlite3BtreeKeySize(pCur, &pCur->nKey);
    +  assert( rc==SQLITE_OK );  /* KeySize() cannot fail */
    +
    +  /* If this is an intKey table, then the above call to BtreeKeySize()
    +  ** stores the integer key in pCur->nKey. In this case this value is
    +  ** all that is required. Otherwise, if pCur is not open on an intKey
    +  ** table, then malloc space for and store the pCur->nKey bytes of key 
    +  ** data.
    +  */
    +  if( 0==pCur->apPage[0]->intKey ){
    +    void *pKey = sqlite3Malloc( (int)pCur->nKey );
    +    if( pKey ){
    +      rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
    +      if( rc==SQLITE_OK ){
    +        pCur->pKey = pKey;
    +      }else{
    +        sqlite3_free(pKey);
    +      }
    +    }else{
    +      rc = SQLITE_NOMEM;
    +    }
    +  }
    +  assert( !pCur->apPage[0]->intKey || !pCur->pKey );
    +
    +  if( rc==SQLITE_OK ){
    +    int i;
    +    for(i=0; i<=pCur->iPage; i++){
    +      releasePage(pCur->apPage[i]);
    +      pCur->apPage[i] = 0;
    +    }
    +    pCur->iPage = -1;
    +    pCur->eState = CURSOR_REQUIRESEEK;
    +  }
    +
    +  invalidateOverflowCache(pCur);
    +  return rc;
    +}
    +
    +/*
    +** Save the positions of all cursors (except pExcept) that are open on
    +** the table  with root-page iRoot. Usually, this is called just before cursor
    +** pExcept is used to modify the table (BtreeDelete() or BtreeInsert()).
    +*/
    +static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
    +  BtCursor *p;
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( pExcept==0 || pExcept->pBt==pBt );
    +  for(p=pBt->pCursor; p; p=p->pNext){
    +    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) && 
    +        p->eState==CURSOR_VALID ){
    +      int rc = saveCursorPosition(p);
    +      if( SQLITE_OK!=rc ){
    +        return rc;
    +      }
    +    }
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Clear the current cursor position.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *pCur){
    +  assert( cursorHoldsMutex(pCur) );
    +  sqlite3_free(pCur->pKey);
    +  pCur->pKey = 0;
    +  pCur->eState = CURSOR_INVALID;
    +}
    +
    +/*
    +** In this version of BtreeMoveto, pKey is a packed index record
    +** such as is generated by the OP_MakeRecord opcode.  Unpack the
    +** record and then call BtreeMovetoUnpacked() to do the work.
    +*/
    +static int btreeMoveto(
    +  BtCursor *pCur,     /* Cursor open on the btree to be searched */
    +  const void *pKey,   /* Packed key if the btree is an index */
    +  i64 nKey,           /* Integer key for tables.  Size of pKey for indices */
    +  int bias,           /* Bias search to the high end */
    +  int *pRes           /* Write search results here */
    +){
    +  int rc;                    /* Status code */
    +  UnpackedRecord *pIdxKey;   /* Unpacked index key */
    +  char aSpace[150];          /* Temp space for pIdxKey - to avoid a malloc */
    +
    +  if( pKey ){
    +    assert( nKey==(i64)(int)nKey );
    +    pIdxKey = sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey,
    +                                      aSpace, sizeof(aSpace));
    +    if( pIdxKey==0 ) return SQLITE_NOMEM;
    +  }else{
    +    pIdxKey = 0;
    +  }
    +  rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
    +  if( pKey ){
    +    sqlite3VdbeDeleteUnpackedRecord(pIdxKey);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Restore the cursor to the position it was in (or as close to as possible)
    +** when saveCursorPosition() was called. Note that this call deletes the 
    +** saved position info stored by saveCursorPosition(), so there can be
    +** at most one effective restoreCursorPosition() call after each 
    +** saveCursorPosition().
    +*/
    +static int btreeRestoreCursorPosition(BtCursor *pCur){
    +  int rc;
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState>=CURSOR_REQUIRESEEK );
    +  if( pCur->eState==CURSOR_FAULT ){
    +    return pCur->skipNext;
    +  }
    +  pCur->eState = CURSOR_INVALID;
    +  rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
    +  if( rc==SQLITE_OK ){
    +    sqlite3_free(pCur->pKey);
    +    pCur->pKey = 0;
    +    assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
    +  }
    +  return rc;
    +}
    +
    +#define restoreCursorPosition(p) \
    +  (p->eState>=CURSOR_REQUIRESEEK ? \
    +         btreeRestoreCursorPosition(p) : \
    +         SQLITE_OK)
    +
    +/*
    +** Determine whether or not a cursor has moved from the position it
    +** was last placed at.  Cursors can move when the row they are pointing
    +** at is deleted out from under them.
    +**
    +** This routine returns an error code if something goes wrong.  The
    +** integer *pHasMoved is set to one if the cursor has moved and 0 if not.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur, int *pHasMoved){
    +  int rc;
    +
    +  rc = restoreCursorPosition(pCur);
    +  if( rc ){
    +    *pHasMoved = 1;
    +    return rc;
    +  }
    +  if( pCur->eState!=CURSOR_VALID || pCur->skipNext!=0 ){
    +    *pHasMoved = 1;
    +  }else{
    +    *pHasMoved = 0;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +/*
    +** Given a page number of a regular database page, return the page
    +** number for the pointer-map page that contains the entry for the
    +** input page number.
    +*/
    +static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
    +  int nPagesPerMapPage;
    +  Pgno iPtrMap, ret;
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  nPagesPerMapPage = (pBt->usableSize/5)+1;
    +  iPtrMap = (pgno-2)/nPagesPerMapPage;
    +  ret = (iPtrMap*nPagesPerMapPage) + 2; 
    +  if( ret==PENDING_BYTE_PAGE(pBt) ){
    +    ret++;
    +  }
    +  return ret;
    +}
    +
    +/*
    +** Write an entry into the pointer map.
    +**
    +** This routine updates the pointer map entry for page number 'key'
    +** so that it maps to type 'eType' and parent page number 'pgno'.
    +**
    +** If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
    +** a no-op.  If an error occurs, the appropriate error code is written
    +** into *pRC.
    +*/
    +static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
    +  DbPage *pDbPage;  /* The pointer map page */
    +  u8 *pPtrmap;      /* The pointer map data */
    +  Pgno iPtrmap;     /* The pointer map page number */
    +  int offset;       /* Offset in pointer map page */
    +  int rc;           /* Return code from subfunctions */
    +
    +  if( *pRC ) return;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  /* The master-journal page number must never be used as a pointer map page */
    +  assert( 0==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)) );
    +
    +  assert( pBt->autoVacuum );
    +  if( key==0 ){
    +    *pRC = SQLITE_CORRUPT_BKPT;
    +    return;
    +  }
    +  iPtrmap = PTRMAP_PAGENO(pBt, key);
    +  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
    +  if( rc!=SQLITE_OK ){
    +    *pRC = rc;
    +    return;
    +  }
    +  offset = PTRMAP_PTROFFSET(iPtrmap, key);
    +  if( offset<0 ){
    +    *pRC = SQLITE_CORRUPT_BKPT;
    +    goto ptrmap_exit;
    +  }
    +  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);
    +
    +  if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){
    +    TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent));
    +    *pRC= rc = sqlite3PagerWrite(pDbPage);
    +    if( rc==SQLITE_OK ){
    +      pPtrmap[offset] = eType;
    +      put4byte(&pPtrmap[offset+1], parent);
    +    }
    +  }
    +
    +ptrmap_exit:
    +  sqlite3PagerUnref(pDbPage);
    +}
    +
    +/*
    +** Read an entry from the pointer map.
    +**
    +** This routine retrieves the pointer map entry for page 'key', writing
    +** the type and parent page number to *pEType and *pPgno respectively.
    +** An error code is returned if something goes wrong, otherwise SQLITE_OK.
    +*/
    +static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
    +  DbPage *pDbPage;   /* The pointer map page */
    +  int iPtrmap;       /* Pointer map page index */
    +  u8 *pPtrmap;       /* Pointer map page data */
    +  int offset;        /* Offset of entry in pointer map */
    +  int rc;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +
    +  iPtrmap = PTRMAP_PAGENO(pBt, key);
    +  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
    +  if( rc!=0 ){
    +    return rc;
    +  }
    +  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);
    +
    +  offset = PTRMAP_PTROFFSET(iPtrmap, key);
    +  assert( pEType!=0 );
    +  *pEType = pPtrmap[offset];
    +  if( pPgno ) *pPgno = get4byte(&pPtrmap[offset+1]);
    +
    +  sqlite3PagerUnref(pDbPage);
    +  if( *pEType<1 || *pEType>5 ) return SQLITE_CORRUPT_BKPT;
    +  return SQLITE_OK;
    +}
    +
    +#else /* if defined SQLITE_OMIT_AUTOVACUUM */
    +  #define ptrmapPut(w,x,y,z,rc)
    +  #define ptrmapGet(w,x,y,z) SQLITE_OK
    +  #define ptrmapPutOvflPtr(x, y, rc)
    +#endif
    +
    +/*
    +** Given a btree page and a cell index (0 means the first cell on
    +** the page, 1 means the second cell, and so forth) return a pointer
    +** to the cell content.
    +**
    +** This routine works only for pages that do not contain overflow cells.
    +*/
    +#define findCell(P,I) \
    +  ((P)->aData + ((P)->maskPage & get2byte(&(P)->aData[(P)->cellOffset+2*(I)])))
    +
    +/*
    +** This a more complex version of findCell() that works for
    +** pages that do contain overflow cells.
    +*/
    +static u8 *findOverflowCell(MemPage *pPage, int iCell){
    +  int i;
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  for(i=pPage->nOverflow-1; i>=0; i--){
    +    int k;
    +    struct _OvflCell *pOvfl;
    +    pOvfl = &pPage->aOvfl[i];
    +    k = pOvfl->idx;
    +    if( k<=iCell ){
    +      if( k==iCell ){
    +        return pOvfl->pCell;
    +      }
    +      iCell--;
    +    }
    +  }
    +  return findCell(pPage, iCell);
    +}
    +
    +/*
    +** Parse a cell content block and fill in the CellInfo structure.  There
    +** are two versions of this function.  btreeParseCell() takes a 
    +** cell index as the second argument and btreeParseCellPtr() 
    +** takes a pointer to the body of the cell as its second argument.
    +**
    +** Within this file, the parseCell() macro can be called instead of
    +** btreeParseCellPtr(). Using some compilers, this will be faster.
    +*/
    +static void btreeParseCellPtr(
    +  MemPage *pPage,         /* Page containing the cell */
    +  u8 *pCell,              /* Pointer to the cell text. */
    +  CellInfo *pInfo         /* Fill in this structure */
    +){
    +  u16 n;                  /* Number bytes in cell content header */
    +  u32 nPayload;           /* Number of bytes of cell payload */
    +
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +
    +  pInfo->pCell = pCell;
    +  assert( pPage->leaf==0 || pPage->leaf==1 );
    +  n = pPage->childPtrSize;
    +  assert( n==4-4*pPage->leaf );
    +  if( pPage->intKey ){
    +    if( pPage->hasData ){
    +      n += getVarint32(&pCell[n], nPayload);
    +    }else{
    +      nPayload = 0;
    +    }
    +    n += getVarint(&pCell[n], (u64*)&pInfo->nKey);
    +    pInfo->nData = nPayload;
    +  }else{
    +    pInfo->nData = 0;
    +    n += getVarint32(&pCell[n], nPayload);
    +    pInfo->nKey = nPayload;
    +  }
    +  pInfo->nPayload = nPayload;
    +  pInfo->nHeader = n;
    +  testcase( nPayload==pPage->maxLocal );
    +  testcase( nPayload==pPage->maxLocal+1 );
    +  if( likely(nPayload<=pPage->maxLocal) ){
    +    /* This is the (easy) common case where the entire payload fits
    +    ** on the local page.  No overflow is required.
    +    */
    +    int nSize;          /* Total size of cell content in bytes */
    +    nSize = nPayload + n;
    +    pInfo->nLocal = (u16)nPayload;
    +    pInfo->iOverflow = 0;
    +    if( (nSize & ~3)==0 ){
    +      nSize = 4;        /* Minimum cell size is 4 */
    +    }
    +    pInfo->nSize = (u16)nSize;
    +  }else{
    +    /* If the payload will not fit completely on the local page, we have
    +    ** to decide how much to store locally and how much to spill onto
    +    ** overflow pages.  The strategy is to minimize the amount of unused
    +    ** space on overflow pages while keeping the amount of local storage
    +    ** in between minLocal and maxLocal.
    +    **
    +    ** Warning:  changing the way overflow payload is distributed in any
    +    ** way will result in an incompatible file format.
    +    */
    +    int minLocal;  /* Minimum amount of payload held locally */
    +    int maxLocal;  /* Maximum amount of payload held locally */
    +    int surplus;   /* Overflow payload available for local storage */
    +
    +    minLocal = pPage->minLocal;
    +    maxLocal = pPage->maxLocal;
    +    surplus = minLocal + (nPayload - minLocal)%(pPage->pBt->usableSize - 4);
    +    testcase( surplus==maxLocal );
    +    testcase( surplus==maxLocal+1 );
    +    if( surplus <= maxLocal ){
    +      pInfo->nLocal = (u16)surplus;
    +    }else{
    +      pInfo->nLocal = (u16)minLocal;
    +    }
    +    pInfo->iOverflow = (u16)(pInfo->nLocal + n);
    +    pInfo->nSize = pInfo->iOverflow + 4;
    +  }
    +}
    +#define parseCell(pPage, iCell, pInfo) \
    +  btreeParseCellPtr((pPage), findCell((pPage), (iCell)), (pInfo))
    +static void btreeParseCell(
    +  MemPage *pPage,         /* Page containing the cell */
    +  int iCell,              /* The cell index.  First cell is 0 */
    +  CellInfo *pInfo         /* Fill in this structure */
    +){
    +  parseCell(pPage, iCell, pInfo);
    +}
    +
    +/*
    +** Compute the total number of bytes that a Cell needs in the cell
    +** data area of the btree-page.  The return number includes the cell
    +** data header and the local payload, but not any overflow page or
    +** the space used by the cell pointer.
    +*/
    +static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
    +  u8 *pIter = &pCell[pPage->childPtrSize];
    +  u32 nSize;
    +
    +#ifdef SQLITE_DEBUG
    +  /* The value returned by this function should always be the same as
    +  ** the (CellInfo.nSize) value found by doing a full parse of the
    +  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
    +  ** this function verifies that this invariant is not violated. */
    +  CellInfo debuginfo;
    +  btreeParseCellPtr(pPage, pCell, &debuginfo);
    +#endif
    +
    +  if( pPage->intKey ){
    +    u8 *pEnd;
    +    if( pPage->hasData ){
    +      pIter += getVarint32(pIter, nSize);
    +    }else{
    +      nSize = 0;
    +    }
    +
    +    /* pIter now points at the 64-bit integer key value, a variable length 
    +    ** integer. The following block moves pIter to point at the first byte
    +    ** past the end of the key value. */
    +    pEnd = &pIter[9];
    +    while( (*pIter++)&0x80 && pIter<pEnd );
    +  }else{
    +    pIter += getVarint32(pIter, nSize);
    +  }
    +
    +  testcase( nSize==pPage->maxLocal );
    +  testcase( nSize==pPage->maxLocal+1 );
    +  if( nSize>pPage->maxLocal ){
    +    int minLocal = pPage->minLocal;
    +    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);
    +    testcase( nSize==pPage->maxLocal );
    +    testcase( nSize==pPage->maxLocal+1 );
    +    if( nSize>pPage->maxLocal ){
    +      nSize = minLocal;
    +    }
    +    nSize += 4;
    +  }
    +  nSize += (u32)(pIter - pCell);
    +
    +  /* The minimum size of any cell is 4 bytes. */
    +  if( nSize<4 ){
    +    nSize = 4;
    +  }
    +
    +  assert( nSize==debuginfo.nSize );
    +  return (u16)nSize;
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/* This variation on cellSizePtr() is used inside of assert() statements
    +** only. */
    +static u16 cellSize(MemPage *pPage, int iCell){
    +  return cellSizePtr(pPage, findCell(pPage, iCell));
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +/*
    +** If the cell pCell, part of page pPage contains a pointer
    +** to an overflow page, insert an entry into the pointer-map
    +** for the overflow page.
    +*/
    +static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
    +  CellInfo info;
    +  if( *pRC ) return;
    +  assert( pCell!=0 );
    +  btreeParseCellPtr(pPage, pCell, &info);
    +  assert( (info.nData+(pPage->intKey?0:info.nKey))==info.nPayload );
    +  if( info.iOverflow ){
    +    Pgno ovfl = get4byte(&pCell[info.iOverflow]);
    +    ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);
    +  }
    +}
    +#endif
    +
    +
    +/*
    +** Defragment the page given.  All Cells are moved to the
    +** end of the page and all free space is collected into one
    +** big FreeBlk that occurs in between the header and cell
    +** pointer array and the cell content area.
    +*/
    +static int defragmentPage(MemPage *pPage){
    +  int i;                     /* Loop counter */
    +  int pc;                    /* Address of a i-th cell */
    +  int hdr;                   /* Offset to the page header */
    +  int size;                  /* Size of a cell */
    +  int usableSize;            /* Number of usable bytes on a page */
    +  int cellOffset;            /* Offset to the cell pointer array */
    +  int cbrk;                  /* Offset to the cell content area */
    +  int nCell;                 /* Number of cells on the page */
    +  unsigned char *data;       /* The page data */
    +  unsigned char *temp;       /* Temp area for cell content */
    +  int iCellFirst;            /* First allowable cell index */
    +  int iCellLast;             /* Last possible cell index */
    +
    +
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  assert( pPage->pBt!=0 );
    +  assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );
    +  assert( pPage->nOverflow==0 );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  temp = sqlite3PagerTempSpace(pPage->pBt->pPager);
    +  data = pPage->aData;
    +  hdr = pPage->hdrOffset;
    +  cellOffset = pPage->cellOffset;
    +  nCell = pPage->nCell;
    +  assert( nCell==get2byte(&data[hdr+3]) );
    +  usableSize = pPage->pBt->usableSize;
    +  cbrk = get2byte(&data[hdr+5]);
    +  memcpy(&temp[cbrk], &data[cbrk], usableSize - cbrk);
    +  cbrk = usableSize;
    +  iCellFirst = cellOffset + 2*nCell;
    +  iCellLast = usableSize - 4;
    +  for(i=0; i<nCell; i++){
    +    u8 *pAddr;     /* The i-th cell pointer */
    +    pAddr = &data[cellOffset + i*2];
    +    pc = get2byte(pAddr);
    +    testcase( pc==iCellFirst );
    +    testcase( pc==iCellLast );
    +#if !defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
    +    /* These conditions have already been verified in btreeInitPage()
    +    ** if SQLITE_ENABLE_OVERSIZE_CELL_CHECK is defined 
    +    */
    +    if( pc<iCellFirst || pc>iCellLast ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +#endif
    +    assert( pc>=iCellFirst && pc<=iCellLast );
    +    size = cellSizePtr(pPage, &temp[pc]);
    +    cbrk -= size;
    +#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
    +    if( cbrk<iCellFirst ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +#else
    +    if( cbrk<iCellFirst || pc+size>usableSize ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +#endif
    +    assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
    +    testcase( cbrk+size==usableSize );
    +    testcase( pc+size==usableSize );
    +    memcpy(&data[cbrk], &temp[pc], size);
    +    put2byte(pAddr, cbrk);
    +  }
    +  assert( cbrk>=iCellFirst );
    +  put2byte(&data[hdr+5], cbrk);
    +  data[hdr+1] = 0;
    +  data[hdr+2] = 0;
    +  data[hdr+7] = 0;
    +  memset(&data[iCellFirst], 0, cbrk-iCellFirst);
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  if( cbrk-iCellFirst!=pPage->nFree ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Allocate nByte bytes of space from within the B-Tree page passed
    +** as the first argument. Write into *pIdx the index into pPage->aData[]
    +** of the first byte of allocated space. Return either SQLITE_OK or
    +** an error code (usually SQLITE_CORRUPT).
    +**
    +** The caller guarantees that there is sufficient space to make the
    +** allocation.  This routine might need to defragment in order to bring
    +** all the space together, however.  This routine will avoid using
    +** the first two bytes past the cell pointer area since presumably this
    +** allocation is being made in order to insert a new cell, so we will
    +** also end up needing a new cell pointer.
    +*/
    +static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
    +  const int hdr = pPage->hdrOffset;    /* Local cache of pPage->hdrOffset */
    +  u8 * const data = pPage->aData;      /* Local cache of pPage->aData */
    +  int nFrag;                           /* Number of fragmented bytes on pPage */
    +  int top;                             /* First byte of cell content area */
    +  int gap;        /* First byte of gap between cell pointers and cell content */
    +  int rc;         /* Integer return code */
    +  
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  assert( pPage->pBt );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( nByte>=0 );  /* Minimum cell size is 4 */
    +  assert( pPage->nFree>=nByte );
    +  assert( pPage->nOverflow==0 );
    +  assert( nByte<pPage->pBt->usableSize-8 );
    +
    +  nFrag = data[hdr+7];
    +  assert( pPage->cellOffset == hdr + 12 - 4*pPage->leaf );
    +  gap = pPage->cellOffset + 2*pPage->nCell;
    +  top = get2byte(&data[hdr+5]);
    +  if( gap>top ) return SQLITE_CORRUPT_BKPT;
    +  testcase( gap+2==top );
    +  testcase( gap+1==top );
    +  testcase( gap==top );
    +
    +  if( nFrag>=60 ){
    +    /* Always defragment highly fragmented pages */
    +    rc = defragmentPage(pPage);
    +    if( rc ) return rc;
    +    top = get2byte(&data[hdr+5]);
    +  }else if( gap+2<=top ){
    +    /* Search the freelist looking for a free slot big enough to satisfy 
    +    ** the request. The allocation is made from the first free slot in 
    +    ** the list that is large enough to accomadate it.
    +    */
    +    int pc, addr;
    +    for(addr=hdr+1; (pc = get2byte(&data[addr]))>0; addr=pc){
    +      int size = get2byte(&data[pc+2]);     /* Size of free slot */
    +      if( size>=nByte ){
    +        int x = size - nByte;
    +        testcase( x==4 );
    +        testcase( x==3 );
    +        if( x<4 ){
    +          /* Remove the slot from the free-list. Update the number of
    +          ** fragmented bytes within the page. */
    +          memcpy(&data[addr], &data[pc], 2);
    +          data[hdr+7] = (u8)(nFrag + x);
    +        }else{
    +          /* The slot remains on the free-list. Reduce its size to account
    +          ** for the portion used by the new allocation. */
    +          put2byte(&data[pc+2], x);
    +        }
    +        *pIdx = pc + x;
    +        return SQLITE_OK;
    +      }
    +    }
    +  }
    +
    +  /* Check to make sure there is enough space in the gap to satisfy
    +  ** the allocation.  If not, defragment.
    +  */
    +  testcase( gap+2+nByte==top );
    +  if( gap+2+nByte>top ){
    +    rc = defragmentPage(pPage);
    +    if( rc ) return rc;
    +    top = get2byte(&data[hdr+5]);
    +    assert( gap+nByte<=top );
    +  }
    +
    +
    +  /* Allocate memory from the gap in between the cell pointer array
    +  ** and the cell content area.  The btreeInitPage() call has already
    +  ** validated the freelist.  Given that the freelist is valid, there
    +  ** is no way that the allocation can extend off the end of the page.
    +  ** The assert() below verifies the previous sentence.
    +  */
    +  top -= nByte;
    +  put2byte(&data[hdr+5], top);
    +  assert( top+nByte <= pPage->pBt->usableSize );
    +  *pIdx = top;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Return a section of the pPage->aData to the freelist.
    +** The first byte of the new free block is pPage->aDisk[start]
    +** and the size of the block is "size" bytes.
    +**
    +** Most of the effort here is involved in coalesing adjacent
    +** free blocks into a single big free block.
    +*/
    +static int freeSpace(MemPage *pPage, int start, int size){
    +  int addr, pbegin, hdr;
    +  int iLast;                        /* Largest possible freeblock offset */
    +  unsigned char *data = pPage->aData;
    +
    +  assert( pPage->pBt!=0 );
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  assert( start>=pPage->hdrOffset+6+pPage->childPtrSize );
    +  assert( (start + size)<=pPage->pBt->usableSize );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( size>=0 );   /* Minimum cell size is 4 */
    +
    +#ifdef SQLITE_SECURE_DELETE
    +  /* Overwrite deleted information with zeros when the SECURE_DELETE 
    +  ** option is enabled at compile-time */
    +  memset(&data[start], 0, size);
    +#endif
    +
    +  /* Add the space back into the linked list of freeblocks.  Note that
    +  ** even though the freeblock list was checked by btreeInitPage(),
    +  ** btreeInitPage() did not detect overlapping cells or
    +  ** freeblocks that overlapped cells.   Nor does it detect when the
    +  ** cell content area exceeds the value in the page header.  If these
    +  ** situations arise, then subsequent insert operations might corrupt
    +  ** the freelist.  So we do need to check for corruption while scanning
    +  ** the freelist.
    +  */
    +  hdr = pPage->hdrOffset;
    +  addr = hdr + 1;
    +  iLast = pPage->pBt->usableSize - 4;
    +  assert( start<=iLast );
    +  while( (pbegin = get2byte(&data[addr]))<start && pbegin>0 ){
    +    if( pbegin<addr+4 ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    addr = pbegin;
    +  }
    +  if( pbegin>iLast ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  assert( pbegin>addr || pbegin==0 );
    +  put2byte(&data[addr], start);
    +  put2byte(&data[start], pbegin);
    +  put2byte(&data[start+2], size);
    +  pPage->nFree = pPage->nFree + (u16)size;
    +
    +  /* Coalesce adjacent free blocks */
    +  addr = hdr + 1;
    +  while( (pbegin = get2byte(&data[addr]))>0 ){
    +    int pnext, psize, x;
    +    assert( pbegin>addr );
    +    assert( pbegin<=pPage->pBt->usableSize-4 );
    +    pnext = get2byte(&data[pbegin]);
    +    psize = get2byte(&data[pbegin+2]);
    +    if( pbegin + psize + 3 >= pnext && pnext>0 ){
    +      int frag = pnext - (pbegin+psize);
    +      if( (frag<0) || (frag>(int)data[hdr+7]) ){
    +        return SQLITE_CORRUPT_BKPT;
    +      }
    +      data[hdr+7] -= (u8)frag;
    +      x = get2byte(&data[pnext]);
    +      put2byte(&data[pbegin], x);
    +      x = pnext + get2byte(&data[pnext+2]) - pbegin;
    +      put2byte(&data[pbegin+2], x);
    +    }else{
    +      addr = pbegin;
    +    }
    +  }
    +
    +  /* If the cell content area begins with a freeblock, remove it. */
    +  if( data[hdr+1]==data[hdr+5] && data[hdr+2]==data[hdr+6] ){
    +    int top;
    +    pbegin = get2byte(&data[hdr+1]);
    +    memcpy(&data[hdr+1], &data[pbegin], 2);
    +    top = get2byte(&data[hdr+5]) + get2byte(&data[pbegin+2]);
    +    put2byte(&data[hdr+5], top);
    +  }
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Decode the flags byte (the first byte of the header) for a page
    +** and initialize fields of the MemPage structure accordingly.
    +**
    +** Only the following combinations are supported.  Anything different
    +** indicates a corrupt database files:
    +**
    +**         PTF_ZERODATA
    +**         PTF_ZERODATA | PTF_LEAF
    +**         PTF_LEAFDATA | PTF_INTKEY
    +**         PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
    +*/
    +static int decodeFlags(MemPage *pPage, int flagByte){
    +  BtShared *pBt;     /* A copy of pPage->pBt */
    +
    +  assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  pPage->leaf = (u8)(flagByte>>3);  assert( PTF_LEAF == 1<<3 );
    +  flagByte &= ~PTF_LEAF;
    +  pPage->childPtrSize = 4-4*pPage->leaf;
    +  pBt = pPage->pBt;
    +  if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
    +    pPage->intKey = 1;
    +    pPage->hasData = pPage->leaf;
    +    pPage->maxLocal = pBt->maxLeaf;
    +    pPage->minLocal = pBt->minLeaf;
    +  }else if( flagByte==PTF_ZERODATA ){
    +    pPage->intKey = 0;
    +    pPage->hasData = 0;
    +    pPage->maxLocal = pBt->maxLocal;
    +    pPage->minLocal = pBt->minLocal;
    +  }else{
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Initialize the auxiliary information for a disk block.
    +**
    +** Return SQLITE_OK on success.  If we see that the page does
    +** not contain a well-formed database page, then return 
    +** SQLITE_CORRUPT.  Note that a return of SQLITE_OK does not
    +** guarantee that the page is well-formed.  It only shows that
    +** we failed to detect any corruption.
    +*/
    +static int btreeInitPage(MemPage *pPage){
    +
    +  assert( pPage->pBt!=0 );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
    +  assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
    +  assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
    +
    +  if( !pPage->isInit ){
    +    u16 pc;            /* Address of a freeblock within pPage->aData[] */
    +    u8 hdr;            /* Offset to beginning of page header */
    +    u8 *data;          /* Equal to pPage->aData */
    +    BtShared *pBt;        /* The main btree structure */
    +    u16 usableSize;    /* Amount of usable space on each page */
    +    u16 cellOffset;    /* Offset from start of page to first cell pointer */
    +    u16 nFree;         /* Number of unused bytes on the page */
    +    u16 top;           /* First byte of the cell content area */
    +    int iCellFirst;    /* First allowable cell or freeblock offset */
    +    int iCellLast;     /* Last possible cell or freeblock offset */
    +
    +    pBt = pPage->pBt;
    +
    +    hdr = pPage->hdrOffset;
    +    data = pPage->aData;
    +    if( decodeFlags(pPage, data[hdr]) ) return SQLITE_CORRUPT_BKPT;
    +    assert( pBt->pageSize>=512 && pBt->pageSize<=32768 );
    +    pPage->maskPage = pBt->pageSize - 1;
    +    pPage->nOverflow = 0;
    +    usableSize = pBt->usableSize;
    +    pPage->cellOffset = cellOffset = hdr + 12 - 4*pPage->leaf;
    +    top = get2byte(&data[hdr+5]);
    +    pPage->nCell = get2byte(&data[hdr+3]);
    +    if( pPage->nCell>MX_CELL(pBt) ){
    +      /* To many cells for a single page.  The page must be corrupt */
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    testcase( pPage->nCell==MX_CELL(pBt) );
    +
    +    /* A malformed database page might cause us to read past the end
    +    ** of page when parsing a cell.  
    +    **
    +    ** The following block of code checks early to see if a cell extends
    +    ** past the end of a page boundary and causes SQLITE_CORRUPT to be 
    +    ** returned if it does.
    +    */
    +    iCellFirst = cellOffset + 2*pPage->nCell;
    +    iCellLast = usableSize - 4;
    +#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
    +    {
    +      int i;            /* Index into the cell pointer array */
    +      int sz;           /* Size of a cell */
    +
    +      if( !pPage->leaf ) iCellLast--;
    +      for(i=0; i<pPage->nCell; i++){
    +        pc = get2byte(&data[cellOffset+i*2]);
    +        testcase( pc==iCellFirst );
    +        testcase( pc==iCellLast );
    +        if( pc<iCellFirst || pc>iCellLast ){
    +          return SQLITE_CORRUPT_BKPT;
    +        }
    +        sz = cellSizePtr(pPage, &data[pc]);
    +        testcase( pc+sz==usableSize );
    +        if( pc+sz>usableSize ){
    +          return SQLITE_CORRUPT_BKPT;
    +        }
    +      }
    +      if( !pPage->leaf ) iCellLast++;
    +    }  
    +#endif
    +
    +    /* Compute the total free space on the page */
    +    pc = get2byte(&data[hdr+1]);
    +    nFree = data[hdr+7] + top;
    +    while( pc>0 ){
    +      u16 next, size;
    +      if( pc<iCellFirst || pc>iCellLast ){
    +        /* Start of free block is off the page */
    +        return SQLITE_CORRUPT_BKPT; 
    +      }
    +      next = get2byte(&data[pc]);
    +      size = get2byte(&data[pc+2]);
    +      if( (next>0 && next<=pc+size+3) || pc+size>usableSize ){
    +        /* Free blocks must be in ascending order. And the last byte of
    +	** the free-block must lie on the database page.  */
    +        return SQLITE_CORRUPT_BKPT; 
    +      }
    +      nFree = nFree + size;
    +      pc = next;
    +    }
    +
    +    /* At this point, nFree contains the sum of the offset to the start
    +    ** of the cell-content area plus the number of free bytes within
    +    ** the cell-content area. If this is greater than the usable-size
    +    ** of the page, then the page must be corrupted. This check also
    +    ** serves to verify that the offset to the start of the cell-content
    +    ** area, according to the page header, lies within the page.
    +    */
    +    if( nFree>usableSize ){
    +      return SQLITE_CORRUPT_BKPT; 
    +    }
    +    pPage->nFree = (u16)(nFree - iCellFirst);
    +    pPage->isInit = 1;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Set up a raw page so that it looks like a database page holding
    +** no entries.
    +*/
    +static void zeroPage(MemPage *pPage, int flags){
    +  unsigned char *data = pPage->aData;
    +  BtShared *pBt = pPage->pBt;
    +  u8 hdr = pPage->hdrOffset;
    +  u16 first;
    +
    +  assert( sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno );
    +  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
    +  assert( sqlite3PagerGetData(pPage->pDbPage) == data );
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  /*memset(&data[hdr], 0, pBt->usableSize - hdr);*/
    +  data[hdr] = (char)flags;
    +  first = hdr + 8 + 4*((flags&PTF_LEAF)==0 ?1:0);
    +  memset(&data[hdr+1], 0, 4);
    +  data[hdr+7] = 0;
    +  put2byte(&data[hdr+5], pBt->usableSize);
    +  pPage->nFree = pBt->usableSize - first;
    +  decodeFlags(pPage, flags);
    +  pPage->hdrOffset = hdr;
    +  pPage->cellOffset = first;
    +  pPage->nOverflow = 0;
    +  assert( pBt->pageSize>=512 && pBt->pageSize<=32768 );
    +  pPage->maskPage = pBt->pageSize - 1;
    +  pPage->nCell = 0;
    +  pPage->isInit = 1;
    +}
    +
    +
    +/*
    +** Convert a DbPage obtained from the pager into a MemPage used by
    +** the btree layer.
    +*/
    +static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
    +  MemPage *pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);
    +  pPage->aData = sqlite3PagerGetData(pDbPage);
    +  pPage->pDbPage = pDbPage;
    +  pPage->pBt = pBt;
    +  pPage->pgno = pgno;
    +  pPage->hdrOffset = pPage->pgno==1 ? 100 : 0;
    +  return pPage; 
    +}
    +
    +/*
    +** Get a page from the pager.  Initialize the MemPage.pBt and
    +** MemPage.aData elements if needed.
    +**
    +** If the noContent flag is set, it means that we do not care about
    +** the content of the page at this time.  So do not go to the disk
    +** to fetch the content.  Just fill in the content with zeros for now.
    +** If in the future we call sqlite3PagerWrite() on this page, that
    +** means we have started to be concerned about content and the disk
    +** read should occur at that point.
    +*/
    +static int btreeGetPage(
    +  BtShared *pBt,       /* The btree */
    +  Pgno pgno,           /* Number of the page to fetch */
    +  MemPage **ppPage,    /* Return the page in this parameter */
    +  int noContent        /* Do not load page content if true */
    +){
    +  int rc;
    +  DbPage *pDbPage;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, noContent);
    +  if( rc ) return rc;
    +  *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Retrieve a page from the pager cache. If the requested page is not
    +** already in the pager cache return NULL. Initialize the MemPage.pBt and
    +** MemPage.aData elements if needed.
    +*/
    +static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
    +  DbPage *pDbPage;
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  pDbPage = sqlite3PagerLookup(pBt->pPager, pgno);
    +  if( pDbPage ){
    +    return btreePageFromDbPage(pDbPage, pgno, pBt);
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Return the size of the database file in pages. If there is any kind of
    +** error, return ((unsigned int)-1).
    +*/
    +static Pgno pagerPagecount(BtShared *pBt){
    +  int nPage = -1;
    +  int rc;
    +  assert( pBt->pPage1 );
    +  rc = sqlite3PagerPagecount(pBt->pPager, &nPage);
    +  assert( rc==SQLITE_OK || nPage==-1 );
    +  return (Pgno)nPage;
    +}
    +
    +/*
    +** Get a page from the pager and initialize it.  This routine is just a
    +** convenience wrapper around separate calls to btreeGetPage() and 
    +** btreeInitPage().
    +**
    +** If an error occurs, then the value *ppPage is set to is undefined. It
    +** may remain unchanged, or it may be set to an invalid value.
    +*/
    +static int getAndInitPage(
    +  BtShared *pBt,          /* The database file */
    +  Pgno pgno,           /* Number of the page to get */
    +  MemPage **ppPage     /* Write the page pointer here */
    +){
    +  int rc;
    +  TESTONLY( Pgno iLastPg = pagerPagecount(pBt); )
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +
    +  rc = btreeGetPage(pBt, pgno, ppPage, 0);
    +  if( rc==SQLITE_OK ){
    +    rc = btreeInitPage(*ppPage);
    +    if( rc!=SQLITE_OK ){
    +      releasePage(*ppPage);
    +    }
    +  }
    +
    +  /* If the requested page number was either 0 or greater than the page
    +  ** number of the last page in the database, this function should return
    +  ** SQLITE_CORRUPT or some other error (i.e. SQLITE_FULL). Check that this
    +  ** is the case.  */
    +  assert( (pgno>0 && pgno<=iLastPg) || rc!=SQLITE_OK );
    +  testcase( pgno==0 );
    +  testcase( pgno==iLastPg );
    +
    +  return rc;
    +}
    +
    +/*
    +** Release a MemPage.  This should be called once for each prior
    +** call to btreeGetPage.
    +*/
    +static void releasePage(MemPage *pPage){
    +  if( pPage ){
    +    assert( pPage->nOverflow==0 || sqlite3PagerPageRefcount(pPage->pDbPage)>1 );
    +    assert( pPage->aData );
    +    assert( pPage->pBt );
    +    assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
    +    assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
    +    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +    sqlite3PagerUnref(pPage->pDbPage);
    +  }
    +}
    +
    +/*
    +** During a rollback, when the pager reloads information into the cache
    +** so that the cache is restored to its original state at the start of
    +** the transaction, for each page restored this routine is called.
    +**
    +** This routine needs to reset the extra data section at the end of the
    +** page to agree with the restored data.
    +*/
    +static void pageReinit(DbPage *pData){
    +  MemPage *pPage;
    +  pPage = (MemPage *)sqlite3PagerGetExtra(pData);
    +  assert( sqlite3PagerPageRefcount(pData)>0 );
    +  if( pPage->isInit ){
    +    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +    pPage->isInit = 0;
    +    if( sqlite3PagerPageRefcount(pData)>1 ){
    +      /* pPage might not be a btree page;  it might be an overflow page
    +      ** or ptrmap page or a free page.  In those cases, the following
    +      ** call to btreeInitPage() will likely return SQLITE_CORRUPT.
    +      ** But no harm is done by this.  And it is very important that
    +      ** btreeInitPage() be called on every btree page so we make
    +      ** the call for every page that comes in for re-initing. */
    +      btreeInitPage(pPage);
    +    }
    +  }
    +}
    +
    +/*
    +** Invoke the busy handler for a btree.
    +*/
    +static int btreeInvokeBusyHandler(void *pArg){
    +  BtShared *pBt = (BtShared*)pArg;
    +  assert( pBt->db );
    +  assert( sqlite3_mutex_held(pBt->db->mutex) );
    +  return sqlite3InvokeBusyHandler(&pBt->db->busyHandler);
    +}
    +
    +/*
    +** Open a database file.
    +** 
    +** zFilename is the name of the database file.  If zFilename is NULL
    +** a new database with a random name is created.  This randomly named
    +** database file will be deleted when sqlite3BtreeClose() is called.
    +** If zFilename is ":memory:" then an in-memory database is created
    +** that is automatically destroyed when it is closed.
    +**
    +** If the database is already opened in the same database connection
    +** and we are in shared cache mode, then the open will fail with an
    +** SQLITE_CONSTRAINT error.  We cannot allow two or more BtShared
    +** objects in the same database connection since doing so will lead
    +** to problems with locking.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeOpen(
    +  const char *zFilename,  /* Name of the file containing the BTree database */
    +  sqlite3 *db,            /* Associated database handle */
    +  Btree **ppBtree,        /* Pointer to new Btree object written here */
    +  int flags,              /* Options */
    +  int vfsFlags            /* Flags passed through to sqlite3_vfs.xOpen() */
    +){
    +  sqlite3_vfs *pVfs;             /* The VFS to use for this btree */
    +  BtShared *pBt = 0;             /* Shared part of btree structure */
    +  Btree *p;                      /* Handle to return */
    +  sqlite3_mutex *mutexOpen = 0;  /* Prevents a race condition. Ticket #3537 */
    +  int rc = SQLITE_OK;            /* Result code from this function */
    +  u8 nReserve;                   /* Byte of unused space on each page */
    +  unsigned char zDbHeader[100];  /* Database header content */
    +
    +  /* Set the variable isMemdb to true for an in-memory database, or 
    +  ** false for a file-based database. This symbol is only required if
    +  ** either of the shared-data or autovacuum features are compiled 
    +  ** into the library.
    +  */
    +#if !defined(SQLITE_OMIT_SHARED_CACHE) || !defined(SQLITE_OMIT_AUTOVACUUM)
    +  #ifdef SQLITE_OMIT_MEMORYDB
    +    const int isMemdb = 0;
    +  #else
    +    const int isMemdb = zFilename && !strcmp(zFilename, ":memory:");
    +  #endif
    +#endif
    +
    +  assert( db!=0 );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +
    +  pVfs = db->pVfs;
    +  p = sqlite3MallocZero(sizeof(Btree));
    +  if( !p ){
    +    return SQLITE_NOMEM;
    +  }
    +  p->inTrans = TRANS_NONE;
    +  p->db = db;
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  p->lock.pBtree = p;
    +  p->lock.iTable = 1;
    +#endif
    +
    +#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
    +  /*
    +  ** If this Btree is a candidate for shared cache, try to find an
    +  ** existing BtShared object that we can share with
    +  */
    +  if( isMemdb==0 && zFilename && zFilename[0] ){
    +    if( vfsFlags & SQLITE_OPEN_SHAREDCACHE ){
    +      int nFullPathname = pVfs->mxPathname+1;
    +      char *zFullPathname = sqlite3Malloc(nFullPathname);
    +      sqlite3_mutex *mutexShared;
    +      p->sharable = 1;
    +      if( !zFullPathname ){
    +        sqlite3_free(p);
    +        return SQLITE_NOMEM;
    +      }
    +      sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);
    +      mutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);
    +      sqlite3_mutex_enter(mutexOpen);
    +      mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +      sqlite3_mutex_enter(mutexShared);
    +      for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
    +        assert( pBt->nRef>0 );
    +        if( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt->pPager))
    +                 && sqlite3PagerVfs(pBt->pPager)==pVfs ){
    +          int iDb;
    +          for(iDb=db->nDb-1; iDb>=0; iDb--){
    +            Btree *pExisting = db->aDb[iDb].pBt;
    +            if( pExisting && pExisting->pBt==pBt ){
    +              sqlite3_mutex_leave(mutexShared);
    +              sqlite3_mutex_leave(mutexOpen);
    +              sqlite3_free(zFullPathname);
    +              sqlite3_free(p);
    +              return SQLITE_CONSTRAINT;
    +            }
    +          }
    +          p->pBt = pBt;
    +          pBt->nRef++;
    +          break;
    +        }
    +      }
    +      sqlite3_mutex_leave(mutexShared);
    +      sqlite3_free(zFullPathname);
    +    }
    +#ifdef SQLITE_DEBUG
    +    else{
    +      /* In debug mode, we mark all persistent databases as sharable
    +      ** even when they are not.  This exercises the locking code and
    +      ** gives more opportunity for asserts(sqlite3_mutex_held())
    +      ** statements to find locking problems.
    +      */
    +      p->sharable = 1;
    +    }
    +#endif
    +  }
    +#endif
    +  if( pBt==0 ){
    +    /*
    +    ** The following asserts make sure that structures used by the btree are
    +    ** the right size.  This is to guard against size changes that result
    +    ** when compiling on a different architecture.
    +    */
    +    assert( sizeof(i64)==8 || sizeof(i64)==4 );
    +    assert( sizeof(u64)==8 || sizeof(u64)==4 );
    +    assert( sizeof(u32)==4 );
    +    assert( sizeof(u16)==2 );
    +    assert( sizeof(Pgno)==4 );
    +  
    +    pBt = sqlite3MallocZero( sizeof(*pBt) );
    +    if( pBt==0 ){
    +      rc = SQLITE_NOMEM;
    +      goto btree_open_out;
    +    }
    +    rc = sqlite3PagerOpen(pVfs, &pBt->pPager, zFilename,
    +                          EXTRA_SIZE, flags, vfsFlags, pageReinit);
    +    if( rc==SQLITE_OK ){
    +      rc = sqlite3PagerReadFileheader(pBt->pPager,sizeof(zDbHeader),zDbHeader);
    +    }
    +    if( rc!=SQLITE_OK ){
    +      goto btree_open_out;
    +    }
    +    pBt->db = db;
    +    sqlite3PagerSetBusyhandler(pBt->pPager, btreeInvokeBusyHandler, pBt);
    +    p->pBt = pBt;
    +  
    +    pBt->pCursor = 0;
    +    pBt->pPage1 = 0;
    +    pBt->readOnly = sqlite3PagerIsreadonly(pBt->pPager);
    +    pBt->pageSize = get2byte(&zDbHeader[16]);
    +    if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE
    +         || ((pBt->pageSize-1)&pBt->pageSize)!=0 ){
    +      pBt->pageSize = 0;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      /* If the magic name ":memory:" will create an in-memory database, then
    +      ** leave the autoVacuum mode at 0 (do not auto-vacuum), even if
    +      ** SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if
    +      ** SQLITE_OMIT_MEMORYDB has been defined, then ":memory:" is just a
    +      ** regular file-name. In this case the auto-vacuum applies as per normal.
    +      */
    +      if( zFilename && !isMemdb ){
    +        pBt->autoVacuum = (SQLITE_DEFAULT_AUTOVACUUM ? 1 : 0);
    +        pBt->incrVacuum = (SQLITE_DEFAULT_AUTOVACUUM==2 ? 1 : 0);
    +      }
    +#endif
    +      nReserve = 0;
    +    }else{
    +      nReserve = zDbHeader[20];
    +      pBt->pageSizeFixed = 1;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      pBt->autoVacuum = (get4byte(&zDbHeader[36 + 4*4])?1:0);
    +      pBt->incrVacuum = (get4byte(&zDbHeader[36 + 7*4])?1:0);
    +#endif
    +    }
    +    rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
    +    if( rc ) goto btree_open_out;
    +    pBt->usableSize = pBt->pageSize - nReserve;
    +    assert( (pBt->pageSize & 7)==0 );  /* 8-byte alignment of pageSize */
    +   
    +#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
    +    /* Add the new BtShared object to the linked list sharable BtShareds.
    +    */
    +    if( p->sharable ){
    +      sqlite3_mutex *mutexShared;
    +      pBt->nRef = 1;
    +      mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +      if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){
    +        pBt->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST);
    +        if( pBt->mutex==0 ){
    +          rc = SQLITE_NOMEM;
    +          db->mallocFailed = 0;
    +          goto btree_open_out;
    +        }
    +      }
    +      sqlite3_mutex_enter(mutexShared);
    +      pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
    +      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
    +      sqlite3_mutex_leave(mutexShared);
    +    }
    +#endif
    +  }
    +
    +#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
    +  /* If the new Btree uses a sharable pBtShared, then link the new
    +  ** Btree into the list of all sharable Btrees for the same connection.
    +  ** The list is kept in ascending order by pBt address.
    +  */
    +  if( p->sharable ){
    +    int i;
    +    Btree *pSib;
    +    for(i=0; i<db->nDb; i++){
    +      if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){
    +        while( pSib->pPrev ){ pSib = pSib->pPrev; }
    +        if( p->pBt<pSib->pBt ){
    +          p->pNext = pSib;
    +          p->pPrev = 0;
    +          pSib->pPrev = p;
    +        }else{
    +          while( pSib->pNext && pSib->pNext->pBt<p->pBt ){
    +            pSib = pSib->pNext;
    +          }
    +          p->pNext = pSib->pNext;
    +          p->pPrev = pSib;
    +          if( p->pNext ){
    +            p->pNext->pPrev = p;
    +          }
    +          pSib->pNext = p;
    +        }
    +        break;
    +      }
    +    }
    +  }
    +#endif
    +  *ppBtree = p;
    +
    +btree_open_out:
    +  if( rc!=SQLITE_OK ){
    +    if( pBt && pBt->pPager ){
    +      sqlite3PagerClose(pBt->pPager);
    +    }
    +    sqlite3_free(pBt);
    +    sqlite3_free(p);
    +    *ppBtree = 0;
    +  }
    +  if( mutexOpen ){
    +    assert( sqlite3_mutex_held(mutexOpen) );
    +    sqlite3_mutex_leave(mutexOpen);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Decrement the BtShared.nRef counter.  When it reaches zero,
    +** remove the BtShared structure from the sharing list.  Return
    +** true if the BtShared.nRef counter reaches zero and return
    +** false if it is still positive.
    +*/
    +static int removeFromSharingList(BtShared *pBt){
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  sqlite3_mutex *pMaster;
    +  BtShared *pList;
    +  int removed = 0;
    +
    +  assert( sqlite3_mutex_notheld(pBt->mutex) );
    +  pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +  sqlite3_mutex_enter(pMaster);
    +  pBt->nRef--;
    +  if( pBt->nRef<=0 ){
    +    if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
    +      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
    +    }else{
    +      pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
    +      while( ALWAYS(pList) && pList->pNext!=pBt ){
    +        pList=pList->pNext;
    +      }
    +      if( ALWAYS(pList) ){
    +        pList->pNext = pBt->pNext;
    +      }
    +    }
    +    if( SQLITE_THREADSAFE ){
    +      sqlite3_mutex_free(pBt->mutex);
    +    }
    +    removed = 1;
    +  }
    +  sqlite3_mutex_leave(pMaster);
    +  return removed;
    +#else
    +  return 1;
    +#endif
    +}
    +
    +/*
    +** Make sure pBt->pTmpSpace points to an allocation of 
    +** MX_CELL_SIZE(pBt) bytes.
    +*/
    +static void allocateTempSpace(BtShared *pBt){
    +  if( !pBt->pTmpSpace ){
    +    pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize );
    +  }
    +}
    +
    +/*
    +** Free the pBt->pTmpSpace allocation
    +*/
    +static void freeTempSpace(BtShared *pBt){
    +  sqlite3PageFree( pBt->pTmpSpace);
    +  pBt->pTmpSpace = 0;
    +}
    +
    +/*
    +** Close an open database and invalidate all cursors.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
    +  BtShared *pBt = p->pBt;
    +  BtCursor *pCur;
    +
    +  /* Close all cursors opened via this handle.  */
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  sqlite3BtreeEnter(p);
    +  pCur = pBt->pCursor;
    +  while( pCur ){
    +    BtCursor *pTmp = pCur;
    +    pCur = pCur->pNext;
    +    if( pTmp->pBtree==p ){
    +      sqlite3BtreeCloseCursor(pTmp);
    +    }
    +  }
    +
    +  /* Rollback any active transaction and free the handle structure.
    +  ** The call to sqlite3BtreeRollback() drops any table-locks held by
    +  ** this handle.
    +  */
    +  sqlite3BtreeRollback(p);
    +  sqlite3BtreeLeave(p);
    +
    +  /* If there are still other outstanding references to the shared-btree
    +  ** structure, return now. The remainder of this procedure cleans 
    +  ** up the shared-btree.
    +  */
    +  assert( p->wantToLock==0 && p->locked==0 );
    +  if( !p->sharable || removeFromSharingList(pBt) ){
    +    /* The pBt is no longer on the sharing list, so we can access
    +    ** it without having to hold the mutex.
    +    **
    +    ** Clean out and delete the BtShared object.
    +    */
    +    assert( !pBt->pCursor );
    +    sqlite3PagerClose(pBt->pPager);
    +    if( pBt->xFreeSchema && pBt->pSchema ){
    +      pBt->xFreeSchema(pBt->pSchema);
    +    }
    +    sqlite3_free(pBt->pSchema);
    +    freeTempSpace(pBt);
    +    sqlite3_free(pBt);
    +  }
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  assert( p->wantToLock==0 );
    +  assert( p->locked==0 );
    +  if( p->pPrev ) p->pPrev->pNext = p->pNext;
    +  if( p->pNext ) p->pNext->pPrev = p->pPrev;
    +#endif
    +
    +  sqlite3_free(p);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Change the limit on the number of pages allowed in the cache.
    +**
    +** The maximum number of cache pages is set to the absolute
    +** value of mxPage.  If mxPage is negative, the pager will
    +** operate asynchronously - it will not stop to do fsync()s
    +** to insure data is written to the disk surface before
    +** continuing.  Transactions still work if synchronous is off,
    +** and the database cannot be corrupted if this program
    +** crashes.  But if the operating system crashes or there is
    +** an abrupt power failure when synchronous is off, the database
    +** could be left in an inconsistent and unrecoverable state.
    +** Synchronous is on by default so database corruption is not
    +** normally a worry.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
    +  BtShared *pBt = p->pBt;
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  sqlite3BtreeEnter(p);
    +  sqlite3PagerSetCachesize(pBt->pPager, mxPage);
    +  sqlite3BtreeLeave(p);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Change the way data is synced to disk in order to increase or decrease
    +** how well the database resists damage due to OS crashes and power
    +** failures.  Level 1 is the same as asynchronous (no syncs() occur and
    +** there is a high probability of damage)  Level 2 is the default.  There
    +** is a very low but non-zero probability of damage.  Level 3 reduces the
    +** probability of damage to near zero but with a write performance reduction.
    +*/
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree *p, int level, int fullSync){
    +  BtShared *pBt = p->pBt;
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  sqlite3BtreeEnter(p);
    +  sqlite3PagerSetSafetyLevel(pBt->pPager, level, fullSync);
    +  sqlite3BtreeLeave(p);
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +/*
    +** Return TRUE if the given btree is set to safety level 1.  In other
    +** words, return TRUE if no sync() occurs on the disk files.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree *p){
    +  BtShared *pBt = p->pBt;
    +  int rc;
    +  assert( sqlite3_mutex_held(p->db->mutex) );  
    +  sqlite3BtreeEnter(p);
    +  assert( pBt && pBt->pPager );
    +  rc = sqlite3PagerNosync(pBt->pPager);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
    +/*
    +** Change the default pages size and the number of reserved bytes per page.
    +** Or, if the page size has already been fixed, return SQLITE_READONLY 
    +** without changing anything.
    +**
    +** The page size must be a power of 2 between 512 and 65536.  If the page
    +** size supplied does not meet this constraint then the page size is not
    +** changed.
    +**
    +** Page sizes are constrained to be a power of two so that the region
    +** of the database file used for locking (beginning at PENDING_BYTE,
    +** the first byte past the 1GB boundary, 0x40000000) needs to occur
    +** at the beginning of a page.
    +**
    +** If parameter nReserve is less than zero, then the number of reserved
    +** bytes per page is left unchanged.
    +**
    +** If the iFix!=0 then the pageSizeFixed flag is set so that the page size
    +** and autovacuum mode can no longer be changed.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
    +  int rc = SQLITE_OK;
    +  BtShared *pBt = p->pBt;
    +  assert( nReserve>=-1 && nReserve<=255 );
    +  sqlite3BtreeEnter(p);
    +  if( pBt->pageSizeFixed ){
    +    sqlite3BtreeLeave(p);
    +    return SQLITE_READONLY;
    +  }
    +  if( nReserve<0 ){
    +    nReserve = pBt->pageSize - pBt->usableSize;
    +  }
    +  assert( nReserve>=0 && nReserve<=255 );
    +  if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE &&
    +        ((pageSize-1)&pageSize)==0 ){
    +    assert( (pageSize & 7)==0 );
    +    assert( !pBt->pPage1 && !pBt->pCursor );
    +    pBt->pageSize = (u16)pageSize;
    +    freeTempSpace(pBt);
    +  }
    +  rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
    +  pBt->usableSize = pBt->pageSize - (u16)nReserve;
    +  if( iFix ) pBt->pageSizeFixed = 1;
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** Return the currently defined page size
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree *p){
    +  return p->pBt->pageSize;
    +}
    +
    +/*
    +** Return the number of bytes of space at the end of every page that
    +** are intentually left unused.  This is the "reserved" space that is
    +** sometimes used by extensions.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree *p){
    +  int n;
    +  sqlite3BtreeEnter(p);
    +  n = p->pBt->pageSize - p->pBt->usableSize;
    +  sqlite3BtreeLeave(p);
    +  return n;
    +}
    +
    +/*
    +** Set the maximum page count for a database if mxPage is positive.
    +** No changes are made if mxPage is 0 or negative.
    +** Regardless of the value of mxPage, return the maximum page count.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
    +  int n;
    +  sqlite3BtreeEnter(p);
    +  n = sqlite3PagerMaxPageCount(p->pBt->pPager, mxPage);
    +  sqlite3BtreeLeave(p);
    +  return n;
    +}
    +#endif /* !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM) */
    +
    +/*
    +** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
    +** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
    +** is disabled. The default value for the auto-vacuum property is 
    +** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +  return SQLITE_READONLY;
    +#else
    +  BtShared *pBt = p->pBt;
    +  int rc = SQLITE_OK;
    +  u8 av = (u8)autoVacuum;
    +
    +  sqlite3BtreeEnter(p);
    +  if( pBt->pageSizeFixed && (av ?1:0)!=pBt->autoVacuum ){
    +    rc = SQLITE_READONLY;
    +  }else{
    +    pBt->autoVacuum = av ?1:0;
    +    pBt->incrVacuum = av==2 ?1:0;
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +#endif
    +}
    +
    +/*
    +** Return the value of the 'auto-vacuum' property. If auto-vacuum is 
    +** enabled 1 is returned. Otherwise 0.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +  return BTREE_AUTOVACUUM_NONE;
    +#else
    +  int rc;
    +  sqlite3BtreeEnter(p);
    +  rc = (
    +    (!p->pBt->autoVacuum)?BTREE_AUTOVACUUM_NONE:
    +    (!p->pBt->incrVacuum)?BTREE_AUTOVACUUM_FULL:
    +    BTREE_AUTOVACUUM_INCR
    +  );
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +#endif
    +}
    +
    +
    +/*
    +** Get a reference to pPage1 of the database file.  This will
    +** also acquire a readlock on that file.
    +**
    +** SQLITE_OK is returned on success.  If the file is not a
    +** well-formed database file, then SQLITE_CORRUPT is returned.
    +** SQLITE_BUSY is returned if the database is locked.  SQLITE_NOMEM
    +** is returned if we run out of memory. 
    +*/
    +static int lockBtree(BtShared *pBt){
    +  int rc;
    +  MemPage *pPage1;
    +  int nPage;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( pBt->pPage1==0 );
    +  rc = sqlite3PagerSharedLock(pBt->pPager);
    +  if( rc!=SQLITE_OK ) return rc;
    +  rc = btreeGetPage(pBt, 1, &pPage1, 0);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Do some checking to help insure the file we opened really is
    +  ** a valid database file. 
    +  */
    +  rc = sqlite3PagerPagecount(pBt->pPager, &nPage);
    +  if( rc!=SQLITE_OK ){
    +    goto page1_init_failed;
    +  }else if( nPage>0 ){
    +    int pageSize;
    +    int usableSize;
    +    u8 *page1 = pPage1->aData;
    +    rc = SQLITE_NOTADB;
    +    if( memcmp(page1, zMagicHeader, 16)!=0 ){
    +      goto page1_init_failed;
    +    }
    +    if( page1[18]>1 ){
    +      pBt->readOnly = 1;
    +    }
    +    if( page1[19]>1 ){
    +      goto page1_init_failed;
    +    }
    +
    +    /* The maximum embedded fraction must be exactly 25%.  And the minimum
    +    ** embedded fraction must be 12.5% for both leaf-data and non-leaf-data.
    +    ** The original design allowed these amounts to vary, but as of
    +    ** version 3.6.0, we require them to be fixed.
    +    */
    +    if( memcmp(&page1[21], "\100\040\040",3)!=0 ){
    +      goto page1_init_failed;
    +    }
    +    pageSize = get2byte(&page1[16]);
    +    if( ((pageSize-1)&pageSize)!=0 || pageSize<512 ||
    +        (SQLITE_MAX_PAGE_SIZE<32768 && pageSize>SQLITE_MAX_PAGE_SIZE)
    +    ){
    +      goto page1_init_failed;
    +    }
    +    assert( (pageSize & 7)==0 );
    +    usableSize = pageSize - page1[20];
    +    if( pageSize!=pBt->pageSize ){
    +      /* After reading the first page of the database assuming a page size
    +      ** of BtShared.pageSize, we have discovered that the page-size is
    +      ** actually pageSize. Unlock the database, leave pBt->pPage1 at
    +      ** zero and return SQLITE_OK. The caller will call this function
    +      ** again with the correct page-size.
    +      */
    +      releasePage(pPage1);
    +      pBt->usableSize = (u16)usableSize;
    +      pBt->pageSize = (u16)pageSize;
    +      freeTempSpace(pBt);
    +      rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,
    +                                   pageSize-usableSize);
    +      return rc;
    +    }
    +    if( usableSize<480 ){
    +      goto page1_init_failed;
    +    }
    +    pBt->pageSize = (u16)pageSize;
    +    pBt->usableSize = (u16)usableSize;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    pBt->autoVacuum = (get4byte(&page1[36 + 4*4])?1:0);
    +    pBt->incrVacuum = (get4byte(&page1[36 + 7*4])?1:0);
    +#endif
    +  }
    +
    +  /* maxLocal is the maximum amount of payload to store locally for
    +  ** a cell.  Make sure it is small enough so that at least minFanout
    +  ** cells can will fit on one page.  We assume a 10-byte page header.
    +  ** Besides the payload, the cell must store:
    +  **     2-byte pointer to the cell
    +  **     4-byte child pointer
    +  **     9-byte nKey value
    +  **     4-byte nData value
    +  **     4-byte overflow page pointer
    +  ** So a cell consists of a 2-byte poiner, a header which is as much as
    +  ** 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow
    +  ** page pointer.
    +  */
    +  pBt->maxLocal = (pBt->usableSize-12)*64/255 - 23;
    +  pBt->minLocal = (pBt->usableSize-12)*32/255 - 23;
    +  pBt->maxLeaf = pBt->usableSize - 35;
    +  pBt->minLeaf = (pBt->usableSize-12)*32/255 - 23;
    +  assert( pBt->maxLeaf + 23 <= MX_CELL_SIZE(pBt) );
    +  pBt->pPage1 = pPage1;
    +  return SQLITE_OK;
    +
    +page1_init_failed:
    +  releasePage(pPage1);
    +  pBt->pPage1 = 0;
    +  return rc;
    +}
    +
    +/*
    +** If there are no outstanding cursors and we are not in the middle
    +** of a transaction but there is a read lock on the database, then
    +** this routine unrefs the first page of the database file which 
    +** has the effect of releasing the read lock.
    +**
    +** If there is a transaction in progress, this routine is a no-op.
    +*/
    +static void unlockBtreeIfUnused(BtShared *pBt){
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( pBt->pCursor==0 || pBt->inTransaction>TRANS_NONE );
    +  if( pBt->inTransaction==TRANS_NONE && pBt->pPage1!=0 ){
    +    assert( pBt->pPage1->aData );
    +    assert( sqlite3PagerRefcount(pBt->pPager)==1 );
    +    assert( pBt->pPage1->aData );
    +    releasePage(pBt->pPage1);
    +    pBt->pPage1 = 0;
    +  }
    +}
    +
    +/*
    +** If pBt points to an empty file then convert that empty file
    +** into a new empty database by initializing the first page of
    +** the database.
    +*/
    +static int newDatabase(BtShared *pBt){
    +  MemPage *pP1;
    +  unsigned char *data;
    +  int rc;
    +  int nPage;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  /* The database size has already been measured and cached, so failure
    +  ** is impossible here.  If the original size measurement failed, then
    +  ** processing aborts before entering this routine. */
    +  rc = sqlite3PagerPagecount(pBt->pPager, &nPage);
    +  if( NEVER(rc!=SQLITE_OK) || nPage>0 ){
    +    return rc;
    +  }
    +  pP1 = pBt->pPage1;
    +  assert( pP1!=0 );
    +  data = pP1->aData;
    +  rc = sqlite3PagerWrite(pP1->pDbPage);
    +  if( rc ) return rc;
    +  memcpy(data, zMagicHeader, sizeof(zMagicHeader));
    +  assert( sizeof(zMagicHeader)==16 );
    +  put2byte(&data[16], pBt->pageSize);
    +  data[18] = 1;
    +  data[19] = 1;
    +  assert( pBt->usableSize<=pBt->pageSize && pBt->usableSize+255>=pBt->pageSize);
    +  data[20] = (u8)(pBt->pageSize - pBt->usableSize);
    +  data[21] = 64;
    +  data[22] = 32;
    +  data[23] = 32;
    +  memset(&data[24], 0, 100-24);
    +  zeroPage(pP1, PTF_INTKEY|PTF_LEAF|PTF_LEAFDATA );
    +  pBt->pageSizeFixed = 1;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  assert( pBt->autoVacuum==1 || pBt->autoVacuum==0 );
    +  assert( pBt->incrVacuum==1 || pBt->incrVacuum==0 );
    +  put4byte(&data[36 + 4*4], pBt->autoVacuum);
    +  put4byte(&data[36 + 7*4], pBt->incrVacuum);
    +#endif
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Attempt to start a new transaction. A write-transaction
    +** is started if the second argument is nonzero, otherwise a read-
    +** transaction.  If the second argument is 2 or more and exclusive
    +** transaction is started, meaning that no other process is allowed
    +** to access the database.  A preexisting transaction may not be
    +** upgraded to exclusive by calling this routine a second time - the
    +** exclusivity flag only works for a new transaction.
    +**
    +** A write-transaction must be started before attempting any 
    +** changes to the database.  None of the following routines 
    +** will work unless a transaction is started first:
    +**
    +**      sqlite3BtreeCreateTable()
    +**      sqlite3BtreeCreateIndex()
    +**      sqlite3BtreeClearTable()
    +**      sqlite3BtreeDropTable()
    +**      sqlite3BtreeInsert()
    +**      sqlite3BtreeDelete()
    +**      sqlite3BtreeUpdateMeta()
    +**
    +** If an initial attempt to acquire the lock fails because of lock contention
    +** and the database was previously unlocked, then invoke the busy handler
    +** if there is one.  But if there was previously a read-lock, do not
    +** invoke the busy handler - just return SQLITE_BUSY.  SQLITE_BUSY is 
    +** returned when there is already a read-lock in order to avoid a deadlock.
    +**
    +** Suppose there are two processes A and B.  A has a read lock and B has
    +** a reserved lock.  B tries to promote to exclusive but is blocked because
    +** of A's read lock.  A tries to promote to reserved but is blocked by B.
    +** One or the other of the two processes must give way or there can be
    +** no progress.  By returning SQLITE_BUSY and not invoking the busy callback
    +** when A already has a read lock, we encourage A to give up and let B
    +** proceed.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
    +  sqlite3 *pBlock = 0;
    +  BtShared *pBt = p->pBt;
    +  int rc = SQLITE_OK;
    +
    +  sqlite3BtreeEnter(p);
    +  btreeIntegrity(p);
    +
    +  /* If the btree is already in a write-transaction, or it
    +  ** is already in a read-transaction and a read-transaction
    +  ** is requested, this is a no-op.
    +  */
    +  if( p->inTrans==TRANS_WRITE || (p->inTrans==TRANS_READ && !wrflag) ){
    +    goto trans_begun;
    +  }
    +
    +  /* Write transactions are not possible on a read-only database */
    +  if( pBt->readOnly && wrflag ){
    +    rc = SQLITE_READONLY;
    +    goto trans_begun;
    +  }
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  /* If another database handle has already opened a write transaction 
    +  ** on this shared-btree structure and a second write transaction is
    +  ** requested, return SQLITE_LOCKED.
    +  */
    +  if( (wrflag && pBt->inTransaction==TRANS_WRITE) || pBt->isPending ){
    +    pBlock = pBt->pWriter->db;
    +  }else if( wrflag>1 ){
    +    BtLock *pIter;
    +    for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
    +      if( pIter->pBtree!=p ){
    +        pBlock = pIter->pBtree->db;
    +        break;
    +      }
    +    }
    +  }
    +  if( pBlock ){
    +    sqlite3ConnectionBlocked(p->db, pBlock);
    +    rc = SQLITE_LOCKED_SHAREDCACHE;
    +    goto trans_begun;
    +  }
    +#endif
    +
    +  /* Any read-only or read-write transaction implies a read-lock on 
    +  ** page 1. So if some other shared-cache client already has a write-lock 
    +  ** on page 1, the transaction cannot be opened. */
    +  rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);
    +  if( SQLITE_OK!=rc ) goto trans_begun;
    +
    +  do {
    +    /* Call lockBtree() until either pBt->pPage1 is populated or
    +    ** lockBtree() returns something other than SQLITE_OK. lockBtree()
    +    ** may return SQLITE_OK but leave pBt->pPage1 set to 0 if after
    +    ** reading page 1 it discovers that the page-size of the database 
    +    ** file is not pBt->pageSize. In this case lockBtree() will update
    +    ** pBt->pageSize to the page-size of the file on disk.
    +    */
    +    while( pBt->pPage1==0 && SQLITE_OK==(rc = lockBtree(pBt)) );
    +
    +    if( rc==SQLITE_OK && wrflag ){
    +      if( pBt->readOnly ){
    +        rc = SQLITE_READONLY;
    +      }else{
    +        rc = sqlite3PagerBegin(pBt->pPager,wrflag>1,sqlite3TempInMemory(p->db));
    +        if( rc==SQLITE_OK ){
    +          rc = newDatabase(pBt);
    +        }
    +      }
    +    }
    +  
    +    if( rc!=SQLITE_OK ){
    +      unlockBtreeIfUnused(pBt);
    +    }
    +  }while( rc==SQLITE_BUSY && pBt->inTransaction==TRANS_NONE &&
    +          btreeInvokeBusyHandler(pBt) );
    +
    +  if( rc==SQLITE_OK ){
    +    if( p->inTrans==TRANS_NONE ){
    +      pBt->nTransaction++;
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +      if( p->sharable ){
    +	assert( p->lock.pBtree==p && p->lock.iTable==1 );
    +        p->lock.eLock = READ_LOCK;
    +        p->lock.pNext = pBt->pLock;
    +        pBt->pLock = &p->lock;
    +      }
    +#endif
    +    }
    +    p->inTrans = (wrflag?TRANS_WRITE:TRANS_READ);
    +    if( p->inTrans>pBt->inTransaction ){
    +      pBt->inTransaction = p->inTrans;
    +    }
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +    if( wrflag ){
    +      assert( !pBt->pWriter );
    +      pBt->pWriter = p;
    +      pBt->isExclusive = (u8)(wrflag>1);
    +    }
    +#endif
    +  }
    +
    +
    +trans_begun:
    +  if( rc==SQLITE_OK && wrflag ){
    +    /* This call makes sure that the pager has the correct number of
    +    ** open savepoints. If the second parameter is greater than 0 and
    +    ** the sub-journal is not already open, then it will be opened here.
    +    */
    +    rc = sqlite3PagerOpenSavepoint(pBt->pPager, p->db->nSavepoint);
    +  }
    +
    +  btreeIntegrity(p);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +
    +/*
    +** Set the pointer-map entries for all children of page pPage. Also, if
    +** pPage contains cells that point to overflow pages, set the pointer
    +** map entries for the overflow pages as well.
    +*/
    +static int setChildPtrmaps(MemPage *pPage){
    +  int i;                             /* Counter variable */
    +  int nCell;                         /* Number of cells in page pPage */
    +  int rc;                            /* Return code */
    +  BtShared *pBt = pPage->pBt;
    +  u8 isInitOrig = pPage->isInit;
    +  Pgno pgno = pPage->pgno;
    +
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  rc = btreeInitPage(pPage);
    +  if( rc!=SQLITE_OK ){
    +    goto set_child_ptrmaps_out;
    +  }
    +  nCell = pPage->nCell;
    +
    +  for(i=0; i<nCell; i++){
    +    u8 *pCell = findCell(pPage, i);
    +
    +    ptrmapPutOvflPtr(pPage, pCell, &rc);
    +
    +    if( !pPage->leaf ){
    +      Pgno childPgno = get4byte(pCell);
    +      ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
    +    }
    +  }
    +
    +  if( !pPage->leaf ){
    +    Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    +    ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
    +  }
    +
    +set_child_ptrmaps_out:
    +  pPage->isInit = isInitOrig;
    +  return rc;
    +}
    +
    +/*
    +** Somewhere on pPage is a pointer to page iFrom.  Modify this pointer so
    +** that it points to iTo. Parameter eType describes the type of pointer to
    +** be modified, as  follows:
    +**
    +** PTRMAP_BTREE:     pPage is a btree-page. The pointer points at a child 
    +**                   page of pPage.
    +**
    +** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
    +**                   page pointed to by one of the cells on pPage.
    +**
    +** PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next
    +**                   overflow page in the list.
    +*/
    +static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  if( eType==PTRMAP_OVERFLOW2 ){
    +    /* The pointer is always the first 4 bytes of the page in this case.  */
    +    if( get4byte(pPage->aData)!=iFrom ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    put4byte(pPage->aData, iTo);
    +  }else{
    +    u8 isInitOrig = pPage->isInit;
    +    int i;
    +    int nCell;
    +
    +    btreeInitPage(pPage);
    +    nCell = pPage->nCell;
    +
    +    for(i=0; i<nCell; i++){
    +      u8 *pCell = findCell(pPage, i);
    +      if( eType==PTRMAP_OVERFLOW1 ){
    +        CellInfo info;
    +        btreeParseCellPtr(pPage, pCell, &info);
    +        if( info.iOverflow ){
    +          if( iFrom==get4byte(&pCell[info.iOverflow]) ){
    +            put4byte(&pCell[info.iOverflow], iTo);
    +            break;
    +          }
    +        }
    +      }else{
    +        if( get4byte(pCell)==iFrom ){
    +          put4byte(pCell, iTo);
    +          break;
    +        }
    +      }
    +    }
    +  
    +    if( i==nCell ){
    +      if( eType!=PTRMAP_BTREE || 
    +          get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
    +        return SQLITE_CORRUPT_BKPT;
    +      }
    +      put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
    +    }
    +
    +    pPage->isInit = isInitOrig;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Move the open database page pDbPage to location iFreePage in the 
    +** database. The pDbPage reference remains valid.
    +**
    +** The isCommit flag indicates that there is no need to remember that
    +** the journal needs to be sync()ed before database page pDbPage->pgno 
    +** can be written to. The caller has already promised not to write to that
    +** page.
    +*/
    +static int relocatePage(
    +  BtShared *pBt,           /* Btree */
    +  MemPage *pDbPage,        /* Open page to move */
    +  u8 eType,                /* Pointer map 'type' entry for pDbPage */
    +  Pgno iPtrPage,           /* Pointer map 'page-no' entry for pDbPage */
    +  Pgno iFreePage,          /* The location to move pDbPage to */
    +  int isCommit             /* isCommit flag passed to sqlite3PagerMovepage */
    +){
    +  MemPage *pPtrPage;   /* The page that contains a pointer to pDbPage */
    +  Pgno iDbPage = pDbPage->pgno;
    +  Pager *pPager = pBt->pPager;
    +  int rc;
    +
    +  assert( eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 || 
    +      eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( pDbPage->pBt==pBt );
    +
    +  /* Move page iDbPage from its current location to page number iFreePage */
    +  TRACE(("AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\n", 
    +      iDbPage, iFreePage, iPtrPage, eType));
    +  rc = sqlite3PagerMovepage(pPager, pDbPage->pDbPage, iFreePage, isCommit);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +  pDbPage->pgno = iFreePage;
    +
    +  /* If pDbPage was a btree-page, then it may have child pages and/or cells
    +  ** that point to overflow pages. The pointer map entries for all these
    +  ** pages need to be changed.
    +  **
    +  ** If pDbPage is an overflow page, then the first 4 bytes may store a
    +  ** pointer to a subsequent overflow page. If this is the case, then
    +  ** the pointer map needs to be updated for the subsequent overflow page.
    +  */
    +  if( eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE ){
    +    rc = setChildPtrmaps(pDbPage);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +  }else{
    +    Pgno nextOvfl = get4byte(pDbPage->aData);
    +    if( nextOvfl!=0 ){
    +      ptrmapPut(pBt, nextOvfl, PTRMAP_OVERFLOW2, iFreePage, &rc);
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +    }
    +  }
    +
    +  /* Fix the database pointer on page iPtrPage that pointed at iDbPage so
    +  ** that it points at iFreePage. Also fix the pointer map entry for
    +  ** iPtrPage.
    +  */
    +  if( eType!=PTRMAP_ROOTPAGE ){
    +    rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    rc = sqlite3PagerWrite(pPtrPage->pDbPage);
    +    if( rc!=SQLITE_OK ){
    +      releasePage(pPtrPage);
    +      return rc;
    +    }
    +    rc = modifyPagePointer(pPtrPage, iDbPage, iFreePage, eType);
    +    releasePage(pPtrPage);
    +    if( rc==SQLITE_OK ){
    +      ptrmapPut(pBt, iFreePage, eType, iPtrPage, &rc);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/* Forward declaration required by incrVacuumStep(). */
    +static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
    +
    +/*
    +** Perform a single step of an incremental-vacuum. If successful,
    +** return SQLITE_OK. If there is no work to do (and therefore no
    +** point in calling this function again), return SQLITE_DONE.
    +**
    +** More specificly, this function attempts to re-organize the 
    +** database so that the last page of the file currently in use
    +** is no longer in use.
    +**
    +** If the nFin parameter is non-zero, this function assumes
    +** that the caller will keep calling incrVacuumStep() until
    +** it returns SQLITE_DONE or an error, and that nFin is the
    +** number of pages the database file will contain after this 
    +** process is complete.  If nFin is zero, it is assumed that
    +** incrVacuumStep() will be called a finite amount of times
    +** which may or may not empty the freelist.  A full autovacuum
    +** has nFin>0.  A "PRAGMA incremental_vacuum" has nFin==0.
    +*/
    +static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
    +  Pgno nFreeList;           /* Number of pages still on the free-list */
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( iLastPg>nFin );
    +
    +  if( !PTRMAP_ISPAGE(pBt, iLastPg) && iLastPg!=PENDING_BYTE_PAGE(pBt) ){
    +    int rc;
    +    u8 eType;
    +    Pgno iPtrPage;
    +
    +    nFreeList = get4byte(&pBt->pPage1->aData[36]);
    +    if( nFreeList==0 ){
    +      return SQLITE_DONE;
    +    }
    +
    +    rc = ptrmapGet(pBt, iLastPg, &eType, &iPtrPage);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    if( eType==PTRMAP_ROOTPAGE ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +
    +    if( eType==PTRMAP_FREEPAGE ){
    +      if( nFin==0 ){
    +        /* Remove the page from the files free-list. This is not required
    +        ** if nFin is non-zero. In that case, the free-list will be
    +        ** truncated to zero after this function returns, so it doesn't 
    +        ** matter if it still contains some garbage entries.
    +        */
    +        Pgno iFreePg;
    +        MemPage *pFreePg;
    +        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, iLastPg, 1);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +        assert( iFreePg==iLastPg );
    +        releasePage(pFreePg);
    +      }
    +    } else {
    +      Pgno iFreePg;             /* Index of free page to move pLastPg to */
    +      MemPage *pLastPg;
    +
    +      rc = btreeGetPage(pBt, iLastPg, &pLastPg, 0);
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +
    +      /* If nFin is zero, this loop runs exactly once and page pLastPg
    +      ** is swapped with the first free page pulled off the free list.
    +      **
    +      ** On the other hand, if nFin is greater than zero, then keep
    +      ** looping until a free-page located within the first nFin pages
    +      ** of the file is found.
    +      */
    +      do {
    +        MemPage *pFreePg;
    +        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, 0, 0);
    +        if( rc!=SQLITE_OK ){
    +          releasePage(pLastPg);
    +          return rc;
    +        }
    +        releasePage(pFreePg);
    +      }while( nFin!=0 && iFreePg>nFin );
    +      assert( iFreePg<iLastPg );
    +      
    +      rc = sqlite3PagerWrite(pLastPg->pDbPage);
    +      if( rc==SQLITE_OK ){
    +        rc = relocatePage(pBt, pLastPg, eType, iPtrPage, iFreePg, nFin!=0);
    +      }
    +      releasePage(pLastPg);
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +    }
    +  }
    +
    +  if( nFin==0 ){
    +    iLastPg--;
    +    while( iLastPg==PENDING_BYTE_PAGE(pBt)||PTRMAP_ISPAGE(pBt, iLastPg) ){
    +      if( PTRMAP_ISPAGE(pBt, iLastPg) ){
    +        MemPage *pPg;
    +        int rc = btreeGetPage(pBt, iLastPg, &pPg, 0);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +        rc = sqlite3PagerWrite(pPg->pDbPage);
    +        releasePage(pPg);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +      }
    +      iLastPg--;
    +    }
    +    sqlite3PagerTruncateImage(pBt->pPager, iLastPg);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** A write-transaction must be opened before calling this function.
    +** It performs a single unit of work towards an incremental vacuum.
    +**
    +** If the incremental vacuum is finished after this function has run,
    +** SQLITE_DONE is returned. If it is not finished, but no error occurred,
    +** SQLITE_OK is returned. Otherwise an SQLite error code. 
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){
    +  int rc;
    +  BtShared *pBt = p->pBt;
    +
    +  sqlite3BtreeEnter(p);
    +  assert( pBt->inTransaction==TRANS_WRITE && p->inTrans==TRANS_WRITE );
    +  if( !pBt->autoVacuum ){
    +    rc = SQLITE_DONE;
    +  }else{
    +    invalidateAllOverflowCache(pBt);
    +    rc = incrVacuumStep(pBt, 0, pagerPagecount(pBt));
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** This routine is called prior to sqlite3PagerCommit when a transaction
    +** is commited for an auto-vacuum database.
    +**
    +** If SQLITE_OK is returned, then *pnTrunc is set to the number of pages
    +** the database file should be truncated to during the commit process. 
    +** i.e. the database has been reorganized so that only the first *pnTrunc
    +** pages are in use.
    +*/
    +static int autoVacuumCommit(BtShared *pBt){
    +  int rc = SQLITE_OK;
    +  Pager *pPager = pBt->pPager;
    +  VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager) );
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  invalidateAllOverflowCache(pBt);
    +  assert(pBt->autoVacuum);
    +  if( !pBt->incrVacuum ){
    +    Pgno nFin;         /* Number of pages in database after autovacuuming */
    +    Pgno nFree;        /* Number of pages on the freelist initially */
    +    Pgno nPtrmap;      /* Number of PtrMap pages to be freed */
    +    Pgno iFree;        /* The next page to be freed */
    +    int nEntry;        /* Number of entries on one ptrmap page */
    +    Pgno nOrig;        /* Database size before freeing */
    +
    +    nOrig = pagerPagecount(pBt);
    +    if( PTRMAP_ISPAGE(pBt, nOrig) || nOrig==PENDING_BYTE_PAGE(pBt) ){
    +      /* It is not possible to create a database for which the final page
    +      ** is either a pointer-map page or the pending-byte page. If one
    +      ** is encountered, this indicates corruption.
    +      */
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +
    +    nFree = get4byte(&pBt->pPage1->aData[36]);
    +    nEntry = pBt->usableSize/5;
    +    nPtrmap = (nFree-nOrig+PTRMAP_PAGENO(pBt, nOrig)+nEntry)/nEntry;
    +    nFin = nOrig - nFree - nPtrmap;
    +    if( nOrig>PENDING_BYTE_PAGE(pBt) && nFin<PENDING_BYTE_PAGE(pBt) ){
    +      nFin--;
    +    }
    +    while( PTRMAP_ISPAGE(pBt, nFin) || nFin==PENDING_BYTE_PAGE(pBt) ){
    +      nFin--;
    +    }
    +    if( nFin>nOrig ) return SQLITE_CORRUPT_BKPT;
    +
    +    for(iFree=nOrig; iFree>nFin && rc==SQLITE_OK; iFree--){
    +      rc = incrVacuumStep(pBt, nFin, iFree);
    +    }
    +    if( (rc==SQLITE_DONE || rc==SQLITE_OK) && nFree>0 ){
    +      rc = SQLITE_OK;
    +      rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
    +      put4byte(&pBt->pPage1->aData[32], 0);
    +      put4byte(&pBt->pPage1->aData[36], 0);
    +      sqlite3PagerTruncateImage(pBt->pPager, nFin);
    +    }
    +    if( rc!=SQLITE_OK ){
    +      sqlite3PagerRollback(pPager);
    +    }
    +  }
    +
    +  assert( nRef==sqlite3PagerRefcount(pPager) );
    +  return rc;
    +}
    +
    +#else /* ifndef SQLITE_OMIT_AUTOVACUUM */
    +# define setChildPtrmaps(x) SQLITE_OK
    +#endif
    +
    +/*
    +** This routine does the first phase of a two-phase commit.  This routine
    +** causes a rollback journal to be created (if it does not already exist)
    +** and populated with enough information so that if a power loss occurs
    +** the database can be restored to its original state by playing back
    +** the journal.  Then the contents of the journal are flushed out to
    +** the disk.  After the journal is safely on oxide, the changes to the
    +** database are written into the database file and flushed to oxide.
    +** At the end of this call, the rollback journal still exists on the
    +** disk and we are still holding all locks, so the transaction has not
    +** committed.  See sqlite3BtreeCommitPhaseTwo() for the second phase of the
    +** commit process.
    +**
    +** This call is a no-op if no write-transaction is currently active on pBt.
    +**
    +** Otherwise, sync the database file for the btree pBt. zMaster points to
    +** the name of a master journal file that should be written into the
    +** individual journal file, or is NULL, indicating no master journal file 
    +** (single database transaction).
    +**
    +** When this is called, the master journal should already have been
    +** created, populated with this journal pointer and synced to disk.
    +**
    +** Once this is routine has returned, the only thing required to commit
    +** the write-transaction for this database file is to delete the journal.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
    +  int rc = SQLITE_OK;
    +  if( p->inTrans==TRANS_WRITE ){
    +    BtShared *pBt = p->pBt;
    +    sqlite3BtreeEnter(p);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pBt->autoVacuum ){
    +      rc = autoVacuumCommit(pBt);
    +      if( rc!=SQLITE_OK ){
    +        sqlite3BtreeLeave(p);
    +        return rc;
    +      }
    +    }
    +#endif
    +    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zMaster, 0);
    +    sqlite3BtreeLeave(p);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
    +** at the conclusion of a transaction.
    +*/
    +static void btreeEndTransaction(Btree *p){
    +  BtShared *pBt = p->pBt;
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +
    +  btreeClearHasContent(pBt);
    +  if( p->inTrans>TRANS_NONE && p->db->activeVdbeCnt>1 ){
    +    /* If there are other active statements that belong to this database
    +    ** handle, downgrade to a read-only transaction. The other statements
    +    ** may still be reading from the database.  */
    +    downgradeAllSharedCacheTableLocks(p);
    +    p->inTrans = TRANS_READ;
    +  }else{
    +    /* If the handle had any kind of transaction open, decrement the 
    +    ** transaction count of the shared btree. If the transaction count 
    +    ** reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused()
    +    ** call below will unlock the pager.  */
    +    if( p->inTrans!=TRANS_NONE ){
    +      clearAllSharedCacheTableLocks(p);
    +      pBt->nTransaction--;
    +      if( 0==pBt->nTransaction ){
    +        pBt->inTransaction = TRANS_NONE;
    +      }
    +    }
    +
    +    /* Set the current transaction state to TRANS_NONE and unlock the 
    +    ** pager if this call closed the only read or write transaction.  */
    +    p->inTrans = TRANS_NONE;
    +    unlockBtreeIfUnused(pBt);
    +  }
    +
    +  btreeIntegrity(p);
    +}
    +
    +/*
    +** Commit the transaction currently in progress.
    +**
    +** This routine implements the second phase of a 2-phase commit.  The
    +** sqlite3BtreeCommitPhaseOne() routine does the first phase and should
    +** be invoked prior to calling this routine.  The sqlite3BtreeCommitPhaseOne()
    +** routine did all the work of writing information out to disk and flushing the
    +** contents so that they are written onto the disk platter.  All this
    +** routine has to do is delete or truncate or zero the header in the
    +** the rollback journal (which causes the transaction to commit) and
    +** drop locks.
    +**
    +** This will release the write lock on the database file.  If there
    +** are no active cursors, it also releases the read lock.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p){
    +  BtShared *pBt = p->pBt;
    +
    +  sqlite3BtreeEnter(p);
    +  btreeIntegrity(p);
    +
    +  /* If the handle has a write-transaction open, commit the shared-btrees 
    +  ** transaction and set the shared state to TRANS_READ.
    +  */
    +  if( p->inTrans==TRANS_WRITE ){
    +    int rc;
    +    assert( pBt->inTransaction==TRANS_WRITE );
    +    assert( pBt->nTransaction>0 );
    +    rc = sqlite3PagerCommitPhaseTwo(pBt->pPager);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3BtreeLeave(p);
    +      return rc;
    +    }
    +    pBt->inTransaction = TRANS_READ;
    +  }
    +
    +  btreeEndTransaction(p);
    +  sqlite3BtreeLeave(p);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Do both phases of a commit.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
    +  int rc;
    +  sqlite3BtreeEnter(p);
    +  rc = sqlite3BtreeCommitPhaseOne(p, 0);
    +  if( rc==SQLITE_OK ){
    +    rc = sqlite3BtreeCommitPhaseTwo(p);
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** Return the number of write-cursors open on this handle. This is for use
    +** in assert() expressions, so it is only compiled if NDEBUG is not
    +** defined.
    +**
    +** For the purposes of this routine, a write-cursor is any cursor that
    +** is capable of writing to the databse.  That means the cursor was
    +** originally opened for writing and the cursor has not be disabled
    +** by having its state changed to CURSOR_FAULT.
    +*/
    +static int countWriteCursors(BtShared *pBt){
    +  BtCursor *pCur;
    +  int r = 0;
    +  for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
    +    if( pCur->wrFlag && pCur->eState!=CURSOR_FAULT ) r++; 
    +  }
    +  return r;
    +}
    +#endif
    +
    +/*
    +** This routine sets the state to CURSOR_FAULT and the error
    +** code to errCode for every cursor on BtShared that pBtree
    +** references.
    +**
    +** Every cursor is tripped, including cursors that belong
    +** to other database connections that happen to be sharing
    +** the cache with pBtree.
    +**
    +** This routine gets called when a rollback occurs.
    +** All cursors using the same cache must be tripped
    +** to prevent them from trying to use the btree after
    +** the rollback.  The rollback may have deleted tables
    +** or moved root pages, so it is not sufficient to
    +** save the state of the cursor.  The cursor must be
    +** invalidated.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode){
    +  BtCursor *p;
    +  sqlite3BtreeEnter(pBtree);
    +  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
    +    int i;
    +    sqlite3BtreeClearCursor(p);
    +    p->eState = CURSOR_FAULT;
    +    p->skipNext = errCode;
    +    for(i=0; i<=p->iPage; i++){
    +      releasePage(p->apPage[i]);
    +      p->apPage[i] = 0;
    +    }
    +  }
    +  sqlite3BtreeLeave(pBtree);
    +}
    +
    +/*
    +** Rollback the transaction in progress.  All cursors will be
    +** invalided by this operation.  Any attempt to use a cursor
    +** that was open at the beginning of this operation will result
    +** in an error.
    +**
    +** This will release the write lock on the database file.  If there
    +** are no active cursors, it also releases the read lock.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p){
    +  int rc;
    +  BtShared *pBt = p->pBt;
    +  MemPage *pPage1;
    +
    +  sqlite3BtreeEnter(p);
    +  rc = saveAllCursors(pBt, 0, 0);
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  if( rc!=SQLITE_OK ){
    +    /* This is a horrible situation. An IO or malloc() error occurred whilst
    +    ** trying to save cursor positions. If this is an automatic rollback (as
    +    ** the result of a constraint, malloc() failure or IO error) then 
    +    ** the cache may be internally inconsistent (not contain valid trees) so
    +    ** we cannot simply return the error to the caller. Instead, abort 
    +    ** all queries that may be using any of the cursors that failed to save.
    +    */
    +    sqlite3BtreeTripAllCursors(p, rc);
    +  }
    +#endif
    +  btreeIntegrity(p);
    +
    +  if( p->inTrans==TRANS_WRITE ){
    +    int rc2;
    +
    +    assert( TRANS_WRITE==pBt->inTransaction );
    +    rc2 = sqlite3PagerRollback(pBt->pPager);
    +    if( rc2!=SQLITE_OK ){
    +      rc = rc2;
    +    }
    +
    +    /* The rollback may have destroyed the pPage1->aData value.  So
    +    ** call btreeGetPage() on page 1 again to make
    +    ** sure pPage1->aData is set correctly. */
    +    if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
    +      releasePage(pPage1);
    +    }
    +    assert( countWriteCursors(pBt)==0 );
    +    pBt->inTransaction = TRANS_READ;
    +  }
    +
    +  btreeEndTransaction(p);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** Start a statement subtransaction. The subtransaction can can be rolled
    +** back independently of the main transaction. You must start a transaction 
    +** before starting a subtransaction. The subtransaction is ended automatically 
    +** if the main transaction commits or rolls back.
    +**
    +** Statement subtransactions are used around individual SQL statements
    +** that are contained within a BEGIN...COMMIT block.  If a constraint
    +** error occurs within the statement, the effect of that one statement
    +** can be rolled back without having to rollback the entire transaction.
    +**
    +** A statement sub-transaction is implemented as an anonymous savepoint. The
    +** value passed as the second parameter is the total number of savepoints,
    +** including the new anonymous savepoint, open on the B-Tree. i.e. if there
    +** are no active savepoints and no other statement-transactions open,
    +** iStatement is 1. This anonymous savepoint can be released or rolled back
    +** using the sqlite3BtreeSavepoint() function.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree *p, int iStatement){
    +  int rc;
    +  BtShared *pBt = p->pBt;
    +  sqlite3BtreeEnter(p);
    +  assert( p->inTrans==TRANS_WRITE );
    +  assert( pBt->readOnly==0 );
    +  assert( iStatement>0 );
    +  assert( iStatement>p->db->nSavepoint );
    +  if( NEVER(p->inTrans!=TRANS_WRITE || pBt->readOnly) ){
    +    rc = SQLITE_INTERNAL;
    +  }else{
    +    assert( pBt->inTransaction==TRANS_WRITE );
    +    /* At the pager level, a statement transaction is a savepoint with
    +    ** an index greater than all savepoints created explicitly using
    +    ** SQL statements. It is illegal to open, release or rollback any
    +    ** such savepoints while the statement transaction savepoint is active.
    +    */
    +    rc = sqlite3PagerOpenSavepoint(pBt->pPager, iStatement);
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** The second argument to this function, op, is always SAVEPOINT_ROLLBACK
    +** or SAVEPOINT_RELEASE. This function either releases or rolls back the
    +** savepoint identified by parameter iSavepoint, depending on the value 
    +** of op.
    +**
    +** Normally, iSavepoint is greater than or equal to zero. However, if op is
    +** SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the 
    +** contents of the entire transaction are rolled back. This is different
    +** from a normal transaction rollback, as no locks are released and the
    +** transaction remains open.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
    +  int rc = SQLITE_OK;
    +  if( p && p->inTrans==TRANS_WRITE ){
    +    BtShared *pBt = p->pBt;
    +    assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
    +    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
    +    sqlite3BtreeEnter(p);
    +    rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
    +    if( rc==SQLITE_OK ){
    +      rc = newDatabase(pBt);
    +    }
    +    sqlite3BtreeLeave(p);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Create a new cursor for the BTree whose root is on the page
    +** iTable. If a read-only cursor is requested, it is assumed that
    +** the caller already has at least a read-only transaction open
    +** on the database already. If a write-cursor is requested, then
    +** the caller is assumed to have an open write transaction.
    +**
    +** If wrFlag==0, then the cursor can only be used for reading.
    +** If wrFlag==1, then the cursor can be used for reading or for
    +** writing if other conditions for writing are also met.  These
    +** are the conditions that must be met in order for writing to
    +** be allowed:
    +**
    +** 1:  The cursor must have been opened with wrFlag==1
    +**
    +** 2:  Other database connections that share the same pager cache
    +**     but which are not in the READ_UNCOMMITTED state may not have
    +**     cursors open with wrFlag==0 on the same table.  Otherwise
    +**     the changes made by this write cursor would be visible to
    +**     the read cursors in the other database connection.
    +**
    +** 3:  The database must be writable (not on read-only media)
    +**
    +** 4:  There must be an active transaction.
    +**
    +** No checking is done to make sure that page iTable really is the
    +** root page of a b-tree.  If it is not, then the cursor acquired
    +** will not work correctly.
    +**
    +** It is assumed that the sqlite3BtreeCursorSize() bytes of memory 
    +** pointed to by pCur have been zeroed by the caller.
    +*/
    +static int btreeCursor(
    +  Btree *p,                              /* The btree */
    +  int iTable,                            /* Root page of table to open */
    +  int wrFlag,                            /* 1 to write. 0 read-only */
    +  struct KeyInfo *pKeyInfo,              /* First arg to comparison function */
    +  BtCursor *pCur                         /* Space for new cursor */
    +){
    +  BtShared *pBt = p->pBt;                /* Shared b-tree handle */
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( wrFlag==0 || wrFlag==1 );
    +
    +  /* The following assert statements verify that if this is a sharable 
    +  ** b-tree database, the connection is holding the required table locks, 
    +  ** and that no other connection has any open cursor that conflicts with 
    +  ** this lock.  */
    +  assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, wrFlag+1) );
    +  assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
    +
    +  /* Assert that the caller has opened the required transaction. */
    +  assert( p->inTrans>TRANS_NONE );
    +  assert( wrFlag==0 || p->inTrans==TRANS_WRITE );
    +  assert( pBt->pPage1 && pBt->pPage1->aData );
    +
    +  if( NEVER(wrFlag && pBt->readOnly) ){
    +    return SQLITE_READONLY;
    +  }
    +  if( iTable==1 && pagerPagecount(pBt)==0 ){
    +    return SQLITE_EMPTY;
    +  }
    +
    +  /* Now that no other errors can occur, finish filling in the BtCursor
    +  ** variables and link the cursor into the BtShared list.  */
    +  pCur->pgnoRoot = (Pgno)iTable;
    +  pCur->iPage = -1;
    +  pCur->pKeyInfo = pKeyInfo;
    +  pCur->pBtree = p;
    +  pCur->pBt = pBt;
    +  pCur->wrFlag = (u8)wrFlag;
    +  pCur->pNext = pBt->pCursor;
    +  if( pCur->pNext ){
    +    pCur->pNext->pPrev = pCur;
    +  }
    +  pBt->pCursor = pCur;
    +  pCur->eState = CURSOR_INVALID;
    +  pCur->cachedRowid = 0;
    +  return SQLITE_OK;
    +}
    +SQLITE_PRIVATE int sqlite3BtreeCursor(
    +  Btree *p,                                   /* The btree */
    +  int iTable,                                 /* Root page of table to open */
    +  int wrFlag,                                 /* 1 to write. 0 read-only */
    +  struct KeyInfo *pKeyInfo,                   /* First arg to xCompare() */
    +  BtCursor *pCur                              /* Write new cursor here */
    +){
    +  int rc;
    +  sqlite3BtreeEnter(p);
    +  rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** Return the size of a BtCursor object in bytes.
    +**
    +** This interfaces is needed so that users of cursors can preallocate
    +** sufficient storage to hold a cursor.  The BtCursor object is opaque
    +** to users so they cannot do the sizeof() themselves - they must call
    +** this routine.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCursorSize(void){
    +  return sizeof(BtCursor);
    +}
    +
    +/*
    +** Set the cached rowid value of every cursor in the same database file
    +** as pCur and having the same root page number as pCur.  The value is
    +** set to iRowid.
    +**
    +** Only positive rowid values are considered valid for this cache.
    +** The cache is initialized to zero, indicating an invalid cache.
    +** A btree will work fine with zero or negative rowids.  We just cannot
    +** cache zero or negative rowids, which means tables that use zero or
    +** negative rowids might run a little slower.  But in practice, zero
    +** or negative rowids are very uncommon so this should not be a problem.
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor *pCur, sqlite3_int64 iRowid){
    +  BtCursor *p;
    +  for(p=pCur->pBt->pCursor; p; p=p->pNext){
    +    if( p->pgnoRoot==pCur->pgnoRoot ) p->cachedRowid = iRowid;
    +  }
    +  assert( pCur->cachedRowid==iRowid );
    +}
    +
    +/*
    +** Return the cached rowid for the given cursor.  A negative or zero
    +** return value indicates that the rowid cache is invalid and should be
    +** ignored.  If the rowid cache has never before been set, then a
    +** zero is returned.
    +*/
    +SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor *pCur){
    +  return pCur->cachedRowid;
    +}
    +
    +/*
    +** Close a cursor.  The read lock on the database file is released
    +** when the last cursor is closed.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
    +  Btree *pBtree = pCur->pBtree;
    +  if( pBtree ){
    +    int i;
    +    BtShared *pBt = pCur->pBt;
    +    sqlite3BtreeEnter(pBtree);
    +    sqlite3BtreeClearCursor(pCur);
    +    if( pCur->pPrev ){
    +      pCur->pPrev->pNext = pCur->pNext;
    +    }else{
    +      pBt->pCursor = pCur->pNext;
    +    }
    +    if( pCur->pNext ){
    +      pCur->pNext->pPrev = pCur->pPrev;
    +    }
    +    for(i=0; i<=pCur->iPage; i++){
    +      releasePage(pCur->apPage[i]);
    +    }
    +    unlockBtreeIfUnused(pBt);
    +    invalidateOverflowCache(pCur);
    +    /* sqlite3_free(pCur); */
    +    sqlite3BtreeLeave(pBtree);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Make sure the BtCursor* given in the argument has a valid
    +** BtCursor.info structure.  If it is not already valid, call
    +** btreeParseCell() to fill it in.
    +**
    +** BtCursor.info is a cache of the information in the current cell.
    +** Using this cache reduces the number of calls to btreeParseCell().
    +**
    +** 2007-06-25:  There is a bug in some versions of MSVC that cause the
    +** compiler to crash when getCellInfo() is implemented as a macro.
    +** But there is a measureable speed advantage to using the macro on gcc
    +** (when less compiler optimizations like -Os or -O0 are used and the
    +** compiler is not doing agressive inlining.)  So we use a real function
    +** for MSVC and a macro for everything else.  Ticket #2457.
    +*/
    +#ifndef NDEBUG
    +  static void assertCellInfo(BtCursor *pCur){
    +    CellInfo info;
    +    int iPage = pCur->iPage;
    +    memset(&info, 0, sizeof(info));
    +    btreeParseCell(pCur->apPage[iPage], pCur->aiIdx[iPage], &info);
    +    assert( memcmp(&info, &pCur->info, sizeof(info))==0 );
    +  }
    +#else
    +  #define assertCellInfo(x)
    +#endif
    +#ifdef _MSC_VER
    +  /* Use a real function in MSVC to work around bugs in that compiler. */
    +  static void getCellInfo(BtCursor *pCur){
    +    if( pCur->info.nSize==0 ){
    +      int iPage = pCur->iPage;
    +      btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
    +      pCur->validNKey = 1;
    +    }else{
    +      assertCellInfo(pCur);
    +    }
    +  }
    +#else /* if not _MSC_VER */
    +  /* Use a macro in all other compilers so that the function is inlined */
    +#define getCellInfo(pCur)                                                      \
    +  if( pCur->info.nSize==0 ){                                                   \
    +    int iPage = pCur->iPage;                                                   \
    +    btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info); \
    +    pCur->validNKey = 1;                                                       \
    +  }else{                                                                       \
    +    assertCellInfo(pCur);                                                      \
    +  }
    +#endif /* _MSC_VER */
    +
    +#ifndef NDEBUG  /* The next routine used only within assert() statements */
    +/*
    +** Return true if the given BtCursor is valid.  A valid cursor is one
    +** that is currently pointing to a row in a (non-empty) table.
    +** This is a verification routine is used only within assert() statements.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){
    +  return pCur && pCur->eState==CURSOR_VALID;
    +}
    +#endif /* NDEBUG */
    +
    +/*
    +** Set *pSize to the size of the buffer needed to hold the value of
    +** the key for the current entry.  If the cursor is not pointing
    +** to a valid entry, *pSize is set to 0. 
    +**
    +** For a table with the INTKEY flag set, this routine returns the key
    +** itself, not the number of bytes in the key.
    +**
    +** The caller must position the cursor prior to invoking this routine.
    +** 
    +** This routine cannot fail.  It always returns SQLITE_OK.  
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor *pCur, i64 *pSize){
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_INVALID || pCur->eState==CURSOR_VALID );
    +  if( pCur->eState!=CURSOR_VALID ){
    +    *pSize = 0;
    +  }else{
    +    getCellInfo(pCur);
    +    *pSize = pCur->info.nKey;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Set *pSize to the number of bytes of data in the entry the
    +** cursor currently points to.
    +**
    +** The caller must guarantee that the cursor is pointing to a non-NULL
    +** valid entry.  In other words, the calling procedure must guarantee
    +** that the cursor has Cursor.eState==CURSOR_VALID.
    +**
    +** Failure is not possible.  This function always returns SQLITE_OK.
    +** It might just as well be a procedure (returning void) but we continue
    +** to return an integer result code for historical reasons.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  getCellInfo(pCur);
    +  *pSize = pCur->info.nData;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Given the page number of an overflow page in the database (parameter
    +** ovfl), this function finds the page number of the next page in the 
    +** linked list of overflow pages. If possible, it uses the auto-vacuum
    +** pointer-map data instead of reading the content of page ovfl to do so. 
    +**
    +** If an error occurs an SQLite error code is returned. Otherwise:
    +**
    +** The page number of the next overflow page in the linked list is 
    +** written to *pPgnoNext. If page ovfl is the last page in its linked 
    +** list, *pPgnoNext is set to zero. 
    +**
    +** If ppPage is not NULL, and a reference to the MemPage object corresponding
    +** to page number pOvfl was obtained, then *ppPage is set to point to that
    +** reference. It is the responsibility of the caller to call releasePage()
    +** on *ppPage to free the reference. In no reference was obtained (because
    +** the pointer-map was used to obtain the value for *pPgnoNext), then
    +** *ppPage is set to zero.
    +*/
    +static int getOverflowPage(
    +  BtShared *pBt,               /* The database file */
    +  Pgno ovfl,                   /* Current overflow page number */
    +  MemPage **ppPage,            /* OUT: MemPage handle (may be NULL) */
    +  Pgno *pPgnoNext              /* OUT: Next overflow page number */
    +){
    +  Pgno next = 0;
    +  MemPage *pPage = 0;
    +  int rc = SQLITE_OK;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert(pPgnoNext);
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  /* Try to find the next page in the overflow list using the
    +  ** autovacuum pointer-map pages. Guess that the next page in 
    +  ** the overflow list is page number (ovfl+1). If that guess turns 
    +  ** out to be wrong, fall back to loading the data of page 
    +  ** number ovfl to determine the next page number.
    +  */
    +  if( pBt->autoVacuum ){
    +    Pgno pgno;
    +    Pgno iGuess = ovfl+1;
    +    u8 eType;
    +
    +    while( PTRMAP_ISPAGE(pBt, iGuess) || iGuess==PENDING_BYTE_PAGE(pBt) ){
    +      iGuess++;
    +    }
    +
    +    if( iGuess<=pagerPagecount(pBt) ){
    +      rc = ptrmapGet(pBt, iGuess, &eType, &pgno);
    +      if( rc==SQLITE_OK && eType==PTRMAP_OVERFLOW2 && pgno==ovfl ){
    +        next = iGuess;
    +        rc = SQLITE_DONE;
    +      }
    +    }
    +  }
    +#endif
    +
    +  assert( next==0 || rc==SQLITE_DONE );
    +  if( rc==SQLITE_OK ){
    +    rc = btreeGetPage(pBt, ovfl, &pPage, 0);
    +    assert( rc==SQLITE_OK || pPage==0 );
    +    if( rc==SQLITE_OK ){
    +      next = get4byte(pPage->aData);
    +    }
    +  }
    +
    +  *pPgnoNext = next;
    +  if( ppPage ){
    +    *ppPage = pPage;
    +  }else{
    +    releasePage(pPage);
    +  }
    +  return (rc==SQLITE_DONE ? SQLITE_OK : rc);
    +}
    +
    +/*
    +** Copy data from a buffer to a page, or from a page to a buffer.
    +**
    +** pPayload is a pointer to data stored on database page pDbPage.
    +** If argument eOp is false, then nByte bytes of data are copied
    +** from pPayload to the buffer pointed at by pBuf. If eOp is true,
    +** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
    +** of data are copied from the buffer pBuf to pPayload.
    +**
    +** SQLITE_OK is returned on success, otherwise an error code.
    +*/
    +static int copyPayload(
    +  void *pPayload,           /* Pointer to page data */
    +  void *pBuf,               /* Pointer to buffer */
    +  int nByte,                /* Number of bytes to copy */
    +  int eOp,                  /* 0 -> copy from page, 1 -> copy to page */
    +  DbPage *pDbPage           /* Page containing pPayload */
    +){
    +  if( eOp ){
    +    /* Copy data from buffer to page (a write operation) */
    +    int rc = sqlite3PagerWrite(pDbPage);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    memcpy(pPayload, pBuf, nByte);
    +  }else{
    +    /* Copy data from page to buffer (a read operation) */
    +    memcpy(pBuf, pPayload, nByte);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This function is used to read or overwrite payload information
    +** for the entry that the pCur cursor is pointing to. If the eOp
    +** parameter is 0, this is a read operation (data copied into
    +** buffer pBuf). If it is non-zero, a write (data copied from
    +** buffer pBuf).
    +**
    +** A total of "amt" bytes are read or written beginning at "offset".
    +** Data is read to or from the buffer pBuf.
    +**
    +** The content being read or written might appear on the main page
    +** or be scattered out on multiple overflow pages.
    +**
    +** If the BtCursor.isIncrblobHandle flag is set, and the current
    +** cursor entry uses one or more overflow pages, this function
    +** allocates space for and lazily popluates the overflow page-list 
    +** cache array (BtCursor.aOverflow). Subsequent calls use this
    +** cache to make seeking to the supplied offset more efficient.
    +**
    +** Once an overflow page-list cache has been allocated, it may be
    +** invalidated if some other cursor writes to the same table, or if
    +** the cursor is moved to a different row. Additionally, in auto-vacuum
    +** mode, the following events may invalidate an overflow page-list cache.
    +**
    +**   * An incremental vacuum,
    +**   * A commit in auto_vacuum="full" mode,
    +**   * Creating a table (may require moving an overflow page).
    +*/
    +static int accessPayload(
    +  BtCursor *pCur,      /* Cursor pointing to entry to read from */
    +  u32 offset,          /* Begin reading this far into payload */
    +  u32 amt,             /* Read this many bytes */
    +  unsigned char *pBuf, /* Write the bytes into this buffer */ 
    +  int eOp              /* zero to read. non-zero to write. */
    +){
    +  unsigned char *aPayload;
    +  int rc = SQLITE_OK;
    +  u32 nKey;
    +  int iIdx = 0;
    +  MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
    +  BtShared *pBt = pCur->pBt;                  /* Btree this cursor belongs to */
    +
    +  assert( pPage );
    +  assert( pCur->eState==CURSOR_VALID );
    +  assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
    +  assert( cursorHoldsMutex(pCur) );
    +
    +  getCellInfo(pCur);
    +  aPayload = pCur->info.pCell + pCur->info.nHeader;
    +  nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey);
    +
    +  if( NEVER(offset+amt > nKey+pCur->info.nData) 
    +   || &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
    +  ){
    +    /* Trying to read or write past the end of the data is an error */
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +
    +  /* Check if data must be read/written to/from the btree page itself. */
    +  if( offset<pCur->info.nLocal ){
    +    int a = amt;
    +    if( a+offset>pCur->info.nLocal ){
    +      a = pCur->info.nLocal - offset;
    +    }
    +    rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
    +    offset = 0;
    +    pBuf += a;
    +    amt -= a;
    +  }else{
    +    offset -= pCur->info.nLocal;
    +  }
    +
    +  if( rc==SQLITE_OK && amt>0 ){
    +    const u32 ovflSize = pBt->usableSize - 4;  /* Bytes content per ovfl page */
    +    Pgno nextPage;
    +
    +    nextPage = get4byte(&aPayload[pCur->info.nLocal]);
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +    /* If the isIncrblobHandle flag is set and the BtCursor.aOverflow[]
    +    ** has not been allocated, allocate it now. The array is sized at
    +    ** one entry for each overflow page in the overflow chain. The
    +    ** page number of the first overflow page is stored in aOverflow[0],
    +    ** etc. A value of 0 in the aOverflow[] array means "not yet known"
    +    ** (the cache is lazily populated).
    +    */
    +    if( pCur->isIncrblobHandle && !pCur->aOverflow ){
    +      int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;
    +      pCur->aOverflow = (Pgno *)sqlite3MallocZero(sizeof(Pgno)*nOvfl);
    +      /* nOvfl is always positive.  If it were zero, fetchPayload would have
    +      ** been used instead of this routine. */
    +      if( ALWAYS(nOvfl) && !pCur->aOverflow ){
    +        rc = SQLITE_NOMEM;
    +      }
    +    }
    +
    +    /* If the overflow page-list cache has been allocated and the
    +    ** entry for the first required overflow page is valid, skip
    +    ** directly to it.
    +    */
    +    if( pCur->aOverflow && pCur->aOverflow[offset/ovflSize] ){
    +      iIdx = (offset/ovflSize);
    +      nextPage = pCur->aOverflow[iIdx];
    +      offset = (offset%ovflSize);
    +    }
    +#endif
    +
    +    for( ; rc==SQLITE_OK && amt>0 && nextPage; iIdx++){
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +      /* If required, populate the overflow page-list cache. */
    +      if( pCur->aOverflow ){
    +        assert(!pCur->aOverflow[iIdx] || pCur->aOverflow[iIdx]==nextPage);
    +        pCur->aOverflow[iIdx] = nextPage;
    +      }
    +#endif
    +
    +      if( offset>=ovflSize ){
    +        /* The only reason to read this page is to obtain the page
    +        ** number for the next page in the overflow chain. The page
    +        ** data is not required. So first try to lookup the overflow
    +        ** page-list cache, if any, then fall back to the getOverflowPage()
    +        ** function.
    +        */
    +#ifndef SQLITE_OMIT_INCRBLOB
    +        if( pCur->aOverflow && pCur->aOverflow[iIdx+1] ){
    +          nextPage = pCur->aOverflow[iIdx+1];
    +        } else 
    +#endif
    +          rc = getOverflowPage(pBt, nextPage, 0, &nextPage);
    +        offset -= ovflSize;
    +      }else{
    +        /* Need to read this page properly. It contains some of the
    +        ** range of data that is being read (eOp==0) or written (eOp!=0).
    +        */
    +        DbPage *pDbPage;
    +        int a = amt;
    +        rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage);
    +        if( rc==SQLITE_OK ){
    +          aPayload = sqlite3PagerGetData(pDbPage);
    +          nextPage = get4byte(aPayload);
    +          if( a + offset > ovflSize ){
    +            a = ovflSize - offset;
    +          }
    +          rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
    +          sqlite3PagerUnref(pDbPage);
    +          offset = 0;
    +          amt -= a;
    +          pBuf += a;
    +        }
    +      }
    +    }
    +  }
    +
    +  if( rc==SQLITE_OK && amt>0 ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Read part of the key associated with cursor pCur.  Exactly
    +** "amt" bytes will be transfered into pBuf[].  The transfer
    +** begins at "offset".
    +**
    +** The caller must ensure that pCur is pointing to a valid row
    +** in the table.
    +**
    +** Return SQLITE_OK on success or an error code if anything goes
    +** wrong.  An error is returned if "offset+amt" is larger than
    +** the available payload.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
    +  assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
    +  return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
    +}
    +
    +/*
    +** Read part of the data associated with cursor pCur.  Exactly
    +** "amt" bytes will be transfered into pBuf[].  The transfer
    +** begins at "offset".
    +**
    +** Return SQLITE_OK on success or an error code if anything goes
    +** wrong.  An error is returned if "offset+amt" is larger than
    +** the available payload.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
    +  int rc;
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +  if ( pCur->eState==CURSOR_INVALID ){
    +    return SQLITE_ABORT;
    +  }
    +#endif
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  rc = restoreCursorPosition(pCur);
    +  if( rc==SQLITE_OK ){
    +    assert( pCur->eState==CURSOR_VALID );
    +    assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
    +    assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
    +    rc = accessPayload(pCur, offset, amt, pBuf, 0);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return a pointer to payload information from the entry that the 
    +** pCur cursor is pointing to.  The pointer is to the beginning of
    +** the key if skipKey==0 and it points to the beginning of data if
    +** skipKey==1.  The number of bytes of available key/data is written
    +** into *pAmt.  If *pAmt==0, then the value returned will not be
    +** a valid pointer.
    +**
    +** This routine is an optimization.  It is common for the entire key
    +** and data to fit on the local page and for there to be no overflow
    +** pages.  When that is so, this routine can be used to access the
    +** key and data without making a copy.  If the key and/or data spills
    +** onto overflow pages, then accessPayload() must be used to reassemble
    +** the key/data and copy it into a preallocated buffer.
    +**
    +** The pointer returned by this routine looks directly into the cached
    +** page of the database.  The data might change or move the next time
    +** any btree routine is called.
    +*/
    +static const unsigned char *fetchPayload(
    +  BtCursor *pCur,      /* Cursor pointing to entry to read from */
    +  int *pAmt,           /* Write the number of available bytes here */
    +  int skipKey          /* read beginning at data if this is true */
    +){
    +  unsigned char *aPayload;
    +  MemPage *pPage;
    +  u32 nKey;
    +  u32 nLocal;
    +
    +  assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
    +  assert( pCur->eState==CURSOR_VALID );
    +  assert( cursorHoldsMutex(pCur) );
    +  pPage = pCur->apPage[pCur->iPage];
    +  assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
    +  if( NEVER(pCur->info.nSize==0) ){
    +    btreeParseCell(pCur->apPage[pCur->iPage], pCur->aiIdx[pCur->iPage],
    +                   &pCur->info);
    +  }
    +  aPayload = pCur->info.pCell;
    +  aPayload += pCur->info.nHeader;
    +  if( pPage->intKey ){
    +    nKey = 0;
    +  }else{
    +    nKey = (int)pCur->info.nKey;
    +  }
    +  if( skipKey ){
    +    aPayload += nKey;
    +    nLocal = pCur->info.nLocal - nKey;
    +  }else{
    +    nLocal = pCur->info.nLocal;
    +    assert( nLocal<=nKey );
    +  }
    +  *pAmt = nLocal;
    +  return aPayload;
    +}
    +
    +
    +/*
    +** For the entry that cursor pCur is point to, return as
    +** many bytes of the key or data as are available on the local
    +** b-tree page.  Write the number of available bytes into *pAmt.
    +**
    +** The pointer returned is ephemeral.  The key/data may move
    +** or be destroyed on the next call to any Btree routine,
    +** including calls from other threads against the same cache.
    +** Hence, a mutex on the BtShared should be held prior to calling
    +** this routine.
    +**
    +** These routines is used to get quick access to key and data
    +** in the common case where no overflow pages are used.
    +*/
    +SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
    +  const void *p = 0;
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +  assert( cursorHoldsMutex(pCur) );
    +  if( ALWAYS(pCur->eState==CURSOR_VALID) ){
    +    p = (const void*)fetchPayload(pCur, pAmt, 0);
    +  }
    +  return p;
    +}
    +SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, int *pAmt){
    +  const void *p = 0;
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +  assert( cursorHoldsMutex(pCur) );
    +  if( ALWAYS(pCur->eState==CURSOR_VALID) ){
    +    p = (const void*)fetchPayload(pCur, pAmt, 1);
    +  }
    +  return p;
    +}
    +
    +
    +/*
    +** Move the cursor down to a new child page.  The newPgno argument is the
    +** page number of the child page to move to.
    +**
    +** This function returns SQLITE_CORRUPT if the page-header flags field of
    +** the new child page does not match the flags field of the parent (i.e.
    +** if an intkey page appears to be the parent of a non-intkey page, or
    +** vice-versa).
    +*/
    +static int moveToChild(BtCursor *pCur, u32 newPgno){
    +  int rc;
    +  int i = pCur->iPage;
    +  MemPage *pNewPage;
    +  BtShared *pBt = pCur->pBt;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
    +  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  rc = getAndInitPage(pBt, newPgno, &pNewPage);
    +  if( rc ) return rc;
    +  pCur->apPage[i+1] = pNewPage;
    +  pCur->aiIdx[i+1] = 0;
    +  pCur->iPage++;
    +
    +  pCur->info.nSize = 0;
    +  pCur->validNKey = 0;
    +  if( pNewPage->nCell<1 || pNewPage->intKey!=pCur->apPage[i]->intKey ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** Page pParent is an internal (non-leaf) tree page. This function 
    +** asserts that page number iChild is the left-child if the iIdx'th
    +** cell in page pParent. Or, if iIdx is equal to the total number of
    +** cells in pParent, that page number iChild is the right-child of
    +** the page.
    +*/
    +static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
    +  assert( iIdx<=pParent->nCell );
    +  if( iIdx==pParent->nCell ){
    +    assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
    +  }else{
    +    assert( get4byte(findCell(pParent, iIdx))==iChild );
    +  }
    +}
    +#else
    +#  define assertParentIndex(x,y,z) 
    +#endif
    +
    +/*
    +** Move the cursor up to the parent page.
    +**
    +** pCur->idx is set to the cell index that contains the pointer
    +** to the page we are coming from.  If we are coming from the
    +** right-most child page then pCur->idx is set to one more than
    +** the largest cell index.
    +*/
    +static void moveToParent(BtCursor *pCur){
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  assert( pCur->iPage>0 );
    +  assert( pCur->apPage[pCur->iPage] );
    +  assertParentIndex(
    +    pCur->apPage[pCur->iPage-1], 
    +    pCur->aiIdx[pCur->iPage-1], 
    +    pCur->apPage[pCur->iPage]->pgno
    +  );
    +  releasePage(pCur->apPage[pCur->iPage]);
    +  pCur->iPage--;
    +  pCur->info.nSize = 0;
    +  pCur->validNKey = 0;
    +}
    +
    +/*
    +** Move the cursor to point to the root page of its b-tree structure.
    +**
    +** If the table has a virtual root page, then the cursor is moved to point
    +** to the virtual root page instead of the actual root page. A table has a
    +** virtual root page when the actual root page contains no cells and a 
    +** single child page. This can only happen with the table rooted at page 1.
    +**
    +** If the b-tree structure is empty, the cursor state is set to 
    +** CURSOR_INVALID. Otherwise, the cursor is set to point to the first
    +** cell located on the root (or virtual root) page and the cursor state
    +** is set to CURSOR_VALID.
    +**
    +** If this function returns successfully, it may be assumed that the
    +** page-header flags indicate that the [virtual] root-page is the expected 
    +** kind of b-tree page (i.e. if when opening the cursor the caller did not
    +** specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,
    +** indicating a table b-tree, or if the caller did specify a KeyInfo 
    +** structure the flags byte is set to 0x02 or 0x0A, indicating an index
    +** b-tree).
    +*/
    +static int moveToRoot(BtCursor *pCur){
    +  MemPage *pRoot;
    +  int rc = SQLITE_OK;
    +  Btree *p = pCur->pBtree;
    +  BtShared *pBt = p->pBt;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( CURSOR_INVALID < CURSOR_REQUIRESEEK );
    +  assert( CURSOR_VALID   < CURSOR_REQUIRESEEK );
    +  assert( CURSOR_FAULT   > CURSOR_REQUIRESEEK );
    +  if( pCur->eState>=CURSOR_REQUIRESEEK ){
    +    if( pCur->eState==CURSOR_FAULT ){
    +      assert( pCur->skipNext!=SQLITE_OK );
    +      return pCur->skipNext;
    +    }
    +    sqlite3BtreeClearCursor(pCur);
    +  }
    +
    +  if( pCur->iPage>=0 ){
    +    int i;
    +    for(i=1; i<=pCur->iPage; i++){
    +      releasePage(pCur->apPage[i]);
    +    }
    +    pCur->iPage = 0;
    +  }else{
    +    rc = getAndInitPage(pBt, pCur->pgnoRoot, &pCur->apPage[0]);
    +    if( rc!=SQLITE_OK ){
    +      pCur->eState = CURSOR_INVALID;
    +      return rc;
    +    }
    +    pCur->iPage = 0;
    +
    +    /* If pCur->pKeyInfo is not NULL, then the caller that opened this cursor
    +    ** expected to open it on an index b-tree. Otherwise, if pKeyInfo is
    +    ** NULL, the caller expects a table b-tree. If this is not the case,
    +    ** return an SQLITE_CORRUPT error.  */
    +    assert( pCur->apPage[0]->intKey==1 || pCur->apPage[0]->intKey==0 );
    +    if( (pCur->pKeyInfo==0)!=pCur->apPage[0]->intKey ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +  }
    +
    +  /* Assert that the root page is of the correct type. This must be the
    +  ** case as the call to this function that loaded the root-page (either
    +  ** this call or a previous invocation) would have detected corruption 
    +  ** if the assumption were not true, and it is not possible for the flags 
    +  ** byte to have been modified while this cursor is holding a reference
    +  ** to the page.  */
    +  pRoot = pCur->apPage[0];
    +  assert( pRoot->pgno==pCur->pgnoRoot );
    +  assert( pRoot->isInit && (pCur->pKeyInfo==0)==pRoot->intKey );
    +
    +  pCur->aiIdx[0] = 0;
    +  pCur->info.nSize = 0;
    +  pCur->atLast = 0;
    +  pCur->validNKey = 0;
    +
    +  if( pRoot->nCell==0 && !pRoot->leaf ){
    +    Pgno subpage;
    +    if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;
    +    subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
    +    pCur->eState = CURSOR_VALID;
    +    rc = moveToChild(pCur, subpage);
    +  }else{
    +    pCur->eState = ((pRoot->nCell>0)?CURSOR_VALID:CURSOR_INVALID);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Move the cursor down to the left-most leaf entry beneath the
    +** entry to which it is currently pointing.
    +**
    +** The left-most leaf is the one with the smallest key - the first
    +** in ascending order.
    +*/
    +static int moveToLeftmost(BtCursor *pCur){
    +  Pgno pgno;
    +  int rc = SQLITE_OK;
    +  MemPage *pPage;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
    +    assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
    +    pgno = get4byte(findCell(pPage, pCur->aiIdx[pCur->iPage]));
    +    rc = moveToChild(pCur, pgno);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Move the cursor down to the right-most leaf entry beneath the
    +** page to which it is currently pointing.  Notice the difference
    +** between moveToLeftmost() and moveToRightmost().  moveToLeftmost()
    +** finds the left-most entry beneath the *entry* whereas moveToRightmost()
    +** finds the right-most entry beneath the *page*.
    +**
    +** The right-most entry is the one with the largest key - the last
    +** key in ascending order.
    +*/
    +static int moveToRightmost(BtCursor *pCur){
    +  Pgno pgno;
    +  int rc = SQLITE_OK;
    +  MemPage *pPage = 0;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->eState==CURSOR_VALID );
    +  while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
    +    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    +    pCur->aiIdx[pCur->iPage] = pPage->nCell;
    +    rc = moveToChild(pCur, pgno);
    +  }
    +  if( rc==SQLITE_OK ){
    +    pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
    +    pCur->info.nSize = 0;
    +    pCur->validNKey = 0;
    +  }
    +  return rc;
    +}
    +
    +/* Move the cursor to the first entry in the table.  Return SQLITE_OK
    +** on success.  Set *pRes to 0 if the cursor actually points to something
    +** or set *pRes to 1 if the table is empty.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
    +  int rc;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +  rc = moveToRoot(pCur);
    +  if( rc==SQLITE_OK ){
    +    if( pCur->eState==CURSOR_INVALID ){
    +      assert( pCur->apPage[pCur->iPage]->nCell==0 );
    +      *pRes = 1;
    +      rc = SQLITE_OK;
    +    }else{
    +      assert( pCur->apPage[pCur->iPage]->nCell>0 );
    +      *pRes = 0;
    +      rc = moveToLeftmost(pCur);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/* Move the cursor to the last entry in the table.  Return SQLITE_OK
    +** on success.  Set *pRes to 0 if the cursor actually points to something
    +** or set *pRes to 1 if the table is empty.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
    +  int rc;
    + 
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +
    +  /* If the cursor already points to the last entry, this is a no-op. */
    +  if( CURSOR_VALID==pCur->eState && pCur->atLast ){
    +#ifdef SQLITE_DEBUG
    +    /* This block serves to assert() that the cursor really does point 
    +    ** to the last entry in the b-tree. */
    +    int ii;
    +    for(ii=0; ii<pCur->iPage; ii++){
    +      assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
    +    }
    +    assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
    +    assert( pCur->apPage[pCur->iPage]->leaf );
    +#endif
    +    return SQLITE_OK;
    +  }
    +
    +  rc = moveToRoot(pCur);
    +  if( rc==SQLITE_OK ){
    +    if( CURSOR_INVALID==pCur->eState ){
    +      assert( pCur->apPage[pCur->iPage]->nCell==0 );
    +      *pRes = 1;
    +    }else{
    +      assert( pCur->eState==CURSOR_VALID );
    +      *pRes = 0;
    +      rc = moveToRightmost(pCur);
    +      pCur->atLast = rc==SQLITE_OK ?1:0;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/* Move the cursor so that it points to an entry near the key 
    +** specified by pIdxKey or intKey.   Return a success code.
    +**
    +** For INTKEY tables, the intKey parameter is used.  pIdxKey 
    +** must be NULL.  For index tables, pIdxKey is used and intKey
    +** is ignored.
    +**
    +** If an exact match is not found, then the cursor is always
    +** left pointing at a leaf page which would hold the entry if it
    +** were present.  The cursor might point to an entry that comes
    +** before or after the key.
    +**
    +** An integer is written into *pRes which is the result of
    +** comparing the key with the entry to which the cursor is 
    +** pointing.  The meaning of the integer written into
    +** *pRes is as follows:
    +**
    +**     *pRes<0      The cursor is left pointing at an entry that
    +**                  is smaller than intKey/pIdxKey or if the table is empty
    +**                  and the cursor is therefore left point to nothing.
    +**
    +**     *pRes==0     The cursor is left pointing at an entry that
    +**                  exactly matches intKey/pIdxKey.
    +**
    +**     *pRes>0      The cursor is left pointing at an entry that
    +**                  is larger than intKey/pIdxKey.
    +**
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
    +  BtCursor *pCur,          /* The cursor to be moved */
    +  UnpackedRecord *pIdxKey, /* Unpacked index key */
    +  i64 intKey,              /* The table key */
    +  int biasRight,           /* If true, bias the search to the high end */
    +  int *pRes                /* Write search results here */
    +){
    +  int rc;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +  assert( pRes );
    +  assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
    +
    +  /* If the cursor is already positioned at the point we are trying
    +  ** to move to, then just return without doing any work */
    +  if( pCur->eState==CURSOR_VALID && pCur->validNKey 
    +   && pCur->apPage[0]->intKey 
    +  ){
    +    if( pCur->info.nKey==intKey ){
    +      *pRes = 0;
    +      return SQLITE_OK;
    +    }
    +    if( pCur->atLast && pCur->info.nKey<intKey ){
    +      *pRes = -1;
    +      return SQLITE_OK;
    +    }
    +  }
    +
    +  rc = moveToRoot(pCur);
    +  if( rc ){
    +    return rc;
    +  }
    +  assert( pCur->apPage[pCur->iPage] );
    +  assert( pCur->apPage[pCur->iPage]->isInit );
    +  assert( pCur->apPage[pCur->iPage]->nCell>0 || pCur->eState==CURSOR_INVALID );
    +  if( pCur->eState==CURSOR_INVALID ){
    +    *pRes = -1;
    +    assert( pCur->apPage[pCur->iPage]->nCell==0 );
    +    return SQLITE_OK;
    +  }
    +  assert( pCur->apPage[0]->intKey || pIdxKey );
    +  for(;;){
    +    int lwr, upr;
    +    Pgno chldPg;
    +    MemPage *pPage = pCur->apPage[pCur->iPage];
    +    int c;
    +
    +    /* pPage->nCell must be greater than zero. If this is the root-page
    +    ** the cursor would have been INVALID above and this for(;;) loop
    +    ** not run. If this is not the root-page, then the moveToChild() routine
    +    ** would have already detected db corruption. Similarly, pPage must
    +    ** be the right kind (index or table) of b-tree page. Otherwise
    +    ** a moveToChild() or moveToRoot() call would have detected corruption.  */
    +    assert( pPage->nCell>0 );
    +    assert( pPage->intKey==(pIdxKey==0) );
    +    lwr = 0;
    +    upr = pPage->nCell-1;
    +    if( biasRight ){
    +      pCur->aiIdx[pCur->iPage] = (u16)upr;
    +    }else{
    +      pCur->aiIdx[pCur->iPage] = (u16)((upr+lwr)/2);
    +    }
    +    for(;;){
    +      int idx = pCur->aiIdx[pCur->iPage]; /* Index of current cell in pPage */
    +      u8 *pCell;                          /* Pointer to current cell in pPage */
    +
    +      pCur->info.nSize = 0;
    +      pCell = findCell(pPage, idx) + pPage->childPtrSize;
    +      if( pPage->intKey ){
    +        i64 nCellKey;
    +        if( pPage->hasData ){
    +          u32 dummy;
    +          pCell += getVarint32(pCell, dummy);
    +        }
    +        getVarint(pCell, (u64*)&nCellKey);
    +        if( nCellKey==intKey ){
    +          c = 0;
    +        }else if( nCellKey<intKey ){
    +          c = -1;
    +        }else{
    +          assert( nCellKey>intKey );
    +          c = +1;
    +        }
    +        pCur->validNKey = 1;
    +        pCur->info.nKey = nCellKey;
    +      }else{
    +        /* The maximum supported page-size is 32768 bytes. This means that
    +        ** the maximum number of record bytes stored on an index B-Tree
    +        ** page is at most 8198 bytes, which may be stored as a 2-byte
    +        ** varint. This information is used to attempt to avoid parsing 
    +        ** the entire cell by checking for the cases where the record is 
    +        ** stored entirely within the b-tree page by inspecting the first 
    +        ** 2 bytes of the cell.
    +        */
    +        int nCell = pCell[0];
    +        if( !(nCell & 0x80) && nCell<=pPage->maxLocal ){
    +          /* This branch runs if the record-size field of the cell is a
    +          ** single byte varint and the record fits entirely on the main
    +          ** b-tree page.  */
    +          c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
    +        }else if( !(pCell[1] & 0x80) 
    +          && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
    +        ){
    +          /* The record-size field is a 2 byte varint and the record 
    +          ** fits entirely on the main b-tree page.  */
    +          c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
    +        }else{
    +          /* The record flows over onto one or more overflow pages. In
    +          ** this case the whole cell needs to be parsed, a buffer allocated
    +          ** and accessPayload() used to retrieve the record into the
    +          ** buffer before VdbeRecordCompare() can be called. */
    +          void *pCellKey;
    +          u8 * const pCellBody = pCell - pPage->childPtrSize;
    +          btreeParseCellPtr(pPage, pCellBody, &pCur->info);
    +          nCell = (int)pCur->info.nKey;
    +          pCellKey = sqlite3Malloc( nCell );
    +          if( pCellKey==0 ){
    +            rc = SQLITE_NOMEM;
    +            goto moveto_finish;
    +          }
    +          rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
    +          if( rc ){
    +            sqlite3_free(pCellKey);
    +            goto moveto_finish;
    +          }
    +          c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
    +          sqlite3_free(pCellKey);
    +        }
    +      }
    +      if( c==0 ){
    +        if( pPage->intKey && !pPage->leaf ){
    +          lwr = idx;
    +          upr = lwr - 1;
    +          break;
    +        }else{
    +          *pRes = 0;
    +          rc = SQLITE_OK;
    +          goto moveto_finish;
    +        }
    +      }
    +      if( c<0 ){
    +        lwr = idx+1;
    +      }else{
    +        upr = idx-1;
    +      }
    +      if( lwr>upr ){
    +        break;
    +      }
    +      pCur->aiIdx[pCur->iPage] = (u16)((lwr+upr)/2);
    +    }
    +    assert( lwr==upr+1 );
    +    assert( pPage->isInit );
    +    if( pPage->leaf ){
    +      chldPg = 0;
    +    }else if( lwr>=pPage->nCell ){
    +      chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    +    }else{
    +      chldPg = get4byte(findCell(pPage, lwr));
    +    }
    +    if( chldPg==0 ){
    +      assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
    +      *pRes = c;
    +      rc = SQLITE_OK;
    +      goto moveto_finish;
    +    }
    +    pCur->aiIdx[pCur->iPage] = (u16)lwr;
    +    pCur->info.nSize = 0;
    +    pCur->validNKey = 0;
    +    rc = moveToChild(pCur, chldPg);
    +    if( rc ) goto moveto_finish;
    +  }
    +moveto_finish:
    +  return rc;
    +}
    +
    +
    +/*
    +** Return TRUE if the cursor is not pointing at an entry of the table.
    +**
    +** TRUE will be returned after a call to sqlite3BtreeNext() moves
    +** past the last entry in the table or sqlite3BtreePrev() moves past
    +** the first entry.  TRUE is also returned if the table is empty.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor *pCur){
    +  /* TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries
    +  ** have been deleted? This API will need to change to return an error code
    +  ** as well as the boolean result value.
    +  */
    +  return (CURSOR_VALID!=pCur->eState);
    +}
    +
    +/*
    +** Advance the cursor to the next entry in the database.  If
    +** successful then set *pRes=0.  If the cursor
    +** was already pointing to the last entry in the database before
    +** this routine was called, then set *pRes=1.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
    +  int rc;
    +  int idx;
    +  MemPage *pPage;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  rc = restoreCursorPosition(pCur);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +  assert( pRes!=0 );
    +  if( CURSOR_INVALID==pCur->eState ){
    +    *pRes = 1;
    +    return SQLITE_OK;
    +  }
    +  if( pCur->skipNext>0 ){
    +    pCur->skipNext = 0;
    +    *pRes = 0;
    +    return SQLITE_OK;
    +  }
    +  pCur->skipNext = 0;
    +
    +  pPage = pCur->apPage[pCur->iPage];
    +  idx = ++pCur->aiIdx[pCur->iPage];
    +  assert( pPage->isInit );
    +  assert( idx<=pPage->nCell );
    +
    +  pCur->info.nSize = 0;
    +  pCur->validNKey = 0;
    +  if( idx>=pPage->nCell ){
    +    if( !pPage->leaf ){
    +      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
    +      if( rc ) return rc;
    +      rc = moveToLeftmost(pCur);
    +      *pRes = 0;
    +      return rc;
    +    }
    +    do{
    +      if( pCur->iPage==0 ){
    +        *pRes = 1;
    +        pCur->eState = CURSOR_INVALID;
    +        return SQLITE_OK;
    +      }
    +      moveToParent(pCur);
    +      pPage = pCur->apPage[pCur->iPage];
    +    }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
    +    *pRes = 0;
    +    if( pPage->intKey ){
    +      rc = sqlite3BtreeNext(pCur, pRes);
    +    }else{
    +      rc = SQLITE_OK;
    +    }
    +    return rc;
    +  }
    +  *pRes = 0;
    +  if( pPage->leaf ){
    +    return SQLITE_OK;
    +  }
    +  rc = moveToLeftmost(pCur);
    +  return rc;
    +}
    +
    +
    +/*
    +** Step the cursor to the back to the previous entry in the database.  If
    +** successful then set *pRes=0.  If the cursor
    +** was already pointing to the first entry in the database before
    +** this routine was called, then set *pRes=1.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
    +  int rc;
    +  MemPage *pPage;
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  rc = restoreCursorPosition(pCur);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +  pCur->atLast = 0;
    +  if( CURSOR_INVALID==pCur->eState ){
    +    *pRes = 1;
    +    return SQLITE_OK;
    +  }
    +  if( pCur->skipNext<0 ){
    +    pCur->skipNext = 0;
    +    *pRes = 0;
    +    return SQLITE_OK;
    +  }
    +  pCur->skipNext = 0;
    +
    +  pPage = pCur->apPage[pCur->iPage];
    +  assert( pPage->isInit );
    +  if( !pPage->leaf ){
    +    int idx = pCur->aiIdx[pCur->iPage];
    +    rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
    +    if( rc ){
    +      return rc;
    +    }
    +    rc = moveToRightmost(pCur);
    +  }else{
    +    while( pCur->aiIdx[pCur->iPage]==0 ){
    +      if( pCur->iPage==0 ){
    +        pCur->eState = CURSOR_INVALID;
    +        *pRes = 1;
    +        return SQLITE_OK;
    +      }
    +      moveToParent(pCur);
    +    }
    +    pCur->info.nSize = 0;
    +    pCur->validNKey = 0;
    +
    +    pCur->aiIdx[pCur->iPage]--;
    +    pPage = pCur->apPage[pCur->iPage];
    +    if( pPage->intKey && !pPage->leaf ){
    +      rc = sqlite3BtreePrevious(pCur, pRes);
    +    }else{
    +      rc = SQLITE_OK;
    +    }
    +  }
    +  *pRes = 0;
    +  return rc;
    +}
    +
    +/*
    +** Allocate a new page from the database file.
    +**
    +** The new page is marked as dirty.  (In other words, sqlite3PagerWrite()
    +** has already been called on the new page.)  The new page has also
    +** been referenced and the calling routine is responsible for calling
    +** sqlite3PagerUnref() on the new page when it is done.
    +**
    +** SQLITE_OK is returned on success.  Any other return value indicates
    +** an error.  *ppPage and *pPgno are undefined in the event of an error.
    +** Do not invoke sqlite3PagerUnref() on *ppPage if an error is returned.
    +**
    +** If the "nearby" parameter is not 0, then a (feeble) effort is made to 
    +** locate a page close to the page number "nearby".  This can be used in an
    +** attempt to keep related pages close to each other in the database file,
    +** which in turn can make database access faster.
    +**
    +** If the "exact" parameter is not 0, and the page-number nearby exists 
    +** anywhere on the free-list, then it is guarenteed to be returned. This
    +** is only used by auto-vacuum databases when allocating a new table.
    +*/
    +static int allocateBtreePage(
    +  BtShared *pBt, 
    +  MemPage **ppPage, 
    +  Pgno *pPgno, 
    +  Pgno nearby,
    +  u8 exact
    +){
    +  MemPage *pPage1;
    +  int rc;
    +  u32 n;     /* Number of pages on the freelist */
    +  u32 k;     /* Number of leaves on the trunk of the freelist */
    +  MemPage *pTrunk = 0;
    +  MemPage *pPrevTrunk = 0;
    +  Pgno mxPage;     /* Total size of the database file */
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  pPage1 = pBt->pPage1;
    +  mxPage = pagerPagecount(pBt);
    +  n = get4byte(&pPage1->aData[36]);
    +  testcase( n==mxPage-1 );
    +  if( n>=mxPage ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +  if( n>0 ){
    +    /* There are pages on the freelist.  Reuse one of those pages. */
    +    Pgno iTrunk;
    +    u8 searchList = 0; /* If the free-list must be searched for 'nearby' */
    +    
    +    /* If the 'exact' parameter was true and a query of the pointer-map
    +    ** shows that the page 'nearby' is somewhere on the free-list, then
    +    ** the entire-list will be searched for that page.
    +    */
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( exact && nearby<=mxPage ){
    +      u8 eType;
    +      assert( nearby>0 );
    +      assert( pBt->autoVacuum );
    +      rc = ptrmapGet(pBt, nearby, &eType, 0);
    +      if( rc ) return rc;
    +      if( eType==PTRMAP_FREEPAGE ){
    +        searchList = 1;
    +      }
    +      *pPgno = nearby;
    +    }
    +#endif
    +
    +    /* Decrement the free-list count by 1. Set iTrunk to the index of the
    +    ** first free-list trunk page. iPrevTrunk is initially 1.
    +    */
    +    rc = sqlite3PagerWrite(pPage1->pDbPage);
    +    if( rc ) return rc;
    +    put4byte(&pPage1->aData[36], n-1);
    +
    +    /* The code within this loop is run only once if the 'searchList' variable
    +    ** is not true. Otherwise, it runs once for each trunk-page on the
    +    ** free-list until the page 'nearby' is located.
    +    */
    +    do {
    +      pPrevTrunk = pTrunk;
    +      if( pPrevTrunk ){
    +        iTrunk = get4byte(&pPrevTrunk->aData[0]);
    +      }else{
    +        iTrunk = get4byte(&pPage1->aData[32]);
    +      }
    +      testcase( iTrunk==mxPage );
    +      if( iTrunk>mxPage ){
    +        rc = SQLITE_CORRUPT_BKPT;
    +      }else{
    +        rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
    +      }
    +      if( rc ){
    +        pTrunk = 0;
    +        goto end_allocate_page;
    +      }
    +
    +      k = get4byte(&pTrunk->aData[4]);
    +      if( k==0 && !searchList ){
    +        /* The trunk has no leaves and the list is not being searched. 
    +        ** So extract the trunk page itself and use it as the newly 
    +        ** allocated page */
    +        assert( pPrevTrunk==0 );
    +        rc = sqlite3PagerWrite(pTrunk->pDbPage);
    +        if( rc ){
    +          goto end_allocate_page;
    +        }
    +        *pPgno = iTrunk;
    +        memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
    +        *ppPage = pTrunk;
    +        pTrunk = 0;
    +        TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1));
    +      }else if( k>(u32)(pBt->usableSize/4 - 2) ){
    +        /* Value of k is out of range.  Database corruption */
    +        rc = SQLITE_CORRUPT_BKPT;
    +        goto end_allocate_page;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      }else if( searchList && nearby==iTrunk ){
    +        /* The list is being searched and this trunk page is the page
    +        ** to allocate, regardless of whether it has leaves.
    +        */
    +        assert( *pPgno==iTrunk );
    +        *ppPage = pTrunk;
    +        searchList = 0;
    +        rc = sqlite3PagerWrite(pTrunk->pDbPage);
    +        if( rc ){
    +          goto end_allocate_page;
    +        }
    +        if( k==0 ){
    +          if( !pPrevTrunk ){
    +            memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
    +          }else{
    +            memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
    +          }
    +        }else{
    +          /* The trunk page is required by the caller but it contains 
    +          ** pointers to free-list leaves. The first leaf becomes a trunk
    +          ** page in this case.
    +          */
    +          MemPage *pNewTrunk;
    +          Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
    +          if( iNewTrunk>mxPage ){ 
    +            rc = SQLITE_CORRUPT_BKPT;
    +            goto end_allocate_page;
    +          }
    +          testcase( iNewTrunk==mxPage );
    +          rc = btreeGetPage(pBt, iNewTrunk, &pNewTrunk, 0);
    +          if( rc!=SQLITE_OK ){
    +            goto end_allocate_page;
    +          }
    +          rc = sqlite3PagerWrite(pNewTrunk->pDbPage);
    +          if( rc!=SQLITE_OK ){
    +            releasePage(pNewTrunk);
    +            goto end_allocate_page;
    +          }
    +          memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
    +          put4byte(&pNewTrunk->aData[4], k-1);
    +          memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
    +          releasePage(pNewTrunk);
    +          if( !pPrevTrunk ){
    +            assert( sqlite3PagerIswriteable(pPage1->pDbPage) );
    +            put4byte(&pPage1->aData[32], iNewTrunk);
    +          }else{
    +            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
    +            if( rc ){
    +              goto end_allocate_page;
    +            }
    +            put4byte(&pPrevTrunk->aData[0], iNewTrunk);
    +          }
    +        }
    +        pTrunk = 0;
    +        TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1));
    +#endif
    +      }else if( k>0 ){
    +        /* Extract a leaf from the trunk */
    +        u32 closest;
    +        Pgno iPage;
    +        unsigned char *aData = pTrunk->aData;
    +        rc = sqlite3PagerWrite(pTrunk->pDbPage);
    +        if( rc ){
    +          goto end_allocate_page;
    +        }
    +        if( nearby>0 ){
    +          u32 i;
    +          int dist;
    +          closest = 0;
    +          dist = get4byte(&aData[8]) - nearby;
    +          if( dist<0 ) dist = -dist;
    +          for(i=1; i<k; i++){
    +            int d2 = get4byte(&aData[8+i*4]) - nearby;
    +            if( d2<0 ) d2 = -d2;
    +            if( d2<dist ){
    +              closest = i;
    +              dist = d2;
    +            }
    +          }
    +        }else{
    +          closest = 0;
    +        }
    +
    +        iPage = get4byte(&aData[8+closest*4]);
    +        testcase( iPage==mxPage );
    +        if( iPage>mxPage ){
    +          rc = SQLITE_CORRUPT_BKPT;
    +          goto end_allocate_page;
    +        }
    +        testcase( iPage==mxPage );
    +        if( !searchList || iPage==nearby ){
    +          int noContent;
    +          *pPgno = iPage;
    +          TRACE(("ALLOCATE: %d was leaf %d of %d on trunk %d"
    +                 ": %d more free pages\n",
    +                 *pPgno, closest+1, k, pTrunk->pgno, n-1));
    +          if( closest<k-1 ){
    +            memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
    +          }
    +          put4byte(&aData[4], k-1);
    +          assert( sqlite3PagerIswriteable(pTrunk->pDbPage) );
    +          noContent = !btreeGetHasContent(pBt, *pPgno);
    +          rc = btreeGetPage(pBt, *pPgno, ppPage, noContent);
    +          if( rc==SQLITE_OK ){
    +            rc = sqlite3PagerWrite((*ppPage)->pDbPage);
    +            if( rc!=SQLITE_OK ){
    +              releasePage(*ppPage);
    +            }
    +          }
    +          searchList = 0;
    +        }
    +      }
    +      releasePage(pPrevTrunk);
    +      pPrevTrunk = 0;
    +    }while( searchList );
    +  }else{
    +    /* There are no pages on the freelist, so create a new page at the
    +    ** end of the file */
    +    int nPage = pagerPagecount(pBt);
    +    *pPgno = nPage + 1;
    +
    +    if( *pPgno==PENDING_BYTE_PAGE(pBt) ){
    +      (*pPgno)++;
    +    }
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pBt->autoVacuum && PTRMAP_ISPAGE(pBt, *pPgno) ){
    +      /* If *pPgno refers to a pointer-map page, allocate two new pages
    +      ** at the end of the file instead of one. The first allocated page
    +      ** becomes a new pointer-map page, the second is used by the caller.
    +      */
    +      MemPage *pPg = 0;
    +      TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", *pPgno));
    +      assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
    +      rc = btreeGetPage(pBt, *pPgno, &pPg, 0);
    +      if( rc==SQLITE_OK ){
    +        rc = sqlite3PagerWrite(pPg->pDbPage);
    +        releasePage(pPg);
    +      }
    +      if( rc ) return rc;
    +      (*pPgno)++;
    +      if( *pPgno==PENDING_BYTE_PAGE(pBt) ){ (*pPgno)++; }
    +    }
    +#endif
    +
    +    assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
    +    rc = btreeGetPage(pBt, *pPgno, ppPage, 0);
    +    if( rc ) return rc;
    +    rc = sqlite3PagerWrite((*ppPage)->pDbPage);
    +    if( rc!=SQLITE_OK ){
    +      releasePage(*ppPage);
    +    }
    +    TRACE(("ALLOCATE: %d from end of file\n", *pPgno));
    +  }
    +
    +  assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
    +
    +end_allocate_page:
    +  releasePage(pTrunk);
    +  releasePage(pPrevTrunk);
    +  if( rc==SQLITE_OK ){
    +    if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
    +      releasePage(*ppPage);
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    (*ppPage)->isInit = 0;
    +  }else{
    +    *ppPage = 0;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** This function is used to add page iPage to the database file free-list. 
    +** It is assumed that the page is not already a part of the free-list.
    +**
    +** The value passed as the second argument to this function is optional.
    +** If the caller happens to have a pointer to the MemPage object 
    +** corresponding to page iPage handy, it may pass it as the second value. 
    +** Otherwise, it may pass NULL.
    +**
    +** If a pointer to a MemPage object is passed as the second argument,
    +** its reference count is not altered by this function.
    +*/
    +static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
    +  MemPage *pTrunk = 0;                /* Free-list trunk page */
    +  Pgno iTrunk = 0;                    /* Page number of free-list trunk page */ 
    +  MemPage *pPage1 = pBt->pPage1;      /* Local reference to page 1 */
    +  MemPage *pPage;                     /* Page being freed. May be NULL. */
    +  int rc;                             /* Return Code */
    +  int nFree;                          /* Initial number of pages on free-list */
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( iPage>1 );
    +  assert( !pMemPage || pMemPage->pgno==iPage );
    +
    +  if( pMemPage ){
    +    pPage = pMemPage;
    +    sqlite3PagerRef(pPage->pDbPage);
    +  }else{
    +    pPage = btreePageLookup(pBt, iPage);
    +  }
    +
    +  /* Increment the free page count on pPage1 */
    +  rc = sqlite3PagerWrite(pPage1->pDbPage);
    +  if( rc ) goto freepage_out;
    +  nFree = get4byte(&pPage1->aData[36]);
    +  put4byte(&pPage1->aData[36], nFree+1);
    +
    +#ifdef SQLITE_SECURE_DELETE
    +  /* If the SQLITE_SECURE_DELETE compile-time option is enabled, then
    +  ** always fully overwrite deleted information with zeros.
    +  */
    +  if( (!pPage && (rc = btreeGetPage(pBt, iPage, &pPage, 0)))
    +   ||            (rc = sqlite3PagerWrite(pPage->pDbPage))
    +  ){
    +    goto freepage_out;
    +  }
    +  memset(pPage->aData, 0, pPage->pBt->pageSize);
    +#endif
    +
    +  /* If the database supports auto-vacuum, write an entry in the pointer-map
    +  ** to indicate that the page is free.
    +  */
    +  if( ISAUTOVACUUM ){
    +    ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc);
    +    if( rc ) goto freepage_out;
    +  }
    +
    +  /* Now manipulate the actual database free-list structure. There are two
    +  ** possibilities. If the free-list is currently empty, or if the first
    +  ** trunk page in the free-list is full, then this page will become a
    +  ** new free-list trunk page. Otherwise, it will become a leaf of the
    +  ** first trunk page in the current free-list. This block tests if it
    +  ** is possible to add the page as a new free-list leaf.
    +  */
    +  if( nFree!=0 ){
    +    u32 nLeaf;                /* Initial number of leaf cells on trunk page */
    +
    +    iTrunk = get4byte(&pPage1->aData[32]);
    +    rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
    +    if( rc!=SQLITE_OK ){
    +      goto freepage_out;
    +    }
    +
    +    nLeaf = get4byte(&pTrunk->aData[4]);
    +    assert( pBt->usableSize>32 );
    +    if( nLeaf > (u32)pBt->usableSize/4 - 2 ){
    +      rc = SQLITE_CORRUPT_BKPT;
    +      goto freepage_out;
    +    }
    +    if( nLeaf < (u32)pBt->usableSize/4 - 8 ){
    +      /* In this case there is room on the trunk page to insert the page
    +      ** being freed as a new leaf.
    +      **
    +      ** Note that the trunk page is not really full until it contains
    +      ** usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have
    +      ** coded.  But due to a coding error in versions of SQLite prior to
    +      ** 3.6.0, databases with freelist trunk pages holding more than
    +      ** usableSize/4 - 8 entries will be reported as corrupt.  In order
    +      ** to maintain backwards compatibility with older versions of SQLite,
    +      ** we will continue to restrict the number of entries to usableSize/4 - 8
    +      ** for now.  At some point in the future (once everyone has upgraded
    +      ** to 3.6.0 or later) we should consider fixing the conditional above
    +      ** to read "usableSize/4-2" instead of "usableSize/4-8".
    +      */
    +      rc = sqlite3PagerWrite(pTrunk->pDbPage);
    +      if( rc==SQLITE_OK ){
    +        put4byte(&pTrunk->aData[4], nLeaf+1);
    +        put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
    +#ifndef SQLITE_SECURE_DELETE
    +        if( pPage ){
    +          sqlite3PagerDontWrite(pPage->pDbPage);
    +        }
    +#endif
    +        rc = btreeSetHasContent(pBt, iPage);
    +      }
    +      TRACE(("FREE-PAGE: %d leaf on trunk page %d\n",pPage->pgno,pTrunk->pgno));
    +      goto freepage_out;
    +    }
    +  }
    +
    +  /* If control flows to this point, then it was not possible to add the
    +  ** the page being freed as a leaf page of the first trunk in the free-list.
    +  ** Possibly because the free-list is empty, or possibly because the 
    +  ** first trunk in the free-list is full. Either way, the page being freed
    +  ** will become the new first trunk page in the free-list.
    +  */
    +  if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){
    +    goto freepage_out;
    +  }
    +  rc = sqlite3PagerWrite(pPage->pDbPage);
    +  if( rc!=SQLITE_OK ){
    +    goto freepage_out;
    +  }
    +  put4byte(pPage->aData, iTrunk);
    +  put4byte(&pPage->aData[4], 0);
    +  put4byte(&pPage1->aData[32], iPage);
    +  TRACE(("FREE-PAGE: %d new trunk page replacing %d\n", pPage->pgno, iTrunk));
    +
    +freepage_out:
    +  if( pPage ){
    +    pPage->isInit = 0;
    +  }
    +  releasePage(pPage);
    +  releasePage(pTrunk);
    +  return rc;
    +}
    +static void freePage(MemPage *pPage, int *pRC){
    +  if( (*pRC)==SQLITE_OK ){
    +    *pRC = freePage2(pPage->pBt, pPage, pPage->pgno);
    +  }
    +}
    +
    +/*
    +** Free any overflow pages associated with the given Cell.
    +*/
    +static int clearCell(MemPage *pPage, unsigned char *pCell){
    +  BtShared *pBt = pPage->pBt;
    +  CellInfo info;
    +  Pgno ovflPgno;
    +  int rc;
    +  int nOvfl;
    +  u16 ovflPageSize;
    +
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  btreeParseCellPtr(pPage, pCell, &info);
    +  if( info.iOverflow==0 ){
    +    return SQLITE_OK;  /* No overflow pages. Return without doing anything */
    +  }
    +  ovflPgno = get4byte(&pCell[info.iOverflow]);
    +  assert( pBt->usableSize > 4 );
    +  ovflPageSize = pBt->usableSize - 4;
    +  nOvfl = (info.nPayload - info.nLocal + ovflPageSize - 1)/ovflPageSize;
    +  assert( ovflPgno==0 || nOvfl>0 );
    +  while( nOvfl-- ){
    +    Pgno iNext = 0;
    +    MemPage *pOvfl = 0;
    +    if( ovflPgno<2 || ovflPgno>pagerPagecount(pBt) ){
    +      /* 0 is not a legal page number and page 1 cannot be an 
    +      ** overflow page. Therefore if ovflPgno<2 or past the end of the 
    +      ** file the database must be corrupt. */
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    if( nOvfl ){
    +      rc = getOverflowPage(pBt, ovflPgno, &pOvfl, &iNext);
    +      if( rc ) return rc;
    +    }
    +    rc = freePage2(pBt, pOvfl, ovflPgno);
    +    if( pOvfl ){
    +      sqlite3PagerUnref(pOvfl->pDbPage);
    +    }
    +    if( rc ) return rc;
    +    ovflPgno = iNext;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Create the byte sequence used to represent a cell on page pPage
    +** and write that byte sequence into pCell[].  Overflow pages are
    +** allocated and filled in as necessary.  The calling procedure
    +** is responsible for making sure sufficient space has been allocated
    +** for pCell[].
    +**
    +** Note that pCell does not necessary need to point to the pPage->aData
    +** area.  pCell might point to some temporary storage.  The cell will
    +** be constructed in this temporary area then copied into pPage->aData
    +** later.
    +*/
    +static int fillInCell(
    +  MemPage *pPage,                /* The page that contains the cell */
    +  unsigned char *pCell,          /* Complete text of the cell */
    +  const void *pKey, i64 nKey,    /* The key */
    +  const void *pData,int nData,   /* The data */
    +  int nZero,                     /* Extra zero bytes to append to pData */
    +  int *pnSize                    /* Write cell size here */
    +){
    +  int nPayload;
    +  const u8 *pSrc;
    +  int nSrc, n, rc;
    +  int spaceLeft;
    +  MemPage *pOvfl = 0;
    +  MemPage *pToRelease = 0;
    +  unsigned char *pPrior;
    +  unsigned char *pPayload;
    +  BtShared *pBt = pPage->pBt;
    +  Pgno pgnoOvfl = 0;
    +  int nHeader;
    +  CellInfo info;
    +
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +
    +  /* pPage is not necessarily writeable since pCell might be auxiliary
    +  ** buffer space that is separate from the pPage buffer area */
    +  assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
    +            || sqlite3PagerIswriteable(pPage->pDbPage) );
    +
    +  /* Fill in the header. */
    +  nHeader = 0;
    +  if( !pPage->leaf ){
    +    nHeader += 4;
    +  }
    +  if( pPage->hasData ){
    +    nHeader += putVarint(&pCell[nHeader], nData+nZero);
    +  }else{
    +    nData = nZero = 0;
    +  }
    +  nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
    +  btreeParseCellPtr(pPage, pCell, &info);
    +  assert( info.nHeader==nHeader );
    +  assert( info.nKey==nKey );
    +  assert( info.nData==(u32)(nData+nZero) );
    +  
    +  /* Fill in the payload */
    +  nPayload = nData + nZero;
    +  if( pPage->intKey ){
    +    pSrc = pData;
    +    nSrc = nData;
    +    nData = 0;
    +  }else{ 
    +    if( NEVER(nKey>0x7fffffff || pKey==0) ){
    +      return SQLITE_CORRUPT_BKPT;
    +    }
    +    nPayload += (int)nKey;
    +    pSrc = pKey;
    +    nSrc = (int)nKey;
    +  }
    +  *pnSize = info.nSize;
    +  spaceLeft = info.nLocal;
    +  pPayload = &pCell[nHeader];
    +  pPrior = &pCell[info.iOverflow];
    +
    +  while( nPayload>0 ){
    +    if( spaceLeft==0 ){
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */
    +      if( pBt->autoVacuum ){
    +        do{
    +          pgnoOvfl++;
    +        } while( 
    +          PTRMAP_ISPAGE(pBt, pgnoOvfl) || pgnoOvfl==PENDING_BYTE_PAGE(pBt) 
    +        );
    +      }
    +#endif
    +      rc = allocateBtreePage(pBt, &pOvfl, &pgnoOvfl, pgnoOvfl, 0);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      /* If the database supports auto-vacuum, and the second or subsequent
    +      ** overflow page is being allocated, add an entry to the pointer-map
    +      ** for that page now. 
    +      **
    +      ** If this is the first overflow page, then write a partial entry 
    +      ** to the pointer-map. If we write nothing to this pointer-map slot,
    +      ** then the optimistic overflow chain processing in clearCell()
    +      ** may misinterpret the uninitialised values and delete the
    +      ** wrong pages from the database.
    +      */
    +      if( pBt->autoVacuum && rc==SQLITE_OK ){
    +        u8 eType = (pgnoPtrmap?PTRMAP_OVERFLOW2:PTRMAP_OVERFLOW1);
    +        ptrmapPut(pBt, pgnoOvfl, eType, pgnoPtrmap, &rc);
    +        if( rc ){
    +          releasePage(pOvfl);
    +        }
    +      }
    +#endif
    +      if( rc ){
    +        releasePage(pToRelease);
    +        return rc;
    +      }
    +
    +      /* If pToRelease is not zero than pPrior points into the data area
    +      ** of pToRelease.  Make sure pToRelease is still writeable. */
    +      assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
    +
    +      /* If pPrior is part of the data area of pPage, then make sure pPage
    +      ** is still writeable */
    +      assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]
    +            || sqlite3PagerIswriteable(pPage->pDbPage) );
    +
    +      put4byte(pPrior, pgnoOvfl);
    +      releasePage(pToRelease);
    +      pToRelease = pOvfl;
    +      pPrior = pOvfl->aData;
    +      put4byte(pPrior, 0);
    +      pPayload = &pOvfl->aData[4];
    +      spaceLeft = pBt->usableSize - 4;
    +    }
    +    n = nPayload;
    +    if( n>spaceLeft ) n = spaceLeft;
    +
    +    /* If pToRelease is not zero than pPayload points into the data area
    +    ** of pToRelease.  Make sure pToRelease is still writeable. */
    +    assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
    +
    +    /* If pPayload is part of the data area of pPage, then make sure pPage
    +    ** is still writeable */
    +    assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]
    +            || sqlite3PagerIswriteable(pPage->pDbPage) );
    +
    +    if( nSrc>0 ){
    +      if( n>nSrc ) n = nSrc;
    +      assert( pSrc );
    +      memcpy(pPayload, pSrc, n);
    +    }else{
    +      memset(pPayload, 0, n);
    +    }
    +    nPayload -= n;
    +    pPayload += n;
    +    pSrc += n;
    +    nSrc -= n;
    +    spaceLeft -= n;
    +    if( nSrc==0 ){
    +      nSrc = nData;
    +      pSrc = pData;
    +    }
    +  }
    +  releasePage(pToRelease);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Remove the i-th cell from pPage.  This routine effects pPage only.
    +** The cell content is not freed or deallocated.  It is assumed that
    +** the cell content has been copied someplace else.  This routine just
    +** removes the reference to the cell from pPage.
    +**
    +** "sz" must be the number of bytes in the cell.
    +*/
    +static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
    +  int i;          /* Loop counter */
    +  int pc;         /* Offset to cell content of cell being deleted */
    +  u8 *data;       /* pPage->aData */
    +  u8 *ptr;        /* Used to move bytes around within data[] */
    +  int rc;         /* The return code */
    +  int hdr;        /* Beginning of the header.  0 most pages.  100 page 1 */
    +
    +  if( *pRC ) return;
    +
    +  assert( idx>=0 && idx<pPage->nCell );
    +  assert( sz==cellSize(pPage, idx) );
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  data = pPage->aData;
    +  ptr = &data[pPage->cellOffset + 2*idx];
    +  pc = get2byte(ptr);
    +  hdr = pPage->hdrOffset;
    +  testcase( pc==get2byte(&data[hdr+5]) );
    +  testcase( pc+sz==pPage->pBt->usableSize );
    +  if( pc < get2byte(&data[hdr+5]) || pc+sz > pPage->pBt->usableSize ){
    +    *pRC = SQLITE_CORRUPT_BKPT;
    +    return;
    +  }
    +  rc = freeSpace(pPage, pc, sz);
    +  if( rc ){
    +    *pRC = rc;
    +    return;
    +  }
    +  for(i=idx+1; i<pPage->nCell; i++, ptr+=2){
    +    ptr[0] = ptr[2];
    +    ptr[1] = ptr[3];
    +  }
    +  pPage->nCell--;
    +  put2byte(&data[hdr+3], pPage->nCell);
    +  pPage->nFree += 2;
    +}
    +
    +/*
    +** Insert a new cell on pPage at cell index "i".  pCell points to the
    +** content of the cell.
    +**
    +** If the cell content will fit on the page, then put it there.  If it
    +** will not fit, then make a copy of the cell content into pTemp if
    +** pTemp is not null.  Regardless of pTemp, allocate a new entry
    +** in pPage->aOvfl[] and make it point to the cell content (either
    +** in pTemp or the original pCell) and also record its index. 
    +** Allocating a new entry in pPage->aCell[] implies that 
    +** pPage->nOverflow is incremented.
    +**
    +** If nSkip is non-zero, then do not copy the first nSkip bytes of the
    +** cell. The caller will overwrite them after this function returns. If
    +** nSkip is non-zero, then pCell may not point to an invalid memory location 
    +** (but pCell+nSkip is always valid).
    +*/
    +static void insertCell(
    +  MemPage *pPage,   /* Page into which we are copying */
    +  int i,            /* New cell becomes the i-th cell of the page */
    +  u8 *pCell,        /* Content of the new cell */
    +  int sz,           /* Bytes of content in pCell */
    +  u8 *pTemp,        /* Temp storage space for pCell, if needed */
    +  Pgno iChild,      /* If non-zero, replace first 4 bytes with this value */
    +  int *pRC          /* Read and write return code from here */
    +){
    +  int idx;          /* Where to write new cell content in data[] */
    +  int j;            /* Loop counter */
    +  int end;          /* First byte past the last cell pointer in data[] */
    +  int ins;          /* Index in data[] where new cell pointer is inserted */
    +  int cellOffset;   /* Address of first cell pointer in data[] */
    +  u8 *data;         /* The content of the whole page */
    +  u8 *ptr;          /* Used for moving information around in data[] */
    +
    +  int nSkip = (iChild ? 4 : 0);
    +
    +  if( *pRC ) return;
    +
    +  assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
    +  assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=5460 );
    +  assert( pPage->nOverflow<=ArraySize(pPage->aOvfl) );
    +  assert( sz==cellSizePtr(pPage, pCell) );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  if( pPage->nOverflow || sz+2>pPage->nFree ){
    +    if( pTemp ){
    +      memcpy(pTemp+nSkip, pCell+nSkip, sz-nSkip);
    +      pCell = pTemp;
    +    }
    +    if( iChild ){
    +      put4byte(pCell, iChild);
    +    }
    +    j = pPage->nOverflow++;
    +    assert( j<(int)(sizeof(pPage->aOvfl)/sizeof(pPage->aOvfl[0])) );
    +    pPage->aOvfl[j].pCell = pCell;
    +    pPage->aOvfl[j].idx = (u16)i;
    +  }else{
    +    int rc = sqlite3PagerWrite(pPage->pDbPage);
    +    if( rc!=SQLITE_OK ){
    +      *pRC = rc;
    +      return;
    +    }
    +    assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +    data = pPage->aData;
    +    cellOffset = pPage->cellOffset;
    +    end = cellOffset + 2*pPage->nCell;
    +    ins = cellOffset + 2*i;
    +    rc = allocateSpace(pPage, sz, &idx);
    +    if( rc ){ *pRC = rc; return; }
    +    /* The allocateSpace() routine guarantees the following two properties
    +    ** if it returns success */
    +    assert( idx >= end+2 );
    +    assert( idx+sz <= pPage->pBt->usableSize );
    +    pPage->nCell++;
    +    pPage->nFree -= (u16)(2 + sz);
    +    memcpy(&data[idx+nSkip], pCell+nSkip, sz-nSkip);
    +    if( iChild ){
    +      put4byte(&data[idx], iChild);
    +    }
    +    for(j=end, ptr=&data[j]; j>ins; j-=2, ptr-=2){
    +      ptr[0] = ptr[-2];
    +      ptr[1] = ptr[-1];
    +    }
    +    put2byte(&data[ins], idx);
    +    put2byte(&data[pPage->hdrOffset+3], pPage->nCell);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pPage->pBt->autoVacuum ){
    +      /* The cell may contain a pointer to an overflow page. If so, write
    +      ** the entry for the overflow page into the pointer map.
    +      */
    +      ptrmapPutOvflPtr(pPage, pCell, pRC);
    +    }
    +#endif
    +  }
    +}
    +
    +/*
    +** Add a list of cells to a page.  The page should be initially empty.
    +** The cells are guaranteed to fit on the page.
    +*/
    +static void assemblePage(
    +  MemPage *pPage,   /* The page to be assemblied */
    +  int nCell,        /* The number of cells to add to this page */
    +  u8 **apCell,      /* Pointers to cell bodies */
    +  u16 *aSize        /* Sizes of the cells */
    +){
    +  int i;            /* Loop counter */
    +  u8 *pCellptr;     /* Address of next cell pointer */
    +  int cellbody;     /* Address of next cell body */
    +  u8 * const data = pPage->aData;             /* Pointer to data for pPage */
    +  const int hdr = pPage->hdrOffset;           /* Offset of header on pPage */
    +  const int nUsable = pPage->pBt->usableSize; /* Usable size of page */
    +
    +  assert( pPage->nOverflow==0 );
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( nCell>=0 && nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=5460 );
    +  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
    +
    +  /* Check that the page has just been zeroed by zeroPage() */
    +  assert( pPage->nCell==0 );
    +  assert( get2byte(&data[hdr+5])==nUsable );
    +
    +  pCellptr = &data[pPage->cellOffset + nCell*2];
    +  cellbody = nUsable;
    +  for(i=nCell-1; i>=0; i--){
    +    pCellptr -= 2;
    +    cellbody -= aSize[i];
    +    put2byte(pCellptr, cellbody);
    +    memcpy(&data[cellbody], apCell[i], aSize[i]);
    +  }
    +  put2byte(&data[hdr+3], nCell);
    +  put2byte(&data[hdr+5], cellbody);
    +  pPage->nFree -= (nCell*2 + nUsable - cellbody);
    +  pPage->nCell = (u16)nCell;
    +}
    +
    +/*
    +** The following parameters determine how many adjacent pages get involved
    +** in a balancing operation.  NN is the number of neighbors on either side
    +** of the page that participate in the balancing operation.  NB is the
    +** total number of pages that participate, including the target page and
    +** NN neighbors on either side.
    +**
    +** The minimum value of NN is 1 (of course).  Increasing NN above 1
    +** (to 2 or 3) gives a modest improvement in SELECT and DELETE performance
    +** in exchange for a larger degradation in INSERT and UPDATE performance.
    +** The value of NN appears to give the best results overall.
    +*/
    +#define NN 1             /* Number of neighbors on either side of pPage */
    +#define NB (NN*2+1)      /* Total pages involved in the balance */
    +
    +
    +#ifndef SQLITE_OMIT_QUICKBALANCE
    +/*
    +** This version of balance() handles the common special case where
    +** a new entry is being inserted on the extreme right-end of the
    +** tree, in other words, when the new entry will become the largest
    +** entry in the tree.
    +**
    +** Instead of trying to balance the 3 right-most leaf pages, just add
    +** a new page to the right-hand side and put the one new entry in
    +** that page.  This leaves the right side of the tree somewhat
    +** unbalanced.  But odds are that we will be inserting new entries
    +** at the end soon afterwards so the nearly empty page will quickly
    +** fill up.  On average.
    +**
    +** pPage is the leaf page which is the right-most page in the tree.
    +** pParent is its parent.  pPage must have a single overflow entry
    +** which is also the right-most entry on the page.
    +**
    +** The pSpace buffer is used to store a temporary copy of the divider
    +** cell that will be inserted into pParent. Such a cell consists of a 4
    +** byte page number followed by a variable length integer. In other
    +** words, at most 13 bytes. Hence the pSpace buffer must be at
    +** least 13 bytes in size.
    +*/
    +static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
    +  BtShared *const pBt = pPage->pBt;    /* B-Tree Database */
    +  MemPage *pNew;                       /* Newly allocated page */
    +  int rc;                              /* Return Code */
    +  Pgno pgnoNew;                        /* Page number of pNew */
    +
    +  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    +  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
    +  assert( pPage->nOverflow==1 );
    +
    +  if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
    +
    +  /* Allocate a new page. This page will become the right-sibling of 
    +  ** pPage. Make the parent page writable, so that the new divider cell
    +  ** may be inserted. If both these operations are successful, proceed.
    +  */
    +  rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);
    +
    +  if( rc==SQLITE_OK ){
    +
    +    u8 *pOut = &pSpace[4];
    +    u8 *pCell = pPage->aOvfl[0].pCell;
    +    u16 szCell = cellSizePtr(pPage, pCell);
    +    u8 *pStop;
    +
    +    assert( sqlite3PagerIswriteable(pNew->pDbPage) );
    +    assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
    +    zeroPage(pNew, PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF);
    +    assemblePage(pNew, 1, &pCell, &szCell);
    +
    +    /* If this is an auto-vacuum database, update the pointer map
    +    ** with entries for the new page, and any pointer from the 
    +    ** cell on the page to an overflow page. If either of these
    +    ** operations fails, the return code is set, but the contents
    +    ** of the parent page are still manipulated by thh code below.
    +    ** That is Ok, at this point the parent page is guaranteed to
    +    ** be marked as dirty. Returning an error code will cause a
    +    ** rollback, undoing any changes made to the parent page.
    +    */
    +    if( ISAUTOVACUUM ){
    +      ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
    +      if( szCell>pNew->minLocal ){
    +        ptrmapPutOvflPtr(pNew, pCell, &rc);
    +      }
    +    }
    +  
    +    /* Create a divider cell to insert into pParent. The divider cell
    +    ** consists of a 4-byte page number (the page number of pPage) and
    +    ** a variable length key value (which must be the same value as the
    +    ** largest key on pPage).
    +    **
    +    ** To find the largest key value on pPage, first find the right-most 
    +    ** cell on pPage. The first two fields of this cell are the 
    +    ** record-length (a variable length integer at most 32-bits in size)
    +    ** and the key value (a variable length integer, may have any value).
    +    ** The first of the while(...) loops below skips over the record-length
    +    ** field. The second while(...) loop copies the key value from the
    +    ** cell on pPage into the pSpace buffer.
    +    */
    +    pCell = findCell(pPage, pPage->nCell-1);
    +    pStop = &pCell[9];
    +    while( (*(pCell++)&0x80) && pCell<pStop );
    +    pStop = &pCell[9];
    +    while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );
    +
    +    /* Insert the new divider cell into pParent. */
    +    insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
    +               0, pPage->pgno, &rc);
    +
    +    /* Set the right-child pointer of pParent to point to the new page. */
    +    put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
    +  
    +    /* Release the reference to the new page. */
    +    releasePage(pNew);
    +  }
    +
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_QUICKBALANCE */
    +
    +#if 0
    +/*
    +** This function does not contribute anything to the operation of SQLite.
    +** it is sometimes activated temporarily while debugging code responsible 
    +** for setting pointer-map entries.
    +*/
    +static int ptrmapCheckPages(MemPage **apPage, int nPage){
    +  int i, j;
    +  for(i=0; i<nPage; i++){
    +    Pgno n;
    +    u8 e;
    +    MemPage *pPage = apPage[i];
    +    BtShared *pBt = pPage->pBt;
    +    assert( pPage->isInit );
    +
    +    for(j=0; j<pPage->nCell; j++){
    +      CellInfo info;
    +      u8 *z;
    +     
    +      z = findCell(pPage, j);
    +      btreeParseCellPtr(pPage, z, &info);
    +      if( info.iOverflow ){
    +        Pgno ovfl = get4byte(&z[info.iOverflow]);
    +        ptrmapGet(pBt, ovfl, &e, &n);
    +        assert( n==pPage->pgno && e==PTRMAP_OVERFLOW1 );
    +      }
    +      if( !pPage->leaf ){
    +        Pgno child = get4byte(z);
    +        ptrmapGet(pBt, child, &e, &n);
    +        assert( n==pPage->pgno && e==PTRMAP_BTREE );
    +      }
    +    }
    +    if( !pPage->leaf ){
    +      Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    +      ptrmapGet(pBt, child, &e, &n);
    +      assert( n==pPage->pgno && e==PTRMAP_BTREE );
    +    }
    +  }
    +  return 1;
    +}
    +#endif
    +
    +/*
    +** This function is used to copy the contents of the b-tree node stored 
    +** on page pFrom to page pTo. If page pFrom was not a leaf page, then
    +** the pointer-map entries for each child page are updated so that the
    +** parent page stored in the pointer map is page pTo. If pFrom contained
    +** any cells with overflow page pointers, then the corresponding pointer
    +** map entries are also updated so that the parent page is page pTo.
    +**
    +** If pFrom is currently carrying any overflow cells (entries in the
    +** MemPage.aOvfl[] array), they are not copied to pTo. 
    +**
    +** Before returning, page pTo is reinitialized using btreeInitPage().
    +**
    +** The performance of this function is not critical. It is only used by 
    +** the balance_shallower() and balance_deeper() procedures, neither of
    +** which are called often under normal circumstances.
    +*/
    +static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
    +  if( (*pRC)==SQLITE_OK ){
    +    BtShared * const pBt = pFrom->pBt;
    +    u8 * const aFrom = pFrom->aData;
    +    u8 * const aTo = pTo->aData;
    +    int const iFromHdr = pFrom->hdrOffset;
    +    int const iToHdr = ((pTo->pgno==1) ? 100 : 0);
    +    TESTONLY(int rc;)
    +    int iData;
    +  
    +  
    +    assert( pFrom->isInit );
    +    assert( pFrom->nFree>=iToHdr );
    +    assert( get2byte(&aFrom[iFromHdr+5])<=pBt->usableSize );
    +  
    +    /* Copy the b-tree node content from page pFrom to page pTo. */
    +    iData = get2byte(&aFrom[iFromHdr+5]);
    +    memcpy(&aTo[iData], &aFrom[iData], pBt->usableSize-iData);
    +    memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
    +  
    +    /* Reinitialize page pTo so that the contents of the MemPage structure
    +    ** match the new data. The initialization of pTo "cannot" fail, as the
    +    ** data copied from pFrom is known to be valid.  */
    +    pTo->isInit = 0;
    +    TESTONLY(rc = ) btreeInitPage(pTo);
    +    assert( rc==SQLITE_OK );
    +  
    +    /* If this is an auto-vacuum database, update the pointer-map entries
    +    ** for any b-tree or overflow pages that pTo now contains the pointers to.
    +    */
    +    if( ISAUTOVACUUM ){
    +      *pRC = setChildPtrmaps(pTo);
    +    }
    +  }
    +}
    +
    +/*
    +** This routine redistributes cells on the iParentIdx'th child of pParent
    +** (hereafter "the page") and up to 2 siblings so that all pages have about the
    +** same amount of free space. Usually a single sibling on either side of the
    +** page are used in the balancing, though both siblings might come from one
    +** side if the page is the first or last child of its parent. If the page 
    +** has fewer than 2 siblings (something which can only happen if the page
    +** is a root page or a child of a root page) then all available siblings
    +** participate in the balancing.
    +**
    +** The number of siblings of the page might be increased or decreased by 
    +** one or two in an effort to keep pages nearly full but not over full. 
    +**
    +** Note that when this routine is called, some of the cells on the page
    +** might not actually be stored in MemPage.aData[]. This can happen
    +** if the page is overfull. This routine ensures that all cells allocated
    +** to the page and its siblings fit into MemPage.aData[] before returning.
    +**
    +** In the course of balancing the page and its siblings, cells may be
    +** inserted into or removed from the parent page (pParent). Doing so
    +** may cause the parent page to become overfull or underfull. If this
    +** happens, it is the responsibility of the caller to invoke the correct
    +** balancing routine to fix this problem (see the balance() routine). 
    +**
    +** If this routine fails for any reason, it might leave the database
    +** in a corrupted state. So if this routine fails, the database should
    +** be rolled back.
    +**
    +** The third argument to this function, aOvflSpace, is a pointer to a
    +** buffer big enough to hold one page. If while inserting cells into the parent
    +** page (pParent) the parent page becomes overfull, this buffer is
    +** used to store the parent's overflow cells. Because this function inserts
    +** a maximum of four divider cells into the parent page, and the maximum
    +** size of a cell stored within an internal node is always less than 1/4
    +** of the page-size, the aOvflSpace[] buffer is guaranteed to be large
    +** enough for all overflow cells.
    +**
    +** If aOvflSpace is set to a null pointer, this function returns 
    +** SQLITE_NOMEM.
    +*/
    +static int balance_nonroot(
    +  MemPage *pParent,               /* Parent page of siblings being balanced */
    +  int iParentIdx,                 /* Index of "the page" in pParent */
    +  u8 *aOvflSpace,                 /* page-size bytes of space for parent ovfl */
    +  int isRoot                      /* True if pParent is a root-page */
    +){
    +  BtShared *pBt;               /* The whole database */
    +  int nCell = 0;               /* Number of cells in apCell[] */
    +  int nMaxCells = 0;           /* Allocated size of apCell, szCell, aFrom. */
    +  int nNew = 0;                /* Number of pages in apNew[] */
    +  int nOld;                    /* Number of pages in apOld[] */
    +  int i, j, k;                 /* Loop counters */
    +  int nxDiv;                   /* Next divider slot in pParent->aCell[] */
    +  int rc = SQLITE_OK;          /* The return code */
    +  u16 leafCorrection;          /* 4 if pPage is a leaf.  0 if not */
    +  int leafData;                /* True if pPage is a leaf of a LEAFDATA tree */
    +  int usableSpace;             /* Bytes in pPage beyond the header */
    +  int pageFlags;               /* Value of pPage->aData[0] */
    +  int subtotal;                /* Subtotal of bytes in cells on one page */
    +  int iSpace1 = 0;             /* First unused byte of aSpace1[] */
    +  int iOvflSpace = 0;          /* First unused byte of aOvflSpace[] */
    +  int szScratch;               /* Size of scratch memory requested */
    +  MemPage *apOld[NB];          /* pPage and up to two siblings */
    +  MemPage *apCopy[NB];         /* Private copies of apOld[] pages */
    +  MemPage *apNew[NB+2];        /* pPage and up to NB siblings after balancing */
    +  u8 *pRight;                  /* Location in parent of right-sibling pointer */
    +  u8 *apDiv[NB-1];             /* Divider cells in pParent */
    +  int cntNew[NB+2];            /* Index in aCell[] of cell after i-th page */
    +  int szNew[NB+2];             /* Combined size of cells place on i-th page */
    +  u8 **apCell = 0;             /* All cells begin balanced */
    +  u16 *szCell;                 /* Local size of all cells in apCell[] */
    +  u8 *aSpace1;                 /* Space for copies of dividers cells */
    +  Pgno pgno;                   /* Temp var to store a page number in */
    +
    +  pBt = pParent->pBt;
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
    +
    +#if 0
    +  TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
    +#endif
    +
    +  /* At this point pParent may have at most one overflow cell. And if
    +  ** this overflow cell is present, it must be the cell with 
    +  ** index iParentIdx. This scenario comes about when this function
    +  ** is called (indirectly) from sqlite3BtreeDelete().
    +  */
    +  assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
    +  assert( pParent->nOverflow==0 || pParent->aOvfl[0].idx==iParentIdx );
    +
    +  if( !aOvflSpace ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  /* Find the sibling pages to balance. Also locate the cells in pParent 
    +  ** that divide the siblings. An attempt is made to find NN siblings on 
    +  ** either side of pPage. More siblings are taken from one side, however, 
    +  ** if there are fewer than NN siblings on the other side. If pParent
    +  ** has NB or fewer children then all children of pParent are taken.  
    +  **
    +  ** This loop also drops the divider cells from the parent page. This
    +  ** way, the remainder of the function does not have to deal with any
    +  ** overflow cells in the parent page, since if any existed they will
    +  ** have already been removed.
    +  */
    +  i = pParent->nOverflow + pParent->nCell;
    +  if( i<2 ){
    +    nxDiv = 0;
    +    nOld = i+1;
    +  }else{
    +    nOld = 3;
    +    if( iParentIdx==0 ){                 
    +      nxDiv = 0;
    +    }else if( iParentIdx==i ){
    +      nxDiv = i-2;
    +    }else{
    +      nxDiv = iParentIdx-1;
    +    }
    +    i = 2;
    +  }
    +  if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
    +    pRight = &pParent->aData[pParent->hdrOffset+8];
    +  }else{
    +    pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
    +  }
    +  pgno = get4byte(pRight);
    +  while( 1 ){
    +    rc = getAndInitPage(pBt, pgno, &apOld[i]);
    +    if( rc ){
    +      memset(apOld, 0, (i+1)*sizeof(MemPage*));
    +      goto balance_cleanup;
    +    }
    +    nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
    +    if( (i--)==0 ) break;
    +
    +    if( i+nxDiv==pParent->aOvfl[0].idx && pParent->nOverflow ){
    +      apDiv[i] = pParent->aOvfl[0].pCell;
    +      pgno = get4byte(apDiv[i]);
    +      szNew[i] = cellSizePtr(pParent, apDiv[i]);
    +      pParent->nOverflow = 0;
    +    }else{
    +      apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
    +      pgno = get4byte(apDiv[i]);
    +      szNew[i] = cellSizePtr(pParent, apDiv[i]);
    +
    +      /* Drop the cell from the parent page. apDiv[i] still points to
    +      ** the cell within the parent, even though it has been dropped.
    +      ** This is safe because dropping a cell only overwrites the first
    +      ** four bytes of it, and this function does not need the first
    +      ** four bytes of the divider cell. So the pointer is safe to use
    +      ** later on.  
    +      **
    +      ** Unless SQLite is compiled in secure-delete mode. In this case,
    +      ** the dropCell() routine will overwrite the entire cell with zeroes.
    +      ** In this case, temporarily copy the cell into the aOvflSpace[]
    +      ** buffer. It will be copied out again as soon as the aSpace[] buffer
    +      ** is allocated.  */
    +#ifdef SQLITE_SECURE_DELETE
    +      memcpy(&aOvflSpace[apDiv[i]-pParent->aData], apDiv[i], szNew[i]);
    +      apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
    +#endif
    +      dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
    +    }
    +  }
    +
    +  /* Make nMaxCells a multiple of 4 in order to preserve 8-byte
    +  ** alignment */
    +  nMaxCells = (nMaxCells + 3)&~3;
    +
    +  /*
    +  ** Allocate space for memory structures
    +  */
    +  k = pBt->pageSize + ROUND8(sizeof(MemPage));
    +  szScratch =
    +       nMaxCells*sizeof(u8*)                       /* apCell */
    +     + nMaxCells*sizeof(u16)                       /* szCell */
    +     + pBt->pageSize                               /* aSpace1 */
    +     + k*nOld;                                     /* Page copies (apCopy) */
    +  apCell = sqlite3ScratchMalloc( szScratch ); 
    +  if( apCell==0 ){
    +    rc = SQLITE_NOMEM;
    +    goto balance_cleanup;
    +  }
    +  szCell = (u16*)&apCell[nMaxCells];
    +  aSpace1 = (u8*)&szCell[nMaxCells];
    +  assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
    +
    +  /*
    +  ** Load pointers to all cells on sibling pages and the divider cells
    +  ** into the local apCell[] array.  Make copies of the divider cells
    +  ** into space obtained from aSpace1[] and remove the the divider Cells
    +  ** from pParent.
    +  **
    +  ** If the siblings are on leaf pages, then the child pointers of the
    +  ** divider cells are stripped from the cells before they are copied
    +  ** into aSpace1[].  In this way, all cells in apCell[] are without
    +  ** child pointers.  If siblings are not leaves, then all cell in
    +  ** apCell[] include child pointers.  Either way, all cells in apCell[]
    +  ** are alike.
    +  **
    +  ** leafCorrection:  4 if pPage is a leaf.  0 if pPage is not a leaf.
    +  **       leafData:  1 if pPage holds key+data and pParent holds only keys.
    +  */
    +  leafCorrection = apOld[0]->leaf*4;
    +  leafData = apOld[0]->hasData;
    +  for(i=0; i<nOld; i++){
    +    int limit;
    +    
    +    /* Before doing anything else, take a copy of the i'th original sibling
    +    ** The rest of this function will use data from the copies rather
    +    ** that the original pages since the original pages will be in the
    +    ** process of being overwritten.  */
    +    MemPage *pOld = apCopy[i] = (MemPage*)&aSpace1[pBt->pageSize + k*i];
    +    memcpy(pOld, apOld[i], sizeof(MemPage));
    +    pOld->aData = (void*)&pOld[1];
    +    memcpy(pOld->aData, apOld[i]->aData, pBt->pageSize);
    +
    +    limit = pOld->nCell+pOld->nOverflow;
    +    for(j=0; j<limit; j++){
    +      assert( nCell<nMaxCells );
    +      apCell[nCell] = findOverflowCell(pOld, j);
    +      szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
    +      nCell++;
    +    }
    +    if( i<nOld-1 && !leafData){
    +      u16 sz = (u16)szNew[i];
    +      u8 *pTemp;
    +      assert( nCell<nMaxCells );
    +      szCell[nCell] = sz;
    +      pTemp = &aSpace1[iSpace1];
    +      iSpace1 += sz;
    +      assert( sz<=pBt->pageSize/4 );
    +      assert( iSpace1<=pBt->pageSize );
    +      memcpy(pTemp, apDiv[i], sz);
    +      apCell[nCell] = pTemp+leafCorrection;
    +      assert( leafCorrection==0 || leafCorrection==4 );
    +      szCell[nCell] = szCell[nCell] - leafCorrection;
    +      if( !pOld->leaf ){
    +        assert( leafCorrection==0 );
    +        assert( pOld->hdrOffset==0 );
    +        /* The right pointer of the child page pOld becomes the left
    +        ** pointer of the divider cell */
    +        memcpy(apCell[nCell], &pOld->aData[8], 4);
    +      }else{
    +        assert( leafCorrection==4 );
    +        if( szCell[nCell]<4 ){
    +          /* Do not allow any cells smaller than 4 bytes. */
    +          szCell[nCell] = 4;
    +        }
    +      }
    +      nCell++;
    +    }
    +  }
    +
    +  /*
    +  ** Figure out the number of pages needed to hold all nCell cells.
    +  ** Store this number in "k".  Also compute szNew[] which is the total
    +  ** size of all cells on the i-th page and cntNew[] which is the index
    +  ** in apCell[] of the cell that divides page i from page i+1.  
    +  ** cntNew[k] should equal nCell.
    +  **
    +  ** Values computed by this block:
    +  **
    +  **           k: The total number of sibling pages
    +  **    szNew[i]: Spaced used on the i-th sibling page.
    +  **   cntNew[i]: Index in apCell[] and szCell[] for the first cell to
    +  **              the right of the i-th sibling page.
    +  ** usableSpace: Number of bytes of space available on each sibling.
    +  ** 
    +  */
    +  usableSpace = pBt->usableSize - 12 + leafCorrection;
    +  for(subtotal=k=i=0; i<nCell; i++){
    +    assert( i<nMaxCells );
    +    subtotal += szCell[i] + 2;
    +    if( subtotal > usableSpace ){
    +      szNew[k] = subtotal - szCell[i];
    +      cntNew[k] = i;
    +      if( leafData ){ i--; }
    +      subtotal = 0;
    +      k++;
    +      if( k>NB+1 ){ rc = SQLITE_CORRUPT; goto balance_cleanup; }
    +    }
    +  }
    +  szNew[k] = subtotal;
    +  cntNew[k] = nCell;
    +  k++;
    +
    +  /*
    +  ** The packing computed by the previous block is biased toward the siblings
    +  ** on the left side.  The left siblings are always nearly full, while the
    +  ** right-most sibling might be nearly empty.  This block of code attempts
    +  ** to adjust the packing of siblings to get a better balance.
    +  **
    +  ** This adjustment is more than an optimization.  The packing above might
    +  ** be so out of balance as to be illegal.  For example, the right-most
    +  ** sibling might be completely empty.  This adjustment is not optional.
    +  */
    +  for(i=k-1; i>0; i--){
    +    int szRight = szNew[i];  /* Size of sibling on the right */
    +    int szLeft = szNew[i-1]; /* Size of sibling on the left */
    +    int r;              /* Index of right-most cell in left sibling */
    +    int d;              /* Index of first cell to the left of right sibling */
    +
    +    r = cntNew[i-1] - 1;
    +    d = r + 1 - leafData;
    +    assert( d<nMaxCells );
    +    assert( r<nMaxCells );
    +    while( szRight==0 || szRight+szCell[d]+2<=szLeft-(szCell[r]+2) ){
    +      szRight += szCell[d] + 2;
    +      szLeft -= szCell[r] + 2;
    +      cntNew[i-1]--;
    +      r = cntNew[i-1] - 1;
    +      d = r + 1 - leafData;
    +    }
    +    szNew[i] = szRight;
    +    szNew[i-1] = szLeft;
    +  }
    +
    +  /* Either we found one or more cells (cntnew[0])>0) or pPage is
    +  ** a virtual root page.  A virtual root page is when the real root
    +  ** page is page 1 and we are the only child of that page.
    +  */
    +  assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
    +
    +  TRACE(("BALANCE: old: %d %d %d  ",
    +    apOld[0]->pgno, 
    +    nOld>=2 ? apOld[1]->pgno : 0,
    +    nOld>=3 ? apOld[2]->pgno : 0
    +  ));
    +
    +  /*
    +  ** Allocate k new pages.  Reuse old pages where possible.
    +  */
    +  if( apOld[0]->pgno<=1 ){
    +    rc = SQLITE_CORRUPT;
    +    goto balance_cleanup;
    +  }
    +  pageFlags = apOld[0]->aData[0];
    +  for(i=0; i<k; i++){
    +    MemPage *pNew;
    +    if( i<nOld ){
    +      pNew = apNew[i] = apOld[i];
    +      apOld[i] = 0;
    +      rc = sqlite3PagerWrite(pNew->pDbPage);
    +      nNew++;
    +      if( rc ) goto balance_cleanup;
    +    }else{
    +      assert( i>0 );
    +      rc = allocateBtreePage(pBt, &pNew, &pgno, pgno, 0);
    +      if( rc ) goto balance_cleanup;
    +      apNew[i] = pNew;
    +      nNew++;
    +
    +      /* Set the pointer-map entry for the new sibling page. */
    +      if( ISAUTOVACUUM ){
    +        ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
    +        if( rc!=SQLITE_OK ){
    +          goto balance_cleanup;
    +        }
    +      }
    +    }
    +  }
    +
    +  /* Free any old pages that were not reused as new pages.
    +  */
    +  while( i<nOld ){
    +    freePage(apOld[i], &rc);
    +    if( rc ) goto balance_cleanup;
    +    releasePage(apOld[i]);
    +    apOld[i] = 0;
    +    i++;
    +  }
    +
    +  /*
    +  ** Put the new pages in accending order.  This helps to
    +  ** keep entries in the disk file in order so that a scan
    +  ** of the table is a linear scan through the file.  That
    +  ** in turn helps the operating system to deliver pages
    +  ** from the disk more rapidly.
    +  **
    +  ** An O(n^2) insertion sort algorithm is used, but since
    +  ** n is never more than NB (a small constant), that should
    +  ** not be a problem.
    +  **
    +  ** When NB==3, this one optimization makes the database
    +  ** about 25% faster for large insertions and deletions.
    +  */
    +  for(i=0; i<k-1; i++){
    +    int minV = apNew[i]->pgno;
    +    int minI = i;
    +    for(j=i+1; j<k; j++){
    +      if( apNew[j]->pgno<(unsigned)minV ){
    +        minI = j;
    +        minV = apNew[j]->pgno;
    +      }
    +    }
    +    if( minI>i ){
    +      int t;
    +      MemPage *pT;
    +      t = apNew[i]->pgno;
    +      pT = apNew[i];
    +      apNew[i] = apNew[minI];
    +      apNew[minI] = pT;
    +    }
    +  }
    +  TRACE(("new: %d(%d) %d(%d) %d(%d) %d(%d) %d(%d)\n",
    +    apNew[0]->pgno, szNew[0],
    +    nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,
    +    nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,
    +    nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,
    +    nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0));
    +
    +  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
    +  put4byte(pRight, apNew[nNew-1]->pgno);
    +
    +  /*
    +  ** Evenly distribute the data in apCell[] across the new pages.
    +  ** Insert divider cells into pParent as necessary.
    +  */
    +  j = 0;
    +  for(i=0; i<nNew; i++){
    +    /* Assemble the new sibling page. */
    +    MemPage *pNew = apNew[i];
    +    assert( j<nMaxCells );
    +    zeroPage(pNew, pageFlags);
    +    assemblePage(pNew, cntNew[i]-j, &apCell[j], &szCell[j]);
    +    assert( pNew->nCell>0 || (nNew==1 && cntNew[0]==0) );
    +    assert( pNew->nOverflow==0 );
    +
    +    j = cntNew[i];
    +
    +    /* If the sibling page assembled above was not the right-most sibling,
    +    ** insert a divider cell into the parent page.
    +    */
    +    assert( i<nNew-1 || j==nCell );
    +    if( j<nCell ){
    +      u8 *pCell;
    +      u8 *pTemp;
    +      int sz;
    +
    +      assert( j<nMaxCells );
    +      pCell = apCell[j];
    +      sz = szCell[j] + leafCorrection;
    +      pTemp = &aOvflSpace[iOvflSpace];
    +      if( !pNew->leaf ){
    +        memcpy(&pNew->aData[8], pCell, 4);
    +      }else if( leafData ){
    +        /* If the tree is a leaf-data tree, and the siblings are leaves, 
    +        ** then there is no divider cell in apCell[]. Instead, the divider 
    +        ** cell consists of the integer key for the right-most cell of 
    +        ** the sibling-page assembled above only.
    +        */
    +        CellInfo info;
    +        j--;
    +        btreeParseCellPtr(pNew, apCell[j], &info);
    +        pCell = pTemp;
    +        sz = 4 + putVarint(&pCell[4], info.nKey);
    +        pTemp = 0;
    +      }else{
    +        pCell -= 4;
    +        /* Obscure case for non-leaf-data trees: If the cell at pCell was
    +        ** previously stored on a leaf node, and its reported size was 4
    +        ** bytes, then it may actually be smaller than this 
    +        ** (see btreeParseCellPtr(), 4 bytes is the minimum size of
    +        ** any cell). But it is important to pass the correct size to 
    +        ** insertCell(), so reparse the cell now.
    +        **
    +        ** Note that this can never happen in an SQLite data file, as all
    +        ** cells are at least 4 bytes. It only happens in b-trees used
    +        ** to evaluate "IN (SELECT ...)" and similar clauses.
    +        */
    +        if( szCell[j]==4 ){
    +          assert(leafCorrection==4);
    +          sz = cellSizePtr(pParent, pCell);
    +        }
    +      }
    +      iOvflSpace += sz;
    +      assert( sz<=pBt->pageSize/4 );
    +      assert( iOvflSpace<=pBt->pageSize );
    +      insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
    +      if( rc!=SQLITE_OK ) goto balance_cleanup;
    +      assert( sqlite3PagerIswriteable(pParent->pDbPage) );
    +
    +      j++;
    +      nxDiv++;
    +    }
    +  }
    +  assert( j==nCell );
    +  assert( nOld>0 );
    +  assert( nNew>0 );
    +  if( (pageFlags & PTF_LEAF)==0 ){
    +    u8 *zChild = &apCopy[nOld-1]->aData[8];
    +    memcpy(&apNew[nNew-1]->aData[8], zChild, 4);
    +  }
    +
    +  if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
    +    /* The root page of the b-tree now contains no cells. The only sibling
    +    ** page is the right-child of the parent. Copy the contents of the
    +    ** child page into the parent, decreasing the overall height of the
    +    ** b-tree structure by one. This is described as the "balance-shallower"
    +    ** sub-algorithm in some documentation.
    +    **
    +    ** If this is an auto-vacuum database, the call to copyNodeContent() 
    +    ** sets all pointer-map entries corresponding to database image pages 
    +    ** for which the pointer is stored within the content being copied.
    +    **
    +    ** The second assert below verifies that the child page is defragmented
    +    ** (it must be, as it was just reconstructed using assemblePage()). This
    +    ** is important if the parent page happens to be page 1 of the database
    +    ** image.  */
    +    assert( nNew==1 );
    +    assert( apNew[0]->nFree == 
    +        (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2) 
    +    );
    +    copyNodeContent(apNew[0], pParent, &rc);
    +    freePage(apNew[0], &rc);
    +  }else if( ISAUTOVACUUM ){
    +    /* Fix the pointer-map entries for all the cells that were shifted around. 
    +    ** There are several different types of pointer-map entries that need to
    +    ** be dealt with by this routine. Some of these have been set already, but
    +    ** many have not. The following is a summary:
    +    **
    +    **   1) The entries associated with new sibling pages that were not
    +    **      siblings when this function was called. These have already
    +    **      been set. We don't need to worry about old siblings that were
    +    **      moved to the free-list - the freePage() code has taken care
    +    **      of those.
    +    **
    +    **   2) The pointer-map entries associated with the first overflow
    +    **      page in any overflow chains used by new divider cells. These 
    +    **      have also already been taken care of by the insertCell() code.
    +    **
    +    **   3) If the sibling pages are not leaves, then the child pages of
    +    **      cells stored on the sibling pages may need to be updated.
    +    **
    +    **   4) If the sibling pages are not internal intkey nodes, then any
    +    **      overflow pages used by these cells may need to be updated
    +    **      (internal intkey nodes never contain pointers to overflow pages).
    +    **
    +    **   5) If the sibling pages are not leaves, then the pointer-map
    +    **      entries for the right-child pages of each sibling may need
    +    **      to be updated.
    +    **
    +    ** Cases 1 and 2 are dealt with above by other code. The next
    +    ** block deals with cases 3 and 4 and the one after that, case 5. Since
    +    ** setting a pointer map entry is a relatively expensive operation, this
    +    ** code only sets pointer map entries for child or overflow pages that have
    +    ** actually moved between pages.  */
    +    MemPage *pNew = apNew[0];
    +    MemPage *pOld = apCopy[0];
    +    int nOverflow = pOld->nOverflow;
    +    int iNextOld = pOld->nCell + nOverflow;
    +    int iOverflow = (nOverflow ? pOld->aOvfl[0].idx : -1);
    +    j = 0;                             /* Current 'old' sibling page */
    +    k = 0;                             /* Current 'new' sibling page */
    +    for(i=0; i<nCell; i++){
    +      int isDivider = 0;
    +      while( i==iNextOld ){
    +        /* Cell i is the cell immediately following the last cell on old
    +        ** sibling page j. If the siblings are not leaf pages of an
    +        ** intkey b-tree, then cell i was a divider cell. */
    +        pOld = apCopy[++j];
    +        iNextOld = i + !leafData + pOld->nCell + pOld->nOverflow;
    +        if( pOld->nOverflow ){
    +          nOverflow = pOld->nOverflow;
    +          iOverflow = i + !leafData + pOld->aOvfl[0].idx;
    +        }
    +        isDivider = !leafData;  
    +      }
    +
    +      assert(nOverflow>0 || iOverflow<i );
    +      assert(nOverflow<2 || pOld->aOvfl[0].idx==pOld->aOvfl[1].idx-1);
    +      assert(nOverflow<3 || pOld->aOvfl[1].idx==pOld->aOvfl[2].idx-1);
    +      if( i==iOverflow ){
    +        isDivider = 1;
    +        if( (--nOverflow)>0 ){
    +          iOverflow++;
    +        }
    +      }
    +
    +      if( i==cntNew[k] ){
    +        /* Cell i is the cell immediately following the last cell on new
    +        ** sibling page k. If the siblings are not leaf pages of an
    +        ** intkey b-tree, then cell i is a divider cell.  */
    +        pNew = apNew[++k];
    +        if( !leafData ) continue;
    +      }
    +      assert( j<nOld );
    +      assert( k<nNew );
    +
    +      /* If the cell was originally divider cell (and is not now) or
    +      ** an overflow cell, or if the cell was located on a different sibling
    +      ** page before the balancing, then the pointer map entries associated
    +      ** with any child or overflow pages need to be updated.  */
    +      if( isDivider || pOld->pgno!=pNew->pgno ){
    +        if( !leafCorrection ){
    +          ptrmapPut(pBt, get4byte(apCell[i]), PTRMAP_BTREE, pNew->pgno, &rc);
    +        }
    +        if( szCell[i]>pNew->minLocal ){
    +          ptrmapPutOvflPtr(pNew, apCell[i], &rc);
    +        }
    +      }
    +    }
    +
    +    if( !leafCorrection ){
    +      for(i=0; i<nNew; i++){
    +        u32 key = get4byte(&apNew[i]->aData[8]);
    +        ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i]->pgno, &rc);
    +      }
    +    }
    +
    +#if 0
    +    /* The ptrmapCheckPages() contains assert() statements that verify that
    +    ** all pointer map pages are set correctly. This is helpful while 
    +    ** debugging. This is usually disabled because a corrupt database may
    +    ** cause an assert() statement to fail.  */
    +    ptrmapCheckPages(apNew, nNew);
    +    ptrmapCheckPages(&pParent, 1);
    +#endif
    +  }
    +
    +  assert( pParent->isInit );
    +  TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n",
    +          nOld, nNew, nCell));
    +
    +  /*
    +  ** Cleanup before returning.
    +  */
    +balance_cleanup:
    +  sqlite3ScratchFree(apCell);
    +  for(i=0; i<nOld; i++){
    +    releasePage(apOld[i]);
    +  }
    +  for(i=0; i<nNew; i++){
    +    releasePage(apNew[i]);
    +  }
    +
    +  return rc;
    +}
    +
    +
    +/*
    +** This function is called when the root page of a b-tree structure is
    +** overfull (has one or more overflow pages).
    +**
    +** A new child page is allocated and the contents of the current root
    +** page, including overflow cells, are copied into the child. The root
    +** page is then overwritten to make it an empty page with the right-child 
    +** pointer pointing to the new page.
    +**
    +** Before returning, all pointer-map entries corresponding to pages 
    +** that the new child-page now contains pointers to are updated. The
    +** entry corresponding to the new right-child pointer of the root
    +** page is also updated.
    +**
    +** If successful, *ppChild is set to contain a reference to the child 
    +** page and SQLITE_OK is returned. In this case the caller is required
    +** to call releasePage() on *ppChild exactly once. If an error occurs,
    +** an error code is returned and *ppChild is set to 0.
    +*/
    +static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
    +  int rc;                        /* Return value from subprocedures */
    +  MemPage *pChild = 0;           /* Pointer to a new child page */
    +  Pgno pgnoChild = 0;            /* Page number of the new child page */
    +  BtShared *pBt = pRoot->pBt;    /* The BTree */
    +
    +  assert( pRoot->nOverflow>0 );
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +
    +  /* Make pRoot, the root page of the b-tree, writable. Allocate a new 
    +  ** page that will become the new right-child of pPage. Copy the contents
    +  ** of the node stored on pRoot into the new child page.
    +  */
    +  rc = sqlite3PagerWrite(pRoot->pDbPage);
    +  if( rc==SQLITE_OK ){
    +    rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);
    +    copyNodeContent(pRoot, pChild, &rc);
    +    if( ISAUTOVACUUM ){
    +      ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);
    +    }
    +  }
    +  if( rc ){
    +    *ppChild = 0;
    +    releasePage(pChild);
    +    return rc;
    +  }
    +  assert( sqlite3PagerIswriteable(pChild->pDbPage) );
    +  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
    +  assert( pChild->nCell==pRoot->nCell );
    +
    +  TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
    +
    +  /* Copy the overflow cells from pRoot to pChild */
    +  memcpy(pChild->aOvfl, pRoot->aOvfl, pRoot->nOverflow*sizeof(pRoot->aOvfl[0]));
    +  pChild->nOverflow = pRoot->nOverflow;
    +
    +  /* Zero the contents of pRoot. Then install pChild as the right-child. */
    +  zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
    +  put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
    +
    +  *ppChild = pChild;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** The page that pCur currently points to has just been modified in
    +** some way. This function figures out if this modification means the
    +** tree needs to be balanced, and if so calls the appropriate balancing 
    +** routine. Balancing routines are:
    +**
    +**   balance_quick()
    +**   balance_deeper()
    +**   balance_nonroot()
    +*/
    +static int balance(BtCursor *pCur){
    +  int rc = SQLITE_OK;
    +  const int nMin = pCur->pBt->usableSize * 2 / 3;
    +  u8 aBalanceQuickSpace[13];
    +  u8 *pFree = 0;
    +
    +  TESTONLY( int balance_quick_called = 0 );
    +  TESTONLY( int balance_deeper_called = 0 );
    +
    +  do {
    +    int iPage = pCur->iPage;
    +    MemPage *pPage = pCur->apPage[iPage];
    +
    +    if( iPage==0 ){
    +      if( pPage->nOverflow ){
    +        /* The root page of the b-tree is overfull. In this case call the
    +        ** balance_deeper() function to create a new child for the root-page
    +        ** and copy the current contents of the root-page to it. The
    +        ** next iteration of the do-loop will balance the child page.
    +        */ 
    +        assert( (balance_deeper_called++)==0 );
    +        rc = balance_deeper(pPage, &pCur->apPage[1]);
    +        if( rc==SQLITE_OK ){
    +          pCur->iPage = 1;
    +          pCur->aiIdx[0] = 0;
    +          pCur->aiIdx[1] = 0;
    +          assert( pCur->apPage[1]->nOverflow );
    +        }
    +      }else{
    +        break;
    +      }
    +    }else if( pPage->nOverflow==0 && pPage->nFree<=nMin ){
    +      break;
    +    }else{
    +      MemPage * const pParent = pCur->apPage[iPage-1];
    +      int const iIdx = pCur->aiIdx[iPage-1];
    +
    +      rc = sqlite3PagerWrite(pParent->pDbPage);
    +      if( rc==SQLITE_OK ){
    +#ifndef SQLITE_OMIT_QUICKBALANCE
    +        if( pPage->hasData
    +         && pPage->nOverflow==1
    +         && pPage->aOvfl[0].idx==pPage->nCell
    +         && pParent->pgno!=1
    +         && pParent->nCell==iIdx
    +        ){
    +          /* Call balance_quick() to create a new sibling of pPage on which
    +          ** to store the overflow cell. balance_quick() inserts a new cell
    +          ** into pParent, which may cause pParent overflow. If this
    +          ** happens, the next interation of the do-loop will balance pParent 
    +          ** use either balance_nonroot() or balance_deeper(). Until this
    +          ** happens, the overflow cell is stored in the aBalanceQuickSpace[]
    +          ** buffer. 
    +          **
    +          ** The purpose of the following assert() is to check that only a
    +          ** single call to balance_quick() is made for each call to this
    +          ** function. If this were not verified, a subtle bug involving reuse
    +          ** of the aBalanceQuickSpace[] might sneak in.
    +          */
    +          assert( (balance_quick_called++)==0 );
    +          rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
    +        }else
    +#endif
    +        {
    +          /* In this case, call balance_nonroot() to redistribute cells
    +          ** between pPage and up to 2 of its sibling pages. This involves
    +          ** modifying the contents of pParent, which may cause pParent to
    +          ** become overfull or underfull. The next iteration of the do-loop
    +          ** will balance the parent page to correct this.
    +          ** 
    +          ** If the parent page becomes overfull, the overflow cell or cells
    +          ** are stored in the pSpace buffer allocated immediately below. 
    +          ** A subsequent iteration of the do-loop will deal with this by
    +          ** calling balance_nonroot() (balance_deeper() may be called first,
    +          ** but it doesn't deal with overflow cells - just moves them to a
    +          ** different page). Once this subsequent call to balance_nonroot() 
    +          ** has completed, it is safe to release the pSpace buffer used by
    +          ** the previous call, as the overflow cell data will have been 
    +          ** copied either into the body of a database page or into the new
    +          ** pSpace buffer passed to the latter call to balance_nonroot().
    +          */
    +          u8 *pSpace = sqlite3PageMalloc(pCur->pBt->pageSize);
    +          rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1);
    +          if( pFree ){
    +            /* If pFree is not NULL, it points to the pSpace buffer used 
    +            ** by a previous call to balance_nonroot(). Its contents are
    +            ** now stored either on real database pages or within the 
    +            ** new pSpace buffer, so it may be safely freed here. */
    +            sqlite3PageFree(pFree);
    +          }
    +
    +          /* The pSpace buffer will be freed after the next call to
    +          ** balance_nonroot(), or just before this function returns, whichever
    +          ** comes first. */
    +          pFree = pSpace;
    +        }
    +      }
    +
    +      pPage->nOverflow = 0;
    +
    +      /* The next iteration of the do-loop balances the parent page. */
    +      releasePage(pPage);
    +      pCur->iPage--;
    +    }
    +  }while( rc==SQLITE_OK );
    +
    +  if( pFree ){
    +    sqlite3PageFree(pFree);
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Insert a new record into the BTree.  The key is given by (pKey,nKey)
    +** and the data is given by (pData,nData).  The cursor is used only to
    +** define what table the record should be inserted into.  The cursor
    +** is left pointing at a random location.
    +**
    +** For an INTKEY table, only the nKey value of the key is used.  pKey is
    +** ignored.  For a ZERODATA table, the pData and nData are both ignored.
    +**
    +** If the seekResult parameter is non-zero, then a successful call to
    +** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already
    +** been performed. seekResult is the search result returned (a negative
    +** number if pCur points at an entry that is smaller than (pKey, nKey), or
    +** a positive value if pCur points at an etry that is larger than 
    +** (pKey, nKey)). 
    +**
    +** If the seekResult parameter is non-zero, then the caller guarantees that
    +** cursor pCur is pointing at the existing copy of a row that is to be
    +** overwritten.  If the seekResult parameter is 0, then cursor pCur may
    +** point to any entry or to no entry at all and so this function has to seek
    +** the cursor before the new key can be inserted.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeInsert(
    +  BtCursor *pCur,                /* Insert data into the table of this cursor */
    +  const void *pKey, i64 nKey,    /* The key of the new record */
    +  const void *pData, int nData,  /* The data of the new record */
    +  int nZero,                     /* Number of extra 0 bytes to append to data */
    +  int appendBias,                /* True if this is likely an append */
    +  int seekResult                 /* Result of prior MovetoUnpacked() call */
    +){
    +  int rc;
    +  int loc = seekResult;          /* -1: before desired location  +1: after */
    +  int szNew = 0;
    +  int idx;
    +  MemPage *pPage;
    +  Btree *p = pCur->pBtree;
    +  BtShared *pBt = p->pBt;
    +  unsigned char *oldCell;
    +  unsigned char *newCell = 0;
    +
    +  if( pCur->eState==CURSOR_FAULT ){
    +    assert( pCur->skipNext!=SQLITE_OK );
    +    return pCur->skipNext;
    +  }
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pCur->wrFlag && pBt->inTransaction==TRANS_WRITE && !pBt->readOnly );
    +  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
    +
    +  /* Assert that the caller has been consistent. If this cursor was opened
    +  ** expecting an index b-tree, then the caller should be inserting blob
    +  ** keys with no associated data. If the cursor was opened expecting an
    +  ** intkey table, the caller should be inserting integer keys with a
    +  ** blob of associated data.  */
    +  assert( (pKey==0)==(pCur->pKeyInfo==0) );
    +
    +  /* If this is an insert into a table b-tree, invalidate any incrblob 
    +  ** cursors open on the row being replaced (assuming this is a replace
    +  ** operation - if it is not, the following is a no-op).  */
    +  if( pCur->pKeyInfo==0 ){
    +    invalidateIncrblobCursors(p, nKey, 0);
    +  }
    +
    +  /* Save the positions of any other cursors open on this table.
    +  **
    +  ** In some cases, the call to btreeMoveto() below is a no-op. For
    +  ** example, when inserting data into a table with auto-generated integer
    +  ** keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the 
    +  ** integer key to use. It then calls this function to actually insert the 
    +  ** data into the intkey B-Tree. In this case btreeMoveto() recognizes
    +  ** that the cursor is already where it needs to be and returns without
    +  ** doing any work. To avoid thwarting these optimizations, it is important
    +  ** not to clear the cursor here.
    +  */
    +  rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
    +  if( rc ) return rc;
    +  if( !loc ){
    +    rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc);
    +    if( rc ) return rc;
    +  }
    +  assert( pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc) );
    +
    +  pPage = pCur->apPage[pCur->iPage];
    +  assert( pPage->intKey || nKey>=0 );
    +  assert( pPage->leaf || !pPage->intKey );
    +
    +  TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
    +          pCur->pgnoRoot, nKey, nData, pPage->pgno,
    +          loc==0 ? "overwrite" : "new entry"));
    +  assert( pPage->isInit );
    +  allocateTempSpace(pBt);
    +  newCell = pBt->pTmpSpace;
    +  if( newCell==0 ) return SQLITE_NOMEM;
    +  rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew);
    +  if( rc ) goto end_insert;
    +  assert( szNew==cellSizePtr(pPage, newCell) );
    +  assert( szNew<=MX_CELL_SIZE(pBt) );
    +  idx = pCur->aiIdx[pCur->iPage];
    +  if( loc==0 ){
    +    u16 szOld;
    +    assert( idx<pPage->nCell );
    +    rc = sqlite3PagerWrite(pPage->pDbPage);
    +    if( rc ){
    +      goto end_insert;
    +    }
    +    oldCell = findCell(pPage, idx);
    +    if( !pPage->leaf ){
    +      memcpy(newCell, oldCell, 4);
    +    }
    +    szOld = cellSizePtr(pPage, oldCell);
    +    rc = clearCell(pPage, oldCell);
    +    dropCell(pPage, idx, szOld, &rc);
    +    if( rc ) goto end_insert;
    +  }else if( loc<0 && pPage->nCell>0 ){
    +    assert( pPage->leaf );
    +    idx = ++pCur->aiIdx[pCur->iPage];
    +  }else{
    +    assert( pPage->leaf );
    +  }
    +  insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
    +  assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
    +
    +  /* If no error has occured and pPage has an overflow cell, call balance() 
    +  ** to redistribute the cells within the tree. Since balance() may move
    +  ** the cursor, zero the BtCursor.info.nSize and BtCursor.validNKey
    +  ** variables.
    +  **
    +  ** Previous versions of SQLite called moveToRoot() to move the cursor
    +  ** back to the root page as balance() used to invalidate the contents
    +  ** of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that,
    +  ** set the cursor state to "invalid". This makes common insert operations
    +  ** slightly faster.
    +  **
    +  ** There is a subtle but important optimization here too. When inserting
    +  ** multiple records into an intkey b-tree using a single cursor (as can
    +  ** happen while processing an "INSERT INTO ... SELECT" statement), it
    +  ** is advantageous to leave the cursor pointing to the last entry in
    +  ** the b-tree if possible. If the cursor is left pointing to the last
    +  ** entry in the table, and the next row inserted has an integer key
    +  ** larger than the largest existing key, it is possible to insert the
    +  ** row without seeking the cursor. This can be a big performance boost.
    +  */
    +  pCur->info.nSize = 0;
    +  pCur->validNKey = 0;
    +  if( rc==SQLITE_OK && pPage->nOverflow ){
    +    rc = balance(pCur);
    +
    +    /* Must make sure nOverflow is reset to zero even if the balance()
    +    ** fails. Internal data structure corruption will result otherwise. 
    +    ** Also, set the cursor state to invalid. This stops saveCursorPosition()
    +    ** from trying to save the current position of the cursor.  */
    +    pCur->apPage[pCur->iPage]->nOverflow = 0;
    +    pCur->eState = CURSOR_INVALID;
    +  }
    +  assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
    +
    +end_insert:
    +  return rc;
    +}
    +
    +/*
    +** Delete the entry that the cursor is pointing to.  The cursor
    +** is left pointing at a arbitrary location.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
    +  Btree *p = pCur->pBtree;
    +  BtShared *pBt = p->pBt;              
    +  int rc;                              /* Return code */
    +  MemPage *pPage;                      /* Page to delete cell from */
    +  unsigned char *pCell;                /* Pointer to cell to delete */
    +  int iCellIdx;                        /* Index of cell to delete */
    +  int iCellDepth;                      /* Depth of node containing pCell */ 
    +
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( pBt->inTransaction==TRANS_WRITE );
    +  assert( !pBt->readOnly );
    +  assert( pCur->wrFlag );
    +  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
    +  assert( !hasReadConflicts(p, pCur->pgnoRoot) );
    +
    +  if( NEVER(pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell) 
    +   || NEVER(pCur->eState!=CURSOR_VALID)
    +  ){
    +    return SQLITE_ERROR;  /* Something has gone awry. */
    +  }
    +
    +  /* If this is a delete operation to remove a row from a table b-tree,
    +  ** invalidate any incrblob cursors open on the row being deleted.  */
    +  if( pCur->pKeyInfo==0 ){
    +    invalidateIncrblobCursors(p, pCur->info.nKey, 0);
    +  }
    +
    +  iCellDepth = pCur->iPage;
    +  iCellIdx = pCur->aiIdx[iCellDepth];
    +  pPage = pCur->apPage[iCellDepth];
    +  pCell = findCell(pPage, iCellIdx);
    +
    +  /* If the page containing the entry to delete is not a leaf page, move
    +  ** the cursor to the largest entry in the tree that is smaller than
    +  ** the entry being deleted. This cell will replace the cell being deleted
    +  ** from the internal node. The 'previous' entry is used for this instead
    +  ** of the 'next' entry, as the previous entry is always a part of the
    +  ** sub-tree headed by the child page of the cell being deleted. This makes
    +  ** balancing the tree following the delete operation easier.  */
    +  if( !pPage->leaf ){
    +    int notUsed;
    +    rc = sqlite3BtreePrevious(pCur, &notUsed);
    +    if( rc ) return rc;
    +  }
    +
    +  /* Save the positions of any other cursors open on this table before
    +  ** making any modifications. Make the page containing the entry to be 
    +  ** deleted writable. Then free any overflow pages associated with the 
    +  ** entry and finally remove the cell itself from within the page.  
    +  */
    +  rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
    +  if( rc ) return rc;
    +  rc = sqlite3PagerWrite(pPage->pDbPage);
    +  if( rc ) return rc;
    +  rc = clearCell(pPage, pCell);
    +  dropCell(pPage, iCellIdx, cellSizePtr(pPage, pCell), &rc);
    +  if( rc ) return rc;
    +
    +  /* If the cell deleted was not located on a leaf page, then the cursor
    +  ** is currently pointing to the largest entry in the sub-tree headed
    +  ** by the child-page of the cell that was just deleted from an internal
    +  ** node. The cell from the leaf node needs to be moved to the internal
    +  ** node to replace the deleted cell.  */
    +  if( !pPage->leaf ){
    +    MemPage *pLeaf = pCur->apPage[pCur->iPage];
    +    int nCell;
    +    Pgno n = pCur->apPage[iCellDepth+1]->pgno;
    +    unsigned char *pTmp;
    +
    +    pCell = findCell(pLeaf, pLeaf->nCell-1);
    +    nCell = cellSizePtr(pLeaf, pCell);
    +    assert( MX_CELL_SIZE(pBt)>=nCell );
    +
    +    allocateTempSpace(pBt);
    +    pTmp = pBt->pTmpSpace;
    +
    +    rc = sqlite3PagerWrite(pLeaf->pDbPage);
    +    insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
    +    dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
    +    if( rc ) return rc;
    +  }
    +
    +  /* Balance the tree. If the entry deleted was located on a leaf page,
    +  ** then the cursor still points to that page. In this case the first
    +  ** call to balance() repairs the tree, and the if(...) condition is
    +  ** never true.
    +  **
    +  ** Otherwise, if the entry deleted was on an internal node page, then
    +  ** pCur is pointing to the leaf page from which a cell was removed to
    +  ** replace the cell deleted from the internal node. This is slightly
    +  ** tricky as the leaf node may be underfull, and the internal node may
    +  ** be either under or overfull. In this case run the balancing algorithm
    +  ** on the leaf node first. If the balance proceeds far enough up the
    +  ** tree that we can be sure that any problem in the internal node has
    +  ** been corrected, so be it. Otherwise, after balancing the leaf node,
    +  ** walk the cursor up the tree to the internal node and balance it as 
    +  ** well.  */
    +  rc = balance(pCur);
    +  if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){
    +    while( pCur->iPage>iCellDepth ){
    +      releasePage(pCur->apPage[pCur->iPage--]);
    +    }
    +    rc = balance(pCur);
    +  }
    +
    +  if( rc==SQLITE_OK ){
    +    moveToRoot(pCur);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Create a new BTree table.  Write into *piTable the page
    +** number for the root page of the new table.
    +**
    +** The type of type is determined by the flags parameter.  Only the
    +** following values of flags are currently in use.  Other values for
    +** flags might not work:
    +**
    +**     BTREE_INTKEY|BTREE_LEAFDATA     Used for SQL tables with rowid keys
    +**     BTREE_ZERODATA                  Used for SQL indices
    +*/
    +static int btreeCreateTable(Btree *p, int *piTable, int flags){
    +  BtShared *pBt = p->pBt;
    +  MemPage *pRoot;
    +  Pgno pgnoRoot;
    +  int rc;
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( pBt->inTransaction==TRANS_WRITE );
    +  assert( !pBt->readOnly );
    +
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +  rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
    +  if( rc ){
    +    return rc;
    +  }
    +#else
    +  if( pBt->autoVacuum ){
    +    Pgno pgnoMove;      /* Move a page here to make room for the root-page */
    +    MemPage *pPageMove; /* The page to move to. */
    +
    +    /* Creating a new table may probably require moving an existing database
    +    ** to make room for the new tables root page. In case this page turns
    +    ** out to be an overflow page, delete all overflow page-map caches
    +    ** held by open cursors.
    +    */
    +    invalidateAllOverflowCache(pBt);
    +
    +    /* Read the value of meta[3] from the database to determine where the
    +    ** root page of the new table should go. meta[3] is the largest root-page
    +    ** created so far, so the new root-page is (meta[3]+1).
    +    */
    +    sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &pgnoRoot);
    +    pgnoRoot++;
    +
    +    /* The new root-page may not be allocated on a pointer-map page, or the
    +    ** PENDING_BYTE page.
    +    */
    +    while( pgnoRoot==PTRMAP_PAGENO(pBt, pgnoRoot) ||
    +        pgnoRoot==PENDING_BYTE_PAGE(pBt) ){
    +      pgnoRoot++;
    +    }
    +    assert( pgnoRoot>=3 );
    +
    +    /* Allocate a page. The page that currently resides at pgnoRoot will
    +    ** be moved to the allocated page (unless the allocated page happens
    +    ** to reside at pgnoRoot).
    +    */
    +    rc = allocateBtreePage(pBt, &pPageMove, &pgnoMove, pgnoRoot, 1);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +
    +    if( pgnoMove!=pgnoRoot ){
    +      /* pgnoRoot is the page that will be used for the root-page of
    +      ** the new table (assuming an error did not occur). But we were
    +      ** allocated pgnoMove. If required (i.e. if it was not allocated
    +      ** by extending the file), the current page at position pgnoMove
    +      ** is already journaled.
    +      */
    +      u8 eType = 0;
    +      Pgno iPtrPage = 0;
    +
    +      releasePage(pPageMove);
    +
    +      /* Move the page currently at pgnoRoot to pgnoMove. */
    +      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +      rc = ptrmapGet(pBt, pgnoRoot, &eType, &iPtrPage);
    +      if( eType==PTRMAP_ROOTPAGE || eType==PTRMAP_FREEPAGE ){
    +        rc = SQLITE_CORRUPT_BKPT;
    +      }
    +      if( rc!=SQLITE_OK ){
    +        releasePage(pRoot);
    +        return rc;
    +      }
    +      assert( eType!=PTRMAP_ROOTPAGE );
    +      assert( eType!=PTRMAP_FREEPAGE );
    +      rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);
    +      releasePage(pRoot);
    +
    +      /* Obtain the page at pgnoRoot */
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
    +      if( rc!=SQLITE_OK ){
    +        return rc;
    +      }
    +      rc = sqlite3PagerWrite(pRoot->pDbPage);
    +      if( rc!=SQLITE_OK ){
    +        releasePage(pRoot);
    +        return rc;
    +      }
    +    }else{
    +      pRoot = pPageMove;
    +    } 
    +
    +    /* Update the pointer-map and meta-data with the new root-page number. */
    +    ptrmapPut(pBt, pgnoRoot, PTRMAP_ROOTPAGE, 0, &rc);
    +    if( rc ){
    +      releasePage(pRoot);
    +      return rc;
    +    }
    +    rc = sqlite3BtreeUpdateMeta(p, 4, pgnoRoot);
    +    if( rc ){
    +      releasePage(pRoot);
    +      return rc;
    +    }
    +
    +  }else{
    +    rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
    +    if( rc ) return rc;
    +  }
    +#endif
    +  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
    +  zeroPage(pRoot, flags | PTF_LEAF);
    +  sqlite3PagerUnref(pRoot->pDbPage);
    +  *piTable = (int)pgnoRoot;
    +  return SQLITE_OK;
    +}
    +SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree *p, int *piTable, int flags){
    +  int rc;
    +  sqlite3BtreeEnter(p);
    +  rc = btreeCreateTable(p, piTable, flags);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** Erase the given database page and all its children.  Return
    +** the page to the freelist.
    +*/
    +static int clearDatabasePage(
    +  BtShared *pBt,           /* The BTree that contains the table */
    +  Pgno pgno,            /* Page number to clear */
    +  int freePageFlag,     /* Deallocate page if true */
    +  int *pnChange
    +){
    +  MemPage *pPage;
    +  int rc;
    +  unsigned char *pCell;
    +  int i;
    +
    +  assert( sqlite3_mutex_held(pBt->mutex) );
    +  if( pgno>pagerPagecount(pBt) ){
    +    return SQLITE_CORRUPT_BKPT;
    +  }
    +
    +  rc = getAndInitPage(pBt, pgno, &pPage);
    +  if( rc ) return rc;
    +  for(i=0; i<pPage->nCell; i++){
    +    pCell = findCell(pPage, i);
    +    if( !pPage->leaf ){
    +      rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
    +      if( rc ) goto cleardatabasepage_out;
    +    }
    +    rc = clearCell(pPage, pCell);
    +    if( rc ) goto cleardatabasepage_out;
    +  }
    +  if( !pPage->leaf ){
    +    rc = clearDatabasePage(pBt, get4byte(&pPage->aData[8]), 1, pnChange);
    +    if( rc ) goto cleardatabasepage_out;
    +  }else if( pnChange ){
    +    assert( pPage->intKey );
    +    *pnChange += pPage->nCell;
    +  }
    +  if( freePageFlag ){
    +    freePage(pPage, &rc);
    +  }else if( (rc = sqlite3PagerWrite(pPage->pDbPage))==0 ){
    +    zeroPage(pPage, pPage->aData[0] | PTF_LEAF);
    +  }
    +
    +cleardatabasepage_out:
    +  releasePage(pPage);
    +  return rc;
    +}
    +
    +/*
    +** Delete all information from a single table in the database.  iTable is
    +** the page number of the root of the table.  After this routine returns,
    +** the root page is empty, but still exists.
    +**
    +** This routine will fail with SQLITE_LOCKED if there are any open
    +** read cursors on the table.  Open write cursors are moved to the
    +** root of the table.
    +**
    +** If pnChange is not NULL, then table iTable must be an intkey table. The
    +** integer value pointed to by pnChange is incremented by the number of
    +** entries in the table.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
    +  int rc;
    +  BtShared *pBt = p->pBt;
    +  sqlite3BtreeEnter(p);
    +  assert( p->inTrans==TRANS_WRITE );
    +
    +  /* Invalidate all incrblob cursors open on table iTable (assuming iTable
    +  ** is the root of a table b-tree - if it is not, the following call is
    +  ** a no-op).  */
    +  invalidateIncrblobCursors(p, 0, 1);
    +
    +  rc = saveAllCursors(pBt, (Pgno)iTable, 0);
    +  if( SQLITE_OK==rc ){
    +    rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +/*
    +** Erase all information in a table and add the root of the table to
    +** the freelist.  Except, the root of the principle table (the one on
    +** page 1) is never added to the freelist.
    +**
    +** This routine will fail with SQLITE_LOCKED if there are any open
    +** cursors on the table.
    +**
    +** If AUTOVACUUM is enabled and the page at iTable is not the last
    +** root page in the database file, then the last root page 
    +** in the database file is moved into the slot formerly occupied by
    +** iTable and that last slot formerly occupied by the last root page
    +** is added to the freelist instead of iTable.  In this say, all
    +** root pages are kept at the beginning of the database file, which
    +** is necessary for AUTOVACUUM to work right.  *piMoved is set to the 
    +** page number that used to be the last root page in the file before
    +** the move.  If no page gets moved, *piMoved is set to 0.
    +** The last root page is recorded in meta[3] and the value of
    +** meta[3] is updated by this procedure.
    +*/
    +static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
    +  int rc;
    +  MemPage *pPage = 0;
    +  BtShared *pBt = p->pBt;
    +
    +  assert( sqlite3BtreeHoldsMutex(p) );
    +  assert( p->inTrans==TRANS_WRITE );
    +
    +  /* It is illegal to drop a table if any cursors are open on the
    +  ** database. This is because in auto-vacuum mode the backend may
    +  ** need to move another root-page to fill a gap left by the deleted
    +  ** root page. If an open cursor was using this page a problem would 
    +  ** occur.
    +  **
    +  ** This error is caught long before control reaches this point.
    +  */
    +  if( NEVER(pBt->pCursor) ){
    +    sqlite3ConnectionBlocked(p->db, pBt->pCursor->pBtree->db);
    +    return SQLITE_LOCKED_SHAREDCACHE;
    +  }
    +
    +  rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
    +  if( rc ) return rc;
    +  rc = sqlite3BtreeClearTable(p, iTable, 0);
    +  if( rc ){
    +    releasePage(pPage);
    +    return rc;
    +  }
    +
    +  *piMoved = 0;
    +
    +  if( iTable>1 ){
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +    freePage(pPage, &rc);
    +    releasePage(pPage);
    +#else
    +    if( pBt->autoVacuum ){
    +      Pgno maxRootPgno;
    +      sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &maxRootPgno);
    +
    +      if( iTable==maxRootPgno ){
    +        /* If the table being dropped is the table with the largest root-page
    +        ** number in the database, put the root page on the free list. 
    +        */
    +        freePage(pPage, &rc);
    +        releasePage(pPage);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +      }else{
    +        /* The table being dropped does not have the largest root-page
    +        ** number in the database. So move the page that does into the 
    +        ** gap left by the deleted root-page.
    +        */
    +        MemPage *pMove;
    +        releasePage(pPage);
    +        rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +        rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
    +        releasePage(pMove);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +        pMove = 0;
    +        rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
    +        freePage(pMove, &rc);
    +        releasePage(pMove);
    +        if( rc!=SQLITE_OK ){
    +          return rc;
    +        }
    +        *piMoved = maxRootPgno;
    +      }
    +
    +      /* Set the new 'max-root-page' value in the database header. This
    +      ** is the old value less one, less one more if that happens to
    +      ** be a root-page number, less one again if that is the
    +      ** PENDING_BYTE_PAGE.
    +      */
    +      maxRootPgno--;
    +      while( maxRootPgno==PENDING_BYTE_PAGE(pBt)
    +             || PTRMAP_ISPAGE(pBt, maxRootPgno) ){
    +        maxRootPgno--;
    +      }
    +      assert( maxRootPgno!=PENDING_BYTE_PAGE(pBt) );
    +
    +      rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);
    +    }else{
    +      freePage(pPage, &rc);
    +      releasePage(pPage);
    +    }
    +#endif
    +  }else{
    +    /* If sqlite3BtreeDropTable was called on page 1.
    +    ** This really never should happen except in a corrupt
    +    ** database. 
    +    */
    +    zeroPage(pPage, PTF_INTKEY|PTF_LEAF );
    +    releasePage(pPage);
    +  }
    +  return rc;  
    +}
    +SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
    +  int rc;
    +  sqlite3BtreeEnter(p);
    +  rc = btreeDropTable(p, iTable, piMoved);
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +
    +/*
    +** This function may only be called if the b-tree connection already
    +** has a read or write transaction open on the database.
    +**
    +** Read the meta-information out of a database file.  Meta[0]
    +** is the number of free pages currently in the database.  Meta[1]
    +** through meta[15] are available for use by higher layers.  Meta[0]
    +** is read-only, the others are read/write.
    +** 
    +** The schema layer numbers meta values differently.  At the schema
    +** layer (and the SetCookie and ReadCookie opcodes) the number of
    +** free pages is not visible.  So Cookie[0] is the same as Meta[1].
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
    +  BtShared *pBt = p->pBt;
    +
    +  sqlite3BtreeEnter(p);
    +  assert( p->inTrans>TRANS_NONE );
    +  assert( SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK) );
    +  assert( pBt->pPage1 );
    +  assert( idx>=0 && idx<=15 );
    +
    +  *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
    +
    +  /* If auto-vacuum is disabled in this build and this is an auto-vacuum
    +  ** database, mark the database as read-only.  */
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +  if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ) pBt->readOnly = 1;
    +#endif
    +
    +  sqlite3BtreeLeave(p);
    +}
    +
    +/*
    +** Write meta-information back into the database.  Meta[0] is
    +** read-only and may not be written.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
    +  BtShared *pBt = p->pBt;
    +  unsigned char *pP1;
    +  int rc;
    +  assert( idx>=1 && idx<=15 );
    +  sqlite3BtreeEnter(p);
    +  assert( p->inTrans==TRANS_WRITE );
    +  assert( pBt->pPage1!=0 );
    +  pP1 = pBt->pPage1->aData;
    +  rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
    +  if( rc==SQLITE_OK ){
    +    put4byte(&pP1[36 + idx*4], iMeta);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( idx==BTREE_INCR_VACUUM ){
    +      assert( pBt->autoVacuum || iMeta==0 );
    +      assert( iMeta==0 || iMeta==1 );
    +      pBt->incrVacuum = (u8)iMeta;
    +    }
    +#endif
    +  }
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +#ifndef SQLITE_OMIT_BTREECOUNT
    +/*
    +** The first argument, pCur, is a cursor opened on some b-tree. Count the
    +** number of entries in the b-tree and write the result to *pnEntry.
    +**
    +** SQLITE_OK is returned if the operation is successfully executed. 
    +** Otherwise, if an error is encountered (i.e. an IO error or database
    +** corruption) an SQLite error code is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
    +  i64 nEntry = 0;                      /* Value to return in *pnEntry */
    +  int rc;                              /* Return code */
    +  rc = moveToRoot(pCur);
    +
    +  /* Unless an error occurs, the following loop runs one iteration for each
    +  ** page in the B-Tree structure (not including overflow pages). 
    +  */
    +  while( rc==SQLITE_OK ){
    +    int iIdx;                          /* Index of child node in parent */
    +    MemPage *pPage;                    /* Current page of the b-tree */
    +
    +    /* If this is a leaf page or the tree is not an int-key tree, then 
    +    ** this page contains countable entries. Increment the entry counter
    +    ** accordingly.
    +    */
    +    pPage = pCur->apPage[pCur->iPage];
    +    if( pPage->leaf || !pPage->intKey ){
    +      nEntry += pPage->nCell;
    +    }
    +
    +    /* pPage is a leaf node. This loop navigates the cursor so that it 
    +    ** points to the first interior cell that it points to the parent of
    +    ** the next page in the tree that has not yet been visited. The
    +    ** pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell
    +    ** of the page, or to the number of cells in the page if the next page
    +    ** to visit is the right-child of its parent.
    +    **
    +    ** If all pages in the tree have been visited, return SQLITE_OK to the
    +    ** caller.
    +    */
    +    if( pPage->leaf ){
    +      do {
    +        if( pCur->iPage==0 ){
    +          /* All pages of the b-tree have been visited. Return successfully. */
    +          *pnEntry = nEntry;
    +          return SQLITE_OK;
    +        }
    +        moveToParent(pCur);
    +      }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
    +
    +      pCur->aiIdx[pCur->iPage]++;
    +      pPage = pCur->apPage[pCur->iPage];
    +    }
    +
    +    /* Descend to the child node of the cell that the cursor currently 
    +    ** points at. This is the right-child if (iIdx==pPage->nCell).
    +    */
    +    iIdx = pCur->aiIdx[pCur->iPage];
    +    if( iIdx==pPage->nCell ){
    +      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
    +    }else{
    +      rc = moveToChild(pCur, get4byte(findCell(pPage, iIdx)));
    +    }
    +  }
    +
    +  /* An error has occurred. Return an error code. */
    +  return rc;
    +}
    +#endif
    +
    +/*
    +** Return the pager associated with a BTree.  This routine is used for
    +** testing and debugging only.
    +*/
    +SQLITE_PRIVATE Pager *sqlite3BtreePager(Btree *p){
    +  return p->pBt->pPager;
    +}
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +/*
    +** Append a message to the error message string.
    +*/
    +static void checkAppendMsg(
    +  IntegrityCk *pCheck,
    +  char *zMsg1,
    +  const char *zFormat,
    +  ...
    +){
    +  va_list ap;
    +  if( !pCheck->mxErr ) return;
    +  pCheck->mxErr--;
    +  pCheck->nErr++;
    +  va_start(ap, zFormat);
    +  if( pCheck->errMsg.nChar ){
    +    sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
    +  }
    +  if( zMsg1 ){
    +    sqlite3StrAccumAppend(&pCheck->errMsg, zMsg1, -1);
    +  }
    +  sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
    +  va_end(ap);
    +  if( pCheck->errMsg.mallocFailed ){
    +    pCheck->mallocFailed = 1;
    +  }
    +}
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +/*
    +** Add 1 to the reference count for page iPage.  If this is the second
    +** reference to the page, add an error message to pCheck->zErrMsg.
    +** Return 1 if there are 2 ore more references to the page and 0 if
    +** if this is the first reference to the page.
    +**
    +** Also check that the page number is in bounds.
    +*/
    +static int checkRef(IntegrityCk *pCheck, Pgno iPage, char *zContext){
    +  if( iPage==0 ) return 1;
    +  if( iPage>pCheck->nPage ){
    +    checkAppendMsg(pCheck, zContext, "invalid page number %d", iPage);
    +    return 1;
    +  }
    +  if( pCheck->anRef[iPage]==1 ){
    +    checkAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage);
    +    return 1;
    +  }
    +  return  (pCheck->anRef[iPage]++)>1;
    +}
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +/*
    +** Check that the entry in the pointer-map for page iChild maps to 
    +** page iParent, pointer type ptrType. If not, append an error message
    +** to pCheck.
    +*/
    +static void checkPtrmap(
    +  IntegrityCk *pCheck,   /* Integrity check context */
    +  Pgno iChild,           /* Child page number */
    +  u8 eType,              /* Expected pointer map type */
    +  Pgno iParent,          /* Expected pointer map parent page number */
    +  char *zContext         /* Context description (used for error msg) */
    +){
    +  int rc;
    +  u8 ePtrmapType;
    +  Pgno iPtrmapParent;
    +
    +  rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent);
    +  if( rc!=SQLITE_OK ){
    +    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->mallocFailed = 1;
    +    checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild);
    +    return;
    +  }
    +
    +  if( ePtrmapType!=eType || iPtrmapParent!=iParent ){
    +    checkAppendMsg(pCheck, zContext, 
    +      "Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)", 
    +      iChild, eType, iParent, ePtrmapType, iPtrmapParent);
    +  }
    +}
    +#endif
    +
    +/*
    +** Check the integrity of the freelist or of an overflow page list.
    +** Verify that the number of pages on the list is N.
    +*/
    +static void checkList(
    +  IntegrityCk *pCheck,  /* Integrity checking context */
    +  int isFreeList,       /* True for a freelist.  False for overflow page list */
    +  int iPage,            /* Page number for first page in the list */
    +  int N,                /* Expected number of pages in the list */
    +  char *zContext        /* Context for error messages */
    +){
    +  int i;
    +  int expected = N;
    +  int iFirst = iPage;
    +  while( N-- > 0 && pCheck->mxErr ){
    +    DbPage *pOvflPage;
    +    unsigned char *pOvflData;
    +    if( iPage<1 ){
    +      checkAppendMsg(pCheck, zContext,
    +         "%d of %d pages missing from overflow list starting at %d",
    +          N+1, expected, iFirst);
    +      break;
    +    }
    +    if( checkRef(pCheck, iPage, zContext) ) break;
    +    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
    +      checkAppendMsg(pCheck, zContext, "failed to get page %d", iPage);
    +      break;
    +    }
    +    pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);
    +    if( isFreeList ){
    +      int n = get4byte(&pOvflData[4]);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      if( pCheck->pBt->autoVacuum ){
    +        checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0, zContext);
    +      }
    +#endif
    +      if( n>pCheck->pBt->usableSize/4-2 ){
    +        checkAppendMsg(pCheck, zContext,
    +           "freelist leaf count too big on page %d", iPage);
    +        N--;
    +      }else{
    +        for(i=0; i<n; i++){
    +          Pgno iFreePage = get4byte(&pOvflData[8+i*4]);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +          if( pCheck->pBt->autoVacuum ){
    +            checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0, zContext);
    +          }
    +#endif
    +          checkRef(pCheck, iFreePage, zContext);
    +        }
    +        N -= n;
    +      }
    +    }
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    else{
    +      /* If this database supports auto-vacuum and iPage is not the last
    +      ** page in this overflow list, check that the pointer-map entry for
    +      ** the following page matches iPage.
    +      */
    +      if( pCheck->pBt->autoVacuum && N>0 ){
    +        i = get4byte(pOvflData);
    +        checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage, zContext);
    +      }
    +    }
    +#endif
    +    iPage = get4byte(pOvflData);
    +    sqlite3PagerUnref(pOvflPage);
    +  }
    +}
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +/*
    +** Do various sanity checks on a single page of a tree.  Return
    +** the tree depth.  Root pages return 0.  Parents of root pages
    +** return 1, and so forth.
    +** 
    +** These checks are done:
    +**
    +**      1.  Make sure that cells and freeblocks do not overlap
    +**          but combine to completely cover the page.
    +**  NO  2.  Make sure cell keys are in order.
    +**  NO  3.  Make sure no key is less than or equal to zLowerBound.
    +**  NO  4.  Make sure no key is greater than or equal to zUpperBound.
    +**      5.  Check the integrity of overflow pages.
    +**      6.  Recursively call checkTreePage on all children.
    +**      7.  Verify that the depth of all children is the same.
    +**      8.  Make sure this page is at least 33% full or else it is
    +**          the root of the tree.
    +*/
    +static int checkTreePage(
    +  IntegrityCk *pCheck,  /* Context for the sanity check */
    +  int iPage,            /* Page number of the page to check */
    +  char *zParentContext  /* Parent context */
    +){
    +  MemPage *pPage;
    +  int i, rc, depth, d2, pgno, cnt;
    +  int hdr, cellStart;
    +  int nCell;
    +  u8 *data;
    +  BtShared *pBt;
    +  int usableSize;
    +  char zContext[100];
    +  char *hit = 0;
    +
    +  sqlite3_snprintf(sizeof(zContext), zContext, "Page %d: ", iPage);
    +
    +  /* Check that the page exists
    +  */
    +  pBt = pCheck->pBt;
    +  usableSize = pBt->usableSize;
    +  if( iPage==0 ) return 0;
    +  if( checkRef(pCheck, iPage, zParentContext) ) return 0;
    +  if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
    +    checkAppendMsg(pCheck, zContext,
    +       "unable to get the page. error code=%d", rc);
    +    return 0;
    +  }
    +
    +  /* Clear MemPage.isInit to make sure the corruption detection code in
    +  ** btreeInitPage() is executed.  */
    +  pPage->isInit = 0;
    +  if( (rc = btreeInitPage(pPage))!=0 ){
    +    assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
    +    checkAppendMsg(pCheck, zContext, 
    +                   "btreeInitPage() returns error code %d", rc);
    +    releasePage(pPage);
    +    return 0;
    +  }
    +
    +  /* Check out all the cells.
    +  */
    +  depth = 0;
    +  for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
    +    u8 *pCell;
    +    u32 sz;
    +    CellInfo info;
    +
    +    /* Check payload overflow pages
    +    */
    +    sqlite3_snprintf(sizeof(zContext), zContext,
    +             "On tree page %d cell %d: ", iPage, i);
    +    pCell = findCell(pPage,i);
    +    btreeParseCellPtr(pPage, pCell, &info);
    +    sz = info.nData;
    +    if( !pPage->intKey ) sz += (int)info.nKey;
    +    assert( sz==info.nPayload );
    +    if( (sz>info.nLocal) 
    +     && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize])
    +    ){
    +      int nPage = (sz - info.nLocal + usableSize - 5)/(usableSize - 4);
    +      Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      if( pBt->autoVacuum ){
    +        checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage, zContext);
    +      }
    +#endif
    +      checkList(pCheck, 0, pgnoOvfl, nPage, zContext);
    +    }
    +
    +    /* Check sanity of left child page.
    +    */
    +    if( !pPage->leaf ){
    +      pgno = get4byte(pCell);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +      if( pBt->autoVacuum ){
    +        checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
    +      }
    +#endif
    +      d2 = checkTreePage(pCheck, pgno, zContext);
    +      if( i>0 && d2!=depth ){
    +        checkAppendMsg(pCheck, zContext, "Child page depth differs");
    +      }
    +      depth = d2;
    +    }
    +  }
    +  if( !pPage->leaf ){
    +    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    +    sqlite3_snprintf(sizeof(zContext), zContext, 
    +                     "On page %d at right child: ", iPage);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pBt->autoVacuum ){
    +      checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, 0);
    +    }
    +#endif
    +    checkTreePage(pCheck, pgno, zContext);
    +  }
    + 
    +  /* Check for complete coverage of the page
    +  */
    +  data = pPage->aData;
    +  hdr = pPage->hdrOffset;
    +  hit = sqlite3PageMalloc( pBt->pageSize );
    +  if( hit==0 ){
    +    pCheck->mallocFailed = 1;
    +  }else{
    +    u16 contentOffset = get2byte(&data[hdr+5]);
    +    assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */
    +    memset(hit+contentOffset, 0, usableSize-contentOffset);
    +    memset(hit, 1, contentOffset);
    +    nCell = get2byte(&data[hdr+3]);
    +    cellStart = hdr + 12 - 4*pPage->leaf;
    +    for(i=0; i<nCell; i++){
    +      int pc = get2byte(&data[cellStart+i*2]);
    +      u16 size = 1024;
    +      int j;
    +      if( pc<=usableSize-4 ){
    +        size = cellSizePtr(pPage, &data[pc]);
    +      }
    +      if( (pc+size-1)>=usableSize ){
    +        checkAppendMsg(pCheck, 0, 
    +            "Corruption detected in cell %d on page %d",i,iPage,0);
    +      }else{
    +        for(j=pc+size-1; j>=pc; j--) hit[j]++;
    +      }
    +    }
    +    i = get2byte(&data[hdr+1]);
    +    while( i>0 ){
    +      int size, j;
    +      assert( i<=usableSize-4 );     /* Enforced by btreeInitPage() */
    +      size = get2byte(&data[i+2]);
    +      assert( i+size<=usableSize );  /* Enforced by btreeInitPage() */
    +      for(j=i+size-1; j>=i; j--) hit[j]++;
    +      j = get2byte(&data[i]);
    +      assert( j==0 || j>i+size );  /* Enforced by btreeInitPage() */
    +      assert( j<=usableSize-4 );   /* Enforced by btreeInitPage() */
    +      i = j;
    +    }
    +    for(i=cnt=0; i<usableSize; i++){
    +      if( hit[i]==0 ){
    +        cnt++;
    +      }else if( hit[i]>1 ){
    +        checkAppendMsg(pCheck, 0,
    +          "Multiple uses for byte %d of page %d", i, iPage);
    +        break;
    +      }
    +    }
    +    if( cnt!=data[hdr+7] ){
    +      checkAppendMsg(pCheck, 0, 
    +          "Fragmentation of %d bytes reported as %d on page %d",
    +          cnt, data[hdr+7], iPage);
    +    }
    +  }
    +  sqlite3PageFree(hit);
    +  releasePage(pPage);
    +  return depth+1;
    +}
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +/*
    +** This routine does a complete check of the given BTree file.  aRoot[] is
    +** an array of pages numbers were each page number is the root page of
    +** a table.  nRoot is the number of entries in aRoot.
    +**
    +** A read-only or read-write transaction must be opened before calling
    +** this function.
    +**
    +** Write the number of error seen in *pnErr.  Except for some memory
    +** allocation errors,  an error message held in memory obtained from
    +** malloc is returned if *pnErr is non-zero.  If *pnErr==0 then NULL is
    +** returned.  If a memory allocation error occurs, NULL is returned.
    +*/
    +SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
    +  Btree *p,     /* The btree to be checked */
    +  int *aRoot,   /* An array of root pages numbers for individual trees */
    +  int nRoot,    /* Number of entries in aRoot[] */
    +  int mxErr,    /* Stop reporting errors after this many */
    +  int *pnErr    /* Write number of errors seen to this variable */
    +){
    +  Pgno i;
    +  int nRef;
    +  IntegrityCk sCheck;
    +  BtShared *pBt = p->pBt;
    +  char zErr[100];
    +
    +  sqlite3BtreeEnter(p);
    +  assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE );
    +  nRef = sqlite3PagerRefcount(pBt->pPager);
    +  sCheck.pBt = pBt;
    +  sCheck.pPager = pBt->pPager;
    +  sCheck.nPage = pagerPagecount(sCheck.pBt);
    +  sCheck.mxErr = mxErr;
    +  sCheck.nErr = 0;
    +  sCheck.mallocFailed = 0;
    +  *pnErr = 0;
    +  if( sCheck.nPage==0 ){
    +    sqlite3BtreeLeave(p);
    +    return 0;
    +  }
    +  sCheck.anRef = sqlite3Malloc( (sCheck.nPage+1)*sizeof(sCheck.anRef[0]) );
    +  if( !sCheck.anRef ){
    +    *pnErr = 1;
    +    sqlite3BtreeLeave(p);
    +    return 0;
    +  }
    +  for(i=0; i<=sCheck.nPage; i++){ sCheck.anRef[i] = 0; }
    +  i = PENDING_BYTE_PAGE(pBt);
    +  if( i<=sCheck.nPage ){
    +    sCheck.anRef[i] = 1;
    +  }
    +  sqlite3StrAccumInit(&sCheck.errMsg, zErr, sizeof(zErr), 20000);
    +
    +  /* Check the integrity of the freelist
    +  */
    +  checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),
    +            get4byte(&pBt->pPage1->aData[36]), "Main freelist: ");
    +
    +  /* Check all the tables.
    +  */
    +  for(i=0; (int)i<nRoot && sCheck.mxErr; i++){
    +    if( aRoot[i]==0 ) continue;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( pBt->autoVacuum && aRoot[i]>1 ){
    +      checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0, 0);
    +    }
    +#endif
    +    checkTreePage(&sCheck, aRoot[i], "List of tree roots: ");
    +  }
    +
    +  /* Make sure every page in the file is referenced
    +  */
    +  for(i=1; i<=sCheck.nPage && sCheck.mxErr; i++){
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +    if( sCheck.anRef[i]==0 ){
    +      checkAppendMsg(&sCheck, 0, "Page %d is never used", i);
    +    }
    +#else
    +    /* If the database supports auto-vacuum, make sure no tables contain
    +    ** references to pointer-map pages.
    +    */
    +    if( sCheck.anRef[i]==0 && 
    +       (PTRMAP_PAGENO(pBt, i)!=i || !pBt->autoVacuum) ){
    +      checkAppendMsg(&sCheck, 0, "Page %d is never used", i);
    +    }
    +    if( sCheck.anRef[i]!=0 && 
    +       (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){
    +      checkAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i);
    +    }
    +#endif
    +  }
    +
    +  /* Make sure this analysis did not leave any unref() pages.
    +  ** This is an internal consistency check; an integrity check
    +  ** of the integrity check.
    +  */
    +  if( NEVER(nRef != sqlite3PagerRefcount(pBt->pPager)) ){
    +    checkAppendMsg(&sCheck, 0, 
    +      "Outstanding page count goes from %d to %d during this analysis",
    +      nRef, sqlite3PagerRefcount(pBt->pPager)
    +    );
    +  }
    +
    +  /* Clean  up and report errors.
    +  */
    +  sqlite3BtreeLeave(p);
    +  sqlite3_free(sCheck.anRef);
    +  if( sCheck.mallocFailed ){
    +    sqlite3StrAccumReset(&sCheck.errMsg);
    +    *pnErr = sCheck.nErr+1;
    +    return 0;
    +  }
    +  *pnErr = sCheck.nErr;
    +  if( sCheck.nErr==0 ) sqlite3StrAccumReset(&sCheck.errMsg);
    +  return sqlite3StrAccumFinish(&sCheck.errMsg);
    +}
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +/*
    +** Return the full pathname of the underlying database file.
    +**
    +** The pager filename is invariant as long as the pager is
    +** open so it is safe to access without the BtShared mutex.
    +*/
    +SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *p){
    +  assert( p->pBt->pPager!=0 );
    +  return sqlite3PagerFilename(p->pBt->pPager);
    +}
    +
    +/*
    +** Return the pathname of the journal file for this database. The return
    +** value of this routine is the same regardless of whether the journal file
    +** has been created or not.
    +**
    +** The pager journal filename is invariant as long as the pager is
    +** open so it is safe to access without the BtShared mutex.
    +*/
    +SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){
    +  assert( p->pBt->pPager!=0 );
    +  return sqlite3PagerJournalname(p->pBt->pPager);
    +}
    +
    +/*
    +** Return non-zero if a transaction is active.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree *p){
    +  assert( p==0 || sqlite3_mutex_held(p->db->mutex) );
    +  return (p && (p->inTrans==TRANS_WRITE));
    +}
    +
    +/*
    +** Return non-zero if a read (or write) transaction is active.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree *p){
    +  assert( p );
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  return p->inTrans!=TRANS_NONE;
    +}
    +
    +SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree *p){
    +  assert( p );
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  return p->nBackup!=0;
    +}
    +
    +/*
    +** This function returns a pointer to a blob of memory associated with
    +** a single shared-btree. The memory is used by client code for its own
    +** purposes (for example, to store a high-level schema associated with 
    +** the shared-btree). The btree layer manages reference counting issues.
    +**
    +** The first time this is called on a shared-btree, nBytes bytes of memory
    +** are allocated, zeroed, and returned to the caller. For each subsequent 
    +** call the nBytes parameter is ignored and a pointer to the same blob
    +** of memory returned. 
    +**
    +** If the nBytes parameter is 0 and the blob of memory has not yet been
    +** allocated, a null pointer is returned. If the blob has already been
    +** allocated, it is returned as normal.
    +**
    +** Just before the shared-btree is closed, the function passed as the 
    +** xFree argument when the memory allocation was made is invoked on the 
    +** blob of allocated memory. This function should not call sqlite3_free()
    +** on the memory, the btree layer does that.
    +*/
    +SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){
    +  BtShared *pBt = p->pBt;
    +  sqlite3BtreeEnter(p);
    +  if( !pBt->pSchema && nBytes ){
    +    pBt->pSchema = sqlite3MallocZero(nBytes);
    +    pBt->xFreeSchema = xFree;
    +  }
    +  sqlite3BtreeLeave(p);
    +  return pBt->pSchema;
    +}
    +
    +/*
    +** Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared 
    +** btree as the argument handle holds an exclusive lock on the 
    +** sqlite_master table. Otherwise SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){
    +  int rc;
    +  assert( sqlite3_mutex_held(p->db->mutex) );
    +  sqlite3BtreeEnter(p);
    +  rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);
    +  assert( rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE );
    +  sqlite3BtreeLeave(p);
    +  return rc;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** Obtain a lock on the table whose root page is iTab.  The
    +** lock is a write lock if isWritelock is true or a read lock
    +** if it is false.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
    +  int rc = SQLITE_OK;
    +  assert( p->inTrans!=TRANS_NONE );
    +  if( p->sharable ){
    +    u8 lockType = READ_LOCK + isWriteLock;
    +    assert( READ_LOCK+1==WRITE_LOCK );
    +    assert( isWriteLock==0 || isWriteLock==1 );
    +
    +    sqlite3BtreeEnter(p);
    +    rc = querySharedCacheTableLock(p, iTab, lockType);
    +    if( rc==SQLITE_OK ){
    +      rc = setSharedCacheTableLock(p, iTab, lockType);
    +    }
    +    sqlite3BtreeLeave(p);
    +  }
    +  return rc;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +/*
    +** Argument pCsr must be a cursor opened for writing on an 
    +** INTKEY table currently pointing at a valid table entry. 
    +** This function modifies the data stored as part of that entry.
    +**
    +** Only the data content may only be modified, it is not possible to 
    +** change the length of the data stored. If this function is called with
    +** parameters that attempt to write past the end of the existing data,
    +** no modifications are made and SQLITE_CORRUPT is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
    +  int rc;
    +  assert( cursorHoldsMutex(pCsr) );
    +  assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
    +  assert( pCsr->isIncrblobHandle );
    +
    +  rc = restoreCursorPosition(pCsr);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +  assert( pCsr->eState!=CURSOR_REQUIRESEEK );
    +  if( pCsr->eState!=CURSOR_VALID ){
    +    return SQLITE_ABORT;
    +  }
    +
    +  /* Check some assumptions: 
    +  **   (a) the cursor is open for writing,
    +  **   (b) there is a read/write transaction open,
    +  **   (c) the connection holds a write-lock on the table (if required),
    +  **   (d) there are no conflicting read-locks, and
    +  **   (e) the cursor points at a valid row of an intKey table.
    +  */
    +  if( !pCsr->wrFlag ){
    +    return SQLITE_READONLY;
    +  }
    +  assert( !pCsr->pBt->readOnly && pCsr->pBt->inTransaction==TRANS_WRITE );
    +  assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );
    +  assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
    +  assert( pCsr->apPage[pCsr->iPage]->intKey );
    +
    +  return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
    +}
    +
    +/* 
    +** Set a flag on this cursor to cache the locations of pages from the 
    +** overflow list for the current row. This is used by cursors opened
    +** for incremental blob IO only.
    +**
    +** This function sets a flag only. The actual page location cache
    +** (stored in BtCursor.aOverflow[]) is allocated and used by function
    +** accessPayload() (the worker function for sqlite3BtreeData() and
    +** sqlite3BtreePutData()).
    +*/
    +SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *pCur){
    +  assert( cursorHoldsMutex(pCur) );
    +  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
    +  assert(!pCur->isIncrblobHandle);
    +  assert(!pCur->aOverflow);
    +  pCur->isIncrblobHandle = 1;
    +}
    +#endif
    +
    +/************** End of btree.c ***********************************************/
    +/************** Begin file backup.c ******************************************/
    +/*
    +** 2009 January 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the implementation of the sqlite3_backup_XXX() 
    +** API functions and the related features.
    +**
    +** $Id: backup.c,v 1.19 2009/07/06 19:03:13 drh Exp $
    +*/
    +
    +/* Macro to find the minimum of two numeric values.
    +*/
    +#ifndef MIN
    +# define MIN(x,y) ((x)<(y)?(x):(y))
    +#endif
    +
    +/*
    +** Structure allocated for each backup operation.
    +*/
    +struct sqlite3_backup {
    +  sqlite3* pDestDb;        /* Destination database handle */
    +  Btree *pDest;            /* Destination b-tree file */
    +  u32 iDestSchema;         /* Original schema cookie in destination */
    +  int bDestLocked;         /* True once a write-transaction is open on pDest */
    +
    +  Pgno iNext;              /* Page number of the next source page to copy */
    +  sqlite3* pSrcDb;         /* Source database handle */
    +  Btree *pSrc;             /* Source b-tree file */
    +
    +  int rc;                  /* Backup process error code */
    +
    +  /* These two variables are set by every call to backup_step(). They are
    +  ** read by calls to backup_remaining() and backup_pagecount().
    +  */
    +  Pgno nRemaining;         /* Number of pages left to copy */
    +  Pgno nPagecount;         /* Total number of pages to copy */
    +
    +  int isAttached;          /* True once backup has been registered with pager */
    +  sqlite3_backup *pNext;   /* Next backup associated with source pager */
    +};
    +
    +/*
    +** THREAD SAFETY NOTES:
    +**
    +**   Once it has been created using backup_init(), a single sqlite3_backup
    +**   structure may be accessed via two groups of thread-safe entry points:
    +**
    +**     * Via the sqlite3_backup_XXX() API function backup_step() and 
    +**       backup_finish(). Both these functions obtain the source database
    +**       handle mutex and the mutex associated with the source BtShared 
    +**       structure, in that order.
    +**
    +**     * Via the BackupUpdate() and BackupRestart() functions, which are
    +**       invoked by the pager layer to report various state changes in
    +**       the page cache associated with the source database. The mutex
    +**       associated with the source database BtShared structure will always 
    +**       be held when either of these functions are invoked.
    +**
    +**   The other sqlite3_backup_XXX() API functions, backup_remaining() and
    +**   backup_pagecount() are not thread-safe functions. If they are called
    +**   while some other thread is calling backup_step() or backup_finish(),
    +**   the values returned may be invalid. There is no way for a call to
    +**   BackupUpdate() or BackupRestart() to interfere with backup_remaining()
    +**   or backup_pagecount().
    +**
    +**   Depending on the SQLite configuration, the database handles and/or
    +**   the Btree objects may have their own mutexes that require locking.
    +**   Non-sharable Btrees (in-memory databases for example), do not have
    +**   associated mutexes.
    +*/
    +
    +/*
    +** Return a pointer corresponding to database zDb (i.e. "main", "temp")
    +** in connection handle pDb. If such a database cannot be found, return
    +** a NULL pointer and write an error message to pErrorDb.
    +**
    +** If the "temp" database is requested, it may need to be opened by this 
    +** function. If an error occurs while doing so, return 0 and write an 
    +** error message to pErrorDb.
    +*/
    +static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
    +  int i = sqlite3FindDbName(pDb, zDb);
    +
    +  if( i==1 ){
    +    Parse *pParse;
    +    int rc = 0;
    +    pParse = sqlite3StackAllocZero(pErrorDb, sizeof(*pParse));
    +    if( pParse==0 ){
    +      sqlite3Error(pErrorDb, SQLITE_NOMEM, "out of memory");
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      pParse->db = pDb;
    +      if( sqlite3OpenTempDatabase(pParse) ){
    +        sqlite3ErrorClear(pParse);
    +        sqlite3Error(pErrorDb, pParse->rc, "%s", pParse->zErrMsg);
    +        rc = SQLITE_ERROR;
    +      }
    +      sqlite3StackFree(pErrorDb, pParse);
    +    }
    +    if( rc ){
    +      return 0;
    +    }
    +  }
    +
    +  if( i<0 ){
    +    sqlite3Error(pErrorDb, SQLITE_ERROR, "unknown database %s", zDb);
    +    return 0;
    +  }
    +
    +  return pDb->aDb[i].pBt;
    +}
    +
    +/*
    +** Create an sqlite3_backup process to copy the contents of zSrcDb from
    +** connection handle pSrcDb to zDestDb in pDestDb. If successful, return
    +** a pointer to the new sqlite3_backup object.
    +**
    +** If an error occurs, NULL is returned and an error code and error message
    +** stored in database handle pDestDb.
    +*/
    +SQLITE_API sqlite3_backup *sqlite3_backup_init(
    +  sqlite3* pDestDb,                     /* Database to write to */
    +  const char *zDestDb,                  /* Name of database within pDestDb */
    +  sqlite3* pSrcDb,                      /* Database connection to read from */
    +  const char *zSrcDb                    /* Name of database within pSrcDb */
    +){
    +  sqlite3_backup *p;                    /* Value to return */
    +
    +  /* Lock the source database handle. The destination database
    +  ** handle is not locked in this routine, but it is locked in
    +  ** sqlite3_backup_step(). The user is required to ensure that no
    +  ** other thread accesses the destination handle for the duration
    +  ** of the backup operation.  Any attempt to use the destination
    +  ** database connection while a backup is in progress may cause
    +  ** a malfunction or a deadlock.
    +  */
    +  sqlite3_mutex_enter(pSrcDb->mutex);
    +  sqlite3_mutex_enter(pDestDb->mutex);
    +
    +  if( pSrcDb==pDestDb ){
    +    sqlite3Error(
    +        pDestDb, SQLITE_ERROR, "source and destination must be distinct"
    +    );
    +    p = 0;
    +  }else {
    +    /* Allocate space for a new sqlite3_backup object */
    +    p = (sqlite3_backup *)sqlite3_malloc(sizeof(sqlite3_backup));
    +    if( !p ){
    +      sqlite3Error(pDestDb, SQLITE_NOMEM, 0);
    +    }
    +  }
    +
    +  /* If the allocation succeeded, populate the new object. */
    +  if( p ){
    +    memset(p, 0, sizeof(sqlite3_backup));
    +    p->pSrc = findBtree(pDestDb, pSrcDb, zSrcDb);
    +    p->pDest = findBtree(pDestDb, pDestDb, zDestDb);
    +    p->pDestDb = pDestDb;
    +    p->pSrcDb = pSrcDb;
    +    p->iNext = 1;
    +    p->isAttached = 0;
    +
    +    if( 0==p->pSrc || 0==p->pDest ){
    +      /* One (or both) of the named databases did not exist. An error has
    +      ** already been written into the pDestDb handle. All that is left
    +      ** to do here is free the sqlite3_backup structure.
    +      */
    +      sqlite3_free(p);
    +      p = 0;
    +    }
    +  }
    +  if( p ){
    +    p->pSrc->nBackup++;
    +  }
    +
    +  sqlite3_mutex_leave(pDestDb->mutex);
    +  sqlite3_mutex_leave(pSrcDb->mutex);
    +  return p;
    +}
    +
    +/*
    +** Argument rc is an SQLite error code. Return true if this error is 
    +** considered fatal if encountered during a backup operation. All errors
    +** are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.
    +*/
    +static int isFatalError(int rc){
    +  return (rc!=SQLITE_OK && rc!=SQLITE_BUSY && ALWAYS(rc!=SQLITE_LOCKED));
    +}
    +
    +/*
    +** Parameter zSrcData points to a buffer containing the data for 
    +** page iSrcPg from the source database. Copy this data into the 
    +** destination database.
    +*/
    +static int backupOnePage(sqlite3_backup *p, Pgno iSrcPg, const u8 *zSrcData){
    +  Pager * const pDestPager = sqlite3BtreePager(p->pDest);
    +  const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);
    +  int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
    +  const int nCopy = MIN(nSrcPgsz, nDestPgsz);
    +  const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;
    +
    +  int rc = SQLITE_OK;
    +  i64 iOff;
    +
    +  assert( p->bDestLocked );
    +  assert( !isFatalError(p->rc) );
    +  assert( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) );
    +  assert( zSrcData );
    +
    +  /* Catch the case where the destination is an in-memory database and the
    +  ** page sizes of the source and destination differ. 
    +  */
    +  if( nSrcPgsz!=nDestPgsz && sqlite3PagerIsMemdb(sqlite3BtreePager(p->pDest)) ){
    +    rc = SQLITE_READONLY;
    +  }
    +
    +  /* This loop runs once for each destination page spanned by the source 
    +  ** page. For each iteration, variable iOff is set to the byte offset
    +  ** of the destination page.
    +  */
    +  for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){
    +    DbPage *pDestPg = 0;
    +    Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
    +    if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
    +    if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg))
    +     && SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg))
    +    ){
    +      const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
    +      u8 *zDestData = sqlite3PagerGetData(pDestPg);
    +      u8 *zOut = &zDestData[iOff%nDestPgsz];
    +
    +      /* Copy the data from the source page into the destination page.
    +      ** Then clear the Btree layer MemPage.isInit flag. Both this module
    +      ** and the pager code use this trick (clearing the first byte
    +      ** of the page 'extra' space to invalidate the Btree layers
    +      ** cached parse of the page). MemPage.isInit is marked 
    +      ** "MUST BE FIRST" for this purpose.
    +      */
    +      memcpy(zOut, zIn, nCopy);
    +      ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;
    +    }
    +    sqlite3PagerUnref(pDestPg);
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** If pFile is currently larger than iSize bytes, then truncate it to
    +** exactly iSize bytes. If pFile is not larger than iSize bytes, then
    +** this function is a no-op.
    +**
    +** Return SQLITE_OK if everything is successful, or an SQLite error 
    +** code if an error occurs.
    +*/
    +static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
    +  i64 iCurrent;
    +  int rc = sqlite3OsFileSize(pFile, &iCurrent);
    +  if( rc==SQLITE_OK && iCurrent>iSize ){
    +    rc = sqlite3OsTruncate(pFile, iSize);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Register this backup object with the associated source pager for
    +** callbacks when pages are changed or the cache invalidated.
    +*/
    +static void attachBackupObject(sqlite3_backup *p){
    +  sqlite3_backup **pp;
    +  assert( sqlite3BtreeHoldsMutex(p->pSrc) );
    +  pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
    +  p->pNext = *pp;
    +  *pp = p;
    +  p->isAttached = 1;
    +}
    +
    +/*
    +** Copy nPage pages from the source b-tree to the destination.
    +*/
    +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
    +  int rc;
    +
    +  sqlite3_mutex_enter(p->pSrcDb->mutex);
    +  sqlite3BtreeEnter(p->pSrc);
    +  if( p->pDestDb ){
    +    sqlite3_mutex_enter(p->pDestDb->mutex);
    +  }
    +
    +  rc = p->rc;
    +  if( !isFatalError(rc) ){
    +    Pager * const pSrcPager = sqlite3BtreePager(p->pSrc);     /* Source pager */
    +    Pager * const pDestPager = sqlite3BtreePager(p->pDest);   /* Dest pager */
    +    int ii;                            /* Iterator variable */
    +    int nSrcPage = -1;                 /* Size of source db in pages */
    +    int bCloseTrans = 0;               /* True if src db requires unlocking */
    +
    +    /* If the source pager is currently in a write-transaction, return
    +    ** SQLITE_BUSY immediately.
    +    */
    +    if( p->pDestDb && p->pSrc->pBt->inTransaction==TRANS_WRITE ){
    +      rc = SQLITE_BUSY;
    +    }else{
    +      rc = SQLITE_OK;
    +    }
    +
    +    /* Lock the destination database, if it is not locked already. */
    +    if( SQLITE_OK==rc && p->bDestLocked==0
    +     && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2)) 
    +    ){
    +      p->bDestLocked = 1;
    +      sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
    +    }
    +
    +    /* If there is no open read-transaction on the source database, open
    +    ** one now. If a transaction is opened here, then it will be closed
    +    ** before this function exits.
    +    */
    +    if( rc==SQLITE_OK && 0==sqlite3BtreeIsInReadTrans(p->pSrc) ){
    +      rc = sqlite3BtreeBeginTrans(p->pSrc, 0);
    +      bCloseTrans = 1;
    +    }
    +  
    +    /* Now that there is a read-lock on the source database, query the
    +    ** source pager for the number of pages in the database.
    +    */
    +    if( rc==SQLITE_OK ){
    +      rc = sqlite3PagerPagecount(pSrcPager, &nSrcPage);
    +    }
    +    for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
    +      const Pgno iSrcPg = p->iNext;                 /* Source page number */
    +      if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
    +        DbPage *pSrcPg;                             /* Source page object */
    +        rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
    +        if( rc==SQLITE_OK ){
    +          rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg));
    +          sqlite3PagerUnref(pSrcPg);
    +        }
    +      }
    +      p->iNext++;
    +    }
    +    if( rc==SQLITE_OK ){
    +      p->nPagecount = nSrcPage;
    +      p->nRemaining = nSrcPage+1-p->iNext;
    +      if( p->iNext>(Pgno)nSrcPage ){
    +        rc = SQLITE_DONE;
    +      }else if( !p->isAttached ){
    +        attachBackupObject(p);
    +      }
    +    }
    +  
    +    /* Update the schema version field in the destination database. This
    +    ** is to make sure that the schema-version really does change in
    +    ** the case where the source and destination databases have the
    +    ** same schema version.
    +    */
    +    if( rc==SQLITE_DONE 
    +     && (rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1))==SQLITE_OK
    +    ){
    +      const int nSrcPagesize = sqlite3BtreeGetPageSize(p->pSrc);
    +      const int nDestPagesize = sqlite3BtreeGetPageSize(p->pDest);
    +      int nDestTruncate;
    +  
    +      if( p->pDestDb ){
    +        sqlite3ResetInternalSchema(p->pDestDb, 0);
    +      }
    +
    +      /* Set nDestTruncate to the final number of pages in the destination
    +      ** database. The complication here is that the destination page
    +      ** size may be different to the source page size. 
    +      **
    +      ** If the source page size is smaller than the destination page size, 
    +      ** round up. In this case the call to sqlite3OsTruncate() below will
    +      ** fix the size of the file. However it is important to call
    +      ** sqlite3PagerTruncateImage() here so that any pages in the 
    +      ** destination file that lie beyond the nDestTruncate page mark are
    +      ** journalled by PagerCommitPhaseOne() before they are destroyed
    +      ** by the file truncation.
    +      */
    +      if( nSrcPagesize<nDestPagesize ){
    +        int ratio = nDestPagesize/nSrcPagesize;
    +        nDestTruncate = (nSrcPage+ratio-1)/ratio;
    +        if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){
    +          nDestTruncate--;
    +        }
    +      }else{
    +        nDestTruncate = nSrcPage * (nSrcPagesize/nDestPagesize);
    +      }
    +      sqlite3PagerTruncateImage(pDestPager, nDestTruncate);
    +
    +      if( nSrcPagesize<nDestPagesize ){
    +        /* If the source page-size is smaller than the destination page-size,
    +        ** two extra things may need to happen:
    +        **
    +        **   * The destination may need to be truncated, and
    +        **
    +        **   * Data stored on the pages immediately following the 
    +        **     pending-byte page in the source database may need to be
    +        **     copied into the destination database.
    +        */
    +        const i64 iSize = (i64)nSrcPagesize * (i64)nSrcPage;
    +        sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
    +
    +        assert( pFile );
    +        assert( (i64)nDestTruncate*(i64)nDestPagesize >= iSize || (
    +              nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
    +           && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+nDestPagesize
    +        ));
    +        if( SQLITE_OK==(rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 1))
    +         && SQLITE_OK==(rc = backupTruncateFile(pFile, iSize))
    +         && SQLITE_OK==(rc = sqlite3PagerSync(pDestPager))
    +        ){
    +          i64 iOff;
    +          i64 iEnd = MIN(PENDING_BYTE + nDestPagesize, iSize);
    +          for(
    +            iOff=PENDING_BYTE+nSrcPagesize; 
    +            rc==SQLITE_OK && iOff<iEnd; 
    +            iOff+=nSrcPagesize
    +          ){
    +            PgHdr *pSrcPg = 0;
    +            const Pgno iSrcPg = (Pgno)((iOff/nSrcPagesize)+1);
    +            rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
    +            if( rc==SQLITE_OK ){
    +              u8 *zData = sqlite3PagerGetData(pSrcPg);
    +              rc = sqlite3OsWrite(pFile, zData, nSrcPagesize, iOff);
    +            }
    +            sqlite3PagerUnref(pSrcPg);
    +          }
    +        }
    +      }else{
    +        rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 0);
    +      }
    +  
    +      /* Finish committing the transaction to the destination database. */
    +      if( SQLITE_OK==rc
    +       && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest))
    +      ){
    +        rc = SQLITE_DONE;
    +      }
    +    }
    +  
    +    /* If bCloseTrans is true, then this function opened a read transaction
    +    ** on the source database. Close the read transaction here. There is
    +    ** no need to check the return values of the btree methods here, as
    +    ** "committing" a read-only transaction cannot fail.
    +    */
    +    if( bCloseTrans ){
    +      TESTONLY( int rc2 );
    +      TESTONLY( rc2  = ) sqlite3BtreeCommitPhaseOne(p->pSrc, 0);
    +      TESTONLY( rc2 |= ) sqlite3BtreeCommitPhaseTwo(p->pSrc);
    +      assert( rc2==SQLITE_OK );
    +    }
    +  
    +    p->rc = rc;
    +  }
    +  if( p->pDestDb ){
    +    sqlite3_mutex_leave(p->pDestDb->mutex);
    +  }
    +  sqlite3BtreeLeave(p->pSrc);
    +  sqlite3_mutex_leave(p->pSrcDb->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Release all resources associated with an sqlite3_backup* handle.
    +*/
    +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
    +  sqlite3_backup **pp;                 /* Ptr to head of pagers backup list */
    +  sqlite3_mutex *mutex;                /* Mutex to protect source database */
    +  int rc;                              /* Value to return */
    +
    +  /* Enter the mutexes */
    +  if( p==0 ) return SQLITE_OK;
    +  sqlite3_mutex_enter(p->pSrcDb->mutex);
    +  sqlite3BtreeEnter(p->pSrc);
    +  mutex = p->pSrcDb->mutex;
    +  if( p->pDestDb ){
    +    sqlite3_mutex_enter(p->pDestDb->mutex);
    +  }
    +
    +  /* Detach this backup from the source pager. */
    +  if( p->pDestDb ){
    +    p->pSrc->nBackup--;
    +  }
    +  if( p->isAttached ){
    +    pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
    +    while( *pp!=p ){
    +      pp = &(*pp)->pNext;
    +    }
    +    *pp = p->pNext;
    +  }
    +
    +  /* If a transaction is still open on the Btree, roll it back. */
    +  sqlite3BtreeRollback(p->pDest);
    +
    +  /* Set the error code of the destination database handle. */
    +  rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc;
    +  sqlite3Error(p->pDestDb, rc, 0);
    +
    +  /* Exit the mutexes and free the backup context structure. */
    +  if( p->pDestDb ){
    +    sqlite3_mutex_leave(p->pDestDb->mutex);
    +  }
    +  sqlite3BtreeLeave(p->pSrc);
    +  if( p->pDestDb ){
    +    sqlite3_free(p);
    +  }
    +  sqlite3_mutex_leave(mutex);
    +  return rc;
    +}
    +
    +/*
    +** Return the number of pages still to be backed up as of the most recent
    +** call to sqlite3_backup_step().
    +*/
    +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
    +  return p->nRemaining;
    +}
    +
    +/*
    +** Return the total number of pages in the source database as of the most 
    +** recent call to sqlite3_backup_step().
    +*/
    +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
    +  return p->nPagecount;
    +}
    +
    +/*
    +** This function is called after the contents of page iPage of the
    +** source database have been modified. If page iPage has already been 
    +** copied into the destination database, then the data written to the
    +** destination is now invalidated. The destination copy of iPage needs
    +** to be updated with the new data before the backup operation is
    +** complete.
    +**
    +** It is assumed that the mutex associated with the BtShared object
    +** corresponding to the source database is held when this function is
    +** called.
    +*/
    +SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
    +  sqlite3_backup *p;                   /* Iterator variable */
    +  for(p=pBackup; p; p=p->pNext){
    +    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
    +    if( !isFatalError(p->rc) && iPage<p->iNext ){
    +      /* The backup process p has already copied page iPage. But now it
    +      ** has been modified by a transaction on the source pager. Copy
    +      ** the new data into the backup.
    +      */
    +      int rc = backupOnePage(p, iPage, aData);
    +      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
    +      if( rc!=SQLITE_OK ){
    +        p->rc = rc;
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Restart the backup process. This is called when the pager layer
    +** detects that the database has been modified by an external database
    +** connection. In this case there is no way of knowing which of the
    +** pages that have been copied into the destination database are still 
    +** valid and which are not, so the entire process needs to be restarted.
    +**
    +** It is assumed that the mutex associated with the BtShared object
    +** corresponding to the source database is held when this function is
    +** called.
    +*/
    +SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *pBackup){
    +  sqlite3_backup *p;                   /* Iterator variable */
    +  for(p=pBackup; p; p=p->pNext){
    +    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
    +    p->iNext = 1;
    +  }
    +}
    +
    +#ifndef SQLITE_OMIT_VACUUM
    +/*
    +** Copy the complete content of pBtFrom into pBtTo.  A transaction
    +** must be active for both files.
    +**
    +** The size of file pTo may be reduced by this operation. If anything 
    +** goes wrong, the transaction on pTo is rolled back. If successful, the 
    +** transaction is committed before returning.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
    +  int rc;
    +  sqlite3_backup b;
    +  sqlite3BtreeEnter(pTo);
    +  sqlite3BtreeEnter(pFrom);
    +
    +  /* Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set
    +  ** to 0. This is used by the implementations of sqlite3_backup_step()
    +  ** and sqlite3_backup_finish() to detect that they are being called
    +  ** from this function, not directly by the user.
    +  */
    +  memset(&b, 0, sizeof(b));
    +  b.pSrcDb = pFrom->db;
    +  b.pSrc = pFrom;
    +  b.pDest = pTo;
    +  b.iNext = 1;
    +
    +  /* 0x7FFFFFFF is the hard limit for the number of pages in a database
    +  ** file. By passing this as the number of pages to copy to
    +  ** sqlite3_backup_step(), we can guarantee that the copy finishes 
    +  ** within a single call (unless an error occurs). The assert() statement
    +  ** checks this assumption - (p->rc) should be set to either SQLITE_DONE 
    +  ** or an error code.
    +  */
    +  sqlite3_backup_step(&b, 0x7FFFFFFF);
    +  assert( b.rc!=SQLITE_OK );
    +  rc = sqlite3_backup_finish(&b);
    +  if( rc==SQLITE_OK ){
    +    pTo->pBt->pageSizeFixed = 0;
    +  }
    +
    +  sqlite3BtreeLeave(pFrom);
    +  sqlite3BtreeLeave(pTo);
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_VACUUM */
    +
    +/************** End of backup.c **********************************************/
    +/************** Begin file vdbemem.c *****************************************/
    +/*
    +** 2004 May 26
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains code use to manipulate "Mem" structure.  A "Mem"
    +** stores a single value in the VDBE.  Mem is an opaque structure visible
    +** only within the VDBE.  Interface routines refer to a Mem using the
    +** name sqlite_value
    +**
    +** $Id: vdbemem.c,v 1.152 2009/07/22 18:07:41 drh Exp $
    +*/
    +
    +/*
    +** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
    +** P if required.
    +*/
    +#define expandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)
    +
    +/*
    +** If pMem is an object with a valid string representation, this routine
    +** ensures the internal encoding for the string representation is
    +** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.
    +**
    +** If pMem is not a string object, or the encoding of the string
    +** representation is already stored using the requested encoding, then this
    +** routine is a no-op.
    +**
    +** SQLITE_OK is returned if the conversion is successful (or not required).
    +** SQLITE_NOMEM may be returned if a malloc() fails during conversion
    +** between formats.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
    +  int rc;
    +  assert( (pMem->flags&MEM_RowSet)==0 );
    +  assert( desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE
    +           || desiredEnc==SQLITE_UTF16BE );
    +  if( !(pMem->flags&MEM_Str) || pMem->enc==desiredEnc ){
    +    return SQLITE_OK;
    +  }
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +#ifdef SQLITE_OMIT_UTF16
    +  return SQLITE_ERROR;
    +#else
    +
    +  /* MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned,
    +  ** then the encoding of the value may not have changed.
    +  */
    +  rc = sqlite3VdbeMemTranslate(pMem, (u8)desiredEnc);
    +  assert(rc==SQLITE_OK    || rc==SQLITE_NOMEM);
    +  assert(rc==SQLITE_OK    || pMem->enc!=desiredEnc);
    +  assert(rc==SQLITE_NOMEM || pMem->enc==desiredEnc);
    +  return rc;
    +#endif
    +}
    +
    +/*
    +** Make sure pMem->z points to a writable allocation of at least 
    +** n bytes.
    +**
    +** If the memory cell currently contains string or blob data
    +** and the third argument passed to this function is true, the 
    +** current content of the cell is preserved. Otherwise, it may
    +** be discarded.  
    +**
    +** This function sets the MEM_Dyn flag and clears any xDel callback.
    +** It also clears MEM_Ephem and MEM_Static. If the preserve flag is 
    +** not set, Mem.n is zeroed.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve){
    +  assert( 1 >=
    +    ((pMem->zMalloc && pMem->zMalloc==pMem->z) ? 1 : 0) +
    +    (((pMem->flags&MEM_Dyn)&&pMem->xDel) ? 1 : 0) + 
    +    ((pMem->flags&MEM_Ephem) ? 1 : 0) + 
    +    ((pMem->flags&MEM_Static) ? 1 : 0)
    +  );
    +  assert( (pMem->flags&MEM_RowSet)==0 );
    +
    +  if( n<32 ) n = 32;
    +  if( sqlite3DbMallocSize(pMem->db, pMem->zMalloc)<n ){
    +    if( preserve && pMem->z==pMem->zMalloc ){
    +      pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);
    +      preserve = 0;
    +    }else{
    +      sqlite3DbFree(pMem->db, pMem->zMalloc);
    +      pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);
    +    }
    +  }
    +
    +  if( pMem->z && preserve && pMem->zMalloc && pMem->z!=pMem->zMalloc ){
    +    memcpy(pMem->zMalloc, pMem->z, pMem->n);
    +  }
    +  if( pMem->flags&MEM_Dyn && pMem->xDel ){
    +    pMem->xDel((void *)(pMem->z));
    +  }
    +
    +  pMem->z = pMem->zMalloc;
    +  if( pMem->z==0 ){
    +    pMem->flags = MEM_Null;
    +  }else{
    +    pMem->flags &= ~(MEM_Ephem|MEM_Static);
    +  }
    +  pMem->xDel = 0;
    +  return (pMem->z ? SQLITE_OK : SQLITE_NOMEM);
    +}
    +
    +/*
    +** Make the given Mem object MEM_Dyn.  In other words, make it so
    +** that any TEXT or BLOB content is stored in memory obtained from
    +** malloc().  In this way, we know that the memory is safe to be
    +** overwritten or altered.
    +**
    +** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
    +  int f;
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( (pMem->flags&MEM_RowSet)==0 );
    +  expandBlob(pMem);
    +  f = pMem->flags;
    +  if( (f&(MEM_Str|MEM_Blob)) && pMem->z!=pMem->zMalloc ){
    +    if( sqlite3VdbeMemGrow(pMem, pMem->n + 2, 1) ){
    +      return SQLITE_NOMEM;
    +    }
    +    pMem->z[pMem->n] = 0;
    +    pMem->z[pMem->n+1] = 0;
    +    pMem->flags |= MEM_Term;
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** If the given Mem* has a zero-filled tail, turn it into an ordinary
    +** blob stored in dynamically allocated space.
    +*/
    +#ifndef SQLITE_OMIT_INCRBLOB
    +SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
    +  if( pMem->flags & MEM_Zero ){
    +    int nByte;
    +    assert( pMem->flags&MEM_Blob );
    +    assert( (pMem->flags&MEM_RowSet)==0 );
    +    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +
    +    /* Set nByte to the number of bytes required to store the expanded blob. */
    +    nByte = pMem->n + pMem->u.nZero;
    +    if( nByte<=0 ){
    +      nByte = 1;
    +    }
    +    if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
    +      return SQLITE_NOMEM;
    +    }
    +
    +    memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
    +    pMem->n += pMem->u.nZero;
    +    pMem->flags &= ~(MEM_Zero|MEM_Term);
    +  }
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +
    +/*
    +** Make sure the given Mem is \u0000 terminated.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  if( (pMem->flags & MEM_Term)!=0 || (pMem->flags & MEM_Str)==0 ){
    +    return SQLITE_OK;   /* Nothing to do */
    +  }
    +  if( sqlite3VdbeMemGrow(pMem, pMem->n+2, 1) ){
    +    return SQLITE_NOMEM;
    +  }
    +  pMem->z[pMem->n] = 0;
    +  pMem->z[pMem->n+1] = 0;
    +  pMem->flags |= MEM_Term;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Add MEM_Str to the set of representations for the given Mem.  Numbers
    +** are converted using sqlite3_snprintf().  Converting a BLOB to a string
    +** is a no-op.
    +**
    +** Existing representations MEM_Int and MEM_Real are *not* invalidated.
    +**
    +** A MEM_Null value will never be passed to this function. This function is
    +** used for converting values to text for returning to the user (i.e. via
    +** sqlite3_value_text()), or for ensuring that values to be used as btree
    +** keys are strings. In the former case a NULL pointer is returned the
    +** user and the later is an internal programming error.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, int enc){
    +  int rc = SQLITE_OK;
    +  int fg = pMem->flags;
    +  const int nByte = 32;
    +
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( !(fg&MEM_Zero) );
    +  assert( !(fg&(MEM_Str|MEM_Blob)) );
    +  assert( fg&(MEM_Int|MEM_Real) );
    +  assert( (pMem->flags&MEM_RowSet)==0 );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +
    +
    +  if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  /* For a Real or Integer, use sqlite3_mprintf() to produce the UTF-8
    +  ** string representation of the value. Then, if the required encoding
    +  ** is UTF-16le or UTF-16be do a translation.
    +  ** 
    +  ** FIX ME: It would be better if sqlite3_snprintf() could do UTF-16.
    +  */
    +  if( fg & MEM_Int ){
    +    sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
    +  }else{
    +    assert( fg & MEM_Real );
    +    sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r);
    +  }
    +  pMem->n = sqlite3Strlen30(pMem->z);
    +  pMem->enc = SQLITE_UTF8;
    +  pMem->flags |= MEM_Str|MEM_Term;
    +  sqlite3VdbeChangeEncoding(pMem, enc);
    +  return rc;
    +}
    +
    +/*
    +** Memory cell pMem contains the context of an aggregate function.
    +** This routine calls the finalize method for that function.  The
    +** result of the aggregate is stored back into pMem.
    +**
    +** Return SQLITE_ERROR if the finalizer reports an error.  SQLITE_OK
    +** otherwise.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
    +  int rc = SQLITE_OK;
    +  if( ALWAYS(pFunc && pFunc->xFinalize) ){
    +    sqlite3_context ctx;
    +    assert( (pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef );
    +    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +    memset(&ctx, 0, sizeof(ctx));
    +    ctx.s.flags = MEM_Null;
    +    ctx.s.db = pMem->db;
    +    ctx.pMem = pMem;
    +    ctx.pFunc = pFunc;
    +    pFunc->xFinalize(&ctx);
    +    assert( 0==(pMem->flags&MEM_Dyn) && !pMem->xDel );
    +    sqlite3DbFree(pMem->db, pMem->zMalloc);
    +    memcpy(pMem, &ctx.s, sizeof(ctx.s));
    +    rc = ctx.isError;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** If the memory cell contains a string value that must be freed by
    +** invoking an external callback, free it now. Calling this function
    +** does not free any Mem.zMalloc buffer.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p){
    +  assert( p->db==0 || sqlite3_mutex_held(p->db->mutex) );
    +  testcase( p->flags & MEM_Agg );
    +  testcase( p->flags & MEM_Dyn );
    +  testcase( p->flags & MEM_RowSet );
    +  testcase( p->flags & MEM_Frame );
    +  if( p->flags&(MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame) ){
    +    if( p->flags&MEM_Agg ){
    +      sqlite3VdbeMemFinalize(p, p->u.pDef);
    +      assert( (p->flags & MEM_Agg)==0 );
    +      sqlite3VdbeMemRelease(p);
    +    }else if( p->flags&MEM_Dyn && p->xDel ){
    +      assert( (p->flags&MEM_RowSet)==0 );
    +      p->xDel((void *)p->z);
    +      p->xDel = 0;
    +    }else if( p->flags&MEM_RowSet ){
    +      sqlite3RowSetClear(p->u.pRowSet);
    +    }else if( p->flags&MEM_Frame ){
    +      sqlite3VdbeMemSetNull(p);
    +    }
    +  }
    +}
    +
    +/*
    +** Release any memory held by the Mem. This may leave the Mem in an
    +** inconsistent state, for example with (Mem.z==0) and
    +** (Mem.type==SQLITE_TEXT).
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
    +  sqlite3VdbeMemReleaseExternal(p);
    +  sqlite3DbFree(p->db, p->zMalloc);
    +  p->z = 0;
    +  p->zMalloc = 0;
    +  p->xDel = 0;
    +}
    +
    +/*
    +** Convert a 64-bit IEEE double into a 64-bit signed integer.
    +** If the double is too large, return 0x8000000000000000.
    +**
    +** Most systems appear to do this simply by assigning
    +** variables and without the extra range tests.  But
    +** there are reports that windows throws an expection
    +** if the floating point value is out of range. (See ticket #2880.)
    +** Because we do not completely understand the problem, we will
    +** take the conservative approach and always do range tests
    +** before attempting the conversion.
    +*/
    +static i64 doubleToInt64(double r){
    +  /*
    +  ** Many compilers we encounter do not define constants for the
    +  ** minimum and maximum 64-bit integers, or they define them
    +  ** inconsistently.  And many do not understand the "LL" notation.
    +  ** So we define our own static constants here using nothing
    +  ** larger than a 32-bit integer constant.
    +  */
    +  static const i64 maxInt = LARGEST_INT64;
    +  static const i64 minInt = SMALLEST_INT64;
    +
    +  if( r<(double)minInt ){
    +    return minInt;
    +  }else if( r>(double)maxInt ){
    +    /* minInt is correct here - not maxInt.  It turns out that assigning
    +    ** a very large positive number to an integer results in a very large
    +    ** negative integer.  This makes no sense, but it is what x86 hardware
    +    ** does so for compatibility we will do the same in software. */
    +    return minInt;
    +  }else{
    +    return (i64)r;
    +  }
    +}
    +
    +/*
    +** Return some kind of integer value which is the best we can do
    +** at representing the value that *pMem describes as an integer.
    +** If pMem is an integer, then the value is exact.  If pMem is
    +** a floating-point then the value returned is the integer part.
    +** If pMem is a string or blob, then we make an attempt to convert
    +** it into a integer and return that.  If pMem represents an
    +** an SQL-NULL value, return 0.
    +**
    +** If pMem represents a string value, its encoding might be changed.
    +*/
    +SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
    +  int flags;
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +  flags = pMem->flags;
    +  if( flags & MEM_Int ){
    +    return pMem->u.i;
    +  }else if( flags & MEM_Real ){
    +    return doubleToInt64(pMem->r);
    +  }else if( flags & (MEM_Str|MEM_Blob) ){
    +    i64 value;
    +    pMem->flags |= MEM_Str;
    +    if( sqlite3VdbeChangeEncoding(pMem, SQLITE_UTF8)
    +       || sqlite3VdbeMemNulTerminate(pMem) ){
    +      return 0;
    +    }
    +    assert( pMem->z );
    +    sqlite3Atoi64(pMem->z, &value);
    +    return value;
    +  }else{
    +    return 0;
    +  }
    +}
    +
    +/*
    +** Return the best representation of pMem that we can get into a
    +** double.  If pMem is already a double or an integer, return its
    +** value.  If it is a string or blob, try to convert it to a double.
    +** If it is a NULL, return 0.0.
    +*/
    +SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +  if( pMem->flags & MEM_Real ){
    +    return pMem->r;
    +  }else if( pMem->flags & MEM_Int ){
    +    return (double)pMem->u.i;
    +  }else if( pMem->flags & (MEM_Str|MEM_Blob) ){
    +    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +    double val = (double)0;
    +    pMem->flags |= MEM_Str;
    +    if( sqlite3VdbeChangeEncoding(pMem, SQLITE_UTF8)
    +       || sqlite3VdbeMemNulTerminate(pMem) ){
    +      /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +      return (double)0;
    +    }
    +    assert( pMem->z );
    +    sqlite3AtoF(pMem->z, &val);
    +    return val;
    +  }else{
    +    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +    return (double)0;
    +  }
    +}
    +
    +/*
    +** The MEM structure is already a MEM_Real.  Try to also make it a
    +** MEM_Int if we can.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
    +  assert( pMem->flags & MEM_Real );
    +  assert( (pMem->flags & MEM_RowSet)==0 );
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +
    +  pMem->u.i = doubleToInt64(pMem->r);
    +
    +  /* Only mark the value as an integer if
    +  **
    +  **    (1) the round-trip conversion real->int->real is a no-op, and
    +  **    (2) The integer is neither the largest nor the smallest
    +  **        possible integer (ticket #3922)
    +  **
    +  ** The second and third terms in the following conditional enforces
    +  ** the second condition under the assumption that addition overflow causes
    +  ** values to wrap around.  On x86 hardware, the third term is always
    +  ** true and could be omitted.  But we leave it in because other
    +  ** architectures might behave differently.
    +  */
    +  if( pMem->r==(double)pMem->u.i && pMem->u.i>SMALLEST_INT64
    +      && ALWAYS(pMem->u.i<LARGEST_INT64) ){
    +    pMem->flags |= MEM_Int;
    +  }
    +}
    +
    +/*
    +** Convert pMem to type integer.  Invalidate any prior representations.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( (pMem->flags & MEM_RowSet)==0 );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +
    +  pMem->u.i = sqlite3VdbeIntValue(pMem);
    +  MemSetTypeFlag(pMem, MEM_Int);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Convert pMem so that it is of type MEM_Real.
    +** Invalidate any prior representations.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +
    +  pMem->r = sqlite3VdbeRealValue(pMem);
    +  MemSetTypeFlag(pMem, MEM_Real);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Convert pMem so that it has types MEM_Real or MEM_Int or both.
    +** Invalidate any prior representations.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
    +  double r1, r2;
    +  i64 i;
    +  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))==0 );
    +  assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  r1 = sqlite3VdbeRealValue(pMem);
    +  i = doubleToInt64(r1);
    +  r2 = (double)i;
    +  if( r1==r2 ){
    +    sqlite3VdbeMemIntegerify(pMem);
    +  }else{
    +    pMem->r = r1;
    +    MemSetTypeFlag(pMem, MEM_Real);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Delete any previous value and set the value stored in *pMem to NULL.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem *pMem){
    +  if( pMem->flags & MEM_Frame ){
    +    sqlite3VdbeFrameDelete(pMem->u.pFrame);
    +  }
    +  if( pMem->flags & MEM_RowSet ){
    +    sqlite3RowSetClear(pMem->u.pRowSet);
    +  }
    +  MemSetTypeFlag(pMem, MEM_Null);
    +  pMem->type = SQLITE_NULL;
    +}
    +
    +/*
    +** Delete any previous value and set the value to be a BLOB of length
    +** n containing all zeros.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
    +  sqlite3VdbeMemRelease(pMem);
    +  pMem->flags = MEM_Blob|MEM_Zero;
    +  pMem->type = SQLITE_BLOB;
    +  pMem->n = 0;
    +  if( n<0 ) n = 0;
    +  pMem->u.nZero = n;
    +  pMem->enc = SQLITE_UTF8;
    +
    +#ifdef SQLITE_OMIT_INCRBLOB
    +  sqlite3VdbeMemGrow(pMem, n, 0);
    +  if( pMem->z ){
    +    pMem->n = n;
    +    memset(pMem->z, 0, n);
    +  }
    +#endif
    +}
    +
    +/*
    +** Delete any previous value and set the value stored in *pMem to val,
    +** manifest type INTEGER.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
    +  sqlite3VdbeMemRelease(pMem);
    +  pMem->u.i = val;
    +  pMem->flags = MEM_Int;
    +  pMem->type = SQLITE_INTEGER;
    +}
    +
    +/*
    +** Delete any previous value and set the value stored in *pMem to val,
    +** manifest type REAL.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
    +  if( sqlite3IsNaN(val) ){
    +    sqlite3VdbeMemSetNull(pMem);
    +  }else{
    +    sqlite3VdbeMemRelease(pMem);
    +    pMem->r = val;
    +    pMem->flags = MEM_Real;
    +    pMem->type = SQLITE_FLOAT;
    +  }
    +}
    +
    +/*
    +** Delete any previous value and set the value of pMem to be an
    +** empty boolean index.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
    +  sqlite3 *db = pMem->db;
    +  assert( db!=0 );
    +  assert( (pMem->flags & MEM_RowSet)==0 );
    +  sqlite3VdbeMemRelease(pMem);
    +  pMem->zMalloc = sqlite3DbMallocRaw(db, 64);
    +  if( db->mallocFailed ){
    +    pMem->flags = MEM_Null;
    +  }else{
    +    assert( pMem->zMalloc );
    +    pMem->u.pRowSet = sqlite3RowSetInit(db, pMem->zMalloc, 
    +                                       sqlite3DbMallocSize(db, pMem->zMalloc));
    +    assert( pMem->u.pRowSet!=0 );
    +    pMem->flags = MEM_RowSet;
    +  }
    +}
    +
    +/*
    +** Return true if the Mem object contains a TEXT or BLOB that is
    +** too large - whose size exceeds SQLITE_MAX_LENGTH.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){
    +  assert( p->db!=0 );
    +  if( p->flags & (MEM_Str|MEM_Blob) ){
    +    int n = p->n;
    +    if( p->flags & MEM_Zero ){
    +      n += p->u.nZero;
    +    }
    +    return n>p->db->aLimit[SQLITE_LIMIT_LENGTH];
    +  }
    +  return 0; 
    +}
    +
    +/*
    +** Size of struct Mem not including the Mem.zMalloc member.
    +*/
    +#define MEMCELLSIZE (size_t)(&(((Mem *)0)->zMalloc))
    +
    +/*
    +** Make an shallow copy of pFrom into pTo.  Prior contents of
    +** pTo are freed.  The pFrom->z field is not duplicated.  If
    +** pFrom->z is used, then pTo->z points to the same thing as pFrom->z
    +** and flags gets srcType (either MEM_Ephem or MEM_Static).
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
    +  assert( (pFrom->flags & MEM_RowSet)==0 );
    +  sqlite3VdbeMemReleaseExternal(pTo);
    +  memcpy(pTo, pFrom, MEMCELLSIZE);
    +  pTo->xDel = 0;
    +  if( (pFrom->flags&MEM_Dyn)!=0 || pFrom->z==pFrom->zMalloc ){
    +    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
    +    assert( srcType==MEM_Ephem || srcType==MEM_Static );
    +    pTo->flags |= srcType;
    +  }
    +}
    +
    +/*
    +** Make a full copy of pFrom into pTo.  Prior contents of pTo are
    +** freed before the copy is made.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
    +  int rc = SQLITE_OK;
    +
    +  assert( (pFrom->flags & MEM_RowSet)==0 );
    +  sqlite3VdbeMemReleaseExternal(pTo);
    +  memcpy(pTo, pFrom, MEMCELLSIZE);
    +  pTo->flags &= ~MEM_Dyn;
    +
    +  if( pTo->flags&(MEM_Str|MEM_Blob) ){
    +    if( 0==(pFrom->flags&MEM_Static) ){
    +      pTo->flags |= MEM_Ephem;
    +      rc = sqlite3VdbeMemMakeWriteable(pTo);
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Transfer the contents of pFrom to pTo. Any existing value in pTo is
    +** freed. If pFrom contains ephemeral data, a copy is made.
    +**
    +** pFrom contains an SQL NULL when this routine returns.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
    +  assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
    +  assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
    +  assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
    +
    +  sqlite3VdbeMemRelease(pTo);
    +  memcpy(pTo, pFrom, sizeof(Mem));
    +  pFrom->flags = MEM_Null;
    +  pFrom->xDel = 0;
    +  pFrom->zMalloc = 0;
    +}
    +
    +/*
    +** Change the value of a Mem to be a string or a BLOB.
    +**
    +** The memory management strategy depends on the value of the xDel
    +** parameter. If the value passed is SQLITE_TRANSIENT, then the 
    +** string is copied into a (possibly existing) buffer managed by the 
    +** Mem structure. Otherwise, any existing buffer is freed and the
    +** pointer copied.
    +**
    +** If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH
    +** size limit) then no memory allocation occurs.  If the string can be
    +** stored without allocating memory, then it is.  If a memory allocation
    +** is required to store the string, then value of pMem is unchanged.  In
    +** either case, SQLITE_TOOBIG is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
    +  Mem *pMem,          /* Memory cell to set to string value */
    +  const char *z,      /* String pointer */
    +  int n,              /* Bytes in string, or negative */
    +  u8 enc,             /* Encoding of z.  0 for BLOBs */
    +  void (*xDel)(void*) /* Destructor function */
    +){
    +  int nByte = n;      /* New value for pMem->n */
    +  int iLimit;         /* Maximum allowed string or blob size */
    +  u16 flags = 0;      /* New value for pMem->flags */
    +
    +  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    +  assert( (pMem->flags & MEM_RowSet)==0 );
    +
    +  /* If z is a NULL pointer, set pMem to contain an SQL NULL. */
    +  if( !z ){
    +    sqlite3VdbeMemSetNull(pMem);
    +    return SQLITE_OK;
    +  }
    +
    +  if( pMem->db ){
    +    iLimit = pMem->db->aLimit[SQLITE_LIMIT_LENGTH];
    +  }else{
    +    iLimit = SQLITE_MAX_LENGTH;
    +  }
    +  flags = (enc==0?MEM_Blob:MEM_Str);
    +  if( nByte<0 ){
    +    assert( enc!=0 );
    +    if( enc==SQLITE_UTF8 ){
    +      for(nByte=0; nByte<=iLimit && z[nByte]; nByte++){}
    +    }else{
    +      for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
    +    }
    +    flags |= MEM_Term;
    +  }
    +
    +  /* The following block sets the new values of Mem.z and Mem.xDel. It
    +  ** also sets a flag in local variable "flags" to indicate the memory
    +  ** management (one of MEM_Dyn or MEM_Static).
    +  */
    +  if( xDel==SQLITE_TRANSIENT ){
    +    int nAlloc = nByte;
    +    if( flags&MEM_Term ){
    +      nAlloc += (enc==SQLITE_UTF8?1:2);
    +    }
    +    if( nByte>iLimit ){
    +      return SQLITE_TOOBIG;
    +    }
    +    if( sqlite3VdbeMemGrow(pMem, nAlloc, 0) ){
    +      return SQLITE_NOMEM;
    +    }
    +    memcpy(pMem->z, z, nAlloc);
    +  }else if( xDel==SQLITE_DYNAMIC ){
    +    sqlite3VdbeMemRelease(pMem);
    +    pMem->zMalloc = pMem->z = (char *)z;
    +    pMem->xDel = 0;
    +  }else{
    +    sqlite3VdbeMemRelease(pMem);
    +    pMem->z = (char *)z;
    +    pMem->xDel = xDel;
    +    flags |= ((xDel==SQLITE_STATIC)?MEM_Static:MEM_Dyn);
    +  }
    +
    +  pMem->n = nByte;
    +  pMem->flags = flags;
    +  pMem->enc = (enc==0 ? SQLITE_UTF8 : enc);
    +  pMem->type = (enc==0 ? SQLITE_BLOB : SQLITE_TEXT);
    +
    +#ifndef SQLITE_OMIT_UTF16
    +  if( pMem->enc!=SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem) ){
    +    return SQLITE_NOMEM;
    +  }
    +#endif
    +
    +  if( nByte>iLimit ){
    +    return SQLITE_TOOBIG;
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Compare the values contained by the two memory cells, returning
    +** negative, zero or positive if pMem1 is less than, equal to, or greater
    +** than pMem2. Sorting order is NULL's first, followed by numbers (integers
    +** and reals) sorted numerically, followed by text ordered by the collating
    +** sequence pColl and finally blob's ordered by memcmp().
    +**
    +** Two NULL values are considered equal by this function.
    +*/
    +SQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
    +  int rc;
    +  int f1, f2;
    +  int combined_flags;
    +
    +  /* Interchange pMem1 and pMem2 if the collating sequence specifies
    +  ** DESC order.
    +  */
    +  f1 = pMem1->flags;
    +  f2 = pMem2->flags;
    +  combined_flags = f1|f2;
    +  assert( (combined_flags & MEM_RowSet)==0 );
    + 
    +  /* If one value is NULL, it is less than the other. If both values
    +  ** are NULL, return 0.
    +  */
    +  if( combined_flags&MEM_Null ){
    +    return (f2&MEM_Null) - (f1&MEM_Null);
    +  }
    +
    +  /* If one value is a number and the other is not, the number is less.
    +  ** If both are numbers, compare as reals if one is a real, or as integers
    +  ** if both values are integers.
    +  */
    +  if( combined_flags&(MEM_Int|MEM_Real) ){
    +    if( !(f1&(MEM_Int|MEM_Real)) ){
    +      return 1;
    +    }
    +    if( !(f2&(MEM_Int|MEM_Real)) ){
    +      return -1;
    +    }
    +    if( (f1 & f2 & MEM_Int)==0 ){
    +      double r1, r2;
    +      if( (f1&MEM_Real)==0 ){
    +        r1 = (double)pMem1->u.i;
    +      }else{
    +        r1 = pMem1->r;
    +      }
    +      if( (f2&MEM_Real)==0 ){
    +        r2 = (double)pMem2->u.i;
    +      }else{
    +        r2 = pMem2->r;
    +      }
    +      if( r1<r2 ) return -1;
    +      if( r1>r2 ) return 1;
    +      return 0;
    +    }else{
    +      assert( f1&MEM_Int );
    +      assert( f2&MEM_Int );
    +      if( pMem1->u.i < pMem2->u.i ) return -1;
    +      if( pMem1->u.i > pMem2->u.i ) return 1;
    +      return 0;
    +    }
    +  }
    +
    +  /* If one value is a string and the other is a blob, the string is less.
    +  ** If both are strings, compare using the collating functions.
    +  */
    +  if( combined_flags&MEM_Str ){
    +    if( (f1 & MEM_Str)==0 ){
    +      return 1;
    +    }
    +    if( (f2 & MEM_Str)==0 ){
    +      return -1;
    +    }
    +
    +    assert( pMem1->enc==pMem2->enc );
    +    assert( pMem1->enc==SQLITE_UTF8 || 
    +            pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );
    +
    +    /* The collation sequence must be defined at this point, even if
    +    ** the user deletes the collation sequence after the vdbe program is
    +    ** compiled (this was not always the case).
    +    */
    +    assert( !pColl || pColl->xCmp );
    +
    +    if( pColl ){
    +      if( pMem1->enc==pColl->enc ){
    +        /* The strings are already in the correct encoding.  Call the
    +        ** comparison function directly */
    +        return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);
    +      }else{
    +        const void *v1, *v2;
    +        int n1, n2;
    +        Mem c1;
    +        Mem c2;
    +        memset(&c1, 0, sizeof(c1));
    +        memset(&c2, 0, sizeof(c2));
    +        sqlite3VdbeMemShallowCopy(&c1, pMem1, MEM_Ephem);
    +        sqlite3VdbeMemShallowCopy(&c2, pMem2, MEM_Ephem);
    +        v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
    +        n1 = v1==0 ? 0 : c1.n;
    +        v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
    +        n2 = v2==0 ? 0 : c2.n;
    +        rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
    +        sqlite3VdbeMemRelease(&c1);
    +        sqlite3VdbeMemRelease(&c2);
    +        return rc;
    +      }
    +    }
    +    /* If a NULL pointer was passed as the collate function, fall through
    +    ** to the blob case and use memcmp().  */
    +  }
    + 
    +  /* Both values must be blobs.  Compare using memcmp().  */
    +  rc = memcmp(pMem1->z, pMem2->z, (pMem1->n>pMem2->n)?pMem2->n:pMem1->n);
    +  if( rc==0 ){
    +    rc = pMem1->n - pMem2->n;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Move data out of a btree key or data field and into a Mem structure.
    +** The data or key is taken from the entry that pCur is currently pointing
    +** to.  offset and amt determine what portion of the data or key to retrieve.
    +** key is true to get the key or false to get data.  The result is written
    +** into the pMem element.
    +**
    +** The pMem structure is assumed to be uninitialized.  Any prior content
    +** is overwritten without being freed.
    +**
    +** If this routine fails for any reason (malloc returns NULL or unable
    +** to read from the disk) then the pMem is left in an inconsistent state.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
    +  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
    +  int offset,       /* Offset from the start of data to return bytes from. */
    +  int amt,          /* Number of bytes to return. */
    +  int key,          /* If true, retrieve from the btree key, not data. */
    +  Mem *pMem         /* OUT: Return data in this Mem structure. */
    +){
    +  char *zData;        /* Data from the btree layer */
    +  int available = 0;  /* Number of bytes available on the local btree page */
    +  int rc = SQLITE_OK; /* Return code */
    +
    +  assert( sqlite3BtreeCursorIsValid(pCur) );
    +
    +  /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert() 
    +  ** that both the BtShared and database handle mutexes are held. */
    +  assert( (pMem->flags & MEM_RowSet)==0 );
    +  if( key ){
    +    zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);
    +  }else{
    +    zData = (char *)sqlite3BtreeDataFetch(pCur, &available);
    +  }
    +  assert( zData!=0 );
    +
    +  if( offset+amt<=available && (pMem->flags&MEM_Dyn)==0 ){
    +    sqlite3VdbeMemRelease(pMem);
    +    pMem->z = &zData[offset];
    +    pMem->flags = MEM_Blob|MEM_Ephem;
    +  }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){
    +    pMem->flags = MEM_Blob|MEM_Dyn|MEM_Term;
    +    pMem->enc = 0;
    +    pMem->type = SQLITE_BLOB;
    +    if( key ){
    +      rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
    +    }else{
    +      rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
    +    }
    +    pMem->z[amt] = 0;
    +    pMem->z[amt+1] = 0;
    +    if( rc!=SQLITE_OK ){
    +      sqlite3VdbeMemRelease(pMem);
    +    }
    +  }
    +  pMem->n = amt;
    +
    +  return rc;
    +}
    +
    +/* This function is only available internally, it is not part of the
    +** external API. It works in a similar way to sqlite3_value_text(),
    +** except the data returned is in the encoding specified by the second
    +** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or
    +** SQLITE_UTF8.
    +**
    +** (2006-02-16:)  The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
    +** If that is the case, then the result must be aligned on an even byte
    +** boundary.
    +*/
    +SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
    +  if( !pVal ) return 0;
    +
    +  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
    +  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
    +  assert( (pVal->flags & MEM_RowSet)==0 );
    +
    +  if( pVal->flags&MEM_Null ){
    +    return 0;
    +  }
    +  assert( (MEM_Blob>>3) == MEM_Str );
    +  pVal->flags |= (pVal->flags & MEM_Blob)>>3;
    +  expandBlob(pVal);
    +  if( pVal->flags&MEM_Str ){
    +    sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
    +    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
    +      assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
    +      if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
    +        return 0;
    +      }
    +    }
    +    sqlite3VdbeMemNulTerminate(pVal);
    +  }else{
    +    assert( (pVal->flags&MEM_Blob)==0 );
    +    sqlite3VdbeMemStringify(pVal, enc);
    +    assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
    +  }
    +  assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
    +              || pVal->db->mallocFailed );
    +  if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
    +    return pVal->z;
    +  }else{
    +    return 0;
    +  }
    +}
    +
    +/*
    +** Create a new sqlite3_value object.
    +*/
    +SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
    +  Mem *p = sqlite3DbMallocZero(db, sizeof(*p));
    +  if( p ){
    +    p->flags = MEM_Null;
    +    p->type = SQLITE_NULL;
    +    p->db = db;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Create a new sqlite3_value object, containing the value of pExpr.
    +**
    +** This only works for very simple expressions that consist of one constant
    +** token (i.e. "5", "5.1", "'a string'"). If the expression can
    +** be converted directly into a value, then the value is allocated and
    +** a pointer written to *ppVal. The caller is responsible for deallocating
    +** the value by passing it to sqlite3ValueFree() later on. If the expression
    +** cannot be converted to a value, then *ppVal is set to NULL.
    +*/
    +SQLITE_PRIVATE int sqlite3ValueFromExpr(
    +  sqlite3 *db,              /* The database connection */
    +  Expr *pExpr,              /* The expression to evaluate */
    +  u8 enc,                   /* Encoding to use */
    +  u8 affinity,              /* Affinity to use */
    +  sqlite3_value **ppVal     /* Write the new value here */
    +){
    +  int op;
    +  char *zVal = 0;
    +  sqlite3_value *pVal = 0;
    +
    +  if( !pExpr ){
    +    *ppVal = 0;
    +    return SQLITE_OK;
    +  }
    +  op = pExpr->op;
    +  if( op==TK_REGISTER ){
    +    op = pExpr->op2;
    +  }
    +
    +  if( op==TK_STRING || op==TK_FLOAT || op==TK_INTEGER ){
    +    pVal = sqlite3ValueNew(db);
    +    if( pVal==0 ) goto no_mem;
    +    if( ExprHasProperty(pExpr, EP_IntValue) ){
    +      sqlite3VdbeMemSetInt64(pVal, (i64)pExpr->u.iValue);
    +    }else{
    +      zVal = sqlite3DbStrDup(db, pExpr->u.zToken);
    +      if( zVal==0 ) goto no_mem;
    +      sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);
    +      if( op==TK_FLOAT ) pVal->type = SQLITE_FLOAT;
    +    }
    +    if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_NONE ){
    +      sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);
    +    }else{
    +      sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
    +    }
    +    if( enc!=SQLITE_UTF8 ){
    +      sqlite3VdbeChangeEncoding(pVal, enc);
    +    }
    +  }else if( op==TK_UMINUS ) {
    +    if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal) ){
    +      pVal->u.i = -1 * pVal->u.i;
    +      /* (double)-1 In case of SQLITE_OMIT_FLOATING_POINT... */
    +      pVal->r = (double)-1 * pVal->r;
    +    }
    +  }
    +#ifndef SQLITE_OMIT_BLOB_LITERAL
    +  else if( op==TK_BLOB ){
    +    int nVal;
    +    assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
    +    assert( pExpr->u.zToken[1]=='\'' );
    +    pVal = sqlite3ValueNew(db);
    +    if( !pVal ) goto no_mem;
    +    zVal = &pExpr->u.zToken[2];
    +    nVal = sqlite3Strlen30(zVal)-1;
    +    assert( zVal[nVal]=='\'' );
    +    sqlite3VdbeMemSetStr(pVal, sqlite3HexToBlob(db, zVal, nVal), nVal/2,
    +                         0, SQLITE_DYNAMIC);
    +  }
    +#endif
    +
    +  if( pVal ){
    +    sqlite3VdbeMemStoreType(pVal);
    +  }
    +  *ppVal = pVal;
    +  return SQLITE_OK;
    +
    +no_mem:
    +  db->mallocFailed = 1;
    +  sqlite3DbFree(db, zVal);
    +  sqlite3ValueFree(pVal);
    +  *ppVal = 0;
    +  return SQLITE_NOMEM;
    +}
    +
    +/*
    +** Change the string value of an sqlite3_value object
    +*/
    +SQLITE_PRIVATE void sqlite3ValueSetStr(
    +  sqlite3_value *v,     /* Value to be set */
    +  int n,                /* Length of string z */
    +  const void *z,        /* Text of the new string */
    +  u8 enc,               /* Encoding to use */
    +  void (*xDel)(void*)   /* Destructor for the string */
    +){
    +  if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);
    +}
    +
    +/*
    +** Free an sqlite3_value object
    +*/
    +SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value *v){
    +  if( !v ) return;
    +  sqlite3VdbeMemRelease((Mem *)v);
    +  sqlite3DbFree(((Mem*)v)->db, v);
    +}
    +
    +/*
    +** Return the number of bytes in the sqlite3_value object assuming
    +** that it uses the encoding "enc"
    +*/
    +SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
    +  Mem *p = (Mem*)pVal;
    +  if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
    +    if( p->flags & MEM_Zero ){
    +      return p->n + p->u.nZero;
    +    }else{
    +      return p->n;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/************** End of vdbemem.c *********************************************/
    +/************** Begin file vdbeaux.c *****************************************/
    +/*
    +** 2003 September 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used for creating, destroying, and populating
    +** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)  Prior
    +** to version 2.8.7, all this code was combined into the vdbe.c source file.
    +** But that file was getting too big so this subroutines were split out.
    +**
    +** $Id: vdbeaux.c,v 1.480 2009/08/08 18:01:08 drh Exp $
    +*/
    +
    +
    +
    +/*
    +** When debugging the code generator in a symbolic debugger, one can
    +** set the sqlite3VdbeAddopTrace to 1 and all opcodes will be printed
    +** as they are added to the instruction stream.
    +*/
    +#ifdef SQLITE_DEBUG
    +SQLITE_PRIVATE int sqlite3VdbeAddopTrace = 0;
    +#endif
    +
    +
    +/*
    +** Create a new virtual database engine.
    +*/
    +SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3 *db){
    +  Vdbe *p;
    +  p = sqlite3DbMallocZero(db, sizeof(Vdbe) );
    +  if( p==0 ) return 0;
    +  p->db = db;
    +  if( db->pVdbe ){
    +    db->pVdbe->pPrev = p;
    +  }
    +  p->pNext = db->pVdbe;
    +  p->pPrev = 0;
    +  db->pVdbe = p;
    +  p->magic = VDBE_MAGIC_INIT;
    +  return p;
    +}
    +
    +/*
    +** Remember the SQL string for a prepared statement.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepareV2){
    +  assert( isPrepareV2==1 || isPrepareV2==0 );
    +  if( p==0 ) return;
    +#ifdef SQLITE_OMIT_TRACE
    +  if( !isPrepareV2 ) return;
    +#endif
    +  assert( p->zSql==0 );
    +  p->zSql = sqlite3DbStrNDup(p->db, z, n);
    +  p->isPrepareV2 = (u8)isPrepareV2;
    +}
    +
    +/*
    +** Return the SQL associated with a prepared statement
    +*/
    +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
    +  Vdbe *p = (Vdbe *)pStmt;
    +  return (p->isPrepareV2 ? p->zSql : 0);
    +}
    +
    +/*
    +** Swap all content between two VDBE structures.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
    +  Vdbe tmp, *pTmp;
    +  char *zTmp;
    +  tmp = *pA;
    +  *pA = *pB;
    +  *pB = tmp;
    +  pTmp = pA->pNext;
    +  pA->pNext = pB->pNext;
    +  pB->pNext = pTmp;
    +  pTmp = pA->pPrev;
    +  pA->pPrev = pB->pPrev;
    +  pB->pPrev = pTmp;
    +  zTmp = pA->zSql;
    +  pA->zSql = pB->zSql;
    +  pB->zSql = zTmp;
    +  pB->isPrepareV2 = pA->isPrepareV2;
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** Turn tracing on or off
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe *p, FILE *trace){
    +  p->trace = trace;
    +}
    +#endif
    +
    +/*
    +** Resize the Vdbe.aOp array so that it is at least one op larger than 
    +** it was.
    +**
    +** If an out-of-memory error occurs while resizing the array, return
    +** SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain 
    +** unchanged (this is so that any opcodes already allocated can be 
    +** correctly deallocated along with the rest of the Vdbe).
    +*/
    +static int growOpArray(Vdbe *p){
    +  VdbeOp *pNew;
    +  int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
    +  pNew = sqlite3DbRealloc(p->db, p->aOp, nNew*sizeof(Op));
    +  if( pNew ){
    +    p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op);
    +    p->aOp = pNew;
    +  }
    +  return (pNew ? SQLITE_OK : SQLITE_NOMEM);
    +}
    +
    +/*
    +** Add a new instruction to the list of instructions current in the
    +** VDBE.  Return the address of the new instruction.
    +**
    +** Parameters:
    +**
    +**    p               Pointer to the VDBE
    +**
    +**    op              The opcode for this instruction
    +**
    +**    p1, p2, p3      Operands
    +**
    +** Use the sqlite3VdbeResolveLabel() function to fix an address and
    +** the sqlite3VdbeChangeP4() function to change the value of the P4
    +** operand.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
    +  int i;
    +  VdbeOp *pOp;
    +
    +  i = p->nOp;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  assert( op>0 && op<0xff );
    +  if( p->nOpAlloc<=i ){
    +    if( growOpArray(p) ){
    +      return 1;
    +    }
    +  }
    +  p->nOp++;
    +  pOp = &p->aOp[i];
    +  pOp->opcode = (u8)op;
    +  pOp->p5 = 0;
    +  pOp->p1 = p1;
    +  pOp->p2 = p2;
    +  pOp->p3 = p3;
    +  pOp->p4.p = 0;
    +  pOp->p4type = P4_NOTUSED;
    +  p->expired = 0;
    +#ifdef SQLITE_DEBUG
    +  pOp->zComment = 0;
    +  if( sqlite3VdbeAddopTrace ) sqlite3VdbePrintOp(0, i, &p->aOp[i]);
    +#endif
    +#ifdef VDBE_PROFILE
    +  pOp->cycles = 0;
    +  pOp->cnt = 0;
    +#endif
    +  return i;
    +}
    +SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe *p, int op){
    +  return sqlite3VdbeAddOp3(p, op, 0, 0, 0);
    +}
    +SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){
    +  return sqlite3VdbeAddOp3(p, op, p1, 0, 0);
    +}
    +SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){
    +  return sqlite3VdbeAddOp3(p, op, p1, p2, 0);
    +}
    +
    +
    +/*
    +** Add an opcode that includes the p4 value as a pointer.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeAddOp4(
    +  Vdbe *p,            /* Add the opcode to this VM */
    +  int op,             /* The new opcode */
    +  int p1,             /* The P1 operand */
    +  int p2,             /* The P2 operand */
    +  int p3,             /* The P3 operand */
    +  const char *zP4,    /* The P4 operand */
    +  int p4type          /* P4 operand type */
    +){
    +  int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
    +  sqlite3VdbeChangeP4(p, addr, zP4, p4type);
    +  return addr;
    +}
    +
    +/*
    +** Create a new symbolic label for an instruction that has yet to be
    +** coded.  The symbolic label is really just a negative number.  The
    +** label can be used as the P2 value of an operation.  Later, when
    +** the label is resolved to a specific address, the VDBE will scan
    +** through its operation list and change all values of P2 which match
    +** the label into the resolved address.
    +**
    +** The VDBE knows that a P2 value is a label because labels are
    +** always negative and P2 values are suppose to be non-negative.
    +** Hence, a negative P2 value is a label that has yet to be resolved.
    +**
    +** Zero is returned if a malloc() fails.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe *p){
    +  int i;
    +  i = p->nLabel++;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  if( i>=p->nLabelAlloc ){
    +    int n = p->nLabelAlloc*2 + 5;
    +    p->aLabel = sqlite3DbReallocOrFree(p->db, p->aLabel,
    +                                       n*sizeof(p->aLabel[0]));
    +    p->nLabelAlloc = sqlite3DbMallocSize(p->db, p->aLabel)/sizeof(p->aLabel[0]);
    +  }
    +  if( p->aLabel ){
    +    p->aLabel[i] = -1;
    +  }
    +  return -1-i;
    +}
    +
    +/*
    +** Resolve label "x" to be the address of the next instruction to
    +** be inserted.  The parameter "x" must have been obtained from
    +** a prior call to sqlite3VdbeMakeLabel().
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *p, int x){
    +  int j = -1-x;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  assert( j>=0 && j<p->nLabel );
    +  if( p->aLabel ){
    +    p->aLabel[j] = p->nOp;
    +  }
    +}
    +
    +#ifdef SQLITE_DEBUG /* sqlite3AssertMayAbort() logic */
    +
    +/*
    +** The following type and function are used to iterate through all opcodes
    +** in a Vdbe main program and each of the sub-programs (triggers) it may 
    +** invoke directly or indirectly. It should be used as follows:
    +**
    +**   Op *pOp;
    +**   VdbeOpIter sIter;
    +**
    +**   memset(&sIter, 0, sizeof(sIter));
    +**   sIter.v = v;                            // v is of type Vdbe* 
    +**   while( (pOp = opIterNext(&sIter)) ){
    +**     // Do something with pOp
    +**   }
    +**   sqlite3DbFree(v->db, sIter.apSub);
    +** 
    +*/
    +typedef struct VdbeOpIter VdbeOpIter;
    +struct VdbeOpIter {
    +  Vdbe *v;                   /* Vdbe to iterate through the opcodes of */
    +  SubProgram **apSub;        /* Array of subprograms */
    +  int nSub;                  /* Number of entries in apSub */
    +  int iAddr;                 /* Address of next instruction to return */
    +  int iSub;                  /* 0 = main program, 1 = first sub-program etc. */
    +};
    +static Op *opIterNext(VdbeOpIter *p){
    +  Vdbe *v = p->v;
    +  Op *pRet = 0;
    +  Op *aOp;
    +  int nOp;
    +
    +  if( p->iSub<=p->nSub ){
    +
    +    if( p->iSub==0 ){
    +      aOp = v->aOp;
    +      nOp = v->nOp;
    +    }else{
    +      aOp = p->apSub[p->iSub-1]->aOp;
    +      nOp = p->apSub[p->iSub-1]->nOp;
    +    }
    +    assert( p->iAddr<nOp );
    +
    +    pRet = &aOp[p->iAddr];
    +    p->iAddr++;
    +    if( p->iAddr==nOp ){
    +      p->iSub++;
    +      p->iAddr = 0;
    +    }
    +  
    +    if( pRet->p4type==P4_SUBPROGRAM ){
    +      int nByte = (p->nSub+1)*sizeof(SubProgram*);
    +      int j;
    +      for(j=0; j<p->nSub; j++){
    +        if( p->apSub[j]==pRet->p4.pProgram ) break;
    +      }
    +      if( j==p->nSub ){
    +        p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
    +        if( !p->apSub ){
    +          pRet = 0;
    +        }else{
    +          p->apSub[p->nSub++] = pRet->p4.pProgram;
    +        }
    +      }
    +    }
    +  }
    +
    +  return pRet;
    +}
    +
    +/*
    +** Check if the program stored in the VM associated with pParse may
    +** throw an ABORT exception (causing the statement, but not entire transaction
    +** to be rolled back). This condition is true if the main program or any
    +** sub-programs contains any of the following:
    +**
    +**   *  OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
    +**   *  OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
    +**   *  OP_Destroy
    +**   *  OP_VUpdate
    +**   *  OP_VRename
    +**   *  OP_FkCounter with P2==0 (immediate foreign key constraint)
    +**
    +** Then check that the value of Parse.mayAbort is true if an
    +** ABORT may be thrown, or false otherwise. Return true if it does
    +** match, or false otherwise. This function is intended to be used as
    +** part of an assert statement in the compiler. Similar to:
    +**
    +**   assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
    +  int hasAbort = 0;
    +  Op *pOp;
    +  VdbeOpIter sIter;
    +  memset(&sIter, 0, sizeof(sIter));
    +  sIter.v = v;
    +
    +  while( (pOp = opIterNext(&sIter))!=0 ){
    +    int opcode = pOp->opcode;
    +    if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename 
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +     || (opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1) 
    +#endif
    +     || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
    +      && (pOp->p1==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
    +    ){
    +      hasAbort = 1;
    +      break;
    +    }
    +  }
    +  sqlite3DbFree(v->db, sIter.apSub);
    +
    +  /* Return true if hasAbort==mayAbort. Or if a malloc failure occured.
    +  ** If malloc failed, then the while() loop above may not have iterated
    +  ** through all opcodes and hasAbort may be set incorrectly. Return
    +  ** true for this case to prevent the assert() in the callers frame
    +  ** from failing.  */
    +  return ( v->db->mallocFailed || hasAbort==mayAbort );
    +}
    +#endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
    +
    +/*
    +** Loop through the program looking for P2 values that are negative
    +** on jump instructions.  Each such value is a label.  Resolve the
    +** label by setting the P2 value to its correct non-zero value.
    +**
    +** This routine is called once after all opcodes have been inserted.
    +**
    +** Variable *pMaxFuncArgs is set to the maximum value of any P2 argument 
    +** to an OP_Function, OP_AggStep or OP_VFilter opcode. This is used by 
    +** sqlite3VdbeMakeReady() to size the Vdbe.apArg[] array.
    +*/
    +static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
    +  int i;
    +  int nMaxArgs = *pMaxFuncArgs;
    +  Op *pOp;
    +  int *aLabel = p->aLabel;
    +  p->readOnly = 1;
    +  for(pOp=p->aOp, i=p->nOp-1; i>=0; i--, pOp++){
    +    u8 opcode = pOp->opcode;
    +
    +    if( opcode==OP_Function || opcode==OP_AggStep ){
    +      if( pOp->p5>nMaxArgs ) nMaxArgs = pOp->p5;
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    }else if( opcode==OP_VUpdate ){
    +      if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
    +#endif
    +    }else if( opcode==OP_Transaction && pOp->p2!=0 ){
    +      p->readOnly = 0;
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    }else if( opcode==OP_VFilter ){
    +      int n;
    +      assert( p->nOp - i >= 3 );
    +      assert( pOp[-1].opcode==OP_Integer );
    +      n = pOp[-1].p1;
    +      if( n>nMaxArgs ) nMaxArgs = n;
    +#endif
    +    }
    +
    +    if( sqlite3VdbeOpcodeHasProperty(opcode, OPFLG_JUMP) && pOp->p2<0 ){
    +      assert( -1-pOp->p2<p->nLabel );
    +      pOp->p2 = aLabel[-1-pOp->p2];
    +    }
    +  }
    +  sqlite3DbFree(p->db, p->aLabel);
    +  p->aLabel = 0;
    +
    +  *pMaxFuncArgs = nMaxArgs;
    +}
    +
    +/*
    +** Return the address of the next instruction to be inserted.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe *p){
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  return p->nOp;
    +}
    +
    +/*
    +** This function returns a pointer to the array of opcodes associated with
    +** the Vdbe passed as the first argument. It is the callers responsibility
    +** to arrange for the returned array to be eventually freed using the 
    +** vdbeFreeOpArray() function.
    +**
    +** Before returning, *pnOp is set to the number of entries in the returned
    +** array. Also, *pnMaxArg is set to the larger of its current value and 
    +** the number of entries in the Vdbe.apArg[] array required to execute the 
    +** returned program.
    +*/
    +SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe *p, int *pnOp, int *pnMaxArg){
    +  VdbeOp *aOp = p->aOp;
    +  assert( aOp && !p->db->mallocFailed );
    +
    +  /* Check that sqlite3VdbeUsesBtree() was not called on this VM */
    +  assert( p->aMutex.nMutex==0 );
    +
    +  resolveP2Values(p, pnMaxArg);
    +  *pnOp = p->nOp;
    +  p->aOp = 0;
    +  return aOp;
    +}
    +
    +/*
    +** Add a whole list of operations to the operation stack.  Return the
    +** address of the first operation added.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp){
    +  int addr;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  if( p->nOp + nOp > p->nOpAlloc && growOpArray(p) ){
    +    return 0;
    +  }
    +  addr = p->nOp;
    +  if( ALWAYS(nOp>0) ){
    +    int i;
    +    VdbeOpList const *pIn = aOp;
    +    for(i=0; i<nOp; i++, pIn++){
    +      int p2 = pIn->p2;
    +      VdbeOp *pOut = &p->aOp[i+addr];
    +      pOut->opcode = pIn->opcode;
    +      pOut->p1 = pIn->p1;
    +      if( p2<0 && sqlite3VdbeOpcodeHasProperty(pOut->opcode, OPFLG_JUMP) ){
    +        pOut->p2 = addr + ADDR(p2);
    +      }else{
    +        pOut->p2 = p2;
    +      }
    +      pOut->p3 = pIn->p3;
    +      pOut->p4type = P4_NOTUSED;
    +      pOut->p4.p = 0;
    +      pOut->p5 = 0;
    +#ifdef SQLITE_DEBUG
    +      pOut->zComment = 0;
    +      if( sqlite3VdbeAddopTrace ){
    +        sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
    +      }
    +#endif
    +    }
    +    p->nOp += nOp;
    +  }
    +  return addr;
    +}
    +
    +/*
    +** Change the value of the P1 operand for a specific instruction.
    +** This routine is useful when a large program is loaded from a
    +** static array using sqlite3VdbeAddOpList but we want to make a
    +** few minor changes to the program.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe *p, int addr, int val){
    +  assert( p!=0 );
    +  assert( addr>=0 );
    +  if( p->nOp>addr ){
    +    p->aOp[addr].p1 = val;
    +  }
    +}
    +
    +/*
    +** Change the value of the P2 operand for a specific instruction.
    +** This routine is useful for setting a jump destination.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, int addr, int val){
    +  assert( p!=0 );
    +  assert( addr>=0 );
    +  if( p->nOp>addr ){
    +    p->aOp[addr].p2 = val;
    +  }
    +}
    +
    +/*
    +** Change the value of the P3 operand for a specific instruction.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, int addr, int val){
    +  assert( p!=0 );
    +  assert( addr>=0 );
    +  if( p->nOp>addr ){
    +    p->aOp[addr].p3 = val;
    +  }
    +}
    +
    +/*
    +** Change the value of the P5 operand for the most recently
    +** added operation.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 val){
    +  assert( p!=0 );
    +  if( p->aOp ){
    +    assert( p->nOp>0 );
    +    p->aOp[p->nOp-1].p5 = val;
    +  }
    +}
    +
    +/*
    +** Change the P2 operand of instruction addr so that it points to
    +** the address of the next instruction to be coded.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){
    +  sqlite3VdbeChangeP2(p, addr, p->nOp);
    +}
    +
    +
    +/*
    +** If the input FuncDef structure is ephemeral, then free it.  If
    +** the FuncDef is not ephermal, then do nothing.
    +*/
    +static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
    +  if( ALWAYS(pDef) && (pDef->flags & SQLITE_FUNC_EPHEM)!=0 ){
    +    sqlite3DbFree(db, pDef);
    +  }
    +}
    +
    +/*
    +** Delete a P4 value if necessary.
    +*/
    +static void freeP4(sqlite3 *db, int p4type, void *p4){
    +  if( p4 ){
    +    switch( p4type ){
    +      case P4_REAL:
    +      case P4_INT64:
    +      case P4_MPRINTF:
    +      case P4_DYNAMIC:
    +      case P4_KEYINFO:
    +      case P4_INTARRAY:
    +      case P4_KEYINFO_HANDOFF: {
    +        sqlite3DbFree(db, p4);
    +        break;
    +      }
    +      case P4_VDBEFUNC: {
    +        VdbeFunc *pVdbeFunc = (VdbeFunc *)p4;
    +        freeEphemeralFunction(db, pVdbeFunc->pFunc);
    +        sqlite3VdbeDeleteAuxData(pVdbeFunc, 0);
    +        sqlite3DbFree(db, pVdbeFunc);
    +        break;
    +      }
    +      case P4_FUNCDEF: {
    +        freeEphemeralFunction(db, (FuncDef*)p4);
    +        break;
    +      }
    +      case P4_MEM: {
    +        sqlite3ValueFree((sqlite3_value*)p4);
    +        break;
    +      }
    +      case P4_VTAB : {
    +        sqlite3VtabUnlock((VTable *)p4);
    +        break;
    +      }
    +      case P4_SUBPROGRAM : {
    +        sqlite3VdbeProgramDelete(db, (SubProgram *)p4, 1);
    +        break;
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Free the space allocated for aOp and any p4 values allocated for the
    +** opcodes contained within. If aOp is not NULL it is assumed to contain 
    +** nOp entries. 
    +*/
    +static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
    +  if( aOp ){
    +    Op *pOp;
    +    for(pOp=aOp; pOp<&aOp[nOp]; pOp++){
    +      freeP4(db, pOp->p4type, pOp->p4.p);
    +#ifdef SQLITE_DEBUG
    +      sqlite3DbFree(db, pOp->zComment);
    +#endif     
    +    }
    +  }
    +  sqlite3DbFree(db, aOp);
    +}
    +
    +/*
    +** Decrement the ref-count on the SubProgram structure passed as the
    +** second argument. If the ref-count reaches zero, free the structure.
    +**
    +** The array of VDBE opcodes stored as SubProgram.aOp is freed if
    +** either the ref-count reaches zero or parameter freeop is non-zero.
    +**
    +** Since the array of opcodes pointed to by SubProgram.aOp may directly
    +** or indirectly contain a reference to the SubProgram structure itself.
    +** By passing a non-zero freeop parameter, the caller may ensure that all
    +** SubProgram structures and their aOp arrays are freed, even when there
    +** are such circular references.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeProgramDelete(sqlite3 *db, SubProgram *p, int freeop){
    +  if( p ){
    +    assert( p->nRef>0 );
    +    if( freeop || p->nRef==1 ){
    +      Op *aOp = p->aOp;
    +      p->aOp = 0;
    +      vdbeFreeOpArray(db, aOp, p->nOp);
    +      p->nOp = 0;
    +    }
    +    p->nRef--;
    +    if( p->nRef==0 ){
    +      sqlite3DbFree(db, p);
    +    }
    +  }
    +}
    +
    +
    +/*
    +** Change N opcodes starting at addr to No-ops.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){
    +  if( p->aOp ){
    +    VdbeOp *pOp = &p->aOp[addr];
    +    sqlite3 *db = p->db;
    +    while( N-- ){
    +      freeP4(db, pOp->p4type, pOp->p4.p);
    +      memset(pOp, 0, sizeof(pOp[0]));
    +      pOp->opcode = OP_Noop;
    +      pOp++;
    +    }
    +  }
    +}
    +
    +/*
    +** Change the value of the P4 operand for a specific instruction.
    +** This routine is useful when a large program is loaded from a
    +** static array using sqlite3VdbeAddOpList but we want to make a
    +** few minor changes to the program.
    +**
    +** If n>=0 then the P4 operand is dynamic, meaning that a copy of
    +** the string is made into memory obtained from sqlite3_malloc().
    +** A value of n==0 means copy bytes of zP4 up to and including the
    +** first null byte.  If n>0 then copy n+1 bytes of zP4.
    +**
    +** If n==P4_KEYINFO it means that zP4 is a pointer to a KeyInfo structure.
    +** A copy is made of the KeyInfo structure into memory obtained from
    +** sqlite3_malloc, to be freed when the Vdbe is finalized.
    +** n==P4_KEYINFO_HANDOFF indicates that zP4 points to a KeyInfo structure
    +** stored in memory that the caller has obtained from sqlite3_malloc. The 
    +** caller should not free the allocation, it will be freed when the Vdbe is
    +** finalized.
    +** 
    +** Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points
    +** to a string or structure that is guaranteed to exist for the lifetime of
    +** the Vdbe. In these cases we can just copy the pointer.
    +**
    +** If addr<0 then change P4 on the most recently inserted instruction.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
    +  Op *pOp;
    +  sqlite3 *db;
    +  assert( p!=0 );
    +  db = p->db;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  if( p->aOp==0 || db->mallocFailed ){
    +    if ( n!=P4_KEYINFO && n!=P4_VTAB ) {
    +      freeP4(db, n, (void*)*(char**)&zP4);
    +    }
    +    return;
    +  }
    +  assert( p->nOp>0 );
    +  assert( addr<p->nOp );
    +  if( addr<0 ){
    +    addr = p->nOp - 1;
    +  }
    +  pOp = &p->aOp[addr];
    +  freeP4(db, pOp->p4type, pOp->p4.p);
    +  pOp->p4.p = 0;
    +  if( n==P4_INT32 ){
    +    /* Note: this cast is safe, because the origin data point was an int
    +    ** that was cast to a (const char *). */
    +    pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
    +    pOp->p4type = P4_INT32;
    +  }else if( zP4==0 ){
    +    pOp->p4.p = 0;
    +    pOp->p4type = P4_NOTUSED;
    +  }else if( n==P4_KEYINFO ){
    +    KeyInfo *pKeyInfo;
    +    int nField, nByte;
    +
    +    nField = ((KeyInfo*)zP4)->nField;
    +    nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo->aColl[0]) + nField;
    +    pKeyInfo = sqlite3Malloc( nByte );
    +    pOp->p4.pKeyInfo = pKeyInfo;
    +    if( pKeyInfo ){
    +      u8 *aSortOrder;
    +      memcpy(pKeyInfo, zP4, nByte);
    +      aSortOrder = pKeyInfo->aSortOrder;
    +      if( aSortOrder ){
    +        pKeyInfo->aSortOrder = (unsigned char*)&pKeyInfo->aColl[nField];
    +        memcpy(pKeyInfo->aSortOrder, aSortOrder, nField);
    +      }
    +      pOp->p4type = P4_KEYINFO;
    +    }else{
    +      p->db->mallocFailed = 1;
    +      pOp->p4type = P4_NOTUSED;
    +    }
    +  }else if( n==P4_KEYINFO_HANDOFF ){
    +    pOp->p4.p = (void*)zP4;
    +    pOp->p4type = P4_KEYINFO;
    +  }else if( n==P4_VTAB ){
    +    pOp->p4.p = (void*)zP4;
    +    pOp->p4type = P4_VTAB;
    +    sqlite3VtabLock((VTable *)zP4);
    +    assert( ((VTable *)zP4)->db==p->db );
    +  }else if( n<0 ){
    +    pOp->p4.p = (void*)zP4;
    +    pOp->p4type = (signed char)n;
    +  }else{
    +    if( n==0 ) n = sqlite3Strlen30(zP4);
    +    pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
    +    pOp->p4type = P4_DYNAMIC;
    +  }
    +}
    +
    +#ifndef NDEBUG
    +/*
    +** Change the comment on the the most recently coded instruction.  Or
    +** insert a No-op and add the comment to that new instruction.  This
    +** makes the code easier to read during debugging.  None of this happens
    +** in a production build.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){
    +  va_list ap;
    +  if( !p ) return;
    +  assert( p->nOp>0 || p->aOp==0 );
    +  assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
    +  if( p->nOp ){
    +    char **pz = &p->aOp[p->nOp-1].zComment;
    +    va_start(ap, zFormat);
    +    sqlite3DbFree(p->db, *pz);
    +    *pz = sqlite3VMPrintf(p->db, zFormat, ap);
    +    va_end(ap);
    +  }
    +}
    +SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe *p, const char *zFormat, ...){
    +  va_list ap;
    +  if( !p ) return;
    +  sqlite3VdbeAddOp0(p, OP_Noop);
    +  assert( p->nOp>0 || p->aOp==0 );
    +  assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
    +  if( p->nOp ){
    +    char **pz = &p->aOp[p->nOp-1].zComment;
    +    va_start(ap, zFormat);
    +    sqlite3DbFree(p->db, *pz);
    +    *pz = sqlite3VMPrintf(p->db, zFormat, ap);
    +    va_end(ap);
    +  }
    +}
    +#endif  /* NDEBUG */
    +
    +/*
    +** Return the opcode for a given address.  If the address is -1, then
    +** return the most recently inserted opcode.
    +**
    +** If a memory allocation error has occurred prior to the calling of this
    +** routine, then a pointer to a dummy VdbeOp will be returned.  That opcode
    +** is readable and writable, but it has no effect.  The return of a dummy
    +** opcode allows the call to continue functioning after a OOM fault without
    +** having to check to see if the return from this routine is a valid pointer.
    +**
    +** About the #ifdef SQLITE_OMIT_TRACE:  Normally, this routine is never called
    +** unless p->nOp>0.  This is because in the absense of SQLITE_OMIT_TRACE,
    +** an OP_Trace instruction is always inserted by sqlite3VdbeGet() as soon as
    +** a new VDBE is created.  So we are free to set addr to p->nOp-1 without
    +** having to double-check to make sure that the result is non-negative. But
    +** if SQLITE_OMIT_TRACE is defined, the OP_Trace is omitted and we do need to
    +** check the value of p->nOp-1 before continuing.
    +*/
    +SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
    +  static VdbeOp dummy;
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +  if( addr<0 ){
    +#ifdef SQLITE_OMIT_TRACE
    +    if( p->nOp==0 ) return &dummy;
    +#endif
    +    addr = p->nOp - 1;
    +  }
    +  assert( (addr>=0 && addr<p->nOp) || p->db->mallocFailed );
    +  if( p->db->mallocFailed ){
    +    return &dummy;
    +  }else{
    +    return &p->aOp[addr];
    +  }
    +}
    +
    +#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) \
    +     || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
    +/*
    +** Compute a string that describes the P4 parameter for an opcode.
    +** Use zTemp for any required temporary buffer space.
    +*/
    +static char *displayP4(Op *pOp, char *zTemp, int nTemp){
    +  char *zP4 = zTemp;
    +  assert( nTemp>=20 );
    +  switch( pOp->p4type ){
    +    case P4_KEYINFO_STATIC:
    +    case P4_KEYINFO: {
    +      int i, j;
    +      KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
    +      sqlite3_snprintf(nTemp, zTemp, "keyinfo(%d", pKeyInfo->nField);
    +      i = sqlite3Strlen30(zTemp);
    +      for(j=0; j<pKeyInfo->nField; j++){
    +        CollSeq *pColl = pKeyInfo->aColl[j];
    +        if( pColl ){
    +          int n = sqlite3Strlen30(pColl->zName);
    +          if( i+n>nTemp-6 ){
    +            memcpy(&zTemp[i],",...",4);
    +            break;
    +          }
    +          zTemp[i++] = ',';
    +          if( pKeyInfo->aSortOrder && pKeyInfo->aSortOrder[j] ){
    +            zTemp[i++] = '-';
    +          }
    +          memcpy(&zTemp[i], pColl->zName,n+1);
    +          i += n;
    +        }else if( i+4<nTemp-6 ){
    +          memcpy(&zTemp[i],",nil",4);
    +          i += 4;
    +        }
    +      }
    +      zTemp[i++] = ')';
    +      zTemp[i] = 0;
    +      assert( i<nTemp );
    +      break;
    +    }
    +    case P4_COLLSEQ: {
    +      CollSeq *pColl = pOp->p4.pColl;
    +      sqlite3_snprintf(nTemp, zTemp, "collseq(%.20s)", pColl->zName);
    +      break;
    +    }
    +    case P4_FUNCDEF: {
    +      FuncDef *pDef = pOp->p4.pFunc;
    +      sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
    +      break;
    +    }
    +    case P4_INT64: {
    +      sqlite3_snprintf(nTemp, zTemp, "%lld", *pOp->p4.pI64);
    +      break;
    +    }
    +    case P4_INT32: {
    +      sqlite3_snprintf(nTemp, zTemp, "%d", pOp->p4.i);
    +      break;
    +    }
    +    case P4_REAL: {
    +      sqlite3_snprintf(nTemp, zTemp, "%.16g", *pOp->p4.pReal);
    +      break;
    +    }
    +    case P4_MEM: {
    +      Mem *pMem = pOp->p4.pMem;
    +      assert( (pMem->flags & MEM_Null)==0 );
    +      if( pMem->flags & MEM_Str ){
    +        zP4 = pMem->z;
    +      }else if( pMem->flags & MEM_Int ){
    +        sqlite3_snprintf(nTemp, zTemp, "%lld", pMem->u.i);
    +      }else if( pMem->flags & MEM_Real ){
    +        sqlite3_snprintf(nTemp, zTemp, "%.16g", pMem->r);
    +      }else{
    +        assert( pMem->flags & MEM_Blob );
    +        zP4 = "(blob)";
    +      }
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    case P4_VTAB: {
    +      sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
    +      sqlite3_snprintf(nTemp, zTemp, "vtab:%p:%p", pVtab, pVtab->pModule);
    +      break;
    +    }
    +#endif
    +    case P4_INTARRAY: {
    +      sqlite3_snprintf(nTemp, zTemp, "intarray");
    +      break;
    +    }
    +    case P4_SUBPROGRAM: {
    +      sqlite3_snprintf(nTemp, zTemp, "program");
    +      break;
    +    }
    +    default: {
    +      zP4 = pOp->p4.z;
    +      if( zP4==0 ){
    +        zP4 = zTemp;
    +        zTemp[0] = 0;
    +      }
    +    }
    +  }
    +  assert( zP4!=0 );
    +  return zP4;
    +}
    +#endif
    +
    +/*
    +** Declare to the Vdbe that the BTree object at db->aDb[i] is used.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){
    +  int mask;
    +  assert( i>=0 && i<p->db->nDb && i<sizeof(u32)*8 );
    +  assert( i<(int)sizeof(p->btreeMask)*8 );
    +  mask = ((u32)1)<<i;
    +  if( (p->btreeMask & mask)==0 ){
    +    p->btreeMask |= mask;
    +    sqlite3BtreeMutexArrayInsert(&p->aMutex, p->db->aDb[i].pBt);
    +  }
    +}
    +
    +
    +#if defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
    +/*
    +** Print a single opcode.  This routine is used for debugging only.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
    +  char *zP4;
    +  char zPtr[50];
    +  static const char *zFormat1 = "%4d %-13s %4d %4d %4d %-4s %.2X %s\n";
    +  if( pOut==0 ) pOut = stdout;
    +  zP4 = displayP4(pOp, zPtr, sizeof(zPtr));
    +  fprintf(pOut, zFormat1, pc, 
    +      sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, zP4, pOp->p5,
    +#ifdef SQLITE_DEBUG
    +      pOp->zComment ? pOp->zComment : ""
    +#else
    +      ""
    +#endif
    +  );
    +  fflush(pOut);
    +}
    +#endif
    +
    +/*
    +** Release an array of N Mem elements
    +*/
    +static void releaseMemArray(Mem *p, int N){
    +  if( p && N ){
    +    Mem *pEnd;
    +    sqlite3 *db = p->db;
    +    u8 malloc_failed = db->mallocFailed;
    +    for(pEnd=&p[N]; p<pEnd; p++){
    +      assert( (&p[1])==pEnd || p[0].db==p[1].db );
    +
    +      /* This block is really an inlined version of sqlite3VdbeMemRelease()
    +      ** that takes advantage of the fact that the memory cell value is 
    +      ** being set to NULL after releasing any dynamic resources.
    +      **
    +      ** The justification for duplicating code is that according to 
    +      ** callgrind, this causes a certain test case to hit the CPU 4.7 
    +      ** percent less (x86 linux, gcc version 4.1.2, -O6) than if 
    +      ** sqlite3MemRelease() were called from here. With -O2, this jumps
    +      ** to 6.6 percent. The test case is inserting 1000 rows into a table 
    +      ** with no indexes using a single prepared INSERT statement, bind() 
    +      ** and reset(). Inserts are grouped into a transaction.
    +      */
    +      if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
    +        sqlite3VdbeMemRelease(p);
    +      }else if( p->zMalloc ){
    +        sqlite3DbFree(db, p->zMalloc);
    +        p->zMalloc = 0;
    +      }
    +
    +      p->flags = MEM_Null;
    +    }
    +    db->mallocFailed = malloc_failed;
    +  }
    +}
    +
    +/*
    +** Delete a VdbeFrame object and its contents. VdbeFrame objects are
    +** allocated by the OP_Program opcode in sqlite3VdbeExec().
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame *p){
    +  int i;
    +  Mem *aMem = VdbeFrameMem(p);
    +  VdbeCursor **apCsr = (VdbeCursor **)&aMem[p->nChildMem];
    +  for(i=0; i<p->nChildCsr; i++){
    +    sqlite3VdbeFreeCursor(p->v, apCsr[i]);
    +  }
    +  releaseMemArray(aMem, p->nChildMem);
    +  sqlite3DbFree(p->v->db, p);
    +}
    +
    +#ifndef SQLITE_OMIT_EXPLAIN
    +/*
    +** Give a listing of the program in the virtual machine.
    +**
    +** The interface is the same as sqlite3VdbeExec().  But instead of
    +** running the code, it invokes the callback once for each instruction.
    +** This feature is used to implement "EXPLAIN".
    +**
    +** When p->explain==1, each instruction is listed.  When
    +** p->explain==2, only OP_Explain instructions are listed and these
    +** are shown in a different format.  p->explain==2 is used to implement
    +** EXPLAIN QUERY PLAN.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeList(
    +  Vdbe *p                   /* The VDBE */
    +){
    +  int nRow;                            /* Total number of rows to return */
    +  int nSub = 0;                        /* Number of sub-vdbes seen so far */
    +  SubProgram **apSub = 0;              /* Array of sub-vdbes */
    +  Mem *pSub = 0;
    +  sqlite3 *db = p->db;
    +  int i;
    +  int rc = SQLITE_OK;
    +  Mem *pMem = p->pResultSet = &p->aMem[1];
    +
    +  assert( p->explain );
    +  assert( p->magic==VDBE_MAGIC_RUN );
    +  assert( db->magic==SQLITE_MAGIC_BUSY );
    +  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM );
    +
    +  /* Even though this opcode does not use dynamic strings for
    +  ** the result, result columns may become dynamic if the user calls
    +  ** sqlite3_column_text16(), causing a translation to UTF-16 encoding.
    +  */
    +  releaseMemArray(pMem, 8);
    +
    +  if( p->rc==SQLITE_NOMEM ){
    +    /* This happens if a malloc() inside a call to sqlite3_column_text() or
    +    ** sqlite3_column_text16() failed.  */
    +    db->mallocFailed = 1;
    +    return SQLITE_ERROR;
    +  }
    +
    +  /* Figure out total number of rows that will be returned by this 
    +  ** EXPLAIN program.  */
    +  nRow = p->nOp;
    +  if( p->explain==1 ){
    +    pSub = &p->aMem[9];
    +    if( pSub->flags&MEM_Blob ){
    +      nSub = pSub->n/sizeof(Vdbe*);
    +      apSub = (SubProgram **)pSub->z;
    +    }
    +    for(i=0; i<nSub; i++){
    +      nRow += apSub[i]->nOp;
    +    }
    +  }
    +
    +  do{
    +    i = p->pc++;
    +  }while( i<nRow && p->explain==2 && p->aOp[i].opcode!=OP_Explain );
    +  if( i>=nRow ){
    +    p->rc = SQLITE_OK;
    +    rc = SQLITE_DONE;
    +  }else if( db->u1.isInterrupted ){
    +    p->rc = SQLITE_INTERRUPT;
    +    rc = SQLITE_ERROR;
    +    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(p->rc));
    +  }else{
    +    char *z;
    +    Op *pOp;
    +    if( i<p->nOp ){
    +      pOp = &p->aOp[i];
    +    }else{
    +      int j;
    +      i -= p->nOp;
    +      for(j=0; i>=apSub[j]->nOp; j++){
    +        i -= apSub[j]->nOp;
    +      }
    +      pOp = &apSub[j]->aOp[i];
    +    }
    +    if( p->explain==1 ){
    +      pMem->flags = MEM_Int;
    +      pMem->type = SQLITE_INTEGER;
    +      pMem->u.i = i;                                /* Program counter */
    +      pMem++;
    +  
    +      pMem->flags = MEM_Static|MEM_Str|MEM_Term;
    +      pMem->z = (char*)sqlite3OpcodeName(pOp->opcode);  /* Opcode */
    +      assert( pMem->z!=0 );
    +      pMem->n = sqlite3Strlen30(pMem->z);
    +      pMem->type = SQLITE_TEXT;
    +      pMem->enc = SQLITE_UTF8;
    +      pMem++;
    +
    +      if( pOp->p4type==P4_SUBPROGRAM ){
    +        int nByte = (nSub+1)*sizeof(SubProgram*);
    +        int j;
    +        for(j=0; j<nSub; j++){
    +          if( apSub[j]==pOp->p4.pProgram ) break;
    +        }
    +        if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, 1) ){
    +          apSub = (SubProgram **)pSub->z;
    +          apSub[nSub++] = pOp->p4.pProgram;
    +          pSub->flags |= MEM_Blob;
    +          pSub->n = nSub*sizeof(SubProgram*);
    +        }
    +      }
    +    }
    +
    +    pMem->flags = MEM_Int;
    +    pMem->u.i = pOp->p1;                          /* P1 */
    +    pMem->type = SQLITE_INTEGER;
    +    pMem++;
    +
    +    pMem->flags = MEM_Int;
    +    pMem->u.i = pOp->p2;                          /* P2 */
    +    pMem->type = SQLITE_INTEGER;
    +    pMem++;
    +
    +    if( p->explain==1 ){
    +      pMem->flags = MEM_Int;
    +      pMem->u.i = pOp->p3;                          /* P3 */
    +      pMem->type = SQLITE_INTEGER;
    +      pMem++;
    +    }
    +
    +    if( sqlite3VdbeMemGrow(pMem, 32, 0) ){            /* P4 */
    +      assert( p->db->mallocFailed );
    +      return SQLITE_ERROR;
    +    }
    +    pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
    +    z = displayP4(pOp, pMem->z, 32);
    +    if( z!=pMem->z ){
    +      sqlite3VdbeMemSetStr(pMem, z, -1, SQLITE_UTF8, 0);
    +    }else{
    +      assert( pMem->z!=0 );
    +      pMem->n = sqlite3Strlen30(pMem->z);
    +      pMem->enc = SQLITE_UTF8;
    +    }
    +    pMem->type = SQLITE_TEXT;
    +    pMem++;
    +
    +    if( p->explain==1 ){
    +      if( sqlite3VdbeMemGrow(pMem, 4, 0) ){
    +        assert( p->db->mallocFailed );
    +        return SQLITE_ERROR;
    +      }
    +      pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
    +      pMem->n = 2;
    +      sqlite3_snprintf(3, pMem->z, "%.2x", pOp->p5);   /* P5 */
    +      pMem->type = SQLITE_TEXT;
    +      pMem->enc = SQLITE_UTF8;
    +      pMem++;
    +  
    +#ifdef SQLITE_DEBUG
    +      if( pOp->zComment ){
    +        pMem->flags = MEM_Str|MEM_Term;
    +        pMem->z = pOp->zComment;
    +        pMem->n = sqlite3Strlen30(pMem->z);
    +        pMem->enc = SQLITE_UTF8;
    +        pMem->type = SQLITE_TEXT;
    +      }else
    +#endif
    +      {
    +        pMem->flags = MEM_Null;                       /* Comment */
    +        pMem->type = SQLITE_NULL;
    +      }
    +    }
    +
    +    p->nResColumn = 8 - 5*(p->explain-1);
    +    p->rc = SQLITE_OK;
    +    rc = SQLITE_ROW;
    +  }
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_EXPLAIN */
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** Print the SQL that was used to generate a VDBE program.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbePrintSql(Vdbe *p){
    +  int nOp = p->nOp;
    +  VdbeOp *pOp;
    +  if( nOp<1 ) return;
    +  pOp = &p->aOp[0];
    +  if( pOp->opcode==OP_Trace && pOp->p4.z!=0 ){
    +    const char *z = pOp->p4.z;
    +    while( sqlite3Isspace(*z) ) z++;
    +    printf("SQL: [%s]\n", z);
    +  }
    +}
    +#endif
    +
    +#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
    +/*
    +** Print an IOTRACE message showing SQL content.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){
    +  int nOp = p->nOp;
    +  VdbeOp *pOp;
    +  if( sqlite3IoTrace==0 ) return;
    +  if( nOp<1 ) return;
    +  pOp = &p->aOp[0];
    +  if( pOp->opcode==OP_Trace && pOp->p4.z!=0 ){
    +    int i, j;
    +    char z[1000];
    +    sqlite3_snprintf(sizeof(z), z, "%s", pOp->p4.z);
    +    for(i=0; sqlite3Isspace(z[i]); i++){}
    +    for(j=0; z[i]; i++){
    +      if( sqlite3Isspace(z[i]) ){
    +        if( z[i-1]!=' ' ){
    +          z[j++] = ' ';
    +        }
    +      }else{
    +        z[j++] = z[i];
    +      }
    +    }
    +    z[j] = 0;
    +    sqlite3IoTrace("SQL %s\n", z);
    +  }
    +}
    +#endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */
    +
    +/*
    +** Allocate space from a fixed size buffer.  Make *pp point to the
    +** allocated space.  (Note:  pp is a char* rather than a void** to
    +** work around the pointer aliasing rules of C.)  *pp should initially
    +** be zero.  If *pp is not zero, that means that the space has already
    +** been allocated and this routine is a noop.
    +**
    +** nByte is the number of bytes of space needed.
    +**
    +** *ppFrom point to available space and pEnd points to the end of the
    +** available space.
    +**
    +** *pnByte is a counter of the number of bytes of space that have failed
    +** to allocate.  If there is insufficient space in *ppFrom to satisfy the
    +** request, then increment *pnByte by the amount of the request.
    +*/
    +static void allocSpace(
    +  char *pp,            /* IN/OUT: Set *pp to point to allocated buffer */
    +  int nByte,           /* Number of bytes to allocate */
    +  u8 **ppFrom,         /* IN/OUT: Allocate from *ppFrom */
    +  u8 *pEnd,            /* Pointer to 1 byte past the end of *ppFrom buffer */
    +  int *pnByte          /* If allocation cannot be made, increment *pnByte */
    +){
    +  assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
    +  if( (*(void**)pp)==0 ){
    +    nByte = ROUND8(nByte);
    +    if( &(*ppFrom)[nByte] <= pEnd ){
    +      *(void**)pp = (void *)*ppFrom;
    +      *ppFrom += nByte;
    +    }else{
    +      *pnByte += nByte;
    +    }
    +  }
    +}
    +
    +/*
    +** Prepare a virtual machine for execution.  This involves things such
    +** as allocating stack space and initializing the program counter.
    +** After the VDBE has be prepped, it can be executed by one or more
    +** calls to sqlite3VdbeExec().  
    +**
    +** This is the only way to move a VDBE from VDBE_MAGIC_INIT to
    +** VDBE_MAGIC_RUN.
    +**
    +** This function may be called more than once on a single virtual machine.
    +** The first call is made while compiling the SQL statement. Subsequent
    +** calls are made as part of the process of resetting a statement to be
    +** re-executed (from a call to sqlite3_reset()). The nVar, nMem, nCursor 
    +** and isExplain parameters are only passed correct values the first time
    +** the function is called. On subsequent calls, from sqlite3_reset(), nVar
    +** is passed -1 and nMem, nCursor and isExplain are all passed zero.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMakeReady(
    +  Vdbe *p,                       /* The VDBE */
    +  int nVar,                      /* Number of '?' see in the SQL statement */
    +  int nMem,                      /* Number of memory cells to allocate */
    +  int nCursor,                   /* Number of cursors to allocate */
    +  int nArg,                      /* Maximum number of args in SubPrograms */
    +  int isExplain,                 /* True if the EXPLAIN keywords is present */
    +  int usesStmtJournal            /* True to set Vdbe.usesStmtJournal */
    +){
    +  int n;
    +  sqlite3 *db = p->db;
    +
    +  assert( p!=0 );
    +  assert( p->magic==VDBE_MAGIC_INIT );
    +
    +  /* There should be at least one opcode.
    +  */
    +  assert( p->nOp>0 );
    +
    +  /* Set the magic to VDBE_MAGIC_RUN sooner rather than later. */
    +  p->magic = VDBE_MAGIC_RUN;
    +
    +  /* For each cursor required, also allocate a memory cell. Memory
    +  ** cells (nMem+1-nCursor)..nMem, inclusive, will never be used by
    +  ** the vdbe program. Instead they are used to allocate space for
    +  ** VdbeCursor/BtCursor structures. The blob of memory associated with 
    +  ** cursor 0 is stored in memory cell nMem. Memory cell (nMem-1)
    +  ** stores the blob of memory associated with cursor 1, etc.
    +  **
    +  ** See also: allocateCursor().
    +  */
    +  nMem += nCursor;
    +
    +  /* Allocate space for memory registers, SQL variables, VDBE cursors and 
    +  ** an array to marshal SQL function arguments in. This is only done the
    +  ** first time this function is called for a given VDBE, not when it is
    +  ** being called from sqlite3_reset() to reset the virtual machine.
    +  */
    +  if( nVar>=0 && ALWAYS(db->mallocFailed==0) ){
    +    u8 *zCsr = (u8 *)&p->aOp[p->nOp];
    +    u8 *zEnd = (u8 *)&p->aOp[p->nOpAlloc];
    +    int nByte;
    +    resolveP2Values(p, &nArg);
    +    p->usesStmtJournal = (u8)usesStmtJournal;
    +    if( isExplain && nMem<10 ){
    +      nMem = 10;
    +    }
    +    memset(zCsr, 0, zEnd-zCsr);
    +    zCsr += (zCsr - (u8*)0)&7;
    +    assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
    +
    +    do {
    +      nByte = 0;
    +      allocSpace((char*)&p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
    +      allocSpace((char*)&p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
    +      allocSpace((char*)&p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
    +      allocSpace((char*)&p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
    +      allocSpace((char*)&p->apCsr, 
    +                 nCursor*sizeof(VdbeCursor*), &zCsr, zEnd, &nByte
    +      );
    +      if( nByte ){
    +        p->pFree = sqlite3DbMallocZero(db, nByte);
    +      }
    +      zCsr = p->pFree;
    +      zEnd = &zCsr[nByte];
    +    }while( nByte && !db->mallocFailed );
    +
    +    p->nCursor = (u16)nCursor;
    +    if( p->aVar ){
    +      p->nVar = (ynVar)nVar;
    +      for(n=0; n<nVar; n++){
    +        p->aVar[n].flags = MEM_Null;
    +        p->aVar[n].db = db;
    +      }
    +    }
    +    if( p->aMem ){
    +      p->aMem--;                      /* aMem[] goes from 1..nMem */
    +      p->nMem = nMem;                 /*       not from 0..nMem-1 */
    +      for(n=1; n<=nMem; n++){
    +        p->aMem[n].flags = MEM_Null;
    +        p->aMem[n].db = db;
    +      }
    +    }
    +  }
    +#ifdef SQLITE_DEBUG
    +  for(n=1; n<p->nMem; n++){
    +    assert( p->aMem[n].db==db );
    +  }
    +#endif
    +
    +  p->pc = -1;
    +  p->rc = SQLITE_OK;
    +  p->errorAction = OE_Abort;
    +  p->explain |= isExplain;
    +  p->magic = VDBE_MAGIC_RUN;
    +  p->nChange = 0;
    +  p->cacheCtr = 1;
    +  p->minWriteFileFormat = 255;
    +  p->iStatement = 0;
    +#ifdef VDBE_PROFILE
    +  {
    +    int i;
    +    for(i=0; i<p->nOp; i++){
    +      p->aOp[i].cnt = 0;
    +      p->aOp[i].cycles = 0;
    +    }
    +  }
    +#endif
    +}
    +
    +/*
    +** Close a VDBE cursor and release all the resources that cursor 
    +** happens to hold.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
    +  if( pCx==0 ){
    +    return;
    +  }
    +  if( pCx->pBt ){
    +    sqlite3BtreeClose(pCx->pBt);
    +    /* The pCx->pCursor will be close automatically, if it exists, by
    +    ** the call above. */
    +  }else if( pCx->pCursor ){
    +    sqlite3BtreeCloseCursor(pCx->pCursor);
    +  }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( pCx->pVtabCursor ){
    +    sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;
    +    const sqlite3_module *pModule = pCx->pModule;
    +    p->inVtabMethod = 1;
    +    (void)sqlite3SafetyOff(p->db);
    +    pModule->xClose(pVtabCursor);
    +    (void)sqlite3SafetyOn(p->db);
    +    p->inVtabMethod = 0;
    +  }
    +#endif
    +}
    +
    +/*
    +** Copy the values stored in the VdbeFrame structure to its Vdbe. This
    +** is used, for example, when a trigger sub-program is halted to restore
    +** control to the main program.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
    +  Vdbe *v = pFrame->v;
    +  v->aOp = pFrame->aOp;
    +  v->nOp = pFrame->nOp;
    +  v->aMem = pFrame->aMem;
    +  v->nMem = pFrame->nMem;
    +  v->apCsr = pFrame->apCsr;
    +  v->nCursor = pFrame->nCursor;
    +  v->db->lastRowid = pFrame->lastRowid;
    +  v->nChange = pFrame->nChange;
    +  return pFrame->pc;
    +}
    +
    +/*
    +** Close all cursors.
    +**
    +** Also release any dynamic memory held by the VM in the Vdbe.aMem memory 
    +** cell array. This is necessary as the memory cell array may contain
    +** pointers to VdbeFrame objects, which may in turn contain pointers to
    +** open cursors.
    +*/
    +static void closeAllCursors(Vdbe *p){
    +  if( p->pFrame ){
    +    VdbeFrame *pFrame = p->pFrame;
    +    for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
    +    sqlite3VdbeFrameRestore(pFrame);
    +  }
    +  p->pFrame = 0;
    +  p->nFrame = 0;
    +
    +  if( p->apCsr ){
    +    int i;
    +    for(i=0; i<p->nCursor; i++){
    +      VdbeCursor *pC = p->apCsr[i];
    +      if( pC ){
    +        sqlite3VdbeFreeCursor(p, pC);
    +        p->apCsr[i] = 0;
    +      }
    +    }
    +  }
    +  if( p->aMem ){
    +    releaseMemArray(&p->aMem[1], p->nMem);
    +  }
    +}
    +
    +/*
    +** Clean up the VM after execution.
    +**
    +** This routine will automatically close any cursors, lists, and/or
    +** sorters that were left open.  It also deletes the values of
    +** variables in the aVar[] array.
    +*/
    +static void Cleanup(Vdbe *p){
    +  sqlite3 *db = p->db;
    +
    +#ifdef SQLITE_DEBUG
    +  /* Execute assert() statements to ensure that the Vdbe.apCsr[] and 
    +  ** Vdbe.aMem[] arrays have already been cleaned up.  */
    +  int i;
    +  for(i=0; i<p->nCursor; i++) assert( p->apCsr==0 || p->apCsr[i]==0 );
    +  for(i=1; i<=p->nMem; i++) assert( p->aMem==0 || p->aMem[i].flags==MEM_Null );
    +#endif
    +
    +  sqlite3DbFree(db, p->zErrMsg);
    +  p->zErrMsg = 0;
    +  p->pResultSet = 0;
    +}
    +
    +/*
    +** Set the number of result columns that will be returned by this SQL
    +** statement. This is now set at compile time, rather than during
    +** execution of the vdbe program so that sqlite3_column_count() can
    +** be called on an SQL statement before sqlite3_step().
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
    +  Mem *pColName;
    +  int n;
    +  sqlite3 *db = p->db;
    +
    +  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
    +  sqlite3DbFree(db, p->aColName);
    +  n = nResColumn*COLNAME_N;
    +  p->nResColumn = (u16)nResColumn;
    +  p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
    +  if( p->aColName==0 ) return;
    +  while( n-- > 0 ){
    +    pColName->flags = MEM_Null;
    +    pColName->db = p->db;
    +    pColName++;
    +  }
    +}
    +
    +/*
    +** Set the name of the idx'th column to be returned by the SQL statement.
    +** zName must be a pointer to a nul terminated string.
    +**
    +** This call must be made after a call to sqlite3VdbeSetNumCols().
    +**
    +** The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC
    +** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
    +** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeSetColName(
    +  Vdbe *p,                         /* Vdbe being configured */
    +  int idx,                         /* Index of column zName applies to */
    +  int var,                         /* One of the COLNAME_* constants */
    +  const char *zName,               /* Pointer to buffer containing name */
    +  void (*xDel)(void*)              /* Memory management strategy for zName */
    +){
    +  int rc;
    +  Mem *pColName;
    +  assert( idx<p->nResColumn );
    +  assert( var<COLNAME_N );
    +  if( p->db->mallocFailed ){
    +    assert( !zName || xDel!=SQLITE_DYNAMIC );
    +    return SQLITE_NOMEM;
    +  }
    +  assert( p->aColName!=0 );
    +  pColName = &(p->aColName[idx+var*p->nResColumn]);
    +  rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);
    +  assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );
    +  return rc;
    +}
    +
    +/*
    +** A read or write transaction may or may not be active on database handle
    +** db. If a transaction is active, commit it. If there is a
    +** write-transaction spanning more than one database file, this routine
    +** takes care of the master journal trickery.
    +*/
    +static int vdbeCommit(sqlite3 *db, Vdbe *p){
    +  int i;
    +  int nTrans = 0;  /* Number of databases with an active write-transaction */
    +  int rc = SQLITE_OK;
    +  int needXcommit = 0;
    +
    +#ifdef SQLITE_OMIT_VIRTUALTABLE
    +  /* With this option, sqlite3VtabSync() is defined to be simply 
    +  ** SQLITE_OK so p is not used. 
    +  */
    +  UNUSED_PARAMETER(p);
    +#endif
    +
    +  /* Before doing anything else, call the xSync() callback for any
    +  ** virtual module tables written in this transaction. This has to
    +  ** be done before determining whether a master journal file is 
    +  ** required, as an xSync() callback may add an attached database
    +  ** to the transaction.
    +  */
    +  rc = sqlite3VtabSync(db, &p->zErrMsg);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  /* This loop determines (a) if the commit hook should be invoked and
    +  ** (b) how many database files have open write transactions, not 
    +  ** including the temp database. (b) is important because if more than 
    +  ** one database file has an open write transaction, a master journal
    +  ** file is required for an atomic commit.
    +  */ 
    +  for(i=0; i<db->nDb; i++){ 
    +    Btree *pBt = db->aDb[i].pBt;
    +    if( sqlite3BtreeIsInTrans(pBt) ){
    +      needXcommit = 1;
    +      if( i!=1 ) nTrans++;
    +    }
    +  }
    +
    +  /* If there are any write-transactions at all, invoke the commit hook */
    +  if( needXcommit && db->xCommitCallback ){
    +    (void)sqlite3SafetyOff(db);
    +    rc = db->xCommitCallback(db->pCommitArg);
    +    (void)sqlite3SafetyOn(db);
    +    if( rc ){
    +      return SQLITE_CONSTRAINT;
    +    }
    +  }
    +
    +  /* The simple case - no more than one database file (not counting the
    +  ** TEMP database) has a transaction active.   There is no need for the
    +  ** master-journal.
    +  **
    +  ** If the return value of sqlite3BtreeGetFilename() is a zero length
    +  ** string, it means the main database is :memory: or a temp file.  In 
    +  ** that case we do not support atomic multi-file commits, so use the 
    +  ** simple case then too.
    +  */
    +  if( 0==sqlite3Strlen30(sqlite3BtreeGetFilename(db->aDb[0].pBt))
    +   || nTrans<=1
    +  ){
    +    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( pBt ){
    +        rc = sqlite3BtreeCommitPhaseOne(pBt, 0);
    +      }
    +    }
    +
    +    /* Do the commit only if all databases successfully complete phase 1. 
    +    ** If one of the BtreeCommitPhaseOne() calls fails, this indicates an
    +    ** IO error while deleting or truncating a journal file. It is unlikely,
    +    ** but could happen. In this case abandon processing and return the error.
    +    */
    +    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( pBt ){
    +        rc = sqlite3BtreeCommitPhaseTwo(pBt);
    +      }
    +    }
    +    if( rc==SQLITE_OK ){
    +      sqlite3VtabCommit(db);
    +    }
    +  }
    +
    +  /* The complex case - There is a multi-file write-transaction active.
    +  ** This requires a master journal file to ensure the transaction is
    +  ** committed atomicly.
    +  */
    +#ifndef SQLITE_OMIT_DISKIO
    +  else{
    +    sqlite3_vfs *pVfs = db->pVfs;
    +    int needSync = 0;
    +    char *zMaster = 0;   /* File-name for the master journal */
    +    char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
    +    sqlite3_file *pMaster = 0;
    +    i64 offset = 0;
    +    int res;
    +
    +    /* Select a master journal file name */
    +    do {
    +      u32 iRandom;
    +      sqlite3DbFree(db, zMaster);
    +      sqlite3_randomness(sizeof(iRandom), &iRandom);
    +      zMaster = sqlite3MPrintf(db, "%s-mj%08X", zMainFile, iRandom&0x7fffffff);
    +      if( !zMaster ){
    +        return SQLITE_NOMEM;
    +      }
    +      rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS, &res);
    +    }while( rc==SQLITE_OK && res );
    +    if( rc==SQLITE_OK ){
    +      /* Open the master journal. */
    +      rc = sqlite3OsOpenMalloc(pVfs, zMaster, &pMaster, 
    +          SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
    +          SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_MASTER_JOURNAL, 0
    +      );
    +    }
    +    if( rc!=SQLITE_OK ){
    +      sqlite3DbFree(db, zMaster);
    +      return rc;
    +    }
    + 
    +    /* Write the name of each database file in the transaction into the new
    +    ** master journal file. If an error occurs at this point close
    +    ** and delete the master journal file. All the individual journal files
    +    ** still have 'null' as the master journal pointer, so they will roll
    +    ** back independently if a failure occurs.
    +    */
    +    for(i=0; i<db->nDb; i++){
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( i==1 ) continue;   /* Ignore the TEMP database */
    +      if( sqlite3BtreeIsInTrans(pBt) ){
    +        char const *zFile = sqlite3BtreeGetJournalname(pBt);
    +        if( zFile[0]==0 ) continue;  /* Ignore :memory: databases */
    +        if( !needSync && !sqlite3BtreeSyncDisabled(pBt) ){
    +          needSync = 1;
    +        }
    +        rc = sqlite3OsWrite(pMaster, zFile, sqlite3Strlen30(zFile)+1, offset);
    +        offset += sqlite3Strlen30(zFile)+1;
    +        if( rc!=SQLITE_OK ){
    +          sqlite3OsCloseFree(pMaster);
    +          sqlite3OsDelete(pVfs, zMaster, 0);
    +          sqlite3DbFree(db, zMaster);
    +          return rc;
    +        }
    +      }
    +    }
    +
    +    /* Sync the master journal file. If the IOCAP_SEQUENTIAL device
    +    ** flag is set this is not required.
    +    */
    +    if( needSync 
    +     && 0==(sqlite3OsDeviceCharacteristics(pMaster)&SQLITE_IOCAP_SEQUENTIAL)
    +     && SQLITE_OK!=(rc = sqlite3OsSync(pMaster, SQLITE_SYNC_NORMAL))
    +    ){
    +      sqlite3OsCloseFree(pMaster);
    +      sqlite3OsDelete(pVfs, zMaster, 0);
    +      sqlite3DbFree(db, zMaster);
    +      return rc;
    +    }
    +
    +    /* Sync all the db files involved in the transaction. The same call
    +    ** sets the master journal pointer in each individual journal. If
    +    ** an error occurs here, do not delete the master journal file.
    +    **
    +    ** If the error occurs during the first call to
    +    ** sqlite3BtreeCommitPhaseOne(), then there is a chance that the
    +    ** master journal file will be orphaned. But we cannot delete it,
    +    ** in case the master journal file name was written into the journal
    +    ** file before the failure occurred.
    +    */
    +    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){ 
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( pBt ){
    +        rc = sqlite3BtreeCommitPhaseOne(pBt, zMaster);
    +      }
    +    }
    +    sqlite3OsCloseFree(pMaster);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3DbFree(db, zMaster);
    +      return rc;
    +    }
    +
    +    /* Delete the master journal file. This commits the transaction. After
    +    ** doing this the directory is synced again before any individual
    +    ** transaction files are deleted.
    +    */
    +    rc = sqlite3OsDelete(pVfs, zMaster, 1);
    +    sqlite3DbFree(db, zMaster);
    +    zMaster = 0;
    +    if( rc ){
    +      return rc;
    +    }
    +
    +    /* All files and directories have already been synced, so the following
    +    ** calls to sqlite3BtreeCommitPhaseTwo() are only closing files and
    +    ** deleting or truncating journals. If something goes wrong while
    +    ** this is happening we don't really care. The integrity of the
    +    ** transaction is already guaranteed, but some stray 'cold' journals
    +    ** may be lying around. Returning an error code won't help matters.
    +    */
    +    disable_simulated_io_errors();
    +    sqlite3BeginBenignMalloc();
    +    for(i=0; i<db->nDb; i++){ 
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( pBt ){
    +        sqlite3BtreeCommitPhaseTwo(pBt);
    +      }
    +    }
    +    sqlite3EndBenignMalloc();
    +    enable_simulated_io_errors();
    +
    +    sqlite3VtabCommit(db);
    +  }
    +#endif
    +
    +  return rc;
    +}
    +
    +/* 
    +** This routine checks that the sqlite3.activeVdbeCnt count variable
    +** matches the number of vdbe's in the list sqlite3.pVdbe that are
    +** currently active. An assertion fails if the two counts do not match.
    +** This is an internal self-check only - it is not an essential processing
    +** step.
    +**
    +** This is a no-op if NDEBUG is defined.
    +*/
    +#ifndef NDEBUG
    +static void checkActiveVdbeCnt(sqlite3 *db){
    +  Vdbe *p;
    +  int cnt = 0;
    +  int nWrite = 0;
    +  p = db->pVdbe;
    +  while( p ){
    +    if( p->magic==VDBE_MAGIC_RUN && p->pc>=0 ){
    +      cnt++;
    +      if( p->readOnly==0 ) nWrite++;
    +    }
    +    p = p->pNext;
    +  }
    +  assert( cnt==db->activeVdbeCnt );
    +  assert( nWrite==db->writeVdbeCnt );
    +}
    +#else
    +#define checkActiveVdbeCnt(x)
    +#endif
    +
    +/*
    +** For every Btree that in database connection db which 
    +** has been modified, "trip" or invalidate each cursor in
    +** that Btree might have been modified so that the cursor
    +** can never be used again.  This happens when a rollback
    +*** occurs.  We have to trip all the other cursors, even
    +** cursor from other VMs in different database connections,
    +** so that none of them try to use the data at which they
    +** were pointing and which now may have been changed due
    +** to the rollback.
    +**
    +** Remember that a rollback can delete tables complete and
    +** reorder rootpages.  So it is not sufficient just to save
    +** the state of the cursor.  We have to invalidate the cursor
    +** so that it is never used again.
    +*/
    +static void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
    +  int i;
    +  for(i=0; i<db->nDb; i++){
    +    Btree *p = db->aDb[i].pBt;
    +    if( p && sqlite3BtreeIsInTrans(p) ){
    +      sqlite3BtreeTripAllCursors(p, SQLITE_ABORT);
    +    }
    +  }
    +}
    +
    +/*
    +** If the Vdbe passed as the first argument opened a statement-transaction,
    +** close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or
    +** SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement
    +** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the 
    +** statement transaction is commtted.
    +**
    +** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. 
    +** Otherwise SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
    +  sqlite3 *const db = p->db;
    +  int rc = SQLITE_OK;
    +
    +  /* If p->iStatement is greater than zero, then this Vdbe opened a 
    +  ** statement transaction that should be closed here. The only exception
    +  ** is that an IO error may have occured, causing an emergency rollback.
    +  ** In this case (db->nStatement==0), and there is nothing to do.
    +  */
    +  if( db->nStatement && p->iStatement ){
    +    int i;
    +    const int iSavepoint = p->iStatement-1;
    +
    +    assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
    +    assert( db->nStatement>0 );
    +    assert( p->iStatement==(db->nStatement+db->nSavepoint) );
    +
    +    for(i=0; i<db->nDb; i++){ 
    +      int rc2 = SQLITE_OK;
    +      Btree *pBt = db->aDb[i].pBt;
    +      if( pBt ){
    +        if( eOp==SAVEPOINT_ROLLBACK ){
    +          rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);
    +        }
    +        if( rc2==SQLITE_OK ){
    +          rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);
    +        }
    +        if( rc==SQLITE_OK ){
    +          rc = rc2;
    +        }
    +      }
    +    }
    +    db->nStatement--;
    +    p->iStatement = 0;
    +
    +    /* If the statement transaction is being rolled back, also restore the 
    +    ** database handles deferred constraint counter to the value it had when 
    +    ** the statement transaction was opened.  */
    +    if( eOp==SAVEPOINT_ROLLBACK ){
    +      db->nDeferredCons = p->nStmtDefCons;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** If SQLite is compiled to support shared-cache mode and to be threadsafe,
    +** this routine obtains the mutex associated with each BtShared structure
    +** that may be accessed by the VM passed as an argument. In doing so it
    +** sets the BtShared.db member of each of the BtShared structures, ensuring
    +** that the correct busy-handler callback is invoked if required.
    +**
    +** If SQLite is not threadsafe but does support shared-cache mode, then
    +** sqlite3BtreeEnterAll() is invoked to set the BtShared.db variables
    +** of all of BtShared structures accessible via the database handle 
    +** associated with the VM. Of course only a subset of these structures
    +** will be accessed by the VM, and we could use Vdbe.btreeMask to figure
    +** that subset out, but there is no advantage to doing so.
    +**
    +** If SQLite is not threadsafe and does not support shared-cache mode, this
    +** function is a no-op.
    +*/
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +SQLITE_PRIVATE void sqlite3VdbeMutexArrayEnter(Vdbe *p){
    +#if SQLITE_THREADSAFE
    +  sqlite3BtreeMutexArrayEnter(&p->aMutex);
    +#else
    +  sqlite3BtreeEnterAll(p->db);
    +#endif
    +}
    +#endif
    +
    +/*
    +** This function is called when a transaction opened by the database 
    +** handle associated with the VM passed as an argument is about to be 
    +** committed. If there are outstanding deferred foreign key constraint
    +** violations, return SQLITE_ERROR. Otherwise, SQLITE_OK.
    +**
    +** If there are outstanding FK violations and this function returns 
    +** SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT and write
    +** an error message to it. Then return SQLITE_ERROR.
    +*/
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
    +  sqlite3 *db = p->db;
    +  if( (deferred && db->nDeferredCons>0) || (!deferred && p->nFkConstraint>0) ){
    +    p->rc = SQLITE_CONSTRAINT;
    +    p->errorAction = OE_Abort;
    +    sqlite3SetString(&p->zErrMsg, db, "foreign key constraint failed");
    +    return SQLITE_ERROR;
    +  }
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +/*
    +** This routine is called the when a VDBE tries to halt.  If the VDBE
    +** has made changes and is in autocommit mode, then commit those
    +** changes.  If a rollback is needed, then do the rollback.
    +**
    +** This routine is the only way to move the state of a VM from
    +** SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT.  It is harmless to
    +** call this on a VM that is in the SQLITE_MAGIC_HALT state.
    +**
    +** Return an error code.  If the commit could not complete because of
    +** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it
    +** means the close did not happen and needs to be repeated.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
    +  int rc;                         /* Used to store transient return codes */
    +  sqlite3 *db = p->db;
    +
    +  /* This function contains the logic that determines if a statement or
    +  ** transaction will be committed or rolled back as a result of the
    +  ** execution of this virtual machine. 
    +  **
    +  ** If any of the following errors occur:
    +  **
    +  **     SQLITE_NOMEM
    +  **     SQLITE_IOERR
    +  **     SQLITE_FULL
    +  **     SQLITE_INTERRUPT
    +  **
    +  ** Then the internal cache might have been left in an inconsistent
    +  ** state.  We need to rollback the statement transaction, if there is
    +  ** one, or the complete transaction if there is no statement transaction.
    +  */
    +
    +  if( p->db->mallocFailed ){
    +    p->rc = SQLITE_NOMEM;
    +  }
    +  closeAllCursors(p);
    +  if( p->magic!=VDBE_MAGIC_RUN ){
    +    return SQLITE_OK;
    +  }
    +  checkActiveVdbeCnt(db);
    +
    +  /* No commit or rollback needed if the program never started */
    +  if( p->pc>=0 ){
    +    int mrc;   /* Primary error code from p->rc */
    +    int eStatementOp = 0;
    +    int isSpecialError;            /* Set to true if a 'special' error */
    +
    +    /* Lock all btrees used by the statement */
    +    sqlite3VdbeMutexArrayEnter(p);
    +
    +    /* Check for one of the special errors */
    +    mrc = p->rc & 0xff;
    +    assert( p->rc!=SQLITE_IOERR_BLOCKED );  /* This error no longer exists */
    +    isSpecialError = mrc==SQLITE_NOMEM || mrc==SQLITE_IOERR
    +                     || mrc==SQLITE_INTERRUPT || mrc==SQLITE_FULL;
    +    if( isSpecialError ){
    +      /* If the query was read-only, we need do no rollback at all. Otherwise,
    +      ** proceed with the special handling.
    +      */
    +      if( !p->readOnly || mrc!=SQLITE_INTERRUPT ){
    +        if( (mrc==SQLITE_NOMEM || mrc==SQLITE_FULL) && p->usesStmtJournal ){
    +          eStatementOp = SAVEPOINT_ROLLBACK;
    +        }else{
    +          /* We are forced to roll back the active transaction. Before doing
    +          ** so, abort any other statements this handle currently has active.
    +          */
    +          invalidateCursorsOnModifiedBtrees(db);
    +          sqlite3RollbackAll(db);
    +          sqlite3CloseSavepoints(db);
    +          db->autoCommit = 1;
    +        }
    +      }
    +    }
    +
    +    /* Check for immediate foreign key violations. */
    +    if( p->rc==SQLITE_OK ){
    +      sqlite3VdbeCheckFk(p, 0);
    +    }
    +  
    +    /* If the auto-commit flag is set and this is the only active writer 
    +    ** VM, then we do either a commit or rollback of the current transaction. 
    +    **
    +    ** Note: This block also runs if one of the special errors handled 
    +    ** above has occurred. 
    +    */
    +    if( !sqlite3VtabInSync(db) 
    +     && db->autoCommit 
    +     && db->writeVdbeCnt==(p->readOnly==0) 
    +    ){
    +      if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){
    +        if( sqlite3VdbeCheckFk(p, 1) ){
    +          sqlite3BtreeMutexArrayLeave(&p->aMutex);
    +          return SQLITE_ERROR;
    +        }
    +        /* The auto-commit flag is true, the vdbe program was successful 
    +        ** or hit an 'OR FAIL' constraint and there are no deferred foreign
    +        ** key constraints to hold up the transaction. This means a commit 
    +        ** is required.  */
    +        rc = vdbeCommit(db, p);
    +        if( rc==SQLITE_BUSY ){
    +          sqlite3BtreeMutexArrayLeave(&p->aMutex);
    +          return SQLITE_BUSY;
    +        }else if( rc!=SQLITE_OK ){
    +          p->rc = rc;
    +          sqlite3RollbackAll(db);
    +        }else{
    +          db->nDeferredCons = 0;
    +          sqlite3CommitInternalChanges(db);
    +        }
    +      }else{
    +        sqlite3RollbackAll(db);
    +      }
    +      db->nStatement = 0;
    +    }else if( eStatementOp==0 ){
    +      if( p->rc==SQLITE_OK || p->errorAction==OE_Fail ){
    +        eStatementOp = SAVEPOINT_RELEASE;
    +      }else if( p->errorAction==OE_Abort ){
    +        eStatementOp = SAVEPOINT_ROLLBACK;
    +      }else{
    +        invalidateCursorsOnModifiedBtrees(db);
    +        sqlite3RollbackAll(db);
    +        sqlite3CloseSavepoints(db);
    +        db->autoCommit = 1;
    +      }
    +    }
    +  
    +    /* If eStatementOp is non-zero, then a statement transaction needs to
    +    ** be committed or rolled back. Call sqlite3VdbeCloseStatement() to
    +    ** do so. If this operation returns an error, and the current statement
    +    ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then set the error
    +    ** code to the new value.
    +    */
    +    if( eStatementOp ){
    +      rc = sqlite3VdbeCloseStatement(p, eStatementOp);
    +      if( rc && (p->rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT) ){
    +        p->rc = rc;
    +        sqlite3DbFree(db, p->zErrMsg);
    +        p->zErrMsg = 0;
    +      }
    +    }
    +  
    +    /* If this was an INSERT, UPDATE or DELETE and no statement transaction
    +    ** has been rolled back, update the database connection change-counter. 
    +    */
    +    if( p->changeCntOn ){
    +      if( eStatementOp!=SAVEPOINT_ROLLBACK ){
    +        sqlite3VdbeSetChanges(db, p->nChange);
    +      }else{
    +        sqlite3VdbeSetChanges(db, 0);
    +      }
    +      p->nChange = 0;
    +    }
    +  
    +    /* Rollback or commit any schema changes that occurred. */
    +    if( p->rc!=SQLITE_OK && db->flags&SQLITE_InternChanges ){
    +      sqlite3ResetInternalSchema(db, 0);
    +      db->flags = (db->flags | SQLITE_InternChanges);
    +    }
    +
    +    /* Release the locks */
    +    sqlite3BtreeMutexArrayLeave(&p->aMutex);
    +  }
    +
    +  /* We have successfully halted and closed the VM.  Record this fact. */
    +  if( p->pc>=0 ){
    +    db->activeVdbeCnt--;
    +    if( !p->readOnly ){
    +      db->writeVdbeCnt--;
    +    }
    +    assert( db->activeVdbeCnt>=db->writeVdbeCnt );
    +  }
    +  p->magic = VDBE_MAGIC_HALT;
    +  checkActiveVdbeCnt(db);
    +  if( p->db->mallocFailed ){
    +    p->rc = SQLITE_NOMEM;
    +  }
    +
    +  /* If the auto-commit flag is set to true, then any locks that were held
    +  ** by connection db have now been released. Call sqlite3ConnectionUnlocked() 
    +  ** to invoke any required unlock-notify callbacks.
    +  */
    +  if( db->autoCommit ){
    +    sqlite3ConnectionUnlocked(db);
    +  }
    +
    +  assert( db->activeVdbeCnt>0 || db->autoCommit==0 || db->nStatement==0 );
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Each VDBE holds the result of the most recent sqlite3_step() call
    +** in p->rc.  This routine sets that result back to SQLITE_OK.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe *p){
    +  p->rc = SQLITE_OK;
    +}
    +
    +/*
    +** Clean up a VDBE after execution but do not delete the VDBE just yet.
    +** Write any error messages into *pzErrMsg.  Return the result code.
    +**
    +** After this routine is run, the VDBE should be ready to be executed
    +** again.
    +**
    +** To look at it another way, this routine resets the state of the
    +** virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
    +** VDBE_MAGIC_INIT.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){
    +  sqlite3 *db;
    +  db = p->db;
    +
    +  /* If the VM did not run to completion or if it encountered an
    +  ** error, then it might not have been halted properly.  So halt
    +  ** it now.
    +  */
    +  (void)sqlite3SafetyOn(db);
    +  sqlite3VdbeHalt(p);
    +  (void)sqlite3SafetyOff(db);
    +
    +  /* If the VDBE has be run even partially, then transfer the error code
    +  ** and error message from the VDBE into the main database structure.  But
    +  ** if the VDBE has just been set to run but has not actually executed any
    +  ** instructions yet, leave the main database error information unchanged.
    +  */
    +  if( p->pc>=0 ){
    +    if( p->zErrMsg ){
    +      sqlite3BeginBenignMalloc();
    +      sqlite3ValueSetStr(db->pErr,-1,p->zErrMsg,SQLITE_UTF8,SQLITE_TRANSIENT);
    +      sqlite3EndBenignMalloc();
    +      db->errCode = p->rc;
    +      sqlite3DbFree(db, p->zErrMsg);
    +      p->zErrMsg = 0;
    +    }else if( p->rc ){
    +      sqlite3Error(db, p->rc, 0);
    +    }else{
    +      sqlite3Error(db, SQLITE_OK, 0);
    +    }
    +  }else if( p->rc && p->expired ){
    +    /* The expired flag was set on the VDBE before the first call
    +    ** to sqlite3_step(). For consistency (since sqlite3_step() was
    +    ** called), set the database error in this case as well.
    +    */
    +    sqlite3Error(db, p->rc, 0);
    +    sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = 0;
    +  }
    +
    +  /* Reclaim all memory used by the VDBE
    +  */
    +  Cleanup(p);
    +
    +  /* Save profiling information from this VDBE run.
    +  */
    +#ifdef VDBE_PROFILE
    +  {
    +    FILE *out = fopen("vdbe_profile.out", "a");
    +    if( out ){
    +      int i;
    +      fprintf(out, "---- ");
    +      for(i=0; i<p->nOp; i++){
    +        fprintf(out, "%02x", p->aOp[i].opcode);
    +      }
    +      fprintf(out, "\n");
    +      for(i=0; i<p->nOp; i++){
    +        fprintf(out, "%6d %10lld %8lld ",
    +           p->aOp[i].cnt,
    +           p->aOp[i].cycles,
    +           p->aOp[i].cnt>0 ? p->aOp[i].cycles/p->aOp[i].cnt : 0
    +        );
    +        sqlite3VdbePrintOp(out, i, &p->aOp[i]);
    +      }
    +      fclose(out);
    +    }
    +  }
    +#endif
    +  p->magic = VDBE_MAGIC_INIT;
    +  return p->rc & db->errMask;
    +}
    + 
    +/*
    +** Clean up and delete a VDBE after execution.  Return an integer which is
    +** the result code.  Write any error message text into *pzErrMsg.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe *p){
    +  int rc = SQLITE_OK;
    +  if( p->magic==VDBE_MAGIC_RUN || p->magic==VDBE_MAGIC_HALT ){
    +    rc = sqlite3VdbeReset(p);
    +    assert( (rc & p->db->errMask)==rc );
    +  }
    +  sqlite3VdbeDelete(p);
    +  return rc;
    +}
    +
    +/*
    +** Call the destructor for each auxdata entry in pVdbeFunc for which
    +** the corresponding bit in mask is clear.  Auxdata entries beyond 31
    +** are always destroyed.  To destroy all auxdata entries, call this
    +** routine with mask==0.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int mask){
    +  int i;
    +  for(i=0; i<pVdbeFunc->nAux; i++){
    +    struct AuxData *pAux = &pVdbeFunc->apAux[i];
    +    if( (i>31 || !(mask&(((u32)1)<<i))) && pAux->pAux ){
    +      if( pAux->xDelete ){
    +        pAux->xDelete(pAux->pAux);
    +      }
    +      pAux->pAux = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** Delete an entire VDBE.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){
    +  sqlite3 *db;
    +
    +  if( NEVER(p==0) ) return;
    +  db = p->db;
    +  if( p->pPrev ){
    +    p->pPrev->pNext = p->pNext;
    +  }else{
    +    assert( db->pVdbe==p );
    +    db->pVdbe = p->pNext;
    +  }
    +  if( p->pNext ){
    +    p->pNext->pPrev = p->pPrev;
    +  }
    +  releaseMemArray(p->aVar, p->nVar);
    +  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
    +  vdbeFreeOpArray(db, p->aOp, p->nOp);
    +  sqlite3DbFree(db, p->aLabel);
    +  sqlite3DbFree(db, p->aColName);
    +  sqlite3DbFree(db, p->zSql);
    +  p->magic = VDBE_MAGIC_DEAD;
    +  sqlite3DbFree(db, p->pFree);
    +  sqlite3DbFree(db, p);
    +}
    +
    +/*
    +** Make sure the cursor p is ready to read or write the row to which it
    +** was last positioned.  Return an error code if an OOM fault or I/O error
    +** prevents us from positioning the cursor to its correct position.
    +**
    +** If a MoveTo operation is pending on the given cursor, then do that
    +** MoveTo now.  If no move is pending, check to see if the row has been
    +** deleted out from under the cursor and if it has, mark the row as
    +** a NULL row.
    +**
    +** If the cursor is already pointing to the correct row and that row has
    +** not been deleted out from under the cursor, then this routine is a no-op.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor *p){
    +  if( p->deferredMoveto ){
    +    int res, rc;
    +#ifdef SQLITE_TEST
    +    extern int sqlite3_search_count;
    +#endif
    +    assert( p->isTable );
    +    rc = sqlite3BtreeMovetoUnpacked(p->pCursor, 0, p->movetoTarget, 0, &res);
    +    if( rc ) return rc;
    +    p->lastRowid = p->movetoTarget;
    +    p->rowidIsValid = ALWAYS(res==0) ?1:0;
    +    if( NEVER(res<0) ){
    +      rc = sqlite3BtreeNext(p->pCursor, &res);
    +      if( rc ) return rc;
    +    }
    +#ifdef SQLITE_TEST
    +    sqlite3_search_count++;
    +#endif
    +    p->deferredMoveto = 0;
    +    p->cacheStatus = CACHE_STALE;
    +  }else if( ALWAYS(p->pCursor) ){
    +    int hasMoved;
    +    int rc = sqlite3BtreeCursorHasMoved(p->pCursor, &hasMoved);
    +    if( rc ) return rc;
    +    if( hasMoved ){
    +      p->cacheStatus = CACHE_STALE;
    +      p->nullRow = 1;
    +    }
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** The following functions:
    +**
    +** sqlite3VdbeSerialType()
    +** sqlite3VdbeSerialTypeLen()
    +** sqlite3VdbeSerialLen()
    +** sqlite3VdbeSerialPut()
    +** sqlite3VdbeSerialGet()
    +**
    +** encapsulate the code that serializes values for storage in SQLite
    +** data and index records. Each serialized value consists of a
    +** 'serial-type' and a blob of data. The serial type is an 8-byte unsigned
    +** integer, stored as a varint.
    +**
    +** In an SQLite index record, the serial type is stored directly before
    +** the blob of data that it corresponds to. In a table record, all serial
    +** types are stored at the start of the record, and the blobs of data at
    +** the end. Hence these functions allow the caller to handle the
    +** serial-type and data blob seperately.
    +**
    +** The following table describes the various storage classes for data:
    +**
    +**   serial type        bytes of data      type
    +**   --------------     ---------------    ---------------
    +**      0                     0            NULL
    +**      1                     1            signed integer
    +**      2                     2            signed integer
    +**      3                     3            signed integer
    +**      4                     4            signed integer
    +**      5                     6            signed integer
    +**      6                     8            signed integer
    +**      7                     8            IEEE float
    +**      8                     0            Integer constant 0
    +**      9                     0            Integer constant 1
    +**     10,11                               reserved for expansion
    +**    N>=12 and even       (N-12)/2        BLOB
    +**    N>=13 and odd        (N-13)/2        text
    +**
    +** The 8 and 9 types were added in 3.3.0, file format 4.  Prior versions
    +** of SQLite will not understand those serial types.
    +*/
    +
    +/*
    +** Return the serial-type for the value stored in pMem.
    +*/
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
    +  int flags = pMem->flags;
    +  int n;
    +
    +  if( flags&MEM_Null ){
    +    return 0;
    +  }
    +  if( flags&MEM_Int ){
    +    /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
    +#   define MAX_6BYTE ((((i64)0x00008000)<<32)-1)
    +    i64 i = pMem->u.i;
    +    u64 u;
    +    if( file_format>=4 && (i&1)==i ){
    +      return 8+(u32)i;
    +    }
    +    u = i<0 ? -i : i;
    +    if( u<=127 ) return 1;
    +    if( u<=32767 ) return 2;
    +    if( u<=8388607 ) return 3;
    +    if( u<=2147483647 ) return 4;
    +    if( u<=MAX_6BYTE ) return 5;
    +    return 6;
    +  }
    +  if( flags&MEM_Real ){
    +    return 7;
    +  }
    +  assert( pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob) );
    +  n = pMem->n;
    +  if( flags & MEM_Zero ){
    +    n += pMem->u.nZero;
    +  }
    +  assert( n>=0 );
    +  return ((n*2) + 12 + ((flags&MEM_Str)!=0));
    +}
    +
    +/*
    +** Return the length of the data corresponding to the supplied serial-type.
    +*/
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
    +  if( serial_type>=12 ){
    +    return (serial_type-12)/2;
    +  }else{
    +    static const u8 aSize[] = { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0, 0, 0 };
    +    return aSize[serial_type];
    +  }
    +}
    +
    +/*
    +** If we are on an architecture with mixed-endian floating 
    +** points (ex: ARM7) then swap the lower 4 bytes with the 
    +** upper 4 bytes.  Return the result.
    +**
    +** For most architectures, this is a no-op.
    +**
    +** (later):  It is reported to me that the mixed-endian problem
    +** on ARM7 is an issue with GCC, not with the ARM7 chip.  It seems
    +** that early versions of GCC stored the two words of a 64-bit
    +** float in the wrong order.  And that error has been propagated
    +** ever since.  The blame is not necessarily with GCC, though.
    +** GCC might have just copying the problem from a prior compiler.
    +** I am also told that newer versions of GCC that follow a different
    +** ABI get the byte order right.
    +**
    +** Developers using SQLite on an ARM7 should compile and run their
    +** application using -DSQLITE_DEBUG=1 at least once.  With DEBUG
    +** enabled, some asserts below will ensure that the byte order of
    +** floating point values is correct.
    +**
    +** (2007-08-30)  Frank van Vugt has studied this problem closely
    +** and has send his findings to the SQLite developers.  Frank
    +** writes that some Linux kernels offer floating point hardware
    +** emulation that uses only 32-bit mantissas instead of a full 
    +** 48-bits as required by the IEEE standard.  (This is the
    +** CONFIG_FPE_FASTFPE option.)  On such systems, floating point
    +** byte swapping becomes very complicated.  To avoid problems,
    +** the necessary byte swapping is carried out using a 64-bit integer
    +** rather than a 64-bit float.  Frank assures us that the code here
    +** works for him.  We, the developers, have no way to independently
    +** verify this, but Frank seems to know what he is talking about
    +** so we trust him.
    +*/
    +#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
    +static u64 floatSwap(u64 in){
    +  union {
    +    u64 r;
    +    u32 i[2];
    +  } u;
    +  u32 t;
    +
    +  u.r = in;
    +  t = u.i[0];
    +  u.i[0] = u.i[1];
    +  u.i[1] = t;
    +  return u.r;
    +}
    +# define swapMixedEndianFloat(X)  X = floatSwap(X)
    +#else
    +# define swapMixedEndianFloat(X)
    +#endif
    +
    +/*
    +** Write the serialized data blob for the value stored in pMem into 
    +** buf. It is assumed that the caller has allocated sufficient space.
    +** Return the number of bytes written.
    +**
    +** nBuf is the amount of space left in buf[].  nBuf must always be
    +** large enough to hold the entire field.  Except, if the field is
    +** a blob with a zero-filled tail, then buf[] might be just the right
    +** size to hold everything except for the zero-filled tail.  If buf[]
    +** is only big enough to hold the non-zero prefix, then only write that
    +** prefix into buf[].  But if buf[] is large enough to hold both the
    +** prefix and the tail then write the prefix and set the tail to all
    +** zeros.
    +**
    +** Return the number of bytes actually written into buf[].  The number
    +** of bytes in the zero-filled tail is included in the return value only
    +** if those bytes were zeroed in buf[].
    +*/ 
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, int nBuf, Mem *pMem, int file_format){
    +  u32 serial_type = sqlite3VdbeSerialType(pMem, file_format);
    +  u32 len;
    +
    +  /* Integer and Real */
    +  if( serial_type<=7 && serial_type>0 ){
    +    u64 v;
    +    u32 i;
    +    if( serial_type==7 ){
    +      assert( sizeof(v)==sizeof(pMem->r) );
    +      memcpy(&v, &pMem->r, sizeof(v));
    +      swapMixedEndianFloat(v);
    +    }else{
    +      v = pMem->u.i;
    +    }
    +    len = i = sqlite3VdbeSerialTypeLen(serial_type);
    +    assert( len<=(u32)nBuf );
    +    while( i-- ){
    +      buf[i] = (u8)(v&0xFF);
    +      v >>= 8;
    +    }
    +    return len;
    +  }
    +
    +  /* String or blob */
    +  if( serial_type>=12 ){
    +    assert( pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0)
    +             == (int)sqlite3VdbeSerialTypeLen(serial_type) );
    +    assert( pMem->n<=nBuf );
    +    len = pMem->n;
    +    memcpy(buf, pMem->z, len);
    +    if( pMem->flags & MEM_Zero ){
    +      len += pMem->u.nZero;
    +      assert( nBuf>=0 );
    +      if( len > (u32)nBuf ){
    +        len = (u32)nBuf;
    +      }
    +      memset(&buf[pMem->n], 0, len-pMem->n);
    +    }
    +    return len;
    +  }
    +
    +  /* NULL or constants 0 or 1 */
    +  return 0;
    +}
    +
    +/*
    +** Deserialize the data blob pointed to by buf as serial type serial_type
    +** and store the result in pMem.  Return the number of bytes read.
    +*/ 
    +SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
    +  const unsigned char *buf,     /* Buffer to deserialize from */
    +  u32 serial_type,              /* Serial type to deserialize */
    +  Mem *pMem                     /* Memory cell to write value into */
    +){
    +  switch( serial_type ){
    +    case 10:   /* Reserved for future use */
    +    case 11:   /* Reserved for future use */
    +    case 0: {  /* NULL */
    +      pMem->flags = MEM_Null;
    +      break;
    +    }
    +    case 1: { /* 1-byte signed integer */
    +      pMem->u.i = (signed char)buf[0];
    +      pMem->flags = MEM_Int;
    +      return 1;
    +    }
    +    case 2: { /* 2-byte signed integer */
    +      pMem->u.i = (((signed char)buf[0])<<8) | buf[1];
    +      pMem->flags = MEM_Int;
    +      return 2;
    +    }
    +    case 3: { /* 3-byte signed integer */
    +      pMem->u.i = (((signed char)buf[0])<<16) | (buf[1]<<8) | buf[2];
    +      pMem->flags = MEM_Int;
    +      return 3;
    +    }
    +    case 4: { /* 4-byte signed integer */
    +      pMem->u.i = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
    +      pMem->flags = MEM_Int;
    +      return 4;
    +    }
    +    case 5: { /* 6-byte signed integer */
    +      u64 x = (((signed char)buf[0])<<8) | buf[1];
    +      u32 y = (buf[2]<<24) | (buf[3]<<16) | (buf[4]<<8) | buf[5];
    +      x = (x<<32) | y;
    +      pMem->u.i = *(i64*)&x;
    +      pMem->flags = MEM_Int;
    +      return 6;
    +    }
    +    case 6:   /* 8-byte signed integer */
    +    case 7: { /* IEEE floating point */
    +      u64 x;
    +      u32 y;
    +#if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
    +      /* Verify that integers and floating point values use the same
    +      ** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is
    +      ** defined that 64-bit floating point values really are mixed
    +      ** endian.
    +      */
    +      static const u64 t1 = ((u64)0x3ff00000)<<32;
    +      static const double r1 = 1.0;
    +      u64 t2 = t1;
    +      swapMixedEndianFloat(t2);
    +      assert( sizeof(r1)==sizeof(t2) && memcmp(&r1, &t2, sizeof(r1))==0 );
    +#endif
    +
    +      x = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
    +      y = (buf[4]<<24) | (buf[5]<<16) | (buf[6]<<8) | buf[7];
    +      x = (x<<32) | y;
    +      if( serial_type==6 ){
    +        pMem->u.i = *(i64*)&x;
    +        pMem->flags = MEM_Int;
    +      }else{
    +        assert( sizeof(x)==8 && sizeof(pMem->r)==8 );
    +        swapMixedEndianFloat(x);
    +        memcpy(&pMem->r, &x, sizeof(x));
    +        pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real;
    +      }
    +      return 8;
    +    }
    +    case 8:    /* Integer 0 */
    +    case 9: {  /* Integer 1 */
    +      pMem->u.i = serial_type-8;
    +      pMem->flags = MEM_Int;
    +      return 0;
    +    }
    +    default: {
    +      u32 len = (serial_type-12)/2;
    +      pMem->z = (char *)buf;
    +      pMem->n = len;
    +      pMem->xDel = 0;
    +      if( serial_type&0x01 ){
    +        pMem->flags = MEM_Str | MEM_Ephem;
    +      }else{
    +        pMem->flags = MEM_Blob | MEM_Ephem;
    +      }
    +      return len;
    +    }
    +  }
    +  return 0;
    +}
    +
    +
    +/*
    +** Given the nKey-byte encoding of a record in pKey[], parse the
    +** record into a UnpackedRecord structure.  Return a pointer to
    +** that structure.
    +**
    +** The calling function might provide szSpace bytes of memory
    +** space at pSpace.  This space can be used to hold the returned
    +** VDbeParsedRecord structure if it is large enough.  If it is
    +** not big enough, space is obtained from sqlite3_malloc().
    +**
    +** The returned structure should be closed by a call to
    +** sqlite3VdbeDeleteUnpackedRecord().
    +*/ 
    +SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeRecordUnpack(
    +  KeyInfo *pKeyInfo,     /* Information about the record format */
    +  int nKey,              /* Size of the binary record */
    +  const void *pKey,      /* The binary record */
    +  char *pSpace,          /* Unaligned space available to hold the object */
    +  int szSpace            /* Size of pSpace[] in bytes */
    +){
    +  const unsigned char *aKey = (const unsigned char *)pKey;
    +  UnpackedRecord *p;  /* The unpacked record that we will return */
    +  int nByte;          /* Memory space needed to hold p, in bytes */
    +  int d;
    +  u32 idx;
    +  u16 u;              /* Unsigned loop counter */
    +  u32 szHdr;
    +  Mem *pMem;
    +  int nOff;           /* Increase pSpace by this much to 8-byte align it */
    +  
    +  /*
    +  ** We want to shift the pointer pSpace up such that it is 8-byte aligned.
    +  ** Thus, we need to calculate a value, nOff, between 0 and 7, to shift 
    +  ** it by.  If pSpace is already 8-byte aligned, nOff should be zero.
    +  */
    +  nOff = (8 - (SQLITE_PTR_TO_INT(pSpace) & 7)) & 7;
    +  pSpace += nOff;
    +  szSpace -= nOff;
    +  nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
    +  if( nByte>szSpace ){
    +    p = sqlite3DbMallocRaw(pKeyInfo->db, nByte);
    +    if( p==0 ) return 0;
    +    p->flags = UNPACKED_NEED_FREE | UNPACKED_NEED_DESTROY;
    +  }else{
    +    p = (UnpackedRecord*)pSpace;
    +    p->flags = UNPACKED_NEED_DESTROY;
    +  }
    +  p->pKeyInfo = pKeyInfo;
    +  p->nField = pKeyInfo->nField + 1;
    +  p->aMem = pMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
    +  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
    +  idx = getVarint32(aKey, szHdr);
    +  d = szHdr;
    +  u = 0;
    +  while( idx<szHdr && u<p->nField && d<=nKey ){
    +    u32 serial_type;
    +
    +    idx += getVarint32(&aKey[idx], serial_type);
    +    pMem->enc = pKeyInfo->enc;
    +    pMem->db = pKeyInfo->db;
    +    pMem->flags = 0;
    +    pMem->zMalloc = 0;
    +    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
    +    pMem++;
    +    u++;
    +  }
    +  assert( u<=pKeyInfo->nField + 1 );
    +  p->nField = u;
    +  return (void*)p;
    +}
    +
    +/*
    +** This routine destroys a UnpackedRecord object.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
    +  int i;
    +  Mem *pMem;
    +
    +  assert( p!=0 );
    +  assert( p->flags & UNPACKED_NEED_DESTROY );
    +  for(i=0, pMem=p->aMem; i<p->nField; i++, pMem++){
    +    /* The unpacked record is always constructed by the
    +    ** sqlite3VdbeUnpackRecord() function above, which makes all
    +    ** strings and blobs static.  And none of the elements are
    +    ** ever transformed, so there is never anything to delete.
    +    */
    +    if( NEVER(pMem->zMalloc) ) sqlite3VdbeMemRelease(pMem);
    +  }
    +  if( p->flags & UNPACKED_NEED_FREE ){
    +    sqlite3DbFree(p->pKeyInfo->db, p);
    +  }
    +}
    +
    +/*
    +** This function compares the two table rows or index records
    +** specified by {nKey1, pKey1} and pPKey2.  It returns a negative, zero
    +** or positive integer if key1 is less than, equal to or 
    +** greater than key2.  The {nKey1, pKey1} key must be a blob
    +** created by th OP_MakeRecord opcode of the VDBE.  The pPKey2
    +** key must be a parsed key such as obtained from
    +** sqlite3VdbeParseRecord.
    +**
    +** Key1 and Key2 do not have to contain the same number of fields.
    +** The key with fewer fields is usually compares less than the 
    +** longer key.  However if the UNPACKED_INCRKEY flags in pPKey2 is set
    +** and the common prefixes are equal, then key1 is less than key2.
    +** Or if the UNPACKED_MATCH_PREFIX flag is set and the prefixes are
    +** equal, then the keys are considered to be equal and
    +** the parts beyond the common prefix are ignored.
    +**
    +** If the UNPACKED_IGNORE_ROWID flag is set, then the last byte of
    +** the header of pKey1 is ignored.  It is assumed that pKey1 is
    +** an index key, and thus ends with a rowid value.  The last byte
    +** of the header will therefore be the serial type of the rowid:
    +** one of 1, 2, 3, 4, 5, 6, 8, or 9 - the integer serial types.
    +** The serial type of the final rowid will always be a single byte.
    +** By ignoring this last byte of the header, we force the comparison
    +** to ignore the rowid at the end of key1.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeRecordCompare(
    +  int nKey1, const void *pKey1, /* Left key */
    +  UnpackedRecord *pPKey2        /* Right key */
    +){
    +  int d1;            /* Offset into aKey[] of next data element */
    +  u32 idx1;          /* Offset into aKey[] of next header element */
    +  u32 szHdr1;        /* Number of bytes in header */
    +  int i = 0;
    +  int nField;
    +  int rc = 0;
    +  const unsigned char *aKey1 = (const unsigned char *)pKey1;
    +  KeyInfo *pKeyInfo;
    +  Mem mem1;
    +
    +  pKeyInfo = pPKey2->pKeyInfo;
    +  mem1.enc = pKeyInfo->enc;
    +  mem1.db = pKeyInfo->db;
    +  mem1.flags = 0;
    +  mem1.u.i = 0;  /* not needed, here to silence compiler warning */
    +  mem1.zMalloc = 0;
    +  
    +  idx1 = getVarint32(aKey1, szHdr1);
    +  d1 = szHdr1;
    +  if( pPKey2->flags & UNPACKED_IGNORE_ROWID ){
    +    szHdr1--;
    +  }
    +  nField = pKeyInfo->nField;
    +  while( idx1<szHdr1 && i<pPKey2->nField ){
    +    u32 serial_type1;
    +
    +    /* Read the serial types for the next element in each key. */
    +    idx1 += getVarint32( aKey1+idx1, serial_type1 );
    +    if( d1>=nKey1 && sqlite3VdbeSerialTypeLen(serial_type1)>0 ) break;
    +
    +    /* Extract the values to be compared.
    +    */
    +    d1 += sqlite3VdbeSerialGet(&aKey1[d1], serial_type1, &mem1);
    +
    +    /* Do the comparison
    +    */
    +    rc = sqlite3MemCompare(&mem1, &pPKey2->aMem[i],
    +                           i<nField ? pKeyInfo->aColl[i] : 0);
    +    if( rc!=0 ){
    +      break;
    +    }
    +    i++;
    +  }
    +
    +  /* No memory allocation is ever used on mem1. */
    +  if( NEVER(mem1.zMalloc) ) sqlite3VdbeMemRelease(&mem1);
    +
    +  /* If the PREFIX_SEARCH flag is set and all fields except the final
    +  ** rowid field were equal, then clear the PREFIX_SEARCH flag and set 
    +  ** pPKey2->rowid to the value of the rowid field in (pKey1, nKey1).
    +  ** This is used by the OP_IsUnique opcode.
    +  */
    +  if( (pPKey2->flags & UNPACKED_PREFIX_SEARCH) && i==(pPKey2->nField-1) ){
    +    assert( idx1==szHdr1 && rc );
    +    assert( mem1.flags & MEM_Int );
    +    pPKey2->flags &= ~UNPACKED_PREFIX_SEARCH;
    +    pPKey2->rowid = mem1.u.i;
    +  }
    +
    +  if( rc==0 ){
    +    /* rc==0 here means that one of the keys ran out of fields and
    +    ** all the fields up to that point were equal. If the UNPACKED_INCRKEY
    +    ** flag is set, then break the tie by treating key2 as larger.
    +    ** If the UPACKED_PREFIX_MATCH flag is set, then keys with common prefixes
    +    ** are considered to be equal.  Otherwise, the longer key is the 
    +    ** larger.  As it happens, the pPKey2 will always be the longer
    +    ** if there is a difference.
    +    */
    +    if( pPKey2->flags & UNPACKED_INCRKEY ){
    +      rc = -1;
    +    }else if( pPKey2->flags & UNPACKED_PREFIX_MATCH ){
    +      /* Leave rc==0 */
    +    }else if( idx1<szHdr1 ){
    +      rc = 1;
    +    }
    +  }else if( pKeyInfo->aSortOrder && i<pKeyInfo->nField
    +               && pKeyInfo->aSortOrder[i] ){
    +    rc = -rc;
    +  }
    +
    +  return rc;
    +}
    + 
    +
    +/*
    +** pCur points at an index entry created using the OP_MakeRecord opcode.
    +** Read the rowid (the last field in the record) and store it in *rowid.
    +** Return SQLITE_OK if everything works, or an error code otherwise.
    +**
    +** pCur might be pointing to text obtained from a corrupt database file.
    +** So the content cannot be trusted.  Do appropriate checks on the content.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
    +  i64 nCellKey = 0;
    +  int rc;
    +  u32 szHdr;        /* Size of the header */
    +  u32 typeRowid;    /* Serial type of the rowid */
    +  u32 lenRowid;     /* Size of the rowid */
    +  Mem m, v;
    +
    +  UNUSED_PARAMETER(db);
    +
    +  /* Get the size of the index entry.  Only indices entries of less
    +  ** than 2GiB are support - anything large must be database corruption.
    +  ** Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so
    +  ** this code can safely assume that nCellKey is 32-bits  
    +  */
    +  assert( sqlite3BtreeCursorIsValid(pCur) );
    +  rc = sqlite3BtreeKeySize(pCur, &nCellKey);
    +  assert( rc==SQLITE_OK );     /* pCur is always valid so KeySize cannot fail */
    +  assert( (nCellKey & SQLITE_MAX_U32)==(u64)nCellKey );
    +
    +  /* Read in the complete content of the index entry */
    +  memset(&m, 0, sizeof(m));
    +  rc = sqlite3VdbeMemFromBtree(pCur, 0, (int)nCellKey, 1, &m);
    +  if( rc ){
    +    return rc;
    +  }
    +
    +  /* The index entry must begin with a header size */
    +  (void)getVarint32((u8*)m.z, szHdr);
    +  testcase( szHdr==3 );
    +  testcase( szHdr==m.n );
    +  if( unlikely(szHdr<3 || (int)szHdr>m.n) ){
    +    goto idx_rowid_corruption;
    +  }
    +
    +  /* The last field of the index should be an integer - the ROWID.
    +  ** Verify that the last entry really is an integer. */
    +  (void)getVarint32((u8*)&m.z[szHdr-1], typeRowid);
    +  testcase( typeRowid==1 );
    +  testcase( typeRowid==2 );
    +  testcase( typeRowid==3 );
    +  testcase( typeRowid==4 );
    +  testcase( typeRowid==5 );
    +  testcase( typeRowid==6 );
    +  testcase( typeRowid==8 );
    +  testcase( typeRowid==9 );
    +  if( unlikely(typeRowid<1 || typeRowid>9 || typeRowid==7) ){
    +    goto idx_rowid_corruption;
    +  }
    +  lenRowid = sqlite3VdbeSerialTypeLen(typeRowid);
    +  testcase( (u32)m.n==szHdr+lenRowid );
    +  if( unlikely((u32)m.n<szHdr+lenRowid) ){
    +    goto idx_rowid_corruption;
    +  }
    +
    +  /* Fetch the integer off the end of the index record */
    +  sqlite3VdbeSerialGet((u8*)&m.z[m.n-lenRowid], typeRowid, &v);
    +  *rowid = v.u.i;
    +  sqlite3VdbeMemRelease(&m);
    +  return SQLITE_OK;
    +
    +  /* Jump here if database corruption is detected after m has been
    +  ** allocated.  Free the m object and return SQLITE_CORRUPT. */
    +idx_rowid_corruption:
    +  testcase( m.zMalloc!=0 );
    +  sqlite3VdbeMemRelease(&m);
    +  return SQLITE_CORRUPT_BKPT;
    +}
    +
    +/*
    +** Compare the key of the index entry that cursor pC is pointing to against
    +** the key string in pUnpacked.  Write into *pRes a number
    +** that is negative, zero, or positive if pC is less than, equal to,
    +** or greater than pUnpacked.  Return SQLITE_OK on success.
    +**
    +** pUnpacked is either created without a rowid or is truncated so that it
    +** omits the rowid at the end.  The rowid at the end of the index entry
    +** is ignored as well.  Hence, this routine only compares the prefixes 
    +** of the keys prior to the final rowid, not the entire key.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(
    +  VdbeCursor *pC,             /* The cursor to compare against */
    +  UnpackedRecord *pUnpacked,  /* Unpacked version of key to compare against */
    +  int *res                    /* Write the comparison result here */
    +){
    +  i64 nCellKey = 0;
    +  int rc;
    +  BtCursor *pCur = pC->pCursor;
    +  Mem m;
    +
    +  assert( sqlite3BtreeCursorIsValid(pCur) );
    +  rc = sqlite3BtreeKeySize(pCur, &nCellKey);
    +  assert( rc==SQLITE_OK );    /* pCur is always valid so KeySize cannot fail */
    +  /* nCellKey will always be between 0 and 0xffffffff because of the say
    +  ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */
    +  if( nCellKey<=0 || nCellKey>0x7fffffff ){
    +    *res = 0;
    +    return SQLITE_CORRUPT;
    +  }
    +  memset(&m, 0, sizeof(m));
    +  rc = sqlite3VdbeMemFromBtree(pC->pCursor, 0, (int)nCellKey, 1, &m);
    +  if( rc ){
    +    return rc;
    +  }
    +  assert( pUnpacked->flags & UNPACKED_IGNORE_ROWID );
    +  *res = sqlite3VdbeRecordCompare(m.n, m.z, pUnpacked);
    +  sqlite3VdbeMemRelease(&m);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This routine sets the value to be returned by subsequent calls to
    +** sqlite3_changes() on the database handle 'db'. 
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, int nChange){
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  db->nChange = nChange;
    +  db->nTotalChange += nChange;
    +}
    +
    +/*
    +** Set a flag in the vdbe to update the change counter when it is finalised
    +** or reset.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe *v){
    +  v->changeCntOn = 1;
    +}
    +
    +/*
    +** Mark every prepared statement associated with a database connection
    +** as expired.
    +**
    +** An expired statement means that recompilation of the statement is
    +** recommend.  Statements expire when things happen that make their
    +** programs obsolete.  Removing user-defined functions or collating
    +** sequences, or changing an authorization function are the types of
    +** things that make prepared statements obsolete.
    +*/
    +SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
    +  Vdbe *p;
    +  for(p = db->pVdbe; p; p=p->pNext){
    +    p->expired = 1;
    +  }
    +}
    +
    +/*
    +** Return the database associated with the Vdbe.
    +*/
    +SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){
    +  return v->db;
    +}
    +
    +/*
    +** Return a pointer to an sqlite3_value structure containing the value bound
    +** parameter iVar of VM v. Except, if the value is an SQL NULL, return 
    +** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
    +** constants) to the value before returning it.
    +**
    +** The returned value must be freed by the caller using sqlite3ValueFree().
    +*/
    +SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe *v, int iVar, u8 aff){
    +  assert( iVar>0 );
    +  if( v ){
    +    Mem *pMem = &v->aVar[iVar-1];
    +    if( 0==(pMem->flags & MEM_Null) ){
    +      sqlite3_value *pRet = sqlite3ValueNew(v->db);
    +      if( pRet ){
    +        sqlite3VdbeMemCopy((Mem *)pRet, pMem);
    +        sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8);
    +        sqlite3VdbeMemStoreType((Mem *)pRet);
    +      }
    +      return pRet;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Configure SQL variable iVar so that binding a new value to it signals
    +** to sqlite3_reoptimize() that re-preparing the statement may result
    +** in a better query plan.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){
    +  assert( iVar>0 );
    +  if( iVar>32 ){
    +    v->expmask = 0xffffffff;
    +  }else{
    +    v->expmask |= ((u32)1 << (iVar-1));
    +  }
    +}
    +
    +/************** End of vdbeaux.c *********************************************/
    +/************** Begin file vdbeapi.c *****************************************/
    +/*
    +** 2004 May 26
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains code use to implement APIs that are part of the
    +** VDBE.
    +**
    +** $Id: vdbeapi.c,v 1.167 2009/06/25 01:47:12 drh Exp $
    +*/
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** Return TRUE (non-zero) of the statement supplied as an argument needs
    +** to be recompiled.  A statement needs to be recompiled whenever the
    +** execution environment changes in a way that would alter the program
    +** that sqlite3_prepare() generates.  For example, if new functions or
    +** collating sequences are registered or if an authorizer function is
    +** added or changed.
    +*/
    +SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
    +  Vdbe *p = (Vdbe*)pStmt;
    +  return p==0 || p->expired;
    +}
    +#endif
    +
    +/*
    +** The following routine destroys a virtual machine that is created by
    +** the sqlite3_compile() routine. The integer returned is an SQLITE_
    +** success/failure code that describes the result of executing the virtual
    +** machine.
    +**
    +** This routine sets the error code and string returned by
    +** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
    +*/
    +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
    +  int rc;
    +  if( pStmt==0 ){
    +    rc = SQLITE_OK;
    +  }else{
    +    Vdbe *v = (Vdbe*)pStmt;
    +    sqlite3 *db = v->db;
    +#if SQLITE_THREADSAFE
    +    sqlite3_mutex *mutex = v->db->mutex;
    +#endif
    +    sqlite3_mutex_enter(mutex);
    +    rc = sqlite3VdbeFinalize(v);
    +    rc = sqlite3ApiExit(db, rc);
    +    sqlite3_mutex_leave(mutex);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Terminate the current execution of an SQL statement and reset it
    +** back to its starting state so that it can be reused. A success code from
    +** the prior execution is returned.
    +**
    +** This routine sets the error code and string returned by
    +** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
    +*/
    +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
    +  int rc;
    +  if( pStmt==0 ){
    +    rc = SQLITE_OK;
    +  }else{
    +    Vdbe *v = (Vdbe*)pStmt;
    +    sqlite3_mutex_enter(v->db->mutex);
    +    rc = sqlite3VdbeReset(v);
    +    sqlite3VdbeMakeReady(v, -1, 0, 0, 0, 0, 0);
    +    assert( (rc & (v->db->errMask))==rc );
    +    rc = sqlite3ApiExit(v->db, rc);
    +    sqlite3_mutex_leave(v->db->mutex);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Set all the parameters in the compiled SQL statement to NULL.
    +*/
    +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
    +  int i;
    +  int rc = SQLITE_OK;
    +  Vdbe *p = (Vdbe*)pStmt;
    +#if SQLITE_THREADSAFE
    +  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
    +#endif
    +  sqlite3_mutex_enter(mutex);
    +  for(i=0; i<p->nVar; i++){
    +    sqlite3VdbeMemRelease(&p->aVar[i]);
    +    p->aVar[i].flags = MEM_Null;
    +  }
    +  if( p->isPrepareV2 && p->expmask ){
    +    p->expired = 1;
    +  }
    +  sqlite3_mutex_leave(mutex);
    +  return rc;
    +}
    +
    +
    +/**************************** sqlite3_value_  *******************************
    +** The following routines extract information from a Mem or sqlite3_value
    +** structure.
    +*/
    +SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
    +  Mem *p = (Mem*)pVal;
    +  if( p->flags & (MEM_Blob|MEM_Str) ){
    +    sqlite3VdbeMemExpandBlob(p);
    +    p->flags &= ~MEM_Str;
    +    p->flags |= MEM_Blob;
    +    return p->z;
    +  }else{
    +    return sqlite3_value_text(pVal);
    +  }
    +}
    +SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
    +  return sqlite3ValueBytes(pVal, SQLITE_UTF8);
    +}
    +SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
    +  return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
    +}
    +SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
    +  return sqlite3VdbeRealValue((Mem*)pVal);
    +}
    +SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
    +  return (int)sqlite3VdbeIntValue((Mem*)pVal);
    +}
    +SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
    +  return sqlite3VdbeIntValue((Mem*)pVal);
    +}
    +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
    +  return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
    +  return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
    +}
    +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
    +  return sqlite3ValueText(pVal, SQLITE_UTF16BE);
    +}
    +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
    +  return sqlite3ValueText(pVal, SQLITE_UTF16LE);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
    +  return pVal->type;
    +}
    +
    +/**************************** sqlite3_result_  *******************************
    +** The following routines are used by user-defined functions to specify
    +** the function result.
    +**
    +** The setStrOrError() funtion calls sqlite3VdbeMemSetStr() to store the
    +** result as a string or blob but if the string or blob is too large, it
    +** then sets the error code to SQLITE_TOOBIG
    +*/
    +static void setResultStrOrError(
    +  sqlite3_context *pCtx,  /* Function context */
    +  const char *z,          /* String pointer */
    +  int n,                  /* Bytes in string, or negative */
    +  u8 enc,                 /* Encoding of z.  0 for BLOBs */
    +  void (*xDel)(void*)     /* Destructor function */
    +){
    +  if( sqlite3VdbeMemSetStr(&pCtx->s, z, n, enc, xDel)==SQLITE_TOOBIG ){
    +    sqlite3_result_error_toobig(pCtx);
    +  }
    +}
    +SQLITE_API void sqlite3_result_blob(
    +  sqlite3_context *pCtx, 
    +  const void *z, 
    +  int n, 
    +  void (*xDel)(void *)
    +){
    +  assert( n>=0 );
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  setResultStrOrError(pCtx, z, n, 0, xDel);
    +}
    +SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
    +}
    +SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  pCtx->isError = SQLITE_ERROR;
    +  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  pCtx->isError = SQLITE_ERROR;
    +  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
    +}
    +#endif
    +SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetInt64(&pCtx->s, (i64)iVal);
    +}
    +SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetInt64(&pCtx->s, iVal);
    +}
    +SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetNull(&pCtx->s);
    +}
    +SQLITE_API void sqlite3_result_text(
    +  sqlite3_context *pCtx, 
    +  const char *z, 
    +  int n,
    +  void (*xDel)(void *)
    +){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API void sqlite3_result_text16(
    +  sqlite3_context *pCtx, 
    +  const void *z, 
    +  int n, 
    +  void (*xDel)(void *)
    +){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
    +}
    +SQLITE_API void sqlite3_result_text16be(
    +  sqlite3_context *pCtx, 
    +  const void *z, 
    +  int n, 
    +  void (*xDel)(void *)
    +){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
    +}
    +SQLITE_API void sqlite3_result_text16le(
    +  sqlite3_context *pCtx, 
    +  const void *z, 
    +  int n, 
    +  void (*xDel)(void *)
    +){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemCopy(&pCtx->s, pValue);
    +}
    +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
    +}
    +SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
    +  pCtx->isError = errCode;
    +  if( pCtx->s.flags & MEM_Null ){
    +    sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1, 
    +                         SQLITE_UTF8, SQLITE_STATIC);
    +  }
    +}
    +
    +/* Force an SQLITE_TOOBIG error. */
    +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  pCtx->isError = SQLITE_TOOBIG;
    +  sqlite3VdbeMemSetStr(&pCtx->s, "string or blob too big", -1, 
    +                       SQLITE_UTF8, SQLITE_STATIC);
    +}
    +
    +/* An SQLITE_NOMEM error. */
    +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  sqlite3VdbeMemSetNull(&pCtx->s);
    +  pCtx->isError = SQLITE_NOMEM;
    +  pCtx->s.db->mallocFailed = 1;
    +}
    +
    +/*
    +** Execute the statement pStmt, either until a row of data is ready, the
    +** statement is completely executed or an error occurs.
    +**
    +** This routine implements the bulk of the logic behind the sqlite_step()
    +** API.  The only thing omitted is the automatic recompile if a 
    +** schema change has occurred.  That detail is handled by the
    +** outer sqlite3_step() wrapper procedure.
    +*/
    +static int sqlite3Step(Vdbe *p){
    +  sqlite3 *db;
    +  int rc;
    +
    +  assert(p);
    +  if( p->magic!=VDBE_MAGIC_RUN ){
    +    return SQLITE_MISUSE;
    +  }
    +
    +  /* Assert that malloc() has not failed */
    +  db = p->db;
    +  if( db->mallocFailed ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  if( p->pc<=0 && p->expired ){
    +    if( ALWAYS(p->rc==SQLITE_OK || p->rc==SQLITE_SCHEMA) ){
    +      p->rc = SQLITE_SCHEMA;
    +    }
    +    rc = SQLITE_ERROR;
    +    goto end_of_step;
    +  }
    +  if( sqlite3SafetyOn(db) ){
    +    p->rc = SQLITE_MISUSE;
    +    return SQLITE_MISUSE;
    +  }
    +  if( p->pc<0 ){
    +    /* If there are no other statements currently running, then
    +    ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt
    +    ** from interrupting a statement that has not yet started.
    +    */
    +    if( db->activeVdbeCnt==0 ){
    +      db->u1.isInterrupted = 0;
    +    }
    +
    +    assert( db->writeVdbeCnt>0 || db->autoCommit==0 || db->nDeferredCons==0 );
    +
    +#ifndef SQLITE_OMIT_TRACE
    +    if( db->xProfile && !db->init.busy ){
    +      double rNow;
    +      sqlite3OsCurrentTime(db->pVfs, &rNow);
    +      p->startTime = (u64)((rNow - (int)rNow)*3600.0*24.0*1000000000.0);
    +    }
    +#endif
    +
    +    db->activeVdbeCnt++;
    +    if( p->readOnly==0 ) db->writeVdbeCnt++;
    +    p->pc = 0;
    +  }
    +#ifndef SQLITE_OMIT_EXPLAIN
    +  if( p->explain ){
    +    rc = sqlite3VdbeList(p);
    +  }else
    +#endif /* SQLITE_OMIT_EXPLAIN */
    +  {
    +    rc = sqlite3VdbeExec(p);
    +  }
    +
    +  if( sqlite3SafetyOff(db) ){
    +    rc = SQLITE_MISUSE;
    +  }
    +
    +#ifndef SQLITE_OMIT_TRACE
    +  /* Invoke the profile callback if there is one
    +  */
    +  if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){
    +    double rNow;
    +    u64 elapseTime;
    +
    +    sqlite3OsCurrentTime(db->pVfs, &rNow);
    +    elapseTime = (u64)((rNow - (int)rNow)*3600.0*24.0*1000000000.0);
    +    elapseTime -= p->startTime;
    +    db->xProfile(db->pProfileArg, p->zSql, elapseTime);
    +  }
    +#endif
    +
    +  db->errCode = rc;
    +  if( SQLITE_NOMEM==sqlite3ApiExit(p->db, p->rc) ){
    +    p->rc = SQLITE_NOMEM;
    +  }
    +end_of_step:
    +  /* At this point local variable rc holds the value that should be 
    +  ** returned if this statement was compiled using the legacy 
    +  ** sqlite3_prepare() interface. According to the docs, this can only
    +  ** be one of the values in the first assert() below. Variable p->rc 
    +  ** contains the value that would be returned if sqlite3_finalize() 
    +  ** were called on statement p.
    +  */
    +  assert( rc==SQLITE_ROW  || rc==SQLITE_DONE   || rc==SQLITE_ERROR 
    +       || rc==SQLITE_BUSY || rc==SQLITE_MISUSE
    +  );
    +  assert( p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE );
    +  if( p->isPrepareV2 && rc!=SQLITE_ROW && rc!=SQLITE_DONE ){
    +    /* If this statement was prepared using sqlite3_prepare_v2(), and an
    +    ** error has occured, then return the error code in p->rc to the
    +    ** caller. Set the error code in the database handle to the same value.
    +    */ 
    +    rc = db->errCode = p->rc;
    +  }
    +  return (rc&db->errMask);
    +}
    +
    +/*
    +** This is the top-level implementation of sqlite3_step().  Call
    +** sqlite3Step() to do most of the work.  If a schema error occurs,
    +** call sqlite3Reprepare() and try again.
    +*/
    +SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
    +  int rc = SQLITE_MISUSE;
    +  if( pStmt ){
    +    int cnt = 0;
    +    Vdbe *v = (Vdbe*)pStmt;
    +    sqlite3 *db = v->db;
    +    sqlite3_mutex_enter(db->mutex);
    +    while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
    +           && cnt++ < 5
    +           && (rc = sqlite3Reprepare(v))==SQLITE_OK ){
    +      sqlite3_reset(pStmt);
    +      v->expired = 0;
    +    }
    +    if( rc==SQLITE_SCHEMA && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
    +      /* This case occurs after failing to recompile an sql statement. 
    +      ** The error message from the SQL compiler has already been loaded 
    +      ** into the database handle. This block copies the error message 
    +      ** from the database handle into the statement and sets the statement
    +      ** program counter to 0 to ensure that when the statement is 
    +      ** finalized or reset the parser error message is available via
    +      ** sqlite3_errmsg() and sqlite3_errcode().
    +      */
    +      const char *zErr = (const char *)sqlite3_value_text(db->pErr); 
    +      sqlite3DbFree(db, v->zErrMsg);
    +      if( !db->mallocFailed ){
    +        v->zErrMsg = sqlite3DbStrDup(db, zErr);
    +      } else {
    +        v->zErrMsg = 0;
    +        v->rc = SQLITE_NOMEM;
    +      }
    +    }
    +    rc = sqlite3ApiExit(db, rc);
    +    sqlite3_mutex_leave(db->mutex);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Extract the user data from a sqlite3_context structure and return a
    +** pointer to it.
    +*/
    +SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
    +  assert( p && p->pFunc );
    +  return p->pFunc->pUserData;
    +}
    +
    +/*
    +** Extract the user data from a sqlite3_context structure and return a
    +** pointer to it.
    +*/
    +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
    +  assert( p && p->pFunc );
    +  return p->s.db;
    +}
    +
    +/*
    +** The following is the implementation of an SQL function that always
    +** fails with an error message stating that the function is used in the
    +** wrong context.  The sqlite3_overload_function() API might construct
    +** SQL function that use this routine so that the functions will exist
    +** for name resolution but are actually overloaded by the xFindFunction
    +** method of virtual tables.
    +*/
    +SQLITE_PRIVATE void sqlite3InvalidFunction(
    +  sqlite3_context *context,  /* The function calling context */
    +  int NotUsed,               /* Number of arguments to the function */
    +  sqlite3_value **NotUsed2   /* Value of each argument */
    +){
    +  const char *zName = context->pFunc->zName;
    +  char *zErr;
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  zErr = sqlite3_mprintf(
    +      "unable to use function %s in the requested context", zName);
    +  sqlite3_result_error(context, zErr, -1);
    +  sqlite3_free(zErr);
    +}
    +
    +/*
    +** Allocate or return the aggregate context for a user function.  A new
    +** context is allocated on the first call.  Subsequent calls return the
    +** same context that was returned on prior calls.
    +*/
    +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
    +  Mem *pMem;
    +  assert( p && p->pFunc && p->pFunc->xStep );
    +  assert( sqlite3_mutex_held(p->s.db->mutex) );
    +  pMem = p->pMem;
    +  if( (pMem->flags & MEM_Agg)==0 ){
    +    if( nByte==0 ){
    +      sqlite3VdbeMemReleaseExternal(pMem);
    +      pMem->flags = MEM_Null;
    +      pMem->z = 0;
    +    }else{
    +      sqlite3VdbeMemGrow(pMem, nByte, 0);
    +      pMem->flags = MEM_Agg;
    +      pMem->u.pDef = p->pFunc;
    +      if( pMem->z ){
    +        memset(pMem->z, 0, nByte);
    +      }
    +    }
    +  }
    +  return (void*)pMem->z;
    +}
    +
    +/*
    +** Return the auxilary data pointer, if any, for the iArg'th argument to
    +** the user-function defined by pCtx.
    +*/
    +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
    +  VdbeFunc *pVdbeFunc;
    +
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  pVdbeFunc = pCtx->pVdbeFunc;
    +  if( !pVdbeFunc || iArg>=pVdbeFunc->nAux || iArg<0 ){
    +    return 0;
    +  }
    +  return pVdbeFunc->apAux[iArg].pAux;
    +}
    +
    +/*
    +** Set the auxilary data pointer and delete function, for the iArg'th
    +** argument to the user-function defined by pCtx. Any previous value is
    +** deleted by calling the delete function specified when it was set.
    +*/
    +SQLITE_API void sqlite3_set_auxdata(
    +  sqlite3_context *pCtx, 
    +  int iArg, 
    +  void *pAux, 
    +  void (*xDelete)(void*)
    +){
    +  struct AuxData *pAuxData;
    +  VdbeFunc *pVdbeFunc;
    +  if( iArg<0 ) goto failed;
    +
    +  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
    +  pVdbeFunc = pCtx->pVdbeFunc;
    +  if( !pVdbeFunc || pVdbeFunc->nAux<=iArg ){
    +    int nAux = (pVdbeFunc ? pVdbeFunc->nAux : 0);
    +    int nMalloc = sizeof(VdbeFunc) + sizeof(struct AuxData)*iArg;
    +    pVdbeFunc = sqlite3DbRealloc(pCtx->s.db, pVdbeFunc, nMalloc);
    +    if( !pVdbeFunc ){
    +      goto failed;
    +    }
    +    pCtx->pVdbeFunc = pVdbeFunc;
    +    memset(&pVdbeFunc->apAux[nAux], 0, sizeof(struct AuxData)*(iArg+1-nAux));
    +    pVdbeFunc->nAux = iArg+1;
    +    pVdbeFunc->pFunc = pCtx->pFunc;
    +  }
    +
    +  pAuxData = &pVdbeFunc->apAux[iArg];
    +  if( pAuxData->pAux && pAuxData->xDelete ){
    +    pAuxData->xDelete(pAuxData->pAux);
    +  }
    +  pAuxData->pAux = pAux;
    +  pAuxData->xDelete = xDelete;
    +  return;
    +
    +failed:
    +  if( xDelete ){
    +    xDelete(pAux);
    +  }
    +}
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** Return the number of times the Step function of a aggregate has been 
    +** called.
    +**
    +** This function is deprecated.  Do not use it for new code.  It is
    +** provide only to avoid breaking legacy code.  New aggregate function
    +** implementations should keep their own counts within their aggregate
    +** context.
    +*/
    +SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
    +  assert( p && p->pMem && p->pFunc && p->pFunc->xStep );
    +  return p->pMem->n;
    +}
    +#endif
    +
    +/*
    +** Return the number of columns in the result set for the statement pStmt.
    +*/
    +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
    +  Vdbe *pVm = (Vdbe *)pStmt;
    +  return pVm ? pVm->nResColumn : 0;
    +}
    +
    +/*
    +** Return the number of values available from the current row of the
    +** currently executing statement pStmt.
    +*/
    +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
    +  Vdbe *pVm = (Vdbe *)pStmt;
    +  if( pVm==0 || pVm->pResultSet==0 ) return 0;
    +  return pVm->nResColumn;
    +}
    +
    +
    +/*
    +** Check to see if column iCol of the given statement is valid.  If
    +** it is, return a pointer to the Mem for the value of that column.
    +** If iCol is not valid, return a pointer to a Mem which has a value
    +** of NULL.
    +*/
    +static Mem *columnMem(sqlite3_stmt *pStmt, int i){
    +  Vdbe *pVm;
    +  int vals;
    +  Mem *pOut;
    +
    +  pVm = (Vdbe *)pStmt;
    +  if( pVm && pVm->pResultSet!=0 && i<pVm->nResColumn && i>=0 ){
    +    sqlite3_mutex_enter(pVm->db->mutex);
    +    vals = sqlite3_data_count(pStmt);
    +    pOut = &pVm->pResultSet[i];
    +  }else{
    +    /* If the value passed as the second argument is out of range, return
    +    ** a pointer to the following static Mem object which contains the
    +    ** value SQL NULL. Even though the Mem structure contains an element
    +    ** of type i64, on certain architecture (x86) with certain compiler
    +    ** switches (-Os), gcc may align this Mem object on a 4-byte boundary
    +    ** instead of an 8-byte one. This all works fine, except that when
    +    ** running with SQLITE_DEBUG defined the SQLite code sometimes assert()s
    +    ** that a Mem structure is located on an 8-byte boundary. To prevent
    +    ** this assert() from failing, when building with SQLITE_DEBUG defined
    +    ** using gcc, force nullMem to be 8-byte aligned using the magical
    +    ** __attribute__((aligned(8))) macro.  */
    +    static const Mem nullMem 
    +#if defined(SQLITE_DEBUG) && defined(__GNUC__)
    +      __attribute__((aligned(8))) 
    +#endif
    +      = {{0}, (double)0, 0, "", 0, MEM_Null, SQLITE_NULL, 0, 0, 0 };
    +
    +    if( pVm && ALWAYS(pVm->db) ){
    +      sqlite3_mutex_enter(pVm->db->mutex);
    +      sqlite3Error(pVm->db, SQLITE_RANGE, 0);
    +    }
    +    pOut = (Mem*)&nullMem;
    +  }
    +  return pOut;
    +}
    +
    +/*
    +** This function is called after invoking an sqlite3_value_XXX function on a 
    +** column value (i.e. a value returned by evaluating an SQL expression in the
    +** select list of a SELECT statement) that may cause a malloc() failure. If 
    +** malloc() has failed, the threads mallocFailed flag is cleared and the result
    +** code of statement pStmt set to SQLITE_NOMEM.
    +**
    +** Specifically, this is called from within:
    +**
    +**     sqlite3_column_int()
    +**     sqlite3_column_int64()
    +**     sqlite3_column_text()
    +**     sqlite3_column_text16()
    +**     sqlite3_column_real()
    +**     sqlite3_column_bytes()
    +**     sqlite3_column_bytes16()
    +**
    +** But not for sqlite3_column_blob(), which never calls malloc().
    +*/
    +static void columnMallocFailure(sqlite3_stmt *pStmt)
    +{
    +  /* If malloc() failed during an encoding conversion within an
    +  ** sqlite3_column_XXX API, then set the return code of the statement to
    +  ** SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR
    +  ** and _finalize() will return NOMEM.
    +  */
    +  Vdbe *p = (Vdbe *)pStmt;
    +  if( p ){
    +    p->rc = sqlite3ApiExit(p->db, p->rc);
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +}
    +
    +/**************************** sqlite3_column_  *******************************
    +** The following routines are used to access elements of the current row
    +** in the result set.
    +*/
    +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
    +  const void *val;
    +  val = sqlite3_value_blob( columnMem(pStmt,i) );
    +  /* Even though there is no encoding conversion, value_blob() might
    +  ** need to call malloc() to expand the result of a zeroblob() 
    +  ** expression. 
    +  */
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
    +  int val = sqlite3_value_bytes( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
    +  int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
    +  double val = sqlite3_value_double( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
    +  int val = sqlite3_value_int( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
    +  sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
    +  const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
    +  Mem *pOut = columnMem(pStmt, i);
    +  if( pOut->flags&MEM_Static ){
    +    pOut->flags &= ~MEM_Static;
    +    pOut->flags |= MEM_Ephem;
    +  }
    +  columnMallocFailure(pStmt);
    +  return (sqlite3_value *)pOut;
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
    +  const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return val;
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
    +  int iType = sqlite3_value_type( columnMem(pStmt,i) );
    +  columnMallocFailure(pStmt);
    +  return iType;
    +}
    +
    +/* The following function is experimental and subject to change or
    +** removal */
    +/*int sqlite3_column_numeric_type(sqlite3_stmt *pStmt, int i){
    +**  return sqlite3_value_numeric_type( columnMem(pStmt,i) );
    +**}
    +*/
    +
    +/*
    +** Convert the N-th element of pStmt->pColName[] into a string using
    +** xFunc() then return that string.  If N is out of range, return 0.
    +**
    +** There are up to 5 names for each column.  useType determines which
    +** name is returned.  Here are the names:
    +**
    +**    0      The column name as it should be displayed for output
    +**    1      The datatype name for the column
    +**    2      The name of the database that the column derives from
    +**    3      The name of the table that the column derives from
    +**    4      The name of the table column that the result column derives from
    +**
    +** If the result is not a simple column reference (if it is an expression
    +** or a constant) then useTypes 2, 3, and 4 return NULL.
    +*/
    +static const void *columnName(
    +  sqlite3_stmt *pStmt,
    +  int N,
    +  const void *(*xFunc)(Mem*),
    +  int useType
    +){
    +  const void *ret = 0;
    +  Vdbe *p = (Vdbe *)pStmt;
    +  int n;
    +  sqlite3 *db = p->db;
    +  
    +  assert( db!=0 );
    +  n = sqlite3_column_count(pStmt);
    +  if( N<n && N>=0 ){
    +    N += useType*n;
    +    sqlite3_mutex_enter(db->mutex);
    +    assert( db->mallocFailed==0 );
    +    ret = xFunc(&p->aColName[N]);
    +     /* A malloc may have failed inside of the xFunc() call. If this
    +    ** is the case, clear the mallocFailed flag and return NULL.
    +    */
    +    if( db->mallocFailed ){
    +      db->mallocFailed = 0;
    +      ret = 0;
    +    }
    +    sqlite3_mutex_leave(db->mutex);
    +  }
    +  return ret;
    +}
    +
    +/*
    +** Return the name of the Nth column of the result set returned by SQL
    +** statement pStmt.
    +*/
    +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
    +}
    +#endif
    +
    +/*
    +** Constraint:  If you have ENABLE_COLUMN_METADATA then you must
    +** not define OMIT_DECLTYPE.
    +*/
    +#if defined(SQLITE_OMIT_DECLTYPE) && defined(SQLITE_ENABLE_COLUMN_METADATA)
    +# error "Must not define both SQLITE_OMIT_DECLTYPE \
    +         and SQLITE_ENABLE_COLUMN_METADATA"
    +#endif
    +
    +#ifndef SQLITE_OMIT_DECLTYPE
    +/*
    +** Return the column declaration type (if applicable) of the 'i'th column
    +** of the result set of SQL statement pStmt.
    +*/
    +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +#endif /* SQLITE_OMIT_DECLTYPE */
    +
    +#ifdef SQLITE_ENABLE_COLUMN_METADATA
    +/*
    +** Return the name of the database from which a result column derives.
    +** NULL is returned if the result column is an expression or constant or
    +** anything else which is not an unabiguous reference to a database column.
    +*/
    +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** Return the name of the table from which a result column derives.
    +** NULL is returned if the result column is an expression or constant or
    +** anything else which is not an unabiguous reference to a database column.
    +*/
    +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** Return the name of the table column from which a result column derives.
    +** NULL is returned if the result column is an expression or constant or
    +** anything else which is not an unabiguous reference to a database column.
    +*/
    +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
    +  return columnName(
    +      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +#endif /* SQLITE_ENABLE_COLUMN_METADATA */
    +
    +
    +/******************************* sqlite3_bind_  ***************************
    +** 
    +** Routines used to attach values to wildcards in a compiled SQL statement.
    +*/
    +/*
    +** Unbind the value bound to variable i in virtual machine p. This is the 
    +** the same as binding a NULL value to the column. If the "i" parameter is
    +** out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK.
    +**
    +** A successful evaluation of this routine acquires the mutex on p.
    +** the mutex is released if any kind of error occurs.
    +**
    +** The error code stored in database p->db is overwritten with the return
    +** value in any case.
    +*/
    +static int vdbeUnbind(Vdbe *p, int i){
    +  Mem *pVar;
    +  if( p==0 ) return SQLITE_MISUSE;
    +  sqlite3_mutex_enter(p->db->mutex);
    +  if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
    +    sqlite3Error(p->db, SQLITE_MISUSE, 0);
    +    sqlite3_mutex_leave(p->db->mutex);
    +    return SQLITE_MISUSE;
    +  }
    +  if( i<1 || i>p->nVar ){
    +    sqlite3Error(p->db, SQLITE_RANGE, 0);
    +    sqlite3_mutex_leave(p->db->mutex);
    +    return SQLITE_RANGE;
    +  }
    +  i--;
    +  pVar = &p->aVar[i];
    +  sqlite3VdbeMemRelease(pVar);
    +  pVar->flags = MEM_Null;
    +  sqlite3Error(p->db, SQLITE_OK, 0);
    +
    +  /* If the bit corresponding to this variable in Vdbe.expmask is set, then 
    +  ** binding a new value to this variable invalidates the current query plan.
    +  */
    +  if( p->isPrepareV2 &&
    +     ((i<32 && p->expmask & ((u32)1 << i)) || p->expmask==0xffffffff)
    +  ){
    +    p->expired = 1;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Bind a text or BLOB value.
    +*/
    +static int bindText(
    +  sqlite3_stmt *pStmt,   /* The statement to bind against */
    +  int i,                 /* Index of the parameter to bind */
    +  const void *zData,     /* Pointer to the data to be bound */
    +  int nData,             /* Number of bytes of data to be bound */
    +  void (*xDel)(void*),   /* Destructor for the data */
    +  u8 encoding            /* Encoding for the data */
    +){
    +  Vdbe *p = (Vdbe *)pStmt;
    +  Mem *pVar;
    +  int rc;
    +
    +  rc = vdbeUnbind(p, i);
    +  if( rc==SQLITE_OK ){
    +    if( zData!=0 ){
    +      pVar = &p->aVar[i-1];
    +      rc = sqlite3VdbeMemSetStr(pVar, zData, nData, encoding, xDel);
    +      if( rc==SQLITE_OK && encoding!=0 ){
    +        rc = sqlite3VdbeChangeEncoding(pVar, ENC(p->db));
    +      }
    +      sqlite3Error(p->db, rc, 0);
    +      rc = sqlite3ApiExit(p->db, rc);
    +    }
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Bind a blob value to an SQL statement variable.
    +*/
    +SQLITE_API int sqlite3_bind_blob(
    +  sqlite3_stmt *pStmt, 
    +  int i, 
    +  const void *zData, 
    +  int nData, 
    +  void (*xDel)(void*)
    +){
    +  return bindText(pStmt, i, zData, nData, xDel, 0);
    +}
    +SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
    +  int rc;
    +  Vdbe *p = (Vdbe *)pStmt;
    +  rc = vdbeUnbind(p, i);
    +  if( rc==SQLITE_OK ){
    +    sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +  return rc;
    +}
    +SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
    +  return sqlite3_bind_int64(p, i, (i64)iValue);
    +}
    +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
    +  int rc;
    +  Vdbe *p = (Vdbe *)pStmt;
    +  rc = vdbeUnbind(p, i);
    +  if( rc==SQLITE_OK ){
    +    sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +  return rc;
    +}
    +SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
    +  int rc;
    +  Vdbe *p = (Vdbe*)pStmt;
    +  rc = vdbeUnbind(p, i);
    +  if( rc==SQLITE_OK ){
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +  return rc;
    +}
    +SQLITE_API int sqlite3_bind_text( 
    +  sqlite3_stmt *pStmt, 
    +  int i, 
    +  const char *zData, 
    +  int nData, 
    +  void (*xDel)(void*)
    +){
    +  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
    +}
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API int sqlite3_bind_text16(
    +  sqlite3_stmt *pStmt, 
    +  int i, 
    +  const void *zData, 
    +  int nData, 
    +  void (*xDel)(void*)
    +){
    +  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
    +  int rc;
    +  switch( pValue->type ){
    +    case SQLITE_INTEGER: {
    +      rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
    +      break;
    +    }
    +    case SQLITE_FLOAT: {
    +      rc = sqlite3_bind_double(pStmt, i, pValue->r);
    +      break;
    +    }
    +    case SQLITE_BLOB: {
    +      if( pValue->flags & MEM_Zero ){
    +        rc = sqlite3_bind_zeroblob(pStmt, i, pValue->u.nZero);
    +      }else{
    +        rc = sqlite3_bind_blob(pStmt, i, pValue->z, pValue->n,SQLITE_TRANSIENT);
    +      }
    +      break;
    +    }
    +    case SQLITE_TEXT: {
    +      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT,
    +                              pValue->enc);
    +      break;
    +    }
    +    default: {
    +      rc = sqlite3_bind_null(pStmt, i);
    +      break;
    +    }
    +  }
    +  return rc;
    +}
    +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
    +  int rc;
    +  Vdbe *p = (Vdbe *)pStmt;
    +  rc = vdbeUnbind(p, i);
    +  if( rc==SQLITE_OK ){
    +    sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return the number of wildcards that can be potentially bound to.
    +** This routine is added to support DBD::SQLite.  
    +*/
    +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
    +  Vdbe *p = (Vdbe*)pStmt;
    +  return p ? p->nVar : 0;
    +}
    +
    +/*
    +** Create a mapping from variable numbers to variable names
    +** in the Vdbe.azVar[] array, if such a mapping does not already
    +** exist.
    +*/
    +static void createVarMap(Vdbe *p){
    +  if( !p->okVar ){
    +    int j;
    +    Op *pOp;
    +    sqlite3_mutex_enter(p->db->mutex);
    +    /* The race condition here is harmless.  If two threads call this
    +    ** routine on the same Vdbe at the same time, they both might end
    +    ** up initializing the Vdbe.azVar[] array.  That is a little extra
    +    ** work but it results in the same answer.
    +    */
    +    for(j=0, pOp=p->aOp; j<p->nOp; j++, pOp++){
    +      if( pOp->opcode==OP_Variable ){
    +        assert( pOp->p1>0 && pOp->p1<=p->nVar );
    +        p->azVar[pOp->p1-1] = pOp->p4.z;
    +      }
    +    }
    +    p->okVar = 1;
    +    sqlite3_mutex_leave(p->db->mutex);
    +  }
    +}
    +
    +/*
    +** Return the name of a wildcard parameter.  Return NULL if the index
    +** is out of range or if the wildcard is unnamed.
    +**
    +** The result is always UTF-8.
    +*/
    +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
    +  Vdbe *p = (Vdbe*)pStmt;
    +  if( p==0 || i<1 || i>p->nVar ){
    +    return 0;
    +  }
    +  createVarMap(p);
    +  return p->azVar[i-1];
    +}
    +
    +/*
    +** Given a wildcard parameter name, return the index of the variable
    +** with that name.  If there is no variable with the given name,
    +** return 0.
    +*/
    +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
    +  Vdbe *p = (Vdbe*)pStmt;
    +  int i;
    +  if( p==0 ){
    +    return 0;
    +  }
    +  createVarMap(p); 
    +  if( zName ){
    +    for(i=0; i<p->nVar; i++){
    +      const char *z = p->azVar[i];
    +      if( z && strcmp(z,zName)==0 ){
    +        return i+1;
    +      }
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Transfer all bindings from the first statement over to the second.
    +*/
    +SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
    +  Vdbe *pFrom = (Vdbe*)pFromStmt;
    +  Vdbe *pTo = (Vdbe*)pToStmt;
    +  int i;
    +  assert( pTo->db==pFrom->db );
    +  assert( pTo->nVar==pFrom->nVar );
    +  sqlite3_mutex_enter(pTo->db->mutex);
    +  for(i=0; i<pFrom->nVar; i++){
    +    sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
    +  }
    +  sqlite3_mutex_leave(pTo->db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** Deprecated external interface.  Internal/core SQLite code
    +** should call sqlite3TransferBindings.
    +**
    +** Is is misuse to call this routine with statements from different
    +** database connections.  But as this is a deprecated interface, we
    +** will not bother to check for that condition.
    +**
    +** If the two statements contain a different number of bindings, then
    +** an SQLITE_ERROR is returned.  Nothing else can go wrong, so otherwise
    +** SQLITE_OK is returned.
    +*/
    +SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
    +  Vdbe *pFrom = (Vdbe*)pFromStmt;
    +  Vdbe *pTo = (Vdbe*)pToStmt;
    +  if( pFrom->nVar!=pTo->nVar ){
    +    return SQLITE_ERROR;
    +  }
    +  if( pTo->isPrepareV2 && pTo->expmask ){
    +    pTo->expired = 1;
    +  }
    +  if( pFrom->isPrepareV2 && pFrom->expmask ){
    +    pFrom->expired = 1;
    +  }
    +  return sqlite3TransferBindings(pFromStmt, pToStmt);
    +}
    +#endif
    +
    +/*
    +** Return the sqlite3* database handle to which the prepared statement given
    +** in the argument belongs.  This is the same database handle that was
    +** the first argument to the sqlite3_prepare() that was used to create
    +** the statement in the first place.
    +*/
    +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
    +  return pStmt ? ((Vdbe*)pStmt)->db : 0;
    +}
    +
    +/*
    +** Return a pointer to the next prepared statement after pStmt associated
    +** with database connection pDb.  If pStmt is NULL, return the first
    +** prepared statement for the database connection.  Return NULL if there
    +** are no more.
    +*/
    +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
    +  sqlite3_stmt *pNext;
    +  sqlite3_mutex_enter(pDb->mutex);
    +  if( pStmt==0 ){
    +    pNext = (sqlite3_stmt*)pDb->pVdbe;
    +  }else{
    +    pNext = (sqlite3_stmt*)((Vdbe*)pStmt)->pNext;
    +  }
    +  sqlite3_mutex_leave(pDb->mutex);
    +  return pNext;
    +}
    +
    +/*
    +** Return the value of a status counter for a prepared statement
    +*/
    +SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
    +  Vdbe *pVdbe = (Vdbe*)pStmt;
    +  int v = pVdbe->aCounter[op-1];
    +  if( resetFlag ) pVdbe->aCounter[op-1] = 0;
    +  return v;
    +}
    +
    +/************** End of vdbeapi.c *********************************************/
    +/************** Begin file vdbe.c ********************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** The code in this file implements execution method of the 
    +** Virtual Database Engine (VDBE).  A separate file ("vdbeaux.c")
    +** handles housekeeping details such as creating and deleting
    +** VDBE instances.  This file is solely interested in executing
    +** the VDBE program.
    +**
    +** In the external interface, an "sqlite3_stmt*" is an opaque pointer
    +** to a VDBE.
    +**
    +** The SQL parser generates a program which is then executed by
    +** the VDBE to do the work of the SQL statement.  VDBE programs are 
    +** similar in form to assembly language.  The program consists of
    +** a linear sequence of operations.  Each operation has an opcode 
    +** and 5 operands.  Operands P1, P2, and P3 are integers.  Operand P4 
    +** is a null-terminated string.  Operand P5 is an unsigned character.
    +** Few opcodes use all 5 operands.
    +**
    +** Computation results are stored on a set of registers numbered beginning
    +** with 1 and going up to Vdbe.nMem.  Each register can store
    +** either an integer, a null-terminated string, a floating point
    +** number, or the SQL "NULL" value.  An implicit conversion from one
    +** type to the other occurs as necessary.
    +** 
    +** Most of the code in this file is taken up by the sqlite3VdbeExec()
    +** function which does the work of interpreting a VDBE program.
    +** But other routines are also provided to help in building up
    +** a program instruction by instruction.
    +**
    +** Various scripts scan this source file in order to generate HTML
    +** documentation, headers files, or other derived files.  The formatting
    +** of the code in this file is, therefore, important.  See other comments
    +** in this file for details.  If in doubt, do not deviate from existing
    +** commenting and indentation practices when changing or adding code.
    +**
    +** $Id: vdbe.c,v 1.874 2009/07/24 17:58:53 danielk1977 Exp $
    +*/
    +
    +/*
    +** The following global variable is incremented every time a cursor
    +** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test
    +** procedures use this information to make sure that indices are
    +** working correctly.  This variable has no function other than to
    +** help verify the correct operation of the library.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_search_count = 0;
    +#endif
    +
    +/*
    +** When this global variable is positive, it gets decremented once before
    +** each instruction in the VDBE.  When reaches zero, the u1.isInterrupted
    +** field of the sqlite3 structure is set in order to simulate and interrupt.
    +**
    +** This facility is used for testing purposes only.  It does not function
    +** in an ordinary build.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_interrupt_count = 0;
    +#endif
    +
    +/*
    +** The next global variable is incremented each type the OP_Sort opcode
    +** is executed.  The test procedures use this information to make sure that
    +** sorting is occurring or not occurring at appropriate times.   This variable
    +** has no function other than to help verify the correct operation of the
    +** library.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_sort_count = 0;
    +#endif
    +
    +/*
    +** The next global variable records the size of the largest MEM_Blob
    +** or MEM_Str that has been used by a VDBE opcode.  The test procedures
    +** use this information to make sure that the zero-blob functionality
    +** is working correctly.   This variable has no function other than to
    +** help verify the correct operation of the library.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_max_blobsize = 0;
    +static void updateMaxBlobsize(Mem *p){
    +  if( (p->flags & (MEM_Str|MEM_Blob))!=0 && p->n>sqlite3_max_blobsize ){
    +    sqlite3_max_blobsize = p->n;
    +  }
    +}
    +#endif
    +
    +/*
    +** The next global variable is incremented each type the OP_Found opcode
    +** is executed. This is used to test whether or not the foreign key
    +** operation implemented using OP_FkIsZero is working. This variable
    +** has no function other than to help verify the correct operation of the
    +** library.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_found_count = 0;
    +#endif
    +
    +/*
    +** Test a register to see if it exceeds the current maximum blob size.
    +** If it does, record the new maximum blob size.
    +*/
    +#if defined(SQLITE_TEST) && !defined(SQLITE_OMIT_BUILTIN_TEST)
    +# define UPDATE_MAX_BLOBSIZE(P)  updateMaxBlobsize(P)
    +#else
    +# define UPDATE_MAX_BLOBSIZE(P)
    +#endif
    +
    +/*
    +** Convert the given register into a string if it isn't one
    +** already. Return non-zero if a malloc() fails.
    +*/
    +#define Stringify(P, enc) \
    +   if(((P)->flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \
    +     { goto no_mem; }
    +
    +/*
    +** An ephemeral string value (signified by the MEM_Ephem flag) contains
    +** a pointer to a dynamically allocated string where some other entity
    +** is responsible for deallocating that string.  Because the register
    +** does not control the string, it might be deleted without the register
    +** knowing it.
    +**
    +** This routine converts an ephemeral string into a dynamically allocated
    +** string that the register itself controls.  In other words, it
    +** converts an MEM_Ephem string into an MEM_Dyn string.
    +*/
    +#define Deephemeralize(P) \
    +   if( ((P)->flags&MEM_Ephem)!=0 \
    +       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}
    +
    +/*
    +** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
    +** P if required.
    +*/
    +#define ExpandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)
    +
    +/*
    +** Argument pMem points at a register that will be passed to a
    +** user-defined function or returned to the user as the result of a query.
    +** This routine sets the pMem->type variable used by the sqlite3_value_*() 
    +** routines.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem){
    +  int flags = pMem->flags;
    +  if( flags & MEM_Null ){
    +    pMem->type = SQLITE_NULL;
    +  }
    +  else if( flags & MEM_Int ){
    +    pMem->type = SQLITE_INTEGER;
    +  }
    +  else if( flags & MEM_Real ){
    +    pMem->type = SQLITE_FLOAT;
    +  }
    +  else if( flags & MEM_Str ){
    +    pMem->type = SQLITE_TEXT;
    +  }else{
    +    pMem->type = SQLITE_BLOB;
    +  }
    +}
    +
    +/*
    +** Properties of opcodes.  The OPFLG_INITIALIZER macro is
    +** created by mkopcodeh.awk during compilation.  Data is obtained
    +** from the comments following the "case OP_xxxx:" statements in
    +** this file.  
    +*/
    +static const unsigned char opcodeProperty[] = OPFLG_INITIALIZER;
    +
    +/*
    +** Return true if an opcode has any of the OPFLG_xxx properties
    +** specified by mask.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeOpcodeHasProperty(int opcode, int mask){
    +  assert( opcode>0 && opcode<(int)sizeof(opcodeProperty) );
    +  return (opcodeProperty[opcode]&mask)!=0;
    +}
    +
    +/*
    +** Allocate VdbeCursor number iCur.  Return a pointer to it.  Return NULL
    +** if we run out of memory.
    +*/
    +static VdbeCursor *allocateCursor(
    +  Vdbe *p,              /* The virtual machine */
    +  int iCur,             /* Index of the new VdbeCursor */
    +  int nField,           /* Number of fields in the table or index */
    +  int iDb,              /* When database the cursor belongs to, or -1 */
    +  int isBtreeCursor     /* True for B-Tree.  False for pseudo-table or vtab */
    +){
    +  /* Find the memory cell that will be used to store the blob of memory
    +  ** required for this VdbeCursor structure. It is convenient to use a 
    +  ** vdbe memory cell to manage the memory allocation required for a
    +  ** VdbeCursor structure for the following reasons:
    +  **
    +  **   * Sometimes cursor numbers are used for a couple of different
    +  **     purposes in a vdbe program. The different uses might require
    +  **     different sized allocations. Memory cells provide growable
    +  **     allocations.
    +  **
    +  **   * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can
    +  **     be freed lazily via the sqlite3_release_memory() API. This
    +  **     minimizes the number of malloc calls made by the system.
    +  **
    +  ** Memory cells for cursors are allocated at the top of the address
    +  ** space. Memory cell (p->nMem) corresponds to cursor 0. Space for
    +  ** cursor 1 is managed by memory cell (p->nMem-1), etc.
    +  */
    +  Mem *pMem = &p->aMem[p->nMem-iCur];
    +
    +  int nByte;
    +  VdbeCursor *pCx = 0;
    +  nByte = 
    +      sizeof(VdbeCursor) + 
    +      (isBtreeCursor?sqlite3BtreeCursorSize():0) + 
    +      2*nField*sizeof(u32);
    +
    +  assert( iCur<p->nCursor );
    +  if( p->apCsr[iCur] ){
    +    sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
    +    p->apCsr[iCur] = 0;
    +  }
    +  if( SQLITE_OK==sqlite3VdbeMemGrow(pMem, nByte, 0) ){
    +    p->apCsr[iCur] = pCx = (VdbeCursor*)pMem->z;
    +    memset(pMem->z, 0, nByte);
    +    pCx->iDb = iDb;
    +    pCx->nField = nField;
    +    if( nField ){
    +      pCx->aType = (u32 *)&pMem->z[sizeof(VdbeCursor)];
    +    }
    +    if( isBtreeCursor ){
    +      pCx->pCursor = (BtCursor*)
    +          &pMem->z[sizeof(VdbeCursor)+2*nField*sizeof(u32)];
    +    }
    +  }
    +  return pCx;
    +}
    +
    +/*
    +** Try to convert a value into a numeric representation if we can
    +** do so without loss of information.  In other words, if the string
    +** looks like a number, convert it into a number.  If it does not
    +** look like a number, leave it alone.
    +*/
    +static void applyNumericAffinity(Mem *pRec){
    +  if( (pRec->flags & (MEM_Real|MEM_Int))==0 ){
    +    int realnum;
    +    sqlite3VdbeMemNulTerminate(pRec);
    +    if( (pRec->flags&MEM_Str)
    +         && sqlite3IsNumber(pRec->z, &realnum, pRec->enc) ){
    +      i64 value;
    +      sqlite3VdbeChangeEncoding(pRec, SQLITE_UTF8);
    +      if( !realnum && sqlite3Atoi64(pRec->z, &value) ){
    +        pRec->u.i = value;
    +        MemSetTypeFlag(pRec, MEM_Int);
    +      }else{
    +        sqlite3VdbeMemRealify(pRec);
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Processing is determine by the affinity parameter:
    +**
    +** SQLITE_AFF_INTEGER:
    +** SQLITE_AFF_REAL:
    +** SQLITE_AFF_NUMERIC:
    +**    Try to convert pRec to an integer representation or a 
    +**    floating-point representation if an integer representation
    +**    is not possible.  Note that the integer representation is
    +**    always preferred, even if the affinity is REAL, because
    +**    an integer representation is more space efficient on disk.
    +**
    +** SQLITE_AFF_TEXT:
    +**    Convert pRec to a text representation.
    +**
    +** SQLITE_AFF_NONE:
    +**    No-op.  pRec is unchanged.
    +*/
    +static void applyAffinity(
    +  Mem *pRec,          /* The value to apply affinity to */
    +  char affinity,      /* The affinity to be applied */
    +  u8 enc              /* Use this text encoding */
    +){
    +  if( affinity==SQLITE_AFF_TEXT ){
    +    /* Only attempt the conversion to TEXT if there is an integer or real
    +    ** representation (blob and NULL do not get converted) but no string
    +    ** representation.
    +    */
    +    if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
    +      sqlite3VdbeMemStringify(pRec, enc);
    +    }
    +    pRec->flags &= ~(MEM_Real|MEM_Int);
    +  }else if( affinity!=SQLITE_AFF_NONE ){
    +    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
    +             || affinity==SQLITE_AFF_NUMERIC );
    +    applyNumericAffinity(pRec);
    +    if( pRec->flags & MEM_Real ){
    +      sqlite3VdbeIntegerAffinity(pRec);
    +    }
    +  }
    +}
    +
    +/*
    +** Try to convert the type of a function argument or a result column
    +** into a numeric representation.  Use either INTEGER or REAL whichever
    +** is appropriate.  But only do the conversion if it is possible without
    +** loss of information and return the revised type of the argument.
    +**
    +** This is an EXPERIMENTAL api and is subject to change or removal.
    +*/
    +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
    +  Mem *pMem = (Mem*)pVal;
    +  applyNumericAffinity(pMem);
    +  sqlite3VdbeMemStoreType(pMem);
    +  return pMem->type;
    +}
    +
    +/*
    +** Exported version of applyAffinity(). This one works on sqlite3_value*, 
    +** not the internal Mem* type.
    +*/
    +SQLITE_PRIVATE void sqlite3ValueApplyAffinity(
    +  sqlite3_value *pVal, 
    +  u8 affinity, 
    +  u8 enc
    +){
    +  applyAffinity((Mem *)pVal, affinity, enc);
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** Write a nice string representation of the contents of cell pMem
    +** into buffer zBuf, length nBuf.
    +*/
    +SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
    +  char *zCsr = zBuf;
    +  int f = pMem->flags;
    +
    +  static const char *const encnames[] = {"(X)", "(8)", "(16LE)", "(16BE)"};
    +
    +  if( f&MEM_Blob ){
    +    int i;
    +    char c;
    +    if( f & MEM_Dyn ){
    +      c = 'z';
    +      assert( (f & (MEM_Static|MEM_Ephem))==0 );
    +    }else if( f & MEM_Static ){
    +      c = 't';
    +      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
    +    }else if( f & MEM_Ephem ){
    +      c = 'e';
    +      assert( (f & (MEM_Static|MEM_Dyn))==0 );
    +    }else{
    +      c = 's';
    +    }
    +
    +    sqlite3_snprintf(100, zCsr, "%c", c);
    +    zCsr += sqlite3Strlen30(zCsr);
    +    sqlite3_snprintf(100, zCsr, "%d[", pMem->n);
    +    zCsr += sqlite3Strlen30(zCsr);
    +    for(i=0; i<16 && i<pMem->n; i++){
    +      sqlite3_snprintf(100, zCsr, "%02X", ((int)pMem->z[i] & 0xFF));
    +      zCsr += sqlite3Strlen30(zCsr);
    +    }
    +    for(i=0; i<16 && i<pMem->n; i++){
    +      char z = pMem->z[i];
    +      if( z<32 || z>126 ) *zCsr++ = '.';
    +      else *zCsr++ = z;
    +    }
    +
    +    sqlite3_snprintf(100, zCsr, "]%s", encnames[pMem->enc]);
    +    zCsr += sqlite3Strlen30(zCsr);
    +    if( f & MEM_Zero ){
    +      sqlite3_snprintf(100, zCsr,"+%dz",pMem->u.nZero);
    +      zCsr += sqlite3Strlen30(zCsr);
    +    }
    +    *zCsr = '\0';
    +  }else if( f & MEM_Str ){
    +    int j, k;
    +    zBuf[0] = ' ';
    +    if( f & MEM_Dyn ){
    +      zBuf[1] = 'z';
    +      assert( (f & (MEM_Static|MEM_Ephem))==0 );
    +    }else if( f & MEM_Static ){
    +      zBuf[1] = 't';
    +      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
    +    }else if( f & MEM_Ephem ){
    +      zBuf[1] = 'e';
    +      assert( (f & (MEM_Static|MEM_Dyn))==0 );
    +    }else{
    +      zBuf[1] = 's';
    +    }
    +    k = 2;
    +    sqlite3_snprintf(100, &zBuf[k], "%d", pMem->n);
    +    k += sqlite3Strlen30(&zBuf[k]);
    +    zBuf[k++] = '[';
    +    for(j=0; j<15 && j<pMem->n; j++){
    +      u8 c = pMem->z[j];
    +      if( c>=0x20 && c<0x7f ){
    +        zBuf[k++] = c;
    +      }else{
    +        zBuf[k++] = '.';
    +      }
    +    }
    +    zBuf[k++] = ']';
    +    sqlite3_snprintf(100,&zBuf[k], encnames[pMem->enc]);
    +    k += sqlite3Strlen30(&zBuf[k]);
    +    zBuf[k++] = 0;
    +  }
    +}
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** Print the value of a register for tracing purposes:
    +*/
    +static void memTracePrint(FILE *out, Mem *p){
    +  if( p->flags & MEM_Null ){
    +    fprintf(out, " NULL");
    +  }else if( (p->flags & (MEM_Int|MEM_Str))==(MEM_Int|MEM_Str) ){
    +    fprintf(out, " si:%lld", p->u.i);
    +  }else if( p->flags & MEM_Int ){
    +    fprintf(out, " i:%lld", p->u.i);
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  }else if( p->flags & MEM_Real ){
    +    fprintf(out, " r:%g", p->r);
    +#endif
    +  }else if( p->flags & MEM_RowSet ){
    +    fprintf(out, " (rowset)");
    +  }else{
    +    char zBuf[200];
    +    sqlite3VdbeMemPrettyPrint(p, zBuf);
    +    fprintf(out, " ");
    +    fprintf(out, "%s", zBuf);
    +  }
    +}
    +static void registerTrace(FILE *out, int iReg, Mem *p){
    +  fprintf(out, "REG[%d] = ", iReg);
    +  memTracePrint(out, p);
    +  fprintf(out, "\n");
    +}
    +#endif
    +
    +#ifdef SQLITE_DEBUG
    +#  define REGISTER_TRACE(R,M) if(p->trace)registerTrace(p->trace,R,M)
    +#else
    +#  define REGISTER_TRACE(R,M)
    +#endif
    +
    +
    +#ifdef VDBE_PROFILE
    +
    +/* 
    +** hwtime.h contains inline assembler code for implementing 
    +** high-performance timing routines.
    +*/
    +/************** Include hwtime.h in the middle of vdbe.c *********************/
    +/************** Begin file hwtime.h ******************************************/
    +/*
    +** 2008 May 27
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This file contains inline asm code for retrieving "high-performance"
    +** counters for x86 class CPUs.
    +**
    +** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $
    +*/
    +#ifndef _HWTIME_H_
    +#define _HWTIME_H_
    +
    +/*
    +** The following routine only works on pentium-class (or newer) processors.
    +** It uses the RDTSC opcode to read the cycle count value out of the
    +** processor and returns that value.  This can be used for high-res
    +** profiling.
    +*/
    +#if (defined(__GNUC__) || defined(_MSC_VER)) && \
    +      (defined(i386) || defined(__i386__) || defined(_M_IX86))
    +
    +  #if defined(__GNUC__)
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +     unsigned int lo, hi;
    +     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
    +     return (sqlite_uint64)hi << 32 | lo;
    +  }
    +
    +  #elif defined(_MSC_VER)
    +
    +  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
    +     __asm {
    +        rdtsc
    +        ret       ; return value at EDX:EAX
    +     }
    +  }
    +
    +  #endif
    +
    +#elif (defined(__GNUC__) && defined(__x86_64__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long val;
    +      __asm__ __volatile__ ("rdtsc" : "=A" (val));
    +      return val;
    +  }
    + 
    +#elif (defined(__GNUC__) && defined(__ppc__))
    +
    +  __inline__ sqlite_uint64 sqlite3Hwtime(void){
    +      unsigned long long retval;
    +      unsigned long junk;
    +      __asm__ __volatile__ ("\n\
    +          1:      mftbu   %1\n\
    +                  mftb    %L0\n\
    +                  mftbu   %0\n\
    +                  cmpw    %0,%1\n\
    +                  bne     1b"
    +                  : "=r" (retval), "=r" (junk));
    +      return retval;
    +  }
    +
    +#else
    +
    +  #error Need implementation of sqlite3Hwtime() for your platform.
    +
    +  /*
    +  ** To compile without implementing sqlite3Hwtime() for your platform,
    +  ** you can remove the above #error and use the following
    +  ** stub function.  You will lose timing support for many
    +  ** of the debugging and testing utilities, but it should at
    +  ** least compile and run.
    +  */
    +SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
    +
    +#endif
    +
    +#endif /* !defined(_HWTIME_H_) */
    +
    +/************** End of hwtime.h **********************************************/
    +/************** Continuing where we left off in vdbe.c ***********************/
    +
    +#endif
    +
    +/*
    +** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
    +** sqlite3_interrupt() routine has been called.  If it has been, then
    +** processing of the VDBE program is interrupted.
    +**
    +** This macro added to every instruction that does a jump in order to
    +** implement a loop.  This test used to be on every single instruction,
    +** but that meant we more testing that we needed.  By only testing the
    +** flag on jump instructions, we get a (small) speed improvement.
    +*/
    +#define CHECK_FOR_INTERRUPT \
    +   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;
    +
    +#ifdef SQLITE_DEBUG
    +static int fileExists(sqlite3 *db, const char *zFile){
    +  int res = 0;
    +  int rc = SQLITE_OK;
    +#ifdef SQLITE_TEST
    +  /* If we are currently testing IO errors, then do not call OsAccess() to
    +  ** test for the presence of zFile. This is because any IO error that
    +  ** occurs here will not be reported, causing the test to fail.
    +  */
    +  extern int sqlite3_io_error_pending;
    +  if( sqlite3_io_error_pending<=0 )
    +#endif
    +    rc = sqlite3OsAccess(db->pVfs, zFile, SQLITE_ACCESS_EXISTS, &res);
    +  return (res && rc==SQLITE_OK);
    +}
    +#endif
    +
    +#ifndef NDEBUG
    +/*
    +** This function is only called from within an assert() expression. It
    +** checks that the sqlite3.nTransaction variable is correctly set to
    +** the number of non-transaction savepoints currently in the 
    +** linked list starting at sqlite3.pSavepoint.
    +** 
    +** Usage:
    +**
    +**     assert( checkSavepointCount(db) );
    +*/
    +static int checkSavepointCount(sqlite3 *db){
    +  int n = 0;
    +  Savepoint *p;
    +  for(p=db->pSavepoint; p; p=p->pNext) n++;
    +  assert( n==(db->nSavepoint + db->isTransactionSavepoint) );
    +  return 1;
    +}
    +#endif
    +
    +/*
    +** Execute as much of a VDBE program as we can then return.
    +**
    +** sqlite3VdbeMakeReady() must be called before this routine in order to
    +** close the program with a final OP_Halt and to set up the callbacks
    +** and the error message pointer.
    +**
    +** Whenever a row or result data is available, this routine will either
    +** invoke the result callback (if there is one) or return with
    +** SQLITE_ROW.
    +**
    +** If an attempt is made to open a locked database, then this routine
    +** will either invoke the busy callback (if there is one) or it will
    +** return SQLITE_BUSY.
    +**
    +** If an error occurs, an error message is written to memory obtained
    +** from sqlite3_malloc() and p->zErrMsg is made to point to that memory.
    +** The error code is stored in p->rc and this routine returns SQLITE_ERROR.
    +**
    +** If the callback ever returns non-zero, then the program exits
    +** immediately.  There will be no error message but the p->rc field is
    +** set to SQLITE_ABORT and this routine will return SQLITE_ERROR.
    +**
    +** A memory allocation error causes p->rc to be set to SQLITE_NOMEM and this
    +** routine to return SQLITE_ERROR.
    +**
    +** Other fatal errors return SQLITE_ERROR.
    +**
    +** After this routine has finished, sqlite3VdbeFinalize() should be
    +** used to clean up the mess that was left behind.
    +*/
    +SQLITE_PRIVATE int sqlite3VdbeExec(
    +  Vdbe *p                    /* The VDBE */
    +){
    +  int pc;                    /* The program counter */
    +  Op *pOp;                   /* Current operation */
    +  int rc = SQLITE_OK;        /* Value to return */
    +  sqlite3 *db = p->db;       /* The database */
    +  u8 encoding = ENC(db);     /* The database encoding */
    +  Mem *pIn1 = 0;             /* 1st input operand */
    +  Mem *pIn2 = 0;             /* 2nd input operand */
    +  Mem *pIn3 = 0;             /* 3rd input operand */
    +  Mem *pOut = 0;             /* Output operand */
    +  u8 opProperty;
    +  int iCompare = 0;          /* Result of last OP_Compare operation */
    +  int *aPermute = 0;         /* Permutation of columns for OP_Compare */
    +#ifdef VDBE_PROFILE
    +  u64 start;                 /* CPU clock count at start of opcode */
    +  int origPc;                /* Program counter at start of opcode */
    +#endif
    +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
    +  int nProgressOps = 0;      /* Opcodes executed since progress callback. */
    +#endif
    +  /********************************************************************
    +  ** Automatically generated code
    +  **
    +  ** The following union is automatically generated by the
    +  ** vdbe-compress.tcl script.  The purpose of this union is to
    +  ** reduce the amount of stack space required by this function.
    +  ** See comments in the vdbe-compress.tcl script for details.
    +  */
    +  union vdbeExecUnion {
    +    struct OP_Yield_stack_vars {
    +      int pcDest;
    +    } aa;
    +    struct OP_Variable_stack_vars {
    +      int p1;          /* Variable to copy from */
    +      int p2;          /* Register to copy to */
    +      int n;           /* Number of values left to copy */
    +      Mem *pVar;       /* Value being transferred */
    +    } ab;
    +    struct OP_Move_stack_vars {
    +      char *zMalloc;   /* Holding variable for allocated memory */
    +      int n;           /* Number of registers left to copy */
    +      int p1;          /* Register to copy from */
    +      int p2;          /* Register to copy to */
    +    } ac;
    +    struct OP_ResultRow_stack_vars {
    +      Mem *pMem;
    +      int i;
    +    } ad;
    +    struct OP_Concat_stack_vars {
    +      i64 nByte;
    +    } ae;
    +    struct OP_Remainder_stack_vars {
    +      int flags;      /* Combined MEM_* flags from both inputs */
    +      i64 iA;         /* Integer value of left operand */
    +      i64 iB;         /* Integer value of right operand */
    +      double rA;      /* Real value of left operand */
    +      double rB;      /* Real value of right operand */
    +    } af;
    +    struct OP_Function_stack_vars {
    +      int i;
    +      Mem *pArg;
    +      sqlite3_context ctx;
    +      sqlite3_value **apVal;
    +      int n;
    +    } ag;
    +    struct OP_ShiftRight_stack_vars {
    +      i64 a;
    +      i64 b;
    +    } ah;
    +    struct OP_Ge_stack_vars {
    +      int res;            /* Result of the comparison of pIn1 against pIn3 */
    +      char affinity;      /* Affinity to use for comparison */
    +    } ai;
    +    struct OP_Compare_stack_vars {
    +      int n;
    +      int i;
    +      int p1;
    +      int p2;
    +      const KeyInfo *pKeyInfo;
    +      int idx;
    +      CollSeq *pColl;    /* Collating sequence to use on this term */
    +      int bRev;          /* True for DESCENDING sort order */
    +    } aj;
    +    struct OP_Or_stack_vars {
    +      int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
    +      int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
    +    } ak;
    +    struct OP_IfNot_stack_vars {
    +      int c;
    +    } al;
    +    struct OP_Column_stack_vars {
    +      u32 payloadSize;   /* Number of bytes in the record */
    +      i64 payloadSize64; /* Number of bytes in the record */
    +      int p1;            /* P1 value of the opcode */
    +      int p2;            /* column number to retrieve */
    +      VdbeCursor *pC;    /* The VDBE cursor */
    +      char *zRec;        /* Pointer to complete record-data */
    +      BtCursor *pCrsr;   /* The BTree cursor */
    +      u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
    +      u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
    +      int nField;        /* number of fields in the record */
    +      int len;           /* The length of the serialized data for the column */
    +      int i;             /* Loop counter */
    +      char *zData;       /* Part of the record being decoded */
    +      Mem *pDest;        /* Where to write the extracted value */
    +      Mem sMem;          /* For storing the record being decoded */
    +      u8 *zIdx;          /* Index into header */
    +      u8 *zEndHdr;       /* Pointer to first byte after the header */
    +      u32 offset;        /* Offset into the data */
    +      u64 offset64;      /* 64-bit offset.  64 bits needed to catch overflow */
    +      int szHdr;         /* Size of the header size field at start of record */
    +      int avail;         /* Number of bytes of available data */
    +      Mem *pReg;         /* PseudoTable input register */
    +    } am;
    +    struct OP_Affinity_stack_vars {
    +      char *zAffinity;   /* The affinity to be applied */
    +      Mem *pData0;       /* First register to which to apply affinity */
    +      Mem *pLast;        /* Last register to which to apply affinity */
    +      Mem *pRec;         /* Current register */
    +    } an;
    +    struct OP_MakeRecord_stack_vars {
    +      u8 *zNewRecord;        /* A buffer to hold the data for the new record */
    +      Mem *pRec;             /* The new record */
    +      u64 nData;             /* Number of bytes of data space */
    +      int nHdr;              /* Number of bytes of header space */
    +      i64 nByte;             /* Data space required for this record */
    +      int nZero;             /* Number of zero bytes at the end of the record */
    +      int nVarint;           /* Number of bytes in a varint */
    +      u32 serial_type;       /* Type field */
    +      Mem *pData0;           /* First field to be combined into the record */
    +      Mem *pLast;            /* Last field of the record */
    +      int nField;            /* Number of fields in the record */
    +      char *zAffinity;       /* The affinity string for the record */
    +      int file_format;       /* File format to use for encoding */
    +      int i;                 /* Space used in zNewRecord[] */
    +      int len;               /* Length of a field */
    +    } ao;
    +    struct OP_Count_stack_vars {
    +      i64 nEntry;
    +      BtCursor *pCrsr;
    +    } ap;
    +    struct OP_Savepoint_stack_vars {
    +      int p1;                         /* Value of P1 operand */
    +      char *zName;                    /* Name of savepoint */
    +      int nName;
    +      Savepoint *pNew;
    +      Savepoint *pSavepoint;
    +      Savepoint *pTmp;
    +      int iSavepoint;
    +      int ii;
    +    } aq;
    +    struct OP_AutoCommit_stack_vars {
    +      int desiredAutoCommit;
    +      int iRollback;
    +      int turnOnAC;
    +    } ar;
    +    struct OP_Transaction_stack_vars {
    +      Btree *pBt;
    +    } as;
    +    struct OP_ReadCookie_stack_vars {
    +      int iMeta;
    +      int iDb;
    +      int iCookie;
    +    } at;
    +    struct OP_SetCookie_stack_vars {
    +      Db *pDb;
    +    } au;
    +    struct OP_VerifyCookie_stack_vars {
    +      int iMeta;
    +      Btree *pBt;
    +    } av;
    +    struct OP_OpenWrite_stack_vars {
    +      int nField;
    +      KeyInfo *pKeyInfo;
    +      int p2;
    +      int iDb;
    +      int wrFlag;
    +      Btree *pX;
    +      VdbeCursor *pCur;
    +      Db *pDb;
    +    } aw;
    +    struct OP_OpenEphemeral_stack_vars {
    +      VdbeCursor *pCx;
    +    } ax;
    +    struct OP_OpenPseudo_stack_vars {
    +      VdbeCursor *pCx;
    +    } ay;
    +    struct OP_SeekGt_stack_vars {
    +      int res;
    +      int oc;
    +      VdbeCursor *pC;
    +      UnpackedRecord r;
    +      int nField;
    +      i64 iKey;      /* The rowid we are to seek to */
    +    } az;
    +    struct OP_Seek_stack_vars {
    +      VdbeCursor *pC;
    +    } ba;
    +    struct OP_Found_stack_vars {
    +      int alreadyExists;
    +      VdbeCursor *pC;
    +      int res;
    +      UnpackedRecord *pIdxKey;
    +      char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
    +    } bb;
    +    struct OP_IsUnique_stack_vars {
    +      u16 ii;
    +      VdbeCursor *pCx;
    +      BtCursor *pCrsr;
    +      u16 nField;
    +      Mem *aMem;
    +      UnpackedRecord r;                  /* B-Tree index search key */
    +      i64 R;                             /* Rowid stored in register P3 */
    +    } bc;
    +    struct OP_NotExists_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int res;
    +      u64 iKey;
    +    } bd;
    +    struct OP_NewRowid_stack_vars {
    +      i64 v;                 /* The new rowid */
    +      VdbeCursor *pC;        /* Cursor of table to get the new rowid */
    +      int res;               /* Result of an sqlite3BtreeLast() */
    +      int cnt;               /* Counter to limit the number of searches */
    +      Mem *pMem;             /* Register holding largest rowid for AUTOINCREMENT */
    +      VdbeFrame *pFrame;     /* Root frame of VDBE */
    +    } be;
    +    struct OP_InsertInt_stack_vars {
    +      Mem *pData;       /* MEM cell holding data for the record to be inserted */
    +      Mem *pKey;        /* MEM cell holding key  for the record */
    +      i64 iKey;         /* The integer ROWID or key for the record to be inserted */
    +      VdbeCursor *pC;   /* Cursor to table into which insert is written */
    +      int nZero;        /* Number of zero-bytes to append */
    +      int seekResult;   /* Result of prior seek or 0 if no USESEEKRESULT flag */
    +      const char *zDb;  /* database name - used by the update hook */
    +      const char *zTbl; /* Table name - used by the opdate hook */
    +      int op;           /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */
    +    } bf;
    +    struct OP_Delete_stack_vars {
    +      i64 iKey;
    +      VdbeCursor *pC;
    +    } bg;
    +    struct OP_RowData_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      u32 n;
    +      i64 n64;
    +    } bh;
    +    struct OP_Rowid_stack_vars {
    +      VdbeCursor *pC;
    +      i64 v;
    +      sqlite3_vtab *pVtab;
    +      const sqlite3_module *pModule;
    +    } bi;
    +    struct OP_NullRow_stack_vars {
    +      VdbeCursor *pC;
    +    } bj;
    +    struct OP_Last_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int res;
    +    } bk;
    +    struct OP_Rewind_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int res;
    +    } bl;
    +    struct OP_Next_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int res;
    +    } bm;
    +    struct OP_IdxInsert_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int nKey;
    +      const char *zKey;
    +    } bn;
    +    struct OP_IdxDelete_stack_vars {
    +      VdbeCursor *pC;
    +      BtCursor *pCrsr;
    +      int res;
    +      UnpackedRecord r;
    +    } bo;
    +    struct OP_IdxRowid_stack_vars {
    +      BtCursor *pCrsr;
    +      VdbeCursor *pC;
    +      i64 rowid;
    +    } bp;
    +    struct OP_IdxGE_stack_vars {
    +      VdbeCursor *pC;
    +      int res;
    +      UnpackedRecord r;
    +    } bq;
    +    struct OP_Destroy_stack_vars {
    +      int iMoved;
    +      int iCnt;
    +      Vdbe *pVdbe;
    +      int iDb;
    +    } br;
    +    struct OP_Clear_stack_vars {
    +      int nChange;
    +    } bs;
    +    struct OP_CreateTable_stack_vars {
    +      int pgno;
    +      int flags;
    +      Db *pDb;
    +    } bt;
    +    struct OP_ParseSchema_stack_vars {
    +      int iDb;
    +      const char *zMaster;
    +      char *zSql;
    +      InitData initData;
    +    } bu;
    +    struct OP_IntegrityCk_stack_vars {
    +      int nRoot;      /* Number of tables to check.  (Number of root pages.) */
    +      int *aRoot;     /* Array of rootpage numbers for tables to be checked */
    +      int j;          /* Loop counter */
    +      int nErr;       /* Number of errors reported */
    +      char *z;        /* Text of the error report */
    +      Mem *pnErr;     /* Register keeping track of errors remaining */
    +    } bv;
    +    struct OP_RowSetAdd_stack_vars {
    +      Mem *pIdx;
    +      Mem *pVal;
    +    } bw;
    +    struct OP_RowSetRead_stack_vars {
    +      Mem *pIdx;
    +      i64 val;
    +    } bx;
    +    struct OP_RowSetTest_stack_vars {
    +      int iSet;
    +      int exists;
    +    } by;
    +    struct OP_Program_stack_vars {
    +      int nMem;               /* Number of memory registers for sub-program */
    +      int nByte;              /* Bytes of runtime space required for sub-program */
    +      Mem *pRt;               /* Register to allocate runtime space */
    +      Mem *pMem;              /* Used to iterate through memory cells */
    +      Mem *pEnd;              /* Last memory cell in new array */
    +      VdbeFrame *pFrame;      /* New vdbe frame to execute in */
    +      SubProgram *pProgram;   /* Sub-program to execute */
    +      void *t;                /* Token identifying trigger */
    +    } bz;
    +    struct OP_Param_stack_vars {
    +      VdbeFrame *pFrame;
    +      Mem *pIn;
    +    } ca;
    +    struct OP_MemMax_stack_vars {
    +      Mem *pIn1;
    +      VdbeFrame *pFrame;
    +    } cb;
    +    struct OP_AggStep_stack_vars {
    +      int n;
    +      int i;
    +      Mem *pMem;
    +      Mem *pRec;
    +      sqlite3_context ctx;
    +      sqlite3_value **apVal;
    +    } cc;
    +    struct OP_AggFinal_stack_vars {
    +      Mem *pMem;
    +    } cd;
    +    struct OP_IncrVacuum_stack_vars {
    +      Btree *pBt;
    +    } ce;
    +    struct OP_VBegin_stack_vars {
    +      VTable *pVTab;
    +    } cf;
    +    struct OP_VOpen_stack_vars {
    +      VdbeCursor *pCur;
    +      sqlite3_vtab_cursor *pVtabCursor;
    +      sqlite3_vtab *pVtab;
    +      sqlite3_module *pModule;
    +    } cg;
    +    struct OP_VFilter_stack_vars {
    +      int nArg;
    +      int iQuery;
    +      const sqlite3_module *pModule;
    +      Mem *pQuery;
    +      Mem *pArgc;
    +      sqlite3_vtab_cursor *pVtabCursor;
    +      sqlite3_vtab *pVtab;
    +      VdbeCursor *pCur;
    +      int res;
    +      int i;
    +      Mem **apArg;
    +    } ch;
    +    struct OP_VColumn_stack_vars {
    +      sqlite3_vtab *pVtab;
    +      const sqlite3_module *pModule;
    +      Mem *pDest;
    +      sqlite3_context sContext;
    +    } ci;
    +    struct OP_VNext_stack_vars {
    +      sqlite3_vtab *pVtab;
    +      const sqlite3_module *pModule;
    +      int res;
    +      VdbeCursor *pCur;
    +    } cj;
    +    struct OP_VRename_stack_vars {
    +      sqlite3_vtab *pVtab;
    +      Mem *pName;
    +    } ck;
    +    struct OP_VUpdate_stack_vars {
    +      sqlite3_vtab *pVtab;
    +      sqlite3_module *pModule;
    +      int nArg;
    +      int i;
    +      sqlite_int64 rowid;
    +      Mem **apArg;
    +      Mem *pX;
    +    } cl;
    +    struct OP_Pagecount_stack_vars {
    +      int p1;
    +      int nPage;
    +      Pager *pPager;
    +    } cm;
    +    struct OP_Trace_stack_vars {
    +      char *zTrace;
    +    } cn;
    +  } u;
    +  /* End automatically generated code
    +  ********************************************************************/
    +
    +  assert( p->magic==VDBE_MAGIC_RUN );  /* sqlite3_step() verifies this */
    +  assert( db->magic==SQLITE_MAGIC_BUSY );
    +  sqlite3VdbeMutexArrayEnter(p);
    +  if( p->rc==SQLITE_NOMEM ){
    +    /* This happens if a malloc() inside a call to sqlite3_column_text() or
    +    ** sqlite3_column_text16() failed.  */
    +    goto no_mem;
    +  }
    +  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY );
    +  p->rc = SQLITE_OK;
    +  assert( p->explain==0 );
    +  p->pResultSet = 0;
    +  db->busyHandler.nBusy = 0;
    +  CHECK_FOR_INTERRUPT;
    +  sqlite3VdbeIOTraceSql(p);
    +#ifdef SQLITE_DEBUG
    +  sqlite3BeginBenignMalloc();
    +  if( p->pc==0 
    +   && ((p->db->flags & SQLITE_VdbeListing) || fileExists(db, "vdbe_explain"))
    +  ){
    +    int i;
    +    printf("VDBE Program Listing:\n");
    +    sqlite3VdbePrintSql(p);
    +    for(i=0; i<p->nOp; i++){
    +      sqlite3VdbePrintOp(stdout, i, &p->aOp[i]);
    +    }
    +  }
    +  if( fileExists(db, "vdbe_trace") ){
    +    p->trace = stdout;
    +  }
    +  sqlite3EndBenignMalloc();
    +#endif
    +  for(pc=p->pc; rc==SQLITE_OK; pc++){
    +    assert( pc>=0 && pc<p->nOp );
    +    if( db->mallocFailed ) goto no_mem;
    +#ifdef VDBE_PROFILE
    +    origPc = pc;
    +    start = sqlite3Hwtime();
    +#endif
    +    pOp = &p->aOp[pc];
    +
    +    /* Only allow tracing if SQLITE_DEBUG is defined.
    +    */
    +#ifdef SQLITE_DEBUG
    +    if( p->trace ){
    +      if( pc==0 ){
    +        printf("VDBE Execution Trace:\n");
    +        sqlite3VdbePrintSql(p);
    +      }
    +      sqlite3VdbePrintOp(p->trace, pc, pOp);
    +    }
    +    if( p->trace==0 && pc==0 ){
    +      sqlite3BeginBenignMalloc();
    +      if( fileExists(db, "vdbe_sqltrace") ){
    +        sqlite3VdbePrintSql(p);
    +      }
    +      sqlite3EndBenignMalloc();
    +    }
    +#endif
    +      
    +
    +    /* Check to see if we need to simulate an interrupt.  This only happens
    +    ** if we have a special test build.
    +    */
    +#ifdef SQLITE_TEST
    +    if( sqlite3_interrupt_count>0 ){
    +      sqlite3_interrupt_count--;
    +      if( sqlite3_interrupt_count==0 ){
    +        sqlite3_interrupt(db);
    +      }
    +    }
    +#endif
    +
    +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
    +    /* Call the progress callback if it is configured and the required number
    +    ** of VDBE ops have been executed (either since this invocation of
    +    ** sqlite3VdbeExec() or since last time the progress callback was called).
    +    ** If the progress callback returns non-zero, exit the virtual machine with
    +    ** a return code SQLITE_ABORT.
    +    */
    +    if( db->xProgress ){
    +      if( db->nProgressOps==nProgressOps ){
    +        int prc;
    +        if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +        prc =db->xProgress(db->pProgressArg);
    +        if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +        if( prc!=0 ){
    +          rc = SQLITE_INTERRUPT;
    +          goto vdbe_error_halt;
    +        }
    +        nProgressOps = 0;
    +      }
    +      nProgressOps++;
    +    }
    +#endif
    +
    +    /* Do common setup processing for any opcode that is marked
    +    ** with the "out2-prerelease" tag.  Such opcodes have a single
    +    ** output which is specified by the P2 parameter.  The P2 register
    +    ** is initialized to a NULL.
    +    */
    +    opProperty = opcodeProperty[pOp->opcode];
    +    if( (opProperty & OPFLG_OUT2_PRERELEASE)!=0 ){
    +      assert( pOp->p2>0 );
    +      assert( pOp->p2<=p->nMem );
    +      pOut = &p->aMem[pOp->p2];
    +      sqlite3VdbeMemReleaseExternal(pOut);
    +      pOut->flags = MEM_Null;
    +      pOut->n = 0;
    +    }else
    + 
    +    /* Do common setup for opcodes marked with one of the following
    +    ** combinations of properties.
    +    **
    +    **           in1
    +    **           in1 in2
    +    **           in1 in2 out3
    +    **           in1 in3
    +    **
    +    ** Variables pIn1, pIn2, and pIn3 are made to point to appropriate
    +    ** registers for inputs.  Variable pOut points to the output register.
    +    */
    +    if( (opProperty & OPFLG_IN1)!=0 ){
    +      assert( pOp->p1>0 );
    +      assert( pOp->p1<=p->nMem );
    +      pIn1 = &p->aMem[pOp->p1];
    +      REGISTER_TRACE(pOp->p1, pIn1);
    +      if( (opProperty & OPFLG_IN2)!=0 ){
    +        assert( pOp->p2>0 );
    +        assert( pOp->p2<=p->nMem );
    +        pIn2 = &p->aMem[pOp->p2];
    +        REGISTER_TRACE(pOp->p2, pIn2);
    +        /* As currently implemented, in2 implies out3.  There is no reason
    +        ** why this has to be, it just worked out that way. */
    +        assert( (opProperty & OPFLG_OUT3)!=0 );
    +        assert( pOp->p3>0 );
    +        assert( pOp->p3<=p->nMem );
    +        pOut = &p->aMem[pOp->p3];
    +      }else if( (opProperty & OPFLG_IN3)!=0 ){
    +        assert( pOp->p3>0 );
    +        assert( pOp->p3<=p->nMem );
    +        pIn3 = &p->aMem[pOp->p3];
    +        REGISTER_TRACE(pOp->p3, pIn3);
    +      }
    +    }else if( (opProperty & OPFLG_IN2)!=0 ){
    +      assert( pOp->p2>0 );
    +      assert( pOp->p2<=p->nMem );
    +      pIn2 = &p->aMem[pOp->p2];
    +      REGISTER_TRACE(pOp->p2, pIn2);
    +    }else if( (opProperty & OPFLG_IN3)!=0 ){
    +      assert( pOp->p3>0 );
    +      assert( pOp->p3<=p->nMem );
    +      pIn3 = &p->aMem[pOp->p3];
    +      REGISTER_TRACE(pOp->p3, pIn3);
    +    }
    +
    +    switch( pOp->opcode ){
    +
    +/*****************************************************************************
    +** What follows is a massive switch statement where each case implements a
    +** separate instruction in the virtual machine.  If we follow the usual
    +** indentation conventions, each case should be indented by 6 spaces.  But
    +** that is a lot of wasted space on the left margin.  So the code within
    +** the switch statement will break with convention and be flush-left. Another
    +** big comment (similar to this one) will mark the point in the code where
    +** we transition back to normal indentation.
    +**
    +** The formatting of each case is important.  The makefile for SQLite
    +** generates two C files "opcodes.h" and "opcodes.c" by scanning this
    +** file looking for lines that begin with "case OP_".  The opcodes.h files
    +** will be filled with #defines that give unique integer values to each
    +** opcode and the opcodes.c file is filled with an array of strings where
    +** each string is the symbolic name for the corresponding opcode.  If the
    +** case statement is followed by a comment of the form "/# same as ... #/"
    +** that comment is used to determine the particular value of the opcode.
    +**
    +** Other keywords in the comment that follows each case are used to
    +** construct the OPFLG_INITIALIZER value that initializes opcodeProperty[].
    +** Keywords include: in1, in2, in3, out2_prerelease, out2, out3.  See
    +** the mkopcodeh.awk script for additional information.
    +**
    +** Documentation about VDBE opcodes is generated by scanning this file
    +** for lines of that contain "Opcode:".  That line and all subsequent
    +** comment lines are used in the generation of the opcode.html documentation
    +** file.
    +**
    +** SUMMARY:
    +**
    +**     Formatting is important to scripts that scan this file.
    +**     Do not deviate from the formatting style currently in use.
    +**
    +*****************************************************************************/
    +
    +/* Opcode:  Goto * P2 * * *
    +**
    +** An unconditional jump to address P2.
    +** The next instruction executed will be 
    +** the one at index P2 from the beginning of
    +** the program.
    +*/
    +case OP_Goto: {             /* jump */
    +  CHECK_FOR_INTERRUPT;
    +  pc = pOp->p2 - 1;
    +  break;
    +}
    +
    +/* Opcode:  Gosub P1 P2 * * *
    +**
    +** Write the current address onto register P1
    +** and then jump to address P2.
    +*/
    +case OP_Gosub: {            /* jump */
    +  assert( pOp->p1>0 );
    +  assert( pOp->p1<=p->nMem );
    +  pIn1 = &p->aMem[pOp->p1];
    +  assert( (pIn1->flags & MEM_Dyn)==0 );
    +  pIn1->flags = MEM_Int;
    +  pIn1->u.i = pc;
    +  REGISTER_TRACE(pOp->p1, pIn1);
    +  pc = pOp->p2 - 1;
    +  break;
    +}
    +
    +/* Opcode:  Return P1 * * * *
    +**
    +** Jump to the next instruction after the address in register P1.
    +*/
    +case OP_Return: {           /* in1 */
    +  assert( pIn1->flags & MEM_Int );
    +  pc = (int)pIn1->u.i;
    +  break;
    +}
    +
    +/* Opcode:  Yield P1 * * * *
    +**
    +** Swap the program counter with the value in register P1.
    +*/
    +case OP_Yield: {            /* in1 */
    +#if 0  /* local variables moved into u.aa */
    +  int pcDest;
    +#endif /* local variables moved into u.aa */
    +  assert( (pIn1->flags & MEM_Dyn)==0 );
    +  pIn1->flags = MEM_Int;
    +  u.aa.pcDest = (int)pIn1->u.i;
    +  pIn1->u.i = pc;
    +  REGISTER_TRACE(pOp->p1, pIn1);
    +  pc = u.aa.pcDest;
    +  break;
    +}
    +
    +/* Opcode:  HaltIfNull  P1 P2 P3 P4 *
    +**
    +** Check the value in register P3.  If is is NULL then Halt using
    +** parameter P1, P2, and P4 as if this were a Halt instruction.  If the
    +** value in register P3 is not NULL, then this routine is a no-op.
    +*/
    +case OP_HaltIfNull: {      /* in3 */
    +  if( (pIn3->flags & MEM_Null)==0 ) break;
    +  /* Fall through into OP_Halt */
    +}
    +
    +/* Opcode:  Halt P1 P2 * P4 *
    +**
    +** Exit immediately.  All open cursors, etc are closed
    +** automatically.
    +**
    +** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),
    +** or sqlite3_finalize().  For a normal halt, this should be SQLITE_OK (0).
    +** For errors, it can be some other value.  If P1!=0 then P2 will determine
    +** whether or not to rollback the current transaction.  Do not rollback
    +** if P2==OE_Fail. Do the rollback if P2==OE_Rollback.  If P2==OE_Abort,
    +** then back out all changes that have occurred during this execution of the
    +** VDBE, but do not rollback the transaction. 
    +**
    +** If P4 is not null then it is an error message string.
    +**
    +** There is an implied "Halt 0 0 0" instruction inserted at the very end of
    +** every program.  So a jump past the last instruction of the program
    +** is the same as executing Halt.
    +*/
    +case OP_Halt: {
    +  if( pOp->p1==SQLITE_OK && p->pFrame ){
    +    /* Halt the sub-program. Return control to the parent frame. */
    +    VdbeFrame *pFrame = p->pFrame;
    +    p->pFrame = pFrame->pParent;
    +    p->nFrame--;
    +    sqlite3VdbeSetChanges(db, p->nChange);
    +    pc = sqlite3VdbeFrameRestore(pFrame);
    +    if( pOp->p2==OE_Ignore ){
    +      /* Instruction pc is the OP_Program that invoked the sub-program 
    +      ** currently being halted. If the p2 instruction of this OP_Halt
    +      ** instruction is set to OE_Ignore, then the sub-program is throwing
    +      ** an IGNORE exception. In this case jump to the address specified
    +      ** as the p2 of the calling OP_Program.  */
    +      pc = p->aOp[pc].p2-1;
    +    }
    +    break;
    +  }
    +
    +  p->rc = pOp->p1;
    +  p->errorAction = (u8)pOp->p2;
    +  p->pc = pc;
    +  if( pOp->p4.z ){
    +    sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
    +  }
    +  rc = sqlite3VdbeHalt(p);
    +  assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );
    +  if( rc==SQLITE_BUSY ){
    +    p->rc = rc = SQLITE_BUSY;
    +  }else{
    +    assert( rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT );
    +    assert( rc==SQLITE_OK || db->nDeferredCons>0 );
    +    rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;
    +  }
    +  goto vdbe_return;
    +}
    +
    +/* Opcode: Integer P1 P2 * * *
    +**
    +** The 32-bit integer value P1 is written into register P2.
    +*/
    +case OP_Integer: {         /* out2-prerelease */
    +  pOut->flags = MEM_Int;
    +  pOut->u.i = pOp->p1;
    +  break;
    +}
    +
    +/* Opcode: Int64 * P2 * P4 *
    +**
    +** P4 is a pointer to a 64-bit integer value.
    +** Write that value into register P2.
    +*/
    +case OP_Int64: {           /* out2-prerelease */
    +  assert( pOp->p4.pI64!=0 );
    +  pOut->flags = MEM_Int;
    +  pOut->u.i = *pOp->p4.pI64;
    +  break;
    +}
    +
    +/* Opcode: Real * P2 * P4 *
    +**
    +** P4 is a pointer to a 64-bit floating point value.
    +** Write that value into register P2.
    +*/
    +case OP_Real: {            /* same as TK_FLOAT, out2-prerelease */
    +  pOut->flags = MEM_Real;
    +  assert( !sqlite3IsNaN(*pOp->p4.pReal) );
    +  pOut->r = *pOp->p4.pReal;
    +  break;
    +}
    +
    +/* Opcode: String8 * P2 * P4 *
    +**
    +** P4 points to a nul terminated UTF-8 string. This opcode is transformed 
    +** into an OP_String before it is executed for the first time.
    +*/
    +case OP_String8: {         /* same as TK_STRING, out2-prerelease */
    +  assert( pOp->p4.z!=0 );
    +  pOp->opcode = OP_String;
    +  pOp->p1 = sqlite3Strlen30(pOp->p4.z);
    +
    +#ifndef SQLITE_OMIT_UTF16
    +  if( encoding!=SQLITE_UTF8 ){
    +    rc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);
    +    if( rc==SQLITE_TOOBIG ) goto too_big;
    +    if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;
    +    assert( pOut->zMalloc==pOut->z );
    +    assert( pOut->flags & MEM_Dyn );
    +    pOut->zMalloc = 0;
    +    pOut->flags |= MEM_Static;
    +    pOut->flags &= ~MEM_Dyn;
    +    if( pOp->p4type==P4_DYNAMIC ){
    +      sqlite3DbFree(db, pOp->p4.z);
    +    }
    +    pOp->p4type = P4_DYNAMIC;
    +    pOp->p4.z = pOut->z;
    +    pOp->p1 = pOut->n;
    +  }
    +#endif
    +  if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    goto too_big;
    +  }
    +  /* Fall through to the next case, OP_String */
    +}
    +  
    +/* Opcode: String P1 P2 * P4 *
    +**
    +** The string value P4 of length P1 (bytes) is stored in register P2.
    +*/
    +case OP_String: {          /* out2-prerelease */
    +  assert( pOp->p4.z!=0 );
    +  pOut->flags = MEM_Str|MEM_Static|MEM_Term;
    +  pOut->z = pOp->p4.z;
    +  pOut->n = pOp->p1;
    +  pOut->enc = encoding;
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: Null * P2 * * *
    +**
    +** Write a NULL into register P2.
    +*/
    +case OP_Null: {           /* out2-prerelease */
    +  break;
    +}
    +
    +
    +/* Opcode: Blob P1 P2 * P4
    +**
    +** P4 points to a blob of data P1 bytes long.  Store this
    +** blob in register P2. This instruction is not coded directly
    +** by the compiler. Instead, the compiler layer specifies
    +** an OP_HexBlob opcode, with the hex string representation of
    +** the blob as P4. This opcode is transformed to an OP_Blob
    +** the first time it is executed.
    +*/
    +case OP_Blob: {                /* out2-prerelease */
    +  assert( pOp->p1 <= SQLITE_MAX_LENGTH );
    +  sqlite3VdbeMemSetStr(pOut, pOp->p4.z, pOp->p1, 0, 0);
    +  pOut->enc = encoding;
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: Variable P1 P2 P3 P4 *
    +**
    +** Transfer the values of bound parameters P1..P1+P3-1 into registers
    +** P2..P2+P3-1.
    +**
    +** If the parameter is named, then its name appears in P4 and P3==1.
    +** The P4 value is used by sqlite3_bind_parameter_name().
    +*/
    +case OP_Variable: {
    +#if 0  /* local variables moved into u.ab */
    +  int p1;          /* Variable to copy from */
    +  int p2;          /* Register to copy to */
    +  int n;           /* Number of values left to copy */
    +  Mem *pVar;       /* Value being transferred */
    +#endif /* local variables moved into u.ab */
    +
    +  u.ab.p1 = pOp->p1 - 1;
    +  u.ab.p2 = pOp->p2;
    +  u.ab.n = pOp->p3;
    +  assert( u.ab.p1>=0 && u.ab.p1+u.ab.n<=p->nVar );
    +  assert( u.ab.p2>=1 && u.ab.p2+u.ab.n-1<=p->nMem );
    +  assert( pOp->p4.z==0 || pOp->p3==1 || pOp->p3==0 );
    +
    +  while( u.ab.n-- > 0 ){
    +    u.ab.pVar = &p->aVar[u.ab.p1++];
    +    if( sqlite3VdbeMemTooBig(u.ab.pVar) ){
    +      goto too_big;
    +    }
    +    pOut = &p->aMem[u.ab.p2++];
    +    sqlite3VdbeMemReleaseExternal(pOut);
    +    pOut->flags = MEM_Null;
    +    sqlite3VdbeMemShallowCopy(pOut, u.ab.pVar, MEM_Static);
    +    UPDATE_MAX_BLOBSIZE(pOut);
    +  }
    +  break;
    +}
    +
    +/* Opcode: Move P1 P2 P3 * *
    +**
    +** Move the values in register P1..P1+P3-1 over into
    +** registers P2..P2+P3-1.  Registers P1..P1+P1-1 are
    +** left holding a NULL.  It is an error for register ranges
    +** P1..P1+P3-1 and P2..P2+P3-1 to overlap.
    +*/
    +case OP_Move: {
    +#if 0  /* local variables moved into u.ac */
    +  char *zMalloc;   /* Holding variable for allocated memory */
    +  int n;           /* Number of registers left to copy */
    +  int p1;          /* Register to copy from */
    +  int p2;          /* Register to copy to */
    +#endif /* local variables moved into u.ac */
    +
    +  u.ac.n = pOp->p3;
    +  u.ac.p1 = pOp->p1;
    +  u.ac.p2 = pOp->p2;
    +  assert( u.ac.n>0 && u.ac.p1>0 && u.ac.p2>0 );
    +  assert( u.ac.p1+u.ac.n<=u.ac.p2 || u.ac.p2+u.ac.n<=u.ac.p1 );
    +
    +  pIn1 = &p->aMem[u.ac.p1];
    +  pOut = &p->aMem[u.ac.p2];
    +  while( u.ac.n-- ){
    +    assert( pOut<=&p->aMem[p->nMem] );
    +    assert( pIn1<=&p->aMem[p->nMem] );
    +    u.ac.zMalloc = pOut->zMalloc;
    +    pOut->zMalloc = 0;
    +    sqlite3VdbeMemMove(pOut, pIn1);
    +    pIn1->zMalloc = u.ac.zMalloc;
    +    REGISTER_TRACE(u.ac.p2++, pOut);
    +    pIn1++;
    +    pOut++;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Copy P1 P2 * * *
    +**
    +** Make a copy of register P1 into register P2.
    +**
    +** This instruction makes a deep copy of the value.  A duplicate
    +** is made of any string or blob constant.  See also OP_SCopy.
    +*/
    +case OP_Copy: {             /* in1 */
    +  assert( pOp->p2>0 );
    +  assert( pOp->p2<=p->nMem );
    +  pOut = &p->aMem[pOp->p2];
    +  assert( pOut!=pIn1 );
    +  sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
    +  Deephemeralize(pOut);
    +  REGISTER_TRACE(pOp->p2, pOut);
    +  break;
    +}
    +
    +/* Opcode: SCopy P1 P2 * * *
    +**
    +** Make a shallow copy of register P1 into register P2.
    +**
    +** This instruction makes a shallow copy of the value.  If the value
    +** is a string or blob, then the copy is only a pointer to the
    +** original and hence if the original changes so will the copy.
    +** Worse, if the original is deallocated, the copy becomes invalid.
    +** Thus the program must guarantee that the original will not change
    +** during the lifetime of the copy.  Use OP_Copy to make a complete
    +** copy.
    +*/
    +case OP_SCopy: {            /* in1 */
    +  REGISTER_TRACE(pOp->p1, pIn1);
    +  assert( pOp->p2>0 );
    +  assert( pOp->p2<=p->nMem );
    +  pOut = &p->aMem[pOp->p2];
    +  assert( pOut!=pIn1 );
    +  sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
    +  REGISTER_TRACE(pOp->p2, pOut);
    +  break;
    +}
    +
    +/* Opcode: ResultRow P1 P2 * * *
    +**
    +** The registers P1 through P1+P2-1 contain a single row of
    +** results. This opcode causes the sqlite3_step() call to terminate
    +** with an SQLITE_ROW return code and it sets up the sqlite3_stmt
    +** structure to provide access to the top P1 values as the result
    +** row.
    +*/
    +case OP_ResultRow: {
    +#if 0  /* local variables moved into u.ad */
    +  Mem *pMem;
    +  int i;
    +#endif /* local variables moved into u.ad */
    +  assert( p->nResColumn==pOp->p2 );
    +  assert( pOp->p1>0 );
    +  assert( pOp->p1+pOp->p2<=p->nMem+1 );
    +
    +  /* If this statement has violated immediate foreign key constraints, do
    +  ** not return the number of rows modified. And do not RELEASE the statement
    +  ** transaction. It needs to be rolled back.  */
    +  if( SQLITE_OK!=(rc = sqlite3VdbeCheckFk(p, 0)) ){
    +    assert( db->flags&SQLITE_CountRows );
    +    assert( p->usesStmtJournal );
    +    break;
    +  }
    +
    +  /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
    +  ** DML statements invoke this opcode to return the number of rows
    +  ** modified to the user. This is the only way that a VM that
    +  ** opens a statement transaction may invoke this opcode.
    +  **
    +  ** In case this is such a statement, close any statement transaction
    +  ** opened by this VM before returning control to the user. This is to
    +  ** ensure that statement-transactions are always nested, not overlapping.
    +  ** If the open statement-transaction is not closed here, then the user
    +  ** may step another VM that opens its own statement transaction. This
    +  ** may lead to overlapping statement transactions.
    +  **
    +  ** The statement transaction is never a top-level transaction.  Hence
    +  ** the RELEASE call below can never fail.
    +  */
    +  assert( p->iStatement==0 || db->flags&SQLITE_CountRows );
    +  rc = sqlite3VdbeCloseStatement(p, SAVEPOINT_RELEASE);
    +  if( NEVER(rc!=SQLITE_OK) ){
    +    break;
    +  }
    +
    +  /* Invalidate all ephemeral cursor row caches */
    +  p->cacheCtr = (p->cacheCtr + 2)|1;
    +
    +  /* Make sure the results of the current row are \000 terminated
    +  ** and have an assigned type.  The results are de-ephemeralized as
    +  ** as side effect.
    +  */
    +  u.ad.pMem = p->pResultSet = &p->aMem[pOp->p1];
    +  for(u.ad.i=0; u.ad.i<pOp->p2; u.ad.i++){
    +    sqlite3VdbeMemNulTerminate(&u.ad.pMem[u.ad.i]);
    +    sqlite3VdbeMemStoreType(&u.ad.pMem[u.ad.i]);
    +    REGISTER_TRACE(pOp->p1+u.ad.i, &u.ad.pMem[u.ad.i]);
    +  }
    +  if( db->mallocFailed ) goto no_mem;
    +
    +  /* Return SQLITE_ROW
    +  */
    +  p->pc = pc + 1;
    +  rc = SQLITE_ROW;
    +  goto vdbe_return;
    +}
    +
    +/* Opcode: Concat P1 P2 P3 * *
    +**
    +** Add the text in register P1 onto the end of the text in
    +** register P2 and store the result in register P3.
    +** If either the P1 or P2 text are NULL then store NULL in P3.
    +**
    +**   P3 = P2 || P1
    +**
    +** It is illegal for P1 and P3 to be the same register. Sometimes,
    +** if P3 is the same register as P2, the implementation is able
    +** to avoid a memcpy().
    +*/
    +case OP_Concat: {           /* same as TK_CONCAT, in1, in2, out3 */
    +#if 0  /* local variables moved into u.ae */
    +  i64 nByte;
    +#endif /* local variables moved into u.ae */
    +
    +  assert( pIn1!=pOut );
    +  if( (pIn1->flags | pIn2->flags) & MEM_Null ){
    +    sqlite3VdbeMemSetNull(pOut);
    +    break;
    +  }
    +  if( ExpandBlob(pIn1) || ExpandBlob(pIn2) ) goto no_mem;
    +  Stringify(pIn1, encoding);
    +  Stringify(pIn2, encoding);
    +  u.ae.nByte = pIn1->n + pIn2->n;
    +  if( u.ae.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    goto too_big;
    +  }
    +  MemSetTypeFlag(pOut, MEM_Str);
    +  if( sqlite3VdbeMemGrow(pOut, (int)u.ae.nByte+2, pOut==pIn2) ){
    +    goto no_mem;
    +  }
    +  if( pOut!=pIn2 ){
    +    memcpy(pOut->z, pIn2->z, pIn2->n);
    +  }
    +  memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n);
    +  pOut->z[u.ae.nByte] = 0;
    +  pOut->z[u.ae.nByte+1] = 0;
    +  pOut->flags |= MEM_Term;
    +  pOut->n = (int)u.ae.nByte;
    +  pOut->enc = encoding;
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: Add P1 P2 P3 * *
    +**
    +** Add the value in register P1 to the value in register P2
    +** and store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: Multiply P1 P2 P3 * *
    +**
    +**
    +** Multiply the value in register P1 by the value in register P2
    +** and store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: Subtract P1 P2 P3 * *
    +**
    +** Subtract the value in register P1 from the value in register P2
    +** and store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: Divide P1 P2 P3 * *
    +**
    +** Divide the value in register P1 by the value in register P2
    +** and store the result in register P3 (P3=P2/P1). If the value in 
    +** register P1 is zero, then the result is NULL. If either input is 
    +** NULL, the result is NULL.
    +*/
    +/* Opcode: Remainder P1 P2 P3 * *
    +**
    +** Compute the remainder after integer division of the value in
    +** register P1 by the value in register P2 and store the result in P3. 
    +** If the value in register P2 is zero the result is NULL.
    +** If either operand is NULL, the result is NULL.
    +*/
    +case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */
    +case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */
    +case OP_Multiply:              /* same as TK_STAR, in1, in2, out3 */
    +case OP_Divide:                /* same as TK_SLASH, in1, in2, out3 */
    +case OP_Remainder: {           /* same as TK_REM, in1, in2, out3 */
    +#if 0  /* local variables moved into u.af */
    +  int flags;      /* Combined MEM_* flags from both inputs */
    +  i64 iA;         /* Integer value of left operand */
    +  i64 iB;         /* Integer value of right operand */
    +  double rA;      /* Real value of left operand */
    +  double rB;      /* Real value of right operand */
    +#endif /* local variables moved into u.af */
    +
    +  applyNumericAffinity(pIn1);
    +  applyNumericAffinity(pIn2);
    +  u.af.flags = pIn1->flags | pIn2->flags;
    +  if( (u.af.flags & MEM_Null)!=0 ) goto arithmetic_result_is_null;
    +  if( (pIn1->flags & pIn2->flags & MEM_Int)==MEM_Int ){
    +    u.af.iA = pIn1->u.i;
    +    u.af.iB = pIn2->u.i;
    +    switch( pOp->opcode ){
    +      case OP_Add:         u.af.iB += u.af.iA;       break;
    +      case OP_Subtract:    u.af.iB -= u.af.iA;       break;
    +      case OP_Multiply:    u.af.iB *= u.af.iA;       break;
    +      case OP_Divide: {
    +        if( u.af.iA==0 ) goto arithmetic_result_is_null;
    +        /* Dividing the largest possible negative 64-bit integer (1<<63) by
    +        ** -1 returns an integer too large to store in a 64-bit data-type. On
    +        ** some architectures, the value overflows to (1<<63). On others,
    +        ** a SIGFPE is issued. The following statement normalizes this
    +        ** behavior so that all architectures behave as if integer
    +        ** overflow occurred.
    +        */
    +        if( u.af.iA==-1 && u.af.iB==SMALLEST_INT64 ) u.af.iA = 1;
    +        u.af.iB /= u.af.iA;
    +        break;
    +      }
    +      default: {
    +        if( u.af.iA==0 ) goto arithmetic_result_is_null;
    +        if( u.af.iA==-1 ) u.af.iA = 1;
    +        u.af.iB %= u.af.iA;
    +        break;
    +      }
    +    }
    +    pOut->u.i = u.af.iB;
    +    MemSetTypeFlag(pOut, MEM_Int);
    +  }else{
    +    u.af.rA = sqlite3VdbeRealValue(pIn1);
    +    u.af.rB = sqlite3VdbeRealValue(pIn2);
    +    switch( pOp->opcode ){
    +      case OP_Add:         u.af.rB += u.af.rA;       break;
    +      case OP_Subtract:    u.af.rB -= u.af.rA;       break;
    +      case OP_Multiply:    u.af.rB *= u.af.rA;       break;
    +      case OP_Divide: {
    +        /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +        if( u.af.rA==(double)0 ) goto arithmetic_result_is_null;
    +        u.af.rB /= u.af.rA;
    +        break;
    +      }
    +      default: {
    +        u.af.iA = (i64)u.af.rA;
    +        u.af.iB = (i64)u.af.rB;
    +        if( u.af.iA==0 ) goto arithmetic_result_is_null;
    +        if( u.af.iA==-1 ) u.af.iA = 1;
    +        u.af.rB = (double)(u.af.iB % u.af.iA);
    +        break;
    +      }
    +    }
    +    if( sqlite3IsNaN(u.af.rB) ){
    +      goto arithmetic_result_is_null;
    +    }
    +    pOut->r = u.af.rB;
    +    MemSetTypeFlag(pOut, MEM_Real);
    +    if( (u.af.flags & MEM_Real)==0 ){
    +      sqlite3VdbeIntegerAffinity(pOut);
    +    }
    +  }
    +  break;
    +
    +arithmetic_result_is_null:
    +  sqlite3VdbeMemSetNull(pOut);
    +  break;
    +}
    +
    +/* Opcode: CollSeq * * P4
    +**
    +** P4 is a pointer to a CollSeq struct. If the next call to a user function
    +** or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will
    +** be returned. This is used by the built-in min(), max() and nullif()
    +** functions.
    +**
    +** The interface used by the implementation of the aforementioned functions
    +** to retrieve the collation sequence set by this opcode is not available
    +** publicly, only to user functions defined in func.c.
    +*/
    +case OP_CollSeq: {
    +  assert( pOp->p4type==P4_COLLSEQ );
    +  break;
    +}
    +
    +/* Opcode: Function P1 P2 P3 P4 P5
    +**
    +** Invoke a user function (P4 is a pointer to a Function structure that
    +** defines the function) with P5 arguments taken from register P2 and
    +** successors.  The result of the function is stored in register P3.
    +** Register P3 must not be one of the function inputs.
    +**
    +** P1 is a 32-bit bitmask indicating whether or not each argument to the 
    +** function was determined to be constant at compile time. If the first
    +** argument was constant then bit 0 of P1 is set. This is used to determine
    +** whether meta data associated with a user function argument using the
    +** sqlite3_set_auxdata() API may be safely retained until the next
    +** invocation of this opcode.
    +**
    +** See also: AggStep and AggFinal
    +*/
    +case OP_Function: {
    +#if 0  /* local variables moved into u.ag */
    +  int i;
    +  Mem *pArg;
    +  sqlite3_context ctx;
    +  sqlite3_value **apVal;
    +  int n;
    +#endif /* local variables moved into u.ag */
    +
    +  u.ag.n = pOp->p5;
    +  u.ag.apVal = p->apArg;
    +  assert( u.ag.apVal || u.ag.n==0 );
    +
    +  assert( u.ag.n==0 || (pOp->p2>0 && pOp->p2+u.ag.n<=p->nMem+1) );
    +  assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+u.ag.n );
    +  u.ag.pArg = &p->aMem[pOp->p2];
    +  for(u.ag.i=0; u.ag.i<u.ag.n; u.ag.i++, u.ag.pArg++){
    +    u.ag.apVal[u.ag.i] = u.ag.pArg;
    +    sqlite3VdbeMemStoreType(u.ag.pArg);
    +    REGISTER_TRACE(pOp->p2, u.ag.pArg);
    +  }
    +
    +  assert( pOp->p4type==P4_FUNCDEF || pOp->p4type==P4_VDBEFUNC );
    +  if( pOp->p4type==P4_FUNCDEF ){
    +    u.ag.ctx.pFunc = pOp->p4.pFunc;
    +    u.ag.ctx.pVdbeFunc = 0;
    +  }else{
    +    u.ag.ctx.pVdbeFunc = (VdbeFunc*)pOp->p4.pVdbeFunc;
    +    u.ag.ctx.pFunc = u.ag.ctx.pVdbeFunc->pFunc;
    +  }
    +
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  pOut = &p->aMem[pOp->p3];
    +  u.ag.ctx.s.flags = MEM_Null;
    +  u.ag.ctx.s.db = db;
    +  u.ag.ctx.s.xDel = 0;
    +  u.ag.ctx.s.zMalloc = 0;
    +
    +  /* The output cell may already have a buffer allocated. Move
    +  ** the pointer to u.ag.ctx.s so in case the user-function can use
    +  ** the already allocated buffer instead of allocating a new one.
    +  */
    +  sqlite3VdbeMemMove(&u.ag.ctx.s, pOut);
    +  MemSetTypeFlag(&u.ag.ctx.s, MEM_Null);
    +
    +  u.ag.ctx.isError = 0;
    +  if( u.ag.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
    +    assert( pOp>p->aOp );
    +    assert( pOp[-1].p4type==P4_COLLSEQ );
    +    assert( pOp[-1].opcode==OP_CollSeq );
    +    u.ag.ctx.pColl = pOp[-1].p4.pColl;
    +  }
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +  (*u.ag.ctx.pFunc->xFunc)(&u.ag.ctx, u.ag.n, u.ag.apVal);
    +  if( sqlite3SafetyOn(db) ){
    +    sqlite3VdbeMemRelease(&u.ag.ctx.s);
    +    goto abort_due_to_misuse;
    +  }
    +  if( db->mallocFailed ){
    +    /* Even though a malloc() has failed, the implementation of the
    +    ** user function may have called an sqlite3_result_XXX() function
    +    ** to return a value. The following call releases any resources
    +    ** associated with such a value.
    +    **
    +    ** Note: Maybe MemRelease() should be called if sqlite3SafetyOn()
    +    ** fails also (the if(...) statement above). But if people are
    +    ** misusing sqlite, they have bigger problems than a leaked value.
    +    */
    +    sqlite3VdbeMemRelease(&u.ag.ctx.s);
    +    goto no_mem;
    +  }
    +
    +  /* If any auxiliary data functions have been called by this user function,
    +  ** immediately call the destructor for any non-static values.
    +  */
    +  if( u.ag.ctx.pVdbeFunc ){
    +    sqlite3VdbeDeleteAuxData(u.ag.ctx.pVdbeFunc, pOp->p1);
    +    pOp->p4.pVdbeFunc = u.ag.ctx.pVdbeFunc;
    +    pOp->p4type = P4_VDBEFUNC;
    +  }
    +
    +  /* If the function returned an error, throw an exception */
    +  if( u.ag.ctx.isError ){
    +    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ag.ctx.s));
    +    rc = u.ag.ctx.isError;
    +  }
    +
    +  /* Copy the result of the function into register P3 */
    +  sqlite3VdbeChangeEncoding(&u.ag.ctx.s, encoding);
    +  sqlite3VdbeMemMove(pOut, &u.ag.ctx.s);
    +  if( sqlite3VdbeMemTooBig(pOut) ){
    +    goto too_big;
    +  }
    +  REGISTER_TRACE(pOp->p3, pOut);
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: BitAnd P1 P2 P3 * *
    +**
    +** Take the bit-wise AND of the values in register P1 and P2 and
    +** store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: BitOr P1 P2 P3 * *
    +**
    +** Take the bit-wise OR of the values in register P1 and P2 and
    +** store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: ShiftLeft P1 P2 P3 * *
    +**
    +** Shift the integer value in register P2 to the left by the
    +** number of bits specified by the integer in regiser P1.
    +** Store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +/* Opcode: ShiftRight P1 P2 P3 * *
    +**
    +** Shift the integer value in register P2 to the right by the
    +** number of bits specified by the integer in register P1.
    +** Store the result in register P3.
    +** If either input is NULL, the result is NULL.
    +*/
    +case OP_BitAnd:                 /* same as TK_BITAND, in1, in2, out3 */
    +case OP_BitOr:                  /* same as TK_BITOR, in1, in2, out3 */
    +case OP_ShiftLeft:              /* same as TK_LSHIFT, in1, in2, out3 */
    +case OP_ShiftRight: {           /* same as TK_RSHIFT, in1, in2, out3 */
    +#if 0  /* local variables moved into u.ah */
    +  i64 a;
    +  i64 b;
    +#endif /* local variables moved into u.ah */
    +
    +  if( (pIn1->flags | pIn2->flags) & MEM_Null ){
    +    sqlite3VdbeMemSetNull(pOut);
    +    break;
    +  }
    +  u.ah.a = sqlite3VdbeIntValue(pIn2);
    +  u.ah.b = sqlite3VdbeIntValue(pIn1);
    +  switch( pOp->opcode ){
    +    case OP_BitAnd:      u.ah.a &= u.ah.b;     break;
    +    case OP_BitOr:       u.ah.a |= u.ah.b;     break;
    +    case OP_ShiftLeft:   u.ah.a <<= u.ah.b;    break;
    +    default:  assert( pOp->opcode==OP_ShiftRight );
    +                         u.ah.a >>= u.ah.b;    break;
    +  }
    +  pOut->u.i = u.ah.a;
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  break;
    +}
    +
    +/* Opcode: AddImm  P1 P2 * * *
    +** 
    +** Add the constant P2 to the value in register P1.
    +** The result is always an integer.
    +**
    +** To force any register to be an integer, just add 0.
    +*/
    +case OP_AddImm: {            /* in1 */
    +  sqlite3VdbeMemIntegerify(pIn1);
    +  pIn1->u.i += pOp->p2;
    +  break;
    +}
    +
    +/* Opcode: MustBeInt P1 P2 * * *
    +** 
    +** Force the value in register P1 to be an integer.  If the value
    +** in P1 is not an integer and cannot be converted into an integer
    +** without data loss, then jump immediately to P2, or if P2==0
    +** raise an SQLITE_MISMATCH exception.
    +*/
    +case OP_MustBeInt: {            /* jump, in1 */
    +  applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
    +  if( (pIn1->flags & MEM_Int)==0 ){
    +    if( pOp->p2==0 ){
    +      rc = SQLITE_MISMATCH;
    +      goto abort_due_to_error;
    +    }else{
    +      pc = pOp->p2 - 1;
    +    }
    +  }else{
    +    MemSetTypeFlag(pIn1, MEM_Int);
    +  }
    +  break;
    +}
    +
    +/* Opcode: RealAffinity P1 * * * *
    +**
    +** If register P1 holds an integer convert it to a real value.
    +**
    +** This opcode is used when extracting information from a column that
    +** has REAL affinity.  Such column values may still be stored as
    +** integers, for space efficiency, but after extraction we want them
    +** to have only a real value.
    +*/
    +case OP_RealAffinity: {                  /* in1 */
    +  if( pIn1->flags & MEM_Int ){
    +    sqlite3VdbeMemRealify(pIn1);
    +  }
    +  break;
    +}
    +
    +#ifndef SQLITE_OMIT_CAST
    +/* Opcode: ToText P1 * * * *
    +**
    +** Force the value in register P1 to be text.
    +** If the value is numeric, convert it to a string using the
    +** equivalent of printf().  Blob values are unchanged and
    +** are afterwards simply interpreted as text.
    +**
    +** A NULL value is not changed by this routine.  It remains NULL.
    +*/
    +case OP_ToText: {                  /* same as TK_TO_TEXT, in1 */
    +  if( pIn1->flags & MEM_Null ) break;
    +  assert( MEM_Str==(MEM_Blob>>3) );
    +  pIn1->flags |= (pIn1->flags&MEM_Blob)>>3;
    +  applyAffinity(pIn1, SQLITE_AFF_TEXT, encoding);
    +  rc = ExpandBlob(pIn1);
    +  assert( pIn1->flags & MEM_Str || db->mallocFailed );
    +  pIn1->flags &= ~(MEM_Int|MEM_Real|MEM_Blob|MEM_Zero);
    +  UPDATE_MAX_BLOBSIZE(pIn1);
    +  break;
    +}
    +
    +/* Opcode: ToBlob P1 * * * *
    +**
    +** Force the value in register P1 to be a BLOB.
    +** If the value is numeric, convert it to a string first.
    +** Strings are simply reinterpreted as blobs with no change
    +** to the underlying data.
    +**
    +** A NULL value is not changed by this routine.  It remains NULL.
    +*/
    +case OP_ToBlob: {                  /* same as TK_TO_BLOB, in1 */
    +  if( pIn1->flags & MEM_Null ) break;
    +  if( (pIn1->flags & MEM_Blob)==0 ){
    +    applyAffinity(pIn1, SQLITE_AFF_TEXT, encoding);
    +    assert( pIn1->flags & MEM_Str || db->mallocFailed );
    +    MemSetTypeFlag(pIn1, MEM_Blob);
    +  }else{
    +    pIn1->flags &= ~(MEM_TypeMask&~MEM_Blob);
    +  }
    +  UPDATE_MAX_BLOBSIZE(pIn1);
    +  break;
    +}
    +
    +/* Opcode: ToNumeric P1 * * * *
    +**
    +** Force the value in register P1 to be numeric (either an
    +** integer or a floating-point number.)
    +** If the value is text or blob, try to convert it to an using the
    +** equivalent of atoi() or atof() and store 0 if no such conversion 
    +** is possible.
    +**
    +** A NULL value is not changed by this routine.  It remains NULL.
    +*/
    +case OP_ToNumeric: {                  /* same as TK_TO_NUMERIC, in1 */
    +  if( (pIn1->flags & (MEM_Null|MEM_Int|MEM_Real))==0 ){
    +    sqlite3VdbeMemNumerify(pIn1);
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_CAST */
    +
    +/* Opcode: ToInt P1 * * * *
    +**
    +** Force the value in register P1 be an integer.  If
    +** The value is currently a real number, drop its fractional part.
    +** If the value is text or blob, try to convert it to an integer using the
    +** equivalent of atoi() and store 0 if no such conversion is possible.
    +**
    +** A NULL value is not changed by this routine.  It remains NULL.
    +*/
    +case OP_ToInt: {                  /* same as TK_TO_INT, in1 */
    +  if( (pIn1->flags & MEM_Null)==0 ){
    +    sqlite3VdbeMemIntegerify(pIn1);
    +  }
    +  break;
    +}
    +
    +#ifndef SQLITE_OMIT_CAST
    +/* Opcode: ToReal P1 * * * *
    +**
    +** Force the value in register P1 to be a floating point number.
    +** If The value is currently an integer, convert it.
    +** If the value is text or blob, try to convert it to an integer using the
    +** equivalent of atoi() and store 0.0 if no such conversion is possible.
    +**
    +** A NULL value is not changed by this routine.  It remains NULL.
    +*/
    +case OP_ToReal: {                  /* same as TK_TO_REAL, in1 */
    +  if( (pIn1->flags & MEM_Null)==0 ){
    +    sqlite3VdbeMemRealify(pIn1);
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_CAST */
    +
    +/* Opcode: Lt P1 P2 P3 P4 P5
    +**
    +** Compare the values in register P1 and P3.  If reg(P3)<reg(P1) then
    +** jump to address P2.  
    +**
    +** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
    +** reg(P3) is NULL then take the jump.  If the SQLITE_JUMPIFNULL 
    +** bit is clear then fall thru if either operand is NULL.
    +**
    +** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
    +** SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made 
    +** to coerce both inputs according to this affinity before the
    +** comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric
    +** affinity is used. Note that the affinity conversions are stored
    +** back into the input registers P1 and P3.  So this opcode can cause
    +** persistent changes to registers P1 and P3.
    +**
    +** Once any conversions have taken place, and neither value is NULL, 
    +** the values are compared. If both values are blobs then memcmp() is
    +** used to determine the results of the comparison.  If both values
    +** are text, then the appropriate collating function specified in
    +** P4 is  used to do the comparison.  If P4 is not specified then
    +** memcmp() is used to compare text string.  If both values are
    +** numeric, then a numeric comparison is used. If the two values
    +** are of different types, then numbers are considered less than
    +** strings and strings are considered less than blobs.
    +**
    +** If the SQLITE_STOREP2 bit of P5 is set, then do not jump.  Instead,
    +** store a boolean result (either 0, or 1, or NULL) in register P2.
    +*/
    +/* Opcode: Ne P1 P2 P3 P4 P5
    +**
    +** This works just like the Lt opcode except that the jump is taken if
    +** the operands in registers P1 and P3 are not equal.  See the Lt opcode for
    +** additional information.
    +**
    +** If SQLITE_NULLEQ is set in P5 then the result of comparison is always either
    +** true or false and is never NULL.  If both operands are NULL then the result
    +** of comparison is false.  If either operand is NULL then the result is true.
    +** If neither operand is NULL the the result is the same as it would be if
    +** the SQLITE_NULLEQ flag were omitted from P5.
    +*/
    +/* Opcode: Eq P1 P2 P3 P4 P5
    +**
    +** This works just like the Lt opcode except that the jump is taken if
    +** the operands in registers P1 and P3 are equal.
    +** See the Lt opcode for additional information.
    +**
    +** If SQLITE_NULLEQ is set in P5 then the result of comparison is always either
    +** true or false and is never NULL.  If both operands are NULL then the result
    +** of comparison is true.  If either operand is NULL then the result is false.
    +** If neither operand is NULL the the result is the same as it would be if
    +** the SQLITE_NULLEQ flag were omitted from P5.
    +*/
    +/* Opcode: Le P1 P2 P3 P4 P5
    +**
    +** This works just like the Lt opcode except that the jump is taken if
    +** the content of register P3 is less than or equal to the content of
    +** register P1.  See the Lt opcode for additional information.
    +*/
    +/* Opcode: Gt P1 P2 P3 P4 P5
    +**
    +** This works just like the Lt opcode except that the jump is taken if
    +** the content of register P3 is greater than the content of
    +** register P1.  See the Lt opcode for additional information.
    +*/
    +/* Opcode: Ge P1 P2 P3 P4 P5
    +**
    +** This works just like the Lt opcode except that the jump is taken if
    +** the content of register P3 is greater than or equal to the content of
    +** register P1.  See the Lt opcode for additional information.
    +*/
    +case OP_Eq:               /* same as TK_EQ, jump, in1, in3 */
    +case OP_Ne:               /* same as TK_NE, jump, in1, in3 */
    +case OP_Lt:               /* same as TK_LT, jump, in1, in3 */
    +case OP_Le:               /* same as TK_LE, jump, in1, in3 */
    +case OP_Gt:               /* same as TK_GT, jump, in1, in3 */
    +case OP_Ge: {             /* same as TK_GE, jump, in1, in3 */
    +#if 0  /* local variables moved into u.ai */
    +  int res;            /* Result of the comparison of pIn1 against pIn3 */
    +  char affinity;      /* Affinity to use for comparison */
    +#endif /* local variables moved into u.ai */
    +
    +  if( (pIn1->flags | pIn3->flags)&MEM_Null ){
    +    /* One or both operands are NULL */
    +    if( pOp->p5 & SQLITE_NULLEQ ){
    +      /* If SQLITE_NULLEQ is set (which will only happen if the operator is
    +      ** OP_Eq or OP_Ne) then take the jump or not depending on whether
    +      ** or not both operands are null.
    +      */
    +      assert( pOp->opcode==OP_Eq || pOp->opcode==OP_Ne );
    +      u.ai.res = (pIn1->flags & pIn3->flags & MEM_Null)==0;
    +    }else{
    +      /* SQLITE_NULLEQ is clear and at least one operand is NULL,
    +      ** then the result is always NULL.
    +      ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
    +      */
    +      if( pOp->p5 & SQLITE_STOREP2 ){
    +        pOut = &p->aMem[pOp->p2];
    +        MemSetTypeFlag(pOut, MEM_Null);
    +        REGISTER_TRACE(pOp->p2, pOut);
    +      }else if( pOp->p5 & SQLITE_JUMPIFNULL ){
    +        pc = pOp->p2-1;
    +      }
    +      break;
    +    }
    +  }else{
    +    /* Neither operand is NULL.  Do a comparison. */
    +    u.ai.affinity = pOp->p5 & SQLITE_AFF_MASK;
    +    if( u.ai.affinity ){
    +      applyAffinity(pIn1, u.ai.affinity, encoding);
    +      applyAffinity(pIn3, u.ai.affinity, encoding);
    +      if( db->mallocFailed ) goto no_mem;
    +    }
    +
    +    assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 );
    +    ExpandBlob(pIn1);
    +    ExpandBlob(pIn3);
    +    u.ai.res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);
    +  }
    +  switch( pOp->opcode ){
    +    case OP_Eq:    u.ai.res = u.ai.res==0;     break;
    +    case OP_Ne:    u.ai.res = u.ai.res!=0;     break;
    +    case OP_Lt:    u.ai.res = u.ai.res<0;      break;
    +    case OP_Le:    u.ai.res = u.ai.res<=0;     break;
    +    case OP_Gt:    u.ai.res = u.ai.res>0;      break;
    +    default:       u.ai.res = u.ai.res>=0;     break;
    +  }
    +
    +  if( pOp->p5 & SQLITE_STOREP2 ){
    +    pOut = &p->aMem[pOp->p2];
    +    MemSetTypeFlag(pOut, MEM_Int);
    +    pOut->u.i = u.ai.res;
    +    REGISTER_TRACE(pOp->p2, pOut);
    +  }else if( u.ai.res ){
    +    pc = pOp->p2-1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Permutation * * * P4 *
    +**
    +** Set the permutation used by the OP_Compare operator to be the array
    +** of integers in P4.
    +**
    +** The permutation is only valid until the next OP_Permutation, OP_Compare,
    +** OP_Halt, or OP_ResultRow.  Typically the OP_Permutation should occur
    +** immediately prior to the OP_Compare.
    +*/
    +case OP_Permutation: {
    +  assert( pOp->p4type==P4_INTARRAY );
    +  assert( pOp->p4.ai );
    +  aPermute = pOp->p4.ai;
    +  break;
    +}
    +
    +/* Opcode: Compare P1 P2 P3 P4 *
    +**
    +** Compare to vectors of registers in reg(P1)..reg(P1+P3-1) (all this
    +** one "A") and in reg(P2)..reg(P2+P3-1) ("B").  Save the result of
    +** the comparison for use by the next OP_Jump instruct.
    +**
    +** P4 is a KeyInfo structure that defines collating sequences and sort
    +** orders for the comparison.  The permutation applies to registers
    +** only.  The KeyInfo elements are used sequentially.
    +**
    +** The comparison is a sort comparison, so NULLs compare equal,
    +** NULLs are less than numbers, numbers are less than strings,
    +** and strings are less than blobs.
    +*/
    +case OP_Compare: {
    +#if 0  /* local variables moved into u.aj */
    +  int n;
    +  int i;
    +  int p1;
    +  int p2;
    +  const KeyInfo *pKeyInfo;
    +  int idx;
    +  CollSeq *pColl;    /* Collating sequence to use on this term */
    +  int bRev;          /* True for DESCENDING sort order */
    +#endif /* local variables moved into u.aj */
    +
    +  u.aj.n = pOp->p3;
    +  u.aj.pKeyInfo = pOp->p4.pKeyInfo;
    +  assert( u.aj.n>0 );
    +  assert( u.aj.pKeyInfo!=0 );
    +  u.aj.p1 = pOp->p1;
    +  u.aj.p2 = pOp->p2;
    +#if SQLITE_DEBUG
    +  if( aPermute ){
    +    int k, mx = 0;
    +    for(k=0; k<u.aj.n; k++) if( aPermute[k]>mx ) mx = aPermute[k];
    +    assert( u.aj.p1>0 && u.aj.p1+mx<=p->nMem+1 );
    +    assert( u.aj.p2>0 && u.aj.p2+mx<=p->nMem+1 );
    +  }else{
    +    assert( u.aj.p1>0 && u.aj.p1+u.aj.n<=p->nMem+1 );
    +    assert( u.aj.p2>0 && u.aj.p2+u.aj.n<=p->nMem+1 );
    +  }
    +#endif /* SQLITE_DEBUG */
    +  for(u.aj.i=0; u.aj.i<u.aj.n; u.aj.i++){
    +    u.aj.idx = aPermute ? aPermute[u.aj.i] : u.aj.i;
    +    REGISTER_TRACE(u.aj.p1+u.aj.idx, &p->aMem[u.aj.p1+u.aj.idx]);
    +    REGISTER_TRACE(u.aj.p2+u.aj.idx, &p->aMem[u.aj.p2+u.aj.idx]);
    +    assert( u.aj.i<u.aj.pKeyInfo->nField );
    +    u.aj.pColl = u.aj.pKeyInfo->aColl[u.aj.i];
    +    u.aj.bRev = u.aj.pKeyInfo->aSortOrder[u.aj.i];
    +    iCompare = sqlite3MemCompare(&p->aMem[u.aj.p1+u.aj.idx], &p->aMem[u.aj.p2+u.aj.idx], u.aj.pColl);
    +    if( iCompare ){
    +      if( u.aj.bRev ) iCompare = -iCompare;
    +      break;
    +    }
    +  }
    +  aPermute = 0;
    +  break;
    +}
    +
    +/* Opcode: Jump P1 P2 P3 * *
    +**
    +** Jump to the instruction at address P1, P2, or P3 depending on whether
    +** in the most recent OP_Compare instruction the P1 vector was less than
    +** equal to, or greater than the P2 vector, respectively.
    +*/
    +case OP_Jump: {             /* jump */
    +  if( iCompare<0 ){
    +    pc = pOp->p1 - 1;
    +  }else if( iCompare==0 ){
    +    pc = pOp->p2 - 1;
    +  }else{
    +    pc = pOp->p3 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: And P1 P2 P3 * *
    +**
    +** Take the logical AND of the values in registers P1 and P2 and
    +** write the result into register P3.
    +**
    +** If either P1 or P2 is 0 (false) then the result is 0 even if
    +** the other input is NULL.  A NULL and true or two NULLs give
    +** a NULL output.
    +*/
    +/* Opcode: Or P1 P2 P3 * *
    +**
    +** Take the logical OR of the values in register P1 and P2 and
    +** store the answer in register P3.
    +**
    +** If either P1 or P2 is nonzero (true) then the result is 1 (true)
    +** even if the other input is NULL.  A NULL and false or two NULLs
    +** give a NULL output.
    +*/
    +case OP_And:              /* same as TK_AND, in1, in2, out3 */
    +case OP_Or: {             /* same as TK_OR, in1, in2, out3 */
    +#if 0  /* local variables moved into u.ak */
    +  int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
    +  int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
    +#endif /* local variables moved into u.ak */
    +
    +  if( pIn1->flags & MEM_Null ){
    +    u.ak.v1 = 2;
    +  }else{
    +    u.ak.v1 = sqlite3VdbeIntValue(pIn1)!=0;
    +  }
    +  if( pIn2->flags & MEM_Null ){
    +    u.ak.v2 = 2;
    +  }else{
    +    u.ak.v2 = sqlite3VdbeIntValue(pIn2)!=0;
    +  }
    +  if( pOp->opcode==OP_And ){
    +    static const unsigned char and_logic[] = { 0, 0, 0, 0, 1, 2, 0, 2, 2 };
    +    u.ak.v1 = and_logic[u.ak.v1*3+u.ak.v2];
    +  }else{
    +    static const unsigned char or_logic[] = { 0, 1, 2, 1, 1, 1, 2, 1, 2 };
    +    u.ak.v1 = or_logic[u.ak.v1*3+u.ak.v2];
    +  }
    +  if( u.ak.v1==2 ){
    +    MemSetTypeFlag(pOut, MEM_Null);
    +  }else{
    +    pOut->u.i = u.ak.v1;
    +    MemSetTypeFlag(pOut, MEM_Int);
    +  }
    +  break;
    +}
    +
    +/* Opcode: Not P1 P2 * * *
    +**
    +** Interpret the value in register P1 as a boolean value.  Store the
    +** boolean complement in register P2.  If the value in register P1 is 
    +** NULL, then a NULL is stored in P2.
    +*/
    +case OP_Not: {                /* same as TK_NOT, in1 */
    +  pOut = &p->aMem[pOp->p2];
    +  if( pIn1->flags & MEM_Null ){
    +    sqlite3VdbeMemSetNull(pOut);
    +  }else{
    +    sqlite3VdbeMemSetInt64(pOut, !sqlite3VdbeIntValue(pIn1));
    +  }
    +  break;
    +}
    +
    +/* Opcode: BitNot P1 P2 * * *
    +**
    +** Interpret the content of register P1 as an integer.  Store the
    +** ones-complement of the P1 value into register P2.  If P1 holds
    +** a NULL then store a NULL in P2.
    +*/
    +case OP_BitNot: {             /* same as TK_BITNOT, in1 */
    +  pOut = &p->aMem[pOp->p2];
    +  if( pIn1->flags & MEM_Null ){
    +    sqlite3VdbeMemSetNull(pOut);
    +  }else{
    +    sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1));
    +  }
    +  break;
    +}
    +
    +/* Opcode: If P1 P2 P3 * *
    +**
    +** Jump to P2 if the value in register P1 is true.  The value is
    +** is considered true if it is numeric and non-zero.  If the value
    +** in P1 is NULL then take the jump if P3 is true.
    +*/
    +/* Opcode: IfNot P1 P2 P3 * *
    +**
    +** Jump to P2 if the value in register P1 is False.  The value is
    +** is considered true if it has a numeric value of zero.  If the value
    +** in P1 is NULL then take the jump if P3 is true.
    +*/
    +case OP_If:                 /* jump, in1 */
    +case OP_IfNot: {            /* jump, in1 */
    +#if 0  /* local variables moved into u.al */
    +  int c;
    +#endif /* local variables moved into u.al */
    +  if( pIn1->flags & MEM_Null ){
    +    u.al.c = pOp->p3;
    +  }else{
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +    u.al.c = sqlite3VdbeIntValue(pIn1)!=0;
    +#else
    +    u.al.c = sqlite3VdbeRealValue(pIn1)!=0.0;
    +#endif
    +    if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c;
    +  }
    +  if( u.al.c ){
    +    pc = pOp->p2-1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: IsNull P1 P2 * * *
    +**
    +** Jump to P2 if the value in register P1 is NULL.
    +*/
    +case OP_IsNull: {            /* same as TK_ISNULL, jump, in1 */
    +  if( (pIn1->flags & MEM_Null)!=0 ){
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: NotNull P1 P2 * * *
    +**
    +** Jump to P2 if the value in register P1 is not NULL.  
    +*/
    +case OP_NotNull: {            /* same as TK_NOTNULL, jump, in1 */
    +  if( (pIn1->flags & MEM_Null)==0 ){
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Column P1 P2 P3 P4 P5
    +**
    +** Interpret the data that cursor P1 points to as a structure built using
    +** the MakeRecord instruction.  (See the MakeRecord opcode for additional
    +** information about the format of the data.)  Extract the P2-th column
    +** from this record.  If there are less that (P2+1) 
    +** values in the record, extract a NULL.
    +**
    +** The value extracted is stored in register P3.
    +**
    +** If the column contains fewer than P2 fields, then extract a NULL.  Or,
    +** if the P4 argument is a P4_MEM use the value of the P4 argument as
    +** the result.
    +**
    +** If the OPFLAG_CLEARCACHE bit is set on P5 and P1 is a pseudo-table cursor,
    +** then the cache of the cursor is reset prior to extracting the column.
    +** The first OP_Column against a pseudo-table after the value of the content
    +** register has changed should have this bit set.
    +*/
    +case OP_Column: {
    +#if 0  /* local variables moved into u.am */
    +  u32 payloadSize;   /* Number of bytes in the record */
    +  i64 payloadSize64; /* Number of bytes in the record */
    +  int p1;            /* P1 value of the opcode */
    +  int p2;            /* column number to retrieve */
    +  VdbeCursor *pC;    /* The VDBE cursor */
    +  char *zRec;        /* Pointer to complete record-data */
    +  BtCursor *pCrsr;   /* The BTree cursor */
    +  u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
    +  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
    +  int nField;        /* number of fields in the record */
    +  int len;           /* The length of the serialized data for the column */
    +  int i;             /* Loop counter */
    +  char *zData;       /* Part of the record being decoded */
    +  Mem *pDest;        /* Where to write the extracted value */
    +  Mem sMem;          /* For storing the record being decoded */
    +  u8 *zIdx;          /* Index into header */
    +  u8 *zEndHdr;       /* Pointer to first byte after the header */
    +  u32 offset;        /* Offset into the data */
    +  u64 offset64;      /* 64-bit offset.  64 bits needed to catch overflow */
    +  int szHdr;         /* Size of the header size field at start of record */
    +  int avail;         /* Number of bytes of available data */
    +  Mem *pReg;         /* PseudoTable input register */
    +#endif /* local variables moved into u.am */
    +
    +
    +  u.am.p1 = pOp->p1;
    +  u.am.p2 = pOp->p2;
    +  u.am.pC = 0;
    +  memset(&u.am.sMem, 0, sizeof(u.am.sMem));
    +  assert( u.am.p1<p->nCursor );
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  u.am.pDest = &p->aMem[pOp->p3];
    +  MemSetTypeFlag(u.am.pDest, MEM_Null);
    +  u.am.zRec = 0;
    +
    +  /* This block sets the variable u.am.payloadSize to be the total number of
    +  ** bytes in the record.
    +  **
    +  ** u.am.zRec is set to be the complete text of the record if it is available.
    +  ** The complete record text is always available for pseudo-tables
    +  ** If the record is stored in a cursor, the complete record text
    +  ** might be available in the  u.am.pC->aRow cache.  Or it might not be.
    +  ** If the data is unavailable,  u.am.zRec is set to NULL.
    +  **
    +  ** We also compute the number of columns in the record.  For cursors,
    +  ** the number of columns is stored in the VdbeCursor.nField element.
    +  */
    +  u.am.pC = p->apCsr[u.am.p1];
    +  assert( u.am.pC!=0 );
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  assert( u.am.pC->pVtabCursor==0 );
    +#endif
    +  u.am.pCrsr = u.am.pC->pCursor;
    +  if( u.am.pCrsr!=0 ){
    +    /* The record is stored in a B-Tree */
    +    rc = sqlite3VdbeCursorMoveto(u.am.pC);
    +    if( rc ) goto abort_due_to_error;
    +    if( u.am.pC->nullRow ){
    +      u.am.payloadSize = 0;
    +    }else if( u.am.pC->cacheStatus==p->cacheCtr ){
    +      u.am.payloadSize = u.am.pC->payloadSize;
    +      u.am.zRec = (char*)u.am.pC->aRow;
    +    }else if( u.am.pC->isIndex ){
    +      assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
    +      rc = sqlite3BtreeKeySize(u.am.pCrsr, &u.am.payloadSize64);
    +      assert( rc==SQLITE_OK );   /* True because of CursorMoveto() call above */
    +      /* sqlite3BtreeParseCellPtr() uses getVarint32() to extract the
    +      ** payload size, so it is impossible for u.am.payloadSize64 to be
    +      ** larger than 32 bits. */
    +      assert( (u.am.payloadSize64 & SQLITE_MAX_U32)==(u64)u.am.payloadSize64 );
    +      u.am.payloadSize = (u32)u.am.payloadSize64;
    +    }else{
    +      assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
    +      rc = sqlite3BtreeDataSize(u.am.pCrsr, &u.am.payloadSize);
    +      assert( rc==SQLITE_OK );   /* DataSize() cannot fail */
    +    }
    +  }else if( u.am.pC->pseudoTableReg>0 ){
    +    u.am.pReg = &p->aMem[u.am.pC->pseudoTableReg];
    +    assert( u.am.pReg->flags & MEM_Blob );
    +    u.am.payloadSize = u.am.pReg->n;
    +    u.am.zRec = u.am.pReg->z;
    +    u.am.pC->cacheStatus = (pOp->p5&OPFLAG_CLEARCACHE) ? CACHE_STALE : p->cacheCtr;
    +    assert( u.am.payloadSize==0 || u.am.zRec!=0 );
    +  }else{
    +    /* Consider the row to be NULL */
    +    u.am.payloadSize = 0;
    +  }
    +
    +  /* If u.am.payloadSize is 0, then just store a NULL */
    +  if( u.am.payloadSize==0 ){
    +    assert( u.am.pDest->flags&MEM_Null );
    +    goto op_column_out;
    +  }
    +  assert( db->aLimit[SQLITE_LIMIT_LENGTH]>=0 );
    +  if( u.am.payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    goto too_big;
    +  }
    +
    +  u.am.nField = u.am.pC->nField;
    +  assert( u.am.p2<u.am.nField );
    +
    +  /* Read and parse the table header.  Store the results of the parse
    +  ** into the record header cache fields of the cursor.
    +  */
    +  u.am.aType = u.am.pC->aType;
    +  if( u.am.pC->cacheStatus==p->cacheCtr ){
    +    u.am.aOffset = u.am.pC->aOffset;
    +  }else{
    +    assert(u.am.aType);
    +    u.am.avail = 0;
    +    u.am.pC->aOffset = u.am.aOffset = &u.am.aType[u.am.nField];
    +    u.am.pC->payloadSize = u.am.payloadSize;
    +    u.am.pC->cacheStatus = p->cacheCtr;
    +
    +    /* Figure out how many bytes are in the header */
    +    if( u.am.zRec ){
    +      u.am.zData = u.am.zRec;
    +    }else{
    +      if( u.am.pC->isIndex ){
    +        u.am.zData = (char*)sqlite3BtreeKeyFetch(u.am.pCrsr, &u.am.avail);
    +      }else{
    +        u.am.zData = (char*)sqlite3BtreeDataFetch(u.am.pCrsr, &u.am.avail);
    +      }
    +      /* If KeyFetch()/DataFetch() managed to get the entire payload,
    +      ** save the payload in the u.am.pC->aRow cache.  That will save us from
    +      ** having to make additional calls to fetch the content portion of
    +      ** the record.
    +      */
    +      assert( u.am.avail>=0 );
    +      if( u.am.payloadSize <= (u32)u.am.avail ){
    +        u.am.zRec = u.am.zData;
    +        u.am.pC->aRow = (u8*)u.am.zData;
    +      }else{
    +        u.am.pC->aRow = 0;
    +      }
    +    }
    +    /* The following assert is true in all cases accept when
    +    ** the database file has been corrupted externally.
    +    **    assert( u.am.zRec!=0 || u.am.avail>=u.am.payloadSize || u.am.avail>=9 ); */
    +    u.am.szHdr = getVarint32((u8*)u.am.zData, u.am.offset);
    +
    +    /* Make sure a corrupt database has not given us an oversize header.
    +    ** Do this now to avoid an oversize memory allocation.
    +    **
    +    ** Type entries can be between 1 and 5 bytes each.  But 4 and 5 byte
    +    ** types use so much data space that there can only be 4096 and 32 of
    +    ** them, respectively.  So the maximum header length results from a
    +    ** 3-byte type for each of the maximum of 32768 columns plus three
    +    ** extra bytes for the header length itself.  32768*3 + 3 = 98307.
    +    */
    +    if( u.am.offset > 98307 ){
    +      rc = SQLITE_CORRUPT_BKPT;
    +      goto op_column_out;
    +    }
    +
    +    /* Compute in u.am.len the number of bytes of data we need to read in order
    +    ** to get u.am.nField type values.  u.am.offset is an upper bound on this.  But
    +    ** u.am.nField might be significantly less than the true number of columns
    +    ** in the table, and in that case, 5*u.am.nField+3 might be smaller than u.am.offset.
    +    ** We want to minimize u.am.len in order to limit the size of the memory
    +    ** allocation, especially if a corrupt database file has caused u.am.offset
    +    ** to be oversized. Offset is limited to 98307 above.  But 98307 might
    +    ** still exceed Robson memory allocation limits on some configurations.
    +    ** On systems that cannot tolerate large memory allocations, u.am.nField*5+3
    +    ** will likely be much smaller since u.am.nField will likely be less than
    +    ** 20 or so.  This insures that Robson memory allocation limits are
    +    ** not exceeded even for corrupt database files.
    +    */
    +    u.am.len = u.am.nField*5 + 3;
    +    if( u.am.len > (int)u.am.offset ) u.am.len = (int)u.am.offset;
    +
    +    /* The KeyFetch() or DataFetch() above are fast and will get the entire
    +    ** record header in most cases.  But they will fail to get the complete
    +    ** record header if the record header does not fit on a single page
    +    ** in the B-Tree.  When that happens, use sqlite3VdbeMemFromBtree() to
    +    ** acquire the complete header text.
    +    */
    +    if( !u.am.zRec && u.am.avail<u.am.len ){
    +      u.am.sMem.flags = 0;
    +      u.am.sMem.db = 0;
    +      rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, 0, u.am.len, u.am.pC->isIndex, &u.am.sMem);
    +      if( rc!=SQLITE_OK ){
    +        goto op_column_out;
    +      }
    +      u.am.zData = u.am.sMem.z;
    +    }
    +    u.am.zEndHdr = (u8 *)&u.am.zData[u.am.len];
    +    u.am.zIdx = (u8 *)&u.am.zData[u.am.szHdr];
    +
    +    /* Scan the header and use it to fill in the u.am.aType[] and u.am.aOffset[]
    +    ** arrays.  u.am.aType[u.am.i] will contain the type integer for the u.am.i-th
    +    ** column and u.am.aOffset[u.am.i] will contain the u.am.offset from the beginning
    +    ** of the record to the start of the data for the u.am.i-th column
    +    */
    +    u.am.offset64 = u.am.offset;
    +    for(u.am.i=0; u.am.i<u.am.nField; u.am.i++){
    +      if( u.am.zIdx<u.am.zEndHdr ){
    +        u.am.aOffset[u.am.i] = (u32)u.am.offset64;
    +        u.am.zIdx += getVarint32(u.am.zIdx, u.am.aType[u.am.i]);
    +        u.am.offset64 += sqlite3VdbeSerialTypeLen(u.am.aType[u.am.i]);
    +      }else{
    +        /* If u.am.i is less that u.am.nField, then there are less fields in this
    +        ** record than SetNumColumns indicated there are columns in the
    +        ** table. Set the u.am.offset for any extra columns not present in
    +        ** the record to 0. This tells code below to store a NULL
    +        ** instead of deserializing a value from the record.
    +        */
    +        u.am.aOffset[u.am.i] = 0;
    +      }
    +    }
    +    sqlite3VdbeMemRelease(&u.am.sMem);
    +    u.am.sMem.flags = MEM_Null;
    +
    +    /* If we have read more header data than was contained in the header,
    +    ** or if the end of the last field appears to be past the end of the
    +    ** record, or if the end of the last field appears to be before the end
    +    ** of the record (when all fields present), then we must be dealing
    +    ** with a corrupt database.
    +    */
    +    if( (u.am.zIdx > u.am.zEndHdr)|| (u.am.offset64 > u.am.payloadSize)
    +     || (u.am.zIdx==u.am.zEndHdr && u.am.offset64!=(u64)u.am.payloadSize) ){
    +      rc = SQLITE_CORRUPT_BKPT;
    +      goto op_column_out;
    +    }
    +  }
    +
    +  /* Get the column information. If u.am.aOffset[u.am.p2] is non-zero, then
    +  ** deserialize the value from the record. If u.am.aOffset[u.am.p2] is zero,
    +  ** then there are not enough fields in the record to satisfy the
    +  ** request.  In this case, set the value NULL or to P4 if P4 is
    +  ** a pointer to a Mem object.
    +  */
    +  if( u.am.aOffset[u.am.p2] ){
    +    assert( rc==SQLITE_OK );
    +    if( u.am.zRec ){
    +      sqlite3VdbeMemReleaseExternal(u.am.pDest);
    +      sqlite3VdbeSerialGet((u8 *)&u.am.zRec[u.am.aOffset[u.am.p2]], u.am.aType[u.am.p2], u.am.pDest);
    +    }else{
    +      u.am.len = sqlite3VdbeSerialTypeLen(u.am.aType[u.am.p2]);
    +      sqlite3VdbeMemMove(&u.am.sMem, u.am.pDest);
    +      rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, u.am.aOffset[u.am.p2], u.am.len, u.am.pC->isIndex, &u.am.sMem);
    +      if( rc!=SQLITE_OK ){
    +        goto op_column_out;
    +      }
    +      u.am.zData = u.am.sMem.z;
    +      sqlite3VdbeSerialGet((u8*)u.am.zData, u.am.aType[u.am.p2], u.am.pDest);
    +    }
    +    u.am.pDest->enc = encoding;
    +  }else{
    +    if( pOp->p4type==P4_MEM ){
    +      sqlite3VdbeMemShallowCopy(u.am.pDest, pOp->p4.pMem, MEM_Static);
    +    }else{
    +      assert( u.am.pDest->flags&MEM_Null );
    +    }
    +  }
    +
    +  /* If we dynamically allocated space to hold the data (in the
    +  ** sqlite3VdbeMemFromBtree() call above) then transfer control of that
    +  ** dynamically allocated space over to the u.am.pDest structure.
    +  ** This prevents a memory copy.
    +  */
    +  if( u.am.sMem.zMalloc ){
    +    assert( u.am.sMem.z==u.am.sMem.zMalloc );
    +    assert( !(u.am.pDest->flags & MEM_Dyn) );
    +    assert( !(u.am.pDest->flags & (MEM_Blob|MEM_Str)) || u.am.pDest->z==u.am.sMem.z );
    +    u.am.pDest->flags &= ~(MEM_Ephem|MEM_Static);
    +    u.am.pDest->flags |= MEM_Term;
    +    u.am.pDest->z = u.am.sMem.z;
    +    u.am.pDest->zMalloc = u.am.sMem.zMalloc;
    +  }
    +
    +  rc = sqlite3VdbeMemMakeWriteable(u.am.pDest);
    +
    +op_column_out:
    +  UPDATE_MAX_BLOBSIZE(u.am.pDest);
    +  REGISTER_TRACE(pOp->p3, u.am.pDest);
    +  break;
    +}
    +
    +/* Opcode: Affinity P1 P2 * P4 *
    +**
    +** Apply affinities to a range of P2 registers starting with P1.
    +**
    +** P4 is a string that is P2 characters long. The nth character of the
    +** string indicates the column affinity that should be used for the nth
    +** memory cell in the range.
    +*/
    +case OP_Affinity: {
    +#if 0  /* local variables moved into u.an */
    +  char *zAffinity;   /* The affinity to be applied */
    +  Mem *pData0;       /* First register to which to apply affinity */
    +  Mem *pLast;        /* Last register to which to apply affinity */
    +  Mem *pRec;         /* Current register */
    +#endif /* local variables moved into u.an */
    +
    +  u.an.zAffinity = pOp->p4.z;
    +  u.an.pData0 = &p->aMem[pOp->p1];
    +  u.an.pLast = &u.an.pData0[pOp->p2-1];
    +  for(u.an.pRec=u.an.pData0; u.an.pRec<=u.an.pLast; u.an.pRec++){
    +    ExpandBlob(u.an.pRec);
    +    applyAffinity(u.an.pRec, u.an.zAffinity[u.an.pRec-u.an.pData0], encoding);
    +  }
    +  break;
    +}
    +
    +/* Opcode: MakeRecord P1 P2 P3 P4 *
    +**
    +** Convert P2 registers beginning with P1 into a single entry
    +** suitable for use as a data record in a database table or as a key
    +** in an index.  The details of the format are irrelevant as long as
    +** the OP_Column opcode can decode the record later.
    +** Refer to source code comments for the details of the record
    +** format.
    +**
    +** P4 may be a string that is P2 characters long.  The nth character of the
    +** string indicates the column affinity that should be used for the nth
    +** field of the index key.
    +**
    +** The mapping from character to affinity is given by the SQLITE_AFF_
    +** macros defined in sqliteInt.h.
    +**
    +** If P4 is NULL then all index fields have the affinity NONE.
    +*/
    +case OP_MakeRecord: {
    +#if 0  /* local variables moved into u.ao */
    +  u8 *zNewRecord;        /* A buffer to hold the data for the new record */
    +  Mem *pRec;             /* The new record */
    +  u64 nData;             /* Number of bytes of data space */
    +  int nHdr;              /* Number of bytes of header space */
    +  i64 nByte;             /* Data space required for this record */
    +  int nZero;             /* Number of zero bytes at the end of the record */
    +  int nVarint;           /* Number of bytes in a varint */
    +  u32 serial_type;       /* Type field */
    +  Mem *pData0;           /* First field to be combined into the record */
    +  Mem *pLast;            /* Last field of the record */
    +  int nField;            /* Number of fields in the record */
    +  char *zAffinity;       /* The affinity string for the record */
    +  int file_format;       /* File format to use for encoding */
    +  int i;                 /* Space used in zNewRecord[] */
    +  int len;               /* Length of a field */
    +#endif /* local variables moved into u.ao */
    +
    +  /* Assuming the record contains N fields, the record format looks
    +  ** like this:
    +  **
    +  ** ------------------------------------------------------------------------
    +  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
    +  ** ------------------------------------------------------------------------
    +  **
    +  ** Data(0) is taken from register P1.  Data(1) comes from register P1+1
    +  ** and so froth.
    +  **
    +  ** Each type field is a varint representing the serial type of the
    +  ** corresponding data element (see sqlite3VdbeSerialType()). The
    +  ** hdr-size field is also a varint which is the offset from the beginning
    +  ** of the record to data0.
    +  */
    +  u.ao.nData = 0;         /* Number of bytes of data space */
    +  u.ao.nHdr = 0;          /* Number of bytes of header space */
    +  u.ao.nByte = 0;         /* Data space required for this record */
    +  u.ao.nZero = 0;         /* Number of zero bytes at the end of the record */
    +  u.ao.nField = pOp->p1;
    +  u.ao.zAffinity = pOp->p4.z;
    +  assert( u.ao.nField>0 && pOp->p2>0 && pOp->p2+u.ao.nField<=p->nMem+1 );
    +  u.ao.pData0 = &p->aMem[u.ao.nField];
    +  u.ao.nField = pOp->p2;
    +  u.ao.pLast = &u.ao.pData0[u.ao.nField-1];
    +  u.ao.file_format = p->minWriteFileFormat;
    +
    +  /* Loop through the elements that will make up the record to figure
    +  ** out how much space is required for the new record.
    +  */
    +  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){
    +    if( u.ao.zAffinity ){
    +      applyAffinity(u.ao.pRec, u.ao.zAffinity[u.ao.pRec-u.ao.pData0], encoding);
    +    }
    +    if( u.ao.pRec->flags&MEM_Zero && u.ao.pRec->n>0 ){
    +      sqlite3VdbeMemExpandBlob(u.ao.pRec);
    +    }
    +    u.ao.serial_type = sqlite3VdbeSerialType(u.ao.pRec, u.ao.file_format);
    +    u.ao.len = sqlite3VdbeSerialTypeLen(u.ao.serial_type);
    +    u.ao.nData += u.ao.len;
    +    u.ao.nHdr += sqlite3VarintLen(u.ao.serial_type);
    +    if( u.ao.pRec->flags & MEM_Zero ){
    +      /* Only pure zero-filled BLOBs can be input to this Opcode.
    +      ** We do not allow blobs with a prefix and a zero-filled tail. */
    +      u.ao.nZero += u.ao.pRec->u.nZero;
    +    }else if( u.ao.len ){
    +      u.ao.nZero = 0;
    +    }
    +  }
    +
    +  /* Add the initial header varint and total the size */
    +  u.ao.nHdr += u.ao.nVarint = sqlite3VarintLen(u.ao.nHdr);
    +  if( u.ao.nVarint<sqlite3VarintLen(u.ao.nHdr) ){
    +    u.ao.nHdr++;
    +  }
    +  u.ao.nByte = u.ao.nHdr+u.ao.nData-u.ao.nZero;
    +  if( u.ao.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    goto too_big;
    +  }
    +
    +  /* Make sure the output register has a buffer large enough to store
    +  ** the new record. The output register (pOp->p3) is not allowed to
    +  ** be one of the input registers (because the following call to
    +  ** sqlite3VdbeMemGrow() could clobber the value before it is used).
    +  */
    +  assert( pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2 );
    +  pOut = &p->aMem[pOp->p3];
    +  if( sqlite3VdbeMemGrow(pOut, (int)u.ao.nByte, 0) ){
    +    goto no_mem;
    +  }
    +  u.ao.zNewRecord = (u8 *)pOut->z;
    +
    +  /* Write the record */
    +  u.ao.i = putVarint32(u.ao.zNewRecord, u.ao.nHdr);
    +  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){
    +    u.ao.serial_type = sqlite3VdbeSerialType(u.ao.pRec, u.ao.file_format);
    +    u.ao.i += putVarint32(&u.ao.zNewRecord[u.ao.i], u.ao.serial_type);      /* serial type */
    +  }
    +  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){  /* serial data */
    +    u.ao.i += sqlite3VdbeSerialPut(&u.ao.zNewRecord[u.ao.i], (int)(u.ao.nByte-u.ao.i), u.ao.pRec,u.ao.file_format);
    +  }
    +  assert( u.ao.i==u.ao.nByte );
    +
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  pOut->n = (int)u.ao.nByte;
    +  pOut->flags = MEM_Blob | MEM_Dyn;
    +  pOut->xDel = 0;
    +  if( u.ao.nZero ){
    +    pOut->u.nZero = u.ao.nZero;
    +    pOut->flags |= MEM_Zero;
    +  }
    +  pOut->enc = SQLITE_UTF8;  /* In case the blob is ever converted to text */
    +  REGISTER_TRACE(pOp->p3, pOut);
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: Count P1 P2 * * *
    +**
    +** Store the number of entries (an integer value) in the table or index 
    +** opened by cursor P1 in register P2
    +*/
    +#ifndef SQLITE_OMIT_BTREECOUNT
    +case OP_Count: {         /* out2-prerelease */
    +#if 0  /* local variables moved into u.ap */
    +  i64 nEntry;
    +  BtCursor *pCrsr;
    +#endif /* local variables moved into u.ap */
    +
    +  u.ap.pCrsr = p->apCsr[pOp->p1]->pCursor;
    +  if( u.ap.pCrsr ){
    +    rc = sqlite3BtreeCount(u.ap.pCrsr, &u.ap.nEntry);
    +  }else{
    +    u.ap.nEntry = 0;
    +  }
    +  pOut->flags = MEM_Int;
    +  pOut->u.i = u.ap.nEntry;
    +  break;
    +}
    +#endif
    +
    +/* Opcode: Savepoint P1 * * P4 *
    +**
    +** Open, release or rollback the savepoint named by parameter P4, depending
    +** on the value of P1. To open a new savepoint, P1==0. To release (commit) an
    +** existing savepoint, P1==1, or to rollback an existing savepoint P1==2.
    +*/
    +case OP_Savepoint: {
    +#if 0  /* local variables moved into u.aq */
    +  int p1;                         /* Value of P1 operand */
    +  char *zName;                    /* Name of savepoint */
    +  int nName;
    +  Savepoint *pNew;
    +  Savepoint *pSavepoint;
    +  Savepoint *pTmp;
    +  int iSavepoint;
    +  int ii;
    +#endif /* local variables moved into u.aq */
    +
    +  u.aq.p1 = pOp->p1;
    +  u.aq.zName = pOp->p4.z;
    +
    +  /* Assert that the u.aq.p1 parameter is valid. Also that if there is no open
    +  ** transaction, then there cannot be any savepoints.
    +  */
    +  assert( db->pSavepoint==0 || db->autoCommit==0 );
    +  assert( u.aq.p1==SAVEPOINT_BEGIN||u.aq.p1==SAVEPOINT_RELEASE||u.aq.p1==SAVEPOINT_ROLLBACK );
    +  assert( db->pSavepoint || db->isTransactionSavepoint==0 );
    +  assert( checkSavepointCount(db) );
    +
    +  if( u.aq.p1==SAVEPOINT_BEGIN ){
    +    if( db->writeVdbeCnt>0 ){
    +      /* A new savepoint cannot be created if there are active write
    +      ** statements (i.e. open read/write incremental blob handles).
    +      */
    +      sqlite3SetString(&p->zErrMsg, db, "cannot open savepoint - "
    +        "SQL statements in progress");
    +      rc = SQLITE_BUSY;
    +    }else{
    +      u.aq.nName = sqlite3Strlen30(u.aq.zName);
    +
    +      /* Create a new savepoint structure. */
    +      u.aq.pNew = sqlite3DbMallocRaw(db, sizeof(Savepoint)+u.aq.nName+1);
    +      if( u.aq.pNew ){
    +        u.aq.pNew->zName = (char *)&u.aq.pNew[1];
    +        memcpy(u.aq.pNew->zName, u.aq.zName, u.aq.nName+1);
    +
    +        /* If there is no open transaction, then mark this as a special
    +        ** "transaction savepoint". */
    +        if( db->autoCommit ){
    +          db->autoCommit = 0;
    +          db->isTransactionSavepoint = 1;
    +        }else{
    +          db->nSavepoint++;
    +        }
    +
    +        /* Link the new savepoint into the database handle's list. */
    +        u.aq.pNew->pNext = db->pSavepoint;
    +        db->pSavepoint = u.aq.pNew;
    +        u.aq.pNew->nDeferredCons = db->nDeferredCons;
    +      }
    +    }
    +  }else{
    +    u.aq.iSavepoint = 0;
    +
    +    /* Find the named savepoint. If there is no such savepoint, then an
    +    ** an error is returned to the user.  */
    +    for(
    +      u.aq.pSavepoint = db->pSavepoint;
    +      u.aq.pSavepoint && sqlite3StrICmp(u.aq.pSavepoint->zName, u.aq.zName);
    +      u.aq.pSavepoint = u.aq.pSavepoint->pNext
    +    ){
    +      u.aq.iSavepoint++;
    +    }
    +    if( !u.aq.pSavepoint ){
    +      sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", u.aq.zName);
    +      rc = SQLITE_ERROR;
    +    }else if(
    +        db->writeVdbeCnt>0 || (u.aq.p1==SAVEPOINT_ROLLBACK && db->activeVdbeCnt>1)
    +    ){
    +      /* It is not possible to release (commit) a savepoint if there are
    +      ** active write statements. It is not possible to rollback a savepoint
    +      ** if there are any active statements at all.
    +      */
    +      sqlite3SetString(&p->zErrMsg, db,
    +        "cannot %s savepoint - SQL statements in progress",
    +        (u.aq.p1==SAVEPOINT_ROLLBACK ? "rollback": "release")
    +      );
    +      rc = SQLITE_BUSY;
    +    }else{
    +
    +      /* Determine whether or not this is a transaction savepoint. If so,
    +      ** and this is a RELEASE command, then the current transaction
    +      ** is committed.
    +      */
    +      int isTransaction = u.aq.pSavepoint->pNext==0 && db->isTransactionSavepoint;
    +      if( isTransaction && u.aq.p1==SAVEPOINT_RELEASE ){
    +        if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
    +          goto vdbe_return;
    +        }
    +        db->autoCommit = 1;
    +        if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
    +          p->pc = pc;
    +          db->autoCommit = 0;
    +          p->rc = rc = SQLITE_BUSY;
    +          goto vdbe_return;
    +        }
    +        db->isTransactionSavepoint = 0;
    +        rc = p->rc;
    +      }else{
    +        u.aq.iSavepoint = db->nSavepoint - u.aq.iSavepoint - 1;
    +        for(u.aq.ii=0; u.aq.ii<db->nDb; u.aq.ii++){
    +          rc = sqlite3BtreeSavepoint(db->aDb[u.aq.ii].pBt, u.aq.p1, u.aq.iSavepoint);
    +          if( rc!=SQLITE_OK ){
    +            goto abort_due_to_error;
    +          }
    +        }
    +        if( u.aq.p1==SAVEPOINT_ROLLBACK && (db->flags&SQLITE_InternChanges)!=0 ){
    +          sqlite3ExpirePreparedStatements(db);
    +          sqlite3ResetInternalSchema(db, 0);
    +        }
    +      }
    +
    +      /* Regardless of whether this is a RELEASE or ROLLBACK, destroy all
    +      ** savepoints nested inside of the savepoint being operated on. */
    +      while( db->pSavepoint!=u.aq.pSavepoint ){
    +        u.aq.pTmp = db->pSavepoint;
    +        db->pSavepoint = u.aq.pTmp->pNext;
    +        sqlite3DbFree(db, u.aq.pTmp);
    +        db->nSavepoint--;
    +      }
    +
    +      /* If it is a RELEASE, then destroy the savepoint being operated on
    +      ** too. If it is a ROLLBACK TO, then set the number of deferred
    +      ** constraint violations present in the database to the value stored
    +      ** when the savepoint was created.  */
    +      if( u.aq.p1==SAVEPOINT_RELEASE ){
    +        assert( u.aq.pSavepoint==db->pSavepoint );
    +        db->pSavepoint = u.aq.pSavepoint->pNext;
    +        sqlite3DbFree(db, u.aq.pSavepoint);
    +        if( !isTransaction ){
    +          db->nSavepoint--;
    +        }
    +      }else{
    +        db->nDeferredCons = u.aq.pSavepoint->nDeferredCons;
    +      }
    +    }
    +  }
    +
    +  break;
    +}
    +
    +/* Opcode: AutoCommit P1 P2 * * *
    +**
    +** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
    +** back any currently active btree transactions. If there are any active
    +** VMs (apart from this one), then a ROLLBACK fails.  A COMMIT fails if
    +** there are active writing VMs or active VMs that use shared cache.
    +**
    +** This instruction causes the VM to halt.
    +*/
    +case OP_AutoCommit: {
    +#if 0  /* local variables moved into u.ar */
    +  int desiredAutoCommit;
    +  int iRollback;
    +  int turnOnAC;
    +#endif /* local variables moved into u.ar */
    +
    +  u.ar.desiredAutoCommit = pOp->p1;
    +  u.ar.iRollback = pOp->p2;
    +  u.ar.turnOnAC = u.ar.desiredAutoCommit && !db->autoCommit;
    +  assert( u.ar.desiredAutoCommit==1 || u.ar.desiredAutoCommit==0 );
    +  assert( u.ar.desiredAutoCommit==1 || u.ar.iRollback==0 );
    +  assert( db->activeVdbeCnt>0 );  /* At least this one VM is active */
    +
    +  if( u.ar.turnOnAC && u.ar.iRollback && db->activeVdbeCnt>1 ){
    +    /* If this instruction implements a ROLLBACK and other VMs are
    +    ** still running, and a transaction is active, return an error indicating
    +    ** that the other VMs must complete first.
    +    */
    +    sqlite3SetString(&p->zErrMsg, db, "cannot rollback transaction - "
    +        "SQL statements in progress");
    +    rc = SQLITE_BUSY;
    +  }else if( u.ar.turnOnAC && !u.ar.iRollback && db->writeVdbeCnt>0 ){
    +    /* If this instruction implements a COMMIT and other VMs are writing
    +    ** return an error indicating that the other VMs must complete first.
    +    */
    +    sqlite3SetString(&p->zErrMsg, db, "cannot commit transaction - "
    +        "SQL statements in progress");
    +    rc = SQLITE_BUSY;
    +  }else if( u.ar.desiredAutoCommit!=db->autoCommit ){
    +    if( u.ar.iRollback ){
    +      assert( u.ar.desiredAutoCommit==1 );
    +      sqlite3RollbackAll(db);
    +      db->autoCommit = 1;
    +    }else if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
    +      goto vdbe_return;
    +    }else{
    +      db->autoCommit = (u8)u.ar.desiredAutoCommit;
    +      if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
    +        p->pc = pc;
    +        db->autoCommit = (u8)(1-u.ar.desiredAutoCommit);
    +        p->rc = rc = SQLITE_BUSY;
    +        goto vdbe_return;
    +      }
    +    }
    +    assert( db->nStatement==0 );
    +    sqlite3CloseSavepoints(db);
    +    if( p->rc==SQLITE_OK ){
    +      rc = SQLITE_DONE;
    +    }else{
    +      rc = SQLITE_ERROR;
    +    }
    +    goto vdbe_return;
    +  }else{
    +    sqlite3SetString(&p->zErrMsg, db,
    +        (!u.ar.desiredAutoCommit)?"cannot start a transaction within a transaction":(
    +        (u.ar.iRollback)?"cannot rollback - no transaction is active":
    +                   "cannot commit - no transaction is active"));
    +
    +    rc = SQLITE_ERROR;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Transaction P1 P2 * * *
    +**
    +** Begin a transaction.  The transaction ends when a Commit or Rollback
    +** opcode is encountered.  Depending on the ON CONFLICT setting, the
    +** transaction might also be rolled back if an error is encountered.
    +**
    +** P1 is the index of the database file on which the transaction is
    +** started.  Index 0 is the main database file and index 1 is the
    +** file used for temporary tables.  Indices of 2 or more are used for
    +** attached databases.
    +**
    +** If P2 is non-zero, then a write-transaction is started.  A RESERVED lock is
    +** obtained on the database file when a write-transaction is started.  No
    +** other process can start another write transaction while this transaction is
    +** underway.  Starting a write transaction also creates a rollback journal. A
    +** write transaction must be started before any changes can be made to the
    +** database.  If P2 is 2 or greater then an EXCLUSIVE lock is also obtained
    +** on the file.
    +**
    +** If a write-transaction is started and the Vdbe.usesStmtJournal flag is
    +** true (this flag is set if the Vdbe may modify more than one row and may
    +** throw an ABORT exception), a statement transaction may also be opened.
    +** More specifically, a statement transaction is opened iff the database
    +** connection is currently not in autocommit mode, or if there are other
    +** active statements. A statement transaction allows the affects of this
    +** VDBE to be rolled back after an error without having to roll back the
    +** entire transaction. If no error is encountered, the statement transaction
    +** will automatically commit when the VDBE halts.
    +**
    +** If P2 is zero, then a read-lock is obtained on the database file.
    +*/
    +case OP_Transaction: {
    +#if 0  /* local variables moved into u.as */
    +  Btree *pBt;
    +#endif /* local variables moved into u.as */
    +
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p1))!=0 );
    +  u.as.pBt = db->aDb[pOp->p1].pBt;
    +
    +  if( u.as.pBt ){
    +    rc = sqlite3BtreeBeginTrans(u.as.pBt, pOp->p2);
    +    if( rc==SQLITE_BUSY ){
    +      p->pc = pc;
    +      p->rc = rc = SQLITE_BUSY;
    +      goto vdbe_return;
    +    }
    +    if( rc!=SQLITE_OK ){
    +      goto abort_due_to_error;
    +    }
    +
    +    if( pOp->p2 && p->usesStmtJournal
    +     && (db->autoCommit==0 || db->activeVdbeCnt>1)
    +    ){
    +      assert( sqlite3BtreeIsInTrans(u.as.pBt) );
    +      if( p->iStatement==0 ){
    +        assert( db->nStatement>=0 && db->nSavepoint>=0 );
    +        db->nStatement++;
    +        p->iStatement = db->nSavepoint + db->nStatement;
    +      }
    +      rc = sqlite3BtreeBeginStmt(u.as.pBt, p->iStatement);
    +
    +      /* Store the current value of the database handles deferred constraint
    +      ** counter. If the statement transaction needs to be rolled back,
    +      ** the value of this counter needs to be restored too.  */
    +      p->nStmtDefCons = db->nDeferredCons;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: ReadCookie P1 P2 P3 * *
    +**
    +** Read cookie number P3 from database P1 and write it into register P2.
    +** P3==1 is the schema version.  P3==2 is the database format.
    +** P3==3 is the recommended pager cache size, and so forth.  P1==0 is
    +** the main database file and P1==1 is the database file used to store
    +** temporary tables.
    +**
    +** There must be a read-lock on the database (either a transaction
    +** must be started or there must be an open cursor) before
    +** executing this instruction.
    +*/
    +case OP_ReadCookie: {               /* out2-prerelease */
    +#if 0  /* local variables moved into u.at */
    +  int iMeta;
    +  int iDb;
    +  int iCookie;
    +#endif /* local variables moved into u.at */
    +
    +  u.at.iDb = pOp->p1;
    +  u.at.iCookie = pOp->p3;
    +  assert( pOp->p3<SQLITE_N_BTREE_META );
    +  assert( u.at.iDb>=0 && u.at.iDb<db->nDb );
    +  assert( db->aDb[u.at.iDb].pBt!=0 );
    +  assert( (p->btreeMask & (1<<u.at.iDb))!=0 );
    +
    +  sqlite3BtreeGetMeta(db->aDb[u.at.iDb].pBt, u.at.iCookie, (u32 *)&u.at.iMeta);
    +  pOut->u.i = u.at.iMeta;
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  break;
    +}
    +
    +/* Opcode: SetCookie P1 P2 P3 * *
    +**
    +** Write the content of register P3 (interpreted as an integer)
    +** into cookie number P2 of database P1.  P2==1 is the schema version.  
    +** P2==2 is the database format. P2==3 is the recommended pager cache 
    +** size, and so forth.  P1==0 is the main database file and P1==1 is the 
    +** database file used to store temporary tables.
    +**
    +** A transaction must be started before executing this opcode.
    +*/
    +case OP_SetCookie: {       /* in3 */
    +#if 0  /* local variables moved into u.au */
    +  Db *pDb;
    +#endif /* local variables moved into u.au */
    +  assert( pOp->p2<SQLITE_N_BTREE_META );
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p1))!=0 );
    +  u.au.pDb = &db->aDb[pOp->p1];
    +  assert( u.au.pDb->pBt!=0 );
    +  sqlite3VdbeMemIntegerify(pIn3);
    +  /* See note about index shifting on OP_ReadCookie */
    +  rc = sqlite3BtreeUpdateMeta(u.au.pDb->pBt, pOp->p2, (int)pIn3->u.i);
    +  if( pOp->p2==BTREE_SCHEMA_VERSION ){
    +    /* When the schema cookie changes, record the new cookie internally */
    +    u.au.pDb->pSchema->schema_cookie = (int)pIn3->u.i;
    +    db->flags |= SQLITE_InternChanges;
    +  }else if( pOp->p2==BTREE_FILE_FORMAT ){
    +    /* Record changes in the file format */
    +    u.au.pDb->pSchema->file_format = (u8)pIn3->u.i;
    +  }
    +  if( pOp->p1==1 ){
    +    /* Invalidate all prepared statements whenever the TEMP database
    +    ** schema is changed.  Ticket #1644 */
    +    sqlite3ExpirePreparedStatements(db);
    +    p->expired = 0;
    +  }
    +  break;
    +}
    +
    +/* Opcode: VerifyCookie P1 P2 *
    +**
    +** Check the value of global database parameter number 0 (the
    +** schema version) and make sure it is equal to P2.  
    +** P1 is the database number which is 0 for the main database file
    +** and 1 for the file holding temporary tables and some higher number
    +** for auxiliary databases.
    +**
    +** The cookie changes its value whenever the database schema changes.
    +** This operation is used to detect when that the cookie has changed
    +** and that the current process needs to reread the schema.
    +**
    +** Either a transaction needs to have been started or an OP_Open needs
    +** to be executed (to establish a read lock) before this opcode is
    +** invoked.
    +*/
    +case OP_VerifyCookie: {
    +#if 0  /* local variables moved into u.av */
    +  int iMeta;
    +  Btree *pBt;
    +#endif /* local variables moved into u.av */
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p1))!=0 );
    +  u.av.pBt = db->aDb[pOp->p1].pBt;
    +  if( u.av.pBt ){
    +    sqlite3BtreeGetMeta(u.av.pBt, BTREE_SCHEMA_VERSION, (u32 *)&u.av.iMeta);
    +  }else{
    +    u.av.iMeta = 0;
    +  }
    +  if( u.av.iMeta!=pOp->p2 ){
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = sqlite3DbStrDup(db, "database schema has changed");
    +    /* If the schema-cookie from the database file matches the cookie
    +    ** stored with the in-memory representation of the schema, do
    +    ** not reload the schema from the database file.
    +    **
    +    ** If virtual-tables are in use, this is not just an optimization.
    +    ** Often, v-tables store their data in other SQLite tables, which
    +    ** are queried from within xNext() and other v-table methods using
    +    ** prepared queries. If such a query is out-of-date, we do not want to
    +    ** discard the database schema, as the user code implementing the
    +    ** v-table would have to be ready for the sqlite3_vtab structure itself
    +    ** to be invalidated whenever sqlite3_step() is called from within
    +    ** a v-table method.
    +    */
    +    if( db->aDb[pOp->p1].pSchema->schema_cookie!=u.av.iMeta ){
    +      sqlite3ResetInternalSchema(db, pOp->p1);
    +    }
    +
    +    sqlite3ExpirePreparedStatements(db);
    +    rc = SQLITE_SCHEMA;
    +  }
    +  break;
    +}
    +
    +/* Opcode: OpenRead P1 P2 P3 P4 P5
    +**
    +** Open a read-only cursor for the database table whose root page is
    +** P2 in a database file.  The database file is determined by P3. 
    +** P3==0 means the main database, P3==1 means the database used for 
    +** temporary tables, and P3>1 means used the corresponding attached
    +** database.  Give the new cursor an identifier of P1.  The P1
    +** values need not be contiguous but all P1 values should be small integers.
    +** It is an error for P1 to be negative.
    +**
    +** If P5!=0 then use the content of register P2 as the root page, not
    +** the value of P2 itself.
    +**
    +** There will be a read lock on the database whenever there is an
    +** open cursor.  If the database was unlocked prior to this instruction
    +** then a read lock is acquired as part of this instruction.  A read
    +** lock allows other processes to read the database but prohibits
    +** any other process from modifying the database.  The read lock is
    +** released when all cursors are closed.  If this instruction attempts
    +** to get a read lock but fails, the script terminates with an
    +** SQLITE_BUSY error code.
    +**
    +** The P4 value may be either an integer (P4_INT32) or a pointer to
    +** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo 
    +** structure, then said structure defines the content and collating 
    +** sequence of the index being opened. Otherwise, if P4 is an integer 
    +** value, it is set to the number of columns in the table.
    +**
    +** See also OpenWrite.
    +*/
    +/* Opcode: OpenWrite P1 P2 P3 P4 P5
    +**
    +** Open a read/write cursor named P1 on the table or index whose root
    +** page is P2.  Or if P5!=0 use the content of register P2 to find the
    +** root page.
    +**
    +** The P4 value may be either an integer (P4_INT32) or a pointer to
    +** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo 
    +** structure, then said structure defines the content and collating 
    +** sequence of the index being opened. Otherwise, if P4 is an integer 
    +** value, it is set to the number of columns in the table, or to the
    +** largest index of any column of the table that is actually used.
    +**
    +** This instruction works just like OpenRead except that it opens the cursor
    +** in read/write mode.  For a given table, there can be one or more read-only
    +** cursors or a single read/write cursor but not both.
    +**
    +** See also OpenRead.
    +*/
    +case OP_OpenRead:
    +case OP_OpenWrite: {
    +#if 0  /* local variables moved into u.aw */
    +  int nField;
    +  KeyInfo *pKeyInfo;
    +  int p2;
    +  int iDb;
    +  int wrFlag;
    +  Btree *pX;
    +  VdbeCursor *pCur;
    +  Db *pDb;
    +#endif /* local variables moved into u.aw */
    +
    +  if( p->expired ){
    +    rc = SQLITE_ABORT;
    +    break;
    +  }
    +
    +  u.aw.nField = 0;
    +  u.aw.pKeyInfo = 0;
    +  u.aw.p2 = pOp->p2;
    +  u.aw.iDb = pOp->p3;
    +  assert( u.aw.iDb>=0 && u.aw.iDb<db->nDb );
    +  assert( (p->btreeMask & (1<<u.aw.iDb))!=0 );
    +  u.aw.pDb = &db->aDb[u.aw.iDb];
    +  u.aw.pX = u.aw.pDb->pBt;
    +  assert( u.aw.pX!=0 );
    +  if( pOp->opcode==OP_OpenWrite ){
    +    u.aw.wrFlag = 1;
    +    if( u.aw.pDb->pSchema->file_format < p->minWriteFileFormat ){
    +      p->minWriteFileFormat = u.aw.pDb->pSchema->file_format;
    +    }
    +  }else{
    +    u.aw.wrFlag = 0;
    +  }
    +  if( pOp->p5 ){
    +    assert( u.aw.p2>0 );
    +    assert( u.aw.p2<=p->nMem );
    +    pIn2 = &p->aMem[u.aw.p2];
    +    sqlite3VdbeMemIntegerify(pIn2);
    +    u.aw.p2 = (int)pIn2->u.i;
    +    /* The u.aw.p2 value always comes from a prior OP_CreateTable opcode and
    +    ** that opcode will always set the u.aw.p2 value to 2 or more or else fail.
    +    ** If there were a failure, the prepared statement would have halted
    +    ** before reaching this instruction. */
    +    if( NEVER(u.aw.p2<2) ) {
    +      rc = SQLITE_CORRUPT_BKPT;
    +      goto abort_due_to_error;
    +    }
    +  }
    +  if( pOp->p4type==P4_KEYINFO ){
    +    u.aw.pKeyInfo = pOp->p4.pKeyInfo;
    +    u.aw.pKeyInfo->enc = ENC(p->db);
    +    u.aw.nField = u.aw.pKeyInfo->nField+1;
    +  }else if( pOp->p4type==P4_INT32 ){
    +    u.aw.nField = pOp->p4.i;
    +  }
    +  assert( pOp->p1>=0 );
    +  u.aw.pCur = allocateCursor(p, pOp->p1, u.aw.nField, u.aw.iDb, 1);
    +  if( u.aw.pCur==0 ) goto no_mem;
    +  u.aw.pCur->nullRow = 1;
    +  rc = sqlite3BtreeCursor(u.aw.pX, u.aw.p2, u.aw.wrFlag, u.aw.pKeyInfo, u.aw.pCur->pCursor);
    +  u.aw.pCur->pKeyInfo = u.aw.pKeyInfo;
    +
    +  /* Since it performs no memory allocation or IO, the only values that
    +  ** sqlite3BtreeCursor() may return are SQLITE_EMPTY and SQLITE_OK.
    +  ** SQLITE_EMPTY is only returned when attempting to open the table
    +  ** rooted at page 1 of a zero-byte database.  */
    +  assert( rc==SQLITE_EMPTY || rc==SQLITE_OK );
    +  if( rc==SQLITE_EMPTY ){
    +    u.aw.pCur->pCursor = 0;
    +    rc = SQLITE_OK;
    +  }
    +
    +  /* Set the VdbeCursor.isTable and isIndex variables. Previous versions of
    +  ** SQLite used to check if the root-page flags were sane at this point
    +  ** and report database corruption if they were not, but this check has
    +  ** since moved into the btree layer.  */
    +  u.aw.pCur->isTable = pOp->p4type!=P4_KEYINFO;
    +  u.aw.pCur->isIndex = !u.aw.pCur->isTable;
    +  break;
    +}
    +
    +/* Opcode: OpenEphemeral P1 P2 * P4 *
    +**
    +** Open a new cursor P1 to a transient table.
    +** The cursor is always opened read/write even if 
    +** the main database is read-only.  The transient or virtual
    +** table is deleted automatically when the cursor is closed.
    +**
    +** P2 is the number of columns in the virtual table.
    +** The cursor points to a BTree table if P4==0 and to a BTree index
    +** if P4 is not 0.  If P4 is not NULL, it points to a KeyInfo structure
    +** that defines the format of keys in the index.
    +**
    +** This opcode was once called OpenTemp.  But that created
    +** confusion because the term "temp table", might refer either
    +** to a TEMP table at the SQL level, or to a table opened by
    +** this opcode.  Then this opcode was call OpenVirtual.  But
    +** that created confusion with the whole virtual-table idea.
    +*/
    +case OP_OpenEphemeral: {
    +#if 0  /* local variables moved into u.ax */
    +  VdbeCursor *pCx;
    +#endif /* local variables moved into u.ax */
    +  static const int openFlags =
    +      SQLITE_OPEN_READWRITE |
    +      SQLITE_OPEN_CREATE |
    +      SQLITE_OPEN_EXCLUSIVE |
    +      SQLITE_OPEN_DELETEONCLOSE |
    +      SQLITE_OPEN_TRANSIENT_DB;
    +
    +  assert( pOp->p1>=0 );
    +  u.ax.pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, 1);
    +  if( u.ax.pCx==0 ) goto no_mem;
    +  u.ax.pCx->nullRow = 1;
    +  rc = sqlite3BtreeFactory(db, 0, 1, SQLITE_DEFAULT_TEMP_CACHE_SIZE, openFlags,
    +                           &u.ax.pCx->pBt);
    +  if( rc==SQLITE_OK ){
    +    rc = sqlite3BtreeBeginTrans(u.ax.pCx->pBt, 1);
    +  }
    +  if( rc==SQLITE_OK ){
    +    /* If a transient index is required, create it by calling
    +    ** sqlite3BtreeCreateTable() with the BTREE_ZERODATA flag before
    +    ** opening it. If a transient table is required, just use the
    +    ** automatically created table with root-page 1 (an INTKEY table).
    +    */
    +    if( pOp->p4.pKeyInfo ){
    +      int pgno;
    +      assert( pOp->p4type==P4_KEYINFO );
    +      rc = sqlite3BtreeCreateTable(u.ax.pCx->pBt, &pgno, BTREE_ZERODATA);
    +      if( rc==SQLITE_OK ){
    +        assert( pgno==MASTER_ROOT+1 );
    +        rc = sqlite3BtreeCursor(u.ax.pCx->pBt, pgno, 1,
    +                                (KeyInfo*)pOp->p4.z, u.ax.pCx->pCursor);
    +        u.ax.pCx->pKeyInfo = pOp->p4.pKeyInfo;
    +        u.ax.pCx->pKeyInfo->enc = ENC(p->db);
    +      }
    +      u.ax.pCx->isTable = 0;
    +    }else{
    +      rc = sqlite3BtreeCursor(u.ax.pCx->pBt, MASTER_ROOT, 1, 0, u.ax.pCx->pCursor);
    +      u.ax.pCx->isTable = 1;
    +    }
    +  }
    +  u.ax.pCx->isIndex = !u.ax.pCx->isTable;
    +  break;
    +}
    +
    +/* Opcode: OpenPseudo P1 P2 P3 * *
    +**
    +** Open a new cursor that points to a fake table that contains a single
    +** row of data.  The content of that one row in the content of memory
    +** register P2.  In other words, cursor P1 becomes an alias for the 
    +** MEM_Blob content contained in register P2.
    +**
    +** A pseudo-table created by this opcode is used to hold the a single
    +** row output from the sorter so that the row can be decomposed into
    +** individual columns using the OP_Column opcode.  The OP_Column opcode
    +** is the only cursor opcode that works with a pseudo-table.
    +**
    +** P3 is the number of fields in the records that will be stored by
    +** the pseudo-table.
    +*/
    +case OP_OpenPseudo: {
    +#if 0  /* local variables moved into u.ay */
    +  VdbeCursor *pCx;
    +#endif /* local variables moved into u.ay */
    +
    +  assert( pOp->p1>=0 );
    +  u.ay.pCx = allocateCursor(p, pOp->p1, pOp->p3, -1, 0);
    +  if( u.ay.pCx==0 ) goto no_mem;
    +  u.ay.pCx->nullRow = 1;
    +  u.ay.pCx->pseudoTableReg = pOp->p2;
    +  u.ay.pCx->isTable = 1;
    +  u.ay.pCx->isIndex = 0;
    +  break;
    +}
    +
    +/* Opcode: Close P1 * * * *
    +**
    +** Close a cursor previously opened as P1.  If P1 is not
    +** currently open, this instruction is a no-op.
    +*/
    +case OP_Close: {
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  sqlite3VdbeFreeCursor(p, p->apCsr[pOp->p1]);
    +  p->apCsr[pOp->p1] = 0;
    +  break;
    +}
    +
    +/* Opcode: SeekGe P1 P2 P3 P4 *
    +**
    +** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
    +** use the value in register P3 as the key.  If cursor P1 refers 
    +** to an SQL index, then P3 is the first in an array of P4 registers 
    +** that are used as an unpacked index key. 
    +**
    +** Reposition cursor P1 so that  it points to the smallest entry that 
    +** is greater than or equal to the key value. If there are no records 
    +** greater than or equal to the key and P2 is not zero, then jump to P2.
    +**
    +** See also: Found, NotFound, Distinct, SeekLt, SeekGt, SeekLe
    +*/
    +/* Opcode: SeekGt P1 P2 P3 P4 *
    +**
    +** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
    +** use the value in register P3 as a key. If cursor P1 refers 
    +** to an SQL index, then P3 is the first in an array of P4 registers 
    +** that are used as an unpacked index key. 
    +**
    +** Reposition cursor P1 so that  it points to the smallest entry that 
    +** is greater than the key value. If there are no records greater than 
    +** the key and P2 is not zero, then jump to P2.
    +**
    +** See also: Found, NotFound, Distinct, SeekLt, SeekGe, SeekLe
    +*/
    +/* Opcode: SeekLt P1 P2 P3 P4 * 
    +**
    +** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
    +** use the value in register P3 as a key. If cursor P1 refers 
    +** to an SQL index, then P3 is the first in an array of P4 registers 
    +** that are used as an unpacked index key. 
    +**
    +** Reposition cursor P1 so that  it points to the largest entry that 
    +** is less than the key value. If there are no records less than 
    +** the key and P2 is not zero, then jump to P2.
    +**
    +** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLe
    +*/
    +/* Opcode: SeekLe P1 P2 P3 P4 *
    +**
    +** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
    +** use the value in register P3 as a key. If cursor P1 refers 
    +** to an SQL index, then P3 is the first in an array of P4 registers 
    +** that are used as an unpacked index key. 
    +**
    +** Reposition cursor P1 so that it points to the largest entry that 
    +** is less than or equal to the key value. If there are no records 
    +** less than or equal to the key and P2 is not zero, then jump to P2.
    +**
    +** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLt
    +*/
    +case OP_SeekLt:         /* jump, in3 */
    +case OP_SeekLe:         /* jump, in3 */
    +case OP_SeekGe:         /* jump, in3 */
    +case OP_SeekGt: {       /* jump, in3 */
    +#if 0  /* local variables moved into u.az */
    +  int res;
    +  int oc;
    +  VdbeCursor *pC;
    +  UnpackedRecord r;
    +  int nField;
    +  i64 iKey;      /* The rowid we are to seek to */
    +#endif /* local variables moved into u.az */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  assert( pOp->p2!=0 );
    +  u.az.pC = p->apCsr[pOp->p1];
    +  assert( u.az.pC!=0 );
    +  assert( u.az.pC->pseudoTableReg==0 );
    +  if( u.az.pC->pCursor!=0 ){
    +    u.az.oc = pOp->opcode;
    +    u.az.pC->nullRow = 0;
    +    if( u.az.pC->isTable ){
    +      /* The input value in P3 might be of any type: integer, real, string,
    +      ** blob, or NULL.  But it needs to be an integer before we can do
    +      ** the seek, so covert it. */
    +      applyNumericAffinity(pIn3);
    +      u.az.iKey = sqlite3VdbeIntValue(pIn3);
    +      u.az.pC->rowidIsValid = 0;
    +
    +      /* If the P3 value could not be converted into an integer without
    +      ** loss of information, then special processing is required... */
    +      if( (pIn3->flags & MEM_Int)==0 ){
    +        if( (pIn3->flags & MEM_Real)==0 ){
    +          /* If the P3 value cannot be converted into any kind of a number,
    +          ** then the seek is not possible, so jump to P2 */
    +          pc = pOp->p2 - 1;
    +          break;
    +        }
    +        /* If we reach this point, then the P3 value must be a floating
    +        ** point number. */
    +        assert( (pIn3->flags & MEM_Real)!=0 );
    +
    +        if( u.az.iKey==SMALLEST_INT64 && (pIn3->r<(double)u.az.iKey || pIn3->r>0) ){
    +          /* The P3 value is too large in magnitude to be expressed as an
    +          ** integer. */
    +          u.az.res = 1;
    +          if( pIn3->r<0 ){
    +            if( u.az.oc==OP_SeekGt || u.az.oc==OP_SeekGe ){
    +              rc = sqlite3BtreeFirst(u.az.pC->pCursor, &u.az.res);
    +              if( rc!=SQLITE_OK ) goto abort_due_to_error;
    +            }
    +          }else{
    +            if( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekLe ){
    +              rc = sqlite3BtreeLast(u.az.pC->pCursor, &u.az.res);
    +              if( rc!=SQLITE_OK ) goto abort_due_to_error;
    +            }
    +          }
    +          if( u.az.res ){
    +            pc = pOp->p2 - 1;
    +          }
    +          break;
    +        }else if( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekGe ){
    +          /* Use the ceiling() function to convert real->int */
    +          if( pIn3->r > (double)u.az.iKey ) u.az.iKey++;
    +        }else{
    +          /* Use the floor() function to convert real->int */
    +          assert( u.az.oc==OP_SeekLe || u.az.oc==OP_SeekGt );
    +          if( pIn3->r < (double)u.az.iKey ) u.az.iKey--;
    +        }
    +      }
    +      rc = sqlite3BtreeMovetoUnpacked(u.az.pC->pCursor, 0, (u64)u.az.iKey, 0, &u.az.res);
    +      if( rc!=SQLITE_OK ){
    +        goto abort_due_to_error;
    +      }
    +      if( u.az.res==0 ){
    +        u.az.pC->rowidIsValid = 1;
    +        u.az.pC->lastRowid = u.az.iKey;
    +      }
    +    }else{
    +      u.az.nField = pOp->p4.i;
    +      assert( pOp->p4type==P4_INT32 );
    +      assert( u.az.nField>0 );
    +      u.az.r.pKeyInfo = u.az.pC->pKeyInfo;
    +      u.az.r.nField = (u16)u.az.nField;
    +      if( u.az.oc==OP_SeekGt || u.az.oc==OP_SeekLe ){
    +        u.az.r.flags = UNPACKED_INCRKEY;
    +      }else{
    +        u.az.r.flags = 0;
    +      }
    +      u.az.r.aMem = &p->aMem[pOp->p3];
    +      rc = sqlite3BtreeMovetoUnpacked(u.az.pC->pCursor, &u.az.r, 0, 0, &u.az.res);
    +      if( rc!=SQLITE_OK ){
    +        goto abort_due_to_error;
    +      }
    +      u.az.pC->rowidIsValid = 0;
    +    }
    +    u.az.pC->deferredMoveto = 0;
    +    u.az.pC->cacheStatus = CACHE_STALE;
    +#ifdef SQLITE_TEST
    +    sqlite3_search_count++;
    +#endif
    +    if( u.az.oc==OP_SeekGe || u.az.oc==OP_SeekGt ){
    +      if( u.az.res<0 || (u.az.res==0 && u.az.oc==OP_SeekGt) ){
    +        rc = sqlite3BtreeNext(u.az.pC->pCursor, &u.az.res);
    +        if( rc!=SQLITE_OK ) goto abort_due_to_error;
    +        u.az.pC->rowidIsValid = 0;
    +      }else{
    +        u.az.res = 0;
    +      }
    +    }else{
    +      assert( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekLe );
    +      if( u.az.res>0 || (u.az.res==0 && u.az.oc==OP_SeekLt) ){
    +        rc = sqlite3BtreePrevious(u.az.pC->pCursor, &u.az.res);
    +        if( rc!=SQLITE_OK ) goto abort_due_to_error;
    +        u.az.pC->rowidIsValid = 0;
    +      }else{
    +        /* u.az.res might be negative because the table is empty.  Check to
    +        ** see if this is the case.
    +        */
    +        u.az.res = sqlite3BtreeEof(u.az.pC->pCursor);
    +      }
    +    }
    +    assert( pOp->p2>0 );
    +    if( u.az.res ){
    +      pc = pOp->p2 - 1;
    +    }
    +  }else{
    +    /* This happens when attempting to open the sqlite3_master table
    +    ** for read access returns SQLITE_EMPTY. In this case always
    +    ** take the jump (since there are no records in the table).
    +    */
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Seek P1 P2 * * *
    +**
    +** P1 is an open table cursor and P2 is a rowid integer.  Arrange
    +** for P1 to move so that it points to the rowid given by P2.
    +**
    +** This is actually a deferred seek.  Nothing actually happens until
    +** the cursor is used to read a record.  That way, if no reads
    +** occur, no unnecessary I/O happens.
    +*/
    +case OP_Seek: {    /* in2 */
    +#if 0  /* local variables moved into u.ba */
    +  VdbeCursor *pC;
    +#endif /* local variables moved into u.ba */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.ba.pC = p->apCsr[pOp->p1];
    +  assert( u.ba.pC!=0 );
    +  if( ALWAYS(u.ba.pC->pCursor!=0) ){
    +    assert( u.ba.pC->isTable );
    +    u.ba.pC->nullRow = 0;
    +    u.ba.pC->movetoTarget = sqlite3VdbeIntValue(pIn2);
    +    u.ba.pC->rowidIsValid = 0;
    +    u.ba.pC->deferredMoveto = 1;
    +  }
    +  break;
    +}
    +  
    +
    +/* Opcode: Found P1 P2 P3 * *
    +**
    +** Register P3 holds a blob constructed by MakeRecord.  P1 is an index.
    +** If an entry that matches the value in register p3 exists in P1 then
    +** jump to P2.  If the P3 value does not match any entry in P1
    +** then fall thru.  The P1 cursor is left pointing at the matching entry
    +** if it exists.
    +**
    +** This instruction is used to implement the IN operator where the
    +** left-hand side is a SELECT statement.  P1 may be a true index, or it
    +** may be a temporary index that holds the results of the SELECT
    +** statement.   This instruction is also used to implement the
    +** DISTINCT keyword in SELECT statements.
    +**
    +** This instruction checks if index P1 contains a record for which 
    +** the first N serialized values exactly match the N serialized values
    +** in the record in register P3, where N is the total number of values in
    +** the P3 record (the P3 record is a prefix of the P1 record). 
    +**
    +** See also: NotFound, IsUnique, NotExists
    +*/
    +/* Opcode: NotFound P1 P2 P3 * *
    +**
    +** Register P3 holds a blob constructed by MakeRecord.  P1 is
    +** an index.  If no entry exists in P1 that matches the blob then jump
    +** to P2.  If an entry does existing, fall through.  The cursor is left
    +** pointing to the entry that matches.
    +**
    +** See also: Found, NotExists, IsUnique
    +*/
    +case OP_NotFound:       /* jump, in3 */
    +case OP_Found: {        /* jump, in3 */
    +#if 0  /* local variables moved into u.bb */
    +  int alreadyExists;
    +  VdbeCursor *pC;
    +  int res;
    +  UnpackedRecord *pIdxKey;
    +  char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
    +#endif /* local variables moved into u.bb */
    +
    +#ifdef SQLITE_TEST
    +  sqlite3_found_count++;
    +#endif
    +
    +  u.bb.alreadyExists = 0;
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bb.pC = p->apCsr[pOp->p1];
    +  assert( u.bb.pC!=0 );
    +  if( ALWAYS(u.bb.pC->pCursor!=0) ){
    +
    +    assert( u.bb.pC->isTable==0 );
    +    assert( pIn3->flags & MEM_Blob );
    +    ExpandBlob(pIn3);
    +    u.bb.pIdxKey = sqlite3VdbeRecordUnpack(u.bb.pC->pKeyInfo, pIn3->n, pIn3->z,
    +                                      u.bb.aTempRec, sizeof(u.bb.aTempRec));
    +    if( u.bb.pIdxKey==0 ){
    +      goto no_mem;
    +    }
    +    if( pOp->opcode==OP_Found ){
    +      u.bb.pIdxKey->flags |= UNPACKED_PREFIX_MATCH;
    +    }
    +    rc = sqlite3BtreeMovetoUnpacked(u.bb.pC->pCursor, u.bb.pIdxKey, 0, 0, &u.bb.res);
    +    sqlite3VdbeDeleteUnpackedRecord(u.bb.pIdxKey);
    +    if( rc!=SQLITE_OK ){
    +      break;
    +    }
    +    u.bb.alreadyExists = (u.bb.res==0);
    +    u.bb.pC->deferredMoveto = 0;
    +    u.bb.pC->cacheStatus = CACHE_STALE;
    +  }
    +  if( pOp->opcode==OP_Found ){
    +    if( u.bb.alreadyExists ) pc = pOp->p2 - 1;
    +  }else{
    +    if( !u.bb.alreadyExists ) pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: IsUnique P1 P2 P3 P4 *
    +**
    +** Cursor P1 is open on an index.  So it has no data and its key consists 
    +** of a record generated by OP_MakeRecord where the last field is the 
    +** rowid of the entry that the index refers to.
    +**
    +** The P3 register contains an integer record number. Call this record 
    +** number R. Register P4 is the first in a set of N contiguous registers
    +** that make up an unpacked index key that can be used with cursor P1.
    +** The value of N can be inferred from the cursor. N includes the rowid
    +** value appended to the end of the index record. This rowid value may
    +** or may not be the same as R.
    +**
    +** If any of the N registers beginning with register P4 contains a NULL
    +** value, jump immediately to P2.
    +**
    +** Otherwise, this instruction checks if cursor P1 contains an entry
    +** where the first (N-1) fields match but the rowid value at the end
    +** of the index entry is not R. If there is no such entry, control jumps
    +** to instruction P2. Otherwise, the rowid of the conflicting index
    +** entry is copied to register P3 and control falls through to the next
    +** instruction.
    +**
    +** See also: NotFound, NotExists, Found
    +*/
    +case OP_IsUnique: {        /* jump, in3 */
    +#if 0  /* local variables moved into u.bc */
    +  u16 ii;
    +  VdbeCursor *pCx;
    +  BtCursor *pCrsr;
    +  u16 nField;
    +  Mem *aMem;
    +  UnpackedRecord r;                  /* B-Tree index search key */
    +  i64 R;                             /* Rowid stored in register P3 */
    +#endif /* local variables moved into u.bc */
    +
    +  u.bc.aMem = &p->aMem[pOp->p4.i];
    +  /* Assert that the values of parameters P1 and P4 are in range. */
    +  assert( pOp->p4type==P4_INT32 );
    +  assert( pOp->p4.i>0 && pOp->p4.i<=p->nMem );
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +
    +  /* Find the index cursor. */
    +  u.bc.pCx = p->apCsr[pOp->p1];
    +  assert( u.bc.pCx->deferredMoveto==0 );
    +  u.bc.pCx->seekResult = 0;
    +  u.bc.pCx->cacheStatus = CACHE_STALE;
    +  u.bc.pCrsr = u.bc.pCx->pCursor;
    +
    +  /* If any of the values are NULL, take the jump. */
    +  u.bc.nField = u.bc.pCx->pKeyInfo->nField;
    +  for(u.bc.ii=0; u.bc.ii<u.bc.nField; u.bc.ii++){
    +    if( u.bc.aMem[u.bc.ii].flags & MEM_Null ){
    +      pc = pOp->p2 - 1;
    +      u.bc.pCrsr = 0;
    +      break;
    +    }
    +  }
    +  assert( (u.bc.aMem[u.bc.nField].flags & MEM_Null)==0 );
    +
    +  if( u.bc.pCrsr!=0 ){
    +    /* Populate the index search key. */
    +    u.bc.r.pKeyInfo = u.bc.pCx->pKeyInfo;
    +    u.bc.r.nField = u.bc.nField + 1;
    +    u.bc.r.flags = UNPACKED_PREFIX_SEARCH;
    +    u.bc.r.aMem = u.bc.aMem;
    +
    +    /* Extract the value of u.bc.R from register P3. */
    +    sqlite3VdbeMemIntegerify(pIn3);
    +    u.bc.R = pIn3->u.i;
    +
    +    /* Search the B-Tree index. If no conflicting record is found, jump
    +    ** to P2. Otherwise, copy the rowid of the conflicting record to
    +    ** register P3 and fall through to the next instruction.  */
    +    rc = sqlite3BtreeMovetoUnpacked(u.bc.pCrsr, &u.bc.r, 0, 0, &u.bc.pCx->seekResult);
    +    if( (u.bc.r.flags & UNPACKED_PREFIX_SEARCH) || u.bc.r.rowid==u.bc.R ){
    +      pc = pOp->p2 - 1;
    +    }else{
    +      pIn3->u.i = u.bc.r.rowid;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: NotExists P1 P2 P3 * *
    +**
    +** Use the content of register P3 as a integer key.  If a record 
    +** with that key does not exist in table of P1, then jump to P2. 
    +** If the record does exist, then fall thru.  The cursor is left 
    +** pointing to the record if it exists.
    +**
    +** The difference between this operation and NotFound is that this
    +** operation assumes the key is an integer and that P1 is a table whereas
    +** NotFound assumes key is a blob constructed from MakeRecord and
    +** P1 is an index.
    +**
    +** See also: Found, NotFound, IsUnique
    +*/
    +case OP_NotExists: {        /* jump, in3 */
    +#if 0  /* local variables moved into u.bd */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int res;
    +  u64 iKey;
    +#endif /* local variables moved into u.bd */
    +
    +  assert( pIn3->flags & MEM_Int );
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bd.pC = p->apCsr[pOp->p1];
    +  assert( u.bd.pC!=0 );
    +  assert( u.bd.pC->isTable );
    +  assert( u.bd.pC->pseudoTableReg==0 );
    +  u.bd.pCrsr = u.bd.pC->pCursor;
    +  if( u.bd.pCrsr!=0 ){
    +    u.bd.res = 0;
    +    u.bd.iKey = pIn3->u.i;
    +    rc = sqlite3BtreeMovetoUnpacked(u.bd.pCrsr, 0, u.bd.iKey, 0, &u.bd.res);
    +    u.bd.pC->lastRowid = pIn3->u.i;
    +    u.bd.pC->rowidIsValid = u.bd.res==0 ?1:0;
    +    u.bd.pC->nullRow = 0;
    +    u.bd.pC->cacheStatus = CACHE_STALE;
    +    u.bd.pC->deferredMoveto = 0;
    +    if( u.bd.res!=0 ){
    +      pc = pOp->p2 - 1;
    +      assert( u.bd.pC->rowidIsValid==0 );
    +    }
    +    u.bd.pC->seekResult = u.bd.res;
    +  }else{
    +    /* This happens when an attempt to open a read cursor on the
    +    ** sqlite_master table returns SQLITE_EMPTY.
    +    */
    +    pc = pOp->p2 - 1;
    +    assert( u.bd.pC->rowidIsValid==0 );
    +    u.bd.pC->seekResult = 0;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Sequence P1 P2 * * *
    +**
    +** Find the next available sequence number for cursor P1.
    +** Write the sequence number into register P2.
    +** The sequence number on the cursor is incremented after this
    +** instruction.  
    +*/
    +case OP_Sequence: {           /* out2-prerelease */
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  assert( p->apCsr[pOp->p1]!=0 );
    +  pOut->u.i = p->apCsr[pOp->p1]->seqCount++;
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  break;
    +}
    +
    +
    +/* Opcode: NewRowid P1 P2 P3 * *
    +**
    +** Get a new integer record number (a.k.a "rowid") used as the key to a table.
    +** The record number is not previously used as a key in the database
    +** table that cursor P1 points to.  The new record number is written
    +** written to register P2.
    +**
    +** If P3>0 then P3 is a register in the root frame of this VDBE that holds 
    +** the largest previously generated record number. No new record numbers are
    +** allowed to be less than this value. When this value reaches its maximum, 
    +** a SQLITE_FULL error is generated. The P3 register is updated with the '
    +** generated record number. This P3 mechanism is used to help implement the
    +** AUTOINCREMENT feature.
    +*/
    +case OP_NewRowid: {           /* out2-prerelease */
    +#if 0  /* local variables moved into u.be */
    +  i64 v;                 /* The new rowid */
    +  VdbeCursor *pC;        /* Cursor of table to get the new rowid */
    +  int res;               /* Result of an sqlite3BtreeLast() */
    +  int cnt;               /* Counter to limit the number of searches */
    +  Mem *pMem;             /* Register holding largest rowid for AUTOINCREMENT */
    +  VdbeFrame *pFrame;     /* Root frame of VDBE */
    +#endif /* local variables moved into u.be */
    +
    +  u.be.v = 0;
    +  u.be.res = 0;
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.be.pC = p->apCsr[pOp->p1];
    +  assert( u.be.pC!=0 );
    +  if( NEVER(u.be.pC->pCursor==0) ){
    +    /* The zero initialization above is all that is needed */
    +  }else{
    +    /* The next rowid or record number (different terms for the same
    +    ** thing) is obtained in a two-step algorithm.
    +    **
    +    ** First we attempt to find the largest existing rowid and add one
    +    ** to that.  But if the largest existing rowid is already the maximum
    +    ** positive integer, we have to fall through to the second
    +    ** probabilistic algorithm
    +    **
    +    ** The second algorithm is to select a rowid at random and see if
    +    ** it already exists in the table.  If it does not exist, we have
    +    ** succeeded.  If the random rowid does exist, we select a new one
    +    ** and try again, up to 100 times.
    +    */
    +    assert( u.be.pC->isTable );
    +    u.be.cnt = 0;
    +
    +#ifdef SQLITE_32BIT_ROWID
    +#   define MAX_ROWID 0x7fffffff
    +#else
    +    /* Some compilers complain about constants of the form 0x7fffffffffffffff.
    +    ** Others complain about 0x7ffffffffffffffffLL.  The following macro seems
    +    ** to provide the constant while making all compilers happy.
    +    */
    +#   define MAX_ROWID  (i64)( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )
    +#endif
    +
    +    if( !u.be.pC->useRandomRowid ){
    +      u.be.v = sqlite3BtreeGetCachedRowid(u.be.pC->pCursor);
    +      if( u.be.v==0 ){
    +        rc = sqlite3BtreeLast(u.be.pC->pCursor, &u.be.res);
    +        if( rc!=SQLITE_OK ){
    +          goto abort_due_to_error;
    +        }
    +        if( u.be.res ){
    +          u.be.v = 1;
    +        }else{
    +          assert( sqlite3BtreeCursorIsValid(u.be.pC->pCursor) );
    +          rc = sqlite3BtreeKeySize(u.be.pC->pCursor, &u.be.v);
    +          assert( rc==SQLITE_OK );   /* Cannot fail following BtreeLast() */
    +          if( u.be.v==MAX_ROWID ){
    +            u.be.pC->useRandomRowid = 1;
    +          }else{
    +            u.be.v++;
    +          }
    +        }
    +      }
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +      if( pOp->p3 ){
    +        /* Assert that P3 is a valid memory cell. */
    +        assert( pOp->p3>0 );
    +        if( p->pFrame ){
    +          for(u.be.pFrame=p->pFrame; u.be.pFrame->pParent; u.be.pFrame=u.be.pFrame->pParent);
    +          /* Assert that P3 is a valid memory cell. */
    +          assert( pOp->p3<=u.be.pFrame->nMem );
    +          u.be.pMem = &u.be.pFrame->aMem[pOp->p3];
    +        }else{
    +          /* Assert that P3 is a valid memory cell. */
    +          assert( pOp->p3<=p->nMem );
    +          u.be.pMem = &p->aMem[pOp->p3];
    +        }
    +
    +        REGISTER_TRACE(pOp->p3, u.be.pMem);
    +        sqlite3VdbeMemIntegerify(u.be.pMem);
    +        assert( (u.be.pMem->flags & MEM_Int)!=0 );  /* mem(P3) holds an integer */
    +        if( u.be.pMem->u.i==MAX_ROWID || u.be.pC->useRandomRowid ){
    +          rc = SQLITE_FULL;
    +          goto abort_due_to_error;
    +        }
    +        if( u.be.v<u.be.pMem->u.i+1 ){
    +          u.be.v = u.be.pMem->u.i + 1;
    +        }
    +        u.be.pMem->u.i = u.be.v;
    +      }
    +#endif
    +
    +      sqlite3BtreeSetCachedRowid(u.be.pC->pCursor, u.be.v<MAX_ROWID ? u.be.v+1 : 0);
    +    }
    +    if( u.be.pC->useRandomRowid ){
    +      assert( pOp->p3==0 );  /* We cannot be in random rowid mode if this is
    +                             ** an AUTOINCREMENT table. */
    +      u.be.v = db->lastRowid;
    +      u.be.cnt = 0;
    +      do{
    +        if( u.be.cnt==0 && (u.be.v&0xffffff)==u.be.v ){
    +          u.be.v++;
    +        }else{
    +          sqlite3_randomness(sizeof(u.be.v), &u.be.v);
    +          if( u.be.cnt<5 ) u.be.v &= 0xffffff;
    +        }
    +        rc = sqlite3BtreeMovetoUnpacked(u.be.pC->pCursor, 0, (u64)u.be.v, 0, &u.be.res);
    +        u.be.cnt++;
    +      }while( u.be.cnt<100 && rc==SQLITE_OK && u.be.res==0 );
    +      if( rc==SQLITE_OK && u.be.res==0 ){
    +        rc = SQLITE_FULL;
    +        goto abort_due_to_error;
    +      }
    +    }
    +    u.be.pC->rowidIsValid = 0;
    +    u.be.pC->deferredMoveto = 0;
    +    u.be.pC->cacheStatus = CACHE_STALE;
    +  }
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  pOut->u.i = u.be.v;
    +  break;
    +}
    +
    +/* Opcode: Insert P1 P2 P3 P4 P5
    +**
    +** Write an entry into the table of cursor P1.  A new entry is
    +** created if it doesn't already exist or the data for an existing
    +** entry is overwritten.  The data is the value MEM_Blob stored in register
    +** number P2. The key is stored in register P3. The key must
    +** be a MEM_Int.
    +**
    +** If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is
    +** incremented (otherwise not).  If the OPFLAG_LASTROWID flag of P5 is set,
    +** then rowid is stored for subsequent return by the
    +** sqlite3_last_insert_rowid() function (otherwise it is unmodified).
    +**
    +** If the OPFLAG_USESEEKRESULT flag of P5 is set and if the result of
    +** the last seek operation (OP_NotExists) was a success, then this
    +** operation will not attempt to find the appropriate row before doing
    +** the insert but will instead overwrite the row that the cursor is
    +** currently pointing to.  Presumably, the prior OP_NotExists opcode
    +** has already positioned the cursor correctly.  This is an optimization
    +** that boosts performance by avoiding redundant seeks.
    +**
    +** If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an
    +** UPDATE operation.  Otherwise (if the flag is clear) then this opcode
    +** is part of an INSERT operation.  The difference is only important to
    +** the update hook.
    +**
    +** Parameter P4 may point to a string containing the table-name, or
    +** may be NULL. If it is not NULL, then the update-hook 
    +** (sqlite3.xUpdateCallback) is invoked following a successful insert.
    +**
    +** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically
    +** allocated, then ownership of P2 is transferred to the pseudo-cursor
    +** and register P2 becomes ephemeral.  If the cursor is changed, the
    +** value of register P2 will then change.  Make sure this does not
    +** cause any problems.)
    +**
    +** This instruction only works on tables.  The equivalent instruction
    +** for indices is OP_IdxInsert.
    +*/
    +/* Opcode: InsertInt P1 P2 P3 P4 P5
    +**
    +** This works exactly like OP_Insert except that the key is the
    +** integer value P3, not the value of the integer stored in register P3.
    +*/
    +case OP_Insert: 
    +case OP_InsertInt: {
    +#if 0  /* local variables moved into u.bf */
    +  Mem *pData;       /* MEM cell holding data for the record to be inserted */
    +  Mem *pKey;        /* MEM cell holding key  for the record */
    +  i64 iKey;         /* The integer ROWID or key for the record to be inserted */
    +  VdbeCursor *pC;   /* Cursor to table into which insert is written */
    +  int nZero;        /* Number of zero-bytes to append */
    +  int seekResult;   /* Result of prior seek or 0 if no USESEEKRESULT flag */
    +  const char *zDb;  /* database name - used by the update hook */
    +  const char *zTbl; /* Table name - used by the opdate hook */
    +  int op;           /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */
    +#endif /* local variables moved into u.bf */
    +
    +  u.bf.pData = &p->aMem[pOp->p2];
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bf.pC = p->apCsr[pOp->p1];
    +  assert( u.bf.pC!=0 );
    +  assert( u.bf.pC->pCursor!=0 );
    +  assert( u.bf.pC->pseudoTableReg==0 );
    +  assert( u.bf.pC->isTable );
    +  REGISTER_TRACE(pOp->p2, u.bf.pData);
    +
    +  if( pOp->opcode==OP_Insert ){
    +    u.bf.pKey = &p->aMem[pOp->p3];
    +    assert( u.bf.pKey->flags & MEM_Int );
    +    REGISTER_TRACE(pOp->p3, u.bf.pKey);
    +    u.bf.iKey = u.bf.pKey->u.i;
    +  }else{
    +    assert( pOp->opcode==OP_InsertInt );
    +    u.bf.iKey = pOp->p3;
    +  }
    +
    +  if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
    +  if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = u.bf.iKey;
    +  if( u.bf.pData->flags & MEM_Null ){
    +    u.bf.pData->z = 0;
    +    u.bf.pData->n = 0;
    +  }else{
    +    assert( u.bf.pData->flags & (MEM_Blob|MEM_Str) );
    +  }
    +  u.bf.seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? u.bf.pC->seekResult : 0);
    +  if( u.bf.pData->flags & MEM_Zero ){
    +    u.bf.nZero = u.bf.pData->u.nZero;
    +  }else{
    +    u.bf.nZero = 0;
    +  }
    +  sqlite3BtreeSetCachedRowid(u.bf.pC->pCursor, 0);
    +  rc = sqlite3BtreeInsert(u.bf.pC->pCursor, 0, u.bf.iKey,
    +                          u.bf.pData->z, u.bf.pData->n, u.bf.nZero,
    +                          pOp->p5 & OPFLAG_APPEND, u.bf.seekResult
    +  );
    +  u.bf.pC->rowidIsValid = 0;
    +  u.bf.pC->deferredMoveto = 0;
    +  u.bf.pC->cacheStatus = CACHE_STALE;
    +
    +  /* Invoke the update-hook if required. */
    +  if( rc==SQLITE_OK && db->xUpdateCallback && pOp->p4.z ){
    +    u.bf.zDb = db->aDb[u.bf.pC->iDb].zName;
    +    u.bf.zTbl = pOp->p4.z;
    +    u.bf.op = ((pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT);
    +    assert( u.bf.pC->isTable );
    +    db->xUpdateCallback(db->pUpdateArg, u.bf.op, u.bf.zDb, u.bf.zTbl, u.bf.iKey);
    +    assert( u.bf.pC->iDb>=0 );
    +  }
    +  break;
    +}
    +
    +/* Opcode: Delete P1 P2 * P4 *
    +**
    +** Delete the record at which the P1 cursor is currently pointing.
    +**
    +** The cursor will be left pointing at either the next or the previous
    +** record in the table. If it is left pointing at the next record, then
    +** the next Next instruction will be a no-op.  Hence it is OK to delete
    +** a record from within an Next loop.
    +**
    +** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is
    +** incremented (otherwise not).
    +**
    +** P1 must not be pseudo-table.  It has to be a real table with
    +** multiple rows.
    +**
    +** If P4 is not NULL, then it is the name of the table that P1 is
    +** pointing to.  The update hook will be invoked, if it exists.
    +** If P4 is not NULL then the P1 cursor must have been positioned
    +** using OP_NotFound prior to invoking this opcode.
    +*/
    +case OP_Delete: {
    +#if 0  /* local variables moved into u.bg */
    +  i64 iKey;
    +  VdbeCursor *pC;
    +#endif /* local variables moved into u.bg */
    +
    +  u.bg.iKey = 0;
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bg.pC = p->apCsr[pOp->p1];
    +  assert( u.bg.pC!=0 );
    +  assert( u.bg.pC->pCursor!=0 );  /* Only valid for real tables, no pseudotables */
    +
    +  /* If the update-hook will be invoked, set u.bg.iKey to the rowid of the
    +  ** row being deleted.
    +  */
    +  if( db->xUpdateCallback && pOp->p4.z ){
    +    assert( u.bg.pC->isTable );
    +    assert( u.bg.pC->rowidIsValid );  /* lastRowid set by previous OP_NotFound */
    +    u.bg.iKey = u.bg.pC->lastRowid;
    +  }
    +
    +  /* The OP_Delete opcode always follows an OP_NotExists or OP_Last or
    +  ** OP_Column on the same table without any intervening operations that
    +  ** might move or invalidate the cursor.  Hence cursor u.bg.pC is always pointing
    +  ** to the row to be deleted and the sqlite3VdbeCursorMoveto() operation
    +  ** below is always a no-op and cannot fail.  We will run it anyhow, though,
    +  ** to guard against future changes to the code generator.
    +  **/
    +  assert( u.bg.pC->deferredMoveto==0 );
    +  rc = sqlite3VdbeCursorMoveto(u.bg.pC);
    +  if( NEVER(rc!=SQLITE_OK) ) goto abort_due_to_error;
    +
    +  sqlite3BtreeSetCachedRowid(u.bg.pC->pCursor, 0);
    +  rc = sqlite3BtreeDelete(u.bg.pC->pCursor);
    +  u.bg.pC->cacheStatus = CACHE_STALE;
    +
    +  /* Invoke the update-hook if required. */
    +  if( rc==SQLITE_OK && db->xUpdateCallback && pOp->p4.z ){
    +    const char *zDb = db->aDb[u.bg.pC->iDb].zName;
    +    const char *zTbl = pOp->p4.z;
    +    db->xUpdateCallback(db->pUpdateArg, SQLITE_DELETE, zDb, zTbl, u.bg.iKey);
    +    assert( u.bg.pC->iDb>=0 );
    +  }
    +  if( pOp->p2 & OPFLAG_NCHANGE ) p->nChange++;
    +  break;
    +}
    +/* Opcode: ResetCount * * * * *
    +**
    +** The value of the change counter is copied to the database handle
    +** change counter (returned by subsequent calls to sqlite3_changes()).
    +** Then the VMs internal change counter resets to 0.
    +** This is used by trigger programs.
    +*/
    +case OP_ResetCount: {
    +  sqlite3VdbeSetChanges(db, p->nChange);
    +  p->nChange = 0;
    +  break;
    +}
    +
    +/* Opcode: RowData P1 P2 * * *
    +**
    +** Write into register P2 the complete row data for cursor P1.
    +** There is no interpretation of the data.  
    +** It is just copied onto the P2 register exactly as 
    +** it is found in the database file.
    +**
    +** If the P1 cursor must be pointing to a valid row (not a NULL row)
    +** of a real table, not a pseudo-table.
    +*/
    +/* Opcode: RowKey P1 P2 * * *
    +**
    +** Write into register P2 the complete row key for cursor P1.
    +** There is no interpretation of the data.  
    +** The key is copied onto the P3 register exactly as 
    +** it is found in the database file.
    +**
    +** If the P1 cursor must be pointing to a valid row (not a NULL row)
    +** of a real table, not a pseudo-table.
    +*/
    +case OP_RowKey:
    +case OP_RowData: {
    +#if 0  /* local variables moved into u.bh */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  u32 n;
    +  i64 n64;
    +#endif /* local variables moved into u.bh */
    +
    +  pOut = &p->aMem[pOp->p2];
    +
    +  /* Note that RowKey and RowData are really exactly the same instruction */
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bh.pC = p->apCsr[pOp->p1];
    +  assert( u.bh.pC->isTable || pOp->opcode==OP_RowKey );
    +  assert( u.bh.pC->isIndex || pOp->opcode==OP_RowData );
    +  assert( u.bh.pC!=0 );
    +  assert( u.bh.pC->nullRow==0 );
    +  assert( u.bh.pC->pseudoTableReg==0 );
    +  assert( u.bh.pC->pCursor!=0 );
    +  u.bh.pCrsr = u.bh.pC->pCursor;
    +  assert( sqlite3BtreeCursorIsValid(u.bh.pCrsr) );
    +
    +  /* The OP_RowKey and OP_RowData opcodes always follow OP_NotExists or
    +  ** OP_Rewind/Op_Next with no intervening instructions that might invalidate
    +  ** the cursor.  Hence the following sqlite3VdbeCursorMoveto() call is always
    +  ** a no-op and can never fail.  But we leave it in place as a safety.
    +  */
    +  assert( u.bh.pC->deferredMoveto==0 );
    +  rc = sqlite3VdbeCursorMoveto(u.bh.pC);
    +  if( NEVER(rc!=SQLITE_OK) ) goto abort_due_to_error;
    +
    +  if( u.bh.pC->isIndex ){
    +    assert( !u.bh.pC->isTable );
    +    rc = sqlite3BtreeKeySize(u.bh.pCrsr, &u.bh.n64);
    +    assert( rc==SQLITE_OK );    /* True because of CursorMoveto() call above */
    +    if( u.bh.n64>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +      goto too_big;
    +    }
    +    u.bh.n = (u32)u.bh.n64;
    +  }else{
    +    rc = sqlite3BtreeDataSize(u.bh.pCrsr, &u.bh.n);
    +    assert( rc==SQLITE_OK );    /* DataSize() cannot fail */
    +    if( u.bh.n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +      goto too_big;
    +    }
    +  }
    +  if( sqlite3VdbeMemGrow(pOut, u.bh.n, 0) ){
    +    goto no_mem;
    +  }
    +  pOut->n = u.bh.n;
    +  MemSetTypeFlag(pOut, MEM_Blob);
    +  if( u.bh.pC->isIndex ){
    +    rc = sqlite3BtreeKey(u.bh.pCrsr, 0, u.bh.n, pOut->z);
    +  }else{
    +    rc = sqlite3BtreeData(u.bh.pCrsr, 0, u.bh.n, pOut->z);
    +  }
    +  pOut->enc = SQLITE_UTF8;  /* In case the blob is ever cast to text */
    +  UPDATE_MAX_BLOBSIZE(pOut);
    +  break;
    +}
    +
    +/* Opcode: Rowid P1 P2 * * *
    +**
    +** Store in register P2 an integer which is the key of the table entry that
    +** P1 is currently point to.
    +**
    +** P1 can be either an ordinary table or a virtual table.  There used to
    +** be a separate OP_VRowid opcode for use with virtual tables, but this
    +** one opcode now works for both table types.
    +*/
    +case OP_Rowid: {                 /* out2-prerelease */
    +#if 0  /* local variables moved into u.bi */
    +  VdbeCursor *pC;
    +  i64 v;
    +  sqlite3_vtab *pVtab;
    +  const sqlite3_module *pModule;
    +#endif /* local variables moved into u.bi */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bi.pC = p->apCsr[pOp->p1];
    +  assert( u.bi.pC!=0 );
    +  assert( u.bi.pC->pseudoTableReg==0 );
    +  if( u.bi.pC->nullRow ){
    +    /* Do nothing so that reg[P2] remains NULL */
    +    break;
    +  }else if( u.bi.pC->deferredMoveto ){
    +    u.bi.v = u.bi.pC->movetoTarget;
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  }else if( u.bi.pC->pVtabCursor ){
    +    u.bi.pVtab = u.bi.pC->pVtabCursor->pVtab;
    +    u.bi.pModule = u.bi.pVtab->pModule;
    +    assert( u.bi.pModule->xRowid );
    +    if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +    rc = u.bi.pModule->xRowid(u.bi.pC->pVtabCursor, &u.bi.v);
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = u.bi.pVtab->zErrMsg;
    +    u.bi.pVtab->zErrMsg = 0;
    +    if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +  }else{
    +    assert( u.bi.pC->pCursor!=0 );
    +    rc = sqlite3VdbeCursorMoveto(u.bi.pC);
    +    if( rc ) goto abort_due_to_error;
    +    if( u.bi.pC->rowidIsValid ){
    +      u.bi.v = u.bi.pC->lastRowid;
    +    }else{
    +      rc = sqlite3BtreeKeySize(u.bi.pC->pCursor, &u.bi.v);
    +      assert( rc==SQLITE_OK );  /* Always so because of CursorMoveto() above */
    +    }
    +  }
    +  pOut->u.i = u.bi.v;
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  break;
    +}
    +
    +/* Opcode: NullRow P1 * * * *
    +**
    +** Move the cursor P1 to a null row.  Any OP_Column operations
    +** that occur while the cursor is on the null row will always
    +** write a NULL.
    +*/
    +case OP_NullRow: {
    +#if 0  /* local variables moved into u.bj */
    +  VdbeCursor *pC;
    +#endif /* local variables moved into u.bj */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bj.pC = p->apCsr[pOp->p1];
    +  assert( u.bj.pC!=0 );
    +  u.bj.pC->nullRow = 1;
    +  u.bj.pC->rowidIsValid = 0;
    +  if( u.bj.pC->pCursor ){
    +    sqlite3BtreeClearCursor(u.bj.pC->pCursor);
    +  }
    +  break;
    +}
    +
    +/* Opcode: Last P1 P2 * * *
    +**
    +** The next use of the Rowid or Column or Next instruction for P1 
    +** will refer to the last entry in the database table or index.
    +** If the table or index is empty and P2>0, then jump immediately to P2.
    +** If P2 is 0 or if the table or index is not empty, fall through
    +** to the following instruction.
    +*/
    +case OP_Last: {        /* jump */
    +#if 0  /* local variables moved into u.bk */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int res;
    +#endif /* local variables moved into u.bk */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bk.pC = p->apCsr[pOp->p1];
    +  assert( u.bk.pC!=0 );
    +  u.bk.pCrsr = u.bk.pC->pCursor;
    +  if( u.bk.pCrsr==0 ){
    +    u.bk.res = 1;
    +  }else{
    +    rc = sqlite3BtreeLast(u.bk.pCrsr, &u.bk.res);
    +  }
    +  u.bk.pC->nullRow = (u8)u.bk.res;
    +  u.bk.pC->deferredMoveto = 0;
    +  u.bk.pC->rowidIsValid = 0;
    +  u.bk.pC->cacheStatus = CACHE_STALE;
    +  if( pOp->p2>0 && u.bk.res ){
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +
    +/* Opcode: Sort P1 P2 * * *
    +**
    +** This opcode does exactly the same thing as OP_Rewind except that
    +** it increments an undocumented global variable used for testing.
    +**
    +** Sorting is accomplished by writing records into a sorting index,
    +** then rewinding that index and playing it back from beginning to
    +** end.  We use the OP_Sort opcode instead of OP_Rewind to do the
    +** rewinding so that the global variable will be incremented and
    +** regression tests can determine whether or not the optimizer is
    +** correctly optimizing out sorts.
    +*/
    +case OP_Sort: {        /* jump */
    +#ifdef SQLITE_TEST
    +  sqlite3_sort_count++;
    +  sqlite3_search_count--;
    +#endif
    +  p->aCounter[SQLITE_STMTSTATUS_SORT-1]++;
    +  /* Fall through into OP_Rewind */
    +}
    +/* Opcode: Rewind P1 P2 * * *
    +**
    +** The next use of the Rowid or Column or Next instruction for P1 
    +** will refer to the first entry in the database table or index.
    +** If the table or index is empty and P2>0, then jump immediately to P2.
    +** If P2 is 0 or if the table or index is not empty, fall through
    +** to the following instruction.
    +*/
    +case OP_Rewind: {        /* jump */
    +#if 0  /* local variables moved into u.bl */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int res;
    +#endif /* local variables moved into u.bl */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bl.pC = p->apCsr[pOp->p1];
    +  assert( u.bl.pC!=0 );
    +  if( (u.bl.pCrsr = u.bl.pC->pCursor)!=0 ){
    +    rc = sqlite3BtreeFirst(u.bl.pCrsr, &u.bl.res);
    +    u.bl.pC->atFirst = u.bl.res==0 ?1:0;
    +    u.bl.pC->deferredMoveto = 0;
    +    u.bl.pC->cacheStatus = CACHE_STALE;
    +    u.bl.pC->rowidIsValid = 0;
    +  }else{
    +    u.bl.res = 1;
    +  }
    +  u.bl.pC->nullRow = (u8)u.bl.res;
    +  assert( pOp->p2>0 && pOp->p2<p->nOp );
    +  if( u.bl.res ){
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: Next P1 P2 * * *
    +**
    +** Advance cursor P1 so that it points to the next key/data pair in its
    +** table or index.  If there are no more key/value pairs then fall through
    +** to the following instruction.  But if the cursor advance was successful,
    +** jump immediately to P2.
    +**
    +** The P1 cursor must be for a real table, not a pseudo-table.
    +**
    +** See also: Prev
    +*/
    +/* Opcode: Prev P1 P2 * * *
    +**
    +** Back up cursor P1 so that it points to the previous key/data pair in its
    +** table or index.  If there is no previous key/value pairs then fall through
    +** to the following instruction.  But if the cursor backup was successful,
    +** jump immediately to P2.
    +**
    +** The P1 cursor must be for a real table, not a pseudo-table.
    +*/
    +case OP_Prev:          /* jump */
    +case OP_Next: {        /* jump */
    +#if 0  /* local variables moved into u.bm */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int res;
    +#endif /* local variables moved into u.bm */
    +
    +  CHECK_FOR_INTERRUPT;
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bm.pC = p->apCsr[pOp->p1];
    +  if( u.bm.pC==0 ){
    +    break;  /* See ticket #2273 */
    +  }
    +  u.bm.pCrsr = u.bm.pC->pCursor;
    +  if( u.bm.pCrsr==0 ){
    +    u.bm.pC->nullRow = 1;
    +    break;
    +  }
    +  u.bm.res = 1;
    +  assert( u.bm.pC->deferredMoveto==0 );
    +  rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(u.bm.pCrsr, &u.bm.res) :
    +                              sqlite3BtreePrevious(u.bm.pCrsr, &u.bm.res);
    +  u.bm.pC->nullRow = (u8)u.bm.res;
    +  u.bm.pC->cacheStatus = CACHE_STALE;
    +  if( u.bm.res==0 ){
    +    pc = pOp->p2 - 1;
    +    if( pOp->p5 ) p->aCounter[pOp->p5-1]++;
    +#ifdef SQLITE_TEST
    +    sqlite3_search_count++;
    +#endif
    +  }
    +  u.bm.pC->rowidIsValid = 0;
    +  break;
    +}
    +
    +/* Opcode: IdxInsert P1 P2 P3 * P5
    +**
    +** Register P2 holds a SQL index key made using the
    +** MakeRecord instructions.  This opcode writes that key
    +** into the index P1.  Data for the entry is nil.
    +**
    +** P3 is a flag that provides a hint to the b-tree layer that this
    +** insert is likely to be an append.
    +**
    +** This instruction only works for indices.  The equivalent instruction
    +** for tables is OP_Insert.
    +*/
    +case OP_IdxInsert: {        /* in2 */
    +#if 0  /* local variables moved into u.bn */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int nKey;
    +  const char *zKey;
    +#endif /* local variables moved into u.bn */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bn.pC = p->apCsr[pOp->p1];
    +  assert( u.bn.pC!=0 );
    +  assert( pIn2->flags & MEM_Blob );
    +  u.bn.pCrsr = u.bn.pC->pCursor;
    +  if( ALWAYS(u.bn.pCrsr!=0) ){
    +    assert( u.bn.pC->isTable==0 );
    +    rc = ExpandBlob(pIn2);
    +    if( rc==SQLITE_OK ){
    +      u.bn.nKey = pIn2->n;
    +      u.bn.zKey = pIn2->z;
    +      rc = sqlite3BtreeInsert(u.bn.pCrsr, u.bn.zKey, u.bn.nKey, "", 0, 0, pOp->p3,
    +          ((pOp->p5 & OPFLAG_USESEEKRESULT) ? u.bn.pC->seekResult : 0)
    +      );
    +      assert( u.bn.pC->deferredMoveto==0 );
    +      u.bn.pC->cacheStatus = CACHE_STALE;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: IdxDelete P1 P2 P3 * *
    +**
    +** The content of P3 registers starting at register P2 form
    +** an unpacked index key. This opcode removes that entry from the 
    +** index opened by cursor P1.
    +*/
    +case OP_IdxDelete: {
    +#if 0  /* local variables moved into u.bo */
    +  VdbeCursor *pC;
    +  BtCursor *pCrsr;
    +  int res;
    +  UnpackedRecord r;
    +#endif /* local variables moved into u.bo */
    +
    +  assert( pOp->p3>0 );
    +  assert( pOp->p2>0 && pOp->p2+pOp->p3<=p->nMem+1 );
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bo.pC = p->apCsr[pOp->p1];
    +  assert( u.bo.pC!=0 );
    +  u.bo.pCrsr = u.bo.pC->pCursor;
    +  if( ALWAYS(u.bo.pCrsr!=0) ){
    +    u.bo.r.pKeyInfo = u.bo.pC->pKeyInfo;
    +    u.bo.r.nField = (u16)pOp->p3;
    +    u.bo.r.flags = 0;
    +    u.bo.r.aMem = &p->aMem[pOp->p2];
    +    rc = sqlite3BtreeMovetoUnpacked(u.bo.pCrsr, &u.bo.r, 0, 0, &u.bo.res);
    +    if( rc==SQLITE_OK && u.bo.res==0 ){
    +      rc = sqlite3BtreeDelete(u.bo.pCrsr);
    +    }
    +    assert( u.bo.pC->deferredMoveto==0 );
    +    u.bo.pC->cacheStatus = CACHE_STALE;
    +  }
    +  break;
    +}
    +
    +/* Opcode: IdxRowid P1 P2 * * *
    +**
    +** Write into register P2 an integer which is the last entry in the record at
    +** the end of the index key pointed to by cursor P1.  This integer should be
    +** the rowid of the table entry to which this index entry points.
    +**
    +** See also: Rowid, MakeRecord.
    +*/
    +case OP_IdxRowid: {              /* out2-prerelease */
    +#if 0  /* local variables moved into u.bp */
    +  BtCursor *pCrsr;
    +  VdbeCursor *pC;
    +  i64 rowid;
    +#endif /* local variables moved into u.bp */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bp.pC = p->apCsr[pOp->p1];
    +  assert( u.bp.pC!=0 );
    +  u.bp.pCrsr = u.bp.pC->pCursor;
    +  if( ALWAYS(u.bp.pCrsr!=0) ){
    +    rc = sqlite3VdbeCursorMoveto(u.bp.pC);
    +    if( NEVER(rc) ) goto abort_due_to_error;
    +    assert( u.bp.pC->deferredMoveto==0 );
    +    assert( u.bp.pC->isTable==0 );
    +    if( !u.bp.pC->nullRow ){
    +      rc = sqlite3VdbeIdxRowid(db, u.bp.pCrsr, &u.bp.rowid);
    +      if( rc!=SQLITE_OK ){
    +        goto abort_due_to_error;
    +      }
    +      MemSetTypeFlag(pOut, MEM_Int);
    +      pOut->u.i = u.bp.rowid;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: IdxGE P1 P2 P3 P4 P5
    +**
    +** The P4 register values beginning with P3 form an unpacked index 
    +** key that omits the ROWID.  Compare this key value against the index 
    +** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
    +**
    +** If the P1 index entry is greater than or equal to the key value
    +** then jump to P2.  Otherwise fall through to the next instruction.
    +**
    +** If P5 is non-zero then the key value is increased by an epsilon 
    +** prior to the comparison.  This make the opcode work like IdxGT except
    +** that if the key from register P3 is a prefix of the key in the cursor,
    +** the result is false whereas it would be true with IdxGT.
    +*/
    +/* Opcode: IdxLT P1 P2 P3 * P5
    +**
    +** The P4 register values beginning with P3 form an unpacked index 
    +** key that omits the ROWID.  Compare this key value against the index 
    +** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
    +**
    +** If the P1 index entry is less than the key value then jump to P2.
    +** Otherwise fall through to the next instruction.
    +**
    +** If P5 is non-zero then the key value is increased by an epsilon prior 
    +** to the comparison.  This makes the opcode work like IdxLE.
    +*/
    +case OP_IdxLT:          /* jump, in3 */
    +case OP_IdxGE: {        /* jump, in3 */
    +#if 0  /* local variables moved into u.bq */
    +  VdbeCursor *pC;
    +  int res;
    +  UnpackedRecord r;
    +#endif /* local variables moved into u.bq */
    +
    +  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
    +  u.bq.pC = p->apCsr[pOp->p1];
    +  assert( u.bq.pC!=0 );
    +  if( ALWAYS(u.bq.pC->pCursor!=0) ){
    +    assert( u.bq.pC->deferredMoveto==0 );
    +    assert( pOp->p5==0 || pOp->p5==1 );
    +    assert( pOp->p4type==P4_INT32 );
    +    u.bq.r.pKeyInfo = u.bq.pC->pKeyInfo;
    +    u.bq.r.nField = (u16)pOp->p4.i;
    +    if( pOp->p5 ){
    +      u.bq.r.flags = UNPACKED_INCRKEY | UNPACKED_IGNORE_ROWID;
    +    }else{
    +      u.bq.r.flags = UNPACKED_IGNORE_ROWID;
    +    }
    +    u.bq.r.aMem = &p->aMem[pOp->p3];
    +    rc = sqlite3VdbeIdxKeyCompare(u.bq.pC, &u.bq.r, &u.bq.res);
    +    if( pOp->opcode==OP_IdxLT ){
    +      u.bq.res = -u.bq.res;
    +    }else{
    +      assert( pOp->opcode==OP_IdxGE );
    +      u.bq.res++;
    +    }
    +    if( u.bq.res>0 ){
    +      pc = pOp->p2 - 1 ;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: Destroy P1 P2 P3 * *
    +**
    +** Delete an entire database table or index whose root page in the database
    +** file is given by P1.
    +**
    +** The table being destroyed is in the main database file if P3==0.  If
    +** P3==1 then the table to be clear is in the auxiliary database file
    +** that is used to store tables create using CREATE TEMPORARY TABLE.
    +**
    +** If AUTOVACUUM is enabled then it is possible that another root page
    +** might be moved into the newly deleted root page in order to keep all
    +** root pages contiguous at the beginning of the database.  The former
    +** value of the root page that moved - its value before the move occurred -
    +** is stored in register P2.  If no page 
    +** movement was required (because the table being dropped was already 
    +** the last one in the database) then a zero is stored in register P2.
    +** If AUTOVACUUM is disabled then a zero is stored in register P2.
    +**
    +** See also: Clear
    +*/
    +case OP_Destroy: {     /* out2-prerelease */
    +#if 0  /* local variables moved into u.br */
    +  int iMoved;
    +  int iCnt;
    +  Vdbe *pVdbe;
    +  int iDb;
    +#endif /* local variables moved into u.br */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  u.br.iCnt = 0;
    +  for(u.br.pVdbe=db->pVdbe; u.br.pVdbe; u.br.pVdbe = u.br.pVdbe->pNext){
    +    if( u.br.pVdbe->magic==VDBE_MAGIC_RUN && u.br.pVdbe->inVtabMethod<2 && u.br.pVdbe->pc>=0 ){
    +      u.br.iCnt++;
    +    }
    +  }
    +#else
    +  u.br.iCnt = db->activeVdbeCnt;
    +#endif
    +  if( u.br.iCnt>1 ){
    +    rc = SQLITE_LOCKED;
    +    p->errorAction = OE_Abort;
    +  }else{
    +    u.br.iDb = pOp->p3;
    +    assert( u.br.iCnt==1 );
    +    assert( (p->btreeMask & (1<<u.br.iDb))!=0 );
    +    rc = sqlite3BtreeDropTable(db->aDb[u.br.iDb].pBt, pOp->p1, &u.br.iMoved);
    +    MemSetTypeFlag(pOut, MEM_Int);
    +    pOut->u.i = u.br.iMoved;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    if( rc==SQLITE_OK && u.br.iMoved!=0 ){
    +      sqlite3RootPageMoved(&db->aDb[u.br.iDb], u.br.iMoved, pOp->p1);
    +    }
    +#endif
    +  }
    +  break;
    +}
    +
    +/* Opcode: Clear P1 P2 P3
    +**
    +** Delete all contents of the database table or index whose root page
    +** in the database file is given by P1.  But, unlike Destroy, do not
    +** remove the table or index from the database file.
    +**
    +** The table being clear is in the main database file if P2==0.  If
    +** P2==1 then the table to be clear is in the auxiliary database file
    +** that is used to store tables create using CREATE TEMPORARY TABLE.
    +**
    +** If the P3 value is non-zero, then the table referred to must be an
    +** intkey table (an SQL table, not an index). In this case the row change 
    +** count is incremented by the number of rows in the table being cleared. 
    +** If P3 is greater than zero, then the value stored in register P3 is
    +** also incremented by the number of rows in the table being cleared.
    +**
    +** See also: Destroy
    +*/
    +case OP_Clear: {
    +#if 0  /* local variables moved into u.bs */
    +  int nChange;
    +#endif /* local variables moved into u.bs */
    +
    +  u.bs.nChange = 0;
    +  assert( (p->btreeMask & (1<<pOp->p2))!=0 );
    +  rc = sqlite3BtreeClearTable(
    +      db->aDb[pOp->p2].pBt, pOp->p1, (pOp->p3 ? &u.bs.nChange : 0)
    +  );
    +  if( pOp->p3 ){
    +    p->nChange += u.bs.nChange;
    +    if( pOp->p3>0 ){
    +      p->aMem[pOp->p3].u.i += u.bs.nChange;
    +    }
    +  }
    +  break;
    +}
    +
    +/* Opcode: CreateTable P1 P2 * * *
    +**
    +** Allocate a new table in the main database file if P1==0 or in the
    +** auxiliary database file if P1==1 or in an attached database if
    +** P1>1.  Write the root page number of the new table into
    +** register P2
    +**
    +** The difference between a table and an index is this:  A table must
    +** have a 4-byte integer key and can have arbitrary data.  An index
    +** has an arbitrary key but no data.
    +**
    +** See also: CreateIndex
    +*/
    +/* Opcode: CreateIndex P1 P2 * * *
    +**
    +** Allocate a new index in the main database file if P1==0 or in the
    +** auxiliary database file if P1==1 or in an attached database if
    +** P1>1.  Write the root page number of the new table into
    +** register P2.
    +**
    +** See documentation on OP_CreateTable for additional information.
    +*/
    +case OP_CreateIndex:            /* out2-prerelease */
    +case OP_CreateTable: {          /* out2-prerelease */
    +#if 0  /* local variables moved into u.bt */
    +  int pgno;
    +  int flags;
    +  Db *pDb;
    +#endif /* local variables moved into u.bt */
    +
    +  u.bt.pgno = 0;
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p1))!=0 );
    +  u.bt.pDb = &db->aDb[pOp->p1];
    +  assert( u.bt.pDb->pBt!=0 );
    +  if( pOp->opcode==OP_CreateTable ){
    +    /* u.bt.flags = BTREE_INTKEY; */
    +    u.bt.flags = BTREE_LEAFDATA|BTREE_INTKEY;
    +  }else{
    +    u.bt.flags = BTREE_ZERODATA;
    +  }
    +  rc = sqlite3BtreeCreateTable(u.bt.pDb->pBt, &u.bt.pgno, u.bt.flags);
    +  pOut->u.i = u.bt.pgno;
    +  MemSetTypeFlag(pOut, MEM_Int);
    +  break;
    +}
    +
    +/* Opcode: ParseSchema P1 P2 * P4 *
    +**
    +** Read and parse all entries from the SQLITE_MASTER table of database P1
    +** that match the WHERE clause P4.  P2 is the "force" flag.   Always do
    +** the parsing if P2 is true.  If P2 is false, then this routine is a
    +** no-op if the schema is not currently loaded.  In other words, if P2
    +** is false, the SQLITE_MASTER table is only parsed if the rest of the
    +** schema is already loaded into the symbol table.
    +**
    +** This opcode invokes the parser to create a new virtual machine,
    +** then runs the new virtual machine.  It is thus a re-entrant opcode.
    +*/
    +case OP_ParseSchema: {
    +#if 0  /* local variables moved into u.bu */
    +  int iDb;
    +  const char *zMaster;
    +  char *zSql;
    +  InitData initData;
    +#endif /* local variables moved into u.bu */
    +
    +  u.bu.iDb = pOp->p1;
    +  assert( u.bu.iDb>=0 && u.bu.iDb<db->nDb );
    +
    +  /* If pOp->p2 is 0, then this opcode is being executed to read a
    +  ** single row, for example the row corresponding to a new index
    +  ** created by this VDBE, from the sqlite_master table. It only
    +  ** does this if the corresponding in-memory schema is currently
    +  ** loaded. Otherwise, the new index definition can be loaded along
    +  ** with the rest of the schema when it is required.
    +  **
    +  ** Although the mutex on the BtShared object that corresponds to
    +  ** database u.bu.iDb (the database containing the sqlite_master table
    +  ** read by this instruction) is currently held, it is necessary to
    +  ** obtain the mutexes on all attached databases before checking if
    +  ** the schema of u.bu.iDb is loaded. This is because, at the start of
    +  ** the sqlite3_exec() call below, SQLite will invoke
    +  ** sqlite3BtreeEnterAll(). If all mutexes are not already held, the
    +  ** u.bu.iDb mutex may be temporarily released to avoid deadlock. If
    +  ** this happens, then some other thread may delete the in-memory
    +  ** schema of database u.bu.iDb before the SQL statement runs. The schema
    +  ** will not be reloaded becuase the db->init.busy flag is set. This
    +  ** can result in a "no such table: sqlite_master" or "malformed
    +  ** database schema" error being returned to the user.
    +  */
    +  assert( sqlite3BtreeHoldsMutex(db->aDb[u.bu.iDb].pBt) );
    +  sqlite3BtreeEnterAll(db);
    +  if( pOp->p2 || DbHasProperty(db, u.bu.iDb, DB_SchemaLoaded) ){
    +    u.bu.zMaster = SCHEMA_TABLE(u.bu.iDb);
    +    u.bu.initData.db = db;
    +    u.bu.initData.iDb = pOp->p1;
    +    u.bu.initData.pzErrMsg = &p->zErrMsg;
    +    u.bu.zSql = sqlite3MPrintf(db,
    +       "SELECT name, rootpage, sql FROM '%q'.%s WHERE %s",
    +       db->aDb[u.bu.iDb].zName, u.bu.zMaster, pOp->p4.z);
    +    if( u.bu.zSql==0 ){
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      (void)sqlite3SafetyOff(db);
    +      assert( db->init.busy==0 );
    +      db->init.busy = 1;
    +      u.bu.initData.rc = SQLITE_OK;
    +      assert( !db->mallocFailed );
    +      rc = sqlite3_exec(db, u.bu.zSql, sqlite3InitCallback, &u.bu.initData, 0);
    +      if( rc==SQLITE_OK ) rc = u.bu.initData.rc;
    +      sqlite3DbFree(db, u.bu.zSql);
    +      db->init.busy = 0;
    +      (void)sqlite3SafetyOn(db);
    +    }
    +  }
    +  sqlite3BtreeLeaveAll(db);
    +  if( rc==SQLITE_NOMEM ){
    +    goto no_mem;
    +  }
    +  break;
    +}
    +
    +#if !defined(SQLITE_OMIT_ANALYZE)
    +/* Opcode: LoadAnalysis P1 * * * *
    +**
    +** Read the sqlite_stat1 table for database P1 and load the content
    +** of that table into the internal index hash table.  This will cause
    +** the analysis to be used when preparing all subsequent queries.
    +*/
    +case OP_LoadAnalysis: {
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  rc = sqlite3AnalysisLoad(db, pOp->p1);
    +  break;  
    +}
    +#endif /* !defined(SQLITE_OMIT_ANALYZE) */
    +
    +/* Opcode: DropTable P1 * * P4 *
    +**
    +** Remove the internal (in-memory) data structures that describe
    +** the table named P4 in database P1.  This is called after a table
    +** is dropped in order to keep the internal representation of the
    +** schema consistent with what is on disk.
    +*/
    +case OP_DropTable: {
    +  sqlite3UnlinkAndDeleteTable(db, pOp->p1, pOp->p4.z);
    +  break;
    +}
    +
    +/* Opcode: DropIndex P1 * * P4 *
    +**
    +** Remove the internal (in-memory) data structures that describe
    +** the index named P4 in database P1.  This is called after an index
    +** is dropped in order to keep the internal representation of the
    +** schema consistent with what is on disk.
    +*/
    +case OP_DropIndex: {
    +  sqlite3UnlinkAndDeleteIndex(db, pOp->p1, pOp->p4.z);
    +  break;
    +}
    +
    +/* Opcode: DropTrigger P1 * * P4 *
    +**
    +** Remove the internal (in-memory) data structures that describe
    +** the trigger named P4 in database P1.  This is called after a trigger
    +** is dropped in order to keep the internal representation of the
    +** schema consistent with what is on disk.
    +*/
    +case OP_DropTrigger: {
    +  sqlite3UnlinkAndDeleteTrigger(db, pOp->p1, pOp->p4.z);
    +  break;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +/* Opcode: IntegrityCk P1 P2 P3 * P5
    +**
    +** Do an analysis of the currently open database.  Store in
    +** register P1 the text of an error message describing any problems.
    +** If no problems are found, store a NULL in register P1.
    +**
    +** The register P3 contains the maximum number of allowed errors.
    +** At most reg(P3) errors will be reported.
    +** In other words, the analysis stops as soon as reg(P1) errors are 
    +** seen.  Reg(P1) is updated with the number of errors remaining.
    +**
    +** The root page numbers of all tables in the database are integer
    +** stored in reg(P1), reg(P1+1), reg(P1+2), ....  There are P2 tables
    +** total.
    +**
    +** If P5 is not zero, the check is done on the auxiliary database
    +** file, not the main database file.
    +**
    +** This opcode is used to implement the integrity_check pragma.
    +*/
    +case OP_IntegrityCk: {
    +#if 0  /* local variables moved into u.bv */
    +  int nRoot;      /* Number of tables to check.  (Number of root pages.) */
    +  int *aRoot;     /* Array of rootpage numbers for tables to be checked */
    +  int j;          /* Loop counter */
    +  int nErr;       /* Number of errors reported */
    +  char *z;        /* Text of the error report */
    +  Mem *pnErr;     /* Register keeping track of errors remaining */
    +#endif /* local variables moved into u.bv */
    +
    +  u.bv.nRoot = pOp->p2;
    +  assert( u.bv.nRoot>0 );
    +  u.bv.aRoot = sqlite3DbMallocRaw(db, sizeof(int)*(u.bv.nRoot+1) );
    +  if( u.bv.aRoot==0 ) goto no_mem;
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  u.bv.pnErr = &p->aMem[pOp->p3];
    +  assert( (u.bv.pnErr->flags & MEM_Int)!=0 );
    +  assert( (u.bv.pnErr->flags & (MEM_Str|MEM_Blob))==0 );
    +  pIn1 = &p->aMem[pOp->p1];
    +  for(u.bv.j=0; u.bv.j<u.bv.nRoot; u.bv.j++){
    +    u.bv.aRoot[u.bv.j] = (int)sqlite3VdbeIntValue(&pIn1[u.bv.j]);
    +  }
    +  u.bv.aRoot[u.bv.j] = 0;
    +  assert( pOp->p5<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p5))!=0 );
    +  u.bv.z = sqlite3BtreeIntegrityCheck(db->aDb[pOp->p5].pBt, u.bv.aRoot, u.bv.nRoot,
    +                                 (int)u.bv.pnErr->u.i, &u.bv.nErr);
    +  sqlite3DbFree(db, u.bv.aRoot);
    +  u.bv.pnErr->u.i -= u.bv.nErr;
    +  sqlite3VdbeMemSetNull(pIn1);
    +  if( u.bv.nErr==0 ){
    +    assert( u.bv.z==0 );
    +  }else if( u.bv.z==0 ){
    +    goto no_mem;
    +  }else{
    +    sqlite3VdbeMemSetStr(pIn1, u.bv.z, -1, SQLITE_UTF8, sqlite3_free);
    +  }
    +  UPDATE_MAX_BLOBSIZE(pIn1);
    +  sqlite3VdbeChangeEncoding(pIn1, encoding);
    +  break;
    +}
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +/* Opcode: RowSetAdd P1 P2 * * *
    +**
    +** Insert the integer value held by register P2 into a boolean index
    +** held in register P1.
    +**
    +** An assertion fails if P2 is not an integer.
    +*/
    +case OP_RowSetAdd: {       /* in2 */
    +#if 0  /* local variables moved into u.bw */
    +  Mem *pIdx;
    +  Mem *pVal;
    +#endif /* local variables moved into u.bw */
    +  assert( pOp->p1>0 && pOp->p1<=p->nMem );
    +  u.bw.pIdx = &p->aMem[pOp->p1];
    +  assert( pOp->p2>0 && pOp->p2<=p->nMem );
    +  u.bw.pVal = &p->aMem[pOp->p2];
    +  assert( (u.bw.pVal->flags & MEM_Int)!=0 );
    +  if( (u.bw.pIdx->flags & MEM_RowSet)==0 ){
    +    sqlite3VdbeMemSetRowSet(u.bw.pIdx);
    +    if( (u.bw.pIdx->flags & MEM_RowSet)==0 ) goto no_mem;
    +  }
    +  sqlite3RowSetInsert(u.bw.pIdx->u.pRowSet, u.bw.pVal->u.i);
    +  break;
    +}
    +
    +/* Opcode: RowSetRead P1 P2 P3 * *
    +**
    +** Extract the smallest value from boolean index P1 and put that value into
    +** register P3.  Or, if boolean index P1 is initially empty, leave P3
    +** unchanged and jump to instruction P2.
    +*/
    +case OP_RowSetRead: {       /* jump, out3 */
    +#if 0  /* local variables moved into u.bx */
    +  Mem *pIdx;
    +  i64 val;
    +#endif /* local variables moved into u.bx */
    +  assert( pOp->p1>0 && pOp->p1<=p->nMem );
    +  CHECK_FOR_INTERRUPT;
    +  u.bx.pIdx = &p->aMem[pOp->p1];
    +  pOut = &p->aMem[pOp->p3];
    +  if( (u.bx.pIdx->flags & MEM_RowSet)==0
    +   || sqlite3RowSetNext(u.bx.pIdx->u.pRowSet, &u.bx.val)==0
    +  ){
    +    /* The boolean index is empty */
    +    sqlite3VdbeMemSetNull(u.bx.pIdx);
    +    pc = pOp->p2 - 1;
    +  }else{
    +    /* A value was pulled from the index */
    +    assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +    sqlite3VdbeMemSetInt64(pOut, u.bx.val);
    +  }
    +  break;
    +}
    +
    +/* Opcode: RowSetTest P1 P2 P3 P4
    +**
    +** Register P3 is assumed to hold a 64-bit integer value. If register P1
    +** contains a RowSet object and that RowSet object contains
    +** the value held in P3, jump to register P2. Otherwise, insert the
    +** integer in P3 into the RowSet and continue on to the
    +** next opcode.
    +**
    +** The RowSet object is optimized for the case where successive sets
    +** of integers, where each set contains no duplicates. Each set
    +** of values is identified by a unique P4 value. The first set
    +** must have P4==0, the final set P4=-1.  P4 must be either -1 or
    +** non-negative.  For non-negative values of P4 only the lower 4
    +** bits are significant.
    +**
    +** This allows optimizations: (a) when P4==0 there is no need to test
    +** the rowset object for P3, as it is guaranteed not to contain it,
    +** (b) when P4==-1 there is no need to insert the value, as it will
    +** never be tested for, and (c) when a value that is part of set X is
    +** inserted, there is no need to search to see if the same value was
    +** previously inserted as part of set X (only if it was previously
    +** inserted as part of some other set).
    +*/
    +case OP_RowSetTest: {                     /* jump, in1, in3 */
    +#if 0  /* local variables moved into u.by */
    +  int iSet;
    +  int exists;
    +#endif /* local variables moved into u.by */
    +
    +  u.by.iSet = pOp->p4.i;
    +  assert( pIn3->flags&MEM_Int );
    +
    +  /* If there is anything other than a rowset object in memory cell P1,
    +  ** delete it now and initialize P1 with an empty rowset
    +  */
    +  if( (pIn1->flags & MEM_RowSet)==0 ){
    +    sqlite3VdbeMemSetRowSet(pIn1);
    +    if( (pIn1->flags & MEM_RowSet)==0 ) goto no_mem;
    +  }
    +
    +  assert( pOp->p4type==P4_INT32 );
    +  assert( u.by.iSet==-1 || u.by.iSet>=0 );
    +  if( u.by.iSet ){
    +    u.by.exists = sqlite3RowSetTest(pIn1->u.pRowSet,
    +                               (u8)(u.by.iSet>=0 ? u.by.iSet & 0xf : 0xff),
    +                               pIn3->u.i);
    +    if( u.by.exists ){
    +      pc = pOp->p2 - 1;
    +      break;
    +    }
    +  }
    +  if( u.by.iSet>=0 ){
    +    sqlite3RowSetInsert(pIn1->u.pRowSet, pIn3->u.i);
    +  }
    +  break;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +
    +/* Opcode: Program P1 P2 P3 P4 *
    +**
    +** Execute the trigger program passed as P4 (type P4_SUBPROGRAM). 
    +**
    +** P1 contains the address of the memory cell that contains the first memory 
    +** cell in an array of values used as arguments to the sub-program. P2 
    +** contains the address to jump to if the sub-program throws an IGNORE 
    +** exception using the RAISE() function. Register P3 contains the address 
    +** of a memory cell in this (the parent) VM that is used to allocate the 
    +** memory required by the sub-vdbe at runtime.
    +**
    +** P4 is a pointer to the VM containing the trigger program.
    +*/
    +case OP_Program: {        /* jump */
    +#if 0  /* local variables moved into u.bz */
    +  int nMem;               /* Number of memory registers for sub-program */
    +  int nByte;              /* Bytes of runtime space required for sub-program */
    +  Mem *pRt;               /* Register to allocate runtime space */
    +  Mem *pMem;              /* Used to iterate through memory cells */
    +  Mem *pEnd;              /* Last memory cell in new array */
    +  VdbeFrame *pFrame;      /* New vdbe frame to execute in */
    +  SubProgram *pProgram;   /* Sub-program to execute */
    +  void *t;                /* Token identifying trigger */
    +#endif /* local variables moved into u.bz */
    +
    +  u.bz.pProgram = pOp->p4.pProgram;
    +  u.bz.pRt = &p->aMem[pOp->p3];
    +  assert( u.bz.pProgram->nOp>0 );
    +
    +  /* If the p5 flag is clear, then recursive invocation of triggers is
    +  ** disabled for backwards compatibility (p5 is set if this sub-program
    +  ** is really a trigger, not a foreign key action, and the flag set
    +  ** and cleared by the "PRAGMA recursive_triggers" command is clear).
    +  **
    +  ** It is recursive invocation of triggers, at the SQL level, that is
    +  ** disabled. In some cases a single trigger may generate more than one
    +  ** SubProgram (if the trigger may be executed with more than one different
    +  ** ON CONFLICT algorithm). SubProgram structures associated with a
    +  ** single trigger all have the same value for the SubProgram.token
    +  ** variable.  */
    +  if( pOp->p5 ){
    +    u.bz.t = u.bz.pProgram->token;
    +    for(u.bz.pFrame=p->pFrame; u.bz.pFrame && u.bz.pFrame->token!=u.bz.t; u.bz.pFrame=u.bz.pFrame->pParent);
    +    if( u.bz.pFrame ) break;
    +  }
    +
    +  if( p->nFrame>=db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){
    +    rc = SQLITE_ERROR;
    +    sqlite3SetString(&p->zErrMsg, db, "too many levels of trigger recursion");
    +    break;
    +  }
    +
    +  /* Register u.bz.pRt is used to store the memory required to save the state
    +  ** of the current program, and the memory required at runtime to execute
    +  ** the trigger program. If this trigger has been fired before, then u.bz.pRt
    +  ** is already allocated. Otherwise, it must be initialized.  */
    +  if( (u.bz.pRt->flags&MEM_Frame)==0 ){
    +    /* SubProgram.nMem is set to the number of memory cells used by the
    +    ** program stored in SubProgram.aOp. As well as these, one memory
    +    ** cell is required for each cursor used by the program. Set local
    +    ** variable u.bz.nMem (and later, VdbeFrame.nChildMem) to this value.
    +    */
    +    u.bz.nMem = u.bz.pProgram->nMem + u.bz.pProgram->nCsr;
    +    u.bz.nByte = ROUND8(sizeof(VdbeFrame))
    +              + u.bz.nMem * sizeof(Mem)
    +              + u.bz.pProgram->nCsr * sizeof(VdbeCursor *);
    +    u.bz.pFrame = sqlite3DbMallocZero(db, u.bz.nByte);
    +    if( !u.bz.pFrame ){
    +      goto no_mem;
    +    }
    +    sqlite3VdbeMemRelease(u.bz.pRt);
    +    u.bz.pRt->flags = MEM_Frame;
    +    u.bz.pRt->u.pFrame = u.bz.pFrame;
    +
    +    u.bz.pFrame->v = p;
    +    u.bz.pFrame->nChildMem = u.bz.nMem;
    +    u.bz.pFrame->nChildCsr = u.bz.pProgram->nCsr;
    +    u.bz.pFrame->pc = pc;
    +    u.bz.pFrame->aMem = p->aMem;
    +    u.bz.pFrame->nMem = p->nMem;
    +    u.bz.pFrame->apCsr = p->apCsr;
    +    u.bz.pFrame->nCursor = p->nCursor;
    +    u.bz.pFrame->aOp = p->aOp;
    +    u.bz.pFrame->nOp = p->nOp;
    +    u.bz.pFrame->token = u.bz.pProgram->token;
    +
    +    u.bz.pEnd = &VdbeFrameMem(u.bz.pFrame)[u.bz.pFrame->nChildMem];
    +    for(u.bz.pMem=VdbeFrameMem(u.bz.pFrame); u.bz.pMem!=u.bz.pEnd; u.bz.pMem++){
    +      u.bz.pMem->flags = MEM_Null;
    +      u.bz.pMem->db = db;
    +    }
    +  }else{
    +    u.bz.pFrame = u.bz.pRt->u.pFrame;
    +    assert( u.bz.pProgram->nMem+u.bz.pProgram->nCsr==u.bz.pFrame->nChildMem );
    +    assert( u.bz.pProgram->nCsr==u.bz.pFrame->nChildCsr );
    +    assert( pc==u.bz.pFrame->pc );
    +  }
    +
    +  p->nFrame++;
    +  u.bz.pFrame->pParent = p->pFrame;
    +  u.bz.pFrame->lastRowid = db->lastRowid;
    +  u.bz.pFrame->nChange = p->nChange;
    +  p->nChange = 0;
    +  p->pFrame = u.bz.pFrame;
    +  p->aMem = &VdbeFrameMem(u.bz.pFrame)[-1];
    +  p->nMem = u.bz.pFrame->nChildMem;
    +  p->nCursor = (u16)u.bz.pFrame->nChildCsr;
    +  p->apCsr = (VdbeCursor **)&p->aMem[p->nMem+1];
    +  p->aOp = u.bz.pProgram->aOp;
    +  p->nOp = u.bz.pProgram->nOp;
    +  pc = -1;
    +
    +  break;
    +}
    +
    +/* Opcode: Param P1 P2 * * *
    +**
    +** This opcode is only ever present in sub-programs called via the 
    +** OP_Program instruction. Copy a value currently stored in a memory 
    +** cell of the calling (parent) frame to cell P2 in the current frames 
    +** address space. This is used by trigger programs to access the new.* 
    +** and old.* values.
    +**
    +** The address of the cell in the parent frame is determined by adding
    +** the value of the P1 argument to the value of the P1 argument to the
    +** calling OP_Program instruction.
    +*/
    +case OP_Param: {           /* out2-prerelease */
    +#if 0  /* local variables moved into u.ca */
    +  VdbeFrame *pFrame;
    +  Mem *pIn;
    +#endif /* local variables moved into u.ca */
    +  u.ca.pFrame = p->pFrame;
    +  u.ca.pIn = &u.ca.pFrame->aMem[pOp->p1 + u.ca.pFrame->aOp[u.ca.pFrame->pc].p1];
    +  sqlite3VdbeMemShallowCopy(pOut, u.ca.pIn, MEM_Ephem);
    +  break;
    +}
    +
    +#endif /* #ifndef SQLITE_OMIT_TRIGGER */
    +
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +/* Opcode: FkCounter P1 P2 * * *
    +**
    +** Increment a "constraint counter" by P2 (P2 may be negative or positive).
    +** If P1 is non-zero, the database constraint counter is incremented 
    +** (deferred foreign key constraints). Otherwise, if P1 is zero, the 
    +** statement counter is incremented (immediate foreign key constraints).
    +*/
    +case OP_FkCounter: {
    +  if( pOp->p1 ){
    +    db->nDeferredCons += pOp->p2;
    +  }else{
    +    p->nFkConstraint += pOp->p2;
    +  }
    +  break;
    +}
    +
    +/* Opcode: FkIfZero P1 P2 * * *
    +**
    +** This opcode tests if a foreign key constraint-counter is currently zero.
    +** If so, jump to instruction P2. Otherwise, fall through to the next 
    +** instruction.
    +**
    +** If P1 is non-zero, then the jump is taken if the database constraint-counter
    +** is zero (the one that counts deferred constraint violations). If P1 is
    +** zero, the jump is taken if the statement constraint-counter is zero
    +** (immediate foreign key constraint violations).
    +*/
    +case OP_FkIfZero: {         /* jump */
    +  if( pOp->p1 ){
    +    if( db->nDeferredCons==0 ) pc = pOp->p2-1;
    +  }else{
    +    if( p->nFkConstraint==0 ) pc = pOp->p2-1;
    +  }
    +  break;
    +}
    +#endif /* #ifndef SQLITE_OMIT_FOREIGN_KEY */
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +/* Opcode: MemMax P1 P2 * * *
    +**
    +** P1 is a register in the root frame of this VM (the root frame is
    +** different from the current frame if this instruction is being executed
    +** within a sub-program). Set the value of register P1 to the maximum of 
    +** its current value and the value in register P2.
    +**
    +** This instruction throws an error if the memory cell is not initially
    +** an integer.
    +*/
    +case OP_MemMax: {        /* in2 */
    +#if 0  /* local variables moved into u.cb */
    +  Mem *pIn1;
    +  VdbeFrame *pFrame;
    +#endif /* local variables moved into u.cb */
    +  if( p->pFrame ){
    +    for(u.cb.pFrame=p->pFrame; u.cb.pFrame->pParent; u.cb.pFrame=u.cb.pFrame->pParent);
    +    u.cb.pIn1 = &u.cb.pFrame->aMem[pOp->p1];
    +  }else{
    +    u.cb.pIn1 = &p->aMem[pOp->p1];
    +  }
    +  sqlite3VdbeMemIntegerify(u.cb.pIn1);
    +  sqlite3VdbeMemIntegerify(pIn2);
    +  if( u.cb.pIn1->u.i<pIn2->u.i){
    +    u.cb.pIn1->u.i = pIn2->u.i;
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_AUTOINCREMENT */
    +
    +/* Opcode: IfPos P1 P2 * * *
    +**
    +** If the value of register P1 is 1 or greater, jump to P2.
    +**
    +** It is illegal to use this instruction on a register that does
    +** not contain an integer.  An assertion fault will result if you try.
    +*/
    +case OP_IfPos: {        /* jump, in1 */
    +  assert( pIn1->flags&MEM_Int );
    +  if( pIn1->u.i>0 ){
    +     pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: IfNeg P1 P2 * * *
    +**
    +** If the value of register P1 is less than zero, jump to P2. 
    +**
    +** It is illegal to use this instruction on a register that does
    +** not contain an integer.  An assertion fault will result if you try.
    +*/
    +case OP_IfNeg: {        /* jump, in1 */
    +  assert( pIn1->flags&MEM_Int );
    +  if( pIn1->u.i<0 ){
    +     pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: IfZero P1 P2 * * *
    +**
    +** If the value of register P1 is exactly 0, jump to P2. 
    +**
    +** It is illegal to use this instruction on a register that does
    +** not contain an integer.  An assertion fault will result if you try.
    +*/
    +case OP_IfZero: {        /* jump, in1 */
    +  assert( pIn1->flags&MEM_Int );
    +  if( pIn1->u.i==0 ){
    +     pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +
    +/* Opcode: AggStep * P2 P3 P4 P5
    +**
    +** Execute the step function for an aggregate.  The
    +** function has P5 arguments.   P4 is a pointer to the FuncDef
    +** structure that specifies the function.  Use register
    +** P3 as the accumulator.
    +**
    +** The P5 arguments are taken from register P2 and its
    +** successors.
    +*/
    +case OP_AggStep: {
    +#if 0  /* local variables moved into u.cc */
    +  int n;
    +  int i;
    +  Mem *pMem;
    +  Mem *pRec;
    +  sqlite3_context ctx;
    +  sqlite3_value **apVal;
    +#endif /* local variables moved into u.cc */
    +
    +  u.cc.n = pOp->p5;
    +  assert( u.cc.n>=0 );
    +  u.cc.pRec = &p->aMem[pOp->p2];
    +  u.cc.apVal = p->apArg;
    +  assert( u.cc.apVal || u.cc.n==0 );
    +  for(u.cc.i=0; u.cc.i<u.cc.n; u.cc.i++, u.cc.pRec++){
    +    u.cc.apVal[u.cc.i] = u.cc.pRec;
    +    sqlite3VdbeMemStoreType(u.cc.pRec);
    +  }
    +  u.cc.ctx.pFunc = pOp->p4.pFunc;
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  u.cc.ctx.pMem = u.cc.pMem = &p->aMem[pOp->p3];
    +  u.cc.pMem->n++;
    +  u.cc.ctx.s.flags = MEM_Null;
    +  u.cc.ctx.s.z = 0;
    +  u.cc.ctx.s.zMalloc = 0;
    +  u.cc.ctx.s.xDel = 0;
    +  u.cc.ctx.s.db = db;
    +  u.cc.ctx.isError = 0;
    +  u.cc.ctx.pColl = 0;
    +  if( u.cc.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
    +    assert( pOp>p->aOp );
    +    assert( pOp[-1].p4type==P4_COLLSEQ );
    +    assert( pOp[-1].opcode==OP_CollSeq );
    +    u.cc.ctx.pColl = pOp[-1].p4.pColl;
    +  }
    +  (u.cc.ctx.pFunc->xStep)(&u.cc.ctx, u.cc.n, u.cc.apVal);
    +  if( u.cc.ctx.isError ){
    +    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.cc.ctx.s));
    +    rc = u.cc.ctx.isError;
    +  }
    +  sqlite3VdbeMemRelease(&u.cc.ctx.s);
    +  break;
    +}
    +
    +/* Opcode: AggFinal P1 P2 * P4 *
    +**
    +** Execute the finalizer function for an aggregate.  P1 is
    +** the memory location that is the accumulator for the aggregate.
    +**
    +** P2 is the number of arguments that the step function takes and
    +** P4 is a pointer to the FuncDef for this function.  The P2
    +** argument is not used by this opcode.  It is only there to disambiguate
    +** functions that can take varying numbers of arguments.  The
    +** P4 argument is only needed for the degenerate case where
    +** the step function was not previously called.
    +*/
    +case OP_AggFinal: {
    +#if 0  /* local variables moved into u.cd */
    +  Mem *pMem;
    +#endif /* local variables moved into u.cd */
    +  assert( pOp->p1>0 && pOp->p1<=p->nMem );
    +  u.cd.pMem = &p->aMem[pOp->p1];
    +  assert( (u.cd.pMem->flags & ~(MEM_Null|MEM_Agg))==0 );
    +  rc = sqlite3VdbeMemFinalize(u.cd.pMem, pOp->p4.pFunc);
    +  if( rc ){
    +    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(u.cd.pMem));
    +  }
    +  sqlite3VdbeChangeEncoding(u.cd.pMem, encoding);
    +  UPDATE_MAX_BLOBSIZE(u.cd.pMem);
    +  if( sqlite3VdbeMemTooBig(u.cd.pMem) ){
    +    goto too_big;
    +  }
    +  break;
    +}
    +
    +
    +#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
    +/* Opcode: Vacuum * * * * *
    +**
    +** Vacuum the entire database.  This opcode will cause other virtual
    +** machines to be created and run.  It may not be called from within
    +** a transaction.
    +*/
    +case OP_Vacuum: {
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; 
    +  rc = sqlite3RunVacuum(&p->zErrMsg, db);
    +  if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +  break;
    +}
    +#endif
    +
    +#if !defined(SQLITE_OMIT_AUTOVACUUM)
    +/* Opcode: IncrVacuum P1 P2 * * *
    +**
    +** Perform a single step of the incremental vacuum procedure on
    +** the P1 database. If the vacuum has finished, jump to instruction
    +** P2. Otherwise, fall through to the next instruction.
    +*/
    +case OP_IncrVacuum: {        /* jump */
    +#if 0  /* local variables moved into u.ce */
    +  Btree *pBt;
    +#endif /* local variables moved into u.ce */
    +
    +  assert( pOp->p1>=0 && pOp->p1<db->nDb );
    +  assert( (p->btreeMask & (1<<pOp->p1))!=0 );
    +  u.ce.pBt = db->aDb[pOp->p1].pBt;
    +  rc = sqlite3BtreeIncrVacuum(u.ce.pBt);
    +  if( rc==SQLITE_DONE ){
    +    pc = pOp->p2 - 1;
    +    rc = SQLITE_OK;
    +  }
    +  break;
    +}
    +#endif
    +
    +/* Opcode: Expire P1 * * * *
    +**
    +** Cause precompiled statements to become expired. An expired statement
    +** fails with an error code of SQLITE_SCHEMA if it is ever executed 
    +** (via sqlite3_step()).
    +** 
    +** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,
    +** then only the currently executing statement is affected. 
    +*/
    +case OP_Expire: {
    +  if( !pOp->p1 ){
    +    sqlite3ExpirePreparedStatements(db);
    +  }else{
    +    p->expired = 1;
    +  }
    +  break;
    +}
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/* Opcode: TableLock P1 P2 P3 P4 *
    +**
    +** Obtain a lock on a particular table. This instruction is only used when
    +** the shared-cache feature is enabled. 
    +**
    +** P1 is the index of the database in sqlite3.aDb[] of the database
    +** on which the lock is acquired.  A readlock is obtained if P3==0 or
    +** a write lock if P3==1.
    +**
    +** P2 contains the root-page of the table to lock.
    +**
    +** P4 contains a pointer to the name of the table being locked. This is only
    +** used to generate an error message if the lock cannot be obtained.
    +*/
    +case OP_TableLock: {
    +  u8 isWriteLock = (u8)pOp->p3;
    +  if( isWriteLock || 0==(db->flags&SQLITE_ReadUncommitted) ){
    +    int p1 = pOp->p1; 
    +    assert( p1>=0 && p1<db->nDb );
    +    assert( (p->btreeMask & (1<<p1))!=0 );
    +    assert( isWriteLock==0 || isWriteLock==1 );
    +    rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);
    +    if( (rc&0xFF)==SQLITE_LOCKED ){
    +      const char *z = pOp->p4.z;
    +      sqlite3SetString(&p->zErrMsg, db, "database table is locked: %s", z);
    +    }
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_SHARED_CACHE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VBegin * * * P4 *
    +**
    +** P4 may be a pointer to an sqlite3_vtab structure. If so, call the 
    +** xBegin method for that table.
    +**
    +** Also, whether or not P4 is set, check that this is not being called from
    +** within a callback to a virtual table xSync() method. If it is, the error
    +** code will be set to SQLITE_LOCKED.
    +*/
    +case OP_VBegin: {
    +#if 0  /* local variables moved into u.cf */
    +  VTable *pVTab;
    +#endif /* local variables moved into u.cf */
    +  u.cf.pVTab = pOp->p4.pVtab;
    +  rc = sqlite3VtabBegin(db, u.cf.pVTab);
    +  if( u.cf.pVTab ){
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = u.cf.pVTab->pVtab->zErrMsg;
    +    u.cf.pVTab->pVtab->zErrMsg = 0;
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VCreate P1 * * P4 *
    +**
    +** P4 is the name of a virtual table in database P1. Call the xCreate method
    +** for that table.
    +*/
    +case OP_VCreate: {
    +  rc = sqlite3VtabCallCreate(db, pOp->p1, pOp->p4.z, &p->zErrMsg);
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VDestroy P1 * * P4 *
    +**
    +** P4 is the name of a virtual table in database P1.  Call the xDestroy method
    +** of that table.
    +*/
    +case OP_VDestroy: {
    +  p->inVtabMethod = 2;
    +  rc = sqlite3VtabCallDestroy(db, pOp->p1, pOp->p4.z);
    +  p->inVtabMethod = 0;
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VOpen P1 * * P4 *
    +**
    +** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
    +** P1 is a cursor number.  This opcode opens a cursor to the virtual
    +** table and stores that cursor in P1.
    +*/
    +case OP_VOpen: {
    +#if 0  /* local variables moved into u.cg */
    +  VdbeCursor *pCur;
    +  sqlite3_vtab_cursor *pVtabCursor;
    +  sqlite3_vtab *pVtab;
    +  sqlite3_module *pModule;
    +#endif /* local variables moved into u.cg */
    +
    +  u.cg.pCur = 0;
    +  u.cg.pVtabCursor = 0;
    +  u.cg.pVtab = pOp->p4.pVtab->pVtab;
    +  u.cg.pModule = (sqlite3_module *)u.cg.pVtab->pModule;
    +  assert(u.cg.pVtab && u.cg.pModule);
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +  rc = u.cg.pModule->xOpen(u.cg.pVtab, &u.cg.pVtabCursor);
    +  sqlite3DbFree(db, p->zErrMsg);
    +  p->zErrMsg = u.cg.pVtab->zErrMsg;
    +  u.cg.pVtab->zErrMsg = 0;
    +  if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +  if( SQLITE_OK==rc ){
    +    /* Initialize sqlite3_vtab_cursor base class */
    +    u.cg.pVtabCursor->pVtab = u.cg.pVtab;
    +
    +    /* Initialise vdbe cursor object */
    +    u.cg.pCur = allocateCursor(p, pOp->p1, 0, -1, 0);
    +    if( u.cg.pCur ){
    +      u.cg.pCur->pVtabCursor = u.cg.pVtabCursor;
    +      u.cg.pCur->pModule = u.cg.pVtabCursor->pVtab->pModule;
    +    }else{
    +      db->mallocFailed = 1;
    +      u.cg.pModule->xClose(u.cg.pVtabCursor);
    +    }
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VFilter P1 P2 P3 P4 *
    +**
    +** P1 is a cursor opened using VOpen.  P2 is an address to jump to if
    +** the filtered result set is empty.
    +**
    +** P4 is either NULL or a string that was generated by the xBestIndex
    +** method of the module.  The interpretation of the P4 string is left
    +** to the module implementation.
    +**
    +** This opcode invokes the xFilter method on the virtual table specified
    +** by P1.  The integer query plan parameter to xFilter is stored in register
    +** P3. Register P3+1 stores the argc parameter to be passed to the
    +** xFilter method. Registers P3+2..P3+1+argc are the argc
    +** additional parameters which are passed to
    +** xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.
    +**
    +** A jump is made to P2 if the result set after filtering would be empty.
    +*/
    +case OP_VFilter: {   /* jump */
    +#if 0  /* local variables moved into u.ch */
    +  int nArg;
    +  int iQuery;
    +  const sqlite3_module *pModule;
    +  Mem *pQuery;
    +  Mem *pArgc;
    +  sqlite3_vtab_cursor *pVtabCursor;
    +  sqlite3_vtab *pVtab;
    +  VdbeCursor *pCur;
    +  int res;
    +  int i;
    +  Mem **apArg;
    +#endif /* local variables moved into u.ch */
    +
    +  u.ch.pQuery = &p->aMem[pOp->p3];
    +  u.ch.pArgc = &u.ch.pQuery[1];
    +  u.ch.pCur = p->apCsr[pOp->p1];
    +  REGISTER_TRACE(pOp->p3, u.ch.pQuery);
    +  assert( u.ch.pCur->pVtabCursor );
    +  u.ch.pVtabCursor = u.ch.pCur->pVtabCursor;
    +  u.ch.pVtab = u.ch.pVtabCursor->pVtab;
    +  u.ch.pModule = u.ch.pVtab->pModule;
    +
    +  /* Grab the index number and argc parameters */
    +  assert( (u.ch.pQuery->flags&MEM_Int)!=0 && u.ch.pArgc->flags==MEM_Int );
    +  u.ch.nArg = (int)u.ch.pArgc->u.i;
    +  u.ch.iQuery = (int)u.ch.pQuery->u.i;
    +
    +  /* Invoke the xFilter method */
    +  {
    +    u.ch.res = 0;
    +    u.ch.apArg = p->apArg;
    +    for(u.ch.i = 0; u.ch.i<u.ch.nArg; u.ch.i++){
    +      u.ch.apArg[u.ch.i] = &u.ch.pArgc[u.ch.i+1];
    +      sqlite3VdbeMemStoreType(u.ch.apArg[u.ch.i]);
    +    }
    +
    +    if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +    p->inVtabMethod = 1;
    +    rc = u.ch.pModule->xFilter(u.ch.pVtabCursor, u.ch.iQuery, pOp->p4.z, u.ch.nArg, u.ch.apArg);
    +    p->inVtabMethod = 0;
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = u.ch.pVtab->zErrMsg;
    +    u.ch.pVtab->zErrMsg = 0;
    +    if( rc==SQLITE_OK ){
    +      u.ch.res = u.ch.pModule->xEof(u.ch.pVtabCursor);
    +    }
    +    if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +
    +    if( u.ch.res ){
    +      pc = pOp->p2 - 1;
    +    }
    +  }
    +  u.ch.pCur->nullRow = 0;
    +
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VColumn P1 P2 P3 * *
    +**
    +** Store the value of the P2-th column of
    +** the row of the virtual-table that the 
    +** P1 cursor is pointing to into register P3.
    +*/
    +case OP_VColumn: {
    +#if 0  /* local variables moved into u.ci */
    +  sqlite3_vtab *pVtab;
    +  const sqlite3_module *pModule;
    +  Mem *pDest;
    +  sqlite3_context sContext;
    +#endif /* local variables moved into u.ci */
    +
    +  VdbeCursor *pCur = p->apCsr[pOp->p1];
    +  assert( pCur->pVtabCursor );
    +  assert( pOp->p3>0 && pOp->p3<=p->nMem );
    +  u.ci.pDest = &p->aMem[pOp->p3];
    +  if( pCur->nullRow ){
    +    sqlite3VdbeMemSetNull(u.ci.pDest);
    +    break;
    +  }
    +  u.ci.pVtab = pCur->pVtabCursor->pVtab;
    +  u.ci.pModule = u.ci.pVtab->pModule;
    +  assert( u.ci.pModule->xColumn );
    +  memset(&u.ci.sContext, 0, sizeof(u.ci.sContext));
    +
    +  /* The output cell may already have a buffer allocated. Move
    +  ** the current contents to u.ci.sContext.s so in case the user-function
    +  ** can use the already allocated buffer instead of allocating a
    +  ** new one.
    +  */
    +  sqlite3VdbeMemMove(&u.ci.sContext.s, u.ci.pDest);
    +  MemSetTypeFlag(&u.ci.sContext.s, MEM_Null);
    +
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +  rc = u.ci.pModule->xColumn(pCur->pVtabCursor, &u.ci.sContext, pOp->p2);
    +  sqlite3DbFree(db, p->zErrMsg);
    +  p->zErrMsg = u.ci.pVtab->zErrMsg;
    +  u.ci.pVtab->zErrMsg = 0;
    +  if( u.ci.sContext.isError ){
    +    rc = u.ci.sContext.isError;
    +  }
    +
    +  /* Copy the result of the function to the P3 register. We
    +  ** do this regardless of whether or not an error occurred to ensure any
    +  ** dynamic allocation in u.ci.sContext.s (a Mem struct) is  released.
    +  */
    +  sqlite3VdbeChangeEncoding(&u.ci.sContext.s, encoding);
    +  REGISTER_TRACE(pOp->p3, u.ci.pDest);
    +  sqlite3VdbeMemMove(u.ci.pDest, &u.ci.sContext.s);
    +  UPDATE_MAX_BLOBSIZE(u.ci.pDest);
    +
    +  if( sqlite3SafetyOn(db) ){
    +    goto abort_due_to_misuse;
    +  }
    +  if( sqlite3VdbeMemTooBig(u.ci.pDest) ){
    +    goto too_big;
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VNext P1 P2 * * *
    +**
    +** Advance virtual table P1 to the next row in its result set and
    +** jump to instruction P2.  Or, if the virtual table has reached
    +** the end of its result set, then fall through to the next instruction.
    +*/
    +case OP_VNext: {   /* jump */
    +#if 0  /* local variables moved into u.cj */
    +  sqlite3_vtab *pVtab;
    +  const sqlite3_module *pModule;
    +  int res;
    +  VdbeCursor *pCur;
    +#endif /* local variables moved into u.cj */
    +
    +  u.cj.res = 0;
    +  u.cj.pCur = p->apCsr[pOp->p1];
    +  assert( u.cj.pCur->pVtabCursor );
    +  if( u.cj.pCur->nullRow ){
    +    break;
    +  }
    +  u.cj.pVtab = u.cj.pCur->pVtabCursor->pVtab;
    +  u.cj.pModule = u.cj.pVtab->pModule;
    +  assert( u.cj.pModule->xNext );
    +
    +  /* Invoke the xNext() method of the module. There is no way for the
    +  ** underlying implementation to return an error if one occurs during
    +  ** xNext(). Instead, if an error occurs, true is returned (indicating that
    +  ** data is available) and the error code returned when xColumn or
    +  ** some other method is next invoked on the save virtual table cursor.
    +  */
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +  p->inVtabMethod = 1;
    +  rc = u.cj.pModule->xNext(u.cj.pCur->pVtabCursor);
    +  p->inVtabMethod = 0;
    +  sqlite3DbFree(db, p->zErrMsg);
    +  p->zErrMsg = u.cj.pVtab->zErrMsg;
    +  u.cj.pVtab->zErrMsg = 0;
    +  if( rc==SQLITE_OK ){
    +    u.cj.res = u.cj.pModule->xEof(u.cj.pCur->pVtabCursor);
    +  }
    +  if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +
    +  if( !u.cj.res ){
    +    /* If there is data, jump to P2 */
    +    pc = pOp->p2 - 1;
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VRename P1 * * P4 *
    +**
    +** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
    +** This opcode invokes the corresponding xRename method. The value
    +** in register P1 is passed as the zName argument to the xRename method.
    +*/
    +case OP_VRename: {
    +#if 0  /* local variables moved into u.ck */
    +  sqlite3_vtab *pVtab;
    +  Mem *pName;
    +#endif /* local variables moved into u.ck */
    +
    +  u.ck.pVtab = pOp->p4.pVtab->pVtab;
    +  u.ck.pName = &p->aMem[pOp->p1];
    +  assert( u.ck.pVtab->pModule->xRename );
    +  REGISTER_TRACE(pOp->p1, u.ck.pName);
    +  assert( u.ck.pName->flags & MEM_Str );
    +  if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +  rc = u.ck.pVtab->pModule->xRename(u.ck.pVtab, u.ck.pName->z);
    +  sqlite3DbFree(db, p->zErrMsg);
    +  p->zErrMsg = u.ck.pVtab->zErrMsg;
    +  u.ck.pVtab->zErrMsg = 0;
    +  if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +
    +  break;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Opcode: VUpdate P1 P2 P3 P4 *
    +**
    +** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
    +** This opcode invokes the corresponding xUpdate method. P2 values
    +** are contiguous memory cells starting at P3 to pass to the xUpdate 
    +** invocation. The value in register (P3+P2-1) corresponds to the 
    +** p2th element of the argv array passed to xUpdate.
    +**
    +** The xUpdate method will do a DELETE or an INSERT or both.
    +** The argv[0] element (which corresponds to memory cell P3)
    +** is the rowid of a row to delete.  If argv[0] is NULL then no 
    +** deletion occurs.  The argv[1] element is the rowid of the new 
    +** row.  This can be NULL to have the virtual table select the new 
    +** rowid for itself.  The subsequent elements in the array are 
    +** the values of columns in the new row.
    +**
    +** If P2==1 then no insert is performed.  argv[0] is the rowid of
    +** a row to delete.
    +**
    +** P1 is a boolean flag. If it is set to true and the xUpdate call
    +** is successful, then the value returned by sqlite3_last_insert_rowid() 
    +** is set to the value of the rowid for the row just inserted.
    +*/
    +case OP_VUpdate: {
    +#if 0  /* local variables moved into u.cl */
    +  sqlite3_vtab *pVtab;
    +  sqlite3_module *pModule;
    +  int nArg;
    +  int i;
    +  sqlite_int64 rowid;
    +  Mem **apArg;
    +  Mem *pX;
    +#endif /* local variables moved into u.cl */
    +
    +  u.cl.pVtab = pOp->p4.pVtab->pVtab;
    +  u.cl.pModule = (sqlite3_module *)u.cl.pVtab->pModule;
    +  u.cl.nArg = pOp->p2;
    +  assert( pOp->p4type==P4_VTAB );
    +  if( ALWAYS(u.cl.pModule->xUpdate) ){
    +    u.cl.apArg = p->apArg;
    +    u.cl.pX = &p->aMem[pOp->p3];
    +    for(u.cl.i=0; u.cl.i<u.cl.nArg; u.cl.i++){
    +      sqlite3VdbeMemStoreType(u.cl.pX);
    +      u.cl.apArg[u.cl.i] = u.cl.pX;
    +      u.cl.pX++;
    +    }
    +    if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;
    +    rc = u.cl.pModule->xUpdate(u.cl.pVtab, u.cl.nArg, u.cl.apArg, &u.cl.rowid);
    +    sqlite3DbFree(db, p->zErrMsg);
    +    p->zErrMsg = u.cl.pVtab->zErrMsg;
    +    u.cl.pVtab->zErrMsg = 0;
    +    if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
    +    if( rc==SQLITE_OK && pOp->p1 ){
    +      assert( u.cl.nArg>1 && u.cl.apArg[0] && (u.cl.apArg[0]->flags&MEM_Null) );
    +      db->lastRowid = u.cl.rowid;
    +    }
    +    p->nChange++;
    +  }
    +  break;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +#ifndef  SQLITE_OMIT_PAGER_PRAGMAS
    +/* Opcode: Pagecount P1 P2 * * *
    +**
    +** Write the current number of pages in database P1 to memory cell P2.
    +*/
    +case OP_Pagecount: {            /* out2-prerelease */
    +#if 0  /* local variables moved into u.cm */
    +  int p1;
    +  int nPage;
    +  Pager *pPager;
    +#endif /* local variables moved into u.cm */
    +
    +  u.cm.p1 = pOp->p1;
    +  u.cm.pPager = sqlite3BtreePager(db->aDb[u.cm.p1].pBt);
    +  rc = sqlite3PagerPagecount(u.cm.pPager, &u.cm.nPage);
    +  /* OP_Pagecount is always called from within a read transaction.  The
    +  ** page count has already been successfully read and cached.  So the
    +  ** sqlite3PagerPagecount() call above cannot fail. */
    +  if( ALWAYS(rc==SQLITE_OK) ){
    +    pOut->flags = MEM_Int;
    +    pOut->u.i = u.cm.nPage;
    +  }
    +  break;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_TRACE
    +/* Opcode: Trace * * * P4 *
    +**
    +** If tracing is enabled (by the sqlite3_trace()) interface, then
    +** the UTF-8 string contained in P4 is emitted on the trace callback.
    +*/
    +case OP_Trace: {
    +#if 0  /* local variables moved into u.cn */
    +  char *zTrace;
    +#endif /* local variables moved into u.cn */
    +
    +  u.cn.zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
    +  if( u.cn.zTrace ){
    +    if( db->xTrace ){
    +      db->xTrace(db->pTraceArg, u.cn.zTrace);
    +    }
    +#ifdef SQLITE_DEBUG
    +    if( (db->flags & SQLITE_SqlTrace)!=0 ){
    +      sqlite3DebugPrintf("SQL-trace: %s\n", u.cn.zTrace);
    +    }
    +#endif /* SQLITE_DEBUG */
    +  }
    +  break;
    +}
    +#endif
    +
    +
    +/* Opcode: Noop * * * * *
    +**
    +** Do nothing.  This instruction is often useful as a jump
    +** destination.
    +*/
    +/*
    +** The magic Explain opcode are only inserted when explain==2 (which
    +** is to say when the EXPLAIN QUERY PLAN syntax is used.)
    +** This opcode records information from the optimizer.  It is the
    +** the same as a no-op.  This opcodesnever appears in a real VM program.
    +*/
    +default: {          /* This is really OP_Noop and OP_Explain */
    +  break;
    +}
    +
    +/*****************************************************************************
    +** The cases of the switch statement above this line should all be indented
    +** by 6 spaces.  But the left-most 6 spaces have been removed to improve the
    +** readability.  From this point on down, the normal indentation rules are
    +** restored.
    +*****************************************************************************/
    +    }
    +
    +#ifdef VDBE_PROFILE
    +    {
    +      u64 elapsed = sqlite3Hwtime() - start;
    +      pOp->cycles += elapsed;
    +      pOp->cnt++;
    +#if 0
    +        fprintf(stdout, "%10llu ", elapsed);
    +        sqlite3VdbePrintOp(stdout, origPc, &p->aOp[origPc]);
    +#endif
    +    }
    +#endif
    +
    +    /* The following code adds nothing to the actual functionality
    +    ** of the program.  It is only here for testing and debugging.
    +    ** On the other hand, it does burn CPU cycles every time through
    +    ** the evaluator loop.  So we can leave it out when NDEBUG is defined.
    +    */
    +#ifndef NDEBUG
    +    assert( pc>=-1 && pc<p->nOp );
    +
    +#ifdef SQLITE_DEBUG
    +    if( p->trace ){
    +      if( rc!=0 ) fprintf(p->trace,"rc=%d\n",rc);
    +      if( opProperty & OPFLG_OUT2_PRERELEASE ){
    +        registerTrace(p->trace, pOp->p2, pOut);
    +      }
    +      if( opProperty & OPFLG_OUT3 ){
    +        registerTrace(p->trace, pOp->p3, pOut);
    +      }
    +    }
    +#endif  /* SQLITE_DEBUG */
    +#endif  /* NDEBUG */
    +  }  /* The end of the for(;;) loop the loops through opcodes */
    +
    +  /* If we reach this point, it means that execution is finished with
    +  ** an error of some kind.
    +  */
    +vdbe_error_halt:
    +  assert( rc );
    +  p->rc = rc;
    +  sqlite3VdbeHalt(p);
    +  if( rc==SQLITE_IOERR_NOMEM ) db->mallocFailed = 1;
    +  rc = SQLITE_ERROR;
    +
    +  /* This is the only way out of this procedure.  We have to
    +  ** release the mutexes on btrees that were acquired at the
    +  ** top. */
    +vdbe_return:
    +  sqlite3BtreeMutexArrayLeave(&p->aMutex);
    +  return rc;
    +
    +  /* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
    +  ** is encountered.
    +  */
    +too_big:
    +  sqlite3SetString(&p->zErrMsg, db, "string or blob too big");
    +  rc = SQLITE_TOOBIG;
    +  goto vdbe_error_halt;
    +
    +  /* Jump to here if a malloc() fails.
    +  */
    +no_mem:
    +  db->mallocFailed = 1;
    +  sqlite3SetString(&p->zErrMsg, db, "out of memory");
    +  rc = SQLITE_NOMEM;
    +  goto vdbe_error_halt;
    +
    +  /* Jump to here for an SQLITE_MISUSE error.
    +  */
    +abort_due_to_misuse:
    +  rc = SQLITE_MISUSE;
    +  /* Fall thru into abort_due_to_error */
    +
    +  /* Jump to here for any other kind of fatal error.  The "rc" variable
    +  ** should hold the error number.
    +  */
    +abort_due_to_error:
    +  assert( p->zErrMsg==0 );
    +  if( db->mallocFailed ) rc = SQLITE_NOMEM;
    +  if( rc!=SQLITE_IOERR_NOMEM ){
    +    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
    +  }
    +  goto vdbe_error_halt;
    +
    +  /* Jump to here if the sqlite3_interrupt() API sets the interrupt
    +  ** flag.
    +  */
    +abort_due_to_interrupt:
    +  assert( db->u1.isInterrupted );
    +  rc = SQLITE_INTERRUPT;
    +  p->rc = rc;
    +  sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
    +  goto vdbe_error_halt;
    +}
    +
    +/************** End of vdbe.c ************************************************/
    +/************** Begin file vdbeblob.c ****************************************/
    +/*
    +** 2007 May 1
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains code used to implement incremental BLOB I/O.
    +**
    +** $Id: vdbeblob.c,v 1.35 2009/07/02 07:47:33 danielk1977 Exp $
    +*/
    +
    +
    +#ifndef SQLITE_OMIT_INCRBLOB
    +
    +/*
    +** Valid sqlite3_blob* handles point to Incrblob structures.
    +*/
    +typedef struct Incrblob Incrblob;
    +struct Incrblob {
    +  int flags;              /* Copy of "flags" passed to sqlite3_blob_open() */
    +  int nByte;              /* Size of open blob, in bytes */
    +  int iOffset;            /* Byte offset of blob in cursor data */
    +  BtCursor *pCsr;         /* Cursor pointing at blob row */
    +  sqlite3_stmt *pStmt;    /* Statement holding cursor open */
    +  sqlite3 *db;            /* The associated database */
    +};
    +
    +/*
    +** Open a blob handle.
    +*/
    +SQLITE_API int sqlite3_blob_open(
    +  sqlite3* db,            /* The database connection */
    +  const char *zDb,        /* The attached database containing the blob */
    +  const char *zTable,     /* The table containing the blob */
    +  const char *zColumn,    /* The column containing the blob */
    +  sqlite_int64 iRow,      /* The row containing the glob */
    +  int flags,              /* True -> read/write access, false -> read-only */
    +  sqlite3_blob **ppBlob   /* Handle for accessing the blob returned here */
    +){
    +  int nAttempt = 0;
    +  int iCol;               /* Index of zColumn in row-record */
    +
    +  /* This VDBE program seeks a btree cursor to the identified 
    +  ** db/table/row entry. The reason for using a vdbe program instead
    +  ** of writing code to use the b-tree layer directly is that the
    +  ** vdbe program will take advantage of the various transaction,
    +  ** locking and error handling infrastructure built into the vdbe.
    +  **
    +  ** After seeking the cursor, the vdbe executes an OP_ResultRow.
    +  ** Code external to the Vdbe then "borrows" the b-tree cursor and
    +  ** uses it to implement the blob_read(), blob_write() and 
    +  ** blob_bytes() functions.
    +  **
    +  ** The sqlite3_blob_close() function finalizes the vdbe program,
    +  ** which closes the b-tree cursor and (possibly) commits the 
    +  ** transaction.
    +  */
    +  static const VdbeOpList openBlob[] = {
    +    {OP_Transaction, 0, 0, 0},     /* 0: Start a transaction */
    +    {OP_VerifyCookie, 0, 0, 0},    /* 1: Check the schema cookie */
    +    {OP_TableLock, 0, 0, 0},       /* 2: Acquire a read or write lock */
    +
    +    /* One of the following two instructions is replaced by an OP_Noop. */
    +    {OP_OpenRead, 0, 0, 0},        /* 3: Open cursor 0 for reading */
    +    {OP_OpenWrite, 0, 0, 0},       /* 4: Open cursor 0 for read/write */
    +
    +    {OP_Variable, 1, 1, 1},        /* 5: Push the rowid to the stack */
    +    {OP_NotExists, 0, 9, 1},       /* 6: Seek the cursor */
    +    {OP_Column, 0, 0, 1},          /* 7  */
    +    {OP_ResultRow, 1, 0, 0},       /* 8  */
    +    {OP_Close, 0, 0, 0},           /* 9  */
    +    {OP_Halt, 0, 0, 0},            /* 10 */
    +  };
    +
    +  Vdbe *v = 0;
    +  int rc = SQLITE_OK;
    +  char *zErr = 0;
    +  Table *pTab;
    +  Parse *pParse;
    +
    +  *ppBlob = 0;
    +  sqlite3_mutex_enter(db->mutex);
    +  pParse = sqlite3StackAllocRaw(db, sizeof(*pParse));
    +  if( pParse==0 ){
    +    rc = SQLITE_NOMEM;
    +    goto blob_open_out;
    +  }
    +  do {
    +    memset(pParse, 0, sizeof(Parse));
    +    pParse->db = db;
    +
    +    if( sqlite3SafetyOn(db) ){
    +      sqlite3DbFree(db, zErr);
    +      sqlite3StackFree(db, pParse);
    +      sqlite3_mutex_leave(db->mutex);
    +      return SQLITE_MISUSE;
    +    }
    +
    +    sqlite3BtreeEnterAll(db);
    +    pTab = sqlite3LocateTable(pParse, 0, zTable, zDb);
    +    if( pTab && IsVirtual(pTab) ){
    +      pTab = 0;
    +      sqlite3ErrorMsg(pParse, "cannot open virtual table: %s", zTable);
    +    }
    +#ifndef SQLITE_OMIT_VIEW
    +    if( pTab && pTab->pSelect ){
    +      pTab = 0;
    +      sqlite3ErrorMsg(pParse, "cannot open view: %s", zTable);
    +    }
    +#endif
    +    if( !pTab ){
    +      if( pParse->zErrMsg ){
    +        sqlite3DbFree(db, zErr);
    +        zErr = pParse->zErrMsg;
    +        pParse->zErrMsg = 0;
    +      }
    +      rc = SQLITE_ERROR;
    +      (void)sqlite3SafetyOff(db);
    +      sqlite3BtreeLeaveAll(db);
    +      goto blob_open_out;
    +    }
    +
    +    /* Now search pTab for the exact column. */
    +    for(iCol=0; iCol < pTab->nCol; iCol++) {
    +      if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
    +        break;
    +      }
    +    }
    +    if( iCol==pTab->nCol ){
    +      sqlite3DbFree(db, zErr);
    +      zErr = sqlite3MPrintf(db, "no such column: \"%s\"", zColumn);
    +      rc = SQLITE_ERROR;
    +      (void)sqlite3SafetyOff(db);
    +      sqlite3BtreeLeaveAll(db);
    +      goto blob_open_out;
    +    }
    +
    +    /* If the value is being opened for writing, check that the
    +    ** column is not indexed, and that it is not part of a foreign key. 
    +    ** It is against the rules to open a column to which either of these
    +    ** descriptions applies for writing.  */
    +    if( flags ){
    +      const char *zFault = 0;
    +      Index *pIdx;
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +      if( db->flags&SQLITE_ForeignKeys ){
    +        /* Check that the column is not part of an FK child key definition. It
    +        ** is not necessary to check if it is part of a parent key, as parent
    +        ** key columns must be indexed. The check below will pick up this 
    +        ** case.  */
    +        FKey *pFKey;
    +        for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
    +          int j;
    +          for(j=0; j<pFKey->nCol; j++){
    +            if( pFKey->aCol[j].iFrom==iCol ){
    +              zFault = "foreign key";
    +            }
    +          }
    +        }
    +      }
    +#endif
    +      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +        int j;
    +        for(j=0; j<pIdx->nColumn; j++){
    +          if( pIdx->aiColumn[j]==iCol ){
    +            zFault = "indexed";
    +          }
    +        }
    +      }
    +      if( zFault ){
    +        sqlite3DbFree(db, zErr);
    +        zErr = sqlite3MPrintf(db, "cannot open %s column for writing", zFault);
    +        rc = SQLITE_ERROR;
    +        (void)sqlite3SafetyOff(db);
    +        sqlite3BtreeLeaveAll(db);
    +        goto blob_open_out;
    +      }
    +    }
    +
    +    v = sqlite3VdbeCreate(db);
    +    if( v ){
    +      int iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +      sqlite3VdbeAddOpList(v, sizeof(openBlob)/sizeof(VdbeOpList), openBlob);
    +      flags = !!flags;                 /* flags = (flags ? 1 : 0); */
    +
    +      /* Configure the OP_Transaction */
    +      sqlite3VdbeChangeP1(v, 0, iDb);
    +      sqlite3VdbeChangeP2(v, 0, flags);
    +
    +      /* Configure the OP_VerifyCookie */
    +      sqlite3VdbeChangeP1(v, 1, iDb);
    +      sqlite3VdbeChangeP2(v, 1, pTab->pSchema->schema_cookie);
    +
    +      /* Make sure a mutex is held on the table to be accessed */
    +      sqlite3VdbeUsesBtree(v, iDb); 
    +
    +      /* Configure the OP_TableLock instruction */
    +      sqlite3VdbeChangeP1(v, 2, iDb);
    +      sqlite3VdbeChangeP2(v, 2, pTab->tnum);
    +      sqlite3VdbeChangeP3(v, 2, flags);
    +      sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
    +
    +      /* Remove either the OP_OpenWrite or OpenRead. Set the P2 
    +      ** parameter of the other to pTab->tnum.  */
    +      sqlite3VdbeChangeToNoop(v, 4 - flags, 1);
    +      sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);
    +      sqlite3VdbeChangeP3(v, 3 + flags, iDb);
    +
    +      /* Configure the number of columns. Configure the cursor to
    +      ** think that the table has one more column than it really
    +      ** does. An OP_Column to retrieve this imaginary column will
    +      ** always return an SQL NULL. This is useful because it means
    +      ** we can invoke OP_Column to fill in the vdbe cursors type 
    +      ** and offset cache without causing any IO.
    +      */
    +      sqlite3VdbeChangeP4(v, 3+flags, SQLITE_INT_TO_PTR(pTab->nCol+1),P4_INT32);
    +      sqlite3VdbeChangeP2(v, 7, pTab->nCol);
    +      if( !db->mallocFailed ){
    +        sqlite3VdbeMakeReady(v, 1, 1, 1, 0, 0, 0);
    +      }
    +    }
    +   
    +    sqlite3BtreeLeaveAll(db);
    +    rc = sqlite3SafetyOff(db);
    +    if( NEVER(rc!=SQLITE_OK) || db->mallocFailed ){
    +      goto blob_open_out;
    +    }
    +
    +    sqlite3_bind_int64((sqlite3_stmt *)v, 1, iRow);
    +    rc = sqlite3_step((sqlite3_stmt *)v);
    +    if( rc!=SQLITE_ROW ){
    +      nAttempt++;
    +      rc = sqlite3_finalize((sqlite3_stmt *)v);
    +      sqlite3DbFree(db, zErr);
    +      zErr = sqlite3MPrintf(db, sqlite3_errmsg(db));
    +      v = 0;
    +    }
    +  } while( nAttempt<5 && rc==SQLITE_SCHEMA );
    +
    +  if( rc==SQLITE_ROW ){
    +    /* The row-record has been opened successfully. Check that the
    +    ** column in question contains text or a blob. If it contains
    +    ** text, it is up to the caller to get the encoding right.
    +    */
    +    Incrblob *pBlob;
    +    u32 type = v->apCsr[0]->aType[iCol];
    +
    +    if( type<12 ){
    +      sqlite3DbFree(db, zErr);
    +      zErr = sqlite3MPrintf(db, "cannot open value of type %s",
    +          type==0?"null": type==7?"real": "integer"
    +      );
    +      rc = SQLITE_ERROR;
    +      goto blob_open_out;
    +    }
    +    pBlob = (Incrblob *)sqlite3DbMallocZero(db, sizeof(Incrblob));
    +    if( db->mallocFailed ){
    +      sqlite3DbFree(db, pBlob);
    +      goto blob_open_out;
    +    }
    +    pBlob->flags = flags;
    +    pBlob->pCsr =  v->apCsr[0]->pCursor;
    +    sqlite3BtreeEnterCursor(pBlob->pCsr);
    +    sqlite3BtreeCacheOverflow(pBlob->pCsr);
    +    sqlite3BtreeLeaveCursor(pBlob->pCsr);
    +    pBlob->pStmt = (sqlite3_stmt *)v;
    +    pBlob->iOffset = v->apCsr[0]->aOffset[iCol];
    +    pBlob->nByte = sqlite3VdbeSerialTypeLen(type);
    +    pBlob->db = db;
    +    *ppBlob = (sqlite3_blob *)pBlob;
    +    rc = SQLITE_OK;
    +  }else if( rc==SQLITE_OK ){
    +    sqlite3DbFree(db, zErr);
    +    zErr = sqlite3MPrintf(db, "no such rowid: %lld", iRow);
    +    rc = SQLITE_ERROR;
    +  }
    +
    +blob_open_out:
    +  if( v && (rc!=SQLITE_OK || db->mallocFailed) ){
    +    sqlite3VdbeFinalize(v);
    +  }
    +  sqlite3Error(db, rc, zErr);
    +  sqlite3DbFree(db, zErr);
    +  sqlite3StackFree(db, pParse);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Close a blob handle that was previously created using
    +** sqlite3_blob_open().
    +*/
    +SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
    +  Incrblob *p = (Incrblob *)pBlob;
    +  int rc;
    +  sqlite3 *db;
    +
    +  if( p ){
    +    db = p->db;
    +    sqlite3_mutex_enter(db->mutex);
    +    rc = sqlite3_finalize(p->pStmt);
    +    sqlite3DbFree(db, p);
    +    sqlite3_mutex_leave(db->mutex);
    +  }else{
    +    rc = SQLITE_OK;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Perform a read or write operation on a blob
    +*/
    +static int blobReadWrite(
    +  sqlite3_blob *pBlob, 
    +  void *z, 
    +  int n, 
    +  int iOffset, 
    +  int (*xCall)(BtCursor*, u32, u32, void*)
    +){
    +  int rc;
    +  Incrblob *p = (Incrblob *)pBlob;
    +  Vdbe *v;
    +  sqlite3 *db;
    +
    +  if( p==0 ) return SQLITE_MISUSE;
    +  db = p->db;
    +  sqlite3_mutex_enter(db->mutex);
    +  v = (Vdbe*)p->pStmt;
    +
    +  if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
    +    /* Request is out of range. Return a transient error. */
    +    rc = SQLITE_ERROR;
    +    sqlite3Error(db, SQLITE_ERROR, 0);
    +  } else if( v==0 ){
    +    /* If there is no statement handle, then the blob-handle has
    +    ** already been invalidated. Return SQLITE_ABORT in this case.
    +    */
    +    rc = SQLITE_ABORT;
    +  }else{
    +    /* Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is
    +    ** returned, clean-up the statement handle.
    +    */
    +    assert( db == v->db );
    +    sqlite3BtreeEnterCursor(p->pCsr);
    +    rc = xCall(p->pCsr, iOffset+p->iOffset, n, z);
    +    sqlite3BtreeLeaveCursor(p->pCsr);
    +    if( rc==SQLITE_ABORT ){
    +      sqlite3VdbeFinalize(v);
    +      p->pStmt = 0;
    +    }else{
    +      db->errCode = rc;
    +      v->rc = rc;
    +    }
    +  }
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Read data from a blob handle.
    +*/
    +SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
    +  return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
    +}
    +
    +/*
    +** Write data to a blob handle.
    +*/
    +SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
    +  return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
    +}
    +
    +/*
    +** Query a blob handle for the size of the data.
    +**
    +** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
    +** so no mutex is required for access.
    +*/
    +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
    +  Incrblob *p = (Incrblob *)pBlob;
    +  return p ? p->nByte : 0;
    +}
    +
    +#endif /* #ifndef SQLITE_OMIT_INCRBLOB */
    +
    +/************** End of vdbeblob.c ********************************************/
    +/************** Begin file journal.c *****************************************/
    +/*
    +** 2007 August 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** @(#) $Id: journal.c,v 1.9 2009/01/20 17:06:27 danielk1977 Exp $
    +*/
    +
    +#ifdef SQLITE_ENABLE_ATOMIC_WRITE
    +
    +/*
    +** This file implements a special kind of sqlite3_file object used
    +** by SQLite to create journal files if the atomic-write optimization
    +** is enabled.
    +**
    +** The distinctive characteristic of this sqlite3_file is that the
    +** actual on disk file is created lazily. When the file is created,
    +** the caller specifies a buffer size for an in-memory buffer to
    +** be used to service read() and write() requests. The actual file
    +** on disk is not created or populated until either:
    +**
    +**   1) The in-memory representation grows too large for the allocated 
    +**      buffer, or
    +**   2) The sqlite3JournalCreate() function is called.
    +*/
    +
    +
    +
    +/*
    +** A JournalFile object is a subclass of sqlite3_file used by
    +** as an open file handle for journal files.
    +*/
    +struct JournalFile {
    +  sqlite3_io_methods *pMethod;    /* I/O methods on journal files */
    +  int nBuf;                       /* Size of zBuf[] in bytes */
    +  char *zBuf;                     /* Space to buffer journal writes */
    +  int iSize;                      /* Amount of zBuf[] currently used */
    +  int flags;                      /* xOpen flags */
    +  sqlite3_vfs *pVfs;              /* The "real" underlying VFS */
    +  sqlite3_file *pReal;            /* The "real" underlying file descriptor */
    +  const char *zJournal;           /* Name of the journal file */
    +};
    +typedef struct JournalFile JournalFile;
    +
    +/*
    +** If it does not already exists, create and populate the on-disk file 
    +** for JournalFile p.
    +*/
    +static int createFile(JournalFile *p){
    +  int rc = SQLITE_OK;
    +  if( !p->pReal ){
    +    sqlite3_file *pReal = (sqlite3_file *)&p[1];
    +    rc = sqlite3OsOpen(p->pVfs, p->zJournal, pReal, p->flags, 0);
    +    if( rc==SQLITE_OK ){
    +      p->pReal = pReal;
    +      if( p->iSize>0 ){
    +        assert(p->iSize<=p->nBuf);
    +        rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Close the file.
    +*/
    +static int jrnlClose(sqlite3_file *pJfd){
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( p->pReal ){
    +    sqlite3OsClose(p->pReal);
    +  }
    +  sqlite3_free(p->zBuf);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Read data from the file.
    +*/
    +static int jrnlRead(
    +  sqlite3_file *pJfd,    /* The journal file from which to read */
    +  void *zBuf,            /* Put the results here */
    +  int iAmt,              /* Number of bytes to read */
    +  sqlite_int64 iOfst     /* Begin reading at this offset */
    +){
    +  int rc = SQLITE_OK;
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( p->pReal ){
    +    rc = sqlite3OsRead(p->pReal, zBuf, iAmt, iOfst);
    +  }else if( (iAmt+iOfst)>p->iSize ){
    +    rc = SQLITE_IOERR_SHORT_READ;
    +  }else{
    +    memcpy(zBuf, &p->zBuf[iOfst], iAmt);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Write data to the file.
    +*/
    +static int jrnlWrite(
    +  sqlite3_file *pJfd,    /* The journal file into which to write */
    +  const void *zBuf,      /* Take data to be written from here */
    +  int iAmt,              /* Number of bytes to write */
    +  sqlite_int64 iOfst     /* Begin writing at this offset into the file */
    +){
    +  int rc = SQLITE_OK;
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( !p->pReal && (iOfst+iAmt)>p->nBuf ){
    +    rc = createFile(p);
    +  }
    +  if( rc==SQLITE_OK ){
    +    if( p->pReal ){
    +      rc = sqlite3OsWrite(p->pReal, zBuf, iAmt, iOfst);
    +    }else{
    +      memcpy(&p->zBuf[iOfst], zBuf, iAmt);
    +      if( p->iSize<(iOfst+iAmt) ){
    +        p->iSize = (iOfst+iAmt);
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Truncate the file.
    +*/
    +static int jrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
    +  int rc = SQLITE_OK;
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( p->pReal ){
    +    rc = sqlite3OsTruncate(p->pReal, size);
    +  }else if( size<p->iSize ){
    +    p->iSize = size;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Sync the file.
    +*/
    +static int jrnlSync(sqlite3_file *pJfd, int flags){
    +  int rc;
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( p->pReal ){
    +    rc = sqlite3OsSync(p->pReal, flags);
    +  }else{
    +    rc = SQLITE_OK;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Query the size of the file in bytes.
    +*/
    +static int jrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
    +  int rc = SQLITE_OK;
    +  JournalFile *p = (JournalFile *)pJfd;
    +  if( p->pReal ){
    +    rc = sqlite3OsFileSize(p->pReal, pSize);
    +  }else{
    +    *pSize = (sqlite_int64) p->iSize;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Table of methods for JournalFile sqlite3_file object.
    +*/
    +static struct sqlite3_io_methods JournalFileMethods = {
    +  1,             /* iVersion */
    +  jrnlClose,     /* xClose */
    +  jrnlRead,      /* xRead */
    +  jrnlWrite,     /* xWrite */
    +  jrnlTruncate,  /* xTruncate */
    +  jrnlSync,      /* xSync */
    +  jrnlFileSize,  /* xFileSize */
    +  0,             /* xLock */
    +  0,             /* xUnlock */
    +  0,             /* xCheckReservedLock */
    +  0,             /* xFileControl */
    +  0,             /* xSectorSize */
    +  0              /* xDeviceCharacteristics */
    +};
    +
    +/* 
    +** Open a journal file.
    +*/
    +SQLITE_PRIVATE int sqlite3JournalOpen(
    +  sqlite3_vfs *pVfs,         /* The VFS to use for actual file I/O */
    +  const char *zName,         /* Name of the journal file */
    +  sqlite3_file *pJfd,        /* Preallocated, blank file handle */
    +  int flags,                 /* Opening flags */
    +  int nBuf                   /* Bytes buffered before opening the file */
    +){
    +  JournalFile *p = (JournalFile *)pJfd;
    +  memset(p, 0, sqlite3JournalSize(pVfs));
    +  if( nBuf>0 ){
    +    p->zBuf = sqlite3MallocZero(nBuf);
    +    if( !p->zBuf ){
    +      return SQLITE_NOMEM;
    +    }
    +  }else{
    +    return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
    +  }
    +  p->pMethod = &JournalFileMethods;
    +  p->nBuf = nBuf;
    +  p->flags = flags;
    +  p->zJournal = zName;
    +  p->pVfs = pVfs;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** If the argument p points to a JournalFile structure, and the underlying
    +** file has not yet been created, create it now.
    +*/
    +SQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *p){
    +  if( p->pMethods!=&JournalFileMethods ){
    +    return SQLITE_OK;
    +  }
    +  return createFile((JournalFile *)p);
    +}
    +
    +/* 
    +** Return the number of bytes required to store a JournalFile that uses vfs
    +** pVfs to create the underlying on-disk files.
    +*/
    +SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *pVfs){
    +  return (pVfs->szOsFile+sizeof(JournalFile));
    +}
    +#endif
    +
    +/************** End of journal.c *********************************************/
    +/************** Begin file memjournal.c **************************************/
    +/*
    +** 2008 October 7
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains code use to implement an in-memory rollback journal.
    +** The in-memory rollback journal is used to journal transactions for
    +** ":memory:" databases and when the journal_mode=MEMORY pragma is used.
    +**
    +** @(#) $Id: memjournal.c,v 1.12 2009/05/04 11:42:30 danielk1977 Exp $
    +*/
    +
    +/* Forward references to internal structures */
    +typedef struct MemJournal MemJournal;
    +typedef struct FilePoint FilePoint;
    +typedef struct FileChunk FileChunk;
    +
    +/* Space to hold the rollback journal is allocated in increments of
    +** this many bytes.
    +**
    +** The size chosen is a little less than a power of two.  That way,
    +** the FileChunk object will have a size that almost exactly fills
    +** a power-of-two allocation.  This mimimizes wasted space in power-of-two
    +** memory allocators.
    +*/
    +#define JOURNAL_CHUNKSIZE ((int)(1024-sizeof(FileChunk*)))
    +
    +/* Macro to find the minimum of two numeric values.
    +*/
    +#ifndef MIN
    +# define MIN(x,y) ((x)<(y)?(x):(y))
    +#endif
    +
    +/*
    +** The rollback journal is composed of a linked list of these structures.
    +*/
    +struct FileChunk {
    +  FileChunk *pNext;               /* Next chunk in the journal */
    +  u8 zChunk[JOURNAL_CHUNKSIZE];   /* Content of this chunk */
    +};
    +
    +/*
    +** An instance of this object serves as a cursor into the rollback journal.
    +** The cursor can be either for reading or writing.
    +*/
    +struct FilePoint {
    +  sqlite3_int64 iOffset;          /* Offset from the beginning of the file */
    +  FileChunk *pChunk;              /* Specific chunk into which cursor points */
    +};
    +
    +/*
    +** This subclass is a subclass of sqlite3_file.  Each open memory-journal
    +** is an instance of this class.
    +*/
    +struct MemJournal {
    +  sqlite3_io_methods *pMethod;    /* Parent class. MUST BE FIRST */
    +  FileChunk *pFirst;              /* Head of in-memory chunk-list */
    +  FilePoint endpoint;             /* Pointer to the end of the file */
    +  FilePoint readpoint;            /* Pointer to the end of the last xRead() */
    +};
    +
    +/*
    +** Read data from the in-memory journal file.  This is the implementation
    +** of the sqlite3_vfs.xRead method.
    +*/
    +static int memjrnlRead(
    +  sqlite3_file *pJfd,    /* The journal file from which to read */
    +  void *zBuf,            /* Put the results here */
    +  int iAmt,              /* Number of bytes to read */
    +  sqlite_int64 iOfst     /* Begin reading at this offset */
    +){
    +  MemJournal *p = (MemJournal *)pJfd;
    +  u8 *zOut = zBuf;
    +  int nRead = iAmt;
    +  int iChunkOffset;
    +  FileChunk *pChunk;
    +
    +  /* SQLite never tries to read past the end of a rollback journal file */
    +  assert( iOfst+iAmt<=p->endpoint.iOffset );
    +
    +  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){
    +    sqlite3_int64 iOff = 0;
    +    for(pChunk=p->pFirst; 
    +        ALWAYS(pChunk) && (iOff+JOURNAL_CHUNKSIZE)<=iOfst;
    +        pChunk=pChunk->pNext
    +    ){
    +      iOff += JOURNAL_CHUNKSIZE;
    +    }
    +  }else{
    +    pChunk = p->readpoint.pChunk;
    +  }
    +
    +  iChunkOffset = (int)(iOfst%JOURNAL_CHUNKSIZE);
    +  do {
    +    int iSpace = JOURNAL_CHUNKSIZE - iChunkOffset;
    +    int nCopy = MIN(nRead, (JOURNAL_CHUNKSIZE - iChunkOffset));
    +    memcpy(zOut, &pChunk->zChunk[iChunkOffset], nCopy);
    +    zOut += nCopy;
    +    nRead -= iSpace;
    +    iChunkOffset = 0;
    +  } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 );
    +  p->readpoint.iOffset = iOfst+iAmt;
    +  p->readpoint.pChunk = pChunk;
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Write data to the file.
    +*/
    +static int memjrnlWrite(
    +  sqlite3_file *pJfd,    /* The journal file into which to write */
    +  const void *zBuf,      /* Take data to be written from here */
    +  int iAmt,              /* Number of bytes to write */
    +  sqlite_int64 iOfst     /* Begin writing at this offset into the file */
    +){
    +  MemJournal *p = (MemJournal *)pJfd;
    +  int nWrite = iAmt;
    +  u8 *zWrite = (u8 *)zBuf;
    +
    +  /* An in-memory journal file should only ever be appended to. Random
    +  ** access writes are not required by sqlite.
    +  */
    +  assert( iOfst==p->endpoint.iOffset );
    +  UNUSED_PARAMETER(iOfst);
    +
    +  while( nWrite>0 ){
    +    FileChunk *pChunk = p->endpoint.pChunk;
    +    int iChunkOffset = (int)(p->endpoint.iOffset%JOURNAL_CHUNKSIZE);
    +    int iSpace = MIN(nWrite, JOURNAL_CHUNKSIZE - iChunkOffset);
    +
    +    if( iChunkOffset==0 ){
    +      /* New chunk is required to extend the file. */
    +      FileChunk *pNew = sqlite3_malloc(sizeof(FileChunk));
    +      if( !pNew ){
    +        return SQLITE_IOERR_NOMEM;
    +      }
    +      pNew->pNext = 0;
    +      if( pChunk ){
    +        assert( p->pFirst );
    +        pChunk->pNext = pNew;
    +      }else{
    +        assert( !p->pFirst );
    +        p->pFirst = pNew;
    +      }
    +      p->endpoint.pChunk = pNew;
    +    }
    +
    +    memcpy(&p->endpoint.pChunk->zChunk[iChunkOffset], zWrite, iSpace);
    +    zWrite += iSpace;
    +    nWrite -= iSpace;
    +    p->endpoint.iOffset += iSpace;
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Truncate the file.
    +*/
    +static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
    +  MemJournal *p = (MemJournal *)pJfd;
    +  FileChunk *pChunk;
    +  assert(size==0);
    +  UNUSED_PARAMETER(size);
    +  pChunk = p->pFirst;
    +  while( pChunk ){
    +    FileChunk *pTmp = pChunk;
    +    pChunk = pChunk->pNext;
    +    sqlite3_free(pTmp);
    +  }
    +  sqlite3MemJournalOpen(pJfd);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close the file.
    +*/
    +static int memjrnlClose(sqlite3_file *pJfd){
    +  memjrnlTruncate(pJfd, 0);
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Sync the file.
    +**
    +** Syncing an in-memory journal is a no-op.  And, in fact, this routine
    +** is never called in a working implementation.  This implementation
    +** exists purely as a contingency, in case some malfunction in some other
    +** part of SQLite causes Sync to be called by mistake.
    +*/
    +static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){   /*NO_TEST*/
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);                        /*NO_TEST*/
    +  assert( 0 );                                                 /*NO_TEST*/
    +  return SQLITE_OK;                                            /*NO_TEST*/
    +}                                                              /*NO_TEST*/
    +
    +/*
    +** Query the size of the file in bytes.
    +*/
    +static int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
    +  MemJournal *p = (MemJournal *)pJfd;
    +  *pSize = (sqlite_int64) p->endpoint.iOffset;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Table of methods for MemJournal sqlite3_file object.
    +*/
    +static struct sqlite3_io_methods MemJournalMethods = {
    +  1,                /* iVersion */
    +  memjrnlClose,     /* xClose */
    +  memjrnlRead,      /* xRead */
    +  memjrnlWrite,     /* xWrite */
    +  memjrnlTruncate,  /* xTruncate */
    +  memjrnlSync,      /* xSync */
    +  memjrnlFileSize,  /* xFileSize */
    +  0,                /* xLock */
    +  0,                /* xUnlock */
    +  0,                /* xCheckReservedLock */
    +  0,                /* xFileControl */
    +  0,                /* xSectorSize */
    +  0                 /* xDeviceCharacteristics */
    +};
    +
    +/* 
    +** Open a journal file.
    +*/
    +SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *pJfd){
    +  MemJournal *p = (MemJournal *)pJfd;
    +  assert( EIGHT_BYTE_ALIGNMENT(p) );
    +  memset(p, 0, sqlite3MemJournalSize());
    +  p->pMethod = &MemJournalMethods;
    +}
    +
    +/*
    +** Return true if the file-handle passed as an argument is 
    +** an in-memory journal 
    +*/
    +SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *pJfd){
    +  return pJfd->pMethods==&MemJournalMethods;
    +}
    +
    +/* 
    +** Return the number of bytes required to store a MemJournal that uses vfs
    +** pVfs to create the underlying on-disk files.
    +*/
    +SQLITE_PRIVATE int sqlite3MemJournalSize(void){
    +  return sizeof(MemJournal);
    +}
    +
    +/************** End of memjournal.c ******************************************/
    +/************** Begin file walker.c ******************************************/
    +/*
    +** 2008 August 16
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains routines used for walking the parser tree for
    +** an SQL statement.
    +**
    +** $Id: walker.c,v 1.7 2009/06/15 23:15:59 drh Exp $
    +*/
    +
    +
    +/*
    +** Walk an expression tree.  Invoke the callback once for each node
    +** of the expression, while decending.  (In other words, the callback
    +** is invoked before visiting children.)
    +**
    +** The return value from the callback should be one of the WRC_*
    +** constants to specify how to proceed with the walk.
    +**
    +**    WRC_Continue      Continue descending down the tree.
    +**
    +**    WRC_Prune         Do not descend into child nodes.  But allow
    +**                      the walk to continue with sibling nodes.
    +**
    +**    WRC_Abort         Do no more callbacks.  Unwind the stack and
    +**                      return the top-level walk call.
    +**
    +** The return value from this routine is WRC_Abort to abandon the tree walk
    +** and WRC_Continue to continue.
    +*/
    +SQLITE_PRIVATE int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
    +  int rc;
    +  if( pExpr==0 ) return WRC_Continue;
    +  testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
    +  testcase( ExprHasProperty(pExpr, EP_Reduced) );
    +  rc = pWalker->xExprCallback(pWalker, pExpr);
    +  if( rc==WRC_Continue
    +              && !ExprHasAnyProperty(pExpr,EP_TokenOnly) ){
    +    if( sqlite3WalkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
    +    if( sqlite3WalkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
    +    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +      if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
    +    }else{
    +      if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
    +    }
    +  }
    +  return rc & WRC_Abort;
    +}
    +
    +/*
    +** Call sqlite3WalkExpr() for every expression in list p or until
    +** an abort request is seen.
    +*/
    +SQLITE_PRIVATE int sqlite3WalkExprList(Walker *pWalker, ExprList *p){
    +  int i;
    +  struct ExprList_item *pItem;
    +  if( p ){
    +    for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){
    +      if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;
    +    }
    +  }
    +  return WRC_Continue;
    +}
    +
    +/*
    +** Walk all expressions associated with SELECT statement p.  Do
    +** not invoke the SELECT callback on p, but do (of course) invoke
    +** any expr callbacks and SELECT callbacks that come from subqueries.
    +** Return WRC_Abort or WRC_Continue.
    +*/
    +SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker *pWalker, Select *p){
    +  if( sqlite3WalkExprList(pWalker, p->pEList) ) return WRC_Abort;
    +  if( sqlite3WalkExpr(pWalker, p->pWhere) ) return WRC_Abort;
    +  if( sqlite3WalkExprList(pWalker, p->pGroupBy) ) return WRC_Abort;
    +  if( sqlite3WalkExpr(pWalker, p->pHaving) ) return WRC_Abort;
    +  if( sqlite3WalkExprList(pWalker, p->pOrderBy) ) return WRC_Abort;
    +  if( sqlite3WalkExpr(pWalker, p->pLimit) ) return WRC_Abort;
    +  if( sqlite3WalkExpr(pWalker, p->pOffset) ) return WRC_Abort;
    +  return WRC_Continue;
    +}
    +
    +/*
    +** Walk the parse trees associated with all subqueries in the
    +** FROM clause of SELECT statement p.  Do not invoke the select
    +** callback on p, but do invoke it on each FROM clause subquery
    +** and on any subqueries further down in the tree.  Return 
    +** WRC_Abort or WRC_Continue;
    +*/
    +SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){
    +  SrcList *pSrc;
    +  int i;
    +  struct SrcList_item *pItem;
    +
    +  pSrc = p->pSrc;
    +  if( ALWAYS(pSrc) ){
    +    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
    +      if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
    +        return WRC_Abort;
    +      }
    +    }
    +  }
    +  return WRC_Continue;
    +} 
    +
    +/*
    +** Call sqlite3WalkExpr() for every expression in Select statement p.
    +** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and
    +** on the compound select chain, p->pPrior.
    +**
    +** Return WRC_Continue under normal conditions.  Return WRC_Abort if
    +** there is an abort request.
    +**
    +** If the Walker does not have an xSelectCallback() then this routine
    +** is a no-op returning WRC_Continue.
    +*/
    +SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
    +  int rc;
    +  if( p==0 || pWalker->xSelectCallback==0 ) return WRC_Continue;
    +  rc = WRC_Continue;
    +  while( p  ){
    +    rc = pWalker->xSelectCallback(pWalker, p);
    +    if( rc ) break;
    +    if( sqlite3WalkSelectExpr(pWalker, p) ) return WRC_Abort;
    +    if( sqlite3WalkSelectFrom(pWalker, p) ) return WRC_Abort;
    +    p = p->pPrior;
    +  }
    +  return rc & WRC_Abort;
    +}
    +
    +/************** End of walker.c **********************************************/
    +/************** Begin file resolve.c *****************************************/
    +/*
    +** 2008 August 18
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains routines used for walking the parser tree and
    +** resolve all identifiers by associating them with a particular
    +** table and column.
    +**
    +** $Id: resolve.c,v 1.30 2009/06/15 23:15:59 drh Exp $
    +*/
    +
    +/*
    +** Turn the pExpr expression into an alias for the iCol-th column of the
    +** result set in pEList.
    +**
    +** If the result set column is a simple column reference, then this routine
    +** makes an exact copy.  But for any other kind of expression, this
    +** routine make a copy of the result set column as the argument to the
    +** TK_AS operator.  The TK_AS operator causes the expression to be
    +** evaluated just once and then reused for each alias.
    +**
    +** The reason for suppressing the TK_AS term when the expression is a simple
    +** column reference is so that the column reference will be recognized as
    +** usable by indices within the WHERE clause processing logic. 
    +**
    +** Hack:  The TK_AS operator is inhibited if zType[0]=='G'.  This means
    +** that in a GROUP BY clause, the expression is evaluated twice.  Hence:
    +**
    +**     SELECT random()%5 AS x, count(*) FROM tab GROUP BY x
    +**
    +** Is equivalent to:
    +**
    +**     SELECT random()%5 AS x, count(*) FROM tab GROUP BY random()%5
    +**
    +** The result of random()%5 in the GROUP BY clause is probably different
    +** from the result in the result-set.  We might fix this someday.  Or
    +** then again, we might not...
    +*/
    +static void resolveAlias(
    +  Parse *pParse,         /* Parsing context */
    +  ExprList *pEList,      /* A result set */
    +  int iCol,              /* A column in the result set.  0..pEList->nExpr-1 */
    +  Expr *pExpr,           /* Transform this into an alias to the result set */
    +  const char *zType      /* "GROUP" or "ORDER" or "" */
    +){
    +  Expr *pOrig;           /* The iCol-th column of the result set */
    +  Expr *pDup;            /* Copy of pOrig */
    +  sqlite3 *db;           /* The database connection */
    +
    +  assert( iCol>=0 && iCol<pEList->nExpr );
    +  pOrig = pEList->a[iCol].pExpr;
    +  assert( pOrig!=0 );
    +  assert( pOrig->flags & EP_Resolved );
    +  db = pParse->db;
    +  if( pOrig->op!=TK_COLUMN && zType[0]!='G' ){
    +    pDup = sqlite3ExprDup(db, pOrig, 0);
    +    pDup = sqlite3PExpr(pParse, TK_AS, pDup, 0, 0);
    +    if( pDup==0 ) return;
    +    if( pEList->a[iCol].iAlias==0 ){
    +      pEList->a[iCol].iAlias = (u16)(++pParse->nAlias);
    +    }
    +    pDup->iTable = pEList->a[iCol].iAlias;
    +  }else if( ExprHasProperty(pOrig, EP_IntValue) || pOrig->u.zToken==0 ){
    +    pDup = sqlite3ExprDup(db, pOrig, 0);
    +    if( pDup==0 ) return;
    +  }else{
    +    char *zToken = pOrig->u.zToken;
    +    assert( zToken!=0 );
    +    pOrig->u.zToken = 0;
    +    pDup = sqlite3ExprDup(db, pOrig, 0);
    +    pOrig->u.zToken = zToken;
    +    if( pDup==0 ) return;
    +    assert( (pDup->flags & (EP_Reduced|EP_TokenOnly))==0 );
    +    pDup->flags2 |= EP2_MallocedToken;
    +    pDup->u.zToken = sqlite3DbStrDup(db, zToken);
    +  }
    +  if( pExpr->flags & EP_ExpCollate ){
    +    pDup->pColl = pExpr->pColl;
    +    pDup->flags |= EP_ExpCollate;
    +  }
    +  sqlite3ExprClear(db, pExpr);
    +  memcpy(pExpr, pDup, sizeof(*pExpr));
    +  sqlite3DbFree(db, pDup);
    +}
    +
    +/*
    +** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
    +** that name in the set of source tables in pSrcList and make the pExpr 
    +** expression node refer back to that source column.  The following changes
    +** are made to pExpr:
    +**
    +**    pExpr->iDb           Set the index in db->aDb[] of the database X
    +**                         (even if X is implied).
    +**    pExpr->iTable        Set to the cursor number for the table obtained
    +**                         from pSrcList.
    +**    pExpr->pTab          Points to the Table structure of X.Y (even if
    +**                         X and/or Y are implied.)
    +**    pExpr->iColumn       Set to the column number within the table.
    +**    pExpr->op            Set to TK_COLUMN.
    +**    pExpr->pLeft         Any expression this points to is deleted
    +**    pExpr->pRight        Any expression this points to is deleted.
    +**
    +** The zDb variable is the name of the database (the "X").  This value may be
    +** NULL meaning that name is of the form Y.Z or Z.  Any available database
    +** can be used.  The zTable variable is the name of the table (the "Y").  This
    +** value can be NULL if zDb is also NULL.  If zTable is NULL it
    +** means that the form of the name is Z and that columns from any table
    +** can be used.
    +**
    +** If the name cannot be resolved unambiguously, leave an error message
    +** in pParse and return WRC_Abort.  Return WRC_Prune on success.
    +*/
    +static int lookupName(
    +  Parse *pParse,       /* The parsing context */
    +  const char *zDb,     /* Name of the database containing table, or NULL */
    +  const char *zTab,    /* Name of table containing column, or NULL */
    +  const char *zCol,    /* Name of the column. */
    +  NameContext *pNC,    /* The name context used to resolve the name */
    +  Expr *pExpr          /* Make this EXPR node point to the selected column */
    +){
    +  int i, j;            /* Loop counters */
    +  int cnt = 0;                      /* Number of matching column names */
    +  int cntTab = 0;                   /* Number of matching table names */
    +  sqlite3 *db = pParse->db;         /* The database connection */
    +  struct SrcList_item *pItem;       /* Use for looping over pSrcList items */
    +  struct SrcList_item *pMatch = 0;  /* The matching pSrcList item */
    +  NameContext *pTopNC = pNC;        /* First namecontext in the list */
    +  Schema *pSchema = 0;              /* Schema of the expression */
    +  int isTrigger = 0;
    +
    +  assert( pNC );     /* the name context cannot be NULL. */
    +  assert( zCol );    /* The Z in X.Y.Z cannot be NULL */
    +  assert( ~ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
    +
    +  /* Initialize the node to no-match */
    +  pExpr->iTable = -1;
    +  pExpr->pTab = 0;
    +  ExprSetIrreducible(pExpr);
    +
    +  /* Start at the inner-most context and move outward until a match is found */
    +  while( pNC && cnt==0 ){
    +    ExprList *pEList;
    +    SrcList *pSrcList = pNC->pSrcList;
    +
    +    if( pSrcList ){
    +      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
    +        Table *pTab;
    +        int iDb;
    +        Column *pCol;
    +  
    +        pTab = pItem->pTab;
    +        assert( pTab!=0 && pTab->zName!=0 );
    +        iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +        assert( pTab->nCol>0 );
    +        if( zTab ){
    +          if( pItem->zAlias ){
    +            char *zTabName = pItem->zAlias;
    +            if( sqlite3StrICmp(zTabName, zTab)!=0 ) continue;
    +          }else{
    +            char *zTabName = pTab->zName;
    +            if( NEVER(zTabName==0) || sqlite3StrICmp(zTabName, zTab)!=0 ){
    +              continue;
    +            }
    +            if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
    +              continue;
    +            }
    +          }
    +        }
    +        if( 0==(cntTab++) ){
    +          pExpr->iTable = pItem->iCursor;
    +          pExpr->pTab = pTab;
    +          pSchema = pTab->pSchema;
    +          pMatch = pItem;
    +        }
    +        for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
    +          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
    +            IdList *pUsing;
    +            cnt++;
    +            pExpr->iTable = pItem->iCursor;
    +            pExpr->pTab = pTab;
    +            pMatch = pItem;
    +            pSchema = pTab->pSchema;
    +            /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
    +            pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
    +            if( i<pSrcList->nSrc-1 ){
    +              if( pItem[1].jointype & JT_NATURAL ){
    +                /* If this match occurred in the left table of a natural join,
    +                ** then skip the right table to avoid a duplicate match */
    +                pItem++;
    +                i++;
    +              }else if( (pUsing = pItem[1].pUsing)!=0 ){
    +                /* If this match occurs on a column that is in the USING clause
    +                ** of a join, skip the search of the right table of the join
    +                ** to avoid a duplicate match there. */
    +                int k;
    +                for(k=0; k<pUsing->nId; k++){
    +                  if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ){
    +                    pItem++;
    +                    i++;
    +                    break;
    +                  }
    +                }
    +              }
    +            }
    +            break;
    +          }
    +        }
    +      }
    +    }
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +    /* If we have not already resolved the name, then maybe 
    +    ** it is a new.* or old.* trigger argument reference
    +    */
    +    if( zDb==0 && zTab!=0 && cnt==0 && pParse->pTriggerTab!=0 ){
    +      int op = pParse->eTriggerOp;
    +      Table *pTab = 0;
    +      assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
    +      if( op!=TK_DELETE && sqlite3StrICmp("new",zTab) == 0 ){
    +        pExpr->iTable = 1;
    +        pTab = pParse->pTriggerTab;
    +      }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){
    +        pExpr->iTable = 0;
    +        pTab = pParse->pTriggerTab;
    +      }
    +
    +      if( pTab ){ 
    +        int iCol;
    +        pSchema = pTab->pSchema;
    +        cntTab++;
    +        if( sqlite3IsRowid(zCol) ){
    +          iCol = -1;
    +        }else{
    +          for(iCol=0; iCol<pTab->nCol; iCol++){
    +            Column *pCol = &pTab->aCol[iCol];
    +            if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
    +              if( iCol==pTab->iPKey ){
    +                iCol = -1;
    +              }
    +              break;
    +            }
    +          }
    +        }
    +        if( iCol<pTab->nCol ){
    +          cnt++;
    +          if( iCol<0 ){
    +            pExpr->affinity = SQLITE_AFF_INTEGER;
    +          }else if( pExpr->iTable==0 ){
    +            testcase( iCol==31 );
    +            testcase( iCol==32 );
    +            pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
    +          }
    +          pExpr->iColumn = (i16)iCol;
    +          pExpr->pTab = pTab;
    +          isTrigger = 1;
    +        }
    +      }
    +    }
    +#endif /* !defined(SQLITE_OMIT_TRIGGER) */
    +
    +    /*
    +    ** Perhaps the name is a reference to the ROWID
    +    */
    +    if( cnt==0 && cntTab==1 && sqlite3IsRowid(zCol) ){
    +      cnt = 1;
    +      pExpr->iColumn = -1;
    +      pExpr->affinity = SQLITE_AFF_INTEGER;
    +    }
    +
    +    /*
    +    ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z
    +    ** might refer to an result-set alias.  This happens, for example, when
    +    ** we are resolving names in the WHERE clause of the following command:
    +    **
    +    **     SELECT a+b AS x FROM table WHERE x<10;
    +    **
    +    ** In cases like this, replace pExpr with a copy of the expression that
    +    ** forms the result set entry ("a+b" in the example) and return immediately.
    +    ** Note that the expression in the result set should have already been
    +    ** resolved by the time the WHERE clause is resolved.
    +    */
    +    if( cnt==0 && (pEList = pNC->pEList)!=0 && zTab==0 ){
    +      for(j=0; j<pEList->nExpr; j++){
    +        char *zAs = pEList->a[j].zName;
    +        if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
    +          Expr *pOrig;
    +          assert( pExpr->pLeft==0 && pExpr->pRight==0 );
    +          assert( pExpr->x.pList==0 );
    +          assert( pExpr->x.pSelect==0 );
    +          pOrig = pEList->a[j].pExpr;
    +          if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){
    +            sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
    +            return WRC_Abort;
    +          }
    +          resolveAlias(pParse, pEList, j, pExpr, "");
    +          cnt = 1;
    +          pMatch = 0;
    +          assert( zTab==0 && zDb==0 );
    +          goto lookupname_end;
    +        }
    +      } 
    +    }
    +
    +    /* Advance to the next name context.  The loop will exit when either
    +    ** we have a match (cnt>0) or when we run out of name contexts.
    +    */
    +    if( cnt==0 ){
    +      pNC = pNC->pNext;
    +    }
    +  }
    +
    +  /*
    +  ** If X and Y are NULL (in other words if only the column name Z is
    +  ** supplied) and the value of Z is enclosed in double-quotes, then
    +  ** Z is a string literal if it doesn't match any column names.  In that
    +  ** case, we need to return right away and not make any changes to
    +  ** pExpr.
    +  **
    +  ** Because no reference was made to outer contexts, the pNC->nRef
    +  ** fields are not changed in any context.
    +  */
    +  if( cnt==0 && zTab==0 && ExprHasProperty(pExpr,EP_DblQuoted) ){
    +    pExpr->op = TK_STRING;
    +    pExpr->pTab = 0;
    +    return WRC_Prune;
    +  }
    +
    +  /*
    +  ** cnt==0 means there was not match.  cnt>1 means there were two or
    +  ** more matches.  Either way, we have an error.
    +  */
    +  if( cnt!=1 ){
    +    const char *zErr;
    +    zErr = cnt==0 ? "no such column" : "ambiguous column name";
    +    if( zDb ){
    +      sqlite3ErrorMsg(pParse, "%s: %s.%s.%s", zErr, zDb, zTab, zCol);
    +    }else if( zTab ){
    +      sqlite3ErrorMsg(pParse, "%s: %s.%s", zErr, zTab, zCol);
    +    }else{
    +      sqlite3ErrorMsg(pParse, "%s: %s", zErr, zCol);
    +    }
    +    pTopNC->nErr++;
    +  }
    +
    +  /* If a column from a table in pSrcList is referenced, then record
    +  ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes
    +  ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  If the
    +  ** column number is greater than the number of bits in the bitmask
    +  ** then set the high-order bit of the bitmask.
    +  */
    +  if( pExpr->iColumn>=0 && pMatch!=0 ){
    +    int n = pExpr->iColumn;
    +    testcase( n==BMS-1 );
    +    if( n>=BMS ){
    +      n = BMS-1;
    +    }
    +    assert( pMatch->iCursor==pExpr->iTable );
    +    pMatch->colUsed |= ((Bitmask)1)<<n;
    +  }
    +
    +  /* Clean up and return
    +  */
    +  sqlite3ExprDelete(db, pExpr->pLeft);
    +  pExpr->pLeft = 0;
    +  sqlite3ExprDelete(db, pExpr->pRight);
    +  pExpr->pRight = 0;
    +  pExpr->op = (isTrigger ? TK_TRIGGER : TK_COLUMN);
    +lookupname_end:
    +  if( cnt==1 ){
    +    assert( pNC!=0 );
    +    sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
    +    /* Increment the nRef value on all name contexts from TopNC up to
    +    ** the point where the name matched. */
    +    for(;;){
    +      assert( pTopNC!=0 );
    +      pTopNC->nRef++;
    +      if( pTopNC==pNC ) break;
    +      pTopNC = pTopNC->pNext;
    +    }
    +    return WRC_Prune;
    +  } else {
    +    return WRC_Abort;
    +  }
    +}
    +
    +/*
    +** Allocate and return a pointer to an expression to load the column iCol
    +** from datasource iSrc datasource in SrcList pSrc.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
    +  Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0);
    +  if( p ){
    +    struct SrcList_item *pItem = &pSrc->a[iSrc];
    +    p->pTab = pItem->pTab;
    +    p->iTable = pItem->iCursor;
    +    if( p->pTab->iPKey==iCol ){
    +      p->iColumn = -1;
    +    }else{
    +      p->iColumn = (ynVar)iCol;
    +      pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
    +    }
    +    ExprSetProperty(p, EP_Resolved);
    +  }
    +  return p;
    +}
    +
    +/*
    +** This routine is callback for sqlite3WalkExpr().
    +**
    +** Resolve symbolic names into TK_COLUMN operators for the current
    +** node in the expression tree.  Return 0 to continue the search down
    +** the tree or 2 to abort the tree walk.
    +**
    +** This routine also does error checking and name resolution for
    +** function names.  The operator for aggregate functions is changed
    +** to TK_AGG_FUNCTION.
    +*/
    +static int resolveExprStep(Walker *pWalker, Expr *pExpr){
    +  NameContext *pNC;
    +  Parse *pParse;
    +
    +  pNC = pWalker->u.pNC;
    +  assert( pNC!=0 );
    +  pParse = pNC->pParse;
    +  assert( pParse==pWalker->pParse );
    +
    +  if( ExprHasAnyProperty(pExpr, EP_Resolved) ) return WRC_Prune;
    +  ExprSetProperty(pExpr, EP_Resolved);
    +#ifndef NDEBUG
    +  if( pNC->pSrcList && pNC->pSrcList->nAlloc>0 ){
    +    SrcList *pSrcList = pNC->pSrcList;
    +    int i;
    +    for(i=0; i<pNC->pSrcList->nSrc; i++){
    +      assert( pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab);
    +    }
    +  }
    +#endif
    +  switch( pExpr->op ){
    +
    +#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
    +    /* The special operator TK_ROW means use the rowid for the first
    +    ** column in the FROM clause.  This is used by the LIMIT and ORDER BY
    +    ** clause processing on UPDATE and DELETE statements.
    +    */
    +    case TK_ROW: {
    +      SrcList *pSrcList = pNC->pSrcList;
    +      struct SrcList_item *pItem;
    +      assert( pSrcList && pSrcList->nSrc==1 );
    +      pItem = pSrcList->a; 
    +      pExpr->op = TK_COLUMN;
    +      pExpr->pTab = pItem->pTab;
    +      pExpr->iTable = pItem->iCursor;
    +      pExpr->iColumn = -1;
    +      pExpr->affinity = SQLITE_AFF_INTEGER;
    +      break;
    +    }
    +#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) */
    +
    +    /* A lone identifier is the name of a column.
    +    */
    +    case TK_ID: {
    +      return lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr);
    +    }
    +  
    +    /* A table name and column name:     ID.ID
    +    ** Or a database, table and column:  ID.ID.ID
    +    */
    +    case TK_DOT: {
    +      const char *zColumn;
    +      const char *zTable;
    +      const char *zDb;
    +      Expr *pRight;
    +
    +      /* if( pSrcList==0 ) break; */
    +      pRight = pExpr->pRight;
    +      if( pRight->op==TK_ID ){
    +        zDb = 0;
    +        zTable = pExpr->pLeft->u.zToken;
    +        zColumn = pRight->u.zToken;
    +      }else{
    +        assert( pRight->op==TK_DOT );
    +        zDb = pExpr->pLeft->u.zToken;
    +        zTable = pRight->pLeft->u.zToken;
    +        zColumn = pRight->pRight->u.zToken;
    +      }
    +      return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr);
    +    }
    +
    +    /* Resolve function names
    +    */
    +    case TK_CONST_FUNC:
    +    case TK_FUNCTION: {
    +      ExprList *pList = pExpr->x.pList;    /* The argument list */
    +      int n = pList ? pList->nExpr : 0;    /* Number of arguments */
    +      int no_such_func = 0;       /* True if no such function exists */
    +      int wrong_num_args = 0;     /* True if wrong number of arguments */
    +      int is_agg = 0;             /* True if is an aggregate function */
    +      int auth;                   /* Authorization to use the function */
    +      int nId;                    /* Number of characters in function name */
    +      const char *zId;            /* The function name. */
    +      FuncDef *pDef;              /* Information about the function */
    +      u8 enc = ENC(pParse->db);   /* The database encoding */
    +
    +      testcase( pExpr->op==TK_CONST_FUNC );
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +      zId = pExpr->u.zToken;
    +      nId = sqlite3Strlen30(zId);
    +      pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);
    +      if( pDef==0 ){
    +        pDef = sqlite3FindFunction(pParse->db, zId, nId, -1, enc, 0);
    +        if( pDef==0 ){
    +          no_such_func = 1;
    +        }else{
    +          wrong_num_args = 1;
    +        }
    +      }else{
    +        is_agg = pDef->xFunc==0;
    +      }
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +      if( pDef ){
    +        auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0);
    +        if( auth!=SQLITE_OK ){
    +          if( auth==SQLITE_DENY ){
    +            sqlite3ErrorMsg(pParse, "not authorized to use function: %s",
    +                                    pDef->zName);
    +            pNC->nErr++;
    +          }
    +          pExpr->op = TK_NULL;
    +          return WRC_Prune;
    +        }
    +      }
    +#endif
    +      if( is_agg && !pNC->allowAgg ){
    +        sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
    +        pNC->nErr++;
    +        is_agg = 0;
    +      }else if( no_such_func ){
    +        sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
    +        pNC->nErr++;
    +      }else if( wrong_num_args ){
    +        sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
    +             nId, zId);
    +        pNC->nErr++;
    +      }
    +      if( is_agg ){
    +        pExpr->op = TK_AGG_FUNCTION;
    +        pNC->hasAgg = 1;
    +      }
    +      if( is_agg ) pNC->allowAgg = 0;
    +      sqlite3WalkExprList(pWalker, pList);
    +      if( is_agg ) pNC->allowAgg = 1;
    +      /* FIX ME:  Compute pExpr->affinity based on the expected return
    +      ** type of the function 
    +      */
    +      return WRC_Prune;
    +    }
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    case TK_SELECT:
    +    case TK_EXISTS:  testcase( pExpr->op==TK_EXISTS );
    +#endif
    +    case TK_IN: {
    +      testcase( pExpr->op==TK_IN );
    +      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +        int nRef = pNC->nRef;
    +#ifndef SQLITE_OMIT_CHECK
    +        if( pNC->isCheck ){
    +          sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");
    +        }
    +#endif
    +        sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
    +        assert( pNC->nRef>=nRef );
    +        if( nRef!=pNC->nRef ){
    +          ExprSetProperty(pExpr, EP_VarSelect);
    +        }
    +      }
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_CHECK
    +    case TK_VARIABLE: {
    +      if( pNC->isCheck ){
    +        sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");
    +      }
    +      break;
    +    }
    +#endif
    +  }
    +  return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue;
    +}
    +
    +/*
    +** pEList is a list of expressions which are really the result set of the
    +** a SELECT statement.  pE is a term in an ORDER BY or GROUP BY clause.
    +** This routine checks to see if pE is a simple identifier which corresponds
    +** to the AS-name of one of the terms of the expression list.  If it is,
    +** this routine return an integer between 1 and N where N is the number of
    +** elements in pEList, corresponding to the matching entry.  If there is
    +** no match, or if pE is not a simple identifier, then this routine
    +** return 0.
    +**
    +** pEList has been resolved.  pE has not.
    +*/
    +static int resolveAsName(
    +  Parse *pParse,     /* Parsing context for error messages */
    +  ExprList *pEList,  /* List of expressions to scan */
    +  Expr *pE           /* Expression we are trying to match */
    +){
    +  int i;             /* Loop counter */
    +
    +  UNUSED_PARAMETER(pParse);
    +
    +  if( pE->op==TK_ID ){
    +    char *zCol = pE->u.zToken;
    +    for(i=0; i<pEList->nExpr; i++){
    +      char *zAs = pEList->a[i].zName;
    +      if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
    +        return i+1;
    +      }
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** pE is a pointer to an expression which is a single term in the
    +** ORDER BY of a compound SELECT.  The expression has not been
    +** name resolved.
    +**
    +** At the point this routine is called, we already know that the
    +** ORDER BY term is not an integer index into the result set.  That
    +** case is handled by the calling routine.
    +**
    +** Attempt to match pE against result set columns in the left-most
    +** SELECT statement.  Return the index i of the matching column,
    +** as an indication to the caller that it should sort by the i-th column.
    +** The left-most column is 1.  In other words, the value returned is the
    +** same integer value that would be used in the SQL statement to indicate
    +** the column.
    +**
    +** If there is no match, return 0.  Return -1 if an error occurs.
    +*/
    +static int resolveOrderByTermToExprList(
    +  Parse *pParse,     /* Parsing context for error messages */
    +  Select *pSelect,   /* The SELECT statement with the ORDER BY clause */
    +  Expr *pE           /* The specific ORDER BY term */
    +){
    +  int i;             /* Loop counter */
    +  ExprList *pEList;  /* The columns of the result set */
    +  NameContext nc;    /* Name context for resolving pE */
    +
    +  assert( sqlite3ExprIsInteger(pE, &i)==0 );
    +  pEList = pSelect->pEList;
    +
    +  /* Resolve all names in the ORDER BY term expression
    +  */
    +  memset(&nc, 0, sizeof(nc));
    +  nc.pParse = pParse;
    +  nc.pSrcList = pSelect->pSrc;
    +  nc.pEList = pEList;
    +  nc.allowAgg = 1;
    +  nc.nErr = 0;
    +  if( sqlite3ResolveExprNames(&nc, pE) ){
    +    sqlite3ErrorClear(pParse);
    +    return 0;
    +  }
    +
    +  /* Try to match the ORDER BY expression against an expression
    +  ** in the result set.  Return an 1-based index of the matching
    +  ** result-set entry.
    +  */
    +  for(i=0; i<pEList->nExpr; i++){
    +    if( sqlite3ExprCompare(pEList->a[i].pExpr, pE) ){
    +      return i+1;
    +    }
    +  }
    +
    +  /* If no match, return 0. */
    +  return 0;
    +}
    +
    +/*
    +** Generate an ORDER BY or GROUP BY term out-of-range error.
    +*/
    +static void resolveOutOfRangeError(
    +  Parse *pParse,         /* The error context into which to write the error */
    +  const char *zType,     /* "ORDER" or "GROUP" */
    +  int i,                 /* The index (1-based) of the term out of range */
    +  int mx                 /* Largest permissible value of i */
    +){
    +  sqlite3ErrorMsg(pParse, 
    +    "%r %s BY term out of range - should be "
    +    "between 1 and %d", i, zType, mx);
    +}
    +
    +/*
    +** Analyze the ORDER BY clause in a compound SELECT statement.   Modify
    +** each term of the ORDER BY clause is a constant integer between 1
    +** and N where N is the number of columns in the compound SELECT.
    +**
    +** ORDER BY terms that are already an integer between 1 and N are
    +** unmodified.  ORDER BY terms that are integers outside the range of
    +** 1 through N generate an error.  ORDER BY terms that are expressions
    +** are matched against result set expressions of compound SELECT
    +** beginning with the left-most SELECT and working toward the right.
    +** At the first match, the ORDER BY expression is transformed into
    +** the integer column number.
    +**
    +** Return the number of errors seen.
    +*/
    +static int resolveCompoundOrderBy(
    +  Parse *pParse,        /* Parsing context.  Leave error messages here */
    +  Select *pSelect       /* The SELECT statement containing the ORDER BY */
    +){
    +  int i;
    +  ExprList *pOrderBy;
    +  ExprList *pEList;
    +  sqlite3 *db;
    +  int moreToDo = 1;
    +
    +  pOrderBy = pSelect->pOrderBy;
    +  if( pOrderBy==0 ) return 0;
    +  db = pParse->db;
    +#if SQLITE_MAX_COLUMN
    +  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    +    sqlite3ErrorMsg(pParse, "too many terms in ORDER BY clause");
    +    return 1;
    +  }
    +#endif
    +  for(i=0; i<pOrderBy->nExpr; i++){
    +    pOrderBy->a[i].done = 0;
    +  }
    +  pSelect->pNext = 0;
    +  while( pSelect->pPrior ){
    +    pSelect->pPrior->pNext = pSelect;
    +    pSelect = pSelect->pPrior;
    +  }
    +  while( pSelect && moreToDo ){
    +    struct ExprList_item *pItem;
    +    moreToDo = 0;
    +    pEList = pSelect->pEList;
    +    assert( pEList!=0 );
    +    for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
    +      int iCol = -1;
    +      Expr *pE, *pDup;
    +      if( pItem->done ) continue;
    +      pE = pItem->pExpr;
    +      if( sqlite3ExprIsInteger(pE, &iCol) ){
    +        if( iCol<=0 || iCol>pEList->nExpr ){
    +          resolveOutOfRangeError(pParse, "ORDER", i+1, pEList->nExpr);
    +          return 1;
    +        }
    +      }else{
    +        iCol = resolveAsName(pParse, pEList, pE);
    +        if( iCol==0 ){
    +          pDup = sqlite3ExprDup(db, pE, 0);
    +          if( !db->mallocFailed ){
    +            assert(pDup);
    +            iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);
    +          }
    +          sqlite3ExprDelete(db, pDup);
    +        }
    +      }
    +      if( iCol>0 ){
    +        CollSeq *pColl = pE->pColl;
    +        int flags = pE->flags & EP_ExpCollate;
    +        sqlite3ExprDelete(db, pE);
    +        pItem->pExpr = pE = sqlite3Expr(db, TK_INTEGER, 0);
    +        if( pE==0 ) return 1;
    +        pE->pColl = pColl;
    +        pE->flags |= EP_IntValue | flags;
    +        pE->u.iValue = iCol;
    +        pItem->iCol = (u16)iCol;
    +        pItem->done = 1;
    +      }else{
    +        moreToDo = 1;
    +      }
    +    }
    +    pSelect = pSelect->pNext;
    +  }
    +  for(i=0; i<pOrderBy->nExpr; i++){
    +    if( pOrderBy->a[i].done==0 ){
    +      sqlite3ErrorMsg(pParse, "%r ORDER BY term does not match any "
    +            "column in the result set", i+1);
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Check every term in the ORDER BY or GROUP BY clause pOrderBy of
    +** the SELECT statement pSelect.  If any term is reference to a
    +** result set expression (as determined by the ExprList.a.iCol field)
    +** then convert that term into a copy of the corresponding result set
    +** column.
    +**
    +** If any errors are detected, add an error message to pParse and
    +** return non-zero.  Return zero if no errors are seen.
    +*/
    +SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
    +  Parse *pParse,        /* Parsing context.  Leave error messages here */
    +  Select *pSelect,      /* The SELECT statement containing the clause */
    +  ExprList *pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */
    +  const char *zType     /* "ORDER" or "GROUP" */
    +){
    +  int i;
    +  sqlite3 *db = pParse->db;
    +  ExprList *pEList;
    +  struct ExprList_item *pItem;
    +
    +  if( pOrderBy==0 || pParse->db->mallocFailed ) return 0;
    +#if SQLITE_MAX_COLUMN
    +  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    +    sqlite3ErrorMsg(pParse, "too many terms in %s BY clause", zType);
    +    return 1;
    +  }
    +#endif
    +  pEList = pSelect->pEList;
    +  assert( pEList!=0 );  /* sqlite3SelectNew() guarantees this */
    +  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
    +    if( pItem->iCol ){
    +      if( pItem->iCol>pEList->nExpr ){
    +        resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
    +        return 1;
    +      }
    +      resolveAlias(pParse, pEList, pItem->iCol-1, pItem->pExpr, zType);
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
    +** The Name context of the SELECT statement is pNC.  zType is either
    +** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
    +**
    +** This routine resolves each term of the clause into an expression.
    +** If the order-by term is an integer I between 1 and N (where N is the
    +** number of columns in the result set of the SELECT) then the expression
    +** in the resolution is a copy of the I-th result-set expression.  If
    +** the order-by term is an identify that corresponds to the AS-name of
    +** a result-set expression, then the term resolves to a copy of the
    +** result-set expression.  Otherwise, the expression is resolved in
    +** the usual way - using sqlite3ResolveExprNames().
    +**
    +** This routine returns the number of errors.  If errors occur, then
    +** an appropriate error message might be left in pParse.  (OOM errors
    +** excepted.)
    +*/
    +static int resolveOrderGroupBy(
    +  NameContext *pNC,     /* The name context of the SELECT statement */
    +  Select *pSelect,      /* The SELECT statement holding pOrderBy */
    +  ExprList *pOrderBy,   /* An ORDER BY or GROUP BY clause to resolve */
    +  const char *zType     /* Either "ORDER" or "GROUP", as appropriate */
    +){
    +  int i;                         /* Loop counter */
    +  int iCol;                      /* Column number */
    +  struct ExprList_item *pItem;   /* A term of the ORDER BY clause */
    +  Parse *pParse;                 /* Parsing context */
    +  int nResult;                   /* Number of terms in the result set */
    +
    +  if( pOrderBy==0 ) return 0;
    +  nResult = pSelect->pEList->nExpr;
    +  pParse = pNC->pParse;
    +  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
    +    Expr *pE = pItem->pExpr;
    +    iCol = resolveAsName(pParse, pSelect->pEList, pE);
    +    if( iCol>0 ){
    +      /* If an AS-name match is found, mark this ORDER BY column as being
    +      ** a copy of the iCol-th result-set column.  The subsequent call to
    +      ** sqlite3ResolveOrderGroupBy() will convert the expression to a
    +      ** copy of the iCol-th result-set expression. */
    +      pItem->iCol = (u16)iCol;
    +      continue;
    +    }
    +    if( sqlite3ExprIsInteger(pE, &iCol) ){
    +      /* The ORDER BY term is an integer constant.  Again, set the column
    +      ** number so that sqlite3ResolveOrderGroupBy() will convert the
    +      ** order-by term to a copy of the result-set expression */
    +      if( iCol<1 ){
    +        resolveOutOfRangeError(pParse, zType, i+1, nResult);
    +        return 1;
    +      }
    +      pItem->iCol = (u16)iCol;
    +      continue;
    +    }
    +
    +    /* Otherwise, treat the ORDER BY term as an ordinary expression */
    +    pItem->iCol = 0;
    +    if( sqlite3ResolveExprNames(pNC, pE) ){
    +      return 1;
    +    }
    +  }
    +  return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
    +}
    +
    +/*
    +** Resolve names in the SELECT statement p and all of its descendents.
    +*/
    +static int resolveSelectStep(Walker *pWalker, Select *p){
    +  NameContext *pOuterNC;  /* Context that contains this SELECT */
    +  NameContext sNC;        /* Name context of this SELECT */
    +  int isCompound;         /* True if p is a compound select */
    +  int nCompound;          /* Number of compound terms processed so far */
    +  Parse *pParse;          /* Parsing context */
    +  ExprList *pEList;       /* Result set expression list */
    +  int i;                  /* Loop counter */
    +  ExprList *pGroupBy;     /* The GROUP BY clause */
    +  Select *pLeftmost;      /* Left-most of SELECT of a compound */
    +  sqlite3 *db;            /* Database connection */
    +  
    +
    +  assert( p!=0 );
    +  if( p->selFlags & SF_Resolved ){
    +    return WRC_Prune;
    +  }
    +  pOuterNC = pWalker->u.pNC;
    +  pParse = pWalker->pParse;
    +  db = pParse->db;
    +
    +  /* Normally sqlite3SelectExpand() will be called first and will have
    +  ** already expanded this SELECT.  However, if this is a subquery within
    +  ** an expression, sqlite3ResolveExprNames() will be called without a
    +  ** prior call to sqlite3SelectExpand().  When that happens, let
    +  ** sqlite3SelectPrep() do all of the processing for this SELECT.
    +  ** sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and
    +  ** this routine in the correct order.
    +  */
    +  if( (p->selFlags & SF_Expanded)==0 ){
    +    sqlite3SelectPrep(pParse, p, pOuterNC);
    +    return (pParse->nErr || db->mallocFailed) ? WRC_Abort : WRC_Prune;
    +  }
    +
    +  isCompound = p->pPrior!=0;
    +  nCompound = 0;
    +  pLeftmost = p;
    +  while( p ){
    +    assert( (p->selFlags & SF_Expanded)!=0 );
    +    assert( (p->selFlags & SF_Resolved)==0 );
    +    p->selFlags |= SF_Resolved;
    +
    +    /* Resolve the expressions in the LIMIT and OFFSET clauses. These
    +    ** are not allowed to refer to any names, so pass an empty NameContext.
    +    */
    +    memset(&sNC, 0, sizeof(sNC));
    +    sNC.pParse = pParse;
    +    if( sqlite3ResolveExprNames(&sNC, p->pLimit) ||
    +        sqlite3ResolveExprNames(&sNC, p->pOffset) ){
    +      return WRC_Abort;
    +    }
    +  
    +    /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
    +    ** resolve the result-set expression list.
    +    */
    +    sNC.allowAgg = 1;
    +    sNC.pSrcList = p->pSrc;
    +    sNC.pNext = pOuterNC;
    +  
    +    /* Resolve names in the result set. */
    +    pEList = p->pEList;
    +    assert( pEList!=0 );
    +    for(i=0; i<pEList->nExpr; i++){
    +      Expr *pX = pEList->a[i].pExpr;
    +      if( sqlite3ResolveExprNames(&sNC, pX) ){
    +        return WRC_Abort;
    +      }
    +    }
    +  
    +    /* Recursively resolve names in all subqueries
    +    */
    +    for(i=0; i<p->pSrc->nSrc; i++){
    +      struct SrcList_item *pItem = &p->pSrc->a[i];
    +      if( pItem->pSelect ){
    +        const char *zSavedContext = pParse->zAuthContext;
    +        if( pItem->zName ) pParse->zAuthContext = pItem->zName;
    +        sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
    +        pParse->zAuthContext = zSavedContext;
    +        if( pParse->nErr || db->mallocFailed ) return WRC_Abort;
    +      }
    +    }
    +  
    +    /* If there are no aggregate functions in the result-set, and no GROUP BY 
    +    ** expression, do not allow aggregates in any of the other expressions.
    +    */
    +    assert( (p->selFlags & SF_Aggregate)==0 );
    +    pGroupBy = p->pGroupBy;
    +    if( pGroupBy || sNC.hasAgg ){
    +      p->selFlags |= SF_Aggregate;
    +    }else{
    +      sNC.allowAgg = 0;
    +    }
    +  
    +    /* If a HAVING clause is present, then there must be a GROUP BY clause.
    +    */
    +    if( p->pHaving && !pGroupBy ){
    +      sqlite3ErrorMsg(pParse, "a GROUP BY clause is required before HAVING");
    +      return WRC_Abort;
    +    }
    +  
    +    /* Add the expression list to the name-context before parsing the
    +    ** other expressions in the SELECT statement. This is so that
    +    ** expressions in the WHERE clause (etc.) can refer to expressions by
    +    ** aliases in the result set.
    +    **
    +    ** Minor point: If this is the case, then the expression will be
    +    ** re-evaluated for each reference to it.
    +    */
    +    sNC.pEList = p->pEList;
    +    if( sqlite3ResolveExprNames(&sNC, p->pWhere) ||
    +       sqlite3ResolveExprNames(&sNC, p->pHaving)
    +    ){
    +      return WRC_Abort;
    +    }
    +
    +    /* The ORDER BY and GROUP BY clauses may not refer to terms in
    +    ** outer queries 
    +    */
    +    sNC.pNext = 0;
    +    sNC.allowAgg = 1;
    +
    +    /* Process the ORDER BY clause for singleton SELECT statements.
    +    ** The ORDER BY clause for compounds SELECT statements is handled
    +    ** below, after all of the result-sets for all of the elements of
    +    ** the compound have been resolved.
    +    */
    +    if( !isCompound && resolveOrderGroupBy(&sNC, p, p->pOrderBy, "ORDER") ){
    +      return WRC_Abort;
    +    }
    +    if( db->mallocFailed ){
    +      return WRC_Abort;
    +    }
    +  
    +    /* Resolve the GROUP BY clause.  At the same time, make sure 
    +    ** the GROUP BY clause does not contain aggregate functions.
    +    */
    +    if( pGroupBy ){
    +      struct ExprList_item *pItem;
    +    
    +      if( resolveOrderGroupBy(&sNC, p, pGroupBy, "GROUP") || db->mallocFailed ){
    +        return WRC_Abort;
    +      }
    +      for(i=0, pItem=pGroupBy->a; i<pGroupBy->nExpr; i++, pItem++){
    +        if( ExprHasProperty(pItem->pExpr, EP_Agg) ){
    +          sqlite3ErrorMsg(pParse, "aggregate functions are not allowed in "
    +              "the GROUP BY clause");
    +          return WRC_Abort;
    +        }
    +      }
    +    }
    +
    +    /* Advance to the next term of the compound
    +    */
    +    p = p->pPrior;
    +    nCompound++;
    +  }
    +
    +  /* Resolve the ORDER BY on a compound SELECT after all terms of
    +  ** the compound have been resolved.
    +  */
    +  if( isCompound && resolveCompoundOrderBy(pParse, pLeftmost) ){
    +    return WRC_Abort;
    +  }
    +
    +  return WRC_Prune;
    +}
    +
    +/*
    +** This routine walks an expression tree and resolves references to
    +** table columns and result-set columns.  At the same time, do error
    +** checking on function usage and set a flag if any aggregate functions
    +** are seen.
    +**
    +** To resolve table columns references we look for nodes (or subtrees) of the 
    +** form X.Y.Z or Y.Z or just Z where
    +**
    +**      X:   The name of a database.  Ex:  "main" or "temp" or
    +**           the symbolic name assigned to an ATTACH-ed database.
    +**
    +**      Y:   The name of a table in a FROM clause.  Or in a trigger
    +**           one of the special names "old" or "new".
    +**
    +**      Z:   The name of a column in table Y.
    +**
    +** The node at the root of the subtree is modified as follows:
    +**
    +**    Expr.op        Changed to TK_COLUMN
    +**    Expr.pTab      Points to the Table object for X.Y
    +**    Expr.iColumn   The column index in X.Y.  -1 for the rowid.
    +**    Expr.iTable    The VDBE cursor number for X.Y
    +**
    +**
    +** To resolve result-set references, look for expression nodes of the
    +** form Z (with no X and Y prefix) where the Z matches the right-hand
    +** size of an AS clause in the result-set of a SELECT.  The Z expression
    +** is replaced by a copy of the left-hand side of the result-set expression.
    +** Table-name and function resolution occurs on the substituted expression
    +** tree.  For example, in:
    +**
    +**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;
    +**
    +** The "x" term of the order by is replaced by "a+b" to render:
    +**
    +**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
    +**
    +** Function calls are checked to make sure that the function is 
    +** defined and that the correct number of arguments are specified.
    +** If the function is an aggregate function, then the pNC->hasAgg is
    +** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
    +** If an expression contains aggregate functions then the EP_Agg
    +** property on the expression is set.
    +**
    +** An error message is left in pParse if anything is amiss.  The number
    +** if errors is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3ResolveExprNames( 
    +  NameContext *pNC,       /* Namespace to resolve expressions in. */
    +  Expr *pExpr             /* The expression to be analyzed. */
    +){
    +  int savedHasAgg;
    +  Walker w;
    +
    +  if( pExpr==0 ) return 0;
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +  {
    +    Parse *pParse = pNC->pParse;
    +    if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
    +      return 1;
    +    }
    +    pParse->nHeight += pExpr->nHeight;
    +  }
    +#endif
    +  savedHasAgg = pNC->hasAgg;
    +  pNC->hasAgg = 0;
    +  w.xExprCallback = resolveExprStep;
    +  w.xSelectCallback = resolveSelectStep;
    +  w.pParse = pNC->pParse;
    +  w.u.pNC = pNC;
    +  sqlite3WalkExpr(&w, pExpr);
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +  pNC->pParse->nHeight -= pExpr->nHeight;
    +#endif
    +  if( pNC->nErr>0 || w.pParse->nErr>0 ){
    +    ExprSetProperty(pExpr, EP_Error);
    +  }
    +  if( pNC->hasAgg ){
    +    ExprSetProperty(pExpr, EP_Agg);
    +  }else if( savedHasAgg ){
    +    pNC->hasAgg = 1;
    +  }
    +  return ExprHasProperty(pExpr, EP_Error);
    +}
    +
    +
    +/*
    +** Resolve all names in all expressions of a SELECT and in all
    +** decendents of the SELECT, including compounds off of p->pPrior,
    +** subqueries in expressions, and subqueries used as FROM clause
    +** terms.
    +**
    +** See sqlite3ResolveExprNames() for a description of the kinds of
    +** transformations that occur.
    +**
    +** All SELECT statements should have been expanded using
    +** sqlite3SelectExpand() prior to invoking this routine.
    +*/
    +SQLITE_PRIVATE void sqlite3ResolveSelectNames(
    +  Parse *pParse,         /* The parser context */
    +  Select *p,             /* The SELECT statement being coded. */
    +  NameContext *pOuterNC  /* Name context for parent SELECT statement */
    +){
    +  Walker w;
    +
    +  assert( p!=0 );
    +  w.xExprCallback = resolveExprStep;
    +  w.xSelectCallback = resolveSelectStep;
    +  w.pParse = pParse;
    +  w.u.pNC = pOuterNC;
    +  sqlite3WalkSelect(&w, p);
    +}
    +
    +/************** End of resolve.c *********************************************/
    +/************** Begin file expr.c ********************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains routines used for analyzing expressions and
    +** for generating VDBE code that evaluates expressions in SQLite.
    +*/
    +
    +/*
    +** Return the 'affinity' of the expression pExpr if any.
    +**
    +** If pExpr is a column, a reference to a column via an 'AS' alias,
    +** or a sub-select with a column as the return value, then the 
    +** affinity of that column is returned. Otherwise, 0x00 is returned,
    +** indicating no affinity for the expression.
    +**
    +** i.e. the WHERE clause expresssions in the following statements all
    +** have an affinity:
    +**
    +** CREATE TABLE t1(a);
    +** SELECT * FROM t1 WHERE a;
    +** SELECT a AS b FROM t1 WHERE b;
    +** SELECT * FROM t1 WHERE (select a from t1);
    +*/
    +SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr){
    +  int op = pExpr->op;
    +  if( op==TK_SELECT ){
    +    assert( pExpr->flags&EP_xIsSelect );
    +    return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
    +  }
    +#ifndef SQLITE_OMIT_CAST
    +  if( op==TK_CAST ){
    +    assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +    return sqlite3AffinityType(pExpr->u.zToken);
    +  }
    +#endif
    +  if( (op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER) 
    +   && pExpr->pTab!=0
    +  ){
    +    /* op==TK_REGISTER && pExpr->pTab!=0 happens when pExpr was originally
    +    ** a TK_COLUMN but was previously evaluated and cached in a register */
    +    int j = pExpr->iColumn;
    +    if( j<0 ) return SQLITE_AFF_INTEGER;
    +    assert( pExpr->pTab && j<pExpr->pTab->nCol );
    +    return pExpr->pTab->aCol[j].affinity;
    +  }
    +  return pExpr->affinity;
    +}
    +
    +/*
    +** Set the collating sequence for expression pExpr to be the collating
    +** sequence named by pToken.   Return a pointer to the revised expression.
    +** The collating sequence is marked as "explicit" using the EP_ExpCollate
    +** flag.  An explicit collating sequence will override implicit
    +** collating sequences.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3ExprSetColl(Parse *pParse, Expr *pExpr, Token *pCollName){
    +  char *zColl = 0;            /* Dequoted name of collation sequence */
    +  CollSeq *pColl;
    +  sqlite3 *db = pParse->db;
    +  zColl = sqlite3NameFromToken(db, pCollName);
    +  if( pExpr && zColl ){
    +    pColl = sqlite3LocateCollSeq(pParse, zColl);
    +    if( pColl ){
    +      pExpr->pColl = pColl;
    +      pExpr->flags |= EP_ExpCollate;
    +    }
    +  }
    +  sqlite3DbFree(db, zColl);
    +  return pExpr;
    +}
    +
    +/*
    +** Return the default collation sequence for the expression pExpr. If
    +** there is no default collation type, return 0.
    +*/
    +SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){
    +  CollSeq *pColl = 0;
    +  Expr *p = pExpr;
    +  while( ALWAYS(p) ){
    +    int op;
    +    pColl = p->pColl;
    +    if( pColl ) break;
    +    op = p->op;
    +    if( p->pTab!=0 && (
    +        op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER || op==TK_TRIGGER
    +    )){
    +      /* op==TK_REGISTER && p->pTab!=0 happens when pExpr was originally
    +      ** a TK_COLUMN but was previously evaluated and cached in a register */
    +      const char *zColl;
    +      int j = p->iColumn;
    +      if( j>=0 ){
    +        sqlite3 *db = pParse->db;
    +        zColl = p->pTab->aCol[j].zColl;
    +        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
    +        pExpr->pColl = pColl;
    +      }
    +      break;
    +    }
    +    if( op!=TK_CAST && op!=TK_UPLUS ){
    +      break;
    +    }
    +    p = p->pLeft;
    +  }
    +  if( sqlite3CheckCollSeq(pParse, pColl) ){ 
    +    pColl = 0;
    +  }
    +  return pColl;
    +}
    +
    +/*
    +** pExpr is an operand of a comparison operator.  aff2 is the
    +** type affinity of the other operand.  This routine returns the
    +** type affinity that should be used for the comparison operator.
    +*/
    +SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2){
    +  char aff1 = sqlite3ExprAffinity(pExpr);
    +  if( aff1 && aff2 ){
    +    /* Both sides of the comparison are columns. If one has numeric
    +    ** affinity, use that. Otherwise use no affinity.
    +    */
    +    if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){
    +      return SQLITE_AFF_NUMERIC;
    +    }else{
    +      return SQLITE_AFF_NONE;
    +    }
    +  }else if( !aff1 && !aff2 ){
    +    /* Neither side of the comparison is a column.  Compare the
    +    ** results directly.
    +    */
    +    return SQLITE_AFF_NONE;
    +  }else{
    +    /* One side is a column, the other is not. Use the columns affinity. */
    +    assert( aff1==0 || aff2==0 );
    +    return (aff1 + aff2);
    +  }
    +}
    +
    +/*
    +** pExpr is a comparison operator.  Return the type affinity that should
    +** be applied to both operands prior to doing the comparison.
    +*/
    +static char comparisonAffinity(Expr *pExpr){
    +  char aff;
    +  assert( pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT ||
    +          pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE ||
    +          pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT );
    +  assert( pExpr->pLeft );
    +  aff = sqlite3ExprAffinity(pExpr->pLeft);
    +  if( pExpr->pRight ){
    +    aff = sqlite3CompareAffinity(pExpr->pRight, aff);
    +  }else if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +    aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);
    +  }else if( !aff ){
    +    aff = SQLITE_AFF_NONE;
    +  }
    +  return aff;
    +}
    +
    +/*
    +** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.
    +** idx_affinity is the affinity of an indexed column. Return true
    +** if the index with affinity idx_affinity may be used to implement
    +** the comparison in pExpr.
    +*/
    +SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){
    +  char aff = comparisonAffinity(pExpr);
    +  switch( aff ){
    +    case SQLITE_AFF_NONE:
    +      return 1;
    +    case SQLITE_AFF_TEXT:
    +      return idx_affinity==SQLITE_AFF_TEXT;
    +    default:
    +      return sqlite3IsNumericAffinity(idx_affinity);
    +  }
    +}
    +
    +/*
    +** Return the P5 value that should be used for a binary comparison
    +** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
    +*/
    +static u8 binaryCompareP5(Expr *pExpr1, Expr *pExpr2, int jumpIfNull){
    +  u8 aff = (char)sqlite3ExprAffinity(pExpr2);
    +  aff = (u8)sqlite3CompareAffinity(pExpr1, aff) | (u8)jumpIfNull;
    +  return aff;
    +}
    +
    +/*
    +** Return a pointer to the collation sequence that should be used by
    +** a binary comparison operator comparing pLeft and pRight.
    +**
    +** If the left hand expression has a collating sequence type, then it is
    +** used. Otherwise the collation sequence for the right hand expression
    +** is used, or the default (BINARY) if neither expression has a collating
    +** type.
    +**
    +** Argument pRight (but not pLeft) may be a null pointer. In this case,
    +** it is not considered.
    +*/
    +SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(
    +  Parse *pParse, 
    +  Expr *pLeft, 
    +  Expr *pRight
    +){
    +  CollSeq *pColl;
    +  assert( pLeft );
    +  if( pLeft->flags & EP_ExpCollate ){
    +    assert( pLeft->pColl );
    +    pColl = pLeft->pColl;
    +  }else if( pRight && pRight->flags & EP_ExpCollate ){
    +    assert( pRight->pColl );
    +    pColl = pRight->pColl;
    +  }else{
    +    pColl = sqlite3ExprCollSeq(pParse, pLeft);
    +    if( !pColl ){
    +      pColl = sqlite3ExprCollSeq(pParse, pRight);
    +    }
    +  }
    +  return pColl;
    +}
    +
    +/*
    +** Generate the operands for a comparison operation.  Before
    +** generating the code for each operand, set the EP_AnyAff
    +** flag on the expression so that it will be able to used a
    +** cached column value that has previously undergone an
    +** affinity change.
    +*/
    +static void codeCompareOperands(
    +  Parse *pParse,    /* Parsing and code generating context */
    +  Expr *pLeft,      /* The left operand */
    +  int *pRegLeft,    /* Register where left operand is stored */
    +  int *pFreeLeft,   /* Free this register when done */
    +  Expr *pRight,     /* The right operand */
    +  int *pRegRight,   /* Register where right operand is stored */
    +  int *pFreeRight   /* Write temp register for right operand there */
    +){
    +  while( pLeft->op==TK_UPLUS ) pLeft = pLeft->pLeft;
    +  pLeft->flags |= EP_AnyAff;
    +  *pRegLeft = sqlite3ExprCodeTemp(pParse, pLeft, pFreeLeft);
    +  while( pRight->op==TK_UPLUS ) pRight = pRight->pLeft;
    +  pRight->flags |= EP_AnyAff;
    +  *pRegRight = sqlite3ExprCodeTemp(pParse, pRight, pFreeRight);
    +}
    +
    +/*
    +** Generate code for a comparison operator.
    +*/
    +static int codeCompare(
    +  Parse *pParse,    /* The parsing (and code generating) context */
    +  Expr *pLeft,      /* The left operand */
    +  Expr *pRight,     /* The right operand */
    +  int opcode,       /* The comparison opcode */
    +  int in1, int in2, /* Register holding operands */
    +  int dest,         /* Jump here if true.  */
    +  int jumpIfNull    /* If true, jump if either operand is NULL */
    +){
    +  int p5;
    +  int addr;
    +  CollSeq *p4;
    +
    +  p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
    +  p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
    +  addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1,
    +                           (void*)p4, P4_COLLSEQ);
    +  sqlite3VdbeChangeP5(pParse->pVdbe, (u8)p5);
    +  if( (p5 & SQLITE_AFF_MASK)!=SQLITE_AFF_NONE ){
    +    sqlite3ExprCacheAffinityChange(pParse, in1, 1);
    +    sqlite3ExprCacheAffinityChange(pParse, in2, 1);
    +  }
    +  return addr;
    +}
    +
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +/*
    +** Check that argument nHeight is less than or equal to the maximum
    +** expression depth allowed. If it is not, leave an error message in
    +** pParse.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCheckHeight(Parse *pParse, int nHeight){
    +  int rc = SQLITE_OK;
    +  int mxHeight = pParse->db->aLimit[SQLITE_LIMIT_EXPR_DEPTH];
    +  if( nHeight>mxHeight ){
    +    sqlite3ErrorMsg(pParse, 
    +       "Expression tree is too large (maximum depth %d)", mxHeight
    +    );
    +    rc = SQLITE_ERROR;
    +  }
    +  return rc;
    +}
    +
    +/* The following three functions, heightOfExpr(), heightOfExprList()
    +** and heightOfSelect(), are used to determine the maximum height
    +** of any expression tree referenced by the structure passed as the
    +** first argument.
    +**
    +** If this maximum height is greater than the current value pointed
    +** to by pnHeight, the second parameter, then set *pnHeight to that
    +** value.
    +*/
    +static void heightOfExpr(Expr *p, int *pnHeight){
    +  if( p ){
    +    if( p->nHeight>*pnHeight ){
    +      *pnHeight = p->nHeight;
    +    }
    +  }
    +}
    +static void heightOfExprList(ExprList *p, int *pnHeight){
    +  if( p ){
    +    int i;
    +    for(i=0; i<p->nExpr; i++){
    +      heightOfExpr(p->a[i].pExpr, pnHeight);
    +    }
    +  }
    +}
    +static void heightOfSelect(Select *p, int *pnHeight){
    +  if( p ){
    +    heightOfExpr(p->pWhere, pnHeight);
    +    heightOfExpr(p->pHaving, pnHeight);
    +    heightOfExpr(p->pLimit, pnHeight);
    +    heightOfExpr(p->pOffset, pnHeight);
    +    heightOfExprList(p->pEList, pnHeight);
    +    heightOfExprList(p->pGroupBy, pnHeight);
    +    heightOfExprList(p->pOrderBy, pnHeight);
    +    heightOfSelect(p->pPrior, pnHeight);
    +  }
    +}
    +
    +/*
    +** Set the Expr.nHeight variable in the structure passed as an 
    +** argument. An expression with no children, Expr.pList or 
    +** Expr.pSelect member has a height of 1. Any other expression
    +** has a height equal to the maximum height of any other 
    +** referenced Expr plus one.
    +*/
    +static void exprSetHeight(Expr *p){
    +  int nHeight = 0;
    +  heightOfExpr(p->pLeft, &nHeight);
    +  heightOfExpr(p->pRight, &nHeight);
    +  if( ExprHasProperty(p, EP_xIsSelect) ){
    +    heightOfSelect(p->x.pSelect, &nHeight);
    +  }else{
    +    heightOfExprList(p->x.pList, &nHeight);
    +  }
    +  p->nHeight = nHeight + 1;
    +}
    +
    +/*
    +** Set the Expr.nHeight variable using the exprSetHeight() function. If
    +** the height is greater than the maximum allowed expression depth,
    +** leave an error in pParse.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprSetHeight(Parse *pParse, Expr *p){
    +  exprSetHeight(p);
    +  sqlite3ExprCheckHeight(pParse, p->nHeight);
    +}
    +
    +/*
    +** Return the maximum height of any expression tree referenced
    +** by the select statement passed as an argument.
    +*/
    +SQLITE_PRIVATE int sqlite3SelectExprHeight(Select *p){
    +  int nHeight = 0;
    +  heightOfSelect(p, &nHeight);
    +  return nHeight;
    +}
    +#else
    +  #define exprSetHeight(y)
    +#endif /* SQLITE_MAX_EXPR_DEPTH>0 */
    +
    +/*
    +** This routine is the core allocator for Expr nodes.
    +**
    +** Construct a new expression node and return a pointer to it.  Memory
    +** for this node and for the pToken argument is a single allocation
    +** obtained from sqlite3DbMalloc().  The calling function
    +** is responsible for making sure the node eventually gets freed.
    +**
    +** If dequote is true, then the token (if it exists) is dequoted.
    +** If dequote is false, no dequoting is performance.  The deQuote
    +** parameter is ignored if pToken is NULL or if the token does not
    +** appear to be quoted.  If the quotes were of the form "..." (double-quotes)
    +** then the EP_DblQuoted flag is set on the expression node.
    +**
    +** Special case:  If op==TK_INTEGER and pToken points to a string that
    +** can be translated into a 32-bit integer, then the token is not
    +** stored in u.zToken.  Instead, the integer values is written
    +** into u.iValue and the EP_IntValue flag is set.  No extra storage
    +** is allocated to hold the integer text and the dequote flag is ignored.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3ExprAlloc(
    +  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
    +  int op,                 /* Expression opcode */
    +  const Token *pToken,    /* Token argument.  Might be NULL */
    +  int dequote             /* True to dequote */
    +){
    +  Expr *pNew;
    +  int nExtra = 0;
    +  int iValue = 0;
    +
    +  if( pToken ){
    +    if( op!=TK_INTEGER || pToken->z==0
    +          || sqlite3GetInt32(pToken->z, &iValue)==0 ){
    +      nExtra = pToken->n+1;
    +    }
    +  }
    +  pNew = sqlite3DbMallocZero(db, sizeof(Expr)+nExtra);
    +  if( pNew ){
    +    pNew->op = (u8)op;
    +    pNew->iAgg = -1;
    +    if( pToken ){
    +      if( nExtra==0 ){
    +        pNew->flags |= EP_IntValue;
    +        pNew->u.iValue = iValue;
    +      }else{
    +        int c;
    +        pNew->u.zToken = (char*)&pNew[1];
    +        memcpy(pNew->u.zToken, pToken->z, pToken->n);
    +        pNew->u.zToken[pToken->n] = 0;
    +        if( dequote && nExtra>=3 
    +             && ((c = pToken->z[0])=='\'' || c=='"' || c=='[' || c=='`') ){
    +          sqlite3Dequote(pNew->u.zToken);
    +          if( c=='"' ) pNew->flags |= EP_DblQuoted;
    +        }
    +      }
    +    }
    +#if SQLITE_MAX_EXPR_DEPTH>0
    +    pNew->nHeight = 1;
    +#endif  
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** Allocate a new expression node from a zero-terminated token that has
    +** already been dequoted.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3Expr(
    +  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
    +  int op,                 /* Expression opcode */
    +  const char *zToken      /* Token argument.  Might be NULL */
    +){
    +  Token x;
    +  x.z = zToken;
    +  x.n = zToken ? sqlite3Strlen30(zToken) : 0;
    +  return sqlite3ExprAlloc(db, op, &x, 0);
    +}
    +
    +/*
    +** Attach subtrees pLeft and pRight to the Expr node pRoot.
    +**
    +** If pRoot==NULL that means that a memory allocation error has occurred.
    +** In that case, delete the subtrees pLeft and pRight.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(
    +  sqlite3 *db,
    +  Expr *pRoot,
    +  Expr *pLeft,
    +  Expr *pRight
    +){
    +  if( pRoot==0 ){
    +    assert( db->mallocFailed );
    +    sqlite3ExprDelete(db, pLeft);
    +    sqlite3ExprDelete(db, pRight);
    +  }else{
    +    if( pRight ){
    +      pRoot->pRight = pRight;
    +      if( pRight->flags & EP_ExpCollate ){
    +        pRoot->flags |= EP_ExpCollate;
    +        pRoot->pColl = pRight->pColl;
    +      }
    +    }
    +    if( pLeft ){
    +      pRoot->pLeft = pLeft;
    +      if( pLeft->flags & EP_ExpCollate ){
    +        pRoot->flags |= EP_ExpCollate;
    +        pRoot->pColl = pLeft->pColl;
    +      }
    +    }
    +    exprSetHeight(pRoot);
    +  }
    +}
    +
    +/*
    +** Allocate a Expr node which joins as many as two subtrees.
    +**
    +** One or both of the subtrees can be NULL.  Return a pointer to the new
    +** Expr node.  Or, if an OOM error occurs, set pParse->db->mallocFailed,
    +** free the subtrees and return NULL.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3PExpr(
    +  Parse *pParse,          /* Parsing context */
    +  int op,                 /* Expression opcode */
    +  Expr *pLeft,            /* Left operand */
    +  Expr *pRight,           /* Right operand */
    +  const Token *pToken     /* Argument token */
    +){
    +  Expr *p = sqlite3ExprAlloc(pParse->db, op, pToken, 1);
    +  sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
    +  return p;
    +}
    +
    +/*
    +** Join two expressions using an AND operator.  If either expression is
    +** NULL, then just return the other expression.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
    +  if( pLeft==0 ){
    +    return pRight;
    +  }else if( pRight==0 ){
    +    return pLeft;
    +  }else{
    +    Expr *pNew = sqlite3ExprAlloc(db, TK_AND, 0, 0);
    +    sqlite3ExprAttachSubtrees(db, pNew, pLeft, pRight);
    +    return pNew;
    +  }
    +}
    +
    +/*
    +** Construct a new expression node for a function with multiple
    +** arguments.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){
    +  Expr *pNew;
    +  sqlite3 *db = pParse->db;
    +  assert( pToken );
    +  pNew = sqlite3ExprAlloc(db, TK_FUNCTION, pToken, 1);
    +  if( pNew==0 ){
    +    sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
    +    return 0;
    +  }
    +  pNew->x.pList = pList;
    +  assert( !ExprHasProperty(pNew, EP_xIsSelect) );
    +  sqlite3ExprSetHeight(pParse, pNew);
    +  return pNew;
    +}
    +
    +/*
    +** Assign a variable number to an expression that encodes a wildcard
    +** in the original SQL statement.  
    +**
    +** Wildcards consisting of a single "?" are assigned the next sequential
    +** variable number.
    +**
    +** Wildcards of the form "?nnn" are assigned the number "nnn".  We make
    +** sure "nnn" is not too be to avoid a denial of service attack when
    +** the SQL statement comes from an external source.
    +**
    +** Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number
    +** as the previous instance of the same wildcard.  Or if this is the first
    +** instance of the wildcard, the next sequenial variable number is
    +** assigned.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){
    +  sqlite3 *db = pParse->db;
    +  const char *z;
    +
    +  if( pExpr==0 ) return;
    +  assert( !ExprHasAnyProperty(pExpr, EP_IntValue|EP_Reduced|EP_TokenOnly) );
    +  z = pExpr->u.zToken;
    +  assert( z!=0 );
    +  assert( z[0]!=0 );
    +  if( z[1]==0 ){
    +    /* Wildcard of the form "?".  Assign the next variable number */
    +    assert( z[0]=='?' );
    +    pExpr->iColumn = (ynVar)(++pParse->nVar);
    +  }else if( z[0]=='?' ){
    +    /* Wildcard of the form "?nnn".  Convert "nnn" to an integer and
    +    ** use it as the variable number */
    +    int i = atoi((char*)&z[1]);
    +    pExpr->iColumn = (ynVar)i;
    +    testcase( i==0 );
    +    testcase( i==1 );
    +    testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]-1 );
    +    testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] );
    +    if( i<1 || i>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){
    +      sqlite3ErrorMsg(pParse, "variable number must be between ?1 and ?%d",
    +          db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]);
    +    }
    +    if( i>pParse->nVar ){
    +      pParse->nVar = i;
    +    }
    +  }else{
    +    /* Wildcards like ":aaa", "$aaa" or "@aaa".  Reuse the same variable
    +    ** number as the prior appearance of the same name, or if the name
    +    ** has never appeared before, reuse the same variable number
    +    */
    +    int i;
    +    u32 n;
    +    n = sqlite3Strlen30(z);
    +    for(i=0; i<pParse->nVarExpr; i++){
    +      Expr *pE = pParse->apVarExpr[i];
    +      assert( pE!=0 );
    +      if( memcmp(pE->u.zToken, z, n)==0 && pE->u.zToken[n]==0 ){
    +        pExpr->iColumn = pE->iColumn;
    +        break;
    +      }
    +    }
    +    if( i>=pParse->nVarExpr ){
    +      pExpr->iColumn = (ynVar)(++pParse->nVar);
    +      if( pParse->nVarExpr>=pParse->nVarExprAlloc-1 ){
    +        pParse->nVarExprAlloc += pParse->nVarExprAlloc + 10;
    +        pParse->apVarExpr =
    +            sqlite3DbReallocOrFree(
    +              db,
    +              pParse->apVarExpr,
    +              pParse->nVarExprAlloc*sizeof(pParse->apVarExpr[0])
    +            );
    +      }
    +      if( !db->mallocFailed ){
    +        assert( pParse->apVarExpr!=0 );
    +        pParse->apVarExpr[pParse->nVarExpr++] = pExpr;
    +      }
    +    }
    +  } 
    +  if( !pParse->nErr && pParse->nVar>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){
    +    sqlite3ErrorMsg(pParse, "too many SQL variables");
    +  }
    +}
    +
    +/*
    +** Clear an expression structure without deleting the structure itself.
    +** Substructure is deleted.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprClear(sqlite3 *db, Expr *p){
    +  assert( p!=0 );
    +  if( !ExprHasAnyProperty(p, EP_TokenOnly) ){
    +    sqlite3ExprDelete(db, p->pLeft);
    +    sqlite3ExprDelete(db, p->pRight);
    +    if( !ExprHasProperty(p, EP_Reduced) && (p->flags2 & EP2_MallocedToken)!=0 ){
    +      sqlite3DbFree(db, p->u.zToken);
    +    }
    +    if( ExprHasProperty(p, EP_xIsSelect) ){
    +      sqlite3SelectDelete(db, p->x.pSelect);
    +    }else{
    +      sqlite3ExprListDelete(db, p->x.pList);
    +    }
    +  }
    +}
    +
    +/*
    +** Recursively delete an expression tree.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){
    +  if( p==0 ) return;
    +  sqlite3ExprClear(db, p);
    +  if( !ExprHasProperty(p, EP_Static) ){
    +    sqlite3DbFree(db, p);
    +  }
    +}
    +
    +/*
    +** Return the number of bytes allocated for the expression structure 
    +** passed as the first argument. This is always one of EXPR_FULLSIZE,
    +** EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.
    +*/
    +static int exprStructSize(Expr *p){
    +  if( ExprHasProperty(p, EP_TokenOnly) ) return EXPR_TOKENONLYSIZE;
    +  if( ExprHasProperty(p, EP_Reduced) ) return EXPR_REDUCEDSIZE;
    +  return EXPR_FULLSIZE;
    +}
    +
    +/*
    +** The dupedExpr*Size() routines each return the number of bytes required
    +** to store a copy of an expression or expression tree.  They differ in
    +** how much of the tree is measured.
    +**
    +**     dupedExprStructSize()     Size of only the Expr structure 
    +**     dupedExprNodeSize()       Size of Expr + space for token
    +**     dupedExprSize()           Expr + token + subtree components
    +**
    +***************************************************************************
    +**
    +** The dupedExprStructSize() function returns two values OR-ed together:  
    +** (1) the space required for a copy of the Expr structure only and 
    +** (2) the EP_xxx flags that indicate what the structure size should be.
    +** The return values is always one of:
    +**
    +**      EXPR_FULLSIZE
    +**      EXPR_REDUCEDSIZE   | EP_Reduced
    +**      EXPR_TOKENONLYSIZE | EP_TokenOnly
    +**
    +** The size of the structure can be found by masking the return value
    +** of this routine with 0xfff.  The flags can be found by masking the
    +** return value with EP_Reduced|EP_TokenOnly.
    +**
    +** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
    +** (unreduced) Expr objects as they or originally constructed by the parser.
    +** During expression analysis, extra information is computed and moved into
    +** later parts of teh Expr object and that extra information might get chopped
    +** off if the expression is reduced.  Note also that it does not work to
    +** make a EXPRDUP_REDUCE copy of a reduced expression.  It is only legal
    +** to reduce a pristine expression tree from the parser.  The implementation
    +** of dupedExprStructSize() contain multiple assert() statements that attempt
    +** to enforce this constraint.
    +*/
    +static int dupedExprStructSize(Expr *p, int flags){
    +  int nSize;
    +  assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
    +  if( 0==(flags&EXPRDUP_REDUCE) ){
    +    nSize = EXPR_FULLSIZE;
    +  }else{
    +    assert( !ExprHasAnyProperty(p, EP_TokenOnly|EP_Reduced) );
    +    assert( !ExprHasProperty(p, EP_FromJoin) ); 
    +    assert( (p->flags2 & EP2_MallocedToken)==0 );
    +    assert( (p->flags2 & EP2_Irreducible)==0 );
    +    if( p->pLeft || p->pRight || p->pColl || p->x.pList ){
    +      nSize = EXPR_REDUCEDSIZE | EP_Reduced;
    +    }else{
    +      nSize = EXPR_TOKENONLYSIZE | EP_TokenOnly;
    +    }
    +  }
    +  return nSize;
    +}
    +
    +/*
    +** This function returns the space in bytes required to store the copy 
    +** of the Expr structure and a copy of the Expr.u.zToken string (if that
    +** string is defined.)
    +*/
    +static int dupedExprNodeSize(Expr *p, int flags){
    +  int nByte = dupedExprStructSize(p, flags) & 0xfff;
    +  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
    +    nByte += sqlite3Strlen30(p->u.zToken)+1;
    +  }
    +  return ROUND8(nByte);
    +}
    +
    +/*
    +** Return the number of bytes required to create a duplicate of the 
    +** expression passed as the first argument. The second argument is a
    +** mask containing EXPRDUP_XXX flags.
    +**
    +** The value returned includes space to create a copy of the Expr struct
    +** itself and the buffer referred to by Expr.u.zToken, if any.
    +**
    +** If the EXPRDUP_REDUCE flag is set, then the return value includes 
    +** space to duplicate all Expr nodes in the tree formed by Expr.pLeft 
    +** and Expr.pRight variables (but not for any structures pointed to or 
    +** descended from the Expr.x.pList or Expr.x.pSelect variables).
    +*/
    +static int dupedExprSize(Expr *p, int flags){
    +  int nByte = 0;
    +  if( p ){
    +    nByte = dupedExprNodeSize(p, flags);
    +    if( flags&EXPRDUP_REDUCE ){
    +      nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
    +    }
    +  }
    +  return nByte;
    +}
    +
    +/*
    +** This function is similar to sqlite3ExprDup(), except that if pzBuffer 
    +** is not NULL then *pzBuffer is assumed to point to a buffer large enough 
    +** to store the copy of expression p, the copies of p->u.zToken
    +** (if applicable), and the copies of the p->pLeft and p->pRight expressions,
    +** if any. Before returning, *pzBuffer is set to the first byte passed the
    +** portion of the buffer copied into by this function.
    +*/
    +static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
    +  Expr *pNew = 0;                      /* Value to return */
    +  if( p ){
    +    const int isReduced = (flags&EXPRDUP_REDUCE);
    +    u8 *zAlloc;
    +    u32 staticFlag = 0;
    +
    +    assert( pzBuffer==0 || isReduced );
    +
    +    /* Figure out where to write the new Expr structure. */
    +    if( pzBuffer ){
    +      zAlloc = *pzBuffer;
    +      staticFlag = EP_Static;
    +    }else{
    +      zAlloc = sqlite3DbMallocRaw(db, dupedExprSize(p, flags));
    +    }
    +    pNew = (Expr *)zAlloc;
    +
    +    if( pNew ){
    +      /* Set nNewSize to the size allocated for the structure pointed to
    +      ** by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or
    +      ** EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed
    +      ** by the copy of the p->u.zToken string (if any).
    +      */
    +      const unsigned nStructSize = dupedExprStructSize(p, flags);
    +      const int nNewSize = nStructSize & 0xfff;
    +      int nToken;
    +      if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
    +        nToken = sqlite3Strlen30(p->u.zToken) + 1;
    +      }else{
    +        nToken = 0;
    +      }
    +      if( isReduced ){
    +        assert( ExprHasProperty(p, EP_Reduced)==0 );
    +        memcpy(zAlloc, p, nNewSize);
    +      }else{
    +        int nSize = exprStructSize(p);
    +        memcpy(zAlloc, p, nSize);
    +        memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
    +      }
    +
    +      /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */
    +      pNew->flags &= ~(EP_Reduced|EP_TokenOnly|EP_Static);
    +      pNew->flags |= nStructSize & (EP_Reduced|EP_TokenOnly);
    +      pNew->flags |= staticFlag;
    +
    +      /* Copy the p->u.zToken string, if any. */
    +      if( nToken ){
    +        char *zToken = pNew->u.zToken = (char*)&zAlloc[nNewSize];
    +        memcpy(zToken, p->u.zToken, nToken);
    +      }
    +
    +      if( 0==((p->flags|pNew->flags) & EP_TokenOnly) ){
    +        /* Fill in the pNew->x.pSelect or pNew->x.pList member. */
    +        if( ExprHasProperty(p, EP_xIsSelect) ){
    +          pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, isReduced);
    +        }else{
    +          pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, isReduced);
    +        }
    +      }
    +
    +      /* Fill in pNew->pLeft and pNew->pRight. */
    +      if( ExprHasAnyProperty(pNew, EP_Reduced|EP_TokenOnly) ){
    +        zAlloc += dupedExprNodeSize(p, flags);
    +        if( ExprHasProperty(pNew, EP_Reduced) ){
    +          pNew->pLeft = exprDup(db, p->pLeft, EXPRDUP_REDUCE, &zAlloc);
    +          pNew->pRight = exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc);
    +        }
    +        if( pzBuffer ){
    +          *pzBuffer = zAlloc;
    +        }
    +      }else{
    +        pNew->flags2 = 0;
    +        if( !ExprHasAnyProperty(p, EP_TokenOnly) ){
    +          pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
    +          pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
    +        }
    +      }
    +
    +    }
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** The following group of routines make deep copies of expressions,
    +** expression lists, ID lists, and select statements.  The copies can
    +** be deleted (by being passed to their respective ...Delete() routines)
    +** without effecting the originals.
    +**
    +** The expression list, ID, and source lists return by sqlite3ExprListDup(),
    +** sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded 
    +** by subsequent calls to sqlite*ListAppend() routines.
    +**
    +** Any tables that the SrcList might point to are not duplicated.
    +**
    +** The flags parameter contains a combination of the EXPRDUP_XXX flags.
    +** If the EXPRDUP_REDUCE flag is set, then the structure returned is a
    +** truncated version of the usual Expr structure that will be stored as
    +** part of the in-memory representation of the database schema.
    +*/
    +SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, Expr *p, int flags){
    +  return exprDup(db, p, flags, 0);
    +}
    +SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
    +  ExprList *pNew;
    +  struct ExprList_item *pItem, *pOldItem;
    +  int i;
    +  if( p==0 ) return 0;
    +  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
    +  if( pNew==0 ) return 0;
    +  pNew->iECursor = 0;
    +  pNew->nExpr = pNew->nAlloc = p->nExpr;
    +  pNew->a = pItem = sqlite3DbMallocRaw(db,  p->nExpr*sizeof(p->a[0]) );
    +  if( pItem==0 ){
    +    sqlite3DbFree(db, pNew);
    +    return 0;
    +  } 
    +  pOldItem = p->a;
    +  for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
    +    Expr *pOldExpr = pOldItem->pExpr;
    +    pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
    +    pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    +    pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
    +    pItem->sortOrder = pOldItem->sortOrder;
    +    pItem->done = 0;
    +    pItem->iCol = pOldItem->iCol;
    +    pItem->iAlias = pOldItem->iAlias;
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** If cursors, triggers, views and subqueries are all omitted from
    +** the build, then none of the following routines, except for 
    +** sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes
    +** called with a NULL argument.
    +*/
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
    + || !defined(SQLITE_OMIT_SUBQUERY)
    +SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
    +  SrcList *pNew;
    +  int i;
    +  int nByte;
    +  if( p==0 ) return 0;
    +  nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
    +  pNew = sqlite3DbMallocRaw(db, nByte );
    +  if( pNew==0 ) return 0;
    +  pNew->nSrc = pNew->nAlloc = p->nSrc;
    +  for(i=0; i<p->nSrc; i++){
    +    struct SrcList_item *pNewItem = &pNew->a[i];
    +    struct SrcList_item *pOldItem = &p->a[i];
    +    Table *pTab;
    +    pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
    +    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    +    pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
    +    pNewItem->jointype = pOldItem->jointype;
    +    pNewItem->iCursor = pOldItem->iCursor;
    +    pNewItem->isPopulated = pOldItem->isPopulated;
    +    pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
    +    pNewItem->notIndexed = pOldItem->notIndexed;
    +    pNewItem->pIndex = pOldItem->pIndex;
    +    pTab = pNewItem->pTab = pOldItem->pTab;
    +    if( pTab ){
    +      pTab->nRef++;
    +    }
    +    pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags);
    +    pNewItem->pOn = sqlite3ExprDup(db, pOldItem->pOn, flags);
    +    pNewItem->pUsing = sqlite3IdListDup(db, pOldItem->pUsing);
    +    pNewItem->colUsed = pOldItem->colUsed;
    +  }
    +  return pNew;
    +}
    +SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
    +  IdList *pNew;
    +  int i;
    +  if( p==0 ) return 0;
    +  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
    +  if( pNew==0 ) return 0;
    +  pNew->nId = pNew->nAlloc = p->nId;
    +  pNew->a = sqlite3DbMallocRaw(db, p->nId*sizeof(p->a[0]) );
    +  if( pNew->a==0 ){
    +    sqlite3DbFree(db, pNew);
    +    return 0;
    +  }
    +  for(i=0; i<p->nId; i++){
    +    struct IdList_item *pNewItem = &pNew->a[i];
    +    struct IdList_item *pOldItem = &p->a[i];
    +    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    +    pNewItem->idx = pOldItem->idx;
    +  }
    +  return pNew;
    +}
    +SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
    +  Select *pNew;
    +  if( p==0 ) return 0;
    +  pNew = sqlite3DbMallocRaw(db, sizeof(*p) );
    +  if( pNew==0 ) return 0;
    +  pNew->pEList = sqlite3ExprListDup(db, p->pEList, flags);
    +  pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags);
    +  pNew->pWhere = sqlite3ExprDup(db, p->pWhere, flags);
    +  pNew->pGroupBy = sqlite3ExprListDup(db, p->pGroupBy, flags);
    +  pNew->pHaving = sqlite3ExprDup(db, p->pHaving, flags);
    +  pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, flags);
    +  pNew->op = p->op;
    +  pNew->pPrior = sqlite3SelectDup(db, p->pPrior, flags);
    +  pNew->pLimit = sqlite3ExprDup(db, p->pLimit, flags);
    +  pNew->pOffset = sqlite3ExprDup(db, p->pOffset, flags);
    +  pNew->iLimit = 0;
    +  pNew->iOffset = 0;
    +  pNew->selFlags = p->selFlags & ~SF_UsesEphemeral;
    +  pNew->pRightmost = 0;
    +  pNew->addrOpenEphm[0] = -1;
    +  pNew->addrOpenEphm[1] = -1;
    +  pNew->addrOpenEphm[2] = -1;
    +  return pNew;
    +}
    +#else
    +SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
    +  assert( p==0 );
    +  return 0;
    +}
    +#endif
    +
    +
    +/*
    +** Add a new element to the end of an expression list.  If pList is
    +** initially NULL, then create a new expression list.
    +**
    +** If a memory allocation error occurs, the entire list is freed and
    +** NULL is returned.  If non-NULL is returned, then it is guaranteed
    +** that the new entry was successfully appended.
    +*/
    +SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(
    +  Parse *pParse,          /* Parsing context */
    +  ExprList *pList,        /* List to which to append. Might be NULL */
    +  Expr *pExpr             /* Expression to be appended. Might be NULL */
    +){
    +  sqlite3 *db = pParse->db;
    +  if( pList==0 ){
    +    pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
    +    if( pList==0 ){
    +      goto no_mem;
    +    }
    +    assert( pList->nAlloc==0 );
    +  }
    +  if( pList->nAlloc<=pList->nExpr ){
    +    struct ExprList_item *a;
    +    int n = pList->nAlloc*2 + 4;
    +    a = sqlite3DbRealloc(db, pList->a, n*sizeof(pList->a[0]));
    +    if( a==0 ){
    +      goto no_mem;
    +    }
    +    pList->a = a;
    +    pList->nAlloc = sqlite3DbMallocSize(db, a)/sizeof(a[0]);
    +  }
    +  assert( pList->a!=0 );
    +  if( 1 ){
    +    struct ExprList_item *pItem = &pList->a[pList->nExpr++];
    +    memset(pItem, 0, sizeof(*pItem));
    +    pItem->pExpr = pExpr;
    +  }
    +  return pList;
    +
    +no_mem:     
    +  /* Avoid leaking memory if malloc has failed. */
    +  sqlite3ExprDelete(db, pExpr);
    +  sqlite3ExprListDelete(db, pList);
    +  return 0;
    +}
    +
    +/*
    +** Set the ExprList.a[].zName element of the most recently added item
    +** on the expression list.
    +**
    +** pList might be NULL following an OOM error.  But pName should never be
    +** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag
    +** is set.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprListSetName(
    +  Parse *pParse,          /* Parsing context */
    +  ExprList *pList,        /* List to which to add the span. */
    +  Token *pName,           /* Name to be added */
    +  int dequote             /* True to cause the name to be dequoted */
    +){
    +  assert( pList!=0 || pParse->db->mallocFailed!=0 );
    +  if( pList ){
    +    struct ExprList_item *pItem;
    +    assert( pList->nExpr>0 );
    +    pItem = &pList->a[pList->nExpr-1];
    +    assert( pItem->zName==0 );
    +    pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
    +    if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
    +  }
    +}
    +
    +/*
    +** Set the ExprList.a[].zSpan element of the most recently added item
    +** on the expression list.
    +**
    +** pList might be NULL following an OOM error.  But pSpan should never be
    +** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag
    +** is set.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprListSetSpan(
    +  Parse *pParse,          /* Parsing context */
    +  ExprList *pList,        /* List to which to add the span. */
    +  ExprSpan *pSpan         /* The span to be added */
    +){
    +  sqlite3 *db = pParse->db;
    +  assert( pList!=0 || db->mallocFailed!=0 );
    +  if( pList ){
    +    struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
    +    assert( pList->nExpr>0 );
    +    assert( db->mallocFailed || pItem->pExpr==pSpan->pExpr );
    +    sqlite3DbFree(db, pItem->zSpan);
    +    pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
    +                                    (int)(pSpan->zEnd - pSpan->zStart));
    +  }
    +}
    +
    +/*
    +** If the expression list pEList contains more than iLimit elements,
    +** leave an error message in pParse.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprListCheckLength(
    +  Parse *pParse,
    +  ExprList *pEList,
    +  const char *zObject
    +){
    +  int mx = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];
    +  testcase( pEList && pEList->nExpr==mx );
    +  testcase( pEList && pEList->nExpr==mx+1 );
    +  if( pEList && pEList->nExpr>mx ){
    +    sqlite3ErrorMsg(pParse, "too many columns in %s", zObject);
    +  }
    +}
    +
    +/*
    +** Delete an entire expression list.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
    +  int i;
    +  struct ExprList_item *pItem;
    +  if( pList==0 ) return;
    +  assert( pList->a!=0 || (pList->nExpr==0 && pList->nAlloc==0) );
    +  assert( pList->nExpr<=pList->nAlloc );
    +  for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
    +    sqlite3ExprDelete(db, pItem->pExpr);
    +    sqlite3DbFree(db, pItem->zName);
    +    sqlite3DbFree(db, pItem->zSpan);
    +  }
    +  sqlite3DbFree(db, pList->a);
    +  sqlite3DbFree(db, pList);
    +}
    +
    +/*
    +** These routines are Walker callbacks.  Walker.u.pi is a pointer
    +** to an integer.  These routines are checking an expression to see
    +** if it is a constant.  Set *Walker.u.pi to 0 if the expression is
    +** not constant.
    +**
    +** These callback routines are used to implement the following:
    +**
    +**     sqlite3ExprIsConstant()
    +**     sqlite3ExprIsConstantNotJoin()
    +**     sqlite3ExprIsConstantOrFunction()
    +**
    +*/
    +static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
    +
    +  /* If pWalker->u.i is 3 then any term of the expression that comes from
    +  ** the ON or USING clauses of a join disqualifies the expression
    +  ** from being considered constant. */
    +  if( pWalker->u.i==3 && ExprHasAnyProperty(pExpr, EP_FromJoin) ){
    +    pWalker->u.i = 0;
    +    return WRC_Abort;
    +  }
    +
    +  switch( pExpr->op ){
    +    /* Consider functions to be constant if all their arguments are constant
    +    ** and pWalker->u.i==2 */
    +    case TK_FUNCTION:
    +      if( pWalker->u.i==2 ) return 0;
    +      /* Fall through */
    +    case TK_ID:
    +    case TK_COLUMN:
    +    case TK_AGG_FUNCTION:
    +    case TK_AGG_COLUMN:
    +      testcase( pExpr->op==TK_ID );
    +      testcase( pExpr->op==TK_COLUMN );
    +      testcase( pExpr->op==TK_AGG_FUNCTION );
    +      testcase( pExpr->op==TK_AGG_COLUMN );
    +      pWalker->u.i = 0;
    +      return WRC_Abort;
    +    default:
    +      testcase( pExpr->op==TK_SELECT ); /* selectNodeIsConstant will disallow */
    +      testcase( pExpr->op==TK_EXISTS ); /* selectNodeIsConstant will disallow */
    +      return WRC_Continue;
    +  }
    +}
    +static int selectNodeIsConstant(Walker *pWalker, Select *NotUsed){
    +  UNUSED_PARAMETER(NotUsed);
    +  pWalker->u.i = 0;
    +  return WRC_Abort;
    +}
    +static int exprIsConst(Expr *p, int initFlag){
    +  Walker w;
    +  w.u.i = initFlag;
    +  w.xExprCallback = exprNodeIsConstant;
    +  w.xSelectCallback = selectNodeIsConstant;
    +  sqlite3WalkExpr(&w, p);
    +  return w.u.i;
    +}
    +
    +/*
    +** Walk an expression tree.  Return 1 if the expression is constant
    +** and 0 if it involves variables or function calls.
    +**
    +** For the purposes of this function, a double-quoted string (ex: "abc")
    +** is considered a variable but a single-quoted string (ex: 'abc') is
    +** a constant.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr *p){
    +  return exprIsConst(p, 1);
    +}
    +
    +/*
    +** Walk an expression tree.  Return 1 if the expression is constant
    +** that does no originate from the ON or USING clauses of a join.
    +** Return 0 if it involves variables or function calls or terms from
    +** an ON or USING clause.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr *p){
    +  return exprIsConst(p, 3);
    +}
    +
    +/*
    +** Walk an expression tree.  Return 1 if the expression is constant
    +** or a function call with constant arguments.  Return and 0 if there
    +** are any variables.
    +**
    +** For the purposes of this function, a double-quoted string (ex: "abc")
    +** is considered a variable but a single-quoted string (ex: 'abc') is
    +** a constant.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p){
    +  return exprIsConst(p, 2);
    +}
    +
    +/*
    +** If the expression p codes a constant integer that is small enough
    +** to fit in a 32-bit integer, return 1 and put the value of the integer
    +** in *pValue.  If the expression is not an integer or if it is too big
    +** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
    +  int rc = 0;
    +  if( p->flags & EP_IntValue ){
    +    *pValue = p->u.iValue;
    +    return 1;
    +  }
    +  switch( p->op ){
    +    case TK_INTEGER: {
    +      rc = sqlite3GetInt32(p->u.zToken, pValue);
    +      assert( rc==0 );
    +      break;
    +    }
    +    case TK_UPLUS: {
    +      rc = sqlite3ExprIsInteger(p->pLeft, pValue);
    +      break;
    +    }
    +    case TK_UMINUS: {
    +      int v;
    +      if( sqlite3ExprIsInteger(p->pLeft, &v) ){
    +        *pValue = -v;
    +        rc = 1;
    +      }
    +      break;
    +    }
    +    default: break;
    +  }
    +  if( rc ){
    +    assert( ExprHasAnyProperty(p, EP_Reduced|EP_TokenOnly)
    +               || (p->flags2 & EP2_MallocedToken)==0 );
    +    p->op = TK_INTEGER;
    +    p->flags |= EP_IntValue;
    +    p->u.iValue = *pValue;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return TRUE if the given string is a row-id column name.
    +*/
    +SQLITE_PRIVATE int sqlite3IsRowid(const char *z){
    +  if( sqlite3StrICmp(z, "_ROWID_")==0 ) return 1;
    +  if( sqlite3StrICmp(z, "ROWID")==0 ) return 1;
    +  if( sqlite3StrICmp(z, "OID")==0 ) return 1;
    +  return 0;
    +}
    +
    +/*
    +** Return true if we are able to the IN operator optimization on a
    +** query of the form
    +**
    +**       x IN (SELECT ...)
    +**
    +** Where the SELECT... clause is as specified by the parameter to this
    +** routine.
    +**
    +** The Select object passed in has already been preprocessed and no
    +** errors have been found.
    +*/
    +#ifndef SQLITE_OMIT_SUBQUERY
    +static int isCandidateForInOpt(Select *p){
    +  SrcList *pSrc;
    +  ExprList *pEList;
    +  Table *pTab;
    +  if( p==0 ) return 0;                   /* right-hand side of IN is SELECT */
    +  if( p->pPrior ) return 0;              /* Not a compound SELECT */
    +  if( p->selFlags & (SF_Distinct|SF_Aggregate) ){
    +    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
    +    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
    +    return 0; /* No DISTINCT keyword and no aggregate functions */
    +  }
    +  assert( p->pGroupBy==0 );              /* Has no GROUP BY clause */
    +  if( p->pLimit ) return 0;              /* Has no LIMIT clause */
    +  assert( p->pOffset==0 );               /* No LIMIT means no OFFSET */
    +  if( p->pWhere ) return 0;              /* Has no WHERE clause */
    +  pSrc = p->pSrc;
    +  assert( pSrc!=0 );
    +  if( pSrc->nSrc!=1 ) return 0;          /* Single term in FROM clause */
    +  if( pSrc->a[0].pSelect ) return 0;     /* FROM is not a subquery or view */
    +  pTab = pSrc->a[0].pTab;
    +  if( NEVER(pTab==0) ) return 0;
    +  assert( pTab->pSelect==0 );            /* FROM clause is not a view */
    +  if( IsVirtual(pTab) ) return 0;        /* FROM clause not a virtual table */
    +  pEList = p->pEList;
    +  if( pEList->nExpr!=1 ) return 0;       /* One column in the result set */
    +  if( pEList->a[0].pExpr->op!=TK_COLUMN ) return 0; /* Result is a column */
    +  return 1;
    +}
    +#endif /* SQLITE_OMIT_SUBQUERY */
    +
    +/*
    +** This function is used by the implementation of the IN (...) operator.
    +** It's job is to find or create a b-tree structure that may be used
    +** either to test for membership of the (...) set or to iterate through
    +** its members, skipping duplicates.
    +**
    +** The index of the cursor opened on the b-tree (database table, database index 
    +** or ephermal table) is stored in pX->iTable before this function returns.
    +** The returned value of this function indicates the b-tree type, as follows:
    +**
    +**   IN_INDEX_ROWID - The cursor was opened on a database table.
    +**   IN_INDEX_INDEX - The cursor was opened on a database index.
    +**   IN_INDEX_EPH -   The cursor was opened on a specially created and
    +**                    populated epheremal table.
    +**
    +** An existing b-tree may only be used if the SELECT is of the simple
    +** form:
    +**
    +**     SELECT <column> FROM <table>
    +**
    +** If the prNotFound parameter is 0, then the b-tree will be used to iterate
    +** through the set members, skipping any duplicates. In this case an
    +** epheremal table must be used unless the selected <column> is guaranteed
    +** to be unique - either because it is an INTEGER PRIMARY KEY or it
    +** has a UNIQUE constraint or UNIQUE index.
    +**
    +** If the prNotFound parameter is not 0, then the b-tree will be used 
    +** for fast set membership tests. In this case an epheremal table must 
    +** be used unless <column> is an INTEGER PRIMARY KEY or an index can 
    +** be found with <column> as its left-most column.
    +**
    +** When the b-tree is being used for membership tests, the calling function
    +** needs to know whether or not the structure contains an SQL NULL 
    +** value in order to correctly evaluate expressions like "X IN (Y, Z)".
    +** If there is a chance that the b-tree might contain a NULL value at
    +** runtime, then a register is allocated and the register number written
    +** to *prNotFound. If there is no chance that the b-tree contains a
    +** NULL value, then *prNotFound is left unchanged.
    +**
    +** If a register is allocated and its location stored in *prNotFound, then
    +** its initial value is NULL. If the b-tree does not remain constant
    +** for the duration of the query (i.e. the SELECT that generates the b-tree
    +** is a correlated subquery) then the value of the allocated register is
    +** reset to NULL each time the b-tree is repopulated. This allows the
    +** caller to use vdbe code equivalent to the following:
    +**
    +**   if( register==NULL ){
    +**     has_null = <test if data structure contains null>
    +**     register = 1
    +**   }
    +**
    +** in order to avoid running the <test if data structure contains null>
    +** test more often than is necessary.
    +*/
    +#ifndef SQLITE_OMIT_SUBQUERY
    +SQLITE_PRIVATE int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){
    +  Select *p;                            /* SELECT to the right of IN operator */
    +  int eType = 0;                        /* Type of RHS table. IN_INDEX_* */
    +  int iTab = pParse->nTab++;            /* Cursor of the RHS table */
    +  int mustBeUnique = (prNotFound==0);   /* True if RHS must be unique */
    +
    +  assert( pX->op==TK_IN );
    +
    +  /* Check to see if an existing table or index can be used to
    +  ** satisfy the query.  This is preferable to generating a new 
    +  ** ephemeral table.
    +  */
    +  p = (ExprHasProperty(pX, EP_xIsSelect) ? pX->x.pSelect : 0);
    +  if( ALWAYS(pParse->nErr==0) && isCandidateForInOpt(p) ){
    +    sqlite3 *db = pParse->db;              /* Database connection */
    +    Expr *pExpr = p->pEList->a[0].pExpr;   /* Expression <column> */
    +    int iCol = pExpr->iColumn;             /* Index of column <column> */
    +    Vdbe *v = sqlite3GetVdbe(pParse);      /* Virtual machine being coded */
    +    Table *pTab = p->pSrc->a[0].pTab;      /* Table <table>. */
    +    int iDb;                               /* Database idx for pTab */
    +   
    +    /* Code an OP_VerifyCookie and OP_TableLock for <table>. */
    +    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +    sqlite3CodeVerifySchema(pParse, iDb);
    +    sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
    +
    +    /* This function is only called from two places. In both cases the vdbe
    +    ** has already been allocated. So assume sqlite3GetVdbe() is always
    +    ** successful here.
    +    */
    +    assert(v);
    +    if( iCol<0 ){
    +      int iMem = ++pParse->nMem;
    +      int iAddr;
    +
    +      iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
    +
    +      sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
    +      eType = IN_INDEX_ROWID;
    +
    +      sqlite3VdbeJumpHere(v, iAddr);
    +    }else{
    +      Index *pIdx;                         /* Iterator variable */
    +
    +      /* The collation sequence used by the comparison. If an index is to
    +      ** be used in place of a temp-table, it must be ordered according
    +      ** to this collation sequence.  */
    +      CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pExpr);
    +
    +      /* Check that the affinity that will be used to perform the 
    +      ** comparison is the same as the affinity of the column. If
    +      ** it is not, it is not possible to use any index.
    +      */
    +      char aff = comparisonAffinity(pX);
    +      int affinity_ok = (pTab->aCol[iCol].affinity==aff||aff==SQLITE_AFF_NONE);
    +
    +      for(pIdx=pTab->pIndex; pIdx && eType==0 && affinity_ok; pIdx=pIdx->pNext){
    +        if( (pIdx->aiColumn[0]==iCol)
    +         && sqlite3FindCollSeq(db, ENC(db), pIdx->azColl[0], 0)==pReq
    +         && (!mustBeUnique || (pIdx->nColumn==1 && pIdx->onError!=OE_None))
    +        ){
    +          int iMem = ++pParse->nMem;
    +          int iAddr;
    +          char *pKey;
    +  
    +          pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
    +          iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
    +          sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
    +  
    +          sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
    +                               pKey,P4_KEYINFO_HANDOFF);
    +          VdbeComment((v, "%s", pIdx->zName));
    +          eType = IN_INDEX_INDEX;
    +
    +          sqlite3VdbeJumpHere(v, iAddr);
    +          if( prNotFound && !pTab->aCol[iCol].notNull ){
    +            *prNotFound = ++pParse->nMem;
    +          }
    +        }
    +      }
    +    }
    +  }
    +
    +  if( eType==0 ){
    +    /* Could not found an existing table or index to use as the RHS b-tree.
    +    ** We will have to generate an ephemeral table to do the job.
    +    */
    +    int rMayHaveNull = 0;
    +    eType = IN_INDEX_EPH;
    +    if( prNotFound ){
    +      *prNotFound = rMayHaveNull = ++pParse->nMem;
    +    }else if( pX->pLeft->iColumn<0 && !ExprHasAnyProperty(pX, EP_xIsSelect) ){
    +      eType = IN_INDEX_ROWID;
    +    }
    +    sqlite3CodeSubselect(pParse, pX, rMayHaveNull, eType==IN_INDEX_ROWID);
    +  }else{
    +    pX->iTable = iTab;
    +  }
    +  return eType;
    +}
    +#endif
    +
    +/*
    +** Generate code for scalar subqueries used as an expression
    +** and IN operators.  Examples:
    +**
    +**     (SELECT a FROM b)          -- subquery
    +**     EXISTS (SELECT a FROM b)   -- EXISTS subquery
    +**     x IN (4,5,11)              -- IN operator with list on right-hand side
    +**     x IN (SELECT a FROM b)     -- IN operator with subquery on the right
    +**
    +** The pExpr parameter describes the expression that contains the IN
    +** operator or subquery.
    +**
    +** If parameter isRowid is non-zero, then expression pExpr is guaranteed
    +** to be of the form "<rowid> IN (?, ?, ?)", where <rowid> is a reference
    +** to some integer key column of a table B-Tree. In this case, use an
    +** intkey B-Tree to store the set of IN(...) values instead of the usual
    +** (slower) variable length keys B-Tree.
    +**
    +** If rMayHaveNull is non-zero, that means that the operation is an IN
    +** (not a SELECT or EXISTS) and that the RHS might contains NULLs.
    +** Furthermore, the IN is in a WHERE clause and that we really want
    +** to iterate over the RHS of the IN operator in order to quickly locate
    +** all corresponding LHS elements.  All this routine does is initialize
    +** the register given by rMayHaveNull to NULL.  Calling routines will take
    +** care of changing this register value to non-NULL if the RHS is NULL-free.
    +**
    +** If rMayHaveNull is zero, that means that the subquery is being used
    +** for membership testing only.  There is no need to initialize any
    +** registers to indicate the presense or absence of NULLs on the RHS.
    +**
    +** For a SELECT or EXISTS operator, return the register that holds the
    +** result.  For IN operators or if an error occurs, the return value is 0.
    +*/
    +#ifndef SQLITE_OMIT_SUBQUERY
    +SQLITE_PRIVATE int sqlite3CodeSubselect(
    +  Parse *pParse,          /* Parsing context */
    +  Expr *pExpr,            /* The IN, SELECT, or EXISTS operator */
    +  int rMayHaveNull,       /* Register that records whether NULLs exist in RHS */
    +  int isRowid             /* If true, LHS of IN operator is a rowid */
    +){
    +  int testAddr = 0;                       /* One-time test address */
    +  int rReg = 0;                           /* Register storing resulting */
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  if( NEVER(v==0) ) return 0;
    +  sqlite3ExprCachePush(pParse);
    +
    +  /* This code must be run in its entirety every time it is encountered
    +  ** if any of the following is true:
    +  **
    +  **    *  The right-hand side is a correlated subquery
    +  **    *  The right-hand side is an expression list containing variables
    +  **    *  We are inside a trigger
    +  **
    +  ** If all of the above are false, then we can run this code just once
    +  ** save the results, and reuse the same result on subsequent invocations.
    +  */
    +  if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
    +    int mem = ++pParse->nMem;
    +    sqlite3VdbeAddOp1(v, OP_If, mem);
    +    testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem);
    +    assert( testAddr>0 || pParse->db->mallocFailed );
    +  }
    +
    +  switch( pExpr->op ){
    +    case TK_IN: {
    +      char affinity;
    +      KeyInfo keyInfo;
    +      int addr;        /* Address of OP_OpenEphemeral instruction */
    +      Expr *pLeft = pExpr->pLeft;
    +
    +      if( rMayHaveNull ){
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, rMayHaveNull);
    +      }
    +
    +      affinity = sqlite3ExprAffinity(pLeft);
    +
    +      /* Whether this is an 'x IN(SELECT...)' or an 'x IN(<exprlist>)'
    +      ** expression it is handled the same way. A virtual table is 
    +      ** filled with single-field index keys representing the results
    +      ** from the SELECT or the <exprlist>.
    +      **
    +      ** If the 'x' expression is a column value, or the SELECT...
    +      ** statement returns a column value, then the affinity of that
    +      ** column is used to build the index keys. If both 'x' and the
    +      ** SELECT... statement are columns, then numeric affinity is used
    +      ** if either column has NUMERIC or INTEGER affinity. If neither
    +      ** 'x' nor the SELECT... statement are columns, then numeric affinity
    +      ** is used.
    +      */
    +      pExpr->iTable = pParse->nTab++;
    +      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, !isRowid);
    +      memset(&keyInfo, 0, sizeof(keyInfo));
    +      keyInfo.nField = 1;
    +
    +      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +        /* Case 1:     expr IN (SELECT ...)
    +        **
    +        ** Generate code to write the results of the select into the temporary
    +        ** table allocated and opened above.
    +        */
    +        SelectDest dest;
    +        ExprList *pEList;
    +
    +        assert( !isRowid );
    +        sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
    +        dest.affinity = (u8)affinity;
    +        assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
    +        if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
    +          return 0;
    +        }
    +        pEList = pExpr->x.pSelect->pEList;
    +        if( ALWAYS(pEList!=0 && pEList->nExpr>0) ){ 
    +          keyInfo.aColl[0] = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft,
    +              pEList->a[0].pExpr);
    +        }
    +      }else if( pExpr->x.pList!=0 ){
    +        /* Case 2:     expr IN (exprlist)
    +        **
    +        ** For each expression, build an index key from the evaluation and
    +        ** store it in the temporary table. If <expr> is a column, then use
    +        ** that columns affinity when building index keys. If <expr> is not
    +        ** a column, use numeric affinity.
    +        */
    +        int i;
    +        ExprList *pList = pExpr->x.pList;
    +        struct ExprList_item *pItem;
    +        int r1, r2, r3;
    +
    +        if( !affinity ){
    +          affinity = SQLITE_AFF_NONE;
    +        }
    +        keyInfo.aColl[0] = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
    +
    +        /* Loop through each expression in <exprlist>. */
    +        r1 = sqlite3GetTempReg(pParse);
    +        r2 = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, r2);
    +        for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
    +          Expr *pE2 = pItem->pExpr;
    +          int iValToIns;
    +
    +          /* If the expression is not constant then we will need to
    +          ** disable the test that was generated above that makes sure
    +          ** this code only executes once.  Because for a non-constant
    +          ** expression we need to rerun this code each time.
    +          */
    +          if( testAddr && !sqlite3ExprIsConstant(pE2) ){
    +            sqlite3VdbeChangeToNoop(v, testAddr-1, 2);
    +            testAddr = 0;
    +          }
    +
    +          /* Evaluate the expression and insert it into the temp table */
    +          if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
    +            sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
    +          }else{
    +            r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
    +            if( isRowid ){
    +              sqlite3VdbeAddOp2(v, OP_MustBeInt, r3,
    +                                sqlite3VdbeCurrentAddr(v)+2);
    +              sqlite3VdbeAddOp3(v, OP_Insert, pExpr->iTable, r2, r3);
    +            }else{
    +              sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
    +              sqlite3ExprCacheAffinityChange(pParse, r3, 1);
    +              sqlite3VdbeAddOp2(v, OP_IdxInsert, pExpr->iTable, r2);
    +            }
    +          }
    +        }
    +        sqlite3ReleaseTempReg(pParse, r1);
    +        sqlite3ReleaseTempReg(pParse, r2);
    +      }
    +      if( !isRowid ){
    +        sqlite3VdbeChangeP4(v, addr, (void *)&keyInfo, P4_KEYINFO);
    +      }
    +      break;
    +    }
    +
    +    case TK_EXISTS:
    +    case TK_SELECT:
    +    default: {
    +      /* If this has to be a scalar SELECT.  Generate code to put the
    +      ** value of this select in a memory cell and record the number
    +      ** of the memory cell in iColumn.  If this is an EXISTS, write
    +      ** an integer 0 (not exists) or 1 (exists) into a memory cell
    +      ** and record that memory cell in iColumn.
    +      */
    +      static const Token one = { "1", 1 };  /* Token for literal value 1 */
    +      Select *pSel;                         /* SELECT statement to encode */
    +      SelectDest dest;                      /* How to deal with SELECt result */
    +
    +      testcase( pExpr->op==TK_EXISTS );
    +      testcase( pExpr->op==TK_SELECT );
    +      assert( pExpr->op==TK_EXISTS || pExpr->op==TK_SELECT );
    +
    +      assert( ExprHasProperty(pExpr, EP_xIsSelect) );
    +      pSel = pExpr->x.pSelect;
    +      sqlite3SelectDestInit(&dest, 0, ++pParse->nMem);
    +      if( pExpr->op==TK_SELECT ){
    +        dest.eDest = SRT_Mem;
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, dest.iParm);
    +        VdbeComment((v, "Init subquery result"));
    +      }else{
    +        dest.eDest = SRT_Exists;
    +        sqlite3VdbeAddOp2(v, OP_Integer, 0, dest.iParm);
    +        VdbeComment((v, "Init EXISTS result"));
    +      }
    +      sqlite3ExprDelete(pParse->db, pSel->pLimit);
    +      pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &one);
    +      if( sqlite3Select(pParse, pSel, &dest) ){
    +        return 0;
    +      }
    +      rReg = dest.iParm;
    +      ExprSetIrreducible(pExpr);
    +      break;
    +    }
    +  }
    +
    +  if( testAddr ){
    +    sqlite3VdbeJumpHere(v, testAddr-1);
    +  }
    +  sqlite3ExprCachePop(pParse, 1);
    +
    +  return rReg;
    +}
    +#endif /* SQLITE_OMIT_SUBQUERY */
    +
    +/*
    +** Duplicate an 8-byte value
    +*/
    +static char *dup8bytes(Vdbe *v, const char *in){
    +  char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);
    +  if( out ){
    +    memcpy(out, in, 8);
    +  }
    +  return out;
    +}
    +
    +/*
    +** Generate an instruction that will put the floating point
    +** value described by z[0..n-1] into register iMem.
    +**
    +** The z[] string will probably not be zero-terminated.  But the 
    +** z[n] character is guaranteed to be something that does not look
    +** like the continuation of the number.
    +*/
    +static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
    +  if( ALWAYS(z!=0) ){
    +    double value;
    +    char *zV;
    +    sqlite3AtoF(z, &value);
    +    assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
    +    if( negateFlag ) value = -value;
    +    zV = dup8bytes(v, (char*)&value);
    +    sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
    +  }
    +}
    +
    +
    +/*
    +** Generate an instruction that will put the integer describe by
    +** text z[0..n-1] into register iMem.
    +**
    +** The z[] string will probably not be zero-terminated.  But the 
    +** z[n] character is guaranteed to be something that does not look
    +** like the continuation of the number.
    +*/
    +static void codeInteger(Vdbe *v, Expr *pExpr, int negFlag, int iMem){
    +  if( pExpr->flags & EP_IntValue ){
    +    int i = pExpr->u.iValue;
    +    if( negFlag ) i = -i;
    +    sqlite3VdbeAddOp2(v, OP_Integer, i, iMem);
    +  }else{
    +    const char *z = pExpr->u.zToken;
    +    assert( z!=0 );
    +    if( sqlite3FitsIn64Bits(z, negFlag) ){
    +      i64 value;
    +      char *zV;
    +      sqlite3Atoi64(z, &value);
    +      if( negFlag ) value = -value;
    +      zV = dup8bytes(v, (char*)&value);
    +      sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64);
    +    }else{
    +      codeReal(v, z, negFlag, iMem);
    +    }
    +  }
    +}
    +
    +/*
    +** Clear a cache entry.
    +*/
    +static void cacheEntryClear(Parse *pParse, struct yColCache *p){
    +  if( p->tempReg ){
    +    if( pParse->nTempReg<ArraySize(pParse->aTempReg) ){
    +      pParse->aTempReg[pParse->nTempReg++] = p->iReg;
    +    }
    +    p->tempReg = 0;
    +  }
    +}
    +
    +
    +/*
    +** Record in the column cache that a particular column from a
    +** particular table is stored in a particular register.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
    +  int i;
    +  int minLru;
    +  int idxLru;
    +  struct yColCache *p;
    +
    +  assert( iReg>0 );  /* Register numbers are always positive */
    +  assert( iCol>=-1 && iCol<32768 );  /* Finite column numbers */
    +
    +  /* First replace any existing entry */
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg && p->iTable==iTab && p->iColumn==iCol ){
    +      cacheEntryClear(pParse, p);
    +      p->iLevel = pParse->iCacheLevel;
    +      p->iReg = iReg;
    +      p->affChange = 0;
    +      p->lru = pParse->iCacheCnt++;
    +      return;
    +    }
    +  }
    +
    +  /* Find an empty slot and replace it */
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg==0 ){
    +      p->iLevel = pParse->iCacheLevel;
    +      p->iTable = iTab;
    +      p->iColumn = iCol;
    +      p->iReg = iReg;
    +      p->affChange = 0;
    +      p->tempReg = 0;
    +      p->lru = pParse->iCacheCnt++;
    +      return;
    +    }
    +  }
    +
    +  /* Replace the last recently used */
    +  minLru = 0x7fffffff;
    +  idxLru = -1;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->lru<minLru ){
    +      idxLru = i;
    +      minLru = p->lru;
    +    }
    +  }
    +  if( ALWAYS(idxLru>=0) ){
    +    p = &pParse->aColCache[idxLru];
    +    p->iLevel = pParse->iCacheLevel;
    +    p->iTable = iTab;
    +    p->iColumn = iCol;
    +    p->iReg = iReg;
    +    p->affChange = 0;
    +    p->tempReg = 0;
    +    p->lru = pParse->iCacheCnt++;
    +    return;
    +  }
    +}
    +
    +/*
    +** Indicate that a register is being overwritten.  Purge the register
    +** from the column cache.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse *pParse, int iReg){
    +  int i;
    +  struct yColCache *p;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg==iReg ){
    +      cacheEntryClear(pParse, p);
    +      p->iReg = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** Remember the current column cache context.  Any new entries added
    +** added to the column cache after this call are removed when the
    +** corresponding pop occurs.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCachePush(Parse *pParse){
    +  pParse->iCacheLevel++;
    +}
    +
    +/*
    +** Remove from the column cache any entries that were added since the
    +** the previous N Push operations.  In other words, restore the cache
    +** to the state it was in N Pushes ago.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCachePop(Parse *pParse, int N){
    +  int i;
    +  struct yColCache *p;
    +  assert( N>0 );
    +  assert( pParse->iCacheLevel>=N );
    +  pParse->iCacheLevel -= N;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg && p->iLevel>pParse->iCacheLevel ){
    +      cacheEntryClear(pParse, p);
    +      p->iReg = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** When a cached column is reused, make sure that its register is
    +** no longer available as a temp register.  ticket #3879:  that same
    +** register might be in the cache in multiple places, so be sure to
    +** get them all.
    +*/
    +static void sqlite3ExprCachePinRegister(Parse *pParse, int iReg){
    +  int i;
    +  struct yColCache *p;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg==iReg ){
    +      p->tempReg = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** Generate code that will extract the iColumn-th column from
    +** table pTab and store the column value in a register.  An effort
    +** is made to store the column value in register iReg, but this is
    +** not guaranteed.  The location of the column value is returned.
    +**
    +** There must be an open cursor to pTab in iTable when this routine
    +** is called.  If iColumn<0 then code is generated that extracts the rowid.
    +**
    +** This routine might attempt to reuse the value of the column that
    +** has already been loaded into a register.  The value will always
    +** be used if it has not undergone any affinity changes.  But if
    +** an affinity change has occurred, then the cached value will only be
    +** used if allowAffChng is true.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(
    +  Parse *pParse,   /* Parsing and code generating context */
    +  Table *pTab,     /* Description of the table we are reading from */
    +  int iColumn,     /* Index of the table column */
    +  int iTable,      /* The cursor pointing to the table */
    +  int iReg,        /* Store results here */
    +  int allowAffChng /* True if prior affinity changes are OK */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  struct yColCache *p;
    +
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg>0 && p->iTable==iTable && p->iColumn==iColumn
    +           && (!p->affChange || allowAffChng) ){
    +      p->lru = pParse->iCacheCnt++;
    +      sqlite3ExprCachePinRegister(pParse, p->iReg);
    +      return p->iReg;
    +    }
    +  }  
    +  assert( v!=0 );
    +  if( iColumn<0 ){
    +    sqlite3VdbeAddOp2(v, OP_Rowid, iTable, iReg);
    +  }else if( ALWAYS(pTab!=0) ){
    +    int op = IsVirtual(pTab) ? OP_VColumn : OP_Column;
    +    sqlite3VdbeAddOp3(v, op, iTable, iColumn, iReg);
    +    sqlite3ColumnDefault(v, pTab, iColumn, iReg);
    +  }
    +  sqlite3ExprCacheStore(pParse, iTable, iColumn, iReg);
    +  return iReg;
    +}
    +
    +/*
    +** Clear all column cache entries.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse *pParse){
    +  int i;
    +  struct yColCache *p;
    +
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    if( p->iReg ){
    +      cacheEntryClear(pParse, p);
    +      p->iReg = 0;
    +    }
    +  }
    +}
    +
    +/*
    +** Record the fact that an affinity change has occurred on iCount
    +** registers starting with iStart.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCacheAffinityChange(Parse *pParse, int iStart, int iCount){
    +  int iEnd = iStart + iCount - 1;
    +  int i;
    +  struct yColCache *p;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    int r = p->iReg;
    +    if( r>=iStart && r<=iEnd ){
    +      p->affChange = 1;
    +    }
    +  }
    +}
    +
    +/*
    +** Generate code to move content from registers iFrom...iFrom+nReg-1
    +** over to iTo..iTo+nReg-1. Keep the column cache up-to-date.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
    +  int i;
    +  struct yColCache *p;
    +  if( NEVER(iFrom==iTo) ) return;
    +  sqlite3VdbeAddOp3(pParse->pVdbe, OP_Move, iFrom, iTo, nReg);
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    int x = p->iReg;
    +    if( x>=iFrom && x<iFrom+nReg ){
    +      p->iReg += iTo-iFrom;
    +    }
    +  }
    +}
    +
    +/*
    +** Generate code to copy content from registers iFrom...iFrom+nReg-1
    +** over to iTo..iTo+nReg-1.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse *pParse, int iFrom, int iTo, int nReg){
    +  int i;
    +  if( NEVER(iFrom==iTo) ) return;
    +  for(i=0; i<nReg; i++){
    +    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, iFrom+i, iTo+i);
    +  }
    +}
    +
    +/*
    +** Return true if any register in the range iFrom..iTo (inclusive)
    +** is used as part of the column cache.
    +*/
    +static int usedAsColumnCache(Parse *pParse, int iFrom, int iTo){
    +  int i;
    +  struct yColCache *p;
    +  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +    int r = p->iReg;
    +    if( r>=iFrom && r<=iTo ) return 1;
    +  }
    +  return 0;
    +}
    +
    +/*
    +** If the last instruction coded is an ephemeral copy of any of
    +** the registers in the nReg registers beginning with iReg, then
    +** convert the last instruction from OP_SCopy to OP_Copy.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprHardCopy(Parse *pParse, int iReg, int nReg){
    +  VdbeOp *pOp;
    +  Vdbe *v;
    +
    +  assert( pParse->db->mallocFailed==0 );
    +  v = pParse->pVdbe;
    +  assert( v!=0 );
    +  pOp = sqlite3VdbeGetOp(v, -1);
    +  assert( pOp!=0 );
    +  if( pOp->opcode==OP_SCopy && pOp->p1>=iReg && pOp->p1<iReg+nReg ){
    +    pOp->opcode = OP_Copy;
    +  }
    +}
    +
    +/*
    +** Generate code to store the value of the iAlias-th alias in register
    +** target.  The first time this is called, pExpr is evaluated to compute
    +** the value of the alias.  The value is stored in an auxiliary register
    +** and the number of that register is returned.  On subsequent calls,
    +** the register number is returned without generating any code.
    +**
    +** Note that in order for this to work, code must be generated in the
    +** same order that it is executed.
    +**
    +** Aliases are numbered starting with 1.  So iAlias is in the range
    +** of 1 to pParse->nAlias inclusive.  
    +**
    +** pParse->aAlias[iAlias-1] records the register number where the value
    +** of the iAlias-th alias is stored.  If zero, that means that the
    +** alias has not yet been computed.
    +*/
    +static int codeAlias(Parse *pParse, int iAlias, Expr *pExpr, int target){
    +#if 0
    +  sqlite3 *db = pParse->db;
    +  int iReg;
    +  if( pParse->nAliasAlloc<pParse->nAlias ){
    +    pParse->aAlias = sqlite3DbReallocOrFree(db, pParse->aAlias,
    +                                 sizeof(pParse->aAlias[0])*pParse->nAlias );
    +    testcase( db->mallocFailed && pParse->nAliasAlloc>0 );
    +    if( db->mallocFailed ) return 0;
    +    memset(&pParse->aAlias[pParse->nAliasAlloc], 0,
    +           (pParse->nAlias-pParse->nAliasAlloc)*sizeof(pParse->aAlias[0]));
    +    pParse->nAliasAlloc = pParse->nAlias;
    +  }
    +  assert( iAlias>0 && iAlias<=pParse->nAlias );
    +  iReg = pParse->aAlias[iAlias-1];
    +  if( iReg==0 ){
    +    if( pParse->iCacheLevel>0 ){
    +      iReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
    +    }else{
    +      iReg = ++pParse->nMem;
    +      sqlite3ExprCode(pParse, pExpr, iReg);
    +      pParse->aAlias[iAlias-1] = iReg;
    +    }
    +  }
    +  return iReg;
    +#else
    +  UNUSED_PARAMETER(iAlias);
    +  return sqlite3ExprCodeTarget(pParse, pExpr, target);
    +#endif
    +}
    +
    +/*
    +** Generate code into the current Vdbe to evaluate the given
    +** expression.  Attempt to store the results in register "target".
    +** Return the register where results are stored.
    +**
    +** With this routine, there is no guarantee that results will
    +** be stored in target.  The result might be stored in some other
    +** register if it is convenient to do so.  The calling function
    +** must check the return code and move the results to the desired
    +** register.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
    +  Vdbe *v = pParse->pVdbe;  /* The VM under construction */
    +  int op;                   /* The opcode being coded */
    +  int inReg = target;       /* Results stored in register inReg */
    +  int regFree1 = 0;         /* If non-zero free this temporary register */
    +  int regFree2 = 0;         /* If non-zero free this temporary register */
    +  int r1, r2, r3, r4;       /* Various register numbers */
    +  sqlite3 *db = pParse->db; /* The database connection */
    +
    +  assert( target>0 && target<=pParse->nMem );
    +  if( v==0 ){
    +    assert( pParse->db->mallocFailed );
    +    return 0;
    +  }
    +
    +  if( pExpr==0 ){
    +    op = TK_NULL;
    +  }else{
    +    op = pExpr->op;
    +  }
    +  switch( op ){
    +    case TK_AGG_COLUMN: {
    +      AggInfo *pAggInfo = pExpr->pAggInfo;
    +      struct AggInfo_col *pCol = &pAggInfo->aCol[pExpr->iAgg];
    +      if( !pAggInfo->directMode ){
    +        assert( pCol->iMem>0 );
    +        inReg = pCol->iMem;
    +        break;
    +      }else if( pAggInfo->useSortingIdx ){
    +        sqlite3VdbeAddOp3(v, OP_Column, pAggInfo->sortingIdx,
    +                              pCol->iSorterColumn, target);
    +        break;
    +      }
    +      /* Otherwise, fall thru into the TK_COLUMN case */
    +    }
    +    case TK_COLUMN: {
    +      if( pExpr->iTable<0 ){
    +        /* This only happens when coding check constraints */
    +        assert( pParse->ckBase>0 );
    +        inReg = pExpr->iColumn + pParse->ckBase;
    +      }else{
    +        testcase( (pExpr->flags & EP_AnyAff)!=0 );
    +        inReg = sqlite3ExprCodeGetColumn(pParse, pExpr->pTab,
    +                                 pExpr->iColumn, pExpr->iTable, target,
    +                                 pExpr->flags & EP_AnyAff);
    +      }
    +      break;
    +    }
    +    case TK_INTEGER: {
    +      codeInteger(v, pExpr, 0, target);
    +      break;
    +    }
    +    case TK_FLOAT: {
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      codeReal(v, pExpr->u.zToken, 0, target);
    +      break;
    +    }
    +    case TK_STRING: {
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, target, 0, pExpr->u.zToken, 0);
    +      break;
    +    }
    +    case TK_NULL: {
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, target);
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_BLOB_LITERAL
    +    case TK_BLOB: {
    +      int n;
    +      const char *z;
    +      char *zBlob;
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
    +      assert( pExpr->u.zToken[1]=='\'' );
    +      z = &pExpr->u.zToken[2];
    +      n = sqlite3Strlen30(z) - 1;
    +      assert( z[n]=='\'' );
    +      zBlob = sqlite3HexToBlob(sqlite3VdbeDb(v), z, n);
    +      sqlite3VdbeAddOp4(v, OP_Blob, n/2, target, 0, zBlob, P4_DYNAMIC);
    +      break;
    +    }
    +#endif
    +    case TK_VARIABLE: {
    +      VdbeOp *pOp;
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      assert( pExpr->u.zToken!=0 );
    +      assert( pExpr->u.zToken[0]!=0 );
    +      if( pExpr->u.zToken[1]==0
    +         && (pOp = sqlite3VdbeGetOp(v, -1))->opcode==OP_Variable
    +         && pOp->p1+pOp->p3==pExpr->iColumn
    +         && pOp->p2+pOp->p3==target
    +         && pOp->p4.z==0
    +      ){
    +        /* If the previous instruction was a copy of the previous unnamed
    +        ** parameter into the previous register, then simply increment the
    +        ** repeat count on the prior instruction rather than making a new
    +        ** instruction.
    +        */
    +        pOp->p3++;
    +      }else{
    +        sqlite3VdbeAddOp3(v, OP_Variable, pExpr->iColumn, target, 1);
    +        if( pExpr->u.zToken[1]!=0 ){
    +          sqlite3VdbeChangeP4(v, -1, pExpr->u.zToken, 0);
    +        }
    +      }
    +      break;
    +    }
    +    case TK_REGISTER: {
    +      inReg = pExpr->iTable;
    +      break;
    +    }
    +    case TK_AS: {
    +      inReg = codeAlias(pParse, pExpr->iTable, pExpr->pLeft, target);
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_CAST
    +    case TK_CAST: {
    +      /* Expressions of the form:   CAST(pLeft AS token) */
    +      int aff, to_op;
    +      inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      aff = sqlite3AffinityType(pExpr->u.zToken);
    +      to_op = aff - SQLITE_AFF_TEXT + OP_ToText;
    +      assert( to_op==OP_ToText    || aff!=SQLITE_AFF_TEXT    );
    +      assert( to_op==OP_ToBlob    || aff!=SQLITE_AFF_NONE    );
    +      assert( to_op==OP_ToNumeric || aff!=SQLITE_AFF_NUMERIC );
    +      assert( to_op==OP_ToInt     || aff!=SQLITE_AFF_INTEGER );
    +      assert( to_op==OP_ToReal    || aff!=SQLITE_AFF_REAL    );
    +      testcase( to_op==OP_ToText );
    +      testcase( to_op==OP_ToBlob );
    +      testcase( to_op==OP_ToNumeric );
    +      testcase( to_op==OP_ToInt );
    +      testcase( to_op==OP_ToReal );
    +      if( inReg!=target ){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target);
    +        inReg = target;
    +      }
    +      sqlite3VdbeAddOp1(v, to_op, inReg);
    +      testcase( usedAsColumnCache(pParse, inReg, inReg) );
    +      sqlite3ExprCacheAffinityChange(pParse, inReg, 1);
    +      break;
    +    }
    +#endif /* SQLITE_OMIT_CAST */
    +    case TK_LT:
    +    case TK_LE:
    +    case TK_GT:
    +    case TK_GE:
    +    case TK_NE:
    +    case TK_EQ: {
    +      assert( TK_LT==OP_Lt );
    +      assert( TK_LE==OP_Le );
    +      assert( TK_GT==OP_Gt );
    +      assert( TK_GE==OP_Ge );
    +      assert( TK_EQ==OP_Eq );
    +      assert( TK_NE==OP_Ne );
    +      testcase( op==TK_LT );
    +      testcase( op==TK_LE );
    +      testcase( op==TK_GT );
    +      testcase( op==TK_GE );
    +      testcase( op==TK_EQ );
    +      testcase( op==TK_NE );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, inReg, SQLITE_STOREP2);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_IS:
    +    case TK_ISNOT: {
    +      testcase( op==TK_IS );
    +      testcase( op==TK_ISNOT );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      op = (op==TK_IS) ? TK_EQ : TK_NE;
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, inReg, SQLITE_STOREP2 | SQLITE_NULLEQ);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_AND:
    +    case TK_OR:
    +    case TK_PLUS:
    +    case TK_STAR:
    +    case TK_MINUS:
    +    case TK_REM:
    +    case TK_BITAND:
    +    case TK_BITOR:
    +    case TK_SLASH:
    +    case TK_LSHIFT:
    +    case TK_RSHIFT: 
    +    case TK_CONCAT: {
    +      assert( TK_AND==OP_And );
    +      assert( TK_OR==OP_Or );
    +      assert( TK_PLUS==OP_Add );
    +      assert( TK_MINUS==OP_Subtract );
    +      assert( TK_REM==OP_Remainder );
    +      assert( TK_BITAND==OP_BitAnd );
    +      assert( TK_BITOR==OP_BitOr );
    +      assert( TK_SLASH==OP_Divide );
    +      assert( TK_LSHIFT==OP_ShiftLeft );
    +      assert( TK_RSHIFT==OP_ShiftRight );
    +      assert( TK_CONCAT==OP_Concat );
    +      testcase( op==TK_AND );
    +      testcase( op==TK_OR );
    +      testcase( op==TK_PLUS );
    +      testcase( op==TK_MINUS );
    +      testcase( op==TK_REM );
    +      testcase( op==TK_BITAND );
    +      testcase( op==TK_BITOR );
    +      testcase( op==TK_SLASH );
    +      testcase( op==TK_LSHIFT );
    +      testcase( op==TK_RSHIFT );
    +      testcase( op==TK_CONCAT );
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
    +      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
    +      sqlite3VdbeAddOp3(v, op, r2, r1, target);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_UMINUS: {
    +      Expr *pLeft = pExpr->pLeft;
    +      assert( pLeft );
    +      if( pLeft->op==TK_FLOAT ){
    +        assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +        codeReal(v, pLeft->u.zToken, 1, target);
    +      }else if( pLeft->op==TK_INTEGER ){
    +        codeInteger(v, pLeft, 1, target);
    +      }else{
    +        regFree1 = r1 = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp2(v, OP_Integer, 0, r1);
    +        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree2);
    +        sqlite3VdbeAddOp3(v, OP_Subtract, r2, r1, target);
    +        testcase( regFree2==0 );
    +      }
    +      inReg = target;
    +      break;
    +    }
    +    case TK_BITNOT:
    +    case TK_NOT: {
    +      assert( TK_BITNOT==OP_BitNot );
    +      assert( TK_NOT==OP_Not );
    +      testcase( op==TK_BITNOT );
    +      testcase( op==TK_NOT );
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
    +      testcase( regFree1==0 );
    +      inReg = target;
    +      sqlite3VdbeAddOp2(v, op, r1, inReg);
    +      break;
    +    }
    +    case TK_ISNULL:
    +    case TK_NOTNULL: {
    +      int addr;
    +      assert( TK_ISNULL==OP_IsNull );
    +      assert( TK_NOTNULL==OP_NotNull );
    +      testcase( op==TK_ISNULL );
    +      testcase( op==TK_NOTNULL );
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, target);
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
    +      testcase( regFree1==0 );
    +      addr = sqlite3VdbeAddOp1(v, op, r1);
    +      sqlite3VdbeAddOp2(v, OP_AddImm, target, -1);
    +      sqlite3VdbeJumpHere(v, addr);
    +      break;
    +    }
    +    case TK_AGG_FUNCTION: {
    +      AggInfo *pInfo = pExpr->pAggInfo;
    +      if( pInfo==0 ){
    +        assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +        sqlite3ErrorMsg(pParse, "misuse of aggregate: %s()", pExpr->u.zToken);
    +      }else{
    +        inReg = pInfo->aFunc[pExpr->iAgg].iMem;
    +      }
    +      break;
    +    }
    +    case TK_CONST_FUNC:
    +    case TK_FUNCTION: {
    +      ExprList *pFarg;       /* List of function arguments */
    +      int nFarg;             /* Number of function arguments */
    +      FuncDef *pDef;         /* The function definition object */
    +      int nId;               /* Length of the function name in bytes */
    +      const char *zId;       /* The function name */
    +      int constMask = 0;     /* Mask of function arguments that are constant */
    +      int i;                 /* Loop counter */
    +      u8 enc = ENC(db);      /* The text encoding used by this database */
    +      CollSeq *pColl = 0;    /* A collating sequence */
    +
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +      testcase( op==TK_CONST_FUNC );
    +      testcase( op==TK_FUNCTION );
    +      if( ExprHasAnyProperty(pExpr, EP_TokenOnly) ){
    +        pFarg = 0;
    +      }else{
    +        pFarg = pExpr->x.pList;
    +      }
    +      nFarg = pFarg ? pFarg->nExpr : 0;
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      zId = pExpr->u.zToken;
    +      nId = sqlite3Strlen30(zId);
    +      pDef = sqlite3FindFunction(db, zId, nId, nFarg, enc, 0);
    +      if( pDef==0 ){
    +        sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
    +        break;
    +      }
    +      if( pFarg ){
    +        r1 = sqlite3GetTempRange(pParse, nFarg);
    +        sqlite3ExprCachePush(pParse);     /* Ticket 2ea2425d34be */
    +        sqlite3ExprCodeExprList(pParse, pFarg, r1, 1);
    +        sqlite3ExprCachePop(pParse, 1);   /* Ticket 2ea2425d34be */
    +      }else{
    +        r1 = 0;
    +      }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +      /* Possibly overload the function if the first argument is
    +      ** a virtual table column.
    +      **
    +      ** For infix functions (LIKE, GLOB, REGEXP, and MATCH) use the
    +      ** second argument, not the first, as the argument to test to
    +      ** see if it is a column in a virtual table.  This is done because
    +      ** the left operand of infix functions (the operand we want to
    +      ** control overloading) ends up as the second argument to the
    +      ** function.  The expression "A glob B" is equivalent to 
    +      ** "glob(B,A).  We want to use the A in "A glob B" to test
    +      ** for function overloading.  But we use the B term in "glob(B,A)".
    +      */
    +      if( nFarg>=2 && (pExpr->flags & EP_InfixFunc) ){
    +        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[1].pExpr);
    +      }else if( nFarg>0 ){
    +        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[0].pExpr);
    +      }
    +#endif
    +      for(i=0; i<nFarg; i++){
    +        if( i<32 && sqlite3ExprIsConstant(pFarg->a[i].pExpr) ){
    +          constMask |= (1<<i);
    +        }
    +        if( (pDef->flags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){
    +          pColl = sqlite3ExprCollSeq(pParse, pFarg->a[i].pExpr);
    +        }
    +      }
    +      if( pDef->flags & SQLITE_FUNC_NEEDCOLL ){
    +        if( !pColl ) pColl = db->pDfltColl; 
    +        sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
    +      }
    +      sqlite3VdbeAddOp4(v, OP_Function, constMask, r1, target,
    +                        (char*)pDef, P4_FUNCDEF);
    +      sqlite3VdbeChangeP5(v, (u8)nFarg);
    +      if( nFarg ){
    +        sqlite3ReleaseTempRange(pParse, r1, nFarg);
    +      }
    +      sqlite3ExprCacheAffinityChange(pParse, r1, nFarg);
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    case TK_EXISTS:
    +    case TK_SELECT: {
    +      testcase( op==TK_EXISTS );
    +      testcase( op==TK_SELECT );
    +      inReg = sqlite3CodeSubselect(pParse, pExpr, 0, 0);
    +      break;
    +    }
    +    case TK_IN: {
    +      int rNotFound = 0;
    +      int rMayHaveNull = 0;
    +      int j2, j3, j4, j5;
    +      char affinity;
    +      int eType;
    +
    +      VdbeNoopComment((v, "begin IN expr r%d", target));
    +      eType = sqlite3FindInIndex(pParse, pExpr, &rMayHaveNull);
    +      if( rMayHaveNull ){
    +        rNotFound = ++pParse->nMem;
    +      }
    +
    +      /* Figure out the affinity to use to create a key from the results
    +      ** of the expression. affinityStr stores a static string suitable for
    +      ** P4 of OP_MakeRecord.
    +      */
    +      affinity = comparisonAffinity(pExpr);
    +
    +
    +      /* Code the <expr> from "<expr> IN (...)". The temporary table
    +      ** pExpr->iTable contains the values that make up the (...) set.
    +      */
    +      sqlite3ExprCachePush(pParse);
    +      sqlite3ExprCode(pParse, pExpr->pLeft, target);
    +      j2 = sqlite3VdbeAddOp1(v, OP_IsNull, target);
    +      if( eType==IN_INDEX_ROWID ){
    +        j3 = sqlite3VdbeAddOp1(v, OP_MustBeInt, target);
    +        j4 = sqlite3VdbeAddOp3(v, OP_NotExists, pExpr->iTable, 0, target);
    +        sqlite3VdbeAddOp2(v, OP_Integer, 1, target);
    +        j5 = sqlite3VdbeAddOp0(v, OP_Goto);
    +        sqlite3VdbeJumpHere(v, j3);
    +        sqlite3VdbeJumpHere(v, j4);
    +        sqlite3VdbeAddOp2(v, OP_Integer, 0, target);
    +      }else{
    +        r2 = regFree2 = sqlite3GetTempReg(pParse);
    +
    +        /* Create a record and test for set membership. If the set contains
    +        ** the value, then jump to the end of the test code. The target
    +        ** register still contains the true (1) value written to it earlier.
    +        */
    +        sqlite3VdbeAddOp4(v, OP_MakeRecord, target, 1, r2, &affinity, 1);
    +        sqlite3VdbeAddOp2(v, OP_Integer, 1, target);
    +        j5 = sqlite3VdbeAddOp3(v, OP_Found, pExpr->iTable, 0, r2);
    +
    +        /* If the set membership test fails, then the result of the 
    +        ** "x IN (...)" expression must be either 0 or NULL. If the set
    +        ** contains no NULL values, then the result is 0. If the set 
    +        ** contains one or more NULL values, then the result of the
    +        ** expression is also NULL.
    +        */
    +        if( rNotFound==0 ){
    +          /* This branch runs if it is known at compile time (now) that 
    +          ** the set contains no NULL values. This happens as the result
    +          ** of a "NOT NULL" constraint in the database schema. No need
    +          ** to test the data structure at runtime in this case.
    +          */
    +          sqlite3VdbeAddOp2(v, OP_Integer, 0, target);
    +        }else{
    +          /* This block populates the rNotFound register with either NULL
    +          ** or 0 (an integer value). If the data structure contains one
    +          ** or more NULLs, then set rNotFound to NULL. Otherwise, set it
    +          ** to 0. If register rMayHaveNull is already set to some value
    +          ** other than NULL, then the test has already been run and 
    +          ** rNotFound is already populated.
    +          */
    +          static const char nullRecord[] = { 0x02, 0x00 };
    +          j3 = sqlite3VdbeAddOp1(v, OP_NotNull, rMayHaveNull);
    +          sqlite3VdbeAddOp2(v, OP_Null, 0, rNotFound);
    +          sqlite3VdbeAddOp4(v, OP_Blob, 2, rMayHaveNull, 0, 
    +                             nullRecord, P4_STATIC);
    +          j4 = sqlite3VdbeAddOp3(v, OP_Found, pExpr->iTable, 0, rMayHaveNull);
    +          sqlite3VdbeAddOp2(v, OP_Integer, 0, rNotFound);
    +          sqlite3VdbeJumpHere(v, j4);
    +          sqlite3VdbeJumpHere(v, j3);
    +
    +          /* Copy the value of register rNotFound (which is either NULL or 0)
    +          ** into the target register. This will be the result of the
    +          ** expression.
    +          */
    +          sqlite3VdbeAddOp2(v, OP_Copy, rNotFound, target);
    +        }
    +      }
    +      sqlite3VdbeJumpHere(v, j2);
    +      sqlite3VdbeJumpHere(v, j5);
    +      sqlite3ExprCachePop(pParse, 1);
    +      VdbeComment((v, "end IN expr r%d", target));
    +      break;
    +    }
    +#endif
    +    /*
    +    **    x BETWEEN y AND z
    +    **
    +    ** This is equivalent to
    +    **
    +    **    x>=y AND x<=z
    +    **
    +    ** X is stored in pExpr->pLeft.
    +    ** Y is stored in pExpr->pList->a[0].pExpr.
    +    ** Z is stored in pExpr->pList->a[1].pExpr.
    +    */
    +    case TK_BETWEEN: {
    +      Expr *pLeft = pExpr->pLeft;
    +      struct ExprList_item *pLItem = pExpr->x.pList->a;
    +      Expr *pRight = pLItem->pExpr;
    +
    +      codeCompareOperands(pParse, pLeft, &r1, &regFree1,
    +                                  pRight, &r2, &regFree2);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      r3 = sqlite3GetTempReg(pParse);
    +      r4 = sqlite3GetTempReg(pParse);
    +      codeCompare(pParse, pLeft, pRight, OP_Ge,
    +                  r1, r2, r3, SQLITE_STOREP2);
    +      pLItem++;
    +      pRight = pLItem->pExpr;
    +      sqlite3ReleaseTempReg(pParse, regFree2);
    +      r2 = sqlite3ExprCodeTemp(pParse, pRight, &regFree2);
    +      testcase( regFree2==0 );
    +      codeCompare(pParse, pLeft, pRight, OP_Le, r1, r2, r4, SQLITE_STOREP2);
    +      sqlite3VdbeAddOp3(v, OP_And, r3, r4, target);
    +      sqlite3ReleaseTempReg(pParse, r3);
    +      sqlite3ReleaseTempReg(pParse, r4);
    +      break;
    +    }
    +    case TK_UPLUS: {
    +      inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
    +      break;
    +    }
    +
    +    case TK_TRIGGER: {
    +      /* If the opcode is TK_TRIGGER, then the expression is a reference
    +      ** to a column in the new.* or old.* pseudo-tables available to
    +      ** trigger programs. In this case Expr.iTable is set to 1 for the
    +      ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn
    +      ** is set to the column of the pseudo-table to read, or to -1 to
    +      ** read the rowid field.
    +      **
    +      ** The expression is implemented using an OP_Param opcode. The p1
    +      ** parameter is set to 0 for an old.rowid reference, or to (i+1)
    +      ** to reference another column of the old.* pseudo-table, where 
    +      ** i is the index of the column. For a new.rowid reference, p1 is
    +      ** set to (n+1), where n is the number of columns in each pseudo-table.
    +      ** For a reference to any other column in the new.* pseudo-table, p1
    +      ** is set to (n+2+i), where n and i are as defined previously. For
    +      ** example, if the table on which triggers are being fired is
    +      ** declared as:
    +      **
    +      **   CREATE TABLE t1(a, b);
    +      **
    +      ** Then p1 is interpreted as follows:
    +      **
    +      **   p1==0   ->    old.rowid     p1==3   ->    new.rowid
    +      **   p1==1   ->    old.a         p1==4   ->    new.a
    +      **   p1==2   ->    old.b         p1==5   ->    new.b       
    +      */
    +      Table *pTab = pExpr->pTab;
    +      int p1 = pExpr->iTable * (pTab->nCol+1) + 1 + pExpr->iColumn;
    +
    +      assert( pExpr->iTable==0 || pExpr->iTable==1 );
    +      assert( pExpr->iColumn>=-1 && pExpr->iColumn<pTab->nCol );
    +      assert( pTab->iPKey<0 || pExpr->iColumn!=pTab->iPKey );
    +      assert( p1>=0 && p1<(pTab->nCol*2+2) );
    +
    +      sqlite3VdbeAddOp2(v, OP_Param, p1, target);
    +      VdbeComment((v, "%s.%s -> $%d",
    +        (pExpr->iTable ? "new" : "old"),
    +        (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
    +        target
    +      ));
    +
    +      /* If the column has REAL affinity, it may currently be stored as an
    +      ** integer. Use OP_RealAffinity to make sure it is really real.  */
    +      if( pExpr->iColumn>=0 
    +       && pTab->aCol[pExpr->iColumn].affinity==SQLITE_AFF_REAL
    +      ){
    +        sqlite3VdbeAddOp1(v, OP_RealAffinity, target);
    +      }
    +      break;
    +    }
    +
    +
    +    /*
    +    ** Form A:
    +    **   CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END
    +    **
    +    ** Form B:
    +    **   CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END
    +    **
    +    ** Form A is can be transformed into the equivalent form B as follows:
    +    **   CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ...
    +    **        WHEN x=eN THEN rN ELSE y END
    +    **
    +    ** X (if it exists) is in pExpr->pLeft.
    +    ** Y is in pExpr->pRight.  The Y is also optional.  If there is no
    +    ** ELSE clause and no other term matches, then the result of the
    +    ** exprssion is NULL.
    +    ** Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1].
    +    **
    +    ** The result of the expression is the Ri for the first matching Ei,
    +    ** or if there is no matching Ei, the ELSE term Y, or if there is
    +    ** no ELSE term, NULL.
    +    */
    +    default: assert( op==TK_CASE ); {
    +      int endLabel;                     /* GOTO label for end of CASE stmt */
    +      int nextCase;                     /* GOTO label for next WHEN clause */
    +      int nExpr;                        /* 2x number of WHEN terms */
    +      int i;                            /* Loop counter */
    +      ExprList *pEList;                 /* List of WHEN terms */
    +      struct ExprList_item *aListelem;  /* Array of WHEN terms */
    +      Expr opCompare;                   /* The X==Ei expression */
    +      Expr cacheX;                      /* Cached expression X */
    +      Expr *pX;                         /* The X expression */
    +      Expr *pTest = 0;                  /* X==Ei (form A) or just Ei (form B) */
    +      VVA_ONLY( int iCacheLevel = pParse->iCacheLevel; )
    +
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList );
    +      assert((pExpr->x.pList->nExpr % 2) == 0);
    +      assert(pExpr->x.pList->nExpr > 0);
    +      pEList = pExpr->x.pList;
    +      aListelem = pEList->a;
    +      nExpr = pEList->nExpr;
    +      endLabel = sqlite3VdbeMakeLabel(v);
    +      if( (pX = pExpr->pLeft)!=0 ){
    +        cacheX = *pX;
    +        testcase( pX->op==TK_COLUMN );
    +        testcase( pX->op==TK_REGISTER );
    +        cacheX.iTable = sqlite3ExprCodeTemp(pParse, pX, &regFree1);
    +        testcase( regFree1==0 );
    +        cacheX.op = TK_REGISTER;
    +        opCompare.op = TK_EQ;
    +        opCompare.pLeft = &cacheX;
    +        pTest = &opCompare;
    +      }
    +      for(i=0; i<nExpr; i=i+2){
    +        sqlite3ExprCachePush(pParse);
    +        if( pX ){
    +          assert( pTest!=0 );
    +          opCompare.pRight = aListelem[i].pExpr;
    +        }else{
    +          pTest = aListelem[i].pExpr;
    +        }
    +        nextCase = sqlite3VdbeMakeLabel(v);
    +        testcase( pTest->op==TK_COLUMN );
    +        sqlite3ExprIfFalse(pParse, pTest, nextCase, SQLITE_JUMPIFNULL);
    +        testcase( aListelem[i+1].pExpr->op==TK_COLUMN );
    +        testcase( aListelem[i+1].pExpr->op==TK_REGISTER );
    +        sqlite3ExprCode(pParse, aListelem[i+1].pExpr, target);
    +        sqlite3VdbeAddOp2(v, OP_Goto, 0, endLabel);
    +        sqlite3ExprCachePop(pParse, 1);
    +        sqlite3VdbeResolveLabel(v, nextCase);
    +      }
    +      if( pExpr->pRight ){
    +        sqlite3ExprCachePush(pParse);
    +        sqlite3ExprCode(pParse, pExpr->pRight, target);
    +        sqlite3ExprCachePop(pParse, 1);
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, target);
    +      }
    +      assert( db->mallocFailed || pParse->nErr>0 
    +           || pParse->iCacheLevel==iCacheLevel );
    +      sqlite3VdbeResolveLabel(v, endLabel);
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_TRIGGER
    +    case TK_RAISE: {
    +      assert( pExpr->affinity==OE_Rollback 
    +           || pExpr->affinity==OE_Abort
    +           || pExpr->affinity==OE_Fail
    +           || pExpr->affinity==OE_Ignore
    +      );
    +      if( !pParse->pTriggerTab ){
    +        sqlite3ErrorMsg(pParse,
    +                       "RAISE() may only be used within a trigger-program");
    +        return 0;
    +      }
    +      if( pExpr->affinity==OE_Abort ){
    +        sqlite3MayAbort(pParse);
    +      }
    +      assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +      if( pExpr->affinity==OE_Ignore ){
    +        sqlite3VdbeAddOp4(
    +            v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0);
    +      }else{
    +        sqlite3HaltConstraint(pParse, pExpr->affinity, pExpr->u.zToken, 0);
    +      }
    +
    +      break;
    +    }
    +#endif
    +  }
    +  sqlite3ReleaseTempReg(pParse, regFree1);
    +  sqlite3ReleaseTempReg(pParse, regFree2);
    +  return inReg;
    +}
    +
    +/*
    +** Generate code to evaluate an expression and store the results
    +** into a register.  Return the register number where the results
    +** are stored.
    +**
    +** If the register is a temporary register that can be deallocated,
    +** then write its number into *pReg.  If the result register is not
    +** a temporary, then set *pReg to zero.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){
    +  int r1 = sqlite3GetTempReg(pParse);
    +  int r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
    +  if( r2==r1 ){
    +    *pReg = r1;
    +  }else{
    +    sqlite3ReleaseTempReg(pParse, r1);
    +    *pReg = 0;
    +  }
    +  return r2;
    +}
    +
    +/*
    +** Generate code that will evaluate expression pExpr and store the
    +** results in register target.  The results are guaranteed to appear
    +** in register target.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
    +  int inReg;
    +
    +  assert( target>0 && target<=pParse->nMem );
    +  inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
    +  assert( pParse->pVdbe || pParse->db->mallocFailed );
    +  if( inReg!=target && pParse->pVdbe ){
    +    sqlite3VdbeAddOp2(pParse->pVdbe, OP_SCopy, inReg, target);
    +  }
    +  return target;
    +}
    +
    +/*
    +** Generate code that evalutes the given expression and puts the result
    +** in register target.
    +**
    +** Also make a copy of the expression results into another "cache" register
    +** and modify the expression so that the next time it is evaluated,
    +** the result is a copy of the cache register.
    +**
    +** This routine is used for expressions that are used multiple 
    +** times.  They are evaluated once and the results of the expression
    +** are reused.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr, int target){
    +  Vdbe *v = pParse->pVdbe;
    +  int inReg;
    +  inReg = sqlite3ExprCode(pParse, pExpr, target);
    +  assert( target>0 );
    +  /* This routine is called for terms to INSERT or UPDATE.  And the only
    +  ** other place where expressions can be converted into TK_REGISTER is
    +  ** in WHERE clause processing.  So as currently implemented, there is
    +  ** no way for a TK_REGISTER to exist here.  But it seems prudent to
    +  ** keep the ALWAYS() in case the conditions above change with future
    +  ** modifications or enhancements. */
    +  if( ALWAYS(pExpr->op!=TK_REGISTER) ){  
    +    int iMem;
    +    iMem = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Copy, inReg, iMem);
    +    pExpr->iTable = iMem;
    +    pExpr->op2 = pExpr->op;
    +    pExpr->op = TK_REGISTER;
    +  }
    +  return inReg;
    +}
    +
    +/*
    +** Return TRUE if pExpr is an constant expression that is appropriate
    +** for factoring out of a loop.  Appropriate expressions are:
    +**
    +**    *  Any expression that evaluates to two or more opcodes.
    +**
    +**    *  Any OP_Integer, OP_Real, OP_String, OP_Blob, OP_Null, 
    +**       or OP_Variable that does not need to be placed in a 
    +**       specific register.
    +**
    +** There is no point in factoring out single-instruction constant
    +** expressions that need to be placed in a particular register.  
    +** We could factor them out, but then we would end up adding an
    +** OP_SCopy instruction to move the value into the correct register
    +** later.  We might as well just use the original instruction and
    +** avoid the OP_SCopy.
    +*/
    +static int isAppropriateForFactoring(Expr *p){
    +  if( !sqlite3ExprIsConstantNotJoin(p) ){
    +    return 0;  /* Only constant expressions are appropriate for factoring */
    +  }
    +  if( (p->flags & EP_FixedDest)==0 ){
    +    return 1;  /* Any constant without a fixed destination is appropriate */
    +  }
    +  while( p->op==TK_UPLUS ) p = p->pLeft;
    +  switch( p->op ){
    +#ifndef SQLITE_OMIT_BLOB_LITERAL
    +    case TK_BLOB:
    +#endif
    +    case TK_VARIABLE:
    +    case TK_INTEGER:
    +    case TK_FLOAT:
    +    case TK_NULL:
    +    case TK_STRING: {
    +      testcase( p->op==TK_BLOB );
    +      testcase( p->op==TK_VARIABLE );
    +      testcase( p->op==TK_INTEGER );
    +      testcase( p->op==TK_FLOAT );
    +      testcase( p->op==TK_NULL );
    +      testcase( p->op==TK_STRING );
    +      /* Single-instruction constants with a fixed destination are
    +      ** better done in-line.  If we factor them, they will just end
    +      ** up generating an OP_SCopy to move the value to the destination
    +      ** register. */
    +      return 0;
    +    }
    +    case TK_UMINUS: {
    +      if( p->pLeft->op==TK_FLOAT || p->pLeft->op==TK_INTEGER ){
    +        return 0;
    +      }
    +      break;
    +    }
    +    default: {
    +      break;
    +    }
    +  }
    +  return 1;
    +}
    +
    +/*
    +** If pExpr is a constant expression that is appropriate for
    +** factoring out of a loop, then evaluate the expression
    +** into a register and convert the expression into a TK_REGISTER
    +** expression.
    +*/
    +static int evalConstExpr(Walker *pWalker, Expr *pExpr){
    +  Parse *pParse = pWalker->pParse;
    +  switch( pExpr->op ){
    +    case TK_IN:
    +    case TK_REGISTER: {
    +      return WRC_Prune;
    +    }
    +    case TK_FUNCTION:
    +    case TK_AGG_FUNCTION:
    +    case TK_CONST_FUNC: {
    +      /* The arguments to a function have a fixed destination.
    +      ** Mark them this way to avoid generated unneeded OP_SCopy
    +      ** instructions. 
    +      */
    +      ExprList *pList = pExpr->x.pList;
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +      if( pList ){
    +        int i = pList->nExpr;
    +        struct ExprList_item *pItem = pList->a;
    +        for(; i>0; i--, pItem++){
    +          if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
    +        }
    +      }
    +      break;
    +    }
    +  }
    +  if( isAppropriateForFactoring(pExpr) ){
    +    int r1 = ++pParse->nMem;
    +    int r2;
    +    r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
    +    if( NEVER(r1!=r2) ) sqlite3ReleaseTempReg(pParse, r1);
    +    pExpr->op2 = pExpr->op;
    +    pExpr->op = TK_REGISTER;
    +    pExpr->iTable = r2;
    +    return WRC_Prune;
    +  }
    +  return WRC_Continue;
    +}
    +
    +/*
    +** Preevaluate constant subexpressions within pExpr and store the
    +** results in registers.  Modify pExpr so that the constant subexpresions
    +** are TK_REGISTER opcodes that refer to the precomputed values.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
    +  Walker w;
    +  w.xExprCallback = evalConstExpr;
    +  w.xSelectCallback = 0;
    +  w.pParse = pParse;
    +  sqlite3WalkExpr(&w, pExpr);
    +}
    +
    +
    +/*
    +** Generate code that pushes the value of every element of the given
    +** expression list into a sequence of registers beginning at target.
    +**
    +** Return the number of elements evaluated.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCodeExprList(
    +  Parse *pParse,     /* Parsing context */
    +  ExprList *pList,   /* The expression list to be coded */
    +  int target,        /* Where to write results */
    +  int doHardCopy     /* Make a hard copy of every element */
    +){
    +  struct ExprList_item *pItem;
    +  int i, n;
    +  assert( pList!=0 );
    +  assert( target>0 );
    +  n = pList->nExpr;
    +  for(pItem=pList->a, i=0; i<n; i++, pItem++){
    +    if( pItem->iAlias ){
    +      int iReg = codeAlias(pParse, pItem->iAlias, pItem->pExpr, target+i);
    +      Vdbe *v = sqlite3GetVdbe(pParse);
    +      if( iReg!=target+i ){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, iReg, target+i);
    +      }
    +    }else{
    +      sqlite3ExprCode(pParse, pItem->pExpr, target+i);
    +    }
    +    if( doHardCopy && !pParse->db->mallocFailed ){
    +      sqlite3ExprHardCopy(pParse, target, n);
    +    }
    +  }
    +  return n;
    +}
    +
    +/*
    +** Generate code for a boolean expression such that a jump is made
    +** to the label "dest" if the expression is true but execution
    +** continues straight thru if the expression is false.
    +**
    +** If the expression evaluates to NULL (neither true nor false), then
    +** take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.
    +**
    +** This code depends on the fact that certain token values (ex: TK_EQ)
    +** are the same as opcode values (ex: OP_Eq) that implement the corresponding
    +** operation.  Special comments in vdbe.c and the mkopcodeh.awk script in
    +** the make process cause these values to align.  Assert()s in the code
    +** below verify that the numbers are aligned correctly.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
    +  Vdbe *v = pParse->pVdbe;
    +  int op = 0;
    +  int regFree1 = 0;
    +  int regFree2 = 0;
    +  int r1, r2;
    +
    +  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );
    +  if( NEVER(v==0) )     return;  /* Existance of VDBE checked by caller */
    +  if( NEVER(pExpr==0) ) return;  /* No way this can happen */
    +  op = pExpr->op;
    +  switch( op ){
    +    case TK_AND: {
    +      int d2 = sqlite3VdbeMakeLabel(v);
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprCachePush(pParse);
    +      sqlite3ExprIfFalse(pParse, pExpr->pLeft, d2,jumpIfNull^SQLITE_JUMPIFNULL);
    +      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
    +      sqlite3VdbeResolveLabel(v, d2);
    +      sqlite3ExprCachePop(pParse, 1);
    +      break;
    +    }
    +    case TK_OR: {
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);
    +      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
    +      break;
    +    }
    +    case TK_NOT: {
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
    +      break;
    +    }
    +    case TK_LT:
    +    case TK_LE:
    +    case TK_GT:
    +    case TK_GE:
    +    case TK_NE:
    +    case TK_EQ: {
    +      assert( TK_LT==OP_Lt );
    +      assert( TK_LE==OP_Le );
    +      assert( TK_GT==OP_Gt );
    +      assert( TK_GE==OP_Ge );
    +      assert( TK_EQ==OP_Eq );
    +      assert( TK_NE==OP_Ne );
    +      testcase( op==TK_LT );
    +      testcase( op==TK_LE );
    +      testcase( op==TK_GT );
    +      testcase( op==TK_GE );
    +      testcase( op==TK_EQ );
    +      testcase( op==TK_NE );
    +      testcase( jumpIfNull==0 );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, dest, jumpIfNull);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_IS:
    +    case TK_ISNOT: {
    +      testcase( op==TK_IS );
    +      testcase( op==TK_ISNOT );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      op = (op==TK_IS) ? TK_EQ : TK_NE;
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, dest, SQLITE_NULLEQ);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_ISNULL:
    +    case TK_NOTNULL: {
    +      assert( TK_ISNULL==OP_IsNull );
    +      assert( TK_NOTNULL==OP_NotNull );
    +      testcase( op==TK_ISNULL );
    +      testcase( op==TK_NOTNULL );
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
    +      sqlite3VdbeAddOp2(v, op, r1, dest);
    +      testcase( regFree1==0 );
    +      break;
    +    }
    +    case TK_BETWEEN: {
    +      /*    x BETWEEN y AND z
    +      **
    +      ** Is equivalent to 
    +      **
    +      **    x>=y AND x<=z
    +      **
    +      ** Code it as such, taking care to do the common subexpression
    +      ** elementation of x.
    +      */
    +      Expr exprAnd;
    +      Expr compLeft;
    +      Expr compRight;
    +      Expr exprX;
    +
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +      exprX = *pExpr->pLeft;
    +      exprAnd.op = TK_AND;
    +      exprAnd.pLeft = &compLeft;
    +      exprAnd.pRight = &compRight;
    +      compLeft.op = TK_GE;
    +      compLeft.pLeft = &exprX;
    +      compLeft.pRight = pExpr->x.pList->a[0].pExpr;
    +      compRight.op = TK_LE;
    +      compRight.pLeft = &exprX;
    +      compRight.pRight = pExpr->x.pList->a[1].pExpr;
    +      exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
    +      testcase( regFree1==0 );
    +      exprX.op = TK_REGISTER;
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprIfTrue(pParse, &exprAnd, dest, jumpIfNull);
    +      break;
    +    }
    +    default: {
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
    +      sqlite3VdbeAddOp3(v, OP_If, r1, dest, jumpIfNull!=0);
    +      testcase( regFree1==0 );
    +      testcase( jumpIfNull==0 );
    +      break;
    +    }
    +  }
    +  sqlite3ReleaseTempReg(pParse, regFree1);
    +  sqlite3ReleaseTempReg(pParse, regFree2);  
    +}
    +
    +/*
    +** Generate code for a boolean expression such that a jump is made
    +** to the label "dest" if the expression is false but execution
    +** continues straight thru if the expression is true.
    +**
    +** If the expression evaluates to NULL (neither true nor false) then
    +** jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull
    +** is 0.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
    +  Vdbe *v = pParse->pVdbe;
    +  int op = 0;
    +  int regFree1 = 0;
    +  int regFree2 = 0;
    +  int r1, r2;
    +
    +  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );
    +  if( NEVER(v==0) ) return; /* Existance of VDBE checked by caller */
    +  if( pExpr==0 )    return;
    +
    +  /* The value of pExpr->op and op are related as follows:
    +  **
    +  **       pExpr->op            op
    +  **       ---------          ----------
    +  **       TK_ISNULL          OP_NotNull
    +  **       TK_NOTNULL         OP_IsNull
    +  **       TK_NE              OP_Eq
    +  **       TK_EQ              OP_Ne
    +  **       TK_GT              OP_Le
    +  **       TK_LE              OP_Gt
    +  **       TK_GE              OP_Lt
    +  **       TK_LT              OP_Ge
    +  **
    +  ** For other values of pExpr->op, op is undefined and unused.
    +  ** The value of TK_ and OP_ constants are arranged such that we
    +  ** can compute the mapping above using the following expression.
    +  ** Assert()s verify that the computation is correct.
    +  */
    +  op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1);
    +
    +  /* Verify correct alignment of TK_ and OP_ constants
    +  */
    +  assert( pExpr->op!=TK_ISNULL || op==OP_NotNull );
    +  assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull );
    +  assert( pExpr->op!=TK_NE || op==OP_Eq );
    +  assert( pExpr->op!=TK_EQ || op==OP_Ne );
    +  assert( pExpr->op!=TK_LT || op==OP_Ge );
    +  assert( pExpr->op!=TK_LE || op==OP_Gt );
    +  assert( pExpr->op!=TK_GT || op==OP_Le );
    +  assert( pExpr->op!=TK_GE || op==OP_Lt );
    +
    +  switch( pExpr->op ){
    +    case TK_AND: {
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
    +      sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
    +      break;
    +    }
    +    case TK_OR: {
    +      int d2 = sqlite3VdbeMakeLabel(v);
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprCachePush(pParse);
    +      sqlite3ExprIfTrue(pParse, pExpr->pLeft, d2, jumpIfNull^SQLITE_JUMPIFNULL);
    +      sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
    +      sqlite3VdbeResolveLabel(v, d2);
    +      sqlite3ExprCachePop(pParse, 1);
    +      break;
    +    }
    +    case TK_NOT: {
    +      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);
    +      break;
    +    }
    +    case TK_LT:
    +    case TK_LE:
    +    case TK_GT:
    +    case TK_GE:
    +    case TK_NE:
    +    case TK_EQ: {
    +      testcase( op==TK_LT );
    +      testcase( op==TK_LE );
    +      testcase( op==TK_GT );
    +      testcase( op==TK_GE );
    +      testcase( op==TK_EQ );
    +      testcase( op==TK_NE );
    +      testcase( jumpIfNull==0 );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, dest, jumpIfNull);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_IS:
    +    case TK_ISNOT: {
    +      testcase( pExpr->op==TK_IS );
    +      testcase( pExpr->op==TK_ISNOT );
    +      codeCompareOperands(pParse, pExpr->pLeft, &r1, &regFree1,
    +                                  pExpr->pRight, &r2, &regFree2);
    +      op = (pExpr->op==TK_IS) ? TK_NE : TK_EQ;
    +      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
    +                  r1, r2, dest, SQLITE_NULLEQ);
    +      testcase( regFree1==0 );
    +      testcase( regFree2==0 );
    +      break;
    +    }
    +    case TK_ISNULL:
    +    case TK_NOTNULL: {
    +      testcase( op==TK_ISNULL );
    +      testcase( op==TK_NOTNULL );
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
    +      sqlite3VdbeAddOp2(v, op, r1, dest);
    +      testcase( regFree1==0 );
    +      break;
    +    }
    +    case TK_BETWEEN: {
    +      /*    x BETWEEN y AND z
    +      **
    +      ** Is equivalent to 
    +      **
    +      **    x>=y AND x<=z
    +      **
    +      ** Code it as such, taking care to do the common subexpression
    +      ** elementation of x.
    +      */
    +      Expr exprAnd;
    +      Expr compLeft;
    +      Expr compRight;
    +      Expr exprX;
    +
    +      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +      exprX = *pExpr->pLeft;
    +      exprAnd.op = TK_AND;
    +      exprAnd.pLeft = &compLeft;
    +      exprAnd.pRight = &compRight;
    +      compLeft.op = TK_GE;
    +      compLeft.pLeft = &exprX;
    +      compLeft.pRight = pExpr->x.pList->a[0].pExpr;
    +      compRight.op = TK_LE;
    +      compRight.pLeft = &exprX;
    +      compRight.pRight = pExpr->x.pList->a[1].pExpr;
    +      exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
    +      testcase( regFree1==0 );
    +      exprX.op = TK_REGISTER;
    +      testcase( jumpIfNull==0 );
    +      sqlite3ExprIfFalse(pParse, &exprAnd, dest, jumpIfNull);
    +      break;
    +    }
    +    default: {
    +      r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
    +      sqlite3VdbeAddOp3(v, OP_IfNot, r1, dest, jumpIfNull!=0);
    +      testcase( regFree1==0 );
    +      testcase( jumpIfNull==0 );
    +      break;
    +    }
    +  }
    +  sqlite3ReleaseTempReg(pParse, regFree1);
    +  sqlite3ReleaseTempReg(pParse, regFree2);
    +}
    +
    +/*
    +** Do a deep comparison of two expression trees.  Return TRUE (non-zero)
    +** if they are identical and return FALSE if they differ in any way.
    +**
    +** Sometimes this routine will return FALSE even if the two expressions
    +** really are equivalent.  If we cannot prove that the expressions are
    +** identical, we return FALSE just to be safe.  So if this routine
    +** returns false, then you do not really know for certain if the two
    +** expressions are the same.  But if you get a TRUE return, then you
    +** can be sure the expressions are the same.  In the places where
    +** this routine is used, it does not hurt to get an extra FALSE - that
    +** just might result in some slightly slower code.  But returning
    +** an incorrect TRUE could lead to a malfunction.
    +*/
    +SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB){
    +  int i;
    +  if( pA==0||pB==0 ){
    +    return pB==pA;
    +  }
    +  assert( !ExprHasAnyProperty(pA, EP_TokenOnly|EP_Reduced) );
    +  assert( !ExprHasAnyProperty(pB, EP_TokenOnly|EP_Reduced) );
    +  if( ExprHasProperty(pA, EP_xIsSelect) || ExprHasProperty(pB, EP_xIsSelect) ){
    +    return 0;
    +  }
    +  if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 0;
    +  if( pA->op!=pB->op ) return 0;
    +  if( !sqlite3ExprCompare(pA->pLeft, pB->pLeft) ) return 0;
    +  if( !sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 0;
    +
    +  if( pA->x.pList && pB->x.pList ){
    +    if( pA->x.pList->nExpr!=pB->x.pList->nExpr ) return 0;
    +    for(i=0; i<pA->x.pList->nExpr; i++){
    +      Expr *pExprA = pA->x.pList->a[i].pExpr;
    +      Expr *pExprB = pB->x.pList->a[i].pExpr;
    +      if( !sqlite3ExprCompare(pExprA, pExprB) ) return 0;
    +    }
    +  }else if( pA->x.pList || pB->x.pList ){
    +    return 0;
    +  }
    +
    +  if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 0;
    +  if( ExprHasProperty(pA, EP_IntValue) ){
    +    if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){
    +      return 0;
    +    }
    +  }else if( pA->op!=TK_COLUMN && pA->u.zToken ){
    +    if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 0;
    +    if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ){
    +      return 0;
    +    }
    +  }
    +  return 1;
    +}
    +
    +
    +/*
    +** Add a new element to the pAggInfo->aCol[] array.  Return the index of
    +** the new element.  Return a negative number if malloc fails.
    +*/
    +static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
    +  int i;
    +  pInfo->aCol = sqlite3ArrayAllocate(
    +       db,
    +       pInfo->aCol,
    +       sizeof(pInfo->aCol[0]),
    +       3,
    +       &pInfo->nColumn,
    +       &pInfo->nColumnAlloc,
    +       &i
    +  );
    +  return i;
    +}    
    +
    +/*
    +** Add a new element to the pAggInfo->aFunc[] array.  Return the index of
    +** the new element.  Return a negative number if malloc fails.
    +*/
    +static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
    +  int i;
    +  pInfo->aFunc = sqlite3ArrayAllocate(
    +       db, 
    +       pInfo->aFunc,
    +       sizeof(pInfo->aFunc[0]),
    +       3,
    +       &pInfo->nFunc,
    +       &pInfo->nFuncAlloc,
    +       &i
    +  );
    +  return i;
    +}    
    +
    +/*
    +** This is the xExprCallback for a tree walker.  It is used to
    +** implement sqlite3ExprAnalyzeAggregates().  See sqlite3ExprAnalyzeAggregates
    +** for additional information.
    +*/
    +static int analyzeAggregate(Walker *pWalker, Expr *pExpr){
    +  int i;
    +  NameContext *pNC = pWalker->u.pNC;
    +  Parse *pParse = pNC->pParse;
    +  SrcList *pSrcList = pNC->pSrcList;
    +  AggInfo *pAggInfo = pNC->pAggInfo;
    +
    +  switch( pExpr->op ){
    +    case TK_AGG_COLUMN:
    +    case TK_COLUMN: {
    +      testcase( pExpr->op==TK_AGG_COLUMN );
    +      testcase( pExpr->op==TK_COLUMN );
    +      /* Check to see if the column is in one of the tables in the FROM
    +      ** clause of the aggregate query */
    +      if( ALWAYS(pSrcList!=0) ){
    +        struct SrcList_item *pItem = pSrcList->a;
    +        for(i=0; i<pSrcList->nSrc; i++, pItem++){
    +          struct AggInfo_col *pCol;
    +          assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
    +          if( pExpr->iTable==pItem->iCursor ){
    +            /* If we reach this point, it means that pExpr refers to a table
    +            ** that is in the FROM clause of the aggregate query.  
    +            **
    +            ** Make an entry for the column in pAggInfo->aCol[] if there
    +            ** is not an entry there already.
    +            */
    +            int k;
    +            pCol = pAggInfo->aCol;
    +            for(k=0; k<pAggInfo->nColumn; k++, pCol++){
    +              if( pCol->iTable==pExpr->iTable &&
    +                  pCol->iColumn==pExpr->iColumn ){
    +                break;
    +              }
    +            }
    +            if( (k>=pAggInfo->nColumn)
    +             && (k = addAggInfoColumn(pParse->db, pAggInfo))>=0 
    +            ){
    +              pCol = &pAggInfo->aCol[k];
    +              pCol->pTab = pExpr->pTab;
    +              pCol->iTable = pExpr->iTable;
    +              pCol->iColumn = pExpr->iColumn;
    +              pCol->iMem = ++pParse->nMem;
    +              pCol->iSorterColumn = -1;
    +              pCol->pExpr = pExpr;
    +              if( pAggInfo->pGroupBy ){
    +                int j, n;
    +                ExprList *pGB = pAggInfo->pGroupBy;
    +                struct ExprList_item *pTerm = pGB->a;
    +                n = pGB->nExpr;
    +                for(j=0; j<n; j++, pTerm++){
    +                  Expr *pE = pTerm->pExpr;
    +                  if( pE->op==TK_COLUMN && pE->iTable==pExpr->iTable &&
    +                      pE->iColumn==pExpr->iColumn ){
    +                    pCol->iSorterColumn = j;
    +                    break;
    +                  }
    +                }
    +              }
    +              if( pCol->iSorterColumn<0 ){
    +                pCol->iSorterColumn = pAggInfo->nSortingColumn++;
    +              }
    +            }
    +            /* There is now an entry for pExpr in pAggInfo->aCol[] (either
    +            ** because it was there before or because we just created it).
    +            ** Convert the pExpr to be a TK_AGG_COLUMN referring to that
    +            ** pAggInfo->aCol[] entry.
    +            */
    +            ExprSetIrreducible(pExpr);
    +            pExpr->pAggInfo = pAggInfo;
    +            pExpr->op = TK_AGG_COLUMN;
    +            pExpr->iAgg = (i16)k;
    +            break;
    +          } /* endif pExpr->iTable==pItem->iCursor */
    +        } /* end loop over pSrcList */
    +      }
    +      return WRC_Prune;
    +    }
    +    case TK_AGG_FUNCTION: {
    +      /* The pNC->nDepth==0 test causes aggregate functions in subqueries
    +      ** to be ignored */
    +      if( pNC->nDepth==0 ){
    +        /* Check to see if pExpr is a duplicate of another aggregate 
    +        ** function that is already in the pAggInfo structure
    +        */
    +        struct AggInfo_func *pItem = pAggInfo->aFunc;
    +        for(i=0; i<pAggInfo->nFunc; i++, pItem++){
    +          if( sqlite3ExprCompare(pItem->pExpr, pExpr) ){
    +            break;
    +          }
    +        }
    +        if( i>=pAggInfo->nFunc ){
    +          /* pExpr is original.  Make a new entry in pAggInfo->aFunc[]
    +          */
    +          u8 enc = ENC(pParse->db);
    +          i = addAggInfoFunc(pParse->db, pAggInfo);
    +          if( i>=0 ){
    +            assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +            pItem = &pAggInfo->aFunc[i];
    +            pItem->pExpr = pExpr;
    +            pItem->iMem = ++pParse->nMem;
    +            assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +            pItem->pFunc = sqlite3FindFunction(pParse->db,
    +                   pExpr->u.zToken, sqlite3Strlen30(pExpr->u.zToken),
    +                   pExpr->x.pList ? pExpr->x.pList->nExpr : 0, enc, 0);
    +            if( pExpr->flags & EP_Distinct ){
    +              pItem->iDistinct = pParse->nTab++;
    +            }else{
    +              pItem->iDistinct = -1;
    +            }
    +          }
    +        }
    +        /* Make pExpr point to the appropriate pAggInfo->aFunc[] entry
    +        */
    +        assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
    +        ExprSetIrreducible(pExpr);
    +        pExpr->iAgg = (i16)i;
    +        pExpr->pAggInfo = pAggInfo;
    +        return WRC_Prune;
    +      }
    +    }
    +  }
    +  return WRC_Continue;
    +}
    +static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
    +  NameContext *pNC = pWalker->u.pNC;
    +  if( pNC->nDepth==0 ){
    +    pNC->nDepth++;
    +    sqlite3WalkSelect(pWalker, pSelect);
    +    pNC->nDepth--;
    +    return WRC_Prune;
    +  }else{
    +    return WRC_Continue;
    +  }
    +}
    +
    +/*
    +** Analyze the given expression looking for aggregate functions and
    +** for variables that need to be added to the pParse->aAgg[] array.
    +** Make additional entries to the pParse->aAgg[] array as necessary.
    +**
    +** This routine should only be called after the expression has been
    +** analyzed by sqlite3ResolveExprNames().
    +*/
    +SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
    +  Walker w;
    +  w.xExprCallback = analyzeAggregate;
    +  w.xSelectCallback = analyzeAggregatesInSelect;
    +  w.u.pNC = pNC;
    +  assert( pNC->pSrcList!=0 );
    +  sqlite3WalkExpr(&w, pExpr);
    +}
    +
    +/*
    +** Call sqlite3ExprAnalyzeAggregates() for every expression in an
    +** expression list.  Return the number of errors.
    +**
    +** If an error is found, the analysis is cut short.
    +*/
    +SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
    +  struct ExprList_item *pItem;
    +  int i;
    +  if( pList ){
    +    for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
    +      sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
    +    }
    +  }
    +}
    +
    +/*
    +** Allocate a single new register for use to hold some intermediate result.
    +*/
    +SQLITE_PRIVATE int sqlite3GetTempReg(Parse *pParse){
    +  if( pParse->nTempReg==0 ){
    +    return ++pParse->nMem;
    +  }
    +  return pParse->aTempReg[--pParse->nTempReg];
    +}
    +
    +/*
    +** Deallocate a register, making available for reuse for some other
    +** purpose.
    +**
    +** If a register is currently being used by the column cache, then
    +** the dallocation is deferred until the column cache line that uses
    +** the register becomes stale.
    +*/
    +SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse *pParse, int iReg){
    +  if( iReg && pParse->nTempReg<ArraySize(pParse->aTempReg) ){
    +    int i;
    +    struct yColCache *p;
    +    for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    +      if( p->iReg==iReg ){
    +        p->tempReg = 1;
    +        return;
    +      }
    +    }
    +    pParse->aTempReg[pParse->nTempReg++] = iReg;
    +  }
    +}
    +
    +/*
    +** Allocate or deallocate a block of nReg consecutive registers
    +*/
    +SQLITE_PRIVATE int sqlite3GetTempRange(Parse *pParse, int nReg){
    +  int i, n;
    +  i = pParse->iRangeReg;
    +  n = pParse->nRangeReg;
    +  if( nReg<=n && !usedAsColumnCache(pParse, i, i+n-1) ){
    +    pParse->iRangeReg += nReg;
    +    pParse->nRangeReg -= nReg;
    +  }else{
    +    i = pParse->nMem+1;
    +    pParse->nMem += nReg;
    +  }
    +  return i;
    +}
    +SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){
    +  if( nReg>pParse->nRangeReg ){
    +    pParse->nRangeReg = nReg;
    +    pParse->iRangeReg = iReg;
    +  }
    +}
    +
    +/************** End of expr.c ************************************************/
    +/************** Begin file alter.c *******************************************/
    +/*
    +** 2005 February 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that used to generate VDBE code
    +** that implements the ALTER TABLE command.
    +**
    +** $Id: alter.c,v 1.62 2009/07/24 17:58:53 danielk1977 Exp $
    +*/
    +
    +/*
    +** The code in this file only exists if we are not omitting the
    +** ALTER TABLE logic from the build.
    +*/
    +#ifndef SQLITE_OMIT_ALTERTABLE
    +
    +
    +/*
    +** This function is used by SQL generated to implement the 
    +** ALTER TABLE command. The first argument is the text of a CREATE TABLE or
    +** CREATE INDEX command. The second is a table name. The table name in 
    +** the CREATE TABLE or CREATE INDEX statement is replaced with the third
    +** argument and the result returned. Examples:
    +**
    +** sqlite_rename_table('CREATE TABLE abc(a, b, c)', 'def')
    +**     -> 'CREATE TABLE def(a, b, c)'
    +**
    +** sqlite_rename_table('CREATE INDEX i ON abc(a)', 'def')
    +**     -> 'CREATE INDEX i ON def(a, b, c)'
    +*/
    +static void renameTableFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  unsigned char const *zSql = sqlite3_value_text(argv[0]);
    +  unsigned char const *zTableName = sqlite3_value_text(argv[1]);
    +
    +  int token;
    +  Token tname;
    +  unsigned char const *zCsr = zSql;
    +  int len = 0;
    +  char *zRet;
    +
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  /* The principle used to locate the table name in the CREATE TABLE 
    +  ** statement is that the table name is the first non-space token that
    +  ** is immediately followed by a TK_LP or TK_USING token.
    +  */
    +  if( zSql ){
    +    do {
    +      if( !*zCsr ){
    +        /* Ran out of input before finding an opening bracket. Return NULL. */
    +        return;
    +      }
    +
    +      /* Store the token that zCsr points to in tname. */
    +      tname.z = (char*)zCsr;
    +      tname.n = len;
    +
    +      /* Advance zCsr to the next token. Store that token type in 'token',
    +      ** and its length in 'len' (to be used next iteration of this loop).
    +      */
    +      do {
    +        zCsr += len;
    +        len = sqlite3GetToken(zCsr, &token);
    +      } while( token==TK_SPACE );
    +      assert( len>0 );
    +    } while( token!=TK_LP && token!=TK_USING );
    +
    +    zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, 
    +       zTableName, tname.z+tname.n);
    +    sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC);
    +  }
    +}
    +
    +/*
    +** This C function implements an SQL user function that is used by SQL code
    +** generated by the ALTER TABLE ... RENAME command to modify the definition
    +** of any foreign key constraints that use the table being renamed as the 
    +** parent table. It is passed three arguments:
    +**
    +**   1) The complete text of the CREATE TABLE statement being modified,
    +**   2) The old name of the table being renamed, and
    +**   3) The new name of the table being renamed.
    +**
    +** It returns the new CREATE TABLE statement. For example:
    +**
    +**   sqlite_rename_parent('CREATE TABLE t1(a REFERENCES t2)', 't2', 't3')
    +**       -> 'CREATE TABLE t1(a REFERENCES t3)'
    +*/
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +static void renameParentFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  char *zOutput = 0;
    +  char *zResult;
    +  unsigned char const *zInput = sqlite3_value_text(argv[0]);
    +  unsigned char const *zOld = sqlite3_value_text(argv[1]);
    +  unsigned char const *zNew = sqlite3_value_text(argv[2]);
    +
    +  unsigned const char *z;         /* Pointer to token */
    +  int n;                          /* Length of token z */
    +  int token;                      /* Type of token */
    +
    +  UNUSED_PARAMETER(NotUsed);
    +  for(z=zInput; *z; z=z+n){
    +    n = sqlite3GetToken(z, &token);
    +    if( token==TK_REFERENCES ){
    +      char *zParent;
    +      do {
    +        z += n;
    +        n = sqlite3GetToken(z, &token);
    +      }while( token==TK_SPACE );
    +
    +      zParent = sqlite3DbStrNDup(db, (const char *)z, n);
    +      if( zParent==0 ) break;
    +      sqlite3Dequote(zParent);
    +      if( 0==sqlite3StrICmp((const char *)zOld, zParent) ){
    +        char *zOut = sqlite3MPrintf(db, "%s%.*s\"%w\"", 
    +            (zOutput?zOutput:""), z-zInput, zInput, (const char *)zNew
    +        );
    +        sqlite3DbFree(db, zOutput);
    +        zOutput = zOut;
    +        zInput = &z[n];
    +      }
    +      sqlite3DbFree(db, zParent);
    +    }
    +  }
    +
    +  zResult = sqlite3MPrintf(db, "%s%s", (zOutput?zOutput:""), zInput), 
    +  sqlite3_result_text(context, zResult, -1, SQLITE_DYNAMIC);
    +  sqlite3DbFree(db, zOutput);
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +/* This function is used by SQL generated to implement the
    +** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER 
    +** statement. The second is a table name. The table name in the CREATE 
    +** TRIGGER statement is replaced with the third argument and the result 
    +** returned. This is analagous to renameTableFunc() above, except for CREATE
    +** TRIGGER, not CREATE INDEX and CREATE TABLE.
    +*/
    +static void renameTriggerFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  unsigned char const *zSql = sqlite3_value_text(argv[0]);
    +  unsigned char const *zTableName = sqlite3_value_text(argv[1]);
    +
    +  int token;
    +  Token tname;
    +  int dist = 3;
    +  unsigned char const *zCsr = zSql;
    +  int len = 0;
    +  char *zRet;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  /* The principle used to locate the table name in the CREATE TRIGGER 
    +  ** statement is that the table name is the first token that is immediatedly
    +  ** preceded by either TK_ON or TK_DOT and immediatedly followed by one
    +  ** of TK_WHEN, TK_BEGIN or TK_FOR.
    +  */
    +  if( zSql ){
    +    do {
    +
    +      if( !*zCsr ){
    +        /* Ran out of input before finding the table name. Return NULL. */
    +        return;
    +      }
    +
    +      /* Store the token that zCsr points to in tname. */
    +      tname.z = (char*)zCsr;
    +      tname.n = len;
    +
    +      /* Advance zCsr to the next token. Store that token type in 'token',
    +      ** and its length in 'len' (to be used next iteration of this loop).
    +      */
    +      do {
    +        zCsr += len;
    +        len = sqlite3GetToken(zCsr, &token);
    +      }while( token==TK_SPACE );
    +      assert( len>0 );
    +
    +      /* Variable 'dist' stores the number of tokens read since the most
    +      ** recent TK_DOT or TK_ON. This means that when a WHEN, FOR or BEGIN 
    +      ** token is read and 'dist' equals 2, the condition stated above
    +      ** to be met.
    +      **
    +      ** Note that ON cannot be a database, table or column name, so
    +      ** there is no need to worry about syntax like 
    +      ** "CREATE TRIGGER ... ON ON.ON BEGIN ..." etc.
    +      */
    +      dist++;
    +      if( token==TK_DOT || token==TK_ON ){
    +        dist = 0;
    +      }
    +    } while( dist!=2 || (token!=TK_WHEN && token!=TK_FOR && token!=TK_BEGIN) );
    +
    +    /* Variable tname now contains the token that is the old table-name
    +    ** in the CREATE TRIGGER statement.
    +    */
    +    zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, 
    +       zTableName, tname.z+tname.n);
    +    sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC);
    +  }
    +}
    +#endif   /* !SQLITE_OMIT_TRIGGER */
    +
    +/*
    +** Register built-in functions used to help implement ALTER TABLE
    +*/
    +SQLITE_PRIVATE void sqlite3AlterFunctions(sqlite3 *db){
    +  sqlite3CreateFunc(db, "sqlite_rename_table", 2, SQLITE_UTF8, 0,
    +                         renameTableFunc, 0, 0);
    +#ifndef SQLITE_OMIT_TRIGGER
    +  sqlite3CreateFunc(db, "sqlite_rename_trigger", 2, SQLITE_UTF8, 0,
    +                         renameTriggerFunc, 0, 0);
    +#endif
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +  sqlite3CreateFunc(db, "sqlite_rename_parent", 3, SQLITE_UTF8, 0,
    +                         renameParentFunc, 0, 0);
    +#endif
    +}
    +
    +/*
    +** This function is used to create the text of expressions of the form:
    +**
    +**   name=<constant1> OR name=<constant2> OR ...
    +**
    +** If argument zWhere is NULL, then a pointer string containing the text 
    +** "name=<constant>" is returned, where <constant> is the quoted version
    +** of the string passed as argument zConstant. The returned buffer is
    +** allocated using sqlite3DbMalloc(). It is the responsibility of the
    +** caller to ensure that it is eventually freed.
    +**
    +** If argument zWhere is not NULL, then the string returned is 
    +** "<where> OR name=<constant>", where <where> is the contents of zWhere.
    +** In this case zWhere is passed to sqlite3DbFree() before returning.
    +** 
    +*/
    +static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
    +  char *zNew;
    +  if( !zWhere ){
    +    zNew = sqlite3MPrintf(db, "name=%Q", zConstant);
    +  }else{
    +    zNew = sqlite3MPrintf(db, "%s OR name=%Q", zWhere, zConstant);
    +    sqlite3DbFree(db, zWhere);
    +  }
    +  return zNew;
    +}
    +
    +#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
    +/*
    +** Generate the text of a WHERE expression which can be used to select all
    +** tables that have foreign key constraints that refer to table pTab (i.e.
    +** constraints for which pTab is the parent table) from the sqlite_master
    +** table.
    +*/
    +static char *whereForeignKeys(Parse *pParse, Table *pTab){
    +  FKey *p;
    +  char *zWhere = 0;
    +  for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    +    zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
    +  }
    +  return zWhere;
    +}
    +#endif
    +
    +/*
    +** Generate the text of a WHERE expression which can be used to select all
    +** temporary triggers on table pTab from the sqlite_temp_master table. If
    +** table pTab has no temporary triggers, or is itself stored in the 
    +** temporary database, NULL is returned.
    +*/
    +static char *whereTempTriggers(Parse *pParse, Table *pTab){
    +  Trigger *pTrig;
    +  char *zWhere = 0;
    +  const Schema *pTempSchema = pParse->db->aDb[1].pSchema; /* Temp db schema */
    +
    +  /* If the table is not located in the temp-db (in which case NULL is 
    +  ** returned, loop through the tables list of triggers. For each trigger
    +  ** that is not part of the temp-db schema, add a clause to the WHERE 
    +  ** expression being built up in zWhere.
    +  */
    +  if( pTab->pSchema!=pTempSchema ){
    +    sqlite3 *db = pParse->db;
    +    for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
    +      if( pTrig->pSchema==pTempSchema ){
    +        zWhere = whereOrName(db, zWhere, pTrig->zName);
    +      }
    +    }
    +  }
    +  return zWhere;
    +}
    +
    +/*
    +** Generate code to drop and reload the internal representation of table
    +** pTab from the database, including triggers and temporary triggers.
    +** Argument zName is the name of the table in the database schema at
    +** the time the generated code is executed. This can be different from
    +** pTab->zName if this function is being called to code part of an 
    +** "ALTER TABLE RENAME TO" statement.
    +*/
    +static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
    +  Vdbe *v;
    +  char *zWhere;
    +  int iDb;                   /* Index of database containing pTab */
    +#ifndef SQLITE_OMIT_TRIGGER
    +  Trigger *pTrig;
    +#endif
    +
    +  v = sqlite3GetVdbe(pParse);
    +  if( NEVER(v==0) ) return;
    +  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +  assert( iDb>=0 );
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  /* Drop any table triggers from the internal schema. */
    +  for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
    +    int iTrigDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
    +    assert( iTrigDb==iDb || iTrigDb==1 );
    +    sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
    +  }
    +#endif
    +
    +  /* Drop the table and index from the internal schema.  */
    +  sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
    +
    +  /* Reload the table, index and permanent trigger schemas. */
    +  zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
    +  if( !zWhere ) return;
    +  sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  /* Now, if the table is not stored in the temp database, reload any temp 
    +  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. 
    +  */
    +  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
    +    sqlite3VdbeAddOp4(v, OP_ParseSchema, 1, 0, 0, zWhere, P4_DYNAMIC);
    +  }
    +#endif
    +}
    +
    +/*
    +** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" 
    +** command. 
    +*/
    +SQLITE_PRIVATE void sqlite3AlterRenameTable(
    +  Parse *pParse,            /* Parser context. */
    +  SrcList *pSrc,            /* The table to rename. */
    +  Token *pName              /* The new table name. */
    +){
    +  int iDb;                  /* Database that contains the table */
    +  char *zDb;                /* Name of database iDb */
    +  Table *pTab;              /* Table being renamed */
    +  char *zName = 0;          /* NULL-terminated version of pName */ 
    +  sqlite3 *db = pParse->db; /* Database connection */
    +  int nTabName;             /* Number of UTF-8 characters in zTabName */
    +  const char *zTabName;     /* Original name of the table */
    +  Vdbe *v;
    +#ifndef SQLITE_OMIT_TRIGGER
    +  char *zWhere = 0;         /* Where clause to locate temp triggers */
    +#endif
    +  VTable *pVTab = 0;        /* Non-zero if this is a v-tab with an xRename() */
    +  
    +  if( NEVER(db->mallocFailed) ) goto exit_rename_table;
    +  assert( pSrc->nSrc==1 );
    +  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
    +
    +  pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
    +  if( !pTab ) goto exit_rename_table;
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +  zDb = db->aDb[iDb].zName;
    +
    +  /* Get a NULL terminated version of the new table name. */
    +  zName = sqlite3NameFromToken(db, pName);
    +  if( !zName ) goto exit_rename_table;
    +
    +  /* Check that a table or index named 'zName' does not already exist
    +  ** in database iDb. If so, this is an error.
    +  */
    +  if( sqlite3FindTable(db, zName, zDb) || sqlite3FindIndex(db, zName, zDb) ){
    +    sqlite3ErrorMsg(pParse, 
    +        "there is already another table or index with this name: %s", zName);
    +    goto exit_rename_table;
    +  }
    +
    +  /* Make sure it is not a system table being altered, or a reserved name
    +  ** that the table is being renamed to.
    +  */
    +  if( sqlite3Strlen30(pTab->zName)>6 
    +   && 0==sqlite3StrNICmp(pTab->zName, "sqlite_", 7)
    +  ){
    +    sqlite3ErrorMsg(pParse, "table %s may not be altered", pTab->zName);
    +    goto exit_rename_table;
    +  }
    +  if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
    +    goto exit_rename_table;
    +  }
    +
    +#ifndef SQLITE_OMIT_VIEW
    +  if( pTab->pSelect ){
    +    sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
    +    goto exit_rename_table;
    +  }
    +#endif
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  /* Invoke the authorization callback. */
    +  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
    +    goto exit_rename_table;
    +  }
    +#endif
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
    +    goto exit_rename_table;
    +  }
    +  if( IsVirtual(pTab) ){
    +    pVTab = sqlite3GetVTable(db, pTab);
    +    if( pVTab->pVtab->pModule->xRename==0 ){
    +      pVTab = 0;
    +    }
    +  }
    +#endif
    +
    +  /* Begin a transaction and code the VerifyCookie for database iDb. 
    +  ** Then modify the schema cookie (since the ALTER TABLE modifies the
    +  ** schema). Open a statement transaction if the table is a virtual
    +  ** table.
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ){
    +    goto exit_rename_table;
    +  }
    +  sqlite3BeginWriteOperation(pParse, pVTab!=0, iDb);
    +  sqlite3ChangeCookie(pParse, iDb);
    +
    +  /* If this is a virtual table, invoke the xRename() function if
    +  ** one is defined. The xRename() callback will modify the names
    +  ** of any resources used by the v-table implementation (including other
    +  ** SQLite tables) that are identified by the name of the virtual table.
    +  */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( pVTab ){
    +    int i = ++pParse->nMem;
    +    sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
    +    sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
    +    sqlite3MayAbort(pParse);
    +  }
    +#endif
    +
    +  /* figure out how many UTF-8 characters are in zName */
    +  zTabName = pTab->zName;
    +  nTabName = sqlite3Utf8CharLen(zTabName, -1);
    +
    +#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
    +  if( db->flags&SQLITE_ForeignKeys ){
    +    /* If foreign-key support is enabled, rewrite the CREATE TABLE 
    +    ** statements corresponding to all child tables of foreign key constraints
    +    ** for which the renamed table is the parent table.  */
    +    if( (zWhere=whereForeignKeys(pParse, pTab))!=0 ){
    +      sqlite3NestedParse(pParse, 
    +          "UPDATE sqlite_master SET "
    +              "sql = sqlite_rename_parent(sql, %Q, %Q) "
    +              "WHERE %s;", zTabName, zName, zWhere);
    +      sqlite3DbFree(db, zWhere);
    +    }
    +  }
    +#endif
    +
    +  /* Modify the sqlite_master table to use the new table name. */
    +  sqlite3NestedParse(pParse,
    +      "UPDATE %Q.%s SET "
    +#ifdef SQLITE_OMIT_TRIGGER
    +          "sql = sqlite_rename_table(sql, %Q), "
    +#else
    +          "sql = CASE "
    +            "WHEN type = 'trigger' THEN sqlite_rename_trigger(sql, %Q)"
    +            "ELSE sqlite_rename_table(sql, %Q) END, "
    +#endif
    +          "tbl_name = %Q, "
    +          "name = CASE "
    +            "WHEN type='table' THEN %Q "
    +            "WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN "
    +             "'sqlite_autoindex_' || %Q || substr(name,%d+18) "
    +            "ELSE name END "
    +      "WHERE tbl_name=%Q AND "
    +          "(type='table' OR type='index' OR type='trigger');", 
    +      zDb, SCHEMA_TABLE(iDb), zName, zName, zName, 
    +#ifndef SQLITE_OMIT_TRIGGER
    +      zName,
    +#endif
    +      zName, nTabName, zTabName
    +  );
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +  /* If the sqlite_sequence table exists in this database, then update 
    +  ** it with the new table name.
    +  */
    +  if( sqlite3FindTable(db, "sqlite_sequence", zDb) ){
    +    sqlite3NestedParse(pParse,
    +        "UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q",
    +        zDb, zName, pTab->zName);
    +  }
    +#endif
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  /* If there are TEMP triggers on this table, modify the sqlite_temp_master
    +  ** table. Don't do this if the table being ALTERed is itself located in
    +  ** the temp database.
    +  */
    +  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
    +    sqlite3NestedParse(pParse, 
    +        "UPDATE sqlite_temp_master SET "
    +            "sql = sqlite_rename_trigger(sql, %Q), "
    +            "tbl_name = %Q "
    +            "WHERE %s;", zName, zName, zWhere);
    +    sqlite3DbFree(db, zWhere);
    +  }
    +#endif
    +
    +#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
    +  if( db->flags&SQLITE_ForeignKeys ){
    +    FKey *p;
    +    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    +      Table *pFrom = p->pFrom;
    +      if( pFrom!=pTab ){
    +        reloadTableSchema(pParse, p->pFrom, pFrom->zName);
    +      }
    +    }
    +  }
    +#endif
    +
    +  /* Drop and reload the internal table schema. */
    +  reloadTableSchema(pParse, pTab, zName);
    +
    +exit_rename_table:
    +  sqlite3SrcListDelete(db, pSrc);
    +  sqlite3DbFree(db, zName);
    +}
    +
    +
    +/*
    +** Generate code to make sure the file format number is at least minFormat.
    +** The generated code will increase the file format number if necessary.
    +*/
    +SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minFormat){
    +  Vdbe *v;
    +  v = sqlite3GetVdbe(pParse);
    +  /* The VDBE should have been allocated before this routine is called.
    +  ** If that allocation failed, we would have quit before reaching this
    +  ** point */
    +  if( ALWAYS(v) ){
    +    int r1 = sqlite3GetTempReg(pParse);
    +    int r2 = sqlite3GetTempReg(pParse);
    +    int j1;
    +    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
    +    sqlite3VdbeUsesBtree(v, iDb);
    +    sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
    +    j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
    +    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
    +    sqlite3VdbeJumpHere(v, j1);
    +    sqlite3ReleaseTempReg(pParse, r1);
    +    sqlite3ReleaseTempReg(pParse, r2);
    +  }
    +}
    +
    +/*
    +** This function is called after an "ALTER TABLE ... ADD" statement
    +** has been parsed. Argument pColDef contains the text of the new
    +** column definition.
    +**
    +** The Table structure pParse->pNewTable was extended to include
    +** the new column during parsing.
    +*/
    +SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
    +  Table *pNew;              /* Copy of pParse->pNewTable */
    +  Table *pTab;              /* Table being altered */
    +  int iDb;                  /* Database number */
    +  const char *zDb;          /* Database name */
    +  const char *zTab;         /* Table name */
    +  char *zCol;               /* Null-terminated column definition */
    +  Column *pCol;             /* The new column */
    +  Expr *pDflt;              /* Default value for the new column */
    +  sqlite3 *db;              /* The database connection; */
    +
    +  db = pParse->db;
    +  if( pParse->nErr || db->mallocFailed ) return;
    +  pNew = pParse->pNewTable;
    +  assert( pNew );
    +
    +  assert( sqlite3BtreeHoldsAllMutexes(db) );
    +  iDb = sqlite3SchemaToIndex(db, pNew->pSchema);
    +  zDb = db->aDb[iDb].zName;
    +  zTab = &pNew->zName[16];  /* Skip the "sqlite_altertab_" prefix on the name */
    +  pCol = &pNew->aCol[pNew->nCol-1];
    +  pDflt = pCol->pDflt;
    +  pTab = sqlite3FindTable(db, zTab, zDb);
    +  assert( pTab );
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  /* Invoke the authorization callback. */
    +  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
    +    return;
    +  }
    +#endif
    +
    +  /* If the default value for the new column was specified with a 
    +  ** literal NULL, then set pDflt to 0. This simplifies checking
    +  ** for an SQL NULL default below.
    +  */
    +  if( pDflt && pDflt->op==TK_NULL ){
    +    pDflt = 0;
    +  }
    +
    +  /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.
    +  ** If there is a NOT NULL constraint, then the default value for the
    +  ** column must not be NULL.
    +  */
    +  if( pCol->isPrimKey ){
    +    sqlite3ErrorMsg(pParse, "Cannot add a PRIMARY KEY column");
    +    return;
    +  }
    +  if( pNew->pIndex ){
    +    sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column");
    +    return;
    +  }
    +  if( (db->flags&SQLITE_ForeignKeys) && pNew->pFKey && pDflt ){
    +    sqlite3ErrorMsg(pParse, 
    +        "Cannot add a REFERENCES column with non-NULL default value");
    +    return;
    +  }
    +  if( pCol->notNull && !pDflt ){
    +    sqlite3ErrorMsg(pParse, 
    +        "Cannot add a NOT NULL column with default value NULL");
    +    return;
    +  }
    +
    +  /* Ensure the default expression is something that sqlite3ValueFromExpr()
    +  ** can handle (i.e. not CURRENT_TIME etc.)
    +  */
    +  if( pDflt ){
    +    sqlite3_value *pVal;
    +    if( sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_NONE, &pVal) ){
    +      db->mallocFailed = 1;
    +      return;
    +    }
    +    if( !pVal ){
    +      sqlite3ErrorMsg(pParse, "Cannot add a column with non-constant default");
    +      return;
    +    }
    +    sqlite3ValueFree(pVal);
    +  }
    +
    +  /* Modify the CREATE TABLE statement. */
    +  zCol = sqlite3DbStrNDup(db, (char*)pColDef->z, pColDef->n);
    +  if( zCol ){
    +    char *zEnd = &zCol[pColDef->n-1];
    +    while( zEnd>zCol && (*zEnd==';' || sqlite3Isspace(*zEnd)) ){
    +      *zEnd-- = '\0';
    +    }
    +    sqlite3NestedParse(pParse, 
    +        "UPDATE \"%w\".%s SET "
    +          "sql = substr(sql,1,%d) || ', ' || %Q || substr(sql,%d) "
    +        "WHERE type = 'table' AND name = %Q", 
    +      zDb, SCHEMA_TABLE(iDb), pNew->addColOffset, zCol, pNew->addColOffset+1,
    +      zTab
    +    );
    +    sqlite3DbFree(db, zCol);
    +  }
    +
    +  /* If the default value of the new column is NULL, then set the file
    +  ** format to 2. If the default value of the new column is not NULL,
    +  ** the file format becomes 3.
    +  */
    +  sqlite3MinimumFileFormat(pParse, iDb, pDflt ? 3 : 2);
    +
    +  /* Reload the schema of the modified table. */
    +  reloadTableSchema(pParse, pTab, pTab->zName);
    +}
    +
    +/*
    +** This function is called by the parser after the table-name in
    +** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument 
    +** pSrc is the full-name of the table being altered.
    +**
    +** This routine makes a (partial) copy of the Table structure
    +** for the table being altered and sets Parse.pNewTable to point
    +** to it. Routines called by the parser as the column definition
    +** is parsed (i.e. sqlite3AddColumn()) add the new Column data to 
    +** the copy. The copy of the Table structure is deleted by tokenize.c 
    +** after parsing is finished.
    +**
    +** Routine sqlite3AlterFinishAddColumn() will be called to complete
    +** coding the "ALTER TABLE ... ADD" statement.
    +*/
    +SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
    +  Table *pNew;
    +  Table *pTab;
    +  Vdbe *v;
    +  int iDb;
    +  int i;
    +  int nAlloc;
    +  sqlite3 *db = pParse->db;
    +
    +  /* Look up the table being altered. */
    +  assert( pParse->pNewTable==0 );
    +  assert( sqlite3BtreeHoldsAllMutexes(db) );
    +  if( db->mallocFailed ) goto exit_begin_add_column;
    +  pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
    +  if( !pTab ) goto exit_begin_add_column;
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( IsVirtual(pTab) ){
    +    sqlite3ErrorMsg(pParse, "virtual tables may not be altered");
    +    goto exit_begin_add_column;
    +  }
    +#endif
    +
    +  /* Make sure this is not an attempt to ALTER a view. */
    +  if( pTab->pSelect ){
    +    sqlite3ErrorMsg(pParse, "Cannot add a column to a view");
    +    goto exit_begin_add_column;
    +  }
    +
    +  assert( pTab->addColOffset>0 );
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +
    +  /* Put a copy of the Table struct in Parse.pNewTable for the
    +  ** sqlite3AddColumn() function and friends to modify.  But modify
    +  ** the name by adding an "sqlite_altertab_" prefix.  By adding this
    +  ** prefix, we insure that the name will not collide with an existing
    +  ** table because user table are not allowed to have the "sqlite_"
    +  ** prefix on their name.
    +  */
    +  pNew = (Table*)sqlite3DbMallocZero(db, sizeof(Table));
    +  if( !pNew ) goto exit_begin_add_column;
    +  pParse->pNewTable = pNew;
    +  pNew->nRef = 1;
    +  pNew->dbMem = pTab->dbMem;
    +  pNew->nCol = pTab->nCol;
    +  assert( pNew->nCol>0 );
    +  nAlloc = (((pNew->nCol-1)/8)*8)+8;
    +  assert( nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8 );
    +  pNew->aCol = (Column*)sqlite3DbMallocZero(db, sizeof(Column)*nAlloc);
    +  pNew->zName = sqlite3MPrintf(db, "sqlite_altertab_%s", pTab->zName);
    +  if( !pNew->aCol || !pNew->zName ){
    +    db->mallocFailed = 1;
    +    goto exit_begin_add_column;
    +  }
    +  memcpy(pNew->aCol, pTab->aCol, sizeof(Column)*pNew->nCol);
    +  for(i=0; i<pNew->nCol; i++){
    +    Column *pCol = &pNew->aCol[i];
    +    pCol->zName = sqlite3DbStrDup(db, pCol->zName);
    +    pCol->zColl = 0;
    +    pCol->zType = 0;
    +    pCol->pDflt = 0;
    +    pCol->zDflt = 0;
    +  }
    +  pNew->pSchema = db->aDb[iDb].pSchema;
    +  pNew->addColOffset = pTab->addColOffset;
    +  pNew->nRef = 1;
    +
    +  /* Begin a transaction and increment the schema cookie.  */
    +  sqlite3BeginWriteOperation(pParse, 0, iDb);
    +  v = sqlite3GetVdbe(pParse);
    +  if( !v ) goto exit_begin_add_column;
    +  sqlite3ChangeCookie(pParse, iDb);
    +
    +exit_begin_add_column:
    +  sqlite3SrcListDelete(db, pSrc);
    +  return;
    +}
    +#endif  /* SQLITE_ALTER_TABLE */
    +
    +/************** End of alter.c ***********************************************/
    +/************** Begin file analyze.c *****************************************/
    +/*
    +** 2005 July 8
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code associated with the ANALYZE command.
    +**
    +** @(#) $Id: analyze.c,v 1.52 2009/04/16 17:45:48 drh Exp $
    +*/
    +#ifndef SQLITE_OMIT_ANALYZE
    +
    +/*
    +** This routine generates code that opens the sqlite_stat1 table for
    +** writing with cursor iStatCur. If the library was built with the
    +** SQLITE_ENABLE_STAT2 macro defined, then the sqlite_stat2 table is
    +** opened for writing using cursor (iStatCur+1)
    +**
    +** If the sqlite_stat1 tables does not previously exist, it is created.
    +** Similarly, if the sqlite_stat2 table does not exist and the library
    +** is compiled with SQLITE_ENABLE_STAT2 defined, it is created. 
    +**
    +** Argument zWhere may be a pointer to a buffer containing a table name,
    +** or it may be a NULL pointer. If it is not NULL, then all entries in
    +** the sqlite_stat1 and (if applicable) sqlite_stat2 tables associated
    +** with the named table are deleted. If zWhere==0, then code is generated
    +** to delete all stat table entries.
    +*/
    +static void openStatTable(
    +  Parse *pParse,          /* Parsing context */
    +  int iDb,                /* The database we are looking in */
    +  int iStatCur,           /* Open the sqlite_stat1 table on this cursor */
    +  const char *zWhere      /* Delete entries associated with this table */
    +){
    +  static struct {
    +    const char *zName;
    +    const char *zCols;
    +  } aTable[] = {
    +    { "sqlite_stat1", "tbl,idx,stat" },
    +#ifdef SQLITE_ENABLE_STAT2
    +    { "sqlite_stat2", "tbl,idx,sampleno,sample" },
    +#endif
    +  };
    +
    +  int aRoot[] = {0, 0};
    +  u8 aCreateTbl[] = {0, 0};
    +
    +  int i;
    +  sqlite3 *db = pParse->db;
    +  Db *pDb;
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  if( v==0 ) return;
    +  assert( sqlite3BtreeHoldsAllMutexes(db) );
    +  assert( sqlite3VdbeDb(v)==db );
    +  pDb = &db->aDb[iDb];
    +
    +  for(i=0; i<ArraySize(aTable); i++){
    +    const char *zTab = aTable[i].zName;
    +    Table *pStat;
    +    if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
    +      /* The sqlite_stat[12] table does not exist. Create it. Note that a 
    +      ** side-effect of the CREATE TABLE statement is to leave the rootpage 
    +      ** of the new table in register pParse->regRoot. This is important 
    +      ** because the OpenWrite opcode below will be needing it. */
    +      sqlite3NestedParse(pParse,
    +          "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
    +      );
    +      aRoot[i] = pParse->regRoot;
    +      aCreateTbl[i] = 1;
    +    }else{
    +      /* The table already exists. If zWhere is not NULL, delete all entries 
    +      ** associated with the table zWhere. If zWhere is NULL, delete the
    +      ** entire contents of the table. */
    +      aRoot[i] = pStat->tnum;
    +      sqlite3TableLock(pParse, iDb, aRoot[i], 1, zTab);
    +      if( zWhere ){
    +        sqlite3NestedParse(pParse,
    +           "DELETE FROM %Q.%s WHERE tbl=%Q", pDb->zName, zTab, zWhere
    +        );
    +      }else{
    +        /* The sqlite_stat[12] table already exists.  Delete all rows. */
    +        sqlite3VdbeAddOp2(v, OP_Clear, aRoot[i], iDb);
    +      }
    +    }
    +  }
    +
    +  /* Open the sqlite_stat[12] tables for writing. */
    +  for(i=0; i<ArraySize(aTable); i++){
    +    sqlite3VdbeAddOp3(v, OP_OpenWrite, iStatCur+i, aRoot[i], iDb);
    +    sqlite3VdbeChangeP4(v, -1, (char *)3, P4_INT32);
    +    sqlite3VdbeChangeP5(v, aCreateTbl[i]);
    +  }
    +}
    +
    +/*
    +** Generate code to do an analysis of all indices associated with
    +** a single table.
    +*/
    +static void analyzeOneTable(
    +  Parse *pParse,   /* Parser context */
    +  Table *pTab,     /* Table whose indices are to be analyzed */
    +  int iStatCur,    /* Index of VdbeCursor that writes the sqlite_stat1 table */
    +  int iMem         /* Available memory locations begin here */
    +){
    +  sqlite3 *db = pParse->db;    /* Database handle */
    +  Index *pIdx;                 /* An index to being analyzed */
    +  int iIdxCur;                 /* Cursor open on index being analyzed */
    +  Vdbe *v;                     /* The virtual machine being built up */
    +  int i;                       /* Loop counter */
    +  int topOfLoop;               /* The top of the loop */
    +  int endOfLoop;               /* The end of the loop */
    +  int addr;                    /* The address of an instruction */
    +  int iDb;                     /* Index of database containing pTab */
    +  int regTabname = iMem++;     /* Register containing table name */
    +  int regIdxname = iMem++;     /* Register containing index name */
    +  int regSampleno = iMem++;    /* Register containing next sample number */
    +  int regCol = iMem++;         /* Content of a column analyzed table */
    +  int regRec = iMem++;         /* Register holding completed record */
    +  int regTemp = iMem++;        /* Temporary use register */
    +  int regRowid = iMem++;       /* Rowid for the inserted record */
    +
    +#ifdef SQLITE_ENABLE_STAT2
    +  int regTemp2 = iMem++;       /* Temporary use register */
    +  int regSamplerecno = iMem++; /* Index of next sample to record */
    +  int regRecno = iMem++;       /* Current sample index */
    +  int regLast = iMem++;        /* Index of last sample to record */
    +  int regFirst = iMem++;       /* Index of first sample to record */
    +#endif
    +
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 || NEVER(pTab==0) || pTab->pIndex==0 ){
    +    /* Do no analysis for tables that have no indices */
    +    return;
    +  }
    +  assert( sqlite3BtreeHoldsAllMutexes(db) );
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  assert( iDb>=0 );
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
    +      db->aDb[iDb].zName ) ){
    +    return;
    +  }
    +#endif
    +
    +  /* Establish a read-lock on the table at the shared-cache level. */
    +  sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
    +
    +  iIdxCur = pParse->nTab++;
    +  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +    int nCol = pIdx->nColumn;
    +    KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    +
    +    if( iMem+1+(nCol*2)>pParse->nMem ){
    +      pParse->nMem = iMem+1+(nCol*2);
    +    }
    +
    +    /* Open a cursor to the index to be analyzed. */
    +    assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );
    +    sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb,
    +        (char *)pKey, P4_KEYINFO_HANDOFF);
    +    VdbeComment((v, "%s", pIdx->zName));
    +
    +    /* Populate the registers containing the table and index names. */
    +    if( pTab->pIndex==pIdx ){
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
    +    }
    +    sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);
    +
    +#ifdef SQLITE_ENABLE_STAT2
    +
    +    /* If this iteration of the loop is generating code to analyze the
    +    ** first index in the pTab->pIndex list, then register regLast has
    +    ** not been populated. In this case populate it now.  */
    +    if( pTab->pIndex==pIdx ){
    +      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES, regSamplerecno);
    +      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES*2-1, regTemp);
    +      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES*2, regTemp2);
    +
    +      sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regLast);
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regFirst);
    +      addr = sqlite3VdbeAddOp3(v, OP_Lt, regSamplerecno, 0, regLast);
    +      sqlite3VdbeAddOp3(v, OP_Divide, regTemp2, regLast, regFirst);
    +      sqlite3VdbeAddOp3(v, OP_Multiply, regLast, regTemp, regLast);
    +      sqlite3VdbeAddOp2(v, OP_AddImm, regLast, SQLITE_INDEX_SAMPLES*2-2);
    +      sqlite3VdbeAddOp3(v, OP_Divide,  regTemp2, regLast, regLast);
    +      sqlite3VdbeJumpHere(v, addr);
    +    }
    +
    +    /* Zero the regSampleno and regRecno registers. */
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regSampleno);
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRecno);
    +    sqlite3VdbeAddOp2(v, OP_Copy, regFirst, regSamplerecno);
    +#endif
    +
    +    /* The block of memory cells initialized here is used as follows.
    +    **
    +    **    iMem:                
    +    **        The total number of rows in the table.
    +    **
    +    **    iMem+1 .. iMem+nCol: 
    +    **        Number of distinct entries in index considering the 
    +    **        left-most N columns only, where N is between 1 and nCol, 
    +    **        inclusive.
    +    **
    +    **    iMem+nCol+1 .. Mem+2*nCol:  
    +    **        Previous value of indexed columns, from left to right.
    +    **
    +    ** Cells iMem through iMem+nCol are initialized to 0. The others are 
    +    ** initialized to contain an SQL NULL.
    +    */
    +    for(i=0; i<=nCol; i++){
    +      sqlite3VdbeAddOp2(v, OP_Integer, 0, iMem+i);
    +    }
    +    for(i=0; i<nCol; i++){
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, iMem+nCol+i+1);
    +    }
    +
    +    /* Start the analysis loop. This loop runs through all the entries in
    +    ** the index b-tree.  */
    +    endOfLoop = sqlite3VdbeMakeLabel(v);
    +    sqlite3VdbeAddOp2(v, OP_Rewind, iIdxCur, endOfLoop);
    +    topOfLoop = sqlite3VdbeCurrentAddr(v);
    +    sqlite3VdbeAddOp2(v, OP_AddImm, iMem, 1);
    +
    +    for(i=0; i<nCol; i++){
    +      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regCol);
    +#ifdef SQLITE_ENABLE_STAT2
    +      if( i==0 ){
    +        /* Check if the record that cursor iIdxCur points to contains a
    +        ** value that should be stored in the sqlite_stat2 table. If so,
    +        ** store it.  */
    +        int ne = sqlite3VdbeAddOp3(v, OP_Ne, regRecno, 0, regSamplerecno);
    +        assert( regTabname+1==regIdxname 
    +             && regTabname+2==regSampleno
    +             && regTabname+3==regCol
    +        );
    +        sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
    +        sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 4, regRec, "aaab", 0);
    +        sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regRowid);
    +        sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regRec, regRowid);
    +
    +        /* Calculate new values for regSamplerecno and regSampleno.
    +        **
    +        **   sampleno = sampleno + 1
    +        **   samplerecno = samplerecno+(remaining records)/(remaining samples)
    +        */
    +        sqlite3VdbeAddOp2(v, OP_AddImm, regSampleno, 1);
    +        sqlite3VdbeAddOp3(v, OP_Subtract, regRecno, regLast, regTemp);
    +        sqlite3VdbeAddOp2(v, OP_AddImm, regTemp, -1);
    +        sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES, regTemp2);
    +        sqlite3VdbeAddOp3(v, OP_Subtract, regSampleno, regTemp2, regTemp2);
    +        sqlite3VdbeAddOp3(v, OP_Divide, regTemp2, regTemp, regTemp);
    +        sqlite3VdbeAddOp3(v, OP_Add, regSamplerecno, regTemp, regSamplerecno);
    +
    +        sqlite3VdbeJumpHere(v, ne);
    +        sqlite3VdbeAddOp2(v, OP_AddImm, regRecno, 1);
    +      }
    +#endif
    +
    +      sqlite3VdbeAddOp3(v, OP_Ne, regCol, 0, iMem+nCol+i+1);
    +      /**** TODO:  add collating sequence *****/
    +      sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
    +    }
    +    if( db->mallocFailed ){
    +      /* If a malloc failure has occurred, then the result of the expression 
    +      ** passed as the second argument to the call to sqlite3VdbeJumpHere() 
    +      ** below may be negative. Which causes an assert() to fail (or an
    +      ** out-of-bounds write if SQLITE_DEBUG is not defined).  */
    +      return;
    +    }
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, endOfLoop);
    +    for(i=0; i<nCol; i++){
    +      sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-(nCol*2));
    +      sqlite3VdbeAddOp2(v, OP_AddImm, iMem+i+1, 1);
    +      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, iMem+nCol+i+1);
    +    }
    +
    +    /* End of the analysis loop. */
    +    sqlite3VdbeResolveLabel(v, endOfLoop);
    +    sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, topOfLoop);
    +    sqlite3VdbeAddOp1(v, OP_Close, iIdxCur);
    +
    +    /* Store the results in sqlite_stat1.
    +    **
    +    ** The result is a single row of the sqlite_stat1 table.  The first
    +    ** two columns are the names of the table and index.  The third column
    +    ** is a string composed of a list of integer statistics about the
    +    ** index.  The first integer in the list is the total number of entries
    +    ** in the index.  There is one additional integer in the list for each
    +    ** column of the table.  This additional integer is a guess of how many
    +    ** rows of the table the index will select.  If D is the count of distinct
    +    ** values and K is the total number of rows, then the integer is computed
    +    ** as:
    +    **
    +    **        I = (K+D-1)/D
    +    **
    +    ** If K==0 then no entry is made into the sqlite_stat1 table.  
    +    ** If K>0 then it is always the case the D>0 so division by zero
    +    ** is never possible.
    +    */
    +    addr = sqlite3VdbeAddOp1(v, OP_IfNot, iMem);
    +    sqlite3VdbeAddOp2(v, OP_SCopy, iMem, regSampleno);
    +    for(i=0; i<nCol; i++){
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, regTemp, 0, " ", 0);
    +      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regSampleno, regSampleno);
    +      sqlite3VdbeAddOp3(v, OP_Add, iMem, iMem+i+1, regTemp);
    +      sqlite3VdbeAddOp2(v, OP_AddImm, regTemp, -1);
    +      sqlite3VdbeAddOp3(v, OP_Divide, iMem+i+1, regTemp, regTemp);
    +      sqlite3VdbeAddOp1(v, OP_ToInt, regTemp);
    +      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regSampleno, regSampleno);
    +    }
    +    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regRec, "aaa", 0);
    +    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regRowid);
    +    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regRec, regRowid);
    +    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +    sqlite3VdbeJumpHere(v, addr);
    +  }
    +}
    +
    +/*
    +** Generate code that will cause the most recent index analysis to
    +** be laoded into internal hash tables where is can be used.
    +*/
    +static void loadAnalysis(Parse *pParse, int iDb){
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    sqlite3VdbeAddOp1(v, OP_LoadAnalysis, iDb);
    +  }
    +}
    +
    +/*
    +** Generate code that will do an analysis of an entire database
    +*/
    +static void analyzeDatabase(Parse *pParse, int iDb){
    +  sqlite3 *db = pParse->db;
    +  Schema *pSchema = db->aDb[iDb].pSchema;    /* Schema of database iDb */
    +  HashElem *k;
    +  int iStatCur;
    +  int iMem;
    +
    +  sqlite3BeginWriteOperation(pParse, 0, iDb);
    +  iStatCur = pParse->nTab;
    +  pParse->nTab += 2;
    +  openStatTable(pParse, iDb, iStatCur, 0);
    +  iMem = pParse->nMem+1;
    +  for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){
    +    Table *pTab = (Table*)sqliteHashData(k);
    +    analyzeOneTable(pParse, pTab, iStatCur, iMem);
    +  }
    +  loadAnalysis(pParse, iDb);
    +}
    +
    +/*
    +** Generate code that will do an analysis of a single table in
    +** a database.
    +*/
    +static void analyzeTable(Parse *pParse, Table *pTab){
    +  int iDb;
    +  int iStatCur;
    +
    +  assert( pTab!=0 );
    +  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +  sqlite3BeginWriteOperation(pParse, 0, iDb);
    +  iStatCur = pParse->nTab;
    +  pParse->nTab += 2;
    +  openStatTable(pParse, iDb, iStatCur, pTab->zName);
    +  analyzeOneTable(pParse, pTab, iStatCur, pParse->nMem+1);
    +  loadAnalysis(pParse, iDb);
    +}
    +
    +/*
    +** Generate code for the ANALYZE command.  The parser calls this routine
    +** when it recognizes an ANALYZE command.
    +**
    +**        ANALYZE                            -- 1
    +**        ANALYZE  <database>                -- 2
    +**        ANALYZE  ?<database>.?<tablename>  -- 3
    +**
    +** Form 1 causes all indices in all attached databases to be analyzed.
    +** Form 2 analyzes all indices the single database named.
    +** Form 3 analyzes all indices associated with the named table.
    +*/
    +SQLITE_PRIVATE void sqlite3Analyze(Parse *pParse, Token *pName1, Token *pName2){
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +  int i;
    +  char *z, *zDb;
    +  Table *pTab;
    +  Token *pTableName;
    +
    +  /* Read the database schema. If an error occurs, leave an error message
    +  ** and code in pParse and return NULL. */
    +  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    return;
    +  }
    +
    +  assert( pName2!=0 || pName1==0 );
    +  if( pName1==0 ){
    +    /* Form 1:  Analyze everything */
    +    for(i=0; i<db->nDb; i++){
    +      if( i==1 ) continue;  /* Do not analyze the TEMP database */
    +      analyzeDatabase(pParse, i);
    +    }
    +  }else if( pName2->n==0 ){
    +    /* Form 2:  Analyze the database or table named */
    +    iDb = sqlite3FindDb(db, pName1);
    +    if( iDb>=0 ){
    +      analyzeDatabase(pParse, iDb);
    +    }else{
    +      z = sqlite3NameFromToken(db, pName1);
    +      if( z ){
    +        pTab = sqlite3LocateTable(pParse, 0, z, 0);
    +        sqlite3DbFree(db, z);
    +        if( pTab ){
    +          analyzeTable(pParse, pTab);
    +        }
    +      }
    +    }
    +  }else{
    +    /* Form 3: Analyze the fully qualified table name */
    +    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pTableName);
    +    if( iDb>=0 ){
    +      zDb = db->aDb[iDb].zName;
    +      z = sqlite3NameFromToken(db, pTableName);
    +      if( z ){
    +        pTab = sqlite3LocateTable(pParse, 0, z, zDb);
    +        sqlite3DbFree(db, z);
    +        if( pTab ){
    +          analyzeTable(pParse, pTab);
    +        }
    +      }
    +    }   
    +  }
    +}
    +
    +/*
    +** Used to pass information from the analyzer reader through to the
    +** callback routine.
    +*/
    +typedef struct analysisInfo analysisInfo;
    +struct analysisInfo {
    +  sqlite3 *db;
    +  const char *zDatabase;
    +};
    +
    +/*
    +** This callback is invoked once for each index when reading the
    +** sqlite_stat1 table.  
    +**
    +**     argv[0] = name of the index
    +**     argv[1] = results of analysis - on integer for each column
    +*/
    +static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
    +  analysisInfo *pInfo = (analysisInfo*)pData;
    +  Index *pIndex;
    +  int i, c;
    +  unsigned int v;
    +  const char *z;
    +
    +  assert( argc==2 );
    +  UNUSED_PARAMETER2(NotUsed, argc);
    +
    +  if( argv==0 || argv[0]==0 || argv[1]==0 ){
    +    return 0;
    +  }
    +  pIndex = sqlite3FindIndex(pInfo->db, argv[0], pInfo->zDatabase);
    +  if( pIndex==0 ){
    +    return 0;
    +  }
    +  z = argv[1];
    +  for(i=0; *z && i<=pIndex->nColumn; i++){
    +    v = 0;
    +    while( (c=z[0])>='0' && c<='9' ){
    +      v = v*10 + c - '0';
    +      z++;
    +    }
    +    pIndex->aiRowEst[i] = v;
    +    if( *z==' ' ) z++;
    +  }
    +  return 0;
    +}
    +
    +/*
    +** If the Index.aSample variable is not NULL, delete the aSample[] array
    +** and its contents.
    +*/
    +SQLITE_PRIVATE void sqlite3DeleteIndexSamples(Index *pIdx){
    +#ifdef SQLITE_ENABLE_STAT2
    +  if( pIdx->aSample ){
    +    int j;
    +    sqlite3 *dbMem = pIdx->pTable->dbMem;
    +    for(j=0; j<SQLITE_INDEX_SAMPLES; j++){
    +      IndexSample *p = &pIdx->aSample[j];
    +      if( p->eType==SQLITE_TEXT || p->eType==SQLITE_BLOB ){
    +        sqlite3DbFree(pIdx->pTable->dbMem, p->u.z);
    +      }
    +    }
    +    sqlite3DbFree(dbMem, pIdx->aSample);
    +    pIdx->aSample = 0;
    +  }
    +#else
    +  UNUSED_PARAMETER(pIdx);
    +#endif
    +}
    +
    +/*
    +** Load the content of the sqlite_stat1 and sqlite_stat2 tables. The
    +** contents of sqlite_stat1 are used to populate the Index.aiRowEst[]
    +** arrays. The contents of sqlite_stat2 are used to populate the
    +** Index.aSample[] arrays.
    +**
    +** If the sqlite_stat1 table is not present in the database, SQLITE_ERROR
    +** is returned. In this case, even if SQLITE_ENABLE_STAT2 was defined 
    +** during compilation and the sqlite_stat2 table is present, no data is 
    +** read from it.
    +**
    +** If SQLITE_ENABLE_STAT2 was defined during compilation and the 
    +** sqlite_stat2 table is not present in the database, SQLITE_ERROR is
    +** returned. However, in this case, data is read from the sqlite_stat1
    +** table (if it is present) before returning.
    +**
    +** If an OOM error occurs, this function always sets db->mallocFailed.
    +** This means if the caller does not care about other errors, the return
    +** code may be ignored.
    +*/
    +SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
    +  analysisInfo sInfo;
    +  HashElem *i;
    +  char *zSql;
    +  int rc;
    +
    +  assert( iDb>=0 && iDb<db->nDb );
    +  assert( db->aDb[iDb].pBt!=0 );
    +  assert( sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );
    +
    +  /* Clear any prior statistics */
    +  for(i=sqliteHashFirst(&db->aDb[iDb].pSchema->idxHash);i;i=sqliteHashNext(i)){
    +    Index *pIdx = sqliteHashData(i);
    +    sqlite3DefaultRowEst(pIdx);
    +    sqlite3DeleteIndexSamples(pIdx);
    +  }
    +
    +  /* Check to make sure the sqlite_stat1 table exists */
    +  sInfo.db = db;
    +  sInfo.zDatabase = db->aDb[iDb].zName;
    +  if( sqlite3FindTable(db, "sqlite_stat1", sInfo.zDatabase)==0 ){
    +    return SQLITE_ERROR;
    +  }
    +
    +  /* Load new statistics out of the sqlite_stat1 table */
    +  zSql = sqlite3MPrintf(db, 
    +      "SELECT idx, stat FROM %Q.sqlite_stat1", sInfo.zDatabase);
    +  if( zSql==0 ){
    +    rc = SQLITE_NOMEM;
    +  }else{
    +    (void)sqlite3SafetyOff(db);
    +    rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0);
    +    (void)sqlite3SafetyOn(db);
    +    sqlite3DbFree(db, zSql);
    +  }
    +
    +
    +  /* Load the statistics from the sqlite_stat2 table. */
    +#ifdef SQLITE_ENABLE_STAT2
    +  if( rc==SQLITE_OK && !sqlite3FindTable(db, "sqlite_stat2", sInfo.zDatabase) ){
    +    rc = SQLITE_ERROR;
    +  }
    +  if( rc==SQLITE_OK ){
    +    sqlite3_stmt *pStmt = 0;
    +
    +    zSql = sqlite3MPrintf(db, 
    +        "SELECT idx,sampleno,sample FROM %Q.sqlite_stat2", sInfo.zDatabase);
    +    if( !zSql ){
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      (void)sqlite3SafetyOff(db);
    +      rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
    +      (void)sqlite3SafetyOn(db);
    +      sqlite3DbFree(db, zSql);
    +    }
    +
    +    if( rc==SQLITE_OK ){
    +      (void)sqlite3SafetyOff(db);
    +      while( sqlite3_step(pStmt)==SQLITE_ROW ){
    +        char *zIndex = (char *)sqlite3_column_text(pStmt, 0);
    +        Index *pIdx = sqlite3FindIndex(db, zIndex, sInfo.zDatabase);
    +        if( pIdx ){
    +          int iSample = sqlite3_column_int(pStmt, 1);
    +          sqlite3 *dbMem = pIdx->pTable->dbMem;
    +          assert( dbMem==db || dbMem==0 );
    +          if( iSample<SQLITE_INDEX_SAMPLES && iSample>=0 ){
    +            int eType = sqlite3_column_type(pStmt, 2);
    +
    +            if( pIdx->aSample==0 ){
    +              static const int sz = sizeof(IndexSample)*SQLITE_INDEX_SAMPLES;
    +              pIdx->aSample = (IndexSample *)sqlite3DbMallocZero(dbMem, sz);
    +              if( pIdx->aSample==0 ){
    +                db->mallocFailed = 1;
    +                break;
    +              }
    +            }
    +
    +            assert( pIdx->aSample );
    +            {
    +              IndexSample *pSample = &pIdx->aSample[iSample];
    +              pSample->eType = (u8)eType;
    +              if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
    +                pSample->u.r = sqlite3_column_double(pStmt, 2);
    +              }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){
    +                const char *z = (const char *)(
    +                    (eType==SQLITE_BLOB) ?
    +                    sqlite3_column_blob(pStmt, 2):
    +                    sqlite3_column_text(pStmt, 2)
    +                );
    +                int n = sqlite3_column_bytes(pStmt, 2);
    +                if( n>24 ){
    +                  n = 24;
    +                }
    +                pSample->nByte = (u8)n;
    +                pSample->u.z = sqlite3DbMallocRaw(dbMem, n);
    +                if( pSample->u.z ){
    +                  memcpy(pSample->u.z, z, n);
    +                }else{
    +                  db->mallocFailed = 1;
    +                  break;
    +                }
    +              }
    +            }
    +          }
    +        }
    +      }
    +      rc = sqlite3_finalize(pStmt);
    +      (void)sqlite3SafetyOn(db);
    +    }
    +  }
    +#endif
    +
    +  if( rc==SQLITE_NOMEM ){
    +    db->mallocFailed = 1;
    +  }
    +  return rc;
    +}
    +
    +
    +#endif /* SQLITE_OMIT_ANALYZE */
    +
    +/************** End of analyze.c *********************************************/
    +/************** Begin file attach.c ******************************************/
    +/*
    +** 2003 April 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to implement the ATTACH and DETACH commands.
    +**
    +** $Id: attach.c,v 1.93 2009/05/31 21:21:41 drh Exp $
    +*/
    +
    +#ifndef SQLITE_OMIT_ATTACH
    +/*
    +** Resolve an expression that was part of an ATTACH or DETACH statement. This
    +** is slightly different from resolving a normal SQL expression, because simple
    +** identifiers are treated as strings, not possible column names or aliases.
    +**
    +** i.e. if the parser sees:
    +**
    +**     ATTACH DATABASE abc AS def
    +**
    +** it treats the two expressions as literal strings 'abc' and 'def' instead of
    +** looking for columns of the same name.
    +**
    +** This only applies to the root node of pExpr, so the statement:
    +**
    +**     ATTACH DATABASE abc||def AS 'db2'
    +**
    +** will fail because neither abc or def can be resolved.
    +*/
    +static int resolveAttachExpr(NameContext *pName, Expr *pExpr)
    +{
    +  int rc = SQLITE_OK;
    +  if( pExpr ){
    +    if( pExpr->op!=TK_ID ){
    +      rc = sqlite3ResolveExprNames(pName, pExpr);
    +      if( rc==SQLITE_OK && !sqlite3ExprIsConstant(pExpr) ){
    +        sqlite3ErrorMsg(pName->pParse, "invalid name: \"%s\"", pExpr->u.zToken);
    +        return SQLITE_ERROR;
    +      }
    +    }else{
    +      pExpr->op = TK_STRING;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** An SQL user-function registered to do the work of an ATTACH statement. The
    +** three arguments to the function come directly from an attach statement:
    +**
    +**     ATTACH DATABASE x AS y KEY z
    +**
    +**     SELECT sqlite_attach(x, y, z)
    +**
    +** If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the
    +** third argument.
    +*/
    +static void attachFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  int i;
    +  int rc = 0;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  const char *zName;
    +  const char *zFile;
    +  Db *aNew;
    +  char *zErrDyn = 0;
    +
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  zFile = (const char *)sqlite3_value_text(argv[0]);
    +  zName = (const char *)sqlite3_value_text(argv[1]);
    +  if( zFile==0 ) zFile = "";
    +  if( zName==0 ) zName = "";
    +
    +  /* Check for the following errors:
    +  **
    +  **     * Too many attached databases,
    +  **     * Transaction currently open
    +  **     * Specified database name already being used.
    +  */
    +  if( db->nDb>=db->aLimit[SQLITE_LIMIT_ATTACHED]+2 ){
    +    zErrDyn = sqlite3MPrintf(db, "too many attached databases - max %d", 
    +      db->aLimit[SQLITE_LIMIT_ATTACHED]
    +    );
    +    goto attach_error;
    +  }
    +  if( !db->autoCommit ){
    +    zErrDyn = sqlite3MPrintf(db, "cannot ATTACH database within transaction");
    +    goto attach_error;
    +  }
    +  for(i=0; i<db->nDb; i++){
    +    char *z = db->aDb[i].zName;
    +    assert( z && zName );
    +    if( sqlite3StrICmp(z, zName)==0 ){
    +      zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName);
    +      goto attach_error;
    +    }
    +  }
    +
    +  /* Allocate the new entry in the db->aDb[] array and initialise the schema
    +  ** hash tables.
    +  */
    +  if( db->aDb==db->aDbStatic ){
    +    aNew = sqlite3DbMallocRaw(db, sizeof(db->aDb[0])*3 );
    +    if( aNew==0 ) return;
    +    memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2);
    +  }else{
    +    aNew = sqlite3DbRealloc(db, db->aDb, sizeof(db->aDb[0])*(db->nDb+1) );
    +    if( aNew==0 ) return;
    +  }
    +  db->aDb = aNew;
    +  aNew = &db->aDb[db->nDb];
    +  memset(aNew, 0, sizeof(*aNew));
    +
    +  /* Open the database file. If the btree is successfully opened, use
    +  ** it to obtain the database schema. At this point the schema may
    +  ** or may not be initialised.
    +  */
    +  rc = sqlite3BtreeFactory(db, zFile, 0, SQLITE_DEFAULT_CACHE_SIZE,
    +                           db->openFlags | SQLITE_OPEN_MAIN_DB,
    +                           &aNew->pBt);
    +  db->nDb++;
    +  if( rc==SQLITE_CONSTRAINT ){
    +    rc = SQLITE_ERROR;
    +    zErrDyn = sqlite3MPrintf(db, "database is already attached");
    +  }else if( rc==SQLITE_OK ){
    +    Pager *pPager;
    +    aNew->pSchema = sqlite3SchemaGet(db, aNew->pBt);
    +    if( !aNew->pSchema ){
    +      rc = SQLITE_NOMEM;
    +    }else if( aNew->pSchema->file_format && aNew->pSchema->enc!=ENC(db) ){
    +      zErrDyn = sqlite3MPrintf(db, 
    +        "attached databases must use the same text encoding as main database");
    +      rc = SQLITE_ERROR;
    +    }
    +    pPager = sqlite3BtreePager(aNew->pBt);
    +    sqlite3PagerLockingMode(pPager, db->dfltLockMode);
    +    sqlite3PagerJournalMode(pPager, db->dfltJournalMode);
    +  }
    +  aNew->zName = sqlite3DbStrDup(db, zName);
    +  aNew->safety_level = 3;
    +
    +#if SQLITE_HAS_CODEC
    +  if( rc==SQLITE_OK ){
    +    extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
    +    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
    +    int nKey;
    +    char *zKey;
    +    int t = sqlite3_value_type(argv[2]);
    +    switch( t ){
    +      case SQLITE_INTEGER:
    +      case SQLITE_FLOAT:
    +        zErrDyn = sqlite3DbStrDup(db, "Invalid key value");
    +        rc = SQLITE_ERROR;
    +        break;
    +        
    +      case SQLITE_TEXT:
    +      case SQLITE_BLOB:
    +        nKey = sqlite3_value_bytes(argv[2]);
    +        zKey = (char *)sqlite3_value_blob(argv[2]);
    +        rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
    +        break;
    +
    +      case SQLITE_NULL:
    +        /* No key specified.  Use the key from the main database */
    +        sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
    +        rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
    +        break;
    +    }
    +  }
    +#endif
    +
    +  /* If the file was opened successfully, read the schema for the new database.
    +  ** If this fails, or if opening the file failed, then close the file and 
    +  ** remove the entry from the db->aDb[] array. i.e. put everything back the way
    +  ** we found it.
    +  */
    +  if( rc==SQLITE_OK ){
    +    (void)sqlite3SafetyOn(db);
    +    sqlite3BtreeEnterAll(db);
    +    rc = sqlite3Init(db, &zErrDyn);
    +    sqlite3BtreeLeaveAll(db);
    +    (void)sqlite3SafetyOff(db);
    +  }
    +  if( rc ){
    +    int iDb = db->nDb - 1;
    +    assert( iDb>=2 );
    +    if( db->aDb[iDb].pBt ){
    +      sqlite3BtreeClose(db->aDb[iDb].pBt);
    +      db->aDb[iDb].pBt = 0;
    +      db->aDb[iDb].pSchema = 0;
    +    }
    +    sqlite3ResetInternalSchema(db, 0);
    +    db->nDb = iDb;
    +    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
    +      db->mallocFailed = 1;
    +      sqlite3DbFree(db, zErrDyn);
    +      zErrDyn = sqlite3MPrintf(db, "out of memory");
    +    }else if( zErrDyn==0 ){
    +      zErrDyn = sqlite3MPrintf(db, "unable to open database: %s", zFile);
    +    }
    +    goto attach_error;
    +  }
    +  
    +  return;
    +
    +attach_error:
    +  /* Return an error if we get here */
    +  if( zErrDyn ){
    +    sqlite3_result_error(context, zErrDyn, -1);
    +    sqlite3DbFree(db, zErrDyn);
    +  }
    +  if( rc ) sqlite3_result_error_code(context, rc);
    +}
    +
    +/*
    +** An SQL user-function registered to do the work of an DETACH statement. The
    +** three arguments to the function come directly from a detach statement:
    +**
    +**     DETACH DATABASE x
    +**
    +**     SELECT sqlite_detach(x)
    +*/
    +static void detachFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  const char *zName = (const char *)sqlite3_value_text(argv[0]);
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  int i;
    +  Db *pDb = 0;
    +  char zErr[128];
    +
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  if( zName==0 ) zName = "";
    +  for(i=0; i<db->nDb; i++){
    +    pDb = &db->aDb[i];
    +    if( pDb->pBt==0 ) continue;
    +    if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
    +  }
    +
    +  if( i>=db->nDb ){
    +    sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
    +    goto detach_error;
    +  }
    +  if( i<2 ){
    +    sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
    +    goto detach_error;
    +  }
    +  if( !db->autoCommit ){
    +    sqlite3_snprintf(sizeof(zErr), zErr,
    +                     "cannot DETACH database within transaction");
    +    goto detach_error;
    +  }
    +  if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
    +    sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
    +    goto detach_error;
    +  }
    +
    +  sqlite3BtreeClose(pDb->pBt);
    +  pDb->pBt = 0;
    +  pDb->pSchema = 0;
    +  sqlite3ResetInternalSchema(db, 0);
    +  return;
    +
    +detach_error:
    +  sqlite3_result_error(context, zErr, -1);
    +}
    +
    +/*
    +** This procedure generates VDBE code for a single invocation of either the
    +** sqlite_detach() or sqlite_attach() SQL user functions.
    +*/
    +static void codeAttach(
    +  Parse *pParse,       /* The parser context */
    +  int type,            /* Either SQLITE_ATTACH or SQLITE_DETACH */
    +  FuncDef *pFunc,      /* FuncDef wrapper for detachFunc() or attachFunc() */
    +  Expr *pAuthArg,      /* Expression to pass to authorization callback */
    +  Expr *pFilename,     /* Name of database file */
    +  Expr *pDbname,       /* Name of the database to use internally */
    +  Expr *pKey           /* Database key for encryption extension */
    +){
    +  int rc;
    +  NameContext sName;
    +  Vdbe *v;
    +  sqlite3* db = pParse->db;
    +  int regArgs;
    +
    +  memset(&sName, 0, sizeof(NameContext));
    +  sName.pParse = pParse;
    +
    +  if( 
    +      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pFilename)) ||
    +      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pDbname)) ||
    +      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pKey))
    +  ){
    +    pParse->nErr++;
    +    goto attach_end;
    +  }
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  if( pAuthArg ){
    +    char *zAuthArg = pAuthArg->u.zToken;
    +    if( NEVER(zAuthArg==0) ){
    +      goto attach_end;
    +    }
    +    rc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0);
    +    if(rc!=SQLITE_OK ){
    +      goto attach_end;
    +    }
    +  }
    +#endif /* SQLITE_OMIT_AUTHORIZATION */
    +
    +
    +  v = sqlite3GetVdbe(pParse);
    +  regArgs = sqlite3GetTempRange(pParse, 4);
    +  sqlite3ExprCode(pParse, pFilename, regArgs);
    +  sqlite3ExprCode(pParse, pDbname, regArgs+1);
    +  sqlite3ExprCode(pParse, pKey, regArgs+2);
    +
    +  assert( v || db->mallocFailed );
    +  if( v ){
    +    sqlite3VdbeAddOp3(v, OP_Function, 0, regArgs+3-pFunc->nArg, regArgs+3);
    +    assert( pFunc->nArg==-1 || (pFunc->nArg&0xff)==pFunc->nArg );
    +    sqlite3VdbeChangeP5(v, (u8)(pFunc->nArg));
    +    sqlite3VdbeChangeP4(v, -1, (char *)pFunc, P4_FUNCDEF);
    +
    +    /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
    +    ** statement only). For DETACH, set it to false (expire all existing
    +    ** statements).
    +    */
    +    sqlite3VdbeAddOp1(v, OP_Expire, (type==SQLITE_ATTACH));
    +  }
    +  
    +attach_end:
    +  sqlite3ExprDelete(db, pFilename);
    +  sqlite3ExprDelete(db, pDbname);
    +  sqlite3ExprDelete(db, pKey);
    +}
    +
    +/*
    +** Called by the parser to compile a DETACH statement.
    +**
    +**     DETACH pDbname
    +*/
    +SQLITE_PRIVATE void sqlite3Detach(Parse *pParse, Expr *pDbname){
    +  static FuncDef detach_func = {
    +    1,                /* nArg */
    +    SQLITE_UTF8,      /* iPrefEnc */
    +    0,                /* flags */
    +    0,                /* pUserData */
    +    0,                /* pNext */
    +    detachFunc,       /* xFunc */
    +    0,                /* xStep */
    +    0,                /* xFinalize */
    +    "sqlite_detach",  /* zName */
    +    0                 /* pHash */
    +  };
    +  codeAttach(pParse, SQLITE_DETACH, &detach_func, pDbname, 0, 0, pDbname);
    +}
    +
    +/*
    +** Called by the parser to compile an ATTACH statement.
    +**
    +**     ATTACH p AS pDbname KEY pKey
    +*/
    +SQLITE_PRIVATE void sqlite3Attach(Parse *pParse, Expr *p, Expr *pDbname, Expr *pKey){
    +  static FuncDef attach_func = {
    +    3,                /* nArg */
    +    SQLITE_UTF8,      /* iPrefEnc */
    +    0,                /* flags */
    +    0,                /* pUserData */
    +    0,                /* pNext */
    +    attachFunc,       /* xFunc */
    +    0,                /* xStep */
    +    0,                /* xFinalize */
    +    "sqlite_attach",  /* zName */
    +    0                 /* pHash */
    +  };
    +  codeAttach(pParse, SQLITE_ATTACH, &attach_func, p, p, pDbname, pKey);
    +}
    +#endif /* SQLITE_OMIT_ATTACH */
    +
    +/*
    +** Initialize a DbFixer structure.  This routine must be called prior
    +** to passing the structure to one of the sqliteFixAAAA() routines below.
    +**
    +** The return value indicates whether or not fixation is required.  TRUE
    +** means we do need to fix the database references, FALSE means we do not.
    +*/
    +SQLITE_PRIVATE int sqlite3FixInit(
    +  DbFixer *pFix,      /* The fixer to be initialized */
    +  Parse *pParse,      /* Error messages will be written here */
    +  int iDb,            /* This is the database that must be used */
    +  const char *zType,  /* "view", "trigger", or "index" */
    +  const Token *pName  /* Name of the view, trigger, or index */
    +){
    +  sqlite3 *db;
    +
    +  if( NEVER(iDb<0) || iDb==1 ) return 0;
    +  db = pParse->db;
    +  assert( db->nDb>iDb );
    +  pFix->pParse = pParse;
    +  pFix->zDb = db->aDb[iDb].zName;
    +  pFix->zType = zType;
    +  pFix->pName = pName;
    +  return 1;
    +}
    +
    +/*
    +** The following set of routines walk through the parse tree and assign
    +** a specific database to all table references where the database name
    +** was left unspecified in the original SQL statement.  The pFix structure
    +** must have been initialized by a prior call to sqlite3FixInit().
    +**
    +** These routines are used to make sure that an index, trigger, or
    +** view in one database does not refer to objects in a different database.
    +** (Exception: indices, triggers, and views in the TEMP database are
    +** allowed to refer to anything.)  If a reference is explicitly made
    +** to an object in a different database, an error message is added to
    +** pParse->zErrMsg and these routines return non-zero.  If everything
    +** checks out, these routines return 0.
    +*/
    +SQLITE_PRIVATE int sqlite3FixSrcList(
    +  DbFixer *pFix,       /* Context of the fixation */
    +  SrcList *pList       /* The Source list to check and modify */
    +){
    +  int i;
    +  const char *zDb;
    +  struct SrcList_item *pItem;
    +
    +  if( NEVER(pList==0) ) return 0;
    +  zDb = pFix->zDb;
    +  for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
    +    if( pItem->zDatabase==0 ){
    +      pItem->zDatabase = sqlite3DbStrDup(pFix->pParse->db, zDb);
    +    }else if( sqlite3StrICmp(pItem->zDatabase,zDb)!=0 ){
    +      sqlite3ErrorMsg(pFix->pParse,
    +         "%s %T cannot reference objects in database %s",
    +         pFix->zType, pFix->pName, pItem->zDatabase);
    +      return 1;
    +    }
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
    +    if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
    +    if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
    +#endif
    +  }
    +  return 0;
    +}
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
    +SQLITE_PRIVATE int sqlite3FixSelect(
    +  DbFixer *pFix,       /* Context of the fixation */
    +  Select *pSelect      /* The SELECT statement to be fixed to one database */
    +){
    +  while( pSelect ){
    +    if( sqlite3FixExprList(pFix, pSelect->pEList) ){
    +      return 1;
    +    }
    +    if( sqlite3FixSrcList(pFix, pSelect->pSrc) ){
    +      return 1;
    +    }
    +    if( sqlite3FixExpr(pFix, pSelect->pWhere) ){
    +      return 1;
    +    }
    +    if( sqlite3FixExpr(pFix, pSelect->pHaving) ){
    +      return 1;
    +    }
    +    pSelect = pSelect->pPrior;
    +  }
    +  return 0;
    +}
    +SQLITE_PRIVATE int sqlite3FixExpr(
    +  DbFixer *pFix,     /* Context of the fixation */
    +  Expr *pExpr        /* The expression to be fixed to one database */
    +){
    +  while( pExpr ){
    +    if( ExprHasAnyProperty(pExpr, EP_TokenOnly) ) break;
    +    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +      if( sqlite3FixSelect(pFix, pExpr->x.pSelect) ) return 1;
    +    }else{
    +      if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
    +    }
    +    if( sqlite3FixExpr(pFix, pExpr->pRight) ){
    +      return 1;
    +    }
    +    pExpr = pExpr->pLeft;
    +  }
    +  return 0;
    +}
    +SQLITE_PRIVATE int sqlite3FixExprList(
    +  DbFixer *pFix,     /* Context of the fixation */
    +  ExprList *pList    /* The expression to be fixed to one database */
    +){
    +  int i;
    +  struct ExprList_item *pItem;
    +  if( pList==0 ) return 0;
    +  for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
    +    if( sqlite3FixExpr(pFix, pItem->pExpr) ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +SQLITE_PRIVATE int sqlite3FixTriggerStep(
    +  DbFixer *pFix,     /* Context of the fixation */
    +  TriggerStep *pStep /* The trigger step be fixed to one database */
    +){
    +  while( pStep ){
    +    if( sqlite3FixSelect(pFix, pStep->pSelect) ){
    +      return 1;
    +    }
    +    if( sqlite3FixExpr(pFix, pStep->pWhere) ){
    +      return 1;
    +    }
    +    if( sqlite3FixExprList(pFix, pStep->pExprList) ){
    +      return 1;
    +    }
    +    pStep = pStep->pNext;
    +  }
    +  return 0;
    +}
    +#endif
    +
    +/************** End of attach.c **********************************************/
    +/************** Begin file auth.c ********************************************/
    +/*
    +** 2003 January 11
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to implement the sqlite3_set_authorizer()
    +** API.  This facility is an optional feature of the library.  Embedded
    +** systems that do not need this facility may omit it by recompiling
    +** the library with -DSQLITE_OMIT_AUTHORIZATION=1
    +**
    +** $Id: auth.c,v 1.32 2009/07/02 18:40:35 danielk1977 Exp $
    +*/
    +
    +/*
    +** All of the code in this file may be omitted by defining a single
    +** macro.
    +*/
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +
    +/*
    +** Set or clear the access authorization function.
    +**
    +** The access authorization function is be called during the compilation
    +** phase to verify that the user has read and/or write access permission on
    +** various fields of the database.  The first argument to the auth function
    +** is a copy of the 3rd argument to this routine.  The second argument
    +** to the auth function is one of these constants:
    +**
    +**       SQLITE_CREATE_INDEX
    +**       SQLITE_CREATE_TABLE
    +**       SQLITE_CREATE_TEMP_INDEX
    +**       SQLITE_CREATE_TEMP_TABLE
    +**       SQLITE_CREATE_TEMP_TRIGGER
    +**       SQLITE_CREATE_TEMP_VIEW
    +**       SQLITE_CREATE_TRIGGER
    +**       SQLITE_CREATE_VIEW
    +**       SQLITE_DELETE
    +**       SQLITE_DROP_INDEX
    +**       SQLITE_DROP_TABLE
    +**       SQLITE_DROP_TEMP_INDEX
    +**       SQLITE_DROP_TEMP_TABLE
    +**       SQLITE_DROP_TEMP_TRIGGER
    +**       SQLITE_DROP_TEMP_VIEW
    +**       SQLITE_DROP_TRIGGER
    +**       SQLITE_DROP_VIEW
    +**       SQLITE_INSERT
    +**       SQLITE_PRAGMA
    +**       SQLITE_READ
    +**       SQLITE_SELECT
    +**       SQLITE_TRANSACTION
    +**       SQLITE_UPDATE
    +**
    +** The third and fourth arguments to the auth function are the name of
    +** the table and the column that are being accessed.  The auth function
    +** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  If
    +** SQLITE_OK is returned, it means that access is allowed.  SQLITE_DENY
    +** means that the SQL statement will never-run - the sqlite3_exec() call
    +** will return with an error.  SQLITE_IGNORE means that the SQL statement
    +** should run but attempts to read the specified column will return NULL
    +** and attempts to write the column will be ignored.
    +**
    +** Setting the auth function to NULL disables this hook.  The default
    +** setting of the auth function is NULL.
    +*/
    +SQLITE_API int sqlite3_set_authorizer(
    +  sqlite3 *db,
    +  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
    +  void *pArg
    +){
    +  sqlite3_mutex_enter(db->mutex);
    +  db->xAuth = xAuth;
    +  db->pAuthArg = pArg;
    +  sqlite3ExpirePreparedStatements(db);
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Write an error message into pParse->zErrMsg that explains that the
    +** user-supplied authorization function returned an illegal value.
    +*/
    +static void sqliteAuthBadReturnCode(Parse *pParse){
    +  sqlite3ErrorMsg(pParse, "authorizer malfunction");
    +  pParse->rc = SQLITE_ERROR;
    +}
    +
    +/*
    +** Invoke the authorization callback for permission to read column zCol from
    +** table zTab in database zDb. This function assumes that an authorization
    +** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
    +**
    +** If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed
    +** to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE
    +** is treated as SQLITE_DENY. In this case an error is left in pParse.
    +*/
    +SQLITE_PRIVATE int sqlite3AuthReadCol(
    +  Parse *pParse,                  /* The parser context */
    +  const char *zTab,               /* Table name */
    +  const char *zCol,               /* Column name */
    +  int iDb                         /* Index of containing database. */
    +){
    +  sqlite3 *db = pParse->db;       /* Database handle */
    +  char *zDb = db->aDb[iDb].zName; /* Name of attached database */
    +  int rc;                         /* Auth callback return code */
    +
    +  rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext);
    +  if( rc==SQLITE_DENY ){
    +    if( db->nDb>2 || iDb!=0 ){
    +      sqlite3ErrorMsg(pParse, "access to %s.%s.%s is prohibited",zDb,zTab,zCol);
    +    }else{
    +      sqlite3ErrorMsg(pParse, "access to %s.%s is prohibited", zTab, zCol);
    +    }
    +    pParse->rc = SQLITE_AUTH;
    +  }else if( rc!=SQLITE_IGNORE && rc!=SQLITE_OK ){
    +    sqliteAuthBadReturnCode(pParse);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** The pExpr should be a TK_COLUMN expression.  The table referred to
    +** is in pTabList or else it is the NEW or OLD table of a trigger.  
    +** Check to see if it is OK to read this particular column.
    +**
    +** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN 
    +** instruction into a TK_NULL.  If the auth function returns SQLITE_DENY,
    +** then generate an error.
    +*/
    +SQLITE_PRIVATE void sqlite3AuthRead(
    +  Parse *pParse,        /* The parser context */
    +  Expr *pExpr,          /* The expression to check authorization on */
    +  Schema *pSchema,      /* The schema of the expression */
    +  SrcList *pTabList     /* All table that pExpr might refer to */
    +){
    +  sqlite3 *db = pParse->db;
    +  Table *pTab = 0;      /* The table being read */
    +  const char *zCol;     /* Name of the column of the table */
    +  int iSrc;             /* Index in pTabList->a[] of table being read */
    +  int iDb;              /* The index of the database the expression refers to */
    +  int iCol;             /* Index of column in table */
    +
    +  if( db->xAuth==0 ) return;
    +  iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
    +  if( iDb<0 ){
    +    /* An attempt to read a column out of a subquery or other
    +    ** temporary table. */
    +    return;
    +  }
    +
    +  assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
    +  if( pExpr->op==TK_TRIGGER ){
    +    pTab = pParse->pTriggerTab;
    +  }else{
    +    assert( pTabList );
    +    for(iSrc=0; ALWAYS(iSrc<pTabList->nSrc); iSrc++){
    +      if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
    +        pTab = pTabList->a[iSrc].pTab;
    +        break;
    +      }
    +    }
    +  }
    +  iCol = pExpr->iColumn;
    +  if( NEVER(pTab==0) ) return;
    +
    +  if( iCol>=0 ){
    +    assert( iCol<pTab->nCol );
    +    zCol = pTab->aCol[iCol].zName;
    +  }else if( pTab->iPKey>=0 ){
    +    assert( pTab->iPKey<pTab->nCol );
    +    zCol = pTab->aCol[pTab->iPKey].zName;
    +  }else{
    +    zCol = "ROWID";
    +  }
    +  assert( iDb>=0 && iDb<db->nDb );
    +  if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
    +    pExpr->op = TK_NULL;
    +  }
    +}
    +
    +/*
    +** Do an authorization check using the code and arguments given.  Return
    +** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY.  If SQLITE_DENY
    +** is returned, then the error count and error message in pParse are
    +** modified appropriately.
    +*/
    +SQLITE_PRIVATE int sqlite3AuthCheck(
    +  Parse *pParse,
    +  int code,
    +  const char *zArg1,
    +  const char *zArg2,
    +  const char *zArg3
    +){
    +  sqlite3 *db = pParse->db;
    +  int rc;
    +
    +  /* Don't do any authorization checks if the database is initialising
    +  ** or if the parser is being invoked from within sqlite3_declare_vtab.
    +  */
    +  if( db->init.busy || IN_DECLARE_VTAB ){
    +    return SQLITE_OK;
    +  }
    +
    +  if( db->xAuth==0 ){
    +    return SQLITE_OK;
    +  }
    +  rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
    +  if( rc==SQLITE_DENY ){
    +    sqlite3ErrorMsg(pParse, "not authorized");
    +    pParse->rc = SQLITE_AUTH;
    +  }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
    +    rc = SQLITE_DENY;
    +    sqliteAuthBadReturnCode(pParse);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Push an authorization context.  After this routine is called, the
    +** zArg3 argument to authorization callbacks will be zContext until
    +** popped.  Or if pParse==0, this routine is a no-op.
    +*/
    +SQLITE_PRIVATE void sqlite3AuthContextPush(
    +  Parse *pParse,
    +  AuthContext *pContext, 
    +  const char *zContext
    +){
    +  assert( pParse );
    +  pContext->pParse = pParse;
    +  pContext->zAuthContext = pParse->zAuthContext;
    +  pParse->zAuthContext = zContext;
    +}
    +
    +/*
    +** Pop an authorization context that was previously pushed
    +** by sqlite3AuthContextPush
    +*/
    +SQLITE_PRIVATE void sqlite3AuthContextPop(AuthContext *pContext){
    +  if( pContext->pParse ){
    +    pContext->pParse->zAuthContext = pContext->zAuthContext;
    +    pContext->pParse = 0;
    +  }
    +}
    +
    +#endif /* SQLITE_OMIT_AUTHORIZATION */
    +
    +/************** End of auth.c ************************************************/
    +/************** Begin file build.c *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that are called by the SQLite parser
    +** when syntax rules are reduced.  The routines in this file handle the
    +** following kinds of SQL syntax:
    +**
    +**     CREATE TABLE
    +**     DROP TABLE
    +**     CREATE INDEX
    +**     DROP INDEX
    +**     creating ID lists
    +**     BEGIN TRANSACTION
    +**     COMMIT
    +**     ROLLBACK
    +**
    +** $Id: build.c,v 1.557 2009/07/24 17:58:53 danielk1977 Exp $
    +*/
    +
    +/*
    +** This routine is called when a new SQL statement is beginning to
    +** be parsed.  Initialize the pParse structure as needed.
    +*/
    +SQLITE_PRIVATE void sqlite3BeginParse(Parse *pParse, int explainFlag){
    +  pParse->explain = (u8)explainFlag;
    +  pParse->nVar = 0;
    +}
    +
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +/*
    +** The TableLock structure is only used by the sqlite3TableLock() and
    +** codeTableLocks() functions.
    +*/
    +struct TableLock {
    +  int iDb;             /* The database containing the table to be locked */
    +  int iTab;            /* The root page of the table to be locked */
    +  u8 isWriteLock;      /* True for write lock.  False for a read lock */
    +  const char *zName;   /* Name of the table */
    +};
    +
    +/*
    +** Record the fact that we want to lock a table at run-time.  
    +**
    +** The table to be locked has root page iTab and is found in database iDb.
    +** A read or a write lock can be taken depending on isWritelock.
    +**
    +** This routine just records the fact that the lock is desired.  The
    +** code to make the lock occur is generated by a later call to
    +** codeTableLocks() which occurs during sqlite3FinishCoding().
    +*/
    +SQLITE_PRIVATE void sqlite3TableLock(
    +  Parse *pParse,     /* Parsing context */
    +  int iDb,           /* Index of the database containing the table to lock */
    +  int iTab,          /* Root page number of the table to be locked */
    +  u8 isWriteLock,    /* True for a write lock */
    +  const char *zName  /* Name of the table to be locked */
    +){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +  int i;
    +  int nBytes;
    +  TableLock *p;
    +  assert( iDb>=0 );
    +
    +  for(i=0; i<pToplevel->nTableLock; i++){
    +    p = &pToplevel->aTableLock[i];
    +    if( p->iDb==iDb && p->iTab==iTab ){
    +      p->isWriteLock = (p->isWriteLock || isWriteLock);
    +      return;
    +    }
    +  }
    +
    +  nBytes = sizeof(TableLock) * (pToplevel->nTableLock+1);
    +  pToplevel->aTableLock =
    +      sqlite3DbReallocOrFree(pToplevel->db, pToplevel->aTableLock, nBytes);
    +  if( pToplevel->aTableLock ){
    +    p = &pToplevel->aTableLock[pToplevel->nTableLock++];
    +    p->iDb = iDb;
    +    p->iTab = iTab;
    +    p->isWriteLock = isWriteLock;
    +    p->zName = zName;
    +  }else{
    +    pToplevel->nTableLock = 0;
    +    pToplevel->db->mallocFailed = 1;
    +  }
    +}
    +
    +/*
    +** Code an OP_TableLock instruction for each table locked by the
    +** statement (configured by calls to sqlite3TableLock()).
    +*/
    +static void codeTableLocks(Parse *pParse){
    +  int i;
    +  Vdbe *pVdbe; 
    +
    +  pVdbe = sqlite3GetVdbe(pParse);
    +  assert( pVdbe!=0 ); /* sqlite3GetVdbe cannot fail: VDBE already allocated */
    +
    +  for(i=0; i<pParse->nTableLock; i++){
    +    TableLock *p = &pParse->aTableLock[i];
    +    int p1 = p->iDb;
    +    sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,
    +                      p->zName, P4_STATIC);
    +  }
    +}
    +#else
    +  #define codeTableLocks(x)
    +#endif
    +
    +/*
    +** This routine is called after a single SQL statement has been
    +** parsed and a VDBE program to execute that statement has been
    +** prepared.  This routine puts the finishing touches on the
    +** VDBE program and resets the pParse structure for the next
    +** parse.
    +**
    +** Note that if an error occurred, it might be the case that
    +** no VDBE code was generated.
    +*/
    +SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){
    +  sqlite3 *db;
    +  Vdbe *v;
    +
    +  db = pParse->db;
    +  if( db->mallocFailed ) return;
    +  if( pParse->nested ) return;
    +  if( pParse->nErr ) return;
    +
    +  /* Begin by generating some termination code at the end of the
    +  ** vdbe program
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  assert( !pParse->isMultiWrite 
    +       || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort));
    +  if( v ){
    +    sqlite3VdbeAddOp0(v, OP_Halt);
    +
    +    /* The cookie mask contains one bit for each database file open.
    +    ** (Bit 0 is for main, bit 1 is for temp, and so forth.)  Bits are
    +    ** set for each database that is used.  Generate code to start a
    +    ** transaction on each used database and to verify the schema cookie
    +    ** on each used database.
    +    */
    +    if( pParse->cookieGoto>0 ){
    +      u32 mask;
    +      int iDb;
    +      sqlite3VdbeJumpHere(v, pParse->cookieGoto-1);
    +      for(iDb=0, mask=1; iDb<db->nDb; mask<<=1, iDb++){
    +        if( (mask & pParse->cookieMask)==0 ) continue;
    +        sqlite3VdbeUsesBtree(v, iDb);
    +        sqlite3VdbeAddOp2(v,OP_Transaction, iDb, (mask & pParse->writeMask)!=0);
    +        if( db->init.busy==0 ){
    +          sqlite3VdbeAddOp2(v,OP_VerifyCookie, iDb, pParse->cookieValue[iDb]);
    +        }
    +      }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +      {
    +        int i;
    +        for(i=0; i<pParse->nVtabLock; i++){
    +          char *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);
    +          sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB);
    +        }
    +        pParse->nVtabLock = 0;
    +      }
    +#endif
    +
    +      /* Once all the cookies have been verified and transactions opened, 
    +      ** obtain the required table-locks. This is a no-op unless the 
    +      ** shared-cache feature is enabled.
    +      */
    +      codeTableLocks(pParse);
    +
    +      /* Initialize any AUTOINCREMENT data structures required.
    +      */
    +      sqlite3AutoincrementBegin(pParse);
    +
    +      /* Finally, jump back to the beginning of the executable code. */
    +      sqlite3VdbeAddOp2(v, OP_Goto, 0, pParse->cookieGoto);
    +    }
    +  }
    +
    +
    +  /* Get the VDBE program ready for execution
    +  */
    +  if( v && ALWAYS(pParse->nErr==0) && !db->mallocFailed ){
    +#ifdef SQLITE_DEBUG
    +    FILE *trace = (db->flags & SQLITE_VdbeTrace)!=0 ? stdout : 0;
    +    sqlite3VdbeTrace(v, trace);
    +#endif
    +    assert( pParse->iCacheLevel==0 );  /* Disables and re-enables match */
    +    /* A minimum of one cursor is required if autoincrement is used
    +    *  See ticket [a696379c1f08866] */
    +    if( pParse->pAinc!=0 && pParse->nTab==0 ) pParse->nTab = 1;
    +    sqlite3VdbeMakeReady(v, pParse->nVar, pParse->nMem,
    +                         pParse->nTab, pParse->nMaxArg, pParse->explain,
    +                         pParse->isMultiWrite && pParse->mayAbort);
    +    pParse->rc = SQLITE_DONE;
    +    pParse->colNamesSet = 0;
    +  }else if( pParse->rc==SQLITE_OK ){
    +    pParse->rc = SQLITE_ERROR;
    +  }
    +  pParse->nTab = 0;
    +  pParse->nMem = 0;
    +  pParse->nSet = 0;
    +  pParse->nVar = 0;
    +  pParse->cookieMask = 0;
    +  pParse->cookieGoto = 0;
    +}
    +
    +/*
    +** Run the parser and code generator recursively in order to generate
    +** code for the SQL statement given onto the end of the pParse context
    +** currently under construction.  When the parser is run recursively
    +** this way, the final OP_Halt is not appended and other initialization
    +** and finalization steps are omitted because those are handling by the
    +** outermost parser.
    +**
    +** Not everything is nestable.  This facility is designed to permit
    +** INSERT, UPDATE, and DELETE operations against SQLITE_MASTER.  Use
    +** care if you decide to try to use this routine for some other purposes.
    +*/
    +SQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
    +  va_list ap;
    +  char *zSql;
    +  char *zErrMsg = 0;
    +  sqlite3 *db = pParse->db;
    +# define SAVE_SZ  (sizeof(Parse) - offsetof(Parse,nVar))
    +  char saveBuf[SAVE_SZ];
    +
    +  if( pParse->nErr ) return;
    +  assert( pParse->nested<10 );  /* Nesting should only be of limited depth */
    +  va_start(ap, zFormat);
    +  zSql = sqlite3VMPrintf(db, zFormat, ap);
    +  va_end(ap);
    +  if( zSql==0 ){
    +    return;   /* A malloc must have failed */
    +  }
    +  pParse->nested++;
    +  memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
    +  memset(&pParse->nVar, 0, SAVE_SZ);
    +  sqlite3RunParser(pParse, zSql, &zErrMsg);
    +  sqlite3DbFree(db, zErrMsg);
    +  sqlite3DbFree(db, zSql);
    +  memcpy(&pParse->nVar, saveBuf, SAVE_SZ);
    +  pParse->nested--;
    +}
    +
    +/*
    +** Locate the in-memory structure that describes a particular database
    +** table given the name of that table and (optionally) the name of the
    +** database containing the table.  Return NULL if not found.
    +**
    +** If zDatabase is 0, all databases are searched for the table and the
    +** first matching table is returned.  (No checking for duplicate table
    +** names is done.)  The search order is TEMP first, then MAIN, then any
    +** auxiliary databases added using the ATTACH command.
    +**
    +** See also sqlite3LocateTable().
    +*/
    +SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
    +  Table *p = 0;
    +  int i;
    +  int nName;
    +  assert( zName!=0 );
    +  nName = sqlite3Strlen30(zName);
    +  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    +    int j = (i<2) ? i^1 : i;   /* Search TEMP before MAIN */
    +    if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
    +    p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName, nName);
    +    if( p ) break;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Locate the in-memory structure that describes a particular database
    +** table given the name of that table and (optionally) the name of the
    +** database containing the table.  Return NULL if not found.  Also leave an
    +** error message in pParse->zErrMsg.
    +**
    +** The difference between this routine and sqlite3FindTable() is that this
    +** routine leaves an error message in pParse->zErrMsg where
    +** sqlite3FindTable() does not.
    +*/
    +SQLITE_PRIVATE Table *sqlite3LocateTable(
    +  Parse *pParse,         /* context in which to report errors */
    +  int isView,            /* True if looking for a VIEW rather than a TABLE */
    +  const char *zName,     /* Name of the table we are looking for */
    +  const char *zDbase     /* Name of the database.  Might be NULL */
    +){
    +  Table *p;
    +
    +  /* Read the database schema. If an error occurs, leave an error message
    +  ** and code in pParse and return NULL. */
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    return 0;
    +  }
    +
    +  p = sqlite3FindTable(pParse->db, zName, zDbase);
    +  if( p==0 ){
    +    const char *zMsg = isView ? "no such view" : "no such table";
    +    if( zDbase ){
    +      sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
    +    }else{
    +      sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
    +    }
    +    pParse->checkSchema = 1;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Locate the in-memory structure that describes 
    +** a particular index given the name of that index
    +** and the name of the database that contains the index.
    +** Return NULL if not found.
    +**
    +** If zDatabase is 0, all databases are searched for the
    +** table and the first matching index is returned.  (No checking
    +** for duplicate index names is done.)  The search order is
    +** TEMP first, then MAIN, then any auxiliary databases added
    +** using the ATTACH command.
    +*/
    +SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
    +  Index *p = 0;
    +  int i;
    +  int nName = sqlite3Strlen30(zName);
    +  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    +    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
    +    Schema *pSchema = db->aDb[j].pSchema;
    +    assert( pSchema );
    +    if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
    +    p = sqlite3HashFind(&pSchema->idxHash, zName, nName);
    +    if( p ) break;
    +  }
    +  return p;
    +}
    +
    +/*
    +** Reclaim the memory used by an index
    +*/
    +static void freeIndex(Index *p){
    +  sqlite3 *db = p->pTable->dbMem;
    +#ifndef SQLITE_OMIT_ANALYZE
    +  sqlite3DeleteIndexSamples(p);
    +#endif
    +  sqlite3DbFree(db, p->zColAff);
    +  sqlite3DbFree(db, p);
    +}
    +
    +/*
    +** Remove the given index from the index hash table, and free
    +** its memory structures.
    +**
    +** The index is removed from the database hash tables but
    +** it is not unlinked from the Table that it indexes.
    +** Unlinking from the Table must be done by the calling function.
    +*/
    +static void sqlite3DeleteIndex(Index *p){
    +  Index *pOld;
    +  const char *zName = p->zName;
    +
    +  pOld = sqlite3HashInsert(&p->pSchema->idxHash, zName,
    +                           sqlite3Strlen30(zName), 0);
    +  assert( pOld==0 || pOld==p );
    +  freeIndex(p);
    +}
    +
    +/*
    +** For the index called zIdxName which is found in the database iDb,
    +** unlike that index from its Table then remove the index from
    +** the index hash table and free all memory structures associated
    +** with the index.
    +*/
    +SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
    +  Index *pIndex;
    +  int len;
    +  Hash *pHash = &db->aDb[iDb].pSchema->idxHash;
    +
    +  len = sqlite3Strlen30(zIdxName);
    +  pIndex = sqlite3HashInsert(pHash, zIdxName, len, 0);
    +  if( pIndex ){
    +    if( pIndex->pTable->pIndex==pIndex ){
    +      pIndex->pTable->pIndex = pIndex->pNext;
    +    }else{
    +      Index *p;
    +      /* Justification of ALWAYS();  The index must be on the list of
    +      ** indices. */
    +      p = pIndex->pTable->pIndex;
    +      while( ALWAYS(p) && p->pNext!=pIndex ){ p = p->pNext; }
    +      if( ALWAYS(p && p->pNext==pIndex) ){
    +        p->pNext = pIndex->pNext;
    +      }
    +    }
    +    freeIndex(pIndex);
    +  }
    +  db->flags |= SQLITE_InternChanges;
    +}
    +
    +/*
    +** Erase all schema information from the in-memory hash tables of
    +** a single database.  This routine is called to reclaim memory
    +** before the database closes.  It is also called during a rollback
    +** if there were schema changes during the transaction or if a
    +** schema-cookie mismatch occurs.
    +**
    +** If iDb==0 then reset the internal schema tables for all database
    +** files.  If iDb>=1 then reset the internal schema for only the
    +** single file indicated.
    +*/
    +SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
    +  int i, j;
    +  assert( iDb>=0 && iDb<db->nDb );
    +
    +  if( iDb==0 ){
    +    sqlite3BtreeEnterAll(db);
    +  }
    +  for(i=iDb; i<db->nDb; i++){
    +    Db *pDb = &db->aDb[i];
    +    if( pDb->pSchema ){
    +      assert(i==1 || (pDb->pBt && sqlite3BtreeHoldsMutex(pDb->pBt)));
    +      sqlite3SchemaFree(pDb->pSchema);
    +    }
    +    if( iDb>0 ) return;
    +  }
    +  assert( iDb==0 );
    +  db->flags &= ~SQLITE_InternChanges;
    +  sqlite3VtabUnlockList(db);
    +  sqlite3BtreeLeaveAll(db);
    +
    +  /* If one or more of the auxiliary database files has been closed,
    +  ** then remove them from the auxiliary database list.  We take the
    +  ** opportunity to do this here since we have just deleted all of the
    +  ** schema hash tables and therefore do not have to make any changes
    +  ** to any of those tables.
    +  */
    +  for(i=j=2; i<db->nDb; i++){
    +    struct Db *pDb = &db->aDb[i];
    +    if( pDb->pBt==0 ){
    +      sqlite3DbFree(db, pDb->zName);
    +      pDb->zName = 0;
    +      continue;
    +    }
    +    if( j<i ){
    +      db->aDb[j] = db->aDb[i];
    +    }
    +    j++;
    +  }
    +  memset(&db->aDb[j], 0, (db->nDb-j)*sizeof(db->aDb[j]));
    +  db->nDb = j;
    +  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){
    +    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
    +    sqlite3DbFree(db, db->aDb);
    +    db->aDb = db->aDbStatic;
    +  }
    +}
    +
    +/*
    +** This routine is called when a commit occurs.
    +*/
    +SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
    +  db->flags &= ~SQLITE_InternChanges;
    +}
    +
    +/*
    +** Clear the column names from a table or view.
    +*/
    +static void sqliteResetColumnNames(Table *pTable){
    +  int i;
    +  Column *pCol;
    +  sqlite3 *db = pTable->dbMem;
    +  testcase( db==0 );
    +  assert( pTable!=0 );
    +  if( (pCol = pTable->aCol)!=0 ){
    +    for(i=0; i<pTable->nCol; i++, pCol++){
    +      sqlite3DbFree(db, pCol->zName);
    +      sqlite3ExprDelete(db, pCol->pDflt);
    +      sqlite3DbFree(db, pCol->zDflt);
    +      sqlite3DbFree(db, pCol->zType);
    +      sqlite3DbFree(db, pCol->zColl);
    +    }
    +    sqlite3DbFree(db, pTable->aCol);
    +  }
    +  pTable->aCol = 0;
    +  pTable->nCol = 0;
    +}
    +
    +/*
    +** Remove the memory data structures associated with the given
    +** Table.  No changes are made to disk by this routine.
    +**
    +** This routine just deletes the data structure.  It does not unlink
    +** the table data structure from the hash table.  But it does destroy
    +** memory structures of the indices and foreign keys associated with 
    +** the table.
    +*/
    +SQLITE_PRIVATE void sqlite3DeleteTable(Table *pTable){
    +  Index *pIndex, *pNext;
    +  sqlite3 *db;
    +
    +  if( pTable==0 ) return;
    +  db = pTable->dbMem;
    +  testcase( db==0 );
    +
    +  /* Do not delete the table until the reference count reaches zero. */
    +  pTable->nRef--;
    +  if( pTable->nRef>0 ){
    +    return;
    +  }
    +  assert( pTable->nRef==0 );
    +
    +  /* Delete all indices associated with this table
    +  */
    +  for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
    +    pNext = pIndex->pNext;
    +    assert( pIndex->pSchema==pTable->pSchema );
    +    sqlite3DeleteIndex(pIndex);
    +  }
    +
    +  /* Delete any foreign keys attached to this table. */
    +  sqlite3FkDelete(pTable);
    +
    +  /* Delete the Table structure itself.
    +  */
    +  sqliteResetColumnNames(pTable);
    +  sqlite3DbFree(db, pTable->zName);
    +  sqlite3DbFree(db, pTable->zColAff);
    +  sqlite3SelectDelete(db, pTable->pSelect);
    +#ifndef SQLITE_OMIT_CHECK
    +  sqlite3ExprDelete(db, pTable->pCheck);
    +#endif
    +  sqlite3VtabClear(pTable);
    +  sqlite3DbFree(db, pTable);
    +}
    +
    +/*
    +** Unlink the given table from the hash tables and the delete the
    +** table structure with all its indices and foreign keys.
    +*/
    +SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
    +  Table *p;
    +  Db *pDb;
    +
    +  assert( db!=0 );
    +  assert( iDb>=0 && iDb<db->nDb );
    +  assert( zTabName && zTabName[0] );
    +  pDb = &db->aDb[iDb];
    +  p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName,
    +                        sqlite3Strlen30(zTabName),0);
    +  sqlite3DeleteTable(p);
    +  db->flags |= SQLITE_InternChanges;
    +}
    +
    +/*
    +** Given a token, return a string that consists of the text of that
    +** token.  Space to hold the returned string
    +** is obtained from sqliteMalloc() and must be freed by the calling
    +** function.
    +**
    +** Any quotation marks (ex:  "name", 'name', [name], or `name`) that
    +** surround the body of the token are removed.
    +**
    +** Tokens are often just pointers into the original SQL text and so
    +** are not \000 terminated and are not persistent.  The returned string
    +** is \000 terminated and is persistent.
    +*/
    +SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
    +  char *zName;
    +  if( pName ){
    +    zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
    +    sqlite3Dequote(zName);
    +  }else{
    +    zName = 0;
    +  }
    +  return zName;
    +}
    +
    +/*
    +** Open the sqlite_master table stored in database number iDb for
    +** writing. The table is opened using cursor 0.
    +*/
    +SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *p, int iDb){
    +  Vdbe *v = sqlite3GetVdbe(p);
    +  sqlite3TableLock(p, iDb, MASTER_ROOT, 1, SCHEMA_TABLE(iDb));
    +  sqlite3VdbeAddOp3(v, OP_OpenWrite, 0, MASTER_ROOT, iDb);
    +  sqlite3VdbeChangeP4(v, -1, (char *)5, P4_INT32);  /* 5 column table */
    +  if( p->nTab==0 ){
    +    p->nTab = 1;
    +  }
    +}
    +
    +/*
    +** Parameter zName points to a nul-terminated buffer containing the name
    +** of a database ("main", "temp" or the name of an attached db). This
    +** function returns the index of the named database in db->aDb[], or
    +** -1 if the named db cannot be found.
    +*/
    +SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
    +  int i = -1;         /* Database number */
    +  if( zName ){
    +    Db *pDb;
    +    int n = sqlite3Strlen30(zName);
    +    for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
    +      if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) && 
    +          0==sqlite3StrICmp(pDb->zName, zName) ){
    +        break;
    +      }
    +    }
    +  }
    +  return i;
    +}
    +
    +/*
    +** The token *pName contains the name of a database (either "main" or
    +** "temp" or the name of an attached db). This routine returns the
    +** index of the named database in db->aDb[], or -1 if the named db 
    +** does not exist.
    +*/
    +SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
    +  int i;                               /* Database number */
    +  char *zName;                         /* Name we are searching for */
    +  zName = sqlite3NameFromToken(db, pName);
    +  i = sqlite3FindDbName(db, zName);
    +  sqlite3DbFree(db, zName);
    +  return i;
    +}
    +
    +/* The table or view or trigger name is passed to this routine via tokens
    +** pName1 and pName2. If the table name was fully qualified, for example:
    +**
    +** CREATE TABLE xxx.yyy (...);
    +** 
    +** Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
    +** the table name is not fully qualified, i.e.:
    +**
    +** CREATE TABLE yyy(...);
    +**
    +** Then pName1 is set to "yyy" and pName2 is "".
    +**
    +** This routine sets the *ppUnqual pointer to point at the token (pName1 or
    +** pName2) that stores the unqualified table name.  The index of the
    +** database "xxx" is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3TwoPartName(
    +  Parse *pParse,      /* Parsing and code generating context */
    +  Token *pName1,      /* The "xxx" in the name "xxx.yyy" or "xxx" */
    +  Token *pName2,      /* The "yyy" in the name "xxx.yyy" */
    +  Token **pUnqual     /* Write the unqualified object name here */
    +){
    +  int iDb;                    /* Database holding the object */
    +  sqlite3 *db = pParse->db;
    +
    +  if( ALWAYS(pName2!=0) && pName2->n>0 ){
    +    if( db->init.busy ) {
    +      sqlite3ErrorMsg(pParse, "corrupt database");
    +      pParse->nErr++;
    +      return -1;
    +    }
    +    *pUnqual = pName2;
    +    iDb = sqlite3FindDb(db, pName1);
    +    if( iDb<0 ){
    +      sqlite3ErrorMsg(pParse, "unknown database %T", pName1);
    +      pParse->nErr++;
    +      return -1;
    +    }
    +  }else{
    +    assert( db->init.iDb==0 || db->init.busy );
    +    iDb = db->init.iDb;
    +    *pUnqual = pName1;
    +  }
    +  return iDb;
    +}
    +
    +/*
    +** This routine is used to check if the UTF-8 string zName is a legal
    +** unqualified name for a new schema object (table, index, view or
    +** trigger). All names are legal except those that begin with the string
    +** "sqlite_" (in upper, lower or mixed case). This portion of the namespace
    +** is reserved for internal use.
    +*/
    +SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
    +  if( !pParse->db->init.busy && pParse->nested==0 
    +          && (pParse->db->flags & SQLITE_WriteSchema)==0
    +          && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
    +    sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
    +    return SQLITE_ERROR;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Begin constructing a new table representation in memory.  This is
    +** the first of several action routines that get called in response
    +** to a CREATE TABLE statement.  In particular, this routine is called
    +** after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp
    +** flag is true if the table should be stored in the auxiliary database
    +** file instead of in the main database file.  This is normally the case
    +** when the "TEMP" or "TEMPORARY" keyword occurs in between
    +** CREATE and TABLE.
    +**
    +** The new table record is initialized and put in pParse->pNewTable.
    +** As more of the CREATE TABLE statement is parsed, additional action
    +** routines will be called to add more information to this record.
    +** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
    +** is called to complete the construction of the new table record.
    +*/
    +SQLITE_PRIVATE void sqlite3StartTable(
    +  Parse *pParse,   /* Parser context */
    +  Token *pName1,   /* First part of the name of the table or view */
    +  Token *pName2,   /* Second part of the name of the table or view */
    +  int isTemp,      /* True if this is a TEMP table */
    +  int isView,      /* True if this is a VIEW */
    +  int isVirtual,   /* True if this is a VIRTUAL table */
    +  int noErr        /* Do nothing if table already exists */
    +){
    +  Table *pTable;
    +  char *zName = 0; /* The name of the new table */
    +  sqlite3 *db = pParse->db;
    +  Vdbe *v;
    +  int iDb;         /* Database number to create the table in */
    +  Token *pName;    /* Unqualified name of the table to create */
    +
    +  /* The table or view name to create is passed to this routine via tokens
    +  ** pName1 and pName2. If the table name was fully qualified, for example:
    +  **
    +  ** CREATE TABLE xxx.yyy (...);
    +  ** 
    +  ** Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
    +  ** the table name is not fully qualified, i.e.:
    +  **
    +  ** CREATE TABLE yyy(...);
    +  **
    +  ** Then pName1 is set to "yyy" and pName2 is "".
    +  **
    +  ** The call below sets the pName pointer to point at the token (pName1 or
    +  ** pName2) that stores the unqualified table name. The variable iDb is
    +  ** set to the index of the database that the table or view is to be
    +  ** created in.
    +  */
    +  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
    +  if( iDb<0 ) return;
    +  if( !OMIT_TEMPDB && isTemp && iDb>1 ){
    +    /* If creating a temp table, the name may not be qualified */
    +    sqlite3ErrorMsg(pParse, "temporary table name must be unqualified");
    +    return;
    +  }
    +  if( !OMIT_TEMPDB && isTemp ) iDb = 1;
    +
    +  pParse->sNameToken = *pName;
    +  zName = sqlite3NameFromToken(db, pName);
    +  if( zName==0 ) return;
    +  if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
    +    goto begin_table_error;
    +  }
    +  if( db->init.iDb==1 ) isTemp = 1;
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  assert( (isTemp & 1)==isTemp );
    +  {
    +    int code;
    +    char *zDb = db->aDb[iDb].zName;
    +    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){
    +      goto begin_table_error;
    +    }
    +    if( isView ){
    +      if( !OMIT_TEMPDB && isTemp ){
    +        code = SQLITE_CREATE_TEMP_VIEW;
    +      }else{
    +        code = SQLITE_CREATE_VIEW;
    +      }
    +    }else{
    +      if( !OMIT_TEMPDB && isTemp ){
    +        code = SQLITE_CREATE_TEMP_TABLE;
    +      }else{
    +        code = SQLITE_CREATE_TABLE;
    +      }
    +    }
    +    if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
    +      goto begin_table_error;
    +    }
    +  }
    +#endif
    +
    +  /* Make sure the new table name does not collide with an existing
    +  ** index or table name in the same database.  Issue an error message if
    +  ** it does. The exception is if the statement being parsed was passed
    +  ** to an sqlite3_declare_vtab() call. In that case only the column names
    +  ** and types will be used, so there is no need to test for namespace
    +  ** collisions.
    +  */
    +  if( !IN_DECLARE_VTAB ){
    +    if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +      goto begin_table_error;
    +    }
    +    pTable = sqlite3FindTable(db, zName, db->aDb[iDb].zName);
    +    if( pTable ){
    +      if( !noErr ){
    +        sqlite3ErrorMsg(pParse, "table %T already exists", pName);
    +      }
    +      goto begin_table_error;
    +    }
    +    if( sqlite3FindIndex(db, zName, 0)!=0 && (iDb==0 || !db->init.busy) ){
    +      sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
    +      goto begin_table_error;
    +    }
    +  }
    +
    +  pTable = sqlite3DbMallocZero(db, sizeof(Table));
    +  if( pTable==0 ){
    +    db->mallocFailed = 1;
    +    pParse->rc = SQLITE_NOMEM;
    +    pParse->nErr++;
    +    goto begin_table_error;
    +  }
    +  pTable->zName = zName;
    +  pTable->iPKey = -1;
    +  pTable->pSchema = db->aDb[iDb].pSchema;
    +  pTable->nRef = 1;
    +  pTable->dbMem = 0;
    +  assert( pParse->pNewTable==0 );
    +  pParse->pNewTable = pTable;
    +
    +  /* If this is the magic sqlite_sequence table used by autoincrement,
    +  ** then record a pointer to this table in the main database structure
    +  ** so that INSERT can find the table easily.
    +  */
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +  if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
    +    pTable->pSchema->pSeqTab = pTable;
    +  }
    +#endif
    +
    +  /* Begin generating the code that will insert the table record into
    +  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
    +  ** and allocate the record number for the table entry now.  Before any
    +  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause
    +  ** indices to be created and the table record must come before the 
    +  ** indices.  Hence, the record number for the table must be allocated
    +  ** now.
    +  */
    +  if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
    +    int j1;
    +    int fileFormat;
    +    int reg1, reg2, reg3;
    +    sqlite3BeginWriteOperation(pParse, 0, iDb);
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( isVirtual ){
    +      sqlite3VdbeAddOp0(v, OP_VBegin);
    +    }
    +#endif
    +
    +    /* If the file format and encoding in the database have not been set, 
    +    ** set them now.
    +    */
    +    reg1 = pParse->regRowid = ++pParse->nMem;
    +    reg2 = pParse->regRoot = ++pParse->nMem;
    +    reg3 = ++pParse->nMem;
    +    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
    +    sqlite3VdbeUsesBtree(v, iDb);
    +    j1 = sqlite3VdbeAddOp1(v, OP_If, reg3);
    +    fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
    +                  1 : SQLITE_MAX_FILE_FORMAT;
    +    sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
    +    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
    +    sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
    +    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
    +    sqlite3VdbeJumpHere(v, j1);
    +
    +    /* This just creates a place-holder record in the sqlite_master table.
    +    ** The record created does not contain anything yet.  It will be replaced
    +    ** by the real entry in code generated at sqlite3EndTable().
    +    **
    +    ** The rowid for the new entry is left in register pParse->regRowid.
    +    ** The root page number of the new table is left in reg pParse->regRoot.
    +    ** The rowid and root page number values are needed by the code that
    +    ** sqlite3EndTable will generate.
    +    */
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
    +    if( isView || isVirtual ){
    +      sqlite3VdbeAddOp2(v, OP_Integer, 0, reg2);
    +    }else
    +#endif
    +    {
    +      sqlite3VdbeAddOp2(v, OP_CreateTable, iDb, reg2);
    +    }
    +    sqlite3OpenMasterTable(pParse, iDb);
    +    sqlite3VdbeAddOp2(v, OP_NewRowid, 0, reg1);
    +    sqlite3VdbeAddOp2(v, OP_Null, 0, reg3);
    +    sqlite3VdbeAddOp3(v, OP_Insert, 0, reg3, reg1);
    +    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +    sqlite3VdbeAddOp0(v, OP_Close);
    +  }
    +
    +  /* Normal (non-error) return. */
    +  return;
    +
    +  /* If an error occurs, we jump here */
    +begin_table_error:
    +  sqlite3DbFree(db, zName);
    +  return;
    +}
    +
    +/*
    +** This macro is used to compare two strings in a case-insensitive manner.
    +** It is slightly faster than calling sqlite3StrICmp() directly, but
    +** produces larger code.
    +**
    +** WARNING: This macro is not compatible with the strcmp() family. It
    +** returns true if the two strings are equal, otherwise false.
    +*/
    +#define STRICMP(x, y) (\
    +sqlite3UpperToLower[*(unsigned char *)(x)]==   \
    +sqlite3UpperToLower[*(unsigned char *)(y)]     \
    +&& sqlite3StrICmp((x)+1,(y)+1)==0 )
    +
    +/*
    +** Add a new column to the table currently being constructed.
    +**
    +** The parser calls this routine once for each column declaration
    +** in a CREATE TABLE statement.  sqlite3StartTable() gets called
    +** first to get things going.  Then this routine is called for each
    +** column.
    +*/
    +SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token *pName){
    +  Table *p;
    +  int i;
    +  char *z;
    +  Column *pCol;
    +  sqlite3 *db = pParse->db;
    +  if( (p = pParse->pNewTable)==0 ) return;
    +#if SQLITE_MAX_COLUMN
    +  if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    +    sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
    +    return;
    +  }
    +#endif
    +  z = sqlite3NameFromToken(db, pName);
    +  if( z==0 ) return;
    +  for(i=0; i<p->nCol; i++){
    +    if( STRICMP(z, p->aCol[i].zName) ){
    +      sqlite3ErrorMsg(pParse, "duplicate column name: %s", z);
    +      sqlite3DbFree(db, z);
    +      return;
    +    }
    +  }
    +  if( (p->nCol & 0x7)==0 ){
    +    Column *aNew;
    +    aNew = sqlite3DbRealloc(db,p->aCol,(p->nCol+8)*sizeof(p->aCol[0]));
    +    if( aNew==0 ){
    +      sqlite3DbFree(db, z);
    +      return;
    +    }
    +    p->aCol = aNew;
    +  }
    +  pCol = &p->aCol[p->nCol];
    +  memset(pCol, 0, sizeof(p->aCol[0]));
    +  pCol->zName = z;
    + 
    +  /* If there is no type specified, columns have the default affinity
    +  ** 'NONE'. If there is a type specified, then sqlite3AddColumnType() will
    +  ** be called next to set pCol->affinity correctly.
    +  */
    +  pCol->affinity = SQLITE_AFF_NONE;
    +  p->nCol++;
    +}
    +
    +/*
    +** This routine is called by the parser while in the middle of
    +** parsing a CREATE TABLE statement.  A "NOT NULL" constraint has
    +** been seen on a column.  This routine sets the notNull flag on
    +** the column currently under construction.
    +*/
    +SQLITE_PRIVATE void sqlite3AddNotNull(Parse *pParse, int onError){
    +  Table *p;
    +  p = pParse->pNewTable;
    +  if( p==0 || NEVER(p->nCol<1) ) return;
    +  p->aCol[p->nCol-1].notNull = (u8)onError;
    +}
    +
    +/*
    +** Scan the column type name zType (length nType) and return the
    +** associated affinity type.
    +**
    +** This routine does a case-independent search of zType for the 
    +** substrings in the following table. If one of the substrings is
    +** found, the corresponding affinity is returned. If zType contains
    +** more than one of the substrings, entries toward the top of 
    +** the table take priority. For example, if zType is 'BLOBINT', 
    +** SQLITE_AFF_INTEGER is returned.
    +**
    +** Substring     | Affinity
    +** --------------------------------
    +** 'INT'         | SQLITE_AFF_INTEGER
    +** 'CHAR'        | SQLITE_AFF_TEXT
    +** 'CLOB'        | SQLITE_AFF_TEXT
    +** 'TEXT'        | SQLITE_AFF_TEXT
    +** 'BLOB'        | SQLITE_AFF_NONE
    +** 'REAL'        | SQLITE_AFF_REAL
    +** 'FLOA'        | SQLITE_AFF_REAL
    +** 'DOUB'        | SQLITE_AFF_REAL
    +**
    +** If none of the substrings in the above table are found,
    +** SQLITE_AFF_NUMERIC is returned.
    +*/
    +SQLITE_PRIVATE char sqlite3AffinityType(const char *zIn){
    +  u32 h = 0;
    +  char aff = SQLITE_AFF_NUMERIC;
    +
    +  if( zIn ) while( zIn[0] ){
    +    h = (h<<8) + sqlite3UpperToLower[(*zIn)&0xff];
    +    zIn++;
    +    if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){             /* CHAR */
    +      aff = SQLITE_AFF_TEXT; 
    +    }else if( h==(('c'<<24)+('l'<<16)+('o'<<8)+'b') ){       /* CLOB */
    +      aff = SQLITE_AFF_TEXT;
    +    }else if( h==(('t'<<24)+('e'<<16)+('x'<<8)+'t') ){       /* TEXT */
    +      aff = SQLITE_AFF_TEXT;
    +    }else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b')          /* BLOB */
    +        && (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){
    +      aff = SQLITE_AFF_NONE;
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +    }else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l')          /* REAL */
    +        && aff==SQLITE_AFF_NUMERIC ){
    +      aff = SQLITE_AFF_REAL;
    +    }else if( h==(('f'<<24)+('l'<<16)+('o'<<8)+'a')          /* FLOA */
    +        && aff==SQLITE_AFF_NUMERIC ){
    +      aff = SQLITE_AFF_REAL;
    +    }else if( h==(('d'<<24)+('o'<<16)+('u'<<8)+'b')          /* DOUB */
    +        && aff==SQLITE_AFF_NUMERIC ){
    +      aff = SQLITE_AFF_REAL;
    +#endif
    +    }else if( (h&0x00FFFFFF)==(('i'<<16)+('n'<<8)+'t') ){    /* INT */
    +      aff = SQLITE_AFF_INTEGER;
    +      break;
    +    }
    +  }
    +
    +  return aff;
    +}
    +
    +/*
    +** This routine is called by the parser while in the middle of
    +** parsing a CREATE TABLE statement.  The pFirst token is the first
    +** token in the sequence of tokens that describe the type of the
    +** column currently under construction.   pLast is the last token
    +** in the sequence.  Use this information to construct a string
    +** that contains the typename of the column and store that string
    +** in zType.
    +*/ 
    +SQLITE_PRIVATE void sqlite3AddColumnType(Parse *pParse, Token *pType){
    +  Table *p;
    +  Column *pCol;
    +
    +  p = pParse->pNewTable;
    +  if( p==0 || NEVER(p->nCol<1) ) return;
    +  pCol = &p->aCol[p->nCol-1];
    +  assert( pCol->zType==0 );
    +  pCol->zType = sqlite3NameFromToken(pParse->db, pType);
    +  pCol->affinity = sqlite3AffinityType(pCol->zType);
    +}
    +
    +/*
    +** The expression is the default value for the most recently added column
    +** of the table currently under construction.
    +**
    +** Default value expressions must be constant.  Raise an exception if this
    +** is not the case.
    +**
    +** This routine is called by the parser while in the middle of
    +** parsing a CREATE TABLE statement.
    +*/
    +SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse *pParse, ExprSpan *pSpan){
    +  Table *p;
    +  Column *pCol;
    +  sqlite3 *db = pParse->db;
    +  p = pParse->pNewTable;
    +  if( p!=0 ){
    +    pCol = &(p->aCol[p->nCol-1]);
    +    if( !sqlite3ExprIsConstantOrFunction(pSpan->pExpr) ){
    +      sqlite3ErrorMsg(pParse, "default value of column [%s] is not constant",
    +          pCol->zName);
    +    }else{
    +      /* A copy of pExpr is used instead of the original, as pExpr contains
    +      ** tokens that point to volatile memory. The 'span' of the expression
    +      ** is required by pragma table_info.
    +      */
    +      sqlite3ExprDelete(db, pCol->pDflt);
    +      pCol->pDflt = sqlite3ExprDup(db, pSpan->pExpr, EXPRDUP_REDUCE);
    +      sqlite3DbFree(db, pCol->zDflt);
    +      pCol->zDflt = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
    +                                     (int)(pSpan->zEnd - pSpan->zStart));
    +    }
    +  }
    +  sqlite3ExprDelete(db, pSpan->pExpr);
    +}
    +
    +/*
    +** Designate the PRIMARY KEY for the table.  pList is a list of names 
    +** of columns that form the primary key.  If pList is NULL, then the
    +** most recently added column of the table is the primary key.
    +**
    +** A table can have at most one primary key.  If the table already has
    +** a primary key (and this is the second primary key) then create an
    +** error.
    +**
    +** If the PRIMARY KEY is on a single column whose datatype is INTEGER,
    +** then we will try to use that column as the rowid.  Set the Table.iPKey
    +** field of the table under construction to be the index of the
    +** INTEGER PRIMARY KEY column.  Table.iPKey is set to -1 if there is
    +** no INTEGER PRIMARY KEY.
    +**
    +** If the key is not an INTEGER PRIMARY KEY, then create a unique
    +** index for the key.  No index is created for INTEGER PRIMARY KEYs.
    +*/
    +SQLITE_PRIVATE void sqlite3AddPrimaryKey(
    +  Parse *pParse,    /* Parsing context */
    +  ExprList *pList,  /* List of field names to be indexed */
    +  int onError,      /* What to do with a uniqueness conflict */
    +  int autoInc,      /* True if the AUTOINCREMENT keyword is present */
    +  int sortOrder     /* SQLITE_SO_ASC or SQLITE_SO_DESC */
    +){
    +  Table *pTab = pParse->pNewTable;
    +  char *zType = 0;
    +  int iCol = -1, i;
    +  if( pTab==0 || IN_DECLARE_VTAB ) goto primary_key_exit;
    +  if( pTab->tabFlags & TF_HasPrimaryKey ){
    +    sqlite3ErrorMsg(pParse, 
    +      "table \"%s\" has more than one primary key", pTab->zName);
    +    goto primary_key_exit;
    +  }
    +  pTab->tabFlags |= TF_HasPrimaryKey;
    +  if( pList==0 ){
    +    iCol = pTab->nCol - 1;
    +    pTab->aCol[iCol].isPrimKey = 1;
    +  }else{
    +    for(i=0; i<pList->nExpr; i++){
    +      for(iCol=0; iCol<pTab->nCol; iCol++){
    +        if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
    +          break;
    +        }
    +      }
    +      if( iCol<pTab->nCol ){
    +        pTab->aCol[iCol].isPrimKey = 1;
    +      }
    +    }
    +    if( pList->nExpr>1 ) iCol = -1;
    +  }
    +  if( iCol>=0 && iCol<pTab->nCol ){
    +    zType = pTab->aCol[iCol].zType;
    +  }
    +  if( zType && sqlite3StrICmp(zType, "INTEGER")==0
    +        && sortOrder==SQLITE_SO_ASC ){
    +    pTab->iPKey = iCol;
    +    pTab->keyConf = (u8)onError;
    +    assert( autoInc==0 || autoInc==1 );
    +    pTab->tabFlags |= autoInc*TF_Autoincrement;
    +  }else if( autoInc ){
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +    sqlite3ErrorMsg(pParse, "AUTOINCREMENT is only allowed on an "
    +       "INTEGER PRIMARY KEY");
    +#endif
    +  }else{
    +    Index *p;
    +    p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, 0, sortOrder, 0);
    +    if( p ){
    +      p->autoIndex = 2;
    +    }
    +    pList = 0;
    +  }
    +
    +primary_key_exit:
    +  sqlite3ExprListDelete(pParse->db, pList);
    +  return;
    +}
    +
    +/*
    +** Add a new CHECK constraint to the table currently under construction.
    +*/
    +SQLITE_PRIVATE void sqlite3AddCheckConstraint(
    +  Parse *pParse,    /* Parsing context */
    +  Expr *pCheckExpr  /* The check expression */
    +){
    +  sqlite3 *db = pParse->db;
    +#ifndef SQLITE_OMIT_CHECK
    +  Table *pTab = pParse->pNewTable;
    +  if( pTab && !IN_DECLARE_VTAB ){
    +    pTab->pCheck = sqlite3ExprAnd(db, pTab->pCheck, pCheckExpr);
    +  }else
    +#endif
    +  {
    +    sqlite3ExprDelete(db, pCheckExpr);
    +  }
    +}
    +
    +/*
    +** Set the collation function of the most recently parsed table column
    +** to the CollSeq given.
    +*/
    +SQLITE_PRIVATE void sqlite3AddCollateType(Parse *pParse, Token *pToken){
    +  Table *p;
    +  int i;
    +  char *zColl;              /* Dequoted name of collation sequence */
    +  sqlite3 *db;
    +
    +  if( (p = pParse->pNewTable)==0 ) return;
    +  i = p->nCol-1;
    +  db = pParse->db;
    +  zColl = sqlite3NameFromToken(db, pToken);
    +  if( !zColl ) return;
    +
    +  if( sqlite3LocateCollSeq(pParse, zColl) ){
    +    Index *pIdx;
    +    p->aCol[i].zColl = zColl;
    +  
    +    /* If the column is declared as "<name> PRIMARY KEY COLLATE <type>",
    +    ** then an index may have been created on this column before the
    +    ** collation type was added. Correct this if it is the case.
    +    */
    +    for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){
    +      assert( pIdx->nColumn==1 );
    +      if( pIdx->aiColumn[0]==i ){
    +        pIdx->azColl[0] = p->aCol[i].zColl;
    +      }
    +    }
    +  }else{
    +    sqlite3DbFree(db, zColl);
    +  }
    +}
    +
    +/*
    +** This function returns the collation sequence for database native text
    +** encoding identified by the string zName, length nName.
    +**
    +** If the requested collation sequence is not available, or not available
    +** in the database native encoding, the collation factory is invoked to
    +** request it. If the collation factory does not supply such a sequence,
    +** and the sequence is available in another text encoding, then that is
    +** returned instead.
    +**
    +** If no versions of the requested collations sequence are available, or
    +** another error occurs, NULL is returned and an error message written into
    +** pParse.
    +**
    +** This routine is a wrapper around sqlite3FindCollSeq().  This routine
    +** invokes the collation factory if the named collation cannot be found
    +** and generates an error message.
    +**
    +** See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()
    +*/
    +SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
    +  sqlite3 *db = pParse->db;
    +  u8 enc = ENC(db);
    +  u8 initbusy = db->init.busy;
    +  CollSeq *pColl;
    +
    +  pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
    +  if( !initbusy && (!pColl || !pColl->xCmp) ){
    +    pColl = sqlite3GetCollSeq(db, enc, pColl, zName);
    +    if( !pColl ){
    +      sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
    +    }
    +  }
    +
    +  return pColl;
    +}
    +
    +
    +/*
    +** Generate code that will increment the schema cookie.
    +**
    +** The schema cookie is used to determine when the schema for the
    +** database changes.  After each schema change, the cookie value
    +** changes.  When a process first reads the schema it records the
    +** cookie.  Thereafter, whenever it goes to access the database,
    +** it checks the cookie to make sure the schema has not changed
    +** since it was last read.
    +**
    +** This plan is not completely bullet-proof.  It is possible for
    +** the schema to change multiple times and for the cookie to be
    +** set back to prior value.  But schema changes are infrequent
    +** and the probability of hitting the same cookie value is only
    +** 1 chance in 2^32.  So we're safe enough.
    +*/
    +SQLITE_PRIVATE void sqlite3ChangeCookie(Parse *pParse, int iDb){
    +  int r1 = sqlite3GetTempReg(pParse);
    +  sqlite3 *db = pParse->db;
    +  Vdbe *v = pParse->pVdbe;
    +  sqlite3VdbeAddOp2(v, OP_Integer, db->aDb[iDb].pSchema->schema_cookie+1, r1);
    +  sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, r1);
    +  sqlite3ReleaseTempReg(pParse, r1);
    +}
    +
    +/*
    +** Measure the number of characters needed to output the given
    +** identifier.  The number returned includes any quotes used
    +** but does not include the null terminator.
    +**
    +** The estimate is conservative.  It might be larger that what is
    +** really needed.
    +*/
    +static int identLength(const char *z){
    +  int n;
    +  for(n=0; *z; n++, z++){
    +    if( *z=='"' ){ n++; }
    +  }
    +  return n + 2;
    +}
    +
    +/*
    +** The first parameter is a pointer to an output buffer. The second 
    +** parameter is a pointer to an integer that contains the offset at
    +** which to write into the output buffer. This function copies the
    +** nul-terminated string pointed to by the third parameter, zSignedIdent,
    +** to the specified offset in the buffer and updates *pIdx to refer
    +** to the first byte after the last byte written before returning.
    +** 
    +** If the string zSignedIdent consists entirely of alpha-numeric
    +** characters, does not begin with a digit and is not an SQL keyword,
    +** then it is copied to the output buffer exactly as it is. Otherwise,
    +** it is quoted using double-quotes.
    +*/
    +static void identPut(char *z, int *pIdx, char *zSignedIdent){
    +  unsigned char *zIdent = (unsigned char*)zSignedIdent;
    +  int i, j, needQuote;
    +  i = *pIdx;
    +
    +  for(j=0; zIdent[j]; j++){
    +    if( !sqlite3Isalnum(zIdent[j]) && zIdent[j]!='_' ) break;
    +  }
    +  needQuote = sqlite3Isdigit(zIdent[0]) || sqlite3KeywordCode(zIdent, j)!=TK_ID;
    +  if( !needQuote ){
    +    needQuote = zIdent[j];
    +  }
    +
    +  if( needQuote ) z[i++] = '"';
    +  for(j=0; zIdent[j]; j++){
    +    z[i++] = zIdent[j];
    +    if( zIdent[j]=='"' ) z[i++] = '"';
    +  }
    +  if( needQuote ) z[i++] = '"';
    +  z[i] = 0;
    +  *pIdx = i;
    +}
    +
    +/*
    +** Generate a CREATE TABLE statement appropriate for the given
    +** table.  Memory to hold the text of the statement is obtained
    +** from sqliteMalloc() and must be freed by the calling function.
    +*/
    +static char *createTableStmt(sqlite3 *db, Table *p){
    +  int i, k, n;
    +  char *zStmt;
    +  char *zSep, *zSep2, *zEnd;
    +  Column *pCol;
    +  n = 0;
    +  for(pCol = p->aCol, i=0; i<p->nCol; i++, pCol++){
    +    n += identLength(pCol->zName) + 5;
    +  }
    +  n += identLength(p->zName);
    +  if( n<50 ){ 
    +    zSep = "";
    +    zSep2 = ",";
    +    zEnd = ")";
    +  }else{
    +    zSep = "\n  ";
    +    zSep2 = ",\n  ";
    +    zEnd = "\n)";
    +  }
    +  n += 35 + 6*p->nCol;
    +  zStmt = sqlite3Malloc( n );
    +  if( zStmt==0 ){
    +    db->mallocFailed = 1;
    +    return 0;
    +  }
    +  sqlite3_snprintf(n, zStmt, "CREATE TABLE ");
    +  k = sqlite3Strlen30(zStmt);
    +  identPut(zStmt, &k, p->zName);
    +  zStmt[k++] = '(';
    +  for(pCol=p->aCol, i=0; i<p->nCol; i++, pCol++){
    +    static const char * const azType[] = {
    +        /* SQLITE_AFF_TEXT    */ " TEXT",
    +        /* SQLITE_AFF_NONE    */ "",
    +        /* SQLITE_AFF_NUMERIC */ " NUM",
    +        /* SQLITE_AFF_INTEGER */ " INT",
    +        /* SQLITE_AFF_REAL    */ " REAL"
    +    };
    +    int len;
    +    const char *zType;
    +
    +    sqlite3_snprintf(n-k, &zStmt[k], zSep);
    +    k += sqlite3Strlen30(&zStmt[k]);
    +    zSep = zSep2;
    +    identPut(zStmt, &k, pCol->zName);
    +    assert( pCol->affinity-SQLITE_AFF_TEXT >= 0 );
    +    assert( pCol->affinity-SQLITE_AFF_TEXT < sizeof(azType)/sizeof(azType[0]) );
    +    testcase( pCol->affinity==SQLITE_AFF_TEXT );
    +    testcase( pCol->affinity==SQLITE_AFF_NONE );
    +    testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
    +    testcase( pCol->affinity==SQLITE_AFF_INTEGER );
    +    testcase( pCol->affinity==SQLITE_AFF_REAL );
    +    
    +    zType = azType[pCol->affinity - SQLITE_AFF_TEXT];
    +    len = sqlite3Strlen30(zType);
    +    assert( pCol->affinity==SQLITE_AFF_NONE 
    +            || pCol->affinity==sqlite3AffinityType(zType) );
    +    memcpy(&zStmt[k], zType, len);
    +    k += len;
    +    assert( k<=n );
    +  }
    +  sqlite3_snprintf(n-k, &zStmt[k], "%s", zEnd);
    +  return zStmt;
    +}
    +
    +/*
    +** This routine is called to report the final ")" that terminates
    +** a CREATE TABLE statement.
    +**
    +** The table structure that other action routines have been building
    +** is added to the internal hash tables, assuming no errors have
    +** occurred.
    +**
    +** An entry for the table is made in the master table on disk, unless
    +** this is a temporary table or db->init.busy==1.  When db->init.busy==1
    +** it means we are reading the sqlite_master table because we just
    +** connected to the database or because the sqlite_master table has
    +** recently changed, so the entry for this table already exists in
    +** the sqlite_master table.  We do not want to create it again.
    +**
    +** If the pSelect argument is not NULL, it means that this routine
    +** was called to create a table generated from a 
    +** "CREATE TABLE ... AS SELECT ..." statement.  The column names of
    +** the new table will match the result set of the SELECT.
    +*/
    +SQLITE_PRIVATE void sqlite3EndTable(
    +  Parse *pParse,          /* Parse context */
    +  Token *pCons,           /* The ',' token after the last column defn. */
    +  Token *pEnd,            /* The final ')' token in the CREATE TABLE */
    +  Select *pSelect         /* Select from a "CREATE ... AS SELECT" */
    +){
    +  Table *p;
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +
    +  if( (pEnd==0 && pSelect==0) || db->mallocFailed ){
    +    return;
    +  }
    +  p = pParse->pNewTable;
    +  if( p==0 ) return;
    +
    +  assert( !db->init.busy || !pSelect );
    +
    +  iDb = sqlite3SchemaToIndex(db, p->pSchema);
    +
    +#ifndef SQLITE_OMIT_CHECK
    +  /* Resolve names in all CHECK constraint expressions.
    +  */
    +  if( p->pCheck ){
    +    SrcList sSrc;                   /* Fake SrcList for pParse->pNewTable */
    +    NameContext sNC;                /* Name context for pParse->pNewTable */
    +
    +    memset(&sNC, 0, sizeof(sNC));
    +    memset(&sSrc, 0, sizeof(sSrc));
    +    sSrc.nSrc = 1;
    +    sSrc.a[0].zName = p->zName;
    +    sSrc.a[0].pTab = p;
    +    sSrc.a[0].iCursor = -1;
    +    sNC.pParse = pParse;
    +    sNC.pSrcList = &sSrc;
    +    sNC.isCheck = 1;
    +    if( sqlite3ResolveExprNames(&sNC, p->pCheck) ){
    +      return;
    +    }
    +  }
    +#endif /* !defined(SQLITE_OMIT_CHECK) */
    +
    +  /* If the db->init.busy is 1 it means we are reading the SQL off the
    +  ** "sqlite_master" or "sqlite_temp_master" table on the disk.
    +  ** So do not write to the disk again.  Extract the root page number
    +  ** for the table from the db->init.newTnum field.  (The page number
    +  ** should have been put there by the sqliteOpenCb routine.)
    +  */
    +  if( db->init.busy ){
    +    p->tnum = db->init.newTnum;
    +  }
    +
    +  /* If not initializing, then create a record for the new table
    +  ** in the SQLITE_MASTER table of the database.
    +  **
    +  ** If this is a TEMPORARY table, write the entry into the auxiliary
    +  ** file instead of into the main database file.
    +  */
    +  if( !db->init.busy ){
    +    int n;
    +    Vdbe *v;
    +    char *zType;    /* "view" or "table" */
    +    char *zType2;   /* "VIEW" or "TABLE" */
    +    char *zStmt;    /* Text of the CREATE TABLE or CREATE VIEW statement */
    +
    +    v = sqlite3GetVdbe(pParse);
    +    if( NEVER(v==0) ) return;
    +
    +    sqlite3VdbeAddOp1(v, OP_Close, 0);
    +
    +    /* 
    +    ** Initialize zType for the new view or table.
    +    */
    +    if( p->pSelect==0 ){
    +      /* A regular table */
    +      zType = "table";
    +      zType2 = "TABLE";
    +#ifndef SQLITE_OMIT_VIEW
    +    }else{
    +      /* A view */
    +      zType = "view";
    +      zType2 = "VIEW";
    +#endif
    +    }
    +
    +    /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
    +    ** statement to populate the new table. The root-page number for the
    +    ** new table is in register pParse->regRoot.
    +    **
    +    ** Once the SELECT has been coded by sqlite3Select(), it is in a
    +    ** suitable state to query for the column names and types to be used
    +    ** by the new table.
    +    **
    +    ** A shared-cache write-lock is not required to write to the new table,
    +    ** as a schema-lock must have already been obtained to create it. Since
    +    ** a schema-lock excludes all other database users, the write-lock would
    +    ** be redundant.
    +    */
    +    if( pSelect ){
    +      SelectDest dest;
    +      Table *pSelTab;
    +
    +      assert(pParse->nTab==1);
    +      sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb);
    +      sqlite3VdbeChangeP5(v, 1);
    +      pParse->nTab = 2;
    +      sqlite3SelectDestInit(&dest, SRT_Table, 1);
    +      sqlite3Select(pParse, pSelect, &dest);
    +      sqlite3VdbeAddOp1(v, OP_Close, 1);
    +      if( pParse->nErr==0 ){
    +        pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
    +        if( pSelTab==0 ) return;
    +        assert( p->aCol==0 );
    +        p->nCol = pSelTab->nCol;
    +        p->aCol = pSelTab->aCol;
    +        pSelTab->nCol = 0;
    +        pSelTab->aCol = 0;
    +        sqlite3DeleteTable(pSelTab);
    +      }
    +    }
    +
    +    /* Compute the complete text of the CREATE statement */
    +    if( pSelect ){
    +      zStmt = createTableStmt(db, p);
    +    }else{
    +      n = (int)(pEnd->z - pParse->sNameToken.z) + 1;
    +      zStmt = sqlite3MPrintf(db, 
    +          "CREATE %s %.*s", zType2, n, pParse->sNameToken.z
    +      );
    +    }
    +
    +    /* A slot for the record has already been allocated in the 
    +    ** SQLITE_MASTER table.  We just need to update that slot with all
    +    ** the information we've collected.
    +    */
    +    sqlite3NestedParse(pParse,
    +      "UPDATE %Q.%s "
    +         "SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q "
    +       "WHERE rowid=#%d",
    +      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
    +      zType,
    +      p->zName,
    +      p->zName,
    +      pParse->regRoot,
    +      zStmt,
    +      pParse->regRowid
    +    );
    +    sqlite3DbFree(db, zStmt);
    +    sqlite3ChangeCookie(pParse, iDb);
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +    /* Check to see if we need to create an sqlite_sequence table for
    +    ** keeping track of autoincrement keys.
    +    */
    +    if( p->tabFlags & TF_Autoincrement ){
    +      Db *pDb = &db->aDb[iDb];
    +      if( pDb->pSchema->pSeqTab==0 ){
    +        sqlite3NestedParse(pParse,
    +          "CREATE TABLE %Q.sqlite_sequence(name,seq)",
    +          pDb->zName
    +        );
    +      }
    +    }
    +#endif
    +
    +    /* Reparse everything to update our internal data structures */
    +    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0,
    +        sqlite3MPrintf(db, "tbl_name='%q'",p->zName), P4_DYNAMIC);
    +  }
    +
    +
    +  /* Add the table to the in-memory representation of the database.
    +  */
    +  if( db->init.busy ){
    +    Table *pOld;
    +    Schema *pSchema = p->pSchema;
    +    pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName,
    +                             sqlite3Strlen30(p->zName),p);
    +    if( pOld ){
    +      assert( p==pOld );  /* Malloc must have failed inside HashInsert() */
    +      db->mallocFailed = 1;
    +      return;
    +    }
    +    pParse->pNewTable = 0;
    +    db->nTable++;
    +    db->flags |= SQLITE_InternChanges;
    +
    +#ifndef SQLITE_OMIT_ALTERTABLE
    +    if( !p->pSelect ){
    +      const char *zName = (const char *)pParse->sNameToken.z;
    +      int nName;
    +      assert( !pSelect && pCons && pEnd );
    +      if( pCons->z==0 ){
    +        pCons = pEnd;
    +      }
    +      nName = (int)((const char *)pCons->z - zName);
    +      p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
    +    }
    +#endif
    +  }
    +}
    +
    +#ifndef SQLITE_OMIT_VIEW
    +/*
    +** The parser calls this routine in order to create a new VIEW
    +*/
    +SQLITE_PRIVATE void sqlite3CreateView(
    +  Parse *pParse,     /* The parsing context */
    +  Token *pBegin,     /* The CREATE token that begins the statement */
    +  Token *pName1,     /* The token that holds the name of the view */
    +  Token *pName2,     /* The token that holds the name of the view */
    +  Select *pSelect,   /* A SELECT statement that will become the new view */
    +  int isTemp,        /* TRUE for a TEMPORARY view */
    +  int noErr          /* Suppress error messages if VIEW already exists */
    +){
    +  Table *p;
    +  int n;
    +  const char *z;
    +  Token sEnd;
    +  DbFixer sFix;
    +  Token *pName;
    +  int iDb;
    +  sqlite3 *db = pParse->db;
    +
    +  if( pParse->nVar>0 ){
    +    sqlite3ErrorMsg(pParse, "parameters are not allowed in views");
    +    sqlite3SelectDelete(db, pSelect);
    +    return;
    +  }
    +  sqlite3StartTable(pParse, pName1, pName2, isTemp, 1, 0, noErr);
    +  p = pParse->pNewTable;
    +  if( p==0 ){
    +    sqlite3SelectDelete(db, pSelect);
    +    return;
    +  }
    +  assert( pParse->nErr==0 ); /* If sqlite3StartTable return non-NULL then
    +                             ** there could not have been an error */
    +  sqlite3TwoPartName(pParse, pName1, pName2, &pName);
    +  iDb = sqlite3SchemaToIndex(db, p->pSchema);
    +  if( sqlite3FixInit(&sFix, pParse, iDb, "view", pName)
    +    && sqlite3FixSelect(&sFix, pSelect)
    +  ){
    +    sqlite3SelectDelete(db, pSelect);
    +    return;
    +  }
    +
    +  /* Make a copy of the entire SELECT statement that defines the view.
    +  ** This will force all the Expr.token.z values to be dynamically
    +  ** allocated rather than point to the input string - which means that
    +  ** they will persist after the current sqlite3_exec() call returns.
    +  */
    +  p->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
    +  sqlite3SelectDelete(db, pSelect);
    +  if( db->mallocFailed ){
    +    return;
    +  }
    +  if( !db->init.busy ){
    +    sqlite3ViewGetColumnNames(pParse, p);
    +  }
    +
    +  /* Locate the end of the CREATE VIEW statement.  Make sEnd point to
    +  ** the end.
    +  */
    +  sEnd = pParse->sLastToken;
    +  if( ALWAYS(sEnd.z[0]!=0) && sEnd.z[0]!=';' ){
    +    sEnd.z += sEnd.n;
    +  }
    +  sEnd.n = 0;
    +  n = (int)(sEnd.z - pBegin->z);
    +  z = pBegin->z;
    +  while( ALWAYS(n>0) && sqlite3Isspace(z[n-1]) ){ n--; }
    +  sEnd.z = &z[n-1];
    +  sEnd.n = 1;
    +
    +  /* Use sqlite3EndTable() to add the view to the SQLITE_MASTER table */
    +  sqlite3EndTable(pParse, 0, &sEnd, 0);
    +  return;
    +}
    +#endif /* SQLITE_OMIT_VIEW */
    +
    +#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
    +/*
    +** The Table structure pTable is really a VIEW.  Fill in the names of
    +** the columns of the view in the pTable structure.  Return the number
    +** of errors.  If an error is seen leave an error message in pParse->zErrMsg.
    +*/
    +SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
    +  Table *pSelTab;   /* A fake table from which we get the result set */
    +  Select *pSel;     /* Copy of the SELECT that implements the view */
    +  int nErr = 0;     /* Number of errors encountered */
    +  int n;            /* Temporarily holds the number of cursors assigned */
    +  sqlite3 *db = pParse->db;  /* Database connection for malloc errors */
    +  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
    +
    +  assert( pTable );
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( sqlite3VtabCallConnect(pParse, pTable) ){
    +    return SQLITE_ERROR;
    +  }
    +  if( IsVirtual(pTable) ) return 0;
    +#endif
    +
    +#ifndef SQLITE_OMIT_VIEW
    +  /* A positive nCol means the columns names for this view are
    +  ** already known.
    +  */
    +  if( pTable->nCol>0 ) return 0;
    +
    +  /* A negative nCol is a special marker meaning that we are currently
    +  ** trying to compute the column names.  If we enter this routine with
    +  ** a negative nCol, it means two or more views form a loop, like this:
    +  **
    +  **     CREATE VIEW one AS SELECT * FROM two;
    +  **     CREATE VIEW two AS SELECT * FROM one;
    +  **
    +  ** Actually, the error above is now caught prior to reaching this point.
    +  ** But the following test is still important as it does come up
    +  ** in the following:
    +  ** 
    +  **     CREATE TABLE main.ex1(a);
    +  **     CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;
    +  **     SELECT * FROM temp.ex1;
    +  */
    +  if( pTable->nCol<0 ){
    +    sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
    +    return 1;
    +  }
    +  assert( pTable->nCol>=0 );
    +
    +  /* If we get this far, it means we need to compute the table names.
    +  ** Note that the call to sqlite3ResultSetOfSelect() will expand any
    +  ** "*" elements in the results set of the view and will assign cursors
    +  ** to the elements of the FROM clause.  But we do not want these changes
    +  ** to be permanent.  So the computation is done on a copy of the SELECT
    +  ** statement that defines the view.
    +  */
    +  assert( pTable->pSelect );
    +  pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
    +  if( pSel ){
    +    u8 enableLookaside = db->lookaside.bEnabled;
    +    n = pParse->nTab;
    +    sqlite3SrcListAssignCursors(pParse, pSel->pSrc);
    +    pTable->nCol = -1;
    +    db->lookaside.bEnabled = 0;
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +    xAuth = db->xAuth;
    +    db->xAuth = 0;
    +    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
    +    db->xAuth = xAuth;
    +#else
    +    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
    +#endif
    +    db->lookaside.bEnabled = enableLookaside;
    +    pParse->nTab = n;
    +    if( pSelTab ){
    +      assert( pTable->aCol==0 );
    +      pTable->nCol = pSelTab->nCol;
    +      pTable->aCol = pSelTab->aCol;
    +      pSelTab->nCol = 0;
    +      pSelTab->aCol = 0;
    +      sqlite3DeleteTable(pSelTab);
    +      pTable->pSchema->flags |= DB_UnresetViews;
    +    }else{
    +      pTable->nCol = 0;
    +      nErr++;
    +    }
    +    sqlite3SelectDelete(db, pSel);
    +  } else {
    +    nErr++;
    +  }
    +#endif /* SQLITE_OMIT_VIEW */
    +  return nErr;  
    +}
    +#endif /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */
    +
    +#ifndef SQLITE_OMIT_VIEW
    +/*
    +** Clear the column names from every VIEW in database idx.
    +*/
    +static void sqliteViewResetAll(sqlite3 *db, int idx){
    +  HashElem *i;
    +  if( !DbHasProperty(db, idx, DB_UnresetViews) ) return;
    +  for(i=sqliteHashFirst(&db->aDb[idx].pSchema->tblHash); i;i=sqliteHashNext(i)){
    +    Table *pTab = sqliteHashData(i);
    +    if( pTab->pSelect ){
    +      sqliteResetColumnNames(pTab);
    +    }
    +  }
    +  DbClearProperty(db, idx, DB_UnresetViews);
    +}
    +#else
    +# define sqliteViewResetAll(A,B)
    +#endif /* SQLITE_OMIT_VIEW */
    +
    +/*
    +** This function is called by the VDBE to adjust the internal schema
    +** used by SQLite when the btree layer moves a table root page. The
    +** root-page of a table or index in database iDb has changed from iFrom
    +** to iTo.
    +**
    +** Ticket #1728:  The symbol table might still contain information
    +** on tables and/or indices that are the process of being deleted.
    +** If you are unlucky, one of those deleted indices or tables might
    +** have the same rootpage number as the real table or index that is
    +** being moved.  So we cannot stop searching after the first match 
    +** because the first match might be for one of the deleted indices
    +** or tables and not the table/index that is actually being moved.
    +** We must continue looping until all tables and indices with
    +** rootpage==iFrom have been converted to have a rootpage of iTo
    +** in order to be certain that we got the right one.
    +*/
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +SQLITE_PRIVATE void sqlite3RootPageMoved(Db *pDb, int iFrom, int iTo){
    +  HashElem *pElem;
    +  Hash *pHash;
    +
    +  pHash = &pDb->pSchema->tblHash;
    +  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
    +    Table *pTab = sqliteHashData(pElem);
    +    if( pTab->tnum==iFrom ){
    +      pTab->tnum = iTo;
    +    }
    +  }
    +  pHash = &pDb->pSchema->idxHash;
    +  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
    +    Index *pIdx = sqliteHashData(pElem);
    +    if( pIdx->tnum==iFrom ){
    +      pIdx->tnum = iTo;
    +    }
    +  }
    +}
    +#endif
    +
    +/*
    +** Write code to erase the table with root-page iTable from database iDb.
    +** Also write code to modify the sqlite_master table and internal schema
    +** if a root-page of another table is moved by the btree-layer whilst
    +** erasing iTable (this can happen with an auto-vacuum database).
    +*/ 
    +static void destroyRootPage(Parse *pParse, int iTable, int iDb){
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  int r1 = sqlite3GetTempReg(pParse);
    +  sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
    +  sqlite3MayAbort(pParse);
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  /* OP_Destroy stores an in integer r1. If this integer
    +  ** is non-zero, then it is the root page number of a table moved to
    +  ** location iTable. The following code modifies the sqlite_master table to
    +  ** reflect this.
    +  **
    +  ** The "#NNN" in the SQL is a special constant that means whatever value
    +  ** is in register NNN.  See grammar rules associated with the TK_REGISTER
    +  ** token for additional information.
    +  */
    +  sqlite3NestedParse(pParse, 
    +     "UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d",
    +     pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
    +#endif
    +  sqlite3ReleaseTempReg(pParse, r1);
    +}
    +
    +/*
    +** Write VDBE code to erase table pTab and all associated indices on disk.
    +** Code to update the sqlite_master tables and internal schema definitions
    +** in case a root-page belonging to another table is moved by the btree layer
    +** is also added (this can happen with an auto-vacuum database).
    +*/
    +static void destroyTable(Parse *pParse, Table *pTab){
    +#ifdef SQLITE_OMIT_AUTOVACUUM
    +  Index *pIdx;
    +  int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +  destroyRootPage(pParse, pTab->tnum, iDb);
    +  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +    destroyRootPage(pParse, pIdx->tnum, iDb);
    +  }
    +#else
    +  /* If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM
    +  ** is not defined), then it is important to call OP_Destroy on the
    +  ** table and index root-pages in order, starting with the numerically 
    +  ** largest root-page number. This guarantees that none of the root-pages
    +  ** to be destroyed is relocated by an earlier OP_Destroy. i.e. if the
    +  ** following were coded:
    +  **
    +  ** OP_Destroy 4 0
    +  ** ...
    +  ** OP_Destroy 5 0
    +  **
    +  ** and root page 5 happened to be the largest root-page number in the
    +  ** database, then root page 5 would be moved to page 4 by the 
    +  ** "OP_Destroy 4 0" opcode. The subsequent "OP_Destroy 5 0" would hit
    +  ** a free-list page.
    +  */
    +  int iTab = pTab->tnum;
    +  int iDestroyed = 0;
    +
    +  while( 1 ){
    +    Index *pIdx;
    +    int iLargest = 0;
    +
    +    if( iDestroyed==0 || iTab<iDestroyed ){
    +      iLargest = iTab;
    +    }
    +    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +      int iIdx = pIdx->tnum;
    +      assert( pIdx->pSchema==pTab->pSchema );
    +      if( (iDestroyed==0 || (iIdx<iDestroyed)) && iIdx>iLargest ){
    +        iLargest = iIdx;
    +      }
    +    }
    +    if( iLargest==0 ){
    +      return;
    +    }else{
    +      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +      destroyRootPage(pParse, iLargest, iDb);
    +      iDestroyed = iLargest;
    +    }
    +  }
    +#endif
    +}
    +
    +/*
    +** This routine is called to do the work of a DROP TABLE statement.
    +** pName is the name of the table to be dropped.
    +*/
    +SQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, int noErr){
    +  Table *pTab;
    +  Vdbe *v;
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +
    +  if( db->mallocFailed ){
    +    goto exit_drop_table;
    +  }
    +  assert( pParse->nErr==0 );
    +  assert( pName->nSrc==1 );
    +  pTab = sqlite3LocateTable(pParse, isView, 
    +                            pName->a[0].zName, pName->a[0].zDatabase);
    +
    +  if( pTab==0 ){
    +    if( noErr ){
    +      sqlite3ErrorClear(pParse);
    +    }
    +    goto exit_drop_table;
    +  }
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  assert( iDb>=0 && iDb<db->nDb );
    +
    +  /* If pTab is a virtual table, call ViewGetColumnNames() to ensure
    +  ** it is initialized.
    +  */
    +  if( IsVirtual(pTab) && sqlite3ViewGetColumnNames(pParse, pTab) ){
    +    goto exit_drop_table;
    +  }
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  {
    +    int code;
    +    const char *zTab = SCHEMA_TABLE(iDb);
    +    const char *zDb = db->aDb[iDb].zName;
    +    const char *zArg2 = 0;
    +    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb)){
    +      goto exit_drop_table;
    +    }
    +    if( isView ){
    +      if( !OMIT_TEMPDB && iDb==1 ){
    +        code = SQLITE_DROP_TEMP_VIEW;
    +      }else{
    +        code = SQLITE_DROP_VIEW;
    +      }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    }else if( IsVirtual(pTab) ){
    +      code = SQLITE_DROP_VTABLE;
    +      zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
    +#endif
    +    }else{
    +      if( !OMIT_TEMPDB && iDb==1 ){
    +        code = SQLITE_DROP_TEMP_TABLE;
    +      }else{
    +        code = SQLITE_DROP_TABLE;
    +      }
    +    }
    +    if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
    +      goto exit_drop_table;
    +    }
    +    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
    +      goto exit_drop_table;
    +    }
    +  }
    +#endif
    +  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
    +    sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
    +    goto exit_drop_table;
    +  }
    +
    +#ifndef SQLITE_OMIT_VIEW
    +  /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
    +  ** on a table.
    +  */
    +  if( isView && pTab->pSelect==0 ){
    +    sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
    +    goto exit_drop_table;
    +  }
    +  if( !isView && pTab->pSelect ){
    +    sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
    +    goto exit_drop_table;
    +  }
    +#endif
    +
    +  /* Generate code to remove the table from the master table
    +  ** on disk.
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    Trigger *pTrigger;
    +    Db *pDb = &db->aDb[iDb];
    +    sqlite3BeginWriteOperation(pParse, 1, iDb);
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( IsVirtual(pTab) ){
    +      sqlite3VdbeAddOp0(v, OP_VBegin);
    +    }
    +#endif
    +    sqlite3FkDropTable(pParse, pName, pTab);
    +
    +    /* Drop all triggers associated with the table being dropped. Code
    +    ** is generated to remove entries from sqlite_master and/or
    +    ** sqlite_temp_master if required.
    +    */
    +    pTrigger = sqlite3TriggerList(pParse, pTab);
    +    while( pTrigger ){
    +      assert( pTrigger->pSchema==pTab->pSchema || 
    +          pTrigger->pSchema==db->aDb[1].pSchema );
    +      sqlite3DropTriggerPtr(pParse, pTrigger);
    +      pTrigger = pTrigger->pNext;
    +    }
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +    /* Remove any entries of the sqlite_sequence table associated with
    +    ** the table being dropped. This is done before the table is dropped
    +    ** at the btree level, in case the sqlite_sequence table needs to
    +    ** move as a result of the drop (can happen in auto-vacuum mode).
    +    */
    +    if( pTab->tabFlags & TF_Autoincrement ){
    +      sqlite3NestedParse(pParse,
    +        "DELETE FROM %s.sqlite_sequence WHERE name=%Q",
    +        pDb->zName, pTab->zName
    +      );
    +    }
    +#endif
    +
    +    /* Drop all SQLITE_MASTER table and index entries that refer to the
    +    ** table. The program name loops through the master table and deletes
    +    ** every row that refers to a table of the same name as the one being
    +    ** dropped. Triggers are handled seperately because a trigger can be
    +    ** created in the temp database that refers to a table in another
    +    ** database.
    +    */
    +    sqlite3NestedParse(pParse, 
    +        "DELETE FROM %Q.%s WHERE tbl_name=%Q and type!='trigger'",
    +        pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
    +
    +    /* Drop any statistics from the sqlite_stat1 table, if it exists */
    +    if( sqlite3FindTable(db, "sqlite_stat1", db->aDb[iDb].zName) ){
    +      sqlite3NestedParse(pParse,
    +        "DELETE FROM %Q.sqlite_stat1 WHERE tbl=%Q", pDb->zName, pTab->zName
    +      );
    +    }
    +
    +    if( !isView && !IsVirtual(pTab) ){
    +      destroyTable(pParse, pTab);
    +    }
    +
    +    /* Remove the table entry from SQLite's internal schema and modify
    +    ** the schema cookie.
    +    */
    +    if( IsVirtual(pTab) ){
    +      sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);
    +    }
    +    sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
    +    sqlite3ChangeCookie(pParse, iDb);
    +  }
    +  sqliteViewResetAll(db, iDb);
    +
    +exit_drop_table:
    +  sqlite3SrcListDelete(db, pName);
    +}
    +
    +/*
    +** This routine is called to create a new foreign key on the table
    +** currently under construction.  pFromCol determines which columns
    +** in the current table point to the foreign key.  If pFromCol==0 then
    +** connect the key to the last column inserted.  pTo is the name of
    +** the table referred to.  pToCol is a list of tables in the other
    +** pTo table that the foreign key points to.  flags contains all
    +** information about the conflict resolution algorithms specified
    +** in the ON DELETE, ON UPDATE and ON INSERT clauses.
    +**
    +** An FKey structure is created and added to the table currently
    +** under construction in the pParse->pNewTable field.
    +**
    +** The foreign key is set for IMMEDIATE processing.  A subsequent call
    +** to sqlite3DeferForeignKey() might change this to DEFERRED.
    +*/
    +SQLITE_PRIVATE void sqlite3CreateForeignKey(
    +  Parse *pParse,       /* Parsing context */
    +  ExprList *pFromCol,  /* Columns in this table that point to other table */
    +  Token *pTo,          /* Name of the other table */
    +  ExprList *pToCol,    /* Columns in the other table */
    +  int flags            /* Conflict resolution algorithms. */
    +){
    +  sqlite3 *db = pParse->db;
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +  FKey *pFKey = 0;
    +  FKey *pNextTo;
    +  Table *p = pParse->pNewTable;
    +  int nByte;
    +  int i;
    +  int nCol;
    +  char *z;
    +
    +  assert( pTo!=0 );
    +  if( p==0 || IN_DECLARE_VTAB ) goto fk_end;
    +  if( pFromCol==0 ){
    +    int iCol = p->nCol-1;
    +    if( NEVER(iCol<0) ) goto fk_end;
    +    if( pToCol && pToCol->nExpr!=1 ){
    +      sqlite3ErrorMsg(pParse, "foreign key on %s"
    +         " should reference only one column of table %T",
    +         p->aCol[iCol].zName, pTo);
    +      goto fk_end;
    +    }
    +    nCol = 1;
    +  }else if( pToCol && pToCol->nExpr!=pFromCol->nExpr ){
    +    sqlite3ErrorMsg(pParse,
    +        "number of columns in foreign key does not match the number of "
    +        "columns in the referenced table");
    +    goto fk_end;
    +  }else{
    +    nCol = pFromCol->nExpr;
    +  }
    +  nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
    +  if( pToCol ){
    +    for(i=0; i<pToCol->nExpr; i++){
    +      nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
    +    }
    +  }
    +  pFKey = sqlite3DbMallocZero(db, nByte );
    +  if( pFKey==0 ){
    +    goto fk_end;
    +  }
    +  pFKey->pFrom = p;
    +  pFKey->pNextFrom = p->pFKey;
    +  z = (char*)&pFKey->aCol[nCol];
    +  pFKey->zTo = z;
    +  memcpy(z, pTo->z, pTo->n);
    +  z[pTo->n] = 0;
    +  sqlite3Dequote(z);
    +  z += pTo->n+1;
    +  pFKey->nCol = nCol;
    +  if( pFromCol==0 ){
    +    pFKey->aCol[0].iFrom = p->nCol-1;
    +  }else{
    +    for(i=0; i<nCol; i++){
    +      int j;
    +      for(j=0; j<p->nCol; j++){
    +        if( sqlite3StrICmp(p->aCol[j].zName, pFromCol->a[i].zName)==0 ){
    +          pFKey->aCol[i].iFrom = j;
    +          break;
    +        }
    +      }
    +      if( j>=p->nCol ){
    +        sqlite3ErrorMsg(pParse, 
    +          "unknown column \"%s\" in foreign key definition", 
    +          pFromCol->a[i].zName);
    +        goto fk_end;
    +      }
    +    }
    +  }
    +  if( pToCol ){
    +    for(i=0; i<nCol; i++){
    +      int n = sqlite3Strlen30(pToCol->a[i].zName);
    +      pFKey->aCol[i].zCol = z;
    +      memcpy(z, pToCol->a[i].zName, n);
    +      z[n] = 0;
    +      z += n+1;
    +    }
    +  }
    +  pFKey->isDeferred = 0;
    +  pFKey->aAction[0] = (u8)(flags & 0xff);            /* ON DELETE action */
    +  pFKey->aAction[1] = (u8)((flags >> 8 ) & 0xff);    /* ON UPDATE action */
    +
    +  pNextTo = (FKey *)sqlite3HashInsert(&p->pSchema->fkeyHash, 
    +      pFKey->zTo, sqlite3Strlen30(pFKey->zTo), (void *)pFKey
    +  );
    +  if( pNextTo==pFKey ){
    +    db->mallocFailed = 1;
    +    goto fk_end;
    +  }
    +  if( pNextTo ){
    +    assert( pNextTo->pPrevTo==0 );
    +    pFKey->pNextTo = pNextTo;
    +    pNextTo->pPrevTo = pFKey;
    +  }
    +
    +  /* Link the foreign key to the table as the last step.
    +  */
    +  p->pFKey = pFKey;
    +  pFKey = 0;
    +
    +fk_end:
    +  sqlite3DbFree(db, pFKey);
    +#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
    +  sqlite3ExprListDelete(db, pFromCol);
    +  sqlite3ExprListDelete(db, pToCol);
    +}
    +
    +/*
    +** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED
    +** clause is seen as part of a foreign key definition.  The isDeferred
    +** parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.
    +** The behavior of the most recently created foreign key is adjusted
    +** accordingly.
    +*/
    +SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse *pParse, int isDeferred){
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +  Table *pTab;
    +  FKey *pFKey;
    +  if( (pTab = pParse->pNewTable)==0 || (pFKey = pTab->pFKey)==0 ) return;
    +  assert( isDeferred==0 || isDeferred==1 ); /* EV: R-30323-21917 */
    +  pFKey->isDeferred = (u8)isDeferred;
    +#endif
    +}
    +
    +/*
    +** Generate code that will erase and refill index *pIdx.  This is
    +** used to initialize a newly created index or to recompute the
    +** content of an index in response to a REINDEX command.
    +**
    +** if memRootPage is not negative, it means that the index is newly
    +** created.  The register specified by memRootPage contains the
    +** root page number of the index.  If memRootPage is negative, then
    +** the index already exists and must be cleared before being refilled and
    +** the root page number of the index is taken from pIndex->tnum.
    +*/
    +static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
    +  Table *pTab = pIndex->pTable;  /* The table that is indexed */
    +  int iTab = pParse->nTab++;     /* Btree cursor used for pTab */
    +  int iIdx = pParse->nTab++;     /* Btree cursor used for pIndex */
    +  int addr1;                     /* Address of top of loop */
    +  int tnum;                      /* Root page of index */
    +  Vdbe *v;                       /* Generate code into this virtual machine */
    +  KeyInfo *pKey;                 /* KeyInfo for index */
    +  int regIdxKey;                 /* Registers containing the index key */
    +  int regRecord;                 /* Register holding assemblied index record */
    +  sqlite3 *db = pParse->db;      /* The database connection */
    +  int iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,
    +      db->aDb[iDb].zName ) ){
    +    return;
    +  }
    +#endif
    +
    +  /* Require a write-lock on the table to perform this operation */
    +  sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
    +
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ) return;
    +  if( memRootPage>=0 ){
    +    tnum = memRootPage;
    +  }else{
    +    tnum = pIndex->tnum;
    +    sqlite3VdbeAddOp2(v, OP_Clear, tnum, iDb);
    +  }
    +  pKey = sqlite3IndexKeyinfo(pParse, pIndex);
    +  sqlite3VdbeAddOp4(v, OP_OpenWrite, iIdx, tnum, iDb, 
    +                    (char *)pKey, P4_KEYINFO_HANDOFF);
    +  if( memRootPage>=0 ){
    +    sqlite3VdbeChangeP5(v, 1);
    +  }
    +  sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
    +  addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0);
    +  regRecord = sqlite3GetTempReg(pParse);
    +  regIdxKey = sqlite3GenerateIndexKey(pParse, pIndex, iTab, regRecord, 1);
    +  if( pIndex->onError!=OE_None ){
    +    const int regRowid = regIdxKey + pIndex->nColumn;
    +    const int j2 = sqlite3VdbeCurrentAddr(v) + 2;
    +    void * const pRegKey = SQLITE_INT_TO_PTR(regIdxKey);
    +
    +    /* The registers accessed by the OP_IsUnique opcode were allocated
    +    ** using sqlite3GetTempRange() inside of the sqlite3GenerateIndexKey()
    +    ** call above. Just before that function was freed they were released
    +    ** (made available to the compiler for reuse) using 
    +    ** sqlite3ReleaseTempRange(). So in some ways having the OP_IsUnique
    +    ** opcode use the values stored within seems dangerous. However, since
    +    ** we can be sure that no other temp registers have been allocated
    +    ** since sqlite3ReleaseTempRange() was called, it is safe to do so.
    +    */
    +    sqlite3VdbeAddOp4(v, OP_IsUnique, iIdx, j2, regRowid, pRegKey, P4_INT32);
    +    sqlite3HaltConstraint(
    +        pParse, OE_Abort, "indexed columns are not unique", P4_STATIC);
    +  }
    +  sqlite3VdbeAddOp2(v, OP_IdxInsert, iIdx, regRecord);
    +  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
    +  sqlite3ReleaseTempReg(pParse, regRecord);
    +  sqlite3VdbeAddOp2(v, OP_Next, iTab, addr1+1);
    +  sqlite3VdbeJumpHere(v, addr1);
    +  sqlite3VdbeAddOp1(v, OP_Close, iTab);
    +  sqlite3VdbeAddOp1(v, OP_Close, iIdx);
    +}
    +
    +/*
    +** Create a new index for an SQL table.  pName1.pName2 is the name of the index 
    +** and pTblList is the name of the table that is to be indexed.  Both will 
    +** be NULL for a primary key or an index that is created to satisfy a
    +** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
    +** as the table to be indexed.  pParse->pNewTable is a table that is
    +** currently being constructed by a CREATE TABLE statement.
    +**
    +** pList is a list of columns to be indexed.  pList will be NULL if this
    +** is a primary key or unique-constraint on the most recent column added
    +** to the table currently under construction.  
    +**
    +** If the index is created successfully, return a pointer to the new Index
    +** structure. This is used by sqlite3AddPrimaryKey() to mark the index
    +** as the tables primary key (Index.autoIndex==2).
    +*/
    +SQLITE_PRIVATE Index *sqlite3CreateIndex(
    +  Parse *pParse,     /* All information about this parse */
    +  Token *pName1,     /* First part of index name. May be NULL */
    +  Token *pName2,     /* Second part of index name. May be NULL */
    +  SrcList *pTblName, /* Table to index. Use pParse->pNewTable if 0 */
    +  ExprList *pList,   /* A list of columns to be indexed */
    +  int onError,       /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
    +  Token *pStart,     /* The CREATE token that begins this statement */
    +  Token *pEnd,       /* The ")" that closes the CREATE INDEX statement */
    +  int sortOrder,     /* Sort order of primary key when pList==NULL */
    +  int ifNotExist     /* Omit error if index already exists */
    +){
    +  Index *pRet = 0;     /* Pointer to return */
    +  Table *pTab = 0;     /* Table to be indexed */
    +  Index *pIndex = 0;   /* The index to be created */
    +  char *zName = 0;     /* Name of the index */
    +  int nName;           /* Number of characters in zName */
    +  int i, j;
    +  Token nullId;        /* Fake token for an empty ID list */
    +  DbFixer sFix;        /* For assigning database names to pTable */
    +  int sortOrderMask;   /* 1 to honor DESC in index.  0 to ignore. */
    +  sqlite3 *db = pParse->db;
    +  Db *pDb;             /* The specific table containing the indexed database */
    +  int iDb;             /* Index of the database that is being written */
    +  Token *pName = 0;    /* Unqualified name of the index to create */
    +  struct ExprList_item *pListItem; /* For looping over pList */
    +  int nCol;
    +  int nExtra = 0;
    +  char *zExtra;
    +
    +  assert( pStart==0 || pEnd!=0 ); /* pEnd must be non-NULL if pStart is */
    +  assert( pParse->nErr==0 );      /* Never called with prior errors */
    +  if( db->mallocFailed || IN_DECLARE_VTAB ){
    +    goto exit_create_index;
    +  }
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    goto exit_create_index;
    +  }
    +
    +  /*
    +  ** Find the table that is to be indexed.  Return early if not found.
    +  */
    +  if( pTblName!=0 ){
    +
    +    /* Use the two-part index name to determine the database 
    +    ** to search for the table. 'Fix' the table name to this db
    +    ** before looking up the table.
    +    */
    +    assert( pName1 && pName2 );
    +    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
    +    if( iDb<0 ) goto exit_create_index;
    +
    +#ifndef SQLITE_OMIT_TEMPDB
    +    /* If the index name was unqualified, check if the the table
    +    ** is a temp table. If so, set the database to 1. Do not do this
    +    ** if initialising a database schema.
    +    */
    +    if( !db->init.busy ){
    +      pTab = sqlite3SrcListLookup(pParse, pTblName);
    +      if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){
    +        iDb = 1;
    +      }
    +    }
    +#endif
    +
    +    if( sqlite3FixInit(&sFix, pParse, iDb, "index", pName) &&
    +        sqlite3FixSrcList(&sFix, pTblName)
    +    ){
    +      /* Because the parser constructs pTblName from a single identifier,
    +      ** sqlite3FixSrcList can never fail. */
    +      assert(0);
    +    }
    +    pTab = sqlite3LocateTable(pParse, 0, pTblName->a[0].zName, 
    +        pTblName->a[0].zDatabase);
    +    if( !pTab || db->mallocFailed ) goto exit_create_index;
    +    assert( db->aDb[iDb].pSchema==pTab->pSchema );
    +  }else{
    +    assert( pName==0 );
    +    pTab = pParse->pNewTable;
    +    if( !pTab ) goto exit_create_index;
    +    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  }
    +  pDb = &db->aDb[iDb];
    +
    +  assert( pTab!=0 );
    +  assert( pParse->nErr==0 );
    +  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 
    +       && memcmp(&pTab->zName[7],"altertab_",9)!=0 ){
    +    sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
    +    goto exit_create_index;
    +  }
    +#ifndef SQLITE_OMIT_VIEW
    +  if( pTab->pSelect ){
    +    sqlite3ErrorMsg(pParse, "views may not be indexed");
    +    goto exit_create_index;
    +  }
    +#endif
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( IsVirtual(pTab) ){
    +    sqlite3ErrorMsg(pParse, "virtual tables may not be indexed");
    +    goto exit_create_index;
    +  }
    +#endif
    +
    +  /*
    +  ** Find the name of the index.  Make sure there is not already another
    +  ** index or table with the same name.  
    +  **
    +  ** Exception:  If we are reading the names of permanent indices from the
    +  ** sqlite_master table (because some other process changed the schema) and
    +  ** one of the index names collides with the name of a temporary table or
    +  ** index, then we will continue to process this index.
    +  **
    +  ** If pName==0 it means that we are
    +  ** dealing with a primary key or UNIQUE constraint.  We have to invent our
    +  ** own name.
    +  */
    +  if( pName ){
    +    zName = sqlite3NameFromToken(db, pName);
    +    if( zName==0 ) goto exit_create_index;
    +    if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
    +      goto exit_create_index;
    +    }
    +    if( !db->init.busy ){
    +      if( sqlite3FindTable(db, zName, 0)!=0 ){
    +        sqlite3ErrorMsg(pParse, "there is already a table named %s", zName);
    +        goto exit_create_index;
    +      }
    +    }
    +    if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
    +      if( !ifNotExist ){
    +        sqlite3ErrorMsg(pParse, "index %s already exists", zName);
    +      }
    +      goto exit_create_index;
    +    }
    +  }else{
    +    int n;
    +    Index *pLoop;
    +    for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}
    +    zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
    +    if( zName==0 ){
    +      goto exit_create_index;
    +    }
    +  }
    +
    +  /* Check for authorization to create an index.
    +  */
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  {
    +    const char *zDb = pDb->zName;
    +    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iDb), 0, zDb) ){
    +      goto exit_create_index;
    +    }
    +    i = SQLITE_CREATE_INDEX;
    +    if( !OMIT_TEMPDB && iDb==1 ) i = SQLITE_CREATE_TEMP_INDEX;
    +    if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){
    +      goto exit_create_index;
    +    }
    +  }
    +#endif
    +
    +  /* If pList==0, it means this routine was called to make a primary
    +  ** key out of the last column added to the table under construction.
    +  ** So create a fake list to simulate this.
    +  */
    +  if( pList==0 ){
    +    nullId.z = pTab->aCol[pTab->nCol-1].zName;
    +    nullId.n = sqlite3Strlen30((char*)nullId.z);
    +    pList = sqlite3ExprListAppend(pParse, 0, 0);
    +    if( pList==0 ) goto exit_create_index;
    +    sqlite3ExprListSetName(pParse, pList, &nullId, 0);
    +    pList->a[0].sortOrder = (u8)sortOrder;
    +  }
    +
    +  /* Figure out how many bytes of space are required to store explicitly
    +  ** specified collation sequence names.
    +  */
    +  for(i=0; i<pList->nExpr; i++){
    +    Expr *pExpr = pList->a[i].pExpr;
    +    if( pExpr ){
    +      CollSeq *pColl = pExpr->pColl;
    +      /* Either pColl!=0 or there was an OOM failure.  But if an OOM
    +      ** failure we have quit before reaching this point. */
    +      if( ALWAYS(pColl) ){
    +        nExtra += (1 + sqlite3Strlen30(pColl->zName));
    +      }
    +    }
    +  }
    +
    +  /* 
    +  ** Allocate the index structure. 
    +  */
    +  nName = sqlite3Strlen30(zName);
    +  nCol = pList->nExpr;
    +  pIndex = sqlite3DbMallocZero(db, 
    +      sizeof(Index) +              /* Index structure  */
    +      sizeof(int)*nCol +           /* Index.aiColumn   */
    +      sizeof(int)*(nCol+1) +       /* Index.aiRowEst   */
    +      sizeof(char *)*nCol +        /* Index.azColl     */
    +      sizeof(u8)*nCol +            /* Index.aSortOrder */
    +      nName + 1 +                  /* Index.zName      */
    +      nExtra                       /* Collation sequence names */
    +  );
    +  if( db->mallocFailed ){
    +    goto exit_create_index;
    +  }
    +  pIndex->azColl = (char**)(&pIndex[1]);
    +  pIndex->aiColumn = (int *)(&pIndex->azColl[nCol]);
    +  pIndex->aiRowEst = (unsigned *)(&pIndex->aiColumn[nCol]);
    +  pIndex->aSortOrder = (u8 *)(&pIndex->aiRowEst[nCol+1]);
    +  pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]);
    +  zExtra = (char *)(&pIndex->zName[nName+1]);
    +  memcpy(pIndex->zName, zName, nName+1);
    +  pIndex->pTable = pTab;
    +  pIndex->nColumn = pList->nExpr;
    +  pIndex->onError = (u8)onError;
    +  pIndex->autoIndex = (u8)(pName==0);
    +  pIndex->pSchema = db->aDb[iDb].pSchema;
    +
    +  /* Check to see if we should honor DESC requests on index columns
    +  */
    +  if( pDb->pSchema->file_format>=4 ){
    +    sortOrderMask = -1;   /* Honor DESC */
    +  }else{
    +    sortOrderMask = 0;    /* Ignore DESC */
    +  }
    +
    +  /* Scan the names of the columns of the table to be indexed and
    +  ** load the column indices into the Index structure.  Report an error
    +  ** if any column is not found.
    +  **
    +  ** TODO:  Add a test to make sure that the same column is not named
    +  ** more than once within the same index.  Only the first instance of
    +  ** the column will ever be used by the optimizer.  Note that using the
    +  ** same column more than once cannot be an error because that would 
    +  ** break backwards compatibility - it needs to be a warning.
    +  */
    +  for(i=0, pListItem=pList->a; i<pList->nExpr; i++, pListItem++){
    +    const char *zColName = pListItem->zName;
    +    Column *pTabCol;
    +    int requestedSortOrder;
    +    char *zColl;                   /* Collation sequence name */
    +
    +    for(j=0, pTabCol=pTab->aCol; j<pTab->nCol; j++, pTabCol++){
    +      if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
    +    }
    +    if( j>=pTab->nCol ){
    +      sqlite3ErrorMsg(pParse, "table %s has no column named %s",
    +        pTab->zName, zColName);
    +      goto exit_create_index;
    +    }
    +    pIndex->aiColumn[i] = j;
    +    /* Justification of the ALWAYS(pListItem->pExpr->pColl):  Because of
    +    ** the way the "idxlist" non-terminal is constructed by the parser,
    +    ** if pListItem->pExpr is not null then either pListItem->pExpr->pColl
    +    ** must exist or else there must have been an OOM error.  But if there
    +    ** was an OOM error, we would never reach this point. */
    +    if( pListItem->pExpr && ALWAYS(pListItem->pExpr->pColl) ){
    +      int nColl;
    +      zColl = pListItem->pExpr->pColl->zName;
    +      nColl = sqlite3Strlen30(zColl) + 1;
    +      assert( nExtra>=nColl );
    +      memcpy(zExtra, zColl, nColl);
    +      zColl = zExtra;
    +      zExtra += nColl;
    +      nExtra -= nColl;
    +    }else{
    +      zColl = pTab->aCol[j].zColl;
    +      if( !zColl ){
    +        zColl = db->pDfltColl->zName;
    +      }
    +    }
    +    if( !db->init.busy && !sqlite3LocateCollSeq(pParse, zColl) ){
    +      goto exit_create_index;
    +    }
    +    pIndex->azColl[i] = zColl;
    +    requestedSortOrder = pListItem->sortOrder & sortOrderMask;
    +    pIndex->aSortOrder[i] = (u8)requestedSortOrder;
    +  }
    +  sqlite3DefaultRowEst(pIndex);
    +
    +  if( pTab==pParse->pNewTable ){
    +    /* This routine has been called to create an automatic index as a
    +    ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or
    +    ** a PRIMARY KEY or UNIQUE clause following the column definitions.
    +    ** i.e. one of:
    +    **
    +    ** CREATE TABLE t(x PRIMARY KEY, y);
    +    ** CREATE TABLE t(x, y, UNIQUE(x, y));
    +    **
    +    ** Either way, check to see if the table already has such an index. If
    +    ** so, don't bother creating this one. This only applies to
    +    ** automatically created indices. Users can do as they wish with
    +    ** explicit indices.
    +    **
    +    ** Two UNIQUE or PRIMARY KEY constraints are considered equivalent
    +    ** (and thus suppressing the second one) even if they have different
    +    ** sort orders.
    +    **
    +    ** If there are different collating sequences or if the columns of
    +    ** the constraint occur in different orders, then the constraints are
    +    ** considered distinct and both result in separate indices.
    +    */
    +    Index *pIdx;
    +    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +      int k;
    +      assert( pIdx->onError!=OE_None );
    +      assert( pIdx->autoIndex );
    +      assert( pIndex->onError!=OE_None );
    +
    +      if( pIdx->nColumn!=pIndex->nColumn ) continue;
    +      for(k=0; k<pIdx->nColumn; k++){
    +        const char *z1;
    +        const char *z2;
    +        if( pIdx->aiColumn[k]!=pIndex->aiColumn[k] ) break;
    +        z1 = pIdx->azColl[k];
    +        z2 = pIndex->azColl[k];
    +        if( z1!=z2 && sqlite3StrICmp(z1, z2) ) break;
    +      }
    +      if( k==pIdx->nColumn ){
    +        if( pIdx->onError!=pIndex->onError ){
    +          /* This constraint creates the same index as a previous
    +          ** constraint specified somewhere in the CREATE TABLE statement.
    +          ** However the ON CONFLICT clauses are different. If both this 
    +          ** constraint and the previous equivalent constraint have explicit
    +          ** ON CONFLICT clauses this is an error. Otherwise, use the
    +          ** explicitly specified behaviour for the index.
    +          */
    +          if( !(pIdx->onError==OE_Default || pIndex->onError==OE_Default) ){
    +            sqlite3ErrorMsg(pParse, 
    +                "conflicting ON CONFLICT clauses specified", 0);
    +          }
    +          if( pIdx->onError==OE_Default ){
    +            pIdx->onError = pIndex->onError;
    +          }
    +        }
    +        goto exit_create_index;
    +      }
    +    }
    +  }
    +
    +  /* Link the new Index structure to its table and to the other
    +  ** in-memory database structures. 
    +  */
    +  if( db->init.busy ){
    +    Index *p;
    +    p = sqlite3HashInsert(&pIndex->pSchema->idxHash, 
    +                          pIndex->zName, sqlite3Strlen30(pIndex->zName),
    +                          pIndex);
    +    if( p ){
    +      assert( p==pIndex );  /* Malloc must have failed */
    +      db->mallocFailed = 1;
    +      goto exit_create_index;
    +    }
    +    db->flags |= SQLITE_InternChanges;
    +    if( pTblName!=0 ){
    +      pIndex->tnum = db->init.newTnum;
    +    }
    +  }
    +
    +  /* If the db->init.busy is 0 then create the index on disk.  This
    +  ** involves writing the index into the master table and filling in the
    +  ** index with the current table contents.
    +  **
    +  ** The db->init.busy is 0 when the user first enters a CREATE INDEX 
    +  ** command.  db->init.busy is 1 when a database is opened and 
    +  ** CREATE INDEX statements are read out of the master table.  In
    +  ** the latter case the index already exists on disk, which is why
    +  ** we don't want to recreate it.
    +  **
    +  ** If pTblName==0 it means this index is generated as a primary key
    +  ** or UNIQUE constraint of a CREATE TABLE statement.  Since the table
    +  ** has just been created, it contains no data and the index initialization
    +  ** step can be skipped.
    +  */
    +  else{ /* if( db->init.busy==0 ) */
    +    Vdbe *v;
    +    char *zStmt;
    +    int iMem = ++pParse->nMem;
    +
    +    v = sqlite3GetVdbe(pParse);
    +    if( v==0 ) goto exit_create_index;
    +
    +
    +    /* Create the rootpage for the index
    +    */
    +    sqlite3BeginWriteOperation(pParse, 1, iDb);
    +    sqlite3VdbeAddOp2(v, OP_CreateIndex, iDb, iMem);
    +
    +    /* Gather the complete text of the CREATE INDEX statement into
    +    ** the zStmt variable
    +    */
    +    if( pStart ){
    +      assert( pEnd!=0 );
    +      /* A named index with an explicit CREATE INDEX statement */
    +      zStmt = sqlite3MPrintf(db, "CREATE%s INDEX %.*s",
    +        onError==OE_None ? "" : " UNIQUE",
    +        pEnd->z - pName->z + 1,
    +        pName->z);
    +    }else{
    +      /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
    +      /* zStmt = sqlite3MPrintf(""); */
    +      zStmt = 0;
    +    }
    +
    +    /* Add an entry in sqlite_master for this index
    +    */
    +    sqlite3NestedParse(pParse, 
    +        "INSERT INTO %Q.%s VALUES('index',%Q,%Q,#%d,%Q);",
    +        db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
    +        pIndex->zName,
    +        pTab->zName,
    +        iMem,
    +        zStmt
    +    );
    +    sqlite3DbFree(db, zStmt);
    +
    +    /* Fill the index with data and reparse the schema. Code an OP_Expire
    +    ** to invalidate all pre-compiled statements.
    +    */
    +    if( pTblName ){
    +      sqlite3RefillIndex(pParse, pIndex, iMem);
    +      sqlite3ChangeCookie(pParse, iDb);
    +      sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0,
    +         sqlite3MPrintf(db, "name='%q'", pIndex->zName), P4_DYNAMIC);
    +      sqlite3VdbeAddOp1(v, OP_Expire, 0);
    +    }
    +  }
    +
    +  /* When adding an index to the list of indices for a table, make
    +  ** sure all indices labeled OE_Replace come after all those labeled
    +  ** OE_Ignore.  This is necessary for the correct constraint check
    +  ** processing (in sqlite3GenerateConstraintChecks()) as part of
    +  ** UPDATE and INSERT statements.  
    +  */
    +  if( db->init.busy || pTblName==0 ){
    +    if( onError!=OE_Replace || pTab->pIndex==0
    +         || pTab->pIndex->onError==OE_Replace){
    +      pIndex->pNext = pTab->pIndex;
    +      pTab->pIndex = pIndex;
    +    }else{
    +      Index *pOther = pTab->pIndex;
    +      while( pOther->pNext && pOther->pNext->onError!=OE_Replace ){
    +        pOther = pOther->pNext;
    +      }
    +      pIndex->pNext = pOther->pNext;
    +      pOther->pNext = pIndex;
    +    }
    +    pRet = pIndex;
    +    pIndex = 0;
    +  }
    +
    +  /* Clean up before exiting */
    +exit_create_index:
    +  if( pIndex ){
    +    sqlite3_free(pIndex->zColAff);
    +    sqlite3DbFree(db, pIndex);
    +  }
    +  sqlite3ExprListDelete(db, pList);
    +  sqlite3SrcListDelete(db, pTblName);
    +  sqlite3DbFree(db, zName);
    +  return pRet;
    +}
    +
    +/*
    +** Fill the Index.aiRowEst[] array with default information - information
    +** to be used when we have not run the ANALYZE command.
    +**
    +** aiRowEst[0] is suppose to contain the number of elements in the index.
    +** Since we do not know, guess 1 million.  aiRowEst[1] is an estimate of the
    +** number of rows in the table that match any particular value of the
    +** first column of the index.  aiRowEst[2] is an estimate of the number
    +** of rows that match any particular combiniation of the first 2 columns
    +** of the index.  And so forth.  It must always be the case that
    +*
    +**           aiRowEst[N]<=aiRowEst[N-1]
    +**           aiRowEst[N]>=1
    +**
    +** Apart from that, we have little to go on besides intuition as to
    +** how aiRowEst[] should be initialized.  The numbers generated here
    +** are based on typical values found in actual indices.
    +*/
    +SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
    +  unsigned *a = pIdx->aiRowEst;
    +  int i;
    +  assert( a!=0 );
    +  a[0] = 1000000;
    +  for(i=pIdx->nColumn; i>=5; i--){
    +    a[i] = 5;
    +  }
    +  while( i>=1 ){
    +    a[i] = 11 - i;
    +    i--;
    +  }
    +  if( pIdx->onError!=OE_None ){
    +    a[pIdx->nColumn] = 1;
    +  }
    +}
    +
    +/*
    +** This routine will drop an existing named index.  This routine
    +** implements the DROP INDEX statement.
    +*/
    +SQLITE_PRIVATE void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){
    +  Index *pIndex;
    +  Vdbe *v;
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +
    +  assert( pParse->nErr==0 );   /* Never called with prior errors */
    +  if( db->mallocFailed ){
    +    goto exit_drop_index;
    +  }
    +  assert( pName->nSrc==1 );
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    goto exit_drop_index;
    +  }
    +  pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
    +  if( pIndex==0 ){
    +    if( !ifExists ){
    +      sqlite3ErrorMsg(pParse, "no such index: %S", pName, 0);
    +    }
    +    pParse->checkSchema = 1;
    +    goto exit_drop_index;
    +  }
    +  if( pIndex->autoIndex ){
    +    sqlite3ErrorMsg(pParse, "index associated with UNIQUE "
    +      "or PRIMARY KEY constraint cannot be dropped", 0);
    +    goto exit_drop_index;
    +  }
    +  iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  {
    +    int code = SQLITE_DROP_INDEX;
    +    Table *pTab = pIndex->pTable;
    +    const char *zDb = db->aDb[iDb].zName;
    +    const char *zTab = SCHEMA_TABLE(iDb);
    +    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
    +      goto exit_drop_index;
    +    }
    +    if( !OMIT_TEMPDB && iDb ) code = SQLITE_DROP_TEMP_INDEX;
    +    if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
    +      goto exit_drop_index;
    +    }
    +  }
    +#endif
    +
    +  /* Generate code to remove the index and from the master table */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    sqlite3BeginWriteOperation(pParse, 1, iDb);
    +    sqlite3NestedParse(pParse,
    +       "DELETE FROM %Q.%s WHERE name=%Q",
    +       db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
    +       pIndex->zName
    +    );
    +    if( sqlite3FindTable(db, "sqlite_stat1", db->aDb[iDb].zName) ){
    +      sqlite3NestedParse(pParse,
    +        "DELETE FROM %Q.sqlite_stat1 WHERE idx=%Q",
    +        db->aDb[iDb].zName, pIndex->zName
    +      );
    +    }
    +    sqlite3ChangeCookie(pParse, iDb);
    +    destroyRootPage(pParse, pIndex->tnum, iDb);
    +    sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);
    +  }
    +
    +exit_drop_index:
    +  sqlite3SrcListDelete(db, pName);
    +}
    +
    +/*
    +** pArray is a pointer to an array of objects.  Each object in the
    +** array is szEntry bytes in size.  This routine allocates a new
    +** object on the end of the array.
    +**
    +** *pnEntry is the number of entries already in use.  *pnAlloc is
    +** the previously allocated size of the array.  initSize is the
    +** suggested initial array size allocation.
    +**
    +** The index of the new entry is returned in *pIdx.
    +**
    +** This routine returns a pointer to the array of objects.  This
    +** might be the same as the pArray parameter or it might be a different
    +** pointer if the array was resized.
    +*/
    +SQLITE_PRIVATE void *sqlite3ArrayAllocate(
    +  sqlite3 *db,      /* Connection to notify of malloc failures */
    +  void *pArray,     /* Array of objects.  Might be reallocated */
    +  int szEntry,      /* Size of each object in the array */
    +  int initSize,     /* Suggested initial allocation, in elements */
    +  int *pnEntry,     /* Number of objects currently in use */
    +  int *pnAlloc,     /* Current size of the allocation, in elements */
    +  int *pIdx         /* Write the index of a new slot here */
    +){
    +  char *z;
    +  if( *pnEntry >= *pnAlloc ){
    +    void *pNew;
    +    int newSize;
    +    newSize = (*pnAlloc)*2 + initSize;
    +    pNew = sqlite3DbRealloc(db, pArray, newSize*szEntry);
    +    if( pNew==0 ){
    +      *pIdx = -1;
    +      return pArray;
    +    }
    +    *pnAlloc = sqlite3DbMallocSize(db, pNew)/szEntry;
    +    pArray = pNew;
    +  }
    +  z = (char*)pArray;
    +  memset(&z[*pnEntry * szEntry], 0, szEntry);
    +  *pIdx = *pnEntry;
    +  ++*pnEntry;
    +  return pArray;
    +}
    +
    +/*
    +** Append a new element to the given IdList.  Create a new IdList if
    +** need be.
    +**
    +** A new IdList is returned, or NULL if malloc() fails.
    +*/
    +SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
    +  int i;
    +  if( pList==0 ){
    +    pList = sqlite3DbMallocZero(db, sizeof(IdList) );
    +    if( pList==0 ) return 0;
    +    pList->nAlloc = 0;
    +  }
    +  pList->a = sqlite3ArrayAllocate(
    +      db,
    +      pList->a,
    +      sizeof(pList->a[0]),
    +      5,
    +      &pList->nId,
    +      &pList->nAlloc,
    +      &i
    +  );
    +  if( i<0 ){
    +    sqlite3IdListDelete(db, pList);
    +    return 0;
    +  }
    +  pList->a[i].zName = sqlite3NameFromToken(db, pToken);
    +  return pList;
    +}
    +
    +/*
    +** Delete an IdList.
    +*/
    +SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
    +  int i;
    +  if( pList==0 ) return;
    +  for(i=0; i<pList->nId; i++){
    +    sqlite3DbFree(db, pList->a[i].zName);
    +  }
    +  sqlite3DbFree(db, pList->a);
    +  sqlite3DbFree(db, pList);
    +}
    +
    +/*
    +** Return the index in pList of the identifier named zId.  Return -1
    +** if not found.
    +*/
    +SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
    +  int i;
    +  if( pList==0 ) return -1;
    +  for(i=0; i<pList->nId; i++){
    +    if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
    +  }
    +  return -1;
    +}
    +
    +/*
    +** Expand the space allocated for the given SrcList object by
    +** creating nExtra new slots beginning at iStart.  iStart is zero based.
    +** New slots are zeroed.
    +**
    +** For example, suppose a SrcList initially contains two entries: A,B.
    +** To append 3 new entries onto the end, do this:
    +**
    +**    sqlite3SrcListEnlarge(db, pSrclist, 3, 2);
    +**
    +** After the call above it would contain:  A, B, nil, nil, nil.
    +** If the iStart argument had been 1 instead of 2, then the result
    +** would have been:  A, nil, nil, nil, B.  To prepend the new slots,
    +** the iStart value would be 0.  The result then would
    +** be: nil, nil, nil, A, B.
    +**
    +** If a memory allocation fails the SrcList is unchanged.  The
    +** db->mallocFailed flag will be set to true.
    +*/
    +SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(
    +  sqlite3 *db,       /* Database connection to notify of OOM errors */
    +  SrcList *pSrc,     /* The SrcList to be enlarged */
    +  int nExtra,        /* Number of new slots to add to pSrc->a[] */
    +  int iStart         /* Index in pSrc->a[] of first new slot */
    +){
    +  int i;
    +
    +  /* Sanity checking on calling parameters */
    +  assert( iStart>=0 );
    +  assert( nExtra>=1 );
    +  assert( pSrc!=0 );
    +  assert( iStart<=pSrc->nSrc );
    +
    +  /* Allocate additional space if needed */
    +  if( pSrc->nSrc+nExtra>pSrc->nAlloc ){
    +    SrcList *pNew;
    +    int nAlloc = pSrc->nSrc+nExtra;
    +    int nGot;
    +    pNew = sqlite3DbRealloc(db, pSrc,
    +               sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc->a[0]) );
    +    if( pNew==0 ){
    +      assert( db->mallocFailed );
    +      return pSrc;
    +    }
    +    pSrc = pNew;
    +    nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
    +    pSrc->nAlloc = (u16)nGot;
    +  }
    +
    +  /* Move existing slots that come after the newly inserted slots
    +  ** out of the way */
    +  for(i=pSrc->nSrc-1; i>=iStart; i--){
    +    pSrc->a[i+nExtra] = pSrc->a[i];
    +  }
    +  pSrc->nSrc += (i16)nExtra;
    +
    +  /* Zero the newly allocated slots */
    +  memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);
    +  for(i=iStart; i<iStart+nExtra; i++){
    +    pSrc->a[i].iCursor = -1;
    +  }
    +
    +  /* Return a pointer to the enlarged SrcList */
    +  return pSrc;
    +}
    +
    +
    +/*
    +** Append a new table name to the given SrcList.  Create a new SrcList if
    +** need be.  A new entry is created in the SrcList even if pTable is NULL.
    +**
    +** A SrcList is returned, or NULL if there is an OOM error.  The returned
    +** SrcList might be the same as the SrcList that was input or it might be
    +** a new one.  If an OOM error does occurs, then the prior value of pList
    +** that is input to this routine is automatically freed.
    +**
    +** If pDatabase is not null, it means that the table has an optional
    +** database name prefix.  Like this:  "database.table".  The pDatabase
    +** points to the table name and the pTable points to the database name.
    +** The SrcList.a[].zName field is filled with the table name which might
    +** come from pTable (if pDatabase is NULL) or from pDatabase.  
    +** SrcList.a[].zDatabase is filled with the database name from pTable,
    +** or with NULL if no database is specified.
    +**
    +** In other words, if call like this:
    +**
    +**         sqlite3SrcListAppend(D,A,B,0);
    +**
    +** Then B is a table name and the database name is unspecified.  If called
    +** like this:
    +**
    +**         sqlite3SrcListAppend(D,A,B,C);
    +**
    +** Then C is the table name and B is the database name.  If C is defined
    +** then so is B.  In other words, we never have a case where:
    +**
    +**         sqlite3SrcListAppend(D,A,0,C);
    +**
    +** Both pTable and pDatabase are assumed to be quoted.  They are dequoted
    +** before being added to the SrcList.
    +*/
    +SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(
    +  sqlite3 *db,        /* Connection to notify of malloc failures */
    +  SrcList *pList,     /* Append to this SrcList. NULL creates a new SrcList */
    +  Token *pTable,      /* Table to append */
    +  Token *pDatabase    /* Database of the table */
    +){
    +  struct SrcList_item *pItem;
    +  assert( pDatabase==0 || pTable!=0 );  /* Cannot have C without B */
    +  if( pList==0 ){
    +    pList = sqlite3DbMallocZero(db, sizeof(SrcList) );
    +    if( pList==0 ) return 0;
    +    pList->nAlloc = 1;
    +  }
    +  pList = sqlite3SrcListEnlarge(db, pList, 1, pList->nSrc);
    +  if( db->mallocFailed ){
    +    sqlite3SrcListDelete(db, pList);
    +    return 0;
    +  }
    +  pItem = &pList->a[pList->nSrc-1];
    +  if( pDatabase && pDatabase->z==0 ){
    +    pDatabase = 0;
    +  }
    +  if( pDatabase ){
    +    Token *pTemp = pDatabase;
    +    pDatabase = pTable;
    +    pTable = pTemp;
    +  }
    +  pItem->zName = sqlite3NameFromToken(db, pTable);
    +  pItem->zDatabase = sqlite3NameFromToken(db, pDatabase);
    +  return pList;
    +}
    +
    +/*
    +** Assign VdbeCursor index numbers to all tables in a SrcList
    +*/
    +SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){
    +  int i;
    +  struct SrcList_item *pItem;
    +  assert(pList || pParse->db->mallocFailed );
    +  if( pList ){
    +    for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
    +      if( pItem->iCursor>=0 ) break;
    +      pItem->iCursor = pParse->nTab++;
    +      if( pItem->pSelect ){
    +        sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Delete an entire SrcList including all its substructure.
    +*/
    +SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
    +  int i;
    +  struct SrcList_item *pItem;
    +  if( pList==0 ) return;
    +  for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
    +    sqlite3DbFree(db, pItem->zDatabase);
    +    sqlite3DbFree(db, pItem->zName);
    +    sqlite3DbFree(db, pItem->zAlias);
    +    sqlite3DbFree(db, pItem->zIndex);
    +    sqlite3DeleteTable(pItem->pTab);
    +    sqlite3SelectDelete(db, pItem->pSelect);
    +    sqlite3ExprDelete(db, pItem->pOn);
    +    sqlite3IdListDelete(db, pItem->pUsing);
    +  }
    +  sqlite3DbFree(db, pList);
    +}
    +
    +/*
    +** This routine is called by the parser to add a new term to the
    +** end of a growing FROM clause.  The "p" parameter is the part of
    +** the FROM clause that has already been constructed.  "p" is NULL
    +** if this is the first term of the FROM clause.  pTable and pDatabase
    +** are the name of the table and database named in the FROM clause term.
    +** pDatabase is NULL if the database name qualifier is missing - the
    +** usual case.  If the term has a alias, then pAlias points to the
    +** alias token.  If the term is a subquery, then pSubquery is the
    +** SELECT statement that the subquery encodes.  The pTable and
    +** pDatabase parameters are NULL for subqueries.  The pOn and pUsing
    +** parameters are the content of the ON and USING clauses.
    +**
    +** Return a new SrcList which encodes is the FROM with the new
    +** term added.
    +*/
    +SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(
    +  Parse *pParse,          /* Parsing context */
    +  SrcList *p,             /* The left part of the FROM clause already seen */
    +  Token *pTable,          /* Name of the table to add to the FROM clause */
    +  Token *pDatabase,       /* Name of the database containing pTable */
    +  Token *pAlias,          /* The right-hand side of the AS subexpression */
    +  Select *pSubquery,      /* A subquery used in place of a table name */
    +  Expr *pOn,              /* The ON clause of a join */
    +  IdList *pUsing          /* The USING clause of a join */
    +){
    +  struct SrcList_item *pItem;
    +  sqlite3 *db = pParse->db;
    +  if( !p && (pOn || pUsing) ){
    +    sqlite3ErrorMsg(pParse, "a JOIN clause is required before %s", 
    +      (pOn ? "ON" : "USING")
    +    );
    +    goto append_from_error;
    +  }
    +  p = sqlite3SrcListAppend(db, p, pTable, pDatabase);
    +  if( p==0 || NEVER(p->nSrc==0) ){
    +    goto append_from_error;
    +  }
    +  pItem = &p->a[p->nSrc-1];
    +  assert( pAlias!=0 );
    +  if( pAlias->n ){
    +    pItem->zAlias = sqlite3NameFromToken(db, pAlias);
    +  }
    +  pItem->pSelect = pSubquery;
    +  pItem->pOn = pOn;
    +  pItem->pUsing = pUsing;
    +  return p;
    +
    + append_from_error:
    +  assert( p==0 );
    +  sqlite3ExprDelete(db, pOn);
    +  sqlite3IdListDelete(db, pUsing);
    +  sqlite3SelectDelete(db, pSubquery);
    +  return 0;
    +}
    +
    +/*
    +** Add an INDEXED BY or NOT INDEXED clause to the most recently added 
    +** element of the source-list passed as the second argument.
    +*/
    +SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pIndexedBy){
    +  assert( pIndexedBy!=0 );
    +  if( p && ALWAYS(p->nSrc>0) ){
    +    struct SrcList_item *pItem = &p->a[p->nSrc-1];
    +    assert( pItem->notIndexed==0 && pItem->zIndex==0 );
    +    if( pIndexedBy->n==1 && !pIndexedBy->z ){
    +      /* A "NOT INDEXED" clause was supplied. See parse.y 
    +      ** construct "indexed_opt" for details. */
    +      pItem->notIndexed = 1;
    +    }else{
    +      pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
    +    }
    +  }
    +}
    +
    +/*
    +** When building up a FROM clause in the parser, the join operator
    +** is initially attached to the left operand.  But the code generator
    +** expects the join operator to be on the right operand.  This routine
    +** Shifts all join operators from left to right for an entire FROM
    +** clause.
    +**
    +** Example: Suppose the join is like this:
    +**
    +**           A natural cross join B
    +**
    +** The operator is "natural cross join".  The A and B operands are stored
    +** in p->a[0] and p->a[1], respectively.  The parser initially stores the
    +** operator with A.  This routine shifts that operator over to B.
    +*/
    +SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList *p){
    +  if( p && p->a ){
    +    int i;
    +    for(i=p->nSrc-1; i>0; i--){
    +      p->a[i].jointype = p->a[i-1].jointype;
    +    }
    +    p->a[0].jointype = 0;
    +  }
    +}
    +
    +/*
    +** Begin a transaction
    +*/
    +SQLITE_PRIVATE void sqlite3BeginTransaction(Parse *pParse, int type){
    +  sqlite3 *db;
    +  Vdbe *v;
    +  int i;
    +
    +  assert( pParse!=0 );
    +  db = pParse->db;
    +  assert( db!=0 );
    +/*  if( db->aDb[0].pBt==0 ) return; */
    +  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", 0, 0) ){
    +    return;
    +  }
    +  v = sqlite3GetVdbe(pParse);
    +  if( !v ) return;
    +  if( type!=TK_DEFERRED ){
    +    for(i=0; i<db->nDb; i++){
    +      sqlite3VdbeAddOp2(v, OP_Transaction, i, (type==TK_EXCLUSIVE)+1);
    +      sqlite3VdbeUsesBtree(v, i);
    +    }
    +  }
    +  sqlite3VdbeAddOp2(v, OP_AutoCommit, 0, 0);
    +}
    +
    +/*
    +** Commit a transaction
    +*/
    +SQLITE_PRIVATE void sqlite3CommitTransaction(Parse *pParse){
    +  sqlite3 *db;
    +  Vdbe *v;
    +
    +  assert( pParse!=0 );
    +  db = pParse->db;
    +  assert( db!=0 );
    +/*  if( db->aDb[0].pBt==0 ) return; */
    +  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "COMMIT", 0, 0) ){
    +    return;
    +  }
    +  v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 0);
    +  }
    +}
    +
    +/*
    +** Rollback a transaction
    +*/
    +SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse *pParse){
    +  sqlite3 *db;
    +  Vdbe *v;
    +
    +  assert( pParse!=0 );
    +  db = pParse->db;
    +  assert( db!=0 );
    +/*  if( db->aDb[0].pBt==0 ) return; */
    +  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "ROLLBACK", 0, 0) ){
    +    return;
    +  }
    +  v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 1);
    +  }
    +}
    +
    +/*
    +** This function is called by the parser when it parses a command to create,
    +** release or rollback an SQL savepoint. 
    +*/
    +SQLITE_PRIVATE void sqlite3Savepoint(Parse *pParse, int op, Token *pName){
    +  char *zName = sqlite3NameFromToken(pParse->db, pName);
    +  if( zName ){
    +    Vdbe *v = sqlite3GetVdbe(pParse);
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +    static const char *az[] = { "BEGIN", "RELEASE", "ROLLBACK" };
    +    assert( !SAVEPOINT_BEGIN && SAVEPOINT_RELEASE==1 && SAVEPOINT_ROLLBACK==2 );
    +#endif
    +    if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
    +      sqlite3DbFree(pParse->db, zName);
    +      return;
    +    }
    +    sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
    +  }
    +}
    +
    +/*
    +** Make sure the TEMP database is open and available for use.  Return
    +** the number of errors.  Leave any error messages in the pParse structure.
    +*/
    +SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){
    +  sqlite3 *db = pParse->db;
    +  if( db->aDb[1].pBt==0 && !pParse->explain ){
    +    int rc;
    +    static const int flags = 
    +          SQLITE_OPEN_READWRITE |
    +          SQLITE_OPEN_CREATE |
    +          SQLITE_OPEN_EXCLUSIVE |
    +          SQLITE_OPEN_DELETEONCLOSE |
    +          SQLITE_OPEN_TEMP_DB;
    +
    +    rc = sqlite3BtreeFactory(db, 0, 0, SQLITE_DEFAULT_CACHE_SIZE, flags,
    +                                 &db->aDb[1].pBt);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3ErrorMsg(pParse, "unable to open a temporary database "
    +        "file for storing temporary tables");
    +      pParse->rc = rc;
    +      return 1;
    +    }
    +    assert( (db->flags & SQLITE_InTrans)==0 || db->autoCommit );
    +    assert( db->aDb[1].pSchema );
    +    sqlite3PagerJournalMode(sqlite3BtreePager(db->aDb[1].pBt),
    +                            db->dfltJournalMode);
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Generate VDBE code that will verify the schema cookie and start
    +** a read-transaction for all named database files.
    +**
    +** It is important that all schema cookies be verified and all
    +** read transactions be started before anything else happens in
    +** the VDBE program.  But this routine can be called after much other
    +** code has been generated.  So here is what we do:
    +**
    +** The first time this routine is called, we code an OP_Goto that
    +** will jump to a subroutine at the end of the program.  Then we
    +** record every database that needs its schema verified in the
    +** pParse->cookieMask field.  Later, after all other code has been
    +** generated, the subroutine that does the cookie verifications and
    +** starts the transactions will be coded and the OP_Goto P2 value
    +** will be made to point to that subroutine.  The generation of the
    +** cookie verification subroutine code happens in sqlite3FinishCoding().
    +**
    +** If iDb<0 then code the OP_Goto only - don't set flag to verify the
    +** schema on any databases.  This can be used to position the OP_Goto
    +** early in the code, before we know if any database tables will be used.
    +*/
    +SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +
    +  if( pToplevel->cookieGoto==0 ){
    +    Vdbe *v = sqlite3GetVdbe(pToplevel);
    +    if( v==0 ) return;  /* This only happens if there was a prior error */
    +    pToplevel->cookieGoto = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0)+1;
    +  }
    +  if( iDb>=0 ){
    +    sqlite3 *db = pToplevel->db;
    +    int mask;
    +
    +    assert( iDb<db->nDb );
    +    assert( db->aDb[iDb].pBt!=0 || iDb==1 );
    +    assert( iDb<SQLITE_MAX_ATTACHED+2 );
    +    mask = 1<<iDb;
    +    if( (pToplevel->cookieMask & mask)==0 ){
    +      pToplevel->cookieMask |= mask;
    +      pToplevel->cookieValue[iDb] = db->aDb[iDb].pSchema->schema_cookie;
    +      if( !OMIT_TEMPDB && iDb==1 ){
    +        sqlite3OpenTempDatabase(pToplevel);
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Generate VDBE code that prepares for doing an operation that
    +** might change the database.
    +**
    +** This routine starts a new transaction if we are not already within
    +** a transaction.  If we are already within a transaction, then a checkpoint
    +** is set if the setStatement parameter is true.  A checkpoint should
    +** be set for operations that might fail (due to a constraint) part of
    +** the way through and which will need to undo some writes without having to
    +** rollback the whole transaction.  For operations where all constraints
    +** can be checked before any changes are made to the database, it is never
    +** necessary to undo a write and the checkpoint should not be set.
    +*/
    +SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +  sqlite3CodeVerifySchema(pParse, iDb);
    +  pToplevel->writeMask |= 1<<iDb;
    +  pToplevel->isMultiWrite |= setStatement;
    +}
    +
    +/*
    +** Indicate that the statement currently under construction might write
    +** more than one entry (example: deleting one row then inserting another,
    +** inserting multiple rows in a table, or inserting a row and index entries.)
    +** If an abort occurs after some of these writes have completed, then it will
    +** be necessary to undo the completed writes.
    +*/
    +SQLITE_PRIVATE void sqlite3MultiWrite(Parse *pParse){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +  pToplevel->isMultiWrite = 1;
    +}
    +
    +/* 
    +** The code generator calls this routine if is discovers that it is
    +** possible to abort a statement prior to completion.  In order to 
    +** perform this abort without corrupting the database, we need to make
    +** sure that the statement is protected by a statement transaction.
    +**
    +** Technically, we only need to set the mayAbort flag if the
    +** isMultiWrite flag was previously set.  There is a time dependency
    +** such that the abort must occur after the multiwrite.  This makes
    +** some statements involving the REPLACE conflict resolution algorithm
    +** go a little faster.  But taking advantage of this time dependency
    +** makes it more difficult to prove that the code is correct (in 
    +** particular, it prevents us from writing an effective
    +** implementation of sqlite3AssertMayAbort()) and so we have chosen
    +** to take the safe route and skip the optimization.
    +*/
    +SQLITE_PRIVATE void sqlite3MayAbort(Parse *pParse){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +  pToplevel->mayAbort = 1;
    +}
    +
    +/*
    +** Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
    +** error. The onError parameter determines which (if any) of the statement
    +** and/or current transaction is rolled back.
    +*/
    +SQLITE_PRIVATE void sqlite3HaltConstraint(Parse *pParse, int onError, char *p4, int p4type){
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  if( onError==OE_Abort ){
    +    sqlite3MayAbort(pParse);
    +  }
    +  sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_CONSTRAINT, onError, 0, p4, p4type);
    +}
    +
    +/*
    +** Check to see if pIndex uses the collating sequence pColl.  Return
    +** true if it does and false if it does not.
    +*/
    +#ifndef SQLITE_OMIT_REINDEX
    +static int collationMatch(const char *zColl, Index *pIndex){
    +  int i;
    +  assert( zColl!=0 );
    +  for(i=0; i<pIndex->nColumn; i++){
    +    const char *z = pIndex->azColl[i];
    +    assert( z!=0 );
    +    if( 0==sqlite3StrICmp(z, zColl) ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +#endif
    +
    +/*
    +** Recompute all indices of pTab that use the collating sequence pColl.
    +** If pColl==0 then recompute all indices of pTab.
    +*/
    +#ifndef SQLITE_OMIT_REINDEX
    +static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){
    +  Index *pIndex;              /* An index associated with pTab */
    +
    +  for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
    +    if( zColl==0 || collationMatch(zColl, pIndex) ){
    +      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +      sqlite3BeginWriteOperation(pParse, 0, iDb);
    +      sqlite3RefillIndex(pParse, pIndex, -1);
    +    }
    +  }
    +}
    +#endif
    +
    +/*
    +** Recompute all indices of all tables in all databases where the
    +** indices use the collating sequence pColl.  If pColl==0 then recompute
    +** all indices everywhere.
    +*/
    +#ifndef SQLITE_OMIT_REINDEX
    +static void reindexDatabases(Parse *pParse, char const *zColl){
    +  Db *pDb;                    /* A single database */
    +  int iDb;                    /* The database index number */
    +  sqlite3 *db = pParse->db;   /* The database connection */
    +  HashElem *k;                /* For looping over tables in pDb */
    +  Table *pTab;                /* A table in the database */
    +
    +  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
    +    assert( pDb!=0 );
    +    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){
    +      pTab = (Table*)sqliteHashData(k);
    +      reindexTable(pParse, pTab, zColl);
    +    }
    +  }
    +}
    +#endif
    +
    +/*
    +** Generate code for the REINDEX command.
    +**
    +**        REINDEX                            -- 1
    +**        REINDEX  <collation>               -- 2
    +**        REINDEX  ?<database>.?<tablename>  -- 3
    +**        REINDEX  ?<database>.?<indexname>  -- 4
    +**
    +** Form 1 causes all indices in all attached databases to be rebuilt.
    +** Form 2 rebuilds all indices in all databases that use the named
    +** collating function.  Forms 3 and 4 rebuild the named index or all
    +** indices associated with the named table.
    +*/
    +#ifndef SQLITE_OMIT_REINDEX
    +SQLITE_PRIVATE void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){
    +  CollSeq *pColl;             /* Collating sequence to be reindexed, or NULL */
    +  char *z;                    /* Name of a table or index */
    +  const char *zDb;            /* Name of the database */
    +  Table *pTab;                /* A table in the database */
    +  Index *pIndex;              /* An index associated with pTab */
    +  int iDb;                    /* The database index number */
    +  sqlite3 *db = pParse->db;   /* The database connection */
    +  Token *pObjName;            /* Name of the table or index to be reindexed */
    +
    +  /* Read the database schema. If an error occurs, leave an error message
    +  ** and code in pParse and return NULL. */
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    return;
    +  }
    +
    +  if( pName1==0 ){
    +    reindexDatabases(pParse, 0);
    +    return;
    +  }else if( NEVER(pName2==0) || pName2->z==0 ){
    +    char *zColl;
    +    assert( pName1->z );
    +    zColl = sqlite3NameFromToken(pParse->db, pName1);
    +    if( !zColl ) return;
    +    pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
    +    if( pColl ){
    +      reindexDatabases(pParse, zColl);
    +      sqlite3DbFree(db, zColl);
    +      return;
    +    }
    +    sqlite3DbFree(db, zColl);
    +  }
    +  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pObjName);
    +  if( iDb<0 ) return;
    +  z = sqlite3NameFromToken(db, pObjName);
    +  if( z==0 ) return;
    +  zDb = db->aDb[iDb].zName;
    +  pTab = sqlite3FindTable(db, z, zDb);
    +  if( pTab ){
    +    reindexTable(pParse, pTab, 0);
    +    sqlite3DbFree(db, z);
    +    return;
    +  }
    +  pIndex = sqlite3FindIndex(db, z, zDb);
    +  sqlite3DbFree(db, z);
    +  if( pIndex ){
    +    sqlite3BeginWriteOperation(pParse, 0, iDb);
    +    sqlite3RefillIndex(pParse, pIndex, -1);
    +    return;
    +  }
    +  sqlite3ErrorMsg(pParse, "unable to identify the object to be reindexed");
    +}
    +#endif
    +
    +/*
    +** Return a dynamicly allocated KeyInfo structure that can be used
    +** with OP_OpenRead or OP_OpenWrite to access database index pIdx.
    +**
    +** If successful, a pointer to the new structure is returned. In this case
    +** the caller is responsible for calling sqlite3DbFree(db, ) on the returned 
    +** pointer. If an error occurs (out of memory or missing collation 
    +** sequence), NULL is returned and the state of pParse updated to reflect
    +** the error.
    +*/
    +SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *pParse, Index *pIdx){
    +  int i;
    +  int nCol = pIdx->nColumn;
    +  int nBytes = sizeof(KeyInfo) + (nCol-1)*sizeof(CollSeq*) + nCol;
    +  sqlite3 *db = pParse->db;
    +  KeyInfo *pKey = (KeyInfo *)sqlite3DbMallocZero(db, nBytes);
    +
    +  if( pKey ){
    +    pKey->db = pParse->db;
    +    pKey->aSortOrder = (u8 *)&(pKey->aColl[nCol]);
    +    assert( &pKey->aSortOrder[nCol]==&(((u8 *)pKey)[nBytes]) );
    +    for(i=0; i<nCol; i++){
    +      char *zColl = pIdx->azColl[i];
    +      assert( zColl );
    +      pKey->aColl[i] = sqlite3LocateCollSeq(pParse, zColl);
    +      pKey->aSortOrder[i] = pIdx->aSortOrder[i];
    +    }
    +    pKey->nField = (u16)nCol;
    +  }
    +
    +  if( pParse->nErr ){
    +    sqlite3DbFree(db, pKey);
    +    pKey = 0;
    +  }
    +  return pKey;
    +}
    +
    +/************** End of build.c ***********************************************/
    +/************** Begin file callback.c ****************************************/
    +/*
    +** 2005 May 23 
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains functions used to access the internal hash tables
    +** of user defined functions and collation sequences.
    +**
    +** $Id: callback.c,v 1.42 2009/06/17 00:35:31 drh Exp $
    +*/
    +
    +
    +/*
    +** Invoke the 'collation needed' callback to request a collation sequence
    +** in the encoding enc of name zName, length nName.
    +*/
    +static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
    +  assert( !db->xCollNeeded || !db->xCollNeeded16 );
    +  if( db->xCollNeeded ){
    +    char *zExternal = sqlite3DbStrDup(db, zName);
    +    if( !zExternal ) return;
    +    db->xCollNeeded(db->pCollNeededArg, db, enc, zExternal);
    +    sqlite3DbFree(db, zExternal);
    +  }
    +#ifndef SQLITE_OMIT_UTF16
    +  if( db->xCollNeeded16 ){
    +    char const *zExternal;
    +    sqlite3_value *pTmp = sqlite3ValueNew(db);
    +    sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
    +    zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);
    +    if( zExternal ){
    +      db->xCollNeeded16(db->pCollNeededArg, db, (int)ENC(db), zExternal);
    +    }
    +    sqlite3ValueFree(pTmp);
    +  }
    +#endif
    +}
    +
    +/*
    +** This routine is called if the collation factory fails to deliver a
    +** collation function in the best encoding but there may be other versions
    +** of this collation function (for other text encodings) available. Use one
    +** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
    +** possible.
    +*/
    +static int synthCollSeq(sqlite3 *db, CollSeq *pColl){
    +  CollSeq *pColl2;
    +  char *z = pColl->zName;
    +  int i;
    +  static const u8 aEnc[] = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };
    +  for(i=0; i<3; i++){
    +    pColl2 = sqlite3FindCollSeq(db, aEnc[i], z, 0);
    +    if( pColl2->xCmp!=0 ){
    +      memcpy(pColl, pColl2, sizeof(CollSeq));
    +      pColl->xDel = 0;         /* Do not copy the destructor */
    +      return SQLITE_OK;
    +    }
    +  }
    +  return SQLITE_ERROR;
    +}
    +
    +/*
    +** This function is responsible for invoking the collation factory callback
    +** or substituting a collation sequence of a different encoding when the
    +** requested collation sequence is not available in the desired encoding.
    +** 
    +** If it is not NULL, then pColl must point to the database native encoding 
    +** collation sequence with name zName, length nName.
    +**
    +** The return value is either the collation sequence to be used in database
    +** db for collation type name zName, length nName, or NULL, if no collation
    +** sequence can be found.
    +**
    +** See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()
    +*/
    +SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(
    +  sqlite3* db,          /* The database connection */
    +  u8 enc,               /* The desired encoding for the collating sequence */
    +  CollSeq *pColl,       /* Collating sequence with native encoding, or NULL */
    +  const char *zName     /* Collating sequence name */
    +){
    +  CollSeq *p;
    +
    +  p = pColl;
    +  if( !p ){
    +    p = sqlite3FindCollSeq(db, enc, zName, 0);
    +  }
    +  if( !p || !p->xCmp ){
    +    /* No collation sequence of this type for this encoding is registered.
    +    ** Call the collation factory to see if it can supply us with one.
    +    */
    +    callCollNeeded(db, enc, zName);
    +    p = sqlite3FindCollSeq(db, enc, zName, 0);
    +  }
    +  if( p && !p->xCmp && synthCollSeq(db, p) ){
    +    p = 0;
    +  }
    +  assert( !p || p->xCmp );
    +  return p;
    +}
    +
    +/*
    +** This routine is called on a collation sequence before it is used to
    +** check that it is defined. An undefined collation sequence exists when
    +** a database is loaded that contains references to collation sequences
    +** that have not been defined by sqlite3_create_collation() etc.
    +**
    +** If required, this routine calls the 'collation needed' callback to
    +** request a definition of the collating sequence. If this doesn't work, 
    +** an equivalent collating sequence that uses a text encoding different
    +** from the main database is substituted, if one is available.
    +*/
    +SQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){
    +  if( pColl ){
    +    const char *zName = pColl->zName;
    +    sqlite3 *db = pParse->db;
    +    CollSeq *p = sqlite3GetCollSeq(db, ENC(db), pColl, zName);
    +    if( !p ){
    +      sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
    +      pParse->nErr++;
    +      return SQLITE_ERROR;
    +    }
    +    assert( p==pColl );
    +  }
    +  return SQLITE_OK;
    +}
    +
    +
    +
    +/*
    +** Locate and return an entry from the db.aCollSeq hash table. If the entry
    +** specified by zName and nName is not found and parameter 'create' is
    +** true, then create a new entry. Otherwise return NULL.
    +**
    +** Each pointer stored in the sqlite3.aCollSeq hash table contains an
    +** array of three CollSeq structures. The first is the collation sequence
    +** prefferred for UTF-8, the second UTF-16le, and the third UTF-16be.
    +**
    +** Stored immediately after the three collation sequences is a copy of
    +** the collation sequence name. A pointer to this string is stored in
    +** each collation sequence structure.
    +*/
    +static CollSeq *findCollSeqEntry(
    +  sqlite3 *db,          /* Database connection */
    +  const char *zName,    /* Name of the collating sequence */
    +  int create            /* Create a new entry if true */
    +){
    +  CollSeq *pColl;
    +  int nName = sqlite3Strlen30(zName);
    +  pColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
    +
    +  if( 0==pColl && create ){
    +    pColl = sqlite3DbMallocZero(db, 3*sizeof(*pColl) + nName + 1 );
    +    if( pColl ){
    +      CollSeq *pDel = 0;
    +      pColl[0].zName = (char*)&pColl[3];
    +      pColl[0].enc = SQLITE_UTF8;
    +      pColl[1].zName = (char*)&pColl[3];
    +      pColl[1].enc = SQLITE_UTF16LE;
    +      pColl[2].zName = (char*)&pColl[3];
    +      pColl[2].enc = SQLITE_UTF16BE;
    +      memcpy(pColl[0].zName, zName, nName);
    +      pColl[0].zName[nName] = 0;
    +      pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, nName, pColl);
    +
    +      /* If a malloc() failure occurred in sqlite3HashInsert(), it will 
    +      ** return the pColl pointer to be deleted (because it wasn't added
    +      ** to the hash table).
    +      */
    +      assert( pDel==0 || pDel==pColl );
    +      if( pDel!=0 ){
    +        db->mallocFailed = 1;
    +        sqlite3DbFree(db, pDel);
    +        pColl = 0;
    +      }
    +    }
    +  }
    +  return pColl;
    +}
    +
    +/*
    +** Parameter zName points to a UTF-8 encoded string nName bytes long.
    +** Return the CollSeq* pointer for the collation sequence named zName
    +** for the encoding 'enc' from the database 'db'.
    +**
    +** If the entry specified is not found and 'create' is true, then create a
    +** new entry.  Otherwise return NULL.
    +**
    +** A separate function sqlite3LocateCollSeq() is a wrapper around
    +** this routine.  sqlite3LocateCollSeq() invokes the collation factory
    +** if necessary and generates an error message if the collating sequence
    +** cannot be found.
    +**
    +** See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()
    +*/
    +SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(
    +  sqlite3 *db,
    +  u8 enc,
    +  const char *zName,
    +  int create
    +){
    +  CollSeq *pColl;
    +  if( zName ){
    +    pColl = findCollSeqEntry(db, zName, create);
    +  }else{
    +    pColl = db->pDfltColl;
    +  }
    +  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
    +  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
    +  if( pColl ) pColl += enc-1;
    +  return pColl;
    +}
    +
    +/* During the search for the best function definition, this procedure
    +** is called to test how well the function passed as the first argument
    +** matches the request for a function with nArg arguments in a system
    +** that uses encoding enc. The value returned indicates how well the
    +** request is matched. A higher value indicates a better match.
    +**
    +** The returned value is always between 0 and 6, as follows:
    +**
    +** 0: Not a match, or if nArg<0 and the function is has no implementation.
    +** 1: A variable arguments function that prefers UTF-8 when a UTF-16
    +**    encoding is requested, or vice versa.
    +** 2: A variable arguments function that uses UTF-16BE when UTF-16LE is
    +**    requested, or vice versa.
    +** 3: A variable arguments function using the same text encoding.
    +** 4: A function with the exact number of arguments requested that
    +**    prefers UTF-8 when a UTF-16 encoding is requested, or vice versa.
    +** 5: A function with the exact number of arguments requested that
    +**    prefers UTF-16LE when UTF-16BE is requested, or vice versa.
    +** 6: An exact match.
    +**
    +*/
    +static int matchQuality(FuncDef *p, int nArg, u8 enc){
    +  int match = 0;
    +  if( p->nArg==-1 || p->nArg==nArg 
    +   || (nArg==-1 && (p->xFunc!=0 || p->xStep!=0))
    +  ){
    +    match = 1;
    +    if( p->nArg==nArg || nArg==-1 ){
    +      match = 4;
    +    }
    +    if( enc==p->iPrefEnc ){
    +      match += 2;
    +    }
    +    else if( (enc==SQLITE_UTF16LE && p->iPrefEnc==SQLITE_UTF16BE) ||
    +             (enc==SQLITE_UTF16BE && p->iPrefEnc==SQLITE_UTF16LE) ){
    +      match += 1;
    +    }
    +  }
    +  return match;
    +}
    +
    +/*
    +** Search a FuncDefHash for a function with the given name.  Return
    +** a pointer to the matching FuncDef if found, or 0 if there is no match.
    +*/
    +static FuncDef *functionSearch(
    +  FuncDefHash *pHash,  /* Hash table to search */
    +  int h,               /* Hash of the name */
    +  const char *zFunc,   /* Name of function */
    +  int nFunc            /* Number of bytes in zFunc */
    +){
    +  FuncDef *p;
    +  for(p=pHash->a[h]; p; p=p->pHash){
    +    if( sqlite3StrNICmp(p->zName, zFunc, nFunc)==0 && p->zName[nFunc]==0 ){
    +      return p;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Insert a new FuncDef into a FuncDefHash hash table.
    +*/
    +SQLITE_PRIVATE void sqlite3FuncDefInsert(
    +  FuncDefHash *pHash,  /* The hash table into which to insert */
    +  FuncDef *pDef        /* The function definition to insert */
    +){
    +  FuncDef *pOther;
    +  int nName = sqlite3Strlen30(pDef->zName);
    +  u8 c1 = (u8)pDef->zName[0];
    +  int h = (sqlite3UpperToLower[c1] + nName) % ArraySize(pHash->a);
    +  pOther = functionSearch(pHash, h, pDef->zName, nName);
    +  if( pOther ){
    +    assert( pOther!=pDef && pOther->pNext!=pDef );
    +    pDef->pNext = pOther->pNext;
    +    pOther->pNext = pDef;
    +  }else{
    +    pDef->pNext = 0;
    +    pDef->pHash = pHash->a[h];
    +    pHash->a[h] = pDef;
    +  }
    +}
    +  
    +  
    +
    +/*
    +** Locate a user function given a name, a number of arguments and a flag
    +** indicating whether the function prefers UTF-16 over UTF-8.  Return a
    +** pointer to the FuncDef structure that defines that function, or return
    +** NULL if the function does not exist.
    +**
    +** If the createFlag argument is true, then a new (blank) FuncDef
    +** structure is created and liked into the "db" structure if a
    +** no matching function previously existed.  When createFlag is true
    +** and the nArg parameter is -1, then only a function that accepts
    +** any number of arguments will be returned.
    +**
    +** If createFlag is false and nArg is -1, then the first valid
    +** function found is returned.  A function is valid if either xFunc
    +** or xStep is non-zero.
    +**
    +** If createFlag is false, then a function with the required name and
    +** number of arguments may be returned even if the eTextRep flag does not
    +** match that requested.
    +*/
    +SQLITE_PRIVATE FuncDef *sqlite3FindFunction(
    +  sqlite3 *db,       /* An open database */
    +  const char *zName, /* Name of the function.  Not null-terminated */
    +  int nName,         /* Number of characters in the name */
    +  int nArg,          /* Number of arguments.  -1 means any number */
    +  u8 enc,            /* Preferred text encoding */
    +  int createFlag     /* Create new entry if true and does not otherwise exist */
    +){
    +  FuncDef *p;         /* Iterator variable */
    +  FuncDef *pBest = 0; /* Best match found so far */
    +  int bestScore = 0;  /* Score of best match */
    +  int h;              /* Hash value */
    +
    +
    +  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
    +  h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % ArraySize(db->aFunc.a);
    +
    +  /* First search for a match amongst the application-defined functions.
    +  */
    +  p = functionSearch(&db->aFunc, h, zName, nName);
    +  while( p ){
    +    int score = matchQuality(p, nArg, enc);
    +    if( score>bestScore ){
    +      pBest = p;
    +      bestScore = score;
    +    }
    +    p = p->pNext;
    +  }
    +
    +  /* If no match is found, search the built-in functions.
    +  **
    +  ** Except, if createFlag is true, that means that we are trying to
    +  ** install a new function.  Whatever FuncDef structure is returned will
    +  ** have fields overwritten with new information appropriate for the
    +  ** new function.  But the FuncDefs for built-in functions are read-only.
    +  ** So we must not search for built-ins when creating a new function.
    +  */ 
    +  if( !createFlag && !pBest ){
    +    FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
    +    p = functionSearch(pHash, h, zName, nName);
    +    while( p ){
    +      int score = matchQuality(p, nArg, enc);
    +      if( score>bestScore ){
    +        pBest = p;
    +        bestScore = score;
    +      }
    +      p = p->pNext;
    +    }
    +  }
    +
    +  /* If the createFlag parameter is true and the search did not reveal an
    +  ** exact match for the name, number of arguments and encoding, then add a
    +  ** new entry to the hash table and return it.
    +  */
    +  if( createFlag && (bestScore<6 || pBest->nArg!=nArg) && 
    +      (pBest = sqlite3DbMallocZero(db, sizeof(*pBest)+nName+1))!=0 ){
    +    pBest->zName = (char *)&pBest[1];
    +    pBest->nArg = (u16)nArg;
    +    pBest->iPrefEnc = enc;
    +    memcpy(pBest->zName, zName, nName);
    +    pBest->zName[nName] = 0;
    +    sqlite3FuncDefInsert(&db->aFunc, pBest);
    +  }
    +
    +  if( pBest && (pBest->xStep || pBest->xFunc || createFlag) ){
    +    return pBest;
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Free all resources held by the schema structure. The void* argument points
    +** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the 
    +** pointer itself, it just cleans up subsiduary resources (i.e. the contents
    +** of the schema hash tables).
    +**
    +** The Schema.cache_size variable is not cleared.
    +*/
    +SQLITE_PRIVATE void sqlite3SchemaFree(void *p){
    +  Hash temp1;
    +  Hash temp2;
    +  HashElem *pElem;
    +  Schema *pSchema = (Schema *)p;
    +
    +  temp1 = pSchema->tblHash;
    +  temp2 = pSchema->trigHash;
    +  sqlite3HashInit(&pSchema->trigHash);
    +  sqlite3HashClear(&pSchema->idxHash);
    +  for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){
    +    sqlite3DeleteTrigger(0, (Trigger*)sqliteHashData(pElem));
    +  }
    +  sqlite3HashClear(&temp2);
    +  sqlite3HashInit(&pSchema->tblHash);
    +  for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){
    +    Table *pTab = sqliteHashData(pElem);
    +    assert( pTab->dbMem==0 );
    +    sqlite3DeleteTable(pTab);
    +  }
    +  sqlite3HashClear(&temp1);
    +  sqlite3HashClear(&pSchema->fkeyHash);
    +  pSchema->pSeqTab = 0;
    +  pSchema->flags &= ~DB_SchemaLoaded;
    +}
    +
    +/*
    +** Find and return the schema associated with a BTree.  Create
    +** a new one if necessary.
    +*/
    +SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
    +  Schema * p;
    +  if( pBt ){
    +    p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaFree);
    +  }else{
    +    p = (Schema *)sqlite3MallocZero(sizeof(Schema));
    +  }
    +  if( !p ){
    +    db->mallocFailed = 1;
    +  }else if ( 0==p->file_format ){
    +    sqlite3HashInit(&p->tblHash);
    +    sqlite3HashInit(&p->idxHash);
    +    sqlite3HashInit(&p->trigHash);
    +    sqlite3HashInit(&p->fkeyHash);
    +    p->enc = SQLITE_UTF8;
    +  }
    +  return p;
    +}
    +
    +/************** End of callback.c ********************************************/
    +/************** Begin file delete.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that are called by the parser
    +** in order to generate code for DELETE FROM statements.
    +**
    +** $Id: delete.c,v 1.207 2009/08/08 18:01:08 drh Exp $
    +*/
    +
    +/*
    +** Look up every table that is named in pSrc.  If any table is not found,
    +** add an error message to pParse->zErrMsg and return NULL.  If all tables
    +** are found, return a pointer to the last table.
    +*/
    +SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){
    +  struct SrcList_item *pItem = pSrc->a;
    +  Table *pTab;
    +  assert( pItem && pSrc->nSrc==1 );
    +  pTab = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
    +  sqlite3DeleteTable(pItem->pTab);
    +  pItem->pTab = pTab;
    +  if( pTab ){
    +    pTab->nRef++;
    +  }
    +  if( sqlite3IndexedByLookup(pParse, pItem) ){
    +    pTab = 0;
    +  }
    +  return pTab;
    +}
    +
    +/*
    +** Check to make sure the given table is writable.  If it is not
    +** writable, generate an error message and return 1.  If it is
    +** writable return 0;
    +*/
    +SQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
    +  /* A table is not writable under the following circumstances:
    +  **
    +  **   1) It is a virtual table and no implementation of the xUpdate method
    +  **      has been provided, or
    +  **   2) It is a system table (i.e. sqlite_master), this call is not
    +  **      part of a nested parse and writable_schema pragma has not 
    +  **      been specified.
    +  **
    +  ** In either case leave an error message in pParse and return non-zero.
    +  */
    +  if( ( IsVirtual(pTab) 
    +     && sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0 )
    +   || ( (pTab->tabFlags & TF_Readonly)!=0
    +     && (pParse->db->flags & SQLITE_WriteSchema)==0
    +     && pParse->nested==0 )
    +  ){
    +    sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
    +    return 1;
    +  }
    +
    +#ifndef SQLITE_OMIT_VIEW
    +  if( !viewOk && pTab->pSelect ){
    +    sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
    +    return 1;
    +  }
    +#endif
    +  return 0;
    +}
    +
    +
    +#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
    +/*
    +** Evaluate a view and store its result in an ephemeral table.  The
    +** pWhere argument is an optional WHERE clause that restricts the
    +** set of rows in the view that are to be added to the ephemeral table.
    +*/
    +SQLITE_PRIVATE void sqlite3MaterializeView(
    +  Parse *pParse,       /* Parsing context */
    +  Table *pView,        /* View definition */
    +  Expr *pWhere,        /* Optional WHERE clause to be added */
    +  int iCur             /* Cursor number for ephemerial table */
    +){
    +  SelectDest dest;
    +  Select *pDup;
    +  sqlite3 *db = pParse->db;
    +
    +  pDup = sqlite3SelectDup(db, pView->pSelect, 0);
    +  if( pWhere ){
    +    SrcList *pFrom;
    +    
    +    pWhere = sqlite3ExprDup(db, pWhere, 0);
    +    pFrom = sqlite3SrcListAppend(db, 0, 0, 0);
    +    if( pFrom ){
    +      assert( pFrom->nSrc==1 );
    +      pFrom->a[0].zAlias = sqlite3DbStrDup(db, pView->zName);
    +      pFrom->a[0].pSelect = pDup;
    +      assert( pFrom->a[0].pOn==0 );
    +      assert( pFrom->a[0].pUsing==0 );
    +    }else{
    +      sqlite3SelectDelete(db, pDup);
    +    }
    +    pDup = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, 0, 0, 0, 0);
    +  }
    +  sqlite3SelectDestInit(&dest, SRT_EphemTab, iCur);
    +  sqlite3Select(pParse, pDup, &dest);
    +  sqlite3SelectDelete(db, pDup);
    +}
    +#endif /* !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER) */
    +
    +#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
    +/*
    +** Generate an expression tree to implement the WHERE, ORDER BY,
    +** and LIMIT/OFFSET portion of DELETE and UPDATE statements.
    +**
    +**     DELETE FROM table_wxyz WHERE a<5 ORDER BY a LIMIT 1;
    +**                            \__________________________/
    +**                               pLimitWhere (pInClause)
    +*/
    +SQLITE_PRIVATE Expr *sqlite3LimitWhere(
    +  Parse *pParse,               /* The parser context */
    +  SrcList *pSrc,               /* the FROM clause -- which tables to scan */
    +  Expr *pWhere,                /* The WHERE clause.  May be null */
    +  ExprList *pOrderBy,          /* The ORDER BY clause.  May be null */
    +  Expr *pLimit,                /* The LIMIT clause.  May be null */
    +  Expr *pOffset,               /* The OFFSET clause.  May be null */
    +  char *zStmtType              /* Either DELETE or UPDATE.  For error messages. */
    +){
    +  Expr *pWhereRowid = NULL;    /* WHERE rowid .. */
    +  Expr *pInClause = NULL;      /* WHERE rowid IN ( select ) */
    +  Expr *pSelectRowid = NULL;   /* SELECT rowid ... */
    +  ExprList *pEList = NULL;     /* Expression list contaning only pSelectRowid */
    +  SrcList *pSelectSrc = NULL;  /* SELECT rowid FROM x ... (dup of pSrc) */
    +  Select *pSelect = NULL;      /* Complete SELECT tree */
    +
    +  /* Check that there isn't an ORDER BY without a LIMIT clause.
    +  */
    +  if( pOrderBy && (pLimit == 0) ) {
    +    sqlite3ErrorMsg(pParse, "ORDER BY without LIMIT on %s", zStmtType);
    +    pParse->parseError = 1;
    +    goto limit_where_cleanup_2;
    +  }
    +
    +  /* We only need to generate a select expression if there
    +  ** is a limit/offset term to enforce.
    +  */
    +  if( pLimit == 0 ) {
    +    /* if pLimit is null, pOffset will always be null as well. */
    +    assert( pOffset == 0 );
    +    return pWhere;
    +  }
    +
    +  /* Generate a select expression tree to enforce the limit/offset 
    +  ** term for the DELETE or UPDATE statement.  For example:
    +  **   DELETE FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1
    +  ** becomes:
    +  **   DELETE FROM table_a WHERE rowid IN ( 
    +  **     SELECT rowid FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1
    +  **   );
    +  */
    +
    +  pSelectRowid = sqlite3PExpr(pParse, TK_ROW, 0, 0, 0);
    +  if( pSelectRowid == 0 ) goto limit_where_cleanup_2;
    +  pEList = sqlite3ExprListAppend(pParse, 0, pSelectRowid);
    +  if( pEList == 0 ) goto limit_where_cleanup_2;
    +
    +  /* duplicate the FROM clause as it is needed by both the DELETE/UPDATE tree
    +  ** and the SELECT subtree. */
    +  pSelectSrc = sqlite3SrcListDup(pParse->db, pSrc, 0);
    +  if( pSelectSrc == 0 ) {
    +    sqlite3ExprListDelete(pParse->db, pEList);
    +    goto limit_where_cleanup_2;
    +  }
    +
    +  /* generate the SELECT expression tree. */
    +  pSelect = sqlite3SelectNew(pParse,pEList,pSelectSrc,pWhere,0,0,
    +                             pOrderBy,0,pLimit,pOffset);
    +  if( pSelect == 0 ) return 0;
    +
    +  /* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */
    +  pWhereRowid = sqlite3PExpr(pParse, TK_ROW, 0, 0, 0);
    +  if( pWhereRowid == 0 ) goto limit_where_cleanup_1;
    +  pInClause = sqlite3PExpr(pParse, TK_IN, pWhereRowid, 0, 0);
    +  if( pInClause == 0 ) goto limit_where_cleanup_1;
    +
    +  pInClause->x.pSelect = pSelect;
    +  pInClause->flags |= EP_xIsSelect;
    +  sqlite3ExprSetHeight(pParse, pInClause);
    +  return pInClause;
    +
    +  /* something went wrong. clean up anything allocated. */
    +limit_where_cleanup_1:
    +  sqlite3SelectDelete(pParse->db, pSelect);
    +  return 0;
    +
    +limit_where_cleanup_2:
    +  sqlite3ExprDelete(pParse->db, pWhere);
    +  sqlite3ExprListDelete(pParse->db, pOrderBy);
    +  sqlite3ExprDelete(pParse->db, pLimit);
    +  sqlite3ExprDelete(pParse->db, pOffset);
    +  return 0;
    +}
    +#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) */
    +
    +/*
    +** Generate code for a DELETE FROM statement.
    +**
    +**     DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;
    +**                 \________/       \________________/
    +**                  pTabList              pWhere
    +*/
    +SQLITE_PRIVATE void sqlite3DeleteFrom(
    +  Parse *pParse,         /* The parser context */
    +  SrcList *pTabList,     /* The table from which we should delete things */
    +  Expr *pWhere           /* The WHERE clause.  May be null */
    +){
    +  Vdbe *v;               /* The virtual database engine */
    +  Table *pTab;           /* The table from which records will be deleted */
    +  const char *zDb;       /* Name of database holding pTab */
    +  int end, addr = 0;     /* A couple addresses of generated code */
    +  int i;                 /* Loop counter */
    +  WhereInfo *pWInfo;     /* Information about the WHERE clause */
    +  Index *pIdx;           /* For looping over indices of the table */
    +  int iCur;              /* VDBE Cursor number for pTab */
    +  sqlite3 *db;           /* Main database structure */
    +  AuthContext sContext;  /* Authorization context */
    +  NameContext sNC;       /* Name context to resolve expressions in */
    +  int iDb;               /* Database number */
    +  int memCnt = -1;       /* Memory cell used for change counting */
    +  int rcauth;            /* Value returned by authorization callback */
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  int isView;                  /* True if attempting to delete from a view */
    +  Trigger *pTrigger;           /* List of table triggers, if required */
    +#endif
    +
    +  memset(&sContext, 0, sizeof(sContext));
    +  db = pParse->db;
    +  if( pParse->nErr || db->mallocFailed ){
    +    goto delete_from_cleanup;
    +  }
    +  assert( pTabList->nSrc==1 );
    +
    +  /* Locate the table which we want to delete.  This table has to be
    +  ** put in an SrcList structure because some of the subroutines we
    +  ** will be calling are designed to work with multiple tables and expect
    +  ** an SrcList* parameter instead of just a Table* parameter.
    +  */
    +  pTab = sqlite3SrcListLookup(pParse, pTabList);
    +  if( pTab==0 )  goto delete_from_cleanup;
    +
    +  /* Figure out if we have any triggers and if the table being
    +  ** deleted from is a view
    +  */
    +#ifndef SQLITE_OMIT_TRIGGER
    +  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
    +  isView = pTab->pSelect!=0;
    +#else
    +# define pTrigger 0
    +# define isView 0
    +#endif
    +#ifdef SQLITE_OMIT_VIEW
    +# undef isView
    +# define isView 0
    +#endif
    +
    +  /* If pTab is really a view, make sure it has been initialized.
    +  */
    +  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
    +    goto delete_from_cleanup;
    +  }
    +
    +  if( sqlite3IsReadOnly(pParse, pTab, (pTrigger?1:0)) ){
    +    goto delete_from_cleanup;
    +  }
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  assert( iDb<db->nDb );
    +  zDb = db->aDb[iDb].zName;
    +  rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
    +  assert( rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE );
    +  if( rcauth==SQLITE_DENY ){
    +    goto delete_from_cleanup;
    +  }
    +  assert(!isView || pTrigger);
    +
    +  /* Assign  cursor number to the table and all its indices.
    +  */
    +  assert( pTabList->nSrc==1 );
    +  iCur = pTabList->a[0].iCursor = pParse->nTab++;
    +  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +    pParse->nTab++;
    +  }
    +
    +  /* Start the view context
    +  */
    +  if( isView ){
    +    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
    +  }
    +
    +  /* Begin generating code.
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ){
    +    goto delete_from_cleanup;
    +  }
    +  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
    +  sqlite3BeginWriteOperation(pParse, 1, iDb);
    +
    +  /* If we are trying to delete from a view, realize that view into
    +  ** a ephemeral table.
    +  */
    +#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
    +  if( isView ){
    +    sqlite3MaterializeView(pParse, pTab, pWhere, iCur);
    +  }
    +#endif
    +
    +  /* Resolve the column names in the WHERE clause.
    +  */
    +  memset(&sNC, 0, sizeof(sNC));
    +  sNC.pParse = pParse;
    +  sNC.pSrcList = pTabList;
    +  if( sqlite3ResolveExprNames(&sNC, pWhere) ){
    +    goto delete_from_cleanup;
    +  }
    +
    +  /* Initialize the counter of the number of rows deleted, if
    +  ** we are counting rows.
    +  */
    +  if( db->flags & SQLITE_CountRows ){
    +    memCnt = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, memCnt);
    +  }
    +
    +#ifndef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
    +  /* Special case: A DELETE without a WHERE clause deletes everything.
    +  ** It is easier just to erase the whole table. Prior to version 3.6.5,
    +  ** this optimization caused the row change count (the value returned by 
    +  ** API function sqlite3_count_changes) to be set incorrectly.  */
    +  if( rcauth==SQLITE_OK && pWhere==0 && !pTrigger && !IsVirtual(pTab) 
    +   && 0==sqlite3FkRequired(pParse, pTab, 0, 0)
    +  ){
    +    assert( !isView );
    +    sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt,
    +                      pTab->zName, P4_STATIC);
    +    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +      assert( pIdx->pSchema==pTab->pSchema );
    +      sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);
    +    }
    +  }else
    +#endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */
    +  /* The usual case: There is a WHERE clause so we have to scan through
    +  ** the table and pick which records to delete.
    +  */
    +  {
    +    int iRowSet = ++pParse->nMem;   /* Register for rowset of rows to delete */
    +    int iRowid = ++pParse->nMem;    /* Used for storing rowid values. */
    +    int regRowid;                   /* Actual register containing rowids */
    +
    +    /* Collect rowids of every row to be deleted.
    +    */
    +    sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet);
    +    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,WHERE_DUPLICATES_OK);
    +    if( pWInfo==0 ) goto delete_from_cleanup;
    +    regRowid = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, iRowid, 0);
    +    sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, regRowid);
    +    if( db->flags & SQLITE_CountRows ){
    +      sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
    +    }
    +    sqlite3WhereEnd(pWInfo);
    +
    +    /* Delete every item whose key was written to the list during the
    +    ** database scan.  We have to delete items after the scan is complete
    +    ** because deleting an item can change the scan order.  */
    +    end = sqlite3VdbeMakeLabel(v);
    +
    +    /* Unless this is a view, open cursors for the table we are 
    +    ** deleting from and all its indices. If this is a view, then the
    +    ** only effect this statement has is to fire the INSTEAD OF 
    +    ** triggers.  */
    +    if( !isView ){
    +      sqlite3OpenTableAndIndices(pParse, pTab, iCur, OP_OpenWrite);
    +    }
    +
    +    addr = sqlite3VdbeAddOp3(v, OP_RowSetRead, iRowSet, end, iRowid);
    +
    +    /* Delete the row */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( IsVirtual(pTab) ){
    +      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
    +      sqlite3VtabMakeWritable(pParse, pTab);
    +      sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iRowid, pVTab, P4_VTAB);
    +      sqlite3MayAbort(pParse);
    +    }else
    +#endif
    +    {
    +      int count = (pParse->nested==0);    /* True to count changes */
    +      sqlite3GenerateRowDelete(pParse, pTab, iCur, iRowid, count, pTrigger, OE_Default);
    +    }
    +
    +    /* End of the delete loop */
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);
    +    sqlite3VdbeResolveLabel(v, end);
    +
    +    /* Close the cursors open on the table and its indexes. */
    +    if( !isView && !IsVirtual(pTab) ){
    +      for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
    +        sqlite3VdbeAddOp2(v, OP_Close, iCur + i, pIdx->tnum);
    +      }
    +      sqlite3VdbeAddOp1(v, OP_Close, iCur);
    +    }
    +  }
    +
    +  /* Update the sqlite_sequence table by storing the content of the
    +  ** maximum rowid counter values recorded while inserting into
    +  ** autoincrement tables.
    +  */
    +  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
    +    sqlite3AutoincrementEnd(pParse);
    +  }
    +
    +  /* Return the number of rows that were deleted. If this routine is 
    +  ** generating code because of a call to sqlite3NestedParse(), do not
    +  ** invoke the callback function.
    +  */
    +  if( (db->flags&SQLITE_CountRows) && !pParse->nested && !pParse->pTriggerTab ){
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, memCnt, 1);
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows deleted", SQLITE_STATIC);
    +  }
    +
    +delete_from_cleanup:
    +  sqlite3AuthContextPop(&sContext);
    +  sqlite3SrcListDelete(db, pTabList);
    +  sqlite3ExprDelete(db, pWhere);
    +  return;
    +}
    +/* Make sure "isView" and other macros defined above are undefined. Otherwise
    +** thely may interfere with compilation of other functions in this file
    +** (or in another file, if this file becomes part of the amalgamation).  */
    +#ifdef isView
    + #undef isView
    +#endif
    +#ifdef pTrigger
    + #undef pTrigger
    +#endif
    +
    +/*
    +** This routine generates VDBE code that causes a single row of a
    +** single table to be deleted.
    +**
    +** The VDBE must be in a particular state when this routine is called.
    +** These are the requirements:
    +**
    +**   1.  A read/write cursor pointing to pTab, the table containing the row
    +**       to be deleted, must be opened as cursor number $iCur.
    +**
    +**   2.  Read/write cursors for all indices of pTab must be open as
    +**       cursor number base+i for the i-th index.
    +**
    +**   3.  The record number of the row to be deleted must be stored in
    +**       memory cell iRowid.
    +**
    +** This routine generates code to remove both the table record and all 
    +** index entries that point to that record.
    +*/
    +SQLITE_PRIVATE void sqlite3GenerateRowDelete(
    +  Parse *pParse,     /* Parsing context */
    +  Table *pTab,       /* Table containing the row to be deleted */
    +  int iCur,          /* Cursor number for the table */
    +  int iRowid,        /* Memory cell that contains the rowid to delete */
    +  int count,         /* If non-zero, increment the row change counter */
    +  Trigger *pTrigger, /* List of triggers to (potentially) fire */
    +  int onconf         /* Default ON CONFLICT policy for triggers */
    +){
    +  Vdbe *v = pParse->pVdbe;        /* Vdbe */
    +  int iOld = 0;                   /* First register in OLD.* array */
    +  int iLabel;                     /* Label resolved to end of generated code */
    +
    +  /* Vdbe is guaranteed to have been allocated by this stage. */
    +  assert( v );
    +
    +  /* Seek cursor iCur to the row to delete. If this row no longer exists 
    +  ** (this can happen if a trigger program has already deleted it), do
    +  ** not attempt to delete it or fire any DELETE triggers.  */
    +  iLabel = sqlite3VdbeMakeLabel(v);
    +  sqlite3VdbeAddOp3(v, OP_NotExists, iCur, iLabel, iRowid);
    + 
    +  /* If there are any triggers to fire, allocate a range of registers to
    +  ** use for the old.* references in the triggers.  */
    +  if( sqlite3FkRequired(pParse, pTab, 0, 0) || pTrigger ){
    +    u32 mask;                     /* Mask of OLD.* columns in use */
    +    int iCol;                     /* Iterator used while populating OLD.* */
    +
    +    /* TODO: Could use temporary registers here. Also could attempt to
    +    ** avoid copying the contents of the rowid register.  */
    +    mask = sqlite3TriggerOldmask(pParse, pTrigger, 0, pTab, onconf);
    +    mask |= sqlite3FkOldmask(pParse, pTab);
    +    iOld = pParse->nMem+1;
    +    pParse->nMem += (1 + pTab->nCol);
    +
    +    /* Populate the OLD.* pseudo-table register array. These values will be 
    +    ** used by any BEFORE and AFTER triggers that exist.  */
    +    sqlite3VdbeAddOp2(v, OP_Copy, iRowid, iOld);
    +    for(iCol=0; iCol<pTab->nCol; iCol++){
    +      if( mask==0xffffffff || mask&(1<<iCol) ){
    +        int iTarget = iOld + iCol + 1;
    +        sqlite3VdbeAddOp3(v, OP_Column, iCur, iCol, iTarget);
    +        sqlite3ColumnDefault(v, pTab, iCol, iTarget);
    +      }
    +    }
    +
    +    /* Invoke BEFORE DELETE trigger programs. */
    +    sqlite3CodeRowTrigger(pParse, pTrigger, 
    +        TK_DELETE, 0, TRIGGER_BEFORE, pTab, iOld, onconf, iLabel
    +    );
    +
    +    /* Seek the cursor to the row to be deleted again. It may be that
    +    ** the BEFORE triggers coded above have already removed the row
    +    ** being deleted. Do not attempt to delete the row a second time, and 
    +    ** do not fire AFTER triggers.  */
    +    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, iLabel, iRowid);
    +
    +    /* Do FK processing. This call checks that any FK constraints that
    +    ** refer to this table (i.e. constraints attached to other tables) 
    +    ** are not violated by deleting this row.  */
    +    sqlite3FkCheck(pParse, pTab, iOld, 0);
    +  }
    +
    +  /* Delete the index and table entries. Skip this step if pTab is really
    +  ** a view (in which case the only effect of the DELETE statement is to
    +  ** fire the INSTEAD OF triggers).  */ 
    +  if( pTab->pSelect==0 ){
    +    sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, 0);
    +    sqlite3VdbeAddOp2(v, OP_Delete, iCur, (count?OPFLAG_NCHANGE:0));
    +    if( count ){
    +      sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_STATIC);
    +    }
    +  }
    +
    +  /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
    +  ** handle rows (possibly in other tables) that refer via a foreign key
    +  ** to the row just deleted. */ 
    +  sqlite3FkActions(pParse, pTab, 0, iOld);
    +
    +  /* Invoke AFTER DELETE trigger programs. */
    +  sqlite3CodeRowTrigger(pParse, pTrigger, 
    +      TK_DELETE, 0, TRIGGER_AFTER, pTab, iOld, onconf, iLabel
    +  );
    +
    +  /* Jump here if the row had already been deleted before any BEFORE
    +  ** trigger programs were invoked. Or if a trigger program throws a 
    +  ** RAISE(IGNORE) exception.  */
    +  sqlite3VdbeResolveLabel(v, iLabel);
    +}
    +
    +/*
    +** This routine generates VDBE code that causes the deletion of all
    +** index entries associated with a single row of a single table.
    +**
    +** The VDBE must be in a particular state when this routine is called.
    +** These are the requirements:
    +**
    +**   1.  A read/write cursor pointing to pTab, the table containing the row
    +**       to be deleted, must be opened as cursor number "iCur".
    +**
    +**   2.  Read/write cursors for all indices of pTab must be open as
    +**       cursor number iCur+i for the i-th index.
    +**
    +**   3.  The "iCur" cursor must be pointing to the row that is to be
    +**       deleted.
    +*/
    +SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
    +  Parse *pParse,     /* Parsing and code generating context */
    +  Table *pTab,       /* Table containing the row to be deleted */
    +  int iCur,          /* Cursor number for the table */
    +  int *aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
    +){
    +  int i;
    +  Index *pIdx;
    +  int r1;
    +
    +  for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
    +    if( aRegIdx!=0 && aRegIdx[i-1]==0 ) continue;
    +    r1 = sqlite3GenerateIndexKey(pParse, pIdx, iCur, 0, 0);
    +    sqlite3VdbeAddOp3(pParse->pVdbe, OP_IdxDelete, iCur+i, r1,pIdx->nColumn+1);
    +  }
    +}
    +
    +/*
    +** Generate code that will assemble an index key and put it in register
    +** regOut.  The key with be for index pIdx which is an index on pTab.
    +** iCur is the index of a cursor open on the pTab table and pointing to
    +** the entry that needs indexing.
    +**
    +** Return a register number which is the first in a block of
    +** registers that holds the elements of the index key.  The
    +** block of registers has already been deallocated by the time
    +** this routine returns.
    +*/
    +SQLITE_PRIVATE int sqlite3GenerateIndexKey(
    +  Parse *pParse,     /* Parsing context */
    +  Index *pIdx,       /* The index for which to generate a key */
    +  int iCur,          /* Cursor number for the pIdx->pTable table */
    +  int regOut,        /* Write the new index key to this register */
    +  int doMakeRec      /* Run the OP_MakeRecord instruction if true */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int j;
    +  Table *pTab = pIdx->pTable;
    +  int regBase;
    +  int nCol;
    +
    +  nCol = pIdx->nColumn;
    +  regBase = sqlite3GetTempRange(pParse, nCol+1);
    +  sqlite3VdbeAddOp2(v, OP_Rowid, iCur, regBase+nCol);
    +  for(j=0; j<nCol; j++){
    +    int idx = pIdx->aiColumn[j];
    +    if( idx==pTab->iPKey ){
    +      sqlite3VdbeAddOp2(v, OP_SCopy, regBase+nCol, regBase+j);
    +    }else{
    +      sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
    +      sqlite3ColumnDefault(v, pTab, idx, -1);
    +    }
    +  }
    +  if( doMakeRec ){
    +    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
    +    sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), 0);
    +    sqlite3ExprCacheAffinityChange(pParse, regBase, nCol+1);
    +  }
    +  sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
    +  return regBase;
    +}
    +
    +
    +/************** End of delete.c **********************************************/
    +/************** Begin file func.c ********************************************/
    +/*
    +** 2002 February 23
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the C functions that implement various SQL
    +** functions of SQLite.  
    +**
    +** There is only one exported symbol in this file - the function
    +** sqliteRegisterBuildinFunctions() found at the bottom of the file.
    +** All other code has file scope.
    +*/
    +
    +/*
    +** Return the collating function associated with a function.
    +*/
    +static CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){
    +  return context->pColl;
    +}
    +
    +/*
    +** Implementation of the non-aggregate min() and max() functions
    +*/
    +static void minmaxFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int i;
    +  int mask;    /* 0 for min() or 0xffffffff for max() */
    +  int iBest;
    +  CollSeq *pColl;
    +
    +  assert( argc>1 );
    +  mask = sqlite3_user_data(context)==0 ? 0 : -1;
    +  pColl = sqlite3GetFuncCollSeq(context);
    +  assert( pColl );
    +  assert( mask==-1 || mask==0 );
    +  iBest = 0;
    +  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
    +  for(i=1; i<argc; i++){
    +    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;
    +    if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){
    +      testcase( mask==0 );
    +      iBest = i;
    +    }
    +  }
    +  sqlite3_result_value(context, argv[iBest]);
    +}
    +
    +/*
    +** Return the type of the argument.
    +*/
    +static void typeofFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  const char *z = 0;
    +  UNUSED_PARAMETER(NotUsed);
    +  switch( sqlite3_value_type(argv[0]) ){
    +    case SQLITE_INTEGER: z = "integer"; break;
    +    case SQLITE_TEXT:    z = "text";    break;
    +    case SQLITE_FLOAT:   z = "real";    break;
    +    case SQLITE_BLOB:    z = "blob";    break;
    +    default:             z = "null";    break;
    +  }
    +  sqlite3_result_text(context, z, -1, SQLITE_STATIC);
    +}
    +
    +
    +/*
    +** Implementation of the length() function
    +*/
    +static void lengthFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int len;
    +
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  switch( sqlite3_value_type(argv[0]) ){
    +    case SQLITE_BLOB:
    +    case SQLITE_INTEGER:
    +    case SQLITE_FLOAT: {
    +      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));
    +      break;
    +    }
    +    case SQLITE_TEXT: {
    +      const unsigned char *z = sqlite3_value_text(argv[0]);
    +      if( z==0 ) return;
    +      len = 0;
    +      while( *z ){
    +        len++;
    +        SQLITE_SKIP_UTF8(z);
    +      }
    +      sqlite3_result_int(context, len);
    +      break;
    +    }
    +    default: {
    +      sqlite3_result_null(context);
    +      break;
    +    }
    +  }
    +}
    +
    +/*
    +** Implementation of the abs() function
    +*/
    +static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  switch( sqlite3_value_type(argv[0]) ){
    +    case SQLITE_INTEGER: {
    +      i64 iVal = sqlite3_value_int64(argv[0]);
    +      if( iVal<0 ){
    +        if( (iVal<<1)==0 ){
    +          sqlite3_result_error(context, "integer overflow", -1);
    +          return;
    +        }
    +        iVal = -iVal;
    +      } 
    +      sqlite3_result_int64(context, iVal);
    +      break;
    +    }
    +    case SQLITE_NULL: {
    +      sqlite3_result_null(context);
    +      break;
    +    }
    +    default: {
    +      double rVal = sqlite3_value_double(argv[0]);
    +      if( rVal<0 ) rVal = -rVal;
    +      sqlite3_result_double(context, rVal);
    +      break;
    +    }
    +  }
    +}
    +
    +/*
    +** Implementation of the substr() function.
    +**
    +** substr(x,p1,p2)  returns p2 characters of x[] beginning with p1.
    +** p1 is 1-indexed.  So substr(x,1,1) returns the first character
    +** of x.  If x is text, then we actually count UTF-8 characters.
    +** If x is a blob, then we count bytes.
    +**
    +** If p1 is negative, then we begin abs(p1) from the end of x[].
    +*/
    +static void substrFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  const unsigned char *z;
    +  const unsigned char *z2;
    +  int len;
    +  int p0type;
    +  i64 p1, p2;
    +  int negP2 = 0;
    +
    +  assert( argc==3 || argc==2 );
    +  if( sqlite3_value_type(argv[1])==SQLITE_NULL
    +   || (argc==3 && sqlite3_value_type(argv[2])==SQLITE_NULL)
    +  ){
    +    return;
    +  }
    +  p0type = sqlite3_value_type(argv[0]);
    +  if( p0type==SQLITE_BLOB ){
    +    len = sqlite3_value_bytes(argv[0]);
    +    z = sqlite3_value_blob(argv[0]);
    +    if( z==0 ) return;
    +    assert( len==sqlite3_value_bytes(argv[0]) );
    +  }else{
    +    z = sqlite3_value_text(argv[0]);
    +    if( z==0 ) return;
    +    len = 0;
    +    for(z2=z; *z2; len++){
    +      SQLITE_SKIP_UTF8(z2);
    +    }
    +  }
    +  p1 = sqlite3_value_int(argv[1]);
    +  if( argc==3 ){
    +    p2 = sqlite3_value_int(argv[2]);
    +    if( p2<0 ){
    +      p2 = -p2;
    +      negP2 = 1;
    +    }
    +  }else{
    +    p2 = sqlite3_context_db_handle(context)->aLimit[SQLITE_LIMIT_LENGTH];
    +  }
    +  if( p1<0 ){
    +    p1 += len;
    +    if( p1<0 ){
    +      p2 += p1;
    +      if( p2<0 ) p2 = 0;
    +      p1 = 0;
    +    }
    +  }else if( p1>0 ){
    +    p1--;
    +  }else if( p2>0 ){
    +    p2--;
    +  }
    +  if( negP2 ){
    +    p1 -= p2;
    +    if( p1<0 ){
    +      p2 += p1;
    +      p1 = 0;
    +    }
    +  }
    +  assert( p1>=0 && p2>=0 );
    +  if( p1+p2>len ){
    +    p2 = len-p1;
    +    if( p2<0 ) p2 = 0;
    +  }
    +  if( p0type!=SQLITE_BLOB ){
    +    while( *z && p1 ){
    +      SQLITE_SKIP_UTF8(z);
    +      p1--;
    +    }
    +    for(z2=z; *z2 && p2; p2--){
    +      SQLITE_SKIP_UTF8(z2);
    +    }
    +    sqlite3_result_text(context, (char*)z, (int)(z2-z), SQLITE_TRANSIENT);
    +  }else{
    +    sqlite3_result_blob(context, (char*)&z[p1], (int)p2, SQLITE_TRANSIENT);
    +  }
    +}
    +
    +/*
    +** Implementation of the round() function
    +*/
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  int n = 0;
    +  double r;
    +  char *zBuf;
    +  assert( argc==1 || argc==2 );
    +  if( argc==2 ){
    +    if( SQLITE_NULL==sqlite3_value_type(argv[1]) ) return;
    +    n = sqlite3_value_int(argv[1]);
    +    if( n>30 ) n = 30;
    +    if( n<0 ) n = 0;
    +  }
    +  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
    +  r = sqlite3_value_double(argv[0]);
    +  zBuf = sqlite3_mprintf("%.*f",n,r);
    +  if( zBuf==0 ){
    +    sqlite3_result_error_nomem(context);
    +  }else{
    +    sqlite3AtoF(zBuf, &r);
    +    sqlite3_free(zBuf);
    +    sqlite3_result_double(context, r);
    +  }
    +}
    +#endif
    +
    +/*
    +** Allocate nByte bytes of space using sqlite3_malloc(). If the
    +** allocation fails, call sqlite3_result_error_nomem() to notify
    +** the database handle that malloc() has failed and return NULL.
    +** If nByte is larger than the maximum string or blob length, then
    +** raise an SQLITE_TOOBIG exception and return NULL.
    +*/
    +static void *contextMalloc(sqlite3_context *context, i64 nByte){
    +  char *z;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  assert( nByte>0 );
    +  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
    +  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
    +  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    sqlite3_result_error_toobig(context);
    +    z = 0;
    +  }else{
    +    z = sqlite3Malloc((int)nByte);
    +    if( !z ){
    +      sqlite3_result_error_nomem(context);
    +    }
    +  }
    +  return z;
    +}
    +
    +/*
    +** Implementation of the upper() and lower() SQL functions.
    +*/
    +static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  char *z1;
    +  const char *z2;
    +  int i, n;
    +  UNUSED_PARAMETER(argc);
    +  z2 = (char*)sqlite3_value_text(argv[0]);
    +  n = sqlite3_value_bytes(argv[0]);
    +  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
    +  assert( z2==(char*)sqlite3_value_text(argv[0]) );
    +  if( z2 ){
    +    z1 = contextMalloc(context, ((i64)n)+1);
    +    if( z1 ){
    +      memcpy(z1, z2, n+1);
    +      for(i=0; z1[i]; i++){
    +        z1[i] = (char)sqlite3Toupper(z1[i]);
    +      }
    +      sqlite3_result_text(context, z1, -1, sqlite3_free);
    +    }
    +  }
    +}
    +static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  u8 *z1;
    +  const char *z2;
    +  int i, n;
    +  UNUSED_PARAMETER(argc);
    +  z2 = (char*)sqlite3_value_text(argv[0]);
    +  n = sqlite3_value_bytes(argv[0]);
    +  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
    +  assert( z2==(char*)sqlite3_value_text(argv[0]) );
    +  if( z2 ){
    +    z1 = contextMalloc(context, ((i64)n)+1);
    +    if( z1 ){
    +      memcpy(z1, z2, n+1);
    +      for(i=0; z1[i]; i++){
    +        z1[i] = sqlite3Tolower(z1[i]);
    +      }
    +      sqlite3_result_text(context, (char *)z1, -1, sqlite3_free);
    +    }
    +  }
    +}
    +
    +/*
    +** Implementation of the IFNULL(), NVL(), and COALESCE() functions.  
    +** All three do the same thing.  They return the first non-NULL
    +** argument.
    +*/
    +static void ifnullFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int i;
    +  for(i=0; i<argc; i++){
    +    if( SQLITE_NULL!=sqlite3_value_type(argv[i]) ){
    +      sqlite3_result_value(context, argv[i]);
    +      break;
    +    }
    +  }
    +}
    +
    +/*
    +** Implementation of random().  Return a random integer.  
    +*/
    +static void randomFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  sqlite_int64 r;
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_randomness(sizeof(r), &r);
    +  if( r<0 ){
    +    /* We need to prevent a random number of 0x8000000000000000 
    +    ** (or -9223372036854775808) since when you do abs() of that
    +    ** number of you get the same value back again.  To do this
    +    ** in a way that is testable, mask the sign bit off of negative
    +    ** values, resulting in a positive value.  Then take the 
    +    ** 2s complement of that positive value.  The end result can
    +    ** therefore be no less than -9223372036854775807.
    +    */
    +    r = -(r ^ (((sqlite3_int64)1)<<63));
    +  }
    +  sqlite3_result_int64(context, r);
    +}
    +
    +/*
    +** Implementation of randomblob(N).  Return a random blob
    +** that is N bytes long.
    +*/
    +static void randomBlob(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int n;
    +  unsigned char *p;
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  n = sqlite3_value_int(argv[0]);
    +  if( n<1 ){
    +    n = 1;
    +  }
    +  p = contextMalloc(context, n);
    +  if( p ){
    +    sqlite3_randomness(n, p);
    +    sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
    +  }
    +}
    +
    +/*
    +** Implementation of the last_insert_rowid() SQL function.  The return
    +** value is the same as the sqlite3_last_insert_rowid() API function.
    +*/
    +static void last_insert_rowid(
    +  sqlite3_context *context, 
    +  int NotUsed, 
    +  sqlite3_value **NotUsed2
    +){
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));
    +}
    +
    +/*
    +** Implementation of the changes() SQL function.  The return value is the
    +** same as the sqlite3_changes() API function.
    +*/
    +static void changes(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_result_int(context, sqlite3_changes(db));
    +}
    +
    +/*
    +** Implementation of the total_changes() SQL function.  The return value is
    +** the same as the sqlite3_total_changes() API function.
    +*/
    +static void total_changes(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_result_int(context, sqlite3_total_changes(db));
    +}
    +
    +/*
    +** A structure defining how to do GLOB-style comparisons.
    +*/
    +struct compareInfo {
    +  u8 matchAll;
    +  u8 matchOne;
    +  u8 matchSet;
    +  u8 noCase;
    +};
    +
    +/*
    +** For LIKE and GLOB matching on EBCDIC machines, assume that every
    +** character is exactly one byte in size.  Also, all characters are
    +** able to participate in upper-case-to-lower-case mappings in EBCDIC
    +** whereas only characters less than 0x80 do in ASCII.
    +*/
    +#if defined(SQLITE_EBCDIC)
    +# define sqlite3Utf8Read(A,C)    (*(A++))
    +# define GlogUpperToLower(A)     A = sqlite3UpperToLower[A]
    +#else
    +# define GlogUpperToLower(A)     if( A<0x80 ){ A = sqlite3UpperToLower[A]; }
    +#endif
    +
    +static const struct compareInfo globInfo = { '*', '?', '[', 0 };
    +/* The correct SQL-92 behavior is for the LIKE operator to ignore
    +** case.  Thus  'a' LIKE 'A' would be true. */
    +static const struct compareInfo likeInfoNorm = { '%', '_',   0, 1 };
    +/* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator
    +** is case sensitive causing 'a' LIKE 'A' to be false */
    +static const struct compareInfo likeInfoAlt = { '%', '_',   0, 0 };
    +
    +/*
    +** Compare two UTF-8 strings for equality where the first string can
    +** potentially be a "glob" expression.  Return true (1) if they
    +** are the same and false (0) if they are different.
    +**
    +** Globbing rules:
    +**
    +**      '*'       Matches any sequence of zero or more characters.
    +**
    +**      '?'       Matches exactly one character.
    +**
    +**     [...]      Matches one character from the enclosed list of
    +**                characters.
    +**
    +**     [^...]     Matches one character not in the enclosed list.
    +**
    +** With the [...] and [^...] matching, a ']' character can be included
    +** in the list by making it the first character after '[' or '^'.  A
    +** range of characters can be specified using '-'.  Example:
    +** "[a-z]" matches any single lower-case letter.  To match a '-', make
    +** it the last character in the list.
    +**
    +** This routine is usually quick, but can be N**2 in the worst case.
    +**
    +** Hints: to match '*' or '?', put them in "[]".  Like this:
    +**
    +**         abc[*]xyz        Matches "abc*xyz" only
    +*/
    +static int patternCompare(
    +  const u8 *zPattern,              /* The glob pattern */
    +  const u8 *zString,               /* The string to compare against the glob */
    +  const struct compareInfo *pInfo, /* Information about how to do the compare */
    +  const int esc                    /* The escape character */
    +){
    +  int c, c2;
    +  int invert;
    +  int seen;
    +  u8 matchOne = pInfo->matchOne;
    +  u8 matchAll = pInfo->matchAll;
    +  u8 matchSet = pInfo->matchSet;
    +  u8 noCase = pInfo->noCase; 
    +  int prevEscape = 0;     /* True if the previous character was 'escape' */
    +
    +  while( (c = sqlite3Utf8Read(zPattern,&zPattern))!=0 ){
    +    if( !prevEscape && c==matchAll ){
    +      while( (c=sqlite3Utf8Read(zPattern,&zPattern)) == matchAll
    +               || c == matchOne ){
    +        if( c==matchOne && sqlite3Utf8Read(zString, &zString)==0 ){
    +          return 0;
    +        }
    +      }
    +      if( c==0 ){
    +        return 1;
    +      }else if( c==esc ){
    +        c = sqlite3Utf8Read(zPattern, &zPattern);
    +        if( c==0 ){
    +          return 0;
    +        }
    +      }else if( c==matchSet ){
    +        assert( esc==0 );         /* This is GLOB, not LIKE */
    +        assert( matchSet<0x80 );  /* '[' is a single-byte character */
    +        while( *zString && patternCompare(&zPattern[-1],zString,pInfo,esc)==0 ){
    +          SQLITE_SKIP_UTF8(zString);
    +        }
    +        return *zString!=0;
    +      }
    +      while( (c2 = sqlite3Utf8Read(zString,&zString))!=0 ){
    +        if( noCase ){
    +          GlogUpperToLower(c2);
    +          GlogUpperToLower(c);
    +          while( c2 != 0 && c2 != c ){
    +            c2 = sqlite3Utf8Read(zString, &zString);
    +            GlogUpperToLower(c2);
    +          }
    +        }else{
    +          while( c2 != 0 && c2 != c ){
    +            c2 = sqlite3Utf8Read(zString, &zString);
    +          }
    +        }
    +        if( c2==0 ) return 0;
    +        if( patternCompare(zPattern,zString,pInfo,esc) ) return 1;
    +      }
    +      return 0;
    +    }else if( !prevEscape && c==matchOne ){
    +      if( sqlite3Utf8Read(zString, &zString)==0 ){
    +        return 0;
    +      }
    +    }else if( c==matchSet ){
    +      int prior_c = 0;
    +      assert( esc==0 );    /* This only occurs for GLOB, not LIKE */
    +      seen = 0;
    +      invert = 0;
    +      c = sqlite3Utf8Read(zString, &zString);
    +      if( c==0 ) return 0;
    +      c2 = sqlite3Utf8Read(zPattern, &zPattern);
    +      if( c2=='^' ){
    +        invert = 1;
    +        c2 = sqlite3Utf8Read(zPattern, &zPattern);
    +      }
    +      if( c2==']' ){
    +        if( c==']' ) seen = 1;
    +        c2 = sqlite3Utf8Read(zPattern, &zPattern);
    +      }
    +      while( c2 && c2!=']' ){
    +        if( c2=='-' && zPattern[0]!=']' && zPattern[0]!=0 && prior_c>0 ){
    +          c2 = sqlite3Utf8Read(zPattern, &zPattern);
    +          if( c>=prior_c && c<=c2 ) seen = 1;
    +          prior_c = 0;
    +        }else{
    +          if( c==c2 ){
    +            seen = 1;
    +          }
    +          prior_c = c2;
    +        }
    +        c2 = sqlite3Utf8Read(zPattern, &zPattern);
    +      }
    +      if( c2==0 || (seen ^ invert)==0 ){
    +        return 0;
    +      }
    +    }else if( esc==c && !prevEscape ){
    +      prevEscape = 1;
    +    }else{
    +      c2 = sqlite3Utf8Read(zString, &zString);
    +      if( noCase ){
    +        GlogUpperToLower(c);
    +        GlogUpperToLower(c2);
    +      }
    +      if( c!=c2 ){
    +        return 0;
    +      }
    +      prevEscape = 0;
    +    }
    +  }
    +  return *zString==0;
    +}
    +
    +/*
    +** Count the number of times that the LIKE operator (or GLOB which is
    +** just a variation of LIKE) gets called.  This is used for testing
    +** only.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_like_count = 0;
    +#endif
    +
    +
    +/*
    +** Implementation of the like() SQL function.  This function implements
    +** the build-in LIKE operator.  The first argument to the function is the
    +** pattern and the second argument is the string.  So, the SQL statements:
    +**
    +**       A LIKE B
    +**
    +** is implemented as like(B,A).
    +**
    +** This same function (with a different compareInfo structure) computes
    +** the GLOB operator.
    +*/
    +static void likeFunc(
    +  sqlite3_context *context, 
    +  int argc, 
    +  sqlite3_value **argv
    +){
    +  const unsigned char *zA, *zB;
    +  int escape = 0;
    +  int nPat;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +
    +  zB = sqlite3_value_text(argv[0]);
    +  zA = sqlite3_value_text(argv[1]);
    +
    +  /* Limit the length of the LIKE or GLOB pattern to avoid problems
    +  ** of deep recursion and N*N behavior in patternCompare().
    +  */
    +  nPat = sqlite3_value_bytes(argv[0]);
    +  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] );
    +  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]+1 );
    +  if( nPat > db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] ){
    +    sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
    +    return;
    +  }
    +  assert( zB==sqlite3_value_text(argv[0]) );  /* Encoding did not change */
    +
    +  if( argc==3 ){
    +    /* The escape character string must consist of a single UTF-8 character.
    +    ** Otherwise, return an error.
    +    */
    +    const unsigned char *zEsc = sqlite3_value_text(argv[2]);
    +    if( zEsc==0 ) return;
    +    if( sqlite3Utf8CharLen((char*)zEsc, -1)!=1 ){
    +      sqlite3_result_error(context, 
    +          "ESCAPE expression must be a single character", -1);
    +      return;
    +    }
    +    escape = sqlite3Utf8Read(zEsc, &zEsc);
    +  }
    +  if( zA && zB ){
    +    struct compareInfo *pInfo = sqlite3_user_data(context);
    +#ifdef SQLITE_TEST
    +    sqlite3_like_count++;
    +#endif
    +    
    +    sqlite3_result_int(context, patternCompare(zB, zA, pInfo, escape));
    +  }
    +}
    +
    +/*
    +** Implementation of the NULLIF(x,y) function.  The result is the first
    +** argument if the arguments are different.  The result is NULL if the
    +** arguments are equal to each other.
    +*/
    +static void nullifFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **argv
    +){
    +  CollSeq *pColl = sqlite3GetFuncCollSeq(context);
    +  UNUSED_PARAMETER(NotUsed);
    +  if( sqlite3MemCompare(argv[0], argv[1], pColl)!=0 ){
    +    sqlite3_result_value(context, argv[0]);
    +  }
    +}
    +
    +/*
    +** Implementation of the sqlite_version() function.  The result is the version
    +** of the SQLite library that is running.
    +*/
    +static void versionFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_result_text(context, sqlite3_version, -1, SQLITE_STATIC);
    +}
    +
    +/*
    +** Implementation of the sqlite_source_id() function. The result is a string
    +** that identifies the particular version of the source code used to build
    +** SQLite.
    +*/
    +static void sourceidFunc(
    +  sqlite3_context *context,
    +  int NotUsed,
    +  sqlite3_value **NotUsed2
    +){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  sqlite3_result_text(context, SQLITE_SOURCE_ID, -1, SQLITE_STATIC);
    +}
    +
    +/* Array for converting from half-bytes (nybbles) into ASCII hex
    +** digits. */
    +static const char hexdigits[] = {
    +  '0', '1', '2', '3', '4', '5', '6', '7',
    +  '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 
    +};
    +
    +/*
    +** EXPERIMENTAL - This is not an official function.  The interface may
    +** change.  This function may disappear.  Do not write code that depends
    +** on this function.
    +**
    +** Implementation of the QUOTE() function.  This function takes a single
    +** argument.  If the argument is numeric, the return value is the same as
    +** the argument.  If the argument is NULL, the return value is the string
    +** "NULL".  Otherwise, the argument is enclosed in single quotes with
    +** single-quote escapes.
    +*/
    +static void quoteFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  switch( sqlite3_value_type(argv[0]) ){
    +    case SQLITE_INTEGER:
    +    case SQLITE_FLOAT: {
    +      sqlite3_result_value(context, argv[0]);
    +      break;
    +    }
    +    case SQLITE_BLOB: {
    +      char *zText = 0;
    +      char const *zBlob = sqlite3_value_blob(argv[0]);
    +      int nBlob = sqlite3_value_bytes(argv[0]);
    +      assert( zBlob==sqlite3_value_blob(argv[0]) ); /* No encoding change */
    +      zText = (char *)contextMalloc(context, (2*(i64)nBlob)+4); 
    +      if( zText ){
    +        int i;
    +        for(i=0; i<nBlob; i++){
    +          zText[(i*2)+2] = hexdigits[(zBlob[i]>>4)&0x0F];
    +          zText[(i*2)+3] = hexdigits[(zBlob[i])&0x0F];
    +        }
    +        zText[(nBlob*2)+2] = '\'';
    +        zText[(nBlob*2)+3] = '\0';
    +        zText[0] = 'X';
    +        zText[1] = '\'';
    +        sqlite3_result_text(context, zText, -1, SQLITE_TRANSIENT);
    +        sqlite3_free(zText);
    +      }
    +      break;
    +    }
    +    case SQLITE_TEXT: {
    +      int i,j;
    +      u64 n;
    +      const unsigned char *zArg = sqlite3_value_text(argv[0]);
    +      char *z;
    +
    +      if( zArg==0 ) return;
    +      for(i=0, n=0; zArg[i]; i++){ if( zArg[i]=='\'' ) n++; }
    +      z = contextMalloc(context, ((i64)i)+((i64)n)+3);
    +      if( z ){
    +        z[0] = '\'';
    +        for(i=0, j=1; zArg[i]; i++){
    +          z[j++] = zArg[i];
    +          if( zArg[i]=='\'' ){
    +            z[j++] = '\'';
    +          }
    +        }
    +        z[j++] = '\'';
    +        z[j] = 0;
    +        sqlite3_result_text(context, z, j, sqlite3_free);
    +      }
    +      break;
    +    }
    +    default: {
    +      assert( sqlite3_value_type(argv[0])==SQLITE_NULL );
    +      sqlite3_result_text(context, "NULL", 4, SQLITE_STATIC);
    +      break;
    +    }
    +  }
    +}
    +
    +/*
    +** The hex() function.  Interpret the argument as a blob.  Return
    +** a hexadecimal rendering as text.
    +*/
    +static void hexFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int i, n;
    +  const unsigned char *pBlob;
    +  char *zHex, *z;
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  pBlob = sqlite3_value_blob(argv[0]);
    +  n = sqlite3_value_bytes(argv[0]);
    +  assert( pBlob==sqlite3_value_blob(argv[0]) );  /* No encoding change */
    +  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);
    +  if( zHex ){
    +    for(i=0; i<n; i++, pBlob++){
    +      unsigned char c = *pBlob;
    +      *(z++) = hexdigits[(c>>4)&0xf];
    +      *(z++) = hexdigits[c&0xf];
    +    }
    +    *z = 0;
    +    sqlite3_result_text(context, zHex, n*2, sqlite3_free);
    +  }
    +}
    +
    +/*
    +** The zeroblob(N) function returns a zero-filled blob of size N bytes.
    +*/
    +static void zeroblobFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  i64 n;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  n = sqlite3_value_int64(argv[0]);
    +  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
    +  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
    +  if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +    sqlite3_result_error_toobig(context);
    +  }else{
    +    sqlite3_result_zeroblob(context, (int)n);
    +  }
    +}
    +
    +/*
    +** The replace() function.  Three arguments are all strings: call
    +** them A, B, and C. The result is also a string which is derived
    +** from A by replacing every occurance of B with C.  The match
    +** must be exact.  Collating sequences are not used.
    +*/
    +static void replaceFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  const unsigned char *zStr;        /* The input string A */
    +  const unsigned char *zPattern;    /* The pattern string B */
    +  const unsigned char *zRep;        /* The replacement string C */
    +  unsigned char *zOut;              /* The output */
    +  int nStr;                /* Size of zStr */
    +  int nPattern;            /* Size of zPattern */
    +  int nRep;                /* Size of zRep */
    +  i64 nOut;                /* Maximum size of zOut */
    +  int loopLimit;           /* Last zStr[] that might match zPattern[] */
    +  int i, j;                /* Loop counters */
    +
    +  assert( argc==3 );
    +  UNUSED_PARAMETER(argc);
    +  zStr = sqlite3_value_text(argv[0]);
    +  if( zStr==0 ) return;
    +  nStr = sqlite3_value_bytes(argv[0]);
    +  assert( zStr==sqlite3_value_text(argv[0]) );  /* No encoding change */
    +  zPattern = sqlite3_value_text(argv[1]);
    +  if( zPattern==0 ){
    +    assert( sqlite3_value_type(argv[1])==SQLITE_NULL
    +            || sqlite3_context_db_handle(context)->mallocFailed );
    +    return;
    +  }
    +  if( zPattern[0]==0 ){
    +    assert( sqlite3_value_type(argv[1])!=SQLITE_NULL );
    +    sqlite3_result_value(context, argv[0]);
    +    return;
    +  }
    +  nPattern = sqlite3_value_bytes(argv[1]);
    +  assert( zPattern==sqlite3_value_text(argv[1]) );  /* No encoding change */
    +  zRep = sqlite3_value_text(argv[2]);
    +  if( zRep==0 ) return;
    +  nRep = sqlite3_value_bytes(argv[2]);
    +  assert( zRep==sqlite3_value_text(argv[2]) );
    +  nOut = nStr + 1;
    +  assert( nOut<SQLITE_MAX_LENGTH );
    +  zOut = contextMalloc(context, (i64)nOut);
    +  if( zOut==0 ){
    +    return;
    +  }
    +  loopLimit = nStr - nPattern;  
    +  for(i=j=0; i<=loopLimit; i++){
    +    if( zStr[i]!=zPattern[0] || memcmp(&zStr[i], zPattern, nPattern) ){
    +      zOut[j++] = zStr[i];
    +    }else{
    +      u8 *zOld;
    +      sqlite3 *db = sqlite3_context_db_handle(context);
    +      nOut += nRep - nPattern;
    +      testcase( nOut-1==db->aLimit[SQLITE_LIMIT_LENGTH] );
    +      testcase( nOut-2==db->aLimit[SQLITE_LIMIT_LENGTH] );
    +      if( nOut-1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    +        sqlite3_result_error_toobig(context);
    +        sqlite3DbFree(db, zOut);
    +        return;
    +      }
    +      zOld = zOut;
    +      zOut = sqlite3_realloc(zOut, (int)nOut);
    +      if( zOut==0 ){
    +        sqlite3_result_error_nomem(context);
    +        sqlite3DbFree(db, zOld);
    +        return;
    +      }
    +      memcpy(&zOut[j], zRep, nRep);
    +      j += nRep;
    +      i += nPattern-1;
    +    }
    +  }
    +  assert( j+nStr-i+1==nOut );
    +  memcpy(&zOut[j], &zStr[i], nStr-i);
    +  j += nStr - i;
    +  assert( j<=nOut );
    +  zOut[j] = 0;
    +  sqlite3_result_text(context, (char*)zOut, j, sqlite3_free);
    +}
    +
    +/*
    +** Implementation of the TRIM(), LTRIM(), and RTRIM() functions.
    +** The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.
    +*/
    +static void trimFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  const unsigned char *zIn;         /* Input string */
    +  const unsigned char *zCharSet;    /* Set of characters to trim */
    +  int nIn;                          /* Number of bytes in input */
    +  int flags;                        /* 1: trimleft  2: trimright  3: trim */
    +  int i;                            /* Loop counter */
    +  unsigned char *aLen = 0;          /* Length of each character in zCharSet */
    +  unsigned char **azChar = 0;       /* Individual characters in zCharSet */
    +  int nChar;                        /* Number of characters in zCharSet */
    +
    +  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){
    +    return;
    +  }
    +  zIn = sqlite3_value_text(argv[0]);
    +  if( zIn==0 ) return;
    +  nIn = sqlite3_value_bytes(argv[0]);
    +  assert( zIn==sqlite3_value_text(argv[0]) );
    +  if( argc==1 ){
    +    static const unsigned char lenOne[] = { 1 };
    +    static unsigned char * const azOne[] = { (u8*)" " };
    +    nChar = 1;
    +    aLen = (u8*)lenOne;
    +    azChar = (unsigned char **)azOne;
    +    zCharSet = 0;
    +  }else if( (zCharSet = sqlite3_value_text(argv[1]))==0 ){
    +    return;
    +  }else{
    +    const unsigned char *z;
    +    for(z=zCharSet, nChar=0; *z; nChar++){
    +      SQLITE_SKIP_UTF8(z);
    +    }
    +    if( nChar>0 ){
    +      azChar = contextMalloc(context, ((i64)nChar)*(sizeof(char*)+1));
    +      if( azChar==0 ){
    +        return;
    +      }
    +      aLen = (unsigned char*)&azChar[nChar];
    +      for(z=zCharSet, nChar=0; *z; nChar++){
    +        azChar[nChar] = (unsigned char *)z;
    +        SQLITE_SKIP_UTF8(z);
    +        aLen[nChar] = (u8)(z - azChar[nChar]);
    +      }
    +    }
    +  }
    +  if( nChar>0 ){
    +    flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context));
    +    if( flags & 1 ){
    +      while( nIn>0 ){
    +        int len = 0;
    +        for(i=0; i<nChar; i++){
    +          len = aLen[i];
    +          if( len<=nIn && memcmp(zIn, azChar[i], len)==0 ) break;
    +        }
    +        if( i>=nChar ) break;
    +        zIn += len;
    +        nIn -= len;
    +      }
    +    }
    +    if( flags & 2 ){
    +      while( nIn>0 ){
    +        int len = 0;
    +        for(i=0; i<nChar; i++){
    +          len = aLen[i];
    +          if( len<=nIn && memcmp(&zIn[nIn-len],azChar[i],len)==0 ) break;
    +        }
    +        if( i>=nChar ) break;
    +        nIn -= len;
    +      }
    +    }
    +    if( zCharSet ){
    +      sqlite3_free(azChar);
    +    }
    +  }
    +  sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
    +}
    +
    +
    +#ifdef SQLITE_SOUNDEX
    +/*
    +** Compute the soundex encoding of a word.
    +*/
    +static void soundexFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  char zResult[8];
    +  const u8 *zIn;
    +  int i, j;
    +  static const unsigned char iCode[] = {
    +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,
    +    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,
    +    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,
    +    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,
    +  };
    +  assert( argc==1 );
    +  zIn = (u8*)sqlite3_value_text(argv[0]);
    +  if( zIn==0 ) zIn = (u8*)"";
    +  for(i=0; zIn[i] && !sqlite3Isalpha(zIn[i]); i++){}
    +  if( zIn[i] ){
    +    u8 prevcode = iCode[zIn[i]&0x7f];
    +    zResult[0] = sqlite3Toupper(zIn[i]);
    +    for(j=1; j<4 && zIn[i]; i++){
    +      int code = iCode[zIn[i]&0x7f];
    +      if( code>0 ){
    +        if( code!=prevcode ){
    +          prevcode = code;
    +          zResult[j++] = code + '0';
    +        }
    +      }else{
    +        prevcode = 0;
    +      }
    +    }
    +    while( j<4 ){
    +      zResult[j++] = '0';
    +    }
    +    zResult[j] = 0;
    +    sqlite3_result_text(context, zResult, 4, SQLITE_TRANSIENT);
    +  }else{
    +    sqlite3_result_text(context, "?000", 4, SQLITE_STATIC);
    +  }
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +/*
    +** A function that loads a shared-library extension then returns NULL.
    +*/
    +static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  const char *zFile = (const char *)sqlite3_value_text(argv[0]);
    +  const char *zProc;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +  char *zErrMsg = 0;
    +
    +  if( argc==2 ){
    +    zProc = (const char *)sqlite3_value_text(argv[1]);
    +  }else{
    +    zProc = 0;
    +  }
    +  if( zFile && sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){
    +    sqlite3_result_error(context, zErrMsg, -1);
    +    sqlite3_free(zErrMsg);
    +  }
    +}
    +#endif
    +
    +
    +/*
    +** An instance of the following structure holds the context of a
    +** sum() or avg() aggregate computation.
    +*/
    +typedef struct SumCtx SumCtx;
    +struct SumCtx {
    +  double rSum;      /* Floating point sum */
    +  i64 iSum;         /* Integer sum */   
    +  i64 cnt;          /* Number of elements summed */
    +  u8 overflow;      /* True if integer overflow seen */
    +  u8 approx;        /* True if non-integer value was input to the sum */
    +};
    +
    +/*
    +** Routines used to compute the sum, average, and total.
    +**
    +** The SUM() function follows the (broken) SQL standard which means
    +** that it returns NULL if it sums over no inputs.  TOTAL returns
    +** 0.0 in that case.  In addition, TOTAL always returns a float where
    +** SUM might return an integer if it never encounters a floating point
    +** value.  TOTAL never fails, but SUM might through an exception if
    +** it overflows an integer.
    +*/
    +static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  SumCtx *p;
    +  int type;
    +  assert( argc==1 );
    +  UNUSED_PARAMETER(argc);
    +  p = sqlite3_aggregate_context(context, sizeof(*p));
    +  type = sqlite3_value_numeric_type(argv[0]);
    +  if( p && type!=SQLITE_NULL ){
    +    p->cnt++;
    +    if( type==SQLITE_INTEGER ){
    +      i64 v = sqlite3_value_int64(argv[0]);
    +      p->rSum += v;
    +      if( (p->approx|p->overflow)==0 ){
    +        i64 iNewSum = p->iSum + v;
    +        int s1 = (int)(p->iSum >> (sizeof(i64)*8-1));
    +        int s2 = (int)(v       >> (sizeof(i64)*8-1));
    +        int s3 = (int)(iNewSum >> (sizeof(i64)*8-1));
    +        p->overflow = ((s1&s2&~s3) | (~s1&~s2&s3))?1:0;
    +        p->iSum = iNewSum;
    +      }
    +    }else{
    +      p->rSum += sqlite3_value_double(argv[0]);
    +      p->approx = 1;
    +    }
    +  }
    +}
    +static void sumFinalize(sqlite3_context *context){
    +  SumCtx *p;
    +  p = sqlite3_aggregate_context(context, 0);
    +  if( p && p->cnt>0 ){
    +    if( p->overflow ){
    +      sqlite3_result_error(context,"integer overflow",-1);
    +    }else if( p->approx ){
    +      sqlite3_result_double(context, p->rSum);
    +    }else{
    +      sqlite3_result_int64(context, p->iSum);
    +    }
    +  }
    +}
    +static void avgFinalize(sqlite3_context *context){
    +  SumCtx *p;
    +  p = sqlite3_aggregate_context(context, 0);
    +  if( p && p->cnt>0 ){
    +    sqlite3_result_double(context, p->rSum/(double)p->cnt);
    +  }
    +}
    +static void totalFinalize(sqlite3_context *context){
    +  SumCtx *p;
    +  p = sqlite3_aggregate_context(context, 0);
    +  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +  sqlite3_result_double(context, p ? p->rSum : (double)0);
    +}
    +
    +/*
    +** The following structure keeps track of state information for the
    +** count() aggregate function.
    +*/
    +typedef struct CountCtx CountCtx;
    +struct CountCtx {
    +  i64 n;
    +};
    +
    +/*
    +** Routines to implement the count() aggregate function.
    +*/
    +static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
    +  CountCtx *p;
    +  p = sqlite3_aggregate_context(context, sizeof(*p));
    +  if( (argc==0 || SQLITE_NULL!=sqlite3_value_type(argv[0])) && p ){
    +    p->n++;
    +  }
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +  /* The sqlite3_aggregate_count() function is deprecated.  But just to make
    +  ** sure it still operates correctly, verify that its count agrees with our 
    +  ** internal count when using count(*) and when the total count can be
    +  ** expressed as a 32-bit integer. */
    +  assert( argc==1 || p==0 || p->n>0x7fffffff
    +          || p->n==sqlite3_aggregate_count(context) );
    +#endif
    +}   
    +static void countFinalize(sqlite3_context *context){
    +  CountCtx *p;
    +  p = sqlite3_aggregate_context(context, 0);
    +  sqlite3_result_int64(context, p ? p->n : 0);
    +}
    +
    +/*
    +** Routines to implement min() and max() aggregate functions.
    +*/
    +static void minmaxStep(
    +  sqlite3_context *context, 
    +  int NotUsed, 
    +  sqlite3_value **argv
    +){
    +  Mem *pArg  = (Mem *)argv[0];
    +  Mem *pBest;
    +  UNUSED_PARAMETER(NotUsed);
    +
    +  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
    +  pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
    +  if( !pBest ) return;
    +
    +  if( pBest->flags ){
    +    int max;
    +    int cmp;
    +    CollSeq *pColl = sqlite3GetFuncCollSeq(context);
    +    /* This step function is used for both the min() and max() aggregates,
    +    ** the only difference between the two being that the sense of the
    +    ** comparison is inverted. For the max() aggregate, the
    +    ** sqlite3_user_data() function returns (void *)-1. For min() it
    +    ** returns (void *)db, where db is the sqlite3* database pointer.
    +    ** Therefore the next statement sets variable 'max' to 1 for the max()
    +    ** aggregate, or 0 for min().
    +    */
    +    max = sqlite3_user_data(context)!=0;
    +    cmp = sqlite3MemCompare(pBest, pArg, pColl);
    +    if( (max && cmp<0) || (!max && cmp>0) ){
    +      sqlite3VdbeMemCopy(pBest, pArg);
    +    }
    +  }else{
    +    sqlite3VdbeMemCopy(pBest, pArg);
    +  }
    +}
    +static void minMaxFinalize(sqlite3_context *context){
    +  sqlite3_value *pRes;
    +  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
    +  if( pRes ){
    +    if( ALWAYS(pRes->flags) ){
    +      sqlite3_result_value(context, pRes);
    +    }
    +    sqlite3VdbeMemRelease(pRes);
    +  }
    +}
    +
    +/*
    +** group_concat(EXPR, ?SEPARATOR?)
    +*/
    +static void groupConcatStep(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  const char *zVal;
    +  StrAccum *pAccum;
    +  const char *zSep;
    +  int nVal, nSep;
    +  assert( argc==1 || argc==2 );
    +  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
    +  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));
    +
    +  if( pAccum ){
    +    sqlite3 *db = sqlite3_context_db_handle(context);
    +    int firstTerm = pAccum->useMalloc==0;
    +    pAccum->useMalloc = 1;
    +    pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
    +    if( !firstTerm ){
    +      if( argc==2 ){
    +        zSep = (char*)sqlite3_value_text(argv[1]);
    +        nSep = sqlite3_value_bytes(argv[1]);
    +      }else{
    +        zSep = ",";
    +        nSep = 1;
    +      }
    +      sqlite3StrAccumAppend(pAccum, zSep, nSep);
    +    }
    +    zVal = (char*)sqlite3_value_text(argv[0]);
    +    nVal = sqlite3_value_bytes(argv[0]);
    +    sqlite3StrAccumAppend(pAccum, zVal, nVal);
    +  }
    +}
    +static void groupConcatFinalize(sqlite3_context *context){
    +  StrAccum *pAccum;
    +  pAccum = sqlite3_aggregate_context(context, 0);
    +  if( pAccum ){
    +    if( pAccum->tooBig ){
    +      sqlite3_result_error_toobig(context);
    +    }else if( pAccum->mallocFailed ){
    +      sqlite3_result_error_nomem(context);
    +    }else{    
    +      sqlite3_result_text(context, sqlite3StrAccumFinish(pAccum), -1, 
    +                          sqlite3_free);
    +    }
    +  }
    +}
    +
    +/*
    +** This function registered all of the above C functions as SQL
    +** functions.  This should be the only routine in this file with
    +** external linkage.
    +*/
    +SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
    +#ifndef SQLITE_OMIT_ALTERTABLE
    +  sqlite3AlterFunctions(db);
    +#endif
    +  if( !db->mallocFailed ){
    +    int rc = sqlite3_overload_function(db, "MATCH", 2);
    +    assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
    +    if( rc==SQLITE_NOMEM ){
    +      db->mallocFailed = 1;
    +    }
    +  }
    +}
    +
    +/*
    +** Set the LIKEOPT flag on the 2-argument function with the given name.
    +*/
    +static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
    +  FuncDef *pDef;
    +  pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
    +                             2, SQLITE_UTF8, 0);
    +  if( ALWAYS(pDef) ){
    +    pDef->flags = flagVal;
    +  }
    +}
    +
    +/*
    +** Register the built-in LIKE and GLOB functions.  The caseSensitive
    +** parameter determines whether or not the LIKE operator is case
    +** sensitive.  GLOB is always case sensitive.
    +*/
    +SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
    +  struct compareInfo *pInfo;
    +  if( caseSensitive ){
    +    pInfo = (struct compareInfo*)&likeInfoAlt;
    +  }else{
    +    pInfo = (struct compareInfo*)&likeInfoNorm;
    +  }
    +  sqlite3CreateFunc(db, "like", 2, SQLITE_ANY, pInfo, likeFunc, 0, 0);
    +  sqlite3CreateFunc(db, "like", 3, SQLITE_ANY, pInfo, likeFunc, 0, 0);
    +  sqlite3CreateFunc(db, "glob", 2, SQLITE_ANY, 
    +      (struct compareInfo*)&globInfo, likeFunc, 0,0);
    +  setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE);
    +  setLikeOptFlag(db, "like", 
    +      caseSensitive ? (SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE) : SQLITE_FUNC_LIKE);
    +}
    +
    +/*
    +** pExpr points to an expression which implements a function.  If
    +** it is appropriate to apply the LIKE optimization to that function
    +** then set aWc[0] through aWc[2] to the wildcard characters and
    +** return TRUE.  If the function is not a LIKE-style function then
    +** return FALSE.
    +*/
    +SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
    +  FuncDef *pDef;
    +  if( pExpr->op!=TK_FUNCTION 
    +   || !pExpr->x.pList 
    +   || pExpr->x.pList->nExpr!=2
    +  ){
    +    return 0;
    +  }
    +  assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
    +  pDef = sqlite3FindFunction(db, pExpr->u.zToken, 
    +                             sqlite3Strlen30(pExpr->u.zToken),
    +                             2, SQLITE_UTF8, 0);
    +  if( NEVER(pDef==0) || (pDef->flags & SQLITE_FUNC_LIKE)==0 ){
    +    return 0;
    +  }
    +
    +  /* The memcpy() statement assumes that the wildcard characters are
    +  ** the first three statements in the compareInfo structure.  The
    +  ** asserts() that follow verify that assumption
    +  */
    +  memcpy(aWc, pDef->pUserData, 3);
    +  assert( (char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll );
    +  assert( &((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne );
    +  assert( &((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet );
    +  *pIsNocase = (pDef->flags & SQLITE_FUNC_CASE)==0;
    +  return 1;
    +}
    +
    +/*
    +** All all of the FuncDef structures in the aBuiltinFunc[] array above
    +** to the global function hash table.  This occurs at start-time (as
    +** a consequence of calling sqlite3_initialize()).
    +**
    +** After this routine runs
    +*/
    +SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){
    +  /*
    +  ** The following array holds FuncDef structures for all of the functions
    +  ** defined in this file.
    +  **
    +  ** The array cannot be constant since changes are made to the
    +  ** FuncDef.pHash elements at start-time.  The elements of this array
    +  ** are read-only after initialization is complete.
    +  */
    +  static SQLITE_WSD FuncDef aBuiltinFunc[] = {
    +    FUNCTION(ltrim,              1, 1, 0, trimFunc         ),
    +    FUNCTION(ltrim,              2, 1, 0, trimFunc         ),
    +    FUNCTION(rtrim,              1, 2, 0, trimFunc         ),
    +    FUNCTION(rtrim,              2, 2, 0, trimFunc         ),
    +    FUNCTION(trim,               1, 3, 0, trimFunc         ),
    +    FUNCTION(trim,               2, 3, 0, trimFunc         ),
    +    FUNCTION(min,               -1, 0, 1, minmaxFunc       ),
    +    FUNCTION(min,                0, 0, 1, 0                ),
    +    AGGREGATE(min,               1, 0, 1, minmaxStep,      minMaxFinalize ),
    +    FUNCTION(max,               -1, 1, 1, minmaxFunc       ),
    +    FUNCTION(max,                0, 1, 1, 0                ),
    +    AGGREGATE(max,               1, 1, 1, minmaxStep,      minMaxFinalize ),
    +    FUNCTION(typeof,             1, 0, 0, typeofFunc       ),
    +    FUNCTION(length,             1, 0, 0, lengthFunc       ),
    +    FUNCTION(substr,             2, 0, 0, substrFunc       ),
    +    FUNCTION(substr,             3, 0, 0, substrFunc       ),
    +    FUNCTION(abs,                1, 0, 0, absFunc          ),
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +    FUNCTION(round,              1, 0, 0, roundFunc        ),
    +    FUNCTION(round,              2, 0, 0, roundFunc        ),
    +#endif
    +    FUNCTION(upper,              1, 0, 0, upperFunc        ),
    +    FUNCTION(lower,              1, 0, 0, lowerFunc        ),
    +    FUNCTION(coalesce,           1, 0, 0, 0                ),
    +    FUNCTION(coalesce,          -1, 0, 0, ifnullFunc       ),
    +    FUNCTION(coalesce,           0, 0, 0, 0                ),
    +    FUNCTION(hex,                1, 0, 0, hexFunc          ),
    +    FUNCTION(ifnull,             2, 0, 1, ifnullFunc       ),
    +    FUNCTION(random,             0, 0, 0, randomFunc       ),
    +    FUNCTION(randomblob,         1, 0, 0, randomBlob       ),
    +    FUNCTION(nullif,             2, 0, 1, nullifFunc       ),
    +    FUNCTION(sqlite_version,     0, 0, 0, versionFunc      ),
    +    FUNCTION(sqlite_source_id,   0, 0, 0, sourceidFunc     ),
    +    FUNCTION(quote,              1, 0, 0, quoteFunc        ),
    +    FUNCTION(last_insert_rowid,  0, 0, 0, last_insert_rowid),
    +    FUNCTION(changes,            0, 0, 0, changes          ),
    +    FUNCTION(total_changes,      0, 0, 0, total_changes    ),
    +    FUNCTION(replace,            3, 0, 0, replaceFunc      ),
    +    FUNCTION(zeroblob,           1, 0, 0, zeroblobFunc     ),
    +  #ifdef SQLITE_SOUNDEX
    +    FUNCTION(soundex,            1, 0, 0, soundexFunc      ),
    +  #endif
    +  #ifndef SQLITE_OMIT_LOAD_EXTENSION
    +    FUNCTION(load_extension,     1, 0, 0, loadExt          ),
    +    FUNCTION(load_extension,     2, 0, 0, loadExt          ),
    +  #endif
    +    AGGREGATE(sum,               1, 0, 0, sumStep,         sumFinalize    ),
    +    AGGREGATE(total,             1, 0, 0, sumStep,         totalFinalize    ),
    +    AGGREGATE(avg,               1, 0, 0, sumStep,         avgFinalize    ),
    + /* AGGREGATE(count,             0, 0, 0, countStep,       countFinalize  ), */
    +    {0,SQLITE_UTF8,SQLITE_FUNC_COUNT,0,0,0,countStep,countFinalize,"count",0},
    +    AGGREGATE(count,             1, 0, 0, countStep,       countFinalize  ),
    +    AGGREGATE(group_concat,      1, 0, 0, groupConcatStep, groupConcatFinalize),
    +    AGGREGATE(group_concat,      2, 0, 0, groupConcatStep, groupConcatFinalize),
    +  
    +    LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
    +  #ifdef SQLITE_CASE_SENSITIVE_LIKE
    +    LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
    +    LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
    +  #else
    +    LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE),
    +    LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE),
    +  #endif
    +  };
    +
    +  int i;
    +  FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
    +  FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aBuiltinFunc);
    +
    +  for(i=0; i<ArraySize(aBuiltinFunc); i++){
    +    sqlite3FuncDefInsert(pHash, &aFunc[i]);
    +  }
    +  sqlite3RegisterDateTimeFunctions();
    +}
    +
    +/************** End of func.c ************************************************/
    +/************** Begin file fkey.c ********************************************/
    +/*
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used by the compiler to add foreign key
    +** support to compiled SQL statements.
    +*/
    +
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +#ifndef SQLITE_OMIT_TRIGGER
    +
    +/*
    +** Deferred and Immediate FKs
    +** --------------------------
    +**
    +** Foreign keys in SQLite come in two flavours: deferred and immediate.
    +** If an immediate foreign key constraint is violated, SQLITE_CONSTRAINT
    +** is returned and the current statement transaction rolled back. If a 
    +** deferred foreign key constraint is violated, no action is taken 
    +** immediately. However if the application attempts to commit the 
    +** transaction before fixing the constraint violation, the attempt fails.
    +**
    +** Deferred constraints are implemented using a simple counter associated
    +** with the database handle. The counter is set to zero each time a 
    +** database transaction is opened. Each time a statement is executed 
    +** that causes a foreign key violation, the counter is incremented. Each
    +** time a statement is executed that removes an existing violation from
    +** the database, the counter is decremented. When the transaction is
    +** committed, the commit fails if the current value of the counter is
    +** greater than zero. This scheme has two big drawbacks:
    +**
    +**   * When a commit fails due to a deferred foreign key constraint, 
    +**     there is no way to tell which foreign constraint is not satisfied,
    +**     or which row it is not satisfied for.
    +**
    +**   * If the database contains foreign key violations when the 
    +**     transaction is opened, this may cause the mechanism to malfunction.
    +**
    +** Despite these problems, this approach is adopted as it seems simpler
    +** than the alternatives.
    +**
    +** INSERT operations:
    +**
    +**   I.1) For each FK for which the table is the child table, search
    +**        the parent table for a match. If none is found increment the
    +**        constraint counter.
    +**
    +**   I.2) For each FK for which the table is the parent table, 
    +**        search the child table for rows that correspond to the new
    +**        row in the parent table. Decrement the counter for each row
    +**        found (as the constraint is now satisfied).
    +**
    +** DELETE operations:
    +**
    +**   D.1) For each FK for which the table is the child table, 
    +**        search the parent table for a row that corresponds to the 
    +**        deleted row in the child table. If such a row is not found, 
    +**        decrement the counter.
    +**
    +**   D.2) For each FK for which the table is the parent table, search 
    +**        the child table for rows that correspond to the deleted row 
    +**        in the parent table. For each found increment the counter.
    +**
    +** UPDATE operations:
    +**
    +**   An UPDATE command requires that all 4 steps above are taken, but only
    +**   for FK constraints for which the affected columns are actually 
    +**   modified (values must be compared at runtime).
    +**
    +** Note that I.1 and D.1 are very similar operations, as are I.2 and D.2.
    +** This simplifies the implementation a bit.
    +**
    +** For the purposes of immediate FK constraints, the OR REPLACE conflict
    +** resolution is considered to delete rows before the new row is inserted.
    +** If a delete caused by OR REPLACE violates an FK constraint, an exception
    +** is thrown, even if the FK constraint would be satisfied after the new 
    +** row is inserted.
    +**
    +** Immediate constraints are usually handled similarly. The only difference 
    +** is that the counter used is stored as part of each individual statement
    +** object (struct Vdbe). If, after the statement has run, its immediate
    +** constraint counter is greater than zero, it returns SQLITE_CONSTRAINT
    +** and the statement transaction is rolled back. An exception is an INSERT
    +** statement that inserts a single row only (no triggers). In this case,
    +** instead of using a counter, an exception is thrown immediately if the
    +** INSERT violates a foreign key constraint. This is necessary as such
    +** an INSERT does not open a statement transaction.
    +**
    +** TODO: How should dropping a table be handled? How should renaming a 
    +** table be handled?
    +**
    +**
    +** Query API Notes
    +** ---------------
    +**
    +** Before coding an UPDATE or DELETE row operation, the code-generator
    +** for those two operations needs to know whether or not the operation
    +** requires any FK processing and, if so, which columns of the original
    +** row are required by the FK processing VDBE code (i.e. if FKs were
    +** implemented using triggers, which of the old.* columns would be 
    +** accessed). No information is required by the code-generator before
    +** coding an INSERT operation. The functions used by the UPDATE/DELETE
    +** generation code to query for this information are:
    +**
    +**   sqlite3FkRequired() - Test to see if FK processing is required.
    +**   sqlite3FkOldmask()  - Query for the set of required old.* columns.
    +**
    +**
    +** Externally accessible module functions
    +** --------------------------------------
    +**
    +**   sqlite3FkCheck()    - Check for foreign key violations.
    +**   sqlite3FkActions()  - Code triggers for ON UPDATE/ON DELETE actions.
    +**   sqlite3FkDelete()   - Delete an FKey structure.
    +*/
    +
    +/*
    +** VDBE Calling Convention
    +** -----------------------
    +**
    +** Example:
    +**
    +**   For the following INSERT statement:
    +**
    +**     CREATE TABLE t1(a, b INTEGER PRIMARY KEY, c);
    +**     INSERT INTO t1 VALUES(1, 2, 3.1);
    +**
    +**   Register (x):        2    (type integer)
    +**   Register (x+1):      1    (type integer)
    +**   Register (x+2):      NULL (type NULL)
    +**   Register (x+3):      3.1  (type real)
    +*/
    +
    +/*
    +** A foreign key constraint requires that the key columns in the parent
    +** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
    +** Given that pParent is the parent table for foreign key constraint pFKey, 
    +** search the schema a unique index on the parent key columns. 
    +**
    +** If successful, zero is returned. If the parent key is an INTEGER PRIMARY 
    +** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx 
    +** is set to point to the unique index. 
    +** 
    +** If the parent key consists of a single column (the foreign key constraint
    +** is not a composite foreign key), output variable *paiCol is set to NULL.
    +** Otherwise, it is set to point to an allocated array of size N, where
    +** N is the number of columns in the parent key. The first element of the
    +** array is the index of the child table column that is mapped by the FK
    +** constraint to the parent table column stored in the left-most column
    +** of index *ppIdx. The second element of the array is the index of the
    +** child table column that corresponds to the second left-most column of
    +** *ppIdx, and so on.
    +**
    +** If the required index cannot be found, either because:
    +**
    +**   1) The named parent key columns do not exist, or
    +**
    +**   2) The named parent key columns do exist, but are not subject to a
    +**      UNIQUE or PRIMARY KEY constraint, or
    +**
    +**   3) No parent key columns were provided explicitly as part of the
    +**      foreign key definition, and the parent table does not have a
    +**      PRIMARY KEY, or
    +**
    +**   4) No parent key columns were provided explicitly as part of the
    +**      foreign key definition, and the PRIMARY KEY of the parent table 
    +**      consists of a a different number of columns to the child key in 
    +**      the child table.
    +**
    +** then non-zero is returned, and a "foreign key mismatch" error loaded
    +** into pParse. If an OOM error occurs, non-zero is returned and the
    +** pParse->db->mallocFailed flag is set.
    +*/
    +static int locateFkeyIndex(
    +  Parse *pParse,                  /* Parse context to store any error in */
    +  Table *pParent,                 /* Parent table of FK constraint pFKey */
    +  FKey *pFKey,                    /* Foreign key to find index for */
    +  Index **ppIdx,                  /* OUT: Unique index on parent table */
    +  int **paiCol                    /* OUT: Map of index columns in pFKey */
    +){
    +  Index *pIdx = 0;                    /* Value to return via *ppIdx */
    +  int *aiCol = 0;                     /* Value to return via *paiCol */
    +  int nCol = pFKey->nCol;             /* Number of columns in parent key */
    +  char *zKey = pFKey->aCol[0].zCol;   /* Name of left-most parent key column */
    +
    +  /* The caller is responsible for zeroing output parameters. */
    +  assert( ppIdx && *ppIdx==0 );
    +  assert( !paiCol || *paiCol==0 );
    +  assert( pParse );
    +
    +  /* If this is a non-composite (single column) foreign key, check if it 
    +  ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx 
    +  ** and *paiCol set to zero and return early. 
    +  **
    +  ** Otherwise, for a composite foreign key (more than one column), allocate
    +  ** space for the aiCol array (returned via output parameter *paiCol).
    +  ** Non-composite foreign keys do not require the aiCol array.
    +  */
    +  if( nCol==1 ){
    +    /* The FK maps to the IPK if any of the following are true:
    +    **
    +    **   1) There is an INTEGER PRIMARY KEY column and the FK is implicitly 
    +    **      mapped to the primary key of table pParent, or
    +    **   2) The FK is explicitly mapped to a column declared as INTEGER
    +    **      PRIMARY KEY.
    +    */
    +    if( pParent->iPKey>=0 ){
    +      if( !zKey ) return 0;
    +      if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
    +    }
    +  }else if( paiCol ){
    +    assert( nCol>1 );
    +    aiCol = (int *)sqlite3DbMallocRaw(pParse->db, nCol*sizeof(int));
    +    if( !aiCol ) return 1;
    +    *paiCol = aiCol;
    +  }
    +
    +  for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
    +    if( pIdx->nColumn==nCol && pIdx->onError!=OE_None ){ 
    +      /* pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number
    +      ** of columns. If each indexed column corresponds to a foreign key
    +      ** column of pFKey, then this index is a winner.  */
    +
    +      if( zKey==0 ){
    +        /* If zKey is NULL, then this foreign key is implicitly mapped to 
    +        ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be 
    +        ** identified by the test (Index.autoIndex==2).  */
    +        if( pIdx->autoIndex==2 ){
    +          if( aiCol ){
    +            int i;
    +            for(i=0; i<nCol; i++) aiCol[i] = pFKey->aCol[i].iFrom;
    +          }
    +          break;
    +        }
    +      }else{
    +        /* If zKey is non-NULL, then this foreign key was declared to
    +        ** map to an explicit list of columns in table pParent. Check if this
    +        ** index matches those columns. Also, check that the index uses
    +        ** the default collation sequences for each column. */
    +        int i, j;
    +        for(i=0; i<nCol; i++){
    +          int iCol = pIdx->aiColumn[i];     /* Index of column in parent tbl */
    +          char *zDfltColl;                  /* Def. collation for column */
    +          char *zIdxCol;                    /* Name of indexed column */
    +
    +          /* If the index uses a collation sequence that is different from
    +          ** the default collation sequence for the column, this index is
    +          ** unusable. Bail out early in this case.  */
    +          zDfltColl = pParent->aCol[iCol].zColl;
    +          if( !zDfltColl ){
    +            zDfltColl = "BINARY";
    +          }
    +          if( sqlite3StrICmp(pIdx->azColl[i], zDfltColl) ) break;
    +
    +          zIdxCol = pParent->aCol[iCol].zName;
    +          for(j=0; j<nCol; j++){
    +            if( sqlite3StrICmp(pFKey->aCol[j].zCol, zIdxCol)==0 ){
    +              if( aiCol ) aiCol[i] = pFKey->aCol[j].iFrom;
    +              break;
    +            }
    +          }
    +          if( j==nCol ) break;
    +        }
    +        if( i==nCol ) break;      /* pIdx is usable */
    +      }
    +    }
    +  }
    +
    +  if( !pIdx ){
    +    if( !pParse->disableTriggers ){
    +      sqlite3ErrorMsg(pParse, "foreign key mismatch");
    +    }
    +    sqlite3DbFree(pParse->db, aiCol);
    +    return 1;
    +  }
    +
    +  *ppIdx = pIdx;
    +  return 0;
    +}
    +
    +/*
    +** This function is called when a row is inserted into or deleted from the 
    +** child table of foreign key constraint pFKey. If an SQL UPDATE is executed 
    +** on the child table of pFKey, this function is invoked twice for each row
    +** affected - once to "delete" the old row, and then again to "insert" the
    +** new row.
    +**
    +** Each time it is called, this function generates VDBE code to locate the
    +** row in the parent table that corresponds to the row being inserted into 
    +** or deleted from the child table. If the parent row can be found, no 
    +** special action is taken. Otherwise, if the parent row can *not* be
    +** found in the parent table:
    +**
    +**   Operation | FK type   | Action taken
    +**   --------------------------------------------------------------------------
    +**   INSERT      immediate   Increment the "immediate constraint counter".
    +**
    +**   DELETE      immediate   Decrement the "immediate constraint counter".
    +**
    +**   INSERT      deferred    Increment the "deferred constraint counter".
    +**
    +**   DELETE      deferred    Decrement the "deferred constraint counter".
    +**
    +** These operations are identified in the comment at the top of this file 
    +** (fkey.c) as "I.1" and "D.1".
    +*/
    +static void fkLookupParent(
    +  Parse *pParse,        /* Parse context */
    +  int iDb,              /* Index of database housing pTab */
    +  Table *pTab,          /* Parent table of FK pFKey */
    +  Index *pIdx,          /* Unique index on parent key columns in pTab */
    +  FKey *pFKey,          /* Foreign key constraint */
    +  int *aiCol,           /* Map from parent key columns to child table columns */
    +  int regData,          /* Address of array containing child table row */
    +  int nIncr,            /* Increment constraint counter by this */
    +  int isIgnore          /* If true, pretend pTab contains all NULL values */
    +){
    +  int i;                                    /* Iterator variable */
    +  Vdbe *v = sqlite3GetVdbe(pParse);         /* Vdbe to add code to */
    +  int iCur = pParse->nTab - 1;              /* Cursor number to use */
    +  int iOk = sqlite3VdbeMakeLabel(v);        /* jump here if parent key found */
    +
    +  /* If nIncr is less than zero, then check at runtime if there are any
    +  ** outstanding constraints to resolve. If there are not, there is no need
    +  ** to check if deleting this row resolves any outstanding violations.
    +  **
    +  ** Check if any of the key columns in the child table row are NULL. If 
    +  ** any are, then the constraint is considered satisfied. No need to 
    +  ** search for a matching row in the parent table.  */
    +  if( nIncr<0 ){
    +    sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, iOk);
    +  }
    +  for(i=0; i<pFKey->nCol; i++){
    +    int iReg = aiCol[i] + regData + 1;
    +    sqlite3VdbeAddOp2(v, OP_IsNull, iReg, iOk);
    +  }
    +
    +  if( isIgnore==0 ){
    +    if( pIdx==0 ){
    +      /* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY
    +      ** column of the parent table (table pTab).  */
    +      int iMustBeInt;               /* Address of MustBeInt instruction */
    +      int regTemp = sqlite3GetTempReg(pParse);
    +  
    +      /* Invoke MustBeInt to coerce the child key value to an integer (i.e. 
    +      ** apply the affinity of the parent key). If this fails, then there
    +      ** is no matching parent key. Before using MustBeInt, make a copy of
    +      ** the value. Otherwise, the value inserted into the child key column
    +      ** will have INTEGER affinity applied to it, which may not be correct.  */
    +      sqlite3VdbeAddOp2(v, OP_SCopy, aiCol[0]+1+regData, regTemp);
    +      iMustBeInt = sqlite3VdbeAddOp2(v, OP_MustBeInt, regTemp, 0);
    +  
    +      /* If the parent table is the same as the child table, and we are about
    +      ** to increment the constraint-counter (i.e. this is an INSERT operation),
    +      ** then check if the row being inserted matches itself. If so, do not
    +      ** increment the constraint-counter.  */
    +      if( pTab==pFKey->pFrom && nIncr==1 ){
    +        sqlite3VdbeAddOp3(v, OP_Eq, regData, iOk, regTemp);
    +      }
    +  
    +      sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
    +      sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regTemp);
    +      sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
    +      sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
    +      sqlite3VdbeJumpHere(v, iMustBeInt);
    +      sqlite3ReleaseTempReg(pParse, regTemp);
    +    }else{
    +      int nCol = pFKey->nCol;
    +      int regTemp = sqlite3GetTempRange(pParse, nCol);
    +      int regRec = sqlite3GetTempReg(pParse);
    +      KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    +  
    +      sqlite3VdbeAddOp3(v, OP_OpenRead, iCur, pIdx->tnum, iDb);
    +      sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
    +      for(i=0; i<nCol; i++){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, aiCol[i]+1+regData, regTemp+i);
    +      }
    +  
    +      /* If the parent table is the same as the child table, and we are about
    +      ** to increment the constraint-counter (i.e. this is an INSERT operation),
    +      ** then check if the row being inserted matches itself. If so, do not
    +      ** increment the constraint-counter.  */
    +      if( pTab==pFKey->pFrom && nIncr==1 ){
    +        int iJump = sqlite3VdbeCurrentAddr(v) + nCol + 1;
    +        for(i=0; i<nCol; i++){
    +          int iChild = aiCol[i]+1+regData;
    +          int iParent = pIdx->aiColumn[i]+1+regData;
    +          sqlite3VdbeAddOp3(v, OP_Ne, iChild, iJump, iParent);
    +        }
    +        sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
    +      }
    +  
    +      sqlite3VdbeAddOp3(v, OP_MakeRecord, regTemp, nCol, regRec);
    +      sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), 0);
    +      sqlite3VdbeAddOp3(v, OP_Found, iCur, iOk, regRec);
    +  
    +      sqlite3ReleaseTempReg(pParse, regRec);
    +      sqlite3ReleaseTempRange(pParse, regTemp, nCol);
    +    }
    +  }
    +
    +  if( !pFKey->isDeferred && !pParse->pToplevel && !pParse->isMultiWrite ){
    +    /* Special case: If this is an INSERT statement that will insert exactly
    +    ** one row into the table, raise a constraint immediately instead of
    +    ** incrementing a counter. This is necessary as the VM code is being
    +    ** generated for will not open a statement transaction.  */
    +    assert( nIncr==1 );
    +    sqlite3HaltConstraint(
    +        pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
    +    );
    +  }else{
    +    if( nIncr>0 && pFKey->isDeferred==0 ){
    +      sqlite3ParseToplevel(pParse)->mayAbort = 1;
    +    }
    +    sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
    +  }
    +
    +  sqlite3VdbeResolveLabel(v, iOk);
    +  sqlite3VdbeAddOp1(v, OP_Close, iCur);
    +}
    +
    +/*
    +** This function is called to generate code executed when a row is deleted
    +** from the parent table of foreign key constraint pFKey and, if pFKey is 
    +** deferred, when a row is inserted into the same table. When generating
    +** code for an SQL UPDATE operation, this function may be called twice -
    +** once to "delete" the old row and once to "insert" the new row.
    +**
    +** The code generated by this function scans through the rows in the child
    +** table that correspond to the parent table row being deleted or inserted.
    +** For each child row found, one of the following actions is taken:
    +**
    +**   Operation | FK type   | Action taken
    +**   --------------------------------------------------------------------------
    +**   DELETE      immediate   Increment the "immediate constraint counter".
    +**                           Or, if the ON (UPDATE|DELETE) action is RESTRICT,
    +**                           throw a "foreign key constraint failed" exception.
    +**
    +**   INSERT      immediate   Decrement the "immediate constraint counter".
    +**
    +**   DELETE      deferred    Increment the "deferred constraint counter".
    +**                           Or, if the ON (UPDATE|DELETE) action is RESTRICT,
    +**                           throw a "foreign key constraint failed" exception.
    +**
    +**   INSERT      deferred    Decrement the "deferred constraint counter".
    +**
    +** These operations are identified in the comment at the top of this file 
    +** (fkey.c) as "I.2" and "D.2".
    +*/
    +static void fkScanChildren(
    +  Parse *pParse,                  /* Parse context */
    +  SrcList *pSrc,                  /* SrcList containing the table to scan */
    +  Table *pTab,
    +  Index *pIdx,                    /* Foreign key index */
    +  FKey *pFKey,                    /* Foreign key relationship */
    +  int *aiCol,                     /* Map from pIdx cols to child table cols */
    +  int regData,                    /* Referenced table data starts here */
    +  int nIncr                       /* Amount to increment deferred counter by */
    +){
    +  sqlite3 *db = pParse->db;       /* Database handle */
    +  int i;                          /* Iterator variable */
    +  Expr *pWhere = 0;               /* WHERE clause to scan with */
    +  NameContext sNameContext;       /* Context used to resolve WHERE clause */
    +  WhereInfo *pWInfo;              /* Context used by sqlite3WhereXXX() */
    +  int iFkIfZero = 0;              /* Address of OP_FkIfZero */
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +
    +  assert( !pIdx || pIdx->pTable==pTab );
    +
    +  if( nIncr<0 ){
    +    iFkIfZero = sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, 0);
    +  }
    +
    +  /* Create an Expr object representing an SQL expression like:
    +  **
    +  **   <parent-key1> = <child-key1> AND <parent-key2> = <child-key2> ...
    +  **
    +  ** The collation sequence used for the comparison should be that of
    +  ** the parent key columns. The affinity of the parent key column should
    +  ** be applied to each child key value before the comparison takes place.
    +  */
    +  for(i=0; i<pFKey->nCol; i++){
    +    Expr *pLeft;                  /* Value from parent table row */
    +    Expr *pRight;                 /* Column ref to child table */
    +    Expr *pEq;                    /* Expression (pLeft = pRight) */
    +    int iCol;                     /* Index of column in child table */ 
    +    const char *zCol;             /* Name of column in child table */
    +
    +    pLeft = sqlite3Expr(db, TK_REGISTER, 0);
    +    if( pLeft ){
    +      /* Set the collation sequence and affinity of the LHS of each TK_EQ
    +      ** expression to the parent key column defaults.  */
    +      if( pIdx ){
    +        Column *pCol;
    +        iCol = pIdx->aiColumn[i];
    +        pCol = &pIdx->pTable->aCol[iCol];
    +        pLeft->iTable = regData+iCol+1;
    +        pLeft->affinity = pCol->affinity;
    +        pLeft->pColl = sqlite3LocateCollSeq(pParse, pCol->zColl);
    +      }else{
    +        pLeft->iTable = regData;
    +        pLeft->affinity = SQLITE_AFF_INTEGER;
    +      }
    +    }
    +    iCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
    +    assert( iCol>=0 );
    +    zCol = pFKey->pFrom->aCol[iCol].zName;
    +    pRight = sqlite3Expr(db, TK_ID, zCol);
    +    pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight, 0);
    +    pWhere = sqlite3ExprAnd(db, pWhere, pEq);
    +  }
    +
    +  /* If the child table is the same as the parent table, and this scan
    +  ** is taking place as part of a DELETE operation (operation D.2), omit the
    +  ** row being deleted from the scan by adding ($rowid != rowid) to the WHERE 
    +  ** clause, where $rowid is the rowid of the row being deleted.  */
    +  if( pTab==pFKey->pFrom && nIncr>0 ){
    +    Expr *pEq;                    /* Expression (pLeft = pRight) */
    +    Expr *pLeft;                  /* Value from parent table row */
    +    Expr *pRight;                 /* Column ref to child table */
    +    pLeft = sqlite3Expr(db, TK_REGISTER, 0);
    +    pRight = sqlite3Expr(db, TK_COLUMN, 0);
    +    if( pLeft && pRight ){
    +      pLeft->iTable = regData;
    +      pLeft->affinity = SQLITE_AFF_INTEGER;
    +      pRight->iTable = pSrc->a[0].iCursor;
    +      pRight->iColumn = -1;
    +    }
    +    pEq = sqlite3PExpr(pParse, TK_NE, pLeft, pRight, 0);
    +    pWhere = sqlite3ExprAnd(db, pWhere, pEq);
    +  }
    +
    +  /* Resolve the references in the WHERE clause. */
    +  memset(&sNameContext, 0, sizeof(NameContext));
    +  sNameContext.pSrcList = pSrc;
    +  sNameContext.pParse = pParse;
    +  sqlite3ResolveExprNames(&sNameContext, pWhere);
    +
    +  /* Create VDBE to loop through the entries in pSrc that match the WHERE
    +  ** clause. If the constraint is not deferred, throw an exception for
    +  ** each row found. Otherwise, for deferred constraints, increment the
    +  ** deferred constraint counter by nIncr for each row selected.  */
    +  pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0, 0);
    +  if( nIncr>0 && pFKey->isDeferred==0 ){
    +    sqlite3ParseToplevel(pParse)->mayAbort = 1;
    +  }
    +  sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
    +  if( pWInfo ){
    +    sqlite3WhereEnd(pWInfo);
    +  }
    +
    +  /* Clean up the WHERE clause constructed above. */
    +  sqlite3ExprDelete(db, pWhere);
    +  if( iFkIfZero ){
    +    sqlite3VdbeJumpHere(v, iFkIfZero);
    +  }
    +}
    +
    +/*
    +** This function returns a pointer to the head of a linked list of FK
    +** constraints for which table pTab is the parent table. For example,
    +** given the following schema:
    +**
    +**   CREATE TABLE t1(a PRIMARY KEY);
    +**   CREATE TABLE t2(b REFERENCES t1(a);
    +**
    +** Calling this function with table "t1" as an argument returns a pointer
    +** to the FKey structure representing the foreign key constraint on table
    +** "t2". Calling this function with "t2" as the argument would return a
    +** NULL pointer (as there are no FK constraints for which t2 is the parent
    +** table).
    +*/
    +SQLITE_PRIVATE FKey *sqlite3FkReferences(Table *pTab){
    +  int nName = sqlite3Strlen30(pTab->zName);
    +  return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName, nName);
    +}
    +
    +/*
    +** The second argument is a Trigger structure allocated by the 
    +** fkActionTrigger() routine. This function deletes the Trigger structure
    +** and all of its sub-components.
    +**
    +** The Trigger structure or any of its sub-components may be allocated from
    +** the lookaside buffer belonging to database handle dbMem.
    +*/
    +static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
    +  if( p ){
    +    TriggerStep *pStep = p->step_list;
    +    sqlite3ExprDelete(dbMem, pStep->pWhere);
    +    sqlite3ExprListDelete(dbMem, pStep->pExprList);
    +    sqlite3SelectDelete(dbMem, pStep->pSelect);
    +    sqlite3ExprDelete(dbMem, p->pWhen);
    +    sqlite3DbFree(dbMem, p);
    +  }
    +}
    +
    +/*
    +** This function is called to generate code that runs when table pTab is
    +** being dropped from the database. The SrcList passed as the second argument
    +** to this function contains a single entry guaranteed to resolve to
    +** table pTab.
    +**
    +** Normally, no code is required. However, if either
    +**
    +**   (a) The table is the parent table of a FK constraint, or
    +**   (b) The table is the child table of a deferred FK constraint and it is
    +**       determined at runtime that there are outstanding deferred FK 
    +**       constraint violations in the database,
    +**
    +** then the equivalent of "DELETE FROM <tbl>" is executed before dropping
    +** the table from the database. Triggers are disabled while running this
    +** DELETE, but foreign key actions are not.
    +*/
    +SQLITE_PRIVATE void sqlite3FkDropTable(Parse *pParse, SrcList *pName, Table *pTab){
    +  sqlite3 *db = pParse->db;
    +  if( (db->flags&SQLITE_ForeignKeys) && !IsVirtual(pTab) && !pTab->pSelect ){
    +    int iSkip = 0;
    +    Vdbe *v = sqlite3GetVdbe(pParse);
    +
    +    assert( v );                  /* VDBE has already been allocated */
    +    if( sqlite3FkReferences(pTab)==0 ){
    +      /* Search for a deferred foreign key constraint for which this table
    +      ** is the child table. If one cannot be found, return without 
    +      ** generating any VDBE code. If one can be found, then jump over
    +      ** the entire DELETE if there are no outstanding deferred constraints
    +      ** when this statement is run.  */
    +      FKey *p;
    +      for(p=pTab->pFKey; p; p=p->pNextFrom){
    +        if( p->isDeferred ) break;
    +      }
    +      if( !p ) return;
    +      iSkip = sqlite3VdbeMakeLabel(v);
    +      sqlite3VdbeAddOp2(v, OP_FkIfZero, 1, iSkip);
    +    }
    +
    +    pParse->disableTriggers = 1;
    +    sqlite3DeleteFrom(pParse, sqlite3SrcListDup(db, pName, 0), 0);
    +    pParse->disableTriggers = 0;
    +
    +    /* If the DELETE has generated immediate foreign key constraint 
    +    ** violations, halt the VDBE and return an error at this point, before
    +    ** any modifications to the schema are made. This is because statement
    +    ** transactions are not able to rollback schema changes.  */
    +    sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
    +    sqlite3HaltConstraint(
    +        pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
    +    );
    +
    +    if( iSkip ){
    +      sqlite3VdbeResolveLabel(v, iSkip);
    +    }
    +  }
    +}
    +
    +/*
    +** This function is called when inserting, deleting or updating a row of
    +** table pTab to generate VDBE code to perform foreign key constraint 
    +** processing for the operation.
    +**
    +** For a DELETE operation, parameter regOld is passed the index of the
    +** first register in an array of (pTab->nCol+1) registers containing the
    +** rowid of the row being deleted, followed by each of the column values
    +** of the row being deleted, from left to right. Parameter regNew is passed
    +** zero in this case.
    +**
    +** For an INSERT operation, regOld is passed zero and regNew is passed the
    +** first register of an array of (pTab->nCol+1) registers containing the new
    +** row data.
    +**
    +** For an UPDATE operation, this function is called twice. Once before
    +** the original record is deleted from the table using the calling convention
    +** described for DELETE. Then again after the original record is deleted
    +** but before the new record is inserted using the INSERT convention. 
    +*/
    +SQLITE_PRIVATE void sqlite3FkCheck(
    +  Parse *pParse,                  /* Parse context */
    +  Table *pTab,                    /* Row is being deleted from this table */ 
    +  int regOld,                     /* Previous row data is stored here */
    +  int regNew                      /* New row data is stored here */
    +){
    +  sqlite3 *db = pParse->db;       /* Database handle */
    +  Vdbe *v;                        /* VM to write code to */
    +  FKey *pFKey;                    /* Used to iterate through FKs */
    +  int iDb;                        /* Index of database containing pTab */
    +  const char *zDb;                /* Name of database containing pTab */
    +  int isIgnoreErrors = pParse->disableTriggers;
    +
    +  /* Exactly one of regOld and regNew should be non-zero. */
    +  assert( (regOld==0)!=(regNew==0) );
    +
    +  /* If foreign-keys are disabled, this function is a no-op. */
    +  if( (db->flags&SQLITE_ForeignKeys)==0 ) return;
    +
    +  v = sqlite3GetVdbe(pParse);
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  zDb = db->aDb[iDb].zName;
    +
    +  /* Loop through all the foreign key constraints for which pTab is the
    +  ** child table (the table that the foreign key definition is part of).  */
    +  for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
    +    Table *pTo;                   /* Parent table of foreign key pFKey */
    +    Index *pIdx = 0;              /* Index on key columns in pTo */
    +    int *aiFree = 0;
    +    int *aiCol;
    +    int iCol;
    +    int i;
    +    int isIgnore = 0;
    +
    +    /* Find the parent table of this foreign key. Also find a unique index 
    +    ** on the parent key columns in the parent table. If either of these 
    +    ** schema items cannot be located, set an error in pParse and return 
    +    ** early.  */
    +    if( pParse->disableTriggers ){
    +      pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
    +    }else{
    +      pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
    +    }
    +    if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
    +      if( !isIgnoreErrors || db->mallocFailed ) return;
    +      continue;
    +    }
    +    assert( pFKey->nCol==1 || (aiFree && pIdx) );
    +
    +    if( aiFree ){
    +      aiCol = aiFree;
    +    }else{
    +      iCol = pFKey->aCol[0].iFrom;
    +      aiCol = &iCol;
    +    }
    +    for(i=0; i<pFKey->nCol; i++){
    +      if( aiCol[i]==pTab->iPKey ){
    +        aiCol[i] = -1;
    +      }
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +      /* Request permission to read the parent key columns. If the 
    +      ** authorization callback returns SQLITE_IGNORE, behave as if any
    +      ** values read from the parent table are NULL. */
    +      if( db->xAuth ){
    +        int rcauth;
    +        char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
    +        rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
    +        isIgnore = (rcauth==SQLITE_IGNORE);
    +      }
    +#endif
    +    }
    +
    +    /* Take a shared-cache advisory read-lock on the parent table. Allocate 
    +    ** a cursor to use to search the unique index on the parent key columns 
    +    ** in the parent table.  */
    +    sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
    +    pParse->nTab++;
    +
    +    if( regOld!=0 ){
    +      /* A row is being removed from the child table. Search for the parent.
    +      ** If the parent does not exist, removing the child row resolves an 
    +      ** outstanding foreign key constraint violation. */
    +      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
    +    }
    +    if( regNew!=0 ){
    +      /* A row is being added to the child table. If a parent row cannot
    +      ** be found, adding the child row has violated the FK constraint. */ 
    +      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1,isIgnore);
    +    }
    +
    +    sqlite3DbFree(db, aiFree);
    +  }
    +
    +  /* Loop through all the foreign key constraints that refer to this table */
    +  for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){
    +    Index *pIdx = 0;              /* Foreign key index for pFKey */
    +    SrcList *pSrc;
    +    int *aiCol = 0;
    +
    +    if( !pFKey->isDeferred && !pParse->pToplevel && !pParse->isMultiWrite ){
    +      assert( regOld==0 && regNew!=0 );
    +      /* Inserting a single row into a parent table cannot cause an immediate
    +      ** foreign key violation. So do nothing in this case.  */
    +      continue;
    +    }
    +
    +    if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
    +      if( !isIgnoreErrors || db->mallocFailed ) return;
    +      continue;
    +    }
    +    assert( aiCol || pFKey->nCol==1 );
    +
    +    /* Create a SrcList structure containing a single table (the table 
    +    ** the foreign key that refers to this table is attached to). This
    +    ** is required for the sqlite3WhereXXX() interface.  */
    +    pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
    +    if( pSrc ){
    +      struct SrcList_item *pItem = pSrc->a;
    +      pItem->pTab = pFKey->pFrom;
    +      pItem->zName = pFKey->pFrom->zName;
    +      pItem->pTab->nRef++;
    +      pItem->iCursor = pParse->nTab++;
    +  
    +      if( regNew!=0 ){
    +        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1);
    +      }
    +      if( regOld!=0 ){
    +        /* If there is a RESTRICT action configured for the current operation
    +        ** on the parent table of this FK, then throw an exception 
    +        ** immediately if the FK constraint is violated, even if this is a
    +        ** deferred trigger. That's what RESTRICT means. To defer checking
    +        ** the constraint, the FK should specify NO ACTION (represented
    +        ** using OE_None). NO ACTION is the default.  */
    +        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1);
    +      }
    +      pItem->zName = 0;
    +      sqlite3SrcListDelete(db, pSrc);
    +    }
    +    sqlite3DbFree(db, aiCol);
    +  }
    +}
    +
    +#define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))
    +
    +/*
    +** This function is called before generating code to update or delete a 
    +** row contained in table pTab.
    +*/
    +SQLITE_PRIVATE u32 sqlite3FkOldmask(
    +  Parse *pParse,                  /* Parse context */
    +  Table *pTab                     /* Table being modified */
    +){
    +  u32 mask = 0;
    +  if( pParse->db->flags&SQLITE_ForeignKeys ){
    +    FKey *p;
    +    int i;
    +    for(p=pTab->pFKey; p; p=p->pNextFrom){
    +      for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
    +    }
    +    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    +      Index *pIdx = 0;
    +      locateFkeyIndex(pParse, pTab, p, &pIdx, 0);
    +      if( pIdx ){
    +        for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
    +      }
    +    }
    +  }
    +  return mask;
    +}
    +
    +/*
    +** This function is called before generating code to update or delete a 
    +** row contained in table pTab. If the operation is a DELETE, then
    +** parameter aChange is passed a NULL value. For an UPDATE, aChange points
    +** to an array of size N, where N is the number of columns in table pTab.
    +** If the i'th column is not modified by the UPDATE, then the corresponding 
    +** entry in the aChange[] array is set to -1. If the column is modified,
    +** the value is 0 or greater. Parameter chngRowid is set to true if the
    +** UPDATE statement modifies the rowid fields of the table.
    +**
    +** If any foreign key processing will be required, this function returns
    +** true. If there is no foreign key related processing, this function 
    +** returns false.
    +*/
    +SQLITE_PRIVATE int sqlite3FkRequired(
    +  Parse *pParse,                  /* Parse context */
    +  Table *pTab,                    /* Table being modified */
    +  int *aChange,                   /* Non-NULL for UPDATE operations */
    +  int chngRowid                   /* True for UPDATE that affects rowid */
    +){
    +  if( pParse->db->flags&SQLITE_ForeignKeys ){
    +    if( !aChange ){
    +      /* A DELETE operation. Foreign key processing is required if the 
    +      ** table in question is either the child or parent table for any 
    +      ** foreign key constraint.  */
    +      return (sqlite3FkReferences(pTab) || pTab->pFKey);
    +    }else{
    +      /* This is an UPDATE. Foreign key processing is only required if the
    +      ** operation modifies one or more child or parent key columns. */
    +      int i;
    +      FKey *p;
    +
    +      /* Check if any child key columns are being modified. */
    +      for(p=pTab->pFKey; p; p=p->pNextFrom){
    +        for(i=0; i<p->nCol; i++){
    +          int iChildKey = p->aCol[i].iFrom;
    +          if( aChange[iChildKey]>=0 ) return 1;
    +          if( iChildKey==pTab->iPKey && chngRowid ) return 1;
    +        }
    +      }
    +
    +      /* Check if any parent key columns are being modified. */
    +      for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    +        for(i=0; i<p->nCol; i++){
    +          char *zKey = p->aCol[i].zCol;
    +          int iKey;
    +          for(iKey=0; iKey<pTab->nCol; iKey++){
    +            Column *pCol = &pTab->aCol[iKey];
    +            if( (zKey ? !sqlite3StrICmp(pCol->zName, zKey) : pCol->isPrimKey) ){
    +              if( aChange[iKey]>=0 ) return 1;
    +              if( iKey==pTab->iPKey && chngRowid ) return 1;
    +            }
    +          }
    +        }
    +      }
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** This function is called when an UPDATE or DELETE operation is being 
    +** compiled on table pTab, which is the parent table of foreign-key pFKey.
    +** If the current operation is an UPDATE, then the pChanges parameter is
    +** passed a pointer to the list of columns being modified. If it is a
    +** DELETE, pChanges is passed a NULL pointer.
    +**
    +** It returns a pointer to a Trigger structure containing a trigger
    +** equivalent to the ON UPDATE or ON DELETE action specified by pFKey.
    +** If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is
    +** returned (these actions require no special handling by the triggers
    +** sub-system, code for them is created by fkScanChildren()).
    +**
    +** For example, if pFKey is the foreign key and pTab is table "p" in 
    +** the following schema:
    +**
    +**   CREATE TABLE p(pk PRIMARY KEY);
    +**   CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE);
    +**
    +** then the returned trigger structure is equivalent to:
    +**
    +**   CREATE TRIGGER ... DELETE ON p BEGIN
    +**     DELETE FROM c WHERE ck = old.pk;
    +**   END;
    +**
    +** The returned pointer is cached as part of the foreign key object. It
    +** is eventually freed along with the rest of the foreign key object by 
    +** sqlite3FkDelete().
    +*/
    +static Trigger *fkActionTrigger(
    +  Parse *pParse,                  /* Parse context */
    +  Table *pTab,                    /* Table being updated or deleted from */
    +  FKey *pFKey,                    /* Foreign key to get action for */
    +  ExprList *pChanges              /* Change-list for UPDATE, NULL for DELETE */
    +){
    +  sqlite3 *db = pParse->db;       /* Database handle */
    +  int action;                     /* One of OE_None, OE_Cascade etc. */
    +  Trigger *pTrigger;              /* Trigger definition to return */
    +  int iAction = (pChanges!=0);    /* 1 for UPDATE, 0 for DELETE */
    +
    +  action = pFKey->aAction[iAction];
    +  pTrigger = pFKey->apTrigger[iAction];
    +
    +  if( action!=OE_None && !pTrigger ){
    +    u8 enableLookaside;           /* Copy of db->lookaside.bEnabled */
    +    char const *zFrom;            /* Name of child table */
    +    int nFrom;                    /* Length in bytes of zFrom */
    +    Index *pIdx = 0;              /* Parent key index for this FK */
    +    int *aiCol = 0;               /* child table cols -> parent key cols */
    +    TriggerStep *pStep = 0;        /* First (only) step of trigger program */
    +    Expr *pWhere = 0;             /* WHERE clause of trigger step */
    +    ExprList *pList = 0;          /* Changes list if ON UPDATE CASCADE */
    +    Select *pSelect = 0;          /* If RESTRICT, "SELECT RAISE(...)" */
    +    int i;                        /* Iterator variable */
    +    Expr *pWhen = 0;              /* WHEN clause for the trigger */
    +
    +    if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
    +    assert( aiCol || pFKey->nCol==1 );
    +
    +    for(i=0; i<pFKey->nCol; i++){
    +      Token tOld = { "old", 3 };  /* Literal "old" token */
    +      Token tNew = { "new", 3 };  /* Literal "new" token */
    +      Token tFromCol;             /* Name of column in child table */
    +      Token tToCol;               /* Name of column in parent table */
    +      int iFromCol;               /* Idx of column in child table */
    +      Expr *pEq;                  /* tFromCol = OLD.tToCol */
    +
    +      iFromCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
    +      assert( iFromCol>=0 );
    +      tToCol.z = pIdx ? pTab->aCol[pIdx->aiColumn[i]].zName : "oid";
    +      tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
    +
    +      tToCol.n = sqlite3Strlen30(tToCol.z);
    +      tFromCol.n = sqlite3Strlen30(tFromCol.z);
    +
    +      /* Create the expression "OLD.zToCol = zFromCol". It is important
    +      ** that the "OLD.zToCol" term is on the LHS of the = operator, so
    +      ** that the affinity and collation sequence associated with the
    +      ** parent table are used for the comparison. */
    +      pEq = sqlite3PExpr(pParse, TK_EQ,
    +          sqlite3PExpr(pParse, TK_DOT, 
    +            sqlite3PExpr(pParse, TK_ID, 0, 0, &tOld),
    +            sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol)
    +          , 0),
    +          sqlite3PExpr(pParse, TK_ID, 0, 0, &tFromCol)
    +      , 0);
    +      pWhere = sqlite3ExprAnd(db, pWhere, pEq);
    +
    +      /* For ON UPDATE, construct the next term of the WHEN clause.
    +      ** The final WHEN clause will be like this:
    +      **
    +      **    WHEN NOT(old.col1 IS new.col1 AND ... AND old.colN IS new.colN)
    +      */
    +      if( pChanges ){
    +        pEq = sqlite3PExpr(pParse, TK_IS,
    +            sqlite3PExpr(pParse, TK_DOT, 
    +              sqlite3PExpr(pParse, TK_ID, 0, 0, &tOld),
    +              sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol),
    +              0),
    +            sqlite3PExpr(pParse, TK_DOT, 
    +              sqlite3PExpr(pParse, TK_ID, 0, 0, &tNew),
    +              sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol),
    +              0),
    +            0);
    +        pWhen = sqlite3ExprAnd(db, pWhen, pEq);
    +      }
    +  
    +      if( action!=OE_Restrict && (action!=OE_Cascade || pChanges) ){
    +        Expr *pNew;
    +        if( action==OE_Cascade ){
    +          pNew = sqlite3PExpr(pParse, TK_DOT, 
    +            sqlite3PExpr(pParse, TK_ID, 0, 0, &tNew),
    +            sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol)
    +          , 0);
    +        }else if( action==OE_SetDflt ){
    +          Expr *pDflt = pFKey->pFrom->aCol[iFromCol].pDflt;
    +          if( pDflt ){
    +            pNew = sqlite3ExprDup(db, pDflt, 0);
    +          }else{
    +            pNew = sqlite3PExpr(pParse, TK_NULL, 0, 0, 0);
    +          }
    +        }else{
    +          pNew = sqlite3PExpr(pParse, TK_NULL, 0, 0, 0);
    +        }
    +        pList = sqlite3ExprListAppend(pParse, pList, pNew);
    +        sqlite3ExprListSetName(pParse, pList, &tFromCol, 0);
    +      }
    +    }
    +    sqlite3DbFree(db, aiCol);
    +
    +    zFrom = pFKey->pFrom->zName;
    +    nFrom = sqlite3Strlen30(zFrom);
    +
    +    if( action==OE_Restrict ){
    +      Token tFrom;
    +      Expr *pRaise; 
    +
    +      tFrom.z = zFrom;
    +      tFrom.n = nFrom;
    +      pRaise = sqlite3Expr(db, TK_RAISE, "foreign key constraint failed");
    +      if( pRaise ){
    +        pRaise->affinity = OE_Abort;
    +      }
    +      pSelect = sqlite3SelectNew(pParse, 
    +          sqlite3ExprListAppend(pParse, 0, pRaise),
    +          sqlite3SrcListAppend(db, 0, &tFrom, 0),
    +          pWhere,
    +          0, 0, 0, 0, 0, 0
    +      );
    +      pWhere = 0;
    +    }
    +
    +    /* In the current implementation, pTab->dbMem==0 for all tables except
    +    ** for temporary tables used to describe subqueries.  And temporary
    +    ** tables do not have foreign key constraints.  Hence, pTab->dbMem
    +    ** should always be 0 there.
    +    */
    +    enableLookaside = db->lookaside.bEnabled;
    +    db->lookaside.bEnabled = 0;
    +
    +    pTrigger = (Trigger *)sqlite3DbMallocZero(db, 
    +        sizeof(Trigger) +         /* struct Trigger */
    +        sizeof(TriggerStep) +     /* Single step in trigger program */
    +        nFrom + 1                 /* Space for pStep->target.z */
    +    );
    +    if( pTrigger ){
    +      pStep = pTrigger->step_list = (TriggerStep *)&pTrigger[1];
    +      pStep->target.z = (char *)&pStep[1];
    +      pStep->target.n = nFrom;
    +      memcpy((char *)pStep->target.z, zFrom, nFrom);
    +  
    +      pStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
    +      pStep->pExprList = sqlite3ExprListDup(db, pList, EXPRDUP_REDUCE);
    +      pStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
    +      if( pWhen ){
    +        pWhen = sqlite3PExpr(pParse, TK_NOT, pWhen, 0, 0);
    +        pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);
    +      }
    +    }
    +
    +    /* Re-enable the lookaside buffer, if it was disabled earlier. */
    +    db->lookaside.bEnabled = enableLookaside;
    +
    +    sqlite3ExprDelete(db, pWhere);
    +    sqlite3ExprDelete(db, pWhen);
    +    sqlite3ExprListDelete(db, pList);
    +    sqlite3SelectDelete(db, pSelect);
    +    if( db->mallocFailed==1 ){
    +      fkTriggerDelete(db, pTrigger);
    +      return 0;
    +    }
    +
    +    switch( action ){
    +      case OE_Restrict:
    +        pStep->op = TK_SELECT; 
    +        break;
    +      case OE_Cascade: 
    +        if( !pChanges ){ 
    +          pStep->op = TK_DELETE; 
    +          break; 
    +        }
    +      default:
    +        pStep->op = TK_UPDATE;
    +    }
    +    pStep->pTrig = pTrigger;
    +    pTrigger->pSchema = pTab->pSchema;
    +    pTrigger->pTabSchema = pTab->pSchema;
    +    pFKey->apTrigger[iAction] = pTrigger;
    +    pTrigger->op = (pChanges ? TK_UPDATE : TK_DELETE);
    +  }
    +
    +  return pTrigger;
    +}
    +
    +/*
    +** This function is called when deleting or updating a row to implement
    +** any required CASCADE, SET NULL or SET DEFAULT actions.
    +*/
    +SQLITE_PRIVATE void sqlite3FkActions(
    +  Parse *pParse,                  /* Parse context */
    +  Table *pTab,                    /* Table being updated or deleted from */
    +  ExprList *pChanges,             /* Change-list for UPDATE, NULL for DELETE */
    +  int regOld                      /* Address of array containing old row */
    +){
    +  /* If foreign-key support is enabled, iterate through all FKs that 
    +  ** refer to table pTab. If there is an action associated with the FK 
    +  ** for this operation (either update or delete), invoke the associated 
    +  ** trigger sub-program.  */
    +  if( pParse->db->flags&SQLITE_ForeignKeys ){
    +    FKey *pFKey;                  /* Iterator variable */
    +    for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){
    +      Trigger *pAction = fkActionTrigger(pParse, pTab, pFKey, pChanges);
    +      if( pAction ){
    +        sqlite3CodeRowTriggerDirect(pParse, pAction, pTab, regOld, OE_Abort, 0);
    +      }
    +    }
    +  }
    +}
    +
    +#endif /* ifndef SQLITE_OMIT_TRIGGER */
    +
    +/*
    +** Free all memory associated with foreign key definitions attached to
    +** table pTab. Remove the deleted foreign keys from the Schema.fkeyHash
    +** hash table.
    +*/
    +SQLITE_PRIVATE void sqlite3FkDelete(Table *pTab){
    +  FKey *pFKey;                    /* Iterator variable */
    +  FKey *pNext;                    /* Copy of pFKey->pNextFrom */
    +
    +  for(pFKey=pTab->pFKey; pFKey; pFKey=pNext){
    +
    +    /* Remove the FK from the fkeyHash hash table. */
    +    if( pFKey->pPrevTo ){
    +      pFKey->pPrevTo->pNextTo = pFKey->pNextTo;
    +    }else{
    +      void *data = (void *)pFKey->pNextTo;
    +      const char *z = (data ? pFKey->pNextTo->zTo : pFKey->zTo);
    +      sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, sqlite3Strlen30(z), data);
    +    }
    +    if( pFKey->pNextTo ){
    +      pFKey->pNextTo->pPrevTo = pFKey->pPrevTo;
    +    }
    +
    +    /* Delete any triggers created to implement actions for this FK. */
    +#ifndef SQLITE_OMIT_TRIGGER
    +    fkTriggerDelete(pTab->dbMem, pFKey->apTrigger[0]);
    +    fkTriggerDelete(pTab->dbMem, pFKey->apTrigger[1]);
    +#endif
    +
    +    /* EV: R-30323-21917 Each foreign key constraint in SQLite is
    +    ** classified as either immediate or deferred.
    +    */
    +    assert( pFKey->isDeferred==0 || pFKey->isDeferred==1 );
    +
    +    pNext = pFKey->pNextFrom;
    +    sqlite3DbFree(pTab->dbMem, pFKey);
    +  }
    +}
    +#endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
    +
    +/************** End of fkey.c ************************************************/
    +/************** Begin file insert.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that are called by the parser
    +** to handle INSERT statements in SQLite.
    +**
    +** $Id: insert.c,v 1.270 2009/07/24 17:58:53 danielk1977 Exp $
    +*/
    +
    +/*
    +** Generate code that will open a table for reading.
    +*/
    +SQLITE_PRIVATE void sqlite3OpenTable(
    +  Parse *p,       /* Generate code into this VDBE */
    +  int iCur,       /* The cursor number of the table */
    +  int iDb,        /* The database index in sqlite3.aDb[] */
    +  Table *pTab,    /* The table to be opened */
    +  int opcode      /* OP_OpenRead or OP_OpenWrite */
    +){
    +  Vdbe *v;
    +  if( IsVirtual(pTab) ) return;
    +  v = sqlite3GetVdbe(p);
    +  assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );
    +  sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
    +  sqlite3VdbeAddOp3(v, opcode, iCur, pTab->tnum, iDb);
    +  sqlite3VdbeChangeP4(v, -1, SQLITE_INT_TO_PTR(pTab->nCol), P4_INT32);
    +  VdbeComment((v, "%s", pTab->zName));
    +}
    +
    +/*
    +** Return a pointer to the column affinity string associated with index
    +** pIdx. A column affinity string has one character for each column in 
    +** the table, according to the affinity of the column:
    +**
    +**  Character      Column affinity
    +**  ------------------------------
    +**  'a'            TEXT
    +**  'b'            NONE
    +**  'c'            NUMERIC
    +**  'd'            INTEGER
    +**  'e'            REAL
    +**
    +** An extra 'b' is appended to the end of the string to cover the
    +** rowid that appears as the last column in every index.
    +**
    +** Memory for the buffer containing the column index affinity string
    +** is managed along with the rest of the Index structure. It will be
    +** released when sqlite3DeleteIndex() is called.
    +*/
    +SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
    +  if( !pIdx->zColAff ){
    +    /* The first time a column affinity string for a particular index is
    +    ** required, it is allocated and populated here. It is then stored as
    +    ** a member of the Index structure for subsequent use.
    +    **
    +    ** The column affinity string will eventually be deleted by
    +    ** sqliteDeleteIndex() when the Index structure itself is cleaned
    +    ** up.
    +    */
    +    int n;
    +    Table *pTab = pIdx->pTable;
    +    sqlite3 *db = sqlite3VdbeDb(v);
    +    pIdx->zColAff = (char *)sqlite3Malloc(pIdx->nColumn+2);
    +    if( !pIdx->zColAff ){
    +      db->mallocFailed = 1;
    +      return 0;
    +    }
    +    for(n=0; n<pIdx->nColumn; n++){
    +      pIdx->zColAff[n] = pTab->aCol[pIdx->aiColumn[n]].affinity;
    +    }
    +    pIdx->zColAff[n++] = SQLITE_AFF_NONE;
    +    pIdx->zColAff[n] = 0;
    +  }
    + 
    +  return pIdx->zColAff;
    +}
    +
    +/*
    +** Set P4 of the most recently inserted opcode to a column affinity
    +** string for table pTab. A column affinity string has one character
    +** for each column indexed by the index, according to the affinity of the
    +** column:
    +**
    +**  Character      Column affinity
    +**  ------------------------------
    +**  'a'            TEXT
    +**  'b'            NONE
    +**  'c'            NUMERIC
    +**  'd'            INTEGER
    +**  'e'            REAL
    +*/
    +SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
    +  /* The first time a column affinity string for a particular table
    +  ** is required, it is allocated and populated here. It is then 
    +  ** stored as a member of the Table structure for subsequent use.
    +  **
    +  ** The column affinity string will eventually be deleted by
    +  ** sqlite3DeleteTable() when the Table structure itself is cleaned up.
    +  */
    +  if( !pTab->zColAff ){
    +    char *zColAff;
    +    int i;
    +    sqlite3 *db = sqlite3VdbeDb(v);
    +
    +    zColAff = (char *)sqlite3Malloc(pTab->nCol+1);
    +    if( !zColAff ){
    +      db->mallocFailed = 1;
    +      return;
    +    }
    +
    +    for(i=0; i<pTab->nCol; i++){
    +      zColAff[i] = pTab->aCol[i].affinity;
    +    }
    +    zColAff[pTab->nCol] = '\0';
    +
    +    pTab->zColAff = zColAff;
    +  }
    +
    +  sqlite3VdbeChangeP4(v, -1, pTab->zColAff, 0);
    +}
    +
    +/*
    +** Return non-zero if the table pTab in database iDb or any of its indices
    +** have been opened at any point in the VDBE program beginning at location
    +** iStartAddr throught the end of the program.  This is used to see if 
    +** a statement of the form  "INSERT INTO <iDb, pTab> SELECT ..." can 
    +** run without using temporary table for the results of the SELECT. 
    +*/
    +static int readsTable(Parse *p, int iStartAddr, int iDb, Table *pTab){
    +  Vdbe *v = sqlite3GetVdbe(p);
    +  int i;
    +  int iEnd = sqlite3VdbeCurrentAddr(v);
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  VTable *pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p->db, pTab) : 0;
    +#endif
    +
    +  for(i=iStartAddr; i<iEnd; i++){
    +    VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
    +    assert( pOp!=0 );
    +    if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){
    +      Index *pIndex;
    +      int tnum = pOp->p2;
    +      if( tnum==pTab->tnum ){
    +        return 1;
    +      }
    +      for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
    +        if( tnum==pIndex->tnum ){
    +          return 1;
    +        }
    +      }
    +    }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
    +      assert( pOp->p4.pVtab!=0 );
    +      assert( pOp->p4type==P4_VTAB );
    +      return 1;
    +    }
    +#endif
    +  }
    +  return 0;
    +}
    +
    +#ifndef SQLITE_OMIT_AUTOINCREMENT
    +/*
    +** Locate or create an AutoincInfo structure associated with table pTab
    +** which is in database iDb.  Return the register number for the register
    +** that holds the maximum rowid.
    +**
    +** There is at most one AutoincInfo structure per table even if the
    +** same table is autoincremented multiple times due to inserts within
    +** triggers.  A new AutoincInfo structure is created if this is the
    +** first use of table pTab.  On 2nd and subsequent uses, the original
    +** AutoincInfo structure is used.
    +**
    +** Three memory locations are allocated:
    +**
    +**   (1)  Register to hold the name of the pTab table.
    +**   (2)  Register to hold the maximum ROWID of pTab.
    +**   (3)  Register to hold the rowid in sqlite_sequence of pTab
    +**
    +** The 2nd register is the one that is returned.  That is all the
    +** insert routine needs to know about.
    +*/
    +static int autoIncBegin(
    +  Parse *pParse,      /* Parsing context */
    +  int iDb,            /* Index of the database holding pTab */
    +  Table *pTab         /* The table we are writing to */
    +){
    +  int memId = 0;      /* Register holding maximum rowid */
    +  if( pTab->tabFlags & TF_Autoincrement ){
    +    Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +    AutoincInfo *pInfo;
    +
    +    pInfo = pToplevel->pAinc;
    +    while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }
    +    if( pInfo==0 ){
    +      pInfo = sqlite3DbMallocRaw(pParse->db, sizeof(*pInfo));
    +      if( pInfo==0 ) return 0;
    +      pInfo->pNext = pToplevel->pAinc;
    +      pToplevel->pAinc = pInfo;
    +      pInfo->pTab = pTab;
    +      pInfo->iDb = iDb;
    +      pToplevel->nMem++;                  /* Register to hold name of table */
    +      pInfo->regCtr = ++pToplevel->nMem;  /* Max rowid register */
    +      pToplevel->nMem++;                  /* Rowid in sqlite_sequence */
    +    }
    +    memId = pInfo->regCtr;
    +  }
    +  return memId;
    +}
    +
    +/*
    +** This routine generates code that will initialize all of the
    +** register used by the autoincrement tracker.  
    +*/
    +SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
    +  AutoincInfo *p;            /* Information about an AUTOINCREMENT */
    +  sqlite3 *db = pParse->db;  /* The database connection */
    +  Db *pDb;                   /* Database only autoinc table */
    +  int memId;                 /* Register holding max rowid */
    +  int addr;                  /* A VDBE address */
    +  Vdbe *v = pParse->pVdbe;   /* VDBE under construction */
    +
    +  /* This routine is never called during trigger-generation.  It is
    +  ** only called from the top-level */
    +  assert( pParse->pTriggerTab==0 );
    +  assert( pParse==sqlite3ParseToplevel(pParse) );
    +
    +  assert( v );   /* We failed long ago if this is not so */
    +  for(p = pParse->pAinc; p; p = p->pNext){
    +    pDb = &db->aDb[p->iDb];
    +    memId = p->regCtr;
    +    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
    +    addr = sqlite3VdbeCurrentAddr(v);
    +    sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
    +    sqlite3VdbeAddOp2(v, OP_Rewind, 0, addr+9);
    +    sqlite3VdbeAddOp3(v, OP_Column, 0, 0, memId);
    +    sqlite3VdbeAddOp3(v, OP_Ne, memId-1, addr+7, memId);
    +    sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
    +    sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
    +    sqlite3VdbeAddOp3(v, OP_Column, 0, 1, memId);
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, addr+9);
    +    sqlite3VdbeAddOp2(v, OP_Next, 0, addr+2);
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, memId);
    +    sqlite3VdbeAddOp0(v, OP_Close);
    +  }
    +}
    +
    +/*
    +** Update the maximum rowid for an autoincrement calculation.
    +**
    +** This routine should be called when the top of the stack holds a
    +** new rowid that is about to be inserted.  If that new rowid is
    +** larger than the maximum rowid in the memId memory cell, then the
    +** memory cell is updated.  The stack is unchanged.
    +*/
    +static void autoIncStep(Parse *pParse, int memId, int regRowid){
    +  if( memId>0 ){
    +    sqlite3VdbeAddOp2(pParse->pVdbe, OP_MemMax, memId, regRowid);
    +  }
    +}
    +
    +/*
    +** This routine generates the code needed to write autoincrement
    +** maximum rowid values back into the sqlite_sequence register.
    +** Every statement that might do an INSERT into an autoincrement
    +** table (either directly or through triggers) needs to call this
    +** routine just before the "exit" code.
    +*/
    +SQLITE_PRIVATE void sqlite3AutoincrementEnd(Parse *pParse){
    +  AutoincInfo *p;
    +  Vdbe *v = pParse->pVdbe;
    +  sqlite3 *db = pParse->db;
    +
    +  assert( v );
    +  for(p = pParse->pAinc; p; p = p->pNext){
    +    Db *pDb = &db->aDb[p->iDb];
    +    int j1, j2, j3, j4, j5;
    +    int iRec;
    +    int memId = p->regCtr;
    +
    +    iRec = sqlite3GetTempReg(pParse);
    +    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
    +    j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1);
    +    j2 = sqlite3VdbeAddOp0(v, OP_Rewind);
    +    j3 = sqlite3VdbeAddOp3(v, OP_Column, 0, 0, iRec);
    +    j4 = sqlite3VdbeAddOp3(v, OP_Eq, memId-1, 0, iRec);
    +    sqlite3VdbeAddOp2(v, OP_Next, 0, j3);
    +    sqlite3VdbeJumpHere(v, j2);
    +    sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
    +    j5 = sqlite3VdbeAddOp0(v, OP_Goto);
    +    sqlite3VdbeJumpHere(v, j4);
    +    sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
    +    sqlite3VdbeJumpHere(v, j1);
    +    sqlite3VdbeJumpHere(v, j5);
    +    sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
    +    sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
    +    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +    sqlite3VdbeAddOp0(v, OP_Close);
    +    sqlite3ReleaseTempReg(pParse, iRec);
    +  }
    +}
    +#else
    +/*
    +** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines
    +** above are all no-ops
    +*/
    +# define autoIncBegin(A,B,C) (0)
    +# define autoIncStep(A,B,C)
    +#endif /* SQLITE_OMIT_AUTOINCREMENT */
    +
    +
    +/* Forward declaration */
    +static int xferOptimization(
    +  Parse *pParse,        /* Parser context */
    +  Table *pDest,         /* The table we are inserting into */
    +  Select *pSelect,      /* A SELECT statement to use as the data source */
    +  int onError,          /* How to handle constraint errors */
    +  int iDbDest           /* The database of pDest */
    +);
    +
    +/*
    +** This routine is call to handle SQL of the following forms:
    +**
    +**    insert into TABLE (IDLIST) values(EXPRLIST)
    +**    insert into TABLE (IDLIST) select
    +**
    +** The IDLIST following the table name is always optional.  If omitted,
    +** then a list of all columns for the table is substituted.  The IDLIST
    +** appears in the pColumn parameter.  pColumn is NULL if IDLIST is omitted.
    +**
    +** The pList parameter holds EXPRLIST in the first form of the INSERT
    +** statement above, and pSelect is NULL.  For the second form, pList is
    +** NULL and pSelect is a pointer to the select statement used to generate
    +** data for the insert.
    +**
    +** The code generated follows one of four templates.  For a simple
    +** select with data coming from a VALUES clause, the code executes
    +** once straight down through.  Pseudo-code follows (we call this
    +** the "1st template"):
    +**
    +**         open write cursor to <table> and its indices
    +**         puts VALUES clause expressions onto the stack
    +**         write the resulting record into <table>
    +**         cleanup
    +**
    +** The three remaining templates assume the statement is of the form
    +**
    +**   INSERT INTO <table> SELECT ...
    +**
    +** If the SELECT clause is of the restricted form "SELECT * FROM <table2>" -
    +** in other words if the SELECT pulls all columns from a single table
    +** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and
    +** if <table2> and <table1> are distinct tables but have identical
    +** schemas, including all the same indices, then a special optimization
    +** is invoked that copies raw records from <table2> over to <table1>.
    +** See the xferOptimization() function for the implementation of this
    +** template.  This is the 2nd template.
    +**
    +**         open a write cursor to <table>
    +**         open read cursor on <table2>
    +**         transfer all records in <table2> over to <table>
    +**         close cursors
    +**         foreach index on <table>
    +**           open a write cursor on the <table> index
    +**           open a read cursor on the corresponding <table2> index
    +**           transfer all records from the read to the write cursors
    +**           close cursors
    +**         end foreach
    +**
    +** The 3rd template is for when the second template does not apply
    +** and the SELECT clause does not read from <table> at any time.
    +** The generated code follows this template:
    +**
    +**         EOF <- 0
    +**         X <- A
    +**         goto B
    +**      A: setup for the SELECT
    +**         loop over the rows in the SELECT
    +**           load values into registers R..R+n
    +**           yield X
    +**         end loop
    +**         cleanup after the SELECT
    +**         EOF <- 1
    +**         yield X
    +**         goto A
    +**      B: open write cursor to <table> and its indices
    +**      C: yield X
    +**         if EOF goto D
    +**         insert the select result into <table> from R..R+n
    +**         goto C
    +**      D: cleanup
    +**
    +** The 4th template is used if the insert statement takes its
    +** values from a SELECT but the data is being inserted into a table
    +** that is also read as part of the SELECT.  In the third form,
    +** we have to use a intermediate table to store the results of
    +** the select.  The template is like this:
    +**
    +**         EOF <- 0
    +**         X <- A
    +**         goto B
    +**      A: setup for the SELECT
    +**         loop over the tables in the SELECT
    +**           load value into register R..R+n
    +**           yield X
    +**         end loop
    +**         cleanup after the SELECT
    +**         EOF <- 1
    +**         yield X
    +**         halt-error
    +**      B: open temp table
    +**      L: yield X
    +**         if EOF goto M
    +**         insert row from R..R+n into temp table
    +**         goto L
    +**      M: open write cursor to <table> and its indices
    +**         rewind temp table
    +**      C: loop over rows of intermediate table
    +**           transfer values form intermediate table into <table>
    +**         end loop
    +**      D: cleanup
    +*/
    +SQLITE_PRIVATE void sqlite3Insert(
    +  Parse *pParse,        /* Parser context */
    +  SrcList *pTabList,    /* Name of table into which we are inserting */
    +  ExprList *pList,      /* List of values to be inserted */
    +  Select *pSelect,      /* A SELECT statement to use as the data source */
    +  IdList *pColumn,      /* Column names corresponding to IDLIST. */
    +  int onError           /* How to handle constraint errors */
    +){
    +  sqlite3 *db;          /* The main database structure */
    +  Table *pTab;          /* The table to insert into.  aka TABLE */
    +  char *zTab;           /* Name of the table into which we are inserting */
    +  const char *zDb;      /* Name of the database holding this table */
    +  int i, j, idx;        /* Loop counters */
    +  Vdbe *v;              /* Generate code into this virtual machine */
    +  Index *pIdx;          /* For looping over indices of the table */
    +  int nColumn;          /* Number of columns in the data */
    +  int nHidden = 0;      /* Number of hidden columns if TABLE is virtual */
    +  int baseCur = 0;      /* VDBE Cursor number for pTab */
    +  int keyColumn = -1;   /* Column that is the INTEGER PRIMARY KEY */
    +  int endOfLoop;        /* Label for the end of the insertion loop */
    +  int useTempTable = 0; /* Store SELECT results in intermediate table */
    +  int srcTab = 0;       /* Data comes from this temporary cursor if >=0 */
    +  int addrInsTop = 0;   /* Jump to label "D" */
    +  int addrCont = 0;     /* Top of insert loop. Label "C" in templates 3 and 4 */
    +  int addrSelect = 0;   /* Address of coroutine that implements the SELECT */
    +  SelectDest dest;      /* Destination for SELECT on rhs of INSERT */
    +  int iDb;              /* Index of database holding TABLE */
    +  Db *pDb;              /* The database containing table being inserted into */
    +  int appendFlag = 0;   /* True if the insert is likely to be an append */
    +
    +  /* Register allocations */
    +  int regFromSelect = 0;/* Base register for data coming from SELECT */
    +  int regAutoinc = 0;   /* Register holding the AUTOINCREMENT counter */
    +  int regRowCount = 0;  /* Memory cell used for the row counter */
    +  int regIns;           /* Block of regs holding rowid+data being inserted */
    +  int regRowid;         /* registers holding insert rowid */
    +  int regData;          /* register holding first column to insert */
    +  int regRecord;        /* Holds the assemblied row record */
    +  int regEof = 0;       /* Register recording end of SELECT data */
    +  int *aRegIdx = 0;     /* One register allocated to each index */
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  int isView;                 /* True if attempting to insert into a view */
    +  Trigger *pTrigger;          /* List of triggers on pTab, if required */
    +  int tmask;                  /* Mask of trigger times */
    +#endif
    +
    +  db = pParse->db;
    +  memset(&dest, 0, sizeof(dest));
    +  if( pParse->nErr || db->mallocFailed ){
    +    goto insert_cleanup;
    +  }
    +
    +  /* Locate the table into which we will be inserting new information.
    +  */
    +  assert( pTabList->nSrc==1 );
    +  zTab = pTabList->a[0].zName;
    +  if( NEVER(zTab==0) ) goto insert_cleanup;
    +  pTab = sqlite3SrcListLookup(pParse, pTabList);
    +  if( pTab==0 ){
    +    goto insert_cleanup;
    +  }
    +  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +  assert( iDb<db->nDb );
    +  pDb = &db->aDb[iDb];
    +  zDb = pDb->zName;
    +  if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){
    +    goto insert_cleanup;
    +  }
    +
    +  /* Figure out if we have any triggers and if the table being
    +  ** inserted into is a view
    +  */
    +#ifndef SQLITE_OMIT_TRIGGER
    +  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_INSERT, 0, &tmask);
    +  isView = pTab->pSelect!=0;
    +#else
    +# define pTrigger 0
    +# define tmask 0
    +# define isView 0
    +#endif
    +#ifdef SQLITE_OMIT_VIEW
    +# undef isView
    +# define isView 0
    +#endif
    +  assert( (pTrigger && tmask) || (pTrigger==0 && tmask==0) );
    +
    +  /* If pTab is really a view, make sure it has been initialized.
    +  ** ViewGetColumnNames() is a no-op if pTab is not a view (or virtual 
    +  ** module table).
    +  */
    +  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
    +    goto insert_cleanup;
    +  }
    +
    +  /* Ensure that:
    +  *  (a) the table is not read-only, 
    +  *  (b) that if it is a view then ON INSERT triggers exist
    +  */
    +  if( sqlite3IsReadOnly(pParse, pTab, tmask) ){
    +    goto insert_cleanup;
    +  }
    +
    +  /* Allocate a VDBE
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ) goto insert_cleanup;
    +  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
    +  sqlite3BeginWriteOperation(pParse, pSelect || pTrigger, iDb);
    +
    +#ifndef SQLITE_OMIT_XFER_OPT
    +  /* If the statement is of the form
    +  **
    +  **       INSERT INTO <table1> SELECT * FROM <table2>;
    +  **
    +  ** Then special optimizations can be applied that make the transfer
    +  ** very fast and which reduce fragmentation of indices.
    +  **
    +  ** This is the 2nd template.
    +  */
    +  if( pColumn==0 && xferOptimization(pParse, pTab, pSelect, onError, iDb) ){
    +    assert( !pTrigger );
    +    assert( pList==0 );
    +    goto insert_end;
    +  }
    +#endif /* SQLITE_OMIT_XFER_OPT */
    +
    +  /* If this is an AUTOINCREMENT table, look up the sequence number in the
    +  ** sqlite_sequence table and store it in memory cell regAutoinc.
    +  */
    +  regAutoinc = autoIncBegin(pParse, iDb, pTab);
    +
    +  /* Figure out how many columns of data are supplied.  If the data
    +  ** is coming from a SELECT statement, then generate a co-routine that
    +  ** produces a single row of the SELECT on each invocation.  The
    +  ** co-routine is the common header to the 3rd and 4th templates.
    +  */
    +  if( pSelect ){
    +    /* Data is coming from a SELECT.  Generate code to implement that SELECT
    +    ** as a co-routine.  The code is common to both the 3rd and 4th
    +    ** templates:
    +    **
    +    **         EOF <- 0
    +    **         X <- A
    +    **         goto B
    +    **      A: setup for the SELECT
    +    **         loop over the tables in the SELECT
    +    **           load value into register R..R+n
    +    **           yield X
    +    **         end loop
    +    **         cleanup after the SELECT
    +    **         EOF <- 1
    +    **         yield X
    +    **         halt-error
    +    **
    +    ** On each invocation of the co-routine, it puts a single row of the
    +    ** SELECT result into registers dest.iMem...dest.iMem+dest.nMem-1.
    +    ** (These output registers are allocated by sqlite3Select().)  When
    +    ** the SELECT completes, it sets the EOF flag stored in regEof.
    +    */
    +    int rc, j1;
    +
    +    regEof = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regEof);      /* EOF <- 0 */
    +    VdbeComment((v, "SELECT eof flag"));
    +    sqlite3SelectDestInit(&dest, SRT_Coroutine, ++pParse->nMem);
    +    addrSelect = sqlite3VdbeCurrentAddr(v)+2;
    +    sqlite3VdbeAddOp2(v, OP_Integer, addrSelect-1, dest.iParm);
    +    j1 = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
    +    VdbeComment((v, "Jump over SELECT coroutine"));
    +
    +    /* Resolve the expressions in the SELECT statement and execute it. */
    +    rc = sqlite3Select(pParse, pSelect, &dest);
    +    assert( pParse->nErr==0 || rc );
    +    if( rc || NEVER(pParse->nErr) || db->mallocFailed ){
    +      goto insert_cleanup;
    +    }
    +    sqlite3VdbeAddOp2(v, OP_Integer, 1, regEof);         /* EOF <- 1 */
    +    sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);   /* yield X */
    +    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_INTERNAL, OE_Abort);
    +    VdbeComment((v, "End of SELECT coroutine"));
    +    sqlite3VdbeJumpHere(v, j1);                          /* label B: */
    +
    +    regFromSelect = dest.iMem;
    +    assert( pSelect->pEList );
    +    nColumn = pSelect->pEList->nExpr;
    +    assert( dest.nMem==nColumn );
    +
    +    /* Set useTempTable to TRUE if the result of the SELECT statement
    +    ** should be written into a temporary table (template 4).  Set to
    +    ** FALSE if each* row of the SELECT can be written directly into
    +    ** the destination table (template 3).
    +    **
    +    ** A temp table must be used if the table being updated is also one
    +    ** of the tables being read by the SELECT statement.  Also use a 
    +    ** temp table in the case of row triggers.
    +    */
    +    if( pTrigger || readsTable(pParse, addrSelect, iDb, pTab) ){
    +      useTempTable = 1;
    +    }
    +
    +    if( useTempTable ){
    +      /* Invoke the coroutine to extract information from the SELECT
    +      ** and add it to a transient table srcTab.  The code generated
    +      ** here is from the 4th template:
    +      **
    +      **      B: open temp table
    +      **      L: yield X
    +      **         if EOF goto M
    +      **         insert row from R..R+n into temp table
    +      **         goto L
    +      **      M: ...
    +      */
    +      int regRec;          /* Register to hold packed record */
    +      int regTempRowid;    /* Register to hold temp table ROWID */
    +      int addrTop;         /* Label "L" */
    +      int addrIf;          /* Address of jump to M */
    +
    +      srcTab = pParse->nTab++;
    +      regRec = sqlite3GetTempReg(pParse);
    +      regTempRowid = sqlite3GetTempReg(pParse);
    +      sqlite3VdbeAddOp2(v, OP_OpenEphemeral, srcTab, nColumn);
    +      addrTop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);
    +      addrIf = sqlite3VdbeAddOp1(v, OP_If, regEof);
    +      sqlite3VdbeAddOp3(v, OP_MakeRecord, regFromSelect, nColumn, regRec);
    +      sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regTempRowid);
    +      sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regTempRowid);
    +      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrTop);
    +      sqlite3VdbeJumpHere(v, addrIf);
    +      sqlite3ReleaseTempReg(pParse, regRec);
    +      sqlite3ReleaseTempReg(pParse, regTempRowid);
    +    }
    +  }else{
    +    /* This is the case if the data for the INSERT is coming from a VALUES
    +    ** clause
    +    */
    +    NameContext sNC;
    +    memset(&sNC, 0, sizeof(sNC));
    +    sNC.pParse = pParse;
    +    srcTab = -1;
    +    assert( useTempTable==0 );
    +    nColumn = pList ? pList->nExpr : 0;
    +    for(i=0; i<nColumn; i++){
    +      if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
    +        goto insert_cleanup;
    +      }
    +    }
    +  }
    +
    +  /* Make sure the number of columns in the source data matches the number
    +  ** of columns to be inserted into the table.
    +  */
    +  if( IsVirtual(pTab) ){
    +    for(i=0; i<pTab->nCol; i++){
    +      nHidden += (IsHiddenColumn(&pTab->aCol[i]) ? 1 : 0);
    +    }
    +  }
    +  if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){
    +    sqlite3ErrorMsg(pParse, 
    +       "table %S has %d columns but %d values were supplied",
    +       pTabList, 0, pTab->nCol-nHidden, nColumn);
    +    goto insert_cleanup;
    +  }
    +  if( pColumn!=0 && nColumn!=pColumn->nId ){
    +    sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
    +    goto insert_cleanup;
    +  }
    +
    +  /* If the INSERT statement included an IDLIST term, then make sure
    +  ** all elements of the IDLIST really are columns of the table and 
    +  ** remember the column indices.
    +  **
    +  ** If the table has an INTEGER PRIMARY KEY column and that column
    +  ** is named in the IDLIST, then record in the keyColumn variable
    +  ** the index into IDLIST of the primary key column.  keyColumn is
    +  ** the index of the primary key as it appears in IDLIST, not as
    +  ** is appears in the original table.  (The index of the primary
    +  ** key in the original table is pTab->iPKey.)
    +  */
    +  if( pColumn ){
    +    for(i=0; i<pColumn->nId; i++){
    +      pColumn->a[i].idx = -1;
    +    }
    +    for(i=0; i<pColumn->nId; i++){
    +      for(j=0; j<pTab->nCol; j++){
    +        if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
    +          pColumn->a[i].idx = j;
    +          if( j==pTab->iPKey ){
    +            keyColumn = i;
    +          }
    +          break;
    +        }
    +      }
    +      if( j>=pTab->nCol ){
    +        if( sqlite3IsRowid(pColumn->a[i].zName) ){
    +          keyColumn = i;
    +        }else{
    +          sqlite3ErrorMsg(pParse, "table %S has no column named %s",
    +              pTabList, 0, pColumn->a[i].zName);
    +          pParse->nErr++;
    +          goto insert_cleanup;
    +        }
    +      }
    +    }
    +  }
    +
    +  /* If there is no IDLIST term but the table has an integer primary
    +  ** key, the set the keyColumn variable to the primary key column index
    +  ** in the original table definition.
    +  */
    +  if( pColumn==0 && nColumn>0 ){
    +    keyColumn = pTab->iPKey;
    +  }
    +    
    +  /* Initialize the count of rows to be inserted
    +  */
    +  if( db->flags & SQLITE_CountRows ){
    +    regRowCount = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);
    +  }
    +
    +  /* If this is not a view, open the table and and all indices */
    +  if( !isView ){
    +    int nIdx;
    +
    +    baseCur = pParse->nTab;
    +    nIdx = sqlite3OpenTableAndIndices(pParse, pTab, baseCur, OP_OpenWrite);
    +    aRegIdx = sqlite3DbMallocRaw(db, sizeof(int)*(nIdx+1));
    +    if( aRegIdx==0 ){
    +      goto insert_cleanup;
    +    }
    +    for(i=0; i<nIdx; i++){
    +      aRegIdx[i] = ++pParse->nMem;
    +    }
    +  }
    +
    +  /* This is the top of the main insertion loop */
    +  if( useTempTable ){
    +    /* This block codes the top of loop only.  The complete loop is the
    +    ** following pseudocode (template 4):
    +    **
    +    **         rewind temp table
    +    **      C: loop over rows of intermediate table
    +    **           transfer values form intermediate table into <table>
    +    **         end loop
    +    **      D: ...
    +    */
    +    addrInsTop = sqlite3VdbeAddOp1(v, OP_Rewind, srcTab);
    +    addrCont = sqlite3VdbeCurrentAddr(v);
    +  }else if( pSelect ){
    +    /* This block codes the top of loop only.  The complete loop is the
    +    ** following pseudocode (template 3):
    +    **
    +    **      C: yield X
    +    **         if EOF goto D
    +    **         insert the select result into <table> from R..R+n
    +    **         goto C
    +    **      D: ...
    +    */
    +    addrCont = sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);
    +    addrInsTop = sqlite3VdbeAddOp1(v, OP_If, regEof);
    +  }
    +
    +  /* Allocate registers for holding the rowid of the new row,
    +  ** the content of the new row, and the assemblied row record.
    +  */
    +  regRecord = ++pParse->nMem;
    +  regRowid = regIns = pParse->nMem+1;
    +  pParse->nMem += pTab->nCol + 1;
    +  if( IsVirtual(pTab) ){
    +    regRowid++;
    +    pParse->nMem++;
    +  }
    +  regData = regRowid+1;
    +
    +  /* Run the BEFORE and INSTEAD OF triggers, if there are any
    +  */
    +  endOfLoop = sqlite3VdbeMakeLabel(v);
    +  if( tmask & TRIGGER_BEFORE ){
    +    int regCols = sqlite3GetTempRange(pParse, pTab->nCol+1);
    +
    +    /* build the NEW.* reference row.  Note that if there is an INTEGER
    +    ** PRIMARY KEY into which a NULL is being inserted, that NULL will be
    +    ** translated into a unique ID for the row.  But on a BEFORE trigger,
    +    ** we do not know what the unique ID will be (because the insert has
    +    ** not happened yet) so we substitute a rowid of -1
    +    */
    +    if( keyColumn<0 ){
    +      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
    +    }else{
    +      int j1;
    +      if( useTempTable ){
    +        sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regCols);
    +      }else{
    +        assert( pSelect==0 );  /* Otherwise useTempTable is true */
    +        sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regCols);
    +      }
    +      j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols);
    +      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
    +      sqlite3VdbeJumpHere(v, j1);
    +      sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols);
    +    }
    +
    +    /* Cannot have triggers on a virtual table. If it were possible,
    +    ** this block would have to account for hidden column.
    +    */
    +    assert( !IsVirtual(pTab) );
    +
    +    /* Create the new column data
    +    */
    +    for(i=0; i<pTab->nCol; i++){
    +      if( pColumn==0 ){
    +        j = i;
    +      }else{
    +        for(j=0; j<pColumn->nId; j++){
    +          if( pColumn->a[j].idx==i ) break;
    +        }
    +      }
    +      if( pColumn && j>=pColumn->nId ){
    +        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regCols+i+1);
    +      }else if( useTempTable ){
    +        sqlite3VdbeAddOp3(v, OP_Column, srcTab, j, regCols+i+1); 
    +      }else{
    +        assert( pSelect==0 ); /* Otherwise useTempTable is true */
    +        sqlite3ExprCodeAndCache(pParse, pList->a[j].pExpr, regCols+i+1);
    +      }
    +    }
    +
    +    /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,
    +    ** do not attempt any conversions before assembling the record.
    +    ** If this is a real table, attempt conversions as required by the
    +    ** table column affinities.
    +    */
    +    if( !isView ){
    +      sqlite3VdbeAddOp2(v, OP_Affinity, regCols+1, pTab->nCol);
    +      sqlite3TableAffinityStr(v, pTab);
    +    }
    +
    +    /* Fire BEFORE or INSTEAD OF triggers */
    +    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_BEFORE, 
    +        pTab, regCols-pTab->nCol-1, onError, endOfLoop);
    +
    +    sqlite3ReleaseTempRange(pParse, regCols, pTab->nCol+1);
    +  }
    +
    +  /* Push the record number for the new entry onto the stack.  The
    +  ** record number is a randomly generate integer created by NewRowid
    +  ** except when the table has an INTEGER PRIMARY KEY column, in which
    +  ** case the record number is the same as that column. 
    +  */
    +  if( !isView ){
    +    if( IsVirtual(pTab) ){
    +      /* The row that the VUpdate opcode will delete: none */
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regIns);
    +    }
    +    if( keyColumn>=0 ){
    +      if( useTempTable ){
    +        sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regRowid);
    +      }else if( pSelect ){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+keyColumn, regRowid);
    +      }else{
    +        VdbeOp *pOp;
    +        sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
    +        pOp = sqlite3VdbeGetOp(v, -1);
    +        if( ALWAYS(pOp) && pOp->opcode==OP_Null && !IsVirtual(pTab) ){
    +          appendFlag = 1;
    +          pOp->opcode = OP_NewRowid;
    +          pOp->p1 = baseCur;
    +          pOp->p2 = regRowid;
    +          pOp->p3 = regAutoinc;
    +        }
    +      }
    +      /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
    +      ** to generate a unique primary key value.
    +      */
    +      if( !appendFlag ){
    +        int j1;
    +        if( !IsVirtual(pTab) ){
    +          j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid);
    +          sqlite3VdbeAddOp3(v, OP_NewRowid, baseCur, regRowid, regAutoinc);
    +          sqlite3VdbeJumpHere(v, j1);
    +        }else{
    +          j1 = sqlite3VdbeCurrentAddr(v);
    +          sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2);
    +        }
    +        sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid);
    +      }
    +    }else if( IsVirtual(pTab) ){
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
    +    }else{
    +      sqlite3VdbeAddOp3(v, OP_NewRowid, baseCur, regRowid, regAutoinc);
    +      appendFlag = 1;
    +    }
    +    autoIncStep(pParse, regAutoinc, regRowid);
    +
    +    /* Push onto the stack, data for all columns of the new entry, beginning
    +    ** with the first column.
    +    */
    +    nHidden = 0;
    +    for(i=0; i<pTab->nCol; i++){
    +      int iRegStore = regRowid+1+i;
    +      if( i==pTab->iPKey ){
    +        /* The value of the INTEGER PRIMARY KEY column is always a NULL.
    +        ** Whenever this column is read, the record number will be substituted
    +        ** in its place.  So will fill this column with a NULL to avoid
    +        ** taking up data space with information that will never be used. */
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, iRegStore);
    +        continue;
    +      }
    +      if( pColumn==0 ){
    +        if( IsHiddenColumn(&pTab->aCol[i]) ){
    +          assert( IsVirtual(pTab) );
    +          j = -1;
    +          nHidden++;
    +        }else{
    +          j = i - nHidden;
    +        }
    +      }else{
    +        for(j=0; j<pColumn->nId; j++){
    +          if( pColumn->a[j].idx==i ) break;
    +        }
    +      }
    +      if( j<0 || nColumn==0 || (pColumn && j>=pColumn->nId) ){
    +        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, iRegStore);
    +      }else if( useTempTable ){
    +        sqlite3VdbeAddOp3(v, OP_Column, srcTab, j, iRegStore); 
    +      }else if( pSelect ){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+j, iRegStore);
    +      }else{
    +        sqlite3ExprCode(pParse, pList->a[j].pExpr, iRegStore);
    +      }
    +    }
    +
    +    /* Generate code to check constraints and generate index keys and
    +    ** do the insertion.
    +    */
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( IsVirtual(pTab) ){
    +      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
    +      sqlite3VtabMakeWritable(pParse, pTab);
    +      sqlite3VdbeAddOp4(v, OP_VUpdate, 1, pTab->nCol+2, regIns, pVTab, P4_VTAB);
    +      sqlite3MayAbort(pParse);
    +    }else
    +#endif
    +    {
    +      int isReplace;    /* Set to true if constraints may cause a replace */
    +      sqlite3GenerateConstraintChecks(pParse, pTab, baseCur, regIns, aRegIdx,
    +          keyColumn>=0, 0, onError, endOfLoop, &isReplace
    +      );
    +      sqlite3FkCheck(pParse, pTab, 0, regIns);
    +      sqlite3CompleteInsertion(
    +          pParse, pTab, baseCur, regIns, aRegIdx, 0, appendFlag, isReplace==0
    +      );
    +    }
    +  }
    +
    +  /* Update the count of rows that are inserted
    +  */
    +  if( (db->flags & SQLITE_CountRows)!=0 ){
    +    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);
    +  }
    +
    +  if( pTrigger ){
    +    /* Code AFTER triggers */
    +    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_AFTER, 
    +        pTab, regData-2-pTab->nCol, onError, endOfLoop);
    +  }
    +
    +  /* The bottom of the main insertion loop, if the data source
    +  ** is a SELECT statement.
    +  */
    +  sqlite3VdbeResolveLabel(v, endOfLoop);
    +  if( useTempTable ){
    +    sqlite3VdbeAddOp2(v, OP_Next, srcTab, addrCont);
    +    sqlite3VdbeJumpHere(v, addrInsTop);
    +    sqlite3VdbeAddOp1(v, OP_Close, srcTab);
    +  }else if( pSelect ){
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrCont);
    +    sqlite3VdbeJumpHere(v, addrInsTop);
    +  }
    +
    +  if( !IsVirtual(pTab) && !isView ){
    +    /* Close all tables opened */
    +    sqlite3VdbeAddOp1(v, OP_Close, baseCur);
    +    for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){
    +      sqlite3VdbeAddOp1(v, OP_Close, idx+baseCur);
    +    }
    +  }
    +
    +insert_end:
    +  /* Update the sqlite_sequence table by storing the content of the
    +  ** maximum rowid counter values recorded while inserting into
    +  ** autoincrement tables.
    +  */
    +  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
    +    sqlite3AutoincrementEnd(pParse);
    +  }
    +
    +  /*
    +  ** Return the number of rows inserted. If this routine is 
    +  ** generating code because of a call to sqlite3NestedParse(), do not
    +  ** invoke the callback function.
    +  */
    +  if( (db->flags&SQLITE_CountRows) && !pParse->nested && !pParse->pTriggerTab ){
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, regRowCount, 1);
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows inserted", SQLITE_STATIC);
    +  }
    +
    +insert_cleanup:
    +  sqlite3SrcListDelete(db, pTabList);
    +  sqlite3ExprListDelete(db, pList);
    +  sqlite3SelectDelete(db, pSelect);
    +  sqlite3IdListDelete(db, pColumn);
    +  sqlite3DbFree(db, aRegIdx);
    +}
    +
    +/* Make sure "isView" and other macros defined above are undefined. Otherwise
    +** thely may interfere with compilation of other functions in this file
    +** (or in another file, if this file becomes part of the amalgamation).  */
    +#ifdef isView
    + #undef isView
    +#endif
    +#ifdef pTrigger
    + #undef pTrigger
    +#endif
    +#ifdef tmask
    + #undef tmask
    +#endif
    +
    +
    +/*
    +** Generate code to do constraint checks prior to an INSERT or an UPDATE.
    +**
    +** The input is a range of consecutive registers as follows:
    +**
    +**    1.  The rowid of the row after the update.
    +**
    +**    2.  The data in the first column of the entry after the update.
    +**
    +**    i.  Data from middle columns...
    +**
    +**    N.  The data in the last column of the entry after the update.
    +**
    +** The regRowid parameter is the index of the register containing (1).
    +**
    +** If isUpdate is true and rowidChng is non-zero, then rowidChng contains
    +** the address of a register containing the rowid before the update takes
    +** place. isUpdate is true for UPDATEs and false for INSERTs. If isUpdate
    +** is false, indicating an INSERT statement, then a non-zero rowidChng 
    +** indicates that the rowid was explicitly specified as part of the
    +** INSERT statement. If rowidChng is false, it means that  the rowid is
    +** computed automatically in an insert or that the rowid value is not 
    +** modified by an update.
    +**
    +** The code generated by this routine store new index entries into
    +** registers identified by aRegIdx[].  No index entry is created for
    +** indices where aRegIdx[i]==0.  The order of indices in aRegIdx[] is
    +** the same as the order of indices on the linked list of indices
    +** attached to the table.
    +**
    +** This routine also generates code to check constraints.  NOT NULL,
    +** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,
    +** then the appropriate action is performed.  There are five possible
    +** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
    +**
    +**  Constraint type  Action       What Happens
    +**  ---------------  ----------   ----------------------------------------
    +**  any              ROLLBACK     The current transaction is rolled back and
    +**                                sqlite3_exec() returns immediately with a
    +**                                return code of SQLITE_CONSTRAINT.
    +**
    +**  any              ABORT        Back out changes from the current command
    +**                                only (do not do a complete rollback) then
    +**                                cause sqlite3_exec() to return immediately
    +**                                with SQLITE_CONSTRAINT.
    +**
    +**  any              FAIL         Sqlite_exec() returns immediately with a
    +**                                return code of SQLITE_CONSTRAINT.  The
    +**                                transaction is not rolled back and any
    +**                                prior changes are retained.
    +**
    +**  any              IGNORE       The record number and data is popped from
    +**                                the stack and there is an immediate jump
    +**                                to label ignoreDest.
    +**
    +**  NOT NULL         REPLACE      The NULL value is replace by the default
    +**                                value for that column.  If the default value
    +**                                is NULL, the action is the same as ABORT.
    +**
    +**  UNIQUE           REPLACE      The other row that conflicts with the row
    +**                                being inserted is removed.
    +**
    +**  CHECK            REPLACE      Illegal.  The results in an exception.
    +**
    +** Which action to take is determined by the overrideError parameter.
    +** Or if overrideError==OE_Default, then the pParse->onError parameter
    +** is used.  Or if pParse->onError==OE_Default then the onError value
    +** for the constraint is used.
    +**
    +** The calling routine must open a read/write cursor for pTab with
    +** cursor number "baseCur".  All indices of pTab must also have open
    +** read/write cursors with cursor number baseCur+i for the i-th cursor.
    +** Except, if there is no possibility of a REPLACE action then
    +** cursors do not need to be open for indices where aRegIdx[i]==0.
    +*/
    +SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
    +  Parse *pParse,      /* The parser context */
    +  Table *pTab,        /* the table into which we are inserting */
    +  int baseCur,        /* Index of a read/write cursor pointing at pTab */
    +  int regRowid,       /* Index of the range of input registers */
    +  int *aRegIdx,       /* Register used by each index.  0 for unused indices */
    +  int rowidChng,      /* True if the rowid might collide with existing entry */
    +  int isUpdate,       /* True for UPDATE, False for INSERT */
    +  int overrideError,  /* Override onError to this if not OE_Default */
    +  int ignoreDest,     /* Jump to this label on an OE_Ignore resolution */
    +  int *pbMayReplace   /* OUT: Set to true if constraint may cause a replace */
    +){
    +  int i;              /* loop counter */
    +  Vdbe *v;            /* VDBE under constrution */
    +  int nCol;           /* Number of columns */
    +  int onError;        /* Conflict resolution strategy */
    +  int j1;             /* Addresss of jump instruction */
    +  int j2 = 0, j3;     /* Addresses of jump instructions */
    +  int regData;        /* Register containing first data column */
    +  int iCur;           /* Table cursor number */
    +  Index *pIdx;         /* Pointer to one of the indices */
    +  int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
    +  int regOldRowid = (rowidChng && isUpdate) ? rowidChng : regRowid;
    +
    +  v = sqlite3GetVdbe(pParse);
    +  assert( v!=0 );
    +  assert( pTab->pSelect==0 );  /* This table is not a VIEW */
    +  nCol = pTab->nCol;
    +  regData = regRowid + 1;
    +
    +  /* Test all NOT NULL constraints.
    +  */
    +  for(i=0; i<nCol; i++){
    +    if( i==pTab->iPKey ){
    +      continue;
    +    }
    +    onError = pTab->aCol[i].notNull;
    +    if( onError==OE_None ) continue;
    +    if( overrideError!=OE_Default ){
    +      onError = overrideError;
    +    }else if( onError==OE_Default ){
    +      onError = OE_Abort;
    +    }
    +    if( onError==OE_Replace && pTab->aCol[i].pDflt==0 ){
    +      onError = OE_Abort;
    +    }
    +    assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
    +        || onError==OE_Ignore || onError==OE_Replace );
    +    switch( onError ){
    +      case OE_Abort:
    +        sqlite3MayAbort(pParse);
    +      case OE_Rollback:
    +      case OE_Fail: {
    +        char *zMsg;
    +        j1 = sqlite3VdbeAddOp3(v, OP_HaltIfNull,
    +                                  SQLITE_CONSTRAINT, onError, regData+i);
    +        zMsg = sqlite3MPrintf(pParse->db, "%s.%s may not be NULL",
    +                              pTab->zName, pTab->aCol[i].zName);
    +        sqlite3VdbeChangeP4(v, -1, zMsg, P4_DYNAMIC);
    +        break;
    +      }
    +      case OE_Ignore: {
    +        sqlite3VdbeAddOp2(v, OP_IsNull, regData+i, ignoreDest);
    +        break;
    +      }
    +      default: {
    +        assert( onError==OE_Replace );
    +        j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regData+i);
    +        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regData+i);
    +        sqlite3VdbeJumpHere(v, j1);
    +        break;
    +      }
    +    }
    +  }
    +
    +  /* Test all CHECK constraints
    +  */
    +#ifndef SQLITE_OMIT_CHECK
    +  if( pTab->pCheck && (pParse->db->flags & SQLITE_IgnoreChecks)==0 ){
    +    int allOk = sqlite3VdbeMakeLabel(v);
    +    pParse->ckBase = regData;
    +    sqlite3ExprIfTrue(pParse, pTab->pCheck, allOk, SQLITE_JUMPIFNULL);
    +    onError = overrideError!=OE_Default ? overrideError : OE_Abort;
    +    if( onError==OE_Ignore ){
    +      sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
    +    }else{
    +      sqlite3HaltConstraint(pParse, onError, 0, 0);
    +    }
    +    sqlite3VdbeResolveLabel(v, allOk);
    +  }
    +#endif /* !defined(SQLITE_OMIT_CHECK) */
    +
    +  /* If we have an INTEGER PRIMARY KEY, make sure the primary key
    +  ** of the new record does not previously exist.  Except, if this
    +  ** is an UPDATE and the primary key is not changing, that is OK.
    +  */
    +  if( rowidChng ){
    +    onError = pTab->keyConf;
    +    if( overrideError!=OE_Default ){
    +      onError = overrideError;
    +    }else if( onError==OE_Default ){
    +      onError = OE_Abort;
    +    }
    +    
    +    if( isUpdate ){
    +      j2 = sqlite3VdbeAddOp3(v, OP_Eq, regRowid, 0, rowidChng);
    +    }
    +    j3 = sqlite3VdbeAddOp3(v, OP_NotExists, baseCur, 0, regRowid);
    +    switch( onError ){
    +      default: {
    +        onError = OE_Abort;
    +        /* Fall thru into the next case */
    +      }
    +      case OE_Rollback:
    +      case OE_Abort:
    +      case OE_Fail: {
    +        sqlite3HaltConstraint(
    +          pParse, onError, "PRIMARY KEY must be unique", P4_STATIC);
    +        break;
    +      }
    +      case OE_Replace: {
    +        /* If there are DELETE triggers on this table and the
    +        ** recursive-triggers flag is set, call GenerateRowDelete() to
    +        ** remove the conflicting row from the the table. This will fire
    +        ** the triggers and remove both the table and index b-tree entries.
    +        **
    +        ** Otherwise, if there are no triggers or the recursive-triggers
    +        ** flag is not set, call GenerateRowIndexDelete(). This removes
    +        ** the index b-tree entries only. The table b-tree entry will be 
    +        ** replaced by the new entry when it is inserted.  */
    +        Trigger *pTrigger = 0;
    +        if( pParse->db->flags&SQLITE_RecTriggers ){
    +          pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
    +        }
    +        sqlite3MultiWrite(pParse);
    +        if( pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0) ){
    +          sqlite3GenerateRowDelete(
    +              pParse, pTab, baseCur, regRowid, 0, pTrigger, OE_Replace
    +          );
    +        }else{
    +          sqlite3GenerateRowIndexDelete(pParse, pTab, baseCur, 0);
    +        }
    +        seenReplace = 1;
    +        break;
    +      }
    +      case OE_Ignore: {
    +        assert( seenReplace==0 );
    +        sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
    +        break;
    +      }
    +    }
    +    sqlite3VdbeJumpHere(v, j3);
    +    if( isUpdate ){
    +      sqlite3VdbeJumpHere(v, j2);
    +    }
    +  }
    +
    +  /* Test all UNIQUE constraints by creating entries for each UNIQUE
    +  ** index and making sure that duplicate entries do not already exist.
    +  ** Add the new records to the indices as we go.
    +  */
    +  for(iCur=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, iCur++){
    +    int regIdx;
    +    int regR;
    +
    +    if( aRegIdx[iCur]==0 ) continue;  /* Skip unused indices */
    +
    +    /* Create a key for accessing the index entry */
    +    regIdx = sqlite3GetTempRange(pParse, pIdx->nColumn+1);
    +    for(i=0; i<pIdx->nColumn; i++){
    +      int idx = pIdx->aiColumn[i];
    +      if( idx==pTab->iPKey ){
    +        sqlite3VdbeAddOp2(v, OP_SCopy, regRowid, regIdx+i);
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_SCopy, regData+idx, regIdx+i);
    +      }
    +    }
    +    sqlite3VdbeAddOp2(v, OP_SCopy, regRowid, regIdx+i);
    +    sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn+1, aRegIdx[iCur]);
    +    sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), 0);
    +    sqlite3ExprCacheAffinityChange(pParse, regIdx, pIdx->nColumn+1);
    +
    +    /* Find out what action to take in case there is an indexing conflict */
    +    onError = pIdx->onError;
    +    if( onError==OE_None ){ 
    +      sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
    +      continue;  /* pIdx is not a UNIQUE index */
    +    }
    +    if( overrideError!=OE_Default ){
    +      onError = overrideError;
    +    }else if( onError==OE_Default ){
    +      onError = OE_Abort;
    +    }
    +    if( seenReplace ){
    +      if( onError==OE_Ignore ) onError = OE_Replace;
    +      else if( onError==OE_Fail ) onError = OE_Abort;
    +    }
    +    
    +    /* Check to see if the new index entry will be unique */
    +    regR = sqlite3GetTempReg(pParse);
    +    sqlite3VdbeAddOp2(v, OP_SCopy, regOldRowid, regR);
    +    j3 = sqlite3VdbeAddOp4(v, OP_IsUnique, baseCur+iCur+1, 0,
    +                           regR, SQLITE_INT_TO_PTR(regIdx),
    +                           P4_INT32);
    +    sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
    +
    +    /* Generate code that executes if the new index entry is not unique */
    +    assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
    +        || onError==OE_Ignore || onError==OE_Replace );
    +    switch( onError ){
    +      case OE_Rollback:
    +      case OE_Abort:
    +      case OE_Fail: {
    +        int j;
    +        StrAccum errMsg;
    +        const char *zSep;
    +        char *zErr;
    +
    +        sqlite3StrAccumInit(&errMsg, 0, 0, 200);
    +        errMsg.db = pParse->db;
    +        zSep = pIdx->nColumn>1 ? "columns " : "column ";
    +        for(j=0; j<pIdx->nColumn; j++){
    +          char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
    +          sqlite3StrAccumAppend(&errMsg, zSep, -1);
    +          zSep = ", ";
    +          sqlite3StrAccumAppend(&errMsg, zCol, -1);
    +        }
    +        sqlite3StrAccumAppend(&errMsg,
    +            pIdx->nColumn>1 ? " are not unique" : " is not unique", -1);
    +        zErr = sqlite3StrAccumFinish(&errMsg);
    +        sqlite3HaltConstraint(pParse, onError, zErr, 0);
    +        sqlite3DbFree(errMsg.db, zErr);
    +        break;
    +      }
    +      case OE_Ignore: {
    +        assert( seenReplace==0 );
    +        sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
    +        break;
    +      }
    +      default: {
    +        Trigger *pTrigger = 0;
    +        assert( onError==OE_Replace );
    +        sqlite3MultiWrite(pParse);
    +        if( pParse->db->flags&SQLITE_RecTriggers ){
    +          pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
    +        }
    +        sqlite3GenerateRowDelete(
    +            pParse, pTab, baseCur, regR, 0, pTrigger, OE_Replace
    +        );
    +        seenReplace = 1;
    +        break;
    +      }
    +    }
    +    sqlite3VdbeJumpHere(v, j3);
    +    sqlite3ReleaseTempReg(pParse, regR);
    +  }
    +  
    +  if( pbMayReplace ){
    +    *pbMayReplace = seenReplace;
    +  }
    +}
    +
    +/*
    +** This routine generates code to finish the INSERT or UPDATE operation
    +** that was started by a prior call to sqlite3GenerateConstraintChecks.
    +** A consecutive range of registers starting at regRowid contains the
    +** rowid and the content to be inserted.
    +**
    +** The arguments to this routine should be the same as the first six
    +** arguments to sqlite3GenerateConstraintChecks.
    +*/
    +SQLITE_PRIVATE void sqlite3CompleteInsertion(
    +  Parse *pParse,      /* The parser context */
    +  Table *pTab,        /* the table into which we are inserting */
    +  int baseCur,        /* Index of a read/write cursor pointing at pTab */
    +  int regRowid,       /* Range of content */
    +  int *aRegIdx,       /* Register used by each index.  0 for unused indices */
    +  int isUpdate,       /* True for UPDATE, False for INSERT */
    +  int appendBias,     /* True if this is likely to be an append */
    +  int useSeekResult   /* True to set the USESEEKRESULT flag on OP_[Idx]Insert */
    +){
    +  int i;
    +  Vdbe *v;
    +  int nIdx;
    +  Index *pIdx;
    +  u8 pik_flags;
    +  int regData;
    +  int regRec;
    +
    +  v = sqlite3GetVdbe(pParse);
    +  assert( v!=0 );
    +  assert( pTab->pSelect==0 );  /* This table is not a VIEW */
    +  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
    +  for(i=nIdx-1; i>=0; i--){
    +    if( aRegIdx[i]==0 ) continue;
    +    sqlite3VdbeAddOp2(v, OP_IdxInsert, baseCur+i+1, aRegIdx[i]);
    +    if( useSeekResult ){
    +      sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
    +    }
    +  }
    +  regData = regRowid + 1;
    +  regRec = sqlite3GetTempReg(pParse);
    +  sqlite3VdbeAddOp3(v, OP_MakeRecord, regData, pTab->nCol, regRec);
    +  sqlite3TableAffinityStr(v, pTab);
    +  sqlite3ExprCacheAffinityChange(pParse, regData, pTab->nCol);
    +  if( pParse->nested ){
    +    pik_flags = 0;
    +  }else{
    +    pik_flags = OPFLAG_NCHANGE;
    +    pik_flags |= (isUpdate?OPFLAG_ISUPDATE:OPFLAG_LASTROWID);
    +  }
    +  if( appendBias ){
    +    pik_flags |= OPFLAG_APPEND;
    +  }
    +  if( useSeekResult ){
    +    pik_flags |= OPFLAG_USESEEKRESULT;
    +  }
    +  sqlite3VdbeAddOp3(v, OP_Insert, baseCur, regRec, regRowid);
    +  if( !pParse->nested ){
    +    sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_STATIC);
    +  }
    +  sqlite3VdbeChangeP5(v, pik_flags);
    +}
    +
    +/*
    +** Generate code that will open cursors for a table and for all
    +** indices of that table.  The "baseCur" parameter is the cursor number used
    +** for the table.  Indices are opened on subsequent cursors.
    +**
    +** Return the number of indices on the table.
    +*/
    +SQLITE_PRIVATE int sqlite3OpenTableAndIndices(
    +  Parse *pParse,   /* Parsing context */
    +  Table *pTab,     /* Table to be opened */
    +  int baseCur,     /* Cursor number assigned to the table */
    +  int op           /* OP_OpenRead or OP_OpenWrite */
    +){
    +  int i;
    +  int iDb;
    +  Index *pIdx;
    +  Vdbe *v;
    +
    +  if( IsVirtual(pTab) ) return 0;
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +  v = sqlite3GetVdbe(pParse);
    +  assert( v!=0 );
    +  sqlite3OpenTable(pParse, baseCur, iDb, pTab, op);
    +  for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
    +    KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    +    assert( pIdx->pSchema==pTab->pSchema );
    +    sqlite3VdbeAddOp4(v, op, i+baseCur, pIdx->tnum, iDb,
    +                      (char*)pKey, P4_KEYINFO_HANDOFF);
    +    VdbeComment((v, "%s", pIdx->zName));
    +  }
    +  if( pParse->nTab<baseCur+i ){
    +    pParse->nTab = baseCur+i;
    +  }
    +  return i-1;
    +}
    +
    +
    +#ifdef SQLITE_TEST
    +/*
    +** The following global variable is incremented whenever the
    +** transfer optimization is used.  This is used for testing
    +** purposes only - to make sure the transfer optimization really
    +** is happening when it is suppose to.
    +*/
    +SQLITE_API int sqlite3_xferopt_count;
    +#endif /* SQLITE_TEST */
    +
    +
    +#ifndef SQLITE_OMIT_XFER_OPT
    +/*
    +** Check to collation names to see if they are compatible.
    +*/
    +static int xferCompatibleCollation(const char *z1, const char *z2){
    +  if( z1==0 ){
    +    return z2==0;
    +  }
    +  if( z2==0 ){
    +    return 0;
    +  }
    +  return sqlite3StrICmp(z1, z2)==0;
    +}
    +
    +
    +/*
    +** Check to see if index pSrc is compatible as a source of data
    +** for index pDest in an insert transfer optimization.  The rules
    +** for a compatible index:
    +**
    +**    *   The index is over the same set of columns
    +**    *   The same DESC and ASC markings occurs on all columns
    +**    *   The same onError processing (OE_Abort, OE_Ignore, etc)
    +**    *   The same collating sequence on each column
    +*/
    +static int xferCompatibleIndex(Index *pDest, Index *pSrc){
    +  int i;
    +  assert( pDest && pSrc );
    +  assert( pDest->pTable!=pSrc->pTable );
    +  if( pDest->nColumn!=pSrc->nColumn ){
    +    return 0;   /* Different number of columns */
    +  }
    +  if( pDest->onError!=pSrc->onError ){
    +    return 0;   /* Different conflict resolution strategies */
    +  }
    +  for(i=0; i<pSrc->nColumn; i++){
    +    if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
    +      return 0;   /* Different columns indexed */
    +    }
    +    if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
    +      return 0;   /* Different sort orders */
    +    }
    +    if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
    +      return 0;   /* Different collating sequences */
    +    }
    +  }
    +
    +  /* If no test above fails then the indices must be compatible */
    +  return 1;
    +}
    +
    +/*
    +** Attempt the transfer optimization on INSERTs of the form
    +**
    +**     INSERT INTO tab1 SELECT * FROM tab2;
    +**
    +** This optimization is only attempted if
    +**
    +**    (1)  tab1 and tab2 have identical schemas including all the
    +**         same indices and constraints
    +**
    +**    (2)  tab1 and tab2 are different tables
    +**
    +**    (3)  There must be no triggers on tab1
    +**
    +**    (4)  The result set of the SELECT statement is "*"
    +**
    +**    (5)  The SELECT statement has no WHERE, HAVING, ORDER BY, GROUP BY,
    +**         or LIMIT clause.
    +**
    +**    (6)  The SELECT statement is a simple (not a compound) select that
    +**         contains only tab2 in its FROM clause
    +**
    +** This method for implementing the INSERT transfers raw records from
    +** tab2 over to tab1.  The columns are not decoded.  Raw records from
    +** the indices of tab2 are transfered to tab1 as well.  In so doing,
    +** the resulting tab1 has much less fragmentation.
    +**
    +** This routine returns TRUE if the optimization is attempted.  If any
    +** of the conditions above fail so that the optimization should not
    +** be attempted, then this routine returns FALSE.
    +*/
    +static int xferOptimization(
    +  Parse *pParse,        /* Parser context */
    +  Table *pDest,         /* The table we are inserting into */
    +  Select *pSelect,      /* A SELECT statement to use as the data source */
    +  int onError,          /* How to handle constraint errors */
    +  int iDbDest           /* The database of pDest */
    +){
    +  ExprList *pEList;                /* The result set of the SELECT */
    +  Table *pSrc;                     /* The table in the FROM clause of SELECT */
    +  Index *pSrcIdx, *pDestIdx;       /* Source and destination indices */
    +  struct SrcList_item *pItem;      /* An element of pSelect->pSrc */
    +  int i;                           /* Loop counter */
    +  int iDbSrc;                      /* The database of pSrc */
    +  int iSrc, iDest;                 /* Cursors from source and destination */
    +  int addr1, addr2;                /* Loop addresses */
    +  int emptyDestTest;               /* Address of test for empty pDest */
    +  int emptySrcTest;                /* Address of test for empty pSrc */
    +  Vdbe *v;                         /* The VDBE we are building */
    +  KeyInfo *pKey;                   /* Key information for an index */
    +  int regAutoinc;                  /* Memory register used by AUTOINC */
    +  int destHasUniqueIdx = 0;        /* True if pDest has a UNIQUE index */
    +  int regData, regRowid;           /* Registers holding data and rowid */
    +
    +  if( pSelect==0 ){
    +    return 0;   /* Must be of the form  INSERT INTO ... SELECT ... */
    +  }
    +  if( sqlite3TriggerList(pParse, pDest) ){
    +    return 0;   /* tab1 must not have triggers */
    +  }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( pDest->tabFlags & TF_Virtual ){
    +    return 0;   /* tab1 must not be a virtual table */
    +  }
    +#endif
    +  if( onError==OE_Default ){
    +    onError = OE_Abort;
    +  }
    +  if( onError!=OE_Abort && onError!=OE_Rollback ){
    +    return 0;   /* Cannot do OR REPLACE or OR IGNORE or OR FAIL */
    +  }
    +  assert(pSelect->pSrc);   /* allocated even if there is no FROM clause */
    +  if( pSelect->pSrc->nSrc!=1 ){
    +    return 0;   /* FROM clause must have exactly one term */
    +  }
    +  if( pSelect->pSrc->a[0].pSelect ){
    +    return 0;   /* FROM clause cannot contain a subquery */
    +  }
    +  if( pSelect->pWhere ){
    +    return 0;   /* SELECT may not have a WHERE clause */
    +  }
    +  if( pSelect->pOrderBy ){
    +    return 0;   /* SELECT may not have an ORDER BY clause */
    +  }
    +  /* Do not need to test for a HAVING clause.  If HAVING is present but
    +  ** there is no ORDER BY, we will get an error. */
    +  if( pSelect->pGroupBy ){
    +    return 0;   /* SELECT may not have a GROUP BY clause */
    +  }
    +  if( pSelect->pLimit ){
    +    return 0;   /* SELECT may not have a LIMIT clause */
    +  }
    +  assert( pSelect->pOffset==0 );  /* Must be so if pLimit==0 */
    +  if( pSelect->pPrior ){
    +    return 0;   /* SELECT may not be a compound query */
    +  }
    +  if( pSelect->selFlags & SF_Distinct ){
    +    return 0;   /* SELECT may not be DISTINCT */
    +  }
    +  pEList = pSelect->pEList;
    +  assert( pEList!=0 );
    +  if( pEList->nExpr!=1 ){
    +    return 0;   /* The result set must have exactly one column */
    +  }
    +  assert( pEList->a[0].pExpr );
    +  if( pEList->a[0].pExpr->op!=TK_ALL ){
    +    return 0;   /* The result set must be the special operator "*" */
    +  }
    +
    +  /* At this point we have established that the statement is of the
    +  ** correct syntactic form to participate in this optimization.  Now
    +  ** we have to check the semantics.
    +  */
    +  pItem = pSelect->pSrc->a;
    +  pSrc = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
    +  if( pSrc==0 ){
    +    return 0;   /* FROM clause does not contain a real table */
    +  }
    +  if( pSrc==pDest ){
    +    return 0;   /* tab1 and tab2 may not be the same table */
    +  }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( pSrc->tabFlags & TF_Virtual ){
    +    return 0;   /* tab2 must not be a virtual table */
    +  }
    +#endif
    +  if( pSrc->pSelect ){
    +    return 0;   /* tab2 may not be a view */
    +  }
    +  if( pDest->nCol!=pSrc->nCol ){
    +    return 0;   /* Number of columns must be the same in tab1 and tab2 */
    +  }
    +  if( pDest->iPKey!=pSrc->iPKey ){
    +    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
    +  }
    +  for(i=0; i<pDest->nCol; i++){
    +    if( pDest->aCol[i].affinity!=pSrc->aCol[i].affinity ){
    +      return 0;    /* Affinity must be the same on all columns */
    +    }
    +    if( !xferCompatibleCollation(pDest->aCol[i].zColl, pSrc->aCol[i].zColl) ){
    +      return 0;    /* Collating sequence must be the same on all columns */
    +    }
    +    if( pDest->aCol[i].notNull && !pSrc->aCol[i].notNull ){
    +      return 0;    /* tab2 must be NOT NULL if tab1 is */
    +    }
    +  }
    +  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    +    if( pDestIdx->onError!=OE_None ){
    +      destHasUniqueIdx = 1;
    +    }
    +    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
    +      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    +    }
    +    if( pSrcIdx==0 ){
    +      return 0;    /* pDestIdx has no corresponding index in pSrc */
    +    }
    +  }
    +#ifndef SQLITE_OMIT_CHECK
    +  if( pDest->pCheck && !sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){
    +    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
    +  }
    +#endif
    +
    +  /* If we get this far, it means either:
    +  **
    +  **    *   We can always do the transfer if the table contains an
    +  **        an integer primary key
    +  **
    +  **    *   We can conditionally do the transfer if the destination
    +  **        table is empty.
    +  */
    +#ifdef SQLITE_TEST
    +  sqlite3_xferopt_count++;
    +#endif
    +  iDbSrc = sqlite3SchemaToIndex(pParse->db, pSrc->pSchema);
    +  v = sqlite3GetVdbe(pParse);
    +  sqlite3CodeVerifySchema(pParse, iDbSrc);
    +  iSrc = pParse->nTab++;
    +  iDest = pParse->nTab++;
    +  regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
    +  sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
    +  if( (pDest->iPKey<0 && pDest->pIndex!=0) || destHasUniqueIdx ){
    +    /* If tables do not have an INTEGER PRIMARY KEY and there
    +    ** are indices to be copied and the destination is not empty,
    +    ** we have to disallow the transfer optimization because the
    +    ** the rowids might change which will mess up indexing.
    +    **
    +    ** Or if the destination has a UNIQUE index and is not empty,
    +    ** we also disallow the transfer optimization because we cannot
    +    ** insure that all entries in the union of DEST and SRC will be
    +    ** unique.
    +    */
    +    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0);
    +    emptyDestTest = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
    +    sqlite3VdbeJumpHere(v, addr1);
    +  }else{
    +    emptyDestTest = 0;
    +  }
    +  sqlite3OpenTable(pParse, iSrc, iDbSrc, pSrc, OP_OpenRead);
    +  emptySrcTest = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
    +  regData = sqlite3GetTempReg(pParse);
    +  regRowid = sqlite3GetTempReg(pParse);
    +  if( pDest->iPKey>=0 ){
    +    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
    +    addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
    +    sqlite3HaltConstraint(
    +        pParse, onError, "PRIMARY KEY must be unique", P4_STATIC);
    +    sqlite3VdbeJumpHere(v, addr2);
    +    autoIncStep(pParse, regAutoinc, regRowid);
    +  }else if( pDest->pIndex==0 ){
    +    addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);
    +  }else{
    +    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
    +    assert( (pDest->tabFlags & TF_Autoincrement)==0 );
    +  }
    +  sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
    +  sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
    +  sqlite3VdbeChangeP5(v, OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND);
    +  sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
    +  sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1);
    +  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    +    for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){
    +      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    +    }
    +    assert( pSrcIdx );
    +    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
    +    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    +    pKey = sqlite3IndexKeyinfo(pParse, pSrcIdx);
    +    sqlite3VdbeAddOp4(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc,
    +                      (char*)pKey, P4_KEYINFO_HANDOFF);
    +    VdbeComment((v, "%s", pSrcIdx->zName));
    +    pKey = sqlite3IndexKeyinfo(pParse, pDestIdx);
    +    sqlite3VdbeAddOp4(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest,
    +                      (char*)pKey, P4_KEYINFO_HANDOFF);
    +    VdbeComment((v, "%s", pDestIdx->zName));
    +    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
    +    sqlite3VdbeAddOp2(v, OP_RowKey, iSrc, regData);
    +    sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1);
    +    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1);
    +    sqlite3VdbeJumpHere(v, addr1);
    +  }
    +  sqlite3VdbeJumpHere(v, emptySrcTest);
    +  sqlite3ReleaseTempReg(pParse, regRowid);
    +  sqlite3ReleaseTempReg(pParse, regData);
    +  sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
    +  sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    +  if( emptyDestTest ){
    +    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, 0);
    +    sqlite3VdbeJumpHere(v, emptyDestTest);
    +    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    +    return 0;
    +  }else{
    +    return 1;
    +  }
    +}
    +#endif /* SQLITE_OMIT_XFER_OPT */
    +
    +/************** End of insert.c **********************************************/
    +/************** Begin file legacy.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Main file for the SQLite library.  The routines in this file
    +** implement the programmer interface to the library.  Routines in
    +** other files are for internal use by SQLite and should not be
    +** accessed by users of the library.
    +**
    +** $Id: legacy.c,v 1.35 2009/08/07 16:56:00 danielk1977 Exp $
    +*/
    +
    +
    +/*
    +** Execute SQL code.  Return one of the SQLITE_ success/failure
    +** codes.  Also write an error message into memory obtained from
    +** malloc() and make *pzErrMsg point to that message.
    +**
    +** If the SQL is a query, then for each row in the query result
    +** the xCallback() function is called.  pArg becomes the first
    +** argument to xCallback().  If xCallback=NULL then no callback
    +** is invoked, even for queries.
    +*/
    +SQLITE_API int sqlite3_exec(
    +  sqlite3 *db,                /* The database on which the SQL executes */
    +  const char *zSql,           /* The SQL to be executed */
    +  sqlite3_callback xCallback, /* Invoke this callback routine */
    +  void *pArg,                 /* First argument to xCallback() */
    +  char **pzErrMsg             /* Write error messages here */
    +){
    +  int rc = SQLITE_OK;         /* Return code */
    +  const char *zLeftover;      /* Tail of unprocessed SQL */
    +  sqlite3_stmt *pStmt = 0;    /* The current SQL statement */
    +  char **azCols = 0;          /* Names of result columns */
    +  int nRetry = 0;             /* Number of retry attempts */
    +  int callbackIsInit;         /* True if callback data is initialized */
    +
    +  if( zSql==0 ) zSql = "";
    +
    +  sqlite3_mutex_enter(db->mutex);
    +  sqlite3Error(db, SQLITE_OK, 0);
    +  while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){
    +    int nCol;
    +    char **azVals = 0;
    +
    +    pStmt = 0;
    +    rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover);
    +    assert( rc==SQLITE_OK || pStmt==0 );
    +    if( rc!=SQLITE_OK ){
    +      continue;
    +    }
    +    if( !pStmt ){
    +      /* this happens for a comment or white-space */
    +      zSql = zLeftover;
    +      continue;
    +    }
    +
    +    callbackIsInit = 0;
    +    nCol = sqlite3_column_count(pStmt);
    +
    +    while( 1 ){
    +      int i;
    +      rc = sqlite3_step(pStmt);
    +
    +      /* Invoke the callback function if required */
    +      if( xCallback && (SQLITE_ROW==rc || 
    +          (SQLITE_DONE==rc && !callbackIsInit
    +                           && db->flags&SQLITE_NullCallback)) ){
    +        if( !callbackIsInit ){
    +          azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);
    +          if( azCols==0 ){
    +            goto exec_out;
    +          }
    +          for(i=0; i<nCol; i++){
    +            azCols[i] = (char *)sqlite3_column_name(pStmt, i);
    +            /* sqlite3VdbeSetColName() installs column names as UTF8
    +            ** strings so there is no way for sqlite3_column_name() to fail. */
    +            assert( azCols[i]!=0 );
    +          }
    +          callbackIsInit = 1;
    +        }
    +        if( rc==SQLITE_ROW ){
    +          azVals = &azCols[nCol];
    +          for(i=0; i<nCol; i++){
    +            azVals[i] = (char *)sqlite3_column_text(pStmt, i);
    +            if( !azVals[i] && sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){
    +              db->mallocFailed = 1;
    +              goto exec_out;
    +            }
    +          }
    +        }
    +        if( xCallback(pArg, nCol, azVals, azCols) ){
    +          rc = SQLITE_ABORT;
    +          sqlite3VdbeFinalize((Vdbe *)pStmt);
    +          pStmt = 0;
    +          sqlite3Error(db, SQLITE_ABORT, 0);
    +          goto exec_out;
    +        }
    +      }
    +
    +      if( rc!=SQLITE_ROW ){
    +        rc = sqlite3VdbeFinalize((Vdbe *)pStmt);
    +        pStmt = 0;
    +        if( rc!=SQLITE_SCHEMA ){
    +          nRetry = 0;
    +          zSql = zLeftover;
    +          while( sqlite3Isspace(zSql[0]) ) zSql++;
    +        }
    +        break;
    +      }
    +    }
    +
    +    sqlite3DbFree(db, azCols);
    +    azCols = 0;
    +  }
    +
    +exec_out:
    +  if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);
    +  sqlite3DbFree(db, azCols);
    +
    +  rc = sqlite3ApiExit(db, rc);
    +  if( rc!=SQLITE_OK && ALWAYS(rc==sqlite3_errcode(db)) && pzErrMsg ){
    +    int nErrMsg = 1 + sqlite3Strlen30(sqlite3_errmsg(db));
    +    *pzErrMsg = sqlite3Malloc(nErrMsg);
    +    if( *pzErrMsg ){
    +      memcpy(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
    +    }else{
    +      rc = SQLITE_NOMEM;
    +      sqlite3Error(db, SQLITE_NOMEM, 0);
    +    }
    +  }else if( pzErrMsg ){
    +    *pzErrMsg = 0;
    +  }
    +
    +  assert( (rc&db->errMask)==rc );
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/************** End of legacy.c **********************************************/
    +/************** Begin file loadext.c *****************************************/
    +/*
    +** 2006 June 7
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to dynamically load extensions into
    +** the SQLite library.
    +**
    +** $Id: loadext.c,v 1.60 2009/06/03 01:24:54 drh Exp $
    +*/
    +
    +#ifndef SQLITE_CORE
    +  #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */
    +#endif
    +/************** Include sqlite3ext.h in the middle of loadext.c **************/
    +/************** Begin file sqlite3ext.h **************************************/
    +/*
    +** 2006 June 7
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the SQLite interface for use by
    +** shared libraries that want to be imported as extensions into
    +** an SQLite instance.  Shared libraries that intend to be loaded
    +** as extensions by SQLite should #include this file instead of 
    +** sqlite3.h.
    +**
    +** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $
    +*/
    +#ifndef _SQLITE3EXT_H_
    +#define _SQLITE3EXT_H_
    +
    +typedef struct sqlite3_api_routines sqlite3_api_routines;
    +
    +/*
    +** The following structure holds pointers to all of the SQLite API
    +** routines.
    +**
    +** WARNING:  In order to maintain backwards compatibility, add new
    +** interfaces to the end of this structure only.  If you insert new
    +** interfaces in the middle of this structure, then older different
    +** versions of SQLite will not be able to load each others' shared
    +** libraries!
    +*/
    +struct sqlite3_api_routines {
    +  void * (*aggregate_context)(sqlite3_context*,int nBytes);
    +  int  (*aggregate_count)(sqlite3_context*);
    +  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
    +  int  (*bind_double)(sqlite3_stmt*,int,double);
    +  int  (*bind_int)(sqlite3_stmt*,int,int);
    +  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
    +  int  (*bind_null)(sqlite3_stmt*,int);
    +  int  (*bind_parameter_count)(sqlite3_stmt*);
    +  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
    +  const char * (*bind_parameter_name)(sqlite3_stmt*,int);
    +  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
    +  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
    +  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
    +  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
    +  int  (*busy_timeout)(sqlite3*,int ms);
    +  int  (*changes)(sqlite3*);
    +  int  (*close)(sqlite3*);
    +  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
    +  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
    +  const void * (*column_blob)(sqlite3_stmt*,int iCol);
    +  int  (*column_bytes)(sqlite3_stmt*,int iCol);
    +  int  (*column_bytes16)(sqlite3_stmt*,int iCol);
    +  int  (*column_count)(sqlite3_stmt*pStmt);
    +  const char * (*column_database_name)(sqlite3_stmt*,int);
    +  const void * (*column_database_name16)(sqlite3_stmt*,int);
    +  const char * (*column_decltype)(sqlite3_stmt*,int i);
    +  const void * (*column_decltype16)(sqlite3_stmt*,int);
    +  double  (*column_double)(sqlite3_stmt*,int iCol);
    +  int  (*column_int)(sqlite3_stmt*,int iCol);
    +  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);
    +  const char * (*column_name)(sqlite3_stmt*,int);
    +  const void * (*column_name16)(sqlite3_stmt*,int);
    +  const char * (*column_origin_name)(sqlite3_stmt*,int);
    +  const void * (*column_origin_name16)(sqlite3_stmt*,int);
    +  const char * (*column_table_name)(sqlite3_stmt*,int);
    +  const void * (*column_table_name16)(sqlite3_stmt*,int);
    +  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
    +  const void * (*column_text16)(sqlite3_stmt*,int iCol);
    +  int  (*column_type)(sqlite3_stmt*,int iCol);
    +  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
    +  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
    +  int  (*complete)(const char*sql);
    +  int  (*complete16)(const void*sql);
    +  int  (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
    +  int  (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
    +  int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
    +  int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
    +  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
    +  int  (*data_count)(sqlite3_stmt*pStmt);
    +  sqlite3 * (*db_handle)(sqlite3_stmt*);
    +  int (*declare_vtab)(sqlite3*,const char*);
    +  int  (*enable_shared_cache)(int);
    +  int  (*errcode)(sqlite3*db);
    +  const char * (*errmsg)(sqlite3*);
    +  const void * (*errmsg16)(sqlite3*);
    +  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
    +  int  (*expired)(sqlite3_stmt*);
    +  int  (*finalize)(sqlite3_stmt*pStmt);
    +  void  (*free)(void*);
    +  void  (*free_table)(char**result);
    +  int  (*get_autocommit)(sqlite3*);
    +  void * (*get_auxdata)(sqlite3_context*,int);
    +  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
    +  int  (*global_recover)(void);
    +  void  (*interruptx)(sqlite3*);
    +  sqlite_int64  (*last_insert_rowid)(sqlite3*);
    +  const char * (*libversion)(void);
    +  int  (*libversion_number)(void);
    +  void *(*malloc)(int);
    +  char * (*mprintf)(const char*,...);
    +  int  (*open)(const char*,sqlite3**);
    +  int  (*open16)(const void*,sqlite3**);
    +  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
    +  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
    +  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
    +  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
    +  void *(*realloc)(void*,int);
    +  int  (*reset)(sqlite3_stmt*pStmt);
    +  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_double)(sqlite3_context*,double);
    +  void  (*result_error)(sqlite3_context*,const char*,int);
    +  void  (*result_error16)(sqlite3_context*,const void*,int);
    +  void  (*result_int)(sqlite3_context*,int);
    +  void  (*result_int64)(sqlite3_context*,sqlite_int64);
    +  void  (*result_null)(sqlite3_context*);
    +  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
    +  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_value)(sqlite3_context*,sqlite3_value*);
    +  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
    +  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
    +  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
    +  char * (*snprintf)(int,char*,const char*,...);
    +  int  (*step)(sqlite3_stmt*);
    +  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
    +  void  (*thread_cleanup)(void);
    +  int  (*total_changes)(sqlite3*);
    +  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
    +  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
    +  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
    +  void * (*user_data)(sqlite3_context*);
    +  const void * (*value_blob)(sqlite3_value*);
    +  int  (*value_bytes)(sqlite3_value*);
    +  int  (*value_bytes16)(sqlite3_value*);
    +  double  (*value_double)(sqlite3_value*);
    +  int  (*value_int)(sqlite3_value*);
    +  sqlite_int64  (*value_int64)(sqlite3_value*);
    +  int  (*value_numeric_type)(sqlite3_value*);
    +  const unsigned char * (*value_text)(sqlite3_value*);
    +  const void * (*value_text16)(sqlite3_value*);
    +  const void * (*value_text16be)(sqlite3_value*);
    +  const void * (*value_text16le)(sqlite3_value*);
    +  int  (*value_type)(sqlite3_value*);
    +  char *(*vmprintf)(const char*,va_list);
    +  /* Added ??? */
    +  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
    +  /* Added by 3.3.13 */
    +  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
    +  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
    +  int (*clear_bindings)(sqlite3_stmt*);
    +  /* Added by 3.4.1 */
    +  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
    +  /* Added by 3.5.0 */
    +  int (*bind_zeroblob)(sqlite3_stmt*,int,int);
    +  int (*blob_bytes)(sqlite3_blob*);
    +  int (*blob_close)(sqlite3_blob*);
    +  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
    +  int (*blob_read)(sqlite3_blob*,void*,int,int);
    +  int (*blob_write)(sqlite3_blob*,const void*,int,int);
    +  int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
    +  int (*file_control)(sqlite3*,const char*,int,void*);
    +  sqlite3_int64 (*memory_highwater)(int);
    +  sqlite3_int64 (*memory_used)(void);
    +  sqlite3_mutex *(*mutex_alloc)(int);
    +  void (*mutex_enter)(sqlite3_mutex*);
    +  void (*mutex_free)(sqlite3_mutex*);
    +  void (*mutex_leave)(sqlite3_mutex*);
    +  int (*mutex_try)(sqlite3_mutex*);
    +  int (*open_v2)(const char*,sqlite3**,int,const char*);
    +  int (*release_memory)(int);
    +  void (*result_error_nomem)(sqlite3_context*);
    +  void (*result_error_toobig)(sqlite3_context*);
    +  int (*sleep)(int);
    +  void (*soft_heap_limit)(int);
    +  sqlite3_vfs *(*vfs_find)(const char*);
    +  int (*vfs_register)(sqlite3_vfs*,int);
    +  int (*vfs_unregister)(sqlite3_vfs*);
    +  int (*xthreadsafe)(void);
    +  void (*result_zeroblob)(sqlite3_context*,int);
    +  void (*result_error_code)(sqlite3_context*,int);
    +  int (*test_control)(int, ...);
    +  void (*randomness)(int,void*);
    +  sqlite3 *(*context_db_handle)(sqlite3_context*);
    +  int (*extended_result_codes)(sqlite3*,int);
    +  int (*limit)(sqlite3*,int,int);
    +  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
    +  const char *(*sql)(sqlite3_stmt*);
    +  int (*status)(int,int*,int*,int);
    +};
    +
    +/*
    +** The following macros redefine the API routines so that they are
    +** redirected throught the global sqlite3_api structure.
    +**
    +** This header file is also used by the loadext.c source file
    +** (part of the main SQLite library - not an extension) so that
    +** it can get access to the sqlite3_api_routines structure
    +** definition.  But the main library does not want to redefine
    +** the API.  So the redefinition macros are only valid if the
    +** SQLITE_CORE macros is undefined.
    +*/
    +#ifndef SQLITE_CORE
    +#define sqlite3_aggregate_context      sqlite3_api->aggregate_context
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_aggregate_count        sqlite3_api->aggregate_count
    +#endif
    +#define sqlite3_bind_blob              sqlite3_api->bind_blob
    +#define sqlite3_bind_double            sqlite3_api->bind_double
    +#define sqlite3_bind_int               sqlite3_api->bind_int
    +#define sqlite3_bind_int64             sqlite3_api->bind_int64
    +#define sqlite3_bind_null              sqlite3_api->bind_null
    +#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
    +#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
    +#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
    +#define sqlite3_bind_text              sqlite3_api->bind_text
    +#define sqlite3_bind_text16            sqlite3_api->bind_text16
    +#define sqlite3_bind_value             sqlite3_api->bind_value
    +#define sqlite3_busy_handler           sqlite3_api->busy_handler
    +#define sqlite3_busy_timeout           sqlite3_api->busy_timeout
    +#define sqlite3_changes                sqlite3_api->changes
    +#define sqlite3_close                  sqlite3_api->close
    +#define sqlite3_collation_needed       sqlite3_api->collation_needed
    +#define sqlite3_collation_needed16     sqlite3_api->collation_needed16
    +#define sqlite3_column_blob            sqlite3_api->column_blob
    +#define sqlite3_column_bytes           sqlite3_api->column_bytes
    +#define sqlite3_column_bytes16         sqlite3_api->column_bytes16
    +#define sqlite3_column_count           sqlite3_api->column_count
    +#define sqlite3_column_database_name   sqlite3_api->column_database_name
    +#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
    +#define sqlite3_column_decltype        sqlite3_api->column_decltype
    +#define sqlite3_column_decltype16      sqlite3_api->column_decltype16
    +#define sqlite3_column_double          sqlite3_api->column_double
    +#define sqlite3_column_int             sqlite3_api->column_int
    +#define sqlite3_column_int64           sqlite3_api->column_int64
    +#define sqlite3_column_name            sqlite3_api->column_name
    +#define sqlite3_column_name16          sqlite3_api->column_name16
    +#define sqlite3_column_origin_name     sqlite3_api->column_origin_name
    +#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16
    +#define sqlite3_column_table_name      sqlite3_api->column_table_name
    +#define sqlite3_column_table_name16    sqlite3_api->column_table_name16
    +#define sqlite3_column_text            sqlite3_api->column_text
    +#define sqlite3_column_text16          sqlite3_api->column_text16
    +#define sqlite3_column_type            sqlite3_api->column_type
    +#define sqlite3_column_value           sqlite3_api->column_value
    +#define sqlite3_commit_hook            sqlite3_api->commit_hook
    +#define sqlite3_complete               sqlite3_api->complete
    +#define sqlite3_complete16             sqlite3_api->complete16
    +#define sqlite3_create_collation       sqlite3_api->create_collation
    +#define sqlite3_create_collation16     sqlite3_api->create_collation16
    +#define sqlite3_create_function        sqlite3_api->create_function
    +#define sqlite3_create_function16      sqlite3_api->create_function16
    +#define sqlite3_create_module          sqlite3_api->create_module
    +#define sqlite3_create_module_v2       sqlite3_api->create_module_v2
    +#define sqlite3_data_count             sqlite3_api->data_count
    +#define sqlite3_db_handle              sqlite3_api->db_handle
    +#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
    +#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
    +#define sqlite3_errcode                sqlite3_api->errcode
    +#define sqlite3_errmsg                 sqlite3_api->errmsg
    +#define sqlite3_errmsg16               sqlite3_api->errmsg16
    +#define sqlite3_exec                   sqlite3_api->exec
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_expired                sqlite3_api->expired
    +#endif
    +#define sqlite3_finalize               sqlite3_api->finalize
    +#define sqlite3_free                   sqlite3_api->free
    +#define sqlite3_free_table             sqlite3_api->free_table
    +#define sqlite3_get_autocommit         sqlite3_api->get_autocommit
    +#define sqlite3_get_auxdata            sqlite3_api->get_auxdata
    +#define sqlite3_get_table              sqlite3_api->get_table
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_global_recover         sqlite3_api->global_recover
    +#endif
    +#define sqlite3_interrupt              sqlite3_api->interruptx
    +#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid
    +#define sqlite3_libversion             sqlite3_api->libversion
    +#define sqlite3_libversion_number      sqlite3_api->libversion_number
    +#define sqlite3_malloc                 sqlite3_api->malloc
    +#define sqlite3_mprintf                sqlite3_api->mprintf
    +#define sqlite3_open                   sqlite3_api->open
    +#define sqlite3_open16                 sqlite3_api->open16
    +#define sqlite3_prepare                sqlite3_api->prepare
    +#define sqlite3_prepare16              sqlite3_api->prepare16
    +#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
    +#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
    +#define sqlite3_profile                sqlite3_api->profile
    +#define sqlite3_progress_handler       sqlite3_api->progress_handler
    +#define sqlite3_realloc                sqlite3_api->realloc
    +#define sqlite3_reset                  sqlite3_api->reset
    +#define sqlite3_result_blob            sqlite3_api->result_blob
    +#define sqlite3_result_double          sqlite3_api->result_double
    +#define sqlite3_result_error           sqlite3_api->result_error
    +#define sqlite3_result_error16         sqlite3_api->result_error16
    +#define sqlite3_result_int             sqlite3_api->result_int
    +#define sqlite3_result_int64           sqlite3_api->result_int64
    +#define sqlite3_result_null            sqlite3_api->result_null
    +#define sqlite3_result_text            sqlite3_api->result_text
    +#define sqlite3_result_text16          sqlite3_api->result_text16
    +#define sqlite3_result_text16be        sqlite3_api->result_text16be
    +#define sqlite3_result_text16le        sqlite3_api->result_text16le
    +#define sqlite3_result_value           sqlite3_api->result_value
    +#define sqlite3_rollback_hook          sqlite3_api->rollback_hook
    +#define sqlite3_set_authorizer         sqlite3_api->set_authorizer
    +#define sqlite3_set_auxdata            sqlite3_api->set_auxdata
    +#define sqlite3_snprintf               sqlite3_api->snprintf
    +#define sqlite3_step                   sqlite3_api->step
    +#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata
    +#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup
    +#define sqlite3_total_changes          sqlite3_api->total_changes
    +#define sqlite3_trace                  sqlite3_api->trace
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings
    +#endif
    +#define sqlite3_update_hook            sqlite3_api->update_hook
    +#define sqlite3_user_data              sqlite3_api->user_data
    +#define sqlite3_value_blob             sqlite3_api->value_blob
    +#define sqlite3_value_bytes            sqlite3_api->value_bytes
    +#define sqlite3_value_bytes16          sqlite3_api->value_bytes16
    +#define sqlite3_value_double           sqlite3_api->value_double
    +#define sqlite3_value_int              sqlite3_api->value_int
    +#define sqlite3_value_int64            sqlite3_api->value_int64
    +#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type
    +#define sqlite3_value_text             sqlite3_api->value_text
    +#define sqlite3_value_text16           sqlite3_api->value_text16
    +#define sqlite3_value_text16be         sqlite3_api->value_text16be
    +#define sqlite3_value_text16le         sqlite3_api->value_text16le
    +#define sqlite3_value_type             sqlite3_api->value_type
    +#define sqlite3_vmprintf               sqlite3_api->vmprintf
    +#define sqlite3_overload_function      sqlite3_api->overload_function
    +#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
    +#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
    +#define sqlite3_clear_bindings         sqlite3_api->clear_bindings
    +#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob
    +#define sqlite3_blob_bytes             sqlite3_api->blob_bytes
    +#define sqlite3_blob_close             sqlite3_api->blob_close
    +#define sqlite3_blob_open              sqlite3_api->blob_open
    +#define sqlite3_blob_read              sqlite3_api->blob_read
    +#define sqlite3_blob_write             sqlite3_api->blob_write
    +#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2
    +#define sqlite3_file_control           sqlite3_api->file_control
    +#define sqlite3_memory_highwater       sqlite3_api->memory_highwater
    +#define sqlite3_memory_used            sqlite3_api->memory_used
    +#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc
    +#define sqlite3_mutex_enter            sqlite3_api->mutex_enter
    +#define sqlite3_mutex_free             sqlite3_api->mutex_free
    +#define sqlite3_mutex_leave            sqlite3_api->mutex_leave
    +#define sqlite3_mutex_try              sqlite3_api->mutex_try
    +#define sqlite3_open_v2                sqlite3_api->open_v2
    +#define sqlite3_release_memory         sqlite3_api->release_memory
    +#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
    +#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
    +#define sqlite3_sleep                  sqlite3_api->sleep
    +#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
    +#define sqlite3_vfs_find               sqlite3_api->vfs_find
    +#define sqlite3_vfs_register           sqlite3_api->vfs_register
    +#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
    +#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
    +#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
    +#define sqlite3_result_error_code      sqlite3_api->result_error_code
    +#define sqlite3_test_control           sqlite3_api->test_control
    +#define sqlite3_randomness             sqlite3_api->randomness
    +#define sqlite3_context_db_handle      sqlite3_api->context_db_handle
    +#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes
    +#define sqlite3_limit                  sqlite3_api->limit
    +#define sqlite3_next_stmt              sqlite3_api->next_stmt
    +#define sqlite3_sql                    sqlite3_api->sql
    +#define sqlite3_status                 sqlite3_api->status
    +#endif /* SQLITE_CORE */
    +
    +#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;
    +#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;
    +
    +#endif /* _SQLITE3EXT_H_ */
    +
    +/************** End of sqlite3ext.h ******************************************/
    +/************** Continuing where we left off in loadext.c ********************/
    +
    +#ifndef SQLITE_OMIT_LOAD_EXTENSION
    +
    +/*
    +** Some API routines are omitted when various features are
    +** excluded from a build of SQLite.  Substitute a NULL pointer
    +** for any missing APIs.
    +*/
    +#ifndef SQLITE_ENABLE_COLUMN_METADATA
    +# define sqlite3_column_database_name   0
    +# define sqlite3_column_database_name16 0
    +# define sqlite3_column_table_name      0
    +# define sqlite3_column_table_name16    0
    +# define sqlite3_column_origin_name     0
    +# define sqlite3_column_origin_name16   0
    +# define sqlite3_table_column_metadata  0
    +#endif
    +
    +#ifdef SQLITE_OMIT_AUTHORIZATION
    +# define sqlite3_set_authorizer         0
    +#endif
    +
    +#ifdef SQLITE_OMIT_UTF16
    +# define sqlite3_bind_text16            0
    +# define sqlite3_collation_needed16     0
    +# define sqlite3_column_decltype16      0
    +# define sqlite3_column_name16          0
    +# define sqlite3_column_text16          0
    +# define sqlite3_complete16             0
    +# define sqlite3_create_collation16     0
    +# define sqlite3_create_function16      0
    +# define sqlite3_errmsg16               0
    +# define sqlite3_open16                 0
    +# define sqlite3_prepare16              0
    +# define sqlite3_prepare16_v2           0
    +# define sqlite3_result_error16         0
    +# define sqlite3_result_text16          0
    +# define sqlite3_result_text16be        0
    +# define sqlite3_result_text16le        0
    +# define sqlite3_value_text16           0
    +# define sqlite3_value_text16be         0
    +# define sqlite3_value_text16le         0
    +# define sqlite3_column_database_name16 0
    +# define sqlite3_column_table_name16    0
    +# define sqlite3_column_origin_name16   0
    +#endif
    +
    +#ifdef SQLITE_OMIT_COMPLETE
    +# define sqlite3_complete 0
    +# define sqlite3_complete16 0
    +#endif
    +
    +#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
    +# define sqlite3_progress_handler 0
    +#endif
    +
    +#ifdef SQLITE_OMIT_VIRTUALTABLE
    +# define sqlite3_create_module 0
    +# define sqlite3_create_module_v2 0
    +# define sqlite3_declare_vtab 0
    +#endif
    +
    +#ifdef SQLITE_OMIT_SHARED_CACHE
    +# define sqlite3_enable_shared_cache 0
    +#endif
    +
    +#ifdef SQLITE_OMIT_TRACE
    +# define sqlite3_profile       0
    +# define sqlite3_trace         0
    +#endif
    +
    +#ifdef SQLITE_OMIT_GET_TABLE
    +# define sqlite3_free_table    0
    +# define sqlite3_get_table     0
    +#endif
    +
    +#ifdef SQLITE_OMIT_INCRBLOB
    +#define sqlite3_bind_zeroblob  0
    +#define sqlite3_blob_bytes     0
    +#define sqlite3_blob_close     0
    +#define sqlite3_blob_open      0
    +#define sqlite3_blob_read      0
    +#define sqlite3_blob_write     0
    +#endif
    +
    +/*
    +** The following structure contains pointers to all SQLite API routines.
    +** A pointer to this structure is passed into extensions when they are
    +** loaded so that the extension can make calls back into the SQLite
    +** library.
    +**
    +** When adding new APIs, add them to the bottom of this structure
    +** in order to preserve backwards compatibility.
    +**
    +** Extensions that use newer APIs should first call the
    +** sqlite3_libversion_number() to make sure that the API they
    +** intend to use is supported by the library.  Extensions should
    +** also check to make sure that the pointer to the function is
    +** not NULL before calling it.
    +*/
    +static const sqlite3_api_routines sqlite3Apis = {
    +  sqlite3_aggregate_context,
    +#ifndef SQLITE_OMIT_DEPRECATED
    +  sqlite3_aggregate_count,
    +#else
    +  0,
    +#endif
    +  sqlite3_bind_blob,
    +  sqlite3_bind_double,
    +  sqlite3_bind_int,
    +  sqlite3_bind_int64,
    +  sqlite3_bind_null,
    +  sqlite3_bind_parameter_count,
    +  sqlite3_bind_parameter_index,
    +  sqlite3_bind_parameter_name,
    +  sqlite3_bind_text,
    +  sqlite3_bind_text16,
    +  sqlite3_bind_value,
    +  sqlite3_busy_handler,
    +  sqlite3_busy_timeout,
    +  sqlite3_changes,
    +  sqlite3_close,
    +  sqlite3_collation_needed,
    +  sqlite3_collation_needed16,
    +  sqlite3_column_blob,
    +  sqlite3_column_bytes,
    +  sqlite3_column_bytes16,
    +  sqlite3_column_count,
    +  sqlite3_column_database_name,
    +  sqlite3_column_database_name16,
    +  sqlite3_column_decltype,
    +  sqlite3_column_decltype16,
    +  sqlite3_column_double,
    +  sqlite3_column_int,
    +  sqlite3_column_int64,
    +  sqlite3_column_name,
    +  sqlite3_column_name16,
    +  sqlite3_column_origin_name,
    +  sqlite3_column_origin_name16,
    +  sqlite3_column_table_name,
    +  sqlite3_column_table_name16,
    +  sqlite3_column_text,
    +  sqlite3_column_text16,
    +  sqlite3_column_type,
    +  sqlite3_column_value,
    +  sqlite3_commit_hook,
    +  sqlite3_complete,
    +  sqlite3_complete16,
    +  sqlite3_create_collation,
    +  sqlite3_create_collation16,
    +  sqlite3_create_function,
    +  sqlite3_create_function16,
    +  sqlite3_create_module,
    +  sqlite3_data_count,
    +  sqlite3_db_handle,
    +  sqlite3_declare_vtab,
    +  sqlite3_enable_shared_cache,
    +  sqlite3_errcode,
    +  sqlite3_errmsg,
    +  sqlite3_errmsg16,
    +  sqlite3_exec,
    +#ifndef SQLITE_OMIT_DEPRECATED
    +  sqlite3_expired,
    +#else
    +  0,
    +#endif
    +  sqlite3_finalize,
    +  sqlite3_free,
    +  sqlite3_free_table,
    +  sqlite3_get_autocommit,
    +  sqlite3_get_auxdata,
    +  sqlite3_get_table,
    +  0,     /* Was sqlite3_global_recover(), but that function is deprecated */
    +  sqlite3_interrupt,
    +  sqlite3_last_insert_rowid,
    +  sqlite3_libversion,
    +  sqlite3_libversion_number,
    +  sqlite3_malloc,
    +  sqlite3_mprintf,
    +  sqlite3_open,
    +  sqlite3_open16,
    +  sqlite3_prepare,
    +  sqlite3_prepare16,
    +  sqlite3_profile,
    +  sqlite3_progress_handler,
    +  sqlite3_realloc,
    +  sqlite3_reset,
    +  sqlite3_result_blob,
    +  sqlite3_result_double,
    +  sqlite3_result_error,
    +  sqlite3_result_error16,
    +  sqlite3_result_int,
    +  sqlite3_result_int64,
    +  sqlite3_result_null,
    +  sqlite3_result_text,
    +  sqlite3_result_text16,
    +  sqlite3_result_text16be,
    +  sqlite3_result_text16le,
    +  sqlite3_result_value,
    +  sqlite3_rollback_hook,
    +  sqlite3_set_authorizer,
    +  sqlite3_set_auxdata,
    +  sqlite3_snprintf,
    +  sqlite3_step,
    +  sqlite3_table_column_metadata,
    +#ifndef SQLITE_OMIT_DEPRECATED
    +  sqlite3_thread_cleanup,
    +#else
    +  0,
    +#endif
    +  sqlite3_total_changes,
    +  sqlite3_trace,
    +#ifndef SQLITE_OMIT_DEPRECATED
    +  sqlite3_transfer_bindings,
    +#else
    +  0,
    +#endif
    +  sqlite3_update_hook,
    +  sqlite3_user_data,
    +  sqlite3_value_blob,
    +  sqlite3_value_bytes,
    +  sqlite3_value_bytes16,
    +  sqlite3_value_double,
    +  sqlite3_value_int,
    +  sqlite3_value_int64,
    +  sqlite3_value_numeric_type,
    +  sqlite3_value_text,
    +  sqlite3_value_text16,
    +  sqlite3_value_text16be,
    +  sqlite3_value_text16le,
    +  sqlite3_value_type,
    +  sqlite3_vmprintf,
    +  /*
    +  ** The original API set ends here.  All extensions can call any
    +  ** of the APIs above provided that the pointer is not NULL.  But
    +  ** before calling APIs that follow, extension should check the
    +  ** sqlite3_libversion_number() to make sure they are dealing with
    +  ** a library that is new enough to support that API.
    +  *************************************************************************
    +  */
    +  sqlite3_overload_function,
    +
    +  /*
    +  ** Added after 3.3.13
    +  */
    +  sqlite3_prepare_v2,
    +  sqlite3_prepare16_v2,
    +  sqlite3_clear_bindings,
    +
    +  /*
    +  ** Added for 3.4.1
    +  */
    +  sqlite3_create_module_v2,
    +
    +  /*
    +  ** Added for 3.5.0
    +  */
    +  sqlite3_bind_zeroblob,
    +  sqlite3_blob_bytes,
    +  sqlite3_blob_close,
    +  sqlite3_blob_open,
    +  sqlite3_blob_read,
    +  sqlite3_blob_write,
    +  sqlite3_create_collation_v2,
    +  sqlite3_file_control,
    +  sqlite3_memory_highwater,
    +  sqlite3_memory_used,
    +#ifdef SQLITE_MUTEX_OMIT
    +  0, 
    +  0, 
    +  0,
    +  0,
    +  0,
    +#else
    +  sqlite3_mutex_alloc,
    +  sqlite3_mutex_enter,
    +  sqlite3_mutex_free,
    +  sqlite3_mutex_leave,
    +  sqlite3_mutex_try,
    +#endif
    +  sqlite3_open_v2,
    +  sqlite3_release_memory,
    +  sqlite3_result_error_nomem,
    +  sqlite3_result_error_toobig,
    +  sqlite3_sleep,
    +  sqlite3_soft_heap_limit,
    +  sqlite3_vfs_find,
    +  sqlite3_vfs_register,
    +  sqlite3_vfs_unregister,
    +
    +  /*
    +  ** Added for 3.5.8
    +  */
    +  sqlite3_threadsafe,
    +  sqlite3_result_zeroblob,
    +  sqlite3_result_error_code,
    +  sqlite3_test_control,
    +  sqlite3_randomness,
    +  sqlite3_context_db_handle,
    +
    +  /*
    +  ** Added for 3.6.0
    +  */
    +  sqlite3_extended_result_codes,
    +  sqlite3_limit,
    +  sqlite3_next_stmt,
    +  sqlite3_sql,
    +  sqlite3_status,
    +};
    +
    +/*
    +** Attempt to load an SQLite extension library contained in the file
    +** zFile.  The entry point is zProc.  zProc may be 0 in which case a
    +** default entry point name (sqlite3_extension_init) is used.  Use
    +** of the default name is recommended.
    +**
    +** Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.
    +**
    +** If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with 
    +** error message text.  The calling function should free this memory
    +** by calling sqlite3DbFree(db, ).
    +*/
    +static int sqlite3LoadExtension(
    +  sqlite3 *db,          /* Load the extension into this database connection */
    +  const char *zFile,    /* Name of the shared library containing extension */
    +  const char *zProc,    /* Entry point.  Use "sqlite3_extension_init" if 0 */
    +  char **pzErrMsg       /* Put error message here if not 0 */
    +){
    +  sqlite3_vfs *pVfs = db->pVfs;
    +  void *handle;
    +  int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
    +  char *zErrmsg = 0;
    +  void **aHandle;
    +  const int nMsg = 300;
    +
    +  if( pzErrMsg ) *pzErrMsg = 0;
    +
    +  /* Ticket #1863.  To avoid a creating security problems for older
    +  ** applications that relink against newer versions of SQLite, the
    +  ** ability to run load_extension is turned off by default.  One
    +  ** must call sqlite3_enable_load_extension() to turn on extension
    +  ** loading.  Otherwise you get the following error.
    +  */
    +  if( (db->flags & SQLITE_LoadExtension)==0 ){
    +    if( pzErrMsg ){
    +      *pzErrMsg = sqlite3_mprintf("not authorized");
    +    }
    +    return SQLITE_ERROR;
    +  }
    +
    +  if( zProc==0 ){
    +    zProc = "sqlite3_extension_init";
    +  }
    +
    +  handle = sqlite3OsDlOpen(pVfs, zFile);
    +  if( handle==0 ){
    +    if( pzErrMsg ){
    +      zErrmsg = sqlite3StackAllocZero(db, nMsg);
    +      if( zErrmsg ){
    +        sqlite3_snprintf(nMsg, zErrmsg, 
    +            "unable to open shared library [%s]", zFile);
    +        sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);
    +        *pzErrMsg = sqlite3DbStrDup(0, zErrmsg);
    +        sqlite3StackFree(db, zErrmsg);
    +      }
    +    }
    +    return SQLITE_ERROR;
    +  }
    +  xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
    +                   sqlite3OsDlSym(pVfs, handle, zProc);
    +  if( xInit==0 ){
    +    if( pzErrMsg ){
    +      zErrmsg = sqlite3StackAllocZero(db, nMsg);
    +      if( zErrmsg ){
    +        sqlite3_snprintf(nMsg, zErrmsg,
    +            "no entry point [%s] in shared library [%s]", zProc,zFile);
    +        sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);
    +        *pzErrMsg = sqlite3DbStrDup(0, zErrmsg);
    +        sqlite3StackFree(db, zErrmsg);
    +      }
    +      sqlite3OsDlClose(pVfs, handle);
    +    }
    +    return SQLITE_ERROR;
    +  }else if( xInit(db, &zErrmsg, &sqlite3Apis) ){
    +    if( pzErrMsg ){
    +      *pzErrMsg = sqlite3_mprintf("error during initialization: %s", zErrmsg);
    +    }
    +    sqlite3_free(zErrmsg);
    +    sqlite3OsDlClose(pVfs, handle);
    +    return SQLITE_ERROR;
    +  }
    +
    +  /* Append the new shared library handle to the db->aExtension array. */
    +  aHandle = sqlite3DbMallocZero(db, sizeof(handle)*(db->nExtension+1));
    +  if( aHandle==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  if( db->nExtension>0 ){
    +    memcpy(aHandle, db->aExtension, sizeof(handle)*db->nExtension);
    +  }
    +  sqlite3DbFree(db, db->aExtension);
    +  db->aExtension = aHandle;
    +
    +  db->aExtension[db->nExtension++] = handle;
    +  return SQLITE_OK;
    +}
    +SQLITE_API int sqlite3_load_extension(
    +  sqlite3 *db,          /* Load the extension into this database connection */
    +  const char *zFile,    /* Name of the shared library containing extension */
    +  const char *zProc,    /* Entry point.  Use "sqlite3_extension_init" if 0 */
    +  char **pzErrMsg       /* Put error message here if not 0 */
    +){
    +  int rc;
    +  sqlite3_mutex_enter(db->mutex);
    +  rc = sqlite3LoadExtension(db, zFile, zProc, pzErrMsg);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Call this routine when the database connection is closing in order
    +** to clean up loaded extensions
    +*/
    +SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
    +  int i;
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  for(i=0; i<db->nExtension; i++){
    +    sqlite3OsDlClose(db->pVfs, db->aExtension[i]);
    +  }
    +  sqlite3DbFree(db, db->aExtension);
    +}
    +
    +/*
    +** Enable or disable extension loading.  Extension loading is disabled by
    +** default so as not to open security holes in older applications.
    +*/
    +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
    +  sqlite3_mutex_enter(db->mutex);
    +  if( onoff ){
    +    db->flags |= SQLITE_LoadExtension;
    +  }else{
    +    db->flags &= ~SQLITE_LoadExtension;
    +  }
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +#endif /* SQLITE_OMIT_LOAD_EXTENSION */
    +
    +/*
    +** The auto-extension code added regardless of whether or not extension
    +** loading is supported.  We need a dummy sqlite3Apis pointer for that
    +** code if regular extension loading is not available.  This is that
    +** dummy pointer.
    +*/
    +#ifdef SQLITE_OMIT_LOAD_EXTENSION
    +static const sqlite3_api_routines sqlite3Apis = { 0 };
    +#endif
    +
    +
    +/*
    +** The following object holds the list of automatically loaded
    +** extensions.
    +**
    +** This list is shared across threads.  The SQLITE_MUTEX_STATIC_MASTER
    +** mutex must be held while accessing this list.
    +*/
    +typedef struct sqlite3AutoExtList sqlite3AutoExtList;
    +static SQLITE_WSD struct sqlite3AutoExtList {
    +  int nExt;              /* Number of entries in aExt[] */          
    +  void (**aExt)(void);   /* Pointers to the extension init functions */
    +} sqlite3Autoext = { 0, 0 };
    +
    +/* The "wsdAutoext" macro will resolve to the autoextension
    +** state vector.  If writable static data is unsupported on the target,
    +** we have to locate the state vector at run-time.  In the more common
    +** case where writable static data is supported, wsdStat can refer directly
    +** to the "sqlite3Autoext" state vector declared above.
    +*/
    +#ifdef SQLITE_OMIT_WSD
    +# define wsdAutoextInit \
    +  sqlite3AutoExtList *x = &GLOBAL(sqlite3AutoExtList,sqlite3Autoext)
    +# define wsdAutoext x[0]
    +#else
    +# define wsdAutoextInit
    +# define wsdAutoext sqlite3Autoext
    +#endif
    +
    +
    +/*
    +** Register a statically linked extension that is automatically
    +** loaded by every new database connection.
    +*/
    +SQLITE_API int sqlite3_auto_extension(void (*xInit)(void)){
    +  int rc = SQLITE_OK;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  rc = sqlite3_initialize();
    +  if( rc ){
    +    return rc;
    +  }else
    +#endif
    +  {
    +    int i;
    +#if SQLITE_THREADSAFE
    +    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +#endif
    +    wsdAutoextInit;
    +    sqlite3_mutex_enter(mutex);
    +    for(i=0; i<wsdAutoext.nExt; i++){
    +      if( wsdAutoext.aExt[i]==xInit ) break;
    +    }
    +    if( i==wsdAutoext.nExt ){
    +      int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
    +      void (**aNew)(void);
    +      aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);
    +      if( aNew==0 ){
    +        rc = SQLITE_NOMEM;
    +      }else{
    +        wsdAutoext.aExt = aNew;
    +        wsdAutoext.aExt[wsdAutoext.nExt] = xInit;
    +        wsdAutoext.nExt++;
    +      }
    +    }
    +    sqlite3_mutex_leave(mutex);
    +    assert( (rc&0xff)==rc );
    +    return rc;
    +  }
    +}
    +
    +/*
    +** Reset the automatic extension loading mechanism.
    +*/
    +SQLITE_API void sqlite3_reset_auto_extension(void){
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  if( sqlite3_initialize()==SQLITE_OK )
    +#endif
    +  {
    +#if SQLITE_THREADSAFE
    +    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +#endif
    +    wsdAutoextInit;
    +    sqlite3_mutex_enter(mutex);
    +    sqlite3_free(wsdAutoext.aExt);
    +    wsdAutoext.aExt = 0;
    +    wsdAutoext.nExt = 0;
    +    sqlite3_mutex_leave(mutex);
    +  }
    +}
    +
    +/*
    +** Load all automatic extensions.
    +**
    +** If anything goes wrong, set an error in the database connection.
    +*/
    +SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
    +  int i;
    +  int go = 1;
    +  int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
    +
    +  wsdAutoextInit;
    +  if( wsdAutoext.nExt==0 ){
    +    /* Common case: early out without every having to acquire a mutex */
    +    return;
    +  }
    +  for(i=0; go; i++){
    +    char *zErrmsg;
    +#if SQLITE_THREADSAFE
    +    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +#endif
    +    sqlite3_mutex_enter(mutex);
    +    if( i>=wsdAutoext.nExt ){
    +      xInit = 0;
    +      go = 0;
    +    }else{
    +      xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
    +              wsdAutoext.aExt[i];
    +    }
    +    sqlite3_mutex_leave(mutex);
    +    zErrmsg = 0;
    +    if( xInit && xInit(db, &zErrmsg, &sqlite3Apis) ){
    +      sqlite3Error(db, SQLITE_ERROR,
    +            "automatic extension loading failed: %s", zErrmsg);
    +      go = 0;
    +    }
    +    sqlite3_free(zErrmsg);
    +  }
    +}
    +
    +/************** End of loadext.c *********************************************/
    +/************** Begin file pragma.c ******************************************/
    +/*
    +** 2003 April 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to implement the PRAGMA command.
    +**
    +** $Id: pragma.c,v 1.214 2009/07/02 07:47:33 danielk1977 Exp $
    +*/
    +
    +/* Ignore this whole file if pragmas are disabled
    +*/
    +#if !defined(SQLITE_OMIT_PRAGMA)
    +
    +/*
    +** Interpret the given string as a safety level.  Return 0 for OFF,
    +** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
    +** unrecognized string argument.
    +**
    +** Note that the values returned are one less that the values that
    +** should be passed into sqlite3BtreeSetSafetyLevel().  The is done
    +** to support legacy SQL code.  The safety level used to be boolean
    +** and older scripts may have used numbers 0 for OFF and 1 for ON.
    +*/
    +static u8 getSafetyLevel(const char *z){
    +                             /* 123456789 123456789 */
    +  static const char zText[] = "onoffalseyestruefull";
    +  static const u8 iOffset[] = {0, 1, 2, 4, 9, 12, 16};
    +  static const u8 iLength[] = {2, 2, 3, 5, 3, 4, 4};
    +  static const u8 iValue[] =  {1, 0, 0, 0, 1, 1, 2};
    +  int i, n;
    +  if( sqlite3Isdigit(*z) ){
    +    return (u8)atoi(z);
    +  }
    +  n = sqlite3Strlen30(z);
    +  for(i=0; i<ArraySize(iLength); i++){
    +    if( iLength[i]==n && sqlite3StrNICmp(&zText[iOffset[i]],z,n)==0 ){
    +      return iValue[i];
    +    }
    +  }
    +  return 1;
    +}
    +
    +/*
    +** Interpret the given string as a boolean value.
    +*/
    +static u8 getBoolean(const char *z){
    +  return getSafetyLevel(z)&1;
    +}
    +
    +/*
    +** Interpret the given string as a locking mode value.
    +*/
    +static int getLockingMode(const char *z){
    +  if( z ){
    +    if( 0==sqlite3StrICmp(z, "exclusive") ) return PAGER_LOCKINGMODE_EXCLUSIVE;
    +    if( 0==sqlite3StrICmp(z, "normal") ) return PAGER_LOCKINGMODE_NORMAL;
    +  }
    +  return PAGER_LOCKINGMODE_QUERY;
    +}
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +/*
    +** Interpret the given string as an auto-vacuum mode value.
    +**
    +** The following strings, "none", "full" and "incremental" are 
    +** acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.
    +*/
    +static int getAutoVacuum(const char *z){
    +  int i;
    +  if( 0==sqlite3StrICmp(z, "none") ) return BTREE_AUTOVACUUM_NONE;
    +  if( 0==sqlite3StrICmp(z, "full") ) return BTREE_AUTOVACUUM_FULL;
    +  if( 0==sqlite3StrICmp(z, "incremental") ) return BTREE_AUTOVACUUM_INCR;
    +  i = atoi(z);
    +  return (u8)((i>=0&&i<=2)?i:0);
    +}
    +#endif /* ifndef SQLITE_OMIT_AUTOVACUUM */
    +
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +/*
    +** Interpret the given string as a temp db location. Return 1 for file
    +** backed temporary databases, 2 for the Red-Black tree in memory database
    +** and 0 to use the compile-time default.
    +*/
    +static int getTempStore(const char *z){
    +  if( z[0]>='0' && z[0]<='2' ){
    +    return z[0] - '0';
    +  }else if( sqlite3StrICmp(z, "file")==0 ){
    +    return 1;
    +  }else if( sqlite3StrICmp(z, "memory")==0 ){
    +    return 2;
    +  }else{
    +    return 0;
    +  }
    +}
    +#endif /* SQLITE_PAGER_PRAGMAS */
    +
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +/*
    +** Invalidate temp storage, either when the temp storage is changed
    +** from default, or when 'file' and the temp_store_directory has changed
    +*/
    +static int invalidateTempStorage(Parse *pParse){
    +  sqlite3 *db = pParse->db;
    +  if( db->aDb[1].pBt!=0 ){
    +    if( !db->autoCommit || sqlite3BtreeIsInReadTrans(db->aDb[1].pBt) ){
    +      sqlite3ErrorMsg(pParse, "temporary storage cannot be changed "
    +        "from within a transaction");
    +      return SQLITE_ERROR;
    +    }
    +    sqlite3BtreeClose(db->aDb[1].pBt);
    +    db->aDb[1].pBt = 0;
    +    sqlite3ResetInternalSchema(db, 0);
    +  }
    +  return SQLITE_OK;
    +}
    +#endif /* SQLITE_PAGER_PRAGMAS */
    +
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +/*
    +** If the TEMP database is open, close it and mark the database schema
    +** as needing reloading.  This must be done when using the SQLITE_TEMP_STORE
    +** or DEFAULT_TEMP_STORE pragmas.
    +*/
    +static int changeTempStorage(Parse *pParse, const char *zStorageType){
    +  int ts = getTempStore(zStorageType);
    +  sqlite3 *db = pParse->db;
    +  if( db->temp_store==ts ) return SQLITE_OK;
    +  if( invalidateTempStorage( pParse ) != SQLITE_OK ){
    +    return SQLITE_ERROR;
    +  }
    +  db->temp_store = (u8)ts;
    +  return SQLITE_OK;
    +}
    +#endif /* SQLITE_PAGER_PRAGMAS */
    +
    +/*
    +** Generate code to return a single integer value.
    +*/
    +static void returnSingleInt(Parse *pParse, const char *zLabel, i64 value){
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  int mem = ++pParse->nMem;
    +  i64 *pI64 = sqlite3DbMallocRaw(pParse->db, sizeof(value));
    +  if( pI64 ){
    +    memcpy(pI64, &value, sizeof(value));
    +  }
    +  sqlite3VdbeAddOp4(v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64);
    +  sqlite3VdbeSetNumCols(v, 1);
    +  sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLabel, SQLITE_STATIC);
    +  sqlite3VdbeAddOp2(v, OP_ResultRow, mem, 1);
    +}
    +
    +#ifndef SQLITE_OMIT_FLAG_PRAGMAS
    +/*
    +** Check to see if zRight and zLeft refer to a pragma that queries
    +** or changes one of the flags in db->flags.  Return 1 if so and 0 if not.
    +** Also, implement the pragma.
    +*/
    +static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
    +  static const struct sPragmaType {
    +    const char *zName;  /* Name of the pragma */
    +    int mask;           /* Mask for the db->flags value */
    +  } aPragma[] = {
    +    { "full_column_names",        SQLITE_FullColNames  },
    +    { "short_column_names",       SQLITE_ShortColNames },
    +    { "count_changes",            SQLITE_CountRows     },
    +    { "empty_result_callbacks",   SQLITE_NullCallback  },
    +    { "legacy_file_format",       SQLITE_LegacyFileFmt },
    +    { "fullfsync",                SQLITE_FullFSync     },
    +    { "reverse_unordered_selects", SQLITE_ReverseOrder  },
    +#ifdef SQLITE_DEBUG
    +    { "sql_trace",                SQLITE_SqlTrace      },
    +    { "vdbe_listing",             SQLITE_VdbeListing   },
    +    { "vdbe_trace",               SQLITE_VdbeTrace     },
    +#endif
    +#ifndef SQLITE_OMIT_CHECK
    +    { "ignore_check_constraints", SQLITE_IgnoreChecks  },
    +#endif
    +    /* The following is VERY experimental */
    +    { "writable_schema",          SQLITE_WriteSchema|SQLITE_RecoveryMode },
    +    { "omit_readlock",            SQLITE_NoReadlock    },
    +
    +    /* TODO: Maybe it shouldn't be possible to change the ReadUncommitted
    +    ** flag if there are any active statements. */
    +    { "read_uncommitted",         SQLITE_ReadUncommitted },
    +    { "recursive_triggers",       SQLITE_RecTriggers },
    +
    +    /* This flag may only be set if both foreign-key and trigger support
    +    ** are present in the build.  */
    +#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
    +    { "foreign_keys",             SQLITE_ForeignKeys },
    +#endif
    +  };
    +  int i;
    +  const struct sPragmaType *p;
    +  for(i=0, p=aPragma; i<ArraySize(aPragma); i++, p++){
    +    if( sqlite3StrICmp(zLeft, p->zName)==0 ){
    +      sqlite3 *db = pParse->db;
    +      Vdbe *v;
    +      v = sqlite3GetVdbe(pParse);
    +      assert( v!=0 );  /* Already allocated by sqlite3Pragma() */
    +      if( ALWAYS(v) ){
    +        if( zRight==0 ){
    +          returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
    +        }else{
    +          int mask = p->mask;          /* Mask of bits to set or clear. */
    +          if( db->autoCommit==0 ){
    +            /* Foreign key support may not be enabled or disabled while not
    +            ** in auto-commit mode.  */
    +            mask &= ~(SQLITE_ForeignKeys);
    +          }
    +
    +          if( getBoolean(zRight) ){
    +            db->flags |= mask;
    +          }else{
    +            db->flags &= ~mask;
    +          }
    +
    +          /* Many of the flag-pragmas modify the code generated by the SQL 
    +          ** compiler (eg. count_changes). So add an opcode to expire all
    +          ** compiled SQL statements after modifying a pragma value.
    +          */
    +          sqlite3VdbeAddOp2(v, OP_Expire, 0, 0);
    +        }
    +      }
    +
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +#endif /* SQLITE_OMIT_FLAG_PRAGMAS */
    +
    +/*
    +** Return a human-readable name for a constraint resolution action.
    +*/
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +static const char *actionName(u8 action){
    +  const char *zName;
    +  switch( action ){
    +    case OE_SetNull:  zName = "SET NULL";        break;
    +    case OE_SetDflt:  zName = "SET DEFAULT";     break;
    +    case OE_Cascade:  zName = "CASCADE";         break;
    +    case OE_Restrict: zName = "RESTRICT";        break;
    +    default:          zName = "NO ACTION";  
    +                      assert( action==OE_None ); break;
    +  }
    +  return zName;
    +}
    +#endif
    +
    +/*
    +** Process a pragma statement.  
    +**
    +** Pragmas are of this form:
    +**
    +**      PRAGMA [database.]id [= value]
    +**
    +** The identifier might also be a string.  The value is a string, and
    +** identifier, or a number.  If minusFlag is true, then the value is
    +** a number that was preceded by a minus sign.
    +**
    +** If the left side is "database.id" then pId1 is the database name
    +** and pId2 is the id.  If the left side is just "id" then pId1 is the
    +** id and pId2 is any empty string.
    +*/
    +SQLITE_PRIVATE void sqlite3Pragma(
    +  Parse *pParse, 
    +  Token *pId1,        /* First part of [database.]id field */
    +  Token *pId2,        /* Second part of [database.]id field, or NULL */
    +  Token *pValue,      /* Token for <value>, or NULL */
    +  int minusFlag       /* True if a '-' sign preceded <value> */
    +){
    +  char *zLeft = 0;       /* Nul-terminated UTF-8 string <id> */
    +  char *zRight = 0;      /* Nul-terminated UTF-8 string <value>, or NULL */
    +  const char *zDb = 0;   /* The database name */
    +  Token *pId;            /* Pointer to <id> token */
    +  int iDb;               /* Database index for <database> */
    +  sqlite3 *db = pParse->db;
    +  Db *pDb;
    +  Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db);
    +  if( v==0 ) return;
    +  pParse->nMem = 2;
    +
    +  /* Interpret the [database.] part of the pragma statement. iDb is the
    +  ** index of the database this pragma is being applied to in db.aDb[]. */
    +  iDb = sqlite3TwoPartName(pParse, pId1, pId2, &pId);
    +  if( iDb<0 ) return;
    +  pDb = &db->aDb[iDb];
    +
    +  /* If the temp database has been explicitly named as part of the 
    +  ** pragma, make sure it is open. 
    +  */
    +  if( iDb==1 && sqlite3OpenTempDatabase(pParse) ){
    +    return;
    +  }
    +
    +  zLeft = sqlite3NameFromToken(db, pId);
    +  if( !zLeft ) return;
    +  if( minusFlag ){
    +    zRight = sqlite3MPrintf(db, "-%T", pValue);
    +  }else{
    +    zRight = sqlite3NameFromToken(db, pValue);
    +  }
    +
    +  assert( pId2 );
    +  zDb = pId2->n>0 ? pDb->zName : 0;
    +  if( sqlite3AuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) ){
    +    goto pragma_out;
    +  }
    + 
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +  /*
    +  **  PRAGMA [database.]default_cache_size
    +  **  PRAGMA [database.]default_cache_size=N
    +  **
    +  ** The first form reports the current persistent setting for the
    +  ** page cache size.  The value returned is the maximum number of
    +  ** pages in the page cache.  The second form sets both the current
    +  ** page cache size value and the persistent page cache size value
    +  ** stored in the database file.
    +  **
    +  ** The default cache size is stored in meta-value 2 of page 1 of the
    +  ** database file.  The cache size is actually the absolute value of
    +  ** this memory location.  The sign of meta-value 2 determines the
    +  ** synchronous setting.  A negative value means synchronous is off
    +  ** and a positive value means synchronous is on.
    +  */
    +  if( sqlite3StrICmp(zLeft,"default_cache_size")==0 ){
    +    static const VdbeOpList getCacheSize[] = {
    +      { OP_Transaction, 0, 0,        0},                         /* 0 */
    +      { OP_ReadCookie,  0, 1,        BTREE_DEFAULT_CACHE_SIZE},  /* 1 */
    +      { OP_IfPos,       1, 7,        0},
    +      { OP_Integer,     0, 2,        0},
    +      { OP_Subtract,    1, 2,        1},
    +      { OP_IfPos,       1, 7,        0},
    +      { OP_Integer,     0, 1,        0},                         /* 6 */
    +      { OP_ResultRow,   1, 1,        0},
    +    };
    +    int addr;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    sqlite3VdbeUsesBtree(v, iDb);
    +    if( !zRight ){
    +      sqlite3VdbeSetNumCols(v, 1);
    +      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cache_size", SQLITE_STATIC);
    +      pParse->nMem += 2;
    +      addr = sqlite3VdbeAddOpList(v, ArraySize(getCacheSize), getCacheSize);
    +      sqlite3VdbeChangeP1(v, addr, iDb);
    +      sqlite3VdbeChangeP1(v, addr+1, iDb);
    +      sqlite3VdbeChangeP1(v, addr+6, SQLITE_DEFAULT_CACHE_SIZE);
    +    }else{
    +      int size = atoi(zRight);
    +      if( size<0 ) size = -size;
    +      sqlite3BeginWriteOperation(pParse, 0, iDb);
    +      sqlite3VdbeAddOp2(v, OP_Integer, size, 1);
    +      sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, 2, BTREE_DEFAULT_CACHE_SIZE);
    +      addr = sqlite3VdbeAddOp2(v, OP_IfPos, 2, 0);
    +      sqlite3VdbeAddOp2(v, OP_Integer, -size, 1);
    +      sqlite3VdbeJumpHere(v, addr);
    +      sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, 1);
    +      pDb->pSchema->cache_size = size;
    +      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
    +    }
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]page_size
    +  **  PRAGMA [database.]page_size=N
    +  **
    +  ** The first form reports the current setting for the
    +  ** database page size in bytes.  The second form sets the
    +  ** database page size value.  The value can only be set if
    +  ** the database has not yet been created.
    +  */
    +  if( sqlite3StrICmp(zLeft,"page_size")==0 ){
    +    Btree *pBt = pDb->pBt;
    +    assert( pBt!=0 );
    +    if( !zRight ){
    +      int size = ALWAYS(pBt) ? sqlite3BtreeGetPageSize(pBt) : 0;
    +      returnSingleInt(pParse, "page_size", size);
    +    }else{
    +      /* Malloc may fail when setting the page-size, as there is an internal
    +      ** buffer that the pager module resizes using sqlite3_realloc().
    +      */
    +      db->nextPagesize = atoi(zRight);
    +      if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, -1, 0) ){
    +        db->mallocFailed = 1;
    +      }
    +    }
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]max_page_count
    +  **  PRAGMA [database.]max_page_count=N
    +  **
    +  ** The first form reports the current setting for the
    +  ** maximum number of pages in the database file.  The 
    +  ** second form attempts to change this setting.  Both
    +  ** forms return the current setting.
    +  */
    +  if( sqlite3StrICmp(zLeft,"max_page_count")==0 ){
    +    Btree *pBt = pDb->pBt;
    +    int newMax = 0;
    +    assert( pBt!=0 );
    +    if( zRight ){
    +      newMax = atoi(zRight);
    +    }
    +    if( ALWAYS(pBt) ){
    +      newMax = sqlite3BtreeMaxPageCount(pBt, newMax);
    +    }
    +    returnSingleInt(pParse, "max_page_count", newMax);
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]page_count
    +  **
    +  ** Return the number of pages in the specified database.
    +  */
    +  if( sqlite3StrICmp(zLeft,"page_count")==0 ){
    +    int iReg;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    sqlite3CodeVerifySchema(pParse, iDb);
    +    iReg = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Pagecount, iDb, iReg);
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, iReg, 1);
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "page_count", SQLITE_STATIC);
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]locking_mode
    +  **  PRAGMA [database.]locking_mode = (normal|exclusive)
    +  */
    +  if( sqlite3StrICmp(zLeft,"locking_mode")==0 ){
    +    const char *zRet = "normal";
    +    int eMode = getLockingMode(zRight);
    +
    +    if( pId2->n==0 && eMode==PAGER_LOCKINGMODE_QUERY ){
    +      /* Simple "PRAGMA locking_mode;" statement. This is a query for
    +      ** the current default locking mode (which may be different to
    +      ** the locking-mode of the main database).
    +      */
    +      eMode = db->dfltLockMode;
    +    }else{
    +      Pager *pPager;
    +      if( pId2->n==0 ){
    +        /* This indicates that no database name was specified as part
    +        ** of the PRAGMA command. In this case the locking-mode must be
    +        ** set on all attached databases, as well as the main db file.
    +        **
    +        ** Also, the sqlite3.dfltLockMode variable is set so that
    +        ** any subsequently attached databases also use the specified
    +        ** locking mode.
    +        */
    +        int ii;
    +        assert(pDb==&db->aDb[0]);
    +        for(ii=2; ii<db->nDb; ii++){
    +          pPager = sqlite3BtreePager(db->aDb[ii].pBt);
    +          sqlite3PagerLockingMode(pPager, eMode);
    +        }
    +        db->dfltLockMode = (u8)eMode;
    +      }
    +      pPager = sqlite3BtreePager(pDb->pBt);
    +      eMode = sqlite3PagerLockingMode(pPager, eMode);
    +    }
    +
    +    assert(eMode==PAGER_LOCKINGMODE_NORMAL||eMode==PAGER_LOCKINGMODE_EXCLUSIVE);
    +    if( eMode==PAGER_LOCKINGMODE_EXCLUSIVE ){
    +      zRet = "exclusive";
    +    }
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "locking_mode", SQLITE_STATIC);
    +    sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zRet, 0);
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]journal_mode
    +  **  PRAGMA [database.]journal_mode = (delete|persist|off|truncate|memory)
    +  */
    +  if( sqlite3StrICmp(zLeft,"journal_mode")==0 ){
    +    int eMode;
    +    static char * const azModeName[] = {
    +      "delete", "persist", "off", "truncate", "memory"
    +    };
    +
    +    if( zRight==0 ){
    +      eMode = PAGER_JOURNALMODE_QUERY;
    +    }else{
    +      int n = sqlite3Strlen30(zRight);
    +      eMode = sizeof(azModeName)/sizeof(azModeName[0]) - 1;
    +      while( eMode>=0 && sqlite3StrNICmp(zRight, azModeName[eMode], n)!=0 ){
    +        eMode--;
    +      }
    +    }
    +    if( pId2->n==0 && eMode==PAGER_JOURNALMODE_QUERY ){
    +      /* Simple "PRAGMA journal_mode;" statement. This is a query for
    +      ** the current default journal mode (which may be different to
    +      ** the journal-mode of the main database).
    +      */
    +      eMode = db->dfltJournalMode;
    +    }else{
    +      Pager *pPager;
    +      if( pId2->n==0 ){
    +        /* This indicates that no database name was specified as part
    +        ** of the PRAGMA command. In this case the journal-mode must be
    +        ** set on all attached databases, as well as the main db file.
    +        **
    +        ** Also, the sqlite3.dfltJournalMode variable is set so that
    +        ** any subsequently attached databases also use the specified
    +        ** journal mode.
    +        */
    +        int ii;
    +        assert(pDb==&db->aDb[0]);
    +        for(ii=1; ii<db->nDb; ii++){
    +          if( db->aDb[ii].pBt ){
    +            pPager = sqlite3BtreePager(db->aDb[ii].pBt);
    +            sqlite3PagerJournalMode(pPager, eMode);
    +          }
    +        }
    +        db->dfltJournalMode = (u8)eMode;
    +      }
    +      pPager = sqlite3BtreePager(pDb->pBt);
    +      eMode = sqlite3PagerJournalMode(pPager, eMode);
    +    }
    +    assert( eMode==PAGER_JOURNALMODE_DELETE
    +              || eMode==PAGER_JOURNALMODE_TRUNCATE
    +              || eMode==PAGER_JOURNALMODE_PERSIST
    +              || eMode==PAGER_JOURNALMODE_OFF
    +              || eMode==PAGER_JOURNALMODE_MEMORY );
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "journal_mode", SQLITE_STATIC);
    +    sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, 
    +           azModeName[eMode], P4_STATIC);
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
    +  }else
    +
    +  /*
    +  **  PRAGMA [database.]journal_size_limit
    +  **  PRAGMA [database.]journal_size_limit=N
    +  **
    +  ** Get or set the size limit on rollback journal files.
    +  */
    +  if( sqlite3StrICmp(zLeft,"journal_size_limit")==0 ){
    +    Pager *pPager = sqlite3BtreePager(pDb->pBt);
    +    i64 iLimit = -2;
    +    if( zRight ){
    +      sqlite3Atoi64(zRight, &iLimit);
    +      if( iLimit<-1 ) iLimit = -1;
    +    }
    +    iLimit = sqlite3PagerJournalSizeLimit(pPager, iLimit);
    +    returnSingleInt(pParse, "journal_size_limit", iLimit);
    +  }else
    +
    +#endif /* SQLITE_OMIT_PAGER_PRAGMAS */
    +
    +  /*
    +  **  PRAGMA [database.]auto_vacuum
    +  **  PRAGMA [database.]auto_vacuum=N
    +  **
    +  ** Get or set the value of the database 'auto-vacuum' parameter.
    +  ** The value is one of:  0 NONE 1 FULL 2 INCREMENTAL
    +  */
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  if( sqlite3StrICmp(zLeft,"auto_vacuum")==0 ){
    +    Btree *pBt = pDb->pBt;
    +    assert( pBt!=0 );
    +    if( sqlite3ReadSchema(pParse) ){
    +      goto pragma_out;
    +    }
    +    if( !zRight ){
    +      int auto_vacuum;
    +      if( ALWAYS(pBt) ){
    +         auto_vacuum = sqlite3BtreeGetAutoVacuum(pBt);
    +      }else{
    +         auto_vacuum = SQLITE_DEFAULT_AUTOVACUUM;
    +      }
    +      returnSingleInt(pParse, "auto_vacuum", auto_vacuum);
    +    }else{
    +      int eAuto = getAutoVacuum(zRight);
    +      assert( eAuto>=0 && eAuto<=2 );
    +      db->nextAutovac = (u8)eAuto;
    +      if( ALWAYS(eAuto>=0) ){
    +        /* Call SetAutoVacuum() to set initialize the internal auto and
    +        ** incr-vacuum flags. This is required in case this connection
    +        ** creates the database file. It is important that it is created
    +        ** as an auto-vacuum capable db.
    +        */
    +        int rc = sqlite3BtreeSetAutoVacuum(pBt, eAuto);
    +        if( rc==SQLITE_OK && (eAuto==1 || eAuto==2) ){
    +          /* When setting the auto_vacuum mode to either "full" or 
    +          ** "incremental", write the value of meta[6] in the database
    +          ** file. Before writing to meta[6], check that meta[3] indicates
    +          ** that this really is an auto-vacuum capable database.
    +          */
    +          static const VdbeOpList setMeta6[] = {
    +            { OP_Transaction,    0,         1,                 0},    /* 0 */
    +            { OP_ReadCookie,     0,         1,         BTREE_LARGEST_ROOT_PAGE},
    +            { OP_If,             1,         0,                 0},    /* 2 */
    +            { OP_Halt,           SQLITE_OK, OE_Abort,          0},    /* 3 */
    +            { OP_Integer,        0,         1,                 0},    /* 4 */
    +            { OP_SetCookie,      0,         BTREE_INCR_VACUUM, 1},    /* 5 */
    +          };
    +          int iAddr;
    +          iAddr = sqlite3VdbeAddOpList(v, ArraySize(setMeta6), setMeta6);
    +          sqlite3VdbeChangeP1(v, iAddr, iDb);
    +          sqlite3VdbeChangeP1(v, iAddr+1, iDb);
    +          sqlite3VdbeChangeP2(v, iAddr+2, iAddr+4);
    +          sqlite3VdbeChangeP1(v, iAddr+4, eAuto-1);
    +          sqlite3VdbeChangeP1(v, iAddr+5, iDb);
    +          sqlite3VdbeUsesBtree(v, iDb);
    +        }
    +      }
    +    }
    +  }else
    +#endif
    +
    +  /*
    +  **  PRAGMA [database.]incremental_vacuum(N)
    +  **
    +  ** Do N steps of incremental vacuuming on a database.
    +  */
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  if( sqlite3StrICmp(zLeft,"incremental_vacuum")==0 ){
    +    int iLimit, addr;
    +    if( sqlite3ReadSchema(pParse) ){
    +      goto pragma_out;
    +    }
    +    if( zRight==0 || !sqlite3GetInt32(zRight, &iLimit) || iLimit<=0 ){
    +      iLimit = 0x7fffffff;
    +    }
    +    sqlite3BeginWriteOperation(pParse, 0, iDb);
    +    sqlite3VdbeAddOp2(v, OP_Integer, iLimit, 1);
    +    addr = sqlite3VdbeAddOp1(v, OP_IncrVacuum, iDb);
    +    sqlite3VdbeAddOp1(v, OP_ResultRow, 1);
    +    sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1);
    +    sqlite3VdbeAddOp2(v, OP_IfPos, 1, addr);
    +    sqlite3VdbeJumpHere(v, addr);
    +  }else
    +#endif
    +
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +  /*
    +  **  PRAGMA [database.]cache_size
    +  **  PRAGMA [database.]cache_size=N
    +  **
    +  ** The first form reports the current local setting for the
    +  ** page cache size.  The local setting can be different from
    +  ** the persistent cache size value that is stored in the database
    +  ** file itself.  The value returned is the maximum number of
    +  ** pages in the page cache.  The second form sets the local
    +  ** page cache size value.  It does not change the persistent
    +  ** cache size stored on the disk so the cache size will revert
    +  ** to its default value when the database is closed and reopened.
    +  ** N should be a positive integer.
    +  */
    +  if( sqlite3StrICmp(zLeft,"cache_size")==0 ){
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    if( !zRight ){
    +      returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
    +    }else{
    +      int size = atoi(zRight);
    +      if( size<0 ) size = -size;
    +      pDb->pSchema->cache_size = size;
    +      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
    +    }
    +  }else
    +
    +  /*
    +  **   PRAGMA temp_store
    +  **   PRAGMA temp_store = "default"|"memory"|"file"
    +  **
    +  ** Return or set the local value of the temp_store flag.  Changing
    +  ** the local value does not make changes to the disk file and the default
    +  ** value will be restored the next time the database is opened.
    +  **
    +  ** Note that it is possible for the library compile-time options to
    +  ** override this setting
    +  */
    +  if( sqlite3StrICmp(zLeft, "temp_store")==0 ){
    +    if( !zRight ){
    +      returnSingleInt(pParse, "temp_store", db->temp_store);
    +    }else{
    +      changeTempStorage(pParse, zRight);
    +    }
    +  }else
    +
    +  /*
    +  **   PRAGMA temp_store_directory
    +  **   PRAGMA temp_store_directory = ""|"directory_name"
    +  **
    +  ** Return or set the local value of the temp_store_directory flag.  Changing
    +  ** the value sets a specific directory to be used for temporary files.
    +  ** Setting to a null string reverts to the default temporary directory search.
    +  ** If temporary directory is changed, then invalidateTempStorage.
    +  **
    +  */
    +  if( sqlite3StrICmp(zLeft, "temp_store_directory")==0 ){
    +    if( !zRight ){
    +      if( sqlite3_temp_directory ){
    +        sqlite3VdbeSetNumCols(v, 1);
    +        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, 
    +            "temp_store_directory", SQLITE_STATIC);
    +        sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, sqlite3_temp_directory, 0);
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
    +      }
    +    }else{
    +#ifndef SQLITE_OMIT_WSD
    +      if( zRight[0] ){
    +        int rc;
    +        int res;
    +        rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);
    +        if( rc!=SQLITE_OK || res==0 ){
    +          sqlite3ErrorMsg(pParse, "not a writable directory");
    +          goto pragma_out;
    +        }
    +      }
    +      if( SQLITE_TEMP_STORE==0
    +       || (SQLITE_TEMP_STORE==1 && db->temp_store<=1)
    +       || (SQLITE_TEMP_STORE==2 && db->temp_store==1)
    +      ){
    +        invalidateTempStorage(pParse);
    +      }
    +      sqlite3_free(sqlite3_temp_directory);
    +      if( zRight[0] ){
    +        sqlite3_temp_directory = sqlite3DbStrDup(0, zRight);
    +      }else{
    +        sqlite3_temp_directory = 0;
    +      }
    +#endif /* SQLITE_OMIT_WSD */
    +    }
    +  }else
    +
    +#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
    +#  if defined(__APPLE__)
    +#    define SQLITE_ENABLE_LOCKING_STYLE 1
    +#  else
    +#    define SQLITE_ENABLE_LOCKING_STYLE 0
    +#  endif
    +#endif
    +#if SQLITE_ENABLE_LOCKING_STYLE
    +  /*
    +   **   PRAGMA [database.]lock_proxy_file
    +   **   PRAGMA [database.]lock_proxy_file = ":auto:"|"lock_file_path"
    +   **
    +   ** Return or set the value of the lock_proxy_file flag.  Changing
    +   ** the value sets a specific file to be used for database access locks.
    +   **
    +   */
    +  if( sqlite3StrICmp(zLeft, "lock_proxy_file")==0 ){
    +    if( !zRight ){
    +      Pager *pPager = sqlite3BtreePager(pDb->pBt);
    +      char *proxy_file_path = NULL;
    +      sqlite3_file *pFile = sqlite3PagerFile(pPager);
    +      sqlite3OsFileControl(pFile, SQLITE_GET_LOCKPROXYFILE, 
    +                           &proxy_file_path);
    +      
    +      if( proxy_file_path ){
    +        sqlite3VdbeSetNumCols(v, 1);
    +        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, 
    +                              "lock_proxy_file", SQLITE_STATIC);
    +        sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, proxy_file_path, 0);
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
    +      }
    +    }else{
    +      Pager *pPager = sqlite3BtreePager(pDb->pBt);
    +      sqlite3_file *pFile = sqlite3PagerFile(pPager);
    +      int res;
    +      if( zRight[0] ){
    +        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE, 
    +                                     zRight);
    +      } else {
    +        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE, 
    +                                     NULL);
    +      }
    +      if( res!=SQLITE_OK ){
    +        sqlite3ErrorMsg(pParse, "failed to set lock proxy file");
    +        goto pragma_out;
    +      }
    +    }
    +  }else
    +#endif /* SQLITE_ENABLE_LOCKING_STYLE */      
    +    
    +  /*
    +  **   PRAGMA [database.]synchronous
    +  **   PRAGMA [database.]synchronous=OFF|ON|NORMAL|FULL
    +  **
    +  ** Return or set the local value of the synchronous flag.  Changing
    +  ** the local value does not make changes to the disk file and the
    +  ** default value will be restored the next time the database is
    +  ** opened.
    +  */
    +  if( sqlite3StrICmp(zLeft,"synchronous")==0 ){
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    if( !zRight ){
    +      returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
    +    }else{
    +      if( !db->autoCommit ){
    +        sqlite3ErrorMsg(pParse, 
    +            "Safety level may not be changed inside a transaction");
    +      }else{
    +        pDb->safety_level = getSafetyLevel(zRight)+1;
    +      }
    +    }
    +  }else
    +#endif /* SQLITE_OMIT_PAGER_PRAGMAS */
    +
    +#ifndef SQLITE_OMIT_FLAG_PRAGMAS
    +  if( flagPragma(pParse, zLeft, zRight) ){
    +    /* The flagPragma() subroutine also generates any necessary code
    +    ** there is nothing more to do here */
    +  }else
    +#endif /* SQLITE_OMIT_FLAG_PRAGMAS */
    +
    +#ifndef SQLITE_OMIT_SCHEMA_PRAGMAS
    +  /*
    +  **   PRAGMA table_info(<table>)
    +  **
    +  ** Return a single row for each column of the named table. The columns of
    +  ** the returned data set are:
    +  **
    +  ** cid:        Column id (numbered from left to right, starting at 0)
    +  ** name:       Column name
    +  ** type:       Column declaration type.
    +  ** notnull:    True if 'NOT NULL' is part of column declaration
    +  ** dflt_value: The default value for the column, if any.
    +  */
    +  if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
    +    Table *pTab;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    pTab = sqlite3FindTable(db, zRight, zDb);
    +    if( pTab ){
    +      int i;
    +      int nHidden = 0;
    +      Column *pCol;
    +      sqlite3VdbeSetNumCols(v, 6);
    +      pParse->nMem = 6;
    +      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "notnull", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "dflt_value", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "pk", SQLITE_STATIC);
    +      sqlite3ViewGetColumnNames(pParse, pTab);
    +      for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
    +        if( IsHiddenColumn(pCol) ){
    +          nHidden++;
    +          continue;
    +        }
    +        sqlite3VdbeAddOp2(v, OP_Integer, i-nHidden, 1);
    +        sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
    +        sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
    +           pCol->zType ? pCol->zType : "", 0);
    +        sqlite3VdbeAddOp2(v, OP_Integer, (pCol->notNull ? 1 : 0), 4);
    +        if( pCol->zDflt ){
    +          sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
    +        }else{
    +          sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
    +        }
    +        sqlite3VdbeAddOp2(v, OP_Integer, pCol->isPrimKey, 6);
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
    +      }
    +    }
    +  }else
    +
    +  if( sqlite3StrICmp(zLeft, "index_info")==0 && zRight ){
    +    Index *pIdx;
    +    Table *pTab;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    pIdx = sqlite3FindIndex(db, zRight, zDb);
    +    if( pIdx ){
    +      int i;
    +      pTab = pIdx->pTable;
    +      sqlite3VdbeSetNumCols(v, 3);
    +      pParse->nMem = 3;
    +      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seqno", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "cid", SQLITE_STATIC);
    +      sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "name", SQLITE_STATIC);
    +      for(i=0; i<pIdx->nColumn; i++){
    +        int cnum = pIdx->aiColumn[i];
    +        sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
    +        sqlite3VdbeAddOp2(v, OP_Integer, cnum, 2);
    +        assert( pTab->nCol>cnum );
    +        sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
    +      }
    +    }
    +  }else
    +
    +  if( sqlite3StrICmp(zLeft, "index_list")==0 && zRight ){
    +    Index *pIdx;
    +    Table *pTab;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    pTab = sqlite3FindTable(db, zRight, zDb);
    +    if( pTab ){
    +      v = sqlite3GetVdbe(pParse);
    +      pIdx = pTab->pIndex;
    +      if( pIdx ){
    +        int i = 0; 
    +        sqlite3VdbeSetNumCols(v, 3);
    +        pParse->nMem = 3;
    +        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "unique", SQLITE_STATIC);
    +        while(pIdx){
    +          sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
    +          sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
    +          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->onError!=OE_None, 3);
    +          sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
    +          ++i;
    +          pIdx = pIdx->pNext;
    +        }
    +      }
    +    }
    +  }else
    +
    +  if( sqlite3StrICmp(zLeft, "database_list")==0 ){
    +    int i;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    sqlite3VdbeSetNumCols(v, 3);
    +    pParse->nMem = 3;
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
    +    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
    +    sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "file", SQLITE_STATIC);
    +    for(i=0; i<db->nDb; i++){
    +      if( db->aDb[i].pBt==0 ) continue;
    +      assert( db->aDb[i].zName!=0 );
    +      sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
    +           sqlite3BtreeGetFilename(db->aDb[i].pBt), 0);
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
    +    }
    +  }else
    +
    +  if( sqlite3StrICmp(zLeft, "collation_list")==0 ){
    +    int i = 0;
    +    HashElem *p;
    +    sqlite3VdbeSetNumCols(v, 2);
    +    pParse->nMem = 2;
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
    +    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
    +    for(p=sqliteHashFirst(&db->aCollSeq); p; p=sqliteHashNext(p)){
    +      CollSeq *pColl = (CollSeq *)sqliteHashData(p);
    +      sqlite3VdbeAddOp2(v, OP_Integer, i++, 1);
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
    +    }
    +  }else
    +#endif /* SQLITE_OMIT_SCHEMA_PRAGMAS */
    +
    +#ifndef SQLITE_OMIT_FOREIGN_KEY
    +  if( sqlite3StrICmp(zLeft, "foreign_key_list")==0 && zRight ){
    +    FKey *pFK;
    +    Table *pTab;
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    pTab = sqlite3FindTable(db, zRight, zDb);
    +    if( pTab ){
    +      v = sqlite3GetVdbe(pParse);
    +      pFK = pTab->pFKey;
    +      if( pFK ){
    +        int i = 0; 
    +        sqlite3VdbeSetNumCols(v, 8);
    +        pParse->nMem = 8;
    +        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "id", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "seq", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "table", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "from", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "to", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "on_update", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 6, COLNAME_NAME, "on_delete", SQLITE_STATIC);
    +        sqlite3VdbeSetColName(v, 7, COLNAME_NAME, "match", SQLITE_STATIC);
    +        while(pFK){
    +          int j;
    +          for(j=0; j<pFK->nCol; j++){
    +            char *zCol = pFK->aCol[j].zCol;
    +            char *zOnDelete = (char *)actionName(pFK->aAction[0]);
    +            char *zOnUpdate = (char *)actionName(pFK->aAction[1]);
    +            sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
    +            sqlite3VdbeAddOp2(v, OP_Integer, j, 2);
    +            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pFK->zTo, 0);
    +            sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0,
    +                              pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
    +            sqlite3VdbeAddOp4(v, zCol ? OP_String8 : OP_Null, 0, 5, 0, zCol, 0);
    +            sqlite3VdbeAddOp4(v, OP_String8, 0, 6, 0, zOnUpdate, 0);
    +            sqlite3VdbeAddOp4(v, OP_String8, 0, 7, 0, zOnDelete, 0);
    +            sqlite3VdbeAddOp4(v, OP_String8, 0, 8, 0, "NONE", 0);
    +            sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 8);
    +          }
    +          ++i;
    +          pFK = pFK->pNextFrom;
    +        }
    +      }
    +    }
    +  }else
    +#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
    +
    +#ifndef NDEBUG
    +  if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){
    +    if( zRight ){
    +      if( getBoolean(zRight) ){
    +        sqlite3ParserTrace(stderr, "parser: ");
    +      }else{
    +        sqlite3ParserTrace(0, 0);
    +      }
    +    }
    +  }else
    +#endif
    +
    +  /* Reinstall the LIKE and GLOB functions.  The variant of LIKE
    +  ** used will be case sensitive or not depending on the RHS.
    +  */
    +  if( sqlite3StrICmp(zLeft, "case_sensitive_like")==0 ){
    +    if( zRight ){
    +      sqlite3RegisterLikeFunctions(db, getBoolean(zRight));
    +    }
    +  }else
    +
    +#ifndef SQLITE_INTEGRITY_CHECK_ERROR_MAX
    +# define SQLITE_INTEGRITY_CHECK_ERROR_MAX 100
    +#endif
    +
    +#ifndef SQLITE_OMIT_INTEGRITY_CHECK
    +  /* Pragma "quick_check" is an experimental reduced version of 
    +  ** integrity_check designed to detect most database corruption
    +  ** without most of the overhead of a full integrity-check.
    +  */
    +  if( sqlite3StrICmp(zLeft, "integrity_check")==0
    +   || sqlite3StrICmp(zLeft, "quick_check")==0 
    +  ){
    +    int i, j, addr, mxErr;
    +
    +    /* Code that appears at the end of the integrity check.  If no error
    +    ** messages have been generated, output OK.  Otherwise output the
    +    ** error message
    +    */
    +    static const VdbeOpList endCode[] = {
    +      { OP_AddImm,      1, 0,        0},    /* 0 */
    +      { OP_IfNeg,       1, 0,        0},    /* 1 */
    +      { OP_String8,     0, 3,        0},    /* 2 */
    +      { OP_ResultRow,   3, 1,        0},
    +    };
    +
    +    int isQuick = (zLeft[0]=='q');
    +
    +    /* Initialize the VDBE program */
    +    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +    pParse->nMem = 6;
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "integrity_check", SQLITE_STATIC);
    +
    +    /* Set the maximum error count */
    +    mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
    +    if( zRight ){
    +      mxErr = atoi(zRight);
    +      if( mxErr<=0 ){
    +        mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
    +      }
    +    }
    +    sqlite3VdbeAddOp2(v, OP_Integer, mxErr, 1);  /* reg[1] holds errors left */
    +
    +    /* Do an integrity check on each database file */
    +    for(i=0; i<db->nDb; i++){
    +      HashElem *x;
    +      Hash *pTbls;
    +      int cnt = 0;
    +
    +      if( OMIT_TEMPDB && i==1 ) continue;
    +
    +      sqlite3CodeVerifySchema(pParse, i);
    +      addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1); /* Halt if out of errors */
    +      sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
    +      sqlite3VdbeJumpHere(v, addr);
    +
    +      /* Do an integrity check of the B-Tree
    +      **
    +      ** Begin by filling registers 2, 3, ... with the root pages numbers
    +      ** for all tables and indices in the database.
    +      */
    +      pTbls = &db->aDb[i].pSchema->tblHash;
    +      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){
    +        Table *pTab = sqliteHashData(x);
    +        Index *pIdx;
    +        sqlite3VdbeAddOp2(v, OP_Integer, pTab->tnum, 2+cnt);
    +        cnt++;
    +        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->tnum, 2+cnt);
    +          cnt++;
    +        }
    +      }
    +
    +      /* Make sure sufficient number of registers have been allocated */
    +      if( pParse->nMem < cnt+4 ){
    +        pParse->nMem = cnt+4;
    +      }
    +
    +      /* Do the b-tree integrity checks */
    +      sqlite3VdbeAddOp3(v, OP_IntegrityCk, 2, cnt, 1);
    +      sqlite3VdbeChangeP5(v, (u8)i);
    +      addr = sqlite3VdbeAddOp1(v, OP_IsNull, 2);
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
    +         sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zName),
    +         P4_DYNAMIC);
    +      sqlite3VdbeAddOp3(v, OP_Move, 2, 4, 1);
    +      sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 2);
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, 2, 1);
    +      sqlite3VdbeJumpHere(v, addr);
    +
    +      /* Make sure all the indices are constructed correctly.
    +      */
    +      for(x=sqliteHashFirst(pTbls); x && !isQuick; x=sqliteHashNext(x)){
    +        Table *pTab = sqliteHashData(x);
    +        Index *pIdx;
    +        int loopTop;
    +
    +        if( pTab->pIndex==0 ) continue;
    +        addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1);  /* Stop if out of errors */
    +        sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
    +        sqlite3VdbeJumpHere(v, addr);
    +        sqlite3OpenTableAndIndices(pParse, pTab, 1, OP_OpenRead);
    +        sqlite3VdbeAddOp2(v, OP_Integer, 0, 2);  /* reg(2) will count entries */
    +        loopTop = sqlite3VdbeAddOp2(v, OP_Rewind, 1, 0);
    +        sqlite3VdbeAddOp2(v, OP_AddImm, 2, 1);   /* increment entry count */
    +        for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
    +          int jmp2;
    +          static const VdbeOpList idxErr[] = {
    +            { OP_AddImm,      1, -1,  0},
    +            { OP_String8,     0,  3,  0},    /* 1 */
    +            { OP_Rowid,       1,  4,  0},
    +            { OP_String8,     0,  5,  0},    /* 3 */
    +            { OP_String8,     0,  6,  0},    /* 4 */
    +            { OP_Concat,      4,  3,  3},
    +            { OP_Concat,      5,  3,  3},
    +            { OP_Concat,      6,  3,  3},
    +            { OP_ResultRow,   3,  1,  0},
    +            { OP_IfPos,       1,  0,  0},    /* 9 */
    +            { OP_Halt,        0,  0,  0},
    +          };
    +          sqlite3GenerateIndexKey(pParse, pIdx, 1, 3, 1);
    +          jmp2 = sqlite3VdbeAddOp3(v, OP_Found, j+2, 0, 3);
    +          addr = sqlite3VdbeAddOpList(v, ArraySize(idxErr), idxErr);
    +          sqlite3VdbeChangeP4(v, addr+1, "rowid ", P4_STATIC);
    +          sqlite3VdbeChangeP4(v, addr+3, " missing from index ", P4_STATIC);
    +          sqlite3VdbeChangeP4(v, addr+4, pIdx->zName, P4_STATIC);
    +          sqlite3VdbeJumpHere(v, addr+9);
    +          sqlite3VdbeJumpHere(v, jmp2);
    +        }
    +        sqlite3VdbeAddOp2(v, OP_Next, 1, loopTop+1);
    +        sqlite3VdbeJumpHere(v, loopTop);
    +        for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
    +          static const VdbeOpList cntIdx[] = {
    +             { OP_Integer,      0,  3,  0},
    +             { OP_Rewind,       0,  0,  0},  /* 1 */
    +             { OP_AddImm,       3,  1,  0},
    +             { OP_Next,         0,  0,  0},  /* 3 */
    +             { OP_Eq,           2,  0,  3},  /* 4 */
    +             { OP_AddImm,       1, -1,  0},
    +             { OP_String8,      0,  2,  0},  /* 6 */
    +             { OP_String8,      0,  3,  0},  /* 7 */
    +             { OP_Concat,       3,  2,  2},
    +             { OP_ResultRow,    2,  1,  0},
    +          };
    +          addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1);
    +          sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
    +          sqlite3VdbeJumpHere(v, addr);
    +          addr = sqlite3VdbeAddOpList(v, ArraySize(cntIdx), cntIdx);
    +          sqlite3VdbeChangeP1(v, addr+1, j+2);
    +          sqlite3VdbeChangeP2(v, addr+1, addr+4);
    +          sqlite3VdbeChangeP1(v, addr+3, j+2);
    +          sqlite3VdbeChangeP2(v, addr+3, addr+2);
    +          sqlite3VdbeJumpHere(v, addr+4);
    +          sqlite3VdbeChangeP4(v, addr+6, 
    +                     "wrong # of entries in index ", P4_STATIC);
    +          sqlite3VdbeChangeP4(v, addr+7, pIdx->zName, P4_STATIC);
    +        }
    +      } 
    +    }
    +    addr = sqlite3VdbeAddOpList(v, ArraySize(endCode), endCode);
    +    sqlite3VdbeChangeP2(v, addr, -mxErr);
    +    sqlite3VdbeJumpHere(v, addr+1);
    +    sqlite3VdbeChangeP4(v, addr+2, "ok", P4_STATIC);
    +  }else
    +#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
    +
    +#ifndef SQLITE_OMIT_UTF16
    +  /*
    +  **   PRAGMA encoding
    +  **   PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be"
    +  **
    +  ** In its first form, this pragma returns the encoding of the main
    +  ** database. If the database is not initialized, it is initialized now.
    +  **
    +  ** The second form of this pragma is a no-op if the main database file
    +  ** has not already been initialized. In this case it sets the default
    +  ** encoding that will be used for the main database file if a new file
    +  ** is created. If an existing main database file is opened, then the
    +  ** default text encoding for the existing database is used.
    +  ** 
    +  ** In all cases new databases created using the ATTACH command are
    +  ** created to use the same default text encoding as the main database. If
    +  ** the main database has not been initialized and/or created when ATTACH
    +  ** is executed, this is done before the ATTACH operation.
    +  **
    +  ** In the second form this pragma sets the text encoding to be used in
    +  ** new database files created using this database handle. It is only
    +  ** useful if invoked immediately after the main database i
    +  */
    +  if( sqlite3StrICmp(zLeft, "encoding")==0 ){
    +    static const struct EncName {
    +      char *zName;
    +      u8 enc;
    +    } encnames[] = {
    +      { "UTF8",     SQLITE_UTF8        },
    +      { "UTF-8",    SQLITE_UTF8        },  /* Must be element [1] */
    +      { "UTF-16le", SQLITE_UTF16LE     },  /* Must be element [2] */
    +      { "UTF-16be", SQLITE_UTF16BE     },  /* Must be element [3] */
    +      { "UTF16le",  SQLITE_UTF16LE     },
    +      { "UTF16be",  SQLITE_UTF16BE     },
    +      { "UTF-16",   0                  }, /* SQLITE_UTF16NATIVE */
    +      { "UTF16",    0                  }, /* SQLITE_UTF16NATIVE */
    +      { 0, 0 }
    +    };
    +    const struct EncName *pEnc;
    +    if( !zRight ){    /* "PRAGMA encoding" */
    +      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    +      sqlite3VdbeSetNumCols(v, 1);
    +      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "encoding", SQLITE_STATIC);
    +      sqlite3VdbeAddOp2(v, OP_String8, 0, 1);
    +      assert( encnames[SQLITE_UTF8].enc==SQLITE_UTF8 );
    +      assert( encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE );
    +      assert( encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE );
    +      sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
    +    }else{                        /* "PRAGMA encoding = XXX" */
    +      /* Only change the value of sqlite.enc if the database handle is not
    +      ** initialized. If the main database exists, the new sqlite.enc value
    +      ** will be overwritten when the schema is next loaded. If it does not
    +      ** already exists, it will be created to use the new encoding value.
    +      */
    +      if( 
    +        !(DbHasProperty(db, 0, DB_SchemaLoaded)) || 
    +        DbHasProperty(db, 0, DB_Empty) 
    +      ){
    +        for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
    +          if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
    +            ENC(pParse->db) = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;
    +            break;
    +          }
    +        }
    +        if( !pEnc->zName ){
    +          sqlite3ErrorMsg(pParse, "unsupported encoding: %s", zRight);
    +        }
    +      }
    +    }
    +  }else
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +#ifndef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
    +  /*
    +  **   PRAGMA [database.]schema_version
    +  **   PRAGMA [database.]schema_version = <integer>
    +  **
    +  **   PRAGMA [database.]user_version
    +  **   PRAGMA [database.]user_version = <integer>
    +  **
    +  ** The pragma's schema_version and user_version are used to set or get
    +  ** the value of the schema-version and user-version, respectively. Both
    +  ** the schema-version and the user-version are 32-bit signed integers
    +  ** stored in the database header.
    +  **
    +  ** The schema-cookie is usually only manipulated internally by SQLite. It
    +  ** is incremented by SQLite whenever the database schema is modified (by
    +  ** creating or dropping a table or index). The schema version is used by
    +  ** SQLite each time a query is executed to ensure that the internal cache
    +  ** of the schema used when compiling the SQL query matches the schema of
    +  ** the database against which the compiled query is actually executed.
    +  ** Subverting this mechanism by using "PRAGMA schema_version" to modify
    +  ** the schema-version is potentially dangerous and may lead to program
    +  ** crashes or database corruption. Use with caution!
    +  **
    +  ** The user-version is not used internally by SQLite. It may be used by
    +  ** applications for any purpose.
    +  */
    +  if( sqlite3StrICmp(zLeft, "schema_version")==0 
    +   || sqlite3StrICmp(zLeft, "user_version")==0 
    +   || sqlite3StrICmp(zLeft, "freelist_count")==0 
    +  ){
    +    int iCookie;   /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */
    +    sqlite3VdbeUsesBtree(v, iDb);
    +    switch( zLeft[0] ){
    +      case 'f': case 'F':
    +        iCookie = BTREE_FREE_PAGE_COUNT;
    +        break;
    +      case 's': case 'S':
    +        iCookie = BTREE_SCHEMA_VERSION;
    +        break;
    +      default:
    +        iCookie = BTREE_USER_VERSION;
    +        break;
    +    }
    +
    +    if( zRight && iCookie!=BTREE_FREE_PAGE_COUNT ){
    +      /* Write the specified cookie value */
    +      static const VdbeOpList setCookie[] = {
    +        { OP_Transaction,    0,  1,  0},    /* 0 */
    +        { OP_Integer,        0,  1,  0},    /* 1 */
    +        { OP_SetCookie,      0,  0,  1},    /* 2 */
    +      };
    +      int addr = sqlite3VdbeAddOpList(v, ArraySize(setCookie), setCookie);
    +      sqlite3VdbeChangeP1(v, addr, iDb);
    +      sqlite3VdbeChangeP1(v, addr+1, atoi(zRight));
    +      sqlite3VdbeChangeP1(v, addr+2, iDb);
    +      sqlite3VdbeChangeP2(v, addr+2, iCookie);
    +    }else{
    +      /* Read the specified cookie value */
    +      static const VdbeOpList readCookie[] = {
    +        { OP_Transaction,     0,  0,  0},    /* 0 */
    +        { OP_ReadCookie,      0,  1,  0},    /* 1 */
    +        { OP_ResultRow,       1,  1,  0}
    +      };
    +      int addr = sqlite3VdbeAddOpList(v, ArraySize(readCookie), readCookie);
    +      sqlite3VdbeChangeP1(v, addr, iDb);
    +      sqlite3VdbeChangeP1(v, addr+1, iDb);
    +      sqlite3VdbeChangeP3(v, addr+1, iCookie);
    +      sqlite3VdbeSetNumCols(v, 1);
    +      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLeft, SQLITE_TRANSIENT);
    +    }
    +  }else
    +#endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */
    +
    +#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
    +  /*
    +  ** Report the current state of file logs for all databases
    +  */
    +  if( sqlite3StrICmp(zLeft, "lock_status")==0 ){
    +    static const char *const azLockName[] = {
    +      "unlocked", "shared", "reserved", "pending", "exclusive"
    +    };
    +    int i;
    +    sqlite3VdbeSetNumCols(v, 2);
    +    pParse->nMem = 2;
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "database", SQLITE_STATIC);
    +    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "status", SQLITE_STATIC);
    +    for(i=0; i<db->nDb; i++){
    +      Btree *pBt;
    +      Pager *pPager;
    +      const char *zState = "unknown";
    +      int j;
    +      if( db->aDb[i].zName==0 ) continue;
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
    +      pBt = db->aDb[i].pBt;
    +      if( pBt==0 || (pPager = sqlite3BtreePager(pBt))==0 ){
    +        zState = "closed";
    +      }else if( sqlite3_file_control(db, i ? db->aDb[i].zName : 0, 
    +                                     SQLITE_FCNTL_LOCKSTATE, &j)==SQLITE_OK ){
    +         zState = azLockName[j];
    +      }
    +      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, zState, P4_STATIC);
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
    +    }
    +
    +  }else
    +#endif
    +
    +#if SQLITE_HAS_CODEC
    +  if( sqlite3StrICmp(zLeft, "key")==0 && zRight ){
    +    sqlite3_key(db, zRight, sqlite3Strlen30(zRight));
    +  }else
    +  if( sqlite3StrICmp(zLeft, "rekey")==0 && zRight ){
    +    sqlite3_rekey(db, zRight, sqlite3Strlen30(zRight));
    +  }else
    +  if( zRight && (sqlite3StrICmp(zLeft, "hexkey")==0 ||
    +                 sqlite3StrICmp(zLeft, "hexrekey")==0) ){
    +    int i, h1, h2;
    +    char zKey[40];
    +    for(i=0; (h1 = zRight[i])!=0 && (h2 = zRight[i+1])!=0; i+=2){
    +      h1 += 9*(1&(h1>>6));
    +      h2 += 9*(1&(h2>>6));
    +      zKey[i/2] = (h2 & 0x0f) | ((h1 & 0xf)<<4);
    +    }
    +    if( (zLeft[3] & 0xf)==0xb ){
    +      sqlite3_key(db, zKey, i/2);
    +    }else{
    +      sqlite3_rekey(db, zKey, i/2);
    +    }
    +  }else
    +#endif
    +#if SQLITE_HAS_CODEC || defined(SQLITE_ENABLE_CEROD)
    +  if( sqlite3StrICmp(zLeft, "activate_extensions")==0 ){
    +#if SQLITE_HAS_CODEC
    +    if( sqlite3StrNICmp(zRight, "see-", 4)==0 ){
    +      extern void sqlite3_activate_see(const char*);
    +      sqlite3_activate_see(&zRight[4]);
    +    }
    +#endif
    +#ifdef SQLITE_ENABLE_CEROD
    +    if( sqlite3StrNICmp(zRight, "cerod-", 6)==0 ){
    +      extern void sqlite3_activate_cerod(const char*);
    +      sqlite3_activate_cerod(&zRight[6]);
    +    }
    +#endif
    +  }else
    +#endif
    +
    + 
    +  {/* Empty ELSE clause */}
    +
    +  /* Code an OP_Expire at the end of each PRAGMA program to cause
    +  ** the VDBE implementing the pragma to expire. Most (all?) pragmas
    +  ** are only valid for a single execution.
    +  */
    +  sqlite3VdbeAddOp2(v, OP_Expire, 1, 0);
    +
    +  /*
    +  ** Reset the safety level, in case the fullfsync flag or synchronous
    +  ** setting changed.
    +  */
    +#ifndef SQLITE_OMIT_PAGER_PRAGMAS
    +  if( db->autoCommit ){
    +    sqlite3BtreeSetSafetyLevel(pDb->pBt, pDb->safety_level,
    +               (db->flags&SQLITE_FullFSync)!=0);
    +  }
    +#endif
    +pragma_out:
    +  sqlite3DbFree(db, zLeft);
    +  sqlite3DbFree(db, zRight);
    +}
    +
    +#endif /* SQLITE_OMIT_PRAGMA */
    +
    +/************** End of pragma.c **********************************************/
    +/************** Begin file prepare.c *****************************************/
    +/*
    +** 2005 May 25
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the implementation of the sqlite3_prepare()
    +** interface, and routines that contribute to loading the database schema
    +** from disk.
    +**
    +** $Id: prepare.c,v 1.131 2009/08/06 17:43:31 drh Exp $
    +*/
    +
    +/*
    +** Fill the InitData structure with an error message that indicates
    +** that the database is corrupt.
    +*/
    +static void corruptSchema(
    +  InitData *pData,     /* Initialization context */
    +  const char *zObj,    /* Object being parsed at the point of error */
    +  const char *zExtra   /* Error information */
    +){
    +  sqlite3 *db = pData->db;
    +  if( !db->mallocFailed && (db->flags & SQLITE_RecoveryMode)==0 ){
    +    if( zObj==0 ) zObj = "?";
    +    sqlite3SetString(pData->pzErrMsg, db,
    +      "malformed database schema (%s)", zObj);
    +    if( zExtra ){
    +      *pData->pzErrMsg = sqlite3MAppendf(db, *pData->pzErrMsg, 
    +                                 "%s - %s", *pData->pzErrMsg, zExtra);
    +    }
    +  }
    +  pData->rc = db->mallocFailed ? SQLITE_NOMEM : SQLITE_CORRUPT;
    +}
    +
    +/*
    +** This is the callback routine for the code that initializes the
    +** database.  See sqlite3Init() below for additional information.
    +** This routine is also called from the OP_ParseSchema opcode of the VDBE.
    +**
    +** Each callback contains the following information:
    +**
    +**     argv[0] = name of thing being created
    +**     argv[1] = root page number for table or index. 0 for trigger or view.
    +**     argv[2] = SQL text for the CREATE statement.
    +**
    +*/
    +SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){
    +  InitData *pData = (InitData*)pInit;
    +  sqlite3 *db = pData->db;
    +  int iDb = pData->iDb;
    +
    +  assert( argc==3 );
    +  UNUSED_PARAMETER2(NotUsed, argc);
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  DbClearProperty(db, iDb, DB_Empty);
    +  if( db->mallocFailed ){
    +    corruptSchema(pData, argv[0], 0);
    +    return 1;
    +  }
    +
    +  assert( iDb>=0 && iDb<db->nDb );
    +  if( argv==0 ) return 0;   /* Might happen if EMPTY_RESULT_CALLBACKS are on */
    +  if( argv[1]==0 ){
    +    corruptSchema(pData, argv[0], 0);
    +  }else if( argv[2] && argv[2][0] ){
    +    /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
    +    ** But because db->init.busy is set to 1, no VDBE code is generated
    +    ** or executed.  All the parser does is build the internal data
    +    ** structures that describe the table, index, or view.
    +    */
    +    char *zErr;
    +    int rc;
    +    assert( db->init.busy );
    +    db->init.iDb = iDb;
    +    db->init.newTnum = atoi(argv[1]);
    +    db->init.orphanTrigger = 0;
    +    rc = sqlite3_exec(db, argv[2], 0, 0, &zErr);
    +    db->init.iDb = 0;
    +    assert( rc!=SQLITE_OK || zErr==0 );
    +    if( SQLITE_OK!=rc ){
    +      if( db->init.orphanTrigger ){
    +        assert( iDb==1 );
    +      }else{
    +        pData->rc = rc;
    +        if( rc==SQLITE_NOMEM ){
    +          db->mallocFailed = 1;
    +        }else if( rc!=SQLITE_INTERRUPT && rc!=SQLITE_LOCKED ){
    +          corruptSchema(pData, argv[0], zErr);
    +        }
    +      }
    +      sqlite3DbFree(db, zErr);
    +    }
    +  }else if( argv[0]==0 ){
    +    corruptSchema(pData, 0, 0);
    +  }else{
    +    /* If the SQL column is blank it means this is an index that
    +    ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
    +    ** constraint for a CREATE TABLE.  The index should have already
    +    ** been created when we processed the CREATE TABLE.  All we have
    +    ** to do here is record the root page number for that index.
    +    */
    +    Index *pIndex;
    +    pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb].zName);
    +    if( pIndex==0 ){
    +      /* This can occur if there exists an index on a TEMP table which
    +      ** has the same name as another index on a permanent index.  Since
    +      ** the permanent table is hidden by the TEMP table, we can also
    +      ** safely ignore the index on the permanent table.
    +      */
    +      /* Do Nothing */;
    +    }else if( sqlite3GetInt32(argv[1], &pIndex->tnum)==0 ){
    +      corruptSchema(pData, argv[0], "invalid rootpage");
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Attempt to read the database schema and initialize internal
    +** data structures for a single database file.  The index of the
    +** database file is given by iDb.  iDb==0 is used for the main
    +** database.  iDb==1 should never be used.  iDb>=2 is used for
    +** auxiliary databases.  Return one of the SQLITE_ error codes to
    +** indicate success or failure.
    +*/
    +static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
    +  int rc;
    +  int i;
    +  int size;
    +  Table *pTab;
    +  Db *pDb;
    +  char const *azArg[4];
    +  int meta[5];
    +  InitData initData;
    +  char const *zMasterSchema;
    +  char const *zMasterName = SCHEMA_TABLE(iDb);
    +  int openedTransaction = 0;
    +
    +  /*
    +  ** The master database table has a structure like this
    +  */
    +  static const char master_schema[] = 
    +     "CREATE TABLE sqlite_master(\n"
    +     "  type text,\n"
    +     "  name text,\n"
    +     "  tbl_name text,\n"
    +     "  rootpage integer,\n"
    +     "  sql text\n"
    +     ")"
    +  ;
    +#ifndef SQLITE_OMIT_TEMPDB
    +  static const char temp_master_schema[] = 
    +     "CREATE TEMP TABLE sqlite_temp_master(\n"
    +     "  type text,\n"
    +     "  name text,\n"
    +     "  tbl_name text,\n"
    +     "  rootpage integer,\n"
    +     "  sql text\n"
    +     ")"
    +  ;
    +#else
    +  #define temp_master_schema 0
    +#endif
    +
    +  assert( iDb>=0 && iDb<db->nDb );
    +  assert( db->aDb[iDb].pSchema );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  assert( iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );
    +
    +  /* zMasterSchema and zInitScript are set to point at the master schema
    +  ** and initialisation script appropriate for the database being
    +  ** initialised. zMasterName is the name of the master table.
    +  */
    +  if( !OMIT_TEMPDB && iDb==1 ){
    +    zMasterSchema = temp_master_schema;
    +  }else{
    +    zMasterSchema = master_schema;
    +  }
    +  zMasterName = SCHEMA_TABLE(iDb);
    +
    +  /* Construct the schema tables.  */
    +  azArg[0] = zMasterName;
    +  azArg[1] = "1";
    +  azArg[2] = zMasterSchema;
    +  azArg[3] = 0;
    +  initData.db = db;
    +  initData.iDb = iDb;
    +  initData.rc = SQLITE_OK;
    +  initData.pzErrMsg = pzErrMsg;
    +  (void)sqlite3SafetyOff(db);
    +  sqlite3InitCallback(&initData, 3, (char **)azArg, 0);
    +  (void)sqlite3SafetyOn(db);
    +  if( initData.rc ){
    +    rc = initData.rc;
    +    goto error_out;
    +  }
    +  pTab = sqlite3FindTable(db, zMasterName, db->aDb[iDb].zName);
    +  if( ALWAYS(pTab) ){
    +    pTab->tabFlags |= TF_Readonly;
    +  }
    +
    +  /* Create a cursor to hold the database open
    +  */
    +  pDb = &db->aDb[iDb];
    +  if( pDb->pBt==0 ){
    +    if( !OMIT_TEMPDB && ALWAYS(iDb==1) ){
    +      DbSetProperty(db, 1, DB_SchemaLoaded);
    +    }
    +    return SQLITE_OK;
    +  }
    +
    +  /* If there is not already a read-only (or read-write) transaction opened
    +  ** on the b-tree database, open one now. If a transaction is opened, it 
    +  ** will be closed before this function returns.  */
    +  sqlite3BtreeEnter(pDb->pBt);
    +  if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
    +    rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3SetString(pzErrMsg, db, "%s", sqlite3ErrStr(rc));
    +      goto initone_error_out;
    +    }
    +    openedTransaction = 1;
    +  }
    +
    +  /* Get the database meta information.
    +  **
    +  ** Meta values are as follows:
    +  **    meta[0]   Schema cookie.  Changes with each schema change.
    +  **    meta[1]   File format of schema layer.
    +  **    meta[2]   Size of the page cache.
    +  **    meta[3]   Largest rootpage (auto/incr_vacuum mode)
    +  **    meta[4]   Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE
    +  **    meta[5]   User version
    +  **    meta[6]   Incremental vacuum mode
    +  **    meta[7]   unused
    +  **    meta[8]   unused
    +  **    meta[9]   unused
    +  **
    +  ** Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to
    +  ** the possible values of meta[4].
    +  */
    +  for(i=0; i<ArraySize(meta); i++){
    +    sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
    +  }
    +  pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];
    +
    +  /* If opening a non-empty database, check the text encoding. For the
    +  ** main database, set sqlite3.enc to the encoding of the main database.
    +  ** For an attached db, it is an error if the encoding is not the same
    +  ** as sqlite3.enc.
    +  */
    +  if( meta[BTREE_TEXT_ENCODING-1] ){  /* text encoding */
    +    if( iDb==0 ){
    +      u8 encoding;
    +      /* If opening the main database, set ENC(db). */
    +      encoding = (u8)meta[BTREE_TEXT_ENCODING-1] & 3;
    +      if( encoding==0 ) encoding = SQLITE_UTF8;
    +      ENC(db) = encoding;
    +      db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
    +    }else{
    +      /* If opening an attached database, the encoding much match ENC(db) */
    +      if( meta[BTREE_TEXT_ENCODING-1]!=ENC(db) ){
    +        sqlite3SetString(pzErrMsg, db, "attached databases must use the same"
    +            " text encoding as main database");
    +        rc = SQLITE_ERROR;
    +        goto initone_error_out;
    +      }
    +    }
    +  }else{
    +    DbSetProperty(db, iDb, DB_Empty);
    +  }
    +  pDb->pSchema->enc = ENC(db);
    +
    +  if( pDb->pSchema->cache_size==0 ){
    +    size = meta[BTREE_DEFAULT_CACHE_SIZE-1];
    +    if( size==0 ){ size = SQLITE_DEFAULT_CACHE_SIZE; }
    +    if( size<0 ) size = -size;
    +    pDb->pSchema->cache_size = size;
    +    sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
    +  }
    +
    +  /*
    +  ** file_format==1    Version 3.0.0.
    +  ** file_format==2    Version 3.1.3.  // ALTER TABLE ADD COLUMN
    +  ** file_format==3    Version 3.1.4.  // ditto but with non-NULL defaults
    +  ** file_format==4    Version 3.3.0.  // DESC indices.  Boolean constants
    +  */
    +  pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];
    +  if( pDb->pSchema->file_format==0 ){
    +    pDb->pSchema->file_format = 1;
    +  }
    +  if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
    +    sqlite3SetString(pzErrMsg, db, "unsupported file format");
    +    rc = SQLITE_ERROR;
    +    goto initone_error_out;
    +  }
    +
    +  /* Ticket #2804:  When we open a database in the newer file format,
    +  ** clear the legacy_file_format pragma flag so that a VACUUM will
    +  ** not downgrade the database and thus invalidate any descending
    +  ** indices that the user might have created.
    +  */
    +  if( iDb==0 && meta[BTREE_FILE_FORMAT-1]>=4 ){
    +    db->flags &= ~SQLITE_LegacyFileFmt;
    +  }
    +
    +  /* Read the schema information out of the schema tables
    +  */
    +  assert( db->init.busy );
    +  {
    +    char *zSql;
    +    zSql = sqlite3MPrintf(db, 
    +        "SELECT name, rootpage, sql FROM '%q'.%s",
    +        db->aDb[iDb].zName, zMasterName);
    +    (void)sqlite3SafetyOff(db);
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +    {
    +      int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
    +      xAuth = db->xAuth;
    +      db->xAuth = 0;
    +#endif
    +      rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +      db->xAuth = xAuth;
    +    }
    +#endif
    +    if( rc==SQLITE_OK ) rc = initData.rc;
    +    (void)sqlite3SafetyOn(db);
    +    sqlite3DbFree(db, zSql);
    +#ifndef SQLITE_OMIT_ANALYZE
    +    if( rc==SQLITE_OK ){
    +      sqlite3AnalysisLoad(db, iDb);
    +    }
    +#endif
    +  }
    +  if( db->mallocFailed ){
    +    rc = SQLITE_NOMEM;
    +    sqlite3ResetInternalSchema(db, 0);
    +  }
    +  if( rc==SQLITE_OK || (db->flags&SQLITE_RecoveryMode)){
    +    /* Black magic: If the SQLITE_RecoveryMode flag is set, then consider
    +    ** the schema loaded, even if errors occurred. In this situation the 
    +    ** current sqlite3_prepare() operation will fail, but the following one
    +    ** will attempt to compile the supplied statement against whatever subset
    +    ** of the schema was loaded before the error occurred. The primary
    +    ** purpose of this is to allow access to the sqlite_master table
    +    ** even when its contents have been corrupted.
    +    */
    +    DbSetProperty(db, iDb, DB_SchemaLoaded);
    +    rc = SQLITE_OK;
    +  }
    +
    +  /* Jump here for an error that occurs after successfully allocating
    +  ** curMain and calling sqlite3BtreeEnter(). For an error that occurs
    +  ** before that point, jump to error_out.
    +  */
    +initone_error_out:
    +  if( openedTransaction ){
    +    sqlite3BtreeCommit(pDb->pBt);
    +  }
    +  sqlite3BtreeLeave(pDb->pBt);
    +
    +error_out:
    +  if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
    +    db->mallocFailed = 1;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Initialize all database files - the main database file, the file
    +** used to store temporary tables, and any additional database files
    +** created using ATTACH statements.  Return a success code.  If an
    +** error occurs, write an error message into *pzErrMsg.
    +**
    +** After a database is initialized, the DB_SchemaLoaded bit is set
    +** bit is set in the flags field of the Db structure. If the database
    +** file was of zero-length, then the DB_Empty flag is also set.
    +*/
    +SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
    +  int i, rc;
    +  int commit_internal = !(db->flags&SQLITE_InternChanges);
    +  
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  rc = SQLITE_OK;
    +  db->init.busy = 1;
    +  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
    +    if( DbHasProperty(db, i, DB_SchemaLoaded) || i==1 ) continue;
    +    rc = sqlite3InitOne(db, i, pzErrMsg);
    +    if( rc ){
    +      sqlite3ResetInternalSchema(db, i);
    +    }
    +  }
    +
    +  /* Once all the other databases have been initialised, load the schema
    +  ** for the TEMP database. This is loaded last, as the TEMP database
    +  ** schema may contain references to objects in other databases.
    +  */
    +#ifndef SQLITE_OMIT_TEMPDB
    +  if( rc==SQLITE_OK && ALWAYS(db->nDb>1)
    +                    && !DbHasProperty(db, 1, DB_SchemaLoaded) ){
    +    rc = sqlite3InitOne(db, 1, pzErrMsg);
    +    if( rc ){
    +      sqlite3ResetInternalSchema(db, 1);
    +    }
    +  }
    +#endif
    +
    +  db->init.busy = 0;
    +  if( rc==SQLITE_OK && commit_internal ){
    +    sqlite3CommitInternalChanges(db);
    +  }
    +
    +  return rc; 
    +}
    +
    +/*
    +** This routine is a no-op if the database schema is already initialised.
    +** Otherwise, the schema is loaded. An error code is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse){
    +  int rc = SQLITE_OK;
    +  sqlite3 *db = pParse->db;
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  if( !db->init.busy ){
    +    rc = sqlite3Init(db, &pParse->zErrMsg);
    +  }
    +  if( rc!=SQLITE_OK ){
    +    pParse->rc = rc;
    +    pParse->nErr++;
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Check schema cookies in all databases.  If any cookie is out
    +** of date set pParse->rc to SQLITE_SCHEMA.  If all schema cookies
    +** make no changes to pParse->rc.
    +*/
    +static void schemaIsValid(Parse *pParse){
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +  int rc;
    +  int cookie;
    +
    +  assert( pParse->checkSchema );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  for(iDb=0; iDb<db->nDb; iDb++){
    +    int openedTransaction = 0;         /* True if a transaction is opened */
    +    Btree *pBt = db->aDb[iDb].pBt;     /* Btree database to read cookie from */
    +    if( pBt==0 ) continue;
    +
    +    /* If there is not already a read-only (or read-write) transaction opened
    +    ** on the b-tree database, open one now. If a transaction is opened, it 
    +    ** will be closed immediately after reading the meta-value. */
    +    if( !sqlite3BtreeIsInReadTrans(pBt) ){
    +      rc = sqlite3BtreeBeginTrans(pBt, 0);
    +      if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
    +        db->mallocFailed = 1;
    +      }
    +      if( rc!=SQLITE_OK ) return;
    +      openedTransaction = 1;
    +    }
    +
    +    /* Read the schema cookie from the database. If it does not match the 
    +    ** value stored as part of the in the in-memory schema representation,
    +    ** set Parse.rc to SQLITE_SCHEMA. */
    +    sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
    +    if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){
    +      pParse->rc = SQLITE_SCHEMA;
    +    }
    +
    +    /* Close the transaction, if one was opened. */
    +    if( openedTransaction ){
    +      sqlite3BtreeCommit(pBt);
    +    }
    +  }
    +}
    +
    +/*
    +** Convert a schema pointer into the iDb index that indicates
    +** which database file in db->aDb[] the schema refers to.
    +**
    +** If the same database is attached more than once, the first
    +** attached database is returned.
    +*/
    +SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
    +  int i = -1000000;
    +
    +  /* If pSchema is NULL, then return -1000000. This happens when code in 
    +  ** expr.c is trying to resolve a reference to a transient table (i.e. one
    +  ** created by a sub-select). In this case the return value of this 
    +  ** function should never be used.
    +  **
    +  ** We return -1000000 instead of the more usual -1 simply because using
    +  ** -1000000 as the incorrect index into db->aDb[] is much 
    +  ** more likely to cause a segfault than -1 (of course there are assert()
    +  ** statements too, but it never hurts to play the odds).
    +  */
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  if( pSchema ){
    +    for(i=0; ALWAYS(i<db->nDb); i++){
    +      if( db->aDb[i].pSchema==pSchema ){
    +        break;
    +      }
    +    }
    +    assert( i>=0 && i<db->nDb );
    +  }
    +  return i;
    +}
    +
    +/*
    +** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
    +*/
    +static int sqlite3Prepare(
    +  sqlite3 *db,              /* Database handle. */
    +  const char *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
    +  Vdbe *pReprepare,         /* VM being reprepared */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const char **pzTail       /* OUT: End of parsed string */
    +){
    +  Parse *pParse;            /* Parsing context */
    +  char *zErrMsg = 0;        /* Error message */
    +  int rc = SQLITE_OK;       /* Result code */
    +  int i;                    /* Loop counter */
    +
    +  /* Allocate the parsing context */
    +  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
    +  if( pParse==0 ){
    +    rc = SQLITE_NOMEM;
    +    goto end_prepare;
    +  }
    +  pParse->pReprepare = pReprepare;
    +
    +  if( sqlite3SafetyOn(db) ){
    +    rc = SQLITE_MISUSE;
    +    goto end_prepare;
    +  }
    +  assert( ppStmt && *ppStmt==0 );
    +  assert( !db->mallocFailed );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +
    +  /* Check to verify that it is possible to get a read lock on all
    +  ** database schemas.  The inability to get a read lock indicates that
    +  ** some other database connection is holding a write-lock, which in
    +  ** turn means that the other connection has made uncommitted changes
    +  ** to the schema.
    +  **
    +  ** Were we to proceed and prepare the statement against the uncommitted
    +  ** schema changes and if those schema changes are subsequently rolled
    +  ** back and different changes are made in their place, then when this
    +  ** prepared statement goes to run the schema cookie would fail to detect
    +  ** the schema change.  Disaster would follow.
    +  **
    +  ** This thread is currently holding mutexes on all Btrees (because
    +  ** of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it
    +  ** is not possible for another thread to start a new schema change
    +  ** while this routine is running.  Hence, we do not need to hold 
    +  ** locks on the schema, we just need to make sure nobody else is 
    +  ** holding them.
    +  **
    +  ** Note that setting READ_UNCOMMITTED overrides most lock detection,
    +  ** but it does *not* override schema lock detection, so this all still
    +  ** works even if READ_UNCOMMITTED is set.
    +  */
    +  for(i=0; i<db->nDb; i++) {
    +    Btree *pBt = db->aDb[i].pBt;
    +    if( pBt ){
    +      assert( sqlite3BtreeHoldsMutex(pBt) );
    +      rc = sqlite3BtreeSchemaLocked(pBt);
    +      if( rc ){
    +        const char *zDb = db->aDb[i].zName;
    +        sqlite3Error(db, rc, "database schema is locked: %s", zDb);
    +        (void)sqlite3SafetyOff(db);
    +        testcase( db->flags & SQLITE_ReadUncommitted );
    +        goto end_prepare;
    +      }
    +    }
    +  }
    +
    +  sqlite3VtabUnlockList(db);
    +
    +  pParse->db = db;
    +  if( nBytes>=0 && (nBytes==0 || zSql[nBytes-1]!=0) ){
    +    char *zSqlCopy;
    +    int mxLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
    +    testcase( nBytes==mxLen );
    +    testcase( nBytes==mxLen+1 );
    +    if( nBytes>mxLen ){
    +      sqlite3Error(db, SQLITE_TOOBIG, "statement too long");
    +      (void)sqlite3SafetyOff(db);
    +      rc = sqlite3ApiExit(db, SQLITE_TOOBIG);
    +      goto end_prepare;
    +    }
    +    zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes);
    +    if( zSqlCopy ){
    +      sqlite3RunParser(pParse, zSqlCopy, &zErrMsg);
    +      sqlite3DbFree(db, zSqlCopy);
    +      pParse->zTail = &zSql[pParse->zTail-zSqlCopy];
    +    }else{
    +      pParse->zTail = &zSql[nBytes];
    +    }
    +  }else{
    +    sqlite3RunParser(pParse, zSql, &zErrMsg);
    +  }
    +
    +  if( db->mallocFailed ){
    +    pParse->rc = SQLITE_NOMEM;
    +  }
    +  if( pParse->rc==SQLITE_DONE ) pParse->rc = SQLITE_OK;
    +  if( pParse->checkSchema ){
    +    schemaIsValid(pParse);
    +  }
    +  if( pParse->rc==SQLITE_SCHEMA ){
    +    sqlite3ResetInternalSchema(db, 0);
    +  }
    +  if( db->mallocFailed ){
    +    pParse->rc = SQLITE_NOMEM;
    +  }
    +  if( pzTail ){
    +    *pzTail = pParse->zTail;
    +  }
    +  rc = pParse->rc;
    +
    +#ifndef SQLITE_OMIT_EXPLAIN
    +  if( rc==SQLITE_OK && pParse->pVdbe && pParse->explain ){
    +    static const char * const azColName[] = {
    +       "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment",
    +       "order", "from", "detail"
    +    };
    +    int iFirst, mx;
    +    if( pParse->explain==2 ){
    +      sqlite3VdbeSetNumCols(pParse->pVdbe, 3);
    +      iFirst = 8;
    +      mx = 11;
    +    }else{
    +      sqlite3VdbeSetNumCols(pParse->pVdbe, 8);
    +      iFirst = 0;
    +      mx = 8;
    +    }
    +    for(i=iFirst; i<mx; i++){
    +      sqlite3VdbeSetColName(pParse->pVdbe, i-iFirst, COLNAME_NAME,
    +                            azColName[i], SQLITE_STATIC);
    +    }
    +  }
    +#endif
    +
    +  if( sqlite3SafetyOff(db) ){
    +    rc = SQLITE_MISUSE;
    +  }
    +
    +  assert( db->init.busy==0 || saveSqlFlag==0 );
    +  if( db->init.busy==0 ){
    +    Vdbe *pVdbe = pParse->pVdbe;
    +    sqlite3VdbeSetSql(pVdbe, zSql, (int)(pParse->zTail-zSql), saveSqlFlag);
    +  }
    +  if( pParse->pVdbe && (rc!=SQLITE_OK || db->mallocFailed) ){
    +    sqlite3VdbeFinalize(pParse->pVdbe);
    +    assert(!(*ppStmt));
    +  }else{
    +    *ppStmt = (sqlite3_stmt*)pParse->pVdbe;
    +  }
    +
    +  if( zErrMsg ){
    +    sqlite3Error(db, rc, "%s", zErrMsg);
    +    sqlite3DbFree(db, zErrMsg);
    +  }else{
    +    sqlite3Error(db, rc, 0);
    +  }
    +
    +  /* Delete any TriggerPrg structures allocated while parsing this statement. */
    +  while( pParse->pTriggerPrg ){
    +    TriggerPrg *pT = pParse->pTriggerPrg;
    +    pParse->pTriggerPrg = pT->pNext;
    +    sqlite3VdbeProgramDelete(db, pT->pProgram, 0);
    +    sqlite3DbFree(db, pT);
    +  }
    +
    +end_prepare:
    +
    +  sqlite3StackFree(db, pParse);
    +  rc = sqlite3ApiExit(db, rc);
    +  assert( (rc&db->errMask)==rc );
    +  return rc;
    +}
    +static int sqlite3LockAndPrepare(
    +  sqlite3 *db,              /* Database handle. */
    +  const char *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
    +  Vdbe *pOld,               /* VM being reprepared */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const char **pzTail       /* OUT: End of parsed string */
    +){
    +  int rc;
    +  assert( ppStmt!=0 );
    +  *ppStmt = 0;
    +  if( !sqlite3SafetyCheckOk(db) ){
    +    return SQLITE_MISUSE;
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +  sqlite3BtreeEnterAll(db);
    +  rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
    +  if( rc==SQLITE_SCHEMA ){
    +    sqlite3_finalize(*ppStmt);
    +    rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
    +  }
    +  sqlite3BtreeLeaveAll(db);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Rerun the compilation of a statement after a schema change.
    +**
    +** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,
    +** if the statement cannot be recompiled because another connection has
    +** locked the sqlite3_master table, return SQLITE_LOCKED. If any other error
    +** occurs, return SQLITE_SCHEMA.
    +*/
    +SQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){
    +  int rc;
    +  sqlite3_stmt *pNew;
    +  const char *zSql;
    +  sqlite3 *db;
    +
    +  assert( sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex) );
    +  zSql = sqlite3_sql((sqlite3_stmt *)p);
    +  assert( zSql!=0 );  /* Reprepare only called for prepare_v2() statements */
    +  db = sqlite3VdbeDb(p);
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  rc = sqlite3LockAndPrepare(db, zSql, -1, 0, p, &pNew, 0);
    +  if( rc ){
    +    if( rc==SQLITE_NOMEM ){
    +      db->mallocFailed = 1;
    +    }
    +    assert( pNew==0 );
    +    return (rc==SQLITE_LOCKED) ? SQLITE_LOCKED : SQLITE_SCHEMA;
    +  }else{
    +    assert( pNew!=0 );
    +  }
    +  sqlite3VdbeSwap((Vdbe*)pNew, p);
    +  sqlite3TransferBindings(pNew, (sqlite3_stmt*)p);
    +  sqlite3VdbeResetStepResult((Vdbe*)pNew);
    +  sqlite3VdbeFinalize((Vdbe*)pNew);
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** Two versions of the official API.  Legacy and new use.  In the legacy
    +** version, the original SQL text is not saved in the prepared statement
    +** and so if a schema change occurs, SQLITE_SCHEMA is returned by
    +** sqlite3_step().  In the new version, the original SQL text is retained
    +** and the statement is automatically recompiled if an schema change
    +** occurs.
    +*/
    +SQLITE_API int sqlite3_prepare(
    +  sqlite3 *db,              /* Database handle. */
    +  const char *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const char **pzTail       /* OUT: End of parsed string */
    +){
    +  int rc;
    +  rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
    +  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
    +  return rc;
    +}
    +SQLITE_API int sqlite3_prepare_v2(
    +  sqlite3 *db,              /* Database handle. */
    +  const char *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const char **pzTail       /* OUT: End of parsed string */
    +){
    +  int rc;
    +  rc = sqlite3LockAndPrepare(db,zSql,nBytes,1,0,ppStmt,pzTail);
    +  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
    +  return rc;
    +}
    +
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Compile the UTF-16 encoded SQL statement zSql into a statement handle.
    +*/
    +static int sqlite3Prepare16(
    +  sqlite3 *db,              /* Database handle. */ 
    +  const void *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  int saveSqlFlag,          /* True to save SQL text into the sqlite3_stmt */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const void **pzTail       /* OUT: End of parsed string */
    +){
    +  /* This function currently works by first transforming the UTF-16
    +  ** encoded string to UTF-8, then invoking sqlite3_prepare(). The
    +  ** tricky bit is figuring out the pointer to return in *pzTail.
    +  */
    +  char *zSql8;
    +  const char *zTail8 = 0;
    +  int rc = SQLITE_OK;
    +
    +  assert( ppStmt );
    +  *ppStmt = 0;
    +  if( !sqlite3SafetyCheckOk(db) ){
    +    return SQLITE_MISUSE;
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +  zSql8 = sqlite3Utf16to8(db, zSql, nBytes);
    +  if( zSql8 ){
    +    rc = sqlite3LockAndPrepare(db, zSql8, -1, saveSqlFlag, 0, ppStmt, &zTail8);
    +  }
    +
    +  if( zTail8 && pzTail ){
    +    /* If sqlite3_prepare returns a tail pointer, we calculate the
    +    ** equivalent pointer into the UTF-16 string by counting the unicode
    +    ** characters between zSql8 and zTail8, and then returning a pointer
    +    ** the same number of characters into the UTF-16 string.
    +    */
    +    int chars_parsed = sqlite3Utf8CharLen(zSql8, (int)(zTail8-zSql8));
    +    *pzTail = (u8 *)zSql + sqlite3Utf16ByteLen(zSql, chars_parsed);
    +  }
    +  sqlite3DbFree(db, zSql8); 
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Two versions of the official API.  Legacy and new use.  In the legacy
    +** version, the original SQL text is not saved in the prepared statement
    +** and so if a schema change occurs, SQLITE_SCHEMA is returned by
    +** sqlite3_step().  In the new version, the original SQL text is retained
    +** and the statement is automatically recompiled if an schema change
    +** occurs.
    +*/
    +SQLITE_API int sqlite3_prepare16(
    +  sqlite3 *db,              /* Database handle. */ 
    +  const void *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const void **pzTail       /* OUT: End of parsed string */
    +){
    +  int rc;
    +  rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
    +  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
    +  return rc;
    +}
    +SQLITE_API int sqlite3_prepare16_v2(
    +  sqlite3 *db,              /* Database handle. */ 
    +  const void *zSql,         /* UTF-8 encoded SQL statement. */
    +  int nBytes,               /* Length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
    +  const void **pzTail       /* OUT: End of parsed string */
    +){
    +  int rc;
    +  rc = sqlite3Prepare16(db,zSql,nBytes,1,ppStmt,pzTail);
    +  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
    +  return rc;
    +}
    +
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/************** End of prepare.c *********************************************/
    +/************** Begin file select.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that are called by the parser
    +** to handle SELECT statements in SQLite.
    +**
    +** $Id: select.c,v 1.526 2009/08/01 15:09:58 drh Exp $
    +*/
    +
    +
    +/*
    +** Delete all the content of a Select structure but do not deallocate
    +** the select structure itself.
    +*/
    +static void clearSelect(sqlite3 *db, Select *p){
    +  sqlite3ExprListDelete(db, p->pEList);
    +  sqlite3SrcListDelete(db, p->pSrc);
    +  sqlite3ExprDelete(db, p->pWhere);
    +  sqlite3ExprListDelete(db, p->pGroupBy);
    +  sqlite3ExprDelete(db, p->pHaving);
    +  sqlite3ExprListDelete(db, p->pOrderBy);
    +  sqlite3SelectDelete(db, p->pPrior);
    +  sqlite3ExprDelete(db, p->pLimit);
    +  sqlite3ExprDelete(db, p->pOffset);
    +}
    +
    +/*
    +** Initialize a SelectDest structure.
    +*/
    +SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest *pDest, int eDest, int iParm){
    +  pDest->eDest = (u8)eDest;
    +  pDest->iParm = iParm;
    +  pDest->affinity = 0;
    +  pDest->iMem = 0;
    +  pDest->nMem = 0;
    +}
    +
    +
    +/*
    +** Allocate a new Select structure and return a pointer to that
    +** structure.
    +*/
    +SQLITE_PRIVATE Select *sqlite3SelectNew(
    +  Parse *pParse,        /* Parsing context */
    +  ExprList *pEList,     /* which columns to include in the result */
    +  SrcList *pSrc,        /* the FROM clause -- which tables to scan */
    +  Expr *pWhere,         /* the WHERE clause */
    +  ExprList *pGroupBy,   /* the GROUP BY clause */
    +  Expr *pHaving,        /* the HAVING clause */
    +  ExprList *pOrderBy,   /* the ORDER BY clause */
    +  int isDistinct,       /* true if the DISTINCT keyword is present */
    +  Expr *pLimit,         /* LIMIT value.  NULL means not used */
    +  Expr *pOffset         /* OFFSET value.  NULL means no offset */
    +){
    +  Select *pNew;
    +  Select standin;
    +  sqlite3 *db = pParse->db;
    +  pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );
    +  assert( db->mallocFailed || !pOffset || pLimit ); /* OFFSET implies LIMIT */
    +  if( pNew==0 ){
    +    pNew = &standin;
    +    memset(pNew, 0, sizeof(*pNew));
    +  }
    +  if( pEList==0 ){
    +    pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db,TK_ALL,0));
    +  }
    +  pNew->pEList = pEList;
    +  pNew->pSrc = pSrc;
    +  pNew->pWhere = pWhere;
    +  pNew->pGroupBy = pGroupBy;
    +  pNew->pHaving = pHaving;
    +  pNew->pOrderBy = pOrderBy;
    +  pNew->selFlags = isDistinct ? SF_Distinct : 0;
    +  pNew->op = TK_SELECT;
    +  pNew->pLimit = pLimit;
    +  pNew->pOffset = pOffset;
    +  assert( pOffset==0 || pLimit!=0 );
    +  pNew->addrOpenEphm[0] = -1;
    +  pNew->addrOpenEphm[1] = -1;
    +  pNew->addrOpenEphm[2] = -1;
    +  if( db->mallocFailed ) {
    +    clearSelect(db, pNew);
    +    if( pNew!=&standin ) sqlite3DbFree(db, pNew);
    +    pNew = 0;
    +  }
    +  return pNew;
    +}
    +
    +/*
    +** Delete the given Select structure and all of its substructures.
    +*/
    +SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
    +  if( p ){
    +    clearSelect(db, p);
    +    sqlite3DbFree(db, p);
    +  }
    +}
    +
    +/*
    +** Given 1 to 3 identifiers preceeding the JOIN keyword, determine the
    +** type of join.  Return an integer constant that expresses that type
    +** in terms of the following bit values:
    +**
    +**     JT_INNER
    +**     JT_CROSS
    +**     JT_OUTER
    +**     JT_NATURAL
    +**     JT_LEFT
    +**     JT_RIGHT
    +**
    +** A full outer join is the combination of JT_LEFT and JT_RIGHT.
    +**
    +** If an illegal or unsupported join type is seen, then still return
    +** a join type, but put an error in the pParse structure.
    +*/
    +SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
    +  int jointype = 0;
    +  Token *apAll[3];
    +  Token *p;
    +                             /*   0123456789 123456789 123456789 123 */
    +  static const char zKeyText[] = "naturaleftouterightfullinnercross";
    +  static const struct {
    +    u8 i;        /* Beginning of keyword text in zKeyText[] */
    +    u8 nChar;    /* Length of the keyword in characters */
    +    u8 code;     /* Join type mask */
    +  } aKeyword[] = {
    +    /* natural */ { 0,  7, JT_NATURAL                },
    +    /* left    */ { 6,  4, JT_LEFT|JT_OUTER          },
    +    /* outer   */ { 10, 5, JT_OUTER                  },
    +    /* right   */ { 14, 5, JT_RIGHT|JT_OUTER         },
    +    /* full    */ { 19, 4, JT_LEFT|JT_RIGHT|JT_OUTER },
    +    /* inner   */ { 23, 5, JT_INNER                  },
    +    /* cross   */ { 28, 5, JT_INNER|JT_CROSS         },
    +  };
    +  int i, j;
    +  apAll[0] = pA;
    +  apAll[1] = pB;
    +  apAll[2] = pC;
    +  for(i=0; i<3 && apAll[i]; i++){
    +    p = apAll[i];
    +    for(j=0; j<ArraySize(aKeyword); j++){
    +      if( p->n==aKeyword[j].nChar 
    +          && sqlite3StrNICmp((char*)p->z, &zKeyText[aKeyword[j].i], p->n)==0 ){
    +        jointype |= aKeyword[j].code;
    +        break;
    +      }
    +    }
    +    testcase( j==0 || j==1 || j==2 || j==3 || j==4 || j==5 || j==6 );
    +    if( j>=ArraySize(aKeyword) ){
    +      jointype |= JT_ERROR;
    +      break;
    +    }
    +  }
    +  if(
    +     (jointype & (JT_INNER|JT_OUTER))==(JT_INNER|JT_OUTER) ||
    +     (jointype & JT_ERROR)!=0
    +  ){
    +    const char *zSp = " ";
    +    assert( pB!=0 );
    +    if( pC==0 ){ zSp++; }
    +    sqlite3ErrorMsg(pParse, "unknown or unsupported join type: "
    +       "%T %T%s%T", pA, pB, zSp, pC);
    +    jointype = JT_INNER;
    +  }else if( (jointype & JT_OUTER)!=0 
    +         && (jointype & (JT_LEFT|JT_RIGHT))!=JT_LEFT ){
    +    sqlite3ErrorMsg(pParse, 
    +      "RIGHT and FULL OUTER JOINs are not currently supported");
    +    jointype = JT_INNER;
    +  }
    +  return jointype;
    +}
    +
    +/*
    +** Return the index of a column in a table.  Return -1 if the column
    +** is not contained in the table.
    +*/
    +static int columnIndex(Table *pTab, const char *zCol){
    +  int i;
    +  for(i=0; i<pTab->nCol; i++){
    +    if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
    +  }
    +  return -1;
    +}
    +
    +/*
    +** This function is used to add terms implied by JOIN syntax to the
    +** WHERE clause expression of a SELECT statement. The new term, which
    +** is ANDed with the existing WHERE clause, is of the form:
    +**
    +**    (tab1.col1 = tab2.col2)
    +**
    +** where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the 
    +** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
    +** column iColRight of tab2.
    +*/
    +static void addWhereTerm(
    +  Parse *pParse,                  /* Parsing context */
    +  SrcList *pSrc,                  /* List of tables in FROM clause */
    +  int iSrc,                       /* Index of first table to join in pSrc */
    +  int iColLeft,                   /* Index of column in first table */
    +  int iColRight,                  /* Index of column in second table */
    +  int isOuterJoin,                /* True if this is an OUTER join */
    +  Expr **ppWhere                  /* IN/OUT: The WHERE clause to add to */
    +){
    +  sqlite3 *db = pParse->db;
    +  Expr *pE1;
    +  Expr *pE2;
    +  Expr *pEq;
    +
    +  assert( pSrc->nSrc>(iSrc+1) );
    +  assert( pSrc->a[iSrc].pTab );
    +  assert( pSrc->a[iSrc+1].pTab );
    +
    +  pE1 = sqlite3CreateColumnExpr(db, pSrc, iSrc, iColLeft);
    +  pE2 = sqlite3CreateColumnExpr(db, pSrc, iSrc+1, iColRight);
    +
    +  pEq = sqlite3PExpr(pParse, TK_EQ, pE1, pE2, 0);
    +  if( pEq && isOuterJoin ){
    +    ExprSetProperty(pEq, EP_FromJoin);
    +    assert( !ExprHasAnyProperty(pEq, EP_TokenOnly|EP_Reduced) );
    +    ExprSetIrreducible(pEq);
    +    pEq->iRightJoinTable = (i16)pE2->iTable;
    +  }
    +  *ppWhere = sqlite3ExprAnd(db, *ppWhere, pEq);
    +}
    +
    +/*
    +** Set the EP_FromJoin property on all terms of the given expression.
    +** And set the Expr.iRightJoinTable to iTable for every term in the
    +** expression.
    +**
    +** The EP_FromJoin property is used on terms of an expression to tell
    +** the LEFT OUTER JOIN processing logic that this term is part of the
    +** join restriction specified in the ON or USING clause and not a part
    +** of the more general WHERE clause.  These terms are moved over to the
    +** WHERE clause during join processing but we need to remember that they
    +** originated in the ON or USING clause.
    +**
    +** The Expr.iRightJoinTable tells the WHERE clause processing that the
    +** expression depends on table iRightJoinTable even if that table is not
    +** explicitly mentioned in the expression.  That information is needed
    +** for cases like this:
    +**
    +**    SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5
    +**
    +** The where clause needs to defer the handling of the t1.x=5
    +** term until after the t2 loop of the join.  In that way, a
    +** NULL t2 row will be inserted whenever t1.x!=5.  If we do not
    +** defer the handling of t1.x=5, it will be processed immediately
    +** after the t1 loop and rows with t1.x!=5 will never appear in
    +** the output, which is incorrect.
    +*/
    +static void setJoinExpr(Expr *p, int iTable){
    +  while( p ){
    +    ExprSetProperty(p, EP_FromJoin);
    +    assert( !ExprHasAnyProperty(p, EP_TokenOnly|EP_Reduced) );
    +    ExprSetIrreducible(p);
    +    p->iRightJoinTable = (i16)iTable;
    +    setJoinExpr(p->pLeft, iTable);
    +    p = p->pRight;
    +  } 
    +}
    +
    +/*
    +** This routine processes the join information for a SELECT statement.
    +** ON and USING clauses are converted into extra terms of the WHERE clause.
    +** NATURAL joins also create extra WHERE clause terms.
    +**
    +** The terms of a FROM clause are contained in the Select.pSrc structure.
    +** The left most table is the first entry in Select.pSrc.  The right-most
    +** table is the last entry.  The join operator is held in the entry to
    +** the left.  Thus entry 0 contains the join operator for the join between
    +** entries 0 and 1.  Any ON or USING clauses associated with the join are
    +** also attached to the left entry.
    +**
    +** This routine returns the number of errors encountered.
    +*/
    +static int sqliteProcessJoin(Parse *pParse, Select *p){
    +  SrcList *pSrc;                  /* All tables in the FROM clause */
    +  int i, j;                       /* Loop counters */
    +  struct SrcList_item *pLeft;     /* Left table being joined */
    +  struct SrcList_item *pRight;    /* Right table being joined */
    +
    +  pSrc = p->pSrc;
    +  pLeft = &pSrc->a[0];
    +  pRight = &pLeft[1];
    +  for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){
    +    Table *pLeftTab = pLeft->pTab;
    +    Table *pRightTab = pRight->pTab;
    +    int isOuter;
    +
    +    if( NEVER(pLeftTab==0 || pRightTab==0) ) continue;
    +    isOuter = (pRight->jointype & JT_OUTER)!=0;
    +
    +    /* When the NATURAL keyword is present, add WHERE clause terms for
    +    ** every column that the two tables have in common.
    +    */
    +    if( pRight->jointype & JT_NATURAL ){
    +      if( pRight->pOn || pRight->pUsing ){
    +        sqlite3ErrorMsg(pParse, "a NATURAL join may not have "
    +           "an ON or USING clause", 0);
    +        return 1;
    +      }
    +      for(j=0; j<pLeftTab->nCol; j++){
    +        char *zName = pLeftTab->aCol[j].zName;
    +        int iRightCol = columnIndex(pRightTab, zName);
    +        if( iRightCol>=0 ){
    +          addWhereTerm(pParse, pSrc, i, j, iRightCol, isOuter, &p->pWhere);
    +        }
    +      }
    +    }
    +
    +    /* Disallow both ON and USING clauses in the same join
    +    */
    +    if( pRight->pOn && pRight->pUsing ){
    +      sqlite3ErrorMsg(pParse, "cannot have both ON and USING "
    +        "clauses in the same join");
    +      return 1;
    +    }
    +
    +    /* Add the ON clause to the end of the WHERE clause, connected by
    +    ** an AND operator.
    +    */
    +    if( pRight->pOn ){
    +      if( isOuter ) setJoinExpr(pRight->pOn, pRight->iCursor);
    +      p->pWhere = sqlite3ExprAnd(pParse->db, p->pWhere, pRight->pOn);
    +      pRight->pOn = 0;
    +    }
    +
    +    /* Create extra terms on the WHERE clause for each column named
    +    ** in the USING clause.  Example: If the two tables to be joined are 
    +    ** A and B and the USING clause names X, Y, and Z, then add this
    +    ** to the WHERE clause:    A.X=B.X AND A.Y=B.Y AND A.Z=B.Z
    +    ** Report an error if any column mentioned in the USING clause is
    +    ** not contained in both tables to be joined.
    +    */
    +    if( pRight->pUsing ){
    +      IdList *pList = pRight->pUsing;
    +      for(j=0; j<pList->nId; j++){
    +        char *zName = pList->a[j].zName;
    +        int iLeftCol = columnIndex(pLeftTab, zName);
    +        int iRightCol = columnIndex(pRightTab, zName);
    +        if( iLeftCol<0 || iRightCol<0 ){
    +          sqlite3ErrorMsg(pParse, "cannot join using column %s - column "
    +            "not present in both tables", zName);
    +          return 1;
    +        }
    +        addWhereTerm(pParse, pSrc, i, iLeftCol, iRightCol, isOuter, &p->pWhere);
    +      }
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Insert code into "v" that will push the record on the top of the
    +** stack into the sorter.
    +*/
    +static void pushOntoSorter(
    +  Parse *pParse,         /* Parser context */
    +  ExprList *pOrderBy,    /* The ORDER BY clause */
    +  Select *pSelect,       /* The whole SELECT statement */
    +  int regData            /* Register holding data to be sorted */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int nExpr = pOrderBy->nExpr;
    +  int regBase = sqlite3GetTempRange(pParse, nExpr+2);
    +  int regRecord = sqlite3GetTempReg(pParse);
    +  sqlite3ExprCacheClear(pParse);
    +  sqlite3ExprCodeExprList(pParse, pOrderBy, regBase, 0);
    +  sqlite3VdbeAddOp2(v, OP_Sequence, pOrderBy->iECursor, regBase+nExpr);
    +  sqlite3ExprCodeMove(pParse, regData, regBase+nExpr+1, 1);
    +  sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nExpr + 2, regRecord);
    +  sqlite3VdbeAddOp2(v, OP_IdxInsert, pOrderBy->iECursor, regRecord);
    +  sqlite3ReleaseTempReg(pParse, regRecord);
    +  sqlite3ReleaseTempRange(pParse, regBase, nExpr+2);
    +  if( pSelect->iLimit ){
    +    int addr1, addr2;
    +    int iLimit;
    +    if( pSelect->iOffset ){
    +      iLimit = pSelect->iOffset+1;
    +    }else{
    +      iLimit = pSelect->iLimit;
    +    }
    +    addr1 = sqlite3VdbeAddOp1(v, OP_IfZero, iLimit);
    +    sqlite3VdbeAddOp2(v, OP_AddImm, iLimit, -1);
    +    addr2 = sqlite3VdbeAddOp0(v, OP_Goto);
    +    sqlite3VdbeJumpHere(v, addr1);
    +    sqlite3VdbeAddOp1(v, OP_Last, pOrderBy->iECursor);
    +    sqlite3VdbeAddOp1(v, OP_Delete, pOrderBy->iECursor);
    +    sqlite3VdbeJumpHere(v, addr2);
    +    pSelect->iLimit = 0;
    +  }
    +}
    +
    +/*
    +** Add code to implement the OFFSET
    +*/
    +static void codeOffset(
    +  Vdbe *v,          /* Generate code into this VM */
    +  Select *p,        /* The SELECT statement being coded */
    +  int iContinue     /* Jump here to skip the current record */
    +){
    +  if( p->iOffset && iContinue!=0 ){
    +    int addr;
    +    sqlite3VdbeAddOp2(v, OP_AddImm, p->iOffset, -1);
    +    addr = sqlite3VdbeAddOp1(v, OP_IfNeg, p->iOffset);
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, iContinue);
    +    VdbeComment((v, "skip OFFSET records"));
    +    sqlite3VdbeJumpHere(v, addr);
    +  }
    +}
    +
    +/*
    +** Add code that will check to make sure the N registers starting at iMem
    +** form a distinct entry.  iTab is a sorting index that holds previously
    +** seen combinations of the N values.  A new entry is made in iTab
    +** if the current N values are new.
    +**
    +** A jump to addrRepeat is made and the N+1 values are popped from the
    +** stack if the top N elements are not distinct.
    +*/
    +static void codeDistinct(
    +  Parse *pParse,     /* Parsing and code generating context */
    +  int iTab,          /* A sorting index used to test for distinctness */
    +  int addrRepeat,    /* Jump to here if not distinct */
    +  int N,             /* Number of elements */
    +  int iMem           /* First element */
    +){
    +  Vdbe *v;
    +  int r1;
    +
    +  v = pParse->pVdbe;
    +  r1 = sqlite3GetTempReg(pParse);
    +  sqlite3VdbeAddOp3(v, OP_MakeRecord, iMem, N, r1);
    +  sqlite3VdbeAddOp3(v, OP_Found, iTab, addrRepeat, r1);
    +  sqlite3VdbeAddOp2(v, OP_IdxInsert, iTab, r1);
    +  sqlite3ReleaseTempReg(pParse, r1);
    +}
    +
    +/*
    +** Generate an error message when a SELECT is used within a subexpression
    +** (example:  "a IN (SELECT * FROM table)") but it has more than 1 result
    +** column.  We do this in a subroutine because the error occurs in multiple
    +** places.
    +*/
    +static int checkForMultiColumnSelectError(
    +  Parse *pParse,       /* Parse context. */
    +  SelectDest *pDest,   /* Destination of SELECT results */
    +  int nExpr            /* Number of result columns returned by SELECT */
    +){
    +  int eDest = pDest->eDest;
    +  if( nExpr>1 && (eDest==SRT_Mem || eDest==SRT_Set) ){
    +    sqlite3ErrorMsg(pParse, "only a single result allowed for "
    +       "a SELECT that is part of an expression");
    +    return 1;
    +  }else{
    +    return 0;
    +  }
    +}
    +
    +/*
    +** This routine generates the code for the inside of the inner loop
    +** of a SELECT.
    +**
    +** If srcTab and nColumn are both zero, then the pEList expressions
    +** are evaluated in order to get the data for this row.  If nColumn>0
    +** then data is pulled from srcTab and pEList is used only to get the
    +** datatypes for each column.
    +*/
    +static void selectInnerLoop(
    +  Parse *pParse,          /* The parser context */
    +  Select *p,              /* The complete select statement being coded */
    +  ExprList *pEList,       /* List of values being extracted */
    +  int srcTab,             /* Pull data from this table */
    +  int nColumn,            /* Number of columns in the source table */
    +  ExprList *pOrderBy,     /* If not NULL, sort results using this key */
    +  int distinct,           /* If >=0, make sure results are distinct */
    +  SelectDest *pDest,      /* How to dispose of the results */
    +  int iContinue,          /* Jump here to continue with next row */
    +  int iBreak              /* Jump here to break out of the inner loop */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  int hasDistinct;        /* True if the DISTINCT keyword is present */
    +  int regResult;              /* Start of memory holding result set */
    +  int eDest = pDest->eDest;   /* How to dispose of results */
    +  int iParm = pDest->iParm;   /* First argument to disposal method */
    +  int nResultCol;             /* Number of result columns */
    +
    +  assert( v );
    +  if( NEVER(v==0) ) return;
    +  assert( pEList!=0 );
    +  hasDistinct = distinct>=0;
    +  if( pOrderBy==0 && !hasDistinct ){
    +    codeOffset(v, p, iContinue);
    +  }
    +
    +  /* Pull the requested columns.
    +  */
    +  if( nColumn>0 ){
    +    nResultCol = nColumn;
    +  }else{
    +    nResultCol = pEList->nExpr;
    +  }
    +  if( pDest->iMem==0 ){
    +    pDest->iMem = pParse->nMem+1;
    +    pDest->nMem = nResultCol;
    +    pParse->nMem += nResultCol;
    +  }else{ 
    +    assert( pDest->nMem==nResultCol );
    +  }
    +  regResult = pDest->iMem;
    +  if( nColumn>0 ){
    +    for(i=0; i<nColumn; i++){
    +      sqlite3VdbeAddOp3(v, OP_Column, srcTab, i, regResult+i);
    +    }
    +  }else if( eDest!=SRT_Exists ){
    +    /* If the destination is an EXISTS(...) expression, the actual
    +    ** values returned by the SELECT are not required.
    +    */
    +    sqlite3ExprCacheClear(pParse);
    +    sqlite3ExprCodeExprList(pParse, pEList, regResult, eDest==SRT_Output);
    +  }
    +  nColumn = nResultCol;
    +
    +  /* If the DISTINCT keyword was present on the SELECT statement
    +  ** and this row has been seen before, then do not make this row
    +  ** part of the result.
    +  */
    +  if( hasDistinct ){
    +    assert( pEList!=0 );
    +    assert( pEList->nExpr==nColumn );
    +    codeDistinct(pParse, distinct, iContinue, nColumn, regResult);
    +    if( pOrderBy==0 ){
    +      codeOffset(v, p, iContinue);
    +    }
    +  }
    +
    +  if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
    +    return;
    +  }
    +
    +  switch( eDest ){
    +    /* In this mode, write each query result to the key of the temporary
    +    ** table iParm.
    +    */
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +    case SRT_Union: {
    +      int r1;
    +      r1 = sqlite3GetTempReg(pParse);
    +      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
    +      sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, r1);
    +      sqlite3ReleaseTempReg(pParse, r1);
    +      break;
    +    }
    +
    +    /* Construct a record from the query result, but instead of
    +    ** saving that record, use it as a key to delete elements from
    +    ** the temporary table iParm.
    +    */
    +    case SRT_Except: {
    +      sqlite3VdbeAddOp3(v, OP_IdxDelete, iParm, regResult, nColumn);
    +      break;
    +    }
    +#endif
    +
    +    /* Store the result as data using a unique key.
    +    */
    +    case SRT_Table:
    +    case SRT_EphemTab: {
    +      int r1 = sqlite3GetTempReg(pParse);
    +      testcase( eDest==SRT_Table );
    +      testcase( eDest==SRT_EphemTab );
    +      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
    +      if( pOrderBy ){
    +        pushOntoSorter(pParse, pOrderBy, p, r1);
    +      }else{
    +        int r2 = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, r2);
    +        sqlite3VdbeAddOp3(v, OP_Insert, iParm, r1, r2);
    +        sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +        sqlite3ReleaseTempReg(pParse, r2);
    +      }
    +      sqlite3ReleaseTempReg(pParse, r1);
    +      break;
    +    }
    +
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
    +    ** then there should be a single item on the stack.  Write this
    +    ** item into the set table with bogus data.
    +    */
    +    case SRT_Set: {
    +      assert( nColumn==1 );
    +      p->affinity = sqlite3CompareAffinity(pEList->a[0].pExpr, pDest->affinity);
    +      if( pOrderBy ){
    +        /* At first glance you would think we could optimize out the
    +        ** ORDER BY in this case since the order of entries in the set
    +        ** does not matter.  But there might be a LIMIT clause, in which
    +        ** case the order does matter */
    +        pushOntoSorter(pParse, pOrderBy, p, regResult);
    +      }else{
    +        int r1 = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp4(v, OP_MakeRecord, regResult, 1, r1, &p->affinity, 1);
    +        sqlite3ExprCacheAffinityChange(pParse, regResult, 1);
    +        sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, r1);
    +        sqlite3ReleaseTempReg(pParse, r1);
    +      }
    +      break;
    +    }
    +
    +    /* If any row exist in the result set, record that fact and abort.
    +    */
    +    case SRT_Exists: {
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, iParm);
    +      /* The LIMIT clause will terminate the loop for us */
    +      break;
    +    }
    +
    +    /* If this is a scalar select that is part of an expression, then
    +    ** store the results in the appropriate memory cell and break out
    +    ** of the scan loop.
    +    */
    +    case SRT_Mem: {
    +      assert( nColumn==1 );
    +      if( pOrderBy ){
    +        pushOntoSorter(pParse, pOrderBy, p, regResult);
    +      }else{
    +        sqlite3ExprCodeMove(pParse, regResult, iParm, 1);
    +        /* The LIMIT clause will jump out of the loop for us */
    +      }
    +      break;
    +    }
    +#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
    +
    +    /* Send the data to the callback function or to a subroutine.  In the
    +    ** case of a subroutine, the subroutine itself is responsible for
    +    ** popping the data from the stack.
    +    */
    +    case SRT_Coroutine:
    +    case SRT_Output: {
    +      testcase( eDest==SRT_Coroutine );
    +      testcase( eDest==SRT_Output );
    +      if( pOrderBy ){
    +        int r1 = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
    +        pushOntoSorter(pParse, pOrderBy, p, r1);
    +        sqlite3ReleaseTempReg(pParse, r1);
    +      }else if( eDest==SRT_Coroutine ){
    +        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, nColumn);
    +        sqlite3ExprCacheAffinityChange(pParse, regResult, nColumn);
    +      }
    +      break;
    +    }
    +
    +#if !defined(SQLITE_OMIT_TRIGGER)
    +    /* Discard the results.  This is used for SELECT statements inside
    +    ** the body of a TRIGGER.  The purpose of such selects is to call
    +    ** user-defined functions that have side effects.  We do not care
    +    ** about the actual results of the select.
    +    */
    +    default: {
    +      assert( eDest==SRT_Discard );
    +      break;
    +    }
    +#endif
    +  }
    +
    +  /* Jump to the end of the loop if the LIMIT is reached.
    +  */
    +  if( p->iLimit ){
    +    assert( pOrderBy==0 );  /* If there is an ORDER BY, the call to
    +                            ** pushOntoSorter() would have cleared p->iLimit */
    +    sqlite3VdbeAddOp2(v, OP_AddImm, p->iLimit, -1);
    +    sqlite3VdbeAddOp2(v, OP_IfZero, p->iLimit, iBreak);
    +  }
    +}
    +
    +/*
    +** Given an expression list, generate a KeyInfo structure that records
    +** the collating sequence for each expression in that expression list.
    +**
    +** If the ExprList is an ORDER BY or GROUP BY clause then the resulting
    +** KeyInfo structure is appropriate for initializing a virtual index to
    +** implement that clause.  If the ExprList is the result set of a SELECT
    +** then the KeyInfo structure is appropriate for initializing a virtual
    +** index to implement a DISTINCT test.
    +**
    +** Space to hold the KeyInfo structure is obtain from malloc.  The calling
    +** function is responsible for seeing that this structure is eventually
    +** freed.  Add the KeyInfo structure to the P4 field of an opcode using
    +** P4_KEYINFO_HANDOFF is the usual way of dealing with this.
    +*/
    +static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
    +  sqlite3 *db = pParse->db;
    +  int nExpr;
    +  KeyInfo *pInfo;
    +  struct ExprList_item *pItem;
    +  int i;
    +
    +  nExpr = pList->nExpr;
    +  pInfo = sqlite3DbMallocZero(db, sizeof(*pInfo) + nExpr*(sizeof(CollSeq*)+1) );
    +  if( pInfo ){
    +    pInfo->aSortOrder = (u8*)&pInfo->aColl[nExpr];
    +    pInfo->nField = (u16)nExpr;
    +    pInfo->enc = ENC(db);
    +    pInfo->db = db;
    +    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
    +      CollSeq *pColl;
    +      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
    +      if( !pColl ){
    +        pColl = db->pDfltColl;
    +      }
    +      pInfo->aColl[i] = pColl;
    +      pInfo->aSortOrder[i] = pItem->sortOrder;
    +    }
    +  }
    +  return pInfo;
    +}
    +
    +
    +/*
    +** If the inner loop was generated using a non-null pOrderBy argument,
    +** then the results were placed in a sorter.  After the loop is terminated
    +** we need to run the sorter and output the results.  The following
    +** routine generates the code needed to do that.
    +*/
    +static void generateSortTail(
    +  Parse *pParse,    /* Parsing context */
    +  Select *p,        /* The SELECT statement */
    +  Vdbe *v,          /* Generate code into this VDBE */
    +  int nColumn,      /* Number of columns of data */
    +  SelectDest *pDest /* Write the sorted results here */
    +){
    +  int addrBreak = sqlite3VdbeMakeLabel(v);     /* Jump here to exit loop */
    +  int addrContinue = sqlite3VdbeMakeLabel(v);  /* Jump here for next cycle */
    +  int addr;
    +  int iTab;
    +  int pseudoTab = 0;
    +  ExprList *pOrderBy = p->pOrderBy;
    +
    +  int eDest = pDest->eDest;
    +  int iParm = pDest->iParm;
    +
    +  int regRow;
    +  int regRowid;
    +
    +  iTab = pOrderBy->iECursor;
    +  regRow = sqlite3GetTempReg(pParse);
    +  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
    +    pseudoTab = pParse->nTab++;
    +    sqlite3VdbeAddOp3(v, OP_OpenPseudo, pseudoTab, regRow, nColumn);
    +    regRowid = 0;
    +  }else{
    +    regRowid = sqlite3GetTempReg(pParse);
    +  }
    +  addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, addrBreak);
    +  codeOffset(v, p, addrContinue);
    +  sqlite3VdbeAddOp3(v, OP_Column, iTab, pOrderBy->nExpr + 1, regRow);
    +  switch( eDest ){
    +    case SRT_Table:
    +    case SRT_EphemTab: {
    +      testcase( eDest==SRT_Table );
    +      testcase( eDest==SRT_EphemTab );
    +      sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, regRowid);
    +      sqlite3VdbeAddOp3(v, OP_Insert, iParm, regRow, regRowid);
    +      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    case SRT_Set: {
    +      assert( nColumn==1 );
    +      sqlite3VdbeAddOp4(v, OP_MakeRecord, regRow, 1, regRowid, &p->affinity, 1);
    +      sqlite3ExprCacheAffinityChange(pParse, regRow, 1);
    +      sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, regRowid);
    +      break;
    +    }
    +    case SRT_Mem: {
    +      assert( nColumn==1 );
    +      sqlite3ExprCodeMove(pParse, regRow, iParm, 1);
    +      /* The LIMIT clause will terminate the loop for us */
    +      break;
    +    }
    +#endif
    +    default: {
    +      int i;
    +      assert( eDest==SRT_Output || eDest==SRT_Coroutine ); 
    +      testcase( eDest==SRT_Output );
    +      testcase( eDest==SRT_Coroutine );
    +      for(i=0; i<nColumn; i++){
    +        assert( regRow!=pDest->iMem+i );
    +        sqlite3VdbeAddOp3(v, OP_Column, pseudoTab, i, pDest->iMem+i);
    +        if( i==0 ){
    +          sqlite3VdbeChangeP5(v, OPFLAG_CLEARCACHE);
    +        }
    +      }
    +      if( eDest==SRT_Output ){
    +        sqlite3VdbeAddOp2(v, OP_ResultRow, pDest->iMem, nColumn);
    +        sqlite3ExprCacheAffinityChange(pParse, pDest->iMem, nColumn);
    +      }else{
    +        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
    +      }
    +      break;
    +    }
    +  }
    +  sqlite3ReleaseTempReg(pParse, regRow);
    +  sqlite3ReleaseTempReg(pParse, regRowid);
    +
    +  /* LIMIT has been implemented by the pushOntoSorter() routine.
    +  */
    +  assert( p->iLimit==0 );
    +
    +  /* The bottom of the loop
    +  */
    +  sqlite3VdbeResolveLabel(v, addrContinue);
    +  sqlite3VdbeAddOp2(v, OP_Next, iTab, addr);
    +  sqlite3VdbeResolveLabel(v, addrBreak);
    +  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
    +    sqlite3VdbeAddOp2(v, OP_Close, pseudoTab, 0);
    +  }
    +}
    +
    +/*
    +** Return a pointer to a string containing the 'declaration type' of the
    +** expression pExpr. The string may be treated as static by the caller.
    +**
    +** The declaration type is the exact datatype definition extracted from the
    +** original CREATE TABLE statement if the expression is a column. The
    +** declaration type for a ROWID field is INTEGER. Exactly when an expression
    +** is considered a column can be complex in the presence of subqueries. The
    +** result-set expression in all of the following SELECT statements is 
    +** considered a column by this function.
    +**
    +**   SELECT col FROM tbl;
    +**   SELECT (SELECT col FROM tbl;
    +**   SELECT (SELECT col FROM tbl);
    +**   SELECT abc FROM (SELECT col AS abc FROM tbl);
    +** 
    +** The declaration type for any expression other than a column is NULL.
    +*/
    +static const char *columnType(
    +  NameContext *pNC, 
    +  Expr *pExpr,
    +  const char **pzOriginDb,
    +  const char **pzOriginTab,
    +  const char **pzOriginCol
    +){
    +  char const *zType = 0;
    +  char const *zOriginDb = 0;
    +  char const *zOriginTab = 0;
    +  char const *zOriginCol = 0;
    +  int j;
    +  if( NEVER(pExpr==0) || pNC->pSrcList==0 ) return 0;
    +
    +  switch( pExpr->op ){
    +    case TK_AGG_COLUMN:
    +    case TK_COLUMN: {
    +      /* The expression is a column. Locate the table the column is being
    +      ** extracted from in NameContext.pSrcList. This table may be real
    +      ** database table or a subquery.
    +      */
    +      Table *pTab = 0;            /* Table structure column is extracted from */
    +      Select *pS = 0;             /* Select the column is extracted from */
    +      int iCol = pExpr->iColumn;  /* Index of column in pTab */
    +      testcase( pExpr->op==TK_AGG_COLUMN );
    +      testcase( pExpr->op==TK_COLUMN );
    +      while( pNC && !pTab ){
    +        SrcList *pTabList = pNC->pSrcList;
    +        for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
    +        if( j<pTabList->nSrc ){
    +          pTab = pTabList->a[j].pTab;
    +          pS = pTabList->a[j].pSelect;
    +        }else{
    +          pNC = pNC->pNext;
    +        }
    +      }
    +
    +      if( pTab==0 ){
    +        /* At one time, code such as "SELECT new.x" within a trigger would
    +        ** cause this condition to run.  Since then, we have restructured how
    +        ** trigger code is generated and so this condition is no longer 
    +        ** possible. However, it can still be true for statements like
    +        ** the following:
    +        **
    +        **   CREATE TABLE t1(col INTEGER);
    +        **   SELECT (SELECT t1.col) FROM FROM t1;
    +        **
    +        ** when columnType() is called on the expression "t1.col" in the 
    +        ** sub-select. In this case, set the column type to NULL, even
    +        ** though it should really be "INTEGER".
    +        **
    +        ** This is not a problem, as the column type of "t1.col" is never
    +        ** used. When columnType() is called on the expression 
    +        ** "(SELECT t1.col)", the correct type is returned (see the TK_SELECT
    +        ** branch below.  */
    +        break;
    +      }
    +
    +      assert( pTab && pExpr->pTab==pTab );
    +      if( pS ){
    +        /* The "table" is actually a sub-select or a view in the FROM clause
    +        ** of the SELECT statement. Return the declaration type and origin
    +        ** data for the result-set column of the sub-select.
    +        */
    +        if( ALWAYS(iCol>=0 && iCol<pS->pEList->nExpr) ){
    +          /* If iCol is less than zero, then the expression requests the
    +          ** rowid of the sub-select or view. This expression is legal (see 
    +          ** test case misc2.2.2) - it always evaluates to NULL.
    +          */
    +          NameContext sNC;
    +          Expr *p = pS->pEList->a[iCol].pExpr;
    +          sNC.pSrcList = pS->pSrc;
    +          sNC.pNext = pNC;
    +          sNC.pParse = pNC->pParse;
    +          zType = columnType(&sNC, p, &zOriginDb, &zOriginTab, &zOriginCol); 
    +        }
    +      }else if( ALWAYS(pTab->pSchema) ){
    +        /* A real table */
    +        assert( !pS );
    +        if( iCol<0 ) iCol = pTab->iPKey;
    +        assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
    +        if( iCol<0 ){
    +          zType = "INTEGER";
    +          zOriginCol = "rowid";
    +        }else{
    +          zType = pTab->aCol[iCol].zType;
    +          zOriginCol = pTab->aCol[iCol].zName;
    +        }
    +        zOriginTab = pTab->zName;
    +        if( pNC->pParse ){
    +          int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema);
    +          zOriginDb = pNC->pParse->db->aDb[iDb].zName;
    +        }
    +      }
    +      break;
    +    }
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    case TK_SELECT: {
    +      /* The expression is a sub-select. Return the declaration type and
    +      ** origin info for the single column in the result set of the SELECT
    +      ** statement.
    +      */
    +      NameContext sNC;
    +      Select *pS = pExpr->x.pSelect;
    +      Expr *p = pS->pEList->a[0].pExpr;
    +      assert( ExprHasProperty(pExpr, EP_xIsSelect) );
    +      sNC.pSrcList = pS->pSrc;
    +      sNC.pNext = pNC;
    +      sNC.pParse = pNC->pParse;
    +      zType = columnType(&sNC, p, &zOriginDb, &zOriginTab, &zOriginCol); 
    +      break;
    +    }
    +#endif
    +  }
    +  
    +  if( pzOriginDb ){
    +    assert( pzOriginTab && pzOriginCol );
    +    *pzOriginDb = zOriginDb;
    +    *pzOriginTab = zOriginTab;
    +    *pzOriginCol = zOriginCol;
    +  }
    +  return zType;
    +}
    +
    +/*
    +** Generate code that will tell the VDBE the declaration types of columns
    +** in the result set.
    +*/
    +static void generateColumnTypes(
    +  Parse *pParse,      /* Parser context */
    +  SrcList *pTabList,  /* List of tables */
    +  ExprList *pEList    /* Expressions defining the result set */
    +){
    +#ifndef SQLITE_OMIT_DECLTYPE
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  NameContext sNC;
    +  sNC.pSrcList = pTabList;
    +  sNC.pParse = pParse;
    +  for(i=0; i<pEList->nExpr; i++){
    +    Expr *p = pEList->a[i].pExpr;
    +    const char *zType;
    +#ifdef SQLITE_ENABLE_COLUMN_METADATA
    +    const char *zOrigDb = 0;
    +    const char *zOrigTab = 0;
    +    const char *zOrigCol = 0;
    +    zType = columnType(&sNC, p, &zOrigDb, &zOrigTab, &zOrigCol);
    +
    +    /* The vdbe must make its own copy of the column-type and other 
    +    ** column specific strings, in case the schema is reset before this
    +    ** virtual machine is deleted.
    +    */
    +    sqlite3VdbeSetColName(v, i, COLNAME_DATABASE, zOrigDb, SQLITE_TRANSIENT);
    +    sqlite3VdbeSetColName(v, i, COLNAME_TABLE, zOrigTab, SQLITE_TRANSIENT);
    +    sqlite3VdbeSetColName(v, i, COLNAME_COLUMN, zOrigCol, SQLITE_TRANSIENT);
    +#else
    +    zType = columnType(&sNC, p, 0, 0, 0);
    +#endif
    +    sqlite3VdbeSetColName(v, i, COLNAME_DECLTYPE, zType, SQLITE_TRANSIENT);
    +  }
    +#endif /* SQLITE_OMIT_DECLTYPE */
    +}
    +
    +/*
    +** Generate code that will tell the VDBE the names of columns
    +** in the result set.  This information is used to provide the
    +** azCol[] values in the callback.
    +*/
    +static void generateColumnNames(
    +  Parse *pParse,      /* Parser context */
    +  SrcList *pTabList,  /* List of tables */
    +  ExprList *pEList    /* Expressions defining the result set */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int i, j;
    +  sqlite3 *db = pParse->db;
    +  int fullNames, shortNames;
    +
    +#ifndef SQLITE_OMIT_EXPLAIN
    +  /* If this is an EXPLAIN, skip this step */
    +  if( pParse->explain ){
    +    return;
    +  }
    +#endif
    +
    +  if( pParse->colNamesSet || NEVER(v==0) || db->mallocFailed ) return;
    +  pParse->colNamesSet = 1;
    +  fullNames = (db->flags & SQLITE_FullColNames)!=0;
    +  shortNames = (db->flags & SQLITE_ShortColNames)!=0;
    +  sqlite3VdbeSetNumCols(v, pEList->nExpr);
    +  for(i=0; i<pEList->nExpr; i++){
    +    Expr *p;
    +    p = pEList->a[i].pExpr;
    +    if( NEVER(p==0) ) continue;
    +    if( pEList->a[i].zName ){
    +      char *zName = pEList->a[i].zName;
    +      sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
    +    }else if( (p->op==TK_COLUMN || p->op==TK_AGG_COLUMN) && pTabList ){
    +      Table *pTab;
    +      char *zCol;
    +      int iCol = p->iColumn;
    +      for(j=0; ALWAYS(j<pTabList->nSrc); j++){
    +        if( pTabList->a[j].iCursor==p->iTable ) break;
    +      }
    +      assert( j<pTabList->nSrc );
    +      pTab = pTabList->a[j].pTab;
    +      if( iCol<0 ) iCol = pTab->iPKey;
    +      assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
    +      if( iCol<0 ){
    +        zCol = "rowid";
    +      }else{
    +        zCol = pTab->aCol[iCol].zName;
    +      }
    +      if( !shortNames && !fullNames ){
    +        sqlite3VdbeSetColName(v, i, COLNAME_NAME, 
    +            sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
    +      }else if( fullNames ){
    +        char *zName = 0;
    +        zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
    +        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
    +      }else{
    +        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT);
    +      }
    +    }else{
    +      sqlite3VdbeSetColName(v, i, COLNAME_NAME, 
    +          sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
    +    }
    +  }
    +  generateColumnTypes(pParse, pTabList, pEList);
    +}
    +
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +/*
    +** Name of the connection operator, used for error messages.
    +*/
    +static const char *selectOpName(int id){
    +  char *z;
    +  switch( id ){
    +    case TK_ALL:       z = "UNION ALL";   break;
    +    case TK_INTERSECT: z = "INTERSECT";   break;
    +    case TK_EXCEPT:    z = "EXCEPT";      break;
    +    default:           z = "UNION";       break;
    +  }
    +  return z;
    +}
    +#endif /* SQLITE_OMIT_COMPOUND_SELECT */
    +
    +/*
    +** Given a an expression list (which is really the list of expressions
    +** that form the result set of a SELECT statement) compute appropriate
    +** column names for a table that would hold the expression list.
    +**
    +** All column names will be unique.
    +**
    +** Only the column names are computed.  Column.zType, Column.zColl,
    +** and other fields of Column are zeroed.
    +**
    +** Return SQLITE_OK on success.  If a memory allocation error occurs,
    +** store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.
    +*/
    +static int selectColumnsFromExprList(
    +  Parse *pParse,          /* Parsing context */
    +  ExprList *pEList,       /* Expr list from which to derive column names */
    +  int *pnCol,             /* Write the number of columns here */
    +  Column **paCol          /* Write the new column list here */
    +){
    +  sqlite3 *db = pParse->db;   /* Database connection */
    +  int i, j;                   /* Loop counters */
    +  int cnt;                    /* Index added to make the name unique */
    +  Column *aCol, *pCol;        /* For looping over result columns */
    +  int nCol;                   /* Number of columns in the result set */
    +  Expr *p;                    /* Expression for a single result column */
    +  char *zName;                /* Column name */
    +  int nName;                  /* Size of name in zName[] */
    +
    +  *pnCol = nCol = pEList->nExpr;
    +  aCol = *paCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);
    +  if( aCol==0 ) return SQLITE_NOMEM;
    +  for(i=0, pCol=aCol; i<nCol; i++, pCol++){
    +    /* Get an appropriate name for the column
    +    */
    +    p = pEList->a[i].pExpr;
    +    assert( p->pRight==0 || ExprHasProperty(p->pRight, EP_IntValue)
    +               || p->pRight->u.zToken==0 || p->pRight->u.zToken[0]!=0 );
    +    if( (zName = pEList->a[i].zName)!=0 ){
    +      /* If the column contains an "AS <name>" phrase, use <name> as the name */
    +      zName = sqlite3DbStrDup(db, zName);
    +    }else{
    +      Expr *pColExpr = p;  /* The expression that is the result column name */
    +      Table *pTab;         /* Table associated with this expression */
    +      while( pColExpr->op==TK_DOT ) pColExpr = pColExpr->pRight;
    +      if( pColExpr->op==TK_COLUMN && ALWAYS(pColExpr->pTab!=0) ){
    +        /* For columns use the column name name */
    +        int iCol = pColExpr->iColumn;
    +        pTab = pColExpr->pTab;
    +        if( iCol<0 ) iCol = pTab->iPKey;
    +        zName = sqlite3MPrintf(db, "%s",
    +                 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
    +      }else if( pColExpr->op==TK_ID ){
    +        assert( !ExprHasProperty(pColExpr, EP_IntValue) );
    +        zName = sqlite3MPrintf(db, "%s", pColExpr->u.zToken);
    +      }else{
    +        /* Use the original text of the column expression as its name */
    +        zName = sqlite3MPrintf(db, "%s", pEList->a[i].zSpan);
    +      }
    +    }
    +    if( db->mallocFailed ){
    +      sqlite3DbFree(db, zName);
    +      break;
    +    }
    +
    +    /* Make sure the column name is unique.  If the name is not unique,
    +    ** append a integer to the name so that it becomes unique.
    +    */
    +    nName = sqlite3Strlen30(zName);
    +    for(j=cnt=0; j<i; j++){
    +      if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
    +        char *zNewName;
    +        zName[nName] = 0;
    +        zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
    +        sqlite3DbFree(db, zName);
    +        zName = zNewName;
    +        j = -1;
    +        if( zName==0 ) break;
    +      }
    +    }
    +    pCol->zName = zName;
    +  }
    +  if( db->mallocFailed ){
    +    for(j=0; j<i; j++){
    +      sqlite3DbFree(db, aCol[j].zName);
    +    }
    +    sqlite3DbFree(db, aCol);
    +    *paCol = 0;
    +    *pnCol = 0;
    +    return SQLITE_NOMEM;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Add type and collation information to a column list based on
    +** a SELECT statement.
    +** 
    +** The column list presumably came from selectColumnNamesFromExprList().
    +** The column list has only names, not types or collations.  This
    +** routine goes through and adds the types and collations.
    +**
    +** This routine requires that all identifiers in the SELECT
    +** statement be resolved.
    +*/
    +static void selectAddColumnTypeAndCollation(
    +  Parse *pParse,        /* Parsing contexts */
    +  int nCol,             /* Number of columns */
    +  Column *aCol,         /* List of columns */
    +  Select *pSelect       /* SELECT used to determine types and collations */
    +){
    +  sqlite3 *db = pParse->db;
    +  NameContext sNC;
    +  Column *pCol;
    +  CollSeq *pColl;
    +  int i;
    +  Expr *p;
    +  struct ExprList_item *a;
    +
    +  assert( pSelect!=0 );
    +  assert( (pSelect->selFlags & SF_Resolved)!=0 );
    +  assert( nCol==pSelect->pEList->nExpr || db->mallocFailed );
    +  if( db->mallocFailed ) return;
    +  memset(&sNC, 0, sizeof(sNC));
    +  sNC.pSrcList = pSelect->pSrc;
    +  a = pSelect->pEList->a;
    +  for(i=0, pCol=aCol; i<nCol; i++, pCol++){
    +    p = a[i].pExpr;
    +    pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p, 0, 0, 0));
    +    pCol->affinity = sqlite3ExprAffinity(p);
    +    if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_NONE;
    +    pColl = sqlite3ExprCollSeq(pParse, p);
    +    if( pColl ){
    +      pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
    +    }
    +  }
    +}
    +
    +/*
    +** Given a SELECT statement, generate a Table structure that describes
    +** the result set of that SELECT.
    +*/
    +SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
    +  Table *pTab;
    +  sqlite3 *db = pParse->db;
    +  int savedFlags;
    +
    +  savedFlags = db->flags;
    +  db->flags &= ~SQLITE_FullColNames;
    +  db->flags |= SQLITE_ShortColNames;
    +  sqlite3SelectPrep(pParse, pSelect, 0);
    +  if( pParse->nErr ) return 0;
    +  while( pSelect->pPrior ) pSelect = pSelect->pPrior;
    +  db->flags = savedFlags;
    +  pTab = sqlite3DbMallocZero(db, sizeof(Table) );
    +  if( pTab==0 ){
    +    return 0;
    +  }
    +  /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
    +  ** is disabled, so we might as well hard-code pTab->dbMem to NULL. */
    +  assert( db->lookaside.bEnabled==0 );
    +  pTab->dbMem = 0;
    +  pTab->nRef = 1;
    +  pTab->zName = 0;
    +  selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
    +  selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSelect);
    +  pTab->iPKey = -1;
    +  if( db->mallocFailed ){
    +    sqlite3DeleteTable(pTab);
    +    return 0;
    +  }
    +  return pTab;
    +}
    +
    +/*
    +** Get a VDBE for the given parser context.  Create a new one if necessary.
    +** If an error occurs, return NULL and leave a message in pParse.
    +*/
    +SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse *pParse){
    +  Vdbe *v = pParse->pVdbe;
    +  if( v==0 ){
    +    v = pParse->pVdbe = sqlite3VdbeCreate(pParse->db);
    +#ifndef SQLITE_OMIT_TRACE
    +    if( v ){
    +      sqlite3VdbeAddOp0(v, OP_Trace);
    +    }
    +#endif
    +  }
    +  return v;
    +}
    +
    +
    +/*
    +** Compute the iLimit and iOffset fields of the SELECT based on the
    +** pLimit and pOffset expressions.  pLimit and pOffset hold the expressions
    +** that appear in the original SQL statement after the LIMIT and OFFSET
    +** keywords.  Or NULL if those keywords are omitted. iLimit and iOffset 
    +** are the integer memory register numbers for counters used to compute 
    +** the limit and offset.  If there is no limit and/or offset, then 
    +** iLimit and iOffset are negative.
    +**
    +** This routine changes the values of iLimit and iOffset only if
    +** a limit or offset is defined by pLimit and pOffset.  iLimit and
    +** iOffset should have been preset to appropriate default values
    +** (usually but not always -1) prior to calling this routine.
    +** Only if pLimit!=0 or pOffset!=0 do the limit registers get
    +** redefined.  The UNION ALL operator uses this property to force
    +** the reuse of the same limit and offset registers across multiple
    +** SELECT statements.
    +*/
    +static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){
    +  Vdbe *v = 0;
    +  int iLimit = 0;
    +  int iOffset;
    +  int addr1;
    +  if( p->iLimit ) return;
    +
    +  /* 
    +  ** "LIMIT -1" always shows all rows.  There is some
    +  ** contraversy about what the correct behavior should be.
    +  ** The current implementation interprets "LIMIT 0" to mean
    +  ** no rows.
    +  */
    +  sqlite3ExprCacheClear(pParse);
    +  assert( p->pOffset==0 || p->pLimit!=0 );
    +  if( p->pLimit ){
    +    p->iLimit = iLimit = ++pParse->nMem;
    +    v = sqlite3GetVdbe(pParse);
    +    if( NEVER(v==0) ) return;  /* VDBE should have already been allocated */
    +    sqlite3ExprCode(pParse, p->pLimit, iLimit);
    +    sqlite3VdbeAddOp1(v, OP_MustBeInt, iLimit);
    +    VdbeComment((v, "LIMIT counter"));
    +    sqlite3VdbeAddOp2(v, OP_IfZero, iLimit, iBreak);
    +    if( p->pOffset ){
    +      p->iOffset = iOffset = ++pParse->nMem;
    +      pParse->nMem++;   /* Allocate an extra register for limit+offset */
    +      sqlite3ExprCode(pParse, p->pOffset, iOffset);
    +      sqlite3VdbeAddOp1(v, OP_MustBeInt, iOffset);
    +      VdbeComment((v, "OFFSET counter"));
    +      addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iOffset);
    +      sqlite3VdbeAddOp2(v, OP_Integer, 0, iOffset);
    +      sqlite3VdbeJumpHere(v, addr1);
    +      sqlite3VdbeAddOp3(v, OP_Add, iLimit, iOffset, iOffset+1);
    +      VdbeComment((v, "LIMIT+OFFSET"));
    +      addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iLimit);
    +      sqlite3VdbeAddOp2(v, OP_Integer, -1, iOffset+1);
    +      sqlite3VdbeJumpHere(v, addr1);
    +    }
    +  }
    +}
    +
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +/*
    +** Return the appropriate collating sequence for the iCol-th column of
    +** the result set for the compound-select statement "p".  Return NULL if
    +** the column has no default collating sequence.
    +**
    +** The collating sequence for the compound select is taken from the
    +** left-most term of the select that has a collating sequence.
    +*/
    +static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
    +  CollSeq *pRet;
    +  if( p->pPrior ){
    +    pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);
    +  }else{
    +    pRet = 0;
    +  }
    +  assert( iCol>=0 );
    +  if( pRet==0 && iCol<p->pEList->nExpr ){
    +    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
    +  }
    +  return pRet;
    +}
    +#endif /* SQLITE_OMIT_COMPOUND_SELECT */
    +
    +/* Forward reference */
    +static int multiSelectOrderBy(
    +  Parse *pParse,        /* Parsing context */
    +  Select *p,            /* The right-most of SELECTs to be coded */
    +  SelectDest *pDest     /* What to do with query results */
    +);
    +
    +
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +/*
    +** This routine is called to process a compound query form from
    +** two or more separate queries using UNION, UNION ALL, EXCEPT, or
    +** INTERSECT
    +**
    +** "p" points to the right-most of the two queries.  the query on the
    +** left is p->pPrior.  The left query could also be a compound query
    +** in which case this routine will be called recursively. 
    +**
    +** The results of the total query are to be written into a destination
    +** of type eDest with parameter iParm.
    +**
    +** Example 1:  Consider a three-way compound SQL statement.
    +**
    +**     SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3
    +**
    +** This statement is parsed up as follows:
    +**
    +**     SELECT c FROM t3
    +**      |
    +**      `----->  SELECT b FROM t2
    +**                |
    +**                `------>  SELECT a FROM t1
    +**
    +** The arrows in the diagram above represent the Select.pPrior pointer.
    +** So if this routine is called with p equal to the t3 query, then
    +** pPrior will be the t2 query.  p->op will be TK_UNION in this case.
    +**
    +** Notice that because of the way SQLite parses compound SELECTs, the
    +** individual selects always group from left to right.
    +*/
    +static int multiSelect(
    +  Parse *pParse,        /* Parsing context */
    +  Select *p,            /* The right-most of SELECTs to be coded */
    +  SelectDest *pDest     /* What to do with query results */
    +){
    +  int rc = SQLITE_OK;   /* Success code from a subroutine */
    +  Select *pPrior;       /* Another SELECT immediately to our left */
    +  Vdbe *v;              /* Generate code to this VDBE */
    +  SelectDest dest;      /* Alternative data destination */
    +  Select *pDelete = 0;  /* Chain of simple selects to delete */
    +  sqlite3 *db;          /* Database connection */
    +
    +  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
    +  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
    +  */
    +  assert( p && p->pPrior );  /* Calling function guarantees this much */
    +  db = pParse->db;
    +  pPrior = p->pPrior;
    +  assert( pPrior->pRightmost!=pPrior );
    +  assert( pPrior->pRightmost==p->pRightmost );
    +  dest = *pDest;
    +  if( pPrior->pOrderBy ){
    +    sqlite3ErrorMsg(pParse,"ORDER BY clause should come after %s not before",
    +      selectOpName(p->op));
    +    rc = 1;
    +    goto multi_select_end;
    +  }
    +  if( pPrior->pLimit ){
    +    sqlite3ErrorMsg(pParse,"LIMIT clause should come after %s not before",
    +      selectOpName(p->op));
    +    rc = 1;
    +    goto multi_select_end;
    +  }
    +
    +  v = sqlite3GetVdbe(pParse);
    +  assert( v!=0 );  /* The VDBE already created by calling function */
    +
    +  /* Create the destination temporary table if necessary
    +  */
    +  if( dest.eDest==SRT_EphemTab ){
    +    assert( p->pEList );
    +    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iParm, p->pEList->nExpr);
    +    dest.eDest = SRT_Table;
    +  }
    +
    +  /* Make sure all SELECTs in the statement have the same number of elements
    +  ** in their result sets.
    +  */
    +  assert( p->pEList && pPrior->pEList );
    +  if( p->pEList->nExpr!=pPrior->pEList->nExpr ){
    +    sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
    +      " do not have the same number of result columns", selectOpName(p->op));
    +    rc = 1;
    +    goto multi_select_end;
    +  }
    +
    +  /* Compound SELECTs that have an ORDER BY clause are handled separately.
    +  */
    +  if( p->pOrderBy ){
    +    return multiSelectOrderBy(pParse, p, pDest);
    +  }
    +
    +  /* Generate code for the left and right SELECT statements.
    +  */
    +  switch( p->op ){
    +    case TK_ALL: {
    +      int addr = 0;
    +      assert( !pPrior->pLimit );
    +      pPrior->pLimit = p->pLimit;
    +      pPrior->pOffset = p->pOffset;
    +      rc = sqlite3Select(pParse, pPrior, &dest);
    +      p->pLimit = 0;
    +      p->pOffset = 0;
    +      if( rc ){
    +        goto multi_select_end;
    +      }
    +      p->pPrior = 0;
    +      p->iLimit = pPrior->iLimit;
    +      p->iOffset = pPrior->iOffset;
    +      if( p->iLimit ){
    +        addr = sqlite3VdbeAddOp1(v, OP_IfZero, p->iLimit);
    +        VdbeComment((v, "Jump ahead if LIMIT reached"));
    +      }
    +      rc = sqlite3Select(pParse, p, &dest);
    +      testcase( rc!=SQLITE_OK );
    +      pDelete = p->pPrior;
    +      p->pPrior = pPrior;
    +      if( addr ){
    +        sqlite3VdbeJumpHere(v, addr);
    +      }
    +      break;
    +    }
    +    case TK_EXCEPT:
    +    case TK_UNION: {
    +      int unionTab;    /* Cursor number of the temporary table holding result */
    +      u8 op = 0;       /* One of the SRT_ operations to apply to self */
    +      int priorOp;     /* The SRT_ operation to apply to prior selects */
    +      Expr *pLimit, *pOffset; /* Saved values of p->nLimit and p->nOffset */
    +      int addr;
    +      SelectDest uniondest;
    +
    +      testcase( p->op==TK_EXCEPT );
    +      testcase( p->op==TK_UNION );
    +      priorOp = SRT_Union;
    +      if( dest.eDest==priorOp && ALWAYS(!p->pLimit &&!p->pOffset) ){
    +        /* We can reuse a temporary table generated by a SELECT to our
    +        ** right.
    +        */
    +        assert( p->pRightmost!=p );  /* Can only happen for leftward elements
    +                                     ** of a 3-way or more compound */
    +        assert( p->pLimit==0 );      /* Not allowed on leftward elements */
    +        assert( p->pOffset==0 );     /* Not allowed on leftward elements */
    +        unionTab = dest.iParm;
    +      }else{
    +        /* We will need to create our own temporary table to hold the
    +        ** intermediate results.
    +        */
    +        unionTab = pParse->nTab++;
    +        assert( p->pOrderBy==0 );
    +        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, unionTab, 0);
    +        assert( p->addrOpenEphm[0] == -1 );
    +        p->addrOpenEphm[0] = addr;
    +        p->pRightmost->selFlags |= SF_UsesEphemeral;
    +        assert( p->pEList );
    +      }
    +
    +      /* Code the SELECT statements to our left
    +      */
    +      assert( !pPrior->pOrderBy );
    +      sqlite3SelectDestInit(&uniondest, priorOp, unionTab);
    +      rc = sqlite3Select(pParse, pPrior, &uniondest);
    +      if( rc ){
    +        goto multi_select_end;
    +      }
    +
    +      /* Code the current SELECT statement
    +      */
    +      if( p->op==TK_EXCEPT ){
    +        op = SRT_Except;
    +      }else{
    +        assert( p->op==TK_UNION );
    +        op = SRT_Union;
    +      }
    +      p->pPrior = 0;
    +      pLimit = p->pLimit;
    +      p->pLimit = 0;
    +      pOffset = p->pOffset;
    +      p->pOffset = 0;
    +      uniondest.eDest = op;
    +      rc = sqlite3Select(pParse, p, &uniondest);
    +      testcase( rc!=SQLITE_OK );
    +      /* Query flattening in sqlite3Select() might refill p->pOrderBy.
    +      ** Be sure to delete p->pOrderBy, therefore, to avoid a memory leak. */
    +      sqlite3ExprListDelete(db, p->pOrderBy);
    +      pDelete = p->pPrior;
    +      p->pPrior = pPrior;
    +      p->pOrderBy = 0;
    +      sqlite3ExprDelete(db, p->pLimit);
    +      p->pLimit = pLimit;
    +      p->pOffset = pOffset;
    +      p->iLimit = 0;
    +      p->iOffset = 0;
    +
    +      /* Convert the data in the temporary table into whatever form
    +      ** it is that we currently need.
    +      */
    +      assert( unionTab==dest.iParm || dest.eDest!=priorOp );
    +      if( dest.eDest!=priorOp ){
    +        int iCont, iBreak, iStart;
    +        assert( p->pEList );
    +        if( dest.eDest==SRT_Output ){
    +          Select *pFirst = p;
    +          while( pFirst->pPrior ) pFirst = pFirst->pPrior;
    +          generateColumnNames(pParse, 0, pFirst->pEList);
    +        }
    +        iBreak = sqlite3VdbeMakeLabel(v);
    +        iCont = sqlite3VdbeMakeLabel(v);
    +        computeLimitRegisters(pParse, p, iBreak);
    +        sqlite3VdbeAddOp2(v, OP_Rewind, unionTab, iBreak);
    +        iStart = sqlite3VdbeCurrentAddr(v);
    +        selectInnerLoop(pParse, p, p->pEList, unionTab, p->pEList->nExpr,
    +                        0, -1, &dest, iCont, iBreak);
    +        sqlite3VdbeResolveLabel(v, iCont);
    +        sqlite3VdbeAddOp2(v, OP_Next, unionTab, iStart);
    +        sqlite3VdbeResolveLabel(v, iBreak);
    +        sqlite3VdbeAddOp2(v, OP_Close, unionTab, 0);
    +      }
    +      break;
    +    }
    +    default: assert( p->op==TK_INTERSECT ); {
    +      int tab1, tab2;
    +      int iCont, iBreak, iStart;
    +      Expr *pLimit, *pOffset;
    +      int addr;
    +      SelectDest intersectdest;
    +      int r1;
    +
    +      /* INTERSECT is different from the others since it requires
    +      ** two temporary tables.  Hence it has its own case.  Begin
    +      ** by allocating the tables we will need.
    +      */
    +      tab1 = pParse->nTab++;
    +      tab2 = pParse->nTab++;
    +      assert( p->pOrderBy==0 );
    +
    +      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab1, 0);
    +      assert( p->addrOpenEphm[0] == -1 );
    +      p->addrOpenEphm[0] = addr;
    +      p->pRightmost->selFlags |= SF_UsesEphemeral;
    +      assert( p->pEList );
    +
    +      /* Code the SELECTs to our left into temporary table "tab1".
    +      */
    +      sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1);
    +      rc = sqlite3Select(pParse, pPrior, &intersectdest);
    +      if( rc ){
    +        goto multi_select_end;
    +      }
    +
    +      /* Code the current SELECT into temporary table "tab2"
    +      */
    +      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab2, 0);
    +      assert( p->addrOpenEphm[1] == -1 );
    +      p->addrOpenEphm[1] = addr;
    +      p->pPrior = 0;
    +      pLimit = p->pLimit;
    +      p->pLimit = 0;
    +      pOffset = p->pOffset;
    +      p->pOffset = 0;
    +      intersectdest.iParm = tab2;
    +      rc = sqlite3Select(pParse, p, &intersectdest);
    +      testcase( rc!=SQLITE_OK );
    +      pDelete = p->pPrior;
    +      p->pPrior = pPrior;
    +      sqlite3ExprDelete(db, p->pLimit);
    +      p->pLimit = pLimit;
    +      p->pOffset = pOffset;
    +
    +      /* Generate code to take the intersection of the two temporary
    +      ** tables.
    +      */
    +      assert( p->pEList );
    +      if( dest.eDest==SRT_Output ){
    +        Select *pFirst = p;
    +        while( pFirst->pPrior ) pFirst = pFirst->pPrior;
    +        generateColumnNames(pParse, 0, pFirst->pEList);
    +      }
    +      iBreak = sqlite3VdbeMakeLabel(v);
    +      iCont = sqlite3VdbeMakeLabel(v);
    +      computeLimitRegisters(pParse, p, iBreak);
    +      sqlite3VdbeAddOp2(v, OP_Rewind, tab1, iBreak);
    +      r1 = sqlite3GetTempReg(pParse);
    +      iStart = sqlite3VdbeAddOp2(v, OP_RowKey, tab1, r1);
    +      sqlite3VdbeAddOp3(v, OP_NotFound, tab2, iCont, r1);
    +      sqlite3ReleaseTempReg(pParse, r1);
    +      selectInnerLoop(pParse, p, p->pEList, tab1, p->pEList->nExpr,
    +                      0, -1, &dest, iCont, iBreak);
    +      sqlite3VdbeResolveLabel(v, iCont);
    +      sqlite3VdbeAddOp2(v, OP_Next, tab1, iStart);
    +      sqlite3VdbeResolveLabel(v, iBreak);
    +      sqlite3VdbeAddOp2(v, OP_Close, tab2, 0);
    +      sqlite3VdbeAddOp2(v, OP_Close, tab1, 0);
    +      break;
    +    }
    +  }
    +
    +  /* Compute collating sequences used by 
    +  ** temporary tables needed to implement the compound select.
    +  ** Attach the KeyInfo structure to all temporary tables.
    +  **
    +  ** This section is run by the right-most SELECT statement only.
    +  ** SELECT statements to the left always skip this part.  The right-most
    +  ** SELECT might also skip this part if it has no ORDER BY clause and
    +  ** no temp tables are required.
    +  */
    +  if( p->selFlags & SF_UsesEphemeral ){
    +    int i;                        /* Loop counter */
    +    KeyInfo *pKeyInfo;            /* Collating sequence for the result set */
    +    Select *pLoop;                /* For looping through SELECT statements */
    +    CollSeq **apColl;             /* For looping through pKeyInfo->aColl[] */
    +    int nCol;                     /* Number of columns in result set */
    +
    +    assert( p->pRightmost==p );
    +    nCol = p->pEList->nExpr;
    +    pKeyInfo = sqlite3DbMallocZero(db,
    +                       sizeof(*pKeyInfo)+nCol*(sizeof(CollSeq*) + 1));
    +    if( !pKeyInfo ){
    +      rc = SQLITE_NOMEM;
    +      goto multi_select_end;
    +    }
    +
    +    pKeyInfo->enc = ENC(db);
    +    pKeyInfo->nField = (u16)nCol;
    +
    +    for(i=0, apColl=pKeyInfo->aColl; i<nCol; i++, apColl++){
    +      *apColl = multiSelectCollSeq(pParse, p, i);
    +      if( 0==*apColl ){
    +        *apColl = db->pDfltColl;
    +      }
    +    }
    +
    +    for(pLoop=p; pLoop; pLoop=pLoop->pPrior){
    +      for(i=0; i<2; i++){
    +        int addr = pLoop->addrOpenEphm[i];
    +        if( addr<0 ){
    +          /* If [0] is unused then [1] is also unused.  So we can
    +          ** always safely abort as soon as the first unused slot is found */
    +          assert( pLoop->addrOpenEphm[1]<0 );
    +          break;
    +        }
    +        sqlite3VdbeChangeP2(v, addr, nCol);
    +        sqlite3VdbeChangeP4(v, addr, (char*)pKeyInfo, P4_KEYINFO);
    +        pLoop->addrOpenEphm[i] = -1;
    +      }
    +    }
    +    sqlite3DbFree(db, pKeyInfo);
    +  }
    +
    +multi_select_end:
    +  pDest->iMem = dest.iMem;
    +  pDest->nMem = dest.nMem;
    +  sqlite3SelectDelete(db, pDelete);
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_COMPOUND_SELECT */
    +
    +/*
    +** Code an output subroutine for a coroutine implementation of a
    +** SELECT statment.
    +**
    +** The data to be output is contained in pIn->iMem.  There are
    +** pIn->nMem columns to be output.  pDest is where the output should
    +** be sent.
    +**
    +** regReturn is the number of the register holding the subroutine
    +** return address.
    +**
    +** If regPrev>0 then it is a the first register in a vector that
    +** records the previous output.  mem[regPrev] is a flag that is false
    +** if there has been no previous output.  If regPrev>0 then code is
    +** generated to suppress duplicates.  pKeyInfo is used for comparing
    +** keys.
    +**
    +** If the LIMIT found in p->iLimit is reached, jump immediately to
    +** iBreak.
    +*/
    +static int generateOutputSubroutine(
    +  Parse *pParse,          /* Parsing context */
    +  Select *p,              /* The SELECT statement */
    +  SelectDest *pIn,        /* Coroutine supplying data */
    +  SelectDest *pDest,      /* Where to send the data */
    +  int regReturn,          /* The return address register */
    +  int regPrev,            /* Previous result register.  No uniqueness if 0 */
    +  KeyInfo *pKeyInfo,      /* For comparing with previous entry */
    +  int p4type,             /* The p4 type for pKeyInfo */
    +  int iBreak              /* Jump here if we hit the LIMIT */
    +){
    +  Vdbe *v = pParse->pVdbe;
    +  int iContinue;
    +  int addr;
    +
    +  addr = sqlite3VdbeCurrentAddr(v);
    +  iContinue = sqlite3VdbeMakeLabel(v);
    +
    +  /* Suppress duplicates for UNION, EXCEPT, and INTERSECT 
    +  */
    +  if( regPrev ){
    +    int j1, j2;
    +    j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev);
    +    j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iMem, regPrev+1, pIn->nMem,
    +                              (char*)pKeyInfo, p4type);
    +    sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2);
    +    sqlite3VdbeJumpHere(v, j1);
    +    sqlite3ExprCodeCopy(pParse, pIn->iMem, regPrev+1, pIn->nMem);
    +    sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
    +  }
    +  if( pParse->db->mallocFailed ) return 0;
    +
    +  /* Suppress the the first OFFSET entries if there is an OFFSET clause
    +  */
    +  codeOffset(v, p, iContinue);
    +
    +  switch( pDest->eDest ){
    +    /* Store the result as data using a unique key.
    +    */
    +    case SRT_Table:
    +    case SRT_EphemTab: {
    +      int r1 = sqlite3GetTempReg(pParse);
    +      int r2 = sqlite3GetTempReg(pParse);
    +      testcase( pDest->eDest==SRT_Table );
    +      testcase( pDest->eDest==SRT_EphemTab );
    +      sqlite3VdbeAddOp3(v, OP_MakeRecord, pIn->iMem, pIn->nMem, r1);
    +      sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iParm, r2);
    +      sqlite3VdbeAddOp3(v, OP_Insert, pDest->iParm, r1, r2);
    +      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    +      sqlite3ReleaseTempReg(pParse, r2);
    +      sqlite3ReleaseTempReg(pParse, r1);
    +      break;
    +    }
    +
    +#ifndef SQLITE_OMIT_SUBQUERY
    +    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
    +    ** then there should be a single item on the stack.  Write this
    +    ** item into the set table with bogus data.
    +    */
    +    case SRT_Set: {
    +      int r1;
    +      assert( pIn->nMem==1 );
    +      p->affinity = 
    +         sqlite3CompareAffinity(p->pEList->a[0].pExpr, pDest->affinity);
    +      r1 = sqlite3GetTempReg(pParse);
    +      sqlite3VdbeAddOp4(v, OP_MakeRecord, pIn->iMem, 1, r1, &p->affinity, 1);
    +      sqlite3ExprCacheAffinityChange(pParse, pIn->iMem, 1);
    +      sqlite3VdbeAddOp2(v, OP_IdxInsert, pDest->iParm, r1);
    +      sqlite3ReleaseTempReg(pParse, r1);
    +      break;
    +    }
    +
    +#if 0  /* Never occurs on an ORDER BY query */
    +    /* If any row exist in the result set, record that fact and abort.
    +    */
    +    case SRT_Exists: {
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, pDest->iParm);
    +      /* The LIMIT clause will terminate the loop for us */
    +      break;
    +    }
    +#endif
    +
    +    /* If this is a scalar select that is part of an expression, then
    +    ** store the results in the appropriate memory cell and break out
    +    ** of the scan loop.
    +    */
    +    case SRT_Mem: {
    +      assert( pIn->nMem==1 );
    +      sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iParm, 1);
    +      /* The LIMIT clause will jump out of the loop for us */
    +      break;
    +    }
    +#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
    +
    +    /* The results are stored in a sequence of registers
    +    ** starting at pDest->iMem.  Then the co-routine yields.
    +    */
    +    case SRT_Coroutine: {
    +      if( pDest->iMem==0 ){
    +        pDest->iMem = sqlite3GetTempRange(pParse, pIn->nMem);
    +        pDest->nMem = pIn->nMem;
    +      }
    +      sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iMem, pDest->nMem);
    +      sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
    +      break;
    +    }
    +
    +    /* If none of the above, then the result destination must be
    +    ** SRT_Output.  This routine is never called with any other
    +    ** destination other than the ones handled above or SRT_Output.
    +    **
    +    ** For SRT_Output, results are stored in a sequence of registers.  
    +    ** Then the OP_ResultRow opcode is used to cause sqlite3_step() to
    +    ** return the next row of result.
    +    */
    +    default: {
    +      assert( pDest->eDest==SRT_Output );
    +      sqlite3VdbeAddOp2(v, OP_ResultRow, pIn->iMem, pIn->nMem);
    +      sqlite3ExprCacheAffinityChange(pParse, pIn->iMem, pIn->nMem);
    +      break;
    +    }
    +  }
    +
    +  /* Jump to the end of the loop if the LIMIT is reached.
    +  */
    +  if( p->iLimit ){
    +    sqlite3VdbeAddOp2(v, OP_AddImm, p->iLimit, -1);
    +    sqlite3VdbeAddOp2(v, OP_IfZero, p->iLimit, iBreak);
    +  }
    +
    +  /* Generate the subroutine return
    +  */
    +  sqlite3VdbeResolveLabel(v, iContinue);
    +  sqlite3VdbeAddOp1(v, OP_Return, regReturn);
    +
    +  return addr;
    +}
    +
    +/*
    +** Alternative compound select code generator for cases when there
    +** is an ORDER BY clause.
    +**
    +** We assume a query of the following form:
    +**
    +**      <selectA>  <operator>  <selectB>  ORDER BY <orderbylist>
    +**
    +** <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT.  The idea
    +** is to code both <selectA> and <selectB> with the ORDER BY clause as
    +** co-routines.  Then run the co-routines in parallel and merge the results
    +** into the output.  In addition to the two coroutines (called selectA and
    +** selectB) there are 7 subroutines:
    +**
    +**    outA:    Move the output of the selectA coroutine into the output
    +**             of the compound query.
    +**
    +**    outB:    Move the output of the selectB coroutine into the output
    +**             of the compound query.  (Only generated for UNION and
    +**             UNION ALL.  EXCEPT and INSERTSECT never output a row that
    +**             appears only in B.)
    +**
    +**    AltB:    Called when there is data from both coroutines and A<B.
    +**
    +**    AeqB:    Called when there is data from both coroutines and A==B.
    +**
    +**    AgtB:    Called when there is data from both coroutines and A>B.
    +**
    +**    EofA:    Called when data is exhausted from selectA.
    +**
    +**    EofB:    Called when data is exhausted from selectB.
    +**
    +** The implementation of the latter five subroutines depend on which 
    +** <operator> is used:
    +**
    +**
    +**             UNION ALL         UNION            EXCEPT          INTERSECT
    +**          -------------  -----------------  --------------  -----------------
    +**   AltB:   outA, nextA      outA, nextA       outA, nextA         nextA
    +**
    +**   AeqB:   outA, nextA         nextA             nextA         outA, nextA
    +**
    +**   AgtB:   outB, nextB      outB, nextB          nextB            nextB
    +**
    +**   EofA:   outB, nextB      outB, nextB          halt             halt
    +**
    +**   EofB:   outA, nextA      outA, nextA       outA, nextA         halt
    +**
    +** In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA
    +** causes an immediate jump to EofA and an EOF on B following nextB causes
    +** an immediate jump to EofB.  Within EofA and EofB, and EOF on entry or
    +** following nextX causes a jump to the end of the select processing.
    +**
    +** Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled
    +** within the output subroutine.  The regPrev register set holds the previously
    +** output value.  A comparison is made against this value and the output
    +** is skipped if the next results would be the same as the previous.
    +**
    +** The implementation plan is to implement the two coroutines and seven
    +** subroutines first, then put the control logic at the bottom.  Like this:
    +**
    +**          goto Init
    +**     coA: coroutine for left query (A)
    +**     coB: coroutine for right query (B)
    +**    outA: output one row of A
    +**    outB: output one row of B (UNION and UNION ALL only)
    +**    EofA: ...
    +**    EofB: ...
    +**    AltB: ...
    +**    AeqB: ...
    +**    AgtB: ...
    +**    Init: initialize coroutine registers
    +**          yield coA
    +**          if eof(A) goto EofA
    +**          yield coB
    +**          if eof(B) goto EofB
    +**    Cmpr: Compare A, B
    +**          Jump AltB, AeqB, AgtB
    +**     End: ...
    +**
    +** We call AltB, AeqB, AgtB, EofA, and EofB "subroutines" but they are not
    +** actually called using Gosub and they do not Return.  EofA and EofB loop
    +** until all data is exhausted then jump to the "end" labe.  AltB, AeqB,
    +** and AgtB jump to either L2 or to one of EofA or EofB.
    +*/
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +static int multiSelectOrderBy(
    +  Parse *pParse,        /* Parsing context */
    +  Select *p,            /* The right-most of SELECTs to be coded */
    +  SelectDest *pDest     /* What to do with query results */
    +){
    +  int i, j;             /* Loop counters */
    +  Select *pPrior;       /* Another SELECT immediately to our left */
    +  Vdbe *v;              /* Generate code to this VDBE */
    +  SelectDest destA;     /* Destination for coroutine A */
    +  SelectDest destB;     /* Destination for coroutine B */
    +  int regAddrA;         /* Address register for select-A coroutine */
    +  int regEofA;          /* Flag to indicate when select-A is complete */
    +  int regAddrB;         /* Address register for select-B coroutine */
    +  int regEofB;          /* Flag to indicate when select-B is complete */
    +  int addrSelectA;      /* Address of the select-A coroutine */
    +  int addrSelectB;      /* Address of the select-B coroutine */
    +  int regOutA;          /* Address register for the output-A subroutine */
    +  int regOutB;          /* Address register for the output-B subroutine */
    +  int addrOutA;         /* Address of the output-A subroutine */
    +  int addrOutB = 0;     /* Address of the output-B subroutine */
    +  int addrEofA;         /* Address of the select-A-exhausted subroutine */
    +  int addrEofB;         /* Address of the select-B-exhausted subroutine */
    +  int addrAltB;         /* Address of the A<B subroutine */
    +  int addrAeqB;         /* Address of the A==B subroutine */
    +  int addrAgtB;         /* Address of the A>B subroutine */
    +  int regLimitA;        /* Limit register for select-A */
    +  int regLimitB;        /* Limit register for select-A */
    +  int regPrev;          /* A range of registers to hold previous output */
    +  int savedLimit;       /* Saved value of p->iLimit */
    +  int savedOffset;      /* Saved value of p->iOffset */
    +  int labelCmpr;        /* Label for the start of the merge algorithm */
    +  int labelEnd;         /* Label for the end of the overall SELECT stmt */
    +  int j1;               /* Jump instructions that get retargetted */
    +  int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
    +  KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
    +  KeyInfo *pKeyMerge;   /* Comparison information for merging rows */
    +  sqlite3 *db;          /* Database connection */
    +  ExprList *pOrderBy;   /* The ORDER BY clause */
    +  int nOrderBy;         /* Number of terms in the ORDER BY clause */
    +  int *aPermute;        /* Mapping from ORDER BY terms to result set columns */
    +
    +  assert( p->pOrderBy!=0 );
    +  assert( pKeyDup==0 ); /* "Managed" code needs this.  Ticket #3382. */
    +  db = pParse->db;
    +  v = pParse->pVdbe;
    +  assert( v!=0 );       /* Already thrown the error if VDBE alloc failed */
    +  labelEnd = sqlite3VdbeMakeLabel(v);
    +  labelCmpr = sqlite3VdbeMakeLabel(v);
    +
    +
    +  /* Patch up the ORDER BY clause
    +  */
    +  op = p->op;  
    +  pPrior = p->pPrior;
    +  assert( pPrior->pOrderBy==0 );
    +  pOrderBy = p->pOrderBy;
    +  assert( pOrderBy );
    +  nOrderBy = pOrderBy->nExpr;
    +
    +  /* For operators other than UNION ALL we have to make sure that
    +  ** the ORDER BY clause covers every term of the result set.  Add
    +  ** terms to the ORDER BY clause as necessary.
    +  */
    +  if( op!=TK_ALL ){
    +    for(i=1; db->mallocFailed==0 && i<=p->pEList->nExpr; i++){
    +      struct ExprList_item *pItem;
    +      for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
    +        assert( pItem->iCol>0 );
    +        if( pItem->iCol==i ) break;
    +      }
    +      if( j==nOrderBy ){
    +        Expr *pNew = sqlite3Expr(db, TK_INTEGER, 0);
    +        if( pNew==0 ) return SQLITE_NOMEM;
    +        pNew->flags |= EP_IntValue;
    +        pNew->u.iValue = i;
    +        pOrderBy = sqlite3ExprListAppend(pParse, pOrderBy, pNew);
    +        pOrderBy->a[nOrderBy++].iCol = (u16)i;
    +      }
    +    }
    +  }
    +
    +  /* Compute the comparison permutation and keyinfo that is used with
    +  ** the permutation used to determine if the next
    +  ** row of results comes from selectA or selectB.  Also add explicit
    +  ** collations to the ORDER BY clause terms so that when the subqueries
    +  ** to the right and the left are evaluated, they use the correct
    +  ** collation.
    +  */
    +  aPermute = sqlite3DbMallocRaw(db, sizeof(int)*nOrderBy);
    +  if( aPermute ){
    +    struct ExprList_item *pItem;
    +    for(i=0, pItem=pOrderBy->a; i<nOrderBy; i++, pItem++){
    +      assert( pItem->iCol>0  && pItem->iCol<=p->pEList->nExpr );
    +      aPermute[i] = pItem->iCol - 1;
    +    }
    +    pKeyMerge =
    +      sqlite3DbMallocRaw(db, sizeof(*pKeyMerge)+nOrderBy*(sizeof(CollSeq*)+1));
    +    if( pKeyMerge ){
    +      pKeyMerge->aSortOrder = (u8*)&pKeyMerge->aColl[nOrderBy];
    +      pKeyMerge->nField = (u16)nOrderBy;
    +      pKeyMerge->enc = ENC(db);
    +      for(i=0; i<nOrderBy; i++){
    +        CollSeq *pColl;
    +        Expr *pTerm = pOrderBy->a[i].pExpr;
    +        if( pTerm->flags & EP_ExpCollate ){
    +          pColl = pTerm->pColl;
    +        }else{
    +          pColl = multiSelectCollSeq(pParse, p, aPermute[i]);
    +          pTerm->flags |= EP_ExpCollate;
    +          pTerm->pColl = pColl;
    +        }
    +        pKeyMerge->aColl[i] = pColl;
    +        pKeyMerge->aSortOrder[i] = pOrderBy->a[i].sortOrder;
    +      }
    +    }
    +  }else{
    +    pKeyMerge = 0;
    +  }
    +
    +  /* Reattach the ORDER BY clause to the query.
    +  */
    +  p->pOrderBy = pOrderBy;
    +  pPrior->pOrderBy = sqlite3ExprListDup(pParse->db, pOrderBy, 0);
    +
    +  /* Allocate a range of temporary registers and the KeyInfo needed
    +  ** for the logic that removes duplicate result rows when the
    +  ** operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL).
    +  */
    +  if( op==TK_ALL ){
    +    regPrev = 0;
    +  }else{
    +    int nExpr = p->pEList->nExpr;
    +    assert( nOrderBy>=nExpr || db->mallocFailed );
    +    regPrev = sqlite3GetTempRange(pParse, nExpr+1);
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regPrev);
    +    pKeyDup = sqlite3DbMallocZero(db,
    +                  sizeof(*pKeyDup) + nExpr*(sizeof(CollSeq*)+1) );
    +    if( pKeyDup ){
    +      pKeyDup->aSortOrder = (u8*)&pKeyDup->aColl[nExpr];
    +      pKeyDup->nField = (u16)nExpr;
    +      pKeyDup->enc = ENC(db);
    +      for(i=0; i<nExpr; i++){
    +        pKeyDup->aColl[i] = multiSelectCollSeq(pParse, p, i);
    +        pKeyDup->aSortOrder[i] = 0;
    +      }
    +    }
    +  }
    + 
    +  /* Separate the left and the right query from one another
    +  */
    +  p->pPrior = 0;
    +  pPrior->pRightmost = 0;
    +  sqlite3ResolveOrderGroupBy(pParse, p, p->pOrderBy, "ORDER");
    +  if( pPrior->pPrior==0 ){
    +    sqlite3ResolveOrderGroupBy(pParse, pPrior, pPrior->pOrderBy, "ORDER");
    +  }
    +
    +  /* Compute the limit registers */
    +  computeLimitRegisters(pParse, p, labelEnd);
    +  if( p->iLimit && op==TK_ALL ){
    +    regLimitA = ++pParse->nMem;
    +    regLimitB = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Copy, p->iOffset ? p->iOffset+1 : p->iLimit,
    +                                  regLimitA);
    +    sqlite3VdbeAddOp2(v, OP_Copy, regLimitA, regLimitB);
    +  }else{
    +    regLimitA = regLimitB = 0;
    +  }
    +  sqlite3ExprDelete(db, p->pLimit);
    +  p->pLimit = 0;
    +  sqlite3ExprDelete(db, p->pOffset);
    +  p->pOffset = 0;
    +
    +  regAddrA = ++pParse->nMem;
    +  regEofA = ++pParse->nMem;
    +  regAddrB = ++pParse->nMem;
    +  regEofB = ++pParse->nMem;
    +  regOutA = ++pParse->nMem;
    +  regOutB = ++pParse->nMem;
    +  sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);
    +  sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);
    +
    +  /* Jump past the various subroutines and coroutines to the main
    +  ** merge loop
    +  */
    +  j1 = sqlite3VdbeAddOp0(v, OP_Goto);
    +  addrSelectA = sqlite3VdbeCurrentAddr(v);
    +
    +
    +  /* Generate a coroutine to evaluate the SELECT statement to the
    +  ** left of the compound operator - the "A" select.
    +  */
    +  VdbeNoopComment((v, "Begin coroutine for left SELECT"));
    +  pPrior->iLimit = regLimitA;
    +  sqlite3Select(pParse, pPrior, &destA);
    +  sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofA);
    +  sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
    +  VdbeNoopComment((v, "End coroutine for left SELECT"));
    +
    +  /* Generate a coroutine to evaluate the SELECT statement on 
    +  ** the right - the "B" select
    +  */
    +  addrSelectB = sqlite3VdbeCurrentAddr(v);
    +  VdbeNoopComment((v, "Begin coroutine for right SELECT"));
    +  savedLimit = p->iLimit;
    +  savedOffset = p->iOffset;
    +  p->iLimit = regLimitB;
    +  p->iOffset = 0;  
    +  sqlite3Select(pParse, p, &destB);
    +  p->iLimit = savedLimit;
    +  p->iOffset = savedOffset;
    +  sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofB);
    +  sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
    +  VdbeNoopComment((v, "End coroutine for right SELECT"));
    +
    +  /* Generate a subroutine that outputs the current row of the A
    +  ** select as the next output row of the compound select.
    +  */
    +  VdbeNoopComment((v, "Output routine for A"));
    +  addrOutA = generateOutputSubroutine(pParse,
    +                 p, &destA, pDest, regOutA,
    +                 regPrev, pKeyDup, P4_KEYINFO_HANDOFF, labelEnd);
    +  
    +  /* Generate a subroutine that outputs the current row of the B
    +  ** select as the next output row of the compound select.
    +  */
    +  if( op==TK_ALL || op==TK_UNION ){
    +    VdbeNoopComment((v, "Output routine for B"));
    +    addrOutB = generateOutputSubroutine(pParse,
    +                 p, &destB, pDest, regOutB,
    +                 regPrev, pKeyDup, P4_KEYINFO_STATIC, labelEnd);
    +  }
    +
    +  /* Generate a subroutine to run when the results from select A
    +  ** are exhausted and only data in select B remains.
    +  */
    +  VdbeNoopComment((v, "eof-A subroutine"));
    +  if( op==TK_EXCEPT || op==TK_INTERSECT ){
    +    addrEofA = sqlite3VdbeAddOp2(v, OP_Goto, 0, labelEnd);
    +  }else{  
    +    addrEofA = sqlite3VdbeAddOp2(v, OP_If, regEofB, labelEnd);
    +    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
    +    sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofA);
    +  }
    +
    +  /* Generate a subroutine to run when the results from select B
    +  ** are exhausted and only data in select A remains.
    +  */
    +  if( op==TK_INTERSECT ){
    +    addrEofB = addrEofA;
    +  }else{  
    +    VdbeNoopComment((v, "eof-B subroutine"));
    +    addrEofB = sqlite3VdbeAddOp2(v, OP_If, regEofA, labelEnd);
    +    sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
    +    sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofB);
    +  }
    +
    +  /* Generate code to handle the case of A<B
    +  */
    +  VdbeNoopComment((v, "A-lt-B subroutine"));
    +  addrAltB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
    +  sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
    +  sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
    +  sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
    +
    +  /* Generate code to handle the case of A==B
    +  */
    +  if( op==TK_ALL ){
    +    addrAeqB = addrAltB;
    +  }else if( op==TK_INTERSECT ){
    +    addrAeqB = addrAltB;
    +    addrAltB++;
    +  }else{
    +    VdbeNoopComment((v, "A-eq-B subroutine"));
    +    addrAeqB =
    +    sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
    +    sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
    +  }
    +
    +  /* Generate code to handle the case of A>B
    +  */
    +  VdbeNoopComment((v, "A-gt-B subroutine"));
    +  addrAgtB = sqlite3VdbeCurrentAddr(v);
    +  if( op==TK_ALL || op==TK_UNION ){
    +    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
    +  }
    +  sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
    +  sqlite3VdbeAddOp2(v, OP_If, regEofB, addrEofB);
    +  sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
    +
    +  /* This code runs once to initialize everything.
    +  */
    +  sqlite3VdbeJumpHere(v, j1);
    +  sqlite3VdbeAddOp2(v, OP_Integer, 0, regEofA);
    +  sqlite3VdbeAddOp2(v, OP_Integer, 0, regEofB);
    +  sqlite3VdbeAddOp2(v, OP_Gosub, regAddrA, addrSelectA);
    +  sqlite3VdbeAddOp2(v, OP_Gosub, regAddrB, addrSelectB);
    +  sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
    +  sqlite3VdbeAddOp2(v, OP_If, regEofB, addrEofB);
    +
    +  /* Implement the main merge loop
    +  */
    +  sqlite3VdbeResolveLabel(v, labelCmpr);
    +  sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);
    +  sqlite3VdbeAddOp4(v, OP_Compare, destA.iMem, destB.iMem, nOrderBy,
    +                         (char*)pKeyMerge, P4_KEYINFO_HANDOFF);
    +  sqlite3VdbeAddOp3(v, OP_Jump, addrAltB, addrAeqB, addrAgtB);
    +
    +  /* Release temporary registers
    +  */
    +  if( regPrev ){
    +    sqlite3ReleaseTempRange(pParse, regPrev, nOrderBy+1);
    +  }
    +
    +  /* Jump to the this point in order to terminate the query.
    +  */
    +  sqlite3VdbeResolveLabel(v, labelEnd);
    +
    +  /* Set the number of output columns
    +  */
    +  if( pDest->eDest==SRT_Output ){
    +    Select *pFirst = pPrior;
    +    while( pFirst->pPrior ) pFirst = pFirst->pPrior;
    +    generateColumnNames(pParse, 0, pFirst->pEList);
    +  }
    +
    +  /* Reassembly the compound query so that it will be freed correctly
    +  ** by the calling function */
    +  if( p->pPrior ){
    +    sqlite3SelectDelete(db, p->pPrior);
    +  }
    +  p->pPrior = pPrior;
    +
    +  /*** TBD:  Insert subroutine calls to close cursors on incomplete
    +  **** subqueries ****/
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
    +/* Forward Declarations */
    +static void substExprList(sqlite3*, ExprList*, int, ExprList*);
    +static void substSelect(sqlite3*, Select *, int, ExprList *);
    +
    +/*
    +** Scan through the expression pExpr.  Replace every reference to
    +** a column in table number iTable with a copy of the iColumn-th
    +** entry in pEList.  (But leave references to the ROWID column 
    +** unchanged.)
    +**
    +** This routine is part of the flattening procedure.  A subquery
    +** whose result set is defined by pEList appears as entry in the
    +** FROM clause of a SELECT such that the VDBE cursor assigned to that
    +** FORM clause entry is iTable.  This routine make the necessary 
    +** changes to pExpr so that it refers directly to the source table
    +** of the subquery rather the result set of the subquery.
    +*/
    +static Expr *substExpr(
    +  sqlite3 *db,        /* Report malloc errors to this connection */
    +  Expr *pExpr,        /* Expr in which substitution occurs */
    +  int iTable,         /* Table to be substituted */
    +  ExprList *pEList    /* Substitute expressions */
    +){
    +  if( pExpr==0 ) return 0;
    +  if( pExpr->op==TK_COLUMN && pExpr->iTable==iTable ){
    +    if( pExpr->iColumn<0 ){
    +      pExpr->op = TK_NULL;
    +    }else{
    +      Expr *pNew;
    +      assert( pEList!=0 && pExpr->iColumn<pEList->nExpr );
    +      assert( pExpr->pLeft==0 && pExpr->pRight==0 );
    +      pNew = sqlite3ExprDup(db, pEList->a[pExpr->iColumn].pExpr, 0);
    +      if( pNew && pExpr->pColl ){
    +        pNew->pColl = pExpr->pColl;
    +      }
    +      sqlite3ExprDelete(db, pExpr);
    +      pExpr = pNew;
    +    }
    +  }else{
    +    pExpr->pLeft = substExpr(db, pExpr->pLeft, iTable, pEList);
    +    pExpr->pRight = substExpr(db, pExpr->pRight, iTable, pEList);
    +    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +      substSelect(db, pExpr->x.pSelect, iTable, pEList);
    +    }else{
    +      substExprList(db, pExpr->x.pList, iTable, pEList);
    +    }
    +  }
    +  return pExpr;
    +}
    +static void substExprList(
    +  sqlite3 *db,         /* Report malloc errors here */
    +  ExprList *pList,     /* List to scan and in which to make substitutes */
    +  int iTable,          /* Table to be substituted */
    +  ExprList *pEList     /* Substitute values */
    +){
    +  int i;
    +  if( pList==0 ) return;
    +  for(i=0; i<pList->nExpr; i++){
    +    pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
    +  }
    +}
    +static void substSelect(
    +  sqlite3 *db,         /* Report malloc errors here */
    +  Select *p,           /* SELECT statement in which to make substitutions */
    +  int iTable,          /* Table to be replaced */
    +  ExprList *pEList     /* Substitute values */
    +){
    +  SrcList *pSrc;
    +  struct SrcList_item *pItem;
    +  int i;
    +  if( !p ) return;
    +  substExprList(db, p->pEList, iTable, pEList);
    +  substExprList(db, p->pGroupBy, iTable, pEList);
    +  substExprList(db, p->pOrderBy, iTable, pEList);
    +  p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
    +  p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
    +  substSelect(db, p->pPrior, iTable, pEList);
    +  pSrc = p->pSrc;
    +  assert( pSrc );  /* Even for (SELECT 1) we have: pSrc!=0 but pSrc->nSrc==0 */
    +  if( ALWAYS(pSrc) ){
    +    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
    +      substSelect(db, pItem->pSelect, iTable, pEList);
    +    }
    +  }
    +}
    +#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
    +
    +#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
    +/*
    +** This routine attempts to flatten subqueries in order to speed
    +** execution.  It returns 1 if it makes changes and 0 if no flattening
    +** occurs.
    +**
    +** To understand the concept of flattening, consider the following
    +** query:
    +**
    +**     SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5
    +**
    +** The default way of implementing this query is to execute the
    +** subquery first and store the results in a temporary table, then
    +** run the outer query on that temporary table.  This requires two
    +** passes over the data.  Furthermore, because the temporary table
    +** has no indices, the WHERE clause on the outer query cannot be
    +** optimized.
    +**
    +** This routine attempts to rewrite queries such as the above into
    +** a single flat select, like this:
    +**
    +**     SELECT x+y AS a FROM t1 WHERE z<100 AND a>5
    +**
    +** The code generated for this simpification gives the same result
    +** but only has to scan the data once.  And because indices might 
    +** exist on the table t1, a complete scan of the data might be
    +** avoided.
    +**
    +** Flattening is only attempted if all of the following are true:
    +**
    +**   (1)  The subquery and the outer query do not both use aggregates.
    +**
    +**   (2)  The subquery is not an aggregate or the outer query is not a join.
    +**
    +**   (3)  The subquery is not the right operand of a left outer join
    +**        (Originally ticket #306.  Strenghtened by ticket #3300)
    +**
    +**   (4)  The subquery is not DISTINCT or the outer query is not a join.
    +**
    +**   (5)  The subquery is not DISTINCT or the outer query does not use
    +**        aggregates.
    +**
    +**   (6)  The subquery does not use aggregates or the outer query is not
    +**        DISTINCT.
    +**
    +**   (7)  The subquery has a FROM clause.
    +**
    +**   (8)  The subquery does not use LIMIT or the outer query is not a join.
    +**
    +**   (9)  The subquery does not use LIMIT or the outer query does not use
    +**        aggregates.
    +**
    +**  (10)  The subquery does not use aggregates or the outer query does not
    +**        use LIMIT.
    +**
    +**  (11)  The subquery and the outer query do not both have ORDER BY clauses.
    +**
    +**  (12)  Not implemented.  Subsumed into restriction (3).  Was previously
    +**        a separate restriction deriving from ticket #350.
    +**
    +**  (13)  The subquery and outer query do not both use LIMIT
    +**
    +**  (14)  The subquery does not use OFFSET
    +**
    +**  (15)  The outer query is not part of a compound select or the
    +**        subquery does not have both an ORDER BY and a LIMIT clause.
    +**        (See ticket #2339)
    +**
    +**  (16)  The outer query is not an aggregate or the subquery does
    +**        not contain ORDER BY.  (Ticket #2942)  This used to not matter
    +**        until we introduced the group_concat() function.  
    +**
    +**  (17)  The sub-query is not a compound select, or it is a UNION ALL 
    +**        compound clause made up entirely of non-aggregate queries, and 
    +**        the parent query:
    +**
    +**          * is not itself part of a compound select,
    +**          * is not an aggregate or DISTINCT query, and
    +**          * has no other tables or sub-selects in the FROM clause.
    +**
    +**        The parent and sub-query may contain WHERE clauses. Subject to
    +**        rules (11), (13) and (14), they may also contain ORDER BY,
    +**        LIMIT and OFFSET clauses.
    +**
    +**  (18)  If the sub-query is a compound select, then all terms of the
    +**        ORDER by clause of the parent must be simple references to 
    +**        columns of the sub-query.
    +**
    +**  (19)  The subquery does not use LIMIT or the outer query does not
    +**        have a WHERE clause.
    +**
    +**  (20)  If the sub-query is a compound select, then it must not use
    +**        an ORDER BY clause.  Ticket #3773.  We could relax this constraint
    +**        somewhat by saying that the terms of the ORDER BY clause must
    +**        appear as unmodified result columns in the outer query.  But
    +**        have other optimizations in mind to deal with that case.
    +**
    +** In this routine, the "p" parameter is a pointer to the outer query.
    +** The subquery is p->pSrc->a[iFrom].  isAgg is true if the outer query
    +** uses aggregates and subqueryIsAgg is true if the subquery uses aggregates.
    +**
    +** If flattening is not attempted, this routine is a no-op and returns 0.
    +** If flattening is attempted this routine returns 1.
    +**
    +** All of the expression analysis must occur on both the outer query and
    +** the subquery before this routine runs.
    +*/
    +static int flattenSubquery(
    +  Parse *pParse,       /* Parsing context */
    +  Select *p,           /* The parent or outer SELECT statement */
    +  int iFrom,           /* Index in p->pSrc->a[] of the inner subquery */
    +  int isAgg,           /* True if outer SELECT uses aggregate functions */
    +  int subqueryIsAgg    /* True if the subquery uses aggregate functions */
    +){
    +  const char *zSavedAuthContext = pParse->zAuthContext;
    +  Select *pParent;
    +  Select *pSub;       /* The inner query or "subquery" */
    +  Select *pSub1;      /* Pointer to the rightmost select in sub-query */
    +  SrcList *pSrc;      /* The FROM clause of the outer query */
    +  SrcList *pSubSrc;   /* The FROM clause of the subquery */
    +  ExprList *pList;    /* The result set of the outer query */
    +  int iParent;        /* VDBE cursor number of the pSub result set temp table */
    +  int i;              /* Loop counter */
    +  Expr *pWhere;                    /* The WHERE clause */
    +  struct SrcList_item *pSubitem;   /* The subquery */
    +  sqlite3 *db = pParse->db;
    +
    +  /* Check to see if flattening is permitted.  Return 0 if not.
    +  */
    +  assert( p!=0 );
    +  assert( p->pPrior==0 );  /* Unable to flatten compound queries */
    +  pSrc = p->pSrc;
    +  assert( pSrc && iFrom>=0 && iFrom<pSrc->nSrc );
    +  pSubitem = &pSrc->a[iFrom];
    +  iParent = pSubitem->iCursor;
    +  pSub = pSubitem->pSelect;
    +  assert( pSub!=0 );
    +  if( isAgg && subqueryIsAgg ) return 0;                 /* Restriction (1)  */
    +  if( subqueryIsAgg && pSrc->nSrc>1 ) return 0;          /* Restriction (2)  */
    +  pSubSrc = pSub->pSrc;
    +  assert( pSubSrc );
    +  /* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants,
    +  ** not arbitrary expresssions, we allowed some combining of LIMIT and OFFSET
    +  ** because they could be computed at compile-time.  But when LIMIT and OFFSET
    +  ** became arbitrary expressions, we were forced to add restrictions (13)
    +  ** and (14). */
    +  if( pSub->pLimit && p->pLimit ) return 0;              /* Restriction (13) */
    +  if( pSub->pOffset ) return 0;                          /* Restriction (14) */
    +  if( p->pRightmost && pSub->pLimit && pSub->pOrderBy ){
    +    return 0;                                            /* Restriction (15) */
    +  }
    +  if( pSubSrc->nSrc==0 ) return 0;                       /* Restriction (7)  */
    +  if( ((pSub->selFlags & SF_Distinct)!=0 || pSub->pLimit) 
    +         && (pSrc->nSrc>1 || isAgg) ){          /* Restrictions (4)(5)(8)(9) */
    +     return 0;       
    +  }
    +  if( (p->selFlags & SF_Distinct)!=0 && subqueryIsAgg ){
    +     return 0;         /* Restriction (6)  */
    +  }
    +  if( p->pOrderBy && pSub->pOrderBy ){
    +     return 0;                                           /* Restriction (11) */
    +  }
    +  if( isAgg && pSub->pOrderBy ) return 0;                /* Restriction (16) */
    +  if( pSub->pLimit && p->pWhere ) return 0;              /* Restriction (19) */
    +
    +  /* OBSOLETE COMMENT 1:
    +  ** Restriction 3:  If the subquery is a join, make sure the subquery is 
    +  ** not used as the right operand of an outer join.  Examples of why this
    +  ** is not allowed:
    +  **
    +  **         t1 LEFT OUTER JOIN (t2 JOIN t3)
    +  **
    +  ** If we flatten the above, we would get
    +  **
    +  **         (t1 LEFT OUTER JOIN t2) JOIN t3
    +  **
    +  ** which is not at all the same thing.
    +  **
    +  ** OBSOLETE COMMENT 2:
    +  ** Restriction 12:  If the subquery is the right operand of a left outer
    +  ** join, make sure the subquery has no WHERE clause.
    +  ** An examples of why this is not allowed:
    +  **
    +  **         t1 LEFT OUTER JOIN (SELECT * FROM t2 WHERE t2.x>0)
    +  **
    +  ** If we flatten the above, we would get
    +  **
    +  **         (t1 LEFT OUTER JOIN t2) WHERE t2.x>0
    +  **
    +  ** But the t2.x>0 test will always fail on a NULL row of t2, which
    +  ** effectively converts the OUTER JOIN into an INNER JOIN.
    +  **
    +  ** THIS OVERRIDES OBSOLETE COMMENTS 1 AND 2 ABOVE:
    +  ** Ticket #3300 shows that flattening the right term of a LEFT JOIN
    +  ** is fraught with danger.  Best to avoid the whole thing.  If the
    +  ** subquery is the right term of a LEFT JOIN, then do not flatten.
    +  */
    +  if( (pSubitem->jointype & JT_OUTER)!=0 ){
    +    return 0;
    +  }
    +
    +  /* Restriction 17: If the sub-query is a compound SELECT, then it must
    +  ** use only the UNION ALL operator. And none of the simple select queries
    +  ** that make up the compound SELECT are allowed to be aggregate or distinct
    +  ** queries.
    +  */
    +  if( pSub->pPrior ){
    +    if( pSub->pOrderBy ){
    +      return 0;  /* Restriction 20 */
    +    }
    +    if( isAgg || (p->selFlags & SF_Distinct)!=0 || pSrc->nSrc!=1 ){
    +      return 0;
    +    }
    +    for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
    +      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
    +      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
    +      if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
    +       || (pSub1->pPrior && pSub1->op!=TK_ALL) 
    +       || NEVER(pSub1->pSrc==0) || pSub1->pSrc->nSrc!=1
    +      ){
    +        return 0;
    +      }
    +    }
    +
    +    /* Restriction 18. */
    +    if( p->pOrderBy ){
    +      int ii;
    +      for(ii=0; ii<p->pOrderBy->nExpr; ii++){
    +        if( p->pOrderBy->a[ii].iCol==0 ) return 0;
    +      }
    +    }
    +  }
    +
    +  /***** If we reach this point, flattening is permitted. *****/
    +
    +  /* Authorize the subquery */
    +  pParse->zAuthContext = pSubitem->zName;
    +  sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
    +  pParse->zAuthContext = zSavedAuthContext;
    +
    +  /* If the sub-query is a compound SELECT statement, then (by restrictions
    +  ** 17 and 18 above) it must be a UNION ALL and the parent query must 
    +  ** be of the form:
    +  **
    +  **     SELECT <expr-list> FROM (<sub-query>) <where-clause> 
    +  **
    +  ** followed by any ORDER BY, LIMIT and/or OFFSET clauses. This block
    +  ** creates N-1 copies of the parent query without any ORDER BY, LIMIT or 
    +  ** OFFSET clauses and joins them to the left-hand-side of the original
    +  ** using UNION ALL operators. In this case N is the number of simple
    +  ** select statements in the compound sub-query.
    +  **
    +  ** Example:
    +  **
    +  **     SELECT a+1 FROM (
    +  **        SELECT x FROM tab
    +  **        UNION ALL
    +  **        SELECT y FROM tab
    +  **        UNION ALL
    +  **        SELECT abs(z*2) FROM tab2
    +  **     ) WHERE a!=5 ORDER BY 1
    +  **
    +  ** Transformed into:
    +  **
    +  **     SELECT x+1 FROM tab WHERE x+1!=5
    +  **     UNION ALL
    +  **     SELECT y+1 FROM tab WHERE y+1!=5
    +  **     UNION ALL
    +  **     SELECT abs(z*2)+1 FROM tab2 WHERE abs(z*2)+1!=5
    +  **     ORDER BY 1
    +  **
    +  ** We call this the "compound-subquery flattening".
    +  */
    +  for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
    +    Select *pNew;
    +    ExprList *pOrderBy = p->pOrderBy;
    +    Expr *pLimit = p->pLimit;
    +    Select *pPrior = p->pPrior;
    +    p->pOrderBy = 0;
    +    p->pSrc = 0;
    +    p->pPrior = 0;
    +    p->pLimit = 0;
    +    pNew = sqlite3SelectDup(db, p, 0);
    +    p->pLimit = pLimit;
    +    p->pOrderBy = pOrderBy;
    +    p->pSrc = pSrc;
    +    p->op = TK_ALL;
    +    p->pRightmost = 0;
    +    if( pNew==0 ){
    +      pNew = pPrior;
    +    }else{
    +      pNew->pPrior = pPrior;
    +      pNew->pRightmost = 0;
    +    }
    +    p->pPrior = pNew;
    +    if( db->mallocFailed ) return 1;
    +  }
    +
    +  /* Begin flattening the iFrom-th entry of the FROM clause 
    +  ** in the outer query.
    +  */
    +  pSub = pSub1 = pSubitem->pSelect;
    +
    +  /* Delete the transient table structure associated with the
    +  ** subquery
    +  */
    +  sqlite3DbFree(db, pSubitem->zDatabase);
    +  sqlite3DbFree(db, pSubitem->zName);
    +  sqlite3DbFree(db, pSubitem->zAlias);
    +  pSubitem->zDatabase = 0;
    +  pSubitem->zName = 0;
    +  pSubitem->zAlias = 0;
    +  pSubitem->pSelect = 0;
    +
    +  /* Defer deleting the Table object associated with the
    +  ** subquery until code generation is
    +  ** complete, since there may still exist Expr.pTab entries that
    +  ** refer to the subquery even after flattening.  Ticket #3346.
    +  **
    +  ** pSubitem->pTab is always non-NULL by test restrictions and tests above.
    +  */
    +  if( ALWAYS(pSubitem->pTab!=0) ){
    +    Table *pTabToDel = pSubitem->pTab;
    +    if( pTabToDel->nRef==1 ){
    +      Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +      pTabToDel->pNextZombie = pToplevel->pZombieTab;
    +      pToplevel->pZombieTab = pTabToDel;
    +    }else{
    +      pTabToDel->nRef--;
    +    }
    +    pSubitem->pTab = 0;
    +  }
    +
    +  /* The following loop runs once for each term in a compound-subquery
    +  ** flattening (as described above).  If we are doing a different kind
    +  ** of flattening - a flattening other than a compound-subquery flattening -
    +  ** then this loop only runs once.
    +  **
    +  ** This loop moves all of the FROM elements of the subquery into the
    +  ** the FROM clause of the outer query.  Before doing this, remember
    +  ** the cursor number for the original outer query FROM element in
    +  ** iParent.  The iParent cursor will never be used.  Subsequent code
    +  ** will scan expressions looking for iParent references and replace
    +  ** those references with expressions that resolve to the subquery FROM
    +  ** elements we are now copying in.
    +  */
    +  for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
    +    int nSubSrc;
    +    u8 jointype = 0;
    +    pSubSrc = pSub->pSrc;     /* FROM clause of subquery */
    +    nSubSrc = pSubSrc->nSrc;  /* Number of terms in subquery FROM clause */
    +    pSrc = pParent->pSrc;     /* FROM clause of the outer query */
    +
    +    if( pSrc ){
    +      assert( pParent==p );  /* First time through the loop */
    +      jointype = pSubitem->jointype;
    +    }else{
    +      assert( pParent!=p );  /* 2nd and subsequent times through the loop */
    +      pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
    +      if( pSrc==0 ){
    +        assert( db->mallocFailed );
    +        break;
    +      }
    +    }
    +
    +    /* The subquery uses a single slot of the FROM clause of the outer
    +    ** query.  If the subquery has more than one element in its FROM clause,
    +    ** then expand the outer query to make space for it to hold all elements
    +    ** of the subquery.
    +    **
    +    ** Example:
    +    **
    +    **    SELECT * FROM tabA, (SELECT * FROM sub1, sub2), tabB;
    +    **
    +    ** The outer query has 3 slots in its FROM clause.  One slot of the
    +    ** outer query (the middle slot) is used by the subquery.  The next
    +    ** block of code will expand the out query to 4 slots.  The middle
    +    ** slot is expanded to two slots in order to make space for the
    +    ** two elements in the FROM clause of the subquery.
    +    */
    +    if( nSubSrc>1 ){
    +      pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
    +      if( db->mallocFailed ){
    +        break;
    +      }
    +    }
    +
    +    /* Transfer the FROM clause terms from the subquery into the
    +    ** outer query.
    +    */
    +    for(i=0; i<nSubSrc; i++){
    +      sqlite3IdListDelete(db, pSrc->a[i+iFrom].pUsing);
    +      pSrc->a[i+iFrom] = pSubSrc->a[i];
    +      memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));
    +    }
    +    pSrc->a[iFrom].jointype = jointype;
    +  
    +    /* Now begin substituting subquery result set expressions for 
    +    ** references to the iParent in the outer query.
    +    ** 
    +    ** Example:
    +    **
    +    **   SELECT a+5, b*10 FROM (SELECT x*3 AS a, y+10 AS b FROM t1) WHERE a>b;
    +    **   \                     \_____________ subquery __________/          /
    +    **    \_____________________ outer query ______________________________/
    +    **
    +    ** We look at every expression in the outer query and every place we see
    +    ** "a" we substitute "x*3" and every place we see "b" we substitute "y+10".
    +    */
    +    pList = pParent->pEList;
    +    for(i=0; i<pList->nExpr; i++){
    +      if( pList->a[i].zName==0 ){
    +        const char *zSpan = pList->a[i].zSpan;
    +        if( ALWAYS(zSpan) ){
    +          pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
    +        }
    +      }
    +    }
    +    substExprList(db, pParent->pEList, iParent, pSub->pEList);
    +    if( isAgg ){
    +      substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
    +      pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
    +    }
    +    if( pSub->pOrderBy ){
    +      assert( pParent->pOrderBy==0 );
    +      pParent->pOrderBy = pSub->pOrderBy;
    +      pSub->pOrderBy = 0;
    +    }else if( pParent->pOrderBy ){
    +      substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
    +    }
    +    if( pSub->pWhere ){
    +      pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
    +    }else{
    +      pWhere = 0;
    +    }
    +    if( subqueryIsAgg ){
    +      assert( pParent->pHaving==0 );
    +      pParent->pHaving = pParent->pWhere;
    +      pParent->pWhere = pWhere;
    +      pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
    +      pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving, 
    +                                  sqlite3ExprDup(db, pSub->pHaving, 0));
    +      assert( pParent->pGroupBy==0 );
    +      pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
    +    }else{
    +      pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
    +      pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
    +    }
    +  
    +    /* The flattened query is distinct if either the inner or the
    +    ** outer query is distinct. 
    +    */
    +    pParent->selFlags |= pSub->selFlags & SF_Distinct;
    +  
    +    /*
    +    ** SELECT ... FROM (SELECT ... LIMIT a OFFSET b) LIMIT x OFFSET y;
    +    **
    +    ** One is tempted to try to add a and b to combine the limits.  But this
    +    ** does not work if either limit is negative.
    +    */
    +    if( pSub->pLimit ){
    +      pParent->pLimit = pSub->pLimit;
    +      pSub->pLimit = 0;
    +    }
    +  }
    +
    +  /* Finially, delete what is left of the subquery and return
    +  ** success.
    +  */
    +  sqlite3SelectDelete(db, pSub1);
    +
    +  return 1;
    +}
    +#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
    +
    +/*
    +** Analyze the SELECT statement passed as an argument to see if it
    +** is a min() or max() query. Return WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX if 
    +** it is, or 0 otherwise. At present, a query is considered to be
    +** a min()/max() query if:
    +**
    +**   1. There is a single object in the FROM clause.
    +**
    +**   2. There is a single expression in the result set, and it is
    +**      either min(x) or max(x), where x is a column reference.
    +*/
    +static u8 minMaxQuery(Select *p){
    +  Expr *pExpr;
    +  ExprList *pEList = p->pEList;
    +
    +  if( pEList->nExpr!=1 ) return WHERE_ORDERBY_NORMAL;
    +  pExpr = pEList->a[0].pExpr;
    +  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
    +  if( NEVER(ExprHasProperty(pExpr, EP_xIsSelect)) ) return 0;
    +  pEList = pExpr->x.pList;
    +  if( pEList==0 || pEList->nExpr!=1 ) return 0;
    +  if( pEList->a[0].pExpr->op!=TK_AGG_COLUMN ) return WHERE_ORDERBY_NORMAL;
    +  assert( !ExprHasProperty(pExpr, EP_IntValue) );
    +  if( sqlite3StrICmp(pExpr->u.zToken,"min")==0 ){
    +    return WHERE_ORDERBY_MIN;
    +  }else if( sqlite3StrICmp(pExpr->u.zToken,"max")==0 ){
    +    return WHERE_ORDERBY_MAX;
    +  }
    +  return WHERE_ORDERBY_NORMAL;
    +}
    +
    +/*
    +** The select statement passed as the first argument is an aggregate query.
    +** The second argment is the associated aggregate-info object. This 
    +** function tests if the SELECT is of the form:
    +**
    +**   SELECT count(*) FROM <tbl>
    +**
    +** where table is a database table, not a sub-select or view. If the query
    +** does match this pattern, then a pointer to the Table object representing
    +** <tbl> is returned. Otherwise, 0 is returned.
    +*/
    +static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
    +  Table *pTab;
    +  Expr *pExpr;
    +
    +  assert( !p->pGroupBy );
    +
    +  if( p->pWhere || p->pEList->nExpr!=1 
    +   || p->pSrc->nSrc!=1 || p->pSrc->a[0].pSelect
    +  ){
    +    return 0;
    +  }
    +  pTab = p->pSrc->a[0].pTab;
    +  pExpr = p->pEList->a[0].pExpr;
    +  assert( pTab && !pTab->pSelect && pExpr );
    +
    +  if( IsVirtual(pTab) ) return 0;
    +  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
    +  if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
    +  if( pExpr->flags&EP_Distinct ) return 0;
    +
    +  return pTab;
    +}
    +
    +/*
    +** If the source-list item passed as an argument was augmented with an
    +** INDEXED BY clause, then try to locate the specified index. If there
    +** was such a clause and the named index cannot be found, return 
    +** SQLITE_ERROR and leave an error in pParse. Otherwise, populate 
    +** pFrom->pIndex and return SQLITE_OK.
    +*/
    +SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
    +  if( pFrom->pTab && pFrom->zIndex ){
    +    Table *pTab = pFrom->pTab;
    +    char *zIndex = pFrom->zIndex;
    +    Index *pIdx;
    +    for(pIdx=pTab->pIndex; 
    +        pIdx && sqlite3StrICmp(pIdx->zName, zIndex); 
    +        pIdx=pIdx->pNext
    +    );
    +    if( !pIdx ){
    +      sqlite3ErrorMsg(pParse, "no such index: %s", zIndex, 0);
    +      return SQLITE_ERROR;
    +    }
    +    pFrom->pIndex = pIdx;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This routine is a Walker callback for "expanding" a SELECT statement.
    +** "Expanding" means to do the following:
    +**
    +**    (1)  Make sure VDBE cursor numbers have been assigned to every
    +**         element of the FROM clause.
    +**
    +**    (2)  Fill in the pTabList->a[].pTab fields in the SrcList that 
    +**         defines FROM clause.  When views appear in the FROM clause,
    +**         fill pTabList->a[].pSelect with a copy of the SELECT statement
    +**         that implements the view.  A copy is made of the view's SELECT
    +**         statement so that we can freely modify or delete that statement
    +**         without worrying about messing up the presistent representation
    +**         of the view.
    +**
    +**    (3)  Add terms to the WHERE clause to accomodate the NATURAL keyword
    +**         on joins and the ON and USING clause of joins.
    +**
    +**    (4)  Scan the list of columns in the result set (pEList) looking
    +**         for instances of the "*" operator or the TABLE.* operator.
    +**         If found, expand each "*" to be every column in every table
    +**         and TABLE.* to be every column in TABLE.
    +**
    +*/
    +static int selectExpander(Walker *pWalker, Select *p){
    +  Parse *pParse = pWalker->pParse;
    +  int i, j, k;
    +  SrcList *pTabList;
    +  ExprList *pEList;
    +  struct SrcList_item *pFrom;
    +  sqlite3 *db = pParse->db;
    +
    +  if( db->mallocFailed  ){
    +    return WRC_Abort;
    +  }
    +  if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
    +    return WRC_Prune;
    +  }
    +  p->selFlags |= SF_Expanded;
    +  pTabList = p->pSrc;
    +  pEList = p->pEList;
    +
    +  /* Make sure cursor numbers have been assigned to all entries in
    +  ** the FROM clause of the SELECT statement.
    +  */
    +  sqlite3SrcListAssignCursors(pParse, pTabList);
    +
    +  /* Look up every table named in the FROM clause of the select.  If
    +  ** an entry of the FROM clause is a subquery instead of a table or view,
    +  ** then create a transient table structure to describe the subquery.
    +  */
    +  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
    +    Table *pTab;
    +    if( pFrom->pTab!=0 ){
    +      /* This statement has already been prepared.  There is no need
    +      ** to go further. */
    +      assert( i==0 );
    +      return WRC_Prune;
    +    }
    +    if( pFrom->zName==0 ){
    +#ifndef SQLITE_OMIT_SUBQUERY
    +      Select *pSel = pFrom->pSelect;
    +      /* A sub-query in the FROM clause of a SELECT */
    +      assert( pSel!=0 );
    +      assert( pFrom->pTab==0 );
    +      sqlite3WalkSelect(pWalker, pSel);
    +      pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
    +      if( pTab==0 ) return WRC_Abort;
    +      pTab->dbMem = db->lookaside.bEnabled ? db : 0;
    +      pTab->nRef = 1;
    +      pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
    +      while( pSel->pPrior ){ pSel = pSel->pPrior; }
    +      selectColumnsFromExprList(pParse, pSel->pEList, &pTab->nCol, &pTab->aCol);
    +      pTab->iPKey = -1;
    +      pTab->tabFlags |= TF_Ephemeral;
    +#endif
    +    }else{
    +      /* An ordinary table or view name in the FROM clause */
    +      assert( pFrom->pTab==0 );
    +      pFrom->pTab = pTab = 
    +        sqlite3LocateTable(pParse,0,pFrom->zName,pFrom->zDatabase);
    +      if( pTab==0 ) return WRC_Abort;
    +      pTab->nRef++;
    +#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
    +      if( pTab->pSelect || IsVirtual(pTab) ){
    +        /* We reach here if the named table is a really a view */
    +        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
    +        assert( pFrom->pSelect==0 );
    +        pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
    +        sqlite3WalkSelect(pWalker, pFrom->pSelect);
    +      }
    +#endif
    +    }
    +
    +    /* Locate the index named by the INDEXED BY clause, if any. */
    +    if( sqlite3IndexedByLookup(pParse, pFrom) ){
    +      return WRC_Abort;
    +    }
    +  }
    +
    +  /* Process NATURAL keywords, and ON and USING clauses of joins.
    +  */
    +  if( db->mallocFailed || sqliteProcessJoin(pParse, p) ){
    +    return WRC_Abort;
    +  }
    +
    +  /* For every "*" that occurs in the column list, insert the names of
    +  ** all columns in all tables.  And for every TABLE.* insert the names
    +  ** of all columns in TABLE.  The parser inserted a special expression
    +  ** with the TK_ALL operator for each "*" that it found in the column list.
    +  ** The following code just has to locate the TK_ALL expressions and expand
    +  ** each one to the list of all columns in all tables.
    +  **
    +  ** The first loop just checks to see if there are any "*" operators
    +  ** that need expanding.
    +  */
    +  for(k=0; k<pEList->nExpr; k++){
    +    Expr *pE = pEList->a[k].pExpr;
    +    if( pE->op==TK_ALL ) break;
    +    assert( pE->op!=TK_DOT || pE->pRight!=0 );
    +    assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
    +    if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break;
    +  }
    +  if( k<pEList->nExpr ){
    +    /*
    +    ** If we get here it means the result set contains one or more "*"
    +    ** operators that need to be expanded.  Loop through each expression
    +    ** in the result set and expand them one by one.
    +    */
    +    struct ExprList_item *a = pEList->a;
    +    ExprList *pNew = 0;
    +    int flags = pParse->db->flags;
    +    int longNames = (flags & SQLITE_FullColNames)!=0
    +                      && (flags & SQLITE_ShortColNames)==0;
    +
    +    for(k=0; k<pEList->nExpr; k++){
    +      Expr *pE = a[k].pExpr;
    +      assert( pE->op!=TK_DOT || pE->pRight!=0 );
    +      if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pE->pRight->op!=TK_ALL) ){
    +        /* This particular expression does not need to be expanded.
    +        */
    +        pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
    +        if( pNew ){
    +          pNew->a[pNew->nExpr-1].zName = a[k].zName;
    +          pNew->a[pNew->nExpr-1].zSpan = a[k].zSpan;
    +          a[k].zName = 0;
    +          a[k].zSpan = 0;
    +        }
    +        a[k].pExpr = 0;
    +      }else{
    +        /* This expression is a "*" or a "TABLE.*" and needs to be
    +        ** expanded. */
    +        int tableSeen = 0;      /* Set to 1 when TABLE matches */
    +        char *zTName;            /* text of name of TABLE */
    +        if( pE->op==TK_DOT ){
    +          assert( pE->pLeft!=0 );
    +          assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
    +          zTName = pE->pLeft->u.zToken;
    +        }else{
    +          zTName = 0;
    +        }
    +        for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
    +          Table *pTab = pFrom->pTab;
    +          char *zTabName = pFrom->zAlias;
    +          if( zTabName==0 ){
    +            zTabName = pTab->zName;
    +          }
    +          if( db->mallocFailed ) break;
    +          if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
    +            continue;
    +          }
    +          tableSeen = 1;
    +          for(j=0; j<pTab->nCol; j++){
    +            Expr *pExpr, *pRight;
    +            char *zName = pTab->aCol[j].zName;
    +            char *zColname;  /* The computed column name */
    +            char *zToFree;   /* Malloced string that needs to be freed */
    +            Token sColname;  /* Computed column name as a token */
    +
    +            /* If a column is marked as 'hidden' (currently only possible
    +            ** for virtual tables), do not include it in the expanded
    +            ** result-set list.
    +            */
    +            if( IsHiddenColumn(&pTab->aCol[j]) ){
    +              assert(IsVirtual(pTab));
    +              continue;
    +            }
    +
    +            if( i>0 && zTName==0 ){
    +              struct SrcList_item *pLeft = &pTabList->a[i-1];
    +              if( (pLeft[1].jointype & JT_NATURAL)!=0 &&
    +                        columnIndex(pLeft->pTab, zName)>=0 ){
    +                /* In a NATURAL join, omit the join columns from the 
    +                ** table on the right */
    +                continue;
    +              }
    +              if( sqlite3IdListIndex(pLeft[1].pUsing, zName)>=0 ){
    +                /* In a join with a USING clause, omit columns in the
    +                ** using clause from the table on the right. */
    +                continue;
    +              }
    +            }
    +            pRight = sqlite3Expr(db, TK_ID, zName);
    +            zColname = zName;
    +            zToFree = 0;
    +            if( longNames || pTabList->nSrc>1 ){
    +              Expr *pLeft;
    +              pLeft = sqlite3Expr(db, TK_ID, zTabName);
    +              pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
    +              if( longNames ){
    +                zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
    +                zToFree = zColname;
    +              }
    +            }else{
    +              pExpr = pRight;
    +            }
    +            pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
    +            sColname.z = zColname;
    +            sColname.n = sqlite3Strlen30(zColname);
    +            sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
    +            sqlite3DbFree(db, zToFree);
    +          }
    +        }
    +        if( !tableSeen ){
    +          if( zTName ){
    +            sqlite3ErrorMsg(pParse, "no such table: %s", zTName);
    +          }else{
    +            sqlite3ErrorMsg(pParse, "no tables specified");
    +          }
    +        }
    +      }
    +    }
    +    sqlite3ExprListDelete(db, pEList);
    +    p->pEList = pNew;
    +  }
    +#if SQLITE_MAX_COLUMN
    +  if( p->pEList && p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    +    sqlite3ErrorMsg(pParse, "too many columns in result set");
    +  }
    +#endif
    +  return WRC_Continue;
    +}
    +
    +/*
    +** No-op routine for the parse-tree walker.
    +**
    +** When this routine is the Walker.xExprCallback then expression trees
    +** are walked without any actions being taken at each node.  Presumably,
    +** when this routine is used for Walker.xExprCallback then 
    +** Walker.xSelectCallback is set to do something useful for every 
    +** subquery in the parser tree.
    +*/
    +static int exprWalkNoop(Walker *NotUsed, Expr *NotUsed2){
    +  UNUSED_PARAMETER2(NotUsed, NotUsed2);
    +  return WRC_Continue;
    +}
    +
    +/*
    +** This routine "expands" a SELECT statement and all of its subqueries.
    +** For additional information on what it means to "expand" a SELECT
    +** statement, see the comment on the selectExpand worker callback above.
    +**
    +** Expanding a SELECT statement is the first step in processing a
    +** SELECT statement.  The SELECT statement must be expanded before
    +** name resolution is performed.
    +**
    +** If anything goes wrong, an error message is written into pParse.
    +** The calling function can detect the problem by looking at pParse->nErr
    +** and/or pParse->db->mallocFailed.
    +*/
    +static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
    +  Walker w;
    +  w.xSelectCallback = selectExpander;
    +  w.xExprCallback = exprWalkNoop;
    +  w.pParse = pParse;
    +  sqlite3WalkSelect(&w, pSelect);
    +}
    +
    +
    +#ifndef SQLITE_OMIT_SUBQUERY
    +/*
    +** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()
    +** interface.
    +**
    +** For each FROM-clause subquery, add Column.zType and Column.zColl
    +** information to the Table structure that represents the result set
    +** of that subquery.
    +**
    +** The Table structure that represents the result set was constructed
    +** by selectExpander() but the type and collation information was omitted
    +** at that point because identifiers had not yet been resolved.  This
    +** routine is called after identifier resolution.
    +*/
    +static int selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){
    +  Parse *pParse;
    +  int i;
    +  SrcList *pTabList;
    +  struct SrcList_item *pFrom;
    +
    +  assert( p->selFlags & SF_Resolved );
    +  assert( (p->selFlags & SF_HasTypeInfo)==0 );
    +  p->selFlags |= SF_HasTypeInfo;
    +  pParse = pWalker->pParse;
    +  pTabList = p->pSrc;
    +  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
    +    Table *pTab = pFrom->pTab;
    +    if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){
    +      /* A sub-query in the FROM clause of a SELECT */
    +      Select *pSel = pFrom->pSelect;
    +      assert( pSel );
    +      while( pSel->pPrior ) pSel = pSel->pPrior;
    +      selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSel);
    +    }
    +  }
    +  return WRC_Continue;
    +}
    +#endif
    +
    +
    +/*
    +** This routine adds datatype and collating sequence information to
    +** the Table structures of all FROM-clause subqueries in a
    +** SELECT statement.
    +**
    +** Use this routine after name resolution.
    +*/
    +static void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){
    +#ifndef SQLITE_OMIT_SUBQUERY
    +  Walker w;
    +  w.xSelectCallback = selectAddSubqueryTypeInfo;
    +  w.xExprCallback = exprWalkNoop;
    +  w.pParse = pParse;
    +  sqlite3WalkSelect(&w, pSelect);
    +#endif
    +}
    +
    +
    +/*
    +** This routine sets of a SELECT statement for processing.  The
    +** following is accomplished:
    +**
    +**     *  VDBE Cursor numbers are assigned to all FROM-clause terms.
    +**     *  Ephemeral Table objects are created for all FROM-clause subqueries.
    +**     *  ON and USING clauses are shifted into WHERE statements
    +**     *  Wildcards "*" and "TABLE.*" in result sets are expanded.
    +**     *  Identifiers in expression are matched to tables.
    +**
    +** This routine acts recursively on all subqueries within the SELECT.
    +*/
    +SQLITE_PRIVATE void sqlite3SelectPrep(
    +  Parse *pParse,         /* The parser context */
    +  Select *p,             /* The SELECT statement being coded. */
    +  NameContext *pOuterNC  /* Name context for container */
    +){
    +  sqlite3 *db;
    +  if( NEVER(p==0) ) return;
    +  db = pParse->db;
    +  if( p->selFlags & SF_HasTypeInfo ) return;
    +  sqlite3SelectExpand(pParse, p);
    +  if( pParse->nErr || db->mallocFailed ) return;
    +  sqlite3ResolveSelectNames(pParse, p, pOuterNC);
    +  if( pParse->nErr || db->mallocFailed ) return;
    +  sqlite3SelectAddTypeInfo(pParse, p);
    +}
    +
    +/*
    +** Reset the aggregate accumulator.
    +**
    +** The aggregate accumulator is a set of memory cells that hold
    +** intermediate results while calculating an aggregate.  This
    +** routine simply stores NULLs in all of those memory cells.
    +*/
    +static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  struct AggInfo_func *pFunc;
    +  if( pAggInfo->nFunc+pAggInfo->nColumn==0 ){
    +    return;
    +  }
    +  for(i=0; i<pAggInfo->nColumn; i++){
    +    sqlite3VdbeAddOp2(v, OP_Null, 0, pAggInfo->aCol[i].iMem);
    +  }
    +  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){
    +    sqlite3VdbeAddOp2(v, OP_Null, 0, pFunc->iMem);
    +    if( pFunc->iDistinct>=0 ){
    +      Expr *pE = pFunc->pExpr;
    +      assert( !ExprHasProperty(pE, EP_xIsSelect) );
    +      if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
    +        sqlite3ErrorMsg(pParse, "DISTINCT aggregates must have exactly one "
    +           "argument");
    +        pFunc->iDistinct = -1;
    +      }else{
    +        KeyInfo *pKeyInfo = keyInfoFromExprList(pParse, pE->x.pList);
    +        sqlite3VdbeAddOp4(v, OP_OpenEphemeral, pFunc->iDistinct, 0, 0,
    +                          (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Invoke the OP_AggFinalize opcode for every aggregate function
    +** in the AggInfo structure.
    +*/
    +static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  struct AggInfo_func *pF;
    +  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
    +    ExprList *pList = pF->pExpr->x.pList;
    +    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
    +    sqlite3VdbeAddOp4(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0, 0,
    +                      (void*)pF->pFunc, P4_FUNCDEF);
    +  }
    +}
    +
    +/*
    +** Update the accumulator memory cells for an aggregate based on
    +** the current cursor position.
    +*/
    +static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  struct AggInfo_func *pF;
    +  struct AggInfo_col *pC;
    +
    +  pAggInfo->directMode = 1;
    +  sqlite3ExprCacheClear(pParse);
    +  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
    +    int nArg;
    +    int addrNext = 0;
    +    int regAgg;
    +    ExprList *pList = pF->pExpr->x.pList;
    +    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
    +    if( pList ){
    +      nArg = pList->nExpr;
    +      regAgg = sqlite3GetTempRange(pParse, nArg);
    +      sqlite3ExprCodeExprList(pParse, pList, regAgg, 0);
    +    }else{
    +      nArg = 0;
    +      regAgg = 0;
    +    }
    +    if( pF->iDistinct>=0 ){
    +      addrNext = sqlite3VdbeMakeLabel(v);
    +      assert( nArg==1 );
    +      codeDistinct(pParse, pF->iDistinct, addrNext, 1, regAgg);
    +    }
    +    if( pF->pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
    +      CollSeq *pColl = 0;
    +      struct ExprList_item *pItem;
    +      int j;
    +      assert( pList!=0 );  /* pList!=0 if pF->pFunc has NEEDCOLL */
    +      for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
    +        pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
    +      }
    +      if( !pColl ){
    +        pColl = pParse->db->pDfltColl;
    +      }
    +      sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
    +    }
    +    sqlite3VdbeAddOp4(v, OP_AggStep, 0, regAgg, pF->iMem,
    +                      (void*)pF->pFunc, P4_FUNCDEF);
    +    sqlite3VdbeChangeP5(v, (u8)nArg);
    +    sqlite3ReleaseTempRange(pParse, regAgg, nArg);
    +    sqlite3ExprCacheAffinityChange(pParse, regAgg, nArg);
    +    if( addrNext ){
    +      sqlite3VdbeResolveLabel(v, addrNext);
    +      sqlite3ExprCacheClear(pParse);
    +    }
    +  }
    +  for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
    +    sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
    +  }
    +  pAggInfo->directMode = 0;
    +  sqlite3ExprCacheClear(pParse);
    +}
    +
    +/*
    +** Generate code for the SELECT statement given in the p argument.  
    +**
    +** The results are distributed in various ways depending on the
    +** contents of the SelectDest structure pointed to by argument pDest
    +** as follows:
    +**
    +**     pDest->eDest    Result
    +**     ------------    -------------------------------------------
    +**     SRT_Output      Generate a row of output (using the OP_ResultRow
    +**                     opcode) for each row in the result set.
    +**
    +**     SRT_Mem         Only valid if the result is a single column.
    +**                     Store the first column of the first result row
    +**                     in register pDest->iParm then abandon the rest
    +**                     of the query.  This destination implies "LIMIT 1".
    +**
    +**     SRT_Set         The result must be a single column.  Store each
    +**                     row of result as the key in table pDest->iParm. 
    +**                     Apply the affinity pDest->affinity before storing
    +**                     results.  Used to implement "IN (SELECT ...)".
    +**
    +**     SRT_Union       Store results as a key in a temporary table pDest->iParm.
    +**
    +**     SRT_Except      Remove results from the temporary table pDest->iParm.
    +**
    +**     SRT_Table       Store results in temporary table pDest->iParm.
    +**                     This is like SRT_EphemTab except that the table
    +**                     is assumed to already be open.
    +**
    +**     SRT_EphemTab    Create an temporary table pDest->iParm and store
    +**                     the result there. The cursor is left open after
    +**                     returning.  This is like SRT_Table except that
    +**                     this destination uses OP_OpenEphemeral to create
    +**                     the table first.
    +**
    +**     SRT_Coroutine   Generate a co-routine that returns a new row of
    +**                     results each time it is invoked.  The entry point
    +**                     of the co-routine is stored in register pDest->iParm.
    +**
    +**     SRT_Exists      Store a 1 in memory cell pDest->iParm if the result
    +**                     set is not empty.
    +**
    +**     SRT_Discard     Throw the results away.  This is used by SELECT
    +**                     statements within triggers whose only purpose is
    +**                     the side-effects of functions.
    +**
    +** This routine returns the number of errors.  If any errors are
    +** encountered, then an appropriate error message is left in
    +** pParse->zErrMsg.
    +**
    +** This routine does NOT free the Select structure passed in.  The
    +** calling function needs to do that.
    +*/
    +SQLITE_PRIVATE int sqlite3Select(
    +  Parse *pParse,         /* The parser context */
    +  Select *p,             /* The SELECT statement being coded. */
    +  SelectDest *pDest      /* What to do with the query results */
    +){
    +  int i, j;              /* Loop counters */
    +  WhereInfo *pWInfo;     /* Return from sqlite3WhereBegin() */
    +  Vdbe *v;               /* The virtual machine under construction */
    +  int isAgg;             /* True for select lists like "count(*)" */
    +  ExprList *pEList;      /* List of columns to extract. */
    +  SrcList *pTabList;     /* List of tables to select from */
    +  Expr *pWhere;          /* The WHERE clause.  May be NULL */
    +  ExprList *pOrderBy;    /* The ORDER BY clause.  May be NULL */
    +  ExprList *pGroupBy;    /* The GROUP BY clause.  May be NULL */
    +  Expr *pHaving;         /* The HAVING clause.  May be NULL */
    +  int isDistinct;        /* True if the DISTINCT keyword is present */
    +  int distinct;          /* Table to use for the distinct set */
    +  int rc = 1;            /* Value to return from this function */
    +  int addrSortIndex;     /* Address of an OP_OpenEphemeral instruction */
    +  AggInfo sAggInfo;      /* Information used by aggregate queries */
    +  int iEnd;              /* Address of the end of the query */
    +  sqlite3 *db;           /* The database connection */
    +
    +  db = pParse->db;
    +  if( p==0 || db->mallocFailed || pParse->nErr ){
    +    return 1;
    +  }
    +  if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;
    +  memset(&sAggInfo, 0, sizeof(sAggInfo));
    +
    +  if( IgnorableOrderby(pDest) ){
    +    assert(pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union || 
    +           pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard);
    +    /* If ORDER BY makes no difference in the output then neither does
    +    ** DISTINCT so it can be removed too. */
    +    sqlite3ExprListDelete(db, p->pOrderBy);
    +    p->pOrderBy = 0;
    +    p->selFlags &= ~SF_Distinct;
    +  }
    +  sqlite3SelectPrep(pParse, p, 0);
    +  pOrderBy = p->pOrderBy;
    +  pTabList = p->pSrc;
    +  pEList = p->pEList;
    +  if( pParse->nErr || db->mallocFailed ){
    +    goto select_end;
    +  }
    +  isAgg = (p->selFlags & SF_Aggregate)!=0;
    +  assert( pEList!=0 );
    +
    +  /* Begin generating code.
    +  */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ) goto select_end;
    +
    +  /* Generate code for all sub-queries in the FROM clause
    +  */
    +#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
    +  for(i=0; !p->pPrior && i<pTabList->nSrc; i++){
    +    struct SrcList_item *pItem = &pTabList->a[i];
    +    SelectDest dest;
    +    Select *pSub = pItem->pSelect;
    +    int isAggSub;
    +
    +    if( pSub==0 || pItem->isPopulated ) continue;
    +
    +    /* Increment Parse.nHeight by the height of the largest expression
    +    ** tree refered to by this, the parent select. The child select
    +    ** may contain expression trees of at most
    +    ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit
    +    ** more conservative than necessary, but much easier than enforcing
    +    ** an exact limit.
    +    */
    +    pParse->nHeight += sqlite3SelectExprHeight(p);
    +
    +    /* Check to see if the subquery can be absorbed into the parent. */
    +    isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
    +    if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
    +      if( isAggSub ){
    +        isAgg = 1;
    +        p->selFlags |= SF_Aggregate;
    +      }
    +      i = -1;
    +    }else{
    +      sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
    +      assert( pItem->isPopulated==0 );
    +      sqlite3Select(pParse, pSub, &dest);
    +      pItem->isPopulated = 1;
    +    }
    +    if( /*pParse->nErr ||*/ db->mallocFailed ){
    +      goto select_end;
    +    }
    +    pParse->nHeight -= sqlite3SelectExprHeight(p);
    +    pTabList = p->pSrc;
    +    if( !IgnorableOrderby(pDest) ){
    +      pOrderBy = p->pOrderBy;
    +    }
    +  }
    +  pEList = p->pEList;
    +#endif
    +  pWhere = p->pWhere;
    +  pGroupBy = p->pGroupBy;
    +  pHaving = p->pHaving;
    +  isDistinct = (p->selFlags & SF_Distinct)!=0;
    +
    +#ifndef SQLITE_OMIT_COMPOUND_SELECT
    +  /* If there is are a sequence of queries, do the earlier ones first.
    +  */
    +  if( p->pPrior ){
    +    if( p->pRightmost==0 ){
    +      Select *pLoop, *pRight = 0;
    +      int cnt = 0;
    +      int mxSelect;
    +      for(pLoop=p; pLoop; pLoop=pLoop->pPrior, cnt++){
    +        pLoop->pRightmost = p;
    +        pLoop->pNext = pRight;
    +        pRight = pLoop;
    +      }
    +      mxSelect = db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT];
    +      if( mxSelect && cnt>mxSelect ){
    +        sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
    +        return 1;
    +      }
    +    }
    +    return multiSelect(pParse, p, pDest);
    +  }
    +#endif
    +
    +  /* If writing to memory or generating a set
    +  ** only a single column may be output.
    +  */
    +#ifndef SQLITE_OMIT_SUBQUERY
    +  if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
    +    goto select_end;
    +  }
    +#endif
    +
    +  /* If possible, rewrite the query to use GROUP BY instead of DISTINCT.
    +  ** GROUP BY might use an index, DISTINCT never does.
    +  */
    +  assert( p->pGroupBy==0 || (p->selFlags & SF_Aggregate)!=0 );
    +  if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct ){
    +    p->pGroupBy = sqlite3ExprListDup(db, p->pEList, 0);
    +    pGroupBy = p->pGroupBy;
    +    p->selFlags &= ~SF_Distinct;
    +    isDistinct = 0;
    +  }
    +
    +  /* If there is an ORDER BY clause, then this sorting
    +  ** index might end up being unused if the data can be 
    +  ** extracted in pre-sorted order.  If that is the case, then the
    +  ** OP_OpenEphemeral instruction will be changed to an OP_Noop once
    +  ** we figure out that the sorting index is not needed.  The addrSortIndex
    +  ** variable is used to facilitate that change.
    +  */
    +  if( pOrderBy ){
    +    KeyInfo *pKeyInfo;
    +    pKeyInfo = keyInfoFromExprList(pParse, pOrderBy);
    +    pOrderBy->iECursor = pParse->nTab++;
    +    p->addrOpenEphm[2] = addrSortIndex =
    +      sqlite3VdbeAddOp4(v, OP_OpenEphemeral,
    +                           pOrderBy->iECursor, pOrderBy->nExpr+2, 0,
    +                           (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
    +  }else{
    +    addrSortIndex = -1;
    +  }
    +
    +  /* If the output is destined for a temporary table, open that table.
    +  */
    +  if( pDest->eDest==SRT_EphemTab ){
    +    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pDest->iParm, pEList->nExpr);
    +  }
    +
    +  /* Set the limiter.
    +  */
    +  iEnd = sqlite3VdbeMakeLabel(v);
    +  computeLimitRegisters(pParse, p, iEnd);
    +
    +  /* Open a virtual index to use for the distinct set.
    +  */
    +  if( isDistinct ){
    +    KeyInfo *pKeyInfo;
    +    assert( isAgg || pGroupBy );
    +    distinct = pParse->nTab++;
    +    pKeyInfo = keyInfoFromExprList(pParse, p->pEList);
    +    sqlite3VdbeAddOp4(v, OP_OpenEphemeral, distinct, 0, 0,
    +                        (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
    +  }else{
    +    distinct = -1;
    +  }
    +
    +  /* Aggregate and non-aggregate queries are handled differently */
    +  if( !isAgg && pGroupBy==0 ){
    +    /* This case is for non-aggregate queries
    +    ** Begin the database scan
    +    */
    +    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pOrderBy, 0);
    +    if( pWInfo==0 ) goto select_end;
    +
    +    /* If sorting index that was created by a prior OP_OpenEphemeral 
    +    ** instruction ended up not being needed, then change the OP_OpenEphemeral
    +    ** into an OP_Noop.
    +    */
    +    if( addrSortIndex>=0 && pOrderBy==0 ){
    +      sqlite3VdbeChangeToNoop(v, addrSortIndex, 1);
    +      p->addrOpenEphm[2] = -1;
    +    }
    +
    +    /* Use the standard inner loop
    +    */
    +    assert(!isDistinct);
    +    selectInnerLoop(pParse, p, pEList, 0, 0, pOrderBy, -1, pDest,
    +                    pWInfo->iContinue, pWInfo->iBreak);
    +
    +    /* End the database scan loop.
    +    */
    +    sqlite3WhereEnd(pWInfo);
    +  }else{
    +    /* This is the processing for aggregate queries */
    +    NameContext sNC;    /* Name context for processing aggregate information */
    +    int iAMem;          /* First Mem address for storing current GROUP BY */
    +    int iBMem;          /* First Mem address for previous GROUP BY */
    +    int iUseFlag;       /* Mem address holding flag indicating that at least
    +                        ** one row of the input to the aggregator has been
    +                        ** processed */
    +    int iAbortFlag;     /* Mem address which causes query abort if positive */
    +    int groupBySort;    /* Rows come from source in GROUP BY order */
    +    int addrEnd;        /* End of processing for this SELECT */
    +
    +    /* Remove any and all aliases between the result set and the
    +    ** GROUP BY clause.
    +    */
    +    if( pGroupBy ){
    +      int k;                        /* Loop counter */
    +      struct ExprList_item *pItem;  /* For looping over expression in a list */
    +
    +      for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){
    +        pItem->iAlias = 0;
    +      }
    +      for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){
    +        pItem->iAlias = 0;
    +      }
    +    }
    +
    + 
    +    /* Create a label to jump to when we want to abort the query */
    +    addrEnd = sqlite3VdbeMakeLabel(v);
    +
    +    /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in
    +    ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the
    +    ** SELECT statement.
    +    */
    +    memset(&sNC, 0, sizeof(sNC));
    +    sNC.pParse = pParse;
    +    sNC.pSrcList = pTabList;
    +    sNC.pAggInfo = &sAggInfo;
    +    sAggInfo.nSortingColumn = pGroupBy ? pGroupBy->nExpr+1 : 0;
    +    sAggInfo.pGroupBy = pGroupBy;
    +    sqlite3ExprAnalyzeAggList(&sNC, pEList);
    +    sqlite3ExprAnalyzeAggList(&sNC, pOrderBy);
    +    if( pHaving ){
    +      sqlite3ExprAnalyzeAggregates(&sNC, pHaving);
    +    }
    +    sAggInfo.nAccumulator = sAggInfo.nColumn;
    +    for(i=0; i<sAggInfo.nFunc; i++){
    +      assert( !ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect) );
    +      sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
    +    }
    +    if( db->mallocFailed ) goto select_end;
    +
    +    /* Processing for aggregates with GROUP BY is very different and
    +    ** much more complex than aggregates without a GROUP BY.
    +    */
    +    if( pGroupBy ){
    +      KeyInfo *pKeyInfo;  /* Keying information for the group by clause */
    +      int j1;             /* A-vs-B comparision jump */
    +      int addrOutputRow;  /* Start of subroutine that outputs a result row */
    +      int regOutputRow;   /* Return address register for output subroutine */
    +      int addrSetAbort;   /* Set the abort flag and return */
    +      int addrTopOfLoop;  /* Top of the input loop */
    +      int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
    +      int addrReset;      /* Subroutine for resetting the accumulator */
    +      int regReset;       /* Return address register for reset subroutine */
    +
    +      /* If there is a GROUP BY clause we might need a sorting index to
    +      ** implement it.  Allocate that sorting index now.  If it turns out
    +      ** that we do not need it after all, the OpenEphemeral instruction
    +      ** will be converted into a Noop.  
    +      */
    +      sAggInfo.sortingIdx = pParse->nTab++;
    +      pKeyInfo = keyInfoFromExprList(pParse, pGroupBy);
    +      addrSortingIdx = sqlite3VdbeAddOp4(v, OP_OpenEphemeral, 
    +          sAggInfo.sortingIdx, sAggInfo.nSortingColumn, 
    +          0, (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
    +
    +      /* Initialize memory locations used by GROUP BY aggregate processing
    +      */
    +      iUseFlag = ++pParse->nMem;
    +      iAbortFlag = ++pParse->nMem;
    +      regOutputRow = ++pParse->nMem;
    +      addrOutputRow = sqlite3VdbeMakeLabel(v);
    +      regReset = ++pParse->nMem;
    +      addrReset = sqlite3VdbeMakeLabel(v);
    +      iAMem = pParse->nMem + 1;
    +      pParse->nMem += pGroupBy->nExpr;
    +      iBMem = pParse->nMem + 1;
    +      pParse->nMem += pGroupBy->nExpr;
    +      sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);
    +      VdbeComment((v, "clear abort flag"));
    +      sqlite3VdbeAddOp2(v, OP_Integer, 0, iUseFlag);
    +      VdbeComment((v, "indicate accumulator empty"));
    +
    +      /* Begin a loop that will extract all source rows in GROUP BY order.
    +      ** This might involve two separate loops with an OP_Sort in between, or
    +      ** it might be a single loop that uses an index to extract information
    +      ** in the right order to begin with.
    +      */
    +      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);
    +      pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pGroupBy, 0);
    +      if( pWInfo==0 ) goto select_end;
    +      if( pGroupBy==0 ){
    +        /* The optimizer is able to deliver rows in group by order so
    +        ** we do not have to sort.  The OP_OpenEphemeral table will be
    +        ** cancelled later because we still need to use the pKeyInfo
    +        */
    +        pGroupBy = p->pGroupBy;
    +        groupBySort = 0;
    +      }else{
    +        /* Rows are coming out in undetermined order.  We have to push
    +        ** each row into a sorting index, terminate the first loop,
    +        ** then loop over the sorting index in order to get the output
    +        ** in sorted order
    +        */
    +        int regBase;
    +        int regRecord;
    +        int nCol;
    +        int nGroupBy;
    +
    +        groupBySort = 1;
    +        nGroupBy = pGroupBy->nExpr;
    +        nCol = nGroupBy + 1;
    +        j = nGroupBy+1;
    +        for(i=0; i<sAggInfo.nColumn; i++){
    +          if( sAggInfo.aCol[i].iSorterColumn>=j ){
    +            nCol++;
    +            j++;
    +          }
    +        }
    +        regBase = sqlite3GetTempRange(pParse, nCol);
    +        sqlite3ExprCacheClear(pParse);
    +        sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0);
    +        sqlite3VdbeAddOp2(v, OP_Sequence, sAggInfo.sortingIdx,regBase+nGroupBy);
    +        j = nGroupBy+1;
    +        for(i=0; i<sAggInfo.nColumn; i++){
    +          struct AggInfo_col *pCol = &sAggInfo.aCol[i];
    +          if( pCol->iSorterColumn>=j ){
    +            int r1 = j + regBase;
    +            int r2;
    +
    +            r2 = sqlite3ExprCodeGetColumn(pParse, 
    +                               pCol->pTab, pCol->iColumn, pCol->iTable, r1, 0);
    +            if( r1!=r2 ){
    +              sqlite3VdbeAddOp2(v, OP_SCopy, r2, r1);
    +            }
    +            j++;
    +          }
    +        }
    +        regRecord = sqlite3GetTempReg(pParse);
    +        sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);
    +        sqlite3VdbeAddOp2(v, OP_IdxInsert, sAggInfo.sortingIdx, regRecord);
    +        sqlite3ReleaseTempReg(pParse, regRecord);
    +        sqlite3ReleaseTempRange(pParse, regBase, nCol);
    +        sqlite3WhereEnd(pWInfo);
    +        sqlite3VdbeAddOp2(v, OP_Sort, sAggInfo.sortingIdx, addrEnd);
    +        VdbeComment((v, "GROUP BY sort"));
    +        sAggInfo.useSortingIdx = 1;
    +        sqlite3ExprCacheClear(pParse);
    +      }
    +
    +      /* Evaluate the current GROUP BY terms and store in b0, b1, b2...
    +      ** (b0 is memory location iBMem+0, b1 is iBMem+1, and so forth)
    +      ** Then compare the current GROUP BY terms against the GROUP BY terms
    +      ** from the previous row currently stored in a0, a1, a2...
    +      */
    +      addrTopOfLoop = sqlite3VdbeCurrentAddr(v);
    +      sqlite3ExprCacheClear(pParse);
    +      for(j=0; j<pGroupBy->nExpr; j++){
    +        if( groupBySort ){
    +          sqlite3VdbeAddOp3(v, OP_Column, sAggInfo.sortingIdx, j, iBMem+j);
    +        }else{
    +          sAggInfo.directMode = 1;
    +          sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
    +        }
    +      }
    +      sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
    +                          (char*)pKeyInfo, P4_KEYINFO);
    +      j1 = sqlite3VdbeCurrentAddr(v);
    +      sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1);
    +
    +      /* Generate code that runs whenever the GROUP BY changes.
    +      ** Changes in the GROUP BY are detected by the previous code
    +      ** block.  If there were no changes, this block is skipped.
    +      **
    +      ** This code copies current group by terms in b0,b1,b2,...
    +      ** over to a0,a1,a2.  It then calls the output subroutine
    +      ** and resets the aggregate accumulator registers in preparation
    +      ** for the next GROUP BY batch.
    +      */
    +      sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr);
    +      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
    +      VdbeComment((v, "output one row"));
    +      sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd);
    +      VdbeComment((v, "check abort flag"));
    +      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);
    +      VdbeComment((v, "reset accumulator"));
    +
    +      /* Update the aggregate accumulators based on the content of
    +      ** the current row
    +      */
    +      sqlite3VdbeJumpHere(v, j1);
    +      updateAccumulator(pParse, &sAggInfo);
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
    +      VdbeComment((v, "indicate data in accumulator"));
    +
    +      /* End of the loop
    +      */
    +      if( groupBySort ){
    +        sqlite3VdbeAddOp2(v, OP_Next, sAggInfo.sortingIdx, addrTopOfLoop);
    +      }else{
    +        sqlite3WhereEnd(pWInfo);
    +        sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1);
    +      }
    +
    +      /* Output the final row of result
    +      */
    +      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
    +      VdbeComment((v, "output final row"));
    +
    +      /* Jump over the subroutines
    +      */
    +      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEnd);
    +
    +      /* Generate a subroutine that outputs a single row of the result
    +      ** set.  This subroutine first looks at the iUseFlag.  If iUseFlag
    +      ** is less than or equal to zero, the subroutine is a no-op.  If
    +      ** the processing calls for the query to abort, this subroutine
    +      ** increments the iAbortFlag memory location before returning in
    +      ** order to signal the caller to abort.
    +      */
    +      addrSetAbort = sqlite3VdbeCurrentAddr(v);
    +      sqlite3VdbeAddOp2(v, OP_Integer, 1, iAbortFlag);
    +      VdbeComment((v, "set abort flag"));
    +      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
    +      sqlite3VdbeResolveLabel(v, addrOutputRow);
    +      addrOutputRow = sqlite3VdbeCurrentAddr(v);
    +      sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2);
    +      VdbeComment((v, "Groupby result generator entry point"));
    +      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
    +      finalizeAggFunctions(pParse, &sAggInfo);
    +      sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL);
    +      selectInnerLoop(pParse, p, p->pEList, 0, 0, pOrderBy,
    +                      distinct, pDest,
    +                      addrOutputRow+1, addrSetAbort);
    +      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
    +      VdbeComment((v, "end groupby result generator"));
    +
    +      /* Generate a subroutine that will reset the group-by accumulator
    +      */
    +      sqlite3VdbeResolveLabel(v, addrReset);
    +      resetAccumulator(pParse, &sAggInfo);
    +      sqlite3VdbeAddOp1(v, OP_Return, regReset);
    +     
    +    } /* endif pGroupBy.  Begin aggregate queries without GROUP BY: */
    +    else {
    +      ExprList *pDel = 0;
    +#ifndef SQLITE_OMIT_BTREECOUNT
    +      Table *pTab;
    +      if( (pTab = isSimpleCount(p, &sAggInfo))!=0 ){
    +        /* If isSimpleCount() returns a pointer to a Table structure, then
    +        ** the SQL statement is of the form:
    +        **
    +        **   SELECT count(*) FROM <tbl>
    +        **
    +        ** where the Table structure returned represents table <tbl>.
    +        **
    +        ** This statement is so common that it is optimized specially. The
    +        ** OP_Count instruction is executed either on the intkey table that
    +        ** contains the data for table <tbl> or on one of its indexes. It
    +        ** is better to execute the op on an index, as indexes are almost
    +        ** always spread across less pages than their corresponding tables.
    +        */
    +        const int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +        const int iCsr = pParse->nTab++;     /* Cursor to scan b-tree */
    +        Index *pIdx;                         /* Iterator variable */
    +        KeyInfo *pKeyInfo = 0;               /* Keyinfo for scanned index */
    +        Index *pBest = 0;                    /* Best index found so far */
    +        int iRoot = pTab->tnum;              /* Root page of scanned b-tree */
    +
    +        sqlite3CodeVerifySchema(pParse, iDb);
    +        sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
    +
    +        /* Search for the index that has the least amount of columns. If
    +        ** there is such an index, and it has less columns than the table
    +        ** does, then we can assume that it consumes less space on disk and
    +        ** will therefore be cheaper to scan to determine the query result.
    +        ** In this case set iRoot to the root page number of the index b-tree
    +        ** and pKeyInfo to the KeyInfo structure required to navigate the
    +        ** index.
    +        **
    +        ** In practice the KeyInfo structure will not be used. It is only 
    +        ** passed to keep OP_OpenRead happy.
    +        */
    +        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +          if( !pBest || pIdx->nColumn<pBest->nColumn ){
    +            pBest = pIdx;
    +          }
    +        }
    +        if( pBest && pBest->nColumn<pTab->nCol ){
    +          iRoot = pBest->tnum;
    +          pKeyInfo = sqlite3IndexKeyinfo(pParse, pBest);
    +        }
    +
    +        /* Open a read-only cursor, execute the OP_Count, close the cursor. */
    +        sqlite3VdbeAddOp3(v, OP_OpenRead, iCsr, iRoot, iDb);
    +        if( pKeyInfo ){
    +          sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO_HANDOFF);
    +        }
    +        sqlite3VdbeAddOp2(v, OP_Count, iCsr, sAggInfo.aFunc[0].iMem);
    +        sqlite3VdbeAddOp1(v, OP_Close, iCsr);
    +      }else
    +#endif /* SQLITE_OMIT_BTREECOUNT */
    +      {
    +        /* Check if the query is of one of the following forms:
    +        **
    +        **   SELECT min(x) FROM ...
    +        **   SELECT max(x) FROM ...
    +        **
    +        ** If it is, then ask the code in where.c to attempt to sort results
    +        ** as if there was an "ORDER ON x" or "ORDER ON x DESC" clause. 
    +        ** If where.c is able to produce results sorted in this order, then
    +        ** add vdbe code to break out of the processing loop after the 
    +        ** first iteration (since the first iteration of the loop is 
    +        ** guaranteed to operate on the row with the minimum or maximum 
    +        ** value of x, the only row required).
    +        **
    +        ** A special flag must be passed to sqlite3WhereBegin() to slightly
    +        ** modify behaviour as follows:
    +        **
    +        **   + If the query is a "SELECT min(x)", then the loop coded by
    +        **     where.c should not iterate over any values with a NULL value
    +        **     for x.
    +        **
    +        **   + The optimizer code in where.c (the thing that decides which
    +        **     index or indices to use) should place a different priority on 
    +        **     satisfying the 'ORDER BY' clause than it does in other cases.
    +        **     Refer to code and comments in where.c for details.
    +        */
    +        ExprList *pMinMax = 0;
    +        u8 flag = minMaxQuery(p);
    +        if( flag ){
    +          assert( !ExprHasProperty(p->pEList->a[0].pExpr, EP_xIsSelect) );
    +          pMinMax = sqlite3ExprListDup(db, p->pEList->a[0].pExpr->x.pList,0);
    +          pDel = pMinMax;
    +          if( pMinMax && !db->mallocFailed ){
    +            pMinMax->a[0].sortOrder = flag!=WHERE_ORDERBY_MIN ?1:0;
    +            pMinMax->a[0].pExpr->op = TK_COLUMN;
    +          }
    +        }
    +  
    +        /* This case runs if the aggregate has no GROUP BY clause.  The
    +        ** processing is much simpler since there is only a single row
    +        ** of output.
    +        */
    +        resetAccumulator(pParse, &sAggInfo);
    +        pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pMinMax, flag);
    +        if( pWInfo==0 ){
    +          sqlite3ExprListDelete(db, pDel);
    +          goto select_end;
    +        }
    +        updateAccumulator(pParse, &sAggInfo);
    +        if( !pMinMax && flag ){
    +          sqlite3VdbeAddOp2(v, OP_Goto, 0, pWInfo->iBreak);
    +          VdbeComment((v, "%s() by index",
    +                (flag==WHERE_ORDERBY_MIN?"min":"max")));
    +        }
    +        sqlite3WhereEnd(pWInfo);
    +        finalizeAggFunctions(pParse, &sAggInfo);
    +      }
    +
    +      pOrderBy = 0;
    +      sqlite3ExprIfFalse(pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL);
    +      selectInnerLoop(pParse, p, p->pEList, 0, 0, 0, -1, 
    +                      pDest, addrEnd, addrEnd);
    +      sqlite3ExprListDelete(db, pDel);
    +    }
    +    sqlite3VdbeResolveLabel(v, addrEnd);
    +    
    +  } /* endif aggregate query */
    +
    +  /* If there is an ORDER BY clause, then we need to sort the results
    +  ** and send them to the callback one by one.
    +  */
    +  if( pOrderBy ){
    +    generateSortTail(pParse, p, v, pEList->nExpr, pDest);
    +  }
    +
    +  /* Jump here to skip this query
    +  */
    +  sqlite3VdbeResolveLabel(v, iEnd);
    +
    +  /* The SELECT was successfully coded.   Set the return code to 0
    +  ** to indicate no errors.
    +  */
    +  rc = 0;
    +
    +  /* Control jumps to here if an error is encountered above, or upon
    +  ** successful coding of the SELECT.
    +  */
    +select_end:
    +
    +  /* Identify column names if results of the SELECT are to be output.
    +  */
    +  if( rc==SQLITE_OK && pDest->eDest==SRT_Output ){
    +    generateColumnNames(pParse, pTabList, pEList);
    +  }
    +
    +  sqlite3DbFree(db, sAggInfo.aCol);
    +  sqlite3DbFree(db, sAggInfo.aFunc);
    +  return rc;
    +}
    +
    +#if defined(SQLITE_DEBUG)
    +/*
    +*******************************************************************************
    +** The following code is used for testing and debugging only.  The code
    +** that follows does not appear in normal builds.
    +**
    +** These routines are used to print out the content of all or part of a 
    +** parse structures such as Select or Expr.  Such printouts are useful
    +** for helping to understand what is happening inside the code generator
    +** during the execution of complex SELECT statements.
    +**
    +** These routine are not called anywhere from within the normal
    +** code base.  Then are intended to be called from within the debugger
    +** or from temporary "printf" statements inserted for debugging.
    +*/
    +SQLITE_PRIVATE void sqlite3PrintExpr(Expr *p){
    +  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
    +    sqlite3DebugPrintf("(%s", p->u.zToken);
    +  }else{
    +    sqlite3DebugPrintf("(%d", p->op);
    +  }
    +  if( p->pLeft ){
    +    sqlite3DebugPrintf(" ");
    +    sqlite3PrintExpr(p->pLeft);
    +  }
    +  if( p->pRight ){
    +    sqlite3DebugPrintf(" ");
    +    sqlite3PrintExpr(p->pRight);
    +  }
    +  sqlite3DebugPrintf(")");
    +}
    +SQLITE_PRIVATE void sqlite3PrintExprList(ExprList *pList){
    +  int i;
    +  for(i=0; i<pList->nExpr; i++){
    +    sqlite3PrintExpr(pList->a[i].pExpr);
    +    if( i<pList->nExpr-1 ){
    +      sqlite3DebugPrintf(", ");
    +    }
    +  }
    +}
    +SQLITE_PRIVATE void sqlite3PrintSelect(Select *p, int indent){
    +  sqlite3DebugPrintf("%*sSELECT(%p) ", indent, "", p);
    +  sqlite3PrintExprList(p->pEList);
    +  sqlite3DebugPrintf("\n");
    +  if( p->pSrc ){
    +    char *zPrefix;
    +    int i;
    +    zPrefix = "FROM";
    +    for(i=0; i<p->pSrc->nSrc; i++){
    +      struct SrcList_item *pItem = &p->pSrc->a[i];
    +      sqlite3DebugPrintf("%*s ", indent+6, zPrefix);
    +      zPrefix = "";
    +      if( pItem->pSelect ){
    +        sqlite3DebugPrintf("(\n");
    +        sqlite3PrintSelect(pItem->pSelect, indent+10);
    +        sqlite3DebugPrintf("%*s)", indent+8, "");
    +      }else if( pItem->zName ){
    +        sqlite3DebugPrintf("%s", pItem->zName);
    +      }
    +      if( pItem->pTab ){
    +        sqlite3DebugPrintf("(table: %s)", pItem->pTab->zName);
    +      }
    +      if( pItem->zAlias ){
    +        sqlite3DebugPrintf(" AS %s", pItem->zAlias);
    +      }
    +      if( i<p->pSrc->nSrc-1 ){
    +        sqlite3DebugPrintf(",");
    +      }
    +      sqlite3DebugPrintf("\n");
    +    }
    +  }
    +  if( p->pWhere ){
    +    sqlite3DebugPrintf("%*s WHERE ", indent, "");
    +    sqlite3PrintExpr(p->pWhere);
    +    sqlite3DebugPrintf("\n");
    +  }
    +  if( p->pGroupBy ){
    +    sqlite3DebugPrintf("%*s GROUP BY ", indent, "");
    +    sqlite3PrintExprList(p->pGroupBy);
    +    sqlite3DebugPrintf("\n");
    +  }
    +  if( p->pHaving ){
    +    sqlite3DebugPrintf("%*s HAVING ", indent, "");
    +    sqlite3PrintExpr(p->pHaving);
    +    sqlite3DebugPrintf("\n");
    +  }
    +  if( p->pOrderBy ){
    +    sqlite3DebugPrintf("%*s ORDER BY ", indent, "");
    +    sqlite3PrintExprList(p->pOrderBy);
    +    sqlite3DebugPrintf("\n");
    +  }
    +}
    +/* End of the structure debug printing code
    +*****************************************************************************/
    +#endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
    +
    +/************** End of select.c **********************************************/
    +/************** Begin file table.c *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains the sqlite3_get_table() and sqlite3_free_table()
    +** interface routines.  These are just wrappers around the main
    +** interface routine of sqlite3_exec().
    +**
    +** These routines are in a separate files so that they will not be linked
    +** if they are not used.
    +**
    +** $Id: table.c,v 1.40 2009/04/10 14:28:00 drh Exp $
    +*/
    +
    +#ifndef SQLITE_OMIT_GET_TABLE
    +
    +/*
    +** This structure is used to pass data from sqlite3_get_table() through
    +** to the callback function is uses to build the result.
    +*/
    +typedef struct TabResult {
    +  char **azResult;   /* Accumulated output */
    +  char *zErrMsg;     /* Error message text, if an error occurs */
    +  int nAlloc;        /* Slots allocated for azResult[] */
    +  int nRow;          /* Number of rows in the result */
    +  int nColumn;       /* Number of columns in the result */
    +  int nData;         /* Slots used in azResult[].  (nRow+1)*nColumn */
    +  int rc;            /* Return code from sqlite3_exec() */
    +} TabResult;
    +
    +/*
    +** This routine is called once for each row in the result table.  Its job
    +** is to fill in the TabResult structure appropriately, allocating new
    +** memory as necessary.
    +*/
    +static int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
    +  TabResult *p = (TabResult*)pArg;  /* Result accumulator */
    +  int need;                         /* Slots needed in p->azResult[] */
    +  int i;                            /* Loop counter */
    +  char *z;                          /* A single column of result */
    +
    +  /* Make sure there is enough space in p->azResult to hold everything
    +  ** we need to remember from this invocation of the callback.
    +  */
    +  if( p->nRow==0 && argv!=0 ){
    +    need = nCol*2;
    +  }else{
    +    need = nCol;
    +  }
    +  if( p->nData + need > p->nAlloc ){
    +    char **azNew;
    +    p->nAlloc = p->nAlloc*2 + need;
    +    azNew = sqlite3_realloc( p->azResult, sizeof(char*)*p->nAlloc );
    +    if( azNew==0 ) goto malloc_failed;
    +    p->azResult = azNew;
    +  }
    +
    +  /* If this is the first row, then generate an extra row containing
    +  ** the names of all columns.
    +  */
    +  if( p->nRow==0 ){
    +    p->nColumn = nCol;
    +    for(i=0; i<nCol; i++){
    +      z = sqlite3_mprintf("%s", colv[i]);
    +      if( z==0 ) goto malloc_failed;
    +      p->azResult[p->nData++] = z;
    +    }
    +  }else if( p->nColumn!=nCol ){
    +    sqlite3_free(p->zErrMsg);
    +    p->zErrMsg = sqlite3_mprintf(
    +       "sqlite3_get_table() called with two or more incompatible queries"
    +    );
    +    p->rc = SQLITE_ERROR;
    +    return 1;
    +  }
    +
    +  /* Copy over the row data
    +  */
    +  if( argv!=0 ){
    +    for(i=0; i<nCol; i++){
    +      if( argv[i]==0 ){
    +        z = 0;
    +      }else{
    +        int n = sqlite3Strlen30(argv[i])+1;
    +        z = sqlite3_malloc( n );
    +        if( z==0 ) goto malloc_failed;
    +        memcpy(z, argv[i], n);
    +      }
    +      p->azResult[p->nData++] = z;
    +    }
    +    p->nRow++;
    +  }
    +  return 0;
    +
    +malloc_failed:
    +  p->rc = SQLITE_NOMEM;
    +  return 1;
    +}
    +
    +/*
    +** Query the database.  But instead of invoking a callback for each row,
    +** malloc() for space to hold the result and return the entire results
    +** at the conclusion of the call.
    +**
    +** The result that is written to ***pazResult is held in memory obtained
    +** from malloc().  But the caller cannot free this memory directly.  
    +** Instead, the entire table should be passed to sqlite3_free_table() when
    +** the calling procedure is finished using it.
    +*/
    +SQLITE_API int sqlite3_get_table(
    +  sqlite3 *db,                /* The database on which the SQL executes */
    +  const char *zSql,           /* The SQL to be executed */
    +  char ***pazResult,          /* Write the result table here */
    +  int *pnRow,                 /* Write the number of rows in the result here */
    +  int *pnColumn,              /* Write the number of columns of result here */
    +  char **pzErrMsg             /* Write error messages here */
    +){
    +  int rc;
    +  TabResult res;
    +
    +  *pazResult = 0;
    +  if( pnColumn ) *pnColumn = 0;
    +  if( pnRow ) *pnRow = 0;
    +  if( pzErrMsg ) *pzErrMsg = 0;
    +  res.zErrMsg = 0;
    +  res.nRow = 0;
    +  res.nColumn = 0;
    +  res.nData = 1;
    +  res.nAlloc = 20;
    +  res.rc = SQLITE_OK;
    +  res.azResult = sqlite3_malloc(sizeof(char*)*res.nAlloc );
    +  if( res.azResult==0 ){
    +     db->errCode = SQLITE_NOMEM;
    +     return SQLITE_NOMEM;
    +  }
    +  res.azResult[0] = 0;
    +  rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
    +  assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
    +  res.azResult[0] = SQLITE_INT_TO_PTR(res.nData);
    +  if( (rc&0xff)==SQLITE_ABORT ){
    +    sqlite3_free_table(&res.azResult[1]);
    +    if( res.zErrMsg ){
    +      if( pzErrMsg ){
    +        sqlite3_free(*pzErrMsg);
    +        *pzErrMsg = sqlite3_mprintf("%s",res.zErrMsg);
    +      }
    +      sqlite3_free(res.zErrMsg);
    +    }
    +    db->errCode = res.rc;  /* Assume 32-bit assignment is atomic */
    +    return res.rc;
    +  }
    +  sqlite3_free(res.zErrMsg);
    +  if( rc!=SQLITE_OK ){
    +    sqlite3_free_table(&res.azResult[1]);
    +    return rc;
    +  }
    +  if( res.nAlloc>res.nData ){
    +    char **azNew;
    +    azNew = sqlite3_realloc( res.azResult, sizeof(char*)*res.nData );
    +    if( azNew==0 ){
    +      sqlite3_free_table(&res.azResult[1]);
    +      db->errCode = SQLITE_NOMEM;
    +      return SQLITE_NOMEM;
    +    }
    +    res.azResult = azNew;
    +  }
    +  *pazResult = &res.azResult[1];
    +  if( pnColumn ) *pnColumn = res.nColumn;
    +  if( pnRow ) *pnRow = res.nRow;
    +  return rc;
    +}
    +
    +/*
    +** This routine frees the space the sqlite3_get_table() malloced.
    +*/
    +SQLITE_API void sqlite3_free_table(
    +  char **azResult            /* Result returned from from sqlite3_get_table() */
    +){
    +  if( azResult ){
    +    int i, n;
    +    azResult--;
    +    assert( azResult!=0 );
    +    n = SQLITE_PTR_TO_INT(azResult[0]);
    +    for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }
    +    sqlite3_free(azResult);
    +  }
    +}
    +
    +#endif /* SQLITE_OMIT_GET_TABLE */
    +
    +/************** End of table.c ***********************************************/
    +/************** Begin file trigger.c *****************************************/
    +/*
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +**
    +** $Id: trigger.c,v 1.143 2009/08/10 03:57:58 shane Exp $
    +*/
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +/*
    +** Delete a linked list of TriggerStep structures.
    +*/
    +SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
    +  while( pTriggerStep ){
    +    TriggerStep * pTmp = pTriggerStep;
    +    pTriggerStep = pTriggerStep->pNext;
    +
    +    sqlite3ExprDelete(db, pTmp->pWhere);
    +    sqlite3ExprListDelete(db, pTmp->pExprList);
    +    sqlite3SelectDelete(db, pTmp->pSelect);
    +    sqlite3IdListDelete(db, pTmp->pIdList);
    +
    +    sqlite3DbFree(db, pTmp);
    +  }
    +}
    +
    +/*
    +** Given table pTab, return a list of all the triggers attached to 
    +** the table. The list is connected by Trigger.pNext pointers.
    +**
    +** All of the triggers on pTab that are in the same database as pTab
    +** are already attached to pTab->pTrigger.  But there might be additional
    +** triggers on pTab in the TEMP schema.  This routine prepends all
    +** TEMP triggers on pTab to the beginning of the pTab->pTrigger list
    +** and returns the combined list.
    +**
    +** To state it another way:  This routine returns a list of all triggers
    +** that fire off of pTab.  The list will include any TEMP triggers on
    +** pTab as well as the triggers lised in pTab->pTrigger.
    +*/
    +SQLITE_PRIVATE Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
    +  Schema * const pTmpSchema = pParse->db->aDb[1].pSchema;
    +  Trigger *pList = 0;                  /* List of triggers to return */
    +
    +  if( pParse->disableTriggers ){
    +    return 0;
    +  }
    +
    +  if( pTmpSchema!=pTab->pSchema ){
    +    HashElem *p;
    +    for(p=sqliteHashFirst(&pTmpSchema->trigHash); p; p=sqliteHashNext(p)){
    +      Trigger *pTrig = (Trigger *)sqliteHashData(p);
    +      if( pTrig->pTabSchema==pTab->pSchema
    +       && 0==sqlite3StrICmp(pTrig->table, pTab->zName) 
    +      ){
    +        pTrig->pNext = (pList ? pList : pTab->pTrigger);
    +        pList = pTrig;
    +      }
    +    }
    +  }
    +
    +  return (pList ? pList : pTab->pTrigger);
    +}
    +
    +/*
    +** This is called by the parser when it sees a CREATE TRIGGER statement
    +** up to the point of the BEGIN before the trigger actions.  A Trigger
    +** structure is generated based on the information available and stored
    +** in pParse->pNewTrigger.  After the trigger actions have been parsed, the
    +** sqlite3FinishTrigger() function is called to complete the trigger
    +** construction process.
    +*/
    +SQLITE_PRIVATE void sqlite3BeginTrigger(
    +  Parse *pParse,      /* The parse context of the CREATE TRIGGER statement */
    +  Token *pName1,      /* The name of the trigger */
    +  Token *pName2,      /* The name of the trigger */
    +  int tr_tm,          /* One of TK_BEFORE, TK_AFTER, TK_INSTEAD */
    +  int op,             /* One of TK_INSERT, TK_UPDATE, TK_DELETE */
    +  IdList *pColumns,   /* column list if this is an UPDATE OF trigger */
    +  SrcList *pTableName,/* The name of the table/view the trigger applies to */
    +  Expr *pWhen,        /* WHEN clause */
    +  int isTemp,         /* True if the TEMPORARY keyword is present */
    +  int noErr           /* Suppress errors if the trigger already exists */
    +){
    +  Trigger *pTrigger = 0;  /* The new trigger */
    +  Table *pTab;            /* Table that the trigger fires off of */
    +  char *zName = 0;        /* Name of the trigger */
    +  sqlite3 *db = pParse->db;  /* The database connection */
    +  int iDb;                /* The database to store the trigger in */
    +  Token *pName;           /* The unqualified db name */
    +  DbFixer sFix;           /* State vector for the DB fixer */
    +  int iTabDb;             /* Index of the database holding pTab */
    +
    +  assert( pName1!=0 );   /* pName1->z might be NULL, but not pName1 itself */
    +  assert( pName2!=0 );
    +  assert( op==TK_INSERT || op==TK_UPDATE || op==TK_DELETE );
    +  assert( op>0 && op<0xff );
    +  if( isTemp ){
    +    /* If TEMP was specified, then the trigger name may not be qualified. */
    +    if( pName2->n>0 ){
    +      sqlite3ErrorMsg(pParse, "temporary trigger may not have qualified name");
    +      goto trigger_cleanup;
    +    }
    +    iDb = 1;
    +    pName = pName1;
    +  }else{
    +    /* Figure out the db that the the trigger will be created in */
    +    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
    +    if( iDb<0 ){
    +      goto trigger_cleanup;
    +    }
    +  }
    +
    +  /* If the trigger name was unqualified, and the table is a temp table,
    +  ** then set iDb to 1 to create the trigger in the temporary database.
    +  ** If sqlite3SrcListLookup() returns 0, indicating the table does not
    +  ** exist, the error is caught by the block below.
    +  */
    +  if( !pTableName || db->mallocFailed ){
    +    goto trigger_cleanup;
    +  }
    +  pTab = sqlite3SrcListLookup(pParse, pTableName);
    +  if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){
    +    iDb = 1;
    +  }
    +
    +  /* Ensure the table name matches database name and that the table exists */
    +  if( db->mallocFailed ) goto trigger_cleanup;
    +  assert( pTableName->nSrc==1 );
    +  if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", pName) && 
    +      sqlite3FixSrcList(&sFix, pTableName) ){
    +    goto trigger_cleanup;
    +  }
    +  pTab = sqlite3SrcListLookup(pParse, pTableName);
    +  if( !pTab ){
    +    /* The table does not exist. */
    +    if( db->init.iDb==1 ){
    +      /* Ticket #3810.
    +      ** Normally, whenever a table is dropped, all associated triggers are
    +      ** dropped too.  But if a TEMP trigger is created on a non-TEMP table
    +      ** and the table is dropped by a different database connection, the
    +      ** trigger is not visible to the database connection that does the
    +      ** drop so the trigger cannot be dropped.  This results in an
    +      ** "orphaned trigger" - a trigger whose associated table is missing.
    +      */
    +      db->init.orphanTrigger = 1;
    +    }
    +    goto trigger_cleanup;
    +  }
    +  if( IsVirtual(pTab) ){
    +    sqlite3ErrorMsg(pParse, "cannot create triggers on virtual tables");
    +    goto trigger_cleanup;
    +  }
    +
    +  /* Check that the trigger name is not reserved and that no trigger of the
    +  ** specified name exists */
    +  zName = sqlite3NameFromToken(db, pName);
    +  if( !zName || SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
    +    goto trigger_cleanup;
    +  }
    +  if( sqlite3HashFind(&(db->aDb[iDb].pSchema->trigHash),
    +                      zName, sqlite3Strlen30(zName)) ){
    +    if( !noErr ){
    +      sqlite3ErrorMsg(pParse, "trigger %T already exists", pName);
    +    }
    +    goto trigger_cleanup;
    +  }
    +
    +  /* Do not create a trigger on a system table */
    +  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
    +    sqlite3ErrorMsg(pParse, "cannot create trigger on system table");
    +    pParse->nErr++;
    +    goto trigger_cleanup;
    +  }
    +
    +  /* INSTEAD of triggers are only for views and views only support INSTEAD
    +  ** of triggers.
    +  */
    +  if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
    +    sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S", 
    +        (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName, 0);
    +    goto trigger_cleanup;
    +  }
    +  if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
    +    sqlite3ErrorMsg(pParse, "cannot create INSTEAD OF"
    +        " trigger on table: %S", pTableName, 0);
    +    goto trigger_cleanup;
    +  }
    +  iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  {
    +    int code = SQLITE_CREATE_TRIGGER;
    +    const char *zDb = db->aDb[iTabDb].zName;
    +    const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
    +    if( iTabDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER;
    +    if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
    +      goto trigger_cleanup;
    +    }
    +    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iTabDb),0,zDb)){
    +      goto trigger_cleanup;
    +    }
    +  }
    +#endif
    +
    +  /* INSTEAD OF triggers can only appear on views and BEFORE triggers
    +  ** cannot appear on views.  So we might as well translate every
    +  ** INSTEAD OF trigger into a BEFORE trigger.  It simplifies code
    +  ** elsewhere.
    +  */
    +  if (tr_tm == TK_INSTEAD){
    +    tr_tm = TK_BEFORE;
    +  }
    +
    +  /* Build the Trigger object */
    +  pTrigger = (Trigger*)sqlite3DbMallocZero(db, sizeof(Trigger));
    +  if( pTrigger==0 ) goto trigger_cleanup;
    +  pTrigger->zName = zName;
    +  zName = 0;
    +  pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);
    +  pTrigger->pSchema = db->aDb[iDb].pSchema;
    +  pTrigger->pTabSchema = pTab->pSchema;
    +  pTrigger->op = (u8)op;
    +  pTrigger->tr_tm = tr_tm==TK_BEFORE ? TRIGGER_BEFORE : TRIGGER_AFTER;
    +  pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);
    +  pTrigger->pColumns = sqlite3IdListDup(db, pColumns);
    +  assert( pParse->pNewTrigger==0 );
    +  pParse->pNewTrigger = pTrigger;
    +
    +trigger_cleanup:
    +  sqlite3DbFree(db, zName);
    +  sqlite3SrcListDelete(db, pTableName);
    +  sqlite3IdListDelete(db, pColumns);
    +  sqlite3ExprDelete(db, pWhen);
    +  if( !pParse->pNewTrigger ){
    +    sqlite3DeleteTrigger(db, pTrigger);
    +  }else{
    +    assert( pParse->pNewTrigger==pTrigger );
    +  }
    +}
    +
    +/*
    +** This routine is called after all of the trigger actions have been parsed
    +** in order to complete the process of building the trigger.
    +*/
    +SQLITE_PRIVATE void sqlite3FinishTrigger(
    +  Parse *pParse,          /* Parser context */
    +  TriggerStep *pStepList, /* The triggered program */
    +  Token *pAll             /* Token that describes the complete CREATE TRIGGER */
    +){
    +  Trigger *pTrig = pParse->pNewTrigger;    /* Trigger being finished */
    +  char *zName;                             /* Name of trigger */
    +  sqlite3 *db = pParse->db;                /* The database */
    +  DbFixer sFix;
    +  int iDb;                                 /* Database containing the trigger */
    +  Token nameToken;           /* Trigger name for error reporting */
    +
    +  pTrig = pParse->pNewTrigger;
    +  pParse->pNewTrigger = 0;
    +  if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup;
    +  zName = pTrig->zName;
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
    +  pTrig->step_list = pStepList;
    +  while( pStepList ){
    +    pStepList->pTrig = pTrig;
    +    pStepList = pStepList->pNext;
    +  }
    +  nameToken.z = pTrig->zName;
    +  nameToken.n = sqlite3Strlen30(nameToken.z);
    +  if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", &nameToken) 
    +          && sqlite3FixTriggerStep(&sFix, pTrig->step_list) ){
    +    goto triggerfinish_cleanup;
    +  }
    +
    +  /* if we are not initializing, and this trigger is not on a TEMP table, 
    +  ** build the sqlite_master entry
    +  */
    +  if( !db->init.busy ){
    +    Vdbe *v;
    +    char *z;
    +
    +    /* Make an entry in the sqlite_master table */
    +    v = sqlite3GetVdbe(pParse);
    +    if( v==0 ) goto triggerfinish_cleanup;
    +    sqlite3BeginWriteOperation(pParse, 0, iDb);
    +    z = sqlite3DbStrNDup(db, (char*)pAll->z, pAll->n);
    +    sqlite3NestedParse(pParse,
    +       "INSERT INTO %Q.%s VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')",
    +       db->aDb[iDb].zName, SCHEMA_TABLE(iDb), zName,
    +       pTrig->table, z);
    +    sqlite3DbFree(db, z);
    +    sqlite3ChangeCookie(pParse, iDb);
    +    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, sqlite3MPrintf(
    +        db, "type='trigger' AND name='%q'", zName), P4_DYNAMIC
    +    );
    +  }
    +
    +  if( db->init.busy ){
    +    Trigger *pLink = pTrig;
    +    Hash *pHash = &db->aDb[iDb].pSchema->trigHash;
    +    pTrig = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), pTrig);
    +    if( pTrig ){
    +      db->mallocFailed = 1;
    +    }else if( pLink->pSchema==pLink->pTabSchema ){
    +      Table *pTab;
    +      int n = sqlite3Strlen30(pLink->table);
    +      pTab = sqlite3HashFind(&pLink->pTabSchema->tblHash, pLink->table, n);
    +      assert( pTab!=0 );
    +      pLink->pNext = pTab->pTrigger;
    +      pTab->pTrigger = pLink;
    +    }
    +  }
    +
    +triggerfinish_cleanup:
    +  sqlite3DeleteTrigger(db, pTrig);
    +  assert( !pParse->pNewTrigger );
    +  sqlite3DeleteTriggerStep(db, pStepList);
    +}
    +
    +/*
    +** Turn a SELECT statement (that the pSelect parameter points to) into
    +** a trigger step.  Return a pointer to a TriggerStep structure.
    +**
    +** The parser calls this routine when it finds a SELECT statement in
    +** body of a TRIGGER.  
    +*/
    +SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
    +  TriggerStep *pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep));
    +  if( pTriggerStep==0 ) {
    +    sqlite3SelectDelete(db, pSelect);
    +    return 0;
    +  }
    +  pTriggerStep->op = TK_SELECT;
    +  pTriggerStep->pSelect = pSelect;
    +  pTriggerStep->orconf = OE_Default;
    +  return pTriggerStep;
    +}
    +
    +/*
    +** Allocate space to hold a new trigger step.  The allocated space
    +** holds both the TriggerStep object and the TriggerStep.target.z string.
    +**
    +** If an OOM error occurs, NULL is returned and db->mallocFailed is set.
    +*/
    +static TriggerStep *triggerStepAllocate(
    +  sqlite3 *db,                /* Database connection */
    +  u8 op,                      /* Trigger opcode */
    +  Token *pName                /* The target name */
    +){
    +  TriggerStep *pTriggerStep;
    +
    +  pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep) + pName->n);
    +  if( pTriggerStep ){
    +    char *z = (char*)&pTriggerStep[1];
    +    memcpy(z, pName->z, pName->n);
    +    pTriggerStep->target.z = z;
    +    pTriggerStep->target.n = pName->n;
    +    pTriggerStep->op = op;
    +  }
    +  return pTriggerStep;
    +}
    +
    +/*
    +** Build a trigger step out of an INSERT statement.  Return a pointer
    +** to the new trigger step.
    +**
    +** The parser calls this routine when it sees an INSERT inside the
    +** body of a trigger.
    +*/
    +SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(
    +  sqlite3 *db,        /* The database connection */
    +  Token *pTableName,  /* Name of the table into which we insert */
    +  IdList *pColumn,    /* List of columns in pTableName to insert into */
    +  ExprList *pEList,   /* The VALUE clause: a list of values to be inserted */
    +  Select *pSelect,    /* A SELECT statement that supplies values */
    +  u8 orconf           /* The conflict algorithm (OE_Abort, OE_Replace, etc.) */
    +){
    +  TriggerStep *pTriggerStep;
    +
    +  assert(pEList == 0 || pSelect == 0);
    +  assert(pEList != 0 || pSelect != 0 || db->mallocFailed);
    +
    +  pTriggerStep = triggerStepAllocate(db, TK_INSERT, pTableName);
    +  if( pTriggerStep ){
    +    pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
    +    pTriggerStep->pIdList = pColumn;
    +    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
    +    pTriggerStep->orconf = orconf;
    +  }else{
    +    sqlite3IdListDelete(db, pColumn);
    +  }
    +  sqlite3ExprListDelete(db, pEList);
    +  sqlite3SelectDelete(db, pSelect);
    +
    +  return pTriggerStep;
    +}
    +
    +/*
    +** Construct a trigger step that implements an UPDATE statement and return
    +** a pointer to that trigger step.  The parser calls this routine when it
    +** sees an UPDATE statement inside the body of a CREATE TRIGGER.
    +*/
    +SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(
    +  sqlite3 *db,         /* The database connection */
    +  Token *pTableName,   /* Name of the table to be updated */
    +  ExprList *pEList,    /* The SET clause: list of column and new values */
    +  Expr *pWhere,        /* The WHERE clause */
    +  u8 orconf            /* The conflict algorithm. (OE_Abort, OE_Ignore, etc) */
    +){
    +  TriggerStep *pTriggerStep;
    +
    +  pTriggerStep = triggerStepAllocate(db, TK_UPDATE, pTableName);
    +  if( pTriggerStep ){
    +    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
    +    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
    +    pTriggerStep->orconf = orconf;
    +  }
    +  sqlite3ExprListDelete(db, pEList);
    +  sqlite3ExprDelete(db, pWhere);
    +  return pTriggerStep;
    +}
    +
    +/*
    +** Construct a trigger step that implements a DELETE statement and return
    +** a pointer to that trigger step.  The parser calls this routine when it
    +** sees a DELETE statement inside the body of a CREATE TRIGGER.
    +*/
    +SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(
    +  sqlite3 *db,            /* Database connection */
    +  Token *pTableName,      /* The table from which rows are deleted */
    +  Expr *pWhere            /* The WHERE clause */
    +){
    +  TriggerStep *pTriggerStep;
    +
    +  pTriggerStep = triggerStepAllocate(db, TK_DELETE, pTableName);
    +  if( pTriggerStep ){
    +    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
    +    pTriggerStep->orconf = OE_Default;
    +  }
    +  sqlite3ExprDelete(db, pWhere);
    +  return pTriggerStep;
    +}
    +
    +/* 
    +** Recursively delete a Trigger structure
    +*/
    +SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
    +  if( pTrigger==0 ) return;
    +  sqlite3DeleteTriggerStep(db, pTrigger->step_list);
    +  sqlite3DbFree(db, pTrigger->zName);
    +  sqlite3DbFree(db, pTrigger->table);
    +  sqlite3ExprDelete(db, pTrigger->pWhen);
    +  sqlite3IdListDelete(db, pTrigger->pColumns);
    +  sqlite3DbFree(db, pTrigger);
    +}
    +
    +/*
    +** This function is called to drop a trigger from the database schema. 
    +**
    +** This may be called directly from the parser and therefore identifies
    +** the trigger by name.  The sqlite3DropTriggerPtr() routine does the
    +** same job as this routine except it takes a pointer to the trigger
    +** instead of the trigger name.
    +**/
    +SQLITE_PRIVATE void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
    +  Trigger *pTrigger = 0;
    +  int i;
    +  const char *zDb;
    +  const char *zName;
    +  int nName;
    +  sqlite3 *db = pParse->db;
    +
    +  if( db->mallocFailed ) goto drop_trigger_cleanup;
    +  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    +    goto drop_trigger_cleanup;
    +  }
    +
    +  assert( pName->nSrc==1 );
    +  zDb = pName->a[0].zDatabase;
    +  zName = pName->a[0].zName;
    +  nName = sqlite3Strlen30(zName);
    +  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    +    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
    +    if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
    +    pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName, nName);
    +    if( pTrigger ) break;
    +  }
    +  if( !pTrigger ){
    +    if( !noErr ){
    +      sqlite3ErrorMsg(pParse, "no such trigger: %S", pName, 0);
    +    }
    +    goto drop_trigger_cleanup;
    +  }
    +  sqlite3DropTriggerPtr(pParse, pTrigger);
    +
    +drop_trigger_cleanup:
    +  sqlite3SrcListDelete(db, pName);
    +}
    +
    +/*
    +** Return a pointer to the Table structure for the table that a trigger
    +** is set on.
    +*/
    +static Table *tableOfTrigger(Trigger *pTrigger){
    +  int n = sqlite3Strlen30(pTrigger->table);
    +  return sqlite3HashFind(&pTrigger->pTabSchema->tblHash, pTrigger->table, n);
    +}
    +
    +
    +/*
    +** Drop a trigger given a pointer to that trigger. 
    +*/
    +SQLITE_PRIVATE void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger){
    +  Table   *pTable;
    +  Vdbe *v;
    +  sqlite3 *db = pParse->db;
    +  int iDb;
    +
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTrigger->pSchema);
    +  assert( iDb>=0 && iDb<db->nDb );
    +  pTable = tableOfTrigger(pTrigger);
    +  assert( pTable );
    +  assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  {
    +    int code = SQLITE_DROP_TRIGGER;
    +    const char *zDb = db->aDb[iDb].zName;
    +    const char *zTab = SCHEMA_TABLE(iDb);
    +    if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;
    +    if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
    +      sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
    +      return;
    +    }
    +  }
    +#endif
    +
    +  /* Generate code to destroy the database record of the trigger.
    +  */
    +  assert( pTable!=0 );
    +  if( (v = sqlite3GetVdbe(pParse))!=0 ){
    +    int base;
    +    static const VdbeOpList dropTrigger[] = {
    +      { OP_Rewind,     0, ADDR(9),  0},
    +      { OP_String8,    0, 1,        0}, /* 1 */
    +      { OP_Column,     0, 1,        2},
    +      { OP_Ne,         2, ADDR(8),  1},
    +      { OP_String8,    0, 1,        0}, /* 4: "trigger" */
    +      { OP_Column,     0, 0,        2},
    +      { OP_Ne,         2, ADDR(8),  1},
    +      { OP_Delete,     0, 0,        0},
    +      { OP_Next,       0, ADDR(1),  0}, /* 8 */
    +    };
    +
    +    sqlite3BeginWriteOperation(pParse, 0, iDb);
    +    sqlite3OpenMasterTable(pParse, iDb);
    +    base = sqlite3VdbeAddOpList(v,  ArraySize(dropTrigger), dropTrigger);
    +    sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, 0);
    +    sqlite3VdbeChangeP4(v, base+4, "trigger", P4_STATIC);
    +    sqlite3ChangeCookie(pParse, iDb);
    +    sqlite3VdbeAddOp2(v, OP_Close, 0, 0);
    +    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
    +    if( pParse->nMem<3 ){
    +      pParse->nMem = 3;
    +    }
    +  }
    +}
    +
    +/*
    +** Remove a trigger from the hash tables of the sqlite* pointer.
    +*/
    +SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
    +  Hash *pHash = &(db->aDb[iDb].pSchema->trigHash);
    +  Trigger *pTrigger;
    +  pTrigger = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), 0);
    +  if( ALWAYS(pTrigger) ){
    +    if( pTrigger->pSchema==pTrigger->pTabSchema ){
    +      Table *pTab = tableOfTrigger(pTrigger);
    +      Trigger **pp;
    +      for(pp=&pTab->pTrigger; *pp!=pTrigger; pp=&((*pp)->pNext));
    +      *pp = (*pp)->pNext;
    +    }
    +    sqlite3DeleteTrigger(db, pTrigger);
    +    db->flags |= SQLITE_InternChanges;
    +  }
    +}
    +
    +/*
    +** pEList is the SET clause of an UPDATE statement.  Each entry
    +** in pEList is of the format <id>=<expr>.  If any of the entries
    +** in pEList have an <id> which matches an identifier in pIdList,
    +** then return TRUE.  If pIdList==NULL, then it is considered a
    +** wildcard that matches anything.  Likewise if pEList==NULL then
    +** it matches anything so always return true.  Return false only
    +** if there is no match.
    +*/
    +static int checkColumnOverlap(IdList *pIdList, ExprList *pEList){
    +  int e;
    +  if( pIdList==0 || NEVER(pEList==0) ) return 1;
    +  for(e=0; e<pEList->nExpr; e++){
    +    if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
    +  }
    +  return 0; 
    +}
    +
    +/*
    +** Return a list of all triggers on table pTab if there exists at least
    +** one trigger that must be fired when an operation of type 'op' is 
    +** performed on the table, and, if that operation is an UPDATE, if at
    +** least one of the columns in pChanges is being modified.
    +*/
    +SQLITE_PRIVATE Trigger *sqlite3TriggersExist(
    +  Parse *pParse,          /* Parse context */
    +  Table *pTab,            /* The table the contains the triggers */
    +  int op,                 /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
    +  ExprList *pChanges,     /* Columns that change in an UPDATE statement */
    +  int *pMask              /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
    +){
    +  int mask = 0;
    +  Trigger *pList = sqlite3TriggerList(pParse, pTab);
    +  Trigger *p;
    +  assert( pList==0 || IsVirtual(pTab)==0 );
    +  for(p=pList; p; p=p->pNext){
    +    if( p->op==op && checkColumnOverlap(p->pColumns, pChanges) ){
    +      mask |= p->tr_tm;
    +    }
    +  }
    +  if( pMask ){
    +    *pMask = mask;
    +  }
    +  return (mask ? pList : 0);
    +}
    +
    +/*
    +** Convert the pStep->target token into a SrcList and return a pointer
    +** to that SrcList.
    +**
    +** This routine adds a specific database name, if needed, to the target when
    +** forming the SrcList.  This prevents a trigger in one database from
    +** referring to a target in another database.  An exception is when the
    +** trigger is in TEMP in which case it can refer to any other database it
    +** wants.
    +*/
    +static SrcList *targetSrcList(
    +  Parse *pParse,       /* The parsing context */
    +  TriggerStep *pStep   /* The trigger containing the target token */
    +){
    +  int iDb;             /* Index of the database to use */
    +  SrcList *pSrc;       /* SrcList to be returned */
    +
    +  pSrc = sqlite3SrcListAppend(pParse->db, 0, &pStep->target, 0);
    +  if( pSrc ){
    +    assert( pSrc->nSrc>0 );
    +    assert( pSrc->a!=0 );
    +    iDb = sqlite3SchemaToIndex(pParse->db, pStep->pTrig->pSchema);
    +    if( iDb==0 || iDb>=2 ){
    +      sqlite3 *db = pParse->db;
    +      assert( iDb<pParse->db->nDb );
    +      pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
    +    }
    +  }
    +  return pSrc;
    +}
    +
    +/*
    +** Generate VDBE code for the statements inside the body of a single 
    +** trigger.
    +*/
    +static int codeTriggerProgram(
    +  Parse *pParse,            /* The parser context */
    +  TriggerStep *pStepList,   /* List of statements inside the trigger body */
    +  int orconf                /* Conflict algorithm. (OE_Abort, etc) */  
    +){
    +  TriggerStep *pStep;
    +  Vdbe *v = pParse->pVdbe;
    +  sqlite3 *db = pParse->db;
    +
    +  assert( pParse->pTriggerTab && pParse->pToplevel );
    +  assert( pStepList );
    +  assert( v!=0 );
    +  for(pStep=pStepList; pStep; pStep=pStep->pNext){
    +    /* Figure out the ON CONFLICT policy that will be used for this step
    +    ** of the trigger program. If the statement that caused this trigger
    +    ** to fire had an explicit ON CONFLICT, then use it. Otherwise, use
    +    ** the ON CONFLICT policy that was specified as part of the trigger
    +    ** step statement. Example:
    +    **
    +    **   CREATE TRIGGER AFTER INSERT ON t1 BEGIN;
    +    **     INSERT OR REPLACE INTO t2 VALUES(new.a, new.b);
    +    **   END;
    +    **
    +    **   INSERT INTO t1 ... ;            -- insert into t2 uses REPLACE policy
    +    **   INSERT OR IGNORE INTO t1 ... ;  -- insert into t2 uses IGNORE policy
    +    */
    +    pParse->eOrconf = (orconf==OE_Default)?pStep->orconf:(u8)orconf;
    +
    +    switch( pStep->op ){
    +      case TK_UPDATE: {
    +        sqlite3Update(pParse, 
    +          targetSrcList(pParse, pStep),
    +          sqlite3ExprListDup(db, pStep->pExprList, 0), 
    +          sqlite3ExprDup(db, pStep->pWhere, 0), 
    +          pParse->eOrconf
    +        );
    +        break;
    +      }
    +      case TK_INSERT: {
    +        sqlite3Insert(pParse, 
    +          targetSrcList(pParse, pStep),
    +          sqlite3ExprListDup(db, pStep->pExprList, 0), 
    +          sqlite3SelectDup(db, pStep->pSelect, 0), 
    +          sqlite3IdListDup(db, pStep->pIdList), 
    +          pParse->eOrconf
    +        );
    +        break;
    +      }
    +      case TK_DELETE: {
    +        sqlite3DeleteFrom(pParse, 
    +          targetSrcList(pParse, pStep),
    +          sqlite3ExprDup(db, pStep->pWhere, 0)
    +        );
    +        break;
    +      }
    +      default: assert( pStep->op==TK_SELECT ); {
    +        SelectDest sDest;
    +        Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0);
    +        sqlite3SelectDestInit(&sDest, SRT_Discard, 0);
    +        sqlite3Select(pParse, pSelect, &sDest);
    +        sqlite3SelectDelete(db, pSelect);
    +        break;
    +      }
    +    } 
    +    if( pStep->op!=TK_SELECT ){
    +      sqlite3VdbeAddOp0(v, OP_ResetCount);
    +    }
    +  }
    +
    +  return 0;
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** This function is used to add VdbeComment() annotations to a VDBE
    +** program. It is not used in production code, only for debugging.
    +*/
    +static const char *onErrorText(int onError){
    +  switch( onError ){
    +    case OE_Abort:    return "abort";
    +    case OE_Rollback: return "rollback";
    +    case OE_Fail:     return "fail";
    +    case OE_Replace:  return "replace";
    +    case OE_Ignore:   return "ignore";
    +    case OE_Default:  return "default";
    +  }
    +  return "n/a";
    +}
    +#endif
    +
    +/*
    +** Parse context structure pFrom has just been used to create a sub-vdbe
    +** (trigger program). If an error has occurred, transfer error information
    +** from pFrom to pTo.
    +*/
    +static void transferParseError(Parse *pTo, Parse *pFrom){
    +  assert( pFrom->zErrMsg==0 || pFrom->nErr );
    +  assert( pTo->zErrMsg==0 || pTo->nErr );
    +  if( pTo->nErr==0 ){
    +    pTo->zErrMsg = pFrom->zErrMsg;
    +    pTo->nErr = pFrom->nErr;
    +  }else{
    +    sqlite3DbFree(pFrom->db, pFrom->zErrMsg);
    +  }
    +}
    +
    +/*
    +** Create and populate a new TriggerPrg object with a sub-program 
    +** implementing trigger pTrigger with ON CONFLICT policy orconf.
    +*/
    +static TriggerPrg *codeRowTrigger(
    +  Parse *pParse,       /* Current parse context */
    +  Trigger *pTrigger,   /* Trigger to code */
    +  Table *pTab,         /* The table pTrigger is attached to */
    +  int orconf           /* ON CONFLICT policy to code trigger program with */
    +){
    +  Parse *pTop = sqlite3ParseToplevel(pParse);
    +  sqlite3 *db = pParse->db;   /* Database handle */
    +  TriggerPrg *pPrg;           /* Value to return */
    +  Expr *pWhen = 0;            /* Duplicate of trigger WHEN expression */
    +  Vdbe *v;                    /* Temporary VM */
    +  NameContext sNC;            /* Name context for sub-vdbe */
    +  SubProgram *pProgram = 0;   /* Sub-vdbe for trigger program */
    +  Parse *pSubParse;           /* Parse context for sub-vdbe */
    +  int iEndTrigger = 0;        /* Label to jump to if WHEN is false */
    +
    +  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
    +
    +  /* Allocate the TriggerPrg and SubProgram objects. To ensure that they
    +  ** are freed if an error occurs, link them into the Parse.pTriggerPrg 
    +  ** list of the top-level Parse object sooner rather than later.  */
    +  pPrg = sqlite3DbMallocZero(db, sizeof(TriggerPrg));
    +  if( !pPrg ) return 0;
    +  pPrg->pNext = pTop->pTriggerPrg;
    +  pTop->pTriggerPrg = pPrg;
    +  pPrg->pProgram = pProgram = sqlite3DbMallocZero(db, sizeof(SubProgram));
    +  if( !pProgram ) return 0;
    +  pProgram->nRef = 1;
    +  pPrg->pTrigger = pTrigger;
    +  pPrg->orconf = orconf;
    +  pPrg->oldmask = 0xffffffff;
    +
    +  /* Allocate and populate a new Parse context to use for coding the 
    +  ** trigger sub-program.  */
    +  pSubParse = sqlite3StackAllocZero(db, sizeof(Parse));
    +  if( !pSubParse ) return 0;
    +  memset(&sNC, 0, sizeof(sNC));
    +  sNC.pParse = pSubParse;
    +  pSubParse->db = db;
    +  pSubParse->pTriggerTab = pTab;
    +  pSubParse->pToplevel = pTop;
    +  pSubParse->zAuthContext = pTrigger->zName;
    +  pSubParse->eTriggerOp = pTrigger->op;
    +
    +  v = sqlite3GetVdbe(pSubParse);
    +  if( v ){
    +    VdbeComment((v, "Start: %s.%s (%s %s%s%s ON %s)", 
    +      pTrigger->zName, onErrorText(orconf),
    +      (pTrigger->tr_tm==TRIGGER_BEFORE ? "BEFORE" : "AFTER"),
    +        (pTrigger->op==TK_UPDATE ? "UPDATE" : ""),
    +        (pTrigger->op==TK_INSERT ? "INSERT" : ""),
    +        (pTrigger->op==TK_DELETE ? "DELETE" : ""),
    +      pTab->zName
    +    ));
    +#ifndef SQLITE_OMIT_TRACE
    +    sqlite3VdbeChangeP4(v, -1, 
    +      sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
    +    );
    +#endif
    +
    +    /* If one was specified, code the WHEN clause. If it evaluates to false
    +    ** (or NULL) the sub-vdbe is immediately halted by jumping to the 
    +    ** OP_Halt inserted at the end of the program.  */
    +    if( pTrigger->pWhen ){
    +      pWhen = sqlite3ExprDup(db, pTrigger->pWhen, 0);
    +      if( SQLITE_OK==sqlite3ResolveExprNames(&sNC, pWhen) 
    +       && db->mallocFailed==0 
    +      ){
    +        iEndTrigger = sqlite3VdbeMakeLabel(v);
    +        sqlite3ExprIfFalse(pSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL);
    +      }
    +      sqlite3ExprDelete(db, pWhen);
    +    }
    +
    +    /* Code the trigger program into the sub-vdbe. */
    +    codeTriggerProgram(pSubParse, pTrigger->step_list, orconf);
    +
    +    /* Insert an OP_Halt at the end of the sub-program. */
    +    if( iEndTrigger ){
    +      sqlite3VdbeResolveLabel(v, iEndTrigger);
    +    }
    +    sqlite3VdbeAddOp0(v, OP_Halt);
    +    VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
    +
    +    transferParseError(pParse, pSubParse);
    +    if( db->mallocFailed==0 ){
    +      pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);
    +    }
    +    pProgram->nMem = pSubParse->nMem;
    +    pProgram->nCsr = pSubParse->nTab;
    +    pProgram->token = (void *)pTrigger;
    +    pPrg->oldmask = pSubParse->oldmask;
    +    sqlite3VdbeDelete(v);
    +  }
    +
    +  assert( !pSubParse->pAinc       && !pSubParse->pZombieTab );
    +  assert( !pSubParse->pTriggerPrg && !pSubParse->nMaxArg );
    +  sqlite3StackFree(db, pSubParse);
    +
    +  return pPrg;
    +}
    +    
    +/*
    +** Return a pointer to a TriggerPrg object containing the sub-program for
    +** trigger pTrigger with default ON CONFLICT algorithm orconf. If no such
    +** TriggerPrg object exists, a new object is allocated and populated before
    +** being returned.
    +*/
    +static TriggerPrg *getRowTrigger(
    +  Parse *pParse,       /* Current parse context */
    +  Trigger *pTrigger,   /* Trigger to code */
    +  Table *pTab,         /* The table trigger pTrigger is attached to */
    +  int orconf           /* ON CONFLICT algorithm. */
    +){
    +  Parse *pRoot = sqlite3ParseToplevel(pParse);
    +  TriggerPrg *pPrg;
    +
    +  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
    +
    +  /* It may be that this trigger has already been coded (or is in the
    +  ** process of being coded). If this is the case, then an entry with
    +  ** a matching TriggerPrg.pTrigger field will be present somewhere
    +  ** in the Parse.pTriggerPrg list. Search for such an entry.  */
    +  for(pPrg=pRoot->pTriggerPrg; 
    +      pPrg && (pPrg->pTrigger!=pTrigger || pPrg->orconf!=orconf); 
    +      pPrg=pPrg->pNext
    +  );
    +
    +  /* If an existing TriggerPrg could not be located, create a new one. */
    +  if( !pPrg ){
    +    pPrg = codeRowTrigger(pParse, pTrigger, pTab, orconf);
    +  }
    +
    +  return pPrg;
    +}
    +
    +/*
    +** Generate code for the trigger program associated with trigger p on 
    +** table pTab. The reg, orconf and ignoreJump parameters passed to this
    +** function are the same as those described in the header function for
    +** sqlite3CodeRowTrigger()
    +*/
    +SQLITE_PRIVATE void sqlite3CodeRowTriggerDirect(
    +  Parse *pParse,       /* Parse context */
    +  Trigger *p,          /* Trigger to code */
    +  Table *pTab,         /* The table to code triggers from */
    +  int reg,             /* Reg array containing OLD.* and NEW.* values */
    +  int orconf,          /* ON CONFLICT policy */
    +  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
    +){
    +  Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
    +  TriggerPrg *pPrg;
    +  pPrg = getRowTrigger(pParse, p, pTab, orconf);
    +  assert( pPrg || pParse->nErr || pParse->db->mallocFailed );
    +
    +  /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program 
    +  ** is a pointer to the sub-vdbe containing the trigger program.  */
    +  if( pPrg ){
    +    sqlite3VdbeAddOp3(v, OP_Program, reg, ignoreJump, ++pParse->nMem);
    +    pPrg->pProgram->nRef++;
    +    sqlite3VdbeChangeP4(v, -1, (const char *)pPrg->pProgram, P4_SUBPROGRAM);
    +    VdbeComment(
    +        (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));
    +
    +    /* Set the P5 operand of the OP_Program instruction to non-zero if
    +    ** recursive invocation of this trigger program is disallowed. Recursive
    +    ** invocation is disallowed if (a) the sub-program is really a trigger,
    +    ** not a foreign key action, and (b) the flag to enable recursive triggers
    +    ** is clear.  */
    +    sqlite3VdbeChangeP5(v, (u8)(p->zName && !(pParse->db->flags&SQLITE_RecTriggers)));
    +  }
    +}
    +
    +/*
    +** This is called to code the required FOR EACH ROW triggers for an operation
    +** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
    +** is given by the op paramater. The tr_tm parameter determines whether the
    +** BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then
    +** parameter pChanges is passed the list of columns being modified.
    +**
    +** If there are no triggers that fire at the specified time for the specified
    +** operation on pTab, this function is a no-op.
    +**
    +** The reg argument is the address of the first in an array of registers 
    +** that contain the values substituted for the new.* and old.* references
    +** in the trigger program. If N is the number of columns in table pTab
    +** (a copy of pTab->nCol), then registers are populated as follows:
    +**
    +**   Register       Contains
    +**   ------------------------------------------------------
    +**   reg+0          OLD.rowid
    +**   reg+1          OLD.* value of left-most column of pTab
    +**   ...            ...
    +**   reg+N          OLD.* value of right-most column of pTab
    +**   reg+N+1        NEW.rowid
    +**   reg+N+2        OLD.* value of left-most column of pTab
    +**   ...            ...
    +**   reg+N+N+1      NEW.* value of right-most column of pTab
    +**
    +** For ON DELETE triggers, the registers containing the NEW.* values will
    +** never be accessed by the trigger program, so they are not allocated or 
    +** populated by the caller (there is no data to populate them with anyway). 
    +** Similarly, for ON INSERT triggers the values stored in the OLD.* registers
    +** are never accessed, and so are not allocated by the caller. So, for an
    +** ON INSERT trigger, the value passed to this function as parameter reg
    +** is not a readable register, although registers (reg+N) through 
    +** (reg+N+N+1) are.
    +**
    +** Parameter orconf is the default conflict resolution algorithm for the
    +** trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump
    +** is the instruction that control should jump to if a trigger program
    +** raises an IGNORE exception.
    +*/
    +SQLITE_PRIVATE void sqlite3CodeRowTrigger(
    +  Parse *pParse,       /* Parse context */
    +  Trigger *pTrigger,   /* List of triggers on table pTab */
    +  int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */
    +  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
    +  int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
    +  Table *pTab,         /* The table to code triggers from */
    +  int reg,             /* The first in an array of registers (see above) */
    +  int orconf,          /* ON CONFLICT policy */
    +  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
    +){
    +  Trigger *p;          /* Used to iterate through pTrigger list */
    +
    +  assert( op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE );
    +  assert( tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER );
    +  assert( (op==TK_UPDATE)==(pChanges!=0) );
    +
    +  for(p=pTrigger; p; p=p->pNext){
    +
    +    /* Sanity checking:  The schema for the trigger and for the table are
    +    ** always defined.  The trigger must be in the same schema as the table
    +    ** or else it must be a TEMP trigger. */
    +    assert( p->pSchema!=0 );
    +    assert( p->pTabSchema!=0 );
    +    assert( p->pSchema==p->pTabSchema 
    +         || p->pSchema==pParse->db->aDb[1].pSchema );
    +
    +    /* Determine whether we should code this trigger */
    +    if( p->op==op 
    +     && p->tr_tm==tr_tm 
    +     && checkColumnOverlap(p->pColumns, pChanges)
    +    ){
    +      sqlite3CodeRowTriggerDirect(pParse, p, pTab, reg, orconf, ignoreJump);
    +    }
    +  }
    +}
    +
    +/*
    +** Triggers fired by UPDATE or DELETE statements may access values stored
    +** in the old.* pseudo-table. This function returns a 32-bit bitmask
    +** indicating which columns of the old.* table actually are used by
    +** triggers. This information may be used by the caller to avoid having
    +** to load the entire old.* record into memory when executing an UPDATE
    +** or DELETE command.
    +**
    +** Bit 0 of the returned mask is set if the left-most column of the
    +** table may be accessed using an old.<col> reference. Bit 1 is set if
    +** the second leftmost column value is required, and so on. If there
    +** are more than 32 columns in the table, and at least one of the columns
    +** with an index greater than 32 may be accessed, 0xffffffff is returned.
    +**
    +** It is not possible to determine if the old.rowid column is accessed
    +** by triggers. The caller must always assume that it is.
    +**
    +** There is no equivalent function for new.* references.
    +*/
    +SQLITE_PRIVATE u32 sqlite3TriggerOldmask(
    +  Parse *pParse,       /* Parse context */
    +  Trigger *pTrigger,   /* List of triggers on table pTab */
    +  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
    +  Table *pTab,         /* The table to code triggers from */
    +  int orconf           /* Default ON CONFLICT policy for trigger steps */
    +){
    +  const int op = pChanges ? TK_UPDATE : TK_DELETE;
    +  u32 mask = 0;
    +  Trigger *p;
    +
    +  for(p=pTrigger; p; p=p->pNext){
    +    if( p->op==op && checkColumnOverlap(p->pColumns,pChanges) ){
    +      TriggerPrg *pPrg;
    +      pPrg = getRowTrigger(pParse, p, pTab, orconf);
    +      if( pPrg ){
    +        mask |= pPrg->oldmask;
    +      }
    +    }
    +  }
    +
    +  return mask;
    +}
    +
    +#endif /* !defined(SQLITE_OMIT_TRIGGER) */
    +
    +/************** End of trigger.c *********************************************/
    +/************** Begin file update.c ******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains C code routines that are called by the parser
    +** to handle UPDATE statements.
    +**
    +** $Id: update.c,v 1.207 2009/08/08 18:01:08 drh Exp $
    +*/
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/* Forward declaration */
    +static void updateVirtualTable(
    +  Parse *pParse,       /* The parsing context */
    +  SrcList *pSrc,       /* The virtual table to be modified */
    +  Table *pTab,         /* The virtual table */
    +  ExprList *pChanges,  /* The columns to change in the UPDATE statement */
    +  Expr *pRowidExpr,    /* Expression used to recompute the rowid */
    +  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */
    +  Expr *pWhere         /* WHERE clause of the UPDATE statement */
    +);
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +/*
    +** The most recently coded instruction was an OP_Column to retrieve the
    +** i-th column of table pTab. This routine sets the P4 parameter of the 
    +** OP_Column to the default value, if any.
    +**
    +** The default value of a column is specified by a DEFAULT clause in the 
    +** column definition. This was either supplied by the user when the table
    +** was created, or added later to the table definition by an ALTER TABLE
    +** command. If the latter, then the row-records in the table btree on disk
    +** may not contain a value for the column and the default value, taken
    +** from the P4 parameter of the OP_Column instruction, is returned instead.
    +** If the former, then all row-records are guaranteed to include a value
    +** for the column and the P4 value is not required.
    +**
    +** Column definitions created by an ALTER TABLE command may only have 
    +** literal default values specified: a number, null or a string. (If a more
    +** complicated default expression value was provided, it is evaluated 
    +** when the ALTER TABLE is executed and one of the literal values written
    +** into the sqlite_master table.)
    +**
    +** Therefore, the P4 parameter is only required if the default value for
    +** the column is a literal number, string or null. The sqlite3ValueFromExpr()
    +** function is capable of transforming these types of expressions into
    +** sqlite3_value objects.
    +**
    +** If parameter iReg is not negative, code an OP_RealAffinity instruction
    +** on register iReg. This is used when an equivalent integer value is 
    +** stored in place of an 8-byte floating point value in order to save 
    +** space.
    +*/
    +SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){
    +  assert( pTab!=0 );
    +  if( !pTab->pSelect ){
    +    sqlite3_value *pValue;
    +    u8 enc = ENC(sqlite3VdbeDb(v));
    +    Column *pCol = &pTab->aCol[i];
    +    VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
    +    assert( i<pTab->nCol );
    +    sqlite3ValueFromExpr(sqlite3VdbeDb(v), pCol->pDflt, enc, 
    +                         pCol->affinity, &pValue);
    +    if( pValue ){
    +      sqlite3VdbeChangeP4(v, -1, (const char *)pValue, P4_MEM);
    +    }
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +    if( iReg>=0 && pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
    +      sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg);
    +    }
    +#endif
    +  }
    +}
    +
    +/*
    +** Process an UPDATE statement.
    +**
    +**   UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;
    +**          \_______/ \________/     \______/       \________________/
    +*            onError   pTabList      pChanges             pWhere
    +*/
    +SQLITE_PRIVATE void sqlite3Update(
    +  Parse *pParse,         /* The parser context */
    +  SrcList *pTabList,     /* The table in which we should change things */
    +  ExprList *pChanges,    /* Things to be changed */
    +  Expr *pWhere,          /* The WHERE clause.  May be null */
    +  int onError            /* How to handle constraint errors */
    +){
    +  int i, j;              /* Loop counters */
    +  Table *pTab;           /* The table to be updated */
    +  int addr = 0;          /* VDBE instruction address of the start of the loop */
    +  WhereInfo *pWInfo;     /* Information about the WHERE clause */
    +  Vdbe *v;               /* The virtual database engine */
    +  Index *pIdx;           /* For looping over indices */
    +  int nIdx;              /* Number of indices that need updating */
    +  int iCur;              /* VDBE Cursor number of pTab */
    +  sqlite3 *db;           /* The database structure */
    +  int *aRegIdx = 0;      /* One register assigned to each index to be updated */
    +  int *aXRef = 0;        /* aXRef[i] is the index in pChanges->a[] of the
    +                         ** an expression for the i-th column of the table.
    +                         ** aXRef[i]==-1 if the i-th column is not changed. */
    +  int chngRowid;         /* True if the record number is being changed */
    +  Expr *pRowidExpr = 0;  /* Expression defining the new record number */
    +  int openAll = 0;       /* True if all indices need to be opened */
    +  AuthContext sContext;  /* The authorization context */
    +  NameContext sNC;       /* The name-context to resolve expressions in */
    +  int iDb;               /* Database containing the table being updated */
    +  int j1;                /* Addresses of jump instructions */
    +  int okOnePass;         /* True for one-pass algorithm without the FIFO */
    +  int hasFK;             /* True if foreign key processing is required */
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  int isView;                  /* Trying to update a view */
    +  Trigger *pTrigger;           /* List of triggers on pTab, if required */
    +#endif
    +
    +  /* Register Allocations */
    +  int regRowCount = 0;   /* A count of rows changed */
    +  int regOldRowid;       /* The old rowid */
    +  int regNewRowid;       /* The new rowid */
    +  int regNew;
    +  int regOld = 0;
    +  int regRowSet = 0;     /* Rowset of rows to be updated */
    +  int regRec;            /* Register used for new table record to insert */
    +
    +  memset(&sContext, 0, sizeof(sContext));
    +  db = pParse->db;
    +  if( pParse->nErr || db->mallocFailed ){
    +    goto update_cleanup;
    +  }
    +  assert( pTabList->nSrc==1 );
    +
    +  /* Locate the table which we want to update. 
    +  */
    +  pTab = sqlite3SrcListLookup(pParse, pTabList);
    +  if( pTab==0 ) goto update_cleanup;
    +  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
    +
    +  /* Figure out if we have any triggers and if the table being
    +  ** updated is a view.
    +  */
    +#ifndef SQLITE_OMIT_TRIGGER
    +  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges, 0);
    +  isView = pTab->pSelect!=0;
    +#else
    +# define pTrigger 0
    +# define isView 0
    +#endif
    +#ifdef SQLITE_OMIT_VIEW
    +# undef isView
    +# define isView 0
    +#endif
    +
    +  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
    +    goto update_cleanup;
    +  }
    +  if( sqlite3IsReadOnly(pParse, pTab, (pTrigger?1:0)) ){
    +    goto update_cleanup;
    +  }
    +  aXRef = sqlite3DbMallocRaw(db, sizeof(int) * pTab->nCol );
    +  if( aXRef==0 ) goto update_cleanup;
    +  for(i=0; i<pTab->nCol; i++) aXRef[i] = -1;
    +
    +  /* Allocate a cursors for the main database table and for all indices.
    +  ** The index cursors might not be used, but if they are used they
    +  ** need to occur right after the database cursor.  So go ahead and
    +  ** allocate enough space, just in case.
    +  */
    +  pTabList->a[0].iCursor = iCur = pParse->nTab++;
    +  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +    pParse->nTab++;
    +  }
    +
    +  /* Initialize the name-context */
    +  memset(&sNC, 0, sizeof(sNC));
    +  sNC.pParse = pParse;
    +  sNC.pSrcList = pTabList;
    +
    +  /* Resolve the column names in all the expressions of the
    +  ** of the UPDATE statement.  Also find the column index
    +  ** for each column to be updated in the pChanges array.  For each
    +  ** column to be updated, make sure we have authorization to change
    +  ** that column.
    +  */
    +  chngRowid = 0;
    +  for(i=0; i<pChanges->nExpr; i++){
    +    if( sqlite3ResolveExprNames(&sNC, pChanges->a[i].pExpr) ){
    +      goto update_cleanup;
    +    }
    +    for(j=0; j<pTab->nCol; j++){
    +      if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
    +        if( j==pTab->iPKey ){
    +          chngRowid = 1;
    +          pRowidExpr = pChanges->a[i].pExpr;
    +        }
    +        aXRef[j] = i;
    +        break;
    +      }
    +    }
    +    if( j>=pTab->nCol ){
    +      if( sqlite3IsRowid(pChanges->a[i].zName) ){
    +        chngRowid = 1;
    +        pRowidExpr = pChanges->a[i].pExpr;
    +      }else{
    +        sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);
    +        goto update_cleanup;
    +      }
    +    }
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +    {
    +      int rc;
    +      rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
    +                           pTab->aCol[j].zName, db->aDb[iDb].zName);
    +      if( rc==SQLITE_DENY ){
    +        goto update_cleanup;
    +      }else if( rc==SQLITE_IGNORE ){
    +        aXRef[j] = -1;
    +      }
    +    }
    +#endif
    +  }
    +
    +  hasFK = sqlite3FkRequired(pParse, pTab, aXRef, chngRowid);
    +
    +  /* Allocate memory for the array aRegIdx[].  There is one entry in the
    +  ** array for each index associated with table being updated.  Fill in
    +  ** the value with a register number for indices that are to be used
    +  ** and with zero for unused indices.
    +  */
    +  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
    +  if( nIdx>0 ){
    +    aRegIdx = sqlite3DbMallocRaw(db, sizeof(Index*) * nIdx );
    +    if( aRegIdx==0 ) goto update_cleanup;
    +  }
    +  for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
    +    int reg;
    +    if( chngRowid ){
    +      reg = ++pParse->nMem;
    +    }else{
    +      reg = 0;
    +      for(i=0; i<pIdx->nColumn; i++){
    +        if( aXRef[pIdx->aiColumn[i]]>=0 ){
    +          reg = ++pParse->nMem;
    +          break;
    +        }
    +      }
    +    }
    +    aRegIdx[j] = reg;
    +  }
    +
    +  /* Begin generating code. */
    +  v = sqlite3GetVdbe(pParse);
    +  if( v==0 ) goto update_cleanup;
    +  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
    +  sqlite3BeginWriteOperation(pParse, 1, iDb);
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  /* Virtual tables must be handled separately */
    +  if( IsVirtual(pTab) ){
    +    updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,
    +                       pWhere);
    +    pWhere = 0;
    +    pTabList = 0;
    +    goto update_cleanup;
    +  }
    +#endif
    +
    +  /* Allocate required registers. */
    +  regOldRowid = regNewRowid = ++pParse->nMem;
    +  if( pTrigger || hasFK ){
    +    regOld = pParse->nMem + 1;
    +    pParse->nMem += pTab->nCol;
    +  }
    +  if( chngRowid || pTrigger || hasFK ){
    +    regNewRowid = ++pParse->nMem;
    +  }
    +  regNew = pParse->nMem + 1;
    +  pParse->nMem += pTab->nCol;
    +  regRec = ++pParse->nMem;
    +
    +  /* Start the view context. */
    +  if( isView ){
    +    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
    +  }
    +
    +  /* If we are trying to update a view, realize that view into
    +  ** a ephemeral table.
    +  */
    +#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
    +  if( isView ){
    +    sqlite3MaterializeView(pParse, pTab, pWhere, iCur);
    +  }
    +#endif
    +
    +  /* Resolve the column names in all the expressions in the
    +  ** WHERE clause.
    +  */
    +  if( sqlite3ResolveExprNames(&sNC, pWhere) ){
    +    goto update_cleanup;
    +  }
    +
    +  /* Begin the database scan
    +  */
    +  sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid);
    +  pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0, WHERE_ONEPASS_DESIRED);
    +  if( pWInfo==0 ) goto update_cleanup;
    +  okOnePass = pWInfo->okOnePass;
    +
    +  /* Remember the rowid of every item to be updated.
    +  */
    +  sqlite3VdbeAddOp2(v, OP_Rowid, iCur, regOldRowid);
    +  if( !okOnePass ){
    +    regRowSet = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_RowSetAdd, regRowSet, regOldRowid);
    +  }
    +
    +  /* End the database scan loop.
    +  */
    +  sqlite3WhereEnd(pWInfo);
    +
    +  /* Initialize the count of updated rows
    +  */
    +  if( (db->flags & SQLITE_CountRows) && !pParse->pTriggerTab ){
    +    regRowCount = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);
    +  }
    +
    +  if( !isView ){
    +    /* 
    +    ** Open every index that needs updating.  Note that if any
    +    ** index could potentially invoke a REPLACE conflict resolution 
    +    ** action, then we need to open all indices because we might need
    +    ** to be deleting some records.
    +    */
    +    if( !okOnePass ) sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite); 
    +    if( onError==OE_Replace ){
    +      openAll = 1;
    +    }else{
    +      openAll = 0;
    +      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    +        if( pIdx->onError==OE_Replace ){
    +          openAll = 1;
    +          break;
    +        }
    +      }
    +    }
    +    for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
    +      if( openAll || aRegIdx[i]>0 ){
    +        KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    +        sqlite3VdbeAddOp4(v, OP_OpenWrite, iCur+i+1, pIdx->tnum, iDb,
    +                       (char*)pKey, P4_KEYINFO_HANDOFF);
    +        assert( pParse->nTab>iCur+i+1 );
    +      }
    +    }
    +  }
    +
    +  /* Top of the update loop */
    +  if( okOnePass ){
    +    int a1 = sqlite3VdbeAddOp1(v, OP_NotNull, regOldRowid);
    +    addr = sqlite3VdbeAddOp0(v, OP_Goto);
    +    sqlite3VdbeJumpHere(v, a1);
    +  }else{
    +    addr = sqlite3VdbeAddOp3(v, OP_RowSetRead, regRowSet, 0, regOldRowid);
    +  }
    +
    +  /* Make cursor iCur point to the record that is being updated. If
    +  ** this record does not exist for some reason (deleted by a trigger,
    +  ** for example, then jump to the next iteration of the RowSet loop.  */
    +  sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addr, regOldRowid);
    +
    +  /* If the record number will change, set register regNewRowid to
    +  ** contain the new value. If the record number is not being modified,
    +  ** then regNewRowid is the same register as regOldRowid, which is
    +  ** already populated.  */
    +  assert( chngRowid || pTrigger || hasFK || regOldRowid==regNewRowid );
    +  if( chngRowid ){
    +    sqlite3ExprCode(pParse, pRowidExpr, regNewRowid);
    +    sqlite3VdbeAddOp1(v, OP_MustBeInt, regNewRowid);
    +  }
    +
    +  /* If there are triggers on this table, populate an array of registers 
    +  ** with the required old.* column data.  */
    +  if( hasFK || pTrigger ){
    +    u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);
    +    oldmask |= sqlite3TriggerOldmask(pParse, pTrigger, pChanges, pTab, onError);
    +    for(i=0; i<pTab->nCol; i++){
    +      if( aXRef[i]<0 || oldmask==0xffffffff || (oldmask & (1<<i)) ){
    +        sqlite3VdbeAddOp3(v, OP_Column, iCur, i, regOld+i);
    +        sqlite3ColumnDefault(v, pTab, i, regOld+i);
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_Null, 0, regOld+i);
    +      }
    +    }
    +    if( chngRowid==0 ){
    +      sqlite3VdbeAddOp2(v, OP_Copy, regOldRowid, regNewRowid);
    +    }
    +  }
    +
    +  /* Populate the array of registers beginning at regNew with the new
    +  ** row data. This array is used to check constaints, create the new
    +  ** table and index records, and as the values for any new.* references
    +  ** made by triggers.  */
    +  for(i=0; i<pTab->nCol; i++){
    +    if( i==pTab->iPKey ){
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regNew+i);
    +    }else{
    +      j = aXRef[i];
    +      if( j<0 ){
    +        sqlite3VdbeAddOp3(v, OP_Column, iCur, i, regNew+i);
    +        sqlite3ColumnDefault(v, pTab, i, regNew+i);
    +      }else{
    +        sqlite3ExprCode(pParse, pChanges->a[j].pExpr, regNew+i);
    +      }
    +    }
    +  }
    +
    +  /* Fire any BEFORE UPDATE triggers. This happens before constraints are
    +  ** verified. One could argue that this is wrong.  */
    +  if( pTrigger ){
    +    sqlite3VdbeAddOp2(v, OP_Affinity, regNew, pTab->nCol);
    +    sqlite3TableAffinityStr(v, pTab);
    +    sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, 
    +        TRIGGER_BEFORE, pTab, regOldRowid, onError, addr);
    +
    +    /* The row-trigger may have deleted the row being updated. In this
    +    ** case, jump to the next row. No updates or AFTER triggers are 
    +    ** required. This behaviour - what happens when the row being updated
    +    ** is deleted or renamed by a BEFORE trigger - is left undefined in the
    +    ** documentation.  */
    +    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addr, regOldRowid);
    +  }
    +
    +  if( !isView ){
    +
    +    /* Do constraint checks. */
    +    sqlite3GenerateConstraintChecks(pParse, pTab, iCur, regNewRowid,
    +        aRegIdx, (chngRowid?regOldRowid:0), 1, onError, addr, 0);
    +
    +    /* Do FK constraint checks. */
    +    if( hasFK ){
    +      sqlite3FkCheck(pParse, pTab, regOldRowid, 0);
    +    }
    +
    +    /* Delete the index entries associated with the current record.  */
    +    j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regOldRowid);
    +    sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, aRegIdx);
    +  
    +    /* If changing the record number, delete the old record.  */
    +    if( hasFK || chngRowid ){
    +      sqlite3VdbeAddOp2(v, OP_Delete, iCur, 0);
    +    }
    +    sqlite3VdbeJumpHere(v, j1);
    +
    +    if( hasFK ){
    +      sqlite3FkCheck(pParse, pTab, 0, regNewRowid);
    +    }
    +  
    +    /* Insert the new index entries and the new record. */
    +    sqlite3CompleteInsertion(pParse, pTab, iCur, regNewRowid, aRegIdx, 1, 0, 0);
    +
    +    /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
    +    ** handle rows (possibly in other tables) that refer via a foreign key
    +    ** to the row just updated. */ 
    +    if( hasFK ){
    +      sqlite3FkActions(pParse, pTab, pChanges, regOldRowid);
    +    }
    +  }
    +
    +  /* Increment the row counter 
    +  */
    +  if( (db->flags & SQLITE_CountRows) && !pParse->pTriggerTab){
    +    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);
    +  }
    +
    +  sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, 
    +      TRIGGER_AFTER, pTab, regOldRowid, onError, addr);
    +
    +  /* Repeat the above with the next record to be updated, until
    +  ** all record selected by the WHERE clause have been updated.
    +  */
    +  sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);
    +  sqlite3VdbeJumpHere(v, addr);
    +
    +  /* Close all tables */
    +  for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
    +    if( openAll || aRegIdx[i]>0 ){
    +      sqlite3VdbeAddOp2(v, OP_Close, iCur+i+1, 0);
    +    }
    +  }
    +  sqlite3VdbeAddOp2(v, OP_Close, iCur, 0);
    +
    +  /* Update the sqlite_sequence table by storing the content of the
    +  ** maximum rowid counter values recorded while inserting into
    +  ** autoincrement tables.
    +  */
    +  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
    +    sqlite3AutoincrementEnd(pParse);
    +  }
    +
    +  /*
    +  ** Return the number of rows that were changed. If this routine is 
    +  ** generating code because of a call to sqlite3NestedParse(), do not
    +  ** invoke the callback function.
    +  */
    +  if( (db->flags&SQLITE_CountRows) && !pParse->pTriggerTab && !pParse->nested ){
    +    sqlite3VdbeAddOp2(v, OP_ResultRow, regRowCount, 1);
    +    sqlite3VdbeSetNumCols(v, 1);
    +    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows updated", SQLITE_STATIC);
    +  }
    +
    +update_cleanup:
    +  sqlite3AuthContextPop(&sContext);
    +  sqlite3DbFree(db, aRegIdx);
    +  sqlite3DbFree(db, aXRef);
    +  sqlite3SrcListDelete(db, pTabList);
    +  sqlite3ExprListDelete(db, pChanges);
    +  sqlite3ExprDelete(db, pWhere);
    +  return;
    +}
    +/* Make sure "isView" and other macros defined above are undefined. Otherwise
    +** thely may interfere with compilation of other functions in this file
    +** (or in another file, if this file becomes part of the amalgamation).  */
    +#ifdef isView
    + #undef isView
    +#endif
    +#ifdef pTrigger
    + #undef pTrigger
    +#endif
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/*
    +** Generate code for an UPDATE of a virtual table.
    +**
    +** The strategy is that we create an ephemerial table that contains
    +** for each row to be changed:
    +**
    +**   (A)  The original rowid of that row.
    +**   (B)  The revised rowid for the row. (note1)
    +**   (C)  The content of every column in the row.
    +**
    +** Then we loop over this ephemeral table and for each row in
    +** the ephermeral table call VUpdate.
    +**
    +** When finished, drop the ephemeral table.
    +**
    +** (note1) Actually, if we know in advance that (A) is always the same
    +** as (B) we only store (A), then duplicate (A) when pulling
    +** it out of the ephemeral table before calling VUpdate.
    +*/
    +static void updateVirtualTable(
    +  Parse *pParse,       /* The parsing context */
    +  SrcList *pSrc,       /* The virtual table to be modified */
    +  Table *pTab,         /* The virtual table */
    +  ExprList *pChanges,  /* The columns to change in the UPDATE statement */
    +  Expr *pRowid,        /* Expression used to recompute the rowid */
    +  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */
    +  Expr *pWhere         /* WHERE clause of the UPDATE statement */
    +){
    +  Vdbe *v = pParse->pVdbe;  /* Virtual machine under construction */
    +  ExprList *pEList = 0;     /* The result set of the SELECT statement */
    +  Select *pSelect = 0;      /* The SELECT statement */
    +  Expr *pExpr;              /* Temporary expression */
    +  int ephemTab;             /* Table holding the result of the SELECT */
    +  int i;                    /* Loop counter */
    +  int addr;                 /* Address of top of loop */
    +  int iReg;                 /* First register in set passed to OP_VUpdate */
    +  sqlite3 *db = pParse->db; /* Database connection */
    +  const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);
    +  SelectDest dest;
    +
    +  /* Construct the SELECT statement that will find the new values for
    +  ** all updated rows. 
    +  */
    +  pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ID, "_rowid_"));
    +  if( pRowid ){
    +    pEList = sqlite3ExprListAppend(pParse, pEList,
    +                                   sqlite3ExprDup(db, pRowid, 0));
    +  }
    +  assert( pTab->iPKey<0 );
    +  for(i=0; i<pTab->nCol; i++){
    +    if( aXRef[i]>=0 ){
    +      pExpr = sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0);
    +    }else{
    +      pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
    +    }
    +    pEList = sqlite3ExprListAppend(pParse, pEList, pExpr);
    +  }
    +  pSelect = sqlite3SelectNew(pParse, pEList, pSrc, pWhere, 0, 0, 0, 0, 0, 0);
    +  
    +  /* Create the ephemeral table into which the update results will
    +  ** be stored.
    +  */
    +  assert( v );
    +  ephemTab = pParse->nTab++;
    +  sqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, pTab->nCol+1+(pRowid!=0));
    +
    +  /* fill the ephemeral table 
    +  */
    +  sqlite3SelectDestInit(&dest, SRT_Table, ephemTab);
    +  sqlite3Select(pParse, pSelect, &dest);
    +
    +  /* Generate code to scan the ephemeral table and call VUpdate. */
    +  iReg = ++pParse->nMem;
    +  pParse->nMem += pTab->nCol+1;
    +  addr = sqlite3VdbeAddOp2(v, OP_Rewind, ephemTab, 0);
    +  sqlite3VdbeAddOp3(v, OP_Column,  ephemTab, 0, iReg);
    +  sqlite3VdbeAddOp3(v, OP_Column, ephemTab, (pRowid?1:0), iReg+1);
    +  for(i=0; i<pTab->nCol; i++){
    +    sqlite3VdbeAddOp3(v, OP_Column, ephemTab, i+1+(pRowid!=0), iReg+2+i);
    +  }
    +  sqlite3VtabMakeWritable(pParse, pTab);
    +  sqlite3VdbeAddOp4(v, OP_VUpdate, 0, pTab->nCol+2, iReg, pVTab, P4_VTAB);
    +  sqlite3MayAbort(pParse);
    +  sqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1);
    +  sqlite3VdbeJumpHere(v, addr);
    +  sqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);
    +
    +  /* Cleanup */
    +  sqlite3SelectDelete(db, pSelect);  
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +/************** End of update.c **********************************************/
    +/************** Begin file vacuum.c ******************************************/
    +/*
    +** 2003 April 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to implement the VACUUM command.
    +**
    +** Most of the code in this file may be omitted by defining the
    +** SQLITE_OMIT_VACUUM macro.
    +**
    +** $Id: vacuum.c,v 1.91 2009/07/02 07:47:33 danielk1977 Exp $
    +*/
    +
    +#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
    +/*
    +** Execute zSql on database db. Return an error code.
    +*/
    +static int execSql(sqlite3 *db, const char *zSql){
    +  sqlite3_stmt *pStmt;
    +  VVA_ONLY( int rc; )
    +  if( !zSql ){
    +    return SQLITE_NOMEM;
    +  }
    +  if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){
    +    return sqlite3_errcode(db);
    +  }
    +  VVA_ONLY( rc = ) sqlite3_step(pStmt);
    +  assert( rc!=SQLITE_ROW );
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +/*
    +** Execute zSql on database db. The statement returns exactly
    +** one column. Execute this as SQL on the same database.
    +*/
    +static int execExecSql(sqlite3 *db, const char *zSql){
    +  sqlite3_stmt *pStmt;
    +  int rc;
    +
    +  rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  while( SQLITE_ROW==sqlite3_step(pStmt) ){
    +    rc = execSql(db, (char*)sqlite3_column_text(pStmt, 0));
    +    if( rc!=SQLITE_OK ){
    +      sqlite3_finalize(pStmt);
    +      return rc;
    +    }
    +  }
    +
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +/*
    +** The non-standard VACUUM command is used to clean up the database,
    +** collapse free space, etc.  It is modelled after the VACUUM command
    +** in PostgreSQL.
    +**
    +** In version 1.0.x of SQLite, the VACUUM command would call
    +** gdbm_reorganize() on all the database tables.  But beginning
    +** with 2.0.0, SQLite no longer uses GDBM so this command has
    +** become a no-op.
    +*/
    +SQLITE_PRIVATE void sqlite3Vacuum(Parse *pParse){
    +  Vdbe *v = sqlite3GetVdbe(pParse);
    +  if( v ){
    +    sqlite3VdbeAddOp2(v, OP_Vacuum, 0, 0);
    +  }
    +  return;
    +}
    +
    +/*
    +** This routine implements the OP_Vacuum opcode of the VDBE.
    +*/
    +SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
    +  int rc = SQLITE_OK;     /* Return code from service routines */
    +  Btree *pMain;           /* The database being vacuumed */
    +  Btree *pTemp;           /* The temporary database we vacuum into */
    +  char *zSql = 0;         /* SQL statements */
    +  int saved_flags;        /* Saved value of the db->flags */
    +  int saved_nChange;      /* Saved value of db->nChange */
    +  int saved_nTotalChange; /* Saved value of db->nTotalChange */
    +  Db *pDb = 0;            /* Database to detach at end of vacuum */
    +  int isMemDb;            /* True if vacuuming a :memory: database */
    +  int nRes;
    +
    +  if( !db->autoCommit ){
    +    sqlite3SetString(pzErrMsg, db, "cannot VACUUM from within a transaction");
    +    return SQLITE_ERROR;
    +  }
    +
    +  /* Save the current value of the database flags so that it can be 
    +  ** restored before returning. Then set the writable-schema flag, and
    +  ** disable CHECK and foreign key constraints.  */
    +  saved_flags = db->flags;
    +  saved_nChange = db->nChange;
    +  saved_nTotalChange = db->nTotalChange;
    +  db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks;
    +  db->flags &= ~SQLITE_ForeignKeys;
    +
    +  pMain = db->aDb[0].pBt;
    +  isMemDb = sqlite3PagerIsMemdb(sqlite3BtreePager(pMain));
    +
    +  /* Attach the temporary database as 'vacuum_db'. The synchronous pragma
    +  ** can be set to 'off' for this file, as it is not recovered if a crash
    +  ** occurs anyway. The integrity of the database is maintained by a
    +  ** (possibly synchronous) transaction opened on the main database before
    +  ** sqlite3BtreeCopyFile() is called.
    +  **
    +  ** An optimisation would be to use a non-journaled pager.
    +  ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
    +  ** that actually made the VACUUM run slower.  Very little journalling
    +  ** actually occurs when doing a vacuum since the vacuum_db is initially
    +  ** empty.  Only the journal header is written.  Apparently it takes more
    +  ** time to parse and run the PRAGMA to turn journalling off than it does
    +  ** to write the journal header file.
    +  */
    +  zSql = "ATTACH '' AS vacuum_db;";
    +  rc = execSql(db, zSql);
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +  pDb = &db->aDb[db->nDb-1];
    +  assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 );
    +  pTemp = db->aDb[db->nDb-1].pBt;
    +
    +  /* The call to execSql() to attach the temp database has left the file
    +  ** locked (as there was more than one active statement when the transaction
    +  ** to read the schema was concluded. Unlock it here so that this doesn't
    +  ** cause problems for the call to BtreeSetPageSize() below.  */
    +  sqlite3BtreeCommit(pTemp);
    +
    +  nRes = sqlite3BtreeGetReserve(pMain);
    +
    +  /* A VACUUM cannot change the pagesize of an encrypted database. */
    +#ifdef SQLITE_HAS_CODEC
    +  if( db->nextPagesize ){
    +    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
    +    int nKey;
    +    char *zKey;
    +    sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
    +    if( nKey ) db->nextPagesize = 0;
    +  }
    +#endif
    +
    +  if( sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain), nRes, 0)
    +   || (!isMemDb && sqlite3BtreeSetPageSize(pTemp, db->nextPagesize, nRes, 0))
    +   || NEVER(db->mallocFailed)
    +  ){
    +    rc = SQLITE_NOMEM;
    +    goto end_of_vacuum;
    +  }
    +  rc = execSql(db, "PRAGMA vacuum_db.synchronous=OFF");
    +  if( rc!=SQLITE_OK ){
    +    goto end_of_vacuum;
    +  }
    +
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +  sqlite3BtreeSetAutoVacuum(pTemp, db->nextAutovac>=0 ? db->nextAutovac :
    +                                           sqlite3BtreeGetAutoVacuum(pMain));
    +#endif
    +
    +  /* Begin a transaction */
    +  rc = execSql(db, "BEGIN EXCLUSIVE;");
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +
    +  /* Query the schema of the main database. Create a mirror schema
    +  ** in the temporary database.
    +  */
    +  rc = execExecSql(db, 
    +      "SELECT 'CREATE TABLE vacuum_db.' || substr(sql,14) "
    +      "  FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'"
    +      "   AND rootpage>0"
    +  );
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +  rc = execExecSql(db, 
    +      "SELECT 'CREATE INDEX vacuum_db.' || substr(sql,14)"
    +      "  FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ");
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +  rc = execExecSql(db, 
    +      "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21) "
    +      "  FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'");
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +
    +  /* Loop through the tables in the main database. For each, do
    +  ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy
    +  ** the contents to the temporary database.
    +  */
    +  rc = execExecSql(db, 
    +      "SELECT 'INSERT INTO vacuum_db.' || quote(name) "
    +      "|| ' SELECT * FROM main.' || quote(name) || ';'"
    +      "FROM main.sqlite_master "
    +      "WHERE type = 'table' AND name!='sqlite_sequence' "
    +      "  AND rootpage>0"
    +
    +  );
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +
    +  /* Copy over the sequence table
    +  */
    +  rc = execExecSql(db, 
    +      "SELECT 'DELETE FROM vacuum_db.' || quote(name) || ';' "
    +      "FROM vacuum_db.sqlite_master WHERE name='sqlite_sequence' "
    +  );
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +  rc = execExecSql(db, 
    +      "SELECT 'INSERT INTO vacuum_db.' || quote(name) "
    +      "|| ' SELECT * FROM main.' || quote(name) || ';' "
    +      "FROM vacuum_db.sqlite_master WHERE name=='sqlite_sequence';"
    +  );
    +  if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +
    +
    +  /* Copy the triggers, views, and virtual tables from the main database
    +  ** over to the temporary database.  None of these objects has any
    +  ** associated storage, so all we have to do is copy their entries
    +  ** from the SQLITE_MASTER table.
    +  */
    +  rc = execSql(db,
    +      "INSERT INTO vacuum_db.sqlite_master "
    +      "  SELECT type, name, tbl_name, rootpage, sql"
    +      "    FROM main.sqlite_master"
    +      "   WHERE type='view' OR type='trigger'"
    +      "      OR (type='table' AND rootpage=0)"
    +  );
    +  if( rc ) goto end_of_vacuum;
    +
    +  /* At this point, unless the main db was completely empty, there is now a
    +  ** transaction open on the vacuum database, but not on the main database.
    +  ** Open a btree level transaction on the main database. This allows a
    +  ** call to sqlite3BtreeCopyFile(). The main database btree level
    +  ** transaction is then committed, so the SQL level never knows it was
    +  ** opened for writing. This way, the SQL transaction used to create the
    +  ** temporary database never needs to be committed.
    +  */
    +  {
    +    u32 meta;
    +    int i;
    +
    +    /* This array determines which meta meta values are preserved in the
    +    ** vacuum.  Even entries are the meta value number and odd entries
    +    ** are an increment to apply to the meta value after the vacuum.
    +    ** The increment is used to increase the schema cookie so that other
    +    ** connections to the same database will know to reread the schema.
    +    */
    +    static const unsigned char aCopy[] = {
    +       BTREE_SCHEMA_VERSION,     1,  /* Add one to the old schema cookie */
    +       BTREE_DEFAULT_CACHE_SIZE, 0,  /* Preserve the default page cache size */
    +       BTREE_TEXT_ENCODING,      0,  /* Preserve the text encoding */
    +       BTREE_USER_VERSION,       0,  /* Preserve the user version */
    +    };
    +
    +    assert( 1==sqlite3BtreeIsInTrans(pTemp) );
    +    assert( 1==sqlite3BtreeIsInTrans(pMain) );
    +
    +    /* Copy Btree meta values */
    +    for(i=0; i<ArraySize(aCopy); i+=2){
    +      /* GetMeta() and UpdateMeta() cannot fail in this context because
    +      ** we already have page 1 loaded into cache and marked dirty. */
    +      sqlite3BtreeGetMeta(pMain, aCopy[i], &meta);
    +      rc = sqlite3BtreeUpdateMeta(pTemp, aCopy[i], meta+aCopy[i+1]);
    +      if( NEVER(rc!=SQLITE_OK) ) goto end_of_vacuum;
    +    }
    +
    +    rc = sqlite3BtreeCopyFile(pMain, pTemp);
    +    if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +    rc = sqlite3BtreeCommit(pTemp);
    +    if( rc!=SQLITE_OK ) goto end_of_vacuum;
    +#ifndef SQLITE_OMIT_AUTOVACUUM
    +    sqlite3BtreeSetAutoVacuum(pMain, sqlite3BtreeGetAutoVacuum(pTemp));
    +#endif
    +  }
    +
    +  assert( rc==SQLITE_OK );
    +  rc = sqlite3BtreeSetPageSize(pMain, sqlite3BtreeGetPageSize(pTemp), nRes,1);
    +
    +end_of_vacuum:
    +  /* Restore the original value of db->flags */
    +  db->flags = saved_flags;
    +  db->nChange = saved_nChange;
    +  db->nTotalChange = saved_nTotalChange;
    +
    +  /* Currently there is an SQL level transaction open on the vacuum
    +  ** database. No locks are held on any other files (since the main file
    +  ** was committed at the btree level). So it safe to end the transaction
    +  ** by manually setting the autoCommit flag to true and detaching the
    +  ** vacuum database. The vacuum_db journal file is deleted when the pager
    +  ** is closed by the DETACH.
    +  */
    +  db->autoCommit = 1;
    +
    +  if( pDb ){
    +    sqlite3BtreeClose(pDb->pBt);
    +    pDb->pBt = 0;
    +    pDb->pSchema = 0;
    +  }
    +
    +  sqlite3ResetInternalSchema(db, 0);
    +
    +  return rc;
    +}
    +#endif  /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
    +
    +/************** End of vacuum.c **********************************************/
    +/************** Begin file vtab.c ********************************************/
    +/*
    +** 2006 June 10
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code used to help implement virtual tables.
    +**
    +** $Id: vtab.c,v 1.94 2009/08/08 18:01:08 drh Exp $
    +*/
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +
    +/*
    +** The actual function that does the work of creating a new module.
    +** This function implements the sqlite3_create_module() and
    +** sqlite3_create_module_v2() interfaces.
    +*/
    +static int createModule(
    +  sqlite3 *db,                    /* Database in which module is registered */
    +  const char *zName,              /* Name assigned to this module */
    +  const sqlite3_module *pModule,  /* The definition of the module */
    +  void *pAux,                     /* Context pointer for xCreate/xConnect */
    +  void (*xDestroy)(void *)        /* Module destructor function */
    +){
    +  int rc, nName;
    +  Module *pMod;
    +
    +  sqlite3_mutex_enter(db->mutex);
    +  nName = sqlite3Strlen30(zName);
    +  pMod = (Module *)sqlite3DbMallocRaw(db, sizeof(Module) + nName + 1);
    +  if( pMod ){
    +    Module *pDel;
    +    char *zCopy = (char *)(&pMod[1]);
    +    memcpy(zCopy, zName, nName+1);
    +    pMod->zName = zCopy;
    +    pMod->pModule = pModule;
    +    pMod->pAux = pAux;
    +    pMod->xDestroy = xDestroy;
    +    pDel = (Module *)sqlite3HashInsert(&db->aModule, zCopy, nName, (void*)pMod);
    +    if( pDel && pDel->xDestroy ){
    +      pDel->xDestroy(pDel->pAux);
    +    }
    +    sqlite3DbFree(db, pDel);
    +    if( pDel==pMod ){
    +      db->mallocFailed = 1;
    +    }
    +    sqlite3ResetInternalSchema(db, 0);
    +  }else if( xDestroy ){
    +    xDestroy(pAux);
    +  }
    +  rc = sqlite3ApiExit(db, SQLITE_OK);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +
    +/*
    +** External API function used to create a new virtual-table module.
    +*/
    +SQLITE_API int sqlite3_create_module(
    +  sqlite3 *db,                    /* Database in which module is registered */
    +  const char *zName,              /* Name assigned to this module */
    +  const sqlite3_module *pModule,  /* The definition of the module */
    +  void *pAux                      /* Context pointer for xCreate/xConnect */
    +){
    +  return createModule(db, zName, pModule, pAux, 0);
    +}
    +
    +/*
    +** External API function used to create a new virtual-table module.
    +*/
    +SQLITE_API int sqlite3_create_module_v2(
    +  sqlite3 *db,                    /* Database in which module is registered */
    +  const char *zName,              /* Name assigned to this module */
    +  const sqlite3_module *pModule,  /* The definition of the module */
    +  void *pAux,                     /* Context pointer for xCreate/xConnect */
    +  void (*xDestroy)(void *)        /* Module destructor function */
    +){
    +  return createModule(db, zName, pModule, pAux, xDestroy);
    +}
    +
    +/*
    +** Lock the virtual table so that it cannot be disconnected.
    +** Locks nest.  Every lock should have a corresponding unlock.
    +** If an unlock is omitted, resources leaks will occur.  
    +**
    +** If a disconnect is attempted while a virtual table is locked,
    +** the disconnect is deferred until all locks have been removed.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabLock(VTable *pVTab){
    +  pVTab->nRef++;
    +}
    +
    +
    +/*
    +** pTab is a pointer to a Table structure representing a virtual-table.
    +** Return a pointer to the VTable object used by connection db to access 
    +** this virtual-table, if one has been created, or NULL otherwise.
    +*/
    +SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
    +  VTable *pVtab;
    +  assert( IsVirtual(pTab) );
    +  for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
    +  return pVtab;
    +}
    +
    +/*
    +** Decrement the ref-count on a virtual table object. When the ref-count
    +** reaches zero, call the xDisconnect() method to delete the object.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
    +  sqlite3 *db = pVTab->db;
    +
    +  assert( db );
    +  assert( pVTab->nRef>0 );
    +  assert( sqlite3SafetyCheckOk(db) );
    +
    +  pVTab->nRef--;
    +  if( pVTab->nRef==0 ){
    +    sqlite3_vtab *p = pVTab->pVtab;
    +    if( p ){
    +#ifdef SQLITE_DEBUG
    +      if( pVTab->db->magic==SQLITE_MAGIC_BUSY ){
    +        (void)sqlite3SafetyOff(db);
    +        p->pModule->xDisconnect(p);
    +        (void)sqlite3SafetyOn(db);
    +      } else
    +#endif
    +      {
    +        p->pModule->xDisconnect(p);
    +      }
    +    }
    +    sqlite3DbFree(db, pVTab);
    +  }
    +}
    +
    +/*
    +** Table p is a virtual table. This function moves all elements in the
    +** p->pVTable list to the sqlite3.pDisconnect lists of their associated
    +** database connections to be disconnected at the next opportunity. 
    +** Except, if argument db is not NULL, then the entry associated with
    +** connection db is left in the p->pVTable list.
    +*/
    +static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
    +  VTable *pRet = 0;
    +  VTable *pVTable = p->pVTable;
    +  p->pVTable = 0;
    +
    +  /* Assert that the mutex (if any) associated with the BtShared database 
    +  ** that contains table p is held by the caller. See header comments 
    +  ** above function sqlite3VtabUnlockList() for an explanation of why
    +  ** this makes it safe to access the sqlite3.pDisconnect list of any
    +  ** database connection that may have an entry in the p->pVTable list.  */
    +  assert( db==0 ||
    +    sqlite3BtreeHoldsMutex(db->aDb[sqlite3SchemaToIndex(db, p->pSchema)].pBt) 
    +  );
    +
    +  while( pVTable ){
    +    sqlite3 *db2 = pVTable->db;
    +    VTable *pNext = pVTable->pNext;
    +    assert( db2 );
    +    if( db2==db ){
    +      pRet = pVTable;
    +      p->pVTable = pRet;
    +      pRet->pNext = 0;
    +    }else{
    +      pVTable->pNext = db2->pDisconnect;
    +      db2->pDisconnect = pVTable;
    +    }
    +    pVTable = pNext;
    +  }
    +
    +  assert( !db || pRet );
    +  return pRet;
    +}
    +
    +
    +/*
    +** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
    +**
    +** This function may only be called when the mutexes associated with all
    +** shared b-tree databases opened using connection db are held by the 
    +** caller. This is done to protect the sqlite3.pDisconnect list. The
    +** sqlite3.pDisconnect list is accessed only as follows:
    +**
    +**   1) By this function. In this case, all BtShared mutexes and the mutex
    +**      associated with the database handle itself must be held.
    +**
    +**   2) By function vtabDisconnectAll(), when it adds a VTable entry to
    +**      the sqlite3.pDisconnect list. In this case either the BtShared mutex
    +**      associated with the database the virtual table is stored in is held
    +**      or, if the virtual table is stored in a non-sharable database, then
    +**      the database handle mutex is held.
    +**
    +** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously 
    +** by multiple threads. It is thread-safe.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
    +  VTable *p = db->pDisconnect;
    +  db->pDisconnect = 0;
    +
    +  assert( sqlite3BtreeHoldsAllMutexes(db) );
    +  assert( sqlite3_mutex_held(db->mutex) );
    +
    +  if( p ){
    +    sqlite3ExpirePreparedStatements(db);
    +    do {
    +      VTable *pNext = p->pNext;
    +      sqlite3VtabUnlock(p);
    +      p = pNext;
    +    }while( p );
    +  }
    +}
    +
    +/*
    +** Clear any and all virtual-table information from the Table record.
    +** This routine is called, for example, just before deleting the Table
    +** record.
    +**
    +** Since it is a virtual-table, the Table structure contains a pointer
    +** to the head of a linked list of VTable structures. Each VTable 
    +** structure is associated with a single sqlite3* user of the schema.
    +** The reference count of the VTable structure associated with database 
    +** connection db is decremented immediately (which may lead to the 
    +** structure being xDisconnected and free). Any other VTable structures
    +** in the list are moved to the sqlite3.pDisconnect list of the associated 
    +** database connection.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabClear(Table *p){
    +  vtabDisconnectAll(0, p);
    +  if( p->azModuleArg ){
    +    int i;
    +    for(i=0; i<p->nModuleArg; i++){
    +      sqlite3DbFree(p->dbMem, p->azModuleArg[i]);
    +    }
    +    sqlite3DbFree(p->dbMem, p->azModuleArg);
    +  }
    +}
    +
    +/*
    +** Add a new module argument to pTable->azModuleArg[].
    +** The string is not copied - the pointer is stored.  The
    +** string will be freed automatically when the table is
    +** deleted.
    +*/
    +static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
    +  int i = pTable->nModuleArg++;
    +  int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
    +  char **azModuleArg;
    +  azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
    +  if( azModuleArg==0 ){
    +    int j;
    +    for(j=0; j<i; j++){
    +      sqlite3DbFree(db, pTable->azModuleArg[j]);
    +    }
    +    sqlite3DbFree(db, zArg);
    +    sqlite3DbFree(db, pTable->azModuleArg);
    +    pTable->nModuleArg = 0;
    +  }else{
    +    azModuleArg[i] = zArg;
    +    azModuleArg[i+1] = 0;
    +  }
    +  pTable->azModuleArg = azModuleArg;
    +}
    +
    +/*
    +** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
    +** statement.  The module name has been parsed, but the optional list
    +** of parameters that follow the module name are still pending.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabBeginParse(
    +  Parse *pParse,        /* Parsing context */
    +  Token *pName1,        /* Name of new table, or database name */
    +  Token *pName2,        /* Name of new table or NULL */
    +  Token *pModuleName    /* Name of the module for the virtual table */
    +){
    +  int iDb;              /* The database the table is being created in */
    +  Table *pTable;        /* The new virtual table */
    +  sqlite3 *db;          /* Database connection */
    +
    +  sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, 0);
    +  pTable = pParse->pNewTable;
    +  if( pTable==0 ) return;
    +  assert( 0==pTable->pIndex );
    +
    +  db = pParse->db;
    +  iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
    +  assert( iDb>=0 );
    +
    +  pTable->tabFlags |= TF_Virtual;
    +  pTable->nModuleArg = 0;
    +  addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
    +  addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
    +  addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
    +  pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);
    +
    +#ifndef SQLITE_OMIT_AUTHORIZATION
    +  /* Creating a virtual table invokes the authorization callback twice.
    +  ** The first invocation, to obtain permission to INSERT a row into the
    +  ** sqlite_master table, has already been made by sqlite3StartTable().
    +  ** The second call, to obtain permission to create the table, is made now.
    +  */
    +  if( pTable->azModuleArg ){
    +    sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName, 
    +            pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
    +  }
    +#endif
    +}
    +
    +/*
    +** This routine takes the module argument that has been accumulating
    +** in pParse->zArg[] and appends it to the list of arguments on the
    +** virtual table currently under construction in pParse->pTable.
    +*/
    +static void addArgumentToVtab(Parse *pParse){
    +  if( pParse->sArg.z && ALWAYS(pParse->pNewTable) ){
    +    const char *z = (const char*)pParse->sArg.z;
    +    int n = pParse->sArg.n;
    +    sqlite3 *db = pParse->db;
    +    addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));
    +  }
    +}
    +
    +/*
    +** The parser calls this routine after the CREATE VIRTUAL TABLE statement
    +** has been completely parsed.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
    +  Table *pTab = pParse->pNewTable;  /* The table being constructed */
    +  sqlite3 *db = pParse->db;         /* The database connection */
    +
    +  if( pTab==0 ) return;
    +  addArgumentToVtab(pParse);
    +  pParse->sArg.z = 0;
    +  if( pTab->nModuleArg<1 ) return;
    +  
    +  /* If the CREATE VIRTUAL TABLE statement is being entered for the
    +  ** first time (in other words if the virtual table is actually being
    +  ** created now instead of just being read out of sqlite_master) then
    +  ** do additional initialization work and store the statement text
    +  ** in the sqlite_master table.
    +  */
    +  if( !db->init.busy ){
    +    char *zStmt;
    +    char *zWhere;
    +    int iDb;
    +    Vdbe *v;
    +
    +    /* Compute the complete text of the CREATE VIRTUAL TABLE statement */
    +    if( pEnd ){
    +      pParse->sNameToken.n = (int)(pEnd->z - pParse->sNameToken.z) + pEnd->n;
    +    }
    +    zStmt = sqlite3MPrintf(db, "CREATE VIRTUAL TABLE %T", &pParse->sNameToken);
    +
    +    /* A slot for the record has already been allocated in the 
    +    ** SQLITE_MASTER table.  We just need to update that slot with all
    +    ** the information we've collected.  
    +    **
    +    ** The VM register number pParse->regRowid holds the rowid of an
    +    ** entry in the sqlite_master table tht was created for this vtab
    +    ** by sqlite3StartTable().
    +    */
    +    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +    sqlite3NestedParse(pParse,
    +      "UPDATE %Q.%s "
    +         "SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q "
    +       "WHERE rowid=#%d",
    +      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
    +      pTab->zName,
    +      pTab->zName,
    +      zStmt,
    +      pParse->regRowid
    +    );
    +    sqlite3DbFree(db, zStmt);
    +    v = sqlite3GetVdbe(pParse);
    +    sqlite3ChangeCookie(pParse, iDb);
    +
    +    sqlite3VdbeAddOp2(v, OP_Expire, 0, 0);
    +    zWhere = sqlite3MPrintf(db, "name='%q'", pTab->zName);
    +    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 1, 0, zWhere, P4_DYNAMIC);
    +    sqlite3VdbeAddOp4(v, OP_VCreate, iDb, 0, 0, 
    +                         pTab->zName, sqlite3Strlen30(pTab->zName) + 1);
    +  }
    +
    +  /* If we are rereading the sqlite_master table create the in-memory
    +  ** record of the table. The xConnect() method is not called until
    +  ** the first time the virtual table is used in an SQL statement. This
    +  ** allows a schema that contains virtual tables to be loaded before
    +  ** the required virtual table implementations are registered.  */
    +  else {
    +    Table *pOld;
    +    Schema *pSchema = pTab->pSchema;
    +    const char *zName = pTab->zName;
    +    int nName = sqlite3Strlen30(zName);
    +    pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);
    +    if( pOld ){
    +      db->mallocFailed = 1;
    +      assert( pTab==pOld );  /* Malloc must have failed inside HashInsert() */
    +      return;
    +    }
    +    pSchema->db = pParse->db;
    +    pParse->pNewTable = 0;
    +  }
    +}
    +
    +/*
    +** The parser calls this routine when it sees the first token
    +** of an argument to the module name in a CREATE VIRTUAL TABLE statement.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabArgInit(Parse *pParse){
    +  addArgumentToVtab(pParse);
    +  pParse->sArg.z = 0;
    +  pParse->sArg.n = 0;
    +}
    +
    +/*
    +** The parser calls this routine for each token after the first token
    +** in an argument to the module name in a CREATE VIRTUAL TABLE statement.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabArgExtend(Parse *pParse, Token *p){
    +  Token *pArg = &pParse->sArg;
    +  if( pArg->z==0 ){
    +    pArg->z = p->z;
    +    pArg->n = p->n;
    +  }else{
    +    assert(pArg->z < p->z);
    +    pArg->n = (int)(&p->z[p->n] - pArg->z);
    +  }
    +}
    +
    +/*
    +** Invoke a virtual table constructor (either xCreate or xConnect). The
    +** pointer to the function to invoke is passed as the fourth parameter
    +** to this procedure.
    +*/
    +static int vtabCallConstructor(
    +  sqlite3 *db, 
    +  Table *pTab,
    +  Module *pMod,
    +  int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
    +  char **pzErr
    +){
    +  VTable *pVTable;
    +  int rc;
    +  const char *const*azArg = (const char *const*)pTab->azModuleArg;
    +  int nArg = pTab->nModuleArg;
    +  char *zErr = 0;
    +  char *zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
    +
    +  if( !zModuleName ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  pVTable = sqlite3DbMallocZero(db, sizeof(VTable));
    +  if( !pVTable ){
    +    sqlite3DbFree(db, zModuleName);
    +    return SQLITE_NOMEM;
    +  }
    +  pVTable->db = db;
    +  pVTable->pMod = pMod;
    +
    +  assert( !db->pVTab );
    +  assert( xConstruct );
    +  db->pVTab = pTab;
    +
    +  /* Invoke the virtual table constructor */
    +  (void)sqlite3SafetyOff(db);
    +  rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
    +  (void)sqlite3SafetyOn(db);
    +  if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
    +
    +  if( SQLITE_OK!=rc ){
    +    if( zErr==0 ){
    +      *pzErr = sqlite3MPrintf(db, "vtable constructor failed: %s", zModuleName);
    +    }else {
    +      *pzErr = sqlite3MPrintf(db, "%s", zErr);
    +      sqlite3DbFree(db, zErr);
    +    }
    +    sqlite3DbFree(db, pVTable);
    +  }else if( ALWAYS(pVTable->pVtab) ){
    +    /* Justification of ALWAYS():  A correct vtab constructor must allocate
    +    ** the sqlite3_vtab object if successful.  */
    +    pVTable->pVtab->pModule = pMod->pModule;
    +    pVTable->nRef = 1;
    +    if( db->pVTab ){
    +      const char *zFormat = "vtable constructor did not declare schema: %s";
    +      *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);
    +      sqlite3VtabUnlock(pVTable);
    +      rc = SQLITE_ERROR;
    +    }else{
    +      int iCol;
    +      /* If everything went according to plan, link the new VTable structure
    +      ** into the linked list headed by pTab->pVTable. Then loop through the 
    +      ** columns of the table to see if any of them contain the token "hidden".
    +      ** If so, set the Column.isHidden flag and remove the token from
    +      ** the type string.  */
    +      pVTable->pNext = pTab->pVTable;
    +      pTab->pVTable = pVTable;
    +
    +      for(iCol=0; iCol<pTab->nCol; iCol++){
    +        char *zType = pTab->aCol[iCol].zType;
    +        int nType;
    +        int i = 0;
    +        if( !zType ) continue;
    +        nType = sqlite3Strlen30(zType);
    +        if( sqlite3StrNICmp("hidden", zType, 6)||(zType[6] && zType[6]!=' ') ){
    +          for(i=0; i<nType; i++){
    +            if( (0==sqlite3StrNICmp(" hidden", &zType[i], 7))
    +             && (zType[i+7]=='\0' || zType[i+7]==' ')
    +            ){
    +              i++;
    +              break;
    +            }
    +          }
    +        }
    +        if( i<nType ){
    +          int j;
    +          int nDel = 6 + (zType[i+6] ? 1 : 0);
    +          for(j=i; (j+nDel)<=nType; j++){
    +            zType[j] = zType[j+nDel];
    +          }
    +          if( zType[i]=='\0' && i>0 ){
    +            assert(zType[i-1]==' ');
    +            zType[i-1] = '\0';
    +          }
    +          pTab->aCol[iCol].isHidden = 1;
    +        }
    +      }
    +    }
    +  }
    +
    +  sqlite3DbFree(db, zModuleName);
    +  db->pVTab = 0;
    +  return rc;
    +}
    +
    +/*
    +** This function is invoked by the parser to call the xConnect() method
    +** of the virtual table pTab. If an error occurs, an error code is returned 
    +** and an error left in pParse.
    +**
    +** This call is a no-op if table pTab is not a virtual table.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabCallConnect(Parse *pParse, Table *pTab){
    +  sqlite3 *db = pParse->db;
    +  const char *zMod;
    +  Module *pMod;
    +  int rc;
    +
    +  assert( pTab );
    +  if( (pTab->tabFlags & TF_Virtual)==0 || sqlite3GetVTable(db, pTab) ){
    +    return SQLITE_OK;
    +  }
    +
    +  /* Locate the required virtual table module */
    +  zMod = pTab->azModuleArg[0];
    +  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));
    +
    +  if( !pMod ){
    +    const char *zModule = pTab->azModuleArg[0];
    +    sqlite3ErrorMsg(pParse, "no such module: %s", zModule);
    +    rc = SQLITE_ERROR;
    +  }else{
    +    char *zErr = 0;
    +    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);
    +    if( rc!=SQLITE_OK ){
    +      sqlite3ErrorMsg(pParse, "%s", zErr);
    +    }
    +    sqlite3DbFree(db, zErr);
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Add the virtual table pVTab to the array sqlite3.aVTrans[].
    +*/
    +static int addToVTrans(sqlite3 *db, VTable *pVTab){
    +  const int ARRAY_INCR = 5;
    +
    +  /* Grow the sqlite3.aVTrans array if required */
    +  if( (db->nVTrans%ARRAY_INCR)==0 ){
    +    VTable **aVTrans;
    +    int nBytes = sizeof(sqlite3_vtab *) * (db->nVTrans + ARRAY_INCR);
    +    aVTrans = sqlite3DbRealloc(db, (void *)db->aVTrans, nBytes);
    +    if( !aVTrans ){
    +      return SQLITE_NOMEM;
    +    }
    +    memset(&aVTrans[db->nVTrans], 0, sizeof(sqlite3_vtab *)*ARRAY_INCR);
    +    db->aVTrans = aVTrans;
    +  }
    +
    +  /* Add pVtab to the end of sqlite3.aVTrans */
    +  db->aVTrans[db->nVTrans++] = pVTab;
    +  sqlite3VtabLock(pVTab);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This function is invoked by the vdbe to call the xCreate method
    +** of the virtual table named zTab in database iDb. 
    +**
    +** If an error occurs, *pzErr is set to point an an English language
    +** description of the error and an SQLITE_XXX error code is returned.
    +** In this case the caller must call sqlite3DbFree(db, ) on *pzErr.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
    +  int rc = SQLITE_OK;
    +  Table *pTab;
    +  Module *pMod;
    +  const char *zMod;
    +
    +  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
    +  assert( pTab && (pTab->tabFlags & TF_Virtual)!=0 && !pTab->pVTable );
    +
    +  /* Locate the required virtual table module */
    +  zMod = pTab->azModuleArg[0];
    +  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));
    +
    +  /* If the module has been registered and includes a Create method, 
    +  ** invoke it now. If the module has not been registered, return an 
    +  ** error. Otherwise, do nothing.
    +  */
    +  if( !pMod ){
    +    *pzErr = sqlite3MPrintf(db, "no such module: %s", zMod);
    +    rc = SQLITE_ERROR;
    +  }else{
    +    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xCreate, pzErr);
    +  }
    +
    +  /* Justification of ALWAYS():  The xConstructor method is required to
    +  ** create a valid sqlite3_vtab if it returns SQLITE_OK. */
    +  if( rc==SQLITE_OK && ALWAYS(sqlite3GetVTable(db, pTab)) ){
    +      rc = addToVTrans(db, sqlite3GetVTable(db, pTab));
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** This function is used to set the schema of a virtual table.  It is only
    +** valid to call this function from within the xCreate() or xConnect() of a
    +** virtual table module.
    +*/
    +SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
    +  Parse *pParse;
    +
    +  int rc = SQLITE_OK;
    +  Table *pTab;
    +  char *zErr = 0;
    +
    +  sqlite3_mutex_enter(db->mutex);
    +  pTab = db->pVTab;
    +  if( !pTab ){
    +    sqlite3Error(db, SQLITE_MISUSE, 0);
    +    sqlite3_mutex_leave(db->mutex);
    +    return SQLITE_MISUSE;
    +  }
    +  assert( (pTab->tabFlags & TF_Virtual)!=0 );
    +
    +  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
    +  if( pParse==0 ){
    +    rc = SQLITE_NOMEM;
    +  }else{
    +    pParse->declareVtab = 1;
    +    pParse->db = db;
    +  
    +    if( 
    +        SQLITE_OK == sqlite3RunParser(pParse, zCreateTable, &zErr) && 
    +        pParse->pNewTable && 
    +        !pParse->pNewTable->pSelect && 
    +        (pParse->pNewTable->tabFlags & TF_Virtual)==0
    +    ){
    +      if( !pTab->aCol ){
    +        pTab->aCol = pParse->pNewTable->aCol;
    +        pTab->nCol = pParse->pNewTable->nCol;
    +        pParse->pNewTable->nCol = 0;
    +        pParse->pNewTable->aCol = 0;
    +      }
    +      db->pVTab = 0;
    +    } else {
    +      sqlite3Error(db, SQLITE_ERROR, zErr);
    +      sqlite3DbFree(db, zErr);
    +      rc = SQLITE_ERROR;
    +    }
    +    pParse->declareVtab = 0;
    +  
    +    if( pParse->pVdbe ){
    +      sqlite3VdbeFinalize(pParse->pVdbe);
    +    }
    +    sqlite3DeleteTable(pParse->pNewTable);
    +    sqlite3StackFree(db, pParse);
    +  }
    +
    +  assert( (rc&0xff)==rc );
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** This function is invoked by the vdbe to call the xDestroy method
    +** of the virtual table named zTab in database iDb. This occurs
    +** when a DROP TABLE is mentioned.
    +**
    +** This call is a no-op if zTab is not a virtual table.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
    +  int rc = SQLITE_OK;
    +  Table *pTab;
    +
    +  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
    +  if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
    +    VTable *p = vtabDisconnectAll(db, pTab);
    +
    +    rc = sqlite3SafetyOff(db);
    +    assert( rc==SQLITE_OK );
    +    rc = p->pMod->pModule->xDestroy(p->pVtab);
    +    (void)sqlite3SafetyOn(db);
    +
    +    /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */
    +    if( rc==SQLITE_OK ){
    +      assert( pTab->pVTable==p && p->pNext==0 );
    +      p->pVtab = 0;
    +      pTab->pVTable = 0;
    +      sqlite3VtabUnlock(p);
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** This function invokes either the xRollback or xCommit method
    +** of each of the virtual tables in the sqlite3.aVTrans array. The method
    +** called is identified by the second argument, "offset", which is
    +** the offset of the method to call in the sqlite3_module structure.
    +**
    +** The array is cleared after invoking the callbacks. 
    +*/
    +static void callFinaliser(sqlite3 *db, int offset){
    +  int i;
    +  if( db->aVTrans ){
    +    for(i=0; i<db->nVTrans; i++){
    +      VTable *pVTab = db->aVTrans[i];
    +      sqlite3_vtab *p = pVTab->pVtab;
    +      if( p ){
    +        int (*x)(sqlite3_vtab *);
    +        x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);
    +        if( x ) x(p);
    +      }
    +      sqlite3VtabUnlock(pVTab);
    +    }
    +    sqlite3DbFree(db, db->aVTrans);
    +    db->nVTrans = 0;
    +    db->aVTrans = 0;
    +  }
    +}
    +
    +/*
    +** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
    +** array. Return the error code for the first error that occurs, or
    +** SQLITE_OK if all xSync operations are successful.
    +**
    +** Set *pzErrmsg to point to a buffer that should be released using 
    +** sqlite3DbFree() containing an error message, if one is available.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){
    +  int i;
    +  int rc = SQLITE_OK;
    +  int rcsafety;
    +  VTable **aVTrans = db->aVTrans;
    +
    +  rc = sqlite3SafetyOff(db);
    +  db->aVTrans = 0;
    +  for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){
    +    int (*x)(sqlite3_vtab *);
    +    sqlite3_vtab *pVtab = aVTrans[i]->pVtab;
    +    if( pVtab && (x = pVtab->pModule->xSync)!=0 ){
    +      rc = x(pVtab);
    +      sqlite3DbFree(db, *pzErrmsg);
    +      *pzErrmsg = pVtab->zErrMsg;
    +      pVtab->zErrMsg = 0;
    +    }
    +  }
    +  db->aVTrans = aVTrans;
    +  rcsafety = sqlite3SafetyOn(db);
    +
    +  if( rc==SQLITE_OK ){
    +    rc = rcsafety;
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Invoke the xRollback method of all virtual tables in the 
    +** sqlite3.aVTrans array. Then clear the array itself.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){
    +  callFinaliser(db, offsetof(sqlite3_module,xRollback));
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Invoke the xCommit method of all virtual tables in the 
    +** sqlite3.aVTrans array. Then clear the array itself.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){
    +  callFinaliser(db, offsetof(sqlite3_module,xCommit));
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** If the virtual table pVtab supports the transaction interface
    +** (xBegin/xRollback/xCommit and optionally xSync) and a transaction is
    +** not currently open, invoke the xBegin method now.
    +**
    +** If the xBegin call is successful, place the sqlite3_vtab pointer
    +** in the sqlite3.aVTrans array.
    +*/
    +SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
    +  int rc = SQLITE_OK;
    +  const sqlite3_module *pModule;
    +
    +  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater
    +  ** than zero, then this function is being called from within a
    +  ** virtual module xSync() callback. It is illegal to write to 
    +  ** virtual module tables in this case, so return SQLITE_LOCKED.
    +  */
    +  if( sqlite3VtabInSync(db) ){
    +    return SQLITE_LOCKED;
    +  }
    +  if( !pVTab ){
    +    return SQLITE_OK;
    +  } 
    +  pModule = pVTab->pVtab->pModule;
    +
    +  if( pModule->xBegin ){
    +    int i;
    +
    +
    +    /* If pVtab is already in the aVTrans array, return early */
    +    for(i=0; i<db->nVTrans; i++){
    +      if( db->aVTrans[i]==pVTab ){
    +        return SQLITE_OK;
    +      }
    +    }
    +
    +    /* Invoke the xBegin method */
    +    rc = pModule->xBegin(pVTab->pVtab);
    +    if( rc==SQLITE_OK ){
    +      rc = addToVTrans(db, pVTab);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** The first parameter (pDef) is a function implementation.  The
    +** second parameter (pExpr) is the first argument to this function.
    +** If pExpr is a column in a virtual table, then let the virtual
    +** table implementation have an opportunity to overload the function.
    +**
    +** This routine is used to allow virtual table implementations to
    +** overload MATCH, LIKE, GLOB, and REGEXP operators.
    +**
    +** Return either the pDef argument (indicating no change) or a 
    +** new FuncDef structure that is marked as ephemeral using the
    +** SQLITE_FUNC_EPHEM flag.
    +*/
    +SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(
    +  sqlite3 *db,    /* Database connection for reporting malloc problems */
    +  FuncDef *pDef,  /* Function to possibly overload */
    +  int nArg,       /* Number of arguments to the function */
    +  Expr *pExpr     /* First argument to the function */
    +){
    +  Table *pTab;
    +  sqlite3_vtab *pVtab;
    +  sqlite3_module *pMod;
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**) = 0;
    +  void *pArg = 0;
    +  FuncDef *pNew;
    +  int rc = 0;
    +  char *zLowerName;
    +  unsigned char *z;
    +
    +
    +  /* Check to see the left operand is a column in a virtual table */
    +  if( NEVER(pExpr==0) ) return pDef;
    +  if( pExpr->op!=TK_COLUMN ) return pDef;
    +  pTab = pExpr->pTab;
    +  if( NEVER(pTab==0) ) return pDef;
    +  if( (pTab->tabFlags & TF_Virtual)==0 ) return pDef;
    +  pVtab = sqlite3GetVTable(db, pTab)->pVtab;
    +  assert( pVtab!=0 );
    +  assert( pVtab->pModule!=0 );
    +  pMod = (sqlite3_module *)pVtab->pModule;
    +  if( pMod->xFindFunction==0 ) return pDef;
    + 
    +  /* Call the xFindFunction method on the virtual table implementation
    +  ** to see if the implementation wants to overload this function 
    +  */
    +  zLowerName = sqlite3DbStrDup(db, pDef->zName);
    +  if( zLowerName ){
    +    for(z=(unsigned char*)zLowerName; *z; z++){
    +      *z = sqlite3UpperToLower[*z];
    +    }
    +    rc = pMod->xFindFunction(pVtab, nArg, zLowerName, &xFunc, &pArg);
    +    sqlite3DbFree(db, zLowerName);
    +  }
    +  if( rc==0 ){
    +    return pDef;
    +  }
    +
    +  /* Create a new ephemeral function definition for the overloaded
    +  ** function */
    +  pNew = sqlite3DbMallocZero(db, sizeof(*pNew)
    +                             + sqlite3Strlen30(pDef->zName) + 1);
    +  if( pNew==0 ){
    +    return pDef;
    +  }
    +  *pNew = *pDef;
    +  pNew->zName = (char *)&pNew[1];
    +  memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
    +  pNew->xFunc = xFunc;
    +  pNew->pUserData = pArg;
    +  pNew->flags |= SQLITE_FUNC_EPHEM;
    +  return pNew;
    +}
    +
    +/*
    +** Make sure virtual table pTab is contained in the pParse->apVirtualLock[]
    +** array so that an OP_VBegin will get generated for it.  Add pTab to the
    +** array if it is missing.  If pTab is already in the array, this routine
    +** is a no-op.
    +*/
    +SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){
    +  Parse *pToplevel = sqlite3ParseToplevel(pParse);
    +  int i, n;
    +  Table **apVtabLock;
    +
    +  assert( IsVirtual(pTab) );
    +  for(i=0; i<pToplevel->nVtabLock; i++){
    +    if( pTab==pToplevel->apVtabLock[i] ) return;
    +  }
    +  n = (pToplevel->nVtabLock+1)*sizeof(pToplevel->apVtabLock[0]);
    +  apVtabLock = sqlite3_realloc(pToplevel->apVtabLock, n);
    +  if( apVtabLock ){
    +    pToplevel->apVtabLock = apVtabLock;
    +    pToplevel->apVtabLock[pToplevel->nVtabLock++] = pTab;
    +  }else{
    +    pToplevel->db->mallocFailed = 1;
    +  }
    +}
    +
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +/************** End of vtab.c ************************************************/
    +/************** Begin file where.c *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This module contains C code that generates VDBE code used to process
    +** the WHERE clause of SQL statements.  This module is responsible for
    +** generating the code that loops through a table looking for applicable
    +** rows.  Indices are selected and used to speed the search when doing
    +** so is applicable.  Because this module is responsible for selecting
    +** indices, you might also think of this module as the "query optimizer".
    +**
    +** $Id: where.c,v 1.411 2009/07/31 06:14:52 danielk1977 Exp $
    +*/
    +
    +/*
    +** Trace output macros
    +*/
    +#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
    +SQLITE_PRIVATE int sqlite3WhereTrace = 0;
    +#endif
    +#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
    +# define WHERETRACE(X)  if(sqlite3WhereTrace) sqlite3DebugPrintf X
    +#else
    +# define WHERETRACE(X)
    +#endif
    +
    +/* Forward reference
    +*/
    +typedef struct WhereClause WhereClause;
    +typedef struct WhereMaskSet WhereMaskSet;
    +typedef struct WhereOrInfo WhereOrInfo;
    +typedef struct WhereAndInfo WhereAndInfo;
    +typedef struct WhereCost WhereCost;
    +
    +/*
    +** The query generator uses an array of instances of this structure to
    +** help it analyze the subexpressions of the WHERE clause.  Each WHERE
    +** clause subexpression is separated from the others by AND operators,
    +** usually, or sometimes subexpressions separated by OR.
    +**
    +** All WhereTerms are collected into a single WhereClause structure.  
    +** The following identity holds:
    +**
    +**        WhereTerm.pWC->a[WhereTerm.idx] == WhereTerm
    +**
    +** When a term is of the form:
    +**
    +**              X <op> <expr>
    +**
    +** where X is a column name and <op> is one of certain operators,
    +** then WhereTerm.leftCursor and WhereTerm.u.leftColumn record the
    +** cursor number and column number for X.  WhereTerm.eOperator records
    +** the <op> using a bitmask encoding defined by WO_xxx below.  The
    +** use of a bitmask encoding for the operator allows us to search
    +** quickly for terms that match any of several different operators.
    +**
    +** A WhereTerm might also be two or more subterms connected by OR:
    +**
    +**         (t1.X <op> <expr>) OR (t1.Y <op> <expr>) OR ....
    +**
    +** In this second case, wtFlag as the TERM_ORINFO set and eOperator==WO_OR
    +** and the WhereTerm.u.pOrInfo field points to auxiliary information that
    +** is collected about the
    +**
    +** If a term in the WHERE clause does not match either of the two previous
    +** categories, then eOperator==0.  The WhereTerm.pExpr field is still set
    +** to the original subexpression content and wtFlags is set up appropriately
    +** but no other fields in the WhereTerm object are meaningful.
    +**
    +** When eOperator!=0, prereqRight and prereqAll record sets of cursor numbers,
    +** but they do so indirectly.  A single WhereMaskSet structure translates
    +** cursor number into bits and the translated bit is stored in the prereq
    +** fields.  The translation is used in order to maximize the number of
    +** bits that will fit in a Bitmask.  The VDBE cursor numbers might be
    +** spread out over the non-negative integers.  For example, the cursor
    +** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45.  The WhereMaskSet
    +** translates these sparse cursor numbers into consecutive integers
    +** beginning with 0 in order to make the best possible use of the available
    +** bits in the Bitmask.  So, in the example above, the cursor numbers
    +** would be mapped into integers 0 through 7.
    +**
    +** The number of terms in a join is limited by the number of bits
    +** in prereqRight and prereqAll.  The default is 64 bits, hence SQLite
    +** is only able to process joins with 64 or fewer tables.
    +*/
    +typedef struct WhereTerm WhereTerm;
    +struct WhereTerm {
    +  Expr *pExpr;            /* Pointer to the subexpression that is this term */
    +  int iParent;            /* Disable pWC->a[iParent] when this term disabled */
    +  int leftCursor;         /* Cursor number of X in "X <op> <expr>" */
    +  union {
    +    int leftColumn;         /* Column number of X in "X <op> <expr>" */
    +    WhereOrInfo *pOrInfo;   /* Extra information if eOperator==WO_OR */
    +    WhereAndInfo *pAndInfo; /* Extra information if eOperator==WO_AND */
    +  } u;
    +  u16 eOperator;          /* A WO_xx value describing <op> */
    +  u8 wtFlags;             /* TERM_xxx bit flags.  See below */
    +  u8 nChild;              /* Number of children that must disable us */
    +  WhereClause *pWC;       /* The clause this term is part of */
    +  Bitmask prereqRight;    /* Bitmask of tables used by pExpr->pRight */
    +  Bitmask prereqAll;      /* Bitmask of tables referenced by pExpr */
    +};
    +
    +/*
    +** Allowed values of WhereTerm.wtFlags
    +*/
    +#define TERM_DYNAMIC    0x01   /* Need to call sqlite3ExprDelete(db, pExpr) */
    +#define TERM_VIRTUAL    0x02   /* Added by the optimizer.  Do not code */
    +#define TERM_CODED      0x04   /* This term is already coded */
    +#define TERM_COPIED     0x08   /* Has a child */
    +#define TERM_ORINFO     0x10   /* Need to free the WhereTerm.u.pOrInfo object */
    +#define TERM_ANDINFO    0x20   /* Need to free the WhereTerm.u.pAndInfo obj */
    +#define TERM_OR_OK      0x40   /* Used during OR-clause processing */
    +
    +/*
    +** An instance of the following structure holds all information about a
    +** WHERE clause.  Mostly this is a container for one or more WhereTerms.
    +*/
    +struct WhereClause {
    +  Parse *pParse;           /* The parser context */
    +  WhereMaskSet *pMaskSet;  /* Mapping of table cursor numbers to bitmasks */
    +  Bitmask vmask;           /* Bitmask identifying virtual table cursors */
    +  u8 op;                   /* Split operator.  TK_AND or TK_OR */
    +  int nTerm;               /* Number of terms */
    +  int nSlot;               /* Number of entries in a[] */
    +  WhereTerm *a;            /* Each a[] describes a term of the WHERE cluase */
    +#if defined(SQLITE_SMALL_STACK)
    +  WhereTerm aStatic[1];    /* Initial static space for a[] */
    +#else
    +  WhereTerm aStatic[8];    /* Initial static space for a[] */
    +#endif
    +};
    +
    +/*
    +** A WhereTerm with eOperator==WO_OR has its u.pOrInfo pointer set to
    +** a dynamically allocated instance of the following structure.
    +*/
    +struct WhereOrInfo {
    +  WhereClause wc;          /* Decomposition into subterms */
    +  Bitmask indexable;       /* Bitmask of all indexable tables in the clause */
    +};
    +
    +/*
    +** A WhereTerm with eOperator==WO_AND has its u.pAndInfo pointer set to
    +** a dynamically allocated instance of the following structure.
    +*/
    +struct WhereAndInfo {
    +  WhereClause wc;          /* The subexpression broken out */
    +};
    +
    +/*
    +** An instance of the following structure keeps track of a mapping
    +** between VDBE cursor numbers and bits of the bitmasks in WhereTerm.
    +**
    +** The VDBE cursor numbers are small integers contained in 
    +** SrcList_item.iCursor and Expr.iTable fields.  For any given WHERE 
    +** clause, the cursor numbers might not begin with 0 and they might
    +** contain gaps in the numbering sequence.  But we want to make maximum
    +** use of the bits in our bitmasks.  This structure provides a mapping
    +** from the sparse cursor numbers into consecutive integers beginning
    +** with 0.
    +**
    +** If WhereMaskSet.ix[A]==B it means that The A-th bit of a Bitmask
    +** corresponds VDBE cursor number B.  The A-th bit of a bitmask is 1<<A.
    +**
    +** For example, if the WHERE clause expression used these VDBE
    +** cursors:  4, 5, 8, 29, 57, 73.  Then the  WhereMaskSet structure
    +** would map those cursor numbers into bits 0 through 5.
    +**
    +** Note that the mapping is not necessarily ordered.  In the example
    +** above, the mapping might go like this:  4->3, 5->1, 8->2, 29->0,
    +** 57->5, 73->4.  Or one of 719 other combinations might be used. It
    +** does not really matter.  What is important is that sparse cursor
    +** numbers all get mapped into bit numbers that begin with 0 and contain
    +** no gaps.
    +*/
    +struct WhereMaskSet {
    +  int n;                        /* Number of assigned cursor values */
    +  int ix[BMS];                  /* Cursor assigned to each bit */
    +};
    +
    +/*
    +** A WhereCost object records a lookup strategy and the estimated
    +** cost of pursuing that strategy.
    +*/
    +struct WhereCost {
    +  WherePlan plan;    /* The lookup strategy */
    +  double rCost;      /* Overall cost of pursuing this search strategy */
    +  double nRow;       /* Estimated number of output rows */
    +  Bitmask used;      /* Bitmask of cursors used by this plan */
    +};
    +
    +/*
    +** Bitmasks for the operators that indices are able to exploit.  An
    +** OR-ed combination of these values can be used when searching for
    +** terms in the where clause.
    +*/
    +#define WO_IN     0x001
    +#define WO_EQ     0x002
    +#define WO_LT     (WO_EQ<<(TK_LT-TK_EQ))
    +#define WO_LE     (WO_EQ<<(TK_LE-TK_EQ))
    +#define WO_GT     (WO_EQ<<(TK_GT-TK_EQ))
    +#define WO_GE     (WO_EQ<<(TK_GE-TK_EQ))
    +#define WO_MATCH  0x040
    +#define WO_ISNULL 0x080
    +#define WO_OR     0x100       /* Two or more OR-connected terms */
    +#define WO_AND    0x200       /* Two or more AND-connected terms */
    +
    +#define WO_ALL    0xfff       /* Mask of all possible WO_* values */
    +#define WO_SINGLE 0x0ff       /* Mask of all non-compound WO_* values */
    +
    +/*
    +** Value for wsFlags returned by bestIndex() and stored in
    +** WhereLevel.wsFlags.  These flags determine which search
    +** strategies are appropriate.
    +**
    +** The least significant 12 bits is reserved as a mask for WO_ values above.
    +** The WhereLevel.wsFlags field is usually set to WO_IN|WO_EQ|WO_ISNULL.
    +** But if the table is the right table of a left join, WhereLevel.wsFlags
    +** is set to WO_IN|WO_EQ.  The WhereLevel.wsFlags field can then be used as
    +** the "op" parameter to findTerm when we are resolving equality constraints.
    +** ISNULL constraints will then not be used on the right table of a left
    +** join.  Tickets #2177 and #2189.
    +*/
    +#define WHERE_ROWID_EQ     0x00001000  /* rowid=EXPR or rowid IN (...) */
    +#define WHERE_ROWID_RANGE  0x00002000  /* rowid<EXPR and/or rowid>EXPR */
    +#define WHERE_COLUMN_EQ    0x00010000  /* x=EXPR or x IN (...) or x IS NULL */
    +#define WHERE_COLUMN_RANGE 0x00020000  /* x<EXPR and/or x>EXPR */
    +#define WHERE_COLUMN_IN    0x00040000  /* x IN (...) */
    +#define WHERE_COLUMN_NULL  0x00080000  /* x IS NULL */
    +#define WHERE_INDEXED      0x000f0000  /* Anything that uses an index */
    +#define WHERE_IN_ABLE      0x000f1000  /* Able to support an IN operator */
    +#define WHERE_TOP_LIMIT    0x00100000  /* x<EXPR or x<=EXPR constraint */
    +#define WHERE_BTM_LIMIT    0x00200000  /* x>EXPR or x>=EXPR constraint */
    +#define WHERE_IDX_ONLY     0x00800000  /* Use index only - omit table */
    +#define WHERE_ORDERBY      0x01000000  /* Output will appear in correct order */
    +#define WHERE_REVERSE      0x02000000  /* Scan in reverse order */
    +#define WHERE_UNIQUE       0x04000000  /* Selects no more than one row */
    +#define WHERE_VIRTUALTABLE 0x08000000  /* Use virtual-table processing */
    +#define WHERE_MULTI_OR     0x10000000  /* OR using multiple indices */
    +
    +/*
    +** Initialize a preallocated WhereClause structure.
    +*/
    +static void whereClauseInit(
    +  WhereClause *pWC,        /* The WhereClause to be initialized */
    +  Parse *pParse,           /* The parsing context */
    +  WhereMaskSet *pMaskSet   /* Mapping from table cursor numbers to bitmasks */
    +){
    +  pWC->pParse = pParse;
    +  pWC->pMaskSet = pMaskSet;
    +  pWC->nTerm = 0;
    +  pWC->nSlot = ArraySize(pWC->aStatic);
    +  pWC->a = pWC->aStatic;
    +  pWC->vmask = 0;
    +}
    +
    +/* Forward reference */
    +static void whereClauseClear(WhereClause*);
    +
    +/*
    +** Deallocate all memory associated with a WhereOrInfo object.
    +*/
    +static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
    +  whereClauseClear(&p->wc);
    +  sqlite3DbFree(db, p);
    +}
    +
    +/*
    +** Deallocate all memory associated with a WhereAndInfo object.
    +*/
    +static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
    +  whereClauseClear(&p->wc);
    +  sqlite3DbFree(db, p);
    +}
    +
    +/*
    +** Deallocate a WhereClause structure.  The WhereClause structure
    +** itself is not freed.  This routine is the inverse of whereClauseInit().
    +*/
    +static void whereClauseClear(WhereClause *pWC){
    +  int i;
    +  WhereTerm *a;
    +  sqlite3 *db = pWC->pParse->db;
    +  for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
    +    if( a->wtFlags & TERM_DYNAMIC ){
    +      sqlite3ExprDelete(db, a->pExpr);
    +    }
    +    if( a->wtFlags & TERM_ORINFO ){
    +      whereOrInfoDelete(db, a->u.pOrInfo);
    +    }else if( a->wtFlags & TERM_ANDINFO ){
    +      whereAndInfoDelete(db, a->u.pAndInfo);
    +    }
    +  }
    +  if( pWC->a!=pWC->aStatic ){
    +    sqlite3DbFree(db, pWC->a);
    +  }
    +}
    +
    +/*
    +** Add a single new WhereTerm entry to the WhereClause object pWC.
    +** The new WhereTerm object is constructed from Expr p and with wtFlags.
    +** The index in pWC->a[] of the new WhereTerm is returned on success.
    +** 0 is returned if the new WhereTerm could not be added due to a memory
    +** allocation error.  The memory allocation failure will be recorded in
    +** the db->mallocFailed flag so that higher-level functions can detect it.
    +**
    +** This routine will increase the size of the pWC->a[] array as necessary.
    +**
    +** If the wtFlags argument includes TERM_DYNAMIC, then responsibility
    +** for freeing the expression p is assumed by the WhereClause object pWC.
    +** This is true even if this routine fails to allocate a new WhereTerm.
    +**
    +** WARNING:  This routine might reallocate the space used to store
    +** WhereTerms.  All pointers to WhereTerms should be invalidated after
    +** calling this routine.  Such pointers may be reinitialized by referencing
    +** the pWC->a[] array.
    +*/
    +static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
    +  WhereTerm *pTerm;
    +  int idx;
    +  if( pWC->nTerm>=pWC->nSlot ){
    +    WhereTerm *pOld = pWC->a;
    +    sqlite3 *db = pWC->pParse->db;
    +    pWC->a = sqlite3DbMallocRaw(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
    +    if( pWC->a==0 ){
    +      if( wtFlags & TERM_DYNAMIC ){
    +        sqlite3ExprDelete(db, p);
    +      }
    +      pWC->a = pOld;
    +      return 0;
    +    }
    +    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
    +    if( pOld!=pWC->aStatic ){
    +      sqlite3DbFree(db, pOld);
    +    }
    +    pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
    +  }
    +  pTerm = &pWC->a[idx = pWC->nTerm++];
    +  pTerm->pExpr = p;
    +  pTerm->wtFlags = wtFlags;
    +  pTerm->pWC = pWC;
    +  pTerm->iParent = -1;
    +  return idx;
    +}
    +
    +/*
    +** This routine identifies subexpressions in the WHERE clause where
    +** each subexpression is separated by the AND operator or some other
    +** operator specified in the op parameter.  The WhereClause structure
    +** is filled with pointers to subexpressions.  For example:
    +**
    +**    WHERE  a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
    +**           \________/     \_______________/     \________________/
    +**            slot[0]            slot[1]               slot[2]
    +**
    +** The original WHERE clause in pExpr is unaltered.  All this routine
    +** does is make slot[] entries point to substructure within pExpr.
    +**
    +** In the previous sentence and in the diagram, "slot[]" refers to
    +** the WhereClause.a[] array.  The slot[] array grows as needed to contain
    +** all terms of the WHERE clause.
    +*/
    +static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){
    +  pWC->op = (u8)op;
    +  if( pExpr==0 ) return;
    +  if( pExpr->op!=op ){
    +    whereClauseInsert(pWC, pExpr, 0);
    +  }else{
    +    whereSplit(pWC, pExpr->pLeft, op);
    +    whereSplit(pWC, pExpr->pRight, op);
    +  }
    +}
    +
    +/*
    +** Initialize an expression mask set (a WhereMaskSet object)
    +*/
    +#define initMaskSet(P)  memset(P, 0, sizeof(*P))
    +
    +/*
    +** Return the bitmask for the given cursor number.  Return 0 if
    +** iCursor is not in the set.
    +*/
    +static Bitmask getMask(WhereMaskSet *pMaskSet, int iCursor){
    +  int i;
    +  assert( pMaskSet->n<=sizeof(Bitmask)*8 );
    +  for(i=0; i<pMaskSet->n; i++){
    +    if( pMaskSet->ix[i]==iCursor ){
    +      return ((Bitmask)1)<<i;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Create a new mask for cursor iCursor.
    +**
    +** There is one cursor per table in the FROM clause.  The number of
    +** tables in the FROM clause is limited by a test early in the
    +** sqlite3WhereBegin() routine.  So we know that the pMaskSet->ix[]
    +** array will never overflow.
    +*/
    +static void createMask(WhereMaskSet *pMaskSet, int iCursor){
    +  assert( pMaskSet->n < ArraySize(pMaskSet->ix) );
    +  pMaskSet->ix[pMaskSet->n++] = iCursor;
    +}
    +
    +/*
    +** This routine walks (recursively) an expression tree and generates
    +** a bitmask indicating which tables are used in that expression
    +** tree.
    +**
    +** In order for this routine to work, the calling function must have
    +** previously invoked sqlite3ResolveExprNames() on the expression.  See
    +** the header comment on that routine for additional information.
    +** The sqlite3ResolveExprNames() routines looks for column names and
    +** sets their opcodes to TK_COLUMN and their Expr.iTable fields to
    +** the VDBE cursor number of the table.  This routine just has to
    +** translate the cursor numbers into bitmask values and OR all
    +** the bitmasks together.
    +*/
    +static Bitmask exprListTableUsage(WhereMaskSet*, ExprList*);
    +static Bitmask exprSelectTableUsage(WhereMaskSet*, Select*);
    +static Bitmask exprTableUsage(WhereMaskSet *pMaskSet, Expr *p){
    +  Bitmask mask = 0;
    +  if( p==0 ) return 0;
    +  if( p->op==TK_COLUMN ){
    +    mask = getMask(pMaskSet, p->iTable);
    +    return mask;
    +  }
    +  mask = exprTableUsage(pMaskSet, p->pRight);
    +  mask |= exprTableUsage(pMaskSet, p->pLeft);
    +  if( ExprHasProperty(p, EP_xIsSelect) ){
    +    mask |= exprSelectTableUsage(pMaskSet, p->x.pSelect);
    +  }else{
    +    mask |= exprListTableUsage(pMaskSet, p->x.pList);
    +  }
    +  return mask;
    +}
    +static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
    +  int i;
    +  Bitmask mask = 0;
    +  if( pList ){
    +    for(i=0; i<pList->nExpr; i++){
    +      mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
    +    }
    +  }
    +  return mask;
    +}
    +static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
    +  Bitmask mask = 0;
    +  while( pS ){
    +    mask |= exprListTableUsage(pMaskSet, pS->pEList);
    +    mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
    +    mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
    +    mask |= exprTableUsage(pMaskSet, pS->pWhere);
    +    mask |= exprTableUsage(pMaskSet, pS->pHaving);
    +    pS = pS->pPrior;
    +  }
    +  return mask;
    +}
    +
    +/*
    +** Return TRUE if the given operator is one of the operators that is
    +** allowed for an indexable WHERE clause term.  The allowed operators are
    +** "=", "<", ">", "<=", ">=", and "IN".
    +*/
    +static int allowedOp(int op){
    +  assert( TK_GT>TK_EQ && TK_GT<TK_GE );
    +  assert( TK_LT>TK_EQ && TK_LT<TK_GE );
    +  assert( TK_LE>TK_EQ && TK_LE<TK_GE );
    +  assert( TK_GE==TK_EQ+4 );
    +  return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL;
    +}
    +
    +/*
    +** Swap two objects of type TYPE.
    +*/
    +#define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}
    +
    +/*
    +** Commute a comparison operator.  Expressions of the form "X op Y"
    +** are converted into "Y op X".
    +**
    +** If a collation sequence is associated with either the left or right
    +** side of the comparison, it remains associated with the same side after
    +** the commutation. So "Y collate NOCASE op X" becomes 
    +** "X collate NOCASE op Y". This is because any collation sequence on
    +** the left hand side of a comparison overrides any collation sequence 
    +** attached to the right. For the same reason the EP_ExpCollate flag
    +** is not commuted.
    +*/
    +static void exprCommute(Parse *pParse, Expr *pExpr){
    +  u16 expRight = (pExpr->pRight->flags & EP_ExpCollate);
    +  u16 expLeft = (pExpr->pLeft->flags & EP_ExpCollate);
    +  assert( allowedOp(pExpr->op) && pExpr->op!=TK_IN );
    +  pExpr->pRight->pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight);
    +  pExpr->pLeft->pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
    +  SWAP(CollSeq*,pExpr->pRight->pColl,pExpr->pLeft->pColl);
    +  pExpr->pRight->flags = (pExpr->pRight->flags & ~EP_ExpCollate) | expLeft;
    +  pExpr->pLeft->flags = (pExpr->pLeft->flags & ~EP_ExpCollate) | expRight;
    +  SWAP(Expr*,pExpr->pRight,pExpr->pLeft);
    +  if( pExpr->op>=TK_GT ){
    +    assert( TK_LT==TK_GT+2 );
    +    assert( TK_GE==TK_LE+2 );
    +    assert( TK_GT>TK_EQ );
    +    assert( TK_GT<TK_LE );
    +    assert( pExpr->op>=TK_GT && pExpr->op<=TK_GE );
    +    pExpr->op = ((pExpr->op-TK_GT)^2)+TK_GT;
    +  }
    +}
    +
    +/*
    +** Translate from TK_xx operator to WO_xx bitmask.
    +*/
    +static u16 operatorMask(int op){
    +  u16 c;
    +  assert( allowedOp(op) );
    +  if( op==TK_IN ){
    +    c = WO_IN;
    +  }else if( op==TK_ISNULL ){
    +    c = WO_ISNULL;
    +  }else{
    +    assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
    +    c = (u16)(WO_EQ<<(op-TK_EQ));
    +  }
    +  assert( op!=TK_ISNULL || c==WO_ISNULL );
    +  assert( op!=TK_IN || c==WO_IN );
    +  assert( op!=TK_EQ || c==WO_EQ );
    +  assert( op!=TK_LT || c==WO_LT );
    +  assert( op!=TK_LE || c==WO_LE );
    +  assert( op!=TK_GT || c==WO_GT );
    +  assert( op!=TK_GE || c==WO_GE );
    +  return c;
    +}
    +
    +/*
    +** Search for a term in the WHERE clause that is of the form "X <op> <expr>"
    +** where X is a reference to the iColumn of table iCur and <op> is one of
    +** the WO_xx operator codes specified by the op parameter.
    +** Return a pointer to the term.  Return 0 if not found.
    +*/
    +static WhereTerm *findTerm(
    +  WhereClause *pWC,     /* The WHERE clause to be searched */
    +  int iCur,             /* Cursor number of LHS */
    +  int iColumn,          /* Column number of LHS */
    +  Bitmask notReady,     /* RHS must not overlap with this mask */
    +  u32 op,               /* Mask of WO_xx values describing operator */
    +  Index *pIdx           /* Must be compatible with this index, if not NULL */
    +){
    +  WhereTerm *pTerm;
    +  int k;
    +  assert( iCur>=0 );
    +  op &= WO_ALL;
    +  for(pTerm=pWC->a, k=pWC->nTerm; k; k--, pTerm++){
    +    if( pTerm->leftCursor==iCur
    +       && (pTerm->prereqRight & notReady)==0
    +       && pTerm->u.leftColumn==iColumn
    +       && (pTerm->eOperator & op)!=0
    +    ){
    +      if( pIdx && pTerm->eOperator!=WO_ISNULL ){
    +        Expr *pX = pTerm->pExpr;
    +        CollSeq *pColl;
    +        char idxaff;
    +        int j;
    +        Parse *pParse = pWC->pParse;
    +
    +        idxaff = pIdx->pTable->aCol[iColumn].affinity;
    +        if( !sqlite3IndexAffinityOk(pX, idxaff) ) continue;
    +
    +        /* Figure out the collation sequence required from an index for
    +        ** it to be useful for optimising expression pX. Store this
    +        ** value in variable pColl.
    +        */
    +        assert(pX->pLeft);
    +        pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
    +        assert(pColl || pParse->nErr);
    +
    +        for(j=0; pIdx->aiColumn[j]!=iColumn; j++){
    +          if( NEVER(j>=pIdx->nColumn) ) return 0;
    +        }
    +        if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ) continue;
    +      }
    +      return pTerm;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/* Forward reference */
    +static void exprAnalyze(SrcList*, WhereClause*, int);
    +
    +/*
    +** Call exprAnalyze on all terms in a WHERE clause.  
    +**
    +**
    +*/
    +static void exprAnalyzeAll(
    +  SrcList *pTabList,       /* the FROM clause */
    +  WhereClause *pWC         /* the WHERE clause to be analyzed */
    +){
    +  int i;
    +  for(i=pWC->nTerm-1; i>=0; i--){
    +    exprAnalyze(pTabList, pWC, i);
    +  }
    +}
    +
    +#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION
    +/*
    +** Check to see if the given expression is a LIKE or GLOB operator that
    +** can be optimized using inequality constraints.  Return TRUE if it is
    +** so and false if not.
    +**
    +** In order for the operator to be optimizible, the RHS must be a string
    +** literal that does not begin with a wildcard.  
    +*/
    +static int isLikeOrGlob(
    +  Parse *pParse,    /* Parsing and code generating context */
    +  Expr *pExpr,      /* Test this expression */
    +  Expr **ppPrefix,  /* Pointer to TK_STRING expression with pattern prefix */
    +  int *pisComplete, /* True if the only wildcard is % in the last character */
    +  int *pnoCase      /* True if uppercase is equivalent to lowercase */
    +){
    +  const char *z = 0;         /* String on RHS of LIKE operator */
    +  Expr *pRight, *pLeft;      /* Right and left size of LIKE operator */
    +  ExprList *pList;           /* List of operands to the LIKE operator */
    +  int c;                     /* One character in z[] */
    +  int cnt;                   /* Number of non-wildcard prefix characters */
    +  char wc[3];                /* Wildcard characters */
    +  CollSeq *pColl;            /* Collating sequence for LHS */
    +  sqlite3 *db = pParse->db;  /* Database connection */
    +  sqlite3_value *pVal = 0;
    +  int op;                    /* Opcode of pRight */
    +
    +  if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
    +    return 0;
    +  }
    +#ifdef SQLITE_EBCDIC
    +  if( *pnoCase ) return 0;
    +#endif
    +  pList = pExpr->x.pList;
    +  pLeft = pList->a[1].pExpr;
    +  if( pLeft->op!=TK_COLUMN || sqlite3ExprAffinity(pLeft)!=SQLITE_AFF_TEXT ){
    +    /* IMP: R-02065-49465 The left-hand side of the LIKE or GLOB operator must
    +    ** be the name of an indexed column with TEXT affinity. */
    +    return 0;
    +  }
    +  assert( pLeft->iColumn!=(-1) ); /* Because IPK never has AFF_TEXT */
    +  pColl = sqlite3ExprCollSeq(pParse, pLeft);
    +  assert( pColl!=0 );  /* Every non-IPK column has a collating sequence */
    +  if( (pColl->type!=SQLITE_COLL_BINARY || *pnoCase) &&
    +      (pColl->type!=SQLITE_COLL_NOCASE || !*pnoCase) ){
    +    /* IMP: R-09003-32046 For the GLOB operator, the column must use the
    +    ** default BINARY collating sequence.
    +    ** IMP: R-41408-28306 For the LIKE operator, if case_sensitive_like mode
    +    ** is enabled then the column must use the default BINARY collating
    +    ** sequence, or if case_sensitive_like mode is disabled then the column
    +    ** must use the built-in NOCASE collating sequence.
    +    */
    +    return 0;
    +  }
    +
    +  pRight = pList->a[0].pExpr;
    +  op = pRight->op;
    +  if( op==TK_REGISTER ){
    +    op = pRight->op2;
    +  }
    +  if( op==TK_VARIABLE ){
    +    Vdbe *pReprepare = pParse->pReprepare;
    +    pVal = sqlite3VdbeGetValue(pReprepare, pRight->iColumn, SQLITE_AFF_NONE);
    +    if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){
    +      z = (char *)sqlite3_value_text(pVal);
    +    }
    +    sqlite3VdbeSetVarmask(pParse->pVdbe, pRight->iColumn);
    +    assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
    +  }else if( op==TK_STRING ){
    +    z = pRight->u.zToken;
    +  }
    +  if( z ){
    +    cnt = 0;
    +    while( (c=z[cnt])!=0 && c!=wc[0] && c!=wc[1] && c!=wc[2] ){
    +      cnt++;
    +    }
    +    if( cnt!=0 && c!=0 && 255!=(u8)z[cnt-1] ){
    +      Expr *pPrefix;
    +      *pisComplete = z[cnt]==wc[0] && z[cnt+1]==0;
    +      pPrefix = sqlite3Expr(db, TK_STRING, z);
    +      if( pPrefix ) pPrefix->u.zToken[cnt] = 0;
    +      *ppPrefix = pPrefix;
    +      if( op==TK_VARIABLE ){
    +        Vdbe *v = pParse->pVdbe;
    +        sqlite3VdbeSetVarmask(v, pRight->iColumn);
    +        if( *pisComplete && pRight->u.zToken[1] ){
    +          /* If the rhs of the LIKE expression is a variable, and the current
    +          ** value of the variable means there is no need to invoke the LIKE
    +          ** function, then no OP_Variable will be added to the program.
    +          ** This causes problems for the sqlite3_bind_parameter_name()
    +          ** API. To workaround them, add a dummy OP_Variable here.
    +          */ 
    +          int r1 = sqlite3GetTempReg(pParse);
    +          sqlite3ExprCodeTarget(pParse, pRight, r1);
    +          sqlite3VdbeChangeP3(v, sqlite3VdbeCurrentAddr(v)-1, 0);
    +          sqlite3ReleaseTempReg(pParse, r1);
    +        }
    +      }
    +    }else{
    +      z = 0;
    +    }
    +  }
    +
    +  sqlite3ValueFree(pVal);
    +  return (z!=0);
    +}
    +#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
    +
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/*
    +** Check to see if the given expression is of the form
    +**
    +**         column MATCH expr
    +**
    +** If it is then return TRUE.  If not, return FALSE.
    +*/
    +static int isMatchOfColumn(
    +  Expr *pExpr      /* Test this expression */
    +){
    +  ExprList *pList;
    +
    +  if( pExpr->op!=TK_FUNCTION ){
    +    return 0;
    +  }
    +  if( sqlite3StrICmp(pExpr->u.zToken,"match")!=0 ){
    +    return 0;
    +  }
    +  pList = pExpr->x.pList;
    +  if( pList->nExpr!=2 ){
    +    return 0;
    +  }
    +  if( pList->a[1].pExpr->op != TK_COLUMN ){
    +    return 0;
    +  }
    +  return 1;
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +/*
    +** If the pBase expression originated in the ON or USING clause of
    +** a join, then transfer the appropriate markings over to derived.
    +*/
    +static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
    +  pDerived->flags |= pBase->flags & EP_FromJoin;
    +  pDerived->iRightJoinTable = pBase->iRightJoinTable;
    +}
    +
    +#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
    +/*
    +** Analyze a term that consists of two or more OR-connected
    +** subterms.  So in:
    +**
    +**     ... WHERE  (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)
    +**                          ^^^^^^^^^^^^^^^^^^^^
    +**
    +** This routine analyzes terms such as the middle term in the above example.
    +** A WhereOrTerm object is computed and attached to the term under
    +** analysis, regardless of the outcome of the analysis.  Hence:
    +**
    +**     WhereTerm.wtFlags   |=  TERM_ORINFO
    +**     WhereTerm.u.pOrInfo  =  a dynamically allocated WhereOrTerm object
    +**
    +** The term being analyzed must have two or more of OR-connected subterms.
    +** A single subterm might be a set of AND-connected sub-subterms.
    +** Examples of terms under analysis:
    +**
    +**     (A)     t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5
    +**     (B)     x=expr1 OR expr2=x OR x=expr3
    +**     (C)     t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)
    +**     (D)     x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')
    +**     (E)     (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)
    +**
    +** CASE 1:
    +**
    +** If all subterms are of the form T.C=expr for some single column of C
    +** a single table T (as shown in example B above) then create a new virtual
    +** term that is an equivalent IN expression.  In other words, if the term
    +** being analyzed is:
    +**
    +**      x = expr1  OR  expr2 = x  OR  x = expr3
    +**
    +** then create a new virtual term like this:
    +**
    +**      x IN (expr1,expr2,expr3)
    +**
    +** CASE 2:
    +**
    +** If all subterms are indexable by a single table T, then set
    +**
    +**     WhereTerm.eOperator              =  WO_OR
    +**     WhereTerm.u.pOrInfo->indexable  |=  the cursor number for table T
    +**
    +** A subterm is "indexable" if it is of the form
    +** "T.C <op> <expr>" where C is any column of table T and 
    +** <op> is one of "=", "<", "<=", ">", ">=", "IS NULL", or "IN".
    +** A subterm is also indexable if it is an AND of two or more
    +** subsubterms at least one of which is indexable.  Indexable AND 
    +** subterms have their eOperator set to WO_AND and they have
    +** u.pAndInfo set to a dynamically allocated WhereAndTerm object.
    +**
    +** From another point of view, "indexable" means that the subterm could
    +** potentially be used with an index if an appropriate index exists.
    +** This analysis does not consider whether or not the index exists; that
    +** is something the bestIndex() routine will determine.  This analysis
    +** only looks at whether subterms appropriate for indexing exist.
    +**
    +** All examples A through E above all satisfy case 2.  But if a term
    +** also statisfies case 1 (such as B) we know that the optimizer will
    +** always prefer case 1, so in that case we pretend that case 2 is not
    +** satisfied.
    +**
    +** It might be the case that multiple tables are indexable.  For example,
    +** (E) above is indexable on tables P, Q, and R.
    +**
    +** Terms that satisfy case 2 are candidates for lookup by using
    +** separate indices to find rowids for each subterm and composing
    +** the union of all rowids using a RowSet object.  This is similar
    +** to "bitmap indices" in other database engines.
    +**
    +** OTHERWISE:
    +**
    +** If neither case 1 nor case 2 apply, then leave the eOperator set to
    +** zero.  This term is not useful for search.
    +*/
    +static void exprAnalyzeOrTerm(
    +  SrcList *pSrc,            /* the FROM clause */
    +  WhereClause *pWC,         /* the complete WHERE clause */
    +  int idxTerm               /* Index of the OR-term to be analyzed */
    +){
    +  Parse *pParse = pWC->pParse;            /* Parser context */
    +  sqlite3 *db = pParse->db;               /* Database connection */
    +  WhereTerm *pTerm = &pWC->a[idxTerm];    /* The term to be analyzed */
    +  Expr *pExpr = pTerm->pExpr;             /* The expression of the term */
    +  WhereMaskSet *pMaskSet = pWC->pMaskSet; /* Table use masks */
    +  int i;                                  /* Loop counters */
    +  WhereClause *pOrWc;       /* Breakup of pTerm into subterms */
    +  WhereTerm *pOrTerm;       /* A Sub-term within the pOrWc */
    +  WhereOrInfo *pOrInfo;     /* Additional information associated with pTerm */
    +  Bitmask chngToIN;         /* Tables that might satisfy case 1 */
    +  Bitmask indexable;        /* Tables that are indexable, satisfying case 2 */
    +
    +  /*
    +  ** Break the OR clause into its separate subterms.  The subterms are
    +  ** stored in a WhereClause structure containing within the WhereOrInfo
    +  ** object that is attached to the original OR clause term.
    +  */
    +  assert( (pTerm->wtFlags & (TERM_DYNAMIC|TERM_ORINFO|TERM_ANDINFO))==0 );
    +  assert( pExpr->op==TK_OR );
    +  pTerm->u.pOrInfo = pOrInfo = sqlite3DbMallocZero(db, sizeof(*pOrInfo));
    +  if( pOrInfo==0 ) return;
    +  pTerm->wtFlags |= TERM_ORINFO;
    +  pOrWc = &pOrInfo->wc;
    +  whereClauseInit(pOrWc, pWC->pParse, pMaskSet);
    +  whereSplit(pOrWc, pExpr, TK_OR);
    +  exprAnalyzeAll(pSrc, pOrWc);
    +  if( db->mallocFailed ) return;
    +  assert( pOrWc->nTerm>=2 );
    +
    +  /*
    +  ** Compute the set of tables that might satisfy cases 1 or 2.
    +  */
    +  indexable = ~(Bitmask)0;
    +  chngToIN = ~(pWC->vmask);
    +  for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0 && indexable; i--, pOrTerm++){
    +    if( (pOrTerm->eOperator & WO_SINGLE)==0 ){
    +      WhereAndInfo *pAndInfo;
    +      assert( pOrTerm->eOperator==0 );
    +      assert( (pOrTerm->wtFlags & (TERM_ANDINFO|TERM_ORINFO))==0 );
    +      chngToIN = 0;
    +      pAndInfo = sqlite3DbMallocRaw(db, sizeof(*pAndInfo));
    +      if( pAndInfo ){
    +        WhereClause *pAndWC;
    +        WhereTerm *pAndTerm;
    +        int j;
    +        Bitmask b = 0;
    +        pOrTerm->u.pAndInfo = pAndInfo;
    +        pOrTerm->wtFlags |= TERM_ANDINFO;
    +        pOrTerm->eOperator = WO_AND;
    +        pAndWC = &pAndInfo->wc;
    +        whereClauseInit(pAndWC, pWC->pParse, pMaskSet);
    +        whereSplit(pAndWC, pOrTerm->pExpr, TK_AND);
    +        exprAnalyzeAll(pSrc, pAndWC);
    +        testcase( db->mallocFailed );
    +        if( !db->mallocFailed ){
    +          for(j=0, pAndTerm=pAndWC->a; j<pAndWC->nTerm; j++, pAndTerm++){
    +            assert( pAndTerm->pExpr );
    +            if( allowedOp(pAndTerm->pExpr->op) ){
    +              b |= getMask(pMaskSet, pAndTerm->leftCursor);
    +            }
    +          }
    +        }
    +        indexable &= b;
    +      }
    +    }else if( pOrTerm->wtFlags & TERM_COPIED ){
    +      /* Skip this term for now.  We revisit it when we process the
    +      ** corresponding TERM_VIRTUAL term */
    +    }else{
    +      Bitmask b;
    +      b = getMask(pMaskSet, pOrTerm->leftCursor);
    +      if( pOrTerm->wtFlags & TERM_VIRTUAL ){
    +        WhereTerm *pOther = &pOrWc->a[pOrTerm->iParent];
    +        b |= getMask(pMaskSet, pOther->leftCursor);
    +      }
    +      indexable &= b;
    +      if( pOrTerm->eOperator!=WO_EQ ){
    +        chngToIN = 0;
    +      }else{
    +        chngToIN &= b;
    +      }
    +    }
    +  }
    +
    +  /*
    +  ** Record the set of tables that satisfy case 2.  The set might be
    +  ** empty.
    +  */
    +  pOrInfo->indexable = indexable;
    +  pTerm->eOperator = indexable==0 ? 0 : WO_OR;
    +
    +  /*
    +  ** chngToIN holds a set of tables that *might* satisfy case 1.  But
    +  ** we have to do some additional checking to see if case 1 really
    +  ** is satisfied.
    +  **
    +  ** chngToIN will hold either 0, 1, or 2 bits.  The 0-bit case means
    +  ** that there is no possibility of transforming the OR clause into an
    +  ** IN operator because one or more terms in the OR clause contain
    +  ** something other than == on a column in the single table.  The 1-bit
    +  ** case means that every term of the OR clause is of the form
    +  ** "table.column=expr" for some single table.  The one bit that is set
    +  ** will correspond to the common table.  We still need to check to make
    +  ** sure the same column is used on all terms.  The 2-bit case is when
    +  ** the all terms are of the form "table1.column=table2.column".  It
    +  ** might be possible to form an IN operator with either table1.column
    +  ** or table2.column as the LHS if either is common to every term of
    +  ** the OR clause.
    +  **
    +  ** Note that terms of the form "table.column1=table.column2" (the
    +  ** same table on both sizes of the ==) cannot be optimized.
    +  */
    +  if( chngToIN ){
    +    int okToChngToIN = 0;     /* True if the conversion to IN is valid */
    +    int iColumn = -1;         /* Column index on lhs of IN operator */
    +    int iCursor = -1;         /* Table cursor common to all terms */
    +    int j = 0;                /* Loop counter */
    +
    +    /* Search for a table and column that appears on one side or the
    +    ** other of the == operator in every subterm.  That table and column
    +    ** will be recorded in iCursor and iColumn.  There might not be any
    +    ** such table and column.  Set okToChngToIN if an appropriate table
    +    ** and column is found but leave okToChngToIN false if not found.
    +    */
    +    for(j=0; j<2 && !okToChngToIN; j++){
    +      pOrTerm = pOrWc->a;
    +      for(i=pOrWc->nTerm-1; i>=0; i--, pOrTerm++){
    +        assert( pOrTerm->eOperator==WO_EQ );
    +        pOrTerm->wtFlags &= ~TERM_OR_OK;
    +        if( pOrTerm->leftCursor==iCursor ){
    +          /* This is the 2-bit case and we are on the second iteration and
    +          ** current term is from the first iteration.  So skip this term. */
    +          assert( j==1 );
    +          continue;
    +        }
    +        if( (chngToIN & getMask(pMaskSet, pOrTerm->leftCursor))==0 ){
    +          /* This term must be of the form t1.a==t2.b where t2 is in the
    +          ** chngToIN set but t1 is not.  This term will be either preceeded
    +          ** or follwed by an inverted copy (t2.b==t1.a).  Skip this term 
    +          ** and use its inversion. */
    +          testcase( pOrTerm->wtFlags & TERM_COPIED );
    +          testcase( pOrTerm->wtFlags & TERM_VIRTUAL );
    +          assert( pOrTerm->wtFlags & (TERM_COPIED|TERM_VIRTUAL) );
    +          continue;
    +        }
    +        iColumn = pOrTerm->u.leftColumn;
    +        iCursor = pOrTerm->leftCursor;
    +        break;
    +      }
    +      if( i<0 ){
    +        /* No candidate table+column was found.  This can only occur
    +        ** on the second iteration */
    +        assert( j==1 );
    +        assert( (chngToIN&(chngToIN-1))==0 );
    +        assert( chngToIN==getMask(pMaskSet, iCursor) );
    +        break;
    +      }
    +      testcase( j==1 );
    +
    +      /* We have found a candidate table and column.  Check to see if that
    +      ** table and column is common to every term in the OR clause */
    +      okToChngToIN = 1;
    +      for(; i>=0 && okToChngToIN; i--, pOrTerm++){
    +        assert( pOrTerm->eOperator==WO_EQ );
    +        if( pOrTerm->leftCursor!=iCursor ){
    +          pOrTerm->wtFlags &= ~TERM_OR_OK;
    +        }else if( pOrTerm->u.leftColumn!=iColumn ){
    +          okToChngToIN = 0;
    +        }else{
    +          int affLeft, affRight;
    +          /* If the right-hand side is also a column, then the affinities
    +          ** of both right and left sides must be such that no type
    +          ** conversions are required on the right.  (Ticket #2249)
    +          */
    +          affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);
    +          affLeft = sqlite3ExprAffinity(pOrTerm->pExpr->pLeft);
    +          if( affRight!=0 && affRight!=affLeft ){
    +            okToChngToIN = 0;
    +          }else{
    +            pOrTerm->wtFlags |= TERM_OR_OK;
    +          }
    +        }
    +      }
    +    }
    +
    +    /* At this point, okToChngToIN is true if original pTerm satisfies
    +    ** case 1.  In that case, construct a new virtual term that is 
    +    ** pTerm converted into an IN operator.
    +    */
    +    if( okToChngToIN ){
    +      Expr *pDup;            /* A transient duplicate expression */
    +      ExprList *pList = 0;   /* The RHS of the IN operator */
    +      Expr *pLeft = 0;       /* The LHS of the IN operator */
    +      Expr *pNew;            /* The complete IN operator */
    +
    +      for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0; i--, pOrTerm++){
    +        if( (pOrTerm->wtFlags & TERM_OR_OK)==0 ) continue;
    +        assert( pOrTerm->eOperator==WO_EQ );
    +        assert( pOrTerm->leftCursor==iCursor );
    +        assert( pOrTerm->u.leftColumn==iColumn );
    +        pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);
    +        pList = sqlite3ExprListAppend(pWC->pParse, pList, pDup);
    +        pLeft = pOrTerm->pExpr->pLeft;
    +      }
    +      assert( pLeft!=0 );
    +      pDup = sqlite3ExprDup(db, pLeft, 0);
    +      pNew = sqlite3PExpr(pParse, TK_IN, pDup, 0, 0);
    +      if( pNew ){
    +        int idxNew;
    +        transferJoinMarkings(pNew, pExpr);
    +        assert( !ExprHasProperty(pNew, EP_xIsSelect) );
    +        pNew->x.pList = pList;
    +        idxNew = whereClauseInsert(pWC, pNew, TERM_VIRTUAL|TERM_DYNAMIC);
    +        testcase( idxNew==0 );
    +        exprAnalyze(pSrc, pWC, idxNew);
    +        pTerm = &pWC->a[idxTerm];
    +        pWC->a[idxNew].iParent = idxTerm;
    +        pTerm->nChild = 1;
    +      }else{
    +        sqlite3ExprListDelete(db, pList);
    +      }
    +      pTerm->eOperator = 0;  /* case 1 trumps case 2 */
    +    }
    +  }
    +}
    +#endif /* !SQLITE_OMIT_OR_OPTIMIZATION && !SQLITE_OMIT_SUBQUERY */
    +
    +
    +/*
    +** The input to this routine is an WhereTerm structure with only the
    +** "pExpr" field filled in.  The job of this routine is to analyze the
    +** subexpression and populate all the other fields of the WhereTerm
    +** structure.
    +**
    +** If the expression is of the form "<expr> <op> X" it gets commuted
    +** to the standard form of "X <op> <expr>".
    +**
    +** If the expression is of the form "X <op> Y" where both X and Y are
    +** columns, then the original expression is unchanged and a new virtual
    +** term of the form "Y <op> X" is added to the WHERE clause and
    +** analyzed separately.  The original term is marked with TERM_COPIED
    +** and the new term is marked with TERM_DYNAMIC (because it's pExpr
    +** needs to be freed with the WhereClause) and TERM_VIRTUAL (because it
    +** is a commuted copy of a prior term.)  The original term has nChild=1
    +** and the copy has idxParent set to the index of the original term.
    +*/
    +static void exprAnalyze(
    +  SrcList *pSrc,            /* the FROM clause */
    +  WhereClause *pWC,         /* the WHERE clause */
    +  int idxTerm               /* Index of the term to be analyzed */
    +){
    +  WhereTerm *pTerm;                /* The term to be analyzed */
    +  WhereMaskSet *pMaskSet;          /* Set of table index masks */
    +  Expr *pExpr;                     /* The expression to be analyzed */
    +  Bitmask prereqLeft;              /* Prerequesites of the pExpr->pLeft */
    +  Bitmask prereqAll;               /* Prerequesites of pExpr */
    +  Bitmask extraRight = 0;          /* */
    +  Expr *pStr1 = 0;                 /* RHS of LIKE/GLOB operator */
    +  int isComplete = 0;              /* RHS of LIKE/GLOB ends with wildcard */
    +  int noCase = 0;                  /* LIKE/GLOB distinguishes case */
    +  int op;                          /* Top-level operator.  pExpr->op */
    +  Parse *pParse = pWC->pParse;     /* Parsing context */
    +  sqlite3 *db = pParse->db;        /* Database connection */
    +
    +  if( db->mallocFailed ){
    +    return;
    +  }
    +  pTerm = &pWC->a[idxTerm];
    +  pMaskSet = pWC->pMaskSet;
    +  pExpr = pTerm->pExpr;
    +  prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
    +  op = pExpr->op;
    +  if( op==TK_IN ){
    +    assert( pExpr->pRight==0 );
    +    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +      pTerm->prereqRight = exprSelectTableUsage(pMaskSet, pExpr->x.pSelect);
    +    }else{
    +      pTerm->prereqRight = exprListTableUsage(pMaskSet, pExpr->x.pList);
    +    }
    +  }else if( op==TK_ISNULL ){
    +    pTerm->prereqRight = 0;
    +  }else{
    +    pTerm->prereqRight = exprTableUsage(pMaskSet, pExpr->pRight);
    +  }
    +  prereqAll = exprTableUsage(pMaskSet, pExpr);
    +  if( ExprHasProperty(pExpr, EP_FromJoin) ){
    +    Bitmask x = getMask(pMaskSet, pExpr->iRightJoinTable);
    +    prereqAll |= x;
    +    extraRight = x-1;  /* ON clause terms may not be used with an index
    +                       ** on left table of a LEFT JOIN.  Ticket #3015 */
    +  }
    +  pTerm->prereqAll = prereqAll;
    +  pTerm->leftCursor = -1;
    +  pTerm->iParent = -1;
    +  pTerm->eOperator = 0;
    +  if( allowedOp(op) && (pTerm->prereqRight & prereqLeft)==0 ){
    +    Expr *pLeft = pExpr->pLeft;
    +    Expr *pRight = pExpr->pRight;
    +    if( pLeft->op==TK_COLUMN ){
    +      pTerm->leftCursor = pLeft->iTable;
    +      pTerm->u.leftColumn = pLeft->iColumn;
    +      pTerm->eOperator = operatorMask(op);
    +    }
    +    if( pRight && pRight->op==TK_COLUMN ){
    +      WhereTerm *pNew;
    +      Expr *pDup;
    +      if( pTerm->leftCursor>=0 ){
    +        int idxNew;
    +        pDup = sqlite3ExprDup(db, pExpr, 0);
    +        if( db->mallocFailed ){
    +          sqlite3ExprDelete(db, pDup);
    +          return;
    +        }
    +        idxNew = whereClauseInsert(pWC, pDup, TERM_VIRTUAL|TERM_DYNAMIC);
    +        if( idxNew==0 ) return;
    +        pNew = &pWC->a[idxNew];
    +        pNew->iParent = idxTerm;
    +        pTerm = &pWC->a[idxTerm];
    +        pTerm->nChild = 1;
    +        pTerm->wtFlags |= TERM_COPIED;
    +      }else{
    +        pDup = pExpr;
    +        pNew = pTerm;
    +      }
    +      exprCommute(pParse, pDup);
    +      pLeft = pDup->pLeft;
    +      pNew->leftCursor = pLeft->iTable;
    +      pNew->u.leftColumn = pLeft->iColumn;
    +      pNew->prereqRight = prereqLeft;
    +      pNew->prereqAll = prereqAll;
    +      pNew->eOperator = operatorMask(pDup->op);
    +    }
    +  }
    +
    +#ifndef SQLITE_OMIT_BETWEEN_OPTIMIZATION
    +  /* If a term is the BETWEEN operator, create two new virtual terms
    +  ** that define the range that the BETWEEN implements.  For example:
    +  **
    +  **      a BETWEEN b AND c
    +  **
    +  ** is converted into:
    +  **
    +  **      (a BETWEEN b AND c) AND (a>=b) AND (a<=c)
    +  **
    +  ** The two new terms are added onto the end of the WhereClause object.
    +  ** The new terms are "dynamic" and are children of the original BETWEEN
    +  ** term.  That means that if the BETWEEN term is coded, the children are
    +  ** skipped.  Or, if the children are satisfied by an index, the original
    +  ** BETWEEN term is skipped.
    +  */
    +  else if( pExpr->op==TK_BETWEEN && pWC->op==TK_AND ){
    +    ExprList *pList = pExpr->x.pList;
    +    int i;
    +    static const u8 ops[] = {TK_GE, TK_LE};
    +    assert( pList!=0 );
    +    assert( pList->nExpr==2 );
    +    for(i=0; i<2; i++){
    +      Expr *pNewExpr;
    +      int idxNew;
    +      pNewExpr = sqlite3PExpr(pParse, ops[i], 
    +                             sqlite3ExprDup(db, pExpr->pLeft, 0),
    +                             sqlite3ExprDup(db, pList->a[i].pExpr, 0), 0);
    +      idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
    +      testcase( idxNew==0 );
    +      exprAnalyze(pSrc, pWC, idxNew);
    +      pTerm = &pWC->a[idxTerm];
    +      pWC->a[idxNew].iParent = idxTerm;
    +    }
    +    pTerm->nChild = 2;
    +  }
    +#endif /* SQLITE_OMIT_BETWEEN_OPTIMIZATION */
    +
    +#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
    +  /* Analyze a term that is composed of two or more subterms connected by
    +  ** an OR operator.
    +  */
    +  else if( pExpr->op==TK_OR ){
    +    assert( pWC->op==TK_AND );
    +    exprAnalyzeOrTerm(pSrc, pWC, idxTerm);
    +    pTerm = &pWC->a[idxTerm];
    +  }
    +#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
    +
    +#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION
    +  /* Add constraints to reduce the search space on a LIKE or GLOB
    +  ** operator.
    +  **
    +  ** A like pattern of the form "x LIKE 'abc%'" is changed into constraints
    +  **
    +  **          x>='abc' AND x<'abd' AND x LIKE 'abc%'
    +  **
    +  ** The last character of the prefix "abc" is incremented to form the
    +  ** termination condition "abd".
    +  */
    +  if( pWC->op==TK_AND 
    +   && isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)
    +  ){
    +    Expr *pLeft;       /* LHS of LIKE/GLOB operator */
    +    Expr *pStr2;       /* Copy of pStr1 - RHS of LIKE/GLOB operator */
    +    Expr *pNewExpr1;
    +    Expr *pNewExpr2;
    +    int idxNew1;
    +    int idxNew2;
    +
    +    pLeft = pExpr->x.pList->a[1].pExpr;
    +    pStr2 = sqlite3ExprDup(db, pStr1, 0);
    +    if( !db->mallocFailed ){
    +      u8 c, *pC;       /* Last character before the first wildcard */
    +      pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
    +      c = *pC;
    +      if( noCase ){
    +        /* The point is to increment the last character before the first
    +        ** wildcard.  But if we increment '@', that will push it into the
    +        ** alphabetic range where case conversions will mess up the 
    +        ** inequality.  To avoid this, make sure to also run the full
    +        ** LIKE on all candidate expressions by clearing the isComplete flag
    +        */
    +        if( c=='A'-1 ) isComplete = 0;
    +
    +        c = sqlite3UpperToLower[c];
    +      }
    +      *pC = c + 1;
    +    }
    +    pNewExpr1 = sqlite3PExpr(pParse, TK_GE, sqlite3ExprDup(db,pLeft,0),pStr1,0);
    +    idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
    +    testcase( idxNew1==0 );
    +    exprAnalyze(pSrc, pWC, idxNew1);
    +    pNewExpr2 = sqlite3PExpr(pParse, TK_LT, sqlite3ExprDup(db,pLeft,0),pStr2,0);
    +    idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);
    +    testcase( idxNew2==0 );
    +    exprAnalyze(pSrc, pWC, idxNew2);
    +    pTerm = &pWC->a[idxTerm];
    +    if( isComplete ){
    +      pWC->a[idxNew1].iParent = idxTerm;
    +      pWC->a[idxNew2].iParent = idxTerm;
    +      pTerm->nChild = 2;
    +    }
    +  }
    +#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  /* Add a WO_MATCH auxiliary term to the constraint set if the
    +  ** current expression is of the form:  column MATCH expr.
    +  ** This information is used by the xBestIndex methods of
    +  ** virtual tables.  The native query optimizer does not attempt
    +  ** to do anything with MATCH functions.
    +  */
    +  if( isMatchOfColumn(pExpr) ){
    +    int idxNew;
    +    Expr *pRight, *pLeft;
    +    WhereTerm *pNewTerm;
    +    Bitmask prereqColumn, prereqExpr;
    +
    +    pRight = pExpr->x.pList->a[0].pExpr;
    +    pLeft = pExpr->x.pList->a[1].pExpr;
    +    prereqExpr = exprTableUsage(pMaskSet, pRight);
    +    prereqColumn = exprTableUsage(pMaskSet, pLeft);
    +    if( (prereqExpr & prereqColumn)==0 ){
    +      Expr *pNewExpr;
    +      pNewExpr = sqlite3PExpr(pParse, TK_MATCH, 
    +                              0, sqlite3ExprDup(db, pRight, 0), 0);
    +      idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
    +      testcase( idxNew==0 );
    +      pNewTerm = &pWC->a[idxNew];
    +      pNewTerm->prereqRight = prereqExpr;
    +      pNewTerm->leftCursor = pLeft->iTable;
    +      pNewTerm->u.leftColumn = pLeft->iColumn;
    +      pNewTerm->eOperator = WO_MATCH;
    +      pNewTerm->iParent = idxTerm;
    +      pTerm = &pWC->a[idxTerm];
    +      pTerm->nChild = 1;
    +      pTerm->wtFlags |= TERM_COPIED;
    +      pNewTerm->prereqAll = pTerm->prereqAll;
    +    }
    +  }
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +  /* Prevent ON clause terms of a LEFT JOIN from being used to drive
    +  ** an index for tables to the left of the join.
    +  */
    +  pTerm->prereqRight |= extraRight;
    +}
    +
    +/*
    +** Return TRUE if any of the expressions in pList->a[iFirst...] contain
    +** a reference to any table other than the iBase table.
    +*/
    +static int referencesOtherTables(
    +  ExprList *pList,          /* Search expressions in ths list */
    +  WhereMaskSet *pMaskSet,   /* Mapping from tables to bitmaps */
    +  int iFirst,               /* Be searching with the iFirst-th expression */
    +  int iBase                 /* Ignore references to this table */
    +){
    +  Bitmask allowed = ~getMask(pMaskSet, iBase);
    +  while( iFirst<pList->nExpr ){
    +    if( (exprTableUsage(pMaskSet, pList->a[iFirst++].pExpr)&allowed)!=0 ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +
    +/*
    +** This routine decides if pIdx can be used to satisfy the ORDER BY
    +** clause.  If it can, it returns 1.  If pIdx cannot satisfy the
    +** ORDER BY clause, this routine returns 0.
    +**
    +** pOrderBy is an ORDER BY clause from a SELECT statement.  pTab is the
    +** left-most table in the FROM clause of that same SELECT statement and
    +** the table has a cursor number of "base".  pIdx is an index on pTab.
    +**
    +** nEqCol is the number of columns of pIdx that are used as equality
    +** constraints.  Any of these columns may be missing from the ORDER BY
    +** clause and the match can still be a success.
    +**
    +** All terms of the ORDER BY that match against the index must be either
    +** ASC or DESC.  (Terms of the ORDER BY clause past the end of a UNIQUE
    +** index do not need to satisfy this constraint.)  The *pbRev value is
    +** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
    +** the ORDER BY clause is all ASC.
    +*/
    +static int isSortingIndex(
    +  Parse *pParse,          /* Parsing context */
    +  WhereMaskSet *pMaskSet, /* Mapping from table cursor numbers to bitmaps */
    +  Index *pIdx,            /* The index we are testing */
    +  int base,               /* Cursor number for the table to be sorted */
    +  ExprList *pOrderBy,     /* The ORDER BY clause */
    +  int nEqCol,             /* Number of index columns with == constraints */
    +  int *pbRev              /* Set to 1 if ORDER BY is DESC */
    +){
    +  int i, j;                       /* Loop counters */
    +  int sortOrder = 0;              /* XOR of index and ORDER BY sort direction */
    +  int nTerm;                      /* Number of ORDER BY terms */
    +  struct ExprList_item *pTerm;    /* A term of the ORDER BY clause */
    +  sqlite3 *db = pParse->db;
    +
    +  assert( pOrderBy!=0 );
    +  nTerm = pOrderBy->nExpr;
    +  assert( nTerm>0 );
    +
    +  /* Argument pIdx must either point to a 'real' named index structure, 
    +  ** or an index structure allocated on the stack by bestBtreeIndex() to
    +  ** represent the rowid index that is part of every table.  */
    +  assert( pIdx->zName || (pIdx->nColumn==1 && pIdx->aiColumn[0]==-1) );
    +
    +  /* Match terms of the ORDER BY clause against columns of
    +  ** the index.
    +  **
    +  ** Note that indices have pIdx->nColumn regular columns plus
    +  ** one additional column containing the rowid.  The rowid column
    +  ** of the index is also allowed to match against the ORDER BY
    +  ** clause.
    +  */
    +  for(i=j=0, pTerm=pOrderBy->a; j<nTerm && i<=pIdx->nColumn; i++){
    +    Expr *pExpr;       /* The expression of the ORDER BY pTerm */
    +    CollSeq *pColl;    /* The collating sequence of pExpr */
    +    int termSortOrder; /* Sort order for this term */
    +    int iColumn;       /* The i-th column of the index.  -1 for rowid */
    +    int iSortOrder;    /* 1 for DESC, 0 for ASC on the i-th index term */
    +    const char *zColl; /* Name of the collating sequence for i-th index term */
    +
    +    pExpr = pTerm->pExpr;
    +    if( pExpr->op!=TK_COLUMN || pExpr->iTable!=base ){
    +      /* Can not use an index sort on anything that is not a column in the
    +      ** left-most table of the FROM clause */
    +      break;
    +    }
    +    pColl = sqlite3ExprCollSeq(pParse, pExpr);
    +    if( !pColl ){
    +      pColl = db->pDfltColl;
    +    }
    +    if( pIdx->zName && i<pIdx->nColumn ){
    +      iColumn = pIdx->aiColumn[i];
    +      if( iColumn==pIdx->pTable->iPKey ){
    +        iColumn = -1;
    +      }
    +      iSortOrder = pIdx->aSortOrder[i];
    +      zColl = pIdx->azColl[i];
    +    }else{
    +      iColumn = -1;
    +      iSortOrder = 0;
    +      zColl = pColl->zName;
    +    }
    +    if( pExpr->iColumn!=iColumn || sqlite3StrICmp(pColl->zName, zColl) ){
    +      /* Term j of the ORDER BY clause does not match column i of the index */
    +      if( i<nEqCol ){
    +        /* If an index column that is constrained by == fails to match an
    +        ** ORDER BY term, that is OK.  Just ignore that column of the index
    +        */
    +        continue;
    +      }else if( i==pIdx->nColumn ){
    +        /* Index column i is the rowid.  All other terms match. */
    +        break;
    +      }else{
    +        /* If an index column fails to match and is not constrained by ==
    +        ** then the index cannot satisfy the ORDER BY constraint.
    +        */
    +        return 0;
    +      }
    +    }
    +    assert( pIdx->aSortOrder!=0 || iColumn==-1 );
    +    assert( pTerm->sortOrder==0 || pTerm->sortOrder==1 );
    +    assert( iSortOrder==0 || iSortOrder==1 );
    +    termSortOrder = iSortOrder ^ pTerm->sortOrder;
    +    if( i>nEqCol ){
    +      if( termSortOrder!=sortOrder ){
    +        /* Indices can only be used if all ORDER BY terms past the
    +        ** equality constraints are all either DESC or ASC. */
    +        return 0;
    +      }
    +    }else{
    +      sortOrder = termSortOrder;
    +    }
    +    j++;
    +    pTerm++;
    +    if( iColumn<0 && !referencesOtherTables(pOrderBy, pMaskSet, j, base) ){
    +      /* If the indexed column is the primary key and everything matches
    +      ** so far and none of the ORDER BY terms to the right reference other
    +      ** tables in the join, then we are assured that the index can be used 
    +      ** to sort because the primary key is unique and so none of the other
    +      ** columns will make any difference
    +      */
    +      j = nTerm;
    +    }
    +  }
    +
    +  *pbRev = sortOrder!=0;
    +  if( j>=nTerm ){
    +    /* All terms of the ORDER BY clause are covered by this index so
    +    ** this index can be used for sorting. */
    +    return 1;
    +  }
    +  if( pIdx->onError!=OE_None && i==pIdx->nColumn
    +      && !referencesOtherTables(pOrderBy, pMaskSet, j, base) ){
    +    /* All terms of this index match some prefix of the ORDER BY clause
    +    ** and the index is UNIQUE and no terms on the tail of the ORDER BY
    +    ** clause reference other tables in a join.  If this is all true then
    +    ** the order by clause is superfluous. */
    +    return 1;
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Prepare a crude estimate of the logarithm of the input value.
    +** The results need not be exact.  This is only used for estimating
    +** the total cost of performing operations with O(logN) or O(NlogN)
    +** complexity.  Because N is just a guess, it is no great tragedy if
    +** logN is a little off.
    +*/
    +static double estLog(double N){
    +  double logN = 1;
    +  double x = 10;
    +  while( N>x ){
    +    logN += 1;
    +    x *= 10;
    +  }
    +  return logN;
    +}
    +
    +/*
    +** Two routines for printing the content of an sqlite3_index_info
    +** structure.  Used for testing and debugging only.  If neither
    +** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines
    +** are no-ops.
    +*/
    +#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_DEBUG)
    +static void TRACE_IDX_INPUTS(sqlite3_index_info *p){
    +  int i;
    +  if( !sqlite3WhereTrace ) return;
    +  for(i=0; i<p->nConstraint; i++){
    +    sqlite3DebugPrintf("  constraint[%d]: col=%d termid=%d op=%d usabled=%d\n",
    +       i,
    +       p->aConstraint[i].iColumn,
    +       p->aConstraint[i].iTermOffset,
    +       p->aConstraint[i].op,
    +       p->aConstraint[i].usable);
    +  }
    +  for(i=0; i<p->nOrderBy; i++){
    +    sqlite3DebugPrintf("  orderby[%d]: col=%d desc=%d\n",
    +       i,
    +       p->aOrderBy[i].iColumn,
    +       p->aOrderBy[i].desc);
    +  }
    +}
    +static void TRACE_IDX_OUTPUTS(sqlite3_index_info *p){
    +  int i;
    +  if( !sqlite3WhereTrace ) return;
    +  for(i=0; i<p->nConstraint; i++){
    +    sqlite3DebugPrintf("  usage[%d]: argvIdx=%d omit=%d\n",
    +       i,
    +       p->aConstraintUsage[i].argvIndex,
    +       p->aConstraintUsage[i].omit);
    +  }
    +  sqlite3DebugPrintf("  idxNum=%d\n", p->idxNum);
    +  sqlite3DebugPrintf("  idxStr=%s\n", p->idxStr);
    +  sqlite3DebugPrintf("  orderByConsumed=%d\n", p->orderByConsumed);
    +  sqlite3DebugPrintf("  estimatedCost=%g\n", p->estimatedCost);
    +}
    +#else
    +#define TRACE_IDX_INPUTS(A)
    +#define TRACE_IDX_OUTPUTS(A)
    +#endif
    +
    +/* 
    +** Required because bestIndex() is called by bestOrClauseIndex() 
    +*/
    +static void bestIndex(
    +    Parse*, WhereClause*, struct SrcList_item*, Bitmask, ExprList*, WhereCost*);
    +
    +/*
    +** This routine attempts to find an scanning strategy that can be used 
    +** to optimize an 'OR' expression that is part of a WHERE clause. 
    +**
    +** The table associated with FROM clause term pSrc may be either a
    +** regular B-Tree table or a virtual table.
    +*/
    +static void bestOrClauseIndex(
    +  Parse *pParse,              /* The parsing context */
    +  WhereClause *pWC,           /* The WHERE clause */
    +  struct SrcList_item *pSrc,  /* The FROM clause term to search */
    +  Bitmask notReady,           /* Mask of cursors that are not available */
    +  ExprList *pOrderBy,         /* The ORDER BY clause */
    +  WhereCost *pCost            /* Lowest cost query plan */
    +){
    +#ifndef SQLITE_OMIT_OR_OPTIMIZATION
    +  const int iCur = pSrc->iCursor;   /* The cursor of the table to be accessed */
    +  const Bitmask maskSrc = getMask(pWC->pMaskSet, iCur);  /* Bitmask for pSrc */
    +  WhereTerm * const pWCEnd = &pWC->a[pWC->nTerm];        /* End of pWC->a[] */
    +  WhereTerm *pTerm;                 /* A single term of the WHERE clause */
    +
    +  /* Search the WHERE clause terms for a usable WO_OR term. */
    +  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
    +    if( pTerm->eOperator==WO_OR 
    +     && ((pTerm->prereqAll & ~maskSrc) & notReady)==0
    +     && (pTerm->u.pOrInfo->indexable & maskSrc)!=0 
    +    ){
    +      WhereClause * const pOrWC = &pTerm->u.pOrInfo->wc;
    +      WhereTerm * const pOrWCEnd = &pOrWC->a[pOrWC->nTerm];
    +      WhereTerm *pOrTerm;
    +      int flags = WHERE_MULTI_OR;
    +      double rTotal = 0;
    +      double nRow = 0;
    +      Bitmask used = 0;
    +
    +      for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
    +        WhereCost sTermCost;
    +        WHERETRACE(("... Multi-index OR testing for term %d of %d....\n", 
    +          (pOrTerm - pOrWC->a), (pTerm - pWC->a)
    +        ));
    +        if( pOrTerm->eOperator==WO_AND ){
    +          WhereClause *pAndWC = &pOrTerm->u.pAndInfo->wc;
    +          bestIndex(pParse, pAndWC, pSrc, notReady, 0, &sTermCost);
    +        }else if( pOrTerm->leftCursor==iCur ){
    +          WhereClause tempWC;
    +          tempWC.pParse = pWC->pParse;
    +          tempWC.pMaskSet = pWC->pMaskSet;
    +          tempWC.op = TK_AND;
    +          tempWC.a = pOrTerm;
    +          tempWC.nTerm = 1;
    +          bestIndex(pParse, &tempWC, pSrc, notReady, 0, &sTermCost);
    +        }else{
    +          continue;
    +        }
    +        rTotal += sTermCost.rCost;
    +        nRow += sTermCost.nRow;
    +        used |= sTermCost.used;
    +        if( rTotal>=pCost->rCost ) break;
    +      }
    +
    +      /* If there is an ORDER BY clause, increase the scan cost to account 
    +      ** for the cost of the sort. */
    +      if( pOrderBy!=0 ){
    +        rTotal += nRow*estLog(nRow);
    +        WHERETRACE(("... sorting increases OR cost to %.9g\n", rTotal));
    +      }
    +
    +      /* If the cost of scanning using this OR term for optimization is
    +      ** less than the current cost stored in pCost, replace the contents
    +      ** of pCost. */
    +      WHERETRACE(("... multi-index OR cost=%.9g nrow=%.9g\n", rTotal, nRow));
    +      if( rTotal<pCost->rCost ){
    +        pCost->rCost = rTotal;
    +        pCost->nRow = nRow;
    +        pCost->used = used;
    +        pCost->plan.wsFlags = flags;
    +        pCost->plan.u.pTerm = pTerm;
    +      }
    +    }
    +  }
    +#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
    +}
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +/*
    +** Allocate and populate an sqlite3_index_info structure. It is the 
    +** responsibility of the caller to eventually release the structure
    +** by passing the pointer returned by this function to sqlite3_free().
    +*/
    +static sqlite3_index_info *allocateIndexInfo(
    +  Parse *pParse, 
    +  WhereClause *pWC,
    +  struct SrcList_item *pSrc,
    +  ExprList *pOrderBy
    +){
    +  int i, j;
    +  int nTerm;
    +  struct sqlite3_index_constraint *pIdxCons;
    +  struct sqlite3_index_orderby *pIdxOrderBy;
    +  struct sqlite3_index_constraint_usage *pUsage;
    +  WhereTerm *pTerm;
    +  int nOrderBy;
    +  sqlite3_index_info *pIdxInfo;
    +
    +  WHERETRACE(("Recomputing index info for %s...\n", pSrc->pTab->zName));
    +
    +  /* Count the number of possible WHERE clause constraints referring
    +  ** to this virtual table */
    +  for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
    +    if( pTerm->leftCursor != pSrc->iCursor ) continue;
    +    assert( (pTerm->eOperator&(pTerm->eOperator-1))==0 );
    +    testcase( pTerm->eOperator==WO_IN );
    +    testcase( pTerm->eOperator==WO_ISNULL );
    +    if( pTerm->eOperator & (WO_IN|WO_ISNULL) ) continue;
    +    nTerm++;
    +  }
    +
    +  /* If the ORDER BY clause contains only columns in the current 
    +  ** virtual table then allocate space for the aOrderBy part of
    +  ** the sqlite3_index_info structure.
    +  */
    +  nOrderBy = 0;
    +  if( pOrderBy ){
    +    for(i=0; i<pOrderBy->nExpr; i++){
    +      Expr *pExpr = pOrderBy->a[i].pExpr;
    +      if( pExpr->op!=TK_COLUMN || pExpr->iTable!=pSrc->iCursor ) break;
    +    }
    +    if( i==pOrderBy->nExpr ){
    +      nOrderBy = pOrderBy->nExpr;
    +    }
    +  }
    +
    +  /* Allocate the sqlite3_index_info structure
    +  */
    +  pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
    +                           + (sizeof(*pIdxCons) + sizeof(*pUsage))*nTerm
    +                           + sizeof(*pIdxOrderBy)*nOrderBy );
    +  if( pIdxInfo==0 ){
    +    sqlite3ErrorMsg(pParse, "out of memory");
    +    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
    +    return 0;
    +  }
    +
    +  /* Initialize the structure.  The sqlite3_index_info structure contains
    +  ** many fields that are declared "const" to prevent xBestIndex from
    +  ** changing them.  We have to do some funky casting in order to
    +  ** initialize those fields.
    +  */
    +  pIdxCons = (struct sqlite3_index_constraint*)&pIdxInfo[1];
    +  pIdxOrderBy = (struct sqlite3_index_orderby*)&pIdxCons[nTerm];
    +  pUsage = (struct sqlite3_index_constraint_usage*)&pIdxOrderBy[nOrderBy];
    +  *(int*)&pIdxInfo->nConstraint = nTerm;
    +  *(int*)&pIdxInfo->nOrderBy = nOrderBy;
    +  *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;
    +  *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;
    +  *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =
    +                                                                   pUsage;
    +
    +  for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
    +    if( pTerm->leftCursor != pSrc->iCursor ) continue;
    +    assert( (pTerm->eOperator&(pTerm->eOperator-1))==0 );
    +    testcase( pTerm->eOperator==WO_IN );
    +    testcase( pTerm->eOperator==WO_ISNULL );
    +    if( pTerm->eOperator & (WO_IN|WO_ISNULL) ) continue;
    +    pIdxCons[j].iColumn = pTerm->u.leftColumn;
    +    pIdxCons[j].iTermOffset = i;
    +    pIdxCons[j].op = (u8)pTerm->eOperator;
    +    /* The direct assignment in the previous line is possible only because
    +    ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical.  The
    +    ** following asserts verify this fact. */
    +    assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
    +    assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
    +    assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
    +    assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
    +    assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
    +    assert( WO_MATCH==SQLITE_INDEX_CONSTRAINT_MATCH );
    +    assert( pTerm->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH) );
    +    j++;
    +  }
    +  for(i=0; i<nOrderBy; i++){
    +    Expr *pExpr = pOrderBy->a[i].pExpr;
    +    pIdxOrderBy[i].iColumn = pExpr->iColumn;
    +    pIdxOrderBy[i].desc = pOrderBy->a[i].sortOrder;
    +  }
    +
    +  return pIdxInfo;
    +}
    +
    +/*
    +** The table object reference passed as the second argument to this function
    +** must represent a virtual table. This function invokes the xBestIndex()
    +** method of the virtual table with the sqlite3_index_info pointer passed
    +** as the argument.
    +**
    +** If an error occurs, pParse is populated with an error message and a
    +** non-zero value is returned. Otherwise, 0 is returned and the output
    +** part of the sqlite3_index_info structure is left populated.
    +**
    +** Whether or not an error is returned, it is the responsibility of the
    +** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
    +** that this is required.
    +*/
    +static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){
    +  sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;
    +  int i;
    +  int rc;
    +
    +  (void)sqlite3SafetyOff(pParse->db);
    +  WHERETRACE(("xBestIndex for %s\n", pTab->zName));
    +  TRACE_IDX_INPUTS(p);
    +  rc = pVtab->pModule->xBestIndex(pVtab, p);
    +  TRACE_IDX_OUTPUTS(p);
    +  (void)sqlite3SafetyOn(pParse->db);
    +
    +  if( rc!=SQLITE_OK ){
    +    if( rc==SQLITE_NOMEM ){
    +      pParse->db->mallocFailed = 1;
    +    }else if( !pVtab->zErrMsg ){
    +      sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));
    +    }else{
    +      sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
    +    }
    +  }
    +  sqlite3DbFree(pParse->db, pVtab->zErrMsg);
    +  pVtab->zErrMsg = 0;
    +
    +  for(i=0; i<p->nConstraint; i++){
    +    if( !p->aConstraint[i].usable && p->aConstraintUsage[i].argvIndex>0 ){
    +      sqlite3ErrorMsg(pParse, 
    +          "table %s: xBestIndex returned an invalid plan", pTab->zName);
    +    }
    +  }
    +
    +  return pParse->nErr;
    +}
    +
    +
    +/*
    +** Compute the best index for a virtual table.
    +**
    +** The best index is computed by the xBestIndex method of the virtual
    +** table module.  This routine is really just a wrapper that sets up
    +** the sqlite3_index_info structure that is used to communicate with
    +** xBestIndex.
    +**
    +** In a join, this routine might be called multiple times for the
    +** same virtual table.  The sqlite3_index_info structure is created
    +** and initialized on the first invocation and reused on all subsequent
    +** invocations.  The sqlite3_index_info structure is also used when
    +** code is generated to access the virtual table.  The whereInfoDelete() 
    +** routine takes care of freeing the sqlite3_index_info structure after
    +** everybody has finished with it.
    +*/
    +static void bestVirtualIndex(
    +  Parse *pParse,                  /* The parsing context */
    +  WhereClause *pWC,               /* The WHERE clause */
    +  struct SrcList_item *pSrc,      /* The FROM clause term to search */
    +  Bitmask notReady,               /* Mask of cursors that are not available */
    +  ExprList *pOrderBy,             /* The order by clause */
    +  WhereCost *pCost,               /* Lowest cost query plan */
    +  sqlite3_index_info **ppIdxInfo  /* Index information passed to xBestIndex */
    +){
    +  Table *pTab = pSrc->pTab;
    +  sqlite3_index_info *pIdxInfo;
    +  struct sqlite3_index_constraint *pIdxCons;
    +  struct sqlite3_index_constraint_usage *pUsage;
    +  WhereTerm *pTerm;
    +  int i, j;
    +  int nOrderBy;
    +
    +  /* Make sure wsFlags is initialized to some sane value. Otherwise, if the 
    +  ** malloc in allocateIndexInfo() fails and this function returns leaving
    +  ** wsFlags in an uninitialized state, the caller may behave unpredictably.
    +  */
    +  memset(pCost, 0, sizeof(*pCost));
    +  pCost->plan.wsFlags = WHERE_VIRTUALTABLE;
    +
    +  /* If the sqlite3_index_info structure has not been previously
    +  ** allocated and initialized, then allocate and initialize it now.
    +  */
    +  pIdxInfo = *ppIdxInfo;
    +  if( pIdxInfo==0 ){
    +    *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
    +  }
    +  if( pIdxInfo==0 ){
    +    return;
    +  }
    +
    +  /* At this point, the sqlite3_index_info structure that pIdxInfo points
    +  ** to will have been initialized, either during the current invocation or
    +  ** during some prior invocation.  Now we just have to customize the
    +  ** details of pIdxInfo for the current invocation and pass it to
    +  ** xBestIndex.
    +  */
    +
    +  /* The module name must be defined. Also, by this point there must
    +  ** be a pointer to an sqlite3_vtab structure. Otherwise
    +  ** sqlite3ViewGetColumnNames() would have picked up the error. 
    +  */
    +  assert( pTab->azModuleArg && pTab->azModuleArg[0] );
    +  assert( sqlite3GetVTable(pParse->db, pTab) );
    +
    +  /* Set the aConstraint[].usable fields and initialize all 
    +  ** output variables to zero.
    +  **
    +  ** aConstraint[].usable is true for constraints where the right-hand
    +  ** side contains only references to tables to the left of the current
    +  ** table.  In other words, if the constraint is of the form:
    +  **
    +  **           column = expr
    +  **
    +  ** and we are evaluating a join, then the constraint on column is 
    +  ** only valid if all tables referenced in expr occur to the left
    +  ** of the table containing column.
    +  **
    +  ** The aConstraints[] array contains entries for all constraints
    +  ** on the current table.  That way we only have to compute it once
    +  ** even though we might try to pick the best index multiple times.
    +  ** For each attempt at picking an index, the order of tables in the
    +  ** join might be different so we have to recompute the usable flag
    +  ** each time.
    +  */
    +  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
    +  pUsage = pIdxInfo->aConstraintUsage;
    +  for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
    +    j = pIdxCons->iTermOffset;
    +    pTerm = &pWC->a[j];
    +    pIdxCons->usable = (pTerm->prereqRight&notReady) ? 0 : 1;
    +  }
    +  memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo->nConstraint);
    +  if( pIdxInfo->needToFreeIdxStr ){
    +    sqlite3_free(pIdxInfo->idxStr);
    +  }
    +  pIdxInfo->idxStr = 0;
    +  pIdxInfo->idxNum = 0;
    +  pIdxInfo->needToFreeIdxStr = 0;
    +  pIdxInfo->orderByConsumed = 0;
    +  /* ((double)2) In case of SQLITE_OMIT_FLOATING_POINT... */
    +  pIdxInfo->estimatedCost = SQLITE_BIG_DBL / ((double)2);
    +  nOrderBy = pIdxInfo->nOrderBy;
    +  if( !pOrderBy ){
    +    pIdxInfo->nOrderBy = 0;
    +  }
    +
    +  if( vtabBestIndex(pParse, pTab, pIdxInfo) ){
    +    return;
    +  }
    +
    +  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
    +  for(i=0; i<pIdxInfo->nConstraint; i++){
    +    if( pUsage[i].argvIndex>0 ){
    +      pCost->used |= pWC->a[pIdxCons[i].iTermOffset].prereqRight;
    +    }
    +  }
    +
    +  /* The cost is not allowed to be larger than SQLITE_BIG_DBL (the
    +  ** inital value of lowestCost in this loop. If it is, then the
    +  ** (cost<lowestCost) test below will never be true.
    +  ** 
    +  ** Use "(double)2" instead of "2.0" in case OMIT_FLOATING_POINT 
    +  ** is defined.
    +  */
    +  if( (SQLITE_BIG_DBL/((double)2))<pIdxInfo->estimatedCost ){
    +    pCost->rCost = (SQLITE_BIG_DBL/((double)2));
    +  }else{
    +    pCost->rCost = pIdxInfo->estimatedCost;
    +  }
    +  pCost->plan.u.pVtabIdx = pIdxInfo;
    +  if( pIdxInfo->orderByConsumed ){
    +    pCost->plan.wsFlags |= WHERE_ORDERBY;
    +  }
    +  pCost->plan.nEq = 0;
    +  pIdxInfo->nOrderBy = nOrderBy;
    +
    +  /* Try to find a more efficient access pattern by using multiple indexes
    +  ** to optimize an OR expression within the WHERE clause. 
    +  */
    +  bestOrClauseIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost);
    +}
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +/*
    +** Argument pIdx is a pointer to an index structure that has an array of
    +** SQLITE_INDEX_SAMPLES evenly spaced samples of the first indexed column
    +** stored in Index.aSample. The domain of values stored in said column
    +** may be thought of as divided into (SQLITE_INDEX_SAMPLES+1) regions.
    +** Region 0 contains all values smaller than the first sample value. Region
    +** 1 contains values larger than or equal to the value of the first sample,
    +** but smaller than the value of the second. And so on.
    +**
    +** If successful, this function determines which of the regions value 
    +** pVal lies in, sets *piRegion to the region index (a value between 0
    +** and SQLITE_INDEX_SAMPLES+1, inclusive) and returns SQLITE_OK.
    +** Or, if an OOM occurs while converting text values between encodings,
    +** SQLITE_NOMEM is returned and *piRegion is undefined.
    +*/
    +#ifdef SQLITE_ENABLE_STAT2
    +static int whereRangeRegion(
    +  Parse *pParse,              /* Database connection */
    +  Index *pIdx,                /* Index to consider domain of */
    +  sqlite3_value *pVal,        /* Value to consider */
    +  int *piRegion               /* OUT: Region of domain in which value lies */
    +){
    +  if( ALWAYS(pVal) ){
    +    IndexSample *aSample = pIdx->aSample;
    +    int i = 0;
    +    int eType = sqlite3_value_type(pVal);
    +
    +    if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
    +      double r = sqlite3_value_double(pVal);
    +      for(i=0; i<SQLITE_INDEX_SAMPLES; i++){
    +        if( aSample[i].eType==SQLITE_NULL ) continue;
    +        if( aSample[i].eType>=SQLITE_TEXT || aSample[i].u.r>r ) break;
    +      }
    +    }else{ 
    +      sqlite3 *db = pParse->db;
    +      CollSeq *pColl;
    +      const u8 *z;
    +      int n;
    +
    +      /* pVal comes from sqlite3ValueFromExpr() so the type cannot be NULL */
    +      assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );
    +
    +      if( eType==SQLITE_BLOB ){
    +        z = (const u8 *)sqlite3_value_blob(pVal);
    +        pColl = db->pDfltColl;
    +        assert( pColl->enc==SQLITE_UTF8 );
    +      }else{
    +        pColl = sqlite3GetCollSeq(db, SQLITE_UTF8, 0, *pIdx->azColl);
    +        if( pColl==0 ){
    +          sqlite3ErrorMsg(pParse, "no such collation sequence: %s",
    +                          *pIdx->azColl);
    +          return SQLITE_ERROR;
    +        }
    +        z = (const u8 *)sqlite3ValueText(pVal, pColl->enc);
    +        if( !z ){
    +          return SQLITE_NOMEM;
    +        }
    +        assert( z && pColl && pColl->xCmp );
    +      }
    +      n = sqlite3ValueBytes(pVal, pColl->enc);
    +
    +      for(i=0; i<SQLITE_INDEX_SAMPLES; i++){
    +        int r;
    +        int eSampletype = aSample[i].eType;
    +        if( eSampletype==SQLITE_NULL || eSampletype<eType ) continue;
    +        if( (eSampletype!=eType) ) break;
    +#ifndef SQLITE_OMIT_UTF16
    +        if( pColl->enc!=SQLITE_UTF8 ){
    +          int nSample;
    +          char *zSample = sqlite3Utf8to16(
    +              db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
    +          );
    +          if( !zSample ){
    +            assert( db->mallocFailed );
    +            return SQLITE_NOMEM;
    +          }
    +          r = pColl->xCmp(pColl->pUser, nSample, zSample, n, z);
    +          sqlite3DbFree(db, zSample);
    +        }else
    +#endif
    +        {
    +          r = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
    +        }
    +        if( r>0 ) break;
    +      }
    +    }
    +
    +    assert( i>=0 && i<=SQLITE_INDEX_SAMPLES );
    +    *piRegion = i;
    +  }
    +  return SQLITE_OK;
    +}
    +#endif   /* #ifdef SQLITE_ENABLE_STAT2 */
    +
    +/*
    +** If expression pExpr represents a literal value, set *pp to point to
    +** an sqlite3_value structure containing the same value, with affinity
    +** aff applied to it, before returning. It is the responsibility of the 
    +** caller to eventually release this structure by passing it to 
    +** sqlite3ValueFree().
    +**
    +** If the current parse is a recompile (sqlite3Reprepare()) and pExpr
    +** is an SQL variable that currently has a non-NULL value bound to it,
    +** create an sqlite3_value structure containing this value, again with
    +** affinity aff applied to it, instead.
    +**
    +** If neither of the above apply, set *pp to NULL.
    +**
    +** If an error occurs, return an error code. Otherwise, SQLITE_OK.
    +*/
    +#ifdef SQLITE_ENABLE_STAT2
    +static int valueFromExpr(
    +  Parse *pParse, 
    +  Expr *pExpr, 
    +  u8 aff, 
    +  sqlite3_value **pp
    +){
    +  /* The evalConstExpr() function will have already converted any TK_VARIABLE
    +  ** expression involved in an comparison into a TK_REGISTER. */
    +  assert( pExpr->op!=TK_VARIABLE );
    +  if( pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE ){
    +    int iVar = pExpr->iColumn;
    +    sqlite3VdbeSetVarmask(pParse->pVdbe, iVar);
    +    *pp = sqlite3VdbeGetValue(pParse->pReprepare, iVar, aff);
    +    return SQLITE_OK;
    +  }
    +  return sqlite3ValueFromExpr(pParse->db, pExpr, SQLITE_UTF8, aff, pp);
    +}
    +#endif
    +
    +/*
    +** This function is used to estimate the number of rows that will be visited
    +** by scanning an index for a range of values. The range may have an upper
    +** bound, a lower bound, or both. The WHERE clause terms that set the upper
    +** and lower bounds are represented by pLower and pUpper respectively. For
    +** example, assuming that index p is on t1(a):
    +**
    +**   ... FROM t1 WHERE a > ? AND a < ? ...
    +**                    |_____|   |_____|
    +**                       |         |
    +**                     pLower    pUpper
    +**
    +** If either of the upper or lower bound is not present, then NULL is passed in
    +** place of the corresponding WhereTerm.
    +**
    +** The nEq parameter is passed the index of the index column subject to the
    +** range constraint. Or, equivalently, the number of equality constraints
    +** optimized by the proposed index scan. For example, assuming index p is
    +** on t1(a, b), and the SQL query is:
    +**
    +**   ... FROM t1 WHERE a = ? AND b > ? AND b < ? ...
    +**
    +** then nEq should be passed the value 1 (as the range restricted column,
    +** b, is the second left-most column of the index). Or, if the query is:
    +**
    +**   ... FROM t1 WHERE a > ? AND a < ? ...
    +**
    +** then nEq should be passed 0.
    +**
    +** The returned value is an integer between 1 and 100, inclusive. A return
    +** value of 1 indicates that the proposed range scan is expected to visit
    +** approximately 1/100th (1%) of the rows selected by the nEq equality
    +** constraints (if any). A return value of 100 indicates that it is expected
    +** that the range scan will visit every row (100%) selected by the equality
    +** constraints.
    +**
    +** In the absence of sqlite_stat2 ANALYZE data, each range inequality
    +** reduces the search space by 2/3rds.  Hence a single constraint (x>?)
    +** results in a return of 33 and a range constraint (x>? AND x<?) results
    +** in a return of 11.
    +*/
    +static int whereRangeScanEst(
    +  Parse *pParse,       /* Parsing & code generating context */
    +  Index *p,            /* The index containing the range-compared column; "x" */
    +  int nEq,             /* index into p->aCol[] of the range-compared column */
    +  WhereTerm *pLower,   /* Lower bound on the range. ex: "x>123" Might be NULL */
    +  WhereTerm *pUpper,   /* Upper bound on the range. ex: "x<455" Might be NULL */
    +  int *piEst           /* OUT: Return value */
    +){
    +  int rc = SQLITE_OK;
    +
    +#ifdef SQLITE_ENABLE_STAT2
    +
    +  if( nEq==0 && p->aSample ){
    +    sqlite3_value *pLowerVal = 0;
    +    sqlite3_value *pUpperVal = 0;
    +    int iEst;
    +    int iLower = 0;
    +    int iUpper = SQLITE_INDEX_SAMPLES;
    +    u8 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
    +
    +    if( pLower ){
    +      Expr *pExpr = pLower->pExpr->pRight;
    +      rc = valueFromExpr(pParse, pExpr, aff, &pLowerVal);
    +    }
    +    if( rc==SQLITE_OK && pUpper ){
    +      Expr *pExpr = pUpper->pExpr->pRight;
    +      rc = valueFromExpr(pParse, pExpr, aff, &pUpperVal);
    +    }
    +
    +    if( rc!=SQLITE_OK || (pLowerVal==0 && pUpperVal==0) ){
    +      sqlite3ValueFree(pLowerVal);
    +      sqlite3ValueFree(pUpperVal);
    +      goto range_est_fallback;
    +    }else if( pLowerVal==0 ){
    +      rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
    +      if( pLower ) iLower = iUpper/2;
    +    }else if( pUpperVal==0 ){
    +      rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
    +      if( pUpper ) iUpper = (iLower + SQLITE_INDEX_SAMPLES + 1)/2;
    +    }else{
    +      rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
    +      if( rc==SQLITE_OK ){
    +        rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
    +      }
    +    }
    +
    +    iEst = iUpper - iLower;
    +    testcase( iEst==SQLITE_INDEX_SAMPLES );
    +    assert( iEst<=SQLITE_INDEX_SAMPLES );
    +    if( iEst<1 ){
    +      iEst = 1;
    +    }
    +
    +    sqlite3ValueFree(pLowerVal);
    +    sqlite3ValueFree(pUpperVal);
    +    *piEst = (iEst * 100)/SQLITE_INDEX_SAMPLES;
    +    return rc;
    +  }
    +range_est_fallback:
    +#else
    +  UNUSED_PARAMETER(pParse);
    +  UNUSED_PARAMETER(p);
    +  UNUSED_PARAMETER(nEq);
    +#endif
    +  assert( pLower || pUpper );
    +  if( pLower && pUpper ){
    +    *piEst = 11;
    +  }else{
    +    *piEst = 33;
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Find the query plan for accessing a particular table.  Write the
    +** best query plan and its cost into the WhereCost object supplied as the
    +** last parameter.
    +**
    +** The lowest cost plan wins.  The cost is an estimate of the amount of
    +** CPU and disk I/O need to process the request using the selected plan.
    +** Factors that influence cost include:
    +**
    +**    *  The estimated number of rows that will be retrieved.  (The
    +**       fewer the better.)
    +**
    +**    *  Whether or not sorting must occur.
    +**
    +**    *  Whether or not there must be separate lookups in the
    +**       index and in the main table.
    +**
    +** If there was an INDEXED BY clause (pSrc->pIndex) attached to the table in
    +** the SQL statement, then this function only considers plans using the 
    +** named index. If no such plan is found, then the returned cost is
    +** SQLITE_BIG_DBL. If a plan is found that uses the named index, 
    +** then the cost is calculated in the usual way.
    +**
    +** If a NOT INDEXED clause (pSrc->notIndexed!=0) was attached to the table 
    +** in the SELECT statement, then no indexes are considered. However, the 
    +** selected plan may still take advantage of the tables built-in rowid
    +** index.
    +*/
    +static void bestBtreeIndex(
    +  Parse *pParse,              /* The parsing context */
    +  WhereClause *pWC,           /* The WHERE clause */
    +  struct SrcList_item *pSrc,  /* The FROM clause term to search */
    +  Bitmask notReady,           /* Mask of cursors that are not available */
    +  ExprList *pOrderBy,         /* The ORDER BY clause */
    +  WhereCost *pCost            /* Lowest cost query plan */
    +){
    +  int iCur = pSrc->iCursor;   /* The cursor of the table to be accessed */
    +  Index *pProbe;              /* An index we are evaluating */
    +  Index *pIdx;                /* Copy of pProbe, or zero for IPK index */
    +  int eqTermMask;             /* Current mask of valid equality operators */
    +  int idxEqTermMask;          /* Index mask of valid equality operators */
    +  Index sPk;                  /* A fake index object for the primary key */
    +  unsigned int aiRowEstPk[2]; /* The aiRowEst[] value for the sPk index */
    +  int aiColumnPk = -1;        /* The aColumn[] value for the sPk index */
    +  int wsFlagMask;             /* Allowed flags in pCost->plan.wsFlag */
    +
    +  /* Initialize the cost to a worst-case value */
    +  memset(pCost, 0, sizeof(*pCost));
    +  pCost->rCost = SQLITE_BIG_DBL;
    +
    +  /* If the pSrc table is the right table of a LEFT JOIN then we may not
    +  ** use an index to satisfy IS NULL constraints on that table.  This is
    +  ** because columns might end up being NULL if the table does not match -
    +  ** a circumstance which the index cannot help us discover.  Ticket #2177.
    +  */
    +  if( pSrc->jointype & JT_LEFT ){
    +    idxEqTermMask = WO_EQ|WO_IN;
    +  }else{
    +    idxEqTermMask = WO_EQ|WO_IN|WO_ISNULL;
    +  }
    +
    +  if( pSrc->pIndex ){
    +    /* An INDEXED BY clause specifies a particular index to use */
    +    pIdx = pProbe = pSrc->pIndex;
    +    wsFlagMask = ~(WHERE_ROWID_EQ|WHERE_ROWID_RANGE);
    +    eqTermMask = idxEqTermMask;
    +  }else{
    +    /* There is no INDEXED BY clause.  Create a fake Index object to
    +    ** represent the primary key */
    +    Index *pFirst;                /* Any other index on the table */
    +    memset(&sPk, 0, sizeof(Index));
    +    sPk.nColumn = 1;
    +    sPk.aiColumn = &aiColumnPk;
    +    sPk.aiRowEst = aiRowEstPk;
    +    aiRowEstPk[1] = 1;
    +    sPk.onError = OE_Replace;
    +    sPk.pTable = pSrc->pTab;
    +    pFirst = pSrc->pTab->pIndex;
    +    if( pSrc->notIndexed==0 ){
    +      sPk.pNext = pFirst;
    +    }
    +    /* The aiRowEstPk[0] is an estimate of the total number of rows in the
    +    ** table.  Get this information from the ANALYZE information if it is
    +    ** available.  If not available, assume the table 1 million rows in size.
    +    */
    +    if( pFirst ){
    +      assert( pFirst->aiRowEst!=0 ); /* Allocated together with pFirst */
    +      aiRowEstPk[0] = pFirst->aiRowEst[0];
    +    }else{
    +      aiRowEstPk[0] = 1000000;
    +    }
    +    pProbe = &sPk;
    +    wsFlagMask = ~(
    +        WHERE_COLUMN_IN|WHERE_COLUMN_EQ|WHERE_COLUMN_NULL|WHERE_COLUMN_RANGE
    +    );
    +    eqTermMask = WO_EQ|WO_IN;
    +    pIdx = 0;
    +  }
    +
    +  /* Loop over all indices looking for the best one to use
    +  */
    +  for(; pProbe; pIdx=pProbe=pProbe->pNext){
    +    const unsigned int * const aiRowEst = pProbe->aiRowEst;
    +    double cost;                /* Cost of using pProbe */
    +    double nRow;                /* Estimated number of rows in result set */
    +    int rev;                    /* True to scan in reverse order */
    +    int wsFlags = 0;
    +    Bitmask used = 0;
    +
    +    /* The following variables are populated based on the properties of
    +    ** scan being evaluated. They are then used to determine the expected
    +    ** cost and number of rows returned.
    +    **
    +    **  nEq: 
    +    **    Number of equality terms that can be implemented using the index.
    +    **
    +    **  nInMul:  
    +    **    The "in-multiplier". This is an estimate of how many seek operations 
    +    **    SQLite must perform on the index in question. For example, if the 
    +    **    WHERE clause is:
    +    **
    +    **      WHERE a IN (1, 2, 3) AND b IN (4, 5, 6)
    +    **
    +    **    SQLite must perform 9 lookups on an index on (a, b), so nInMul is 
    +    **    set to 9. Given the same schema and either of the following WHERE 
    +    **    clauses:
    +    **
    +    **      WHERE a =  1
    +    **      WHERE a >= 2
    +    **
    +    **    nInMul is set to 1.
    +    **
    +    **    If there exists a WHERE term of the form "x IN (SELECT ...)", then 
    +    **    the sub-select is assumed to return 25 rows for the purposes of 
    +    **    determining nInMul.
    +    **
    +    **  bInEst:  
    +    **    Set to true if there was at least one "x IN (SELECT ...)" term used 
    +    **    in determining the value of nInMul.
    +    **
    +    **  nBound:
    +    **    An estimate on the amount of the table that must be searched.  A
    +    **    value of 100 means the entire table is searched.  Range constraints
    +    **    might reduce this to a value less than 100 to indicate that only
    +    **    a fraction of the table needs searching.  In the absence of
    +    **    sqlite_stat2 ANALYZE data, a single inequality reduces the search
    +    **    space to 1/3rd its original size.  So an x>? constraint reduces
    +    **    nBound to 33.  Two constraints (x>? AND x<?) reduce nBound to 11.
    +    **
    +    **  bSort:   
    +    **    Boolean. True if there is an ORDER BY clause that will require an 
    +    **    external sort (i.e. scanning the index being evaluated will not 
    +    **    correctly order records).
    +    **
    +    **  bLookup: 
    +    **    Boolean. True if for each index entry visited a lookup on the 
    +    **    corresponding table b-tree is required. This is always false 
    +    **    for the rowid index. For other indexes, it is true unless all the 
    +    **    columns of the table used by the SELECT statement are present in 
    +    **    the index (such an index is sometimes described as a covering index).
    +    **    For example, given the index on (a, b), the second of the following 
    +    **    two queries requires table b-tree lookups, but the first does not.
    +    **
    +    **             SELECT a, b    FROM tbl WHERE a = 1;
    +    **             SELECT a, b, c FROM tbl WHERE a = 1;
    +    */
    +    int nEq;
    +    int bInEst = 0;
    +    int nInMul = 1;
    +    int nBound = 100;
    +    int bSort = 0;
    +    int bLookup = 0;
    +
    +    /* Determine the values of nEq and nInMul */
    +    for(nEq=0; nEq<pProbe->nColumn; nEq++){
    +      WhereTerm *pTerm;           /* A single term of the WHERE clause */
    +      int j = pProbe->aiColumn[nEq];
    +      pTerm = findTerm(pWC, iCur, j, notReady, eqTermMask, pIdx);
    +      if( pTerm==0 ) break;
    +      wsFlags |= (WHERE_COLUMN_EQ|WHERE_ROWID_EQ);
    +      if( pTerm->eOperator & WO_IN ){
    +        Expr *pExpr = pTerm->pExpr;
    +        wsFlags |= WHERE_COLUMN_IN;
    +        if( ExprHasProperty(pExpr, EP_xIsSelect) ){
    +          nInMul *= 25;
    +          bInEst = 1;
    +        }else if( pExpr->x.pList ){
    +          nInMul *= pExpr->x.pList->nExpr + 1;
    +        }
    +      }else if( pTerm->eOperator & WO_ISNULL ){
    +        wsFlags |= WHERE_COLUMN_NULL;
    +      }
    +      used |= pTerm->prereqRight;
    +    }
    +
    +    /* Determine the value of nBound. */
    +    if( nEq<pProbe->nColumn ){
    +      int j = pProbe->aiColumn[nEq];
    +      if( findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE|WO_GT|WO_GE, pIdx) ){
    +        WhereTerm *pTop = findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE, pIdx);
    +        WhereTerm *pBtm = findTerm(pWC, iCur, j, notReady, WO_GT|WO_GE, pIdx);
    +        whereRangeScanEst(pParse, pProbe, nEq, pBtm, pTop, &nBound);
    +        if( pTop ){
    +          wsFlags |= WHERE_TOP_LIMIT;
    +          used |= pTop->prereqRight;
    +        }
    +        if( pBtm ){
    +          wsFlags |= WHERE_BTM_LIMIT;
    +          used |= pBtm->prereqRight;
    +        }
    +        wsFlags |= (WHERE_COLUMN_RANGE|WHERE_ROWID_RANGE);
    +      }
    +    }else if( pProbe->onError!=OE_None ){
    +      testcase( wsFlags & WHERE_COLUMN_IN );
    +      testcase( wsFlags & WHERE_COLUMN_NULL );
    +      if( (wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_NULL))==0 ){
    +        wsFlags |= WHERE_UNIQUE;
    +      }
    +    }
    +
    +    /* If there is an ORDER BY clause and the index being considered will
    +    ** naturally scan rows in the required order, set the appropriate flags
    +    ** in wsFlags. Otherwise, if there is an ORDER BY clause but the index
    +    ** will scan rows in a different order, set the bSort variable.  */
    +    if( pOrderBy ){
    +      if( (wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_NULL))==0
    +        && isSortingIndex(pParse,pWC->pMaskSet,pProbe,iCur,pOrderBy,nEq,&rev)
    +      ){
    +        wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE|WHERE_ORDERBY;
    +        wsFlags |= (rev ? WHERE_REVERSE : 0);
    +      }else{
    +        bSort = 1;
    +      }
    +    }
    +
    +    /* If currently calculating the cost of using an index (not the IPK
    +    ** index), determine if all required column data may be obtained without 
    +    ** seeking to entries in the main table (i.e. if the index is a covering
    +    ** index for this query). If it is, set the WHERE_IDX_ONLY flag in
    +    ** wsFlags. Otherwise, set the bLookup variable to true.  */
    +    if( pIdx && wsFlags ){
    +      Bitmask m = pSrc->colUsed;
    +      int j;
    +      for(j=0; j<pIdx->nColumn; j++){
    +        int x = pIdx->aiColumn[j];
    +        if( x<BMS-1 ){
    +          m &= ~(((Bitmask)1)<<x);
    +        }
    +      }
    +      if( m==0 ){
    +        wsFlags |= WHERE_IDX_ONLY;
    +      }else{
    +        bLookup = 1;
    +      }
    +    }
    +
    +    /**** Begin adding up the cost of using this index (Needs improvements)
    +    **
    +    ** Estimate the number of rows of output.  For an IN operator,
    +    ** do not let the estimate exceed half the rows in the table.
    +    */
    +    nRow = (double)(aiRowEst[nEq] * nInMul);
    +    if( bInEst && nRow*2>aiRowEst[0] ){
    +      nRow = aiRowEst[0]/2;
    +      nInMul = (int)(nRow / aiRowEst[nEq]);
    +    }
    +
    +    /* Assume constant cost to access a row and logarithmic cost to
    +    ** do a binary search.  Hence, the initial cost is the number of output
    +    ** rows plus log2(table-size) times the number of binary searches.
    +    */
    +    cost = nRow + nInMul*estLog(aiRowEst[0]);
    +
    +    /* Adjust the number of rows and the cost downward to reflect rows
    +    ** that are excluded by range constraints.
    +    */
    +    nRow = (nRow * (double)nBound) / (double)100;
    +    cost = (cost * (double)nBound) / (double)100;
    +
    +    /* Add in the estimated cost of sorting the result
    +    */
    +    if( bSort ){
    +      cost += cost*estLog(cost);
    +    }
    +
    +    /* If all information can be taken directly from the index, we avoid
    +    ** doing table lookups.  This reduces the cost by half.  (Not really -
    +    ** this needs to be fixed.)
    +    */
    +    if( pIdx && bLookup==0 ){
    +      cost /= (double)2;
    +    }
    +    /**** Cost of using this index has now been computed ****/
    +
    +    WHERETRACE((
    +      "tbl=%s idx=%s nEq=%d nInMul=%d nBound=%d bSort=%d bLookup=%d"
    +      " wsFlags=%d   (nRow=%.2f cost=%.2f)\n",
    +      pSrc->pTab->zName, (pIdx ? pIdx->zName : "ipk"), 
    +      nEq, nInMul, nBound, bSort, bLookup, wsFlags, nRow, cost
    +    ));
    +
    +    /* If this index is the best we have seen so far, then record this
    +    ** index and its cost in the pCost structure.
    +    */
    +    if( (!pIdx || wsFlags) && cost<pCost->rCost ){
    +      pCost->rCost = cost;
    +      pCost->nRow = nRow;
    +      pCost->used = used;
    +      pCost->plan.wsFlags = (wsFlags&wsFlagMask);
    +      pCost->plan.nEq = nEq;
    +      pCost->plan.u.pIdx = pIdx;
    +    }
    +
    +    /* If there was an INDEXED BY clause, then only that one index is
    +    ** considered. */
    +    if( pSrc->pIndex ) break;
    +
    +    /* Reset masks for the next index in the loop */
    +    wsFlagMask = ~(WHERE_ROWID_EQ|WHERE_ROWID_RANGE);
    +    eqTermMask = idxEqTermMask;
    +  }
    +
    +  /* If there is no ORDER BY clause and the SQLITE_ReverseOrder flag
    +  ** is set, then reverse the order that the index will be scanned
    +  ** in. This is used for application testing, to help find cases
    +  ** where application behaviour depends on the (undefined) order that
    +  ** SQLite outputs rows in in the absence of an ORDER BY clause.  */
    +  if( !pOrderBy && pParse->db->flags & SQLITE_ReverseOrder ){
    +    pCost->plan.wsFlags |= WHERE_REVERSE;
    +  }
    +
    +  assert( pOrderBy || (pCost->plan.wsFlags&WHERE_ORDERBY)==0 );
    +  assert( pCost->plan.u.pIdx==0 || (pCost->plan.wsFlags&WHERE_ROWID_EQ)==0 );
    +  assert( pSrc->pIndex==0 
    +       || pCost->plan.u.pIdx==0 
    +       || pCost->plan.u.pIdx==pSrc->pIndex 
    +  );
    +
    +  WHERETRACE(("best index is: %s\n", 
    +    (pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
    +  ));
    +  
    +  bestOrClauseIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost);
    +  pCost->plan.wsFlags |= eqTermMask;
    +}
    +
    +/*
    +** Find the query plan for accessing table pSrc->pTab. Write the
    +** best query plan and its cost into the WhereCost object supplied 
    +** as the last parameter. This function may calculate the cost of
    +** both real and virtual table scans.
    +*/
    +static void bestIndex(
    +  Parse *pParse,              /* The parsing context */
    +  WhereClause *pWC,           /* The WHERE clause */
    +  struct SrcList_item *pSrc,  /* The FROM clause term to search */
    +  Bitmask notReady,           /* Mask of cursors that are not available */
    +  ExprList *pOrderBy,         /* The ORDER BY clause */
    +  WhereCost *pCost            /* Lowest cost query plan */
    +){
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if( IsVirtual(pSrc->pTab) ){
    +    sqlite3_index_info *p = 0;
    +    bestVirtualIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost, &p);
    +    if( p->needToFreeIdxStr ){
    +      sqlite3_free(p->idxStr);
    +    }
    +    sqlite3DbFree(pParse->db, p);
    +  }else
    +#endif
    +  {
    +    bestBtreeIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost);
    +  }
    +}
    +
    +/*
    +** Disable a term in the WHERE clause.  Except, do not disable the term
    +** if it controls a LEFT OUTER JOIN and it did not originate in the ON
    +** or USING clause of that join.
    +**
    +** Consider the term t2.z='ok' in the following queries:
    +**
    +**   (1)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
    +**   (2)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
    +**   (3)  SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
    +**
    +** The t2.z='ok' is disabled in the in (2) because it originates
    +** in the ON clause.  The term is disabled in (3) because it is not part
    +** of a LEFT OUTER JOIN.  In (1), the term is not disabled.
    +**
    +** Disabling a term causes that term to not be tested in the inner loop
    +** of the join.  Disabling is an optimization.  When terms are satisfied
    +** by indices, we disable them to prevent redundant tests in the inner
    +** loop.  We would get the correct results if nothing were ever disabled,
    +** but joins might run a little slower.  The trick is to disable as much
    +** as we can without disabling too much.  If we disabled in (1), we'd get
    +** the wrong answer.  See ticket #813.
    +*/
    +static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
    +  if( pTerm
    +      && ALWAYS((pTerm->wtFlags & TERM_CODED)==0)
    +      && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
    +  ){
    +    pTerm->wtFlags |= TERM_CODED;
    +    if( pTerm->iParent>=0 ){
    +      WhereTerm *pOther = &pTerm->pWC->a[pTerm->iParent];
    +      if( (--pOther->nChild)==0 ){
    +        disableTerm(pLevel, pOther);
    +      }
    +    }
    +  }
    +}
    +
    +/*
    +** Code an OP_Affinity opcode to apply the column affinity string zAff
    +** to the n registers starting at base. 
    +**
    +** Buffer zAff was allocated using sqlite3DbMalloc(). It is the 
    +** responsibility of this function to arrange for it to be eventually
    +** freed using sqlite3DbFree().
    +*/
    +static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
    +  Vdbe *v = pParse->pVdbe;
    +  assert( v!=0 );
    +  sqlite3VdbeAddOp2(v, OP_Affinity, base, n);
    +  sqlite3VdbeChangeP4(v, -1, zAff, P4_DYNAMIC);
    +  sqlite3ExprCacheAffinityChange(pParse, base, n);
    +}
    +
    +
    +/*
    +** Generate code for a single equality term of the WHERE clause.  An equality
    +** term can be either X=expr or X IN (...).   pTerm is the term to be 
    +** coded.
    +**
    +** The current value for the constraint is left in register iReg.
    +**
    +** For a constraint of the form X=expr, the expression is evaluated and its
    +** result is left on the stack.  For constraints of the form X IN (...)
    +** this routine sets up a loop that will iterate over all values of X.
    +*/
    +static int codeEqualityTerm(
    +  Parse *pParse,      /* The parsing context */
    +  WhereTerm *pTerm,   /* The term of the WHERE clause to be coded */
    +  WhereLevel *pLevel, /* When level of the FROM clause we are working on */
    +  int iTarget         /* Attempt to leave results in this register */
    +){
    +  Expr *pX = pTerm->pExpr;
    +  Vdbe *v = pParse->pVdbe;
    +  int iReg;                  /* Register holding results */
    +
    +  assert( iTarget>0 );
    +  if( pX->op==TK_EQ ){
    +    iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
    +  }else if( pX->op==TK_ISNULL ){
    +    iReg = iTarget;
    +    sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
    +#ifndef SQLITE_OMIT_SUBQUERY
    +  }else{
    +    int eType;
    +    int iTab;
    +    struct InLoop *pIn;
    +
    +    assert( pX->op==TK_IN );
    +    iReg = iTarget;
    +    eType = sqlite3FindInIndex(pParse, pX, 0);
    +    iTab = pX->iTable;
    +    sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0);
    +    assert( pLevel->plan.wsFlags & WHERE_IN_ABLE );
    +    if( pLevel->u.in.nIn==0 ){
    +      pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
    +    }
    +    pLevel->u.in.nIn++;
    +    pLevel->u.in.aInLoop =
    +       sqlite3DbReallocOrFree(pParse->db, pLevel->u.in.aInLoop,
    +                              sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
    +    pIn = pLevel->u.in.aInLoop;
    +    if( pIn ){
    +      pIn += pLevel->u.in.nIn - 1;
    +      pIn->iCur = iTab;
    +      if( eType==IN_INDEX_ROWID ){
    +        pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iReg);
    +      }else{
    +        pIn->addrInTop = sqlite3VdbeAddOp3(v, OP_Column, iTab, 0, iReg);
    +      }
    +      sqlite3VdbeAddOp1(v, OP_IsNull, iReg);
    +    }else{
    +      pLevel->u.in.nIn = 0;
    +    }
    +#endif
    +  }
    +  disableTerm(pLevel, pTerm);
    +  return iReg;
    +}
    +
    +/*
    +** Generate code that will evaluate all == and IN constraints for an
    +** index.  The values for all constraints are left on the stack.
    +**
    +** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
    +** Suppose the WHERE clause is this:  a==5 AND b IN (1,2,3) AND c>5 AND c<10
    +** The index has as many as three equality constraints, but in this
    +** example, the third "c" value is an inequality.  So only two 
    +** constraints are coded.  This routine will generate code to evaluate
    +** a==5 and b IN (1,2,3).  The current values for a and b will be stored
    +** in consecutive registers and the index of the first register is returned.
    +**
    +** In the example above nEq==2.  But this subroutine works for any value
    +** of nEq including 0.  If nEq==0, this routine is nearly a no-op.
    +** The only thing it does is allocate the pLevel->iMem memory cell.
    +**
    +** This routine always allocates at least one memory cell and returns
    +** the index of that memory cell. The code that
    +** calls this routine will use that memory cell to store the termination
    +** key value of the loop.  If one or more IN operators appear, then
    +** this routine allocates an additional nEq memory cells for internal
    +** use.
    +**
    +** Before returning, *pzAff is set to point to a buffer containing a
    +** copy of the column affinity string of the index allocated using
    +** sqlite3DbMalloc(). Except, entries in the copy of the string associated
    +** with equality constraints that use NONE affinity are set to
    +** SQLITE_AFF_NONE. This is to deal with SQL such as the following:
    +**
    +**   CREATE TABLE t1(a TEXT PRIMARY KEY, b);
    +**   SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
    +**
    +** In the example above, the index on t1(a) has TEXT affinity. But since
    +** the right hand side of the equality constraint (t2.b) has NONE affinity,
    +** no conversion should be attempted before using a t2.b value as part of
    +** a key to search the index. Hence the first byte in the returned affinity
    +** string in this example would be set to SQLITE_AFF_NONE.
    +*/
    +static int codeAllEqualityTerms(
    +  Parse *pParse,        /* Parsing context */
    +  WhereLevel *pLevel,   /* Which nested loop of the FROM we are coding */
    +  WhereClause *pWC,     /* The WHERE clause */
    +  Bitmask notReady,     /* Which parts of FROM have not yet been coded */
    +  int nExtraReg,        /* Number of extra registers to allocate */
    +  char **pzAff          /* OUT: Set to point to affinity string */
    +){
    +  int nEq = pLevel->plan.nEq;   /* The number of == or IN constraints to code */
    +  Vdbe *v = pParse->pVdbe;      /* The vm under construction */
    +  Index *pIdx;                  /* The index being used for this loop */
    +  int iCur = pLevel->iTabCur;   /* The cursor of the table */
    +  WhereTerm *pTerm;             /* A single constraint term */
    +  int j;                        /* Loop counter */
    +  int regBase;                  /* Base register */
    +  int nReg;                     /* Number of registers to allocate */
    +  char *zAff;                   /* Affinity string to return */
    +
    +  /* This module is only called on query plans that use an index. */
    +  assert( pLevel->plan.wsFlags & WHERE_INDEXED );
    +  pIdx = pLevel->plan.u.pIdx;
    +
    +  /* Figure out how many memory cells we will need then allocate them.
    +  */
    +  regBase = pParse->nMem + 1;
    +  nReg = pLevel->plan.nEq + nExtraReg;
    +  pParse->nMem += nReg;
    +
    +  zAff = sqlite3DbStrDup(pParse->db, sqlite3IndexAffinityStr(v, pIdx));
    +  if( !zAff ){
    +    pParse->db->mallocFailed = 1;
    +  }
    +
    +  /* Evaluate the equality constraints
    +  */
    +  assert( pIdx->nColumn>=nEq );
    +  for(j=0; j<nEq; j++){
    +    int r1;
    +    int k = pIdx->aiColumn[j];
    +    pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
    +    if( NEVER(pTerm==0) ) break;
    +    assert( (pTerm->wtFlags & TERM_CODED)==0 );
    +    r1 = codeEqualityTerm(pParse, pTerm, pLevel, regBase+j);
    +    if( r1!=regBase+j ){
    +      if( nReg==1 ){
    +        sqlite3ReleaseTempReg(pParse, regBase);
    +        regBase = r1;
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
    +      }
    +    }
    +    testcase( pTerm->eOperator & WO_ISNULL );
    +    testcase( pTerm->eOperator & WO_IN );
    +    if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
    +      sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
    +      if( zAff 
    +       && sqlite3CompareAffinity(pTerm->pExpr->pRight, zAff[j])==SQLITE_AFF_NONE
    +      ){
    +        zAff[j] = SQLITE_AFF_NONE;
    +      }
    +    }
    +  }
    +  *pzAff = zAff;
    +  return regBase;
    +}
    +
    +/*
    +** Generate code for the start of the iLevel-th loop in the WHERE clause
    +** implementation described by pWInfo.
    +*/
    +static Bitmask codeOneLoopStart(
    +  WhereInfo *pWInfo,   /* Complete information about the WHERE clause */
    +  int iLevel,          /* Which level of pWInfo->a[] should be coded */
    +  u16 wctrlFlags,      /* One of the WHERE_* flags defined in sqliteInt.h */
    +  Bitmask notReady     /* Which tables are currently available */
    +){
    +  int j, k;            /* Loop counters */
    +  int iCur;            /* The VDBE cursor for the table */
    +  int addrNxt;         /* Where to jump to continue with the next IN case */
    +  int omitTable;       /* True if we use the index only */
    +  int bRev;            /* True if we need to scan in reverse order */
    +  WhereLevel *pLevel;  /* The where level to be coded */
    +  WhereClause *pWC;    /* Decomposition of the entire WHERE clause */
    +  WhereTerm *pTerm;               /* A WHERE clause term */
    +  Parse *pParse;                  /* Parsing context */
    +  Vdbe *v;                        /* The prepared stmt under constructions */
    +  struct SrcList_item *pTabItem;  /* FROM clause term being coded */
    +  int addrBrk;                    /* Jump here to break out of the loop */
    +  int addrCont;                   /* Jump here to continue with next cycle */
    +  int iRowidReg = 0;        /* Rowid is stored in this register, if not zero */
    +  int iReleaseReg = 0;      /* Temp register to free before returning */
    +
    +  pParse = pWInfo->pParse;
    +  v = pParse->pVdbe;
    +  pWC = pWInfo->pWC;
    +  pLevel = &pWInfo->a[iLevel];
    +  pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];
    +  iCur = pTabItem->iCursor;
    +  bRev = (pLevel->plan.wsFlags & WHERE_REVERSE)!=0;
    +  omitTable = (pLevel->plan.wsFlags & WHERE_IDX_ONLY)!=0 
    +           && (wctrlFlags & WHERE_FORCE_TABLE)==0;
    +
    +  /* Create labels for the "break" and "continue" instructions
    +  ** for the current loop.  Jump to addrBrk to break out of a loop.
    +  ** Jump to cont to go immediately to the next iteration of the
    +  ** loop.
    +  **
    +  ** When there is an IN operator, we also have a "addrNxt" label that
    +  ** means to continue with the next IN value combination.  When
    +  ** there are no IN operators in the constraints, the "addrNxt" label
    +  ** is the same as "addrBrk".
    +  */
    +  addrBrk = pLevel->addrBrk = pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
    +  addrCont = pLevel->addrCont = sqlite3VdbeMakeLabel(v);
    +
    +  /* If this is the right table of a LEFT OUTER JOIN, allocate and
    +  ** initialize a memory cell that records if this table matches any
    +  ** row of the left table of the join.
    +  */
    +  if( pLevel->iFrom>0 && (pTabItem[0].jointype & JT_LEFT)!=0 ){
    +    pLevel->iLeftJoin = ++pParse->nMem;
    +    sqlite3VdbeAddOp2(v, OP_Integer, 0, pLevel->iLeftJoin);
    +    VdbeComment((v, "init LEFT JOIN no-match flag"));
    +  }
    +
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  if(  (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
    +    /* Case 0:  The table is a virtual-table.  Use the VFilter and VNext
    +    **          to access the data.
    +    */
    +    int iReg;   /* P3 Value for OP_VFilter */
    +    sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
    +    int nConstraint = pVtabIdx->nConstraint;
    +    struct sqlite3_index_constraint_usage *aUsage =
    +                                                pVtabIdx->aConstraintUsage;
    +    const struct sqlite3_index_constraint *aConstraint =
    +                                                pVtabIdx->aConstraint;
    +
    +    iReg = sqlite3GetTempRange(pParse, nConstraint+2);
    +    for(j=1; j<=nConstraint; j++){
    +      for(k=0; k<nConstraint; k++){
    +        if( aUsage[k].argvIndex==j ){
    +          int iTerm = aConstraint[k].iTermOffset;
    +          sqlite3ExprCode(pParse, pWC->a[iTerm].pExpr->pRight, iReg+j+1);
    +          break;
    +        }
    +      }
    +      if( k==nConstraint ) break;
    +    }
    +    sqlite3VdbeAddOp2(v, OP_Integer, pVtabIdx->idxNum, iReg);
    +    sqlite3VdbeAddOp2(v, OP_Integer, j-1, iReg+1);
    +    sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrBrk, iReg, pVtabIdx->idxStr,
    +                      pVtabIdx->needToFreeIdxStr ? P4_MPRINTF : P4_STATIC);
    +    pVtabIdx->needToFreeIdxStr = 0;
    +    for(j=0; j<nConstraint; j++){
    +      if( aUsage[j].omit ){
    +        int iTerm = aConstraint[j].iTermOffset;
    +        disableTerm(pLevel, &pWC->a[iTerm]);
    +      }
    +    }
    +    pLevel->op = OP_VNext;
    +    pLevel->p1 = iCur;
    +    pLevel->p2 = sqlite3VdbeCurrentAddr(v);
    +    sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
    +  }else
    +#endif /* SQLITE_OMIT_VIRTUALTABLE */
    +
    +  if( pLevel->plan.wsFlags & WHERE_ROWID_EQ ){
    +    /* Case 1:  We can directly reference a single row using an
    +    **          equality comparison against the ROWID field.  Or
    +    **          we reference multiple rows using a "rowid IN (...)"
    +    **          construct.
    +    */
    +    iReleaseReg = sqlite3GetTempReg(pParse);
    +    pTerm = findTerm(pWC, iCur, -1, notReady, WO_EQ|WO_IN, 0);
    +    assert( pTerm!=0 );
    +    assert( pTerm->pExpr!=0 );
    +    assert( pTerm->leftCursor==iCur );
    +    assert( omitTable==0 );
    +    iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, iReleaseReg);
    +    addrNxt = pLevel->addrNxt;
    +    sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt);
    +    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg);
    +    sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
    +    VdbeComment((v, "pk"));
    +    pLevel->op = OP_Noop;
    +  }else if( pLevel->plan.wsFlags & WHERE_ROWID_RANGE ){
    +    /* Case 2:  We have an inequality comparison against the ROWID field.
    +    */
    +    int testOp = OP_Noop;
    +    int start;
    +    int memEndValue = 0;
    +    WhereTerm *pStart, *pEnd;
    +
    +    assert( omitTable==0 );
    +    pStart = findTerm(pWC, iCur, -1, notReady, WO_GT|WO_GE, 0);
    +    pEnd = findTerm(pWC, iCur, -1, notReady, WO_LT|WO_LE, 0);
    +    if( bRev ){
    +      pTerm = pStart;
    +      pStart = pEnd;
    +      pEnd = pTerm;
    +    }
    +    if( pStart ){
    +      Expr *pX;             /* The expression that defines the start bound */
    +      int r1, rTemp;        /* Registers for holding the start boundary */
    +
    +      /* The following constant maps TK_xx codes into corresponding 
    +      ** seek opcodes.  It depends on a particular ordering of TK_xx
    +      */
    +      const u8 aMoveOp[] = {
    +           /* TK_GT */  OP_SeekGt,
    +           /* TK_LE */  OP_SeekLe,
    +           /* TK_LT */  OP_SeekLt,
    +           /* TK_GE */  OP_SeekGe
    +      };
    +      assert( TK_LE==TK_GT+1 );      /* Make sure the ordering.. */
    +      assert( TK_LT==TK_GT+2 );      /*  ... of the TK_xx values... */
    +      assert( TK_GE==TK_GT+3 );      /*  ... is correcct. */
    +
    +      pX = pStart->pExpr;
    +      assert( pX!=0 );
    +      assert( pStart->leftCursor==iCur );
    +      r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
    +      sqlite3VdbeAddOp3(v, aMoveOp[pX->op-TK_GT], iCur, addrBrk, r1);
    +      VdbeComment((v, "pk"));
    +      sqlite3ExprCacheAffinityChange(pParse, r1, 1);
    +      sqlite3ReleaseTempReg(pParse, rTemp);
    +      disableTerm(pLevel, pStart);
    +    }else{
    +      sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, addrBrk);
    +    }
    +    if( pEnd ){
    +      Expr *pX;
    +      pX = pEnd->pExpr;
    +      assert( pX!=0 );
    +      assert( pEnd->leftCursor==iCur );
    +      memEndValue = ++pParse->nMem;
    +      sqlite3ExprCode(pParse, pX->pRight, memEndValue);
    +      if( pX->op==TK_LT || pX->op==TK_GT ){
    +        testOp = bRev ? OP_Le : OP_Ge;
    +      }else{
    +        testOp = bRev ? OP_Lt : OP_Gt;
    +      }
    +      disableTerm(pLevel, pEnd);
    +    }
    +    start = sqlite3VdbeCurrentAddr(v);
    +    pLevel->op = bRev ? OP_Prev : OP_Next;
    +    pLevel->p1 = iCur;
    +    pLevel->p2 = start;
    +    pLevel->p5 = (pStart==0 && pEnd==0) ?1:0;
    +    if( testOp!=OP_Noop ){
    +      iRowidReg = iReleaseReg = sqlite3GetTempReg(pParse);
    +      sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
    +      sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
    +      sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);
    +      sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL);
    +    }
    +  }else if( pLevel->plan.wsFlags & (WHERE_COLUMN_RANGE|WHERE_COLUMN_EQ) ){
    +    /* Case 3: A scan using an index.
    +    **
    +    **         The WHERE clause may contain zero or more equality 
    +    **         terms ("==" or "IN" operators) that refer to the N
    +    **         left-most columns of the index. It may also contain
    +    **         inequality constraints (>, <, >= or <=) on the indexed
    +    **         column that immediately follows the N equalities. Only 
    +    **         the right-most column can be an inequality - the rest must
    +    **         use the "==" and "IN" operators. For example, if the 
    +    **         index is on (x,y,z), then the following clauses are all 
    +    **         optimized:
    +    **
    +    **            x=5
    +    **            x=5 AND y=10
    +    **            x=5 AND y<10
    +    **            x=5 AND y>5 AND y<10
    +    **            x=5 AND y=5 AND z<=10
    +    **
    +    **         The z<10 term of the following cannot be used, only
    +    **         the x=5 term:
    +    **
    +    **            x=5 AND z<10
    +    **
    +    **         N may be zero if there are inequality constraints.
    +    **         If there are no inequality constraints, then N is at
    +    **         least one.
    +    **
    +    **         This case is also used when there are no WHERE clause
    +    **         constraints but an index is selected anyway, in order
    +    **         to force the output order to conform to an ORDER BY.
    +    */  
    +    int aStartOp[] = {
    +      0,
    +      0,
    +      OP_Rewind,           /* 2: (!start_constraints && startEq &&  !bRev) */
    +      OP_Last,             /* 3: (!start_constraints && startEq &&   bRev) */
    +      OP_SeekGt,           /* 4: (start_constraints  && !startEq && !bRev) */
    +      OP_SeekLt,           /* 5: (start_constraints  && !startEq &&  bRev) */
    +      OP_SeekGe,           /* 6: (start_constraints  &&  startEq && !bRev) */
    +      OP_SeekLe            /* 7: (start_constraints  &&  startEq &&  bRev) */
    +    };
    +    int aEndOp[] = {
    +      OP_Noop,             /* 0: (!end_constraints) */
    +      OP_IdxGE,            /* 1: (end_constraints && !bRev) */
    +      OP_IdxLT             /* 2: (end_constraints && bRev) */
    +    };
    +    int nEq = pLevel->plan.nEq;
    +    int isMinQuery = 0;          /* If this is an optimized SELECT min(x).. */
    +    int regBase;                 /* Base register holding constraint values */
    +    int r1;                      /* Temp register */
    +    WhereTerm *pRangeStart = 0;  /* Inequality constraint at range start */
    +    WhereTerm *pRangeEnd = 0;    /* Inequality constraint at range end */
    +    int startEq;                 /* True if range start uses ==, >= or <= */
    +    int endEq;                   /* True if range end uses ==, >= or <= */
    +    int start_constraints;       /* Start of range is constrained */
    +    int nConstraint;             /* Number of constraint terms */
    +    Index *pIdx;         /* The index we will be using */
    +    int iIdxCur;         /* The VDBE cursor for the index */
    +    int nExtraReg = 0;   /* Number of extra registers needed */
    +    int op;              /* Instruction opcode */
    +    char *zAff;
    +
    +    pIdx = pLevel->plan.u.pIdx;
    +    iIdxCur = pLevel->iIdxCur;
    +    k = pIdx->aiColumn[nEq];     /* Column for inequality constraints */
    +
    +    /* If this loop satisfies a sort order (pOrderBy) request that 
    +    ** was passed to this function to implement a "SELECT min(x) ..." 
    +    ** query, then the caller will only allow the loop to run for
    +    ** a single iteration. This means that the first row returned
    +    ** should not have a NULL value stored in 'x'. If column 'x' is
    +    ** the first one after the nEq equality constraints in the index,
    +    ** this requires some special handling.
    +    */
    +    if( (wctrlFlags&WHERE_ORDERBY_MIN)!=0
    +     && (pLevel->plan.wsFlags&WHERE_ORDERBY)
    +     && (pIdx->nColumn>nEq)
    +    ){
    +      /* assert( pOrderBy->nExpr==1 ); */
    +      /* assert( pOrderBy->a[0].pExpr->iColumn==pIdx->aiColumn[nEq] ); */
    +      isMinQuery = 1;
    +      nExtraReg = 1;
    +    }
    +
    +    /* Find any inequality constraint terms for the start and end 
    +    ** of the range. 
    +    */
    +    if( pLevel->plan.wsFlags & WHERE_TOP_LIMIT ){
    +      pRangeEnd = findTerm(pWC, iCur, k, notReady, (WO_LT|WO_LE), pIdx);
    +      nExtraReg = 1;
    +    }
    +    if( pLevel->plan.wsFlags & WHERE_BTM_LIMIT ){
    +      pRangeStart = findTerm(pWC, iCur, k, notReady, (WO_GT|WO_GE), pIdx);
    +      nExtraReg = 1;
    +    }
    +
    +    /* Generate code to evaluate all constraint terms using == or IN
    +    ** and store the values of those terms in an array of registers
    +    ** starting at regBase.
    +    */
    +    regBase = codeAllEqualityTerms(
    +        pParse, pLevel, pWC, notReady, nExtraReg, &zAff
    +    );
    +    addrNxt = pLevel->addrNxt;
    +
    +    /* If we are doing a reverse order scan on an ascending index, or
    +    ** a forward order scan on a descending index, interchange the 
    +    ** start and end terms (pRangeStart and pRangeEnd).
    +    */
    +    if( bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC) ){
    +      SWAP(WhereTerm *, pRangeEnd, pRangeStart);
    +    }
    +
    +    testcase( pRangeStart && pRangeStart->eOperator & WO_LE );
    +    testcase( pRangeStart && pRangeStart->eOperator & WO_GE );
    +    testcase( pRangeEnd && pRangeEnd->eOperator & WO_LE );
    +    testcase( pRangeEnd && pRangeEnd->eOperator & WO_GE );
    +    startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);
    +    endEq =   !pRangeEnd || pRangeEnd->eOperator & (WO_LE|WO_GE);
    +    start_constraints = pRangeStart || nEq>0;
    +
    +    /* Seek the index cursor to the start of the range. */
    +    nConstraint = nEq;
    +    if( pRangeStart ){
    +      Expr *pRight = pRangeStart->pExpr->pRight;
    +      sqlite3ExprCode(pParse, pRight, regBase+nEq);
    +      sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
    +      if( zAff 
    +       && sqlite3CompareAffinity(pRight, zAff[nConstraint])==SQLITE_AFF_NONE
    +      ){
    +        /* Since the comparison is to be performed with no conversions applied
    +        ** to the operands, set the affinity to apply to pRight to 
    +        ** SQLITE_AFF_NONE.  */
    +        zAff[nConstraint] = SQLITE_AFF_NONE;
    +      }
    +      nConstraint++;
    +    }else if( isMinQuery ){
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
    +      nConstraint++;
    +      startEq = 0;
    +      start_constraints = 1;
    +    }
    +    codeApplyAffinity(pParse, regBase, nConstraint, zAff);
    +    op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];
    +    assert( op!=0 );
    +    testcase( op==OP_Rewind );
    +    testcase( op==OP_Last );
    +    testcase( op==OP_SeekGt );
    +    testcase( op==OP_SeekGe );
    +    testcase( op==OP_SeekLe );
    +    testcase( op==OP_SeekLt );
    +    sqlite3VdbeAddOp4(v, op, iIdxCur, addrNxt, regBase, 
    +                      SQLITE_INT_TO_PTR(nConstraint), P4_INT32);
    +
    +    /* Load the value for the inequality constraint at the end of the
    +    ** range (if any).
    +    */
    +    nConstraint = nEq;
    +    if( pRangeEnd ){
    +      Expr *pRight = pRangeEnd->pExpr->pRight;
    +      sqlite3ExprCacheRemove(pParse, regBase+nEq);
    +      sqlite3ExprCode(pParse, pRight, regBase+nEq);
    +      sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
    +      zAff = sqlite3DbStrDup(pParse->db, zAff);
    +      if( zAff 
    +       && sqlite3CompareAffinity(pRight, zAff[nConstraint])==SQLITE_AFF_NONE
    +      ){
    +        /* Since the comparison is to be performed with no conversions applied
    +        ** to the operands, set the affinity to apply to pRight to 
    +        ** SQLITE_AFF_NONE.  */
    +        zAff[nConstraint] = SQLITE_AFF_NONE;
    +      }
    +      codeApplyAffinity(pParse, regBase, nEq+1, zAff);
    +      nConstraint++;
    +    }
    +
    +    /* Top of the loop body */
    +    pLevel->p2 = sqlite3VdbeCurrentAddr(v);
    +
    +    /* Check if the index cursor is past the end of the range. */
    +    op = aEndOp[(pRangeEnd || nEq) * (1 + bRev)];
    +    testcase( op==OP_Noop );
    +    testcase( op==OP_IdxGE );
    +    testcase( op==OP_IdxLT );
    +    if( op!=OP_Noop ){
    +      sqlite3VdbeAddOp4(v, op, iIdxCur, addrNxt, regBase,
    +                        SQLITE_INT_TO_PTR(nConstraint), P4_INT32);
    +      sqlite3VdbeChangeP5(v, endEq!=bRev ?1:0);
    +    }
    +
    +    /* If there are inequality constraints, check that the value
    +    ** of the table column that the inequality contrains is not NULL.
    +    ** If it is, jump to the next iteration of the loop.
    +    */
    +    r1 = sqlite3GetTempReg(pParse);
    +    testcase( pLevel->plan.wsFlags & WHERE_BTM_LIMIT );
    +    testcase( pLevel->plan.wsFlags & WHERE_TOP_LIMIT );
    +    if( pLevel->plan.wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) ){
    +      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, nEq, r1);
    +      sqlite3VdbeAddOp2(v, OP_IsNull, r1, addrCont);
    +    }
    +    sqlite3ReleaseTempReg(pParse, r1);
    +
    +    /* Seek the table cursor, if required */
    +    disableTerm(pLevel, pRangeStart);
    +    disableTerm(pLevel, pRangeEnd);
    +    if( !omitTable ){
    +      iRowidReg = iReleaseReg = sqlite3GetTempReg(pParse);
    +      sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
    +      sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
    +      sqlite3VdbeAddOp2(v, OP_Seek, iCur, iRowidReg);  /* Deferred seek */
    +    }
    +
    +    /* Record the instruction used to terminate the loop. Disable 
    +    ** WHERE clause terms made redundant by the index range scan.
    +    */
    +    pLevel->op = bRev ? OP_Prev : OP_Next;
    +    pLevel->p1 = iIdxCur;
    +  }else
    +
    +#ifndef SQLITE_OMIT_OR_OPTIMIZATION
    +  if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
    +    /* Case 4:  Two or more separately indexed terms connected by OR
    +    **
    +    ** Example:
    +    **
    +    **   CREATE TABLE t1(a,b,c,d);
    +    **   CREATE INDEX i1 ON t1(a);
    +    **   CREATE INDEX i2 ON t1(b);
    +    **   CREATE INDEX i3 ON t1(c);
    +    **
    +    **   SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)
    +    **
    +    ** In the example, there are three indexed terms connected by OR.
    +    ** The top of the loop looks like this:
    +    **
    +    **          Null       1                # Zero the rowset in reg 1
    +    **
    +    ** Then, for each indexed term, the following. The arguments to
    +    ** RowSetTest are such that the rowid of the current row is inserted
    +    ** into the RowSet. If it is already present, control skips the
    +    ** Gosub opcode and jumps straight to the code generated by WhereEnd().
    +    **
    +    **        sqlite3WhereBegin(<term>)
    +    **          RowSetTest                  # Insert rowid into rowset
    +    **          Gosub      2 A
    +    **        sqlite3WhereEnd()
    +    **
    +    ** Following the above, code to terminate the loop. Label A, the target
    +    ** of the Gosub above, jumps to the instruction right after the Goto.
    +    **
    +    **          Null       1                # Zero the rowset in reg 1
    +    **          Goto       B                # The loop is finished.
    +    **
    +    **       A: <loop body>                 # Return data, whatever.
    +    **
    +    **          Return     2                # Jump back to the Gosub
    +    **
    +    **       B: <after the loop>
    +    **
    +    */
    +    WhereClause *pOrWc;    /* The OR-clause broken out into subterms */
    +    WhereTerm *pFinal;     /* Final subterm within the OR-clause. */
    +    SrcList oneTab;        /* Shortened table list */
    +
    +    int regReturn = ++pParse->nMem;           /* Register used with OP_Gosub */
    +    int regRowset = 0;                        /* Register for RowSet object */
    +    int regRowid = 0;                         /* Register holding rowid */
    +    int iLoopBody = sqlite3VdbeMakeLabel(v);  /* Start of loop body */
    +    int iRetInit;                             /* Address of regReturn init */
    +    int ii;
    +   
    +    pTerm = pLevel->plan.u.pTerm;
    +    assert( pTerm!=0 );
    +    assert( pTerm->eOperator==WO_OR );
    +    assert( (pTerm->wtFlags & TERM_ORINFO)!=0 );
    +    pOrWc = &pTerm->u.pOrInfo->wc;
    +    pFinal = &pOrWc->a[pOrWc->nTerm-1];
    +
    +    /* Set up a SrcList containing just the table being scanned by this loop. */
    +    oneTab.nSrc = 1;
    +    oneTab.nAlloc = 1;
    +    oneTab.a[0] = *pTabItem;
    +
    +    /* Initialize the rowset register to contain NULL. An SQL NULL is 
    +    ** equivalent to an empty rowset.
    +    **
    +    ** Also initialize regReturn to contain the address of the instruction 
    +    ** immediately following the OP_Return at the bottom of the loop. This
    +    ** is required in a few obscure LEFT JOIN cases where control jumps
    +    ** over the top of the loop into the body of it. In this case the 
    +    ** correct response for the end-of-loop code (the OP_Return) is to 
    +    ** fall through to the next instruction, just as an OP_Next does if
    +    ** called on an uninitialized cursor.
    +    */
    +    if( (wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
    +      regRowset = ++pParse->nMem;
    +      regRowid = ++pParse->nMem;
    +      sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset);
    +    }
    +    iRetInit = sqlite3VdbeAddOp2(v, OP_Integer, 0, regReturn);
    +
    +    for(ii=0; ii<pOrWc->nTerm; ii++){
    +      WhereTerm *pOrTerm = &pOrWc->a[ii];
    +      if( pOrTerm->leftCursor==iCur || pOrTerm->eOperator==WO_AND ){
    +        WhereInfo *pSubWInfo;          /* Info for single OR-term scan */
    +        /* Loop through table entries that match term pOrTerm. */
    +        pSubWInfo = sqlite3WhereBegin(pParse, &oneTab, pOrTerm->pExpr, 0,
    +                        WHERE_OMIT_OPEN | WHERE_OMIT_CLOSE | WHERE_FORCE_TABLE);
    +        if( pSubWInfo ){
    +          if( (wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
    +            int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
    +            int r;
    +            r = sqlite3ExprCodeGetColumn(pParse, pTabItem->pTab, -1, iCur, 
    +                                         regRowid, 0);
    +            sqlite3VdbeAddOp4(v, OP_RowSetTest, regRowset,
    +                              sqlite3VdbeCurrentAddr(v)+2,
    +                              r, SQLITE_INT_TO_PTR(iSet), P4_INT32);
    +          }
    +          sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
    +
    +          /* Finish the loop through table entries that match term pOrTerm. */
    +          sqlite3WhereEnd(pSubWInfo);
    +        }
    +      }
    +    }
    +    sqlite3VdbeChangeP1(v, iRetInit, sqlite3VdbeCurrentAddr(v));
    +    /* sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset); */
    +    sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrBrk);
    +    sqlite3VdbeResolveLabel(v, iLoopBody);
    +
    +    pLevel->op = OP_Return;
    +    pLevel->p1 = regReturn;
    +    disableTerm(pLevel, pTerm);
    +  }else
    +#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
    +
    +  {
    +    /* Case 5:  There is no usable index.  We must do a complete
    +    **          scan of the entire table.
    +    */
    +    static const u8 aStep[] = { OP_Next, OP_Prev };
    +    static const u8 aStart[] = { OP_Rewind, OP_Last };
    +    assert( bRev==0 || bRev==1 );
    +    assert( omitTable==0 );
    +    pLevel->op = aStep[bRev];
    +    pLevel->p1 = iCur;
    +    pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
    +    pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
    +  }
    +  notReady &= ~getMask(pWC->pMaskSet, iCur);
    +
    +  /* Insert code to test every subexpression that can be completely
    +  ** computed using the current set of tables.
    +  */
    +  k = 0;
    +  for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
    +    Expr *pE;
    +    testcase( pTerm->wtFlags & TERM_VIRTUAL );
    +    testcase( pTerm->wtFlags & TERM_CODED );
    +    if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
    +    if( (pTerm->prereqAll & notReady)!=0 ) continue;
    +    pE = pTerm->pExpr;
    +    assert( pE!=0 );
    +    if( pLevel->iLeftJoin && !ExprHasProperty(pE, EP_FromJoin) ){
    +      continue;
    +    }
    +    sqlite3ExprIfFalse(pParse, pE, addrCont, SQLITE_JUMPIFNULL);
    +    k = 1;
    +    pTerm->wtFlags |= TERM_CODED;
    +  }
    +
    +  /* For a LEFT OUTER JOIN, generate code that will record the fact that
    +  ** at least one row of the right table has matched the left table.  
    +  */
    +  if( pLevel->iLeftJoin ){
    +    pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);
    +    sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);
    +    VdbeComment((v, "record LEFT JOIN hit"));
    +    sqlite3ExprCacheClear(pParse);
    +    for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
    +      testcase( pTerm->wtFlags & TERM_VIRTUAL );
    +      testcase( pTerm->wtFlags & TERM_CODED );
    +      if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
    +      if( (pTerm->prereqAll & notReady)!=0 ) continue;
    +      assert( pTerm->pExpr );
    +      sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);
    +      pTerm->wtFlags |= TERM_CODED;
    +    }
    +  }
    +  sqlite3ReleaseTempReg(pParse, iReleaseReg);
    +
    +  return notReady;
    +}
    +
    +#if defined(SQLITE_TEST)
    +/*
    +** The following variable holds a text description of query plan generated
    +** by the most recent call to sqlite3WhereBegin().  Each call to WhereBegin
    +** overwrites the previous.  This information is used for testing and
    +** analysis only.
    +*/
    +SQLITE_API char sqlite3_query_plan[BMS*2*40];  /* Text of the join */
    +static int nQPlan = 0;              /* Next free slow in _query_plan[] */
    +
    +#endif /* SQLITE_TEST */
    +
    +
    +/*
    +** Free a WhereInfo structure
    +*/
    +static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
    +  if( pWInfo ){
    +    int i;
    +    for(i=0; i<pWInfo->nLevel; i++){
    +      sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;
    +      if( pInfo ){
    +        /* assert( pInfo->needToFreeIdxStr==0 || db->mallocFailed ); */
    +        if( pInfo->needToFreeIdxStr ){
    +          sqlite3_free(pInfo->idxStr);
    +        }
    +        sqlite3DbFree(db, pInfo);
    +      }
    +    }
    +    whereClauseClear(pWInfo->pWC);
    +    sqlite3DbFree(db, pWInfo);
    +  }
    +}
    +
    +
    +/*
    +** Generate the beginning of the loop used for WHERE clause processing.
    +** The return value is a pointer to an opaque structure that contains
    +** information needed to terminate the loop.  Later, the calling routine
    +** should invoke sqlite3WhereEnd() with the return value of this function
    +** in order to complete the WHERE clause processing.
    +**
    +** If an error occurs, this routine returns NULL.
    +**
    +** The basic idea is to do a nested loop, one loop for each table in
    +** the FROM clause of a select.  (INSERT and UPDATE statements are the
    +** same as a SELECT with only a single table in the FROM clause.)  For
    +** example, if the SQL is this:
    +**
    +**       SELECT * FROM t1, t2, t3 WHERE ...;
    +**
    +** Then the code generated is conceptually like the following:
    +**
    +**      foreach row1 in t1 do       \    Code generated
    +**        foreach row2 in t2 do      |-- by sqlite3WhereBegin()
    +**          foreach row3 in t3 do   /
    +**            ...
    +**          end                     \    Code generated
    +**        end                        |-- by sqlite3WhereEnd()
    +**      end                         /
    +**
    +** Note that the loops might not be nested in the order in which they
    +** appear in the FROM clause if a different order is better able to make
    +** use of indices.  Note also that when the IN operator appears in
    +** the WHERE clause, it might result in additional nested loops for
    +** scanning through all values on the right-hand side of the IN.
    +**
    +** There are Btree cursors associated with each table.  t1 uses cursor
    +** number pTabList->a[0].iCursor.  t2 uses the cursor pTabList->a[1].iCursor.
    +** And so forth.  This routine generates code to open those VDBE cursors
    +** and sqlite3WhereEnd() generates the code to close them.
    +**
    +** The code that sqlite3WhereBegin() generates leaves the cursors named
    +** in pTabList pointing at their appropriate entries.  The [...] code
    +** can use OP_Column and OP_Rowid opcodes on these cursors to extract
    +** data from the various tables of the loop.
    +**
    +** If the WHERE clause is empty, the foreach loops must each scan their
    +** entire tables.  Thus a three-way join is an O(N^3) operation.  But if
    +** the tables have indices and there are terms in the WHERE clause that
    +** refer to those indices, a complete table scan can be avoided and the
    +** code will run much faster.  Most of the work of this routine is checking
    +** to see if there are indices that can be used to speed up the loop.
    +**
    +** Terms of the WHERE clause are also used to limit which rows actually
    +** make it to the "..." in the middle of the loop.  After each "foreach",
    +** terms of the WHERE clause that use only terms in that loop and outer
    +** loops are evaluated and if false a jump is made around all subsequent
    +** inner loops (or around the "..." if the test occurs within the inner-
    +** most loop)
    +**
    +** OUTER JOINS
    +**
    +** An outer join of tables t1 and t2 is conceptally coded as follows:
    +**
    +**    foreach row1 in t1 do
    +**      flag = 0
    +**      foreach row2 in t2 do
    +**        start:
    +**          ...
    +**          flag = 1
    +**      end
    +**      if flag==0 then
    +**        move the row2 cursor to a null row
    +**        goto start
    +**      fi
    +**    end
    +**
    +** ORDER BY CLAUSE PROCESSING
    +**
    +** *ppOrderBy is a pointer to the ORDER BY clause of a SELECT statement,
    +** if there is one.  If there is no ORDER BY clause or if this routine
    +** is called from an UPDATE or DELETE statement, then ppOrderBy is NULL.
    +**
    +** If an index can be used so that the natural output order of the table
    +** scan is correct for the ORDER BY clause, then that index is used and
    +** *ppOrderBy is set to NULL.  This is an optimization that prevents an
    +** unnecessary sort of the result set if an index appropriate for the
    +** ORDER BY clause already exists.
    +**
    +** If the where clause loops cannot be arranged to provide the correct
    +** output order, then the *ppOrderBy is unchanged.
    +*/
    +SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
    +  Parse *pParse,        /* The parser context */
    +  SrcList *pTabList,    /* A list of all tables to be scanned */
    +  Expr *pWhere,         /* The WHERE clause */
    +  ExprList **ppOrderBy, /* An ORDER BY clause, or NULL */
    +  u16 wctrlFlags        /* One of the WHERE_* flags defined in sqliteInt.h */
    +){
    +  int i;                     /* Loop counter */
    +  int nByteWInfo;            /* Num. bytes allocated for WhereInfo struct */
    +  WhereInfo *pWInfo;         /* Will become the return value of this function */
    +  Vdbe *v = pParse->pVdbe;   /* The virtual database engine */
    +  Bitmask notReady;          /* Cursors that are not yet positioned */
    +  WhereMaskSet *pMaskSet;    /* The expression mask set */
    +  WhereClause *pWC;               /* Decomposition of the WHERE clause */
    +  struct SrcList_item *pTabItem;  /* A single entry from pTabList */
    +  WhereLevel *pLevel;             /* A single level in the pWInfo list */
    +  int iFrom;                      /* First unused FROM clause element */
    +  int andFlags;              /* AND-ed combination of all pWC->a[].wtFlags */
    +  sqlite3 *db;               /* Database connection */
    +
    +  /* The number of tables in the FROM clause is limited by the number of
    +  ** bits in a Bitmask 
    +  */
    +  if( pTabList->nSrc>BMS ){
    +    sqlite3ErrorMsg(pParse, "at most %d tables in a join", BMS);
    +    return 0;
    +  }
    +
    +  /* Allocate and initialize the WhereInfo structure that will become the
    +  ** return value. A single allocation is used to store the WhereInfo
    +  ** struct, the contents of WhereInfo.a[], the WhereClause structure
    +  ** and the WhereMaskSet structure. Since WhereClause contains an 8-byte
    +  ** field (type Bitmask) it must be aligned on an 8-byte boundary on
    +  ** some architectures. Hence the ROUND8() below.
    +  */
    +  db = pParse->db;
    +  nByteWInfo = ROUND8(sizeof(WhereInfo)+(pTabList->nSrc-1)*sizeof(WhereLevel));
    +  pWInfo = sqlite3DbMallocZero(db, 
    +      nByteWInfo + 
    +      sizeof(WhereClause) +
    +      sizeof(WhereMaskSet)
    +  );
    +  if( db->mallocFailed ){
    +    goto whereBeginError;
    +  }
    +  pWInfo->nLevel = pTabList->nSrc;
    +  pWInfo->pParse = pParse;
    +  pWInfo->pTabList = pTabList;
    +  pWInfo->iBreak = sqlite3VdbeMakeLabel(v);
    +  pWInfo->pWC = pWC = (WhereClause *)&((u8 *)pWInfo)[nByteWInfo];
    +  pWInfo->wctrlFlags = wctrlFlags;
    +  pMaskSet = (WhereMaskSet*)&pWC[1];
    +
    +  /* Split the WHERE clause into separate subexpressions where each
    +  ** subexpression is separated by an AND operator.
    +  */
    +  initMaskSet(pMaskSet);
    +  whereClauseInit(pWC, pParse, pMaskSet);
    +  sqlite3ExprCodeConstants(pParse, pWhere);
    +  whereSplit(pWC, pWhere, TK_AND);
    +    
    +  /* Special case: a WHERE clause that is constant.  Evaluate the
    +  ** expression and either jump over all of the code or fall thru.
    +  */
    +  if( pWhere && (pTabList->nSrc==0 || sqlite3ExprIsConstantNotJoin(pWhere)) ){
    +    sqlite3ExprIfFalse(pParse, pWhere, pWInfo->iBreak, SQLITE_JUMPIFNULL);
    +    pWhere = 0;
    +  }
    +
    +  /* Assign a bit from the bitmask to every term in the FROM clause.
    +  **
    +  ** When assigning bitmask values to FROM clause cursors, it must be
    +  ** the case that if X is the bitmask for the N-th FROM clause term then
    +  ** the bitmask for all FROM clause terms to the left of the N-th term
    +  ** is (X-1).   An expression from the ON clause of a LEFT JOIN can use
    +  ** its Expr.iRightJoinTable value to find the bitmask of the right table
    +  ** of the join.  Subtracting one from the right table bitmask gives a
    +  ** bitmask for all tables to the left of the join.  Knowing the bitmask
    +  ** for all tables to the left of a left join is important.  Ticket #3015.
    +  **
    +  ** Configure the WhereClause.vmask variable so that bits that correspond
    +  ** to virtual table cursors are set. This is used to selectively disable 
    +  ** the OR-to-IN transformation in exprAnalyzeOrTerm(). It is not helpful 
    +  ** with virtual tables.
    +  */
    +  assert( pWC->vmask==0 && pMaskSet->n==0 );
    +  for(i=0; i<pTabList->nSrc; i++){
    +    createMask(pMaskSet, pTabList->a[i].iCursor);
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( ALWAYS(pTabList->a[i].pTab) && IsVirtual(pTabList->a[i].pTab) ){
    +      pWC->vmask |= ((Bitmask)1 << i);
    +    }
    +#endif
    +  }
    +#ifndef NDEBUG
    +  {
    +    Bitmask toTheLeft = 0;
    +    for(i=0; i<pTabList->nSrc; i++){
    +      Bitmask m = getMask(pMaskSet, pTabList->a[i].iCursor);
    +      assert( (m-1)==toTheLeft );
    +      toTheLeft |= m;
    +    }
    +  }
    +#endif
    +
    +  /* Analyze all of the subexpressions.  Note that exprAnalyze() might
    +  ** add new virtual terms onto the end of the WHERE clause.  We do not
    +  ** want to analyze these virtual terms, so start analyzing at the end
    +  ** and work forward so that the added virtual terms are never processed.
    +  */
    +  exprAnalyzeAll(pTabList, pWC);
    +  if( db->mallocFailed ){
    +    goto whereBeginError;
    +  }
    +
    +  /* Chose the best index to use for each table in the FROM clause.
    +  **
    +  ** This loop fills in the following fields:
    +  **
    +  **   pWInfo->a[].pIdx      The index to use for this level of the loop.
    +  **   pWInfo->a[].wsFlags   WHERE_xxx flags associated with pIdx
    +  **   pWInfo->a[].nEq       The number of == and IN constraints
    +  **   pWInfo->a[].iFrom     Which term of the FROM clause is being coded
    +  **   pWInfo->a[].iTabCur   The VDBE cursor for the database table
    +  **   pWInfo->a[].iIdxCur   The VDBE cursor for the index
    +  **   pWInfo->a[].pTerm     When wsFlags==WO_OR, the OR-clause term
    +  **
    +  ** This loop also figures out the nesting order of tables in the FROM
    +  ** clause.
    +  */
    +  notReady = ~(Bitmask)0;
    +  pTabItem = pTabList->a;
    +  pLevel = pWInfo->a;
    +  andFlags = ~0;
    +  WHERETRACE(("*** Optimizer Start ***\n"));
    +  for(i=iFrom=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){
    +    WhereCost bestPlan;         /* Most efficient plan seen so far */
    +    Index *pIdx;                /* Index for FROM table at pTabItem */
    +    int j;                      /* For looping over FROM tables */
    +    int bestJ = -1;             /* The value of j */
    +    Bitmask m;                  /* Bitmask value for j or bestJ */
    +    int isOptimal;              /* Iterator for optimal/non-optimal search */
    +
    +    memset(&bestPlan, 0, sizeof(bestPlan));
    +    bestPlan.rCost = SQLITE_BIG_DBL;
    +
    +    /* Loop through the remaining entries in the FROM clause to find the
    +    ** next nested loop. The FROM clause entries may be iterated through
    +    ** either once or twice. 
    +    **
    +    ** The first iteration, which is always performed, searches for the
    +    ** FROM clause entry that permits the lowest-cost, "optimal" scan. In
    +    ** this context an optimal scan is one that uses the same strategy
    +    ** for the given FROM clause entry as would be selected if the entry
    +    ** were used as the innermost nested loop.  In other words, a table
    +    ** is chosen such that the cost of running that table cannot be reduced
    +    ** by waiting for other tables to run first.
    +    **
    +    ** The second iteration is only performed if no optimal scan strategies
    +    ** were found by the first. This iteration is used to search for the
    +    ** lowest cost scan overall.
    +    **
    +    ** Previous versions of SQLite performed only the second iteration -
    +    ** the next outermost loop was always that with the lowest overall
    +    ** cost. However, this meant that SQLite could select the wrong plan
    +    ** for scripts such as the following:
    +    **   
    +    **   CREATE TABLE t1(a, b); 
    +    **   CREATE TABLE t2(c, d);
    +    **   SELECT * FROM t2, t1 WHERE t2.rowid = t1.a;
    +    **
    +    ** The best strategy is to iterate through table t1 first. However it
    +    ** is not possible to determine this with a simple greedy algorithm.
    +    ** However, since the cost of a linear scan through table t2 is the same 
    +    ** as the cost of a linear scan through table t1, a simple greedy 
    +    ** algorithm may choose to use t2 for the outer loop, which is a much
    +    ** costlier approach.
    +    */
    +    for(isOptimal=1; isOptimal>=0 && bestJ<0; isOptimal--){
    +      Bitmask mask = (isOptimal ? 0 : notReady);
    +      assert( (pTabList->nSrc-iFrom)>1 || isOptimal );
    +      for(j=iFrom, pTabItem=&pTabList->a[j]; j<pTabList->nSrc; j++, pTabItem++){
    +        int doNotReorder;    /* True if this table should not be reordered */
    +        WhereCost sCost;     /* Cost information from best[Virtual]Index() */
    +        ExprList *pOrderBy;  /* ORDER BY clause for index to optimize */
    +  
    +        doNotReorder =  (pTabItem->jointype & (JT_LEFT|JT_CROSS))!=0;
    +        if( j!=iFrom && doNotReorder ) break;
    +        m = getMask(pMaskSet, pTabItem->iCursor);
    +        if( (m & notReady)==0 ){
    +          if( j==iFrom ) iFrom++;
    +          continue;
    +        }
    +        pOrderBy = ((i==0 && ppOrderBy )?*ppOrderBy:0);
    +  
    +        assert( pTabItem->pTab );
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +        if( IsVirtual(pTabItem->pTab) ){
    +          sqlite3_index_info **pp = &pWInfo->a[j].pIdxInfo;
    +          bestVirtualIndex(pParse, pWC, pTabItem, mask, pOrderBy, &sCost, pp);
    +        }else 
    +#endif
    +        {
    +          bestBtreeIndex(pParse, pWC, pTabItem, mask, pOrderBy, &sCost);
    +        }
    +        assert( isOptimal || (sCost.used&notReady)==0 );
    +
    +        if( (sCost.used&notReady)==0
    +         && (j==iFrom || sCost.rCost<bestPlan.rCost) 
    +        ){
    +          bestPlan = sCost;
    +          bestJ = j;
    +        }
    +        if( doNotReorder ) break;
    +      }
    +    }
    +    assert( bestJ>=0 );
    +    assert( notReady & getMask(pMaskSet, pTabList->a[bestJ].iCursor) );
    +    WHERETRACE(("*** Optimizer selects table %d for loop %d\n", bestJ,
    +           pLevel-pWInfo->a));
    +    if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 ){
    +      *ppOrderBy = 0;
    +    }
    +    andFlags &= bestPlan.plan.wsFlags;
    +    pLevel->plan = bestPlan.plan;
    +    if( bestPlan.plan.wsFlags & WHERE_INDEXED ){
    +      pLevel->iIdxCur = pParse->nTab++;
    +    }else{
    +      pLevel->iIdxCur = -1;
    +    }
    +    notReady &= ~getMask(pMaskSet, pTabList->a[bestJ].iCursor);
    +    pLevel->iFrom = (u8)bestJ;
    +
    +    /* Check that if the table scanned by this loop iteration had an
    +    ** INDEXED BY clause attached to it, that the named index is being
    +    ** used for the scan. If not, then query compilation has failed.
    +    ** Return an error.
    +    */
    +    pIdx = pTabList->a[bestJ].pIndex;
    +    if( pIdx ){
    +      if( (bestPlan.plan.wsFlags & WHERE_INDEXED)==0 ){
    +        sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
    +        goto whereBeginError;
    +      }else{
    +        /* If an INDEXED BY clause is used, the bestIndex() function is
    +        ** guaranteed to find the index specified in the INDEXED BY clause
    +        ** if it find an index at all. */
    +        assert( bestPlan.plan.u.pIdx==pIdx );
    +      }
    +    }
    +  }
    +  WHERETRACE(("*** Optimizer Finished ***\n"));
    +  if( pParse->nErr || db->mallocFailed ){
    +    goto whereBeginError;
    +  }
    +
    +  /* If the total query only selects a single row, then the ORDER BY
    +  ** clause is irrelevant.
    +  */
    +  if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
    +    *ppOrderBy = 0;
    +  }
    +
    +  /* If the caller is an UPDATE or DELETE statement that is requesting
    +  ** to use a one-pass algorithm, determine if this is appropriate.
    +  ** The one-pass algorithm only works if the WHERE clause constraints
    +  ** the statement to update a single row.
    +  */
    +  assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );
    +  if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 && (andFlags & WHERE_UNIQUE)!=0 ){
    +    pWInfo->okOnePass = 1;
    +    pWInfo->a[0].plan.wsFlags &= ~WHERE_IDX_ONLY;
    +  }
    +
    +  /* Open all tables in the pTabList and any indices selected for
    +  ** searching those tables.
    +  */
    +  sqlite3CodeVerifySchema(pParse, -1); /* Insert the cookie verifier Goto */
    +  for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){
    +    Table *pTab;     /* Table to open */
    +    int iDb;         /* Index of database containing table/index */
    +
    +#ifndef SQLITE_OMIT_EXPLAIN
    +    if( pParse->explain==2 ){
    +      char *zMsg;
    +      struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
    +      zMsg = sqlite3MPrintf(db, "TABLE %s", pItem->zName);
    +      if( pItem->zAlias ){
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s AS %s", zMsg, pItem->zAlias);
    +      }
    +      if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s WITH INDEX %s",
    +           zMsg, pLevel->plan.u.pIdx->zName);
    +      }else if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s VIA MULTI-INDEX UNION", zMsg);
    +      }else if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s USING PRIMARY KEY", zMsg);
    +      }
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +      else if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
    +        sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s VIRTUAL TABLE INDEX %d:%s", zMsg,
    +                    pVtabIdx->idxNum, pVtabIdx->idxStr);
    +      }
    +#endif
    +      if( pLevel->plan.wsFlags & WHERE_ORDERBY ){
    +        zMsg = sqlite3MAppendf(db, zMsg, "%s ORDER BY", zMsg);
    +      }
    +      sqlite3VdbeAddOp4(v, OP_Explain, i, pLevel->iFrom, 0, zMsg, P4_DYNAMIC);
    +    }
    +#endif /* SQLITE_OMIT_EXPLAIN */
    +    pTabItem = &pTabList->a[pLevel->iFrom];
    +    pTab = pTabItem->pTab;
    +    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    +    if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ) continue;
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +    if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
    +      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
    +      int iCur = pTabItem->iCursor;
    +      sqlite3VdbeAddOp4(v, OP_VOpen, iCur, 0, 0, pVTab, P4_VTAB);
    +    }else
    +#endif
    +    if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
    +         && (wctrlFlags & WHERE_OMIT_OPEN)==0 ){
    +      int op = pWInfo->okOnePass ? OP_OpenWrite : OP_OpenRead;
    +      sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, op);
    +      if( !pWInfo->okOnePass && pTab->nCol<BMS ){
    +        Bitmask b = pTabItem->colUsed;
    +        int n = 0;
    +        for(; b; b=b>>1, n++){}
    +        sqlite3VdbeChangeP4(v, sqlite3VdbeCurrentAddr(v)-1, SQLITE_INT_TO_PTR(n), P4_INT32);
    +        assert( n<=pTab->nCol );
    +      }
    +    }else{
    +      sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
    +    }
    +    pLevel->iTabCur = pTabItem->iCursor;
    +    if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
    +      Index *pIx = pLevel->plan.u.pIdx;
    +      KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);
    +      int iIdxCur = pLevel->iIdxCur;
    +      assert( pIx->pSchema==pTab->pSchema );
    +      assert( iIdxCur>=0 );
    +      sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb,
    +                        (char*)pKey, P4_KEYINFO_HANDOFF);
    +      VdbeComment((v, "%s", pIx->zName));
    +    }
    +    sqlite3CodeVerifySchema(pParse, iDb);
    +  }
    +  pWInfo->iTop = sqlite3VdbeCurrentAddr(v);
    +
    +  /* Generate the code to do the search.  Each iteration of the for
    +  ** loop below generates code for a single nested loop of the VM
    +  ** program.
    +  */
    +  notReady = ~(Bitmask)0;
    +  for(i=0; i<pTabList->nSrc; i++){
    +    notReady = codeOneLoopStart(pWInfo, i, wctrlFlags, notReady);
    +    pWInfo->iContinue = pWInfo->a[i].addrCont;
    +  }
    +
    +#ifdef SQLITE_TEST  /* For testing and debugging use only */
    +  /* Record in the query plan information about the current table
    +  ** and the index used to access it (if any).  If the table itself
    +  ** is not used, its name is just '{}'.  If no index is used
    +  ** the index is listed as "{}".  If the primary key is used the
    +  ** index name is '*'.
    +  */
    +  for(i=0; i<pTabList->nSrc; i++){
    +    char *z;
    +    int n;
    +    pLevel = &pWInfo->a[i];
    +    pTabItem = &pTabList->a[pLevel->iFrom];
    +    z = pTabItem->zAlias;
    +    if( z==0 ) z = pTabItem->pTab->zName;
    +    n = sqlite3Strlen30(z);
    +    if( n+nQPlan < sizeof(sqlite3_query_plan)-10 ){
    +      if( pLevel->plan.wsFlags & WHERE_IDX_ONLY ){
    +        memcpy(&sqlite3_query_plan[nQPlan], "{}", 2);
    +        nQPlan += 2;
    +      }else{
    +        memcpy(&sqlite3_query_plan[nQPlan], z, n);
    +        nQPlan += n;
    +      }
    +      sqlite3_query_plan[nQPlan++] = ' ';
    +    }
    +    testcase( pLevel->plan.wsFlags & WHERE_ROWID_EQ );
    +    testcase( pLevel->plan.wsFlags & WHERE_ROWID_RANGE );
    +    if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
    +      memcpy(&sqlite3_query_plan[nQPlan], "* ", 2);
    +      nQPlan += 2;
    +    }else if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
    +      n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
    +      if( n+nQPlan < sizeof(sqlite3_query_plan)-2 ){
    +        memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
    +        nQPlan += n;
    +        sqlite3_query_plan[nQPlan++] = ' ';
    +      }
    +    }else{
    +      memcpy(&sqlite3_query_plan[nQPlan], "{} ", 3);
    +      nQPlan += 3;
    +    }
    +  }
    +  while( nQPlan>0 && sqlite3_query_plan[nQPlan-1]==' ' ){
    +    sqlite3_query_plan[--nQPlan] = 0;
    +  }
    +  sqlite3_query_plan[nQPlan] = 0;
    +  nQPlan = 0;
    +#endif /* SQLITE_TEST // Testing and debugging use only */
    +
    +  /* Record the continuation address in the WhereInfo structure.  Then
    +  ** clean up and return.
    +  */
    +  return pWInfo;
    +
    +  /* Jump here if malloc fails */
    +whereBeginError:
    +  whereInfoFree(db, pWInfo);
    +  return 0;
    +}
    +
    +/*
    +** Generate the end of the WHERE loop.  See comments on 
    +** sqlite3WhereBegin() for additional information.
    +*/
    +SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
    +  Parse *pParse = pWInfo->pParse;
    +  Vdbe *v = pParse->pVdbe;
    +  int i;
    +  WhereLevel *pLevel;
    +  SrcList *pTabList = pWInfo->pTabList;
    +  sqlite3 *db = pParse->db;
    +
    +  /* Generate loop termination code.
    +  */
    +  sqlite3ExprCacheClear(pParse);
    +  for(i=pTabList->nSrc-1; i>=0; i--){
    +    pLevel = &pWInfo->a[i];
    +    sqlite3VdbeResolveLabel(v, pLevel->addrCont);
    +    if( pLevel->op!=OP_Noop ){
    +      sqlite3VdbeAddOp2(v, pLevel->op, pLevel->p1, pLevel->p2);
    +      sqlite3VdbeChangeP5(v, pLevel->p5);
    +    }
    +    if( pLevel->plan.wsFlags & WHERE_IN_ABLE && pLevel->u.in.nIn>0 ){
    +      struct InLoop *pIn;
    +      int j;
    +      sqlite3VdbeResolveLabel(v, pLevel->addrNxt);
    +      for(j=pLevel->u.in.nIn, pIn=&pLevel->u.in.aInLoop[j-1]; j>0; j--, pIn--){
    +        sqlite3VdbeJumpHere(v, pIn->addrInTop+1);
    +        sqlite3VdbeAddOp2(v, OP_Next, pIn->iCur, pIn->addrInTop);
    +        sqlite3VdbeJumpHere(v, pIn->addrInTop-1);
    +      }
    +      sqlite3DbFree(db, pLevel->u.in.aInLoop);
    +    }
    +    sqlite3VdbeResolveLabel(v, pLevel->addrBrk);
    +    if( pLevel->iLeftJoin ){
    +      int addr;
    +      addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin);
    +      sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
    +      if( pLevel->iIdxCur>=0 ){
    +        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
    +      }
    +      if( pLevel->op==OP_Return ){
    +        sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
    +      }else{
    +        sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrFirst);
    +      }
    +      sqlite3VdbeJumpHere(v, addr);
    +    }
    +  }
    +
    +  /* The "break" point is here, just past the end of the outer loop.
    +  ** Set it.
    +  */
    +  sqlite3VdbeResolveLabel(v, pWInfo->iBreak);
    +
    +  /* Close all of the cursors that were opened by sqlite3WhereBegin.
    +  */
    +  for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){
    +    struct SrcList_item *pTabItem = &pTabList->a[pLevel->iFrom];
    +    Table *pTab = pTabItem->pTab;
    +    assert( pTab!=0 );
    +    if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ) continue;
    +    if( (pWInfo->wctrlFlags & WHERE_OMIT_CLOSE)==0 ){
    +      if( !pWInfo->okOnePass && (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 ){
    +        sqlite3VdbeAddOp1(v, OP_Close, pTabItem->iCursor);
    +      }
    +      if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
    +        sqlite3VdbeAddOp1(v, OP_Close, pLevel->iIdxCur);
    +      }
    +    }
    +
    +    /* If this scan uses an index, make code substitutions to read data
    +    ** from the index in preference to the table. Sometimes, this means
    +    ** the table need never be read from. This is a performance boost,
    +    ** as the vdbe level waits until the table is read before actually
    +    ** seeking the table cursor to the record corresponding to the current
    +    ** position in the index.
    +    ** 
    +    ** Calls to the code generator in between sqlite3WhereBegin and
    +    ** sqlite3WhereEnd will have created code that references the table
    +    ** directly.  This loop scans all that code looking for opcodes
    +    ** that reference the table and converts them into opcodes that
    +    ** reference the index.
    +    */
    +    if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 && !db->mallocFailed){
    +      int k, j, last;
    +      VdbeOp *pOp;
    +      Index *pIdx = pLevel->plan.u.pIdx;
    +      int useIndexOnly = pLevel->plan.wsFlags & WHERE_IDX_ONLY;
    +
    +      assert( pIdx!=0 );
    +      pOp = sqlite3VdbeGetOp(v, pWInfo->iTop);
    +      last = sqlite3VdbeCurrentAddr(v);
    +      for(k=pWInfo->iTop; k<last; k++, pOp++){
    +        if( pOp->p1!=pLevel->iTabCur ) continue;
    +        if( pOp->opcode==OP_Column ){
    +          for(j=0; j<pIdx->nColumn; j++){
    +            if( pOp->p2==pIdx->aiColumn[j] ){
    +              pOp->p2 = j;
    +              pOp->p1 = pLevel->iIdxCur;
    +              break;
    +            }
    +          }
    +          assert(!useIndexOnly || j<pIdx->nColumn);
    +        }else if( pOp->opcode==OP_Rowid ){
    +          pOp->p1 = pLevel->iIdxCur;
    +          pOp->opcode = OP_IdxRowid;
    +        }else if( pOp->opcode==OP_NullRow && useIndexOnly ){
    +          pOp->opcode = OP_Noop;
    +        }
    +      }
    +    }
    +  }
    +
    +  /* Final cleanup
    +  */
    +  whereInfoFree(db, pWInfo);
    +  return;
    +}
    +
    +/************** End of where.c ***********************************************/
    +/************** Begin file parse.c *******************************************/
    +/* Driver template for the LEMON parser generator.
    +** The author disclaims copyright to this source code.
    +**
    +** This version of "lempar.c" is modified, slightly, for use by SQLite.
    +** The only modifications are the addition of a couple of NEVER()
    +** macros to disable tests that are needed in the case of a general
    +** LALR(1) grammar but which are always false in the
    +** specific grammar used by SQLite.
    +*/
    +/* First off, code is included that follows the "include" declaration
    +** in the input grammar file. */
    +
    +
    +/*
    +** Disable all error recovery processing in the parser push-down
    +** automaton.
    +*/
    +#define YYNOERRORRECOVERY 1
    +
    +/*
    +** Make yytestcase() the same as testcase()
    +*/
    +#define yytestcase(X) testcase(X)
    +
    +/*
    +** An instance of this structure holds information about the
    +** LIMIT clause of a SELECT statement.
    +*/
    +struct LimitVal {
    +  Expr *pLimit;    /* The LIMIT expression.  NULL if there is no limit */
    +  Expr *pOffset;   /* The OFFSET expression.  NULL if there is none */
    +};
    +
    +/*
    +** An instance of this structure is used to store the LIKE,
    +** GLOB, NOT LIKE, and NOT GLOB operators.
    +*/
    +struct LikeOp {
    +  Token eOperator;  /* "like" or "glob" or "regexp" */
    +  int not;         /* True if the NOT keyword is present */
    +};
    +
    +/*
    +** An instance of the following structure describes the event of a
    +** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
    +** TK_DELETE, or TK_INSTEAD.  If the event is of the form
    +**
    +**      UPDATE ON (a,b,c)
    +**
    +** Then the "b" IdList records the list "a,b,c".
    +*/
    +struct TrigEvent { int a; IdList * b; };
    +
    +/*
    +** An instance of this structure holds the ATTACH key and the key type.
    +*/
    +struct AttachKey { int type;  Token key; };
    +
    +
    +  /* This is a utility routine used to set the ExprSpan.zStart and
    +  ** ExprSpan.zEnd values of pOut so that the span covers the complete
    +  ** range of text beginning with pStart and going to the end of pEnd.
    +  */
    +  static void spanSet(ExprSpan *pOut, Token *pStart, Token *pEnd){
    +    pOut->zStart = pStart->z;
    +    pOut->zEnd = &pEnd->z[pEnd->n];
    +  }
    +
    +  /* Construct a new Expr object from a single identifier.  Use the
    +  ** new Expr to populate pOut.  Set the span of pOut to be the identifier
    +  ** that created the expression.
    +  */
    +  static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){
    +    pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);
    +    pOut->zStart = pValue->z;
    +    pOut->zEnd = &pValue->z[pValue->n];
    +  }
    +
    +  /* This routine constructs a binary expression node out of two ExprSpan
    +  ** objects and uses the result to populate a new ExprSpan object.
    +  */
    +  static void spanBinaryExpr(
    +    ExprSpan *pOut,     /* Write the result here */
    +    Parse *pParse,      /* The parsing context.  Errors accumulate here */
    +    int op,             /* The binary operation */
    +    ExprSpan *pLeft,    /* The left operand */
    +    ExprSpan *pRight    /* The right operand */
    +  ){
    +    pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0);
    +    pOut->zStart = pLeft->zStart;
    +    pOut->zEnd = pRight->zEnd;
    +  }
    +
    +  /* Construct an expression node for a unary postfix operator
    +  */
    +  static void spanUnaryPostfix(
    +    ExprSpan *pOut,        /* Write the new expression node here */
    +    Parse *pParse,         /* Parsing context to record errors */
    +    int op,                /* The operator */
    +    ExprSpan *pOperand,    /* The operand */
    +    Token *pPostOp         /* The operand token for setting the span */
    +  ){
    +    pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
    +    pOut->zStart = pOperand->zStart;
    +    pOut->zEnd = &pPostOp->z[pPostOp->n];
    +  }                           
    +
    +  /* Construct an expression node for a unary prefix operator
    +  */
    +  static void spanUnaryPrefix(
    +    ExprSpan *pOut,        /* Write the new expression node here */
    +    Parse *pParse,         /* Parsing context to record errors */
    +    int op,                /* The operator */
    +    ExprSpan *pOperand,    /* The operand */
    +    Token *pPreOp         /* The operand token for setting the span */
    +  ){
    +    pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
    +    pOut->zStart = pPreOp->z;
    +    pOut->zEnd = pOperand->zEnd;
    +  }
    +/* Next is all token values, in a form suitable for use by makeheaders.
    +** This section will be null unless lemon is run with the -m switch.
    +*/
    +/* 
    +** These constants (all generated automatically by the parser generator)
    +** specify the various kinds of tokens (terminals) that the parser
    +** understands. 
    +**
    +** Each symbol here is a terminal symbol in the grammar.
    +*/
    +/* Make sure the INTERFACE macro is defined.
    +*/
    +#ifndef INTERFACE
    +# define INTERFACE 1
    +#endif
    +/* The next thing included is series of defines which control
    +** various aspects of the generated parser.
    +**    YYCODETYPE         is the data type used for storing terminal
    +**                       and nonterminal numbers.  "unsigned char" is
    +**                       used if there are fewer than 250 terminals
    +**                       and nonterminals.  "int" is used otherwise.
    +**    YYNOCODE           is a number of type YYCODETYPE which corresponds
    +**                       to no legal terminal or nonterminal number.  This
    +**                       number is used to fill in empty slots of the hash 
    +**                       table.
    +**    YYFALLBACK         If defined, this indicates that one or more tokens
    +**                       have fall-back values which should be used if the
    +**                       original value of the token will not parse.
    +**    YYACTIONTYPE       is the data type used for storing terminal
    +**                       and nonterminal numbers.  "unsigned char" is
    +**                       used if there are fewer than 250 rules and
    +**                       states combined.  "int" is used otherwise.
    +**    sqlite3ParserTOKENTYPE     is the data type used for minor tokens given 
    +**                       directly to the parser from the tokenizer.
    +**    YYMINORTYPE        is the data type used for all minor tokens.
    +**                       This is typically a union of many types, one of
    +**                       which is sqlite3ParserTOKENTYPE.  The entry in the union
    +**                       for base tokens is called "yy0".
    +**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
    +**                       zero the stack is dynamically sized using realloc()
    +**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
    +**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
    +**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
    +**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
    +**    YYNSTATE           the combined number of states.
    +**    YYNRULE            the number of rules in the grammar
    +**    YYERRORSYMBOL      is the code number of the error symbol.  If not
    +**                       defined, then do no error processing.
    +*/
    +#define YYCODETYPE unsigned char
    +#define YYNOCODE 254
    +#define YYACTIONTYPE unsigned short int
    +#define YYWILDCARD 67
    +#define sqlite3ParserTOKENTYPE Token
    +typedef union {
    +  int yyinit;
    +  sqlite3ParserTOKENTYPE yy0;
    +  Select* yy3;
    +  ExprList* yy14;
    +  SrcList* yy65;
    +  struct LikeOp yy96;
    +  Expr* yy132;
    +  u8 yy186;
    +  int yy328;
    +  ExprSpan yy346;
    +  struct TrigEvent yy378;
    +  IdList* yy408;
    +  struct {int value; int mask;} yy429;
    +  TriggerStep* yy473;
    +  struct LimitVal yy476;
    +} YYMINORTYPE;
    +#ifndef YYSTACKDEPTH
    +#define YYSTACKDEPTH 100
    +#endif
    +#define sqlite3ParserARG_SDECL Parse *pParse;
    +#define sqlite3ParserARG_PDECL ,Parse *pParse
    +#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
    +#define sqlite3ParserARG_STORE yypParser->pParse = pParse
    +#define YYNSTATE 629
    +#define YYNRULE 329
    +#define YYFALLBACK 1
    +#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
    +#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
    +#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
    +
    +/* The yyzerominor constant is used to initialize instances of
    +** YYMINORTYPE objects to zero. */
    +static const YYMINORTYPE yyzerominor = { 0 };
    +
    +/* Define the yytestcase() macro to be a no-op if is not already defined
    +** otherwise.
    +**
    +** Applications can choose to define yytestcase() in the %include section
    +** to a macro that can assist in verifying code coverage.  For production
    +** code the yytestcase() macro should be turned off.  But it is useful
    +** for testing.
    +*/
    +#ifndef yytestcase
    +# define yytestcase(X)
    +#endif
    +
    +
    +/* Next are the tables used to determine what action to take based on the
    +** current state and lookahead token.  These tables are used to implement
    +** functions that take a state number and lookahead value and return an
    +** action integer.  
    +**
    +** Suppose the action integer is N.  Then the action is determined as
    +** follows
    +**
    +**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
    +**                                      token onto the stack and goto state N.
    +**
    +**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
    +**
    +**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
    +**
    +**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
    +**
    +**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
    +**                                      slots in the yy_action[] table.
    +**
    +** The action table is constructed as a single large table named yy_action[].
    +** Given state S and lookahead X, the action is computed as
    +**
    +**      yy_action[ yy_shift_ofst[S] + X ]
    +**
    +** If the index value yy_shift_ofst[S]+X is out of range or if the value
    +** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
    +** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
    +** and that yy_default[S] should be used instead.  
    +**
    +** The formula above is for computing the action when the lookahead is
    +** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
    +** a reduce action) then the yy_reduce_ofst[] array is used in place of
    +** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
    +** YY_SHIFT_USE_DFLT.
    +**
    +** The following are the tables generated in this section:
    +**
    +**  yy_action[]        A single table containing all actions.
    +**  yy_lookahead[]     A table containing the lookahead for each entry in
    +**                     yy_action.  Used to detect hash collisions.
    +**  yy_shift_ofst[]    For each state, the offset into yy_action for
    +**                     shifting terminals.
    +**  yy_reduce_ofst[]   For each state, the offset into yy_action for
    +**                     shifting non-terminals after a reduce.
    +**  yy_default[]       Default action for each state.
    +*/
    +#define YY_ACTTAB_COUNT (1543)
    +static const YYACTIONTYPE yy_action[] = {
    + /*     0 */   312,   49,  554,   46,  147,  172,  626,  596,   55,   55,
    + /*    10 */    55,   55,  301,   53,   53,   53,   53,   52,   52,   51,
    + /*    20 */    51,   51,   50,  237,  617,  616,  615,  622,  621,  607,
    + /*    30 */   589,  583,   48,   53,   53,   53,   53,   52,   52,   51,
    + /*    40 */    51,   51,   50,  237,   51,   51,   51,   50,  237,   56,
    + /*    50 */    57,   47,  581,  580,  582,  582,   54,   54,   55,   55,
    + /*    60 */    55,   55,  216,   53,   53,   53,   53,   52,   52,   51,
    + /*    70 */    51,   51,   50,  237,  312,  596,   49,  329,   46,  147,
    + /*    80 */    32,   53,   53,   53,   53,   52,   52,   51,   51,   51,
    + /*    90 */    50,  237,  329,  622,  621,  619,  618,  166,  433,  547,
    + /*   100 */   381,  378,  377,  549,  589,  583,  389,  490,  166,   58,
    + /*   110 */   376,  381,  378,  377,  390,  299,  622,  621,  480,   67,
    + /*   120 */   670,  376,  620,   56,   57,   47,  581,  580,  582,  582,
    + /*   130 */    54,   54,   55,   55,   55,   55,  253,   53,   53,   53,
    + /*   140 */    53,   52,   52,   51,   51,   51,   50,  237,  312,  408,
    + /*   150 */   225,  578,  578,  133,  177,  139,  283,  384,  278,  383,
    + /*   160 */   169,  619,  618,  601,  197,  225,  274,  602,  439,  146,
    + /*   170 */   139,  283,  384,  278,  383,  169,  569,  235,  589,  583,
    + /*   180 */   250,  274,  252,  620,  619,  618,  546,  436,  440,  441,
    + /*   190 */   168,  622,  621,  547,  438,  437,  192,   56,   57,   47,
    + /*   200 */   581,  580,  582,  582,   54,   54,   55,   55,   55,   55,
    + /*   210 */     6,   53,   53,   53,   53,   52,   52,   51,   51,   51,
    + /*   220 */    50,  237,  312,  282,   52,   52,   51,   51,   51,   50,
    + /*   230 */   237,  490,  183,  281,  547,  166,  439,  565,  381,  378,
    + /*   240 */   377,  596,  606,   67,  327,  172,  620,  596,  376,  442,
    + /*   250 */   236,  620,  589,  583,  306,  423,  440,  339,  251,  619,
    + /*   260 */   618,  331,  574,  573,    7,  524,  194,  481,   16,  594,
    + /*   270 */   189,   56,   57,   47,  581,  580,  582,  582,   54,   54,
    + /*   280 */    55,   55,   55,   55,  545,   53,   53,   53,   53,   52,
    + /*   290 */    52,   51,   51,   51,   50,  237,  312,  410,  464,  421,
    + /*   300 */   592,  592,  592,  671,  146,  410,    1,  205,  410,  596,
    + /*   310 */   622,  621,  413,  420,  949,  596,  949,  340,  236,  530,
    + /*   320 */   413,  600,   74,  413,  236,  552,  589,  583,  547,  600,
    + /*   330 */    95,   68,  600,   88,  551,  622,  621,  465,  542,   38,
    + /*   340 */    49,  599,   46,  147,  465,   56,   57,   47,  581,  580,
    + /*   350 */   582,  582,   54,   54,   55,   55,   55,   55,  424,   53,
    + /*   360 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  237,
    + /*   370 */   312,  397,  395,  232,  529,  577,  387,  533,  619,  618,
    + /*   380 */   605,  492,  560,  588,  587,  350,  257,  622,  621,  495,
    + /*   390 */   564,  356,  350,  257,   49,  239,   46,  147,  559,  357,
    + /*   400 */   589,  583,  239,  619,  618,  585,  584,  408,  258,  578,
    + /*   410 */   578,  672,  209,   35,  558,  258,  401,  622,  621,   56,
    + /*   420 */    57,   47,  581,  580,  582,  582,   54,   54,   55,   55,
    + /*   430 */    55,   55,  586,   53,   53,   53,   53,   52,   52,   51,
    + /*   440 */    51,   51,   50,  237,  312,  560,  599,  410,  526,  531,
    + /*   450 */   184,  514,  513,  474,  366,  619,  618,  576,  410,   65,
    + /*   460 */   176,  559,  413,  408,  311,  578,  578,  567,  491,  215,
    + /*   470 */   352,  600,   94,  413,  589,  583,  474,  558,  408,  518,
    + /*   480 */   578,  578,  600,   95,  470,  619,  618,   62,  420,  948,
    + /*   490 */   517,  948,  349,   56,   57,   47,  581,  580,  582,  582,
    + /*   500 */    54,   54,   55,   55,   55,   55,  175,   53,   53,   53,
    + /*   510 */    53,   52,   52,   51,   51,   51,   50,  237,  312,  490,
    + /*   520 */   157,  410,  509,  292,  393,  373,  348,  410,  623,  410,
    + /*   530 */   428,   67,  611,  424,  620,  410,  413,  540,  408,  171,
    + /*   540 */   578,  578,  413,  620,  413,  600,   73,  620,  589,  583,
    + /*   550 */   413,  600,   80,  600,   88,  238,  168,  306,  422,  600,
    + /*   560 */    80,  201,   18,  468,  406,  574,  573,   56,   57,   47,
    + /*   570 */   581,  580,  582,  582,   54,   54,   55,   55,   55,   55,
    + /*   580 */   579,   53,   53,   53,   53,   52,   52,   51,   51,   51,
    + /*   590 */    50,  237,  312,   44,  233,  599,  271,  320,  341,  472,
    + /*   600 */   410,  874,  421,  473,  503,  319,  410,  200,  144,   66,
    + /*   610 */   327,  483,  508,  596,  274,  413,  239,  364,  484,  382,
    + /*   620 */    30,  413,  589,  583,  600,   69,  502,  236,  342,  575,
    + /*   630 */   600,   97,  199,  198,  209,  959,  186,  418,    2,  566,
    + /*   640 */   269,   56,   57,   47,  581,  580,  582,  582,   54,   54,
    + /*   650 */    55,   55,   55,   55,  410,   53,   53,   53,   53,   52,
    + /*   660 */    52,   51,   51,   51,   50,  237,  312,  263,  599,  413,
    + /*   670 */   410,   21,  190,  358,  410,  326,  410,  202,  600,  100,
    + /*   680 */   386,  596,  620,  562,  265,  413,  267,  410,  620,  413,
    + /*   690 */   563,  413,  352,    4,  600,   98,  589,  583,  600,  106,
    + /*   700 */   600,  104,  413,  174,  601,  629,  627,  333,  602,   34,
    + /*   710 */   337,  600,  108,  561,  359,   56,   57,   47,  581,  580,
    + /*   720 */   582,  582,   54,   54,   55,   55,   55,   55,  410,   53,
    + /*   730 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  237,
    + /*   740 */   312,  410,  499,  413,  167,  567,  405,  215,  504,  505,
    + /*   750 */   316,  557,  600,  109,  353,   13,  413,  410,   12,  410,
    + /*   760 */   538,  410,  335,  358,  223,  600,  134,  571,  571,  620,
    + /*   770 */   589,  583,  413,   20,  413,  620,  413,  272,  620,  167,
    + /*   780 */   167,  600,  135,  600,   61,  600,  105,  317,  148,   56,
    + /*   790 */    57,   47,  581,  580,  582,  582,   54,   54,   55,   55,
    + /*   800 */    55,   55,  410,   53,   53,   53,   53,   52,   52,   51,
    + /*   810 */    51,   51,   50,  237,  312,  410,  275,  413,  410,  275,
    + /*   820 */   275,  222,  410,  330,  363,  544,  600,  103,  132,  360,
    + /*   830 */   413,  620,  522,  413,  620,  620,  410,  413,  170,  600,
    + /*   840 */    96,  603,  600,  102,  589,  583,  600,   77,  374,  536,
    + /*   850 */   167,  413,  143,  325,  256,   28,  224,  324,  511,  528,
    + /*   860 */   600,   99,  527,   56,   57,   47,  581,  580,  582,  582,
    + /*   870 */    54,   54,   55,   55,   55,   55,  410,   53,   53,   53,
    + /*   880 */    53,   52,   52,   51,   51,   51,   50,  237,  312,  410,
    + /*   890 */   275,  413,  410,  469,  275,  167,  458,   39,  171,   37,
    + /*   900 */   600,  138,  214,  144,  413,  620,  142,  413,  410,  620,
    + /*   910 */   410,  358,  239,  600,  137,  230,  600,  136,  589,  583,
    + /*   920 */   457,  263,   23,  413,  351,  413,  620,  323,  445,  501,
    + /*   930 */    23,  322,  600,   76,  600,   93,  620,   56,   45,   47,
    + /*   940 */   581,  580,  582,  582,   54,   54,   55,   55,   55,   55,
    + /*   950 */   410,   53,   53,   53,   53,   52,   52,   51,   51,   51,
    + /*   960 */    50,  237,  312,  410,  262,  413,  410,  426,  263,  308,
    + /*   970 */   203,  213,  212,  380,  600,   92,  520,  519,  413,  130,
    + /*   980 */   538,  413,  538,  620,  410,  628,    2,  600,   75,  273,
    + /*   990 */   600,   91,  589,  583,  375,  620,  129,  620,   27,  413,
    + /*  1000 */   425,  307,  221,  128,  599,  599,  599,  281,  600,   90,
    + /*  1010 */   371,  452,   57,   47,  581,  580,  582,  582,   54,   54,
    + /*  1020 */    55,   55,   55,   55,  410,   53,   53,   53,   53,   52,
    + /*  1030 */    52,   51,   51,   51,   50,  237,  312,  410,  263,  413,
    + /*  1040 */   410,  263,  263,  365,  208,  321,  206,  542,  600,  101,
    + /*  1050 */    50,  237,  413,  620,  610,  413,  620,  620,  410,  542,
    + /*  1060 */   165,  600,   89,  188,  600,   87,  589,  583,  478,  620,
    + /*  1070 */   467,  519,  125,  413,  569,  235,  542,  367,  599,  475,
    + /*  1080 */   599,  450,  600,   86,  449,  448,  231,   47,  581,  580,
    + /*  1090 */   582,  582,   54,   54,   55,   55,   55,   55,  287,   53,
    + /*  1100 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  237,
    + /*  1110 */    43,  404,  410,    3,  410,  285,  260,  414,  621,  263,
    + /*  1120 */   609,  627,  333,   43,  404,  410,    3,  413,  407,  413,
    + /*  1130 */   414,  621,  171,  263,  620,  620,  600,   85,  600,   72,
    + /*  1140 */   413,  407,  124,  140,  353,  604,  409,  402,  620,  600,
    + /*  1150 */    71,  291,  471,  495,  160,  123,  593,  565,  620,  620,
    + /*  1160 */   402,  620,  220,   15,  463,  460,  620,  417,  625,  159,
    + /*  1170 */   565,  620,  399,  240,  158,  126,  219,   40,   41,  532,
    + /*  1180 */   410,  207,  121,  120,   42,  412,  411,  620,  263,  594,
    + /*  1190 */    40,   41,  556,  543,   25,  413,   11,   42,  412,  411,
    + /*  1200 */    24,  118,  594,  620,  600,   84,  455,  620,  620,   43,
    + /*  1210 */   404,  218,    3,  539,  156,  599,  414,  621,  113,  239,
    + /*  1220 */   592,  592,  592,  591,  590,   14,  155,  407,  620,  537,
    + /*  1230 */   451,  247,  444,  592,  592,  592,  591,  590,   14,  343,
    + /*  1240 */   410,  111,  410,  277,  620,  410,  402,  410,  507,  110,
    + /*  1250 */    10,   64,  204,  336,  435,  413,  565,  413,  620,  276,
    + /*  1260 */   413,  434,  413,  620,  600,   83,  600,   95,  334,  600,
    + /*  1270 */    82,  600,   81,  150,  620,  488,   40,   41,  270,  268,
    + /*  1280 */   266,  191,  332,   42,  412,  411,  599,  410,  594,  241,
    + /*  1290 */   620,  410,  264,  620,  620,  620,   33,  404,  419,    3,
    + /*  1300 */   107,  229,  413,  414,  621,  149,  413,  620,  397,  181,
    + /*  1310 */   259,  600,   70,  398,  407,  600,   17,  315,  314,  592,
    + /*  1320 */   592,  592,  591,  590,   14,  620,  127,  361,  624,  217,
    + /*  1330 */   462,  461,  354,  402,  304,  303,  302,  179,  300,  254,
    + /*  1340 */   614,  453,  620,  565,  454,  620,  620,  620,  613,  612,
    + /*  1350 */   443,  416,  180,  246,  620,  151,  415,  245,  243,  620,
    + /*  1360 */   178,  598,  242,   40,   41,  620,  244,    8,  620,  239,
    + /*  1370 */    42,  412,  411,  620,  410,  594,  410,  620,   60,  153,
    + /*  1380 */   429,  465,  622,  621,  296,  154,   30,  145,  152,  413,
    + /*  1390 */   388,  413,  295,  394,  294,  620,   31,  392,  600,   79,
    + /*  1400 */   600,   78,  620,  290,  396,  413,  592,  592,  592,  591,
    + /*  1410 */   590,   14,  620,  293,  600,    9,  597,   59,  620,   36,
    + /*  1420 */   555,  173,  565,  234,  185,  288,   29,  541,  391,  345,
    + /*  1430 */   248,  286,  521,  535,  313,  284,  385,  328,  534,  239,
    + /*  1440 */   516,  515,  196,  195,  279,  310,  511,  512,  510,  131,
    + /*  1450 */   524,  227,  258,  228,  594,  309,  487,  486,  493,  226,
    + /*  1460 */   372,  485,  164,  338,  479,  163,  368,  370,  162,   26,
    + /*  1470 */   211,  477,  261,  161,  141,  476,  362,  466,  122,  187,
    + /*  1480 */   119,  456,  347,  117,  346,  592,  592,  592,  116,  115,
    + /*  1490 */   114,  447,  112,  182,  318,   22,  432,   19,  431,  430,
    + /*  1500 */    63,  427,  608,  193,  297,  595,  572,  570,  403,  553,
    + /*  1510 */   550,  289,  280,  508,  498,  497,  496,  494,  379,  355,
    + /*  1520 */   459,  255,  249,  344,  446,  305,    5,  568,  548,  298,
    + /*  1530 */   298,  210,  369,  298,  400,  506,  500,  489,  525,  523,
    + /*  1540 */   482,  239,  237,
    +};
    +static const YYCODETYPE yy_lookahead[] = {
    + /*     0 */    19,  222,  223,  224,  225,   24,    1,   26,   77,   78,
    + /*    10 */    79,   80,   15,   82,   83,   84,   85,   86,   87,   88,
    + /*    20 */    89,   90,   91,   92,    7,    8,    9,   26,   27,   23,
    + /*    30 */    49,   50,   81,   82,   83,   84,   85,   86,   87,   88,
    + /*    40 */    89,   90,   91,   92,   88,   89,   90,   91,   92,   68,
    + /*    50 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
    + /*    60 */    79,   80,   22,   82,   83,   84,   85,   86,   87,   88,
    + /*    70 */    89,   90,   91,   92,   19,   94,  222,   19,  224,  225,
    + /*    80 */    25,   82,   83,   84,   85,   86,   87,   88,   89,   90,
    + /*    90 */    91,   92,   19,   26,   27,   94,   95,   96,  244,   25,
    + /*   100 */    99,  100,  101,   25,   49,   50,   19,  150,   96,   54,
    + /*   110 */   109,   99,  100,  101,   27,  158,   26,   27,  161,  162,
    + /*   120 */   117,  109,  165,   68,   69,   70,   71,   72,   73,   74,
    + /*   130 */    75,   76,   77,   78,   79,   80,   16,   82,   83,   84,
    + /*   140 */    85,   86,   87,   88,   89,   90,   91,   92,   19,  111,
    + /*   150 */    92,  113,  114,   24,   96,   97,   98,   99,  100,  101,
    + /*   160 */   102,   94,   95,  112,   25,   92,  108,  116,  150,   95,
    + /*   170 */    97,   98,   99,  100,  101,  102,   86,   87,   49,   50,
    + /*   180 */    60,  108,   62,  165,   94,   95,  119,   97,  170,  171,
    + /*   190 */    50,   26,   27,  119,  104,  105,  118,   68,   69,   70,
    + /*   200 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
    + /*   210 */    22,   82,   83,   84,   85,   86,   87,   88,   89,   90,
    + /*   220 */    91,   92,   19,   98,   86,   87,   88,   89,   90,   91,
    + /*   230 */    92,  150,   23,  108,   25,   96,  150,   66,   99,  100,
    + /*   240 */   101,   26,  161,  162,  104,   24,  165,   26,  109,  231,
    + /*   250 */   232,  165,   49,   50,   22,   23,  170,  171,  138,   94,
    + /*   260 */    95,  169,  170,  171,   76,   94,  185,  186,   22,   98,
    + /*   270 */    24,   68,   69,   70,   71,   72,   73,   74,   75,   76,
    + /*   280 */    77,   78,   79,   80,  119,   82,   83,   84,   85,   86,
    + /*   290 */    87,   88,   89,   90,   91,   92,   19,  150,   11,   67,
    + /*   300 */   129,  130,  131,  117,   95,  150,   22,  160,  150,   94,
    + /*   310 */    26,   27,  165,   22,   23,   94,   25,  231,  232,   23,
    + /*   320 */   165,  174,  175,  165,  232,   32,   49,   50,  119,  174,
    + /*   330 */   175,   22,  174,  175,   41,   26,   27,   57,  166,  136,
    + /*   340 */   222,  194,  224,  225,   57,   68,   69,   70,   71,   72,
    + /*   350 */    73,   74,   75,   76,   77,   78,   79,   80,   67,   82,
    + /*   360 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
    + /*   370 */    19,  216,  214,  215,   23,   23,  221,  205,   94,   95,
    + /*   380 */   172,  173,   12,   49,   50,  105,  106,   26,   27,  181,
    + /*   390 */    23,   19,  105,  106,  222,  115,  224,  225,   28,   27,
    + /*   400 */    49,   50,  115,   94,   95,   71,   72,  111,  128,  113,
    + /*   410 */   114,  117,  160,  136,   44,  128,   46,   26,   27,   68,
    + /*   420 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
    + /*   430 */    79,   80,   98,   82,   83,   84,   85,   86,   87,   88,
    + /*   440 */    89,   90,   91,   92,   19,   12,  194,  150,   23,   88,
    + /*   450 */    23,    7,    8,  105,  106,   94,   95,   23,  150,   25,
    + /*   460 */   117,   28,  165,  111,  163,  113,  114,  166,  167,  168,
    + /*   470 */   218,  174,  175,  165,   49,   50,  128,   44,  111,   46,
    + /*   480 */   113,  114,  174,  175,   21,   94,   95,  235,   22,   23,
    + /*   490 */    57,   25,  240,   68,   69,   70,   71,   72,   73,   74,
    + /*   500 */    75,   76,   77,   78,   79,   80,  117,   82,   83,   84,
    + /*   510 */    85,   86,   87,   88,   89,   90,   91,   92,   19,  150,
    + /*   520 */    25,  150,   23,  226,  216,   19,   63,  150,  150,  150,
    + /*   530 */   161,  162,  150,   67,  165,  150,  165,   23,  111,   25,
    + /*   540 */   113,  114,  165,  165,  165,  174,  175,  165,   49,   50,
    + /*   550 */   165,  174,  175,  174,  175,  197,   50,   22,   23,  174,
    + /*   560 */   175,  160,  204,  100,  169,  170,  171,   68,   69,   70,
    + /*   570 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
    + /*   580 */   112,   82,   83,   84,   85,   86,   87,   88,   89,   90,
    + /*   590 */    91,   92,   19,   22,  215,  194,   23,  220,   97,   30,
    + /*   600 */   150,  138,   67,   34,   36,  220,  150,  206,  207,   22,
    + /*   610 */   104,  181,  182,   26,  108,  165,  115,   48,  188,   51,
    + /*   620 */   125,  165,   49,   50,  174,  175,   58,  232,  127,   23,
    + /*   630 */   174,  175,  105,  106,  160,  142,  143,  144,  145,   23,
    + /*   640 */    16,   68,   69,   70,   71,   72,   73,   74,   75,   76,
    + /*   650 */    77,   78,   79,   80,  150,   82,   83,   84,   85,   86,
    + /*   660 */    87,   88,   89,   90,   91,   92,   19,  150,  194,  165,
    + /*   670 */   150,   24,   22,  150,  150,  107,  150,   22,  174,  175,
    + /*   680 */    88,   94,  165,   23,   60,  165,   62,  150,  165,  165,
    + /*   690 */    11,  165,  218,   35,  174,  175,   49,   50,  174,  175,
    + /*   700 */   174,  175,  165,   25,  112,    0,    1,    2,  116,   25,
    + /*   710 */   193,  174,  175,   23,  240,   68,   69,   70,   71,   72,
    + /*   720 */    73,   74,   75,   76,   77,   78,   79,   80,  150,   82,
    + /*   730 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
    + /*   740 */    19,  150,   23,  165,   25,  166,  167,  168,   97,   98,
    + /*   750 */   155,   23,  174,  175,  150,   25,  165,  150,   35,  150,
    + /*   760 */   150,  150,  245,  150,  241,  174,  175,  129,  130,  165,
    + /*   770 */    49,   50,  165,   52,  165,  165,  165,   23,  165,   25,
    + /*   780 */    25,  174,  175,  174,  175,  174,  175,  248,  249,   68,
    + /*   790 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
    + /*   800 */    79,   80,  150,   82,   83,   84,   85,   86,   87,   88,
    + /*   810 */    89,   90,   91,   92,   19,  150,  150,  165,  150,  150,
    + /*   820 */   150,  217,  150,  213,  229,  119,  174,  175,   22,  234,
    + /*   830 */   165,  165,  165,  165,  165,  165,  150,  165,   35,  174,
    + /*   840 */   175,  174,  174,  175,   49,   50,  174,  175,   23,   27,
    + /*   850 */    25,  165,  117,  187,  241,   22,  187,  187,  103,   23,
    + /*   860 */   174,  175,   23,   68,   69,   70,   71,   72,   73,   74,
    + /*   870 */    75,   76,   77,   78,   79,   80,  150,   82,   83,   84,
    + /*   880 */    85,   86,   87,   88,   89,   90,   91,   92,   19,  150,
    + /*   890 */   150,  165,  150,   23,  150,   25,   23,  135,   25,  137,
    + /*   900 */   174,  175,  206,  207,  165,  165,   39,  165,  150,  165,
    + /*   910 */   150,  150,  115,  174,  175,   52,  174,  175,   49,   50,
    + /*   920 */    23,  150,   25,  165,  127,  165,  165,  187,   23,   29,
    + /*   930 */    25,  187,  174,  175,  174,  175,  165,   68,   69,   70,
    + /*   940 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
    + /*   950 */   150,   82,   83,   84,   85,   86,   87,   88,   89,   90,
    + /*   960 */    91,   92,   19,  150,  193,  165,  150,   23,  150,   25,
    + /*   970 */   160,  160,  160,   52,  174,  175,  190,  191,  165,   22,
    + /*   980 */   150,  165,  150,  165,  150,  144,  145,  174,  175,   23,
    + /*   990 */   174,  175,   49,   50,   52,  165,   22,  165,   22,  165,
    + /*  1000 */   250,  251,  241,   22,  194,  194,  194,  108,  174,  175,
    + /*  1010 */    19,  193,   69,   70,   71,   72,   73,   74,   75,   76,
    + /*  1020 */    77,   78,   79,   80,  150,   82,   83,   84,   85,   86,
    + /*  1030 */    87,   88,   89,   90,   91,   92,   19,  150,  150,  165,
    + /*  1040 */   150,  150,  150,  213,  160,  213,  160,  166,  174,  175,
    + /*  1050 */    91,   92,  165,  165,  150,  165,  165,  165,  150,  166,
    + /*  1060 */   102,  174,  175,   24,  174,  175,   49,   50,   20,  165,
    + /*  1070 */   190,  191,  104,  165,   86,   87,  166,   43,  194,   59,
    + /*  1080 */   194,  193,  174,  175,  193,  193,  205,   70,   71,   72,
    + /*  1090 */    73,   74,   75,   76,   77,   78,   79,   80,  205,   82,
    + /*  1100 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
    + /*  1110 */    19,   20,  150,   22,  150,  205,  138,   26,   27,  150,
    + /*  1120 */   150,    1,    2,   19,   20,  150,   22,  165,   37,  165,
    + /*  1130 */    26,   27,   25,  150,  165,  165,  174,  175,  174,  175,
    + /*  1140 */   165,   37,   53,  150,  150,  173,  150,   56,  165,  174,
    + /*  1150 */   175,  150,   53,  181,  104,   22,  150,   66,  165,  165,
    + /*  1160 */    56,  165,  193,    5,    1,   27,  165,  146,  147,  117,
    + /*  1170 */    66,  165,  150,  152,   35,  154,  193,   86,   87,   88,
    + /*  1180 */   150,  160,  107,  126,   93,   94,   95,  165,  150,   98,
    + /*  1190 */    86,   87,  150,  150,   76,  165,   22,   93,   94,   95,
    + /*  1200 */    76,  118,   98,  165,  174,  175,    1,  165,  165,   19,
    + /*  1210 */    20,  217,   22,  150,   16,  194,   26,   27,  118,  115,
    + /*  1220 */   129,  130,  131,  132,  133,  134,  120,   37,  165,  150,
    + /*  1230 */    20,  193,  127,  129,  130,  131,  132,  133,  134,  218,
    + /*  1240 */   150,  107,  150,  150,  165,  150,   56,  150,  150,  126,
    + /*  1250 */    22,   16,  160,   65,   23,  165,   66,  165,  165,  150,
    + /*  1260 */   165,   23,  165,  165,  174,  175,  174,  175,  247,  174,
    + /*  1270 */   175,  174,  175,   15,  165,  150,   86,   87,  150,  150,
    + /*  1280 */   150,   22,    3,   93,   94,   95,  194,  150,   98,  140,
    + /*  1290 */   165,  150,  150,  165,  165,  165,   19,   20,    4,   22,
    + /*  1300 */   164,  180,  165,   26,   27,  249,  165,  165,  216,    6,
    + /*  1310 */   150,  174,  175,  221,   37,  174,  175,  252,  252,  129,
    + /*  1320 */   130,  131,  132,  133,  134,  165,  180,  150,  149,    5,
    + /*  1330 */   150,  150,  150,   56,   10,   11,   12,   13,   14,  150,
    + /*  1340 */   149,   17,  165,   66,  150,  165,  165,  165,  149,   13,
    + /*  1350 */   150,  149,  151,  150,  165,   31,  159,   33,  150,  165,
    + /*  1360 */   151,  194,  150,   86,   87,  165,   42,   25,  165,  115,
    + /*  1370 */    93,   94,   95,  165,  150,   98,  150,  165,   22,   55,
    + /*  1380 */   150,   57,   26,   27,  199,   61,  125,  150,   64,  165,
    + /*  1390 */   150,  165,  200,  122,  201,  165,  123,  150,  174,  175,
    + /*  1400 */   174,  175,  165,  150,  121,  165,  129,  130,  131,  132,
    + /*  1410 */   133,  134,  165,  202,  174,  175,  203,  124,  165,  135,
    + /*  1420 */   157,  117,   66,  227,  157,  210,  104,  211,  120,  105,
    + /*  1430 */   106,  210,  176,  211,  110,  210,  104,   47,  211,  115,
    + /*  1440 */   176,  184,   86,   87,  176,  179,  103,  178,  176,   22,
    + /*  1450 */    94,   92,  128,  230,   98,  179,  176,  176,  184,  230,
    + /*  1460 */    18,  176,  156,  139,  157,  156,   45,  157,  156,  135,
    + /*  1470 */   157,  157,  238,  156,   68,  239,  157,  189,  189,  219,
    + /*  1480 */    22,  199,  157,  192,   18,  129,  130,  131,  192,  192,
    + /*  1490 */   192,  199,  189,  219,  157,  243,   40,  243,  157,  157,
    + /*  1500 */   246,   38,  153,  196,  198,  166,  233,  233,  228,  177,
    + /*  1510 */   177,  209,  177,  182,  177,  166,  177,  166,  178,  242,
    + /*  1520 */   199,  242,  209,  209,  199,  148,  196,  166,  208,  195,
    + /*  1530 */   195,  236,  237,  195,  191,  183,  183,  186,  174,  174,
    + /*  1540 */   186,  115,   92,
    +};
    +#define YY_SHIFT_USE_DFLT (-70)
    +#define YY_SHIFT_COUNT (417)
    +#define YY_SHIFT_MIN   (-69)
    +#define YY_SHIFT_MAX   (1466)
    +static const short yy_shift_ofst[] = {
    + /*     0 */  1120, 1104, 1324, 1104, 1190, 1190,   90,   90,    1,  -19,
    + /*    10 */  1190, 1190, 1190, 1190, 1190,  280,  391,  721, 1091, 1190,
    + /*    20 */  1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
    + /*    30 */  1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
    + /*    40 */  1190, 1190, 1190, 1190, 1190, 1190, 1190, 1277, 1190, 1190,
    + /*    50 */  1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
    + /*    60 */  1190,  -49,  287,  391,  391,  988,  988,  215, 1426,   55,
    + /*    70 */   647,  573,  499,  425,  351,  277,  203,  129,  795,  795,
    + /*    80 */   795,  795,  795,  795,  795,  795,  795,  795,  795,  795,
    + /*    90 */   795,  795,  795,  795,  795,  795,  869,  795,  943, 1017,
    + /*   100 */  1017,  -69,  -69,  -69,  -69,   -1,   -1,   58,  138,  -44,
    + /*   110 */   391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
    + /*   120 */   391,  391,  391,  391,  391,  391,  463,  506,  391,  391,
    + /*   130 */   391,  391,  391,  215,  959, 1450,  -70,  -70,  -70, 1356,
    + /*   140 */    73,  433,  433,  361,  309,  165,   67,  284,  466,  291,
    + /*   150 */   391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
    + /*   160 */   391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
    + /*   170 */   391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
    + /*   180 */   391,  391,  501,  221,  221,  221,  705,  797, 1426, 1426,
    + /*   190 */  1426,  -70,  -70,  -70,  139,  171,  171,   12,  568,  568,
    + /*   200 */   209,  427,  370,  367,  352,  296,   38,   38,   38,   38,
    + /*   210 */   348,  569,   38,   38,   74,  587,  592,   17,  495,   87,
    + /*   220 */    87,  372,  495,  372,  755,  215,  293,  215,  293,  140,
    + /*   230 */   293,   87,  293,  293,  762,  638,  638,  215,   78,   51,
    + /*   240 */   246, 1463, 1304, 1304, 1456, 1456, 1304, 1458, 1406, 1261,
    + /*   250 */  1466, 1466, 1466, 1466, 1304, 1261, 1458, 1406, 1406, 1304,
    + /*   260 */  1442, 1334, 1421, 1304, 1304, 1442, 1304, 1442, 1304, 1442,
    + /*   270 */  1427, 1332, 1332, 1332, 1390, 1359, 1359, 1427, 1332, 1343,
    + /*   280 */  1332, 1390, 1332, 1332, 1308, 1322, 1308, 1322, 1308, 1322,
    + /*   290 */  1304, 1304, 1284, 1293, 1283, 1273, 1271, 1261, 1254, 1342,
    + /*   300 */  1336, 1336, 1303, 1303, 1303, 1303,  -70,  -70,  -70,  -70,
    + /*   310 */   -70,  -70,  334,  120,  535,  232,  624,  944,  188,  905,
    + /*   320 */   897,  873,  870,  825,  754,  719,  651,  527,  444,  125,
    + /*   330 */   514,  434, 1294, 1279, 1259, 1149, 1258, 1188, 1235, 1238,
    + /*   340 */  1231, 1105, 1228, 1123, 1134, 1100, 1210, 1106, 1198, 1205,
    + /*   350 */  1083, 1174, 1057, 1124, 1118, 1075, 1138, 1139, 1052, 1163,
    + /*   360 */  1158, 1133, 1050,  978, 1099, 1107, 1089, 1020, 1034,  968,
    + /*   370 */  1039, 1048,  991,  899,  958,  981,  942,  976,  974,  966,
    + /*   380 */   957,  921,  900,  833,  863,  867,  839,  836,  735,  822,
    + /*   390 */   803,  806,  706,  684,  723,  730,  658,  684,  728,  690,
    + /*   400 */   678,  660,  655,  679,  650,  616,  606,  571,  468,  389,
    + /*   410 */   343,  294,  186,    3,   40,    6,   -3,    5,
    +};
    +#define YY_REDUCE_USE_DFLT (-222)
    +#define YY_REDUCE_COUNT (311)
    +#define YY_REDUCE_MIN   (-221)
    +#define YY_REDUCE_MAX   (1377)
    +static const short yy_reduce_ofst[] = {
    + /*     0 */   493, 1092, 1021,  147,  158,  155,   86,   18,   81,  172,
    + /*    10 */   385,  377,  308,  379,  297,  252,  -43, -146, 1240, 1226,
    + /*    20 */  1224, 1141, 1137, 1097, 1095, 1090, 1030,  975,  964,  962,
    + /*    30 */   908,  890,  887,  874,  834,  816,  813,  800,  760,  758,
    + /*    40 */   742,  739,  726,  686,  672,  668,  665,  652,  611,  609,
    + /*    50 */   607,  591,  578,  537,  526,  524,  520,  504,  456,  450,
    + /*    60 */   371, -221,  474,  369,  517,  395,   92,  301,  401,  118,
    + /*    70 */   118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
    + /*    80 */   118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
    + /*    90 */   118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
    + /*   100 */   118,  118,  118,  118,  118,  118,  118,  208,  118,  118,
    + /*   110 */  1038,  994,  983,  969,  892,  891,  888,  818,  761,  832,
    + /*   120 */   613,  604,  523,  744,  830,  771,  595,  430,  740,  670,
    + /*   130 */   669,  666,  610,  579,  118,  118,  118,  118,  118,  667,
    + /*   140 */   972,  880,  786,  996, 1253, 1247, 1237, 1001,  750,  750,
    + /*   150 */  1230, 1212, 1208, 1203, 1200, 1194, 1189, 1182, 1181, 1180,
    + /*   160 */  1177, 1160, 1142, 1130, 1129, 1128, 1125, 1109, 1098, 1093,
    + /*   170 */  1079, 1063, 1043, 1042, 1022, 1006,  996,  993,  970,  904,
    + /*   180 */   382,  378,  886,  910,  893,  881,  841,  884,  812,  811,
    + /*   190 */   810,  539,  696,  358, 1354, 1365, 1364, 1351, 1353, 1352,
    + /*   200 */  1320, 1338, 1343, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
    + /*   210 */  1295, 1295, 1335, 1334, 1320, 1361, 1330, 1377, 1325, 1314,
    + /*   220 */  1313, 1279, 1321, 1277, 1340, 1351, 1339, 1349, 1337, 1331,
    + /*   230 */  1335, 1302, 1333, 1332, 1280, 1274, 1273, 1339, 1306, 1307,
    + /*   240 */  1349, 1254, 1342, 1341, 1254, 1252, 1337, 1274, 1303, 1292,
    + /*   250 */  1298, 1297, 1296, 1291, 1325, 1282, 1260, 1289, 1288, 1319,
    + /*   260 */  1317, 1236, 1234, 1314, 1313, 1312, 1310, 1309, 1307, 1306,
    + /*   270 */  1276, 1285, 1281, 1280, 1274, 1229, 1223, 1266, 1272, 1269,
    + /*   280 */  1268, 1257, 1264, 1256, 1227, 1225, 1222, 1221, 1216, 1215,
    + /*   290 */  1267, 1263, 1196, 1213, 1211, 1193, 1192, 1185, 1167, 1197,
    + /*   300 */  1209, 1201, 1202, 1199, 1191, 1179, 1066, 1065, 1056, 1146,
    + /*   310 */  1121, 1136,
    +};
    +static const YYACTIONTYPE yy_default[] = {
    + /*     0 */   634,  869,  958,  958,  958,  869,  898,  898,  958,  757,
    + /*    10 */   958,  958,  958,  958,  867,  958,  958,  932,  958,  958,
    + /*    20 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*    30 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*    40 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*    50 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*    60 */   958,  841,  958,  958,  958,  898,  898,  673,  761,  792,
    + /*    70 */   958,  958,  958,  958,  958,  958,  958,  958,  931,  933,
    + /*    80 */   807,  806,  800,  799,  911,  772,  797,  790,  783,  794,
    + /*    90 */   870,  863,  864,  862,  866,  871,  958,  793,  829,  847,
    + /*   100 */   828,  846,  853,  845,  831,  840,  830,  665,  832,  833,
    + /*   110 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   120 */   958,  958,  958,  958,  958,  958,  660,  726,  958,  958,
    + /*   130 */   958,  958,  958,  958,  834,  835,  850,  849,  848,  958,
    + /*   140 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   150 */   958,  938,  936,  958,  882,  958,  958,  958,  958,  958,
    + /*   160 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   170 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   180 */   958,  640,  958,  757,  757,  757,  634,  958,  958,  958,
    + /*   190 */   958,  950,  761,  751,  717,  958,  958,  958,  958,  958,
    + /*   200 */   958,  958,  958,  958,  958,  958,  802,  740,  921,  923,
    + /*   210 */   958,  904,  738,  662,  759,  675,  749,  642,  796,  774,
    + /*   220 */   774,  916,  796,  916,  699,  958,  786,  958,  786,  696,
    + /*   230 */   786,  774,  786,  786,  865,  958,  958,  958,  758,  749,
    + /*   240 */   958,  943,  765,  765,  935,  935,  765,  808,  730,  796,
    + /*   250 */   737,  737,  737,  737,  765,  796,  808,  730,  730,  765,
    + /*   260 */   657,  910,  908,  765,  765,  657,  765,  657,  765,  657,
    + /*   270 */   875,  728,  728,  728,  713,  879,  879,  875,  728,  699,
    + /*   280 */   728,  713,  728,  728,  778,  773,  778,  773,  778,  773,
    + /*   290 */   765,  765,  958,  791,  779,  789,  787,  796,  958,  716,
    + /*   300 */   650,  650,  639,  639,  639,  639,  955,  955,  950,  701,
    + /*   310 */   701,  683,  958,  958,  958,  958,  958,  958,  884,  958,
    + /*   320 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   330 */   958,  958,  958,  635,  945,  958,  958,  942,  958,  958,
    + /*   340 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   350 */   958,  958,  958,  958,  958,  958,  958,  958,  914,  958,
    + /*   360 */   958,  958,  958,  958,  958,  907,  906,  958,  958,  958,
    + /*   370 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   380 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,
    + /*   390 */   958,  958,  958,  788,  958,  780,  958,  868,  958,  958,
    + /*   400 */   958,  958,  958,  958,  958,  958,  958,  958,  743,  817,
    + /*   410 */   958,  816,  820,  815,  667,  958,  648,  958,  631,  636,
    + /*   420 */   954,  957,  956,  953,  952,  951,  946,  944,  941,  940,
    + /*   430 */   939,  937,  934,  930,  888,  886,  893,  892,  891,  890,
    + /*   440 */   889,  887,  885,  883,  803,  801,  798,  795,  929,  881,
    + /*   450 */   739,  736,  735,  656,  947,  913,  922,  920,  809,  919,
    + /*   460 */   918,  917,  915,  912,  899,  805,  804,  731,  873,  872,
    + /*   470 */   659,  903,  902,  901,  905,  909,  900,  767,  658,  655,
    + /*   480 */   664,  720,  719,  727,  725,  724,  723,  722,  721,  718,
    + /*   490 */   666,  674,  685,  712,  698,  697,  878,  880,  877,  876,
    + /*   500 */   705,  710,  709,  708,  707,  706,  704,  703,  702,  695,
    + /*   510 */   694,  700,  693,  715,  714,  711,  692,  734,  733,  732,
    + /*   520 */   729,  691,  690,  689,  820,  688,  687,  826,  825,  813,
    + /*   530 */   857,  754,  753,  752,  764,  763,  776,  775,  811,  810,
    + /*   540 */   777,  762,  756,  755,  771,  770,  769,  768,  760,  750,
    + /*   550 */   782,  785,  784,  781,  842,  859,  766,  856,  928,  927,
    + /*   560 */   926,  925,  924,  861,  860,  827,  824,  678,  679,  897,
    + /*   570 */   895,  896,  894,  681,  680,  677,  676,  858,  745,  744,
    + /*   580 */   854,  851,  843,  838,  855,  852,  844,  839,  837,  836,
    + /*   590 */   822,  821,  819,  818,  814,  823,  669,  746,  742,  741,
    + /*   600 */   812,  748,  747,  686,  684,  682,  663,  661,  654,  652,
    + /*   610 */   651,  653,  649,  647,  646,  645,  644,  643,  672,  671,
    + /*   620 */   670,  668,  667,  641,  638,  637,  633,  632,  630,
    +};
    +
    +/* The next table maps tokens into fallback tokens.  If a construct
    +** like the following:
    +** 
    +**      %fallback ID X Y Z.
    +**
    +** appears in the grammar, then ID becomes a fallback token for X, Y,
    +** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
    +** but it does not parse, the type of the token is changed to ID and
    +** the parse is retried before an error is thrown.
    +*/
    +#ifdef YYFALLBACK
    +static const YYCODETYPE yyFallback[] = {
    +    0,  /*          $ => nothing */
    +    0,  /*       SEMI => nothing */
    +   26,  /*    EXPLAIN => ID */
    +   26,  /*      QUERY => ID */
    +   26,  /*       PLAN => ID */
    +   26,  /*      BEGIN => ID */
    +    0,  /* TRANSACTION => nothing */
    +   26,  /*   DEFERRED => ID */
    +   26,  /*  IMMEDIATE => ID */
    +   26,  /*  EXCLUSIVE => ID */
    +    0,  /*     COMMIT => nothing */
    +   26,  /*        END => ID */
    +   26,  /*   ROLLBACK => ID */
    +   26,  /*  SAVEPOINT => ID */
    +   26,  /*    RELEASE => ID */
    +    0,  /*         TO => nothing */
    +    0,  /*      TABLE => nothing */
    +    0,  /*     CREATE => nothing */
    +   26,  /*         IF => ID */
    +    0,  /*        NOT => nothing */
    +    0,  /*     EXISTS => nothing */
    +   26,  /*       TEMP => ID */
    +    0,  /*         LP => nothing */
    +    0,  /*         RP => nothing */
    +    0,  /*         AS => nothing */
    +    0,  /*      COMMA => nothing */
    +    0,  /*         ID => nothing */
    +    0,  /*    INDEXED => nothing */
    +   26,  /*      ABORT => ID */
    +   26,  /*     ACTION => ID */
    +   26,  /*      AFTER => ID */
    +   26,  /*    ANALYZE => ID */
    +   26,  /*        ASC => ID */
    +   26,  /*     ATTACH => ID */
    +   26,  /*     BEFORE => ID */
    +   26,  /*         BY => ID */
    +   26,  /*    CASCADE => ID */
    +   26,  /*       CAST => ID */
    +   26,  /*   COLUMNKW => ID */
    +   26,  /*   CONFLICT => ID */
    +   26,  /*   DATABASE => ID */
    +   26,  /*       DESC => ID */
    +   26,  /*     DETACH => ID */
    +   26,  /*       EACH => ID */
    +   26,  /*       FAIL => ID */
    +   26,  /*        FOR => ID */
    +   26,  /*     IGNORE => ID */
    +   26,  /*  INITIALLY => ID */
    +   26,  /*    INSTEAD => ID */
    +   26,  /*    LIKE_KW => ID */
    +   26,  /*      MATCH => ID */
    +   26,  /*         NO => ID */
    +   26,  /*        KEY => ID */
    +   26,  /*         OF => ID */
    +   26,  /*     OFFSET => ID */
    +   26,  /*     PRAGMA => ID */
    +   26,  /*      RAISE => ID */
    +   26,  /*    REPLACE => ID */
    +   26,  /*   RESTRICT => ID */
    +   26,  /*        ROW => ID */
    +   26,  /*    TRIGGER => ID */
    +   26,  /*     VACUUM => ID */
    +   26,  /*       VIEW => ID */
    +   26,  /*    VIRTUAL => ID */
    +   26,  /*    REINDEX => ID */
    +   26,  /*     RENAME => ID */
    +   26,  /*   CTIME_KW => ID */
    +};
    +#endif /* YYFALLBACK */
    +
    +/* The following structure represents a single element of the
    +** parser's stack.  Information stored includes:
    +**
    +**   +  The state number for the parser at this level of the stack.
    +**
    +**   +  The value of the token stored at this level of the stack.
    +**      (In other words, the "major" token.)
    +**
    +**   +  The semantic value stored at this level of the stack.  This is
    +**      the information used by the action routines in the grammar.
    +**      It is sometimes called the "minor" token.
    +*/
    +struct yyStackEntry {
    +  YYACTIONTYPE stateno;  /* The state-number */
    +  YYCODETYPE major;      /* The major token value.  This is the code
    +                         ** number for the token at this stack level */
    +  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
    +                         ** is the value of the token  */
    +};
    +typedef struct yyStackEntry yyStackEntry;
    +
    +/* The state of the parser is completely contained in an instance of
    +** the following structure */
    +struct yyParser {
    +  int yyidx;                    /* Index of top element in stack */
    +#ifdef YYTRACKMAXSTACKDEPTH
    +  int yyidxMax;                 /* Maximum value of yyidx */
    +#endif
    +  int yyerrcnt;                 /* Shifts left before out of the error */
    +  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
    +#if YYSTACKDEPTH<=0
    +  int yystksz;                  /* Current side of the stack */
    +  yyStackEntry *yystack;        /* The parser's stack */
    +#else
    +  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
    +#endif
    +};
    +typedef struct yyParser yyParser;
    +
    +#ifndef NDEBUG
    +static FILE *yyTraceFILE = 0;
    +static char *yyTracePrompt = 0;
    +#endif /* NDEBUG */
    +
    +#ifndef NDEBUG
    +/* 
    +** Turn parser tracing on by giving a stream to which to write the trace
    +** and a prompt to preface each trace message.  Tracing is turned off
    +** by making either argument NULL 
    +**
    +** Inputs:
    +** <ul>
    +** <li> A FILE* to which trace output should be written.
    +**      If NULL, then tracing is turned off.
    +** <li> A prefix string written at the beginning of every
    +**      line of trace output.  If NULL, then tracing is
    +**      turned off.
    +** </ul>
    +**
    +** Outputs:
    +** None.
    +*/
    +SQLITE_PRIVATE void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
    +  yyTraceFILE = TraceFILE;
    +  yyTracePrompt = zTracePrompt;
    +  if( yyTraceFILE==0 ) yyTracePrompt = 0;
    +  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
    +}
    +#endif /* NDEBUG */
    +
    +#ifndef NDEBUG
    +/* For tracing shifts, the names of all terminals and nonterminals
    +** are required.  The following table supplies these names */
    +static const char *const yyTokenName[] = { 
    +  "$",             "SEMI",          "EXPLAIN",       "QUERY",       
    +  "PLAN",          "BEGIN",         "TRANSACTION",   "DEFERRED",    
    +  "IMMEDIATE",     "EXCLUSIVE",     "COMMIT",        "END",         
    +  "ROLLBACK",      "SAVEPOINT",     "RELEASE",       "TO",          
    +  "TABLE",         "CREATE",        "IF",            "NOT",         
    +  "EXISTS",        "TEMP",          "LP",            "RP",          
    +  "AS",            "COMMA",         "ID",            "INDEXED",     
    +  "ABORT",         "ACTION",        "AFTER",         "ANALYZE",     
    +  "ASC",           "ATTACH",        "BEFORE",        "BY",          
    +  "CASCADE",       "CAST",          "COLUMNKW",      "CONFLICT",    
    +  "DATABASE",      "DESC",          "DETACH",        "EACH",        
    +  "FAIL",          "FOR",           "IGNORE",        "INITIALLY",   
    +  "INSTEAD",       "LIKE_KW",       "MATCH",         "NO",          
    +  "KEY",           "OF",            "OFFSET",        "PRAGMA",      
    +  "RAISE",         "REPLACE",       "RESTRICT",      "ROW",         
    +  "TRIGGER",       "VACUUM",        "VIEW",          "VIRTUAL",     
    +  "REINDEX",       "RENAME",        "CTIME_KW",      "ANY",         
    +  "OR",            "AND",           "IS",            "BETWEEN",     
    +  "IN",            "ISNULL",        "NOTNULL",       "NE",          
    +  "EQ",            "GT",            "LE",            "LT",          
    +  "GE",            "ESCAPE",        "BITAND",        "BITOR",       
    +  "LSHIFT",        "RSHIFT",        "PLUS",          "MINUS",       
    +  "STAR",          "SLASH",         "REM",           "CONCAT",      
    +  "COLLATE",       "BITNOT",        "STRING",        "JOIN_KW",     
    +  "CONSTRAINT",    "DEFAULT",       "NULL",          "PRIMARY",     
    +  "UNIQUE",        "CHECK",         "REFERENCES",    "AUTOINCR",    
    +  "ON",            "DELETE",        "UPDATE",        "SET",         
    +  "DEFERRABLE",    "FOREIGN",       "DROP",          "UNION",       
    +  "ALL",           "EXCEPT",        "INTERSECT",     "SELECT",      
    +  "DISTINCT",      "DOT",           "FROM",          "JOIN",        
    +  "USING",         "ORDER",         "GROUP",         "HAVING",      
    +  "LIMIT",         "WHERE",         "INTO",          "VALUES",      
    +  "INSERT",        "INTEGER",       "FLOAT",         "BLOB",        
    +  "REGISTER",      "VARIABLE",      "CASE",          "WHEN",        
    +  "THEN",          "ELSE",          "INDEX",         "ALTER",       
    +  "ADD",           "error",         "input",         "cmdlist",     
    +  "ecmd",          "explain",       "cmdx",          "cmd",         
    +  "transtype",     "trans_opt",     "nm",            "savepoint_opt",
    +  "create_table",  "create_table_args",  "createkw",      "temp",        
    +  "ifnotexists",   "dbnm",          "columnlist",    "conslist_opt",
    +  "select",        "column",        "columnid",      "type",        
    +  "carglist",      "id",            "ids",           "typetoken",   
    +  "typename",      "signed",        "plus_num",      "minus_num",   
    +  "carg",          "ccons",         "term",          "expr",        
    +  "onconf",        "sortorder",     "autoinc",       "idxlist_opt", 
    +  "refargs",       "defer_subclause",  "refarg",        "refact",      
    +  "init_deferred_pred_opt",  "conslist",      "tcons",         "idxlist",     
    +  "defer_subclause_opt",  "orconf",        "resolvetype",   "raisetype",   
    +  "ifexists",      "fullname",      "oneselect",     "multiselect_op",
    +  "distinct",      "selcollist",    "from",          "where_opt",   
    +  "groupby_opt",   "having_opt",    "orderby_opt",   "limit_opt",   
    +  "sclp",          "as",            "seltablist",    "stl_prefix",  
    +  "joinop",        "indexed_opt",   "on_opt",        "using_opt",   
    +  "joinop2",       "inscollist",    "sortlist",      "sortitem",    
    +  "nexprlist",     "setlist",       "insert_cmd",    "inscollist_opt",
    +  "itemlist",      "exprlist",      "likeop",        "escape",      
    +  "between_op",    "in_op",         "case_operand",  "case_exprlist",
    +  "case_else",     "uniqueflag",    "collate",       "nmnum",       
    +  "plus_opt",      "number",        "trigger_decl",  "trigger_cmd_list",
    +  "trigger_time",  "trigger_event",  "foreach_clause",  "when_clause", 
    +  "trigger_cmd",   "trnm",          "tridxby",       "database_kw_opt",
    +  "key_opt",       "add_column_fullname",  "kwcolumn_opt",  "create_vtab", 
    +  "vtabarglist",   "vtabarg",       "vtabargtoken",  "lp",          
    +  "anylist",     
    +};
    +#endif /* NDEBUG */
    +
    +#ifndef NDEBUG
    +/* For tracing reduce actions, the names of all rules are required.
    +*/
    +static const char *const yyRuleName[] = {
    + /*   0 */ "input ::= cmdlist",
    + /*   1 */ "cmdlist ::= cmdlist ecmd",
    + /*   2 */ "cmdlist ::= ecmd",
    + /*   3 */ "ecmd ::= SEMI",
    + /*   4 */ "ecmd ::= explain cmdx SEMI",
    + /*   5 */ "explain ::=",
    + /*   6 */ "explain ::= EXPLAIN",
    + /*   7 */ "explain ::= EXPLAIN QUERY PLAN",
    + /*   8 */ "cmdx ::= cmd",
    + /*   9 */ "cmd ::= BEGIN transtype trans_opt",
    + /*  10 */ "trans_opt ::=",
    + /*  11 */ "trans_opt ::= TRANSACTION",
    + /*  12 */ "trans_opt ::= TRANSACTION nm",
    + /*  13 */ "transtype ::=",
    + /*  14 */ "transtype ::= DEFERRED",
    + /*  15 */ "transtype ::= IMMEDIATE",
    + /*  16 */ "transtype ::= EXCLUSIVE",
    + /*  17 */ "cmd ::= COMMIT trans_opt",
    + /*  18 */ "cmd ::= END trans_opt",
    + /*  19 */ "cmd ::= ROLLBACK trans_opt",
    + /*  20 */ "savepoint_opt ::= SAVEPOINT",
    + /*  21 */ "savepoint_opt ::=",
    + /*  22 */ "cmd ::= SAVEPOINT nm",
    + /*  23 */ "cmd ::= RELEASE savepoint_opt nm",
    + /*  24 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
    + /*  25 */ "cmd ::= create_table create_table_args",
    + /*  26 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
    + /*  27 */ "createkw ::= CREATE",
    + /*  28 */ "ifnotexists ::=",
    + /*  29 */ "ifnotexists ::= IF NOT EXISTS",
    + /*  30 */ "temp ::= TEMP",
    + /*  31 */ "temp ::=",
    + /*  32 */ "create_table_args ::= LP columnlist conslist_opt RP",
    + /*  33 */ "create_table_args ::= AS select",
    + /*  34 */ "columnlist ::= columnlist COMMA column",
    + /*  35 */ "columnlist ::= column",
    + /*  36 */ "column ::= columnid type carglist",
    + /*  37 */ "columnid ::= nm",
    + /*  38 */ "id ::= ID",
    + /*  39 */ "id ::= INDEXED",
    + /*  40 */ "ids ::= ID|STRING",
    + /*  41 */ "nm ::= id",
    + /*  42 */ "nm ::= STRING",
    + /*  43 */ "nm ::= JOIN_KW",
    + /*  44 */ "type ::=",
    + /*  45 */ "type ::= typetoken",
    + /*  46 */ "typetoken ::= typename",
    + /*  47 */ "typetoken ::= typename LP signed RP",
    + /*  48 */ "typetoken ::= typename LP signed COMMA signed RP",
    + /*  49 */ "typename ::= ids",
    + /*  50 */ "typename ::= typename ids",
    + /*  51 */ "signed ::= plus_num",
    + /*  52 */ "signed ::= minus_num",
    + /*  53 */ "carglist ::= carglist carg",
    + /*  54 */ "carglist ::=",
    + /*  55 */ "carg ::= CONSTRAINT nm ccons",
    + /*  56 */ "carg ::= ccons",
    + /*  57 */ "ccons ::= DEFAULT term",
    + /*  58 */ "ccons ::= DEFAULT LP expr RP",
    + /*  59 */ "ccons ::= DEFAULT PLUS term",
    + /*  60 */ "ccons ::= DEFAULT MINUS term",
    + /*  61 */ "ccons ::= DEFAULT id",
    + /*  62 */ "ccons ::= NULL onconf",
    + /*  63 */ "ccons ::= NOT NULL onconf",
    + /*  64 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
    + /*  65 */ "ccons ::= UNIQUE onconf",
    + /*  66 */ "ccons ::= CHECK LP expr RP",
    + /*  67 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
    + /*  68 */ "ccons ::= defer_subclause",
    + /*  69 */ "ccons ::= COLLATE ids",
    + /*  70 */ "autoinc ::=",
    + /*  71 */ "autoinc ::= AUTOINCR",
    + /*  72 */ "refargs ::=",
    + /*  73 */ "refargs ::= refargs refarg",
    + /*  74 */ "refarg ::= MATCH nm",
    + /*  75 */ "refarg ::= ON DELETE refact",
    + /*  76 */ "refarg ::= ON UPDATE refact",
    + /*  77 */ "refact ::= SET NULL",
    + /*  78 */ "refact ::= SET DEFAULT",
    + /*  79 */ "refact ::= CASCADE",
    + /*  80 */ "refact ::= RESTRICT",
    + /*  81 */ "refact ::= NO ACTION",
    + /*  82 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
    + /*  83 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
    + /*  84 */ "init_deferred_pred_opt ::=",
    + /*  85 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
    + /*  86 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
    + /*  87 */ "conslist_opt ::=",
    + /*  88 */ "conslist_opt ::= COMMA conslist",
    + /*  89 */ "conslist ::= conslist COMMA tcons",
    + /*  90 */ "conslist ::= conslist tcons",
    + /*  91 */ "conslist ::= tcons",
    + /*  92 */ "tcons ::= CONSTRAINT nm",
    + /*  93 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
    + /*  94 */ "tcons ::= UNIQUE LP idxlist RP onconf",
    + /*  95 */ "tcons ::= CHECK LP expr RP onconf",
    + /*  96 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
    + /*  97 */ "defer_subclause_opt ::=",
    + /*  98 */ "defer_subclause_opt ::= defer_subclause",
    + /*  99 */ "onconf ::=",
    + /* 100 */ "onconf ::= ON CONFLICT resolvetype",
    + /* 101 */ "orconf ::=",
    + /* 102 */ "orconf ::= OR resolvetype",
    + /* 103 */ "resolvetype ::= raisetype",
    + /* 104 */ "resolvetype ::= IGNORE",
    + /* 105 */ "resolvetype ::= REPLACE",
    + /* 106 */ "cmd ::= DROP TABLE ifexists fullname",
    + /* 107 */ "ifexists ::= IF EXISTS",
    + /* 108 */ "ifexists ::=",
    + /* 109 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select",
    + /* 110 */ "cmd ::= DROP VIEW ifexists fullname",
    + /* 111 */ "cmd ::= select",
    + /* 112 */ "select ::= oneselect",
    + /* 113 */ "select ::= select multiselect_op oneselect",
    + /* 114 */ "multiselect_op ::= UNION",
    + /* 115 */ "multiselect_op ::= UNION ALL",
    + /* 116 */ "multiselect_op ::= EXCEPT|INTERSECT",
    + /* 117 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
    + /* 118 */ "distinct ::= DISTINCT",
    + /* 119 */ "distinct ::= ALL",
    + /* 120 */ "distinct ::=",
    + /* 121 */ "sclp ::= selcollist COMMA",
    + /* 122 */ "sclp ::=",
    + /* 123 */ "selcollist ::= sclp expr as",
    + /* 124 */ "selcollist ::= sclp STAR",
    + /* 125 */ "selcollist ::= sclp nm DOT STAR",
    + /* 126 */ "as ::= AS nm",
    + /* 127 */ "as ::= ids",
    + /* 128 */ "as ::=",
    + /* 129 */ "from ::=",
    + /* 130 */ "from ::= FROM seltablist",
    + /* 131 */ "stl_prefix ::= seltablist joinop",
    + /* 132 */ "stl_prefix ::=",
    + /* 133 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
    + /* 134 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
    + /* 135 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
    + /* 136 */ "dbnm ::=",
    + /* 137 */ "dbnm ::= DOT nm",
    + /* 138 */ "fullname ::= nm dbnm",
    + /* 139 */ "joinop ::= COMMA|JOIN",
    + /* 140 */ "joinop ::= JOIN_KW JOIN",
    + /* 141 */ "joinop ::= JOIN_KW nm JOIN",
    + /* 142 */ "joinop ::= JOIN_KW nm nm JOIN",
    + /* 143 */ "on_opt ::= ON expr",
    + /* 144 */ "on_opt ::=",
    + /* 145 */ "indexed_opt ::=",
    + /* 146 */ "indexed_opt ::= INDEXED BY nm",
    + /* 147 */ "indexed_opt ::= NOT INDEXED",
    + /* 148 */ "using_opt ::= USING LP inscollist RP",
    + /* 149 */ "using_opt ::=",
    + /* 150 */ "orderby_opt ::=",
    + /* 151 */ "orderby_opt ::= ORDER BY sortlist",
    + /* 152 */ "sortlist ::= sortlist COMMA sortitem sortorder",
    + /* 153 */ "sortlist ::= sortitem sortorder",
    + /* 154 */ "sortitem ::= expr",
    + /* 155 */ "sortorder ::= ASC",
    + /* 156 */ "sortorder ::= DESC",
    + /* 157 */ "sortorder ::=",
    + /* 158 */ "groupby_opt ::=",
    + /* 159 */ "groupby_opt ::= GROUP BY nexprlist",
    + /* 160 */ "having_opt ::=",
    + /* 161 */ "having_opt ::= HAVING expr",
    + /* 162 */ "limit_opt ::=",
    + /* 163 */ "limit_opt ::= LIMIT expr",
    + /* 164 */ "limit_opt ::= LIMIT expr OFFSET expr",
    + /* 165 */ "limit_opt ::= LIMIT expr COMMA expr",
    + /* 166 */ "cmd ::= DELETE FROM fullname indexed_opt where_opt",
    + /* 167 */ "where_opt ::=",
    + /* 168 */ "where_opt ::= WHERE expr",
    + /* 169 */ "cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt",
    + /* 170 */ "setlist ::= setlist COMMA nm EQ expr",
    + /* 171 */ "setlist ::= nm EQ expr",
    + /* 172 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
    + /* 173 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
    + /* 174 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
    + /* 175 */ "insert_cmd ::= INSERT orconf",
    + /* 176 */ "insert_cmd ::= REPLACE",
    + /* 177 */ "itemlist ::= itemlist COMMA expr",
    + /* 178 */ "itemlist ::= expr",
    + /* 179 */ "inscollist_opt ::=",
    + /* 180 */ "inscollist_opt ::= LP inscollist RP",
    + /* 181 */ "inscollist ::= inscollist COMMA nm",
    + /* 182 */ "inscollist ::= nm",
    + /* 183 */ "expr ::= term",
    + /* 184 */ "expr ::= LP expr RP",
    + /* 185 */ "term ::= NULL",
    + /* 186 */ "expr ::= id",
    + /* 187 */ "expr ::= JOIN_KW",
    + /* 188 */ "expr ::= nm DOT nm",
    + /* 189 */ "expr ::= nm DOT nm DOT nm",
    + /* 190 */ "term ::= INTEGER|FLOAT|BLOB",
    + /* 191 */ "term ::= STRING",
    + /* 192 */ "expr ::= REGISTER",
    + /* 193 */ "expr ::= VARIABLE",
    + /* 194 */ "expr ::= expr COLLATE ids",
    + /* 195 */ "expr ::= CAST LP expr AS typetoken RP",
    + /* 196 */ "expr ::= ID LP distinct exprlist RP",
    + /* 197 */ "expr ::= ID LP STAR RP",
    + /* 198 */ "term ::= CTIME_KW",
    + /* 199 */ "expr ::= expr AND expr",
    + /* 200 */ "expr ::= expr OR expr",
    + /* 201 */ "expr ::= expr LT|GT|GE|LE expr",
    + /* 202 */ "expr ::= expr EQ|NE expr",
    + /* 203 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
    + /* 204 */ "expr ::= expr PLUS|MINUS expr",
    + /* 205 */ "expr ::= expr STAR|SLASH|REM expr",
    + /* 206 */ "expr ::= expr CONCAT expr",
    + /* 207 */ "likeop ::= LIKE_KW",
    + /* 208 */ "likeop ::= NOT LIKE_KW",
    + /* 209 */ "likeop ::= MATCH",
    + /* 210 */ "likeop ::= NOT MATCH",
    + /* 211 */ "escape ::= ESCAPE expr",
    + /* 212 */ "escape ::=",
    + /* 213 */ "expr ::= expr likeop expr escape",
    + /* 214 */ "expr ::= expr ISNULL|NOTNULL",
    + /* 215 */ "expr ::= expr NOT NULL",
    + /* 216 */ "expr ::= expr IS expr",
    + /* 217 */ "expr ::= expr IS NOT expr",
    + /* 218 */ "expr ::= NOT expr",
    + /* 219 */ "expr ::= BITNOT expr",
    + /* 220 */ "expr ::= MINUS expr",
    + /* 221 */ "expr ::= PLUS expr",
    + /* 222 */ "between_op ::= BETWEEN",
    + /* 223 */ "between_op ::= NOT BETWEEN",
    + /* 224 */ "expr ::= expr between_op expr AND expr",
    + /* 225 */ "in_op ::= IN",
    + /* 226 */ "in_op ::= NOT IN",
    + /* 227 */ "expr ::= expr in_op LP exprlist RP",
    + /* 228 */ "expr ::= LP select RP",
    + /* 229 */ "expr ::= expr in_op LP select RP",
    + /* 230 */ "expr ::= expr in_op nm dbnm",
    + /* 231 */ "expr ::= EXISTS LP select RP",
    + /* 232 */ "expr ::= CASE case_operand case_exprlist case_else END",
    + /* 233 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
    + /* 234 */ "case_exprlist ::= WHEN expr THEN expr",
    + /* 235 */ "case_else ::= ELSE expr",
    + /* 236 */ "case_else ::=",
    + /* 237 */ "case_operand ::= expr",
    + /* 238 */ "case_operand ::=",
    + /* 239 */ "exprlist ::= nexprlist",
    + /* 240 */ "exprlist ::=",
    + /* 241 */ "nexprlist ::= nexprlist COMMA expr",
    + /* 242 */ "nexprlist ::= expr",
    + /* 243 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
    + /* 244 */ "uniqueflag ::= UNIQUE",
    + /* 245 */ "uniqueflag ::=",
    + /* 246 */ "idxlist_opt ::=",
    + /* 247 */ "idxlist_opt ::= LP idxlist RP",
    + /* 248 */ "idxlist ::= idxlist COMMA nm collate sortorder",
    + /* 249 */ "idxlist ::= nm collate sortorder",
    + /* 250 */ "collate ::=",
    + /* 251 */ "collate ::= COLLATE ids",
    + /* 252 */ "cmd ::= DROP INDEX ifexists fullname",
    + /* 253 */ "cmd ::= VACUUM",
    + /* 254 */ "cmd ::= VACUUM nm",
    + /* 255 */ "cmd ::= PRAGMA nm dbnm",
    + /* 256 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
    + /* 257 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
    + /* 258 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
    + /* 259 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
    + /* 260 */ "nmnum ::= plus_num",
    + /* 261 */ "nmnum ::= nm",
    + /* 262 */ "nmnum ::= ON",
    + /* 263 */ "nmnum ::= DELETE",
    + /* 264 */ "nmnum ::= DEFAULT",
    + /* 265 */ "plus_num ::= plus_opt number",
    + /* 266 */ "minus_num ::= MINUS number",
    + /* 267 */ "number ::= INTEGER|FLOAT",
    + /* 268 */ "plus_opt ::= PLUS",
    + /* 269 */ "plus_opt ::=",
    + /* 270 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
    + /* 271 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
    + /* 272 */ "trigger_time ::= BEFORE",
    + /* 273 */ "trigger_time ::= AFTER",
    + /* 274 */ "trigger_time ::= INSTEAD OF",
    + /* 275 */ "trigger_time ::=",
    + /* 276 */ "trigger_event ::= DELETE|INSERT",
    + /* 277 */ "trigger_event ::= UPDATE",
    + /* 278 */ "trigger_event ::= UPDATE OF inscollist",
    + /* 279 */ "foreach_clause ::=",
    + /* 280 */ "foreach_clause ::= FOR EACH ROW",
    + /* 281 */ "when_clause ::=",
    + /* 282 */ "when_clause ::= WHEN expr",
    + /* 283 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
    + /* 284 */ "trigger_cmd_list ::= trigger_cmd SEMI",
    + /* 285 */ "trnm ::= nm",
    + /* 286 */ "trnm ::= nm DOT nm",
    + /* 287 */ "tridxby ::=",
    + /* 288 */ "tridxby ::= INDEXED BY nm",
    + /* 289 */ "tridxby ::= NOT INDEXED",
    + /* 290 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt",
    + /* 291 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP",
    + /* 292 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select",
    + /* 293 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt",
    + /* 294 */ "trigger_cmd ::= select",
    + /* 295 */ "expr ::= RAISE LP IGNORE RP",
    + /* 296 */ "expr ::= RAISE LP raisetype COMMA nm RP",
    + /* 297 */ "raisetype ::= ROLLBACK",
    + /* 298 */ "raisetype ::= ABORT",
    + /* 299 */ "raisetype ::= FAIL",
    + /* 300 */ "cmd ::= DROP TRIGGER ifexists fullname",
    + /* 301 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
    + /* 302 */ "cmd ::= DETACH database_kw_opt expr",
    + /* 303 */ "key_opt ::=",
    + /* 304 */ "key_opt ::= KEY expr",
    + /* 305 */ "database_kw_opt ::= DATABASE",
    + /* 306 */ "database_kw_opt ::=",
    + /* 307 */ "cmd ::= REINDEX",
    + /* 308 */ "cmd ::= REINDEX nm dbnm",
    + /* 309 */ "cmd ::= ANALYZE",
    + /* 310 */ "cmd ::= ANALYZE nm dbnm",
    + /* 311 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
    + /* 312 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
    + /* 313 */ "add_column_fullname ::= fullname",
    + /* 314 */ "kwcolumn_opt ::=",
    + /* 315 */ "kwcolumn_opt ::= COLUMNKW",
    + /* 316 */ "cmd ::= create_vtab",
    + /* 317 */ "cmd ::= create_vtab LP vtabarglist RP",
    + /* 318 */ "create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm",
    + /* 319 */ "vtabarglist ::= vtabarg",
    + /* 320 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
    + /* 321 */ "vtabarg ::=",
    + /* 322 */ "vtabarg ::= vtabarg vtabargtoken",
    + /* 323 */ "vtabargtoken ::= ANY",
    + /* 324 */ "vtabargtoken ::= lp anylist RP",
    + /* 325 */ "lp ::= LP",
    + /* 326 */ "anylist ::=",
    + /* 327 */ "anylist ::= anylist LP anylist RP",
    + /* 328 */ "anylist ::= anylist ANY",
    +};
    +#endif /* NDEBUG */
    +
    +
    +#if YYSTACKDEPTH<=0
    +/*
    +** Try to increase the size of the parser stack.
    +*/
    +static void yyGrowStack(yyParser *p){
    +  int newSize;
    +  yyStackEntry *pNew;
    +
    +  newSize = p->yystksz*2 + 100;
    +  pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
    +  if( pNew ){
    +    p->yystack = pNew;
    +    p->yystksz = newSize;
    +#ifndef NDEBUG
    +    if( yyTraceFILE ){
    +      fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
    +              yyTracePrompt, p->yystksz);
    +    }
    +#endif
    +  }
    +}
    +#endif
    +
    +/* 
    +** This function allocates a new parser.
    +** The only argument is a pointer to a function which works like
    +** malloc.
    +**
    +** Inputs:
    +** A pointer to the function used to allocate memory.
    +**
    +** Outputs:
    +** A pointer to a parser.  This pointer is used in subsequent calls
    +** to sqlite3Parser and sqlite3ParserFree.
    +*/
    +SQLITE_PRIVATE void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
    +  yyParser *pParser;
    +  pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
    +  if( pParser ){
    +    pParser->yyidx = -1;
    +#ifdef YYTRACKMAXSTACKDEPTH
    +    pParser->yyidxMax = 0;
    +#endif
    +#if YYSTACKDEPTH<=0
    +    pParser->yystack = NULL;
    +    pParser->yystksz = 0;
    +    yyGrowStack(pParser);
    +#endif
    +  }
    +  return pParser;
    +}
    +
    +/* The following function deletes the value associated with a
    +** symbol.  The symbol can be either a terminal or nonterminal.
    +** "yymajor" is the symbol code, and "yypminor" is a pointer to
    +** the value.
    +*/
    +static void yy_destructor(
    +  yyParser *yypParser,    /* The parser */
    +  YYCODETYPE yymajor,     /* Type code for object to destroy */
    +  YYMINORTYPE *yypminor   /* The object to be destroyed */
    +){
    +  sqlite3ParserARG_FETCH;
    +  switch( yymajor ){
    +    /* Here is inserted the actions which take place when a
    +    ** terminal or non-terminal is destroyed.  This can happen
    +    ** when the symbol is popped from the stack during a
    +    ** reduce or during error processing or when a parser is 
    +    ** being destroyed before it is finished parsing.
    +    **
    +    ** Note: during a reduce, the only symbols destroyed are those
    +    ** which appear on the RHS of the rule, but which are not used
    +    ** inside the C code.
    +    */
    +    case 160: /* select */
    +    case 194: /* oneselect */
    +{
    +sqlite3SelectDelete(pParse->db, (yypminor->yy3));
    +}
    +      break;
    +    case 174: /* term */
    +    case 175: /* expr */
    +    case 223: /* escape */
    +{
    +sqlite3ExprDelete(pParse->db, (yypminor->yy346).pExpr);
    +}
    +      break;
    +    case 179: /* idxlist_opt */
    +    case 187: /* idxlist */
    +    case 197: /* selcollist */
    +    case 200: /* groupby_opt */
    +    case 202: /* orderby_opt */
    +    case 204: /* sclp */
    +    case 214: /* sortlist */
    +    case 216: /* nexprlist */
    +    case 217: /* setlist */
    +    case 220: /* itemlist */
    +    case 221: /* exprlist */
    +    case 227: /* case_exprlist */
    +{
    +sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
    +}
    +      break;
    +    case 193: /* fullname */
    +    case 198: /* from */
    +    case 206: /* seltablist */
    +    case 207: /* stl_prefix */
    +{
    +sqlite3SrcListDelete(pParse->db, (yypminor->yy65));
    +}
    +      break;
    +    case 199: /* where_opt */
    +    case 201: /* having_opt */
    +    case 210: /* on_opt */
    +    case 215: /* sortitem */
    +    case 226: /* case_operand */
    +    case 228: /* case_else */
    +    case 239: /* when_clause */
    +    case 244: /* key_opt */
    +{
    +sqlite3ExprDelete(pParse->db, (yypminor->yy132));
    +}
    +      break;
    +    case 211: /* using_opt */
    +    case 213: /* inscollist */
    +    case 219: /* inscollist_opt */
    +{
    +sqlite3IdListDelete(pParse->db, (yypminor->yy408));
    +}
    +      break;
    +    case 235: /* trigger_cmd_list */
    +    case 240: /* trigger_cmd */
    +{
    +sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy473));
    +}
    +      break;
    +    case 237: /* trigger_event */
    +{
    +sqlite3IdListDelete(pParse->db, (yypminor->yy378).b);
    +}
    +      break;
    +    default:  break;   /* If no destructor action specified: do nothing */
    +  }
    +}
    +
    +/*
    +** Pop the parser's stack once.
    +**
    +** If there is a destructor routine associated with the token which
    +** is popped from the stack, then call it.
    +**
    +** Return the major token number for the symbol popped.
    +*/
    +static int yy_pop_parser_stack(yyParser *pParser){
    +  YYCODETYPE yymajor;
    +  yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
    +
    +  /* There is no mechanism by which the parser stack can be popped below
    +  ** empty in SQLite.  */
    +  if( NEVER(pParser->yyidx<0) ) return 0;
    +#ifndef NDEBUG
    +  if( yyTraceFILE && pParser->yyidx>=0 ){
    +    fprintf(yyTraceFILE,"%sPopping %s\n",
    +      yyTracePrompt,
    +      yyTokenName[yytos->major]);
    +  }
    +#endif
    +  yymajor = yytos->major;
    +  yy_destructor(pParser, yymajor, &yytos->minor);
    +  pParser->yyidx--;
    +  return yymajor;
    +}
    +
    +/* 
    +** Deallocate and destroy a parser.  Destructors are all called for
    +** all stack elements before shutting the parser down.
    +**
    +** Inputs:
    +** <ul>
    +** <li>  A pointer to the parser.  This should be a pointer
    +**       obtained from sqlite3ParserAlloc.
    +** <li>  A pointer to a function used to reclaim memory obtained
    +**       from malloc.
    +** </ul>
    +*/
    +SQLITE_PRIVATE void sqlite3ParserFree(
    +  void *p,                    /* The parser to be deleted */
    +  void (*freeProc)(void*)     /* Function used to reclaim memory */
    +){
    +  yyParser *pParser = (yyParser*)p;
    +  /* In SQLite, we never try to destroy a parser that was not successfully
    +  ** created in the first place. */
    +  if( NEVER(pParser==0) ) return;
    +  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
    +#if YYSTACKDEPTH<=0
    +  free(pParser->yystack);
    +#endif
    +  (*freeProc)((void*)pParser);
    +}
    +
    +/*
    +** Return the peak depth of the stack for a parser.
    +*/
    +#ifdef YYTRACKMAXSTACKDEPTH
    +SQLITE_PRIVATE int sqlite3ParserStackPeak(void *p){
    +  yyParser *pParser = (yyParser*)p;
    +  return pParser->yyidxMax;
    +}
    +#endif
    +
    +/*
    +** Find the appropriate action for a parser given the terminal
    +** look-ahead token iLookAhead.
    +**
    +** If the look-ahead token is YYNOCODE, then check to see if the action is
    +** independent of the look-ahead.  If it is, return the action, otherwise
    +** return YY_NO_ACTION.
    +*/
    +static int yy_find_shift_action(
    +  yyParser *pParser,        /* The parser */
    +  YYCODETYPE iLookAhead     /* The look-ahead token */
    +){
    +  int i;
    +  int stateno = pParser->yystack[pParser->yyidx].stateno;
    + 
    +  if( stateno>YY_SHIFT_COUNT
    +   || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
    +    return yy_default[stateno];
    +  }
    +  assert( iLookAhead!=YYNOCODE );
    +  i += iLookAhead;
    +  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    +    if( iLookAhead>0 ){
    +#ifdef YYFALLBACK
    +      YYCODETYPE iFallback;            /* Fallback token */
    +      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
    +             && (iFallback = yyFallback[iLookAhead])!=0 ){
    +#ifndef NDEBUG
    +        if( yyTraceFILE ){
    +          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
    +             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
    +        }
    +#endif
    +        return yy_find_shift_action(pParser, iFallback);
    +      }
    +#endif
    +#ifdef YYWILDCARD
    +      {
    +        int j = i - iLookAhead + YYWILDCARD;
    +        if( 
    +#if YY_SHIFT_MIN+YYWILDCARD<0
    +          j>=0 &&
    +#endif
    +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
    +          j<YY_ACTTAB_COUNT &&
    +#endif
    +          yy_lookahead[j]==YYWILDCARD
    +        ){
    +#ifndef NDEBUG
    +          if( yyTraceFILE ){
    +            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
    +               yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
    +          }
    +#endif /* NDEBUG */
    +          return yy_action[j];
    +        }
    +      }
    +#endif /* YYWILDCARD */
    +    }
    +    return yy_default[stateno];
    +  }else{
    +    return yy_action[i];
    +  }
    +}
    +
    +/*
    +** Find the appropriate action for a parser given the non-terminal
    +** look-ahead token iLookAhead.
    +**
    +** If the look-ahead token is YYNOCODE, then check to see if the action is
    +** independent of the look-ahead.  If it is, return the action, otherwise
    +** return YY_NO_ACTION.
    +*/
    +static int yy_find_reduce_action(
    +  int stateno,              /* Current state number */
    +  YYCODETYPE iLookAhead     /* The look-ahead token */
    +){
    +  int i;
    +#ifdef YYERRORSYMBOL
    +  if( stateno>YY_REDUCE_COUNT ){
    +    return yy_default[stateno];
    +  }
    +#else
    +  assert( stateno<=YY_REDUCE_COUNT );
    +#endif
    +  i = yy_reduce_ofst[stateno];
    +  assert( i!=YY_REDUCE_USE_DFLT );
    +  assert( iLookAhead!=YYNOCODE );
    +  i += iLookAhead;
    +#ifdef YYERRORSYMBOL
    +  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    +    return yy_default[stateno];
    +  }
    +#else
    +  assert( i>=0 && i<YY_ACTTAB_COUNT );
    +  assert( yy_lookahead[i]==iLookAhead );
    +#endif
    +  return yy_action[i];
    +}
    +
    +/*
    +** The following routine is called if the stack overflows.
    +*/
    +static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
    +   sqlite3ParserARG_FETCH;
    +   yypParser->yyidx--;
    +#ifndef NDEBUG
    +   if( yyTraceFILE ){
    +     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
    +   }
    +#endif
    +   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
    +   /* Here code is inserted which will execute if the parser
    +   ** stack every overflows */
    +
    +  UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
    +  sqlite3ErrorMsg(pParse, "parser stack overflow");
    +  pParse->parseError = 1;
    +   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
    +}
    +
    +/*
    +** Perform a shift action.
    +*/
    +static void yy_shift(
    +  yyParser *yypParser,          /* The parser to be shifted */
    +  int yyNewState,               /* The new state to shift in */
    +  int yyMajor,                  /* The major token to shift in */
    +  YYMINORTYPE *yypMinor         /* Pointer to the minor token to shift in */
    +){
    +  yyStackEntry *yytos;
    +  yypParser->yyidx++;
    +#ifdef YYTRACKMAXSTACKDEPTH
    +  if( yypParser->yyidx>yypParser->yyidxMax ){
    +    yypParser->yyidxMax = yypParser->yyidx;
    +  }
    +#endif
    +#if YYSTACKDEPTH>0 
    +  if( yypParser->yyidx>=YYSTACKDEPTH ){
    +    yyStackOverflow(yypParser, yypMinor);
    +    return;
    +  }
    +#else
    +  if( yypParser->yyidx>=yypParser->yystksz ){
    +    yyGrowStack(yypParser);
    +    if( yypParser->yyidx>=yypParser->yystksz ){
    +      yyStackOverflow(yypParser, yypMinor);
    +      return;
    +    }
    +  }
    +#endif
    +  yytos = &yypParser->yystack[yypParser->yyidx];
    +  yytos->stateno = (YYACTIONTYPE)yyNewState;
    +  yytos->major = (YYCODETYPE)yyMajor;
    +  yytos->minor = *yypMinor;
    +#ifndef NDEBUG
    +  if( yyTraceFILE && yypParser->yyidx>0 ){
    +    int i;
    +    fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
    +    fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
    +    for(i=1; i<=yypParser->yyidx; i++)
    +      fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
    +    fprintf(yyTraceFILE,"\n");
    +  }
    +#endif
    +}
    +
    +/* The following table contains information about every rule that
    +** is used during the reduce.
    +*/
    +static const struct {
    +  YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
    +  unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
    +} yyRuleInfo[] = {
    +  { 142, 1 },
    +  { 143, 2 },
    +  { 143, 1 },
    +  { 144, 1 },
    +  { 144, 3 },
    +  { 145, 0 },
    +  { 145, 1 },
    +  { 145, 3 },
    +  { 146, 1 },
    +  { 147, 3 },
    +  { 149, 0 },
    +  { 149, 1 },
    +  { 149, 2 },
    +  { 148, 0 },
    +  { 148, 1 },
    +  { 148, 1 },
    +  { 148, 1 },
    +  { 147, 2 },
    +  { 147, 2 },
    +  { 147, 2 },
    +  { 151, 1 },
    +  { 151, 0 },
    +  { 147, 2 },
    +  { 147, 3 },
    +  { 147, 5 },
    +  { 147, 2 },
    +  { 152, 6 },
    +  { 154, 1 },
    +  { 156, 0 },
    +  { 156, 3 },
    +  { 155, 1 },
    +  { 155, 0 },
    +  { 153, 4 },
    +  { 153, 2 },
    +  { 158, 3 },
    +  { 158, 1 },
    +  { 161, 3 },
    +  { 162, 1 },
    +  { 165, 1 },
    +  { 165, 1 },
    +  { 166, 1 },
    +  { 150, 1 },
    +  { 150, 1 },
    +  { 150, 1 },
    +  { 163, 0 },
    +  { 163, 1 },
    +  { 167, 1 },
    +  { 167, 4 },
    +  { 167, 6 },
    +  { 168, 1 },
    +  { 168, 2 },
    +  { 169, 1 },
    +  { 169, 1 },
    +  { 164, 2 },
    +  { 164, 0 },
    +  { 172, 3 },
    +  { 172, 1 },
    +  { 173, 2 },
    +  { 173, 4 },
    +  { 173, 3 },
    +  { 173, 3 },
    +  { 173, 2 },
    +  { 173, 2 },
    +  { 173, 3 },
    +  { 173, 5 },
    +  { 173, 2 },
    +  { 173, 4 },
    +  { 173, 4 },
    +  { 173, 1 },
    +  { 173, 2 },
    +  { 178, 0 },
    +  { 178, 1 },
    +  { 180, 0 },
    +  { 180, 2 },
    +  { 182, 2 },
    +  { 182, 3 },
    +  { 182, 3 },
    +  { 183, 2 },
    +  { 183, 2 },
    +  { 183, 1 },
    +  { 183, 1 },
    +  { 183, 2 },
    +  { 181, 3 },
    +  { 181, 2 },
    +  { 184, 0 },
    +  { 184, 2 },
    +  { 184, 2 },
    +  { 159, 0 },
    +  { 159, 2 },
    +  { 185, 3 },
    +  { 185, 2 },
    +  { 185, 1 },
    +  { 186, 2 },
    +  { 186, 7 },
    +  { 186, 5 },
    +  { 186, 5 },
    +  { 186, 10 },
    +  { 188, 0 },
    +  { 188, 1 },
    +  { 176, 0 },
    +  { 176, 3 },
    +  { 189, 0 },
    +  { 189, 2 },
    +  { 190, 1 },
    +  { 190, 1 },
    +  { 190, 1 },
    +  { 147, 4 },
    +  { 192, 2 },
    +  { 192, 0 },
    +  { 147, 8 },
    +  { 147, 4 },
    +  { 147, 1 },
    +  { 160, 1 },
    +  { 160, 3 },
    +  { 195, 1 },
    +  { 195, 2 },
    +  { 195, 1 },
    +  { 194, 9 },
    +  { 196, 1 },
    +  { 196, 1 },
    +  { 196, 0 },
    +  { 204, 2 },
    +  { 204, 0 },
    +  { 197, 3 },
    +  { 197, 2 },
    +  { 197, 4 },
    +  { 205, 2 },
    +  { 205, 1 },
    +  { 205, 0 },
    +  { 198, 0 },
    +  { 198, 2 },
    +  { 207, 2 },
    +  { 207, 0 },
    +  { 206, 7 },
    +  { 206, 7 },
    +  { 206, 7 },
    +  { 157, 0 },
    +  { 157, 2 },
    +  { 193, 2 },
    +  { 208, 1 },
    +  { 208, 2 },
    +  { 208, 3 },
    +  { 208, 4 },
    +  { 210, 2 },
    +  { 210, 0 },
    +  { 209, 0 },
    +  { 209, 3 },
    +  { 209, 2 },
    +  { 211, 4 },
    +  { 211, 0 },
    +  { 202, 0 },
    +  { 202, 3 },
    +  { 214, 4 },
    +  { 214, 2 },
    +  { 215, 1 },
    +  { 177, 1 },
    +  { 177, 1 },
    +  { 177, 0 },
    +  { 200, 0 },
    +  { 200, 3 },
    +  { 201, 0 },
    +  { 201, 2 },
    +  { 203, 0 },
    +  { 203, 2 },
    +  { 203, 4 },
    +  { 203, 4 },
    +  { 147, 5 },
    +  { 199, 0 },
    +  { 199, 2 },
    +  { 147, 7 },
    +  { 217, 5 },
    +  { 217, 3 },
    +  { 147, 8 },
    +  { 147, 5 },
    +  { 147, 6 },
    +  { 218, 2 },
    +  { 218, 1 },
    +  { 220, 3 },
    +  { 220, 1 },
    +  { 219, 0 },
    +  { 219, 3 },
    +  { 213, 3 },
    +  { 213, 1 },
    +  { 175, 1 },
    +  { 175, 3 },
    +  { 174, 1 },
    +  { 175, 1 },
    +  { 175, 1 },
    +  { 175, 3 },
    +  { 175, 5 },
    +  { 174, 1 },
    +  { 174, 1 },
    +  { 175, 1 },
    +  { 175, 1 },
    +  { 175, 3 },
    +  { 175, 6 },
    +  { 175, 5 },
    +  { 175, 4 },
    +  { 174, 1 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 222, 1 },
    +  { 222, 2 },
    +  { 222, 1 },
    +  { 222, 2 },
    +  { 223, 2 },
    +  { 223, 0 },
    +  { 175, 4 },
    +  { 175, 2 },
    +  { 175, 3 },
    +  { 175, 3 },
    +  { 175, 4 },
    +  { 175, 2 },
    +  { 175, 2 },
    +  { 175, 2 },
    +  { 175, 2 },
    +  { 224, 1 },
    +  { 224, 2 },
    +  { 175, 5 },
    +  { 225, 1 },
    +  { 225, 2 },
    +  { 175, 5 },
    +  { 175, 3 },
    +  { 175, 5 },
    +  { 175, 4 },
    +  { 175, 4 },
    +  { 175, 5 },
    +  { 227, 5 },
    +  { 227, 4 },
    +  { 228, 2 },
    +  { 228, 0 },
    +  { 226, 1 },
    +  { 226, 0 },
    +  { 221, 1 },
    +  { 221, 0 },
    +  { 216, 3 },
    +  { 216, 1 },
    +  { 147, 11 },
    +  { 229, 1 },
    +  { 229, 0 },
    +  { 179, 0 },
    +  { 179, 3 },
    +  { 187, 5 },
    +  { 187, 3 },
    +  { 230, 0 },
    +  { 230, 2 },
    +  { 147, 4 },
    +  { 147, 1 },
    +  { 147, 2 },
    +  { 147, 3 },
    +  { 147, 5 },
    +  { 147, 6 },
    +  { 147, 5 },
    +  { 147, 6 },
    +  { 231, 1 },
    +  { 231, 1 },
    +  { 231, 1 },
    +  { 231, 1 },
    +  { 231, 1 },
    +  { 170, 2 },
    +  { 171, 2 },
    +  { 233, 1 },
    +  { 232, 1 },
    +  { 232, 0 },
    +  { 147, 5 },
    +  { 234, 11 },
    +  { 236, 1 },
    +  { 236, 1 },
    +  { 236, 2 },
    +  { 236, 0 },
    +  { 237, 1 },
    +  { 237, 1 },
    +  { 237, 3 },
    +  { 238, 0 },
    +  { 238, 3 },
    +  { 239, 0 },
    +  { 239, 2 },
    +  { 235, 3 },
    +  { 235, 2 },
    +  { 241, 1 },
    +  { 241, 3 },
    +  { 242, 0 },
    +  { 242, 3 },
    +  { 242, 2 },
    +  { 240, 7 },
    +  { 240, 8 },
    +  { 240, 5 },
    +  { 240, 5 },
    +  { 240, 1 },
    +  { 175, 4 },
    +  { 175, 6 },
    +  { 191, 1 },
    +  { 191, 1 },
    +  { 191, 1 },
    +  { 147, 4 },
    +  { 147, 6 },
    +  { 147, 3 },
    +  { 244, 0 },
    +  { 244, 2 },
    +  { 243, 1 },
    +  { 243, 0 },
    +  { 147, 1 },
    +  { 147, 3 },
    +  { 147, 1 },
    +  { 147, 3 },
    +  { 147, 6 },
    +  { 147, 6 },
    +  { 245, 1 },
    +  { 246, 0 },
    +  { 246, 1 },
    +  { 147, 1 },
    +  { 147, 4 },
    +  { 247, 7 },
    +  { 248, 1 },
    +  { 248, 3 },
    +  { 249, 0 },
    +  { 249, 2 },
    +  { 250, 1 },
    +  { 250, 3 },
    +  { 251, 1 },
    +  { 252, 0 },
    +  { 252, 4 },
    +  { 252, 2 },
    +};
    +
    +static void yy_accept(yyParser*);  /* Forward Declaration */
    +
    +/*
    +** Perform a reduce action and the shift that must immediately
    +** follow the reduce.
    +*/
    +static void yy_reduce(
    +  yyParser *yypParser,         /* The parser */
    +  int yyruleno                 /* Number of the rule by which to reduce */
    +){
    +  int yygoto;                     /* The next state */
    +  int yyact;                      /* The next action */
    +  YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
    +  yyStackEntry *yymsp;            /* The top of the parser's stack */
    +  int yysize;                     /* Amount to pop the stack */
    +  sqlite3ParserARG_FETCH;
    +  yymsp = &yypParser->yystack[yypParser->yyidx];
    +#ifndef NDEBUG
    +  if( yyTraceFILE && yyruleno>=0 
    +        && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    +    fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
    +      yyRuleName[yyruleno]);
    +  }
    +#endif /* NDEBUG */
    +
    +  /* Silence complaints from purify about yygotominor being uninitialized
    +  ** in some cases when it is copied into the stack after the following
    +  ** switch.  yygotominor is uninitialized when a rule reduces that does
    +  ** not set the value of its left-hand side nonterminal.  Leaving the
    +  ** value of the nonterminal uninitialized is utterly harmless as long
    +  ** as the value is never used.  So really the only thing this code
    +  ** accomplishes is to quieten purify.  
    +  **
    +  ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
    +  ** without this code, their parser segfaults.  I'm not sure what there
    +  ** parser is doing to make this happen.  This is the second bug report
    +  ** from wireshark this week.  Clearly they are stressing Lemon in ways
    +  ** that it has not been previously stressed...  (SQLite ticket #2172)
    +  */
    +  /*memset(&yygotominor, 0, sizeof(yygotominor));*/
    +  yygotominor = yyzerominor;
    +
    +
    +  switch( yyruleno ){
    +  /* Beginning here are the reduction cases.  A typical example
    +  ** follows:
    +  **   case 0:
    +  **  #line <lineno> <grammarfile>
    +  **     { ... }           // User supplied code
    +  **  #line <lineno> <thisfile>
    +  **     break;
    +  */
    +      case 5: /* explain ::= */
    +{ sqlite3BeginParse(pParse, 0); }
    +        break;
    +      case 6: /* explain ::= EXPLAIN */
    +{ sqlite3BeginParse(pParse, 1); }
    +        break;
    +      case 7: /* explain ::= EXPLAIN QUERY PLAN */
    +{ sqlite3BeginParse(pParse, 2); }
    +        break;
    +      case 8: /* cmdx ::= cmd */
    +{ sqlite3FinishCoding(pParse); }
    +        break;
    +      case 9: /* cmd ::= BEGIN transtype trans_opt */
    +{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy328);}
    +        break;
    +      case 13: /* transtype ::= */
    +{yygotominor.yy328 = TK_DEFERRED;}
    +        break;
    +      case 14: /* transtype ::= DEFERRED */
    +      case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15);
    +      case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16);
    +      case 114: /* multiselect_op ::= UNION */ yytestcase(yyruleno==114);
    +      case 116: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==116);
    +{yygotominor.yy328 = yymsp[0].major;}
    +        break;
    +      case 17: /* cmd ::= COMMIT trans_opt */
    +      case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18);
    +{sqlite3CommitTransaction(pParse);}
    +        break;
    +      case 19: /* cmd ::= ROLLBACK trans_opt */
    +{sqlite3RollbackTransaction(pParse);}
    +        break;
    +      case 22: /* cmd ::= SAVEPOINT nm */
    +{
    +  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 23: /* cmd ::= RELEASE savepoint_opt nm */
    +{
    +  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
    +{
    +  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
    +{
    +   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy328,0,0,yymsp[-2].minor.yy328);
    +}
    +        break;
    +      case 27: /* createkw ::= CREATE */
    +{
    +  pParse->db->lookaside.bEnabled = 0;
    +  yygotominor.yy0 = yymsp[0].minor.yy0;
    +}
    +        break;
    +      case 28: /* ifnotexists ::= */
    +      case 31: /* temp ::= */ yytestcase(yyruleno==31);
    +      case 70: /* autoinc ::= */ yytestcase(yyruleno==70);
    +      case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==82);
    +      case 84: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==84);
    +      case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==86);
    +      case 97: /* defer_subclause_opt ::= */ yytestcase(yyruleno==97);
    +      case 108: /* ifexists ::= */ yytestcase(yyruleno==108);
    +      case 119: /* distinct ::= ALL */ yytestcase(yyruleno==119);
    +      case 120: /* distinct ::= */ yytestcase(yyruleno==120);
    +      case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222);
    +      case 225: /* in_op ::= IN */ yytestcase(yyruleno==225);
    +{yygotominor.yy328 = 0;}
    +        break;
    +      case 29: /* ifnotexists ::= IF NOT EXISTS */
    +      case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
    +      case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71);
    +      case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==85);
    +      case 107: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==107);
    +      case 118: /* distinct ::= DISTINCT */ yytestcase(yyruleno==118);
    +      case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223);
    +      case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226);
    +{yygotominor.yy328 = 1;}
    +        break;
    +      case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
    +{
    +  sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
    +}
    +        break;
    +      case 33: /* create_table_args ::= AS select */
    +{
    +  sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy3);
    +  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy3);
    +}
    +        break;
    +      case 36: /* column ::= columnid type carglist */
    +{
    +  yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
    +  yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
    +}
    +        break;
    +      case 37: /* columnid ::= nm */
    +{
    +  sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
    +  yygotominor.yy0 = yymsp[0].minor.yy0;
    +}
    +        break;
    +      case 38: /* id ::= ID */
    +      case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39);
    +      case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40);
    +      case 41: /* nm ::= id */ yytestcase(yyruleno==41);
    +      case 42: /* nm ::= STRING */ yytestcase(yyruleno==42);
    +      case 43: /* nm ::= JOIN_KW */ yytestcase(yyruleno==43);
    +      case 46: /* typetoken ::= typename */ yytestcase(yyruleno==46);
    +      case 49: /* typename ::= ids */ yytestcase(yyruleno==49);
    +      case 126: /* as ::= AS nm */ yytestcase(yyruleno==126);
    +      case 127: /* as ::= ids */ yytestcase(yyruleno==127);
    +      case 137: /* dbnm ::= DOT nm */ yytestcase(yyruleno==137);
    +      case 146: /* indexed_opt ::= INDEXED BY nm */ yytestcase(yyruleno==146);
    +      case 251: /* collate ::= COLLATE ids */ yytestcase(yyruleno==251);
    +      case 260: /* nmnum ::= plus_num */ yytestcase(yyruleno==260);
    +      case 261: /* nmnum ::= nm */ yytestcase(yyruleno==261);
    +      case 262: /* nmnum ::= ON */ yytestcase(yyruleno==262);
    +      case 263: /* nmnum ::= DELETE */ yytestcase(yyruleno==263);
    +      case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264);
    +      case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265);
    +      case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266);
    +      case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267);
    +      case 285: /* trnm ::= nm */ yytestcase(yyruleno==285);
    +{yygotominor.yy0 = yymsp[0].minor.yy0;}
    +        break;
    +      case 45: /* type ::= typetoken */
    +{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
    +        break;
    +      case 47: /* typetoken ::= typename LP signed RP */
    +{
    +  yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
    +  yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
    +}
    +        break;
    +      case 48: /* typetoken ::= typename LP signed COMMA signed RP */
    +{
    +  yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
    +  yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
    +}
    +        break;
    +      case 50: /* typename ::= typename ids */
    +{yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
    +        break;
    +      case 57: /* ccons ::= DEFAULT term */
    +      case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59);
    +{sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy346);}
    +        break;
    +      case 58: /* ccons ::= DEFAULT LP expr RP */
    +{sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy346);}
    +        break;
    +      case 60: /* ccons ::= DEFAULT MINUS term */
    +{
    +  ExprSpan v;
    +  v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy346.pExpr, 0, 0);
    +  v.zStart = yymsp[-1].minor.yy0.z;
    +  v.zEnd = yymsp[0].minor.yy346.zEnd;
    +  sqlite3AddDefaultValue(pParse,&v);
    +}
    +        break;
    +      case 61: /* ccons ::= DEFAULT id */
    +{
    +  ExprSpan v;
    +  spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0);
    +  sqlite3AddDefaultValue(pParse,&v);
    +}
    +        break;
    +      case 63: /* ccons ::= NOT NULL onconf */
    +{sqlite3AddNotNull(pParse, yymsp[0].minor.yy328);}
    +        break;
    +      case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
    +{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy328,yymsp[0].minor.yy328,yymsp[-2].minor.yy328);}
    +        break;
    +      case 65: /* ccons ::= UNIQUE onconf */
    +{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy328,0,0,0,0);}
    +        break;
    +      case 66: /* ccons ::= CHECK LP expr RP */
    +{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy346.pExpr);}
    +        break;
    +      case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
    +{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy328);}
    +        break;
    +      case 68: /* ccons ::= defer_subclause */
    +{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy328);}
    +        break;
    +      case 69: /* ccons ::= COLLATE ids */
    +{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
    +        break;
    +      case 72: /* refargs ::= */
    +{ yygotominor.yy328 = OE_None*0x0101; /* EV: R-19803-45884 */}
    +        break;
    +      case 73: /* refargs ::= refargs refarg */
    +{ yygotominor.yy328 = (yymsp[-1].minor.yy328 & ~yymsp[0].minor.yy429.mask) | yymsp[0].minor.yy429.value; }
    +        break;
    +      case 74: /* refarg ::= MATCH nm */
    +{ yygotominor.yy429.value = 0;     yygotominor.yy429.mask = 0x000000; }
    +        break;
    +      case 75: /* refarg ::= ON DELETE refact */
    +{ yygotominor.yy429.value = yymsp[0].minor.yy328;     yygotominor.yy429.mask = 0x0000ff; }
    +        break;
    +      case 76: /* refarg ::= ON UPDATE refact */
    +{ yygotominor.yy429.value = yymsp[0].minor.yy328<<8;  yygotominor.yy429.mask = 0x00ff00; }
    +        break;
    +      case 77: /* refact ::= SET NULL */
    +{ yygotominor.yy328 = OE_SetNull;  /* EV: R-33326-45252 */}
    +        break;
    +      case 78: /* refact ::= SET DEFAULT */
    +{ yygotominor.yy328 = OE_SetDflt;  /* EV: R-33326-45252 */}
    +        break;
    +      case 79: /* refact ::= CASCADE */
    +{ yygotominor.yy328 = OE_Cascade;  /* EV: R-33326-45252 */}
    +        break;
    +      case 80: /* refact ::= RESTRICT */
    +{ yygotominor.yy328 = OE_Restrict; /* EV: R-33326-45252 */}
    +        break;
    +      case 81: /* refact ::= NO ACTION */
    +{ yygotominor.yy328 = OE_None;     /* EV: R-33326-45252 */}
    +        break;
    +      case 83: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
    +      case 98: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==98);
    +      case 100: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==100);
    +      case 103: /* resolvetype ::= raisetype */ yytestcase(yyruleno==103);
    +{yygotominor.yy328 = yymsp[0].minor.yy328;}
    +        break;
    +      case 87: /* conslist_opt ::= */
    +{yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
    +        break;
    +      case 88: /* conslist_opt ::= COMMA conslist */
    +{yygotominor.yy0 = yymsp[-1].minor.yy0;}
    +        break;
    +      case 93: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
    +{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy328,yymsp[-2].minor.yy328,0);}
    +        break;
    +      case 94: /* tcons ::= UNIQUE LP idxlist RP onconf */
    +{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy328,0,0,0,0);}
    +        break;
    +      case 95: /* tcons ::= CHECK LP expr RP onconf */
    +{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy346.pExpr);}
    +        break;
    +      case 96: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
    +{
    +    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy328);
    +    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy328);
    +}
    +        break;
    +      case 99: /* onconf ::= */
    +{yygotominor.yy328 = OE_Default;}
    +        break;
    +      case 101: /* orconf ::= */
    +{yygotominor.yy186 = OE_Default;}
    +        break;
    +      case 102: /* orconf ::= OR resolvetype */
    +{yygotominor.yy186 = (u8)yymsp[0].minor.yy328;}
    +        break;
    +      case 104: /* resolvetype ::= IGNORE */
    +{yygotominor.yy328 = OE_Ignore;}
    +        break;
    +      case 105: /* resolvetype ::= REPLACE */
    +{yygotominor.yy328 = OE_Replace;}
    +        break;
    +      case 106: /* cmd ::= DROP TABLE ifexists fullname */
    +{
    +  sqlite3DropTable(pParse, yymsp[0].minor.yy65, 0, yymsp[-1].minor.yy328);
    +}
    +        break;
    +      case 109: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
    +{
    +  sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy3, yymsp[-6].minor.yy328, yymsp[-4].minor.yy328);
    +}
    +        break;
    +      case 110: /* cmd ::= DROP VIEW ifexists fullname */
    +{
    +  sqlite3DropTable(pParse, yymsp[0].minor.yy65, 1, yymsp[-1].minor.yy328);
    +}
    +        break;
    +      case 111: /* cmd ::= select */
    +{
    +  SelectDest dest = {SRT_Output, 0, 0, 0, 0};
    +  sqlite3Select(pParse, yymsp[0].minor.yy3, &dest);
    +  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy3);
    +}
    +        break;
    +      case 112: /* select ::= oneselect */
    +{yygotominor.yy3 = yymsp[0].minor.yy3;}
    +        break;
    +      case 113: /* select ::= select multiselect_op oneselect */
    +{
    +  if( yymsp[0].minor.yy3 ){
    +    yymsp[0].minor.yy3->op = (u8)yymsp[-1].minor.yy328;
    +    yymsp[0].minor.yy3->pPrior = yymsp[-2].minor.yy3;
    +  }else{
    +    sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy3);
    +  }
    +  yygotominor.yy3 = yymsp[0].minor.yy3;
    +}
    +        break;
    +      case 115: /* multiselect_op ::= UNION ALL */
    +{yygotominor.yy328 = TK_ALL;}
    +        break;
    +      case 117: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
    +{
    +  yygotominor.yy3 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy14,yymsp[-5].minor.yy65,yymsp[-4].minor.yy132,yymsp[-3].minor.yy14,yymsp[-2].minor.yy132,yymsp[-1].minor.yy14,yymsp[-7].minor.yy328,yymsp[0].minor.yy476.pLimit,yymsp[0].minor.yy476.pOffset);
    +}
    +        break;
    +      case 121: /* sclp ::= selcollist COMMA */
    +      case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247);
    +{yygotominor.yy14 = yymsp[-1].minor.yy14;}
    +        break;
    +      case 122: /* sclp ::= */
    +      case 150: /* orderby_opt ::= */ yytestcase(yyruleno==150);
    +      case 158: /* groupby_opt ::= */ yytestcase(yyruleno==158);
    +      case 240: /* exprlist ::= */ yytestcase(yyruleno==240);
    +      case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246);
    +{yygotominor.yy14 = 0;}
    +        break;
    +      case 123: /* selcollist ::= sclp expr as */
    +{
    +   yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, yymsp[-1].minor.yy346.pExpr);
    +   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[0].minor.yy0, 1);
    +   sqlite3ExprListSetSpan(pParse,yygotominor.yy14,&yymsp[-1].minor.yy346);
    +}
    +        break;
    +      case 124: /* selcollist ::= sclp STAR */
    +{
    +  Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0);
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy14, p);
    +}
    +        break;
    +      case 125: /* selcollist ::= sclp nm DOT STAR */
    +{
    +  Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
    +  Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
    +  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14, pDot);
    +}
    +        break;
    +      case 128: /* as ::= */
    +{yygotominor.yy0.n = 0;}
    +        break;
    +      case 129: /* from ::= */
    +{yygotominor.yy65 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy65));}
    +        break;
    +      case 130: /* from ::= FROM seltablist */
    +{
    +  yygotominor.yy65 = yymsp[0].minor.yy65;
    +  sqlite3SrcListShiftJoinType(yygotominor.yy65);
    +}
    +        break;
    +      case 131: /* stl_prefix ::= seltablist joinop */
    +{
    +   yygotominor.yy65 = yymsp[-1].minor.yy65;
    +   if( ALWAYS(yygotominor.yy65 && yygotominor.yy65->nSrc>0) ) yygotominor.yy65->a[yygotominor.yy65->nSrc-1].jointype = (u8)yymsp[0].minor.yy328;
    +}
    +        break;
    +      case 132: /* stl_prefix ::= */
    +{yygotominor.yy65 = 0;}
    +        break;
    +      case 133: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
    +{
    +  yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy65,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy132,yymsp[0].minor.yy408);
    +  sqlite3SrcListIndexedBy(pParse, yygotominor.yy65, &yymsp[-2].minor.yy0);
    +}
    +        break;
    +      case 134: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
    +{
    +    yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy65,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy3,yymsp[-1].minor.yy132,yymsp[0].minor.yy408);
    +  }
    +        break;
    +      case 135: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
    +{
    +    if( yymsp[-6].minor.yy65==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy132==0 && yymsp[0].minor.yy408==0 ){
    +      yygotominor.yy65 = yymsp[-4].minor.yy65;
    +    }else{
    +      Select *pSubquery;
    +      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy65);
    +      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy65,0,0,0,0,0,0,0);
    +      yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy65,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy132,yymsp[0].minor.yy408);
    +    }
    +  }
    +        break;
    +      case 136: /* dbnm ::= */
    +      case 145: /* indexed_opt ::= */ yytestcase(yyruleno==145);
    +{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
    +        break;
    +      case 138: /* fullname ::= nm dbnm */
    +{yygotominor.yy65 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
    +        break;
    +      case 139: /* joinop ::= COMMA|JOIN */
    +{ yygotominor.yy328 = JT_INNER; }
    +        break;
    +      case 140: /* joinop ::= JOIN_KW JOIN */
    +{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
    +        break;
    +      case 141: /* joinop ::= JOIN_KW nm JOIN */
    +{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
    +        break;
    +      case 142: /* joinop ::= JOIN_KW nm nm JOIN */
    +{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
    +        break;
    +      case 143: /* on_opt ::= ON expr */
    +      case 154: /* sortitem ::= expr */ yytestcase(yyruleno==154);
    +      case 161: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==161);
    +      case 168: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==168);
    +      case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235);
    +      case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237);
    +{yygotominor.yy132 = yymsp[0].minor.yy346.pExpr;}
    +        break;
    +      case 144: /* on_opt ::= */
    +      case 160: /* having_opt ::= */ yytestcase(yyruleno==160);
    +      case 167: /* where_opt ::= */ yytestcase(yyruleno==167);
    +      case 236: /* case_else ::= */ yytestcase(yyruleno==236);
    +      case 238: /* case_operand ::= */ yytestcase(yyruleno==238);
    +{yygotominor.yy132 = 0;}
    +        break;
    +      case 147: /* indexed_opt ::= NOT INDEXED */
    +{yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
    +        break;
    +      case 148: /* using_opt ::= USING LP inscollist RP */
    +      case 180: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==180);
    +{yygotominor.yy408 = yymsp[-1].minor.yy408;}
    +        break;
    +      case 149: /* using_opt ::= */
    +      case 179: /* inscollist_opt ::= */ yytestcase(yyruleno==179);
    +{yygotominor.yy408 = 0;}
    +        break;
    +      case 151: /* orderby_opt ::= ORDER BY sortlist */
    +      case 159: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==159);
    +      case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239);
    +{yygotominor.yy14 = yymsp[0].minor.yy14;}
    +        break;
    +      case 152: /* sortlist ::= sortlist COMMA sortitem sortorder */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14,yymsp[-1].minor.yy132);
    +  if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
    +}
    +        break;
    +      case 153: /* sortlist ::= sortitem sortorder */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy132);
    +  if( yygotominor.yy14 && ALWAYS(yygotominor.yy14->a) ) yygotominor.yy14->a[0].sortOrder = (u8)yymsp[0].minor.yy328;
    +}
    +        break;
    +      case 155: /* sortorder ::= ASC */
    +      case 157: /* sortorder ::= */ yytestcase(yyruleno==157);
    +{yygotominor.yy328 = SQLITE_SO_ASC;}
    +        break;
    +      case 156: /* sortorder ::= DESC */
    +{yygotominor.yy328 = SQLITE_SO_DESC;}
    +        break;
    +      case 162: /* limit_opt ::= */
    +{yygotominor.yy476.pLimit = 0; yygotominor.yy476.pOffset = 0;}
    +        break;
    +      case 163: /* limit_opt ::= LIMIT expr */
    +{yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; yygotominor.yy476.pOffset = 0;}
    +        break;
    +      case 164: /* limit_opt ::= LIMIT expr OFFSET expr */
    +{yygotominor.yy476.pLimit = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pOffset = yymsp[0].minor.yy346.pExpr;}
    +        break;
    +      case 165: /* limit_opt ::= LIMIT expr COMMA expr */
    +{yygotominor.yy476.pOffset = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr;}
    +        break;
    +      case 166: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
    +{
    +  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy65, &yymsp[-1].minor.yy0);
    +  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy65,yymsp[0].minor.yy132);
    +}
    +        break;
    +      case 169: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
    +{
    +  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy65, &yymsp[-3].minor.yy0);
    +  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy14,"set list"); 
    +  sqlite3Update(pParse,yymsp[-4].minor.yy65,yymsp[-1].minor.yy14,yymsp[0].minor.yy132,yymsp[-5].minor.yy186);
    +}
    +        break;
    +      case 170: /* setlist ::= setlist COMMA nm EQ expr */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy346.pExpr);
    +  sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
    +}
    +        break;
    +      case 171: /* setlist ::= nm EQ expr */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy346.pExpr);
    +  sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
    +}
    +        break;
    +      case 172: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
    +{sqlite3Insert(pParse, yymsp[-5].minor.yy65, yymsp[-1].minor.yy14, 0, yymsp[-4].minor.yy408, yymsp[-7].minor.yy186);}
    +        break;
    +      case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
    +{sqlite3Insert(pParse, yymsp[-2].minor.yy65, 0, yymsp[0].minor.yy3, yymsp[-1].minor.yy408, yymsp[-4].minor.yy186);}
    +        break;
    +      case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
    +{sqlite3Insert(pParse, yymsp[-3].minor.yy65, 0, 0, yymsp[-2].minor.yy408, yymsp[-5].minor.yy186);}
    +        break;
    +      case 175: /* insert_cmd ::= INSERT orconf */
    +{yygotominor.yy186 = yymsp[0].minor.yy186;}
    +        break;
    +      case 176: /* insert_cmd ::= REPLACE */
    +{yygotominor.yy186 = OE_Replace;}
    +        break;
    +      case 177: /* itemlist ::= itemlist COMMA expr */
    +      case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241);
    +{yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy346.pExpr);}
    +        break;
    +      case 178: /* itemlist ::= expr */
    +      case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242);
    +{yygotominor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy346.pExpr);}
    +        break;
    +      case 181: /* inscollist ::= inscollist COMMA nm */
    +{yygotominor.yy408 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy408,&yymsp[0].minor.yy0);}
    +        break;
    +      case 182: /* inscollist ::= nm */
    +{yygotominor.yy408 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
    +        break;
    +      case 183: /* expr ::= term */
    +      case 211: /* escape ::= ESCAPE expr */ yytestcase(yyruleno==211);
    +{yygotominor.yy346 = yymsp[0].minor.yy346;}
    +        break;
    +      case 184: /* expr ::= LP expr RP */
    +{yygotominor.yy346.pExpr = yymsp[-1].minor.yy346.pExpr; spanSet(&yygotominor.yy346,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
    +        break;
    +      case 185: /* term ::= NULL */
    +      case 190: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==190);
    +      case 191: /* term ::= STRING */ yytestcase(yyruleno==191);
    +{spanExpr(&yygotominor.yy346, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
    +        break;
    +      case 186: /* expr ::= id */
    +      case 187: /* expr ::= JOIN_KW */ yytestcase(yyruleno==187);
    +{spanExpr(&yygotominor.yy346, pParse, TK_ID, &yymsp[0].minor.yy0);}
    +        break;
    +      case 188: /* expr ::= nm DOT nm */
    +{
    +  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
    +  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
    +  spanSet(&yygotominor.yy346,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 189: /* expr ::= nm DOT nm DOT nm */
    +{
    +  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
    +  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
    +  Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
    +  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
    +  spanSet(&yygotominor.yy346,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 192: /* expr ::= REGISTER */
    +{
    +  /* When doing a nested parse, one can include terms in an expression
    +  ** that look like this:   #1 #2 ...  These terms refer to registers
    +  ** in the virtual machine.  #N is the N-th register. */
    +  if( pParse->nested==0 ){
    +    sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &yymsp[0].minor.yy0);
    +    yygotominor.yy346.pExpr = 0;
    +  }else{
    +    yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0);
    +    if( yygotominor.yy346.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy346.pExpr->iTable);
    +  }
    +  spanSet(&yygotominor.yy346, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 193: /* expr ::= VARIABLE */
    +{
    +  spanExpr(&yygotominor.yy346, pParse, TK_VARIABLE, &yymsp[0].minor.yy0);
    +  sqlite3ExprAssignVarNumber(pParse, yygotominor.yy346.pExpr);
    +  spanSet(&yygotominor.yy346, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 194: /* expr ::= expr COLLATE ids */
    +{
    +  yygotominor.yy346.pExpr = sqlite3ExprSetColl(pParse, yymsp[-2].minor.yy346.pExpr, &yymsp[0].minor.yy0);
    +  yygotominor.yy346.zStart = yymsp[-2].minor.yy346.zStart;
    +  yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +}
    +        break;
    +      case 195: /* expr ::= CAST LP expr AS typetoken RP */
    +{
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy346.pExpr, 0, &yymsp[-1].minor.yy0);
    +  spanSet(&yygotominor.yy346,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 196: /* expr ::= ID LP distinct exprlist RP */
    +{
    +  if( yymsp[-1].minor.yy14 && yymsp[-1].minor.yy14->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
    +    sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
    +  }
    +  yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
    +  spanSet(&yygotominor.yy346,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
    +  if( yymsp[-2].minor.yy328 && yygotominor.yy346.pExpr ){
    +    yygotominor.yy346.pExpr->flags |= EP_Distinct;
    +  }
    +}
    +        break;
    +      case 197: /* expr ::= ID LP STAR RP */
    +{
    +  yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
    +  spanSet(&yygotominor.yy346,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 198: /* term ::= CTIME_KW */
    +{
    +  /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
    +  ** treated as functions that return constants */
    +  yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
    +  if( yygotominor.yy346.pExpr ){
    +    yygotominor.yy346.pExpr->op = TK_CONST_FUNC;  
    +  }
    +  spanSet(&yygotominor.yy346, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 199: /* expr ::= expr AND expr */
    +      case 200: /* expr ::= expr OR expr */ yytestcase(yyruleno==200);
    +      case 201: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==201);
    +      case 202: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==202);
    +      case 203: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==203);
    +      case 204: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==204);
    +      case 205: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==205);
    +      case 206: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==206);
    +{spanBinaryExpr(&yygotominor.yy346,pParse,yymsp[-1].major,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy346);}
    +        break;
    +      case 207: /* likeop ::= LIKE_KW */
    +      case 209: /* likeop ::= MATCH */ yytestcase(yyruleno==209);
    +{yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = 0;}
    +        break;
    +      case 208: /* likeop ::= NOT LIKE_KW */
    +      case 210: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==210);
    +{yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = 1;}
    +        break;
    +      case 212: /* escape ::= */
    +{memset(&yygotominor.yy346,0,sizeof(yygotominor.yy346));}
    +        break;
    +      case 213: /* expr ::= expr likeop expr escape */
    +{
    +  ExprList *pList;
    +  pList = sqlite3ExprListAppend(pParse,0, yymsp[-1].minor.yy346.pExpr);
    +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-3].minor.yy346.pExpr);
    +  if( yymsp[0].minor.yy346.pExpr ){
    +    pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
    +  }
    +  yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-2].minor.yy96.eOperator);
    +  if( yymsp[-2].minor.yy96.not ) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);
    +  yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;
    +  yygotominor.yy346.zEnd = yymsp[-1].minor.yy346.zEnd;
    +  if( yygotominor.yy346.pExpr ) yygotominor.yy346.pExpr->flags |= EP_InfixFunc;
    +}
    +        break;
    +      case 214: /* expr ::= expr ISNULL|NOTNULL */
    +{spanUnaryPostfix(&yygotominor.yy346,pParse,yymsp[0].major,&yymsp[-1].minor.yy346,&yymsp[0].minor.yy0);}
    +        break;
    +      case 215: /* expr ::= expr NOT NULL */
    +{spanUnaryPostfix(&yygotominor.yy346,pParse,TK_NOTNULL,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy0);}
    +        break;
    +      case 216: /* expr ::= expr IS expr */
    +{
    +  spanBinaryExpr(&yygotominor.yy346,pParse,TK_IS,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy346);
    +  if( pParse->db->mallocFailed==0  && yymsp[0].minor.yy346.pExpr->op==TK_NULL ){
    +    yygotominor.yy346.pExpr->op = TK_ISNULL;
    +  }
    +}
    +        break;
    +      case 217: /* expr ::= expr IS NOT expr */
    +{
    +  spanBinaryExpr(&yygotominor.yy346,pParse,TK_ISNOT,&yymsp[-3].minor.yy346,&yymsp[0].minor.yy346);
    +  if( pParse->db->mallocFailed==0  && yymsp[0].minor.yy346.pExpr->op==TK_NULL ){
    +    yygotominor.yy346.pExpr->op = TK_NOTNULL;
    +  }
    +}
    +        break;
    +      case 218: /* expr ::= NOT expr */
    +      case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219);
    +{spanUnaryPrefix(&yygotominor.yy346,pParse,yymsp[-1].major,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
    +        break;
    +      case 220: /* expr ::= MINUS expr */
    +{spanUnaryPrefix(&yygotominor.yy346,pParse,TK_UMINUS,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
    +        break;
    +      case 221: /* expr ::= PLUS expr */
    +{spanUnaryPrefix(&yygotominor.yy346,pParse,TK_UPLUS,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
    +        break;
    +      case 224: /* expr ::= expr between_op expr AND expr */
    +{
    +  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
    +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy346.pExpr, 0, 0);
    +  if( yygotominor.yy346.pExpr ){
    +    yygotominor.yy346.pExpr->x.pList = pList;
    +  }else{
    +    sqlite3ExprListDelete(pParse->db, pList);
    +  } 
    +  if( yymsp[-3].minor.yy328 ) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);
    +  yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
    +  yygotominor.yy346.zEnd = yymsp[0].minor.yy346.zEnd;
    +}
    +        break;
    +      case 227: /* expr ::= expr in_op LP exprlist RP */
    +{
    +    yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0);
    +    if( yygotominor.yy346.pExpr ){
    +      yygotominor.yy346.pExpr->x.pList = yymsp[-1].minor.yy14;
    +      sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);
    +    }else{
    +      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy14);
    +    }
    +    if( yymsp[-3].minor.yy328 ) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);
    +    yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
    +    yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +  }
    +        break;
    +      case 228: /* expr ::= LP select RP */
    +{
    +    yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
    +    if( yygotominor.yy346.pExpr ){
    +      yygotominor.yy346.pExpr->x.pSelect = yymsp[-1].minor.yy3;
    +      ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);
    +      sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);
    +    }else{
    +      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy3);
    +    }
    +    yygotominor.yy346.zStart = yymsp[-2].minor.yy0.z;
    +    yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +  }
    +        break;
    +      case 229: /* expr ::= expr in_op LP select RP */
    +{
    +    yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0);
    +    if( yygotominor.yy346.pExpr ){
    +      yygotominor.yy346.pExpr->x.pSelect = yymsp[-1].minor.yy3;
    +      ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);
    +      sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);
    +    }else{
    +      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy3);
    +    }
    +    if( yymsp[-3].minor.yy328 ) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);
    +    yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;
    +    yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +  }
    +        break;
    +      case 230: /* expr ::= expr in_op nm dbnm */
    +{
    +    SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
    +    yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy346.pExpr, 0, 0);
    +    if( yygotominor.yy346.pExpr ){
    +      yygotominor.yy346.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
    +      ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);
    +      sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);
    +    }else{
    +      sqlite3SrcListDelete(pParse->db, pSrc);
    +    }
    +    if( yymsp[-2].minor.yy328 ) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);
    +    yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;
    +    yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
    +  }
    +        break;
    +      case 231: /* expr ::= EXISTS LP select RP */
    +{
    +    Expr *p = yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
    +    if( p ){
    +      p->x.pSelect = yymsp[-1].minor.yy3;
    +      ExprSetProperty(p, EP_xIsSelect);
    +      sqlite3ExprSetHeight(pParse, p);
    +    }else{
    +      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy3);
    +    }
    +    yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;
    +    yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +  }
    +        break;
    +      case 232: /* expr ::= CASE case_operand case_exprlist case_else END */
    +{
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy132, yymsp[-1].minor.yy132, 0);
    +  if( yygotominor.yy346.pExpr ){
    +    yygotominor.yy346.pExpr->x.pList = yymsp[-2].minor.yy14;
    +    sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);
    +  }else{
    +    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy14);
    +  }
    +  yygotominor.yy346.zStart = yymsp[-4].minor.yy0.z;
    +  yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +}
    +        break;
    +      case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy346.pExpr);
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yygotominor.yy14, yymsp[0].minor.yy346.pExpr);
    +}
    +        break;
    +      case 234: /* case_exprlist ::= WHEN expr THEN expr */
    +{
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yygotominor.yy14, yymsp[0].minor.yy346.pExpr);
    +}
    +        break;
    +      case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
    +{
    +  sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, 
    +                     sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy14, yymsp[-9].minor.yy328,
    +                      &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy328);
    +}
    +        break;
    +      case 244: /* uniqueflag ::= UNIQUE */
    +      case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298);
    +{yygotominor.yy328 = OE_Abort;}
    +        break;
    +      case 245: /* uniqueflag ::= */
    +{yygotominor.yy328 = OE_None;}
    +        break;
    +      case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */
    +{
    +  Expr *p = 0;
    +  if( yymsp[-1].minor.yy0.n>0 ){
    +    p = sqlite3Expr(pParse->db, TK_COLUMN, 0);
    +    sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
    +  }
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, p);
    +  sqlite3ExprListSetName(pParse,yygotominor.yy14,&yymsp[-2].minor.yy0,1);
    +  sqlite3ExprListCheckLength(pParse, yygotominor.yy14, "index");
    +  if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
    +}
    +        break;
    +      case 249: /* idxlist ::= nm collate sortorder */
    +{
    +  Expr *p = 0;
    +  if( yymsp[-1].minor.yy0.n>0 ){
    +    p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
    +    sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
    +  }
    +  yygotominor.yy14 = sqlite3ExprListAppend(pParse,0, p);
    +  sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
    +  sqlite3ExprListCheckLength(pParse, yygotominor.yy14, "index");
    +  if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
    +}
    +        break;
    +      case 250: /* collate ::= */
    +{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
    +        break;
    +      case 252: /* cmd ::= DROP INDEX ifexists fullname */
    +{sqlite3DropIndex(pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328);}
    +        break;
    +      case 253: /* cmd ::= VACUUM */
    +      case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254);
    +{sqlite3Vacuum(pParse);}
    +        break;
    +      case 255: /* cmd ::= PRAGMA nm dbnm */
    +{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
    +        break;
    +      case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
    +{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
    +        break;
    +      case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
    +{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
    +        break;
    +      case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
    +{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
    +        break;
    +      case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
    +{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
    +        break;
    +      case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
    +{
    +  Token all;
    +  all.z = yymsp[-3].minor.yy0.z;
    +  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
    +  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy473, &all);
    +}
    +        break;
    +      case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
    +{
    +  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy328, yymsp[-4].minor.yy378.a, yymsp[-4].minor.yy378.b, yymsp[-2].minor.yy65, yymsp[0].minor.yy132, yymsp[-10].minor.yy328, yymsp[-8].minor.yy328);
    +  yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
    +}
    +        break;
    +      case 272: /* trigger_time ::= BEFORE */
    +      case 275: /* trigger_time ::= */ yytestcase(yyruleno==275);
    +{ yygotominor.yy328 = TK_BEFORE; }
    +        break;
    +      case 273: /* trigger_time ::= AFTER */
    +{ yygotominor.yy328 = TK_AFTER;  }
    +        break;
    +      case 274: /* trigger_time ::= INSTEAD OF */
    +{ yygotominor.yy328 = TK_INSTEAD;}
    +        break;
    +      case 276: /* trigger_event ::= DELETE|INSERT */
    +      case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277);
    +{yygotominor.yy378.a = yymsp[0].major; yygotominor.yy378.b = 0;}
    +        break;
    +      case 278: /* trigger_event ::= UPDATE OF inscollist */
    +{yygotominor.yy378.a = TK_UPDATE; yygotominor.yy378.b = yymsp[0].minor.yy408;}
    +        break;
    +      case 281: /* when_clause ::= */
    +      case 303: /* key_opt ::= */ yytestcase(yyruleno==303);
    +{ yygotominor.yy132 = 0; }
    +        break;
    +      case 282: /* when_clause ::= WHEN expr */
    +      case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304);
    +{ yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }
    +        break;
    +      case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
    +{
    +  assert( yymsp[-2].minor.yy473!=0 );
    +  yymsp[-2].minor.yy473->pLast->pNext = yymsp[-1].minor.yy473;
    +  yymsp[-2].minor.yy473->pLast = yymsp[-1].minor.yy473;
    +  yygotominor.yy473 = yymsp[-2].minor.yy473;
    +}
    +        break;
    +      case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */
    +{ 
    +  assert( yymsp[-1].minor.yy473!=0 );
    +  yymsp[-1].minor.yy473->pLast = yymsp[-1].minor.yy473;
    +  yygotominor.yy473 = yymsp[-1].minor.yy473;
    +}
    +        break;
    +      case 286: /* trnm ::= nm DOT nm */
    +{
    +  yygotominor.yy0 = yymsp[0].minor.yy0;
    +  sqlite3ErrorMsg(pParse, 
    +        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
    +        "statements within triggers");
    +}
    +        break;
    +      case 288: /* tridxby ::= INDEXED BY nm */
    +{
    +  sqlite3ErrorMsg(pParse,
    +        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
    +        "within triggers");
    +}
    +        break;
    +      case 289: /* tridxby ::= NOT INDEXED */
    +{
    +  sqlite3ErrorMsg(pParse,
    +        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
    +        "within triggers");
    +}
    +        break;
    +      case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
    +{ yygotominor.yy473 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186); }
    +        break;
    +      case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
    +{yygotominor.yy473 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy408, yymsp[-1].minor.yy14, 0, yymsp[-7].minor.yy186);}
    +        break;
    +      case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
    +{yygotominor.yy473 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy408, 0, yymsp[0].minor.yy3, yymsp[-4].minor.yy186);}
    +        break;
    +      case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
    +{yygotominor.yy473 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy132);}
    +        break;
    +      case 294: /* trigger_cmd ::= select */
    +{yygotominor.yy473 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy3); }
    +        break;
    +      case 295: /* expr ::= RAISE LP IGNORE RP */
    +{
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); 
    +  if( yygotominor.yy346.pExpr ){
    +    yygotominor.yy346.pExpr->affinity = OE_Ignore;
    +  }
    +  yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;
    +  yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +}
    +        break;
    +      case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */
    +{
    +  yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); 
    +  if( yygotominor.yy346.pExpr ) {
    +    yygotominor.yy346.pExpr->affinity = (char)yymsp[-3].minor.yy328;
    +  }
    +  yygotominor.yy346.zStart = yymsp[-5].minor.yy0.z;
    +  yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
    +}
    +        break;
    +      case 297: /* raisetype ::= ROLLBACK */
    +{yygotominor.yy328 = OE_Rollback;}
    +        break;
    +      case 299: /* raisetype ::= FAIL */
    +{yygotominor.yy328 = OE_Fail;}
    +        break;
    +      case 300: /* cmd ::= DROP TRIGGER ifexists fullname */
    +{
    +  sqlite3DropTrigger(pParse,yymsp[0].minor.yy65,yymsp[-1].minor.yy328);
    +}
    +        break;
    +      case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
    +{
    +  sqlite3Attach(pParse, yymsp[-3].minor.yy346.pExpr, yymsp[-1].minor.yy346.pExpr, yymsp[0].minor.yy132);
    +}
    +        break;
    +      case 302: /* cmd ::= DETACH database_kw_opt expr */
    +{
    +  sqlite3Detach(pParse, yymsp[0].minor.yy346.pExpr);
    +}
    +        break;
    +      case 307: /* cmd ::= REINDEX */
    +{sqlite3Reindex(pParse, 0, 0);}
    +        break;
    +      case 308: /* cmd ::= REINDEX nm dbnm */
    +{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
    +        break;
    +      case 309: /* cmd ::= ANALYZE */
    +{sqlite3Analyze(pParse, 0, 0);}
    +        break;
    +      case 310: /* cmd ::= ANALYZE nm dbnm */
    +{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
    +        break;
    +      case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
    +{
    +  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy65,&yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
    +{
    +  sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 313: /* add_column_fullname ::= fullname */
    +{
    +  pParse->db->lookaside.bEnabled = 0;
    +  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy65);
    +}
    +        break;
    +      case 316: /* cmd ::= create_vtab */
    +{sqlite3VtabFinishParse(pParse,0);}
    +        break;
    +      case 317: /* cmd ::= create_vtab LP vtabarglist RP */
    +{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
    +        break;
    +      case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
    +{
    +    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
    +}
    +        break;
    +      case 321: /* vtabarg ::= */
    +{sqlite3VtabArgInit(pParse);}
    +        break;
    +      case 323: /* vtabargtoken ::= ANY */
    +      case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324);
    +      case 325: /* lp ::= LP */ yytestcase(yyruleno==325);
    +{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
    +        break;
    +      default:
    +      /* (0) input ::= cmdlist */ yytestcase(yyruleno==0);
    +      /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1);
    +      /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2);
    +      /* (3) ecmd ::= SEMI */ yytestcase(yyruleno==3);
    +      /* (4) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==4);
    +      /* (10) trans_opt ::= */ yytestcase(yyruleno==10);
    +      /* (11) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==11);
    +      /* (12) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==12);
    +      /* (20) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==20);
    +      /* (21) savepoint_opt ::= */ yytestcase(yyruleno==21);
    +      /* (25) cmd ::= create_table create_table_args */ yytestcase(yyruleno==25);
    +      /* (34) columnlist ::= columnlist COMMA column */ yytestcase(yyruleno==34);
    +      /* (35) columnlist ::= column */ yytestcase(yyruleno==35);
    +      /* (44) type ::= */ yytestcase(yyruleno==44);
    +      /* (51) signed ::= plus_num */ yytestcase(yyruleno==51);
    +      /* (52) signed ::= minus_num */ yytestcase(yyruleno==52);
    +      /* (53) carglist ::= carglist carg */ yytestcase(yyruleno==53);
    +      /* (54) carglist ::= */ yytestcase(yyruleno==54);
    +      /* (55) carg ::= CONSTRAINT nm ccons */ yytestcase(yyruleno==55);
    +      /* (56) carg ::= ccons */ yytestcase(yyruleno==56);
    +      /* (62) ccons ::= NULL onconf */ yytestcase(yyruleno==62);
    +      /* (89) conslist ::= conslist COMMA tcons */ yytestcase(yyruleno==89);
    +      /* (90) conslist ::= conslist tcons */ yytestcase(yyruleno==90);
    +      /* (91) conslist ::= tcons */ yytestcase(yyruleno==91);
    +      /* (92) tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==92);
    +      /* (268) plus_opt ::= PLUS */ yytestcase(yyruleno==268);
    +      /* (269) plus_opt ::= */ yytestcase(yyruleno==269);
    +      /* (279) foreach_clause ::= */ yytestcase(yyruleno==279);
    +      /* (280) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==280);
    +      /* (287) tridxby ::= */ yytestcase(yyruleno==287);
    +      /* (305) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==305);
    +      /* (306) database_kw_opt ::= */ yytestcase(yyruleno==306);
    +      /* (314) kwcolumn_opt ::= */ yytestcase(yyruleno==314);
    +      /* (315) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==315);
    +      /* (319) vtabarglist ::= vtabarg */ yytestcase(yyruleno==319);
    +      /* (320) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==320);
    +      /* (322) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==322);
    +      /* (326) anylist ::= */ yytestcase(yyruleno==326);
    +      /* (327) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==327);
    +      /* (328) anylist ::= anylist ANY */ yytestcase(yyruleno==328);
    +        break;
    +  };
    +  yygoto = yyRuleInfo[yyruleno].lhs;
    +  yysize = yyRuleInfo[yyruleno].nrhs;
    +  yypParser->yyidx -= yysize;
    +  yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
    +  if( yyact < YYNSTATE ){
    +#ifdef NDEBUG
    +    /* If we are not debugging and the reduce action popped at least
    +    ** one element off the stack, then we can push the new element back
    +    ** onto the stack here, and skip the stack overflow test in yy_shift().
    +    ** That gives a significant speed improvement. */
    +    if( yysize ){
    +      yypParser->yyidx++;
    +      yymsp -= yysize-1;
    +      yymsp->stateno = (YYACTIONTYPE)yyact;
    +      yymsp->major = (YYCODETYPE)yygoto;
    +      yymsp->minor = yygotominor;
    +    }else
    +#endif
    +    {
    +      yy_shift(yypParser,yyact,yygoto,&yygotominor);
    +    }
    +  }else{
    +    assert( yyact == YYNSTATE + YYNRULE + 1 );
    +    yy_accept(yypParser);
    +  }
    +}
    +
    +/*
    +** The following code executes when the parse fails
    +*/
    +#ifndef YYNOERRORRECOVERY
    +static void yy_parse_failed(
    +  yyParser *yypParser           /* The parser */
    +){
    +  sqlite3ParserARG_FETCH;
    +#ifndef NDEBUG
    +  if( yyTraceFILE ){
    +    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
    +  }
    +#endif
    +  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
    +  /* Here code is inserted which will be executed whenever the
    +  ** parser fails */
    +  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
    +}
    +#endif /* YYNOERRORRECOVERY */
    +
    +/*
    +** The following code executes when a syntax error first occurs.
    +*/
    +static void yy_syntax_error(
    +  yyParser *yypParser,           /* The parser */
    +  int yymajor,                   /* The major type of the error token */
    +  YYMINORTYPE yyminor            /* The minor type of the error token */
    +){
    +  sqlite3ParserARG_FETCH;
    +#define TOKEN (yyminor.yy0)
    +
    +  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
    +  assert( TOKEN.z[0] );  /* The tokenizer always gives us a token */
    +  sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
    +  pParse->parseError = 1;
    +  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
    +}
    +
    +/*
    +** The following is executed when the parser accepts
    +*/
    +static void yy_accept(
    +  yyParser *yypParser           /* The parser */
    +){
    +  sqlite3ParserARG_FETCH;
    +#ifndef NDEBUG
    +  if( yyTraceFILE ){
    +    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
    +  }
    +#endif
    +  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
    +  /* Here code is inserted which will be executed whenever the
    +  ** parser accepts */
    +  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
    +}
    +
    +/* The main parser program.
    +** The first argument is a pointer to a structure obtained from
    +** "sqlite3ParserAlloc" which describes the current state of the parser.
    +** The second argument is the major token number.  The third is
    +** the minor token.  The fourth optional argument is whatever the
    +** user wants (and specified in the grammar) and is available for
    +** use by the action routines.
    +**
    +** Inputs:
    +** <ul>
    +** <li> A pointer to the parser (an opaque structure.)
    +** <li> The major token number.
    +** <li> The minor token number.
    +** <li> An option argument of a grammar-specified type.
    +** </ul>
    +**
    +** Outputs:
    +** None.
    +*/
    +SQLITE_PRIVATE void sqlite3Parser(
    +  void *yyp,                   /* The parser */
    +  int yymajor,                 /* The major token code number */
    +  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
    +  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
    +){
    +  YYMINORTYPE yyminorunion;
    +  int yyact;            /* The parser action. */
    +  int yyendofinput;     /* True if we are at the end of input */
    +#ifdef YYERRORSYMBOL
    +  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
    +#endif
    +  yyParser *yypParser;  /* The parser */
    +
    +  /* (re)initialize the parser, if necessary */
    +  yypParser = (yyParser*)yyp;
    +  if( yypParser->yyidx<0 ){
    +#if YYSTACKDEPTH<=0
    +    if( yypParser->yystksz <=0 ){
    +      /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
    +      yyminorunion = yyzerominor;
    +      yyStackOverflow(yypParser, &yyminorunion);
    +      return;
    +    }
    +#endif
    +    yypParser->yyidx = 0;
    +    yypParser->yyerrcnt = -1;
    +    yypParser->yystack[0].stateno = 0;
    +    yypParser->yystack[0].major = 0;
    +  }
    +  yyminorunion.yy0 = yyminor;
    +  yyendofinput = (yymajor==0);
    +  sqlite3ParserARG_STORE;
    +
    +#ifndef NDEBUG
    +  if( yyTraceFILE ){
    +    fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
    +  }
    +#endif
    +
    +  do{
    +    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    +    if( yyact<YYNSTATE ){
    +      assert( !yyendofinput );  /* Impossible to shift the $ token */
    +      yy_shift(yypParser,yyact,yymajor,&yyminorunion);
    +      yypParser->yyerrcnt--;
    +      yymajor = YYNOCODE;
    +    }else if( yyact < YYNSTATE + YYNRULE ){
    +      yy_reduce(yypParser,yyact-YYNSTATE);
    +    }else{
    +      assert( yyact == YY_ERROR_ACTION );
    +#ifdef YYERRORSYMBOL
    +      int yymx;
    +#endif
    +#ifndef NDEBUG
    +      if( yyTraceFILE ){
    +        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
    +      }
    +#endif
    +#ifdef YYERRORSYMBOL
    +      /* A syntax error has occurred.
    +      ** The response to an error depends upon whether or not the
    +      ** grammar defines an error token "ERROR".  
    +      **
    +      ** This is what we do if the grammar does define ERROR:
    +      **
    +      **  * Call the %syntax_error function.
    +      **
    +      **  * Begin popping the stack until we enter a state where
    +      **    it is legal to shift the error symbol, then shift
    +      **    the error symbol.
    +      **
    +      **  * Set the error count to three.
    +      **
    +      **  * Begin accepting and shifting new tokens.  No new error
    +      **    processing will occur until three tokens have been
    +      **    shifted successfully.
    +      **
    +      */
    +      if( yypParser->yyerrcnt<0 ){
    +        yy_syntax_error(yypParser,yymajor,yyminorunion);
    +      }
    +      yymx = yypParser->yystack[yypParser->yyidx].major;
    +      if( yymx==YYERRORSYMBOL || yyerrorhit ){
    +#ifndef NDEBUG
    +        if( yyTraceFILE ){
    +          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
    +             yyTracePrompt,yyTokenName[yymajor]);
    +        }
    +#endif
    +        yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
    +        yymajor = YYNOCODE;
    +      }else{
    +         while(
    +          yypParser->yyidx >= 0 &&
    +          yymx != YYERRORSYMBOL &&
    +          (yyact = yy_find_reduce_action(
    +                        yypParser->yystack[yypParser->yyidx].stateno,
    +                        YYERRORSYMBOL)) >= YYNSTATE
    +        ){
    +          yy_pop_parser_stack(yypParser);
    +        }
    +        if( yypParser->yyidx < 0 || yymajor==0 ){
    +          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
    +          yy_parse_failed(yypParser);
    +          yymajor = YYNOCODE;
    +        }else if( yymx!=YYERRORSYMBOL ){
    +          YYMINORTYPE u2;
    +          u2.YYERRSYMDT = 0;
    +          yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
    +        }
    +      }
    +      yypParser->yyerrcnt = 3;
    +      yyerrorhit = 1;
    +#elif defined(YYNOERRORRECOVERY)
    +      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
    +      ** do any kind of error recovery.  Instead, simply invoke the syntax
    +      ** error routine and continue going as if nothing had happened.
    +      **
    +      ** Applications can set this macro (for example inside %include) if
    +      ** they intend to abandon the parse upon the first syntax error seen.
    +      */
    +      yy_syntax_error(yypParser,yymajor,yyminorunion);
    +      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
    +      yymajor = YYNOCODE;
    +      
    +#else  /* YYERRORSYMBOL is not defined */
    +      /* This is what we do if the grammar does not define ERROR:
    +      **
    +      **  * Report an error message, and throw away the input token.
    +      **
    +      **  * If the input token is $, then fail the parse.
    +      **
    +      ** As before, subsequent error messages are suppressed until
    +      ** three input tokens have been successfully shifted.
    +      */
    +      if( yypParser->yyerrcnt<=0 ){
    +        yy_syntax_error(yypParser,yymajor,yyminorunion);
    +      }
    +      yypParser->yyerrcnt = 3;
    +      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
    +      if( yyendofinput ){
    +        yy_parse_failed(yypParser);
    +      }
    +      yymajor = YYNOCODE;
    +#endif
    +    }
    +  }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
    +  return;
    +}
    +
    +/************** End of parse.c ***********************************************/
    +/************** Begin file tokenize.c ****************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** An tokenizer for SQL
    +**
    +** This file contains C code that splits an SQL input string up into
    +** individual tokens and sends those tokens one-by-one over to the
    +** parser for analysis.
    +**
    +** $Id: tokenize.c,v 1.163 2009/07/03 22:54:37 drh Exp $
    +*/
    +
    +/*
    +** The charMap() macro maps alphabetic characters into their
    +** lower-case ASCII equivalent.  On ASCII machines, this is just
    +** an upper-to-lower case map.  On EBCDIC machines we also need
    +** to adjust the encoding.  Only alphabetic characters and underscores
    +** need to be translated.
    +*/
    +#ifdef SQLITE_ASCII
    +# define charMap(X) sqlite3UpperToLower[(unsigned char)X]
    +#endif
    +#ifdef SQLITE_EBCDIC
    +# define charMap(X) ebcdicToAscii[(unsigned char)X]
    +const unsigned char ebcdicToAscii[] = {
    +/* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 0x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 1x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 2x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 3x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 4x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 5x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 95,  0,  0,  /* 6x */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 7x */
    +   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* 8x */
    +   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* 9x */
    +   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ax */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Bx */
    +   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* Cx */
    +   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* Dx */
    +   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ex */
    +   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Fx */
    +};
    +#endif
    +
    +/*
    +** The sqlite3KeywordCode function looks up an identifier to determine if
    +** it is a keyword.  If it is a keyword, the token code of that keyword is 
    +** returned.  If the input is not a keyword, TK_ID is returned.
    +**
    +** The implementation of this routine was generated by a program,
    +** mkkeywordhash.h, located in the tool subdirectory of the distribution.
    +** The output of the mkkeywordhash.c program is written into a file
    +** named keywordhash.h and then included into this source file by
    +** the #include below.
    +*/
    +/************** Include keywordhash.h in the middle of tokenize.c ************/
    +/************** Begin file keywordhash.h *************************************/
    +/***** This file contains automatically generated code ******
    +**
    +** The code in this file has been automatically generated by
    +**
    +**   sqlite/tool/mkkeywordhash.c
    +**
    +** The code in this file implements a function that determines whether
    +** or not a given identifier is really an SQL keyword.  The same thing
    +** might be implemented more directly using a hand-written hash table.
    +** But by using this automatically generated code, the size of the code
    +** is substantially reduced.  This is important for embedded applications
    +** on platforms with limited memory.
    +*/
    +/* Hash score: 175 */
    +static int keywordCode(const char *z, int n){
    +  /* zText[] encodes 811 bytes of keywords in 541 bytes */
    +  /*   REINDEXEDESCAPEACHECKEYBEFOREIGNOREGEXPLAINSTEADDATABASELECT       */
    +  /*   ABLEFTHENDEFERRABLELSEXCEPTRANSACTIONATURALTERAISEXCLUSIVE         */
    +  /*   XISTSAVEPOINTERSECTRIGGEREFERENCESCONSTRAINTOFFSETEMPORARY         */
    +  /*   UNIQUERYATTACHAVINGROUPDATEBEGINNERELEASEBETWEENOTNULLIKE          */
    +  /*   CASCADELETECASECOLLATECREATECURRENT_DATEDETACHIMMEDIATEJOIN        */
    +  /*   SERTMATCHPLANALYZEPRAGMABORTVALUESVIRTUALIMITWHENWHERENAME         */
    +  /*   AFTEREPLACEANDEFAULTAUTOINCREMENTCASTCOLUMNCOMMITCONFLICTCROSS     */
    +  /*   CURRENT_TIMESTAMPRIMARYDEFERREDISTINCTDROPFAILFROMFULLGLOBYIF      */
    +  /*   ISNULLORDERESTRICTOUTERIGHTROLLBACKROWUNIONUSINGVACUUMVIEW         */
    +  /*   INITIALLY                                                          */
    +  static const char zText[540] = {
    +    'R','E','I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H',
    +    'E','C','K','E','Y','B','E','F','O','R','E','I','G','N','O','R','E','G',
    +    'E','X','P','L','A','I','N','S','T','E','A','D','D','A','T','A','B','A',
    +    'S','E','L','E','C','T','A','B','L','E','F','T','H','E','N','D','E','F',
    +    'E','R','R','A','B','L','E','L','S','E','X','C','E','P','T','R','A','N',
    +    'S','A','C','T','I','O','N','A','T','U','R','A','L','T','E','R','A','I',
    +    'S','E','X','C','L','U','S','I','V','E','X','I','S','T','S','A','V','E',
    +    'P','O','I','N','T','E','R','S','E','C','T','R','I','G','G','E','R','E',
    +    'F','E','R','E','N','C','E','S','C','O','N','S','T','R','A','I','N','T',
    +    'O','F','F','S','E','T','E','M','P','O','R','A','R','Y','U','N','I','Q',
    +    'U','E','R','Y','A','T','T','A','C','H','A','V','I','N','G','R','O','U',
    +    'P','D','A','T','E','B','E','G','I','N','N','E','R','E','L','E','A','S',
    +    'E','B','E','T','W','E','E','N','O','T','N','U','L','L','I','K','E','C',
    +    'A','S','C','A','D','E','L','E','T','E','C','A','S','E','C','O','L','L',
    +    'A','T','E','C','R','E','A','T','E','C','U','R','R','E','N','T','_','D',
    +    'A','T','E','D','E','T','A','C','H','I','M','M','E','D','I','A','T','E',
    +    'J','O','I','N','S','E','R','T','M','A','T','C','H','P','L','A','N','A',
    +    'L','Y','Z','E','P','R','A','G','M','A','B','O','R','T','V','A','L','U',
    +    'E','S','V','I','R','T','U','A','L','I','M','I','T','W','H','E','N','W',
    +    'H','E','R','E','N','A','M','E','A','F','T','E','R','E','P','L','A','C',
    +    'E','A','N','D','E','F','A','U','L','T','A','U','T','O','I','N','C','R',
    +    'E','M','E','N','T','C','A','S','T','C','O','L','U','M','N','C','O','M',
    +    'M','I','T','C','O','N','F','L','I','C','T','C','R','O','S','S','C','U',
    +    'R','R','E','N','T','_','T','I','M','E','S','T','A','M','P','R','I','M',
    +    'A','R','Y','D','E','F','E','R','R','E','D','I','S','T','I','N','C','T',
    +    'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','G','L',
    +    'O','B','Y','I','F','I','S','N','U','L','L','O','R','D','E','R','E','S',
    +    'T','R','I','C','T','O','U','T','E','R','I','G','H','T','R','O','L','L',
    +    'B','A','C','K','R','O','W','U','N','I','O','N','U','S','I','N','G','V',
    +    'A','C','U','U','M','V','I','E','W','I','N','I','T','I','A','L','L','Y',
    +  };
    +  static const unsigned char aHash[127] = {
    +      72, 101, 114,  70,   0,  45,   0,   0,  78,   0,  73,   0,   0,
    +      42,  12,  74,  15,   0, 113,  81,  50, 108,   0,  19,   0,   0,
    +     118,   0, 116, 111,   0,  22,  89,   0,   9,   0,   0,  66,  67,
    +       0,  65,   6,   0,  48,  86,  98,   0, 115,  97,   0,   0,  44,
    +       0,  99,  24,   0,  17,   0, 119,  49,  23,   0,   5, 106,  25,
    +      92,   0,   0, 121, 102,  56, 120,  53,  28,  51,   0,  87,   0,
    +      96,  26,   0,  95,   0,   0,   0,  91,  88,  93,  84, 105,  14,
    +      39, 104,   0,  77,   0,  18,  85, 107,  32,   0, 117,  76, 109,
    +      58,  46,  80,   0,   0,  90,  40,   0, 112,   0,  36,   0,   0,
    +      29,   0,  82,  59,  60,   0,  20,  57,   0,  52,
    +  };
    +  static const unsigned char aNext[121] = {
    +       0,   0,   0,   0,   4,   0,   0,   0,   0,   0,   0,   0,   0,
    +       0,   2,   0,   0,   0,   0,   0,   0,  13,   0,   0,   0,   0,
    +       0,   7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
    +       0,   0,   0,   0,  33,   0,  21,   0,   0,   0,  43,   3,  47,
    +       0,   0,   0,   0,  30,   0,  54,   0,  38,   0,   0,   0,   1,
    +      62,   0,   0,  63,   0,  41,   0,   0,   0,   0,   0,   0,   0,
    +      61,   0,   0,   0,   0,  31,  55,  16,  34,  10,   0,   0,   0,
    +       0,   0,   0,   0,  11,  68,  75,   0,   8,   0, 100,  94,   0,
    +     103,   0,  83,   0,  71,   0,   0, 110,  27,  37,  69,  79,   0,
    +      35,  64,   0,   0,
    +  };
    +  static const unsigned char aLen[121] = {
    +       7,   7,   5,   4,   6,   4,   5,   3,   6,   7,   3,   6,   6,
    +       7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   6,
    +      11,   6,   2,   7,   5,   5,   9,   6,   9,   9,   7,  10,  10,
    +       4,   6,   2,   3,   9,   4,   2,   6,   5,   6,   6,   5,   6,
    +       5,   5,   7,   7,   7,   3,   2,   4,   4,   7,   3,   6,   4,
    +       7,   6,  12,   6,   9,   4,   6,   5,   4,   7,   6,   5,   6,
    +       7,   5,   4,   5,   6,   5,   7,   3,   7,  13,   2,   2,   4,
    +       6,   6,   8,   5,  17,  12,   7,   8,   8,   2,   4,   4,   4,
    +       4,   4,   2,   2,   6,   5,   8,   5,   5,   8,   3,   5,   5,
    +       6,   4,   9,   3,
    +  };
    +  static const unsigned short int aOffset[121] = {
    +       0,   2,   2,   8,   9,  14,  16,  20,  23,  25,  25,  29,  33,
    +      36,  41,  46,  48,  53,  54,  59,  62,  65,  67,  69,  78,  81,
    +      86,  91,  95,  96, 101, 105, 109, 117, 122, 128, 136, 142, 152,
    +     159, 162, 162, 165, 167, 167, 171, 176, 179, 184, 189, 194, 197,
    +     203, 206, 210, 217, 223, 223, 223, 226, 229, 233, 234, 238, 244,
    +     248, 255, 261, 273, 279, 288, 290, 296, 301, 303, 310, 315, 320,
    +     326, 332, 337, 341, 344, 350, 354, 361, 363, 370, 372, 374, 383,
    +     387, 393, 399, 407, 412, 412, 428, 435, 442, 443, 450, 454, 458,
    +     462, 466, 469, 471, 473, 479, 483, 491, 495, 500, 508, 511, 516,
    +     521, 527, 531, 536,
    +  };
    +  static const unsigned char aCode[121] = {
    +    TK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
    +    TK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOREIGN,    
    +    TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,    
    +    TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,      
    +    TK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,       
    +    TK_EXCEPT,     TK_TRANSACTION,TK_ACTION,     TK_ON,         TK_JOIN_KW,    
    +    TK_ALTER,      TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  
    +    TK_INTERSECT,  TK_TRIGGER,    TK_REFERENCES, TK_CONSTRAINT, TK_INTO,       
    +    TK_OFFSET,     TK_OF,         TK_SET,        TK_TEMP,       TK_TEMP,       
    +    TK_OR,         TK_UNIQUE,     TK_QUERY,      TK_ATTACH,     TK_HAVING,     
    +    TK_GROUP,      TK_UPDATE,     TK_BEGIN,      TK_JOIN_KW,    TK_RELEASE,    
    +    TK_BETWEEN,    TK_NOTNULL,    TK_NOT,        TK_NO,         TK_NULL,       
    +    TK_LIKE_KW,    TK_CASCADE,    TK_ASC,        TK_DELETE,     TK_CASE,       
    +    TK_COLLATE,    TK_CREATE,     TK_CTIME_KW,   TK_DETACH,     TK_IMMEDIATE,  
    +    TK_JOIN,       TK_INSERT,     TK_MATCH,      TK_PLAN,       TK_ANALYZE,    
    +    TK_PRAGMA,     TK_ABORT,      TK_VALUES,     TK_VIRTUAL,    TK_LIMIT,      
    +    TK_WHEN,       TK_WHERE,      TK_RENAME,     TK_AFTER,      TK_REPLACE,    
    +    TK_AND,        TK_DEFAULT,    TK_AUTOINCR,   TK_TO,         TK_IN,         
    +    TK_CAST,       TK_COLUMNKW,   TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    
    +    TK_CTIME_KW,   TK_CTIME_KW,   TK_PRIMARY,    TK_DEFERRED,   TK_DISTINCT,   
    +    TK_IS,         TK_DROP,       TK_FAIL,       TK_FROM,       TK_JOIN_KW,    
    +    TK_LIKE_KW,    TK_BY,         TK_IF,         TK_ISNULL,     TK_ORDER,      
    +    TK_RESTRICT,   TK_JOIN_KW,    TK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        
    +    TK_UNION,      TK_USING,      TK_VACUUM,     TK_VIEW,       TK_INITIALLY,  
    +    TK_ALL,        
    +  };
    +  int h, i;
    +  if( n<2 ) return TK_ID;
    +  h = ((charMap(z[0])*4) ^
    +      (charMap(z[n-1])*3) ^
    +      n) % 127;
    +  for(i=((int)aHash[h])-1; i>=0; i=((int)aNext[i])-1){
    +    if( aLen[i]==n && sqlite3StrNICmp(&zText[aOffset[i]],z,n)==0 ){
    +      testcase( i==0 ); /* REINDEX */
    +      testcase( i==1 ); /* INDEXED */
    +      testcase( i==2 ); /* INDEX */
    +      testcase( i==3 ); /* DESC */
    +      testcase( i==4 ); /* ESCAPE */
    +      testcase( i==5 ); /* EACH */
    +      testcase( i==6 ); /* CHECK */
    +      testcase( i==7 ); /* KEY */
    +      testcase( i==8 ); /* BEFORE */
    +      testcase( i==9 ); /* FOREIGN */
    +      testcase( i==10 ); /* FOR */
    +      testcase( i==11 ); /* IGNORE */
    +      testcase( i==12 ); /* REGEXP */
    +      testcase( i==13 ); /* EXPLAIN */
    +      testcase( i==14 ); /* INSTEAD */
    +      testcase( i==15 ); /* ADD */
    +      testcase( i==16 ); /* DATABASE */
    +      testcase( i==17 ); /* AS */
    +      testcase( i==18 ); /* SELECT */
    +      testcase( i==19 ); /* TABLE */
    +      testcase( i==20 ); /* LEFT */
    +      testcase( i==21 ); /* THEN */
    +      testcase( i==22 ); /* END */
    +      testcase( i==23 ); /* DEFERRABLE */
    +      testcase( i==24 ); /* ELSE */
    +      testcase( i==25 ); /* EXCEPT */
    +      testcase( i==26 ); /* TRANSACTION */
    +      testcase( i==27 ); /* ACTION */
    +      testcase( i==28 ); /* ON */
    +      testcase( i==29 ); /* NATURAL */
    +      testcase( i==30 ); /* ALTER */
    +      testcase( i==31 ); /* RAISE */
    +      testcase( i==32 ); /* EXCLUSIVE */
    +      testcase( i==33 ); /* EXISTS */
    +      testcase( i==34 ); /* SAVEPOINT */
    +      testcase( i==35 ); /* INTERSECT */
    +      testcase( i==36 ); /* TRIGGER */
    +      testcase( i==37 ); /* REFERENCES */
    +      testcase( i==38 ); /* CONSTRAINT */
    +      testcase( i==39 ); /* INTO */
    +      testcase( i==40 ); /* OFFSET */
    +      testcase( i==41 ); /* OF */
    +      testcase( i==42 ); /* SET */
    +      testcase( i==43 ); /* TEMPORARY */
    +      testcase( i==44 ); /* TEMP */
    +      testcase( i==45 ); /* OR */
    +      testcase( i==46 ); /* UNIQUE */
    +      testcase( i==47 ); /* QUERY */
    +      testcase( i==48 ); /* ATTACH */
    +      testcase( i==49 ); /* HAVING */
    +      testcase( i==50 ); /* GROUP */
    +      testcase( i==51 ); /* UPDATE */
    +      testcase( i==52 ); /* BEGIN */
    +      testcase( i==53 ); /* INNER */
    +      testcase( i==54 ); /* RELEASE */
    +      testcase( i==55 ); /* BETWEEN */
    +      testcase( i==56 ); /* NOTNULL */
    +      testcase( i==57 ); /* NOT */
    +      testcase( i==58 ); /* NO */
    +      testcase( i==59 ); /* NULL */
    +      testcase( i==60 ); /* LIKE */
    +      testcase( i==61 ); /* CASCADE */
    +      testcase( i==62 ); /* ASC */
    +      testcase( i==63 ); /* DELETE */
    +      testcase( i==64 ); /* CASE */
    +      testcase( i==65 ); /* COLLATE */
    +      testcase( i==66 ); /* CREATE */
    +      testcase( i==67 ); /* CURRENT_DATE */
    +      testcase( i==68 ); /* DETACH */
    +      testcase( i==69 ); /* IMMEDIATE */
    +      testcase( i==70 ); /* JOIN */
    +      testcase( i==71 ); /* INSERT */
    +      testcase( i==72 ); /* MATCH */
    +      testcase( i==73 ); /* PLAN */
    +      testcase( i==74 ); /* ANALYZE */
    +      testcase( i==75 ); /* PRAGMA */
    +      testcase( i==76 ); /* ABORT */
    +      testcase( i==77 ); /* VALUES */
    +      testcase( i==78 ); /* VIRTUAL */
    +      testcase( i==79 ); /* LIMIT */
    +      testcase( i==80 ); /* WHEN */
    +      testcase( i==81 ); /* WHERE */
    +      testcase( i==82 ); /* RENAME */
    +      testcase( i==83 ); /* AFTER */
    +      testcase( i==84 ); /* REPLACE */
    +      testcase( i==85 ); /* AND */
    +      testcase( i==86 ); /* DEFAULT */
    +      testcase( i==87 ); /* AUTOINCREMENT */
    +      testcase( i==88 ); /* TO */
    +      testcase( i==89 ); /* IN */
    +      testcase( i==90 ); /* CAST */
    +      testcase( i==91 ); /* COLUMN */
    +      testcase( i==92 ); /* COMMIT */
    +      testcase( i==93 ); /* CONFLICT */
    +      testcase( i==94 ); /* CROSS */
    +      testcase( i==95 ); /* CURRENT_TIMESTAMP */
    +      testcase( i==96 ); /* CURRENT_TIME */
    +      testcase( i==97 ); /* PRIMARY */
    +      testcase( i==98 ); /* DEFERRED */
    +      testcase( i==99 ); /* DISTINCT */
    +      testcase( i==100 ); /* IS */
    +      testcase( i==101 ); /* DROP */
    +      testcase( i==102 ); /* FAIL */
    +      testcase( i==103 ); /* FROM */
    +      testcase( i==104 ); /* FULL */
    +      testcase( i==105 ); /* GLOB */
    +      testcase( i==106 ); /* BY */
    +      testcase( i==107 ); /* IF */
    +      testcase( i==108 ); /* ISNULL */
    +      testcase( i==109 ); /* ORDER */
    +      testcase( i==110 ); /* RESTRICT */
    +      testcase( i==111 ); /* OUTER */
    +      testcase( i==112 ); /* RIGHT */
    +      testcase( i==113 ); /* ROLLBACK */
    +      testcase( i==114 ); /* ROW */
    +      testcase( i==115 ); /* UNION */
    +      testcase( i==116 ); /* USING */
    +      testcase( i==117 ); /* VACUUM */
    +      testcase( i==118 ); /* VIEW */
    +      testcase( i==119 ); /* INITIALLY */
    +      testcase( i==120 ); /* ALL */
    +      return aCode[i];
    +    }
    +  }
    +  return TK_ID;
    +}
    +SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){
    +  return keywordCode((char*)z, n);
    +}
    +
    +/************** End of keywordhash.h *****************************************/
    +/************** Continuing where we left off in tokenize.c *******************/
    +
    +
    +/*
    +** If X is a character that can be used in an identifier then
    +** IdChar(X) will be true.  Otherwise it is false.
    +**
    +** For ASCII, any character with the high-order bit set is
    +** allowed in an identifier.  For 7-bit characters, 
    +** sqlite3IsIdChar[X] must be 1.
    +**
    +** For EBCDIC, the rules are more complex but have the same
    +** end result.
    +**
    +** Ticket #1066.  the SQL standard does not allow '$' in the
    +** middle of identfiers.  But many SQL implementations do. 
    +** SQLite will allow '$' in identifiers for compatibility.
    +** But the feature is undocumented.
    +*/
    +#ifdef SQLITE_ASCII
    +SQLITE_PRIVATE const char sqlite3IsAsciiIdChar[] = {
    +/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
    +    0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 2x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */
    +};
    +#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
    +#endif
    +#ifdef SQLITE_EBCDIC
    +SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[] = {
    +/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
    +    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 4x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0,  /* 5x */
    +    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,  /* 6x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,  /* 7x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0,  /* 8x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0,  /* 9x */
    +    1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0,  /* Ax */
    +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* Bx */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Cx */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Dx */
    +    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Ex */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,  /* Fx */
    +};
    +#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
    +#endif
    +
    +
    +/*
    +** Return the length of the token that begins at z[0]. 
    +** Store the token type in *tokenType before returning.
    +*/
    +SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){
    +  int i, c;
    +  switch( *z ){
    +    case ' ': case '\t': case '\n': case '\f': case '\r': {
    +      testcase( z[0]==' ' );
    +      testcase( z[0]=='\t' );
    +      testcase( z[0]=='\n' );
    +      testcase( z[0]=='\f' );
    +      testcase( z[0]=='\r' );
    +      for(i=1; sqlite3Isspace(z[i]); i++){}
    +      *tokenType = TK_SPACE;
    +      return i;
    +    }
    +    case '-': {
    +      if( z[1]=='-' ){
    +        for(i=2; (c=z[i])!=0 && c!='\n'; i++){}
    +        *tokenType = TK_SPACE;
    +        return i;
    +      }
    +      *tokenType = TK_MINUS;
    +      return 1;
    +    }
    +    case '(': {
    +      *tokenType = TK_LP;
    +      return 1;
    +    }
    +    case ')': {
    +      *tokenType = TK_RP;
    +      return 1;
    +    }
    +    case ';': {
    +      *tokenType = TK_SEMI;
    +      return 1;
    +    }
    +    case '+': {
    +      *tokenType = TK_PLUS;
    +      return 1;
    +    }
    +    case '*': {
    +      *tokenType = TK_STAR;
    +      return 1;
    +    }
    +    case '/': {
    +      if( z[1]!='*' || z[2]==0 ){
    +        *tokenType = TK_SLASH;
    +        return 1;
    +      }
    +      for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}
    +      if( c ) i++;
    +      *tokenType = TK_SPACE;
    +      return i;
    +    }
    +    case '%': {
    +      *tokenType = TK_REM;
    +      return 1;
    +    }
    +    case '=': {
    +      *tokenType = TK_EQ;
    +      return 1 + (z[1]=='=');
    +    }
    +    case '<': {
    +      if( (c=z[1])=='=' ){
    +        *tokenType = TK_LE;
    +        return 2;
    +      }else if( c=='>' ){
    +        *tokenType = TK_NE;
    +        return 2;
    +      }else if( c=='<' ){
    +        *tokenType = TK_LSHIFT;
    +        return 2;
    +      }else{
    +        *tokenType = TK_LT;
    +        return 1;
    +      }
    +    }
    +    case '>': {
    +      if( (c=z[1])=='=' ){
    +        *tokenType = TK_GE;
    +        return 2;
    +      }else if( c=='>' ){
    +        *tokenType = TK_RSHIFT;
    +        return 2;
    +      }else{
    +        *tokenType = TK_GT;
    +        return 1;
    +      }
    +    }
    +    case '!': {
    +      if( z[1]!='=' ){
    +        *tokenType = TK_ILLEGAL;
    +        return 2;
    +      }else{
    +        *tokenType = TK_NE;
    +        return 2;
    +      }
    +    }
    +    case '|': {
    +      if( z[1]!='|' ){
    +        *tokenType = TK_BITOR;
    +        return 1;
    +      }else{
    +        *tokenType = TK_CONCAT;
    +        return 2;
    +      }
    +    }
    +    case ',': {
    +      *tokenType = TK_COMMA;
    +      return 1;
    +    }
    +    case '&': {
    +      *tokenType = TK_BITAND;
    +      return 1;
    +    }
    +    case '~': {
    +      *tokenType = TK_BITNOT;
    +      return 1;
    +    }
    +    case '`':
    +    case '\'':
    +    case '"': {
    +      int delim = z[0];
    +      testcase( delim=='`' );
    +      testcase( delim=='\'' );
    +      testcase( delim=='"' );
    +      for(i=1; (c=z[i])!=0; i++){
    +        if( c==delim ){
    +          if( z[i+1]==delim ){
    +            i++;
    +          }else{
    +            break;
    +          }
    +        }
    +      }
    +      if( c=='\'' ){
    +        *tokenType = TK_STRING;
    +        return i+1;
    +      }else if( c!=0 ){
    +        *tokenType = TK_ID;
    +        return i+1;
    +      }else{
    +        *tokenType = TK_ILLEGAL;
    +        return i;
    +      }
    +    }
    +    case '.': {
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +      if( !sqlite3Isdigit(z[1]) )
    +#endif
    +      {
    +        *tokenType = TK_DOT;
    +        return 1;
    +      }
    +      /* If the next character is a digit, this is a floating point
    +      ** number that begins with ".".  Fall thru into the next case */
    +    }
    +    case '0': case '1': case '2': case '3': case '4':
    +    case '5': case '6': case '7': case '8': case '9': {
    +      testcase( z[0]=='0' );  testcase( z[0]=='1' );  testcase( z[0]=='2' );
    +      testcase( z[0]=='3' );  testcase( z[0]=='4' );  testcase( z[0]=='5' );
    +      testcase( z[0]=='6' );  testcase( z[0]=='7' );  testcase( z[0]=='8' );
    +      testcase( z[0]=='9' );
    +      *tokenType = TK_INTEGER;
    +      for(i=0; sqlite3Isdigit(z[i]); i++){}
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +      if( z[i]=='.' ){
    +        i++;
    +        while( sqlite3Isdigit(z[i]) ){ i++; }
    +        *tokenType = TK_FLOAT;
    +      }
    +      if( (z[i]=='e' || z[i]=='E') &&
    +           ( sqlite3Isdigit(z[i+1]) 
    +            || ((z[i+1]=='+' || z[i+1]=='-') && sqlite3Isdigit(z[i+2]))
    +           )
    +      ){
    +        i += 2;
    +        while( sqlite3Isdigit(z[i]) ){ i++; }
    +        *tokenType = TK_FLOAT;
    +      }
    +#endif
    +      while( IdChar(z[i]) ){
    +        *tokenType = TK_ILLEGAL;
    +        i++;
    +      }
    +      return i;
    +    }
    +    case '[': {
    +      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}
    +      *tokenType = c==']' ? TK_ID : TK_ILLEGAL;
    +      return i;
    +    }
    +    case '?': {
    +      *tokenType = TK_VARIABLE;
    +      for(i=1; sqlite3Isdigit(z[i]); i++){}
    +      return i;
    +    }
    +    case '#': {
    +      for(i=1; sqlite3Isdigit(z[i]); i++){}
    +      if( i>1 ){
    +        /* Parameters of the form #NNN (where NNN is a number) are used
    +        ** internally by sqlite3NestedParse.  */
    +        *tokenType = TK_REGISTER;
    +        return i;
    +      }
    +      /* Fall through into the next case if the '#' is not followed by
    +      ** a digit. Try to match #AAAA where AAAA is a parameter name. */
    +    }
    +#ifndef SQLITE_OMIT_TCL_VARIABLE
    +    case '$':
    +#endif
    +    case '@':  /* For compatibility with MS SQL Server */
    +    case ':': {
    +      int n = 0;
    +      testcase( z[0]=='$' );  testcase( z[0]=='@' );  testcase( z[0]==':' );
    +      *tokenType = TK_VARIABLE;
    +      for(i=1; (c=z[i])!=0; i++){
    +        if( IdChar(c) ){
    +          n++;
    +#ifndef SQLITE_OMIT_TCL_VARIABLE
    +        }else if( c=='(' && n>0 ){
    +          do{
    +            i++;
    +          }while( (c=z[i])!=0 && !sqlite3Isspace(c) && c!=')' );
    +          if( c==')' ){
    +            i++;
    +          }else{
    +            *tokenType = TK_ILLEGAL;
    +          }
    +          break;
    +        }else if( c==':' && z[i+1]==':' ){
    +          i++;
    +#endif
    +        }else{
    +          break;
    +        }
    +      }
    +      if( n==0 ) *tokenType = TK_ILLEGAL;
    +      return i;
    +    }
    +#ifndef SQLITE_OMIT_BLOB_LITERAL
    +    case 'x': case 'X': {
    +      testcase( z[0]=='x' ); testcase( z[0]=='X' );
    +      if( z[1]=='\'' ){
    +        *tokenType = TK_BLOB;
    +        for(i=2; (c=z[i])!=0 && c!='\''; i++){
    +          if( !sqlite3Isxdigit(c) ){
    +            *tokenType = TK_ILLEGAL;
    +          }
    +        }
    +        if( i%2 || !c ) *tokenType = TK_ILLEGAL;
    +        if( c ) i++;
    +        return i;
    +      }
    +      /* Otherwise fall through to the next case */
    +    }
    +#endif
    +    default: {
    +      if( !IdChar(*z) ){
    +        break;
    +      }
    +      for(i=1; IdChar(z[i]); i++){}
    +      *tokenType = keywordCode((char*)z, i);
    +      return i;
    +    }
    +  }
    +  *tokenType = TK_ILLEGAL;
    +  return 1;
    +}
    +
    +/*
    +** Run the parser on the given SQL string.  The parser structure is
    +** passed in.  An SQLITE_ status code is returned.  If an error occurs
    +** then an and attempt is made to write an error message into 
    +** memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
    +** error message.
    +*/
    +SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
    +  int nErr = 0;                   /* Number of errors encountered */
    +  int i;                          /* Loop counter */
    +  void *pEngine;                  /* The LEMON-generated LALR(1) parser */
    +  int tokenType;                  /* type of the next token */
    +  int lastTokenParsed = -1;       /* type of the previous token */
    +  u8 enableLookaside;             /* Saved value of db->lookaside.bEnabled */
    +  sqlite3 *db = pParse->db;       /* The database connection */
    +  int mxSqlLen;                   /* Max length of an SQL string */
    +
    +
    +  mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
    +  if( db->activeVdbeCnt==0 ){
    +    db->u1.isInterrupted = 0;
    +  }
    +  pParse->rc = SQLITE_OK;
    +  pParse->zTail = zSql;
    +  i = 0;
    +  assert( pzErrMsg!=0 );
    +  pEngine = sqlite3ParserAlloc((void*(*)(size_t))sqlite3Malloc);
    +  if( pEngine==0 ){
    +    db->mallocFailed = 1;
    +    return SQLITE_NOMEM;
    +  }
    +  assert( pParse->pNewTable==0 );
    +  assert( pParse->pNewTrigger==0 );
    +  assert( pParse->nVar==0 );
    +  assert( pParse->nVarExpr==0 );
    +  assert( pParse->nVarExprAlloc==0 );
    +  assert( pParse->apVarExpr==0 );
    +  enableLookaside = db->lookaside.bEnabled;
    +  if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
    +  while( !db->mallocFailed && zSql[i]!=0 ){
    +    assert( i>=0 );
    +    pParse->sLastToken.z = &zSql[i];
    +    pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
    +    i += pParse->sLastToken.n;
    +    if( i>mxSqlLen ){
    +      pParse->rc = SQLITE_TOOBIG;
    +      break;
    +    }
    +    switch( tokenType ){
    +      case TK_SPACE: {
    +        if( db->u1.isInterrupted ){
    +          sqlite3ErrorMsg(pParse, "interrupt");
    +          pParse->rc = SQLITE_INTERRUPT;
    +          goto abort_parse;
    +        }
    +        break;
    +      }
    +      case TK_ILLEGAL: {
    +        sqlite3DbFree(db, *pzErrMsg);
    +        *pzErrMsg = sqlite3MPrintf(db, "unrecognized token: \"%T\"",
    +                        &pParse->sLastToken);
    +        nErr++;
    +        goto abort_parse;
    +      }
    +      case TK_SEMI: {
    +        pParse->zTail = &zSql[i];
    +        /* Fall thru into the default case */
    +      }
    +      default: {
    +        sqlite3Parser(pEngine, tokenType, pParse->sLastToken, pParse);
    +        lastTokenParsed = tokenType;
    +        if( pParse->rc!=SQLITE_OK ){
    +          goto abort_parse;
    +        }
    +        break;
    +      }
    +    }
    +  }
    +abort_parse:
    +  if( zSql[i]==0 && nErr==0 && pParse->rc==SQLITE_OK ){
    +    if( lastTokenParsed!=TK_SEMI ){
    +      sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
    +      pParse->zTail = &zSql[i];
    +    }
    +    sqlite3Parser(pEngine, 0, pParse->sLastToken, pParse);
    +  }
    +#ifdef YYTRACKMAXSTACKDEPTH
    +  sqlite3StatusSet(SQLITE_STATUS_PARSER_STACK,
    +      sqlite3ParserStackPeak(pEngine)
    +  );
    +#endif /* YYDEBUG */
    +  sqlite3ParserFree(pEngine, sqlite3_free);
    +  db->lookaside.bEnabled = enableLookaside;
    +  if( db->mallocFailed ){
    +    pParse->rc = SQLITE_NOMEM;
    +  }
    +  if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
    +    sqlite3SetString(&pParse->zErrMsg, db, "%s", sqlite3ErrStr(pParse->rc));
    +  }
    +  assert( pzErrMsg!=0 );
    +  if( pParse->zErrMsg ){
    +    *pzErrMsg = pParse->zErrMsg;
    +    pParse->zErrMsg = 0;
    +    nErr++;
    +  }
    +  if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){
    +    sqlite3VdbeDelete(pParse->pVdbe);
    +    pParse->pVdbe = 0;
    +  }
    +#ifndef SQLITE_OMIT_SHARED_CACHE
    +  if( pParse->nested==0 ){
    +    sqlite3DbFree(db, pParse->aTableLock);
    +    pParse->aTableLock = 0;
    +    pParse->nTableLock = 0;
    +  }
    +#endif
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  sqlite3DbFree(db, pParse->apVtabLock);
    +#endif
    +
    +  if( !IN_DECLARE_VTAB ){
    +    /* If the pParse->declareVtab flag is set, do not delete any table 
    +    ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
    +    ** will take responsibility for freeing the Table structure.
    +    */
    +    sqlite3DeleteTable(pParse->pNewTable);
    +  }
    +
    +  sqlite3DeleteTrigger(db, pParse->pNewTrigger);
    +  sqlite3DbFree(db, pParse->apVarExpr);
    +  sqlite3DbFree(db, pParse->aAlias);
    +  while( pParse->pAinc ){
    +    AutoincInfo *p = pParse->pAinc;
    +    pParse->pAinc = p->pNext;
    +    sqlite3DbFree(db, p);
    +  }
    +  while( pParse->pZombieTab ){
    +    Table *p = pParse->pZombieTab;
    +    pParse->pZombieTab = p->pNextZombie;
    +    sqlite3DeleteTable(p);
    +  }
    +  if( nErr>0 && pParse->rc==SQLITE_OK ){
    +    pParse->rc = SQLITE_ERROR;
    +  }
    +  return nErr;
    +}
    +
    +/************** End of tokenize.c ********************************************/
    +/************** Begin file complete.c ****************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** An tokenizer for SQL
    +**
    +** This file contains C code that implements the sqlite3_complete() API.
    +** This code used to be part of the tokenizer.c source file.  But by
    +** separating it out, the code will be automatically omitted from
    +** static links that do not use it.
    +**
    +** $Id: complete.c,v 1.8 2009/04/28 04:46:42 drh Exp $
    +*/
    +#ifndef SQLITE_OMIT_COMPLETE
    +
    +/*
    +** This is defined in tokenize.c.  We just have to import the definition.
    +*/
    +#ifndef SQLITE_AMALGAMATION
    +#ifdef SQLITE_ASCII
    +SQLITE_PRIVATE const char sqlite3IsAsciiIdChar[];
    +#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
    +#endif
    +#ifdef SQLITE_EBCDIC
    +SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
    +#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
    +#endif
    +#endif /* SQLITE_AMALGAMATION */
    +
    +
    +/*
    +** Token types used by the sqlite3_complete() routine.  See the header
    +** comments on that procedure for additional information.
    +*/
    +#define tkSEMI    0
    +#define tkWS      1
    +#define tkOTHER   2
    +#define tkEXPLAIN 3
    +#define tkCREATE  4
    +#define tkTEMP    5
    +#define tkTRIGGER 6
    +#define tkEND     7
    +
    +/*
    +** Return TRUE if the given SQL string ends in a semicolon.
    +**
    +** Special handling is require for CREATE TRIGGER statements.
    +** Whenever the CREATE TRIGGER keywords are seen, the statement
    +** must end with ";END;".
    +**
    +** This implementation uses a state machine with 7 states:
    +**
    +**   (0) START     At the beginning or end of an SQL statement.  This routine
    +**                 returns 1 if it ends in the START state and 0 if it ends
    +**                 in any other state.
    +**
    +**   (1) NORMAL    We are in the middle of statement which ends with a single
    +**                 semicolon.
    +**
    +**   (2) EXPLAIN   The keyword EXPLAIN has been seen at the beginning of 
    +**                 a statement.
    +**
    +**   (3) CREATE    The keyword CREATE has been seen at the beginning of a
    +**                 statement, possibly preceeded by EXPLAIN and/or followed by
    +**                 TEMP or TEMPORARY
    +**
    +**   (4) TRIGGER   We are in the middle of a trigger definition that must be
    +**                 ended by a semicolon, the keyword END, and another semicolon.
    +**
    +**   (5) SEMI      We've seen the first semicolon in the ";END;" that occurs at
    +**                 the end of a trigger definition.
    +**
    +**   (6) END       We've seen the ";END" of the ";END;" that occurs at the end
    +**                 of a trigger difinition.
    +**
    +** Transitions between states above are determined by tokens extracted
    +** from the input.  The following tokens are significant:
    +**
    +**   (0) tkSEMI      A semicolon.
    +**   (1) tkWS        Whitespace
    +**   (2) tkOTHER     Any other SQL token.
    +**   (3) tkEXPLAIN   The "explain" keyword.
    +**   (4) tkCREATE    The "create" keyword.
    +**   (5) tkTEMP      The "temp" or "temporary" keyword.
    +**   (6) tkTRIGGER   The "trigger" keyword.
    +**   (7) tkEND       The "end" keyword.
    +**
    +** Whitespace never causes a state transition and is always ignored.
    +**
    +** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
    +** to recognize the end of a trigger can be omitted.  All we have to do
    +** is look for a semicolon that is not part of an string or comment.
    +*/
    +SQLITE_API int sqlite3_complete(const char *zSql){
    +  u8 state = 0;   /* Current state, using numbers defined in header comment */
    +  u8 token;       /* Value of the next token */
    +
    +#ifndef SQLITE_OMIT_TRIGGER
    +  /* A complex statement machine used to detect the end of a CREATE TRIGGER
    +  ** statement.  This is the normal case.
    +  */
    +  static const u8 trans[7][8] = {
    +                     /* Token:                                                */
    +     /* State:       **  SEMI  WS  OTHER EXPLAIN  CREATE  TEMP  TRIGGER  END  */
    +     /* 0   START: */ {    0,  0,     1,      2,      3,    1,       1,   1,  },
    +     /* 1  NORMAL: */ {    0,  1,     1,      1,      1,    1,       1,   1,  },
    +     /* 2 EXPLAIN: */ {    0,  2,     2,      1,      3,    1,       1,   1,  },
    +     /* 3  CREATE: */ {    0,  3,     1,      1,      1,    3,       4,   1,  },
    +     /* 4 TRIGGER: */ {    5,  4,     4,      4,      4,    4,       4,   4,  },
    +     /* 5    SEMI: */ {    5,  5,     4,      4,      4,    4,       4,   6,  },
    +     /* 6     END: */ {    0,  6,     4,      4,      4,    4,       4,   4,  },
    +  };
    +#else
    +  /* If triggers are not suppored by this compile then the statement machine
    +  ** used to detect the end of a statement is much simplier
    +  */
    +  static const u8 trans[2][3] = {
    +                     /* Token:           */
    +     /* State:       **  SEMI  WS  OTHER */
    +     /* 0   START: */ {    0,  0,     1, },
    +     /* 1  NORMAL: */ {    0,  1,     1, },
    +  };
    +#endif /* SQLITE_OMIT_TRIGGER */
    +
    +  while( *zSql ){
    +    switch( *zSql ){
    +      case ';': {  /* A semicolon */
    +        token = tkSEMI;
    +        break;
    +      }
    +      case ' ':
    +      case '\r':
    +      case '\t':
    +      case '\n':
    +      case '\f': {  /* White space is ignored */
    +        token = tkWS;
    +        break;
    +      }
    +      case '/': {   /* C-style comments */
    +        if( zSql[1]!='*' ){
    +          token = tkOTHER;
    +          break;
    +        }
    +        zSql += 2;
    +        while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }
    +        if( zSql[0]==0 ) return 0;
    +        zSql++;
    +        token = tkWS;
    +        break;
    +      }
    +      case '-': {   /* SQL-style comments from "--" to end of line */
    +        if( zSql[1]!='-' ){
    +          token = tkOTHER;
    +          break;
    +        }
    +        while( *zSql && *zSql!='\n' ){ zSql++; }
    +        if( *zSql==0 ) return state==0;
    +        token = tkWS;
    +        break;
    +      }
    +      case '[': {   /* Microsoft-style identifiers in [...] */
    +        zSql++;
    +        while( *zSql && *zSql!=']' ){ zSql++; }
    +        if( *zSql==0 ) return 0;
    +        token = tkOTHER;
    +        break;
    +      }
    +      case '`':     /* Grave-accent quoted symbols used by MySQL */
    +      case '"':     /* single- and double-quoted strings */
    +      case '\'': {
    +        int c = *zSql;
    +        zSql++;
    +        while( *zSql && *zSql!=c ){ zSql++; }
    +        if( *zSql==0 ) return 0;
    +        token = tkOTHER;
    +        break;
    +      }
    +      default: {
    +        int c;
    +        if( IdChar((u8)*zSql) ){
    +          /* Keywords and unquoted identifiers */
    +          int nId;
    +          for(nId=1; IdChar(zSql[nId]); nId++){}
    +#ifdef SQLITE_OMIT_TRIGGER
    +          token = tkOTHER;
    +#else
    +          switch( *zSql ){
    +            case 'c': case 'C': {
    +              if( nId==6 && sqlite3StrNICmp(zSql, "create", 6)==0 ){
    +                token = tkCREATE;
    +              }else{
    +                token = tkOTHER;
    +              }
    +              break;
    +            }
    +            case 't': case 'T': {
    +              if( nId==7 && sqlite3StrNICmp(zSql, "trigger", 7)==0 ){
    +                token = tkTRIGGER;
    +              }else if( nId==4 && sqlite3StrNICmp(zSql, "temp", 4)==0 ){
    +                token = tkTEMP;
    +              }else if( nId==9 && sqlite3StrNICmp(zSql, "temporary", 9)==0 ){
    +                token = tkTEMP;
    +              }else{
    +                token = tkOTHER;
    +              }
    +              break;
    +            }
    +            case 'e':  case 'E': {
    +              if( nId==3 && sqlite3StrNICmp(zSql, "end", 3)==0 ){
    +                token = tkEND;
    +              }else
    +#ifndef SQLITE_OMIT_EXPLAIN
    +              if( nId==7 && sqlite3StrNICmp(zSql, "explain", 7)==0 ){
    +                token = tkEXPLAIN;
    +              }else
    +#endif
    +              {
    +                token = tkOTHER;
    +              }
    +              break;
    +            }
    +            default: {
    +              token = tkOTHER;
    +              break;
    +            }
    +          }
    +#endif /* SQLITE_OMIT_TRIGGER */
    +          zSql += nId-1;
    +        }else{
    +          /* Operators and special symbols */
    +          token = tkOTHER;
    +        }
    +        break;
    +      }
    +    }
    +    state = trans[state][token];
    +    zSql++;
    +  }
    +  return state==0;
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** This routine is the same as the sqlite3_complete() routine described
    +** above, except that the parameter is required to be UTF-16 encoded, not
    +** UTF-8.
    +*/
    +SQLITE_API int sqlite3_complete16(const void *zSql){
    +  sqlite3_value *pVal;
    +  char const *zSql8;
    +  int rc = SQLITE_NOMEM;
    +
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  rc = sqlite3_initialize();
    +  if( rc ) return rc;
    +#endif
    +  pVal = sqlite3ValueNew(0);
    +  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
    +  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
    +  if( zSql8 ){
    +    rc = sqlite3_complete(zSql8);
    +  }else{
    +    rc = SQLITE_NOMEM;
    +  }
    +  sqlite3ValueFree(pVal);
    +  return sqlite3ApiExit(0, rc);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +#endif /* SQLITE_OMIT_COMPLETE */
    +
    +/************** End of complete.c ********************************************/
    +/************** Begin file main.c ********************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Main file for the SQLite library.  The routines in this file
    +** implement the programmer interface to the library.  Routines in
    +** other files are for internal use by SQLite and should not be
    +** accessed by users of the library.
    +*/
    +
    +#ifdef SQLITE_ENABLE_FTS3
    +/************** Include fts3.h in the middle of main.c ***********************/
    +/************** Begin file fts3.h ********************************************/
    +/*
    +** 2006 Oct 10
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This header file is used by programs that want to link against the
    +** FTS3 library.  All it does is declare the sqlite3Fts3Init() interface.
    +*/
    +
    +#if 0
    +extern "C" {
    +#endif  /* __cplusplus */
    +
    +SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
    +
    +#if 0
    +}  /* extern "C" */
    +#endif  /* __cplusplus */
    +
    +/************** End of fts3.h ************************************************/
    +/************** Continuing where we left off in main.c ***********************/
    +#endif
    +#ifdef SQLITE_ENABLE_RTREE
    +/************** Include rtree.h in the middle of main.c **********************/
    +/************** Begin file rtree.h *******************************************/
    +/*
    +** 2008 May 26
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This header file is used by programs that want to link against the
    +** RTREE library.  All it does is declare the sqlite3RtreeInit() interface.
    +*/
    +
    +#if 0
    +extern "C" {
    +#endif  /* __cplusplus */
    +
    +SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
    +
    +#if 0
    +}  /* extern "C" */
    +#endif  /* __cplusplus */
    +
    +/************** End of rtree.h ***********************************************/
    +/************** Continuing where we left off in main.c ***********************/
    +#endif
    +#ifdef SQLITE_ENABLE_ICU
    +/************** Include sqliteicu.h in the middle of main.c ******************/
    +/************** Begin file sqliteicu.h ***************************************/
    +/*
    +** 2008 May 26
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This header file is used by programs that want to link against the
    +** ICU extension.  All it does is declare the sqlite3IcuInit() interface.
    +*/
    +
    +#if 0
    +extern "C" {
    +#endif  /* __cplusplus */
    +
    +SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
    +
    +#if 0
    +}  /* extern "C" */
    +#endif  /* __cplusplus */
    +
    +
    +/************** End of sqliteicu.h *******************************************/
    +/************** Continuing where we left off in main.c ***********************/
    +#endif
    +
    +/*
    +** The version of the library
    +*/
    +#ifndef SQLITE_AMALGAMATION
    +SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
    +#endif
    +SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
    +SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
    +SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
    +SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
    +
    +#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
    +/*
    +** If the following function pointer is not NULL and if
    +** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
    +** I/O active are written using this function.  These messages
    +** are intended for debugging activity only.
    +*/
    +SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*, ...) = 0;
    +#endif
    +
    +/*
    +** If the following global variable points to a string which is the
    +** name of a directory, then that directory will be used to store
    +** temporary files.
    +**
    +** See also the "PRAGMA temp_store_directory" SQL command.
    +*/
    +SQLITE_API char *sqlite3_temp_directory = 0;
    +
    +/*
    +** Initialize SQLite.  
    +**
    +** This routine must be called to initialize the memory allocation,
    +** VFS, and mutex subsystems prior to doing any serious work with
    +** SQLite.  But as long as you do not compile with SQLITE_OMIT_AUTOINIT
    +** this routine will be called automatically by key routines such as
    +** sqlite3_open().  
    +**
    +** This routine is a no-op except on its very first call for the process,
    +** or for the first call after a call to sqlite3_shutdown.
    +**
    +** The first thread to call this routine runs the initialization to
    +** completion.  If subsequent threads call this routine before the first
    +** thread has finished the initialization process, then the subsequent
    +** threads must block until the first thread finishes with the initialization.
    +**
    +** The first thread might call this routine recursively.  Recursive
    +** calls to this routine should not block, of course.  Otherwise the
    +** initialization process would never complete.
    +**
    +** Let X be the first thread to enter this routine.  Let Y be some other
    +** thread.  Then while the initial invocation of this routine by X is
    +** incomplete, it is required that:
    +**
    +**    *  Calls to this routine from Y must block until the outer-most
    +**       call by X completes.
    +**
    +**    *  Recursive calls to this routine from thread X return immediately
    +**       without blocking.
    +*/
    +SQLITE_API int sqlite3_initialize(void){
    +  sqlite3_mutex *pMaster;                      /* The main static mutex */
    +  int rc;                                      /* Result code */
    +
    +#ifdef SQLITE_OMIT_WSD
    +  rc = sqlite3_wsd_init(4096, 24);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +#endif
    +
    +  /* If SQLite is already completely initialized, then this call
    +  ** to sqlite3_initialize() should be a no-op.  But the initialization
    +  ** must be complete.  So isInit must not be set until the very end
    +  ** of this routine.
    +  */
    +  if( sqlite3GlobalConfig.isInit ) return SQLITE_OK;
    +
    +  /* Make sure the mutex subsystem is initialized.  If unable to 
    +  ** initialize the mutex subsystem, return early with the error.
    +  ** If the system is so sick that we are unable to allocate a mutex,
    +  ** there is not much SQLite is going to be able to do.
    +  **
    +  ** The mutex subsystem must take care of serializing its own
    +  ** initialization.
    +  */
    +  rc = sqlite3MutexInit();
    +  if( rc ) return rc;
    +
    +  /* Initialize the malloc() system and the recursive pInitMutex mutex.
    +  ** This operation is protected by the STATIC_MASTER mutex.  Note that
    +  ** MutexAlloc() is called for a static mutex prior to initializing the
    +  ** malloc subsystem - this implies that the allocation of a static
    +  ** mutex must not require support from the malloc subsystem.
    +  */
    +  pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
    +  sqlite3_mutex_enter(pMaster);
    +  sqlite3GlobalConfig.isMutexInit = 1;
    +  if( !sqlite3GlobalConfig.isMallocInit ){
    +    rc = sqlite3MallocInit();
    +  }
    +  if( rc==SQLITE_OK ){
    +    sqlite3GlobalConfig.isMallocInit = 1;
    +    if( !sqlite3GlobalConfig.pInitMutex ){
    +      sqlite3GlobalConfig.pInitMutex =
    +           sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
    +      if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){
    +        rc = SQLITE_NOMEM;
    +      }
    +    }
    +  }
    +  if( rc==SQLITE_OK ){
    +    sqlite3GlobalConfig.nRefInitMutex++;
    +  }
    +  sqlite3_mutex_leave(pMaster);
    +
    +  /* If rc is not SQLITE_OK at this point, then either the malloc
    +  ** subsystem could not be initialized or the system failed to allocate
    +  ** the pInitMutex mutex. Return an error in either case.  */
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  /* Do the rest of the initialization under the recursive mutex so
    +  ** that we will be able to handle recursive calls into
    +  ** sqlite3_initialize().  The recursive calls normally come through
    +  ** sqlite3_os_init() when it invokes sqlite3_vfs_register(), but other
    +  ** recursive calls might also be possible.
    +  */
    +  sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);
    +  if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
    +    FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
    +    sqlite3GlobalConfig.inProgress = 1;
    +    memset(pHash, 0, sizeof(sqlite3GlobalFunctions));
    +    sqlite3RegisterGlobalFunctions();
    +    if( sqlite3GlobalConfig.isPCacheInit==0 ){
    +      rc = sqlite3PcacheInitialize();
    +    }
    +    if( rc==SQLITE_OK ){
    +      sqlite3GlobalConfig.isPCacheInit = 1;
    +      rc = sqlite3OsInit();
    +    }
    +    if( rc==SQLITE_OK ){
    +      sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage, 
    +          sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
    +      sqlite3GlobalConfig.isInit = 1;
    +    }
    +    sqlite3GlobalConfig.inProgress = 0;
    +  }
    +  sqlite3_mutex_leave(sqlite3GlobalConfig.pInitMutex);
    +
    +  /* Go back under the static mutex and clean up the recursive
    +  ** mutex to prevent a resource leak.
    +  */
    +  sqlite3_mutex_enter(pMaster);
    +  sqlite3GlobalConfig.nRefInitMutex--;
    +  if( sqlite3GlobalConfig.nRefInitMutex<=0 ){
    +    assert( sqlite3GlobalConfig.nRefInitMutex==0 );
    +    sqlite3_mutex_free(sqlite3GlobalConfig.pInitMutex);
    +    sqlite3GlobalConfig.pInitMutex = 0;
    +  }
    +  sqlite3_mutex_leave(pMaster);
    +
    +  /* The following is just a sanity check to make sure SQLite has
    +  ** been compiled correctly.  It is important to run this code, but
    +  ** we don't want to run it too often and soak up CPU cycles for no
    +  ** reason.  So we run it once during initialization.
    +  */
    +#ifndef NDEBUG
    +#ifndef SQLITE_OMIT_FLOATING_POINT
    +  /* This section of code's only "output" is via assert() statements. */
    +  if ( rc==SQLITE_OK ){
    +    u64 x = (((u64)1)<<63)-1;
    +    double y;
    +    assert(sizeof(x)==8);
    +    assert(sizeof(x)==sizeof(y));
    +    memcpy(&y, &x, 8);
    +    assert( sqlite3IsNaN(y) );
    +  }
    +#endif
    +#endif
    +
    +  return rc;
    +}
    +
    +/*
    +** Undo the effects of sqlite3_initialize().  Must not be called while
    +** there are outstanding database connections or memory allocations or
    +** while any part of SQLite is otherwise in use in any thread.  This
    +** routine is not threadsafe.  But it is safe to invoke this routine
    +** on when SQLite is already shut down.  If SQLite is already shut down
    +** when this routine is invoked, then this routine is a harmless no-op.
    +*/
    +SQLITE_API int sqlite3_shutdown(void){
    +  if( sqlite3GlobalConfig.isInit ){
    +    sqlite3_os_end();
    +    sqlite3_reset_auto_extension();
    +    sqlite3GlobalConfig.isInit = 0;
    +  }
    +  if( sqlite3GlobalConfig.isPCacheInit ){
    +    sqlite3PcacheShutdown();
    +    sqlite3GlobalConfig.isPCacheInit = 0;
    +  }
    +  if( sqlite3GlobalConfig.isMallocInit ){
    +    sqlite3MallocEnd();
    +    sqlite3GlobalConfig.isMallocInit = 0;
    +  }
    +  if( sqlite3GlobalConfig.isMutexInit ){
    +    sqlite3MutexEnd();
    +    sqlite3GlobalConfig.isMutexInit = 0;
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** This API allows applications to modify the global configuration of
    +** the SQLite library at run-time.
    +**
    +** This routine should only be called when there are no outstanding
    +** database connections or memory allocations.  This routine is not
    +** threadsafe.  Failure to heed these warnings can lead to unpredictable
    +** behavior.
    +*/
    +SQLITE_API int sqlite3_config(int op, ...){
    +  va_list ap;
    +  int rc = SQLITE_OK;
    +
    +  /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
    +  ** the SQLite library is in use. */
    +  if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE;
    +
    +  va_start(ap, op);
    +  switch( op ){
    +
    +    /* Mutex configuration options are only available in a threadsafe
    +    ** compile. 
    +    */
    +#if SQLITE_THREADSAFE
    +    case SQLITE_CONFIG_SINGLETHREAD: {
    +      /* Disable all mutexing */
    +      sqlite3GlobalConfig.bCoreMutex = 0;
    +      sqlite3GlobalConfig.bFullMutex = 0;
    +      break;
    +    }
    +    case SQLITE_CONFIG_MULTITHREAD: {
    +      /* Disable mutexing of database connections */
    +      /* Enable mutexing of core data structures */
    +      sqlite3GlobalConfig.bCoreMutex = 1;
    +      sqlite3GlobalConfig.bFullMutex = 0;
    +      break;
    +    }
    +    case SQLITE_CONFIG_SERIALIZED: {
    +      /* Enable all mutexing */
    +      sqlite3GlobalConfig.bCoreMutex = 1;
    +      sqlite3GlobalConfig.bFullMutex = 1;
    +      break;
    +    }
    +    case SQLITE_CONFIG_MUTEX: {
    +      /* Specify an alternative mutex implementation */
    +      sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
    +      break;
    +    }
    +    case SQLITE_CONFIG_GETMUTEX: {
    +      /* Retrieve the current mutex implementation */
    +      *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
    +      break;
    +    }
    +#endif
    +
    +
    +    case SQLITE_CONFIG_MALLOC: {
    +      /* Specify an alternative malloc implementation */
    +      sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
    +      break;
    +    }
    +    case SQLITE_CONFIG_GETMALLOC: {
    +      /* Retrieve the current malloc() implementation */
    +      if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();
    +      *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;
    +      break;
    +    }
    +    case SQLITE_CONFIG_MEMSTATUS: {
    +      /* Enable or disable the malloc status collection */
    +      sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
    +      break;
    +    }
    +    case SQLITE_CONFIG_SCRATCH: {
    +      /* Designate a buffer for scratch memory space */
    +      sqlite3GlobalConfig.pScratch = va_arg(ap, void*);
    +      sqlite3GlobalConfig.szScratch = va_arg(ap, int);
    +      sqlite3GlobalConfig.nScratch = va_arg(ap, int);
    +      break;
    +    }
    +    case SQLITE_CONFIG_PAGECACHE: {
    +      /* Designate a buffer for page cache memory space */
    +      sqlite3GlobalConfig.pPage = va_arg(ap, void*);
    +      sqlite3GlobalConfig.szPage = va_arg(ap, int);
    +      sqlite3GlobalConfig.nPage = va_arg(ap, int);
    +      break;
    +    }
    +
    +    case SQLITE_CONFIG_PCACHE: {
    +      /* Specify an alternative page cache implementation */
    +      sqlite3GlobalConfig.pcache = *va_arg(ap, sqlite3_pcache_methods*);
    +      break;
    +    }
    +
    +    case SQLITE_CONFIG_GETPCACHE: {
    +      if( sqlite3GlobalConfig.pcache.xInit==0 ){
    +        sqlite3PCacheSetDefault();
    +      }
    +      *va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache;
    +      break;
    +    }
    +
    +#if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5)
    +    case SQLITE_CONFIG_HEAP: {
    +      /* Designate a buffer for heap memory space */
    +      sqlite3GlobalConfig.pHeap = va_arg(ap, void*);
    +      sqlite3GlobalConfig.nHeap = va_arg(ap, int);
    +      sqlite3GlobalConfig.mnReq = va_arg(ap, int);
    +
    +      if( sqlite3GlobalConfig.pHeap==0 ){
    +        /* If the heap pointer is NULL, then restore the malloc implementation
    +        ** back to NULL pointers too.  This will cause the malloc to go
    +        ** back to its default implementation when sqlite3_initialize() is
    +        ** run.
    +        */
    +        memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));
    +      }else{
    +        /* The heap pointer is not NULL, then install one of the
    +        ** mem5.c/mem3.c methods. If neither ENABLE_MEMSYS3 nor
    +        ** ENABLE_MEMSYS5 is defined, return an error.
    +        */
    +#ifdef SQLITE_ENABLE_MEMSYS3
    +        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();
    +#endif
    +#ifdef SQLITE_ENABLE_MEMSYS5
    +        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();
    +#endif
    +      }
    +      break;
    +    }
    +#endif
    +
    +    case SQLITE_CONFIG_LOOKASIDE: {
    +      sqlite3GlobalConfig.szLookaside = va_arg(ap, int);
    +      sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
    +      break;
    +    }
    +
    +    default: {
    +      rc = SQLITE_ERROR;
    +      break;
    +    }
    +  }
    +  va_end(ap);
    +  return rc;
    +}
    +
    +/*
    +** Set up the lookaside buffers for a database connection.
    +** Return SQLITE_OK on success.  
    +** If lookaside is already active, return SQLITE_BUSY.
    +**
    +** The sz parameter is the number of bytes in each lookaside slot.
    +** The cnt parameter is the number of slots.  If pStart is NULL the
    +** space for the lookaside memory is obtained from sqlite3_malloc().
    +** If pStart is not NULL then it is sz*cnt bytes of memory to use for
    +** the lookaside memory.
    +*/
    +static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
    +  void *pStart;
    +  if( db->lookaside.nOut ){
    +    return SQLITE_BUSY;
    +  }
    +  /* Free any existing lookaside buffer for this handle before
    +  ** allocating a new one so we don't have to have space for 
    +  ** both at the same time.
    +  */
    +  if( db->lookaside.bMalloced ){
    +    sqlite3_free(db->lookaside.pStart);
    +  }
    +  /* The size of a lookaside slot needs to be larger than a pointer
    +  ** to be useful.
    +  */
    +  if( sz<=(int)sizeof(LookasideSlot*) ) sz = 0;
    +  if( cnt<0 ) cnt = 0;
    +  if( sz==0 || cnt==0 ){
    +    sz = 0;
    +    pStart = 0;
    +  }else if( pBuf==0 ){
    +    sz = ROUND8(sz);
    +    sqlite3BeginBenignMalloc();
    +    pStart = sqlite3Malloc( sz*cnt );
    +    sqlite3EndBenignMalloc();
    +  }else{
    +    sz = ROUNDDOWN8(sz);
    +    pStart = pBuf;
    +  }
    +  db->lookaside.pStart = pStart;
    +  db->lookaside.pFree = 0;
    +  db->lookaside.sz = (u16)sz;
    +  if( pStart ){
    +    int i;
    +    LookasideSlot *p;
    +    assert( sz > (int)sizeof(LookasideSlot*) );
    +    p = (LookasideSlot*)pStart;
    +    for(i=cnt-1; i>=0; i--){
    +      p->pNext = db->lookaside.pFree;
    +      db->lookaside.pFree = p;
    +      p = (LookasideSlot*)&((u8*)p)[sz];
    +    }
    +    db->lookaside.pEnd = p;
    +    db->lookaside.bEnabled = 1;
    +    db->lookaside.bMalloced = pBuf==0 ?1:0;
    +  }else{
    +    db->lookaside.pEnd = 0;
    +    db->lookaside.bEnabled = 0;
    +    db->lookaside.bMalloced = 0;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Return the mutex associated with a database connection.
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
    +  return db->mutex;
    +}
    +
    +/*
    +** Configuration settings for an individual database connection
    +*/
    +SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
    +  va_list ap;
    +  int rc;
    +  va_start(ap, op);
    +  switch( op ){
    +    case SQLITE_DBCONFIG_LOOKASIDE: {
    +      void *pBuf = va_arg(ap, void*);
    +      int sz = va_arg(ap, int);
    +      int cnt = va_arg(ap, int);
    +      rc = setupLookaside(db, pBuf, sz, cnt);
    +      break;
    +    }
    +    default: {
    +      rc = SQLITE_ERROR;
    +      break;
    +    }
    +  }
    +  va_end(ap);
    +  return rc;
    +}
    +
    +
    +/*
    +** Return true if the buffer z[0..n-1] contains all spaces.
    +*/
    +static int allSpaces(const char *z, int n){
    +  while( n>0 && z[n-1]==' ' ){ n--; }
    +  return n==0;
    +}
    +
    +/*
    +** This is the default collating function named "BINARY" which is always
    +** available.
    +**
    +** If the padFlag argument is not NULL then space padding at the end
    +** of strings is ignored.  This implements the RTRIM collation.
    +*/
    +static int binCollFunc(
    +  void *padFlag,
    +  int nKey1, const void *pKey1,
    +  int nKey2, const void *pKey2
    +){
    +  int rc, n;
    +  n = nKey1<nKey2 ? nKey1 : nKey2;
    +  rc = memcmp(pKey1, pKey2, n);
    +  if( rc==0 ){
    +    if( padFlag
    +     && allSpaces(((char*)pKey1)+n, nKey1-n)
    +     && allSpaces(((char*)pKey2)+n, nKey2-n)
    +    ){
    +      /* Leave rc unchanged at 0 */
    +    }else{
    +      rc = nKey1 - nKey2;
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Another built-in collating sequence: NOCASE. 
    +**
    +** This collating sequence is intended to be used for "case independant
    +** comparison". SQLite's knowledge of upper and lower case equivalents
    +** extends only to the 26 characters used in the English language.
    +**
    +** At the moment there is only a UTF-8 implementation.
    +*/
    +static int nocaseCollatingFunc(
    +  void *NotUsed,
    +  int nKey1, const void *pKey1,
    +  int nKey2, const void *pKey2
    +){
    +  int r = sqlite3StrNICmp(
    +      (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2);
    +  UNUSED_PARAMETER(NotUsed);
    +  if( 0==r ){
    +    r = nKey1-nKey2;
    +  }
    +  return r;
    +}
    +
    +/*
    +** Return the ROWID of the most recent insert
    +*/
    +SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
    +  return db->lastRowid;
    +}
    +
    +/*
    +** Return the number of changes in the most recent call to sqlite3_exec().
    +*/
    +SQLITE_API int sqlite3_changes(sqlite3 *db){
    +  return db->nChange;
    +}
    +
    +/*
    +** Return the number of changes since the database handle was opened.
    +*/
    +SQLITE_API int sqlite3_total_changes(sqlite3 *db){
    +  return db->nTotalChange;
    +}
    +
    +/*
    +** Close all open savepoints. This function only manipulates fields of the
    +** database handle object, it does not close any savepoints that may be open
    +** at the b-tree/pager level.
    +*/
    +SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
    +  while( db->pSavepoint ){
    +    Savepoint *pTmp = db->pSavepoint;
    +    db->pSavepoint = pTmp->pNext;
    +    sqlite3DbFree(db, pTmp);
    +  }
    +  db->nSavepoint = 0;
    +  db->nStatement = 0;
    +  db->isTransactionSavepoint = 0;
    +}
    +
    +/*
    +** Close an existing SQLite database
    +*/
    +SQLITE_API int sqlite3_close(sqlite3 *db){
    +  HashElem *i;
    +  int j;
    +
    +  if( !db ){
    +    return SQLITE_OK;
    +  }
    +  if( !sqlite3SafetyCheckSickOrOk(db) ){
    +    return SQLITE_MISUSE;
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +
    +  sqlite3ResetInternalSchema(db, 0);
    +
    +  /* If a transaction is open, the ResetInternalSchema() call above
    +  ** will not have called the xDisconnect() method on any virtual
    +  ** tables in the db->aVTrans[] array. The following sqlite3VtabRollback()
    +  ** call will do so. We need to do this before the check for active
    +  ** SQL statements below, as the v-table implementation may be storing
    +  ** some prepared statements internally.
    +  */
    +  sqlite3VtabRollback(db);
    +
    +  /* If there are any outstanding VMs, return SQLITE_BUSY. */
    +  if( db->pVdbe ){
    +    sqlite3Error(db, SQLITE_BUSY, 
    +        "unable to close due to unfinalised statements");
    +    sqlite3_mutex_leave(db->mutex);
    +    return SQLITE_BUSY;
    +  }
    +  assert( sqlite3SafetyCheckSickOrOk(db) );
    +
    +  for(j=0; j<db->nDb; j++){
    +    Btree *pBt = db->aDb[j].pBt;
    +    if( pBt && sqlite3BtreeIsInBackup(pBt) ){
    +      sqlite3Error(db, SQLITE_BUSY, 
    +          "unable to close due to unfinished backup operation");
    +      sqlite3_mutex_leave(db->mutex);
    +      return SQLITE_BUSY;
    +    }
    +  }
    +
    +  /* Free any outstanding Savepoint structures. */
    +  sqlite3CloseSavepoints(db);
    +
    +  for(j=0; j<db->nDb; j++){
    +    struct Db *pDb = &db->aDb[j];
    +    if( pDb->pBt ){
    +      sqlite3BtreeClose(pDb->pBt);
    +      pDb->pBt = 0;
    +      if( j!=1 ){
    +        pDb->pSchema = 0;
    +      }
    +    }
    +  }
    +  sqlite3ResetInternalSchema(db, 0);
    +
    +  /* Tell the code in notify.c that the connection no longer holds any
    +  ** locks and does not require any further unlock-notify callbacks.
    +  */
    +  sqlite3ConnectionClosed(db);
    +
    +  assert( db->nDb<=2 );
    +  assert( db->aDb==db->aDbStatic );
    +  for(j=0; j<ArraySize(db->aFunc.a); j++){
    +    FuncDef *pNext, *pHash, *p;
    +    for(p=db->aFunc.a[j]; p; p=pHash){
    +      pHash = p->pHash;
    +      while( p ){
    +        pNext = p->pNext;
    +        sqlite3DbFree(db, p);
    +        p = pNext;
    +      }
    +    }
    +  }
    +  for(i=sqliteHashFirst(&db->aCollSeq); i; i=sqliteHashNext(i)){
    +    CollSeq *pColl = (CollSeq *)sqliteHashData(i);
    +    /* Invoke any destructors registered for collation sequence user data. */
    +    for(j=0; j<3; j++){
    +      if( pColl[j].xDel ){
    +        pColl[j].xDel(pColl[j].pUser);
    +      }
    +    }
    +    sqlite3DbFree(db, pColl);
    +  }
    +  sqlite3HashClear(&db->aCollSeq);
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  for(i=sqliteHashFirst(&db->aModule); i; i=sqliteHashNext(i)){
    +    Module *pMod = (Module *)sqliteHashData(i);
    +    if( pMod->xDestroy ){
    +      pMod->xDestroy(pMod->pAux);
    +    }
    +    sqlite3DbFree(db, pMod);
    +  }
    +  sqlite3HashClear(&db->aModule);
    +#endif
    +
    +  sqlite3Error(db, SQLITE_OK, 0); /* Deallocates any cached error strings. */
    +  if( db->pErr ){
    +    sqlite3ValueFree(db->pErr);
    +  }
    +  sqlite3CloseExtensions(db);
    +
    +  db->magic = SQLITE_MAGIC_ERROR;
    +
    +  /* The temp-database schema is allocated differently from the other schema
    +  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).
    +  ** So it needs to be freed here. Todo: Why not roll the temp schema into
    +  ** the same sqliteMalloc() as the one that allocates the database 
    +  ** structure?
    +  */
    +  sqlite3DbFree(db, db->aDb[1].pSchema);
    +  sqlite3_mutex_leave(db->mutex);
    +  db->magic = SQLITE_MAGIC_CLOSED;
    +  sqlite3_mutex_free(db->mutex);
    +  assert( db->lookaside.nOut==0 );  /* Fails on a lookaside memory leak */
    +  if( db->lookaside.bMalloced ){
    +    sqlite3_free(db->lookaside.pStart);
    +  }
    +  sqlite3_free(db);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Rollback all database files.
    +*/
    +SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db){
    +  int i;
    +  int inTrans = 0;
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  sqlite3BeginBenignMalloc();
    +  for(i=0; i<db->nDb; i++){
    +    if( db->aDb[i].pBt ){
    +      if( sqlite3BtreeIsInTrans(db->aDb[i].pBt) ){
    +        inTrans = 1;
    +      }
    +      sqlite3BtreeRollback(db->aDb[i].pBt);
    +      db->aDb[i].inTrans = 0;
    +    }
    +  }
    +  sqlite3VtabRollback(db);
    +  sqlite3EndBenignMalloc();
    +
    +  if( db->flags&SQLITE_InternChanges ){
    +    sqlite3ExpirePreparedStatements(db);
    +    sqlite3ResetInternalSchema(db, 0);
    +  }
    +
    +  /* Any deferred constraint violations have now been resolved. */
    +  db->nDeferredCons = 0;
    +
    +  /* If one has been configured, invoke the rollback-hook callback */
    +  if( db->xRollbackCallback && (inTrans || !db->autoCommit) ){
    +    db->xRollbackCallback(db->pRollbackArg);
    +  }
    +}
    +
    +/*
    +** Return a static string that describes the kind of error specified in the
    +** argument.
    +*/
    +SQLITE_PRIVATE const char *sqlite3ErrStr(int rc){
    +  static const char* const aMsg[] = {
    +    /* SQLITE_OK          */ "not an error",
    +    /* SQLITE_ERROR       */ "SQL logic error or missing database",
    +    /* SQLITE_INTERNAL    */ 0,
    +    /* SQLITE_PERM        */ "access permission denied",
    +    /* SQLITE_ABORT       */ "callback requested query abort",
    +    /* SQLITE_BUSY        */ "database is locked",
    +    /* SQLITE_LOCKED      */ "database table is locked",
    +    /* SQLITE_NOMEM       */ "out of memory",
    +    /* SQLITE_READONLY    */ "attempt to write a readonly database",
    +    /* SQLITE_INTERRUPT   */ "interrupted",
    +    /* SQLITE_IOERR       */ "disk I/O error",
    +    /* SQLITE_CORRUPT     */ "database disk image is malformed",
    +    /* SQLITE_NOTFOUND    */ 0,
    +    /* SQLITE_FULL        */ "database or disk is full",
    +    /* SQLITE_CANTOPEN    */ "unable to open database file",
    +    /* SQLITE_PROTOCOL    */ 0,
    +    /* SQLITE_EMPTY       */ "table contains no data",
    +    /* SQLITE_SCHEMA      */ "database schema has changed",
    +    /* SQLITE_TOOBIG      */ "string or blob too big",
    +    /* SQLITE_CONSTRAINT  */ "constraint failed",
    +    /* SQLITE_MISMATCH    */ "datatype mismatch",
    +    /* SQLITE_MISUSE      */ "library routine called out of sequence",
    +    /* SQLITE_NOLFS       */ "large file support is disabled",
    +    /* SQLITE_AUTH        */ "authorization denied",
    +    /* SQLITE_FORMAT      */ "auxiliary database format error",
    +    /* SQLITE_RANGE       */ "bind or column index out of range",
    +    /* SQLITE_NOTADB      */ "file is encrypted or is not a database",
    +  };
    +  rc &= 0xff;
    +  if( ALWAYS(rc>=0) && rc<(int)(sizeof(aMsg)/sizeof(aMsg[0])) && aMsg[rc]!=0 ){
    +    return aMsg[rc];
    +  }else{
    +    return "unknown error";
    +  }
    +}
    +
    +/*
    +** This routine implements a busy callback that sleeps and tries
    +** again until a timeout value is reached.  The timeout value is
    +** an integer number of milliseconds passed in as the first
    +** argument.
    +*/
    +static int sqliteDefaultBusyCallback(
    + void *ptr,               /* Database connection */
    + int count                /* Number of times table has been busy */
    +){
    +#if SQLITE_OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
    +  static const u8 delays[] =
    +     { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50, 100 };
    +  static const u8 totals[] =
    +     { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228 };
    +# define NDELAY (sizeof(delays)/sizeof(delays[0]))
    +  sqlite3 *db = (sqlite3 *)ptr;
    +  int timeout = db->busyTimeout;
    +  int delay, prior;
    +
    +  assert( count>=0 );
    +  if( count < NDELAY ){
    +    delay = delays[count];
    +    prior = totals[count];
    +  }else{
    +    delay = delays[NDELAY-1];
    +    prior = totals[NDELAY-1] + delay*(count-(NDELAY-1));
    +  }
    +  if( prior + delay > timeout ){
    +    delay = timeout - prior;
    +    if( delay<=0 ) return 0;
    +  }
    +  sqlite3OsSleep(db->pVfs, delay*1000);
    +  return 1;
    +#else
    +  sqlite3 *db = (sqlite3 *)ptr;
    +  int timeout = ((sqlite3 *)ptr)->busyTimeout;
    +  if( (count+1)*1000 > timeout ){
    +    return 0;
    +  }
    +  sqlite3OsSleep(db->pVfs, 1000000);
    +  return 1;
    +#endif
    +}
    +
    +/*
    +** Invoke the given busy handler.
    +**
    +** This routine is called when an operation failed with a lock.
    +** If this routine returns non-zero, the lock is retried.  If it
    +** returns 0, the operation aborts with an SQLITE_BUSY error.
    +*/
    +SQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler *p){
    +  int rc;
    +  if( NEVER(p==0) || p->xFunc==0 || p->nBusy<0 ) return 0;
    +  rc = p->xFunc(p->pArg, p->nBusy);
    +  if( rc==0 ){
    +    p->nBusy = -1;
    +  }else{
    +    p->nBusy++;
    +  }
    +  return rc; 
    +}
    +
    +/*
    +** This routine sets the busy callback for an Sqlite database to the
    +** given callback function with the given argument.
    +*/
    +SQLITE_API int sqlite3_busy_handler(
    +  sqlite3 *db,
    +  int (*xBusy)(void*,int),
    +  void *pArg
    +){
    +  sqlite3_mutex_enter(db->mutex);
    +  db->busyHandler.xFunc = xBusy;
    +  db->busyHandler.pArg = pArg;
    +  db->busyHandler.nBusy = 0;
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
    +/*
    +** This routine sets the progress callback for an Sqlite database to the
    +** given callback function with the given argument. The progress callback will
    +** be invoked every nOps opcodes.
    +*/
    +SQLITE_API void sqlite3_progress_handler(
    +  sqlite3 *db, 
    +  int nOps,
    +  int (*xProgress)(void*), 
    +  void *pArg
    +){
    +  sqlite3_mutex_enter(db->mutex);
    +  if( nOps>0 ){
    +    db->xProgress = xProgress;
    +    db->nProgressOps = nOps;
    +    db->pProgressArg = pArg;
    +  }else{
    +    db->xProgress = 0;
    +    db->nProgressOps = 0;
    +    db->pProgressArg = 0;
    +  }
    +  sqlite3_mutex_leave(db->mutex);
    +}
    +#endif
    +
    +
    +/*
    +** This routine installs a default busy handler that waits for the
    +** specified number of milliseconds before returning 0.
    +*/
    +SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
    +  if( ms>0 ){
    +    db->busyTimeout = ms;
    +    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
    +  }else{
    +    sqlite3_busy_handler(db, 0, 0);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Cause any pending operation to stop at its earliest opportunity.
    +*/
    +SQLITE_API void sqlite3_interrupt(sqlite3 *db){
    +  db->u1.isInterrupted = 1;
    +}
    +
    +
    +/*
    +** This function is exactly the same as sqlite3_create_function(), except
    +** that it is designed to be called by internal code. The difference is
    +** that if a malloc() fails in sqlite3_create_function(), an error code
    +** is returned and the mallocFailed flag cleared. 
    +*/
    +SQLITE_PRIVATE int sqlite3CreateFunc(
    +  sqlite3 *db,
    +  const char *zFunctionName,
    +  int nArg,
    +  int enc,
    +  void *pUserData,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
    +  void (*xFinal)(sqlite3_context*)
    +){
    +  FuncDef *p;
    +  int nName;
    +
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  if( zFunctionName==0 ||
    +      (xFunc && (xFinal || xStep)) || 
    +      (!xFunc && (xFinal && !xStep)) ||
    +      (!xFunc && (!xFinal && xStep)) ||
    +      (nArg<-1 || nArg>SQLITE_MAX_FUNCTION_ARG) ||
    +      (255<(nName = sqlite3Strlen30( zFunctionName))) ){
    +    return SQLITE_MISUSE;
    +  }
    +  
    +#ifndef SQLITE_OMIT_UTF16
    +  /* If SQLITE_UTF16 is specified as the encoding type, transform this
    +  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
    +  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.
    +  **
    +  ** If SQLITE_ANY is specified, add three versions of the function
    +  ** to the hash table.
    +  */
    +  if( enc==SQLITE_UTF16 ){
    +    enc = SQLITE_UTF16NATIVE;
    +  }else if( enc==SQLITE_ANY ){
    +    int rc;
    +    rc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF8,
    +         pUserData, xFunc, xStep, xFinal);
    +    if( rc==SQLITE_OK ){
    +      rc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF16LE,
    +          pUserData, xFunc, xStep, xFinal);
    +    }
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +    enc = SQLITE_UTF16BE;
    +  }
    +#else
    +  enc = SQLITE_UTF8;
    +#endif
    +  
    +  /* Check if an existing function is being overridden or deleted. If so,
    +  ** and there are active VMs, then return SQLITE_BUSY. If a function
    +  ** is being overridden/deleted but there are no active VMs, allow the
    +  ** operation to continue but invalidate all precompiled statements.
    +  */
    +  p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 0);
    +  if( p && p->iPrefEnc==enc && p->nArg==nArg ){
    +    if( db->activeVdbeCnt ){
    +      sqlite3Error(db, SQLITE_BUSY, 
    +        "unable to delete/modify user-function due to active statements");
    +      assert( !db->mallocFailed );
    +      return SQLITE_BUSY;
    +    }else{
    +      sqlite3ExpirePreparedStatements(db);
    +    }
    +  }
    +
    +  p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 1);
    +  assert(p || db->mallocFailed);
    +  if( !p ){
    +    return SQLITE_NOMEM;
    +  }
    +  p->flags = 0;
    +  p->xFunc = xFunc;
    +  p->xStep = xStep;
    +  p->xFinalize = xFinal;
    +  p->pUserData = pUserData;
    +  p->nArg = (u16)nArg;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Create new user functions.
    +*/
    +SQLITE_API int sqlite3_create_function(
    +  sqlite3 *db,
    +  const char *zFunctionName,
    +  int nArg,
    +  int enc,
    +  void *p,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
    +  void (*xFinal)(sqlite3_context*)
    +){
    +  int rc;
    +  sqlite3_mutex_enter(db->mutex);
    +  rc = sqlite3CreateFunc(db, zFunctionName, nArg, enc, p, xFunc, xStep, xFinal);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +SQLITE_API int sqlite3_create_function16(
    +  sqlite3 *db,
    +  const void *zFunctionName,
    +  int nArg,
    +  int eTextRep,
    +  void *p,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xFinal)(sqlite3_context*)
    +){
    +  int rc;
    +  char *zFunc8;
    +  sqlite3_mutex_enter(db->mutex);
    +  assert( !db->mallocFailed );
    +  zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1);
    +  rc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xFunc, xStep, xFinal);
    +  sqlite3DbFree(db, zFunc8);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +#endif
    +
    +
    +/*
    +** Declare that a function has been overloaded by a virtual table.
    +**
    +** If the function already exists as a regular global function, then
    +** this routine is a no-op.  If the function does not exist, then create
    +** a new one that always throws a run-time error.  
    +**
    +** When virtual tables intend to provide an overloaded function, they
    +** should call this routine to make sure the global function exists.
    +** A global function must exist in order for name resolution to work
    +** properly.
    +*/
    +SQLITE_API int sqlite3_overload_function(
    +  sqlite3 *db,
    +  const char *zName,
    +  int nArg
    +){
    +  int nName = sqlite3Strlen30(zName);
    +  int rc;
    +  sqlite3_mutex_enter(db->mutex);
    +  if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
    +    sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
    +                      0, sqlite3InvalidFunction, 0, 0);
    +  }
    +  rc = sqlite3ApiExit(db, SQLITE_OK);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +#ifndef SQLITE_OMIT_TRACE
    +/*
    +** Register a trace function.  The pArg from the previously registered trace
    +** is returned.  
    +**
    +** A NULL trace function means that no tracing is executes.  A non-NULL
    +** trace is a pointer to a function that is invoked at the start of each
    +** SQL statement.
    +*/
    +SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
    +  void *pOld;
    +  sqlite3_mutex_enter(db->mutex);
    +  pOld = db->pTraceArg;
    +  db->xTrace = xTrace;
    +  db->pTraceArg = pArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return pOld;
    +}
    +/*
    +** Register a profile function.  The pArg from the previously registered 
    +** profile function is returned.  
    +**
    +** A NULL profile function means that no profiling is executes.  A non-NULL
    +** profile is a pointer to a function that is invoked at the conclusion of
    +** each SQL statement that is run.
    +*/
    +SQLITE_API void *sqlite3_profile(
    +  sqlite3 *db,
    +  void (*xProfile)(void*,const char*,sqlite_uint64),
    +  void *pArg
    +){
    +  void *pOld;
    +  sqlite3_mutex_enter(db->mutex);
    +  pOld = db->pProfileArg;
    +  db->xProfile = xProfile;
    +  db->pProfileArg = pArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return pOld;
    +}
    +#endif /* SQLITE_OMIT_TRACE */
    +
    +/*** EXPERIMENTAL ***
    +**
    +** Register a function to be invoked when a transaction comments.
    +** If the invoked function returns non-zero, then the commit becomes a
    +** rollback.
    +*/
    +SQLITE_API void *sqlite3_commit_hook(
    +  sqlite3 *db,              /* Attach the hook to this database */
    +  int (*xCallback)(void*),  /* Function to invoke on each commit */
    +  void *pArg                /* Argument to the function */
    +){
    +  void *pOld;
    +  sqlite3_mutex_enter(db->mutex);
    +  pOld = db->pCommitArg;
    +  db->xCommitCallback = xCallback;
    +  db->pCommitArg = pArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return pOld;
    +}
    +
    +/*
    +** Register a callback to be invoked each time a row is updated,
    +** inserted or deleted using this database connection.
    +*/
    +SQLITE_API void *sqlite3_update_hook(
    +  sqlite3 *db,              /* Attach the hook to this database */
    +  void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
    +  void *pArg                /* Argument to the function */
    +){
    +  void *pRet;
    +  sqlite3_mutex_enter(db->mutex);
    +  pRet = db->pUpdateArg;
    +  db->xUpdateCallback = xCallback;
    +  db->pUpdateArg = pArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return pRet;
    +}
    +
    +/*
    +** Register a callback to be invoked each time a transaction is rolled
    +** back by this database connection.
    +*/
    +SQLITE_API void *sqlite3_rollback_hook(
    +  sqlite3 *db,              /* Attach the hook to this database */
    +  void (*xCallback)(void*), /* Callback function */
    +  void *pArg                /* Argument to the function */
    +){
    +  void *pRet;
    +  sqlite3_mutex_enter(db->mutex);
    +  pRet = db->pRollbackArg;
    +  db->xRollbackCallback = xCallback;
    +  db->pRollbackArg = pArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return pRet;
    +}
    +
    +/*
    +** This function returns true if main-memory should be used instead of
    +** a temporary file for transient pager files and statement journals.
    +** The value returned depends on the value of db->temp_store (runtime
    +** parameter) and the compile time value of SQLITE_TEMP_STORE. The
    +** following table describes the relationship between these two values
    +** and this functions return value.
    +**
    +**   SQLITE_TEMP_STORE     db->temp_store     Location of temporary database
    +**   -----------------     --------------     ------------------------------
    +**   0                     any                file      (return 0)
    +**   1                     1                  file      (return 0)
    +**   1                     2                  memory    (return 1)
    +**   1                     0                  file      (return 0)
    +**   2                     1                  file      (return 0)
    +**   2                     2                  memory    (return 1)
    +**   2                     0                  memory    (return 1)
    +**   3                     any                memory    (return 1)
    +*/
    +SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
    +#if SQLITE_TEMP_STORE==1
    +  return ( db->temp_store==2 );
    +#endif
    +#if SQLITE_TEMP_STORE==2
    +  return ( db->temp_store!=1 );
    +#endif
    +#if SQLITE_TEMP_STORE==3
    +  return 1;
    +#endif
    +#if SQLITE_TEMP_STORE<1 || SQLITE_TEMP_STORE>3
    +  return 0;
    +#endif
    +}
    +
    +/*
    +** This routine is called to create a connection to a database BTree
    +** driver.  If zFilename is the name of a file, then that file is
    +** opened and used.  If zFilename is the magic name ":memory:" then
    +** the database is stored in memory (and is thus forgotten as soon as
    +** the connection is closed.)  If zFilename is NULL then the database
    +** is a "virtual" database for transient use only and is deleted as
    +** soon as the connection is closed.
    +**
    +** A virtual database can be either a disk file (that is automatically
    +** deleted when the file is closed) or it an be held entirely in memory.
    +** The sqlite3TempInMemory() function is used to determine which.
    +*/
    +SQLITE_PRIVATE int sqlite3BtreeFactory(
    +  sqlite3 *db,              /* Main database when opening aux otherwise 0 */
    +  const char *zFilename,    /* Name of the file containing the BTree database */
    +  int omitJournal,          /* if TRUE then do not journal this file */
    +  int nCache,               /* How many pages in the page cache */
    +  int vfsFlags,             /* Flags passed through to vfsOpen */
    +  Btree **ppBtree           /* Pointer to new Btree object written here */
    +){
    +  int btFlags = 0;
    +  int rc;
    +  
    +  assert( sqlite3_mutex_held(db->mutex) );
    +  assert( ppBtree != 0);
    +  if( omitJournal ){
    +    btFlags |= BTREE_OMIT_JOURNAL;
    +  }
    +  if( db->flags & SQLITE_NoReadlock ){
    +    btFlags |= BTREE_NO_READLOCK;
    +  }
    +#ifndef SQLITE_OMIT_MEMORYDB
    +  if( zFilename==0 && sqlite3TempInMemory(db) ){
    +    zFilename = ":memory:";
    +  }
    +#endif
    +
    +  if( (vfsFlags & SQLITE_OPEN_MAIN_DB)!=0 && (zFilename==0 || *zFilename==0) ){
    +    vfsFlags = (vfsFlags & ~SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB;
    +  }
    +  rc = sqlite3BtreeOpen(zFilename, (sqlite3 *)db, ppBtree, btFlags, vfsFlags);
    +
    +  /* If the B-Tree was successfully opened, set the pager-cache size to the
    +  ** default value. Except, if the call to BtreeOpen() returned a handle
    +  ** open on an existing shared pager-cache, do not change the pager-cache 
    +  ** size.
    +  */
    +  if( rc==SQLITE_OK && 0==sqlite3BtreeSchema(*ppBtree, 0, 0) ){
    +    sqlite3BtreeSetCacheSize(*ppBtree, nCache);
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return UTF-8 encoded English language explanation of the most recent
    +** error.
    +*/
    +SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
    +  const char *z;
    +  if( !db ){
    +    return sqlite3ErrStr(SQLITE_NOMEM);
    +  }
    +  if( !sqlite3SafetyCheckSickOrOk(db) ){
    +    return sqlite3ErrStr(SQLITE_MISUSE);
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +  if( db->mallocFailed ){
    +    z = sqlite3ErrStr(SQLITE_NOMEM);
    +  }else{
    +    z = (char*)sqlite3_value_text(db->pErr);
    +    assert( !db->mallocFailed );
    +    if( z==0 ){
    +      z = sqlite3ErrStr(db->errCode);
    +    }
    +  }
    +  sqlite3_mutex_leave(db->mutex);
    +  return z;
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Return UTF-16 encoded English language explanation of the most recent
    +** error.
    +*/
    +SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
    +  static const u16 outOfMem[] = {
    +    'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
    +  };
    +  static const u16 misuse[] = {
    +    'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', 
    +    'r', 'o', 'u', 't', 'i', 'n', 'e', ' ', 
    +    'c', 'a', 'l', 'l', 'e', 'd', ' ', 
    +    'o', 'u', 't', ' ', 
    +    'o', 'f', ' ', 
    +    's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', 0
    +  };
    +
    +  const void *z;
    +  if( !db ){
    +    return (void *)outOfMem;
    +  }
    +  if( !sqlite3SafetyCheckSickOrOk(db) ){
    +    return (void *)misuse;
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +  if( db->mallocFailed ){
    +    z = (void *)outOfMem;
    +  }else{
    +    z = sqlite3_value_text16(db->pErr);
    +    if( z==0 ){
    +      sqlite3ValueSetStr(db->pErr, -1, sqlite3ErrStr(db->errCode),
    +           SQLITE_UTF8, SQLITE_STATIC);
    +      z = sqlite3_value_text16(db->pErr);
    +    }
    +    /* A malloc() may have failed within the call to sqlite3_value_text16()
    +    ** above. If this is the case, then the db->mallocFailed flag needs to
    +    ** be cleared before returning. Do this directly, instead of via
    +    ** sqlite3ApiExit(), to avoid setting the database handle error message.
    +    */
    +    db->mallocFailed = 0;
    +  }
    +  sqlite3_mutex_leave(db->mutex);
    +  return z;
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** Return the most recent error code generated by an SQLite routine. If NULL is
    +** passed to this function, we assume a malloc() failed during sqlite3_open().
    +*/
    +SQLITE_API int sqlite3_errcode(sqlite3 *db){
    +  if( db && !sqlite3SafetyCheckSickOrOk(db) ){
    +    return SQLITE_MISUSE;
    +  }
    +  if( !db || db->mallocFailed ){
    +    return SQLITE_NOMEM;
    +  }
    +  return db->errCode & db->errMask;
    +}
    +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
    +  if( db && !sqlite3SafetyCheckSickOrOk(db) ){
    +    return SQLITE_MISUSE;
    +  }
    +  if( !db || db->mallocFailed ){
    +    return SQLITE_NOMEM;
    +  }
    +  return db->errCode;
    +}
    +
    +/*
    +** Create a new collating function for database "db".  The name is zName
    +** and the encoding is enc.
    +*/
    +static int createCollation(
    +  sqlite3* db,
    +  const char *zName, 
    +  u8 enc,
    +  u8 collType,
    +  void* pCtx,
    +  int(*xCompare)(void*,int,const void*,int,const void*),
    +  void(*xDel)(void*)
    +){
    +  CollSeq *pColl;
    +  int enc2;
    +  int nName = sqlite3Strlen30(zName);
    +  
    +  assert( sqlite3_mutex_held(db->mutex) );
    +
    +  /* If SQLITE_UTF16 is specified as the encoding type, transform this
    +  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
    +  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.
    +  */
    +  enc2 = enc;
    +  testcase( enc2==SQLITE_UTF16 );
    +  testcase( enc2==SQLITE_UTF16_ALIGNED );
    +  if( enc2==SQLITE_UTF16 || enc2==SQLITE_UTF16_ALIGNED ){
    +    enc2 = SQLITE_UTF16NATIVE;
    +  }
    +  if( enc2<SQLITE_UTF8 || enc2>SQLITE_UTF16BE ){
    +    return SQLITE_MISUSE;
    +  }
    +
    +  /* Check if this call is removing or replacing an existing collation 
    +  ** sequence. If so, and there are active VMs, return busy. If there
    +  ** are no active VMs, invalidate any pre-compiled statements.
    +  */
    +  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);
    +  if( pColl && pColl->xCmp ){
    +    if( db->activeVdbeCnt ){
    +      sqlite3Error(db, SQLITE_BUSY, 
    +        "unable to delete/modify collation sequence due to active statements");
    +      return SQLITE_BUSY;
    +    }
    +    sqlite3ExpirePreparedStatements(db);
    +
    +    /* If collation sequence pColl was created directly by a call to
    +    ** sqlite3_create_collation, and not generated by synthCollSeq(),
    +    ** then any copies made by synthCollSeq() need to be invalidated.
    +    ** Also, collation destructor - CollSeq.xDel() - function may need
    +    ** to be called.
    +    */ 
    +    if( (pColl->enc & ~SQLITE_UTF16_ALIGNED)==enc2 ){
    +      CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
    +      int j;
    +      for(j=0; j<3; j++){
    +        CollSeq *p = &aColl[j];
    +        if( p->enc==pColl->enc ){
    +          if( p->xDel ){
    +            p->xDel(p->pUser);
    +          }
    +          p->xCmp = 0;
    +        }
    +      }
    +    }
    +  }
    +
    +  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);
    +  if( pColl ){
    +    pColl->xCmp = xCompare;
    +    pColl->pUser = pCtx;
    +    pColl->xDel = xDel;
    +    pColl->enc = (u8)(enc2 | (enc & SQLITE_UTF16_ALIGNED));
    +    pColl->type = collType;
    +  }
    +  sqlite3Error(db, SQLITE_OK, 0);
    +  return SQLITE_OK;
    +}
    +
    +
    +/*
    +** This array defines hard upper bounds on limit values.  The
    +** initializer must be kept in sync with the SQLITE_LIMIT_*
    +** #defines in sqlite3.h.
    +*/
    +static const int aHardLimit[] = {
    +  SQLITE_MAX_LENGTH,
    +  SQLITE_MAX_SQL_LENGTH,
    +  SQLITE_MAX_COLUMN,
    +  SQLITE_MAX_EXPR_DEPTH,
    +  SQLITE_MAX_COMPOUND_SELECT,
    +  SQLITE_MAX_VDBE_OP,
    +  SQLITE_MAX_FUNCTION_ARG,
    +  SQLITE_MAX_ATTACHED,
    +  SQLITE_MAX_LIKE_PATTERN_LENGTH,
    +  SQLITE_MAX_VARIABLE_NUMBER,
    +  SQLITE_MAX_TRIGGER_DEPTH,
    +};
    +
    +/*
    +** Make sure the hard limits are set to reasonable values
    +*/
    +#if SQLITE_MAX_LENGTH<100
    +# error SQLITE_MAX_LENGTH must be at least 100
    +#endif
    +#if SQLITE_MAX_SQL_LENGTH<100
    +# error SQLITE_MAX_SQL_LENGTH must be at least 100
    +#endif
    +#if SQLITE_MAX_SQL_LENGTH>SQLITE_MAX_LENGTH
    +# error SQLITE_MAX_SQL_LENGTH must not be greater than SQLITE_MAX_LENGTH
    +#endif
    +#if SQLITE_MAX_COMPOUND_SELECT<2
    +# error SQLITE_MAX_COMPOUND_SELECT must be at least 2
    +#endif
    +#if SQLITE_MAX_VDBE_OP<40
    +# error SQLITE_MAX_VDBE_OP must be at least 40
    +#endif
    +#if SQLITE_MAX_FUNCTION_ARG<0 || SQLITE_MAX_FUNCTION_ARG>1000
    +# error SQLITE_MAX_FUNCTION_ARG must be between 0 and 1000
    +#endif
    +#if SQLITE_MAX_ATTACHED<0 || SQLITE_MAX_ATTACHED>30
    +# error SQLITE_MAX_ATTACHED must be between 0 and 30
    +#endif
    +#if SQLITE_MAX_LIKE_PATTERN_LENGTH<1
    +# error SQLITE_MAX_LIKE_PATTERN_LENGTH must be at least 1
    +#endif
    +#if SQLITE_MAX_COLUMN>32767
    +# error SQLITE_MAX_COLUMN must not exceed 32767
    +#endif
    +#if SQLITE_MAX_TRIGGER_DEPTH<1
    +# error SQLITE_MAX_TRIGGER_DEPTH must be at least 1
    +#endif
    +
    +
    +/*
    +** Change the value of a limit.  Report the old value.
    +** If an invalid limit index is supplied, report -1.
    +** Make no changes but still report the old value if the
    +** new limit is negative.
    +**
    +** A new lower limit does not shrink existing constructs.
    +** It merely prevents new constructs that exceed the limit
    +** from forming.
    +*/
    +SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
    +  int oldLimit;
    +  if( limitId<0 || limitId>=SQLITE_N_LIMIT ){
    +    return -1;
    +  }
    +  oldLimit = db->aLimit[limitId];
    +  if( newLimit>=0 ){
    +    if( newLimit>aHardLimit[limitId] ){
    +      newLimit = aHardLimit[limitId];
    +    }
    +    db->aLimit[limitId] = newLimit;
    +  }
    +  return oldLimit;
    +}
    +
    +/*
    +** This routine does the work of opening a database on behalf of
    +** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"  
    +** is UTF-8 encoded.
    +*/
    +static int openDatabase(
    +  const char *zFilename, /* Database filename UTF-8 encoded */
    +  sqlite3 **ppDb,        /* OUT: Returned database handle */
    +  unsigned flags,        /* Operational flags */
    +  const char *zVfs       /* Name of the VFS to use */
    +){
    +  sqlite3 *db;
    +  int rc;
    +  int isThreadsafe;
    +
    +  *ppDb = 0;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  rc = sqlite3_initialize();
    +  if( rc ) return rc;
    +#endif
    +
    +  if( sqlite3GlobalConfig.bCoreMutex==0 ){
    +    isThreadsafe = 0;
    +  }else if( flags & SQLITE_OPEN_NOMUTEX ){
    +    isThreadsafe = 0;
    +  }else if( flags & SQLITE_OPEN_FULLMUTEX ){
    +    isThreadsafe = 1;
    +  }else{
    +    isThreadsafe = sqlite3GlobalConfig.bFullMutex;
    +  }
    +  if( flags & SQLITE_OPEN_PRIVATECACHE ){
    +    flags &= ~SQLITE_OPEN_SHAREDCACHE;
    +  }else if( sqlite3GlobalConfig.sharedCacheEnabled ){
    +    flags |= SQLITE_OPEN_SHAREDCACHE;
    +  }
    +
    +  /* Remove harmful bits from the flags parameter
    +  **
    +  ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were
    +  ** dealt with in the previous code block.  Besides these, the only
    +  ** valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY,
    +  ** SQLITE_OPEN_READWRITE, and SQLITE_OPEN_CREATE.  Silently mask
    +  ** off all other flags.
    +  */
    +  flags &=  ~( SQLITE_OPEN_DELETEONCLOSE |
    +               SQLITE_OPEN_EXCLUSIVE |
    +               SQLITE_OPEN_MAIN_DB |
    +               SQLITE_OPEN_TEMP_DB | 
    +               SQLITE_OPEN_TRANSIENT_DB | 
    +               SQLITE_OPEN_MAIN_JOURNAL | 
    +               SQLITE_OPEN_TEMP_JOURNAL | 
    +               SQLITE_OPEN_SUBJOURNAL | 
    +               SQLITE_OPEN_MASTER_JOURNAL |
    +               SQLITE_OPEN_NOMUTEX |
    +               SQLITE_OPEN_FULLMUTEX
    +             );
    +
    +  /* Allocate the sqlite data structure */
    +  db = sqlite3MallocZero( sizeof(sqlite3) );
    +  if( db==0 ) goto opendb_out;
    +  if( isThreadsafe ){
    +    db->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
    +    if( db->mutex==0 ){
    +      sqlite3_free(db);
    +      db = 0;
    +      goto opendb_out;
    +    }
    +  }
    +  sqlite3_mutex_enter(db->mutex);
    +  db->errMask = 0xff;
    +  db->nDb = 2;
    +  db->magic = SQLITE_MAGIC_BUSY;
    +  db->aDb = db->aDbStatic;
    +
    +  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );
    +  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
    +  db->autoCommit = 1;
    +  db->nextAutovac = -1;
    +  db->nextPagesize = 0;
    +  db->flags |= SQLITE_ShortColNames
    +#if SQLITE_DEFAULT_FILE_FORMAT<4
    +                 | SQLITE_LegacyFileFmt
    +#endif
    +#ifdef SQLITE_ENABLE_LOAD_EXTENSION
    +                 | SQLITE_LoadExtension
    +#endif
    +#if SQLITE_DEFAULT_RECURSIVE_TRIGGERS
    +                 | SQLITE_RecTriggers
    +#endif
    +      ;
    +  sqlite3HashInit(&db->aCollSeq);
    +#ifndef SQLITE_OMIT_VIRTUALTABLE
    +  sqlite3HashInit(&db->aModule);
    +#endif
    +
    +  db->pVfs = sqlite3_vfs_find(zVfs);
    +  if( !db->pVfs ){
    +    rc = SQLITE_ERROR;
    +    sqlite3Error(db, rc, "no such vfs: %s", zVfs);
    +    goto opendb_out;
    +  }
    +
    +  /* Add the default collation sequence BINARY. BINARY works for both UTF-8
    +  ** and UTF-16, so add a version for each to avoid any unnecessary
    +  ** conversions. The only error that can occur here is a malloc() failure.
    +  */
    +  createCollation(db, "BINARY", SQLITE_UTF8, SQLITE_COLL_BINARY, 0,
    +                  binCollFunc, 0);
    +  createCollation(db, "BINARY", SQLITE_UTF16BE, SQLITE_COLL_BINARY, 0,
    +                  binCollFunc, 0);
    +  createCollation(db, "BINARY", SQLITE_UTF16LE, SQLITE_COLL_BINARY, 0,
    +                  binCollFunc, 0);
    +  createCollation(db, "RTRIM", SQLITE_UTF8, SQLITE_COLL_USER, (void*)1,
    +                  binCollFunc, 0);
    +  if( db->mallocFailed ){
    +    goto opendb_out;
    +  }
    +  db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
    +  assert( db->pDfltColl!=0 );
    +
    +  /* Also add a UTF-8 case-insensitive collation sequence. */
    +  createCollation(db, "NOCASE", SQLITE_UTF8, SQLITE_COLL_NOCASE, 0,
    +                  nocaseCollatingFunc, 0);
    +
    +  /* Open the backend database driver */
    +  db->openFlags = flags;
    +  rc = sqlite3BtreeFactory(db, zFilename, 0, SQLITE_DEFAULT_CACHE_SIZE, 
    +                           flags | SQLITE_OPEN_MAIN_DB,
    +                           &db->aDb[0].pBt);
    +  if( rc!=SQLITE_OK ){
    +    if( rc==SQLITE_IOERR_NOMEM ){
    +      rc = SQLITE_NOMEM;
    +    }
    +    sqlite3Error(db, rc, 0);
    +    goto opendb_out;
    +  }
    +  db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt);
    +  db->aDb[1].pSchema = sqlite3SchemaGet(db, 0);
    +
    +
    +  /* The default safety_level for the main database is 'full'; for the temp
    +  ** database it is 'NONE'. This matches the pager layer defaults.  
    +  */
    +  db->aDb[0].zName = "main";
    +  db->aDb[0].safety_level = 3;
    +  db->aDb[1].zName = "temp";
    +  db->aDb[1].safety_level = 1;
    +
    +  db->magic = SQLITE_MAGIC_OPEN;
    +  if( db->mallocFailed ){
    +    goto opendb_out;
    +  }
    +
    +  /* Register all built-in functions, but do not attempt to read the
    +  ** database schema yet. This is delayed until the first time the database
    +  ** is accessed.
    +  */
    +  sqlite3Error(db, SQLITE_OK, 0);
    +  sqlite3RegisterBuiltinFunctions(db);
    +
    +  /* Load automatic extensions - extensions that have been registered
    +  ** using the sqlite3_automatic_extension() API.
    +  */
    +  sqlite3AutoLoadExtensions(db);
    +  rc = sqlite3_errcode(db);
    +  if( rc!=SQLITE_OK ){
    +    goto opendb_out;
    +  }
    +
    +#ifdef SQLITE_ENABLE_FTS1
    +  if( !db->mallocFailed ){
    +    extern int sqlite3Fts1Init(sqlite3*);
    +    rc = sqlite3Fts1Init(db);
    +  }
    +#endif
    +
    +#ifdef SQLITE_ENABLE_FTS2
    +  if( !db->mallocFailed && rc==SQLITE_OK ){
    +    extern int sqlite3Fts2Init(sqlite3*);
    +    rc = sqlite3Fts2Init(db);
    +  }
    +#endif
    +
    +#ifdef SQLITE_ENABLE_FTS3
    +  if( !db->mallocFailed && rc==SQLITE_OK ){
    +    rc = sqlite3Fts3Init(db);
    +  }
    +#endif
    +
    +#ifdef SQLITE_ENABLE_ICU
    +  if( !db->mallocFailed && rc==SQLITE_OK ){
    +    rc = sqlite3IcuInit(db);
    +  }
    +#endif
    +
    +#ifdef SQLITE_ENABLE_RTREE
    +  if( !db->mallocFailed && rc==SQLITE_OK){
    +    rc = sqlite3RtreeInit(db);
    +  }
    +#endif
    +
    +  sqlite3Error(db, rc, 0);
    +
    +  /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
    +  ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
    +  ** mode.  Doing nothing at all also makes NORMAL the default.
    +  */
    +#ifdef SQLITE_DEFAULT_LOCKING_MODE
    +  db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;
    +  sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),
    +                          SQLITE_DEFAULT_LOCKING_MODE);
    +#endif
    +
    +  /* Enable the lookaside-malloc subsystem */
    +  setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
    +                        sqlite3GlobalConfig.nLookaside);
    +
    +opendb_out:
    +  if( db ){
    +    assert( db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0 );
    +    sqlite3_mutex_leave(db->mutex);
    +  }
    +  rc = sqlite3_errcode(db);
    +  if( rc==SQLITE_NOMEM ){
    +    sqlite3_close(db);
    +    db = 0;
    +  }else if( rc!=SQLITE_OK ){
    +    db->magic = SQLITE_MAGIC_SICK;
    +  }
    +  *ppDb = db;
    +  return sqlite3ApiExit(0, rc);
    +}
    +
    +/*
    +** Open a new database handle.
    +*/
    +SQLITE_API int sqlite3_open(
    +  const char *zFilename, 
    +  sqlite3 **ppDb 
    +){
    +  return openDatabase(zFilename, ppDb,
    +                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
    +}
    +SQLITE_API int sqlite3_open_v2(
    +  const char *filename,   /* Database filename (UTF-8) */
    +  sqlite3 **ppDb,         /* OUT: SQLite db handle */
    +  int flags,              /* Flags */
    +  const char *zVfs        /* Name of VFS module to use */
    +){
    +  return openDatabase(filename, ppDb, flags, zVfs);
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Open a new database handle.
    +*/
    +SQLITE_API int sqlite3_open16(
    +  const void *zFilename, 
    +  sqlite3 **ppDb
    +){
    +  char const *zFilename8;   /* zFilename encoded in UTF-8 instead of UTF-16 */
    +  sqlite3_value *pVal;
    +  int rc;
    +
    +  assert( zFilename );
    +  assert( ppDb );
    +  *ppDb = 0;
    +#ifndef SQLITE_OMIT_AUTOINIT
    +  rc = sqlite3_initialize();
    +  if( rc ) return rc;
    +#endif
    +  pVal = sqlite3ValueNew(0);
    +  sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);
    +  zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);
    +  if( zFilename8 ){
    +    rc = openDatabase(zFilename8, ppDb,
    +                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
    +    assert( *ppDb || rc==SQLITE_NOMEM );
    +    if( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){
    +      ENC(*ppDb) = SQLITE_UTF16NATIVE;
    +    }
    +  }else{
    +    rc = SQLITE_NOMEM;
    +  }
    +  sqlite3ValueFree(pVal);
    +
    +  return sqlite3ApiExit(0, rc);
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** Register a new collation sequence with the database handle db.
    +*/
    +SQLITE_API int sqlite3_create_collation(
    +  sqlite3* db, 
    +  const char *zName, 
    +  int enc, 
    +  void* pCtx,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +){
    +  int rc;
    +  sqlite3_mutex_enter(db->mutex);
    +  assert( !db->mallocFailed );
    +  rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** Register a new collation sequence with the database handle db.
    +*/
    +SQLITE_API int sqlite3_create_collation_v2(
    +  sqlite3* db, 
    +  const char *zName, 
    +  int enc, 
    +  void* pCtx,
    +  int(*xCompare)(void*,int,const void*,int,const void*),
    +  void(*xDel)(void*)
    +){
    +  int rc;
    +  sqlite3_mutex_enter(db->mutex);
    +  assert( !db->mallocFailed );
    +  rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, xDel);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Register a new collation sequence with the database handle db.
    +*/
    +SQLITE_API int sqlite3_create_collation16(
    +  sqlite3* db, 
    +  const void *zName,
    +  int enc, 
    +  void* pCtx,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +){
    +  int rc = SQLITE_OK;
    +  char *zName8;
    +  sqlite3_mutex_enter(db->mutex);
    +  assert( !db->mallocFailed );
    +  zName8 = sqlite3Utf16to8(db, zName, -1);
    +  if( zName8 ){
    +    rc = createCollation(db, zName8, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0);
    +    sqlite3DbFree(db, zName8);
    +  }
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +/*
    +** Register a collation sequence factory callback with the database handle
    +** db. Replace any previously installed collation sequence factory.
    +*/
    +SQLITE_API int sqlite3_collation_needed(
    +  sqlite3 *db, 
    +  void *pCollNeededArg, 
    +  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
    +){
    +  sqlite3_mutex_enter(db->mutex);
    +  db->xCollNeeded = xCollNeeded;
    +  db->xCollNeeded16 = 0;
    +  db->pCollNeededArg = pCollNeededArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +#ifndef SQLITE_OMIT_UTF16
    +/*
    +** Register a collation sequence factory callback with the database handle
    +** db. Replace any previously installed collation sequence factory.
    +*/
    +SQLITE_API int sqlite3_collation_needed16(
    +  sqlite3 *db, 
    +  void *pCollNeededArg, 
    +  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
    +){
    +  sqlite3_mutex_enter(db->mutex);
    +  db->xCollNeeded = 0;
    +  db->xCollNeeded16 = xCollNeeded16;
    +  db->pCollNeededArg = pCollNeededArg;
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +#endif /* SQLITE_OMIT_UTF16 */
    +
    +#ifndef SQLITE_OMIT_GLOBALRECOVER
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** This function is now an anachronism. It used to be used to recover from a
    +** malloc() failure, but SQLite now does this automatically.
    +*/
    +SQLITE_API int sqlite3_global_recover(void){
    +  return SQLITE_OK;
    +}
    +#endif
    +#endif
    +
    +/*
    +** Test to see whether or not the database connection is in autocommit
    +** mode.  Return TRUE if it is and FALSE if not.  Autocommit mode is on
    +** by default.  Autocommit is disabled by a BEGIN statement and reenabled
    +** by the next COMMIT or ROLLBACK.
    +**
    +******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
    +*/
    +SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
    +  return db->autoCommit;
    +}
    +
    +#ifdef SQLITE_DEBUG
    +/*
    +** The following routine is subtituted for constant SQLITE_CORRUPT in
    +** debugging builds.  This provides a way to set a breakpoint for when
    +** corruption is first detected.
    +*/
    +SQLITE_PRIVATE int sqlite3Corrupt(void){
    +  return SQLITE_CORRUPT;
    +}
    +#endif
    +
    +#ifndef SQLITE_OMIT_DEPRECATED
    +/*
    +** This is a convenience routine that makes sure that all thread-specific
    +** data for this thread has been deallocated.
    +**
    +** SQLite no longer uses thread-specific data so this routine is now a
    +** no-op.  It is retained for historical compatibility.
    +*/
    +SQLITE_API void sqlite3_thread_cleanup(void){
    +}
    +#endif
    +
    +/*
    +** Return meta information about a specific column of a database table.
    +** See comment in sqlite3.h (sqlite.h.in) for details.
    +*/
    +#ifdef SQLITE_ENABLE_COLUMN_METADATA
    +SQLITE_API int sqlite3_table_column_metadata(
    +  sqlite3 *db,                /* Connection handle */
    +  const char *zDbName,        /* Database name or NULL */
    +  const char *zTableName,     /* Table name */
    +  const char *zColumnName,    /* Column name */
    +  char const **pzDataType,    /* OUTPUT: Declared data type */
    +  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
    +  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
    +  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
    +  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
    +){
    +  int rc;
    +  char *zErrMsg = 0;
    +  Table *pTab = 0;
    +  Column *pCol = 0;
    +  int iCol;
    +
    +  char const *zDataType = 0;
    +  char const *zCollSeq = 0;
    +  int notnull = 0;
    +  int primarykey = 0;
    +  int autoinc = 0;
    +
    +  /* Ensure the database schema has been loaded */
    +  sqlite3_mutex_enter(db->mutex);
    +  (void)sqlite3SafetyOn(db);
    +  sqlite3BtreeEnterAll(db);
    +  rc = sqlite3Init(db, &zErrMsg);
    +  if( SQLITE_OK!=rc ){
    +    goto error_out;
    +  }
    +
    +  /* Locate the table in question */
    +  pTab = sqlite3FindTable(db, zTableName, zDbName);
    +  if( !pTab || pTab->pSelect ){
    +    pTab = 0;
    +    goto error_out;
    +  }
    +
    +  /* Find the column for which info is requested */
    +  if( sqlite3IsRowid(zColumnName) ){
    +    iCol = pTab->iPKey;
    +    if( iCol>=0 ){
    +      pCol = &pTab->aCol[iCol];
    +    }
    +  }else{
    +    for(iCol=0; iCol<pTab->nCol; iCol++){
    +      pCol = &pTab->aCol[iCol];
    +      if( 0==sqlite3StrICmp(pCol->zName, zColumnName) ){
    +        break;
    +      }
    +    }
    +    if( iCol==pTab->nCol ){
    +      pTab = 0;
    +      goto error_out;
    +    }
    +  }
    +
    +  /* The following block stores the meta information that will be returned
    +  ** to the caller in local variables zDataType, zCollSeq, notnull, primarykey
    +  ** and autoinc. At this point there are two possibilities:
    +  ** 
    +  **     1. The specified column name was rowid", "oid" or "_rowid_" 
    +  **        and there is no explicitly declared IPK column. 
    +  **
    +  **     2. The table is not a view and the column name identified an 
    +  **        explicitly declared column. Copy meta information from *pCol.
    +  */ 
    +  if( pCol ){
    +    zDataType = pCol->zType;
    +    zCollSeq = pCol->zColl;
    +    notnull = pCol->notNull!=0;
    +    primarykey  = pCol->isPrimKey!=0;
    +    autoinc = pTab->iPKey==iCol && (pTab->tabFlags & TF_Autoincrement)!=0;
    +  }else{
    +    zDataType = "INTEGER";
    +    primarykey = 1;
    +  }
    +  if( !zCollSeq ){
    +    zCollSeq = "BINARY";
    +  }
    +
    +error_out:
    +  sqlite3BtreeLeaveAll(db);
    +  (void)sqlite3SafetyOff(db);
    +
    +  /* Whether the function call succeeded or failed, set the output parameters
    +  ** to whatever their local counterparts contain. If an error did occur,
    +  ** this has the effect of zeroing all output parameters.
    +  */
    +  if( pzDataType ) *pzDataType = zDataType;
    +  if( pzCollSeq ) *pzCollSeq = zCollSeq;
    +  if( pNotNull ) *pNotNull = notnull;
    +  if( pPrimaryKey ) *pPrimaryKey = primarykey;
    +  if( pAutoinc ) *pAutoinc = autoinc;
    +
    +  if( SQLITE_OK==rc && !pTab ){
    +    sqlite3DbFree(db, zErrMsg);
    +    zErrMsg = sqlite3MPrintf(db, "no such table column: %s.%s", zTableName,
    +        zColumnName);
    +    rc = SQLITE_ERROR;
    +  }
    +  sqlite3Error(db, rc, (zErrMsg?"%s":0), zErrMsg);
    +  sqlite3DbFree(db, zErrMsg);
    +  rc = sqlite3ApiExit(db, rc);
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +#endif
    +
    +/*
    +** Sleep for a little while.  Return the amount of time slept.
    +*/
    +SQLITE_API int sqlite3_sleep(int ms){
    +  sqlite3_vfs *pVfs;
    +  int rc;
    +  pVfs = sqlite3_vfs_find(0);
    +  if( pVfs==0 ) return 0;
    +
    +  /* This function works in milliseconds, but the underlying OsSleep() 
    +  ** API uses microseconds. Hence the 1000's.
    +  */
    +  rc = (sqlite3OsSleep(pVfs, 1000*ms)/1000);
    +  return rc;
    +}
    +
    +/*
    +** Enable or disable the extended result codes.
    +*/
    +SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
    +  sqlite3_mutex_enter(db->mutex);
    +  db->errMask = onoff ? 0xffffffff : 0xff;
    +  sqlite3_mutex_leave(db->mutex);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Invoke the xFileControl method on a particular database.
    +*/
    +SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
    +  int rc = SQLITE_ERROR;
    +  int iDb;
    +  sqlite3_mutex_enter(db->mutex);
    +  if( zDbName==0 ){
    +    iDb = 0;
    +  }else{
    +    for(iDb=0; iDb<db->nDb; iDb++){
    +      if( strcmp(db->aDb[iDb].zName, zDbName)==0 ) break;
    +    }
    +  }
    +  if( iDb<db->nDb ){
    +    Btree *pBtree = db->aDb[iDb].pBt;
    +    if( pBtree ){
    +      Pager *pPager;
    +      sqlite3_file *fd;
    +      sqlite3BtreeEnter(pBtree);
    +      pPager = sqlite3BtreePager(pBtree);
    +      assert( pPager!=0 );
    +      fd = sqlite3PagerFile(pPager);
    +      assert( fd!=0 );
    +      if( fd->pMethods ){
    +        rc = sqlite3OsFileControl(fd, op, pArg);
    +      }
    +      sqlite3BtreeLeave(pBtree);
    +    }
    +  }
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;   
    +}
    +
    +/*
    +** Interface to the testing logic.
    +*/
    +SQLITE_API int sqlite3_test_control(int op, ...){
    +  int rc = 0;
    +#ifndef SQLITE_OMIT_BUILTIN_TEST
    +  va_list ap;
    +  va_start(ap, op);
    +  switch( op ){
    +
    +    /*
    +    ** Save the current state of the PRNG.
    +    */
    +    case SQLITE_TESTCTRL_PRNG_SAVE: {
    +      sqlite3PrngSaveState();
    +      break;
    +    }
    +
    +    /*
    +    ** Restore the state of the PRNG to the last state saved using
    +    ** PRNG_SAVE.  If PRNG_SAVE has never before been called, then
    +    ** this verb acts like PRNG_RESET.
    +    */
    +    case SQLITE_TESTCTRL_PRNG_RESTORE: {
    +      sqlite3PrngRestoreState();
    +      break;
    +    }
    +
    +    /*
    +    ** Reset the PRNG back to its uninitialized state.  The next call
    +    ** to sqlite3_randomness() will reseed the PRNG using a single call
    +    ** to the xRandomness method of the default VFS.
    +    */
    +    case SQLITE_TESTCTRL_PRNG_RESET: {
    +      sqlite3PrngResetState();
    +      break;
    +    }
    +
    +    /*
    +    **  sqlite3_test_control(BITVEC_TEST, size, program)
    +    **
    +    ** Run a test against a Bitvec object of size.  The program argument
    +    ** is an array of integers that defines the test.  Return -1 on a
    +    ** memory allocation error, 0 on success, or non-zero for an error.
    +    ** See the sqlite3BitvecBuiltinTest() for additional information.
    +    */
    +    case SQLITE_TESTCTRL_BITVEC_TEST: {
    +      int sz = va_arg(ap, int);
    +      int *aProg = va_arg(ap, int*);
    +      rc = sqlite3BitvecBuiltinTest(sz, aProg);
    +      break;
    +    }
    +
    +    /*
    +    **  sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd)
    +    **
    +    ** Register hooks to call to indicate which malloc() failures 
    +    ** are benign.
    +    */
    +    case SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: {
    +      typedef void (*void_function)(void);
    +      void_function xBenignBegin;
    +      void_function xBenignEnd;
    +      xBenignBegin = va_arg(ap, void_function);
    +      xBenignEnd = va_arg(ap, void_function);
    +      sqlite3BenignMallocHooks(xBenignBegin, xBenignEnd);
    +      break;
    +    }
    +
    +    /*
    +    **  sqlite3_test_control(SQLITE_TESTCTRL_PENDING_BYTE, unsigned int X)
    +    **
    +    ** Set the PENDING byte to the value in the argument, if X>0.
    +    ** Make no changes if X==0.  Return the value of the pending byte
    +    ** as it existing before this routine was called.
    +    **
    +    ** IMPORTANT:  Changing the PENDING byte from 0x40000000 results in
    +    ** an incompatible database file format.  Changing the PENDING byte
    +    ** while any database connection is open results in undefined and
    +    ** dileterious behavior.
    +    */
    +    case SQLITE_TESTCTRL_PENDING_BYTE: {
    +      unsigned int newVal = va_arg(ap, unsigned int);
    +      rc = sqlite3PendingByte;
    +      if( newVal ) sqlite3PendingByte = newVal;
    +      break;
    +    }
    +
    +    /*
    +    **  sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, int X)
    +    **
    +    ** This action provides a run-time test to see whether or not
    +    ** assert() was enabled at compile-time.  If X is true and assert()
    +    ** is enabled, then the return value is true.  If X is true and
    +    ** assert() is disabled, then the return value is zero.  If X is
    +    ** false and assert() is enabled, then the assertion fires and the
    +    ** process aborts.  If X is false and assert() is disabled, then the
    +    ** return value is zero.
    +    */
    +    case SQLITE_TESTCTRL_ASSERT: {
    +      volatile int x = 0;
    +      assert( (x = va_arg(ap,int))!=0 );
    +      rc = x;
    +      break;
    +    }
    +
    +
    +    /*
    +    **  sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, int X)
    +    **
    +    ** This action provides a run-time test to see how the ALWAYS and
    +    ** NEVER macros were defined at compile-time.
    +    **
    +    ** The return value is ALWAYS(X).  
    +    **
    +    ** The recommended test is X==2.  If the return value is 2, that means
    +    ** ALWAYS() and NEVER() are both no-op pass-through macros, which is the
    +    ** default setting.  If the return value is 1, then ALWAYS() is either
    +    ** hard-coded to true or else it asserts if its argument is false.
    +    ** The first behavior (hard-coded to true) is the case if
    +    ** SQLITE_TESTCTRL_ASSERT shows that assert() is disabled and the second
    +    ** behavior (assert if the argument to ALWAYS() is false) is the case if
    +    ** SQLITE_TESTCTRL_ASSERT shows that assert() is enabled.
    +    **
    +    ** The run-time test procedure might look something like this:
    +    **
    +    **    if( sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, 2)==2 ){
    +    **      // ALWAYS() and NEVER() are no-op pass-through macros
    +    **    }else if( sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, 1) ){
    +    **      // ALWAYS(x) asserts that x is true. NEVER(x) asserts x is false.
    +    **    }else{
    +    **      // ALWAYS(x) is a constant 1.  NEVER(x) is a constant 0.
    +    **    }
    +    */
    +    case SQLITE_TESTCTRL_ALWAYS: {
    +      int x = va_arg(ap,int);
    +      rc = ALWAYS(x);
    +      break;
    +    }
    +
    +    /*   sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
    +    **
    +    ** Set the nReserve size to N for the main database on the database
    +    ** connection db.
    +    */
    +    case SQLITE_TESTCTRL_RESERVE: {
    +      sqlite3 *db = va_arg(ap, sqlite3*);
    +      int x = va_arg(ap,int);
    +      sqlite3_mutex_enter(db->mutex);
    +      sqlite3BtreeSetPageSize(db->aDb[0].pBt, 0, x, 0);
    +      sqlite3_mutex_leave(db->mutex);
    +      break;
    +    }
    +
    +  }
    +  va_end(ap);
    +#endif /* SQLITE_OMIT_BUILTIN_TEST */
    +  return rc;
    +}
    +
    +/************** End of main.c ************************************************/
    +/************** Begin file notify.c ******************************************/
    +/*
    +** 2009 March 3
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +**
    +** This file contains the implementation of the sqlite3_unlock_notify()
    +** API method and its associated functionality.
    +**
    +** $Id: notify.c,v 1.4 2009/04/07 22:06:57 drh Exp $
    +*/
    +
    +/* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */
    +#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
    +
    +/*
    +** Public interfaces:
    +**
    +**   sqlite3ConnectionBlocked()
    +**   sqlite3ConnectionUnlocked()
    +**   sqlite3ConnectionClosed()
    +**   sqlite3_unlock_notify()
    +*/
    +
    +#define assertMutexHeld() \
    +  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) )
    +
    +/*
    +** Head of a linked list of all sqlite3 objects created by this process
    +** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
    +** is not NULL. This variable may only accessed while the STATIC_MASTER
    +** mutex is held.
    +*/
    +static sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;
    +
    +#ifndef NDEBUG
    +/*
    +** This function is a complex assert() that verifies the following 
    +** properties of the blocked connections list:
    +**
    +**   1) Each entry in the list has a non-NULL value for either 
    +**      pUnlockConnection or pBlockingConnection, or both.
    +**
    +**   2) All entries in the list that share a common value for 
    +**      xUnlockNotify are grouped together.
    +**
    +**   3) If the argument db is not NULL, then none of the entries in the
    +**      blocked connections list have pUnlockConnection or pBlockingConnection
    +**      set to db. This is used when closing connection db.
    +*/
    +static void checkListProperties(sqlite3 *db){
    +  sqlite3 *p;
    +  for(p=sqlite3BlockedList; p; p=p->pNextBlocked){
    +    int seen = 0;
    +    sqlite3 *p2;
    +
    +    /* Verify property (1) */
    +    assert( p->pUnlockConnection || p->pBlockingConnection );
    +
    +    /* Verify property (2) */
    +    for(p2=sqlite3BlockedList; p2!=p; p2=p2->pNextBlocked){
    +      if( p2->xUnlockNotify==p->xUnlockNotify ) seen = 1;
    +      assert( p2->xUnlockNotify==p->xUnlockNotify || !seen );
    +      assert( db==0 || p->pUnlockConnection!=db );
    +      assert( db==0 || p->pBlockingConnection!=db );
    +    }
    +  }
    +}
    +#else
    +# define checkListProperties(x)
    +#endif
    +
    +/*
    +** Remove connection db from the blocked connections list. If connection
    +** db is not currently a part of the list, this function is a no-op.
    +*/
    +static void removeFromBlockedList(sqlite3 *db){
    +  sqlite3 **pp;
    +  assertMutexHeld();
    +  for(pp=&sqlite3BlockedList; *pp; pp = &(*pp)->pNextBlocked){
    +    if( *pp==db ){
    +      *pp = (*pp)->pNextBlocked;
    +      break;
    +    }
    +  }
    +}
    +
    +/*
    +** Add connection db to the blocked connections list. It is assumed
    +** that it is not already a part of the list.
    +*/
    +static void addToBlockedList(sqlite3 *db){
    +  sqlite3 **pp;
    +  assertMutexHeld();
    +  for(
    +    pp=&sqlite3BlockedList; 
    +    *pp && (*pp)->xUnlockNotify!=db->xUnlockNotify; 
    +    pp=&(*pp)->pNextBlocked
    +  );
    +  db->pNextBlocked = *pp;
    +  *pp = db;
    +}
    +
    +/*
    +** Obtain the STATIC_MASTER mutex.
    +*/
    +static void enterMutex(void){
    +  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +  checkListProperties(0);
    +}
    +
    +/*
    +** Release the STATIC_MASTER mutex.
    +*/
    +static void leaveMutex(void){
    +  assertMutexHeld();
    +  checkListProperties(0);
    +  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
    +}
    +
    +/*
    +** Register an unlock-notify callback.
    +**
    +** This is called after connection "db" has attempted some operation
    +** but has received an SQLITE_LOCKED error because another connection
    +** (call it pOther) in the same process was busy using the same shared
    +** cache.  pOther is found by looking at db->pBlockingConnection.
    +**
    +** If there is no blocking connection, the callback is invoked immediately,
    +** before this routine returns.
    +**
    +** If pOther is already blocked on db, then report SQLITE_LOCKED, to indicate
    +** a deadlock.
    +**
    +** Otherwise, make arrangements to invoke xNotify when pOther drops
    +** its locks.
    +**
    +** Each call to this routine overrides any prior callbacks registered
    +** on the same "db".  If xNotify==0 then any prior callbacks are immediately
    +** cancelled.
    +*/
    +SQLITE_API int sqlite3_unlock_notify(
    +  sqlite3 *db,
    +  void (*xNotify)(void **, int),
    +  void *pArg
    +){
    +  int rc = SQLITE_OK;
    +
    +  sqlite3_mutex_enter(db->mutex);
    +  enterMutex();
    +
    +  if( xNotify==0 ){
    +    removeFromBlockedList(db);
    +    db->pUnlockConnection = 0;
    +    db->xUnlockNotify = 0;
    +    db->pUnlockArg = 0;
    +  }else if( 0==db->pBlockingConnection ){
    +    /* The blocking transaction has been concluded. Or there never was a 
    +    ** blocking transaction. In either case, invoke the notify callback
    +    ** immediately. 
    +    */
    +    xNotify(&pArg, 1);
    +  }else{
    +    sqlite3 *p;
    +
    +    for(p=db->pBlockingConnection; p && p!=db; p=p->pUnlockConnection){}
    +    if( p ){
    +      rc = SQLITE_LOCKED;              /* Deadlock detected. */
    +    }else{
    +      db->pUnlockConnection = db->pBlockingConnection;
    +      db->xUnlockNotify = xNotify;
    +      db->pUnlockArg = pArg;
    +      removeFromBlockedList(db);
    +      addToBlockedList(db);
    +    }
    +  }
    +
    +  leaveMutex();
    +  assert( !db->mallocFailed );
    +  sqlite3Error(db, rc, (rc?"database is deadlocked":0));
    +  sqlite3_mutex_leave(db->mutex);
    +  return rc;
    +}
    +
    +/*
    +** This function is called while stepping or preparing a statement 
    +** associated with connection db. The operation will return SQLITE_LOCKED
    +** to the user because it requires a lock that will not be available
    +** until connection pBlocker concludes its current transaction.
    +*/
    +SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
    +  enterMutex();
    +  if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){
    +    addToBlockedList(db);
    +  }
    +  db->pBlockingConnection = pBlocker;
    +  leaveMutex();
    +}
    +
    +/*
    +** This function is called when
    +** the transaction opened by database db has just finished. Locks held 
    +** by database connection db have been released.
    +**
    +** This function loops through each entry in the blocked connections
    +** list and does the following:
    +**
    +**   1) If the sqlite3.pBlockingConnection member of a list entry is
    +**      set to db, then set pBlockingConnection=0.
    +**
    +**   2) If the sqlite3.pUnlockConnection member of a list entry is
    +**      set to db, then invoke the configured unlock-notify callback and
    +**      set pUnlockConnection=0.
    +**
    +**   3) If the two steps above mean that pBlockingConnection==0 and
    +**      pUnlockConnection==0, remove the entry from the blocked connections
    +**      list.
    +*/
    +SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){
    +  void (*xUnlockNotify)(void **, int) = 0; /* Unlock-notify cb to invoke */
    +  int nArg = 0;                            /* Number of entries in aArg[] */
    +  sqlite3 **pp;                            /* Iterator variable */
    +  void **aArg;               /* Arguments to the unlock callback */
    +  void **aDyn = 0;           /* Dynamically allocated space for aArg[] */
    +  void *aStatic[16];         /* Starter space for aArg[].  No malloc required */
    +
    +  aArg = aStatic;
    +  enterMutex();         /* Enter STATIC_MASTER mutex */
    +
    +  /* This loop runs once for each entry in the blocked-connections list. */
    +  for(pp=&sqlite3BlockedList; *pp; /* no-op */ ){
    +    sqlite3 *p = *pp;
    +
    +    /* Step 1. */
    +    if( p->pBlockingConnection==db ){
    +      p->pBlockingConnection = 0;
    +    }
    +
    +    /* Step 2. */
    +    if( p->pUnlockConnection==db ){
    +      assert( p->xUnlockNotify );
    +      if( p->xUnlockNotify!=xUnlockNotify && nArg!=0 ){
    +        xUnlockNotify(aArg, nArg);
    +        nArg = 0;
    +      }
    +
    +      sqlite3BeginBenignMalloc();
    +      assert( aArg==aDyn || (aDyn==0 && aArg==aStatic) );
    +      assert( nArg<=(int)ArraySize(aStatic) || aArg==aDyn );
    +      if( (!aDyn && nArg==(int)ArraySize(aStatic))
    +       || (aDyn && nArg==(int)(sqlite3DbMallocSize(db, aDyn)/sizeof(void*)))
    +      ){
    +        /* The aArg[] array needs to grow. */
    +        void **pNew = (void **)sqlite3Malloc(nArg*sizeof(void *)*2);
    +        if( pNew ){
    +          memcpy(pNew, aArg, nArg*sizeof(void *));
    +          sqlite3_free(aDyn);
    +          aDyn = aArg = pNew;
    +        }else{
    +          /* This occurs when the array of context pointers that need to
    +          ** be passed to the unlock-notify callback is larger than the
    +          ** aStatic[] array allocated on the stack and the attempt to 
    +          ** allocate a larger array from the heap has failed.
    +          **
    +          ** This is a difficult situation to handle. Returning an error
    +          ** code to the caller is insufficient, as even if an error code
    +          ** is returned the transaction on connection db will still be
    +          ** closed and the unlock-notify callbacks on blocked connections
    +          ** will go unissued. This might cause the application to wait
    +          ** indefinitely for an unlock-notify callback that will never 
    +          ** arrive.
    +          **
    +          ** Instead, invoke the unlock-notify callback with the context
    +          ** array already accumulated. We can then clear the array and
    +          ** begin accumulating any further context pointers without 
    +          ** requiring any dynamic allocation. This is sub-optimal because
    +          ** it means that instead of one callback with a large array of
    +          ** context pointers the application will receive two or more
    +          ** callbacks with smaller arrays of context pointers, which will
    +          ** reduce the applications ability to prioritize multiple 
    +          ** connections. But it is the best that can be done under the
    +          ** circumstances.
    +          */
    +          xUnlockNotify(aArg, nArg);
    +          nArg = 0;
    +        }
    +      }
    +      sqlite3EndBenignMalloc();
    +
    +      aArg[nArg++] = p->pUnlockArg;
    +      xUnlockNotify = p->xUnlockNotify;
    +      p->pUnlockConnection = 0;
    +      p->xUnlockNotify = 0;
    +      p->pUnlockArg = 0;
    +    }
    +
    +    /* Step 3. */
    +    if( p->pBlockingConnection==0 && p->pUnlockConnection==0 ){
    +      /* Remove connection p from the blocked connections list. */
    +      *pp = p->pNextBlocked;
    +      p->pNextBlocked = 0;
    +    }else{
    +      pp = &p->pNextBlocked;
    +    }
    +  }
    +
    +  if( nArg!=0 ){
    +    xUnlockNotify(aArg, nArg);
    +  }
    +  sqlite3_free(aDyn);
    +  leaveMutex();         /* Leave STATIC_MASTER mutex */
    +}
    +
    +/*
    +** This is called when the database connection passed as an argument is 
    +** being closed. The connection is removed from the blocked list.
    +*/
    +SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
    +  sqlite3ConnectionUnlocked(db);
    +  enterMutex();
    +  removeFromBlockedList(db);
    +  checkListProperties(db);
    +  leaveMutex();
    +}
    +#endif
    +
    +/************** End of notify.c **********************************************/
    +/************** Begin file fts3.c ********************************************/
    +/*
    +** 2006 Oct 10
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This is an SQLite module implementing full-text search.
    +*/
    +
    +/*
    +** The code in this file is only compiled if:
    +**
    +**     * The FTS3 module is being built as an extension
    +**       (in which case SQLITE_CORE is not defined), or
    +**
    +**     * The FTS3 module is being built into the core of
    +**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    +*/
    +
    +/* TODO(shess) Consider exporting this comment to an HTML file or the
    +** wiki.
    +*/
    +/* The full-text index is stored in a series of b+tree (-like)
    +** structures called segments which map terms to doclists.  The
    +** structures are like b+trees in layout, but are constructed from the
    +** bottom up in optimal fashion and are not updatable.  Since trees
    +** are built from the bottom up, things will be described from the
    +** bottom up.
    +**
    +**
    +**** Varints ****
    +** The basic unit of encoding is a variable-length integer called a
    +** varint.  We encode variable-length integers in little-endian order
    +** using seven bits * per byte as follows:
    +**
    +** KEY:
    +**         A = 0xxxxxxx    7 bits of data and one flag bit
    +**         B = 1xxxxxxx    7 bits of data and one flag bit
    +**
    +**  7 bits - A
    +** 14 bits - BA
    +** 21 bits - BBA
    +** and so on.
    +**
    +** This is identical to how sqlite encodes varints (see util.c).
    +**
    +**
    +**** Document lists ****
    +** A doclist (document list) holds a docid-sorted list of hits for a
    +** given term.  Doclists hold docids, and can optionally associate
    +** token positions and offsets with docids.
    +**
    +** A DL_POSITIONS_OFFSETS doclist is stored like this:
    +**
    +** array {
    +**   varint docid;
    +**   array {                (position list for column 0)
    +**     varint position;     (delta from previous position plus POS_BASE)
    +**     varint startOffset;  (delta from previous startOffset)
    +**     varint endOffset;    (delta from startOffset)
    +**   }
    +**   array {
    +**     varint POS_COLUMN;   (marks start of position list for new column)
    +**     varint column;       (index of new column)
    +**     array {
    +**       varint position;   (delta from previous position plus POS_BASE)
    +**       varint startOffset;(delta from previous startOffset)
    +**       varint endOffset;  (delta from startOffset)
    +**     }
    +**   }
    +**   varint POS_END;        (marks end of positions for this document.
    +** }
    +**
    +** Here, array { X } means zero or more occurrences of X, adjacent in
    +** memory.  A "position" is an index of a token in the token stream
    +** generated by the tokenizer, while an "offset" is a byte offset,
    +** both based at 0.  Note that POS_END and POS_COLUMN occur in the
    +** same logical place as the position element, and act as sentinals
    +** ending a position list array.
    +**
    +** A DL_POSITIONS doclist omits the startOffset and endOffset
    +** information.  A DL_DOCIDS doclist omits both the position and
    +** offset information, becoming an array of varint-encoded docids.
    +**
    +** On-disk data is stored as type DL_DEFAULT, so we don't serialize
    +** the type.  Due to how deletion is implemented in the segmentation
    +** system, on-disk doclists MUST store at least positions.
    +**
    +**
    +**** Segment leaf nodes ****
    +** Segment leaf nodes store terms and doclists, ordered by term.  Leaf
    +** nodes are written using LeafWriter, and read using LeafReader (to
    +** iterate through a single leaf node's data) and LeavesReader (to
    +** iterate through a segment's entire leaf layer).  Leaf nodes have
    +** the format:
    +**
    +** varint iHeight;             (height from leaf level, always 0)
    +** varint nTerm;               (length of first term)
    +** char pTerm[nTerm];          (content of first term)
    +** varint nDoclist;            (length of term's associated doclist)
    +** char pDoclist[nDoclist];    (content of doclist)
    +** array {
    +**                             (further terms are delta-encoded)
    +**   varint nPrefix;           (length of prefix shared with previous term)
    +**   varint nSuffix;           (length of unshared suffix)
    +**   char pTermSuffix[nSuffix];(unshared suffix of next term)
    +**   varint nDoclist;          (length of term's associated doclist)
    +**   char pDoclist[nDoclist];  (content of doclist)
    +** }
    +**
    +** Here, array { X } means zero or more occurrences of X, adjacent in
    +** memory.
    +**
    +** Leaf nodes are broken into blocks which are stored contiguously in
    +** the %_segments table in sorted order.  This means that when the end
    +** of a node is reached, the next term is in the node with the next
    +** greater node id.
    +**
    +** New data is spilled to a new leaf node when the current node
    +** exceeds LEAF_MAX bytes (default 2048).  New data which itself is
    +** larger than STANDALONE_MIN (default 1024) is placed in a standalone
    +** node (a leaf node with a single term and doclist).  The goal of
    +** these settings is to pack together groups of small doclists while
    +** making it efficient to directly access large doclists.  The
    +** assumption is that large doclists represent terms which are more
    +** likely to be query targets.
    +**
    +** TODO(shess) It may be useful for blocking decisions to be more
    +** dynamic.  For instance, it may make more sense to have a 2.5k leaf
    +** node rather than splitting into 2k and .5k nodes.  My intuition is
    +** that this might extend through 2x or 4x the pagesize.
    +**
    +**
    +**** Segment interior nodes ****
    +** Segment interior nodes store blockids for subtree nodes and terms
    +** to describe what data is stored by the each subtree.  Interior
    +** nodes are written using InteriorWriter, and read using
    +** InteriorReader.  InteriorWriters are created as needed when
    +** SegmentWriter creates new leaf nodes, or when an interior node
    +** itself grows too big and must be split.  The format of interior
    +** nodes:
    +**
    +** varint iHeight;           (height from leaf level, always >0)
    +** varint iBlockid;          (block id of node's leftmost subtree)
    +** optional {
    +**   varint nTerm;           (length of first term)
    +**   char pTerm[nTerm];      (content of first term)
    +**   array {
    +**                                (further terms are delta-encoded)
    +**     varint nPrefix;            (length of shared prefix with previous term)
    +**     varint nSuffix;            (length of unshared suffix)
    +**     char pTermSuffix[nSuffix]; (unshared suffix of next term)
    +**   }
    +** }
    +**
    +** Here, optional { X } means an optional element, while array { X }
    +** means zero or more occurrences of X, adjacent in memory.
    +**
    +** An interior node encodes n terms separating n+1 subtrees.  The
    +** subtree blocks are contiguous, so only the first subtree's blockid
    +** is encoded.  The subtree at iBlockid will contain all terms less
    +** than the first term encoded (or all terms if no term is encoded).
    +** Otherwise, for terms greater than or equal to pTerm[i] but less
    +** than pTerm[i+1], the subtree for that term will be rooted at
    +** iBlockid+i.  Interior nodes only store enough term data to
    +** distinguish adjacent children (if the rightmost term of the left
    +** child is "something", and the leftmost term of the right child is
    +** "wicked", only "w" is stored).
    +**
    +** New data is spilled to a new interior node at the same height when
    +** the current node exceeds INTERIOR_MAX bytes (default 2048).
    +** INTERIOR_MIN_TERMS (default 7) keeps large terms from monopolizing
    +** interior nodes and making the tree too skinny.  The interior nodes
    +** at a given height are naturally tracked by interior nodes at
    +** height+1, and so on.
    +**
    +**
    +**** Segment directory ****
    +** The segment directory in table %_segdir stores meta-information for
    +** merging and deleting segments, and also the root node of the
    +** segment's tree.
    +**
    +** The root node is the top node of the segment's tree after encoding
    +** the entire segment, restricted to ROOT_MAX bytes (default 1024).
    +** This could be either a leaf node or an interior node.  If the top
    +** node requires more than ROOT_MAX bytes, it is flushed to %_segments
    +** and a new root interior node is generated (which should always fit
    +** within ROOT_MAX because it only needs space for 2 varints, the
    +** height and the blockid of the previous root).
    +**
    +** The meta-information in the segment directory is:
    +**   level               - segment level (see below)
    +**   idx                 - index within level
    +**                       - (level,idx uniquely identify a segment)
    +**   start_block         - first leaf node
    +**   leaves_end_block    - last leaf node
    +**   end_block           - last block (including interior nodes)
    +**   root                - contents of root node
    +**
    +** If the root node is a leaf node, then start_block,
    +** leaves_end_block, and end_block are all 0.
    +**
    +**
    +**** Segment merging ****
    +** To amortize update costs, segments are grouped into levels and
    +** merged in batches.  Each increase in level represents exponentially
    +** more documents.
    +**
    +** New documents (actually, document updates) are tokenized and
    +** written individually (using LeafWriter) to a level 0 segment, with
    +** incrementing idx.  When idx reaches MERGE_COUNT (default 16), all
    +** level 0 segments are merged into a single level 1 segment.  Level 1
    +** is populated like level 0, and eventually MERGE_COUNT level 1
    +** segments are merged to a single level 2 segment (representing
    +** MERGE_COUNT^2 updates), and so on.
    +**
    +** A segment merge traverses all segments at a given level in
    +** parallel, performing a straightforward sorted merge.  Since segment
    +** leaf nodes are written in to the %_segments table in order, this
    +** merge traverses the underlying sqlite disk structures efficiently.
    +** After the merge, all segment blocks from the merged level are
    +** deleted.
    +**
    +** MERGE_COUNT controls how often we merge segments.  16 seems to be
    +** somewhat of a sweet spot for insertion performance.  32 and 64 show
    +** very similar performance numbers to 16 on insertion, though they're
    +** a tiny bit slower (perhaps due to more overhead in merge-time
    +** sorting).  8 is about 20% slower than 16, 4 about 50% slower than
    +** 16, 2 about 66% slower than 16.
    +**
    +** At query time, high MERGE_COUNT increases the number of segments
    +** which need to be scanned and merged.  For instance, with 100k docs
    +** inserted:
    +**
    +**    MERGE_COUNT   segments
    +**       16           25
    +**        8           12
    +**        4           10
    +**        2            6
    +**
    +** This appears to have only a moderate impact on queries for very
    +** frequent terms (which are somewhat dominated by segment merge
    +** costs), and infrequent and non-existent terms still seem to be fast
    +** even with many segments.
    +**
    +** TODO(shess) That said, it would be nice to have a better query-side
    +** argument for MERGE_COUNT of 16.  Also, it is possible/likely that
    +** optimizations to things like doclist merging will swing the sweet
    +** spot around.
    +**
    +**
    +**
    +**** Handling of deletions and updates ****
    +** Since we're using a segmented structure, with no docid-oriented
    +** index into the term index, we clearly cannot simply update the term
    +** index when a document is deleted or updated.  For deletions, we
    +** write an empty doclist (varint(docid) varint(POS_END)), for updates
    +** we simply write the new doclist.  Segment merges overwrite older
    +** data for a particular docid with newer data, so deletes or updates
    +** will eventually overtake the earlier data and knock it out.  The
    +** query logic likewise merges doclists so that newer data knocks out
    +** older data.
    +**
    +** TODO(shess) Provide a VACUUM type operation to clear out all
    +** deletions and duplications.  This would basically be a forced merge
    +** into a single segment.
    +*/
    +
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
    +# define SQLITE_CORE 1
    +#endif
    +
    +
    +/************** Include fts3_expr.h in the middle of fts3.c ******************/
    +/************** Begin file fts3_expr.h ***************************************/
    +/*
    +** 2008 Nov 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +*/
    +
    +/************** Include fts3_tokenizer.h in the middle of fts3_expr.h ********/
    +/************** Begin file fts3_tokenizer.h **********************************/
    +/*
    +** 2006 July 10
    +**
    +** The author disclaims copyright to this source code.
    +**
    +*************************************************************************
    +** Defines the interface to tokenizers used by fulltext-search.  There
    +** are three basic components:
    +**
    +** sqlite3_tokenizer_module is a singleton defining the tokenizer
    +** interface functions.  This is essentially the class structure for
    +** tokenizers.
    +**
    +** sqlite3_tokenizer is used to define a particular tokenizer, perhaps
    +** including customization information defined at creation time.
    +**
    +** sqlite3_tokenizer_cursor is generated by a tokenizer to generate
    +** tokens from a particular input.
    +*/
    +#ifndef _FTS3_TOKENIZER_H_
    +#define _FTS3_TOKENIZER_H_
    +
    +/* TODO(shess) Only used for SQLITE_OK and SQLITE_DONE at this time.
    +** If tokenizers are to be allowed to call sqlite3_*() functions, then
    +** we will need a way to register the API consistently.
    +*/
    +
    +/*
    +** Structures used by the tokenizer interface. When a new tokenizer
    +** implementation is registered, the caller provides a pointer to
    +** an sqlite3_tokenizer_module containing pointers to the callback
    +** functions that make up an implementation.
    +**
    +** When an fts3 table is created, it passes any arguments passed to
    +** the tokenizer clause of the CREATE VIRTUAL TABLE statement to the
    +** sqlite3_tokenizer_module.xCreate() function of the requested tokenizer
    +** implementation. The xCreate() function in turn returns an 
    +** sqlite3_tokenizer structure representing the specific tokenizer to
    +** be used for the fts3 table (customized by the tokenizer clause arguments).
    +**
    +** To tokenize an input buffer, the sqlite3_tokenizer_module.xOpen()
    +** method is called. It returns an sqlite3_tokenizer_cursor object
    +** that may be used to tokenize a specific input buffer based on
    +** the tokenization rules supplied by a specific sqlite3_tokenizer
    +** object.
    +*/
    +typedef struct sqlite3_tokenizer_module sqlite3_tokenizer_module;
    +typedef struct sqlite3_tokenizer sqlite3_tokenizer;
    +typedef struct sqlite3_tokenizer_cursor sqlite3_tokenizer_cursor;
    +
    +struct sqlite3_tokenizer_module {
    +
    +  /*
    +  ** Structure version. Should always be set to 0.
    +  */
    +  int iVersion;
    +
    +  /*
    +  ** Create a new tokenizer. The values in the argv[] array are the
    +  ** arguments passed to the "tokenizer" clause of the CREATE VIRTUAL
    +  ** TABLE statement that created the fts3 table. For example, if
    +  ** the following SQL is executed:
    +  **
    +  **   CREATE .. USING fts3( ... , tokenizer <tokenizer-name> arg1 arg2)
    +  **
    +  ** then argc is set to 2, and the argv[] array contains pointers
    +  ** to the strings "arg1" and "arg2".
    +  **
    +  ** This method should return either SQLITE_OK (0), or an SQLite error 
    +  ** code. If SQLITE_OK is returned, then *ppTokenizer should be set
    +  ** to point at the newly created tokenizer structure. The generic
    +  ** sqlite3_tokenizer.pModule variable should not be initialised by
    +  ** this callback. The caller will do so.
    +  */
    +  int (*xCreate)(
    +    int argc,                           /* Size of argv array */
    +    const char *const*argv,             /* Tokenizer argument strings */
    +    sqlite3_tokenizer **ppTokenizer     /* OUT: Created tokenizer */
    +  );
    +
    +  /*
    +  ** Destroy an existing tokenizer. The fts3 module calls this method
    +  ** exactly once for each successful call to xCreate().
    +  */
    +  int (*xDestroy)(sqlite3_tokenizer *pTokenizer);
    +
    +  /*
    +  ** Create a tokenizer cursor to tokenize an input buffer. The caller
    +  ** is responsible for ensuring that the input buffer remains valid
    +  ** until the cursor is closed (using the xClose() method). 
    +  */
    +  int (*xOpen)(
    +    sqlite3_tokenizer *pTokenizer,       /* Tokenizer object */
    +    const char *pInput, int nBytes,      /* Input buffer */
    +    sqlite3_tokenizer_cursor **ppCursor  /* OUT: Created tokenizer cursor */
    +  );
    +
    +  /*
    +  ** Destroy an existing tokenizer cursor. The fts3 module calls this 
    +  ** method exactly once for each successful call to xOpen().
    +  */
    +  int (*xClose)(sqlite3_tokenizer_cursor *pCursor);
    +
    +  /*
    +  ** Retrieve the next token from the tokenizer cursor pCursor. This
    +  ** method should either return SQLITE_OK and set the values of the
    +  ** "OUT" variables identified below, or SQLITE_DONE to indicate that
    +  ** the end of the buffer has been reached, or an SQLite error code.
    +  **
    +  ** *ppToken should be set to point at a buffer containing the 
    +  ** normalized version of the token (i.e. after any case-folding and/or
    +  ** stemming has been performed). *pnBytes should be set to the length
    +  ** of this buffer in bytes. The input text that generated the token is
    +  ** identified by the byte offsets returned in *piStartOffset and
    +  ** *piEndOffset. *piStartOffset should be set to the index of the first
    +  ** byte of the token in the input buffer. *piEndOffset should be set
    +  ** to the index of the first byte just past the end of the token in
    +  ** the input buffer.
    +  **
    +  ** The buffer *ppToken is set to point at is managed by the tokenizer
    +  ** implementation. It is only required to be valid until the next call
    +  ** to xNext() or xClose(). 
    +  */
    +  /* TODO(shess) current implementation requires pInput to be
    +  ** nul-terminated.  This should either be fixed, or pInput/nBytes
    +  ** should be converted to zInput.
    +  */
    +  int (*xNext)(
    +    sqlite3_tokenizer_cursor *pCursor,   /* Tokenizer cursor */
    +    const char **ppToken, int *pnBytes,  /* OUT: Normalized text for token */
    +    int *piStartOffset,  /* OUT: Byte offset of token in input buffer */
    +    int *piEndOffset,    /* OUT: Byte offset of end of token in input buffer */
    +    int *piPosition      /* OUT: Number of tokens returned before this one */
    +  );
    +};
    +
    +struct sqlite3_tokenizer {
    +  const sqlite3_tokenizer_module *pModule;  /* The module for this tokenizer */
    +  /* Tokenizer implementations will typically add additional fields */
    +};
    +
    +struct sqlite3_tokenizer_cursor {
    +  sqlite3_tokenizer *pTokenizer;       /* Tokenizer for this cursor. */
    +  /* Tokenizer implementations will typically add additional fields */
    +};
    +
    +#endif /* _FTS3_TOKENIZER_H_ */
    +
    +/************** End of fts3_tokenizer.h **************************************/
    +/************** Continuing where we left off in fts3_expr.h ******************/
    +
    +/*
    +** The following describes the syntax supported by the fts3 MATCH
    +** operator in a similar format to that used by the lemon parser
    +** generator. This module does not use actually lemon, it uses a
    +** custom parser.
    +**
    +**   query ::= andexpr (OR andexpr)*.
    +**
    +**   andexpr ::= notexpr (AND? notexpr)*.
    +**
    +**   notexpr ::= nearexpr (NOT nearexpr|-TOKEN)*.
    +**   notexpr ::= LP query RP.
    +**
    +**   nearexpr ::= phrase (NEAR distance_opt nearexpr)*.
    +**
    +**   distance_opt ::= .
    +**   distance_opt ::= / INTEGER.
    +**
    +**   phrase ::= TOKEN.
    +**   phrase ::= COLUMN:TOKEN.
    +**   phrase ::= "TOKEN TOKEN TOKEN...".
    +*/
    +
    +typedef struct Fts3Expr Fts3Expr;
    +typedef struct Fts3Phrase Fts3Phrase;
    +
    +/*
    +** A "phrase" is a sequence of one or more tokens that must match in
    +** sequence.  A single token is the base case and the most common case.
    +** For a sequence of tokens contained in "...", nToken will be the number
    +** of tokens in the string.
    +*/
    +struct Fts3Phrase {
    +  int nToken;          /* Number of tokens in the phrase */
    +  int iColumn;         /* Index of column this phrase must match */
    +  int isNot;           /* Phrase prefixed by unary not (-) operator */
    +  struct PhraseToken {
    +    char *z;              /* Text of the token */
    +    int n;                /* Number of bytes in buffer pointed to by z */
    +    int isPrefix;         /* True if token ends in with a "*" character */
    +  } aToken[1];         /* One entry for each token in the phrase */
    +};
    +
    +/*
    +** A tree of these objects forms the RHS of a MATCH operator.
    +*/
    +struct Fts3Expr {
    +  int eType;                 /* One of the FTSQUERY_XXX values defined below */
    +  int nNear;                 /* Valid if eType==FTSQUERY_NEAR */
    +  Fts3Expr *pParent;         /* pParent->pLeft==this or pParent->pRight==this */
    +  Fts3Expr *pLeft;           /* Left operand */
    +  Fts3Expr *pRight;          /* Right operand */
    +  Fts3Phrase *pPhrase;       /* Valid if eType==FTSQUERY_PHRASE */
    +};
    +
    +SQLITE_PRIVATE int sqlite3Fts3ExprParse(sqlite3_tokenizer *, char **, int, int, 
    +                         const char *, int, Fts3Expr **);
    +SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *);
    +
    +/*
    +** Candidate values for Fts3Query.eType. Note that the order of the first
    +** four values is in order of precedence when parsing expressions. For 
    +** example, the following:
    +**
    +**   "a OR b AND c NOT d NEAR e"
    +**
    +** is equivalent to:
    +**
    +**   "a OR (b AND (c NOT (d NEAR e)))"
    +*/
    +#define FTSQUERY_NEAR   1
    +#define FTSQUERY_NOT    2
    +#define FTSQUERY_AND    3
    +#define FTSQUERY_OR     4
    +#define FTSQUERY_PHRASE 5
    +
    +#ifdef SQLITE_TEST
    +SQLITE_PRIVATE void sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
    +#endif
    +
    +/************** End of fts3_expr.h *******************************************/
    +/************** Continuing where we left off in fts3.c ***********************/
    +/************** Include fts3_hash.h in the middle of fts3.c ******************/
    +/************** Begin file fts3_hash.h ***************************************/
    +/*
    +** 2001 September 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the header file for the generic hash-table implemenation
    +** used in SQLite.  We've modified it slightly to serve as a standalone
    +** hash table implementation for the full-text indexing module.
    +**
    +*/
    +#ifndef _FTS3_HASH_H_
    +#define _FTS3_HASH_H_
    +
    +/* Forward declarations of structures. */
    +typedef struct fts3Hash fts3Hash;
    +typedef struct fts3HashElem fts3HashElem;
    +
    +/* A complete hash table is an instance of the following structure.
    +** The internals of this structure are intended to be opaque -- client
    +** code should not attempt to access or modify the fields of this structure
    +** directly.  Change this structure only by using the routines below.
    +** However, many of the "procedures" and "functions" for modifying and
    +** accessing this structure are really macros, so we can't really make
    +** this structure opaque.
    +*/
    +struct fts3Hash {
    +  char keyClass;          /* HASH_INT, _POINTER, _STRING, _BINARY */
    +  char copyKey;           /* True if copy of key made on insert */
    +  int count;              /* Number of entries in this table */
    +  fts3HashElem *first;    /* The first element of the array */
    +  int htsize;             /* Number of buckets in the hash table */
    +  struct _fts3ht {        /* the hash table */
    +    int count;               /* Number of entries with this hash */
    +    fts3HashElem *chain;     /* Pointer to first entry with this hash */
    +  } *ht;
    +};
    +
    +/* Each element in the hash table is an instance of the following 
    +** structure.  All elements are stored on a single doubly-linked list.
    +**
    +** Again, this structure is intended to be opaque, but it can't really
    +** be opaque because it is used by macros.
    +*/
    +struct fts3HashElem {
    +  fts3HashElem *next, *prev; /* Next and previous elements in the table */
    +  void *data;                /* Data associated with this element */
    +  void *pKey; int nKey;      /* Key associated with this element */
    +};
    +
    +/*
    +** There are 2 different modes of operation for a hash table:
    +**
    +**   FTS3_HASH_STRING        pKey points to a string that is nKey bytes long
    +**                           (including the null-terminator, if any).  Case
    +**                           is respected in comparisons.
    +**
    +**   FTS3_HASH_BINARY        pKey points to binary data nKey bytes long. 
    +**                           memcmp() is used to compare keys.
    +**
    +** A copy of the key is made if the copyKey parameter to fts3HashInit is 1.  
    +*/
    +#define FTS3_HASH_STRING    1
    +#define FTS3_HASH_BINARY    2
    +
    +/*
    +** Access routines.  To delete, insert a NULL pointer.
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3HashInit(fts3Hash*, int keytype, int copyKey);
    +SQLITE_PRIVATE void *sqlite3Fts3HashInsert(fts3Hash*, const void *pKey, int nKey, void *pData);
    +SQLITE_PRIVATE void *sqlite3Fts3HashFind(const fts3Hash*, const void *pKey, int nKey);
    +SQLITE_PRIVATE void sqlite3Fts3HashClear(fts3Hash*);
    +
    +/*
    +** Shorthand for the functions above
    +*/
    +#define fts3HashInit   sqlite3Fts3HashInit
    +#define fts3HashInsert sqlite3Fts3HashInsert
    +#define fts3HashFind   sqlite3Fts3HashFind
    +#define fts3HashClear  sqlite3Fts3HashClear
    +
    +/*
    +** Macros for looping over all elements of a hash table.  The idiom is
    +** like this:
    +**
    +**   fts3Hash h;
    +**   fts3HashElem *p;
    +**   ...
    +**   for(p=fts3HashFirst(&h); p; p=fts3HashNext(p)){
    +**     SomeStructure *pData = fts3HashData(p);
    +**     // do something with pData
    +**   }
    +*/
    +#define fts3HashFirst(H)  ((H)->first)
    +#define fts3HashNext(E)   ((E)->next)
    +#define fts3HashData(E)   ((E)->data)
    +#define fts3HashKey(E)    ((E)->pKey)
    +#define fts3HashKeysize(E) ((E)->nKey)
    +
    +/*
    +** Number of entries in a hash table
    +*/
    +#define fts3HashCount(H)  ((H)->count)
    +
    +#endif /* _FTS3_HASH_H_ */
    +
    +/************** End of fts3_hash.h *******************************************/
    +/************** Continuing where we left off in fts3.c ***********************/
    +#ifndef SQLITE_CORE 
    +  SQLITE_EXTENSION_INIT1
    +#endif
    +
    +
    +/* TODO(shess) MAN, this thing needs some refactoring.  At minimum, it
    +** would be nice to order the file better, perhaps something along the
    +** lines of:
    +**
    +**  - utility functions
    +**  - table setup functions
    +**  - table update functions
    +**  - table query functions
    +**
    +** Put the query functions last because they're likely to reference
    +** typedefs or functions from the table update section.
    +*/
    +
    +#if 0
    +# define FTSTRACE(A)  printf A; fflush(stdout)
    +#else
    +# define FTSTRACE(A)
    +#endif
    +
    +/* It is not safe to call isspace(), tolower(), or isalnum() on
    +** hi-bit-set characters.  This is the same solution used in the
    +** tokenizer.
    +*/
    +/* TODO(shess) The snippet-generation code should be using the
    +** tokenizer-generated tokens rather than doing its own local
    +** tokenization.
    +*/
    +/* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */
    +static int safe_isspace(char c){
    +  return (c&0x80)==0 ? isspace(c) : 0;
    +}
    +static int safe_tolower(char c){
    +  return (c&0x80)==0 ? tolower(c) : c;
    +}
    +static int safe_isalnum(char c){
    +  return (c&0x80)==0 ? isalnum(c) : 0;
    +}
    +
    +typedef enum DocListType {
    +  DL_DOCIDS,              /* docids only */
    +  DL_POSITIONS,           /* docids + positions */
    +  DL_POSITIONS_OFFSETS    /* docids + positions + offsets */
    +} DocListType;
    +
    +/*
    +** By default, only positions and not offsets are stored in the doclists.
    +** To change this so that offsets are stored too, compile with
    +**
    +**          -DDL_DEFAULT=DL_POSITIONS_OFFSETS
    +**
    +** If DL_DEFAULT is set to DL_DOCIDS, your table can only be inserted
    +** into (no deletes or updates).
    +*/
    +#ifndef DL_DEFAULT
    +# define DL_DEFAULT DL_POSITIONS
    +#endif
    +
    +enum {
    +  POS_END = 0,        /* end of this position list */
    +  POS_COLUMN,         /* followed by new column number */
    +  POS_BASE
    +};
    +
    +/* MERGE_COUNT controls how often we merge segments (see comment at
    +** top of file).
    +*/
    +#define MERGE_COUNT 16
    +
    +/* utility functions */
    +
    +/* CLEAR() and SCRAMBLE() abstract memset() on a pointer to a single
    +** record to prevent errors of the form:
    +**
    +** my_function(SomeType *b){
    +**   memset(b, '\0', sizeof(b));  // sizeof(b)!=sizeof(*b)
    +** }
    +*/
    +/* TODO(shess) Obvious candidates for a header file. */
    +#define CLEAR(b) memset(b, '\0', sizeof(*(b)))
    +
    +#ifndef NDEBUG
    +#  define SCRAMBLE(b) memset(b, 0x55, sizeof(*(b)))
    +#else
    +#  define SCRAMBLE(b)
    +#endif
    +
    +/* We may need up to VARINT_MAX bytes to store an encoded 64-bit integer. */
    +#define VARINT_MAX 10
    +
    +/* Write a 64-bit variable-length integer to memory starting at p[0].
    + * The length of data written will be between 1 and VARINT_MAX bytes.
    + * The number of bytes written is returned. */
    +static int fts3PutVarint(char *p, sqlite_int64 v){
    +  unsigned char *q = (unsigned char *) p;
    +  sqlite_uint64 vu = v;
    +  do{
    +    *q++ = (unsigned char) ((vu & 0x7f) | 0x80);
    +    vu >>= 7;
    +  }while( vu!=0 );
    +  q[-1] &= 0x7f;  /* turn off high bit in final byte */
    +  assert( q - (unsigned char *)p <= VARINT_MAX );
    +  return (int) (q - (unsigned char *)p);
    +}
    +
    +/* Read a 64-bit variable-length integer from memory starting at p[0].
    + * Return the number of bytes read, or 0 on error.
    + * The value is stored in *v. */
    +static int fts3GetVarint(const char *p, sqlite_int64 *v){
    +  const unsigned char *q = (const unsigned char *) p;
    +  sqlite_uint64 x = 0, y = 1;
    +  while( (*q & 0x80) == 0x80 ){
    +    x += y * (*q++ & 0x7f);
    +    y <<= 7;
    +    if( q - (unsigned char *)p >= VARINT_MAX ){  /* bad data */
    +      assert( 0 );
    +      return 0;
    +    }
    +  }
    +  x += y * (*q++);
    +  *v = (sqlite_int64) x;
    +  return (int) (q - (unsigned char *)p);
    +}
    +
    +static int fts3GetVarint32(const char *p, int *pi){
    + sqlite_int64 i;
    + int ret = fts3GetVarint(p, &i);
    + *pi = (int) i;
    + assert( *pi==i );
    + return ret;
    +}
    +
    +/*******************************************************************/
    +/* DataBuffer is used to collect data into a buffer in piecemeal
    +** fashion.  It implements the usual distinction between amount of
    +** data currently stored (nData) and buffer capacity (nCapacity).
    +**
    +** dataBufferInit - create a buffer with given initial capacity.
    +** dataBufferReset - forget buffer's data, retaining capacity.
    +** dataBufferDestroy - free buffer's data.
    +** dataBufferSwap - swap contents of two buffers.
    +** dataBufferExpand - expand capacity without adding data.
    +** dataBufferAppend - append data.
    +** dataBufferAppend2 - append two pieces of data at once.
    +** dataBufferReplace - replace buffer's data.
    +*/
    +typedef struct DataBuffer {
    +  char *pData;          /* Pointer to malloc'ed buffer. */
    +  int nCapacity;        /* Size of pData buffer. */
    +  int nData;            /* End of data loaded into pData. */
    +} DataBuffer;
    +
    +static void dataBufferInit(DataBuffer *pBuffer, int nCapacity){
    +  assert( nCapacity>=0 );
    +  pBuffer->nData = 0;
    +  pBuffer->nCapacity = nCapacity;
    +  pBuffer->pData = nCapacity==0 ? NULL : sqlite3_malloc(nCapacity);
    +}
    +static void dataBufferReset(DataBuffer *pBuffer){
    +  pBuffer->nData = 0;
    +}
    +static void dataBufferDestroy(DataBuffer *pBuffer){
    +  if( pBuffer->pData!=NULL ) sqlite3_free(pBuffer->pData);
    +  SCRAMBLE(pBuffer);
    +}
    +static void dataBufferSwap(DataBuffer *pBuffer1, DataBuffer *pBuffer2){
    +  DataBuffer tmp = *pBuffer1;
    +  *pBuffer1 = *pBuffer2;
    +  *pBuffer2 = tmp;
    +}
    +static void dataBufferExpand(DataBuffer *pBuffer, int nAddCapacity){
    +  assert( nAddCapacity>0 );
    +  /* TODO(shess) Consider expanding more aggressively.  Note that the
    +  ** underlying malloc implementation may take care of such things for
    +  ** us already.
    +  */
    +  if( pBuffer->nData+nAddCapacity>pBuffer->nCapacity ){
    +    pBuffer->nCapacity = pBuffer->nData+nAddCapacity;
    +    pBuffer->pData = sqlite3_realloc(pBuffer->pData, pBuffer->nCapacity);
    +  }
    +}
    +static void dataBufferAppend(DataBuffer *pBuffer,
    +                             const char *pSource, int nSource){
    +  assert( nSource>0 && pSource!=NULL );
    +  dataBufferExpand(pBuffer, nSource);
    +  memcpy(pBuffer->pData+pBuffer->nData, pSource, nSource);
    +  pBuffer->nData += nSource;
    +}
    +static void dataBufferAppend2(DataBuffer *pBuffer,
    +                              const char *pSource1, int nSource1,
    +                              const char *pSource2, int nSource2){
    +  assert( nSource1>0 && pSource1!=NULL );
    +  assert( nSource2>0 && pSource2!=NULL );
    +  dataBufferExpand(pBuffer, nSource1+nSource2);
    +  memcpy(pBuffer->pData+pBuffer->nData, pSource1, nSource1);
    +  memcpy(pBuffer->pData+pBuffer->nData+nSource1, pSource2, nSource2);
    +  pBuffer->nData += nSource1+nSource2;
    +}
    +static void dataBufferReplace(DataBuffer *pBuffer,
    +                              const char *pSource, int nSource){
    +  dataBufferReset(pBuffer);
    +  dataBufferAppend(pBuffer, pSource, nSource);
    +}
    +
    +/* StringBuffer is a null-terminated version of DataBuffer. */
    +typedef struct StringBuffer {
    +  DataBuffer b;            /* Includes null terminator. */
    +} StringBuffer;
    +
    +static void initStringBuffer(StringBuffer *sb){
    +  dataBufferInit(&sb->b, 100);
    +  dataBufferReplace(&sb->b, "", 1);
    +}
    +static int stringBufferLength(StringBuffer *sb){
    +  return sb->b.nData-1;
    +}
    +static char *stringBufferData(StringBuffer *sb){
    +  return sb->b.pData;
    +}
    +static void stringBufferDestroy(StringBuffer *sb){
    +  dataBufferDestroy(&sb->b);
    +}
    +
    +static void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
    +  assert( sb->b.nData>0 );
    +  if( nFrom>0 ){
    +    sb->b.nData--;
    +    dataBufferAppend2(&sb->b, zFrom, nFrom, "", 1);
    +  }
    +}
    +static void append(StringBuffer *sb, const char *zFrom){
    +  nappend(sb, zFrom, strlen(zFrom));
    +}
    +
    +/* Append a list of strings separated by commas. */
    +static void appendList(StringBuffer *sb, int nString, char **azString){
    +  int i;
    +  for(i=0; i<nString; ++i){
    +    if( i>0 ) append(sb, ", ");
    +    append(sb, azString[i]);
    +  }
    +}
    +
    +static int endsInWhiteSpace(StringBuffer *p){
    +  return stringBufferLength(p)>0 &&
    +    safe_isspace(stringBufferData(p)[stringBufferLength(p)-1]);
    +}
    +
    +/* If the StringBuffer ends in something other than white space, add a
    +** single space character to the end.
    +*/
    +static void appendWhiteSpace(StringBuffer *p){
    +  if( stringBufferLength(p)==0 ) return;
    +  if( !endsInWhiteSpace(p) ) append(p, " ");
    +}
    +
    +/* Remove white space from the end of the StringBuffer */
    +static void trimWhiteSpace(StringBuffer *p){
    +  while( endsInWhiteSpace(p) ){
    +    p->b.pData[--p->b.nData-1] = '\0';
    +  }
    +}
    +
    +/*******************************************************************/
    +/* DLReader is used to read document elements from a doclist.  The
    +** current docid is cached, so dlrDocid() is fast.  DLReader does not
    +** own the doclist buffer.
    +**
    +** dlrAtEnd - true if there's no more data to read.
    +** dlrDocid - docid of current document.
    +** dlrDocData - doclist data for current document (including docid).
    +** dlrDocDataBytes - length of same.
    +** dlrAllDataBytes - length of all remaining data.
    +** dlrPosData - position data for current document.
    +** dlrPosDataLen - length of pos data for current document (incl POS_END).
    +** dlrStep - step to current document.
    +** dlrInit - initial for doclist of given type against given data.
    +** dlrDestroy - clean up.
    +**
    +** Expected usage is something like:
    +**
    +**   DLReader reader;
    +**   dlrInit(&reader, pData, nData);
    +**   while( !dlrAtEnd(&reader) ){
    +**     // calls to dlrDocid() and kin.
    +**     dlrStep(&reader);
    +**   }
    +**   dlrDestroy(&reader);
    +*/
    +typedef struct DLReader {
    +  DocListType iType;
    +  const char *pData;
    +  int nData;
    +
    +  sqlite_int64 iDocid;
    +  int nElement;
    +} DLReader;
    +
    +static int dlrAtEnd(DLReader *pReader){
    +  assert( pReader->nData>=0 );
    +  return pReader->nData==0;
    +}
    +static sqlite_int64 dlrDocid(DLReader *pReader){
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->iDocid;
    +}
    +static const char *dlrDocData(DLReader *pReader){
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->pData;
    +}
    +static int dlrDocDataBytes(DLReader *pReader){
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->nElement;
    +}
    +static int dlrAllDataBytes(DLReader *pReader){
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->nData;
    +}
    +/* TODO(shess) Consider adding a field to track iDocid varint length
    +** to make these two functions faster.  This might matter (a tiny bit)
    +** for queries.
    +*/
    +static const char *dlrPosData(DLReader *pReader){
    +  sqlite_int64 iDummy;
    +  int n = fts3GetVarint(pReader->pData, &iDummy);
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->pData+n;
    +}
    +static int dlrPosDataLen(DLReader *pReader){
    +  sqlite_int64 iDummy;
    +  int n = fts3GetVarint(pReader->pData, &iDummy);
    +  assert( !dlrAtEnd(pReader) );
    +  return pReader->nElement-n;
    +}
    +static void dlrStep(DLReader *pReader){
    +  assert( !dlrAtEnd(pReader) );
    +
    +  /* Skip past current doclist element. */
    +  assert( pReader->nElement<=pReader->nData );
    +  pReader->pData += pReader->nElement;
    +  pReader->nData -= pReader->nElement;
    +
    +  /* If there is more data, read the next doclist element. */
    +  if( pReader->nData!=0 ){
    +    sqlite_int64 iDocidDelta;
    +    int iDummy, n = fts3GetVarint(pReader->pData, &iDocidDelta);
    +    pReader->iDocid += iDocidDelta;
    +    if( pReader->iType>=DL_POSITIONS ){
    +      assert( n<pReader->nData );
    +      while( 1 ){
    +        n += fts3GetVarint32(pReader->pData+n, &iDummy);
    +        assert( n<=pReader->nData );
    +        if( iDummy==POS_END ) break;
    +        if( iDummy==POS_COLUMN ){
    +          n += fts3GetVarint32(pReader->pData+n, &iDummy);
    +          assert( n<pReader->nData );
    +        }else if( pReader->iType==DL_POSITIONS_OFFSETS ){
    +          n += fts3GetVarint32(pReader->pData+n, &iDummy);
    +          n += fts3GetVarint32(pReader->pData+n, &iDummy);
    +          assert( n<pReader->nData );
    +        }
    +      }
    +    }
    +    pReader->nElement = n;
    +    assert( pReader->nElement<=pReader->nData );
    +  }
    +}
    +static void dlrInit(DLReader *pReader, DocListType iType,
    +                    const char *pData, int nData){
    +  assert( pData!=NULL && nData!=0 );
    +  pReader->iType = iType;
    +  pReader->pData = pData;
    +  pReader->nData = nData;
    +  pReader->nElement = 0;
    +  pReader->iDocid = 0;
    +
    +  /* Load the first element's data.  There must be a first element. */
    +  dlrStep(pReader);
    +}
    +static void dlrDestroy(DLReader *pReader){
    +  SCRAMBLE(pReader);
    +}
    +
    +#ifndef NDEBUG
    +/* Verify that the doclist can be validly decoded.  Also returns the
    +** last docid found because it is convenient in other assertions for
    +** DLWriter.
    +*/
    +static void docListValidate(DocListType iType, const char *pData, int nData,
    +                            sqlite_int64 *pLastDocid){
    +  sqlite_int64 iPrevDocid = 0;
    +  assert( nData>0 );
    +  assert( pData!=0 );
    +  assert( pData+nData>pData );
    +  while( nData!=0 ){
    +    sqlite_int64 iDocidDelta;
    +    int n = fts3GetVarint(pData, &iDocidDelta);
    +    iPrevDocid += iDocidDelta;
    +    if( iType>DL_DOCIDS ){
    +      int iDummy;
    +      while( 1 ){
    +        n += fts3GetVarint32(pData+n, &iDummy);
    +        if( iDummy==POS_END ) break;
    +        if( iDummy==POS_COLUMN ){
    +          n += fts3GetVarint32(pData+n, &iDummy);
    +        }else if( iType>DL_POSITIONS ){
    +          n += fts3GetVarint32(pData+n, &iDummy);
    +          n += fts3GetVarint32(pData+n, &iDummy);
    +        }
    +        assert( n<=nData );
    +      }
    +    }
    +    assert( n<=nData );
    +    pData += n;
    +    nData -= n;
    +  }
    +  if( pLastDocid ) *pLastDocid = iPrevDocid;
    +}
    +#define ASSERT_VALID_DOCLIST(i, p, n, o) docListValidate(i, p, n, o)
    +#else
    +#define ASSERT_VALID_DOCLIST(i, p, n, o) assert( 1 )
    +#endif
    +
    +/*******************************************************************/
    +/* DLWriter is used to write doclist data to a DataBuffer.  DLWriter
    +** always appends to the buffer and does not own it.
    +**
    +** dlwInit - initialize to write a given type doclistto a buffer.
    +** dlwDestroy - clear the writer's memory.  Does not free buffer.
    +** dlwAppend - append raw doclist data to buffer.
    +** dlwCopy - copy next doclist from reader to writer.
    +** dlwAdd - construct doclist element and append to buffer.
    +**    Only apply dlwAdd() to DL_DOCIDS doclists (else use PLWriter).
    +*/
    +typedef struct DLWriter {
    +  DocListType iType;
    +  DataBuffer *b;
    +  sqlite_int64 iPrevDocid;
    +#ifndef NDEBUG
    +  int has_iPrevDocid;
    +#endif
    +} DLWriter;
    +
    +static void dlwInit(DLWriter *pWriter, DocListType iType, DataBuffer *b){
    +  pWriter->b = b;
    +  pWriter->iType = iType;
    +  pWriter->iPrevDocid = 0;
    +#ifndef NDEBUG
    +  pWriter->has_iPrevDocid = 0;
    +#endif
    +}
    +static void dlwDestroy(DLWriter *pWriter){
    +  SCRAMBLE(pWriter);
    +}
    +/* iFirstDocid is the first docid in the doclist in pData.  It is
    +** needed because pData may point within a larger doclist, in which
    +** case the first item would be delta-encoded.
    +**
    +** iLastDocid is the final docid in the doclist in pData.  It is
    +** needed to create the new iPrevDocid for future delta-encoding.  The
    +** code could decode the passed doclist to recreate iLastDocid, but
    +** the only current user (docListMerge) already has decoded this
    +** information.
    +*/
    +/* TODO(shess) This has become just a helper for docListMerge.
    +** Consider a refactor to make this cleaner.
    +*/
    +static void dlwAppend(DLWriter *pWriter,
    +                      const char *pData, int nData,
    +                      sqlite_int64 iFirstDocid, sqlite_int64 iLastDocid){
    +  sqlite_int64 iDocid = 0;
    +  char c[VARINT_MAX];
    +  int nFirstOld, nFirstNew;     /* Old and new varint len of first docid. */
    +#ifndef NDEBUG
    +  sqlite_int64 iLastDocidDelta;
    +#endif
    +
    +  /* Recode the initial docid as delta from iPrevDocid. */
    +  nFirstOld = fts3GetVarint(pData, &iDocid);
    +  assert( nFirstOld<nData || (nFirstOld==nData && pWriter->iType==DL_DOCIDS) );
    +  nFirstNew = fts3PutVarint(c, iFirstDocid-pWriter->iPrevDocid);
    +
    +  /* Verify that the incoming doclist is valid AND that it ends with
    +  ** the expected docid.  This is essential because we'll trust this
    +  ** docid in future delta-encoding.
    +  */
    +  ASSERT_VALID_DOCLIST(pWriter->iType, pData, nData, &iLastDocidDelta);
    +  assert( iLastDocid==iFirstDocid-iDocid+iLastDocidDelta );
    +
    +  /* Append recoded initial docid and everything else.  Rest of docids
    +  ** should have been delta-encoded from previous initial docid.
    +  */
    +  if( nFirstOld<nData ){
    +    dataBufferAppend2(pWriter->b, c, nFirstNew,
    +                      pData+nFirstOld, nData-nFirstOld);
    +  }else{
    +    dataBufferAppend(pWriter->b, c, nFirstNew);
    +  }
    +  pWriter->iPrevDocid = iLastDocid;
    +}
    +static void dlwCopy(DLWriter *pWriter, DLReader *pReader){
    +  dlwAppend(pWriter, dlrDocData(pReader), dlrDocDataBytes(pReader),
    +            dlrDocid(pReader), dlrDocid(pReader));
    +}
    +static void dlwAdd(DLWriter *pWriter, sqlite_int64 iDocid){
    +  char c[VARINT_MAX];
    +  int n = fts3PutVarint(c, iDocid-pWriter->iPrevDocid);
    +
    +  /* Docids must ascend. */
    +  assert( !pWriter->has_iPrevDocid || iDocid>pWriter->iPrevDocid );
    +  assert( pWriter->iType==DL_DOCIDS );
    +
    +  dataBufferAppend(pWriter->b, c, n);
    +  pWriter->iPrevDocid = iDocid;
    +#ifndef NDEBUG
    +  pWriter->has_iPrevDocid = 1;
    +#endif
    +}
    +
    +/*******************************************************************/
    +/* PLReader is used to read data from a document's position list.  As
    +** the caller steps through the list, data is cached so that varints
    +** only need to be decoded once.
    +**
    +** plrInit, plrDestroy - create/destroy a reader.
    +** plrColumn, plrPosition, plrStartOffset, plrEndOffset - accessors
    +** plrAtEnd - at end of stream, only call plrDestroy once true.
    +** plrStep - step to the next element.
    +*/
    +typedef struct PLReader {
    +  /* These refer to the next position's data.  nData will reach 0 when
    +  ** reading the last position, so plrStep() signals EOF by setting
    +  ** pData to NULL.
    +  */
    +  const char *pData;
    +  int nData;
    +
    +  DocListType iType;
    +  int iColumn;         /* the last column read */
    +  int iPosition;       /* the last position read */
    +  int iStartOffset;    /* the last start offset read */
    +  int iEndOffset;      /* the last end offset read */
    +} PLReader;
    +
    +static int plrAtEnd(PLReader *pReader){
    +  return pReader->pData==NULL;
    +}
    +static int plrColumn(PLReader *pReader){
    +  assert( !plrAtEnd(pReader) );
    +  return pReader->iColumn;
    +}
    +static int plrPosition(PLReader *pReader){
    +  assert( !plrAtEnd(pReader) );
    +  return pReader->iPosition;
    +}
    +static int plrStartOffset(PLReader *pReader){
    +  assert( !plrAtEnd(pReader) );
    +  return pReader->iStartOffset;
    +}
    +static int plrEndOffset(PLReader *pReader){
    +  assert( !plrAtEnd(pReader) );
    +  return pReader->iEndOffset;
    +}
    +static void plrStep(PLReader *pReader){
    +  int i, n;
    +
    +  assert( !plrAtEnd(pReader) );
    +
    +  if( pReader->nData==0 ){
    +    pReader->pData = NULL;
    +    return;
    +  }
    +
    +  n = fts3GetVarint32(pReader->pData, &i);
    +  if( i==POS_COLUMN ){
    +    n += fts3GetVarint32(pReader->pData+n, &pReader->iColumn);
    +    pReader->iPosition = 0;
    +    pReader->iStartOffset = 0;
    +    n += fts3GetVarint32(pReader->pData+n, &i);
    +  }
    +  /* Should never see adjacent column changes. */
    +  assert( i!=POS_COLUMN );
    +
    +  if( i==POS_END ){
    +    pReader->nData = 0;
    +    pReader->pData = NULL;
    +    return;
    +  }
    +
    +  pReader->iPosition += i-POS_BASE;
    +  if( pReader->iType==DL_POSITIONS_OFFSETS ){
    +    n += fts3GetVarint32(pReader->pData+n, &i);
    +    pReader->iStartOffset += i;
    +    n += fts3GetVarint32(pReader->pData+n, &i);
    +    pReader->iEndOffset = pReader->iStartOffset+i;
    +  }
    +  assert( n<=pReader->nData );
    +  pReader->pData += n;
    +  pReader->nData -= n;
    +}
    +
    +static void plrInit(PLReader *pReader, DLReader *pDLReader){
    +  pReader->pData = dlrPosData(pDLReader);
    +  pReader->nData = dlrPosDataLen(pDLReader);
    +  pReader->iType = pDLReader->iType;
    +  pReader->iColumn = 0;
    +  pReader->iPosition = 0;
    +  pReader->iStartOffset = 0;
    +  pReader->iEndOffset = 0;
    +  plrStep(pReader);
    +}
    +static void plrDestroy(PLReader *pReader){
    +  SCRAMBLE(pReader);
    +}
    +
    +/*******************************************************************/
    +/* PLWriter is used in constructing a document's position list.  As a
    +** convenience, if iType is DL_DOCIDS, PLWriter becomes a no-op.
    +** PLWriter writes to the associated DLWriter's buffer.
    +**
    +** plwInit - init for writing a document's poslist.
    +** plwDestroy - clear a writer.
    +** plwAdd - append position and offset information.
    +** plwCopy - copy next position's data from reader to writer.
    +** plwTerminate - add any necessary doclist terminator.
    +**
    +** Calling plwAdd() after plwTerminate() may result in a corrupt
    +** doclist.
    +*/
    +/* TODO(shess) Until we've written the second item, we can cache the
    +** first item's information.  Then we'd have three states:
    +**
    +** - initialized with docid, no positions.
    +** - docid and one position.
    +** - docid and multiple positions.
    +**
    +** Only the last state needs to actually write to dlw->b, which would
    +** be an improvement in the DLCollector case.
    +*/
    +typedef struct PLWriter {
    +  DLWriter *dlw;
    +
    +  int iColumn;    /* the last column written */
    +  int iPos;       /* the last position written */
    +  int iOffset;    /* the last start offset written */
    +} PLWriter;
    +
    +/* TODO(shess) In the case where the parent is reading these values
    +** from a PLReader, we could optimize to a copy if that PLReader has
    +** the same type as pWriter.
    +*/
    +static void plwAdd(PLWriter *pWriter, int iColumn, int iPos,
    +                   int iStartOffset, int iEndOffset){
    +  /* Worst-case space for POS_COLUMN, iColumn, iPosDelta,
    +  ** iStartOffsetDelta, and iEndOffsetDelta.
    +  */
    +  char c[5*VARINT_MAX];
    +  int n = 0;
    +
    +  /* Ban plwAdd() after plwTerminate(). */
    +  assert( pWriter->iPos!=-1 );
    +
    +  if( pWriter->dlw->iType==DL_DOCIDS ) return;
    +
    +  if( iColumn!=pWriter->iColumn ){
    +    n += fts3PutVarint(c+n, POS_COLUMN);
    +    n += fts3PutVarint(c+n, iColumn);
    +    pWriter->iColumn = iColumn;
    +    pWriter->iPos = 0;
    +    pWriter->iOffset = 0;
    +  }
    +  assert( iPos>=pWriter->iPos );
    +  n += fts3PutVarint(c+n, POS_BASE+(iPos-pWriter->iPos));
    +  pWriter->iPos = iPos;
    +  if( pWriter->dlw->iType==DL_POSITIONS_OFFSETS ){
    +    assert( iStartOffset>=pWriter->iOffset );
    +    n += fts3PutVarint(c+n, iStartOffset-pWriter->iOffset);
    +    pWriter->iOffset = iStartOffset;
    +    assert( iEndOffset>=iStartOffset );
    +    n += fts3PutVarint(c+n, iEndOffset-iStartOffset);
    +  }
    +  dataBufferAppend(pWriter->dlw->b, c, n);
    +}
    +static void plwCopy(PLWriter *pWriter, PLReader *pReader){
    +  plwAdd(pWriter, plrColumn(pReader), plrPosition(pReader),
    +         plrStartOffset(pReader), plrEndOffset(pReader));
    +}
    +static void plwInit(PLWriter *pWriter, DLWriter *dlw, sqlite_int64 iDocid){
    +  char c[VARINT_MAX];
    +  int n;
    +
    +  pWriter->dlw = dlw;
    +
    +  /* Docids must ascend. */
    +  assert( !pWriter->dlw->has_iPrevDocid || iDocid>pWriter->dlw->iPrevDocid );
    +  n = fts3PutVarint(c, iDocid-pWriter->dlw->iPrevDocid);
    +  dataBufferAppend(pWriter->dlw->b, c, n);
    +  pWriter->dlw->iPrevDocid = iDocid;
    +#ifndef NDEBUG
    +  pWriter->dlw->has_iPrevDocid = 1;
    +#endif
    +
    +  pWriter->iColumn = 0;
    +  pWriter->iPos = 0;
    +  pWriter->iOffset = 0;
    +}
    +/* TODO(shess) Should plwDestroy() also terminate the doclist?  But
    +** then plwDestroy() would no longer be just a destructor, it would
    +** also be doing work, which isn't consistent with the overall idiom.
    +** Another option would be for plwAdd() to always append any necessary
    +** terminator, so that the output is always correct.  But that would
    +** add incremental work to the common case with the only benefit being
    +** API elegance.  Punt for now.
    +*/
    +static void plwTerminate(PLWriter *pWriter){
    +  if( pWriter->dlw->iType>DL_DOCIDS ){
    +    char c[VARINT_MAX];
    +    int n = fts3PutVarint(c, POS_END);
    +    dataBufferAppend(pWriter->dlw->b, c, n);
    +  }
    +#ifndef NDEBUG
    +  /* Mark as terminated for assert in plwAdd(). */
    +  pWriter->iPos = -1;
    +#endif
    +}
    +static void plwDestroy(PLWriter *pWriter){
    +  SCRAMBLE(pWriter);
    +}
    +
    +/*******************************************************************/
    +/* DLCollector wraps PLWriter and DLWriter to provide a
    +** dynamically-allocated doclist area to use during tokenization.
    +**
    +** dlcNew - malloc up and initialize a collector.
    +** dlcDelete - destroy a collector and all contained items.
    +** dlcAddPos - append position and offset information.
    +** dlcAddDoclist - add the collected doclist to the given buffer.
    +** dlcNext - terminate the current document and open another.
    +*/
    +typedef struct DLCollector {
    +  DataBuffer b;
    +  DLWriter dlw;
    +  PLWriter plw;
    +} DLCollector;
    +
    +/* TODO(shess) This could also be done by calling plwTerminate() and
    +** dataBufferAppend().  I tried that, expecting nominal performance
    +** differences, but it seemed to pretty reliably be worth 1% to code
    +** it this way.  I suspect it is the incremental malloc overhead (some
    +** percentage of the plwTerminate() calls will cause a realloc), so
    +** this might be worth revisiting if the DataBuffer implementation
    +** changes.
    +*/
    +static void dlcAddDoclist(DLCollector *pCollector, DataBuffer *b){
    +  if( pCollector->dlw.iType>DL_DOCIDS ){
    +    char c[VARINT_MAX];
    +    int n = fts3PutVarint(c, POS_END);
    +    dataBufferAppend2(b, pCollector->b.pData, pCollector->b.nData, c, n);
    +  }else{
    +    dataBufferAppend(b, pCollector->b.pData, pCollector->b.nData);
    +  }
    +}
    +static void dlcNext(DLCollector *pCollector, sqlite_int64 iDocid){
    +  plwTerminate(&pCollector->plw);
    +  plwDestroy(&pCollector->plw);
    +  plwInit(&pCollector->plw, &pCollector->dlw, iDocid);
    +}
    +static void dlcAddPos(DLCollector *pCollector, int iColumn, int iPos,
    +                      int iStartOffset, int iEndOffset){
    +  plwAdd(&pCollector->plw, iColumn, iPos, iStartOffset, iEndOffset);
    +}
    +
    +static DLCollector *dlcNew(sqlite_int64 iDocid, DocListType iType){
    +  DLCollector *pCollector = sqlite3_malloc(sizeof(DLCollector));
    +  dataBufferInit(&pCollector->b, 0);
    +  dlwInit(&pCollector->dlw, iType, &pCollector->b);
    +  plwInit(&pCollector->plw, &pCollector->dlw, iDocid);
    +  return pCollector;
    +}
    +static void dlcDelete(DLCollector *pCollector){
    +  plwDestroy(&pCollector->plw);
    +  dlwDestroy(&pCollector->dlw);
    +  dataBufferDestroy(&pCollector->b);
    +  SCRAMBLE(pCollector);
    +  sqlite3_free(pCollector);
    +}
    +
    +
    +/* Copy the doclist data of iType in pData/nData into *out, trimming
    +** unnecessary data as we go.  Only columns matching iColumn are
    +** copied, all columns copied if iColumn is -1.  Elements with no
    +** matching columns are dropped.  The output is an iOutType doclist.
    +*/
    +/* NOTE(shess) This code is only valid after all doclists are merged.
    +** If this is run before merges, then doclist items which represent
    +** deletion will be trimmed, and will thus not effect a deletion
    +** during the merge.
    +*/
    +static void docListTrim(DocListType iType, const char *pData, int nData,
    +                        int iColumn, DocListType iOutType, DataBuffer *out){
    +  DLReader dlReader;
    +  DLWriter dlWriter;
    +
    +  assert( iOutType<=iType );
    +
    +  dlrInit(&dlReader, iType, pData, nData);
    +  dlwInit(&dlWriter, iOutType, out);
    +
    +  while( !dlrAtEnd(&dlReader) ){
    +    PLReader plReader;
    +    PLWriter plWriter;
    +    int match = 0;
    +
    +    plrInit(&plReader, &dlReader);
    +
    +    while( !plrAtEnd(&plReader) ){
    +      if( iColumn==-1 || plrColumn(&plReader)==iColumn ){
    +        if( !match ){
    +          plwInit(&plWriter, &dlWriter, dlrDocid(&dlReader));
    +          match = 1;
    +        }
    +        plwAdd(&plWriter, plrColumn(&plReader), plrPosition(&plReader),
    +               plrStartOffset(&plReader), plrEndOffset(&plReader));
    +      }
    +      plrStep(&plReader);
    +    }
    +    if( match ){
    +      plwTerminate(&plWriter);
    +      plwDestroy(&plWriter);
    +    }
    +
    +    plrDestroy(&plReader);
    +    dlrStep(&dlReader);
    +  }
    +  dlwDestroy(&dlWriter);
    +  dlrDestroy(&dlReader);
    +}
    +
    +/* Used by docListMerge() to keep doclists in the ascending order by
    +** docid, then ascending order by age (so the newest comes first).
    +*/
    +typedef struct OrderedDLReader {
    +  DLReader *pReader;
    +
    +  /* TODO(shess) If we assume that docListMerge pReaders is ordered by
    +  ** age (which we do), then we could use pReader comparisons to break
    +  ** ties.
    +  */
    +  int idx;
    +} OrderedDLReader;
    +
    +/* Order eof to end, then by docid asc, idx desc. */
    +static int orderedDLReaderCmp(OrderedDLReader *r1, OrderedDLReader *r2){
    +  if( dlrAtEnd(r1->pReader) ){
    +    if( dlrAtEnd(r2->pReader) ) return 0;  /* Both atEnd(). */
    +    return 1;                              /* Only r1 atEnd(). */
    +  }
    +  if( dlrAtEnd(r2->pReader) ) return -1;   /* Only r2 atEnd(). */
    +
    +  if( dlrDocid(r1->pReader)<dlrDocid(r2->pReader) ) return -1;
    +  if( dlrDocid(r1->pReader)>dlrDocid(r2->pReader) ) return 1;
    +
    +  /* Descending on idx. */
    +  return r2->idx-r1->idx;
    +}
    +
    +/* Bubble p[0] to appropriate place in p[1..n-1].  Assumes that
    +** p[1..n-1] is already sorted.
    +*/
    +/* TODO(shess) Is this frequent enough to warrant a binary search?
    +** Before implementing that, instrument the code to check.  In most
    +** current usage, I expect that p[0] will be less than p[1] a very
    +** high proportion of the time.
    +*/
    +static void orderedDLReaderReorder(OrderedDLReader *p, int n){
    +  while( n>1 && orderedDLReaderCmp(p, p+1)>0 ){
    +    OrderedDLReader tmp = p[0];
    +    p[0] = p[1];
    +    p[1] = tmp;
    +    n--;
    +    p++;
    +  }
    +}
    +
    +/* Given an array of doclist readers, merge their doclist elements
    +** into out in sorted order (by docid), dropping elements from older
    +** readers when there is a duplicate docid.  pReaders is assumed to be
    +** ordered by age, oldest first.
    +*/
    +/* TODO(shess) nReaders must be <= MERGE_COUNT.  This should probably
    +** be fixed.
    +*/
    +static void docListMerge(DataBuffer *out,
    +                         DLReader *pReaders, int nReaders){
    +  OrderedDLReader readers[MERGE_COUNT];
    +  DLWriter writer;
    +  int i, n;
    +  const char *pStart = 0;
    +  int nStart = 0;
    +  sqlite_int64 iFirstDocid = 0, iLastDocid = 0;
    +
    +  assert( nReaders>0 );
    +  if( nReaders==1 ){
    +    dataBufferAppend(out, dlrDocData(pReaders), dlrAllDataBytes(pReaders));
    +    return;
    +  }
    +
    +  assert( nReaders<=MERGE_COUNT );
    +  n = 0;
    +  for(i=0; i<nReaders; i++){
    +    assert( pReaders[i].iType==pReaders[0].iType );
    +    readers[i].pReader = pReaders+i;
    +    readers[i].idx = i;
    +    n += dlrAllDataBytes(&pReaders[i]);
    +  }
    +  /* Conservatively size output to sum of inputs.  Output should end
    +  ** up strictly smaller than input.
    +  */
    +  dataBufferExpand(out, n);
    +
    +  /* Get the readers into sorted order. */
    +  while( i-->0 ){
    +    orderedDLReaderReorder(readers+i, nReaders-i);
    +  }
    +
    +  dlwInit(&writer, pReaders[0].iType, out);
    +  while( !dlrAtEnd(readers[0].pReader) ){
    +    sqlite_int64 iDocid = dlrDocid(readers[0].pReader);
    +
    +    /* If this is a continuation of the current buffer to copy, extend
    +    ** that buffer.  memcpy() seems to be more efficient if it has a
    +    ** lots of data to copy.
    +    */
    +    if( dlrDocData(readers[0].pReader)==pStart+nStart ){
    +      nStart += dlrDocDataBytes(readers[0].pReader);
    +    }else{
    +      if( pStart!=0 ){
    +        dlwAppend(&writer, pStart, nStart, iFirstDocid, iLastDocid);
    +      }
    +      pStart = dlrDocData(readers[0].pReader);
    +      nStart = dlrDocDataBytes(readers[0].pReader);
    +      iFirstDocid = iDocid;
    +    }
    +    iLastDocid = iDocid;
    +    dlrStep(readers[0].pReader);
    +
    +    /* Drop all of the older elements with the same docid. */
    +    for(i=1; i<nReaders &&
    +             !dlrAtEnd(readers[i].pReader) &&
    +             dlrDocid(readers[i].pReader)==iDocid; i++){
    +      dlrStep(readers[i].pReader);
    +    }
    +
    +    /* Get the readers back into order. */
    +    while( i-->0 ){
    +      orderedDLReaderReorder(readers+i, nReaders-i);
    +    }
    +  }
    +
    +  /* Copy over any remaining elements. */
    +  if( nStart>0 ) dlwAppend(&writer, pStart, nStart, iFirstDocid, iLastDocid);
    +  dlwDestroy(&writer);
    +}
    +
    +/* Helper function for posListUnion().  Compares the current position
    +** between left and right, returning as standard C idiom of <0 if
    +** left<right, >0 if left>right, and 0 if left==right.  "End" always
    +** compares greater.
    +*/
    +static int posListCmp(PLReader *pLeft, PLReader *pRight){
    +  assert( pLeft->iType==pRight->iType );
    +  if( pLeft->iType==DL_DOCIDS ) return 0;
    +
    +  if( plrAtEnd(pLeft) ) return plrAtEnd(pRight) ? 0 : 1;
    +  if( plrAtEnd(pRight) ) return -1;
    +
    +  if( plrColumn(pLeft)<plrColumn(pRight) ) return -1;
    +  if( plrColumn(pLeft)>plrColumn(pRight) ) return 1;
    +
    +  if( plrPosition(pLeft)<plrPosition(pRight) ) return -1;
    +  if( plrPosition(pLeft)>plrPosition(pRight) ) return 1;
    +  if( pLeft->iType==DL_POSITIONS ) return 0;
    +
    +  if( plrStartOffset(pLeft)<plrStartOffset(pRight) ) return -1;
    +  if( plrStartOffset(pLeft)>plrStartOffset(pRight) ) return 1;
    +
    +  if( plrEndOffset(pLeft)<plrEndOffset(pRight) ) return -1;
    +  if( plrEndOffset(pLeft)>plrEndOffset(pRight) ) return 1;
    +
    +  return 0;
    +}
    +
    +/* Write the union of position lists in pLeft and pRight to pOut.
    +** "Union" in this case meaning "All unique position tuples".  Should
    +** work with any doclist type, though both inputs and the output
    +** should be the same type.
    +*/
    +static void posListUnion(DLReader *pLeft, DLReader *pRight, DLWriter *pOut){
    +  PLReader left, right;
    +  PLWriter writer;
    +
    +  assert( dlrDocid(pLeft)==dlrDocid(pRight) );
    +  assert( pLeft->iType==pRight->iType );
    +  assert( pLeft->iType==pOut->iType );
    +
    +  plrInit(&left, pLeft);
    +  plrInit(&right, pRight);
    +  plwInit(&writer, pOut, dlrDocid(pLeft));
    +
    +  while( !plrAtEnd(&left) || !plrAtEnd(&right) ){
    +    int c = posListCmp(&left, &right);
    +    if( c<0 ){
    +      plwCopy(&writer, &left);
    +      plrStep(&left);
    +    }else if( c>0 ){
    +      plwCopy(&writer, &right);
    +      plrStep(&right);
    +    }else{
    +      plwCopy(&writer, &left);
    +      plrStep(&left);
    +      plrStep(&right);
    +    }
    +  }
    +
    +  plwTerminate(&writer);
    +  plwDestroy(&writer);
    +  plrDestroy(&left);
    +  plrDestroy(&right);
    +}
    +
    +/* Write the union of doclists in pLeft and pRight to pOut.  For
    +** docids in common between the inputs, the union of the position
    +** lists is written.  Inputs and outputs are always type DL_DEFAULT.
    +*/
    +static void docListUnion(
    +  const char *pLeft, int nLeft,
    +  const char *pRight, int nRight,
    +  DataBuffer *pOut      /* Write the combined doclist here */
    +){
    +  DLReader left, right;
    +  DLWriter writer;
    +
    +  if( nLeft==0 ){
    +    if( nRight!=0) dataBufferAppend(pOut, pRight, nRight);
    +    return;
    +  }
    +  if( nRight==0 ){
    +    dataBufferAppend(pOut, pLeft, nLeft);
    +    return;
    +  }
    +
    +  dlrInit(&left, DL_DEFAULT, pLeft, nLeft);
    +  dlrInit(&right, DL_DEFAULT, pRight, nRight);
    +  dlwInit(&writer, DL_DEFAULT, pOut);
    +
    +  while( !dlrAtEnd(&left) || !dlrAtEnd(&right) ){
    +    if( dlrAtEnd(&right) ){
    +      dlwCopy(&writer, &left);
    +      dlrStep(&left);
    +    }else if( dlrAtEnd(&left) ){
    +      dlwCopy(&writer, &right);
    +      dlrStep(&right);
    +    }else if( dlrDocid(&left)<dlrDocid(&right) ){
    +      dlwCopy(&writer, &left);
    +      dlrStep(&left);
    +    }else if( dlrDocid(&left)>dlrDocid(&right) ){
    +      dlwCopy(&writer, &right);
    +      dlrStep(&right);
    +    }else{
    +      posListUnion(&left, &right, &writer);
    +      dlrStep(&left);
    +      dlrStep(&right);
    +    }
    +  }
    +
    +  dlrDestroy(&left);
    +  dlrDestroy(&right);
    +  dlwDestroy(&writer);
    +}
    +
    +/* 
    +** This function is used as part of the implementation of phrase and
    +** NEAR matching.
    +**
    +** pLeft and pRight are DLReaders positioned to the same docid in
    +** lists of type DL_POSITION. This function writes an entry to the
    +** DLWriter pOut for each position in pRight that is less than
    +** (nNear+1) greater (but not equal to or smaller) than a position 
    +** in pLeft. For example, if nNear is 0, and the positions contained
    +** by pLeft and pRight are:
    +**
    +**    pLeft:  5 10 15 20
    +**    pRight: 6  9 17 21
    +**
    +** then the docid is added to pOut. If pOut is of type DL_POSITIONS,
    +** then a positionids "6" and "21" are also added to pOut.
    +**
    +** If boolean argument isSaveLeft is true, then positionids are copied
    +** from pLeft instead of pRight. In the example above, the positions "5"
    +** and "20" would be added instead of "6" and "21".
    +*/
    +static void posListPhraseMerge(
    +  DLReader *pLeft, 
    +  DLReader *pRight,
    +  int nNear,
    +  int isSaveLeft,
    +  DLWriter *pOut
    +){
    +  PLReader left, right;
    +  PLWriter writer;
    +  int match = 0;
    +
    +  assert( dlrDocid(pLeft)==dlrDocid(pRight) );
    +  assert( pOut->iType!=DL_POSITIONS_OFFSETS );
    +
    +  plrInit(&left, pLeft);
    +  plrInit(&right, pRight);
    +
    +  while( !plrAtEnd(&left) && !plrAtEnd(&right) ){
    +    if( plrColumn(&left)<plrColumn(&right) ){
    +      plrStep(&left);
    +    }else if( plrColumn(&left)>plrColumn(&right) ){
    +      plrStep(&right);
    +    }else if( plrPosition(&left)>=plrPosition(&right) ){
    +      plrStep(&right);
    +    }else{
    +      if( (plrPosition(&right)-plrPosition(&left))<=(nNear+1) ){
    +        if( !match ){
    +          plwInit(&writer, pOut, dlrDocid(pLeft));
    +          match = 1;
    +        }
    +        if( !isSaveLeft ){
    +          plwAdd(&writer, plrColumn(&right), plrPosition(&right), 0, 0);
    +        }else{
    +          plwAdd(&writer, plrColumn(&left), plrPosition(&left), 0, 0);
    +        }
    +        plrStep(&right);
    +      }else{
    +        plrStep(&left);
    +      }
    +    }
    +  }
    +
    +  if( match ){
    +    plwTerminate(&writer);
    +    plwDestroy(&writer);
    +  }
    +
    +  plrDestroy(&left);
    +  plrDestroy(&right);
    +}
    +
    +/*
    +** Compare the values pointed to by the PLReaders passed as arguments. 
    +** Return -1 if the value pointed to by pLeft is considered less than
    +** the value pointed to by pRight, +1 if it is considered greater
    +** than it, or 0 if it is equal. i.e.
    +**
    +**     (*pLeft - *pRight)
    +**
    +** A PLReader that is in the EOF condition is considered greater than
    +** any other. If neither argument is in EOF state, the return value of
    +** plrColumn() is used. If the plrColumn() values are equal, the
    +** comparison is on the basis of plrPosition().
    +*/
    +static int plrCompare(PLReader *pLeft, PLReader *pRight){
    +  assert(!plrAtEnd(pLeft) || !plrAtEnd(pRight));
    +
    +  if( plrAtEnd(pRight) || plrAtEnd(pLeft) ){
    +    return (plrAtEnd(pRight) ? -1 : 1);
    +  }
    +  if( plrColumn(pLeft)!=plrColumn(pRight) ){
    +    return ((plrColumn(pLeft)<plrColumn(pRight)) ? -1 : 1);
    +  }
    +  if( plrPosition(pLeft)!=plrPosition(pRight) ){
    +    return ((plrPosition(pLeft)<plrPosition(pRight)) ? -1 : 1);
    +  }
    +  return 0;
    +}
    +
    +/* We have two doclists with positions:  pLeft and pRight. Depending
    +** on the value of the nNear parameter, perform either a phrase
    +** intersection (if nNear==0) or a NEAR intersection (if nNear>0)
    +** and write the results into pOut.
    +**
    +** A phrase intersection means that two documents only match
    +** if pLeft.iPos+1==pRight.iPos.
    +**
    +** A NEAR intersection means that two documents only match if 
    +** (abs(pLeft.iPos-pRight.iPos)<nNear).
    +**
    +** If a NEAR intersection is requested, then the nPhrase argument should
    +** be passed the number of tokens in the two operands to the NEAR operator
    +** combined. For example:
    +**
    +**       Query syntax               nPhrase
    +**      ------------------------------------
    +**       "A B C" NEAR "D E"         5
    +**       A NEAR B                   2
    +**
    +** iType controls the type of data written to pOut.  If iType is
    +** DL_POSITIONS, the positions are those from pRight.
    +*/
    +static void docListPhraseMerge(
    +  const char *pLeft, int nLeft,
    +  const char *pRight, int nRight,
    +  int nNear,            /* 0 for a phrase merge, non-zero for a NEAR merge */
    +  int nPhrase,          /* Number of tokens in left+right operands to NEAR */
    +  DocListType iType,    /* Type of doclist to write to pOut */
    +  DataBuffer *pOut      /* Write the combined doclist here */
    +){
    +  DLReader left, right;
    +  DLWriter writer;
    +
    +  if( nLeft==0 || nRight==0 ) return;
    +
    +  assert( iType!=DL_POSITIONS_OFFSETS );
    +
    +  dlrInit(&left, DL_POSITIONS, pLeft, nLeft);
    +  dlrInit(&right, DL_POSITIONS, pRight, nRight);
    +  dlwInit(&writer, iType, pOut);
    +
    +  while( !dlrAtEnd(&left) && !dlrAtEnd(&right) ){
    +    if( dlrDocid(&left)<dlrDocid(&right) ){
    +      dlrStep(&left);
    +    }else if( dlrDocid(&right)<dlrDocid(&left) ){
    +      dlrStep(&right);
    +    }else{
    +      if( nNear==0 ){
    +        posListPhraseMerge(&left, &right, 0, 0, &writer);
    +      }else{
    +        /* This case occurs when two terms (simple terms or phrases) are
    +         * connected by a NEAR operator, span (nNear+1). i.e.
    +         *
    +         *     '"terrible company" NEAR widget'
    +         */
    +        DataBuffer one = {0, 0, 0};
    +        DataBuffer two = {0, 0, 0};
    +
    +        DLWriter dlwriter2;
    +        DLReader dr1 = {0, 0, 0, 0, 0}; 
    +        DLReader dr2 = {0, 0, 0, 0, 0};
    +
    +        dlwInit(&dlwriter2, iType, &one);
    +        posListPhraseMerge(&right, &left, nNear-3+nPhrase, 1, &dlwriter2);
    +        dlwInit(&dlwriter2, iType, &two);
    +        posListPhraseMerge(&left, &right, nNear-1, 0, &dlwriter2);
    +
    +        if( one.nData) dlrInit(&dr1, iType, one.pData, one.nData);
    +        if( two.nData) dlrInit(&dr2, iType, two.pData, two.nData);
    +
    +        if( !dlrAtEnd(&dr1) || !dlrAtEnd(&dr2) ){
    +          PLReader pr1 = {0};
    +          PLReader pr2 = {0};
    +
    +          PLWriter plwriter;
    +          plwInit(&plwriter, &writer, dlrDocid(dlrAtEnd(&dr1)?&dr2:&dr1));
    +
    +          if( one.nData ) plrInit(&pr1, &dr1);
    +          if( two.nData ) plrInit(&pr2, &dr2);
    +          while( !plrAtEnd(&pr1) || !plrAtEnd(&pr2) ){
    +            int iCompare = plrCompare(&pr1, &pr2);
    +            switch( iCompare ){
    +              case -1:
    +                plwCopy(&plwriter, &pr1);
    +                plrStep(&pr1);
    +                break;
    +              case 1:
    +                plwCopy(&plwriter, &pr2);
    +                plrStep(&pr2);
    +                break;
    +              case 0:
    +                plwCopy(&plwriter, &pr1);
    +                plrStep(&pr1);
    +                plrStep(&pr2);
    +                break;
    +            }
    +          }
    +          plwTerminate(&plwriter);
    +        }
    +        dataBufferDestroy(&one);
    +        dataBufferDestroy(&two);
    +      }
    +      dlrStep(&left);
    +      dlrStep(&right);
    +    }
    +  }
    +
    +  dlrDestroy(&left);
    +  dlrDestroy(&right);
    +  dlwDestroy(&writer);
    +}
    +
    +/* We have two DL_DOCIDS doclists:  pLeft and pRight.
    +** Write the intersection of these two doclists into pOut as a
    +** DL_DOCIDS doclist.
    +*/
    +static void docListAndMerge(
    +  const char *pLeft, int nLeft,
    +  const char *pRight, int nRight,
    +  DataBuffer *pOut      /* Write the combined doclist here */
    +){
    +  DLReader left, right;
    +  DLWriter writer;
    +
    +  if( nLeft==0 || nRight==0 ) return;
    +
    +  dlrInit(&left, DL_DOCIDS, pLeft, nLeft);
    +  dlrInit(&right, DL_DOCIDS, pRight, nRight);
    +  dlwInit(&writer, DL_DOCIDS, pOut);
    +
    +  while( !dlrAtEnd(&left) && !dlrAtEnd(&right) ){
    +    if( dlrDocid(&left)<dlrDocid(&right) ){
    +      dlrStep(&left);
    +    }else if( dlrDocid(&right)<dlrDocid(&left) ){
    +      dlrStep(&right);
    +    }else{
    +      dlwAdd(&writer, dlrDocid(&left));
    +      dlrStep(&left);
    +      dlrStep(&right);
    +    }
    +  }
    +
    +  dlrDestroy(&left);
    +  dlrDestroy(&right);
    +  dlwDestroy(&writer);
    +}
    +
    +/* We have two DL_DOCIDS doclists:  pLeft and pRight.
    +** Write the union of these two doclists into pOut as a
    +** DL_DOCIDS doclist.
    +*/
    +static void docListOrMerge(
    +  const char *pLeft, int nLeft,
    +  const char *pRight, int nRight,
    +  DataBuffer *pOut      /* Write the combined doclist here */
    +){
    +  DLReader left, right;
    +  DLWriter writer;
    +
    +  if( nLeft==0 ){
    +    if( nRight!=0 ) dataBufferAppend(pOut, pRight, nRight);
    +    return;
    +  }
    +  if( nRight==0 ){
    +    dataBufferAppend(pOut, pLeft, nLeft);
    +    return;
    +  }
    +
    +  dlrInit(&left, DL_DOCIDS, pLeft, nLeft);
    +  dlrInit(&right, DL_DOCIDS, pRight, nRight);
    +  dlwInit(&writer, DL_DOCIDS, pOut);
    +
    +  while( !dlrAtEnd(&left) || !dlrAtEnd(&right) ){
    +    if( dlrAtEnd(&right) ){
    +      dlwAdd(&writer, dlrDocid(&left));
    +      dlrStep(&left);
    +    }else if( dlrAtEnd(&left) ){
    +      dlwAdd(&writer, dlrDocid(&right));
    +      dlrStep(&right);
    +    }else if( dlrDocid(&left)<dlrDocid(&right) ){
    +      dlwAdd(&writer, dlrDocid(&left));
    +      dlrStep(&left);
    +    }else if( dlrDocid(&right)<dlrDocid(&left) ){
    +      dlwAdd(&writer, dlrDocid(&right));
    +      dlrStep(&right);
    +    }else{
    +      dlwAdd(&writer, dlrDocid(&left));
    +      dlrStep(&left);
    +      dlrStep(&right);
    +    }
    +  }
    +
    +  dlrDestroy(&left);
    +  dlrDestroy(&right);
    +  dlwDestroy(&writer);
    +}
    +
    +/* We have two DL_DOCIDS doclists:  pLeft and pRight.
    +** Write into pOut as DL_DOCIDS doclist containing all documents that
    +** occur in pLeft but not in pRight.
    +*/
    +static void docListExceptMerge(
    +  const char *pLeft, int nLeft,
    +  const char *pRight, int nRight,
    +  DataBuffer *pOut      /* Write the combined doclist here */
    +){
    +  DLReader left, right;
    +  DLWriter writer;
    +
    +  if( nLeft==0 ) return;
    +  if( nRight==0 ){
    +    dataBufferAppend(pOut, pLeft, nLeft);
    +    return;
    +  }
    +
    +  dlrInit(&left, DL_DOCIDS, pLeft, nLeft);
    +  dlrInit(&right, DL_DOCIDS, pRight, nRight);
    +  dlwInit(&writer, DL_DOCIDS, pOut);
    +
    +  while( !dlrAtEnd(&left) ){
    +    while( !dlrAtEnd(&right) && dlrDocid(&right)<dlrDocid(&left) ){
    +      dlrStep(&right);
    +    }
    +    if( dlrAtEnd(&right) || dlrDocid(&left)<dlrDocid(&right) ){
    +      dlwAdd(&writer, dlrDocid(&left));
    +    }
    +    dlrStep(&left);
    +  }
    +
    +  dlrDestroy(&left);
    +  dlrDestroy(&right);
    +  dlwDestroy(&writer);
    +}
    +
    +static char *string_dup_n(const char *s, int n){
    +  char *str = sqlite3_malloc(n + 1);
    +  memcpy(str, s, n);
    +  str[n] = '\0';
    +  return str;
    +}
    +
    +/* Duplicate a string; the caller must free() the returned string.
    + * (We don't use strdup() since it is not part of the standard C library and
    + * may not be available everywhere.) */
    +static char *string_dup(const char *s){
    +  return string_dup_n(s, strlen(s));
    +}
    +
    +/* Format a string, replacing each occurrence of the % character with
    + * zDb.zName.  This may be more convenient than sqlite_mprintf()
    + * when one string is used repeatedly in a format string.
    + * The caller must free() the returned string. */
    +static char *string_format(const char *zFormat,
    +                           const char *zDb, const char *zName){
    +  const char *p;
    +  size_t len = 0;
    +  size_t nDb = strlen(zDb);
    +  size_t nName = strlen(zName);
    +  size_t nFullTableName = nDb+1+nName;
    +  char *result;
    +  char *r;
    +
    +  /* first compute length needed */
    +  for(p = zFormat ; *p ; ++p){
    +    len += (*p=='%' ? nFullTableName : 1);
    +  }
    +  len += 1;  /* for null terminator */
    +
    +  r = result = sqlite3_malloc(len);
    +  for(p = zFormat; *p; ++p){
    +    if( *p=='%' ){
    +      memcpy(r, zDb, nDb);
    +      r += nDb;
    +      *r++ = '.';
    +      memcpy(r, zName, nName);
    +      r += nName;
    +    } else {
    +      *r++ = *p;
    +    }
    +  }
    +  *r++ = '\0';
    +  assert( r == result + len );
    +  return result;
    +}
    +
    +static int sql_exec(sqlite3 *db, const char *zDb, const char *zName,
    +                    const char *zFormat){
    +  char *zCommand = string_format(zFormat, zDb, zName);
    +  int rc;
    +  FTSTRACE(("FTS3 sql: %s\n", zCommand));
    +  rc = sqlite3_exec(db, zCommand, NULL, 0, NULL);
    +  sqlite3_free(zCommand);
    +  return rc;
    +}
    +
    +static int sql_prepare(sqlite3 *db, const char *zDb, const char *zName,
    +                       sqlite3_stmt **ppStmt, const char *zFormat){
    +  char *zCommand = string_format(zFormat, zDb, zName);
    +  int rc;
    +  FTSTRACE(("FTS3 prepare: %s\n", zCommand));
    +  rc = sqlite3_prepare_v2(db, zCommand, -1, ppStmt, NULL);
    +  sqlite3_free(zCommand);
    +  return rc;
    +}
    +
    +/* end utility functions */
    +
    +/* Forward reference */
    +typedef struct fulltext_vtab fulltext_vtab;
    +
    +/*
    +** An instance of the following structure keeps track of generated
    +** matching-word offset information and snippets.
    +*/
    +typedef struct Snippet {
    +  int nMatch;     /* Total number of matches */
    +  int nAlloc;     /* Space allocated for aMatch[] */
    +  struct snippetMatch { /* One entry for each matching term */
    +    char snStatus;       /* Status flag for use while constructing snippets */
    +    short int iCol;      /* The column that contains the match */
    +    short int iTerm;     /* The index in Query.pTerms[] of the matching term */
    +    int iToken;          /* The index of the matching document token */
    +    short int nByte;     /* Number of bytes in the term */
    +    int iStart;          /* The offset to the first character of the term */
    +  } *aMatch;      /* Points to space obtained from malloc */
    +  char *zOffset;  /* Text rendering of aMatch[] */
    +  int nOffset;    /* strlen(zOffset) */
    +  char *zSnippet; /* Snippet text */
    +  int nSnippet;   /* strlen(zSnippet) */
    +} Snippet;
    +
    +
    +typedef enum QueryType {
    +  QUERY_GENERIC,   /* table scan */
    +  QUERY_DOCID,     /* lookup by docid */
    +  QUERY_FULLTEXT   /* QUERY_FULLTEXT + [i] is a full-text search for column i*/
    +} QueryType;
    +
    +typedef enum fulltext_statement {
    +  CONTENT_INSERT_STMT,
    +  CONTENT_SELECT_STMT,
    +  CONTENT_UPDATE_STMT,
    +  CONTENT_DELETE_STMT,
    +  CONTENT_EXISTS_STMT,
    +
    +  BLOCK_INSERT_STMT,
    +  BLOCK_SELECT_STMT,
    +  BLOCK_DELETE_STMT,
    +  BLOCK_DELETE_ALL_STMT,
    +
    +  SEGDIR_MAX_INDEX_STMT,
    +  SEGDIR_SET_STMT,
    +  SEGDIR_SELECT_LEVEL_STMT,
    +  SEGDIR_SPAN_STMT,
    +  SEGDIR_DELETE_STMT,
    +  SEGDIR_SELECT_SEGMENT_STMT,
    +  SEGDIR_SELECT_ALL_STMT,
    +  SEGDIR_DELETE_ALL_STMT,
    +  SEGDIR_COUNT_STMT,
    +
    +  MAX_STMT                     /* Always at end! */
    +} fulltext_statement;
    +
    +/* These must exactly match the enum above. */
    +/* TODO(shess): Is there some risk that a statement will be used in two
    +** cursors at once, e.g.  if a query joins a virtual table to itself?
    +** If so perhaps we should move some of these to the cursor object.
    +*/
    +static const char *const fulltext_zStatement[MAX_STMT] = {
    +  /* CONTENT_INSERT */ NULL,  /* generated in contentInsertStatement() */
    +  /* CONTENT_SELECT */ NULL,  /* generated in contentSelectStatement() */
    +  /* CONTENT_UPDATE */ NULL,  /* generated in contentUpdateStatement() */
    +  /* CONTENT_DELETE */ "delete from %_content where docid = ?",
    +  /* CONTENT_EXISTS */ "select docid from %_content limit 1",
    +
    +  /* BLOCK_INSERT */
    +  "insert into %_segments (blockid, block) values (null, ?)",
    +  /* BLOCK_SELECT */ "select block from %_segments where blockid = ?",
    +  /* BLOCK_DELETE */ "delete from %_segments where blockid between ? and ?",
    +  /* BLOCK_DELETE_ALL */ "delete from %_segments",
    +
    +  /* SEGDIR_MAX_INDEX */ "select max(idx) from %_segdir where level = ?",
    +  /* SEGDIR_SET */ "insert into %_segdir values (?, ?, ?, ?, ?, ?)",
    +  /* SEGDIR_SELECT_LEVEL */
    +  "select start_block, leaves_end_block, root from %_segdir "
    +  " where level = ? order by idx",
    +  /* SEGDIR_SPAN */
    +  "select min(start_block), max(end_block) from %_segdir "
    +  " where level = ? and start_block <> 0",
    +  /* SEGDIR_DELETE */ "delete from %_segdir where level = ?",
    +
    +  /* NOTE(shess): The first three results of the following two
    +  ** statements must match.
    +  */
    +  /* SEGDIR_SELECT_SEGMENT */
    +  "select start_block, leaves_end_block, root from %_segdir "
    +  " where level = ? and idx = ?",
    +  /* SEGDIR_SELECT_ALL */
    +  "select start_block, leaves_end_block, root from %_segdir "
    +  " order by level desc, idx asc",
    +  /* SEGDIR_DELETE_ALL */ "delete from %_segdir",
    +  /* SEGDIR_COUNT */ "select count(*), ifnull(max(level),0) from %_segdir",
    +};
    +
    +/*
    +** A connection to a fulltext index is an instance of the following
    +** structure.  The xCreate and xConnect methods create an instance
    +** of this structure and xDestroy and xDisconnect free that instance.
    +** All other methods receive a pointer to the structure as one of their
    +** arguments.
    +*/
    +struct fulltext_vtab {
    +  sqlite3_vtab base;               /* Base class used by SQLite core */
    +  sqlite3 *db;                     /* The database connection */
    +  const char *zDb;                 /* logical database name */
    +  const char *zName;               /* virtual table name */
    +  int nColumn;                     /* number of columns in virtual table */
    +  char **azColumn;                 /* column names.  malloced */
    +  char **azContentColumn;          /* column names in content table; malloced */
    +  sqlite3_tokenizer *pTokenizer;   /* tokenizer for inserts and queries */
    +
    +  /* Precompiled statements which we keep as long as the table is
    +  ** open.
    +  */
    +  sqlite3_stmt *pFulltextStatements[MAX_STMT];
    +
    +  /* Precompiled statements used for segment merges.  We run a
    +  ** separate select across the leaf level of each tree being merged.
    +  */
    +  sqlite3_stmt *pLeafSelectStmts[MERGE_COUNT];
    +  /* The statement used to prepare pLeafSelectStmts. */
    +#define LEAF_SELECT \
    +  "select block from %_segments where blockid between ? and ? order by blockid"
    +
    +  /* These buffer pending index updates during transactions.
    +  ** nPendingData estimates the memory size of the pending data.  It
    +  ** doesn't include the hash-bucket overhead, nor any malloc
    +  ** overhead.  When nPendingData exceeds kPendingThreshold, the
    +  ** buffer is flushed even before the transaction closes.
    +  ** pendingTerms stores the data, and is only valid when nPendingData
    +  ** is >=0 (nPendingData<0 means pendingTerms has not been
    +  ** initialized).  iPrevDocid is the last docid written, used to make
    +  ** certain we're inserting in sorted order.
    +  */
    +  int nPendingData;
    +#define kPendingThreshold (1*1024*1024)
    +  sqlite_int64 iPrevDocid;
    +  fts3Hash pendingTerms;
    +};
    +
    +/*
    +** When the core wants to do a query, it create a cursor using a
    +** call to xOpen.  This structure is an instance of a cursor.  It
    +** is destroyed by xClose.
    +*/
    +typedef struct fulltext_cursor {
    +  sqlite3_vtab_cursor base;        /* Base class used by SQLite core */
    +  QueryType iCursorType;           /* Copy of sqlite3_index_info.idxNum */
    +  sqlite3_stmt *pStmt;             /* Prepared statement in use by the cursor */
    +  int eof;                         /* True if at End Of Results */
    +  Fts3Expr *pExpr;                 /* Parsed MATCH query string */
    +  Snippet snippet;                 /* Cached snippet for the current row */
    +  int iColumn;                     /* Column being searched */
    +  DataBuffer result;               /* Doclist results from fulltextQuery */
    +  DLReader reader;                 /* Result reader if result not empty */
    +} fulltext_cursor;
    +
    +static fulltext_vtab *cursor_vtab(fulltext_cursor *c){
    +  return (fulltext_vtab *) c->base.pVtab;
    +}
    +
    +static const sqlite3_module fts3Module;   /* forward declaration */
    +
    +/* Return a dynamically generated statement of the form
    + *   insert into %_content (docid, ...) values (?, ...)
    + */
    +static const char *contentInsertStatement(fulltext_vtab *v){
    +  StringBuffer sb;
    +  int i;
    +
    +  initStringBuffer(&sb);
    +  append(&sb, "insert into %_content (docid, ");
    +  appendList(&sb, v->nColumn, v->azContentColumn);
    +  append(&sb, ") values (?");
    +  for(i=0; i<v->nColumn; ++i)
    +    append(&sb, ", ?");
    +  append(&sb, ")");
    +  return stringBufferData(&sb);
    +}
    +
    +/* Return a dynamically generated statement of the form
    + *   select <content columns> from %_content where docid = ?
    + */
    +static const char *contentSelectStatement(fulltext_vtab *v){
    +  StringBuffer sb;
    +  initStringBuffer(&sb);
    +  append(&sb, "SELECT ");
    +  appendList(&sb, v->nColumn, v->azContentColumn);
    +  append(&sb, " FROM %_content WHERE docid = ?");
    +  return stringBufferData(&sb);
    +}
    +
    +/* Return a dynamically generated statement of the form
    + *   update %_content set [col_0] = ?, [col_1] = ?, ...
    + *                    where docid = ?
    + */
    +static const char *contentUpdateStatement(fulltext_vtab *v){
    +  StringBuffer sb;
    +  int i;
    +
    +  initStringBuffer(&sb);
    +  append(&sb, "update %_content set ");
    +  for(i=0; i<v->nColumn; ++i) {
    +    if( i>0 ){
    +      append(&sb, ", ");
    +    }
    +    append(&sb, v->azContentColumn[i]);
    +    append(&sb, " = ?");
    +  }
    +  append(&sb, " where docid = ?");
    +  return stringBufferData(&sb);
    +}
    +
    +/* Puts a freshly-prepared statement determined by iStmt in *ppStmt.
    +** If the indicated statement has never been prepared, it is prepared
    +** and cached, otherwise the cached version is reset.
    +*/
    +static int sql_get_statement(fulltext_vtab *v, fulltext_statement iStmt,
    +                             sqlite3_stmt **ppStmt){
    +  assert( iStmt<MAX_STMT );
    +  if( v->pFulltextStatements[iStmt]==NULL ){
    +    const char *zStmt;
    +    int rc;
    +    switch( iStmt ){
    +      case CONTENT_INSERT_STMT:
    +        zStmt = contentInsertStatement(v); break;
    +      case CONTENT_SELECT_STMT:
    +        zStmt = contentSelectStatement(v); break;
    +      case CONTENT_UPDATE_STMT:
    +        zStmt = contentUpdateStatement(v); break;
    +      default:
    +        zStmt = fulltext_zStatement[iStmt];
    +    }
    +    rc = sql_prepare(v->db, v->zDb, v->zName, &v->pFulltextStatements[iStmt],
    +                         zStmt);
    +    if( zStmt != fulltext_zStatement[iStmt]) sqlite3_free((void *) zStmt);
    +    if( rc!=SQLITE_OK ) return rc;
    +  } else {
    +    int rc = sqlite3_reset(v->pFulltextStatements[iStmt]);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  *ppStmt = v->pFulltextStatements[iStmt];
    +  return SQLITE_OK;
    +}
    +
    +/* Like sqlite3_step(), but convert SQLITE_DONE to SQLITE_OK and
    +** SQLITE_ROW to SQLITE_ERROR.  Useful for statements like UPDATE,
    +** where we expect no results.
    +*/
    +static int sql_single_step(sqlite3_stmt *s){
    +  int rc = sqlite3_step(s);
    +  return (rc==SQLITE_DONE) ? SQLITE_OK : rc;
    +}
    +
    +/* Like sql_get_statement(), but for special replicated LEAF_SELECT
    +** statements.  idx -1 is a special case for an uncached version of
    +** the statement (used in the optimize implementation).
    +*/
    +/* TODO(shess) Write version for generic statements and then share
    +** that between the cached-statement functions.
    +*/
    +static int sql_get_leaf_statement(fulltext_vtab *v, int idx,
    +                                  sqlite3_stmt **ppStmt){
    +  assert( idx>=-1 && idx<MERGE_COUNT );
    +  if( idx==-1 ){
    +    return sql_prepare(v->db, v->zDb, v->zName, ppStmt, LEAF_SELECT);
    +  }else if( v->pLeafSelectStmts[idx]==NULL ){
    +    int rc = sql_prepare(v->db, v->zDb, v->zName, &v->pLeafSelectStmts[idx],
    +                         LEAF_SELECT);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }else{
    +    int rc = sqlite3_reset(v->pLeafSelectStmts[idx]);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  *ppStmt = v->pLeafSelectStmts[idx];
    +  return SQLITE_OK;
    +}
    +
    +/* insert into %_content (docid, ...) values ([docid], [pValues])
    +** If the docid contains SQL NULL, then a unique docid will be
    +** generated.
    +*/
    +static int content_insert(fulltext_vtab *v, sqlite3_value *docid,
    +                          sqlite3_value **pValues){
    +  sqlite3_stmt *s;
    +  int i;
    +  int rc = sql_get_statement(v, CONTENT_INSERT_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_value(s, 1, docid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  for(i=0; i<v->nColumn; ++i){
    +    rc = sqlite3_bind_value(s, 2+i, pValues[i]);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  return sql_single_step(s);
    +}
    +
    +/* update %_content set col0 = pValues[0], col1 = pValues[1], ...
    + *                  where docid = [iDocid] */
    +static int content_update(fulltext_vtab *v, sqlite3_value **pValues,
    +                          sqlite_int64 iDocid){
    +  sqlite3_stmt *s;
    +  int i;
    +  int rc = sql_get_statement(v, CONTENT_UPDATE_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  for(i=0; i<v->nColumn; ++i){
    +    rc = sqlite3_bind_value(s, 1+i, pValues[i]);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  rc = sqlite3_bind_int64(s, 1+v->nColumn, iDocid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +static void freeStringArray(int nString, const char **pString){
    +  int i;
    +
    +  for (i=0 ; i < nString ; ++i) {
    +    if( pString[i]!=NULL ) sqlite3_free((void *) pString[i]);
    +  }
    +  sqlite3_free((void *) pString);
    +}
    +
    +/* select * from %_content where docid = [iDocid]
    + * The caller must delete the returned array and all strings in it.
    + * null fields will be NULL in the returned array.
    + *
    + * TODO: Perhaps we should return pointer/length strings here for consistency
    + * with other code which uses pointer/length. */
    +static int content_select(fulltext_vtab *v, sqlite_int64 iDocid,
    +                          const char ***pValues){
    +  sqlite3_stmt *s;
    +  const char **values;
    +  int i;
    +  int rc;
    +
    +  *pValues = NULL;
    +
    +  rc = sql_get_statement(v, CONTENT_SELECT_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 1, iDocid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  values = (const char **) sqlite3_malloc(v->nColumn * sizeof(const char *));
    +  for(i=0; i<v->nColumn; ++i){
    +    if( sqlite3_column_type(s, i)==SQLITE_NULL ){
    +      values[i] = NULL;
    +    }else{
    +      values[i] = string_dup((char*)sqlite3_column_text(s, i));
    +    }
    +  }
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_DONE ){
    +    *pValues = values;
    +    return SQLITE_OK;
    +  }
    +
    +  freeStringArray(v->nColumn, values);
    +  return rc;
    +}
    +
    +/* delete from %_content where docid = [iDocid ] */
    +static int content_delete(fulltext_vtab *v, sqlite_int64 iDocid){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, CONTENT_DELETE_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 1, iDocid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +/* Returns SQLITE_ROW if any rows exist in %_content, SQLITE_DONE if
    +** no rows exist, and any error in case of failure.
    +*/
    +static int content_exists(fulltext_vtab *v){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, CONTENT_EXISTS_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_DONE ) return SQLITE_ROW;
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  return rc;
    +}
    +
    +/* insert into %_segments values ([pData])
    +**   returns assigned blockid in *piBlockid
    +*/
    +static int block_insert(fulltext_vtab *v, const char *pData, int nData,
    +                        sqlite_int64 *piBlockid){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, BLOCK_INSERT_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_blob(s, 1, pData, nData, SQLITE_STATIC);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  if( rc!=SQLITE_DONE ) return rc;
    +
    +  /* blockid column is an alias for rowid. */
    +  *piBlockid = sqlite3_last_insert_rowid(v->db);
    +  return SQLITE_OK;
    +}
    +
    +/* delete from %_segments
    +**   where blockid between [iStartBlockid] and [iEndBlockid]
    +**
    +** Deletes the range of blocks, inclusive, used to delete the blocks
    +** which form a segment.
    +*/
    +static int block_delete(fulltext_vtab *v,
    +                        sqlite_int64 iStartBlockid, sqlite_int64 iEndBlockid){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, BLOCK_DELETE_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 1, iStartBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 2, iEndBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +/* Returns SQLITE_ROW with *pidx set to the maximum segment idx found
    +** at iLevel.  Returns SQLITE_DONE if there are no segments at
    +** iLevel.  Otherwise returns an error.
    +*/
    +static int segdir_max_index(fulltext_vtab *v, int iLevel, int *pidx){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_MAX_INDEX_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int(s, 1, iLevel);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  /* Should always get at least one row due to how max() works. */
    +  if( rc==SQLITE_DONE ) return SQLITE_DONE;
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  /* NULL means that there were no inputs to max(). */
    +  if( SQLITE_NULL==sqlite3_column_type(s, 0) ){
    +    rc = sqlite3_step(s);
    +    if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +    return rc;
    +  }
    +
    +  *pidx = sqlite3_column_int(s, 0);
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  if( rc!=SQLITE_DONE ) return rc;
    +  return SQLITE_ROW;
    +}
    +
    +/* insert into %_segdir values (
    +**   [iLevel], [idx],
    +**   [iStartBlockid], [iLeavesEndBlockid], [iEndBlockid],
    +**   [pRootData]
    +** )
    +*/
    +static int segdir_set(fulltext_vtab *v, int iLevel, int idx,
    +                      sqlite_int64 iStartBlockid,
    +                      sqlite_int64 iLeavesEndBlockid,
    +                      sqlite_int64 iEndBlockid,
    +                      const char *pRootData, int nRootData){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_SET_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int(s, 1, iLevel);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int(s, 2, idx);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 3, iStartBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 4, iLeavesEndBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 5, iEndBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_blob(s, 6, pRootData, nRootData, SQLITE_STATIC);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +/* Queries %_segdir for the block span of the segments in level
    +** iLevel.  Returns SQLITE_DONE if there are no blocks for iLevel,
    +** SQLITE_ROW if there are blocks, else an error.
    +*/
    +static int segdir_span(fulltext_vtab *v, int iLevel,
    +                       sqlite_int64 *piStartBlockid,
    +                       sqlite_int64 *piEndBlockid){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_SPAN_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int(s, 1, iLevel);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_DONE ) return SQLITE_DONE;  /* Should never happen */
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  /* This happens if all segments at this level are entirely inline. */
    +  if( SQLITE_NULL==sqlite3_column_type(s, 0) ){
    +    /* We expect only one row.  We must execute another sqlite3_step()
    +     * to complete the iteration; otherwise the table will remain locked. */
    +    int rc2 = sqlite3_step(s);
    +    if( rc2==SQLITE_ROW ) return SQLITE_ERROR;
    +    return rc2;
    +  }
    +
    +  *piStartBlockid = sqlite3_column_int64(s, 0);
    +  *piEndBlockid = sqlite3_column_int64(s, 1);
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  if( rc!=SQLITE_DONE ) return rc;
    +  return SQLITE_ROW;
    +}
    +
    +/* Delete the segment blocks and segment directory records for all
    +** segments at iLevel.
    +*/
    +static int segdir_delete(fulltext_vtab *v, int iLevel){
    +  sqlite3_stmt *s;
    +  sqlite_int64 iStartBlockid, iEndBlockid;
    +  int rc = segdir_span(v, iLevel, &iStartBlockid, &iEndBlockid);
    +  if( rc!=SQLITE_ROW && rc!=SQLITE_DONE ) return rc;
    +
    +  if( rc==SQLITE_ROW ){
    +    rc = block_delete(v, iStartBlockid, iEndBlockid);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  /* Delete the segment directory itself. */
    +  rc = sql_get_statement(v, SEGDIR_DELETE_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 1, iLevel);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +/* Delete entire fts index, SQLITE_OK on success, relevant error on
    +** failure.
    +*/
    +static int segdir_delete_all(fulltext_vtab *v){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_DELETE_ALL_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sql_single_step(s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sql_get_statement(v, BLOCK_DELETE_ALL_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return sql_single_step(s);
    +}
    +
    +/* Returns SQLITE_OK with *pnSegments set to the number of entries in
    +** %_segdir and *piMaxLevel set to the highest level which has a
    +** segment.  Otherwise returns the SQLite error which caused failure.
    +*/
    +static int segdir_count(fulltext_vtab *v, int *pnSegments, int *piMaxLevel){
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_COUNT_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  /* TODO(shess): This case should not be possible?  Should stronger
    +  ** measures be taken if it happens?
    +  */
    +  if( rc==SQLITE_DONE ){
    +    *pnSegments = 0;
    +    *piMaxLevel = 0;
    +    return SQLITE_OK;
    +  }
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  *pnSegments = sqlite3_column_int(s, 0);
    +  *piMaxLevel = sqlite3_column_int(s, 1);
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_DONE ) return SQLITE_OK;
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  return rc;
    +}
    +
    +/* TODO(shess) clearPendingTerms() is far down the file because
    +** writeZeroSegment() is far down the file because LeafWriter is far
    +** down the file.  Consider refactoring the code to move the non-vtab
    +** code above the vtab code so that we don't need this forward
    +** reference.
    +*/
    +static int clearPendingTerms(fulltext_vtab *v);
    +
    +/*
    +** Free the memory used to contain a fulltext_vtab structure.
    +*/
    +static void fulltext_vtab_destroy(fulltext_vtab *v){
    +  int iStmt, i;
    +
    +  FTSTRACE(("FTS3 Destroy %p\n", v));
    +  for( iStmt=0; iStmt<MAX_STMT; iStmt++ ){
    +    if( v->pFulltextStatements[iStmt]!=NULL ){
    +      sqlite3_finalize(v->pFulltextStatements[iStmt]);
    +      v->pFulltextStatements[iStmt] = NULL;
    +    }
    +  }
    +
    +  for( i=0; i<MERGE_COUNT; i++ ){
    +    if( v->pLeafSelectStmts[i]!=NULL ){
    +      sqlite3_finalize(v->pLeafSelectStmts[i]);
    +      v->pLeafSelectStmts[i] = NULL;
    +    }
    +  }
    +
    +  if( v->pTokenizer!=NULL ){
    +    v->pTokenizer->pModule->xDestroy(v->pTokenizer);
    +    v->pTokenizer = NULL;
    +  }
    +
    +  clearPendingTerms(v);
    +
    +  sqlite3_free(v->azColumn);
    +  for(i = 0; i < v->nColumn; ++i) {
    +    sqlite3_free(v->azContentColumn[i]);
    +  }
    +  sqlite3_free(v->azContentColumn);
    +  sqlite3_free(v);
    +}
    +
    +/*
    +** Token types for parsing the arguments to xConnect or xCreate.
    +*/
    +#define TOKEN_EOF         0    /* End of file */
    +#define TOKEN_SPACE       1    /* Any kind of whitespace */
    +#define TOKEN_ID          2    /* An identifier */
    +#define TOKEN_STRING      3    /* A string literal */
    +#define TOKEN_PUNCT       4    /* A single punctuation character */
    +
    +/*
    +** If X is a character that can be used in an identifier then
    +** ftsIdChar(X) will be true.  Otherwise it is false.
    +**
    +** For ASCII, any character with the high-order bit set is
    +** allowed in an identifier.  For 7-bit characters, 
    +** isFtsIdChar[X] must be 1.
    +**
    +** Ticket #1066.  the SQL standard does not allow '$' in the
    +** middle of identfiers.  But many SQL implementations do. 
    +** SQLite will allow '$' in identifiers for compatibility.
    +** But the feature is undocumented.
    +*/
    +static const char isFtsIdChar[] = {
    +/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
    +    0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 2x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */
    +};
    +#define ftsIdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && isFtsIdChar[c-0x20]))
    +
    +
    +/*
    +** Return the length of the token that begins at z[0]. 
    +** Store the token type in *tokenType before returning.
    +*/
    +static int ftsGetToken(const char *z, int *tokenType){
    +  int i, c;
    +  switch( *z ){
    +    case 0: {
    +      *tokenType = TOKEN_EOF;
    +      return 0;
    +    }
    +    case ' ': case '\t': case '\n': case '\f': case '\r': {
    +      for(i=1; safe_isspace(z[i]); i++){}
    +      *tokenType = TOKEN_SPACE;
    +      return i;
    +    }
    +    case '`':
    +    case '\'':
    +    case '"': {
    +      int delim = z[0];
    +      for(i=1; (c=z[i])!=0; i++){
    +        if( c==delim ){
    +          if( z[i+1]==delim ){
    +            i++;
    +          }else{
    +            break;
    +          }
    +        }
    +      }
    +      *tokenType = TOKEN_STRING;
    +      return i + (c!=0);
    +    }
    +    case '[': {
    +      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}
    +      *tokenType = TOKEN_ID;
    +      return i;
    +    }
    +    default: {
    +      if( !ftsIdChar(*z) ){
    +        break;
    +      }
    +      for(i=1; ftsIdChar(z[i]); i++){}
    +      *tokenType = TOKEN_ID;
    +      return i;
    +    }
    +  }
    +  *tokenType = TOKEN_PUNCT;
    +  return 1;
    +}
    +
    +/*
    +** A token extracted from a string is an instance of the following
    +** structure.
    +*/
    +typedef struct FtsToken {
    +  const char *z;       /* Pointer to token text.  Not '\000' terminated */
    +  short int n;         /* Length of the token text in bytes. */
    +} FtsToken;
    +
    +/*
    +** Given a input string (which is really one of the argv[] parameters
    +** passed into xConnect or xCreate) split the string up into tokens.
    +** Return an array of pointers to '\000' terminated strings, one string
    +** for each non-whitespace token.
    +**
    +** The returned array is terminated by a single NULL pointer.
    +**
    +** Space to hold the returned array is obtained from a single
    +** malloc and should be freed by passing the return value to free().
    +** The individual strings within the token list are all a part of
    +** the single memory allocation and will all be freed at once.
    +*/
    +static char **tokenizeString(const char *z, int *pnToken){
    +  int nToken = 0;
    +  FtsToken *aToken = sqlite3_malloc( strlen(z) * sizeof(aToken[0]) );
    +  int n = 1;
    +  int e, i;
    +  int totalSize = 0;
    +  char **azToken;
    +  char *zCopy;
    +  while( n>0 ){
    +    n = ftsGetToken(z, &e);
    +    if( e!=TOKEN_SPACE ){
    +      aToken[nToken].z = z;
    +      aToken[nToken].n = n;
    +      nToken++;
    +      totalSize += n+1;
    +    }
    +    z += n;
    +  }
    +  azToken = (char**)sqlite3_malloc( nToken*sizeof(char*) + totalSize );
    +  zCopy = (char*)&azToken[nToken];
    +  nToken--;
    +  for(i=0; i<nToken; i++){
    +    azToken[i] = zCopy;
    +    n = aToken[i].n;
    +    memcpy(zCopy, aToken[i].z, n);
    +    zCopy[n] = 0;
    +    zCopy += n+1;
    +  }
    +  azToken[nToken] = 0;
    +  sqlite3_free(aToken);
    +  *pnToken = nToken;
    +  return azToken;
    +}
    +
    +/*
    +** Convert an SQL-style quoted string into a normal string by removing
    +** the quote characters.  The conversion is done in-place.  If the
    +** input does not begin with a quote character, then this routine
    +** is a no-op.
    +**
    +** Examples:
    +**
    +**     "abc"   becomes   abc
    +**     'xyz'   becomes   xyz
    +**     [pqr]   becomes   pqr
    +**     `mno`   becomes   mno
    +*/
    +static void dequoteString(char *z){
    +  int quote;
    +  int i, j;
    +  if( z==0 ) return;
    +  quote = z[0];
    +  switch( quote ){
    +    case '\'':  break;
    +    case '"':   break;
    +    case '`':   break;                /* For MySQL compatibility */
    +    case '[':   quote = ']';  break;  /* For MS SqlServer compatibility */
    +    default:    return;
    +  }
    +  for(i=1, j=0; z[i]; i++){
    +    if( z[i]==quote ){
    +      if( z[i+1]==quote ){
    +        z[j++] = quote;
    +        i++;
    +      }else{
    +        z[j++] = 0;
    +        break;
    +      }
    +    }else{
    +      z[j++] = z[i];
    +    }
    +  }
    +}
    +
    +/*
    +** The input azIn is a NULL-terminated list of tokens.  Remove the first
    +** token and all punctuation tokens.  Remove the quotes from
    +** around string literal tokens.
    +**
    +** Example:
    +**
    +**     input:      tokenize chinese ( 'simplifed' , 'mixed' )
    +**     output:     chinese simplifed mixed
    +**
    +** Another example:
    +**
    +**     input:      delimiters ( '[' , ']' , '...' )
    +**     output:     [ ] ...
    +*/
    +static void tokenListToIdList(char **azIn){
    +  int i, j;
    +  if( azIn ){
    +    for(i=0, j=-1; azIn[i]; i++){
    +      if( safe_isalnum(azIn[i][0]) || azIn[i][1] ){
    +        dequoteString(azIn[i]);
    +        if( j>=0 ){
    +          azIn[j] = azIn[i];
    +        }
    +        j++;
    +      }
    +    }
    +    azIn[j] = 0;
    +  }
    +}
    +
    +
    +/*
    +** Find the first alphanumeric token in the string zIn.  Null-terminate
    +** this token.  Remove any quotation marks.  And return a pointer to
    +** the result.
    +*/
    +static char *firstToken(char *zIn, char **pzTail){
    +  int n, ttype;
    +  while(1){
    +    n = ftsGetToken(zIn, &ttype);
    +    if( ttype==TOKEN_SPACE ){
    +      zIn += n;
    +    }else if( ttype==TOKEN_EOF ){
    +      *pzTail = zIn;
    +      return 0;
    +    }else{
    +      zIn[n] = 0;
    +      *pzTail = &zIn[1];
    +      dequoteString(zIn);
    +      return zIn;
    +    }
    +  }
    +  /*NOTREACHED*/
    +}
    +
    +/* Return true if...
    +**
    +**   *  s begins with the string t, ignoring case
    +**   *  s is longer than t
    +**   *  The first character of s beyond t is not a alphanumeric
    +** 
    +** Ignore leading space in *s.
    +**
    +** To put it another way, return true if the first token of
    +** s[] is t[].
    +*/
    +static int startsWith(const char *s, const char *t){
    +  while( safe_isspace(*s) ){ s++; }
    +  while( *t ){
    +    if( safe_tolower(*s++)!=safe_tolower(*t++) ) return 0;
    +  }
    +  return *s!='_' && !safe_isalnum(*s);
    +}
    +
    +/*
    +** An instance of this structure defines the "spec" of a
    +** full text index.  This structure is populated by parseSpec
    +** and use by fulltextConnect and fulltextCreate.
    +*/
    +typedef struct TableSpec {
    +  const char *zDb;         /* Logical database name */
    +  const char *zName;       /* Name of the full-text index */
    +  int nColumn;             /* Number of columns to be indexed */
    +  char **azColumn;         /* Original names of columns to be indexed */
    +  char **azContentColumn;  /* Column names for %_content */
    +  char **azTokenizer;      /* Name of tokenizer and its arguments */
    +} TableSpec;
    +
    +/*
    +** Reclaim all of the memory used by a TableSpec
    +*/
    +static void clearTableSpec(TableSpec *p) {
    +  sqlite3_free(p->azColumn);
    +  sqlite3_free(p->azContentColumn);
    +  sqlite3_free(p->azTokenizer);
    +}
    +
    +/* Parse a CREATE VIRTUAL TABLE statement, which looks like this:
    + *
    + * CREATE VIRTUAL TABLE email
    + *        USING fts3(subject, body, tokenize mytokenizer(myarg))
    + *
    + * We return parsed information in a TableSpec structure.
    + * 
    + */
    +static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv,
    +                     char**pzErr){
    +  int i, n;
    +  char *z, *zDummy;
    +  char **azArg;
    +  const char *zTokenizer = 0;    /* argv[] entry describing the tokenizer */
    +
    +  assert( argc>=3 );
    +  /* Current interface:
    +  ** argv[0] - module name
    +  ** argv[1] - database name
    +  ** argv[2] - table name
    +  ** argv[3..] - columns, optionally followed by tokenizer specification
    +  **             and snippet delimiters specification.
    +  */
    +
    +  /* Make a copy of the complete argv[][] array in a single allocation.
    +  ** The argv[][] array is read-only and transient.  We can write to the
    +  ** copy in order to modify things and the copy is persistent.
    +  */
    +  CLEAR(pSpec);
    +  for(i=n=0; i<argc; i++){
    +    n += strlen(argv[i]) + 1;
    +  }
    +  azArg = sqlite3_malloc( sizeof(char*)*argc + n );
    +  if( azArg==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +  z = (char*)&azArg[argc];
    +  for(i=0; i<argc; i++){
    +    azArg[i] = z;
    +    strcpy(z, argv[i]);
    +    z += strlen(z)+1;
    +  }
    +
    +  /* Identify the column names and the tokenizer and delimiter arguments
    +  ** in the argv[][] array.
    +  */
    +  pSpec->zDb = azArg[1];
    +  pSpec->zName = azArg[2];
    +  pSpec->nColumn = 0;
    +  pSpec->azColumn = azArg;
    +  zTokenizer = "tokenize simple";
    +  for(i=3; i<argc; ++i){
    +    if( startsWith(azArg[i],"tokenize") ){
    +      zTokenizer = azArg[i];
    +    }else{
    +      z = azArg[pSpec->nColumn] = firstToken(azArg[i], &zDummy);
    +      pSpec->nColumn++;
    +    }
    +  }
    +  if( pSpec->nColumn==0 ){
    +    azArg[0] = "content";
    +    pSpec->nColumn = 1;
    +  }
    +
    +  /*
    +  ** Construct the list of content column names.
    +  **
    +  ** Each content column name will be of the form cNNAAAA
    +  ** where NN is the column number and AAAA is the sanitized
    +  ** column name.  "sanitized" means that special characters are
    +  ** converted to "_".  The cNN prefix guarantees that all column
    +  ** names are unique.
    +  **
    +  ** The AAAA suffix is not strictly necessary.  It is included
    +  ** for the convenience of people who might examine the generated
    +  ** %_content table and wonder what the columns are used for.
    +  */
    +  pSpec->azContentColumn = sqlite3_malloc( pSpec->nColumn * sizeof(char *) );
    +  if( pSpec->azContentColumn==0 ){
    +    clearTableSpec(pSpec);
    +    return SQLITE_NOMEM;
    +  }
    +  for(i=0; i<pSpec->nColumn; i++){
    +    char *p;
    +    pSpec->azContentColumn[i] = sqlite3_mprintf("c%d%s", i, azArg[i]);
    +    for (p = pSpec->azContentColumn[i]; *p ; ++p) {
    +      if( !safe_isalnum(*p) ) *p = '_';
    +    }
    +  }
    +
    +  /*
    +  ** Parse the tokenizer specification string.
    +  */
    +  pSpec->azTokenizer = tokenizeString(zTokenizer, &n);
    +  tokenListToIdList(pSpec->azTokenizer);
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Generate a CREATE TABLE statement that describes the schema of
    +** the virtual table.  Return a pointer to this schema string.
    +**
    +** Space is obtained from sqlite3_mprintf() and should be freed
    +** using sqlite3_free().
    +*/
    +static char *fulltextSchema(
    +  int nColumn,                  /* Number of columns */
    +  const char *const* azColumn,  /* List of columns */
    +  const char *zTableName        /* Name of the table */
    +){
    +  int i;
    +  char *zSchema, *zNext;
    +  const char *zSep = "(";
    +  zSchema = sqlite3_mprintf("CREATE TABLE x");
    +  for(i=0; i<nColumn; i++){
    +    zNext = sqlite3_mprintf("%s%s%Q", zSchema, zSep, azColumn[i]);
    +    sqlite3_free(zSchema);
    +    zSchema = zNext;
    +    zSep = ",";
    +  }
    +  zNext = sqlite3_mprintf("%s,%Q HIDDEN", zSchema, zTableName);
    +  sqlite3_free(zSchema);
    +  zSchema = zNext;
    +  zNext = sqlite3_mprintf("%s,docid HIDDEN)", zSchema);
    +  sqlite3_free(zSchema);
    +  return zNext;
    +}
    +
    +/*
    +** Build a new sqlite3_vtab structure that will describe the
    +** fulltext index defined by spec.
    +*/
    +static int constructVtab(
    +  sqlite3 *db,              /* The SQLite database connection */
    +  fts3Hash *pHash,          /* Hash table containing tokenizers */
    +  TableSpec *spec,          /* Parsed spec information from parseSpec() */
    +  sqlite3_vtab **ppVTab,    /* Write the resulting vtab structure here */
    +  char **pzErr              /* Write any error message here */
    +){
    +  int rc;
    +  int n;
    +  fulltext_vtab *v = 0;
    +  const sqlite3_tokenizer_module *m = NULL;
    +  char *schema;
    +
    +  char const *zTok;         /* Name of tokenizer to use for this fts table */
    +  int nTok;                 /* Length of zTok, including nul terminator */
    +
    +  v = (fulltext_vtab *) sqlite3_malloc(sizeof(fulltext_vtab));
    +  if( v==0 ) return SQLITE_NOMEM;
    +  CLEAR(v);
    +  /* sqlite will initialize v->base */
    +  v->db = db;
    +  v->zDb = spec->zDb;       /* Freed when azColumn is freed */
    +  v->zName = spec->zName;   /* Freed when azColumn is freed */
    +  v->nColumn = spec->nColumn;
    +  v->azContentColumn = spec->azContentColumn;
    +  spec->azContentColumn = 0;
    +  v->azColumn = spec->azColumn;
    +  spec->azColumn = 0;
    +
    +  if( spec->azTokenizer==0 ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  zTok = spec->azTokenizer[0]; 
    +  if( !zTok ){
    +    zTok = "simple";
    +  }
    +  nTok = strlen(zTok)+1;
    +
    +  m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zTok, nTok);
    +  if( !m ){
    +    *pzErr = sqlite3_mprintf("unknown tokenizer: %s", spec->azTokenizer[0]);
    +    rc = SQLITE_ERROR;
    +    goto err;
    +  }
    +
    +  for(n=0; spec->azTokenizer[n]; n++){}
    +  if( n ){
    +    rc = m->xCreate(n-1, (const char*const*)&spec->azTokenizer[1],
    +                    &v->pTokenizer);
    +  }else{
    +    rc = m->xCreate(0, 0, &v->pTokenizer);
    +  }
    +  if( rc!=SQLITE_OK ) goto err;
    +  v->pTokenizer->pModule = m;
    +
    +  /* TODO: verify the existence of backing tables foo_content, foo_term */
    +
    +  schema = fulltextSchema(v->nColumn, (const char*const*)v->azColumn,
    +                          spec->zName);
    +  rc = sqlite3_declare_vtab(db, schema);
    +  sqlite3_free(schema);
    +  if( rc!=SQLITE_OK ) goto err;
    +
    +  memset(v->pFulltextStatements, 0, sizeof(v->pFulltextStatements));
    +
    +  /* Indicate that the buffer is not live. */
    +  v->nPendingData = -1;
    +
    +  *ppVTab = &v->base;
    +  FTSTRACE(("FTS3 Connect %p\n", v));
    +
    +  return rc;
    +
    +err:
    +  fulltext_vtab_destroy(v);
    +  return rc;
    +}
    +
    +static int fulltextConnect(
    +  sqlite3 *db,
    +  void *pAux,
    +  int argc, const char *const*argv,
    +  sqlite3_vtab **ppVTab,
    +  char **pzErr
    +){
    +  TableSpec spec;
    +  int rc = parseSpec(&spec, argc, argv, pzErr);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = constructVtab(db, (fts3Hash *)pAux, &spec, ppVTab, pzErr);
    +  clearTableSpec(&spec);
    +  return rc;
    +}
    +
    +/* The %_content table holds the text of each document, with
    +** the docid column exposed as the SQLite rowid for the table.
    +*/
    +/* TODO(shess) This comment needs elaboration to match the updated
    +** code.  Work it into the top-of-file comment at that time.
    +*/
    +static int fulltextCreate(sqlite3 *db, void *pAux,
    +                          int argc, const char * const *argv,
    +                          sqlite3_vtab **ppVTab, char **pzErr){
    +  int rc;
    +  TableSpec spec;
    +  StringBuffer schema;
    +  FTSTRACE(("FTS3 Create\n"));
    +
    +  rc = parseSpec(&spec, argc, argv, pzErr);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  initStringBuffer(&schema);
    +  append(&schema, "CREATE TABLE %_content(");
    +  append(&schema, "  docid INTEGER PRIMARY KEY,");
    +  appendList(&schema, spec.nColumn, spec.azContentColumn);
    +  append(&schema, ")");
    +  rc = sql_exec(db, spec.zDb, spec.zName, stringBufferData(&schema));
    +  stringBufferDestroy(&schema);
    +  if( rc!=SQLITE_OK ) goto out;
    +
    +  rc = sql_exec(db, spec.zDb, spec.zName,
    +                "create table %_segments("
    +                "  blockid INTEGER PRIMARY KEY,"
    +                "  block blob"
    +                ");"
    +                );
    +  if( rc!=SQLITE_OK ) goto out;
    +
    +  rc = sql_exec(db, spec.zDb, spec.zName,
    +                "create table %_segdir("
    +                "  level integer,"
    +                "  idx integer,"
    +                "  start_block integer,"
    +                "  leaves_end_block integer,"
    +                "  end_block integer,"
    +                "  root blob,"
    +                "  primary key(level, idx)"
    +                ");");
    +  if( rc!=SQLITE_OK ) goto out;
    +
    +  rc = constructVtab(db, (fts3Hash *)pAux, &spec, ppVTab, pzErr);
    +
    +out:
    +  clearTableSpec(&spec);
    +  return rc;
    +}
    +
    +/* Decide how to handle an SQL query. */
    +static int fulltextBestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
    +  fulltext_vtab *v = (fulltext_vtab *)pVTab;
    +  int i;
    +  FTSTRACE(("FTS3 BestIndex\n"));
    +
    +  for(i=0; i<pInfo->nConstraint; ++i){
    +    const struct sqlite3_index_constraint *pConstraint;
    +    pConstraint = &pInfo->aConstraint[i];
    +    if( pConstraint->usable ) {
    +      if( (pConstraint->iColumn==-1 || pConstraint->iColumn==v->nColumn+1) &&
    +          pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){
    +        pInfo->idxNum = QUERY_DOCID;      /* lookup by docid */
    +        FTSTRACE(("FTS3 QUERY_DOCID\n"));
    +      } else if( pConstraint->iColumn>=0 && pConstraint->iColumn<=v->nColumn &&
    +                 pConstraint->op==SQLITE_INDEX_CONSTRAINT_MATCH ){
    +        /* full-text search */
    +        pInfo->idxNum = QUERY_FULLTEXT + pConstraint->iColumn;
    +        FTSTRACE(("FTS3 QUERY_FULLTEXT %d\n", pConstraint->iColumn));
    +      } else continue;
    +
    +      pInfo->aConstraintUsage[i].argvIndex = 1;
    +      pInfo->aConstraintUsage[i].omit = 1;
    +
    +      /* An arbitrary value for now.
    +       * TODO: Perhaps docid matches should be considered cheaper than
    +       * full-text searches. */
    +      pInfo->estimatedCost = 1.0;   
    +
    +      return SQLITE_OK;
    +    }
    +  }
    +  pInfo->idxNum = QUERY_GENERIC;
    +  return SQLITE_OK;
    +}
    +
    +static int fulltextDisconnect(sqlite3_vtab *pVTab){
    +  FTSTRACE(("FTS3 Disconnect %p\n", pVTab));
    +  fulltext_vtab_destroy((fulltext_vtab *)pVTab);
    +  return SQLITE_OK;
    +}
    +
    +static int fulltextDestroy(sqlite3_vtab *pVTab){
    +  fulltext_vtab *v = (fulltext_vtab *)pVTab;
    +  int rc;
    +
    +  FTSTRACE(("FTS3 Destroy %p\n", pVTab));
    +  rc = sql_exec(v->db, v->zDb, v->zName,
    +                "drop table if exists %_content;"
    +                "drop table if exists %_segments;"
    +                "drop table if exists %_segdir;"
    +                );
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  fulltext_vtab_destroy((fulltext_vtab *)pVTab);
    +  return SQLITE_OK;
    +}
    +
    +static int fulltextOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
    +  fulltext_cursor *c;
    +
    +  c = (fulltext_cursor *) sqlite3_malloc(sizeof(fulltext_cursor));
    +  if( c ){
    +    memset(c, 0, sizeof(fulltext_cursor));
    +    /* sqlite will initialize c->base */
    +    *ppCursor = &c->base;
    +    FTSTRACE(("FTS3 Open %p: %p\n", pVTab, c));
    +    return SQLITE_OK;
    +  }else{
    +    return SQLITE_NOMEM;
    +  }
    +}
    +
    +/* Free all of the dynamically allocated memory held by the
    +** Snippet
    +*/
    +static void snippetClear(Snippet *p){
    +  sqlite3_free(p->aMatch);
    +  sqlite3_free(p->zOffset);
    +  sqlite3_free(p->zSnippet);
    +  CLEAR(p);
    +}
    +
    +/*
    +** Append a single entry to the p->aMatch[] log.
    +*/
    +static void snippetAppendMatch(
    +  Snippet *p,               /* Append the entry to this snippet */
    +  int iCol, int iTerm,      /* The column and query term */
    +  int iToken,               /* Matching token in document */
    +  int iStart, int nByte     /* Offset and size of the match */
    +){
    +  int i;
    +  struct snippetMatch *pMatch;
    +  if( p->nMatch+1>=p->nAlloc ){
    +    p->nAlloc = p->nAlloc*2 + 10;
    +    p->aMatch = sqlite3_realloc(p->aMatch, p->nAlloc*sizeof(p->aMatch[0]) );
    +    if( p->aMatch==0 ){
    +      p->nMatch = 0;
    +      p->nAlloc = 0;
    +      return;
    +    }
    +  }
    +  i = p->nMatch++;
    +  pMatch = &p->aMatch[i];
    +  pMatch->iCol = iCol;
    +  pMatch->iTerm = iTerm;
    +  pMatch->iToken = iToken;
    +  pMatch->iStart = iStart;
    +  pMatch->nByte = nByte;
    +}
    +
    +/*
    +** Sizing information for the circular buffer used in snippetOffsetsOfColumn()
    +*/
    +#define FTS3_ROTOR_SZ   (32)
    +#define FTS3_ROTOR_MASK (FTS3_ROTOR_SZ-1)
    +
    +/*
    +** Function to iterate through the tokens of a compiled expression.
    +**
    +** Except, skip all tokens on the right-hand side of a NOT operator.
    +** This function is used to find tokens as part of snippet and offset
    +** generation and we do nt want snippets and offsets to report matches
    +** for tokens on the RHS of a NOT.
    +*/
    +static int fts3NextExprToken(Fts3Expr **ppExpr, int *piToken){
    +  Fts3Expr *p = *ppExpr;
    +  int iToken = *piToken;
    +  if( iToken<0 ){
    +    /* In this case the expression p is the root of an expression tree.
    +    ** Move to the first token in the expression tree.
    +    */
    +    while( p->pLeft ){
    +      p = p->pLeft;
    +    }
    +    iToken = 0;
    +  }else{
    +    assert(p && p->eType==FTSQUERY_PHRASE );
    +    if( iToken<(p->pPhrase->nToken-1) ){
    +      iToken++;
    +    }else{
    +      iToken = 0;
    +      while( p->pParent && p->pParent->pLeft!=p ){
    +        assert( p->pParent->pRight==p );
    +        p = p->pParent;
    +      }
    +      p = p->pParent;
    +      if( p ){
    +        assert( p->pRight!=0 );
    +        p = p->pRight;
    +        while( p->pLeft ){
    +          p = p->pLeft;
    +        }
    +      }
    +    }
    +  }
    +
    +  *ppExpr = p;
    +  *piToken = iToken;
    +  return p?1:0;
    +}
    +
    +/*
    +** Return TRUE if the expression node pExpr is located beneath the
    +** RHS of a NOT operator.
    +*/
    +static int fts3ExprBeneathNot(Fts3Expr *p){
    +  Fts3Expr *pParent;
    +  while( p ){
    +    pParent = p->pParent;
    +    if( pParent && pParent->eType==FTSQUERY_NOT && pParent->pRight==p ){
    +      return 1;
    +    }
    +    p = pParent;
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Add entries to pSnippet->aMatch[] for every match that occurs against
    +** document zDoc[0..nDoc-1] which is stored in column iColumn.
    +*/
    +static void snippetOffsetsOfColumn(
    +  fulltext_cursor *pCur,         /* The fulltest search cursor */
    +  Snippet *pSnippet,             /* The Snippet object to be filled in */
    +  int iColumn,                   /* Index of fulltext table column */
    +  const char *zDoc,              /* Text of the fulltext table column */
    +  int nDoc                       /* Length of zDoc in bytes */
    +){
    +  const sqlite3_tokenizer_module *pTModule;  /* The tokenizer module */
    +  sqlite3_tokenizer *pTokenizer;             /* The specific tokenizer */
    +  sqlite3_tokenizer_cursor *pTCursor;        /* Tokenizer cursor */
    +  fulltext_vtab *pVtab;                /* The full text index */
    +  int nColumn;                         /* Number of columns in the index */
    +  int i, j;                            /* Loop counters */
    +  int rc;                              /* Return code */
    +  unsigned int match, prevMatch;       /* Phrase search bitmasks */
    +  const char *zToken;                  /* Next token from the tokenizer */
    +  int nToken;                          /* Size of zToken */
    +  int iBegin, iEnd, iPos;              /* Offsets of beginning and end */
    +
    +  /* The following variables keep a circular buffer of the last
    +  ** few tokens */
    +  unsigned int iRotor = 0;             /* Index of current token */
    +  int iRotorBegin[FTS3_ROTOR_SZ];      /* Beginning offset of token */
    +  int iRotorLen[FTS3_ROTOR_SZ];        /* Length of token */
    +
    +  pVtab = cursor_vtab(pCur);
    +  nColumn = pVtab->nColumn;
    +  pTokenizer = pVtab->pTokenizer;
    +  pTModule = pTokenizer->pModule;
    +  rc = pTModule->xOpen(pTokenizer, zDoc, nDoc, &pTCursor);
    +  if( rc ) return;
    +  pTCursor->pTokenizer = pTokenizer;
    +
    +  prevMatch = 0;
    +  while( !pTModule->xNext(pTCursor, &zToken, &nToken, &iBegin, &iEnd, &iPos) ){
    +    Fts3Expr *pIter = pCur->pExpr;
    +    int iIter = -1;
    +    iRotorBegin[iRotor&FTS3_ROTOR_MASK] = iBegin;
    +    iRotorLen[iRotor&FTS3_ROTOR_MASK] = iEnd-iBegin;
    +    match = 0;
    +    for(i=0; i<(FTS3_ROTOR_SZ-1) && fts3NextExprToken(&pIter, &iIter); i++){
    +      int nPhrase;                    /* Number of tokens in current phrase */
    +      struct PhraseToken *pToken;     /* Current token */
    +      int iCol;                       /* Column index */
    +
    +      if( fts3ExprBeneathNot(pIter) ) continue;
    +      nPhrase = pIter->pPhrase->nToken;
    +      pToken = &pIter->pPhrase->aToken[iIter];
    +      iCol = pIter->pPhrase->iColumn;
    +      if( iCol>=0 && iCol<nColumn && iCol!=iColumn ) continue;
    +      if( pToken->n>nToken ) continue;
    +      if( !pToken->isPrefix && pToken->n<nToken ) continue;
    +      assert( pToken->n<=nToken );
    +      if( memcmp(pToken->z, zToken, pToken->n) ) continue;
    +      if( iIter>0 && (prevMatch & (1<<i))==0 ) continue;
    +      match |= 1<<i;
    +      if( i==(FTS3_ROTOR_SZ-2) || nPhrase==iIter+1 ){
    +        for(j=nPhrase-1; j>=0; j--){
    +          int k = (iRotor-j) & FTS3_ROTOR_MASK;
    +          snippetAppendMatch(pSnippet, iColumn, i-j, iPos-j,
    +                iRotorBegin[k], iRotorLen[k]);
    +        }
    +      }
    +    }
    +    prevMatch = match<<1;
    +    iRotor++;
    +  }
    +  pTModule->xClose(pTCursor);  
    +}
    +
    +/*
    +** Remove entries from the pSnippet structure to account for the NEAR
    +** operator. When this is called, pSnippet contains the list of token 
    +** offsets produced by treating all NEAR operators as AND operators.
    +** This function removes any entries that should not be present after
    +** accounting for the NEAR restriction. For example, if the queried
    +** document is:
    +**
    +**     "A B C D E A"
    +**
    +** and the query is:
    +** 
    +**     A NEAR/0 E
    +**
    +** then when this function is called the Snippet contains token offsets
    +** 0, 4 and 5. This function removes the "0" entry (because the first A
    +** is not near enough to an E).
    +**
    +** When this function is called, the value pointed to by parameter piLeft is
    +** the integer id of the left-most token in the expression tree headed by
    +** pExpr. This function increments *piLeft by the total number of tokens
    +** in the expression tree headed by pExpr.
    +**
    +** Return 1 if any trimming occurs.  Return 0 if no trimming is required.
    +*/
    +static int trimSnippetOffsets(
    +  Fts3Expr *pExpr,      /* The search expression */
    +  Snippet *pSnippet,    /* The set of snippet offsets to be trimmed */
    +  int *piLeft           /* Index of left-most token in pExpr */
    +){
    +  if( pExpr ){
    +    if( trimSnippetOffsets(pExpr->pLeft, pSnippet, piLeft) ){
    +      return 1;
    +    }
    +
    +    switch( pExpr->eType ){
    +      case FTSQUERY_PHRASE:
    +        *piLeft += pExpr->pPhrase->nToken;
    +        break;
    +      case FTSQUERY_NEAR: {
    +        /* The right-hand-side of a NEAR operator is always a phrase. The
    +        ** left-hand-side is either a phrase or an expression tree that is 
    +        ** itself headed by a NEAR operator. The following initializations
    +        ** set local variable iLeft to the token number of the left-most
    +        ** token in the right-hand phrase, and iRight to the right most
    +        ** token in the same phrase. For example, if we had:
    +        **
    +        **     <col> MATCH '"abc def" NEAR/2 "ghi jkl"'
    +        **
    +        ** then iLeft will be set to 2 (token number of ghi) and nToken will
    +        ** be set to 4.
    +        */
    +        Fts3Expr *pLeft = pExpr->pLeft;
    +        Fts3Expr *pRight = pExpr->pRight;
    +        int iLeft = *piLeft;
    +        int nNear = pExpr->nNear;
    +        int nToken = pRight->pPhrase->nToken;
    +        int jj, ii;
    +        if( pLeft->eType==FTSQUERY_NEAR ){
    +          pLeft = pLeft->pRight;
    +        }
    +        assert( pRight->eType==FTSQUERY_PHRASE );
    +        assert( pLeft->eType==FTSQUERY_PHRASE );
    +        nToken += pLeft->pPhrase->nToken;
    +
    +        for(ii=0; ii<pSnippet->nMatch; ii++){
    +          struct snippetMatch *p = &pSnippet->aMatch[ii];
    +          if( p->iTerm==iLeft ){
    +            int isOk = 0;
    +            /* Snippet ii is an occurence of query term iLeft in the document.
    +            ** It occurs at position (p->iToken) of the document. We now
    +            ** search for an instance of token (iLeft-1) somewhere in the 
    +            ** range (p->iToken - nNear)...(p->iToken + nNear + nToken) within 
    +            ** the set of snippetMatch structures. If one is found, proceed. 
    +            ** If one cannot be found, then remove snippets ii..(ii+N-1) 
    +            ** from the matching snippets, where N is the number of tokens 
    +            ** in phrase pRight->pPhrase.
    +            */
    +            for(jj=0; isOk==0 && jj<pSnippet->nMatch; jj++){
    +              struct snippetMatch *p2 = &pSnippet->aMatch[jj];
    +              if( p2->iTerm==(iLeft-1) ){
    +                if( p2->iToken>=(p->iToken-nNear-1) 
    +                 && p2->iToken<(p->iToken+nNear+nToken) 
    +                ){
    +                  isOk = 1;
    +                }
    +              }
    +            }
    +            if( !isOk ){
    +              int kk;
    +              for(kk=0; kk<pRight->pPhrase->nToken; kk++){
    +                pSnippet->aMatch[kk+ii].iTerm = -2;
    +              }
    +              return 1;
    +            }
    +          }
    +          if( p->iTerm==(iLeft-1) ){
    +            int isOk = 0;
    +            for(jj=0; isOk==0 && jj<pSnippet->nMatch; jj++){
    +              struct snippetMatch *p2 = &pSnippet->aMatch[jj];
    +              if( p2->iTerm==iLeft ){
    +                if( p2->iToken<=(p->iToken+nNear+1) 
    +                 && p2->iToken>(p->iToken-nNear-nToken) 
    +                ){
    +                  isOk = 1;
    +                }
    +              }
    +            }
    +            if( !isOk ){
    +              int kk;
    +              for(kk=0; kk<pLeft->pPhrase->nToken; kk++){
    +                pSnippet->aMatch[ii-kk].iTerm = -2;
    +              }
    +              return 1;
    +            }
    +          }
    +        }
    +        break;
    +      }
    +    }
    +
    +    if( trimSnippetOffsets(pExpr->pRight, pSnippet, piLeft) ){
    +      return 1;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Compute all offsets for the current row of the query.  
    +** If the offsets have already been computed, this routine is a no-op.
    +*/
    +static void snippetAllOffsets(fulltext_cursor *p){
    +  int nColumn;
    +  int iColumn, i;
    +  int iFirst, iLast;
    +  int iTerm = 0;
    +  fulltext_vtab *pFts = cursor_vtab(p);
    +
    +  if( p->snippet.nMatch || p->pExpr==0 ){
    +    return;
    +  }
    +  nColumn = pFts->nColumn;
    +  iColumn = (p->iCursorType - QUERY_FULLTEXT);
    +  if( iColumn<0 || iColumn>=nColumn ){
    +    /* Look for matches over all columns of the full-text index */
    +    iFirst = 0;
    +    iLast = nColumn-1;
    +  }else{
    +    /* Look for matches in the iColumn-th column of the index only */
    +    iFirst = iColumn;
    +    iLast = iColumn;
    +  }
    +  for(i=iFirst; i<=iLast; i++){
    +    const char *zDoc;
    +    int nDoc;
    +    zDoc = (const char*)sqlite3_column_text(p->pStmt, i+1);
    +    nDoc = sqlite3_column_bytes(p->pStmt, i+1);
    +    snippetOffsetsOfColumn(p, &p->snippet, i, zDoc, nDoc);
    +  }
    +
    +  while( trimSnippetOffsets(p->pExpr, &p->snippet, &iTerm) ){
    +    iTerm = 0;
    +  }
    +}
    +
    +/*
    +** Convert the information in the aMatch[] array of the snippet
    +** into the string zOffset[0..nOffset-1]. This string is used as
    +** the return of the SQL offsets() function.
    +*/
    +static void snippetOffsetText(Snippet *p){
    +  int i;
    +  int cnt = 0;
    +  StringBuffer sb;
    +  char zBuf[200];
    +  if( p->zOffset ) return;
    +  initStringBuffer(&sb);
    +  for(i=0; i<p->nMatch; i++){
    +    struct snippetMatch *pMatch = &p->aMatch[i];
    +    if( pMatch->iTerm>=0 ){
    +      /* If snippetMatch.iTerm is less than 0, then the match was 
    +      ** discarded as part of processing the NEAR operator (see the 
    +      ** trimSnippetOffsetsForNear() function for details). Ignore 
    +      ** it in this case
    +      */
    +      zBuf[0] = ' ';
    +      sqlite3_snprintf(sizeof(zBuf)-1, &zBuf[cnt>0], "%d %d %d %d",
    +          pMatch->iCol, pMatch->iTerm, pMatch->iStart, pMatch->nByte);
    +      append(&sb, zBuf);
    +      cnt++;
    +    }
    +  }
    +  p->zOffset = stringBufferData(&sb);
    +  p->nOffset = stringBufferLength(&sb);
    +}
    +
    +/*
    +** zDoc[0..nDoc-1] is phrase of text.  aMatch[0..nMatch-1] are a set
    +** of matching words some of which might be in zDoc.  zDoc is column
    +** number iCol.
    +**
    +** iBreak is suggested spot in zDoc where we could begin or end an
    +** excerpt.  Return a value similar to iBreak but possibly adjusted
    +** to be a little left or right so that the break point is better.
    +*/
    +static int wordBoundary(
    +  int iBreak,                   /* The suggested break point */
    +  const char *zDoc,             /* Document text */
    +  int nDoc,                     /* Number of bytes in zDoc[] */
    +  struct snippetMatch *aMatch,  /* Matching words */
    +  int nMatch,                   /* Number of entries in aMatch[] */
    +  int iCol                      /* The column number for zDoc[] */
    +){
    +  int i;
    +  if( iBreak<=10 ){
    +    return 0;
    +  }
    +  if( iBreak>=nDoc-10 ){
    +    return nDoc;
    +  }
    +  for(i=0; i<nMatch && aMatch[i].iCol<iCol; i++){}
    +  while( i<nMatch && aMatch[i].iStart+aMatch[i].nByte<iBreak ){ i++; }
    +  if( i<nMatch ){
    +    if( aMatch[i].iStart<iBreak+10 ){
    +      return aMatch[i].iStart;
    +    }
    +    if( i>0 && aMatch[i-1].iStart+aMatch[i-1].nByte>=iBreak ){
    +      return aMatch[i-1].iStart;
    +    }
    +  }
    +  for(i=1; i<=10; i++){
    +    if( safe_isspace(zDoc[iBreak-i]) ){
    +      return iBreak - i + 1;
    +    }
    +    if( safe_isspace(zDoc[iBreak+i]) ){
    +      return iBreak + i + 1;
    +    }
    +  }
    +  return iBreak;
    +}
    +
    +
    +
    +/*
    +** Allowed values for Snippet.aMatch[].snStatus
    +*/
    +#define SNIPPET_IGNORE  0   /* It is ok to omit this match from the snippet */
    +#define SNIPPET_DESIRED 1   /* We want to include this match in the snippet */
    +
    +/*
    +** Generate the text of a snippet.
    +*/
    +static void snippetText(
    +  fulltext_cursor *pCursor,   /* The cursor we need the snippet for */
    +  const char *zStartMark,     /* Markup to appear before each match */
    +  const char *zEndMark,       /* Markup to appear after each match */
    +  const char *zEllipsis       /* Ellipsis mark */
    +){
    +  int i, j;
    +  struct snippetMatch *aMatch;
    +  int nMatch;
    +  int nDesired;
    +  StringBuffer sb;
    +  int tailCol;
    +  int tailOffset;
    +  int iCol;
    +  int nDoc;
    +  const char *zDoc;
    +  int iStart, iEnd;
    +  int tailEllipsis = 0;
    +  int iMatch;
    +  
    +
    +  sqlite3_free(pCursor->snippet.zSnippet);
    +  pCursor->snippet.zSnippet = 0;
    +  aMatch = pCursor->snippet.aMatch;
    +  nMatch = pCursor->snippet.nMatch;
    +  initStringBuffer(&sb);
    +
    +  for(i=0; i<nMatch; i++){
    +    aMatch[i].snStatus = SNIPPET_IGNORE;
    +  }
    +  nDesired = 0;
    +  for(i=0; i<FTS3_ROTOR_SZ; i++){
    +    for(j=0; j<nMatch; j++){
    +      if( aMatch[j].iTerm==i ){
    +        aMatch[j].snStatus = SNIPPET_DESIRED;
    +        nDesired++;
    +        break;
    +      }
    +    }
    +  }
    +
    +  iMatch = 0;
    +  tailCol = -1;
    +  tailOffset = 0;
    +  for(i=0; i<nMatch && nDesired>0; i++){
    +    if( aMatch[i].snStatus!=SNIPPET_DESIRED ) continue;
    +    nDesired--;
    +    iCol = aMatch[i].iCol;
    +    zDoc = (const char*)sqlite3_column_text(pCursor->pStmt, iCol+1);
    +    nDoc = sqlite3_column_bytes(pCursor->pStmt, iCol+1);
    +    iStart = aMatch[i].iStart - 40;
    +    iStart = wordBoundary(iStart, zDoc, nDoc, aMatch, nMatch, iCol);
    +    if( iStart<=10 ){
    +      iStart = 0;
    +    }
    +    if( iCol==tailCol && iStart<=tailOffset+20 ){
    +      iStart = tailOffset;
    +    }
    +    if( (iCol!=tailCol && tailCol>=0) || iStart!=tailOffset ){
    +      trimWhiteSpace(&sb);
    +      appendWhiteSpace(&sb);
    +      append(&sb, zEllipsis);
    +      appendWhiteSpace(&sb);
    +    }
    +    iEnd = aMatch[i].iStart + aMatch[i].nByte + 40;
    +    iEnd = wordBoundary(iEnd, zDoc, nDoc, aMatch, nMatch, iCol);
    +    if( iEnd>=nDoc-10 ){
    +      iEnd = nDoc;
    +      tailEllipsis = 0;
    +    }else{
    +      tailEllipsis = 1;
    +    }
    +    while( iMatch<nMatch && aMatch[iMatch].iCol<iCol ){ iMatch++; }
    +    while( iStart<iEnd ){
    +      while( iMatch<nMatch && aMatch[iMatch].iStart<iStart
    +             && aMatch[iMatch].iCol<=iCol ){
    +        iMatch++;
    +      }
    +      if( iMatch<nMatch && aMatch[iMatch].iStart<iEnd
    +             && aMatch[iMatch].iCol==iCol ){
    +        nappend(&sb, &zDoc[iStart], aMatch[iMatch].iStart - iStart);
    +        iStart = aMatch[iMatch].iStart;
    +        append(&sb, zStartMark);
    +        nappend(&sb, &zDoc[iStart], aMatch[iMatch].nByte);
    +        append(&sb, zEndMark);
    +        iStart += aMatch[iMatch].nByte;
    +        for(j=iMatch+1; j<nMatch; j++){
    +          if( aMatch[j].iTerm==aMatch[iMatch].iTerm
    +              && aMatch[j].snStatus==SNIPPET_DESIRED ){
    +            nDesired--;
    +            aMatch[j].snStatus = SNIPPET_IGNORE;
    +          }
    +        }
    +      }else{
    +        nappend(&sb, &zDoc[iStart], iEnd - iStart);
    +        iStart = iEnd;
    +      }
    +    }
    +    tailCol = iCol;
    +    tailOffset = iEnd;
    +  }
    +  trimWhiteSpace(&sb);
    +  if( tailEllipsis ){
    +    appendWhiteSpace(&sb);
    +    append(&sb, zEllipsis);
    +  }
    +  pCursor->snippet.zSnippet = stringBufferData(&sb);
    +  pCursor->snippet.nSnippet = stringBufferLength(&sb);
    +}
    +
    +
    +/*
    +** Close the cursor.  For additional information see the documentation
    +** on the xClose method of the virtual table interface.
    +*/
    +static int fulltextClose(sqlite3_vtab_cursor *pCursor){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +  FTSTRACE(("FTS3 Close %p\n", c));
    +  sqlite3_finalize(c->pStmt);
    +  sqlite3Fts3ExprFree(c->pExpr);
    +  snippetClear(&c->snippet);
    +  if( c->result.nData!=0 ){
    +    dlrDestroy(&c->reader);
    +  }
    +  dataBufferDestroy(&c->result);
    +  sqlite3_free(c);
    +  return SQLITE_OK;
    +}
    +
    +static int fulltextNext(sqlite3_vtab_cursor *pCursor){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +  int rc;
    +
    +  FTSTRACE(("FTS3 Next %p\n", pCursor));
    +  snippetClear(&c->snippet);
    +  if( c->iCursorType < QUERY_FULLTEXT ){
    +    /* TODO(shess) Handle SQLITE_SCHEMA AND SQLITE_BUSY. */
    +    rc = sqlite3_step(c->pStmt);
    +    switch( rc ){
    +      case SQLITE_ROW:
    +        c->eof = 0;
    +        return SQLITE_OK;
    +      case SQLITE_DONE:
    +        c->eof = 1;
    +        return SQLITE_OK;
    +      default:
    +        c->eof = 1;
    +        return rc;
    +    }
    +  } else {  /* full-text query */
    +    rc = sqlite3_reset(c->pStmt);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    if( c->result.nData==0 || dlrAtEnd(&c->reader) ){
    +      c->eof = 1;
    +      return SQLITE_OK;
    +    }
    +    rc = sqlite3_bind_int64(c->pStmt, 1, dlrDocid(&c->reader));
    +    dlrStep(&c->reader);
    +    if( rc!=SQLITE_OK ) return rc;
    +    /* TODO(shess) Handle SQLITE_SCHEMA AND SQLITE_BUSY. */
    +    rc = sqlite3_step(c->pStmt);
    +    if( rc==SQLITE_ROW ){   /* the case we expect */
    +      c->eof = 0;
    +      return SQLITE_OK;
    +    }
    +    /* an error occurred; abort */
    +    return rc==SQLITE_DONE ? SQLITE_ERROR : rc;
    +  }
    +}
    +
    +
    +/* TODO(shess) If we pushed LeafReader to the top of the file, or to
    +** another file, term_select() could be pushed above
    +** docListOfTerm().
    +*/
    +static int termSelect(fulltext_vtab *v, int iColumn,
    +                      const char *pTerm, int nTerm, int isPrefix,
    +                      DocListType iType, DataBuffer *out);
    +
    +/* 
    +** Return a DocList corresponding to the phrase *pPhrase.
    +**
    +** The resulting DL_DOCIDS doclist is stored in pResult, which is
    +** overwritten.
    +*/
    +static int docListOfPhrase(
    +  fulltext_vtab *pTab,   /* The full text index */
    +  Fts3Phrase *pPhrase,   /* Phrase to return a doclist corresponding to */
    +  DocListType eListType, /* Either DL_DOCIDS or DL_POSITIONS */
    +  DataBuffer *pResult    /* Write the result here */
    +){
    +  int ii;
    +  int rc = SQLITE_OK;
    +  int iCol = pPhrase->iColumn;
    +  DocListType eType = eListType;
    +  assert( eType==DL_POSITIONS || eType==DL_DOCIDS );
    +  if( pPhrase->nToken>1 ){
    +    eType = DL_POSITIONS;
    +  }
    +
    +  /* This code should never be called with buffered updates. */
    +  assert( pTab->nPendingData<0 );
    +
    +  for(ii=0; rc==SQLITE_OK && ii<pPhrase->nToken; ii++){
    +    DataBuffer tmp;
    +    struct PhraseToken *p = &pPhrase->aToken[ii];
    +    rc = termSelect(pTab, iCol, p->z, p->n, p->isPrefix, eType, &tmp);
    +    if( rc==SQLITE_OK ){
    +      if( ii==0 ){
    +        *pResult = tmp;
    +      }else{
    +        DataBuffer res = *pResult;
    +        dataBufferInit(pResult, 0);
    +        if( ii==(pPhrase->nToken-1) ){
    +          eType = eListType;
    +        }
    +        docListPhraseMerge(
    +          res.pData, res.nData, tmp.pData, tmp.nData, 0, 0, eType, pResult
    +        );
    +        dataBufferDestroy(&res);
    +        dataBufferDestroy(&tmp);
    +      }
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Evaluate the full-text expression pExpr against fts3 table pTab. Write
    +** the results into pRes.
    +*/
    +static int evalFts3Expr(
    +  fulltext_vtab *pTab,           /* Fts3 Virtual table object */
    +  Fts3Expr *pExpr,               /* Parsed fts3 expression */
    +  DataBuffer *pRes               /* OUT: Write results of the expression here */
    +){
    +  int rc = SQLITE_OK;
    +
    +  /* Initialize the output buffer. If this is an empty query (pExpr==0), 
    +  ** this is all that needs to be done. Empty queries produce empty 
    +  ** result sets.
    +  */
    +  dataBufferInit(pRes, 0);
    +
    +  if( pExpr ){
    +    if( pExpr->eType==FTSQUERY_PHRASE ){
    +      DocListType eType = DL_DOCIDS;
    +      if( pExpr->pParent && pExpr->pParent->eType==FTSQUERY_NEAR ){
    +        eType = DL_POSITIONS;
    +      }
    +      rc = docListOfPhrase(pTab, pExpr->pPhrase, eType, pRes);
    +    }else{
    +      DataBuffer lhs;
    +      DataBuffer rhs;
    +
    +      dataBufferInit(&rhs, 0);
    +      if( SQLITE_OK==(rc = evalFts3Expr(pTab, pExpr->pLeft, &lhs)) 
    +       && SQLITE_OK==(rc = evalFts3Expr(pTab, pExpr->pRight, &rhs)) 
    +      ){
    +        switch( pExpr->eType ){
    +          case FTSQUERY_NEAR: {
    +            int nToken;
    +            Fts3Expr *pLeft;
    +            DocListType eType = DL_DOCIDS;
    +            if( pExpr->pParent && pExpr->pParent->eType==FTSQUERY_NEAR ){
    +              eType = DL_POSITIONS;
    +            }
    +            pLeft = pExpr->pLeft;
    +            while( pLeft->eType==FTSQUERY_NEAR ){ 
    +              pLeft=pLeft->pRight;
    +            }
    +            assert( pExpr->pRight->eType==FTSQUERY_PHRASE );
    +            assert( pLeft->eType==FTSQUERY_PHRASE );
    +            nToken = pLeft->pPhrase->nToken + pExpr->pRight->pPhrase->nToken;
    +            docListPhraseMerge(lhs.pData, lhs.nData, rhs.pData, rhs.nData, 
    +                pExpr->nNear+1, nToken, eType, pRes
    +            );
    +            break;
    +          }
    +          case FTSQUERY_NOT: {
    +            docListExceptMerge(lhs.pData, lhs.nData, rhs.pData, rhs.nData,pRes);
    +            break;
    +          }
    +          case FTSQUERY_AND: {
    +            docListAndMerge(lhs.pData, lhs.nData, rhs.pData, rhs.nData, pRes);
    +            break;
    +          }
    +          case FTSQUERY_OR: {
    +            docListOrMerge(lhs.pData, lhs.nData, rhs.pData, rhs.nData, pRes);
    +            break;
    +          }
    +        }
    +      }
    +      dataBufferDestroy(&lhs);
    +      dataBufferDestroy(&rhs);
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/* TODO(shess) Refactor the code to remove this forward decl. */
    +static int flushPendingTerms(fulltext_vtab *v);
    +
    +/* Perform a full-text query using the search expression in
    +** zInput[0..nInput-1].  Return a list of matching documents
    +** in pResult.
    +**
    +** Queries must match column iColumn.  Or if iColumn>=nColumn
    +** they are allowed to match against any column.
    +*/
    +static int fulltextQuery(
    +  fulltext_vtab *v,      /* The full text index */
    +  int iColumn,           /* Match against this column by default */
    +  const char *zInput,    /* The query string */
    +  int nInput,            /* Number of bytes in zInput[] */
    +  DataBuffer *pResult,   /* Write the result doclist here */
    +  Fts3Expr **ppExpr        /* Put parsed query string here */
    +){
    +  int rc;
    +
    +  /* TODO(shess) Instead of flushing pendingTerms, we could query for
    +  ** the relevant term and merge the doclist into what we receive from
    +  ** the database.  Wait and see if this is a common issue, first.
    +  **
    +  ** A good reason not to flush is to not generate update-related
    +  ** error codes from here.
    +  */
    +
    +  /* Flush any buffered updates before executing the query. */
    +  rc = flushPendingTerms(v);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  /* Parse the query passed to the MATCH operator. */
    +  rc = sqlite3Fts3ExprParse(v->pTokenizer, 
    +      v->azColumn, v->nColumn, iColumn, zInput, nInput, ppExpr
    +  );
    +  if( rc!=SQLITE_OK ){
    +    assert( 0==(*ppExpr) );
    +    return rc;
    +  }
    +
    +  return evalFts3Expr(v, *ppExpr, pResult);
    +}
    +
    +/*
    +** This is the xFilter interface for the virtual table.  See
    +** the virtual table xFilter method documentation for additional
    +** information.
    +**
    +** If idxNum==QUERY_GENERIC then do a full table scan against
    +** the %_content table.
    +**
    +** If idxNum==QUERY_DOCID then do a docid lookup for a single entry
    +** in the %_content table.
    +**
    +** If idxNum>=QUERY_FULLTEXT then use the full text index.  The
    +** column on the left-hand side of the MATCH operator is column
    +** number idxNum-QUERY_FULLTEXT, 0 indexed.  argv[0] is the right-hand
    +** side of the MATCH operator.
    +*/
    +/* TODO(shess) Upgrade the cursor initialization and destruction to
    +** account for fulltextFilter() being called multiple times on the
    +** same cursor.  The current solution is very fragile.  Apply fix to
    +** fts3 as appropriate.
    +*/
    +static int fulltextFilter(
    +  sqlite3_vtab_cursor *pCursor,     /* The cursor used for this query */
    +  int idxNum, const char *idxStr,   /* Which indexing scheme to use */
    +  int argc, sqlite3_value **argv    /* Arguments for the indexing scheme */
    +){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +  fulltext_vtab *v = cursor_vtab(c);
    +  int rc;
    +
    +  FTSTRACE(("FTS3 Filter %p\n",pCursor));
    +
    +  /* If the cursor has a statement that was not prepared according to
    +  ** idxNum, clear it.  I believe all calls to fulltextFilter with a
    +  ** given cursor will have the same idxNum , but in this case it's
    +  ** easy to be safe.
    +  */
    +  if( c->pStmt && c->iCursorType!=idxNum ){
    +    sqlite3_finalize(c->pStmt);
    +    c->pStmt = NULL;
    +  }
    +
    +  /* Get a fresh statement appropriate to idxNum. */
    +  /* TODO(shess): Add a prepared-statement cache in the vt structure.
    +  ** The cache must handle multiple open cursors.  Easier to cache the
    +  ** statement variants at the vt to reduce malloc/realloc/free here.
    +  ** Or we could have a StringBuffer variant which allowed stack
    +  ** construction for small values.
    +  */
    +  if( !c->pStmt ){
    +    StringBuffer sb;
    +    initStringBuffer(&sb);
    +    append(&sb, "SELECT docid, ");
    +    appendList(&sb, v->nColumn, v->azContentColumn);
    +    append(&sb, " FROM %_content");
    +    if( idxNum!=QUERY_GENERIC ) append(&sb, " WHERE docid = ?");
    +    rc = sql_prepare(v->db, v->zDb, v->zName, &c->pStmt,
    +                     stringBufferData(&sb));
    +    stringBufferDestroy(&sb);
    +    if( rc!=SQLITE_OK ) return rc;
    +    c->iCursorType = idxNum;
    +  }else{
    +    sqlite3_reset(c->pStmt);
    +    assert( c->iCursorType==idxNum );
    +  }
    +
    +  switch( idxNum ){
    +    case QUERY_GENERIC:
    +      break;
    +
    +    case QUERY_DOCID:
    +      rc = sqlite3_bind_int64(c->pStmt, 1, sqlite3_value_int64(argv[0]));
    +      if( rc!=SQLITE_OK ) return rc;
    +      break;
    +
    +    default:   /* full-text search */
    +    {
    +      int iCol = idxNum-QUERY_FULLTEXT;
    +      const char *zQuery = (const char *)sqlite3_value_text(argv[0]);
    +      assert( idxNum<=QUERY_FULLTEXT+v->nColumn);
    +      assert( argc==1 );
    +      if( c->result.nData!=0 ){
    +        /* This case happens if the same cursor is used repeatedly. */
    +        dlrDestroy(&c->reader);
    +        dataBufferReset(&c->result);
    +      }else{
    +        dataBufferInit(&c->result, 0);
    +      }
    +      rc = fulltextQuery(v, iCol, zQuery, -1, &c->result, &c->pExpr);
    +      if( rc!=SQLITE_OK ) return rc;
    +      if( c->result.nData!=0 ){
    +        dlrInit(&c->reader, DL_DOCIDS, c->result.pData, c->result.nData);
    +      }
    +      break;
    +    }
    +  }
    +
    +  return fulltextNext(pCursor);
    +}
    +
    +/* This is the xEof method of the virtual table.  The SQLite core
    +** calls this routine to find out if it has reached the end of
    +** a query's results set.
    +*/
    +static int fulltextEof(sqlite3_vtab_cursor *pCursor){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +  return c->eof;
    +}
    +
    +/* This is the xColumn method of the virtual table.  The SQLite
    +** core calls this method during a query when it needs the value
    +** of a column from the virtual table.  This method needs to use
    +** one of the sqlite3_result_*() routines to store the requested
    +** value back in the pContext.
    +*/
    +static int fulltextColumn(sqlite3_vtab_cursor *pCursor,
    +                          sqlite3_context *pContext, int idxCol){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +  fulltext_vtab *v = cursor_vtab(c);
    +
    +  if( idxCol<v->nColumn ){
    +    sqlite3_value *pVal = sqlite3_column_value(c->pStmt, idxCol+1);
    +    sqlite3_result_value(pContext, pVal);
    +  }else if( idxCol==v->nColumn ){
    +    /* The extra column whose name is the same as the table.
    +    ** Return a blob which is a pointer to the cursor
    +    */
    +    sqlite3_result_blob(pContext, &c, sizeof(c), SQLITE_TRANSIENT);
    +  }else if( idxCol==v->nColumn+1 ){
    +    /* The docid column, which is an alias for rowid. */
    +    sqlite3_value *pVal = sqlite3_column_value(c->pStmt, 0);
    +    sqlite3_result_value(pContext, pVal);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* This is the xRowid method.  The SQLite core calls this routine to
    +** retrieve the rowid for the current row of the result set.  fts3
    +** exposes %_content.docid as the rowid for the virtual table.  The
    +** rowid should be written to *pRowid.
    +*/
    +static int fulltextRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
    +  fulltext_cursor *c = (fulltext_cursor *) pCursor;
    +
    +  *pRowid = sqlite3_column_int64(c->pStmt, 0);
    +  return SQLITE_OK;
    +}
    +
    +/* Add all terms in [zText] to pendingTerms table.  If [iColumn] > 0,
    +** we also store positions and offsets in the hash table using that
    +** column number.
    +*/
    +static int buildTerms(fulltext_vtab *v, sqlite_int64 iDocid,
    +                      const char *zText, int iColumn){
    +  sqlite3_tokenizer *pTokenizer = v->pTokenizer;
    +  sqlite3_tokenizer_cursor *pCursor;
    +  const char *pToken;
    +  int nTokenBytes;
    +  int iStartOffset, iEndOffset, iPosition;
    +  int rc;
    +
    +  rc = pTokenizer->pModule->xOpen(pTokenizer, zText, -1, &pCursor);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  pCursor->pTokenizer = pTokenizer;
    +  while( SQLITE_OK==(rc=pTokenizer->pModule->xNext(pCursor,
    +                                                   &pToken, &nTokenBytes,
    +                                                   &iStartOffset, &iEndOffset,
    +                                                   &iPosition)) ){
    +    DLCollector *p;
    +    int nData;                   /* Size of doclist before our update. */
    +
    +    /* Positions can't be negative; we use -1 as a terminator
    +     * internally.  Token can't be NULL or empty. */
    +    if( iPosition<0 || pToken == NULL || nTokenBytes == 0 ){
    +      rc = SQLITE_ERROR;
    +      break;
    +    }
    +
    +    p = fts3HashFind(&v->pendingTerms, pToken, nTokenBytes);
    +    if( p==NULL ){
    +      nData = 0;
    +      p = dlcNew(iDocid, DL_DEFAULT);
    +      fts3HashInsert(&v->pendingTerms, pToken, nTokenBytes, p);
    +
    +      /* Overhead for our hash table entry, the key, and the value. */
    +      v->nPendingData += sizeof(struct fts3HashElem)+sizeof(*p)+nTokenBytes;
    +    }else{
    +      nData = p->b.nData;
    +      if( p->dlw.iPrevDocid!=iDocid ) dlcNext(p, iDocid);
    +    }
    +    if( iColumn>=0 ){
    +      dlcAddPos(p, iColumn, iPosition, iStartOffset, iEndOffset);
    +    }
    +
    +    /* Accumulate data added by dlcNew or dlcNext, and dlcAddPos. */
    +    v->nPendingData += p->b.nData-nData;
    +  }
    +
    +  /* TODO(shess) Check return?  Should this be able to cause errors at
    +  ** this point?  Actually, same question about sqlite3_finalize(),
    +  ** though one could argue that failure there means that the data is
    +  ** not durable.  *ponder*
    +  */
    +  pTokenizer->pModule->xClose(pCursor);
    +  if( SQLITE_DONE == rc ) return SQLITE_OK;
    +  return rc;
    +}
    +
    +/* Add doclists for all terms in [pValues] to pendingTerms table. */
    +static int insertTerms(fulltext_vtab *v, sqlite_int64 iDocid,
    +                       sqlite3_value **pValues){
    +  int i;
    +  for(i = 0; i < v->nColumn ; ++i){
    +    char *zText = (char*)sqlite3_value_text(pValues[i]);
    +    int rc = buildTerms(v, iDocid, zText, i);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* Add empty doclists for all terms in the given row's content to
    +** pendingTerms.
    +*/
    +static int deleteTerms(fulltext_vtab *v, sqlite_int64 iDocid){
    +  const char **pValues;
    +  int i, rc;
    +
    +  /* TODO(shess) Should we allow such tables at all? */
    +  if( DL_DEFAULT==DL_DOCIDS ) return SQLITE_ERROR;
    +
    +  rc = content_select(v, iDocid, &pValues);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  for(i = 0 ; i < v->nColumn; ++i) {
    +    rc = buildTerms(v, iDocid, pValues[i], -1);
    +    if( rc!=SQLITE_OK ) break;
    +  }
    +
    +  freeStringArray(v->nColumn, pValues);
    +  return SQLITE_OK;
    +}
    +
    +/* TODO(shess) Refactor the code to remove this forward decl. */
    +static int initPendingTerms(fulltext_vtab *v, sqlite_int64 iDocid);
    +
    +/* Insert a row into the %_content table; set *piDocid to be the ID of the
    +** new row.  Add doclists for terms to pendingTerms.
    +*/
    +static int index_insert(fulltext_vtab *v, sqlite3_value *pRequestDocid,
    +                        sqlite3_value **pValues, sqlite_int64 *piDocid){
    +  int rc;
    +
    +  rc = content_insert(v, pRequestDocid, pValues);  /* execute an SQL INSERT */
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* docid column is an alias for rowid. */
    +  *piDocid = sqlite3_last_insert_rowid(v->db);
    +  rc = initPendingTerms(v, *piDocid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return insertTerms(v, *piDocid, pValues);
    +}
    +
    +/* Delete a row from the %_content table; add empty doclists for terms
    +** to pendingTerms.
    +*/
    +static int index_delete(fulltext_vtab *v, sqlite_int64 iRow){
    +  int rc = initPendingTerms(v, iRow);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = deleteTerms(v, iRow);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  return content_delete(v, iRow);  /* execute an SQL DELETE */
    +}
    +
    +/* Update a row in the %_content table; add delete doclists to
    +** pendingTerms for old terms not in the new data, add insert doclists
    +** to pendingTerms for terms in the new data.
    +*/
    +static int index_update(fulltext_vtab *v, sqlite_int64 iRow,
    +                        sqlite3_value **pValues){
    +  int rc = initPendingTerms(v, iRow);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Generate an empty doclist for each term that previously appeared in this
    +   * row. */
    +  rc = deleteTerms(v, iRow);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = content_update(v, pValues, iRow);  /* execute an SQL UPDATE */
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Now add positions for terms which appear in the updated row. */
    +  return insertTerms(v, iRow, pValues);
    +}
    +
    +/*******************************************************************/
    +/* InteriorWriter is used to collect terms and block references into
    +** interior nodes in %_segments.  See commentary at top of file for
    +** format.
    +*/
    +
    +/* How large interior nodes can grow. */
    +#define INTERIOR_MAX 2048
    +
    +/* Minimum number of terms per interior node (except the root). This
    +** prevents large terms from making the tree too skinny - must be >0
    +** so that the tree always makes progress.  Note that the min tree
    +** fanout will be INTERIOR_MIN_TERMS+1.
    +*/
    +#define INTERIOR_MIN_TERMS 7
    +#if INTERIOR_MIN_TERMS<1
    +# error INTERIOR_MIN_TERMS must be greater than 0.
    +#endif
    +
    +/* ROOT_MAX controls how much data is stored inline in the segment
    +** directory.
    +*/
    +/* TODO(shess) Push ROOT_MAX down to whoever is writing things.  It's
    +** only here so that interiorWriterRootInfo() and leafWriterRootInfo()
    +** can both see it, but if the caller passed it in, we wouldn't even
    +** need a define.
    +*/
    +#define ROOT_MAX 1024
    +#if ROOT_MAX<VARINT_MAX*2
    +# error ROOT_MAX must have enough space for a header.
    +#endif
    +
    +/* InteriorBlock stores a linked-list of interior blocks while a lower
    +** layer is being constructed.
    +*/
    +typedef struct InteriorBlock {
    +  DataBuffer term;           /* Leftmost term in block's subtree. */
    +  DataBuffer data;           /* Accumulated data for the block. */
    +  struct InteriorBlock *next;
    +} InteriorBlock;
    +
    +static InteriorBlock *interiorBlockNew(int iHeight, sqlite_int64 iChildBlock,
    +                                       const char *pTerm, int nTerm){
    +  InteriorBlock *block = sqlite3_malloc(sizeof(InteriorBlock));
    +  char c[VARINT_MAX+VARINT_MAX];
    +  int n;
    +
    +  if( block ){
    +    memset(block, 0, sizeof(*block));
    +    dataBufferInit(&block->term, 0);
    +    dataBufferReplace(&block->term, pTerm, nTerm);
    +
    +    n = fts3PutVarint(c, iHeight);
    +    n += fts3PutVarint(c+n, iChildBlock);
    +    dataBufferInit(&block->data, INTERIOR_MAX);
    +    dataBufferReplace(&block->data, c, n);
    +  }
    +  return block;
    +}
    +
    +#ifndef NDEBUG
    +/* Verify that the data is readable as an interior node. */
    +static void interiorBlockValidate(InteriorBlock *pBlock){
    +  const char *pData = pBlock->data.pData;
    +  int nData = pBlock->data.nData;
    +  int n, iDummy;
    +  sqlite_int64 iBlockid;
    +
    +  assert( nData>0 );
    +  assert( pData!=0 );
    +  assert( pData+nData>pData );
    +
    +  /* Must lead with height of node as a varint(n), n>0 */
    +  n = fts3GetVarint32(pData, &iDummy);
    +  assert( n>0 );
    +  assert( iDummy>0 );
    +  assert( n<nData );
    +  pData += n;
    +  nData -= n;
    +
    +  /* Must contain iBlockid. */
    +  n = fts3GetVarint(pData, &iBlockid);
    +  assert( n>0 );
    +  assert( n<=nData );
    +  pData += n;
    +  nData -= n;
    +
    +  /* Zero or more terms of positive length */
    +  if( nData!=0 ){
    +    /* First term is not delta-encoded. */
    +    n = fts3GetVarint32(pData, &iDummy);
    +    assert( n>0 );
    +    assert( iDummy>0 );
    +    assert( n+iDummy>0);
    +    assert( n+iDummy<=nData );
    +    pData += n+iDummy;
    +    nData -= n+iDummy;
    +
    +    /* Following terms delta-encoded. */
    +    while( nData!=0 ){
    +      /* Length of shared prefix. */
    +      n = fts3GetVarint32(pData, &iDummy);
    +      assert( n>0 );
    +      assert( iDummy>=0 );
    +      assert( n<nData );
    +      pData += n;
    +      nData -= n;
    +
    +      /* Length and data of distinct suffix. */
    +      n = fts3GetVarint32(pData, &iDummy);
    +      assert( n>0 );
    +      assert( iDummy>0 );
    +      assert( n+iDummy>0);
    +      assert( n+iDummy<=nData );
    +      pData += n+iDummy;
    +      nData -= n+iDummy;
    +    }
    +  }
    +}
    +#define ASSERT_VALID_INTERIOR_BLOCK(x) interiorBlockValidate(x)
    +#else
    +#define ASSERT_VALID_INTERIOR_BLOCK(x) assert( 1 )
    +#endif
    +
    +typedef struct InteriorWriter {
    +  int iHeight;                   /* from 0 at leaves. */
    +  InteriorBlock *first, *last;
    +  struct InteriorWriter *parentWriter;
    +
    +  DataBuffer term;               /* Last term written to block "last". */
    +  sqlite_int64 iOpeningChildBlock; /* First child block in block "last". */
    +#ifndef NDEBUG
    +  sqlite_int64 iLastChildBlock;  /* for consistency checks. */
    +#endif
    +} InteriorWriter;
    +
    +/* Initialize an interior node where pTerm[nTerm] marks the leftmost
    +** term in the tree.  iChildBlock is the leftmost child block at the
    +** next level down the tree.
    +*/
    +static void interiorWriterInit(int iHeight, const char *pTerm, int nTerm,
    +                               sqlite_int64 iChildBlock,
    +                               InteriorWriter *pWriter){
    +  InteriorBlock *block;
    +  assert( iHeight>0 );
    +  CLEAR(pWriter);
    +
    +  pWriter->iHeight = iHeight;
    +  pWriter->iOpeningChildBlock = iChildBlock;
    +#ifndef NDEBUG
    +  pWriter->iLastChildBlock = iChildBlock;
    +#endif
    +  block = interiorBlockNew(iHeight, iChildBlock, pTerm, nTerm);
    +  pWriter->last = pWriter->first = block;
    +  ASSERT_VALID_INTERIOR_BLOCK(pWriter->last);
    +  dataBufferInit(&pWriter->term, 0);
    +}
    +
    +/* Append the child node rooted at iChildBlock to the interior node,
    +** with pTerm[nTerm] as the leftmost term in iChildBlock's subtree.
    +*/
    +static void interiorWriterAppend(InteriorWriter *pWriter,
    +                                 const char *pTerm, int nTerm,
    +                                 sqlite_int64 iChildBlock){
    +  char c[VARINT_MAX+VARINT_MAX];
    +  int n, nPrefix = 0;
    +
    +  ASSERT_VALID_INTERIOR_BLOCK(pWriter->last);
    +
    +  /* The first term written into an interior node is actually
    +  ** associated with the second child added (the first child was added
    +  ** in interiorWriterInit, or in the if clause at the bottom of this
    +  ** function).  That term gets encoded straight up, with nPrefix left
    +  ** at 0.
    +  */
    +  if( pWriter->term.nData==0 ){
    +    n = fts3PutVarint(c, nTerm);
    +  }else{
    +    while( nPrefix<pWriter->term.nData &&
    +           pTerm[nPrefix]==pWriter->term.pData[nPrefix] ){
    +      nPrefix++;
    +    }
    +
    +    n = fts3PutVarint(c, nPrefix);
    +    n += fts3PutVarint(c+n, nTerm-nPrefix);
    +  }
    +
    +#ifndef NDEBUG
    +  pWriter->iLastChildBlock++;
    +#endif
    +  assert( pWriter->iLastChildBlock==iChildBlock );
    +
    +  /* Overflow to a new block if the new term makes the current block
    +  ** too big, and the current block already has enough terms.
    +  */
    +  if( pWriter->last->data.nData+n+nTerm-nPrefix>INTERIOR_MAX &&
    +      iChildBlock-pWriter->iOpeningChildBlock>INTERIOR_MIN_TERMS ){
    +    pWriter->last->next = interiorBlockNew(pWriter->iHeight, iChildBlock,
    +                                           pTerm, nTerm);
    +    pWriter->last = pWriter->last->next;
    +    pWriter->iOpeningChildBlock = iChildBlock;
    +    dataBufferReset(&pWriter->term);
    +  }else{
    +    dataBufferAppend2(&pWriter->last->data, c, n,
    +                      pTerm+nPrefix, nTerm-nPrefix);
    +    dataBufferReplace(&pWriter->term, pTerm, nTerm);
    +  }
    +  ASSERT_VALID_INTERIOR_BLOCK(pWriter->last);
    +}
    +
    +/* Free the space used by pWriter, including the linked-list of
    +** InteriorBlocks, and parentWriter, if present.
    +*/
    +static int interiorWriterDestroy(InteriorWriter *pWriter){
    +  InteriorBlock *block = pWriter->first;
    +
    +  while( block!=NULL ){
    +    InteriorBlock *b = block;
    +    block = block->next;
    +    dataBufferDestroy(&b->term);
    +    dataBufferDestroy(&b->data);
    +    sqlite3_free(b);
    +  }
    +  if( pWriter->parentWriter!=NULL ){
    +    interiorWriterDestroy(pWriter->parentWriter);
    +    sqlite3_free(pWriter->parentWriter);
    +  }
    +  dataBufferDestroy(&pWriter->term);
    +  SCRAMBLE(pWriter);
    +  return SQLITE_OK;
    +}
    +
    +/* If pWriter can fit entirely in ROOT_MAX, return it as the root info
    +** directly, leaving *piEndBlockid unchanged.  Otherwise, flush
    +** pWriter to %_segments, building a new layer of interior nodes, and
    +** recursively ask for their root into.
    +*/
    +static int interiorWriterRootInfo(fulltext_vtab *v, InteriorWriter *pWriter,
    +                                  char **ppRootInfo, int *pnRootInfo,
    +                                  sqlite_int64 *piEndBlockid){
    +  InteriorBlock *block = pWriter->first;
    +  sqlite_int64 iBlockid = 0;
    +  int rc;
    +
    +  /* If we can fit the segment inline */
    +  if( block==pWriter->last && block->data.nData<ROOT_MAX ){
    +    *ppRootInfo = block->data.pData;
    +    *pnRootInfo = block->data.nData;
    +    return SQLITE_OK;
    +  }
    +
    +  /* Flush the first block to %_segments, and create a new level of
    +  ** interior node.
    +  */
    +  ASSERT_VALID_INTERIOR_BLOCK(block);
    +  rc = block_insert(v, block->data.pData, block->data.nData, &iBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +  *piEndBlockid = iBlockid;
    +
    +  pWriter->parentWriter = sqlite3_malloc(sizeof(*pWriter->parentWriter));
    +  interiorWriterInit(pWriter->iHeight+1,
    +                     block->term.pData, block->term.nData,
    +                     iBlockid, pWriter->parentWriter);
    +
    +  /* Flush additional blocks and append to the higher interior
    +  ** node.
    +  */
    +  for(block=block->next; block!=NULL; block=block->next){
    +    ASSERT_VALID_INTERIOR_BLOCK(block);
    +    rc = block_insert(v, block->data.pData, block->data.nData, &iBlockid);
    +    if( rc!=SQLITE_OK ) return rc;
    +    *piEndBlockid = iBlockid;
    +
    +    interiorWriterAppend(pWriter->parentWriter,
    +                         block->term.pData, block->term.nData, iBlockid);
    +  }
    +
    +  /* Parent node gets the chance to be the root. */
    +  return interiorWriterRootInfo(v, pWriter->parentWriter,
    +                                ppRootInfo, pnRootInfo, piEndBlockid);
    +}
    +
    +/****************************************************************/
    +/* InteriorReader is used to read off the data from an interior node
    +** (see comment at top of file for the format).
    +*/
    +typedef struct InteriorReader {
    +  const char *pData;
    +  int nData;
    +
    +  DataBuffer term;          /* previous term, for decoding term delta. */
    +
    +  sqlite_int64 iBlockid;
    +} InteriorReader;
    +
    +static void interiorReaderDestroy(InteriorReader *pReader){
    +  dataBufferDestroy(&pReader->term);
    +  SCRAMBLE(pReader);
    +}
    +
    +/* TODO(shess) The assertions are great, but what if we're in NDEBUG
    +** and the blob is empty or otherwise contains suspect data?
    +*/
    +static void interiorReaderInit(const char *pData, int nData,
    +                               InteriorReader *pReader){
    +  int n, nTerm;
    +
    +  /* Require at least the leading flag byte */
    +  assert( nData>0 );
    +  assert( pData[0]!='\0' );
    +
    +  CLEAR(pReader);
    +
    +  /* Decode the base blockid, and set the cursor to the first term. */
    +  n = fts3GetVarint(pData+1, &pReader->iBlockid);
    +  assert( 1+n<=nData );
    +  pReader->pData = pData+1+n;
    +  pReader->nData = nData-(1+n);
    +
    +  /* A single-child interior node (such as when a leaf node was too
    +  ** large for the segment directory) won't have any terms.
    +  ** Otherwise, decode the first term.
    +  */
    +  if( pReader->nData==0 ){
    +    dataBufferInit(&pReader->term, 0);
    +  }else{
    +    n = fts3GetVarint32(pReader->pData, &nTerm);
    +    dataBufferInit(&pReader->term, nTerm);
    +    dataBufferReplace(&pReader->term, pReader->pData+n, nTerm);
    +    assert( n+nTerm<=pReader->nData );
    +    pReader->pData += n+nTerm;
    +    pReader->nData -= n+nTerm;
    +  }
    +}
    +
    +static int interiorReaderAtEnd(InteriorReader *pReader){
    +  return pReader->term.nData==0;
    +}
    +
    +static sqlite_int64 interiorReaderCurrentBlockid(InteriorReader *pReader){
    +  return pReader->iBlockid;
    +}
    +
    +static int interiorReaderTermBytes(InteriorReader *pReader){
    +  assert( !interiorReaderAtEnd(pReader) );
    +  return pReader->term.nData;
    +}
    +static const char *interiorReaderTerm(InteriorReader *pReader){
    +  assert( !interiorReaderAtEnd(pReader) );
    +  return pReader->term.pData;
    +}
    +
    +/* Step forward to the next term in the node. */
    +static void interiorReaderStep(InteriorReader *pReader){
    +  assert( !interiorReaderAtEnd(pReader) );
    +
    +  /* If the last term has been read, signal eof, else construct the
    +  ** next term.
    +  */
    +  if( pReader->nData==0 ){
    +    dataBufferReset(&pReader->term);
    +  }else{
    +    int n, nPrefix, nSuffix;
    +
    +    n = fts3GetVarint32(pReader->pData, &nPrefix);
    +    n += fts3GetVarint32(pReader->pData+n, &nSuffix);
    +
    +    /* Truncate the current term and append suffix data. */
    +    pReader->term.nData = nPrefix;
    +    dataBufferAppend(&pReader->term, pReader->pData+n, nSuffix);
    +
    +    assert( n+nSuffix<=pReader->nData );
    +    pReader->pData += n+nSuffix;
    +    pReader->nData -= n+nSuffix;
    +  }
    +  pReader->iBlockid++;
    +}
    +
    +/* Compare the current term to pTerm[nTerm], returning strcmp-style
    +** results.  If isPrefix, equality means equal through nTerm bytes.
    +*/
    +static int interiorReaderTermCmp(InteriorReader *pReader,
    +                                 const char *pTerm, int nTerm, int isPrefix){
    +  const char *pReaderTerm = interiorReaderTerm(pReader);
    +  int nReaderTerm = interiorReaderTermBytes(pReader);
    +  int c, n = nReaderTerm<nTerm ? nReaderTerm : nTerm;
    +
    +  if( n==0 ){
    +    if( nReaderTerm>0 ) return -1;
    +    if( nTerm>0 ) return 1;
    +    return 0;
    +  }
    +
    +  c = memcmp(pReaderTerm, pTerm, n);
    +  if( c!=0 ) return c;
    +  if( isPrefix && n==nTerm ) return 0;
    +  return nReaderTerm - nTerm;
    +}
    +
    +/****************************************************************/
    +/* LeafWriter is used to collect terms and associated doclist data
    +** into leaf blocks in %_segments (see top of file for format info).
    +** Expected usage is:
    +**
    +** LeafWriter writer;
    +** leafWriterInit(0, 0, &writer);
    +** while( sorted_terms_left_to_process ){
    +**   // data is doclist data for that term.
    +**   rc = leafWriterStep(v, &writer, pTerm, nTerm, pData, nData);
    +**   if( rc!=SQLITE_OK ) goto err;
    +** }
    +** rc = leafWriterFinalize(v, &writer);
    +**err:
    +** leafWriterDestroy(&writer);
    +** return rc;
    +**
    +** leafWriterStep() may write a collected leaf out to %_segments.
    +** leafWriterFinalize() finishes writing any buffered data and stores
    +** a root node in %_segdir.  leafWriterDestroy() frees all buffers and
    +** InteriorWriters allocated as part of writing this segment.
    +**
    +** TODO(shess) Document leafWriterStepMerge().
    +*/
    +
    +/* Put terms with data this big in their own block. */
    +#define STANDALONE_MIN 1024
    +
    +/* Keep leaf blocks below this size. */
    +#define LEAF_MAX 2048
    +
    +typedef struct LeafWriter {
    +  int iLevel;
    +  int idx;
    +  sqlite_int64 iStartBlockid;     /* needed to create the root info */
    +  sqlite_int64 iEndBlockid;       /* when we're done writing. */
    +
    +  DataBuffer term;                /* previous encoded term */
    +  DataBuffer data;                /* encoding buffer */
    +
    +  /* bytes of first term in the current node which distinguishes that
    +  ** term from the last term of the previous node.
    +  */
    +  int nTermDistinct;
    +
    +  InteriorWriter parentWriter;    /* if we overflow */
    +  int has_parent;
    +} LeafWriter;
    +
    +static void leafWriterInit(int iLevel, int idx, LeafWriter *pWriter){
    +  CLEAR(pWriter);
    +  pWriter->iLevel = iLevel;
    +  pWriter->idx = idx;
    +
    +  dataBufferInit(&pWriter->term, 32);
    +
    +  /* Start out with a reasonably sized block, though it can grow. */
    +  dataBufferInit(&pWriter->data, LEAF_MAX);
    +}
    +
    +#ifndef NDEBUG
    +/* Verify that the data is readable as a leaf node. */
    +static void leafNodeValidate(const char *pData, int nData){
    +  int n, iDummy;
    +
    +  if( nData==0 ) return;
    +  assert( nData>0 );
    +  assert( pData!=0 );
    +  assert( pData+nData>pData );
    +
    +  /* Must lead with a varint(0) */
    +  n = fts3GetVarint32(pData, &iDummy);
    +  assert( iDummy==0 );
    +  assert( n>0 );
    +  assert( n<nData );
    +  pData += n;
    +  nData -= n;
    +
    +  /* Leading term length and data must fit in buffer. */
    +  n = fts3GetVarint32(pData, &iDummy);
    +  assert( n>0 );
    +  assert( iDummy>0 );
    +  assert( n+iDummy>0 );
    +  assert( n+iDummy<nData );
    +  pData += n+iDummy;
    +  nData -= n+iDummy;
    +
    +  /* Leading term's doclist length and data must fit. */
    +  n = fts3GetVarint32(pData, &iDummy);
    +  assert( n>0 );
    +  assert( iDummy>0 );
    +  assert( n+iDummy>0 );
    +  assert( n+iDummy<=nData );
    +  ASSERT_VALID_DOCLIST(DL_DEFAULT, pData+n, iDummy, NULL);
    +  pData += n+iDummy;
    +  nData -= n+iDummy;
    +
    +  /* Verify that trailing terms and doclists also are readable. */
    +  while( nData!=0 ){
    +    n = fts3GetVarint32(pData, &iDummy);
    +    assert( n>0 );
    +    assert( iDummy>=0 );
    +    assert( n<nData );
    +    pData += n;
    +    nData -= n;
    +    n = fts3GetVarint32(pData, &iDummy);
    +    assert( n>0 );
    +    assert( iDummy>0 );
    +    assert( n+iDummy>0 );
    +    assert( n+iDummy<nData );
    +    pData += n+iDummy;
    +    nData -= n+iDummy;
    +
    +    n = fts3GetVarint32(pData, &iDummy);
    +    assert( n>0 );
    +    assert( iDummy>0 );
    +    assert( n+iDummy>0 );
    +    assert( n+iDummy<=nData );
    +    ASSERT_VALID_DOCLIST(DL_DEFAULT, pData+n, iDummy, NULL);
    +    pData += n+iDummy;
    +    nData -= n+iDummy;
    +  }
    +}
    +#define ASSERT_VALID_LEAF_NODE(p, n) leafNodeValidate(p, n)
    +#else
    +#define ASSERT_VALID_LEAF_NODE(p, n) assert( 1 )
    +#endif
    +
    +/* Flush the current leaf node to %_segments, and adding the resulting
    +** blockid and the starting term to the interior node which will
    +** contain it.
    +*/
    +static int leafWriterInternalFlush(fulltext_vtab *v, LeafWriter *pWriter,
    +                                   int iData, int nData){
    +  sqlite_int64 iBlockid = 0;
    +  const char *pStartingTerm;
    +  int nStartingTerm, rc, n;
    +
    +  /* Must have the leading varint(0) flag, plus at least some
    +  ** valid-looking data.
    +  */
    +  assert( nData>2 );
    +  assert( iData>=0 );
    +  assert( iData+nData<=pWriter->data.nData );
    +  ASSERT_VALID_LEAF_NODE(pWriter->data.pData+iData, nData);
    +
    +  rc = block_insert(v, pWriter->data.pData+iData, nData, &iBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +  assert( iBlockid!=0 );
    +
    +  /* Reconstruct the first term in the leaf for purposes of building
    +  ** the interior node.
    +  */
    +  n = fts3GetVarint32(pWriter->data.pData+iData+1, &nStartingTerm);
    +  pStartingTerm = pWriter->data.pData+iData+1+n;
    +  assert( pWriter->data.nData>iData+1+n+nStartingTerm );
    +  assert( pWriter->nTermDistinct>0 );
    +  assert( pWriter->nTermDistinct<=nStartingTerm );
    +  nStartingTerm = pWriter->nTermDistinct;
    +
    +  if( pWriter->has_parent ){
    +    interiorWriterAppend(&pWriter->parentWriter,
    +                         pStartingTerm, nStartingTerm, iBlockid);
    +  }else{
    +    interiorWriterInit(1, pStartingTerm, nStartingTerm, iBlockid,
    +                       &pWriter->parentWriter);
    +    pWriter->has_parent = 1;
    +  }
    +
    +  /* Track the span of this segment's leaf nodes. */
    +  if( pWriter->iEndBlockid==0 ){
    +    pWriter->iEndBlockid = pWriter->iStartBlockid = iBlockid;
    +  }else{
    +    pWriter->iEndBlockid++;
    +    assert( iBlockid==pWriter->iEndBlockid );
    +  }
    +
    +  return SQLITE_OK;
    +}
    +static int leafWriterFlush(fulltext_vtab *v, LeafWriter *pWriter){
    +  int rc = leafWriterInternalFlush(v, pWriter, 0, pWriter->data.nData);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Re-initialize the output buffer. */
    +  dataBufferReset(&pWriter->data);
    +
    +  return SQLITE_OK;
    +}
    +
    +/* Fetch the root info for the segment.  If the entire leaf fits
    +** within ROOT_MAX, then it will be returned directly, otherwise it
    +** will be flushed and the root info will be returned from the
    +** interior node.  *piEndBlockid is set to the blockid of the last
    +** interior or leaf node written to disk (0 if none are written at
    +** all).
    +*/
    +static int leafWriterRootInfo(fulltext_vtab *v, LeafWriter *pWriter,
    +                              char **ppRootInfo, int *pnRootInfo,
    +                              sqlite_int64 *piEndBlockid){
    +  /* we can fit the segment entirely inline */
    +  if( !pWriter->has_parent && pWriter->data.nData<ROOT_MAX ){
    +    *ppRootInfo = pWriter->data.pData;
    +    *pnRootInfo = pWriter->data.nData;
    +    *piEndBlockid = 0;
    +    return SQLITE_OK;
    +  }
    +
    +  /* Flush remaining leaf data. */
    +  if( pWriter->data.nData>0 ){
    +    int rc = leafWriterFlush(v, pWriter);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +
    +  /* We must have flushed a leaf at some point. */
    +  assert( pWriter->has_parent );
    +
    +  /* Tenatively set the end leaf blockid as the end blockid.  If the
    +  ** interior node can be returned inline, this will be the final
    +  ** blockid, otherwise it will be overwritten by
    +  ** interiorWriterRootInfo().
    +  */
    +  *piEndBlockid = pWriter->iEndBlockid;
    +
    +  return interiorWriterRootInfo(v, &pWriter->parentWriter,
    +                                ppRootInfo, pnRootInfo, piEndBlockid);
    +}
    +
    +/* Collect the rootInfo data and store it into the segment directory.
    +** This has the effect of flushing the segment's leaf data to
    +** %_segments, and also flushing any interior nodes to %_segments.
    +*/
    +static int leafWriterFinalize(fulltext_vtab *v, LeafWriter *pWriter){
    +  sqlite_int64 iEndBlockid;
    +  char *pRootInfo;
    +  int rc, nRootInfo;
    +
    +  rc = leafWriterRootInfo(v, pWriter, &pRootInfo, &nRootInfo, &iEndBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Don't bother storing an entirely empty segment. */
    +  if( iEndBlockid==0 && nRootInfo==0 ) return SQLITE_OK;
    +
    +  return segdir_set(v, pWriter->iLevel, pWriter->idx,
    +                    pWriter->iStartBlockid, pWriter->iEndBlockid,
    +                    iEndBlockid, pRootInfo, nRootInfo);
    +}
    +
    +static void leafWriterDestroy(LeafWriter *pWriter){
    +  if( pWriter->has_parent ) interiorWriterDestroy(&pWriter->parentWriter);
    +  dataBufferDestroy(&pWriter->term);
    +  dataBufferDestroy(&pWriter->data);
    +}
    +
    +/* Encode a term into the leafWriter, delta-encoding as appropriate.
    +** Returns the length of the new term which distinguishes it from the
    +** previous term, which can be used to set nTermDistinct when a node
    +** boundary is crossed.
    +*/
    +static int leafWriterEncodeTerm(LeafWriter *pWriter,
    +                                const char *pTerm, int nTerm){
    +  char c[VARINT_MAX+VARINT_MAX];
    +  int n, nPrefix = 0;
    +
    +  assert( nTerm>0 );
    +  while( nPrefix<pWriter->term.nData &&
    +         pTerm[nPrefix]==pWriter->term.pData[nPrefix] ){
    +    nPrefix++;
    +    /* Failing this implies that the terms weren't in order. */
    +    assert( nPrefix<nTerm );
    +  }
    +
    +  if( pWriter->data.nData==0 ){
    +    /* Encode the node header and leading term as:
    +    **  varint(0)
    +    **  varint(nTerm)
    +    **  char pTerm[nTerm]
    +    */
    +    n = fts3PutVarint(c, '\0');
    +    n += fts3PutVarint(c+n, nTerm);
    +    dataBufferAppend2(&pWriter->data, c, n, pTerm, nTerm);
    +  }else{
    +    /* Delta-encode the term as:
    +    **  varint(nPrefix)
    +    **  varint(nSuffix)
    +    **  char pTermSuffix[nSuffix]
    +    */
    +    n = fts3PutVarint(c, nPrefix);
    +    n += fts3PutVarint(c+n, nTerm-nPrefix);
    +    dataBufferAppend2(&pWriter->data, c, n, pTerm+nPrefix, nTerm-nPrefix);
    +  }
    +  dataBufferReplace(&pWriter->term, pTerm, nTerm);
    +
    +  return nPrefix+1;
    +}
    +
    +/* Used to avoid a memmove when a large amount of doclist data is in
    +** the buffer.  This constructs a node and term header before
    +** iDoclistData and flushes the resulting complete node using
    +** leafWriterInternalFlush().
    +*/
    +static int leafWriterInlineFlush(fulltext_vtab *v, LeafWriter *pWriter,
    +                                 const char *pTerm, int nTerm,
    +                                 int iDoclistData){
    +  char c[VARINT_MAX+VARINT_MAX];
    +  int iData, n = fts3PutVarint(c, 0);
    +  n += fts3PutVarint(c+n, nTerm);
    +
    +  /* There should always be room for the header.  Even if pTerm shared
    +  ** a substantial prefix with the previous term, the entire prefix
    +  ** could be constructed from earlier data in the doclist, so there
    +  ** should be room.
    +  */
    +  assert( iDoclistData>=n+nTerm );
    +
    +  iData = iDoclistData-(n+nTerm);
    +  memcpy(pWriter->data.pData+iData, c, n);
    +  memcpy(pWriter->data.pData+iData+n, pTerm, nTerm);
    +
    +  return leafWriterInternalFlush(v, pWriter, iData, pWriter->data.nData-iData);
    +}
    +
    +/* Push pTerm[nTerm] along with the doclist data to the leaf layer of
    +** %_segments.
    +*/
    +static int leafWriterStepMerge(fulltext_vtab *v, LeafWriter *pWriter,
    +                               const char *pTerm, int nTerm,
    +                               DLReader *pReaders, int nReaders){
    +  char c[VARINT_MAX+VARINT_MAX];
    +  int iTermData = pWriter->data.nData, iDoclistData;
    +  int i, nData, n, nActualData, nActual, rc, nTermDistinct;
    +
    +  ASSERT_VALID_LEAF_NODE(pWriter->data.pData, pWriter->data.nData);
    +  nTermDistinct = leafWriterEncodeTerm(pWriter, pTerm, nTerm);
    +
    +  /* Remember nTermDistinct if opening a new node. */
    +  if( iTermData==0 ) pWriter->nTermDistinct = nTermDistinct;
    +
    +  iDoclistData = pWriter->data.nData;
    +
    +  /* Estimate the length of the merged doclist so we can leave space
    +  ** to encode it.
    +  */
    +  for(i=0, nData=0; i<nReaders; i++){
    +    nData += dlrAllDataBytes(&pReaders[i]);
    +  }
    +  n = fts3PutVarint(c, nData);
    +  dataBufferAppend(&pWriter->data, c, n);
    +
    +  docListMerge(&pWriter->data, pReaders, nReaders);
    +  ASSERT_VALID_DOCLIST(DL_DEFAULT,
    +                       pWriter->data.pData+iDoclistData+n,
    +                       pWriter->data.nData-iDoclistData-n, NULL);
    +
    +  /* The actual amount of doclist data at this point could be smaller
    +  ** than the length we encoded.  Additionally, the space required to
    +  ** encode this length could be smaller.  For small doclists, this is
    +  ** not a big deal, we can just use memmove() to adjust things.
    +  */
    +  nActualData = pWriter->data.nData-(iDoclistData+n);
    +  nActual = fts3PutVarint(c, nActualData);
    +  assert( nActualData<=nData );
    +  assert( nActual<=n );
    +
    +  /* If the new doclist is big enough for force a standalone leaf
    +  ** node, we can immediately flush it inline without doing the
    +  ** memmove().
    +  */
    +  /* TODO(shess) This test matches leafWriterStep(), which does this
    +  ** test before it knows the cost to varint-encode the term and
    +  ** doclist lengths.  At some point, change to
    +  ** pWriter->data.nData-iTermData>STANDALONE_MIN.
    +  */
    +  if( nTerm+nActualData>STANDALONE_MIN ){
    +    /* Push leaf node from before this term. */
    +    if( iTermData>0 ){
    +      rc = leafWriterInternalFlush(v, pWriter, 0, iTermData);
    +      if( rc!=SQLITE_OK ) return rc;
    +
    +      pWriter->nTermDistinct = nTermDistinct;
    +    }
    +
    +    /* Fix the encoded doclist length. */
    +    iDoclistData += n - nActual;
    +    memcpy(pWriter->data.pData+iDoclistData, c, nActual);
    +
    +    /* Push the standalone leaf node. */
    +    rc = leafWriterInlineFlush(v, pWriter, pTerm, nTerm, iDoclistData);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    /* Leave the node empty. */
    +    dataBufferReset(&pWriter->data);
    +
    +    return rc;
    +  }
    +
    +  /* At this point, we know that the doclist was small, so do the
    +  ** memmove if indicated.
    +  */
    +  if( nActual<n ){
    +    memmove(pWriter->data.pData+iDoclistData+nActual,
    +            pWriter->data.pData+iDoclistData+n,
    +            pWriter->data.nData-(iDoclistData+n));
    +    pWriter->data.nData -= n-nActual;
    +  }
    +
    +  /* Replace written length with actual length. */
    +  memcpy(pWriter->data.pData+iDoclistData, c, nActual);
    +
    +  /* If the node is too large, break things up. */
    +  /* TODO(shess) This test matches leafWriterStep(), which does this
    +  ** test before it knows the cost to varint-encode the term and
    +  ** doclist lengths.  At some point, change to
    +  ** pWriter->data.nData>LEAF_MAX.
    +  */
    +  if( iTermData+nTerm+nActualData>LEAF_MAX ){
    +    /* Flush out the leading data as a node */
    +    rc = leafWriterInternalFlush(v, pWriter, 0, iTermData);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    pWriter->nTermDistinct = nTermDistinct;
    +
    +    /* Rebuild header using the current term */
    +    n = fts3PutVarint(pWriter->data.pData, 0);
    +    n += fts3PutVarint(pWriter->data.pData+n, nTerm);
    +    memcpy(pWriter->data.pData+n, pTerm, nTerm);
    +    n += nTerm;
    +
    +    /* There should always be room, because the previous encoding
    +    ** included all data necessary to construct the term.
    +    */
    +    assert( n<iDoclistData );
    +    /* So long as STANDALONE_MIN is half or less of LEAF_MAX, the
    +    ** following memcpy() is safe (as opposed to needing a memmove).
    +    */
    +    assert( 2*STANDALONE_MIN<=LEAF_MAX );
    +    assert( n+pWriter->data.nData-iDoclistData<iDoclistData );
    +    memcpy(pWriter->data.pData+n,
    +           pWriter->data.pData+iDoclistData,
    +           pWriter->data.nData-iDoclistData);
    +    pWriter->data.nData -= iDoclistData-n;
    +  }
    +  ASSERT_VALID_LEAF_NODE(pWriter->data.pData, pWriter->data.nData);
    +
    +  return SQLITE_OK;
    +}
    +
    +/* Push pTerm[nTerm] along with the doclist data to the leaf layer of
    +** %_segments.
    +*/
    +/* TODO(shess) Revise writeZeroSegment() so that doclists are
    +** constructed directly in pWriter->data.
    +*/
    +static int leafWriterStep(fulltext_vtab *v, LeafWriter *pWriter,
    +                          const char *pTerm, int nTerm,
    +                          const char *pData, int nData){
    +  int rc;
    +  DLReader reader;
    +
    +  dlrInit(&reader, DL_DEFAULT, pData, nData);
    +  rc = leafWriterStepMerge(v, pWriter, pTerm, nTerm, &reader, 1);
    +  dlrDestroy(&reader);
    +
    +  return rc;
    +}
    +
    +
    +/****************************************************************/
    +/* LeafReader is used to iterate over an individual leaf node. */
    +typedef struct LeafReader {
    +  DataBuffer term;          /* copy of current term. */
    +
    +  const char *pData;        /* data for current term. */
    +  int nData;
    +} LeafReader;
    +
    +static void leafReaderDestroy(LeafReader *pReader){
    +  dataBufferDestroy(&pReader->term);
    +  SCRAMBLE(pReader);
    +}
    +
    +static int leafReaderAtEnd(LeafReader *pReader){
    +  return pReader->nData<=0;
    +}
    +
    +/* Access the current term. */
    +static int leafReaderTermBytes(LeafReader *pReader){
    +  return pReader->term.nData;
    +}
    +static const char *leafReaderTerm(LeafReader *pReader){
    +  assert( pReader->term.nData>0 );
    +  return pReader->term.pData;
    +}
    +
    +/* Access the doclist data for the current term. */
    +static int leafReaderDataBytes(LeafReader *pReader){
    +  int nData;
    +  assert( pReader->term.nData>0 );
    +  fts3GetVarint32(pReader->pData, &nData);
    +  return nData;
    +}
    +static const char *leafReaderData(LeafReader *pReader){
    +  int n, nData;
    +  assert( pReader->term.nData>0 );
    +  n = fts3GetVarint32(pReader->pData, &nData);
    +  return pReader->pData+n;
    +}
    +
    +static void leafReaderInit(const char *pData, int nData,
    +                           LeafReader *pReader){
    +  int nTerm, n;
    +
    +  assert( nData>0 );
    +  assert( pData[0]=='\0' );
    +
    +  CLEAR(pReader);
    +
    +  /* Read the first term, skipping the header byte. */
    +  n = fts3GetVarint32(pData+1, &nTerm);
    +  dataBufferInit(&pReader->term, nTerm);
    +  dataBufferReplace(&pReader->term, pData+1+n, nTerm);
    +
    +  /* Position after the first term. */
    +  assert( 1+n+nTerm<nData );
    +  pReader->pData = pData+1+n+nTerm;
    +  pReader->nData = nData-1-n-nTerm;
    +}
    +
    +/* Step the reader forward to the next term. */
    +static void leafReaderStep(LeafReader *pReader){
    +  int n, nData, nPrefix, nSuffix;
    +  assert( !leafReaderAtEnd(pReader) );
    +
    +  /* Skip previous entry's data block. */
    +  n = fts3GetVarint32(pReader->pData, &nData);
    +  assert( n+nData<=pReader->nData );
    +  pReader->pData += n+nData;
    +  pReader->nData -= n+nData;
    +
    +  if( !leafReaderAtEnd(pReader) ){
    +    /* Construct the new term using a prefix from the old term plus a
    +    ** suffix from the leaf data.
    +    */
    +    n = fts3GetVarint32(pReader->pData, &nPrefix);
    +    n += fts3GetVarint32(pReader->pData+n, &nSuffix);
    +    assert( n+nSuffix<pReader->nData );
    +    pReader->term.nData = nPrefix;
    +    dataBufferAppend(&pReader->term, pReader->pData+n, nSuffix);
    +
    +    pReader->pData += n+nSuffix;
    +    pReader->nData -= n+nSuffix;
    +  }
    +}
    +
    +/* strcmp-style comparison of pReader's current term against pTerm.
    +** If isPrefix, equality means equal through nTerm bytes.
    +*/
    +static int leafReaderTermCmp(LeafReader *pReader,
    +                             const char *pTerm, int nTerm, int isPrefix){
    +  int c, n = pReader->term.nData<nTerm ? pReader->term.nData : nTerm;
    +  if( n==0 ){
    +    if( pReader->term.nData>0 ) return -1;
    +    if(nTerm>0 ) return 1;
    +    return 0;
    +  }
    +
    +  c = memcmp(pReader->term.pData, pTerm, n);
    +  if( c!=0 ) return c;
    +  if( isPrefix && n==nTerm ) return 0;
    +  return pReader->term.nData - nTerm;
    +}
    +
    +
    +/****************************************************************/
    +/* LeavesReader wraps LeafReader to allow iterating over the entire
    +** leaf layer of the tree.
    +*/
    +typedef struct LeavesReader {
    +  int idx;                  /* Index within the segment. */
    +
    +  sqlite3_stmt *pStmt;      /* Statement we're streaming leaves from. */
    +  int eof;                  /* we've seen SQLITE_DONE from pStmt. */
    +
    +  LeafReader leafReader;    /* reader for the current leaf. */
    +  DataBuffer rootData;      /* root data for inline. */
    +} LeavesReader;
    +
    +/* Access the current term. */
    +static int leavesReaderTermBytes(LeavesReader *pReader){
    +  assert( !pReader->eof );
    +  return leafReaderTermBytes(&pReader->leafReader);
    +}
    +static const char *leavesReaderTerm(LeavesReader *pReader){
    +  assert( !pReader->eof );
    +  return leafReaderTerm(&pReader->leafReader);
    +}
    +
    +/* Access the doclist data for the current term. */
    +static int leavesReaderDataBytes(LeavesReader *pReader){
    +  assert( !pReader->eof );
    +  return leafReaderDataBytes(&pReader->leafReader);
    +}
    +static const char *leavesReaderData(LeavesReader *pReader){
    +  assert( !pReader->eof );
    +  return leafReaderData(&pReader->leafReader);
    +}
    +
    +static int leavesReaderAtEnd(LeavesReader *pReader){
    +  return pReader->eof;
    +}
    +
    +/* loadSegmentLeaves() may not read all the way to SQLITE_DONE, thus
    +** leaving the statement handle open, which locks the table.
    +*/
    +/* TODO(shess) This "solution" is not satisfactory.  Really, there
    +** should be check-in function for all statement handles which
    +** arranges to call sqlite3_reset().  This most likely will require
    +** modification to control flow all over the place, though, so for now
    +** just punt.
    +**
    +** Note the the current system assumes that segment merges will run to
    +** completion, which is why this particular probably hasn't arisen in
    +** this case.  Probably a brittle assumption.
    +*/
    +static int leavesReaderReset(LeavesReader *pReader){
    +  return sqlite3_reset(pReader->pStmt);
    +}
    +
    +static void leavesReaderDestroy(LeavesReader *pReader){
    +  /* If idx is -1, that means we're using a non-cached statement
    +  ** handle in the optimize() case, so we need to release it.
    +  */
    +  if( pReader->pStmt!=NULL && pReader->idx==-1 ){
    +    sqlite3_finalize(pReader->pStmt);
    +  }
    +  leafReaderDestroy(&pReader->leafReader);
    +  dataBufferDestroy(&pReader->rootData);
    +  SCRAMBLE(pReader);
    +}
    +
    +/* Initialize pReader with the given root data (if iStartBlockid==0
    +** the leaf data was entirely contained in the root), or from the
    +** stream of blocks between iStartBlockid and iEndBlockid, inclusive.
    +*/
    +static int leavesReaderInit(fulltext_vtab *v,
    +                            int idx,
    +                            sqlite_int64 iStartBlockid,
    +                            sqlite_int64 iEndBlockid,
    +                            const char *pRootData, int nRootData,
    +                            LeavesReader *pReader){
    +  CLEAR(pReader);
    +  pReader->idx = idx;
    +
    +  dataBufferInit(&pReader->rootData, 0);
    +  if( iStartBlockid==0 ){
    +    /* Entire leaf level fit in root data. */
    +    dataBufferReplace(&pReader->rootData, pRootData, nRootData);
    +    leafReaderInit(pReader->rootData.pData, pReader->rootData.nData,
    +                   &pReader->leafReader);
    +  }else{
    +    sqlite3_stmt *s;
    +    int rc = sql_get_leaf_statement(v, idx, &s);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    rc = sqlite3_bind_int64(s, 1, iStartBlockid);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    rc = sqlite3_bind_int64(s, 2, iEndBlockid);
    +    if( rc!=SQLITE_OK ) return rc;
    +
    +    rc = sqlite3_step(s);
    +    if( rc==SQLITE_DONE ){
    +      pReader->eof = 1;
    +      return SQLITE_OK;
    +    }
    +    if( rc!=SQLITE_ROW ) return rc;
    +
    +    pReader->pStmt = s;
    +    leafReaderInit(sqlite3_column_blob(pReader->pStmt, 0),
    +                   sqlite3_column_bytes(pReader->pStmt, 0),
    +                   &pReader->leafReader);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* Step the current leaf forward to the next term.  If we reach the
    +** end of the current leaf, step forward to the next leaf block.
    +*/
    +static int leavesReaderStep(fulltext_vtab *v, LeavesReader *pReader){
    +  assert( !leavesReaderAtEnd(pReader) );
    +  leafReaderStep(&pReader->leafReader);
    +
    +  if( leafReaderAtEnd(&pReader->leafReader) ){
    +    int rc;
    +    if( pReader->rootData.pData ){
    +      pReader->eof = 1;
    +      return SQLITE_OK;
    +    }
    +    rc = sqlite3_step(pReader->pStmt);
    +    if( rc!=SQLITE_ROW ){
    +      pReader->eof = 1;
    +      return rc==SQLITE_DONE ? SQLITE_OK : rc;
    +    }
    +    leafReaderDestroy(&pReader->leafReader);
    +    leafReaderInit(sqlite3_column_blob(pReader->pStmt, 0),
    +                   sqlite3_column_bytes(pReader->pStmt, 0),
    +                   &pReader->leafReader);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* Order LeavesReaders by their term, ignoring idx.  Readers at eof
    +** always sort to the end.
    +*/
    +static int leavesReaderTermCmp(LeavesReader *lr1, LeavesReader *lr2){
    +  if( leavesReaderAtEnd(lr1) ){
    +    if( leavesReaderAtEnd(lr2) ) return 0;
    +    return 1;
    +  }
    +  if( leavesReaderAtEnd(lr2) ) return -1;
    +
    +  return leafReaderTermCmp(&lr1->leafReader,
    +                           leavesReaderTerm(lr2), leavesReaderTermBytes(lr2),
    +                           0);
    +}
    +
    +/* Similar to leavesReaderTermCmp(), with additional ordering by idx
    +** so that older segments sort before newer segments.
    +*/
    +static int leavesReaderCmp(LeavesReader *lr1, LeavesReader *lr2){
    +  int c = leavesReaderTermCmp(lr1, lr2);
    +  if( c!=0 ) return c;
    +  return lr1->idx-lr2->idx;
    +}
    +
    +/* Assume that pLr[1]..pLr[nLr] are sorted.  Bubble pLr[0] into its
    +** sorted position.
    +*/
    +static void leavesReaderReorder(LeavesReader *pLr, int nLr){
    +  while( nLr>1 && leavesReaderCmp(pLr, pLr+1)>0 ){
    +    LeavesReader tmp = pLr[0];
    +    pLr[0] = pLr[1];
    +    pLr[1] = tmp;
    +    nLr--;
    +    pLr++;
    +  }
    +}
    +
    +/* Initializes pReaders with the segments from level iLevel, returning
    +** the number of segments in *piReaders.  Leaves pReaders in sorted
    +** order.
    +*/
    +static int leavesReadersInit(fulltext_vtab *v, int iLevel,
    +                             LeavesReader *pReaders, int *piReaders){
    +  sqlite3_stmt *s;
    +  int i, rc = sql_get_statement(v, SEGDIR_SELECT_LEVEL_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int(s, 1, iLevel);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  i = 0;
    +  while( (rc = sqlite3_step(s))==SQLITE_ROW ){
    +    sqlite_int64 iStart = sqlite3_column_int64(s, 0);
    +    sqlite_int64 iEnd = sqlite3_column_int64(s, 1);
    +    const char *pRootData = sqlite3_column_blob(s, 2);
    +    int nRootData = sqlite3_column_bytes(s, 2);
    +
    +    assert( i<MERGE_COUNT );
    +    rc = leavesReaderInit(v, i, iStart, iEnd, pRootData, nRootData,
    +                          &pReaders[i]);
    +    if( rc!=SQLITE_OK ) break;
    +
    +    i++;
    +  }
    +  if( rc!=SQLITE_DONE ){
    +    while( i-->0 ){
    +      leavesReaderDestroy(&pReaders[i]);
    +    }
    +    return rc;
    +  }
    +
    +  *piReaders = i;
    +
    +  /* Leave our results sorted by term, then age. */
    +  while( i-- ){
    +    leavesReaderReorder(pReaders+i, *piReaders-i);
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* Merge doclists from pReaders[nReaders] into a single doclist, which
    +** is written to pWriter.  Assumes pReaders is ordered oldest to
    +** newest.
    +*/
    +/* TODO(shess) Consider putting this inline in segmentMerge(). */
    +static int leavesReadersMerge(fulltext_vtab *v,
    +                              LeavesReader *pReaders, int nReaders,
    +                              LeafWriter *pWriter){
    +  DLReader dlReaders[MERGE_COUNT];
    +  const char *pTerm = leavesReaderTerm(pReaders);
    +  int i, nTerm = leavesReaderTermBytes(pReaders);
    +
    +  assert( nReaders<=MERGE_COUNT );
    +
    +  for(i=0; i<nReaders; i++){
    +    dlrInit(&dlReaders[i], DL_DEFAULT,
    +            leavesReaderData(pReaders+i),
    +            leavesReaderDataBytes(pReaders+i));
    +  }
    +
    +  return leafWriterStepMerge(v, pWriter, pTerm, nTerm, dlReaders, nReaders);
    +}
    +
    +/* Forward ref due to mutual recursion with segdirNextIndex(). */
    +static int segmentMerge(fulltext_vtab *v, int iLevel);
    +
    +/* Put the next available index at iLevel into *pidx.  If iLevel
    +** already has MERGE_COUNT segments, they are merged to a higher
    +** level to make room.
    +*/
    +static int segdirNextIndex(fulltext_vtab *v, int iLevel, int *pidx){
    +  int rc = segdir_max_index(v, iLevel, pidx);
    +  if( rc==SQLITE_DONE ){              /* No segments at iLevel. */
    +    *pidx = 0;
    +  }else if( rc==SQLITE_ROW ){
    +    if( *pidx==(MERGE_COUNT-1) ){
    +      rc = segmentMerge(v, iLevel);
    +      if( rc!=SQLITE_OK ) return rc;
    +      *pidx = 0;
    +    }else{
    +      (*pidx)++;
    +    }
    +  }else{
    +    return rc;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* Merge MERGE_COUNT segments at iLevel into a new segment at
    +** iLevel+1.  If iLevel+1 is already full of segments, those will be
    +** merged to make room.
    +*/
    +static int segmentMerge(fulltext_vtab *v, int iLevel){
    +  LeafWriter writer;
    +  LeavesReader lrs[MERGE_COUNT];
    +  int i, rc, idx = 0;
    +
    +  /* Determine the next available segment index at the next level,
    +  ** merging as necessary.
    +  */
    +  rc = segdirNextIndex(v, iLevel+1, &idx);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* TODO(shess) This assumes that we'll always see exactly
    +  ** MERGE_COUNT segments to merge at a given level.  That will be
    +  ** broken if we allow the developer to request preemptive or
    +  ** deferred merging.
    +  */
    +  memset(&lrs, '\0', sizeof(lrs));
    +  rc = leavesReadersInit(v, iLevel, lrs, &i);
    +  if( rc!=SQLITE_OK ) return rc;
    +  assert( i==MERGE_COUNT );
    +
    +  leafWriterInit(iLevel+1, idx, &writer);
    +
    +  /* Since leavesReaderReorder() pushes readers at eof to the end,
    +  ** when the first reader is empty, all will be empty.
    +  */
    +  while( !leavesReaderAtEnd(lrs) ){
    +    /* Figure out how many readers share their next term. */
    +    for(i=1; i<MERGE_COUNT && !leavesReaderAtEnd(lrs+i); i++){
    +      if( 0!=leavesReaderTermCmp(lrs, lrs+i) ) break;
    +    }
    +
    +    rc = leavesReadersMerge(v, lrs, i, &writer);
    +    if( rc!=SQLITE_OK ) goto err;
    +
    +    /* Step forward those that were merged. */
    +    while( i-->0 ){
    +      rc = leavesReaderStep(v, lrs+i);
    +      if( rc!=SQLITE_OK ) goto err;
    +
    +      /* Reorder by term, then by age. */
    +      leavesReaderReorder(lrs+i, MERGE_COUNT-i);
    +    }
    +  }
    +
    +  for(i=0; i<MERGE_COUNT; i++){
    +    leavesReaderDestroy(&lrs[i]);
    +  }
    +
    +  rc = leafWriterFinalize(v, &writer);
    +  leafWriterDestroy(&writer);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* Delete the merged segment data. */
    +  return segdir_delete(v, iLevel);
    +
    + err:
    +  for(i=0; i<MERGE_COUNT; i++){
    +    leavesReaderDestroy(&lrs[i]);
    +  }
    +  leafWriterDestroy(&writer);
    +  return rc;
    +}
    +
    +/* Accumulate the union of *acc and *pData into *acc. */
    +static void docListAccumulateUnion(DataBuffer *acc,
    +                                   const char *pData, int nData) {
    +  DataBuffer tmp = *acc;
    +  dataBufferInit(acc, tmp.nData+nData);
    +  docListUnion(tmp.pData, tmp.nData, pData, nData, acc);
    +  dataBufferDestroy(&tmp);
    +}
    +
    +/* TODO(shess) It might be interesting to explore different merge
    +** strategies, here.  For instance, since this is a sorted merge, we
    +** could easily merge many doclists in parallel.  With some
    +** comprehension of the storage format, we could merge all of the
    +** doclists within a leaf node directly from the leaf node's storage.
    +** It may be worthwhile to merge smaller doclists before larger
    +** doclists, since they can be traversed more quickly - but the
    +** results may have less overlap, making them more expensive in a
    +** different way.
    +*/
    +
    +/* Scan pReader for pTerm/nTerm, and merge the term's doclist over
    +** *out (any doclists with duplicate docids overwrite those in *out).
    +** Internal function for loadSegmentLeaf().
    +*/
    +static int loadSegmentLeavesInt(fulltext_vtab *v, LeavesReader *pReader,
    +                                const char *pTerm, int nTerm, int isPrefix,
    +                                DataBuffer *out){
    +  /* doclist data is accumulated into pBuffers similar to how one does
    +  ** increment in binary arithmetic.  If index 0 is empty, the data is
    +  ** stored there.  If there is data there, it is merged and the
    +  ** results carried into position 1, with further merge-and-carry
    +  ** until an empty position is found.
    +  */
    +  DataBuffer *pBuffers = NULL;
    +  int nBuffers = 0, nMaxBuffers = 0, rc;
    +
    +  assert( nTerm>0 );
    +
    +  for(rc=SQLITE_OK; rc==SQLITE_OK && !leavesReaderAtEnd(pReader);
    +      rc=leavesReaderStep(v, pReader)){
    +    /* TODO(shess) Really want leavesReaderTermCmp(), but that name is
    +    ** already taken to compare the terms of two LeavesReaders.  Think
    +    ** on a better name.  [Meanwhile, break encapsulation rather than
    +    ** use a confusing name.]
    +    */
    +    int c = leafReaderTermCmp(&pReader->leafReader, pTerm, nTerm, isPrefix);
    +    if( c>0 ) break;      /* Past any possible matches. */
    +    if( c==0 ){
    +      const char *pData = leavesReaderData(pReader);
    +      int iBuffer, nData = leavesReaderDataBytes(pReader);
    +
    +      /* Find the first empty buffer. */
    +      for(iBuffer=0; iBuffer<nBuffers; ++iBuffer){
    +        if( 0==pBuffers[iBuffer].nData ) break;
    +      }
    +
    +      /* Out of buffers, add an empty one. */
    +      if( iBuffer==nBuffers ){
    +        if( nBuffers==nMaxBuffers ){
    +          DataBuffer *p;
    +          nMaxBuffers += 20;
    +
    +          /* Manual realloc so we can handle NULL appropriately. */
    +          p = sqlite3_malloc(nMaxBuffers*sizeof(*pBuffers));
    +          if( p==NULL ){
    +            rc = SQLITE_NOMEM;
    +            break;
    +          }
    +
    +          if( nBuffers>0 ){
    +            assert(pBuffers!=NULL);
    +            memcpy(p, pBuffers, nBuffers*sizeof(*pBuffers));
    +            sqlite3_free(pBuffers);
    +          }
    +          pBuffers = p;
    +        }
    +        dataBufferInit(&(pBuffers[nBuffers]), 0);
    +        nBuffers++;
    +      }
    +
    +      /* At this point, must have an empty at iBuffer. */
    +      assert(iBuffer<nBuffers && pBuffers[iBuffer].nData==0);
    +
    +      /* If empty was first buffer, no need for merge logic. */
    +      if( iBuffer==0 ){
    +        dataBufferReplace(&(pBuffers[0]), pData, nData);
    +      }else{
    +        /* pAcc is the empty buffer the merged data will end up in. */
    +        DataBuffer *pAcc = &(pBuffers[iBuffer]);
    +        DataBuffer *p = &(pBuffers[0]);
    +
    +        /* Handle position 0 specially to avoid need to prime pAcc
    +        ** with pData/nData.
    +        */
    +        dataBufferSwap(p, pAcc);
    +        docListAccumulateUnion(pAcc, pData, nData);
    +
    +        /* Accumulate remaining doclists into pAcc. */
    +        for(++p; p<pAcc; ++p){
    +          docListAccumulateUnion(pAcc, p->pData, p->nData);
    +
    +          /* dataBufferReset() could allow a large doclist to blow up
    +          ** our memory requirements.
    +          */
    +          if( p->nCapacity<1024 ){
    +            dataBufferReset(p);
    +          }else{
    +            dataBufferDestroy(p);
    +            dataBufferInit(p, 0);
    +          }
    +        }
    +      }
    +    }
    +  }
    +
    +  /* Union all the doclists together into *out. */
    +  /* TODO(shess) What if *out is big?  Sigh. */
    +  if( rc==SQLITE_OK && nBuffers>0 ){
    +    int iBuffer;
    +    for(iBuffer=0; iBuffer<nBuffers; ++iBuffer){
    +      if( pBuffers[iBuffer].nData>0 ){
    +        if( out->nData==0 ){
    +          dataBufferSwap(out, &(pBuffers[iBuffer]));
    +        }else{
    +          docListAccumulateUnion(out, pBuffers[iBuffer].pData,
    +                                 pBuffers[iBuffer].nData);
    +        }
    +      }
    +    }
    +  }
    +
    +  while( nBuffers-- ){
    +    dataBufferDestroy(&(pBuffers[nBuffers]));
    +  }
    +  if( pBuffers!=NULL ) sqlite3_free(pBuffers);
    +
    +  return rc;
    +}
    +
    +/* Call loadSegmentLeavesInt() with pData/nData as input. */
    +static int loadSegmentLeaf(fulltext_vtab *v, const char *pData, int nData,
    +                           const char *pTerm, int nTerm, int isPrefix,
    +                           DataBuffer *out){
    +  LeavesReader reader;
    +  int rc;
    +
    +  assert( nData>1 );
    +  assert( *pData=='\0' );
    +  rc = leavesReaderInit(v, 0, 0, 0, pData, nData, &reader);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = loadSegmentLeavesInt(v, &reader, pTerm, nTerm, isPrefix, out);
    +  leavesReaderReset(&reader);
    +  leavesReaderDestroy(&reader);
    +  return rc;
    +}
    +
    +/* Call loadSegmentLeavesInt() with the leaf nodes from iStartLeaf to
    +** iEndLeaf (inclusive) as input, and merge the resulting doclist into
    +** out.
    +*/
    +static int loadSegmentLeaves(fulltext_vtab *v,
    +                             sqlite_int64 iStartLeaf, sqlite_int64 iEndLeaf,
    +                             const char *pTerm, int nTerm, int isPrefix,
    +                             DataBuffer *out){
    +  int rc;
    +  LeavesReader reader;
    +
    +  assert( iStartLeaf<=iEndLeaf );
    +  rc = leavesReaderInit(v, 0, iStartLeaf, iEndLeaf, NULL, 0, &reader);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = loadSegmentLeavesInt(v, &reader, pTerm, nTerm, isPrefix, out);
    +  leavesReaderReset(&reader);
    +  leavesReaderDestroy(&reader);
    +  return rc;
    +}
    +
    +/* Taking pData/nData as an interior node, find the sequence of child
    +** nodes which could include pTerm/nTerm/isPrefix.  Note that the
    +** interior node terms logically come between the blocks, so there is
    +** one more blockid than there are terms (that block contains terms >=
    +** the last interior-node term).
    +*/
    +/* TODO(shess) The calling code may already know that the end child is
    +** not worth calculating, because the end may be in a later sibling
    +** node.  Consider whether breaking symmetry is worthwhile.  I suspect
    +** it is not worthwhile.
    +*/
    +static void getChildrenContaining(const char *pData, int nData,
    +                                  const char *pTerm, int nTerm, int isPrefix,
    +                                  sqlite_int64 *piStartChild,
    +                                  sqlite_int64 *piEndChild){
    +  InteriorReader reader;
    +
    +  assert( nData>1 );
    +  assert( *pData!='\0' );
    +  interiorReaderInit(pData, nData, &reader);
    +
    +  /* Scan for the first child which could contain pTerm/nTerm. */
    +  while( !interiorReaderAtEnd(&reader) ){
    +    if( interiorReaderTermCmp(&reader, pTerm, nTerm, 0)>0 ) break;
    +    interiorReaderStep(&reader);
    +  }
    +  *piStartChild = interiorReaderCurrentBlockid(&reader);
    +
    +  /* Keep scanning to find a term greater than our term, using prefix
    +  ** comparison if indicated.  If isPrefix is false, this will be the
    +  ** same blockid as the starting block.
    +  */
    +  while( !interiorReaderAtEnd(&reader) ){
    +    if( interiorReaderTermCmp(&reader, pTerm, nTerm, isPrefix)>0 ) break;
    +    interiorReaderStep(&reader);
    +  }
    +  *piEndChild = interiorReaderCurrentBlockid(&reader);
    +
    +  interiorReaderDestroy(&reader);
    +
    +  /* Children must ascend, and if !prefix, both must be the same. */
    +  assert( *piEndChild>=*piStartChild );
    +  assert( isPrefix || *piStartChild==*piEndChild );
    +}
    +
    +/* Read block at iBlockid and pass it with other params to
    +** getChildrenContaining().
    +*/
    +static int loadAndGetChildrenContaining(
    +  fulltext_vtab *v,
    +  sqlite_int64 iBlockid,
    +  const char *pTerm, int nTerm, int isPrefix,
    +  sqlite_int64 *piStartChild, sqlite_int64 *piEndChild
    +){
    +  sqlite3_stmt *s = NULL;
    +  int rc;
    +
    +  assert( iBlockid!=0 );
    +  assert( pTerm!=NULL );
    +  assert( nTerm!=0 );        /* TODO(shess) Why not allow this? */
    +  assert( piStartChild!=NULL );
    +  assert( piEndChild!=NULL );
    +
    +  rc = sql_get_statement(v, BLOCK_SELECT_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_bind_int64(s, 1, iBlockid);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_DONE ) return SQLITE_ERROR;
    +  if( rc!=SQLITE_ROW ) return rc;
    +
    +  getChildrenContaining(sqlite3_column_blob(s, 0), sqlite3_column_bytes(s, 0),
    +                        pTerm, nTerm, isPrefix, piStartChild, piEndChild);
    +
    +  /* We expect only one row.  We must execute another sqlite3_step()
    +   * to complete the iteration; otherwise the table will remain
    +   * locked. */
    +  rc = sqlite3_step(s);
    +  if( rc==SQLITE_ROW ) return SQLITE_ERROR;
    +  if( rc!=SQLITE_DONE ) return rc;
    +
    +  return SQLITE_OK;
    +}
    +
    +/* Traverse the tree represented by pData[nData] looking for
    +** pTerm[nTerm], placing its doclist into *out.  This is internal to
    +** loadSegment() to make error-handling cleaner.
    +*/
    +static int loadSegmentInt(fulltext_vtab *v, const char *pData, int nData,
    +                          sqlite_int64 iLeavesEnd,
    +                          const char *pTerm, int nTerm, int isPrefix,
    +                          DataBuffer *out){
    +  /* Special case where root is a leaf. */
    +  if( *pData=='\0' ){
    +    return loadSegmentLeaf(v, pData, nData, pTerm, nTerm, isPrefix, out);
    +  }else{
    +    int rc;
    +    sqlite_int64 iStartChild, iEndChild;
    +
    +    /* Process pData as an interior node, then loop down the tree
    +    ** until we find the set of leaf nodes to scan for the term.
    +    */
    +    getChildrenContaining(pData, nData, pTerm, nTerm, isPrefix,
    +                          &iStartChild, &iEndChild);
    +    while( iStartChild>iLeavesEnd ){
    +      sqlite_int64 iNextStart, iNextEnd;
    +      rc = loadAndGetChildrenContaining(v, iStartChild, pTerm, nTerm, isPrefix,
    +                                        &iNextStart, &iNextEnd);
    +      if( rc!=SQLITE_OK ) return rc;
    +
    +      /* If we've branched, follow the end branch, too. */
    +      if( iStartChild!=iEndChild ){
    +        sqlite_int64 iDummy;
    +        rc = loadAndGetChildrenContaining(v, iEndChild, pTerm, nTerm, isPrefix,
    +                                          &iDummy, &iNextEnd);
    +        if( rc!=SQLITE_OK ) return rc;
    +      }
    +
    +      assert( iNextStart<=iNextEnd );
    +      iStartChild = iNextStart;
    +      iEndChild = iNextEnd;
    +    }
    +    assert( iStartChild<=iLeavesEnd );
    +    assert( iEndChild<=iLeavesEnd );
    +
    +    /* Scan through the leaf segments for doclists. */
    +    return loadSegmentLeaves(v, iStartChild, iEndChild,
    +                             pTerm, nTerm, isPrefix, out);
    +  }
    +}
    +
    +/* Call loadSegmentInt() to collect the doclist for pTerm/nTerm, then
    +** merge its doclist over *out (any duplicate doclists read from the
    +** segment rooted at pData will overwrite those in *out).
    +*/
    +/* TODO(shess) Consider changing this to determine the depth of the
    +** leaves using either the first characters of interior nodes (when
    +** ==1, we're one level above the leaves), or the first character of
    +** the root (which will describe the height of the tree directly).
    +** Either feels somewhat tricky to me.
    +*/
    +/* TODO(shess) The current merge is likely to be slow for large
    +** doclists (though it should process from newest/smallest to
    +** oldest/largest, so it may not be that bad).  It might be useful to
    +** modify things to allow for N-way merging.  This could either be
    +** within a segment, with pairwise merges across segments, or across
    +** all segments at once.
    +*/
    +static int loadSegment(fulltext_vtab *v, const char *pData, int nData,
    +                       sqlite_int64 iLeavesEnd,
    +                       const char *pTerm, int nTerm, int isPrefix,
    +                       DataBuffer *out){
    +  DataBuffer result;
    +  int rc;
    +
    +  assert( nData>1 );
    +
    +  /* This code should never be called with buffered updates. */
    +  assert( v->nPendingData<0 );
    +
    +  dataBufferInit(&result, 0);
    +  rc = loadSegmentInt(v, pData, nData, iLeavesEnd,
    +                      pTerm, nTerm, isPrefix, &result);
    +  if( rc==SQLITE_OK && result.nData>0 ){
    +    if( out->nData==0 ){
    +      DataBuffer tmp = *out;
    +      *out = result;
    +      result = tmp;
    +    }else{
    +      DataBuffer merged;
    +      DLReader readers[2];
    +
    +      dlrInit(&readers[0], DL_DEFAULT, out->pData, out->nData);
    +      dlrInit(&readers[1], DL_DEFAULT, result.pData, result.nData);
    +      dataBufferInit(&merged, out->nData+result.nData);
    +      docListMerge(&merged, readers, 2);
    +      dataBufferDestroy(out);
    +      *out = merged;
    +      dlrDestroy(&readers[0]);
    +      dlrDestroy(&readers[1]);
    +    }
    +  }
    +  dataBufferDestroy(&result);
    +  return rc;
    +}
    +
    +/* Scan the database and merge together the posting lists for the term
    +** into *out.
    +*/
    +static int termSelect(
    +  fulltext_vtab *v, 
    +  int iColumn,
    +  const char *pTerm, int nTerm,             /* Term to query for */
    +  int isPrefix,                             /* True for a prefix search */
    +  DocListType iType, 
    +  DataBuffer *out                           /* Write results here */
    +){
    +  DataBuffer doclist;
    +  sqlite3_stmt *s;
    +  int rc = sql_get_statement(v, SEGDIR_SELECT_ALL_STMT, &s);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  /* This code should never be called with buffered updates. */
    +  assert( v->nPendingData<0 );
    +
    +  dataBufferInit(&doclist, 0);
    +  dataBufferInit(out, 0);
    +
    +  /* Traverse the segments from oldest to newest so that newer doclist
    +  ** elements for given docids overwrite older elements.
    +  */
    +  while( (rc = sqlite3_step(s))==SQLITE_ROW ){
    +    const char *pData = sqlite3_column_blob(s, 2);
    +    const int nData = sqlite3_column_bytes(s, 2);
    +    const sqlite_int64 iLeavesEnd = sqlite3_column_int64(s, 1);
    +    rc = loadSegment(v, pData, nData, iLeavesEnd, pTerm, nTerm, isPrefix,
    +                     &doclist);
    +    if( rc!=SQLITE_OK ) goto err;
    +  }
    +  if( rc==SQLITE_DONE ){
    +    if( doclist.nData!=0 ){
    +      /* TODO(shess) The old term_select_all() code applied the column
    +      ** restrict as we merged segments, leading to smaller buffers.
    +      ** This is probably worthwhile to bring back, once the new storage
    +      ** system is checked in.
    +      */
    +      if( iColumn==v->nColumn) iColumn = -1;
    +      docListTrim(DL_DEFAULT, doclist.pData, doclist.nData,
    +                  iColumn, iType, out);
    +    }
    +    rc = SQLITE_OK;
    +  }
    +
    + err:
    +  dataBufferDestroy(&doclist);
    +  return rc;
    +}
    +
    +/****************************************************************/
    +/* Used to hold hashtable data for sorting. */
    +typedef struct TermData {
    +  const char *pTerm;
    +  int nTerm;
    +  DLCollector *pCollector;
    +} TermData;
    +
    +/* Orders TermData elements in strcmp fashion ( <0 for less-than, 0
    +** for equal, >0 for greater-than).
    +*/
    +static int termDataCmp(const void *av, const void *bv){
    +  const TermData *a = (const TermData *)av;
    +  const TermData *b = (const TermData *)bv;
    +  int n = a->nTerm<b->nTerm ? a->nTerm : b->nTerm;
    +  int c = memcmp(a->pTerm, b->pTerm, n);
    +  if( c!=0 ) return c;
    +  return a->nTerm-b->nTerm;
    +}
    +
    +/* Order pTerms data by term, then write a new level 0 segment using
    +** LeafWriter.
    +*/
    +static int writeZeroSegment(fulltext_vtab *v, fts3Hash *pTerms){
    +  fts3HashElem *e;
    +  int idx, rc, i, n;
    +  TermData *pData;
    +  LeafWriter writer;
    +  DataBuffer dl;
    +
    +  /* Determine the next index at level 0, merging as necessary. */
    +  rc = segdirNextIndex(v, 0, &idx);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  n = fts3HashCount(pTerms);
    +  pData = sqlite3_malloc(n*sizeof(TermData));
    +
    +  for(i = 0, e = fts3HashFirst(pTerms); e; i++, e = fts3HashNext(e)){
    +    assert( i<n );
    +    pData[i].pTerm = fts3HashKey(e);
    +    pData[i].nTerm = fts3HashKeysize(e);
    +    pData[i].pCollector = fts3HashData(e);
    +  }
    +  assert( i==n );
    +
    +  /* TODO(shess) Should we allow user-defined collation sequences,
    +  ** here?  I think we only need that once we support prefix searches.
    +  */
    +  if( n>1 ) qsort(pData, n, sizeof(*pData), termDataCmp);
    +
    +  /* TODO(shess) Refactor so that we can write directly to the segment
    +  ** DataBuffer, as happens for segment merges.
    +  */
    +  leafWriterInit(0, idx, &writer);
    +  dataBufferInit(&dl, 0);
    +  for(i=0; i<n; i++){
    +    dataBufferReset(&dl);
    +    dlcAddDoclist(pData[i].pCollector, &dl);
    +    rc = leafWriterStep(v, &writer,
    +                        pData[i].pTerm, pData[i].nTerm, dl.pData, dl.nData);
    +    if( rc!=SQLITE_OK ) goto err;
    +  }
    +  rc = leafWriterFinalize(v, &writer);
    +
    + err:
    +  dataBufferDestroy(&dl);
    +  sqlite3_free(pData);
    +  leafWriterDestroy(&writer);
    +  return rc;
    +}
    +
    +/* If pendingTerms has data, free it. */
    +static int clearPendingTerms(fulltext_vtab *v){
    +  if( v->nPendingData>=0 ){
    +    fts3HashElem *e;
    +    for(e=fts3HashFirst(&v->pendingTerms); e; e=fts3HashNext(e)){
    +      dlcDelete(fts3HashData(e));
    +    }
    +    fts3HashClear(&v->pendingTerms);
    +    v->nPendingData = -1;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* If pendingTerms has data, flush it to a level-zero segment, and
    +** free it.
    +*/
    +static int flushPendingTerms(fulltext_vtab *v){
    +  if( v->nPendingData>=0 ){
    +    int rc = writeZeroSegment(v, &v->pendingTerms);
    +    if( rc==SQLITE_OK ) clearPendingTerms(v);
    +    return rc;
    +  }
    +  return SQLITE_OK;
    +}
    +
    +/* If pendingTerms is "too big", or docid is out of order, flush it.
    +** Regardless, be certain that pendingTerms is initialized for use.
    +*/
    +static int initPendingTerms(fulltext_vtab *v, sqlite_int64 iDocid){
    +  /* TODO(shess) Explore whether partially flushing the buffer on
    +  ** forced-flush would provide better performance.  I suspect that if
    +  ** we ordered the doclists by size and flushed the largest until the
    +  ** buffer was half empty, that would let the less frequent terms
    +  ** generate longer doclists.
    +  */
    +  if( iDocid<=v->iPrevDocid || v->nPendingData>kPendingThreshold ){
    +    int rc = flushPendingTerms(v);
    +    if( rc!=SQLITE_OK ) return rc;
    +  }
    +  if( v->nPendingData<0 ){
    +    fts3HashInit(&v->pendingTerms, FTS3_HASH_STRING, 1);
    +    v->nPendingData = 0;
    +  }
    +  v->iPrevDocid = iDocid;
    +  return SQLITE_OK;
    +}
    +
    +/* This function implements the xUpdate callback; it is the top-level entry
    + * point for inserting, deleting or updating a row in a full-text table. */
    +static int fulltextUpdate(sqlite3_vtab *pVtab, int nArg, sqlite3_value **ppArg,
    +                          sqlite_int64 *pRowid){
    +  fulltext_vtab *v = (fulltext_vtab *) pVtab;
    +  int rc;
    +
    +  FTSTRACE(("FTS3 Update %p\n", pVtab));
    +
    +  if( nArg<2 ){
    +    rc = index_delete(v, sqlite3_value_int64(ppArg[0]));
    +    if( rc==SQLITE_OK ){
    +      /* If we just deleted the last row in the table, clear out the
    +      ** index data.
    +      */
    +      rc = content_exists(v);
    +      if( rc==SQLITE_ROW ){
    +        rc = SQLITE_OK;
    +      }else if( rc==SQLITE_DONE ){
    +        /* Clear the pending terms so we don't flush a useless level-0
    +        ** segment when the transaction closes.
    +        */
    +        rc = clearPendingTerms(v);
    +        if( rc==SQLITE_OK ){
    +          rc = segdir_delete_all(v);
    +        }
    +      }
    +    }
    +  } else if( sqlite3_value_type(ppArg[0]) != SQLITE_NULL ){
    +    /* An update:
    +     * ppArg[0] = old rowid
    +     * ppArg[1] = new rowid
    +     * ppArg[2..2+v->nColumn-1] = values
    +     * ppArg[2+v->nColumn] = value for magic column (we ignore this)
    +     * ppArg[2+v->nColumn+1] = value for docid
    +     */
    +    sqlite_int64 rowid = sqlite3_value_int64(ppArg[0]);
    +    if( sqlite3_value_type(ppArg[1]) != SQLITE_INTEGER ||
    +        sqlite3_value_int64(ppArg[1]) != rowid ){
    +      rc = SQLITE_ERROR;  /* we don't allow changing the rowid */
    +    }else if( sqlite3_value_type(ppArg[2+v->nColumn+1]) != SQLITE_INTEGER ||
    +              sqlite3_value_int64(ppArg[2+v->nColumn+1]) != rowid ){
    +      rc = SQLITE_ERROR;  /* we don't allow changing the docid */
    +    }else{
    +      assert( nArg==2+v->nColumn+2);
    +      rc = index_update(v, rowid, &ppArg[2]);
    +    }
    +  } else {
    +    /* An insert:
    +     * ppArg[1] = requested rowid
    +     * ppArg[2..2+v->nColumn-1] = values
    +     * ppArg[2+v->nColumn] = value for magic column (we ignore this)
    +     * ppArg[2+v->nColumn+1] = value for docid
    +     */
    +    sqlite3_value *pRequestDocid = ppArg[2+v->nColumn+1];
    +    assert( nArg==2+v->nColumn+2);
    +    if( SQLITE_NULL != sqlite3_value_type(pRequestDocid) &&
    +        SQLITE_NULL != sqlite3_value_type(ppArg[1]) ){
    +      /* TODO(shess) Consider allowing this to work if the values are
    +      ** identical.  I'm inclined to discourage that usage, though,
    +      ** given that both rowid and docid are special columns.  Better
    +      ** would be to define one or the other as the default winner,
    +      ** but should it be fts3-centric (docid) or SQLite-centric
    +      ** (rowid)?
    +      */
    +      rc = SQLITE_ERROR;
    +    }else{
    +      if( SQLITE_NULL == sqlite3_value_type(pRequestDocid) ){
    +        pRequestDocid = ppArg[1];
    +      }
    +      rc = index_insert(v, pRequestDocid, &ppArg[2], pRowid);
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +static int fulltextSync(sqlite3_vtab *pVtab){
    +  FTSTRACE(("FTS3 xSync()\n"));
    +  return flushPendingTerms((fulltext_vtab *)pVtab);
    +}
    +
    +static int fulltextBegin(sqlite3_vtab *pVtab){
    +  fulltext_vtab *v = (fulltext_vtab *) pVtab;
    +  FTSTRACE(("FTS3 xBegin()\n"));
    +
    +  /* Any buffered updates should have been cleared by the previous
    +  ** transaction.
    +  */
    +  assert( v->nPendingData<0 );
    +  return clearPendingTerms(v);
    +}
    +
    +static int fulltextCommit(sqlite3_vtab *pVtab){
    +  fulltext_vtab *v = (fulltext_vtab *) pVtab;
    +  FTSTRACE(("FTS3 xCommit()\n"));
    +
    +  /* Buffered updates should have been cleared by fulltextSync(). */
    +  assert( v->nPendingData<0 );
    +  return clearPendingTerms(v);
    +}
    +
    +static int fulltextRollback(sqlite3_vtab *pVtab){
    +  FTSTRACE(("FTS3 xRollback()\n"));
    +  return clearPendingTerms((fulltext_vtab *)pVtab);
    +}
    +
    +/*
    +** Implementation of the snippet() function for FTS3
    +*/
    +static void snippetFunc(
    +  sqlite3_context *pContext,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  fulltext_cursor *pCursor;
    +  if( argc<1 ) return;
    +  if( sqlite3_value_type(argv[0])!=SQLITE_BLOB ||
    +      sqlite3_value_bytes(argv[0])!=sizeof(pCursor) ){
    +    sqlite3_result_error(pContext, "illegal first argument to html_snippet",-1);
    +  }else{
    +    const char *zStart = "<b>";
    +    const char *zEnd = "</b>";
    +    const char *zEllipsis = "<b>...</b>";
    +    memcpy(&pCursor, sqlite3_value_blob(argv[0]), sizeof(pCursor));
    +    if( argc>=2 ){
    +      zStart = (const char*)sqlite3_value_text(argv[1]);
    +      if( argc>=3 ){
    +        zEnd = (const char*)sqlite3_value_text(argv[2]);
    +        if( argc>=4 ){
    +          zEllipsis = (const char*)sqlite3_value_text(argv[3]);
    +        }
    +      }
    +    }
    +    snippetAllOffsets(pCursor);
    +    snippetText(pCursor, zStart, zEnd, zEllipsis);
    +    sqlite3_result_text(pContext, pCursor->snippet.zSnippet,
    +                        pCursor->snippet.nSnippet, SQLITE_STATIC);
    +  }
    +}
    +
    +/*
    +** Implementation of the offsets() function for FTS3
    +*/
    +static void snippetOffsetsFunc(
    +  sqlite3_context *pContext,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  fulltext_cursor *pCursor;
    +  if( argc<1 ) return;
    +  if( sqlite3_value_type(argv[0])!=SQLITE_BLOB ||
    +      sqlite3_value_bytes(argv[0])!=sizeof(pCursor) ){
    +    sqlite3_result_error(pContext, "illegal first argument to offsets",-1);
    +  }else{
    +    memcpy(&pCursor, sqlite3_value_blob(argv[0]), sizeof(pCursor));
    +    snippetAllOffsets(pCursor);
    +    snippetOffsetText(&pCursor->snippet);
    +    sqlite3_result_text(pContext,
    +                        pCursor->snippet.zOffset, pCursor->snippet.nOffset,
    +                        SQLITE_STATIC);
    +  }
    +}
    +
    +/* OptLeavesReader is nearly identical to LeavesReader, except that
    +** where LeavesReader is geared towards the merging of complete
    +** segment levels (with exactly MERGE_COUNT segments), OptLeavesReader
    +** is geared towards implementation of the optimize() function, and
    +** can merge all segments simultaneously.  This version may be
    +** somewhat less efficient than LeavesReader because it merges into an
    +** accumulator rather than doing an N-way merge, but since segment
    +** size grows exponentially (so segment count logrithmically) this is
    +** probably not an immediate problem.
    +*/
    +/* TODO(shess): Prove that assertion, or extend the merge code to
    +** merge tree fashion (like the prefix-searching code does).
    +*/
    +/* TODO(shess): OptLeavesReader and LeavesReader could probably be
    +** merged with little or no loss of performance for LeavesReader.  The
    +** merged code would need to handle >MERGE_COUNT segments, and would
    +** also need to be able to optionally optimize away deletes.
    +*/
    +typedef struct OptLeavesReader {
    +  /* Segment number, to order readers by age. */
    +  int segment;
    +  LeavesReader reader;
    +} OptLeavesReader;
    +
    +static int optLeavesReaderAtEnd(OptLeavesReader *pReader){
    +  return leavesReaderAtEnd(&pReader->reader);
    +}
    +static int optLeavesReaderTermBytes(OptLeavesReader *pReader){
    +  return leavesReaderTermBytes(&pReader->reader);
    +}
    +static const char *optLeavesReaderData(OptLeavesReader *pReader){
    +  return leavesReaderData(&pReader->reader);
    +}
    +static int optLeavesReaderDataBytes(OptLeavesReader *pReader){
    +  return leavesReaderDataBytes(&pReader->reader);
    +}
    +static const char *optLeavesReaderTerm(OptLeavesReader *pReader){
    +  return leavesReaderTerm(&pReader->reader);
    +}
    +static int optLeavesReaderStep(fulltext_vtab *v, OptLeavesReader *pReader){
    +  return leavesReaderStep(v, &pReader->reader);
    +}
    +static int optLeavesReaderTermCmp(OptLeavesReader *lr1, OptLeavesReader *lr2){
    +  return leavesReaderTermCmp(&lr1->reader, &lr2->reader);
    +}
    +/* Order by term ascending, segment ascending (oldest to newest), with
    +** exhausted readers to the end.
    +*/
    +static int optLeavesReaderCmp(OptLeavesReader *lr1, OptLeavesReader *lr2){
    +  int c = optLeavesReaderTermCmp(lr1, lr2);
    +  if( c!=0 ) return c;
    +  return lr1->segment-lr2->segment;
    +}
    +/* Bubble pLr[0] to appropriate place in pLr[1..nLr-1].  Assumes that
    +** pLr[1..nLr-1] is already sorted.
    +*/
    +static void optLeavesReaderReorder(OptLeavesReader *pLr, int nLr){
    +  while( nLr>1 && optLeavesReaderCmp(pLr, pLr+1)>0 ){
    +    OptLeavesReader tmp = pLr[0];
    +    pLr[0] = pLr[1];
    +    pLr[1] = tmp;
    +    nLr--;
    +    pLr++;
    +  }
    +}
    +
    +/* optimize() helper function.  Put the readers in order and iterate
    +** through them, merging doclists for matching terms into pWriter.
    +** Returns SQLITE_OK on success, or the SQLite error code which
    +** prevented success.
    +*/
    +static int optimizeInternal(fulltext_vtab *v,
    +                            OptLeavesReader *readers, int nReaders,
    +                            LeafWriter *pWriter){
    +  int i, rc = SQLITE_OK;
    +  DataBuffer doclist, merged, tmp;
    +
    +  /* Order the readers. */
    +  i = nReaders;
    +  while( i-- > 0 ){
    +    optLeavesReaderReorder(&readers[i], nReaders-i);
    +  }
    +
    +  dataBufferInit(&doclist, LEAF_MAX);
    +  dataBufferInit(&merged, LEAF_MAX);
    +
    +  /* Exhausted readers bubble to the end, so when the first reader is
    +  ** at eof, all are at eof.
    +  */
    +  while( !optLeavesReaderAtEnd(&readers[0]) ){
    +
    +    /* Figure out how many readers share the next term. */
    +    for(i=1; i<nReaders && !optLeavesReaderAtEnd(&readers[i]); i++){
    +      if( 0!=optLeavesReaderTermCmp(&readers[0], &readers[i]) ) break;
    +    }
    +
    +    /* Special-case for no merge. */
    +    if( i==1 ){
    +      /* Trim deletions from the doclist. */
    +      dataBufferReset(&merged);
    +      docListTrim(DL_DEFAULT,
    +                  optLeavesReaderData(&readers[0]),
    +                  optLeavesReaderDataBytes(&readers[0]),
    +                  -1, DL_DEFAULT, &merged);
    +    }else{
    +      DLReader dlReaders[MERGE_COUNT];
    +      int iReader, nReaders;
    +
    +      /* Prime the pipeline with the first reader's doclist.  After
    +      ** one pass index 0 will reference the accumulated doclist.
    +      */
    +      dlrInit(&dlReaders[0], DL_DEFAULT,
    +              optLeavesReaderData(&readers[0]),
    +              optLeavesReaderDataBytes(&readers[0]));
    +      iReader = 1;
    +
    +      assert( iReader<i );  /* Must execute the loop at least once. */
    +      while( iReader<i ){
    +        /* Merge 16 inputs per pass. */
    +        for( nReaders=1; iReader<i && nReaders<MERGE_COUNT;
    +             iReader++, nReaders++ ){
    +          dlrInit(&dlReaders[nReaders], DL_DEFAULT,
    +                  optLeavesReaderData(&readers[iReader]),
    +                  optLeavesReaderDataBytes(&readers[iReader]));
    +        }
    +
    +        /* Merge doclists and swap result into accumulator. */
    +        dataBufferReset(&merged);
    +        docListMerge(&merged, dlReaders, nReaders);
    +        tmp = merged;
    +        merged = doclist;
    +        doclist = tmp;
    +
    +        while( nReaders-- > 0 ){
    +          dlrDestroy(&dlReaders[nReaders]);
    +        }
    +
    +        /* Accumulated doclist to reader 0 for next pass. */
    +        dlrInit(&dlReaders[0], DL_DEFAULT, doclist.pData, doclist.nData);
    +      }
    +
    +      /* Destroy reader that was left in the pipeline. */
    +      dlrDestroy(&dlReaders[0]);
    +
    +      /* Trim deletions from the doclist. */
    +      dataBufferReset(&merged);
    +      docListTrim(DL_DEFAULT, doclist.pData, doclist.nData,
    +                  -1, DL_DEFAULT, &merged);
    +    }
    +
    +    /* Only pass doclists with hits (skip if all hits deleted). */
    +    if( merged.nData>0 ){
    +      rc = leafWriterStep(v, pWriter,
    +                          optLeavesReaderTerm(&readers[0]),
    +                          optLeavesReaderTermBytes(&readers[0]),
    +                          merged.pData, merged.nData);
    +      if( rc!=SQLITE_OK ) goto err;
    +    }
    +
    +    /* Step merged readers to next term and reorder. */
    +    while( i-- > 0 ){
    +      rc = optLeavesReaderStep(v, &readers[i]);
    +      if( rc!=SQLITE_OK ) goto err;
    +
    +      optLeavesReaderReorder(&readers[i], nReaders-i);
    +    }
    +  }
    +
    + err:
    +  dataBufferDestroy(&doclist);
    +  dataBufferDestroy(&merged);
    +  return rc;
    +}
    +
    +/* Implement optimize() function for FTS3.  optimize(t) merges all
    +** segments in the fts index into a single segment.  't' is the magic
    +** table-named column.
    +*/
    +static void optimizeFunc(sqlite3_context *pContext,
    +                         int argc, sqlite3_value **argv){
    +  fulltext_cursor *pCursor;
    +  if( argc>1 ){
    +    sqlite3_result_error(pContext, "excess arguments to optimize()",-1);
    +  }else if( sqlite3_value_type(argv[0])!=SQLITE_BLOB ||
    +            sqlite3_value_bytes(argv[0])!=sizeof(pCursor) ){
    +    sqlite3_result_error(pContext, "illegal first argument to optimize",-1);
    +  }else{
    +    fulltext_vtab *v;
    +    int i, rc, iMaxLevel;
    +    OptLeavesReader *readers;
    +    int nReaders;
    +    LeafWriter writer;
    +    sqlite3_stmt *s;
    +
    +    memcpy(&pCursor, sqlite3_value_blob(argv[0]), sizeof(pCursor));
    +    v = cursor_vtab(pCursor);
    +
    +    /* Flush any buffered updates before optimizing. */
    +    rc = flushPendingTerms(v);
    +    if( rc!=SQLITE_OK ) goto err;
    +
    +    rc = segdir_count(v, &nReaders, &iMaxLevel);
    +    if( rc!=SQLITE_OK ) goto err;
    +    if( nReaders==0 || nReaders==1 ){
    +      sqlite3_result_text(pContext, "Index already optimal", -1,
    +                          SQLITE_STATIC);
    +      return;
    +    }
    +
    +    rc = sql_get_statement(v, SEGDIR_SELECT_ALL_STMT, &s);
    +    if( rc!=SQLITE_OK ) goto err;
    +
    +    readers = sqlite3_malloc(nReaders*sizeof(readers[0]));
    +    if( readers==NULL ) goto err;
    +
    +    /* Note that there will already be a segment at this position
    +    ** until we call segdir_delete() on iMaxLevel.
    +    */
    +    leafWriterInit(iMaxLevel, 0, &writer);
    +
    +    i = 0;
    +    while( (rc = sqlite3_step(s))==SQLITE_ROW ){
    +      sqlite_int64 iStart = sqlite3_column_int64(s, 0);
    +      sqlite_int64 iEnd = sqlite3_column_int64(s, 1);
    +      const char *pRootData = sqlite3_column_blob(s, 2);
    +      int nRootData = sqlite3_column_bytes(s, 2);
    +
    +      assert( i<nReaders );
    +      rc = leavesReaderInit(v, -1, iStart, iEnd, pRootData, nRootData,
    +                            &readers[i].reader);
    +      if( rc!=SQLITE_OK ) break;
    +
    +      readers[i].segment = i;
    +      i++;
    +    }
    +
    +    /* If we managed to successfully read them all, optimize them. */
    +    if( rc==SQLITE_DONE ){
    +      assert( i==nReaders );
    +      rc = optimizeInternal(v, readers, nReaders, &writer);
    +    }
    +
    +    while( i-- > 0 ){
    +      leavesReaderDestroy(&readers[i].reader);
    +    }
    +    sqlite3_free(readers);
    +
    +    /* If we've successfully gotten to here, delete the old segments
    +    ** and flush the interior structure of the new segment.
    +    */
    +    if( rc==SQLITE_OK ){
    +      for( i=0; i<=iMaxLevel; i++ ){
    +        rc = segdir_delete(v, i);
    +        if( rc!=SQLITE_OK ) break;
    +      }
    +
    +      if( rc==SQLITE_OK ) rc = leafWriterFinalize(v, &writer);
    +    }
    +
    +    leafWriterDestroy(&writer);
    +
    +    if( rc!=SQLITE_OK ) goto err;
    +
    +    sqlite3_result_text(pContext, "Index optimized", -1, SQLITE_STATIC);
    +    return;
    +
    +    /* TODO(shess): Error-handling needs to be improved along the
    +    ** lines of the dump_ functions.
    +    */
    + err:
    +    {
    +      char buf[512];
    +      sqlite3_snprintf(sizeof(buf), buf, "Error in optimize: %s",
    +                       sqlite3_errmsg(sqlite3_context_db_handle(pContext)));
    +      sqlite3_result_error(pContext, buf, -1);
    +    }
    +  }
    +}
    +
    +#ifdef SQLITE_TEST
    +/* Generate an error of the form "<prefix>: <msg>".  If msg is NULL,
    +** pull the error from the context's db handle.
    +*/
    +static void generateError(sqlite3_context *pContext,
    +                          const char *prefix, const char *msg){
    +  char buf[512];
    +  if( msg==NULL ) msg = sqlite3_errmsg(sqlite3_context_db_handle(pContext));
    +  sqlite3_snprintf(sizeof(buf), buf, "%s: %s", prefix, msg);
    +  sqlite3_result_error(pContext, buf, -1);
    +}
    +
    +/* Helper function to collect the set of terms in the segment into
    +** pTerms.  The segment is defined by the leaf nodes between
    +** iStartBlockid and iEndBlockid, inclusive, or by the contents of
    +** pRootData if iStartBlockid is 0 (in which case the entire segment
    +** fit in a leaf).
    +*/
    +static int collectSegmentTerms(fulltext_vtab *v, sqlite3_stmt *s,
    +                               fts3Hash *pTerms){
    +  const sqlite_int64 iStartBlockid = sqlite3_column_int64(s, 0);
    +  const sqlite_int64 iEndBlockid = sqlite3_column_int64(s, 1);
    +  const char *pRootData = sqlite3_column_blob(s, 2);
    +  const int nRootData = sqlite3_column_bytes(s, 2);
    +  LeavesReader reader;
    +  int rc = leavesReaderInit(v, 0, iStartBlockid, iEndBlockid,
    +                            pRootData, nRootData, &reader);
    +  if( rc!=SQLITE_OK ) return rc;
    +
    +  while( rc==SQLITE_OK && !leavesReaderAtEnd(&reader) ){
    +    const char *pTerm = leavesReaderTerm(&reader);
    +    const int nTerm = leavesReaderTermBytes(&reader);
    +    void *oldValue = sqlite3Fts3HashFind(pTerms, pTerm, nTerm);
    +    void *newValue = (void *)((char *)oldValue+1);
    +
    +    /* From the comment before sqlite3Fts3HashInsert in fts3_hash.c,
    +    ** the data value passed is returned in case of malloc failure.
    +    */
    +    if( newValue==sqlite3Fts3HashInsert(pTerms, pTerm, nTerm, newValue) ){
    +      rc = SQLITE_NOMEM;
    +    }else{
    +      rc = leavesReaderStep(v, &reader);
    +    }
    +  }
    +
    +  leavesReaderDestroy(&reader);
    +  return rc;
    +}
    +
    +/* Helper function to build the result string for dump_terms(). */
    +static int generateTermsResult(sqlite3_context *pContext, fts3Hash *pTerms){
    +  int iTerm, nTerms, nResultBytes, iByte;
    +  char *result;
    +  TermData *pData;
    +  fts3HashElem *e;
    +
    +  /* Iterate pTerms to generate an array of terms in pData for
    +  ** sorting.
    +  */
    +  nTerms = fts3HashCount(pTerms);
    +  assert( nTerms>0 );
    +  pData = sqlite3_malloc(nTerms*sizeof(TermData));
    +  if( pData==NULL ) return SQLITE_NOMEM;
    +
    +  nResultBytes = 0;
    +  for(iTerm = 0, e = fts3HashFirst(pTerms); e; iTerm++, e = fts3HashNext(e)){
    +    nResultBytes += fts3HashKeysize(e)+1;   /* Term plus trailing space */
    +    assert( iTerm<nTerms );
    +    pData[iTerm].pTerm = fts3HashKey(e);
    +    pData[iTerm].nTerm = fts3HashKeysize(e);
    +    pData[iTerm].pCollector = fts3HashData(e);  /* unused */
    +  }
    +  assert( iTerm==nTerms );
    +
    +  assert( nResultBytes>0 );   /* nTerms>0, nResultsBytes must be, too. */
    +  result = sqlite3_malloc(nResultBytes);
    +  if( result==NULL ){
    +    sqlite3_free(pData);
    +    return SQLITE_NOMEM;
    +  }
    +
    +  if( nTerms>1 ) qsort(pData, nTerms, sizeof(*pData), termDataCmp);
    +
    +  /* Read the terms in order to build the result. */
    +  iByte = 0;
    +  for(iTerm=0; iTerm<nTerms; ++iTerm){
    +    memcpy(result+iByte, pData[iTerm].pTerm, pData[iTerm].nTerm);
    +    iByte += pData[iTerm].nTerm;
    +    result[iByte++] = ' ';
    +  }
    +  assert( iByte==nResultBytes );
    +  assert( result[nResultBytes-1]==' ' );
    +  result[nResultBytes-1] = '\0';
    +
    +  /* Passes away ownership of result. */
    +  sqlite3_result_text(pContext, result, nResultBytes-1, sqlite3_free);
    +  sqlite3_free(pData);
    +  return SQLITE_OK;
    +}
    +
    +/* Implements dump_terms() for use in inspecting the fts3 index from
    +** tests.  TEXT result containing the ordered list of terms joined by
    +** spaces.  dump_terms(t, level, idx) dumps the terms for the segment
    +** specified by level, idx (in %_segdir), while dump_terms(t) dumps
    +** all terms in the index.  In both cases t is the fts table's magic
    +** table-named column.
    +*/
    +static void dumpTermsFunc(
    +  sqlite3_context *pContext,
    +  int argc, sqlite3_value **argv
    +){
    +  fulltext_cursor *pCursor;
    +  if( argc!=3 && argc!=1 ){
    +    generateError(pContext, "dump_terms", "incorrect arguments");
    +  }else if( sqlite3_value_type(argv[0])!=SQLITE_BLOB ||
    +            sqlite3_value_bytes(argv[0])!=sizeof(pCursor) ){
    +    generateError(pContext, "dump_terms", "illegal first argument");
    +  }else{
    +    fulltext_vtab *v;
    +    fts3Hash terms;
    +    sqlite3_stmt *s = NULL;
    +    int rc;
    +
    +    memcpy(&pCursor, sqlite3_value_blob(argv[0]), sizeof(pCursor));
    +    v = cursor_vtab(pCursor);
    +
    +    /* If passed only the cursor column, get all segments.  Otherwise
    +    ** get the segment described by the following two arguments.
    +    */
    +    if( argc==1 ){
    +      rc = sql_get_statement(v, SEGDIR_SELECT_ALL_STMT, &s);
    +    }else{
    +      rc = sql_get_statement(v, SEGDIR_SELECT_SEGMENT_STMT, &s);
    +      if( rc==SQLITE_OK ){
    +        rc = sqlite3_bind_int(s, 1, sqlite3_value_int(argv[1]));
    +        if( rc==SQLITE_OK ){
    +          rc = sqlite3_bind_int(s, 2, sqlite3_value_int(argv[2]));
    +        }
    +      }
    +    }
    +
    +    if( rc!=SQLITE_OK ){
    +      generateError(pContext, "dump_terms", NULL);
    +      return;
    +    }
    +
    +    /* Collect the terms for each segment. */
    +    sqlite3Fts3HashInit(&terms, FTS3_HASH_STRING, 1);
    +    while( (rc = sqlite3_step(s))==SQLITE_ROW ){
    +      rc = collectSegmentTerms(v, s, &terms);
    +      if( rc!=SQLITE_OK ) break;
    +    }
    +
    +    if( rc!=SQLITE_DONE ){
    +      sqlite3_reset(s);
    +      generateError(pContext, "dump_terms", NULL);
    +    }else{
    +      const int nTerms = fts3HashCount(&terms);
    +      if( nTerms>0 ){
    +        rc = generateTermsResult(pContext, &terms);
    +        if( rc==SQLITE_NOMEM ){
    +          generateError(pContext, "dump_terms", "out of memory");
    +        }else{
    +          assert( rc==SQLITE_OK );
    +        }
    +      }else if( argc==3 ){
    +        /* The specific segment asked for could not be found. */
    +        generateError(pContext, "dump_terms", "segment not found");
    +      }else{
    +        /* No segments found. */
    +        /* TODO(shess): It should be impossible to reach this.  This
    +        ** case can only happen for an empty table, in which case
    +        ** SQLite has no rows to call this function on.
    +        */
    +        sqlite3_result_null(pContext);
    +      }
    +    }
    +    sqlite3Fts3HashClear(&terms);
    +  }
    +}
    +
    +/* Expand the DL_DEFAULT doclist in pData into a text result in
    +** pContext.
    +*/
    +static void createDoclistResult(sqlite3_context *pContext,
    +                                const char *pData, int nData){
    +  DataBuffer dump;
    +  DLReader dlReader;
    +
    +  assert( pData!=NULL && nData>0 );
    +
    +  dataBufferInit(&dump, 0);
    +  dlrInit(&dlReader, DL_DEFAULT, pData, nData);
    +  for( ; !dlrAtEnd(&dlReader); dlrStep(&dlReader) ){
    +    char buf[256];
    +    PLReader plReader;
    +
    +    plrInit(&plReader, &dlReader);
    +    if( DL_DEFAULT==DL_DOCIDS || plrAtEnd(&plReader) ){
    +      sqlite3_snprintf(sizeof(buf), buf, "[%lld] ", dlrDocid(&dlReader));
    +      dataBufferAppend(&dump, buf, strlen(buf));
    +    }else{
    +      int iColumn = plrColumn(&plReader);
    +
    +      sqlite3_snprintf(sizeof(buf), buf, "[%lld %d[",
    +                       dlrDocid(&dlReader), iColumn);
    +      dataBufferAppend(&dump, buf, strlen(buf));
    +
    +      for( ; !plrAtEnd(&plReader); plrStep(&plReader) ){
    +        if( plrColumn(&plReader)!=iColumn ){
    +          iColumn = plrColumn(&plReader);
    +          sqlite3_snprintf(sizeof(buf), buf, "] %d[", iColumn);
    +          assert( dump.nData>0 );
    +          dump.nData--;                     /* Overwrite trailing space. */
    +          assert( dump.pData[dump.nData]==' ');
    +          dataBufferAppend(&dump, buf, strlen(buf));
    +        }
    +        if( DL_DEFAULT==DL_POSITIONS_OFFSETS ){
    +          sqlite3_snprintf(sizeof(buf), buf, "%d,%d,%d ",
    +                           plrPosition(&plReader),
    +                           plrStartOffset(&plReader), plrEndOffset(&plReader));
    +        }else if( DL_DEFAULT==DL_POSITIONS ){
    +          sqlite3_snprintf(sizeof(buf), buf, "%d ", plrPosition(&plReader));
    +        }else{
    +          assert( NULL=="Unhandled DL_DEFAULT value");
    +        }
    +        dataBufferAppend(&dump, buf, strlen(buf));
    +      }
    +      plrDestroy(&plReader);
    +
    +      assert( dump.nData>0 );
    +      dump.nData--;                     /* Overwrite trailing space. */
    +      assert( dump.pData[dump.nData]==' ');
    +      dataBufferAppend(&dump, "]] ", 3);
    +    }
    +  }
    +  dlrDestroy(&dlReader);
    +
    +  assert( dump.nData>0 );
    +  dump.nData--;                     /* Overwrite trailing space. */
    +  assert( dump.pData[dump.nData]==' ');
    +  dump.pData[dump.nData] = '\0';
    +  assert( dump.nData>0 );
    +
    +  /* Passes ownership of dump's buffer to pContext. */
    +  sqlite3_result_text(pContext, dump.pData, dump.nData, sqlite3_free);
    +  dump.pData = NULL;
    +  dump.nData = dump.nCapacity = 0;
    +}
    +
    +/* Implements dump_doclist() for use in inspecting the fts3 index from
    +** tests.  TEXT result containing a string representation of the
    +** doclist for the indicated term.  dump_doclist(t, term, level, idx)
    +** dumps the doclist for term from the segment specified by level, idx
    +** (in %_segdir), while dump_doclist(t, term) dumps the logical
    +** doclist for the term across all segments.  The per-segment doclist
    +** can contain deletions, while the full-index doclist will not
    +** (deletions are omitted).
    +**
    +** Result formats differ with the setting of DL_DEFAULTS.  Examples:
    +**
    +** DL_DOCIDS: [1] [3] [7]
    +** DL_POSITIONS: [1 0[0 4] 1[17]] [3 1[5]]
    +** DL_POSITIONS_OFFSETS: [1 0[0,0,3 4,23,26] 1[17,102,105]] [3 1[5,20,23]]
    +**
    +** In each case the number after the outer '[' is the docid.  In the
    +** latter two cases, the number before the inner '[' is the column
    +** associated with the values within.  For DL_POSITIONS the numbers
    +** within are the positions, for DL_POSITIONS_OFFSETS they are the
    +** position, the start offset, and the end offset.
    +*/
    +static void dumpDoclistFunc(
    +  sqlite3_context *pContext,
    +  int argc, sqlite3_value **argv
    +){
    +  fulltext_cursor *pCursor;
    +  if( argc!=2 && argc!=4 ){
    +    generateError(pContext, "dump_doclist", "incorrect arguments");
    +  }else if( sqlite3_value_type(argv[0])!=SQLITE_BLOB ||
    +            sqlite3_value_bytes(argv[0])!=sizeof(pCursor) ){
    +    generateError(pContext, "dump_doclist", "illegal first argument");
    +  }else if( sqlite3_value_text(argv[1])==NULL ||
    +            sqlite3_value_text(argv[1])[0]=='\0' ){
    +    generateError(pContext, "dump_doclist", "empty second argument");
    +  }else{
    +    const char *pTerm = (const char *)sqlite3_value_text(argv[1]);
    +    const int nTerm = strlen(pTerm);
    +    fulltext_vtab *v;
    +    int rc;
    +    DataBuffer doclist;
    +
    +    memcpy(&pCursor, sqlite3_value_blob(argv[0]), sizeof(pCursor));
    +    v = cursor_vtab(pCursor);
    +
    +    dataBufferInit(&doclist, 0);
    +
    +    /* termSelect() yields the same logical doclist that queries are
    +    ** run against.
    +    */
    +    if( argc==2 ){
    +      rc = termSelect(v, v->nColumn, pTerm, nTerm, 0, DL_DEFAULT, &doclist);
    +    }else{
    +      sqlite3_stmt *s = NULL;
    +
    +      /* Get our specific segment's information. */
    +      rc = sql_get_statement(v, SEGDIR_SELECT_SEGMENT_STMT, &s);
    +      if( rc==SQLITE_OK ){
    +        rc = sqlite3_bind_int(s, 1, sqlite3_value_int(argv[2]));
    +        if( rc==SQLITE_OK ){
    +          rc = sqlite3_bind_int(s, 2, sqlite3_value_int(argv[3]));
    +        }
    +      }
    +
    +      if( rc==SQLITE_OK ){
    +        rc = sqlite3_step(s);
    +
    +        if( rc==SQLITE_DONE ){
    +          dataBufferDestroy(&doclist);
    +          generateError(pContext, "dump_doclist", "segment not found");
    +          return;
    +        }
    +
    +        /* Found a segment, load it into doclist. */
    +        if( rc==SQLITE_ROW ){
    +          const sqlite_int64 iLeavesEnd = sqlite3_column_int64(s, 1);
    +          const char *pData = sqlite3_column_blob(s, 2);
    +          const int nData = sqlite3_column_bytes(s, 2);
    +
    +          /* loadSegment() is used by termSelect() to load each
    +          ** segment's data.
    +          */
    +          rc = loadSegment(v, pData, nData, iLeavesEnd, pTerm, nTerm, 0,
    +                           &doclist);
    +          if( rc==SQLITE_OK ){
    +            rc = sqlite3_step(s);
    +
    +            /* Should not have more than one matching segment. */
    +            if( rc!=SQLITE_DONE ){
    +              sqlite3_reset(s);
    +              dataBufferDestroy(&doclist);
    +              generateError(pContext, "dump_doclist", "invalid segdir");
    +              return;
    +            }
    +            rc = SQLITE_OK;
    +          }
    +        }
    +      }
    +
    +      sqlite3_reset(s);
    +    }
    +
    +    if( rc==SQLITE_OK ){
    +      if( doclist.nData>0 ){
    +        createDoclistResult(pContext, doclist.pData, doclist.nData);
    +      }else{
    +        /* TODO(shess): This can happen if the term is not present, or
    +        ** if all instances of the term have been deleted and this is
    +        ** an all-index dump.  It may be interesting to distinguish
    +        ** these cases.
    +        */
    +        sqlite3_result_text(pContext, "", 0, SQLITE_STATIC);
    +      }
    +    }else if( rc==SQLITE_NOMEM ){
    +      /* Handle out-of-memory cases specially because if they are
    +      ** generated in fts3 code they may not be reflected in the db
    +      ** handle.
    +      */
    +      /* TODO(shess): Handle this more comprehensively.
    +      ** sqlite3ErrStr() has what I need, but is internal.
    +      */
    +      generateError(pContext, "dump_doclist", "out of memory");
    +    }else{
    +      generateError(pContext, "dump_doclist", NULL);
    +    }
    +
    +    dataBufferDestroy(&doclist);
    +  }
    +}
    +#endif
    +
    +/*
    +** This routine implements the xFindFunction method for the FTS3
    +** virtual table.
    +*/
    +static int fulltextFindFunction(
    +  sqlite3_vtab *pVtab,
    +  int nArg,
    +  const char *zName,
    +  void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void **ppArg
    +){
    +  if( strcmp(zName,"snippet")==0 ){
    +    *pxFunc = snippetFunc;
    +    return 1;
    +  }else if( strcmp(zName,"offsets")==0 ){
    +    *pxFunc = snippetOffsetsFunc;
    +    return 1;
    +  }else if( strcmp(zName,"optimize")==0 ){
    +    *pxFunc = optimizeFunc;
    +    return 1;
    +#ifdef SQLITE_TEST
    +    /* NOTE(shess): These functions are present only for testing
    +    ** purposes.  No particular effort is made to optimize their
    +    ** execution or how they build their results.
    +    */
    +  }else if( strcmp(zName,"dump_terms")==0 ){
    +    /* fprintf(stderr, "Found dump_terms\n"); */
    +    *pxFunc = dumpTermsFunc;
    +    return 1;
    +  }else if( strcmp(zName,"dump_doclist")==0 ){
    +    /* fprintf(stderr, "Found dump_doclist\n"); */
    +    *pxFunc = dumpDoclistFunc;
    +    return 1;
    +#endif
    +  }
    +  return 0;
    +}
    +
    +/*
    +** Rename an fts3 table.
    +*/
    +static int fulltextRename(
    +  sqlite3_vtab *pVtab,
    +  const char *zName
    +){
    +  fulltext_vtab *p = (fulltext_vtab *)pVtab;
    +  int rc = SQLITE_NOMEM;
    +  char *zSql = sqlite3_mprintf(
    +    "ALTER TABLE %Q.'%q_content'  RENAME TO '%q_content';"
    +    "ALTER TABLE %Q.'%q_segments' RENAME TO '%q_segments';"
    +    "ALTER TABLE %Q.'%q_segdir'   RENAME TO '%q_segdir';"
    +    , p->zDb, p->zName, zName 
    +    , p->zDb, p->zName, zName 
    +    , p->zDb, p->zName, zName
    +  );
    +  if( zSql ){
    +    rc = sqlite3_exec(p->db, zSql, 0, 0, 0);
    +    sqlite3_free(zSql);
    +  }
    +  return rc;
    +}
    +
    +static const sqlite3_module fts3Module = {
    +  /* iVersion      */ 0,
    +  /* xCreate       */ fulltextCreate,
    +  /* xConnect      */ fulltextConnect,
    +  /* xBestIndex    */ fulltextBestIndex,
    +  /* xDisconnect   */ fulltextDisconnect,
    +  /* xDestroy      */ fulltextDestroy,
    +  /* xOpen         */ fulltextOpen,
    +  /* xClose        */ fulltextClose,
    +  /* xFilter       */ fulltextFilter,
    +  /* xNext         */ fulltextNext,
    +  /* xEof          */ fulltextEof,
    +  /* xColumn       */ fulltextColumn,
    +  /* xRowid        */ fulltextRowid,
    +  /* xUpdate       */ fulltextUpdate,
    +  /* xBegin        */ fulltextBegin,
    +  /* xSync         */ fulltextSync,
    +  /* xCommit       */ fulltextCommit,
    +  /* xRollback     */ fulltextRollback,
    +  /* xFindFunction */ fulltextFindFunction,
    +  /* xRename */       fulltextRename,
    +};
    +
    +static void hashDestroy(void *p){
    +  fts3Hash *pHash = (fts3Hash *)p;
    +  sqlite3Fts3HashClear(pHash);
    +  sqlite3_free(pHash);
    +}
    +
    +/*
    +** The fts3 built-in tokenizers - "simple" and "porter" - are implemented
    +** in files fts3_tokenizer1.c and fts3_porter.c respectively. The following
    +** two forward declarations are for functions declared in these files
    +** used to retrieve the respective implementations.
    +**
    +** Calling sqlite3Fts3SimpleTokenizerModule() sets the value pointed
    +** to by the argument to point a the "simple" tokenizer implementation.
    +** Function ...PorterTokenizerModule() sets *pModule to point to the
    +** porter tokenizer/stemmer implementation.
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
    +SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);
    +SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
    +
    +SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, fts3Hash *, const char *);
    +
    +/*
    +** Initialise the fts3 extension. If this extension is built as part
    +** of the sqlite library, then this function is called directly by
    +** SQLite. If fts3 is built as a dynamically loadable extension, this
    +** function is called by the sqlite3_extension_init() entry point.
    +*/
    +SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
    +  int rc = SQLITE_OK;
    +  fts3Hash *pHash = 0;
    +  const sqlite3_tokenizer_module *pSimple = 0;
    +  const sqlite3_tokenizer_module *pPorter = 0;
    +  const sqlite3_tokenizer_module *pIcu = 0;
    +
    +  sqlite3Fts3SimpleTokenizerModule(&pSimple);
    +  sqlite3Fts3PorterTokenizerModule(&pPorter);
    +#ifdef SQLITE_ENABLE_ICU
    +  sqlite3Fts3IcuTokenizerModule(&pIcu);
    +#endif
    +
    +  /* Allocate and initialise the hash-table used to store tokenizers. */
    +  pHash = sqlite3_malloc(sizeof(fts3Hash));
    +  if( !pHash ){
    +    rc = SQLITE_NOMEM;
    +  }else{
    +    sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
    +  }
    +
    +  /* Load the built-in tokenizers into the hash table */
    +  if( rc==SQLITE_OK ){
    +    if( sqlite3Fts3HashInsert(pHash, "simple", 7, (void *)pSimple)
    +     || sqlite3Fts3HashInsert(pHash, "porter", 7, (void *)pPorter) 
    +     || (pIcu && sqlite3Fts3HashInsert(pHash, "icu", 4, (void *)pIcu))
    +    ){
    +      rc = SQLITE_NOMEM;
    +    }
    +  }
    +
    +#ifdef SQLITE_TEST
    +  sqlite3Fts3ExprInitTestInterface(db);
    +#endif
    +
    +  /* Create the virtual table wrapper around the hash-table and overload 
    +  ** the two scalar functions. If this is successful, register the
    +  ** module with sqlite.
    +  */
    +  if( SQLITE_OK==rc 
    +   && SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer"))
    +   && SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1))
    +   && SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", -1))
    +   && SQLITE_OK==(rc = sqlite3_overload_function(db, "optimize", -1))
    +#ifdef SQLITE_TEST
    +   && SQLITE_OK==(rc = sqlite3_overload_function(db, "dump_terms", -1))
    +   && SQLITE_OK==(rc = sqlite3_overload_function(db, "dump_doclist", -1))
    +#endif
    +  ){
    +    return sqlite3_create_module_v2(
    +        db, "fts3", &fts3Module, (void *)pHash, hashDestroy
    +    );
    +  }
    +
    +  /* An error has occurred. Delete the hash table and return the error code. */
    +  assert( rc!=SQLITE_OK );
    +  if( pHash ){
    +    sqlite3Fts3HashClear(pHash);
    +    sqlite3_free(pHash);
    +  }
    +  return rc;
    +}
    +
    +#if !SQLITE_CORE
    +SQLITE_API int sqlite3_extension_init(
    +  sqlite3 *db, 
    +  char **pzErrMsg,
    +  const sqlite3_api_routines *pApi
    +){
    +  SQLITE_EXTENSION_INIT2(pApi)
    +  return sqlite3Fts3Init(db);
    +}
    +#endif
    +
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3.c ************************************************/
    +/************** Begin file fts3_expr.c ***************************************/
    +/*
    +** 2008 Nov 28
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This module contains code that implements a parser for fts3 query strings
    +** (the right-hand argument to the MATCH operator). Because the supported 
    +** syntax is relatively simple, the whole tokenizer/parser system is
    +** hand-coded. The public interface to this module is declared in source
    +** code file "fts3_expr.h".
    +*/
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +/*
    +** By default, this module parses the legacy syntax that has been 
    +** traditionally used by fts3. Or, if SQLITE_ENABLE_FTS3_PARENTHESIS
    +** is defined, then it uses the new syntax. The differences between
    +** the new and the old syntaxes are:
    +**
    +**  a) The new syntax supports parenthesis. The old does not.
    +**
    +**  b) The new syntax supports the AND and NOT operators. The old does not.
    +**
    +**  c) The old syntax supports the "-" token qualifier. This is not 
    +**     supported by the new syntax (it is replaced by the NOT operator).
    +**
    +**  d) When using the old syntax, the OR operator has a greater precedence
    +**     than an implicit AND. When using the new, both implicity and explicit
    +**     AND operators have a higher precedence than OR.
    +**
    +** If compiled with SQLITE_TEST defined, then this module exports the
    +** symbol "int sqlite3_fts3_enable_parentheses". Setting this variable
    +** to zero causes the module to use the old syntax. If it is set to 
    +** non-zero the new syntax is activated. This is so both syntaxes can
    +** be tested using a single build of testfixture.
    +*/
    +#ifdef SQLITE_TEST
    +SQLITE_API int sqlite3_fts3_enable_parentheses = 0;
    +#else
    +# ifdef SQLITE_ENABLE_FTS3_PARENTHESIS 
    +#  define sqlite3_fts3_enable_parentheses 1
    +# else
    +#  define sqlite3_fts3_enable_parentheses 0
    +# endif
    +#endif
    +
    +/*
    +** Default span for NEAR operators.
    +*/
    +#define SQLITE_FTS3_DEFAULT_NEAR_PARAM 10
    +
    +
    +typedef struct ParseContext ParseContext;
    +struct ParseContext {
    +  sqlite3_tokenizer *pTokenizer;      /* Tokenizer module */
    +  const char **azCol;                 /* Array of column names for fts3 table */
    +  int nCol;                           /* Number of entries in azCol[] */
    +  int iDefaultCol;                    /* Default column to query */
    +  sqlite3_context *pCtx;              /* Write error message here */
    +  int nNest;                          /* Number of nested brackets */
    +};
    +
    +/*
    +** This function is equivalent to the standard isspace() function. 
    +**
    +** The standard isspace() can be awkward to use safely, because although it
    +** is defined to accept an argument of type int, its behaviour when passed
    +** an integer that falls outside of the range of the unsigned char type
    +** is undefined (and sometimes, "undefined" means segfault). This wrapper
    +** is defined to accept an argument of type char, and always returns 0 for
    +** any values that fall outside of the range of the unsigned char type (i.e.
    +** negative values).
    +*/
    +static int fts3isspace(char c){
    +  return (c&0x80)==0 ? isspace(c) : 0;
    +}
    +
    +/*
    +** Extract the next token from buffer z (length n) using the tokenizer
    +** and other information (column names etc.) in pParse. Create an Fts3Expr
    +** structure of type FTSQUERY_PHRASE containing a phrase consisting of this
    +** single token and set *ppExpr to point to it. If the end of the buffer is
    +** reached before a token is found, set *ppExpr to zero. It is the
    +** responsibility of the caller to eventually deallocate the allocated 
    +** Fts3Expr structure (if any) by passing it to sqlite3_free().
    +**
    +** Return SQLITE_OK if successful, or SQLITE_NOMEM if a memory allocation
    +** fails.
    +*/
    +static int getNextToken(
    +  ParseContext *pParse,                   /* fts3 query parse context */
    +  int iCol,                               /* Value for Fts3Phrase.iColumn */
    +  const char *z, int n,                   /* Input string */
    +  Fts3Expr **ppExpr,                      /* OUT: expression */
    +  int *pnConsumed                         /* OUT: Number of bytes consumed */
    +){
    +  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;
    +  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;
    +  int rc;
    +  sqlite3_tokenizer_cursor *pCursor;
    +  Fts3Expr *pRet = 0;
    +  int nConsumed = 0;
    +
    +  rc = pModule->xOpen(pTokenizer, z, n, &pCursor);
    +  if( rc==SQLITE_OK ){
    +    const char *zToken;
    +    int nToken, iStart, iEnd, iPosition;
    +    int nByte;                               /* total space to allocate */
    +
    +    pCursor->pTokenizer = pTokenizer;
    +    rc = pModule->xNext(pCursor, &zToken, &nToken, &iStart, &iEnd, &iPosition);
    +
    +    if( rc==SQLITE_OK ){
    +      nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
    +      pRet = (Fts3Expr *)sqlite3_malloc(nByte);
    +      if( !pRet ){
    +        rc = SQLITE_NOMEM;
    +      }else{
    +        memset(pRet, 0, nByte);
    +        pRet->eType = FTSQUERY_PHRASE;
    +        pRet->pPhrase = (Fts3Phrase *)&pRet[1];
    +        pRet->pPhrase->nToken = 1;
    +        pRet->pPhrase->iColumn = iCol;
    +        pRet->pPhrase->aToken[0].n = nToken;
    +        pRet->pPhrase->aToken[0].z = (char *)&pRet->pPhrase[1];
    +        memcpy(pRet->pPhrase->aToken[0].z, zToken, nToken);
    +
    +        if( iEnd<n && z[iEnd]=='*' ){
    +          pRet->pPhrase->aToken[0].isPrefix = 1;
    +          iEnd++;
    +        }
    +        if( !sqlite3_fts3_enable_parentheses && iStart>0 && z[iStart-1]=='-' ){
    +          pRet->pPhrase->isNot = 1;
    +        }
    +      }
    +      nConsumed = iEnd;
    +    }
    +
    +    pModule->xClose(pCursor);
    +  }
    +  
    +  *pnConsumed = nConsumed;
    +  *ppExpr = pRet;
    +  return rc;
    +}
    +
    +
    +/*
    +** Enlarge a memory allocation.  If an out-of-memory allocation occurs,
    +** then free the old allocation.
    +*/
    +void *fts3ReallocOrFree(void *pOrig, int nNew){
    +  void *pRet = sqlite3_realloc(pOrig, nNew);
    +  if( !pRet ){
    +    sqlite3_free(pOrig);
    +  }
    +  return pRet;
    +}
    +
    +/*
    +** Buffer zInput, length nInput, contains the contents of a quoted string
    +** that appeared as part of an fts3 query expression. Neither quote character
    +** is included in the buffer. This function attempts to tokenize the entire
    +** input buffer and create an Fts3Expr structure of type FTSQUERY_PHRASE 
    +** containing the results.
    +**
    +** If successful, SQLITE_OK is returned and *ppExpr set to point at the
    +** allocated Fts3Expr structure. Otherwise, either SQLITE_NOMEM (out of memory
    +** error) or SQLITE_ERROR (tokenization error) is returned and *ppExpr set
    +** to 0.
    +*/
    +static int getNextString(
    +  ParseContext *pParse,                   /* fts3 query parse context */
    +  const char *zInput, int nInput,         /* Input string */
    +  Fts3Expr **ppExpr                       /* OUT: expression */
    +){
    +  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;
    +  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;
    +  int rc;
    +  Fts3Expr *p = 0;
    +  sqlite3_tokenizer_cursor *pCursor = 0;
    +  char *zTemp = 0;
    +  int nTemp = 0;
    +
    +  rc = pModule->xOpen(pTokenizer, zInput, nInput, &pCursor);
    +  if( rc==SQLITE_OK ){
    +    int ii;
    +    pCursor->pTokenizer = pTokenizer;
    +    for(ii=0; rc==SQLITE_OK; ii++){
    +      const char *zToken;
    +      int nToken, iBegin, iEnd, iPos;
    +      rc = pModule->xNext(pCursor, &zToken, &nToken, &iBegin, &iEnd, &iPos);
    +      if( rc==SQLITE_OK ){
    +        int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
    +        p = fts3ReallocOrFree(p, nByte+ii*sizeof(struct PhraseToken));
    +        zTemp = fts3ReallocOrFree(zTemp, nTemp + nToken);
    +        if( !p || !zTemp ){
    +          goto no_mem;
    +        }
    +        if( ii==0 ){
    +          memset(p, 0, nByte);
    +          p->pPhrase = (Fts3Phrase *)&p[1];
    +        }
    +        p->pPhrase = (Fts3Phrase *)&p[1];
    +        p->pPhrase->nToken = ii+1;
    +        p->pPhrase->aToken[ii].n = nToken;
    +        memcpy(&zTemp[nTemp], zToken, nToken);
    +        nTemp += nToken;
    +        if( iEnd<nInput && zInput[iEnd]=='*' ){
    +          p->pPhrase->aToken[ii].isPrefix = 1;
    +        }else{
    +          p->pPhrase->aToken[ii].isPrefix = 0;
    +        }
    +      }
    +    }
    +
    +    pModule->xClose(pCursor);
    +    pCursor = 0;
    +  }
    +
    +  if( rc==SQLITE_DONE ){
    +    int jj;
    +    char *zNew;
    +    int nNew = 0;
    +    int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
    +    nByte += (p?(p->pPhrase->nToken-1):0) * sizeof(struct PhraseToken);
    +    p = fts3ReallocOrFree(p, nByte + nTemp);
    +    if( !p ){
    +      goto no_mem;
    +    }
    +    if( zTemp ){
    +      zNew = &(((char *)p)[nByte]);
    +      memcpy(zNew, zTemp, nTemp);
    +    }else{
    +      memset(p, 0, nByte+nTemp);
    +    }
    +    p->pPhrase = (Fts3Phrase *)&p[1];
    +    for(jj=0; jj<p->pPhrase->nToken; jj++){
    +      p->pPhrase->aToken[jj].z = &zNew[nNew];
    +      nNew += p->pPhrase->aToken[jj].n;
    +    }
    +    sqlite3_free(zTemp);
    +    p->eType = FTSQUERY_PHRASE;
    +    p->pPhrase->iColumn = pParse->iDefaultCol;
    +    rc = SQLITE_OK;
    +  }
    +
    +  *ppExpr = p;
    +  return rc;
    +no_mem:
    +
    +  if( pCursor ){
    +    pModule->xClose(pCursor);
    +  }
    +  sqlite3_free(zTemp);
    +  sqlite3_free(p);
    +  *ppExpr = 0;
    +  return SQLITE_NOMEM;
    +}
    +
    +/*
    +** Function getNextNode(), which is called by fts3ExprParse(), may itself
    +** call fts3ExprParse(). So this forward declaration is required.
    +*/
    +static int fts3ExprParse(ParseContext *, const char *, int, Fts3Expr **, int *);
    +
    +/*
    +** The output variable *ppExpr is populated with an allocated Fts3Expr 
    +** structure, or set to 0 if the end of the input buffer is reached.
    +**
    +** Returns an SQLite error code. SQLITE_OK if everything works, SQLITE_NOMEM
    +** if a malloc failure occurs, or SQLITE_ERROR if a parse error is encountered.
    +** If SQLITE_ERROR is returned, pContext is populated with an error message.
    +*/
    +static int getNextNode(
    +  ParseContext *pParse,                   /* fts3 query parse context */
    +  const char *z, int n,                   /* Input string */
    +  Fts3Expr **ppExpr,                      /* OUT: expression */
    +  int *pnConsumed                         /* OUT: Number of bytes consumed */
    +){
    +  static const struct Fts3Keyword {
    +    char z[4];                            /* Keyword text */
    +    unsigned char n;                      /* Length of the keyword */
    +    unsigned char parenOnly;              /* Only valid in paren mode */
    +    unsigned char eType;                  /* Keyword code */
    +  } aKeyword[] = {
    +    { "OR" ,  2, 0, FTSQUERY_OR   },
    +    { "AND",  3, 1, FTSQUERY_AND  },
    +    { "NOT",  3, 1, FTSQUERY_NOT  },
    +    { "NEAR", 4, 0, FTSQUERY_NEAR }
    +  };
    +  int ii;
    +  int iCol;
    +  int iColLen;
    +  int rc;
    +  Fts3Expr *pRet = 0;
    +
    +  const char *zInput = z;
    +  int nInput = n;
    +
    +  /* Skip over any whitespace before checking for a keyword, an open or
    +  ** close bracket, or a quoted string. 
    +  */
    +  while( nInput>0 && fts3isspace(*zInput) ){
    +    nInput--;
    +    zInput++;
    +  }
    +  if( nInput==0 ){
    +    return SQLITE_DONE;
    +  }
    +
    +  /* See if we are dealing with a keyword. */
    +  for(ii=0; ii<(int)(sizeof(aKeyword)/sizeof(struct Fts3Keyword)); ii++){
    +    const struct Fts3Keyword *pKey = &aKeyword[ii];
    +
    +    if( (pKey->parenOnly & ~sqlite3_fts3_enable_parentheses)!=0 ){
    +      continue;
    +    }
    +
    +    if( nInput>=pKey->n && 0==memcmp(zInput, pKey->z, pKey->n) ){
    +      int nNear = SQLITE_FTS3_DEFAULT_NEAR_PARAM;
    +      int nKey = pKey->n;
    +      char cNext;
    +
    +      /* If this is a "NEAR" keyword, check for an explicit nearness. */
    +      if( pKey->eType==FTSQUERY_NEAR ){
    +        assert( nKey==4 );
    +        if( zInput[4]=='/' && zInput[5]>='0' && zInput[5]<='9' ){
    +          nNear = 0;
    +          for(nKey=5; zInput[nKey]>='0' && zInput[nKey]<='9'; nKey++){
    +            nNear = nNear * 10 + (zInput[nKey] - '0');
    +          }
    +        }
    +      }
    +
    +      /* At this point this is probably a keyword. But for that to be true,
    +      ** the next byte must contain either whitespace, an open or close
    +      ** parenthesis, a quote character, or EOF. 
    +      */
    +      cNext = zInput[nKey];
    +      if( fts3isspace(cNext) 
    +       || cNext=='"' || cNext=='(' || cNext==')' || cNext==0
    +      ){
    +        pRet = (Fts3Expr *)sqlite3_malloc(sizeof(Fts3Expr));
    +        memset(pRet, 0, sizeof(Fts3Expr));
    +        pRet->eType = pKey->eType;
    +        pRet->nNear = nNear;
    +        *ppExpr = pRet;
    +        *pnConsumed = (zInput - z) + nKey;
    +        return SQLITE_OK;
    +      }
    +
    +      /* Turns out that wasn't a keyword after all. This happens if the
    +      ** user has supplied a token such as "ORacle". Continue.
    +      */
    +    }
    +  }
    +
    +  /* Check for an open bracket. */
    +  if( sqlite3_fts3_enable_parentheses ){
    +    if( *zInput=='(' ){
    +      int nConsumed;
    +      int rc;
    +      pParse->nNest++;
    +      rc = fts3ExprParse(pParse, &zInput[1], nInput-1, ppExpr, &nConsumed);
    +      if( rc==SQLITE_OK && !*ppExpr ){
    +        rc = SQLITE_DONE;
    +      }
    +      *pnConsumed = (zInput - z) + 1 + nConsumed;
    +      return rc;
    +    }
    +  
    +    /* Check for a close bracket. */
    +    if( *zInput==')' ){
    +      pParse->nNest--;
    +      *pnConsumed = (zInput - z) + 1;
    +      return SQLITE_DONE;
    +    }
    +  }
    +
    +  /* See if we are dealing with a quoted phrase. If this is the case, then
    +  ** search for the closing quote and pass the whole string to getNextString()
    +  ** for processing. This is easy to do, as fts3 has no syntax for escaping
    +  ** a quote character embedded in a string.
    +  */
    +  if( *zInput=='"' ){
    +    for(ii=1; ii<nInput && zInput[ii]!='"'; ii++);
    +    *pnConsumed = (zInput - z) + ii + 1;
    +    if( ii==nInput ){
    +      return SQLITE_ERROR;
    +    }
    +    return getNextString(pParse, &zInput[1], ii-1, ppExpr);
    +  }
    +
    +
    +  /* If control flows to this point, this must be a regular token, or 
    +  ** the end of the input. Read a regular token using the sqlite3_tokenizer
    +  ** interface. Before doing so, figure out if there is an explicit
    +  ** column specifier for the token. 
    +  **
    +  ** TODO: Strangely, it is not possible to associate a column specifier
    +  ** with a quoted phrase, only with a single token. Not sure if this was
    +  ** an implementation artifact or an intentional decision when fts3 was
    +  ** first implemented. Whichever it was, this module duplicates the 
    +  ** limitation.
    +  */
    +  iCol = pParse->iDefaultCol;
    +  iColLen = 0;
    +  for(ii=0; ii<pParse->nCol; ii++){
    +    const char *zStr = pParse->azCol[ii];
    +    int nStr = strlen(zStr);
    +    if( nInput>nStr && zInput[nStr]==':' 
    +     && sqlite3_strnicmp(zStr, zInput, nStr)==0 
    +    ){
    +      iCol = ii;
    +      iColLen = ((zInput - z) + nStr + 1);
    +      break;
    +    }
    +  }
    +  rc = getNextToken(pParse, iCol, &z[iColLen], n-iColLen, ppExpr, pnConsumed);
    +  *pnConsumed += iColLen;
    +  return rc;
    +}
    +
    +/*
    +** The argument is an Fts3Expr structure for a binary operator (any type
    +** except an FTSQUERY_PHRASE). Return an integer value representing the
    +** precedence of the operator. Lower values have a higher precedence (i.e.
    +** group more tightly). For example, in the C language, the == operator
    +** groups more tightly than ||, and would therefore have a higher precedence.
    +**
    +** When using the new fts3 query syntax (when SQLITE_ENABLE_FTS3_PARENTHESIS
    +** is defined), the order of the operators in precedence from highest to
    +** lowest is:
    +**
    +**   NEAR
    +**   NOT
    +**   AND (including implicit ANDs)
    +**   OR
    +**
    +** Note that when using the old query syntax, the OR operator has a higher
    +** precedence than the AND operator.
    +*/
    +static int opPrecedence(Fts3Expr *p){
    +  assert( p->eType!=FTSQUERY_PHRASE );
    +  if( sqlite3_fts3_enable_parentheses ){
    +    return p->eType;
    +  }else if( p->eType==FTSQUERY_NEAR ){
    +    return 1;
    +  }else if( p->eType==FTSQUERY_OR ){
    +    return 2;
    +  }
    +  assert( p->eType==FTSQUERY_AND );
    +  return 3;
    +}
    +
    +/*
    +** Argument ppHead contains a pointer to the current head of a query 
    +** expression tree being parsed. pPrev is the expression node most recently
    +** inserted into the tree. This function adds pNew, which is always a binary
    +** operator node, into the expression tree based on the relative precedence
    +** of pNew and the existing nodes of the tree. This may result in the head
    +** of the tree changing, in which case *ppHead is set to the new root node.
    +*/
    +static void insertBinaryOperator(
    +  Fts3Expr **ppHead,       /* Pointer to the root node of a tree */
    +  Fts3Expr *pPrev,         /* Node most recently inserted into the tree */
    +  Fts3Expr *pNew           /* New binary node to insert into expression tree */
    +){
    +  Fts3Expr *pSplit = pPrev;
    +  while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
    +    pSplit = pSplit->pParent;
    +  }
    +
    +  if( pSplit->pParent ){
    +    assert( pSplit->pParent->pRight==pSplit );
    +    pSplit->pParent->pRight = pNew;
    +    pNew->pParent = pSplit->pParent;
    +  }else{
    +    *ppHead = pNew;
    +  }
    +  pNew->pLeft = pSplit;
    +  pSplit->pParent = pNew;
    +}
    +
    +/*
    +** Parse the fts3 query expression found in buffer z, length n. This function
    +** returns either when the end of the buffer is reached or an unmatched 
    +** closing bracket - ')' - is encountered.
    +**
    +** If successful, SQLITE_OK is returned, *ppExpr is set to point to the
    +** parsed form of the expression and *pnConsumed is set to the number of
    +** bytes read from buffer z. Otherwise, *ppExpr is set to 0 and SQLITE_NOMEM
    +** (out of memory error) or SQLITE_ERROR (parse error) is returned.
    +*/
    +static int fts3ExprParse(
    +  ParseContext *pParse,                   /* fts3 query parse context */
    +  const char *z, int n,                   /* Text of MATCH query */
    +  Fts3Expr **ppExpr,                      /* OUT: Parsed query structure */
    +  int *pnConsumed                         /* OUT: Number of bytes consumed */
    +){
    +  Fts3Expr *pRet = 0;
    +  Fts3Expr *pPrev = 0;
    +  Fts3Expr *pNotBranch = 0;               /* Only used in legacy parse mode */
    +  int nIn = n;
    +  const char *zIn = z;
    +  int rc = SQLITE_OK;
    +  int isRequirePhrase = 1;
    +
    +  while( rc==SQLITE_OK ){
    +    Fts3Expr *p = 0;
    +    int nByte = 0;
    +    rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
    +    if( rc==SQLITE_OK ){
    +      int isPhrase;
    +
    +      if( !sqlite3_fts3_enable_parentheses 
    +       && p->eType==FTSQUERY_PHRASE && p->pPhrase->isNot 
    +      ){
    +        /* Create an implicit NOT operator. */
    +        Fts3Expr *pNot = sqlite3_malloc(sizeof(Fts3Expr));
    +        if( !pNot ){
    +          sqlite3Fts3ExprFree(p);
    +          rc = SQLITE_NOMEM;
    +          goto exprparse_out;
    +        }
    +        memset(pNot, 0, sizeof(Fts3Expr));
    +        pNot->eType = FTSQUERY_NOT;
    +        pNot->pRight = p;
    +        if( pNotBranch ){
    +          pNot->pLeft = pNotBranch;
    +        }
    +        pNotBranch = pNot;
    +        p = pPrev;
    +      }else{
    +        int eType = p->eType;
    +        assert( eType!=FTSQUERY_PHRASE || !p->pPhrase->isNot );
    +        isPhrase = (eType==FTSQUERY_PHRASE || p->pLeft);
    +
    +        /* The isRequirePhrase variable is set to true if a phrase or
    +        ** an expression contained in parenthesis is required. If a
    +        ** binary operator (AND, OR, NOT or NEAR) is encounted when
    +        ** isRequirePhrase is set, this is a syntax error.
    +        */
    +        if( !isPhrase && isRequirePhrase ){
    +          sqlite3Fts3ExprFree(p);
    +          rc = SQLITE_ERROR;
    +          goto exprparse_out;
    +        }
    +  
    +        if( isPhrase && !isRequirePhrase ){
    +          /* Insert an implicit AND operator. */
    +          Fts3Expr *pAnd;
    +          assert( pRet && pPrev );
    +          pAnd = sqlite3_malloc(sizeof(Fts3Expr));
    +          if( !pAnd ){
    +            sqlite3Fts3ExprFree(p);
    +            rc = SQLITE_NOMEM;
    +            goto exprparse_out;
    +          }
    +          memset(pAnd, 0, sizeof(Fts3Expr));
    +          pAnd->eType = FTSQUERY_AND;
    +          insertBinaryOperator(&pRet, pPrev, pAnd);
    +          pPrev = pAnd;
    +        }
    +
    +        /* This test catches attempts to make either operand of a NEAR
    +        ** operator something other than a phrase. For example, either of
    +        ** the following:
    +        **
    +        **    (bracketed expression) NEAR phrase
    +        **    phrase NEAR (bracketed expression)
    +        **
    +        ** Return an error in either case.
    +        */
    +        if( pPrev && (
    +            (eType==FTSQUERY_NEAR && !isPhrase && pPrev->eType!=FTSQUERY_PHRASE)
    +         || (eType!=FTSQUERY_PHRASE && isPhrase && pPrev->eType==FTSQUERY_NEAR)
    +        )){
    +          sqlite3Fts3ExprFree(p);
    +          rc = SQLITE_ERROR;
    +          goto exprparse_out;
    +        }
    +  
    +        if( isPhrase ){
    +          if( pRet ){
    +            assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );
    +            pPrev->pRight = p;
    +            p->pParent = pPrev;
    +          }else{
    +            pRet = p;
    +          }
    +        }else{
    +          insertBinaryOperator(&pRet, pPrev, p);
    +        }
    +        isRequirePhrase = !isPhrase;
    +      }
    +      assert( nByte>0 );
    +    }
    +    assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
    +    nIn -= nByte;
    +    zIn += nByte;
    +    pPrev = p;
    +  }
    +
    +  if( rc==SQLITE_DONE && pRet && isRequirePhrase ){
    +    rc = SQLITE_ERROR;
    +  }
    +
    +  if( rc==SQLITE_DONE ){
    +    rc = SQLITE_OK;
    +    if( !sqlite3_fts3_enable_parentheses && pNotBranch ){
    +      if( !pRet ){
    +        rc = SQLITE_ERROR;
    +      }else{
    +        Fts3Expr *pIter = pNotBranch;
    +        while( pIter->pLeft ){
    +          pIter = pIter->pLeft;
    +        }
    +        pIter->pLeft = pRet;
    +        pRet = pNotBranch;
    +      }
    +    }
    +  }
    +  *pnConsumed = n - nIn;
    +
    +exprparse_out:
    +  if( rc!=SQLITE_OK ){
    +    sqlite3Fts3ExprFree(pRet);
    +    sqlite3Fts3ExprFree(pNotBranch);
    +    pRet = 0;
    +  }
    +  *ppExpr = pRet;
    +  return rc;
    +}
    +
    +/*
    +** Parameters z and n contain a pointer to and length of a buffer containing
    +** an fts3 query expression, respectively. This function attempts to parse the
    +** query expression and create a tree of Fts3Expr structures representing the
    +** parsed expression. If successful, *ppExpr is set to point to the head
    +** of the parsed expression tree and SQLITE_OK is returned. If an error
    +** occurs, either SQLITE_NOMEM (out-of-memory error) or SQLITE_ERROR (parse
    +** error) is returned and *ppExpr is set to 0.
    +**
    +** If parameter n is a negative number, then z is assumed to point to a
    +** nul-terminated string and the length is determined using strlen().
    +**
    +** The first parameter, pTokenizer, is passed the fts3 tokenizer module to
    +** use to normalize query tokens while parsing the expression. The azCol[]
    +** array, which is assumed to contain nCol entries, should contain the names
    +** of each column in the target fts3 table, in order from left to right. 
    +** Column names must be nul-terminated strings.
    +**
    +** The iDefaultCol parameter should be passed the index of the table column
    +** that appears on the left-hand-side of the MATCH operator (the default
    +** column to match against for tokens for which a column name is not explicitly
    +** specified as part of the query string), or -1 if tokens may by default
    +** match any table column.
    +*/
    +SQLITE_PRIVATE int sqlite3Fts3ExprParse(
    +  sqlite3_tokenizer *pTokenizer,      /* Tokenizer module */
    +  char **azCol,                       /* Array of column names for fts3 table */
    +  int nCol,                           /* Number of entries in azCol[] */
    +  int iDefaultCol,                    /* Default column to query */
    +  const char *z, int n,               /* Text of MATCH query */
    +  Fts3Expr **ppExpr                   /* OUT: Parsed query structure */
    +){
    +  int nParsed;
    +  int rc;
    +  ParseContext sParse;
    +  sParse.pTokenizer = pTokenizer;
    +  sParse.azCol = (const char **)azCol;
    +  sParse.nCol = nCol;
    +  sParse.iDefaultCol = iDefaultCol;
    +  sParse.nNest = 0;
    +  if( z==0 ){
    +    *ppExpr = 0;
    +    return SQLITE_OK;
    +  }
    +  if( n<0 ){
    +    n = strlen(z);
    +  }
    +  rc = fts3ExprParse(&sParse, z, n, ppExpr, &nParsed);
    +
    +  /* Check for mismatched parenthesis */
    +  if( rc==SQLITE_OK && sParse.nNest ){
    +    rc = SQLITE_ERROR;
    +    sqlite3Fts3ExprFree(*ppExpr);
    +    *ppExpr = 0;
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** Free a parsed fts3 query expression allocated by sqlite3Fts3ExprParse().
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *p){
    +  if( p ){
    +    sqlite3Fts3ExprFree(p->pLeft);
    +    sqlite3Fts3ExprFree(p->pRight);
    +    sqlite3_free(p);
    +  }
    +}
    +
    +/****************************************************************************
    +*****************************************************************************
    +** Everything after this point is just test code.
    +*/
    +
    +#ifdef SQLITE_TEST
    +
    +
    +/*
    +** Function to query the hash-table of tokenizers (see README.tokenizers).
    +*/
    +static int queryTestTokenizer(
    +  sqlite3 *db, 
    +  const char *zName,  
    +  const sqlite3_tokenizer_module **pp
    +){
    +  int rc;
    +  sqlite3_stmt *pStmt;
    +  const char zSql[] = "SELECT fts3_tokenizer(?)";
    +
    +  *pp = 0;
    +  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
    +  if( SQLITE_ROW==sqlite3_step(pStmt) ){
    +    if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
    +      memcpy(pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
    +    }
    +  }
    +
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +/*
    +** This function is part of the test interface for the query parser. It
    +** writes a text representation of the query expression pExpr into the
    +** buffer pointed to by argument zBuf. It is assumed that zBuf is large 
    +** enough to store the required text representation.
    +*/
    +static void exprToString(Fts3Expr *pExpr, char *zBuf){
    +  switch( pExpr->eType ){
    +    case FTSQUERY_PHRASE: {
    +      Fts3Phrase *pPhrase = pExpr->pPhrase;
    +      int i;
    +      zBuf += sprintf(zBuf, "PHRASE %d %d", pPhrase->iColumn, pPhrase->isNot);
    +      for(i=0; i<pPhrase->nToken; i++){
    +        zBuf += sprintf(zBuf," %.*s",pPhrase->aToken[i].n,pPhrase->aToken[i].z);
    +        zBuf += sprintf(zBuf,"%s", (pPhrase->aToken[i].isPrefix?"+":""));
    +      }
    +      return;
    +    }
    +
    +    case FTSQUERY_NEAR:
    +      zBuf += sprintf(zBuf, "NEAR/%d ", pExpr->nNear);
    +      break;
    +    case FTSQUERY_NOT:
    +      zBuf += sprintf(zBuf, "NOT ");
    +      break;
    +    case FTSQUERY_AND:
    +      zBuf += sprintf(zBuf, "AND ");
    +      break;
    +    case FTSQUERY_OR:
    +      zBuf += sprintf(zBuf, "OR ");
    +      break;
    +  }
    +
    +  zBuf += sprintf(zBuf, "{");
    +  exprToString(pExpr->pLeft, zBuf);
    +  zBuf += strlen(zBuf);
    +  zBuf += sprintf(zBuf, "} ");
    +
    +  zBuf += sprintf(zBuf, "{");
    +  exprToString(pExpr->pRight, zBuf);
    +  zBuf += strlen(zBuf);
    +  zBuf += sprintf(zBuf, "}");
    +}
    +
    +/*
    +** This is the implementation of a scalar SQL function used to test the 
    +** expression parser. It should be called as follows:
    +**
    +**   fts3_exprtest(<tokenizer>, <expr>, <column 1>, ...);
    +**
    +** The first argument, <tokenizer>, is the name of the fts3 tokenizer used
    +** to parse the query expression (see README.tokenizers). The second argument
    +** is the query expression to parse. Each subsequent argument is the name
    +** of a column of the fts3 table that the query expression may refer to.
    +** For example:
    +**
    +**   SELECT fts3_exprtest('simple', 'Bill col2:Bloggs', 'col1', 'col2');
    +*/
    +static void fts3ExprTest(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  sqlite3_tokenizer_module const *pModule = 0;
    +  sqlite3_tokenizer *pTokenizer = 0;
    +  int rc;
    +  char **azCol = 0;
    +  const char *zExpr;
    +  int nExpr;
    +  int nCol;
    +  int ii;
    +  Fts3Expr *pExpr;
    +  sqlite3 *db = sqlite3_context_db_handle(context);
    +
    +  if( argc<3 ){
    +    sqlite3_result_error(context, 
    +        "Usage: fts3_exprtest(tokenizer, expr, col1, ...", -1
    +    );
    +    return;
    +  }
    +
    +  rc = queryTestTokenizer(db,
    +                          (const char *)sqlite3_value_text(argv[0]), &pModule);
    +  if( rc==SQLITE_NOMEM ){
    +    sqlite3_result_error_nomem(context);
    +    goto exprtest_out;
    +  }else if( !pModule ){
    +    sqlite3_result_error(context, "No such tokenizer module", -1);
    +    goto exprtest_out;
    +  }
    +
    +  rc = pModule->xCreate(0, 0, &pTokenizer);
    +  assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
    +  if( rc==SQLITE_NOMEM ){
    +    sqlite3_result_error_nomem(context);
    +    goto exprtest_out;
    +  }
    +  pTokenizer->pModule = pModule;
    +
    +  zExpr = (const char *)sqlite3_value_text(argv[1]);
    +  nExpr = sqlite3_value_bytes(argv[1]);
    +  nCol = argc-2;
    +  azCol = (char **)sqlite3_malloc(nCol*sizeof(char *));
    +  if( !azCol ){
    +    sqlite3_result_error_nomem(context);
    +    goto exprtest_out;
    +  }
    +  for(ii=0; ii<nCol; ii++){
    +    azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
    +  }
    +
    +  rc = sqlite3Fts3ExprParse(
    +      pTokenizer, azCol, nCol, nCol, zExpr, nExpr, &pExpr
    +  );
    +  if( rc==SQLITE_NOMEM ){
    +    sqlite3_result_error_nomem(context);
    +    goto exprtest_out;
    +  }else if( rc==SQLITE_OK ){
    +    char zBuf[4096];
    +    exprToString(pExpr, zBuf);
    +    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
    +    sqlite3Fts3ExprFree(pExpr);
    +  }else{
    +    sqlite3_result_error(context, "Error parsing expression", -1);
    +  }
    +
    +exprtest_out:
    +  if( pModule && pTokenizer ){
    +    rc = pModule->xDestroy(pTokenizer);
    +  }
    +  sqlite3_free(azCol);
    +}
    +
    +/*
    +** Register the query expression parser test function fts3_exprtest() 
    +** with database connection db. 
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3ExprInitTestInterface(sqlite3* db){
    +  sqlite3_create_function(
    +      db, "fts3_exprtest", -1, SQLITE_UTF8, 0, fts3ExprTest, 0, 0
    +  );
    +}
    +
    +#endif
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_expr.c *******************************************/
    +/************** Begin file fts3_hash.c ***************************************/
    +/*
    +** 2001 September 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This is the implementation of generic hash-tables used in SQLite.
    +** We've modified it slightly to serve as a standalone hash table
    +** implementation for the full-text indexing module.
    +*/
    +
    +/*
    +** The code in this file is only compiled if:
    +**
    +**     * The FTS3 module is being built as an extension
    +**       (in which case SQLITE_CORE is not defined), or
    +**
    +**     * The FTS3 module is being built into the core of
    +**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    +*/
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +
    +
    +/*
    +** Malloc and Free functions
    +*/
    +static void *fts3HashMalloc(int n){
    +  void *p = sqlite3_malloc(n);
    +  if( p ){
    +    memset(p, 0, n);
    +  }
    +  return p;
    +}
    +static void fts3HashFree(void *p){
    +  sqlite3_free(p);
    +}
    +
    +/* Turn bulk memory into a hash table object by initializing the
    +** fields of the Hash structure.
    +**
    +** "pNew" is a pointer to the hash table that is to be initialized.
    +** keyClass is one of the constants 
    +** FTS3_HASH_BINARY or FTS3_HASH_STRING.  The value of keyClass 
    +** determines what kind of key the hash table will use.  "copyKey" is
    +** true if the hash table should make its own private copy of keys and
    +** false if it should just use the supplied pointer.
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3HashInit(fts3Hash *pNew, int keyClass, int copyKey){
    +  assert( pNew!=0 );
    +  assert( keyClass>=FTS3_HASH_STRING && keyClass<=FTS3_HASH_BINARY );
    +  pNew->keyClass = keyClass;
    +  pNew->copyKey = copyKey;
    +  pNew->first = 0;
    +  pNew->count = 0;
    +  pNew->htsize = 0;
    +  pNew->ht = 0;
    +}
    +
    +/* Remove all entries from a hash table.  Reclaim all memory.
    +** Call this routine to delete a hash table or to reset a hash table
    +** to the empty state.
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3HashClear(fts3Hash *pH){
    +  fts3HashElem *elem;         /* For looping over all elements of the table */
    +
    +  assert( pH!=0 );
    +  elem = pH->first;
    +  pH->first = 0;
    +  fts3HashFree(pH->ht);
    +  pH->ht = 0;
    +  pH->htsize = 0;
    +  while( elem ){
    +    fts3HashElem *next_elem = elem->next;
    +    if( pH->copyKey && elem->pKey ){
    +      fts3HashFree(elem->pKey);
    +    }
    +    fts3HashFree(elem);
    +    elem = next_elem;
    +  }
    +  pH->count = 0;
    +}
    +
    +/*
    +** Hash and comparison functions when the mode is FTS3_HASH_STRING
    +*/
    +static int fts3StrHash(const void *pKey, int nKey){
    +  const char *z = (const char *)pKey;
    +  int h = 0;
    +  if( nKey<=0 ) nKey = (int) strlen(z);
    +  while( nKey > 0  ){
    +    h = (h<<3) ^ h ^ *z++;
    +    nKey--;
    +  }
    +  return h & 0x7fffffff;
    +}
    +static int fts3StrCompare(const void *pKey1, int n1, const void *pKey2, int n2){
    +  if( n1!=n2 ) return 1;
    +  return strncmp((const char*)pKey1,(const char*)pKey2,n1);
    +}
    +
    +/*
    +** Hash and comparison functions when the mode is FTS3_HASH_BINARY
    +*/
    +static int fts3BinHash(const void *pKey, int nKey){
    +  int h = 0;
    +  const char *z = (const char *)pKey;
    +  while( nKey-- > 0 ){
    +    h = (h<<3) ^ h ^ *(z++);
    +  }
    +  return h & 0x7fffffff;
    +}
    +static int fts3BinCompare(const void *pKey1, int n1, const void *pKey2, int n2){
    +  if( n1!=n2 ) return 1;
    +  return memcmp(pKey1,pKey2,n1);
    +}
    +
    +/*
    +** Return a pointer to the appropriate hash function given the key class.
    +**
    +** The C syntax in this function definition may be unfamilar to some 
    +** programmers, so we provide the following additional explanation:
    +**
    +** The name of the function is "ftsHashFunction".  The function takes a
    +** single parameter "keyClass".  The return value of ftsHashFunction()
    +** is a pointer to another function.  Specifically, the return value
    +** of ftsHashFunction() is a pointer to a function that takes two parameters
    +** with types "const void*" and "int" and returns an "int".
    +*/
    +static int (*ftsHashFunction(int keyClass))(const void*,int){
    +  if( keyClass==FTS3_HASH_STRING ){
    +    return &fts3StrHash;
    +  }else{
    +    assert( keyClass==FTS3_HASH_BINARY );
    +    return &fts3BinHash;
    +  }
    +}
    +
    +/*
    +** Return a pointer to the appropriate hash function given the key class.
    +**
    +** For help in interpreted the obscure C code in the function definition,
    +** see the header comment on the previous function.
    +*/
    +static int (*ftsCompareFunction(int keyClass))(const void*,int,const void*,int){
    +  if( keyClass==FTS3_HASH_STRING ){
    +    return &fts3StrCompare;
    +  }else{
    +    assert( keyClass==FTS3_HASH_BINARY );
    +    return &fts3BinCompare;
    +  }
    +}
    +
    +/* Link an element into the hash table
    +*/
    +static void fts3HashInsertElement(
    +  fts3Hash *pH,            /* The complete hash table */
    +  struct _fts3ht *pEntry,  /* The entry into which pNew is inserted */
    +  fts3HashElem *pNew       /* The element to be inserted */
    +){
    +  fts3HashElem *pHead;     /* First element already in pEntry */
    +  pHead = pEntry->chain;
    +  if( pHead ){
    +    pNew->next = pHead;
    +    pNew->prev = pHead->prev;
    +    if( pHead->prev ){ pHead->prev->next = pNew; }
    +    else             { pH->first = pNew; }
    +    pHead->prev = pNew;
    +  }else{
    +    pNew->next = pH->first;
    +    if( pH->first ){ pH->first->prev = pNew; }
    +    pNew->prev = 0;
    +    pH->first = pNew;
    +  }
    +  pEntry->count++;
    +  pEntry->chain = pNew;
    +}
    +
    +
    +/* Resize the hash table so that it cantains "new_size" buckets.
    +** "new_size" must be a power of 2.  The hash table might fail 
    +** to resize if sqliteMalloc() fails.
    +*/
    +static void fts3Rehash(fts3Hash *pH, int new_size){
    +  struct _fts3ht *new_ht;          /* The new hash table */
    +  fts3HashElem *elem, *next_elem;  /* For looping over existing elements */
    +  int (*xHash)(const void*,int);   /* The hash function */
    +
    +  assert( (new_size & (new_size-1))==0 );
    +  new_ht = (struct _fts3ht *)fts3HashMalloc( new_size*sizeof(struct _fts3ht) );
    +  if( new_ht==0 ) return;
    +  fts3HashFree(pH->ht);
    +  pH->ht = new_ht;
    +  pH->htsize = new_size;
    +  xHash = ftsHashFunction(pH->keyClass);
    +  for(elem=pH->first, pH->first=0; elem; elem = next_elem){
    +    int h = (*xHash)(elem->pKey, elem->nKey) & (new_size-1);
    +    next_elem = elem->next;
    +    fts3HashInsertElement(pH, &new_ht[h], elem);
    +  }
    +}
    +
    +/* This function (for internal use only) locates an element in an
    +** hash table that matches the given key.  The hash for this key has
    +** already been computed and is passed as the 4th parameter.
    +*/
    +static fts3HashElem *fts3FindElementByHash(
    +  const fts3Hash *pH, /* The pH to be searched */
    +  const void *pKey,   /* The key we are searching for */
    +  int nKey,
    +  int h               /* The hash for this key. */
    +){
    +  fts3HashElem *elem;            /* Used to loop thru the element list */
    +  int count;                     /* Number of elements left to test */
    +  int (*xCompare)(const void*,int,const void*,int);  /* comparison function */
    +
    +  if( pH->ht ){
    +    struct _fts3ht *pEntry = &pH->ht[h];
    +    elem = pEntry->chain;
    +    count = pEntry->count;
    +    xCompare = ftsCompareFunction(pH->keyClass);
    +    while( count-- && elem ){
    +      if( (*xCompare)(elem->pKey,elem->nKey,pKey,nKey)==0 ){ 
    +        return elem;
    +      }
    +      elem = elem->next;
    +    }
    +  }
    +  return 0;
    +}
    +
    +/* Remove a single entry from the hash table given a pointer to that
    +** element and a hash on the element's key.
    +*/
    +static void fts3RemoveElementByHash(
    +  fts3Hash *pH,         /* The pH containing "elem" */
    +  fts3HashElem* elem,   /* The element to be removed from the pH */
    +  int h                 /* Hash value for the element */
    +){
    +  struct _fts3ht *pEntry;
    +  if( elem->prev ){
    +    elem->prev->next = elem->next; 
    +  }else{
    +    pH->first = elem->next;
    +  }
    +  if( elem->next ){
    +    elem->next->prev = elem->prev;
    +  }
    +  pEntry = &pH->ht[h];
    +  if( pEntry->chain==elem ){
    +    pEntry->chain = elem->next;
    +  }
    +  pEntry->count--;
    +  if( pEntry->count<=0 ){
    +    pEntry->chain = 0;
    +  }
    +  if( pH->copyKey && elem->pKey ){
    +    fts3HashFree(elem->pKey);
    +  }
    +  fts3HashFree( elem );
    +  pH->count--;
    +  if( pH->count<=0 ){
    +    assert( pH->first==0 );
    +    assert( pH->count==0 );
    +    fts3HashClear(pH);
    +  }
    +}
    +
    +/* Attempt to locate an element of the hash table pH with a key
    +** that matches pKey,nKey.  Return the data for this element if it is
    +** found, or NULL if there is no match.
    +*/
    +SQLITE_PRIVATE void *sqlite3Fts3HashFind(const fts3Hash *pH, const void *pKey, int nKey){
    +  int h;                 /* A hash on key */
    +  fts3HashElem *elem;    /* The element that matches key */
    +  int (*xHash)(const void*,int);  /* The hash function */
    +
    +  if( pH==0 || pH->ht==0 ) return 0;
    +  xHash = ftsHashFunction(pH->keyClass);
    +  assert( xHash!=0 );
    +  h = (*xHash)(pKey,nKey);
    +  assert( (pH->htsize & (pH->htsize-1))==0 );
    +  elem = fts3FindElementByHash(pH,pKey,nKey, h & (pH->htsize-1));
    +  return elem ? elem->data : 0;
    +}
    +
    +/* Insert an element into the hash table pH.  The key is pKey,nKey
    +** and the data is "data".
    +**
    +** If no element exists with a matching key, then a new
    +** element is created.  A copy of the key is made if the copyKey
    +** flag is set.  NULL is returned.
    +**
    +** If another element already exists with the same key, then the
    +** new data replaces the old data and the old data is returned.
    +** The key is not copied in this instance.  If a malloc fails, then
    +** the new data is returned and the hash table is unchanged.
    +**
    +** If the "data" parameter to this function is NULL, then the
    +** element corresponding to "key" is removed from the hash table.
    +*/
    +SQLITE_PRIVATE void *sqlite3Fts3HashInsert(
    +  fts3Hash *pH,        /* The hash table to insert into */
    +  const void *pKey,    /* The key */
    +  int nKey,            /* Number of bytes in the key */
    +  void *data           /* The data */
    +){
    +  int hraw;                 /* Raw hash value of the key */
    +  int h;                    /* the hash of the key modulo hash table size */
    +  fts3HashElem *elem;       /* Used to loop thru the element list */
    +  fts3HashElem *new_elem;   /* New element added to the pH */
    +  int (*xHash)(const void*,int);  /* The hash function */
    +
    +  assert( pH!=0 );
    +  xHash = ftsHashFunction(pH->keyClass);
    +  assert( xHash!=0 );
    +  hraw = (*xHash)(pKey, nKey);
    +  assert( (pH->htsize & (pH->htsize-1))==0 );
    +  h = hraw & (pH->htsize-1);
    +  elem = fts3FindElementByHash(pH,pKey,nKey,h);
    +  if( elem ){
    +    void *old_data = elem->data;
    +    if( data==0 ){
    +      fts3RemoveElementByHash(pH,elem,h);
    +    }else{
    +      elem->data = data;
    +    }
    +    return old_data;
    +  }
    +  if( data==0 ) return 0;
    +  if( pH->htsize==0 ){
    +    fts3Rehash(pH,8);
    +    if( pH->htsize==0 ){
    +      pH->count = 0;
    +      return data;
    +    }
    +  }
    +  new_elem = (fts3HashElem*)fts3HashMalloc( sizeof(fts3HashElem) );
    +  if( new_elem==0 ) return data;
    +  if( pH->copyKey && pKey!=0 ){
    +    new_elem->pKey = fts3HashMalloc( nKey );
    +    if( new_elem->pKey==0 ){
    +      fts3HashFree(new_elem);
    +      return data;
    +    }
    +    memcpy((void*)new_elem->pKey, pKey, nKey);
    +  }else{
    +    new_elem->pKey = (void*)pKey;
    +  }
    +  new_elem->nKey = nKey;
    +  pH->count++;
    +  if( pH->count > pH->htsize ){
    +    fts3Rehash(pH,pH->htsize*2);
    +  }
    +  assert( pH->htsize>0 );
    +  assert( (pH->htsize & (pH->htsize-1))==0 );
    +  h = hraw & (pH->htsize-1);
    +  fts3HashInsertElement(pH, &pH->ht[h], new_elem);
    +  new_elem->data = data;
    +  return 0;
    +}
    +
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_hash.c *******************************************/
    +/************** Begin file fts3_porter.c *************************************/
    +/*
    +** 2006 September 30
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** Implementation of the full-text-search tokenizer that implements
    +** a Porter stemmer.
    +*/
    +
    +/*
    +** The code in this file is only compiled if:
    +**
    +**     * The FTS3 module is being built as an extension
    +**       (in which case SQLITE_CORE is not defined), or
    +**
    +**     * The FTS3 module is being built into the core of
    +**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    +*/
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +
    +
    +
    +/*
    +** Class derived from sqlite3_tokenizer
    +*/
    +typedef struct porter_tokenizer {
    +  sqlite3_tokenizer base;      /* Base class */
    +} porter_tokenizer;
    +
    +/*
    +** Class derived from sqlit3_tokenizer_cursor
    +*/
    +typedef struct porter_tokenizer_cursor {
    +  sqlite3_tokenizer_cursor base;
    +  const char *zInput;          /* input we are tokenizing */
    +  int nInput;                  /* size of the input */
    +  int iOffset;                 /* current position in zInput */
    +  int iToken;                  /* index of next token to be returned */
    +  char *zToken;                /* storage for current token */
    +  int nAllocated;              /* space allocated to zToken buffer */
    +} porter_tokenizer_cursor;
    +
    +
    +/* Forward declaration */
    +static const sqlite3_tokenizer_module porterTokenizerModule;
    +
    +
    +/*
    +** Create a new tokenizer instance.
    +*/
    +static int porterCreate(
    +  int argc, const char * const *argv,
    +  sqlite3_tokenizer **ppTokenizer
    +){
    +  porter_tokenizer *t;
    +  t = (porter_tokenizer *) sqlite3_malloc(sizeof(*t));
    +  if( t==NULL ) return SQLITE_NOMEM;
    +  memset(t, 0, sizeof(*t));
    +  *ppTokenizer = &t->base;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Destroy a tokenizer
    +*/
    +static int porterDestroy(sqlite3_tokenizer *pTokenizer){
    +  sqlite3_free(pTokenizer);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Prepare to begin tokenizing a particular string.  The input
    +** string to be tokenized is zInput[0..nInput-1].  A cursor
    +** used to incrementally tokenize this string is returned in 
    +** *ppCursor.
    +*/
    +static int porterOpen(
    +  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
    +  const char *zInput, int nInput,        /* String to be tokenized */
    +  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
    +){
    +  porter_tokenizer_cursor *c;
    +
    +  c = (porter_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));
    +  if( c==NULL ) return SQLITE_NOMEM;
    +
    +  c->zInput = zInput;
    +  if( zInput==0 ){
    +    c->nInput = 0;
    +  }else if( nInput<0 ){
    +    c->nInput = (int)strlen(zInput);
    +  }else{
    +    c->nInput = nInput;
    +  }
    +  c->iOffset = 0;                 /* start tokenizing at the beginning */
    +  c->iToken = 0;
    +  c->zToken = NULL;               /* no space allocated, yet. */
    +  c->nAllocated = 0;
    +
    +  *ppCursor = &c->base;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close a tokenization cursor previously opened by a call to
    +** porterOpen() above.
    +*/
    +static int porterClose(sqlite3_tokenizer_cursor *pCursor){
    +  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;
    +  sqlite3_free(c->zToken);
    +  sqlite3_free(c);
    +  return SQLITE_OK;
    +}
    +/*
    +** Vowel or consonant
    +*/
    +static const char cType[] = {
    +   0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,
    +   1, 1, 1, 2, 1
    +};
    +
    +/*
    +** isConsonant() and isVowel() determine if their first character in
    +** the string they point to is a consonant or a vowel, according
    +** to Porter ruls.  
    +**
    +** A consonate is any letter other than 'a', 'e', 'i', 'o', or 'u'.
    +** 'Y' is a consonant unless it follows another consonant,
    +** in which case it is a vowel.
    +**
    +** In these routine, the letters are in reverse order.  So the 'y' rule
    +** is that 'y' is a consonant unless it is followed by another
    +** consonent.
    +*/
    +static int isVowel(const char*);
    +static int isConsonant(const char *z){
    +  int j;
    +  char x = *z;
    +  if( x==0 ) return 0;
    +  assert( x>='a' && x<='z' );
    +  j = cType[x-'a'];
    +  if( j<2 ) return j;
    +  return z[1]==0 || isVowel(z + 1);
    +}
    +static int isVowel(const char *z){
    +  int j;
    +  char x = *z;
    +  if( x==0 ) return 0;
    +  assert( x>='a' && x<='z' );
    +  j = cType[x-'a'];
    +  if( j<2 ) return 1-j;
    +  return isConsonant(z + 1);
    +}
    +
    +/*
    +** Let any sequence of one or more vowels be represented by V and let
    +** C be sequence of one or more consonants.  Then every word can be
    +** represented as:
    +**
    +**           [C] (VC){m} [V]
    +**
    +** In prose:  A word is an optional consonant followed by zero or
    +** vowel-consonant pairs followed by an optional vowel.  "m" is the
    +** number of vowel consonant pairs.  This routine computes the value
    +** of m for the first i bytes of a word.
    +**
    +** Return true if the m-value for z is 1 or more.  In other words,
    +** return true if z contains at least one vowel that is followed
    +** by a consonant.
    +**
    +** In this routine z[] is in reverse order.  So we are really looking
    +** for an instance of of a consonant followed by a vowel.
    +*/
    +static int m_gt_0(const char *z){
    +  while( isVowel(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isConsonant(z) ){ z++; }
    +  return *z!=0;
    +}
    +
    +/* Like mgt0 above except we are looking for a value of m which is
    +** exactly 1
    +*/
    +static int m_eq_1(const char *z){
    +  while( isVowel(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isConsonant(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isVowel(z) ){ z++; }
    +  if( *z==0 ) return 1;
    +  while( isConsonant(z) ){ z++; }
    +  return *z==0;
    +}
    +
    +/* Like mgt0 above except we are looking for a value of m>1 instead
    +** or m>0
    +*/
    +static int m_gt_1(const char *z){
    +  while( isVowel(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isConsonant(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isVowel(z) ){ z++; }
    +  if( *z==0 ) return 0;
    +  while( isConsonant(z) ){ z++; }
    +  return *z!=0;
    +}
    +
    +/*
    +** Return TRUE if there is a vowel anywhere within z[0..n-1]
    +*/
    +static int hasVowel(const char *z){
    +  while( isConsonant(z) ){ z++; }
    +  return *z!=0;
    +}
    +
    +/*
    +** Return TRUE if the word ends in a double consonant.
    +**
    +** The text is reversed here. So we are really looking at
    +** the first two characters of z[].
    +*/
    +static int doubleConsonant(const char *z){
    +  return isConsonant(z) && z[0]==z[1] && isConsonant(z+1);
    +}
    +
    +/*
    +** Return TRUE if the word ends with three letters which
    +** are consonant-vowel-consonent and where the final consonant
    +** is not 'w', 'x', or 'y'.
    +**
    +** The word is reversed here.  So we are really checking the
    +** first three letters and the first one cannot be in [wxy].
    +*/
    +static int star_oh(const char *z){
    +  return
    +    z[0]!=0 && isConsonant(z) &&
    +    z[0]!='w' && z[0]!='x' && z[0]!='y' &&
    +    z[1]!=0 && isVowel(z+1) &&
    +    z[2]!=0 && isConsonant(z+2);
    +}
    +
    +/*
    +** If the word ends with zFrom and xCond() is true for the stem
    +** of the word that preceeds the zFrom ending, then change the 
    +** ending to zTo.
    +**
    +** The input word *pz and zFrom are both in reverse order.  zTo
    +** is in normal order. 
    +**
    +** Return TRUE if zFrom matches.  Return FALSE if zFrom does not
    +** match.  Not that TRUE is returned even if xCond() fails and
    +** no substitution occurs.
    +*/
    +static int stem(
    +  char **pz,             /* The word being stemmed (Reversed) */
    +  const char *zFrom,     /* If the ending matches this... (Reversed) */
    +  const char *zTo,       /* ... change the ending to this (not reversed) */
    +  int (*xCond)(const char*)   /* Condition that must be true */
    +){
    +  char *z = *pz;
    +  while( *zFrom && *zFrom==*z ){ z++; zFrom++; }
    +  if( *zFrom!=0 ) return 0;
    +  if( xCond && !xCond(z) ) return 1;
    +  while( *zTo ){
    +    *(--z) = *(zTo++);
    +  }
    +  *pz = z;
    +  return 1;
    +}
    +
    +/*
    +** This is the fallback stemmer used when the porter stemmer is
    +** inappropriate.  The input word is copied into the output with
    +** US-ASCII case folding.  If the input word is too long (more
    +** than 20 bytes if it contains no digits or more than 6 bytes if
    +** it contains digits) then word is truncated to 20 or 6 bytes
    +** by taking 10 or 3 bytes from the beginning and end.
    +*/
    +static void copy_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
    +  int i, mx, j;
    +  int hasDigit = 0;
    +  for(i=0; i<nIn; i++){
    +    int c = zIn[i];
    +    if( c>='A' && c<='Z' ){
    +      zOut[i] = c - 'A' + 'a';
    +    }else{
    +      if( c>='0' && c<='9' ) hasDigit = 1;
    +      zOut[i] = c;
    +    }
    +  }
    +  mx = hasDigit ? 3 : 10;
    +  if( nIn>mx*2 ){
    +    for(j=mx, i=nIn-mx; i<nIn; i++, j++){
    +      zOut[j] = zOut[i];
    +    }
    +    i = j;
    +  }
    +  zOut[i] = 0;
    +  *pnOut = i;
    +}
    +
    +
    +/*
    +** Stem the input word zIn[0..nIn-1].  Store the output in zOut.
    +** zOut is at least big enough to hold nIn bytes.  Write the actual
    +** size of the output word (exclusive of the '\0' terminator) into *pnOut.
    +**
    +** Any upper-case characters in the US-ASCII character set ([A-Z])
    +** are converted to lower case.  Upper-case UTF characters are
    +** unchanged.
    +**
    +** Words that are longer than about 20 bytes are stemmed by retaining
    +** a few bytes from the beginning and the end of the word.  If the
    +** word contains digits, 3 bytes are taken from the beginning and
    +** 3 bytes from the end.  For long words without digits, 10 bytes
    +** are taken from each end.  US-ASCII case folding still applies.
    +** 
    +** If the input word contains not digits but does characters not 
    +** in [a-zA-Z] then no stemming is attempted and this routine just 
    +** copies the input into the input into the output with US-ASCII
    +** case folding.
    +**
    +** Stemming never increases the length of the word.  So there is
    +** no chance of overflowing the zOut buffer.
    +*/
    +static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
    +  int i, j, c;
    +  char zReverse[28];
    +  char *z, *z2;
    +  if( nIn<3 || nIn>=sizeof(zReverse)-7 ){
    +    /* The word is too big or too small for the porter stemmer.
    +    ** Fallback to the copy stemmer */
    +    copy_stemmer(zIn, nIn, zOut, pnOut);
    +    return;
    +  }
    +  for(i=0, j=sizeof(zReverse)-6; i<nIn; i++, j--){
    +    c = zIn[i];
    +    if( c>='A' && c<='Z' ){
    +      zReverse[j] = c + 'a' - 'A';
    +    }else if( c>='a' && c<='z' ){
    +      zReverse[j] = c;
    +    }else{
    +      /* The use of a character not in [a-zA-Z] means that we fallback
    +      ** to the copy stemmer */
    +      copy_stemmer(zIn, nIn, zOut, pnOut);
    +      return;
    +    }
    +  }
    +  memset(&zReverse[sizeof(zReverse)-5], 0, 5);
    +  z = &zReverse[j+1];
    +
    +
    +  /* Step 1a */
    +  if( z[0]=='s' ){
    +    if(
    +     !stem(&z, "sess", "ss", 0) &&
    +     !stem(&z, "sei", "i", 0)  &&
    +     !stem(&z, "ss", "ss", 0)
    +    ){
    +      z++;
    +    }
    +  }
    +
    +  /* Step 1b */  
    +  z2 = z;
    +  if( stem(&z, "dee", "ee", m_gt_0) ){
    +    /* Do nothing.  The work was all in the test */
    +  }else if( 
    +     (stem(&z, "gni", "", hasVowel) || stem(&z, "de", "", hasVowel))
    +      && z!=z2
    +  ){
    +     if( stem(&z, "ta", "ate", 0) ||
    +         stem(&z, "lb", "ble", 0) ||
    +         stem(&z, "zi", "ize", 0) ){
    +       /* Do nothing.  The work was all in the test */
    +     }else if( doubleConsonant(z) && (*z!='l' && *z!='s' && *z!='z') ){
    +       z++;
    +     }else if( m_eq_1(z) && star_oh(z) ){
    +       *(--z) = 'e';
    +     }
    +  }
    +
    +  /* Step 1c */
    +  if( z[0]=='y' && hasVowel(z+1) ){
    +    z[0] = 'i';
    +  }
    +
    +  /* Step 2 */
    +  switch( z[1] ){
    +   case 'a':
    +     stem(&z, "lanoita", "ate", m_gt_0) ||
    +     stem(&z, "lanoit", "tion", m_gt_0);
    +     break;
    +   case 'c':
    +     stem(&z, "icne", "ence", m_gt_0) ||
    +     stem(&z, "icna", "ance", m_gt_0);
    +     break;
    +   case 'e':
    +     stem(&z, "rezi", "ize", m_gt_0);
    +     break;
    +   case 'g':
    +     stem(&z, "igol", "log", m_gt_0);
    +     break;
    +   case 'l':
    +     stem(&z, "ilb", "ble", m_gt_0) ||
    +     stem(&z, "illa", "al", m_gt_0) ||
    +     stem(&z, "iltne", "ent", m_gt_0) ||
    +     stem(&z, "ile", "e", m_gt_0) ||
    +     stem(&z, "ilsuo", "ous", m_gt_0);
    +     break;
    +   case 'o':
    +     stem(&z, "noitazi", "ize", m_gt_0) ||
    +     stem(&z, "noita", "ate", m_gt_0) ||
    +     stem(&z, "rota", "ate", m_gt_0);
    +     break;
    +   case 's':
    +     stem(&z, "msila", "al", m_gt_0) ||
    +     stem(&z, "ssenevi", "ive", m_gt_0) ||
    +     stem(&z, "ssenluf", "ful", m_gt_0) ||
    +     stem(&z, "ssensuo", "ous", m_gt_0);
    +     break;
    +   case 't':
    +     stem(&z, "itila", "al", m_gt_0) ||
    +     stem(&z, "itivi", "ive", m_gt_0) ||
    +     stem(&z, "itilib", "ble", m_gt_0);
    +     break;
    +  }
    +
    +  /* Step 3 */
    +  switch( z[0] ){
    +   case 'e':
    +     stem(&z, "etaci", "ic", m_gt_0) ||
    +     stem(&z, "evita", "", m_gt_0)   ||
    +     stem(&z, "ezila", "al", m_gt_0);
    +     break;
    +   case 'i':
    +     stem(&z, "itici", "ic", m_gt_0);
    +     break;
    +   case 'l':
    +     stem(&z, "laci", "ic", m_gt_0) ||
    +     stem(&z, "luf", "", m_gt_0);
    +     break;
    +   case 's':
    +     stem(&z, "ssen", "", m_gt_0);
    +     break;
    +  }
    +
    +  /* Step 4 */
    +  switch( z[1] ){
    +   case 'a':
    +     if( z[0]=='l' && m_gt_1(z+2) ){
    +       z += 2;
    +     }
    +     break;
    +   case 'c':
    +     if( z[0]=='e' && z[2]=='n' && (z[3]=='a' || z[3]=='e')  && m_gt_1(z+4)  ){
    +       z += 4;
    +     }
    +     break;
    +   case 'e':
    +     if( z[0]=='r' && m_gt_1(z+2) ){
    +       z += 2;
    +     }
    +     break;
    +   case 'i':
    +     if( z[0]=='c' && m_gt_1(z+2) ){
    +       z += 2;
    +     }
    +     break;
    +   case 'l':
    +     if( z[0]=='e' && z[2]=='b' && (z[3]=='a' || z[3]=='i') && m_gt_1(z+4) ){
    +       z += 4;
    +     }
    +     break;
    +   case 'n':
    +     if( z[0]=='t' ){
    +       if( z[2]=='a' ){
    +         if( m_gt_1(z+3) ){
    +           z += 3;
    +         }
    +       }else if( z[2]=='e' ){
    +         stem(&z, "tneme", "", m_gt_1) ||
    +         stem(&z, "tnem", "", m_gt_1) ||
    +         stem(&z, "tne", "", m_gt_1);
    +       }
    +     }
    +     break;
    +   case 'o':
    +     if( z[0]=='u' ){
    +       if( m_gt_1(z+2) ){
    +         z += 2;
    +       }
    +     }else if( z[3]=='s' || z[3]=='t' ){
    +       stem(&z, "noi", "", m_gt_1);
    +     }
    +     break;
    +   case 's':
    +     if( z[0]=='m' && z[2]=='i' && m_gt_1(z+3) ){
    +       z += 3;
    +     }
    +     break;
    +   case 't':
    +     stem(&z, "eta", "", m_gt_1) ||
    +     stem(&z, "iti", "", m_gt_1);
    +     break;
    +   case 'u':
    +     if( z[0]=='s' && z[2]=='o' && m_gt_1(z+3) ){
    +       z += 3;
    +     }
    +     break;
    +   case 'v':
    +   case 'z':
    +     if( z[0]=='e' && z[2]=='i' && m_gt_1(z+3) ){
    +       z += 3;
    +     }
    +     break;
    +  }
    +
    +  /* Step 5a */
    +  if( z[0]=='e' ){
    +    if( m_gt_1(z+1) ){
    +      z++;
    +    }else if( m_eq_1(z+1) && !star_oh(z+1) ){
    +      z++;
    +    }
    +  }
    +
    +  /* Step 5b */
    +  if( m_gt_1(z) && z[0]=='l' && z[1]=='l' ){
    +    z++;
    +  }
    +
    +  /* z[] is now the stemmed word in reverse order.  Flip it back
    +  ** around into forward order and return.
    +  */
    +  *pnOut = i = strlen(z);
    +  zOut[i] = 0;
    +  while( *z ){
    +    zOut[--i] = *(z++);
    +  }
    +}
    +
    +/*
    +** Characters that can be part of a token.  We assume any character
    +** whose value is greater than 0x80 (any UTF character) can be
    +** part of a token.  In other words, delimiters all must have
    +** values of 0x7f or lower.
    +*/
    +static const char porterIdChar[] = {
    +/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */
    +    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */
    +    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */
    +};
    +#define isDelim(C) (((ch=C)&0x80)==0 && (ch<0x30 || !porterIdChar[ch-0x30]))
    +
    +/*
    +** Extract the next token from a tokenization cursor.  The cursor must
    +** have been opened by a prior call to porterOpen().
    +*/
    +static int porterNext(
    +  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by porterOpen */
    +  const char **pzToken,               /* OUT: *pzToken is the token text */
    +  int *pnBytes,                       /* OUT: Number of bytes in token */
    +  int *piStartOffset,                 /* OUT: Starting offset of token */
    +  int *piEndOffset,                   /* OUT: Ending offset of token */
    +  int *piPosition                     /* OUT: Position integer of token */
    +){
    +  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;
    +  const char *z = c->zInput;
    +
    +  while( c->iOffset<c->nInput ){
    +    int iStartOffset, ch;
    +
    +    /* Scan past delimiter characters */
    +    while( c->iOffset<c->nInput && isDelim(z[c->iOffset]) ){
    +      c->iOffset++;
    +    }
    +
    +    /* Count non-delimiter characters. */
    +    iStartOffset = c->iOffset;
    +    while( c->iOffset<c->nInput && !isDelim(z[c->iOffset]) ){
    +      c->iOffset++;
    +    }
    +
    +    if( c->iOffset>iStartOffset ){
    +      int n = c->iOffset-iStartOffset;
    +      if( n>c->nAllocated ){
    +        c->nAllocated = n+20;
    +        c->zToken = sqlite3_realloc(c->zToken, c->nAllocated);
    +        if( c->zToken==NULL ) return SQLITE_NOMEM;
    +      }
    +      porter_stemmer(&z[iStartOffset], n, c->zToken, pnBytes);
    +      *pzToken = c->zToken;
    +      *piStartOffset = iStartOffset;
    +      *piEndOffset = c->iOffset;
    +      *piPosition = c->iToken++;
    +      return SQLITE_OK;
    +    }
    +  }
    +  return SQLITE_DONE;
    +}
    +
    +/*
    +** The set of routines that implement the porter-stemmer tokenizer
    +*/
    +static const sqlite3_tokenizer_module porterTokenizerModule = {
    +  0,
    +  porterCreate,
    +  porterDestroy,
    +  porterOpen,
    +  porterClose,
    +  porterNext,
    +};
    +
    +/*
    +** Allocate a new porter tokenizer.  Return a pointer to the new
    +** tokenizer in *ppModule
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(
    +  sqlite3_tokenizer_module const**ppModule
    +){
    +  *ppModule = &porterTokenizerModule;
    +}
    +
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_porter.c *****************************************/
    +/************** Begin file fts3_tokenizer.c **********************************/
    +/*
    +** 2007 June 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** This is part of an SQLite module implementing full-text search.
    +** This particular file implements the generic tokenizer interface.
    +*/
    +
    +/*
    +** The code in this file is only compiled if:
    +**
    +**     * The FTS3 module is being built as an extension
    +**       (in which case SQLITE_CORE is not defined), or
    +**
    +**     * The FTS3 module is being built into the core of
    +**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    +*/
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +#ifndef SQLITE_CORE
    +  SQLITE_EXTENSION_INIT1
    +#endif
    +
    +
    +/*
    +** Implementation of the SQL scalar function for accessing the underlying 
    +** hash table. This function may be called as follows:
    +**
    +**   SELECT <function-name>(<key-name>);
    +**   SELECT <function-name>(<key-name>, <pointer>);
    +**
    +** where <function-name> is the name passed as the second argument
    +** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer').
    +**
    +** If the <pointer> argument is specified, it must be a blob value
    +** containing a pointer to be stored as the hash data corresponding
    +** to the string <key-name>. If <pointer> is not specified, then
    +** the string <key-name> must already exist in the has table. Otherwise,
    +** an error is returned.
    +**
    +** Whether or not the <pointer> argument is specified, the value returned
    +** is a blob containing the pointer stored as the hash data corresponding
    +** to string <key-name> (after the hash-table is updated, if applicable).
    +*/
    +static void scalarFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  fts3Hash *pHash;
    +  void *pPtr = 0;
    +  const unsigned char *zName;
    +  int nName;
    +
    +  assert( argc==1 || argc==2 );
    +
    +  pHash = (fts3Hash *)sqlite3_user_data(context);
    +
    +  zName = sqlite3_value_text(argv[0]);
    +  nName = sqlite3_value_bytes(argv[0])+1;
    +
    +  if( argc==2 ){
    +    void *pOld;
    +    int n = sqlite3_value_bytes(argv[1]);
    +    if( n!=sizeof(pPtr) ){
    +      sqlite3_result_error(context, "argument type mismatch", -1);
    +      return;
    +    }
    +    pPtr = *(void **)sqlite3_value_blob(argv[1]);
    +    pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
    +    if( pOld==pPtr ){
    +      sqlite3_result_error(context, "out of memory", -1);
    +      return;
    +    }
    +  }else{
    +    pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
    +    if( !pPtr ){
    +      char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
    +      sqlite3_result_error(context, zErr, -1);
    +      sqlite3_free(zErr);
    +      return;
    +    }
    +  }
    +
    +  sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
    +}
    +
    +#ifdef SQLITE_TEST
    +
    +
    +/*
    +** Implementation of a special SQL scalar function for testing tokenizers 
    +** designed to be used in concert with the Tcl testing framework. This
    +** function must be called with two arguments:
    +**
    +**   SELECT <function-name>(<key-name>, <input-string>);
    +**   SELECT <function-name>(<key-name>, <pointer>);
    +**
    +** where <function-name> is the name passed as the second argument
    +** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
    +** concatenated with the string '_test' (e.g. 'fts3_tokenizer_test').
    +**
    +** The return value is a string that may be interpreted as a Tcl
    +** list. For each token in the <input-string>, three elements are
    +** added to the returned list. The first is the token position, the 
    +** second is the token text (folded, stemmed, etc.) and the third is the
    +** substring of <input-string> associated with the token. For example, 
    +** using the built-in "simple" tokenizer:
    +**
    +**   SELECT fts_tokenizer_test('simple', 'I don't see how');
    +**
    +** will return the string:
    +**
    +**   "{0 i I 1 dont don't 2 see see 3 how how}"
    +**   
    +*/
    +static void testFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  fts3Hash *pHash;
    +  sqlite3_tokenizer_module *p;
    +  sqlite3_tokenizer *pTokenizer = 0;
    +  sqlite3_tokenizer_cursor *pCsr = 0;
    +
    +  const char *zErr = 0;
    +
    +  const char *zName;
    +  int nName;
    +  const char *zInput;
    +  int nInput;
    +
    +  const char *zArg = 0;
    +
    +  const char *zToken;
    +  int nToken;
    +  int iStart;
    +  int iEnd;
    +  int iPos;
    +
    +  Tcl_Obj *pRet;
    +
    +  assert( argc==2 || argc==3 );
    +
    +  nName = sqlite3_value_bytes(argv[0]);
    +  zName = (const char *)sqlite3_value_text(argv[0]);
    +  nInput = sqlite3_value_bytes(argv[argc-1]);
    +  zInput = (const char *)sqlite3_value_text(argv[argc-1]);
    +
    +  if( argc==3 ){
    +    zArg = (const char *)sqlite3_value_text(argv[1]);
    +  }
    +
    +  pHash = (fts3Hash *)sqlite3_user_data(context);
    +  p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
    +
    +  if( !p ){
    +    char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
    +    sqlite3_result_error(context, zErr, -1);
    +    sqlite3_free(zErr);
    +    return;
    +  }
    +
    +  pRet = Tcl_NewObj();
    +  Tcl_IncrRefCount(pRet);
    +
    +  if( SQLITE_OK!=p->xCreate(zArg ? 1 : 0, &zArg, &pTokenizer) ){
    +    zErr = "error in xCreate()";
    +    goto finish;
    +  }
    +  pTokenizer->pModule = p;
    +  if( SQLITE_OK!=p->xOpen(pTokenizer, zInput, nInput, &pCsr) ){
    +    zErr = "error in xOpen()";
    +    goto finish;
    +  }
    +  pCsr->pTokenizer = pTokenizer;
    +
    +  while( SQLITE_OK==p->xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos) ){
    +    Tcl_ListObjAppendElement(0, pRet, Tcl_NewIntObj(iPos));
    +    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
    +    zToken = &zInput[iStart];
    +    nToken = iEnd-iStart;
    +    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
    +  }
    +
    +  if( SQLITE_OK!=p->xClose(pCsr) ){
    +    zErr = "error in xClose()";
    +    goto finish;
    +  }
    +  if( SQLITE_OK!=p->xDestroy(pTokenizer) ){
    +    zErr = "error in xDestroy()";
    +    goto finish;
    +  }
    +
    +finish:
    +  if( zErr ){
    +    sqlite3_result_error(context, zErr, -1);
    +  }else{
    +    sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT);
    +  }
    +  Tcl_DecrRefCount(pRet);
    +}
    +
    +static
    +int registerTokenizer(
    +  sqlite3 *db, 
    +  char *zName, 
    +  const sqlite3_tokenizer_module *p
    +){
    +  int rc;
    +  sqlite3_stmt *pStmt;
    +  const char zSql[] = "SELECT fts3_tokenizer(?, ?)";
    +
    +  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
    +  sqlite3_bind_blob(pStmt, 2, &p, sizeof(p), SQLITE_STATIC);
    +  sqlite3_step(pStmt);
    +
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +static
    +int queryTokenizer(
    +  sqlite3 *db, 
    +  char *zName,  
    +  const sqlite3_tokenizer_module **pp
    +){
    +  int rc;
    +  sqlite3_stmt *pStmt;
    +  const char zSql[] = "SELECT fts3_tokenizer(?)";
    +
    +  *pp = 0;
    +  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
    +  if( SQLITE_ROW==sqlite3_step(pStmt) ){
    +    if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
    +      memcpy(pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
    +    }
    +  }
    +
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
    +
    +/*
    +** Implementation of the scalar function fts3_tokenizer_internal_test().
    +** This function is used for testing only, it is not included in the
    +** build unless SQLITE_TEST is defined.
    +**
    +** The purpose of this is to test that the fts3_tokenizer() function
    +** can be used as designed by the C-code in the queryTokenizer and
    +** registerTokenizer() functions above. These two functions are repeated
    +** in the README.tokenizer file as an example, so it is important to
    +** test them.
    +**
    +** To run the tests, evaluate the fts3_tokenizer_internal_test() scalar
    +** function with no arguments. An assert() will fail if a problem is
    +** detected. i.e.:
    +**
    +**     SELECT fts3_tokenizer_internal_test();
    +**
    +*/
    +static void intTestFunc(
    +  sqlite3_context *context,
    +  int argc,
    +  sqlite3_value **argv
    +){
    +  int rc;
    +  const sqlite3_tokenizer_module *p1;
    +  const sqlite3_tokenizer_module *p2;
    +  sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
    +
    +  /* Test the query function */
    +  sqlite3Fts3SimpleTokenizerModule(&p1);
    +  rc = queryTokenizer(db, "simple", &p2);
    +  assert( rc==SQLITE_OK );
    +  assert( p1==p2 );
    +  rc = queryTokenizer(db, "nosuchtokenizer", &p2);
    +  assert( rc==SQLITE_ERROR );
    +  assert( p2==0 );
    +  assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
    +
    +  /* Test the storage function */
    +  rc = registerTokenizer(db, "nosuchtokenizer", p1);
    +  assert( rc==SQLITE_OK );
    +  rc = queryTokenizer(db, "nosuchtokenizer", &p2);
    +  assert( rc==SQLITE_OK );
    +  assert( p2==p1 );
    +
    +  sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
    +}
    +
    +#endif
    +
    +/*
    +** Set up SQL objects in database db used to access the contents of
    +** the hash table pointed to by argument pHash. The hash table must
    +** been initialised to use string keys, and to take a private copy 
    +** of the key when a value is inserted. i.e. by a call similar to:
    +**
    +**    sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
    +**
    +** This function adds a scalar function (see header comment above
    +** scalarFunc() in this file for details) and, if ENABLE_TABLE is
    +** defined at compilation time, a temporary virtual table (see header 
    +** comment above struct HashTableVtab) to the database schema. Both 
    +** provide read/write access to the contents of *pHash.
    +**
    +** The third argument to this function, zName, is used as the name
    +** of both the scalar and, if created, the virtual table.
    +*/
    +SQLITE_PRIVATE int sqlite3Fts3InitHashTable(
    +  sqlite3 *db, 
    +  fts3Hash *pHash, 
    +  const char *zName
    +){
    +  int rc = SQLITE_OK;
    +  void *p = (void *)pHash;
    +  const int any = SQLITE_ANY;
    +  char *zTest = 0;
    +  char *zTest2 = 0;
    +
    +#ifdef SQLITE_TEST
    +  void *pdb = (void *)db;
    +  zTest = sqlite3_mprintf("%s_test", zName);
    +  zTest2 = sqlite3_mprintf("%s_internal_test", zName);
    +  if( !zTest || !zTest2 ){
    +    rc = SQLITE_NOMEM;
    +  }
    +#endif
    +
    +  if( rc!=SQLITE_OK
    +   || (rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0))
    +   || (rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0))
    +#ifdef SQLITE_TEST
    +   || (rc = sqlite3_create_function(db, zTest, 2, any, p, testFunc, 0, 0))
    +   || (rc = sqlite3_create_function(db, zTest, 3, any, p, testFunc, 0, 0))
    +   || (rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0))
    +#endif
    +  );
    +
    +  sqlite3_free(zTest);
    +  sqlite3_free(zTest2);
    +  return rc;
    +}
    +
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_tokenizer.c **************************************/
    +/************** Begin file fts3_tokenizer1.c *********************************/
    +/*
    +** 2006 Oct 10
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +******************************************************************************
    +**
    +** Implementation of the "simple" full-text-search tokenizer.
    +*/
    +
    +/*
    +** The code in this file is only compiled if:
    +**
    +**     * The FTS3 module is being built as an extension
    +**       (in which case SQLITE_CORE is not defined), or
    +**
    +**     * The FTS3 module is being built into the core of
    +**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    +*/
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +
    +
    +
    +
    +typedef struct simple_tokenizer {
    +  sqlite3_tokenizer base;
    +  char delim[128];             /* flag ASCII delimiters */
    +} simple_tokenizer;
    +
    +typedef struct simple_tokenizer_cursor {
    +  sqlite3_tokenizer_cursor base;
    +  const char *pInput;          /* input we are tokenizing */
    +  int nBytes;                  /* size of the input */
    +  int iOffset;                 /* current position in pInput */
    +  int iToken;                  /* index of next token to be returned */
    +  char *pToken;                /* storage for current token */
    +  int nTokenAllocated;         /* space allocated to zToken buffer */
    +} simple_tokenizer_cursor;
    +
    +
    +/* Forward declaration */
    +static const sqlite3_tokenizer_module simpleTokenizerModule;
    +
    +static int simpleDelim(simple_tokenizer *t, unsigned char c){
    +  return c<0x80 && t->delim[c];
    +}
    +
    +/*
    +** Create a new tokenizer instance.
    +*/
    +static int simpleCreate(
    +  int argc, const char * const *argv,
    +  sqlite3_tokenizer **ppTokenizer
    +){
    +  simple_tokenizer *t;
    +
    +  t = (simple_tokenizer *) sqlite3_malloc(sizeof(*t));
    +  if( t==NULL ) return SQLITE_NOMEM;
    +  memset(t, 0, sizeof(*t));
    +
    +  /* TODO(shess) Delimiters need to remain the same from run to run,
    +  ** else we need to reindex.  One solution would be a meta-table to
    +  ** track such information in the database, then we'd only want this
    +  ** information on the initial create.
    +  */
    +  if( argc>1 ){
    +    int i, n = strlen(argv[1]);
    +    for(i=0; i<n; i++){
    +      unsigned char ch = argv[1][i];
    +      /* We explicitly don't support UTF-8 delimiters for now. */
    +      if( ch>=0x80 ){
    +        sqlite3_free(t);
    +        return SQLITE_ERROR;
    +      }
    +      t->delim[ch] = 1;
    +    }
    +  } else {
    +    /* Mark non-alphanumeric ASCII characters as delimiters */
    +    int i;
    +    for(i=1; i<0x80; i++){
    +      t->delim[i] = !isalnum(i);
    +    }
    +  }
    +
    +  *ppTokenizer = &t->base;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Destroy a tokenizer
    +*/
    +static int simpleDestroy(sqlite3_tokenizer *pTokenizer){
    +  sqlite3_free(pTokenizer);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Prepare to begin tokenizing a particular string.  The input
    +** string to be tokenized is pInput[0..nBytes-1].  A cursor
    +** used to incrementally tokenize this string is returned in 
    +** *ppCursor.
    +*/
    +static int simpleOpen(
    +  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
    +  const char *pInput, int nBytes,        /* String to be tokenized */
    +  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
    +){
    +  simple_tokenizer_cursor *c;
    +
    +  c = (simple_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));
    +  if( c==NULL ) return SQLITE_NOMEM;
    +
    +  c->pInput = pInput;
    +  if( pInput==0 ){
    +    c->nBytes = 0;
    +  }else if( nBytes<0 ){
    +    c->nBytes = (int)strlen(pInput);
    +  }else{
    +    c->nBytes = nBytes;
    +  }
    +  c->iOffset = 0;                 /* start tokenizing at the beginning */
    +  c->iToken = 0;
    +  c->pToken = NULL;               /* no space allocated, yet. */
    +  c->nTokenAllocated = 0;
    +
    +  *ppCursor = &c->base;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close a tokenization cursor previously opened by a call to
    +** simpleOpen() above.
    +*/
    +static int simpleClose(sqlite3_tokenizer_cursor *pCursor){
    +  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;
    +  sqlite3_free(c->pToken);
    +  sqlite3_free(c);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Extract the next token from a tokenization cursor.  The cursor must
    +** have been opened by a prior call to simpleOpen().
    +*/
    +static int simpleNext(
    +  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */
    +  const char **ppToken,               /* OUT: *ppToken is the token text */
    +  int *pnBytes,                       /* OUT: Number of bytes in token */
    +  int *piStartOffset,                 /* OUT: Starting offset of token */
    +  int *piEndOffset,                   /* OUT: Ending offset of token */
    +  int *piPosition                     /* OUT: Position integer of token */
    +){
    +  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;
    +  simple_tokenizer *t = (simple_tokenizer *) pCursor->pTokenizer;
    +  unsigned char *p = (unsigned char *)c->pInput;
    +
    +  while( c->iOffset<c->nBytes ){
    +    int iStartOffset;
    +
    +    /* Scan past delimiter characters */
    +    while( c->iOffset<c->nBytes && simpleDelim(t, p[c->iOffset]) ){
    +      c->iOffset++;
    +    }
    +
    +    /* Count non-delimiter characters. */
    +    iStartOffset = c->iOffset;
    +    while( c->iOffset<c->nBytes && !simpleDelim(t, p[c->iOffset]) ){
    +      c->iOffset++;
    +    }
    +
    +    if( c->iOffset>iStartOffset ){
    +      int i, n = c->iOffset-iStartOffset;
    +      if( n>c->nTokenAllocated ){
    +        c->nTokenAllocated = n+20;
    +        c->pToken = sqlite3_realloc(c->pToken, c->nTokenAllocated);
    +        if( c->pToken==NULL ) return SQLITE_NOMEM;
    +      }
    +      for(i=0; i<n; i++){
    +        /* TODO(shess) This needs expansion to handle UTF-8
    +        ** case-insensitivity.
    +        */
    +        unsigned char ch = p[iStartOffset+i];
    +        c->pToken[i] = ch<0x80 ? tolower(ch) : ch;
    +      }
    +      *ppToken = c->pToken;
    +      *pnBytes = n;
    +      *piStartOffset = iStartOffset;
    +      *piEndOffset = c->iOffset;
    +      *piPosition = c->iToken++;
    +
    +      return SQLITE_OK;
    +    }
    +  }
    +  return SQLITE_DONE;
    +}
    +
    +/*
    +** The set of routines that implement the simple tokenizer
    +*/
    +static const sqlite3_tokenizer_module simpleTokenizerModule = {
    +  0,
    +  simpleCreate,
    +  simpleDestroy,
    +  simpleOpen,
    +  simpleClose,
    +  simpleNext,
    +};
    +
    +/*
    +** Allocate a new simple tokenizer.  Return a pointer to the new
    +** tokenizer in *ppModule
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
    +  sqlite3_tokenizer_module const**ppModule
    +){
    +  *ppModule = &simpleTokenizerModule;
    +}
    +
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_tokenizer1.c *************************************/
    +/************** Begin file rtree.c *******************************************/
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file contains code for implementations of the r-tree and r*-tree
    +** algorithms packaged as an SQLite virtual table module.
    +**
    +** $Id: rtree.c,v 1.14 2009/08/06 18:36:47 danielk1977 Exp $
    +*/
    +
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
    +
    +/*
    +** This file contains an implementation of a couple of different variants
    +** of the r-tree algorithm. See the README file for further details. The 
    +** same data-structure is used for all, but the algorithms for insert and
    +** delete operations vary. The variants used are selected at compile time 
    +** by defining the following symbols:
    +*/
    +
    +/* Either, both or none of the following may be set to activate 
    +** r*tree variant algorithms.
    +*/
    +#define VARIANT_RSTARTREE_CHOOSESUBTREE 0
    +#define VARIANT_RSTARTREE_REINSERT      1
    +
    +/* 
    +** Exactly one of the following must be set to 1.
    +*/
    +#define VARIANT_GUTTMAN_QUADRATIC_SPLIT 0
    +#define VARIANT_GUTTMAN_LINEAR_SPLIT    0
    +#define VARIANT_RSTARTREE_SPLIT         1
    +
    +#define VARIANT_GUTTMAN_SPLIT \
    +        (VARIANT_GUTTMAN_LINEAR_SPLIT||VARIANT_GUTTMAN_QUADRATIC_SPLIT)
    +
    +#if VARIANT_GUTTMAN_QUADRATIC_SPLIT
    +  #define PickNext QuadraticPickNext
    +  #define PickSeeds QuadraticPickSeeds
    +  #define AssignCells splitNodeGuttman
    +#endif
    +#if VARIANT_GUTTMAN_LINEAR_SPLIT
    +  #define PickNext LinearPickNext
    +  #define PickSeeds LinearPickSeeds
    +  #define AssignCells splitNodeGuttman
    +#endif
    +#if VARIANT_RSTARTREE_SPLIT
    +  #define AssignCells splitNodeStartree
    +#endif
    +
    +
    +#ifndef SQLITE_CORE
    +  SQLITE_EXTENSION_INIT1
    +#else
    +#endif
    +
    +
    +#ifndef SQLITE_AMALGAMATION
    +typedef sqlite3_int64 i64;
    +typedef unsigned char u8;
    +typedef unsigned int u32;
    +#endif
    +
    +typedef struct Rtree Rtree;
    +typedef struct RtreeCursor RtreeCursor;
    +typedef struct RtreeNode RtreeNode;
    +typedef struct RtreeCell RtreeCell;
    +typedef struct RtreeConstraint RtreeConstraint;
    +typedef union RtreeCoord RtreeCoord;
    +
    +/* The rtree may have between 1 and RTREE_MAX_DIMENSIONS dimensions. */
    +#define RTREE_MAX_DIMENSIONS 5
    +
    +/* Size of hash table Rtree.aHash. This hash table is not expected to
    +** ever contain very many entries, so a fixed number of buckets is 
    +** used.
    +*/
    +#define HASHSIZE 128
    +
    +/* 
    +** An rtree virtual-table object.
    +*/
    +struct Rtree {
    +  sqlite3_vtab base;
    +  sqlite3 *db;                /* Host database connection */
    +  int iNodeSize;              /* Size in bytes of each node in the node table */
    +  int nDim;                   /* Number of dimensions */
    +  int nBytesPerCell;          /* Bytes consumed per cell */
    +  int iDepth;                 /* Current depth of the r-tree structure */
    +  char *zDb;                  /* Name of database containing r-tree table */
    +  char *zName;                /* Name of r-tree table */ 
    +  RtreeNode *aHash[HASHSIZE]; /* Hash table of in-memory nodes. */ 
    +  int nBusy;                  /* Current number of users of this structure */
    +
    +  /* List of nodes removed during a CondenseTree operation. List is
    +  ** linked together via the pointer normally used for hash chains -
    +  ** RtreeNode.pNext. RtreeNode.iNode stores the depth of the sub-tree 
    +  ** headed by the node (leaf nodes have RtreeNode.iNode==0).
    +  */
    +  RtreeNode *pDeleted;
    +  int iReinsertHeight;        /* Height of sub-trees Reinsert() has run on */
    +
    +  /* Statements to read/write/delete a record from xxx_node */
    +  sqlite3_stmt *pReadNode;
    +  sqlite3_stmt *pWriteNode;
    +  sqlite3_stmt *pDeleteNode;
    +
    +  /* Statements to read/write/delete a record from xxx_rowid */
    +  sqlite3_stmt *pReadRowid;
    +  sqlite3_stmt *pWriteRowid;
    +  sqlite3_stmt *pDeleteRowid;
    +
    +  /* Statements to read/write/delete a record from xxx_parent */
    +  sqlite3_stmt *pReadParent;
    +  sqlite3_stmt *pWriteParent;
    +  sqlite3_stmt *pDeleteParent;
    +
    +  int eCoordType;
    +};
    +
    +/* Possible values for eCoordType: */
    +#define RTREE_COORD_REAL32 0
    +#define RTREE_COORD_INT32  1
    +
    +/*
    +** The minimum number of cells allowed for a node is a third of the 
    +** maximum. In Gutman's notation:
    +**
    +**     m = M/3
    +**
    +** If an R*-tree "Reinsert" operation is required, the same number of
    +** cells are removed from the overfull node and reinserted into the tree.
    +*/
    +#define RTREE_MINCELLS(p) ((((p)->iNodeSize-4)/(p)->nBytesPerCell)/3)
    +#define RTREE_REINSERT(p) RTREE_MINCELLS(p)
    +#define RTREE_MAXCELLS 51
    +
    +/* 
    +** An rtree cursor object.
    +*/
    +struct RtreeCursor {
    +  sqlite3_vtab_cursor base;
    +  RtreeNode *pNode;                 /* Node cursor is currently pointing at */
    +  int iCell;                        /* Index of current cell in pNode */
    +  int iStrategy;                    /* Copy of idxNum search parameter */
    +  int nConstraint;                  /* Number of entries in aConstraint */
    +  RtreeConstraint *aConstraint;     /* Search constraints. */
    +};
    +
    +union RtreeCoord {
    +  float f;
    +  int i;
    +};
    +
    +/*
    +** The argument is an RtreeCoord. Return the value stored within the RtreeCoord
    +** formatted as a double. This macro assumes that local variable pRtree points
    +** to the Rtree structure associated with the RtreeCoord.
    +*/
    +#define DCOORD(coord) (                           \
    +  (pRtree->eCoordType==RTREE_COORD_REAL32) ?      \
    +    ((double)coord.f) :                           \
    +    ((double)coord.i)                             \
    +)
    +
    +/*
    +** A search constraint.
    +*/
    +struct RtreeConstraint {
    +  int iCoord;                       /* Index of constrained coordinate */
    +  int op;                           /* Constraining operation */
    +  double rValue;                    /* Constraint value. */
    +};
    +
    +/* Possible values for RtreeConstraint.op */
    +#define RTREE_EQ 0x41
    +#define RTREE_LE 0x42
    +#define RTREE_LT 0x43
    +#define RTREE_GE 0x44
    +#define RTREE_GT 0x45
    +
    +/* 
    +** An rtree structure node.
    +**
    +** Data format (RtreeNode.zData):
    +**
    +**   1. If the node is the root node (node 1), then the first 2 bytes
    +**      of the node contain the tree depth as a big-endian integer.
    +**      For non-root nodes, the first 2 bytes are left unused.
    +**
    +**   2. The next 2 bytes contain the number of entries currently 
    +**      stored in the node.
    +**
    +**   3. The remainder of the node contains the node entries. Each entry
    +**      consists of a single 8-byte integer followed by an even number
    +**      of 4-byte coordinates. For leaf nodes the integer is the rowid
    +**      of a record. For internal nodes it is the node number of a
    +**      child page.
    +*/
    +struct RtreeNode {
    +  RtreeNode *pParent;               /* Parent node */
    +  i64 iNode;
    +  int nRef;
    +  int isDirty;
    +  u8 *zData;
    +  RtreeNode *pNext;                 /* Next node in this hash chain */
    +};
    +#define NCELL(pNode) readInt16(&(pNode)->zData[2])
    +
    +/* 
    +** Structure to store a deserialized rtree record.
    +*/
    +struct RtreeCell {
    +  i64 iRowid;
    +  RtreeCoord aCoord[RTREE_MAX_DIMENSIONS*2];
    +};
    +
    +#ifndef MAX
    +# define MAX(x,y) ((x) < (y) ? (y) : (x))
    +#endif
    +#ifndef MIN
    +# define MIN(x,y) ((x) > (y) ? (y) : (x))
    +#endif
    +
    +/*
    +** Functions to deserialize a 16 bit integer, 32 bit real number and
    +** 64 bit integer. The deserialized value is returned.
    +*/
    +static int readInt16(u8 *p){
    +  return (p[0]<<8) + p[1];
    +}
    +static void readCoord(u8 *p, RtreeCoord *pCoord){
    +  u32 i = (
    +    (((u32)p[0]) << 24) + 
    +    (((u32)p[1]) << 16) + 
    +    (((u32)p[2]) <<  8) + 
    +    (((u32)p[3]) <<  0)
    +  );
    +  *(u32 *)pCoord = i;
    +}
    +static i64 readInt64(u8 *p){
    +  return (
    +    (((i64)p[0]) << 56) + 
    +    (((i64)p[1]) << 48) + 
    +    (((i64)p[2]) << 40) + 
    +    (((i64)p[3]) << 32) + 
    +    (((i64)p[4]) << 24) + 
    +    (((i64)p[5]) << 16) + 
    +    (((i64)p[6]) <<  8) + 
    +    (((i64)p[7]) <<  0)
    +  );
    +}
    +
    +/*
    +** Functions to serialize a 16 bit integer, 32 bit real number and
    +** 64 bit integer. The value returned is the number of bytes written
    +** to the argument buffer (always 2, 4 and 8 respectively).
    +*/
    +static int writeInt16(u8 *p, int i){
    +  p[0] = (i>> 8)&0xFF;
    +  p[1] = (i>> 0)&0xFF;
    +  return 2;
    +}
    +static int writeCoord(u8 *p, RtreeCoord *pCoord){
    +  u32 i;
    +  assert( sizeof(RtreeCoord)==4 );
    +  assert( sizeof(u32)==4 );
    +  i = *(u32 *)pCoord;
    +  p[0] = (i>>24)&0xFF;
    +  p[1] = (i>>16)&0xFF;
    +  p[2] = (i>> 8)&0xFF;
    +  p[3] = (i>> 0)&0xFF;
    +  return 4;
    +}
    +static int writeInt64(u8 *p, i64 i){
    +  p[0] = (i>>56)&0xFF;
    +  p[1] = (i>>48)&0xFF;
    +  p[2] = (i>>40)&0xFF;
    +  p[3] = (i>>32)&0xFF;
    +  p[4] = (i>>24)&0xFF;
    +  p[5] = (i>>16)&0xFF;
    +  p[6] = (i>> 8)&0xFF;
    +  p[7] = (i>> 0)&0xFF;
    +  return 8;
    +}
    +
    +/*
    +** Increment the reference count of node p.
    +*/
    +static void nodeReference(RtreeNode *p){
    +  if( p ){
    +    p->nRef++;
    +  }
    +}
    +
    +/*
    +** Clear the content of node p (set all bytes to 0x00).
    +*/
    +static void nodeZero(Rtree *pRtree, RtreeNode *p){
    +  if( p ){
    +    memset(&p->zData[2], 0, pRtree->iNodeSize-2);
    +    p->isDirty = 1;
    +  }
    +}
    +
    +/*
    +** Given a node number iNode, return the corresponding key to use
    +** in the Rtree.aHash table.
    +*/
    +static int nodeHash(i64 iNode){
    +  return (
    +    (iNode>>56) ^ (iNode>>48) ^ (iNode>>40) ^ (iNode>>32) ^ 
    +    (iNode>>24) ^ (iNode>>16) ^ (iNode>> 8) ^ (iNode>> 0)
    +  ) % HASHSIZE;
    +}
    +
    +/*
    +** Search the node hash table for node iNode. If found, return a pointer
    +** to it. Otherwise, return 0.
    +*/
    +static RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){
    +  RtreeNode *p;
    +  assert( iNode!=0 );
    +  for(p=pRtree->aHash[nodeHash(iNode)]; p && p->iNode!=iNode; p=p->pNext);
    +  return p;
    +}
    +
    +/*
    +** Add node pNode to the node hash table.
    +*/
    +static void nodeHashInsert(Rtree *pRtree, RtreeNode *pNode){
    +  if( pNode ){
    +    int iHash;
    +    assert( pNode->pNext==0 );
    +    iHash = nodeHash(pNode->iNode);
    +    pNode->pNext = pRtree->aHash[iHash];
    +    pRtree->aHash[iHash] = pNode;
    +  }
    +}
    +
    +/*
    +** Remove node pNode from the node hash table.
    +*/
    +static void nodeHashDelete(Rtree *pRtree, RtreeNode *pNode){
    +  RtreeNode **pp;
    +  if( pNode->iNode!=0 ){
    +    pp = &pRtree->aHash[nodeHash(pNode->iNode)];
    +    for( ; (*pp)!=pNode; pp = &(*pp)->pNext){ assert(*pp); }
    +    *pp = pNode->pNext;
    +    pNode->pNext = 0;
    +  }
    +}
    +
    +/*
    +** Allocate and return new r-tree node. Initially, (RtreeNode.iNode==0),
    +** indicating that node has not yet been assigned a node number. It is
    +** assigned a node number when nodeWrite() is called to write the
    +** node contents out to the database.
    +*/
    +static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent, int zero){
    +  RtreeNode *pNode;
    +  pNode = (RtreeNode *)sqlite3_malloc(sizeof(RtreeNode) + pRtree->iNodeSize);
    +  if( pNode ){
    +    memset(pNode, 0, sizeof(RtreeNode) + (zero?pRtree->iNodeSize:0));
    +    pNode->zData = (u8 *)&pNode[1];
    +    pNode->nRef = 1;
    +    pNode->pParent = pParent;
    +    pNode->isDirty = 1;
    +    nodeReference(pParent);
    +  }
    +  return pNode;
    +}
    +
    +/*
    +** Obtain a reference to an r-tree node.
    +*/
    +static int
    +nodeAcquire(
    +  Rtree *pRtree,             /* R-tree structure */
    +  i64 iNode,                 /* Node number to load */
    +  RtreeNode *pParent,        /* Either the parent node or NULL */
    +  RtreeNode **ppNode         /* OUT: Acquired node */
    +){
    +  int rc;
    +  RtreeNode *pNode;
    +
    +  /* Check if the requested node is already in the hash table. If so,
    +  ** increase its reference count and return it.
    +  */
    +  if( (pNode = nodeHashLookup(pRtree, iNode)) ){
    +    assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
    +    if( pParent && !pNode->pParent ){
    +      nodeReference(pParent);
    +      pNode->pParent = pParent;
    +    }
    +    pNode->nRef++;
    +    *ppNode = pNode;
    +    return SQLITE_OK;
    +  }
    +
    +  pNode = (RtreeNode *)sqlite3_malloc(sizeof(RtreeNode) + pRtree->iNodeSize);
    +  if( !pNode ){
    +    *ppNode = 0;
    +    return SQLITE_NOMEM;
    +  }
    +  pNode->pParent = pParent;
    +  pNode->zData = (u8 *)&pNode[1];
    +  pNode->nRef = 1;
    +  pNode->iNode = iNode;
    +  pNode->isDirty = 0;
    +  pNode->pNext = 0;
    +
    +  sqlite3_bind_int64(pRtree->pReadNode, 1, iNode);
    +  rc = sqlite3_step(pRtree->pReadNode);
    +  if( rc==SQLITE_ROW ){
    +    const u8 *zBlob = sqlite3_column_blob(pRtree->pReadNode, 0);
    +    memcpy(pNode->zData, zBlob, pRtree->iNodeSize);
    +    nodeReference(pParent);
    +  }else{
    +    sqlite3_free(pNode);
    +    pNode = 0;
    +  }
    +
    +  *ppNode = pNode;
    +  rc = sqlite3_reset(pRtree->pReadNode);
    +
    +  if( rc==SQLITE_OK && iNode==1 ){
    +    pRtree->iDepth = readInt16(pNode->zData);
    +  }
    +
    +  assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) );
    +  nodeHashInsert(pRtree, pNode);
    +
    +  return rc;
    +}
    +
    +/*
    +** Overwrite cell iCell of node pNode with the contents of pCell.
    +*/
    +static void nodeOverwriteCell(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode,  
    +  RtreeCell *pCell, 
    +  int iCell
    +){
    +  int ii;
    +  u8 *p = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];
    +  p += writeInt64(p, pCell->iRowid);
    +  for(ii=0; ii<(pRtree->nDim*2); ii++){
    +    p += writeCoord(p, &pCell->aCoord[ii]);
    +  }
    +  pNode->isDirty = 1;
    +}
    +
    +/*
    +** Remove cell the cell with index iCell from node pNode.
    +*/
    +static void nodeDeleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell){
    +  u8 *pDst = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];
    +  u8 *pSrc = &pDst[pRtree->nBytesPerCell];
    +  int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
    +  memmove(pDst, pSrc, nByte);
    +  writeInt16(&pNode->zData[2], NCELL(pNode)-1);
    +  pNode->isDirty = 1;
    +}
    +
    +/*
    +** Insert the contents of cell pCell into node pNode. If the insert
    +** is successful, return SQLITE_OK.
    +**
    +** If there is not enough free space in pNode, return SQLITE_FULL.
    +*/
    +static int
    +nodeInsertCell(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode, 
    +  RtreeCell *pCell 
    +){
    +  int nCell;                    /* Current number of cells in pNode */
    +  int nMaxCell;                 /* Maximum number of cells for pNode */
    +
    +  nMaxCell = (pRtree->iNodeSize-4)/pRtree->nBytesPerCell;
    +  nCell = NCELL(pNode);
    +
    +  assert(nCell<=nMaxCell);
    +
    +  if( nCell<nMaxCell ){
    +    nodeOverwriteCell(pRtree, pNode, pCell, nCell);
    +    writeInt16(&pNode->zData[2], nCell+1);
    +    pNode->isDirty = 1;
    +  }
    +
    +  return (nCell==nMaxCell);
    +}
    +
    +/*
    +** If the node is dirty, write it out to the database.
    +*/
    +static int
    +nodeWrite(Rtree *pRtree, RtreeNode *pNode){
    +  int rc = SQLITE_OK;
    +  if( pNode->isDirty ){
    +    sqlite3_stmt *p = pRtree->pWriteNode;
    +    if( pNode->iNode ){
    +      sqlite3_bind_int64(p, 1, pNode->iNode);
    +    }else{
    +      sqlite3_bind_null(p, 1);
    +    }
    +    sqlite3_bind_blob(p, 2, pNode->zData, pRtree->iNodeSize, SQLITE_STATIC);
    +    sqlite3_step(p);
    +    pNode->isDirty = 0;
    +    rc = sqlite3_reset(p);
    +    if( pNode->iNode==0 && rc==SQLITE_OK ){
    +      pNode->iNode = sqlite3_last_insert_rowid(pRtree->db);
    +      nodeHashInsert(pRtree, pNode);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Release a reference to a node. If the node is dirty and the reference
    +** count drops to zero, the node data is written to the database.
    +*/
    +static int
    +nodeRelease(Rtree *pRtree, RtreeNode *pNode){
    +  int rc = SQLITE_OK;
    +  if( pNode ){
    +    assert( pNode->nRef>0 );
    +    pNode->nRef--;
    +    if( pNode->nRef==0 ){
    +      if( pNode->iNode==1 ){
    +        pRtree->iDepth = -1;
    +      }
    +      if( pNode->pParent ){
    +        rc = nodeRelease(pRtree, pNode->pParent);
    +      }
    +      if( rc==SQLITE_OK ){
    +        rc = nodeWrite(pRtree, pNode);
    +      }
    +      nodeHashDelete(pRtree, pNode);
    +      sqlite3_free(pNode);
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Return the 64-bit integer value associated with cell iCell of
    +** node pNode. If pNode is a leaf node, this is a rowid. If it is
    +** an internal node, then the 64-bit integer is a child page number.
    +*/
    +static i64 nodeGetRowid(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode, 
    +  int iCell
    +){
    +  assert( iCell<NCELL(pNode) );
    +  return readInt64(&pNode->zData[4 + pRtree->nBytesPerCell*iCell]);
    +}
    +
    +/*
    +** Return coordinate iCoord from cell iCell in node pNode.
    +*/
    +static void nodeGetCoord(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode, 
    +  int iCell,
    +  int iCoord,
    +  RtreeCoord *pCoord           /* Space to write result to */
    +){
    +  readCoord(&pNode->zData[12 + pRtree->nBytesPerCell*iCell + 4*iCoord], pCoord);
    +}
    +
    +/*
    +** Deserialize cell iCell of node pNode. Populate the structure pointed
    +** to by pCell with the results.
    +*/
    +static void nodeGetCell(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode, 
    +  int iCell,
    +  RtreeCell *pCell
    +){
    +  int ii;
    +  pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
    +  for(ii=0; ii<pRtree->nDim*2; ii++){
    +    nodeGetCoord(pRtree, pNode, iCell, ii, &pCell->aCoord[ii]);
    +  }
    +}
    +
    +
    +/* Forward declaration for the function that does the work of
    +** the virtual table module xCreate() and xConnect() methods.
    +*/
    +static int rtreeInit(
    +  sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
    +);
    +
    +/* 
    +** Rtree virtual table module xCreate method.
    +*/
    +static int rtreeCreate(
    +  sqlite3 *db,
    +  void *pAux,
    +  int argc, const char *const*argv,
    +  sqlite3_vtab **ppVtab,
    +  char **pzErr
    +){
    +  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 1);
    +}
    +
    +/* 
    +** Rtree virtual table module xConnect method.
    +*/
    +static int rtreeConnect(
    +  sqlite3 *db,
    +  void *pAux,
    +  int argc, const char *const*argv,
    +  sqlite3_vtab **ppVtab,
    +  char **pzErr
    +){
    +  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 0);
    +}
    +
    +/*
    +** Increment the r-tree reference count.
    +*/
    +static void rtreeReference(Rtree *pRtree){
    +  pRtree->nBusy++;
    +}
    +
    +/*
    +** Decrement the r-tree reference count. When the reference count reaches
    +** zero the structure is deleted.
    +*/
    +static void rtreeRelease(Rtree *pRtree){
    +  pRtree->nBusy--;
    +  if( pRtree->nBusy==0 ){
    +    sqlite3_finalize(pRtree->pReadNode);
    +    sqlite3_finalize(pRtree->pWriteNode);
    +    sqlite3_finalize(pRtree->pDeleteNode);
    +    sqlite3_finalize(pRtree->pReadRowid);
    +    sqlite3_finalize(pRtree->pWriteRowid);
    +    sqlite3_finalize(pRtree->pDeleteRowid);
    +    sqlite3_finalize(pRtree->pReadParent);
    +    sqlite3_finalize(pRtree->pWriteParent);
    +    sqlite3_finalize(pRtree->pDeleteParent);
    +    sqlite3_free(pRtree);
    +  }
    +}
    +
    +/* 
    +** Rtree virtual table module xDisconnect method.
    +*/
    +static int rtreeDisconnect(sqlite3_vtab *pVtab){
    +  rtreeRelease((Rtree *)pVtab);
    +  return SQLITE_OK;
    +}
    +
    +/* 
    +** Rtree virtual table module xDestroy method.
    +*/
    +static int rtreeDestroy(sqlite3_vtab *pVtab){
    +  Rtree *pRtree = (Rtree *)pVtab;
    +  int rc;
    +  char *zCreate = sqlite3_mprintf(
    +    "DROP TABLE '%q'.'%q_node';"
    +    "DROP TABLE '%q'.'%q_rowid';"
    +    "DROP TABLE '%q'.'%q_parent';",
    +    pRtree->zDb, pRtree->zName, 
    +    pRtree->zDb, pRtree->zName,
    +    pRtree->zDb, pRtree->zName
    +  );
    +  if( !zCreate ){
    +    rc = SQLITE_NOMEM;
    +  }else{
    +    rc = sqlite3_exec(pRtree->db, zCreate, 0, 0, 0);
    +    sqlite3_free(zCreate);
    +  }
    +  if( rc==SQLITE_OK ){
    +    rtreeRelease(pRtree);
    +  }
    +
    +  return rc;
    +}
    +
    +/* 
    +** Rtree virtual table module xOpen method.
    +*/
    +static int rtreeOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
    +  int rc = SQLITE_NOMEM;
    +  RtreeCursor *pCsr;
    +
    +  pCsr = (RtreeCursor *)sqlite3_malloc(sizeof(RtreeCursor));
    +  if( pCsr ){
    +    memset(pCsr, 0, sizeof(RtreeCursor));
    +    pCsr->base.pVtab = pVTab;
    +    rc = SQLITE_OK;
    +  }
    +  *ppCursor = (sqlite3_vtab_cursor *)pCsr;
    +
    +  return rc;
    +}
    +
    +/* 
    +** Rtree virtual table module xClose method.
    +*/
    +static int rtreeClose(sqlite3_vtab_cursor *cur){
    +  Rtree *pRtree = (Rtree *)(cur->pVtab);
    +  int rc;
    +  RtreeCursor *pCsr = (RtreeCursor *)cur;
    +  sqlite3_free(pCsr->aConstraint);
    +  rc = nodeRelease(pRtree, pCsr->pNode);
    +  sqlite3_free(pCsr);
    +  return rc;
    +}
    +
    +/*
    +** Rtree virtual table module xEof method.
    +**
    +** Return non-zero if the cursor does not currently point to a valid 
    +** record (i.e if the scan has finished), or zero otherwise.
    +*/
    +static int rtreeEof(sqlite3_vtab_cursor *cur){
    +  RtreeCursor *pCsr = (RtreeCursor *)cur;
    +  return (pCsr->pNode==0);
    +}
    +
    +/* 
    +** Cursor pCursor currently points to a cell in a non-leaf page.
    +** Return true if the sub-tree headed by the cell is filtered
    +** (excluded) by the constraints in the pCursor->aConstraint[] 
    +** array, or false otherwise.
    +*/
    +static int testRtreeCell(Rtree *pRtree, RtreeCursor *pCursor){
    +  RtreeCell cell;
    +  int ii;
    +  int bRes = 0;
    +
    +  nodeGetCell(pRtree, pCursor->pNode, pCursor->iCell, &cell);
    +  for(ii=0; bRes==0 && ii<pCursor->nConstraint; ii++){
    +    RtreeConstraint *p = &pCursor->aConstraint[ii];
    +    double cell_min = DCOORD(cell.aCoord[(p->iCoord>>1)*2]);
    +    double cell_max = DCOORD(cell.aCoord[(p->iCoord>>1)*2+1]);
    +
    +    assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE 
    +        || p->op==RTREE_GT || p->op==RTREE_EQ
    +    );
    +
    +    switch( p->op ){
    +      case RTREE_LE: case RTREE_LT: bRes = p->rValue<cell_min; break;
    +      case RTREE_GE: case RTREE_GT: bRes = p->rValue>cell_max; break;
    +      case RTREE_EQ: 
    +        bRes = (p->rValue>cell_max || p->rValue<cell_min);
    +        break;
    +    }
    +  }
    +
    +  return bRes;
    +}
    +
    +/* 
    +** Return true if the cell that cursor pCursor currently points to
    +** would be filtered (excluded) by the constraints in the 
    +** pCursor->aConstraint[] array, or false otherwise.
    +**
    +** This function assumes that the cell is part of a leaf node.
    +*/
    +static int testRtreeEntry(Rtree *pRtree, RtreeCursor *pCursor){
    +  RtreeCell cell;
    +  int ii;
    +
    +  nodeGetCell(pRtree, pCursor->pNode, pCursor->iCell, &cell);
    +  for(ii=0; ii<pCursor->nConstraint; ii++){
    +    RtreeConstraint *p = &pCursor->aConstraint[ii];
    +    double coord = DCOORD(cell.aCoord[p->iCoord]);
    +    int res;
    +    assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE 
    +        || p->op==RTREE_GT || p->op==RTREE_EQ
    +    );
    +    switch( p->op ){
    +      case RTREE_LE: res = (coord<=p->rValue); break;
    +      case RTREE_LT: res = (coord<p->rValue);  break;
    +      case RTREE_GE: res = (coord>=p->rValue); break;
    +      case RTREE_GT: res = (coord>p->rValue);  break;
    +      case RTREE_EQ: res = (coord==p->rValue); break;
    +    }
    +
    +    if( !res ) return 1;
    +  }
    +
    +  return 0;
    +}
    +
    +/*
    +** Cursor pCursor currently points at a node that heads a sub-tree of
    +** height iHeight (if iHeight==0, then the node is a leaf). Descend
    +** to point to the left-most cell of the sub-tree that matches the 
    +** configured constraints.
    +*/
    +static int descendToCell(
    +  Rtree *pRtree, 
    +  RtreeCursor *pCursor, 
    +  int iHeight,
    +  int *pEof                 /* OUT: Set to true if cannot descend */
    +){
    +  int isEof;
    +  int rc;
    +  int ii;
    +  RtreeNode *pChild;
    +  sqlite3_int64 iRowid;
    +
    +  RtreeNode *pSavedNode = pCursor->pNode;
    +  int iSavedCell = pCursor->iCell;
    +
    +  assert( iHeight>=0 );
    +
    +  if( iHeight==0 ){
    +    isEof = testRtreeEntry(pRtree, pCursor);
    +  }else{
    +    isEof = testRtreeCell(pRtree, pCursor);
    +  }
    +  if( isEof || iHeight==0 ){
    +    *pEof = isEof;
    +    return SQLITE_OK;
    +  }
    +
    +  iRowid = nodeGetRowid(pRtree, pCursor->pNode, pCursor->iCell);
    +  rc = nodeAcquire(pRtree, iRowid, pCursor->pNode, &pChild);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  nodeRelease(pRtree, pCursor->pNode);
    +  pCursor->pNode = pChild;
    +  isEof = 1;
    +  for(ii=0; isEof && ii<NCELL(pChild); ii++){
    +    pCursor->iCell = ii;
    +    rc = descendToCell(pRtree, pCursor, iHeight-1, &isEof);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +  }
    +
    +  if( isEof ){
    +    assert( pCursor->pNode==pChild );
    +    nodeReference(pSavedNode);
    +    nodeRelease(pRtree, pChild);
    +    pCursor->pNode = pSavedNode;
    +    pCursor->iCell = iSavedCell;
    +  }
    +
    +  *pEof = isEof;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** One of the cells in node pNode is guaranteed to have a 64-bit 
    +** integer value equal to iRowid. Return the index of this cell.
    +*/
    +static int nodeRowidIndex(Rtree *pRtree, RtreeNode *pNode, i64 iRowid){
    +  int ii;
    +  for(ii=0; nodeGetRowid(pRtree, pNode, ii)!=iRowid; ii++){
    +    assert( ii<(NCELL(pNode)-1) );
    +  }
    +  return ii;
    +}
    +
    +/*
    +** Return the index of the cell containing a pointer to node pNode
    +** in its parent. If pNode is the root node, return -1.
    +*/
    +static int nodeParentIndex(Rtree *pRtree, RtreeNode *pNode){
    +  RtreeNode *pParent = pNode->pParent;
    +  if( pParent ){
    +    return nodeRowidIndex(pRtree, pParent, pNode->iNode);
    +  }
    +  return -1;
    +}
    +
    +/* 
    +** Rtree virtual table module xNext method.
    +*/
    +static int rtreeNext(sqlite3_vtab_cursor *pVtabCursor){
    +  Rtree *pRtree = (Rtree *)(pVtabCursor->pVtab);
    +  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
    +  int rc = SQLITE_OK;
    +
    +  if( pCsr->iStrategy==1 ){
    +    /* This "scan" is a direct lookup by rowid. There is no next entry. */
    +    nodeRelease(pRtree, pCsr->pNode);
    +    pCsr->pNode = 0;
    +  }
    +
    +  else if( pCsr->pNode ){
    +    /* Move to the next entry that matches the configured constraints. */
    +    int iHeight = 0;
    +    while( pCsr->pNode ){
    +      RtreeNode *pNode = pCsr->pNode;
    +      int nCell = NCELL(pNode);
    +      for(pCsr->iCell++; pCsr->iCell<nCell; pCsr->iCell++){
    +        int isEof;
    +        rc = descendToCell(pRtree, pCsr, iHeight, &isEof);
    +        if( rc!=SQLITE_OK || !isEof ){
    +          return rc;
    +        }
    +      }
    +      pCsr->pNode = pNode->pParent;
    +      pCsr->iCell = nodeParentIndex(pRtree, pNode);
    +      nodeReference(pCsr->pNode);
    +      nodeRelease(pRtree, pNode);
    +      iHeight++;
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +/* 
    +** Rtree virtual table module xRowid method.
    +*/
    +static int rtreeRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *pRowid){
    +  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
    +  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
    +
    +  assert(pCsr->pNode);
    +  *pRowid = nodeGetRowid(pRtree, pCsr->pNode, pCsr->iCell);
    +
    +  return SQLITE_OK;
    +}
    +
    +/* 
    +** Rtree virtual table module xColumn method.
    +*/
    +static int rtreeColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){
    +  Rtree *pRtree = (Rtree *)cur->pVtab;
    +  RtreeCursor *pCsr = (RtreeCursor *)cur;
    +
    +  if( i==0 ){
    +    i64 iRowid = nodeGetRowid(pRtree, pCsr->pNode, pCsr->iCell);
    +    sqlite3_result_int64(ctx, iRowid);
    +  }else{
    +    RtreeCoord c;
    +    nodeGetCoord(pRtree, pCsr->pNode, pCsr->iCell, i-1, &c);
    +    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
    +      sqlite3_result_double(ctx, c.f);
    +    }else{
    +      assert( pRtree->eCoordType==RTREE_COORD_INT32 );
    +      sqlite3_result_int(ctx, c.i);
    +    }
    +  }
    +
    +  return SQLITE_OK;
    +}
    +
    +/* 
    +** Use nodeAcquire() to obtain the leaf node containing the record with 
    +** rowid iRowid. If successful, set *ppLeaf to point to the node and
    +** return SQLITE_OK. If there is no such record in the table, set
    +** *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf
    +** to zero and return an SQLite error code.
    +*/
    +static int findLeafNode(Rtree *pRtree, i64 iRowid, RtreeNode **ppLeaf){
    +  int rc;
    +  *ppLeaf = 0;
    +  sqlite3_bind_int64(pRtree->pReadRowid, 1, iRowid);
    +  if( sqlite3_step(pRtree->pReadRowid)==SQLITE_ROW ){
    +    i64 iNode = sqlite3_column_int64(pRtree->pReadRowid, 0);
    +    rc = nodeAcquire(pRtree, iNode, 0, ppLeaf);
    +    sqlite3_reset(pRtree->pReadRowid);
    +  }else{
    +    rc = sqlite3_reset(pRtree->pReadRowid);
    +  }
    +  return rc;
    +}
    +
    +
    +/* 
    +** Rtree virtual table module xFilter method.
    +*/
    +static int rtreeFilter(
    +  sqlite3_vtab_cursor *pVtabCursor, 
    +  int idxNum, const char *idxStr,
    +  int argc, sqlite3_value **argv
    +){
    +  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
    +  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
    +
    +  RtreeNode *pRoot = 0;
    +  int ii;
    +  int rc = SQLITE_OK;
    +
    +  rtreeReference(pRtree);
    +
    +  sqlite3_free(pCsr->aConstraint);
    +  pCsr->aConstraint = 0;
    +  pCsr->iStrategy = idxNum;
    +
    +  if( idxNum==1 ){
    +    /* Special case - lookup by rowid. */
    +    RtreeNode *pLeaf;        /* Leaf on which the required cell resides */
    +    i64 iRowid = sqlite3_value_int64(argv[0]);
    +    rc = findLeafNode(pRtree, iRowid, &pLeaf);
    +    pCsr->pNode = pLeaf; 
    +    if( pLeaf && rc==SQLITE_OK ){
    +      pCsr->iCell = nodeRowidIndex(pRtree, pLeaf, iRowid);
    +    }
    +  }else{
    +    /* Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array 
    +    ** with the configured constraints. 
    +    */
    +    if( argc>0 ){
    +      pCsr->aConstraint = sqlite3_malloc(sizeof(RtreeConstraint)*argc);
    +      pCsr->nConstraint = argc;
    +      if( !pCsr->aConstraint ){
    +        rc = SQLITE_NOMEM;
    +      }else{
    +        assert( (idxStr==0 && argc==0) || strlen(idxStr)==argc*2 );
    +        for(ii=0; ii<argc; ii++){
    +          RtreeConstraint *p = &pCsr->aConstraint[ii];
    +          p->op = idxStr[ii*2];
    +          p->iCoord = idxStr[ii*2+1]-'a';
    +          p->rValue = sqlite3_value_double(argv[ii]);
    +        }
    +      }
    +    }
    +  
    +    if( rc==SQLITE_OK ){
    +      pCsr->pNode = 0;
    +      rc = nodeAcquire(pRtree, 1, 0, &pRoot);
    +    }
    +    if( rc==SQLITE_OK ){
    +      int isEof = 1;
    +      int nCell = NCELL(pRoot);
    +      pCsr->pNode = pRoot;
    +      for(pCsr->iCell=0; rc==SQLITE_OK && pCsr->iCell<nCell; pCsr->iCell++){
    +        assert( pCsr->pNode==pRoot );
    +        rc = descendToCell(pRtree, pCsr, pRtree->iDepth, &isEof);
    +        if( !isEof ){
    +          break;
    +        }
    +      }
    +      if( rc==SQLITE_OK && isEof ){
    +        assert( pCsr->pNode==pRoot );
    +        nodeRelease(pRtree, pRoot);
    +        pCsr->pNode = 0;
    +      }
    +      assert( rc!=SQLITE_OK || !pCsr->pNode || pCsr->iCell<NCELL(pCsr->pNode) );
    +    }
    +  }
    +
    +  rtreeRelease(pRtree);
    +  return rc;
    +}
    +
    +/*
    +** Rtree virtual table module xBestIndex method. There are three
    +** table scan strategies to choose from (in order from most to 
    +** least desirable):
    +**
    +**   idxNum     idxStr        Strategy
    +**   ------------------------------------------------
    +**     1        Unused        Direct lookup by rowid.
    +**     2        See below     R-tree query.
    +**     3        Unused        Full table scan.
    +**   ------------------------------------------------
    +**
    +** If strategy 1 or 3 is used, then idxStr is not meaningful. If strategy
    +** 2 is used, idxStr is formatted to contain 2 bytes for each 
    +** constraint used. The first two bytes of idxStr correspond to 
    +** the constraint in sqlite3_index_info.aConstraintUsage[] with
    +** (argvIndex==1) etc.
    +**
    +** The first of each pair of bytes in idxStr identifies the constraint
    +** operator as follows:
    +**
    +**   Operator    Byte Value
    +**   ----------------------
    +**      =        0x41 ('A')
    +**     <=        0x42 ('B')
    +**      <        0x43 ('C')
    +**     >=        0x44 ('D')
    +**      >        0x45 ('E')
    +**   ----------------------
    +**
    +** The second of each pair of bytes identifies the coordinate column
    +** to which the constraint applies. The leftmost coordinate column
    +** is 'a', the second from the left 'b' etc.
    +*/
    +static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
    +  int rc = SQLITE_OK;
    +  int ii, cCol;
    +
    +  int iIdx = 0;
    +  char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
    +  memset(zIdxStr, 0, sizeof(zIdxStr));
    +
    +  assert( pIdxInfo->idxStr==0 );
    +  for(ii=0; ii<pIdxInfo->nConstraint; ii++){
    +    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
    +
    +    if( p->usable && p->iColumn==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ ){
    +      /* We have an equality constraint on the rowid. Use strategy 1. */
    +      int jj;
    +      for(jj=0; jj<ii; jj++){
    +        pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
    +        pIdxInfo->aConstraintUsage[jj].omit = 0;
    +      }
    +      pIdxInfo->idxNum = 1;
    +      pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
    +      pIdxInfo->aConstraintUsage[jj].omit = 1;
    +
    +      /* This strategy involves a two rowid lookups on an B-Tree structures
    +      ** and then a linear search of an R-Tree node. This should be 
    +      ** considered almost as quick as a direct rowid lookup (for which 
    +      ** sqlite uses an internal cost of 0.0).
    +      */ 
    +      pIdxInfo->estimatedCost = 10.0;
    +      return SQLITE_OK;
    +    }
    +
    +    if( p->usable && p->iColumn>0 ){
    +      u8 op = 0;
    +      switch( p->op ){
    +        case SQLITE_INDEX_CONSTRAINT_EQ: op = RTREE_EQ; break;
    +        case SQLITE_INDEX_CONSTRAINT_GT: op = RTREE_GT; break;
    +        case SQLITE_INDEX_CONSTRAINT_LE: op = RTREE_LE; break;
    +        case SQLITE_INDEX_CONSTRAINT_LT: op = RTREE_LT; break;
    +        case SQLITE_INDEX_CONSTRAINT_GE: op = RTREE_GE; break;
    +      }
    +      if( op ){
    +        /* Make sure this particular constraint has not been used before.
    +        ** If it has been used before, ignore it.
    +        **
    +        ** A <= or < can be used if there is a prior >= or >.
    +        ** A >= or > can be used if there is a prior < or <=.
    +        ** A <= or < is disqualified if there is a prior <=, <, or ==.
    +        ** A >= or > is disqualified if there is a prior >=, >, or ==.
    +        ** A == is disqualifed if there is any prior constraint.
    +        */
    +        int j, opmsk;
    +        static const unsigned char compatible[] = { 0, 0, 1, 1, 2, 2 };
    +        assert( compatible[RTREE_EQ & 7]==0 );
    +        assert( compatible[RTREE_LT & 7]==1 );
    +        assert( compatible[RTREE_LE & 7]==1 );
    +        assert( compatible[RTREE_GT & 7]==2 );
    +        assert( compatible[RTREE_GE & 7]==2 );
    +        cCol = p->iColumn - 1 + 'a';
    +        opmsk = compatible[op & 7];
    +        for(j=0; j<iIdx; j+=2){
    +          if( zIdxStr[j+1]==cCol && (compatible[zIdxStr[j] & 7] & opmsk)!=0 ){
    +            op = 0;
    +            break;
    +          }
    +        }
    +      }
    +      if( op ){
    +        assert( iIdx<sizeof(zIdxStr)-1 );
    +        zIdxStr[iIdx++] = op;
    +        zIdxStr[iIdx++] = cCol;
    +        pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
    +        pIdxInfo->aConstraintUsage[ii].omit = 1;
    +      }
    +    }
    +  }
    +
    +  pIdxInfo->idxNum = 2;
    +  pIdxInfo->needToFreeIdxStr = 1;
    +  if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
    +    return SQLITE_NOMEM;
    +  }
    +  assert( iIdx>=0 );
    +  pIdxInfo->estimatedCost = (2000000.0 / (double)(iIdx + 1));
    +  return rc;
    +}
    +
    +/*
    +** Return the N-dimensional volumn of the cell stored in *p.
    +*/
    +static float cellArea(Rtree *pRtree, RtreeCell *p){
    +  float area = 1.0;
    +  int ii;
    +  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +    area = area * (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
    +  }
    +  return area;
    +}
    +
    +/*
    +** Return the margin length of cell p. The margin length is the sum
    +** of the objects size in each dimension.
    +*/
    +static float cellMargin(Rtree *pRtree, RtreeCell *p){
    +  float margin = 0.0;
    +  int ii;
    +  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +    margin += (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
    +  }
    +  return margin;
    +}
    +
    +/*
    +** Store the union of cells p1 and p2 in p1.
    +*/
    +static void cellUnion(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
    +  int ii;
    +  if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
    +    for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +      p1->aCoord[ii].f = MIN(p1->aCoord[ii].f, p2->aCoord[ii].f);
    +      p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f);
    +    }
    +  }else{
    +    for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +      p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i);
    +      p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i);
    +    }
    +  }
    +}
    +
    +/*
    +** Return true if the area covered by p2 is a subset of the area covered
    +** by p1. False otherwise.
    +*/
    +static int cellContains(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
    +  int ii;
    +  int isInt = (pRtree->eCoordType==RTREE_COORD_INT32);
    +  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +    RtreeCoord *a1 = &p1->aCoord[ii];
    +    RtreeCoord *a2 = &p2->aCoord[ii];
    +    if( (!isInt && (a2[0].f<a1[0].f || a2[1].f>a1[1].f)) 
    +     || ( isInt && (a2[0].i<a1[0].i || a2[1].i>a1[1].i)) 
    +    ){
    +      return 0;
    +    }
    +  }
    +  return 1;
    +}
    +
    +/*
    +** Return the amount cell p would grow by if it were unioned with pCell.
    +*/
    +static float cellGrowth(Rtree *pRtree, RtreeCell *p, RtreeCell *pCell){
    +  float area;
    +  RtreeCell cell;
    +  memcpy(&cell, p, sizeof(RtreeCell));
    +  area = cellArea(pRtree, &cell);
    +  cellUnion(pRtree, &cell, pCell);
    +  return (cellArea(pRtree, &cell)-area);
    +}
    +
    +#if VARIANT_RSTARTREE_CHOOSESUBTREE || VARIANT_RSTARTREE_SPLIT
    +static float cellOverlap(
    +  Rtree *pRtree, 
    +  RtreeCell *p, 
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  int iExclude
    +){
    +  int ii;
    +  float overlap = 0.0;
    +  for(ii=0; ii<nCell; ii++){
    +    if( ii!=iExclude ){
    +      int jj;
    +      float o = 1.0;
    +      for(jj=0; jj<(pRtree->nDim*2); jj+=2){
    +        double x1;
    +        double x2;
    +
    +        x1 = MAX(DCOORD(p->aCoord[jj]), DCOORD(aCell[ii].aCoord[jj]));
    +        x2 = MIN(DCOORD(p->aCoord[jj+1]), DCOORD(aCell[ii].aCoord[jj+1]));
    +
    +        if( x2<x1 ){
    +          o = 0.0;
    +          break;
    +        }else{
    +          o = o * (x2-x1);
    +        }
    +      }
    +      overlap += o;
    +    }
    +  }
    +  return overlap;
    +}
    +#endif
    +
    +#if VARIANT_RSTARTREE_CHOOSESUBTREE
    +static float cellOverlapEnlargement(
    +  Rtree *pRtree, 
    +  RtreeCell *p, 
    +  RtreeCell *pInsert, 
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  int iExclude
    +){
    +  float before;
    +  float after;
    +  before = cellOverlap(pRtree, p, aCell, nCell, iExclude);
    +  cellUnion(pRtree, p, pInsert);
    +  after = cellOverlap(pRtree, p, aCell, nCell, iExclude);
    +  return after-before;
    +}
    +#endif
    +
    +
    +/*
    +** This function implements the ChooseLeaf algorithm from Gutman[84].
    +** ChooseSubTree in r*tree terminology.
    +*/
    +static int ChooseLeaf(
    +  Rtree *pRtree,               /* Rtree table */
    +  RtreeCell *pCell,            /* Cell to insert into rtree */
    +  int iHeight,                 /* Height of sub-tree rooted at pCell */
    +  RtreeNode **ppLeaf           /* OUT: Selected leaf page */
    +){
    +  int rc;
    +  int ii;
    +  RtreeNode *pNode;
    +  rc = nodeAcquire(pRtree, 1, 0, &pNode);
    +
    +  for(ii=0; rc==SQLITE_OK && ii<(pRtree->iDepth-iHeight); ii++){
    +    int iCell;
    +    sqlite3_int64 iBest;
    +
    +    float fMinGrowth;
    +    float fMinArea;
    +    float fMinOverlap;
    +
    +    int nCell = NCELL(pNode);
    +    RtreeCell cell;
    +    RtreeNode *pChild;
    +
    +    RtreeCell *aCell = 0;
    +
    +#if VARIANT_RSTARTREE_CHOOSESUBTREE
    +    if( ii==(pRtree->iDepth-1) ){
    +      int jj;
    +      aCell = sqlite3_malloc(sizeof(RtreeCell)*nCell);
    +      if( !aCell ){
    +        rc = SQLITE_NOMEM;
    +        nodeRelease(pRtree, pNode);
    +        pNode = 0;
    +        continue;
    +      }
    +      for(jj=0; jj<nCell; jj++){
    +        nodeGetCell(pRtree, pNode, jj, &aCell[jj]);
    +      }
    +    }
    +#endif
    +
    +    /* Select the child node which will be enlarged the least if pCell
    +    ** is inserted into it. Resolve ties by choosing the entry with
    +    ** the smallest area.
    +    */
    +    for(iCell=0; iCell<nCell; iCell++){
    +      float growth;
    +      float area;
    +      float overlap = 0.0;
    +      nodeGetCell(pRtree, pNode, iCell, &cell);
    +      growth = cellGrowth(pRtree, &cell, pCell);
    +      area = cellArea(pRtree, &cell);
    +#if VARIANT_RSTARTREE_CHOOSESUBTREE
    +      if( ii==(pRtree->iDepth-1) ){
    +        overlap = cellOverlapEnlargement(pRtree,&cell,pCell,aCell,nCell,iCell);
    +      }
    +#endif
    +      if( (iCell==0) 
    +       || (overlap<fMinOverlap) 
    +       || (overlap==fMinOverlap && growth<fMinGrowth)
    +       || (overlap==fMinOverlap && growth==fMinGrowth && area<fMinArea)
    +      ){
    +        fMinOverlap = overlap;
    +        fMinGrowth = growth;
    +        fMinArea = area;
    +        iBest = cell.iRowid;
    +      }
    +    }
    +
    +    sqlite3_free(aCell);
    +    rc = nodeAcquire(pRtree, iBest, pNode, &pChild);
    +    nodeRelease(pRtree, pNode);
    +    pNode = pChild;
    +  }
    +
    +  *ppLeaf = pNode;
    +  return rc;
    +}
    +
    +/*
    +** A cell with the same content as pCell has just been inserted into
    +** the node pNode. This function updates the bounding box cells in
    +** all ancestor elements.
    +*/
    +static void AdjustTree(
    +  Rtree *pRtree,                    /* Rtree table */
    +  RtreeNode *pNode,                 /* Adjust ancestry of this node. */
    +  RtreeCell *pCell                  /* This cell was just inserted */
    +){
    +  RtreeNode *p = pNode;
    +  while( p->pParent ){
    +    RtreeCell cell;
    +    RtreeNode *pParent = p->pParent;
    +    int iCell = nodeParentIndex(pRtree, p);
    +
    +    nodeGetCell(pRtree, pParent, iCell, &cell);
    +    if( !cellContains(pRtree, &cell, pCell) ){
    +      cellUnion(pRtree, &cell, pCell);
    +      nodeOverwriteCell(pRtree, pParent, &cell, iCell);
    +    }
    + 
    +    p = pParent;
    +  }
    +}
    +
    +/*
    +** Write mapping (iRowid->iNode) to the <rtree>_rowid table.
    +*/
    +static int rowidWrite(Rtree *pRtree, sqlite3_int64 iRowid, sqlite3_int64 iNode){
    +  sqlite3_bind_int64(pRtree->pWriteRowid, 1, iRowid);
    +  sqlite3_bind_int64(pRtree->pWriteRowid, 2, iNode);
    +  sqlite3_step(pRtree->pWriteRowid);
    +  return sqlite3_reset(pRtree->pWriteRowid);
    +}
    +
    +/*
    +** Write mapping (iNode->iPar) to the <rtree>_parent table.
    +*/
    +static int parentWrite(Rtree *pRtree, sqlite3_int64 iNode, sqlite3_int64 iPar){
    +  sqlite3_bind_int64(pRtree->pWriteParent, 1, iNode);
    +  sqlite3_bind_int64(pRtree->pWriteParent, 2, iPar);
    +  sqlite3_step(pRtree->pWriteParent);
    +  return sqlite3_reset(pRtree->pWriteParent);
    +}
    +
    +static int rtreeInsertCell(Rtree *, RtreeNode *, RtreeCell *, int);
    +
    +#if VARIANT_GUTTMAN_LINEAR_SPLIT
    +/*
    +** Implementation of the linear variant of the PickNext() function from
    +** Guttman[84].
    +*/
    +static RtreeCell *LinearPickNext(
    +  Rtree *pRtree,
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  RtreeCell *pLeftBox, 
    +  RtreeCell *pRightBox,
    +  int *aiUsed
    +){
    +  int ii;
    +  for(ii=0; aiUsed[ii]; ii++);
    +  aiUsed[ii] = 1;
    +  return &aCell[ii];
    +}
    +
    +/*
    +** Implementation of the linear variant of the PickSeeds() function from
    +** Guttman[84].
    +*/
    +static void LinearPickSeeds(
    +  Rtree *pRtree,
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  int *piLeftSeed, 
    +  int *piRightSeed
    +){
    +  int i;
    +  int iLeftSeed = 0;
    +  int iRightSeed = 1;
    +  float maxNormalInnerWidth = 0.0;
    +
    +  /* Pick two "seed" cells from the array of cells. The algorithm used
    +  ** here is the LinearPickSeeds algorithm from Gutman[1984]. The 
    +  ** indices of the two seed cells in the array are stored in local
    +  ** variables iLeftSeek and iRightSeed.
    +  */
    +  for(i=0; i<pRtree->nDim; i++){
    +    float x1 = DCOORD(aCell[0].aCoord[i*2]);
    +    float x2 = DCOORD(aCell[0].aCoord[i*2+1]);
    +    float x3 = x1;
    +    float x4 = x2;
    +    int jj;
    +
    +    int iCellLeft = 0;
    +    int iCellRight = 0;
    +
    +    for(jj=1; jj<nCell; jj++){
    +      float left = DCOORD(aCell[jj].aCoord[i*2]);
    +      float right = DCOORD(aCell[jj].aCoord[i*2+1]);
    +
    +      if( left<x1 ) x1 = left;
    +      if( right>x4 ) x4 = right;
    +      if( left>x3 ){
    +        x3 = left;
    +        iCellRight = jj;
    +      }
    +      if( right<x2 ){
    +        x2 = right;
    +        iCellLeft = jj;
    +      }
    +    }
    +
    +    if( x4!=x1 ){
    +      float normalwidth = (x3 - x2) / (x4 - x1);
    +      if( normalwidth>maxNormalInnerWidth ){
    +        iLeftSeed = iCellLeft;
    +        iRightSeed = iCellRight;
    +      }
    +    }
    +  }
    +
    +  *piLeftSeed = iLeftSeed;
    +  *piRightSeed = iRightSeed;
    +}
    +#endif /* VARIANT_GUTTMAN_LINEAR_SPLIT */
    +
    +#if VARIANT_GUTTMAN_QUADRATIC_SPLIT
    +/*
    +** Implementation of the quadratic variant of the PickNext() function from
    +** Guttman[84].
    +*/
    +static RtreeCell *QuadraticPickNext(
    +  Rtree *pRtree,
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  RtreeCell *pLeftBox, 
    +  RtreeCell *pRightBox,
    +  int *aiUsed
    +){
    +  #define FABS(a) ((a)<0.0?-1.0*(a):(a))
    +
    +  int iSelect = -1;
    +  float fDiff;
    +  int ii;
    +  for(ii=0; ii<nCell; ii++){
    +    if( aiUsed[ii]==0 ){
    +      float left = cellGrowth(pRtree, pLeftBox, &aCell[ii]);
    +      float right = cellGrowth(pRtree, pLeftBox, &aCell[ii]);
    +      float diff = FABS(right-left);
    +      if( iSelect<0 || diff>fDiff ){
    +        fDiff = diff;
    +        iSelect = ii;
    +      }
    +    }
    +  }
    +  aiUsed[iSelect] = 1;
    +  return &aCell[iSelect];
    +}
    +
    +/*
    +** Implementation of the quadratic variant of the PickSeeds() function from
    +** Guttman[84].
    +*/
    +static void QuadraticPickSeeds(
    +  Rtree *pRtree,
    +  RtreeCell *aCell, 
    +  int nCell, 
    +  int *piLeftSeed, 
    +  int *piRightSeed
    +){
    +  int ii;
    +  int jj;
    +
    +  int iLeftSeed = 0;
    +  int iRightSeed = 1;
    +  float fWaste = 0.0;
    +
    +  for(ii=0; ii<nCell; ii++){
    +    for(jj=ii+1; jj<nCell; jj++){
    +      float right = cellArea(pRtree, &aCell[jj]);
    +      float growth = cellGrowth(pRtree, &aCell[ii], &aCell[jj]);
    +      float waste = growth - right;
    +
    +      if( waste>fWaste ){
    +        iLeftSeed = ii;
    +        iRightSeed = jj;
    +        fWaste = waste;
    +      }
    +    }
    +  }
    +
    +  *piLeftSeed = iLeftSeed;
    +  *piRightSeed = iRightSeed;
    +}
    +#endif /* VARIANT_GUTTMAN_QUADRATIC_SPLIT */
    +
    +/*
    +** Arguments aIdx, aDistance and aSpare all point to arrays of size
    +** nIdx. The aIdx array contains the set of integers from 0 to 
    +** (nIdx-1) in no particular order. This function sorts the values
    +** in aIdx according to the indexed values in aDistance. For
    +** example, assuming the inputs:
    +**
    +**   aIdx      = { 0,   1,   2,   3 }
    +**   aDistance = { 5.0, 2.0, 7.0, 6.0 }
    +**
    +** this function sets the aIdx array to contain:
    +**
    +**   aIdx      = { 0,   1,   2,   3 }
    +**
    +** The aSpare array is used as temporary working space by the
    +** sorting algorithm.
    +*/
    +static void SortByDistance(
    +  int *aIdx, 
    +  int nIdx, 
    +  float *aDistance, 
    +  int *aSpare
    +){
    +  if( nIdx>1 ){
    +    int iLeft = 0;
    +    int iRight = 0;
    +
    +    int nLeft = nIdx/2;
    +    int nRight = nIdx-nLeft;
    +    int *aLeft = aIdx;
    +    int *aRight = &aIdx[nLeft];
    +
    +    SortByDistance(aLeft, nLeft, aDistance, aSpare);
    +    SortByDistance(aRight, nRight, aDistance, aSpare);
    +
    +    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
    +    aLeft = aSpare;
    +
    +    while( iLeft<nLeft || iRight<nRight ){
    +      if( iLeft==nLeft ){
    +        aIdx[iLeft+iRight] = aRight[iRight];
    +        iRight++;
    +      }else if( iRight==nRight ){
    +        aIdx[iLeft+iRight] = aLeft[iLeft];
    +        iLeft++;
    +      }else{
    +        float fLeft = aDistance[aLeft[iLeft]];
    +        float fRight = aDistance[aRight[iRight]];
    +        if( fLeft<fRight ){
    +          aIdx[iLeft+iRight] = aLeft[iLeft];
    +          iLeft++;
    +        }else{
    +          aIdx[iLeft+iRight] = aRight[iRight];
    +          iRight++;
    +        }
    +      }
    +    }
    +
    +#if 0
    +    /* Check that the sort worked */
    +    {
    +      int jj;
    +      for(jj=1; jj<nIdx; jj++){
    +        float left = aDistance[aIdx[jj-1]];
    +        float right = aDistance[aIdx[jj]];
    +        assert( left<=right );
    +      }
    +    }
    +#endif
    +  }
    +}
    +
    +/*
    +** Arguments aIdx, aCell and aSpare all point to arrays of size
    +** nIdx. The aIdx array contains the set of integers from 0 to 
    +** (nIdx-1) in no particular order. This function sorts the values
    +** in aIdx according to dimension iDim of the cells in aCell. The
    +** minimum value of dimension iDim is considered first, the
    +** maximum used to break ties.
    +**
    +** The aSpare array is used as temporary working space by the
    +** sorting algorithm.
    +*/
    +static void SortByDimension(
    +  Rtree *pRtree,
    +  int *aIdx, 
    +  int nIdx, 
    +  int iDim, 
    +  RtreeCell *aCell, 
    +  int *aSpare
    +){
    +  if( nIdx>1 ){
    +
    +    int iLeft = 0;
    +    int iRight = 0;
    +
    +    int nLeft = nIdx/2;
    +    int nRight = nIdx-nLeft;
    +    int *aLeft = aIdx;
    +    int *aRight = &aIdx[nLeft];
    +
    +    SortByDimension(pRtree, aLeft, nLeft, iDim, aCell, aSpare);
    +    SortByDimension(pRtree, aRight, nRight, iDim, aCell, aSpare);
    +
    +    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
    +    aLeft = aSpare;
    +    while( iLeft<nLeft || iRight<nRight ){
    +      double xleft1 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2]);
    +      double xleft2 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2+1]);
    +      double xright1 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2]);
    +      double xright2 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2+1]);
    +      if( (iLeft!=nLeft) && ((iRight==nRight)
    +       || (xleft1<xright1)
    +       || (xleft1==xright1 && xleft2<xright2)
    +      )){
    +        aIdx[iLeft+iRight] = aLeft[iLeft];
    +        iLeft++;
    +      }else{
    +        aIdx[iLeft+iRight] = aRight[iRight];
    +        iRight++;
    +      }
    +    }
    +
    +#if 0
    +    /* Check that the sort worked */
    +    {
    +      int jj;
    +      for(jj=1; jj<nIdx; jj++){
    +        float xleft1 = aCell[aIdx[jj-1]].aCoord[iDim*2];
    +        float xleft2 = aCell[aIdx[jj-1]].aCoord[iDim*2+1];
    +        float xright1 = aCell[aIdx[jj]].aCoord[iDim*2];
    +        float xright2 = aCell[aIdx[jj]].aCoord[iDim*2+1];
    +        assert( xleft1<=xright1 && (xleft1<xright1 || xleft2<=xright2) );
    +      }
    +    }
    +#endif
    +  }
    +}
    +
    +#if VARIANT_RSTARTREE_SPLIT
    +/*
    +** Implementation of the R*-tree variant of SplitNode from Beckman[1990].
    +*/
    +static int splitNodeStartree(
    +  Rtree *pRtree,
    +  RtreeCell *aCell,
    +  int nCell,
    +  RtreeNode *pLeft,
    +  RtreeNode *pRight,
    +  RtreeCell *pBboxLeft,
    +  RtreeCell *pBboxRight
    +){
    +  int **aaSorted;
    +  int *aSpare;
    +  int ii;
    +
    +  int iBestDim;
    +  int iBestSplit;
    +  float fBestMargin;
    +
    +  int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
    +
    +  aaSorted = (int **)sqlite3_malloc(nByte);
    +  if( !aaSorted ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
    +  memset(aaSorted, 0, nByte);
    +  for(ii=0; ii<pRtree->nDim; ii++){
    +    int jj;
    +    aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
    +    for(jj=0; jj<nCell; jj++){
    +      aaSorted[ii][jj] = jj;
    +    }
    +    SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
    +  }
    +
    +  for(ii=0; ii<pRtree->nDim; ii++){
    +    float margin = 0.0;
    +    float fBestOverlap;
    +    float fBestArea;
    +    int iBestLeft;
    +    int nLeft;
    +
    +    for(
    +      nLeft=RTREE_MINCELLS(pRtree); 
    +      nLeft<=(nCell-RTREE_MINCELLS(pRtree)); 
    +      nLeft++
    +    ){
    +      RtreeCell left;
    +      RtreeCell right;
    +      int kk;
    +      float overlap;
    +      float area;
    +
    +      memcpy(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell));
    +      memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
    +      for(kk=1; kk<(nCell-1); kk++){
    +        if( kk<nLeft ){
    +          cellUnion(pRtree, &left, &aCell[aaSorted[ii][kk]]);
    +        }else{
    +          cellUnion(pRtree, &right, &aCell[aaSorted[ii][kk]]);
    +        }
    +      }
    +      margin += cellMargin(pRtree, &left);
    +      margin += cellMargin(pRtree, &right);
    +      overlap = cellOverlap(pRtree, &left, &right, 1, -1);
    +      area = cellArea(pRtree, &left) + cellArea(pRtree, &right);
    +      if( (nLeft==RTREE_MINCELLS(pRtree))
    +       || (overlap<fBestOverlap)
    +       || (overlap==fBestOverlap && area<fBestArea)
    +      ){
    +        iBestLeft = nLeft;
    +        fBestOverlap = overlap;
    +        fBestArea = area;
    +      }
    +    }
    +
    +    if( ii==0 || margin<fBestMargin ){
    +      iBestDim = ii;
    +      fBestMargin = margin;
    +      iBestSplit = iBestLeft;
    +    }
    +  }
    +
    +  memcpy(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell));
    +  memcpy(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell));
    +  for(ii=0; ii<nCell; ii++){
    +    RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;
    +    RtreeCell *pBbox = (ii<iBestSplit)?pBboxLeft:pBboxRight;
    +    RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];
    +    nodeInsertCell(pRtree, pTarget, pCell);
    +    cellUnion(pRtree, pBbox, pCell);
    +  }
    +
    +  sqlite3_free(aaSorted);
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +#if VARIANT_GUTTMAN_SPLIT
    +/*
    +** Implementation of the regular R-tree SplitNode from Guttman[1984].
    +*/
    +static int splitNodeGuttman(
    +  Rtree *pRtree,
    +  RtreeCell *aCell,
    +  int nCell,
    +  RtreeNode *pLeft,
    +  RtreeNode *pRight,
    +  RtreeCell *pBboxLeft,
    +  RtreeCell *pBboxRight
    +){
    +  int iLeftSeed = 0;
    +  int iRightSeed = 1;
    +  int *aiUsed;
    +  int i;
    +
    +  aiUsed = sqlite3_malloc(sizeof(int)*nCell);
    +  if( !aiUsed ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(aiUsed, 0, sizeof(int)*nCell);
    +
    +  PickSeeds(pRtree, aCell, nCell, &iLeftSeed, &iRightSeed);
    +
    +  memcpy(pBboxLeft, &aCell[iLeftSeed], sizeof(RtreeCell));
    +  memcpy(pBboxRight, &aCell[iRightSeed], sizeof(RtreeCell));
    +  nodeInsertCell(pRtree, pLeft, &aCell[iLeftSeed]);
    +  nodeInsertCell(pRtree, pRight, &aCell[iRightSeed]);
    +  aiUsed[iLeftSeed] = 1;
    +  aiUsed[iRightSeed] = 1;
    +
    +  for(i=nCell-2; i>0; i--){
    +    RtreeCell *pNext;
    +    pNext = PickNext(pRtree, aCell, nCell, pBboxLeft, pBboxRight, aiUsed);
    +    float diff =  
    +      cellGrowth(pRtree, pBboxLeft, pNext) - 
    +      cellGrowth(pRtree, pBboxRight, pNext)
    +    ;
    +    if( (RTREE_MINCELLS(pRtree)-NCELL(pRight)==i)
    +     || (diff>0.0 && (RTREE_MINCELLS(pRtree)-NCELL(pLeft)!=i))
    +    ){
    +      nodeInsertCell(pRtree, pRight, pNext);
    +      cellUnion(pRtree, pBboxRight, pNext);
    +    }else{
    +      nodeInsertCell(pRtree, pLeft, pNext);
    +      cellUnion(pRtree, pBboxLeft, pNext);
    +    }
    +  }
    +
    +  sqlite3_free(aiUsed);
    +  return SQLITE_OK;
    +}
    +#endif
    +
    +static int updateMapping(
    +  Rtree *pRtree, 
    +  i64 iRowid, 
    +  RtreeNode *pNode, 
    +  int iHeight
    +){
    +  int (*xSetMapping)(Rtree *, sqlite3_int64, sqlite3_int64);
    +  xSetMapping = ((iHeight==0)?rowidWrite:parentWrite);
    +  if( iHeight>0 ){
    +    RtreeNode *pChild = nodeHashLookup(pRtree, iRowid);
    +    if( pChild ){
    +      nodeRelease(pRtree, pChild->pParent);
    +      nodeReference(pNode);
    +      pChild->pParent = pNode;
    +    }
    +  }
    +  return xSetMapping(pRtree, iRowid, pNode->iNode);
    +}
    +
    +static int SplitNode(
    +  Rtree *pRtree,
    +  RtreeNode *pNode,
    +  RtreeCell *pCell,
    +  int iHeight
    +){
    +  int i;
    +  int newCellIsRight = 0;
    +
    +  int rc = SQLITE_OK;
    +  int nCell = NCELL(pNode);
    +  RtreeCell *aCell;
    +  int *aiUsed;
    +
    +  RtreeNode *pLeft = 0;
    +  RtreeNode *pRight = 0;
    +
    +  RtreeCell leftbbox;
    +  RtreeCell rightbbox;
    +
    +  /* Allocate an array and populate it with a copy of pCell and 
    +  ** all cells from node pLeft. Then zero the original node.
    +  */
    +  aCell = sqlite3_malloc((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
    +  if( !aCell ){
    +    rc = SQLITE_NOMEM;
    +    goto splitnode_out;
    +  }
    +  aiUsed = (int *)&aCell[nCell+1];
    +  memset(aiUsed, 0, sizeof(int)*(nCell+1));
    +  for(i=0; i<nCell; i++){
    +    nodeGetCell(pRtree, pNode, i, &aCell[i]);
    +  }
    +  nodeZero(pRtree, pNode);
    +  memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
    +  nCell++;
    +
    +  if( pNode->iNode==1 ){
    +    pRight = nodeNew(pRtree, pNode, 1);
    +    pLeft = nodeNew(pRtree, pNode, 1);
    +    pRtree->iDepth++;
    +    pNode->isDirty = 1;
    +    writeInt16(pNode->zData, pRtree->iDepth);
    +  }else{
    +    pLeft = pNode;
    +    pRight = nodeNew(pRtree, pLeft->pParent, 1);
    +    nodeReference(pLeft);
    +  }
    +
    +  if( !pLeft || !pRight ){
    +    rc = SQLITE_NOMEM;
    +    goto splitnode_out;
    +  }
    +
    +  memset(pLeft->zData, 0, pRtree->iNodeSize);
    +  memset(pRight->zData, 0, pRtree->iNodeSize);
    +
    +  rc = AssignCells(pRtree, aCell, nCell, pLeft, pRight, &leftbbox, &rightbbox);
    +  if( rc!=SQLITE_OK ){
    +    goto splitnode_out;
    +  }
    +
    +  /* Ensure both child nodes have node numbers assigned to them. */
    +  if( (0==pRight->iNode && SQLITE_OK!=(rc = nodeWrite(pRtree, pRight)))
    +   || (0==pLeft->iNode && SQLITE_OK!=(rc = nodeWrite(pRtree, pLeft)))
    +  ){
    +    goto splitnode_out;
    +  }
    +
    +  rightbbox.iRowid = pRight->iNode;
    +  leftbbox.iRowid = pLeft->iNode;
    +
    +  if( pNode->iNode==1 ){
    +    rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
    +    if( rc!=SQLITE_OK ){
    +      goto splitnode_out;
    +    }
    +  }else{
    +    RtreeNode *pParent = pLeft->pParent;
    +    int iCell = nodeParentIndex(pRtree, pLeft);
    +    nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
    +    AdjustTree(pRtree, pParent, &leftbbox);
    +  }
    +  if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
    +    goto splitnode_out;
    +  }
    +
    +  for(i=0; i<NCELL(pRight); i++){
    +    i64 iRowid = nodeGetRowid(pRtree, pRight, i);
    +    rc = updateMapping(pRtree, iRowid, pRight, iHeight);
    +    if( iRowid==pCell->iRowid ){
    +      newCellIsRight = 1;
    +    }
    +    if( rc!=SQLITE_OK ){
    +      goto splitnode_out;
    +    }
    +  }
    +  if( pNode->iNode==1 ){
    +    for(i=0; i<NCELL(pLeft); i++){
    +      i64 iRowid = nodeGetRowid(pRtree, pLeft, i);
    +      rc = updateMapping(pRtree, iRowid, pLeft, iHeight);
    +      if( rc!=SQLITE_OK ){
    +        goto splitnode_out;
    +      }
    +    }
    +  }else if( newCellIsRight==0 ){
    +    rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);
    +  }
    +
    +  if( rc==SQLITE_OK ){
    +    rc = nodeRelease(pRtree, pRight);
    +    pRight = 0;
    +  }
    +  if( rc==SQLITE_OK ){
    +    rc = nodeRelease(pRtree, pLeft);
    +    pLeft = 0;
    +  }
    +
    +splitnode_out:
    +  nodeRelease(pRtree, pRight);
    +  nodeRelease(pRtree, pLeft);
    +  sqlite3_free(aCell);
    +  return rc;
    +}
    +
    +static int fixLeafParent(Rtree *pRtree, RtreeNode *pLeaf){
    +  int rc = SQLITE_OK;
    +  if( pLeaf->iNode!=1 && pLeaf->pParent==0 ){
    +    sqlite3_bind_int64(pRtree->pReadParent, 1, pLeaf->iNode);
    +    if( sqlite3_step(pRtree->pReadParent)==SQLITE_ROW ){
    +      i64 iNode = sqlite3_column_int64(pRtree->pReadParent, 0);
    +      rc = nodeAcquire(pRtree, iNode, 0, &pLeaf->pParent);
    +    }else{
    +      rc = SQLITE_ERROR;
    +    }
    +    sqlite3_reset(pRtree->pReadParent);
    +    if( rc==SQLITE_OK ){
    +      rc = fixLeafParent(pRtree, pLeaf->pParent);
    +    }
    +  }
    +  return rc;
    +}
    +
    +static int deleteCell(Rtree *, RtreeNode *, int, int);
    +
    +static int removeNode(Rtree *pRtree, RtreeNode *pNode, int iHeight){
    +  int rc;
    +  RtreeNode *pParent;
    +  int iCell;
    +
    +  assert( pNode->nRef==1 );
    +
    +  /* Remove the entry in the parent cell. */
    +  iCell = nodeParentIndex(pRtree, pNode);
    +  pParent = pNode->pParent;
    +  pNode->pParent = 0;
    +  if( SQLITE_OK!=(rc = deleteCell(pRtree, pParent, iCell, iHeight+1)) 
    +   || SQLITE_OK!=(rc = nodeRelease(pRtree, pParent))
    +  ){
    +    return rc;
    +  }
    +
    +  /* Remove the xxx_node entry. */
    +  sqlite3_bind_int64(pRtree->pDeleteNode, 1, pNode->iNode);
    +  sqlite3_step(pRtree->pDeleteNode);
    +  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteNode)) ){
    +    return rc;
    +  }
    +
    +  /* Remove the xxx_parent entry. */
    +  sqlite3_bind_int64(pRtree->pDeleteParent, 1, pNode->iNode);
    +  sqlite3_step(pRtree->pDeleteParent);
    +  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteParent)) ){
    +    return rc;
    +  }
    +  
    +  /* Remove the node from the in-memory hash table and link it into
    +  ** the Rtree.pDeleted list. Its contents will be re-inserted later on.
    +  */
    +  nodeHashDelete(pRtree, pNode);
    +  pNode->iNode = iHeight;
    +  pNode->pNext = pRtree->pDeleted;
    +  pNode->nRef++;
    +  pRtree->pDeleted = pNode;
    +
    +  return SQLITE_OK;
    +}
    +
    +static void fixBoundingBox(Rtree *pRtree, RtreeNode *pNode){
    +  RtreeNode *pParent = pNode->pParent;
    +  if( pParent ){
    +    int ii; 
    +    int nCell = NCELL(pNode);
    +    RtreeCell box;                            /* Bounding box for pNode */
    +    nodeGetCell(pRtree, pNode, 0, &box);
    +    for(ii=1; ii<nCell; ii++){
    +      RtreeCell cell;
    +      nodeGetCell(pRtree, pNode, ii, &cell);
    +      cellUnion(pRtree, &box, &cell);
    +    }
    +    box.iRowid = pNode->iNode;
    +    ii = nodeParentIndex(pRtree, pNode);
    +    nodeOverwriteCell(pRtree, pParent, &box, ii);
    +    fixBoundingBox(pRtree, pParent);
    +  }
    +}
    +
    +/*
    +** Delete the cell at index iCell of node pNode. After removing the
    +** cell, adjust the r-tree data structure if required.
    +*/
    +static int deleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell, int iHeight){
    +  int rc;
    +
    +  if( SQLITE_OK!=(rc = fixLeafParent(pRtree, pNode)) ){
    +    return rc;
    +  }
    +
    +  /* Remove the cell from the node. This call just moves bytes around
    +  ** the in-memory node image, so it cannot fail.
    +  */
    +  nodeDeleteCell(pRtree, pNode, iCell);
    +
    +  /* If the node is not the tree root and now has less than the minimum
    +  ** number of cells, remove it from the tree. Otherwise, update the
    +  ** cell in the parent node so that it tightly contains the updated
    +  ** node.
    +  */
    +  if( pNode->iNode!=1 ){
    +    RtreeNode *pParent = pNode->pParent;
    +    if( (pParent->iNode!=1 || NCELL(pParent)!=1) 
    +     && (NCELL(pNode)<RTREE_MINCELLS(pRtree))
    +    ){
    +      rc = removeNode(pRtree, pNode, iHeight);
    +    }else{
    +      fixBoundingBox(pRtree, pNode);
    +    }
    +  }
    +
    +  return rc;
    +}
    +
    +static int Reinsert(
    +  Rtree *pRtree, 
    +  RtreeNode *pNode, 
    +  RtreeCell *pCell, 
    +  int iHeight
    +){
    +  int *aOrder;
    +  int *aSpare;
    +  RtreeCell *aCell;
    +  float *aDistance;
    +  int nCell;
    +  float aCenterCoord[RTREE_MAX_DIMENSIONS];
    +  int iDim;
    +  int ii;
    +  int rc = SQLITE_OK;
    +
    +  memset(aCenterCoord, 0, sizeof(float)*RTREE_MAX_DIMENSIONS);
    +
    +  nCell = NCELL(pNode)+1;
    +
    +  /* Allocate the buffers used by this operation. The allocation is
    +  ** relinquished before this function returns.
    +  */
    +  aCell = (RtreeCell *)sqlite3_malloc(nCell * (
    +    sizeof(RtreeCell) +         /* aCell array */
    +    sizeof(int)       +         /* aOrder array */
    +    sizeof(int)       +         /* aSpare array */
    +    sizeof(float)               /* aDistance array */
    +  ));
    +  if( !aCell ){
    +    return SQLITE_NOMEM;
    +  }
    +  aOrder    = (int *)&aCell[nCell];
    +  aSpare    = (int *)&aOrder[nCell];
    +  aDistance = (float *)&aSpare[nCell];
    +
    +  for(ii=0; ii<nCell; ii++){
    +    if( ii==(nCell-1) ){
    +      memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
    +    }else{
    +      nodeGetCell(pRtree, pNode, ii, &aCell[ii]);
    +    }
    +    aOrder[ii] = ii;
    +    for(iDim=0; iDim<pRtree->nDim; iDim++){
    +      aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2]);
    +      aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2+1]);
    +    }
    +  }
    +  for(iDim=0; iDim<pRtree->nDim; iDim++){
    +    aCenterCoord[iDim] = aCenterCoord[iDim]/((float)nCell*2.0);
    +  }
    +
    +  for(ii=0; ii<nCell; ii++){
    +    aDistance[ii] = 0.0;
    +    for(iDim=0; iDim<pRtree->nDim; iDim++){
    +      float coord = DCOORD(aCell[ii].aCoord[iDim*2+1]) - 
    +          DCOORD(aCell[ii].aCoord[iDim*2]);
    +      aDistance[ii] += (coord-aCenterCoord[iDim])*(coord-aCenterCoord[iDim]);
    +    }
    +  }
    +
    +  SortByDistance(aOrder, nCell, aDistance, aSpare);
    +  nodeZero(pRtree, pNode);
    +
    +  for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
    +    RtreeCell *p = &aCell[aOrder[ii]];
    +    nodeInsertCell(pRtree, pNode, p);
    +    if( p->iRowid==pCell->iRowid ){
    +      if( iHeight==0 ){
    +        rc = rowidWrite(pRtree, p->iRowid, pNode->iNode);
    +      }else{
    +        rc = parentWrite(pRtree, p->iRowid, pNode->iNode);
    +      }
    +    }
    +  }
    +  if( rc==SQLITE_OK ){
    +    fixBoundingBox(pRtree, pNode);
    +  }
    +  for(; rc==SQLITE_OK && ii<nCell; ii++){
    +    /* Find a node to store this cell in. pNode->iNode currently contains
    +    ** the height of the sub-tree headed by the cell.
    +    */
    +    RtreeNode *pInsert;
    +    RtreeCell *p = &aCell[aOrder[ii]];
    +    rc = ChooseLeaf(pRtree, p, iHeight, &pInsert);
    +    if( rc==SQLITE_OK ){
    +      int rc2;
    +      rc = rtreeInsertCell(pRtree, pInsert, p, iHeight);
    +      rc2 = nodeRelease(pRtree, pInsert);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }
    +  }
    +
    +  sqlite3_free(aCell);
    +  return rc;
    +}
    +
    +/*
    +** Insert cell pCell into node pNode. Node pNode is the head of a 
    +** subtree iHeight high (leaf nodes have iHeight==0).
    +*/
    +static int rtreeInsertCell(
    +  Rtree *pRtree,
    +  RtreeNode *pNode,
    +  RtreeCell *pCell,
    +  int iHeight
    +){
    +  int rc = SQLITE_OK;
    +  if( iHeight>0 ){
    +    RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);
    +    if( pChild ){
    +      nodeRelease(pRtree, pChild->pParent);
    +      nodeReference(pNode);
    +      pChild->pParent = pNode;
    +    }
    +  }
    +  if( nodeInsertCell(pRtree, pNode, pCell) ){
    +#if VARIANT_RSTARTREE_REINSERT
    +    if( iHeight<=pRtree->iReinsertHeight || pNode->iNode==1){
    +      rc = SplitNode(pRtree, pNode, pCell, iHeight);
    +    }else{
    +      pRtree->iReinsertHeight = iHeight;
    +      rc = Reinsert(pRtree, pNode, pCell, iHeight);
    +    }
    +#else
    +    rc = SplitNode(pRtree, pNode, pCell, iHeight);
    +#endif
    +  }else{
    +    AdjustTree(pRtree, pNode, pCell);
    +    if( iHeight==0 ){
    +      rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);
    +    }else{
    +      rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);
    +    }
    +  }
    +  return rc;
    +}
    +
    +static int reinsertNodeContent(Rtree *pRtree, RtreeNode *pNode){
    +  int ii;
    +  int rc = SQLITE_OK;
    +  int nCell = NCELL(pNode);
    +
    +  for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
    +    RtreeNode *pInsert;
    +    RtreeCell cell;
    +    nodeGetCell(pRtree, pNode, ii, &cell);
    +
    +    /* Find a node to store this cell in. pNode->iNode currently contains
    +    ** the height of the sub-tree headed by the cell.
    +    */
    +    rc = ChooseLeaf(pRtree, &cell, pNode->iNode, &pInsert);
    +    if( rc==SQLITE_OK ){
    +      int rc2;
    +      rc = rtreeInsertCell(pRtree, pInsert, &cell, pNode->iNode);
    +      rc2 = nodeRelease(pRtree, pInsert);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }
    +  }
    +  return rc;
    +}
    +
    +/*
    +** Select a currently unused rowid for a new r-tree record.
    +*/
    +static int newRowid(Rtree *pRtree, i64 *piRowid){
    +  int rc;
    +  sqlite3_bind_null(pRtree->pWriteRowid, 1);
    +  sqlite3_bind_null(pRtree->pWriteRowid, 2);
    +  sqlite3_step(pRtree->pWriteRowid);
    +  rc = sqlite3_reset(pRtree->pWriteRowid);
    +  *piRowid = sqlite3_last_insert_rowid(pRtree->db);
    +  return rc;
    +}
    +
    +#ifndef NDEBUG
    +static int hashIsEmpty(Rtree *pRtree){
    +  int ii;
    +  for(ii=0; ii<HASHSIZE; ii++){
    +    assert( !pRtree->aHash[ii] );
    +  }
    +  return 1;
    +}
    +#endif
    +
    +/*
    +** The xUpdate method for rtree module virtual tables.
    +*/
    +static int rtreeUpdate(
    +  sqlite3_vtab *pVtab, 
    +  int nData, 
    +  sqlite3_value **azData, 
    +  sqlite_int64 *pRowid
    +){
    +  Rtree *pRtree = (Rtree *)pVtab;
    +  int rc = SQLITE_OK;
    +
    +  rtreeReference(pRtree);
    +
    +  assert(nData>=1);
    +  assert(hashIsEmpty(pRtree));
    +
    +  /* If azData[0] is not an SQL NULL value, it is the rowid of a
    +  ** record to delete from the r-tree table. The following block does
    +  ** just that.
    +  */
    +  if( sqlite3_value_type(azData[0])!=SQLITE_NULL ){
    +    i64 iDelete;                /* The rowid to delete */
    +    RtreeNode *pLeaf;           /* Leaf node containing record iDelete */
    +    int iCell;                  /* Index of iDelete cell in pLeaf */
    +    RtreeNode *pRoot;
    +
    +    /* Obtain a reference to the root node to initialise Rtree.iDepth */
    +    rc = nodeAcquire(pRtree, 1, 0, &pRoot);
    +
    +    /* Obtain a reference to the leaf node that contains the entry 
    +    ** about to be deleted. 
    +    */
    +    if( rc==SQLITE_OK ){
    +      iDelete = sqlite3_value_int64(azData[0]);
    +      rc = findLeafNode(pRtree, iDelete, &pLeaf);
    +    }
    +
    +    /* Delete the cell in question from the leaf node. */
    +    if( rc==SQLITE_OK ){
    +      int rc2;
    +      iCell = nodeRowidIndex(pRtree, pLeaf, iDelete);
    +      rc = deleteCell(pRtree, pLeaf, iCell, 0);
    +      rc2 = nodeRelease(pRtree, pLeaf);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }
    +
    +    /* Delete the corresponding entry in the <rtree>_rowid table. */
    +    if( rc==SQLITE_OK ){
    +      sqlite3_bind_int64(pRtree->pDeleteRowid, 1, iDelete);
    +      sqlite3_step(pRtree->pDeleteRowid);
    +      rc = sqlite3_reset(pRtree->pDeleteRowid);
    +    }
    +
    +    /* Check if the root node now has exactly one child. If so, remove
    +    ** it, schedule the contents of the child for reinsertion and 
    +    ** reduce the tree height by one.
    +    **
    +    ** This is equivalent to copying the contents of the child into
    +    ** the root node (the operation that Gutman's paper says to perform 
    +    ** in this scenario).
    +    */
    +    if( rc==SQLITE_OK && pRtree->iDepth>0 ){
    +      if( rc==SQLITE_OK && NCELL(pRoot)==1 ){
    +        RtreeNode *pChild;
    +        i64 iChild = nodeGetRowid(pRtree, pRoot, 0);
    +        rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);
    +        if( rc==SQLITE_OK ){
    +          rc = removeNode(pRtree, pChild, pRtree->iDepth-1);
    +        }
    +        if( rc==SQLITE_OK ){
    +          pRtree->iDepth--;
    +          writeInt16(pRoot->zData, pRtree->iDepth);
    +          pRoot->isDirty = 1;
    +        }
    +      }
    +    }
    +
    +    /* Re-insert the contents of any underfull nodes removed from the tree. */
    +    for(pLeaf=pRtree->pDeleted; pLeaf; pLeaf=pRtree->pDeleted){
    +      if( rc==SQLITE_OK ){
    +        rc = reinsertNodeContent(pRtree, pLeaf);
    +      }
    +      pRtree->pDeleted = pLeaf->pNext;
    +      sqlite3_free(pLeaf);
    +    }
    +
    +    /* Release the reference to the root node. */
    +    if( rc==SQLITE_OK ){
    +      rc = nodeRelease(pRtree, pRoot);
    +    }else{
    +      nodeRelease(pRtree, pRoot);
    +    }
    +  }
    +
    +  /* If the azData[] array contains more than one element, elements
    +  ** (azData[2]..azData[argc-1]) contain a new record to insert into
    +  ** the r-tree structure.
    +  */
    +  if( rc==SQLITE_OK && nData>1 ){
    +    /* Insert a new record into the r-tree */
    +    RtreeCell cell;
    +    int ii;
    +    RtreeNode *pLeaf;
    +
    +    /* Populate the cell.aCoord[] array. The first coordinate is azData[3]. */
    +    assert( nData==(pRtree->nDim*2 + 3) );
    +    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
    +      for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +        cell.aCoord[ii].f = (float)sqlite3_value_double(azData[ii+3]);
    +        cell.aCoord[ii+1].f = (float)sqlite3_value_double(azData[ii+4]);
    +        if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){
    +          rc = SQLITE_CONSTRAINT;
    +          goto constraint;
    +        }
    +      }
    +    }else{
    +      for(ii=0; ii<(pRtree->nDim*2); ii+=2){
    +        cell.aCoord[ii].i = sqlite3_value_int(azData[ii+3]);
    +        cell.aCoord[ii+1].i = sqlite3_value_int(azData[ii+4]);
    +        if( cell.aCoord[ii].i>cell.aCoord[ii+1].i ){
    +          rc = SQLITE_CONSTRAINT;
    +          goto constraint;
    +        }
    +      }
    +    }
    +
    +    /* Figure out the rowid of the new row. */
    +    if( sqlite3_value_type(azData[2])==SQLITE_NULL ){
    +      rc = newRowid(pRtree, &cell.iRowid);
    +    }else{
    +      cell.iRowid = sqlite3_value_int64(azData[2]);
    +      sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);
    +      if( SQLITE_ROW==sqlite3_step(pRtree->pReadRowid) ){
    +        sqlite3_reset(pRtree->pReadRowid);
    +        rc = SQLITE_CONSTRAINT;
    +        goto constraint;
    +      }
    +      rc = sqlite3_reset(pRtree->pReadRowid);
    +    }
    +
    +    if( rc==SQLITE_OK ){
    +      rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);
    +    }
    +    if( rc==SQLITE_OK ){
    +      int rc2;
    +      pRtree->iReinsertHeight = -1;
    +      rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);
    +      rc2 = nodeRelease(pRtree, pLeaf);
    +      if( rc==SQLITE_OK ){
    +        rc = rc2;
    +      }
    +    }
    +  }
    +
    +constraint:
    +  rtreeRelease(pRtree);
    +  return rc;
    +}
    +
    +/*
    +** The xRename method for rtree module virtual tables.
    +*/
    +static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
    +  Rtree *pRtree = (Rtree *)pVtab;
    +  int rc = SQLITE_NOMEM;
    +  char *zSql = sqlite3_mprintf(
    +    "ALTER TABLE %Q.'%q_node'   RENAME TO \"%w_node\";"
    +    "ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";"
    +    "ALTER TABLE %Q.'%q_rowid'  RENAME TO \"%w_rowid\";"
    +    , pRtree->zDb, pRtree->zName, zNewName 
    +    , pRtree->zDb, pRtree->zName, zNewName 
    +    , pRtree->zDb, pRtree->zName, zNewName
    +  );
    +  if( zSql ){
    +    rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);
    +    sqlite3_free(zSql);
    +  }
    +  return rc;
    +}
    +
    +static sqlite3_module rtreeModule = {
    +  0,                         /* iVersion */
    +  rtreeCreate,                /* xCreate - create a table */
    +  rtreeConnect,               /* xConnect - connect to an existing table */
    +  rtreeBestIndex,             /* xBestIndex - Determine search strategy */
    +  rtreeDisconnect,            /* xDisconnect - Disconnect from a table */
    +  rtreeDestroy,               /* xDestroy - Drop a table */
    +  rtreeOpen,                  /* xOpen - open a cursor */
    +  rtreeClose,                 /* xClose - close a cursor */
    +  rtreeFilter,                /* xFilter - configure scan constraints */
    +  rtreeNext,                  /* xNext - advance a cursor */
    +  rtreeEof,                   /* xEof */
    +  rtreeColumn,                /* xColumn - read data */
    +  rtreeRowid,                 /* xRowid - read data */
    +  rtreeUpdate,                /* xUpdate - write data */
    +  0,                          /* xBegin - begin transaction */
    +  0,                          /* xSync - sync transaction */
    +  0,                          /* xCommit - commit transaction */
    +  0,                          /* xRollback - rollback transaction */
    +  0,                          /* xFindFunction - function overloading */
    +  rtreeRename                 /* xRename - rename the table */
    +};
    +
    +static int rtreeSqlInit(
    +  Rtree *pRtree, 
    +  sqlite3 *db, 
    +  const char *zDb, 
    +  const char *zPrefix, 
    +  int isCreate
    +){
    +  int rc = SQLITE_OK;
    +
    +  #define N_STATEMENT 9
    +  static const char *azSql[N_STATEMENT] = {
    +    /* Read and write the xxx_node table */
    +    "SELECT data FROM '%q'.'%q_node' WHERE nodeno = :1",
    +    "INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(:1, :2)",
    +    "DELETE FROM '%q'.'%q_node' WHERE nodeno = :1",
    +
    +    /* Read and write the xxx_rowid table */
    +    "SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = :1",
    +    "INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(:1, :2)",
    +    "DELETE FROM '%q'.'%q_rowid' WHERE rowid = :1",
    +
    +    /* Read and write the xxx_parent table */
    +    "SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = :1",
    +    "INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(:1, :2)",
    +    "DELETE FROM '%q'.'%q_parent' WHERE nodeno = :1"
    +  };
    +  sqlite3_stmt **appStmt[N_STATEMENT];
    +  int i;
    +
    +  pRtree->db = db;
    +
    +  if( isCreate ){
    +    char *zCreate = sqlite3_mprintf(
    +"CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY, data BLOB);"
    +"CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY, nodeno INTEGER);"
    +"CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER);"
    +"INSERT INTO '%q'.'%q_node' VALUES(1, zeroblob(%d))",
    +      zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, pRtree->iNodeSize
    +    );
    +    if( !zCreate ){
    +      return SQLITE_NOMEM;
    +    }
    +    rc = sqlite3_exec(db, zCreate, 0, 0, 0);
    +    sqlite3_free(zCreate);
    +    if( rc!=SQLITE_OK ){
    +      return rc;
    +    }
    +  }
    +
    +  appStmt[0] = &pRtree->pReadNode;
    +  appStmt[1] = &pRtree->pWriteNode;
    +  appStmt[2] = &pRtree->pDeleteNode;
    +  appStmt[3] = &pRtree->pReadRowid;
    +  appStmt[4] = &pRtree->pWriteRowid;
    +  appStmt[5] = &pRtree->pDeleteRowid;
    +  appStmt[6] = &pRtree->pReadParent;
    +  appStmt[7] = &pRtree->pWriteParent;
    +  appStmt[8] = &pRtree->pDeleteParent;
    +
    +  for(i=0; i<N_STATEMENT && rc==SQLITE_OK; i++){
    +    char *zSql = sqlite3_mprintf(azSql[i], zDb, zPrefix);
    +    if( zSql ){
    +      rc = sqlite3_prepare_v2(db, zSql, -1, appStmt[i], 0); 
    +    }else{
    +      rc = SQLITE_NOMEM;
    +    }
    +    sqlite3_free(zSql);
    +  }
    +
    +  return rc;
    +}
    +
    +/*
    +** This routine queries database handle db for the page-size used by
    +** database zDb. If successful, the page-size in bytes is written to
    +** *piPageSize and SQLITE_OK returned. Otherwise, and an SQLite error 
    +** code is returned.
    +*/
    +static int getPageSize(sqlite3 *db, const char *zDb, int *piPageSize){
    +  int rc = SQLITE_NOMEM;
    +  char *zSql;
    +  sqlite3_stmt *pStmt = 0;
    +
    +  zSql = sqlite3_mprintf("PRAGMA %Q.page_size", zDb);
    +  if( !zSql ){
    +    return SQLITE_NOMEM;
    +  }
    +
    +  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
    +  sqlite3_free(zSql);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  if( SQLITE_ROW==sqlite3_step(pStmt) ){
    +    *piPageSize = sqlite3_column_int(pStmt, 0);
    +  }
    +  return sqlite3_finalize(pStmt);
    +}
    +
    +/* 
    +** This function is the implementation of both the xConnect and xCreate
    +** methods of the r-tree virtual table.
    +**
    +**   argv[0]   -> module name
    +**   argv[1]   -> database name
    +**   argv[2]   -> table name
    +**   argv[...] -> column names...
    +*/
    +static int rtreeInit(
    +  sqlite3 *db,                        /* Database connection */
    +  void *pAux,                         /* One of the RTREE_COORD_* constants */
    +  int argc, const char *const*argv,   /* Parameters to CREATE TABLE statement */
    +  sqlite3_vtab **ppVtab,              /* OUT: New virtual table */
    +  char **pzErr,                       /* OUT: Error message, if any */
    +  int isCreate                        /* True for xCreate, false for xConnect */
    +){
    +  int rc = SQLITE_OK;
    +  int iPageSize = 0;
    +  Rtree *pRtree;
    +  int nDb;              /* Length of string argv[1] */
    +  int nName;            /* Length of string argv[2] */
    +  int eCoordType = (int)pAux;
    +
    +  const char *aErrMsg[] = {
    +    0,                                                    /* 0 */
    +    "Wrong number of columns for an rtree table",         /* 1 */
    +    "Too few columns for an rtree table",                 /* 2 */
    +    "Too many columns for an rtree table"                 /* 3 */
    +  };
    +
    +  int iErr = (argc<6) ? 2 : argc>(RTREE_MAX_DIMENSIONS*2+4) ? 3 : argc%2;
    +  if( aErrMsg[iErr] ){
    +    *pzErr = sqlite3_mprintf("%s", aErrMsg[iErr]);
    +    return SQLITE_ERROR;
    +  }
    +
    +  rc = getPageSize(db, argv[1], &iPageSize);
    +  if( rc!=SQLITE_OK ){
    +    return rc;
    +  }
    +
    +  /* Allocate the sqlite3_vtab structure */
    +  nDb = strlen(argv[1]);
    +  nName = strlen(argv[2]);
    +  pRtree = (Rtree *)sqlite3_malloc(sizeof(Rtree)+nDb+nName+2);
    +  if( !pRtree ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(pRtree, 0, sizeof(Rtree)+nDb+nName+2);
    +  pRtree->nBusy = 1;
    +  pRtree->base.pModule = &rtreeModule;
    +  pRtree->zDb = (char *)&pRtree[1];
    +  pRtree->zName = &pRtree->zDb[nDb+1];
    +  pRtree->nDim = (argc-4)/2;
    +  pRtree->nBytesPerCell = 8 + pRtree->nDim*4*2;
    +  pRtree->eCoordType = eCoordType;
    +  memcpy(pRtree->zDb, argv[1], nDb);
    +  memcpy(pRtree->zName, argv[2], nName);
    +
    +  /* Figure out the node size to use. By default, use 64 bytes less than
    +  ** the database page-size. This ensures that each node is stored on
    +  ** a single database page.
    +  **
    +  ** If the databasd page-size is so large that more than RTREE_MAXCELLS
    +  ** entries would fit in a single node, use a smaller node-size.
    +  */
    +  pRtree->iNodeSize = iPageSize-64;
    +  if( (4+pRtree->nBytesPerCell*RTREE_MAXCELLS)<pRtree->iNodeSize ){
    +    pRtree->iNodeSize = 4+pRtree->nBytesPerCell*RTREE_MAXCELLS;
    +  }
    +
    +  /* Create/Connect to the underlying relational database schema. If
    +  ** that is successful, call sqlite3_declare_vtab() to configure
    +  ** the r-tree table schema.
    +  */
    +  if( (rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate)) ){
    +    *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
    +  }else{
    +    char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]);
    +    char *zTmp;
    +    int ii;
    +    for(ii=4; zSql && ii<argc; ii++){
    +      zTmp = zSql;
    +      zSql = sqlite3_mprintf("%s, %s", zTmp, argv[ii]);
    +      sqlite3_free(zTmp);
    +    }
    +    if( zSql ){
    +      zTmp = zSql;
    +      zSql = sqlite3_mprintf("%s);", zTmp);
    +      sqlite3_free(zTmp);
    +    }
    +    if( !zSql ){
    +      rc = SQLITE_NOMEM;
    +    }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){
    +      *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
    +    }
    +    sqlite3_free(zSql);
    +  }
    +
    +  if( rc==SQLITE_OK ){
    +    *ppVtab = (sqlite3_vtab *)pRtree;
    +  }else{
    +    rtreeRelease(pRtree);
    +  }
    +  return rc;
    +}
    +
    +
    +/*
    +** Implementation of a scalar function that decodes r-tree nodes to
    +** human readable strings. This can be used for debugging and analysis.
    +**
    +** The scalar function takes two arguments, a blob of data containing
    +** an r-tree node, and the number of dimensions the r-tree indexes.
    +** For a two-dimensional r-tree structure called "rt", to deserialize
    +** all nodes, a statement like:
    +**
    +**   SELECT rtreenode(2, data) FROM rt_node;
    +**
    +** The human readable string takes the form of a Tcl list with one
    +** entry for each cell in the r-tree node. Each entry is itself a
    +** list, containing the 8-byte rowid/pageno followed by the 
    +** <num-dimension>*2 coordinates.
    +*/
    +static void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
    +  char *zText = 0;
    +  RtreeNode node;
    +  Rtree tree;
    +  int ii;
    +
    +  memset(&node, 0, sizeof(RtreeNode));
    +  memset(&tree, 0, sizeof(Rtree));
    +  tree.nDim = sqlite3_value_int(apArg[0]);
    +  tree.nBytesPerCell = 8 + 8 * tree.nDim;
    +  node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
    +
    +  for(ii=0; ii<NCELL(&node); ii++){
    +    char zCell[512];
    +    int nCell = 0;
    +    RtreeCell cell;
    +    int jj;
    +
    +    nodeGetCell(&tree, &node, ii, &cell);
    +    sqlite3_snprintf(512-nCell,&zCell[nCell],"%d", cell.iRowid);
    +    nCell = strlen(zCell);
    +    for(jj=0; jj<tree.nDim*2; jj++){
    +      sqlite3_snprintf(512-nCell,&zCell[nCell]," %f",(double)cell.aCoord[jj].f);
    +      nCell = strlen(zCell);
    +    }
    +
    +    if( zText ){
    +      char *zTextNew = sqlite3_mprintf("%s {%s}", zText, zCell);
    +      sqlite3_free(zText);
    +      zText = zTextNew;
    +    }else{
    +      zText = sqlite3_mprintf("{%s}", zCell);
    +    }
    +  }
    +  
    +  sqlite3_result_text(ctx, zText, -1, sqlite3_free);
    +}
    +
    +static void rtreedepth(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
    +  if( sqlite3_value_type(apArg[0])!=SQLITE_BLOB 
    +   || sqlite3_value_bytes(apArg[0])<2
    +  ){
    +    sqlite3_result_error(ctx, "Invalid argument to rtreedepth()", -1); 
    +  }else{
    +    u8 *zBlob = (u8 *)sqlite3_value_blob(apArg[0]);
    +    sqlite3_result_int(ctx, readInt16(zBlob));
    +  }
    +}
    +
    +/*
    +** Register the r-tree module with database handle db. This creates the
    +** virtual table module "rtree" and the debugging/analysis scalar 
    +** function "rtreenode".
    +*/
    +SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){
    +  int rc = SQLITE_OK;
    +
    +  if( rc==SQLITE_OK ){
    +    int utf8 = SQLITE_UTF8;
    +    rc = sqlite3_create_function(db, "rtreenode", 2, utf8, 0, rtreenode, 0, 0);
    +  }
    +  if( rc==SQLITE_OK ){
    +    int utf8 = SQLITE_UTF8;
    +    rc = sqlite3_create_function(db, "rtreedepth", 1, utf8, 0,rtreedepth, 0, 0);
    +  }
    +  if( rc==SQLITE_OK ){
    +    void *c = (void *)RTREE_COORD_REAL32;
    +    rc = sqlite3_create_module_v2(db, "rtree", &rtreeModule, c, 0);
    +  }
    +  if( rc==SQLITE_OK ){
    +    void *c = (void *)RTREE_COORD_INT32;
    +    rc = sqlite3_create_module_v2(db, "rtree_i32", &rtreeModule, c, 0);
    +  }
    +
    +  return rc;
    +}
    +
    +#if !SQLITE_CORE
    +SQLITE_API int sqlite3_extension_init(
    +  sqlite3 *db,
    +  char **pzErrMsg,
    +  const sqlite3_api_routines *pApi
    +){
    +  SQLITE_EXTENSION_INIT2(pApi)
    +  return sqlite3RtreeInit(db);
    +}
    +#endif
    +
    +#endif
    +
    +/************** End of rtree.c ***********************************************/
    +/************** Begin file icu.c *********************************************/
    +/*
    +** 2007 May 6
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** $Id: icu.c,v 1.7 2007/12/13 21:54:11 drh Exp $
    +**
    +** This file implements an integration between the ICU library 
    +** ("International Components for Unicode", an open-source library 
    +** for handling unicode data) and SQLite. The integration uses 
    +** ICU to provide the following to SQLite:
    +**
    +**   * An implementation of the SQL regexp() function (and hence REGEXP
    +**     operator) using the ICU uregex_XX() APIs.
    +**
    +**   * Implementations of the SQL scalar upper() and lower() functions
    +**     for case mapping.
    +**
    +**   * Integration of ICU and SQLite collation seqences.
    +**
    +**   * An implementation of the LIKE operator that uses ICU to 
    +**     provide case-independent matching.
    +*/
    +
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU)
    +
    +/* Include ICU headers */
    +#include <unicode/utypes.h>
    +#include <unicode/uregex.h>
    +#include <unicode/ustring.h>
    +#include <unicode/ucol.h>
    +
    +
    +#ifndef SQLITE_CORE
    +  SQLITE_EXTENSION_INIT1
    +#else
    +#endif
    +
    +/*
    +** Maximum length (in bytes) of the pattern in a LIKE or GLOB
    +** operator.
    +*/
    +#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH
    +# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000
    +#endif
    +
    +/*
    +** Version of sqlite3_free() that is always a function, never a macro.
    +*/
    +static void xFree(void *p){
    +  sqlite3_free(p);
    +}
    +
    +/*
    +** Compare two UTF-8 strings for equality where the first string is
    +** a "LIKE" expression. Return true (1) if they are the same and 
    +** false (0) if they are different.
    +*/
    +static int icuLikeCompare(
    +  const uint8_t *zPattern,   /* LIKE pattern */
    +  const uint8_t *zString,    /* The UTF-8 string to compare against */
    +  const UChar32 uEsc         /* The escape character */
    +){
    +  static const int MATCH_ONE = (UChar32)'_';
    +  static const int MATCH_ALL = (UChar32)'%';
    +
    +  int iPattern = 0;       /* Current byte index in zPattern */
    +  int iString = 0;        /* Current byte index in zString */
    +
    +  int prevEscape = 0;     /* True if the previous character was uEsc */
    +
    +  while( zPattern[iPattern]!=0 ){
    +
    +    /* Read (and consume) the next character from the input pattern. */
    +    UChar32 uPattern;
    +    U8_NEXT_UNSAFE(zPattern, iPattern, uPattern);
    +    assert(uPattern!=0);
    +
    +    /* There are now 4 possibilities:
    +    **
    +    **     1. uPattern is an unescaped match-all character "%",
    +    **     2. uPattern is an unescaped match-one character "_",
    +    **     3. uPattern is an unescaped escape character, or
    +    **     4. uPattern is to be handled as an ordinary character
    +    */
    +    if( !prevEscape && uPattern==MATCH_ALL ){
    +      /* Case 1. */
    +      uint8_t c;
    +
    +      /* Skip any MATCH_ALL or MATCH_ONE characters that follow a
    +      ** MATCH_ALL. For each MATCH_ONE, skip one character in the 
    +      ** test string.
    +      */
    +      while( (c=zPattern[iPattern]) == MATCH_ALL || c == MATCH_ONE ){
    +        if( c==MATCH_ONE ){
    +          if( zString[iString]==0 ) return 0;
    +          U8_FWD_1_UNSAFE(zString, iString);
    +        }
    +        iPattern++;
    +      }
    +
    +      if( zPattern[iPattern]==0 ) return 1;
    +
    +      while( zString[iString] ){
    +        if( icuLikeCompare(&zPattern[iPattern], &zString[iString], uEsc) ){
    +          return 1;
    +        }
    +        U8_FWD_1_UNSAFE(zString, iString);
    +      }
    +      return 0;
    +
    +    }else if( !prevEscape && uPattern==MATCH_ONE ){
    +      /* Case 2. */
    +      if( zString[iString]==0 ) return 0;
    +      U8_FWD_1_UNSAFE(zString, iString);
    +
    +    }else if( !prevEscape && uPattern==uEsc){
    +      /* Case 3. */
    +      prevEscape = 1;
    +
    +    }else{
    +      /* Case 4. */
    +      UChar32 uString;
    +      U8_NEXT_UNSAFE(zString, iString, uString);
    +      uString = u_foldCase(uString, U_FOLD_CASE_DEFAULT);
    +      uPattern = u_foldCase(uPattern, U_FOLD_CASE_DEFAULT);
    +      if( uString!=uPattern ){
    +        return 0;
    +      }
    +      prevEscape = 0;
    +    }
    +  }
    +
    +  return zString[iString]==0;
    +}
    +
    +/*
    +** Implementation of the like() SQL function.  This function implements
    +** the build-in LIKE operator.  The first argument to the function is the
    +** pattern and the second argument is the string.  So, the SQL statements:
    +**
    +**       A LIKE B
    +**
    +** is implemented as like(B, A). If there is an escape character E, 
    +**
    +**       A LIKE B ESCAPE E
    +**
    +** is mapped to like(B, A, E).
    +*/
    +static void icuLikeFunc(
    +  sqlite3_context *context, 
    +  int argc, 
    +  sqlite3_value **argv
    +){
    +  const unsigned char *zA = sqlite3_value_text(argv[0]);
    +  const unsigned char *zB = sqlite3_value_text(argv[1]);
    +  UChar32 uEsc = 0;
    +
    +  /* Limit the length of the LIKE or GLOB pattern to avoid problems
    +  ** of deep recursion and N*N behavior in patternCompare().
    +  */
    +  if( sqlite3_value_bytes(argv[0])>SQLITE_MAX_LIKE_PATTERN_LENGTH ){
    +    sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
    +    return;
    +  }
    +
    +
    +  if( argc==3 ){
    +    /* The escape character string must consist of a single UTF-8 character.
    +    ** Otherwise, return an error.
    +    */
    +    int nE= sqlite3_value_bytes(argv[2]);
    +    const unsigned char *zE = sqlite3_value_text(argv[2]);
    +    int i = 0;
    +    if( zE==0 ) return;
    +    U8_NEXT(zE, i, nE, uEsc);
    +    if( i!=nE){
    +      sqlite3_result_error(context, 
    +          "ESCAPE expression must be a single character", -1);
    +      return;
    +    }
    +  }
    +
    +  if( zA && zB ){
    +    sqlite3_result_int(context, icuLikeCompare(zA, zB, uEsc));
    +  }
    +}
    +
    +/*
    +** This function is called when an ICU function called from within
    +** the implementation of an SQL scalar function returns an error.
    +**
    +** The scalar function context passed as the first argument is 
    +** loaded with an error message based on the following two args.
    +*/
    +static void icuFunctionError(
    +  sqlite3_context *pCtx,       /* SQLite scalar function context */
    +  const char *zName,           /* Name of ICU function that failed */
    +  UErrorCode e                 /* Error code returned by ICU function */
    +){
    +  char zBuf[128];
    +  sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
    +  zBuf[127] = '\0';
    +  sqlite3_result_error(pCtx, zBuf, -1);
    +}
    +
    +/*
    +** Function to delete compiled regexp objects. Registered as
    +** a destructor function with sqlite3_set_auxdata().
    +*/
    +static void icuRegexpDelete(void *p){
    +  URegularExpression *pExpr = (URegularExpression *)p;
    +  uregex_close(pExpr);
    +}
    +
    +/*
    +** Implementation of SQLite REGEXP operator. This scalar function takes
    +** two arguments. The first is a regular expression pattern to compile
    +** the second is a string to match against that pattern. If either 
    +** argument is an SQL NULL, then NULL Is returned. Otherwise, the result
    +** is 1 if the string matches the pattern, or 0 otherwise.
    +**
    +** SQLite maps the regexp() function to the regexp() operator such
    +** that the following two are equivalent:
    +**
    +**     zString REGEXP zPattern
    +**     regexp(zPattern, zString)
    +**
    +** Uses the following ICU regexp APIs:
    +**
    +**     uregex_open()
    +**     uregex_matches()
    +**     uregex_close()
    +*/
    +static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
    +  UErrorCode status = U_ZERO_ERROR;
    +  URegularExpression *pExpr;
    +  UBool res;
    +  const UChar *zString = sqlite3_value_text16(apArg[1]);
    +
    +  /* If the left hand side of the regexp operator is NULL, 
    +  ** then the result is also NULL. 
    +  */
    +  if( !zString ){
    +    return;
    +  }
    +
    +  pExpr = sqlite3_get_auxdata(p, 0);
    +  if( !pExpr ){
    +    const UChar *zPattern = sqlite3_value_text16(apArg[0]);
    +    if( !zPattern ){
    +      return;
    +    }
    +    pExpr = uregex_open(zPattern, -1, 0, 0, &status);
    +
    +    if( U_SUCCESS(status) ){
    +      sqlite3_set_auxdata(p, 0, pExpr, icuRegexpDelete);
    +    }else{
    +      assert(!pExpr);
    +      icuFunctionError(p, "uregex_open", status);
    +      return;
    +    }
    +  }
    +
    +  /* Configure the text that the regular expression operates on. */
    +  uregex_setText(pExpr, zString, -1, &status);
    +  if( !U_SUCCESS(status) ){
    +    icuFunctionError(p, "uregex_setText", status);
    +    return;
    +  }
    +
    +  /* Attempt the match */
    +  res = uregex_matches(pExpr, 0, &status);
    +  if( !U_SUCCESS(status) ){
    +    icuFunctionError(p, "uregex_matches", status);
    +    return;
    +  }
    +
    +  /* Set the text that the regular expression operates on to a NULL
    +  ** pointer. This is not really necessary, but it is tidier than 
    +  ** leaving the regular expression object configured with an invalid
    +  ** pointer after this function returns.
    +  */
    +  uregex_setText(pExpr, 0, 0, &status);
    +
    +  /* Return 1 or 0. */
    +  sqlite3_result_int(p, res ? 1 : 0);
    +}
    +
    +/*
    +** Implementations of scalar functions for case mapping - upper() and 
    +** lower(). Function upper() converts its input to upper-case (ABC).
    +** Function lower() converts to lower-case (abc).
    +**
    +** ICU provides two types of case mapping, "general" case mapping and
    +** "language specific". Refer to ICU documentation for the differences
    +** between the two.
    +**
    +** To utilise "general" case mapping, the upper() or lower() scalar 
    +** functions are invoked with one argument:
    +**
    +**     upper('ABC') -> 'abc'
    +**     lower('abc') -> 'ABC'
    +**
    +** To access ICU "language specific" case mapping, upper() or lower()
    +** should be invoked with two arguments. The second argument is the name
    +** of the locale to use. Passing an empty string ("") or SQL NULL value
    +** as the second argument is the same as invoking the 1 argument version
    +** of upper() or lower().
    +**
    +**     lower('I', 'en_us') -> 'i'
    +**     lower('I', 'tr_tr') -> 'ı' (small dotless i)
    +**
    +** http://www.icu-project.org/userguide/posix.html#case_mappings
    +*/
    +static void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){
    +  const UChar *zInput;
    +  UChar *zOutput;
    +  int nInput;
    +  int nOutput;
    +
    +  UErrorCode status = U_ZERO_ERROR;
    +  const char *zLocale = 0;
    +
    +  assert(nArg==1 || nArg==2);
    +  if( nArg==2 ){
    +    zLocale = (const char *)sqlite3_value_text(apArg[1]);
    +  }
    +
    +  zInput = sqlite3_value_text16(apArg[0]);
    +  if( !zInput ){
    +    return;
    +  }
    +  nInput = sqlite3_value_bytes16(apArg[0]);
    +
    +  nOutput = nInput * 2 + 2;
    +  zOutput = sqlite3_malloc(nOutput);
    +  if( !zOutput ){
    +    return;
    +  }
    +
    +  if( sqlite3_user_data(p) ){
    +    u_strToUpper(zOutput, nOutput/2, zInput, nInput/2, zLocale, &status);
    +  }else{
    +    u_strToLower(zOutput, nOutput/2, zInput, nInput/2, zLocale, &status);
    +  }
    +
    +  if( !U_SUCCESS(status) ){
    +    icuFunctionError(p, "u_strToLower()/u_strToUpper", status);
    +    return;
    +  }
    +
    +  sqlite3_result_text16(p, zOutput, -1, xFree);
    +}
    +
    +/*
    +** Collation sequence destructor function. The pCtx argument points to
    +** a UCollator structure previously allocated using ucol_open().
    +*/
    +static void icuCollationDel(void *pCtx){
    +  UCollator *p = (UCollator *)pCtx;
    +  ucol_close(p);
    +}
    +
    +/*
    +** Collation sequence comparison function. The pCtx argument points to
    +** a UCollator structure previously allocated using ucol_open().
    +*/
    +static int icuCollationColl(
    +  void *pCtx,
    +  int nLeft,
    +  const void *zLeft,
    +  int nRight,
    +  const void *zRight
    +){
    +  UCollationResult res;
    +  UCollator *p = (UCollator *)pCtx;
    +  res = ucol_strcoll(p, (UChar *)zLeft, nLeft/2, (UChar *)zRight, nRight/2);
    +  switch( res ){
    +    case UCOL_LESS:    return -1;
    +    case UCOL_GREATER: return +1;
    +    case UCOL_EQUAL:   return 0;
    +  }
    +  assert(!"Unexpected return value from ucol_strcoll()");
    +  return 0;
    +}
    +
    +/*
    +** Implementation of the scalar function icu_load_collation().
    +**
    +** This scalar function is used to add ICU collation based collation 
    +** types to an SQLite database connection. It is intended to be called
    +** as follows:
    +**
    +**     SELECT icu_load_collation(<locale>, <collation-name>);
    +**
    +** Where <locale> is a string containing an ICU locale identifier (i.e.
    +** "en_AU", "tr_TR" etc.) and <collation-name> is the name of the
    +** collation sequence to create.
    +*/
    +static void icuLoadCollation(
    +  sqlite3_context *p, 
    +  int nArg, 
    +  sqlite3_value **apArg
    +){
    +  sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);
    +  UErrorCode status = U_ZERO_ERROR;
    +  const char *zLocale;      /* Locale identifier - (eg. "jp_JP") */
    +  const char *zName;        /* SQL Collation sequence name (eg. "japanese") */
    +  UCollator *pUCollator;    /* ICU library collation object */
    +  int rc;                   /* Return code from sqlite3_create_collation_x() */
    +
    +  assert(nArg==2);
    +  zLocale = (const char *)sqlite3_value_text(apArg[0]);
    +  zName = (const char *)sqlite3_value_text(apArg[1]);
    +
    +  if( !zLocale || !zName ){
    +    return;
    +  }
    +
    +  pUCollator = ucol_open(zLocale, &status);
    +  if( !U_SUCCESS(status) ){
    +    icuFunctionError(p, "ucol_open", status);
    +    return;
    +  }
    +  assert(p);
    +
    +  rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator, 
    +      icuCollationColl, icuCollationDel
    +  );
    +  if( rc!=SQLITE_OK ){
    +    ucol_close(pUCollator);
    +    sqlite3_result_error(p, "Error registering collation function", -1);
    +  }
    +}
    +
    +/*
    +** Register the ICU extension functions with database db.
    +*/
    +SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
    +  struct IcuScalar {
    +    const char *zName;                        /* Function name */
    +    int nArg;                                 /* Number of arguments */
    +    int enc;                                  /* Optimal text encoding */
    +    void *pContext;                           /* sqlite3_user_data() context */
    +    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
    +  } scalars[] = {
    +    {"regexp",-1, SQLITE_ANY,          0, icuRegexpFunc},
    +
    +    {"lower",  1, SQLITE_UTF16,        0, icuCaseFunc16},
    +    {"lower",  2, SQLITE_UTF16,        0, icuCaseFunc16},
    +    {"upper",  1, SQLITE_UTF16, (void*)1, icuCaseFunc16},
    +    {"upper",  2, SQLITE_UTF16, (void*)1, icuCaseFunc16},
    +
    +    {"lower",  1, SQLITE_UTF8,         0, icuCaseFunc16},
    +    {"lower",  2, SQLITE_UTF8,         0, icuCaseFunc16},
    +    {"upper",  1, SQLITE_UTF8,  (void*)1, icuCaseFunc16},
    +    {"upper",  2, SQLITE_UTF8,  (void*)1, icuCaseFunc16},
    +
    +    {"like",   2, SQLITE_UTF8,         0, icuLikeFunc},
    +    {"like",   3, SQLITE_UTF8,         0, icuLikeFunc},
    +
    +    {"icu_load_collation",  2, SQLITE_UTF8, (void*)db, icuLoadCollation},
    +  };
    +
    +  int rc = SQLITE_OK;
    +  int i;
    +
    +  for(i=0; rc==SQLITE_OK && i<(sizeof(scalars)/sizeof(struct IcuScalar)); i++){
    +    struct IcuScalar *p = &scalars[i];
    +    rc = sqlite3_create_function(
    +        db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0
    +    );
    +  }
    +
    +  return rc;
    +}
    +
    +#if !SQLITE_CORE
    +SQLITE_API int sqlite3_extension_init(
    +  sqlite3 *db, 
    +  char **pzErrMsg,
    +  const sqlite3_api_routines *pApi
    +){
    +  SQLITE_EXTENSION_INIT2(pApi)
    +  return sqlite3IcuInit(db);
    +}
    +#endif
    +
    +#endif
    +
    +/************** End of icu.c *************************************************/
    +/************** Begin file fts3_icu.c ****************************************/
    +/*
    +** 2007 June 22
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This file implements a tokenizer for fts3 based on the ICU library.
    +** 
    +** $Id: fts3_icu.c,v 1.3 2008/09/01 18:34:20 danielk1977 Exp $
    +*/
    +
    +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    +#ifdef SQLITE_ENABLE_ICU
    +
    +
    +#include <unicode/ubrk.h>
    +#include <unicode/utf16.h>
    +
    +typedef struct IcuTokenizer IcuTokenizer;
    +typedef struct IcuCursor IcuCursor;
    +
    +struct IcuTokenizer {
    +  sqlite3_tokenizer base;
    +  char *zLocale;
    +};
    +
    +struct IcuCursor {
    +  sqlite3_tokenizer_cursor base;
    +
    +  UBreakIterator *pIter;      /* ICU break-iterator object */
    +  int nChar;                  /* Number of UChar elements in pInput */
    +  UChar *aChar;               /* Copy of input using utf-16 encoding */
    +  int *aOffset;               /* Offsets of each character in utf-8 input */
    +
    +  int nBuffer;
    +  char *zBuffer;
    +
    +  int iToken;
    +};
    +
    +/*
    +** Create a new tokenizer instance.
    +*/
    +static int icuCreate(
    +  int argc,                            /* Number of entries in argv[] */
    +  const char * const *argv,            /* Tokenizer creation arguments */
    +  sqlite3_tokenizer **ppTokenizer      /* OUT: Created tokenizer */
    +){
    +  IcuTokenizer *p;
    +  int n = 0;
    +
    +  if( argc>0 ){
    +    n = strlen(argv[0])+1;
    +  }
    +  p = (IcuTokenizer *)sqlite3_malloc(sizeof(IcuTokenizer)+n);
    +  if( !p ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(p, 0, sizeof(IcuTokenizer));
    +
    +  if( n ){
    +    p->zLocale = (char *)&p[1];
    +    memcpy(p->zLocale, argv[0], n);
    +  }
    +
    +  *ppTokenizer = (sqlite3_tokenizer *)p;
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Destroy a tokenizer
    +*/
    +static int icuDestroy(sqlite3_tokenizer *pTokenizer){
    +  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;
    +  sqlite3_free(p);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Prepare to begin tokenizing a particular string.  The input
    +** string to be tokenized is pInput[0..nBytes-1].  A cursor
    +** used to incrementally tokenize this string is returned in 
    +** *ppCursor.
    +*/
    +static int icuOpen(
    +  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
    +  const char *zInput,                    /* Input string */
    +  int nInput,                            /* Length of zInput in bytes */
    +  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
    +){
    +  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;
    +  IcuCursor *pCsr;
    +
    +  const int32_t opt = U_FOLD_CASE_DEFAULT;
    +  UErrorCode status = U_ZERO_ERROR;
    +  int nChar;
    +
    +  UChar32 c;
    +  int iInput = 0;
    +  int iOut = 0;
    +
    +  *ppCursor = 0;
    +
    +  if( nInput<0 ){
    +    nInput = strlen(zInput);
    +  }
    +  nChar = nInput+1;
    +  pCsr = (IcuCursor *)sqlite3_malloc(
    +      sizeof(IcuCursor) +                /* IcuCursor */
    +      nChar * sizeof(UChar) +            /* IcuCursor.aChar[] */
    +      (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */
    +  );
    +  if( !pCsr ){
    +    return SQLITE_NOMEM;
    +  }
    +  memset(pCsr, 0, sizeof(IcuCursor));
    +  pCsr->aChar = (UChar *)&pCsr[1];
    +  pCsr->aOffset = (int *)&pCsr->aChar[nChar];
    +
    +  pCsr->aOffset[iOut] = iInput;
    +  U8_NEXT(zInput, iInput, nInput, c); 
    +  while( c>0 ){
    +    int isError = 0;
    +    c = u_foldCase(c, opt);
    +    U16_APPEND(pCsr->aChar, iOut, nChar, c, isError);
    +    if( isError ){
    +      sqlite3_free(pCsr);
    +      return SQLITE_ERROR;
    +    }
    +    pCsr->aOffset[iOut] = iInput;
    +
    +    if( iInput<nInput ){
    +      U8_NEXT(zInput, iInput, nInput, c);
    +    }else{
    +      c = 0;
    +    }
    +  }
    +
    +  pCsr->pIter = ubrk_open(UBRK_WORD, p->zLocale, pCsr->aChar, iOut, &status);
    +  if( !U_SUCCESS(status) ){
    +    sqlite3_free(pCsr);
    +    return SQLITE_ERROR;
    +  }
    +  pCsr->nChar = iOut;
    +
    +  ubrk_first(pCsr->pIter);
    +  *ppCursor = (sqlite3_tokenizer_cursor *)pCsr;
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Close a tokenization cursor previously opened by a call to icuOpen().
    +*/
    +static int icuClose(sqlite3_tokenizer_cursor *pCursor){
    +  IcuCursor *pCsr = (IcuCursor *)pCursor;
    +  ubrk_close(pCsr->pIter);
    +  sqlite3_free(pCsr->zBuffer);
    +  sqlite3_free(pCsr);
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** Extract the next token from a tokenization cursor.
    +*/
    +static int icuNext(
    +  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */
    +  const char **ppToken,               /* OUT: *ppToken is the token text */
    +  int *pnBytes,                       /* OUT: Number of bytes in token */
    +  int *piStartOffset,                 /* OUT: Starting offset of token */
    +  int *piEndOffset,                   /* OUT: Ending offset of token */
    +  int *piPosition                     /* OUT: Position integer of token */
    +){
    +  IcuCursor *pCsr = (IcuCursor *)pCursor;
    +
    +  int iStart = 0;
    +  int iEnd = 0;
    +  int nByte = 0;
    +
    +  while( iStart==iEnd ){
    +    UChar32 c;
    +
    +    iStart = ubrk_current(pCsr->pIter);
    +    iEnd = ubrk_next(pCsr->pIter);
    +    if( iEnd==UBRK_DONE ){
    +      return SQLITE_DONE;
    +    }
    +
    +    while( iStart<iEnd ){
    +      int iWhite = iStart;
    +      U8_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
    +      if( u_isspace(c) ){
    +        iStart = iWhite;
    +      }else{
    +        break;
    +      }
    +    }
    +    assert(iStart<=iEnd);
    +  }
    +
    +  do {
    +    UErrorCode status = U_ZERO_ERROR;
    +    if( nByte ){
    +      char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
    +      if( !zNew ){
    +        return SQLITE_NOMEM;
    +      }
    +      pCsr->zBuffer = zNew;
    +      pCsr->nBuffer = nByte;
    +    }
    +
    +    u_strToUTF8(
    +        pCsr->zBuffer, pCsr->nBuffer, &nByte,    /* Output vars */
    +        &pCsr->aChar[iStart], iEnd-iStart,       /* Input vars */
    +        &status                                  /* Output success/failure */
    +    );
    +  } while( nByte>pCsr->nBuffer );
    +
    +  *ppToken = pCsr->zBuffer;
    +  *pnBytes = nByte;
    +  *piStartOffset = pCsr->aOffset[iStart];
    +  *piEndOffset = pCsr->aOffset[iEnd];
    +  *piPosition = pCsr->iToken++;
    +
    +  return SQLITE_OK;
    +}
    +
    +/*
    +** The set of routines that implement the simple tokenizer
    +*/
    +static const sqlite3_tokenizer_module icuTokenizerModule = {
    +  0,                           /* iVersion */
    +  icuCreate,                   /* xCreate  */
    +  icuDestroy,                  /* xCreate  */
    +  icuOpen,                     /* xOpen    */
    +  icuClose,                    /* xClose   */
    +  icuNext,                     /* xNext    */
    +};
    +
    +/*
    +** Set *ppModule to point at the implementation of the ICU tokenizer.
    +*/
    +SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
    +  sqlite3_tokenizer_module const**ppModule
    +){
    +  *ppModule = &icuTokenizerModule;
    +}
    +
    +#endif /* defined(SQLITE_ENABLE_ICU) */
    +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
    +
    +/************** End of fts3_icu.c ********************************************/
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.h b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.h
    new file mode 100644
    index 0000000..fc015b0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3.h
    @@ -0,0 +1,5772 @@
    +/*
    +** 2001 September 15
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the interface that the SQLite library
    +** presents to client programs.  If a C-function, structure, datatype,
    +** or constant definition does not appear in this file, then it is
    +** not a published API of SQLite, is subject to change without
    +** notice, and should not be referenced by programs that use SQLite.
    +**
    +** Some of the definitions that are in this file are marked as
    +** "experimental".  Experimental interfaces are normally new
    +** features recently added to SQLite.  We do not anticipate changes
    +** to experimental interfaces but reserve the right to make minor changes
    +** if experience from use "in the wild" suggest such changes are prudent.
    +**
    +** The official C-language API documentation for SQLite is derived
    +** from comments in this file.  This file is the authoritative source
    +** on how SQLite interfaces are suppose to operate.
    +**
    +** The name of this file under configuration management is "sqlite.h.in".
    +** The makefile makes some minor changes to this file (such as inserting
    +** the version number) and changes its name to "sqlite3.h" as
    +** part of the build process.
    +*/
    +#ifndef _SQLITE3_H_
    +#define _SQLITE3_H_
    +#include <stdarg.h>     /* Needed for the definition of va_list */
    +
    +/*
    +** Make sure we can call this stuff from C++.
    +*/
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
    +
    +/*
    +** Add the ability to override 'extern'
    +*/
    +#ifndef SQLITE_EXTERN
    +# define SQLITE_EXTERN extern
    +#endif
    +
    +#ifndef SQLITE_API
    +# define SQLITE_API
    +#endif
    +
    +
    +/*
    +** These no-op macros are used in front of interfaces to mark those
    +** interfaces as either deprecated or experimental.  New applications
    +** should not use deprecated interfaces - they are support for backwards
    +** compatibility only.  Application writers should be aware that
    +** experimental interfaces are subject to change in point releases.
    +**
    +** These macros used to resolve to various kinds of compiler magic that
    +** would generate warning messages when they were used.  But that
    +** compiler magic ended up generating such a flurry of bug reports
    +** that we have taken it all out and gone back to using simple
    +** noop macros.
    +*/
    +#define SQLITE_DEPRECATED
    +#define SQLITE_EXPERIMENTAL
    +
    +/*
    +** Ensure these symbols were not defined by some previous header file.
    +*/
    +#ifdef SQLITE_VERSION
    +# undef SQLITE_VERSION
    +#endif
    +#ifdef SQLITE_VERSION_NUMBER
    +# undef SQLITE_VERSION_NUMBER
    +#endif
    +
    +/*
    +** CAPI3REF: Compile-Time Library Version Numbers {H10010} <S60100>
    +**
    +** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in
    +** the sqlite3.h file specify the version of SQLite with which
    +** that header file is associated.
    +**
    +** The "version" of SQLite is a string of the form "W.X.Y" or "W.X.Y.Z".
    +** The W value is major version number and is always 3 in SQLite3.
    +** The W value only changes when backwards compatibility is
    +** broken and we intend to never break backwards compatibility.
    +** The X value is the minor version number and only changes when
    +** there are major feature enhancements that are forwards compatible
    +** but not backwards compatible.
    +** The Y value is the release number and is incremented with
    +** each release but resets back to 0 whenever X is incremented.
    +** The Z value only appears on branch releases.
    +**
    +** The SQLITE_VERSION_NUMBER is an integer that is computed as
    +** follows:
    +**
    +** <blockquote><pre>
    +** SQLITE_VERSION_NUMBER = W*1000000 + X*1000 + Y
    +** </pre></blockquote>
    +**
    +** Since version 3.6.18, SQLite source code has been stored in the
    +** <a href="http://www.fossil-scm.org/">fossil configuration management
    +** system</a>.  The SQLITE_SOURCE_ID
    +** macro is a string which identifies a particular check-in of SQLite
    +** within its configuration management system.  The string contains the
    +** date and time of the check-in (UTC) and an SHA1 hash of the entire
    +** source tree.
    +**
    +** See also: [sqlite3_libversion()],
    +** [sqlite3_libversion_number()], [sqlite3_sourceid()],
    +** [sqlite_version()] and [sqlite_source_id()].
    +**
    +** Requirements: [H10011] [H10014]
    +*/
    +#define SQLITE_VERSION        "3.6.20"
    +#define SQLITE_VERSION_NUMBER 3006020
    +#define SQLITE_SOURCE_ID      "2009-11-04 13:30:02 eb7a544fe49d1626bacecfe53ddc03fe082e3243"
    +
    +/*
    +** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
    +** KEYWORDS: sqlite3_version
    +**
    +** These interfaces provide the same information as the [SQLITE_VERSION],
    +** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] #defines in the header,
    +** but are associated with the library instead of the header file.  Cautious
    +** programmers might include assert() statements in their application to
    +** verify that values returned by these interfaces match the macros in
    +** the header, and thus insure that the application is
    +** compiled with matching library and header files.
    +**
    +** <blockquote><pre>
    +** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
    +** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
    +** assert( strcmp(sqlite3_libversion,SQLITE_VERSION)==0 );
    +** </pre></blockquote>
    +**
    +** The sqlite3_libversion() function returns the same information as is
    +** in the sqlite3_version[] string constant.  The function is provided
    +** for use in DLLs since DLL users usually do not have direct access to string
    +** constants within the DLL.  Similarly, the sqlite3_sourceid() function
    +** returns the same information as is in the [SQLITE_SOURCE_ID] #define of
    +** the header file.
    +**
    +** See also: [sqlite_version()] and [sqlite_source_id()].
    +**
    +** Requirements: [H10021] [H10022] [H10023]
    +*/
    +SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
    +SQLITE_API const char *sqlite3_libversion(void);
    +SQLITE_API const char *sqlite3_sourceid(void);
    +SQLITE_API int sqlite3_libversion_number(void);
    +
    +/*
    +** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} <S60100>
    +**
    +** SQLite can be compiled with or without mutexes.  When
    +** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
    +** are enabled and SQLite is threadsafe.  When the
    +** [SQLITE_THREADSAFE] macro is 0, 
    +** the mutexes are omitted.  Without the mutexes, it is not safe
    +** to use SQLite concurrently from more than one thread.
    +**
    +** Enabling mutexes incurs a measurable performance penalty.
    +** So if speed is of utmost importance, it makes sense to disable
    +** the mutexes.  But for maximum safety, mutexes should be enabled.
    +** The default behavior is for mutexes to be enabled.
    +**
    +** This interface can be used by an application to make sure that the
    +** version of SQLite that it is linking against was compiled with
    +** the desired setting of the [SQLITE_THREADSAFE] macro.
    +**
    +** This interface only reports on the compile-time mutex setting
    +** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with
    +** SQLITE_THREADSAFE=1 then mutexes are enabled by default but
    +** can be fully or partially disabled using a call to [sqlite3_config()]
    +** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
    +** or [SQLITE_CONFIG_MUTEX].  The return value of this function shows
    +** only the default compile-time setting, not any run-time changes
    +** to that setting.
    +**
    +** See the [threading mode] documentation for additional information.
    +**
    +** Requirements: [H10101] [H10102]
    +*/
    +SQLITE_API int sqlite3_threadsafe(void);
    +
    +/*
    +** CAPI3REF: Database Connection Handle {H12000} <S40200>
    +** KEYWORDS: {database connection} {database connections}
    +**
    +** Each open SQLite database is represented by a pointer to an instance of
    +** the opaque structure named "sqlite3".  It is useful to think of an sqlite3
    +** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
    +** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
    +** is its destructor.  There are many other interfaces (such as
    +** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
    +** [sqlite3_busy_timeout()] to name but three) that are methods on an
    +** sqlite3 object.
    +*/
    +typedef struct sqlite3 sqlite3;
    +
    +/*
    +** CAPI3REF: 64-Bit Integer Types {H10200} <S10110>
    +** KEYWORDS: sqlite_int64 sqlite_uint64
    +**
    +** Because there is no cross-platform way to specify 64-bit integer types
    +** SQLite includes typedefs for 64-bit signed and unsigned integers.
    +**
    +** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
    +** The sqlite_int64 and sqlite_uint64 types are supported for backwards
    +** compatibility only.
    +**
    +** Requirements: [H10201] [H10202]
    +*/
    +#ifdef SQLITE_INT64_TYPE
    +  typedef SQLITE_INT64_TYPE sqlite_int64;
    +  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
    +#elif defined(_MSC_VER) || defined(__BORLANDC__)
    +  typedef __int64 sqlite_int64;
    +  typedef unsigned __int64 sqlite_uint64;
    +#else
    +  typedef long long int sqlite_int64;
    +  typedef unsigned long long int sqlite_uint64;
    +#endif
    +typedef sqlite_int64 sqlite3_int64;
    +typedef sqlite_uint64 sqlite3_uint64;
    +
    +/*
    +** If compiling for a processor that lacks floating point support,
    +** substitute integer for floating-point.
    +*/
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +# define double sqlite3_int64
    +#endif
    +
    +/*
    +** CAPI3REF: Closing A Database Connection {H12010} <S30100><S40200>
    +**
    +** This routine is the destructor for the [sqlite3] object.
    +**
    +** Applications must [sqlite3_finalize | finalize] all [prepared statements]
    +** and [sqlite3_blob_close | close] all [BLOB handles] associated with
    +** the [sqlite3] object prior to attempting to close the object.
    +**
    +** If [sqlite3_close()] is invoked while a transaction is open,
    +** the transaction is automatically rolled back.
    +**
    +** The C parameter to [sqlite3_close(C)] must be either a NULL
    +** pointer or an [sqlite3] object pointer obtained
    +** from [sqlite3_open()], [sqlite3_open16()], or
    +** [sqlite3_open_v2()], and not previously closed.
    +**
    +** Requirements:
    +** [H12011] [H12012] [H12013] [H12014] [H12015] [H12019]
    +*/
    +SQLITE_API int sqlite3_close(sqlite3 *);
    +
    +/*
    +** The type for a callback function.
    +** This is legacy and deprecated.  It is included for historical
    +** compatibility and is not documented.
    +*/
    +typedef int (*sqlite3_callback)(void*,int,char**, char**);
    +
    +/*
    +** CAPI3REF: One-Step Query Execution Interface {H12100} <S10000>
    +**
    +** The sqlite3_exec() interface is a convenient way of running one or more
    +** SQL statements without having to write a lot of C code.  The UTF-8 encoded
    +** SQL statements are passed in as the second parameter to sqlite3_exec().
    +** The statements are evaluated one by one until either an error or
    +** an interrupt is encountered, or until they are all done.  The 3rd parameter
    +** is an optional callback that is invoked once for each row of any query
    +** results produced by the SQL statements.  The 5th parameter tells where
    +** to write any error messages.
    +**
    +** The error message passed back through the 5th parameter is held
    +** in memory obtained from [sqlite3_malloc()].  To avoid a memory leak,
    +** the calling application should call [sqlite3_free()] on any error
    +** message returned through the 5th parameter when it has finished using
    +** the error message.
    +**
    +** If the SQL statement in the 2nd parameter is NULL or an empty string
    +** or a string containing only whitespace and comments, then no SQL
    +** statements are evaluated and the database is not changed.
    +**
    +** The sqlite3_exec() interface is implemented in terms of
    +** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].
    +** The sqlite3_exec() routine does nothing to the database that cannot be done
    +** by [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].
    +**
    +** The first parameter to [sqlite3_exec()] must be an valid and open
    +** [database connection].
    +**
    +** The database connection must not be closed while
    +** [sqlite3_exec()] is running.
    +**
    +** The calling function should use [sqlite3_free()] to free
    +** the memory that *errmsg is left pointing at once the error
    +** message is no longer needed.
    +**
    +** The SQL statement text in the 2nd parameter to [sqlite3_exec()]
    +** must remain unchanged while [sqlite3_exec()] is running.
    +**
    +** Requirements:
    +** [H12101] [H12102] [H12104] [H12105] [H12107] [H12110] [H12113] [H12116]
    +** [H12119] [H12122] [H12125] [H12131] [H12134] [H12137] [H12138]
    +*/
    +SQLITE_API int sqlite3_exec(
    +  sqlite3*,                                  /* An open database */
    +  const char *sql,                           /* SQL to be evaluated */
    +  int (*callback)(void*,int,char**,char**),  /* Callback function */
    +  void *,                                    /* 1st argument to callback */
    +  char **errmsg                              /* Error msg written here */
    +);
    +
    +/*
    +** CAPI3REF: Result Codes {H10210} <S10700>
    +** KEYWORDS: SQLITE_OK {error code} {error codes}
    +** KEYWORDS: {result code} {result codes}
    +**
    +** Many SQLite functions return an integer result code from the set shown
    +** here in order to indicates success or failure.
    +**
    +** New error codes may be added in future versions of SQLite.
    +**
    +** See also: [SQLITE_IOERR_READ | extended result codes]
    +*/
    +#define SQLITE_OK           0   /* Successful result */
    +/* beginning-of-error-codes */
    +#define SQLITE_ERROR        1   /* SQL error or missing database */
    +#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
    +#define SQLITE_PERM         3   /* Access permission denied */
    +#define SQLITE_ABORT        4   /* Callback routine requested an abort */
    +#define SQLITE_BUSY         5   /* The database file is locked */
    +#define SQLITE_LOCKED       6   /* A table in the database is locked */
    +#define SQLITE_NOMEM        7   /* A malloc() failed */
    +#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
    +#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
    +#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
    +#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
    +#define SQLITE_NOTFOUND    12   /* NOT USED. Table or record not found */
    +#define SQLITE_FULL        13   /* Insertion failed because database is full */
    +#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
    +#define SQLITE_PROTOCOL    15   /* NOT USED. Database lock protocol error */
    +#define SQLITE_EMPTY       16   /* Database is empty */
    +#define SQLITE_SCHEMA      17   /* The database schema changed */
    +#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
    +#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
    +#define SQLITE_MISMATCH    20   /* Data type mismatch */
    +#define SQLITE_MISUSE      21   /* Library used incorrectly */
    +#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
    +#define SQLITE_AUTH        23   /* Authorization denied */
    +#define SQLITE_FORMAT      24   /* Auxiliary database format error */
    +#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
    +#define SQLITE_NOTADB      26   /* File opened that is not a database file */
    +#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
    +#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
    +/* end-of-error-codes */
    +
    +/*
    +** CAPI3REF: Extended Result Codes {H10220} <S10700>
    +** KEYWORDS: {extended error code} {extended error codes}
    +** KEYWORDS: {extended result code} {extended result codes}
    +**
    +** In its default configuration, SQLite API routines return one of 26 integer
    +** [SQLITE_OK | result codes].  However, experience has shown that many of
    +** these result codes are too coarse-grained.  They do not provide as
    +** much information about problems as programmers might like.  In an effort to
    +** address this, newer versions of SQLite (version 3.3.8 and later) include
    +** support for additional result codes that provide more detailed information
    +** about errors. The extended result codes are enabled or disabled
    +** on a per database connection basis using the
    +** [sqlite3_extended_result_codes()] API.
    +**
    +** Some of the available extended result codes are listed here.
    +** One may expect the number of extended result codes will be expand
    +** over time.  Software that uses extended result codes should expect
    +** to see new result codes in future releases of SQLite.
    +**
    +** The SQLITE_OK result code will never be extended.  It will always
    +** be exactly zero.
    +*/
    +#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
    +#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
    +#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
    +#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
    +#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
    +#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
    +#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))
    +#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))
    +#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))
    +#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))
    +#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))
    +#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))
    +#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))
    +#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
    +#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))
    +#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))
    +#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))
    +#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED | (1<<8) )
    +
    +/*
    +** CAPI3REF: Flags For File Open Operations {H10230} <H11120> <H12700>
    +**
    +** These bit values are intended for use in the
    +** 3rd parameter to the [sqlite3_open_v2()] interface and
    +** in the 4th parameter to the xOpen method of the
    +** [sqlite3_vfs] object.
    +*/
    +#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */
    +#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */
    +#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */
    +#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */
    +#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */
    +#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */
    +#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */
    +#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */
    +#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */
    +#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */
    +#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */
    +
    +/*
    +** CAPI3REF: Device Characteristics {H10240} <H11120>
    +**
    +** The xDeviceCapabilities method of the [sqlite3_io_methods]
    +** object returns an integer which is a vector of the these
    +** bit values expressing I/O characteristics of the mass storage
    +** device that holds the file that the [sqlite3_io_methods]
    +** refers to.
    +**
    +** The SQLITE_IOCAP_ATOMIC property means that all writes of
    +** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
    +** mean that writes of blocks that are nnn bytes in size and
    +** are aligned to an address which is an integer multiple of
    +** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
    +** that when data is appended to a file, the data is appended
    +** first then the size of the file is extended, never the other
    +** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
    +** information is written to disk in the same order as calls
    +** to xWrite().
    +*/
    +#define SQLITE_IOCAP_ATOMIC          0x00000001
    +#define SQLITE_IOCAP_ATOMIC512       0x00000002
    +#define SQLITE_IOCAP_ATOMIC1K        0x00000004
    +#define SQLITE_IOCAP_ATOMIC2K        0x00000008
    +#define SQLITE_IOCAP_ATOMIC4K        0x00000010
    +#define SQLITE_IOCAP_ATOMIC8K        0x00000020
    +#define SQLITE_IOCAP_ATOMIC16K       0x00000040
    +#define SQLITE_IOCAP_ATOMIC32K       0x00000080
    +#define SQLITE_IOCAP_ATOMIC64K       0x00000100
    +#define SQLITE_IOCAP_SAFE_APPEND     0x00000200
    +#define SQLITE_IOCAP_SEQUENTIAL      0x00000400
    +
    +/*
    +** CAPI3REF: File Locking Levels {H10250} <H11120> <H11310>
    +**
    +** SQLite uses one of these integer values as the second
    +** argument to calls it makes to the xLock() and xUnlock() methods
    +** of an [sqlite3_io_methods] object.
    +*/
    +#define SQLITE_LOCK_NONE          0
    +#define SQLITE_LOCK_SHARED        1
    +#define SQLITE_LOCK_RESERVED      2
    +#define SQLITE_LOCK_PENDING       3
    +#define SQLITE_LOCK_EXCLUSIVE     4
    +
    +/*
    +** CAPI3REF: Synchronization Type Flags {H10260} <H11120>
    +**
    +** When SQLite invokes the xSync() method of an
    +** [sqlite3_io_methods] object it uses a combination of
    +** these integer values as the second argument.
    +**
    +** When the SQLITE_SYNC_DATAONLY flag is used, it means that the
    +** sync operation only needs to flush data to mass storage.  Inode
    +** information need not be flushed. If the lower four bits of the flag
    +** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
    +** If the lower four bits equal SQLITE_SYNC_FULL, that means
    +** to use Mac OS X style fullsync instead of fsync().
    +*/
    +#define SQLITE_SYNC_NORMAL        0x00002
    +#define SQLITE_SYNC_FULL          0x00003
    +#define SQLITE_SYNC_DATAONLY      0x00010
    +
    +/*
    +** CAPI3REF: OS Interface Open File Handle {H11110} <S20110>
    +**
    +** An [sqlite3_file] object represents an open file in the 
    +** [sqlite3_vfs | OS interface layer].  Individual OS interface
    +** implementations will
    +** want to subclass this object by appending additional fields
    +** for their own use.  The pMethods entry is a pointer to an
    +** [sqlite3_io_methods] object that defines methods for performing
    +** I/O operations on the open file.
    +*/
    +typedef struct sqlite3_file sqlite3_file;
    +struct sqlite3_file {
    +  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
    +};
    +
    +/*
    +** CAPI3REF: OS Interface File Virtual Methods Object {H11120} <S20110>
    +**
    +** Every file opened by the [sqlite3_vfs] xOpen method populates an
    +** [sqlite3_file] object (or, more commonly, a subclass of the
    +** [sqlite3_file] object) with a pointer to an instance of this object.
    +** This object defines the methods used to perform various operations
    +** against the open file represented by the [sqlite3_file] object.
    +**
    +** If the xOpen method sets the sqlite3_file.pMethods element 
    +** to a non-NULL pointer, then the sqlite3_io_methods.xClose method
    +** may be invoked even if the xOpen reported that it failed.  The
    +** only way to prevent a call to xClose following a failed xOpen
    +** is for the xOpen to set the sqlite3_file.pMethods element to NULL.
    +**
    +** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
    +** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
    +** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
    +** flag may be ORed in to indicate that only the data of the file
    +** and not its inode needs to be synced.
    +**
    +** The integer values to xLock() and xUnlock() are one of
    +** <ul>
    +** <li> [SQLITE_LOCK_NONE],
    +** <li> [SQLITE_LOCK_SHARED],
    +** <li> [SQLITE_LOCK_RESERVED],
    +** <li> [SQLITE_LOCK_PENDING], or
    +** <li> [SQLITE_LOCK_EXCLUSIVE].
    +** </ul>
    +** xLock() increases the lock. xUnlock() decreases the lock.
    +** The xCheckReservedLock() method checks whether any database connection,
    +** either in this process or in some other process, is holding a RESERVED,
    +** PENDING, or EXCLUSIVE lock on the file.  It returns true
    +** if such a lock exists and false otherwise.
    +**
    +** The xFileControl() method is a generic interface that allows custom
    +** VFS implementations to directly control an open file using the
    +** [sqlite3_file_control()] interface.  The second "op" argument is an
    +** integer opcode.  The third argument is a generic pointer intended to
    +** point to a structure that may contain arguments or space in which to
    +** write return values.  Potential uses for xFileControl() might be
    +** functions to enable blocking locks with timeouts, to change the
    +** locking strategy (for example to use dot-file locks), to inquire
    +** about the status of a lock, or to break stale locks.  The SQLite
    +** core reserves all opcodes less than 100 for its own use.
    +** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
    +** Applications that define a custom xFileControl method should use opcodes
    +** greater than 100 to avoid conflicts.
    +**
    +** The xSectorSize() method returns the sector size of the
    +** device that underlies the file.  The sector size is the
    +** minimum write that can be performed without disturbing
    +** other bytes in the file.  The xDeviceCharacteristics()
    +** method returns a bit vector describing behaviors of the
    +** underlying device:
    +**
    +** <ul>
    +** <li> [SQLITE_IOCAP_ATOMIC]
    +** <li> [SQLITE_IOCAP_ATOMIC512]
    +** <li> [SQLITE_IOCAP_ATOMIC1K]
    +** <li> [SQLITE_IOCAP_ATOMIC2K]
    +** <li> [SQLITE_IOCAP_ATOMIC4K]
    +** <li> [SQLITE_IOCAP_ATOMIC8K]
    +** <li> [SQLITE_IOCAP_ATOMIC16K]
    +** <li> [SQLITE_IOCAP_ATOMIC32K]
    +** <li> [SQLITE_IOCAP_ATOMIC64K]
    +** <li> [SQLITE_IOCAP_SAFE_APPEND]
    +** <li> [SQLITE_IOCAP_SEQUENTIAL]
    +** </ul>
    +**
    +** The SQLITE_IOCAP_ATOMIC property means that all writes of
    +** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
    +** mean that writes of blocks that are nnn bytes in size and
    +** are aligned to an address which is an integer multiple of
    +** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
    +** that when data is appended to a file, the data is appended
    +** first then the size of the file is extended, never the other
    +** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
    +** information is written to disk in the same order as calls
    +** to xWrite().
    +**
    +** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
    +** in the unread portions of the buffer with zeros.  A VFS that
    +** fails to zero-fill short reads might seem to work.  However,
    +** failure to zero-fill short reads will eventually lead to
    +** database corruption.
    +*/
    +typedef struct sqlite3_io_methods sqlite3_io_methods;
    +struct sqlite3_io_methods {
    +  int iVersion;
    +  int (*xClose)(sqlite3_file*);
    +  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
    +  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
    +  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
    +  int (*xSync)(sqlite3_file*, int flags);
    +  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
    +  int (*xLock)(sqlite3_file*, int);
    +  int (*xUnlock)(sqlite3_file*, int);
    +  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
    +  int (*xFileControl)(sqlite3_file*, int op, void *pArg);
    +  int (*xSectorSize)(sqlite3_file*);
    +  int (*xDeviceCharacteristics)(sqlite3_file*);
    +  /* Additional methods may be added in future releases */
    +};
    +
    +/*
    +** CAPI3REF: Standard File Control Opcodes {H11310} <S30800>
    +**
    +** These integer constants are opcodes for the xFileControl method
    +** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
    +** interface.
    +**
    +** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This
    +** opcode causes the xFileControl method to write the current state of
    +** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],
    +** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])
    +** into an integer that the pArg argument points to. This capability
    +** is used during testing and only needs to be supported when SQLITE_TEST
    +** is defined.
    +*/
    +#define SQLITE_FCNTL_LOCKSTATE        1
    +#define SQLITE_GET_LOCKPROXYFILE      2
    +#define SQLITE_SET_LOCKPROXYFILE      3
    +#define SQLITE_LAST_ERRNO             4
    +
    +/*
    +** CAPI3REF: Mutex Handle {H17110} <S20130>
    +**
    +** The mutex module within SQLite defines [sqlite3_mutex] to be an
    +** abstract type for a mutex object.  The SQLite core never looks
    +** at the internal representation of an [sqlite3_mutex].  It only
    +** deals with pointers to the [sqlite3_mutex] object.
    +**
    +** Mutexes are created using [sqlite3_mutex_alloc()].
    +*/
    +typedef struct sqlite3_mutex sqlite3_mutex;
    +
    +/*
    +** CAPI3REF: OS Interface Object {H11140} <S20100>
    +**
    +** An instance of the sqlite3_vfs object defines the interface between
    +** the SQLite core and the underlying operating system.  The "vfs"
    +** in the name of the object stands for "virtual file system".
    +**
    +** The value of the iVersion field is initially 1 but may be larger in
    +** future versions of SQLite.  Additional fields may be appended to this
    +** object when the iVersion value is increased.  Note that the structure
    +** of the sqlite3_vfs object changes in the transaction between
    +** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
    +** modified.
    +**
    +** The szOsFile field is the size of the subclassed [sqlite3_file]
    +** structure used by this VFS.  mxPathname is the maximum length of
    +** a pathname in this VFS.
    +**
    +** Registered sqlite3_vfs objects are kept on a linked list formed by
    +** the pNext pointer.  The [sqlite3_vfs_register()]
    +** and [sqlite3_vfs_unregister()] interfaces manage this list
    +** in a thread-safe way.  The [sqlite3_vfs_find()] interface
    +** searches the list.  Neither the application code nor the VFS
    +** implementation should use the pNext pointer.
    +**
    +** The pNext field is the only field in the sqlite3_vfs
    +** structure that SQLite will ever modify.  SQLite will only access
    +** or modify this field while holding a particular static mutex.
    +** The application should never modify anything within the sqlite3_vfs
    +** object once the object has been registered.
    +**
    +** The zName field holds the name of the VFS module.  The name must
    +** be unique across all VFS modules.
    +**
    +** SQLite will guarantee that the zFilename parameter to xOpen
    +** is either a NULL pointer or string obtained
    +** from xFullPathname().  SQLite further guarantees that
    +** the string will be valid and unchanged until xClose() is
    +** called. Because of the previous sentence,
    +** the [sqlite3_file] can safely store a pointer to the
    +** filename if it needs to remember the filename for some reason.
    +** If the zFilename parameter is xOpen is a NULL pointer then xOpen
    +** must invent its own temporary name for the file.  Whenever the 
    +** xFilename parameter is NULL it will also be the case that the
    +** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
    +**
    +** The flags argument to xOpen() includes all bits set in
    +** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
    +** or [sqlite3_open16()] is used, then flags includes at least
    +** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. 
    +** If xOpen() opens a file read-only then it sets *pOutFlags to
    +** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
    +**
    +** SQLite will also add one of the following flags to the xOpen()
    +** call, depending on the object being opened:
    +**
    +** <ul>
    +** <li>  [SQLITE_OPEN_MAIN_DB]
    +** <li>  [SQLITE_OPEN_MAIN_JOURNAL]
    +** <li>  [SQLITE_OPEN_TEMP_DB]
    +** <li>  [SQLITE_OPEN_TEMP_JOURNAL]
    +** <li>  [SQLITE_OPEN_TRANSIENT_DB]
    +** <li>  [SQLITE_OPEN_SUBJOURNAL]
    +** <li>  [SQLITE_OPEN_MASTER_JOURNAL]
    +** </ul>
    +**
    +** The file I/O implementation can use the object type flags to
    +** change the way it deals with files.  For example, an application
    +** that does not care about crash recovery or rollback might make
    +** the open of a journal file a no-op.  Writes to this journal would
    +** also be no-ops, and any attempt to read the journal would return
    +** SQLITE_IOERR.  Or the implementation might recognize that a database
    +** file will be doing page-aligned sector reads and writes in a random
    +** order and set up its I/O subsystem accordingly.
    +**
    +** SQLite might also add one of the following flags to the xOpen method:
    +**
    +** <ul>
    +** <li> [SQLITE_OPEN_DELETEONCLOSE]
    +** <li> [SQLITE_OPEN_EXCLUSIVE]
    +** </ul>
    +**
    +** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
    +** deleted when it is closed.  The [SQLITE_OPEN_DELETEONCLOSE]
    +** will be set for TEMP  databases, journals and for subjournals.
    +**
    +** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
    +** with the [SQLITE_OPEN_CREATE] flag, which are both directly
    +** analogous to the O_EXCL and O_CREAT flags of the POSIX open()
    +** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the 
    +** SQLITE_OPEN_CREATE, is used to indicate that file should always
    +** be created, and that it is an error if it already exists.
    +** It is <i>not</i> used to indicate the file should be opened 
    +** for exclusive access.
    +**
    +** At least szOsFile bytes of memory are allocated by SQLite
    +** to hold the  [sqlite3_file] structure passed as the third
    +** argument to xOpen.  The xOpen method does not have to
    +** allocate the structure; it should just fill it in.  Note that
    +** the xOpen method must set the sqlite3_file.pMethods to either
    +** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
    +** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
    +** element will be valid after xOpen returns regardless of the success
    +** or failure of the xOpen call.
    +**
    +** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
    +** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
    +** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
    +** to test whether a file is at least readable.   The file can be a
    +** directory.
    +**
    +** SQLite will always allocate at least mxPathname+1 bytes for the
    +** output buffer xFullPathname.  The exact size of the output buffer
    +** is also passed as a parameter to both  methods. If the output buffer
    +** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
    +** handled as a fatal error by SQLite, vfs implementations should endeavor
    +** to prevent this by setting mxPathname to a sufficiently large value.
    +**
    +** The xRandomness(), xSleep(), and xCurrentTime() interfaces
    +** are not strictly a part of the filesystem, but they are
    +** included in the VFS structure for completeness.
    +** The xRandomness() function attempts to return nBytes bytes
    +** of good-quality randomness into zOut.  The return value is
    +** the actual number of bytes of randomness obtained.
    +** The xSleep() method causes the calling thread to sleep for at
    +** least the number of microseconds given.  The xCurrentTime()
    +** method returns a Julian Day Number for the current date and time.
    +**
    +*/
    +typedef struct sqlite3_vfs sqlite3_vfs;
    +struct sqlite3_vfs {
    +  int iVersion;            /* Structure version number */
    +  int szOsFile;            /* Size of subclassed sqlite3_file */
    +  int mxPathname;          /* Maximum file pathname length */
    +  sqlite3_vfs *pNext;      /* Next registered VFS */
    +  const char *zName;       /* Name of this virtual file system */
    +  void *pAppData;          /* Pointer to application-specific data */
    +  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
    +               int flags, int *pOutFlags);
    +  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
    +  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
    +  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
    +  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
    +  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
    +  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
    +  void (*xDlClose)(sqlite3_vfs*, void*);
    +  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
    +  int (*xSleep)(sqlite3_vfs*, int microseconds);
    +  int (*xCurrentTime)(sqlite3_vfs*, double*);
    +  int (*xGetLastError)(sqlite3_vfs*, int, char *);
    +  /* New fields may be appended in figure versions.  The iVersion
    +  ** value will increment whenever this happens. */
    +};
    +
    +/*
    +** CAPI3REF: Flags for the xAccess VFS method {H11190} <H11140>
    +**
    +** These integer constants can be used as the third parameter to
    +** the xAccess method of an [sqlite3_vfs] object. {END}  They determine
    +** what kind of permissions the xAccess method is looking for.
    +** With SQLITE_ACCESS_EXISTS, the xAccess method
    +** simply checks whether the file exists.
    +** With SQLITE_ACCESS_READWRITE, the xAccess method
    +** checks whether the file is both readable and writable.
    +** With SQLITE_ACCESS_READ, the xAccess method
    +** checks whether the file is readable.
    +*/
    +#define SQLITE_ACCESS_EXISTS    0
    +#define SQLITE_ACCESS_READWRITE 1
    +#define SQLITE_ACCESS_READ      2
    +
    +/*
    +** CAPI3REF: Initialize The SQLite Library {H10130} <S20000><S30100>
    +**
    +** The sqlite3_initialize() routine initializes the
    +** SQLite library.  The sqlite3_shutdown() routine
    +** deallocates any resources that were allocated by sqlite3_initialize().
    +** This routines are designed to aid in process initialization and
    +** shutdown on embedded systems.  Workstation applications using
    +** SQLite normally do not need to invoke either of these routines.
    +**
    +** A call to sqlite3_initialize() is an "effective" call if it is
    +** the first time sqlite3_initialize() is invoked during the lifetime of
    +** the process, or if it is the first time sqlite3_initialize() is invoked
    +** following a call to sqlite3_shutdown().  Only an effective call
    +** of sqlite3_initialize() does any initialization.  All other calls
    +** are harmless no-ops.
    +**
    +** A call to sqlite3_shutdown() is an "effective" call if it is the first
    +** call to sqlite3_shutdown() since the last sqlite3_initialize().  Only
    +** an effective call to sqlite3_shutdown() does any deinitialization.
    +** All other valid calls to sqlite3_shutdown() are harmless no-ops.
    +**
    +** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
    +** is not.  The sqlite3_shutdown() interface must only be called from a
    +** single thread.  All open [database connections] must be closed and all
    +** other SQLite resources must be deallocated prior to invoking
    +** sqlite3_shutdown().
    +**
    +** Among other things, sqlite3_initialize() will invoke
    +** sqlite3_os_init().  Similarly, sqlite3_shutdown()
    +** will invoke sqlite3_os_end().
    +**
    +** The sqlite3_initialize() routine returns [SQLITE_OK] on success.
    +** If for some reason, sqlite3_initialize() is unable to initialize
    +** the library (perhaps it is unable to allocate a needed resource such
    +** as a mutex) it returns an [error code] other than [SQLITE_OK].
    +**
    +** The sqlite3_initialize() routine is called internally by many other
    +** SQLite interfaces so that an application usually does not need to
    +** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]
    +** calls sqlite3_initialize() so the SQLite library will be automatically
    +** initialized when [sqlite3_open()] is called if it has not be initialized
    +** already.  However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
    +** compile-time option, then the automatic calls to sqlite3_initialize()
    +** are omitted and the application must call sqlite3_initialize() directly
    +** prior to using any other SQLite interface.  For maximum portability,
    +** it is recommended that applications always invoke sqlite3_initialize()
    +** directly prior to using any other SQLite interface.  Future releases
    +** of SQLite may require this.  In other words, the behavior exhibited
    +** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
    +** default behavior in some future release of SQLite.
    +**
    +** The sqlite3_os_init() routine does operating-system specific
    +** initialization of the SQLite library.  The sqlite3_os_end()
    +** routine undoes the effect of sqlite3_os_init().  Typical tasks
    +** performed by these routines include allocation or deallocation
    +** of static resources, initialization of global variables,
    +** setting up a default [sqlite3_vfs] module, or setting up
    +** a default configuration using [sqlite3_config()].
    +**
    +** The application should never invoke either sqlite3_os_init()
    +** or sqlite3_os_end() directly.  The application should only invoke
    +** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()
    +** interface is called automatically by sqlite3_initialize() and
    +** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate
    +** implementations for sqlite3_os_init() and sqlite3_os_end()
    +** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
    +** When [custom builds | built for other platforms]
    +** (using the [SQLITE_OS_OTHER=1] compile-time
    +** option) the application must supply a suitable implementation for
    +** sqlite3_os_init() and sqlite3_os_end().  An application-supplied
    +** implementation of sqlite3_os_init() or sqlite3_os_end()
    +** must return [SQLITE_OK] on success and some other [error code] upon
    +** failure.
    +*/
    +SQLITE_API int sqlite3_initialize(void);
    +SQLITE_API int sqlite3_shutdown(void);
    +SQLITE_API int sqlite3_os_init(void);
    +SQLITE_API int sqlite3_os_end(void);
    +
    +/*
    +** CAPI3REF: Configuring The SQLite Library {H14100} <S20000><S30200>
    +** EXPERIMENTAL
    +**
    +** The sqlite3_config() interface is used to make global configuration
    +** changes to SQLite in order to tune SQLite to the specific needs of
    +** the application.  The default configuration is recommended for most
    +** applications and so this routine is usually not necessary.  It is
    +** provided to support rare applications with unusual needs.
    +**
    +** The sqlite3_config() interface is not threadsafe.  The application
    +** must insure that no other SQLite interfaces are invoked by other
    +** threads while sqlite3_config() is running.  Furthermore, sqlite3_config()
    +** may only be invoked prior to library initialization using
    +** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
    +** Note, however, that sqlite3_config() can be called as part of the
    +** implementation of an application-defined [sqlite3_os_init()].
    +**
    +** The first argument to sqlite3_config() is an integer
    +** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines
    +** what property of SQLite is to be configured.  Subsequent arguments
    +** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]
    +** in the first argument.
    +**
    +** When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
    +** If the option is unknown or SQLite is unable to set the option
    +** then this routine returns a non-zero [error code].
    +**
    +** Requirements:
    +** [H14103] [H14106] [H14120] [H14123] [H14126] [H14129] [H14132] [H14135]
    +** [H14138] [H14141] [H14144] [H14147] [H14150] [H14153] [H14156] [H14159]
    +** [H14162] [H14165] [H14168]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);
    +
    +/*
    +** CAPI3REF: Configure database connections  {H14200} <S20000>
    +** EXPERIMENTAL
    +**
    +** The sqlite3_db_config() interface is used to make configuration
    +** changes to a [database connection].  The interface is similar to
    +** [sqlite3_config()] except that the changes apply to a single
    +** [database connection] (specified in the first argument).  The
    +** sqlite3_db_config() interface can only be used immediately after
    +** the database connection is created using [sqlite3_open()],
    +** [sqlite3_open16()], or [sqlite3_open_v2()].  
    +**
    +** The second argument to sqlite3_db_config(D,V,...)  is the
    +** configuration verb - an integer code that indicates what
    +** aspect of the [database connection] is being configured.
    +** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE].
    +** New verbs are likely to be added in future releases of SQLite.
    +** Additional arguments depend on the verb.
    +**
    +** Requirements:
    +** [H14203] [H14206] [H14209] [H14212] [H14215]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);
    +
    +/*
    +** CAPI3REF: Memory Allocation Routines {H10155} <S20120>
    +** EXPERIMENTAL
    +**
    +** An instance of this object defines the interface between SQLite
    +** and low-level memory allocation routines.
    +**
    +** This object is used in only one place in the SQLite interface.
    +** A pointer to an instance of this object is the argument to
    +** [sqlite3_config()] when the configuration option is
    +** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].  
    +** By creating an instance of this object
    +** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
    +** during configuration, an application can specify an alternative
    +** memory allocation subsystem for SQLite to use for all of its
    +** dynamic memory needs.
    +**
    +** Note that SQLite comes with several [built-in memory allocators]
    +** that are perfectly adequate for the overwhelming majority of applications
    +** and that this object is only useful to a tiny minority of applications
    +** with specialized memory allocation requirements.  This object is
    +** also used during testing of SQLite in order to specify an alternative
    +** memory allocator that simulates memory out-of-memory conditions in
    +** order to verify that SQLite recovers gracefully from such
    +** conditions.
    +**
    +** The xMalloc and xFree methods must work like the
    +** malloc() and free() functions from the standard C library.
    +** The xRealloc method must work like realloc() from the standard C library
    +** with the exception that if the second argument to xRealloc is zero,
    +** xRealloc must be a no-op - it must not perform any allocation or
    +** deallocation.  SQLite guaranteeds that the second argument to
    +** xRealloc is always a value returned by a prior call to xRoundup.
    +** And so in cases where xRoundup always returns a positive number,
    +** xRealloc can perform exactly as the standard library realloc() and
    +** still be in compliance with this specification.
    +**
    +** xSize should return the allocated size of a memory allocation
    +** previously obtained from xMalloc or xRealloc.  The allocated size
    +** is always at least as big as the requested size but may be larger.
    +**
    +** The xRoundup method returns what would be the allocated size of
    +** a memory allocation given a particular requested size.  Most memory
    +** allocators round up memory allocations at least to the next multiple
    +** of 8.  Some allocators round up to a larger multiple or to a power of 2.
    +** Every memory allocation request coming in through [sqlite3_malloc()]
    +** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0, 
    +** that causes the corresponding memory allocation to fail.
    +**
    +** The xInit method initializes the memory allocator.  (For example,
    +** it might allocate any require mutexes or initialize internal data
    +** structures.  The xShutdown method is invoked (indirectly) by
    +** [sqlite3_shutdown()] and should deallocate any resources acquired
    +** by xInit.  The pAppData pointer is used as the only parameter to
    +** xInit and xShutdown.
    +**
    +** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes
    +** the xInit method, so the xInit method need not be threadsafe.  The
    +** xShutdown method is only called from [sqlite3_shutdown()] so it does
    +** not need to be threadsafe either.  For all other methods, SQLite
    +** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
    +** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
    +** it is by default) and so the methods are automatically serialized.
    +** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
    +** methods must be threadsafe or else make their own arrangements for
    +** serialization.
    +**
    +** SQLite will never invoke xInit() more than once without an intervening
    +** call to xShutdown().
    +*/
    +typedef struct sqlite3_mem_methods sqlite3_mem_methods;
    +struct sqlite3_mem_methods {
    +  void *(*xMalloc)(int);         /* Memory allocation function */
    +  void (*xFree)(void*);          /* Free a prior allocation */
    +  void *(*xRealloc)(void*,int);  /* Resize an allocation */
    +  int (*xSize)(void*);           /* Return the size of an allocation */
    +  int (*xRoundup)(int);          /* Round up request size to allocation size */
    +  int (*xInit)(void*);           /* Initialize the memory allocator */
    +  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
    +  void *pAppData;                /* Argument to xInit() and xShutdown() */
    +};
    +
    +/*
    +** CAPI3REF: Configuration Options {H10160} <S20000>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer configuration options that
    +** can be passed as the first argument to the [sqlite3_config()] interface.
    +**
    +** New configuration options may be added in future releases of SQLite.
    +** Existing configuration options might be discontinued.  Applications
    +** should check the return code from [sqlite3_config()] to make sure that
    +** the call worked.  The [sqlite3_config()] interface will return a
    +** non-zero [error code] if a discontinued or unsupported configuration option
    +** is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>
    +** <dd>There are no arguments to this option.  This option disables
    +** all mutexing and puts SQLite into a mode where it can only be used
    +** by a single thread.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MULTITHREAD</dt>
    +** <dd>There are no arguments to this option.  This option disables
    +** mutexing on [database connection] and [prepared statement] objects.
    +** The application is responsible for serializing access to
    +** [database connections] and [prepared statements].  But other mutexes
    +** are enabled so that SQLite will be safe to use in a multi-threaded
    +** environment as long as no two threads attempt to use the same
    +** [database connection] at the same time.  See the [threading mode]
    +** documentation for additional information.</dd>
    +**
    +** <dt>SQLITE_CONFIG_SERIALIZED</dt>
    +** <dd>There are no arguments to this option.  This option enables
    +** all mutexes including the recursive
    +** mutexes on [database connection] and [prepared statement] objects.
    +** In this mode (which is the default when SQLite is compiled with
    +** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access
    +** to [database connections] and [prepared statements] so that the
    +** application is free to use the same [database connection] or the
    +** same [prepared statement] in different threads at the same time.
    +** See the [threading mode] documentation for additional information.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MALLOC</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mem_methods] structure.  The argument specifies
    +** alternative low-level memory allocation routines to be used in place of
    +** the memory allocation routines built into SQLite.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETMALLOC</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]
    +** structure is filled with the currently defined memory allocation routines.
    +** This option can be used to overload the default memory allocation
    +** routines with a wrapper that simulations memory allocation failure or
    +** tracks memory usage, for example.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MEMSTATUS</dt>
    +** <dd>This option takes single argument of type int, interpreted as a 
    +** boolean, which enables or disables the collection of memory allocation 
    +** statistics. When disabled, the following SQLite interfaces become 
    +** non-operational:
    +**   <ul>
    +**   <li> [sqlite3_memory_used()]
    +**   <li> [sqlite3_memory_highwater()]
    +**   <li> [sqlite3_soft_heap_limit()]
    +**   <li> [sqlite3_status()]
    +**   </ul>
    +** </dd>
    +**
    +** <dt>SQLITE_CONFIG_SCRATCH</dt>
    +** <dd>This option specifies a static memory buffer that SQLite can use for
    +** scratch memory.  There are three arguments:  A pointer an 8-byte
    +** aligned memory buffer from which the scrach allocations will be
    +** drawn, the size of each scratch allocation (sz),
    +** and the maximum number of scratch allocations (N).  The sz
    +** argument must be a multiple of 16. The sz parameter should be a few bytes
    +** larger than the actual scratch space required due to internal overhead.
    +** The first argument should pointer to an 8-byte aligned buffer
    +** of at least sz*N bytes of memory.
    +** SQLite will use no more than one scratch buffer at once per thread, so
    +** N should be set to the expected maximum number of threads.  The sz
    +** parameter should be 6 times the size of the largest database page size.
    +** Scratch buffers are used as part of the btree balance operation.  If
    +** The btree balancer needs additional memory beyond what is provided by
    +** scratch buffers or if no scratch buffer space is specified, then SQLite
    +** goes to [sqlite3_malloc()] to obtain the memory it needs.</dd>
    +**
    +** <dt>SQLITE_CONFIG_PAGECACHE</dt>
    +** <dd>This option specifies a static memory buffer that SQLite can use for
    +** the database page cache with the default page cache implemenation.  
    +** This configuration should not be used if an application-define page
    +** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.
    +** There are three arguments to this option: A pointer to 8-byte aligned
    +** memory, the size of each page buffer (sz), and the number of pages (N).
    +** The sz argument should be the size of the largest database page
    +** (a power of two between 512 and 32768) plus a little extra for each
    +** page header.  The page header size is 20 to 40 bytes depending on
    +** the host architecture.  It is harmless, apart from the wasted memory,
    +** to make sz a little too large.  The first
    +** argument should point to an allocation of at least sz*N bytes of memory.
    +** SQLite will use the memory provided by the first argument to satisfy its
    +** memory needs for the first N pages that it adds to cache.  If additional
    +** page cache memory is needed beyond what is provided by this option, then
    +** SQLite goes to [sqlite3_malloc()] for the additional storage space.
    +** The implementation might use one or more of the N buffers to hold 
    +** memory accounting information. The pointer in the first argument must
    +** be aligned to an 8-byte boundary or subsequent behavior of SQLite
    +** will be undefined.</dd>
    +**
    +** <dt>SQLITE_CONFIG_HEAP</dt>
    +** <dd>This option specifies a static memory buffer that SQLite will use
    +** for all of its dynamic memory allocation needs beyond those provided
    +** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
    +** There are three arguments: An 8-byte aligned pointer to the memory,
    +** the number of bytes in the memory buffer, and the minimum allocation size.
    +** If the first pointer (the memory pointer) is NULL, then SQLite reverts
    +** to using its default memory allocator (the system malloc() implementation),
    +** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  If the
    +** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
    +** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
    +** allocator is engaged to handle all of SQLites memory allocation needs.
    +** The first pointer (the memory pointer) must be aligned to an 8-byte
    +** boundary or subsequent behavior of SQLite will be undefined.</dd>
    +**
    +** <dt>SQLITE_CONFIG_MUTEX</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mutex_methods] structure.  The argument specifies
    +** alternative low-level mutex routines to be used in place
    +** the mutex routines built into SQLite.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETMUTEX</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** instance of the [sqlite3_mutex_methods] structure.  The
    +** [sqlite3_mutex_methods]
    +** structure is filled with the currently defined mutex routines.
    +** This option can be used to overload the default mutex allocation
    +** routines with a wrapper used to track mutex usage for performance
    +** profiling or testing, for example.</dd>
    +**
    +** <dt>SQLITE_CONFIG_LOOKASIDE</dt>
    +** <dd>This option takes two arguments that determine the default
    +** memory allocation lookaside optimization.  The first argument is the
    +** size of each lookaside buffer slot and the second is the number of
    +** slots allocated to each database connection.  This option sets the
    +** <i>default</i> lookaside size.  The [SQLITE_DBCONFIG_LOOKASIDE]
    +** verb to [sqlite3_db_config()] can be used to change the lookaside
    +** configuration on individual connections.</dd>
    +**
    +** <dt>SQLITE_CONFIG_PCACHE</dt>
    +** <dd>This option takes a single argument which is a pointer to
    +** an [sqlite3_pcache_methods] object.  This object specifies the interface
    +** to a custom page cache implementation.  SQLite makes a copy of the
    +** object and uses it for page cache memory allocations.</dd>
    +**
    +** <dt>SQLITE_CONFIG_GETPCACHE</dt>
    +** <dd>This option takes a single argument which is a pointer to an
    +** [sqlite3_pcache_methods] object.  SQLite copies of the current
    +** page cache implementation into that object.</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
    +#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
    +#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
    +#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
    +#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
    +#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
    +#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
    +#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
    +#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
    +#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
    +#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
    +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ 
    +#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
    +#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */
    +#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */
    +
    +/*
    +** CAPI3REF: Configuration Options {H10170} <S20000>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer configuration options that
    +** can be passed as the second argument to the [sqlite3_db_config()] interface.
    +**
    +** New configuration options may be added in future releases of SQLite.
    +** Existing configuration options might be discontinued.  Applications
    +** should check the return code from [sqlite3_db_config()] to make sure that
    +** the call worked.  The [sqlite3_db_config()] interface will return a
    +** non-zero [error code] if a discontinued or unsupported configuration option
    +** is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
    +** <dd>This option takes three additional arguments that determine the 
    +** [lookaside memory allocator] configuration for the [database connection].
    +** The first argument (the third parameter to [sqlite3_db_config()] is a
    +** pointer to an memory buffer to use for lookaside memory.
    +** The first argument may be NULL in which case SQLite will allocate the
    +** lookaside buffer itself using [sqlite3_malloc()].  The second argument is the
    +** size of each lookaside buffer slot and the third argument is the number of
    +** slots.  The size of the buffer in the first argument must be greater than
    +** or equal to the product of the second and third arguments.  The buffer
    +** must be aligned to an 8-byte boundary.  If the second argument is not
    +** a multiple of 8, it is internally rounded down to the next smaller
    +** multiple of 8.  See also: [SQLITE_CONFIG_LOOKASIDE]</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_DBCONFIG_LOOKASIDE    1001  /* void* int int */
    +
    +
    +/*
    +** CAPI3REF: Enable Or Disable Extended Result Codes {H12200} <S10700>
    +**
    +** The sqlite3_extended_result_codes() routine enables or disables the
    +** [extended result codes] feature of SQLite. The extended result
    +** codes are disabled by default for historical compatibility considerations.
    +**
    +** Requirements:
    +** [H12201] [H12202]
    +*/
    +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
    +
    +/*
    +** CAPI3REF: Last Insert Rowid {H12220} <S10700>
    +**
    +** Each entry in an SQLite table has a unique 64-bit signed
    +** integer key called the [ROWID | "rowid"]. The rowid is always available
    +** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
    +** names are not also used by explicitly declared columns. If
    +** the table has a column of type [INTEGER PRIMARY KEY] then that column
    +** is another alias for the rowid.
    +**
    +** This routine returns the [rowid] of the most recent
    +** successful [INSERT] into the database from the [database connection]
    +** in the first argument.  If no successful [INSERT]s
    +** have ever occurred on that database connection, zero is returned.
    +**
    +** If an [INSERT] occurs within a trigger, then the [rowid] of the inserted
    +** row is returned by this routine as long as the trigger is running.
    +** But once the trigger terminates, the value returned by this routine
    +** reverts to the last value inserted before the trigger fired.
    +**
    +** An [INSERT] that fails due to a constraint violation is not a
    +** successful [INSERT] and does not change the value returned by this
    +** routine.  Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
    +** and INSERT OR ABORT make no changes to the return value of this
    +** routine when their insertion fails.  When INSERT OR REPLACE
    +** encounters a constraint violation, it does not fail.  The
    +** INSERT continues to completion after deleting rows that caused
    +** the constraint problem so INSERT OR REPLACE will always change
    +** the return value of this interface.
    +**
    +** For the purposes of this routine, an [INSERT] is considered to
    +** be successful even if it is subsequently rolled back.
    +**
    +** Requirements:
    +** [H12221] [H12223]
    +**
    +** If a separate thread performs a new [INSERT] on the same
    +** database connection while the [sqlite3_last_insert_rowid()]
    +** function is running and thus changes the last insert [rowid],
    +** then the value returned by [sqlite3_last_insert_rowid()] is
    +** unpredictable and might not equal either the old or the new
    +** last insert [rowid].
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
    +
    +/*
    +** CAPI3REF: Count The Number Of Rows Modified {H12240} <S10600>
    +**
    +** This function returns the number of database rows that were changed
    +** or inserted or deleted by the most recently completed SQL statement
    +** on the [database connection] specified by the first parameter.
    +** Only changes that are directly specified by the [INSERT], [UPDATE],
    +** or [DELETE] statement are counted.  Auxiliary changes caused by
    +** triggers or [foreign key actions] are not counted. Use the
    +** [sqlite3_total_changes()] function to find the total number of changes
    +** including changes caused by triggers and foreign key actions.
    +**
    +** Changes to a view that are simulated by an [INSTEAD OF trigger]
    +** are not counted.  Only real table changes are counted.
    +**
    +** A "row change" is a change to a single row of a single table
    +** caused by an INSERT, DELETE, or UPDATE statement.  Rows that
    +** are changed as side effects of [REPLACE] constraint resolution,
    +** rollback, ABORT processing, [DROP TABLE], or by any other
    +** mechanisms do not count as direct row changes.
    +**
    +** A "trigger context" is a scope of execution that begins and
    +** ends with the script of a [CREATE TRIGGER | trigger]. 
    +** Most SQL statements are
    +** evaluated outside of any trigger.  This is the "top level"
    +** trigger context.  If a trigger fires from the top level, a
    +** new trigger context is entered for the duration of that one
    +** trigger.  Subtriggers create subcontexts for their duration.
    +**
    +** Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
    +** not create a new trigger context.
    +**
    +** This function returns the number of direct row changes in the
    +** most recent INSERT, UPDATE, or DELETE statement within the same
    +** trigger context.
    +**
    +** Thus, when called from the top level, this function returns the
    +** number of changes in the most recent INSERT, UPDATE, or DELETE
    +** that also occurred at the top level.  Within the body of a trigger,
    +** the sqlite3_changes() interface can be called to find the number of
    +** changes in the most recently completed INSERT, UPDATE, or DELETE
    +** statement within the body of the same trigger.
    +** However, the number returned does not include changes
    +** caused by subtriggers since those have their own context.
    +**
    +** See also the [sqlite3_total_changes()] interface and the
    +** [count_changes pragma].
    +**
    +** Requirements:
    +** [H12241] [H12243]
    +**
    +** If a separate thread makes changes on the same database connection
    +** while [sqlite3_changes()] is running then the value returned
    +** is unpredictable and not meaningful.
    +*/
    +SQLITE_API int sqlite3_changes(sqlite3*);
    +
    +/*
    +** CAPI3REF: Total Number Of Rows Modified {H12260} <S10600>
    +**
    +** This function returns the number of row changes caused by [INSERT],
    +** [UPDATE] or [DELETE] statements since the [database connection] was opened.
    +** The count includes all changes from all [CREATE TRIGGER | trigger] 
    +** contexts and changes made by [foreign key actions]. However,
    +** the count does not include changes used to implement [REPLACE] constraints,
    +** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The
    +** count does not include rows of views that fire an [INSTEAD OF trigger],
    +** though if the INSTEAD OF trigger makes changes of its own, those changes 
    +** are counted.
    +** The changes are counted as soon as the statement that makes them is
    +** completed (when the statement handle is passed to [sqlite3_reset()] or
    +** [sqlite3_finalize()]).
    +**
    +** See also the [sqlite3_changes()] interface and the
    +** [count_changes pragma].
    +**
    +** Requirements:
    +** [H12261] [H12263]
    +**
    +** If a separate thread makes changes on the same database connection
    +** while [sqlite3_total_changes()] is running then the value
    +** returned is unpredictable and not meaningful.
    +*/
    +SQLITE_API int sqlite3_total_changes(sqlite3*);
    +
    +/*
    +** CAPI3REF: Interrupt A Long-Running Query {H12270} <S30500>
    +**
    +** This function causes any pending database operation to abort and
    +** return at its earliest opportunity. This routine is typically
    +** called in response to a user action such as pressing "Cancel"
    +** or Ctrl-C where the user wants a long query operation to halt
    +** immediately.
    +**
    +** It is safe to call this routine from a thread different from the
    +** thread that is currently running the database operation.  But it
    +** is not safe to call this routine with a [database connection] that
    +** is closed or might close before sqlite3_interrupt() returns.
    +**
    +** If an SQL operation is very nearly finished at the time when
    +** sqlite3_interrupt() is called, then it might not have an opportunity
    +** to be interrupted and might continue to completion.
    +**
    +** An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
    +** If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
    +** that is inside an explicit transaction, then the entire transaction
    +** will be rolled back automatically.
    +**
    +** The sqlite3_interrupt(D) call is in effect until all currently running
    +** SQL statements on [database connection] D complete.  Any new SQL statements
    +** that are started after the sqlite3_interrupt() call and before the 
    +** running statements reaches zero are interrupted as if they had been
    +** running prior to the sqlite3_interrupt() call.  New SQL statements
    +** that are started after the running statement count reaches zero are
    +** not effected by the sqlite3_interrupt().
    +** A call to sqlite3_interrupt(D) that occurs when there are no running
    +** SQL statements is a no-op and has no effect on SQL statements
    +** that are started after the sqlite3_interrupt() call returns.
    +**
    +** Requirements:
    +** [H12271] [H12272]
    +**
    +** If the database connection closes while [sqlite3_interrupt()]
    +** is running then bad things will likely happen.
    +*/
    +SQLITE_API void sqlite3_interrupt(sqlite3*);
    +
    +/*
    +** CAPI3REF: Determine If An SQL Statement Is Complete {H10510} <S70200>
    +**
    +** These routines are useful during command-line input to determine if the
    +** currently entered text seems to form a complete SQL statement or
    +** if additional input is needed before sending the text into
    +** SQLite for parsing.  These routines return 1 if the input string
    +** appears to be a complete SQL statement.  A statement is judged to be
    +** complete if it ends with a semicolon token and is not a prefix of a
    +** well-formed CREATE TRIGGER statement.  Semicolons that are embedded within
    +** string literals or quoted identifier names or comments are not
    +** independent tokens (they are part of the token in which they are
    +** embedded) and thus do not count as a statement terminator.  Whitespace
    +** and comments that follow the final semicolon are ignored.
    +**
    +** These routines return 0 if the statement is incomplete.  If a
    +** memory allocation fails, then SQLITE_NOMEM is returned.
    +**
    +** These routines do not parse the SQL statements thus
    +** will not detect syntactically incorrect SQL.
    +**
    +** If SQLite has not been initialized using [sqlite3_initialize()] prior 
    +** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
    +** automatically by sqlite3_complete16().  If that initialization fails,
    +** then the return value from sqlite3_complete16() will be non-zero
    +** regardless of whether or not the input SQL is complete.
    +**
    +** Requirements: [H10511] [H10512]
    +**
    +** The input to [sqlite3_complete()] must be a zero-terminated
    +** UTF-8 string.
    +**
    +** The input to [sqlite3_complete16()] must be a zero-terminated
    +** UTF-16 string in native byte order.
    +*/
    +SQLITE_API int sqlite3_complete(const char *sql);
    +SQLITE_API int sqlite3_complete16(const void *sql);
    +
    +/*
    +** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors {H12310} <S40400>
    +**
    +** This routine sets a callback function that might be invoked whenever
    +** an attempt is made to open a database table that another thread
    +** or process has locked.
    +**
    +** If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
    +** is returned immediately upon encountering the lock. If the busy callback
    +** is not NULL, then the callback will be invoked with two arguments.
    +**
    +** The first argument to the handler is a copy of the void* pointer which
    +** is the third argument to sqlite3_busy_handler().  The second argument to
    +** the handler callback is the number of times that the busy handler has
    +** been invoked for this locking event.  If the
    +** busy callback returns 0, then no additional attempts are made to
    +** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
    +** If the callback returns non-zero, then another attempt
    +** is made to open the database for reading and the cycle repeats.
    +**
    +** The presence of a busy handler does not guarantee that it will be invoked
    +** when there is lock contention. If SQLite determines that invoking the busy
    +** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
    +** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
    +** Consider a scenario where one process is holding a read lock that
    +** it is trying to promote to a reserved lock and
    +** a second process is holding a reserved lock that it is trying
    +** to promote to an exclusive lock.  The first process cannot proceed
    +** because it is blocked by the second and the second process cannot
    +** proceed because it is blocked by the first.  If both processes
    +** invoke the busy handlers, neither will make any progress.  Therefore,
    +** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
    +** will induce the first process to release its read lock and allow
    +** the second process to proceed.
    +**
    +** The default busy callback is NULL.
    +**
    +** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
    +** when SQLite is in the middle of a large transaction where all the
    +** changes will not fit into the in-memory cache.  SQLite will
    +** already hold a RESERVED lock on the database file, but it needs
    +** to promote this lock to EXCLUSIVE so that it can spill cache
    +** pages into the database file without harm to concurrent
    +** readers.  If it is unable to promote the lock, then the in-memory
    +** cache will be left in an inconsistent state and so the error
    +** code is promoted from the relatively benign [SQLITE_BUSY] to
    +** the more severe [SQLITE_IOERR_BLOCKED].  This error code promotion
    +** forces an automatic rollback of the changes.  See the
    +** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
    +** CorruptionFollowingBusyError</a> wiki page for a discussion of why
    +** this is important.
    +**
    +** There can only be a single busy handler defined for each
    +** [database connection].  Setting a new busy handler clears any
    +** previously set handler.  Note that calling [sqlite3_busy_timeout()]
    +** will also set or clear the busy handler.
    +**
    +** The busy callback should not take any actions which modify the
    +** database connection that invoked the busy handler.  Any such actions
    +** result in undefined behavior.
    +** 
    +** Requirements:
    +** [H12311] [H12312] [H12314] [H12316] [H12318]
    +**
    +** A busy handler must not close the database connection
    +** or [prepared statement] that invoked the busy handler.
    +*/
    +SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
    +
    +/*
    +** CAPI3REF: Set A Busy Timeout {H12340} <S40410>
    +**
    +** This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
    +** for a specified amount of time when a table is locked.  The handler
    +** will sleep multiple times until at least "ms" milliseconds of sleeping
    +** have accumulated. {H12343} After "ms" milliseconds of sleeping,
    +** the handler returns 0 which causes [sqlite3_step()] to return
    +** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
    +**
    +** Calling this routine with an argument less than or equal to zero
    +** turns off all busy handlers.
    +**
    +** There can only be a single busy handler for a particular
    +** [database connection] any any given moment.  If another busy handler
    +** was defined  (using [sqlite3_busy_handler()]) prior to calling
    +** this routine, that other busy handler is cleared.
    +**
    +** Requirements:
    +** [H12341] [H12343] [H12344]
    +*/
    +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
    +
    +/*
    +** CAPI3REF: Convenience Routines For Running Queries {H12370} <S10000>
    +**
    +** Definition: A <b>result table</b> is memory data structure created by the
    +** [sqlite3_get_table()] interface.  A result table records the
    +** complete query results from one or more queries.
    +**
    +** The table conceptually has a number of rows and columns.  But
    +** these numbers are not part of the result table itself.  These
    +** numbers are obtained separately.  Let N be the number of rows
    +** and M be the number of columns.
    +**
    +** A result table is an array of pointers to zero-terminated UTF-8 strings.
    +** There are (N+1)*M elements in the array.  The first M pointers point
    +** to zero-terminated strings that  contain the names of the columns.
    +** The remaining entries all point to query results.  NULL values result
    +** in NULL pointers.  All other values are in their UTF-8 zero-terminated
    +** string representation as returned by [sqlite3_column_text()].
    +**
    +** A result table might consist of one or more memory allocations.
    +** It is not safe to pass a result table directly to [sqlite3_free()].
    +** A result table should be deallocated using [sqlite3_free_table()].
    +**
    +** As an example of the result table format, suppose a query result
    +** is as follows:
    +**
    +** <blockquote><pre>
    +**        Name        | Age
    +**        -----------------------
    +**        Alice       | 43
    +**        Bob         | 28
    +**        Cindy       | 21
    +** </pre></blockquote>
    +**
    +** There are two column (M==2) and three rows (N==3).  Thus the
    +** result table has 8 entries.  Suppose the result table is stored
    +** in an array names azResult.  Then azResult holds this content:
    +**
    +** <blockquote><pre>
    +**        azResult&#91;0] = "Name";
    +**        azResult&#91;1] = "Age";
    +**        azResult&#91;2] = "Alice";
    +**        azResult&#91;3] = "43";
    +**        azResult&#91;4] = "Bob";
    +**        azResult&#91;5] = "28";
    +**        azResult&#91;6] = "Cindy";
    +**        azResult&#91;7] = "21";
    +** </pre></blockquote>
    +**
    +** The sqlite3_get_table() function evaluates one or more
    +** semicolon-separated SQL statements in the zero-terminated UTF-8
    +** string of its 2nd parameter.  It returns a result table to the
    +** pointer given in its 3rd parameter.
    +**
    +** After the calling function has finished using the result, it should
    +** pass the pointer to the result table to sqlite3_free_table() in order to
    +** release the memory that was malloced.  Because of the way the
    +** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
    +** function must not try to call [sqlite3_free()] directly.  Only
    +** [sqlite3_free_table()] is able to release the memory properly and safely.
    +**
    +** The sqlite3_get_table() interface is implemented as a wrapper around
    +** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access
    +** to any internal data structures of SQLite.  It uses only the public
    +** interface defined here.  As a consequence, errors that occur in the
    +** wrapper layer outside of the internal [sqlite3_exec()] call are not
    +** reflected in subsequent calls to [sqlite3_errcode()] or [sqlite3_errmsg()].
    +**
    +** Requirements:
    +** [H12371] [H12373] [H12374] [H12376] [H12379] [H12382]
    +*/
    +SQLITE_API int sqlite3_get_table(
    +  sqlite3 *db,          /* An open database */
    +  const char *zSql,     /* SQL to be evaluated */
    +  char ***pazResult,    /* Results of the query */
    +  int *pnRow,           /* Number of result rows written here */
    +  int *pnColumn,        /* Number of result columns written here */
    +  char **pzErrmsg       /* Error msg written here */
    +);
    +SQLITE_API void sqlite3_free_table(char **result);
    +
    +/*
    +** CAPI3REF: Formatted String Printing Functions {H17400} <S70000><S20000>
    +**
    +** These routines are work-alikes of the "printf()" family of functions
    +** from the standard C library.
    +**
    +** The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
    +** results into memory obtained from [sqlite3_malloc()].
    +** The strings returned by these two routines should be
    +** released by [sqlite3_free()].  Both routines return a
    +** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
    +** memory to hold the resulting string.
    +**
    +** In sqlite3_snprintf() routine is similar to "snprintf()" from
    +** the standard C library.  The result is written into the
    +** buffer supplied as the second parameter whose size is given by
    +** the first parameter. Note that the order of the
    +** first two parameters is reversed from snprintf().  This is an
    +** historical accident that cannot be fixed without breaking
    +** backwards compatibility.  Note also that sqlite3_snprintf()
    +** returns a pointer to its buffer instead of the number of
    +** characters actually written into the buffer.  We admit that
    +** the number of characters written would be a more useful return
    +** value but we cannot change the implementation of sqlite3_snprintf()
    +** now without breaking compatibility.
    +**
    +** As long as the buffer size is greater than zero, sqlite3_snprintf()
    +** guarantees that the buffer is always zero-terminated.  The first
    +** parameter "n" is the total size of the buffer, including space for
    +** the zero terminator.  So the longest string that can be completely
    +** written will be n-1 characters.
    +**
    +** These routines all implement some additional formatting
    +** options that are useful for constructing SQL statements.
    +** All of the usual printf() formatting options apply.  In addition, there
    +** is are "%q", "%Q", and "%z" options.
    +**
    +** The %q option works like %s in that it substitutes a null-terminated
    +** string from the argument list.  But %q also doubles every '\'' character.
    +** %q is designed for use inside a string literal.  By doubling each '\''
    +** character it escapes that character and allows it to be inserted into
    +** the string.
    +**
    +** For example, assume the string variable zText contains text as follows:
    +**
    +** <blockquote><pre>
    +**  char *zText = "It's a happy day!";
    +** </pre></blockquote>
    +**
    +** One can use this text in an SQL statement as follows:
    +**
    +** <blockquote><pre>
    +**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
    +**  sqlite3_exec(db, zSQL, 0, 0, 0);
    +**  sqlite3_free(zSQL);
    +** </pre></blockquote>
    +**
    +** Because the %q format string is used, the '\'' character in zText
    +** is escaped and the SQL generated is as follows:
    +**
    +** <blockquote><pre>
    +**  INSERT INTO table1 VALUES('It''s a happy day!')
    +** </pre></blockquote>
    +**
    +** This is correct.  Had we used %s instead of %q, the generated SQL
    +** would have looked like this:
    +**
    +** <blockquote><pre>
    +**  INSERT INTO table1 VALUES('It's a happy day!');
    +** </pre></blockquote>
    +**
    +** This second example is an SQL syntax error.  As a general rule you should
    +** always use %q instead of %s when inserting text into a string literal.
    +**
    +** The %Q option works like %q except it also adds single quotes around
    +** the outside of the total string.  Additionally, if the parameter in the
    +** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
    +** single quotes) in place of the %Q option.  So, for example, one could say:
    +**
    +** <blockquote><pre>
    +**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
    +**  sqlite3_exec(db, zSQL, 0, 0, 0);
    +**  sqlite3_free(zSQL);
    +** </pre></blockquote>
    +**
    +** The code above will render a correct SQL statement in the zSQL
    +** variable even if the zText variable is a NULL pointer.
    +**
    +** The "%z" formatting option works exactly like "%s" with the
    +** addition that after the string has been read and copied into
    +** the result, [sqlite3_free()] is called on the input string. {END}
    +**
    +** Requirements:
    +** [H17403] [H17406] [H17407]
    +*/
    +SQLITE_API char *sqlite3_mprintf(const char*,...);
    +SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
    +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
    +
    +/*
    +** CAPI3REF: Memory Allocation Subsystem {H17300} <S20000>
    +**
    +** The SQLite core  uses these three routines for all of its own
    +** internal memory allocation needs. "Core" in the previous sentence
    +** does not include operating-system specific VFS implementation.  The
    +** Windows VFS uses native malloc() and free() for some operations.
    +**
    +** The sqlite3_malloc() routine returns a pointer to a block
    +** of memory at least N bytes in length, where N is the parameter.
    +** If sqlite3_malloc() is unable to obtain sufficient free
    +** memory, it returns a NULL pointer.  If the parameter N to
    +** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
    +** a NULL pointer.
    +**
    +** Calling sqlite3_free() with a pointer previously returned
    +** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
    +** that it might be reused.  The sqlite3_free() routine is
    +** a no-op if is called with a NULL pointer.  Passing a NULL pointer
    +** to sqlite3_free() is harmless.  After being freed, memory
    +** should neither be read nor written.  Even reading previously freed
    +** memory might result in a segmentation fault or other severe error.
    +** Memory corruption, a segmentation fault, or other severe error
    +** might result if sqlite3_free() is called with a non-NULL pointer that
    +** was not obtained from sqlite3_malloc() or sqlite3_realloc().
    +**
    +** The sqlite3_realloc() interface attempts to resize a
    +** prior memory allocation to be at least N bytes, where N is the
    +** second parameter.  The memory allocation to be resized is the first
    +** parameter.  If the first parameter to sqlite3_realloc()
    +** is a NULL pointer then its behavior is identical to calling
    +** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
    +** If the second parameter to sqlite3_realloc() is zero or
    +** negative then the behavior is exactly the same as calling
    +** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
    +** sqlite3_realloc() returns a pointer to a memory allocation
    +** of at least N bytes in size or NULL if sufficient memory is unavailable.
    +** If M is the size of the prior allocation, then min(N,M) bytes
    +** of the prior allocation are copied into the beginning of buffer returned
    +** by sqlite3_realloc() and the prior allocation is freed.
    +** If sqlite3_realloc() returns NULL, then the prior allocation
    +** is not freed.
    +**
    +** The memory returned by sqlite3_malloc() and sqlite3_realloc()
    +** is always aligned to at least an 8 byte boundary. {END}
    +**
    +** The default implementation of the memory allocation subsystem uses
    +** the malloc(), realloc() and free() provided by the standard C library.
    +** {H17382} However, if SQLite is compiled with the
    +** SQLITE_MEMORY_SIZE=<i>NNN</i> C preprocessor macro (where <i>NNN</i>
    +** is an integer), then SQLite create a static array of at least
    +** <i>NNN</i> bytes in size and uses that array for all of its dynamic
    +** memory allocation needs. {END}  Additional memory allocator options
    +** may be added in future releases.
    +**
    +** In SQLite version 3.5.0 and 3.5.1, it was possible to define
    +** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
    +** implementation of these routines to be omitted.  That capability
    +** is no longer provided.  Only built-in memory allocators can be used.
    +**
    +** The Windows OS interface layer calls
    +** the system malloc() and free() directly when converting
    +** filenames between the UTF-8 encoding used by SQLite
    +** and whatever filename encoding is used by the particular Windows
    +** installation.  Memory allocation errors are detected, but
    +** they are reported back as [SQLITE_CANTOPEN] or
    +** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
    +**
    +** Requirements:
    +** [H17303] [H17304] [H17305] [H17306] [H17310] [H17312] [H17315] [H17318]
    +** [H17321] [H17322] [H17323]
    +**
    +** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
    +** must be either NULL or else pointers obtained from a prior
    +** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
    +** not yet been released.
    +**
    +** The application must not read or write any part of
    +** a block of memory after it has been released using
    +** [sqlite3_free()] or [sqlite3_realloc()].
    +*/
    +SQLITE_API void *sqlite3_malloc(int);
    +SQLITE_API void *sqlite3_realloc(void*, int);
    +SQLITE_API void sqlite3_free(void*);
    +
    +/*
    +** CAPI3REF: Memory Allocator Statistics {H17370} <S30210>
    +**
    +** SQLite provides these two interfaces for reporting on the status
    +** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
    +** routines, which form the built-in memory allocation subsystem.
    +**
    +** Requirements:
    +** [H17371] [H17373] [H17374] [H17375]
    +*/
    +SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
    +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
    +
    +/*
    +** CAPI3REF: Pseudo-Random Number Generator {H17390} <S20000>
    +**
    +** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
    +** select random [ROWID | ROWIDs] when inserting new records into a table that
    +** already uses the largest possible [ROWID].  The PRNG is also used for
    +** the build-in random() and randomblob() SQL functions.  This interface allows
    +** applications to access the same PRNG for other purposes.
    +**
    +** A call to this routine stores N bytes of randomness into buffer P.
    +**
    +** The first time this routine is invoked (either internally or by
    +** the application) the PRNG is seeded using randomness obtained
    +** from the xRandomness method of the default [sqlite3_vfs] object.
    +** On all subsequent invocations, the pseudo-randomness is generated
    +** internally and without recourse to the [sqlite3_vfs] xRandomness
    +** method.
    +**
    +** Requirements:
    +** [H17392]
    +*/
    +SQLITE_API void sqlite3_randomness(int N, void *P);
    +
    +/*
    +** CAPI3REF: Compile-Time Authorization Callbacks {H12500} <S70100>
    +**
    +** This routine registers a authorizer callback with a particular
    +** [database connection], supplied in the first argument.
    +** The authorizer callback is invoked as SQL statements are being compiled
    +** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
    +** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()].  At various
    +** points during the compilation process, as logic is being created
    +** to perform various actions, the authorizer callback is invoked to
    +** see if those actions are allowed.  The authorizer callback should
    +** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
    +** specific action but allow the SQL statement to continue to be
    +** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
    +** rejected with an error.  If the authorizer callback returns
    +** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
    +** then the [sqlite3_prepare_v2()] or equivalent call that triggered
    +** the authorizer will fail with an error message.
    +**
    +** When the callback returns [SQLITE_OK], that means the operation
    +** requested is ok.  When the callback returns [SQLITE_DENY], the
    +** [sqlite3_prepare_v2()] or equivalent call that triggered the
    +** authorizer will fail with an error message explaining that
    +** access is denied. 
    +**
    +** The first parameter to the authorizer callback is a copy of the third
    +** parameter to the sqlite3_set_authorizer() interface. The second parameter
    +** to the callback is an integer [SQLITE_COPY | action code] that specifies
    +** the particular action to be authorized. The third through sixth parameters
    +** to the callback are zero-terminated strings that contain additional
    +** details about the action to be authorized.
    +**
    +** If the action code is [SQLITE_READ]
    +** and the callback returns [SQLITE_IGNORE] then the
    +** [prepared statement] statement is constructed to substitute
    +** a NULL value in place of the table column that would have
    +** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]
    +** return can be used to deny an untrusted user access to individual
    +** columns of a table.
    +** If the action code is [SQLITE_DELETE] and the callback returns
    +** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
    +** [truncate optimization] is disabled and all rows are deleted individually.
    +**
    +** An authorizer is used when [sqlite3_prepare | preparing]
    +** SQL statements from an untrusted source, to ensure that the SQL statements
    +** do not try to access data they are not allowed to see, or that they do not
    +** try to execute malicious statements that damage the database.  For
    +** example, an application may allow a user to enter arbitrary
    +** SQL queries for evaluation by a database.  But the application does
    +** not want the user to be able to make arbitrary changes to the
    +** database.  An authorizer could then be put in place while the
    +** user-entered SQL is being [sqlite3_prepare | prepared] that
    +** disallows everything except [SELECT] statements.
    +**
    +** Applications that need to process SQL from untrusted sources
    +** might also consider lowering resource limits using [sqlite3_limit()]
    +** and limiting database size using the [max_page_count] [PRAGMA]
    +** in addition to using an authorizer.
    +**
    +** Only a single authorizer can be in place on a database connection
    +** at a time.  Each call to sqlite3_set_authorizer overrides the
    +** previous call.  Disable the authorizer by installing a NULL callback.
    +** The authorizer is disabled by default.
    +**
    +** The authorizer callback must not do anything that will modify
    +** the database connection that invoked the authorizer callback.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** When [sqlite3_prepare_v2()] is used to prepare a statement, the
    +** statement might be re-prepared during [sqlite3_step()] due to a 
    +** schema change.  Hence, the application should ensure that the
    +** correct authorizer callback remains in place during the [sqlite3_step()].
    +**
    +** Note that the authorizer callback is invoked only during
    +** [sqlite3_prepare()] or its variants.  Authorization is not
    +** performed during statement evaluation in [sqlite3_step()], unless
    +** as stated in the previous paragraph, sqlite3_step() invokes
    +** sqlite3_prepare_v2() to reprepare a statement after a schema change.
    +**
    +** Requirements:
    +** [H12501] [H12502] [H12503] [H12504] [H12505] [H12506] [H12507] [H12510]
    +** [H12511] [H12512] [H12520] [H12521] [H12522]
    +*/
    +SQLITE_API int sqlite3_set_authorizer(
    +  sqlite3*,
    +  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
    +  void *pUserData
    +);
    +
    +/*
    +** CAPI3REF: Authorizer Return Codes {H12590} <H12500>
    +**
    +** The [sqlite3_set_authorizer | authorizer callback function] must
    +** return either [SQLITE_OK] or one of these two constants in order
    +** to signal SQLite whether or not the action is permitted.  See the
    +** [sqlite3_set_authorizer | authorizer documentation] for additional
    +** information.
    +*/
    +#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
    +#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
    +
    +/*
    +** CAPI3REF: Authorizer Action Codes {H12550} <H12500>
    +**
    +** The [sqlite3_set_authorizer()] interface registers a callback function
    +** that is invoked to authorize certain SQL statement actions.  The
    +** second parameter to the callback is an integer code that specifies
    +** what action is being authorized.  These are the integer action codes that
    +** the authorizer callback may be passed.
    +**
    +** These action code values signify what kind of operation is to be
    +** authorized.  The 3rd and 4th parameters to the authorization
    +** callback function will be parameters or NULL depending on which of these
    +** codes is used as the second parameter.  The 5th parameter to the
    +** authorizer callback is the name of the database ("main", "temp",
    +** etc.) if applicable.  The 6th parameter to the authorizer callback
    +** is the name of the inner-most trigger or view that is responsible for
    +** the access attempt or NULL if this access attempt is directly from
    +** top-level SQL code.
    +**
    +** Requirements:
    +** [H12551] [H12552] [H12553] [H12554]
    +*/
    +/******************************************* 3rd ************ 4th ***********/
    +#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
    +#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
    +#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
    +#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
    +#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
    +#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
    +#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
    +#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
    +#define SQLITE_DELETE                9   /* Table Name      NULL            */
    +#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
    +#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
    +#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
    +#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
    +#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
    +#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
    +#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
    +#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
    +#define SQLITE_INSERT               18   /* Table Name      NULL            */
    +#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
    +#define SQLITE_READ                 20   /* Table Name      Column Name     */
    +#define SQLITE_SELECT               21   /* NULL            NULL            */
    +#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
    +#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
    +#define SQLITE_ATTACH               24   /* Filename        NULL            */
    +#define SQLITE_DETACH               25   /* Database Name   NULL            */
    +#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
    +#define SQLITE_REINDEX              27   /* Index Name      NULL            */
    +#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
    +#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
    +#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
    +#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
    +#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
    +#define SQLITE_COPY                  0   /* No longer used */
    +
    +/*
    +** CAPI3REF: Tracing And Profiling Functions {H12280} <S60400>
    +** EXPERIMENTAL
    +**
    +** These routines register callback functions that can be used for
    +** tracing and profiling the execution of SQL statements.
    +**
    +** The callback function registered by sqlite3_trace() is invoked at
    +** various times when an SQL statement is being run by [sqlite3_step()].
    +** The callback returns a UTF-8 rendering of the SQL statement text
    +** as the statement first begins executing.  Additional callbacks occur
    +** as each triggered subprogram is entered.  The callbacks for triggers
    +** contain a UTF-8 SQL comment that identifies the trigger.
    +**
    +** The callback function registered by sqlite3_profile() is invoked
    +** as each SQL statement finishes.  The profile callback contains
    +** the original statement text and an estimate of wall-clock time
    +** of how long that statement took to run.
    +**
    +** Requirements:
    +** [H12281] [H12282] [H12283] [H12284] [H12285] [H12287] [H12288] [H12289]
    +** [H12290]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
    +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
    +   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
    +
    +/*
    +** CAPI3REF: Query Progress Callbacks {H12910} <S60400>
    +**
    +** This routine configures a callback function - the
    +** progress callback - that is invoked periodically during long
    +** running calls to [sqlite3_exec()], [sqlite3_step()] and
    +** [sqlite3_get_table()].  An example use for this
    +** interface is to keep a GUI updated during a large query.
    +**
    +** If the progress callback returns non-zero, the operation is
    +** interrupted.  This feature can be used to implement a
    +** "Cancel" button on a GUI progress dialog box.
    +**
    +** The progress handler must not do anything that will modify
    +** the database connection that invoked the progress handler.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** Requirements:
    +** [H12911] [H12912] [H12913] [H12914] [H12915] [H12916] [H12917] [H12918]
    +**
    +*/
    +SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
    +
    +/*
    +** CAPI3REF: Opening A New Database Connection {H12700} <S40200>
    +**
    +** These routines open an SQLite database file whose name is given by the
    +** filename argument. The filename argument is interpreted as UTF-8 for
    +** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
    +** order for sqlite3_open16(). A [database connection] handle is usually
    +** returned in *ppDb, even if an error occurs.  The only exception is that
    +** if SQLite is unable to allocate memory to hold the [sqlite3] object,
    +** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
    +** object. If the database is opened (and/or created) successfully, then
    +** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.  The
    +** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
    +** an English language description of the error.
    +**
    +** The default encoding for the database will be UTF-8 if
    +** sqlite3_open() or sqlite3_open_v2() is called and
    +** UTF-16 in the native byte order if sqlite3_open16() is used.
    +**
    +** Whether or not an error occurs when it is opened, resources
    +** associated with the [database connection] handle should be released by
    +** passing it to [sqlite3_close()] when it is no longer required.
    +**
    +** The sqlite3_open_v2() interface works like sqlite3_open()
    +** except that it accepts two additional parameters for additional control
    +** over the new database connection.  The flags parameter can take one of
    +** the following three values, optionally combined with the 
    +** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
    +** and/or [SQLITE_OPEN_PRIVATECACHE] flags:
    +**
    +** <dl>
    +** <dt>[SQLITE_OPEN_READONLY]</dt>
    +** <dd>The database is opened in read-only mode.  If the database does not
    +** already exist, an error is returned.</dd>
    +**
    +** <dt>[SQLITE_OPEN_READWRITE]</dt>
    +** <dd>The database is opened for reading and writing if possible, or reading
    +** only if the file is write protected by the operating system.  In either
    +** case the database must already exist, otherwise an error is returned.</dd>
    +**
    +** <dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
    +** <dd>The database is opened for reading and writing, and is creates it if
    +** it does not already exist. This is the behavior that is always used for
    +** sqlite3_open() and sqlite3_open16().</dd>
    +** </dl>
    +**
    +** If the 3rd parameter to sqlite3_open_v2() is not one of the
    +** combinations shown above or one of the combinations shown above combined
    +** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],
    +** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags,
    +** then the behavior is undefined.
    +**
    +** If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
    +** opens in the multi-thread [threading mode] as long as the single-thread
    +** mode has not been set at compile-time or start-time.  If the
    +** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
    +** in the serialized [threading mode] unless single-thread was
    +** previously selected at compile-time or start-time.
    +** The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
    +** eligible to use [shared cache mode], regardless of whether or not shared
    +** cache is enabled using [sqlite3_enable_shared_cache()].  The
    +** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
    +** participate in [shared cache mode] even if it is enabled.
    +**
    +** If the filename is ":memory:", then a private, temporary in-memory database
    +** is created for the connection.  This in-memory database will vanish when
    +** the database connection is closed.  Future versions of SQLite might
    +** make use of additional special filenames that begin with the ":" character.
    +** It is recommended that when a database filename actually does begin with
    +** a ":" character you should prefix the filename with a pathname such as
    +** "./" to avoid ambiguity.
    +**
    +** If the filename is an empty string, then a private, temporary
    +** on-disk database will be created.  This private database will be
    +** automatically deleted as soon as the database connection is closed.
    +**
    +** The fourth parameter to sqlite3_open_v2() is the name of the
    +** [sqlite3_vfs] object that defines the operating system interface that
    +** the new database connection should use.  If the fourth parameter is
    +** a NULL pointer then the default [sqlite3_vfs] object is used.
    +**
    +** <b>Note to Windows users:</b>  The encoding used for the filename argument
    +** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
    +** codepage is currently defined.  Filenames containing international
    +** characters must be converted to UTF-8 prior to passing them into
    +** sqlite3_open() or sqlite3_open_v2().
    +**
    +** Requirements:
    +** [H12701] [H12702] [H12703] [H12704] [H12706] [H12707] [H12709] [H12711]
    +** [H12712] [H12713] [H12714] [H12717] [H12719] [H12721] [H12723]
    +*/
    +SQLITE_API int sqlite3_open(
    +  const char *filename,   /* Database filename (UTF-8) */
    +  sqlite3 **ppDb          /* OUT: SQLite db handle */
    +);
    +SQLITE_API int sqlite3_open16(
    +  const void *filename,   /* Database filename (UTF-16) */
    +  sqlite3 **ppDb          /* OUT: SQLite db handle */
    +);
    +SQLITE_API int sqlite3_open_v2(
    +  const char *filename,   /* Database filename (UTF-8) */
    +  sqlite3 **ppDb,         /* OUT: SQLite db handle */
    +  int flags,              /* Flags */
    +  const char *zVfs        /* Name of VFS module to use */
    +);
    +
    +/*
    +** CAPI3REF: Error Codes And Messages {H12800} <S60200>
    +**
    +** The sqlite3_errcode() interface returns the numeric [result code] or
    +** [extended result code] for the most recent failed sqlite3_* API call
    +** associated with a [database connection]. If a prior API call failed
    +** but the most recent API call succeeded, the return value from
    +** sqlite3_errcode() is undefined.  The sqlite3_extended_errcode()
    +** interface is the same except that it always returns the 
    +** [extended result code] even when extended result codes are
    +** disabled.
    +**
    +** The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
    +** text that describes the error, as either UTF-8 or UTF-16 respectively.
    +** Memory to hold the error message string is managed internally.
    +** The application does not need to worry about freeing the result.
    +** However, the error string might be overwritten or deallocated by
    +** subsequent calls to other SQLite interface functions.
    +**
    +** When the serialized [threading mode] is in use, it might be the
    +** case that a second error occurs on a separate thread in between
    +** the time of the first error and the call to these interfaces.
    +** When that happens, the second error will be reported since these
    +** interfaces always report the most recent result.  To avoid
    +** this, each thread can obtain exclusive use of the [database connection] D
    +** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
    +** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
    +** all calls to the interfaces listed here are completed.
    +**
    +** If an interface fails with SQLITE_MISUSE, that means the interface
    +** was invoked incorrectly by the application.  In that case, the
    +** error code and message may or may not be set.
    +**
    +** Requirements:
    +** [H12801] [H12802] [H12803] [H12807] [H12808] [H12809]
    +*/
    +SQLITE_API int sqlite3_errcode(sqlite3 *db);
    +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
    +SQLITE_API const char *sqlite3_errmsg(sqlite3*);
    +SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
    +
    +/*
    +** CAPI3REF: SQL Statement Object {H13000} <H13010>
    +** KEYWORDS: {prepared statement} {prepared statements}
    +**
    +** An instance of this object represents a single SQL statement.
    +** This object is variously known as a "prepared statement" or a
    +** "compiled SQL statement" or simply as a "statement".
    +**
    +** The life of a statement object goes something like this:
    +**
    +** <ol>
    +** <li> Create the object using [sqlite3_prepare_v2()] or a related
    +**      function.
    +** <li> Bind values to [host parameters] using the sqlite3_bind_*()
    +**      interfaces.
    +** <li> Run the SQL by calling [sqlite3_step()] one or more times.
    +** <li> Reset the statement using [sqlite3_reset()] then go back
    +**      to step 2.  Do this zero or more times.
    +** <li> Destroy the object using [sqlite3_finalize()].
    +** </ol>
    +**
    +** Refer to documentation on individual methods above for additional
    +** information.
    +*/
    +typedef struct sqlite3_stmt sqlite3_stmt;
    +
    +/*
    +** CAPI3REF: Run-time Limits {H12760} <S20600>
    +**
    +** This interface allows the size of various constructs to be limited
    +** on a connection by connection basis.  The first parameter is the
    +** [database connection] whose limit is to be set or queried.  The
    +** second parameter is one of the [limit categories] that define a
    +** class of constructs to be size limited.  The third parameter is the
    +** new limit for that construct.  The function returns the old limit.
    +**
    +** If the new limit is a negative number, the limit is unchanged.
    +** For the limit category of SQLITE_LIMIT_XYZ there is a 
    +** [limits | hard upper bound]
    +** set by a compile-time C preprocessor macro named 
    +** [limits | SQLITE_MAX_XYZ].
    +** (The "_LIMIT_" in the name is changed to "_MAX_".)
    +** Attempts to increase a limit above its hard upper bound are
    +** silently truncated to the hard upper limit.
    +**
    +** Run time limits are intended for use in applications that manage
    +** both their own internal database and also databases that are controlled
    +** by untrusted external sources.  An example application might be a
    +** web browser that has its own databases for storing history and
    +** separate databases controlled by JavaScript applications downloaded
    +** off the Internet.  The internal databases can be given the
    +** large, default limits.  Databases managed by external sources can
    +** be given much smaller limits designed to prevent a denial of service
    +** attack.  Developers might also want to use the [sqlite3_set_authorizer()]
    +** interface to further control untrusted SQL.  The size of the database
    +** created by an untrusted script can be contained using the
    +** [max_page_count] [PRAGMA].
    +**
    +** New run-time limit categories may be added in future releases.
    +**
    +** Requirements:
    +** [H12762] [H12766] [H12769]
    +*/
    +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
    +
    +/*
    +** CAPI3REF: Run-Time Limit Categories {H12790} <H12760>
    +** KEYWORDS: {limit category} {*limit categories}
    +**
    +** These constants define various performance limits
    +** that can be lowered at run-time using [sqlite3_limit()].
    +** The synopsis of the meanings of the various limits is shown below.
    +** Additional information is available at [limits | Limits in SQLite].
    +**
    +** <dl>
    +** <dt>SQLITE_LIMIT_LENGTH</dt>
    +** <dd>The maximum size of any string or BLOB or table row.<dd>
    +**
    +** <dt>SQLITE_LIMIT_SQL_LENGTH</dt>
    +** <dd>The maximum length of an SQL statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_COLUMN</dt>
    +** <dd>The maximum number of columns in a table definition or in the
    +** result set of a [SELECT] or the maximum number of columns in an index
    +** or in an ORDER BY or GROUP BY clause.</dd>
    +**
    +** <dt>SQLITE_LIMIT_EXPR_DEPTH</dt>
    +** <dd>The maximum depth of the parse tree on any expression.</dd>
    +**
    +** <dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>
    +** <dd>The maximum number of terms in a compound SELECT statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_VDBE_OP</dt>
    +** <dd>The maximum number of instructions in a virtual machine program
    +** used to implement an SQL statement.</dd>
    +**
    +** <dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
    +** <dd>The maximum number of arguments on a function.</dd>
    +**
    +** <dt>SQLITE_LIMIT_ATTACHED</dt>
    +** <dd>The maximum number of [ATTACH | attached databases].</dd>
    +**
    +** <dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>
    +** <dd>The maximum length of the pattern argument to the [LIKE] or
    +** [GLOB] operators.</dd>
    +**
    +** <dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
    +** <dd>The maximum number of variables in an SQL statement that can
    +** be bound.</dd>
    +**
    +** <dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
    +** <dd>The maximum depth of recursion for triggers.</dd>
    +** </dl>
    +*/
    +#define SQLITE_LIMIT_LENGTH                    0
    +#define SQLITE_LIMIT_SQL_LENGTH                1
    +#define SQLITE_LIMIT_COLUMN                    2
    +#define SQLITE_LIMIT_EXPR_DEPTH                3
    +#define SQLITE_LIMIT_COMPOUND_SELECT           4
    +#define SQLITE_LIMIT_VDBE_OP                   5
    +#define SQLITE_LIMIT_FUNCTION_ARG              6
    +#define SQLITE_LIMIT_ATTACHED                  7
    +#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
    +#define SQLITE_LIMIT_VARIABLE_NUMBER           9
    +#define SQLITE_LIMIT_TRIGGER_DEPTH            10
    +
    +/*
    +** CAPI3REF: Compiling An SQL Statement {H13010} <S10000>
    +** KEYWORDS: {SQL statement compiler}
    +**
    +** To execute an SQL query, it must first be compiled into a byte-code
    +** program using one of these routines.
    +**
    +** The first argument, "db", is a [database connection] obtained from a
    +** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
    +** [sqlite3_open16()].  The database connection must not have been closed.
    +**
    +** The second argument, "zSql", is the statement to be compiled, encoded
    +** as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
    +** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
    +** use UTF-16.
    +**
    +** If the nByte argument is less than zero, then zSql is read up to the
    +** first zero terminator. If nByte is non-negative, then it is the maximum
    +** number of  bytes read from zSql.  When nByte is non-negative, the
    +** zSql string ends at either the first '\000' or '\u0000' character or
    +** the nByte-th byte, whichever comes first. If the caller knows
    +** that the supplied string is nul-terminated, then there is a small
    +** performance advantage to be gained by passing an nByte parameter that
    +** is equal to the number of bytes in the input string <i>including</i>
    +** the nul-terminator bytes.
    +**
    +** If pzTail is not NULL then *pzTail is made to point to the first byte
    +** past the end of the first SQL statement in zSql.  These routines only
    +** compile the first statement in zSql, so *pzTail is left pointing to
    +** what remains uncompiled.
    +**
    +** *ppStmt is left pointing to a compiled [prepared statement] that can be
    +** executed using [sqlite3_step()].  If there is an error, *ppStmt is set
    +** to NULL.  If the input text contains no SQL (if the input is an empty
    +** string or a comment) then *ppStmt is set to NULL.
    +** The calling procedure is responsible for deleting the compiled
    +** SQL statement using [sqlite3_finalize()] after it has finished with it.
    +** ppStmt may not be NULL.
    +**
    +** On success, [SQLITE_OK] is returned, otherwise an [error code] is returned.
    +**
    +** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
    +** recommended for all new programs. The two older interfaces are retained
    +** for backwards compatibility, but their use is discouraged.
    +** In the "v2" interfaces, the prepared statement
    +** that is returned (the [sqlite3_stmt] object) contains a copy of the
    +** original SQL text. This causes the [sqlite3_step()] interface to
    +** behave a differently in three ways:
    +**
    +** <ol>
    +** <li>
    +** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
    +** always used to do, [sqlite3_step()] will automatically recompile the SQL
    +** statement and try to run it again.  If the schema has changed in
    +** a way that makes the statement no longer valid, [sqlite3_step()] will still
    +** return [SQLITE_SCHEMA].  But unlike the legacy behavior, [SQLITE_SCHEMA] is
    +** now a fatal error.  Calling [sqlite3_prepare_v2()] again will not make the
    +** error go away.  Note: use [sqlite3_errmsg()] to find the text
    +** of the parsing error that results in an [SQLITE_SCHEMA] return.
    +** </li>
    +**
    +** <li>
    +** When an error occurs, [sqlite3_step()] will return one of the detailed
    +** [error codes] or [extended error codes].  The legacy behavior was that
    +** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
    +** and you would have to make a second call to [sqlite3_reset()] in order
    +** to find the underlying cause of the problem. With the "v2" prepare
    +** interfaces, the underlying reason for the error is returned immediately.
    +** </li>
    +**
    +** <li>
    +** ^If the value of a [parameter | host parameter] in the WHERE clause might
    +** change the query plan for a statement, then the statement may be
    +** automatically recompiled (as if there had been a schema change) on the first 
    +** [sqlite3_step()] call following any change to the 
    +** [sqlite3_bind_text | bindings] of the [parameter]. 
    +** </li>
    +** </ol>
    +**
    +** Requirements:
    +** [H13011] [H13012] [H13013] [H13014] [H13015] [H13016] [H13019] [H13021]
    +**
    +*/
    +SQLITE_API int sqlite3_prepare(
    +  sqlite3 *db,            /* Database handle */
    +  const char *zSql,       /* SQL statement, UTF-8 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare_v2(
    +  sqlite3 *db,            /* Database handle */
    +  const char *zSql,       /* SQL statement, UTF-8 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare16(
    +  sqlite3 *db,            /* Database handle */
    +  const void *zSql,       /* SQL statement, UTF-16 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +SQLITE_API int sqlite3_prepare16_v2(
    +  sqlite3 *db,            /* Database handle */
    +  const void *zSql,       /* SQL statement, UTF-16 encoded */
    +  int nByte,              /* Maximum length of zSql in bytes. */
    +  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
    +  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
    +);
    +
    +/*
    +** CAPI3REF: Retrieving Statement SQL {H13100} <H13000>
    +**
    +** This interface can be used to retrieve a saved copy of the original
    +** SQL text used to create a [prepared statement] if that statement was
    +** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
    +**
    +** Requirements:
    +** [H13101] [H13102] [H13103]
    +*/
    +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Dynamically Typed Value Object {H15000} <S20200>
    +** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
    +**
    +** SQLite uses the sqlite3_value object to represent all values
    +** that can be stored in a database table. SQLite uses dynamic typing
    +** for the values it stores. Values stored in sqlite3_value objects
    +** can be integers, floating point values, strings, BLOBs, or NULL.
    +**
    +** An sqlite3_value object may be either "protected" or "unprotected".
    +** Some interfaces require a protected sqlite3_value.  Other interfaces
    +** will accept either a protected or an unprotected sqlite3_value.
    +** Every interface that accepts sqlite3_value arguments specifies
    +** whether or not it requires a protected sqlite3_value.
    +**
    +** The terms "protected" and "unprotected" refer to whether or not
    +** a mutex is held.  A internal mutex is held for a protected
    +** sqlite3_value object but no mutex is held for an unprotected
    +** sqlite3_value object.  If SQLite is compiled to be single-threaded
    +** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
    +** or if SQLite is run in one of reduced mutex modes 
    +** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
    +** then there is no distinction between protected and unprotected
    +** sqlite3_value objects and they can be used interchangeably.  However,
    +** for maximum code portability it is recommended that applications
    +** still make the distinction between between protected and unprotected
    +** sqlite3_value objects even when not strictly required.
    +**
    +** The sqlite3_value objects that are passed as parameters into the
    +** implementation of [application-defined SQL functions] are protected.
    +** The sqlite3_value object returned by
    +** [sqlite3_column_value()] is unprotected.
    +** Unprotected sqlite3_value objects may only be used with
    +** [sqlite3_result_value()] and [sqlite3_bind_value()].
    +** The [sqlite3_value_blob | sqlite3_value_type()] family of
    +** interfaces require protected sqlite3_value objects.
    +*/
    +typedef struct Mem sqlite3_value;
    +
    +/*
    +** CAPI3REF: SQL Function Context Object {H16001} <S20200>
    +**
    +** The context in which an SQL function executes is stored in an
    +** sqlite3_context object.  A pointer to an sqlite3_context object
    +** is always first parameter to [application-defined SQL functions].
    +** The application-defined SQL function implementation will pass this
    +** pointer through into calls to [sqlite3_result_int | sqlite3_result()],
    +** [sqlite3_aggregate_context()], [sqlite3_user_data()],
    +** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
    +** and/or [sqlite3_set_auxdata()].
    +*/
    +typedef struct sqlite3_context sqlite3_context;
    +
    +/*
    +** CAPI3REF: Binding Values To Prepared Statements {H13500} <S70300>
    +** KEYWORDS: {host parameter} {host parameters} {host parameter name}
    +** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
    +**
    +** In the SQL strings input to [sqlite3_prepare_v2()] and its variants,
    +** literals may be replaced by a [parameter] that matches one of following
    +** templates:
    +**
    +** <ul>
    +** <li>  ?
    +** <li>  ?NNN
    +** <li>  :VVV
    +** <li>  @VVV
    +** <li>  $VVV
    +** </ul>
    +**
    +** In the templates above, NNN represents an integer literal,
    +** and VVV represents an alphanumeric identifer.  The values of these
    +** parameters (also called "host parameter names" or "SQL parameters")
    +** can be set using the sqlite3_bind_*() routines defined here.
    +**
    +** The first argument to the sqlite3_bind_*() routines is always
    +** a pointer to the [sqlite3_stmt] object returned from
    +** [sqlite3_prepare_v2()] or its variants.
    +**
    +** The second argument is the index of the SQL parameter to be set.
    +** The leftmost SQL parameter has an index of 1.  When the same named
    +** SQL parameter is used more than once, second and subsequent
    +** occurrences have the same index as the first occurrence.
    +** The index for named parameters can be looked up using the
    +** [sqlite3_bind_parameter_index()] API if desired.  The index
    +** for "?NNN" parameters is the value of NNN.
    +** The NNN value must be between 1 and the [sqlite3_limit()]
    +** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
    +**
    +** The third argument is the value to bind to the parameter.
    +**
    +** In those routines that have a fourth argument, its value is the
    +** number of bytes in the parameter.  To be clear: the value is the
    +** number of <u>bytes</u> in the value, not the number of characters.
    +** If the fourth parameter is negative, the length of the string is
    +** the number of bytes up to the first zero terminator.
    +**
    +** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
    +** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
    +** string after SQLite has finished with it. If the fifth argument is
    +** the special value [SQLITE_STATIC], then SQLite assumes that the
    +** information is in static, unmanaged space and does not need to be freed.
    +** If the fifth argument has the value [SQLITE_TRANSIENT], then
    +** SQLite makes its own private copy of the data immediately, before
    +** the sqlite3_bind_*() routine returns.
    +**
    +** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
    +** is filled with zeroes.  A zeroblob uses a fixed amount of memory
    +** (just an integer to hold its size) while it is being processed.
    +** Zeroblobs are intended to serve as placeholders for BLOBs whose
    +** content is later written using
    +** [sqlite3_blob_open | incremental BLOB I/O] routines.
    +** A negative value for the zeroblob results in a zero-length BLOB.
    +**
    +** The sqlite3_bind_*() routines must be called after
    +** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and
    +** before [sqlite3_step()].
    +** Bindings are not cleared by the [sqlite3_reset()] routine.
    +** Unbound parameters are interpreted as NULL.
    +**
    +** These routines return [SQLITE_OK] on success or an error code if
    +** anything goes wrong.  [SQLITE_RANGE] is returned if the parameter
    +** index is out of range.  [SQLITE_NOMEM] is returned if malloc() fails.
    +** [SQLITE_MISUSE] might be returned if these routines are called on a
    +** virtual machine that is the wrong state or which has already been finalized.
    +** Detection of misuse is unreliable.  Applications should not depend
    +** on SQLITE_MISUSE returns.  SQLITE_MISUSE is intended to indicate a
    +** a logic error in the application.  Future versions of SQLite might
    +** panic rather than return SQLITE_MISUSE.
    +**
    +** See also: [sqlite3_bind_parameter_count()],
    +** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13506] [H13509] [H13512] [H13515] [H13518] [H13521] [H13524] [H13527]
    +** [H13530] [H13533] [H13536] [H13539] [H13542] [H13545] [H13548] [H13551]
    +**
    +*/
    +SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
    +SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
    +SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
    +SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
    +SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
    +SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
    +SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
    +SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
    +SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
    +
    +/*
    +** CAPI3REF: Number Of SQL Parameters {H13600} <S70300>
    +**
    +** This routine can be used to find the number of [SQL parameters]
    +** in a [prepared statement].  SQL parameters are tokens of the
    +** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
    +** placeholders for values that are [sqlite3_bind_blob | bound]
    +** to the parameters at a later time.
    +**
    +** This routine actually returns the index of the largest (rightmost)
    +** parameter. For all forms except ?NNN, this will correspond to the
    +** number of unique parameters.  If parameters of the ?NNN are used,
    +** there may be gaps in the list.
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_name()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13601]
    +*/
    +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Name Of A Host Parameter {H13620} <S70300>
    +**
    +** This routine returns a pointer to the name of the n-th
    +** [SQL parameter] in a [prepared statement].
    +** SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
    +** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
    +** respectively.
    +** In other words, the initial ":" or "$" or "@" or "?"
    +** is included as part of the name.
    +** Parameters of the form "?" without a following integer have no name
    +** and are also referred to as "anonymous parameters".
    +**
    +** The first host parameter has an index of 1, not 0.
    +**
    +** If the value n is out of range or if the n-th parameter is
    +** nameless, then NULL is returned.  The returned string is
    +** always in UTF-8 encoding even if the named parameter was
    +** originally specified as UTF-16 in [sqlite3_prepare16()] or
    +** [sqlite3_prepare16_v2()].
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_count()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13621]
    +*/
    +SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
    +
    +/*
    +** CAPI3REF: Index Of A Parameter With A Given Name {H13640} <S70300>
    +**
    +** Return the index of an SQL parameter given its name.  The
    +** index value returned is suitable for use as the second
    +** parameter to [sqlite3_bind_blob|sqlite3_bind()].  A zero
    +** is returned if no matching parameter is found.  The parameter
    +** name must be given in UTF-8 even if the original statement
    +** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
    +**
    +** See also: [sqlite3_bind_blob|sqlite3_bind()],
    +** [sqlite3_bind_parameter_count()], and
    +** [sqlite3_bind_parameter_index()].
    +**
    +** Requirements:
    +** [H13641]
    +*/
    +SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
    +
    +/*
    +** CAPI3REF: Reset All Bindings On A Prepared Statement {H13660} <S70300>
    +**
    +** Contrary to the intuition of many, [sqlite3_reset()] does not reset
    +** the [sqlite3_bind_blob | bindings] on a [prepared statement].
    +** Use this routine to reset all host parameters to NULL.
    +**
    +** Requirements:
    +** [H13661]
    +*/
    +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Number Of Columns In A Result Set {H13710} <S10700>
    +**
    +** Return the number of columns in the result set returned by the
    +** [prepared statement]. This routine returns 0 if pStmt is an SQL
    +** statement that does not return data (for example an [UPDATE]).
    +**
    +** Requirements:
    +** [H13711]
    +*/
    +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Column Names In A Result Set {H13720} <S10700>
    +**
    +** These routines return the name assigned to a particular column
    +** in the result set of a [SELECT] statement.  The sqlite3_column_name()
    +** interface returns a pointer to a zero-terminated UTF-8 string
    +** and sqlite3_column_name16() returns a pointer to a zero-terminated
    +** UTF-16 string.  The first parameter is the [prepared statement]
    +** that implements the [SELECT] statement. The second parameter is the
    +** column number.  The leftmost column is number 0.
    +**
    +** The returned string pointer is valid until either the [prepared statement]
    +** is destroyed by [sqlite3_finalize()] or until the next call to
    +** sqlite3_column_name() or sqlite3_column_name16() on the same column.
    +**
    +** If sqlite3_malloc() fails during the processing of either routine
    +** (for example during a conversion from UTF-8 to UTF-16) then a
    +** NULL pointer is returned.
    +**
    +** The name of a result column is the value of the "AS" clause for
    +** that column, if there is an AS clause.  If there is no AS clause
    +** then the name of the column is unspecified and may change from
    +** one release of SQLite to the next.
    +**
    +** Requirements:
    +** [H13721] [H13723] [H13724] [H13725] [H13726] [H13727]
    +*/
    +SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
    +SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
    +
    +/*
    +** CAPI3REF: Source Of Data In A Query Result {H13740} <S10700>
    +**
    +** These routines provide a means to determine what column of what
    +** table in which database a result of a [SELECT] statement comes from.
    +** The name of the database or table or column can be returned as
    +** either a UTF-8 or UTF-16 string.  The _database_ routines return
    +** the database name, the _table_ routines return the table name, and
    +** the origin_ routines return the column name.
    +** The returned string is valid until the [prepared statement] is destroyed
    +** using [sqlite3_finalize()] or until the same information is requested
    +** again in a different encoding.
    +**
    +** The names returned are the original un-aliased names of the
    +** database, table, and column.
    +**
    +** The first argument to the following calls is a [prepared statement].
    +** These functions return information about the Nth column returned by
    +** the statement, where N is the second function argument.
    +**
    +** If the Nth column returned by the statement is an expression or
    +** subquery and is not a column value, then all of these functions return
    +** NULL.  These routine might also return NULL if a memory allocation error
    +** occurs.  Otherwise, they return the name of the attached database, table
    +** and column that query result column was extracted from.
    +**
    +** As with all other SQLite APIs, those postfixed with "16" return
    +** UTF-16 encoded strings, the other functions return UTF-8. {END}
    +**
    +** These APIs are only available if the library was compiled with the
    +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
    +**
    +** {A13751}
    +** If two or more threads call one or more of these routines against the same
    +** prepared statement and column at the same time then the results are
    +** undefined.
    +**
    +** Requirements:
    +** [H13741] [H13742] [H13743] [H13744] [H13745] [H13746] [H13748]
    +**
    +** If two or more threads call one or more
    +** [sqlite3_column_database_name | column metadata interfaces]
    +** for the same [prepared statement] and result column
    +** at the same time then the results are undefined.
    +*/
    +SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
    +SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
    +SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
    +
    +/*
    +** CAPI3REF: Declared Datatype Of A Query Result {H13760} <S10700>
    +**
    +** The first parameter is a [prepared statement].
    +** If this statement is a [SELECT] statement and the Nth column of the
    +** returned result set of that [SELECT] is a table column (not an
    +** expression or subquery) then the declared type of the table
    +** column is returned.  If the Nth column of the result set is an
    +** expression or subquery, then a NULL pointer is returned.
    +** The returned string is always UTF-8 encoded. {END}
    +**
    +** For example, given the database schema:
    +**
    +** CREATE TABLE t1(c1 VARIANT);
    +**
    +** and the following statement to be compiled:
    +**
    +** SELECT c1 + 1, c1 FROM t1;
    +**
    +** this routine would return the string "VARIANT" for the second result
    +** column (i==1), and a NULL pointer for the first result column (i==0).
    +**
    +** SQLite uses dynamic run-time typing.  So just because a column
    +** is declared to contain a particular type does not mean that the
    +** data stored in that column is of the declared type.  SQLite is
    +** strongly typed, but the typing is dynamic not static.  Type
    +** is associated with individual values, not with the containers
    +** used to hold those values.
    +**
    +** Requirements:
    +** [H13761] [H13762] [H13763]
    +*/
    +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
    +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
    +
    +/*
    +** CAPI3REF: Evaluate An SQL Statement {H13200} <S10000>
    +**
    +** After a [prepared statement] has been prepared using either
    +** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
    +** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
    +** must be called one or more times to evaluate the statement.
    +**
    +** The details of the behavior of the sqlite3_step() interface depend
    +** on whether the statement was prepared using the newer "v2" interface
    +** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
    +** interface [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the
    +** new "v2" interface is recommended for new applications but the legacy
    +** interface will continue to be supported.
    +**
    +** In the legacy interface, the return value will be either [SQLITE_BUSY],
    +** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
    +** With the "v2" interface, any of the other [result codes] or
    +** [extended result codes] might be returned as well.
    +**
    +** [SQLITE_BUSY] means that the database engine was unable to acquire the
    +** database locks it needs to do its job.  If the statement is a [COMMIT]
    +** or occurs outside of an explicit transaction, then you can retry the
    +** statement.  If the statement is not a [COMMIT] and occurs within a
    +** explicit transaction then you should rollback the transaction before
    +** continuing.
    +**
    +** [SQLITE_DONE] means that the statement has finished executing
    +** successfully.  sqlite3_step() should not be called again on this virtual
    +** machine without first calling [sqlite3_reset()] to reset the virtual
    +** machine back to its initial state.
    +**
    +** If the SQL statement being executed returns any data, then [SQLITE_ROW]
    +** is returned each time a new row of data is ready for processing by the
    +** caller. The values may be accessed using the [column access functions].
    +** sqlite3_step() is called again to retrieve the next row of data.
    +**
    +** [SQLITE_ERROR] means that a run-time error (such as a constraint
    +** violation) has occurred.  sqlite3_step() should not be called again on
    +** the VM. More information may be found by calling [sqlite3_errmsg()].
    +** With the legacy interface, a more specific error code (for example,
    +** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
    +** can be obtained by calling [sqlite3_reset()] on the
    +** [prepared statement].  In the "v2" interface,
    +** the more specific error code is returned directly by sqlite3_step().
    +**
    +** [SQLITE_MISUSE] means that the this routine was called inappropriately.
    +** Perhaps it was called on a [prepared statement] that has
    +** already been [sqlite3_finalize | finalized] or on one that had
    +** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
    +** be the case that the same database connection is being used by two or
    +** more threads at the same moment in time.
    +**
    +** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
    +** API always returns a generic error code, [SQLITE_ERROR], following any
    +** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
    +** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
    +** specific [error codes] that better describes the error.
    +** We admit that this is a goofy design.  The problem has been fixed
    +** with the "v2" interface.  If you prepare all of your SQL statements
    +** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
    +** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
    +** then the more specific [error codes] are returned directly
    +** by sqlite3_step().  The use of the "v2" interface is recommended.
    +**
    +** Requirements:
    +** [H13202] [H15304] [H15306] [H15308] [H15310]
    +*/
    +SQLITE_API int sqlite3_step(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Number of columns in a result set {H13770} <S10700>
    +**
    +** Returns the number of values in the current row of the result set.
    +**
    +** Requirements:
    +** [H13771] [H13772]
    +*/
    +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Fundamental Datatypes {H10265} <S10110><S10120>
    +** KEYWORDS: SQLITE_TEXT
    +**
    +** {H10266} Every value in SQLite has one of five fundamental datatypes:
    +**
    +** <ul>
    +** <li> 64-bit signed integer
    +** <li> 64-bit IEEE floating point number
    +** <li> string
    +** <li> BLOB
    +** <li> NULL
    +** </ul> {END}
    +**
    +** These constants are codes for each of those types.
    +**
    +** Note that the SQLITE_TEXT constant was also used in SQLite version 2
    +** for a completely different meaning.  Software that links against both
    +** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
    +** SQLITE_TEXT.
    +*/
    +#define SQLITE_INTEGER  1
    +#define SQLITE_FLOAT    2
    +#define SQLITE_BLOB     4
    +#define SQLITE_NULL     5
    +#ifdef SQLITE_TEXT
    +# undef SQLITE_TEXT
    +#else
    +# define SQLITE_TEXT     3
    +#endif
    +#define SQLITE3_TEXT     3
    +
    +/*
    +** CAPI3REF: Result Values From A Query {H13800} <S10700>
    +** KEYWORDS: {column access functions}
    +**
    +** These routines form the "result set query" interface.
    +**
    +** These routines return information about a single column of the current
    +** result row of a query.  In every case the first argument is a pointer
    +** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
    +** that was returned from [sqlite3_prepare_v2()] or one of its variants)
    +** and the second argument is the index of the column for which information
    +** should be returned.  The leftmost column of the result set has the index 0.
    +** The number of columns in the result can be determined using
    +** [sqlite3_column_count()].
    +**
    +** If the SQL statement does not currently point to a valid row, or if the
    +** column index is out of range, the result is undefined.
    +** These routines may only be called when the most recent call to
    +** [sqlite3_step()] has returned [SQLITE_ROW] and neither
    +** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
    +** If any of these routines are called after [sqlite3_reset()] or
    +** [sqlite3_finalize()] or after [sqlite3_step()] has returned
    +** something other than [SQLITE_ROW], the results are undefined.
    +** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
    +** are called from a different thread while any of these routines
    +** are pending, then the results are undefined.
    +**
    +** The sqlite3_column_type() routine returns the
    +** [SQLITE_INTEGER | datatype code] for the initial data type
    +** of the result column.  The returned value is one of [SQLITE_INTEGER],
    +** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].  The value
    +** returned by sqlite3_column_type() is only meaningful if no type
    +** conversions have occurred as described below.  After a type conversion,
    +** the value returned by sqlite3_column_type() is undefined.  Future
    +** versions of SQLite may change the behavior of sqlite3_column_type()
    +** following a type conversion.
    +**
    +** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
    +** routine returns the number of bytes in that BLOB or string.
    +** If the result is a UTF-16 string, then sqlite3_column_bytes() converts
    +** the string to UTF-8 and then returns the number of bytes.
    +** If the result is a numeric value then sqlite3_column_bytes() uses
    +** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
    +** the number of bytes in that string.
    +** The value returned does not include the zero terminator at the end
    +** of the string.  For clarity: the value returned is the number of
    +** bytes in the string, not the number of characters.
    +**
    +** Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
    +** even empty strings, are always zero terminated.  The return
    +** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary
    +** pointer, possibly even a NULL pointer.
    +**
    +** The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes()
    +** but leaves the result in UTF-16 in native byte order instead of UTF-8.
    +** The zero terminator is not included in this count.
    +**
    +** The object returned by [sqlite3_column_value()] is an
    +** [unprotected sqlite3_value] object.  An unprotected sqlite3_value object
    +** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
    +** If the [unprotected sqlite3_value] object returned by
    +** [sqlite3_column_value()] is used in any other way, including calls
    +** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
    +** or [sqlite3_value_bytes()], then the behavior is undefined.
    +**
    +** These routines attempt to convert the value where appropriate.  For
    +** example, if the internal representation is FLOAT and a text result
    +** is requested, [sqlite3_snprintf()] is used internally to perform the
    +** conversion automatically.  The following table details the conversions
    +** that are applied:
    +**
    +** <blockquote>
    +** <table border="1">
    +** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion
    +**
    +** <tr><td>  NULL    <td> INTEGER   <td> Result is 0
    +** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0
    +** <tr><td>  NULL    <td>   TEXT    <td> Result is NULL pointer
    +** <tr><td>  NULL    <td>   BLOB    <td> Result is NULL pointer
    +** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float
    +** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer
    +** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT
    +** <tr><td>  FLOAT   <td> INTEGER   <td> Convert from float to integer
    +** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float
    +** <tr><td>  FLOAT   <td>   BLOB    <td> Same as FLOAT->TEXT
    +** <tr><td>  TEXT    <td> INTEGER   <td> Use atoi()
    +** <tr><td>  TEXT    <td>  FLOAT    <td> Use atof()
    +** <tr><td>  TEXT    <td>   BLOB    <td> No change
    +** <tr><td>  BLOB    <td> INTEGER   <td> Convert to TEXT then use atoi()
    +** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()
    +** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed
    +** </table>
    +** </blockquote>
    +**
    +** The table above makes reference to standard C library functions atoi()
    +** and atof().  SQLite does not really use these functions.  It has its
    +** own equivalent internal routines.  The atoi() and atof() names are
    +** used in the table for brevity and because they are familiar to most
    +** C programmers.
    +**
    +** Note that when type conversions occur, pointers returned by prior
    +** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
    +** sqlite3_column_text16() may be invalidated.
    +** Type conversions and pointer invalidations might occur
    +** in the following cases:
    +**
    +** <ul>
    +** <li> The initial content is a BLOB and sqlite3_column_text() or
    +**      sqlite3_column_text16() is called.  A zero-terminator might
    +**      need to be added to the string.</li>
    +** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or
    +**      sqlite3_column_text16() is called.  The content must be converted
    +**      to UTF-16.</li>
    +** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or
    +**      sqlite3_column_text() is called.  The content must be converted
    +**      to UTF-8.</li>
    +** </ul>
    +**
    +** Conversions between UTF-16be and UTF-16le are always done in place and do
    +** not invalidate a prior pointer, though of course the content of the buffer
    +** that the prior pointer points to will have been modified.  Other kinds
    +** of conversion are done in place when it is possible, but sometimes they
    +** are not possible and in those cases prior pointers are invalidated.
    +**
    +** The safest and easiest to remember policy is to invoke these routines
    +** in one of the following ways:
    +**
    +** <ul>
    +**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>
    +**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>
    +**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>
    +** </ul>
    +**
    +** In other words, you should call sqlite3_column_text(),
    +** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
    +** into the desired format, then invoke sqlite3_column_bytes() or
    +** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls
    +** to sqlite3_column_text() or sqlite3_column_blob() with calls to
    +** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
    +** with calls to sqlite3_column_bytes().
    +**
    +** The pointers returned are valid until a type conversion occurs as
    +** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
    +** [sqlite3_finalize()] is called.  The memory space used to hold strings
    +** and BLOBs is freed automatically.  Do <b>not</b> pass the pointers returned
    +** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
    +** [sqlite3_free()].
    +**
    +** If a memory allocation error occurs during the evaluation of any
    +** of these routines, a default value is returned.  The default value
    +** is either the integer 0, the floating point number 0.0, or a NULL
    +** pointer.  Subsequent calls to [sqlite3_errcode()] will return
    +** [SQLITE_NOMEM].
    +**
    +** Requirements:
    +** [H13803] [H13806] [H13809] [H13812] [H13815] [H13818] [H13821] [H13824]
    +** [H13827] [H13830]
    +*/
    +SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
    +SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
    +SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
    +SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
    +SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
    +SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
    +SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
    +
    +/*
    +** CAPI3REF: Destroy A Prepared Statement Object {H13300} <S70300><S30100>
    +**
    +** The sqlite3_finalize() function is called to delete a [prepared statement].
    +** If the statement was executed successfully or not executed at all, then
    +** SQLITE_OK is returned. If execution of the statement failed then an
    +** [error code] or [extended error code] is returned.
    +**
    +** This routine can be called at any point during the execution of the
    +** [prepared statement].  If the virtual machine has not
    +** completed execution when this routine is called, that is like
    +** encountering an error or an [sqlite3_interrupt | interrupt].
    +** Incomplete updates may be rolled back and transactions canceled,
    +** depending on the circumstances, and the
    +** [error code] returned will be [SQLITE_ABORT].
    +**
    +** Requirements:
    +** [H11302] [H11304]
    +*/
    +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Reset A Prepared Statement Object {H13330} <S70300>
    +**
    +** The sqlite3_reset() function is called to reset a [prepared statement]
    +** object back to its initial state, ready to be re-executed.
    +** Any SQL statement variables that had values bound to them using
    +** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
    +** Use [sqlite3_clear_bindings()] to reset the bindings.
    +**
    +** {H11332} The [sqlite3_reset(S)] interface resets the [prepared statement] S
    +**          back to the beginning of its program.
    +**
    +** {H11334} If the most recent call to [sqlite3_step(S)] for the
    +**          [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
    +**          or if [sqlite3_step(S)] has never before been called on S,
    +**          then [sqlite3_reset(S)] returns [SQLITE_OK].
    +**
    +** {H11336} If the most recent call to [sqlite3_step(S)] for the
    +**          [prepared statement] S indicated an error, then
    +**          [sqlite3_reset(S)] returns an appropriate [error code].
    +**
    +** {H11338} The [sqlite3_reset(S)] interface does not change the values
    +**          of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
    +*/
    +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Create Or Redefine SQL Functions {H16100} <S20200>
    +** KEYWORDS: {function creation routines}
    +** KEYWORDS: {application-defined SQL function}
    +** KEYWORDS: {application-defined SQL functions}
    +**
    +** These two functions (collectively known as "function creation routines")
    +** are used to add SQL functions or aggregates or to redefine the behavior
    +** of existing SQL functions or aggregates.  The only difference between the
    +** two is that the second parameter, the name of the (scalar) function or
    +** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16
    +** for sqlite3_create_function16().
    +**
    +** The first parameter is the [database connection] to which the SQL
    +** function is to be added.  If a single program uses more than one database
    +** connection internally, then SQL functions must be added individually to
    +** each database connection.
    +**
    +** The second parameter is the name of the SQL function to be created or
    +** redefined.  The length of the name is limited to 255 bytes, exclusive of
    +** the zero-terminator.  Note that the name length limit is in bytes, not
    +** characters.  Any attempt to create a function with a longer name
    +** will result in [SQLITE_ERROR] being returned.
    +**
    +** The third parameter (nArg)
    +** is the number of arguments that the SQL function or
    +** aggregate takes. If this parameter is -1, then the SQL function or
    +** aggregate may take any number of arguments between 0 and the limit
    +** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third
    +** parameter is less than -1 or greater than 127 then the behavior is
    +** undefined.
    +**
    +** The fourth parameter, eTextRep, specifies what
    +** [SQLITE_UTF8 | text encoding] this SQL function prefers for
    +** its parameters.  Any SQL function implementation should be able to work
    +** work with UTF-8, UTF-16le, or UTF-16be.  But some implementations may be
    +** more efficient with one encoding than another.  An application may
    +** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
    +** times with the same function but with different values of eTextRep.
    +** When multiple implementations of the same function are available, SQLite
    +** will pick the one that involves the least amount of data conversion.
    +** If there is only a single implementation which does not care what text
    +** encoding is used, then the fourth argument should be [SQLITE_ANY].
    +**
    +** The fifth parameter is an arbitrary pointer.  The implementation of the
    +** function can gain access to this pointer using [sqlite3_user_data()].
    +**
    +** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are
    +** pointers to C-language functions that implement the SQL function or
    +** aggregate. A scalar SQL function requires an implementation of the xFunc
    +** callback only, NULL pointers should be passed as the xStep and xFinal
    +** parameters. An aggregate SQL function requires an implementation of xStep
    +** and xFinal and NULL should be passed for xFunc. To delete an existing
    +** SQL function or aggregate, pass NULL for all three function callbacks.
    +**
    +** It is permitted to register multiple implementations of the same
    +** functions with the same name but with either differing numbers of
    +** arguments or differing preferred text encodings.  SQLite will use
    +** the implementation that most closely matches the way in which the
    +** SQL function is used.  A function implementation with a non-negative
    +** nArg parameter is a better match than a function implementation with
    +** a negative nArg.  A function where the preferred text encoding
    +** matches the database encoding is a better
    +** match than a function where the encoding is different.  
    +** A function where the encoding difference is between UTF16le and UTF16be
    +** is a closer match than a function where the encoding difference is
    +** between UTF8 and UTF16.
    +**
    +** Built-in functions may be overloaded by new application-defined functions.
    +** The first application-defined function with a given name overrides all
    +** built-in functions in the same [database connection] with the same name.
    +** Subsequent application-defined functions of the same name only override 
    +** prior application-defined functions that are an exact match for the
    +** number of parameters and preferred encoding.
    +**
    +** An application-defined function is permitted to call other
    +** SQLite interfaces.  However, such calls must not
    +** close the database connection nor finalize or reset the prepared
    +** statement in which the function is running.
    +**
    +** Requirements:
    +** [H16103] [H16106] [H16109] [H16112] [H16118] [H16121] [H16127]
    +** [H16130] [H16133] [H16136] [H16139] [H16142]
    +*/
    +SQLITE_API int sqlite3_create_function(
    +  sqlite3 *db,
    +  const char *zFunctionName,
    +  int nArg,
    +  int eTextRep,
    +  void *pApp,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xFinal)(sqlite3_context*)
    +);
    +SQLITE_API int sqlite3_create_function16(
    +  sqlite3 *db,
    +  const void *zFunctionName,
    +  int nArg,
    +  int eTextRep,
    +  void *pApp,
    +  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
    +  void (*xFinal)(sqlite3_context*)
    +);
    +
    +/*
    +** CAPI3REF: Text Encodings {H10267} <S50200> <H16100>
    +**
    +** These constant define integer codes that represent the various
    +** text encodings supported by SQLite.
    +*/
    +#define SQLITE_UTF8           1
    +#define SQLITE_UTF16LE        2
    +#define SQLITE_UTF16BE        3
    +#define SQLITE_UTF16          4    /* Use native byte order */
    +#define SQLITE_ANY            5    /* sqlite3_create_function only */
    +#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
    +
    +/*
    +** CAPI3REF: Deprecated Functions
    +** DEPRECATED
    +**
    +** These functions are [deprecated].  In order to maintain
    +** backwards compatibility with older code, these functions continue 
    +** to be supported.  However, new applications should avoid
    +** the use of these functions.  To help encourage people to avoid
    +** using these functions, we are not going to tell you what they do.
    +*/
    +#ifndef SQLITE_OMIT_DEPRECATED
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
    +SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
    +SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
    +#endif
    +
    +/*
    +** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} <S20200>
    +**
    +** The C-language implementation of SQL functions and aggregates uses
    +** this set of interface routines to access the parameter values on
    +** the function or aggregate.
    +**
    +** The xFunc (for scalar functions) or xStep (for aggregates) parameters
    +** to [sqlite3_create_function()] and [sqlite3_create_function16()]
    +** define callbacks that implement the SQL functions and aggregates.
    +** The 4th parameter to these callbacks is an array of pointers to
    +** [protected sqlite3_value] objects.  There is one [sqlite3_value] object for
    +** each parameter to the SQL function.  These routines are used to
    +** extract values from the [sqlite3_value] objects.
    +**
    +** These routines work only with [protected sqlite3_value] objects.
    +** Any attempt to use these routines on an [unprotected sqlite3_value]
    +** object results in undefined behavior.
    +**
    +** These routines work just like the corresponding [column access functions]
    +** except that  these routines take a single [protected sqlite3_value] object
    +** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
    +**
    +** The sqlite3_value_text16() interface extracts a UTF-16 string
    +** in the native byte-order of the host machine.  The
    +** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
    +** extract UTF-16 strings as big-endian and little-endian respectively.
    +**
    +** The sqlite3_value_numeric_type() interface attempts to apply
    +** numeric affinity to the value.  This means that an attempt is
    +** made to convert the value to an integer or floating point.  If
    +** such a conversion is possible without loss of information (in other
    +** words, if the value is a string that looks like a number)
    +** then the conversion is performed.  Otherwise no conversion occurs.
    +** The [SQLITE_INTEGER | datatype] after conversion is returned.
    +**
    +** Please pay particular attention to the fact that the pointer returned
    +** from [sqlite3_value_blob()], [sqlite3_value_text()], or
    +** [sqlite3_value_text16()] can be invalidated by a subsequent call to
    +** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
    +** or [sqlite3_value_text16()].
    +**
    +** These routines must be called from the same thread as
    +** the SQL function that supplied the [sqlite3_value*] parameters.
    +**
    +** Requirements:
    +** [H15103] [H15106] [H15109] [H15112] [H15115] [H15118] [H15121] [H15124]
    +** [H15127] [H15130] [H15133] [H15136]
    +*/
    +SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
    +SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
    +SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
    +SQLITE_API double sqlite3_value_double(sqlite3_value*);
    +SQLITE_API int sqlite3_value_int(sqlite3_value*);
    +SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
    +SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
    +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
    +SQLITE_API int sqlite3_value_type(sqlite3_value*);
    +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
    +
    +/*
    +** CAPI3REF: Obtain Aggregate Function Context {H16210} <S20200>
    +**
    +** The implementation of aggregate SQL functions use this routine to allocate
    +** a structure for storing their state.
    +**
    +** The first time the sqlite3_aggregate_context() routine is called for a
    +** particular aggregate, SQLite allocates nBytes of memory, zeroes out that
    +** memory, and returns a pointer to it. On second and subsequent calls to
    +** sqlite3_aggregate_context() for the same aggregate function index,
    +** the same buffer is returned. The implementation of the aggregate can use
    +** the returned buffer to accumulate data.
    +**
    +** SQLite automatically frees the allocated buffer when the aggregate
    +** query concludes.
    +**
    +** The first parameter should be a copy of the
    +** [sqlite3_context | SQL function context] that is the first parameter
    +** to the callback routine that implements the aggregate function.
    +**
    +** This routine must be called from the same thread in which
    +** the aggregate SQL function is running.
    +**
    +** Requirements:
    +** [H16211] [H16213] [H16215] [H16217]
    +*/
    +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
    +
    +/*
    +** CAPI3REF: User Data For Functions {H16240} <S20200>
    +**
    +** The sqlite3_user_data() interface returns a copy of
    +** the pointer that was the pUserData parameter (the 5th parameter)
    +** of the [sqlite3_create_function()]
    +** and [sqlite3_create_function16()] routines that originally
    +** registered the application defined function. {END}
    +**
    +** This routine must be called from the same thread in which
    +** the application-defined function is running.
    +**
    +** Requirements:
    +** [H16243]
    +*/
    +SQLITE_API void *sqlite3_user_data(sqlite3_context*);
    +
    +/*
    +** CAPI3REF: Database Connection For Functions {H16250} <S60600><S20200>
    +**
    +** The sqlite3_context_db_handle() interface returns a copy of
    +** the pointer to the [database connection] (the 1st parameter)
    +** of the [sqlite3_create_function()]
    +** and [sqlite3_create_function16()] routines that originally
    +** registered the application defined function.
    +**
    +** Requirements:
    +** [H16253]
    +*/
    +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
    +
    +/*
    +** CAPI3REF: Function Auxiliary Data {H16270} <S20200>
    +**
    +** The following two functions may be used by scalar SQL functions to
    +** associate metadata with argument values. If the same value is passed to
    +** multiple invocations of the same SQL function during query execution, under
    +** some circumstances the associated metadata may be preserved. This may
    +** be used, for example, to add a regular-expression matching scalar
    +** function. The compiled version of the regular expression is stored as
    +** metadata associated with the SQL value passed as the regular expression
    +** pattern.  The compiled regular expression can be reused on multiple
    +** invocations of the same function so that the original pattern string
    +** does not need to be recompiled on each invocation.
    +**
    +** The sqlite3_get_auxdata() interface returns a pointer to the metadata
    +** associated by the sqlite3_set_auxdata() function with the Nth argument
    +** value to the application-defined function. If no metadata has been ever
    +** been set for the Nth argument of the function, or if the corresponding
    +** function parameter has changed since the meta-data was set,
    +** then sqlite3_get_auxdata() returns a NULL pointer.
    +**
    +** The sqlite3_set_auxdata() interface saves the metadata
    +** pointed to by its 3rd parameter as the metadata for the N-th
    +** argument of the application-defined function.  Subsequent
    +** calls to sqlite3_get_auxdata() might return this data, if it has
    +** not been destroyed.
    +** If it is not NULL, SQLite will invoke the destructor
    +** function given by the 4th parameter to sqlite3_set_auxdata() on
    +** the metadata when the corresponding function parameter changes
    +** or when the SQL statement completes, whichever comes first.
    +**
    +** SQLite is free to call the destructor and drop metadata on any
    +** parameter of any function at any time.  The only guarantee is that
    +** the destructor will be called before the metadata is dropped.
    +**
    +** In practice, metadata is preserved between function calls for
    +** expressions that are constant at compile time. This includes literal
    +** values and SQL variables.
    +**
    +** These routines must be called from the same thread in which
    +** the SQL function is running.
    +**
    +** Requirements:
    +** [H16272] [H16274] [H16276] [H16277] [H16278] [H16279]
    +*/
    +SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
    +SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
    +
    +
    +/*
    +** CAPI3REF: Constants Defining Special Destructor Behavior {H10280} <S30100>
    +**
    +** These are special values for the destructor that is passed in as the
    +** final argument to routines like [sqlite3_result_blob()].  If the destructor
    +** argument is SQLITE_STATIC, it means that the content pointer is constant
    +** and will never change.  It does not need to be destroyed.  The
    +** SQLITE_TRANSIENT value means that the content will likely change in
    +** the near future and that SQLite should make its own private copy of
    +** the content before returning.
    +**
    +** The typedef is necessary to work around problems in certain
    +** C++ compilers.  See ticket #2191.
    +*/
    +typedef void (*sqlite3_destructor_type)(void*);
    +#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
    +#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
    +
    +/*
    +** CAPI3REF: Setting The Result Of An SQL Function {H16400} <S20200>
    +**
    +** These routines are used by the xFunc or xFinal callbacks that
    +** implement SQL functions and aggregates.  See
    +** [sqlite3_create_function()] and [sqlite3_create_function16()]
    +** for additional information.
    +**
    +** These functions work very much like the [parameter binding] family of
    +** functions used to bind values to host parameters in prepared statements.
    +** Refer to the [SQL parameter] documentation for additional information.
    +**
    +** The sqlite3_result_blob() interface sets the result from
    +** an application-defined function to be the BLOB whose content is pointed
    +** to by the second parameter and which is N bytes long where N is the
    +** third parameter.
    +**
    +** The sqlite3_result_zeroblob() interfaces set the result of
    +** the application-defined function to be a BLOB containing all zero
    +** bytes and N bytes in size, where N is the value of the 2nd parameter.
    +**
    +** The sqlite3_result_double() interface sets the result from
    +** an application-defined function to be a floating point value specified
    +** by its 2nd argument.
    +**
    +** The sqlite3_result_error() and sqlite3_result_error16() functions
    +** cause the implemented SQL function to throw an exception.
    +** SQLite uses the string pointed to by the
    +** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
    +** as the text of an error message.  SQLite interprets the error
    +** message string from sqlite3_result_error() as UTF-8. SQLite
    +** interprets the string from sqlite3_result_error16() as UTF-16 in native
    +** byte order.  If the third parameter to sqlite3_result_error()
    +** or sqlite3_result_error16() is negative then SQLite takes as the error
    +** message all text up through the first zero character.
    +** If the third parameter to sqlite3_result_error() or
    +** sqlite3_result_error16() is non-negative then SQLite takes that many
    +** bytes (not characters) from the 2nd parameter as the error message.
    +** The sqlite3_result_error() and sqlite3_result_error16()
    +** routines make a private copy of the error message text before
    +** they return.  Hence, the calling function can deallocate or
    +** modify the text after they return without harm.
    +** The sqlite3_result_error_code() function changes the error code
    +** returned by SQLite as a result of an error in a function.  By default,
    +** the error code is SQLITE_ERROR.  A subsequent call to sqlite3_result_error()
    +** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
    +**
    +** The sqlite3_result_toobig() interface causes SQLite to throw an error
    +** indicating that a string or BLOB is to long to represent.
    +**
    +** The sqlite3_result_nomem() interface causes SQLite to throw an error
    +** indicating that a memory allocation failed.
    +**
    +** The sqlite3_result_int() interface sets the return value
    +** of the application-defined function to be the 32-bit signed integer
    +** value given in the 2nd argument.
    +** The sqlite3_result_int64() interface sets the return value
    +** of the application-defined function to be the 64-bit signed integer
    +** value given in the 2nd argument.
    +**
    +** The sqlite3_result_null() interface sets the return value
    +** of the application-defined function to be NULL.
    +**
    +** The sqlite3_result_text(), sqlite3_result_text16(),
    +** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
    +** set the return value of the application-defined function to be
    +** a text string which is represented as UTF-8, UTF-16 native byte order,
    +** UTF-16 little endian, or UTF-16 big endian, respectively.
    +** SQLite takes the text result from the application from
    +** the 2nd parameter of the sqlite3_result_text* interfaces.
    +** If the 3rd parameter to the sqlite3_result_text* interfaces
    +** is negative, then SQLite takes result text from the 2nd parameter
    +** through the first zero character.
    +** If the 3rd parameter to the sqlite3_result_text* interfaces
    +** is non-negative, then as many bytes (not characters) of the text
    +** pointed to by the 2nd parameter are taken as the application-defined
    +** function result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces
    +** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
    +** function as the destructor on the text or BLOB result when it has
    +** finished using that result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces or to
    +** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
    +** assumes that the text or BLOB result is in constant space and does not
    +** copy the content of the parameter nor call a destructor on the content
    +** when it has finished using that result.
    +** If the 4th parameter to the sqlite3_result_text* interfaces
    +** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
    +** then SQLite makes a copy of the result into space obtained from
    +** from [sqlite3_malloc()] before it returns.
    +**
    +** The sqlite3_result_value() interface sets the result of
    +** the application-defined function to be a copy the
    +** [unprotected sqlite3_value] object specified by the 2nd parameter.  The
    +** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
    +** so that the [sqlite3_value] specified in the parameter may change or
    +** be deallocated after sqlite3_result_value() returns without harm.
    +** A [protected sqlite3_value] object may always be used where an
    +** [unprotected sqlite3_value] object is required, so either
    +** kind of [sqlite3_value] object can be used with this interface.
    +**
    +** If these routines are called from within the different thread
    +** than the one containing the application-defined function that received
    +** the [sqlite3_context] pointer, the results are undefined.
    +**
    +** Requirements:
    +** [H16403] [H16406] [H16409] [H16412] [H16415] [H16418] [H16421] [H16424]
    +** [H16427] [H16430] [H16433] [H16436] [H16439] [H16442] [H16445] [H16448]
    +** [H16451] [H16454] [H16457] [H16460] [H16463]
    +*/
    +SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
    +SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
    +SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
    +SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
    +SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
    +SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
    +SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
    +SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
    +SQLITE_API void sqlite3_result_null(sqlite3_context*);
    +SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
    +SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
    +SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
    +SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
    +SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
    +
    +/*
    +** CAPI3REF: Define New Collating Sequences {H16600} <S20300>
    +**
    +** These functions are used to add new collation sequences to the
    +** [database connection] specified as the first argument.
    +**
    +** The name of the new collation sequence is specified as a UTF-8 string
    +** for sqlite3_create_collation() and sqlite3_create_collation_v2()
    +** and a UTF-16 string for sqlite3_create_collation16(). In all cases
    +** the name is passed as the second function argument.
    +**
    +** The third argument may be one of the constants [SQLITE_UTF8],
    +** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied
    +** routine expects to be passed pointers to strings encoded using UTF-8,
    +** UTF-16 little-endian, or UTF-16 big-endian, respectively. The
    +** third argument might also be [SQLITE_UTF16] to indicate that the routine
    +** expects pointers to be UTF-16 strings in the native byte order, or the
    +** argument can be [SQLITE_UTF16_ALIGNED] if the
    +** the routine expects pointers to 16-bit word aligned strings
    +** of UTF-16 in the native byte order.
    +**
    +** A pointer to the user supplied routine must be passed as the fifth
    +** argument.  If it is NULL, this is the same as deleting the collation
    +** sequence (so that SQLite cannot call it anymore).
    +** Each time the application supplied function is invoked, it is passed
    +** as its first parameter a copy of the void* passed as the fourth argument
    +** to sqlite3_create_collation() or sqlite3_create_collation16().
    +**
    +** The remaining arguments to the application-supplied routine are two strings,
    +** each represented by a (length, data) pair and encoded in the encoding
    +** that was passed as the third argument when the collation sequence was
    +** registered. {END}  The application defined collation routine should
    +** return negative, zero or positive if the first string is less than,
    +** equal to, or greater than the second string. i.e. (STRING1 - STRING2).
    +**
    +** The sqlite3_create_collation_v2() works like sqlite3_create_collation()
    +** except that it takes an extra argument which is a destructor for
    +** the collation.  The destructor is called when the collation is
    +** destroyed and is passed a copy of the fourth parameter void* pointer
    +** of the sqlite3_create_collation_v2().
    +** Collations are destroyed when they are overridden by later calls to the
    +** collation creation functions or when the [database connection] is closed
    +** using [sqlite3_close()].
    +**
    +** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
    +**
    +** Requirements:
    +** [H16603] [H16604] [H16606] [H16609] [H16612] [H16615] [H16618] [H16621]
    +** [H16624] [H16627] [H16630]
    +*/
    +SQLITE_API int sqlite3_create_collation(
    +  sqlite3*, 
    +  const char *zName, 
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +);
    +SQLITE_API int sqlite3_create_collation_v2(
    +  sqlite3*, 
    +  const char *zName, 
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*),
    +  void(*xDestroy)(void*)
    +);
    +SQLITE_API int sqlite3_create_collation16(
    +  sqlite3*, 
    +  const void *zName,
    +  int eTextRep, 
    +  void*,
    +  int(*xCompare)(void*,int,const void*,int,const void*)
    +);
    +
    +/*
    +** CAPI3REF: Collation Needed Callbacks {H16700} <S20300>
    +**
    +** To avoid having to register all collation sequences before a database
    +** can be used, a single callback function may be registered with the
    +** [database connection] to be called whenever an undefined collation
    +** sequence is required.
    +**
    +** If the function is registered using the sqlite3_collation_needed() API,
    +** then it is passed the names of undefined collation sequences as strings
    +** encoded in UTF-8. {H16703} If sqlite3_collation_needed16() is used,
    +** the names are passed as UTF-16 in machine native byte order.
    +** A call to either function replaces any existing callback.
    +**
    +** When the callback is invoked, the first argument passed is a copy
    +** of the second argument to sqlite3_collation_needed() or
    +** sqlite3_collation_needed16().  The second argument is the database
    +** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
    +** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
    +** sequence function required.  The fourth parameter is the name of the
    +** required collation sequence.
    +**
    +** The callback function should register the desired collation using
    +** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
    +** [sqlite3_create_collation_v2()].
    +**
    +** Requirements:
    +** [H16702] [H16704] [H16706]
    +*/
    +SQLITE_API int sqlite3_collation_needed(
    +  sqlite3*, 
    +  void*, 
    +  void(*)(void*,sqlite3*,int eTextRep,const char*)
    +);
    +SQLITE_API int sqlite3_collation_needed16(
    +  sqlite3*, 
    +  void*,
    +  void(*)(void*,sqlite3*,int eTextRep,const void*)
    +);
    +
    +/*
    +** Specify the key for an encrypted database.  This routine should be
    +** called right after sqlite3_open().
    +**
    +** The code to implement this API is not available in the public release
    +** of SQLite.
    +*/
    +SQLITE_API int sqlite3_key(
    +  sqlite3 *db,                   /* Database to be rekeyed */
    +  const void *pKey, int nKey     /* The key */
    +);
    +
    +/*
    +** Change the key on an open database.  If the current database is not
    +** encrypted, this routine will encrypt it.  If pNew==0 or nNew==0, the
    +** database is decrypted.
    +**
    +** The code to implement this API is not available in the public release
    +** of SQLite.
    +*/
    +SQLITE_API int sqlite3_rekey(
    +  sqlite3 *db,                   /* Database to be rekeyed */
    +  const void *pKey, int nKey     /* The new key */
    +);
    +
    +/*
    +** CAPI3REF: Suspend Execution For A Short Time {H10530} <S40410>
    +**
    +** The sqlite3_sleep() function causes the current thread to suspend execution
    +** for at least a number of milliseconds specified in its parameter.
    +**
    +** If the operating system does not support sleep requests with
    +** millisecond time resolution, then the time will be rounded up to
    +** the nearest second. The number of milliseconds of sleep actually
    +** requested from the operating system is returned.
    +**
    +** SQLite implements this interface by calling the xSleep()
    +** method of the default [sqlite3_vfs] object.
    +**
    +** Requirements: [H10533] [H10536]
    +*/
    +SQLITE_API int sqlite3_sleep(int);
    +
    +/*
    +** CAPI3REF: Name Of The Folder Holding Temporary Files {H10310} <S20000>
    +**
    +** If this global variable is made to point to a string which is
    +** the name of a folder (a.k.a. directory), then all temporary files
    +** created by SQLite will be placed in that directory.  If this variable
    +** is a NULL pointer, then SQLite performs a search for an appropriate
    +** temporary file directory.
    +**
    +** It is not safe to read or modify this variable in more than one
    +** thread at a time.  It is not safe to read or modify this variable
    +** if a [database connection] is being used at the same time in a separate
    +** thread.
    +** It is intended that this variable be set once
    +** as part of process initialization and before any SQLite interface
    +** routines have been called and that this variable remain unchanged
    +** thereafter.
    +**
    +** The [temp_store_directory pragma] may modify this variable and cause
    +** it to point to memory obtained from [sqlite3_malloc].  Furthermore,
    +** the [temp_store_directory pragma] always assumes that any string
    +** that this variable points to is held in memory obtained from 
    +** [sqlite3_malloc] and the pragma may attempt to free that memory
    +** using [sqlite3_free].
    +** Hence, if this variable is modified directly, either it should be
    +** made NULL or made to point to memory obtained from [sqlite3_malloc]
    +** or else the use of the [temp_store_directory pragma] should be avoided.
    +*/
    +SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
    +
    +/*
    +** CAPI3REF: Test For Auto-Commit Mode {H12930} <S60200>
    +** KEYWORDS: {autocommit mode}
    +**
    +** The sqlite3_get_autocommit() interface returns non-zero or
    +** zero if the given database connection is or is not in autocommit mode,
    +** respectively.  Autocommit mode is on by default.
    +** Autocommit mode is disabled by a [BEGIN] statement.
    +** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
    +**
    +** If certain kinds of errors occur on a statement within a multi-statement
    +** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
    +** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
    +** transaction might be rolled back automatically.  The only way to
    +** find out whether SQLite automatically rolled back the transaction after
    +** an error is to use this function.
    +**
    +** If another thread changes the autocommit status of the database
    +** connection while this routine is running, then the return value
    +** is undefined.
    +**
    +** Requirements: [H12931] [H12932] [H12933] [H12934]
    +*/
    +SQLITE_API int sqlite3_get_autocommit(sqlite3*);
    +
    +/*
    +** CAPI3REF: Find The Database Handle Of A Prepared Statement {H13120} <S60600>
    +**
    +** The sqlite3_db_handle interface returns the [database connection] handle
    +** to which a [prepared statement] belongs.  The [database connection]
    +** returned by sqlite3_db_handle is the same [database connection] that was the first argument
    +** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
    +** create the statement in the first place.
    +**
    +** Requirements: [H13123]
    +*/
    +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
    +
    +/*
    +** CAPI3REF: Find the next prepared statement {H13140} <S60600>
    +**
    +** This interface returns a pointer to the next [prepared statement] after
    +** pStmt associated with the [database connection] pDb.  If pStmt is NULL
    +** then this interface returns a pointer to the first prepared statement
    +** associated with the database connection pDb.  If no prepared statement
    +** satisfies the conditions of this routine, it returns NULL.
    +**
    +** The [database connection] pointer D in a call to
    +** [sqlite3_next_stmt(D,S)] must refer to an open database
    +** connection and in particular must not be a NULL pointer.
    +**
    +** Requirements: [H13143] [H13146] [H13149] [H13152]
    +*/
    +SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
    +
    +/*
    +** CAPI3REF: Commit And Rollback Notification Callbacks {H12950} <S60400>
    +**
    +** The sqlite3_commit_hook() interface registers a callback
    +** function to be invoked whenever a transaction is [COMMIT | committed].
    +** Any callback set by a previous call to sqlite3_commit_hook()
    +** for the same database connection is overridden.
    +** The sqlite3_rollback_hook() interface registers a callback
    +** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
    +** Any callback set by a previous call to sqlite3_commit_hook()
    +** for the same database connection is overridden.
    +** The pArg argument is passed through to the callback.
    +** If the callback on a commit hook function returns non-zero,
    +** then the commit is converted into a rollback.
    +**
    +** If another function was previously registered, its
    +** pArg value is returned.  Otherwise NULL is returned.
    +**
    +** The callback implementation must not do anything that will modify
    +** the database connection that invoked the callback.  Any actions
    +** to modify the database connection must be deferred until after the
    +** completion of the [sqlite3_step()] call that triggered the commit
    +** or rollback hook in the first place.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** Registering a NULL function disables the callback.
    +**
    +** When the commit hook callback routine returns zero, the [COMMIT]
    +** operation is allowed to continue normally.  If the commit hook
    +** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
    +** The rollback hook is invoked on a rollback that results from a commit
    +** hook returning non-zero, just as it would be with any other rollback.
    +**
    +** For the purposes of this API, a transaction is said to have been
    +** rolled back if an explicit "ROLLBACK" statement is executed, or
    +** an error or constraint causes an implicit rollback to occur.
    +** The rollback callback is not invoked if a transaction is
    +** automatically rolled back because the database connection is closed.
    +** The rollback callback is not invoked if a transaction is
    +** rolled back because a commit callback returned non-zero.
    +** <todo> Check on this </todo>
    +**
    +** See also the [sqlite3_update_hook()] interface.
    +**
    +** Requirements:
    +** [H12951] [H12952] [H12953] [H12954] [H12955]
    +** [H12961] [H12962] [H12963] [H12964]
    +*/
    +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
    +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
    +
    +/*
    +** CAPI3REF: Data Change Notification Callbacks {H12970} <S60400>
    +**
    +** The sqlite3_update_hook() interface registers a callback function
    +** with the [database connection] identified by the first argument
    +** to be invoked whenever a row is updated, inserted or deleted.
    +** Any callback set by a previous call to this function
    +** for the same database connection is overridden.
    +**
    +** The second argument is a pointer to the function to invoke when a
    +** row is updated, inserted or deleted.
    +** The first argument to the callback is a copy of the third argument
    +** to sqlite3_update_hook().
    +** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
    +** or [SQLITE_UPDATE], depending on the operation that caused the callback
    +** to be invoked.
    +** The third and fourth arguments to the callback contain pointers to the
    +** database and table name containing the affected row.
    +** The final callback parameter is the [rowid] of the row.
    +** In the case of an update, this is the [rowid] after the update takes place.
    +**
    +** The update hook is not invoked when internal system tables are
    +** modified (i.e. sqlite_master and sqlite_sequence).
    +**
    +** In the current implementation, the update hook
    +** is not invoked when duplication rows are deleted because of an
    +** [ON CONFLICT | ON CONFLICT REPLACE] clause.  Nor is the update hook
    +** invoked when rows are deleted using the [truncate optimization].
    +** The exceptions defined in this paragraph might change in a future
    +** release of SQLite.
    +**
    +** The update hook implementation must not do anything that will modify
    +** the database connection that invoked the update hook.  Any actions
    +** to modify the database connection must be deferred until after the
    +** completion of the [sqlite3_step()] call that triggered the update hook.
    +** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
    +** database connections for the meaning of "modify" in this paragraph.
    +**
    +** If another function was previously registered, its pArg value
    +** is returned.  Otherwise NULL is returned.
    +**
    +** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
    +** interfaces.
    +**
    +** Requirements:
    +** [H12971] [H12973] [H12975] [H12977] [H12979] [H12981] [H12983] [H12986]
    +*/
    +SQLITE_API void *sqlite3_update_hook(
    +  sqlite3*, 
    +  void(*)(void *,int ,char const *,char const *,sqlite3_int64),
    +  void*
    +);
    +
    +/*
    +** CAPI3REF: Enable Or Disable Shared Pager Cache {H10330} <S30900>
    +** KEYWORDS: {shared cache}
    +**
    +** This routine enables or disables the sharing of the database cache
    +** and schema data structures between [database connection | connections]
    +** to the same database. Sharing is enabled if the argument is true
    +** and disabled if the argument is false.
    +**
    +** Cache sharing is enabled and disabled for an entire process.
    +** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
    +** sharing was enabled or disabled for each thread separately.
    +**
    +** The cache sharing mode set by this interface effects all subsequent
    +** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
    +** Existing database connections continue use the sharing mode
    +** that was in effect at the time they were opened.
    +**
    +** Virtual tables cannot be used with a shared cache.  When shared
    +** cache is enabled, the [sqlite3_create_module()] API used to register
    +** virtual tables will always return an error.
    +**
    +** This routine returns [SQLITE_OK] if shared cache was enabled or disabled
    +** successfully.  An [error code] is returned otherwise.
    +**
    +** Shared cache is disabled by default. But this might change in
    +** future releases of SQLite.  Applications that care about shared
    +** cache setting should set it explicitly.
    +**
    +** See Also:  [SQLite Shared-Cache Mode]
    +**
    +** Requirements: [H10331] [H10336] [H10337] [H10339]
    +*/
    +SQLITE_API int sqlite3_enable_shared_cache(int);
    +
    +/*
    +** CAPI3REF: Attempt To Free Heap Memory {H17340} <S30220>
    +**
    +** The sqlite3_release_memory() interface attempts to free N bytes
    +** of heap memory by deallocating non-essential memory allocations
    +** held by the database library. {END}  Memory used to cache database
    +** pages to improve performance is an example of non-essential memory.
    +** sqlite3_release_memory() returns the number of bytes actually freed,
    +** which might be more or less than the amount requested.
    +**
    +** Requirements: [H17341] [H17342]
    +*/
    +SQLITE_API int sqlite3_release_memory(int);
    +
    +/*
    +** CAPI3REF: Impose A Limit On Heap Size {H17350} <S30220>
    +**
    +** The sqlite3_soft_heap_limit() interface places a "soft" limit
    +** on the amount of heap memory that may be allocated by SQLite.
    +** If an internal allocation is requested that would exceed the
    +** soft heap limit, [sqlite3_release_memory()] is invoked one or
    +** more times to free up some space before the allocation is performed.
    +**
    +** The limit is called "soft", because if [sqlite3_release_memory()]
    +** cannot free sufficient memory to prevent the limit from being exceeded,
    +** the memory is allocated anyway and the current operation proceeds.
    +**
    +** A negative or zero value for N means that there is no soft heap limit and
    +** [sqlite3_release_memory()] will only be called when memory is exhausted.
    +** The default value for the soft heap limit is zero.
    +**
    +** SQLite makes a best effort to honor the soft heap limit.
    +** But if the soft heap limit cannot be honored, execution will
    +** continue without error or notification.  This is why the limit is
    +** called a "soft" limit.  It is advisory only.
    +**
    +** Prior to SQLite version 3.5.0, this routine only constrained the memory
    +** allocated by a single thread - the same thread in which this routine
    +** runs.  Beginning with SQLite version 3.5.0, the soft heap limit is
    +** applied to all threads. The value specified for the soft heap limit
    +** is an upper bound on the total memory allocation for all threads. In
    +** version 3.5.0 there is no mechanism for limiting the heap usage for
    +** individual threads.
    +**
    +** Requirements:
    +** [H16351] [H16352] [H16353] [H16354] [H16355] [H16358]
    +*/
    +SQLITE_API void sqlite3_soft_heap_limit(int);
    +
    +/*
    +** CAPI3REF: Extract Metadata About A Column Of A Table {H12850} <S60300>
    +**
    +** This routine returns metadata about a specific column of a specific
    +** database table accessible using the [database connection] handle
    +** passed as the first function argument.
    +**
    +** The column is identified by the second, third and fourth parameters to
    +** this function. The second parameter is either the name of the database
    +** (i.e. "main", "temp" or an attached database) containing the specified
    +** table or NULL. If it is NULL, then all attached databases are searched
    +** for the table using the same algorithm used by the database engine to
    +** resolve unqualified table references.
    +**
    +** The third and fourth parameters to this function are the table and column
    +** name of the desired column, respectively. Neither of these parameters
    +** may be NULL.
    +**
    +** Metadata is returned by writing to the memory locations passed as the 5th
    +** and subsequent parameters to this function. Any of these arguments may be
    +** NULL, in which case the corresponding element of metadata is omitted.
    +**
    +** <blockquote>
    +** <table border="1">
    +** <tr><th> Parameter <th> Output<br>Type <th>  Description
    +**
    +** <tr><td> 5th <td> const char* <td> Data type
    +** <tr><td> 6th <td> const char* <td> Name of default collation sequence
    +** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint
    +** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY
    +** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]
    +** </table>
    +** </blockquote>
    +**
    +** The memory pointed to by the character pointers returned for the
    +** declaration type and collation sequence is valid only until the next
    +** call to any SQLite API function.
    +**
    +** If the specified table is actually a view, an [error code] is returned.
    +**
    +** If the specified column is "rowid", "oid" or "_rowid_" and an
    +** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
    +** parameters are set for the explicitly declared column. If there is no
    +** explicitly declared [INTEGER PRIMARY KEY] column, then the output
    +** parameters are set as follows:
    +**
    +** <pre>
    +**     data type: "INTEGER"
    +**     collation sequence: "BINARY"
    +**     not null: 0
    +**     primary key: 1
    +**     auto increment: 0
    +** </pre>
    +**
    +** This function may load one or more schemas from database files. If an
    +** error occurs during this process, or if the requested table or column
    +** cannot be found, an [error code] is returned and an error message left
    +** in the [database connection] (to be retrieved using sqlite3_errmsg()).
    +**
    +** This API is only available if the library was compiled with the
    +** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
    +*/
    +SQLITE_API int sqlite3_table_column_metadata(
    +  sqlite3 *db,                /* Connection handle */
    +  const char *zDbName,        /* Database name or NULL */
    +  const char *zTableName,     /* Table name */
    +  const char *zColumnName,    /* Column name */
    +  char const **pzDataType,    /* OUTPUT: Declared data type */
    +  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
    +  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
    +  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
    +  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
    +);
    +
    +/*
    +** CAPI3REF: Load An Extension {H12600} <S20500>
    +**
    +** This interface loads an SQLite extension library from the named file.
    +**
    +** {H12601} The sqlite3_load_extension() interface attempts to load an
    +**          SQLite extension library contained in the file zFile.
    +**
    +** {H12602} The entry point is zProc.
    +**
    +** {H12603} zProc may be 0, in which case the name of the entry point
    +**          defaults to "sqlite3_extension_init".
    +**
    +** {H12604} The sqlite3_load_extension() interface shall return
    +**          [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
    +**
    +** {H12605} If an error occurs and pzErrMsg is not 0, then the
    +**          [sqlite3_load_extension()] interface shall attempt to
    +**          fill *pzErrMsg with error message text stored in memory
    +**          obtained from [sqlite3_malloc()]. {END}  The calling function
    +**          should free this memory by calling [sqlite3_free()].
    +**
    +** {H12606} Extension loading must be enabled using
    +**          [sqlite3_enable_load_extension()] prior to calling this API,
    +**          otherwise an error will be returned.
    +*/
    +SQLITE_API int sqlite3_load_extension(
    +  sqlite3 *db,          /* Load the extension into this database connection */
    +  const char *zFile,    /* Name of the shared library containing extension */
    +  const char *zProc,    /* Entry point.  Derived from zFile if 0 */
    +  char **pzErrMsg       /* Put error message here if not 0 */
    +);
    +
    +/*
    +** CAPI3REF: Enable Or Disable Extension Loading {H12620} <S20500>
    +**
    +** So as not to open security holes in older applications that are
    +** unprepared to deal with extension loading, and as a means of disabling
    +** extension loading while evaluating user-entered SQL, the following API
    +** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
    +**
    +** Extension loading is off by default. See ticket #1863.
    +**
    +** {H12621} Call the sqlite3_enable_load_extension() routine with onoff==1
    +**          to turn extension loading on and call it with onoff==0 to turn
    +**          it back off again.
    +**
    +** {H12622} Extension loading is off by default.
    +*/
    +SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
    +
    +/*
    +** CAPI3REF: Automatically Load An Extensions {H12640} <S20500>
    +**
    +** This API can be invoked at program startup in order to register
    +** one or more statically linked extensions that will be available
    +** to all new [database connections]. {END}
    +**
    +** This routine stores a pointer to the extension in an array that is
    +** obtained from [sqlite3_malloc()].  If you run a memory leak checker
    +** on your program and it reports a leak because of this array, invoke
    +** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory.
    +**
    +** {H12641} This function registers an extension entry point that is
    +**          automatically invoked whenever a new [database connection]
    +**          is opened using [sqlite3_open()], [sqlite3_open16()],
    +**          or [sqlite3_open_v2()].
    +**
    +** {H12642} Duplicate extensions are detected so calling this routine
    +**          multiple times with the same extension is harmless.
    +**
    +** {H12643} This routine stores a pointer to the extension in an array
    +**          that is obtained from [sqlite3_malloc()].
    +**
    +** {H12644} Automatic extensions apply across all threads.
    +*/
    +SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
    +
    +/*
    +** CAPI3REF: Reset Automatic Extension Loading {H12660} <S20500>
    +**
    +** This function disables all previously registered automatic
    +** extensions. {END}  It undoes the effect of all prior
    +** [sqlite3_auto_extension()] calls.
    +**
    +** {H12661} This function disables all previously registered
    +**          automatic extensions.
    +**
    +** {H12662} This function disables automatic extensions in all threads.
    +*/
    +SQLITE_API void sqlite3_reset_auto_extension(void);
    +
    +/*
    +****** EXPERIMENTAL - subject to change without notice **************
    +**
    +** The interface to the virtual-table mechanism is currently considered
    +** to be experimental.  The interface might change in incompatible ways.
    +** If this is a problem for you, do not use the interface at this time.
    +**
    +** When the virtual-table mechanism stabilizes, we will declare the
    +** interface fixed, support it indefinitely, and remove this comment.
    +*/
    +
    +/*
    +** Structures used by the virtual table interface
    +*/
    +typedef struct sqlite3_vtab sqlite3_vtab;
    +typedef struct sqlite3_index_info sqlite3_index_info;
    +typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
    +typedef struct sqlite3_module sqlite3_module;
    +
    +/*
    +** CAPI3REF: Virtual Table Object {H18000} <S20400>
    +** KEYWORDS: sqlite3_module {virtual table module}
    +** EXPERIMENTAL
    +**
    +** This structure, sometimes called a a "virtual table module", 
    +** defines the implementation of a [virtual tables].  
    +** This structure consists mostly of methods for the module.
    +**
    +** A virtual table module is created by filling in a persistent
    +** instance of this structure and passing a pointer to that instance
    +** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].
    +** The registration remains valid until it is replaced by a different
    +** module or until the [database connection] closes.  The content
    +** of this structure must not change while it is registered with
    +** any database connection.
    +*/
    +struct sqlite3_module {
    +  int iVersion;
    +  int (*xCreate)(sqlite3*, void *pAux,
    +               int argc, const char *const*argv,
    +               sqlite3_vtab **ppVTab, char**);
    +  int (*xConnect)(sqlite3*, void *pAux,
    +               int argc, const char *const*argv,
    +               sqlite3_vtab **ppVTab, char**);
    +  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
    +  int (*xDisconnect)(sqlite3_vtab *pVTab);
    +  int (*xDestroy)(sqlite3_vtab *pVTab);
    +  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
    +  int (*xClose)(sqlite3_vtab_cursor*);
    +  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
    +                int argc, sqlite3_value **argv);
    +  int (*xNext)(sqlite3_vtab_cursor*);
    +  int (*xEof)(sqlite3_vtab_cursor*);
    +  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
    +  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
    +  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
    +  int (*xBegin)(sqlite3_vtab *pVTab);
    +  int (*xSync)(sqlite3_vtab *pVTab);
    +  int (*xCommit)(sqlite3_vtab *pVTab);
    +  int (*xRollback)(sqlite3_vtab *pVTab);
    +  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
    +                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
    +                       void **ppArg);
    +  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
    +};
    +
    +/*
    +** CAPI3REF: Virtual Table Indexing Information {H18100} <S20400>
    +** KEYWORDS: sqlite3_index_info
    +** EXPERIMENTAL
    +**
    +** The sqlite3_index_info structure and its substructures is used to
    +** pass information into and receive the reply from the [xBestIndex]
    +** method of a [virtual table module].  The fields under **Inputs** are the
    +** inputs to xBestIndex and are read-only.  xBestIndex inserts its
    +** results into the **Outputs** fields.
    +**
    +** The aConstraint[] array records WHERE clause constraints of the form:
    +**
    +** <pre>column OP expr</pre>
    +**
    +** where OP is =, &lt;, &lt;=, &gt;, or &gt;=.  The particular operator is
    +** stored in aConstraint[].op.  The index of the column is stored in
    +** aConstraint[].iColumn.  aConstraint[].usable is TRUE if the
    +** expr on the right-hand side can be evaluated (and thus the constraint
    +** is usable) and false if it cannot.
    +**
    +** The optimizer automatically inverts terms of the form "expr OP column"
    +** and makes other simplifications to the WHERE clause in an attempt to
    +** get as many WHERE clause terms into the form shown above as possible.
    +** The aConstraint[] array only reports WHERE clause terms in the correct
    +** form that refer to the particular virtual table being queried.
    +**
    +** Information about the ORDER BY clause is stored in aOrderBy[].
    +** Each term of aOrderBy records a column of the ORDER BY clause.
    +**
    +** The [xBestIndex] method must fill aConstraintUsage[] with information
    +** about what parameters to pass to xFilter.  If argvIndex>0 then
    +** the right-hand side of the corresponding aConstraint[] is evaluated
    +** and becomes the argvIndex-th entry in argv.  If aConstraintUsage[].omit
    +** is true, then the constraint is assumed to be fully handled by the
    +** virtual table and is not checked again by SQLite.
    +**
    +** The idxNum and idxPtr values are recorded and passed into the
    +** [xFilter] method.
    +** [sqlite3_free()] is used to free idxPtr if and only iff
    +** needToFreeIdxPtr is true.
    +**
    +** The orderByConsumed means that output from [xFilter]/[xNext] will occur in
    +** the correct order to satisfy the ORDER BY clause so that no separate
    +** sorting step is required.
    +**
    +** The estimatedCost value is an estimate of the cost of doing the
    +** particular lookup.  A full scan of a table with N entries should have
    +** a cost of N.  A binary search of a table of N entries should have a
    +** cost of approximately log(N).
    +*/
    +struct sqlite3_index_info {
    +  /* Inputs */
    +  int nConstraint;           /* Number of entries in aConstraint */
    +  struct sqlite3_index_constraint {
    +     int iColumn;              /* Column on left-hand side of constraint */
    +     unsigned char op;         /* Constraint operator */
    +     unsigned char usable;     /* True if this constraint is usable */
    +     int iTermOffset;          /* Used internally - xBestIndex should ignore */
    +  } *aConstraint;            /* Table of WHERE clause constraints */
    +  int nOrderBy;              /* Number of terms in the ORDER BY clause */
    +  struct sqlite3_index_orderby {
    +     int iColumn;              /* Column number */
    +     unsigned char desc;       /* True for DESC.  False for ASC. */
    +  } *aOrderBy;               /* The ORDER BY clause */
    +  /* Outputs */
    +  struct sqlite3_index_constraint_usage {
    +    int argvIndex;           /* if >0, constraint is part of argv to xFilter */
    +    unsigned char omit;      /* Do not code a test for this constraint */
    +  } *aConstraintUsage;
    +  int idxNum;                /* Number used to identify the index */
    +  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
    +  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
    +  int orderByConsumed;       /* True if output is already ordered */
    +  double estimatedCost;      /* Estimated cost of using this index */
    +};
    +#define SQLITE_INDEX_CONSTRAINT_EQ    2
    +#define SQLITE_INDEX_CONSTRAINT_GT    4
    +#define SQLITE_INDEX_CONSTRAINT_LE    8
    +#define SQLITE_INDEX_CONSTRAINT_LT    16
    +#define SQLITE_INDEX_CONSTRAINT_GE    32
    +#define SQLITE_INDEX_CONSTRAINT_MATCH 64
    +
    +/*
    +** CAPI3REF: Register A Virtual Table Implementation {H18200} <S20400>
    +** EXPERIMENTAL
    +**
    +** This routine is used to register a new [virtual table module] name.
    +** Module names must be registered before
    +** creating a new [virtual table] using the module, or before using a
    +** preexisting [virtual table] for the module.
    +**
    +** The module name is registered on the [database connection] specified
    +** by the first parameter.  The name of the module is given by the 
    +** second parameter.  The third parameter is a pointer to
    +** the implementation of the [virtual table module].   The fourth
    +** parameter is an arbitrary client data pointer that is passed through
    +** into the [xCreate] and [xConnect] methods of the virtual table module
    +** when a new virtual table is be being created or reinitialized.
    +**
    +** This interface has exactly the same effect as calling
    +** [sqlite3_create_module_v2()] with a NULL client data destructor.
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module(
    +  sqlite3 *db,               /* SQLite connection to register module with */
    +  const char *zName,         /* Name of the module */
    +  const sqlite3_module *p,   /* Methods for the module */
    +  void *pClientData          /* Client data for xCreate/xConnect */
    +);
    +
    +/*
    +** CAPI3REF: Register A Virtual Table Implementation {H18210} <S20400>
    +** EXPERIMENTAL
    +**
    +** This routine is identical to the [sqlite3_create_module()] method,
    +** except that it has an extra parameter to specify 
    +** a destructor function for the client data pointer.  SQLite will
    +** invoke the destructor function (if it is not NULL) when SQLite
    +** no longer needs the pClientData pointer.  
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(
    +  sqlite3 *db,               /* SQLite connection to register module with */
    +  const char *zName,         /* Name of the module */
    +  const sqlite3_module *p,   /* Methods for the module */
    +  void *pClientData,         /* Client data for xCreate/xConnect */
    +  void(*xDestroy)(void*)     /* Module destructor function */
    +);
    +
    +/*
    +** CAPI3REF: Virtual Table Instance Object {H18010} <S20400>
    +** KEYWORDS: sqlite3_vtab
    +** EXPERIMENTAL
    +**
    +** Every [virtual table module] implementation uses a subclass
    +** of the following structure to describe a particular instance
    +** of the [virtual table].  Each subclass will
    +** be tailored to the specific needs of the module implementation.
    +** The purpose of this superclass is to define certain fields that are
    +** common to all module implementations.
    +**
    +** Virtual tables methods can set an error message by assigning a
    +** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should
    +** take care that any prior string is freed by a call to [sqlite3_free()]
    +** prior to assigning a new string to zErrMsg.  After the error message
    +** is delivered up to the client application, the string will be automatically
    +** freed by sqlite3_free() and the zErrMsg field will be zeroed.
    +*/
    +struct sqlite3_vtab {
    +  const sqlite3_module *pModule;  /* The module for this virtual table */
    +  int nRef;                       /* NO LONGER USED */
    +  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
    +  /* Virtual table implementations will typically add additional fields */
    +};
    +
    +/*
    +** CAPI3REF: Virtual Table Cursor Object  {H18020} <S20400>
    +** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
    +** EXPERIMENTAL
    +**
    +** Every [virtual table module] implementation uses a subclass of the
    +** following structure to describe cursors that point into the
    +** [virtual table] and are used
    +** to loop through the virtual table.  Cursors are created using the
    +** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed
    +** by the [sqlite3_module.xClose | xClose] method.  Cussors are used
    +** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods
    +** of the module.  Each module implementation will define
    +** the content of a cursor structure to suit its own needs.
    +**
    +** This superclass exists in order to define fields of the cursor that
    +** are common to all implementations.
    +*/
    +struct sqlite3_vtab_cursor {
    +  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
    +  /* Virtual table implementations will typically add additional fields */
    +};
    +
    +/*
    +** CAPI3REF: Declare The Schema Of A Virtual Table {H18280} <S20400>
    +** EXPERIMENTAL
    +**
    +** The [xCreate] and [xConnect] methods of a
    +** [virtual table module] call this interface
    +** to declare the format (the names and datatypes of the columns) of
    +** the virtual tables they implement.
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
    +
    +/*
    +** CAPI3REF: Overload A Function For A Virtual Table {H18300} <S20400>
    +** EXPERIMENTAL
    +**
    +** Virtual tables can provide alternative implementations of functions
    +** using the [xFindFunction] method of the [virtual table module].  
    +** But global versions of those functions
    +** must exist in order to be overloaded.
    +**
    +** This API makes sure a global version of a function with a particular
    +** name and number of parameters exists.  If no such function exists
    +** before this API is called, a new function is created.  The implementation
    +** of the new function always causes an exception to be thrown.  So
    +** the new function is not good for anything by itself.  Its only
    +** purpose is to be a placeholder function that can be overloaded
    +** by a [virtual table].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
    +
    +/*
    +** The interface to the virtual-table mechanism defined above (back up
    +** to a comment remarkably similar to this one) is currently considered
    +** to be experimental.  The interface might change in incompatible ways.
    +** If this is a problem for you, do not use the interface at this time.
    +**
    +** When the virtual-table mechanism stabilizes, we will declare the
    +** interface fixed, support it indefinitely, and remove this comment.
    +**
    +****** EXPERIMENTAL - subject to change without notice **************
    +*/
    +
    +/*
    +** CAPI3REF: A Handle To An Open BLOB {H17800} <S30230>
    +** KEYWORDS: {BLOB handle} {BLOB handles}
    +**
    +** An instance of this object represents an open BLOB on which
    +** [sqlite3_blob_open | incremental BLOB I/O] can be performed.
    +** Objects of this type are created by [sqlite3_blob_open()]
    +** and destroyed by [sqlite3_blob_close()].
    +** The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces
    +** can be used to read or write small subsections of the BLOB.
    +** The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
    +*/
    +typedef struct sqlite3_blob sqlite3_blob;
    +
    +/*
    +** CAPI3REF: Open A BLOB For Incremental I/O {H17810} <S30230>
    +**
    +** This interfaces opens a [BLOB handle | handle] to the BLOB located
    +** in row iRow, column zColumn, table zTable in database zDb;
    +** in other words, the same BLOB that would be selected by:
    +**
    +** <pre>
    +**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
    +** </pre> {END}
    +**
    +** If the flags parameter is non-zero, then the BLOB is opened for read
    +** and write access. If it is zero, the BLOB is opened for read access.
    +** It is not possible to open a column that is part of an index or primary 
    +** key for writing. ^If [foreign key constraints] are enabled, it is 
    +** not possible to open a column that is part of a [child key] for writing.
    +**
    +** Note that the database name is not the filename that contains
    +** the database but rather the symbolic name of the database that
    +** is assigned when the database is connected using [ATTACH].
    +** For the main database file, the database name is "main".
    +** For TEMP tables, the database name is "temp".
    +**
    +** On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
    +** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
    +** to be a null pointer.
    +** This function sets the [database connection] error code and message
    +** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
    +** functions.  Note that the *ppBlob variable is always initialized in a
    +** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
    +** regardless of the success or failure of this routine.
    +**
    +** If the row that a BLOB handle points to is modified by an
    +** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
    +** then the BLOB handle is marked as "expired".
    +** This is true if any column of the row is changed, even a column
    +** other than the one the BLOB handle is open on.
    +** Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
    +** a expired BLOB handle fail with an return code of [SQLITE_ABORT].
    +** Changes written into a BLOB prior to the BLOB expiring are not
    +** rollback by the expiration of the BLOB.  Such changes will eventually
    +** commit if the transaction continues to completion.
    +**
    +** Use the [sqlite3_blob_bytes()] interface to determine the size of
    +** the opened blob.  The size of a blob may not be changed by this
    +** interface.  Use the [UPDATE] SQL command to change the size of a
    +** blob.
    +**
    +** The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
    +** and the built-in [zeroblob] SQL function can be used, if desired,
    +** to create an empty, zero-filled blob in which to read or write using
    +** this interface.
    +**
    +** To avoid a resource leak, every open [BLOB handle] should eventually
    +** be released by a call to [sqlite3_blob_close()].
    +**
    +** Requirements:
    +** [H17813] [H17814] [H17816] [H17819] [H17821] [H17824]
    +*/
    +SQLITE_API int sqlite3_blob_open(
    +  sqlite3*,
    +  const char *zDb,
    +  const char *zTable,
    +  const char *zColumn,
    +  sqlite3_int64 iRow,
    +  int flags,
    +  sqlite3_blob **ppBlob
    +);
    +
    +/*
    +** CAPI3REF: Close A BLOB Handle {H17830} <S30230>
    +**
    +** Closes an open [BLOB handle].
    +**
    +** Closing a BLOB shall cause the current transaction to commit
    +** if there are no other BLOBs, no pending prepared statements, and the
    +** database connection is in [autocommit mode].
    +** If any writes were made to the BLOB, they might be held in cache
    +** until the close operation if they will fit.
    +**
    +** Closing the BLOB often forces the changes
    +** out to disk and so if any I/O errors occur, they will likely occur
    +** at the time when the BLOB is closed.  Any errors that occur during
    +** closing are reported as a non-zero return value.
    +**
    +** The BLOB is closed unconditionally.  Even if this routine returns
    +** an error code, the BLOB is still closed.
    +**
    +** Calling this routine with a null pointer (which as would be returned
    +** by failed call to [sqlite3_blob_open()]) is a harmless no-op.
    +**
    +** Requirements:
    +** [H17833] [H17836] [H17839]
    +*/
    +SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
    +
    +/*
    +** CAPI3REF: Return The Size Of An Open BLOB {H17840} <S30230>
    +**
    +** Returns the size in bytes of the BLOB accessible via the 
    +** successfully opened [BLOB handle] in its only argument.  The
    +** incremental blob I/O routines can only read or overwriting existing
    +** blob content; they cannot change the size of a blob.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** Requirements:
    +** [H17843]
    +*/
    +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
    +
    +/*
    +** CAPI3REF: Read Data From A BLOB Incrementally {H17850} <S30230>
    +**
    +** This function is used to read data from an open [BLOB handle] into a
    +** caller-supplied buffer. N bytes of data are copied into buffer Z
    +** from the open BLOB, starting at offset iOffset.
    +**
    +** If offset iOffset is less than N bytes from the end of the BLOB,
    +** [SQLITE_ERROR] is returned and no data is read.  If N or iOffset is
    +** less than zero, [SQLITE_ERROR] is returned and no data is read.
    +** The size of the blob (and hence the maximum value of N+iOffset)
    +** can be determined using the [sqlite3_blob_bytes()] interface.
    +**
    +** An attempt to read from an expired [BLOB handle] fails with an
    +** error code of [SQLITE_ABORT].
    +**
    +** On success, SQLITE_OK is returned.
    +** Otherwise, an [error code] or an [extended error code] is returned.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** See also: [sqlite3_blob_write()].
    +**
    +** Requirements:
    +** [H17853] [H17856] [H17859] [H17862] [H17863] [H17865] [H17868]
    +*/
    +SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
    +
    +/*
    +** CAPI3REF: Write Data Into A BLOB Incrementally {H17870} <S30230>
    +**
    +** This function is used to write data into an open [BLOB handle] from a
    +** caller-supplied buffer. N bytes of data are copied from the buffer Z
    +** into the open BLOB, starting at offset iOffset.
    +**
    +** If the [BLOB handle] passed as the first argument was not opened for
    +** writing (the flags parameter to [sqlite3_blob_open()] was zero),
    +** this function returns [SQLITE_READONLY].
    +**
    +** This function may only modify the contents of the BLOB; it is
    +** not possible to increase the size of a BLOB using this API.
    +** If offset iOffset is less than N bytes from the end of the BLOB,
    +** [SQLITE_ERROR] is returned and no data is written.  If N is
    +** less than zero [SQLITE_ERROR] is returned and no data is written.
    +** The size of the BLOB (and hence the maximum value of N+iOffset)
    +** can be determined using the [sqlite3_blob_bytes()] interface.
    +**
    +** An attempt to write to an expired [BLOB handle] fails with an
    +** error code of [SQLITE_ABORT].  Writes to the BLOB that occurred
    +** before the [BLOB handle] expired are not rolled back by the
    +** expiration of the handle, though of course those changes might
    +** have been overwritten by the statement that expired the BLOB handle
    +** or by other independent statements.
    +**
    +** On success, SQLITE_OK is returned.
    +** Otherwise, an  [error code] or an [extended error code] is returned.
    +**
    +** This routine only works on a [BLOB handle] which has been created
    +** by a prior successful call to [sqlite3_blob_open()] and which has not
    +** been closed by [sqlite3_blob_close()].  Passing any other pointer in
    +** to this routine results in undefined and probably undesirable behavior.
    +**
    +** See also: [sqlite3_blob_read()].
    +**
    +** Requirements:
    +** [H17873] [H17874] [H17875] [H17876] [H17877] [H17879] [H17882] [H17885]
    +** [H17888]
    +*/
    +SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
    +
    +/*
    +** CAPI3REF: Virtual File System Objects {H11200} <S20100>
    +**
    +** A virtual filesystem (VFS) is an [sqlite3_vfs] object
    +** that SQLite uses to interact
    +** with the underlying operating system.  Most SQLite builds come with a
    +** single default VFS that is appropriate for the host computer.
    +** New VFSes can be registered and existing VFSes can be unregistered.
    +** The following interfaces are provided.
    +**
    +** The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
    +** Names are case sensitive.
    +** Names are zero-terminated UTF-8 strings.
    +** If there is no match, a NULL pointer is returned.
    +** If zVfsName is NULL then the default VFS is returned.
    +**
    +** New VFSes are registered with sqlite3_vfs_register().
    +** Each new VFS becomes the default VFS if the makeDflt flag is set.
    +** The same VFS can be registered multiple times without injury.
    +** To make an existing VFS into the default VFS, register it again
    +** with the makeDflt flag set.  If two different VFSes with the
    +** same name are registered, the behavior is undefined.  If a
    +** VFS is registered with a name that is NULL or an empty string,
    +** then the behavior is undefined.
    +**
    +** Unregister a VFS with the sqlite3_vfs_unregister() interface.
    +** If the default VFS is unregistered, another VFS is chosen as
    +** the default.  The choice for the new VFS is arbitrary.
    +**
    +** Requirements:
    +** [H11203] [H11206] [H11209] [H11212] [H11215] [H11218]
    +*/
    +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
    +SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
    +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
    +
    +/*
    +** CAPI3REF: Mutexes {H17000} <S20000>
    +**
    +** The SQLite core uses these routines for thread
    +** synchronization. Though they are intended for internal
    +** use by SQLite, code that links against SQLite is
    +** permitted to use any of these routines.
    +**
    +** The SQLite source code contains multiple implementations
    +** of these mutex routines.  An appropriate implementation
    +** is selected automatically at compile-time.  The following
    +** implementations are available in the SQLite core:
    +**
    +** <ul>
    +** <li>   SQLITE_MUTEX_OS2
    +** <li>   SQLITE_MUTEX_PTHREAD
    +** <li>   SQLITE_MUTEX_W32
    +** <li>   SQLITE_MUTEX_NOOP
    +** </ul>
    +**
    +** The SQLITE_MUTEX_NOOP implementation is a set of routines
    +** that does no real locking and is appropriate for use in
    +** a single-threaded application.  The SQLITE_MUTEX_OS2,
    +** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
    +** are appropriate for use on OS/2, Unix, and Windows.
    +**
    +** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
    +** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
    +** implementation is included with the library. In this case the
    +** application must supply a custom mutex implementation using the
    +** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
    +** before calling sqlite3_initialize() or any other public sqlite3_
    +** function that calls sqlite3_initialize().
    +**
    +** {H17011} The sqlite3_mutex_alloc() routine allocates a new
    +** mutex and returns a pointer to it. {H17012} If it returns NULL
    +** that means that a mutex could not be allocated. {H17013} SQLite
    +** will unwind its stack and return an error. {H17014} The argument
    +** to sqlite3_mutex_alloc() is one of these integer constants:
    +**
    +** <ul>
    +** <li>  SQLITE_MUTEX_FAST
    +** <li>  SQLITE_MUTEX_RECURSIVE
    +** <li>  SQLITE_MUTEX_STATIC_MASTER
    +** <li>  SQLITE_MUTEX_STATIC_MEM
    +** <li>  SQLITE_MUTEX_STATIC_MEM2
    +** <li>  SQLITE_MUTEX_STATIC_PRNG
    +** <li>  SQLITE_MUTEX_STATIC_LRU
    +** <li>  SQLITE_MUTEX_STATIC_LRU2
    +** </ul>
    +**
    +** {H17015} The first two constants cause sqlite3_mutex_alloc() to create
    +** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
    +** is used but not necessarily so when SQLITE_MUTEX_FAST is used. {END}
    +** The mutex implementation does not need to make a distinction
    +** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
    +** not want to.  {H17016} But SQLite will only request a recursive mutex in
    +** cases where it really needs one.  {END} If a faster non-recursive mutex
    +** implementation is available on the host platform, the mutex subsystem
    +** might return such a mutex in response to SQLITE_MUTEX_FAST.
    +**
    +** {H17017} The other allowed parameters to sqlite3_mutex_alloc() each return
    +** a pointer to a static preexisting mutex. {END}  Six static mutexes are
    +** used by the current version of SQLite.  Future versions of SQLite
    +** may add additional static mutexes.  Static mutexes are for internal
    +** use by SQLite only.  Applications that use SQLite mutexes should
    +** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
    +** SQLITE_MUTEX_RECURSIVE.
    +**
    +** {H17018} Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
    +** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
    +** returns a different mutex on every call.  {H17034} But for the static
    +** mutex types, the same mutex is returned on every call that has
    +** the same type number.
    +**
    +** {H17019} The sqlite3_mutex_free() routine deallocates a previously
    +** allocated dynamic mutex. {H17020} SQLite is careful to deallocate every
    +** dynamic mutex that it allocates. {A17021} The dynamic mutexes must not be in
    +** use when they are deallocated. {A17022} Attempting to deallocate a static
    +** mutex results in undefined behavior. {H17023} SQLite never deallocates
    +** a static mutex. {END}
    +**
    +** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
    +** to enter a mutex. {H17024} If another thread is already within the mutex,
    +** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
    +** SQLITE_BUSY. {H17025}  The sqlite3_mutex_try() interface returns [SQLITE_OK]
    +** upon successful entry.  {H17026} Mutexes created using
    +** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
    +** {H17027} In such cases the,
    +** mutex must be exited an equal number of times before another thread
    +** can enter.  {A17028} If the same thread tries to enter any other
    +** kind of mutex more than once, the behavior is undefined.
    +** {H17029} SQLite will never exhibit
    +** such behavior in its own use of mutexes.
    +**
    +** Some systems (for example, Windows 95) do not support the operation
    +** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()
    +** will always return SQLITE_BUSY.  {H17030} The SQLite core only ever uses
    +** sqlite3_mutex_try() as an optimization so this is acceptable behavior.
    +**
    +** {H17031} The sqlite3_mutex_leave() routine exits a mutex that was
    +** previously entered by the same thread.  {A17032} The behavior
    +** is undefined if the mutex is not currently entered by the
    +** calling thread or is not currently allocated.  {H17033} SQLite will
    +** never do either. {END}
    +**
    +** If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
    +** sqlite3_mutex_leave() is a NULL pointer, then all three routines
    +** behave as no-ops.
    +**
    +** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
    +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
    +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
    +
    +/*
    +** CAPI3REF: Mutex Methods Object {H17120} <S20130>
    +** EXPERIMENTAL
    +**
    +** An instance of this structure defines the low-level routines
    +** used to allocate and use mutexes.
    +**
    +** Usually, the default mutex implementations provided by SQLite are
    +** sufficient, however the user has the option of substituting a custom
    +** implementation for specialized deployments or systems for which SQLite
    +** does not provide a suitable implementation. In this case, the user
    +** creates and populates an instance of this structure to pass
    +** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
    +** Additionally, an instance of this structure can be used as an
    +** output variable when querying the system for the current mutex
    +** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
    +**
    +** The xMutexInit method defined by this structure is invoked as
    +** part of system initialization by the sqlite3_initialize() function.
    +** {H17001} The xMutexInit routine shall be called by SQLite once for each
    +** effective call to [sqlite3_initialize()].
    +**
    +** The xMutexEnd method defined by this structure is invoked as
    +** part of system shutdown by the sqlite3_shutdown() function. The
    +** implementation of this method is expected to release all outstanding
    +** resources obtained by the mutex methods implementation, especially
    +** those obtained by the xMutexInit method. {H17003} The xMutexEnd()
    +** interface shall be invoked once for each call to [sqlite3_shutdown()].
    +**
    +** The remaining seven methods defined by this structure (xMutexAlloc,
    +** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
    +** xMutexNotheld) implement the following interfaces (respectively):
    +**
    +** <ul>
    +**   <li>  [sqlite3_mutex_alloc()] </li>
    +**   <li>  [sqlite3_mutex_free()] </li>
    +**   <li>  [sqlite3_mutex_enter()] </li>
    +**   <li>  [sqlite3_mutex_try()] </li>
    +**   <li>  [sqlite3_mutex_leave()] </li>
    +**   <li>  [sqlite3_mutex_held()] </li>
    +**   <li>  [sqlite3_mutex_notheld()] </li>
    +** </ul>
    +**
    +** The only difference is that the public sqlite3_XXX functions enumerated
    +** above silently ignore any invocations that pass a NULL pointer instead
    +** of a valid mutex handle. The implementations of the methods defined
    +** by this structure are not required to handle this case, the results
    +** of passing a NULL pointer instead of a valid mutex handle are undefined
    +** (i.e. it is acceptable to provide an implementation that segfaults if
    +** it is passed a NULL pointer).
    +**
    +** The xMutexInit() method must be threadsafe.  It must be harmless to
    +** invoke xMutexInit() mutiple times within the same process and without
    +** intervening calls to xMutexEnd().  Second and subsequent calls to
    +** xMutexInit() must be no-ops.
    +**
    +** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
    +** and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
    +** allocation for a static mutex.  However xMutexAlloc() may use SQLite
    +** memory allocation for a fast or recursive mutex.
    +**
    +** SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
    +** called, but only if the prior call to xMutexInit returned SQLITE_OK.
    +** If xMutexInit fails in any way, it is expected to clean up after itself
    +** prior to returning.
    +*/
    +typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
    +struct sqlite3_mutex_methods {
    +  int (*xMutexInit)(void);
    +  int (*xMutexEnd)(void);
    +  sqlite3_mutex *(*xMutexAlloc)(int);
    +  void (*xMutexFree)(sqlite3_mutex *);
    +  void (*xMutexEnter)(sqlite3_mutex *);
    +  int (*xMutexTry)(sqlite3_mutex *);
    +  void (*xMutexLeave)(sqlite3_mutex *);
    +  int (*xMutexHeld)(sqlite3_mutex *);
    +  int (*xMutexNotheld)(sqlite3_mutex *);
    +};
    +
    +/*
    +** CAPI3REF: Mutex Verification Routines {H17080} <S20130> <S30800>
    +**
    +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
    +** are intended for use inside assert() statements. {H17081} The SQLite core
    +** never uses these routines except inside an assert() and applications
    +** are advised to follow the lead of the core.  {H17082} The core only
    +** provides implementations for these routines when it is compiled
    +** with the SQLITE_DEBUG flag.  {A17087} External mutex implementations
    +** are only required to provide these routines if SQLITE_DEBUG is
    +** defined and if NDEBUG is not defined.
    +**
    +** {H17083} These routines should return true if the mutex in their argument
    +** is held or not held, respectively, by the calling thread.
    +**
    +** {X17084} The implementation is not required to provided versions of these
    +** routines that actually work. If the implementation does not provide working
    +** versions of these routines, it should at least provide stubs that always
    +** return true so that one does not get spurious assertion failures.
    +**
    +** {H17085} If the argument to sqlite3_mutex_held() is a NULL pointer then
    +** the routine should return 1.  {END} This seems counter-intuitive since
    +** clearly the mutex cannot be held if it does not exist.  But the
    +** the reason the mutex does not exist is because the build is not
    +** using mutexes.  And we do not want the assert() containing the
    +** call to sqlite3_mutex_held() to fail, so a non-zero return is
    +** the appropriate thing to do.  {H17086} The sqlite3_mutex_notheld()
    +** interface should also return 1 when given a NULL pointer.
    +*/
    +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
    +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
    +
    +/*
    +** CAPI3REF: Mutex Types {H17001} <H17000>
    +**
    +** The [sqlite3_mutex_alloc()] interface takes a single argument
    +** which is one of these integer constants.
    +**
    +** The set of static mutexes may change from one SQLite release to the
    +** next.  Applications that override the built-in mutex logic must be
    +** prepared to accommodate additional static mutexes.
    +*/
    +#define SQLITE_MUTEX_FAST             0
    +#define SQLITE_MUTEX_RECURSIVE        1
    +#define SQLITE_MUTEX_STATIC_MASTER    2
    +#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
    +#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */
    +#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */
    +#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
    +#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
    +#define SQLITE_MUTEX_STATIC_LRU2      7  /* lru page list */
    +
    +/*
    +** CAPI3REF: Retrieve the mutex for a database connection {H17002} <H17000>
    +**
    +** This interface returns a pointer the [sqlite3_mutex] object that 
    +** serializes access to the [database connection] given in the argument
    +** when the [threading mode] is Serialized.
    +** If the [threading mode] is Single-thread or Multi-thread then this
    +** routine returns a NULL pointer.
    +*/
    +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
    +
    +/*
    +** CAPI3REF: Low-Level Control Of Database Files {H11300} <S30800>
    +**
    +** {H11301} The [sqlite3_file_control()] interface makes a direct call to the
    +** xFileControl method for the [sqlite3_io_methods] object associated
    +** with a particular database identified by the second argument. {H11302} The
    +** name of the database is the name assigned to the database by the
    +** <a href="lang_attach.html">ATTACH</a> SQL command that opened the
    +** database. {H11303} To control the main database file, use the name "main"
    +** or a NULL pointer. {H11304} The third and fourth parameters to this routine
    +** are passed directly through to the second and third parameters of
    +** the xFileControl method.  {H11305} The return value of the xFileControl
    +** method becomes the return value of this routine.
    +**
    +** {H11306} If the second parameter (zDbName) does not match the name of any
    +** open database file, then SQLITE_ERROR is returned. {H11307} This error
    +** code is not remembered and will not be recalled by [sqlite3_errcode()]
    +** or [sqlite3_errmsg()]. {A11308} The underlying xFileControl method might
    +** also return SQLITE_ERROR.  {A11309} There is no way to distinguish between
    +** an incorrect zDbName and an SQLITE_ERROR return from the underlying
    +** xFileControl method. {END}
    +**
    +** See also: [SQLITE_FCNTL_LOCKSTATE]
    +*/
    +SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
    +
    +/*
    +** CAPI3REF: Testing Interface {H11400} <S30800>
    +**
    +** The sqlite3_test_control() interface is used to read out internal
    +** state of SQLite and to inject faults into SQLite for testing
    +** purposes.  The first parameter is an operation code that determines
    +** the number, meaning, and operation of all subsequent parameters.
    +**
    +** This interface is not for use by applications.  It exists solely
    +** for verifying the correct operation of the SQLite library.  Depending
    +** on how the SQLite library is compiled, this interface might not exist.
    +**
    +** The details of the operation codes, their meanings, the parameters
    +** they take, and what they do are all subject to change without notice.
    +** Unlike most of the SQLite API, this function is not guaranteed to
    +** operate consistently from one release to the next.
    +*/
    +SQLITE_API int sqlite3_test_control(int op, ...);
    +
    +/*
    +** CAPI3REF: Testing Interface Operation Codes {H11410} <H11400>
    +**
    +** These constants are the valid operation code parameters used
    +** as the first argument to [sqlite3_test_control()].
    +**
    +** These parameters and their meanings are subject to change
    +** without notice.  These values are for testing purposes only.
    +** Applications should not use any of these parameters or the
    +** [sqlite3_test_control()] interface.
    +*/
    +#define SQLITE_TESTCTRL_PRNG_SAVE                5
    +#define SQLITE_TESTCTRL_PRNG_RESTORE             6
    +#define SQLITE_TESTCTRL_PRNG_RESET               7
    +#define SQLITE_TESTCTRL_BITVEC_TEST              8
    +#define SQLITE_TESTCTRL_FAULT_INSTALL            9
    +#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10
    +#define SQLITE_TESTCTRL_PENDING_BYTE            11
    +#define SQLITE_TESTCTRL_ASSERT                  12
    +#define SQLITE_TESTCTRL_ALWAYS                  13
    +#define SQLITE_TESTCTRL_RESERVE                 14
    +
    +/*
    +** CAPI3REF: SQLite Runtime Status {H17200} <S60200>
    +** EXPERIMENTAL
    +**
    +** This interface is used to retrieve runtime status information
    +** about the preformance of SQLite, and optionally to reset various
    +** highwater marks.  The first argument is an integer code for
    +** the specific parameter to measure.  Recognized integer codes
    +** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].
    +** The current value of the parameter is returned into *pCurrent.
    +** The highest recorded value is returned in *pHighwater.  If the
    +** resetFlag is true, then the highest record value is reset after
    +** *pHighwater is written. Some parameters do not record the highest
    +** value.  For those parameters
    +** nothing is written into *pHighwater and the resetFlag is ignored.
    +** Other parameters record only the highwater mark and not the current
    +** value.  For these latter parameters nothing is written into *pCurrent.
    +**
    +** This routine returns SQLITE_OK on success and a non-zero
    +** [error code] on failure.
    +**
    +** This routine is threadsafe but is not atomic.  This routine can be
    +** called while other threads are running the same or different SQLite
    +** interfaces.  However the values returned in *pCurrent and
    +** *pHighwater reflect the status of SQLite at different points in time
    +** and it is possible that another thread might change the parameter
    +** in between the times when *pCurrent and *pHighwater are written.
    +**
    +** See also: [sqlite3_db_status()]
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
    +
    +
    +/*
    +** CAPI3REF: Status Parameters {H17250} <H17200>
    +** EXPERIMENTAL
    +**
    +** These integer constants designate various run-time status parameters
    +** that can be returned by [sqlite3_status()].
    +**
    +** <dl>
    +** <dt>SQLITE_STATUS_MEMORY_USED</dt>
    +** <dd>This parameter is the current amount of memory checked out
    +** using [sqlite3_malloc()], either directly or indirectly.  The
    +** figure includes calls made to [sqlite3_malloc()] by the application
    +** and internal memory usage by the SQLite library.  Scratch memory
    +** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
    +** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
    +** this parameter.  The amount returned is the sum of the allocation
    +** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>
    +**
    +** <dt>SQLITE_STATUS_MALLOC_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their
    +** internal equivalents).  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_USED</dt>
    +** <dd>This parameter returns the number of pages used out of the
    +** [pagecache memory allocator] that was configured using 
    +** [SQLITE_CONFIG_PAGECACHE].  The
    +** value returned is in pages, not in bytes.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
    +** <dd>This parameter returns the number of bytes of page cache
    +** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE]
    +** buffer and where forced to overflow to [sqlite3_malloc()].  The
    +** returned value includes allocations that overflowed because they
    +** where too large (they were larger than the "sz" parameter to
    +** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
    +** no space was left in the page cache.</dd>
    +**
    +** <dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [pagecache memory allocator].  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_USED</dt>
    +** <dd>This parameter returns the number of allocations used out of the
    +** [scratch memory allocator] configured using
    +** [SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not
    +** in bytes.  Since a single thread may only have one scratch allocation
    +** outstanding at time, this parameter also reports the number of threads
    +** using scratch memory at the same time.</dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
    +** <dd>This parameter returns the number of bytes of scratch memory
    +** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH]
    +** buffer and where forced to overflow to [sqlite3_malloc()].  The values
    +** returned include overflows because the requested allocation was too
    +** larger (that is, because the requested allocation was larger than the
    +** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
    +** slots were available.
    +** </dd>
    +**
    +** <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
    +** <dd>This parameter records the largest memory allocation request
    +** handed to [scratch memory allocator].  Only the value returned in the
    +** *pHighwater parameter to [sqlite3_status()] is of interest.  
    +** The value written into the *pCurrent parameter is undefined.</dd>
    +**
    +** <dt>SQLITE_STATUS_PARSER_STACK</dt>
    +** <dd>This parameter records the deepest parser stack.  It is only
    +** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>
    +** </dl>
    +**
    +** New status parameters may be added from time to time.
    +*/
    +#define SQLITE_STATUS_MEMORY_USED          0
    +#define SQLITE_STATUS_PAGECACHE_USED       1
    +#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
    +#define SQLITE_STATUS_SCRATCH_USED         3
    +#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
    +#define SQLITE_STATUS_MALLOC_SIZE          5
    +#define SQLITE_STATUS_PARSER_STACK         6
    +#define SQLITE_STATUS_PAGECACHE_SIZE       7
    +#define SQLITE_STATUS_SCRATCH_SIZE         8
    +
    +/*
    +** CAPI3REF: Database Connection Status {H17500} <S60200>
    +** EXPERIMENTAL
    +**
    +** This interface is used to retrieve runtime status information 
    +** about a single [database connection].  The first argument is the
    +** database connection object to be interrogated.  The second argument
    +** is the parameter to interrogate.  Currently, the only allowed value
    +** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED].
    +** Additional options will likely appear in future releases of SQLite.
    +**
    +** The current value of the requested parameter is written into *pCur
    +** and the highest instantaneous value is written into *pHiwtr.  If
    +** the resetFlg is true, then the highest instantaneous value is
    +** reset back down to the current value.
    +**
    +** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
    +
    +/*
    +** CAPI3REF: Status Parameters for database connections {H17520} <H17500>
    +** EXPERIMENTAL
    +**
    +** These constants are the available integer "verbs" that can be passed as
    +** the second argument to the [sqlite3_db_status()] interface.
    +**
    +** New verbs may be added in future releases of SQLite. Existing verbs
    +** might be discontinued. Applications should check the return code from
    +** [sqlite3_db_status()] to make sure that the call worked.
    +** The [sqlite3_db_status()] interface will return a non-zero error code
    +** if a discontinued or unsupported verb is invoked.
    +**
    +** <dl>
    +** <dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>
    +** <dd>This parameter returns the number of lookaside memory slots currently
    +** checked out.</dd>
    +** </dl>
    +*/
    +#define SQLITE_DBSTATUS_LOOKASIDE_USED     0
    +
    +
    +/*
    +** CAPI3REF: Prepared Statement Status {H17550} <S60200>
    +** EXPERIMENTAL
    +**
    +** Each prepared statement maintains various
    +** [SQLITE_STMTSTATUS_SORT | counters] that measure the number
    +** of times it has performed specific operations.  These counters can
    +** be used to monitor the performance characteristics of the prepared
    +** statements.  For example, if the number of table steps greatly exceeds
    +** the number of table searches or result rows, that would tend to indicate
    +** that the prepared statement is using a full table scan rather than
    +** an index.  
    +**
    +** This interface is used to retrieve and reset counter values from
    +** a [prepared statement].  The first argument is the prepared statement
    +** object to be interrogated.  The second argument
    +** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
    +** to be interrogated. 
    +** The current value of the requested counter is returned.
    +** If the resetFlg is true, then the counter is reset to zero after this
    +** interface call returns.
    +**
    +** See also: [sqlite3_status()] and [sqlite3_db_status()].
    +*/
    +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
    +
    +/*
    +** CAPI3REF: Status Parameters for prepared statements {H17570} <H17550>
    +** EXPERIMENTAL
    +**
    +** These preprocessor macros define integer codes that name counter
    +** values associated with the [sqlite3_stmt_status()] interface.
    +** The meanings of the various counters are as follows:
    +**
    +** <dl>
    +** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>
    +** <dd>This is the number of times that SQLite has stepped forward in
    +** a table as part of a full table scan.  Large numbers for this counter
    +** may indicate opportunities for performance improvement through 
    +** careful use of indices.</dd>
    +**
    +** <dt>SQLITE_STMTSTATUS_SORT</dt>
    +** <dd>This is the number of sort operations that have occurred.
    +** A non-zero value in this counter may indicate an opportunity to
    +** improvement performance through careful use of indices.</dd>
    +**
    +** </dl>
    +*/
    +#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1
    +#define SQLITE_STMTSTATUS_SORT              2
    +
    +/*
    +** CAPI3REF: Custom Page Cache Object
    +** EXPERIMENTAL
    +**
    +** The sqlite3_pcache type is opaque.  It is implemented by
    +** the pluggable module.  The SQLite core has no knowledge of
    +** its size or internal structure and never deals with the
    +** sqlite3_pcache object except by holding and passing pointers
    +** to the object.
    +**
    +** See [sqlite3_pcache_methods] for additional information.
    +*/
    +typedef struct sqlite3_pcache sqlite3_pcache;
    +
    +/*
    +** CAPI3REF: Application Defined Page Cache.
    +** KEYWORDS: {page cache}
    +** EXPERIMENTAL
    +**
    +** The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can
    +** register an alternative page cache implementation by passing in an 
    +** instance of the sqlite3_pcache_methods structure. The majority of the 
    +** heap memory used by SQLite is used by the page cache to cache data read 
    +** from, or ready to be written to, the database file. By implementing a 
    +** custom page cache using this API, an application can control more 
    +** precisely the amount of memory consumed by SQLite, the way in which 
    +** that memory is allocated and released, and the policies used to 
    +** determine exactly which parts of a database file are cached and for 
    +** how long.
    +**
    +** The contents of the sqlite3_pcache_methods structure are copied to an
    +** internal buffer by SQLite within the call to [sqlite3_config].  Hence
    +** the application may discard the parameter after the call to
    +** [sqlite3_config()] returns.
    +**
    +** The xInit() method is called once for each call to [sqlite3_initialize()]
    +** (usually only once during the lifetime of the process). It is passed
    +** a copy of the sqlite3_pcache_methods.pArg value. It can be used to set
    +** up global structures and mutexes required by the custom page cache 
    +** implementation. 
    +**
    +** The xShutdown() method is called from within [sqlite3_shutdown()], 
    +** if the application invokes this API. It can be used to clean up 
    +** any outstanding resources before process shutdown, if required.
    +**
    +** SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes
    +** the xInit method, so the xInit method need not be threadsafe.  The
    +** xShutdown method is only called from [sqlite3_shutdown()] so it does
    +** not need to be threadsafe either.  All other methods must be threadsafe
    +** in multithreaded applications.
    +**
    +** SQLite will never invoke xInit() more than once without an intervening
    +** call to xShutdown().
    +**
    +** The xCreate() method is used to construct a new cache instance.  SQLite
    +** will typically create one cache instance for each open database file,
    +** though this is not guaranteed. The
    +** first parameter, szPage, is the size in bytes of the pages that must
    +** be allocated by the cache.  szPage will not be a power of two.  szPage
    +** will the page size of the database file that is to be cached plus an
    +** increment (here called "R") of about 100 or 200.  SQLite will use the
    +** extra R bytes on each page to store metadata about the underlying
    +** database page on disk.  The value of R depends
    +** on the SQLite version, the target platform, and how SQLite was compiled.
    +** R is constant for a particular build of SQLite.  The second argument to
    +** xCreate(), bPurgeable, is true if the cache being created will
    +** be used to cache database pages of a file stored on disk, or
    +** false if it is used for an in-memory database. The cache implementation
    +** does not have to do anything special based with the value of bPurgeable;
    +** it is purely advisory.  On a cache where bPurgeable is false, SQLite will
    +** never invoke xUnpin() except to deliberately delete a page.
    +** In other words, a cache created with bPurgeable set to false will
    +** never contain any unpinned pages.
    +**
    +** The xCachesize() method may be called at any time by SQLite to set the
    +** suggested maximum cache-size (number of pages stored by) the cache
    +** instance passed as the first argument. This is the value configured using
    +** the SQLite "[PRAGMA cache_size]" command. As with the bPurgeable parameter,
    +** the implementation is not required to do anything with this
    +** value; it is advisory only.
    +**
    +** The xPagecount() method should return the number of pages currently
    +** stored in the cache.
    +** 
    +** The xFetch() method is used to fetch a page and return a pointer to it. 
    +** A 'page', in this context, is a buffer of szPage bytes aligned at an
    +** 8-byte boundary. The page to be fetched is determined by the key. The
    +** mimimum key value is 1. After it has been retrieved using xFetch, the page 
    +** is considered to be "pinned".
    +**
    +** If the requested page is already in the page cache, then the page cache
    +** implementation must return a pointer to the page buffer with its content
    +** intact.  If the requested page is not already in the cache, then the
    +** behavior of the cache implementation is determined by the value of the
    +** createFlag parameter passed to xFetch, according to the following table:
    +**
    +** <table border=1 width=85% align=center>
    +** <tr><th> createFlag <th> Behaviour when page is not already in cache
    +** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
    +** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
    +**                 Otherwise return NULL.
    +** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
    +**                 NULL if allocating a new page is effectively impossible.
    +** </table>
    +**
    +** SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  If
    +** a call to xFetch() with createFlag==1 returns NULL, then SQLite will
    +** attempt to unpin one or more cache pages by spilling the content of
    +** pinned pages to disk and synching the operating system disk cache. After
    +** attempting to unpin pages, the xFetch() method will be invoked again with
    +** a createFlag of 2.
    +**
    +** xUnpin() is called by SQLite with a pointer to a currently pinned page
    +** as its second argument. If the third parameter, discard, is non-zero,
    +** then the page should be evicted from the cache. In this case SQLite 
    +** assumes that the next time the page is retrieved from the cache using
    +** the xFetch() method, it will be zeroed. If the discard parameter is
    +** zero, then the page is considered to be unpinned. The cache implementation
    +** may choose to evict unpinned pages at any time.
    +**
    +** The cache is not required to perform any reference counting. A single 
    +** call to xUnpin() unpins the page regardless of the number of prior calls 
    +** to xFetch().
    +**
    +** The xRekey() method is used to change the key value associated with the
    +** page passed as the second argument from oldKey to newKey. If the cache
    +** previously contains an entry associated with newKey, it should be
    +** discarded. Any prior cache entry associated with newKey is guaranteed not
    +** to be pinned.
    +**
    +** When SQLite calls the xTruncate() method, the cache must discard all
    +** existing cache entries with page numbers (keys) greater than or equal
    +** to the value of the iLimit parameter passed to xTruncate(). If any
    +** of these pages are pinned, they are implicitly unpinned, meaning that
    +** they can be safely discarded.
    +**
    +** The xDestroy() method is used to delete a cache allocated by xCreate().
    +** All resources associated with the specified cache should be freed. After
    +** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
    +** handle invalid, and will not use it with any other sqlite3_pcache_methods
    +** functions.
    +*/
    +typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
    +struct sqlite3_pcache_methods {
    +  void *pArg;
    +  int (*xInit)(void*);
    +  void (*xShutdown)(void*);
    +  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
    +  void (*xCachesize)(sqlite3_pcache*, int nCachesize);
    +  int (*xPagecount)(sqlite3_pcache*);
    +  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
    +  void (*xUnpin)(sqlite3_pcache*, void*, int discard);
    +  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
    +  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
    +  void (*xDestroy)(sqlite3_pcache*);
    +};
    +
    +/*
    +** CAPI3REF: Online Backup Object
    +** EXPERIMENTAL
    +**
    +** The sqlite3_backup object records state information about an ongoing
    +** online backup operation.  The sqlite3_backup object is created by
    +** a call to [sqlite3_backup_init()] and is destroyed by a call to
    +** [sqlite3_backup_finish()].
    +**
    +** See Also: [Using the SQLite Online Backup API]
    +*/
    +typedef struct sqlite3_backup sqlite3_backup;
    +
    +/*
    +** CAPI3REF: Online Backup API.
    +** EXPERIMENTAL
    +**
    +** This API is used to overwrite the contents of one database with that
    +** of another. It is useful either for creating backups of databases or
    +** for copying in-memory databases to or from persistent files. 
    +**
    +** See Also: [Using the SQLite Online Backup API]
    +**
    +** Exclusive access is required to the destination database for the 
    +** duration of the operation. However the source database is only
    +** read-locked while it is actually being read, it is not locked
    +** continuously for the entire operation. Thus, the backup may be
    +** performed on a live database without preventing other users from
    +** writing to the database for an extended period of time.
    +** 
    +** To perform a backup operation: 
    +**   <ol>
    +**     <li><b>sqlite3_backup_init()</b> is called once to initialize the
    +**         backup, 
    +**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer 
    +**         the data between the two databases, and finally
    +**     <li><b>sqlite3_backup_finish()</b> is called to release all resources 
    +**         associated with the backup operation. 
    +**   </ol>
    +** There should be exactly one call to sqlite3_backup_finish() for each
    +** successful call to sqlite3_backup_init().
    +**
    +** <b>sqlite3_backup_init()</b>
    +**
    +** The first two arguments passed to [sqlite3_backup_init()] are the database
    +** handle associated with the destination database and the database name 
    +** used to attach the destination database to the handle. The database name
    +** is "main" for the main database, "temp" for the temporary database, or
    +** the name specified as part of the [ATTACH] statement if the destination is
    +** an attached database. The third and fourth arguments passed to 
    +** sqlite3_backup_init() identify the [database connection]
    +** and database name used
    +** to access the source database. The values passed for the source and 
    +** destination [database connection] parameters must not be the same.
    +**
    +** If an error occurs within sqlite3_backup_init(), then NULL is returned
    +** and an error code and error message written into the [database connection] 
    +** passed as the first argument. They may be retrieved using the
    +** [sqlite3_errcode()], [sqlite3_errmsg()], and [sqlite3_errmsg16()] functions.
    +** Otherwise, if successful, a pointer to an [sqlite3_backup] object is
    +** returned. This pointer may be used with the sqlite3_backup_step() and
    +** sqlite3_backup_finish() functions to perform the specified backup 
    +** operation.
    +**
    +** <b>sqlite3_backup_step()</b>
    +**
    +** Function [sqlite3_backup_step()] is used to copy up to nPage pages between 
    +** the source and destination databases, where nPage is the value of the 
    +** second parameter passed to sqlite3_backup_step(). If nPage is a negative
    +** value, all remaining source pages are copied. If the required pages are 
    +** succesfully copied, but there are still more pages to copy before the 
    +** backup is complete, it returns [SQLITE_OK]. If no error occured and there 
    +** are no more pages to copy, then [SQLITE_DONE] is returned. If an error 
    +** occurs, then an SQLite error code is returned. As well as [SQLITE_OK] and
    +** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
    +** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
    +**
    +** As well as the case where the destination database file was opened for
    +** read-only access, sqlite3_backup_step() may return [SQLITE_READONLY] if
    +** the destination is an in-memory database with a different page size
    +** from the source database.
    +**
    +** If sqlite3_backup_step() cannot obtain a required file-system lock, then
    +** the [sqlite3_busy_handler | busy-handler function]
    +** is invoked (if one is specified). If the 
    +** busy-handler returns non-zero before the lock is available, then 
    +** [SQLITE_BUSY] is returned to the caller. In this case the call to
    +** sqlite3_backup_step() can be retried later. If the source
    +** [database connection]
    +** is being used to write to the source database when sqlite3_backup_step()
    +** is called, then [SQLITE_LOCKED] is returned immediately. Again, in this
    +** case the call to sqlite3_backup_step() can be retried later on. If
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
    +** [SQLITE_READONLY] is returned, then 
    +** there is no point in retrying the call to sqlite3_backup_step(). These 
    +** errors are considered fatal. At this point the application must accept 
    +** that the backup operation has failed and pass the backup operation handle 
    +** to the sqlite3_backup_finish() to release associated resources.
    +**
    +** Following the first call to sqlite3_backup_step(), an exclusive lock is
    +** obtained on the destination file. It is not released until either 
    +** sqlite3_backup_finish() is called or the backup operation is complete 
    +** and sqlite3_backup_step() returns [SQLITE_DONE]. Additionally, each time 
    +** a call to sqlite3_backup_step() is made a [shared lock] is obtained on
    +** the source database file. This lock is released before the
    +** sqlite3_backup_step() call returns. Because the source database is not
    +** locked between calls to sqlite3_backup_step(), it may be modified mid-way
    +** through the backup procedure. If the source database is modified by an
    +** external process or via a database connection other than the one being
    +** used by the backup operation, then the backup will be transparently
    +** restarted by the next call to sqlite3_backup_step(). If the source 
    +** database is modified by the using the same database connection as is used
    +** by the backup operation, then the backup database is transparently 
    +** updated at the same time.
    +**
    +** <b>sqlite3_backup_finish()</b>
    +**
    +** Once sqlite3_backup_step() has returned [SQLITE_DONE], or when the 
    +** application wishes to abandon the backup operation, the [sqlite3_backup]
    +** object should be passed to sqlite3_backup_finish(). This releases all
    +** resources associated with the backup operation. If sqlite3_backup_step()
    +** has not yet returned [SQLITE_DONE], then any active write-transaction on the
    +** destination database is rolled back. The [sqlite3_backup] object is invalid
    +** and may not be used following a call to sqlite3_backup_finish().
    +**
    +** The value returned by sqlite3_backup_finish is [SQLITE_OK] if no error
    +** occurred, regardless or whether or not sqlite3_backup_step() was called
    +** a sufficient number of times to complete the backup operation. Or, if
    +** an out-of-memory condition or IO error occured during a call to
    +** sqlite3_backup_step() then [SQLITE_NOMEM] or an
    +** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] error code
    +** is returned. In this case the error code and an error message are
    +** written to the destination [database connection].
    +**
    +** A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() is
    +** not a permanent error and does not affect the return value of
    +** sqlite3_backup_finish().
    +**
    +** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>
    +**
    +** Each call to sqlite3_backup_step() sets two values stored internally
    +** by an [sqlite3_backup] object. The number of pages still to be backed
    +** up, which may be queried by sqlite3_backup_remaining(), and the total
    +** number of pages in the source database file, which may be queried by
    +** sqlite3_backup_pagecount().
    +**
    +** The values returned by these functions are only updated by
    +** sqlite3_backup_step(). If the source database is modified during a backup
    +** operation, then the values are not updated to account for any extra
    +** pages that need to be updated or the size of the source database file
    +** changing.
    +**
    +** <b>Concurrent Usage of Database Handles</b>
    +**
    +** The source [database connection] may be used by the application for other
    +** purposes while a backup operation is underway or being initialized.
    +** If SQLite is compiled and configured to support threadsafe database
    +** connections, then the source database connection may be used concurrently
    +** from within other threads.
    +**
    +** However, the application must guarantee that the destination database
    +** connection handle is not passed to any other API (by any thread) after 
    +** sqlite3_backup_init() is called and before the corresponding call to
    +** sqlite3_backup_finish(). Unfortunately SQLite does not currently check
    +** for this, if the application does use the destination [database connection]
    +** for some other purpose during a backup operation, things may appear to
    +** work correctly but in fact be subtly malfunctioning.  Use of the
    +** destination database connection while a backup is in progress might
    +** also cause a mutex deadlock.
    +**
    +** Furthermore, if running in [shared cache mode], the application must
    +** guarantee that the shared cache used by the destination database
    +** is not accessed while the backup is running. In practice this means
    +** that the application must guarantee that the file-system file being 
    +** backed up to is not accessed by any connection within the process,
    +** not just the specific connection that was passed to sqlite3_backup_init().
    +**
    +** The [sqlite3_backup] object itself is partially threadsafe. Multiple 
    +** threads may safely make multiple concurrent calls to sqlite3_backup_step().
    +** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
    +** APIs are not strictly speaking threadsafe. If they are invoked at the
    +** same time as another thread is invoking sqlite3_backup_step() it is
    +** possible that they return invalid values.
    +*/
    +SQLITE_API sqlite3_backup *sqlite3_backup_init(
    +  sqlite3 *pDest,                        /* Destination database handle */
    +  const char *zDestName,                 /* Destination database name */
    +  sqlite3 *pSource,                      /* Source database handle */
    +  const char *zSourceName                /* Source database name */
    +);
    +SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
    +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
    +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
    +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
    +
    +/*
    +** CAPI3REF: Unlock Notification
    +** EXPERIMENTAL
    +**
    +** When running in shared-cache mode, a database operation may fail with
    +** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
    +** individual tables within the shared-cache cannot be obtained. See
    +** [SQLite Shared-Cache Mode] for a description of shared-cache locking. 
    +** This API may be used to register a callback that SQLite will invoke 
    +** when the connection currently holding the required lock relinquishes it.
    +** This API is only available if the library was compiled with the
    +** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
    +**
    +** See Also: [Using the SQLite Unlock Notification Feature].
    +**
    +** Shared-cache locks are released when a database connection concludes
    +** its current transaction, either by committing it or rolling it back. 
    +**
    +** When a connection (known as the blocked connection) fails to obtain a
    +** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
    +** identity of the database connection (the blocking connection) that
    +** has locked the required resource is stored internally. After an 
    +** application receives an SQLITE_LOCKED error, it may call the
    +** sqlite3_unlock_notify() method with the blocked connection handle as 
    +** the first argument to register for a callback that will be invoked
    +** when the blocking connections current transaction is concluded. The
    +** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
    +** call that concludes the blocking connections transaction.
    +**
    +** If sqlite3_unlock_notify() is called in a multi-threaded application,
    +** there is a chance that the blocking connection will have already
    +** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
    +** If this happens, then the specified callback is invoked immediately,
    +** from within the call to sqlite3_unlock_notify().
    +**
    +** If the blocked connection is attempting to obtain a write-lock on a
    +** shared-cache table, and more than one other connection currently holds
    +** a read-lock on the same table, then SQLite arbitrarily selects one of 
    +** the other connections to use as the blocking connection.
    +**
    +** There may be at most one unlock-notify callback registered by a 
    +** blocked connection. If sqlite3_unlock_notify() is called when the
    +** blocked connection already has a registered unlock-notify callback,
    +** then the new callback replaces the old. If sqlite3_unlock_notify() is
    +** called with a NULL pointer as its second argument, then any existing
    +** unlock-notify callback is cancelled. The blocked connections 
    +** unlock-notify callback may also be canceled by closing the blocked
    +** connection using [sqlite3_close()].
    +**
    +** The unlock-notify callback is not reentrant. If an application invokes
    +** any sqlite3_xxx API functions from within an unlock-notify callback, a
    +** crash or deadlock may be the result.
    +**
    +** Unless deadlock is detected (see below), sqlite3_unlock_notify() always
    +** returns SQLITE_OK.
    +**
    +** <b>Callback Invocation Details</b>
    +**
    +** When an unlock-notify callback is registered, the application provides a 
    +** single void* pointer that is passed to the callback when it is invoked.
    +** However, the signature of the callback function allows SQLite to pass
    +** it an array of void* context pointers. The first argument passed to
    +** an unlock-notify callback is a pointer to an array of void* pointers,
    +** and the second is the number of entries in the array.
    +**
    +** When a blocking connections transaction is concluded, there may be
    +** more than one blocked connection that has registered for an unlock-notify
    +** callback. If two or more such blocked connections have specified the
    +** same callback function, then instead of invoking the callback function
    +** multiple times, it is invoked once with the set of void* context pointers
    +** specified by the blocked connections bundled together into an array.
    +** This gives the application an opportunity to prioritize any actions 
    +** related to the set of unblocked database connections.
    +**
    +** <b>Deadlock Detection</b>
    +**
    +** Assuming that after registering for an unlock-notify callback a 
    +** database waits for the callback to be issued before taking any further
    +** action (a reasonable assumption), then using this API may cause the
    +** application to deadlock. For example, if connection X is waiting for
    +** connection Y's transaction to be concluded, and similarly connection
    +** Y is waiting on connection X's transaction, then neither connection
    +** will proceed and the system may remain deadlocked indefinitely.
    +**
    +** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
    +** detection. If a given call to sqlite3_unlock_notify() would put the
    +** system in a deadlocked state, then SQLITE_LOCKED is returned and no
    +** unlock-notify callback is registered. The system is said to be in
    +** a deadlocked state if connection A has registered for an unlock-notify
    +** callback on the conclusion of connection B's transaction, and connection
    +** B has itself registered for an unlock-notify callback when connection
    +** A's transaction is concluded. Indirect deadlock is also detected, so
    +** the system is also considered to be deadlocked if connection B has
    +** registered for an unlock-notify callback on the conclusion of connection
    +** C's transaction, where connection C is waiting on connection A. Any
    +** number of levels of indirection are allowed.
    +**
    +** <b>The "DROP TABLE" Exception</b>
    +**
    +** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost 
    +** always appropriate to call sqlite3_unlock_notify(). There is however,
    +** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
    +** SQLite checks if there are any currently executing SELECT statements
    +** that belong to the same connection. If there are, SQLITE_LOCKED is
    +** returned. In this case there is no "blocking connection", so invoking
    +** sqlite3_unlock_notify() results in the unlock-notify callback being
    +** invoked immediately. If the application then re-attempts the "DROP TABLE"
    +** or "DROP INDEX" query, an infinite loop might be the result.
    +**
    +** One way around this problem is to check the extended error code returned
    +** by an sqlite3_step() call. If there is a blocking connection, then the
    +** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
    +** the special "DROP TABLE/INDEX" case, the extended error code is just 
    +** SQLITE_LOCKED.
    +*/
    +SQLITE_API int sqlite3_unlock_notify(
    +  sqlite3 *pBlocked,                          /* Waiting connection */
    +  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */
    +  void *pNotifyArg                            /* Argument to pass to xNotify */
    +);
    +
    +
    +/*
    +** CAPI3REF: String Comparison
    +** EXPERIMENTAL
    +**
    +** The [sqlite3_strnicmp()] API allows applications and extensions to
    +** compare the contents of two buffers containing UTF-8 strings in a
    +** case-indendent fashion, using the same definition of case independence 
    +** that SQLite uses internally when comparing identifiers.
    +*/
    +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
    +
    +/*
    +** Undo the hack that converts floating point types to integer for
    +** builds on processors without floating point support.
    +*/
    +#ifdef SQLITE_OMIT_FLOATING_POINT
    +# undef double
    +#endif
    +
    +#ifdef __cplusplus
    +}  /* End of the 'extern "C"' block */
    +#endif
    +#endif
    +
    diff --git a/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3ext.h b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3ext.h
    new file mode 100644
    index 0000000..5526646
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/backend/amalgamation/sqlite3ext.h
    @@ -0,0 +1,380 @@
    +/*
    +** 2006 June 7
    +**
    +** The author disclaims copyright to this source code.  In place of
    +** a legal notice, here is a blessing:
    +**
    +**    May you do good and not evil.
    +**    May you find forgiveness for yourself and forgive others.
    +**    May you share freely, never taking more than you give.
    +**
    +*************************************************************************
    +** This header file defines the SQLite interface for use by
    +** shared libraries that want to be imported as extensions into
    +** an SQLite instance.  Shared libraries that intend to be loaded
    +** as extensions by SQLite should #include this file instead of 
    +** sqlite3.h.
    +**
    +** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $
    +*/
    +#ifndef _SQLITE3EXT_H_
    +#define _SQLITE3EXT_H_
    +#include "sqlite3.h"
    +
    +typedef struct sqlite3_api_routines sqlite3_api_routines;
    +
    +/*
    +** The following structure holds pointers to all of the SQLite API
    +** routines.
    +**
    +** WARNING:  In order to maintain backwards compatibility, add new
    +** interfaces to the end of this structure only.  If you insert new
    +** interfaces in the middle of this structure, then older different
    +** versions of SQLite will not be able to load each others' shared
    +** libraries!
    +*/
    +struct sqlite3_api_routines {
    +  void * (*aggregate_context)(sqlite3_context*,int nBytes);
    +  int  (*aggregate_count)(sqlite3_context*);
    +  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
    +  int  (*bind_double)(sqlite3_stmt*,int,double);
    +  int  (*bind_int)(sqlite3_stmt*,int,int);
    +  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
    +  int  (*bind_null)(sqlite3_stmt*,int);
    +  int  (*bind_parameter_count)(sqlite3_stmt*);
    +  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
    +  const char * (*bind_parameter_name)(sqlite3_stmt*,int);
    +  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
    +  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
    +  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
    +  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
    +  int  (*busy_timeout)(sqlite3*,int ms);
    +  int  (*changes)(sqlite3*);
    +  int  (*close)(sqlite3*);
    +  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
    +  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
    +  const void * (*column_blob)(sqlite3_stmt*,int iCol);
    +  int  (*column_bytes)(sqlite3_stmt*,int iCol);
    +  int  (*column_bytes16)(sqlite3_stmt*,int iCol);
    +  int  (*column_count)(sqlite3_stmt*pStmt);
    +  const char * (*column_database_name)(sqlite3_stmt*,int);
    +  const void * (*column_database_name16)(sqlite3_stmt*,int);
    +  const char * (*column_decltype)(sqlite3_stmt*,int i);
    +  const void * (*column_decltype16)(sqlite3_stmt*,int);
    +  double  (*column_double)(sqlite3_stmt*,int iCol);
    +  int  (*column_int)(sqlite3_stmt*,int iCol);
    +  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);
    +  const char * (*column_name)(sqlite3_stmt*,int);
    +  const void * (*column_name16)(sqlite3_stmt*,int);
    +  const char * (*column_origin_name)(sqlite3_stmt*,int);
    +  const void * (*column_origin_name16)(sqlite3_stmt*,int);
    +  const char * (*column_table_name)(sqlite3_stmt*,int);
    +  const void * (*column_table_name16)(sqlite3_stmt*,int);
    +  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
    +  const void * (*column_text16)(sqlite3_stmt*,int iCol);
    +  int  (*column_type)(sqlite3_stmt*,int iCol);
    +  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
    +  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
    +  int  (*complete)(const char*sql);
    +  int  (*complete16)(const void*sql);
    +  int  (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
    +  int  (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
    +  int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
    +  int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
    +  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
    +  int  (*data_count)(sqlite3_stmt*pStmt);
    +  sqlite3 * (*db_handle)(sqlite3_stmt*);
    +  int (*declare_vtab)(sqlite3*,const char*);
    +  int  (*enable_shared_cache)(int);
    +  int  (*errcode)(sqlite3*db);
    +  const char * (*errmsg)(sqlite3*);
    +  const void * (*errmsg16)(sqlite3*);
    +  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
    +  int  (*expired)(sqlite3_stmt*);
    +  int  (*finalize)(sqlite3_stmt*pStmt);
    +  void  (*free)(void*);
    +  void  (*free_table)(char**result);
    +  int  (*get_autocommit)(sqlite3*);
    +  void * (*get_auxdata)(sqlite3_context*,int);
    +  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
    +  int  (*global_recover)(void);
    +  void  (*interruptx)(sqlite3*);
    +  sqlite_int64  (*last_insert_rowid)(sqlite3*);
    +  const char * (*libversion)(void);
    +  int  (*libversion_number)(void);
    +  void *(*malloc)(int);
    +  char * (*mprintf)(const char*,...);
    +  int  (*open)(const char*,sqlite3**);
    +  int  (*open16)(const void*,sqlite3**);
    +  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
    +  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
    +  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
    +  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
    +  void *(*realloc)(void*,int);
    +  int  (*reset)(sqlite3_stmt*pStmt);
    +  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_double)(sqlite3_context*,double);
    +  void  (*result_error)(sqlite3_context*,const char*,int);
    +  void  (*result_error16)(sqlite3_context*,const void*,int);
    +  void  (*result_int)(sqlite3_context*,int);
    +  void  (*result_int64)(sqlite3_context*,sqlite_int64);
    +  void  (*result_null)(sqlite3_context*);
    +  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
    +  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
    +  void  (*result_value)(sqlite3_context*,sqlite3_value*);
    +  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
    +  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
    +  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
    +  char * (*snprintf)(int,char*,const char*,...);
    +  int  (*step)(sqlite3_stmt*);
    +  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
    +  void  (*thread_cleanup)(void);
    +  int  (*total_changes)(sqlite3*);
    +  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
    +  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
    +  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
    +  void * (*user_data)(sqlite3_context*);
    +  const void * (*value_blob)(sqlite3_value*);
    +  int  (*value_bytes)(sqlite3_value*);
    +  int  (*value_bytes16)(sqlite3_value*);
    +  double  (*value_double)(sqlite3_value*);
    +  int  (*value_int)(sqlite3_value*);
    +  sqlite_int64  (*value_int64)(sqlite3_value*);
    +  int  (*value_numeric_type)(sqlite3_value*);
    +  const unsigned char * (*value_text)(sqlite3_value*);
    +  const void * (*value_text16)(sqlite3_value*);
    +  const void * (*value_text16be)(sqlite3_value*);
    +  const void * (*value_text16le)(sqlite3_value*);
    +  int  (*value_type)(sqlite3_value*);
    +  char *(*vmprintf)(const char*,va_list);
    +  /* Added ??? */
    +  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
    +  /* Added by 3.3.13 */
    +  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
    +  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
    +  int (*clear_bindings)(sqlite3_stmt*);
    +  /* Added by 3.4.1 */
    +  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
    +  /* Added by 3.5.0 */
    +  int (*bind_zeroblob)(sqlite3_stmt*,int,int);
    +  int (*blob_bytes)(sqlite3_blob*);
    +  int (*blob_close)(sqlite3_blob*);
    +  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
    +  int (*blob_read)(sqlite3_blob*,void*,int,int);
    +  int (*blob_write)(sqlite3_blob*,const void*,int,int);
    +  int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
    +  int (*file_control)(sqlite3*,const char*,int,void*);
    +  sqlite3_int64 (*memory_highwater)(int);
    +  sqlite3_int64 (*memory_used)(void);
    +  sqlite3_mutex *(*mutex_alloc)(int);
    +  void (*mutex_enter)(sqlite3_mutex*);
    +  void (*mutex_free)(sqlite3_mutex*);
    +  void (*mutex_leave)(sqlite3_mutex*);
    +  int (*mutex_try)(sqlite3_mutex*);
    +  int (*open_v2)(const char*,sqlite3**,int,const char*);
    +  int (*release_memory)(int);
    +  void (*result_error_nomem)(sqlite3_context*);
    +  void (*result_error_toobig)(sqlite3_context*);
    +  int (*sleep)(int);
    +  void (*soft_heap_limit)(int);
    +  sqlite3_vfs *(*vfs_find)(const char*);
    +  int (*vfs_register)(sqlite3_vfs*,int);
    +  int (*vfs_unregister)(sqlite3_vfs*);
    +  int (*xthreadsafe)(void);
    +  void (*result_zeroblob)(sqlite3_context*,int);
    +  void (*result_error_code)(sqlite3_context*,int);
    +  int (*test_control)(int, ...);
    +  void (*randomness)(int,void*);
    +  sqlite3 *(*context_db_handle)(sqlite3_context*);
    +  int (*extended_result_codes)(sqlite3*,int);
    +  int (*limit)(sqlite3*,int,int);
    +  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
    +  const char *(*sql)(sqlite3_stmt*);
    +  int (*status)(int,int*,int*,int);
    +};
    +
    +/*
    +** The following macros redefine the API routines so that they are
    +** redirected throught the global sqlite3_api structure.
    +**
    +** This header file is also used by the loadext.c source file
    +** (part of the main SQLite library - not an extension) so that
    +** it can get access to the sqlite3_api_routines structure
    +** definition.  But the main library does not want to redefine
    +** the API.  So the redefinition macros are only valid if the
    +** SQLITE_CORE macros is undefined.
    +*/
    +#ifndef SQLITE_CORE
    +#define sqlite3_aggregate_context      sqlite3_api->aggregate_context
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_aggregate_count        sqlite3_api->aggregate_count
    +#endif
    +#define sqlite3_bind_blob              sqlite3_api->bind_blob
    +#define sqlite3_bind_double            sqlite3_api->bind_double
    +#define sqlite3_bind_int               sqlite3_api->bind_int
    +#define sqlite3_bind_int64             sqlite3_api->bind_int64
    +#define sqlite3_bind_null              sqlite3_api->bind_null
    +#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
    +#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
    +#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
    +#define sqlite3_bind_text              sqlite3_api->bind_text
    +#define sqlite3_bind_text16            sqlite3_api->bind_text16
    +#define sqlite3_bind_value             sqlite3_api->bind_value
    +#define sqlite3_busy_handler           sqlite3_api->busy_handler
    +#define sqlite3_busy_timeout           sqlite3_api->busy_timeout
    +#define sqlite3_changes                sqlite3_api->changes
    +#define sqlite3_close                  sqlite3_api->close
    +#define sqlite3_collation_needed       sqlite3_api->collation_needed
    +#define sqlite3_collation_needed16     sqlite3_api->collation_needed16
    +#define sqlite3_column_blob            sqlite3_api->column_blob
    +#define sqlite3_column_bytes           sqlite3_api->column_bytes
    +#define sqlite3_column_bytes16         sqlite3_api->column_bytes16
    +#define sqlite3_column_count           sqlite3_api->column_count
    +#define sqlite3_column_database_name   sqlite3_api->column_database_name
    +#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
    +#define sqlite3_column_decltype        sqlite3_api->column_decltype
    +#define sqlite3_column_decltype16      sqlite3_api->column_decltype16
    +#define sqlite3_column_double          sqlite3_api->column_double
    +#define sqlite3_column_int             sqlite3_api->column_int
    +#define sqlite3_column_int64           sqlite3_api->column_int64
    +#define sqlite3_column_name            sqlite3_api->column_name
    +#define sqlite3_column_name16          sqlite3_api->column_name16
    +#define sqlite3_column_origin_name     sqlite3_api->column_origin_name
    +#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16
    +#define sqlite3_column_table_name      sqlite3_api->column_table_name
    +#define sqlite3_column_table_name16    sqlite3_api->column_table_name16
    +#define sqlite3_column_text            sqlite3_api->column_text
    +#define sqlite3_column_text16          sqlite3_api->column_text16
    +#define sqlite3_column_type            sqlite3_api->column_type
    +#define sqlite3_column_value           sqlite3_api->column_value
    +#define sqlite3_commit_hook            sqlite3_api->commit_hook
    +#define sqlite3_complete               sqlite3_api->complete
    +#define sqlite3_complete16             sqlite3_api->complete16
    +#define sqlite3_create_collation       sqlite3_api->create_collation
    +#define sqlite3_create_collation16     sqlite3_api->create_collation16
    +#define sqlite3_create_function        sqlite3_api->create_function
    +#define sqlite3_create_function16      sqlite3_api->create_function16
    +#define sqlite3_create_module          sqlite3_api->create_module
    +#define sqlite3_create_module_v2       sqlite3_api->create_module_v2
    +#define sqlite3_data_count             sqlite3_api->data_count
    +#define sqlite3_db_handle              sqlite3_api->db_handle
    +#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
    +#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
    +#define sqlite3_errcode                sqlite3_api->errcode
    +#define sqlite3_errmsg                 sqlite3_api->errmsg
    +#define sqlite3_errmsg16               sqlite3_api->errmsg16
    +#define sqlite3_exec                   sqlite3_api->exec
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_expired                sqlite3_api->expired
    +#endif
    +#define sqlite3_finalize               sqlite3_api->finalize
    +#define sqlite3_free                   sqlite3_api->free
    +#define sqlite3_free_table             sqlite3_api->free_table
    +#define sqlite3_get_autocommit         sqlite3_api->get_autocommit
    +#define sqlite3_get_auxdata            sqlite3_api->get_auxdata
    +#define sqlite3_get_table              sqlite3_api->get_table
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_global_recover         sqlite3_api->global_recover
    +#endif
    +#define sqlite3_interrupt              sqlite3_api->interruptx
    +#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid
    +#define sqlite3_libversion             sqlite3_api->libversion
    +#define sqlite3_libversion_number      sqlite3_api->libversion_number
    +#define sqlite3_malloc                 sqlite3_api->malloc
    +#define sqlite3_mprintf                sqlite3_api->mprintf
    +#define sqlite3_open                   sqlite3_api->open
    +#define sqlite3_open16                 sqlite3_api->open16
    +#define sqlite3_prepare                sqlite3_api->prepare
    +#define sqlite3_prepare16              sqlite3_api->prepare16
    +#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
    +#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
    +#define sqlite3_profile                sqlite3_api->profile
    +#define sqlite3_progress_handler       sqlite3_api->progress_handler
    +#define sqlite3_realloc                sqlite3_api->realloc
    +#define sqlite3_reset                  sqlite3_api->reset
    +#define sqlite3_result_blob            sqlite3_api->result_blob
    +#define sqlite3_result_double          sqlite3_api->result_double
    +#define sqlite3_result_error           sqlite3_api->result_error
    +#define sqlite3_result_error16         sqlite3_api->result_error16
    +#define sqlite3_result_int             sqlite3_api->result_int
    +#define sqlite3_result_int64           sqlite3_api->result_int64
    +#define sqlite3_result_null            sqlite3_api->result_null
    +#define sqlite3_result_text            sqlite3_api->result_text
    +#define sqlite3_result_text16          sqlite3_api->result_text16
    +#define sqlite3_result_text16be        sqlite3_api->result_text16be
    +#define sqlite3_result_text16le        sqlite3_api->result_text16le
    +#define sqlite3_result_value           sqlite3_api->result_value
    +#define sqlite3_rollback_hook          sqlite3_api->rollback_hook
    +#define sqlite3_set_authorizer         sqlite3_api->set_authorizer
    +#define sqlite3_set_auxdata            sqlite3_api->set_auxdata
    +#define sqlite3_snprintf               sqlite3_api->snprintf
    +#define sqlite3_step                   sqlite3_api->step
    +#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata
    +#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup
    +#define sqlite3_total_changes          sqlite3_api->total_changes
    +#define sqlite3_trace                  sqlite3_api->trace
    +#ifndef SQLITE_OMIT_DEPRECATED
    +#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings
    +#endif
    +#define sqlite3_update_hook            sqlite3_api->update_hook
    +#define sqlite3_user_data              sqlite3_api->user_data
    +#define sqlite3_value_blob             sqlite3_api->value_blob
    +#define sqlite3_value_bytes            sqlite3_api->value_bytes
    +#define sqlite3_value_bytes16          sqlite3_api->value_bytes16
    +#define sqlite3_value_double           sqlite3_api->value_double
    +#define sqlite3_value_int              sqlite3_api->value_int
    +#define sqlite3_value_int64            sqlite3_api->value_int64
    +#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type
    +#define sqlite3_value_text             sqlite3_api->value_text
    +#define sqlite3_value_text16           sqlite3_api->value_text16
    +#define sqlite3_value_text16be         sqlite3_api->value_text16be
    +#define sqlite3_value_text16le         sqlite3_api->value_text16le
    +#define sqlite3_value_type             sqlite3_api->value_type
    +#define sqlite3_vmprintf               sqlite3_api->vmprintf
    +#define sqlite3_overload_function      sqlite3_api->overload_function
    +#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
    +#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
    +#define sqlite3_clear_bindings         sqlite3_api->clear_bindings
    +#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob
    +#define sqlite3_blob_bytes             sqlite3_api->blob_bytes
    +#define sqlite3_blob_close             sqlite3_api->blob_close
    +#define sqlite3_blob_open              sqlite3_api->blob_open
    +#define sqlite3_blob_read              sqlite3_api->blob_read
    +#define sqlite3_blob_write             sqlite3_api->blob_write
    +#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2
    +#define sqlite3_file_control           sqlite3_api->file_control
    +#define sqlite3_memory_highwater       sqlite3_api->memory_highwater
    +#define sqlite3_memory_used            sqlite3_api->memory_used
    +#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc
    +#define sqlite3_mutex_enter            sqlite3_api->mutex_enter
    +#define sqlite3_mutex_free             sqlite3_api->mutex_free
    +#define sqlite3_mutex_leave            sqlite3_api->mutex_leave
    +#define sqlite3_mutex_try              sqlite3_api->mutex_try
    +#define sqlite3_open_v2                sqlite3_api->open_v2
    +#define sqlite3_release_memory         sqlite3_api->release_memory
    +#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
    +#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
    +#define sqlite3_sleep                  sqlite3_api->sleep
    +#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
    +#define sqlite3_vfs_find               sqlite3_api->vfs_find
    +#define sqlite3_vfs_register           sqlite3_api->vfs_register
    +#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
    +#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
    +#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
    +#define sqlite3_result_error_code      sqlite3_api->result_error_code
    +#define sqlite3_test_control           sqlite3_api->test_control
    +#define sqlite3_randomness             sqlite3_api->randomness
    +#define sqlite3_context_db_handle      sqlite3_api->context_db_handle
    +#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes
    +#define sqlite3_limit                  sqlite3_api->limit
    +#define sqlite3_next_stmt              sqlite3_api->next_stmt
    +#define sqlite3_sql                    sqlite3_api->sql
    +#define sqlite3_status                 sqlite3_api->status
    +#endif /* SQLITE_CORE */
    +
    +#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;
    +#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;
    +
    +#endif /* _SQLITE3EXT_H_ */
    diff --git a/wt-3.1.7a/src/Wt/Dbo/collection b/wt-3.1.7a/src/Wt/Dbo/collection
    new file mode 100644
    index 0000000..2759c4c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/collection
    @@ -0,0 +1,350 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_COLLECTION_H_
    +#define WT_DBO_COLLECTION_H_
    +
    +#include <cstddef>
    +#include <iterator>
    +#include <set>
    +
    +#include <Wt/Dbo/ptr>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    struct DirectBinding;
    +    struct DynamicBinding;
    +    template <class Result, typename BindStrategy> class Query;
    +    class SqlStatement;
    +
    +  /*! \class collection Wt/Dbo/collection Wt/Dbo/collection
    +   *  \brief An STL container for iterating query results.
    +   *
    +   * This is an STL-compatible container that is backed by an SQL
    +   * query for fetching data.
    +   *
    +   * A %collection has two uses in Wt::Dbo:
    +   * - to iterate the results of a Query;
    +   * - to map the many-side of a Many-to-One or Many-to-Many relation.
    +   *
    +   * Its iterators implement the InputIterator requirements, meaning
    +   * you have to traverse the results from begin() to end() solely by
    +   * alternating between reading an element and incrementing the
    +   * iterator. When the collection represents the results of a Query,
    +   * you can only iterate the results just once: i.e. you can have
    +   * only one begin() call.
    +   *
    +   * The container is read only, unless it is being used as a member
    +   * of a dbo to manage a Many-to-Many relation. In that case, you may
    +   * also insert() and erase() may also be used.
    +   *
    +   * You will typically iterate the container results for local
    +   * processing, or copy the results into a standard STL container for
    +   * extended processing. Not only the weak guarantees of the
    +   * iterators make this useful, but also in the current
    +   * implementation of the library, all sql statements are
    +   * non-reentrant prepared statements (this limitation is likely to
    +   * be removed in the future): only one %collection, which is backed
    +   * by the same SQL statement may be used at once per session. Thus,
    +   * the following will fail:
    +   *
    +   * \code
    +   * void iterateChildren(Wt::Dbo::ptr<Comment> comment)
    +   * {
    +   *     typedef Wt::Dbo::collection<Wt::Dbo::ptr<Comment> > Comments;
    +   *     Comments children = comment->children;
    +   *
    +   *     for (Comments::const_iterator i = children.begin(); i != children.end(); ++i) {
    +   *        std::cerr << "Comment: " << i->text << std::endl;
    +   *        iterateChildren(*i); // Illegal since will result in nested use of the same query.
    +   *     }
    +   * }
    +   * \endcode
    +   *
    +   * If you cannot gaurantee that during its iteration the same query
    +   * will be reused, you should copy the results in a standard
    +   * container. Note that this is no big overhead since dbo pointers
    +   * are lightweight.
    +   *
    +   * \code
    +   * void iterateChildren(Wt::Dbo::ptr<Comment> comment)
    +   * {
    +   *     typedef std::vector<Wt::Dbo::ptr<Comment> > Comments;
    +   *
    +   *     Comments children(comment->children.begin(), comment->children.end()); // copy into an STL container, freeing the underlying query for reuse 
    +   *
    +   *     for (Comments::const_iterator i = children.begin(); i != children.end(); ++i) {
    +   *        std::cerr << "Comment: " << i->text << std::endl;
    +   *        iterateChildren(*i); // Okay now.
    +   *     }
    +   * }
    +   * \endcode
    +   *
    +   * Before iterating a %collection, the session is flushed. In this
    +   * way, the %collection will reflect any pending dirty changes.
    +   *
    +   * \ingroup dbo
    +   */
    +  template <class C>
    +  class collection
    +  {
    +    struct Activity {
    +      std::set<C> inserted, erased;
    +      std::set<C> transactionInserted, transactionErased;
    +    };
    +
    +  public:
    +    /*! \brief Value type.
    +     */
    +    typedef                   C value_type;
    +
    +    typedef          value_type key_type;
    +    typedef   const value_type& const_reference;
    +    typedef         std::size_t size_type;
    +    typedef      std::ptrdiff_t difference_type;
    +    typedef         value_type *pointer;
    +    typedef   const value_type *const_pointer;
    +
    +    class const_iterator;
    +
    +    /*! \brief Iterator.
    +     */
    +    class iterator : public std::iterator<std::input_iterator_tag, C>
    +    {
    +    public:
    +      /*! \brief Copy constructor.
    +       */
    +      iterator(const iterator& other);
    +
    +      /*! \brief Destructor.
    +       */
    +      ~iterator();
    +
    +      /*! \brief Assignment operator.
    +       */
    +      iterator& operator= (const iterator& other);
    +
    +      /*! \brief Dereference operator.
    +       */
    +      C& operator*();
    +
    +      /*! \brief Dereference operator.
    +       */
    +      C *operator->();
    +
    +      /*! \brief Comparison operator.
    +       *
    +       * Returns true if two iterators point to the same value in the
    +       * same %collection.
    +       */
    +      bool operator== (const iterator& other) const;
    +
    +      /*! \brief Comparison operator.
    +       */
    +      bool operator!= (const iterator& other) const;
    +
    +      /*! \brief Pre increment operator.
    +       */
    +      iterator& operator++ ();
    +
    +      /*! \brief Post increment operator.
    +       */
    +      iterator  operator++ (int);
    +
    +    private:
    +      struct shared_impl {
    +	const collection<C>& collection_;
    +	SqlStatement *statement_;
    +	value_type current_;
    +	int useCount_;
    +	bool ended_;
    +
    +	shared_impl(const collection<C>& collection, SqlStatement *statement);
    +	~shared_impl();
    +
    +	void fetchNextRow();
    +      };
    +
    +      shared_impl *impl_;
    +
    +      iterator();
    +      iterator(const collection<C>& collection, SqlStatement *statement);
    +
    +      void takeImpl();
    +      void releaseImpl();
    +
    +      friend class collection<C>;
    +      friend class const_iterator;
    +    };
    +
    +    /*! \brief Const Iterator.
    +     */
    +    class const_iterator : public std::iterator<std::input_iterator_tag, C>
    +    {
    +    public:
    +      /*! \brief Copy constructor.
    +       */
    +      const_iterator(const const_iterator& other);
    +
    +      /*! \brief Copy constructor.
    +       */
    +      const_iterator(const typename collection<C>::iterator& other);
    +
    +      /*! \brief Assignment operator.
    +       */
    +      const_iterator& operator= (const const_iterator& other);
    +
    +      /*! \brief Assignment operator.
    +       */
    +      const_iterator& operator= (const iterator& other);
    +
    +      /*! \brief Dereference operator.
    +       */
    +      const C& operator*();
    +
    +      /*! \brief Dereference operator.
    +       */
    +      const C *operator->();
    +
    +      /*! \brief Comparison operator.
    +       *
    +       * Returns true if two iterators point to the same value in the
    +       * same %collection.
    +       */
    +      bool operator== (const const_iterator& other) const;
    +
    +      /*! \brief Comparison operator.
    +       */
    +      bool operator!= (const const_iterator& other) const;
    +
    +       /*! \brief Pre increment operator.
    +       */
    +      const_iterator& operator++ ();
    +
    +      /*! \brief Post increment operator.
    +       */
    +      const_iterator  operator++ (int);
    +
    +    private:
    +      typename collection<C>::iterator impl_;
    +
    +      const_iterator();
    +      const_iterator(const collection<C>& collection, SqlStatement *statement);
    +
    +      friend class collection<C>;
    +    };
    +
    +    /*! \brief Default constructor.
    +     *
    +     * Constructs an empty %collection that is not bound to a database
    +     * session or query.
    +     */
    +    collection();
    +
    +    /*! \brief Destructor.
    +     */
    +    ~collection();
    +
    +    /*! \brief Returns an iterator to the begin of the %collection.
    +     */
    +    iterator begin();
    +
    +    /*! \brief Returns an iterator to the end of the %collection.
    +     */
    +    iterator end();
    +
    +    /*! \brief Returns a const iterator to the begin of the %collection.
    +     */
    +    const_iterator begin() const;
    +
    +    /*! \brief Returns a const iterator to the end of the %collection.
    +     */
    +    const_iterator end() const;
    +
    +    /*! \brief Returns the size.
    +     *
    +     * This will execute an SQL <tt>count(*)</tt> statement to fetch the
    +     * size of the %collection without fetching all results.
    +     *
    +     * If the %collection represents the result of a Query, the underlying
    +     * query is run only once, and its result is cached so that size() always
    +     * returns the same value.
    +     */
    +    size_type size() const;
    +
    +    /*! \brief Inserts an object.
    +     *
    +     * This is only useful for a %collection that implements one side
    +     * of a ManyToMany relation.
    +     */
    +    void insert(C c);
    +
    +    /*! \brief Removes an object.
    +     *
    +     * This is only useful for a %collection that implements one side
    +     * of a ManyToMany relation.
    +     */
    +    void erase(C c);
    +
    +    /*! \brief Returns the session to which this %collection is bound.
    +     */
    +    Session *session() const { return session_; }
    +
    +    /*! \brief Returns the query that backs the collection.
    +     *
    +     * Returns the query that backs the collection. This can be used to
    +     * search for a subset or to browse the results in a particular order.
    +     *
    +     * \note This only works for a collection that represents the many-side
    +     *       of a collection (i.e. for which hasMany() is called).
    +     */
    +    Query<C, DynamicBinding> find() const;
    +
    +  private:
    +    Session *session_;
    +    enum { QueryCollection, RelationCollection } type_;
    +
    +    // Structure for a relation query
    +    struct RelationData {
    +      const std::string *sql;
    +      MetaDboBase *dbo;
    +      Activity *activity; // only for ManyToMany collections
    +    };
    +
    +    struct QueryData {
    +      mutable SqlStatement *statement, *countStatement;
    +      mutable int size;
    +    };
    +
    +    union {
    +      QueryData query;
    +      RelationData relation;
    +    } data_;
    +
    +    friend class DboAction;
    +    friend class SessionAddAction;
    +    friend class LoadBaseAction;
    +    friend class SaveBaseAction;
    +    friend class TransactionDoneAction;
    +    template <class Result, typename BindStrategy> friend class Query;
    +
    +    collection(Session *session, SqlStatement *selectStatement,
    +	       SqlStatement *countStatement);
    +
    +    void setRelationData(Session *session, const std::string *sql,
    +			 MetaDboBase *dbo);
    +    Activity *activity() const { return data_.relation.activity; }
    +    void resetActivity();
    +
    +    SqlStatement *executeStatement() const;
    +
    +    void iterateDone() const;
    +  };
    +
    +  }
    +}
    +
    +#endif // WT_DBO_COLLECTION_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/collection_impl.h b/wt-3.1.7a/src/Wt/Dbo/collection_impl.h
    new file mode 100644
    index 0000000..6c72dfd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/collection_impl.h
    @@ -0,0 +1,464 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_COLLECTION_IMPL_H_
    +#define WT_DBO_COLLECTION_IMPL_H_
    +
    +#include <stdexcept>
    +
    +#include <Wt/Dbo/collection>
    +#include <Wt/Dbo/SqlStatement>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <class C>
    +collection<C>::iterator::iterator(const iterator& other)
    +  : impl_(other.impl_)
    +{ 
    +  if (impl_)
    +    ++impl_->useCount_;
    +}
    +
    +template <class C>
    +collection<C>::iterator::~iterator()
    +{
    +  releaseImpl();
    +}
    +
    +template <class C>
    +void collection<C>::iterator::releaseImpl()
    +{
    +  if (impl_) {
    +    --impl_->useCount_;
    +
    +    if (impl_->useCount_ == 0)
    +      delete impl_;
    +  }
    +}
    +
    +template <class C>
    +void collection<C>::iterator::takeImpl()
    +{
    +  if (impl_)
    +    ++impl_->useCount_;
    +}
    +
    +template <class C>
    +typename collection<C>::iterator&
    +collection<C>::iterator::operator= (const iterator& other)
    +{
    +  if (impl_ != other.impl_) {
    +    releaseImpl();
    +    impl_ = other.impl_;
    +    takeImpl();
    +  }
    +
    +  return *this;
    +}
    +
    +template <class C>
    +C&
    +collection<C>::iterator::operator* ()
    +{
    +  if (impl_ && !impl_->ended_)
    +    return impl_->current_;
    +  else
    +    throw std::runtime_error("set< ptr<C> >::operator* : read beyond end.");
    +}
    +
    +template <class C>
    +C *
    +collection<C>::iterator::operator-> ()
    +{
    +  if (impl_ && !impl_->ended_)
    +    return &impl_->current_;
    +  else
    +    return 0;
    +}
    +
    +
    +template <class C>
    +bool collection<C>::iterator::operator== (const iterator& other) const
    +{
    +  return impl_ == other.impl_
    +    || (!impl_ && other.impl_->ended_)
    +    || (impl_->ended_ && !other.impl_);
    +}
    +
    +template <class C>
    +bool collection<C>::iterator::operator!= (const iterator& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +template <class C>
    +typename collection<C>::iterator& collection<C>::iterator::operator++ ()
    +{
    +  if (impl_)
    +    impl_->fetchNextRow();
    +
    +  return *this;
    +}
    +
    +template <class C>
    +typename collection<C>::iterator collection<C>::iterator::operator++ (int)
    +{
    +  if (impl_)
    +    impl_->fetchNextRow();
    +
    +  return *this;
    +}
    +
    +template <class C>
    +collection<C>::iterator::
    +shared_impl::shared_impl(const collection<C>& collection,
    +			 SqlStatement *statement)
    +  : collection_(collection),
    +    statement_(statement),
    +    useCount_(0),
    +    ended_(false)
    +{
    +  fetchNextRow();
    +}
    +
    +template <class C>
    +collection<C>::iterator::shared_impl::~shared_impl()
    +{
    +  if (!ended_ && statement_) {
    +    statement_->done();
    +    collection_.iterateDone();
    +  }
    +}
    +
    +template <class C>
    +void collection<C>::iterator::shared_impl::fetchNextRow()
    +{
    +  if (ended_)
    +    throw std::runtime_error("set< ptr<C> >::operator++ : beyond end.");
    +
    +  if (!statement_ || !statement_->nextRow()) {
    +    ended_ = true;
    +    if (statement_) {
    +      statement_->done();
    +      collection_.iterateDone();
    +    }
    +  } else {
    +    int column = 0;
    +    current_
    +      = query_result_traits<C>::load(*collection_.session(), *statement_, column);
    +  }
    +}
    +
    +template <class C>
    +collection<C>::iterator::iterator()
    +  : impl_(0)
    +{ }
    +
    +template <class C>
    +collection<C>::iterator::iterator(const collection<C>& collection,
    +				  SqlStatement *statement)
    +{
    +  impl_ = new shared_impl(collection, statement);
    +  takeImpl();
    +}
    +
    +template <class C>
    +collection<C>::const_iterator::const_iterator(const const_iterator& other)
    +  : impl_(other.impl_)
    +{ }
    +
    +template <class C>
    +collection<C>::const_iterator::const_iterator(const typename collection<C>::iterator& other)
    +  : impl_(other)
    +{ }
    +
    +template <class C>
    +typename collection<C>::const_iterator&
    +collection<C>::const_iterator::operator= (const const_iterator& other)
    +{
    +  impl_ = other.impl_;
    +
    +  return *this;
    +}
    +
    +template <class C>
    +const C&
    +collection<C>::const_iterator::operator* ()
    +{
    +  return impl_.operator*();
    +}
    +
    +template <class C>
    +const C *
    +collection<C>::const_iterator::operator-> ()
    +{
    +  return impl_.operator->();
    +}
    +
    +template <class C>
    +bool collection<C>::const_iterator::operator== (const const_iterator& other)
    +  const
    +{
    +  return impl_ == other.impl_;
    +}
    +
    +template <class C>
    +bool collection<C>::const_iterator::operator!= (const const_iterator& other)
    +  const
    +{
    +  return impl_ != other.impl_;
    +}
    +
    +template <class C>
    +typename collection<C>::const_iterator&
    +collection<C>::const_iterator::operator++ ()
    +{
    +  ++impl_;
    +
    +  return *this;
    +}
    +
    +template <class C>
    +typename collection<C>::const_iterator
    +collection<C>::const_iterator::operator++ (int)
    +{
    +  impl_++;
    +
    +  return *this;
    +}
    +
    +template <class C>
    +collection<C>::const_iterator::const_iterator()
    +  : impl_()
    +{ }
    +
    +template <class C>
    +collection<C>::const_iterator::const_iterator(const collection<C>& collection,
    +					      SqlStatement *statement)
    +  : impl_(collection, statement)
    +{ }
    +
    +template <class C>
    +collection<C>::collection()
    +  : session_(0),
    +    type_(RelationCollection)
    +{
    +  data_.relation.sql = 0;
    +  data_.relation.dbo = 0;
    +  data_.relation.activity = 0;
    +}
    +
    +template <class C>
    +collection<C>::collection(Session *session, SqlStatement *statement,
    +			  SqlStatement *countStatement)
    +  : session_(session),
    +    type_(QueryCollection)
    +{
    +  data_.query.statement = statement;
    +  data_.query.countStatement = countStatement;
    +  data_.query.size = -1;
    +}
    +
    +template <class C>
    +collection<C>::~collection()
    +{
    +  if (type_ == RelationCollection)
    +    delete data_.relation.activity;
    +  else {
    +    if (data_.query.statement)
    +      data_.query.statement->done();      
    +    if (data_.query.countStatement)
    +      data_.query.countStatement->done();
    +  }
    +}
    +
    +template <class C>
    +void collection<C>::iterateDone() const
    +{
    +  if (type_ == QueryCollection)
    +    data_.query.statement = 0;
    +}
    +
    +template <class C>
    +SqlStatement *collection<C>::executeStatement() const
    +{
    +  SqlStatement *statement = 0;
    +
    +  if (session_)
    +    session_->flush();
    +
    +  if (type_ == QueryCollection)
    +    statement = data_.query.statement;
    +  else {
    +    if (data_.relation.sql) {
    +      statement = session_->getOrPrepareStatement(*data_.relation.sql);
    +      int column = 0;
    +      data_.relation.dbo->bindId(statement, column);
    +    }
    +  }
    +
    +  if (statement)
    +    statement->execute();
    +
    +  return statement;
    +}
    +
    +template <class C>
    +typename collection<C>::iterator collection<C>::begin()
    +{
    +  return iterator(*this, executeStatement());
    +}
    +
    +template <class C>
    +typename collection<C>::iterator collection<C>::end()
    +{
    +  return iterator();
    +}
    +
    +template <class C>
    +typename collection<C>::const_iterator collection<C>::begin() const
    +{
    +  return const_iterator(*this, executeStatement());
    +}
    +
    +template <class C>
    +typename collection<C>::const_iterator collection<C>::end() const
    +{
    +  return const_iterator();
    +}
    +
    +template <class C>
    +typename collection<C>::size_type collection<C>::size() const
    +{
    +  if (type_ == QueryCollection && data_.query.size != -1)
    +    return data_.query.size;
    +
    +  SqlStatement *countStatement = 0;
    +
    +  if (session_)
    +    session_->flush();
    +
    +  if (type_ == QueryCollection)
    +    countStatement = data_.query.countStatement;
    +  else {
    +    if (data_.relation.sql) {
    +      const std::string *sql = data_.relation.sql;
    +      std::size_t f = Impl::ifind(*sql, " from ");
    +      std::string countSql = "select count(1)" + sql->substr(f);
    +
    +      countStatement = session_->getOrPrepareStatement(countSql);
    +      int column = 0;
    +      data_.relation.dbo->bindId(countStatement, column);
    +    }
    +  }
    +
    +  if (countStatement) {
    +    ScopedStatementUse use(countStatement);
    +
    +    countStatement->execute();
    +
    +    if (!countStatement->nextRow())
    +      throw std::runtime_error("collection<C>::size(): no result?");
    +
    +    int result;
    +    if (!countStatement->getResult(0, &result))
    +      throw std::runtime_error("collection<C>::size(): null?");
    +    
    +    if (countStatement->nextRow())
    +      throw std::runtime_error("collection<C>::size(): multiple results?");
    +
    +    if (type_ == QueryCollection) {
    +      data_.query.size = result;
    +      data_.query.countStatement = 0;
    +    }
    +
    +    return result;
    +  } else
    +    return 0;
    +}
    +
    +template <class C>
    +Query<C, DynamicBinding> collection<C>::find() const
    +{
    +  if (type_ != RelationCollection)
    +    throw std::runtime_error("collection<C>::find() "
    +			     "only for a many-side relation collection.");
    +
    +  if (session_ && data_.relation.sql) {
    +    const std::string *sql = data_.relation.sql;
    +    std::size_t f = Impl::ifind(*sql, " from ");
    +    std::size_t w = Impl::ifind(*sql, " where ");
    +    std::string tableName = sql->substr(f + 7, w - f - 8);
    +
    +    Query<C, DynamicBinding> result = Query<C, DynamicBinding>
    +      (*session_, tableName, "").where(sql->substr(w + 7));
    +
    +    data_.relation.dbo->bindId(result.parameters_);
    +
    +    return result;
    +  } else
    +    return Query<C, DynamicBinding>();
    +}
    +
    +template <class C>
    +void collection<C>::insert(C c)
    +{
    +  if (type_ != RelationCollection)
    +    throw std::runtime_error("collection<C>::insert() "
    +			     "only for a ManyToMany relation.");
    +
    +  RelationData& relation = data_.relation;
    +  if (!relation.activity)
    +    relation.activity = new Activity();
    +
    +  bool wasJustErased = relation.activity->erased.erase(c) > 0;
    +  relation.activity->transactionErased.erase(c);
    +
    +  if (!wasJustErased && !relation.activity->transactionInserted.count(c))
    +    relation.activity->inserted.insert(c);
    +}
    +
    +template <class C>
    +void collection<C>::erase(C c)
    +{
    +  if (type_ != RelationCollection)
    +    throw std::runtime_error("collection<C>::erase() "
    +			     "only for a ManyToMany relation.");
    +  RelationData& relation = data_.relation;
    +  if (!relation.activity)
    +    relation.activity = new Activity();
    +
    +  bool wasJustInserted = relation.activity->inserted.erase(c) > 0;
    +  relation.activity->transactionInserted.erase(c);
    +
    +  if (!wasJustInserted && !relation.activity->transactionErased.count(c))
    +    relation.activity->erased.insert(c);
    +}
    +
    +template <class C>
    +void collection<C>::resetActivity()
    +{
    +  RelationData& relation = data_.relation;
    +  delete relation.activity;
    +  relation.activity = 0;
    +}
    +
    +template <class C>
    +void collection<C>::setRelationData(Session *session,
    +				    const std::string *sql,
    +				    MetaDboBase *dbo)
    +{
    +  session_ = session;
    +
    +  data_.relation.sql = sql;
    +  data_.relation.dbo = dbo;
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_COLLECTION_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/ptr b/wt-3.1.7a/src/Wt/Dbo/ptr
    new file mode 100644
    index 0000000..13839ec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/ptr
    @@ -0,0 +1,666 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_DBO_PTR_H_
    +#define WT_DBO_DBO_PTR_H_
    +
    +#include <string>
    +#include <Wt/Dbo/SqlTraits>
    +
    +#include <boost/utility/enable_if.hpp>
    +#include <boost/type_traits/is_base_of.hpp>
    +
    +namespace Wt {
    +
    +  /*! \brief Namespace for the \ref dbo
    +   */
    +  namespace Dbo {
    +
    +
    +class Session;
    +class SqlStatement;
    +class SaveBaseAction;
    +
    +
    +namespace Impl {
    +
    +  extern WTDBO_API std::size_t ifind(const std::string& s, const std::string& needle);
    +
    +  struct WTDBO_API ParameterBase {
    +    virtual ~ParameterBase();
    +    virtual ParameterBase *clone() const = 0;
    +    virtual void bind(SaveBaseAction& binder) = 0;
    +  };
    +
    +  template <typename T>
    +  struct Parameter : ParameterBase {
    +    Parameter(const T& v) : v_(v) { }
    +
    +    virtual Parameter<T> *clone() const;
    +    virtual void bind(SaveBaseAction& binder);
    +
    +  private:
    +    T v_;
    +  };
    +
    +  template<int N>
    +  struct Parameter<const char [N]> : Parameter<const char *> 
    +  {
    +    Parameter(char const *v) : Parameter<const char *>(v) { }
    +  };
    +  template<int N>
    +  struct Parameter<char [N]> : Parameter<const char *> 
    +  {
    +    Parameter(char const *v) : Parameter<const char *>(v) { }
    +  };
    +  
    +} // namespace Impl
    +
    +class WTDBO_API MetaDboBase
    +{
    +public:
    +  enum State {
    +    // dbo state (also works with bitwise or)
    +    New = 0x000,
    +    Persisted = 0x001,
    +    Orphaned = 0x002,
    +
    +    // flags
    +    NeedsDelete = 0x010,
    +    NeedsSave = 0x020,
    +
    +    DeletedInTransaction = 0x100,
    +    SavedInTransaction = 0x200,
    +
    +    TransactionState = (SavedInTransaction | DeletedInTransaction)
    +  };
    +
    +  MetaDboBase(int version, int state, Session *session)
    +    : session_(session), version_(version), state_(state), refCount_(0)
    +  { }
    +
    +  virtual ~MetaDboBase();
    +
    +  virtual void flush() = 0;
    +  virtual void bindId(SqlStatement *statement, int& column) = 0;
    +  virtual void bindId(std::vector<Impl::ParameterBase *>& parameters) = 0;
    +  virtual void setAutogeneratedId(long long id) = 0;
    +
    +  void setVersion(int version) { version_ = version; }
    +  int version() const { return version_; }
    +
    +  void setSession(Session *session) { session_ = session; }
    +  Session *session() { return session_; }
    +
    +  /*
    +   * Returns whether the object was not in the database prior
    +   * to the current transaction.
    +   */
    +  bool isNew() const { return 0 == (state_ & Persisted); }
    +  bool isPersisted() const
    +    { return 0 != (state_ & (Persisted | SavedInTransaction)); }
    +  bool isOrphaned() const { return 0 != (state_ & Orphaned); }
    +  bool isDeleted() const
    +    { return 0 != (state_ & (NeedsDelete | DeletedInTransaction)); }
    +
    +  bool isDirty() const { return 0 != (state_ & NeedsSave); }
    +  bool inTransaction() const { return 0 != (state_ & 0xF00); }
    +
    +  bool savedInTransaction() const
    +    { return 0 != (state_ & SavedInTransaction); }
    +  bool deletedInTransaction() const
    +    { return 0 != (state_ & DeletedInTransaction); }
    +
    +  void setState(State state);
    +
    +  void setDirty();
    +  void remove();
    +
    +  void setTransactionState(State state);
    +  void resetTransactionState();
    +
    +  void incRef();
    +  void decRef();
    +
    +private:
    +  Session *session_;
    +  int version_;
    +
    +protected:
    +  int state_;
    +  int refCount_;
    +
    +  void checkNotOrphaned();
    +};
    +
    +/*! \class dbo_default_traits Wt/Dbo/Dbo Wt/Dbo/Dbo
    + *  \brief Default traits for a class mapped with %Wt::%Dbo.
    + * 
    + * This class provides the default traits. It is convenient (and
    + * future proof) to inherit these default traits when customizing the
    + * traits for one particular class.
    +*
    + * \ingroup dbo
    + */
    +struct dbo_default_traits 
    +{
    +  /*! \brief Type of the primary key.
    +   *
    +   * The default corresponds to a surrogate key, which is <tt>long
    +   * long</tt>.
    +   */
    +  typedef long long IdType;
    +
    +  /*! \brief Returns the sentinel value for a \c null id.
    +   *
    +   * The default implementation returns -1.
    +   */
    +  static IdType invalidId() { return -1; }
    +
    +  /*! \brief Returns the database field name for the surrogate primary key.
    +   *
    +   * The default surrogate id database field name is <tt>"id"</tt>.
    +   */
    +  static const char *surrogateIdField() { return "id"; }
    +
    +  /*! \brief Configures the optimistic concurrency version field.
    +   *
    +   * By default, optimistic concurrency locking is enabled using a
    +   * <tt>"version"</tt> field.
    +   */
    +  static const char *versionField() { return "version"; }
    +};
    +
    +/*! \class dbo_traits Wt/Dbo/Dbo Wt/Dbo/Dbo
    + *  \brief Traits for a class mapped with %Wt::%Dbo.
    + *
    + * The traits class provides some of the mapping properties related to
    + * the primary key and optimistic concurrency locking using a version
    + * field.
    + *
    + * See dbo_default_traits for default values.
    + *
    + * The following example changes the surrogate id field name for a
    + * class <tt>Foo</tt> from the default <tt>"id"</tt> to
    + * <tt>"foo_id"</tt>:
    + *
    + * \code
    + * namespace Wt {
    + *   namespace Dbo {
    + *
    + *     template<>
    + *     struct dbo_traits<Foo>
    + *     {
    + *        static const char *surrogateIdField() { return "foo_id"; }
    + *     };
    + *   }
    + * }
    + * \endcode
    + *
    + * \ingroup dbo
    +*/
    +template <class C>
    +struct dbo_traits : public dbo_default_traits
    +{
    +#ifdef DOXYGEN_ONLY
    +  /*! \brief Type of the primary key.
    +   *
    +   * This indicates the type of the primary key, which needs to be
    +   * <tt>long long</tt> for a surrogate id, but can be any type
    +   * supported by Wt::Dbo::field() (including composite types) for a
    +   * natural primary key.
    +   *
    +   * The following operations need to be supported for an id value:
    +   *
    +   *  - <i>default constructor</i>
    +   *  - <i>copy constructor</i>
    +   *  - serialization to a string (for formatting an error message in exceptions)
    +   *    : <tt>std::ostream << id</tt>
    +   *  - comparison operator (for use as a key in a std::map): <tt>id == id</tt>
    +   *  - less than operator (for use as a key in a std::map): <tt>id < id</tt>
    +   *
    +   * Only the default <tt>long long</tt> is supported for an
    +   * auto-incrementing surrogate primary key. You need to change the
    +   * default key type typically in conjuction with specifying a natural id,
    +   * see Wt::Dbo::id().
    +   *
    +   * The following example illustrates how to prepare a type to be
    +   * usable as a composite id type:
    +   *
    +   * \code
    +   * struct Coordinate {
    +   *   int x, y;
    +   *
    +   *   Coordinate()
    +   *     : x(-1), y(-1) { }
    +   *
    +   *   bool operator== (const Coordinate& other) const {
    +   *     return x == other.x && y == other.y;
    +   *   }
    +   *
    +   *   bool operator< (const Coordinate& other) const {
    +   *     if (x < other.x)
    +   *       return true;
    +   *     else if (x == other.x)
    +   *       return y < other.y;
    +   *     else
    +   *       return false;
    +   *   }
    +   * };
    +   * 
    +   * std::ostream& operator<< (std::ostream& o, const Coordinate& c)
    +   * {
    +   *   return o << "(" << c.x << ", " << c.y << ")";
    +   * }
    +   * 
    +   * namespace Wt {
    +   *   namespace Dbo {
    +   * 
    +   *     template <class Action>
    +   *     void field(Action& action, Coordinate& coordinate, const std::string& name, int size = -1)
    +   *     {
    +   *       field(action, coordinate.x, name + "_x");
    +   *       field(action, coordinate.y, name + "_y");
    +   *     }
    +   *   }
    +   * }
    +   * \endcode
    +   */
    +  typedef YourIdType IdType;
    +
    +  /*! \brief Returns the sentinel value for a \c null id.
    +   *
    +   * When used as a foreign key, this value is used to represent a \c
    +   * null value.
    +   */
    +  static IdType invalidId();
    +
    +  /*! \brief Configures the surrogate primary key field.
    +   *
    +   * Returns the field name which is the surrogate primary key,
    +   * corresponding to the object's id.
    +   *
    +   * You can disable this auto-incrementing surrogate id by returning
    +   * \c 0 instead. In that case you will need to define a natural id
    +   * for your class using Wt::Dbo::id().
    +   */
    +  static const char *surrogateIdField();
    +
    +  /*! \brief Configures the optimistic concurrency version field.
    +   *
    +   * Optimistic concurrency locking is used to detect concurrent
    +   * updates by an object from multiple sessions. On each update, the
    +   * version of a record is at the same time checked (to see if it
    +   * matches the version of the record that was read), and
    +   * incremented. A StaleObjectException is thrown if a record was
    +   * modified by another session since it was read.
    +   *
    +   * This method must return the database field name used for this
    +   * version field.
    +   *
    +   * You can disable optimistic locking using a version field all
    +   * together for your class by returning \c 0 instead.
    +   */
    +  static const char *versionField();
    +#endif // DOXYGEN_ONLY
    +};
    +
    +/*
    +  Manages a single object.
    + */
    +template <class C>
    +class MetaDbo : public MetaDboBase
    +{
    +public:
    +  typedef typename dbo_traits<C>::IdType IdType;
    +
    +  MetaDbo(C *obj);
    +  virtual ~MetaDbo();
    +
    +  virtual void flush();
    +  virtual void bindId(SqlStatement *statement, int& column);
    +  virtual void bindId(std::vector<Impl::ParameterBase *>& parameters);
    +  virtual void setAutogeneratedId(long long id);
    +
    +  void purge();
    +  void reread();
    +  void transactionDone(bool success);
    +
    +  C *obj();
    +  void setObj(C *obj);
    +
    +  void setId(const IdType& id) { id_ = id; }
    +  IdType id() const { return id_; }
    +
    +private:
    +  C     *obj_;
    +  IdType id_;
    +
    +  MetaDbo(const IdType& idType, int version, int state, Session& session,
    +	  C *obj);
    +
    +  void doLoad();
    +  void prune();
    +
    +  friend class Session;
    +};
    +
    +template <class C, class Enable = void>
    +struct DboHelper
    +{
    +  static void setMeta(C& c, MetaDboBase *m) { }
    +};
    +
    +/*! \class Dbo Wt/Dbo/Dbo Wt/Dbo/Dbo
    + *  \brief A base class for database objects.
    + *
    + * The only requirement for a class to be be persisted is to have a \c
    + * persist() method. In some cases however, it may be convenient to be
    + * able to access database information of an object, such as its
    + * database id and its session, from the object itself.
    + *
    + * By deriving your database class directly or indirectly from this
    + * class, you can have access to its id() and session(). This will increase
    + * the size of your object with one pointer.
    + *
    + * The following example shows a skeleton for a database object
    + * which has access to its own id and session information:
    + *
    + * \code
    + * class Cat : public Wt::Dbo::Dbo {
    + * public:
    + *   template <class Action>
    + *   void persist(Action& a) { }
    + * };
    + * \endcode
    + *
    + * Compare this to the skeleton for a minimum valid database class:
    + *
    + * \code
    + * class Cat {
    + * public:
    + *   template <class Action>
    + *   void persist(Action& a) { }
    + * };
    + * \endcode
    + *
    + * \ingroup dbo
    + */
    +template <class C>
    +class Dbo
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  Dbo();
    +
    +  /*! \brief Returns the database id.
    +   *
    +   * Returns the database id of this object, or
    +   * Wt::Dbo::dbo_traits<C>::invalidId() if the object is associated
    +   * with a session or not yet stored in the database.
    +   */
    +  typename dbo_traits<C>::IdType id() const;
    +
    +  /*! \brief Returns the session.
    +   *
    +   * Returns the session to which this object belongs, or 0 if the object
    +   * is not associated with a session.
    +   */
    +  Session *session() const;
    +
    +private:
    +  MetaDbo<C> *meta_;
    +
    +  template <class D, class Enable> friend struct DboHelper;
    +};
    +
    +template <class C>
    +struct DboHelper<C, typename boost::enable_if<boost::is_base_of<Dbo<C>, C> >::type>
    +{
    +  static void setMeta(C& obj, MetaDbo<C> *m) { obj.meta_ = m; }
    +};
    +
    +class WTDBO_API ptr_base
    +{
    +public:
    +  ptr_base() { }
    +  virtual ~ptr_base();
    +
    +  virtual void transactionDone(bool success) = 0;
    +};
    +
    +/*! \defgroup dbo Database Objects (Dbo)
    + *  \brief An implemenation of an Object Relational Mapping layer.
    + *
    + * For an introduction, see the <a
    + * href="../../tutorial/dbo/tutorial.html">tutorial</a>.
    + */
    +
    +/*! \class ptr Wt/Dbo/ptr Wt/Dbo/ptr
    + *  \brief A smart pointer for database objects.
    + *
    + * This smart pointer class implements a reference counted shared
    + * pointer for database objects, which also keeps tracking of
    + * synchronization between the in-memory copy and the database
    + * copy. You should always use this pointer class to reference a database
    + * object.
    + *
    + * Unlike typical C++ data structures, classes mapped to database
    + * tables do not have clear ownership relationships. Therefore, the
    + * conventional ownership-based memory allocation/deallocation does
    + * not work naturally for database classes.
    + *
    + * A pointer may point to a <i>transient</i> object or a
    + * <i>persisted</i> object. A persisted object has a corresponding
    + * copy in the database while a transient object is only present in
    + * memory. To persist a new object, use Session::add(). To make a
    + * persisted object transient, use remove().
    + *
    + * Unlike a typical smart pointer, this pointer only allows read
    + * access to the underlying object by default. To modify the object,
    + * you should explicitly use modify(). This is used to mark the
    + * underyling object as <i>dirty</i> to add it to the queue of objects
    + * to be synchronized with the database.
    + *
    + * The pointer class provides a number of methods to deal with the
    + * persistence state of the object:
    + * - id(): returns the database id
    + * - flush(): forces the object to be synchronized to the database
    + * - remove(): deletes the object in the underlying database
    + * - reread(): rereads the database copy of the object
    + * - purge(): purges the transient version of a non-dirty object.
    + *
    + * \ingroup dbo
    + */
    +template <class C>
    +class ptr : public ptr_base
    +{
    +public:
    +  typedef C pointed;
    +
    +  /*! \brief Creates a new pointer.
    +   *
    +   * When \p obj is not 0, the pointer points to the new unpersisted
    +   * object. Use Session::add() to persist the newly created object.
    +   */
    +  ptr(C *obj = 0);
    +
    +  /*! \brief Copy constructor.
    +   */
    +  ptr(const ptr<C>& other);
    +
    +  /*! \brief Destructor.
    +   *
    +   * This method will delete the transient copy of the database object if
    +   * it is not referenced by any other pointer.
    +   */
    +  virtual ~ptr();
    +
    +  /*! \brief Resets the pointer.
    +   *
    +   * This is equivalent to:
    +   * \code
    +   * p = ptr<C>(obj);
    +   * \endcode
    +   */
    +  void reset(C *obj = 0);
    +
    +  /*! \brief Assignment operator.
    +   */
    +  ptr<C>& operator= (const ptr<C>& other);
    +
    +  /*! \brief Dereference operator.
    +   *
    +   * Note that this operator returns a const copy of the referenced
    +   * object. Use modify() to get a non-const reference.
    +   *
    +   * Since this may lazy-load the underlying database object, you
    +   * should have an active transaction.
    +   */
    +  const C *operator->() const;
    +
    +  /*! \brief Dereference operator.
    +   *
    +   * Note that this operator returns a const copy of the referenced
    +   * object. Use modify() to get a non-const reference.
    +   *
    +   * Since this may lazy-load the underlying database object, you
    +   * should have an active transaction.
    +   */
    +  const C& operator*() const;
    +
    +  /*! \brief Dereference operator, for writing.
    +   *
    +   * Returns the underlying object with the intention to modify it. It
    +   * marks the underlying object as dirty.
    +   *
    +   * Since this may lazy-load the underlying database object, you
    +   * should have an active transaction.
    +   */
    +  C *modify() const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Two pointers are equal if and only if they reference the same
    +   * databse object.
    +   */
    +  bool operator== (const ptr<C>& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * This operator is implemented to be able to store pointers in
    +   * std::set or std::map containers.
    +   */
    +  bool operator< (const ptr<C>& other) const;
    +
    +  /*! \brief Checks for null.
    +   *
    +   * Returns true if the pointer is pointing to a non-null object.
    +   */
    +  operator bool() const;
    +
    +  /*! \brief Flushes the object.
    +   *
    +   * If dirty, the object is synchronized to the database. This will
    +   * automatically also flush objects that are referenced by this
    +   * object if needed. The object is not actually committed to the
    +   * database before the active transaction has been committed.
    +   *
    +   * Since this may persist object to the database, you should have an
    +   * active transaction.
    +   */
    +  void flush() const;
    +
    +  /*! \brief Removes an object from the database.
    +   *
    +   * The object is removed from the database, and becomes transient again.
    +   *
    +   * Note that the object is not deleted in memory: you can still
    +   * continue to read and modify the object, but there will no longer
    +   * be a database copy of the object, and the object will effectively
    +   * be treated as a new object (which may be re-added to the database
    +   * at a later point).
    +   *
    +   * This is the opposite operation of Session::add().
    +   */
    +  void remove();
    +
    +  /*! \brief Rereads the database version.
    +   *
    +   * Rereads a persisted object from the database, discarding any
    +   * possible changes and updating to the latest database version.
    +   *
    +   * This does not actually load the database version, since loading is
    +   * lazy.
    +   */
    +  void reread();
    +
    +  /*! \brief Purges an object from memory.
    +   *
    +   * When the object is not dirty, the memory copy of the object is deleted,
    +   * and the object will be reread from the database on the next access.
    +   *
    +   * Purging an object can be useful to conserve memory, but you should never
    +   * purge an object while the user is editing if you wish to rely on the
    +   * optimistick locking for detecting concurrent modifications.
    +   */
    +  void purge();
    +
    +  /*! \brief Returns the object id.
    +   *
    +   * This returns dbo_traits<C>::invalidId() for a transient object.
    +   */
    +  typename dbo_traits<C>::IdType id() const;
    +
    +  /*! \brief Returns the object version.
    +   *
    +   * This returns -1 for a transient object or when versioning is not
    +   * enabled.
    +   */
    +  int version() const;
    +
    +protected:
    +  MetaDbo<C> *obj() const { return obj_; }
    +
    +private:
    +  MetaDbo<C> *obj_;
    +
    +  ptr(MetaDbo<C> *obj);
    +
    +  void takeObj();
    +  void freeObj();
    +
    +  virtual void transactionDone(bool success);
    +  
    +  friend class Session;
    +  friend class SaveBaseAction;
    +  friend class ToAnysAction;
    +  friend class FromAnyAction;
    +};
    +
    +template <class C>
    +struct query_result_traits< ptr<C> >
    +{
    +  static void getFields(Session& session,
    +			std::vector<std::string> *aliases,
    +			std::vector<FieldInfo>& result);
    +
    +  static ptr<C> load(Session& session, SqlStatement& statement,
    +		     int& column);
    +
    +  static void getValues(const ptr<C>& ptr, std::vector<boost::any>& values);
    +  static void setValue(const ptr<C>& ptr, int& index, const boost::any& value);
    +
    +  static ptr<C> create();
    +  static void add(Session& session, ptr<C>& ptr);
    +  static void remove(ptr<C>& ptr);
    +};
    +
    +  }
    +}
    +
    +#endif // WT_DBO_DBO_PTR_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/ptr.C b/wt-3.1.7a/src/Wt/Dbo/ptr.C
    new file mode 100644
    index 0000000..c076073
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/ptr.C
    @@ -0,0 +1,92 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/Dbo/ptr>
    +#include <Wt/Dbo/Session>
    +#include <iostream>
    +#include <stdexcept>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +MetaDboBase::~MetaDboBase()
    +{ }
    +
    +void MetaDboBase::incRef()
    +{
    +  ++refCount_;
    +}
    +
    +void MetaDboBase::decRef()
    +{
    +  --refCount_;
    +
    +  if (refCount_ == 0)
    +    delete this;
    +}
    +
    +void MetaDboBase::setState(State state)
    +{
    +  state_ &= ~0xF;
    +  state_ |= state;
    +}
    +
    +void MetaDboBase::setDirty()
    +{
    +  checkNotOrphaned();
    +  if (isDeleted()) {
    +    return;
    +  }
    +
    +  if (!isDirty()) {
    +    state_ |= NeedsSave;
    +    if (session_)
    +      session_->needsFlush(this);
    +  }
    +}
    +
    +void MetaDboBase::remove()
    +{
    +  checkNotOrphaned();
    +
    +  if (isDeleted()) {
    +    // is already removed or being removed in this transaction
    +  } else if (isPersisted()) {
    +    state_ |= NeedsDelete;
    +    session_->needsFlush(this);
    +  } else if (session_) { // was added to a Session but not yet flushed
    +    Session *session = session_;
    +    setSession(0);
    +    session->discardChanges(this);
    +    state_ &= ~NeedsSave;
    +  } else {
    +    // is not yet added to the Session
    +  }
    +}
    +
    +void MetaDboBase::setTransactionState(State state)
    +{
    +  state_ |= state;
    +}
    +
    +void MetaDboBase::resetTransactionState()
    +{
    +  state_ &= ~TransactionState;
    +}
    +
    +void MetaDboBase::checkNotOrphaned()
    +{
    +  if (isOrphaned()) {
    +    throw std::logic_error("using orphaned dbo ptr");
    +  }
    +}
    +
    +ptr_base::~ptr_base()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Dbo/ptr_impl.h b/wt-3.1.7a/src/Wt/Dbo/ptr_impl.h
    new file mode 100644
    index 0000000..7addf95
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/ptr_impl.h
    @@ -0,0 +1,462 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_DBO_PTR_IMPL_H_
    +#define WT_DBO_DBO_PTR_IMPL_H_
    +
    +#include <stdexcept>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    namespace Impl {
    +
    +      template <class C, typename T>
    +      void setAutogeneratedId(MetaDbo<C>& dbo, const T& currentId,
    +			      long long id) { }
    +
    +      template <class C>
    +      void setAutogeneratedId(MetaDbo<C>& dbo, const long long& currentId,
    +			      long long id) {
    +	dbo.setId(id);
    +      }
    +    }
    +
    +template <class C>
    +MetaDbo<C>::~MetaDbo()
    +{
    +  if (refCount_)
    +    throw std::logic_error("Dbo: refCount > 0");
    +
    +  if ((!isOrphaned()) && session())
    +    session()->prune(this);
    +
    +  delete obj_;
    +}
    +
    +template <class C>
    +void MetaDbo<C>::flush()
    +{
    +  checkNotOrphaned();
    +  if (state_ & NeedsDelete) {
    +    state_ &= ~NeedsDelete;
    +
    +    try {
    +      session()->implDelete(*this);
    +      setTransactionState(DeletedInTransaction);
    +    } catch (...) {
    +      setTransactionState(DeletedInTransaction);
    +      throw;
    +    }
    +
    +  } else if (state_ & NeedsSave) {
    +    state_ &= ~NeedsSave;
    +
    +    try {
    +      session()->implSave(*this);
    +      setTransactionState(SavedInTransaction);
    +    } catch (...) {
    +      setTransactionState(SavedInTransaction);
    +      throw;
    +    }
    +  }
    +}
    +
    +template <class C>
    +void MetaDbo<C>::bindId(SqlStatement *statement, int& column)
    +{
    +  Session::MappingInfo *mapping = session()->template getMapping<C>();
    +
    +  SaveBaseAction action(*this, *mapping, statement, column);
    +
    +  field(action, id_,
    +	mapping->naturalIdFieldName, mapping->naturalIdFieldSize);
    +
    +  column = action.column();
    +}
    +
    +template <class C>
    +void MetaDbo<C>::bindId(std::vector<Impl::ParameterBase *>& parameters)
    +{
    +  parameters.push_back(new Impl::Parameter<typename dbo_traits<C>::IdType>(id_));
    +}
    +
    +template <class C>
    +void MetaDbo<C>::prune()
    +{
    +  checkNotOrphaned();
    +  session()->prune(this);
    +  setId(dbo_traits<C>::invalidId());
    +  setVersion(-1);
    +  setState(New);
    +}
    +
    +template <class C>
    +void MetaDbo<C>::transactionDone(bool success)
    +{
    +  Session *s = session();
    +
    +  if (success) {
    +    if (deletedInTransaction()) {
    +      prune();
    +      setSession(0);
    +    } else if (savedInTransaction()) {
    +      setVersion(version() + 1);
    +      setState(Persisted);
    +    } 
    +  } else {
    +    if (deletedInTransaction()) {
    +      state_ |= NeedsDelete;
    +      session()->needsFlush(this);
    +    } else if (savedInTransaction()) {
    +      if (isNew()) {
    +	prune();
    +      } else {
    +	/*
    +	 * If we support changing the Id, then we need to restore the old
    +	 * Id here.
    +	 */
    +	state_ |= NeedsSave;
    +	session()->needsFlush(this);
    +      }
    +    }
    +  }
    +
    +  if (obj_)
    +    s->implTransactionDone(*this, success);
    +
    +  resetTransactionState();
    +}
    +
    +template <class C>
    +void MetaDbo<C>::purge()
    +{
    +  checkNotOrphaned();
    +  if (isPersisted() && !isDirty() && !inTransaction()) {
    +    delete obj_;
    +    obj_ = 0;
    +    setVersion(-1);
    +  }
    +}
    +
    +template <class C>
    +void MetaDbo<C>::reread()
    +{
    +  checkNotOrphaned();
    +  if (isPersisted()) {
    +    session()->discardChanges(this);
    +
    +    delete obj_;
    +    obj_ = 0;
    +    setVersion(-1);
    +
    +    state_ = Persisted;
    +  }
    +}
    +
    +template <class C>
    +void MetaDbo<C>::setObj(C *obj)
    +{
    +  checkNotOrphaned();
    +  obj_ = obj;
    +  DboHelper<C>::setMeta(*obj, this);
    +}
    +
    +template <class C>
    +C *MetaDbo<C>::obj()
    +{
    +  checkNotOrphaned();
    +  if (!obj_ && !isDeleted())
    +    doLoad();
    +
    +  return obj_;
    +}
    +
    +template <class C>
    +MetaDbo<C>::MetaDbo(C *obj)
    +  : MetaDboBase(-1, New | NeedsSave, 0),
    +    obj_(obj),
    +    id_(dbo_traits<C>::invalidId())
    +{ 
    +  DboHelper<C>::setMeta(*obj_, this);
    +}
    +
    +template <class C>
    +MetaDbo<C>::MetaDbo(const IdType& id, int version, int state,
    +		    Session& session, C *obj)
    +  : MetaDboBase(version, state, &session),
    +    obj_(obj),
    +    id_(id)
    +{
    +  if (obj_)
    +    DboHelper<C>::setMeta(*obj_, this);
    +}
    +
    +template <class C>
    +void MetaDbo<C>::setAutogeneratedId(long long id)
    +{
    +  Impl::setAutogeneratedId(*this, id_, id);
    +}
    +
    +template <class C>
    +void MetaDbo<C>::doLoad()
    +{
    +  int column = 0;
    +  session()->template implLoad<C>(*this, 0, column);
    +  DboHelper<C>::setMeta(*obj_, this);
    +}
    +
    +template <class C>
    +ptr<C>::ptr(C *obj)
    +  : obj_(0)
    +{
    +  if (obj) {
    +    obj_ = new MetaDbo<C>(obj);
    +    takeObj();
    +  }
    +}
    +
    +template <class C>
    +ptr<C>::ptr(const ptr<C>& other)
    +  : obj_(other.obj_)
    +{
    +  takeObj();
    +}
    +
    +template <class C>
    +ptr<C>::~ptr()
    +{
    +  freeObj();
    +}
    +
    +template <class C>
    +void ptr<C>::reset(C *obj)
    +{
    +  freeObj();
    +  obj_ = new MetaDbo<C>(obj);
    +  takeObj();
    +}
    +
    +template <class C>
    +ptr<C>& ptr<C>::operator= (const ptr<C>& other)
    +{
    +  if (obj_ != other.obj_) {
    +    freeObj();
    +    obj_ = other.obj_;
    +    takeObj();
    +  }
    +
    +  return *this;
    +}
    +
    +template <class C>
    +const C *ptr<C>::operator->() const
    +{
    +  if (obj_)
    +    return obj_->obj();
    +  else
    +    return 0;
    +}
    +
    +template <class C>
    +const C& ptr<C>::operator*() const
    +{
    +  if (obj_)
    +    return *obj_->obj();
    +  else
    +    throw std::runtime_error("ptr: null dereference");
    +}
    +
    +template <class C>
    +C *ptr<C>::modify() const
    +{
    +  if (obj_) {
    +    obj_->setDirty();
    +    return obj_->obj();
    +  } else
    +    throw std::runtime_error("ptr: null dereference");
    +}
    +
    +template <class C>
    +bool ptr<C>::operator== (const ptr<C>& other) const
    +{
    +  return obj_ == other.obj_;
    +}
    +
    +template <class C>
    +bool ptr<C>::operator< (const ptr<C>& other) const
    +{
    +  return obj_ < other.obj_;
    +}
    +
    +template <class C>
    +ptr<C>::operator bool() const
    +{
    +  return obj_ != 0 && obj_->obj() != 0;
    +}
    +
    +template <class C>
    +void ptr<C>::flush() const
    +{
    +  if (obj_)
    +    obj_->flush();
    +}
    +
    +template <class C>
    +void ptr<C>::purge()
    +{
    +  if (obj_)
    +    obj_->purge();
    +}
    +
    +template <class C>
    +void ptr<C>::reread()
    +{
    +  if (obj_)
    +    obj_->reread();
    +}
    +
    +template <class C>
    +void ptr<C>::remove()
    +{
    +  if (obj_)
    +    obj_->remove();
    +}
    +
    +template <class C>
    +typename dbo_traits<C>::IdType ptr<C>::id() const
    +{
    +  typedef typename dbo_traits<C>::IdType IdType;
    +
    +  if (obj_)
    +    return obj_->id();
    +  else
    +    return dbo_traits<C>::invalidId();
    +}
    +
    +template <class C>
    +int ptr<C>::version() const
    +{
    +  if (obj_)
    +    return obj_->version();
    +  else
    +    return -1;
    +}
    +
    +template <class C>
    +ptr<C>::ptr(MetaDbo<C> *obj)
    +  : obj_(obj)
    +{
    +  takeObj();
    +}
    +
    +template <class C>
    +void ptr<C>::transactionDone(bool success)
    +{
    +  obj_->transactionDone(success);
    +}
    +
    +template <class C>
    +void ptr<C>::takeObj()
    +{
    +  if (obj_)
    +    obj_->incRef();
    +}
    +
    +template <class C>
    +void ptr<C>::freeObj()
    +{
    +  if (obj_) {
    +    obj_->decRef();
    +    obj_ = 0;
    +  }
    +}
    +
    +template <class C>
    +Dbo<C>::Dbo()
    +  : meta_(0)
    +{ }
    +
    +template <class C>
    +typename dbo_traits<C>::IdType Dbo<C>::id() const
    +{
    +  if (meta_)
    +    return meta_->id();
    +  else
    +    return dbo_traits<C>::invalidId();
    +}
    +
    +template <class C>
    +Session *Dbo<C>::session() const
    +{
    +  return meta_ ? meta_->session() : 0;
    +}
    +
    +template <class C>
    +void query_result_traits< ptr<C> >
    +::getFields(Session& session, std::vector<std::string> *aliases,
    +	    std::vector<FieldInfo>& result)
    +{
    +  std::size_t first = result.size();
    +  session.getFields(session.tableName<C>(), result);
    +
    +  if (aliases) {
    +    if (aliases->empty())
    +      throw std::logic_error("Session::query(): not enough aliases for result");
    +
    +    std::string alias = aliases->front();
    +    aliases->erase(aliases->begin());
    +
    +    for (std::size_t i = first; i < result.size(); ++i)
    +      result[i].setQualifier(alias, i == first);
    +  }
    +}
    +
    +template <class C>
    +ptr<C> query_result_traits< ptr<C> >
    +::load(Session& session, SqlStatement& statement, int& column)
    +{
    +  return session.template load<C>(&statement, column);
    +}
    +
    +template <class C>
    +void query_result_traits< ptr<C> >
    +::getValues(const ptr<C>& ptr, std::vector<boost::any>& values)
    +{
    +  ToAnysAction action(values);
    +
    +  action.visit(ptr);
    +}
    +
    +template <class C>
    +void query_result_traits< ptr<C> >
    +::setValue(const ptr<C>& ptr, int& index, const boost::any& value)
    +{
    +  FromAnyAction action(index, value);
    +  action.visit(ptr);
    +}
    +
    +template <class C>
    +ptr<C> query_result_traits< ptr<C> >::create()
    +{
    +  return ptr<C>(new C());
    +}
    +
    +template <class C>
    +void query_result_traits< ptr<C> >::add(Session& session, ptr<C>& ptr)
    +{
    +  session.add(ptr);
    +}
    +
    +template <class C>
    +void query_result_traits< ptr<C> >::remove(ptr<C>& ptr)
    +{
    +  ptr.remove();
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_PTR_H_
    diff --git a/wt-3.1.7a/src/Wt/Dbo/ptr_tuple b/wt-3.1.7a/src/Wt/Dbo/ptr_tuple
    new file mode 100644
    index 0000000..c3ddfdd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Dbo/ptr_tuple
    @@ -0,0 +1,292 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_DBO_TUPLE_PTR_H_
    +#define WT_DBO_TUPLE_PTR_H_
    +
    +#include <boost/tuple/tuple.hpp>
    +#include <Wt/Dbo/Query>
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template <>
    +struct persist<boost::tuples::null_type, void>
    +{
    +  template <class A>
    +  static void apply(boost::tuples::null_type& obj, A& action)
    +  { }
    +};
    +
    +namespace Impl {
    +  template <class T>
    +  struct ptr_type
    +  {
    +    typedef ptr<T> type;
    +  };
    +
    +  template <>
    +  struct ptr_type< boost::tuples::null_type >
    +  {
    +    typedef boost::tuples::null_type type;
    +  };
    +
    +  template <int N, class T>
    +  struct helper
    +  {
    +    typedef typename boost::tuples::element<N, T>::type ElementType;
    +
    +    static void getFields(Session& session,
    +			  std::vector<std::string> *aliases,
    +			  std::vector<FieldInfo>& result)
    +    {
    +      helper<N-1, T>::getFields(session, aliases, result);
    +      query_result_traits<ElementType>::getFields(session, aliases, result);
    +    }
    +
    +    static void load(Session& session, SqlStatement& statement,
    +		     int& column, T& result)
    +    {
    +      helper<N-1, T>::load(session, statement, column, result);
    +
    +      boost::get<N>(result)
    +	= query_result_traits<ElementType>::load(session, statement, column);
    +    }
    +
    +    static void getValues(const T& result, std::vector<boost::any>& values)
    +    {
    +      helper<N-1, T>::getValues(result, values);
    +
    +      query_result_traits<ElementType>::getValues(boost::get<N>(result),
    +						  values);
    +    }
    +
    +    static void setValue(T& result, int& index, const boost::any& value)
    +    {
    +      if (index >= 0) {
    +	helper<N-1, T>::setValue(result, index, value);
    +
    +	if (index >= 0) {
    +	  query_result_traits<ElementType>::setValue(boost::get<N>(result),
    +						     index, value);
    +	}
    +      }
    +    }
    +
    +    static void create(T& result)
    +    {
    +      helper<N-1, T>::create(result);
    +
    +      boost::get<N>(result) = query_result_traits<ElementType>::create();
    +    }
    +
    +    static void add(Session& session, T& result)
    +    {
    +      helper<N-1, T>::add(session, result);
    +
    +      query_result_traits<ElementType>::add(session, boost::get<N>(result));
    +    }
    +
    +    static void remove(T& result)
    +    {
    +      helper<N-1, T>::remove(result);
    +
    +      query_result_traits<ElementType>::remove(boost::get<N>(result));
    +    }
    +  };
    +
    +  template <class T>
    +  struct helper<-1, T>
    +  {
    +    static void getFields(Session& session,
    +			  std::vector<std::string> *aliases,
    +			  std::vector<FieldInfo>& result)
    +    { }
    +
    +    static void load(Session& session, SqlStatement& statement,
    +		     int& column, T& result)
    +    { }
    +
    +    static void getValues(const T& result, std::vector<boost::any>& values)
    +    { }
    +
    +    static void setValue(T& result, int& index, const boost::any& value)
    +    { }
    +
    +    static void create(T& result)
    +    { }
    +
    +    static void add(Session& session, T& result)
    +    { }
    +
    +    static void remove(T& result)
    +    { }
    +  };
    +
    +}
    +
    +/*! \brief A utility class for defining a tuple of database objects.
    + *
    + * Since C++ (at least prior to C++0x) does not support template
    + * typedefs, this class provides a nested \p type that is a typedef
    + * for a Boost.Tuple containing one or more Wt::Dbo::ptr.
    + *
    + * Thus:
    + * \code
    + * namespace dbo = Wt::Dbo;
    + * typedef dbo::ptr_tuple<A, B, C>::type ABC;
    + * \endcode
    + * Is equivalent to:
    + * \code
    + * namespace dbo = Wt::Dbo;
    + * typedef boost::tuple<dbo::ptr<A>, dbo::ptr<B>, dbo::ptr<C> > ABC;
    + * \endcode
    + *
    + * \note Boost.Tuple (in its general form) is supported as a result for a
    + *       Session::query() by a partial template specialization of
    + *       query_result_traits.
    + *
    + * \ingroup dbo
    + */
    +#ifdef DOXYGEN_ONLY
    +template <class T0 = boost::tuples::null_type,
    +	  class T1 = boost::tuples::null_type,
    +	  ...,
    +	  class T9 = boost::tuples::null_type>
    +#else
    +template <class T0 = boost::tuples::null_type,
    +	  class T1 = boost::tuples::null_type,
    +	  class T2 = boost::tuples::null_type,
    +	  class T3 = boost::tuples::null_type,
    +	  class T4 = boost::tuples::null_type,
    +	  class T5 = boost::tuples::null_type,
    +	  class T6 = boost::tuples::null_type,
    +	  class T7 = boost::tuples::null_type,
    +	  class T8 = boost::tuples::null_type,
    +	  class T9 = boost::tuples::null_type>
    +#endif
    +struct ptr_tuple
    +{
    +  /*! \brief A typedef for a Boost.Tuple for ptrs.
    +   */
    +#ifdef DOXYGEN_ONLY
    +  typedef boost::tuple< ptr<T0>, ptr<T1>, ..., ptr<T9> > type;
    +#else
    +  typedef boost::tuple< typename Impl::ptr_type<T0>::type,
    +			typename Impl::ptr_type<T1>::type,
    +			typename Impl::ptr_type<T2>::type,
    +			typename Impl::ptr_type<T3>::type,
    +			typename Impl::ptr_type<T4>::type,
    +			typename Impl::ptr_type<T5>::type,
    +			typename Impl::ptr_type<T6>::type,
    +			typename Impl::ptr_type<T7>::type,
    +			typename Impl::ptr_type<T8>::type,
    +			typename Impl::ptr_type<T9>::type > type;
    +#endif // DOXYGEN_ONLY
    +};
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +struct query_result_traits< boost::tuple<T0, T1, T2, T3, T4,
    +				       T5, T6, T7, T8, T9> >
    +{
    +  typedef boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> tuple_type;
    +  typedef Impl::helper<boost::tuples::length<tuple_type>::value - 1, tuple_type>
    +    helper;
    +
    +  static void getFields(Session& session,
    +			std::vector<std::string> *aliases,
    +			std::vector<FieldInfo>& result);
    +
    +  static tuple_type load(Session& session, SqlStatement& statement,
    +			 int& column);
    +
    +  static void getValues(const tuple_type& t, std::vector<boost::any>& values);
    +
    +  static void setValue(tuple_type& t, int& index, const boost::any& value);
    +
    +  static tuple_type create();
    +  static void add(Session& session, tuple_type& t);
    +  static void remove(tuple_type& t);
    +};
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +void query_result_traits< boost::tuple<T0, T1, T2, T3, T4,
    +				     T5, T6, T7, T8, T9> >
    +::getFields(Session& session,
    +	    std::vector<std::string> *aliases,
    +	    std::vector<FieldInfo>& result)
    +{
    +  helper::getFields(session, aliases, result);
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::load(Session& session, SqlStatement& statement, int& column)
    +{
    +  tuple_type result;
    +
    +  helper::load(session, statement, column, result);
    +
    +  return result;
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +void 
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::getValues(const tuple_type& t, std::vector<boost::any>& values)
    +{
    +  helper::getValues(t, values);
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +void 
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::setValue(tuple_type& t, int& index, const boost::any& value)
    +{
    +  helper::setValue(t, index, value);
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::create()
    +{
    +  tuple_type result;
    +
    +  helper::create(result);
    +
    +  return result;
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +void 
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::add(Session& session, tuple_type& t)
    +{
    +  helper::add(session, t);
    +}
    +
    +template <class T0, class T1, class T2, class T3, class T4,
    +	  class T5, class T6, class T7, class T8, class T9>
    +void 
    +query_result_traits< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
    +::remove(tuple_type& t)
    +{
    +  helper::remove(t);
    +}
    +
    +  }
    +}
    +
    +#endif // WT_DBO_DBO_PTR_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/AbstractButton b/wt-3.1.7a/src/Wt/Ext/AbstractButton
    new file mode 100644
    index 0000000..bf578d9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AbstractButton
    @@ -0,0 +1,135 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_ABSTRACT_BUTTON_H_
    +#define EXT_ABSTRACT_BUTTON_H_
    +
    +#include <Wt/Ext/Component>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class Menu;
    +class ToolTipConfig;
    +
    +/*! \class AbstractButton Wt/Ext/AbstractButton Wt/Ext/AbstractButton
    + *  \brief Abstract base class for a (toolbar) button or menu item.
    + *
    + * You may set the button text using setText() and icon use setIcon(),
    + * and configure whether the button/menu item can be checked or
    + * toggled using setCheckable().
    + *
    + * To respond to a click, you can connect to the activated() signal,
    + * and for a checkable button/item you may listen to the toggled()
    + * signal.
    + *
    + * \sa Button, MenuItem, AbstractToggleButton
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API AbstractButton : public Component
    +{
    +protected:
    +  AbstractButton(WContainerWidget *parent = 0);
    +
    +public:
    +  /*! \brief Set the item text.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Get the item text.
    +   */
    +  const WString& text() const { return text_; }
    +
    +  /*! \brief Set the item icon path.
    +   */
    +  void setIcon(const std::string& path);
    +
    +  /*! \brief Get the item icon path.
    +   */
    +  const std::string& icon() const { return icon_; }
    +
    +  /*! \brief Set if the item is checkable.
    +   */
    +  void setCheckable(bool how);
    +
    +  /*! \brief Return if the item is checkable.
    +   */
    +  bool isCheckable() const { return checkable_; }
    +
    +  /*! \brief Set a menu that popups up when the item is activated.
    +   */
    +  void setMenu(Menu *menu);
    +
    +  /*! \brief Change the checked state.
    +   *
    +   * This is only used when the isCheckable() == true.
    +   *
    +   * \sa setCheckable(bool), isCheckable()
    +   */
    +  void setChecked(bool how);
    +
    +  /*! \brief Get the checked state.
    +   */
    +  bool isChecked() const { return checked_; }
    +
    +  /*! \brief Configure the tool tip associated with this item.
    +   *
    +   * If the config has no parent, then ownership is transferred to this
    +   * widget.
    +   */
    +  void configureToolTip(ToolTipConfig *config);
    +
    +  /*! \brief %Signal emitted when a item gets activated.
    +   *
    +   * This signal is emitted for non-checkable items (for who
    +   * isCheckable() == false), when the user activates the item
    +   * (by clicking it).
    +   *
    +   * \sa setCheckable(bool), isCheckable()
    +   */
    +  JSignal<>& activated() { return activated_; }
    +
    +  /*! \brief %Signal emitted when a item gets toggled.
    +   *
    +   * This signal is emitted for checkable items (for who
    +   * isCheckable() == false), when the user changed toggles the item
    +   * state. The new state is passed as a parameter value.
    +   *
    +   * \sa setCheckable(bool), isCheckable()
    +   */
    +  JSignal<bool>& toggled() { return toggled_; }
    +
    +  virtual void refresh();
    +
    +protected:
    +  std::string createJSHelper(const std::string& extClassName,
    +			     bool intoElement = false);
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& js);
    +
    +private:
    +  JSignal<>      activated_;
    +  JSignal<bool>  toggled_;
    +  WString        text_;
    +  std::string    icon_;
    +  bool           checkable_;
    +  bool           checked_;
    +  Menu          *menu_;
    +  ToolTipConfig *toolTipConfig_;
    +
    +  virtual std::string checkMethodJS() const = 0;
    +  virtual std::string checkEventJS() const = 0;
    +  virtual std::string checkInitialState() const = 0;
    +
    +  void wasToggled(bool how);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_ABSTRACT_BUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/AbstractButton.C b/wt-3.1.7a/src/Wt/Ext/AbstractButton.C
    new file mode 100644
    index 0000000..84ba55e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AbstractButton.C
    @@ -0,0 +1,177 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/AbstractButton"
    +#include "Wt/Ext/Menu"
    +#include "Wt/Ext/ToolTipConfig"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +AbstractButton::AbstractButton(WContainerWidget *parent)
    +  : Component(parent),
    +    activated_(this, "activated", true),
    +    toggled_(this, "toggled", true),
    +    checkable_(false),
    +    checked_(false),
    +    menu_(0),
    +    toolTipConfig_(0)
    +{ }
    +
    +void AbstractButton::setChecked(bool how)
    +{
    +  if (checkable_) {
    +    if (checked_ != how) {
    +      checked_ = how;
    +
    +      if (isRendered())
    +	addUpdateJS(elVar() + "." + checkMethodJS()
    +		    + "(" + (checked_ ? "true" : "false") + ");");
    +    }
    +  }
    +}
    +
    +void AbstractButton::setCheckable(bool how)
    +{
    +  checkable_ = how;
    +
    +  if (checkable_) {
    +    toggled_.connect(this, &AbstractButton::wasToggled);
    +  }
    +}
    +
    +void AbstractButton::wasToggled(bool how)
    +{
    +  checked_ = how;
    +}
    +
    +void AbstractButton::setText(const WString& text)
    +{
    +  text_ = text;
    +
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".setText(" + text_.jsStringLiteral() + ");");
    +}
    +
    +void AbstractButton::setIcon(const std::string& iconPath)
    +{
    +  icon_ = iconPath;
    +
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".icon = " + WWebWidget::jsStringLiteral(icon_) + ";"
    +		+ elVar() + ".setText(" + elVar() + ".text);");
    +}
    +
    +void AbstractButton::refresh()
    +{
    +  if (text_.refresh()) {
    +    setText(text_);
    +  }
    +
    +  Component::refresh();
    +}
    +
    +void AbstractButton::setMenu(Menu *menu)
    +{
    +  if (menu_)
    +    removeOrphan(menu_);
    +
    +  menu_ = menu;
    +
    +  if (menu_)
    +    addOrphan(menu_);
    +}
    +
    +void AbstractButton::configureToolTip(ToolTipConfig *config)
    +{
    +  toolTipConfig_ = config;
    +
    +  if (!config->parent())
    +    WObject::addChild(config);
    +}
    +
    +void AbstractButton::updateExt()
    +{
    +  updateWtSignal(&activated_, activated_.name(), "", "");
    +  updateWtSignal(&toggled_, toggled_.name(), "i,c", "c");
    +  Component::updateExt();
    +}
    +
    +std::string AbstractButton::createJSHelper(const std::string& extClassName,
    +					   bool intoElement)
    +{
    +  std::stringstream result;
    +  std::string menuvar;
    +
    +  std::stringstream buf;
    +
    +  buf << "{a:0";
    +
    +  if (checkable_ != false) {
    +    if (extClassName != "Ext.menu.CheckItem")
    +      buf << ",enableToggle:true";
    +
    +    if (checked_ != false) {
    +      buf << "," << checkInitialState() << ":true";
    +    }
    +  }
    +
    +  if (menu_) {
    +    menuvar = menu_->createExtElement(result, 0);
    +    buf << ",menu:" << menuvar;
    +  }
    +
    +  createConfig(buf);
    +  buf << "}";
    +
    +  result <<
    +    elVar() << "=new " << extClassName << "(" << buf.str() << ");";
    +
    +  if (intoElement)
    +    result << elVar() << ".render('" << id() << "');";
    +
    +  bindEventHandler(checkEventJS(), "toggleH", result);
    +
    +  return result.str();
    +}
    +
    +void AbstractButton::createConfig(std::ostream& config)
    +{
    +  if (!text_.empty())
    +    config << ",text:" << text_.jsStringLiteral();
    +
    +  if (!icon_.empty())
    +    config << ",icon:" << WWebWidget::jsStringLiteral(icon_);
    +
    +  // default cls is 'x-btn-text'
    +  if (!icon_.empty()) {
    +    if (text_.empty())
    +      config << ",cls:'x-btn-icon'";
    +    else
    +      config << ",cls:'x-btn-text-icon'";
    +  }
    +
    +  addWtSignalConfig("handler", &activated_, activated_.name(),
    +		    "", "", config);
    +  addWtSignalConfig("toggleH", &toggled_, toggled_.name(),
    +		    "i,c", "c", config);
    +
    +  if (!toolTip().empty()) {
    +    config << ",tooltip:{"
    +      "text:" << toolTip().jsStringLiteral();
    +
    +    if (toolTipConfig_)
    +      toolTipConfig_->createConfig(config);
    +
    +    config << "}";
    +  }
    +
    +  Component::createConfig(config);
    +}
    +
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton b/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton
    new file mode 100644
    index 0000000..2c3678f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton
    @@ -0,0 +1,109 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_ABSTRACT_TOGGLE_BUTTON_H_
    +#define EXT_ABSTRACT_TOGGLE_BUTTON_H_
    +
    +#include <Wt/Ext/FormField>
    +
    +namespace Wt {
    +  class WAbstractToggleButton;
    +  namespace Ext {
    +
    +/*! \class AbstractToggleButton Ext/AbstractToggleButton
    + *         Ext/AbstractToggleButton
    + *  \brief Abstract base class for radio button and check box.
    + *
    + * A toggle button provides a button with a boolean state (checked or
    + * unchecked), and a text label.
    + *
    + * To act on a change of the state, you can listen to the checked() or
    + * unChecked() signals.
    + *
    + * The current state (checked or unchecked) may be inspected using the
    + * isChecked() method.
    + *
    + * The API is identical to the WAbstractToggleButton API.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API AbstractToggleButton : public FormField
    +{
    +protected:
    +  AbstractToggleButton(WAbstractToggleButton *wtWidget,
    +		       const WString& text, WContainerWidget *parent);
    +
    +public:
    +  /*! \brief Change the text of the label.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Get the text of the label.
    +   */
    +  const WString text() const { return text_; }
    +
    +  /*! \brief Returns the state of the button.
    +   */
    +  bool isChecked() const;
    +
    +public slots:
    +  /*! \brief Change the state of the button.
    +   *
    +   * Does not emit the checked() or unChecked() signals.
    +   *
    +   * \sa setChecked(), setUnChecked()
    +   */
    +  void setChecked(bool);
    +
    +  /*! \brief Set the button checked.
    +   *
    +   * Does not emit the checked() signal.
    +   *
    +   * \sa setChecked(bool)
    +   */
    +  virtual void setChecked();
    +
    +  /*! \brief Set the button unChecked.
    +   *
    +   * Does not emit the unChecked() signal.
    +   *
    +   * \sa setChecked(bool)
    +   */
    +  virtual void setUnChecked();
    +
    +public:
    +  /*! \brief %Signal emitted when the button gets checked.
    +   *
    +   * \sa unChecked()
    +   */
    +  EventSignal<>& checked();
    +
    +  /*! \brief %Signal emitted when the button gets unChecked.
    +   *
    +   * \sa checked()
    +   */
    +  EventSignal<>& unChecked();
    +
    +private:
    +  WAbstractToggleButton *wtWidget_;
    +  WString                text_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +  virtual std::string getExtName() const = 0;
    +
    +  virtual void useAsTableViewEditor();
    +
    +protected:
    +  WAbstractToggleButton *wtWidget() const { return wtWidget_; }
    +  virtual void createConfig(std::ostream& config);
    +  virtual WFormWidget *formWidget() const;
    +  virtual bool applySelfCss() const;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_ABSTRACT_TOGGLE_BUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton.C b/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton.C
    new file mode 100644
    index 0000000..e422795
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AbstractToggleButton.C
    @@ -0,0 +1,94 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/AbstractToggleButton"
    +#include "Wt/WAbstractToggleButton"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +AbstractToggleButton::AbstractToggleButton(WAbstractToggleButton *wtWidget,
    +					   const WString& text,
    +					   WContainerWidget *parent)
    +  : FormField(parent),
    +    wtWidget_(wtWidget),
    +    text_(text)
    +{
    +  addOrphan(wtWidget_);
    +}
    +
    +EventSignal<>& AbstractToggleButton::checked()
    +{
    +  return wtWidget_->checked();
    +}
    +
    +EventSignal<>& AbstractToggleButton::unChecked()
    +{
    +  return wtWidget_->unChecked();
    +}
    +
    +WFormWidget *AbstractToggleButton::formWidget() const
    +{
    +  return wtWidget_;
    +}
    +
    +void AbstractToggleButton::setText(const WString& text)
    +{
    +  text_ = text;
    +}
    +
    +bool AbstractToggleButton::isChecked() const
    +{
    +  return wtWidget_->isChecked();
    +}
    +
    +void AbstractToggleButton::setChecked(bool how)
    +{
    +  wtWidget_->setChecked(how);
    +}
    +
    +void AbstractToggleButton::setChecked()
    +{
    +  wtWidget_->setChecked();
    +}
    +
    +void AbstractToggleButton::setUnChecked()
    +{
    +  wtWidget_->setUnChecked();
    +}
    +
    +void AbstractToggleButton::useAsTableViewEditor()
    +{
    +  wtWidget_->setFormObject(false);
    +}
    +
    +std::string AbstractToggleButton::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.form." << getExtName()
    +	 << "(" << configStruct() << ");";
    +
    +  applyToWidget(wtWidget_, result, inContainer);
    +
    +  return result.str();
    +}
    +
    +bool AbstractToggleButton::applySelfCss() const
    +{
    +  return false;
    +}
    +
    +void AbstractToggleButton::createConfig(std::ostream& config)
    +{
    +  config << ",boxLabel:" << text_.jsStringLiteral()
    +	 << ",checked:" << (isChecked() ? "true" : "false");
    +
    +  FormField::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.C b/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.C
    new file mode 100644
    index 0000000..ca30f63
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.C
    @@ -0,0 +1,26 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/AccordionLayoutImpl.h"
    +#include "Wt/WAccordionLayout"
    +#include <ostream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +AccordionLayoutImpl::AccordionLayoutImpl(WAccordionLayout *layout)
    +  : DefaultLayoutImpl(layout)
    +{ }
    +
    +void AccordionLayoutImpl::createConfig(std::ostream& config)
    +{
    +  config << ",layout:'accordion'";
    +
    +  DefaultLayoutImpl::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.h b/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.h
    new file mode 100644
    index 0000000..04b24d2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/AccordionLayoutImpl.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_ACCORDION_LAYOUT_IMPL_H_
    +#define EXT_ACCORDION_LAYOUT_IMPL_H_
    +
    +#include "Wt/Ext/DefaultLayoutImpl.h"
    +
    +namespace Wt {
    +
    +  class WAccordionLayout;
    +
    +  namespace Ext {
    +
    +class AccordionLayoutImpl : public DefaultLayoutImpl
    +{
    +public:
    +  AccordionLayoutImpl(WAccordionLayout *layout);
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +};
    +
    +  }
    +}
    +#endif // EXT_ACCORDION_LAYOUT_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.C b/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.C
    new file mode 100644
    index 0000000..9a47e4a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.C
    @@ -0,0 +1,36 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/BorderLayoutImpl.h"
    +#include "Wt/WBorderLayout"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +BorderLayoutImpl::BorderLayoutImpl(WBorderLayout *layout)
    +  : LayoutImpl(layout)
    +{ }
    +
    +void BorderLayoutImpl::createConfig(std::ostream& config)
    +{
    +  config << ",layout:'border'";
    +
    +  LayoutImpl::createConfig(config);
    +}
    +
    +void BorderLayoutImpl::addLayoutConfig(LayoutItemImpl *item,
    +				       std::ostream& config)
    +{
    +  const char *regionStr[] = { "north", "east", "south", "west", "center" };
    +
    +  WBorderLayout *l = dynamic_cast<WBorderLayout *>(layout());
    +  WBorderLayout::Position p = l->position(item->layoutItem());
    +
    +  config << ",region:'" << regionStr[p] << '\'';
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.h b/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.h
    new file mode 100644
    index 0000000..679c16c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/BorderLayoutImpl.h
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_BORDER_LAYOUT_IMPL_H_
    +#define EXT_BORDER_LAYOUT_IMPL_H_
    +
    +#include "Wt/Ext/LayoutImpl.h"
    +
    +namespace Wt {
    +  class WBorderLayout;
    +
    +  namespace Ext {
    +
    +class BorderLayoutImpl : public LayoutImpl
    +{
    +public:
    +  BorderLayoutImpl(WBorderLayout *layout);
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  virtual void addLayoutConfig(LayoutItemImpl *item, std::ostream& config);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_BORDER_LAYOUT_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Button b/wt-3.1.7a/src/Wt/Ext/Button
    new file mode 100644
    index 0000000..6e9dc21
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Button
    @@ -0,0 +1,101 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_BUTTON_H_
    +#define EXT_BUTTON_H_
    +
    +#include <Wt/Ext/AbstractButton>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class Panel;
    +
    +/*! \class Button Wt/Ext/Button Wt/Ext/Button
    + *  \brief A button.
    + *
    + * A button with a label and/or icon, which may be standalone, or be
    + * added to a ToolBar (see ToolBar::addButton()) or to a Dialog (see
    + * Dialog::addButton()).
    + *
    + * The API is similar to the WPushButton API, with the following additional
    + * features:
    + * <ul>
    + *   <li>an icon may be specified using AbstractButton::setIcon();</li>
    + *   <li>the button may be configured as a toggle button
    + *     (see AbstractButton::setCheckable();</li>
    + *   <li>the button may be associated with a popup-menu
    + *     (see AbstractButton::setMenu();</li>
    + * </ul>
    + *
    + * \image html ExtButton-1.png Standalone button
    + * \image html ExtButton-1a.png Standalone button hover effect
    + * \image html ExtButton-2.png Button in tool bar
    + * \image html ExtButton-3.png Button in tool bar with icon
    + * \image html ExtButton-4.png Button in tool bar with icon and menu
    + * \image html ExtButton-5.png Button in tool bar hover effect
    + * \image html ExtButton-6.png Toggled button in tool bar
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Button : public AbstractButton
    +{
    +public:
    +  /*! \brief Create a push button with empty label.
    +   */
    +  Button(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create a push button with given label.
    +   */
    +  Button(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Delete a button
    +   */
    +  ~Button();
    +
    +  /*! \brief Configure as the default button.
    +   *
    +   * This only applies for buttons that have been added to a dialog using
    +   * Dialog::addButton().
    +   *
    +   * The default button will be activated when the user presses the
    +   * Enter (or Return) key in a dialog.
    +   *
    +   * The default button may be rendered with more emphasis (?).
    +   *
    +   * \sa isDefault()
    +   */
    +  void setDefault(bool how);
    +
    +  /*! \brief Return if is the default button.
    +   *
    +   * \sa setDefault(bool)
    +   */
    +  bool isDefault() const;
    +
    +  /*! \brief Alias for the activated() signal.
    +   *
    +   * This signal is added for increased API compatibility with WPushButton.
    +   */
    +  JSignal<>& clicked() { return activated(); }
    +
    +private:
    +  Panel *panel_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +  virtual std::string checkMethodJS() const;
    +  virtual std::string checkEventJS() const;
    +  virtual std::string checkInitialState() const;
    +
    +  void setPanel(Panel *panel);
    +
    +  friend class Panel;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_BUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Button.C b/wt-3.1.7a/src/Wt/Ext/Button.C
    new file mode 100644
    index 0000000..23a416d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Button.C
    @@ -0,0 +1,88 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "DomElement.h"
    +
    +#include "Wt/Ext/Button"
    +#include "Wt/Ext/Panel"
    +#include "Wt/Ext/Menu"
    +#include "Wt/Ext/ToolBar"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Button::Button(WContainerWidget *parent)
    +  : AbstractButton(parent),
    +    panel_(0)
    +{ }
    +
    +Button::Button(const WString& text, WContainerWidget *parent)
    +  : AbstractButton(parent),
    +    panel_(0)
    +{
    +  setText(text);
    +}
    +
    +Button::~Button()
    +{
    +  if (panel_)
    +    panel_->removeFooterButton(this);
    +}
    +
    +std::string Button::createJS(DomElement *inContainer)
    +{
    +  std::string extClassName;
    +
    +  if (dynamic_cast<ToolBar *>(parent()))
    +    extClassName = "Ext.Toolbar.Button";
    +  else
    +    extClassName = "Ext.Button";
    +
    +  return createJSHelper(extClassName, inContainer != 0);
    +}
    +
    +std::string Button::checkMethodJS() const
    +{
    +  return "toggle";
    +}
    +
    +std::string Button::checkEventJS() const
    +{
    +  return "toggle";
    +}
    +
    +std::string Button::checkInitialState() const
    +{
    +  return "pressed";
    +}
    +
    +void Button::setPanel(Panel *panel)
    +{
    +  panel_ = panel;
    +}
    +
    +void Button::setDefault(bool how)
    +{
    +  if (panel_) {
    +    if (how) {
    +      if (!isDefault())
    +	panel_->setDefaultButton(this);
    +    } else
    +      if (isDefault())
    +	panel_->setDefaultButton(0);
    +  }
    +}
    +
    +bool Button::isDefault() const
    +{
    +  if (panel_)
    +    return panel_->defaultButton() == this;
    +  else
    +    return false;
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/CMakeLists.txt b/wt-3.1.7a/src/Wt/Ext/CMakeLists.txt
    new file mode 100644
    index 0000000..45fc483
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/CMakeLists.txt
    @@ -0,0 +1,59 @@
    +ADD_LIBRARY(wtext
    +  AbstractButton.C
    +  AbstractToggleButton.C
    +  AccordionLayoutImpl.C
    +  BorderLayoutImpl.C
    +  Button.C
    +  Calendar.C
    +  CheckBox.C
    +  ComboBox.C
    +  Component.C
    +  Container.C
    +  DataStore.C
    +  DateField.C
    +  DefaultLayoutImpl.C
    +  Dialog.C
    +  FitLayoutImpl.C
    +  FormField.C
    +  LayoutImpl.C
    +  LayoutItemImpl.C
    +  LineEdit.C
    +  Menu.C
    +  MenuItem.C
    +  MessageBox.C
    +  NumberField.C
    +  PagingToolBar.C
    +  Panel.C
    +  ProgressDialog.C
    +  RadioButton.C
    +  Splitter.C
    +  SplitterHandle.C
    +  TableView.C
    +  TabWidget.C
    +  TextEdit.C
    +  ToolBar.C
    +  ToolTipConfig.C
    +  Widget.C
    +  WWidgetItemImpl.C
    +)
    +
    +TARGET_LINK_LIBRARIES(wtext wt ${BOOST_WT_LIBRARIES})
    +INSTALL(TARGETS wtext
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +IF(MSVC)
    +  SET_TARGET_PROPERTIES(wtext PROPERTIES COMPILE_FLAGS "${BUILD_PARALLEL} /wd4251 /wd4275 /wd4355 /wd4800 /wd4996 /wd4101 /wd4267")
    +ENDIF(MSVC)
    +
    +SET_TARGET_PROPERTIES(
    +  wtext
    +PROPERTIES
    +  VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +  SOVERSION ${WTEXT_SOVERSION}
    +  DEBUG_POSTFIX "d"
    +)
    +
    +INSTALL_FILES(/include/Wt/Ext "^[^.]..+[^Ch~]$")
    +INSTALL_FILES(/include/Wt/Ext ExtDllDefs.h)
    diff --git a/wt-3.1.7a/src/Wt/Ext/Calendar b/wt-3.1.7a/src/Wt/Ext/Calendar
    new file mode 100644
    index 0000000..d06ba5f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Calendar
    @@ -0,0 +1,103 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_CALENDAR_H_
    +#define EXT_CALENDAR_H_
    +
    +#include <Wt/WJavaScript>
    +#include <Wt/WDate>
    +#include <Wt/Ext/Component>
    +
    +namespace Wt {
    +
    +  namespace Ext {
    +
    +/*! \class Calendar Wt/Ext/Calendar Wt/Ext/Calendar
    + *  \brief A calendar.
    + *
    + * The calendar provides navigation by month and year, and indicates the
    + * current day.
    + *
    + * The calendar only allows selection of a single day, and you may
    + * listen for when the user selects a new date using the selected()
    + * signal.
    + *
    + * The API is a subset of the WCalendar API:
    + * <ul>
    + *   <li>limited to single selection mode: no 
    + *     \link WCalendar::setMultipleSelection(bool) setMultipleSelection(bool)\endlink,
    + *     \link WCalendar::select(const std::set<WDate>&) select(const std::set<WDate>&)\endlink methods;</li>
    + *   <li>no support for programmatory navigation: no
    + *      \link WCalendar::browseToNextMonth() browseToNextMonth() \endlink,
    + *      \link WCalendar::browseTo() browseTo()\endlink, etc... methods
    + *   </li>
    + *   <li>no support for getting information on what is currently displayed: no
    + *      \link WCalendar::currentMonth() currentMonth()\endlink and
    + *      \link WCalendar::currentYear() currentYear()\endlink methods.
    + * </ul>
    + *
    + * Here is a snapshot taken on 01/09/2007 (shown as today), and 12/09/2007
    + * currently selected.
    + * \image html ExtCalendar-1.png "Calendar"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Calendar : public Component
    +{
    +public:
    +  /*! \brief Create a new calendar.
    +   *
    +   * Constructs a new calendar, with optional support for internationalization.
    +   * The calendar shows the current day, and has an empty selection.
    +   */
    +  Calendar(bool i18n = false, WContainerWidget *parent = 0);
    +
    +  /*! \brief Select a date.
    +   *
    +   * Select one date.
    +   */
    +  void select(const WDate& date);
    +
    +   /*! \brief Get the current selection.
    +   *
    +   * Returns the set of dates currently selected. This set contains 0
    +   * or 1 dates.
    +   */ 
    +  const std::set<WDate>& selection() const { return selection_; }
    +
    +  /*! \brief %Signal emitted when the user changes the selection.
    +   *
    +   * Emitted after the user has changed the current selection, before
    +   * the selected() signal is emitted.
    +   */
    +  Signal<void>& selectionChanged() { return selectionChanged_; }
    +
    +  /*! \brief %Signal emitted when the user has selected a date.
    +   *
    +   * This signal indicates that the user has selected a new date,
    +   * which is only available when in single selection mode.
    +   */
    +  Signal<void>& selected() { return selected_; }
    +
    +protected:
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  Signal<void>    selectionChanged_, selected_;
    +  bool            i18n_;
    +  std::set<WDate> selection_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  JSignal<std::string> extDateSelected_;
    +  void onSelect(std::string date);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_CALENDAR_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Calendar.C b/wt-3.1.7a/src/Wt/Ext/Calendar.C
    new file mode 100644
    index 0000000..1468960
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Calendar.C
    @@ -0,0 +1,83 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/Calendar"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Calendar::Calendar(bool i18n, WContainerWidget *parent)
    +  : Component(parent),
    +    selectionChanged_(this),
    +    selected_(this),
    +    i18n_(i18n),
    +    extDateSelected_(this, "select", false)
    +{ }
    +
    +void Calendar::select(const WDate& date)
    +{
    +  selection_.clear();
    +  selection_.insert(date);
    +
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".setValue(Date.parseDate('"
    +		+ date.toString("dd/MM/yyyy").toUTF8() + "','d/m/Y');");
    +}
    +
    +void Calendar::onSelect(std::string date)
    +{ 
    +  selection_.clear();
    +
    +  WDate d = WDate::fromString(date, "dd/MM/yyyy");
    +
    +  if (d.isValid()) {
    +    selection_.insert(d);
    +    selectionChanged_.emit();
    +    selected_.emit();
    +  } else
    +    wApp->log("error") << "Calendar internal error: could not parse date: '"
    +		       << date << "'";
    +}
    +
    +void Calendar::updateExt()
    +{
    +  updateWtSignal(&extDateSelected_, extDateSelected_.name(),
    +		 "dp,d", "d.format('d/m/Y')");
    +  Component::updateExt();
    +}
    +
    +std::string Calendar::createJS(DomElement *inContainer)
    +{
    +  assert(inContainer);
    +
    +  if (!extDateSelected_.isConnected())
    +    extDateSelected_.connect(this, &Calendar::onSelect);
    +
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.DatePicker(" << configStruct() << ");";
    +  result << elVar() << ".render('" << id() << "');";
    +
    +  bindEventHandler("select", "selectH", result);
    +  
    +  return result.str();
    +}
    +
    +void Calendar::createConfig(std::ostream& config)
    +{
    +  Widget::createConfig(config);
    +
    +  addWtSignalConfig("selectH", &extDateSelected_, extDateSelected_.name(),
    +		    "dp,d", "d.format('d/m/Y')", config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/CheckBox b/wt-3.1.7a/src/Wt/Ext/CheckBox
    new file mode 100644
    index 0000000..efc62ec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/CheckBox
    @@ -0,0 +1,40 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_CHECKBOX_H_
    +#define EXT_CHECKBOX_H_
    +
    +#include <Wt/Ext/AbstractToggleButton>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class CheckBox Wt/Ext/CheckBox Wt/Ext/CheckBox
    + *  \brief A user control that represents a check box.
    + *
    + * The API is identical to the API of WCheckBox.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API CheckBox : public AbstractToggleButton
    +{
    +public:
    +  /*! \brief Create a checkbox with empty label.
    +   */
    +  CheckBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create a checkbox with given label.
    +   */
    +  CheckBox(const WString& text, WContainerWidget *parent = 0);
    +
    +private:
    +  std::string getExtName() const;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_CHECKBOX_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/CheckBox.C b/wt-3.1.7a/src/Wt/Ext/CheckBox.C
    new file mode 100644
    index 0000000..046dbf2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/CheckBox.C
    @@ -0,0 +1,26 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/CheckBox"
    +#include "Wt/WCheckBox"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +CheckBox::CheckBox(const WString& text, WContainerWidget *parent)
    +  : AbstractToggleButton(new WCheckBox(), text, parent)
    +{ }
    +
    +CheckBox::CheckBox(WContainerWidget *parent)
    +  : AbstractToggleButton(new WCheckBox(), WString(), parent)
    +{ }
    +
    +std::string CheckBox::getExtName() const
    +{
    +  return "Checkbox";
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/ComboBox b/wt-3.1.7a/src/Wt/Ext/ComboBox
    new file mode 100644
    index 0000000..3eef692
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ComboBox
    @@ -0,0 +1,241 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_COMBOBOX_H_
    +#define EXT_COMBOBOX_H_
    +
    +#include <Wt/WJavaScript>
    +#include <Wt/Ext/LineEdit>
    +
    +namespace Wt {
    +
    +  class WAbstractItemModel;
    +  class WModelIndex;
    +
    +  namespace Ext {
    +
    +    class DataStore;
    +
    +/*! \class ComboBox Wt/Ext/ComboBox Wt/Ext/ComboBox
    + *  \brief A widget that provides a drop-down combo-box control.
    + *
    + * A combo-box provides the user with a choice of options to chose from.
    + * Use addItem(const WString&) or insertItem(int, const WString&) to
    + * populate the combo-box. All the content can be cleared through clear().
    + *
    + * To act on a new selection, either connect a slot to the activated()
    + * signal.
    + *
    + * At all times, the current selection index is available through
    + * currentIndex() or the text using currentText().
    + *
    + * By default the %ComboBox uses a WStringListModel to store the
    + * items. This may be changed by specifying a custom model with
    + * setModel().
    + *
    + * When the combobox is configured to be \link setEditable(bool)
    + * editable\endlink, the user may enter a value which is not available
    + * in the list of values. In that case, currentText() will hold this value,
    + * while currentIndex() == -1 indicates that the value was not in the list.
    + *
    + * By default, all the data is downloaded to the client. This may be
    + * changed using setDataLocation(DataLocation) to keep the data at hte
    + * server, and download data on-demand. This is useful if you have a
    + * very large list of options.
    + *
    + * The API is a superset of the WComboBox API.
    + *
    + * \image html ExtComboBox-1.png "ComboBox with expanded drop-down list."
    + *
    + * \ingroup ext
    + * \ingroup modelview
    + */
    +class WT_EXT_API ComboBox : public LineEdit
    +{
    +public:
    +  /*! \brief Create an empty combo-box with optional <i>parent</i>.
    +   */
    +  ComboBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Add an option item.
    +   *
    +   * Equivalent to
    +   * \link insertItem(int, const WString&) insertItem \endlink (count(),
    +   * <i>text</i>).
    +   */
    +  void addItem(const WString& text);
    +
    +  /*! \brief Get the number of items
    +   */
    +  int count() const;
    +
    +  /*! \brief Get the currently selected item.
    +   *
    +   * If no item is currently selected, the method returns -1. <br> If
    +   * the combo-box is \link setEditable() editable\endlink and the
    +   * entered text does not match an existing item, then this method
    +   * also returns -1. Otherwise the index is returned of the first item
    +   * that matches the value of currentText().
    +   */
    +  int currentIndex() const;
    +
    +  /*! \brief Insert an option item at the specified position.
    +   *
    +   * The option item is inserted at position <i>index</i>.
    +   */
    +  void insertItem(int index, const WString& text);
    +
    +  /*! \brief Remove the option item at the specified position.
    +   *
    +   * The option item at position <i>index</i> will be removed.
    +   */
    +  void removeItem(int index);
    +
    +  /*! \brief Change the current selection.
    +   *
    +   * Specify a value of -1 for <i>index</i> to clear the selection.
    +   */
    +  void setCurrentIndex(int index);
    +
    +  /*! \brief Change the text for a specified option.
    +   *
    +   * Use this method to change the text for the item at position <i>index</i>.
    +   */
    +  void setItemText(int index, const WString& text);
    +
    +  /*! \brief Get the text of the currently selected item.
    +   *
    +   * This retrieves the current text entered by the user. When the
    +   * combo-box is \link setEditable() editable\endlink, this may be
    +   * text that does not correspond to any of the items.
    +   */
    +  const WString currentText() const;
    +
    +  /*! \brief Get the text of a particular item.
    +   *
    +   * Use this method to get the text for the item at position <i>index</i>.
    +   */
    +  const WString itemText(int index) const;
    +
    +  /*! \brief Set the model to be used for the items.
    +   *
    +   * The <i>model</i> may not be 0, and ownership of the model is
    +   * not transferred.
    +   *
    +   * \sa setModelColumn(int)
    +   */
    +  void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Set the column in the model to be used for the items.
    +   *
    +   * The column <i>index</i> in the model will be used to retrieve data.
    +   *
    +   * \sa setModel()
    +   */
    +  void setModelColumn(int index);
    +
    +  /*! \brief Set if the combo-box is editable.
    +   *
    +   * An editable combo-box allows the user to specify a value that is not
    +   * part of the list of values.
    +   *
    +   * The default is false.
    +   *
    +   * \sa currentText()
    +   */
    +  void setEditable(bool how);
    +
    +  /*! \brief Configure the delay to filter the list matching the current input.
    +   *
    +   * After the a delay of <i>milliSeconds</i> milli seconds, the list
    +   * items are filtered to match the currently entered text and the
    +   * drop-down list is updated. It is recommended to specify a
    +   * non-zero delay when using a Remote \link setDataLocation() data
    +   * location\endlink.
    +   *
    +   * The default is 0.
    +   *
    +   * \sa setMinQueryLength(int)
    +   */
    +  void setQueryDelay(int milliSeconds);
    +
    +  /*! \brief Configure the minimum number of characters to be entered
    +   *         before filtering the drop-down list.
    +   *
    +   * Values in the drop-down list will only be filtered when the entered
    +   * text contains more that <i>numChars</i> characters.
    +   *
    +   * The default value is 4.
    +   *
    +   * \sa setQueryDelay(int)
    +   */ 
    +  void setMinQueryLength(int numChars);
    +
    +  /*! \brief Configure a page size to show matching values one page at a time
    +   *
    +   * At most <i>pageSize</i> matches will be shown at the same time in the
    +   * combo-box.
    +   *
    +   * The default value is 0 (no paging).
    +   */
    +  void setPageSize(int pageSize);
    +
    +  /*! \brief Configure the location of the data for the combo-box.
    +   *
    +   * When a ClientSide data location is specified, all data for the combo-box
    +   * is downloaded when the combo-box is created. Using a ServerSide data
    +   * location, data is downloaded to the client only when needed.
    +   *
    +   * The defualt value is ClientSide.
    +   */
    +  void setDataLocation(DataLocation dataLocation);
    +
    +  void setLoadingText(const WString& text);
    +
    +  virtual void refresh();
    +
    +  /*! \brief Clear all items.
    +   */
    +  void clear();
    +
    +public:
    +  /*! \brief %Signal emitted when the selection changed.
    +   */
    +  JSignal<int>& activated() { return activated_; }
    +
    +protected:
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  JSignal<int>        activated_;
    +  DataLocation        dataLocation_;
    +  bool                editable_;
    +  int                 queryDelay_;
    +  int                 minQueryLength_;
    +  int                 pageSize_;
    +  WAbstractItemModel *model_;
    +  int                 modelColumn_;
    +
    +  DataStore          *dataStore_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  void modelColumnsInserted(const WModelIndex& parent, int start, int end);
    +  void modelColumnsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelRowsInserted(const WModelIndex& parent, int start, int end);
    +  void modelRowsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelDataChanged(const WModelIndex& topLeft,
    +			const WModelIndex& bottomRight);
    +  void modelLayoutChanged();
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_COMBOBOX_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/ComboBox.C b/wt-3.1.7a/src/Wt/Ext/ComboBox.C
    new file mode 100644
    index 0000000..0ac2ed7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ComboBox.C
    @@ -0,0 +1,282 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/ComboBox"
    +#include "Wt/WLineEdit"
    +#include "Wt/WStringListModel"
    +#include "DataStore"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +ComboBox::ComboBox(WContainerWidget *parent)
    +  : LineEdit(parent),
    +    activated_(this, "activated", true),
    +    dataLocation_(ClientSide),
    +    editable_(false),
    +    queryDelay_(-1),
    +    minQueryLength_(4),
    +    pageSize_(0),
    +    model_(0),
    +    modelColumn_(0),
    +    dataStore_(0)
    +{
    +  //extjs: combobox doesn't stand a parent with display: none
    +  setHideWithOffsets(true);
    +
    +  setModel(new WStringListModel(this));
    +}
    +
    +void ComboBox::setDataLocation(DataLocation dataLocation)
    +{
    +  dataLocation_ = dataLocation;
    +}
    +
    +void ComboBox::setEditable(bool how)
    +{
    +  editable_ = how;
    +}
    +
    +void ComboBox::setQueryDelay(int milliSeconds)
    +{
    +  queryDelay_ = milliSeconds;
    +}
    +
    +void ComboBox::setPageSize(int pageSize)
    +{
    +  pageSize_ = pageSize;
    +}
    +
    +void ComboBox::setMinQueryLength(int numChars)
    +{
    +  minQueryLength_ = numChars;
    +}
    +
    +void ComboBox::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +
    +  modelConnections_.push_back
    +    (model_->columnsInserted().connect(this, &ComboBox::modelColumnsInserted));
    +  modelConnections_.push_back
    +    (model_->columnsRemoved().connect(this, &ComboBox::modelColumnsRemoved));
    +  modelConnections_.push_back
    +    (model_->rowsInserted().connect(this, &ComboBox::modelRowsInserted));
    +  modelConnections_.push_back
    +    (model_->rowsRemoved().connect(this, &ComboBox::modelRowsRemoved));
    +  modelConnections_.push_back
    +    (model_->dataChanged().connect(this, &ComboBox::modelDataChanged));
    +  modelConnections_.push_back
    +    (model_->layoutChanged().connect(this, &ComboBox::modelLayoutChanged));
    +  modelConnections_.push_back
    +    (model_->modelReset().connect(this, &ComboBox::modelLayoutChanged));
    +
    +  modelLayoutChanged();
    +}
    +
    +void ComboBox::modelLayoutChanged()
    +{
    +  if (dataStore_) {
    +    dataStore_->setModel(model_);
    +    repaint();
    +  }
    +}
    +
    +void ComboBox::setModelColumn(int index)
    +{
    +  modelColumn_ = index;
    +}
    +
    +void ComboBox::addItem(const WString& text)
    +{
    +  insertItem(count(), text);
    +}
    +
    +int ComboBox::count() const
    +{
    +  return model_->rowCount();
    +}
    +
    +int ComboBox::currentIndex() const
    +{
    +  for (int i = 0; i < count(); ++i) {
    +    if (itemText(i) == lineEdit()->text())
    +      return i;
    +  }
    +
    +  return -1;
    +}
    +
    +void ComboBox::insertItem(int index, const WString& text)
    +{
    +  if (model_->insertRow(index))
    +    setItemText(index, text);
    +}
    +
    +void ComboBox::removeItem(int index)
    +{
    +  model_->removeRow(index);
    +}
    +
    +void ComboBox::setCurrentIndex(int index)
    +{
    +  int newIndex = std::min(index, count() - 1);
    +
    +  if (newIndex == -1) {
    +    if (isRendered())
    +      addUpdateJS(elVar() + ".setValue('');");
    +
    +    lineEdit()->setText(WString());
    +  } else {
    +    WModelIndex modelIndex = model_->index(index, modelColumn_);
    +    const boost::any& v = model_->data(modelIndex);
    +
    +    if (isRendered())
    +      addUpdateJS(elVar() + ".setValue("
    +		  + Wt::Impl::asJSLiteral(v, model_->flags(modelIndex)
    +					  & ItemIsXHTMLText)
    +		  + ");");
    +
    +    lineEdit()->setText(asString(v));
    +  }
    +}
    +
    +void ComboBox::setItemText(int index, const WString& text)
    +{
    +  model_->setData(index, modelColumn_, boost::any(text));
    +}
    +
    +const WString ComboBox::currentText() const
    +{
    +  return lineEdit()->text();
    +}
    +
    +const WString ComboBox::itemText(int index) const
    +{
    +  return asString(model_->data(index, modelColumn_));
    +}
    +
    +void ComboBox::setLoadingText(const WString& text)
    +{
    +  //NYI
    +}
    +
    +void ComboBox::clear()
    +{
    +  model_->removeRows(0, count());
    +}
    +
    +void ComboBox::modelColumnsInserted(const WModelIndex& parent,
    +				    int start, int end)
    +{
    +  //TODO: refill
    +}
    +
    +void ComboBox::modelColumnsRemoved(const WModelIndex& parent,
    +				   int start, int end)
    +{
    +  //TODO: refill
    +}
    +
    +void ComboBox::modelRowsInserted(const WModelIndex& parent, int start, int end)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelRowsInserted(start, end);
    +    repaint();
    +  }
    +}
    +
    +void ComboBox::modelRowsRemoved(const WModelIndex& parent, int start, int end)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelRowsRemoved(start, end);
    +    repaint();
    +  }
    +}
    +
    +void ComboBox::modelDataChanged(const WModelIndex& topLeft,
    +				const WModelIndex& bottomRight)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelDataChanged(topLeft, bottomRight);
    +    repaint();
    +  }
    +}
    +
    +void ComboBox::refresh()
    +{
    +  if (model_->rowCount() > 0)
    +    modelDataChanged
    +      (model_->index(0, 0),
    +       model_->index(model_->columnCount() - 1, model_->rowCount() - 1));
    +
    +  LineEdit::refresh();
    +}
    +
    +void ComboBox::updateExt()
    +{
    +  addUpdateJS(elVar() + ".clearValue();");
    +  addUpdateJS(dataStore_->jsGetUpdates(elVar() + ".store"));
    +  updateWtSignal(&activated_, activated_.name(), "",
    +		 elVar() + ".selectedIndex");
    +  setCurrentIndex(currentIndex());
    +}
    +
    +std::string ComboBox::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.form.ComboBox(" << configStruct() << ");";
    +  result << dataStore_->jsCreateRecordDef(elVar() + ".store");
    +
    +  bindEventHandler("select", "selectH", result);
    +
    +  applyToWidget(lineEdit(), result, inContainer);
    +
    +  return result.str();
    +}
    +
    +void ComboBox::createConfig(std::ostream& config)
    +{
    +  if (!dataStore_) {
    +    dataStore_ = new DataStore(model_, dataLocation_, this);
    +    dataStore_->addColumn(modelColumn_, "c0");
    +    dataStore_->setFilterColumn(modelColumn_);
    +  }
    +
    +  std::string store = dataStore_->jsCreateStore();
    +  std::string mode = dataLocation_ == ClientSide ? "'local'" : "'remote'";
    +
    +  config << ",store: " << store
    +	 << ",displayField:'c0',typeAhead:true,triggerAction:'all',mode:"
    +	 << mode;
    +
    +  if (!editable_)
    +    config << ",forceSelection:true";
    +  if (minQueryLength_ != 4)
    +    config << ",minChars:" << minQueryLength_;
    +  if (queryDelay_ != -1)
    +    config << ",queryDelay:" << queryDelay_ + 1;
    +  if (pageSize_ != 0)
    +    config << ",pageSize:" << pageSize_;
    +
    +  addWtSignalConfig("selectH", &activated_, activated_.name(),
    +		    "", elVar() + ".selectedIndex", config);  
    +
    +  LineEdit::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/Component b/wt-3.1.7a/src/Wt/Ext/Component
    new file mode 100644
    index 0000000..cab670f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Component
    @@ -0,0 +1,58 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_COMPONENT_H_
    +#define EXT_COMPONENT_H_
    +
    +#include <Wt/Ext/Widget>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class Component Wt/Ext/Component Wt/Ext/Component
    + *  \brief An abstract base class for widgets that can be visually disabled.
    + *
    + * %Component is the abstract base class of all major %Ext widgets,
    + * and offers an API to enable or disable a widget.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Component : public Widget
    +{
    +protected:
    +  Component(WContainerWidget *parent = 0);
    +
    +public:
    +  /*! \brief Enable or disable the widget.
    +   */
    +  void setEnabled(bool how);
    +
    +  /*! \brief Enable the widget.
    +   */
    +  void enable();
    +
    +  /*! \brief Disable the widget.
    +   */
    +  void disable();
    +
    +  /*! \brief Return if enabled.
    +   */
    +  bool isEnabled() const { return enabled_; }
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  bool enabled_;
    +
    +  void undoEnable();
    +  bool wasEnabled_;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_COMPONENT_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Component.C b/wt-3.1.7a/src/Wt/Ext/Component.C
    new file mode 100644
    index 0000000..5435b36
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Component.C
    @@ -0,0 +1,55 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/Component"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Component::Component(WContainerWidget *parent)
    +  : Widget(parent),
    +    enabled_(true)
    +{
    +  implementStateless(&Component::enable, &Component::undoEnable);
    +  implementStateless(&Component::disable, &Component::undoEnable);
    +}
    +
    +void Component::enable()
    +{
    +  wasEnabled_ = enabled_;
    +  setEnabled(true);
    +}
    +
    +void Component::disable()
    +{
    +  wasEnabled_ = enabled_;
    +  setEnabled(false);
    +}
    +
    +void Component::undoEnable()
    +{
    +  setEnabled(wasEnabled_);
    +}
    +
    +void Component::setEnabled(bool how)
    +{
    +  enabled_ = how;
    +
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".setDisabled(" + (how ? "false" : "true") + ");");
    +}
    +
    +void Component::createConfig(std::ostream& config)
    +{ 
    +  Widget::createConfig(config);
    +
    +  if (!enabled_)
    +    config << ",disabled:true";
    +
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/Container b/wt-3.1.7a/src/Wt/Ext/Container
    new file mode 100644
    index 0000000..b095446
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Container
    @@ -0,0 +1,126 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_CONTAINER_H_
    +#define EXT_CONTAINER_H_
    +
    +#include <Wt/Ext/Component>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +    class LayoutImpl;
    +    class TabWidget;
    +
    +/*! \class Container Wt/Ext/Container Wt/Ext/Container
    + *  \brief A container class which manages its contents using layout managers.
    + *
    + * The %Container is the %Ext equivalent of WContainerWidget, and
    + * manages other widgets. Unlike %WContainerWidget, %Container can
    + * only use layout managers to manage its content.
    + *
    + * Typically, panels will be added directly into a layout (which may
    + * be part of an Ext::Container or a WContainerWidget), and are
    + * components to organize your user interface. You may also add a
    + * container inside a plain WContainerWidget, but then you should set
    + * a size for the container (using WWidget::resize()), in pixels.
    + *
    + * In most cases, using a Panel is more convenient than a Container,
    + * since a Panel also manages standard GUI components (such as
    + * menu/tool bars), and interactive controls (for resizing, for
    + * example). There is however one case where you need to use a
    + * Container, which is when you wish to use a layout manager to manage
    + * the contents of the entire view port. In that case, you should use
    + * a Container to represent the view port, by adding the Container as
    + * only child directly to the application's WApplication::root()
    + * container.
    + *
    + * For example, the following creates a top borderlayout that spans
    + * the entire viewport:
    + * \code
    + * Wt::Ext::Container *rootContainer = new Wt::Ext::Container(app->root());
    + * Wt::WBorderLayout *topLayout = new Wt::WBorderLayout()
    + * rootContainer->setLayout(topLayout);
    + * \endcode
    + */
    +class WT_EXT_API Container : public Component
    +{
    +public:
    +  /*! \brief Create a new container.
    +   *
    +   * When a <i>parent</i> is specified, or the container is after
    +   * construction added to a WContainerWidget, the container should be
    +   * given an explicit size in pixels, using WWidget::resize().
    +   */
    +  Container(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destroy the container.
    +   */
    +  virtual ~Container();
    +
    +  /*! \brief Set a layout manager for the container.
    +   *
    +   * Only a single layout manager may be set. Note that you can nest
    +   * layout managers inside each other, to create a complex layout
    +   * hierarchy.
    +   *
    +   * \sa layout()
    +   */
    +  void setLayout(WLayout *layout);
    +
    +  /*! \brief Get the layout manager that was set for the container.
    +   *
    +   * If no layout manager was previously set using setLayout(WLayout
    +   * *), a default layout manager is created (WDefaultLayout), which
    +   * does not attempt to size widgets to fit the entire container
    +   * region.
    +   *
    +   * \sa setLayout(WLayout *)
    +   */
    +  WLayout *layout();
    +
    +protected:
    +  virtual std::string createJS(DomElement *inContainer);
    +  virtual void createConfig(std::ostream& config);
    +
    +  virtual std::string extClassName() const;
    +
    +  virtual void removeChild(WWidget *child);
    +
    +  virtual void getDomChanges(std::vector<DomElement *>& result,
    +			     WApplication *app);
    +
    +private:
    +  WLayout  *layout_;
    +  WWidget  *widget_;
    +  bool     layoutChanged_;
    +
    +  bool inWtLayout() const;
    +
    +  void setWidget(WWidget *widget);
    +  WWidget *widget() const { return widget_; }
    +
    +  void addLayoutConfig(Widget *w, std::ostream& config);
    +  static void setSizeConfig(std::ostream& config, WWidget *w);
    +  virtual bool applySelfCss() const;
    +
    +  void add(WWidget *w);
    +
    +  void setLayoutChanged();
    +
    +  virtual WLayoutItemImpl *createLayoutItemImpl(WLayoutItem *item);
    +  Ext::LayoutImpl *layoutImpl() const;
    +
    +  friend class Ext::LayoutImpl;
    +  friend class Widget;
    +  friend class WWidgetItemImpl;
    +  friend class TabWidget;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_CONTAINER_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Container.C b/wt-3.1.7a/src/Wt/Ext/Container.C
    new file mode 100644
    index 0000000..d39effd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Container.C
    @@ -0,0 +1,273 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/Container"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLogger"
    +
    +#include "Wt/Ext/AccordionLayoutImpl.h"
    +#include "Wt/Ext/BorderLayoutImpl.h"
    +#include "Wt/Ext/DefaultLayoutImpl.h"
    +#include "Wt/Ext/FitLayoutImpl.h"
    +#include "Wt/Ext/WWidgetItemImpl.h"
    +
    +#include "Wt/WAccordionLayout"
    +#include "Wt/WBorderLayout"
    +#include "Wt/WDefaultLayout"
    +#include "Wt/WFitLayout"
    +#include "Wt/WWidgetItem"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Container::Container(WContainerWidget *parent)
    +  : Component(parent),
    +    layout_(0),
    +    widget_(0),
    +    layoutChanged_(false)
    +{
    +  setInline(false);
    +
    +  setHideWithOffsets();
    +}
    +
    +Container::~Container()
    +{
    +  delete layout_;
    +}
    +
    +WLayout *Container::layout()
    +{
    +  if (!layout_)
    +    setLayout(new WDefaultLayout());
    +
    +  return layout_;
    +}
    +
    +Ext::LayoutImpl *Container::layoutImpl() const
    +{
    +  return dynamic_cast<Ext::LayoutImpl *>(layout_->impl());
    +}
    +
    +void Container::setLayout(WLayout *layout)
    +{
    +  if (layout_) {
    +    wApp->log("error") << "Container::setLayout: already have a layout.";
    +    return;
    +  }
    +
    +  layout_ = layout;
    +
    +  WWidget::setLayout(layout);
    +
    +  layoutImpl()->setContainer(this);
    +}
    +
    +void Container::setWidget(WWidget *w)
    +{
    +  widget_ = w;
    +  widget_->setInline(false);
    +  addOrphan(widget_);
    +}
    +
    +void Container::add(WWidget *widget)
    +{
    +  addOrphan(widget);
    +}
    +
    +void Container::removeChild(WWidget *child)
    +{
    +  if (layout_)
    +    layout_->removeWidget(child);
    +
    +  if (widget_ == child)
    +    widget_ = 0;
    +
    +  Component::removeChild(child);
    +}
    +
    +std::string Container::extClassName() const
    +{
    +  WContainerWidget* appRoot = WApplication::instance()->root();
    +  if (parent() == appRoot && appRoot->children().size() == 1)
    +    return "Ext.Viewport";
    +  else
    +    return "Ext.Panel";
    +}
    +
    +std::string Container::createJS(DomElement *inContainer)
    +{
    +  assert(inContainer);
    +
    +  if (inWtLayout()) {
    +    inContainer->setProperty(PropertyStylePosition, "relative");
    +    inContainer->setProperty(PropertyStyleWidth, "0px");
    +    inContainer->callMethod("wtResize ="
    +			    "function(self, w, h){ "
    +			    + elVar() + ".setSize(w, h);"
    +			    """if (w == 0) {"
    +			    """self.style.width='';"
    +			    """window.onresize();"
    +			    "}};");
    +  }
    +
    +  std::string result;
    +
    +  if (widget_) {
    +    std::string s = widget_->styleClass().toUTF8() + " x-hidden";
    +    DomElement *c = widget_->createSDomElement(WApplication::instance());
    +    c->setAttribute("class", s);
    +    inContainer->addChild(c);
    +  }
    +
    +  if (layout_)
    +    layoutImpl()->createComponents(inContainer);
    +
    +  result += elVar() + "=new " + extClassName() + "(" + configStruct() + ");";
    +
    +  if (layout_)
    +    result += elVar() + ".on('afterlayout', function(){"
    +      + WApplication::instance()->javaScriptClass()
    +      + "._p_.autoJavaScript();});";
    +
    +  return result;
    +}
    +
    +void Container::setSizeConfig(std::ostream& config, WWidget *w)
    +{
    +  if (!w->width().isAuto())
    +    config << ",width:" << w->width().toPixels();
    +
    +  if (!w->height().isAuto())
    +    config << ",height:" << w->height().toPixels();
    +
    +  if (!w->minimumWidth().isAuto())
    +    config << ",minWidth:" << w->minimumWidth().toPixels();
    +
    +  if (!w->minimumHeight().isAuto())
    +    config << ",minHeight:" << w->minimumHeight().toPixels();
    +
    +  if (!w->maximumWidth().isAuto())
    +    config << ",maxWidth:" << w->maximumWidth().toPixels();
    +
    +  if (!w->maximumHeight().isAuto())
    +    config << ",maxHeight:" << w->maximumHeight().toPixels();
    +}
    +
    +void Container::setLayoutChanged()
    +{
    +  layoutChanged_ = true;
    +  repaint();
    +}
    +
    +bool Container::applySelfCss() const
    +{
    +  return false;
    +}
    +
    +bool Container::inWtLayout() const
    +{
    +  WWidget *p = parent();
    +
    +  if (p)
    +    p = p->parent();
    +
    +  WContainerWidget *wc = dynamic_cast<WContainerWidget *>(p);
    +
    +  return wc && wc->layout();
    +}
    +
    +void Container::getDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app)
    +{
    +  if (layoutChanged_) {
    +    layoutImpl()->getLayoutChanges(id(), result);
    +    layoutChanged_ = false;
    +  }
    +  Component::getDomChanges(result, app);
    +}
    +
    +void Container::createConfig(std::ostream& config)
    +{
    +  Component::createConfig(config);
    +
    +  WApplication *app = WApplication::instance();
    +
    +  WWidget *p = parent();
    +
    +  if (!dynamic_cast<Container *>(p)
    +      && extClassName() != "Ext.Viewport" && p != app->domRoot()) {
    +
    +    config << ",renderTo:'" << id() << "'";
    +
    +    if (inWtLayout())
    +      config << ",style:'position:absolute;'";
    +  } else {
    +    // because it is relative it sets over the actual interface.
    +    app->styleSheet().addRule(".Wt-domRoot", "position: static;");
    +  }
    +
    +  if (widget_)
    +    config << ",contentEl:'" << widget_->id() << "',autoShow:true";
    +
    +  setSizeConfig(config, this);
    +
    +  if (layout_)
    +    layoutImpl()->createConfig(config);
    +}
    +
    +void Container::addLayoutConfig(Widget *w, std::ostream& config)
    +{
    +  if (layout_) {
    +    WWidgetItem *item = layout_->findWidgetItem(w);
    +    if (item)
    +      dynamic_cast<WWidgetItemImpl *>(item->impl())->addConfig(config);
    +  }
    +}
    +
    +WLayoutItemImpl *Container::createLayoutItemImpl(WLayoutItem *item)
    +{
    +  {
    +    WWidgetItem *wi = dynamic_cast<WWidgetItem *>(item);
    +    if (wi)
    +      return new WWidgetItemImpl(wi);
    +  }
    +
    +  {
    +    WAccordionLayout *l = dynamic_cast<WAccordionLayout *>(item);
    +    if (l)
    +      return new AccordionLayoutImpl(l);
    +  }
    +
    +  {
    +    WBorderLayout *l = dynamic_cast<WBorderLayout *>(item);
    +    if (l)
    +      return new BorderLayoutImpl(l);
    +  }
    +
    +  {
    +    WDefaultLayout *l = dynamic_cast<WDefaultLayout *>(item);
    +    if (l)
    +      return new DefaultLayoutImpl(l);
    +  }
    +
    +  {
    +    WFitLayout *l = dynamic_cast<WFitLayout *>(item);
    +    if (l)
    +      return new FitLayoutImpl(l);
    +  }
    +
    +  assert(false);
    +
    +  return 0;
    +}
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/DataStore b/wt-3.1.7a/src/Wt/Ext/DataStore
    new file mode 100644
    index 0000000..ea65b80
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DataStore
    @@ -0,0 +1,112 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DATA_STORE_H_
    +#define DATA_STORE_H_
    +
    +#include <string>
    +#include <Wt/WResource>
    +#include <Wt/Ext/Widget>
    +#include <Wt/Ext/ExtDllDefs.h>
    +
    +namespace Wt {
    +
    +  class WAbstractItemModel;
    +  class WModelIndex;
    +
    +  namespace Ext {
    +
    +/*! \class DataStore Wt/Ext/DataStore Wt/Ext/DataStore
    + *  \brief A resource that serializes data from a data model
    + *
    + * An instance of this class is used by ComboBox and TableView widgets
    + * to serialize data from a WAbstractItemModel. The data store can
    + * serialize data both for a ClientSide or ServerSide location of the data.
    + * When the location is ServerSide, the model supports transmission of
    + * certain data pages, and filtering of the model.
    + *
    + * To use the data store, you need to specify which columns from the model
    + * need to be serialized.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API DataStore : public WResource
    +{
    +public:
    +  /*! \brief Create a new data store.
    +   *
    +   * Data will be fecthed from <i>model</i>.
    +   */
    +  DataStore(WAbstractItemModel *model, DataLocation dataLocation,
    +	    WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~DataStore();
    +
    +  /*! \brief Add a column to the list of columns to be serialized.
    +   *
    +   * The column <i>columnIndex</i> of the model is added to the current
    +   * list of columns that are serialized. The <i>jsonName</i> provides the
    +   * column label that is transmitted.
    +   */
    +  void addColumn(int columnIndex, const std::string& jsonName);
    +
    +  /*! \brief Set the column which is used to handle filter requests.
    +   *
    +   * A request for filtering data will be done by matching the given filter
    +   * against data in the model at column <i>columnIndex</i>.
    +   */
    +  void setFilterColumn(int columnIndex);
    +
    +  std::string jsCreateStore();
    +  std::string jsCreateRecordDef(const std::string& storeVar) const;
    +
    +  void setModel(WAbstractItemModel *model);
    +  void modelRowsInserted(int start, int end);
    +  void modelRowsRemoved(int start, int end);
    +  void modelDataChanged(const WModelIndex& topLeft,
    +			const WModelIndex& bottomRight);
    +
    +  std::string jsGetUpdates(const std::string& storeVar);
    +
    +  int rowFromId(int id) const;
    +
    +  std::string load(const std::string& storeVar, int pageSize);
    +
    +protected:
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +
    +private:
    +  WAbstractItemModel *model_;
    +  DataLocation        dataLocation_;
    +  std::vector<int>    recordIds_; // -1 indicates new row
    +  int  nextId_;
    +  int  modelFilterColumn_;
    +
    +  struct Column {
    +    int         modelColumn;
    +    std::string fieldName;
    +
    +    Column(int aModelColumn, const std::string& aFieldName);
    +  };
    +
    +  std::vector<Column> columns_;
    +
    +  std::string      jsChanges_;    // changes in existing rows
    +  std::vector<int> rowsDeleted_;  // rows deleted
    +  bool             rowsInserted_;
    +  bool needRefresh_;
    +
    +  int getRecordId(int row);
    +  std::string dataAsJSLiteral(int row, int col) const;
    +};
    +
    +  }
    +}
    +
    +#endif // JSON_DATASTORE_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/DataStore.C b/wt-3.1.7a/src/Wt/Ext/DataStore.C
    new file mode 100644
    index 0000000..54d3321
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DataStore.C
    @@ -0,0 +1,357 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/DataStore"
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WWebWidget"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +DataStore::DataStore(WAbstractItemModel *model, DataLocation dataLocation,
    +		     WObject *parent)
    +  : WResource(parent),
    +    model_(model),
    +    dataLocation_(dataLocation),
    +    nextId_(0),
    +    modelFilterColumn_(-1),
    +    rowsInserted_(false),
    +    needRefresh_(false)
    +{ 
    +  for (int i = 0; i < model->rowCount(); ++i) {
    +    recordIds_.push_back(-1);
    +    rowsInserted_ = true;
    +  }
    +}
    +
    +DataStore::~DataStore()
    +{
    +  beingDeleted();
    +}
    +
    +void DataStore::addColumn(int columnIndex, const std::string& fieldName)
    +{
    +  columns_.push_back(Column(columnIndex, fieldName));
    +}
    +
    +void DataStore::setFilterColumn(int columnIndex)
    +{
    +  modelFilterColumn_ = columnIndex;
    +}
    +
    +int DataStore::rowFromId(int id) const
    +{
    +  if (id == -1)
    +    return -1;
    +
    +  if (id < (int)recordIds_.size() && recordIds_[id] == id)
    +    return id;
    +
    +  for (unsigned i = 0; i < recordIds_.size(); ++i)
    +    if (recordIds_[i] == id)
    +      return i;
    +
    +  return -1;
    +}
    +
    +int DataStore::getRecordId(int row)
    +{
    +  if (recordIds_[row] == -1)
    +    recordIds_[row] = nextId_++;
    +
    +  return recordIds_[row];
    +}
    +
    +std::string DataStore::load(const std::string& storeVar, int pageSize)
    +{
    +  if (dataLocation_ == ServerSide) {
    +    return storeVar
    +      + ".load({params:{start:0,limit:"
    +      + boost::lexical_cast<std::string>(pageSize) + "}});"; 
    +  } else
    +    return std::string();
    +}
    +
    +std::string DataStore::jsCreateStore()
    +{
    +  std::string store;
    +
    +  switch (dataLocation_) {
    +  case ClientSide:
    +    store += "new Ext.data.SimpleStore({fields:[";
    +
    +    for (unsigned i = 0; i < columns_.size(); ++i) {
    +      if (i != 0)
    +	store += ",";
    +      store += "{name:'c" + boost::lexical_cast<std::string>(i) + "',"
    +	"mapping:" + boost::lexical_cast<std::string>(i+1) + "}";
    +    }
    +
    +    store += "],data:[";
    +
    +    for (int i = 0; i < model_->rowCount(); ++i) {
    +      if (i != 0)
    +	store += ",";
    +      store += "[" + boost::lexical_cast<std::string>(getRecordId(i));
    +      for (unsigned j = 0; j < columns_.size(); ++j)
    +	store += "," + dataAsJSLiteral(i, columns_[j].modelColumn);
    +      store += "]";
    +    }
    +
    +    store += "],id:0})";
    +
    +    break;
    +  case ServerSide:
    +    store = "new Ext.data.Store({"
    +      "proxy: new Ext.data.HttpProxy({"
    +        "url:'" + generateUrl() + "'"
    +      "}),"
    +      "reader: new Ext.data.JsonReader({"
    +        "totalProperty:'count',"
    +        "root:'data',"
    +        "id:'id'"
    +      "},[";
    +
    +    for (unsigned i = 0; i < columns_.size(); ++i) {
    +      if (i != 0)
    +	store += ",";
    +      store += "{name:'c" + boost::lexical_cast<std::string>(i) + "'}";
    +    }
    +
    +    store +="])})";
    +  }
    +
    +  rowsInserted_ = false;
    +  rowsDeleted_.clear();
    +  jsChanges_.clear();
    +
    +  return store;
    +}
    +
    +std::string DataStore::jsCreateRecordDef(const std::string& storeVar) const
    +{
    +  std::string recordDef = "Ext.data.Record.create([";
    +
    +  for (unsigned i = 0; i < columns_.size(); ++i) {
    +    if (i != 0)
    +      recordDef += ",";
    +    recordDef += "{name:'c" + boost::lexical_cast<std::string>(i) + "',"
    +      "mapping:" + boost::lexical_cast<std::string>(i+1) + "}";
    +  }
    +
    +  recordDef += "])";
    +
    +  std::string result;
    +
    +  result = storeVar + ".recordDef=" + recordDef + ";";
    +
    +  return result;
    +}
    +
    +void DataStore::setModel(WAbstractItemModel *model)
    +{
    +  model_ = model;
    +
    +  jsChanges_ = "store.removeAll();";
    +  rowsDeleted_.clear();
    +
    +  recordIds_.clear();
    +
    +  for (int i = 0; i < model_->rowCount(); ++i) {
    +    recordIds_.push_back(-1);
    +  }
    +  rowsInserted_ = true;
    +
    +  if (dataLocation_ == ServerSide)
    +    needRefresh_ = true;
    +}
    +
    +std::string DataStore::dataAsJSLiteral(int row, int col) const
    +{
    +  WModelIndex index = model_->index(row, col);
    +
    +  return Wt::Impl::asJSLiteral(model_->data(index),
    +			       model_->flags(index) & ItemIsXHTMLText);
    +}
    +
    +std::string DataStore::jsGetUpdates(const std::string& storeVar)
    +{
    +  if (dataLocation_ == ClientSide) {
    +    if (jsChanges_.empty() && rowsDeleted_.empty() && !rowsInserted_)
    +      return std::string();
    +
    +    std::stringstream result;
    +
    +    result << "{var store=" << storeVar
    +	   << ";store.clearFilter();var RD=store.recordDef;";
    +  
    +    result << jsChanges_;
    +    jsChanges_.clear();
    +
    +    for (int i = rowsDeleted_.size() - 1; i >= 0; --i) {
    +      result << "store.remove(store.getById(" << rowsDeleted_[i] << "));";
    +    }
    +    rowsDeleted_.clear();
    +
    +    if (rowsInserted_) {
    +      for (int i = 0; i < model_->rowCount(); ++i) {
    +	if (recordIds_[i] == -1) {
    +	  result << "store.insert(" << i << ",[new RD({";
    +
    +	  for (unsigned j = 0; j < columns_.size(); ++j) {
    +	    if (j != 0)
    +	      result << ',';
    +	    result << "'c" << j << "':"
    +		   << dataAsJSLiteral(i, columns_[j].modelColumn);
    +	  }
    +
    +	  result << "}," << getRecordId(i) << ")]);";
    +	}
    +      }
    +
    +      rowsInserted_ = false;
    +    }
    +
    +    result << "};";
    +
    +    return result.str();
    +  } else {
    +    if (needRefresh_) {
    +      needRefresh_ = false;
    +      return storeVar + ".reload();";
    +    } else
    +      return std::string();
    +  }
    +}
    +
    +void DataStore::modelRowsInserted(int start, int end)
    +{
    +  for (int i = start; i <= end; ++i)
    +    recordIds_.insert(recordIds_.begin() + i, -1);
    +
    +  rowsInserted_ = true;
    +  needRefresh_ = true;
    +}
    +
    +void DataStore::modelRowsRemoved(int start, int end)
    +{
    +  if (dataLocation_ == ClientSide) {
    +    for (int i = start; i <= end; ++i)
    +      if (recordIds_[i] != -1)
    +	rowsDeleted_.push_back(recordIds_[i]);
    +  } else
    +    needRefresh_ = true;
    +
    +  for (int i = start; i <= end; ++i)
    +    recordIds_.erase(recordIds_.begin() + start);
    +}
    + 
    +void DataStore::modelDataChanged(const WModelIndex& topLeft,
    +				 const WModelIndex& bottomRight)
    +{
    +  if (dataLocation_ == ClientSide) {
    +    for (int i = topLeft.row(); i <= bottomRight.row(); ++i) {
    +      if (recordIds_[i] == -1)
    +	continue;
    +
    +      for (unsigned j = 0; j < columns_.size(); ++j) {
    +	const Column& c = columns_[j];
    +
    +	if (c.modelColumn >= topLeft.column()
    +	    && c.modelColumn <= bottomRight.column()) {
    +
    +	  jsChanges_ += "store.getById("
    +	    + boost::lexical_cast<std::string>(recordIds_[i]) + ").set('"
    +	    + c.fieldName + "',"
    +	    + dataAsJSLiteral(i, c.modelColumn) + ");";
    +	}
    +      }
    +    }
    +  } else
    +    needRefresh_ = true;
    +}
    +
    +void DataStore::handleRequest(const Http::Request& request,
    +			      Http::Response& response)
    +{
    +  response.setMimeType("text/x-json");
    +
    +  WModelIndexList matches;
    +
    +  if (modelFilterColumn_ != -1) {
    +    WString query;
    +
    +    const std::string *queryE = request.getParameter("query");
    +    if (queryE)
    +      query = WString::fromUTF8(*queryE);
    +
    +    matches = model_->match(model_->index(0, modelFilterColumn_),
    +			    DisplayRole, boost::any(query));
    +  }
    +
    +  int start = 0;
    +  int rowCount = (modelFilterColumn_ == -1 ?
    +		  model_->rowCount() : matches.size());
    +  int limit = rowCount;
    +
    +  const std::string *s;
    +
    +  s = request.getParameter("start");
    +  if (s)
    +    try {
    +      start = std::max(0, std::min(limit, boost::lexical_cast<int>(*s)));
    +    } catch (boost::bad_lexical_cast& e) {
    +      wApp->log("error") << "DataStore: start '" << s << "' is not-a-number.";
    +    }
    +
    +  s = request.getParameter("limit");
    +  if (s)
    +    try {
    +      limit = std::max(0, std::min(limit - start,
    +				   boost::lexical_cast<int>(*s)));
    +    } catch (boost::bad_lexical_cast& e) {
    +      wApp->log("error") << "DataStore: limit '" << s << "' is not-a-number.";
    +    }
    +
    +  std::ostream& o = response.out();
    +
    +  o << "{"
    +    << "'count':" << rowCount << ","
    +    << "'data':[";
    +
    +  for (int row = start; row < start + limit; ++row) {
    +    if (row != start)
    +      o << ",";
    +    o << "{";
    +
    +    int modelRow = modelFilterColumn_ == -1 ? row : matches[row].row();
    +
    +    o << "'id':" << getRecordId(modelRow);
    +
    +    for (unsigned j = 0; j < columns_.size(); ++j)
    +      o << ",'" << columns_[j].fieldName << "':"
    +	<< dataAsJSLiteral(modelRow, columns_[j].modelColumn);
    +
    +    o << "}";
    +  }
    +
    +  o << "]}";
    +}
    +
    +DataStore::Column::Column(int aModelColumn, const std::string& aFieldName)
    +  : modelColumn(aModelColumn),
    +    fieldName(aFieldName)
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/DateField b/wt-3.1.7a/src/Wt/Ext/DateField
    new file mode 100644
    index 0000000..ac75298
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DateField
    @@ -0,0 +1,83 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_DATEFIELD_H_
    +#define EXT_DATEFIELD_H_
    +
    +#include <Wt/Ext/LineEdit>
    +
    +namespace Wt {
    +
    +  class WDate;
    +
    +  namespace Ext {
    +
    +/*! \class DateField Wt/Ext/DateField Wt/Ext/DateField
    + *  \brief A form field for conveniently editing a date using a calendar popup.
    + *
    + * You can \link FormField::setValidator() set\endlink a
    + * WDateValidator to specify in more detail the valid range, and the
    + * client-side validation messages. When using a WDateValidator,
    + * however, make sure to use the same \link
    + * WDateValidator::setFormat() date format\endlink as the \link
    + * setFormat() format\endlink used by the field.
    + *
    + * Here is a snapshot taken on 01/09/2007 (shown as today), and with
    + * current value 12/09/2007 currently selected.
    + * \image html ExtDateField-1.png "DateField"
    + *
    + * \sa Calendar, WDatePicker
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API DateField : public LineEdit
    +{
    +public:
    +  /*! \brief Create a new date field.
    +   */
    +  DateField(WContainerWidget *parent = 0);
    +
    +  /*! \brief Set the date format.
    +   *
    +   * The syntax of the format string is the same as used by
    +   * WDate::toString(const WString&).
    +   *
    +   * The default value is 'dd/MM/yyyy'.
    +   *
    +   * \sa format()
    +   */
    +  void setFormat(const WString& format);
    +
    +  /*! \brief Return the date format.
    +   *
    +   * \sa setFormat()
    +   */
    +  const WString& format() const { return format_; }
    +
    +  /*! \brief Set the date value.
    +   */
    +  void setDate(const WDate& date);
    +
    +  /*! \brief Return the date value.
    +   *
    +   * When the date could not be parsed, an invalid date is returned
    +   * (for which WDate::isValid() returns false).
    +   */
    +  WDate date() const;
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  WString format_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_DATEFIELD_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/DateField.C b/wt-3.1.7a/src/Wt/Ext/DateField.C
    new file mode 100644
    index 0000000..6e882d8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DateField.C
    @@ -0,0 +1,60 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/DateField"
    +#include "Wt/WLineEdit"
    +#include "Wt/WDate"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +DateField::DateField(WContainerWidget *parent)
    +  : LineEdit(parent),
    +    format_("dd/MM/yyyy")
    +{
    +  //extjs: datefield doesn't stand a parent with display: none 
    +  setHideWithOffsets(true);
    +}
    +
    +void DateField::setFormat(const WString& format)
    +{
    +  WDate d = date();
    +  format_ = format;
    +  setDate(d);
    +}
    +
    +void DateField::setDate(const WDate& date)
    +{
    +  lineEdit()->setText(date.toString(format_));
    +}
    +
    +WDate DateField::date() const
    +{
    +  return WDate::fromString(lineEdit()->text(), format_);
    +}
    +
    +std::string DateField::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.form.DateField(" << configStruct() << ");";
    +
    +  applyToWidget(lineEdit(), result, inContainer);
    +
    +  return result.str();
    +}
    +
    +void DateField::createConfig(std::ostream& config)
    +{
    +  if (!validator())
    +    config << ",format:" << jsStringLiteral(WDate::extFormat(format_), '\'');
    +
    +  LineEdit::createConfig(config);
    +}
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.C b/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.C
    new file mode 100644
    index 0000000..0d39c97
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.C
    @@ -0,0 +1,21 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/DefaultLayoutImpl.h"
    +#include "Wt/WDefaultLayout"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +DefaultLayoutImpl::DefaultLayoutImpl(WDefaultLayout *layout)
    +  : LayoutImpl(layout)
    +{ }
    +
    +DefaultLayoutImpl::~DefaultLayoutImpl()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.h b/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.h
    new file mode 100644
    index 0000000..a3befcf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/DefaultLayoutImpl.h
    @@ -0,0 +1,27 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_DEFAULT_LAYOUT_IMPL_H_
    +#define EXT_DEFAULT_LAYOUT_IMPL_H_
    +
    +#include "Wt/Ext/LayoutImpl.h"
    +
    +namespace Wt {
    +
    +  class WDefaultLayout;
    +
    +  namespace Ext {
    +
    +class DefaultLayoutImpl : public LayoutImpl
    +{
    +public:
    +  DefaultLayoutImpl(WDefaultLayout *layout);
    +  ~DefaultLayoutImpl();
    +};
    +
    +  }
    +}
    +#endif // EXT_DEFAULT_LAYOUT_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Dialog b/wt-3.1.7a/src/Wt/Ext/Dialog
    new file mode 100644
    index 0000000..b1609d6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Dialog
    @@ -0,0 +1,241 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_DIALOG_H_
    +#define EXT_DIALOG_H_
    +
    +#include <Wt/WJavaScript>
    +#include <Wt/Ext/Panel>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class Button;
    +
    +/*! \class Dialog Wt/Ext/Dialog Wt/Ext/Dialog
    + *  \brief A dialog emulates a modal window that blocks the user-interface.
    + *
    + * A modal window blocks the user interface, and does not allow the
    + * user to interact with any other part of the user interface until
    + * the dialog is closed.
    + *
    + * There are two ways for using a %Dialog window.
    + *
    + * The easiest way is using the exec() method: after creating a
    + * %Dialog window, call the exec() method which blocks until
    + * the dialog window is closed, and returns the dialog
    + * result. Typically, an OK button will be connected to the accept()
    + * slot, and a Cancel button to the reject() slot. This solution has
    + * the drawback that it is not scalable to many concurrent sessions,
    + * since every recursive event loop (which is running during the
    + * exec() method) locks a thread. Therefore it is only suitable for
    + * software that doesn't need to scale (to thousands of users).
    + *
    + * A second way is by treating the %Dialog as another widget. The
    + * dialog may be closed by calling accept(), reject() or done() (or
    + * connecting a signal to one of these methods). This will hide the
    + * dialog and emit the finished() signal, which you then can listen
    + * for to process the dialog result and delete the dialog. Unlike
    + * other widgets, a dialog is hidden by default. You must use the
    + * method show() or setHidden(true) to show the dialog.
    + *
    + * Since %Dialog is a Panel, the dialog contents may be layed out
    + * inside the dialog using layout managers. To be compatible with
    + * WDialog howevere, a contents() method is provided which creates a
    + * WFitLayout that fits a single WContainerWidget widget inside the
    + * dialog.
    + *
    + * Only one %Dialog window may exist at any time in a single
    + * application. An attempt to instantiate a second dialog will result
    + * in undefined behaviour.
    + *
    + * The API is a superset of the WDialog API:
    + * <ul>
    + *   <li>has additional methods to manage standard buttons
    + *     (addButton(), removeButton(), buttons());</li> 
    + *   <li>may be resized by the user (unless disabled using
    + *     setSizeGripEnabled()).</li> 
    + * </ul>
    + *
    + * \image html ExtDialog-1.png "An example Dialog using BorderLayouts"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Dialog : public Panel
    +{
    +public:
    +  /*! \brief The result of a modal dialog execution.
    +   */
    +  enum DialogCode { Rejected, //!< Dialog closed with reject()
    +		    Accepted  //!< Dialog closed with accept()
    +  };
    +
    +  /*! \brief Construct a %Dialog with a given window title.
    +   *
    +   * Only a single %Dialog may be constructed at any time. Unlike
    +   * other widgets, a dialog should not need be added to a container
    +   * widget to be displayed.
    +   */
    +  Dialog(const WString& windowTitle = WString());
    +
    +  /*! \brief Destruct a %Dialog.
    +   */
    +  ~Dialog();
    +
    +  /*! \brief Set the dialog window title.
    +   *
    +   * Is the same as Panel::setTitle(const WString&)
    +   */
    +  void setWindowTitle(const WString& windowTitle);
    +
    +  /*! \brief Return the dialog window title.
    +   *
    +   * Is the same as Panel::title()
    +   */
    +  const WString& windowTitle() const { return Panel::title(); }
    +
    +  /*! \brief Return the dialog contents container.
    +   *
    +   * The first invocation to this method creates a single
    +   * WContainerWidget that is fitted in the panel content area, like
    +   * this:
    +   * \code
    +   * WContainerWidget *contents = new WContainerWidget();
    +   * dialog->setLayout(new WFitLayout());
    +   * dialog->layout()->addWidget(contents);
    +   * \endcode
    +   */
    +  WContainerWidget *contents() const;
    +
    +  /*! \brief Execute the dialog in a recursive event loop.
    +   *
    +   * Executes the dialog. This blocks the current thread of execution
    +   * until one of done(DialogCode), accept() or reject() is called.
    +   *
    +   * <i>Warning: using exec() does not scale to many concurrent
    +   * sessions, since the thread is locked.</i>
    +   *
    +   * \sa done(DialogCode r), accept(), reject()
    +   */
    +  DialogCode exec();
    +
    +  /*! \brief Stop a recursive event loop.
    +   *
    +   * Sets the dialog result, and ends a recursive event loop that was
    +   * started using the exec() method.
    +   */
    +  virtual void done(DialogCode r);
    +
    +  /*! \brief Stop a recursive event loop with result Accepted.
    +   *
    +   * \sa done(DialogCode), reject()
    +   */
    +  virtual void accept();
    +
    +  /*! \brief Stop a recursive event loop with result Rejected.
    +   *
    +   * \sa done(DialogCode), accept()
    +   */
    +  virtual void reject();
    +
    +  /*! \brief %Signal emitted when the recursive event loop is ended.
    +   *
    +   * \sa done(DialogCode), accept(), reject()
    +   */
    +  Signal<DialogCode>& finished() { return finished_; }
    +
    +  /*! \brief Return the result that was set for this dialog.
    +   *
    +   * \sa done(DialogCode)
    +   */
    +  DialogCode result() const { return result_; }
    +
    +  virtual void setHidden(bool hidden);
    +
    +  /*! \brief Add a button at the bottom of this dialog.
    +   *
    +   * Is the same as Panel::addFooterButton()
    +   */
    +  void addButton(Button *button);
    +
    +  /*! \brief Remove a button from the bottom of this dialog.
    +   *
    +   * The <i>button</i> must have been previously added using addButton().
    +   * Is the same as Panel::removeFooterButton()
    +   */
    +  void removeButton(Button *button);
    +
    +  /*! \brief Return the list of buttons at the bottom of this dialog.
    +   *
    +   * Is the same as Panel::footerButtons()
    +   */
    +  const std::vector<Button *>& buttons()
    +    const { return Panel::footerButtons(); }
    +
    +  /*! \brief Configure a default button for this dialog.
    +   *
    +   * The <i>button</i> must have been previously added using addButton().
    +   * A default button is activated when the user presses Return in the
    +   * dialog.
    +   *
    +   * \sa Button::setDefault()
    +   */
    +  void setDefaultButton(Button *button);
    +
    +  /*! \brief Return the default button for this dialog.
    +   *
    +   * \sa setDefaultButton(), Button::isDefault()
    +   */
    +  Button *defaultButton() const;
    +
    +  /*! \brief Configure a size grip to allow the user to resize this dialog.
    +   *
    +   * When a size grip is enabled, then the user may resize the dialog window.
    +   *
    +   * The default is <i>true</i>.
    +   */
    +  void setSizeGripEnabled(bool enabled);
    +
    +  /*! \brief Return if the size grip is enabled.
    +   *
    +   * \sa setSizeGripEnabled()
    +   */
    +  bool isSizeGripEnabled() const { return sizeGripEnabled_; }
    +
    +private:
    +  Signal<DialogCode>    finished_;
    +  WContainerWidget     *contents_;
    +  bool                  sizeGripEnabled_;
    +
    +  DialogCode result_;
    +  bool       recursiveEventLoop_;
    +
    +  JSignal<void> hiddenS_;
    +
    +  std::string createJS(DomElement *inContainer);
    +  void        wasHidden();
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +  virtual std::string extClassName() const;
    +
    +  class Bla { };
    +
    +  Dialog(Bla);
    +
    +  void setExposeMask(WApplication *app);
    +  void restoreExposeMask(WApplication *app);
    +
    +  bool hidden_;
    +
    +private:
    +  WWidget *previousExposeConstraint_;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_DIALOG_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Dialog.C b/wt-3.1.7a/src/Wt/Ext/Dialog.C
    new file mode 100644
    index 0000000..497e0fd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Dialog.C
    @@ -0,0 +1,214 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/Button"
    +#include "Wt/Ext/Dialog"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WFitLayout"
    +
    +#include "DomElement.h"
    +#include "WebSession.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Dialog::Dialog(const WString& windowTitle)
    +  : Panel(WApplication::instance()->domRoot()),
    +    finished_(this),
    +    contents_(0),
    +    sizeGripEnabled_(true),
    +    recursiveEventLoop_(false),
    +    hiddenS_(this, "hidden", false),
    +    hidden_(true)
    +{
    +  setInline(false);
    +
    +  setTitle(windowTitle);
    +  setStyleClass("x-hidden");
    +}
    +
    +Dialog::Dialog(Bla)
    +  : Panel(),
    +    finished_(this),
    +    contents_(0),
    +    sizeGripEnabled_(false),
    +    recursiveEventLoop_(false),
    +    hiddenS_(this, "hidden", false),
    +    hidden_(true)
    +{ }
    +
    +Dialog::~Dialog()
    +{ 
    +  hide();
    +}
    +
    +WContainerWidget *Dialog::contents() const
    +{
    +  if (!contents_) {
    +    Dialog *self = const_cast<Dialog *>(this);
    +
    +    self->contents_ = new WContainerWidget();
    +    self->setLayout(new WFitLayout());
    +    self->layout()->addWidget(self->contents_);
    +  }
    +
    +  return contents_;
    +}
    +
    +void Dialog::addButton(Button *button)
    +{
    +  Panel::addFooterButton(button);
    +}
    +
    +void Dialog::removeButton(Button *button)
    +{
    +  Panel::removeFooterButton(button);
    +}
    +
    +void Dialog::setDefaultButton(Button *button)
    +{
    +  Panel::setDefaultButton(button);
    +}
    +
    +Button *Dialog::defaultButton() const
    +{
    +  return Panel::defaultButton();
    +}
    +
    +void Dialog::setWindowTitle(const WString& windowTitle)
    +{
    +  Panel::setTitle(windowTitle);
    +}
    +
    +void Dialog::setSizeGripEnabled(bool enabled)
    +{
    +  sizeGripEnabled_ = enabled;
    +}
    +
    +Dialog::DialogCode Dialog::exec()
    +{
    +  if (recursiveEventLoop_)
    +    throw WtException("Dialog::exec(): already in recursive event loop.");
    +
    +  show();
    +
    +  recursiveEventLoop_ = true;
    +  do {
    +    WApplication::instance()->session()->doRecursiveEventLoop();
    +  } while (recursiveEventLoop_);
    +
    +  hide();
    +
    +  return result_;
    +}
    +
    +void Dialog::done(DialogCode result)
    +{
    +  result_ = result;
    +  if (recursiveEventLoop_) {
    +    recursiveEventLoop_ = false;
    +  } else
    +    hide();
    +
    +  finished_.emit(result);
    +}
    +
    +void Dialog::accept()
    +{
    +  done(Accepted);
    +}
    +
    +void Dialog::reject()
    +{
    +  done(Rejected);
    +}
    +
    +void Dialog::wasHidden()
    +{
    +  // hidden through the 'close' button in the right upper corner
    +  hidden_ = true;
    +
    +  WApplication::instance()->constrainExposed(previousExposeConstraint_);
    +
    +  reject();
    +}
    +
    +void Dialog::setHidden(bool hidden)
    +{
    +  if (hidden_ != hidden) {
    +    hidden_ = hidden;
    +
    +    Panel::setHidden(hidden);
    +
    +    WApplication *app = WApplication::instance();
    +    if (!app->environment().agentIsIE() && !hidden_)
    +      app->doJavaScript
    +	(WT_CLASS ".getElement('" + elVar() + "').style.position='fixed';");
    +
    +    if (!hidden)
    +      setExposeMask(app);
    +    else
    +      restoreExposeMask(app);
    +  }
    +}
    +
    +void Dialog::setExposeMask(WApplication *app)
    +{
    +  previousExposeConstraint_ = app->exposeConstraint();
    +  app->constrainExposed(this);
    +}
    +
    +void Dialog::restoreExposeMask(WApplication *app)
    +{
    +  app->constrainExposed(previousExposeConstraint_);
    +}
    +
    +std::string Dialog::extClassName() const
    +{
    +  return "Ext.Window";
    +}
    +
    +std::string Dialog::createJS(DomElement *inContainer)
    +{
    +  if (!hiddenS_.isConnected())
    +    hiddenS_.connect(this, &Dialog::wasHidden);
    +
    +  std::string result = Panel::createJS(inContainer);
    +
    +  if (!hidden_) {
    +    result += elVar() + ".show();";
    +    result += "{var xy=" + elVar() + ".getPosition();"
    +      "if (xy[0]< 0 || xy[1]<0) " + elVar()
    +      + ".setPosition(xy[0]>0?xy[0]:0, xy[1]>0?xy[1]:0);}";
    +    WApplication *app = WApplication::instance();
    +    if (!app->environment().agentIsIE())
    +      result += WT_CLASS ".getElement('" + elVar()
    +	+ "').style.position='fixed';";
    +  }
    +
    +  return result;
    +}
    +
    +void Dialog::createConfig(std::ostream& config)
    +{
    +  Panel::createConfig(config);
    +
    +  config << ",modal:true,shadow:true,closable:false";
    +
    +  if (defaultButton())
    +    config << ",defaultButton:" << defaultButton()->elRef();
    +
    +  if (sizeGripEnabled_)
    +    config << ",resizeHandles:'se'";
    +  else
    +    config << ",resizable:false";
    +}
    +
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/ExtDllDefs.h b/wt-3.1.7a/src/Wt/Ext/ExtDllDefs.h
    new file mode 100644
    index 0000000..f29c96f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ExtDllDefs.h
    @@ -0,0 +1,50 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2007 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXTDLLDEFS_H_
    +#define EXTDLLDEFS_H_
    +
    +#include "Wt/WConfig.h"
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WT_EXT_IMPORT __declspec(dllimport)
    +  #define WT_EXT_EXPORT __declspec(dllexport)
    +  #define WT_EXT_DLLLOCAL
    +  #define WT_EXT_DLLPUBLIC
    +#else
    +  #define WT_EXT_IMPORT
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WT_EXT_IMPORT __attribute__ ((visibility("default")))
    +    #define WT_EXT_EXPORT __attribute__ ((visibility("default")))
    +    #define WT_EXT_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WT_EXT_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WT_EXT_IMPORT
    +    #define WT_EXT_EXPORT
    +    #define WT_EXT_DLLLOCAL
    +    #define WT_EXT_DLLPUBLIC
    +  #endif
    +#endif
    +
    +// Define wtext_EXPORTS for DLL builds
    +#ifdef WIN32
    +  #ifdef wtext_EXPORTS
    +    #define WT_EXT_API WT_EXT_EXPORT
    +  #else
    +    #ifdef WT_EXT_STATIC
    +      #define WT_EXT_API
    +    #else
    +      #define WT_EXT_API WT_EXT_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WT_EXT_API
    +#endif
    +
    +#endif // EXTDLLDEFS_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.C b/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.C
    new file mode 100644
    index 0000000..3df8cf9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.C
    @@ -0,0 +1,26 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/FitLayoutImpl.h"
    +#include "Wt/WFitLayout"
    +#include <ostream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +FitLayoutImpl::FitLayoutImpl(WFitLayout *layout)
    +  : LayoutImpl(layout)
    +{ }
    +
    +void FitLayoutImpl::createConfig(std::ostream& config)
    +{
    +  config << ",layout:'fit'";
    +
    +  LayoutImpl::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.h b/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.h
    new file mode 100644
    index 0000000..8e465cb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/FitLayoutImpl.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_FIT_LAYOUT_IMPL_H_
    +#define EXT_FIT_LAYOUT_IMPL_H_
    +
    +#include "Wt/Ext/LayoutImpl.h"
    +
    +namespace Wt {
    +  class WFitLayout;
    +
    +  namespace Ext {
    +
    +class FitLayoutImpl : public LayoutImpl
    +{
    +public:
    +  FitLayoutImpl(WFitLayout *layout);
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_BORDER_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/FormField b/wt-3.1.7a/src/Wt/Ext/FormField
    new file mode 100644
    index 0000000..e4a4cdc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/FormField
    @@ -0,0 +1,118 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_FORMFIELD_H_
    +#define EXT_FORMFIELD_H_
    +
    +#include <Wt/Ext/Component>
    +#include <Wt/WValidator>
    +#include <sstream>
    +
    +namespace Wt {
    +
    +  class WLabel;
    +  class WFormWidget;
    +
    +  namespace Ext {
    +
    +/*! \class FormField Wt/Ext/FormField Wt/Ext/FormField
    + *  \brief An abstract base class for form fields.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API FormField : public Component
    +{
    +protected:
    +  /*! \brief Create a form field.
    +   */
    +  FormField(WContainerWidget *parent = 0);
    +
    +public:
    +  /*! \brief The location of the validation error message.
    +   */
    +  enum MessageLocation { 
    +    FancyToolTip,  //!< Display in a fancy (JavaScript) tool tip
    +    PlainToolTip,  //!< Display in a plain HTML tool tip
    +    Below,         //!< Display below the field
    +    Besides        //!< Display next to the field
    +  };
    +
    +  /*! \brief Set the location of the validation error message.
    +   */
    +  void setErrorMessageLocation(MessageLocation location);
    +
    +  /*! \brief Set a validator.
    +   *
    +   * The validator will be used for both client side and server side
    +   * validation (if it is, or inherits from, one of the four
    +   * validators provided by %Wt: WDateValidator, WDoubleValidator,
    +   * WIntValidator, WLengthValidator, WRegExpValidator).
    +   *
    +   * If the validator has no parent yet, ownership of the validator is
    +   * transferred to the form field.
    +   *
    +   * \sa validate()
    +   */
    +  void setValidator(WValidator *validator);
    +
    +  /*! \brief Return the validator.
    +   */
    +  WValidator *validator() const { return validator_; }
    +
    +  /*! \brief Validate the field.
    +   */
    +  virtual WValidator::State validate();
    +
    +  /*! \brief Return the label associate with this formfield
    +   *
    +   * Returns the label (if there is one) that acts as a proxy for this widget.
    +   *
    +   * \sa WLabel::setBuddy(Ext::FormField *)
    +   */
    +  WLabel *label() const;
    +
    +  /*! \brief Give focus to this widget.
    +   */
    +  void setFocus();
    +
    +  virtual void refresh();
    +
    +  /*! \brief Signal emitted when the value was changed.
    +   */
    +  EventSignal<>& changed();
    +
    +  /*! \brief Signal emitted when the widget lost focus.
    +   */
    +  EventSignal<>& blurred();
    +
    +  /*! \brief Signal emitted when the widget recieved focus.
    +   */
    +  EventSignal<>& focussed();
    +
    +protected:
    +  void applyToWidget(WWebWidget *widget, std::stringstream& js,
    +		     DomElement *inContainer);
    +
    +  void createConfig(std::ostream& config);
    +
    +  virtual WFormWidget *formWidget() const = 0;
    +
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +private:
    +  MessageLocation  errorMessageLocation_;
    +  WValidator      *validator_;
    +  bool             focusWhenRendered_;
    +
    +  virtual void useAsTableViewEditor() = 0;
    +  friend class TableView;
    +  friend class Wt::WLabel;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_FORMFIELD_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/FormField.C b/wt-3.1.7a/src/Wt/Ext/FormField.C
    new file mode 100644
    index 0000000..f78573c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/FormField.C
    @@ -0,0 +1,124 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/FormField"
    +#include "Wt/WApplication"
    +#include "Wt/WFormWidget"
    +#include "Wt/WLabel"
    +#include "Wt/WValidator"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +FormField::FormField(WContainerWidget *parent)
    +  : Component(parent),
    +    errorMessageLocation_(FancyToolTip),
    +    validator_(0),
    +    focusWhenRendered_(false)
    +{ }
    +
    +void FormField::setErrorMessageLocation(MessageLocation location)
    +{
    +  errorMessageLocation_ = location;
    +}
    +
    +void FormField::setValidator(WValidator *validator)
    +{
    +  validator_ = validator;
    +
    +  if (!validator_->parent())
    +    WObject::addChild(validator_);  
    +}
    +
    +WValidator::State FormField::validate()
    +{
    +  return WValidator::Valid;
    +}
    +
    +void FormField::refresh()
    +{
    +  // FIXME: refresh validator messages -- is not possible now ?
    +  Component::refresh();
    +}
    +
    +void FormField::applyToWidget(WWebWidget *widget,
    +			      std::stringstream& js, DomElement *inContainer)
    +{
    +  if (inContainer) {
    +    inContainer->addChild(widget->createDomElement(WApplication::instance()));
    +    js << elVar() << ".applyToMarkup('" << widget->id() << "');";
    +  }
    +}
    +
    +void FormField::createConfig(std::ostream& config)
    +{
    +  if (errorMessageLocation_ != FancyToolTip) {
    +    config << ",msgTarget:";
    +    switch (errorMessageLocation_) {
    +    case FancyToolTip: config << "'qtip'"; break;
    +    case PlainToolTip: config << "'title'"; break;
    +    case Below: config << "'under'"; break;
    +    case Besides: config << "'side'"; break;
    +    default:
    +      config << "''"; break;
    +    }
    +  }
    +
    +  if (validator_)
    +    validator_->createExtConfig(config);
    +
    +  Component::createConfig(config);
    +}
    +
    +WLabel *FormField::label() const
    +{
    +  return formWidget()->label();
    +}
    +
    +void FormField::setFocus()
    +{
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".focus(true);");
    +  else
    +    focusWhenRendered_ = true;
    +}
    +
    +void FormField::render(WFlags<RenderFlag> flags)
    +{
    +  Component::render(flags);
    +
    +  if (focusWhenRendered_) {
    +    WApplication::instance()->doJavaScript(elVar() + ".focus(true);");
    +    focusWhenRendered_ = false;
    +  }
    +}
    +
    +EventSignal<>& FormField::changed()
    +{
    +  return formWidget()->changed();
    +}
    +
    +EventSignal<>& FormField::blurred()
    +{
    +  return formWidget()->blurred();
    +}
    +
    +EventSignal<>& FormField::focussed()
    +{
    +  return formWidget()->focussed();
    +}
    +
    +  }
    +
    +void WLabel::setBuddy(Ext::FormField *formField)
    +{
    +  setBuddy(formField->formWidget());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/LayoutImpl.C b/wt-3.1.7a/src/Wt/Ext/LayoutImpl.C
    new file mode 100644
    index 0000000..0877d19
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LayoutImpl.C
    @@ -0,0 +1,230 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/LayoutImpl.h"
    +#include "Wt/Ext/Container"
    +#include "Wt/Ext/TabWidget"
    +#include "Wt/WApplication"
    +#include "Wt/WLayout"
    +#include "Wt/WLayoutItem"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +LayoutImpl::LayoutImpl(WLayout *layout)
    +  : layout_(layout),
    +    container_(0)
    +{ }
    +
    +LayoutImpl::~LayoutImpl()
    +{ 
    +  WApplication *app = WApplication::instance();
    +
    +  app->doJavaScript(app->javaScriptClass()
    +		    + ".deleteExtW('" + id() + "');");
    +}
    +
    +LayoutItemImpl *LayoutImpl::getImpl(WLayoutItem *item)
    +{
    +  return dynamic_cast<LayoutItemImpl *>(item->impl());
    +}
    +
    +void LayoutImpl::updateAddItem(WLayoutItem *item)
    +{
    +  Container *c = container();
    +
    +  if (c) {
    +    getImpl(item)->containerAddWidgets(c);
    +
    +    if (c->isRendered()) {
    +      c->setLayoutChanged();
    +      itemsAdded_.push_back(item);
    +    }
    +  }
    +}
    +
    +void LayoutImpl::updateRemoveItem(WLayoutItem *item)
    +{
    +  Container *c = container();
    +
    +  if (c && c->isRendered()) {
    +    addUpdateJS(containerRef()
    +		+ ".remove('" + getImpl(item)->componentId() + "');");
    +  }
    +
    +  Utils::erase(itemsAdded_, item);
    +}
    +
    +std::string LayoutImpl::containerRef() const
    +{
    +  if (container_)
    +    return container_->elRef();
    +  else
    +    return elRef();
    +}
    +
    +void LayoutImpl::setContainer(Container *c)
    +{
    +  container_ = c;
    +  containerAddWidgets(container_);
    +}
    +
    +Container *LayoutImpl::container() const
    +{
    +  if (container_)
    +    return container_;
    +  else
    +    return LayoutItemImpl::container();
    +}
    +
    +WLayoutItem *LayoutImpl::layoutItem() const
    +{
    +  return layout_;
    +}
    +
    +void LayoutImpl::containerAddWidgets(Container *container)
    +{
    +  int c = layout_->count();
    +
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = layout_->itemAt(i);
    +    if (item)
    +      getImpl(item)->containerAddWidgets(container);
    +  }
    +}
    +
    +void LayoutImpl::createComponents(DomElement *parentContainer)
    +{
    +  int c = layout_->count();
    +
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = layout_->itemAt(i);
    +    if (item)
    +      getImpl(item)->createComponent(parentContainer);
    +  }
    +}
    +
    +void LayoutImpl::createComponent(DomElement *parentContainer)
    +{
    +  DomElement *nested = DomElement::createNew(DomElement_DIV);
    +  nested->setId("l" + id());
    +  createComponents(nested);
    +  parentContainer->addChild(nested);
    +
    +  std::stringstream js;
    +
    +  js << "var " << elVar() << '=' << elRef() << "=new Ext.Panel({id:'"
    +     << elVar() << "',border:false,contentEl:'l" << id() << '\'';
    +
    +  addConfig(js);
    +  createConfig(js);
    +
    +  js << "});";
    +
    +  parentContainer->callJavaScript(js.str());
    +}
    +
    +std::string LayoutImpl::componentVar() const
    +{
    +  return elVar();
    +}
    +
    +std::string LayoutImpl::componentId() const
    +{
    +  return elVar();
    +}
    +
    +void LayoutImpl::createConfig(std::ostream& config)
    +{
    +  int c = layout_->count();
    +
    +  if (c) {
    +    config << ",items:";
    +
    +    if (c > 1)
    +      config << '[';
    +
    +    for (int i = 0; i < c; ++i) {
    +      WLayoutItem *item = layout_->itemAt(i);
    +      if (item) {
    +	if (i != 0)
    +	  config << ",";
    +
    +	config << getImpl(item)->componentVar();
    +      }
    +    }
    +
    +    if (c > 1)
    +      config << ']';
    +  }
    +
    +  itemsAdded_.clear();
    +  jsUpdates_.clear();
    +}
    +
    +void LayoutImpl::addLayoutConfig(LayoutItemImpl *item, std::ostream& config)
    +{ }
    +
    +std::string LayoutImpl::elRef() const
    +{
    +  return /* WApplication::instance()->javaScriptClass() + '.' + */
    +    "ExtW['" + id() + "']";
    +}
    +
    +std::string LayoutImpl::elVar() const
    +{
    +  return "el" + id();
    +}
    +
    +void LayoutImpl::addUpdateJS(const std::string& js)
    +{
    +  if (!js.empty()) {
    +    jsUpdates_ += js;
    +    container()->setLayoutChanged();
    +  }
    +}
    +
    +void LayoutImpl::getLayoutChanges(const std::string& parentId,
    +				  std::vector<DomElement *>& result)
    +{
    +  if (!jsUpdates_.empty() || !itemsAdded_.empty()) {
    +    DomElement *e = DomElement::getForUpdate(parentId,  DomElement_DIV);
    +
    +    std::string addUpdates = "var " + elVar() + "=" + containerRef() + ";";
    +
    +    for (unsigned i = 0; i < itemsAdded_.size(); ++i) {
    +      getImpl(itemsAdded_[i])->createComponent(e);
    +      std::string cvar = getImpl(itemsAdded_[i])->componentVar();
    +      addUpdates += elVar() + ".add(" + cvar + ");";
    +      // FIXME: does not work correctly when the container is not shown
    +      // for example because it is in an unactivated tab ?
    +    }
    +    if (!itemsAdded_.empty() && !dynamic_cast<TabWidget *>(container()))
    +      addUpdates += elVar() + ".doLayout();";
    +
    +    itemsAdded_.clear();
    +
    +    e->callJavaScript(jsUpdates_ + addUpdates);
    +    jsUpdates_.clear();
    +
    +    result.push_back(e);
    +  }
    +
    +  int c = layout_->count();
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = layout_->itemAt(i);
    +    if (item)
    +      getImpl(item)->getLayoutChanges("l" + id(), result);
    +  }
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/LayoutImpl.h b/wt-3.1.7a/src/Wt/Ext/LayoutImpl.h
    new file mode 100644
    index 0000000..17a5315
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LayoutImpl.h
    @@ -0,0 +1,72 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_LAYOUT_IMPL_H_
    +#define EXT_LAYOUT_IMPL_H_
    +
    +#include "Wt/Ext/LayoutItemImpl.h"
    +
    +namespace Wt {
    +
    +  class WLayout;
    +  class WLayoutItem;
    +
    +  namespace Ext {
    +
    +class WidgetItem;
    +
    +class LayoutImpl : public LayoutItemImpl
    +{
    +public:
    +  LayoutImpl(WLayout *layout);
    +  virtual ~LayoutImpl();
    +
    +  void updateAddItem(WLayoutItem *);
    +  void updateRemoveItem(WLayoutItem *);
    +
    +  virtual Container   *container() const;
    +  virtual WLayoutItem *layoutItem() const;
    +  
    +protected:
    +  virtual void createComponent(DomElement *parentContainer);
    +  virtual void containerAddWidgets(Container *container);
    +  virtual std::string componentVar() const;
    +  virtual std::string componentId() const;
    +
    +  virtual void createConfig(std::ostream& config);
    +
    +  WLayout *layout() const { return layout_; }
    +
    +private:
    +  WLayout                   *layout_;
    +  Container                 *container_;
    +  std::vector<WLayoutItem *> itemsAdded_;
    +  std::string                jsUpdates_;
    +
    +  std::string               parentContainerVar() const;
    +
    +  virtual void createComponents(DomElement *parentContainer);
    +  virtual void addLayoutConfig(LayoutItemImpl *item, std::ostream& config);
    +  virtual void getLayoutChanges(const std::string& parentId,
    +				std::vector<DomElement *>& result);
    +
    +  static LayoutItemImpl *getImpl(WLayoutItem *item); 
    +
    +  void addUpdateJS(const std::string& js);
    +  std::string containerRef() const;
    +  std::string elRef() const;
    +  std::string elVar() const;
    +
    +  void setContainer(Container *container);
    +
    +  friend class Container;
    +  friend class LayoutItemImpl;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.C b/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.C
    new file mode 100644
    index 0000000..2f158c0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.C
    @@ -0,0 +1,71 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/LayoutItemImpl.h"
    +#include "Wt/Ext/LayoutImpl.h"
    +#include "Wt/Ext/Container"
    +#include "Wt/WApplication"
    +#include "Wt/WLayoutItem"
    +#include "Wt/WLayout"
    +#include "Wt/WLogger"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +LayoutItemImpl::LayoutItemImpl()
    +{ }
    +
    +LayoutItemImpl::~LayoutItemImpl()
    +{ }
    +
    +void LayoutItemImpl::update(WLayoutItem *item)
    +{
    +  assert(false);
    +}
    +
    +LayoutImpl *LayoutItemImpl::parentLayoutImpl() const
    +{
    +  WLayoutItem *i = layoutItem();
    +
    +  if (i->parentLayout())
    +    return dynamic_cast<LayoutImpl *>(i->parentLayout()->impl());
    +  else
    +    return 0;
    +}
    +
    +void LayoutItemImpl::addConfig(std::ostream& config)
    +{
    +  LayoutImpl *p = parentLayoutImpl();
    +  if (p)
    +    p->addLayoutConfig(this, config);
    +}
    +
    +Container* LayoutItemImpl::container() const
    +{
    +  LayoutImpl *p = parentLayoutImpl();
    +  if (p)
    +    return p->container();
    +  else
    +    return 0;
    +}
    +
    +WWidget *LayoutItemImpl::parentWidget() const
    +{
    +  return container();
    +}
    +
    +void LayoutItemImpl::getLayoutChanges(const std::string& parentId,
    +				      std::vector<DomElement *>& result)
    +{ }
    +
    +void LayoutItemImpl::setHint(const std::string& name, const std::string& value)
    +{
    +  WApplication::instance()->log("error")
    +    << "WWidgetItem: unrecognized hint '" << name << "'";
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.h b/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.h
    new file mode 100644
    index 0000000..8da75a9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LayoutItemImpl.h
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_LAYOUT_ITEM_IMPL_H_
    +#define EXT_LAYOUT_ITEM_IMPL_H_
    +
    +#include "Wt/WLayoutItemImpl"
    +#include "Wt/WObject"
    +
    +namespace Wt {
    +  class WWidget;
    +  class DomElement;
    +
    +  namespace Ext {
    +    class Container;
    +    class LayoutImpl;
    +
    +class LayoutItemImpl : public WLayoutItemImpl, public WObject
    +{
    +public:
    +  LayoutItemImpl();
    +  virtual ~LayoutItemImpl();
    +
    +  virtual void update(WLayoutItem *);
    +
    +  virtual Container   *container() const;
    +  virtual WLayoutItem *layoutItem() const = 0;
    +  virtual WWidget     *parentWidget() const;
    +
    +  virtual void setHint(const std::string& name, const std::string& value);
    +
    +protected:
    +  virtual void createComponent(DomElement *parentContainer) = 0;
    +  virtual std::string componentVar() const = 0;
    +  virtual std::string componentId() const = 0;
    +  virtual void containerAddWidgets(Container *container) = 0;
    +  void addConfig(std::ostream& config);
    +
    +  LayoutImpl *parentLayoutImpl() const;
    +
    +  virtual void getLayoutChanges(const std::string& parentId,
    +				std::vector<DomElement *>& result);
    +
    +private:
    +  friend class LayoutImpl;
    +  friend class Container;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_LAYOUT_ITEM_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/LineEdit b/wt-3.1.7a/src/Wt/Ext/LineEdit
    new file mode 100644
    index 0000000..a15032d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LineEdit
    @@ -0,0 +1,137 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_LINEEDIT_H_
    +#define EXT_LINEEDIT_H_
    +
    +#include <Wt/Ext/FormField>
    +
    +namespace Wt {
    +
    +  class WLineEdit;
    +
    +  namespace Ext {
    +
    +/*! \class LineEdit Wt/Ext/LineEdit Wt/Ext/LineEdit
    + *  \brief A line edit.
    + *
    + * To act upon text changes, connect a slot to the changed() signal.
    + * This signal is emitted when the user changed the content, and
    + * subsequently removes the focus from the line edit.
    + *
    + * To act upon editing, connect a slot to the keyWentUp() signal.
    + *
    + * At all times, the current content may be accessed with the text()
    + * method.
    + *
    + * The API is a super-set of the WLineEdit API.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API LineEdit : public FormField
    +{
    +public:
    +   /*! \brief Enum that describes how the contents is displayed.
    +   *
    +   * \sa setEchoMode
    +   * \sa echoMode
    +   */
    +  enum EchoMode { Normal,   //!< Characters are shown.
    +		  Password  //!< Hide the contents as for a password.
    +  };
    +
    +  /*! \brief Create a new line edit with empty content.
    +   */
    +  LineEdit(WContainerWidget *parent = 0);
    +
    +  /*! \brief Construct a line edit with given content.
    +   */
    +  LineEdit(const WString& content, WContainerWidget *parent = 0);
    +
    +  /*! \brief Specify the width of the line edit in number of characters.
    +   */
    +  void setTextSize(int chars);
    +
    +  /*! \brief Return the current width of the line edit in number of characters.
    +   *
    +   * \sa setTextSize(int)
    +   */  
    +  int textSize() const;
    +  
    +  /*! \brief Change the content of the line edit.
    +   */
    +  void  setText(const WString& value);
    + 
    +  /*! \brief Return the current content.
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Specify the maximum length of text that can be entered.
    +   *
    +   * A value <= 0 indicates that there is no limit.
    +   *
    +   * The default value is -1.
    +   */
    +  void setMaxLength(int length);
    +
    +  /*! \brief Returns the maximum length of text that can be entered.
    +   *
    +   * \sa setMaxLength(int)
    +   */
    +  int maxLength() const;
    +
    +  /*! \brief Set the echo mode.
    +   *
    +   * The default echo mode is Normal.
    +   */
    +  void setEchoMode(EchoMode echoMode);
    +
    +  /*! \brief Return the echo mode.
    +   */
    +  EchoMode echoMode() const;
    + 
    +  virtual WValidator::State validate();
    +
    +  void setEmptyDisplayText(const WString& text);
    +  void setGrowToContent(bool grow, int minWidth = 30, int maxWidth = 800);
    +
    +  /*! \brief Event signal emitted when a keyboard key is pushed down.
    +   */
    +  EventSignal<WKeyEvent>& keyWentDown();
    +
    +   /*! \brief Event signal emitted when a keyboard key is pressed.
    +   */
    +  EventSignal<WKeyEvent>& keyPressed();
    +    
    +  /*! \brief Event signal emitted when a keyboard key is released.
    +   */
    +  EventSignal<WKeyEvent>& keyWentUp();
    +
    +  /*! \brief Event signal emitted when enter was pressed.
    +   *
    +   * This signal is emitted when the Enter or Return key was pressed.
    +   *
    +   * \sa WInteractWidget::enterPressed()
    +   */
    +  EventSignal<>& enterPressed();
    +
    +protected:
    +  WLineEdit *lineEdit() const { return lineEdit_; }
    +  virtual WFormWidget *formWidget() const;
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  WLineEdit    *lineEdit_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  virtual void useAsTableViewEditor();
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_LINEEDIT_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/LineEdit.C b/wt-3.1.7a/src/Wt/Ext/LineEdit.C
    new file mode 100644
    index 0000000..4aead51
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/LineEdit.C
    @@ -0,0 +1,137 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/LineEdit"
    +#include "Wt/WLineEdit"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +  namespace Ext {
    +
    +LineEdit::LineEdit(WContainerWidget *parent)
    +  : FormField(parent),
    +    lineEdit_(new WLineEdit())
    +{
    +  addOrphan(lineEdit_);
    +}
    +
    +LineEdit::LineEdit(const WString& content, WContainerWidget *parent)
    +  : FormField(parent),
    +    lineEdit_(new WLineEdit())
    +{
    +  addOrphan(lineEdit_);
    +  setText(content);
    +}
    +
    +EventSignal<WKeyEvent>& LineEdit::keyWentDown()
    +{
    +  return lineEdit_->keyWentDown();
    +}
    +
    +EventSignal<WKeyEvent>& LineEdit::keyPressed()
    +{
    +  return lineEdit_->keyPressed();
    +}
    +
    +EventSignal<WKeyEvent>& LineEdit::keyWentUp()
    +{
    +  return lineEdit_->keyWentUp();
    +}
    +
    +EventSignal<>& LineEdit::enterPressed()
    +{
    +  return lineEdit_->enterPressed();
    +}
    +
    +WFormWidget *LineEdit::formWidget() const
    +{
    +  return lineEdit_;
    +}
    +
    +void LineEdit::setText(const WString& value)
    +{
    +  lineEdit_->setText(value);
    +}
    +
    +const WString& LineEdit::text() const
    +{
    +  return lineEdit_->text();
    +}
    +
    +void LineEdit::setTextSize(int numChars)
    +{
    +  lineEdit_->setTextSize(numChars);
    +}
    +
    +int LineEdit::textSize() const
    +{
    +  return lineEdit_->textSize();
    +}
    +
    +void LineEdit::setMaxLength(int numChars)
    +{
    +  lineEdit_->setMaxLength(numChars);
    +}
    +
    +int LineEdit::maxLength() const
    +{
    +  return lineEdit_->maxLength();
    +}
    +
    +void LineEdit::setEchoMode(EchoMode echoMode)
    +{
    +  lineEdit_->setEchoMode(static_cast<WLineEdit::EchoMode>(echoMode));
    +}
    +
    +LineEdit::EchoMode LineEdit::echoMode() const
    +{
    +  return static_cast<EchoMode>(lineEdit_->echoMode());
    +}
    +
    +void LineEdit::setEmptyDisplayText(const WString& text)
    +{ 
    +  // NYI
    +}
    +
    +void LineEdit::setGrowToContent(bool grow, int minWidth, int maxWidth)
    +{
    +  // NYI
    +}
    +
    +WValidator::State LineEdit::validate()
    +{
    +  if (validator()) {
    +    WT_USTRING text = lineEdit_->text();
    +    return validator()->validate(text);
    +  } else
    +    return WValidator::Valid;
    +}
    +
    +void LineEdit::useAsTableViewEditor()
    +{
    +  lineEdit_->setFormObject(false);
    +}
    +
    +std::string LineEdit::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.form.TextField(" << configStruct() << ");";
    +
    +  applyToWidget(lineEdit_, result, inContainer);
    +
    +  return result.str();
    +}
    +
    +void LineEdit::createConfig(std::ostream& config)
    +{
    +  FormField::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/Menu b/wt-3.1.7a/src/Wt/Ext/Menu
    new file mode 100644
    index 0000000..b056070
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Menu
    @@ -0,0 +1,190 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_MENU_H_
    +#define EXT_MENU_H_
    +
    +#include <Wt/Ext/Widget>
    +#include <Wt/Ext/MenuItem>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class Menu Wt/Ext/Menu Wt/Ext/Menu
    + *  \brief A menu presented in a popup window.
    + *
    + * A menu is always presented in a popup window, and, unlike other
    + * widgets, cannot be instantiated on its own (by adding to a
    + * WContainerWidget). Instead it must be associated with a Button or
    + * MenuItem (to create sub menus).
    + *
    + * Usage example:
    + * \code
    + * // Create a menu with some items
    + * Wt::Ext::Menu *menu = new Wt::Ext::Menu();
    + * Wt::Ext::MenuItem *item;
    + *
    + * item = menu->addItem("File open...");
    + * item->setIcon("icons/yellow-folder-open.png");
    + *
    + * item = menu->addItem("I dig Wt");
    + * item->setCheckable(true);
    + * item->setChecked(true);
    + *
    + * item = menu->addItem("I dig Wt too");
    + * item->setCheckable(true);
    + *
    + * menu->addSeparator();
    + * menu->addItem("Menu item");
    + * menu->addSeparator();
    + *
    + * // Add a sub menu
    + * Wt::Ext::Menu *subMenu = new Wt::Ext::Menu();
    + * subMenu->addItem("Do this");
    + * subMenu->addItem("And that");
    + *
    + * item = menu->addMenu("More ...", subMenu);
    + * item->setIcon("icons/yellow-folder-open.png");
    + *
    + * // Create a tool bar
    + * Wt::Ext::ToolBar *toolBar = new Wt::Ext::ToolBar(ex);
    + *
    + * // Associate the menu with a button
    + * Wt::Ext::Button *b = toolBar->addButton("Button w/Menu", menu);
    + * b->setIcon("icons/yellow-folder-closed.png");
    + * \endcode
    + *
    + * \image html ExtMenu-1.png "Example of a Menu"
    + *
    + * \sa MenuItem, AbstractButton::setMenu()
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Menu : public Widget
    +{
    +public:
    +  /*! \brief Create a new menu.
    +   *
    +   * The menu cannot be added to a WContainerWidget, but must instead be
    +   * associated with a Button or MenuItem.
    +   *
    +   * \sa Button::setMenu(), MenuItem::setMenu(), addMenu().
    +   */
    +  Menu();
    +
    +  /*! \brief Add an item with given text.
    +   */
    +  MenuItem *addItem(const WString& text);
    +
    +  /*! \brief Add an item with given icon and text.
    +   */
    +  MenuItem *addItem(const std::string& iconPath, const WString& text);
    +
    +  /*! \brief Add an item with given text, and specify a slot method to be
    +   *         called when activated.
    +   *
    +   * The <i>target</i> and <i>method</i> are connected to the
    +   * MenuItem::activated() signal.
    +   */
    +  template<class T, class V>
    +    MenuItem *addItem(const WString& text,
    +			T *target, void (V::*method)());
    +
    +  /*! \brief Add an item with given text, and specify a slot method to be
    +   *         called when activated.
    +   *
    +   * This variant of the overloaded singleShot() method supports a
    +   * template function object (which supports operator ()).
    +   */
    +  template <class F>
    +    MenuItem *addItem(const WString& text, const F& f);
    +    
    +  /*! \brief Add an item with given text and icon, and specify a slot
    +   *         method to be called when activated.
    +   *
    +   * The <i>target</i> and <i>method</i> are connected to the
    +   * MenuItem::activated() signal.
    +   */
    +  template<class T, class V>
    +    MenuItem *addItem(const std::string& iconPath, const WString& text,
    +			T *target, void (V::*method)());
    +
    +  /*! \brief Add an item with given text and icon, and specify a slot
    +   *         method to be called when activated.
    +   *
    +   * This variant of the overloaded singleShot() method supports a
    +   * template function object (which supports operator ()).
    +   */
    +  template<class F>
    +    MenuItem *addItem(const std::string& iconPath, const WString& text,
    +			const F& f);
    +
    +  /*! \brief Add a submenu, with given text.
    +   */
    +  MenuItem *addMenu(const WString& text, Menu *menu);
    +
    +  /*! \brief Add a submenu, with given icon and text.
    +   */
    +  MenuItem *addMenu(const std::string& iconPath, const WString& text,
    +		    Menu *menu);
    +
    +  /*! \brief Add a menu item.
    +   */
    +  void add(MenuItem *item);
    +
    +  /*! \brief Add a widget to the menu.
    +   */
    +  void add(WWidget *item);
    +
    +  /*! \brief Add a separator to the menu.
    +   */
    +  void addSeparator();
    +
    +protected:
    +  void removeChild(WWidget *child);
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  std::vector<WWidget *> items_;
    +};
    +
    +#ifndef JAVA
    +template<class T, class V>
    +MenuItem *Menu::addItem(const WString& text,
    +			T *target, void (V::*method)())
    +{
    +  return addItem(std::string(), text, boost::bind(method, target));
    +}
    +
    +template <class F>
    +MenuItem *Menu::addItem(const WString& text, const F& f)
    +{
    +  return addItem(std::string(), text, f);
    +}
    +
    +template<class T, class V>
    +MenuItem *Menu::addItem(const std::string& iconPath, const WString& text,
    +			T *target, void (V::*method)())
    +{
    +  return addItem(iconPath, text, boost::bind(method, target));
    +}
    +
    +template<class F>
    +MenuItem *Menu::addItem(const std::string& iconPath, const WString& text,
    +			const F& f)
    +{
    +  MenuItem *item = addItem(iconPath, text);
    +  item->activated().connect(f);
    +  return item;
    +}
    +
    +#endif // JAVA
    +
    +  }
    +}
    +
    +#endif // EXT_MENU_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Menu.C b/wt-3.1.7a/src/Wt/Ext/Menu.C
    new file mode 100644
    index 0000000..8aaa514
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Menu.C
    @@ -0,0 +1,97 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/Menu"
    +#include "Utils.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class MenuSeparator : public Widget
    +{
    +public:
    +  MenuSeparator()
    +    : Widget()
    +  { }
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer)
    +  {
    +    return elVar() + "=new Ext.menu.Separator();";
    +  }
    +};
    +
    +Menu::Menu()
    +  : Widget()
    +{ }
    +
    +MenuItem *Menu::addItem(const WString& text)
    +{
    +  return addItem(std::string(), text);
    +}
    +
    +MenuItem *Menu::addItem(const std::string& iconPath, const WString& text)
    +{
    +  return addMenu(iconPath, text, 0);
    +}
    +
    +MenuItem *Menu::addMenu(const WString& text, Menu *menu)
    +{
    +  return addMenu(std::string(), text, menu);
    +}
    +
    +MenuItem *Menu::addMenu(const std::string& iconPath, const WString& text,
    +			Menu *menu)
    +{
    +  MenuItem *item = new MenuItem(text);
    +  item->setIcon(iconPath);
    +  item->setMenu(menu);
    +
    +  add(item);
    +
    +  return item;
    +}
    +
    +void Menu::add(MenuItem *item)
    +{
    +  add(dynamic_cast<WWidget *>(item));
    +}
    +
    +void Menu::add(WWidget *item)
    +{
    +  items_.push_back(item);
    +  addOrphan(item);
    +
    +  Widget::renderExtAdd(item);
    +}
    +
    +void Menu::addSeparator()
    +{
    +  add(new MenuSeparator());
    +}
    +
    +void Menu::removeChild(WWidget *child)
    +{
    +  Widget::removeChild(child);
    +
    +  if (Utils::erase(items_, child))
    +    // FIXME: no ext method to remove a menu item ??
    +    ;
    +}
    +
    +std::string Menu::createJS(DomElement *inContainer)
    +{
    +  assert(!inContainer);
    +  std::stringstream result;
    +  std::string refs = createMixed(items_, result);
    +
    +  result << elVar() << "=new Ext.menu.Menu([" << refs << "]);";
    +
    +  return result.str();
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/MenuItem b/wt-3.1.7a/src/Wt/Ext/MenuItem
    new file mode 100644
    index 0000000..fd80a47
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/MenuItem
    @@ -0,0 +1,53 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_MENU_ITEM_H_
    +#define EXT_MENU_ITEM_H_
    +
    +#include <Wt/Ext/AbstractButton>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class MenuItem Wt/Ext/MenuItem Wt/Ext/MenuItem
    + *  \brief An item in a menu.
    + *
    + * A menu is always contained by a Menu, and, unlike other widgets,
    + * cannot be instantiated on its own (by adding to a
    + * WContainerWidget).
    + *
    + * \image html ExtMenuItem-1.png Menu item
    + * \image html ExtMenuItem-2.png Menu item with icon
    + * \image html ExtMenuItem-3.png Menu item with icon and menu
    + * \image html ExtMenuItem-4.png Menu item hover effect
    + * \image html ExtMenuItem-5.png Toggled menu item
    + *
    + * \sa Menu, Menu::add(MenuItem *)
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API MenuItem : public AbstractButton
    +{
    +public:
    +  /*! \brief Create a new item with given text.
    +   */
    +  MenuItem(const WString& text);
    +
    +  /*! \brief Create a new item with given icon and text.
    +   */
    +  MenuItem(const std::string& iconPath, const WString& text);
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer);
    +  virtual std::string checkMethodJS() const;
    +  virtual std::string checkEventJS() const;
    +  virtual std::string checkInitialState() const;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_MENU_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/MenuItem.C b/wt-3.1.7a/src/Wt/Ext/MenuItem.C
    new file mode 100644
    index 0000000..85d9919
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/MenuItem.C
    @@ -0,0 +1,51 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/MenuItem"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +MenuItem::MenuItem(const WString& text)
    +  : AbstractButton()
    +{ 
    +  setText(text);
    +}
    +
    +MenuItem::MenuItem(const std::string& iconPath, const WString& text)
    +  : AbstractButton()
    +{ 
    +  setText(text);
    +  setIcon(iconPath);
    +}
    +
    +std::string MenuItem::createJS(DomElement *inContainer)
    +{
    +  assert(!inContainer);
    +
    +  if (isCheckable())
    +    return createJSHelper("Ext.menu.CheckItem");
    +  else
    +    return createJSHelper("Ext.menu.Item");
    +}
    +
    +std::string MenuItem::checkMethodJS() const
    +{
    +  return "setChecked";
    +}
    +
    +std::string MenuItem::checkEventJS() const
    +{
    +  return "checkchange";
    +}
    +
    +std::string MenuItem::checkInitialState() const
    +{
    +  return "checked";
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/MessageBox b/wt-3.1.7a/src/Wt/Ext/MessageBox
    new file mode 100644
    index 0000000..de30f1e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/MessageBox
    @@ -0,0 +1,214 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_MESSAGEBOX_H_
    +#define EXT_MESSAGEBOX_H_
    +
    +#include <Wt/Ext/Dialog>
    +#include <Wt/Ext/ExtDllDefs.h>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class MessageBox Wt/Ext/MessageBox Wt/Ext/MessageBox
    + *  \brief A standard dialog for confirmation or to get simple user input.
    + *
    + * The message box shows a message in a dialog window, with a number
    + * of buttons. These buttons may only be standard buttons.
    + *
    + * There are two distinct ways for using a %MessageBox, which reflect
    + * the two ways of dealing with a Dialog box.
    + *
    + * The easiest way is using the static show() method, which shows a
    + * message box, blocks the current thread, and returns the button that
    + * was pressed by the user. Since this uses the Dialog::exec(), it suffers
    + * from the same scalability issues.
    + *
    + * The more elaborate way is by creating a MessageBox, and connecting
    + * the buttonClicked signal to a method. This method then interpretes
    + * the result and deletes the message box.
    + *
    + * The API is slightly different from the WMessageBox API:
    + * <ul>
    + *   <li>no support for non-standard buttons (WMessageBox::addButton()),
    + *     or access to buttons (WMessageBox::button()).
    + *   <li>supports only Yes, No, Ok and Cancel buttons.</li>
    + *   <li>supports more JavaScript like standard functionality, to prompt for
    + *     input (enablePrompt(), enableTextArea()).</li>
    + * </ul>
    + *
    + * \image html ExtMessageBox-1.png "Example of a MessageBox"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API MessageBox : public Dialog
    +{
    +public:
    +  using Dialog::show;
    +
    +  /*! \brief Create an empty message box.
    +   *
    +   * The button labels may be set fixed English (if i18n = false), or fetched
    +   * from a resource bundle if i18n = true. In that case, the key for each
    +   * button is exactly the same as the English text.
    +   */
    +  MessageBox(bool i18n = false);
    +
    +  /*! \brief Create a message box with given caption, text, icon, and
    +   *         buttons.
    +   *
    +   * The button labels may be set fixed English (if i18n = false), or fetched
    +   * from a resource bundle if i18n = true. In that case, the key for each
    +   * button is exactly the same as the English text.
    +   */
    +  MessageBox(const WString& caption, const WString& text, Icon icon,
    +	     WFlags<StandardButton> buttons, bool i18n = false);
    +
    +  virtual ~MessageBox();
    +
    +  /*! \brief Set the text for the message box.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Get the message box text.
    +   */
    +  const WString& text() const { return text_; }
    +
    +  /*! \brief Set the icon.
    +   */
    +  void setIcon(Icon icon);
    +
    +  /*! \brief Get the icon.
    +   */
    +  Icon icon() const { return icon_; }
    +
    +  /*! \brief Set standard buttons for the message box.
    +   */
    +  void setButtons(WFlags<StandardButton> buttons);
    +
    +  /*! \brief Get the standard buttons.
    +   */
    +  WFlags<StandardButton> buttons() const { return buttons_; }
    +
    +  /*! \brief Get the result of this message box.
    +   *
    +   * This value is only defined after a button has been clicked.
    +   */
    +  StandardButton result() { return result_; }
    +
    +  /*! \brief Show a single-line input field.
    +   *
    +   * A message box may contain either a prompt, or a text area field, but
    +   * not both. The value may be set using setValue() and retrieved using
    +   * value().
    +   *
    +   * \sa enableTextArea(), setValue(), value()
    +   */
    +  void enablePrompt(bool enable);
    +
    +  /*! \brief Return if the messagebox may show a prompt.
    +   *
    +   * \sa enablePrompt()
    +   */  
    +  bool hasPrompt() const { return prompt_; }
    +
    +  /*! \brief Show a multi-line input field.
    +   *
    +   * A message box may contain either a prompt, or a text area field, but
    +   * not both. The value may be set using setValue() and retrieved using
    +   * value().
    +   *
    +   * \sa enablePrompt(), setValue(), value()
    +   */
    +  void enableTextArea(bool enable);
    +
    +  /*! \brief Return if the messagebox may show a prompt.
    +   *
    +   * \sa enableTextArea()
    +   */
    +  bool hasTextArea() const { return textArea_; }
    +
    +  /*! \brief Set the value in the input field.
    +   *
    +   * \sa enableTextArea(), enablePrompt()
    +   */ 
    +  void setValue(const WString& value);
    +
    +  /*! \brief Get the value of the input field.
    +   *
    +   * \sa enableTextArea(), enablePrompt()
    +   */ 
    +  const WString& value() const { return value_; }
    +
    +  /*! \brief Convenience method to show a message box, blocking the current
    +   *         thread.
    +   *
    +   * Show a message box, blocking the current thread until the message box
    +   * is closed, and return the result.
    +   */
    +  static StandardButton show(const WString& caption,
    +			     const WString& text,
    +			     WFlags<StandardButton> buttons,
    +			     bool i18n = false);
    +
    +  /*! \brief Convenience method to show a message box prompting for
    +   *         input, blocking the current thread.
    +   *
    +   * Show a message box that prompts for input, blocking the current
    +   * thread until the message box is closed, and return the result.
    +   *
    +   * When the user confirmed message box, the <i>value</i> is updated with
    +   * the edited value.
    +   */
    +  static StandardButton prompt(const WString& caption,
    +			       const WString& text,
    +			       WString& value, bool multiLine = false,
    +			       bool i18n = false);
    +
    +  /*! \brief %Signal emitted when a button is clicked.
    +   */
    +  Signal<StandardButton>& buttonClicked() { return buttonClicked_; }
    +
    +  /*! \brief Show or hide the message box.
    +   */
    +  virtual void setHidden(bool hidden);
    +
    +  virtual void refresh();
    +
    +protected:
    +  void enableProgressBar(bool enable, bool infinite = false);
    +  void updateProgress(double value);
    +  virtual std::string buttonText(int buttonIndex) const;
    +
    +private:
    +  Signal<StandardButton> buttonClicked_;
    +  WString                text_;
    +  WString                value_;
    +  WFlags<StandardButton> buttons_;
    +  Icon                   icon_;
    +  bool                   i18n_;
    +  bool                   prompt_;
    +  bool                   textArea_;
    +  bool                   progress_;
    +  double                 progressValue_;
    +  bool                   progressInfinite_;
    +
    +  bool                   firstDisplay_;
    +  bool                  *catchDelete_;
    +  StandardButton         result_;
    +  JSignal<std::string, std::string> extButtonClicked_;
    +
    +  void createConfig(std::ostream& config);
    +  void onClick(std::string buttonId, std::string value);
    +  virtual std::string renderRemoveJs();
    +
    +  static const char *buttonText_[];
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_MESSAGEBOX_
    diff --git a/wt-3.1.7a/src/Wt/Ext/MessageBox.C b/wt-3.1.7a/src/Wt/Ext/MessageBox.C
    new file mode 100644
    index 0000000..247669e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/MessageBox.C
    @@ -0,0 +1,282 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/MessageBox"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +const char *MessageBox::buttonText_[] = { "Ok", "Yes", "No", "Cancel" };
    +
    +MessageBox::MessageBox(bool i18n)
    +  : Dialog(Bla()),
    +    buttonClicked_(this),
    +    buttons_(NoButton),
    +    i18n_(i18n),
    +    prompt_(false),
    +    textArea_(false),
    +    progress_(false),
    +    progressValue_(0),
    +    progressInfinite_(false),
    +    firstDisplay_(true),
    +    catchDelete_(0),
    +    result_(NoButton),
    +    extButtonClicked_(this, "btnclk", false)
    +{
    +  extButtonClicked_.connect(this, &MessageBox::onClick);
    +}
    +
    +MessageBox::MessageBox(const WString& caption, const WString& text,
    +		       Icon icon, WFlags<StandardButton> buttons, bool i18n)
    +  : Dialog(Bla()),
    +    text_(text),
    +    buttons_(buttons),
    +    icon_(icon),
    +    i18n_(i18n),
    +    prompt_(false),
    +    textArea_(false),
    +    progress_(false),
    +    progressValue_(0),
    +    progressInfinite_(false),
    +    firstDisplay_(true),
    +    catchDelete_(0),
    +    result_(NoButton),
    +    extButtonClicked_(this, "btnclk", false)
    +{
    +  setWindowTitle(caption);
    +  extButtonClicked_.connect(this, &MessageBox::onClick);
    +}
    +
    +MessageBox::~MessageBox()
    +{
    +  hide();
    +
    +  if (catchDelete_)
    +    *catchDelete_ = true;
    +}
    +
    +void MessageBox::setText(const WString& text)
    +{
    +  text_ = text;
    +  if (!hidden_)
    +    WApplication::instance()
    +      ->doJavaScript(elRef() + ".updateText(" + text.jsStringLiteral() + ");");
    +}
    +
    +void MessageBox::setIcon(Icon icon)
    +{
    +  icon_ = icon;
    +}
    +
    +void MessageBox::setButtons(WFlags<StandardButton> buttons)
    +{
    +  buttons_ = buttons;
    +}
    +
    +void MessageBox::enablePrompt(bool enable)
    +{
    +  prompt_ = enable;
    +}
    +
    +void MessageBox::enableTextArea(bool enable)
    +{
    +  textArea_ = enable;
    +}
    +
    +void MessageBox::enableProgressBar(bool enable, bool infinite)
    +{
    +  progress_ = enable;
    +  progressInfinite_ = infinite;
    +}
    +
    +void MessageBox::updateProgress(double v)
    +{
    +  progressValue_ = std::min(1.0, std::max(0.0, v));
    +
    +  if (!hidden_)
    +    WApplication::instance()
    +      ->doJavaScript(elRef() + ".updateProgress("
    +		     + boost::lexical_cast<std::string>(progressValue_) + ");");
    +}
    +
    +void MessageBox::setValue(const WString& value)
    +{
    +  value_ = value;
    +}
    +
    +void MessageBox::setHidden(bool hidden)
    +{
    +  if (hidden != hidden_) {
    +    hidden_ = hidden;
    +
    +    WApplication *app = WApplication::instance();
    +
    +    if (!hidden)
    +      setExposeMask(app);
    +    else
    +      restoreExposeMask(app);
    + 
    +    if (hidden)
    +      app->doJavaScript(elRef() + ".hide();");
    +    else {
    +      std::stringstream config;
    +      config << "{a:0";
    +      createConfig(config);
    +      config << "}";
    +
    +      std::string var;
    +      if (firstDisplay_) {
    +	var = elRef() + "=Ext.Msg";
    +
    +	/* fix cursor problem in FF 1.5, 2 */
    +	if (!app->environment().agentIsIE())
    +	  app->doJavaScript
    +	  ("Ext.Msg.getDialog().on('show', function(d) {"
    +	   "var div = Ext.get(d.el);"
    +	   "div.setStyle('overflow', 'auto');"
    +	   "var text = div.select('.ext-mb-textarea', true);"
    +	   "if (!text.item(0))"
    +	   "text = div.select('.ext-mb-text', true);"
    +	   "if (text.item(0))"
    +	   "text.item(0).dom.select();});");
    +      } else
    +	var = elRef();
    +
    +      WApplication::instance()
    +	->doJavaScript(var + ".show(" + config.str() + ");");
    +
    +      if (progress_) {
    +	WApplication::instance()
    +	  ->doJavaScript(elRef() + ".updateProgress("
    +			 + boost::lexical_cast<std::string>(progressValue_)
    +			 + ");");
    +      }
    +
    +      firstDisplay_ = false;
    +    }
    +  }
    +}
    +
    +void MessageBox::refresh()
    +{
    +  if (text_.refresh())
    +    setText(text_);
    +
    +  Dialog::refresh();
    +}
    +
    +void MessageBox::createConfig(std::ostream& config)
    +{
    +  config << ",title:" << windowTitle().jsStringLiteral();
    +
    +  if (!text_.empty())
    +    config << ",msg:" << text_.jsStringLiteral();
    +  if (prompt_)
    +    config << ",prompt:true";
    +  if (textArea_)
    +    config << ",multiline:true";
    +  if (prompt_ || textArea_)
    +    config << ",value:" << value_.jsStringLiteral();
    +  if (progress_)
    +    config << ",progress:true";
    +  if (buttons_ != NoButton) {
    +    config << ",buttons:{a:0";
    +    if (buttons_ & Ok)
    +      config << ",ok:" + jsStringLiteral(buttonText(0), '\'');
    +    if (buttons_ & Cancel)
    +      config << ",cancel:" + jsStringLiteral(buttonText(3), '\'');
    +    if (buttons_ & Yes)
    +      config << ",yes:" + jsStringLiteral(buttonText(1), '\'');
    +    if (buttons_ & No)
    +      config << ",no:" + jsStringLiteral(buttonText(2), '\'');
    +    config << "}";
    +  }
    +
    +  config << ",fn:function(b,v){"
    +	 << extButtonClicked_.createCall("b","v") << "}";
    +}
    +
    +std::string MessageBox::renderRemoveJs()
    +{
    +  throw WtException("MessageBox::renderRemoveJs(): really?");
    +}
    +
    +std::string MessageBox::buttonText(int buttonIndex) const
    +{
    +  if (i18n_)
    +    return WString::tr(buttonText_[buttonIndex]).toUTF8();
    +  else
    +    return buttonText_[buttonIndex];
    +}
    +
    +StandardButton MessageBox::show(const WString& caption,
    +				const WString& text,
    +				WFlags<StandardButton> buttons, bool i18n)
    +{
    +  MessageBox box(caption, text, NoIcon, buttons, i18n);
    +
    +  box.exec();
    +
    +  return box.result();
    +}
    +
    +StandardButton MessageBox::prompt(const WString& caption,
    +				  const WString& text,
    +				  WString& result,
    +				  bool multiLine, bool i18n)
    +{
    +  MessageBox box(caption, text, NoIcon, Ok | Cancel, i18n);
    +  if (multiLine)
    +    box.enableTextArea(true);
    +  else
    +    box.enablePrompt(true);
    +  box.setValue(result);
    +  box.exec();
    +
    +  if (box.result() == Ok)
    +    result = box.value();
    +
    +  return box.result();
    +}
    +
    +void MessageBox::onClick(std::string buttonId, std::string value)
    +{
    +  hidden_ = true;
    +  restoreExposeMask(WApplication::instance());
    +
    +  StandardButton b = NoButton;
    +
    +  if      (buttonId == "ok")     b = Ok;
    +  else if (buttonId == "cancel") b = Cancel;
    +  else if (buttonId == "yes")    b = Yes;
    +  else if (buttonId == "no")     b = No;
    +  else
    +    throw WtException("MessageBox: internal error, unknown buttonId '"
    +		      + buttonId + "';");
    +
    +  bool accepted = b == Ok || b == Yes;
    +
    +  if (accepted)
    +    value_ = WString::fromUTF8(value);
    +  result_ = b;
    +    
    +  bool wasDeleted = false;
    +  catchDelete_ = &wasDeleted;
    +
    +  done(accepted ? Accepted : Rejected);
    +
    +  if (!wasDeleted) {
    +    buttonClicked_.emit(b);
    +    catchDelete_ = 0;
    +  }
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/NumberField b/wt-3.1.7a/src/Wt/Ext/NumberField
    new file mode 100644
    index 0000000..16fe3ef
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/NumberField
    @@ -0,0 +1,59 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_NUMBERFIELD_H_
    +#define EXT_NUMBERFIELD_H_
    +
    +#include <Wt/Ext/LineEdit>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class NumberField Wt/Ext/NumberField Wt/Ext/NumberField
    + *  \brief A form field for editing a number.
    + *
    + * You may \link FormField::setValidator() set\endlink a WIntValidator
    + * or WDoubleValidator to specify in more detail the valid range, and
    + * the client-side validation messages.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API NumberField : public LineEdit
    +{
    +public:
    +  /*! \brief Create a new number field.
    +   */
    +  NumberField(WContainerWidget *parent = 0);
    +
    +  /*! \brief Set the value.
    +   */
    +  void setValue(double value);
    +
    +  /*! \brief Return the value.
    +   */
    +  double value() const;
    +
    +  /*! \brief Set the maximal decimal precision
    +   */
    +  void setDecimalPrecision(int decimals);
    +
    +  /*! \brief Return the decimal precision.
    +   */
    +  int decimalPrecision() const { return decimals_; }
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +
    +private:
    +  int decimals_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_NUMBERFIELD_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/NumberField.C b/wt-3.1.7a/src/Wt/Ext/NumberField.C
    new file mode 100644
    index 0000000..2374c79
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/NumberField.C
    @@ -0,0 +1,64 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iomanip>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/NumberField"
    +#include "Wt/WLineEdit"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +NumberField::NumberField(WContainerWidget *parent)
    +  : LineEdit(parent),
    +    decimals_(2)
    +{ }
    +
    +void NumberField::setValue(double value)
    +{
    +  std::ostringstream oss;
    +  oss << std::fixed << std::setprecision(decimals_) << value;
    +  lineEdit()->setText(oss.str());
    +}
    +
    +double NumberField::value() const
    +{
    +  try {
    +    return boost::lexical_cast<double>(lineEdit()->text());
    +  } catch (boost::bad_lexical_cast& e) {
    +    // You wouldn't expect this to happen anless a user is tampering
    +    // 0 with do in that case
    +    return 0;
    +  }
    +}
    +
    +void NumberField::setDecimalPrecision(int decimals)
    +{
    +  decimals_ = decimals;
    +}
    +
    +std::string NumberField::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +
    +  result << elVar() << " = new Ext.form.NumberField(" << configStruct() << ");";
    +
    +  applyToWidget(lineEdit(), result, inContainer);
    +
    +  return result.str();
    +}
    +
    +void NumberField::createConfig(std::ostream& config)
    +{
    +  LineEdit::createConfig(config);
    +
    +  if (decimals_ != 2)
    +    config << ",decimalPrecision:" << decimals_;
    +}
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/PagingToolBar b/wt-3.1.7a/src/Wt/Ext/PagingToolBar
    new file mode 100644
    index 0000000..d8b0a64
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/PagingToolBar
    @@ -0,0 +1,44 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_PAGING_TOOLBAR_H_
    +#define EXT_PAGING_TOOLBAR_H_
    +
    +#include <Wt/Ext/ToolBar>
    +#include <sstream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class PagingToolBar Wt/Ext/PagingToolBar Wt/Ext/PagingToolBar
    + *  \brief A tool bar that provides paging controls for supporting large
    + *         data sets in a table view.
    + *
    + * \sa TableView::createPagingToolBar()
    + * \sa Panel::setTopToolBar(), Panel::setBottomToolBar()
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API PagingToolBar : public ToolBar
    +{
    +protected:
    +  virtual void jsAfterPanelRendered(std::stringstream& js);
    +
    +private:
    +  std::string  storeRef_;
    +  TableView   *tableView_;
    +
    +  PagingToolBar(const std::string& storeRef, TableView *tableView);
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  friend class TableView;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_PAGING_TOOLBAR_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/PagingToolBar.C b/wt-3.1.7a/src/Wt/Ext/PagingToolBar.C
    new file mode 100644
    index 0000000..e9c8aa7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/PagingToolBar.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/Ext/PagingToolBar"
    +#include "Wt/Ext/TableView"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +PagingToolBar::PagingToolBar(const std::string& storeRef,
    +			     TableView *tableView)
    +  : storeRef_(storeRef),
    +    tableView_(tableView)
    +{ }
    +
    +std::string PagingToolBar::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar()
    +	 << "=new Ext.PagingToolbar({store:" << storeRef_ << ",pageSize:"
    +	 << boost::lexical_cast<std::string>(tableView_->pageSize())
    +	 << "});";
    +
    +  if (inContainer) {
    +    result << elVar() << ".render('" << id() << "');";
    +    jsAfterPanelRendered(result);
    +  }
    +
    +  return result.str();
    +}
    +
    +void PagingToolBar::jsAfterPanelRendered(std::stringstream& js)
    +{
    +  std::string refs = createMixed(items_, js);
    +  js << elRef() << ".add(" << refs << ");";
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/Panel b/wt-3.1.7a/src/Wt/Ext/Panel
    new file mode 100644
    index 0000000..cdb19f4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Panel
    @@ -0,0 +1,304 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_PANEL_H_
    +#define EXT_PANEL_H_
    +
    +#include <Wt/Ext/Container>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +    class ToolBar;
    +    class Button;
    +
    +/*! \class Panel Wt/Ext/Panel Wt/Ext/Panel
    + *  \brief A container with a title and standard GUI elements.
    + *
    + * Like a Container, from which %Panel derives, a panel organizes its
    + * contents using layout managers.
    + *
    + * The panel provides standard user-interface elements, such as a
    + * title bar, top and bottom tool/menu bars, and footer buttons, and a
    + * panel may be configured to be resizable and collapsible.
    + *
    + * Typically, panels will be added directly into a layout, and are
    + * components to organize your user interface. You may also add a
    + * panel to a plain container widget, but then you should set a size
    + * for the panel (using WWidget::resize()), in pixels.
    + *
    + * When a panel is added to WApplication::root(), as single widget, it
    + * acts like a plain Container, and thus none of the panel specific
    + * features (tool bars, buttons, etc...) are available. If you want to
    + * have a top-level Panel, you need thus to do something like this:
    + * \code
    +   // create the root container
    +   Wt::Ext::Container *rootContainer = new Wt::Ext::Container(app->root());
    +
    +   // create the root panel and fit it inside the container
    +   Wt::Ext::Panel *rootPanel = new Wt::Ext::Panel();
    +   rootContainer->setLayout(new Wt::WFitLayout());
    +   rootContainer->layout()->addWidget(rootPanel);
    +
    +   \endcode
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Panel : public Container
    +{
    +public:
    +  /*! \brief Create a new panel.
    +   *
    +   * When a <i>parent</i> is specified, or the panel is after
    +   * construction added to a WContainerWidget, the panel should be
    +   * given an explicit size in pixels, using WWidget::resize().
    +   */
    +  Panel(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destruct a panel.
    +   */
    +  ~Panel();
    +
    +  /*! \brief Set a tool bar at the top of the panel.
    +   *
    +   * <i>Note: you can only set a tool bar before the panel is rendered.</i>
    +   *
    +   * \sa topToolBar(), setBottomToolBar(ToolBar *)
    +   */
    +  void setTopToolBar(ToolBar *toolBar);
    +
    +  /*! \brief Return the top tool bar.
    +   *
    +   * \sa setTopToolBar(ToolBar *), bottomToolBar()
    +   */
    +  ToolBar *topToolBar() const { return topToolBar_; }
    +
    +  /*! \brief Set a tool bar at the bottom of the panel.
    +   *
    +   * <i>Note: you can only set a tool bar before the panel is rendered.</i>
    +   *
    +   * \sa bottomToolBar(), setTopToolBar(ToolBar *)
    +   */
    +  void setBottomToolBar(ToolBar *bottomBar);  
    +
    +  /*! \brief Return the top tool bar.
    +   *
    +   * \sa setBottomToolBar(ToolBar *), topToolBar()
    +   */
    +  ToolBar *bottomToolBar() const { return bottomToolBar_; }
    +
    +  /*! \brief Add a button to the footer of the panel.
    +   *
    +   * The button is displayed below the contents, but above a bottom tool bar
    +   * if it is set.
    +   *
    +   * \sa removeFooterButton(Button *), Dialog::addButton(Button *)
    +   */
    +  void addFooterButton(Button *button);
    +
    +  /*! \brief Remove a button from the footer of the panel.
    +   *
    +   * Transfers ownership back, and so you must delete the button if you
    +   * wish to destroy it.
    +   *
    +   * \sa addFooterButton(Button *), Dialog::removeButton(Button *)
    +   */
    +  void removeFooterButton(Button *button);
    +
    +  /*! \brief Retrn the list of footer buttons.
    +   *
    +   * \sa addFooterButton(Button *), removeFooterButton(Button *)
    +   */
    +  const std::vector<Button *>& footerButtons() const { return footerButtons_; }
    +
    +  /*! \brief Set a title.
    +   *
    +   * The panel title is set in the title bar. This method also makes
    +   * the title bar visible by calling setTitleBar(true).
    +   *
    +   * When the panel is added to a TabWidget, the title serves as the
    +   * tab label.
    +   * 
    +   * \sa title(), setTitleBar(bool)
    +   */
    +  void setTitle(const WString& title);
    +
    +  /*! \brief Get the title.
    +   *
    +   * \sa setTitle(const WString&)
    +   */
    +  const WString& title() const { return title_; }
    +
    +  /*! \brief Show or hide a title bar for the panel.
    +   *
    +   * The title bar appears at the top of the panel, above the contents
    +   * and the top tool bar (if there is one). By default, the title bar
    +   * is not shown unless a title is set.
    +   *
    +   * \sa setTitle(const WString&)
    +   */
    +  void setTitleBar(bool enable);
    +
    +  /*! \brief Get the title bar.
    +   *
    +   * \sa setTitleBar(bool)
    +   */
    +  bool titleBar() const { return titleBar_; }
    +
    +  /*! \brief Set to use animations for the expand/collapse operation.
    +   *
    +   * By default, the expand/collapse operation of a panel is not
    +   * animated. This setting is ignored if the panel is not
    +   * collapsible.
    +   *
    +   * \sa animate(), setCollapsible(bool)
    +   */
    +  void setAnimate(bool on);
    +
    +  /*! \brief Return if using animations for expand/collapse.
    +   *
    +   * \sa setAnimate(bool)
    +   */
    +  bool animate() const { return animate_; }
    +
    +  /*! \brief Option to show scroll bars when needed.
    +   *
    +   * By default, scrollbars are disabled.
    +   */
    +  void setAutoScrollBars(bool on);
    +
    +  /*! \brief Return if showing scroll bars when needed.
    +   *
    +   * \sa setAutoScrollBars(bool)
    +   */
    +  bool autoScrollBars() const { return autoScrollBars_; }
    +
    +  /*! \brief Change the border around the panel.
    +   *
    +   * By default, a panel has a small border around it. Set <i>show</i>
    +   * false to disable the border.
    +   *
    +   * \sa border()
    +   */
    +  void setBorder(bool show);
    +
    +  /*! \brief Get the border setting.
    +   *
    +   * \sa setBorder(bool)
    +   */
    +  bool border() const { return border_; }
    +
    +  /*! \brief Set the panel expanded or callapsed.
    +   *
    +   * When <i>on</i> is <i>true</i>, the panel is collapsed, minimizing
    +   * screen real estate.
    +   *
    +   * Initially, a panel is expanded.
    +   *
    +   * \sa setCollapsible(bool on)
    +   */
    +  void setCollapsed(bool on);
    +  
    +  /*! \brief Collapse the panel
    +   *
    +   * \sa setCollapsible(bool on)
    +   */
    +  void collapse();
    +
    +  /*! \brief Expand the panel
    +   *
    +   * \sa setCollapsible(bool on)
    +   */
    +  void expand();
    +
    +  /*! \brief Return if the panel is collapsed.
    +   *
    +   * \sa setCollapsed(bool)
    +   * \sa collapsed() and expanded() signals
    +   */
    +  bool isCollapsed() const { return isCollapsed_; }
    +
    +  /*! \brief Allow the user to collapse/expand the panel.
    +   *
    +   * When <i>on</i> is <i>true</i>, a button is added to the title bar, which
    +   * may be used to collapse/expand the panel.
    +   *
    +   * By default, a panel is not collapsible.
    +   *
    +   * \sa isCollapsed(), isCollapsible(), setCollapsed(bool)
    +   */
    +  void setCollapsible(bool on);
    +
    +  /*! \brief Return if the user may collapse/expand the panel.
    +   *
    +   * \sa setCollapsible()
    +   */
    +  bool isCollapsible() const { return collapsible_; } 
    +
    +  /*! \brief Allow the user to resize the panel.
    +   *
    +   * If true, then, depending on the layout the panel is in, a resize
    +   * handle will be displayed at one of the panel borders.
    +   *
    +   * By default, a panel may not be resized by the user.
    +   */
    +  void setResizable(bool on);
    +
    +  /*! \brief Return if the user may resize the panel.
    +   *
    +   * \sa setResizable()
    +   */
    +  bool isResizable() const { return split_; }
    +
    +  /*! \brief %Signal emitted when the panel is collapsed.
    +   *
    +   * \sa setCollapsible()
    +   */
    +  JSignal<>& collapsed() { return collapsed_; }
    +
    +  /*! \brief %Signal emitted when the panel is expanded.
    +   *
    +   * \sa setCollapsible()
    +   */
    +  JSignal<>& expanded() { return expanded_; }
    +
    +  virtual void refresh();
    +
    +protected:
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& config);
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  void setDefaultButton(Button *button);
    +  Button *defaultButton() const { return defaultButton_; }
    +
    +protected:
    +  virtual void removeChild(WWidget *child);
    +
    +private:
    +  JSignal<> collapsed_, expanded_;
    +
    +  bool    titleBar_, animate_, autoScrollBars_, border_, isCollapsed_,
    +    collapsible_, split_;
    +  WString title_;
    +
    +  ToolBar *topToolBar_;
    +  ToolBar *bottomToolBar_;
    +
    +  std::vector<Button *>  footerButtons_;
    +  Button                *defaultButton_;
    +
    +  void onExpand();
    +  void onCollapse();
    +
    +  friend class Button;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_PANEL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Panel.C b/wt-3.1.7a/src/Wt/Ext/Panel.C
    new file mode 100644
    index 0000000..8e1ffc3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Panel.C
    @@ -0,0 +1,249 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "DomElement.h"
    +#include "Wt/Ext/Panel"
    +#include "Wt/Ext/ToolBar"
    +#include "Utils.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Panel::Panel(WContainerWidget *parent)
    +  : Container(parent),
    +    collapsed_(this, "collapsed", true),
    +    expanded_(this, "expanded", true),
    +    titleBar_(false),
    +    animate_(false),
    +    autoScrollBars_(false),
    +    border_(true),
    +    isCollapsed_(false),
    +    collapsible_(false),
    +    split_(false),
    +    topToolBar_(0),
    +    bottomToolBar_(0),
    +    defaultButton_(0)
    +{ 
    +  collapsed_.connect(this, &Panel::onCollapse);
    +  expanded_.connect(this, &Panel::onExpand);
    +}
    +
    +Panel::~Panel()
    +{
    +  while (!footerButtons_.empty())
    +    removeFooterButton(footerButtons_.back());
    +}
    +
    +void Panel::removeChild(WWidget *child)
    +{
    +  if (child == topToolBar_) {
    +    topToolBar_ = 0;
    +    if (isRendered())
    +      addUpdateJS(elVar() + ".getTopToolbar().hide();");
    +  }
    +
    +  if (child == bottomToolBar_) {
    +    bottomToolBar_ = 0;
    +    if (isRendered())
    +      addUpdateJS(elVar() + ".getBottomToolbar().hide();");
    +  }
    +
    +  Container::removeChild(child);
    +}
    +
    +void Panel::setTopToolBar(ToolBar *toolBar)
    +{
    +  delete topToolBar_;
    +  topToolBar_ = toolBar;
    +
    +  if (topToolBar_)
    +    addOrphan(topToolBar_);
    +}
    +
    +void Panel::setBottomToolBar(ToolBar *toolBar)
    +{
    +  delete bottomToolBar_;
    +  bottomToolBar_ = toolBar;
    +
    +  if (bottomToolBar_)
    +    addOrphan(bottomToolBar_);
    +}
    +
    +void Panel::addFooterButton(Button *button)
    +{
    +  footerButtons_.push_back(button);
    +  button->setPanel(this);
    +  addOrphan(button);
    +}
    +
    +void Panel::removeFooterButton(Button *button)
    +{
    +  if (button == defaultButton_)
    +    defaultButton_ = 0;
    +
    +  if (Utils::erase(footerButtons_, button))
    +    button->setPanel(0);
    +}
    +
    +void Panel::setDefaultButton(Button *button)
    +{
    +  defaultButton_ = button;
    +}
    +
    +void Panel::setTitleBar(bool enable)
    +{
    +  titleBar_ = enable;
    +}
    +
    +void Panel::setTitle(const WString& title)
    +{
    +  title_ = title;
    +  addUpdateJS(elVar() + ".setTitle(" + title_.jsStringLiteral() + ");");
    +  setTitleBar(true);
    +}
    +
    +void Panel::setAnimate(bool on)
    +{ 
    +  animate_ = on;
    +}
    +
    +void Panel::setAutoScrollBars(bool on)
    +{ 
    +  autoScrollBars_ = on;
    +}
    +
    +void Panel::setBorder(bool on)
    +{ 
    +  border_ = on;
    +}
    +
    +void Panel::setCollapsed(bool on)
    +{ 
    +  if (isCollapsed_ != on) {
    +    isCollapsed_ = on;
    +    addUpdateJS(elVar() + "." + (on ? "collapse()" : "expand()") + ";");
    +  }
    +}
    +
    +void Panel::collapse()
    +{
    +  setCollapsed(true);
    +}
    +
    +void Panel::expand()
    +{
    +  setCollapsed(false);
    +}
    +
    +void Panel::setCollapsible(bool on)
    +{ 
    +  collapsible_ = on;
    +}
    +
    +void Panel::setResizable(bool on)
    +{ 
    +  split_ = on;
    +}
    +
    +void Panel::onCollapse()
    +{
    +  isCollapsed_ = true;
    +}
    +
    +void Panel::onExpand()
    +{
    +  isCollapsed_ = false;
    +}
    +
    +void Panel::refresh()
    +{
    +  if (title_.refresh())
    +    setTitle(title_);
    +
    +  Widget::refresh();
    +}
    +
    +void Panel::updateExt()
    +{
    +  updateWtSignal(&collapsed_, collapsed_.name(), "", "");
    +  updateWtSignal(&expanded_, expanded_.name(), "", "");
    +
    +  Container::updateExt();
    +}
    +
    +std::string Panel::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +
    +  if (topToolBar_)
    +    topToolBar_->createExtElement(result, 0);
    +  if (bottomToolBar_)
    +    bottomToolBar_->createExtElement(result, 0);
    +
    +  for (unsigned i = 0; i < footerButtons_.size(); ++i)
    +    footerButtons_[i]->createExtElement(result, 0);
    +
    +  result << Container::createJS(inContainer);
    +
    +  if (collapsible_) {
    +    bindEventHandler("collapse", "collapseH", result);
    +    bindEventHandler("expand", "expandH", result);
    +  }
    +
    +  if (topToolBar_)
    +    topToolBar_->jsAfterPanelRendered(result);
    +  if (bottomToolBar_)
    +    bottomToolBar_->jsAfterPanelRendered(result);
    +
    +  return result.str();
    +}
    +
    +void Panel::createConfig(std::ostream& config)
    +{
    +  Container::createConfig(config);
    +
    +  if (animate_ != false)        config << ",animate:true";
    +  if (autoScrollBars_ != false) config << ",autoScroll:true";
    +  if (border_ != true)          config << ",border:false";
    +  if (isCollapsed_ != false)    config << ",collapsed:true";
    +  if (collapsible_ != false)    config << ",collapsible:true";
    +  if (split_ != false)          config << ",split:true";
    +  //config << ",hideMode:'offsets'";
    +
    +  if (!title_.empty()) {
    +    config << ",title:" << title_.jsStringLiteral();
    +    if (titleBar_ != true)      config << ",header:false";
    +  } else
    +    if (titleBar_ != false)     config << ",header:true";
    +
    +  if (topToolBar_)
    +    config << ",tbar:" << topToolBar_->elVar();
    +  if (bottomToolBar_)
    +    config << ",bbar:" << bottomToolBar_->elVar();
    +
    +  if (!footerButtons_.empty()) {
    +    config << ",buttons:[";
    +
    +    for (unsigned i = 0; i < footerButtons_.size(); ++i) {
    +      if (i != 0)
    +	config << ',';
    +      config << footerButtons_[i]->elRef();
    +    }
    +
    +    config << ']';
    +  }
    +
    +  addWtSignalConfig("collapseH", &collapsed_, collapsed_.name(),
    +		    "", "", config);
    +  addWtSignalConfig("expandH", &expanded_, expanded_.name(),
    +		    "", "", config);
    +
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/ProgressDialog b/wt-3.1.7a/src/Wt/Ext/ProgressDialog
    new file mode 100644
    index 0000000..7f12125
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ProgressDialog
    @@ -0,0 +1,158 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_PROGRESSDIALOG_H_
    +#define EXT_PROGRESSDIALOG_H_
    +
    +#include <Wt/Ext/MessageBox>
    +#include <Wt/Ext/ExtDllDefs.h>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class ProgressDialog Wt/Ext/ProgressDialog Wt/Ext/ProgressDialog
    + *  \brief A standard dialog to inform the user of progress during
    + *         a time consuming task.
    + *
    + * A progress bar is shown to show progress from minimum() to
    + * maximum(), with the current value within (this range) set using
    + * setValue(). When the user cancels the dialog, the dialog is hidden
    + * and the canceled() signal is emitted.
    + *
    + * The progress dialog may be used in two ways.
    + *
    + * The easiest way is using a code snippet like this:
    + * \code
    + * Wt::Ext::ProgressDialog progress("Converting contact details...", "Cancel", 0, contacts_.size());
    + * progress.setWindowTitle("Import Contacts");
    + *
    + * for (unsigned i = 0; i < contacts_.size(); ++i) {
    + *   progress.setValue(i);
    + *
    + *   Wt::WApplication::instance()->processEvents();
    + *
    + *   if (!progress.wasCanceled()) {
    + *     convertContactDetails(contacts_[i]);
    + *   } else {
    + *     Wt::Ext::MessageBox::show("Operation cancelled",
    + *	       "You may import your contact details any time later.", Ok);
    + *     break;
    + *   }
    + * }
    + * \endcode
    + *
    + * Using this approach, WApplication::processEvents() is used to
    + * synchronize the server and client state. This approach has the
    + * drawback that browser interactivity is limited.
    + *
    + * The more involved approach involves the use of WTimer to update the progress
    + * in conjunction with a worker thread to do the actual work.
    + *
    + * \image html ExtProgressDialog-1.png "Example of a ProgressDialog"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API ProgressDialog : public MessageBox
    +{
    +public:
    +  /*! \brief Create a new progress dialog.
    +   *
    +   * Creates a new dialog, with window title 'Progress...', no message,
    +   * and a Cancel button. The progress range is defined from 0 to 100.
    +   */
    +  ProgressDialog(bool i18n = false);
    +
    +  /*! \brief Create a new progress dialog.
    +   *
    +   * Creates a new dialog, with window title 'Progress...', the given
    +   * message, and a Cancel button. The progress range is defined from
    +   * <i>minimum</i> to <i>maximum</i>
    +   */
    +  ProgressDialog(const WString& text, const WString& cancelButtonText,
    +		 int minimum, int maximum, bool i18n = false);
    +
    +
    +  /*! \brief Set the minimum value.
    +   */
    +  void setMinimum(int minimum);
    +
    +  /*! \brief Return the minimum value.
    +   */
    +  int minimum() const { return minimum_; }
    +
    +  /*! \brief Set the maximum value.
    +   */
    +  void setMaximum(int maximum);
    +
    +  /*! \brief Return the maximum value.
    +   */
    +  int maximum() const { return maximum_; }
    +
    +  /*! \brief Define the range.
    +   */
    +  void setRange(int minimum, int maximum);
    +
    +  /*! \brief Cancel the dialog.
    +   *
    +   * Sets the state to cancelled, and hides the dialog. Calling this
    +   * method does not emit the
    +   * \link ProgressDialog::canceled canceled\endlink signal.
    +   */
    +  void cancel();
    +
    +  /*! \brief Reset the dialog.
    +   *
    +   * The value is reset to the minimum(), and the cancelled state is cleared.
    +   */
    +  void reset();
    +
    +  /*! \brief Set the text used for the cancel button.
    +   */
    +  void setCancelButtonText(const WString& text);
    +
    +  /*! \brief Set the current value (in the range from minimum() to maximum()).
    +   */
    +  void setValue(int progress);
    +
    +  /*! \brief Return the current value.
    +   */
    +  int value() const { return value_; }
    +
    +  /*! \brief Return if the progress dialog was cancelled.
    +   *
    +   * \sa canceled, cancel()
    +   */
    +  bool wasCanceled() const { return wasCanceled_; }
    +
    +  // TODO: add minimumDuration stuff
    +
    +  /*! \brief %Signal emitted when the user cancels the dialog.
    +   *
    +   * When the user cancels the dialog, the dialog is hidden, and the state is
    +   * set to being cancelled.
    +   *
    +   * \sa wasCanceled()
    +   */
    +  Signal<>& canceled() { return canceled_; }
    +
    +protected:
    +  virtual std::string buttonText(int buttonIndex) const;
    +
    +private:
    +  Signal<> canceled_;
    +  WString cancelButtonText_;
    +  int minimum_;
    +  int maximum_;
    +  int value_;
    +  bool wasCanceled_;
    +
    +  void onButtonClick(StandardButton b);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_PROGRESS_DIALOG_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/ProgressDialog.C b/wt-3.1.7a/src/Wt/Ext/ProgressDialog.C
    new file mode 100644
    index 0000000..170a8b8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ProgressDialog.C
    @@ -0,0 +1,112 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/ProgressDialog"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +ProgressDialog::ProgressDialog(bool i18n)
    +  : MessageBox("Progress...", "", NoIcon, Cancel, i18n),
    +    canceled_(this),
    +    cancelButtonText_("Cancel"),
    +    minimum_(0),
    +    maximum_(100),
    +    value_(minimum_),
    +    wasCanceled_(false)
    +{ 
    +  enableProgressBar(true);
    +  buttonClicked().connect(this, &ProgressDialog::onButtonClick);
    +
    +  //show();
    +}
    +
    +ProgressDialog::ProgressDialog(const WString& labelText,
    +			       const WString& cancelButtonText,
    +			       int minimum, int maximum, bool i18n)
    +  : MessageBox("Progress...", labelText, NoIcon, Cancel, i18n),
    +    canceled_(this),
    +    cancelButtonText_(cancelButtonText),
    +    minimum_(minimum),
    +    maximum_(maximum),
    +    value_(minimum),
    +    wasCanceled_(false)
    +{
    +  enableProgressBar(true);
    +  buttonClicked().connect(this, &ProgressDialog::onButtonClick);
    +
    +  //show();
    +}
    +
    +void ProgressDialog::setMinimum(int minimum)
    +{
    +  minimum_ = minimum;
    +  if (value_ < minimum_)
    +    reset();
    +}
    +
    +void ProgressDialog::setMaximum(int maximum)
    +{
    +  maximum_ = maximum;
    +  if (value_ > maximum_)
    +    reset();
    +}
    +
    +void ProgressDialog::setRange(int minimum, int maximum)
    +{
    +  minimum_ = minimum;
    +  maximum_ = maximum;
    +
    +  if (value_ < minimum_ || value_ > maximum_)
    +    reset();
    +}
    +
    +void ProgressDialog::cancel()
    +{
    +  wasCanceled_ = true;
    +  hide();
    +}
    +
    +void ProgressDialog::reset()
    +{
    +  setValue(minimum_);
    +  wasCanceled_ = false;
    +}
    +
    +void ProgressDialog::setValue(int progress)
    +{
    +  value_ = std::max(std::min(progress, maximum_), minimum_);
    +
    +  if (value_ == maximum_) {
    +    hide();
    +    value_ = minimum_;
    +    wasCanceled_ = false;
    +  } else
    +    updateProgress(static_cast<double>(value_ - minimum_)
    +		   /(maximum_ - minimum_));
    +}
    +
    +void ProgressDialog::setCancelButtonText(const WString& text)
    +{
    +  cancelButtonText_ = text;
    +}
    +
    +void ProgressDialog::onButtonClick(StandardButton button)
    +{
    +  wasCanceled_ = true;
    +  canceled_.emit();
    +}
    +
    +std::string ProgressDialog::buttonText(int buttonIndex) const
    +{
    +  if (buttonIndex == 3 && cancelButtonText_ != WString::Empty)
    +    return cancelButtonText_.toUTF8();
    +  else
    +    return MessageBox::buttonText(buttonIndex);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/RadioButton b/wt-3.1.7a/src/Wt/Ext/RadioButton
    new file mode 100644
    index 0000000..5eea9b5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/RadioButton
    @@ -0,0 +1,52 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_RADIOBUTTON_H_
    +#define EXT_RADIOBUTTON_H_
    +
    +#include <Wt/Ext/AbstractToggleButton>
    +
    +namespace Wt {
    +
    +  class WRadioButton;
    +
    +  namespace Ext {
    +
    +/*! \class RadioButton Wt/Ext/RadioButton Wt/Ext/RadioButton
    + *  \brief A user control that represents a radio button.
    + *
    + * Add the radio button to a WButtonGroup to group together different
    + * options that are mutually exclusive.
    + *
    + * The API is identical to the WRadioButton API.
    + *
    + * \sa AbstractToggleButton
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API RadioButton : public AbstractToggleButton
    +{
    +public:
    +  /*! \brief Create an unchecked radio button with empty label and optional
    +   *          parent.
    +   */
    +  RadioButton(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create an unchecked radio button with given text and optional
    +   *         parent.
    +   */
    +  RadioButton(const WString& text, WContainerWidget *parent = 0);
    +
    +  WRadioButton *wtRadioButton() const;
    +
    +private:
    +  std::string getExtName() const;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_RADIOBUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/RadioButton.C b/wt-3.1.7a/src/Wt/Ext/RadioButton.C
    new file mode 100644
    index 0000000..8ba5139
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/RadioButton.C
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/RadioButton"
    +#include "Wt/WRadioButton"
    +#include "Wt/WButtonGroup"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +RadioButton::RadioButton(const WString& text, WContainerWidget *parent)
    +  : AbstractToggleButton(new WRadioButton(), text, parent)
    +{ }
    +
    +RadioButton::RadioButton(WContainerWidget *parent)
    +  : AbstractToggleButton(new WRadioButton(), WString(), parent)
    +{ }
    +
    +std::string RadioButton::getExtName() const
    +{
    +  return "Radio";
    +}
    +
    +WRadioButton *RadioButton::wtRadioButton() const
    +{
    +  return dynamic_cast<WRadioButton *>(wtWidget());
    +}
    +
    +  }
    +
    +void WButtonGroup::addButton(Ext::RadioButton *button, int id)
    +{
    +  addButton(button->wtRadioButton(), id);
    +}
    +
    +void WButtonGroup::removeButton(Ext::RadioButton *button)
    +{
    +  removeButton(button->wtRadioButton());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/Splitter b/wt-3.1.7a/src/Wt/Ext/Splitter
    new file mode 100644
    index 0000000..5dcec72
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Splitter
    @@ -0,0 +1,124 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_SPLITTER_H_
    +#define EXT_SPLITTER_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/Ext/ExtDllDefs.h>
    +
    +namespace Wt {
    +
    +  class WTable;
    +  class WTableCell;
    +
    +  namespace Ext {
    +
    +    class SplitterHandle;
    +
    +/*! \class Splitter Wt/Ext/Splitter Wt/Ext/Splitter
    + *  \brief A container widget with resize handles between its children.
    + *
    + * Provides a container in which widgets are laid out either
    + * horizontally (side by side, Horizontal orientation), or vertically
    + * (Vertical orientation).
    + *
    + * Widgets are separated by a SplitterHandle which the user may use to
    + * resize widgets. For this to work properly, you need to properly specify
    + * widths, and minimum- and maximum widths for the widgets:
    + *
    + * <ul>
    + *   <li>They MUST have their width (or height) set using WWidget::resize(),
    + *     in WLength::Pixel units. You cannot specify the size through CSS!</li>
    + *
    + *   <li>Optionally, the may have a minimum width (or minimum height)
    + *     set using WWidget::setMinimumSize() and
    + *     WWidget::setMaximumSize(). Again, you cannot specify these
    + *     properties through CSS!</li>
    + *
    + *   <li>Probably you will want to insert each widget in a WScrollArea, or
    + *     set the CSS overflow attribute to hidden (which clips anything that
    + *     goes outside) or auto (to add scroll bars).</li>
    + * </ul>
    + *
    + * <i>Note: removing or adding widgets after initial render is not yet
    + *    supported.</i>
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Splitter : public WContainerWidget
    +{
    +public:
    +  /*! \brief Create a new horizontal splitter.
    +   */
    +  Splitter(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create a new splitter with the given orientation.
    +   */
    +  Splitter(Orientation orientation, WContainerWidget *parent = 0);
    +
    +  /*! \brief Set the orientation.
    +   */
    +  void setOrientation(Orientation orientation);
    +
    +  /*! \brief Return the orientation.
    +   */
    +  Orientation orientation() const { return orientation_; }
    +
    +  /*! \brief Set the width of the resize handles (in pixels).
    +   *
    +   * The default width is 4 pixels.
    +   *
    +   * \sa handleWidth()
    +   */
    +  void setHandleWidth(int width);
    +
    +  /*! \brief Return the width of the resize handles.
    +   *
    +   * The default width is 4 pixels.
    +   *
    +   * \sa setHandleWidth()
    +   */
    +  int handleWidth() const { return handleWidth_; }
    +
    +  /*! \brief Returns the handle to the left (or above) the widget at
    +   *         the given <i>index</i>.
    +   *
    +   * There is no handle to the left of the widget at index 0, and 0 will
    +   * be returned.
    +   */
    +  SplitterHandle *handle(int index) const;
    +
    +  virtual void addWidget(WWidget *widget);
    +  virtual void insertWidget(int index, WWidget *widget);
    +  virtual void insertBefore(WWidget *widget, WWidget *before);
    +
    +  const std::vector<WWidget *>& children() const { return children_; }
    +
    +private:
    +  Orientation                   orientation_;
    +  WContainerWidget             *container_;
    +  std::vector<WWidget *>        children_;
    +  std::vector<SplitterHandle *> handles_;
    +  int                           handleWidth_;
    +
    +  virtual DomElement *createDomElement(WApplication *app);
    +
    +  void insertHandle(int index);
    +  void deleteHandle(int index);
    +
    +  WWidget *widgetBefore(const SplitterHandle *handle) const;
    +  WWidget *widgetAfter(const SplitterHandle *handle) const;
    +  SplitterHandle *splitterBefore(const SplitterHandle *handle) const;
    +  SplitterHandle *splitterAfter(const SplitterHandle *handle) const;
    +
    +  friend class SplitterHandle;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_SPLITTER_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Splitter.C b/wt-3.1.7a/src/Wt/Ext/Splitter.C
    new file mode 100644
    index 0000000..6cb4f55
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Splitter.C
    @@ -0,0 +1,177 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/Ext/Splitter"
    +#include "Wt/Ext/SplitterHandle"
    +#include "Wt/WApplication"
    +#include "Wt/WTable"
    +
    +#include "DomElement.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +Splitter::Splitter(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    orientation_(Horizontal),
    +    handleWidth_(4)
    +{
    +  WContainerWidget::addWidget(container_ = new WContainerWidget());
    +
    +  container_->resize(WLength(100, WLength::Percentage),
    +		     WLength(100, WLength::Percentage));
    +  container_->setPositionScheme(Relative);
    +
    +  setHideWithOffsets();
    +}
    +
    +Splitter::Splitter(Orientation orientation, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    orientation_(orientation),
    +    handleWidth_(4)
    +{
    +  WContainerWidget::addWidget(container_ = new WContainerWidget());
    +
    +  container_->resize(WLength(100, WLength::Percentage),
    +		     WLength(100, WLength::Percentage));
    +  container_->setPositionScheme(Relative);
    +
    +  setHideWithOffsets();
    +}
    +
    +void Splitter::setOrientation(Orientation orientation)
    +{
    +  orientation_ = orientation;
    +}
    +
    +void Splitter::setHandleWidth(int pixels)
    +{
    +  handleWidth_ = pixels;
    +}
    +
    +void Splitter::addWidget(WWidget *widget)
    +{
    +  insertWidget(children_.size(), widget);
    +}
    +
    +void Splitter::insertBefore(WWidget *widget, WWidget *before)
    +{
    +  insertWidget(indexOf(before), widget);
    +}
    +
    +void Splitter::insertWidget(int index, WWidget *widget)
    +{
    +  children_.insert(children_.begin() + index, widget);
    +
    +  if (children_.size() != 1) {
    +    SplitterHandle *handle = new SplitterHandle(this);
    +
    +    if ((int)children_.size() - 1 == index) {
    +      handles_.insert(handles_.begin() + (index - 1), handle);
    +      container_->insertWidget(index * 2 - 1, handle);
    +    }
    +
    +    container_->insertWidget(index * 2, widget);
    +
    +    if ((int)children_.size() - 1 != index) {
    +      handles_.insert(handles_.begin() + index, handle);
    +      container_->insertWidget(index * 2 + 1, handle);
    +    }
    +
    +  } else
    +    container_->insertWidget(0, widget);
    +
    +  widget->setPositionScheme(Absolute);
    +  widget->setInline(false);
    +}
    +
    +SplitterHandle *Splitter::handle(int index) const
    +{
    +  if (index == 0)
    +    return 0;
    +  else
    +    return handles_[index - 1];
    +}
    +
    +WWidget *Splitter::widgetBefore(const SplitterHandle *handle) const
    +{
    +  std::size_t index
    +    = std::find(handles_.begin(), handles_.end(), handle) - handles_.begin();
    +
    +  return children_[index];
    +}
    +
    +WWidget *Splitter::widgetAfter(const SplitterHandle *handle) const
    +{
    +  std::size_t index
    +    = std::find(handles_.begin(), handles_.end(), handle) - handles_.begin();
    +
    +  return children_[index + 1];
    +}
    +
    +SplitterHandle *Splitter::splitterBefore(const SplitterHandle *handle) const
    +{
    +  std::size_t index
    +    = std::find(handles_.begin(), handles_.end(), handle) - handles_.begin();
    +
    +  if (index > 0)
    +    return handles_[index - 1];
    +  else
    +    return 0;
    +}
    +
    +SplitterHandle *Splitter::splitterAfter(const SplitterHandle *handle) const
    +{
    +  std::size_t index
    +    = std::find(handles_.begin(), handles_.end(), handle) - handles_.begin();
    +
    +  if (index == handles_.size() - 1)
    +    return 0;
    +  else
    +    return handles_[index + 1];
    +}
    +
    +DomElement *Splitter::createDomElement(WApplication *app)
    +{
    +  /*
    +   * Adjust margins & offsets
    +   */
    +  int x = 0;
    +
    +  Side side = orientation_ == Horizontal ? Left : Top;
    +
    +  for (unsigned i = 0; i < children_.size(); ++i) {
    +    if (i != 0) {
    +      handles_[i-1]->setOffsets(x, side);
    +
    +      if (orientation_ == Horizontal)
    +	handles_[i-1]->resize(WLength(handleWidth_), WLength());
    +      else
    +	handles_[i-1]->resize(WLength(), WLength(handleWidth_));
    +
    +      x += handleWidth_;
    +      children_[i]->setMargin(WLength(x), side);
    +    }
    +
    +    WLength l = orientation_ == Horizontal
    +      ? children_[i]->width()
    +      : children_[i]->height();
    +
    +    if (l.isAuto())
    +      throw WtException("Splitter requires all widgets to have their "
    +			"width or height set using WWidget::resize().");
    +
    +    x += (int)l.value();
    +  }
    +
    +  DomElement *result = WContainerWidget::createDomElement(app);
    +  result->setProperty(Wt::PropertyStyleOverflowX, "hidden");
    +
    +  return result;
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/SplitterHandle b/wt-3.1.7a/src/Wt/Ext/SplitterHandle
    new file mode 100644
    index 0000000..28fe577
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/SplitterHandle
    @@ -0,0 +1,54 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_SPLITTER_HANDLE_H_
    +#define EXT_SPLITTER_HANDLE_H_
    +
    +#include <Wt/Ext/Widget>
    +#include <Wt/Ext/ExtDllDefs.h>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +    class Splitter;
    +
    +/*! \class SplitterHandle Wt/Ext/SplitterHandle Wt/Ext/SplitterHandle
    + *  \brief A handle inside a splitter.
    + *
    + * The handle which separates widgets inside a Splitter.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API SplitterHandle : public Widget
    +{
    +private:
    +  SplitterHandle(Splitter *splitter);
    +
    +public:
    +
    +  /*! \brief Return the splitter which uses this handle.
    +   */
    +  Splitter *splitter() const { return splitter_; }
    +
    +private:
    +  Splitter *splitter_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  friend class Splitter;
    +
    +  WLength minSizeBefore() const;
    +  WLength maxSizeBefore() const;
    +  WLength minSizeAfter() const;
    +  WLength maxSizeAfter() const;
    +
    +  std::string adjustMinMaxJS() const;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_SPLITTER_HANDLE_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/SplitterHandle.C b/wt-3.1.7a/src/Wt/Ext/SplitterHandle.C
    new file mode 100644
    index 0000000..b9d126e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/SplitterHandle.C
    @@ -0,0 +1,192 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/SplitterHandle"
    +#include "Wt/Ext/Splitter"
    +
    +#include "Wt/WApplication"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +SplitterHandle::SplitterHandle(Splitter *splitter)
    +  : Widget(),
    +    splitter_(splitter)
    +{ 
    +  WApplication *app = WApplication::instance();
    +
    +  const char *CSS_RULES_NAME = "Wt::Ext::SplitterHandle";
    +
    +  if (!app->styleSheet().isDefined(CSS_RULES_NAME)) {
    +    app->styleSheet().addRule("*.Wt-split-h",
    +			      "background-color:#C3DAF9;height:100%;"
    +			      "z-index:3;", CSS_RULES_NAME);
    +    app->styleSheet().addRule("*.Wt-split-v",
    +			      "background-color:#C3DAF9;width:100%;"
    +			      "z-index:3;");
    +  }
    +
    +  if (splitter_->orientation() == Horizontal)
    +    setStyleClass("Wt-split-h");
    +  else
    +    setStyleClass("Wt-split-v");
    +
    +  setPositionScheme(Absolute);
    +}
    +
    +std::string SplitterHandle::createJS(DomElement *inContainer)
    +{
    +  assert(inContainer);
    +
    +  WWidget *wb = splitter_->widgetBefore(this);
    +  WWidget *wa = splitter_->widgetAfter(this);
    +  SplitterHandle *sb = splitter_->splitterBefore(this);
    +  SplitterHandle *sa = splitter_->splitterAfter(this);
    +
    +  std::string result = elVar() + "=new Ext.SplitBar("
    +    + "'" + inContainer->id() + "',"
    +    + "'" + wb->id() + "'";
    +
    +  if (splitter_->orientation() != Horizontal)
    +    result += ",Ext.SplitBar.VERTICAL";
    +  result += ");";
    +  result += elVar()
    +    + ".setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter('"
    +    + parent()->id() + "'));";
    +
    +  std::string Left, width, Width;
    +
    +  if (splitter_->orientation() == Horizontal) {
    +    Left = "Left"; width = "width"; Width = "Width";
    +  } else {
    +    Left = "Top"; width = "height"; Width = "Height";
    +  }
    +
    +  result += elVar()
    +    + ".on('moved',function(){"
    +    "var b=" WT_CLASS ".getElement('" + wb->id() + "');"
    +    "var a=" WT_CLASS ".getElement('" + wa->id() + "');"
    +    "var s=" WT_CLASS ".getElement('" + id() + "');"
    +    "var t=a.offset" + Left + "-(s.offset" + Left + "+s.offset" + Width + ");"
    +    "a.style.margin" + Left + "=s.offset" + Left + "+s.offset" + Width
    +    + "+'px';"
    +    "a.style." + width + "=a.client" + Width + "+t+'px';";
    +
    +  if (sb) {
    +    result += sb->adjustMinMaxJS();
    +  }
    +  if (sa) {
    +    result += sa->adjustMinMaxJS();
    +  }
    +
    +  result += "});";
    +
    +  int minSizeB = minSizeBefore().isAuto() 
    +    ? 0 : (int)minSizeBefore().toPixels();
    +  int maxSizeB = maxSizeBefore().isAuto() 
    +    ? 99999 : (int)maxSizeBefore().toPixels();
    +  int minSizeA = minSizeAfter().isAuto() 
    +    ? 0 : (int)minSizeAfter().toPixels();
    +  int maxSizeA = maxSizeAfter().isAuto()
    +    ? 99999 : (int)maxSizeAfter().toPixels();
    +
    +  int currentSizeA 
    +    = (splitter_->orientation() == Horizontal 
    +       ? (int)wa->width().toPixels() : (int)wa->height().toPixels());
    +  int currentSizeB
    +    = (splitter_->orientation() == Horizontal 
    +       ? (int)wb->width().toPixels() : (int)wb->height().toPixels());
    +
    +  result += elVar() + ".minSize="
    +    + boost::lexical_cast<std::string>
    +    (std::max(minSizeB, currentSizeB + currentSizeA + splitter_->handleWidth()
    +	      - maxSizeA)) + ";";
    +
    +  result += elVar() + ".maxSize="
    +    + boost::lexical_cast<std::string>
    +    (std::min(maxSizeB, currentSizeB + currentSizeA
    +	      - minSizeA)) + ";";
    +
    +  return result;
    +}
    +
    +WLength SplitterHandle::minSizeBefore() const
    +{
    +  if (splitter_->orientation() == Horizontal)
    +    return splitter_->widgetBefore(this)->minimumWidth();
    +  else
    +    return splitter_->widgetBefore(this)->minimumHeight();
    +}
    +
    +WLength SplitterHandle::maxSizeBefore() const
    +{
    +  if (splitter_->orientation() == Horizontal)
    +    return splitter_->widgetBefore(this)->maximumWidth();
    +  else
    +    return splitter_->widgetBefore(this)->maximumHeight();
    +}
    +
    +WLength SplitterHandle::minSizeAfter() const
    +{
    +  if (splitter_->orientation() == Horizontal)
    +    return splitter_->widgetAfter(this)->minimumWidth();
    +  else
    +    return splitter_->widgetAfter(this)->minimumHeight();
    +}
    +
    +WLength SplitterHandle::maxSizeAfter() const
    +{
    +  if (splitter_->orientation() == Horizontal)
    +    return splitter_->widgetAfter(this)->maximumWidth();
    +  else
    +    return splitter_->widgetAfter(this)->maximumHeight();
    +}
    +
    +std::string SplitterHandle::adjustMinMaxJS() const
    +{
    +  int minSizeB = minSizeBefore().isAuto() 
    +    ? 0 : (int)minSizeBefore().toPixels();
    +  int maxSizeB = maxSizeBefore().isAuto() 
    +    ? 99999 : (int)maxSizeBefore().toPixels();
    +  int minSizeA = minSizeAfter().isAuto() 
    +    ? 0 : (int)minSizeAfter().toPixels();
    +  int maxSizeA = maxSizeAfter().isAuto()
    +    ? 99999 : (int)maxSizeAfter().toPixels();
    +
    +  std::string Width;
    +
    +  if (splitter_->orientation() == Horizontal) {
    +    Width = "Width";
    +  } else {
    +    Width = "Height";
    +  }
    +
    +  /*
    +   * minSize = max(minSizeB, b.clientWidth + a.clientWidth - maxSizeA)
    +   * maxSize = min(maxSizeB, b.clientWidth + a.clientWidth - minSizeA)
    +   */
    +
    +  WWidget *wb = splitter_->widgetBefore(this);
    +  WWidget *wa = splitter_->widgetAfter(this);
    +
    +  return "{"
    +    "var w=" WT_CLASS ".getElement('" + wb->id() + "').client"
    +    + Width + "+"
    +    WT_CLASS ".getElement('" + wa->id() + "').client" + Width + ";"
    +    "var s=" + elVar() + ";"
    +    "s.minSize=Math.max(" + boost::lexical_cast<std::string>(minSizeB) +
    +    ",w+"
    +    + boost::lexical_cast<std::string>(splitter_->handleWidth()) + "-"
    +    + boost::lexical_cast<std::string>(maxSizeA) + ");"
    +    "s.maxSize=Math.min(" + boost::lexical_cast<std::string>(maxSizeB) +
    +    ",w-" + boost::lexical_cast<std::string>(minSizeA) + ");"
    +    "}";
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/TabWidget b/wt-3.1.7a/src/Wt/Ext/TabWidget
    new file mode 100644
    index 0000000..d105e54
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TabWidget
    @@ -0,0 +1,188 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_TABWIDGET_H_
    +#define EXT_TABWIDGET_H_
    +
    +#include <Wt/WJavaScript>
    +#include <Wt/Ext/Panel>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +/*! \class TabWidget Wt/Ext/TabWidget Wt/Ext/TabWidget
    + *  \brief A widget that organizes contents in tab panes
    + *
    + * This widget has an API that is similar to the WTabWidget.
    + *
    + * Unlike WTabWidget, each tab is actually represented by a Panel, and
    + * methods are provided to add a panel directly (see addTab(Panel
    + * *)). The panel titles are then used as the tab labels.
    + *
    + * The widget inherits from Panel, and uses a WDefaultLayout
    + * to contain the tab panels. Adding panels to the layout is
    + * equivalent to adding tabs to the tab widget.
    + *
    + * \image html ExtTabWidget-1.png "Example of a TabWidget"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API TabWidget : public Panel
    +{
    +public:
    +  /*! \brief Create a new TabWidget
    +   */
    +  TabWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Add a new tab, with <i>child</i> as content, and the given label.
    +   *
    +   * This is implemented by creating a panel for the widget, and setting the
    +   * panel title to be the label.
    +   *
    +   * \sa addTab(Panel *), removeTab(int), widget(int)
    +   */
    +  void addTab(WWidget *child, const WString& label);
    +
    +  /*! \brief Add a new tab panel.
    +   *
    +   * The panel title is used as the tab label.
    +   *
    +   * \sa addTab(WWidget *, const WString&)
    +   */
    +  void addTab(Panel *panel);
    +
    +  /*! \brief Remove a tab.
    +   *
    +   * \sa addTab(Panel *), addTab(WWidget *, const WString&)
    +   * \sa indexOf(WWidget *)
    +   */
    +  void removeTab(int index);
    +
    +  /*! \brief Return the number of tabs.
    +   */
    +  int count() const;
    +
    +  /*! \brief Return t the panel at the given tab <i>index</i>.
    +   *
    +   * \sa widget(int)
    +   */
    +  Panel *panel(int index) const;
    +
    +  /*! \brief Return the content widget at the given tab <i>index</i>.
    +   *
    +   * \sa panel(int)
    +   */
    +  WWidget *widget(int index) const;
    +
    +  /*! \brief Return the index of the given widget/panel.
    +   *
    +   * If the widget was not added to this tab widget, then -1 is returned.
    +   */
    +  int indexOf(WWidget *widget) const;
    +
    +  /*! \brief Activate the tab at <i>index</i>.
    +   *
    +   * \sa setCurrentWidget(WWidget *), currentIndex()
    +   * \sa currentChanged() signal
    +   */
    +  void setCurrentIndex(int index);
    +
    +  /*! \brief Return the index of the activated tab.
    +   *
    +   * \sa setCurrentIndex(int)
    +   */
    +  int currentIndex() const;
    +
    +  /*! \brief Activate the tab showing the given <i>widget</i>
    +   *
    +   * This is equivalent to setCurrentIndex(indexOf(<i>widget</i>))
    +   * \sa currentWidget(), setCurrentIndex(int)
    +   */
    +  void setCurrentWidget(WWidget *widget);
    +
    +  /*! \brief Return the widget of the activated tab.
    +   *
    +   * \sa setCurrentWidget(WWidget *), currentIndex()
    +   */
    +  WWidget *currentWidget() const;
    +
    +  /*! \brief Enable or disable a tab.
    +   *
    +   * Enables or disables the tab at <i>index</i>. A disabled tab cannot be
    +   * activated.
    +   */
    +  void setTabEnabled(int index, bool enable);
    +
    +  /*! \brief Returns if a tab is enabled.
    +   */
    +  bool isTabEnabled(int index) const;
    +
    +  /*! \brief Hide or show a tab.
    +   *
    +   * Hides are shows the tab at <i>index</i>.
    +   */
    +  void setTabHidden(int index, bool hidden);
    +
    +  /*! \brief Return if a tab is hidden.
    +   */
    +  bool isTabHidden(int index) const;
    +
    +  /*! \brief Change the label for a tab.
    +   *
    +   * This is equivalent to panel(<i>index</i>)->setTitle(<i>label</i>);
    +   *
    +   * \sa tabText(int)
    +   */
    +  void setTabText(int index, const WString& label);
    +
    +  /*! \brief Return the label for a tab.
    +   *
    +   * \sa setTabText(int, const WString&)
    +   */
    +  const WString& tabText(int index) const;
    +
    +  /*! \brief Set the tooltip for a tab.
    +   *
    +   * The tooltip is shown when the user hovers over the label.
    +   *
    +   * <b>This seems currently broken in extjs 2.0.</b>
    +   */
    +  void setTabToolTip(int index, const WString& tip);
    +
    +  /*! \brief Return the tooltip for a tab.
    +   */
    +  const WString tabToolTip(int index) const;
    +
    +  virtual void refresh();
    +
    +  /*! \brief %Signal emitted when the user activates a tab.
    +   *
    +   * The index of the newly activated tab is passed as an argument.
    +   */
    +  Signal<int>& currentChanged() { return currentChanged_; }
    +
    +protected:
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& config);
    +  virtual std::string extClassName() const;
    +
    +  virtual void removeChild(WWidget *child);
    +
    +private:
    +  Signal<int>  currentChanged_;
    +  JSignal<int> jCurrentChanged_;
    +  std::vector<Panel *> panels_;
    +  int currentIndex_;
    +  
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  void onTabChange(int index);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_TABWIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/TabWidget.C b/wt-3.1.7a/src/Wt/Ext/TabWidget.C
    new file mode 100644
    index 0000000..e44c3b0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TabWidget.C
    @@ -0,0 +1,239 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "DomElement.h"
    +#include "Wt/Ext/TabWidget"
    +#include "Wt/WDefaultLayout"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +TabWidget::TabWidget(WContainerWidget *parent)
    +  : Panel(parent),
    +    currentChanged_(this),
    +    jCurrentChanged_(this, "tabchange", true),
    +    currentIndex_(-1)
    +{
    +  setLayout(new WDefaultLayout());
    +}
    +
    +void TabWidget::removeChild(WWidget *child)
    +{
    +  removeTab(indexOf(child));
    +
    +  Panel::removeChild(child);
    +}
    +
    +void TabWidget::addTab(Panel *panel)
    +{
    +  panel->setStyleClass("x-hidden");
    +
    +  layout()->addWidget(panel);
    +  panels_.push_back(panel);
    +
    +  if (currentIndex_ == -1)
    +    currentIndex_ = 0;
    +}
    +
    +void TabWidget::removeTab(int index)
    +{
    +  if (index != -1) {
    +    Panel *p = panel(index);
    +    panels_.erase(panels_.begin() + index);
    +    layout()->removeWidget(p);
    +  }
    +}
    +
    +void TabWidget::addTab(WWidget *child, const WString& label)
    +{
    +  Panel *p = dynamic_cast<Panel *>(child);
    +
    +  if (!p) {
    +    p = new Panel();
    +    p->setAutoScrollBars(true);
    +    p->setWidget(child);
    +  }
    +
    +  p->setTitle(label);
    +  addTab(p);
    +}
    +
    +int TabWidget::count() const
    +{
    +  return panels_.size();
    +}
    +
    +Panel *TabWidget::panel(int index) const
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  return panels_[index];
    +}
    +
    +WWidget *TabWidget::widget(int index) const
    +{
    +  return panel(index)->widget();
    +}
    +
    +void TabWidget::setCurrentIndex(int index)
    +{
    +  currentIndex_ = std::min(std::max(0, index), count() - 1);
    +
    +  if (isRendered())
    +    addUpdateJS(elVar()
    +		+ ".setActiveTab(" + panels_[currentIndex_]->elRef() + ");");
    +}
    +
    +int TabWidget::currentIndex() const
    +{
    +  return currentIndex_;
    +}
    +
    +int TabWidget::indexOf(WWidget *w) const
    +{
    +  for (unsigned i = 0; i < panels_.size(); ++i)
    +    if (panels_[i] == w || widget(i) == w)
    +      return i;
    +
    +  return -1;
    +}
    +
    +void TabWidget::setCurrentWidget(WWidget *widget)
    +{
    +  setCurrentIndex(indexOf(widget));
    +}
    +
    +WWidget *TabWidget::currentWidget() const
    +{
    +  return widget(currentIndex_);
    +}
    +
    +void TabWidget::setTabEnabled(int index, bool enable)
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  panels_[index]->setEnabled(enable);
    +}
    +
    +bool TabWidget::isTabEnabled(int index) const
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  return panels_[index]->isEnabled();
    +}
    +
    +void TabWidget::setTabHidden(int index, bool hidden)
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  panels_[index]->setHidden(hidden);
    +  if (hidden)
    +    addUpdateJS(elVar() + ".hideTabStripItem("
    +		+ boost::lexical_cast<std::string>(index) + ");");
    +  else
    +    addUpdateJS(elVar() + ".unhideTabStripItem("
    +		+ boost::lexical_cast<std::string>(index) + ");");
    +    
    +}
    +
    +bool TabWidget::isTabHidden(int index) const
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  return panels_[index]->isHidden();
    +}
    +
    +void TabWidget::setTabText(int index, const WString& label)
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  panels_[index]->setTitle(label);
    +}
    +
    +const WString& TabWidget::tabText(int index) const
    +{
    +  index = std::min(std::max(0, index), count() - 1);
    +  return panels_[index]->title();
    +}
    +
    +void TabWidget::setTabToolTip(int index, const WString& tip)
    +{
    +  /*
    +  index = std::min(std::max(0, index), count() - 1);
    +  panels_[index].toolTip = tip;
    +
    +  addUpdateJS(elVar() + ".getTab("
    +	      + boost::lexical_cast<std::string>(index)
    +	      + ").setTabTooltip("
    +	      + jsStringLiteral(tip.toUTF8(), '\'') + ");");  
    +  */
    +}
    +
    +const WString TabWidget::tabToolTip(int index) const
    +{
    +  /*
    +  index = std::min(std::max(0, index), count() - 1);
    +  return panels_[index].toolTip;  
    +  */
    +  return "";
    +}
    +
    +void TabWidget::refresh()
    +{
    +  /*
    +  for (unsigned i = 0; i < panels_.size(); ++i) {
    +    TabItem& item = panels_[i];
    +   
    +    if (item.text.refresh())
    +      setTabText(i, item.text);
    +    if (item.toolTip.refresh())
    +      setTabToolTip(i, item.toolTip);
    +  }
    +  */
    +
    +  Panel::refresh();
    +}
    +
    +void TabWidget::onTabChange(int i)
    +{
    +  currentIndex_ = i;
    +  currentChanged_.emit(currentIndex_);
    +}
    +
    +std::string TabWidget::extClassName() const
    +{
    +  return "Ext.TabPanel";
    +}
    +
    +void TabWidget::updateExt()
    +{
    +  Panel::updateExt();
    +}
    +
    +std::string TabWidget::createJS(DomElement *inContainer)
    +{
    +  if (!jCurrentChanged_.isConnected())
    +    jCurrentChanged_.connect(this, &TabWidget::onTabChange);
    +
    +  for (unsigned i = 0; i < panels_.size(); ++i)
    +    panels_[i]->setTitleBar(false);
    +
    +  std::stringstream result;
    +  result << Panel::createJS(inContainer);
    +
    +  result << elVar()
    +	 << ".setActiveTab(" << panels_[currentIndex_]->elRef() << ");";
    +
    +  result << elVar() << ".doLayout();";
    +
    +  bindEventHandler("tabchange", "tabchangeH", result);
    +
    +  return result.str();
    +}
    +
    +void TabWidget::createConfig(std::ostream& config)
    +{
    +  Panel::createConfig(config);
    +
    +  addWtSignalConfig("tabchangeH", &jCurrentChanged_, jCurrentChanged_.name(),
    +		    "t,p", "t.items.indexOf(p)", config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/TableView b/wt-3.1.7a/src/Wt/Ext/TableView
    new file mode 100644
    index 0000000..24cc630
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TableView
    @@ -0,0 +1,511 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_TABLE_VIEW_H_
    +#define EXT_TABLE_VIEW_H_
    +
    +#include <map>
    +#include <Wt/WJavaScript>
    +#include <Wt/Ext/Panel>
    +
    +namespace Wt {
    +
    +  class WAbstractItemModel;
    +  class WModelIndex;
    +
    +  namespace Ext {
    +
    +    class DataStore;
    +    class FormField;
    +
    +/*! \class TableView Wt/Ext/TableView Wt/Ext/TableView
    + *  \brief A widget that displays data in a table.
    + *
    + * This class is an MVC view widget, which works in conjunction with a
    + * WAbstractItemModel for the data. The model may be set (and changed)
    + * using setModel().
    + *
    + * The widget may be configured to allow the user to hide or resize
    + * columns, sort on column data, or reorder columns using drag&drop.
    + *
    + * By default, the table is not editable. Use setEditor() to specify a
    + * form field that may be used for inline editing for a particular
    + * column. Changes are then reflected in the model().
    + *
    + * The table supports single and multiple selection modes, that work
    + * on a row-level, or cell-level. The latter option is enforced when
    + * the table is editable.
    + *
    + * By default, the data of the model is stored client-side, but this
    + * may be changed using setDataLocation() to be server-side. The
    + * latter option allows, in conjunction with a paging tool bar (see
    + * createPagingToolBar()) to support viewing (and editing) of large
    + * data sets.
    + *
    + * Although TableView inherits from Container (through Panel),
    + * specifying a layout for adding or removing widgets is not
    + * supported. The Panel methods to specify tool bars, titles, and
    + * buttons are however supported.
    + *
    + * \image html ExtTableView-1.png "Example of a TableView"
    + * \image html ExtTableView-2.png "Example of a editing in a TableView using a ComboBox"
    + *
    + * <h3>CSS</h3>
    + *
    + * A TableView has the <tt>table.x-grid3-row-table</tt> style
    + * classes.
    + * \ingroup ext
    + */
    +class WT_EXT_API TableView : public Panel
    +{
    +public:
    +  /*! \brief Create a new table view.
    +   *
    +   * You should specify a model using setModel(WAbstractItemModel *).
    +   */
    +  TableView(WContainerWidget *parent = 0);
    +
    +  /*! \brief Specify the model.
    +   *
    +   * You can change the model at any time, with the contraint that you
    +   * should keep the same column configuration.
    +   *
    +   * You may also reset the same model. This will result in
    +   * retransmission of the model from scratch. In some cases, this
    +   * could result in a higher preformance when you have removed many
    +   * rows or modified a lot of data.
    +   */
    +  void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Return the model.
    +   *
    +   * \sa setModel(WAbstractItemModel *)
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Let the table view resize columns to fit their contents.
    +   *
    +   * By default, columns are sized using the column sizes that are
    +   * provided. Using this method, this is changed to let columns
    +   * expand to fit the entire table. By setting <i>onResize</i>, this
    +   * is done also whenever the entire table or one of the columns is
    +   * resized.
    +   */
    +  void resizeColumnsToContents(bool onResize = false);
    +
    +  /*! \brief Set the column which will auto-expand to take the
    +   *         remaining space.
    +   *
    +   * By default the last column will do that.
    +   */
    +  void setAutoExpandColumn(int column, int minWidth = 50, int maxWidth = 1000);
    +
    +  /*! \brief Return the column index of the column that auto-expands.
    +   */
    +  int autoExpandColumn() const;
    +
    +  /*! \brief Configure the location of the data.
    +   *
    +   * By default, data is stored at the client, and therefore entirely
    +   * transmitted when rendering the table for the first
    +   * time. Alternatively, the data may be kept at the server. Unless a
    +   * paging tool bar is configured however, this will still cause the
    +   * entire table to be anyway, after the table is rendered. When a paging
    +   * tool bar is configured, only a single page of data is displayed, and
    +   * transmitted, giving the best performance for big data sets.
    +   *
    +   * \sa createPagingToolBar()
    +   */
    +  void setDataLocation(DataLocation dataLocation);
    +
    +  /*! \brief Allow the user to move columns using drag and drop.
    +   *
    +   * Setting movable to true, enables the user to move columns around by
    +   * drag and drop.
    +   *
    +   * <i>Note: this currently breaks the CellSelection mode to record
    +   * the view column number, but not the data column number.</i>
    +   *
    +   * \sa columnsMovable()
    +   */
    +  void setColumnsMovable(bool movable);
    +
    +  /*! \brief Return if columns are movable.
    +   *
    +   * \sa setColumnsMovable(bool)
    +   */
    +  bool columnsMovable() const { return columnMove_; }
    +
    +  /*! \brief Render rows with alternating colors.
    +   *
    +   * By defaults, all rows are rendered using the same color.
    +   *
    +   * \sa alternatingRowColors()
    +   */
    +  void setAlternatingRowColors(bool enable);
    +
    +  /*! \brief Return if rows are rendered with alternating colors.
    +   *
    +   * \sa setAlternatingRowColors(bool)
    +   */
    +  bool alternatingRowColors() const { return alternatingRowColors_; }
    +
    +  /*! \brief Configure if the row under the mouse will be highlighted.
    +   *
    +   * By default, the row under the mouse is not highlighted.
    +   *
    +   * \sa highlightMouseOver()
    +   */
    +  void setHighlightMouseOver(bool highlight);
    +
    +  /*! \brief Return if the row under the mouse will be highlighted.
    +   */
    +  bool highlightMouseOver() const { return highlightMouseOver_; }  
    +
    +  // Configuration settings for individual columns
    +
    +  /*! \brief Change the visibility of a column.
    +   *
    +   * \sa isColumnHidden(int), enableColumnHiding(int, bool)
    +   */
    +  void setColumnHidden(int column, bool hide);
    +
    +  /*! \brief Return if a column is hidden.
    +   *
    +   * \sa setColumnHidden(int, bool)
    +   */
    +  bool isColumnHidden(int column) const;
    +
    +  /*! \brief Hide a column.
    +   *
    +   * \sa showColumn(int), setColumnHidden(int, bool)
    +   */
    +  void hideColumn(int column);
    +
    +  /*! \brief Show a column.
    +   *
    +   * \sa hideColumn(int), setColumnHidden(int, bool)
    +   */
    +  void showColumn(int column);
    +
    +  /*! \brief Set the column width (in pixels) for a column.
    +   *
    +   * \sa columnWidth(int)
    +   */
    +  void setColumnWidth(int column, int pixels);
    +
    +  /*! \brief Return the column width.
    +   *
    +   * \sa setColumnWidth(int, int)
    +   */
    +  int columnWidth(int column) const;
    +
    +  /*! \brief Set the horizontal content alignment of a column.
    +   *
    +   * The default value is \link Wt::AlignLeft AlignLeft\endlink.
    +   * The alignment parameter is a horizontal alignment flag.
    +   */
    +  void setColumnAlignment(int column, AlignmentFlag alignment);
    +
    +  /*! \brief Return the horizontal content alignment of a column.
    +   *
    +   * \sa setColumnAlignment(int, AlignmentFlag)
    +   */
    +  AlignmentFlag columnAlignment(int column) const;
    +
    +  /*! \brief Allow a column to be sorted by the user.
    +   *
    +   * \sa isColumnSortable(int)
    +   */
    +  void setColumnSortable(int column, bool sortable);
    +
    +  /*! \brief Return if a column is sortable.
    +   *
    +   * \sa setColumnSortable(int, bool)
    +   */
    +  bool isColumnSortable(int column) const;
    +
    +  /*! \brief Allow a column to be hidden through its context menu.
    +   *
    +   * \sa isColumnHidingEnabled(int)
    +   */
    +  void enableColumnHiding(int column, bool enable);
    +
    +  /*! \brief Return if a column may be hidden through its context menu.
    +   *
    +   * \sa enableColumnHiding(int, bool)
    +   */
    +  bool isColumnHidingEnabled(int column) const;
    +
    +  /*! \brief Configure an editor for the given column.
    +   *
    +   * Sets an inline editor that will be used to edit values in this column.
    +   * The edited value will be reflected in the data model.
    +   *
    +   * When configuring an editor, the selectionBehaviour() is set to
    +   * \link Wt::SelectItems SelectItems\endlink mode.
    +   *
    +   * \sa LineEdit, NumberField, DateField, ComboBox
    +   */
    +  void setEditor(int column, FormField *editor);
    +
    +  /*! \brief Configure a custom renderer for the given column.
    +   *
    +   * Sets a JavaScript function to render values in the given column.
    +   * The JavaScript function takes one argument (the value), which has
    +   * a type that corresponds to the C++ type:
    +   * <table>
    +   *   <tr><td><b>C++ type</b></td><td><b>JavaScript type</b></td></tr>
    +   *   <tr><td>WString</td><td>string</td></tr>
    +   *   <tr><td>WDate</td><td>Ext.Date</td></tr>
    +   *   <tr><td><i>number</i> type</td><td>number</td></tr>
    +   * </table>
    +   *
    +   * An example of rendererJS for numerical data, which renders positive
    +   * values in green and negative values in red could be:
    +   * \code
    +   * function change(val) {
    +   *   if (val > 0){
    +   *     return '\<span style="color:green;"\>' + val + '\</span\>';
    +   *   } else if(val < 0) {
    +   *     return '\<span style="color:red;"\>' + val + '\</span\>';
    +   *   }
    +   *   return val;
    +   * }
    +   * \endcode
    +   *
    +   * \sa dateRenderer()
    +   */
    +  void setRenderer(int column, const std::string& rendererJS);
    +
    +  /*! \brief Configure a page size to browse the data page by page.
    +   *
    +   * By setting a <i>pageSize</i> that is different from -1, the table
    +   * view will display only single pages of the whole data set. You
    +   * should probably add a paging tool bar to allow the user to scroll
    +   * through the pages.
    +   *
    +   * \sa pageSize(), createPagingToolBar()
    +   */
    +  void setPageSize(int pageSize);
    +
    +  /*! \brief Return the page size.
    +   *
    +   * \sa setPageSize(int)
    +   */
    +  int pageSize() const { return pageSize_; }
    +
    +  /*! \brief Create a paging tool bar.
    +   *
    +   * Create a toolbar that provides paging controls for this
    +   * table. You should configure the page size using setPageSize(int).
    +   *
    +   * \sa setPageSize(int), setDataLocation(DataLocation)
    +   * \sa setBottomToolBar(ToolBar *), setTopToolBar(ToolBar *)
    +   */
    +  ToolBar *createPagingToolBar();
    +
    +  virtual void refresh();
    +
    +  /*! \brief Create a date renderer for the given format.
    +   *
    +   * The result is a JavaScript function that renders WDate (or more
    +   * precisely, Ext.Date) values according to the given format, for
    +   * use in setRenderer()
    +   *
    +   * \sa setRenderer()
    +   * \sa \link WDate::toString(const WString&) const WDate::toString(const WString& format) \endlink
    +   */
    +  static std::string dateRenderer(const WString& format);
    +
    +  /*! \brief Give a cell focus
    +   *
    +   * When selectionBehavior() is \link Wt::SelectRows
    +   * SelectRows\endlink, only the <i>row</i> argument is used, and the
    +   * effect is to select a particular row.
    +   *
    +   * Even when selectionMode() is \link Wt::ExtendedSelection
    +   * ExtendedSelection\endlink, this method will first clear
    +   * selection, and the result is that the given
    +   * <i>row</i>,<i>column</i> will be the only selected cell.
    +   *
    +   * \sa currentRow(), currentColumn(), currentCellChanged() signal
    +   * \sa setSelectionMode(SelectionMode),
    +   *     setSelectionBehavior(SelectionBehavior)
    +   */
    +  void setCurrentCell(int row, int column);
    +
    +  /*! \brief Return the index of the row currently selected
    +   *
    +   * \sa currentColumn(), setCurrentCell(int, int)
    +   */
    +  int currentRow() const { return currentRow_; }
    +
    +  /*! \brief Return the index of the column currently selected
    +   *
    +   * \sa currentRow(), setCurrentCell(int, int)
    +   */
    +  int currentColumn() const { return currentColumn_; }
    +
    +  /*! \brief The list of rows that are currently selected.
    +   *
    +   * This is the way to retrieve the list of currently selected rows
    +   * when selectionBehavior() is \link Wt::SelectRows
    +   * SelectRows\endlink. This list is always empty when
    +   * selectionBehavior() is \link Wt::SelectItems SelectItems\endlink
    +   * and you should use currentRow() and currentColumn() instead.
    +   */
    +  const std::vector<int>&     selectedRows() { return selectedRows_; }
    +
    +  /*! \brief Clear the current selection.
    +   *
    +   * \sa setCurrentCell(int, int)
    +   */
    +  void clearSelection();
    +
    +  /*! \brief Return the current selection mode.
    +   *
    +   * \sa setSelectionMode(SelectionMode)
    +   */
    +  SelectionMode selectionMode() const { return selectionMode_; }
    +
    +  /*! \brief Set the selection mode.
    +   *
    +   * The selection mode determines if no, only one, or multiple items may
    +   * be selected.
    +   *
    +   * <i>When selectionBehavior() is \link Wt::SelectItems
    +   * SelectItems\endlink, \link Wt::ExtendedSelection
    +   * ExtendedSelection\endlink is not supported.</i>
    +   */
    +  void setSelectionMode(SelectionMode mode);
    +
    +  /*! \brief Set the selection behaviour.
    +   *
    +   * The selection behavior defines the unit of selection. The selection
    +   * behavior also determines the set of methods that must be used to
    +   * inspect the current selection.
    +   *
    +   * You may either:
    +   *  - use \link Wt::SelectRows SelectRows\endlink to
    +   *    only select whole rows, and use the method selectedRows() to
    +   *    inspect the current selection.
    +   *  - or use \link Wt::SelectItems SelectItems\endlink to select
    +   *    (a single) individual item, and use the methods currentColumn(),
    +   *    currentRow(), setCurrentCell() to inspect and modify the current
    +   *    selection.
    +   */
    +  void setSelectionBehavior(SelectionBehavior behavior);
    +
    +  /*! \brief Return the current selection behaviour.
    +   *
    +   * \sa selectionBehavior()
    +   */
    +  SelectionBehavior selectionBehavior() const { return selectionBehavior_; }
    +
    +  /*! \brief %Signal emitted when a cell is clicked.
    +   *
    +   * The signal arguments are row and column of the cell that is clicked.
    +   *
    +   * \sa currentCellChanged()
    +   */
    +  Signal<int, int>& cellClicked() { return cellClicked_; }
    +
    +  /*! \brief %Signal emitted when a new cell received focus.
    +   *
    +   * This signal is only emitted when selectionBehavior() is \link
    +   * Wt::SelectItems SelectItems\endlink.  The four arguments are
    +   * <i>row</i>, <i>column</i>, <i>prevrow</i>, <i>prevcolumn</i>
    +   * which hold respectively the location of the new focussed cell,
    +   * and the previously focussed cell.
    +   *
    +   * Values of -1 indicate 'no selection'.
    +   */
    +  Signal<int, int, int, int>& currentCellChanged()
    +    { return currentCellChanged_; }
    +
    +  /*! \brief %Signal emitted when the selection changes.
    +   *
    +   * \sa currentRow(), currentColumn() when selectionBehavior() is
    +   * \link Wt::SelectItems SelectItems\endlink
    +   * \sa selectedRows() when selectionBehavior() is \link Wt::SelectRows
    +   * SelectRows\endlink.
    +   */
    +  Signal<>& itemSelectionChanged() { return itemSelectionChanged_; }
    +
    +protected:
    +  virtual void updateExt();
    +  virtual void createConfig(std::ostream& config);
    +  virtual std::string extClassName() const;
    +
    +private:
    +  Signal<int, int> cellClicked_;
    +  Signal<int, int, int, int> currentCellChanged_;
    +  Signal<> itemSelectionChanged_;
    +
    +  DataLocation        dataLocation_;
    +  WAbstractItemModel *model_;
    +  SelectionMode       selectionMode_;
    +  SelectionBehavior   selectionBehavior_;
    +
    +  std::vector<int>    selectedRows_;
    +  int                 currentRow_, currentColumn_;
    +  int                 pageSize_;
    +
    +  struct ColumnModel {
    +    bool        sortable_;
    +    bool        hideable_;
    +    bool        hidden_;
    +    bool        resizable_;
    +    int         width_;
    +    FormField  *editor_;
    +    std::string rendererJS_;
    +    AlignmentFlag alignment_;
    +
    +    ColumnModel();
    +    ~ColumnModel();
    +  };
    +
    +  typedef std::map<int, ColumnModel> ColumnMap;
    +  ColumnMap columnInfo_;
    +  int  autoExpandColumn_;
    +  int  autoExpandColumnMinWidth_;
    +  int  autoExpandColumnMaxWidth_;
    +  bool autoFill_;
    +  bool forceFit_;
    +  bool columnMove_;
    +  bool alternatingRowColors_;
    +  bool highlightMouseOver_;
    +  bool haveEditor_;
    +
    +  DataStore *dataStore_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  void modelColumnsInserted(const WModelIndex& parent, int start, int end);
    +  void modelColumnsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelRowsInserted(const WModelIndex& parent, int start, int end);
    +  void modelRowsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelDataChanged(const WModelIndex& topLeft,
    +			const WModelIndex& bottomRight);
    +  void modelLayoutChanged();
    +
    +  JSignal<std::string,int,std::string> edited_;
    +  JSignal<std::string> selectionChanged_;
    +  JSignal<std::string, int> rawCellClicked_;
    +  void onEdit(std::string field, int rowId, std::string value);
    +  void onSelectionChange(const std::string selection);
    +  void onCellClicked(std::string field, int rowId);
    +
    +  void shiftSelectedRows(int start, int count);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_TABLE_VIEW_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/TableView.C b/wt-3.1.7a/src/Wt/Ext/TableView.C
    new file mode 100644
    index 0000000..c17969a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TableView.C
    @@ -0,0 +1,622 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WApplication"
    +#include "Wt/WDate"
    +#include "Wt/WLogger"
    +
    +#include "Wt/Ext/DataStore"
    +#include "Wt/Ext/TableView"
    +#include "Wt/Ext/FormField"
    +#include "Wt/Ext/PagingToolBar"
    +
    +#include "Utils.h"
    +
    +namespace {
    +  void parseNumberList(const std::string& s, std::vector<int>& numbers)
    +  {
    +    std::istringstream ss(s);
    +
    +    while (ss) {
    +      int a;
    +      ss >> a;
    +
    +      if (!ss)
    +	break;
    +      else {
    +	numbers.push_back(a);
    +      }
    +    }
    +  }
    +}
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +TableView::TableView(WContainerWidget *parent)
    +  : Panel(parent),
    +    cellClicked_(this),
    +    currentCellChanged_(this),
    +    itemSelectionChanged_(this),
    +    dataLocation_(ClientSide),
    +    model_(0),
    +    selectionMode_(NoSelection),
    +    selectionBehavior_(SelectRows),
    +    currentRow_(-1),
    +    currentColumn_(-1),
    +    pageSize_(0),
    +    autoExpandColumn_(-1),
    +    autoExpandColumnMinWidth_(50),
    +    autoExpandColumnMaxWidth_(1000),
    +    autoFill_(false),
    +    forceFit_(false),
    +    columnMove_(false),
    +    alternatingRowColors_(false),
    +    highlightMouseOver_(false),
    +    dataStore_(0),
    +    edited_(this, "edited"),
    +    selectionChanged_(this, "sc"),
    +    rawCellClicked_(this, "ck")
    +{
    +  rawCellClicked_.connect(this, &TableView::onCellClicked);
    +}
    +
    +void TableView::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +
    +  /* connect slots to new model */
    +  modelConnections_.push_back
    +    (model_->columnsInserted().connect(this, &TableView::modelColumnsInserted));
    +  modelConnections_.push_back
    +    (model_->columnsRemoved().connect(this, &TableView::modelColumnsRemoved));
    +  modelConnections_.push_back
    +    (model_->rowsInserted().connect(this, &TableView::modelRowsInserted));
    +  modelConnections_.push_back
    +    (model_->rowsRemoved().connect(this, &TableView::modelRowsRemoved));
    +  modelConnections_.push_back
    +    (model_->dataChanged().connect(this, &TableView::modelDataChanged));
    +  modelConnections_.push_back
    +    (model_->layoutChanged().connect(this, &TableView::modelLayoutChanged));
    +  modelConnections_.push_back
    +    (model_->modelReset().connect(this, &TableView::modelLayoutChanged));
    +
    +  modelLayoutChanged();
    +}
    +
    +void TableView::modelLayoutChanged()
    +{
    +  if (dataStore_) {
    +    dataStore_->setModel(model_);
    +    repaint();
    +  }
    +}
    +
    +void TableView::setPageSize(int pageSize)
    +{
    +  pageSize_ = pageSize;
    +}
    +
    +ToolBar *TableView::createPagingToolBar()
    +{
    +  return new PagingToolBar(elVar() + "ds", this);
    +}
    +
    +void TableView::setDataLocation(DataLocation dataLocation)
    +{
    +  dataLocation_ = dataLocation;
    +}
    +
    +void TableView::resizeColumnsToContents(bool whenTableResizes)
    +{
    +  autoFill_ = true;
    +  if (whenTableResizes)
    +    forceFit_ = true;
    +}
    +
    +void TableView::setColumnsMovable(bool movable)
    +{
    +  columnMove_ = movable;
    +}
    +
    +void TableView::setAlternatingRowColors(bool enable)
    +{
    +  alternatingRowColors_ = enable;
    +}
    +
    +void TableView::setHighlightMouseOver(bool highlight)
    +{
    +  highlightMouseOver_ = highlight;
    +}
    +
    +void TableView::clearSelection()
    +{
    +  setCurrentCell(-1, 0);
    +  selectedRows_.clear();
    +}
    +
    +void TableView::setCurrentCell(int row, int column)
    +{
    +  currentRow_ = std::max(-1, std::min(model_->rowCount(), row));
    +  currentColumn_ = std::max(-1, std::min(model_->columnCount(), column));
    +
    +  if (isRendered()) {
    +    if (currentRow_ == -1) {
    +      addUpdateJS(elVar() + ".getSelectionModel().clearSelections();");      
    +    } else {
    +      if (selectionBehavior_ == SelectRows)
    +	addUpdateJS(elVar() + ".getSelectionModel().selectRow("
    +		    + boost::lexical_cast<std::string>(row) + ");");
    +      else
    +	addUpdateJS(elVar() + ".getSelectionModel().select("
    +		    + boost::lexical_cast<std::string>(row) + ","
    +		    + boost::lexical_cast<std::string>(column) + ");");
    +    }
    +  }
    +}
    +
    +void TableView::onSelectionChange(const std::string selection)
    +{
    +  /* format: a b c with row ids or a pair of row column */
    +  std::vector<int> numbers;
    +
    +  parseNumberList(selection, numbers);
    +
    +  if (selectionBehavior_ == SelectRows) {
    +    for (unsigned i = 0; i < numbers.size(); ++i)
    +      numbers[i] = dataStore_->rowFromId(numbers[i]);
    +
    +    selectedRows_ = numbers;
    +  } else {
    +    int pr = currentRow_;
    +    int pc = currentColumn_;
    +
    +    currentRow_ = dataStore_->rowFromId(numbers[0]);
    +    currentColumn_ = numbers[1];
    +
    +    currentCellChanged_.emit(currentRow_, currentColumn_, pr, pc);
    +  }
    +
    +  itemSelectionChanged_.emit();
    +}
    +
    +void TableView::setEditor(int column, FormField *editor)
    +{
    +  columnInfo_[column].editor_ = editor;
    +  editor->useAsTableViewEditor();
    +  addOrphan(editor);
    +
    +  selectionBehavior_ = SelectItems;
    +}
    +
    +void TableView::setRenderer(int column, const std::string& rendererJS)
    +{
    +  columnInfo_[column].rendererJS_ = rendererJS;
    +}
    +
    +std::string TableView::dateRenderer(const WString& format)
    +{
    +  return "Ext.util.Format.dateRenderer('" + WDate::extFormat(format) + "')";
    +}
    +
    +bool TableView::isColumnHidden(int column) const
    +{
    +  ColumnMap::const_iterator k = columnInfo_.find(column);
    +  if (k != columnInfo_.end())
    +    return k->second.hidden_;
    +  else
    +    return false;
    +}
    +
    +void TableView::setColumnHidden(int column, bool hide)
    +{
    +  columnInfo_[column].hidden_ = hide;
    +  addUpdateJS(elVar() + ".getColumnModel().setHidden("
    +	      + boost::lexical_cast<std::string>(column) + ","
    +	      + (hide ? "true" : "false") + ");");
    +}
    +
    +int TableView::columnWidth(int column) const
    +{
    +  ColumnMap::const_iterator k = columnInfo_.find(column);
    +  if (k != columnInfo_.end())
    +    return k->second.width_;
    +  else
    +    return 100;
    +}
    +
    +void TableView::setColumnWidth(int column, int pixels)
    +{
    +  columnInfo_[column].width_ = pixels;
    +  addUpdateJS(elVar() + ".getColumnModel().setColumnWidth("
    +	      + boost::lexical_cast<std::string>(column) + ","
    +	      + boost::lexical_cast<std::string>(pixels) + ");");
    +}
    +
    +void TableView::setColumnAlignment(int column, AlignmentFlag alignment)
    +{
    +  if (alignment & AlignVerticalMask) {
    +    wApp->log("warning") << "TableView::setColumnAlignment(): alignment "
    +      "(" << alignment << ") is vertical, expected horizontal "
    +      "(column " << column << ")";
    +    alignment = AlignmentFlag(alignment & AlignHorizontalMask);
    +  }
    +  columnInfo_[column].alignment_ = alignment;
    +}
    +
    +AlignmentFlag TableView::columnAlignment(int column) const
    +{
    +  ColumnMap::const_iterator k = columnInfo_.find(column);
    +  if (k != columnInfo_.end())
    +    return k->second.alignment_;
    +  else
    +    return AlignLeft;
    +}
    +
    +bool TableView::isColumnSortable(int column) const
    +{
    +  ColumnMap::const_iterator k = columnInfo_.find(column);
    +  if (k != columnInfo_.end())
    +    return k->second.sortable_;
    +  else
    +    return false;
    +}
    +
    +void TableView::setColumnSortable(int column, bool sortable)
    +{
    +  columnInfo_[column].sortable_ = sortable;
    +}
    +
    +bool TableView::isColumnHidingEnabled(int column) const
    +{
    +  ColumnMap::const_iterator k = columnInfo_.find(column);
    +  if (k != columnInfo_.end())
    +    return k->second.hideable_;
    +  else
    +    return false;
    +}
    +
    +void TableView::enableColumnHiding(int column, bool enable)
    +{
    +  columnInfo_[column].hideable_ = enable;  
    +}
    +
    +void TableView::setAutoExpandColumn(int column, int minWidth, int maxWidth)
    +{
    +  autoExpandColumn_ = column;
    +  autoExpandColumnMinWidth_ = minWidth;
    +  autoExpandColumnMaxWidth_ = maxWidth;
    +}
    +
    +int TableView::autoExpandColumn() const
    +{
    +  if (autoExpandColumn_ == -1)
    +    return model_->columnCount() - 1;
    +  else
    +    return autoExpandColumn_;
    +}
    +
    +void TableView::hideColumn(int column)
    +{
    +  setColumnHidden(column, true);
    +}
    +
    +void TableView::showColumn(int column)
    +{
    +  setColumnHidden(column, false);
    +}
    +
    +void TableView::modelColumnsInserted(const WModelIndex& parent,
    +				     int start, int end)
    +{
    +  if (dataStore_)
    +    wApp->log("warn") << "TableView: cannot deal with column inserts";
    +}
    +
    +void TableView::modelColumnsRemoved(const WModelIndex& parent,
    +				    int start, int end)
    +{
    +  if (dataStore_)
    +    wApp->log("warn") << "TableView: cannot deal with column inserts";
    +}
    +
    +void TableView::modelRowsInserted(const WModelIndex& parent,
    +				  int start, int end)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelRowsInserted(start, end);
    +    repaint();
    +  }
    +
    +  shiftSelectedRows(start, end - start + 1);
    +}
    +
    +void TableView::modelRowsRemoved(const WModelIndex& parent,
    +				 int start, int end)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelRowsRemoved(start, end);
    +    repaint();
    +  }
    +
    +  shiftSelectedRows(start, - (end - start + 1));
    +}
    +
    +void TableView::shiftSelectedRows(int start, int count)
    +{
    +  if (count < 0) {
    +    for (int i = start; i < start - count; ++i)
    +      Utils::erase(selectedRows_, i);
    +
    +    if (currentRow_ >= start && currentRow_ < (start - count)) {
    +      currentRow_ = -1;
    +      currentColumn_ = -1;
    +    }
    +  }
    +
    +  for (unsigned i = 0; i < selectedRows_.size(); ++i)
    +    if (selectedRows_[i] >= start)
    +      selectedRows_[i] += count;
    +
    +  if (currentRow_ >= start)
    +    currentRow_ += start;
    +}
    +
    +void TableView::modelDataChanged(const WModelIndex& topLeft,
    +				 const WModelIndex& bottomRight)
    +{
    +  if (dataStore_) {
    +    dataStore_->modelDataChanged(topLeft, bottomRight);
    +    repaint();
    +  }
    +}
    +
    +void TableView::onCellClicked(std::string field, int rowId)
    +{
    +  int row = dataStore_->rowFromId(rowId);
    +  int col = boost::lexical_cast<int>(field.substr(1));
    +
    +  cellClicked_.emit(row, col);
    +}
    +
    +void TableView::onEdit(std::string field, int rowId, std::string value)
    +{
    +  int row = dataStore_->rowFromId(rowId);
    +
    +  try {
    +    int col = boost::lexical_cast<int>(field.substr(1));
    +    model_->setData(row, col,
    +		    Wt::Impl::updateFromJS(model_->data(row, col), value));
    +  } catch (boost::bad_lexical_cast& e) {
    +    wApp->log("error") << "Internal error reading field name '" << field << "'";
    +  }
    +}
    +
    +void TableView::refresh()
    +{
    +  modelDataChanged
    +    (model_->index(0, 0),
    +     model_->index(model_->columnCount() - 1, model_->rowCount() - 1));
    +
    +  Panel::refresh();
    +}
    +
    +void TableView::updateExt()
    +{
    +  if (dataStore_)
    +    addUpdateJS(dataStore_->jsGetUpdates(elVar() + ".getStore()"));
    +
    +  Panel::updateExt();
    +}
    +
    +std::string TableView::extClassName() const
    +{
    +  for (ColumnMap::const_iterator k = columnInfo_.begin();
    +       k != columnInfo_.end(); ++k)
    +    if (k->second.editor_)
    +      return "Ext.grid.EditorGridPanel";
    +
    +  return "Ext.grid.GridPanel";
    +}
    +
    +std::string TableView::createJS(DomElement *inContainer)
    +{
    +  assert(inContainer);
    +
    +  if (!edited_.isConnected()) {
    +    edited_.connect(this, &TableView::onEdit);
    +    selectionChanged_.connect(this, &TableView::onSelectionChange);
    +  }
    +
    +  std::stringstream result;
    +  bool haveEditor = false;
    +
    +  for (ColumnMap::const_iterator k = columnInfo_.begin();
    +       k != columnInfo_.end(); ++k) {
    +    const ColumnModel& ci = k->second;
    +
    +    if (ci.editor_) {
    +      haveEditor = true;
    +      ci.editor_->createExtElement(result, 0);
    +    }
    +  }
    +
    +  if (!dataStore_) {
    +    dataStore_ = new DataStore(model_, dataLocation_, this);
    +
    +    for (int i = 0; i < model_->columnCount(); ++i) {
    +      dataStore_
    +	->addColumn(i, "c" + boost::lexical_cast<std::string>(i));
    +    }
    +  }
    +
    +  result << "var " << elVar() << "ds=" << dataStore_->jsCreateStore() << ";";
    +
    +  result << Panel::createJS(inContainer);
    +
    +  result << dataStore_->jsCreateRecordDef(elVar() + ".getStore()");
    +
    +  if (selectionBehavior_ == SelectRows) {
    +    result << elVar()
    +	   << ".getSelectionModel().on('selectionchange',function(s){"
    +      "var ss=\"\";var m=s.getSelections();"
    +      "for (var i = 0; i < m.length; ++i) {"
    +      "ss += \" \" + m[i].id;" 
    +      "}"
    +	   << selectionChanged_.createCall("ss");
    +  } else {
    +    /*
    +     *FIXME: convert column to field to be insensitive to reordered columns ?
    +     */
    +    result << elVar() 
    +	   << ".getSelectionModel().on('selectionchange',function(s,sel){"
    +	   << selectionChanged_.createCall
    +      ("sel?''+sel.record.id+' '+sel.cell[1]:'-1 -1'");
    +  }
    +  result << "}," << elVar() << ",{buffer:10});";
    +
    +  if (haveEditor)
    +    result << elVar() << ".on('afteredit',function(ge){"
    +	   << edited_.createCall("ge.field",
    +				 "ge.record.id",
    +				 "ge.value") << "});";
    +
    +  
    +  bindEventHandler("cellclick", "ccH", result);
    +
    +  result << dataStore_->load(elVar() + "ds", pageSize_);
    +
    +  return result.str();
    +}
    +
    +void TableView::createConfig(std::ostream& config)
    +{
    +  config << ",ds:" << elVar() << "ds,cm:new Ext.grid.ColumnModel([";
    +
    +  for (int i = 0; i < model_->columnCount(); ++i) {    
    +    if (i != 0)
    +      config << ',';
    +    config << "{id:'c" << i << "',header:"
    +	   << Wt::Impl::asJSLiteral(model_->headerData(i), false);
    +
    +    ColumnMap::const_iterator k = columnInfo_.find(i);
    +    if (k != columnInfo_.end()) {
    +      const ColumnModel& ci = k->second;
    +
    +      config << ",sortable:" << (ci.sortable_ ? "true" : "false")
    +	     << ",width:" << ci.width_;
    +      if (!ci.resizable_)
    +	config << ",resizable:false";
    +      if (ci.hidden_)
    +	config << ",hidden:true";
    +      if (!ci.hideable_)
    +	config << ",hideable:false";
    +      if (ci.editor_)
    +	config << ",editor:new Ext.grid.GridEditor("
    +	       << ci.editor_->elVar() << ')';
    +      switch (ci.alignment_) {
    +      case AlignLeft:
    +	break;
    +      case AlignRight:
    +	config << ",align:'right'"; break;
    +      case AlignCenter:
    +	config << ",align:'center'"; break;
    +      case AlignJustify:
    +	config << ",align:'justify'"; break;
    +      default:
    +	break;
    +      }
    +      if (!ci.rendererJS_.empty())
    +	config << ",renderer:" << ci.rendererJS_;
    +    } else {
    +      config << ",hideable:false";
    +    }
    +    config << ",dataIndex:'c" << i << '\'' << '}';
    +  }
    +
    +  config << "])";
    +
    +  if (autoExpandColumn_ != -1) {
    +    config << ",autoExpandColumn:'c" << autoExpandColumn() << '\'';
    +
    +    if (autoExpandColumnMaxWidth_ != 1000)
    +      config << ",autoExpandMax:" << autoExpandColumnMaxWidth_;
    +    if (autoExpandColumnMinWidth_ != 50)
    +      config << ",autoExpandMin:" << autoExpandColumnMinWidth_;
    +  }
    +
    +  if (!columnMove_)
    +    config << ",enableColumnMove:false";
    +  if (alternatingRowColors_)
    +    config << ",stripeRows:true";
    +  if (!highlightMouseOver_)
    +    config << ",trackMouseOver:false";
    +
    +  config << ",viewConfig:{a:0";
    +
    +  if (autoFill_)
    +    config << ",autoFill:true";
    +  if (forceFit_)
    +    config << ",forceFit:true";
    +
    +  config << '}';
    +
    +  if (selectionMode_ == NoSelection)
    +    config << ",disableSelection:true";
    +  else {
    +    if (selectionBehavior_ == SelectRows) {
    +      config << ",sm:new Ext.grid.RowSelectionModel(";
    +      if (selectionMode_ == SingleSelection)
    +	config << "{singleSelect:true}";
    +      config << ')';
    +    } else {
    +      config << ",sm:new Ext.grid.CellSelectionModel()";
    +    }
    +  }
    +
    +  addWtSignalConfig("ccH", &rawCellClicked_, rawCellClicked_.name(),
    +		    "g,ri,ci", "g.getColumnModel().getDataIndex(ci),"
    +		    "g.getStore().getAt(ri).id", config);
    +
    +  Panel::createConfig(config);
    +}
    +
    +void TableView::setSelectionMode(SelectionMode mode)
    +{
    +  selectionMode_ = mode;
    +}
    +
    +void TableView::setSelectionBehavior(SelectionBehavior behavior)
    +{
    +  selectionBehavior_ = behavior;
    +}
    +
    +TableView::ColumnModel::ColumnModel()
    +  : sortable_(false),
    +    hideable_(false),
    +    hidden_(false),
    +    resizable_(true),
    +    width_(100),
    +    editor_(0),
    +    alignment_(AlignLeft)
    +{ }
    +
    +TableView::ColumnModel::~ColumnModel()
    +{
    +  delete editor_;
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/TextEdit b/wt-3.1.7a/src/Wt/Ext/TextEdit
    new file mode 100644
    index 0000000..df32105
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TextEdit
    @@ -0,0 +1,104 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_TEXTEDIT_H_
    +#define EXT_TEXTEDIT_H_
    +
    +#include <Wt/Ext/FormField>
    +
    +namespace Wt {
    +
    +  class WTextArea;
    +
    +  namespace Ext {
    +
    +/*! \class TextEdit Ext/TextEdit Ext/TextEdit
    + *  \brief A rich-text editor.
    + *
    + * A rich-text editor that provides interactive editing of HTML, including
    + * basic mark-up (font, formatting, color, links, and lists).
    + *
    + * \image html ExtTextEdit-1.png "TextEdit"
    + *
    + * \note This widget does not work in XHTML documents. Use WTextEdit instead.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API TextEdit : public FormField
    +{
    +public:
    +  /*! \brief Create a rich text editor with empty text.
    +   */
    +  TextEdit(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create a rich text editor initialized with the given HTML text.
    +   */
    +  TextEdit(const WT_USTRING& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Set the text.
    +   */
    +  void setText(const WT_USTRING& value);
    +
    +  /*! \brief Return the text.
    +   */
    +  const WT_USTRING& text() const;
    +
    +  /*! \brief Set the default location and link text used when inserting a link.
    +   */
    +  void setLinkDefault(const WString& text, const WString& location);
    +
    +  /*! \brief Enable or disable alignment buttons.
    +   */
    +  void setEnableAlignments(bool enable);
    +
    +  /*! \brief Enable or disable changing of text color.
    +   */
    +  void setEnableColors(bool enable);
    +
    +  /*! \brief Enable or disable changing of text font.
    +   */
    +  void setEnableFont(bool enable);
    +
    +  /*! \brief Enable or disable changing of text formatting.
    +   */
    +  void setEnableFormat(bool enable);
    +
    +  /*! \brief Enable or disable insertion of links.
    +   */
    +  void setEnableLinks(bool enable);
    +
    +  /*! \brief Enable or disable insertion of lists.
    +   */
    +  void setEnableLists(bool enable);
    +
    +  /*! \brief Enable or disable a view which shows the raw HTML source.
    +   */
    +  void setEnableSourceEdit(bool enable);
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +  
    +  virtual WValidator::State validate();
    +
    +protected:
    +  virtual void createConfig(std::ostream& config);
    +  virtual WFormWidget *formWidget() const;
    +
    +private:
    +  WString linkDefaultText_;
    +  WString linkDefaultLocation_;
    +  bool alignments_, colors_, font_, format_, links_, lists_, sourceEdit_;
    +
    +  WTextArea *textArea_;
    +
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  virtual void useAsTableViewEditor();
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_HTMLEDITOR_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/TextEdit.C b/wt-3.1.7a/src/Wt/Ext/TextEdit.C
    new file mode 100644
    index 0000000..5546008
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/TextEdit.C
    @@ -0,0 +1,167 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/TextEdit"
    +#include "Wt/WTextArea"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +  namespace Ext {
    +
    +TextEdit::TextEdit(WContainerWidget *parent)
    +  : FormField(parent),
    +    linkDefaultLocation_("http://"),
    +    alignments_(true),
    +    colors_(true),
    +    font_(true),
    +    format_(true),
    +    links_(true),
    +    lists_(true),
    +    sourceEdit_(true)
    +{
    +  //extjs: textedit doesn't stand a parent with display: none
    +  setHideWithOffsets(true);
    +
    +  textArea_ = new WTextArea();
    +  addOrphan(textArea_);
    +}
    +
    +TextEdit::TextEdit(const WT_USTRING& text, WContainerWidget *parent)
    +  : FormField(parent),
    +    linkDefaultLocation_("http://"),
    +    alignments_(true),
    +    colors_(true),
    +    font_(true),
    +    format_(true),
    +    links_(true),
    +    lists_(true),
    +    sourceEdit_(true)
    +{
    +  //extjs: textedit doesn't stand a parent with display: none
    +  setHideWithOffsets(true);
    +
    +  textArea_ = new WTextArea();
    +  addOrphan(textArea_);
    +
    +  textArea_->setText(text);
    +}
    +
    +WFormWidget *TextEdit::formWidget() const
    +{
    +  return textArea_;
    +}
    +
    +void TextEdit::setLinkDefault(const WString& text, const WString& location)
    +{
    +  linkDefaultText_ = text;
    +  linkDefaultLocation_ = location;
    +}
    +
    +void TextEdit::setEnableAlignments(bool enable)
    +{
    +  alignments_ = enable;
    +}
    +
    +void TextEdit::setEnableColors(bool enable)
    +{
    +  colors_ = enable;
    +}
    +
    +void TextEdit::setEnableFont(bool enable)
    +{
    +  font_ = enable;
    +}
    +
    +void TextEdit::setEnableFormat(bool enable)
    +{
    +  format_ = enable;
    +}
    +
    +void TextEdit::setEnableLinks(bool enable)
    +{
    +  links_ = enable;
    +}
    +
    +void TextEdit::setEnableLists(bool enable)
    +{
    +  lists_ = enable;
    +}
    +
    +void TextEdit::setEnableSourceEdit(bool enable)
    +{
    +  sourceEdit_ = enable;
    +}
    +
    +void TextEdit::setText(const WT_USTRING& text)
    +{
    +  textArea_->setText(text);
    +  if (isRendered())
    +    addUpdateJS(elVar() + ".setValue(" + WWebWidget::jsStringLiteral(text)
    +		+ ");");
    +}
    +
    +const WT_USTRING& TextEdit::text() const
    +{
    +  return textArea_->text();
    +}
    +
    +WValidator::State TextEdit::validate()
    +{
    +  if (validator()) {
    +    WT_USTRING text = textArea_->text();
    +    return validator()->validate(text);
    +  } else
    +    return WValidator::Valid;
    +}
    +
    +void TextEdit::resize(const WLength& width, const WLength& height)
    +{
    +  textArea_->resize(width, height);
    +}
    +
    +void TextEdit::useAsTableViewEditor()
    +{
    +  textArea_->setFormObject(false);
    +}
    +
    +std::string TextEdit::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  result << elVar() << " = new Ext.form.HtmlEditor(" << configStruct() << ");";
    +
    +  applyToWidget(textArea_, result, inContainer);
    +
    +  return result.str();
    +}
    +
    +void TextEdit::createConfig(std::ostream& config)
    +{
    +  if (!linkDefaultText_.empty())
    +    config << ",createLinkText:" << linkDefaultText_.jsStringLiteral();
    +  config << ",defaultLinkValue:" << linkDefaultLocation_.jsStringLiteral();
    +  if (alignments_ != true)
    +    config << ",enableAlignments:false";
    +  if (colors_ != true)
    +    config << ",enableColors:false";
    +  if (font_ != true)
    +    config << ",enableFont:false";
    +  if (format_ != true)
    +    config << ",enableFormat:false";
    +  if (colors_ != true)
    +    config << ",enableLinks:false";
    +  if (font_ != true)
    +    config << ",enableLists:false";
    +  if (format_ != true)
    +    config << ",enableSourceEdit:false";
    +
    +  FormField::createConfig(config);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/ToolBar b/wt-3.1.7a/src/Wt/Ext/ToolBar
    new file mode 100644
    index 0000000..d855976
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ToolBar
    @@ -0,0 +1,137 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_TOOLBAR_H_
    +#define EXT_TOOLBAR_H_
    +
    +#include <Wt/Ext/Widget>
    +#include <Wt/Ext/Button>
    +#include <sstream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class Menu;
    +class Panel;
    +
    +/*! \class ToolBar Wt/Ext/ToolBar Wt/Ext/ToolBar
    + *  \brief A class that represents a tool bar (or a menu bar).
    + *
    + * A tool bar shows buttons (and other widgets). When using text-only
    + * buttons, the tool bar behaves like a top-level menu.
    + *
    + * \image html ExtToolBar-1.png "Example of a ToolBar"
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API ToolBar : public Widget
    +{
    +public:
    +  /*! \brief Create a new tool bar.
    +   */
    +  ToolBar(WContainerWidget *parent = 0);
    +
    +  /*! \brief Add a button with given text.
    +   */
    +  Button *addButton(const WString& text);
    +
    +  /*! \brief Add a button with given icon and text.
    +   */
    +  Button *addButton(const std::string& iconPath, const WString& text);
    +
    +  /*! \brief Add a button with given text, and specify a slot method to be
    +   *         called when activated.
    +   *
    +   * The <i>target</i> and <i>method</i> are connected to the
    +   * Button::activated() signal.
    +   */
    +  template<class T, class V>
    +    Button *addButton(const WString& text,
    +		      T *target, void (V::*method)());
    +    
    +  /*! \brief Add a button with given text and icon, and specify a slot
    +   *         method to be called when activated.
    +   *
    +   * The <i>target</i> and <i>method</i> are connected to the
    +   * Button::activated() signal.
    +   */
    +   template<class T, class V>
    +    Button *addButton(const std::string& iconPath, const WString& text,
    +		      T *target, void (V::*method)());
    +
    +  /*! \brief Add a menu button, with given text.
    +   */
    +  Button *addButton(const WString& text, Menu *menu);
    +
    +  /*! \brief Add a menu button, with given icon and text.
    +   */
    +  Button *addButton(const std::string& iconPath, const WString& text,
    +		    Menu *menu);
    +
    +  /*! \brief Add a button to the tool bar.
    +   */
    +  void add(Button *item);
    +
    +  /*! \brief Add a widget to the tool bar.
    +   */
    +  void add(WWidget *item);
    +
    +  /*! \brief Insert a button in the tool bar.
    +   */
    +  void insert(int index, Button *item);
    +
    +  /*! \brief Insert a widget in the tool bar.
    +   *
    +   * \note A widget can ony be inserted before initial rendering.
    +   */
    +  void insert(int index, WWidget *item);
    +
    +  /*! \brief Add a separator to the tool bar.
    +   */
    +  void addSeparator();
    +
    +  /*! \brief Adds stretch to the tool bar.
    +   *
    +   * This is an empty space that will stretch and push contents to the
    +   * right of it away to the very right end.
    +   */
    +  void addStretch();
    +
    +protected:
    +  void removeChild(WWidget *child);
    +
    +  std::vector<WWidget *> items_;
    +
    +  virtual void jsAfterPanelRendered(std::stringstream& js);
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer);
    +
    +  friend class Panel;
    +};
    +
    +#ifndef JAVA
    +template<class T, class V>
    +Button *ToolBar::addButton(const WString& text,
    +			   T *target, void (V::*method)())
    +{
    +  return addButton(std::string(), text, target, method);
    +}
    +
    +template<class T, class V>
    +Button *ToolBar::addButton(const std::string& iconPath, const WString& text,
    +			   T *target, void (V::*method)())
    +{
    +  Button *button = addButton(iconPath, text);
    +  button->activated().connect(target, method);
    +  return button;
    +}
    +#endif // JAVA
    +
    +  }
    +}
    +
    +#endif // EXT_TOOLBAR_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/ToolBar.C b/wt-3.1.7a/src/Wt/Ext/ToolBar.C
    new file mode 100644
    index 0000000..5176ffc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ToolBar.C
    @@ -0,0 +1,151 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/ToolBar"
    +#include "Utils.h"
    +
    +#include <iostream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class ToolBarSeparator : public Widget
    +{
    +public:
    +  ToolBarSeparator()
    +    : Widget()
    +  { }
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer)
    +  {
    +    return elVar() + "=new Ext.Toolbar.Separator();";
    +  }
    +};
    +
    +class ToolBarStretch : public Widget
    +{
    +public:
    +  ToolBarStretch()
    +    : Widget()
    +  { }
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer)
    +  {
    +    return elVar() + "=new Ext.Toolbar.Fill();";
    +  }
    +};
    +
    +
    +ToolBar::ToolBar(WContainerWidget *parent)
    +  : Widget(parent)
    +{ }
    +
    +Button *ToolBar::addButton(const WString& text)
    +{
    +  return addButton(std::string(), text);
    +}
    +
    +Button *ToolBar::addButton(const std::string& iconPath, const WString& text)
    +{
    +  return addButton(iconPath, text, 0);
    +}
    +
    +Button *ToolBar::addButton(const WString& text, Menu *menu)
    +{
    +  return addButton(std::string(), text, menu);
    +}
    +
    +Button *ToolBar::addButton(const std::string& iconPath, const WString& text,
    +			   Menu *menu)
    +{
    +  Button *button = new Button(text);
    +  button->setIcon(iconPath);
    +  button->setMenu(menu);
    +
    +  add(button);
    +
    +  return button;
    +}
    +
    +void ToolBar::add(Button *button)
    +{
    +  add(dynamic_cast<WWidget *>(button));
    +}
    +
    +void ToolBar::add(WWidget *item)
    +{
    +  items_.push_back(item);
    +  addOrphan(item);
    +
    +  Widget::renderExtAdd(item);
    +}
    +
    +void ToolBar::insert(int index, WWidget *item)
    +{
    +  if (isRendered())
    +    std::cerr
    +      << "ToolBar::insert(): can only support plain widgets before "
    +      "initial rendering" << std::endl;
    +
    +  items_.insert(items_.begin() + index, item);
    +  addOrphan(item);
    +}
    +
    +void ToolBar::insert(int index, Button *button)
    +{
    +  items_.insert(items_.begin() + index, button);
    +  addOrphan(button);
    +
    +  if (!isRendered())
    +    return;
    +
    +  std::stringstream js;
    +  std::string var = button->createExtElement(js, 0);
    +  js << elVar() << ".insertButton(" << index << "," << var << ");";
    +  addUpdateJS(js.str());
    +}
    +
    +void ToolBar::addSeparator()
    +{
    +  add(new ToolBarSeparator());
    +}
    +
    +void ToolBar::addStretch()
    +{
    +  add(new ToolBarStretch());
    +}
    +
    +void ToolBar::removeChild(WWidget *child)
    +{
    +  Widget::removeChild(child);
    +
    +  if (Utils::erase(items_, child))
    +    // FIXME: no ext method to remove a button??
    +    ;
    +}
    +
    +std::string ToolBar::createJS(DomElement *inContainer)
    +{
    +  std::stringstream result;
    +  std::string refs = createMixed(items_, result);
    +
    +  result << elVar() << "=new Ext.Toolbar([" << refs << "]);";
    +
    +  if (inContainer) {
    +    result << elVar() << ".render('" << id() << "');";
    +    jsAfterPanelRendered(result);
    +  }
    +
    +  return result.str();
    +}
    +
    +void ToolBar::jsAfterPanelRendered(std::stringstream&)
    +{ }
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/ToolTipConfig b/wt-3.1.7a/src/Wt/Ext/ToolTipConfig
    new file mode 100644
    index 0000000..74f9e45
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ToolTipConfig
    @@ -0,0 +1,102 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_TOOLTIP_CONFIG_H_
    +#define EXT_TOOLTIP_CONFIG_H_
    +
    +#include <Wt/WObject>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class Menu;
    +
    +/*! \class ToolTipConfig Wt/Ext/ToolTipConfig Wt/Ext/ToolTipConfig
    + *  \brief A configuration object for tool tips.
    + *
    + * \sa AbstractButton::configureToolTip()
    + *
    + * \ingroup ext
    + */
    +class ToolTipConfig : public WObject
    +{
    +public:
    +  /*! \brief Create a default tool tip configuration object.
    +   */
    +  ToolTipConfig(WObject *parent = 0);
    +
    +  /*! \brief Option to dismiss the tool tip automatically after a
    +   *         fixed period.
    +   *
    +   * The default value is <i>true</i>.
    +   */
    +  bool autoDismiss;
    +
    +  /*! \brief Option to hide the tool tip when the mouse moves away.
    +   *
    +   * The default value is <i>true</i>.
    +   */
    +  bool autoHide;
    +
    +  /*! \brief Delay (in milliseconds) to dismiss the tool tip.
    +   *
    +   * The default value is 5000.
    +   *
    +   * \sa autoDismiss
    +   */
    +  int  dismissDelay;
    +
    +  /*! \brief Delay (in milliseconds) to hide the tool tip.
    +   *
    +   * The default value is 200.
    +   *
    +   * \sa autoHide
    +   */
    +  int  hideDelay;
    +
    +  /*! \brief Delay (in milliseconds) to show the tool tip.
    +   *
    +   * The default value is 500.
    +   */
    +  int  showDelay;
    +
    +  /*! \brief Option to use animations.
    +   *
    +   * The default value is <i>false</i>.
    +   */
    +  bool animate;
    +
    +  /*! \brief Option to hide when the user clicks anywhere.
    +   *
    +   * The default value is <i>true</i>.
    +   */
    +  bool hideOnClick;
    +
    +  /*! \brief Maximum tool tip width (pixels).
    +   *
    +   * The default value is 300.
    +   */
    +  int  maxWidth;
    +
    +  /*! \brief Minimum tool tip width (pixels).
    +   *
    +   * The default value is 40.
    +   */
    +  int  minWidth;
    +
    +  /*! \brief Option to track the mouse.
    +   *
    +   * The default value is <i>false</i>
    +   */
    +  bool trackMouse;
    +
    +  void createConfig(std::ostream& config);
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_TOOLTIP_CONFIG_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/ToolTipConfig.C b/wt-3.1.7a/src/Wt/Ext/ToolTipConfig.C
    new file mode 100644
    index 0000000..8a16427
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/ToolTipConfig.C
    @@ -0,0 +1,53 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/Ext/ToolTipConfig"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +ToolTipConfig::ToolTipConfig(WObject *parent)
    +  : WObject(parent),
    +    autoDismiss(true),
    +    autoHide(true),
    +    dismissDelay(5000),
    +    hideDelay(200),
    +    showDelay(500),
    +    animate(false),
    +    hideOnClick(true),
    +    maxWidth(300),
    +    minWidth(40),
    +    trackMouse(false)
    +{ }
    +
    +void ToolTipConfig::createConfig(std::ostream& config)
    +{
    +  if (autoDismiss != true)
    +    config << ",autoDismiss:false";
    +  if (autoHide != true)
    +    config << ",autoHide:false";
    +  if (dismissDelay != 5000)
    +    config << ",autoDismissDelay:" << dismissDelay;
    +  if (hideDelay != 200)
    +    config << ",hideDelay:" << hideDelay;
    +  if (showDelay != 500)
    +    config << ",showDelay:" << showDelay;
    +  if (animate != false)
    +    config << ",animate:true";
    +  if (hideOnClick != true)
    +    config << ",hideOnClick:false";
    +  if (maxWidth != 300)
    +    config << ",maxWidth:" << maxWidth;
    +  if (minWidth != 40)
    +    config << ",minWidth:" << minWidth;
    +  if (trackMouse != false)
    +    config << ",trackMouse:true";
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/WExtGlobal b/wt-3.1.7a/src/Wt/Ext/WExtGlobal
    new file mode 100644
    index 0000000..a11206f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/WExtGlobal
    @@ -0,0 +1,28 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEXTGLOBAL_H_
    +#define WEXTGLOBAL_H_
    +
    +namespace Wt {
    +  namespace Ext {
    +/*! \brief An enum for the location of data in data-intensive widgets.
    + *
    + * \sa ComboBox::setDataLocation(), TableView::setDataLocation()
    + *
    + * \ingroup ext
    + */
    +enum DataLocation {
    +  ClientSide, //!< Download the whole data model to the client.
    +  ServerSide  //!< Keep the data at the server, and transfer data on-demand.
    +};
    +
    +
    +  }
    +
    +}
    +
    +#endif // WEXTGLOBAL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.C b/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.C
    new file mode 100644
    index 0000000..4e6e0ba
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.C
    @@ -0,0 +1,97 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <sstream>
    +
    +#include "Wt/Ext/WWidgetItemImpl.h"
    +#include "Wt/Ext/Container"
    +#include "Wt/WApplication"
    +#include "Wt/WWidgetItem"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +WWidgetItemImpl::WWidgetItemImpl(WWidgetItem *item)
    +  : item_(item)
    +{ 
    +  item_->widget()->setInline(false);
    +
    +  Container *c = dynamic_cast<Container *>(item_->widget());
    +  if (c) {
    +    var_ = c->elVar();
    +    id_ = c->extId();
    +  } else {
    +    var_ = "wi" + item_->widget()->id();
    +    id_ = var_;
    +  }
    +}
    +
    +WWidgetItemImpl::~WWidgetItemImpl()
    +{ }
    +
    +WLayoutItem *WWidgetItemImpl::layoutItem() const
    +{
    +  return item_;
    +}
    +
    +void WWidgetItemImpl::createComponent(DomElement *parentContainer)
    +{
    +  DomElement *e = item_->widget()->createSDomElement(WApplication::instance());
    +
    +  e->setProperty(PropertyStyle, e->getProperty(PropertyStyle)
    +		  + "position:absolute;left:-10000px;top:-10000px;"
    +		  "visibility:hidden;");
    +  Container *c = dynamic_cast<Container *>(item_->widget());
    +
    +  if (!c) {
    +    std::stringstream js;
    +
    +    js << "var " << var_ << "=new Ext.BoxComponent({id:'"
    +       << id_ << "',applyTo:'" << item_->widget()->id() << "'";
    +    addConfig(js);
    +    Container::setSizeConfig(js, item_->widget());
    +    js << "});{var s="
    +       << item_->widget()->jsRef() << ";s.style.position='';"
    +      "s.style.left='';"
    +      "s.style.top='';"
    +      "s.style.visibility='';}";
    +
    +    e->callJavaScript(js.str());
    +  }
    +
    +  parentContainer->addChild(e);
    +}
    +
    +std::string WWidgetItemImpl::componentVar() const
    +{
    +  return var_;
    +}
    +
    +std::string WWidgetItemImpl::componentId() const
    +{
    +  return id_;
    +}
    +
    +void WWidgetItemImpl::containerAddWidgets(Container *container)
    +{
    +  container->add(item_->widget());
    +}
    +
    +void WWidgetItemImpl::updateAddItem(WLayoutItem *)
    +{
    +  assert(false);
    +}
    +
    +void WWidgetItemImpl::updateRemoveItem(WLayoutItem *)
    +{
    +  assert(false);
    +}
    +
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.h b/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.h
    new file mode 100644
    index 0000000..12b67cc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/WWidgetItemImpl.h
    @@ -0,0 +1,42 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_WWIDGET_ITEM_IMPL_H_
    +#define EXT_WWIDGET_ITEM_IMPL_H_
    +
    +#include "Wt/Ext/LayoutItemImpl.h"
    +
    +namespace Wt {
    +  class WWidgetItem;
    +
    +  namespace Ext {
    +
    +class WWidgetItemImpl : public LayoutItemImpl
    +{
    +public:
    +  WWidgetItemImpl(WWidgetItem *item);
    +  virtual ~WWidgetItemImpl();
    +
    +  void updateAddItem(WLayoutItem *);
    +  void updateRemoveItem(WLayoutItem *);
    +
    +  virtual WLayoutItem *layoutItem() const;
    +
    +protected:
    +  virtual void createComponent(DomElement *parentContainer);
    +  virtual void containerAddWidgets(Container *container);
    +  virtual std::string componentVar() const;
    +  virtual std::string componentId() const;
    +
    +private:
    +  WWidgetItem *item_;
    +  std::string  var_, id_;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_WWIDGET_ITEM_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Widget b/wt-3.1.7a/src/Wt/Ext/Widget
    new file mode 100644
    index 0000000..190e96f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Widget
    @@ -0,0 +1,107 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef EXT_WIDGET_H_
    +#define EXT_WIDGET_H_
    +
    +#include <Wt/WWebWidget>
    +#include <Wt/Ext/ExtDllDefs.h>
    +#include <Wt/Ext/WExtGlobal>
    +#include <sstream>
    +
    +namespace Wt {
    +  namespace Ext {
    +
    +class AbstractButton;
    +class BorderLayout;
    +class TableView;
    +
    +/*! \class Widget Wt/Ext/Widget Wt/Ext/Widget
    + *  \brief An abstract base class for all %Ext widgets.
    + *
    + * %Ext Widgets wrap around JavaScript-only widgets that are provided by
    + * the <a href="http://extjs.com">Ext JS</a> JavaScript widget library.
    + *
    + * \ingroup ext
    + */
    +class WT_EXT_API Widget : public WWebWidget
    +{
    +protected:
    +  Widget(WContainerWidget *parent = 0);
    +
    +public:
    +  /*! \brief Delete a widget.
    +   */
    +  ~Widget();
    +
    +  virtual void setHidden(bool how);
    +
    +  const std::string elVar() const;
    +  const std::string elRef() const;
    +  virtual std::string createExtElement(std::stringstream& js,
    +				       DomElement *inContainer);
    +
    +  std::string extId() const;
    +
    +private:
    +  virtual std::string createJS(DomElement *inContainer) = 0;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElement    *createDomElement(WApplication *app);
    +  virtual DomElementType domElementType() const;
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +  virtual void           propagateRenderOk(bool deep);
    +  virtual std::string    renderRemoveJs();
    +
    +  virtual void createConfig(std::ostream& config);
    +  virtual void updateExt();
    +
    +  virtual bool applySelfCss() const;
    +
    +  std::string  configStruct();
    +
    +  void addUpdateJS(const std::string& js);
    +
    +  void addOrphan(WWidget *child);
    +  void removeOrphan(WWidget *child);
    +
    +  void addWtSignalConfig(const std::string& handler, EventSignalBase *s,
    +			 const std::string& name, const std::string& eventArgs,
    +			 const std::string& wtArg, std::ostream& config);
    +  void updateWtSignal(EventSignalBase *s, const std::string& name,
    +		      const std::string& eventArgs,
    +		      const std::string& wtArg);
    +  void bindEventHandler(const std::string& eventName,
    +			const std::string& handler,
    +			std::stringstream& js);
    +
    +  std::string createMixed(const std::vector<WWidget *>& items,
    +			  std::stringstream& js);
    +  void renderExtAdd(WWidget *item);
    +
    +private:
    +  std::string jsUpdates_;
    +
    +  static void initExt();
    +  void addExtChild(WWidget *child, std::stringstream& js);
    +
    +  std::string jsWtSignalFunction(EventSignalBase *s, const std::string& name,
    +				 const std::string& eventArgs,
    +				 const std::string& wtArg);
    +
    +  friend class AbstractButton;
    +  friend class Dialog;
    +  friend class TableView;
    +  friend class MessageBox;
    +  friend class Panel;
    +};
    +
    +  }
    +}
    +
    +#endif // EXT_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/Ext/Widget.C b/wt-3.1.7a/src/Wt/Ext/Widget.C
    new file mode 100644
    index 0000000..aff622c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Ext/Widget.C
    @@ -0,0 +1,498 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Ext/Widget"
    +#include "Wt/Ext/Container"
    +#include "Wt/Ext/FormField"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "EscapeOStream.h"
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include <iostream>
    +#include <sstream>
    +#include <cstring>
    +#include <cstdio>
    +
    +namespace Wt {
    +
    +  /*! \brief Namespace for \ref ext */
    +  namespace Ext {
    +
    +Widget::Widget(WContainerWidget *parent)
    +  : WWebWidget(parent)
    +{
    +  setInline(false);
    +  initExt();
    +
    +  // because the stub uses display: none, while Widget uses Ext-based widget
    +  // hiding showing in an always visible container.
    +  setLoadLaterWhenInvisible(false);
    +}
    +
    +void Widget::initExt()
    +{
    +  std::string extBaseURL = "ext";
    +  WApplication::readConfigurationProperty("extBaseURL", extBaseURL);
    +
    +  if (!extBaseURL.empty() && extBaseURL[extBaseURL.length()-1] != '/')
    +    extBaseURL += '/';
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->require(extBaseURL + "ext-base.js", "window['Ext']")) {
    +    app->require(extBaseURL + "ext-all.js", "window.Ext['DomHelper']");
    +    app->useStyleSheet(extBaseURL + "resources/css/ext-all.css");
    +
    +    // fixes for Firefox 3:
    +    app->styleSheet().addRule(".x-date-middle", "width:130px;");
    +
    +    // rendering glitches on all browsers:
    +    app->styleSheet().addRule(".ext-gecko .x-form-text", "margin-top: -1px;");
    +    app->styleSheet().addRule(".ext-safari .x-form-text", "margin-top: -1px;");
    +    app->styleSheet().addRule(".ext-ie .x-form-text",
    +			      "margin-top: 0px !important;"
    +			      "margin-bottom: 0px !important;");
    +    app->doJavaScript(/*app->javaScriptClass() + '.' + */ "ExtW = new Array();"
    +		      "Ext.QuickTips.init();"
    +		      "Ext.BLANK_IMAGE_URL='" + extBaseURL 
    +		      + "resources/images/default/s.gif';", false);
    +    app->declareJavaScriptFunction("deleteExtW",
    +				   "" "function(id){"
    +				   ""   "var w=ExtW[id];"
    +				   ""   "if(w){"
    +				   ""      "if (w.el && w.destroy) w.destroy();"
    +				   ""      "delete ExtW[id];"
    +				   ""   "}"
    +				   "" "}");
    +
    +    /*
    +     * Normally, Ext does this in its onReady function, but this is not
    +     * fired when loading ExtJS on demand.
    +     */
    +    std::string bodyClass;
    +    if (app->environment().agentIsIE()) {
    +      bodyClass = " ext-ie ";
    +      bodyClass += app->environment().agent() == WEnvironment::IE6
    +	? "ext-ie6" : "ext-ie7 ";
    +    } else if (app->environment().agentIsSafari())
    +      bodyClass = " ext-safari";
    +    else if (app->environment().agentIsOpera())
    +      bodyClass = " ext-opera";
    +    else if (app->environment().agentIsGecko())
    +      bodyClass = " ext-gecko";
    +
    +    const std::string& ua = app->environment().userAgent();
    +
    +    if (ua.find("Linux") != std::string::npos)
    +      bodyClass += " ext-linux";
    +    if (ua.find("Macintosh") != std::string::npos
    +	|| ua.find("Mac OS X") != std::string::npos)
    +      bodyClass += " ext-mac";
    +    
    +    app->setBodyClass(app->bodyClass() + bodyClass);
    +    app->setHtmlClass(app->htmlClass() + " ext-strict");
    +  }
    +}
    +
    +Widget::~Widget()
    +{
    +  // to have virtual renderRemoveJs():
    +  setParentWidget(0);
    +
    +  // in any case, delete Ext classes:
    +  WApplication *app = WApplication::instance();
    +  app->doJavaScript(app->javaScriptClass()
    +		    + ".deleteExtW('" + id() + "');");
    +}
    +
    +void Widget::setHidden(bool how)
    +{
    +  WWebWidget::setHidden(how);
    +
    +  if (isRendered() || !canOptimizeUpdates())
    +    addUpdateJS(elVar() + ".setVisible(" + (how ? "false" : "true") + ");");
    +}
    +
    +std::string Widget::extId() const
    +{
    +  return elVar();
    +}
    +
    +std::string Widget::configStruct()
    +{
    +  std::stringstream config;
    +
    +  config << "{a:0";
    +  createConfig(config);
    +  config << "}";
    +
    +  return config.str();
    +}
    +
    +bool Widget::applySelfCss() const
    +{
    +  return true;
    +}
    +
    +void Widget::createConfig(std::ostream& config)
    +{ 
    +  Container *c = dynamic_cast<Container *>(parent());
    +
    +  config << ",id:'" << extId() << "'";
    +
    +  if (applySelfCss()) {
    +    if (!styleClass().empty())
    +      config << ",cls:'" << styleClass().toUTF8() << "'";
    +
    +    std::string cssStyle = inlineCssStyle();
    +
    +    if (!cssStyle.empty())
    +      config << ",style:'" << cssStyle << "'";
    +  }
    +
    +  if (c)
    +    c->addLayoutConfig(this, config);
    +}
    +
    +const std::string Widget::elVar() const 
    +{
    +#ifndef WT_TARGET_JAVA
    +  char buf[20];
    +  std::sprintf(buf, "elo%x", rawUniqueId());
    +  return std::string(buf);
    +#else
    +  return "elo" + Utils::toHexString(rawUniqueId());
    +#endif // WT_TARGET_JAVA
    +}
    +
    +const std::string Widget::elRef() const
    +{
    +  return /* WApplication::instance()->javaScriptClass() + '.' + */
    +    "ExtW['" + id() + "']";
    +}
    +
    +void Widget::updateDom(DomElement& element, bool all)
    +{
    +  WWebWidget::updateDom(element, all);
    +  element.removeAttribute("title");
    +}
    +
    +void Widget::propagateRenderOk(bool deep)
    +{
    +  jsUpdates_.clear();
    +
    +  WWebWidget::propagateRenderOk(deep);
    +}
    +
    +void Widget::updateExt()
    +{ }
    +
    +std::string Widget::createMixed(const std::vector<WWidget *>& items,
    +				std::stringstream& js)
    +{
    +  std::string refs;
    + 
    +  for (unsigned i = 0; i < items.size(); ++i) {
    +    WWidget *c = items[i];
    +    Widget *w = dynamic_cast<Widget *>(c);
    +    FormField *ff = dynamic_cast<FormField *>(c);
    +
    +    std::string var;
    +    if (w && !ff) {
    +      var = w->createExtElement(js, 0);
    +    } else {
    +      var = c->createJavaScript(js, "document.body.appendChild(");
    +    }
    +
    +    if (i != 0)
    +      refs += ",";
    +
    +    refs += var;
    +  }
    +
    +  return refs;
    +}
    +
    +void Widget::renderExtAdd(WWidget *c)
    +{
    +  if (!isRendered())
    +    return;
    +
    +  std::stringstream js;
    +
    +  Widget *w = dynamic_cast<Widget *>(c);
    +  FormField *ff = dynamic_cast<FormField *>(c);
    +
    +  if (w && !ff) {
    +    std::string var = w->createExtElement(js, 0);
    +    js << elVar() << ".add(" << var << ");";
    +  } else {
    +    c->createJavaScript(js, elVar() + ".add(");
    +  }
    +
    +  addUpdateJS(js.str());
    +}
    +
    +std::string Widget::createExtElement(std::stringstream& alljs,
    +				     DomElement *inContainer)
    +{
    +  if (inContainer) {
    +    updateDom(*inContainer, true);
    +    inContainer->removeProperty(PropertyStyleDisplay);
    +  }
    +
    +  setRendered(false);
    +
    +  alljs << "var " << elVar() << ";"
    +	<< createJS(inContainer)
    +	<< elRef() << "=" << elVar() << ";";
    +
    +  if (isHidden())
    +    alljs << elVar() << ".hide();";
    +
    +  jsUpdates_.clear();
    +
    +  if (!inContainer) {
    +    DomElement *e
    +      = DomElement::updateGiven(elVar() + ".getEl().dom", domElementType());
    +    updateDom(*e, true);
    +
    +    {
    +      EscapeOStream out(alljs);
    +      e->asJavaScript(out, DomElement::Update);
    +    }
    +
    +    delete e;
    +  }
    +
    +  setRendered(true);
    +
    +  return elVar();
    +}
    +
    +void Widget::addOrphan(WWidget *child)
    +{
    +  WWebWidget::addChild(child);
    +}
    +
    +void Widget::removeOrphan(WWidget *child)
    +{
    +  removeChild(child);
    +}
    +
    +void Widget::addUpdateJS(const std::string& js)
    +{
    +  if (!js.empty()) {
    +    jsUpdates_ += js;
    +    repaint();
    +  }
    +}
    +
    +DomElementType Widget::domElementType() const
    +{
    +  return isInline() ? DomElement_SPAN : DomElement_DIV;
    +}
    +
    +DomElement *Widget::createDomElement(WApplication *app)
    +{
    +  DomElement *result = DomElement::createNew(domElementType());
    +  setId(result, app);
    +
    +  std::stringstream js;
    +  createExtElement(js, result);
    +  result->callJavaScript(js.str());
    +
    +  return result;
    +}
    +
    +void Widget::getDomChanges(std::vector<DomElement *>& result,
    +			   WApplication *app)
    +{
    +  std::string el = elRef() + ".el.dom";
    +
    +  DomElement *e = DomElement::updateGiven(el, domElementType());
    +
    +  updateExt();
    +
    +  if (!jsUpdates_.empty()) {
    +    e->callJavaScript("var " + elVar() + "=" + elRef() + ";" + jsUpdates_);
    +    jsUpdates_.clear();
    +  }
    +
    +  updateDom(*e, false);
    +  e->removeProperty(PropertyStyleDisplay);
    +  result.push_back(e);
    +}
    +
    +std::string Widget::renderRemoveJs()
    +{
    +  return elRef() + ".hide();" WT_CLASS ".remove('" + id() + "');";
    +}
    +
    +void Widget::updateWtSignal(EventSignalBase *s, const std::string& name,
    +			    const std::string& eventArgs,
    +			    const std::string& wtArg)
    +{
    +  if (s->needsUpdate(false)) {
    +    addUpdateJS(elVar() + ".wt" + name + "="
    +		+ jsWtSignalFunction(s, name, eventArgs, wtArg) + ";");
    +    s->updateOk();
    +  }
    +}
    +
    +std::string Widget::jsWtSignalFunction(EventSignalBase *s,
    +				       const std::string& name,
    +				       const std::string& eventArgs,
    +				       const std::string& wtArg)
    +{
    +  return "function(" + eventArgs + "){"
    +    + s->createUserEventCall(std::string(), std::string(), name, wtArg,
    +			     std::string(), std::string(), std::string(),
    +			     std::string(), std::string())
    +    + "}";
    +}
    +
    +void Widget::addWtSignalConfig(const std::string& handler, EventSignalBase *s, 
    +			       const std::string& name,
    +			       const std::string& eventArgs,
    +			       const std::string& wtArg,
    +			       std::ostream& config)
    +{
    +  config << "," << handler << ":function(" << eventArgs << "){"
    +	 << elVar() << ".wt" << name << "(" << eventArgs << ");}"
    +	 << ",wt" << name << ":"
    +	 << jsWtSignalFunction(s, name, eventArgs, wtArg);
    +
    +  s->updateOk();
    +}
    +
    +void Widget::bindEventHandler(const std::string& eventName,
    +			      const std::string& handler,
    +			      std::stringstream& js)
    +{
    +  js << elVar() << ".on('" << eventName << "',"
    +     << elVar() << "." << handler << ");";
    +}
    +
    +/*! \defgroup ext Ext widgets
    + *  \brief %Wt %Ext library with JavaScript-only widgets.
    + *
    + * \section bla 1. Introduction
    + *
    + * An add-on library to %Wt (wtext) provides additional widgets that
    + * are all contained within the Wt::Ext namespace. These widgets are
    + * implemented using an open-source third-party JavaScript library,
    + * extjs (http://extjs.com/), version 2.0, or 2.1 but not higher (does
    + * not support Ext 2.2), e.g. http://stosha.net/ext-2.0.2.zip.
    + *
    + * Unlike plain %Wt widgets, these widgets require the availability of
    + * JavaScript (and a sufficiently recent browser). They do, however,
    + * have a polished default look (certainly compared to unstyled plain
    + * %Wt widgets), and add several new capabilities to %Wt:
    + *
    + * <ul>
    + *
    + *   <li>A Container widget which supports layout using layout
    + *     managers, and a Panel, which inherits Container, which adds
    + *     standard GUI functionality to a container, such as tool bars,
    + *     and support for collapsing and resizing</li>
    + *
    + *   <li>Form fields that support client-side validation (CheckBox,
    + *     ComboBox, DateField, LineEdit, NumberField, RadioButton). This
    + *     has been integrated together with the server side validation in
    + *     the standard WValidator classes (WDateValidator,
    + *     WDoubleValidator, WIntValidator, WLengthValidator,
    + *     WRegExpValidator). In this way, a single validator object
    + *     specifies at the same time the client- and server-side
    + *     validation. In this way, the user is given instant feed-back
    + *     using client-side validation, but the data is also validated
    + *     (again) as it arrives on the server, since nothing prevents the
    + *     client JavaScript code from be hacked or circumvented.</li>
    + *
    + *   <li>TextEdit: a rich text editor, which may be used to edit
    + *     HTML.</li>
    + *
    + *   <li>TableView displays data from a WAbstractItemModel. The widget
    + *     provides sorting, column resizing. In addition, form fiels may be
    + *     used for inline editing of data, which is propagated back to the
    + *     model.</li>
    + *
    + *   <li>Good-looking and flexible Menu and ToolBar classes.</li>
    + *
    + *   <li>A polished Dialog, MessageBox and ProgressDialog.</li>
    + *
    + *   <li>Standalone Splitter widget, or integrated in BorderLayout</li>
    + *
    + *   <li>Availability of several themes, created by the ExtJS user
    + *     community. Simply import the stylesheet after Ext itself is
    + *     loaded.  (for example, try:
    + *     useStyleSheet("<i>extBaseURL</i>/resources/css/xtheme-gray.css")). Ext
    + *     itself is loaded by inserting an Ext widget, so a good place to
    + *     do this is at the end of your application construction.</li>
    + *     </ul>
    + *
    + * The functionality of some of these widgets overlaps with existing %Wt
    + * widgets. Whenever possible, the same API was adopted.
    + *
    + * The following table shows corresponding widgets and comments on the
    + * resemblance of the APIs.
    + * <table>
    + *   <tr><td><b>%Wt widget</b></td><td><b>%Wt %Ext widget</b></td>
    + *       <td><b>Comment</b></td></tr>
    + *   <tr><td>WCalendar</td><td>Calendar</td>
    + *       <td>The %Wt version is more versatile (for example allows multiple
    + *         selection, and allows more programmatic control.</td></tr>
    + *   <tr><td>WCheckBox</td><td>CheckBox</td>
    + *       <td>Identical API.</td></tr>
    + *   <tr><td>WComboBox</td><td>ComboBox</td>
    + *       <td>The %Ext version adds a number of features that are similar
    + *         to those provided by %Wt's SuggestionPopup, and allows keeping
    + *         the entire data set at the server.</td></tr>
    + *   <tr><td>WDialog</td><td>Dialog</td>
    + *       <td>Almost identical API. The %Ext version manages standard
    + *          buttons.</td></tr>
    + *   <tr><td>WLineEdit</td><td>LineEdit</td>
    + *       <td>Identical API.</td></tr>
    + *   <tr><td>WMessageBox</td><td>MessageBox</td>
    + *       <td>Almost identical API. The %Wt version is more flexible with respect
    + *         to buttons, while the %Ext version supports prompting for
    + *         input.</td></tr>
    + *   <tr><td>WRadioButton</td><td>RadioButton</td>
    + *       <td>Identical API.</td></tr>
    + *   <tr><td>WTextEdit</td><td>TextEdit</td>
    + *       <td>API differences. The %Wt version has more options and is
    + *         XHTML-compliant.</td></tr>
    + * </table>
    + *
    + * You can freely mix %Wt widgets and %Ext widgets in your
    + * application: %Wt widgets containers may contain %Ext widgets, and
    + * vice-versa. From a programmer perspective, there are no differences
    + * for using %Wt versus %Ext widgets.
    + *
    + * \section moh 2. Deployment notes.
    + *
    + * To use %Ext widgets, you need to download the %Ext JavaScript library
    + * (ext-2.x), and deploy the following files to your web server:
    + *
    + * <ul>
    + *  <li>ext-2.x/adapter/ext/ext-base.js to <i>extBaseURL</i>/ext-base.js</li>
    + *  <li>ext-2.x/ext-all.js to <i>extBaseURL</i>/ext-all.js</li>
    + *  <li>ext-2.x/resources/ to <i>extBaseURL</i>/resources/
    + *    (the entire folder) </li>
    + * </ul>
    + *
    + * The default value for <i>extBaseURL</i> is "ext/". This value may
    + * be overridden with a URL that points to a folder where these files
    + * are located, by configuring the <i>extBaseURL</i> property in your
    + * %Wt configuration file.
    + */
    +
    +}
    +}
    +
    diff --git a/wt-3.1.7a/src/Wt/Http/CMakeLists.txt b/wt-3.1.7a/src/Wt/Http/CMakeLists.txt
    new file mode 100644
    index 0000000..d077c05
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/CMakeLists.txt
    @@ -0,0 +1,2 @@
    +INSTALL_FILES(/include/Wt/Http "^R.*[^C~]$")
    +INSTALL_FILES(/include/Wt/Http "^Client$")
    diff --git a/wt-3.1.7a/src/Wt/Http/Client b/wt-3.1.7a/src/Wt/Http/Client
    new file mode 100644
    index 0000000..052bceb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Client
    @@ -0,0 +1,56 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_CLIENT_H_
    +#define HTTP_CLIENT_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WFlags>
    +#include <string>
    +
    +namespace Wt {
    +
    +  namespace Http {
    +
    +/*! \class Client Wt/Http/Client Wt/Http/Client
    + *  \brief Collection of methods for dealing with a %Wt application from a
    + *         client perspective.
    + */
    +class WT_API Client {
    +public:
    +  /*! \brief Enumeration for client user-agent options.
    +   */
    +  enum ClientOption {
    +    SupportsAjax = 0x1 //!< Flag that indicates supports for AJAX
    +  };
    +
    +  /*! \brief Starts a %Wt session.
    +   *
    +   * A %Wt application uses a bootstrap procedure during which it
    +   * collects information on user agent capabilities (unless the
    +   * progressive bootstrap method is enabled). Therefore a session is
    +   * not spawned after the first request, but only after these
    +   * capabilities have been collected by a second request.
    +   *
    +   * This function starts a session on the specific \p host, \p port,
    +   * \p path, and optional \p query. These correspond to the different
    +   * parts of a url:
    +   * 
    +   * <tt>http://</tt><i>host</i><tt>:</tt><i>port</i>/<i>path</i><tt>?</tt>\p query.
    +   */
    +  static void startWtSession(const std::string& host,
    +			     const std::string& port,
    +			     const std::string& path,
    +			     const std::string& query = std::string(),
    +			     WFlags<ClientOption> flags = SupportsAjax);
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(Client::ClientOption)
    +
    +  }
    +}
    +
    +#endif // HTTP_CLIENT_H_
    diff --git a/wt-3.1.7a/src/Wt/Http/Client.C b/wt-3.1.7a/src/Wt/Http/Client.C
    new file mode 100644
    index 0000000..fca4a49
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Client.C
    @@ -0,0 +1,155 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +//
    +// based on:
    +//
    +// sync_client.cpp
    +// ~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +
    +#include "Wt/Http/Client"
    +#include "WtException.h"
    +
    +#include <sstream>
    +#include <boost/regex.hpp>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/asio.hpp>
    +
    +using boost::asio::ip::tcp;
    +
    +namespace Wt {
    +  namespace Http {
    +
    +    namespace {
    +
    +unsigned int doGet(const std::string& host, const std::string& port,
    +		   const std::string& path, std::string *result)
    +{
    +  boost::asio::io_service io_service;
    +
    +  // Get a list of endpoints corresponding to the server name.
    +  tcp::resolver resolver(io_service);
    +
    +  tcp::resolver::query query(host, port);
    +  tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
    +  tcp::resolver::iterator end;
    +
    +  // Try each endpoint until we successfully establish a connection.
    +  tcp::socket socket(io_service);
    +  boost::system::error_code error = boost::asio::error::host_not_found;
    +  while (error && endpoint_iterator != end) {
    +    socket.close();
    +    socket.connect(*endpoint_iterator++, error);
    +  }
    +
    +  if (error)
    +    throw WtException("Could not connect to: " + host + ":" + port);
    +
    +  // Form the request. We specify the "Connection: close" header so that the
    +  // server will close the socket after transmitting the response. This will
    +  // allow us to treat all data up until the EOF as the content.
    +  boost::asio::streambuf request;
    +  std::ostream request_stream(&request);
    +  request_stream << "GET " << path << " HTTP/1.0\r\n";
    +  request_stream << "Host: " << host << "\r\n";
    +  request_stream << "Accept: */*\r\n";
    +  request_stream << "Connection: close\r\n\r\n";
    +
    +  // Send the request.
    +  boost::asio::write(socket, request);
    +
    +  // Read the response status line.
    +  boost::asio::streambuf response;
    +  boost::asio::read_until(socket, response, "\r\n");
    +
    +  // Check that response is OK.
    +  std::istream response_stream(&response);
    +  std::string http_version;
    +  response_stream >> http_version;
    +  unsigned int status_code;
    +  response_stream >> status_code;
    +  std::string status_message;
    +  std::getline(response_stream, status_message);
    +
    +  if (!response_stream || http_version.substr(0, 5) != "HTTP/")
    +    throw WtException("Invalid response");
    +
    +  if (status_code == 200) { 
    +    std::stringstream content;
    +
    +    // Read the response headers, which are terminated by a blank line.
    +    boost::asio::read_until(socket, response, "\r\n\r\n");
    +
    +    // Write whatever content we already have to output.
    +    if (result && response.size() > 0)
    +      content << &response;
    +
    +    // Read until EOF, writing data to output as we go.
    +    while (boost::asio::read(socket, response,
    +			     boost::asio::transfer_at_least(1), error))
    +      if (result)
    +	content << &response;
    +
    +    if (error != boost::asio::error::eof)
    +      throw boost::system::system_error(error);
    +
    +    if (result)
    +      *result = content.str();
    +  }
    +
    +  return status_code;
    +}
    +
    +    }
    +
    +void Client::startWtSession(const std::string& host,
    +			    const std::string& port,
    +			    const std::string& path,
    +			    const std::string& query,
    +			    WFlags<ClientOption> flags)
    +{
    +  std::string url = path;
    +  if (!query.empty())
    +    url += "?" + query;
    +
    +  std::string result;
    +  int status = doGet(host, port, url, &result);
    +
    +  if (status != 200)
    +    throw WtException("Http status != 200: "
    +		      + boost::lexical_cast<std::string>(status));    
    +
    +  static const boost::regex session_e(".*\\?wtd=([a-zA-Z0-9]+)&amp;.*");
    +
    +  std::string sessionId;
    +  boost::smatch what;
    +  if (boost::regex_match(result, what, session_e))
    +    sessionId = what[1];
    +  else
    +    throw WtException("Unexpected response");
    +
    +  url = path + "?wtd=" + sessionId;
    +  if (flags & SupportsAjax)
    +    url += "&ajax=yes&js=yes&request=script";
    +  else
    +    url += "&js=no";
    +
    +  status = doGet(host, port, url, 0);
    +
    +  if (status != 200)
    +    throw WtException("Http status != 200: "
    +		      + boost::lexical_cast<std::string>(status));
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Http/Request b/wt-3.1.7a/src/Wt/Http/Request
    new file mode 100644
    index 0000000..53da219
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Request
    @@ -0,0 +1,359 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_REQUEST_H_
    +#define HTTP_REQUEST_H_
    +
    +#include <map>
    +#include <string>
    +#include <istream>
    +#include <sstream>
    +#include <vector>
    +#include <boost/shared_ptr.hpp>
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WResource;
    +
    +class WebRequest;
    +class WebSession;
    +
    +  namespace Http {
    +
    +/*! \class UploadedFile Wt/Http/Request Wt/Http/Request
    + *  \brief Details about a file uploaded with a (POST) request.
    + * 
    + * \if cpp
    + * \sa Request::uploadedFiles()
    + * \endif
    + */
    +class WT_API UploadedFile {
    +public:
    +  UploadedFile(const std::string& spoolFileName,
    +	       const std::string& clientFileName,
    +	       const std::string& contentType);
    +
    +  /*! \brief Return the spool file name.
    +   *
    +   * This is the location on the local (server) filesystem where the uploaded
    +   * file is temporarily stored. Unless you call stealSpoolFile(), this file
    +   * is deleted automatically.
    +   */
    +  const std::string& spoolFileName() const;
    +
    +  /*! \brief Returns the client file name.
    +   *
    +   * This is the location that was indicated by the browser. Depending on
    +   * the browser this is an absolute path or only the file name.
    +   */
    +  const std::string& clientFileName() const;
    +
    +  /*! \brief Returns the file content type.
    +   *
    +   * Returns the content mime-type that was sent along with the uploaded
    +   * file.
    +   */
    +  const std::string& contentType() const;
    +
    +  /*! \brief Steals the uploaded spool file.
    +   *
    +   * By stealing the spooled file, it is no longer automatically deleted
    +   * by %Wt.
    +   */
    +  void stealSpoolFile() const;
    +
    +private:
    +  struct Impl {
    +    std::string spoolFileName, clientFileName, contentType;
    +    bool        isStolen;
    +
    +    ~Impl();
    +    void cleanup();
    +  };
    +
    +  boost::shared_ptr<Impl> fileInfo_;
    +};
    +
    +
    +/*! \brief A list of parameter values.
    + *
    + * This is the type used to aggregate all values for a single parameter.
    + */
    +#ifndef WT_TARGET_JAVA
    +typedef std::vector<std::string> ParameterValues;
    +#else
    +typedef std::string ParameterValues[];
    +#endif
    +
    +/*! \brief A parameter value map.
    + *
    + * This is the type used aggregate plain parameter values in a request.
    + */
    +typedef std::map<std::string, ParameterValues> ParameterMap;
    +
    +/*! \brief A file parameter map.
    + *
    + * This is the type used aggregate file parameter values in a request.
    + */
    +typedef std::multimap<std::string, UploadedFile> UploadedFileMap;
    +
    +class ResponseContinuation;
    +
    +/*! \class Request Wt/Http/Request Wt/Http/Request
    + *  \brief An HTTP request.
    + *
    + * The request provides information of parameters, including uploaded
    + * files, that were present in a GET or POST request.
    + *
    + * \sa WResource::handleRequest()
    + */
    +class WT_API Request
    +{
    +public:
    +  /*! \brief A single byte range.
    +   */
    +  class WT_API ByteRange
    +  {
    +  public:
    +    /*! \brief Creates a (0,0) byteranges */
    +    ByteRange();
    +
    +    /*! \brief Creates a byte range.
    +     */
    +    ByteRange(::uint64_t first, ::uint64_t last);
    +
    +    /*! \brief Returns the first byte of this range.
    +     */
    +    ::uint64_t firstByte() const { return firstByte_; }
    +
    +    /*! \brief Returns the last byte of this range.
    +     */
    +    ::uint64_t lastByte() const { return lastByte_; }
    +
    +  private:
    +    uint64_t firstByte_, lastByte_;
    +  };
    +
    +  /*! \brief A byte range specifier.
    +   *
    +   * \sa getRanges()
    +   */
    +  class WT_API ByteRangeSpecifier : public std::vector<ByteRange>
    +  {
    +  public:
    +    /*! \brief Creates an empty byte range specifier.
    +     *
    +     * The specifier is satisfiable but empty, indicating that no
    +     * ranges were present.
    +     */
    +    ByteRangeSpecifier();
    +
    +    /*! \brief Returns whether the range is satisfiable.
    +     *
    +     * If the range specification is not satisfiable, RFC 2616 states you
    +     * should return a response status of 416. isSatisfiable() will return
    +     * true if a Range header was missing or a syntax error occured, in
    +     * which case the number of ByteRanges will be zero and the client
    +     * must send the entire file.
    +     */
    +    bool isSatisfiable() const { return satisfiable_; }
    +
    +    /*! \brief Sets whether the specifier is satisfiable.
    +     */
    +    void setSatisfiable(bool satisfiable) { satisfiable_ = satisfiable; }
    +
    +  private:
    +    bool satisfiable_;
    +  };
    +
    +  /*! \brief Returns the query parameters.
    +   *
    +   * Returns parameters that were passed to the query, either inside
    +   * the URL, or inside a POST request, excluding uploaded files.
    +   *
    +   * \sa uploadedFiles()
    +   */
    +  const ParameterMap& getParameterMap() const { return parameters_; }
    +
    +  /*! \brief Returns uploaded file parameters.
    +   *
    +   * \sa getParameterMap()
    +   */
    +  const UploadedFileMap& uploadedFiles() const { return files_; }
    +
    +  /*! \brief Returns all values for a query parameter.
    +   *
    +   * Returns all values defined for a parameter named \p name. A
    +   * single parameter may have multiple values, e.g. in the query
    +   * string '?param=value1&param=value2'.
    +   *
    +   * Returns an empty list if the query parameter does not exist.
    +   */
    +  const ParameterValues& getParameterValues(const std::string& name) const;
    +
    +  /*! \brief Returns a query parameter value.
    +   *
    +   * Returns the first value defined for a parameter named \p name
    +   * or \c 0 if the paramter does not exist.
    +   */
    +  const std::string *getParameter(const std::string& name) const;
    +
    +  /*! \brief Returns an uploaded file
    +   *
    +   * Returns the file uploaded for a parameter named \p name
    +   * or \c 0 if the parameter does not contain does not exist or was not
    +   * associated with a file input field.
    +   */
    +  const UploadedFile *getUploadedFile(const std::string& name) const;
    +
    +  /*! \brief Returns a non-zero value that exceeded the maximum allowed request.
    +   *
    +   * \sa WApplication::requestTooLarge
    +   */
    +  int tooLarge() const;
    +
    +  /*! \brief Returns a continuation object.
    +   *
    +   * Returns a non-zero continuation object if the request is a continuation
    +   * request for an earlier response for which a continuation was created.
    +   *
    +   * \sa Response::createContinuation()
    +   */
    +  ResponseContinuation *continuation() const { return continuation_; }
    +
    +  /*! \brief Returns the (public) server name.
    +   *
    +   * Returns the public server name. This is the server name that is
    +   * advertised to outside, which is determined in a OS specific
    +   * way.
    +   *
    +   * \sa serverPort()
    +   */
    +  std::string serverName() const;
    +
    +  /*! \brief Returns the server port.
    +   *
    +   * Returns the server port number through which this request was received.
    +   *
    +   * \sa serverName()
    +   */
    +  std::string serverPort() const;
    +
    +  /*! \brief Returns the request path.
    +   *
    +   * Returns the path at which this request was received (excluding internal
    +   * path information): it is the path at which the application or resource
    +   * is deployed. 
    +   *
    +   * \sa pathInfo()
    +   */
    +  std::string path() const;
    +
    +  /*! \brief Returns the request path info.
    +   *
    +   * Returns additional path information internal to the path().
    +   *
    +   * \sa pathInfo()
    +   */
    +  std::string pathInfo() const;
    +
    +  /*! \brief Returns the request query string.
    +   */
    +  std::string queryString() const;
    +
    +  /*! \brief Returns the url scheme used.
    +   *
    +   * This is either <tt>"http"</tt> or <tt>"https"</tt>
    +   */
    +  std::string urlScheme() const;
    +
    +  /*! \brief Returns the input stream for parsing the body.
    +   *
    +   * If the request was a POST with as contentType()
    +   * "application/x-www-form-urlencoded" or "multipart/form-data", the
    +   * input stream will already have been consumed by Wt's CGI parser,
    +   * and made available as parameters in the request.
    +   */
    +  std::istream &in() const;
    +
    +  /*! \brief Returns the "Content Type" of the request body.
    +   *
    +   * \sa in()
    +   */
    +  std::string contentType() const;
    +
    +  /*! \brief Returns the "Content Length" of the request body.
    +   *
    +   * \sa in()
    +   */
    +  int contentLength() const;
    +
    +  /*! \brief Returns the user agent.
    +   *
    +   * The user agent, as reported in the HTTP <tt>User-Agent</tt> field.
    +   */
    +  std::string userAgent() const;
    +
    +  /*! \brief Returns the IP address of the client.
    +   *
    +   * The (most likely) IP address of the client that is connected to
    +   * this session.
    +   *
    +   * This is taken to be the first public address that is given in the
    +   * Client-IP header, or in the X-Forwarded-For header (in case the
    +   * client is behind a proxy). If none of these headers is present,
    +   * the remote socket IP address is used. 
    +   */
    +  std::string clientAddress() const;
    +
    +  /*! \brief Returns a header value.
    +   *
    +   * Returns a header value, or an empty string if the header was 
    +   * present.
    +   *
    +   * \note Currently, the header name is case sensitive, although this should
    +   * not be the case according to RFC2616
    +   */
    +  std::string headerValue(const std::string& field) const;
    +
    +  /*! \brief Returns the request method.
    +   *
    +   * Returns the HTTP request method ("GET", "POST", or other).
    +   */
    +  std::string method() const;
    +
    +  /*! \brief Returns the requested ranges as in the HTTP Range header
    +   *
    +   * The filesize is used to adapt the ranges to the actual file size
    +   * as per rules of RFC 2616. If the file size is unknown, pass -1.
    +   *
    +   * You should check if the ranges are satisfiable using
    +   * ByteRangeSpecifier::isSatisfiable().
    +   */
    +   ByteRangeSpecifier getRanges(::int64_t filesize) const;
    +
    +   static ByteRangeSpecifier getRanges(const std::string &header,
    +    ::int64_t filesize);
    +
    +private:
    +  const WebRequest       *request_;
    +  const ParameterMap&     parameters_;
    +  const UploadedFileMap&  files_;
    +  ResponseContinuation   *continuation_;
    +
    +  Request(const WebRequest& request, ResponseContinuation *continuation);
    +  Request(const ParameterMap& parameters, const UploadedFileMap& files);
    +
    +  friend class Wt::WResource;
    +  friend class Wt::WebSession;
    +};
    +
    +  }
    +}
    +
    +#endif // HTTP_REQUEST_H_
    diff --git a/wt-3.1.7a/src/Wt/Http/Request.C b/wt-3.1.7a/src/Wt/Http/Request.C
    new file mode 100644
    index 0000000..eb3d065
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Request.C
    @@ -0,0 +1,316 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <stdexcept>
    +#include <sstream>
    +#ifndef _MSC_VER
    +#include <unistd.h>
    +#endif
    +
    +#include "Wt/Http/Request"
    +#include "Utils.h"
    +#include "WebRequest.h"
    +#include <boost/algorithm/string.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace {
    +  std::stringstream emptyStream;
    +}
    +
    +namespace Wt {
    +  namespace Http {
    +
    +UploadedFile::UploadedFile(const std::string& spoolName,
    +			   const std::string& clientFileName,
    +			   const std::string& contentType)
    +{
    +  fileInfo_.reset(new Impl());
    +
    +  fileInfo_->spoolFileName = spoolName;
    +  fileInfo_->clientFileName = clientFileName;
    +  fileInfo_->contentType = contentType;
    +  fileInfo_->isStolen = false;
    +}
    +
    +void UploadedFile::Impl::cleanup()
    +{
    +  if (!isStolen)
    +    unlink(spoolFileName.c_str());
    +}
    +
    +UploadedFile::Impl::~Impl()
    +{
    +  cleanup();
    +}
    +
    +const std::string& UploadedFile::spoolFileName() const
    +{
    +  return fileInfo_->spoolFileName;
    +}
    +
    +const std::string& UploadedFile::clientFileName() const
    +{
    +  return fileInfo_->clientFileName;
    +}
    +
    +const std::string& UploadedFile::contentType() const
    +{
    +  return fileInfo_->contentType;
    +}
    +
    +void UploadedFile::stealSpoolFile() const
    +{
    +  fileInfo_->isStolen = true;
    +}
    +
    +Request::ByteRange::ByteRange()
    +  : firstByte_(0),
    +    lastByte_(0)
    +{
    +}
    +
    +Request::ByteRange::ByteRange(::uint64_t first, ::uint64_t last)
    +  : firstByte_(first),
    +    lastByte_(last)
    +{ }
    +
    +Request::ByteRangeSpecifier::ByteRangeSpecifier()
    +  : satisfiable_(true)
    +{ }
    +
    +const ParameterValues& Request::getParameterValues(const std::string& name)
    +  const
    +{
    +  ParameterMap::const_iterator i = parameters_.find(name);
    +  if (i != parameters_.end())
    +    return i->second;
    +  else
    +    return WebRequest::emptyValues_;
    +}
    +
    +const std::string *Request::getParameter(const std::string& name) const
    +{
    +  const ParameterValues& v = getParameterValues(name);
    +  if (!Utils::isEmpty(v))
    +    return &v[0];
    +  else
    +    return 0;
    +}
    +
    +const UploadedFile *Request::getUploadedFile(const std::string& name) const
    +{
    +  UploadedFileMap::const_iterator i = files_.find(name);
    +  if (i != files_.end())
    +    return &i->second;
    +  else
    +    return 0;
    +}
    +
    +std::string Request::method() const
    +{
    +  return request_ ? request_->requestMethod() : "GET";
    +}
    +
    +std::string Request::serverName() const
    +{
    +  return request_ ? request_->serverName() : std::string();
    +}
    +
    +std::string Request::serverPort() const
    +{
    +  return request_ ? request_->serverPort() : std::string();
    +}
    +
    +std::string Request::path() const
    +{
    +  return request_ ? request_->scriptName() : std::string();
    +}
    +
    +std::string Request::pathInfo() const
    +{
    +  return request_ ? request_->pathInfo() : std::string();
    +}
    +
    +std::string Request::queryString() const
    +{
    +  return request_ ? request_->queryString() : std::string();
    +}
    +
    +std::string Request::urlScheme() const
    +{
    +  return request_ ? request_->urlScheme() : std::string();
    +}
    +
    +std::string Request::headerValue(const std::string& field) const
    +{
    +  return request_ ? request_->headerValue(field) : std::string();
    +}
    +
    +int Request::tooLarge() const
    +{
    +  return request_ ? request_->postDataExceeded() : 0;
    +}
    +
    +std::istream& Request::in() const
    +{
    +  if (request_) {
    +    WebRequest *web = const_cast<WebRequest *>(request_);
    +    return web->in();
    +  } else {
    +    return emptyStream;
    +  }
    +}
    +
    +std::string Request::contentType() const
    +{
    +  return request_ ? request_->contentType() : std::string();
    +}
    +
    +int Request::contentLength() const
    +{
    +  return request_ ? request_->contentLength() : 0;
    +}
    +
    +std::string Request::userAgent() const
    +{
    +  return request_ ? request_->userAgent() : std::string();
    +}
    +
    +std::string Request::clientAddress() const
    +{
    +  return request_ ? request_->remoteAddr() : std::string();
    +}
    +
    +Request::ByteRangeSpecifier Request::getRanges(::int64_t filesize) const
    +{
    +  return getRanges(headerValue("Range"), filesize);
    +}
    +
    +Request::ByteRangeSpecifier Request::getRanges(const std::string &rangeHdr,
    +                                               ::int64_t filesize)
    +{
    +  Request::ByteRangeSpecifier retval;
    +
    +  if (filesize == 0) {
    +    // Don't waste CPU time and simplify code below.
    +    retval.setSatisfiable(false);
    +    return retval;
    +  }
    +
    +  bool syntaxError = false;
    +  bool satisfiable = filesize == -1;
    +  std::vector<std::string> rangeSpecifier;
    +  boost::split(rangeSpecifier, rangeHdr, boost::is_any_of("="));
    +
    +  if (rangeSpecifier.size() == 2) {
    +    boost::trim(rangeSpecifier[0]);
    +    if (boost::iequals(rangeSpecifier[0], "bytes")) {
    +      std::vector<std::string> ranges;
    +      boost::split(ranges, rangeSpecifier[1], boost::is_any_of(","));
    +      for (std::size_t i = 0; i < ranges.size(); ++i) {
    +        std::vector<std::string> range;
    +        boost::split(range, ranges[i], boost::is_any_of("-"));
    +        if (range.size() == 2) {
    +          std::string start = range[0];
    +          std::string end = range[1];
    +
    +	  boost::trim(start);
    +	  boost::trim(end);
    +
    +          uint64_t startInt=0, endInt=0;
    +          try {
    +            if (start != "")
    +              startInt = boost::lexical_cast<uint64_t>(start);
    +            if (end != "")
    +              endInt = boost::lexical_cast<uint64_t>(end);
    +          } catch (boost::bad_lexical_cast &) {
    +            // syntactically invalid
    +            syntaxError = true;
    +          }
    +          if (start == "") {
    +            // notation -599: return last 599 bytes
    +            if (filesize != -1 && end != "") {
    +              if (endInt >= (uint64_t)filesize) {
    +                endInt = (std::size_t)filesize;
    +              }
    +              if (endInt > 0) {
    +                satisfiable = true;
    +                retval.push_back
    +		  (ByteRange
    +		   (uint64_t(filesize - endInt), std::size_t(filesize - 1)));
    +              }
    +              else {
    +                // Not really specified as syntax error. The paragraph about
    +                // 'satisfiability' seems to imply that we should simply
    +                // ignore it.
    +              }
    +            } else {
    +              // syntactically invalid
    +              syntaxError = true;
    +            }
    +          } else {
    +            if (filesize == -1 || startInt < (uint64_t)filesize) {
    +              if (end == "") {
    +                satisfiable = true;
    +                // notation 599-: returns from byte 599 to eof
    +                if (filesize == -1)
    +                  retval.push_back
    +		    (ByteRange(startInt, std::numeric_limits<uint64_t>::max()));
    +                else
    +                  retval.push_back
    +		    (ByteRange
    +		     (startInt, uint64_t(filesize - 1)));
    +              } else {
    +                if (startInt <= endInt) {
    +                  satisfiable = true;
    +                  if (filesize >= 0 && endInt > (uint64_t)filesize)
    +                    endInt = uint64_t(filesize - 1);
    +                  retval.push_back(ByteRange(startInt, endInt));
    +                } else {
    +                  // syntactically invalid
    +                  syntaxError = true;
    +                }
    +              }
    +            } else {
    +              // Not-satisfiable: just skip this range
    +            }
    +          }
    +        } else {
    +          syntaxError = true;
    +        }
    +      }
    +    } else {
    +      // only understand 'bytes'
    +      syntaxError = true;
    +    }
    +  } else {
    +    // Too many equals
    +    syntaxError = true;
    +  }
    +  if (syntaxError) {
    +    return ByteRangeSpecifier();
    +  } else {
    +    retval.setSatisfiable(satisfiable);
    +    return retval;
    +  }
    +}
    +
    +Request::Request(const WebRequest& request, ResponseContinuation *continuation)
    +  : request_(&request),
    +    parameters_(request.getParameterMap()),
    +    files_(request.uploadedFiles()),
    +    continuation_(continuation)
    +{ }
    +
    +Request::Request(const ParameterMap& parameters, const UploadedFileMap& files)
    +  : request_(0),
    +    parameters_(parameters),
    +    files_(files),
    +    continuation_(0)
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Http/Response b/wt-3.1.7a/src/Wt/Http/Response
    new file mode 100644
    index 0000000..05df4b2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Response
    @@ -0,0 +1,120 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_RESPONSE_H_
    +#define HTTP_RESPONSE_H_
    +
    +#include <string>
    +#include <Wt/WGlobal>
    +#include <Wt/Http/ResponseContinuation>
    +#include <ostream>
    +
    +namespace Wt {
    +
    +  class WResource;
    +  class WebSession;
    +
    +  namespace Http {
    +
    +/*! \class Response Wt/Http/Response Wt/Http/Response
    + *  \brief An HTTP response.
    + *
    + * Use the HTTP response to format a response to an HTTP request (see
    + * Request).
    + *
    + * More specifically you can:
    + * - set the content mime type using setMimeType()
    + * - add HTTP headers using addHeader()
    + * - stream content into out()
    + *
    + * You may chose to provide only a partial response. In that case, use
    + * createContinuation() to create a continuation object to which you
    + * can annotate information for the next request to process the
    + * response further.
    + *
    + * \sa WResource::handleRequest()
    + */
    +class WT_API Response
    +{
    +public:
    +  /*! \brief Sets the response status.
    +   *
    +   * Unless a overriden, 200 OK will be assumed.
    +   */
    +  void setStatus(int status);
    +
    +  /*! \brief Sets the content length
    +   *
    +   * If content length is known, use this method to set it. File downloads
    +   * will see progress bars. If not set, Wt will use chunked transfers.
    +   *
    +   * Always use this method instead of setting the Content-Length header
    +   * with addHeader().
    +   *
    +   * Headers may be added only before setting the content mime-type
    +   * (setMimeType()), and before streaming any data to the out()
    +   * stream.
    +   */
    +   void setContentLength(::uint64_t length);
    +
    +  /*! \brief Set the content mime type.
    +   *
    +   * The content mimetype is used by the browser to correctly interpret
    +   * the resource.
    +   */
    +  void setMimeType(const std::string& mimeType);
    +
    +  /*! \brief Add an HTTP header.
    +   *
    +   * Headers may be added only before setting the content mime-type
    +   * (setMimeType()), and before streaming any data to the out()
    +   * stream.
    +   */
    +  void addHeader(const std::string& name, const std::string& value);
    +
    +  /*! \brief Create a continuation object for this response.
    +   *
    +   * By creating a continuation object, a new request will be made for
    +   * the resource to retrieve more data, after the current data has
    +   * been sent out.
    +   *
    +   * \sa continuation()
    +   */
    +  ResponseContinuation *createContinuation();
    +
    +  /*! \brief Return the continuation, if one was created for this response.
    +   *
    +   * Returns the continuation that was previously created using
    +   * createContinuation(), or 0 if no continuation was created yet.
    +   *
    +   * \sa createContinuation()
    +   */
    +  ResponseContinuation *continuation() const;
    +
    +  /*! \brief Returns the stream for getting the response output.
    +   */
    +  std::ostream& out();
    +
    +  WT_BOSTREAM& bout() { return out(); }
    +
    +private:
    +  WResource            *resource_;
    +  WebResponse          *response_;
    +  ResponseContinuation *continuation_;
    +  WT_BOSTREAM          *out_;
    +
    +  Response(WResource *resource, WebResponse *response,
    +	   ResponseContinuation *continuation);
    +  Response(WResource *resource, WT_BOSTREAM& out);
    +
    +  friend class Wt::WResource;
    +  friend class Wt::WebSession;
    +};
    +
    +  }
    +}
    +
    +#endif // HTTP_RESPONSE_H_
    diff --git a/wt-3.1.7a/src/Wt/Http/Response.C b/wt-3.1.7a/src/Wt/Http/Response.C
    new file mode 100644
    index 0000000..0f8bab7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/Response.C
    @@ -0,0 +1,81 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/Http/Response"
    +#include "Wt/Http/ResponseContinuation"
    +#include "Wt/WResource"
    +#include "WebRequest.h"
    +
    +namespace Wt {
    +  namespace Http {
    +
    +void Response::setStatus(int status)
    +{
    +  if (response_)
    +    response_->setStatus(status);
    +}
    +
    +void Response::setContentLength(::uint64_t length)
    +{
    +  if (response_)
    +    response_->setContentLength(length);
    +}
    +
    +void Response::setMimeType(const std::string& mimeType)
    +{
    +  if (response_)
    +    response_->setContentType(mimeType);
    +}
    +
    +void Response::addHeader(const std::string& name, const std::string& value)
    +{
    +  if (response_)
    +    response_->addHeader(name, value);
    +}
    +
    +ResponseContinuation *Response::createContinuation()
    +{
    +  if (!continuation_)
    +    continuation_ = new ResponseContinuation(resource_, response_);
    +  else
    +    continuation_->resource_ = resource_;
    +
    +  return continuation_;
    +}
    +
    +ResponseContinuation *Response::continuation() const
    +{
    +  if (continuation_ && continuation_->resource_)
    +    return continuation_;
    +  else
    +    return 0;
    +}
    +
    +WT_BOSTREAM& Response::out()
    +{
    +  if (out_)
    +    return *out_;
    +  else
    +    return response_->out();
    +}
    +
    +Response::Response(WResource *resource, WebResponse *response,
    +		   ResponseContinuation *continuation)
    +  : resource_(resource),
    +    response_(response),
    +    continuation_(continuation),
    +    out_(0)
    +{ }
    +
    +Response::Response(WResource *resource, WT_BOSTREAM& out)
    +  : resource_(resource),
    +    response_(0),
    +    continuation_(0),
    +    out_(&out)
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/Http/ResponseContinuation b/wt-3.1.7a/src/Wt/Http/ResponseContinuation
    new file mode 100644
    index 0000000..06138bf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/ResponseContinuation
    @@ -0,0 +1,79 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_RESPONSE_CONTINUATION_H_
    +#define HTTP_RESPONSE_CONTINUATION_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <boost/any.hpp>
    +
    +namespace Wt {
    +
    +  class WResource;
    +  class WebResponse;
    +  class WebSession;
    +
    +  /*! \brief Namespace for objects directly related to HTTP */
    +  namespace Http {
    +
    +    class Response;
    +
    +/*! \class ResponseContinuation Wt/Http/ResponseContinuation Wt/Http/ResponseContinuation
    + *  \brief A response continuation object.
    + *
    + * A response continuation object is used to keep track of a continued
    + * response, i.e. a response that is created in several parts.
    + *
    + * You may associate data with the object using setData().
    + *
    + * \sa Response::createContinuation(), Request::continuation()
    + */
    +class WT_API ResponseContinuation
    +{
    +public:
    +  /*! \brief Set data associated with the continuation.
    +   *
    +   * You could do this to keep track of the state of sending the data
    +   * for a WResource.
    +   */
    +  void setData(const boost::any& data);
    +
    +  /*! \brief Return data associated with the continuation.
    +   *
    +   * \sa setData()
    +   */
    +  boost::any data() { return data_; }
    +
    +  /*! \brief Return the resource.
    +   */
    +  WResource *resource() const { return resource_; }
    +
    +  /*
    +   * Only useful for server-side events: force continuation.
    +   */
    +  void doContinue();
    +
    +private:
    +  WResource        *resource_;
    +  WebResponse      *response_;
    +  boost::any        data_;
    +
    +  ResponseContinuation(WResource *resource, WebResponse *response);
    +  ResponseContinuation(const ResponseContinuation&);
    +  ~ResponseContinuation();
    +
    +  void         stop();
    +  WebResponse *response() { return response_; }
    +
    +  friend class Wt::WResource;
    +  friend class Wt::WebSession;
    +  friend class Response;
    +};
    +
    +  }
    +}
    +
    +#endif // HTTP_RESPONSE_CONTINUATION_H_
    diff --git a/wt-3.1.7a/src/Wt/Http/ResponseContinuation.C b/wt-3.1.7a/src/Wt/Http/ResponseContinuation.C
    new file mode 100644
    index 0000000..6c16f40
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Http/ResponseContinuation.C
    @@ -0,0 +1,49 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +
    +#include "Wt/Http/ResponseContinuation"
    +#include "Wt/WResource"
    +
    +#include "WebRequest.h"
    +
    +namespace Wt {
    +  namespace Http {
    +
    +void ResponseContinuation::setData(const boost::any& data)
    +{
    +  data_ = data;
    +}
    +
    +void ResponseContinuation::doContinue()
    +{
    +  // We are certain that the continuation is still "alive" because it is
    +  // protected by a mutex, and thus a simultaneous change with
    +  // WebResponse::flush() is not possible: ResponseContinuation::stop(),
    +  // called before destruction together with the resource, will thus
    +  // block while we are here.
    +  resource_->doContinue(this);
    +}
    +
    +ResponseContinuation::ResponseContinuation(WResource *resource,
    +					   WebResponse *response)
    +  : resource_(resource),
    +    response_(response)
    +{
    +  resource_->continuations_.push_back(this);
    +}
    +
    +void ResponseContinuation::stop()
    +{
    +  response_->flush(WebResponse::ResponseDone);
    +}
    +
    +ResponseContinuation::~ResponseContinuation()
    +{ }
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/JavaScriptLoader.h b/wt-3.1.7a/src/Wt/JavaScriptLoader.h
    new file mode 100644
    index 0000000..2fe6766
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/JavaScriptLoader.h
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_JAVASCRIPT_LOADER_H_
    +#define WT_JAVASCRIPT_LOADER_H_
    +
    +#define WT_JS(...) #__VA_ARGS__
    +
    +#ifndef WT_DEBUG_JS
    +
    +#define WT_DECLARE_WT_MEMBER(i, name, ...)	       \
    +  namespace {					       \
    +    const char *wtjs##i(Wt::WApplication *app) {       \
    +      return WT_CLASS "." name " = " #__VA_ARGS__ ";"; \
    +    }						       \
    +  }
    +
    +#define WT_DECLARE_APP_MEMBER(i, name, ...)				\
    +  namespace {								\
    +    std::string appjs##i(Wt::WApplication *app) {			\
    +      return app->javaScriptClass() + "." name " = " #__VA_ARGS__ ";";	\
    +    }									\
    +  }
    +
    +#define LOAD_JAVASCRIPT(app, jsFile, name, jsi)	\
    +  app->doJavaScript(jsi(app), false)
    +
    +#else // !WT_DEBUG_JS
    +
    +#define LOAD_JAVASCRIPT(app, jsFile, name, jsi)	\
    +  app->loadJavaScript(jsFile)
    +
    +#endif // WT_DEBUG_JS
    +
    +#endif // WT_JAVASCRIPT_LOADER_H_
    diff --git a/wt-3.1.7a/src/Wt/SizeHandle.C b/wt-3.1.7a/src/Wt/SizeHandle.C
    new file mode 100644
    index 0000000..ae382b1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/SizeHandle.C
    @@ -0,0 +1,28 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +
    +#include "SizeHandle.h"
    +#include "JavaScriptLoader.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/SizeHandle.min.js"
    +#endif
    +
    +namespace Wt {
    +
    +void SizeHandle::loadJavaScript(WApplication *app)
    +{
    +  const char *THIS_JS = "js/SizeHandle.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "SizeHandle", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/SizeHandle.h b/wt-3.1.7a/src/Wt/SizeHandle.h
    new file mode 100644
    index 0000000..e934a5a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/SizeHandle.h
    @@ -0,0 +1,20 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_SIZE_HANDLE_H_
    +#define WT_SIZE_HANDLE_H_
    +
    +namespace Wt {
    +
    +  class WApplication;
    +
    +  class SizeHandle {
    +  public:
    +    static void loadJavaScript(WApplication *app);
    +  };
    +}
    +
    +#endif // WT_SIZE_HANDLE_H_
    diff --git a/wt-3.1.7a/src/Wt/StdGridLayoutImpl.C b/wt-3.1.7a/src/Wt/StdGridLayoutImpl.C
    new file mode 100644
    index 0000000..d34e4c5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdGridLayoutImpl.C
    @@ -0,0 +1,634 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <sstream>
    +#include <stdio.h>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WGridLayout"
    +#include "Wt/WLogger"
    +
    +#include "StdGridLayoutImpl.h"
    +#include "SizeHandle.h"
    +#include "DomElement.h"
    +
    +#include "JavaScriptLoader.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/StdGridLayoutImpl.min.js"
    +#include "js/WtResize.min.js"
    +#endif
    +
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +namespace Wt {
    +
    +StdGridLayoutImpl::StdGridLayoutImpl(WLayout *layout, Impl::Grid& grid)
    +  : StdLayoutImpl(layout),
    +    grid_(grid),
    +    useFixedLayout_(false),
    +    forceUpdate_(false)
    +{
    +  const char *THIS_JS = "js/StdGridLayoutImpl.js";
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    app->styleSheet().addRule("table.Wt-hcenter", "margin: 0px auto;"
    +			      "position: relative");
    +
    +    LOAD_JAVASCRIPT(app, THIS_JS, "StdLayout", wtjs1);
    +    LOAD_JAVASCRIPT(app, THIS_JS, "layouts", appjs1);
    +
    +    app->setJavaScriptLoaded(THIS_JS);
    +
    +    app->addAutoJavaScript(app->javaScriptClass() + ".layouts.adjust();");
    +  }
    +}
    +
    +bool StdGridLayoutImpl::itemResized(WLayoutItem *item)
    +{
    +  /*
    +   * Iterate over all rows in which resized widgets (height changes) may
    +   * affect the layout.
    +   */
    +  const unsigned colCount = grid_.columns_.size();
    +  const unsigned rowCount = grid_.rows_.size();
    +
    +  for (unsigned row = 0; row < rowCount; ++row)
    +    if (grid_.rows_[row].stretch_ <= 0) {
    +      for (unsigned col = 0; col < colCount; ++col)
    +	if (grid_.items_[row][col].item_ == item) {
    +	  forceUpdate_ = true;
    +	  return true;
    +	}
    +    }
    +
    +  return false;
    +}
    +
    +void StdGridLayoutImpl::updateDom()
    +{
    +  if (forceUpdate_) {
    +    forceUpdate_ = false;
    +    WApplication *app = WApplication::instance();
    +    app->doJavaScript(app->javaScriptClass() + ".layouts.adjust('"
    +		      + id() + "');");
    +  }
    +}
    +
    +const char *StdGridLayoutImpl::childrenResizeJS()
    +{
    +  const char *THIS_JS = "js/WtResize.js";
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "ChildrenResize", wtjs10);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  return WT_CLASS ".ChildrenResize";
    +}
    +
    +StdGridLayoutImpl::~StdGridLayoutImpl()
    +{ 
    +  WApplication *app = WApplication::instance();
    +
    +  /*
    +   * If it is a top-level layout (as opposed to a nested layout),
    +   * configure overflow of the container.
    +   */
    +  if (parentLayoutImpl() == 0) {
    +    if (container() == app->root()) {
    +      app->setBodyClass("");
    +      app->setHtmlClass("");
    +    }
    +
    +    if (app->environment().agentIsIElt(9))
    +      container()->setOverflow(WContainerWidget::OverflowVisible);
    +  }
    +}
    +
    +int StdGridLayoutImpl::minimumHeight() const
    +{
    +  const unsigned colCount = grid_.columns_.size();
    +  const unsigned rowCount = grid_.rows_.size();
    +
    +  int total = 0;
    +
    +  for (unsigned i = 0; i < rowCount; ++i) {
    +    int minHeight = 0;
    +    for (unsigned j = 0; j < colCount; ++j) {
    +      WLayoutItem *item = grid_.items_[i][j].item_;
    +      if (item)
    +	minHeight = std::max(minHeight, getImpl(item)->minimumHeight());
    +    }
    +    total += minHeight;
    +  }
    +
    +  return total * (rowCount-1) * grid_.verticalSpacing_;
    +}
    +
    +void StdGridLayoutImpl::containerAddWidgets(WContainerWidget *container)
    +{
    +  StdLayoutImpl::containerAddWidgets(container);
    +
    +  if (!container)
    +    return;
    +
    +  WApplication *app = WApplication::instance();
    +
    +  /*
    +   * If it is a top-level layout (as opposed to a nested layout),
    +   * configure overflow of the container.
    +   */
    +  if (parentLayoutImpl() == 0) {
    +    if (container == app->root()) {
    +      /*
    +       * Reset body,html default paddings and so on if we are doing layout
    +       * in the entire document.
    +       */
    +      app->setBodyClass(app->bodyClass() + " Wt-layout");
    +      app->setHtmlClass(app->htmlClass() + " Wt-layout");
    +    }
    +  }
    +}
    +
    +void StdGridLayoutImpl::setHint(const std::string& name,
    +				const std::string& value)
    +{
    +  if (name == "table-layout")
    +    if (value == "fixed")
    +      useFixedLayout_ = true;
    +    else if (value == "auto")
    +      useFixedLayout_ = false;
    +    else
    +      WApplication::instance()->log("error")
    +	<< "WGridLayout: unrecognized hint value '" << value
    +	<< "' for '" << name << "'";
    +  else
    +     WApplication::instance()->log("error")
    +       << "WGridLayout: unrecognized hint '" << name << "'";
    +}
    +
    +DomElement *StdGridLayoutImpl::createDomElement(bool fitWidth, bool fitHeight,
    +						WApplication *app)
    +{
    +  forceUpdate_ = false;
    +
    +  const unsigned colCount = grid_.columns_.size();
    +  const unsigned rowCount = grid_.rows_.size();
    +
    +  bool hasResizeHandles = false;
    +
    +  for (unsigned i = 0; i < colCount; ++i)
    +    if (grid_.columns_[i].resizable_) {
    +      hasResizeHandles = true;
    +      break;
    +    }
    +
    +  if (!hasResizeHandles)
    +    for (unsigned i = 0; i < rowCount; ++i)
    +      if (grid_.rows_[i].resizable_) {
    +	hasResizeHandles = true;
    +	break;
    +      }
    +
    +  if (hasResizeHandles
    +      && !app->javaScriptLoaded("js/StdGridLayoutImpl-resize.js")) {
    +    SizeHandle::loadJavaScript(app);
    +
    +    LOAD_JAVASCRIPT(app, "js/StdGridLayoutImpl.js",
    +		    "StdLayout.prototype.initResize", wtjs2);
    +
    +    app->setJavaScriptLoaded("js/StdGridLayoutImpl-resize.js");
    +  }
    +
    +  int totalColStretch = 0;
    +  for (unsigned col = 0; col < colCount; ++col)
    +    totalColStretch += std::max(0, grid_.columns_[col].stretch_);
    +
    +  int totalRowStretch = 0;
    +  for (unsigned row = 0; row < rowCount; ++row)
    +    totalRowStretch += std::max(0, grid_.rows_[row].stretch_);
    +
    +  int margin[] = { 0, 0, 0, 0};
    +
    +  if (layout()->parentLayout() == 0) {
    +#ifndef WT_TARGET_JAVA
    +    layout()->getContentsMargins(margin + 3, margin,
    +				 margin + 1, margin + 2);
    +#else // WT_TARGET_JAVA
    +    margin[3] = layout()->getContentsMargin(Left);
    +    margin[0] = layout()->getContentsMargin(Top);
    +    margin[1] = layout()->getContentsMargin(Right);
    +    margin[2] = layout()->getContentsMargin(Bottom);
    +#endif // WT_TARGET_JAVA
    +  }
    +
    +  DomElement *div = DomElement::createNew(DomElement_DIV);
    +  div->setId(id());
    +  div->setProperty(PropertyStylePosition, "relative");
    +
    +  std::string divStyle;
    +  if (fitHeight && !app->environment().agentIsIElt(9))
    +    divStyle += "height: 100%;";
    +  if (app->environment().agentIsIElt(9))
    +    divStyle += "zoom: 1;";
    +  if (!divStyle.empty())
    +    div->setProperty(PropertyStyle, divStyle);
    +
    +  DomElement *table = DomElement::createNew(DomElement_TABLE);
    +
    +  {
    +    std::string style;
    +    if (fitWidth) {
    +      if (useFixedLayout_)
    +	style = "table-layout: fixed;";
    +      style += "width: 100%;";
    +    }
    +    if (fitHeight) // for non-JavaScript mode
    +      style += "height: 100%;";
    +
    +    table->setProperty(PropertyStyle, style);
    +  }
    +
    +  DomElement *tbody = DomElement::createNew(DomElement_TBODY);
    +
    +  if (fitWidth)
    +    for (unsigned col = 0; col < colCount; ++col) {
    +      DomElement *c = DomElement::createNew(DomElement_COL);
    +      int stretch = std::max(0, grid_.columns_[col].stretch_);
    +
    +      if (stretch || (fitWidth && totalColStretch == 0)) {
    +	int pct = totalColStretch == 0 ? 100 / colCount
    +	  : 100 * stretch / totalColStretch;
    +	c->setProperty
    +	  (PropertyStyle,
    +	   "width:" + boost::lexical_cast<std::string>(pct) + "%;");
    +      }
    +
    +      table->addChild(c);
    +
    +      bool resizeHandleRight = col < colCount - 1
    +	&& grid_.columns_[col].resizable_;
    +      if (resizeHandleRight) {
    +	c = DomElement::createNew(DomElement_COL);	
    +	c->setProperty(PropertyStyleWidth, 
    +		       boost::lexical_cast<std::string>
    +		       (grid_.horizontalSpacing_) + "px");
    +	c->setProperty(PropertyClass, "Wt-vrh");
    +	table->addChild(c);
    +      }
    +    }
    +
    +#ifndef WT_TARGET_JAVA
    +  std::vector<bool> overSpanned(colCount * rowCount, false);
    +#else
    +  std::vector<bool> overSpanned;
    +  overSpanned.insert(0, colCount * rowCount, false);
    +#endif // WT_TARGET_JAVA
    +
    +  bool resizeHandleAbove = false;
    +  for (unsigned row = 0; row < rowCount; ++row) {
    +    bool resizeHandleBelow = row < rowCount - 1
    +      && grid_.rows_[row].resizable_;
    +
    +    DomElement *tr = DomElement::createNew(DomElement_TR);
    +
    +    std::string heightPct;
    +    int stretch = std::max(0, grid_.rows_[row].stretch_);
    +    if (stretch || (fitHeight && totalRowStretch == 0)) {
    +      int pct = totalRowStretch == 0 ?
    +	100 / rowCount :
    +	100 * stretch / totalRowStretch;
    +      std::stringstream style;
    +      style << "height: " << pct << "%;";
    +      heightPct = style.str();
    +      tr->setProperty(PropertyStyle, heightPct);
    +    }
    +
    +    bool resizeHandleLeft = false;
    +
    +    for (unsigned col = 0; col < colCount; ++col) {
    +      bool resizeHandleRight = col < colCount - 1
    +	&& grid_.columns_[col - 1 + grid_.items_[row][col].colSpan_].resizable_;
    +
    +      if (!overSpanned[row * colCount + col]) {
    +	Impl::Grid::Item& item = grid_.items_[row][col];
    +
    +	bool itemFitWidth = (item.colSpan_ == (int)colCount)
    +	  || (totalColStretch == 0);
    +	bool itemFitHeight = (item.rowSpan_ == (int)rowCount)
    +	  || (totalRowStretch == 0);
    +
    +	int colSpan = 0;
    +
    +	for (int i = 0; i < item.rowSpan_; ++i) {
    +	  // FIXME: if we span multiple rows, it is not clear what we should do ?
    +	  //
    +	  // if stretch == -1 or >0, then we should fit height
    +	  // if stretch == 0, then we should not fit height if no row
    +	  // stretch is set (in which case JavaScript will actively take
    +	  // over anyway)
    +	  if (grid_.rows_[row + i].stretch_)
    +	    itemFitHeight = true;
    +	  else if (!stretch)
    +	    itemFitHeight = false;
    +
    +	  colSpan = item.colSpan_;
    +	  for (int j = 0; j < item.colSpan_; ++j) {
    +	    // there is no special meaning for column stretches
    +	    if (grid_.columns_[col + j].stretch_)
    +	      itemFitWidth = true;
    +	    if (i + j > 0)
    +	      overSpanned[(row + i) * colCount + col + j] = true;
    +
    +	    if (j + 1 < item.colSpan_ && grid_.columns_[col + j].resizable_)
    +	      ++colSpan;
    +	  }
    +	}
    +
    +	// If we do not always fit heights of items (nested layouts),
    +	// then content of these nested layouts will not expand in
    +	// each cell to the full height alotted to by this grid. But
    +	// if we do, this makes the row no longer react to reductions
    +	// in height... Which is worse? I think the former?
    +	//
    +	// Solved now: use stretch = -1 to force fitting height
    +
    +	AlignmentFlag hAlign = item.alignment_ & AlignHorizontalMask;
    +	AlignmentFlag vAlign = item.alignment_ & AlignVerticalMask;
    +
    +	if (hAlign != 0 && hAlign != AlignJustify)
    +	  itemFitWidth = false;
    +	if (vAlign != 0)
    +	  itemFitHeight = false;
    +
    +	int padding[] = { 0, 0, 0, 0 };
    +
    +	if (row == 0)
    +	  padding[0] = margin[0];
    +	else
    +	  if (!resizeHandleAbove)
    +	    padding[0] = (grid_.verticalSpacing_+1) / 2;
    +
    +	if (row + item.rowSpan_ == rowCount)
    +	  padding[2] = margin[2];
    +	else
    +	  if (!resizeHandleBelow)
    +	    padding[2] = grid_.verticalSpacing_ / 2;
    +
    +	if (col == 0)
    +	  padding[3] = margin[3];
    +	else
    +	  if (!resizeHandleLeft)
    +	    padding[3] = (grid_.horizontalSpacing_ + 1)/2;
    +
    +	if (col + item.colSpan_ == colCount)
    +	  padding[1] = margin[1];
    +	else
    +	  if (!resizeHandleRight)
    +	    padding[1] = (grid_.horizontalSpacing_)/2;
    +
    + 	DomElement *td = DomElement::createNew(DomElement_TD);
    +
    +	if (app->environment().agentIsIElt(9))
    +	  td->setProperty(PropertyStylePosition, "relative");
    +
    +	if (item.item_) {
    +	  DomElement *c = getImpl(item.item_)
    +	    ->createDomElement(itemFitWidth, itemFitHeight, app);
    +
    +	  if (hAlign == 0)
    +	    hAlign = AlignJustify;
    +
    +	  switch (hAlign) {
    +	  case AlignCenter: {
    +	    DomElement *itable = DomElement::createNew(DomElement_TABLE);
    +	    itable->setProperty(PropertyClass, "Wt-hcenter");
    +	    if (vAlign == 0)
    +	      itable->setProperty(PropertyStyle, "height:100%;");
    +	    DomElement *irow = DomElement::createNew(DomElement_TR);
    +	    DomElement *itd = DomElement::createNew(DomElement_TD);
    +	    if (vAlign == 0)
    +	      itd->setProperty(PropertyStyle, "height:100%;");
    +	    itd->addChild(c);
    +	    irow->addChild(itd);
    +	    itable->addChild(irow);
    +	    c = itable;
    +	    break;
    +	  }
    +	  case AlignRight:
    +	    if (!c->isDefaultInline())
    +	      c->setProperty(PropertyStyleFloat, "right");
    +	    else
    +	      td->setProperty(PropertyStyleTextAlign, "right");
    +	    break;
    +	  case AlignLeft:
    +	    if (!c->isDefaultInline())
    +	      c->setProperty(PropertyStyleFloat, "left");
    +	    else
    +	      td->setProperty(PropertyStyleTextAlign, "left");
    +	    break;
    +	  case AlignJustify:
    +	    if (c->getProperty(PropertyStyleWidth).empty()
    +		&& useFixedLayout_
    +		&& !app->environment().agentIsWebKit()
    +		&& !app->environment().agentIsGecko()
    +		&& !c->isDefaultInline())
    +	      c->setProperty(PropertyStyleWidth, "100%");
    +	    break;
    +	  default:
    +	    break;
    +	  }
    +
    +	  td->addChild(c);
    +	}
    +
    +	{
    +	  std::string style;
    +
    +	  if (vAlign == 0) style += heightPct;
    +
    +	  //style += "overflow:auto;";
    +
    +	  if (padding[0] == padding[1] && padding[0] == padding[2]
    +	      && padding[0] == padding[3]) {
    +	    if (padding[0] != 0) {
    +#ifndef WT_TARGET_JAVA
    +	      char buf[100];
    +	      snprintf(buf, 100, "padding:%dpx;", padding[0]);
    +	      style += buf;
    +#else
    +	      style += "padding:"
    +		+ boost::lexical_cast<std::string>(padding[0]) + "px;";
    +#endif
    +	    }
    +	  } else {
    +#ifndef WT_TARGET_JAVA
    +	    char buf[100];
    +	    snprintf(buf, 100, "padding:%dpx %dpx %dpx %dpx;",
    +		     padding[0], padding[1], padding[2], padding[3]);
    +	    style += buf;
    +#else
    +	    style += "padding:"
    +	      + boost::lexical_cast<std::string>(padding[0]) + "px "
    +	      + boost::lexical_cast<std::string>(padding[1]) + "px "
    +	      + boost::lexical_cast<std::string>(padding[2]) + "px "
    +	      + boost::lexical_cast<std::string>(padding[3]) + "px;";
    +#endif
    +	  }
    +
    +	  if (vAlign != 0) switch (vAlign) {
    +	    case AlignTop:
    +	      style += "vertical-align:top;";
    +	      break;
    +	    case AlignMiddle:
    +	      style += "vertical-align:middle;";
    +	      break;
    +	    case AlignBottom:
    +	      style += "vertical-align:bottom;";
    +	    default:
    +	      break;
    +	    }
    +
    +	  if (!style.empty())
    +	    td->setProperty(PropertyStyle, style);
    +	}
    +
    +	if (item.rowSpan_ != 1)
    +	  td->setProperty(PropertyRowSpan,
    +			  boost::lexical_cast<std::string>(item.rowSpan_));
    +	if (colSpan != 1)
    +	  td->setProperty(PropertyColSpan,
    +			  boost::lexical_cast<std::string>(colSpan));
    +
    +	td->setProperty(PropertyStyleOverflowX, "hidden");
    +
    +	tr->addChild(td);
    +
    +	if (resizeHandleRight) {
    +	  td = DomElement::createNew(DomElement_TD);
    +	  td->setProperty(PropertyClass, "Wt-vrh");
    +
    +#ifndef WT_TARGET_JAVA
    +	  char style[100];
    +	  snprintf(style, 100, "padding:%dpx 0px %dpx;", padding[0],
    +		   padding[2]);
    +#else
    +	  std::string style = "padding:"
    +	    + boost::lexical_cast<std::string>(padding[0]) + "px 0px"
    +	    + boost::lexical_cast<std::string>(padding[2]) + "px;";
    +#endif
    +	  td->setProperty(PropertyStyle, style);
    +
    +	  DomElement *div2 = DomElement::createNew(DomElement_DIV);
    +	  div2->setProperty(PropertyStyleWidth,
    +		      boost::lexical_cast<std::string>(grid_.horizontalSpacing_)
    +			   + "px");
    +	  td->addChild(div2);
    +	  tr->addChild(td);
    +	}
    +      }
    +
    +      resizeHandleLeft = resizeHandleRight;
    +    }
    +
    +    tbody->addChild(tr);
    +
    +    if (resizeHandleBelow) {
    +      tr = DomElement::createNew(DomElement_TR);
    +      tr->setProperty(PropertyClass, "Wt-hrh");
    +      std::string height
    +	= boost::lexical_cast<std::string>(grid_.verticalSpacing_) + "px";
    +      tr->setProperty(PropertyStyleHeight, height);
    +      DomElement *td = DomElement::createNew(DomElement_TD);
    +      td->setProperty(PropertyColSpan,
    +		      boost::lexical_cast<std::string>(colCount));
    +#ifndef WT_TARGET_JAVA
    +      char style2[100];
    +      snprintf(style2, 100, "padding:0px %dpx 0px %dpx;", margin[1], margin[3]);
    +#else
    +      std::string style2 = "padding: 0px"
    +	+ boost::lexical_cast<std::string>(margin[1]) + "px 0px"
    +	+ boost::lexical_cast<std::string>(margin[3]) + "px;";
    +#endif
    +      td->setProperty(PropertyStyleHeight, style2);
    +      
    +      DomElement *div2 = DomElement::createNew(DomElement_DIV);
    +      div2->setProperty(PropertyStyleHeight, height);
    +      td->addChild(div2);
    +
    +      tr->addChild(td);
    +      tbody->addChild(tr);
    +    }
    +
    +    resizeHandleAbove = resizeHandleBelow;
    +  }
    +
    +  table->addChild(tbody);
    +
    +  if (fitHeight) {
    +    std::stringstream layoutAdd;
    +
    +    layoutAdd << app->javaScriptClass()
    +	      << ".layouts.add(new " WT_CLASS ".StdLayout( " WT_CLASS ", '"
    +	      << div->id() << "', { stretch: [";
    +    for (unsigned i = 0; i < rowCount; ++i) {
    +      if (i != 0)
    +	layoutAdd << ",";
    +
    +      int stretch = 0;
    +      if (totalRowStretch == 0 && fitHeight)
    +	stretch = 1;
    +      else
    +	stretch = grid_.rows_[i].stretch_;
    +
    +      layoutAdd << stretch;
    +    }
    +
    +    layoutAdd << "], minheight: [";
    +
    +    for (unsigned i = 0; i < rowCount; ++i) {
    +      if (i != 0)
    +	layoutAdd << ",";
    +
    +      int minHeight = 0;
    +
    +      for (unsigned j = 0; j < colCount; ++j) {
    +	WLayoutItem *item = grid_.items_[i][j].item_;
    +	if (item)
    +	  minHeight = std::max(minHeight, getImpl(item)->minimumHeight());
    +      }
    +
    +      if (i == 0)
    +	minHeight += margin[0];
    +      else
    +	minHeight += grid_.verticalSpacing_;
    +
    +      if (i == rowCount - 1)
    +	minHeight += margin[2];
    +
    +      layoutAdd	<< minHeight;
    +    }
    +    layoutAdd << "]}));";
    +
    +    table->callJavaScript(layoutAdd.str());
    +  }
    +
    +  div->addChild(table);
    +
    +  return div;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/StdGridLayoutImpl.h b/wt-3.1.7a/src/Wt/StdGridLayoutImpl.h
    new file mode 100644
    index 0000000..998aa12
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdGridLayoutImpl.h
    @@ -0,0 +1,53 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef STD_GRID_LAYOUT_IMPL_H_
    +#define STD_GRID_LAYOUT_IMPL_H_
    +
    +#include "StdLayoutImpl.h"
    +
    +namespace Wt {
    +
    +  class WApplication;
    +  class WLayout;
    +
    +  namespace Impl {
    +    struct Grid;
    +  }
    +
    +class StdGridLayoutImpl : public StdLayoutImpl
    +{
    +public:
    +  StdGridLayoutImpl(WLayout *layout, Impl::Grid& grid);
    +  virtual ~StdGridLayoutImpl();
    +
    +  virtual int minimumHeight() const;
    +
    +  virtual DomElement *createDomElement(bool fitWidth, bool fitHeight,
    +				       WApplication *app);
    +  virtual void updateDom();
    +
    +  static bool useJavaScriptHeights(WApplication *app);
    +
    +  virtual void setHint(const std::string& name, const std::string& value);
    +
    +  // Does not really belong here, but who cares ?
    +  static const char* childrenResizeJS();
    +
    +  virtual bool itemResized(WLayoutItem *item);
    +
    +protected:
    +  virtual void containerAddWidgets(WContainerWidget *container);
    +
    +private:
    +  Impl::Grid& grid_;
    +  bool        useFixedLayout_;
    +  bool        forceUpdate_;
    +};
    +
    +}
    +
    +#endif // STD_GRID_LAYOUT_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/StdLayoutImpl.C b/wt-3.1.7a/src/Wt/StdLayoutImpl.C
    new file mode 100644
    index 0000000..75a3fd1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdLayoutImpl.C
    @@ -0,0 +1,99 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "DomElement.h"
    +#include "StdLayoutImpl.h"
    +
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLayout"
    +#include "Wt/WLayoutItem"
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +
    +namespace Wt {
    +
    +StdLayoutImpl::StdLayoutImpl(WLayout *layout)
    +  : layout_(layout),
    +    container_(0)
    +{ }
    +
    +StdLayoutImpl::~StdLayoutImpl()
    +{
    +  if (container_)
    +    container_->layoutChanged(true);
    +}
    +
    +StdLayoutItemImpl *StdLayoutImpl::getImpl(WLayoutItem *item)
    +{
    +  return dynamic_cast<StdLayoutItemImpl *>(item->impl());
    +}
    +
    +void StdLayoutImpl::updateAddItem(WLayoutItem *item)
    +{
    +  WContainerWidget *c = container();
    +
    +  if (c) {
    +    getImpl(item)->containerAddWidgets(c);
    +
    +    update(item);
    +  }
    +}
    +
    +void StdLayoutImpl::updateRemoveItem(WLayoutItem *item)
    +{
    +  WContainerWidget *c = container();
    +
    +  if (c) {
    +    update(item);
    +
    +    getImpl(item)->containerAddWidgets(0);
    +  }
    +}
    +
    +void StdLayoutImpl::setContainer(WContainerWidget *c)
    +{
    +  if (c->count()) {
    +    while (c->count())
    +      c->removeWidget(c->widget(0));
    +  }
    +
    +  container_ = c;
    +  containerAddWidgets(container_);
    +}
    +
    +WContainerWidget *StdLayoutImpl::container() const
    +{
    +  if (container_)
    +    return container_;
    +  else
    +    return StdLayoutItemImpl::container();
    +}
    +
    +WLayoutItem *StdLayoutImpl::layoutItem() const
    +{
    +  return layout_;
    +}
    +
    +void StdLayoutImpl::containerAddWidgets(WContainerWidget *container)
    +{
    +  int c = layout_->count();
    +
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = layout_->itemAt(i);
    +    if (item)
    +      getImpl(item)->containerAddWidgets(container);
    +  }
    +}
    +
    +void StdLayoutImpl::update(WLayoutItem *item)
    +{
    +  WContainerWidget *c = container();
    +
    +  if (c)
    +    c->layoutChanged();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/StdLayoutImpl.h b/wt-3.1.7a/src/Wt/StdLayoutImpl.h
    new file mode 100644
    index 0000000..8c35a39
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdLayoutImpl.h
    @@ -0,0 +1,51 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef STD_LAYOUT_IMPL_H_
    +#define STD_LAYOUT_IMPL_H_
    +
    +#include "StdLayoutItemImpl.h"
    +
    +namespace Wt {
    +
    +class WLayout;
    +
    +class StdLayoutImpl : public StdLayoutItemImpl
    +{
    +public:
    +  StdLayoutImpl(WLayout *layout);
    +  virtual ~StdLayoutImpl();
    +
    +  virtual void updateAddItem(WLayoutItem *);
    +  virtual void updateRemoveItem(WLayoutItem *);
    +  virtual void update(WLayoutItem *);
    +  virtual void updateDom() = 0;
    +
    +  // Returns whether updateDom() is needed
    +  virtual bool itemResized(WLayoutItem *item) = 0;
    +
    +  virtual WContainerWidget *container() const;
    +  virtual WLayoutItem      *layoutItem() const;
    +
    +protected:
    +  virtual void containerAddWidgets(WContainerWidget *container);
    +
    +  WLayout *layout() const { return layout_; }
    +
    +  static StdLayoutItemImpl *getImpl(WLayoutItem *item);
    +
    +private:
    +  WLayout          *layout_;
    +  WContainerWidget *container_;
    +
    +  void setContainer(WContainerWidget *c);
    +
    +  friend class WContainerWidget;
    +};
    +
    +}
    +
    +#endif // STD_LAYOUT_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/StdLayoutItemImpl.C b/wt-3.1.7a/src/Wt/StdLayoutItemImpl.C
    new file mode 100644
    index 0000000..45fcefc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdLayoutItemImpl.C
    @@ -0,0 +1,46 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "StdLayoutImpl.h"
    +#include "StdLayoutItemImpl.h"
    +
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLayoutItem"
    +#include "Wt/WLayout"
    +
    +namespace Wt {
    +
    +StdLayoutItemImpl::StdLayoutItemImpl()
    +{ }
    +
    +StdLayoutItemImpl::~StdLayoutItemImpl()
    +{ }
    +  
    +StdLayoutImpl *StdLayoutItemImpl::parentLayoutImpl() const
    +{
    +  WLayoutItem *i = layoutItem();
    +  
    +  if (i->parentLayout())
    +    return dynamic_cast<StdLayoutImpl *>(i->parentLayout()->impl());
    +  else
    +    return 0;
    +}
    +
    +WContainerWidget *StdLayoutItemImpl::container() const
    +{
    +  StdLayoutImpl *p = parentLayoutImpl();
    +  if (p)
    +    return p->container();
    +  else
    +    return 0;
    +}
    +
    +WWidget *StdLayoutItemImpl::parentWidget() const
    +{
    +  return container();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/StdLayoutItemImpl.h b/wt-3.1.7a/src/Wt/StdLayoutItemImpl.h
    new file mode 100644
    index 0000000..da5c51a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdLayoutItemImpl.h
    @@ -0,0 +1,41 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef STD_LAYOUT_ITEM_IMPL_H_
    +#define STD_LAYOUT_ITEM_IMPL_H_
    +
    +#include "Wt/WLayoutItemImpl"
    +#include "Wt/WObject"
    +
    +namespace Wt {
    +
    +  class DomElement;
    +  class StdLayoutImpl;
    +  class WApplication;
    +  class WContainerWidget;
    +
    +class StdLayoutItemImpl : public WLayoutItemImpl, public WObject
    +{
    +public:
    +  StdLayoutItemImpl();
    +  virtual ~StdLayoutItemImpl();
    +
    +  virtual WContainerWidget *container() const;
    +  virtual WLayoutItem      *layoutItem() const = 0;
    +  virtual WWidget          *parentWidget() const;
    +
    +  virtual int minimumHeight() const = 0;
    +
    +  StdLayoutImpl *parentLayoutImpl() const;
    +
    +  virtual void containerAddWidgets(WContainerWidget *container) = 0;
    +  virtual DomElement *createDomElement(bool fitWidth, bool fitHeight,
    +				       WApplication *app) = 0;
    +};
    +
    +}
    +
    +#endif // STD_LAYOUT_ITEM_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/StdWidgetItemImpl.C b/wt-3.1.7a/src/Wt/StdWidgetItemImpl.C
    new file mode 100644
    index 0000000..e690fa5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdWidgetItemImpl.C
    @@ -0,0 +1,146 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "DomElement.h"
    +#include "StdWidgetItemImpl.h"
    +#include "StdGridLayoutImpl.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLogger"
    +#include "Wt/WWidgetItem"
    +
    +namespace Wt {
    +
    +StdWidgetItemImpl::StdWidgetItemImpl(WWidgetItem *item)
    +  : item_(item)
    +{ }
    +
    +StdWidgetItemImpl::~StdWidgetItemImpl()
    +{
    +  containerAddWidgets(0);
    +}
    +
    +WLayoutItem *StdWidgetItemImpl::layoutItem() const
    +{
    +  return item_;
    +}
    +
    +int StdWidgetItemImpl::minimumHeight() const
    +{
    +  return static_cast<int>(item_->widget()->minimumHeight().toPixels());
    +}
    +
    +void StdWidgetItemImpl::containerAddWidgets(WContainerWidget *container)
    +{
    +  if (container)
    +    container->addWidget(item_->widget());
    +  else {
    +    WContainerWidget *wc
    +      = dynamic_cast<WContainerWidget *>(item_->widget()->parent());
    +
    +    if (wc)
    +      wc->removeFromLayout(item_->widget());
    +  }
    +}
    +
    +DomElement *StdWidgetItemImpl::createDomElement(bool fitWidth, bool fitHeight,
    +						WApplication *app)
    +{
    +  WWidget *w = item_->widget();
    +
    +  DomElement *d = w->createSDomElement(app);
    +  DomElement *result = d;
    +
    +  int marginRight = 0, marginBottom = 0;
    +
    +  if (fitWidth)
    +    marginRight = (w->boxPadding(Horizontal) + w->boxBorder(Horizontal)) * 2;
    +
    +  if (fitHeight)
    +    marginBottom = (w->boxPadding(Vertical) + w->boxBorder(Vertical)) * 2;
    +
    +  bool forceDiv
    +    = (fitHeight && d->type() == DomElement_SELECT
    +       && d->getAttribute("size").empty());
    +
    +  if (marginRight || marginBottom || forceDiv) {
    +    result = DomElement::createNew(DomElement_DIV);
    +    result->setProperty(PropertyClass, "Wt-wrapdiv");
    +    std::stringstream style;
    +
    +    if (app->environment().agentIsIElt(9) && !forceDiv) {
    +      style << "margin-top:-1px;";
    +      marginBottom -= 1;
    +    }
    +
    +    if (marginRight)
    +      style << "margin-right:" << marginRight << "px;";
    +
    +    if (marginBottom)
    +      style << "margin-bottom:" << marginBottom << "px;";
    +
    +    result->setProperty(PropertyStyle, style.str());
    +  }
    +
    +  /*
    +   * Known issues:
    +   *  - textarea does not interpret height 100%, and thus it does not
    +   *    work inside the wrapped div, on IE6/7 -> fixed in the JavaScript code
    +   *  - select does not interpret height that is set on IE6
    +   *    it does work on IE7 !
    +   */
    +  if (fitHeight && d->getProperty(PropertyStyleHeight).empty())
    +    if (   d->type() == DomElement_DIV
    +	|| d->type() == DomElement_UL
    +	|| d->type() == DomElement_INPUT
    +	|| d->type() == DomElement_TABLE
    +	|| d->type() == DomElement_TEXTAREA)
    +      d->setProperty(PropertyStyleHeight, "100%");
    +
    +  // on IE, a select is reduced to width 0 when setting width: 100% when nothing
    +  // else in that column takes up space: that is a very bad thing...
    +  if (fitWidth && d->getProperty(PropertyStyleWidth).empty()) {
    +    if ((d->type() == DomElement_BUTTON
    +	 || (d->type() == DomElement_INPUT
    +	     && d->getAttribute("type") != "radio"
    +	     && d->getAttribute("type") != "checkbox")
    +	 || (d->type() == DomElement_SELECT
    +	     && !app->environment().agentIsIE())
    +	 || d->type() == DomElement_TEXTAREA))
    +      d->setProperty(PropertyStyleWidth, "100%");
    +  }
    +
    +  if (result != d)
    +    result->addChild(d);
    +
    +  return result;
    +}
    +
    +void StdWidgetItemImpl::updateAddItem(WLayoutItem *)
    +{
    +  assert(false);
    +}
    +
    +void StdWidgetItemImpl::updateRemoveItem(WLayoutItem *)
    +{
    +  assert(false);
    +}
    +
    +void StdWidgetItemImpl::update(WLayoutItem *)
    +{
    +  assert(false);
    +}
    +
    +void StdWidgetItemImpl::setHint(const std::string& name,
    +				const std::string& value)
    +{
    +  WApplication::instance()->log("error")
    +    << "WWidgetItem: unrecognized hint '" << name << "'";
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/StdWidgetItemImpl.h b/wt-3.1.7a/src/Wt/StdWidgetItemImpl.h
    new file mode 100644
    index 0000000..9eeeb6d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/StdWidgetItemImpl.h
    @@ -0,0 +1,41 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef STD_WIDGET_ITEM_IMPL_H_
    +#define STD_WIDGET_ITEM_IMPL_H_
    +
    +#include "StdLayoutItemImpl.h"
    +
    +namespace Wt {
    +
    +  class WWidgetItem;
    +
    +class StdWidgetItemImpl : public StdLayoutItemImpl
    +{
    +public:
    +  StdWidgetItemImpl(WWidgetItem *item);
    +  virtual ~StdWidgetItemImpl();
    +
    +  virtual int minimumHeight() const;
    +
    +  virtual void updateAddItem(WLayoutItem *);
    +  virtual void updateRemoveItem(WLayoutItem *);
    +  virtual void update(WLayoutItem *);
    +
    +  virtual WLayoutItem *layoutItem() const;
    +  virtual void containerAddWidgets(WContainerWidget *container);
    +  virtual DomElement *createDomElement(bool fitWidth, bool fitHeight,
    +				       WApplication *app);
    +
    +  virtual void setHint(const std::string& name, const std::string& value);
    +
    +private:
    +  WWidgetItem *item_;
    +};
    +
    +}
    +
    +#endif // STD_WIDGET_ITEM_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/SyncLock b/wt-3.1.7a/src/Wt/SyncLock
    new file mode 100644
    index 0000000..c17b418
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/SyncLock
    @@ -0,0 +1,108 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_SYNC_LOCK_H_
    +#define WT_SYNC_LOCK_H_
    +
    +#include <Wt/WGlobal>
    +#include <Wt/WApplication>
    +#include <boost/thread.hpp>
    +
    +namespace Wt {
    +
    +/*! \class SyncLock Wt/SyncLock Wt/SyncLock
    + *  \brief An dead-lock avoidance adaptor for a Boost mutex lock.
    + *
    + * A %SyncLock adapts a Boost mutex lock (such as boost::mutex::scoped_lock),
    + * and provides the same API as the original lock (it derives from it).
    + *
    + * Just as can be expected by a lock, a call to lock() will block until the
    + * thread has exclusive access to the mutex.
    + *
    + * While waiting to acquire the lock, however, the current
    + * Wt::WApplication lock, may be temporarily released in favor of
    + * another helper thread trying to acquire the application lock. Thus,
    + * you need to be aware that when the lock is taken, some other thread
    + * may have modified the current application state.
    + *
    + * A sync lock is useful in the context of a deployment where multiple
    + * (or all) WApplication instances are running in a single process and
    + * communicating with each other (such as the built-in httpd). Then,
    + * this lock adaptor helps in avoiding a dead-lock situation when
    + * applications wants to access a shared resource protected by a
    + * mutex, which communicates to other applications while taking their
    + * update lock. In that case, it is likely that you will also want to
    + * iterate over all "registered" applications while holding the global
    + * mutex, and this creates a natural dead-lock scenario because you
    + * have two mutexes (global mutex, application mutex) which are
    + * sequentially aquired in a different order:
    + *  - application mutex -> global mutex, during an application request
    + *  - global mutex -> application mutex, while propagating events to applications
    + *
    + * The altered behaviour of a call by application <i>A</i> to lock()
    + * is that this application <i>A</i>'s state may be updated by another
    + * thread (e.g. serving application <i>B</i>), which tries to take
    + * <i>A</i>'s update lock.
    + *
    + * The following conventional locking code:
    + * \code
    + *   boost::recursive_mutex::scoped_lock lock(mutex_);
    + * \endcode
    + * is updated to a sync lock, by doing:
    + * \code
    + *   Wt::SyncLock<boost::recursive_mutex::scoped_lock> lock(mutex_);
    + * \endcode
    + */
    +template <class Lock>
    +class SyncLock : public Lock
    +{
    +public:
    +  /*! \brief Creates a RIIA lock.
    +   *
    +   * Initializes and acquires exclusive access to the \p mutex.
    +   */
    +  template <class Mutex>
    +  SyncLock(Mutex& mutex)
    +    : Lock(mutex, boost::defer_lock)
    +  {
    +    lock();
    +  }
    +
    +  /*! \brief Creates a RIIA lock, but defers taking the lock.
    +   *
    +   * Initialize the lock but defers taking the lock.
    +   *
    +   * \sa lock()
    +   */
    +  template <class Mutex>
    +  SyncLock(Mutex& mutex, boost::defer_lock_t)
    +    : Lock(mutex, boost::defer_lock)
    +  { }
    +
    +  /*! \brief Tries to acquire the lock, blocking while waiting.
    +   *
    +   * While an application <i>A</i> is waiting for the lock, its state
    +   * may be updated by another application: another application
    +   * <i>B</i> can succesfully take <i>A's</i> \link
    +   * WApplication::UpdateLock update lock\endlink.
    +   *
    +   * Therefore you need to be prepared to deal with application state
    +   * changes while waiting for the lock.
    +   */
    +  void lock() {
    +    WApplication *app = WApplication::instance();
    +    if (app) {
    +      int id = app->startWaitingAtLock();
    +      Lock::lock();
    +      app->endWaitingAtLock(id);
    +    } else
    +      Lock::lock();
    +  }
    +};
    +
    +}
    +
    +#endif // WT_SYNC_LOCK_H_
    diff --git a/wt-3.1.7a/src/Wt/Test/CMakeLists.txt b/wt-3.1.7a/src/Wt/Test/CMakeLists.txt
    new file mode 100644
    index 0000000..b872e21
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Test/CMakeLists.txt
    @@ -0,0 +1 @@
    +INSTALL_FILES(/include/Wt/Test "^W.*[^C~]$")
    diff --git a/wt-3.1.7a/src/Wt/Test/WTestEnvironment b/wt-3.1.7a/src/Wt/Test/WTestEnvironment
    new file mode 100644
    index 0000000..68413f6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Test/WTestEnvironment
    @@ -0,0 +1,249 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTEST_ENVIRONMENT_H_
    +#define WTEST_ENVIRONMENT_H_
    +
    +#include <string>
    +#include <map>
    +#include <vector>
    +
    +#include <Wt/WEnvironment>
    +#include <Wt/WServer>
    +
    +namespace Wt {
    +
    +class WebController;
    +class Configuration;
    +
    +namespace Test {
    +
    +/*! \class WTestEnvironment Wt/Test/WTestEnvironment Wt/Test/WTestEnvironment
    + *  \brief An environment for testing purposes.
    + *
    + * This environment is useful for use in automated (integration/unit)
    + * tests: you may configure its properties and pass it to the
    + * constructor of an application.
    + *
    + * This is useful for automated test-cases:
    + * \if cpp
    + * \code
    + * void testX() {
    + *   Test::WTestEnvironment environment;
    + *   MyApplication app(environment);
    + *   ...
    + * }
    + * \endcode
    + * \elseif java
    + * \code
    + * void testX() {
    + *   WTestEnvironment environment(new Configuration());
    + *   MyApplication app(environment);
    + *   ...
    + * }
    + * \endcode
    + * \endif
    + *
    + * \sa WEnvironment, WApplication::WApplication(const WEnvironment&)
    + */
    +class WT_API WTestEnvironment : public WEnvironment
    +{
    +public:
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Default constructor.
    +   *
    +   * Constructs a test environment that resembles FireFox 3.0 with default
    +   * settings.
    +   *
    +   * The <i>applicationPath</i> is the simulated deployment path. The
    +   * configuration file points to a wt_config.xml configuration file.
    +   * The <i>type</i> indicates the application type.
    +   *
    +   * After construction, but before passing it to the constructor of a
    +   * WApplication, you can change any of the environment properties using
    +   * the setter methods.
    +   */
    +  WTestEnvironment(const std::string& applicationPath = "/",
    +		   const std::string& configurationFile = "",
    +		   EntryPointType type = Application);
    +#else
    +  /*! \brief Default constructor.
    +   *
    +   * Constructs a test environment that resembles FireFox 3.0 with default
    +   * settings.
    +   *
    +   * After construction, but before passing it to the constructor of a
    +   * WApplication, you can change any of the environment properties using
    +   * the setter methods.
    +   */
    +  WTestEnvironment(Configuration *configuration,
    +		   EntryPointType type = Application);
    +#endif // WT_TARGET_JAVA
    +
    +  /**! \brief Destructor.
    +   */
    +  ~WTestEnvironment();
    +
    +  /** \brief Sets parameters to the application.
    +   *
    +   * The default value is an empty map.
    +   *
    +   * \sa getParameterMap()
    +   */
    +  void setParameterMap(const Http::ParameterMap& parameters);
    +
    +  /** \brief Sets HTTP cookies.
    +   *
    +   * The default value is an empty map.
    +   *
    +   * \sa cookies()
    +   */
    +  void setCookies(const CookieMap& cookies);
    +
    +  /** \brief Sets a HTTP header value.
    +   *
    +   * The default value is no headers.
    +   *
    +   * \sa headerValue()
    +   */
    +  void setHeaderValue(const std::string& value);
    +
    +  /** \brief Sets whether cookies are supported.
    +   *
    +   * The default value is <i>true</i>.
    +   *
    +   * \sa supportsCookies()
    +   */
    +  void setSupportsCookies(bool enabled);
    +
    +  /** \brief Sets whether AJAX is supported.
    +   *
    +   * The default value is <i>true</i>.
    +   *
    +   * \sa ajax()
    +   */
    +  void setAjax(bool enabled);
    +
    +  /** \brief Sets the display's DPI scale.
    +   *
    +   * The default value is 1.
    +   *
    +   * \sa dpiScale()
    +   */
    +  void setDpiScale(double dpiScale);
    +
    +  /** \brief Sets the locale.
    +   *
    +   * The default value is "en".
    +   *
    +   * \sa locale()
    +   */
    +  void setLocale(const WT_LOCALE& locale);
    +
    +  /** \brief Sets the host name.
    +   *
    +   * The default value is "localhost".
    +   *
    +   * \sa hostName()
    +   */
    +  void setHostName(const std::string& hostName);
    +
    +  /** \brief Sets the URL scheme.
    +   *
    +   * The default value is "http".
    +   *
    +   * \sa urlScheme()
    +   */
    +  void setUrlScheme(const std::string& scheme);
    +
    +  /** \brief Sets the user agent.
    +   *
    +   * The default value is no "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009060309 Ubuntu/9.04 (jaunty) Firefox/3.0.11".
    +   *
    +   * \sa userAgent()
    +   */
    +  void setUserAgent(const std::string& userAgent);
    +
    +  /** \brief Sets the referer.
    +   *
    +   * The default value is "".
    +   *
    +   * \sa referer()
    +   */
    +  void setReferer(const std::string& referer);
    +
    +  /** \brief Sets the accept header.
    +   *
    +   * \htmlonly
    +   * The default value is
    +   * "text/html,application/xhtml+xml,application/xml;q=0.9,*<span>/</span>*;q=0.8".
    +   * \endhtmlonly
    +   *
    +   * \sa accept()
    +   */
    +  void setAccept(const std::string& accept);
    +
    +  /** \brief Sets the server signature.
    +   *
    +   * The default value is "None (WTestEnvironment)".
    +   *
    +   * \sa serverSignature()
    +   */
    +  void setServerSignature(const std::string& signature);
    +
    +  /** \brief Sets the server software.
    +   *
    +   * The default value is "None (WTestEnvironment)".
    +   *
    +   * \sa serverSoftware()
    +   */
    +  void setServerSoftware(const std::string& software);
    +
    +  /** \brief Sets the server admin.
    +   *
    +   * The default value is "your@onyourown.here".
    +   *
    +   * \sa serverAdmin()
    +   */
    +  void setServerAdmin(const std::string& serverAdmin);
    +
    +  /** \brief Sets the client address.
    +   *
    +   * The default value is "127.0.0.1".
    +   *
    +   * \sa clientAddress()
    +   */
    +  void setClientAddress(const std::string& clientAddress);
    +
    +  /** \brief Sets the initial internal path.
    +   *
    +   * The default value is "".
    +   *
    +   * \sa internalPath()
    +   */
    +  void setInternalPath(const std::string& internalPath);
    +
    +  /** \brief Sets the content type.
    +   *
    +   * The default value is XHTML1.
    +   *
    +   * \sa contentType()
    +   */
    +  void setContentType(ContentType contentType);
    +
    +private:
    +  Configuration *configuration_;
    +  boost::shared_ptr<WebSession> theSession_;
    +  WebController *controller_;
    +
    +  void init(EntryPointType type);
    +};
    +
    +}
    +
    +}
    +
    +#endif // WTEST_ENVIRONMENT_H_
    diff --git a/wt-3.1.7a/src/Wt/Test/WTestEnvironment.C b/wt-3.1.7a/src/Wt/Test/WTestEnvironment.C
    new file mode 100644
    index 0000000..e94f13e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/Test/WTestEnvironment.C
    @@ -0,0 +1,177 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "WebController.h"
    +#include "Configuration.h"
    +#include "WebSession.h"
    +#include "Wt/Test/WTestEnvironment"
    +
    +namespace Wt {
    +
    +  namespace Test {
    +
    +#ifndef WT_TARGET_JAVA
    +WTestEnvironment::WTestEnvironment(const std::string& applicationPath,
    +				   const std::string& configurationFile,
    +				   EntryPointType type)
    +{
    +  configuration_ = new Configuration(applicationPath, "", configurationFile,
    +				     Configuration::WtHttpdServer,
    +				     "Wt: initializing test environment");
    +
    +  controller_ = new WebController(*configuration_, 0, 0);
    +
    +  init(type);
    +}
    +
    +#else
    +
    +class TestController : public WebController {
    +public:
    +  TestController(Configuration *configuration);
    +};
    +
    +WTestEnvironment::WTestEnvironment(Configuration *configuration,
    +				   EntryPointType type)
    +{
    +  std::vector<std::string> dummy;
    +
    +  configuration_ = configuration;
    +  controller_ = new TestController(configuration);
    +
    +  init(type);
    +}
    +#endif
    +
    +void WTestEnvironment::init(EntryPointType type)
    +{
    +  session_ = new WebSession(controller_, "testwtd", type, "", 0, this);
    +  theSession_.reset(session_);
    +
    +  new WebSession::Handler(theSession_, true);
    +
    +  doesAjax_ = true;
    +  doesCookies_ = true;
    +  dpiScale_ = 1;
    +  contentType_ = XHTML1;
    +
    +  urlScheme_ = "http";
    +  referer_ = "";
    +  accept_ = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
    +  serverSignature_ = "None (WTestEnvironment)";
    +  serverSoftware_ = serverSignature_;
    +  serverAdmin_ = "your@onyourown.here";
    +  pathInfo_ = "";
    +
    +  setUserAgent("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) "
    +	       "Gecko/2009060309 Ubuntu/9.04 (jaunty) Firefox/3.0.11");
    +
    +  host_ = "localhost";
    +  clientAddress_ = "127.0.0.1";
    +  locale_ = WT_LOCALE("en");
    +}
    +
    +WTestEnvironment::~WTestEnvironment()
    +{
    +  delete WebSession::Handler::instance();
    +  theSession_.reset();
    +
    +  delete controller_;
    +  delete configuration_;
    +}
    +
    +void WTestEnvironment::setParameterMap(const Http::ParameterMap& parameters)
    +{
    +  parameters_ = parameters;
    +}
    +
    +void WTestEnvironment::setCookies(const CookieMap& cookies)
    +{
    +  cookies_ = cookies;
    +}
    +
    +void WTestEnvironment::setHeaderValue(const std::string& value)
    +{
    +  // FIXME
    +}
    +
    +void WTestEnvironment::setSupportsCookies(bool enabled)
    +{
    +  doesCookies_ = enabled;
    +}
    +
    +void WTestEnvironment::setAjax(bool enabled)
    +{
    +  doesAjax_ = enabled;
    +}
    +
    +void WTestEnvironment::setDpiScale(double dpiScale)
    +{
    +  dpiScale_ = dpiScale;
    +}
    +
    +void WTestEnvironment::setLocale(const WT_LOCALE& locale)
    +{
    +  locale_ = locale;
    +}
    +
    +void WTestEnvironment::setHostName(const std::string& hostName)
    +{
    +  host_ = hostName;
    +}
    +
    +void WTestEnvironment::setUrlScheme(const std::string& scheme)
    +{
    +  urlScheme_ = scheme;
    +}
    +
    +void WTestEnvironment::setReferer(const std::string& referer)
    +{
    +  referer_ = referer;
    +}
    +
    +void WTestEnvironment::setAccept(const std::string& accept)
    +{
    +  accept_ = accept;
    +}
    +
    +void WTestEnvironment::setServerSignature(const std::string& signature)
    +{
    +  serverSignature_ = signature;
    +}
    +
    +void WTestEnvironment::setServerSoftware(const std::string& software)
    +{
    +  serverSignature_ = software;
    +}
    +
    +void WTestEnvironment::setServerAdmin(const std::string& serverAdmin)
    +{
    +  serverAdmin_ = serverAdmin;
    +}
    +
    +void WTestEnvironment::setClientAddress(const std::string& clientAddress)
    +{
    +  clientAddress_ = clientAddress;
    +}
    +
    +void WTestEnvironment::setInternalPath(const std::string& internalPath)
    +{
    +  WEnvironment::setInternalPath(internalPath);
    +}
    +
    +void WTestEnvironment::setContentType(ContentType contentType)
    +{
    +  contentType_ = contentType;
    +}
    +
    +void WTestEnvironment::setUserAgent(const std::string& userAgent)
    +{
    +  WEnvironment::setUserAgent(userAgent);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractArea b/wt-3.1.7a/src/Wt/WAbstractArea
    new file mode 100644
    index 0000000..dd6cd4e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractArea
    @@ -0,0 +1,395 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_AREA_H_
    +#define WABSTRACT_AREA_H_
    +
    +#include <Wt/WAnchor> // for AnchorTarget
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +    class AreaWidget;
    +  }
    +
    +/*! \class WAbstractArea Wt/WAbstractArea Wt/WAbstractArea
    + *  \brief Abstract base class for interactive areas in a widget.
    + *
    + * Use an %WAbstractArea (or rather, one of its concrete
    + * implementations), to define interactivity that applies on a part of
    + * a WImage or WPaintedWidget. The area may be defined using different
    + * shapes through WRectArea, WCircleArea or WPolygonArea.
    + *
    + * \sa WImage::addArea(), WPaintedWidget::addArea()
    + */
    +class WT_API WAbstractArea : public WObject
    +{
    +public:
    +  /*! \brief Destructor.
    +   *
    +   * The are is automatically removed from the WImage or
    +   * WPaintedWidget to which it was added.
    +   *
    +   * \sa WImage::removeArea(), WPaintedWidget::removeArea()
    +   */
    +  virtual ~WAbstractArea();
    +
    +  /*! \brief Specifies that this area specifies a hole for another area.
    +   *
    +   * When set to \c true, this area will define an area that does not
    +   * provide interactivity. When it preceeds other, overlapping,
    +   * areas, it acts as if it cuts a hole in those areas.
    +   *
    +   * The default value is \c false.
    +   *
    +   * \sa isHole()
    +   */
    +  void setHole(bool hole);
    +
    +  /*! \brief Returns whether this area specifies a hole.
    +   *
    +   * \sa setHole()
    +   */
    +  bool isHole() const { return hole_; }
    +
    +  /*! \brief Sets the destination URL.
    +   *
    +   * By setting a destination URL, the area behaves like a
    +   * WAnchor.
    +   *
    +   * By default, no destination URL is set (\p ref = "").
    +   *
    +   * This method should not be used when the area has been pointed to
    +   * a dynamically generated resource using setResource().
    +   *
    +   * \sa setResource()
    +   *
    +   * \note Even when no destination URL is set, in some circumstances,
    +   *       a identity URL ('#') will be set on the underlying HTML
    +   *       &lt;area&gt; element (see also setCursor()).
    +   */
    +  void setRef(const std::string& ref);
    +
    +  /*! \brief Returns the the destination URL.
    +   *
    +   * When the area refers to a resource, the current resource URL is
    +   * returned.
    +   *
    +   * \sa setRef(), WResource::url()
    +   */
    +  const std::string ref() const;
    +
    +  /*! \brief Set a destination resource.
    +   *
    +   * A resource specifies application-dependent content, which may be
    +   * generated by your application on demand.
    +   *
    +   * By setting a resource, the area behaves like a WAnchor that
    +   * refers to the resource \p resource. The resource may be
    +   * cleared by passing \p resource = \c 0.
    +   *
    +   * The area does not assume ownership of the resource.
    +   *
    +   * \sa setRef()
    +   */
    +  void setResource(WResource *resource);
    +
    +  /*! \brief Returns the destination resource.
    +   *
    +   * Returns \c 0 if no resource has been set.
    +   *
    +   * \sa setResource()
    +   */
    +  WResource *resource() const;
    +
    +  /*! \brief Specifies the location where the referred content should be
    +   *         displayed.
    +   *
    +   * This configures the location where referred content should be
    +   * displayed, that was specified using setRef() or setResource().
    +   *
    +   * By default, the reference is displayed in the application
    +   * (Wt::TargetSelf). When the destination is an HTML document, the
    +   * application is replaced with the new document. When the reference
    +   * is a document that cannot be displayed in the browser, it is
    +   * offered for download or opened using an external program,
    +   * depending on browser settings.
    +   *
    +   * By setting \p target to Wt::TargetNewWindow, the destination
    +   * is displayed in a new browser window or tab.
    +   *
    +   * \sa setRef(), setResource(), target()
    +   */
    +  void setTarget(AnchorTarget target);
    +
    +  /*! \brief Returns the location where the referred content should be
    +   *         displayed.
    +   *
    +   * \sa setTarget()
    +   */
    +  AnchorTarget target() const;
    +
    +  /*! \brief Sets an alternate text.
    +   *
    +   * The alternate text should provide a fallback for browsers that do
    +   * not display an image. If no sensible fallback text can be
    +   * provided, an empty text is preferred over nonsense.
    +   *
    +   * This should not be confused with toolTip() text, which provides
    +   * additional information that is displayed when the mouse hovers
    +   * over the area.
    +   *
    +   * The default alternate text is an empty text ("").
    +   *
    +   * \sa alternateText()
    +   */
    +  void setAlternateText(const WString& text);
    +
    +  /*! \brief Returns the alternate text.
    +   *
    +   * \sa setAlternateText()
    +   */
    +  const WString alternateText() const;
    +
    +  /*! \brief Sets the tooltip.
    +   *
    +   * The tooltip is displayed when the cursor hovers over the area.
    +   */
    +  void setToolTip(const WString& text);
    +
    +  /*! \brief Returns the tooltip text.
    +   *
    +   * \sa setToolTip()
    +   */
    +  WString toolTip() const;
    +
    +  /*! \brief Defines a style class.
    +   */
    +  void setStyleClass(const WT_USTRING& styleClass);
    +  void setStyleClass(const char *styleClass);
    +
    +  /*! \brief Returns the style class.
    +   *
    +   * \sa setStyleClass()
    +   */
    +  WT_USTRING styleClass() const;
    +
    +  /*! \brief Adds a style class.
    +   */
    +  void addStyleClass(const WT_USTRING& styleClass, bool force = false);
    +
    +  /*! \brief Removes a style class.
    +   */
    +  void removeStyleClass(const WT_USTRING& styleClass, bool force = false);
    +
    +  /*! \brief Sets the cursor.
    +   *
    +   * This sets the mouse cursor that is shown when the mouse pointer
    +   * is over the area. Most browsers only support PointingHandCursor,
    +   * which is activated by a non-empty ref.
    +   *
    +   * \sa setRef()
    +   */
    +  void setCursor(Cursor cursor);
    +
    +  /*! \brief Returns the cursor.
    +   *
    +   * \sa setCursor()
    +   */
    +  Cursor cursor() const;
    +
    +  WImage *image() const;
    +
    +private:
    +  Impl::AreaWidget *impl_;
    +
    +public:
    +  /*! \brief Event signal emitted when a keyboard key is pushed down.
    +   *
    +   * The keyWentDown signal is the first signal emitted when a key is
    +   * pressed (before the keyPressed() signal). Unlike keyPressed()
    +   * however it is also emitted for modifier keys (such as "shift",
    +   * "control", ...) or keyboard navigation keys that do not have a
    +   * corresponding character.
    +   *
    +   * \sa keyPressed(), keyWentUp()
    +   */
    +  EventSignal<WKeyEvent>& keyWentDown();
    +
    +  /*! \brief Event signal emitted when a "character" was entered.
    +   *
    +   * The keyPressed signal is emitted when a key is pressed, and a
    +   * character is entered. Unlike keyWentDown(), it is emitted only
    +   * for key presses that result in a character being entered, and
    +   * thus not for modifier keys or keyboard navigation keys.
    +   *
    +   * \sa keyWentDown()
    +   */
    +  EventSignal<WKeyEvent>& keyPressed();
    +    
    +  /*! \brief Event signal emitted when a keyboard key is released.
    +   *
    +   * This is the counter-part of the keyWentDown() event. Every
    +   * key-down has its corresponding key-up.
    +   *
    +   * \sa keyWentDown()
    +   */
    +  EventSignal<WKeyEvent>& keyWentUp();
    +
    +  /*! \brief Event signal emitted when enter was pressed.
    +   *
    +   * This signal is emitted when the Enter or Return key was pressed.
    +   *
    +   * \sa keyPressed(), Key_Enter
    +   */
    +  EventSignal<>& enterPressed();
    +
    +  /*! \brief Event signal emitted when escape was pressed.
    +   *
    +   * This signal is emitted when the Escape key was pressed.
    +   *
    +   * \sa keyPressed(), Key_Escape
    +   */
    +  EventSignal<>& escapePressed();
    +
    +  /*! \brief Event signal emitted when a mouse key was clicked on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the event details contain
    +   * invalid information.
    +   */
    +  EventSignal<WMouseEvent>& clicked();
    +
    +  /*! \brief Event signal emitted when a mouse key was double clicked
    +   *         on this widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& doubleClicked();
    +
    +  /*! \brief Event signal emitted when a mouse key was pushed down on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentDown();
    +
    +  /*! \brief Event signal emitted when a mouse key was released on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentUp();
    +
    +  /*! \brief Event signal emitted when the mouse went out of this widget.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentOut();
    +    
    +  /*! \brief Event signal emitted when the mouse entered this widget.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentOver();
    +
    +  /*! \brief Event signal emitted when the mouse moved over this widget.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseMoved();
    +
    +  /*! \brief Event signal emitted when the mouse is dragged over this widget.
    +   *
    +   * The mouse event contains information on the button(s) currently
    +   * pressed. If multiple buttons are currently pressed, only the
    +   * button with smallest enum value is returned.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseDragged();
    +
    +  /*! \brief Event signal emitted when the mouse scroll wheel was used.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::wheelDelta() wheel delta\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWheel();
    +
    +private:
    +  struct AnchorImpl {
    +    std::string   ref_;
    +    WResource    *resource_;
    +    AnchorTarget  target_;
    +    WString       altText_;
    +
    +    AnchorImpl() : resource_(0) { }
    +  };
    +
    +  bool        hole_;
    +  AnchorImpl *anchor_;
    +
    +  void createAnchorImpl();
    +  void resourceChanged();
    +
    +protected:
    +  WAbstractArea();
    +
    +  virtual void updateDom(DomElement& element, bool all);
    +  void repaint();
    +
    +private:
    +  WInteractWidget *impl();
    +
    +  void setImage(WImage *image);
    +  static WAbstractArea *areaForImpl(WWidget *w);
    +
    +  friend class WImage;
    +  friend class Impl::AreaWidget;
    +};
    +
    +}
    +
    +#endif // WABSTRACT_AREA_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractArea.C b/wt-3.1.7a/src/Wt/WAbstractArea.C
    new file mode 100644
    index 0000000..21f9e62
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractArea.C
    @@ -0,0 +1,344 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAbstractArea"
    +#include "Wt/WApplication"
    +#include "Wt/WResource"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +
    +#include "DomElement.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +
    +    class AreaWidget : public WInteractWidget
    +    {
    +    public:
    +      AreaWidget(WAbstractArea *facade)
    +	: facade_(facade)
    +      { }
    +
    +      ~AreaWidget()
    +      {
    +	if (facade_) {
    +	  facade_->impl_ = 0;
    +	  delete facade_;
    +	}
    +      }
    +
    +      void repaint(WFlags<RepaintFlag> flags = RepaintAll) {
    +	WInteractWidget::repaint(RepaintPropertyAttribute);
    +      }
    +
    +      WAbstractArea *facade() const { return facade_; }
    +
    +    private:
    +      WAbstractArea *facade_;
    +
    +    protected:
    +      virtual void updateDom(DomElement& element, bool all)
    +      {
    +	facade_->updateDom(element, all);
    +
    +	WInteractWidget::updateDom(element, all);
    +
    +	if (!element.getProperty(PropertyStyleCursor).empty()
    +	    && !wApp->environment().agentIsGecko()
    +	    && element.getAttribute("href").empty())
    +	  element.setAttribute("href", "#");
    +      }
    +
    +      virtual DomElementType domElementType() const {
    +	return DomElement_AREA;
    +      }
    +
    +      friend class Wt::WAbstractArea;
    +    };
    +
    +  }
    +
    +WAbstractArea::WAbstractArea()
    +  : impl_(new Impl::AreaWidget(this)),
    +    hole_(false),
    +    anchor_(0)
    +{ }
    +
    +WAbstractArea::~WAbstractArea()
    +{
    +  if (impl_) {
    +    WImage *i = image();
    +
    +    if (i)
    +      i->removeArea(this);
    +
    +    delete anchor_;
    +
    +    impl_->facade_ = 0;
    +    delete impl_;
    +  }
    +}
    +
    +EventSignal<WKeyEvent>& WAbstractArea::keyWentDown()
    +{
    +  return impl_->keyWentDown();
    +}
    +
    +EventSignal<WKeyEvent>& WAbstractArea::keyPressed()
    +{
    +  return impl_->keyPressed();
    +}
    +
    +EventSignal<WKeyEvent>& WAbstractArea::keyWentUp()
    +{
    +  return impl_->keyWentUp();
    +}
    +
    +EventSignal<>& WAbstractArea::enterPressed()
    +{
    +  return impl_->enterPressed();
    +}
    +
    +EventSignal<>& WAbstractArea::escapePressed()
    +{
    +  return impl_->escapePressed();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::clicked()
    +{
    +  return impl_->clicked();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::doubleClicked()
    +{
    +  return impl_->doubleClicked();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseWentDown()
    +{
    +  return impl_->mouseWentDown();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseWentUp()
    +{
    +  return impl_->mouseWentUp();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseWentOut()
    +{
    +  return impl_->mouseWentOut();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseWentOver()
    +{
    +  return impl_->mouseWentOver();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseMoved()
    +{
    +  return impl_->mouseMoved();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseDragged()
    +{
    +  return impl_->mouseDragged();
    +}
    +
    +EventSignal<WMouseEvent>& WAbstractArea::mouseWheel()
    +{
    +  return impl_->mouseWheel();
    +}
    +
    +void WAbstractArea::setImage(WImage *image)
    +{
    +  impl_->setParent(image);
    +}
    +
    +WImage *WAbstractArea::image() const
    +{
    +  return dynamic_cast<WImage *>(impl_->parent());
    +}
    +
    +void WAbstractArea::setRef(const std::string& ref)
    +{
    +  createAnchorImpl();
    +
    +  anchor_->ref_ = ref;
    +
    +  repaint();
    +}
    +
    +const std::string WAbstractArea::ref() const
    +{
    +  if (anchor_)
    +    return anchor_->ref_;
    +  else
    +    return std::string();
    +}
    +
    +void WAbstractArea::setHole(bool hole)
    +{
    +  hole_ = hole;
    +
    +  repaint();
    +}
    +
    +void WAbstractArea::setResource(WResource *resource)
    +{
    +  createAnchorImpl();
    +
    +  anchor_->resource_ = resource;
    +  anchor_->resource_->dataChanged()
    +    .connect(this, &WAbstractArea::resourceChanged);
    +  setRef(resource->url());
    +}
    +
    +WResource *WAbstractArea::resource() const
    +{
    +  if (anchor_)
    +    return anchor_->resource_;
    +  else
    +    return 0;
    +}
    +
    +void WAbstractArea::setTarget(AnchorTarget target)
    +{
    +  createAnchorImpl();
    +
    +  anchor_->target_ = target;
    +
    +  repaint();
    +}
    +
    +AnchorTarget WAbstractArea::target() const
    +{
    +  if (anchor_)
    +    return anchor_->target_;
    +  else
    +    return TargetSelf;
    +}
    +
    +void WAbstractArea::setAlternateText(const WString& text)
    +{
    +  createAnchorImpl();
    +
    +  anchor_->altText_ = text;
    +
    +  repaint();
    +}
    +
    +const WString WAbstractArea::alternateText() const
    +{
    +  if (anchor_)
    +    return anchor_->altText_;
    +  else
    +    return WString();
    +}
    +
    +void WAbstractArea::setToolTip(const WString& text)
    +{
    +  impl_->setToolTip(text);
    +}
    +
    +WString WAbstractArea::toolTip() const
    +{
    +  return impl_->toolTip();
    +}
    +
    +void WAbstractArea::setStyleClass(const WT_USTRING& styleClass)
    +{
    +  impl_->setStyleClass(styleClass);
    +}
    +
    +void WAbstractArea::setStyleClass(const char *styleClass)
    +{
    +  impl_->setStyleClass(styleClass);
    +}
    +
    +WT_USTRING WAbstractArea::styleClass() const
    +{
    +  return impl_->styleClass();
    +}
    +
    +void WAbstractArea::addStyleClass(const WT_USTRING& styleClass, bool force)
    +{
    +  impl_->addStyleClass(styleClass, force);
    +}
    +
    +void WAbstractArea::removeStyleClass(const WT_USTRING& styleClass, bool force)
    +{
    +  impl_->removeStyleClass(styleClass, force);
    +}
    +
    +void WAbstractArea::setCursor(Cursor cursor)
    +{
    +  impl_->decorationStyle().setCursor(cursor);
    +}
    +
    +Cursor WAbstractArea::cursor() const
    +{
    +  return impl_->decorationStyle().cursor();
    +}
    +
    +void WAbstractArea::createAnchorImpl()
    +{
    +  if (!anchor_) {
    +    anchor_ = new AnchorImpl();
    +    anchor_->resource_ = 0;
    +    anchor_->target_ = TargetSelf;
    +  }
    +}
    +
    +void WAbstractArea::resourceChanged()
    +{
    +  setRef(anchor_->resource_->url());
    +}
    +
    +void WAbstractArea::repaint()
    +{
    +  impl_->repaint();
    +}
    +
    +void WAbstractArea::updateDom(DomElement& element, bool all)
    +{
    +  if (!hole_ && anchor_) {
    +    element.setAttribute("href", WWebWidget::fixRelativeUrl(anchor_->ref_));
    +
    +    switch (anchor_->target_) {
    +    case TargetSelf:
    +      break;
    +    case TargetThisWindow:
    +      element.setProperty(PropertyTarget, "_top");
    +      break;
    +    case TargetNewWindow:
    +      element.setProperty(PropertyTarget, "_blank");
    +    }
    +    element.setAttribute("alt", anchor_->altText_.toUTF8());
    +  } else {
    +    element.setAttribute("alt", "");
    +    if (hole_)
    +      element.setAttribute("nohref", "nohref");
    +  }
    +}
    +
    +WInteractWidget *WAbstractArea::impl()
    +{
    +  return impl_;
    +}
    +
    +WAbstractArea *WAbstractArea::areaForImpl(WWidget *w)
    +{
    +  Impl::AreaWidget *aw = dynamic_cast<Impl::AreaWidget *>(w);
    +
    +  if (!aw)
    +    throw WtException("WAbstractArea::areaForImpl could not dynamic_cast?");
    +
    +  return aw->facade();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemDelegate b/wt-3.1.7a/src/Wt/WAbstractItemDelegate
    new file mode 100644
    index 0000000..d09f8b5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemDelegate
    @@ -0,0 +1,186 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACTITEMDELEGATE_H_
    +#define WABSTRACTITEMDELEGATE_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WFlags>
    +#include <Wt/WSignal>
    +#include <Wt/WValidator>
    +
    +#include <boost/any.hpp>
    +
    +namespace Wt {
    +
    +/*! \brief Enumeration that specifies an option for rendering a view item.
    + *
    + * \sa WAbstractItemDelegate::update()
    + */
    +enum ViewItemRenderFlag {
    +  RenderSelected = 0x1,  //!< Render as selected
    +  RenderEditing = 0x2,   //!< Render in editing mode
    +  RenderFocused = 0x4,   //!< Render (the editor) focused
    +  RenderInvalid = 0x8    //!< Render as invalid
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(ViewItemRenderFlag)
    +
    +class WAbstractItemModel;
    +class WWidget;
    +class WModelIndex;
    +
    +/*! \class WAbstractItemDelegate Wt/WAbstractItemDelegate Wt/WAbstractItemDelegate
    + *  \brief Abstract delegate class for rendering an item in a MVC view.
    + *
    + * Rendering of an item in a WAbstractItemView is delegated to an
    + * implementation of this delegate class. The default implementation
    + * used by Wt's item views is WItemDelegate. To provide specialized
    + * rendering support, you can reimplement this class, and provide a
    + * specialized delegate to the view for rendering items.
    + *
    + * As a delegate is used for rendering multiple items, the class should
    + * not keep state about one specific item.
    + *
    + * A delegate may provide editing support by instantiating an editor
    + * when update() is called with the Wt::RenderEditing flag. In that
    + * case, you will also need to implement editState() and
    + * setEditState() to support virtual scrolling and setModelData() to
    + * save the edited value to the model. For an example, see the
    + * WItemDelegate.
    + *
    + * \sa WAbstractItemView::setItemDelegateForColumn()
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractItemDelegate : public WObject
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WAbstractItemDelegate(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WAbstractItemDelegate();
    +
    +  /*! \brief Creates or updates a widget that renders an item.
    +   *
    +   * The item is specified by its model \p index, which also
    +   * indicates the model. If an existing widget already renders the
    +   * item, but needs to be updated, it is passed as the \p widget
    +   * parameter. You may decide to create a new widget, in which case
    +   * you are responsible to delete the previous \p widget if it is
    +   * not reused.
    +   *
    +   * When \p widget is \c 0, a new widget needs to be created.
    +   *
    +   * The returned widget should be a widget that responds properly to
    +   * be given a height, width and style class. In practice, that means
    +   * it cannot have a border or margin, and thus cannot be a
    +   * WFormWidget since those widgets typically have built-in borders
    +   * and margins. If you want to return a form widget (for editing the item),
    +   * you should wrap it in a container widget.
    +   *
    +   * The \p flags parameter indicates options for rendering the
    +   * item.
    +   */
    +  virtual WWidget *update(WWidget *widget, const WModelIndex& index,
    +			  WFlags<ViewItemRenderFlag> flags) = 0;
    +
    +  /*! \brief Updates the model index of a widget.
    +   *
    +   * This method is invoked by the view when due to row/column insertions or
    +   * removals, the index has shifted.
    +   *
    +   * You should reimplement this method only if you are storing the
    +   * model index in the \p widget, to update the stored model index.
    +   *
    +   * The default implementation does nothing.
    +   */
    +  virtual void updateModelIndex(WWidget *widget, const WModelIndex& index);
    +
    +  /*! \brief Returns the current edit state.
    +   *
    +   * Because a View may support virtual scrolling in combination with
    +   * editing, it may happen that the view decides to delete the editor
    +   * widget while the user is editing. To allow to reconstruct the editor
    +   * in its original state, the View will therefore ask for the editor
    +   * to serialize its state in a boost::any.
    +   *
    +   * When the view decides to close an editor and save its value back
    +   * to the model, he will first call editState() and then
    +   * setModelData().
    +   *
    +   * The default implementation assumes a read-only delegate, and
    +   * returns a boost::any().
    +   *
    +   * \sa setEditState(), setModelData()
    +   */
    +  virtual boost::any editState(WWidget *widget) const;
    +
    +  /*! \brief Sets the editor data from the editor state.
    +   *
    +   * When the View scrolls back into view an item that was being edited,
    +   * he will use setEditState() to allow the editor to restore its current
    +   * editor state.
    +   *
    +   * The default implementation assumes a read-only delegate and does
    +   * nothing.
    +   *
    +   * \sa editState()
    +   */
    +  virtual void setEditState(WWidget *widget, const boost::any& value) const;
    +
    +  /*! \brief Returns whether the edited value is valid.
    +   *
    +   * The default implementation does nothing and returns Valid.
    +   *
    +   * \sa WValidator::validate()
    +   */
    +  virtual WValidator::State validate(const WModelIndex& index,
    +				     const boost::any& editState) const;
    +
    +  /*! \brief Saves the edited data to the model.
    +   *
    +   * The View will use this method to save the edited value to the model.
    +   * The \p editState is first fetched from the editor using editState().
    +   *
    +   * The default implementation assumes a read-only delegate does
    +   * nothing.
    +   */
    +  virtual void setModelData(const boost::any& editState,
    +			    WAbstractItemModel *model,
    +			    const WModelIndex& index) const;
    +
    +  /*! \brief %Signal which indicates that an editor needs to be closed.
    +   *
    +   * The delegate should emit this signal when it decides for itself
    +   * that it should be closed (e.g. because the user confirmed the
    +   * edited value or cancelled the editing). The View will then rerender
    +   * the item if needed.
    +   *
    +   * The second boolean argument passed to the signal is a flag which
    +   * indicates whether the editor feels that the value should be saved or
    +   * cancelled.
    +   *
    +   * \sa WAbstractItemView::closeEditor()
    +   */
    +  Signal<WWidget *, bool>& closeEditor() { return closeEditor_; }
    +
    +  /*! \brief %Signal which indicates that an editor needs to be closed.
    +   *
    +   * \sa closeEditor()
    +   */
    +  const Signal<WWidget *, bool>& closeEditor() const { return closeEditor_; }
    +
    +private:
    +  Signal<WWidget *, bool> closeEditor_;
    +};
    +
    +}
    +
    +#endif // WABSTRACTITEMDELEGATE_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemDelegate.C b/wt-3.1.7a/src/Wt/WAbstractItemDelegate.C
    new file mode 100644
    index 0000000..ea6f82a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemDelegate.C
    @@ -0,0 +1,44 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAbstractItemDelegate"
    +#include "Wt/WModelIndex"
    +
    +namespace Wt {
    +
    +WAbstractItemDelegate::WAbstractItemDelegate(WObject *parent)
    +  : WObject(parent),
    +    closeEditor_(this)
    +{ }
    +
    +WAbstractItemDelegate::~WAbstractItemDelegate()
    +{ }
    +
    +void WAbstractItemDelegate::updateModelIndex(WWidget *widget,
    +					     const WModelIndex& index)
    +{ }
    +
    +boost::any WAbstractItemDelegate::editState(WWidget *widget) const
    +{
    +  return boost::any();
    +}
    +
    +void WAbstractItemDelegate::setEditState(WWidget *widget,
    +					 const boost::any& value) const
    +{ }
    +
    +void WAbstractItemDelegate::setModelData(const boost::any& editState,
    +					 WAbstractItemModel *model,
    +					 const WModelIndex& index) const
    +{ }
    +
    +  WValidator::State WAbstractItemDelegate::validate(const WModelIndex& index,
    +						    const boost::any& editState) const
    +{
    +  return WValidator::Valid;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemModel b/wt-3.1.7a/src/Wt/WAbstractItemModel
    new file mode 100644
    index 0000000..06522f6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemModel
    @@ -0,0 +1,892 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_ITEM_MODEL_H_
    +#define WABSTRACT_ITEM_MODEL_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WModelIndex>
    +#include <Wt/WSignal>
    +#include <Wt/WGlobal>
    +#include <boost/any.hpp>
    +#include <Wt/WBoostAny>
    +
    +namespace Wt {
    +
    +  class WDropEvent;
    +
    +/*! \class WAbstractItemModel Wt/WAbstractItemModel Wt/WAbstractItemModel
    + *  \brief An abstract model for use with %Wt's view classes.
    + *
    + * This abstract model is used by several %Wt view widgets as data models.
    + *
    + * It may model data for both tree-like and table-like view
    + * widgets. Data is therefore organized in a hierarchical structure of
    + * tables, where every item stores data and items in column 0 can be
    + * the parent of a nested table of data. Every data item is uniquely
    + * identified by their row, column and parent index, and items may be
    + * referenced using the helper class WModelIndex.
    + *
    + * Each item may provide data for one or more \link Wt::ItemDataRole
    + * roles\endlink, and indicate options using \link Wt::ItemFlag
    + * flags\endlink. The different roles can be used to model different
    + * aspects of an item (its text value, an icon, style class), or to
    + * hold auxiliary custom information. The flags provide information to
    + * the View on possible interactivity.
    + *
    + * \if cpp
    + * Top level data have an \link WModelIndex::isValid() invalid\endlink
    + * parent WModelIndex.
    + * \endif
    + * \if java
    + * Top level data have a \c null parent WModelIndex.
    + * \endif
    + *
    + * \if cpp
    + * The data itself is of type <b>boost::any</b>, which can either be
    + * empty, or hold any type of data. Depending on the role however,
    + * view classes may expect certain types of data (e.g. a string for
    + * Wt::StyleClassRole).
    + *
    + * Wt's standard view classes can display (Wt::DisplayRole) the following data:
    + *
    + *  - strings of type WString or std::string
    + *  - WDate, WTime, WDateTime
    + *  - standard C++ numeric types (int, double, etc...)
    + *  - bool
    + *
    + * The view classes know how to interpret data of these types \link
    + * Wt::asString() as a string\endlink or \link Wt::asNumber() as a
    + * number\endlink.
    + *
    + * \elseif java
    + *
    + * The data itself is of type Object, which can either be \c null, or be
    + * any type of data. Depending on the role however, view classes may
    + * expect certain types of data (e.g. numerical types for charts) or
    + * will convert the data to a string (e.g. for Wt::DisplayRole).
    + *
    + * \endif
    + * 
    + * \if cpp
    + * Conversion between native types and boost::any is done like this:
    + * <ul>
    + *  <li>Conversion from <i>v</i> (of type <i>Type</i>) to boost::any <i>a</i>
    + *   (for setData() and setHeaderData())
    + *    <pre>
    + * boost::any <i>a</i> = boost::any(<i>v</i>);
    + *    </pre>
    + *   For example:
    + *    <pre>
    + * WDate d(1976,6,14);
    + * model->setData(row, column, boost::any(d));
    + *    </pre>
    + * 
    + *  </li>
    + *  <li>Conversion from boost::any <i>a</i> to <i>v</i> (of type <i>Type</i>)
    +     (for data() and headerData()):
    + *    <pre>
    + * <i>Type v</i> = boost::any_cast<<i>Type</i>>(<i>a</i>);
    + *    </pre>
    + *   For example:
    + *    <pre>
    + * WDate d = boost::any_cast<WDate>(model->data(row, column));
    + *    </pre>
    + *  </li>
    + *  <li>Checking if a boost::any <i>a</i> holds a value:</li>
    + *    <pre>
    + * if (!<i>a</i>.empty()) {
    + *   ...
    + * }
    + *    </pre>
    + *  </li>
    + *  <li>Determining the value type of a boost::any <i>a</i>, for example:</li>
    + *    <pre>
    + * if (<i>a</i>.type() == typeid(double)) {
    + *   ...
    + * }
    + *    </pre>
    + *  </li>
    + * </ul>
    + *
    + * \endif 
    + *
    + * To implement a custom model, you need to reimplement the following methods:
    + *  - index() and parent() methods that allow one to navigate the model
    + *  - columnCount() and rowCount() to specify the top level geometry and the
    + *    nested geometry at every item
    + *  - data() to return the data for an item
    + *  - optionally, headerData() to return row and column header data
    + *  - optionally, flags() to indicate data options
    + *
    + * \if cpp
    + * A crucial point in implementing a hierarchical model is to decide
    + * how to reference an index in terms of an internal pointer
    + * (WModelIndex::internalPointer()) or internal id
    + * (WModelIndex::internalId()). Other than the top-level index, which
    + * is special since it is referenced using an \link
    + * WModelIndex::isValid() invalid\endlink index, every index with
    + * children must be identifiable using this number or pointer. For
    + * example, in the WStandardItemModel, the internal pointer points to
    + * the parent WStandardItem. For table models, the internal pointer
    + * plays no role, since only the toplevel index has children.
    + * \elseif java
    + * A crucial point in implementing a hierarchical model is to decide
    + * how to reference an index in terms of an internal pointer
    + * (WModelIndex::internalPointer()).
    + * Other than the top-level index, which is special since it is 
    + * referenced using an invalid index, every index with
    + * children must be identifiable using this object. For
    + * example, in the WStandardItemModel, the internal pointer points to
    + * the parent WStandardItem. For table models, the internal pointer
    + * plays no role, since only the toplevel index has children.
    + * \endif
    + *
    + * If you want to support editing of the model, then you need to
    + * indicate this support using a Wt::ItemIsEditable flag, and
    + * reimplement setData(). View classes will use the \link Wt::EditRole
    + * EditRole\endlink to read and update the data for the editor.
    + *
    + * When the model's data has been changed, the model must emit the
    + * dataChanged() signal.
    + *
    + * Finally, there is a generic interface for insertion of new data or
    + * removal of data (changing the geometry), although this interface is
    + * not yet used by any View class:
    + *
    + * - insertRows()
    + * - insertColumns()
    + * - removeRows()
    + * - removeColumns()
    + *
    + * Alternatively, you can provide your own API for changing the
    + * model. In either case it is important that you call the
    + * corresponding protected member functions which will emit the
    + * relevant signals so that views can adapt themselves to the new
    + * geometry.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractItemModel : public WObject
    +{
    +public:
    +  /*! \brief Data map.
    +   *
    +   * A map of data, indexed by a role.
    +   */
    +#ifndef WT_TARGET_JAVA
    +  typedef std::map<int, boost::any> DataMap;
    +#else
    +  typedef std::treemap<int, boost::any> DataMap;
    +#endif
    +
    +  /*! \brief Creates a new data model.
    +   */
    +  WAbstractItemModel(WObject *parent = 0);
    +
    +  virtual ~WAbstractItemModel();
    +
    +  /*! \brief Returns the number of columns.
    +   *
    +   * This returns the number of columns at index \p parent.
    +   *
    +   * \sa rowCount()
    +   */
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const = 0;
    +
    +  /*! \brief Returns the number of rows.
    +   *
    +   * This returns the number of rows at index \p parent.
    +   *
    +   * \sa columnCount()
    +   */
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const = 0;
    +
    +  // not yet used by views
    +  virtual bool canFetchMore(const WModelIndex& parent) const;
    +
    +  // not yet used by views
    +  virtual void fetchMore(const WModelIndex& parent);
    +
    +  /*! \brief Returns the flags for an item.
    +   *
    +   * The default implementation returns \link Wt::ItemIsSelectable
    +   * ItemIsSelectable\endlink.
    +   *
    +   * \sa Wt::ItemFlag
    +   */
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the flags for a header.
    +   *
    +   * The default implementation returns no flags set.
    +   *
    +   * \sa Wt::HeaderFlag
    +   */
    +  virtual WFlags<HeaderFlag> headerFlags(int section,
    +					 Orientation orientation = Horizontal)
    +    const;
    +
    +  /*! \brief Returns if there are children at an index.
    +   *
    +   * Returns \c true when rowCount(index) > 0 and columnCount(index) > 0.
    +   *
    +   * \sa rowCount(), columnCount()
    +   */
    +  virtual bool hasChildren(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the parent for a model index.
    +   *
    +   * An implementation should use createIndex() to create a model
    +   * index that corresponds to the parent of a given index.
    +   *
    +   * \sa index()
    +   */
    +  virtual WModelIndex parent(const WModelIndex& index) const = 0;
    +
    +  /*! \brief Returns data at a specific model index.
    +   *
    +   * Return data for a given role at a given index.
    +   *
    +   * \sa flags(), headerData(), setData()
    +   */
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const = 0;
    +
    +  /*! \brief Returns all data at a specific index.
    +   *
    +   * This is a convenience function that returns a map with data
    +   * corresponding to all standard roles.
    +   *
    +   * \sa data()
    +   */
    +  virtual DataMap itemData(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the row or column header data.
    +   *
    +   * When \p orientation is \link Wt::Horizontal
    +   * Horizontal\endlink, \p section is a column number, when
    +   * \p orientation is \link Wt::Vertical Vertical\endlink,
    +   * \p section is a row number.
    +   *
    +   * \sa data(), setHeaderData()
    +   */
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +  /*! \brief Returns the child index for the given row and column.
    +   *
    +   * When implementing this method, you can use createIndex() to
    +   * create an index that corresponds to the item at \p row and
    +   * \p column within \p parent.
    +   *
    +   * If the location is invalid (out of bounds at the parent), then an
    +   * invalid index must be returned.
    +   *
    +   * \sa parent()
    +   */
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex())
    +    const = 0;
    +
    +  /*! \brief Returns an index list for data items that match.
    +   *
    +   * Returns an index list of data items that match, starting at
    +   * start, and searching further in that column. If flags specifies
    +   * \link Wt::MatchWrap MatchWrap \endlink then the search wraps around 
    +   * from the start. If hits is not -1, then at most that number of 
    +   * hits are returned.
    +   */
    +  virtual WModelIndexList match(const WModelIndex& start,
    +				int role,
    +				const boost::any& value,
    +				int hits = -1,
    +				WFlags<MatchFlag> flags
    +				  = WFlags<MatchFlag>(MatchStartsWith
    +						      | MatchWrap))
    +    const;
    +
    +  /*! \brief Returns the data item at the given column and row.
    +   *
    +   * This is a convenience method, and is equivalent to:
    +   * \code
    +   * index(row, column, parent).data(role)
    +   * \endcode
    +   *
    +   * \sa index(), data()
    +   */
    +  boost::any data(int row, int column, int role = DisplayRole,
    +		  const WModelIndex& parent = WModelIndex()) const;
    +
    +  /*! \brief Returns if an index at the given position is valid
    +   *         (i.e. falls within the column-row bounds).
    +   *
    +   * Equivalent to:
    +   * \code
    +   * return row >= 0 && column >= 0
    +   *        && row < rowCount(parent) && column < columnCount(parent);
    +   * \endcode
    +   *
    +   * \sa rowCount(), columnCount()
    +   */
    +  virtual bool hasIndex(int row, int column,
    +			const WModelIndex& parent = WModelIndex()) const;
    +
    +  /*! \brief Inserts one or more columns.
    +   *
    +   * In models that support column insertion, this inserts \c count
    +   * columns, starting at \c column, and returns \c true if the
    +   * operation was successful. The new columns are inserted under \p
    +   * parent.
    +   *
    +   * The default implementation returns \c false.
    +   *
    +   * The model implementation must call beginInsertColumns() and
    +   * endInsertColumns() before and after the operation whenever its
    +   * geometry is changed by inserting columns. This emits signals for
    +   * views to properly react to these changes.
    +   *
    +   * \sa insertRows(), removeColumns(), beginInsertColumns(), endInsertColumns()
    +   */
    +  virtual bool insertColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Inserts one or more rows.
    +   *
    +   * In models that support row insertion, this inserts \c count rows,
    +   * starting at \c row, and returns \c true if the operation was
    +   * successful. The new rows are inserted under \p parent.
    +   *
    +   * If parent had no children, then a single column is added with \c
    +   * count rows.
    +   *
    +   * The default implementation returns \c false.
    +   *
    +   * The model implementation must call beginInsertRows() and
    +   * endInsertRows() before and after the operation whenever its
    +   * geometry is changed by inserting rows. This emits signals for
    +   * views to properly react to these changes.
    +   *
    +   * \sa insertColumns(), removeRows(), beginInsertRows(), endInsertRows()
    +   */
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes columns.
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * The default implementation returns \c false.
    +   *
    +   * The model implementation must call beginRemoveColumns() and
    +   * endRemoveColumns() before and after the operation whenever its
    +   * geometry is changed by removing columns. This emits signals for
    +   * views to properly react to these changes.
    +   *
    +   * \sa removeRows(), insertColumns(), beginRemoveColumns(), endRemoveColumns()
    +   */
    +  virtual bool removeColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes rows.
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * The default implementation returns \c false.
    +   *
    +   * The model implementation must call beginRemoveRows() and
    +   * endRemoveRows() before and after the operation whenever its
    +   * geometry is changed by removing rows. This emits signals for
    +   * views to properly react to these changes.
    +   *
    +   * \sa removeColumns(), insertRows(), beginRemoveRows(), endRemoveRows()
    +   */
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Sets data at the given model index.
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * The default implementation returns \c false.
    +   *
    +   * The model implementation must emit the dataChanged() signal after
    +   * data was changed.
    +   *
    +   * \sa data()
    +   */
    +  virtual bool setData(const WModelIndex& index, const boost::any& value,
    +		       int role = EditRole);
    +
    +  /*! \brief Sets data at the given model index.
    +   *
    +   * This is a convenience function that sets data for all roles at once.
    +   *
    +   * \sa setData()
    +   */
    +  virtual bool setItemData(const WModelIndex& index, const DataMap& values);
    +
    +  /*! \brief Sets header data for a column or row.
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa headerData()
    +   */
    +  virtual bool setHeaderData(int section, Orientation orientation,
    +			     const boost::any& value,
    +			     int role = EditRole);
    +
    +  /*! \brief Sets column header data.
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa setHeaderData(int, Orientation, const boost::any&, int)
    +   */
    +  bool setHeaderData(int section, const boost::any& value);
    +
    +  /*! \brief Sorts the model according to a particular column.
    +   *
    +   * If the model supports sorting, then it should emit the
    +   * layoutAboutToBeChanged() signal, rearrange its items, and
    +   * afterwards emit the layoutChanged() signal.
    +   *
    +   * \sa layoutAboutToBeChanged(), layoutChanged()
    +   */
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +  /*! \brief Expands a column.
    +   *
    +   * Expands a column. This may only be called by a view when the
    +   * Wt::ColumnIsCollapsed flag is set.
    +   *
    +   * The default implementation does nothing.
    +   *
    +   * \sa WAggregateProxyModel
    +   */
    +  virtual void expandColumn(int column);
    +
    +  /*! \brief Collapses a column.
    +   *
    +   * Collapses a column. This may only be called by a view when the
    +   * Wt::ColumnIsExpandedLeft or Wt::ColumnIsExpandedRight flag is set.
    +   *
    +   * The default implementation does nothing.
    +   *
    +   * \sa WAggregateProxyModel
    +   */
    +  virtual void collapseColumn(int column);
    +
    +  /*! \brief Converts a model index to a raw pointer that remains valid
    +   *         while the model's layout is changed. 
    +   *
    +   * Use this method to temporarily save model indexes while the model's
    +   * layout is changed by for example a sorting operation.
    +   *
    +   * The default implementation returns \c 0, which indicates that the
    +   * index cannot be converted to a raw pointer. If you reimplement
    +   * this method, you also need to reimplemnt fromRawIndex().
    +   *
    +   * \sa layoutAboutToBeChanged, sort(), fromRawIndex()
    +   */
    +  virtual void *toRawIndex(const WModelIndex& index) const;
    +
    +  /*! \brief Converts a raw pointer to a model index. 
    +   *
    +   * Use this method to create model index from temporary raw
    +   * pointers. It is the reciproce method of toRawIndex().
    +   *
    +   * You can return an invalid modelindex if the rawIndex no longer points
    +   * to a valid item because of the layout change.
    +   *
    +   * \sa toRawIndex()
    +   */
    +  virtual WModelIndex fromRawIndex(void *rawIndex) const;
    +
    +  /*! \brief Returns a mime-type for dragging a set of indexes.
    +   *
    +   * This method returns a mime-type that describes dragging of a selection
    +   * of items.
    +   *
    +   * The drop event will indicate a \link WItemSelectionModel
    +   * selection model\endlink for this abstract item model as \link
    +   * WDropEvent::source() source\endlink.
    +   *
    +   * The default implementation returns a mime-type for generic
    +   * drag&drop support between abstract item models.
    +   *
    +   * \sa acceptDropMimeTypes()
    +   */
    +  virtual std::string mimeType() const;
    +
    +  /*! \brief Returns a list of mime-types that could be accepted for a
    +   *         drop event.
    +   *
    +   * The default implementation only accepts drag&drop support between
    +   * abstract item models.
    +   *
    +   * \sa mimeType()
    +   */
    +  virtual std::vector<std::string> acceptDropMimeTypes() const;
    +
    +  /*! \brief Handles a drop event.
    +   *
    +   * The default implementation only handles generic drag&drop between
    +   * abstract item models. Source item data is copied (but not the
    +   * source item's flags).
    +   *
    +   * The location in the model is indicated by the \p row and
    +   * \p column within the \p parent index. If \p row is
    +   * -1, then the item is appended to the \p parent. Otherwise,
    +   * the item is inserted at or copied over the indicated item (and
    +   * subsequent rows). When \p action is a \link Wt::MoveAction
    +   * MoveAction\endlink, the original items are deleted from the
    +   * source model.
    +   *
    +   * You may want to reimplement this method if you want to handle
    +   * other mime-type data, or if you want to refine how the drop event
    +   * of an item selection must be interpreted.
    +   *
    +   * \note Currently, only row selections are handled by the default
    +   *       implementation.
    +   *
    +   * \sa mimeType(), WItemSelectionModel
    +   */
    +  virtual void dropEvent(const WDropEvent& e, DropAction action,
    +			 int row, int column, const WModelIndex& parent);
    +
    +  /*! \brief Inserts one column.
    +   *
    +   * This is a convenience method that adds a single column, and is
    +   * equivalent to:
    +   * \code
    +   * insertColumns(column, 1, parent);
    +   * \endcode
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa insertColumns()
    +   */
    +  bool insertColumn(int column, const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Inserts one row.
    +   *
    +   * This is a convenience method that adds a single row, and is
    +   * equivalent to:
    +   * \code
    +   * insertRows(row, 1, parent);
    +   * \endcode
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa insertRows()
    +   */
    +  bool insertRow(int row, const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes one column.
    +   *
    +   * This is a convenience method that removes a single column, and is
    +   * equivalent to:
    +   * \code
    +   * removeColumns(column, 1, parent);
    +   * \endcode
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa removeColumns()
    +   */
    +  bool removeColumn(int column, const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes one row.
    +   *
    +   * This is a convenience method that removes a single row, and is
    +   * equivalent to:
    +   * \code
    +   * removeRows(row, 1, parent);
    +   * \endcode
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa removeRows()
    +   */
    +  bool removeRow(int row, const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Sets data at the given row and column.
    +   *
    +   * This is a convience method, and is equivalent to:
    +   * \code
    +   * setData(index(row, column, parent), value, role);
    +   * \endcode
    +   *
    +   * Returns \c true if the operation was successful.
    +   *
    +   * \sa setData(), index()
    +   */
    +  bool setData(int row, int column, const boost::any& value,
    +	       int role = EditRole, const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief %Signal emitted before a number of columns will be inserted.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the column numbers that the first and last column will have when
    +   * inserted.
    +   *
    +   * \sa columnsInserted(), beginInsertColumns()
    +   */
    +  virtual Signal<WModelIndex, int, int>& columnsAboutToBeInserted()
    +    { return columnsAboutToBeInserted_; }
    +
    +  /*! \brief %Signal emitted before a number of columns will be removed.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the column numbers of the first and last column that will be
    +   * removed.
    +   *
    +   * \sa columnsRemoved(), beginRemoveColumns()
    +   */
    +  virtual Signal<WModelIndex, int, int>& columnsAboutToBeRemoved()
    +    { return columnsAboutToBeRemoved_; }
    + 
    +  /*! \brief %Signal emitted after a number of columns were inserted.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the column numbers of the first and last column that were
    +   * inserted.
    +   *
    +   * \sa columnsAboutToBeInserted(), endInsertColumns()
    +   */
    +  virtual Signal<WModelIndex, int, int>& columnsInserted()
    +    { return columnsInserted_; }
    +
    +  /*! \brief %Signal emitted after a number of columns were removed.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the column numbers of the first and last column that were removed.
    +   *
    +   * \sa columnsAboutToBeRemoved(), endRemoveColumns()
    +   */
    +  virtual Signal<WModelIndex, int, int>& columnsRemoved()
    +    { return columnsRemoved_; }
    +
    +  /*! \brief %Signal emitted before a number of rows will be inserted.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the row numbers that the first and last row will have when
    +   * inserted.
    +   *
    +   * \sa rowsInserted(), beginInsertRows()
    +   */
    +  virtual Signal<WModelIndex, int, int>& rowsAboutToBeInserted()
    +    { return rowsAboutToBeInserted_; }
    +
    +  /*! \brief %Signal emitted before a number of rows will be removed.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the row numbers of the first and last row that will be
    +   * removed.
    +   *
    +   * \sa rowsRemoved(), beginRemoveRows()
    +   */
    +  virtual Signal<WModelIndex, int, int>& rowsAboutToBeRemoved()
    +    { return rowsAboutToBeRemoved_; }
    + 
    +  /*! \brief %Signal emitted after a number of rows were inserted.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the row numbers of the first and last row that were inserted.
    +   *
    +   * \sa rowsAboutToBeInserted(), endInsertRows()
    +   */
    +  virtual Signal<WModelIndex, int, int>& rowsInserted()
    +    { return rowsInserted_; }
    +
    +  /*! \brief %Signal emitted after a number of rows were removed.
    +   *
    +   * The first argument is the parent index. The two integer arguments
    +   * are the row numbers of the first and last row that were removed.
    +   *
    +   * \sa rowsAboutToBeRemoved(), endRemoveRows()
    +   */
    +  virtual Signal<WModelIndex, int, int>& rowsRemoved()
    +    { return rowsRemoved_; }
    +
    +  /*! \brief %Signal emitted when some data was changed.
    +   *
    +   * The two arguments are the model indexes of the top-left and bottom-right
    +   * data items that span the rectangle of changed data items.
    +   *
    +   * \sa setData()
    +   */
    +  virtual Signal<WModelIndex, WModelIndex>& dataChanged()
    +    { return dataChanged_; }
    +
    +  /*! \brief %Signal emitted when some header data was changed.
    +   *
    +   * The first argument indicates the orientation of the header, and
    +   * the two integer arguments are the row or column numbers of the
    +   * first and last header item of which the value was changed.
    +   *
    +   * \sa setHeaderData()
    +   */
    +  virtual Signal<Orientation, int, int>& headerDataChanged()
    +    { return headerDataChanged_; }
    +
    +  /*! \brief %Signal emitted when the layout is about to be changed.
    +   *
    +   * A layout change reorders the data in the model, but columns are
    +   * preserved. Model indexes are invalidated by a layout change, but
    +   * indexes may be ported across a layout change by using the
    +   * toRawIndex() and fromRawIndex() methods.
    +   *
    +   * \sa layoutChanged(), toRawIndex(), fromRawIndex()
    +   */
    +  virtual Signal<>& layoutAboutToBeChanged() { return layoutAboutToBeChanged_; }
    +
    +  /*! \brief %Signal emitted when the layout is changed.
    +   *
    +   * \sa layoutAboutToBeChanged()
    +   */
    +  virtual Signal<>& layoutChanged() { return layoutChanged_; }
    +
    +  /*! \brief %Signal emitted when the model was reset.
    +   *
    +   * A model reset invalidates all existing data, and the model may change
    +   * its entire geometry (column count, row count).
    +   *
    +   * \sa reset()
    +   */
    +  virtual Signal<>& modelReset() { return modelReset_; }
    +
    +protected:
    +  /*! \brief Resets the model and invalidate any data.
    +   *
    +   * Informs any attached view that all data in the model was invalidated,
    +   * and the model's data should be reread.
    +   *
    +   * This causes the modelReset() signal to be emitted.
    +   */
    +  void reset();
    +
    +  /*! \brief Creates a model index for the given row and column.
    +   *
    +   * Use this method to create a model index. \p ptr is an
    +   * internal pointer that may be used to associate the index with
    +   * particular model data.
    +   *
    +   * \sa WModelIndex::internalPointer()
    +   */
    +  WModelIndex createIndex(int row, int column, void *ptr) const;
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Creates a model index for the given row and column.
    +   *
    +   * Use this method to create a model index. \p id is an
    +   * internal id that may be used to associate the index with
    +   * particular model data.
    +   *
    +   * \sa WModelIndex::internalId()
    +   */
    +  WModelIndex createIndex(int row, int column, ::uint64_t id) const;
    +
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Method to be called before inserting columns.
    +   *
    +   * If your model supports insertion of columns, then you should call
    +   * this method before inserting one or more columns, and
    +   * endInsertColumns() afterwards. These methods emit the necessary
    +   * signals to allow view classes to update themselves.
    +   *
    +   * \sa endInsertColumns(), insertColumns(), columnsAboutToBeInserted
    +   */  
    +  void beginInsertColumns(const WModelIndex& parent, int first, int last);
    +
    +  /*! \brief Method to be called before inserting rows.
    +   *
    +   * If your model supports insertion of rows, then you should call
    +   * this method before inserting one or more rows, and
    +   * endInsertRows() afterwards. These methods emit the necessary
    +   * signals to allow view classes to update themselves.
    +   *
    +   * \sa endInsertRows(), insertRows(), rowsAboutToBeInserted
    +   */  
    +  void beginInsertRows(const WModelIndex& parent, int first, int last);
    +
    +  /*! \brief Method to be called before removing columns.
    +   *
    +   * If your model supports removal of columns, then you should call
    +   * this method before removing one or more columns, and
    +   * endRemoveColumns() afterwards. These methods emit the necessary
    +   * signals to allow view classes to update themselves.
    +   *
    +   * \sa endRemoveColumns(), removeColumns(), columnsAboutToBeRemoved
    +   */
    +  void beginRemoveColumns(const WModelIndex& parent, int first, int last);
    +
    +  /*! \brief Method to be called before removing rows.
    +   *
    +   * If your model supports removal of rows, then you should call this
    +   * method before removing one or more rows, and endRemoveRows()
    +   * afterwards. These methods emit the necessary signals to allow
    +   * view classes to update themselves.
    +   *
    +   * \sa endRemoveRows(), removeRows(), rowsAboutToBeRemoved
    +   */  
    +  void beginRemoveRows(const WModelIndex& parent, int first, int last);
    +
    +  /*! \brief Method to be called after inserting columns.
    +   *
    +   * \sa beginInsertColumns()
    +   */
    +  void endInsertColumns();
    +
    +  /*! \brief Method to be called after inserting rows.
    +   *
    +   * \sa beginInsertRows()
    +   */  
    +  void endInsertRows();
    +
    +  /*! \brief Method to be called after removing columns.
    +   *
    +   * \sa beginRemoveColumns()
    +   */  
    +  void endRemoveColumns();
    +
    +  /*! \brief Method to be called after removing rows.
    +   *
    +   * \sa beginRemoveRows()
    +   */
    +  void endRemoveRows();
    +
    +private:
    +  int first_, last_;
    +  WModelIndex parent_;
    +
    +  Signal<WModelIndex, int, int> columnsAboutToBeInserted_;
    +  Signal<WModelIndex, int, int> columnsAboutToBeRemoved_;
    +  Signal<WModelIndex, int, int> columnsInserted_;
    +  Signal<WModelIndex, int, int> columnsRemoved_;
    +  Signal<WModelIndex, int, int> rowsAboutToBeInserted_;
    +  Signal<WModelIndex, int, int> rowsAboutToBeRemoved_;
    +  Signal<WModelIndex, int, int> rowsInserted_;
    +  Signal<WModelIndex, int, int> rowsRemoved_;
    +  Signal<WModelIndex, WModelIndex> dataChanged_;
    +  Signal<Orientation, int, int> headerDataChanged_;
    +  Signal<> layoutAboutToBeChanged_;
    +  Signal<> layoutChanged_;
    +  Signal<> modelReset_;
    +
    +  static void copyData(const WAbstractItemModel *source,
    +		       const WModelIndex& sIndex,
    +		       WAbstractItemModel *destination,
    +		       const WModelIndex& dIndex);
    +
    +  friend class WAbstractProxyModel;
    +};
    +
    +}
    +
    +#endif // WABSTRACT_ITEM_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemModel.C b/wt-3.1.7a/src/Wt/WAbstractItemModel.C
    new file mode 100644
    index 0000000..c0e5bb2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemModel.C
    @@ -0,0 +1,412 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WModelIndex"
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WItemSelectionModel"
    +#include "Wt/WWebWidget"
    +
    +#include "Utils.h"
    +
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +namespace {
    +  const char *DRAG_DROP_MIME_TYPE = "application/x-wabstractitemmodelselection";
    +}
    +
    +namespace Wt {
    +
    +WAbstractItemModel::WAbstractItemModel(WObject *parent)
    +  : WObject(parent),
    +    columnsAboutToBeInserted_(this),
    +    columnsAboutToBeRemoved_(this),
    +    columnsInserted_(this),
    +    columnsRemoved_(this),
    +    rowsAboutToBeInserted_(this),
    +    rowsAboutToBeRemoved_(this),
    +    rowsInserted_(this),
    +    rowsRemoved_(this),
    +    dataChanged_(this),
    +    headerDataChanged_(this),
    +    layoutAboutToBeChanged_(this),
    +    layoutChanged_(this),
    +    modelReset_(this)
    +{ }
    +
    +WAbstractItemModel::~WAbstractItemModel()
    +{ }
    +
    +bool WAbstractItemModel::canFetchMore(const WModelIndex& parent) const
    +{
    +  return false;
    +}
    +
    +void WAbstractItemModel::fetchMore(const WModelIndex& parent)
    +{ }
    +
    +WFlags<ItemFlag> WAbstractItemModel::flags(const WModelIndex& index) const
    +{
    +  return ItemIsSelectable;
    +}
    +
    +WFlags<HeaderFlag> WAbstractItemModel::headerFlags(int section,
    +						   Orientation orientation)
    +  const
    +{
    +  return 0;
    +}
    +
    +bool WAbstractItemModel::hasChildren(const WModelIndex& index) const
    +{
    +  return rowCount(index) > 0 && columnCount(index) > 0;
    +}
    +
    +bool WAbstractItemModel::hasIndex(int row, int column,
    +				  const WModelIndex& parent) const
    +{
    +  return (row >= 0
    +	  && column >= 0
    +	  && row < rowCount(parent)
    +	  && column < columnCount(parent));
    +}
    +
    +WAbstractItemModel::DataMap
    +WAbstractItemModel::itemData(const WModelIndex& index) const
    +{
    +  DataMap result;
    +
    +  if (index.isValid()) {
    +    for (int i = 0; i <= UrlRole; ++i)
    +      result[i] = data(index, i);
    +    result[UserRole] = data(index, UserRole);
    +  }
    +
    +  return result;
    +}
    +
    +boost::any WAbstractItemModel::data(int row, int column, int role,
    +				    const WModelIndex& parent) const
    +{
    +  return data(index(row, column, parent), role);
    +}
    +
    +boost::any WAbstractItemModel::headerData(int section,
    +					  Orientation orientation,
    +					  int role) const
    +{
    +  if (role == LevelRole)
    +    return 0;
    +  else
    +    return boost::any();
    +}
    +
    +void WAbstractItemModel::sort(int column, SortOrder order)
    +{ }
    +
    +void WAbstractItemModel::expandColumn(int column)
    +{ }
    +
    +void WAbstractItemModel::collapseColumn(int column)
    +{ }
    +
    +bool WAbstractItemModel::insertColumns(int column, int count,
    +				       const WModelIndex& parent)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::insertRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::removeColumns(int column, int count,
    +				       const WModelIndex& parent)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::removeRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::setData(const WModelIndex& index,
    +				 const boost::any& value, int role)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::setHeaderData(int section, Orientation orientation,
    +				       const boost::any& value, int role)
    +{
    +  return false;
    +}
    +
    +bool WAbstractItemModel::setHeaderData(int section, const boost::any& value)
    +{
    +  return setHeaderData(section, Horizontal, value);
    +}
    +
    +bool WAbstractItemModel::setItemData(const WModelIndex& index,
    +				     const DataMap& values)
    +{
    +  bool result = true;
    +
    +  bool wasBlocked = dataChanged().isBlocked();
    +  dataChanged().setBlocked(true);
    +
    +  for (DataMap::const_iterator i = values.begin(); i != values.end(); ++i)
    +    // if (i->first != EditRole)
    +      if (!setData(index, i->second, i->first))
    +	result = false;
    +
    +  dataChanged().setBlocked(wasBlocked);
    +  dataChanged().emit(index, index);
    +
    +  return result;
    +}
    +
    +bool WAbstractItemModel::insertColumn(int column, const WModelIndex& parent)
    +{
    +  return insertColumns(column, 1, parent);
    +}
    +
    +bool WAbstractItemModel::insertRow(int row, const WModelIndex& parent)
    +{
    +  return insertRows(row, 1, parent);
    +}
    +
    +bool WAbstractItemModel::removeColumn(int column, const WModelIndex& parent)
    +{
    +  return removeColumns(column, 1, parent);
    +}
    +
    +bool WAbstractItemModel::removeRow(int row, const WModelIndex& parent)
    +{
    +  return removeRows(row, 1, parent);
    +}
    +
    +bool WAbstractItemModel::setData(int row, int column, const boost::any& value,
    +				 int role, const WModelIndex& parent)
    +{
    +  WModelIndex i = index(row, column, parent);
    +
    +  if (i.isValid())
    +    return setData(i, value, role);
    +  else
    +    return false;
    +}
    +
    +void WAbstractItemModel::reset()
    +{
    +  modelReset_.emit();
    +}
    +
    +WModelIndex WAbstractItemModel::createIndex(int row, int column, void *ptr)
    +  const
    +{
    +  return WModelIndex(row, column, this, ptr);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WModelIndex WAbstractItemModel::createIndex(int row, int column, ::uint64_t id)
    +  const
    +{
    +  return WModelIndex(row, column, this, id);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void *WAbstractItemModel::toRawIndex(const WModelIndex& index) const
    +{
    +  return 0;
    +}
    +
    +WModelIndex WAbstractItemModel::fromRawIndex(void *rawIndex) const
    +{
    +  return WModelIndex();
    +}
    +
    +std::string WAbstractItemModel::mimeType() const
    +{
    +  return DRAG_DROP_MIME_TYPE;
    +}
    +
    +std::vector<std::string> WAbstractItemModel::acceptDropMimeTypes() const
    +{
    +  std::vector<std::string> result;
    +
    +  result.push_back(DRAG_DROP_MIME_TYPE);
    +
    +  return result;
    +}
    +
    +void WAbstractItemModel::copyData(const WAbstractItemModel *source,
    +				  const WModelIndex& sIndex,
    +				  WAbstractItemModel *destination,
    +				  const WModelIndex& dIndex)
    +{
    +  DataMap values = destination->itemData(dIndex);
    +  for (DataMap::const_iterator i = values.begin(); i != values.end(); ++i)
    +    destination->setData(dIndex, boost::any(), i->first);
    +  
    +  destination->setItemData(dIndex, source->itemData(sIndex));
    +}
    +
    +void WAbstractItemModel::dropEvent(const WDropEvent& e, DropAction action,
    +				   int row, int column,
    +				   const WModelIndex& parent)
    +{
    +  // TODO: For now, we assumes selectionBehavior() == RowSelection !
    +
    +  WItemSelectionModel *selectionModel
    +    = dynamic_cast<WItemSelectionModel *>(e.source());
    +  if (selectionModel) {
    +    WAbstractItemModel *sourceModel = selectionModel->model();
    +
    +    /*
    +     * (1) Insert new rows (or later: cells ?)
    +     */
    +    if (action == MoveAction || row == -1) {
    +      if (row == -1)
    +	row = rowCount(parent);
    +
    +      insertRows(row, selectionModel->selectedIndexes().size(), parent);
    +    }
    +
    +    /*
    +     * (2) Copy data
    +     */
    +    WModelIndexSet selection = selectionModel->selectedIndexes();
    +
    +    int r = row;
    +    for (WModelIndexSet::const_iterator i = selection.begin();
    +	 i != selection.end(); ++i) {
    +      WModelIndex sourceIndex = *i;
    +      if (selectionModel->selectionBehavior() == SelectRows) {
    +	WModelIndex sourceParent = sourceIndex.parent();
    +
    +	for (int col = 0; col < sourceModel->columnCount(sourceParent); ++col) {
    +	  WModelIndex s = sourceModel->index(sourceIndex.row(), col,
    +					     sourceParent);
    +	  WModelIndex d = index(r, col, parent);
    +	  copyData(sourceModel, s, this, d);
    +	}
    +
    +	++r;
    +      } else {
    +	  
    +      }
    +    }
    +
    +    /*
    +     * (3) Remove original data
    +     */
    +    if (action == MoveAction) {
    +      while (!selectionModel->selectedIndexes().empty()) {
    +	WModelIndex i = Utils::last(selectionModel->selectedIndexes());
    +
    +	sourceModel->removeRow(i.row(), i.parent());
    +      }
    +    }
    +  }
    +}
    +
    +void WAbstractItemModel::beginInsertColumns(const WModelIndex& parent, 
    +					    int first, int last)
    +{
    +  first_ = first;
    +  last_ = last;
    +  parent_ = parent;
    +
    +  columnsAboutToBeInserted().emit(parent_, first, last);
    +}
    +
    +void WAbstractItemModel::endInsertColumns()
    +{
    +  columnsInserted().emit(parent_, first_, last_);
    +}
    +
    +void WAbstractItemModel::beginInsertRows(const WModelIndex& parent,
    +					 int first, int last)
    +{
    +  first_ = first;
    +  last_ = last;
    +  parent_ = parent;
    +
    +  rowsAboutToBeInserted().emit(parent, first, last);
    +}
    +
    +void WAbstractItemModel::endInsertRows()
    +{
    +  rowsInserted().emit(parent_, first_, last_);
    +}
    +
    +void WAbstractItemModel::beginRemoveColumns(const WModelIndex& parent,
    +					    int first, int last)
    +{
    +  first_ = first;
    +  last_ = last;
    +  parent_ = parent;
    +
    +  columnsAboutToBeRemoved().emit(parent, first, last);
    +}
    +
    +void WAbstractItemModel::endRemoveColumns()
    +{
    +  columnsRemoved().emit(parent_, first_, last_);
    +}
    +
    +void WAbstractItemModel::beginRemoveRows(const WModelIndex& parent,
    +					 int first, int last)
    +{
    +  first_ = first;
    +  last_ = last;
    +  parent_ = parent;
    +
    +  rowsAboutToBeRemoved().emit(parent, first, last);
    +}
    +
    +void WAbstractItemModel::endRemoveRows()
    +{
    +  rowsRemoved().emit(parent_, first_, last_);
    +}
    +
    +WModelIndexList WAbstractItemModel::match(const WModelIndex& start,
    +					  int role,
    +					  const boost::any& value,
    +					  int hits,
    +					  WFlags<MatchFlag> flags)
    +  const
    +{
    +  WModelIndexList result;
    +
    +  const int rc = rowCount(start.parent());
    +
    +  for (int i = 0; i < rc; ++i) {
    +    int row = start.row() + i;
    +
    +    if (row >= rc) {
    +      if (!(flags & MatchWrap))
    +	break;
    +      else
    +	row -= rc;
    +    }
    +
    +    WModelIndex idx = index(row, start.column(), start.parent());
    +    boost::any v = data(idx, role);
    +
    +    if (Impl::matchValue(v, value, flags))
    +      result.push_back(idx);
    +  }
    +
    +  return result;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemView b/wt-3.1.7a/src/Wt/WAbstractItemView
    new file mode 100644
    index 0000000..1e20cbd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemView
    @@ -0,0 +1,857 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_WABSTRACTITEMVIEW_H_
    +#define WT_WABSTRACTITEMVIEW_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WModelIndex>
    +#include <Wt/WSignalMapper>
    +#include <Wt/WItemSelectionModel>
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +  class WAbstractItemDelegate;
    +  class WAbstractItemModel;
    +  class WApplication;
    +  class WCssTemplateRule;
    +
    +/*! \class WAbstractItemView Wt/WAbstractItemView Wt/WAbstractItemView
    + *  \brief An abstract base class for item Views.
    + *
    + * See WTableView or WTreeView for a description.
    + *
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WAbstractItemView.PageIOfN: <b>{1}</b> of <b>{2}</b>
    + * - Wt.WAbstractItemView.PageBar.First: &#xc2ab; First
    + * - Wt.WAbstractItemView.PageBar.Previous: &#xe280b9; Previous
    + * - Wt.WAbstractItemView.PageBar.Next: Next &#xe280ba;
    + * - Wt.WAbstractItemView.PageBar.Last: Last &#xc2bb;
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractItemView : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Enumeration that specifies the user action that triggers editing.
    +   *
    +   * \sa setEditTriggers(), edit()
    +   */
    +  enum EditTrigger {
    +    NoEditTrigger = 0x0,  //!< Do not allow user to initiate editing
    +    SingleClicked = 0x1,  //!< Edit an item when clicked
    +    DoubleClicked = 0x2,  //!< Edit an item when double clicked
    +    SelectedClicked = 0x4 //!< Edit a selected item that is clicked again
    +  };
    +
    +  /*! \brief Enumeration that specifies editing options.
    +   *
    +   * \sa setEditOptions()
    +   */
    +  enum EditOption {
    +    SingleEditor = 0x1,    //!< Never show more than one active editor
    +    MultipleEditors = 0x2, //!< Allow multiple editors at the same time
    +    SaveWhenClosed = 0x4,  //!< Always save the current edit value when closing
    +    LeaveEditorsOpen = 0x8 //!< Editors can only be closed using closeEditor()
    +  };
    +
    +  virtual ~WAbstractItemView();
    +
    +  /*! \brief Sets the model.
    +   *
    +   * The View will display data of the given \p model and changes in
    +   * the model are reflected by the View.
    +   *
    +   * The initial model is \c 0.
    +   *
    +   * \if cpp
    +   * Ownership of the model is not transferred (and thus the
    +   * previously set model is not deleted). A model may not be deleted as
    +   * long as a view exists for it.
    +   * \endif
    +   *
    +   * \sa setRootIndex()
    +   */
    +  virtual void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Returns the model.
    +   *
    +   * \sa setModel()
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Sets the root index.
    +   *
    +   * The root index is the model index that is considered the root
    +   * node. This node itself is not rendered, but its children are.
    +   *
    +   * \if cpp
    +   * The default value is an invalid model index, corresponding to the model's
    +   * root node.
    +   * \endif
    +   * \if java
    +   * The default value is \c null, corresponding to the model's root node.
    +   * \endif
    +   *
    +   * \sa setModel()
    +   */
    +  void setRootIndex(const WModelIndex& rootIndex);
    +
    +  /*! \brief Returns the root index.
    +   *
    +   * \sa setRootIndex()
    +   */
    +  const WModelIndex& rootIndex() const { return rootIndex_; }
    +
    +  /*! \brief Sets the default item delegate.
    +   *
    +   * The previous delegate is removed but not deleted. This item delegate
    +   * is for all columns for which no specific item delegate is set.
    +   *
    +   * The default item delegate is a WItemDelegate.
    +   *
    +   * \sa setItemDelegateForColumn()
    +   */
    +  void setItemDelegate(WAbstractItemDelegate *delegate);
    +
    +  /*! \brief Returns the default item delegate.
    +   *
    +   * \sa setItemDelegate()
    +   */
    +  WAbstractItemDelegate *itemDelegate() const { return itemDelegate_; }
    +
    +  /*! \brief Sets the delegate for a column.
    +   *
    +   * The previous delegate is removed but not deleted.
    +   *
    +   * \sa setItemDelegate()
    +   */
    +  void setItemDelegateForColumn(int column, WAbstractItemDelegate *delegate);
    +
    +  /*! \brief Returns the delegate that was set for a column.
    +   *
    +   * Returns \c 0 if no delegate was set for the column.
    +   *
    +   * \sa setItemDelegateForColumn()
    +   */
    +  WAbstractItemDelegate *itemDelegateForColumn(int column) const;
    +
    +  /*! \brief Returns the delegate for rendering an item.
    +   *
    +   * \sa setItemDelegateForColumn(), setItemDelegate()
    +   */
    +  WAbstractItemDelegate *itemDelegate(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the delegate for a column.
    +   *
    +   * Returns either the delegate that was set for the column, or the default
    +   * delegate.
    +   */
    +  WAbstractItemDelegate *itemDelegate(int column) const;
    +
    +  /*! \brief Sets the content alignment for a column.
    +   *
    +   * The default value is \link Wt::AlignLeft AlignLeft\endlink.
    +   *
    +   * \sa setHeaderAlignment()
    +   */
    +  virtual void setColumnAlignment(int column, AlignmentFlag alignment);
    +
    +  /*! \brief Sets the header alignment for a column.
    +   *
    +   * The default value is \link Wt::AlignLeft AlignLeft\endlink.
    +   *
    +   * \sa setColumnAlignment()
    +   */
    +  virtual void setHeaderAlignment(int column, AlignmentFlag alignment);
    +
    +  /*! \brief Returns the content alignment for a column.
    +   *
    +   * \sa setColumnAlignment()
    +   */
    +  virtual AlignmentFlag columnAlignment(int column) const;
    +
    +  /*! \brief Returns the header alignment for a column.
    +   *
    +   * \sa setHeaderAlignment()
    +   */
    +  virtual AlignmentFlag headerAlignment(int column) const;
    +
    +  /*! \brief Sets if alternating row colors are to be used.
    +   *
    +   * Configure whether rows get alternating background colors, defined by the
    +   * current CSS theme.
    +   *
    +   * The default value is \c false.
    +   */
    +  virtual void setAlternatingRowColors(bool enable);
    +
    +  /*! \brief Returns whether alternating row colors are used.
    +   *
    +   * When enabled, rows are displayed in alternating row colors, according
    +   * to the current theme's definition.
    +   *
    +   * \sa setAlternatingRowColors()
    +   */
    +  virtual bool alternatingRowColors() const { return alternatingRowColors_; }
    +  
    +  /*! \brief Sorts the data according to a column.
    +   *
    +   * Sorts the data according to data in column \p column and sort
    +   * order \p order.
    +   *
    +   * The default sorting column is -1: the model is unsorted.
    +   *
    +   * \sa WAbstractItemModel::sort()
    +   */
    +  void sortByColumn(int column, SortOrder order);
    +
    +  /*! \brief Returns the current sorting columm.
    +   *
    +   * \sa sortByColumn(), sortOrder()
    +   */
    +  int sortColumn() const;
    +
    +  /*! \brief Returns the current sorting order.
    +   *
    +   * \sa sortByColumn(), sortColumn()
    +   */
    +  SortOrder sortOrder() const;
    +
    +  /*! \brief Enables or disables sorting for all columns.
    +   *
    +   * Enable or disable sorting by the user on all columns.
    +   *
    +   * Sorting is enabled by default.
    +   *
    +   * \sa WAbstractItemModel::sort()
    +   */
    +  void setSortingEnabled(bool enabled);
    +
    +  /*! \brief Enables or disables sorting for a single column.
    +   *
    +   * Enable or disable sorting by the user for a specific column.
    +   *
    +   * Sorting is enabled by default.
    +   *
    +   * \sa WAbstractItemModel::sort()
    +   */
    +  void setSortingEnabled(int column, bool enabled);
    +
    +  /*! \brief Returns whether sorting is enabled.
    +   *
    +   * \sa setSortingEnabled()
    +   */
    +  bool isSortingEnabled() const { return sorting_; }
    +
    +  /*! \brief Returns whether sorting is enabled for a single column.
    +   *
    +   * \sa setSortingEnabled()
    +   */
    +  bool isSortingEnabled(int column) const;
    +
    +  /*! \brief Enables interactive column resizing
    +   *
    +   * Enable or disable column resize handles for interactive resizing of
    +   * the columns.
    +   *
    +   * Column resizing is enabled by default when JavaScript is available.
    +   *
    +   * \sa setColumnResizeEnabled()
    +   */
    +  void setColumnResizeEnabled(bool enabled);
    +
    +  /*! \brief Returns whether column resizing is enabled.
    +   *
    +   * \sa setColumnResizeEnabled()
    +   */
    +  bool isColumnResizeEnabled() const { return columnResize_; }
    +
    +  /*! \brief Changes the selection behaviour.
    +   *
    +   * The selection behavior indicates whether whole rows or individual
    +   * items can be selected. It is a property of the selectionModel().
    +   *
    +   * By default, selection operates on rows (\link Wt::SelectRows
    +   * SelectRows\endlink), in which case model indexes will always be
    +   * in the first column (column \c 0).
    +   *
    +   * Alternatively, you can allow selection for individual items
    +   * (\link Wt::SelectItems SelectItems\endlink).
    +   *
    +   * \sa WItemSelectionModel::setSelectionBehavior(), setSelectionMode()
    +   */
    +  void setSelectionBehavior(SelectionBehavior behavior);
    +
    +  /*! \brief Returns the selection behaviour.
    +   *
    +   * \sa setSelectionBehavior()
    +   */
    +  SelectionBehavior selectionBehavior() const;
    +
    +  /*! \brief Sets the selection mode.
    +   *
    +   * By default selection is disabled (\link Wt::NoSelection
    +   * NoSelection \endlink).
    +   *
    +   * \sa setSelectionBehavior()
    +   */
    +  void setSelectionMode(SelectionMode mode);
    +
    +  /*! \brief Returns the selection mode.
    +   *
    +   * \sa setSelectionMode()
    +   */
    +  SelectionMode selectionMode() const { return selectionMode_; }
    +
    +  /*! \brief Returns the selection model.
    +   *
    +   * The selection model keeps track of the currently selected items.
    +   */
    +  WItemSelectionModel *selectionModel() const { return selectionModel_; }
    +
    +  /*! \brief Sets the selected items
    +   *
    +   * Replaces the current selection with \p indexes.
    +   *
    +   * \sa select(), selectionModel()
    +   */
    +  void setSelectedIndexes(const WModelIndexSet& indexes);
    +
    +  /*! \brief Selects a single item.
    +   *
    +   * \sa setSelectedIndexes(), selectionModel()
    +   */
    +  void select(const WModelIndex& index, SelectionFlag option = Select);
    +
    +  /*! \brief Returns wheter an item is selected.
    +   *
    +   * This is a convenience method for:
    +   * \code
    +   * selectionModel()->isSelected(index)
    +   * \endcode
    +   *
    +   * \sa selectedIndexes(), select(), selectionModel()
    +   */
    +  bool isSelected(const WModelIndex& index) const;
    +
    +  /*! \brief Returns the set of selected items.
    +   *
    +   * The model indexes are returned as a set, topologically ordered (in
    +   * the order they appear in the view).
    +   *
    +   * This is a convenience method for:
    +   * \code
    +   * selectionModel()->selectedIndexes()
    +   * \endcode
    +   *
    +   * \sa setSelectedIndexes()
    +   */
    +  WModelIndexSet selectedIndexes() const;
    +  
    +  /*! \brief Enables the selection to be dragged (drag & drop).
    +   *
    +   * To enable dragging of the selection, you first need to enable
    +   * selection using setSelectionMode().
    +   *
    +   * Whether an individual item may be dragged is controlled by the
    +   * item's \link Wt::ItemIsDragEnabled ItemIsDragEnabled \endlink
    +   * flag. The selection can be dragged only if all items currently
    +   * selected can be dragged.
    +   *
    +   * \sa setDropsEnabled() 
    +   */
    +  void setDragEnabled(bool enable);
    +
    +  /*! \brief Enables drop operations (drag & drop).
    +   *
    +   * When drop is enabled, the tree view will indicate that something
    +   * may be dropped when the mime-type of the dragged object is
    +   * compatible with one of the model's accepted drop mime-types (see
    +   * WAbstractItemModel::acceptDropMimeTypes()) or this widget's
    +   * accepted drop mime-types (see WWidget::acceptDrops()), and the
    +   * target item has drop enabled (which is controlled by the item's
    +   * \link Wt::ItemIsDropEnabled ItemIsDropEnabled \endlink flag).
    +   *
    +   * Drop events must be handled in dropEvent().
    +   *
    +   * \sa setDragEnabled(), dropEvent()
    +   */
    +  void setDropsEnabled(bool enable);
    +
    +  /*! \brief Sets the row height.
    +   *
    +   * The view renders all rows with a same height. This method
    +   * configures this row height.
    +   *
    +   * The default value is 20 pixels.
    +   *
    +   * \note The height must be specified in WLength::Pixel units.
    +   *
    +   * \sa setColumnWidth()
    +   */
    +  virtual void setRowHeight(const WLength& rowHeight);
    +
    +  /*! \brief Returns the row height.
    +   */
    +  const WLength& rowHeight() const { return rowHeight_; }
    +
    +  /*! \brief Sets the column width.
    +   *
    +   * The default column width is 150 pixels.
    +   *
    +   * \note The actual space occupied by each column is the column width
    +   *       augmented by 7 pixels for internal padding and a border.
    +   */
    +  virtual void setColumnWidth(int column, const WLength& width) = 0;
    + 
    +  /*! \brief Returns the column width.
    +   *
    +   * \sa setColumnWidth()
    +   */
    +  WLength columnWidth(int column) const;
    +
    +  /*! \brief Changes the visibility of a column.
    +   *
    +   * \sa isColumnHidden()
    +   */
    +  virtual void setColumnHidden(int column, bool hide);
    +
    +  /*! \brief Returns if a column is hidden.
    +   *
    +   * \sa setColumnHidden()
    +   */
    +  bool isColumnHidden(int column) const;
    +
    +  /*! \brief Hides a column.
    +   *
    +   * \sa showColumn(), setColumnHidden()
    +   */
    +  void hideColumn(int column);
    +
    +  /*! \brief Shows a column.
    +   *
    +   * \sa hideColumn(), setColumnHidden()
    +   */
    +  void showColumn(int column);
    +
    +  /*! \brief Sets the column border color
    +   *
    +   * The default border color is defined by the CSS theme. 
    +   */
    +  virtual void setColumnBorder(const WColor& color) = 0;
    +
    +  /*! \brief Sets the header height.
    +   *
    +   * Use this method to change the header height. By default, the
    +   * header text is a single line that is centered vertically.
    +   *
    +   * By enabling multi-line headers, the header text will be aligned to
    +   * the top and wrap as needed. In that case, additional contents may be
    +   * displayed in the header, provided by createExtraHeaderWidget().
    +   *
    +   * The default value is a single line of 20 pixels.
    +   */
    +  virtual void setHeaderHeight(const WLength& height, bool multiLine = false);
    +
    +  /*! \brief Returns the header height.
    +   *
    +   * \sa setHeaderHeight()
    +   */
    +  const WLength& headerHeight() const { return headerLineHeight_; } ;
    +
    +  /*! \brief Returns the number of pages.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data. This returns the
    +   * number of pages currently shown.
    +   *
    +   * \sa createPageNavigationBar(), pageChanged()
    +   */
    +  virtual int pageCount() const = 0;
    +
    +  /*! \brief Returns the page size.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data. This returns the
    +   * number of items per page.
    +   *
    +   * \sa createPageNavigationBar(), pageChanged()
    +   */
    +  virtual int pageSize() const = 0;
    +
    +  /*! \brief Returns the current page.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data. This returns the
    +   * current page (between 0 and pageCount() - 1).
    +   *
    +   * \sa createPageNavigationBar(), pageChanged()
    +   */
    +  virtual int currentPage() const = 0;
    +
    +  /*! \brief Sets the current page.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data. This method can
    +   * be used to change the current page.
    +   *
    +   * \sa createPageNavigationBar(), pageChanged()
    +   */
    +  virtual void setCurrentPage(int page) = 0;
    +
    +  /*! \brief Configures what actions should trigger editing.
    +   *
    +   * The default value is DoubleClicked.
    +   *
    +   * \sa edit()
    +   */
    +  void setEditTriggers(WFlags<EditTrigger> editTriggers);
    +
    +  /*! \brief Returns the editing triggers.
    +   *
    +   * \sa setEditTriggers()
    +   */
    +  WFlags<EditTrigger> editTriggers() const { return editTriggers_; }
    +
    +  /*! \brief Configures editing options.
    +   *
    +   * The default value is SingleEditor;
    +   */
    +  void setEditOptions(WFlags<EditOption> options);
    +
    +  /*! \brief Returns the editing options.
    +   *
    +   * \sa setEditOptions()
    +   */
    +  WFlags<EditOption> editOptions() const { return editOptions_; }
    +
    +  /*! \brief Opens an editor for the given index.
    +   *
    +   * Unless multiple editors are enabled, any other open editor is closed
    +   * first.
    +   *
    +   * \sa setEditTriggers(), setEditOptions(), closeEditor()
    +   */
    +  void edit(const WModelIndex& index);
    +
    +  /*! \brief Closes the editor for the given index.
    +   *
    +   * If \p saveData is true, then the currently edited value is saved first
    +   * to the model.
    +   *
    +   * \sa edit()
    +   */
    +  void closeEditor(const WModelIndex& index, bool saveData = true);
    +
    +  /*! \brief Closes all open editors.
    +   *
    +   * If \p saveData is true, then the currently edited values are saved
    +   * to the model before closing the editor.
    +   *
    +   * \sa closeEditor()
    +   */
    +  void closeEditors(bool saveData = true);
    +
    +  /*! \brief Validates the editor for the given index.
    +   * 
    +   * Validation is done by invoking WAbstractItemDelegate::validate().
    +   */
    +  WValidator::State validateEditor(const WModelIndex& index);
    +
    +  /*! \brief Validates all editors.
    +   * 
    +   * \sa validateEditor().
    +   */
    +  WValidator::State validateEditors();
    +
    +  /*! \brief Returns whether an editor is open for a given index.
    +   *
    +   * \sa edit()
    +   */
    +  bool isEditing(const WModelIndex& index) const;
    +  
    +  /*! \brief Returns whether an editor's state is valid.
    +   */
    +  bool isValid(const WModelIndex& index) const;
    +
    +  bool isEditing() const;
    +
    +  /*! \brief %Signal emitted when an item is clicked.
    +   *
    +   * \sa doubleClicked()
    +   */
    +  Signal<WModelIndex, WMouseEvent>& clicked() { return clicked_; }
    +
    +  /*! \brief %Signal emitted when an item is double clicked.
    +   *
    +   * \sa clicked()
    +   */
    +  Signal<WModelIndex, WMouseEvent>& doubleClicked() { return doubleClicked_; }
    +
    +  /*! \brief %Signal emitted when a mouse button is pressed down.
    +   *
    +   * \sa mouseWentUp()
    +   */
    +  Signal<WModelIndex, WMouseEvent>& mouseWentDown() { return mouseWentDown_; }
    +
    +  /*! \brief %Signal emitted when the mouse button is released.
    +   *
    +   * \sa mouseWentDown()
    +   */
    +  Signal<WModelIndex, WMouseEvent>& mouseWentUp() { return mouseWentUp_; }
    +
    +  /*! \brief %Signal emitted when the selection is changed.
    +   *
    +   * \sa select(), setSelectionMode(), setSelectionBehavior()
    +   */
    +  Signal<>& selectionChanged() { return selectionChanged_; }
    +
    +  /*! \brief %Signal emitted when page information was updated.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data. This signal
    +   * is emitted when page-related information changed (e.g. the
    +   * current page was changed, or the number of rows was changed).
    +   *
    +   * \sa createPageNavigationBar()
    +   */
    +  Signal<>& pageChanged() { return pageChanged_; }
    +
    +  /*! \brief Returns the signal emitted when a column is resized by the user.
    +   *
    +   * The arguments of the signal are: the column index and the new
    +   * width of the column.
    +   */
    +  Signal<int, WLength>& columnResized() { return columnResized_; }
    +
    +protected:
    +  /*! \brief Creates a new item view.
    +   */
    +  WAbstractItemView(WContainerWidget *parent = 0);
    +
    +  /*! \brief Handles a drop event (drag & drop).
    +   *
    +   * The \p event object contains details about the drop
    +   * operation, identifying the source (which provides the data) and
    +   * the mime-type of the data. The drop was received on the
    +   * \p target item.
    +   *
    +   * The drop event can be handled either by the view itself, or by
    +   * the model. The default implementation checks if the mime-type is
    +   * accepted by the model, and if so passes the drop event to the
    +   * model. If the source is the view's own selection model, then the
    +   * drop event will be handled as a \link Wt::MoveAction
    +   * MoveAction\endlink, otherwise the drop event will be handled as a
    +   * \link Wt::CopyAction CopyAction\endlink.
    +   *
    +   * \sa WAbstractItemModel::dropEvent()
    +   */
    +  virtual void dropEvent(const WDropEvent& event, const WModelIndex& target);
    +
    +  /*! \brief Create an extra widget in the header.
    +   *
    +   * You may reimplement this method to provide an extra widget to be placed
    +   * below the header label. The extra widget will be visible only if
    +   * a multi-line header is configured using setHeaderHeight().
    +   *
    +   * The widget is created only once, but this method may be called
    +   * repeatedly for a column for which prior calls returned \c 0
    +   * (i.e. each time the header is rerendered).
    +   *
    +   * The default implementation returns \c 0.
    +   *
    +   * \sa setHeaderHeight(), extraHeaderWidget()
    +   */
    +  virtual WWidget *createExtraHeaderWidget(int column);
    +
    +  /*! \brief Returns the extra header widget.
    +   *
    +   * Returns the widget previously created using createExtraHeaderWidget()
    +   *
    +   * \sa createExtraHeaderWidget()
    +   */
    +  WWidget *extraHeaderWidget(int column);
    +
    +  /*! \brief Returns a page navigation widget.
    +   *
    +   * When Ajax/JavaScript is not available, the view will use a paging
    +   * navigation bar to allow scrolling through the data, created by this
    +   * method. The default implementation displays a simple navigation bar
    +   * with (First, Prevous, Next, Last) buttons and a page counter.
    +   *
    +   * You may want to reimplement this method to provide a custom page
    +   * navigation bar. You can use the currentPage(), pageCount(), and
    +   * setCurrentPage() methods to set or get the page information, and
    +   * listen to the pageChanged() signal to react to changes.
    +   */
    +  virtual WWidget *createPageNavigationBar();
    +
    +protected:
    +  struct ColumnInfo {
    +    WCssTemplateRule *styleRule;
    +    int id;
    +    SortOrder sortOrder;
    +    AlignmentFlag alignment;
    +    AlignmentFlag headerAlignment;
    +    WLength width;
    +    WWidget *extraHeaderWidget;
    +    bool sorting, hidden;
    +    WAbstractItemDelegate *itemDelegate_;
    +
    +    std::string styleClass() const;
    +
    +    ColumnInfo(const WAbstractItemView *view, int id);
    +  };
    +
    +  enum RenderState {
    +    RenderOk = 0,
    +    NeedAdjustViewPort = 1,
    +    NeedRerenderData = 2,
    +    NeedRerenderHeader = 3,
    +    NeedRerender = 4
    +  };
    +
    +  WContainerWidget *impl_;
    +  RenderState renderState_;
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  WSignalMapper<WModelIndex, WMouseEvent> *clickedMapper_;
    +
    +  mutable std::vector<ColumnInfo> columns_;
    +  int currentSortColumn_;
    +
    +  bool dragEnabled_, dropsEnabled_;
    +  WWidget *dragWidget_;
    +
    +  virtual void scheduleRerender(RenderState what);
    +
    +  virtual void modelDataChanged(const WModelIndex& topLeft,
    +				const WModelIndex& bottomRight) = 0;
    +  virtual void modelLayoutAboutToBeChanged();
    +  virtual void modelLayoutChanged();
    +  void modelReset();
    +
    +  ColumnInfo& columnInfo(int column) const;
    +  int columnById(int columnid) const;
    +
    +  int columnCount() const;
    +  int visibleColumnCount() const;
    +  int visibleColumnIndex(int modelColumn) const;
    +  int modelColumnIndex(int visibleColumn) const;
    +
    +  virtual ColumnInfo createColumnInfo(int column) const;
    +
    +  WWidget *createHeaderWidget(WApplication *app, int column);
    +  WText *headerTextWidget(int column);
    +
    +  void handleClick(const WModelIndex& index, const WMouseEvent& event);
    +  void handleDoubleClick(const WModelIndex& index, const WMouseEvent& event);
    +  void handleMouseDown(const WModelIndex& index, const WMouseEvent& event);
    +
    +  virtual bool internalSelect(const WModelIndex& index, SelectionFlag option);
    +
    +  void setEditState(const WModelIndex& index, const boost::any& editState);
    +  boost::any editState(const WModelIndex& index) const;
    +  bool hasEditFocus(const WModelIndex& index) const;
    +
    +  void setEditorWidget(const WModelIndex& index, WWidget *editor);
    +
    +  void bindObjJS(JSlot& slot, const std::string& jsMethod);
    +  void connectObjJS(EventSignalBase& s, const std::string& jsMethod);
    +
    +private:
    +  struct Editor {
    +    Editor() :
    +      widget(0),
    +      stateSaved(false),
    +      valid(false) {
    +      editState = boost::any();
    +    }
    +    WWidget *widget;
    +    boost::any editState;
    +    bool stateSaved;
    +    bool valid;
    +  };
    +
    +  WAbstractItemModel    *model_;
    +  WModelIndex            rootIndex_;
    +  WAbstractItemDelegate *itemDelegate_;
    +  WItemSelectionModel   *selectionModel_;
    +  WLength                rowHeight_, headerLineHeight_;
    +  SelectionMode          selectionMode_;
    +  bool                   sorting_, columnResize_;
    +  bool                   multiLineHeader_;
    +
    +  JSignal<int, int>    columnWidthChanged_;
    +  Signal<int, WLength> columnResized_;
    +
    +  WCssTemplateRule *headerHeightRule_;
    +
    +  mutable int nextColumnId_;
    +  
    +  WSignalMapper<int>
    +    *clickedForSortMapper_, *clickedForExpandMapper_,
    +    *clickedForCollapseMapper_;
    +
    +  bool alternatingRowColors_;
    +
    +  JSlot resizeHandleMDownJS_;
    +
    +  typedef std::map<WModelIndex, Editor> EditorMap;
    +  EditorMap editedItems_;
    +
    +  Signal<WModelIndex, WMouseEvent> clicked_;
    +  Signal<WModelIndex, WMouseEvent> doubleClicked_;
    +  Signal<WModelIndex, WMouseEvent> mouseWentDown_;
    +  Signal<WModelIndex, WMouseEvent> mouseWentUp_;
    +  Signal<> selectionChanged_;
    +  Signal<> pageChanged_;
    +
    +  WFlags<EditTrigger> editTriggers_;
    +  WFlags<EditOption> editOptions_;
    +
    +  void closeEditorWidget(WWidget *editor, bool saveData);
    +  void saveEditedValue(const WModelIndex& index, Editor& editor);
    +
    +  virtual WWidget *headerWidget(int column, bool contentsOnly = true) = 0;
    +  virtual WText *headerSortIconWidget(int column);
    +
    +  void selectionHandleClick(const WModelIndex& index,
    +			    WFlags<KeyboardModifier> modifiers);
    +  void clearSelection();
    +  void extendSelection(const WModelIndex& index);
    +  virtual void selectRange(const WModelIndex& first, const WModelIndex& last)
    +    = 0;
    +
    +  void checkDragSelection();
    +  void configureModelDragDrop();
    +
    +  void toggleSortColumn(int columnid);
    +  void updateColumnWidth(int columnId, int width);
    +
    +  virtual WContainerWidget* headerContainer() = 0;
    +
    +  int headerLevel(int column) const;
    +  int headerLevelCount() const;
    +
    +  void expandColumn(int columnid);
    +  void collapseColumn(int columnid);
    +
    +  void initDragDrop();
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WAbstractItemView::EditOption);
    +W_DECLARE_OPERATORS_FOR_FLAGS(WAbstractItemView::EditTrigger);
    +
    +}
    +
    +#endif // WT_WABSTRACTITEMVIEW_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractItemView.C b/wt-3.1.7a/src/Wt/WAbstractItemView.C
    new file mode 100644
    index 0000000..ce465bf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractItemView.C
    @@ -0,0 +1,1269 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WAbstractItemView"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WEvent"
    +#include "Wt/WImage"
    +#include "Wt/WItemSelectionModel"
    +#include "Wt/WItemDelegate"
    +#include "Wt/WPushButton"
    +#include "Wt/WText"
    +
    +#include "SizeHandle.h"
    +#include "Utils.h"
    +
    +#include <iostream>
    +
    +namespace Wt {
    +
    +class DefaultPagingBar : public WContainerWidget
    +{
    +public:
    +  DefaultPagingBar(WAbstractItemView *view)
    +    : view_(view)
    +  {
    +    setStyleClass("Wt-pagingbar");
    +
    +    firstButton_ = new WPushButton(tr("Wt.WAbstractItemView.PageBar.First"),
    +        this);
    +    firstButton_->clicked().connect(this, &DefaultPagingBar::showFirstPage);
    +
    +    prevButton_ = new WPushButton(tr("Wt.WAbstractItemView.PageBar.Previous"),
    +        this);
    +    prevButton_->clicked().connect(this, &DefaultPagingBar::showPreviousPage);
    +
    +    current_ = new WText(this);
    +
    +    nextButton_ = new WPushButton(tr("Wt.WAbstractItemView.PageBar.Next"),
    +        this);
    +    nextButton_->clicked().connect(this, &DefaultPagingBar::showNextPage);
    +
    +    lastButton_ = new WPushButton(tr("Wt.WAbstractItemView.PageBar.Last"),
    +        this);
    +    lastButton_->clicked().connect(this, &DefaultPagingBar::showLastPage);
    +
    +    view_->pageChanged().connect(this, &DefaultPagingBar::update);
    +
    +    update();
    +  }
    +
    +private:
    +  WAbstractItemView *view_;
    +  WPushButton *prevButton_, *nextButton_, *firstButton_, *lastButton_;
    +  WText *current_;
    +
    +  void update() {
    +    firstButton_->setDisabled(view_->currentPage() == 0);
    +    prevButton_->setDisabled(view_->currentPage() == 0);
    +
    +    nextButton_->setDisabled(view_->currentPage() == view_->pageCount() - 1);
    +    lastButton_->setDisabled(view_->currentPage() == view_->pageCount() - 1);
    +
    +    current_->setText(WString::tr("Wt.WAbstractItemView.PageIOfN").
    +		      arg(view_->currentPage() + 1).arg(view_->pageCount()));
    +  }
    +
    +  void showFirstPage()
    +  {
    +    view_->setCurrentPage(0);
    +  }
    +
    +  void showLastPage()
    +  {
    +    view_->setCurrentPage(view_->pageCount() - 1);
    +  }
    +
    +  void showPreviousPage()
    +  {
    +    if (view_->currentPage() > 0)
    +      view_->setCurrentPage(view_->currentPage() - 1);
    +  }
    +
    +  void showNextPage()
    +  {
    +    if (view_->currentPage() < view_->pageCount() - 1)
    +      view_->setCurrentPage(view_->currentPage() + 1);
    +  }
    +};
    +
    +WAbstractItemView::ColumnInfo::ColumnInfo(const WAbstractItemView *view, 
    +					  int anId)
    +  : id(anId),
    +    sortOrder(AscendingOrder),
    +    alignment(AlignLeft),
    +    headerAlignment(AlignLeft),
    +    extraHeaderWidget(0),
    +    sorting(view->sorting_),
    +    hidden(false),
    +    itemDelegate_(0)
    +{
    +  width = WLength(150);
    +
    +  styleRule = new WCssTemplateRule("#" + view->id() + " ." + styleClass());
    +  styleRule->templateWidget()->resize(width.toPixels(), WLength::Auto);
    +
    +  WApplication::instance()->styleSheet().addRule(styleRule);
    +}
    +
    +int WAbstractItemView::visibleColumnIndex(int modelColumn) const
    +{
    +  if (columns_[modelColumn].hidden)
    +    return -1;
    +
    +  int j = 0;
    +
    +  for (int i = 0; i < modelColumn; ++i)
    +    if (!columns_[i].hidden)
    +      ++j;
    +
    +  return j;
    +}
    +
    +int WAbstractItemView::modelColumnIndex(int visibleColumn) const
    +{
    +  int j = -1;
    +
    +  for (int i = 0; i <= visibleColumn; ++i) {
    +    ++j;
    +    while (static_cast<unsigned>(j) < columns_.size() && columns_[j].hidden)
    +      ++j;
    +
    +    if (static_cast<unsigned>(j) >= columns_.size())
    +      return -1;
    +  }
    +
    +  return j;
    +}
    +
    +std::string WAbstractItemView::ColumnInfo::styleClass() const
    +{
    +#ifndef WT_TARGET_JAVA
    +  char buf[40];
    +  buf[0] = 0;
    +  std::strcat(buf, "Wt-tv-c");
    +  Utils::itoa(id, buf + 7, 10);
    +  return buf;
    +#else
    +  return "Wt-tv-c" + boost::lexical_cast<std::string>(id);
    +#endif
    +}
    +
    +WAbstractItemView::WAbstractItemView(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    impl_(new WContainerWidget()),
    +    renderState_(NeedRerender),
    +    currentSortColumn_(-1),
    +    dragEnabled_(false),
    +    dropsEnabled_(false),
    +    model_(0),
    +    itemDelegate_(0),
    +    selectionModel_(new WItemSelectionModel(0, this)),
    +    rowHeight_(20),
    +    headerLineHeight_(20),
    +    selectionMode_(NoSelection),
    +    sorting_(true),
    +    columnResize_(true),
    +    multiLineHeader_(false),
    +    columnWidthChanged_(impl_, "columnResized"),
    +    columnResized_(this),
    +    nextColumnId_(1),
    +    alternatingRowColors_(false),
    +    clicked_(this),
    +    doubleClicked_(this),
    +    mouseWentDown_(this),
    +    mouseWentUp_(this),
    +    selectionChanged_(this),
    +    pageChanged_(this),
    +    editTriggers_(DoubleClicked),
    +    editOptions_(SingleEditor)
    +{
    +  setImplementation(impl_);
    +
    +  setItemDelegate(new WItemDelegate(this));
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->environment().agentIsChrome())
    +    impl_->setMargin(1, Right); // Chrome WTF ? #452
    +
    +  typedef WAbstractItemView Self;
    +
    +  clickedForSortMapper_ = new WSignalMapper<int>(this);
    +  clickedForSortMapper_->mapped().connect(this, &Self::toggleSortColumn);
    +
    +  clickedForCollapseMapper_ = new WSignalMapper<int>(this);
    +  clickedForCollapseMapper_->mapped().connect(this, &Self::collapseColumn);
    +
    +  clickedForExpandMapper_ = new WSignalMapper<int>(this);
    +  clickedForExpandMapper_->mapped().connect(this, &Self::expandColumn);
    +
    +  SizeHandle::loadJavaScript(app);
    +
    +  if (!app->environment().ajax()) {
    +    clickedMapper_ = new WSignalMapper<WModelIndex, WMouseEvent>(this);
    +    clickedMapper_->mapped().connect(this, &Self::handleClick);
    +
    +    columnResize_ = false;
    +  }
    +
    +  bindObjJS(resizeHandleMDownJS_, "resizeHandleMDown");
    +
    +  columnWidthChanged_.connect(this, &Self::updateColumnWidth);
    +
    +  headerHeightRule_ = new WCssTemplateRule("#" + id() + " .headerrh");
    +  app->styleSheet().addRule(headerHeightRule_);
    +  setHeaderHeight(headerLineHeight_);
    +}
    +
    +WAbstractItemView::~WAbstractItemView()
    +{
    +  delete headerHeightRule_;
    +
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    delete columns_[i].styleRule;
    +}
    +
    +void WAbstractItemView::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +  WItemSelectionModel *oldSelectionModel = selectionModel_;
    +  selectionModel_ = new WItemSelectionModel(model, this);
    +  selectionModel_->setSelectionBehavior(oldSelectionModel->selectionBehavior());
    +
    +  editedItems_.clear();
    +
    +  configureModelDragDrop();
    +
    +  setRootIndex(WModelIndex());
    +
    +  setHeaderHeight(headerLineHeight_, multiLineHeader_);
    +}
    +
    +void WAbstractItemView::setRootIndex(const WModelIndex& rootIndex)
    +{
    +  rootIndex_ = rootIndex;
    +
    +  scheduleRerender(NeedRerender);
    +
    +  unsigned modelColumnCount = model_->columnCount(rootIndex_);
    +
    +  while (columns_.size() > modelColumnCount) {
    +    int i = columns_.size() - 1;
    +    delete columns_[i].styleRule;
    +    columns_.erase(columns_.begin() + i);
    +  }
    +
    +  while (columns_.size() < modelColumnCount)
    +    columns_.push_back(createColumnInfo(columns_.size()));
    +}
    +
    +void WAbstractItemView::setRowHeight(const WLength& rowHeight)
    +{
    +  rowHeight_ = rowHeight;
    +}
    +
    +WLength WAbstractItemView::columnWidth(int column) const
    +{
    +  return columnInfo(column).width;
    +}
    +
    +void WAbstractItemView::updateColumnWidth(int columnId, int width)
    +{
    +  int column = columnById(columnId);
    +
    +  if (column >= 0) {
    +    columnInfo(column).width = width;
    +    columnResized_.emit(column, columnInfo(column).width);
    +  }
    +}
    +
    +void WAbstractItemView::setColumnHidden(int column, bool hidden)
    +{
    +  columnInfo(column).hidden = hidden;
    +}
    +
    +bool WAbstractItemView::isColumnHidden(int column) const
    +{
    +  return columnInfo(column).hidden;
    +}
    +
    +void WAbstractItemView::hideColumn(int column)
    +{
    +  setColumnHidden(column, true);
    +}
    +
    +void WAbstractItemView::showColumn(int column)
    +{
    +  setColumnHidden(column, false);
    +}
    +
    +void WAbstractItemView::initDragDrop()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  /* item drag & drop */
    +  app->styleSheet().addRule
    +    ("#" + id() + "dw",
    +     "width: 32px; height: 32px;"
    +     "background: url(" + WApplication::resourcesUrl() + "items-not-ok.gif);");
    +
    +  app->styleSheet().addRule
    +    ("#" + id() + "dw.Wt-valid-drop",
    +     "width: 32px; height: 32px;"
    +     "background: url(" + WApplication::resourcesUrl() + "items-ok.gif);");
    +
    +  selectionChanged_.connect(this, &WAbstractItemView::checkDragSelection);
    +}
    +
    +void WAbstractItemView::setColumnResizeEnabled(bool enabled)
    +{
    +  if (enabled != columnResize_) {
    +    columnResize_ = enabled;
    +    scheduleRerender(NeedRerenderHeader);
    +  }
    +}
    +
    +void WAbstractItemView::setColumnAlignment(int column, AlignmentFlag alignment)
    +{
    +  columnInfo(column).alignment = alignment;
    +
    +  const char *align = 0;
    +  switch (alignment) {
    +  case AlignLeft: align = "left"; break;
    +  case AlignCenter: align = "center"; break;
    +  case AlignRight: align = "right"; break;
    +  case AlignJustify: align = "justify"; break;
    +  default:
    +    break;
    +  }
    +
    +  if (align) {
    +    WWidget *w = columnInfo(column).styleRule->templateWidget();
    +    w->setAttributeValue("style", std::string("text-align: ") + align);
    +  }
    +}
    +
    +AlignmentFlag WAbstractItemView::columnAlignment(int column) const
    +{
    +  return columnInfo(column).alignment;
    +}
    +
    +void WAbstractItemView::setHeaderAlignment(int column, AlignmentFlag alignment)
    +{
    +  columnInfo(column).headerAlignment = alignment;
    +
    +  if (columnInfo(column).hidden || renderState_ >= NeedRerenderHeader)
    +    return;
    +
    +  WContainerWidget *wc = dynamic_cast<WContainerWidget *>(headerWidget(column));
    +  
    +  wc->setContentAlignment(alignment);
    +}
    +
    +AlignmentFlag WAbstractItemView::headerAlignment(int column) const 
    +{
    +  return columnInfo(column).headerAlignment;
    +}
    +
    +void WAbstractItemView::setAlternatingRowColors(bool enable)
    +{
    +  alternatingRowColors_ = enable;
    +}
    +
    +void WAbstractItemView::setSelectionMode(SelectionMode mode)
    +{
    +  if (mode != selectionMode_) {
    +    clearSelection();
    +    selectionMode_ = mode;
    +  }
    +}
    +
    +void WAbstractItemView::setSelectionBehavior(SelectionBehavior behavior)
    +{
    +  if (behavior != selectionBehavior()) {
    +    clearSelection();
    +    selectionModel_->setSelectionBehavior(behavior);
    +  }
    +}
    +
    +SelectionBehavior WAbstractItemView::selectionBehavior() const
    +{
    +  return selectionModel_->selectionBehavior();
    +}
    +
    +void WAbstractItemView::setItemDelegate(WAbstractItemDelegate *delegate)
    +{
    +  itemDelegate_ = delegate;
    +  itemDelegate_->closeEditor()
    +    .connect(this, &WAbstractItemView::closeEditorWidget);
    +}
    +
    +void WAbstractItemView::setItemDelegateForColumn(int column,
    +						 WAbstractItemDelegate *delegate)
    +{
    +  columnInfo(column).itemDelegate_ = delegate;
    +  delegate->closeEditor()
    +    .connect(this, &WAbstractItemView::closeEditorWidget);
    +}
    +
    +WAbstractItemDelegate *WAbstractItemView::itemDelegateForColumn(int column) const
    +{
    +  return columnInfo(column).itemDelegate_;
    +}
    +
    +WAbstractItemDelegate *WAbstractItemView::itemDelegate(const WModelIndex& index)
    +  const
    +{
    +  return itemDelegate(index.column());
    +}
    +
    +WAbstractItemDelegate *WAbstractItemView::itemDelegate(int column) const
    +{
    +  WAbstractItemDelegate *result = itemDelegateForColumn(column);
    +
    +  return result ? result : itemDelegate_;
    +}
    +
    +std::string repeat(const std::string& s, int times)
    +{
    +  std::string result;
    +  for (int i = 0; i < times; ++i) {
    +    result += s;
    +  }
    +  return result;
    +}
    +
    +void WAbstractItemView::dropEvent(const WDropEvent& e, const WModelIndex& index)
    +{
    +  /*
    +   * Here, we only handle standard drag&drop actions between abstract
    +   * item models.
    +   */
    +  if (dropsEnabled_) {
    +    std::vector<std::string> acceptMimeTypes = model_->acceptDropMimeTypes();
    +
    +    for (unsigned i = 0; i < acceptMimeTypes.size(); ++i)
    +      if (acceptMimeTypes[i] == e.mimeType()) {
    +	// we define internal by sharing the same selection model...
    +	// currently selection models cannot be shared
    +	bool internal = e.source() == selectionModel_;
    +
    +	DropAction action = internal ? MoveAction : CopyAction;
    +
    +	// TODO: (later) we need to interpret the event location
    +	// (e.mouseEvent().widget().y) For now we will implement to
    +	// add as a sibling before the index
    +	model_->dropEvent(e, action,
    +			  index.row(), index.column(), index.parent());
    +
    +	setSelectedIndexes(WModelIndexSet());
    +	return;
    +      }
    +  }
    +
    +  WCompositeWidget::dropEvent(e);
    +}
    +
    +void WAbstractItemView::configureModelDragDrop()
    +{
    +  initDragDrop();
    +
    +  if (!model_)
    +    return;
    +
    +  if (dragEnabled_) {
    +    setAttributeValue("dmt", model_->mimeType());
    +    setAttributeValue("dsid",
    +		      WApplication::instance()->encodeObject(selectionModel_));
    +
    +    checkDragSelection();
    +  }
    +
    +  std::vector<std::string> acceptMimeTypes = model_->acceptDropMimeTypes();
    +
    +  for (unsigned i = 0; i < acceptMimeTypes.size(); ++i)
    +    if (dropsEnabled_)
    +      acceptDrops(acceptMimeTypes[i], "Wt-drop-site");
    +    else
    +      stopAcceptDrops(acceptMimeTypes[i]);
    +}
    +
    +
    +void WAbstractItemView::setDropsEnabled(bool enable)
    +{
    +  if (dropsEnabled_ != enable) {
    +    dropsEnabled_ = enable;
    +
    +    configureModelDragDrop();
    +  }
    +}
    +
    +void WAbstractItemView::checkDragSelection()
    +{
    +  /*
    +   * Check whether the current selection can be drag and dropped
    +   */
    +  std::string dragMimeType = model_->mimeType();
    +
    +  if (!dragMimeType.empty()) {
    +    const WModelIndexSet& selection = selectionModel_->selectedIndexes();
    +
    +    bool dragOk = !selection.empty();
    +
    +    for (WModelIndexSet::const_iterator i = selection.begin();
    +	 i != selection.end(); ++i)
    +      if (!((*i).flags() & ItemIsDragEnabled)) {
    +	dragOk = false;
    +	break;
    +      }
    +
    +    if (dragOk)
    +      setAttributeValue("drag", "true");
    +    else
    +      setAttributeValue("drag", "false");
    +  }
    +}
    +
    +WText *WAbstractItemView::headerSortIconWidget(int column)
    +{
    +  if (!columnInfo(column).sorting)
    +    return 0;
    +
    +  WWidget *hw = headerWidget(column);
    +  if (hw)
    +    return dynamic_cast<WText *>(hw->find("sort"));
    +  else
    +    return 0;
    +}
    +
    +WText *WAbstractItemView::headerTextWidget(int column)
    +{
    +  WWidget *hw = headerWidget(column);
    +  if (hw)
    +    return dynamic_cast<WText *>(hw->find("text"));
    +  else
    +    return 0;
    +}
    +
    +WWidget *WAbstractItemView::createExtraHeaderWidget(int column)
    +{
    +  return 0;
    +}
    +
    +WWidget *WAbstractItemView::extraHeaderWidget(int column)
    +{
    +  return columnInfo(column).extraHeaderWidget;
    +}
    +
    +void WAbstractItemView::toggleSortColumn(int columnid)
    +{
    +  int column = columnById(columnid);
    +
    +  if (column != currentSortColumn_)
    +    sortByColumn(column, columnInfo(column).sortOrder);
    +  else
    +    sortByColumn(column, columnInfo(column).sortOrder == AscendingOrder
    +		 ? DescendingOrder : AscendingOrder);
    +}
    +
    +int WAbstractItemView::sortColumn() const
    +{
    +  return currentSortColumn_;
    +}
    +
    +SortOrder WAbstractItemView::sortOrder() const
    +{
    +  if (currentSortColumn_ >= 0
    +      && currentSortColumn_ < static_cast<int>(columns_.size()))
    +    return columns_[currentSortColumn_].sortOrder;
    +  else
    +    return AscendingOrder;
    +}
    +
    +int WAbstractItemView::columnById(int columnid) const
    +{
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    if (columnInfo(i).id == columnid)
    +      return i;
    +
    +  return 0;
    +}
    +
    +int WAbstractItemView::columnCount() const
    +{
    +  return columns_.size();
    +}
    +
    +int WAbstractItemView::visibleColumnCount() const
    +{
    +  int result = 0;
    +
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    if (!columns_[i].hidden)
    +      ++result;
    +
    +  return result;
    +}
    +
    +WAbstractItemView::ColumnInfo WAbstractItemView::createColumnInfo(int column)
    +  const
    +{
    +  return ColumnInfo(this, nextColumnId_++);
    +}
    +
    +WAbstractItemView::ColumnInfo& WAbstractItemView::columnInfo(int column) const
    +{
    +  while (column >= (int)columns_.size())
    +    columns_.push_back(createColumnInfo(columns_.size()));
    +
    +  return columns_[column];
    +}
    +
    +void WAbstractItemView::sortByColumn(int column, SortOrder order)
    +{
    +  if (currentSortColumn_ != -1) {
    +    WText* t = headerSortIconWidget(currentSortColumn_);
    +    if (t)
    +      t->setStyleClass("Wt-tv-sh Wt-tv-sh-none");
    +  }
    +
    +  currentSortColumn_ = column;
    +  columnInfo(column).sortOrder = order;
    +
    +  if (renderState_ != NeedRerender) {
    +    WText* t = headerSortIconWidget(currentSortColumn_);
    +    if (t)
    +      t->setStyleClass(order == AscendingOrder
    +		       ? "Wt-tv-sh Wt-tv-sh-up" : "Wt-tv-sh Wt-tv-sh-down");
    +  }
    +
    +  model_->sort(column, order);
    +}
    +
    +void WAbstractItemView::setSortingEnabled(bool enabled)
    +{
    +  sorting_ = enabled;
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    columnInfo(i).sorting = enabled;
    +
    +  scheduleRerender(NeedRerenderHeader);
    +}
    +
    +void WAbstractItemView::setSortingEnabled(int column, bool enabled)
    +{
    +  columnInfo(column).sorting = enabled;
    +
    +  scheduleRerender(NeedRerenderHeader);
    +}
    +
    +bool WAbstractItemView::isSortingEnabled(int column) const
    +{
    +  return columnInfo(column).sorting;
    +}
    +
    +void WAbstractItemView::modelReset()
    +{
    +  setModel(model_);
    +}
    +
    +bool WAbstractItemView::internalSelect(const WModelIndex& index,
    +				       SelectionFlag option)
    +{
    +  if (!(index.flags() & ItemIsSelectable) || selectionMode() == NoSelection)
    +    return false;
    +
    +  if (option == ToggleSelect)
    +    option = isSelected(index) ? Deselect : Select;
    +  else if (option == ClearAndSelect) {
    +    clearSelection();
    +    option = Select;
    +  } else if (selectionMode() == SingleSelection && option == Select)
    +    clearSelection();
    +
    +  /*
    +   * now option is either Select or Deselect and we only need to do
    +   * exactly that one thing
    +   */
    +  if (option == Select)
    +    selectionModel()->selection_.insert(index);
    +  else
    +    if (!selectionModel()->selection_.erase(index))
    +      return false;
    +
    +  return true;
    +}
    +
    +void WAbstractItemView::clearSelection()
    +{
    +  WModelIndexSet& nodes = selectionModel_->selection_;
    +
    +  while (!nodes.empty()) {
    +    WModelIndex i = *nodes.begin();
    +    internalSelect(i, Deselect);
    +  }
    +}
    +
    +void WAbstractItemView::setSelectedIndexes(const WModelIndexSet& indexes)
    +{
    +  if (indexes.empty() && selectionModel_->selection_.empty())
    +    return;
    +
    +  clearSelection();
    +
    +  for (WModelIndexSet::const_iterator i = indexes.begin();
    +       i != indexes.end(); ++i)
    +    internalSelect(*i, Select);
    +
    +  selectionChanged_.emit();
    +}
    +
    +void WAbstractItemView::extendSelection(const WModelIndex& index)
    +{
    +  if (selectionModel_->selection_.empty())
    +    internalSelect(index, Select);
    +  else {
    +    if (selectionBehavior() == SelectRows && index.column() != 0) {
    +      extendSelection(model_->index(index.row(), 0, index.parent()));
    +      return;
    +    }
    +
    +    /*
    +     * Expand current selection. If index is within or below the
    +     * current selection, we select from the top item to index. If index
    +     * is above the current selection, select everything from the
    +     * bottom item to index.
    +     *
    +     * For a WTreeView, only indexes with expanded ancestors can be
    +     * part of the selection: this is asserted when collapsing a index.
    +     */
    +    WModelIndex top = Utils::first(selectionModel_->selection_);
    +    if (top < index) {
    +      clearSelection();
    +      selectRange(top, index);
    +    } else {
    +      WModelIndex bottom = Utils::last(selectionModel_->selection_);
    +      clearSelection();
    +      selectRange(index, bottom);
    +    }
    +  }
    +
    +  selectionChanged_.emit();
    +}
    +
    +bool WAbstractItemView::isSelected(const WModelIndex& index) const
    +{
    +  return selectionModel_->isSelected(index);
    +}
    +
    +void WAbstractItemView::select(const WModelIndex& index, SelectionFlag option)
    +{
    +  if (internalSelect(index, option))
    +    selectionChanged_.emit();
    +}
    +
    +void WAbstractItemView::selectionHandleClick(const WModelIndex& index,
    +					     WFlags<KeyboardModifier> modifiers)
    +{
    +  if (selectionMode_ == NoSelection)
    +    return;
    +
    +  if (selectionMode_ == ExtendedSelection) {
    +    if (modifiers & ShiftModifier)
    +      extendSelection(index);
    +    else {
    +      if (!(modifiers & (ControlModifier | MetaModifier))) {
    +	//if (isSelected(index)) -> strange MacOS X behavor
    +	//  return;
    +	//else {
    +	select(index, ClearAndSelect);
    +	//}
    +      } else
    +	select(index, ToggleSelect);
    +    }
    +  } else
    +    select(index, Select);
    +}
    +
    +WModelIndexSet WAbstractItemView::selectedIndexes() const
    +{
    +  return selectionModel_->selection_;
    +}
    +
    +void WAbstractItemView::scheduleRerender(RenderState what)
    +{
    +  if (!isRendered())
    +    return;
    +
    +  if ((what == NeedRerenderHeader && renderState_ == NeedRerenderData)
    +      || (what == NeedRerenderData && renderState_ == NeedRerenderHeader))
    +    renderState_ = NeedRerender;
    +  else
    +    renderState_ = std::max(what, renderState_);
    +
    +  askRerender();
    +}
    +
    +int WAbstractItemView::headerLevel(int column) const
    +{
    +  return static_cast<int>
    +    (asNumber(model_->headerData(column, Horizontal, LevelRole)));
    +}
    +
    +WWidget *WAbstractItemView::createHeaderWidget(WApplication *app, int column)
    +{
    +  static const char *OneLine = "<div>&nbsp;</div>";
    +
    +  int headerLevel = model_ ? this->headerLevel(column) : 0;
    +
    +  int rightBorderLevel = headerLevel;
    +  if (model_) {
    +    int rightColumn = modelColumnIndex(visibleColumnIndex(column) + 1);
    +    if (rightColumn != -1) {
    +      WFlags<HeaderFlag> flagsLeft = model_->headerFlags(column);
    +      WFlags<HeaderFlag> flagsRight = model_->headerFlags(rightColumn);
    +      
    +      int rightHeaderLevel = this->headerLevel(rightColumn);
    +
    +      if (flagsLeft & ColumnIsExpandedRight)
    +	rightBorderLevel = headerLevel + 1;
    +      else if (flagsRight & ColumnIsExpandedLeft)
    +	rightBorderLevel = rightHeaderLevel + 1;
    +      else
    +	rightBorderLevel = std::min(headerLevel, rightHeaderLevel);
    +    }
    +  }
    +
    +  ColumnInfo& info = columnInfo(column);
    +  WContainerWidget *w = new WContainerWidget();
    +  w->setObjectName("contents");
    +
    +  if (info.sorting) {
    +    WText *sortIcon = new WText(w);
    +    sortIcon->setObjectName("sort");
    +    sortIcon->setInline(false);
    +    if (!columnResize_)
    +      sortIcon->setMargin(4, Right);
    +    sortIcon->setStyleClass("Wt-tv-sh Wt-tv-sh-none");
    +    clickedForSortMapper_->mapConnect(sortIcon->clicked(), info.id);
    +
    +    if (currentSortColumn_ == column)
    +      sortIcon->setStyleClass(info.sortOrder == AscendingOrder
    +			      ? "Wt-tv-sh Wt-tv-sh-up"
    +			      : "Wt-tv-sh Wt-tv-sh-down");
    +  }
    +
    +  if (model_->headerFlags(column)
    +      & (ColumnIsExpandedLeft | ColumnIsExpandedRight)) {
    +    WImage *collapseIcon = new WImage(w);
    +    collapseIcon->setFloatSide(Left);
    +    collapseIcon->setImageRef(WApplication::resourcesUrl() + "minus.gif");
    +    clickedForCollapseMapper_->mapConnect(collapseIcon->clicked(), info.id);
    +  } else if (model_->headerFlags(column) & ColumnIsCollapsed) {
    +    WImage *expandIcon = new WImage(w);
    +    expandIcon->setFloatSide(Left);
    +    expandIcon->setImageRef(WApplication::resourcesUrl() + "plus.gif");
    +    clickedForExpandMapper_->mapConnect(expandIcon->clicked(), info.id);
    +  }    
    +
    +  WText *t = new WText("&nbsp;", w);
    +  t->setObjectName("text");
    +  t->setStyleClass("Wt-label");
    +  t->setInline(false);
    +  if (multiLineHeader_ || app->environment().agentIsIE())
    +    t->setWordWrap(true);
    +  else
    +    t->setWordWrap(false);
    +
    +  if (info.sorting)
    +    clickedForSortMapper_->mapConnect(t->clicked(), info.id);
    +
    +  WContainerWidget *result = new WContainerWidget();
    +
    +  if (headerLevel) {
    +    WContainerWidget *spacer = new WContainerWidget(result);
    +    t = new WText(spacer);
    +    t->setInline(false);
    +
    +    if (rightBorderLevel < headerLevel) {
    +      if (rightBorderLevel) {
    +	t->setText(repeat(OneLine, rightBorderLevel));
    +	spacer = new WContainerWidget(result);
    +	t = new WText(spacer);
    +	t->setInline(false);
    +      }
    +      t->setText(repeat(OneLine, headerLevel - rightBorderLevel));
    +      spacer->setStyleClass("Wt-tv-br");
    +    } else {
    +      t->setText(repeat(OneLine, headerLevel));
    +    }
    +  }
    +
    +  if (rightBorderLevel <= headerLevel)
    +    w->addStyleClass("Wt-tv-br");
    +
    +  result->addWidget(w);
    +  result->setStyleClass(info.styleClass() + " Wt-tv-c headerrh");
    +  result->setContentAlignment(info.headerAlignment);
    +
    +  WWidget *extraW = columnInfo(column).extraHeaderWidget;
    +  if (extraW) {
    +    result->addWidget(extraW);
    +    extraW->addStyleClass("Wt-tv-br");
    +  }
    +
    +  if (columnResize_ && app->environment().ajax()) {
    +    WContainerWidget *resizeHandle = new WContainerWidget();
    +    resizeHandle->setStyleClass("Wt-tv-rh headerrh");
    +    resizeHandle->mouseWentDown().connect(resizeHandleMDownJS_);
    +
    +    bool ie = wApp->environment().agentIsIE();
    +    WContainerWidget *parent
    +      = ie ? w : dynamic_cast<WContainerWidget *>(result->widget(0));
    +    parent->insertWidget(0, resizeHandle);
    +
    +    if (ie) {
    +      parent->setAttributeValue("style", "zoom: 1");
    +      parent->resize(WLength::Auto, headerLineHeight_);
    +    }
    +  }
    +
    +  WText *spacer = new WText();
    +  spacer->setInline(false);
    +  spacer->setStyleClass("Wt-tv-br headerrh");
    +  result->addWidget(spacer);
    +
    +  return result;
    +}
    +
    +void WAbstractItemView::setDragEnabled(bool enable)
    +{
    +  if (dragEnabled_ != enable) {
    +    dragEnabled_ = enable;
    +
    +    if (enable) {
    +      dragWidget_ = new WText(headerContainer());
    +      dragWidget_->setId(id() + "dw");
    +      dragWidget_->setInline(false);
    +      dragWidget_->hide();
    +      setAttributeValue("dwid", dragWidget_->id());
    +
    +      configureModelDragDrop();
    +    } else {
    +      // TODO disable
    +    }
    +  }
    +}
    +
    +int WAbstractItemView::headerLevelCount() const
    +{
    +  int result = 0;
    +
    +  if (model_)
    +    for (unsigned int i = 0; i < columns_.size(); ++i)
    +      if (!columns_[i].hidden)
    +	result = std::max(result, headerLevel(i));
    +
    +  return result + 1;
    +}
    +
    +
    +void WAbstractItemView::setHeaderHeight(const WLength& height, bool multiLine)
    +{
    +  headerLineHeight_ = height;
    +  multiLineHeader_ = multiLine;
    +
    +  int lineCount = headerLevelCount();
    +  WLength headerHeight = headerLineHeight_ * lineCount;
    +
    +  if (columns_.size() > 0) {
    +    WWidget *w = headerWidget(0);
    +    if (w)
    +      w->askRerender(); // for layout
    +  }
    +
    +  headerHeightRule_->templateWidget()->resize(WLength::Auto, headerHeight);
    +  if (!multiLineHeader_)
    +    headerHeightRule_->templateWidget()->setLineHeight(headerLineHeight_);
    +  else
    +    headerHeightRule_->templateWidget()->setLineHeight(WLength::Auto);
    +}
    +
    +void WAbstractItemView::bindObjJS(JSlot& slot, const std::string& jsMethod)
    +{
    +  slot.setJavaScript
    +    ("function(obj, event) {"
    +     """jQuery.data(" + jsRef() + ", 'obj')." + jsMethod + "(obj, event);"
    +     "}");
    +}
    +
    +void WAbstractItemView::connectObjJS(EventSignalBase& s,
    +				     const std::string& jsMethod)
    +{
    +  s.connect
    +    ("function(obj, event) {"
    +     """jQuery.data(" + jsRef() + ", 'obj')." + jsMethod + "(obj, event);"
    +     "}");
    +}
    +
    +void WAbstractItemView::modelLayoutAboutToBeChanged()
    +{
    +  if (rootIndex_.isValid())
    +    rootIndex_.encodeAsRawIndex();
    +}
    +
    +void WAbstractItemView::modelLayoutChanged()
    +{
    +  if (rootIndex_.isValid())
    +    rootIndex_ = rootIndex_.decodeFromRawIndex();
    +
    +  editedItems_.clear();
    +
    +  scheduleRerender(NeedRerenderData);
    +}
    +
    +WWidget *WAbstractItemView::createPageNavigationBar()
    +{
    +  return new DefaultPagingBar(this);
    +}
    +
    +void WAbstractItemView::collapseColumn(int columnid)
    +{
    +  model_->collapseColumn(columnById(columnid));
    +  scheduleRerender(NeedRerenderHeader);
    +  setHeaderHeight(headerLineHeight_, multiLineHeader_);
    +}
    +
    +void WAbstractItemView::expandColumn(int columnid)
    +{
    +  model_->expandColumn(columnById(columnid));
    +  scheduleRerender(NeedRerenderHeader);
    +  setHeaderHeight(headerLineHeight_, multiLineHeader_);
    +}
    +
    +void WAbstractItemView::handleClick(const WModelIndex& index,
    +				    const WMouseEvent& event)
    +{
    +  bool doEdit = ((editTriggers() & SelectedClicked) && isSelected(index))
    +    || (editTriggers() & SingleClicked);
    +
    +  selectionHandleClick(index, event.modifiers());
    +
    +  if (doEdit)
    +    edit(index);
    +
    +  clicked_.emit(index, event);
    +}
    +
    +void WAbstractItemView::handleDoubleClick(const WModelIndex& index,
    +					  const WMouseEvent& event)
    +{
    +  bool doEdit = editTriggers() & DoubleClicked;
    +  if (doEdit)
    +    edit(index);
    +
    +  doubleClicked_.emit(index, event);
    +}
    +
    +void WAbstractItemView::handleMouseDown(const WModelIndex& index,
    +					const WMouseEvent& event)
    +{
    +  mouseWentDown_.emit(index, event);
    +}
    +
    +void WAbstractItemView::setEditTriggers(WFlags<EditTrigger> editTriggers)
    +{
    +  editTriggers_ = editTriggers;
    +}
    +
    +void WAbstractItemView::setEditOptions(WFlags<EditOption> editOptions)
    +{
    +  editOptions_ = editOptions;
    +}
    +
    +void WAbstractItemView::edit(const WModelIndex& index)
    +{ 
    +  if (index.flags() & ItemIsEditable && !isEditing(index)) {
    +    if (editOptions_ & SingleEditor) {
    +      while (!editedItems_.empty())
    +	closeEditor(editedItems_.begin()->first, false);
    +    }
    +
    +    Utils::insert(editedItems_, index, Editor());
    +    editedItems_[index].widget = 0;
    +    editedItems_[index].stateSaved = false;
    +
    +    modelDataChanged(index, index);
    +  }
    +}
    +
    +void WAbstractItemView::closeEditorWidget(WWidget *editor, bool saveData)
    +{
    +  for (EditorMap::iterator i = editedItems_.begin();
    +       i != editedItems_.end(); ++i)
    +    if (i->second.widget == editor) {
    +      if (editOptions_ & LeaveEditorsOpen) {
    +	// Save data, but keep editor open
    +	if (saveData)
    +	  saveEditedValue(i->first, i->second);
    +      } else
    +	closeEditor(i->first, saveData);
    +
    +      return;
    +    }
    +}
    +
    +void WAbstractItemView::closeEditor(const WModelIndex& index, bool saveData)
    +{
    +  EditorMap::iterator i = editedItems_.find(index);
    +
    +  if (i != editedItems_.end()) {
    +    Editor& editor = i->second;
    +
    +    if (saveData || editOptions_ & SaveWhenClosed)
    +      saveEditedValue(index, editor);
    +
    +    WModelIndex closed = index;
    +#ifndef WT_TARGET_JAVA
    +    editedItems_.erase(i);
    +#else
    +    editedItems_.erase(index);
    +#endif
    +
    +    modelDataChanged(closed, closed);
    +  }
    +}
    +
    +void WAbstractItemView::closeEditors(bool saveData) 
    +{
    +  while(!editedItems_.empty()) {
    +    closeEditor(editedItems_.begin()->first, saveData);
    +  }
    +}
    +
    +WValidator::State WAbstractItemView::validateEditor(const WModelIndex& index)
    +{
    +  EditorMap::iterator i = editedItems_.find(index);
    +
    +  if (i != editedItems_.end()) {
    +    WAbstractItemDelegate *delegate = itemDelegate(index);
    +
    +    boost::any editState;
    +
    +    Editor& editor = i->second;
    +
    +    if (editor.widget)
    +      editState = delegate->editState(editor.widget);
    +    else
    +      editState = editor.editState;
    +
    +    WValidator::State state = delegate->validate(index, editState);
    +    editor.valid = (state == WValidator::Valid);
    +    
    +    return state;
    +  }
    +  
    +  return WValidator::Invalid;
    +}
    +
    +WValidator::State WAbstractItemView::validateEditors() 
    +{
    +  WValidator::State state = WValidator::Valid;
    +
    +  for (EditorMap::const_iterator i = editedItems_.begin();
    +       i != editedItems_.end(); ++i) {
    +    WValidator::State s = validateEditor(i->first);
    +    if (s < state)
    +      state = s;
    +  }
    +
    +  return state;
    +}
    +
    +bool WAbstractItemView::isEditing(const WModelIndex& index) const
    +{
    +  return editedItems_.find(index) != editedItems_.end();
    +}
    +
    +bool WAbstractItemView::isValid(const WModelIndex& index) const
    +{  
    +  EditorMap::const_iterator i = editedItems_.find(index);
    +
    +  if (i != editedItems_.end()) {
    +    const Editor& editor = i->second;
    +    return editor.valid;
    +  } else
    +    return false;
    +}
    +
    +bool WAbstractItemView::hasEditFocus(const WModelIndex& index) const
    +{
    +  /*
    +   * Later, we may want to only return true for the 'smallest' index
    +   * satisfying all these conditions
    +   */
    +  EditorMap::const_iterator i = editedItems_.find(index);
    +
    +  if (i != editedItems_.end()) {
    +    const Editor& editor = i->second;
    +    return !editor.widget && !editor.stateSaved;
    +  } else
    +    return false;
    +}
    +
    +bool WAbstractItemView::isEditing() const
    +{
    +  return !editedItems_.empty();
    +}
    +
    +void WAbstractItemView::saveEditedValue(const WModelIndex& index,
    +					Editor& editor)
    +{
    +  boost::any editState;
    +  WAbstractItemDelegate *delegate = itemDelegate(index);
    +    
    +  if (editor.widget)
    +    editState = delegate->editState(editor.widget);
    +  else
    +    editState = editor.editState;
    +
    +  delegate->setModelData(editState, model(), index);
    +}
    +
    +void WAbstractItemView::setEditState(const WModelIndex& index,
    +				     const boost::any& editState)
    +{
    +  editedItems_[index].editState = editState;
    +}
    +
    +void WAbstractItemView::setEditorWidget(const WModelIndex& index,
    +					WWidget *editor)
    +{
    +  editedItems_[index].widget = editor;
    +  editedItems_[index].stateSaved = !editor;
    +}
    +
    +boost::any WAbstractItemView::editState(const WModelIndex& index) const
    +{
    +  EditorMap::const_iterator i = editedItems_.find(index);
    +
    +  if (i != editedItems_.end())
    +    return i->second.editState;
    +  else
    +    return boost::any();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractListModel b/wt-3.1.7a/src/Wt/WAbstractListModel
    new file mode 100644
    index 0000000..d302e83
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractListModel
    @@ -0,0 +1,45 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_LIST_MODEL_H_
    +#define WABSTRACT_LIST_MODEL_H_
    +
    +#include <Wt/WAbstractItemModel>
    +
    +namespace Wt {
    +
    +/*! \class WAbstractListModel Wt/WAbstractListModel Wt/WAbstractListModel
    + *  \brief An abstract list model for use with %Wt's view classes.
    + *
    + * An abstract list model specializes WAbstractItemModel for
    + * one-dimensional lists (i.e. a model with 1 column and no children).
    + *
    + * It cannot be used directly but must be subclassed. Subclassed
    + * models must at least reimplement rowCount() to return the number of
    + * rows, and data() to return data.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractListModel : public WAbstractItemModel
    +{
    +public:
    +  /*! \brief Create a new abstract list model.
    +   */
    +  WAbstractListModel(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WAbstractListModel();
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +};
    +
    +}
    +
    +#endif // WABSTRACT_LIST_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractListModel.C b/wt-3.1.7a/src/Wt/WAbstractListModel.C
    new file mode 100644
    index 0000000..6b92ed7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractListModel.C
    @@ -0,0 +1,34 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WAbstractListModel>
    +
    +namespace Wt {
    +
    +WAbstractListModel::WAbstractListModel(WObject *parent)
    +  : WAbstractItemModel(parent)
    +{ }
    +
    +WAbstractListModel::~WAbstractListModel()
    +{ }
    +
    +WModelIndex WAbstractListModel::parent(const WModelIndex& index) const
    +{
    +  return WModelIndex();
    +}
    +
    +WModelIndex WAbstractListModel::index(int row, int column,
    +				      const WModelIndex& parent) const
    +{
    +  return createIndex(row, column, (void *)0);
    +}
    + 
    +int WAbstractListModel::columnCount(const WModelIndex& parent) const
    +{
    +  return parent.isValid() ? 0 : 1;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractProxyModel b/wt-3.1.7a/src/Wt/WAbstractProxyModel
    new file mode 100644
    index 0000000..911435b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractProxyModel
    @@ -0,0 +1,164 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_PROXY_MODEL_H_
    +#define WABSTRACT_PROXY_MODEL_H_
    +
    +#include <Wt/WAbstractItemModel>
    +
    +namespace Wt {
    +
    +/*! \class WAbstractProxyModel Wt/WAbstractProxyModel Wt/WAbstractProxyModel
    + *  \brief An abstract proxy model for %Wt's item models.
    + *
    + * A proxy model does not store data, but presents data from a source
    + * model in another way. It may provide filtering, sorting, or other
    + * computed changes to the source model. A proxy model may be a fully
    + * functional model, that also allows modification of the underlying
    + * model.
    + *
    + * This abstract proxy model may be used as a starting point for
    + * implementing a custom proxy model, when WSortFilterProxyModel is
    + * not adequate. It implements data access and manipulation using the
    + * a virtual mapping method (mapToSource()) to access and manipulate
    + * the underlying sourceModel().
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractProxyModel : public WAbstractItemModel
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WAbstractProxyModel(WObject *parent = 0);
    +
    +  /*! \brief Maps a source model index to the proxy model.
    +   *
    +   * This method returns a model index in the proxy model that
    +   * corresponds to the model index \p sourceIndex in the source
    +   * model. This method must only be implemented for source model
    +   * indexes that are mapped and thus are the result of mapToSource().
    +   *
    +   * \sa mapToSource()
    +   */
    +  virtual WModelIndex mapFromSource(const WModelIndex& sourceIndex) const = 0;
    +
    +  /*! \brief Maps a proxy model index to the source model.
    +   *
    +   * This method returns a model index in the source model that
    +   * corresponds to the proxy model index \p proxyIndex.
    +   *
    +   * \sa mapFromSource()
    +   */
    +  virtual WModelIndex mapToSource(const WModelIndex& proxyIndex) const = 0;
    +
    +  /*! \brief Sets the source model.
    +   *
    +   * The source model provides the actual data for the proxy
    +   * model.
    +   *
    +   * Ownership of the source model is <i>not</i> transferred.
    +   */
    +  virtual void setSourceModel(WAbstractItemModel *sourceModel);
    +
    +  /*! \brief Returns the source model.
    +   *
    +   * \sa setSourceModel()
    +   */
    +  WAbstractItemModel *sourceModel() const { return sourceModel_; }
    +
    +#ifndef DOXYGEN_ONLY
    +  using WAbstractItemModel::setData;
    +  using WAbstractItemModel::data;
    +  using WAbstractItemModel::setHeaderData;
    +
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const;
    +  virtual bool setData(const WModelIndex& index, const boost::any& value,
    +		       int role = EditRole);
    +
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  virtual bool insertColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +  virtual bool removeColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +
    +  virtual std::string mimeType() const;
    +  virtual std::vector<std::string> acceptDropMimeTypes() const;
    +
    +  virtual void dropEvent(const WDropEvent& e, DropAction action,
    +			 int row, int column, const WModelIndex& parent);
    +
    +  virtual void *toRawIndex(const WModelIndex& index) const;
    +  virtual WModelIndex fromRawIndex(void *rawIndex) const;
    +#endif // DOXYGEN_ONLY
    +
    +protected:
    +  /*! \brief Create a source model index.
    +   *
    +   * This is a utility function that allows you to create indexes in
    +   * the source model. In this way, you can reuse the internal pointers of
    +   * the source model in proxy model indexes, and convert a proxy model index
    +   * back to the source model index using this method.
    +   */
    +  WModelIndex createSourceIndex(int row, int column, void *ptr) const;
    +
    +  /*! \brief A base class for an item modeling a source index parent.
    +   *
    +   * Many mplementations of a proxy model will need to maintain a data
    +   * structure per source model indexes, where they relate source rows or
    +   * columns to proxy rows or columns, per hierarchical parent.
    +   *
    +   * It may be convenient to start from this item class as a base
    +   * class so that shiftModelIndexes() can be used to update this data
    +   * structure when the source model adds or removes rows.
    +   *
    +   * You will typically use your derived class of this item as the
    +   * internal pointer for proxy model indexes: a proxy model index
    +   * will have an item as internal pointer whose sourceIndex_ corresponds
    +   * to the source equivalent of the proxy model index parent.
    +   *
    +   * \sa createIndex()
    +   */
    +  struct BaseItem {
    +    /*! \brief The source model index.
    +     *
    +     * The source model index for this item.
    +     */
    +    WModelIndex sourceIndex_;
    +
    +    /*! \brief Create a BaseItem.
    +     */
    +    BaseItem(const WModelIndex& sourceIndex) : sourceIndex_(sourceIndex) { }
    +    virtual ~BaseItem();
    +  };
    +
    +  /*! \brief A map for items.
    +   *
    +   * \sa BaseItem
    +   */
    +#ifndef WT_TARGET_JAVA
    +  typedef std::map<WModelIndex, BaseItem *> ItemMap;
    +#else
    +  typedef std::treemap<WModelIndex, BaseItem *> ItemMap;
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Utility methods to shift items in an item map.
    +   *
    +   * You can use this method to adjust an item map after the source
    +   * model has inserted or removed rows. When removing rows (count < 0),
    +   * items may possibly be removed and deleted.
    +   */
    +  void shiftModelIndexes(const WModelIndex& sourceParent, int start, int count,
    +			 ItemMap& items);
    +private:
    +  WAbstractItemModel     *sourceModel_;
    +};
    +
    +}
    +
    +#endif // WSORT_FILTER_PROXY_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractProxyModel.C b/wt-3.1.7a/src/Wt/WAbstractProxyModel.C
    new file mode 100644
    index 0000000..5f8fde1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractProxyModel.C
    @@ -0,0 +1,169 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAbstractProxyModel"
    +
    +namespace Wt {
    +
    +#ifndef DOXYGEN_ONLY
    +
    +WAbstractProxyModel::BaseItem::~BaseItem()
    +{ }
    +
    +WAbstractProxyModel::WAbstractProxyModel(WObject *parent)
    +  : WAbstractItemModel(parent),
    +    sourceModel_(0)
    +{ }
    +
    +void WAbstractProxyModel::setSourceModel(WAbstractItemModel *sourceModel)
    +{
    +  sourceModel_ = sourceModel;
    +}
    +
    +boost::any WAbstractProxyModel::data(const WModelIndex& index, int role) const
    +{
    +  return sourceModel_->data(mapToSource(index), role);
    +}
    +
    +bool WAbstractProxyModel::setData(const WModelIndex& index,
    +				  const boost::any& value, int role)
    +{
    +  return sourceModel_->setData(mapToSource(index), value, role);
    +}
    +
    +WFlags<ItemFlag> WAbstractProxyModel::flags(const WModelIndex& index) const
    +{
    +  return sourceModel_->flags(mapToSource(index));
    +}
    +
    +bool WAbstractProxyModel::insertColumns(int column, int count,
    +					const WModelIndex& parent)
    +{
    +  return sourceModel_->insertColumns(column, count, parent);
    +}
    +
    +bool WAbstractProxyModel::removeColumns(int column, int count,
    +					const WModelIndex& parent)
    +{
    +  return sourceModel_->removeColumns(column, count, parent);
    +}
    +
    +std::string WAbstractProxyModel::mimeType() const
    +{
    +  return sourceModel_->mimeType();
    +}
    +
    +std::vector<std::string> WAbstractProxyModel::acceptDropMimeTypes() const
    +{
    +  return sourceModel_->acceptDropMimeTypes();
    +}
    +
    +void WAbstractProxyModel::dropEvent(const WDropEvent& e, DropAction action,
    +				    int row, int column,
    +				    const WModelIndex& parent)
    +{
    +  WModelIndex sourceParent = mapToSource(parent);
    +
    +  int sourceRow = row;
    +  int sourceColumn = column;
    +
    +  if (sourceRow != -1)
    +    sourceRow = mapToSource(index(row, 0, parent)).row();
    +
    +  sourceModel_->dropEvent(e, action, sourceRow, sourceColumn, sourceParent);
    +}
    +
    +void *WAbstractProxyModel::toRawIndex(const WModelIndex& index) const
    +{
    +  return sourceModel_->toRawIndex(mapToSource(index));
    +}
    +
    +WModelIndex WAbstractProxyModel::fromRawIndex(void *rawIndex) const
    +{
    +  return mapFromSource(sourceModel_->fromRawIndex(rawIndex));
    +}
    +
    +WModelIndex WAbstractProxyModel::createSourceIndex(int row, int column,
    +						   void *ptr) const
    +{
    +  return sourceModel_->createIndex(row, column, ptr);
    +}
    +
    +void WAbstractProxyModel::shiftModelIndexes(const WModelIndex& sourceParent,
    +					    int start, int count,
    +					    ItemMap& items)
    +{
    +  /*
    +   * We must shift all indexes within sourceParent >= start with count
    +   * and delete items when count < 0.
    +   */
    +  std::vector<BaseItem *> shifted;
    +  std::vector<BaseItem *> erased;
    +
    +  for (ItemMap::iterator it
    +	 = items.lower_bound(sourceModel()->index(start, 0, sourceParent));
    +       it != items.end();) {
    +#ifndef WT_TARGET_JAVA
    +    ItemMap::iterator n = it;
    +    ++n;
    +#endif
    +    WModelIndex i = it->first;
    +
    +    if (i.isValid()) {
    +      WModelIndex p = i.parent();
    +      if (p != sourceParent && !WModelIndex::isAncestor(p, sourceParent))
    +	break;
    +
    +      if (p == sourceParent) {
    +	shifted.push_back(it->second);
    +      } else if (count < 0) {
    +	// delete indexes that are about to be deleted, if they are within
    +	// the range of deleted indexes
    +	do {
    +	  if (p.parent() == sourceParent
    +	      && p.row() >= start
    +	      && p.row() < start - count) {
    +	    erased.push_back(it->second);
    +	    break;
    +	  } else
    +	    p = p.parent();
    +	} while (p != sourceParent);
    +      }
    +    }
    +
    +#ifndef WT_TARGET_JAVA
    +    it = n;
    +#endif
    +  }
    +
    +  for (unsigned i = 0; i < erased.size(); ++i) {
    +    items.erase(erased[i]->sourceIndex_);
    +    delete erased[i];
    +  }
    +
    +  for (unsigned i = 0; i < shifted.size(); ++i) {
    +    BaseItem *item = shifted[i];
    +    items.erase(item->sourceIndex_);
    +    if (item->sourceIndex_.row() + count >= start) {
    +      item->sourceIndex_ = sourceModel()->index
    +	(item->sourceIndex_.row() + count,
    +	 item->sourceIndex_.column(),
    +	 sourceParent);
    +    } else {
    +      delete item;
    +      shifted[i] = 0;
    +    }
    +  }
    +
    +  for (unsigned i = 0; i < shifted.size(); ++i) {
    +    if (shifted[i])
    +      items[shifted[i]->sourceIndex_] = shifted[i];
    +  }
    +}
    +
    +#endif // DOXYGEN_ONLY
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractServer b/wt-3.1.7a/src/Wt/WAbstractServer
    new file mode 100644
    index 0000000..1bae536
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractServer
    @@ -0,0 +1,26 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_SERVER_H_
    +#define WABSTRACT_SERVER_H_
    +
    +#include <Wt/WApplication>
    +
    +namespace Wt {
    +
    +class WebRequest;
    +
    +class WT_API WAbstractServer
    +{
    +public:
    +  virtual ~WAbstractServer();
    +
    +  virtual void handleRequest(WebRequest *request) = 0;
    +};
    +
    +}
    +
    +#endif // WABSTRACT_SERVER_H_ 
    diff --git a/wt-3.1.7a/src/Wt/WAbstractServer.C b/wt-3.1.7a/src/Wt/WAbstractServer.C
    new file mode 100644
    index 0000000..4f87be4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractServer.C
    @@ -0,0 +1,14 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAbstractServer"
    +
    +namespace Wt {
    +
    +WAbstractServer::~WAbstractServer()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractTableModel b/wt-3.1.7a/src/Wt/WAbstractTableModel
    new file mode 100644
    index 0000000..186252b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractTableModel
    @@ -0,0 +1,43 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACT_TABLE_MODEL_H_
    +#define WABSTRACT_TABLE_MODEL_H_
    +
    +#include <Wt/WAbstractItemModel>
    +
    +namespace Wt {
    +
    +/*! \class WAbstractTableModel Wt/WAbstractTableModel Wt/WAbstractTableModel
    + *  \brief An abstract table model for use with %Wt's view classes.
    + *
    + * An abstract table model specializes WAbstractItemModel for
    + * two-dimensional tables (but no hierarchical models).
    + *
    + * It cannot be used directly but must be subclassed. Subclassed
    + * models must at least reimplement columnCount(), rowCount() and data().
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAbstractTableModel : public WAbstractItemModel
    +{
    +public:
    +  /*! \brief Creates a new abstract list model.
    +   */
    +  WAbstractTableModel(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WAbstractTableModel();
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +};
    +
    +}
    +
    +#endif // WABSTRACT_TABLE_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractTableModel.C b/wt-3.1.7a/src/Wt/WAbstractTableModel.C
    new file mode 100644
    index 0000000..88edb1b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractTableModel.C
    @@ -0,0 +1,29 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WAbstractTableModel>
    +
    +namespace Wt {
    +
    +WAbstractTableModel::WAbstractTableModel(WObject *parent)
    +  : WAbstractItemModel(parent)
    +{ }
    +
    +WAbstractTableModel::~WAbstractTableModel()
    +{ }
    +
    +WModelIndex WAbstractTableModel::parent(const WModelIndex& index) const
    +{
    +  return WModelIndex();
    +}
    +
    +WModelIndex WAbstractTableModel::index(int row, int column,
    +				       const WModelIndex& parent) const
    +{
    +  return createIndex(row, column, (void *)0);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAbstractToggleButton b/wt-3.1.7a/src/Wt/WAbstractToggleButton
    new file mode 100644
    index 0000000..8eded1a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractToggleButton
    @@ -0,0 +1,139 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WABSTRACTTOGGLEBUTTON_H_
    +#define WABSTRACTTOGGLEBUTTON_H_
    +
    +#include <Wt/WFormWidget>
    +
    +namespace Wt {
    +
    +class WLabel;
    +
    +/*! \brief An abstract base class for radio buttons and check boxes.
    + *
    + * A toggle button provides a button with a boolean state (checked or
    + * unchecked), and a text label.
    + *
    + * To act on a change of the state, either connect a slot to the changed()
    + * signal, or connect a slot to the checked() or unChecked() signals.
    + *
    + * The current state (checked or unchecked) may be inspected using the
    + * isChecked() method.
    + */
    +class WT_API WAbstractToggleButton : public WFormWidget
    +{
    +protected:
    +  /*! \brief Creates an unchecked toggle button without label.
    +   */
    +  WAbstractToggleButton(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an unchecked toggle button with given text label.
    +   *
    +   * The text label is rendered to the right side of the button.
    +   */
    +  WAbstractToggleButton(const WString& text, WContainerWidget *parent = 0);
    +
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WAbstractToggleButton();
    +
    +  /*! \brief Sets the label text.
    +   *
    +   * The label is rendered to the right fo the button.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the label text.
    +   *
    +   * \sa setText()
    +   */
    +  const WString text() const;
    +
    +  /*! \brief Returns the button state.
    +   *
    +   * \sa setChecked()
    +   */
    +  bool isChecked() const { return state_ == Checked; }
    +
    +  /*! \brief Sets the button state.
    +   *
    +   * This method does not emit one of the checked() or unChecked()
    +   * signals.
    +   *
    +   * \sa setChecked(), setUnChecked()
    +   */
    +  void setChecked(bool checked);
    +
    +  /*! \brief Checks the button.
    +   *
    +   * Does not emit the checked() signal.
    +   *
    +   * \sa setChecked(bool)
    +   */
    +  virtual void setChecked();
    +
    +  /*! \brief Unchecks the button.
    +   *
    +   * Does not emit the unChecked() signal.
    +   *
    +   * \sa setChecked(bool)
    +   */
    +  virtual void setUnChecked();
    +
    +  /*! \brief %Signal emitted when the button gets checked.
    +   *
    +   * This signal is emitted when the user checks the button.
    +   *
    +   * You can use the changed() signal to react to any change of the
    +   * button state.
    +   */
    +  EventSignal<>& checked();
    +
    +  /*! \brief %Signal emitted when the button gets unChecked.
    +   *
    +   * This signal is emitted when the user unchecks the button.
    +   *
    +   * You can use the changed() signal to react to any change of the
    +   * button state.
    +   */
    +  EventSignal<>& unChecked();
    +
    +protected:
    +  CheckState state_;
    +
    +  virtual void updateInput(DomElement& input, bool all) = 0;
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void getFormObjects(FormObjectsMap& formObjects);
    +  virtual void setFormData(const FormData& formData);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual DomElementType domElementType() const;
    +  virtual bool supportsIndeterminate(const WEnvironment& env) const;
    +  virtual std::string formName() const;
    +
    +  virtual WStatelessSlot *getStateless(Method method);
    +
    +private:
    +  static const char *CHECKED_SIGNAL;
    +  static const char *UNCHECKED_SIGNAL;
    +  static const char *UNDETERMINATE_CLICK_SIGNAL;
    +
    +  bool stateChanged_;
    +  CheckState prevState_;
    +
    +  void undoSetChecked();
    +  void undoSetUnChecked();
    +  void setCheckState(CheckState state);
    +
    +  friend class WCheckBox;
    +  friend class WRadioButton;
    +  friend class WButtonGroup;
    +};
    +
    +}
    +
    +#endif // WABSTRACTTOGGLEBUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/WAbstractToggleButton.C b/wt-3.1.7a/src/Wt/WAbstractToggleButton.C
    new file mode 100644
    index 0000000..d40a8e0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAbstractToggleButton.C
    @@ -0,0 +1,316 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WAbstractToggleButton"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLabel"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +const char *WAbstractToggleButton::CHECKED_SIGNAL = "M_checked";
    +const char *WAbstractToggleButton::UNCHECKED_SIGNAL = "M_unchecked";
    +
    +WAbstractToggleButton::WAbstractToggleButton(WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    state_(Unchecked),
    +    stateChanged_(false)
    +{ }
    +
    +WAbstractToggleButton::WAbstractToggleButton(const WString& text,
    +					     WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    state_(Unchecked),
    +    stateChanged_(false)
    +{ 
    +  WLabel *label = new WLabel(text);
    +  label->setBuddy(this);
    +  addChild(label);
    +}
    +
    +WAbstractToggleButton::~WAbstractToggleButton()
    +{ }
    +
    +#ifndef WT_TARGET_JAVA
    +WStatelessSlot *WAbstractToggleButton::getStateless(Method method)
    +{
    +  void (WAbstractToggleButton::*setC)() = &WAbstractToggleButton::setChecked;
    +
    +  if (method == static_cast<WObject::Method>(setC))
    +    return implementStateless(setC, &WAbstractToggleButton::undoSetChecked);
    +  else if (method == static_cast<WObject::Method>
    +	   (&WAbstractToggleButton::setUnChecked))
    +    return implementStateless(&WAbstractToggleButton::setUnChecked,
    +			      &WAbstractToggleButton::undoSetUnChecked);
    +  else
    +    return WFormWidget::getStateless(method);
    +}
    +#endif
    +
    +EventSignal<>& WAbstractToggleButton::checked()
    +{
    +  return *voidEventSignal(CHECKED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WAbstractToggleButton::unChecked()
    +{
    +  return *voidEventSignal(UNCHECKED_SIGNAL, true);
    +}
    +
    +void WAbstractToggleButton::setText(const WString& text)
    +{
    +  WLabel *l = label();
    +
    +  if (!l) {
    +    l = new WLabel(text);
    +    l->setBuddy(this);
    +    addChild(l);
    +  }
    +
    +  l->setText(text);
    +}
    +
    +const WString WAbstractToggleButton::text() const
    +{
    +  if (label())
    +    return label()->text();
    +  else
    +    return WString();
    +}
    +
    +void WAbstractToggleButton::setChecked(bool how)
    +{
    +  setCheckState(how ? Checked : Unchecked);
    +}
    +
    +void WAbstractToggleButton::setCheckState(CheckState state)
    +{
    +  if (canOptimizeUpdates() && state == state_)
    +    return;
    +
    +  state_ = state;
    +  stateChanged_ = true;
    +  repaint(RepaintPropertyIEMobile);
    +}
    +
    +void WAbstractToggleButton::setChecked()
    +{
    +  prevState_ = state_;
    +  setChecked(true);
    +}
    +
    +void WAbstractToggleButton::setUnChecked()
    +{
    +  prevState_ = state_;
    +  setChecked(false);
    +}
    +
    +void WAbstractToggleButton::undoSetChecked()
    +{
    +  setCheckState(prevState_);
    +}
    +
    +void WAbstractToggleButton::undoSetUnChecked()
    +{
    +  undoSetChecked();
    +}
    +
    +void WAbstractToggleButton::updateDom(DomElement& element, bool all)
    +{
    +  WApplication *app = WApplication::instance();
    +  const WEnvironment& env = app->environment();
    +
    +  DomElement *input = 0;
    +  if (element.type() == DomElement_SPAN) {
    +    if (all) {
    +      input = DomElement::createNew(DomElement_INPUT);
    +      input->setName("in" + id());
    +    } else
    +      input = DomElement::getForUpdate("in" + id(), DomElement_INPUT);
    +  } else
    +    input = &element;
    +
    +  if (all)
    +    updateInput(*input, all);
    +
    +  EventSignal<> *check = voidEventSignal(CHECKED_SIGNAL, false);
    +  EventSignal<> *uncheck = voidEventSignal(UNCHECKED_SIGNAL, false);
    +  EventSignal<> *change = voidEventSignal(CHANGE_SIGNAL, false);
    +  EventSignal<WMouseEvent> *click = mouseEventSignal(CLICK_SIGNAL, false);
    +
    +  bool needUpdateClickedSignal =
    +    ((click && click->needsUpdate(all))
    +     // onchange does not work on IE
    +     || (env.agentIsIE() && change && change->needsUpdate(all))
    +     || (check && check->needsUpdate(all))
    +     || (uncheck && uncheck->needsUpdate(all)));
    +
    +  WFormWidget::updateDom(*input, all);
    +
    +  /*
    +   * Copy all properties to the exterior element, as they relate to style,
    +   * etc... We ignore here attributes, see WWebWidget: there seems not to
    +   * be attributes that sensibly need to be moved.
    +   *
    +   * But -- bug #423, disabled and readonly are properties that should be
    +   * kept on the interior element.
    +   */
    +  if (&element != input) {
    +    element.setProperties(input->properties());
    +    input->clearProperties();
    +
    +    std::string v = element.getProperty(Wt::PropertyDisabled);
    +    if (!v.empty()) {
    +      input->setProperty(Wt::PropertyDisabled, v);
    +      element.removeProperty(Wt::PropertyDisabled);
    +    }
    +
    +    v = element.getProperty(Wt::PropertyReadOnly);
    +    if (!v.empty()) {
    +      input->setProperty(Wt::PropertyReadOnly, v);
    +      element.removeProperty(Wt::PropertyReadOnly);
    +    }
    +  }
    +
    +  if (stateChanged_ || all) {
    +    input->setProperty(Wt::PropertyChecked,
    +		       state_ == Unchecked ? "false" : "true");
    +
    +    if (supportsIndeterminate(env))
    +      input->setProperty(Wt::PropertyIndeterminate,
    +			 state_ == PartiallyChecked ? "true" : "false");
    +    else
    +      input->setProperty(Wt::PropertyStyleOpacity,
    +			 state_ == PartiallyChecked ? "0.5" : "");
    +
    +    stateChanged_ = false;
    +  }
    +
    +  if (needUpdateClickedSignal || all) {
    +    std::string dom = "o";
    +    std::vector<DomElement::EventAction> actions;
    +
    +    if (check) {
    +      if (check->isConnected())
    +	actions.push_back
    +	  (DomElement::EventAction(dom + ".checked",
    +				   check->javaScript(),
    +				   check->encodeCmd(),
    +				   check->isExposedSignal()));
    +      check->updateOk();
    +    }
    +
    +    if (uncheck) {
    +      if (uncheck->isConnected())
    +	actions.push_back
    +	  (DomElement::EventAction("!" + dom + ".checked",
    +				   uncheck->javaScript(),
    +				   uncheck->encodeCmd(),
    +				   uncheck->isExposedSignal()));
    +      uncheck->updateOk();
    +    }
    +
    +    if (change) {
    +      if (env.agentIsIE() && change->needsUpdate(all))
    +	actions.push_back
    +	  (DomElement::EventAction(std::string(),
    +				   change->javaScript(),
    +				   change->encodeCmd(),
    +				   change->isExposedSignal()));
    +      change->updateOk();
    +    }
    +
    +    if (click) {
    +      if (click->needsUpdate(all))
    +	actions.push_back
    +	  (DomElement::EventAction(std::string(),
    +				   click->javaScript(),
    +				   click->encodeCmd(),
    +				   click->isExposedSignal()));
    +      click->updateOk();
    +    }
    +
    +    if (!(all && actions.empty()))
    +      input->setEvent(CLICK_SIGNAL, actions);
    +  }
    +
    +  if (&element != input)
    +    element.addChild(input);
    +
    +  if (all) {
    +    WLabel *l = label();
    +  
    +    if (l && l->parent() == this)
    +      element.addChild(((WWebWidget *)l)->createDomElement(app));
    +  }
    +}
    +
    +DomElementType WAbstractToggleButton::domElementType() const
    +{
    +  WLabel *l = label();
    +
    +  if (l && l->parent() == this)
    +    return DomElement_SPAN;
    +  else
    +    return DomElement_INPUT;
    +}
    +
    +void WAbstractToggleButton::propagateRenderOk(bool deep)
    +{
    +  stateChanged_ = false;
    +
    +  EventSignal<> *check = voidEventSignal(CHECKED_SIGNAL, false);
    +  if (check)
    +    check->updateOk();
    +
    +  EventSignal<> *uncheck = voidEventSignal(UNCHECKED_SIGNAL, false);
    +  if (uncheck)
    +    uncheck->updateOk();
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +void WAbstractToggleButton::setFormData(const FormData& formData)
    +{
    +  if (stateChanged_)
    +    return;
    +
    +  if (!Utils::isEmpty(formData.values))
    +    if (formData.values[0] == "i")
    +      state_ = PartiallyChecked;
    +    else
    +      state_ = formData.values[0] != "0" ? Checked : Unchecked;
    +  else
    +    if (isEnabled() && isVisible())
    +      state_ = Unchecked;
    +}
    +
    +void WAbstractToggleButton::getFormObjects(FormObjectsMap& formObjects)
    +{
    +  formObjects[formName()] = this;
    +}
    +
    +bool WAbstractToggleButton::supportsIndeterminate(const WEnvironment& env)
    +  const
    +{
    +  return env.javaScript()
    +    && (env.agentIsIE()
    +	|| env.agentIsSafari()
    +	|| (env.agentIsGecko() && (env.agent() >= WEnvironment::Firefox3_6)));
    +}
    +
    +std::string WAbstractToggleButton::formName() const
    +{
    +  if (domElementType() == DomElement_SPAN)
    +    return "in" + id();
    +  else
    +    return WFormWidget::formName();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAccordionLayout b/wt-3.1.7a/src/Wt/WAccordionLayout
    new file mode 100644
    index 0000000..57099b4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAccordionLayout
    @@ -0,0 +1,32 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WACCORDION_LAYOUT_H_
    +#define WACCORDION_LAYOUT_H_
    +
    +#include <Wt/WDefaultLayout>
    +
    +namespace Wt {
    +
    +/*! \class WAccordionLayout Wt/WAccordionLayout Wt/WAccordionLayout
    + *  \brief A layout manager which shows one item at a time.
    + *
    + * The accordion layout manages several widgets, but shows only one
    + * (active) item at a time.
    + *
    + * \note This layout manager is applicable only to Ext::Container
    + * container widgets.
    +*/
    +class WT_API WAccordionLayout : public WDefaultLayout
    +{
    +public:
    +  /*! \brief Creates a new accordion layout.
    +   */
    +  WAccordionLayout(WWidget *parent = 0);
    +};
    +
    +}
    +#endif // WACCORDION_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WAccordionLayout.C b/wt-3.1.7a/src/Wt/WAccordionLayout.C
    new file mode 100644
    index 0000000..833ff7b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAccordionLayout.C
    @@ -0,0 +1,18 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAccordionLayout"
    +
    +namespace Wt {
    +
    +WAccordionLayout::WAccordionLayout(WWidget *parent)
    +  : WDefaultLayout()
    +{ 
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAggregateProxyModel b/wt-3.1.7a/src/Wt/WAggregateProxyModel
    new file mode 100644
    index 0000000..49b25bc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAggregateProxyModel
    @@ -0,0 +1,237 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WAGGREGATE_PROXY_MODEL_H_
    +#define WAGGREGATE_PROXY_MODEL_H_
    +
    +#include <Wt/WAbstractProxyModel>
    +
    +namespace Wt {
    +
    +class WRegExp;
    +
    +/*! \class WAggregateProxyModel Wt/WAggregateProxyModel Wt/WAggregateProxyModel
    + *  \brief A proxy model for %Wt's item models that provides column aggregation.
    + *
    + * This proxy model does not store data itself, but presents data from
    + * a source model, and presents methods to organize columns using aggregation,
    + * through which a user may navigate (usually to obtain more detailed results
    + * related to a single aggregate quantity).
    + *
    + * To use this proxy model, you should provide a source model using
    + * setSourceModel(), and define column ranges that can be aggregated
    + * using addAggregate().
    + *
    + * \if cpp
    + * Example:
    + * \code
    +    int COLS = 18;
    +    int ROWS = 20;
    +
    +    // set up the source model
    +    model_ = new WStandardItemModel(0, COLS);
    +
    +    std::string columns[] = {
    +      "Supplier",
    +      "2004",
    +        "Q1",
    +          "January",
    +          "February",
    +          "March",
    +        "Q2",
    +          "April",
    +          "May",
    +          "June",
    +        "Q3",
    +          "July",
    +          "August",
    +          "September",
    +        "Q4",
    +          "October",
    +          "November",
    +          "December"
    +    };
    +
    +    for (unsigned i = 0; i < COLS; ++i) {
    +      model_->setHeaderData(i, Horizontal, columns[i]);
    +    }
    +
    +    for (unsigned i = 0; i < ROWS; ++i) {
    +      model_->insertRow(i);
    +      for (unsigned j = 0; j < COLS; ++j)
    +	model_->setData(i, j, "col " + boost::lexical_cast<std::string>(j));
    +    }
    +
    +    // set up the proxy model
    +    WAggregateProxyModel *proxy = new WAggregateProxyModel();
    +    proxy->setSourceModel(model_);
    +
    +    proxy->addAggregate(1, 2, 17);
    +    proxy->addAggregate(2, 3, 5);
    +    proxy->addAggregate(6, 7, 9);
    +    proxy->addAggregate(10, 11, 13);
    +    proxy->addAggregate(14, 15, 17);
    +
    +    proxy->expandColumn(1); // expand 2004 -> Q1 Q2 Q3 Q4
    +
    +    // define a view
    +    treeView_ = new WTreeView(root());
    +    treeView_->setColumnBorder(Wt::black);
    +    treeView_->setModel(proxy);
    +    treeView_->setColumnWidth(0, 160);
    +    treeView_->setColumnResizeEnabled(true);
    +    treeView_->setSortingEnabled(true);
    +\endcode
    + * \endif
    + *
    + * This example would render like this:
    + *
    + * \image html WAggregateProxyModel-1.png "A WTreeView using a WAggregateProxyModel"
    + *
    + * \note This model does not support dynamic changes to the column
    + * definition of the source model (i.e. insertions or deletions of
    + * source model columns).
    + *
    + * \ingroup modelview
    + */
    +class WT_API WAggregateProxyModel : public WAbstractProxyModel
    +{
    +public:
    +  /*! \brief Constructor.
    +   *
    +   * Sets up the proxy without aggregation functionality.
    +   */
    +  WAggregateProxyModel(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WAggregateProxyModel();
    +
    +  /*! \brief Adds a new column aggregation definition.
    +   *
    +   * The \p parentColumn is the column index in the source model that
    +   * acts as an aggregate for columns \p firstColumn to \p
    +   * lastColumn. \p parentColumn must border the range defined by
    +   * \p firstColumn to \p lastColumn:
    +   * \code
    +   * parentColumn == firstColumn - 1 || parentColumn == lastColumn + 1 
    +   * \endcode
    +   *
    +   * Note that column parameters reference column indexes in the
    +   * source model.
    +   *
    +   * Aggregation definitions can be nested, but should be strictly
    +   * hierarchical.
    +   *
    +   * The aggregate column will initially be collapsed.
    +   *
    +   * Only one aggregate can be defined per \p parentColumn.
    +   */
    +  void addAggregate(int parentColumn, int firstColumn, int lastColumn);
    +
    +  virtual WModelIndex mapFromSource(const WModelIndex& sourceIndex) const;
    +  virtual WModelIndex mapToSource(const WModelIndex& proxyIndex) const;
    +
    +  virtual void setSourceModel(WAbstractItemModel *sourceModel);
    +
    +  virtual void expandColumn(int column);
    +  virtual void collapseColumn(int column);
    +
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual WFlags<HeaderFlag> headerFlags(int section,
    +					 Orientation orientation = Horizontal)
    +    const;
    +
    +  virtual bool setHeaderData(int section, Orientation orientation,
    +			     const boost::any& value,
    +			     int role = EditRole);
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +private:
    +  struct Aggregate {
    +    int parentSrc_;
    +    int firstChildSrc_, lastChildSrc_;
    +    int level_;
    +
    +    bool collapsed_;
    +
    +    std::vector<Aggregate> nestedAggregates_;
    +
    +    Aggregate();
    +    Aggregate(int parentColumn, int firstColumn, int lastColumn);
    +    bool contains(const Aggregate& other) const;
    +    bool contains(int column) const;
    +    Aggregate *add(const Aggregate& other);
    +    int mapFromSource(int sourceColumn) const;
    +    int mapToSource(int column) const;
    +    bool before(const Aggregate& other) const;
    +    bool after(int column) const;
    +    bool before(int column) const;
    +    int collapsedCount() const;
    +    Aggregate *findAggregate(int parentColumn);
    +    const Aggregate *findAggregate(int parentColumn) const;
    +    const Aggregate *findEnclosingAggregate(int column) const;
    +    int firstVisibleNotBefore(int column) const;
    +    int lastVisibleNotAfter(int column) const;
    +  };
    +
    +  Aggregate topLevel_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  void expand(Aggregate& aggregate);
    +  void collapse(Aggregate& aggregate);
    +
    +  void propagateBeginRemove(const WModelIndex& proxyIndex,
    +			    int start, int end);
    +  void propagateEndRemove(const WModelIndex& proxyIndex,
    +			  int start, int end);
    +  void propagateBeginInsert(const WModelIndex& proxyIndex,
    +			    int start, int end);
    +  void propagateEndInsert(const WModelIndex& proxyIndex,
    +			  int start, int end);
    +
    +  int lastVisibleSourceNotAfter(int sourceColumn) const;
    +  int firstVisibleSourceNotBefore(int sourceColumn) const;
    +  
    +  void sourceColumnsAboutToBeInserted(const WModelIndex& parent,
    +				      int start, int end);
    +  void sourceColumnsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceColumnsAboutToBeRemoved(const WModelIndex& parent,
    +				     int start, int end);
    +  void sourceColumnsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeInserted(const WModelIndex& parent,
    +				   int start, int end);
    +  void sourceRowsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeRemoved(const WModelIndex& parent,
    +				  int start, int end);
    +  void sourceRowsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceDataChanged(const WModelIndex& topLeft,
    +			 const WModelIndex& bottomRight);
    +
    +  void sourceHeaderDataChanged(Orientation orientation, int start, int end);
    +
    +  void sourceLayoutAboutToBeChanged();
    +  void sourceLayoutChanged();
    +};
    +
    +}
    +
    +#endif // WAGGREGATE_PROXY_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WAggregateProxyModel.C b/wt-3.1.7a/src/Wt/WAggregateProxyModel.C
    new file mode 100644
    index 0000000..f7759b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAggregateProxyModel.C
    @@ -0,0 +1,645 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +#include <iostream>
    +
    +#include "Wt/WAggregateProxyModel"
    +#include "WtException.h"
    +
    +namespace {
    +  bool contains2(int a1, int a2, int b1, int b2) {
    +    return b1 >= a1 && b1 <= a2 && b2 >= a1 && b2 <= a2;
    +  }
    +
    +  bool overlaps(int a1, int a2, int b1, int b2) {
    +    return !((a2 < b1) || (a1 > b2));
    +  }
    +
    +  std::string nestingError(int pa, int a1, int a2, int pb, int b1, int b2) {
    +    std::stringstream msg;
    +
    +    msg
    +      << "WAggregateProxyModel: aggregates must strictly nest: ["
    +      << pa << ": " << a1 << " - " << a2 << "] overlaps partially with ["
    +      << pb << ": " << b1 << " - " << b2 << "]";
    +    
    +    return msg.str();
    +  }
    +}
    +
    +namespace Wt {
    +
    +WAggregateProxyModel::Aggregate::Aggregate()
    +  : parentSrc_(-1),
    +    firstChildSrc_(-1),
    +    lastChildSrc_(-1),
    +    level_(0),
    +    collapsed_(false)
    +{ }
    +
    +WAggregateProxyModel::Aggregate::Aggregate(int parentColumn,
    +					   int firstColumn, int lastColumn)
    +  : parentSrc_(parentColumn),
    +    firstChildSrc_(firstColumn),
    +    lastChildSrc_(lastColumn),
    +    level_(0),
    +    collapsed_(false)
    +{
    +  if (parentSrc_ != firstChildSrc_ - 1 && parentSrc_ != lastChildSrc_ + 1)
    +    throw WtException("WAggregateProxyModel::addAggregate: parent column "
    +		      "must border children range");
    +}
    +
    +bool WAggregateProxyModel::Aggregate::contains(const Aggregate& other) const
    +{
    +  int pa = parentSrc_, a1 = firstChildSrc_, a2 = lastChildSrc_,
    +    pb = other.parentSrc_, b1 = other.firstChildSrc_, b2 = other.lastChildSrc_;
    +
    +  if (pb >= a1 && pb <= a2) {
    +    if (!::contains2(a1, a2, b1, b2))
    +      throw WtException(nestingError(pa, a1, a2, pb, b1, b2));
    +
    +    return true;
    +  } else {
    +    if (::overlaps(a1, a2, b1, b2))
    +      throw WtException(nestingError(pa, a1, a2, pb, b1, b2));
    +
    +    return false;
    +  }
    +}
    +
    +WAggregateProxyModel::Aggregate *
    +WAggregateProxyModel::Aggregate::add(const Aggregate& toAdd)
    +{
    +  for (unsigned int i = 0; i < nestedAggregates_.size(); ++i) {
    +    Aggregate& a = nestedAggregates_[i];
    +
    +    if (a.contains(toAdd))
    +      return a.add(toAdd);
    +
    +    if (toAdd.before(a)) {
    +      nestedAggregates_.insert(nestedAggregates_.begin() + i, toAdd);
    +      nestedAggregates_[i].level_ = level_ + 1;
    +      return &nestedAggregates_[i];
    +    }
    +  }
    +
    +  nestedAggregates_.push_back(toAdd);
    +  nestedAggregates_.back().level_ = level_ + 1;
    +  return &nestedAggregates_.back();
    +}
    +
    +WAggregateProxyModel::Aggregate *
    +WAggregateProxyModel::Aggregate::findAggregate(int parentColumn)
    +{
    +  if (parentSrc_ == parentColumn)
    +    return this;
    +  else if (parentSrc_ != -1 && parentColumn > lastChildSrc_)
    +    return 0;
    +  else {
    +    for (unsigned int i = 0; i < nestedAggregates_.size(); ++i) {
    +      Aggregate& a = nestedAggregates_[i];
    +
    +      Aggregate *result = a.findAggregate(parentColumn);
    +      if (result)
    +	return result;
    +    }
    +  }
    +
    +  return 0;
    +}
    +
    +const WAggregateProxyModel::Aggregate *
    +WAggregateProxyModel::Aggregate::findAggregate(int parentColumn) const
    +{
    +  return const_cast<Aggregate *>(this)->findAggregate(parentColumn);
    +}
    +
    +const WAggregateProxyModel::Aggregate *
    +WAggregateProxyModel::Aggregate::findEnclosingAggregate(int column) const
    +{
    +  for (unsigned int i = 0; i < nestedAggregates_.size(); ++i) {
    +    const Aggregate& a = nestedAggregates_[i];
    +
    +    if (a.after(column))
    +      return this;
    +
    +    if (a.contains(column))
    +      return a.findEnclosingAggregate(column);
    +  }
    +
    +  return this;
    +}
    +
    +int WAggregateProxyModel::Aggregate::mapFromSource(int sourceColumn) const
    +{
    +  int collapsedCount = 0;
    +
    +  for (unsigned i = 0; i < nestedAggregates_.size(); ++i) {
    +    const Aggregate& a = nestedAggregates_[i];
    +
    +    if (a.after(sourceColumn))
    +      return sourceColumn - collapsedCount;
    +    else if (a.contains(sourceColumn))
    +      if (a.collapsed_)
    +	return -1;
    +      else
    +	return a.mapFromSource(sourceColumn) - collapsedCount;
    +    else // a < sourceColumn
    +      collapsedCount += a.collapsedCount();
    +  }
    +
    +  return sourceColumn - collapsedCount;
    +}
    +
    +int WAggregateProxyModel::Aggregate::mapToSource(int column) const
    +{
    +  int sourceColumn = column;
    +
    +  for (unsigned i = 0; i < nestedAggregates_.size(); ++i) {
    +    const Aggregate& a = nestedAggregates_[i];
    +
    +    if (a.after(sourceColumn))
    +      return sourceColumn;
    +    else if (!a.collapsed_ && a.contains(sourceColumn))
    +      return a.mapToSource(sourceColumn);
    +    else
    +      sourceColumn += a.collapsedCount();
    +  }
    +
    +  return sourceColumn;
    +}
    +
    +bool WAggregateProxyModel::Aggregate::before(const Aggregate& other) const
    +{
    +  return lastChildSrc_ < other.firstChildSrc_;
    +}
    +
    +bool WAggregateProxyModel::Aggregate::after(int column) const
    +{
    +  return firstChildSrc_ > column;
    +}
    +
    +bool WAggregateProxyModel::Aggregate::before(int column) const
    +{
    +  return lastChildSrc_ < column;
    +}
    +
    +bool WAggregateProxyModel::Aggregate::contains(int sourceColumn) const
    +{
    +  return firstChildSrc_ <= sourceColumn && sourceColumn <= lastChildSrc_;
    +}
    +
    +int WAggregateProxyModel::Aggregate::collapsedCount() const
    +{
    +  if (collapsed_)
    +    return lastChildSrc_ - firstChildSrc_ + 1;
    +  else {
    +    int result = 0;
    +
    +    for (unsigned i = 0; i < nestedAggregates_.size(); ++i) {
    +      const Aggregate& a = nestedAggregates_[i];
    +
    +      result += a.collapsedCount();
    +    }
    +
    +    return result;
    +  }
    +}
    +
    +int WAggregateProxyModel::Aggregate::firstVisibleNotBefore(int column) const
    +{
    +  if (collapsed_)
    +    return lastChildSrc_ + 1;
    +  else {
    +    for (unsigned i = 0; i < nestedAggregates_.size(); ++i) {
    +      const Aggregate& a = nestedAggregates_[i];
    +
    +      if (a.after(column))
    +	return column;
    +      else if (a.before(column))
    +	continue;
    +      else
    +	column = a.firstVisibleNotBefore(column);
    +    }
    +
    +    return column;
    +  }
    +}
    +
    +int WAggregateProxyModel::Aggregate::lastVisibleNotAfter(int column) const
    +{
    +  if (collapsed_)
    +    return firstChildSrc_ - 1;
    +  else {
    +    for (int i = nestedAggregates_.size() - 1; i >= 0; --i) {
    +      const Aggregate& a = nestedAggregates_[i];
    +
    +      if (a.before(column))
    +	return column;
    +      else if (a.after(column))
    +	continue;
    +      else
    +	column = a.lastVisibleNotAfter(column);
    +    }
    +
    +    return column;
    +  }
    +}
    +
    +WAggregateProxyModel::WAggregateProxyModel(WObject *parent)
    +  : WAbstractProxyModel(parent),
    +    topLevel_()
    +{ }
    +
    +WAggregateProxyModel::~WAggregateProxyModel()
    +{ }
    +
    +void WAggregateProxyModel::setSourceModel(WAbstractItemModel *model)
    +{
    +  if (sourceModel()) {
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  WAbstractProxyModel::setSourceModel(model);
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeInserted().connect
    +     (this, &WAggregateProxyModel::sourceColumnsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->columnsInserted().connect
    +     (this, &WAggregateProxyModel::sourceColumnsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeRemoved().connect
    +     (this, &WAggregateProxyModel::sourceColumnsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->columnsRemoved().connect
    +     (this, &WAggregateProxyModel::sourceColumnsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeInserted().connect
    +     (this, &WAggregateProxyModel::sourceRowsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->rowsInserted().connect
    +     (this, &WAggregateProxyModel::sourceRowsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeRemoved().connect
    +     (this, &WAggregateProxyModel::sourceRowsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->rowsRemoved().connect
    +     (this, &WAggregateProxyModel::sourceRowsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->dataChanged().connect
    +     (this, &WAggregateProxyModel::sourceDataChanged));
    +  modelConnections_.push_back(sourceModel()->headerDataChanged().connect
    +     (this, &WAggregateProxyModel::sourceHeaderDataChanged));
    +
    +  modelConnections_.push_back(sourceModel()->layoutAboutToBeChanged().connect
    +     (this, &WAggregateProxyModel::sourceLayoutAboutToBeChanged));
    +  modelConnections_.push_back(sourceModel()->layoutChanged().connect
    +     (this, &WAggregateProxyModel::sourceLayoutChanged));
    +
    +  topLevel_ = Aggregate();
    +}
    +
    +void WAggregateProxyModel::addAggregate(int parentColumn,
    +					int firstColumn, int lastColumn)
    +{
    +  Aggregate *added
    +    = topLevel_.add(Aggregate(parentColumn, firstColumn, lastColumn));
    +
    +  collapse(*added);
    +}
    +
    +void WAggregateProxyModel::propagateBeginRemove(const WModelIndex& proxyIndex,
    +						int start, int end)
    +{
    +  // should be beginRemoveColumns(), but endRemoveColumns() calls cannot
    +  // be nested
    +  columnsAboutToBeRemoved().emit(proxyIndex, start, end);
    +
    +  unsigned int rc = rowCount(proxyIndex);
    +  for (unsigned i = 0; i < rc; ++i)
    +    propagateBeginRemove(index(i, 0, proxyIndex), start, end);
    +}
    +
    +void WAggregateProxyModel::propagateEndRemove(const WModelIndex& proxyIndex,
    +					      int start, int end)
    +{
    +  // should be endRemoveColumns(), but endRemoveColumns() calls cannot
    +  // be nested
    +  columnsRemoved().emit(proxyIndex, start, end);
    +
    +  unsigned int rc = rowCount(proxyIndex);
    +  for (unsigned i = 0; i < rc; ++i)
    +    propagateEndRemove(index(i, 0, proxyIndex), start, end);
    +}
    +
    +void WAggregateProxyModel::propagateBeginInsert(const WModelIndex& proxyIndex,
    +						int start, int end)
    +{
    +  // should be beginInsertColumns(), but endInsertColumns() calls cannot
    +  // be nested
    +  columnsAboutToBeInserted().emit(proxyIndex, start, end);
    +
    +  unsigned int rc = rowCount(proxyIndex);
    +  for (unsigned i = 0; i < rc; ++i)
    +    propagateBeginInsert(index(i, 0, proxyIndex), start, end);
    +}
    +
    +void WAggregateProxyModel::propagateEndInsert(const WModelIndex& proxyIndex,
    +					      int start, int end)
    +{
    +  // should be endInsertColumns(), but endInsertColumns() calls cannot
    +  // be nested
    +  columnsInserted().emit(proxyIndex, start, end);
    +
    +  unsigned int rc = rowCount(proxyIndex);
    +  for (unsigned i = 0; i < rc; ++i)
    +    propagateEndInsert(index(i, 0, proxyIndex), start, end);
    +}
    +
    +void WAggregateProxyModel::expandColumn(int column)
    +{
    +  int sourceColumn = topLevel_.mapToSource(column);
    +  Aggregate *ag = topLevel_.findAggregate(sourceColumn);
    +
    +  if (ag)
    +    expand(*ag);
    +}
    +
    +void WAggregateProxyModel::collapseColumn(int column)
    +{
    +  int sourceColumn = topLevel_.mapToSource(column);
    +  Aggregate *ag = topLevel_.findAggregate(sourceColumn);
    +
    +  if (ag)
    +    collapse(*ag);
    +}
    +
    +void WAggregateProxyModel::expand(Aggregate& aggregate)
    +{
    +  int c = topLevel_.mapFromSource(aggregate.parentSrc_);
    +  if (c >= 0) {
    +    aggregate.collapsed_ = false;
    +    int c1 = topLevel_.mapFromSource(firstVisibleSourceNotBefore
    +				     (aggregate.firstChildSrc_));
    +    int c2 = topLevel_.mapFromSource(lastVisibleSourceNotAfter
    +				     (aggregate.lastChildSrc_));
    +    aggregate.collapsed_ = true;
    +
    +    propagateBeginInsert(WModelIndex(), c1, c2);
    +    aggregate.collapsed_ = false;
    +    propagateEndInsert(WModelIndex(), c1, c2);
    +  } else
    +    aggregate.collapsed_ = false;
    +}
    +
    +void WAggregateProxyModel::collapse(Aggregate& aggregate)
    +{
    +  int c = topLevel_.mapFromSource(aggregate.parentSrc_);
    +  if (c >= 0) {
    +    int c1 = topLevel_.mapFromSource(firstVisibleSourceNotBefore
    +				     (aggregate.firstChildSrc_));
    +    int c2 = topLevel_.mapFromSource(lastVisibleSourceNotAfter
    +				     (aggregate.lastChildSrc_));
    +
    +    propagateBeginRemove(WModelIndex(), c1, c2);
    +    aggregate.collapsed_ = true;
    +    propagateEndRemove(WModelIndex(), c1, c2);
    +  } else
    +    aggregate.collapsed_ = true;
    +}
    +
    +WModelIndex WAggregateProxyModel::mapFromSource(const WModelIndex& sourceIndex)
    +  const
    +{
    +  if (sourceIndex.isValid()) {
    +    int column = topLevel_.mapFromSource(sourceIndex.column());
    +    if (column >= 0) {
    +      int row = sourceIndex.row();
    +
    +      return createIndex(row, column, sourceIndex.internalPointer());
    +    } else
    +      return WModelIndex();
    +  } else
    +    return WModelIndex();
    +}
    +
    +WModelIndex WAggregateProxyModel::mapToSource(const WModelIndex& proxyIndex)
    +  const
    +{
    +  if (proxyIndex.isValid()) {
    +    int column = topLevel_.mapToSource(proxyIndex.column());
    +    int row = proxyIndex.row();
    +
    +    return createSourceIndex(row, column, proxyIndex.internalPointer());
    +  } else
    +    return WModelIndex();
    +}
    +
    +WModelIndex WAggregateProxyModel::index(int row, int column,
    +					const WModelIndex& parent) const
    +{
    +  WModelIndex sourceParent = mapToSource(parent);
    +  int sourceRow = row;
    +  int sourceColumn = topLevel_.mapToSource(column);
    +  WModelIndex sourceIndex
    +    = sourceModel()->index(sourceRow, sourceColumn, sourceParent);
    +
    +  return createIndex(row, column, sourceIndex.internalPointer());
    +}
    +
    +WModelIndex WAggregateProxyModel::parent(const WModelIndex& index) const
    +{
    +  if (index.isValid())
    +    return mapFromSource(mapToSource(index).parent());
    +  else
    +    return WModelIndex();
    +}
    +
    +int WAggregateProxyModel::columnCount(const WModelIndex& parent) const
    +{
    +  int c = sourceModel()->columnCount(mapToSource(parent));
    +  if (c > 0) {
    +    c = lastVisibleSourceNotAfter(c - 1);
    +    return topLevel_.mapFromSource(c) + 1;
    +  } else
    +    return 0;
    +}
    +
    +int WAggregateProxyModel::rowCount(const WModelIndex& parent) const
    +{
    +  return sourceModel()->rowCount(mapToSource(parent));
    +}
    +
    +void WAggregateProxyModel::sort(int column, Wt::SortOrder order)
    +{
    +  sourceModel()->sort(topLevel_.mapToSource(column), order);
    +}
    +
    +boost::any WAggregateProxyModel::headerData(int section,
    +					    Orientation orientation, int role)
    +  const
    +{
    +  if (orientation == Horizontal) {
    +    section = topLevel_.mapToSource(section);
    +    if (role == LevelRole) {
    +      const Aggregate *agg = topLevel_.findEnclosingAggregate(section);
    +      return boost::any(agg->level_);
    +    } else
    +      return sourceModel()->headerData(section, orientation, role);
    +  } else
    +    return sourceModel()->headerData(section, orientation, role);
    +}
    +
    +bool WAggregateProxyModel::setHeaderData(int section, Orientation orientation,
    +					 const boost::any& value, int role)
    +{
    +  if (orientation == Horizontal)
    +    section = topLevel_.mapToSource(section);
    +
    +  return sourceModel()->setHeaderData(section, orientation, value, role);
    +}
    +
    +WFlags<HeaderFlag> WAggregateProxyModel::headerFlags(int section,
    +						     Orientation orientation)
    +  const
    +{
    +  if (orientation == Horizontal) {
    +    int srcColumn = topLevel_.mapToSource(section);
    +    const Aggregate *agg = topLevel_.findAggregate(srcColumn);
    +    if (agg) {
    +      if (agg->collapsed_)
    +	return ColumnIsCollapsed;
    +      else
    +	if (agg->parentSrc_ == agg->lastChildSrc_ + 1)
    +	  return ColumnIsExpandedLeft;
    +	else // agg->parentSrc_ == firstChildSrc_ - 1
    +	  return ColumnIsExpandedRight;
    +    } else
    +      return WAbstractProxyModel::headerFlags(section, orientation);
    +  } else
    +    return WAbstractProxyModel::headerFlags(section, orientation);
    +}
    +
    +void WAggregateProxyModel::sourceColumnsAboutToBeInserted
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  throw WtException("WAggregateProxyModel does not support "
    +		    "source model column insertion");
    +}
    +
    +void WAggregateProxyModel::sourceColumnsInserted(const WModelIndex& parent,
    +						 int start, int end)
    +{
    +  throw WtException("WAggregateProxyModel does not support "
    +		    "source model column insertion");
    +}
    +
    +void WAggregateProxyModel::sourceColumnsAboutToBeRemoved
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  throw WtException("WAggregateProxyModel does not support "
    +		    "source model column removal");
    +}
    +
    +void WAggregateProxyModel::sourceColumnsRemoved(const WModelIndex& parent,
    +						int start, int end)
    +{
    +  throw WtException("WAggregateProxyModel does not support "
    +		    "source model column removal");
    +}
    +
    +void WAggregateProxyModel::sourceRowsAboutToBeInserted
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  WModelIndex proxyParent = mapFromSource(parent);
    +
    +  if (proxyParent.isValid() || !parent.isValid())
    +    beginInsertRows(proxyParent, start, end);
    +}
    +
    +void WAggregateProxyModel::sourceRowsInserted(const WModelIndex& parent,
    +					      int start, int end)
    +{
    +  WModelIndex proxyParent = mapFromSource(parent);
    +
    +  if (proxyParent.isValid() || !parent.isValid())
    +    endInsertRows();
    +}
    +
    +void WAggregateProxyModel::sourceRowsAboutToBeRemoved
    +(const WModelIndex& parent, int start, int end)
    +{
    +  WModelIndex proxyParent = mapFromSource(parent);
    +
    +  if (proxyParent.isValid() || !parent.isValid())
    +    beginRemoveRows(proxyParent, start, end);
    +}
    +
    +void WAggregateProxyModel::sourceRowsRemoved(const WModelIndex& parent,
    +					      int start, int end)
    +{ 
    +  WModelIndex proxyParent = mapFromSource(parent);
    +
    +  if (proxyParent.isValid() || !parent.isValid())
    +    endRemoveRows();
    +}
    +
    +int WAggregateProxyModel::firstVisibleSourceNotBefore(int column) const
    +{
    +  return topLevel_.firstVisibleNotBefore(column);
    +}
    +
    +int WAggregateProxyModel::lastVisibleSourceNotAfter(int column) const
    +{
    +  return topLevel_.lastVisibleNotAfter(column);
    +}
    +
    +void WAggregateProxyModel::sourceDataChanged(const WModelIndex& topLeft,
    +					     const WModelIndex& bottomRight)
    +{
    +  int l = firstVisibleSourceNotBefore(topLeft.column());
    +  int r = lastVisibleSourceNotAfter(bottomRight.column());
    +
    +  if (r >= l) {
    +    WModelIndex tl = mapFromSource(sourceModel()->index(topLeft.row(),
    +							l,
    +							topLeft.parent()));
    +    WModelIndex br = mapFromSource(sourceModel()->index(bottomRight.row(),
    +							r,
    +							bottomRight.parent()));
    +    dataChanged().emit(tl, br);
    +  }
    +}
    +
    +void WAggregateProxyModel::sourceHeaderDataChanged(Orientation orientation, 
    +						   int start, int end)
    +{
    +  if (orientation == Vertical) {
    +    headerDataChanged().emit(orientation, start, end);
    +  } else {
    +    int l = firstVisibleSourceNotBefore(start);
    +    int r = lastVisibleSourceNotAfter(end);
    +
    +    if (r >= l) {
    +      l = topLevel_.mapFromSource(l);
    +      r = topLevel_.mapFromSource(r);
    +
    +      headerDataChanged().emit(orientation, l, r);
    +    }
    +  }
    +}
    +
    +void WAggregateProxyModel::sourceLayoutAboutToBeChanged()
    +{ 
    +  layoutAboutToBeChanged().emit();
    +}
    +
    +void WAggregateProxyModel::sourceLayoutChanged()
    +{
    +  layoutChanged().emit();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WAnchor b/wt-3.1.7a/src/Wt/WAnchor
    new file mode 100644
    index 0000000..dc1423a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAnchor
    @@ -0,0 +1,295 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WANCHOR_H_
    +#define WANCHOR_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +class WText;
    +class WImage;
    +
    +/*! \class WAnchor Wt/WAnchor Wt/WAnchor
    + *  \brief A widget that represents an HTML anchor (to link to other documents).
    + *
    + * Use an anchor to link to another web page, document, internal
    + * application path or a resource. The anchor may contain a label
    + * text, an image, or any other widget (as it inherits from
    + * WContainerWidget). If you do not want the application to terminate
    + * when the user follows the anchor, you must use \link setTarget(AnchorTarget)
    + * setTarget(TargetNewWindow)\endlink. Even for non-HTML documents,
    + * this may be important since pending AJAX requests are cancelled if
    + * documents are not served within the browser window in certain
    + * browsers.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * WAnchor *a;
    + *
    + * // Create an anchor that references a URL
    + * a = new WAnchor("http://www.webtoolkit.eu/", "Wt web toolkit", this);
    + *
    + * // Create an anchor that references an internal path
    + * a = new WAnchor(this);
    + * a->setRefInternalPath("/docs/" + myDocName());
    + * //   and listen to the corresponding change in internal path
    + * WApplication::instance()->internalPathChanged().connect(this, &DocsListWidget::onInternalPathChange);
    + *
    + * // Create an anchor that references a resource
    + * WResource *r = new PdfResource(this); // serializes to a PDF file.
    + * a = new WAnchor(r, "PDF version", this);
    + * a->setTarget(TargetNewWindow);
    + * \endcode
    + * \endif
    + *
    + * %WAnchor is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * \note If you set a text or image using one of the API methods like
    + * setText() or setImage() or a constructor, you should not attempt to
    + * remove all contents (using clear(), or provide a layout (using
    + * setLayout()), as this will result in undefined behaviour: the text
    + * or image are simply inserted as widgets into the container.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;a&gt;</tt> tag and does
    + * not provide styling. It can be styled using inline or external CSS
    + * as appropriate.
    + */
    +class WT_API WAnchor : public WContainerWidget
    +{
    +public:
    +  /*! \brief Creates an anchor.
    +   */
    +  WAnchor(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring to a URL.
    +   */
    +  WAnchor(const std::string& url, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring a resource.
    +   *
    +   * The \p resource specifies application-dependent content that may
    +   * be generated by your application on demand.
    +   *
    +   * The anchor does not assume ownership of \p resource, so that you
    +   * may share the same resources for several anchors.
    +   *
    +   * \sa WResource
    +   */
    +  WAnchor(WResource *resource, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring to a URL, using a text message.
    +   */
    +  WAnchor(const std::string& url, const WString& text,
    +	  WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring to a resource, using a text message.
    +   *
    +   * The \p resource specifies application-dependent content that may
    +   * be generated by your application on demand.
    +   *
    +   * The anchor does not assume ownership of \p resource, so that you
    +   * may share the same resources for several anchors.
    +   */
    +  WAnchor(WResource *resource, const WString& text,
    +	  WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring to a URL, using an image.
    +   *
    +   * Ownership of the image is transferred to the anchor.
    +   */
    +  WAnchor(const std::string& ref, WImage *image, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an anchor referring to a resource, using an
    +   *  image.
    +   *
    +   * The \p resource specifies application-dependent content that may
    +   * be generated by your application on demand.
    +   *
    +   * The anchor does not assume ownership of \p resource, so that you
    +   * may share the same resources for several anchors.
    +   *
    +   * Ownership of the image is transferred to the anchor.
    +   */
    +  WAnchor(WResource *resource, WImage *image, WContainerWidget *parent = 0);
    +
    +  virtual ~WAnchor();
    +
    +  /*! \brief Sets the destination URL.
    +   *
    +   * This method should not be used when the anchor has been pointed
    +   * to a dynamically generated resource using setResource().
    +   *
    +   * \sa setResource(), setRefInternalPath()
    +   */
    +  void setRef(const std::string& url);
    +
    +  /*! \brief Sets the destination URL as an internal path.
    +   *
    +   * Sets the anchor to point to the internal path \p path. When
    +   * the anchor is activated, the internal path is set to \p path,
    +   * and the WApplication::internalPathChanged() signal is
    +   * emitted.
    +   *
    +   * This is the easiest way to let the application participate in
    +   * browser history, and generate URLs that are bookmarkable and search
    +   * engine friendly.
    +   *
    +   * Internally, this method sets the destination URL using: \code
    +   * setRef(WApplication::instance()->bookmarkUrl(path)) \endcode
    +   *
    +   * The clicked() signal is connected to a slot that changes the internal
    +   * path by calling
    +   * \code
    +   * WApplication::instance()->setInternalPath(ref(), true);
    +   * \endcode
    +   *
    +   * \sa setRef(), setResource()
    +   *
    +   * \sa WApplication::bookmarkUrl(), WApplication::setInternalPath()
    +   */
    +  void setRefInternalPath(const std::string& path);
    +
    +  /*! \brief Returns the destination URL.
    +   *
    +   * When the anchor refers to a resource, the current resource URL is
    +   * returned. When the anchor refers to an internal path, the
    +   * internal path is returned. Otherwise, the URL is returned that
    +   * was set using setRef().
    +   *
    +   * \sa setRef(), WResource::url()
    +   */
    +  const std::string& ref() const { return ref_; }
    +
    +  /*! \brief Sets a destination resource.
    +   *
    +   * A resource specifies application-dependent content, which may be
    +   * generated by your application on demand.
    +   *
    +   * This sets the \p resource as the destination of the anchor,
    +   * and is an alternative to setRef(). The resource may be cleared by
    +   * passing \p resource = \c 0.
    +   *
    +   * The anchor does not assume ownership of the resource.
    +   *
    +   * \sa setRef()
    +   */
    +  void setResource(WResource *resource);
    +
    +  /*! \brief Returns the destination resource.
    +   *
    +   * Returns \c 0 if no resource has been set.
    +   *
    +   * \sa setResource()
    +   */
    +  WResource *resource() const { return resource_; }
    +
    +  /*! \brief Sets the label text
    +   *
    +   * If no text was previously set, a new WText widget is added using
    +   * addWidget().
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the label text.
    +   *
    +   * Returns an empty string if no label was set.
    +   * 
    +   * \sa setText()
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Configures text word wrapping.
    +   *
    +   * When \p wordWrap is \c true, the text set with setText() may be
    +   * broken up over multiple lines. When \p wordWrap is \c false, the
    +   * text will displayed on a single line, unless the text contains
    +   * &lt;br /&gt; tags or other block-level tags.
    +   *
    +   * The default value is \c true.
    +   *
    +   * \sa wordWrap()
    +   */
    +  void setWordWrap(bool wordWrap);
    +
    +  /*! \brief Returns whether the widget may break lines.
    +   *
    +   * \sa setWordWrap(bool)
    +   */
    +  bool wordWrap() const;
    +
    +  /*! \brief Sets an image.
    +   *
    +   * If an image was previously set, it is deleted. The \p image
    +   * is added using addWidget().
    +   *
    +   * Ownership of the image is transferred to the anchor.
    +   */
    +  void setImage(WImage *image);
    +
    +  /*! \brief Returns the image.
    +   *
    +   * Returns \c 0 if no image is set.
    +   *
    +   * \sa setImage()
    +   */
    +  WImage *image() const { return image_; }
    +
    +  /*! \brief Sets the location where the referred content should be
    +   *         displayed.
    +   *
    +   * By default, the referred content is displayed in the application
    +   * (Wt::TargetSelf). When the destination is an HTML document, the
    +   * application is replaced with the new document. When the reference
    +   * is a document that cannot be displayed in the browser, it is
    +   * offered for download or opened using an external program,
    +   * depending on browser settings.
    +   *
    +   * By setting \p target to Wt::TargetNewWindow, the destination
    +   * is displayed in a new browser window or tab.
    +   *
    +   * \sa target()
    +   */
    +  void setTarget(AnchorTarget target);
    +
    +  /*! \brief Returns the location where the referred content should be
    +   *         displayed.
    +   *
    +   * \sa setTarget()
    +   */
    +  AnchorTarget target() const { return target_; }
    +
    +private:
    +  static const int BIT_REF_INTERNAL_PATH = 0;
    +  static const int BIT_REF_CHANGED = 1;
    +  static const int BIT_TARGET_CHANGED = 2;
    +
    +  std::string    ref_;
    +  WResource     *resource_;
    +  WText         *text_;
    +  WImage        *image_;
    +  AnchorTarget   target_;
    +  std::bitset<3> flags_;
    +
    +  JSlot *changeInternalPathJS_;
    +
    +  void resourceChanged();
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void propagateRenderOk(bool deep);
    +  virtual void enableAjax();
    +};
    +
    +}
    +
    +#endif // WANCHOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WAnchor.C b/wt-3.1.7a/src/Wt/WAnchor.C
    new file mode 100644
    index 0000000..78e1436
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WAnchor.C
    @@ -0,0 +1,307 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +
    +#include "Wt/WAnchor"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WResource"
    +#include "Wt/WText"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +#include "WebSession.h"
    +
    +namespace Wt {
    +
    +WAnchor::WAnchor(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{
    +  setInline(true);
    +}
    +
    +WAnchor::WAnchor(const std::string& ref, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    ref_(ref),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{
    +  setInline(true);
    +}
    +
    +WAnchor::WAnchor(WResource *resource, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{
    +  setInline(true);
    +  setResource(resource);
    +}
    +
    +WAnchor::WAnchor(const std::string& ref, const WString& text,
    +		 WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    ref_(ref),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{ 
    +  setInline(true);
    +  text_ = new WText(text, this);
    +}
    +
    +WAnchor::WAnchor(WResource *resource, const WString& text,
    +		 WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{ 
    +  setInline(true);
    +  text_ = new WText(text, this);
    +  setResource(resource);
    +}
    +
    +WAnchor::WAnchor(const std::string& ref, WImage *image,
    +		 WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    ref_(ref),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{ 
    +  setInline(true);
    +  image_ = image;
    +
    +  if (image_)
    +    addWidget(image_);
    +}
    +
    +WAnchor::WAnchor(WResource *resource, WImage *image,
    +		 WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    resource_(0),
    +    text_(0),
    +    image_(0),
    +    target_(TargetSelf),
    +    changeInternalPathJS_(0)
    +{ 
    +  setInline(true);
    +  image_ = image;
    +
    +  if (image_)
    +    addWidget(image_);
    +
    +  setResource(resource);
    +}
    +
    +WAnchor::~WAnchor()
    +{
    +  delete changeInternalPathJS_;
    +}
    +
    +void WAnchor::setRef(const std::string& url)
    +{
    +  if (!flags_.test(BIT_REF_INTERNAL_PATH) && ref_ == url)
    +    return;
    +
    +  flags_.reset(BIT_REF_INTERNAL_PATH);
    +  ref_ = url;
    +
    +  flags_.set(BIT_REF_CHANGED);
    +
    +  repaint(RepaintPropertyIEMobile);
    +}
    +
    +void WAnchor::setRefInternalPath(const std::string& path)
    +{
    +  if (flags_.test(BIT_REF_INTERNAL_PATH) && path == ref_)
    +    return;
    +
    +  flags_.set(BIT_REF_INTERNAL_PATH);
    +  ref_ = path;
    +
    +  flags_.set(BIT_REF_CHANGED);
    +
    +  repaint(RepaintPropertyIEMobile);
    +}
    +
    +void WAnchor::setResource(WResource *resource)
    +{
    +  resource_ = resource;
    +
    +  if (resource_) {
    +    resource_->dataChanged().connect(this, &WAnchor::resourceChanged);
    +    resourceChanged();
    +  }
    +}
    +
    +void WAnchor::setTarget(AnchorTarget target)
    +{
    +  if (target_ != target) {
    +    target_ = target;
    +    flags_.set(BIT_TARGET_CHANGED);
    +  }
    +}
    +
    +const WString& WAnchor::text() const
    +{
    +  static WString empty("");
    +  if (text_)
    +    return text_->text();
    +  else
    +    return empty;
    +}
    +
    +void WAnchor::setText(const WString& text)
    +{
    +  if (!text_) {
    +    text_ = new WText(text, this);
    +  } else
    +    if (!text.empty())
    +      text_->setText(text);
    +    else {
    +      delete text_;
    +      text_ = 0;
    +    }
    +}
    +
    +void WAnchor::setWordWrap(bool wordWrap)
    +{
    +  if (!text_)
    +    text_ = new WText(this);
    +
    +  text_->setWordWrap(wordWrap);
    +}
    +
    +bool WAnchor::wordWrap() const
    +{
    +  return text_ ? text_->wordWrap() : true;
    +}
    +
    +void WAnchor::setImage(WImage *image)
    +{
    +  delete image_;
    +  image_ = image;
    +
    +  if (image_)
    +    addWidget(image_);
    +}
    +
    +void WAnchor::resourceChanged()
    +{
    +  setRef(resource_->url());
    +}
    +
    +void WAnchor::enableAjax()
    +{
    +  if (flags_.test(BIT_REF_INTERNAL_PATH)) {
    +    flags_.set(BIT_REF_CHANGED);
    +    repaint(RepaintPropertyIEMobile);
    +  }
    +
    +  WContainerWidget::enableAjax();
    +}
    +
    +void WAnchor::updateDom(DomElement& element, bool all)
    +{
    +  if (flags_.test(BIT_REF_CHANGED) || all) {
    +    std::string url;
    +    if (flags_.test(BIT_REF_INTERNAL_PATH)) {
    +      WApplication *app = WApplication::instance();
    +
    +      if (app->environment().ajax()) {
    +	url = app->bookmarkUrl(ref_);
    +
    +	/*
    +	 * From 但浩亮: setRefInternalPath() and setTarget(TargetNewWindow)
    +	 * does not work without the check below:
    +	 */
    +	if (target_ == TargetSelf) {
    +	  if (!changeInternalPathJS_) {
    +	    changeInternalPathJS_ = new JSlot();
    +	    clicked().connect(*changeInternalPathJS_);
    +	    clicked().preventDefaultAction();
    +	  }
    +
    +	  changeInternalPathJS_->setJavaScript
    +	    ("function(){"
    +	     "window.location.hash='#" + Utils::urlEncode(ref_) + "';"
    +	     "}");
    +	  clicked().senderRepaint(); // XXX only for Java port necessary
    +	}
    +      } else {
    +	if (app->environment().agentIsSpiderBot())
    +	  url = app->bookmarkUrl(ref_);
    +	else {
    +	  // If no JavaScript is available, then we still add the session
    +	  // so that when used in WAnchor it will be handled by the same
    +	  // session.
    +	  url = app->session()->mostRelativeUrl(ref_);
    +	}
    +      }
    +    } else {
    +      url = ref_;
    +
    +      delete changeInternalPathJS_;
    +      changeInternalPathJS_ = 0;
    +    }
    +
    +    element.setAttribute("href", fixRelativeUrl(url));
    +
    +    flags_.reset(BIT_REF_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_TARGET_CHANGED) || all) {
    +    switch (target_) {
    +    case TargetSelf:
    +      if (!all)
    +	element.setProperty(PropertyTarget, "_self");
    +      break;
    +    case TargetThisWindow:
    +      element.setProperty(PropertyTarget, "_top");
    +      break;
    +    case TargetNewWindow:
    +      element.setProperty(PropertyTarget, "_blank");
    +    }
    +    flags_.reset(BIT_TARGET_CHANGED);
    +  }
    +
    +  WContainerWidget::updateDom(element, all);
    +}
    +
    +void WAnchor::propagateRenderOk(bool deep)
    +{
    +  flags_.reset(BIT_REF_CHANGED);
    +  flags_.reset(BIT_TARGET_CHANGED);
    +
    +  WContainerWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WAnchor::domElementType() const
    +{
    +  return DomElement_A;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WApplication b/wt-3.1.7a/src/Wt/WApplication
    new file mode 100644
    index 0000000..7a8f97a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WApplication
    @@ -0,0 +1,1846 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WAPPLICATION_
    +#define WAPPLICATION_
    +
    +#include <vector>
    +#include <string>
    +#include <set>
    +
    +// even boost/poolfwd.hpp includes <windows.h> ...
    +namespace boost {
    +  struct default_user_allocator_new_delete;
    +
    +  template <typename UserAllocator>
    +  class pool;
    +}
    +
    +#include <Wt/WObject>
    +#include <Wt/WCssStyleSheet>
    +#include <Wt/WEvent>
    +#include <Wt/WMessageResourceBundle>
    +#include <Wt/WSignal>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class WApplication;
    +class WCombinedLocalizedStrings;
    +class WContainerWidget;
    +class WEnvironment;
    +class WEvent;
    +class WLoadingIndicator;
    +class WLogEntry;
    +class WResource;
    +class WText;
    +
    +namespace Ext {
    +  class Dialog;
    +  class MessageBox;
    +}
    +
    +class WebSession;
    +class UpdateLockImpl;
    +class SoundManager;
    +
    +#ifndef WT_TARGET_JAVA
    +/*! \brief Typedef for a function that creates WApplication objects.
    + *
    + * \sa WRun()
    + *
    + * \relates WApplication
    + */
    +typedef WApplication* (*ApplicationCreator)(const WEnvironment& env);
    +#endif // !WT_TARGET_JAVA
    +
    +/*! \class WApplication Wt/WApplication Wt/WApplication
    + *  \brief Represents an application instance for a single session.
    + *
    + * \if cpp
    + *
    + * Each user session of your application has a corresponding
    + * %WApplication instance. You need to create a new instance and return
    + * it as the result of the callback function passed to WRun(). The
    + * instance is the main entry point to session information, and holds
    + * a reference to the root() of the widget tree.
    + *
    + * \elseif java
    + *
    + * Each user session of your application has a corresponding
    + * %WApplication instance. You need to create a new instance and return
    + * it as the result of {javadoclink WtServlet#createApplication(WEnvironment)}. 
    + * The instance is the main entry point to session information,
    + * and holds a reference to the root() of the widget tree.
    + *
    + * \endif
    + *
    + * The recipe for a %Wt web application, which allocates new
    + * WApplication instances for every user visiting the application is
    + * thus:
    + *
    + * \if cpp
    + * \code
    + * WApplication *createApplication(const WEnvironment WEnvironment& env)
    + * {
    + *   //
    + *   // Optionally, check the environment and redirect to an error page.
    + *   //
    + *   bool valid = ...;
    + *
    + *   WApplication *app;
    + *   if (!valid) {
    + *     app = new WApplication(env);
    + *     app->redirect("error.html");
    + *     app->quit();
    + *   } else {
    + *     // usually you will specialize your application class
    + *     app = new WApplication(env);
    + *
    + *     //
    + *     // Add widgets to app->root() and return the application object.
    + *     //
    + *   }
    + *
    + *   return app;
    + * }
    + * \endcode
    + * \elseif java
    + * \code
    + * public class HelloServlet extends WtServlet {
    + *  public HelloServlet() {
    + *      super();
    + *  }
    + *
    + *  public WApplication createApplication(WEnvironment env) {
    + *      // In practice, you will specialize WApplication and simply
    + *      // return a new instance.
    + *      WApplication app = new WApplication(env);
    + *      app.getRoot().addWidget(new WText("Hello world."));
    + *      return app;
    + *  }
    + * }
    + * \endcode
    + * \endif
    + *
    + * \if cpp
    + *
    + * Throughout the session, the instance is available through
    + * WApplication::instance() (or through #wApp). The application may be
    + * quited either using the method quit(), or because of a timeout
    + * after the user has closed the window, but not because the user does
    + * not interact: keep-alive messages in the background will keep the
    + * session around as long as the user has the page opened. In either
    + * case, the application object is deleted, allowing for cleanup of
    + * the entire widget tree, and any other resources.
    + *
    + * \elseif java
    + *
    + * Throughout the session, the instance is available through the
    + * static method WApplication::instance(), which uses thread-specific
    + * storage to keep track of the current session. The application may
    + * be quited either using the method quit(), or because of a timeout
    + * after the user has closed the window, but not because the user does
    + * not interact: keep-alive messages in the background will keep the
    + * session around as long as the user has the page opened.
    + *
    + * \endif
    + *
    + * The %WApplication object provides access to session-wide settings, including:
    + *
    + * - circumstancial information through environment(), which gives
    + *   details about the user, start-up arguments, and user agent
    + *   capabilities.
    + * - the application title with setTitle().
    + * - inline and external style sheets using styleSheet() and
    + *   useStyleSheet().
    + * - inline and external JavaScript using doJavaScript() and require().
    + * - the top-level widget in root(), representing the entire browser window,
    + *   or multiple top-level widgets using bindWidget() when deployed in
    + *   %WidgetSet mode to manage a number of widgets within a 3rd party page.
    + * - definition of cookies using setCookie() to persist information across
    + *   sessions, which may be read using WEnvironment::getCookie() in a future
    + *   session.
    + * - management of the internal path (that enables browser history and
    + *   bookmarks) using setInternalPath() and related methods.
    + * - support for server-initiated updates with enableUpdates()
    + * \if cpp
    + * - localization information and message resources bundles using setLocale()
    + *   and messageResourceBundle().
    + * \elseif java
    + * - localization information and message resources bundles, with
    + *   setLocale() and setLocalizedStrings()
    + * \endif
    + */
    +class WT_API WApplication : public WObject
    +{
    +public:
    +  /*! \brief Enumeration that indicates the method for dynamic (AJAX-alike)
    +   *         updates.
    +   *
    +   * \sa setAjaxMethod()
    +   */
    +  enum AjaxMethod {
    +    XMLHttpRequest,  //!< Using the XMLHttpRequest object (real AJAX)
    +    DynamicScriptTag //!< Using dynamic script tags (for cross-domain AJAX)
    +  };
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Typedef for a function that creates WApplication objects.
    +   *
    +   * \sa WRun()
    +   */
    +  typedef Wt::ApplicationCreator ApplicationCreator;
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Creates a new application instance.
    +   *
    +   * The \p environment provides information on the initial request,
    +   * user agent, and deployment-related information.
    +   */
    +  WApplication(const WEnvironment& environment);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Destructor.
    +   *
    +   * The destructor deletes the root() container, and as a consequence
    +   * the entire widget tree.
    +   */
    +  ~WApplication();
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns the current application instance.
    +   *
    +   * \if cpp
    +   * This is the same as the global define #wApp. In a multi-threaded server,
    +   * this method uses thread-specific storage to fetch the current session.
    +   * \elseif java
    +   * This method uses thread-specific storage to fetch the current session.
    +   * \endif
    +   */
    +  static WApplication *instance();
    +
    +  /*! \brief Returns the environment information.
    +   *
    +   * This method returns the environment object that was used when
    +   * constructing the application. The environment provides
    +   * information on the initial request, user agent, and
    +   * deployment-related information.
    +   *
    +   * \sa url(), sessionId()
    +   */
    +  const WEnvironment& environment() const;
    +
    +  /*! \brief Returns the root container.
    +   *
    +   * This is the top-level widget container of the application, and
    +   * corresponds to entire browser window. The user interface of your
    +   * application is represented by the content of this container.
    +   *
    +   * \if cpp
    +   *
    +   * The %root() widget is only defined when the application manages
    +   * the entire window. When deployed as a \link Wt::WidgetSet
    +   * WidgetSet\endlink application, there is no %root() container, and
    +   * \c 0 is returned.  Instead, use bindWidget() to bind one or more
    +   * root widgets to existing HTML &lt;div&gt; (or other) elements on
    +   * the page.
    +   *
    +   * \elseif java
    +   *
    +   * The root() widget is only defined when the application manages
    +   * the entire window. When deployed as a \link Wt::WidgetSet
    +   * WidgetSet\endlink application, there is no %root() container, and
    +   * <code>null</code> is returned. Instead, use bindWidget() to bind
    +   * one or more root widgets to existing HTML &lt;div&gt; (or other)
    +   * elements on the page.
    +   *
    +   * \endif
    +   */
    +  WContainerWidget *root() const { return widgetRoot_; }
    +
    +  /** @name Style sheets and CSS
    +   */
    +  //@{
    +  /*! \brief Returns a reference to the inline style sheet.
    +   *
    +   * Widgets may allow configuration of their look and feel through
    +   * style classes. These may be defined in this inline stylesheet, or
    +   * in external style sheets.
    +   *
    +   * It is usually preferable to use external stylesheets (and
    +   * consider more accessible). Still, the internal stylesheet has as
    +   * benefit that style rules may be dynamically updated, and it is
    +   * easier to manage logistically.
    +   *
    +   * \sa useStyleSheet()
    +   * \sa WWidget::setStyleClass()
    +   */
    +  WCssStyleSheet& styleSheet() { return styleSheet_; }
    +
    +  /*! \brief Adds an external style sheet.
    +   *
    +   * Widgets may allow configuration of their look and feel through
    +   * style classes. These may be defined in an inline stylesheet,
    +   * or in external style sheets.
    +   *
    +   * The \p url indicates a relative or absolute URL to the
    +   * stylesheet.
    +   *
    +   * External stylesheets are inserted after the internal style sheet,
    +   * and can therefore override default styles set by widgets in the
    +   * internal style sheet.
    +   *
    +   * \sa styleSheet(), useStyleSheet(const std::string&, const std::string&)
    +   * \sa WWidget::setStyleClass()
    +   */
    +  void useStyleSheet(const std::string& url);
    +
    +  /*! \brief Adds an external style sheet, constrained with conditions.
    +   *
    +   * If not empty, \p condition is a string that is used to apply the
    +   * stylesheet to specific versions of IE. Only a limited subset of
    +   * the IE conditional comments syntax is supported (since these are
    +   * in fact interpreted server-side instead of client-side). Examples
    +   * are:
    +   *
    +   * - "IE gte 6": only for IE version 6 or later.
    +   * - "!IE gte 6": only for IE versions prior to IE6.
    +   * - "IE lte 7": only for IE versions prior to IE7.
    +   *
    +   * The \p media indicates the CSS media to which this stylesheet
    +   * applies.  This may be a comma separated list of media. The
    +   * default value is "all" indicating all media.
    +   *
    +   * The \p url indicates a relative or absolute URL to the
    +   * stylesheet.
    +   *
    +   * \sa useStyleSheet()
    +   */
    +  void useStyleSheet(const std::string& url, const std::string& condition,
    +		     const std::string& media = "all");
    +
    +  /*! \brief Sets the theme.
    +   *
    +   * The theme provides the look and feel of several built-in widgets,
    +   * using CSS style rules. Rules for each theme are defined in the
    +   * <tt>resources/themes/</tt><i>theme</i><tt>/</tt> folder.
    +   *
    +   * The default theme is "default". When setting "", the external style
    +   * sheets related to the theme are not loaded.
    +   */
    +  void setCssTheme(const std::string& theme);
    +
    +  /*! \brief Returns the theme.
    +   *
    +   * \sa setCssTheme()
    +   */
    +  std::string cssTheme() const { return theme_; }
    +
    +  /*! \brief Sets a style class to the entire page &lt;body&gt;.
    +   *
    +   * \sa setHtmlClass()
    +   */
    +  void setBodyClass(const std::string& styleClass);
    +
    +  /*! \brief Returns the style class set for the entire page &lt;body&gt;.
    +   *
    +   * \sa setBodyClass()
    +   */
    +  std::string bodyClass() const { return bodyClass_; }
    +
    +  /*! \brief Sets a style class to the entire page &lt;html&gt;.
    +   *
    +   * \sa setBodyClass()
    +   */
    +  void setHtmlClass(const std::string& styleClass);
    +
    +  /*! \brief Returns the style class set for the entire page &lt;html&gt;.
    +   *
    +   * \sa setHtmlClass()
    +   */
    +  std::string htmlClass() const { return htmlClass_; }
    +  //@}
    +
    +  /*! \brief Sets the window title.
    +   *
    +   * Sets the browser window title to \p title.
    +   *
    +   * The default title is "".
    +   *
    +   * \sa title()
    +   */
    +  void setTitle(const WString& title);
    +
    +  /*! \brief Returns the window title.
    +   *
    +   * \sa setTitle(const WString&)
    +   */
    +  const WString& title() const { return title_; }
    +
    +  /*! \brief Returns the close message.
    +   */
    +  const WString& closeMessage() const { return closeMessage_; }
    +
    +  /*! \brief Returns the resource object that provides localized strings.
    +   *
    +   * \if cpp
    +   * The default value is a WMessageResourceBundle instance, which
    +   * uses XML files to resolve localized strings, but you can set a
    +   * custom class using setLocalizedStrings().
    +   * \elseif java
    +   * This returns the object previously set using setLocalizedStrings().
    +   * \endif
    +   *
    +   * WString::tr() is used to create localized strings, whose
    +   * localized translation is looked up through this object, using a
    +   * key.
    +   * 
    +   * \if cpp
    +   * \sa WString::tr(), messageResourceBundle()
    +   * \elseif java
    +   * \sa WString::tr()
    +   * \endif
    +   */
    +  WLocalizedStrings *localizedStrings();
    +
    +  /*! \brief Sets the resource object that provides localized strings.
    +   *
    +   * The \p translator resolves localized strings within the current
    +   * application locale.
    +   *
    +   * \if cpp
    +   * The previous resource is deleted, and ownership of the new resource
    +   * passes to the application.
    +   * \endif
    +   *
    +   * \sa localizedStrings(), WString::tr(const char *key)
    +   */
    +  void setLocalizedStrings(WLocalizedStrings *stringResolver);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Returns the message resource bundle.
    +   *
    +   * The message resource bundle defines the list of external XML
    +   * files that are used to lookup localized strings.
    +   *
    +   * The default localizedStrings() is a WMessageResourceBundle
    +   * object, and this method returns localizedStrings() upcasted to
    +   * this type.
    +   *
    +   * \sa WString::tr(const char *key)
    +   */
    +  WMessageResourceBundle& messageResourceBundle() const;
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Changes the locale.
    +   *
    +   * The locale is used by the localized strings resource to resolve
    +   * localized strings.
    +   *
    +   * By passing an empty \p locale, the default locale is
    +   * chosen.
    +   *
    +   * When the locale is changed, refresh() is called, which will
    +   * resolve the strings of the current user-interface in the new
    +   * locale.
    +   *
    +   * At construction, the locale is copied from the environment
    +   * (WEnvironment::locale()), and this is the locale that was
    +   * configured by the user in his browser preferences, and passed
    +   * using an HTTP request header.
    +   *
    +   * \sa localizedStrings(), WString::tr()
    +   */
    +  void setLocale(const WT_LOCALE& locale);
    +
    +  /*! \brief Returns the current locale.
    +   *
    +   * \sa setLocale(const std::string&)
    +   */
    +  WT_LOCALE locale() const { return locale_; }
    +
    +  /*! \brief Refreshes the application.
    +   *
    +   * This lets the application to refresh its data, including strings
    +   * from message-resource bundles. This done by propagating
    +   * WWidget::refresh() through the widget hierarchy.
    +   *
    +   * This method is also called when the user hits the refresh (or
    +   * reload) button, if this can be caught within the current session.
    +   *
    +   * \if cpp
    +   *
    +   * The reload button may only be caught when %Wt is configured so that
    +   * reload should not spawn a new session. When URL rewriting is used for
    +   * session tracking, this will cause an ugly session ID to be added to the
    +   * URL. See \ref config_session for configuring the reload
    +   * behavior ("<reload-is-new-session>").
    +   *
    +   * \elseif java
    +   *
    +   * The reload button may only be caught when cookies for session
    +   * tracking are configured in the servlet container.
    +   *
    +   * \endif
    +   *
    +   * \sa WWidget::refresh()
    +   */
    +  virtual void refresh();
    +
    +  /*! \brief Binds a top-level widget for a WidgetSet deployment.
    +   *
    +   * This method binds a \p widget to an existing element with DOM id
    +   * \p domId on the page. The element type should correspond with
    +   * the widget type (e.g. it should be a &lt;div&gt; for a
    +   * WContainerWidget, or a &lt;table&gt; for a WTable).
    +   *
    +   * \sa root()
    +   * \sa Wt::WidgetSet
    +   */
    +  void bindWidget(WWidget *widget, const std::string& domId);
    +
    +  /** @name URLs and internal paths
    +   */
    +  //@{
    +  /*! \brief Returns a URL for the current session
    +   *
    +   * Returns the (relative) URL for this application session
    +   * (including the session ID if necessary). The URL includes the
    +   * full application path, and is expanded by the browser into a full
    +   * URL.
    +   *
    +   * For example, for an application deployed at \code
    +   * http://www.mydomain.com/stuff/app.wt \endcode this method would
    +   * return <tt>"/stuff/app.wt?wtd=AbCdEf"</tt>. Additional query
    +   * parameters can be appended in the form of
    +   * <tt>"&param1=value&param2=value"</tt>.
    +   *
    +   * To obtain a URL that is suitable for bookmarking the current
    +   * application state, to be used across sessions, use bookmarkUrl()
    +   * instead.
    +   *
    +   * \sa redirect(), WEnvironment::hostName(), WEnvironment::urlScheme()
    +   * \sa bookmarkUrl()
    +   */
    +  std::string url() const;
    +
    +  /*! \brief Makes an absolute URL.
    +   *
    +   * Returns an absolute URL for a given (relative url) by including
    +   * the schema, hostname, and deployment path.
    +   *
    +   * If \p url is "", then the absolute base URL is returned. This is
    +   * the absolute URL at which the application is deployed, up to the
    +   * last '/'.
    +   */
    +  std::string makeAbsoluteUrl(const std::string& url) const;
    +
    +  /*! \brief Returns a bookmarkable URL for the current internal path.
    +   *
    +   * Is equivalent to <tt>bookmarkUrl(internalPath())</tt>, see
    +   * bookmarkUrl(const std::string&) const.
    +   *
    +   * To obtain a URL that is refers to the current session of the
    +   * application, use url() instead.
    +   *
    +   * \sa url(), bookmarkUrl(const std::string&) const
    +   */
    +  std::string bookmarkUrl() const;
    +
    +  /*! \brief Returns a bookmarkable URL for a given internal path.
    +   *
    +   * Returns the (relative) URL for this application that includes the
    +   * internal path \p internalPath, usable across sessions. The
    +   * URL is relative and expanded into a full URL by the browser.
    +   *
    +   * For example, for an application with current URL:
    +   * \code
    +   * http://www.mydomain.com/stuff/app.wt#/project/internal/
    +   * \endcode
    +   * when called with <tt>"/project/external"</tt>, this method would
    +   * return:
    +   *  - <tt>"app.wt/project/external/"</tt> when JavaScript is available, or
    +   *    the agent is a web spider, or
    +   *  - <tt>"app.wt/project/external/?wtd=AbCdEf"</tt> when no JavaScript
    +   *    is available and URL rewriting is used for session-tracking
    +   *    \if cpp
    +   *    (see also \ref config_session for configuring the session-tracking 
    +   *    method).
    +   *    \endif
    +   *
    +   * When the application is deployed at a folder (ending with '/'),
    +   * this style of URLs is not possible, and URLs are of the form:
    +   *  - <tt>"?_=/project/external/"</tt> when JavaScript is available, or
    +   *    the agent is a web spider, or
    +   *  - <tt>"?_=/project/external/&wtd=AbCdEf"</tt> when no JavaScript
    +   *    is available and URL rewriting is used for session-tracking.
    +   *
    +   * You can use bookmarkUrl() as the destination for a WAnchor, and
    +   * listen to a click event is attached to a slot that switches to
    +   * the internal path \p internalPath (see
    +   * WAnchor::setRefInternalPath()). In this way, an anchor can be
    +   * used to switch between internal paths within an application
    +   * regardless of the situation (browser with or without Ajax
    +   * support, or a web spider bot), but still generates suitable URLs
    +   * across sessions, which can be used for bookmarking, opening in a
    +   * new window/tab, or indexing.
    +   *
    +   * To obtain a URL that refers to the current session of the
    +   * application, use url() instead.
    +   *
    +   * \sa url(), bookmarkUrl()
    +   */
    +  std::string bookmarkUrl(const std::string& internalPath) const;
    +
    +  /*! \brief Change the internal path.
    +   *
    +   * A %Wt application may manage multiple virtual paths. The virtual
    +   * path is appended to the application URL. Depending on the
    +   * situation, the path is directly appended to the application URL
    +   * or it is appended using a name anchor (#).
    +   *
    +   * For example, for an application deployed at:
    +   * \code
    +   * http://www.mydomain.com/stuff/app.wt
    +   * \endcode
    +   * for which an \p internalPath <tt>"/project/z3cbc/details/"</tt> is
    +   * set, the two forms for the application URL are:
    +   * <ul>
    +   * <li> in an AJAX session:
    +   * \code
    +   * http://www.mydomain.com/stuff/app.wt#/project/z3cbc/details/
    +   * \endcode
    +   * </li><li>
    +   * in a plain HTML session:
    +   * \code
    +   * http://www.mydomain.com/stuff/app.wt/project/z3cbc/details/
    +   * \endcode
    +   *    This has as major consequence that from the browser stand point,
    +   *    the application now serves many different URLs. As a consequence,
    +   *    relative URLs will break. Still, you can specify relative URLs
    +   *    within your application (in for example WAnchor::setRef() or
    +   *    WImage::setImageRef()) since %Wt will transform them
    +   *    to absolute URLs when needed. But, this in turn may break deployments
    +   *    behind reverse proxies when the context paths differ. For the same
    +   *    reason, you will need to use absolute URLs in any XHTML or CSS you
    +   *    write manually. <br>
    +   *    This type of URLs are only used when the your application is
    +   *    deployed at a location that does not end with
    +   *    a '/'. Otherwise, %Wt will generate URLS like:
    +   * \code
    +   * http://www.mydomain.com/stuff/?_=/project/z3cbc/details/
    +   * \endcode
    +   * </li></ul>
    +   *
    +   * When the internal path is changed, an entry is added to the
    +   * browser history. When the user navigates back and forward through
    +   * this history (using the browser back/forward buttons), an
    +   * internalPathChanged() event is emitted. You should listen to this
    +   * signal to switch the application to the corresponding state. When
    +   * \p emitChange is \c true, this signal is also emitted by setting
    +   * the path.
    +   *
    +   * A url that includes the internal path may be obtained using
    +   * bookmarkUrl().
    +   *
    +   * The \p internalPath must start with a '/'. In this way, you
    +   * can still use normal anchors in your HTML. Internal path changes
    +   * initiated in the browser to paths that do not start with a '/'
    +   * are ignored.
    +   *
    +   * \sa bookmarkUrl(), internalPath(), internalPathChanged()
    +   */
    +  void setInternalPath(const std::string& path, bool emitChange = false);
    +
    +  /*! \brief Returns the current internal path.
    +   *
    +   * When the application is just created, this is equal to
    +   * WEnvironment::internalPath().
    +   *
    +   * \sa setInternalPath(), internalPathNextPart(), internalPathMatches()
    +   */
    +  std::string internalPath() const;
    +
    +  /*! \brief Returns a part of the current internal path.
    +   *
    +   * This is a convenience method which returns the next \p folder
    +   * in the internal path, after the given \p path.
    +   *
    +   * For example, when the current internal path is
    +   * <tt>"/project/z3cbc/details"</tt>, this method returns
    +   * <tt>"details"</tt> when called with <tt>"/project/z3cbc/"</tt> as
    +   * \p path argument.
    +   *
    +   * The \p path must start with a '/', and internalPathMatches()
    +   * should evaluate to \c true for the given \p path. If not,
    +   * an empty string is returned and an error message is logged.
    +   *
    +   * \sa internalPath(), internalPathChanged()
    +   */
    +  std::string internalPathNextPart(const std::string& path) const;
    +
    +  /*! \brief Checks if the internal path matches a given path.
    +   *
    +   * Returns whether the current internalPath() starts with
    +   * \p path (or is equal to \p path). You will typically use
    +   * this method within a slot conneted to the internalPathChanged()
    +   * signal, to check that an internal path change affects the
    +   * widget. It may also be useful before changing \p path using
    +   * setInternalPath() if you do not intend to remove sub paths when
    +   * the current internal path already matches \p path.
    +   *
    +   * The \p path must start with a '/'.
    +   *
    +   * \sa setInternalPath(), internalPath()
    +   */
    +  bool internalPathMatches(const std::string& path) const;
    +
    +  /*! \brief %Signal which indicates that the user changes the internal path.
    +   *
    +   * This signal indicates a change to the internal path, which is
    +   * usually triggered by the user using the browser back/forward
    +   * buttons.
    +   *
    +   * The argument contains the new internal path.
    +   *
    +   * \sa setInternalPath()
    +   */
    +  Signal<std::string>& internalPathChanged() { return internalPathChanged_; }
    +
    +  /*! \brief Redirects the application to another location.
    +   *
    +   * The client will be redirected to a new location identified by \p
    +   * url. Use this in conjunction with quit() if you want to the
    +   * application to be terminated as well.
    +   *
    +   * Calling %redirect() does not imply %quit() since it may be useful
    +   * to switch between a non-secure and secure (SSL) transport
    +   * connection.
    +   */
    +  void redirect(const std::string& url);
    +  //@}
    +
    +  /*! \brief Returns the URL at which the resources are deployed.
    +   *
    +   * \if cpp
    +   * This returns the value of the 'resources' property set in the
    +   * configuration file.
    +   * \endif
    +   */
    +  static std::string resourcesUrl();
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Returns the approot special property
    +   *
    +   * This returns the "approot" property, with a trailing slash added to
    +   * the end if it was not yet present.
    +   *
    +   * The property "approot" was introduced as a generalization of the
    +   * working directory for the location of files that do not need to
    +   * be served over http to the client, but are required by the
    +   * program to run properly. Typically, these are message resource
    +   * bundles (xml), CSV files, database files (e.g. SQLite files for
    +   * Wt::Dbo), ...
    +   *
    +   * Some connectors do not allow you to control what the current
    +   * working directory (CWD) is set to (fcgi, isapi). Instead of
    +   * referring to files assuming a sensible CWD, it is therefore
    +   * better to refer to them relative to the application root.
    +   *
    +   * The approot property is special in the sense that it can be set
    +   * implicitly by the connector (see the connector documentation for
    +   * more info). If it was not set by the connector, it can be set as
    +   * a normal property in the configuration file (the default
    +   * wt_config.xml describes how to set properties). If the property
    +   * is not set at all, it is assumed that the approot is CWD and this
    +   * function will return an empty string.
    +   *
    +   * \if cpp
    +   * Usage example:
    +   * \code
    +   * messageResourceBundle().use(appRoot() + "text");
    +   * messageResourceBundle().use(appRoot() + "charts");
    +   *
    +   * Wt::Dbo::backend::Sqlite3 sqlite3_(approot() + "planner.db");
    +   * \endcode
    +   * \endif
    +   *
    +   * \sa WServer::appRoot()
    +   */
    +  static std::string appRoot();
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns the unique identifier for the current session.
    +   *
    +   * The session id is a string that uniquely identifies the current session.
    +   * Note that the actual contents has no particular meaning and client
    +   * applications should in no way try to interpret its value.
    +   */
    +  std::string sessionId() const;
    +
    +  WebSession *session() const { return session_; }
    +
    +  /** @name Manipulation outside the main event loop
    +   */
    +  //@{
    +  /*! \brief Enables server-initiated updates.
    +   *
    +   * By default, updates to the user interface are possible only at
    +   * startup, during any event (in a slot), or at regular time points
    +   * using WTimer. This is the normal %Wt event loop.
    +   *
    +   * In some cases, one may want to modify the user interface from a
    +   * second thread, outside the event loop. While this may be worked
    +   * around by the WTimer, in some cases, there are bandwidth and
    +   * processing overheads associated which may be unnecessary, and
    +   * which create a trade-off with time resolution of the updates.
    +   *
    +   * When \p enabled is \c true, this enables "server push" (what is
    +   * called 'comet' in AJAX terminology). Widgets may then be
    +   * modified, created or deleted outside of the event loop (e.g. in
    +   * response to execution of another thread), and these changes are
    +   * propagated by calling triggerUpdate().
    +   *
    +   * Note that you need to grab the application's update lock to avoid
    +   * concurrency problems, whenever you modify the application's state
    +   * from another thread.
    +   *
    +   * \if cpp
    +   * At any time, the application may be deleted (e.g. because
    +   * of a time out or because the user closes the application
    +   * window). You should thus make sure you do no longer reference an
    +   * application after it has been deleted. When Wt decides to delete
    +   * an application, it first runs WApplication::finalize() and then
    +   * invokes the destructor. While doing this, any other thread trying
    +   * to grab the update lock will succeed but WApplication::instance()
    +   * will return 0 -- i.e. the application is not actually locked. You
    +   * should therefore always check WApplication::instance() after you
    +   * locked the application.
    +   * \endif
    +   *
    +   * An example of how to modify the widget tree outside the event loop
    +   * and propagate changes is:
    +   * \if cpp
    +   * \code
    +   * // You need to have a reference to the application whose state
    +   * // you are about to manipulate.
    +   * // You should prevent the application from being deleted somehow,
    +   * // before you could grab the application lock.
    +   * Wt::WApplication *app = ...;
    +   *
    +   * {
    +   *   // Grab the application lock. It is a scoped lock.
    +   *   Wt::WApplication::UpdateLock lock(app);
    +   *
    +   *   if (lock) {
    +   *     // We now have exclusive access to the application: we can safely modify the widget tree for example.
    +   *     app->root()->addWidget(new Wt::WText("Something happened!"));
    +   *
    +   *     // Push the changes to the browser
    +   *     app->triggerUpdate();
    +   *   }
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * // You need to have a reference to the application whose state
    +   * // you are about to manipulate.
    +   * WApplication app = ...;
    +   *
    +   * // Grab the application lock
    +   * WApplication.UpdateLock lock = app.getUpdateLock();
    +   *
    +   * try {
    +   *   // We now have exclusive access to the application:
    +   *   // we can safely modify the widget tree for example.
    +   *   app.getRoot().addWidget(new WText("Something happened!"));
    +   *
    +   *   // Push the changes to the browser
    +   *   app.triggerUpdate();
    +   * } finally {
    +   *   lock.release();
    +   * }
    +   * \endcode
    +   * \endif
    +   *
    +   * \if java
    +   * This works only if your servlet container supports the Servlet 3.0
    +   * API. If you try to invoke this function on a servlet container with 
    +   * no such support, and exception will be thrown.
    +   * \endif
    +   *
    +   * \note This works only if JavaScript is available on the client.
    +   *
    +   * \sa triggerUpdate()
    +   */
    +  void enableUpdates(bool enabled = true);
    +
    +  /*! \brief Returns whether server-initiated updates are enabled.
    +   *
    +   * \sa enableUpdates()
    +   */
    +  bool updatesEnabled() const { return serverPush_ > 0; }
    +
    +  /*! \brief Propagates server-initiated updates.
    +   *
    +   * Propagate changes made to the user interface outside of the main
    +   * event loop. This is only possible after a call to
    +   * enableUpdates(), and must be done while holding the UpdateLock.
    +   *
    +   * \sa enableUpdates(), UpdateLock
    +   */
    +  void triggerUpdate();
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief A RAII lock for manipulating and updating the
    +   *         application and its widgets outside of the event loop.
    +   *
    +   * You need to take this lock only when you want to manipulate
    +   * widgets outside of the event loop. Inside the event loop, this
    +   * lock is already held by the library itself.
    +   */
    +#else
    +  /*! \brief A synchronization lock for manipulating and updating the
    +   *         application and its widgets outside of the event loop.
    +   *
    +   * You need to take this lock only when you want to manipulate
    +   * widgets outside of the event loop. Inside the event loop, this
    +   * lock is already held by the library itself.
    +   *
    +   * \sa getUpdateLock()
    +   */
    +#endif // WT_TARGET_JAVA
    +  class WT_API UpdateLock
    +  {
    +  public:
    +#ifndef WT_TARGET_JAVA
    +    /*! \brief Creates and locks the given application.
    +     *
    +     * The lock guarantees exclusive access to modify the
    +     * application's state.
    +     *
    +     * When one application <i>A</i> is trying to take the lock of an
    +     * another application <i>B</i>, this lock behaves like a
    +     * Wt::SyncLock. Thus while application <i>A</i> waiting for
    +     * application <i>B</i>'s update lock, application <i>B</i> or
    +     * <i>C</i> may succesfully take application <i>A</i>'s update
    +     * lock, in this way avoiding dead-lock situations.
    +     *
    +     * \if cpp
    +     * As soon as the library decides to destroy the application, the
    +     * lock will no longer succeed in taking the application lock. You
    +     * can need to detect this by checking that after the lock is taken,
    +     * the lock is taken:
    +     * \code
    +     * WApplication::UpdateLock lock(app);
    +     * if (lock) {
    +     *   // exclusive access to app state
    +     * }
    +     * \endcode
    +     * \endif
    +     */
    +    UpdateLock(WApplication *app);
    +
    +    /*! \brief Copy constructor (<b>deprecated</b>).
    +     *
    +     * By copying the lock, lock ownership is transferred. The original
    +     * object becomes empty, and its destructor has no longer the
    +     * effect of releasing the lock.
    +     *
    +     * \deprecated use UpdateLock(WApplication *) instead of getUpdateLock()
    +     *             which requires this copy.
    +     */
    +    UpdateLock(const UpdateLock&);
    +
    +    /*! \brief Tests whether the update lock was succesfully taken.
    +     *
    +     * This may return \c false when the library has already decided
    +     * to destroy the session (but before your application
    +     * finalizer/destructor has run to notify helper threads that the
    +     * application is destroyed).
    +     */
    +    operator bool() const { return ok_; }
    +
    +    /*! \brief Releases the lock.
    +     */
    +    ~UpdateLock();
    +
    +#else
    +    /*! \brief Releases the lock.
    +     */
    +    void release();
    +#endif
    +
    +  private:
    +#ifdef WT_TARGET_JAVA
    +    UpdateLock(WApplication *app);
    +#endif // WT_TARGET_JAVA
    +
    +#ifndef WT_TARGET_JAVA
    +    mutable UpdateLockImpl *impl_;
    +    bool ok_;
    +#endif // !WT_TARGET_JAVA
    +
    +    friend class WApplication;
    +  };
    +
    +  /*!
    +   * \if cpp
    +   * \brief Grabs and returns the lock for manipulating widgets outside
    +   *        the event loop (<b>deprecated</b>).
    +   * \endif cpp
    +   * \if java
    +   * \brief Grabs and returns the lock for manipulating widgets outside
    +   *        the event loop.
    +   * \endif java
    +   *
    +   * You need to keep this lock in scope while manipulating widgets
    +   * outside of the event loop. In normal cases, inside the %Wt event
    +   * loop, you do not need to care about it.
    +   *
    +   * \sa enableUpdates(), triggerUpdate()
    +   *
    +   * \if cpp
    +   * \deprecated Use the RAII-style UpdateLock(WApplication *) constructor
    +   *             instead.
    +   * \endif cpp
    +   */
    +  UpdateLock getUpdateLock();
    +
    +  /*! \brief Attach an auxiliary thread to this application.
    +   *
    +   * In a multi-threaded environment, WApplication::instance() uses
    +   * thread-local data to retrieve the application object that
    +   * corresponds to the session currently being handled by the
    +   * thread. This is set automatically by the library whenever an
    +   * event is delivered to the application, or when you use the
    +   * UpdateLock to modify the application from an auxiliary thread
    +   * outside the normal event loop.
    +   *
    +   * When you want to manipulate the widget tree inside the main event
    +   * loop, but from within an auxiliary thread, then you cannot use
    +   * the UpdateLock since this will create an immediate dead
    +   * lock. Instead, you may attach the auxiliary thread to the
    +   * application, by calling this method from the auxiliary thread,
    +   * and in this way you can modify the application from within that
    +   * thread without needing the update lock.
    +   */
    +  void attachThread();
    +  //@}
    +
    +  /** @name Invoking JavaScript or including scripts
    +   */
    +  //@{
    +  /*! \brief Executes some JavaScript code.
    +   *
    +   * This method may be used to call some custom \p javaScript code as
    +   * part of an event response.
    +   *
    +   * This function does not wait until the JavaScript is run, but
    +   * returns immediately. The JavaScript will be run after the normal
    +   * event handling, unless \p afterLoaded is set to \c false.
    +   *
    +   * \sa addAutoJavaScript(), declareJavaScriptFunction()
    +   */
    +  void doJavaScript(const std::string& javascript, bool afterLoaded = true);
    +
    +  /*! \brief Adds JavaScript statements that should be run continuously.
    +   *
    +   * This is an internal method.
    +   *
    +   * It is used by for example layout managers to adjust the layout
    +   * whenever the DOM tree is manipulated.
    +   *
    +   * \sa doJavaScript()
    +   */
    +  void addAutoJavaScript(const std::string& javascript);
    +
    +  /*! \brief Declares an application-wide JavaScript function.
    +   *
    +   * This is an internal method.
    +   */
    +  void declareJavaScriptFunction(const std::string& name,
    +				 const std::string& function);
    +
    +  /*! \brief Loads a JavaScript library.
    +   *
    +   * Loads a JavaScript library located at the URL \p url. %Wt keeps
    +   * track of libraries (with the same URL) that already have been
    +   * loaded, and will load a library only once. In addition, you may
    +   * provide a \p symbol which if already defined will also indicate
    +   * that the library was already loaded (possibly outside of %Wt when
    +   * in WidgetSet mode).
    +   *
    +   * This method returns \c true only when the library is loaded
    +   * for the first time.
    +   *
    +   * JavaScript libraries may be loaded at any point in time. Any
    +   * JavaScript code is deferred until the library is loaded, except
    +   * for JavaScript that was defined to load before, passing \c false
    +   * as second parameter to doJavaScript().
    +   */
    +  bool require(const std::string& url,
    +	       const std::string& symbol = std::string());
    +
    +  /*! \brief Returns the name of the application JavaScript class.
    +   *
    +   * This JavaScript class encapsulates all JavaScript methods
    +   * specific to this application instance. The method is foreseen to
    +   * allow multiple applications to run simultaneously on the same
    +   * page in Wt::WidgtSet mode, without interfering.
    +   */
    +  std::string javaScriptClass() { return javaScriptClass_; }
    +  //@}
    +
    +  /*! \brief Processes UI events.
    +   *
    +   * You may call this method during a long operation to:
    +   *   - propagate widget changes to the client.
    +   *   - process UI events.
    +   *
    +   * This method starts a recursive event loop, blocking the current
    +   * thread, and resumes when all pending user interface events have been
    +   * processed.
    +   *
    +   * Because a thread is blocked, this may affect your application
    +   * scalability.
    +   */
    +  void processEvents();
    +
    +  /*! \brief Reads a configuration property.
    +   *
    +   * Tries to read a configured value for the property
    +   * \p name. The method returns whether a value is defined for
    +   * the property, and sets it to \p value.
    +   *
    +   * \sa WServer::readConfigurationProperty()
    +   */
    +  static bool readConfigurationProperty(const std::string& name,
    +					std::string& value);
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Reads a configuration property.
    +   *
    +   * Tries to read a configured value for the property
    +   * \p name. If no value was configured, the default \p value
    +   * is returned.
    +   */
    +  static std::string *readConfigurationProperty(const std::string& name,
    +						const std::string& value);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Sets the Ajax communication method.
    +   *
    +   * You may change the communication method only from within the
    +   * application constructor.
    +   *
    +   * The default method depends on your application deployment
    +   * type.
    +   *
    +   * \if cpp
    +   * For \link Wt::Application plain\endlink applications, \link
    +   * WApplication::XMLHttpRequest XMLHttpRequest\endlink is used,
    +   * while for \link Wt::WidgetSet widget set\endlink
    +   * applications, \link WApplication::DynamicScriptTag
    +   * DynamicScriptTag\endlink is used. The latter is less efficient,
    +   * but has the benefit to allow serving the application from a
    +   * different server than the page that hosts the embedded widgets.
    +   * \elseif java
    +   * For plain applications, \link WApplication::XMLHttpRequest 
    +   * XMLHttpRequest\endlink is used, while for WidgetSet 
    +   * applications, \link WApplication::DynamicScriptTag
    +   * DynamicScriptTag\endlink is used. The latter is less efficient,
    +   * but has the benefit to allow serving the application from a
    +   * different server than the page that hosts the embedded widgets.
    +   * \endif
    +   */
    +  void setAjaxMethod(AjaxMethod method);
    +
    +  /*! \brief Returns the Ajax communication method.
    +   *
    +   * \sa setAjaxMethod()
    +   */
    +  AjaxMethod ajaxMethod() const { return ajaxMethod_; }
    +
    +  /*
    +   * The DOM root object. This contains not only the application root but
    +   * also other invisible objects (timers, dialog covers, ...).
    +   */
    +  WContainerWidget *domRoot() const { return domRoot_; }
    +
    +  /*
    +   * A phony DOM root object, used to logically contain all widgets bound
    +   * in widgetset mode.
    +   */
    +  WContainerWidget *domRoot2() const { return domRoot2_; }
    +
    +  /*
    +   * Encode an object to a string, to make it referencable from JavaScript.
    +   * Currently only used to encode the drag object in drag & drop.
    +   *
    +   * FIXME: provide a way to remove the encoding!
    +   *
    +   * \see decodeObject()
    +   */
    +  std::string encodeObject(WObject *object);
    +
    +  /*
    +   * Decode an object.
    +   *
    +   * \see encodeObject()
    +   */
    +  WObject *decodeObject(const std::string& objectId) const;
    +
    +  /*
    +   * Check if the url needs to be modified when it should be a
    +   * url relative to the application path, but the query info will make
    +   * it point to some internal path.
    +   */
    +  std::string fixRelativeUrl(const std::string& url) const;
    +
    +  /*! \brief Initializes the application, post-construction.
    +   *
    +   * This method is invoked by the %Wt library after construction of a
    +   * new application. You may reimplement this method to do additional
    +   * initialization that is not possible from the constructor
    +   * (e.g. which uses virtual methods).
    +   */
    +  virtual void initialize();
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Finalizes the application, pre-destruction.
    +   *
    +   * This method is invoked by the %Wt library before destruction of a
    +   * new application. You may reimplement this method to do additional
    +   * finalization that is not possible from the destructor (e.g. which
    +   * uses virtual methods).
    +   */
    +  virtual void finalize();
    +#endif //WT_TARGET_JAVA
    +
    +  /*! \brief Changes the threshold for two-phase rendering.
    +   *
    +   * This changes the threshold for the \p size of a JavaScript
    +   * response (in bytes) to render invisible changes in one go. If the
    +   * bandwidth for rendering the invisible changes exceed the
    +   * threshold, they will be fetched in a second communication, after
    +   * the visible changes have been rendered.
    +   *
    +   * The value is a trade-off: setting it smaller will always use
    +   * two-phase rendering, increasing the total render time but
    +   * reducing the latency for the visible changes. Setting it too
    +   * large will increase the latency to render the visible changes,
    +   * since first also all invisible changes need to be computed and
    +   * received in the browser.
    +   *
    +   * \if cpp
    +   * The initial value is read from the configuration file, see \ref
    +   * config_general.
    +   * \endif
    +   */
    +  void setTwoPhaseRenderingThreshold(int size);
    +
    +  /*! \brief Sets a new cookie.
    +   *
    +   * Use cookies to transfer information across different sessions
    +   * (e.g. a user name). In a subsequent session you will be able to
    +   * read this cookie using WEnvironment::getCookie(). You cannot use
    +   * a cookie to store information in the current session.
    +   *
    +   * The name must be a valid cookie name (of type 'token': no special
    +   * characters or separators, see RFC2616 page 16). The value may be
    +   * anything. Specify the maximum age (in seconds) after which the
    +   * client must discard the cookie. To delete a cookie, use a value of '0'.
    +   *
    +   * By default the cookie only applies to the current path on the
    +   * current domain. To set a proper value for domain, see also RFC2109.
    +   *
    +   * \if cpp
    +   * \note %Wt provides session tracking automatically, and may be configured
    +   *       to use a cookie for this. You only need to use cookies yourself
    +   *       if you want to remember information <i>across sessions</i>.
    +   * \endif
    +   *
    +   * \sa WEnvironment::supportsCookies(), WEnvironment::getCookie()
    +   */
    +  void setCookie(const std::string& name, const std::string& value,
    +		 int maxAge, const std::string& domain = "",
    +		 const std::string& path = "");
    +
    +  /*! \brief Adds an HTML meta header.
    +   *
    +   * A meta header can only be added in the following situations:
    +   *
    +   * - when a plain HTML session is used (including when the user agent is a
    +   *   bot), you can add meta headers at any time.
    +   *
    +   * - or, when \ref progressive_bootstrap "progressive bootstrap" is
    +   *   used, you can set meta headers for any type of session, from
    +   *   within the application constructor (which corresponds to the
    +   *   initial request).
    +   *
    +   * - but never for a Wt::WidgetSet mode application since then the
    +   *   application is hosted within a foreign HTML page.
    +   *
    +   * These situations coincide with WEnvironment::ajax()
    +   * returning \c false (see environment()).
    +   */
    +  void addMetaHeader(const std::string& name, const WString& content,
    +		     const std::string& lang = "");
    +
    +  /*! \brief Adds an HTML meta header.
    +   *
    +   * This overloaded method allows to define both "name" meta headers,
    +   * relating to document properties as well as "http-equiv" meta
    +   * headers, which define HTTP headers.
    +   *
    +   * \sa addMetaHeader()
    +   */
    +  void addMetaHeader(MetaHeaderType type, const std::string& name,
    +		     const WString& content, const std::string& lang = "");
    +
    +  /*! \brief Adds an entry to the application log.
    +   *
    +   * Starts a new log entry of the given \p type in the %Wt
    +   * application log file. This method returns a stream-like object to
    +   * which the message may be streamed.
    +   * 
    +   * \if cpp
    +   * A typical usage would be:
    +   * \code
    +   *  wApp->log("notice") << "User " << userName << " logged in successfully.";
    +   * \endcode
    +   *
    +   * This would create a log entry that looks like:
    +   * \verbatim
    +[2008-Jul-13 14:01:17.817348] 16879 [/app.wt Z2gCmSxIGjLHD73L] [notice] "User bart logged in successfully." \endverbatim
    +   * \endif
    +   *
    +   * \if cpp
    +   * \sa \ref config_general
    +   * \endif
    +   */
    +  WLogEntry log(const std::string& type) const;
    +
    +  /*! \brief Sets the loading indicator.
    +   *
    +   * The loading indicator is shown to indicate that a response from
    +   * the server is pending or JavaScript is being evaluated.
    +   *
    +   * The default loading indicator is a WDefaultLoadingIndicator.
    +   *
    +   * When setting a new loading indicator, the previous one is
    +   * deleted.
    +   */
    +  void setLoadingIndicator(WLoadingIndicator *indicator);
    +
    +  /*! \brief Returns the loading indicator.
    +   *
    +   * \sa setLoadingIndicator()
    +   */
    +  WLoadingIndicator *loadingIndicator() const { return loadingIndicator_; }
    +
    +  /*
    +   * A url to a resource that provides a one pixel gif. This is sometimes
    +   * useful for CSS hackery to make IE behave.
    +   */
    +  std::string onePixelGifUrl();
    +
    +  /*
    +   * The doctype used to deliver the application.
    +   */
    +  std::string docType() const;
    +
    +  /*! \brief Quits the application.
    +   *
    +   * The method returns immediately, but has as effect that the
    +   * application will be terminated after the current event is
    +   * completed.
    +   *
    +   * The current widget tree (including any modifications still
    +   * pending and applied during the current event handling) will still
    +   * be rendered, after which the application is terminated.
    +   *
    +   * You might want to make sure no more events can be received from
    +   * the user, by not having anything clickable, for example by
    +   * displaying only text. Even better is to redirect() the user to
    +   * another, static, page in conjunction with %quit().
    +   *
    +   * \sa redirect()
    +   */
    +  void quit();
    +
    +  /*! \brief Returns whether the application is quited.
    +   *
    +   * \sa quit()
    +   */
    +  bool isQuited() const { return quited_; }
    +
    +  /*! \brief Returns the current maximum size of a request to the application.
    +   *
    +   * \if cpp
    +   * The maximum request size is configured in the configuration file,
    +   * see \ref config_general.
    +   * \endif
    +   *
    +   * \sa requestTooLarge()
    +   */
    +  ::int64_t maximumRequestSize() const;
    +
    +  /*! \brief %Signal which indicates that too a large request was received.
    +   *
    +   * The integer parameter is the request size that was received in bytes.
    +   */
    +  Signal<int>& requestTooLarge() { return requestTooLarge_; }
    +
    +  /*
    +   * For persistent sessions only: redirect to another session.
    +   */
    +  void redirectToSession(const std::string& sessionId);
    +
    +  /*
    +   * For persistent sessions only: return whether the persistent session
    +   * is connected to a browser.
    +   */
    +  bool isConnected() const { return connected_; }
    +
    +  /** @name Global keyboard and mouse events
    +   */
    +  //@{
    +  /*! \brief Event signal emitted when a keyboard key is pushed down.
    +   *
    +   * The application receives key events when no widget currently
    +   * has focus. Otherwise, key events are handled by the widget in focus,
    +   * and its ancestors.
    +   *
    +   * \sa See WInteractWidget::keyWentDown()
    +   */
    +  EventSignal<WKeyEvent>& globalKeyWentDown();
    +
    +  /*! \brief Event signal emitted when a "character" was entered.
    +   *
    +   * The application receives key events when no widget currently
    +   * has focus. Otherwise, key events are handled by the widget in focus,
    +   * and its ancestors.
    +   *
    +   * \sa See WInteractWidget::keyPressed()
    +   */
    +  EventSignal<WKeyEvent>& globalKeyPressed();
    +    
    +  /*! \brief Event signal emitted when a keyboard key is released.
    +   *
    +   * The application receives key events when no widget currently
    +   * has focus. Otherwise, key events are handled by the widget in focus,
    +   * and its ancestors.
    +   *
    +   * \sa See WInteractWidget::keyWentUp()
    +   */
    +  EventSignal<WKeyEvent>& globalKeyWentUp();
    +
    +  /*! \brief Event signal emitted when enter was pressed.
    +   *
    +   * The application receives key events when no widget currently
    +   * has focus. Otherwise, key events are handled by the widget in focus,
    +   * and its ancestors.
    +   *
    +   * \sa See WInteractWidget::enterPressed()
    +   */
    +  EventSignal<>& globalEnterPressed();
    +
    +  /*! \brief Event signal emitted when escape was pressed.
    +   *
    +   * The application receives key events when no widget currently
    +   * has focus. Otherwise, key events are handled by the widget in focus,
    +   * and its ancestors.
    +   *
    +   * \sa See WInteractWidget::escapePressed()
    +   */
    +  EventSignal<>& globalEscapePressed();
    +  //@}
    +
    +  /*
    +   * Returns whether debug was configured.
    +   * (should be public API ?)
    +   */
    +  bool debug() const;
    +
    +  /*
    +   * Methods for client-side focus
    +   */
    +  void setFocus(const std::string& id, int selectionStart, int selectionEnd);
    +
    +#ifdef WT_DEBUG_JS
    +  void loadJavaScript(const char *jsFile);
    +#endif
    +
    +  bool javaScriptLoaded(const char *jsFile);
    +  void setJavaScriptLoaded(const char *jsFile);
    +
    +  /*! \brief Sets the message for the user to confirm closing of the
    +   *         application window/tab.
    +   *
    +   * If the message is empty, then the user may navigate away from the page
    +   * without confirmation.
    +   *
    +   * Otherwise the user will be prompted with a browser-specific
    +   * dialog asking him to confirm leaving the page. This \p message is
    +   * added to the page.
    +   *
    +   * \sa unload()
    +   */
    +  void setConfirmCloseMessage(const WString& message);
    +
    +protected:
    +  /*! \brief Notifies an event to the application.
    +   *
    +   * This method is called by the event loop for propagating an event
    +   * to the application. It provides a single point of entry for
    +   * events to the application, besides the application constructor.
    +   *
    +   * You may want to reimplement this method for two reasons:
    +   *
    +   * - for having a single point for exception handling: while you may want
    +   *   to catch recoverable exceptions in a more appropriate place, general
    +   *   (usually fatal) exceptions may be caught here. You will in probably
    +   *   also want to catch the same exceptions in the application constructor
    +   *   in the same way.
    +   * - you want to manage resource usage during requests. For example, at
    +   *   the end of request handling, you want to return a database session
    +   *   back to the pool. Since %notify() is also used for rendering right after
    +   *   the application is created, this will also clean up resources after
    +   *   application construction.
    +   *
    +   * In either case, you will need to call the base class
    +   * implementation of %notify(), as otherwise no events will be
    +   * delivered to your application.
    +   *
    +   * The following shows a generic template for reimplementhing this
    +   * method for both managing request resources and generic exception
    +   * handling.
    +   *
    +   * \if cpp
    +   * \code
    +   * MyApplication::notify(const WEvent& event)
    +   * {
    +   *    // Grab resources for during request handling
    +   *    try {
    +   *      WApplication::notify(event);
    +   *    } catch (MyException& exception) {
    +   *      // handle this exception in a central place
    +   *    }
    +   *    // Free resources used during request handling
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * void notify(WEvent event) {
    +   *     // Grab resources for during request handling
    +   *     try {
    +   *       super.notify(event);
    +   *     }  catch (MyException exception) {
    +   *       // handle this exception in a central place
    +   *     }
    +   *     // Free resources used during request handling
    +   * }
    +   * \endcode
    +   * \endif
    +   *
    +   * Note that any uncaught exception throw during event handling
    +   * terminates the session.
    +   */
    +  virtual void notify(const WEvent& e);
    +
    +  /*! \brief Returns whether a widget is exposed in the interface.
    +   *
    +   * The default implementation simply returns \c true, unless a modal
    +   * dialog is active, in which case it returns \c true only for widgets
    +   * that are inside the dialog.
    +   *
    +   * You may want to reimplement this method if you wish to disallow
    +   * events from certain widgets even when they are inserted in the
    +   * widget hierachy.
    +   */
    +  virtual bool isExposed(WWidget *w) const;
    +
    +  /*! \brief Progresses to an Ajax-enabled user interface.
    +   *
    +   * This method is called when the progressive bootstrap method is used, and
    +   * support for AJAX has been detected. The default behavior will propagate
    +   * the WWidget::enableAjax() method through the widget hierarchy.
    +   *
    +   * You may want to reimplement this method if you want to make
    +   * changes to the user-interface when AJAX is enabled. You should
    +   * always call the base implementation.
    +   *
    +   * \sa WWidget::enableAjax()
    +   */
    +  virtual void enableAjax();
    +
    +  /*! \brief Handles a browser unload event.
    +   *
    +   * The browser unloads the application when the user navigates away or
    +   * when he closes the window or tab.
    +   *
    +   * When <tt>reload-is-new-session</tt> is set to \c true, then the
    +   * default implementation of this method terminates this session by
    +   * calling quit().
    +   *
    +   * You may want to reimplement this if you want to keep the
    +   * application running until it times out (as was the behaviour
    +   * before %Wt 3.1.6).
    +   */
    +  virtual void unload();
    +
    +private:
    +  Signal<int> requestTooLarge_;
    +
    +  struct ScriptLibrary {
    +    ScriptLibrary(const std::string& uri, const std::string& symbol);
    +
    +    std::string uri, symbol, beforeLoadJS;
    +    bool operator< (const ScriptLibrary& other) const;
    +    bool operator== (const ScriptLibrary& other) const;
    +  };
    +
    +  struct MetaHeader {
    +    MetaHeader(MetaHeaderType type, const std::string& name,
    +	       const WString& content, const std::string& lang);
    +
    +    MetaHeaderType type;
    +    std::string name, lang;
    +    WString content;
    +  };
    +
    +#ifndef WT_TARGET_JAVA
    +  typedef std::map<std::string, EventSignalBase *> SignalMap;
    +#else
    +  typedef std::map<std::string, WeakReference<EventSignalBase *> > SignalMap;
    +#endif
    +  typedef std::map<std::string, WResource *> ResourceMap;
    +  typedef std::map<std::string, WObject *> ObjectMap;
    +
    +  /*
    +   * Basic application stuff
    +   */
    +  WebSession            *session_;     // session owning this application
    +#ifndef WT_CNOR
    +  boost::weak_ptr<WebSession> weakSession_; // used to sense destruction
    +#endif // WT_CNOR
    +  WString                title_;
    +  WString                closeMessage_;
    +  bool                   titleChanged_, closeMessageChanged_;
    +  WContainerWidget      *widgetRoot_;  // widgets in main DOM root
    +  WContainerWidget      *domRoot_;     // main DOM root
    +  WContainerWidget      *domRoot2_;    // other virtual root for WidgetSet mode
    +  WContainerWidget      *timerRoot_;   // timers in main DOM root
    +  WCssStyleSheet         styleSheet_;  // internal style sheet
    +  WCombinedLocalizedStrings *localizedStrings_;
    +  WT_LOCALE              locale_;
    +  std::string            oldInternalPath_, newInternalPath_;
    +  Signal<std::string>    internalPathChanged_;
    +  bool                   internalPathIsChanged_;
    +  int                    serverPush_;
    +  bool			 modifiedWithoutEvent_;
    +#ifndef WT_TARGET_JAVA
    +  boost::pool<boost::default_user_allocator_new_delete> *eventSignalPool_;
    +#endif // WT_TARGET_JAVA
    +  std::string            javaScriptClass_;
    +  AjaxMethod             ajaxMethod_;
    +  WContainerWidget      *dialogCover_;
    +  bool                   quited_;
    +  std::string            onePixelGifUrl_;
    +  bool                   rshLoaded_;
    +  WWidget               *exposedOnly_;
    +  WLoadingIndicator     *loadingIndicator_;
    +  WWidget               *loadingIndicatorWidget_;
    +  bool                   connected_;
    +  std::string            htmlClass_, bodyClass_;
    +  bool                   bodyHtmlClassChanged_;
    +  bool                   enableAjax_, initialized_;
    +  std::string            focusId_;
    +  int                    selectionStart_, selectionEnd_;
    +
    +  std::vector<ScriptLibrary> scriptLibraries_;
    +  int                        scriptLibrariesAdded_;
    +
    +  struct StyleSheet {
    +    std::string uri, media;
    +
    +    StyleSheet(const std::string& anUri, const std::string& aMedia);
    +  };
    +
    +  std::string             theme_;
    +  std::vector<StyleSheet> styleSheets_;
    +  int                     styleSheetsAdded_;
    +
    +  std::vector<MetaHeader> metaHeaders_;
    +
    +  SignalMap   exposedSignals_;   // signals that may be accessed
    +  ResourceMap exposedResources_; // resources that may be accessed
    +  ObjectMap   encodedObjects_;   // objects encoded for internal purposes
    +                                 // like 'virtual pointers' (see D&D)
    +
    +  bool exposeSignals_;           // if we are currently exposing signals
    +                                 // (see WViewWidget)
    +
    +  std::string afterLoadJavaScript_, beforeLoadJavaScript_,
    +    newBeforeLoadJavaScript_, autoJavaScript_;
    +  std::set<const char*> javaScriptLoaded_;
    +  bool autoJavaScriptChanged_;
    +
    +  EventSignal<> showLoadingIndicator_, hideLoadingIndicator_;
    +  JSignal<> unloaded_;
    +
    +  WContainerWidget *timerRoot() const { return timerRoot_; }
    +  WContainerWidget *dialogCover(bool create = true);
    +
    +  WEnvironment&     env();       // short-hand for session_->env()
    +
    +  /*
    +   * Functions for exposed signals, resources, and objects
    +   */
    +  void              addExposedSignal(EventSignalBase* signal);
    +  void              removeExposedSignal(EventSignalBase* signal);
    +  EventSignalBase  *decodeExposedSignal(const std::string& signalName) const;
    +  EventSignalBase  *decodeExposedSignal(const std::string& objectId,
    +				       const std::string& name);
    +  SignalMap&  exposedSignals() { return exposedSignals_; }
    +
    +  std::string resourceMapKey(WResource *resource);
    +  std::string addExposedResource(WResource *resource, const std::string& path);
    +  void removeExposedResource(WResource *resource);
    +  WResource *decodeExposedResource(const std::string& resourceMapKey) const;
    +
    +  /*
    +   * Methods for application state handling
    +   */
    +  bool loadRsh();
    +  void changeInternalPath(const std::string& path);
    +
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +  bool oldInternalPathAPI() const;
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +
    +  /*
    +   * Methods for accessing javaScript, which may have erase-on-read
    +   * semantics
    +   */
    +  std::string afterLoadJavaScript();
    +  std::string beforeLoadJavaScript();
    +  std::string newBeforeLoadJavaScript();
    +
    +  /*
    +   * Methods for accessing exposeSignals_
    +   */
    +  void setExposeSignals(bool how) { exposeSignals_ = how; }
    +  bool exposeSignals() const { return exposeSignals_; }
    +
    +  void constrainExposed(WWidget *w);
    +  WWidget *exposeConstraint() const { return exposedOnly_; }
    +
    +  static bool pathMatches(const std::string& path, const std::string& query);
    +
    +#ifndef WT_TARGET_JAVA
    +  int startWaitingAtLock();
    +  void endWaitingAtLock(int id);
    +#endif // WT_TARGET_JAVA
    +
    +  std::string focus() const { return focusId_; }
    +  int selectionStart() const { return selectionStart_; }
    +  int selectionEnd() const { return selectionEnd_; }
    +
    +  /*
    +   * Methods for audio handling
    +   */
    +  SoundManager *getSoundManager();
    +  SoundManager *soundManager_;
    +
    +  static const char *RESOURCES_URL;
    +
    +#ifdef WT_TARGET_JAVA
    +  JSlot showLoadJS;
    +  JSlot hideLoadJS;
    +#endif
    +
    +  friend class WebRenderer;
    +  friend class WebSession;
    +  friend class WebController;
    +  friend class EventSignalBase;
    +  friend class JavaScriptEvent;
    +  friend class UpdateLockImpl;
    +  friend class WWidget;
    +  friend class WMenu;
    +  friend class WTimer;
    +  friend class WResource;
    +  friend class WFileUpload;
    +  friend class WInteractWidget;
    +  friend class WServerPushResource;
    +  friend class WString;
    +  friend class WFormWidget;
    +  friend class WLineEdit;
    +  friend class WTextArea;
    +  friend class WViewWidget;
    +  friend class WDialog;
    +  friend class WSound;
    +  friend class Ext::Dialog;
    +  friend class Ext::MessageBox;
    +
    +  template <class Lock> friend class SyncLock;
    +};
    +
    +#ifdef WIN32
    +  #ifdef WTHTTP_STATIC
    +    #define WTCONNECTOR_API
    +  #else
    +    #ifdef wthttp_EXPORTS
    +      #define WTCONNECTOR_API __declspec(dllexport)
    +    #else
    +      #define WTCONNECTOR_API __declspec(dllimport)
    +    #endif
    +  #endif
    +#else
    +  #define WTCONNECTOR_API
    +#endif
    +
    +#ifndef WT_TARGET_JAVA
    +#ifdef DOXYGEN_ONLY
    +/*! \brief Runs the %Wt application server.
    + *
    + * This function runs the application server, and should be called
    + * only once (e.g. from within your main function).
    + *
    + * The <i>createApplication</i> argument is a function pointer to
    + * create new application instances for each new user surfing to your application.
    + *
    + * When using the built-in httpd, the implementation listens for POSIX
    + * termination signals (or console CTRL-C) event. You can use the
    + * WServer class for more flexible control on starting and stopping
    + * the server.
    + *
    + * \relates WServer
    + * \sa WApplication
    + */
    +extern int WRun(int argc, char** argv,
    +		ApplicationCreator createApplication = 0);
    +#else // DOXYGEN_ONLY
    +extern int WTCONNECTOR_API WRun(int argc, char** argv,
    +				ApplicationCreator createApplication = 0);
    +
    +#endif // DOXYGEN_ONLY
    +#endif // WT_TARGET_JAVA
    +
    +/*! \def wApp
    + *  \brief Global constant for accessing the application instance.
    + *
    + * This is equivalent to WApplication::instance()
    + *
    + * \relates WApplication
    + */
    +#define wApp Wt::WApplication::instance()
    +
    +}
    +
    +#endif // WAPPLICATION_
    diff --git a/wt-3.1.7a/src/Wt/WApplication.C b/wt-3.1.7a/src/Wt/WApplication.C
    new file mode 100644
    index 0000000..858e079
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WApplication.C
    @@ -0,0 +1,1435 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +#include <fstream>
    +#include <algorithm>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCombinedLocalizedStrings"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WDefaultLoadingIndicator"
    +#include "Wt/WMemoryResource"
    +#include "Wt/WServer"
    +#include "Wt/WText"
    +
    +#include "WtException.h"
    +#include "WebSession.h"
    +#include "DomElement.h"
    +#include "Configuration.h"
    +#include "SoundManager.h"
    +#include "WebController.h"
    +#include "WebRequest.h"
    +#include "Utils.h"
    +
    +#include <boost/pool/pool.hpp>
    +
    +#ifdef min
    +#undef min
    +#endif
    +
    +namespace skeletons {
    +  extern const char * WtMessages_xml;
    +}
    +
    +//#define WTDEBUG
    +
    +namespace Wt {
    +
    +const char *WApplication::RESOURCES_URL = "resourcesURL";
    +
    +WApplication::ScriptLibrary::ScriptLibrary(const std::string& anUri,
    +					   const std::string& aSymbol)
    +  : uri(anUri), symbol(aSymbol)
    +{ }
    +
    +WApplication::StyleSheet::StyleSheet(const std::string& anUri,
    +				     const std::string& aMedia)
    +  : uri(anUri), media(aMedia)
    +{ }
    +
    +WApplication::MetaHeader::MetaHeader(MetaHeaderType aType,
    +				     const std::string& aName,
    +				     const WString& aContent,
    +				     const std::string& aLang)
    +  : type(aType), name(aName), lang(aLang), content(aContent)
    +{ }
    +
    +bool WApplication::ScriptLibrary::operator< (const ScriptLibrary& other) const
    +{
    +  return uri < other.uri;
    +}
    +
    +bool WApplication::ScriptLibrary::operator== (const ScriptLibrary& other) const
    +{
    +  return uri == other.uri;
    +}
    +
    +WApplication::WApplication(const WEnvironment& env)
    +  : session_(env.session_),
    +#ifndef WT_CNOR
    +    weakSession_(session_->shared_from_this()),
    +#endif // WT_CNOR
    +    titleChanged_(false),
    +    closeMessageChanged_(false),
    +    localizedStrings_(0),
    +    internalPathChanged_(this),
    +    serverPush_(0),
    +    modifiedWithoutEvent_(false),
    +#ifndef WT_CNOR
    +    eventSignalPool_(new boost::pool<>(sizeof(EventSignal<>))),
    +#endif
    +    javaScriptClass_("Wt"),
    +    dialogCover_(0),
    +    quited_(false),
    +    rshLoaded_(false),
    +    exposedOnly_(0),
    +    loadingIndicator_(0),
    +    connected_(true),
    +    bodyHtmlClassChanged_(false),
    +    enableAjax_(false),
    +    initialized_(false),
    +    selectionStart_(-1),
    +    selectionEnd_(-1),
    +    scriptLibrariesAdded_(0),
    +    theme_("default"),
    +    styleSheetsAdded_(0),
    +    exposeSignals_(true),
    +    autoJavaScriptChanged_(false),
    +    showLoadingIndicator_("showload", this),
    +    hideLoadingIndicator_("hideload", this),
    +    unloaded_(this, "Wt-unload"),
    +    soundManager_(0)
    +{
    +  session_->setApplication(this);
    +  locale_ = environment().locale();
    +
    +  newInternalPath_ = environment().internalPath();
    +  internalPathIsChanged_ = false;
    +
    +#ifndef WT_TARGET_JAVA
    +  setLocalizedStrings(new WMessageResourceBundle());
    +#else
    +  setLocalizedStrings(0);
    +#endif // !WT_TARGET_JAVA
    +
    +  if (environment().agentIsIElt(9))
    +    addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=7");
    +
    +  domRoot_ = new WContainerWidget();
    +  domRoot_->setStyleClass("Wt-domRoot");
    +  domRoot_->load();
    +
    +  if (session_->type() == Application)
    +    domRoot_->resize(WLength::Auto, WLength(100, WLength::Percentage));
    +
    +  timerRoot_ = new WContainerWidget(domRoot_);
    +  timerRoot_->setId("Wt-timers");
    +  timerRoot_->resize(WLength::Auto, 0);
    +  timerRoot_->setPositionScheme(Absolute);
    +
    +  if (session_->type() == Application) {
    +    ajaxMethod_ = XMLHttpRequest;
    +
    +    domRoot2_ = 0;
    +    widgetRoot_ = new WContainerWidget(domRoot_);
    +    WT_DEBUG(widgetRoot_->setObjectName("wt-app-root"));
    +    widgetRoot_->resize(WLength(100, WLength::Percentage),
    +			WLength(100, WLength::Percentage));
    +  } else {
    +    ajaxMethod_ = DynamicScriptTag;
    +
    +    domRoot2_ = new WContainerWidget();
    +    domRoot2_->load();
    +    widgetRoot_ = 0;
    +  }
    +
    +  /*
    +   * Subset of typical CSS "reset" styles
    +   */
    +  styleSheet_.addRule("table", "border-collapse: collapse; border: 0px");
    +  styleSheet_.addRule("div, td, img",
    +		      "margin: 0px; padding: 0px; border: 0px");
    +  styleSheet_.addRule("td", "vertical-align: top; text-align: left;");
    +  styleSheet_.addRule("button", "white-space: nowrap");
    +  styleSheet_.addRule("video", "display: block");
    +
    +  if (environment().contentType() == WEnvironment::XHTML1) {
    +    //styleSheet_.addRule("img", "margin: -5px 0px;");
    +    styleSheet_.addRule("button", "display: inline");
    +  }
    +
    +  if (environment().agentIsGecko())
    +    styleSheet_.addRule("html", "overflow: auto;");
    +
    +  /*
    +   * Standard Wt CSS styles: resources, button wrap and form validation
    +   */
    +  styleSheet_.addRule("iframe.Wt-resource",
    +		      "width: 0px; height: 0px; border: 0px;");
    +  if (environment().agentIsIElt(9))
    +    styleSheet_.addRule("iframe.Wt-shim",
    +			"position: absolute; top: -1px; left: -1px; "
    +			"z-index: -1;"
    +			"opacity: 0; filter: alpha(opacity=0);"
    +			"border: none; margin: 0; padding: 0;");
    +  styleSheet_.addRule(".Wt-wrap",
    +		      "border: 0px;"
    +		      "text-align: left;"
    +		      "margin: 0px;"
    +		      "padding: 0px;"
    +		      "font-size: inherit; "
    +		      "pointer: hand; cursor: pointer; cursor: hand;"
    +		      "background: transparent;"
    +		      "text-decoration: none;"
    +		      "color: inherit;");
    +  if (environment().agentIsIE())
    +    styleSheet_.addRule(".Wt-wrap",
    +			"margin: -1px 0px -3px;");
    +  //styleSheet_.addRule("a.Wt-wrap", "text-decoration: none;");
    +  styleSheet_.addRule(".Wt-invalid", "background-color: #f79a9a;");
    +  styleSheet_.addRule("span.Wt-disabled", "color: gray;");
    +  styleSheet_.addRule("fieldset.Wt-disabled legend", "color: gray;");
    +  styleSheet_.addRule(".unselectable",
    +		      "-moz-user-select:-moz-none;"
    +		      "-khtml-user-select: none;"
    +		      "user-select: none;");
    +  styleSheet_.addRule(".selectable",
    +		      "-moz-user-select: text;"
    +		      "-khtml-user-select: normal;"
    +		      "user-select: text;");
    +  styleSheet_.addRule(".Wt-sbspacer", "float: right; width: 16px; height: 1px;"
    +		      "border: 0px; display: none;");
    +  styleSheet_.addRule(".Wt-domRoot", "position: relative;");
    +  styleSheet_.addRule("body.Wt-layout", std::string() +
    +		      "height: 100%; width: 100%;"
    +		      "margin: 0px; padding: 0px; border: none;"
    +		      + (environment().javaScript() ? "overflow:hidden" : ""));
    +  styleSheet_.addRule("html.Wt-layout", std::string() +
    +		      "height: 100%; width: 100%;"
    +		      "margin: 0px; padding: 0px; border: none;"
    +		      + (environment().javaScript() ? "overflow:hidden" : ""));
    +
    +  if (environment().agentIsOpera())
    +    if (environment().userAgent().find("Mac OS X") != std::string::npos)
    +      styleSheet_.addRule("img.Wt-indeterminate", "margin: 4px 1px -3px 2px;");
    +    else
    +      styleSheet_.addRule("img.Wt-indeterminate", "margin: 4px 2px -3px 0px;");
    +  else
    +    if (environment().userAgent().find("Mac OS X") != std::string::npos)
    +      styleSheet_.addRule("img.Wt-indeterminate", "margin: 4px 3px 0px 4px;");
    +    else
    +      styleSheet_.addRule("img.Wt-indeterminate", "margin: 3px 3px 0px 4px;");
    +
    +  setLoadingIndicator(new WDefaultLoadingIndicator());
    +
    +  unloaded_.connect(this, &WApplication::unload);
    +}
    +
    +void WApplication::setLoadingIndicator(WLoadingIndicator *indicator)
    +{
    +#ifdef WT_TARGET_JAVA
    +  if (!loadingIndicator_) {
    +    showLoadingIndicator_.connect(showLoadJS);
    +    hideLoadingIndicator_.connect(hideLoadJS);
    +  }
    +#endif
    +
    +  delete loadingIndicator_;
    +  loadingIndicator_ = indicator;
    +
    +  if (loadingIndicator_) {
    +    loadingIndicatorWidget_ = indicator->widget();
    +    domRoot_->addWidget(loadingIndicatorWidget_);
    +
    +#ifndef WT_TARGET_JAVA
    +    showLoadingIndicator_.connect(loadingIndicatorWidget_, &WWidget::show);
    +    hideLoadingIndicator_.connect(loadingIndicatorWidget_, &WWidget::hide);
    +#else
    +    // stateless learning does not yet work
    +    showLoadJS.setJavaScript
    +      ("function(o,e) {"
    +       "" WT_CLASS ".inline('" + loadingIndicatorWidget_->id() + "');"
    +       "}");
    +
    +    hideLoadJS.setJavaScript
    +      ("function(o,e) {"
    +       "" WT_CLASS ".hide('" + loadingIndicatorWidget_->id() + "');"
    +       "}");
    +#endif
    +
    +    loadingIndicatorWidget_->hide();
    +  }
    +}
    +
    +void WApplication::initialize()
    +{ }
    +
    +#ifndef WT_TARGET_JAVA
    +void WApplication::finalize()
    +{ }
    +#endif // !WT_TARGET_JAVA
    +
    +#ifndef WT_TARGET_JAVA
    +WMessageResourceBundle& WApplication::messageResourceBundle() const
    +{
    +  return *(dynamic_cast<WMessageResourceBundle *>(localizedStrings_->items()[0]));
    +}
    +#endif // !WT_TARGET_JAVA
    +
    +std::string WApplication::onePixelGifUrl()
    +{
    +  if (onePixelGifUrl_.empty()) {
    +    WMemoryResource *w = new WMemoryResource("image/gif", this);
    +
    +    static const unsigned char gifData[]
    +      = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00,
    +	  0x80, 0x00, 0x00, 0xdb, 0xdf, 0xef, 0x00, 0x00, 0x00, 0x21,
    +	  0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
    +	  0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44,
    +	  0x01, 0x00, 0x3b };
    +
    +    w->setData(gifData, 43);
    +    onePixelGifUrl_ = w->url();
    +  }
    +
    +  return onePixelGifUrl_;
    +}
    +
    +WApplication::~WApplication()
    +{
    +  timerRoot_ = 0; // marker for being deleted
    +  dialogCover_ = 0;
    +
    +  delete domRoot_;
    +  domRoot_ = 0;
    +
    +  delete domRoot2_;
    +  domRoot2_ = 0;
    +
    +  delete localizedStrings_;
    +
    +  styleSheet_.clear();
    +
    +  session_->setApplication(0);
    +
    +#ifndef WT_TARGET_JAVA
    +  delete eventSignalPool_;
    +#endif
    +}
    +
    +void WApplication::attachThread()
    +{
    +#ifndef WT_CNOR
    +  WebSession::Handler::attachThreadToSession(weakSession_.lock());
    +#else
    +  WebSession::Handler::attachThreadToSession(session_);
    +#endif
    +}
    +
    +void WApplication::setAjaxMethod(AjaxMethod method)
    +{
    +  ajaxMethod_ = method;
    +}
    +
    +std::string WApplication::resourcesUrl()
    +{
    +#ifndef WT_TARGET_JAVA
    +  std::string result = "resources/";
    +  readConfigurationProperty(WApplication::RESOURCES_URL, result);
    +
    +  if (!result.empty() && result[result.length()-1] != '/')
    +    result += '/';
    +
    +  return WApplication::instance()->fixRelativeUrl(result);
    +#else
    +  const std::string* path = WebSession::instance()->controller()
    +    ->configuration().property(WApplication::RESOURCES_URL);
    +  /*
    +   * Arghll... we should in fact know when we need the absolute URL: only
    +   * when we are having a request.pathInfo().
    +   */
    +  if (path == "/wt-resources/") {
    +    std::string result = 
    +      WApplication::instance()->environment().deploymentPath();
    +    if (!result.empty() && result[result.length() - 1] == '/')
    +      return result + path->substr(1);
    +    else
    +      return result + *path;
    +  } else 
    +    return *path;
    +#endif // WT_TARGET_JAVA
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +std::string WApplication::appRoot()
    +{
    +  return WebSession::instance()->controller()->configuration().appRoot();
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WApplication::bindWidget(WWidget *widget, const std::string& domId)
    +{
    +  if (session_->type() != WidgetSet)
    +    throw WtException("WApplication::bind() can be used only "
    +		      "in WidgetSet mode.");
    +
    +  widget->setId(domId);
    +  domRoot2_->addWidget(widget);
    +}
    +
    +WContainerWidget *WApplication::dialogCover(bool create)
    +{
    +  if (dialogCover_ == 0 && create && timerRoot_) {
    +    dialogCover_ = new WContainerWidget(domRoot_);
    +    dialogCover_->setStyleClass("Wt-dialogcover");
    +    dialogCover_->hide();
    +  }
    +
    +  return dialogCover_;
    +}
    +
    +void WApplication::constrainExposed(WWidget *w)
    +{
    +  exposedOnly_ = w;
    +}
    +
    +bool WApplication::isExposed(WWidget *w) const
    +{
    +  if (w != domRoot_ && exposedOnly_) {
    +    for (WWidget *p = w; p; p = p->parent())
    +      if (p == exposedOnly_ || p == timerRoot_)
    +	return true;
    +    return false;
    +  } else {
    +    WWidget *p = w->adam();
    +    return (p == domRoot_ || p == domRoot2_);
    +  }
    +}
    +
    +std::string WApplication::sessionId() const
    +{
    +  return session_->sessionId();
    +}
    +
    +void WApplication::setCssTheme(const std::string& theme)
    +{
    +  // TODO: allow modifying the theme
    +  theme_ = theme;
    +}
    +
    +void WApplication::useStyleSheet(const std::string& uri)
    +{
    +  styleSheets_.push_back(StyleSheet(uri, ""));
    +  ++styleSheetsAdded_;
    +}
    +
    +void WApplication::useStyleSheet(const std::string& uri,
    +				 const std::string& condition,
    +				 const std::string& media)
    +{
    +  bool display = true;
    +
    +  if (!condition.empty()) {
    +    display = false;
    +    if (environment().agentIsIE()) {
    +      int thisVersion = 4;
    +
    +      switch (environment().agent()) {
    +      case WEnvironment::IEMobile:
    +	thisVersion = 5; break;
    +      case WEnvironment::IE6:
    +	thisVersion = 6; break;
    +      case WEnvironment::IE7:
    +	thisVersion = 7; break;
    +      case WEnvironment::IE8:
    +	thisVersion = 8; break;
    +      default:
    +	thisVersion = 9; break;	
    +      }
    +
    +      enum { lte, lt, eq, gt, gte } cond = eq;
    +
    +      bool invert = false;
    +      std::string r = condition;
    +
    +      while (!r.empty()) {
    +	if (r.length() >= 3 && r.substr(0, 3) == "IE ") {
    +	  r = r.substr(3);
    +	} else if (r[0] == '!') {
    +	  r = r.substr(1);
    +	  invert = !invert;
    +	} else if (r.length() >= 4 && r.substr(0, 4) == "lte ") {
    +	  r = r.substr(4);
    +	  cond = lte;
    +	} else if (r.length() >= 3 && r.substr(0, 3) == "lt ") {
    +	  r = r.substr(3);
    +	  cond = lt;
    +	} else if (r.length() >= 3 && r.substr(0, 3) == "gt ") {
    +	  r = r.substr(3);
    +	  cond = gt;
    +	} else if (r.length() >= 4 && r.substr(0, 4) == "gte ") {
    +	  r = r.substr(4);
    +	  cond = gte;
    +	} else {
    +	  try {
    +	    int version = boost::lexical_cast<int>(r);
    +	    switch (cond) {
    +	    case eq:  display = thisVersion == version; break;
    +	    case lte: display = thisVersion <= version; break;
    +	    case lt:  display = thisVersion <  version; break;
    +	    case gte: display = thisVersion >= version; break;
    +	    case gt:  display = thisVersion >  version; break;
    +	    }
    +	    if (invert)
    +	      display = !display;
    +	  } catch (std::exception& e) {
    +	    log("error") << "Could not parse condition: '" << condition << "'";
    +	  }
    +	  r.clear();
    +	}
    +      }
    +    } 
    +  }
    +
    +  if (display) {
    +    styleSheets_.push_back(StyleSheet(uri, media));
    +    ++styleSheetsAdded_;
    +  }
    +}
    +
    +const WEnvironment& WApplication::environment() const
    +{
    +  return session_->env();
    +}
    +
    +WEnvironment& WApplication::env()
    +{
    +  return session_->env();
    +}
    +
    +void WApplication::setTitle(const WString& title)
    +{
    +  if (session_->renderer().preLearning() || title_ != title) {
    +    title_ = title;
    +    titleChanged_ = true;
    +  }
    +}
    +
    +void WApplication::setConfirmCloseMessage(const WString& message)
    +{
    +  if (message != closeMessage_) {
    +    closeMessage_ = message;
    +    closeMessageChanged_ = true;
    +  }
    +}
    +
    +std::string WApplication::url() const
    +{
    +  return fixRelativeUrl(session_->applicationUrl());
    +}
    +
    +std::string WApplication::makeAbsoluteUrl(const std::string& url) const
    +{
    +  if (url.find("://") != std::string::npos)
    +    return url;
    +  else {
    +    if (!url.empty() && url[0] == '/')
    +      return environment().urlScheme() + "://" + environment().hostName() + url;
    +    else
    +      return session_->absoluteBaseUrl() + url;
    +  }
    +}
    +
    +std::string WApplication::fixRelativeUrl(const std::string& url) const
    +{
    +  if (url.find("://") != std::string::npos)
    +    return url;
    +
    +  if (url.length() > 0 && url[0] == '#')
    +    return url;
    +
    +  if (ajaxMethod_ == XMLHttpRequest) {
    +    if (!environment().javaScript()
    +	&& !WebSession::Handler::instance()->request()->pathInfo().empty())
    +      // This will break reverse proxies:
    +      // We could do a '../path/' trick? we could do this to correct
    +      // for the current internal path: as many '../' as there are
    +      // internal path folders. but why bother ? we need to fix URLs
    +      // in external resources anyway for reverse proxies
    +      if (!url.empty() && url[0] == '/')
    +	return /*session_->baseUrl() + url.substr(1) */ url;
    +      else
    +	return session_->baseUrl() + url;
    +    else
    +      return url;
    +  } else
    +    return makeAbsoluteUrl(url);
    +}
    +
    +void WApplication::quit()
    +{
    +  quited_ = true;
    +}
    +
    +void WApplication::unload()
    +{
    +#ifndef WT_TARGET_JAVA
    +  if (session_->shouldDisconnect()) {
    +    if (connected_) {
    +      connected_ = false;
    +      log("notice") << "Session disconnected on unload()";
    +    }
    +
    +    return;
    +  }
    +#endif // WT_TARGET_JAVA
    +
    +  const Configuration& conf = session_->controller()->configuration();
    +  if (conf.reloadIsNewSession())
    +    quit();
    +}
    +
    +void WApplication::addExposedSignal(Wt::EventSignalBase *signal)
    +{
    +  std::string s = signal->encodeCmd();
    +#ifdef WT_TARGET_JAVA
    +  Utils::insert(exposedSignals_, s, WeakReference<Wt::EventSignalBase*>(signal));
    +#else
    +  Utils::insert(exposedSignals_, s, signal);
    +#endif
    +
    +#ifdef WTDEBUG
    +  std::cerr << "WApplication::addExposedSignal: " << s << std::endl;
    +#endif
    +}
    +
    +void WApplication::removeExposedSignal(Wt::EventSignalBase *signal)
    +{
    +  std::string s = signal->encodeCmd();
    +
    +  if (exposedSignals_.erase(s)) {
    +#ifdef WTDEBUG
    +    std::cerr << " WApplication::removeExposedSignal: " << s << std::endl;    
    +#endif
    +  } else {
    +    std::cerr << " WApplication::removeExposedSignal of non-exposed "
    +	      << s << "??" << std::endl;    
    +  }
    +}
    +
    +EventSignalBase *
    +WApplication::decodeExposedSignal(const std::string& signalName) const
    +{
    +  SignalMap::const_iterator i = exposedSignals_.find(signalName);
    +
    +  if (i != exposedSignals_.end()) {
    +#ifndef WT_TARGET_JAVA
    +    WWidget *w = dynamic_cast<WWidget *>(i->second->sender());
    +#else
    +    Wt::EventSignalBase* esb = i->second.get();
    +    if (!esb)
    +      return 0;
    +
    +    WWidget *w = dynamic_cast<WWidget *>(i->second.get()->sender());
    +#endif //WT_TARGET_JAVA
    +    if (!w || isExposed(w) || boost::ends_with(signalName, ".resized")) {
    +#ifndef WT_TARGET_JAVA
    +      return i->second;
    +#else
    +      return i->second.get();
    +#endif //WT_TARGET_JAVA
    +    }
    +    else
    +      return 0;
    +  } else
    +    return 0;
    +}
    +
    +EventSignalBase *
    +WApplication::decodeExposedSignal(const std::string& objectId,
    +				  const std::string& name)
    +{
    +  std::string signalName
    +    = (objectId == "app" ? id() : objectId) + '.' + name;
    +
    +  return decodeExposedSignal(signalName);
    +}
    +
    +std::string WApplication::resourceMapKey(WResource *resource)
    +{
    +  return resource->internalPath().empty()
    +    ? resource->id() : "/path/" + resource->internalPath();
    +}
    +
    +std::string WApplication::addExposedResource(WResource *resource,
    +					     const std::string& internalPath)
    +{
    +  exposedResources_[resourceMapKey(resource)] = resource;
    +
    +  std::string fn = resource->suggestedFileName();
    +  if (!fn.empty() && fn[0] != '/')
    +    fn = '/' + fn;
    +
    +  static unsigned long seq = 0;
    +
    +  if (resource->internalPath().empty())
    +    return session_->mostRelativeUrl(fn)
    +      + "&request=resource&resource=" + Utils::urlEncode(resource->id())
    +      + "&rand=" + boost::lexical_cast<std::string>(seq++);
    +  else {
    +    fn = resource->internalPath() + fn;
    +    if (!session_->applicationName().empty() && fn[0] != '/')
    +      fn = '/' + fn;
    +    return session_->mostRelativeUrl(fn);
    +  }
    +}
    +
    +void WApplication::removeExposedResource(WResource *resource)
    +{
    +  exposedResources_.erase(resourceMapKey(resource));
    +}
    +
    +WResource *WApplication::decodeExposedResource(const std::string& resourceKey) 
    +  const
    +{
    +  ResourceMap::const_iterator i = exposedResources_.find(resourceKey);
    +  
    +  if (i != exposedResources_.end())
    +    return i->second;
    +  else {
    +    std::size_t j = resourceKey.rfind('/');
    +    if (j != std::string::npos && j > 1)
    +      return decodeExposedResource(resourceKey.substr(0, j));
    +    else
    +      return 0;
    +  }
    +}
    +
    +std::string WApplication::encodeObject(WObject *object)
    +{
    +  std::string result = "w" + object->uniqueId();
    +
    +  encodedObjects_[result] = object;
    +
    +  return result;
    +}
    +
    +WObject *WApplication::decodeObject(const std::string& objectId) const
    +{
    +  ObjectMap::const_iterator i = encodedObjects_.find(objectId);
    +
    +  if (i != encodedObjects_.end()) {
    +    return i->second;
    +  } else
    +    return 0;
    +}
    +
    +void WApplication::setLocale(const WT_LOCALE& locale)
    +{
    +  locale_ = locale;
    +  refresh();
    +}
    +
    +void WApplication::setBodyClass(const std::string& styleClass)
    +{
    +  bodyClass_ = styleClass;
    +  bodyHtmlClassChanged_ = true;
    +}
    +
    +void WApplication::setHtmlClass(const std::string& styleClass)
    +{
    +  htmlClass_ = styleClass;
    +  bodyHtmlClassChanged_ = true;
    +}
    +
    +EventSignal<WKeyEvent>& WApplication::globalKeyWentDown()
    +{
    +  return domRoot_->keyWentDown();
    +}
    +
    +EventSignal<WKeyEvent>& WApplication::globalKeyWentUp()
    +{
    +  return domRoot_->keyWentUp();
    +}
    +
    +EventSignal<WKeyEvent>& WApplication::globalKeyPressed()
    +{
    +  return domRoot_->keyPressed();
    +}
    +
    +EventSignal<>& WApplication::globalEnterPressed()
    +{
    +  return domRoot_->enterPressed();
    +}
    +
    +EventSignal<>& WApplication::globalEscapePressed()
    +{
    +  return domRoot_->escapePressed();
    +}
    +
    +WLocalizedStrings *WApplication::localizedStrings()
    +{
    +  return localizedStrings_->items()[0];
    +}
    +
    +void WApplication::setLocalizedStrings(WLocalizedStrings *translator)
    +{
    +  delete localizedStrings_;
    +  localizedStrings_ = new WCombinedLocalizedStrings();
    +  if (translator)
    +    localizedStrings_->add(translator);
    +  WMessageResourceBundle *defaultMessages = new WMessageResourceBundle();
    +  defaultMessages->useBuiltin(skeletons::WtMessages_xml);
    +  localizedStrings_->add(defaultMessages);
    +}
    +
    +void WApplication::refresh()
    +{
    +  if (localizedStrings_)
    +    localizedStrings_->refresh();
    +
    +  if (domRoot2_) {
    +    domRoot2_->refresh();
    +  } else {
    +    widgetRoot_->refresh();
    +  }
    +
    +  if (title_.refresh())
    +    titleChanged_ = true;
    +
    +  if (closeMessage_.refresh())
    +    closeMessageChanged_ = true;
    +}
    +
    +void WApplication::enableAjax()
    +{
    +  enableAjax_ = true;
    +
    +  session_->renderer().beforeLoadJS_ << newBeforeLoadJavaScript_;
    +  newBeforeLoadJavaScript_.clear();
    +
    +  session_->renderer().beforeLoadJS_ << afterLoadJavaScript_;
    +  afterLoadJavaScript_.clear();
    +
    +  domRoot_->enableAjax();
    +
    +  if (domRoot2_)
    +    domRoot2_->enableAjax();
    +}
    +
    +void WApplication::redirect(const std::string& url)
    +{
    +  session_->redirect(url);
    +}
    +
    +void WApplication::redirectToSession(const std::string& newSessionId)
    +{
    +  const Configuration& conf = session_->controller()->configuration();
    +
    +  std::string redirectUrl = bookmarkUrl();
    +  if (conf.sessionTracking() == Configuration::CookiesURL
    +      && environment().supportsCookies()) {
    +    std::string cookieName = environment().deploymentPath();
    +    setCookie(cookieName, newSessionId, -1);
    +  } else
    +    redirectUrl += "?wtd=" + newSessionId;
    +
    +  redirect(redirectUrl);
    +}
    +
    +void WApplication::setTwoPhaseRenderingThreshold(int bytes)
    +{
    +  session_->renderer().setTwoPhaseThreshold(bytes);
    +}
    +
    +void WApplication::setCookie(const std::string& name, const std::string& value,
    +			     int maxAge, const std::string& domain,
    +			     const std::string& path)
    +{
    +  session_->renderer().setCookie(name, value, maxAge, domain, path);
    +}
    +
    +void WApplication::addMetaHeader(const std::string& name,
    +				 const WString& content,
    +				 const std::string& lang)
    +{
    +  addMetaHeader(MetaName, name, content, lang);
    +}
    +
    +void WApplication::addMetaHeader(MetaHeaderType type,
    +				 const std::string& name,
    +				 const WString& content,
    +				 const std::string& lang)
    +{
    +  if (environment().javaScript())
    +    log("warn") << "WApplication::addMetaHeader() with no effect";
    +
    +  if (type == MetaHttpHeader) {
    +    /*
    +     * Replace existing value
    +     */
    +    for (unsigned i = 0; i < metaHeaders_.size(); ++i) {
    +      MetaHeader& m = metaHeaders_[i];
    +
    +      if (m.type == MetaHttpHeader && m.name == name) {
    +	m.content = content;
    +	return;
    +      }
    +    }
    +  }
    +
    +  metaHeaders_.push_back(MetaHeader(type, name, content, lang));
    +}
    +
    +WApplication *WApplication::instance()
    +{
    +  WebSession *session = WebSession::instance();
    +
    +  return session ? session->app() : 0;
    +}
    +
    +::int64_t WApplication::maximumRequestSize() const
    +{
    +  return session_->controller()->configuration().maxRequestSize() * 1024;
    +}
    +
    +std::string WApplication::docType() const
    +{
    +  return session_->docType();
    +}
    +
    +bool WApplication::loadRsh()
    +{
    +  if (!rshLoaded_) {
    +    rshLoaded_ = true;
    +
    +    if (session_->applicationName().empty())
    +      log("warn") << "Deploy-path ends with '/', using /?_= for "
    +	"internal paths";
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +bool WApplication::internalPathMatches(const std::string& path) const
    +{
    +  if (session_->renderer().preLearning())
    +    return false;
    +  else
    +    return pathMatches(Utils::terminate(newInternalPath_, '/'), path);
    +}
    +
    +bool WApplication::pathMatches(const std::string& path,
    +			       const std::string& query)
    +{
    +  if (query.length() <= path.length()
    +      && path.substr(0, query.length()) == query)
    +    return true;
    +  else
    +    return false;
    +}
    +
    +std::string WApplication::internalPathNextPart(const std::string& path) const
    +{
    +  std::string current = Utils::terminate(newInternalPath_, '/');
    +
    +  if (!pathMatches(current, path)) {
    +    log("warn") << "WApplication::internalPath(): path '"
    +		<< path << "' not within current path '" << newInternalPath_
    +		<< "'";
    +    return std::string();
    +  }
    +
    +  int startPos = path.length();
    +  std::size_t t = current.find('/', startPos);
    +
    +  std::string result;
    +  if (t == std::string::npos)
    +    result = current.substr(startPos);
    +  else
    +    result = current.substr(startPos, t - startPos);
    +
    +  return result;
    +}
    +
    +std::string WApplication::internalPath() const
    +{
    +  return newInternalPath_;
    +}
    +
    +void WApplication::setInternalPath(const std::string& path, bool emitChange)
    +{
    +  loadRsh();
    +
    +  if (!internalPathIsChanged_)
    +    oldInternalPath_ = newInternalPath_;
    +
    +  if (!session_->renderer().preLearning() && emitChange)
    +    changeInternalPath(path);
    +  else
    +    newInternalPath_ = path;
    +
    +  internalPathIsChanged_ = true;
    +}
    +
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +bool WApplication::oldInternalPathAPI() const
    +{
    +  std::string v;
    +  return readConfigurationProperty("oldInternalPathAPI", v) && v == "true";
    +}
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +
    +void WApplication::changeInternalPath(const std::string& aPath)
    +{
    +  std::string path = aPath;
    +
    +  // internal paths start with a '/'; other anchor changes are not reacted on
    +  if (path.empty() || path[0] == '/') {
    +    if (path != newInternalPath_) {
    +      std::string v;
    +
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +    if (oldInternalPathAPI()) {
    +      std::size_t fileStart = 0;
    +      std::size_t i = 0;
    +      std::size_t length = std::min(path.length(), newInternalPath_.length());
    +      for (; i < length; ++i) {
    +	if (path[i] == newInternalPath_[i]) {
    +	  if (path[i] == '/')
    +	    fileStart = i+1;
    +	} else {
    +	  i = fileStart;
    +	  break;
    +	}
    +      }
    +
    +      std::string common = path.substr(0, fileStart);
    +
    +      for (;;) {
    +	common = Utils::terminate(common, '/');
    +	newInternalPath_ = path;
    +	std::string next = internalPathNextPart(common);
    +
    +	if (!next.empty())
    +	  newInternalPath_ = common + next;
    +	internalPathChanged().emit(common);
    +
    +	if (next.empty()) {
    +	  newInternalPath_ = path;
    +	  break;
    +	}
    +
    +	common = newInternalPath_;
    +      }
    +
    +      return;
    +    }
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +      newInternalPath_ = path;
    +
    +      internalPathChanged().emit(newInternalPath_);
    +    }
    +  }
    +}
    +
    +std::string WApplication::bookmarkUrl() const
    +{
    +  return bookmarkUrl(newInternalPath_);
    +}
    +
    +std::string WApplication::bookmarkUrl(const std::string& internalPath) const
    +{
    +  // ? return session_->bookmarkUrl("") + '#' + internalPath;
    +  // to avoid an extra round trip
    +  return session_->bookmarkUrl(internalPath);
    +}
    +
    +WLogEntry WApplication::log(const std::string& type) const
    +{
    +  return session_->log(type);
    +}
    +
    +void WApplication::enableUpdates(bool enabled)
    +{
    +  if (enabled)
    +    ++serverPush_;
    +  else
    +    --serverPush_;
    +
    +  if ((enabled && serverPush_ == 1) || (!enabled && serverPush_ == 0))
    +    doJavaScript(javaScriptClass_ + "._p_.setServerPush("
    +		 + (enabled ? "true" : "false") + ");");
    +}
    +
    +void WApplication::triggerUpdate()
    +{
    +#ifdef WT_TARGET_JAVA
    +  if (!WebController::isAsyncSupported())
    +    throw WtException("Server push requires a Servlet 3.0 API.");
    +#endif
    +
    +  if (!modifiedWithoutEvent_)
    +    return;
    +
    +  if (serverPush_ > 0)
    +    session_->pushUpdates();
    +  else
    +    throw WtException("WApplication::triggerUpdate() called but "
    +		      "server-triggered updates not enabled using "
    +		      "WApplication::enableUpdates()"); 
    +}
    +
    +WApplication::UpdateLock WApplication::getUpdateLock()
    +{
    +  return UpdateLock(this);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +#ifdef WT_THREADED
    +int WApplication::startWaitingAtLock()
    +{
    +  WebSession::SyncLocks& syncLocks = session_->syncLocks_;
    +
    +  boost::mutex::scoped_lock guard(syncLocks.state_);
    +
    +  return ++syncLocks.lastId_;
    +}
    +
    +void WApplication::endWaitingAtLock(int id)
    +{
    +  WebSession::SyncLocks& syncLocks = session_->syncLocks_;
    +
    +  boost::mutex::scoped_lock guard(syncLocks.state_);
    +
    +  /*
    +   * This is all untested, we never have had a case where we were actually
    +   * waiting at a lock that got through before we were allowed
    +   */
    +
    +  // If we are not the last sync lock, we definitely need to block
    +  while (id < syncLocks.lastId_)
    +    syncLocks.unlock_.wait(guard);
    +
    +  // We need to block if an update lock relies on us
    +  while (id == syncLocks.lockedId_) {
    +    syncLocks.unlock_.wait(guard);
    +  }
    +
    +  --syncLocks.lastId_;
    +
    +  syncLocks.unlock_.notify_all();
    +}
    +#endif // WT_THREADED
    +
    +class UpdateLockImpl
    +{
    +public:
    +  UpdateLockImpl(WApplication *app)
    +    : handler_(0)
    +  {
    +#ifndef WT_THREADED
    +    throw WtException("UpdateLock needs Wt with thread support");
    +#else
    +    WApplication *selfApp = 0;
    +
    +    prevHandler_ = WebSession::Handler::instance();
    +    if (prevHandler_)
    +      selfApp = prevHandler_->session()->app();
    +
    +    handler_ = new WebSession::Handler(app->weakSession_.lock(), false);
    +
    +    for (;;) {
    +      if (handler_->lock().try_lock()) {
    +	app->modifiedWithoutEvent_ = true;
    +	return;
    +      }
    +
    +      WebSession::SyncLocks& syncLocks = app->session_->syncLocks_;
    +      boost::mutex::scoped_lock guard(syncLocks.state_);
    +
    +      // See if the current application thread is being held in a sync lock
    +      if (syncLocks.lastId_ > syncLocks.lockedId_) {
    +	// std::cerr << "Using a sync lock." << std::endl;
    +	delete handler_;
    +	handler_ = 0;
    +
    +	assert(syncLocks.lastId_ == syncLocks.lockedId_ + 1);
    +	syncLockId_ = syncLocks.lockedId_ = syncLocks.lastId_;
    +
    +	WebSession::Handler::attachThreadToSession(app->weakSession_.lock());
    +	return;
    +      }
    +
    +      if (selfApp) {
    +	int id = selfApp->startWaitingAtLock();
    +	boost::this_thread::sleep(boost::posix_time::milliseconds(1));
    +	selfApp->endWaitingAtLock(id);
    +      }
    +    }
    +#endif // WT_THREADED
    +  }
    +
    +#ifdef WT_THREADED
    +  ~UpdateLockImpl() {
    +    if (handler_) {
    +      handler_->session()->app()->modifiedWithoutEvent_ = false;
    +      delete handler_;
    +    } else {
    +      assert(syncLockId_);
    +
    +      WebSession::SyncLocks& syncLocks
    +	= WApplication::instance()->session_->syncLocks_;
    +
    +      assert(syncLockId_ == syncLocks.lockedId_);
    +      --syncLocks.lockedId_;
    +
    +      syncLocks.unlock_.notify_all();
    +
    +      WebSession::Handler::attachThreadToHandler(prevHandler_);
    +    }
    +  }
    +#endif // WT_THREADED
    +
    +private:
    +  // Handler which we created for actual lock
    +  WebSession::Handler *handler_;
    +
    +  // Sync lock state
    +  int syncLockId_;
    +  WebSession::Handler *prevHandler_; 
    +};
    +
    +WApplication::UpdateLock::UpdateLock(WApplication *app)
    +  : impl_(0),
    +    ok_(true)
    +{
    +  /*
    +   * If we are already handling this application, then we already have
    +   * exclusive access, unless we are not having the lock (e.g. from a
    +   * WResource::handleRequest()).
    +   */
    +  WebSession::Handler *handler = WebSession::Handler::instance();
    +
    +  boost::shared_ptr<WebSession> appSession = app->weakSession_.lock();
    +  if (handler && handler->haveLock() && handler->session() == appSession.get())
    +    return;
    +
    +  if (appSession.get())
    +    impl_ = new UpdateLockImpl(app);
    +  else
    +    ok_ = false;
    +}
    +
    +WApplication::UpdateLock::UpdateLock(const UpdateLock& other)
    +{
    +  impl_ = other.impl_;
    +
    +  other.impl_ = 0;
    +}
    +
    +WApplication::UpdateLock::~UpdateLock()
    +{
    +  delete impl_;
    +}
    +
    +#else
    +
    +WApplication::UpdateLock::UpdateLock(WApplication *app)
    +{
    +  std::cerr << "Grabbing update lock" << std::endl;
    +
    +  WebSession::Handler *handler = WebSession::Handler::instance();
    +
    +  if (handler && handler->haveLock() && handler->session() == app->session_)
    +    return;
    +
    +  std::cerr << "Creating new handler for app: app.sessionId()" << std::endl;
    +  new WebSession::Handler(app->session_, true);
    +
    +  app->modifiedWithoutEvent_ = true;
    +}
    +
    +void WApplication::UpdateLock::release()
    +{
    +  std::cerr << "Releasing update lock" << std::endl;
    +  if (WApplication::instance()->modifiedWithoutEvent_) {
    +    std::cerr << "Releasing handler" << std::endl;
    +    WApplication::instance()->modifiedWithoutEvent_ = false;
    +    WebSession::Handler::instance()->release();
    +  }
    +}
    +
    +#endif // WT_TARGET_JAVA
    +
    +void WApplication::doJavaScript(const std::string& javascript,
    +				bool afterLoaded)
    +{
    +  if (afterLoaded) {
    +    afterLoadJavaScript_ += javascript;
    +    afterLoadJavaScript_ += '\n';
    +  } else {
    +    beforeLoadJavaScript_ += javascript;
    +    beforeLoadJavaScript_ += '\n';
    +    newBeforeLoadJavaScript_ += javascript;
    +    newBeforeLoadJavaScript_ += '\n';
    +  }
    +}
    +
    +void WApplication::addAutoJavaScript(const std::string& javascript)
    +{
    +  autoJavaScript_ += javascript;
    +  autoJavaScriptChanged_ = true;
    +}
    +
    +void WApplication::declareJavaScriptFunction(const std::string& name,
    +					     const std::string& function)
    +{
    +  doJavaScript(javaScriptClass_ + '.' + name + '=' + function + ';', false);
    +}
    +
    +std::string WApplication::afterLoadJavaScript()
    +{
    +  std::string result = afterLoadJavaScript_;
    +  afterLoadJavaScript_.clear();
    +  return result;
    +}
    +
    +std::string WApplication::newBeforeLoadJavaScript()
    +{
    +  std::string result = newBeforeLoadJavaScript_;
    +  newBeforeLoadJavaScript_.clear();
    +  return result;
    +}
    +
    +std::string WApplication::beforeLoadJavaScript()
    +{
    +  newBeforeLoadJavaScript_.clear();
    +  return beforeLoadJavaScript_;
    +}
    +
    +void WApplication::notify(const WEvent& e)
    +{
    +  session_->notify(e);
    +}
    +
    +void WApplication::processEvents()
    +{
    +  /* set timeout to allow other events to be interleaved */
    +  doJavaScript("setTimeout(\"" + javaScriptClass_
    +	       + "._p_.update(null,'none',null,false);\",0);");
    +
    +  session_->doRecursiveEventLoop();
    +}
    +
    +bool WApplication::require(const std::string& uri, const std::string& symbol)
    +{
    +  ScriptLibrary sl(uri, symbol);
    +
    +  if (Utils::indexOf(scriptLibraries_, sl) == -1) {
    +    sl.beforeLoadJS = newBeforeLoadJavaScript_;
    +    newBeforeLoadJavaScript_.clear();
    +
    +    scriptLibraries_.push_back(sl);
    +    ++scriptLibrariesAdded_;
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WApplication::readConfigurationProperty(const std::string& name,
    +					     std::string& value)
    +{
    +  return WebSession::instance()->controller()
    +    ->configuration().readConfigurationProperty(name, value);
    +}
    +#else
    +std::string *WApplication::readConfigurationProperty(const std::string& name,
    +						     const std::string& value)
    +{
    +  std::string* property
    +    = WebSession::instance()->controller()->configuration().property(name);
    +
    +  if (property)
    +    return property;
    +  else
    +    return &value;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +bool WApplication::debug() const
    +{
    +  return session_->debug();
    +}
    +
    +SoundManager *WApplication::getSoundManager()
    +{
    +  if (!soundManager_)
    +    soundManager_ = new SoundManager(this);
    +
    +  return soundManager_;
    +}
    +
    +#ifdef WT_DEBUG_JS
    +#define xstr(s) str(s)
    +#define str(s) #s
    +void WApplication::loadJavaScript(const char *jsFile)
    +{
    +  if (!javaScriptLoaded(jsFile)) {
    +    std::string fname = std::string( xstr(WT_DEBUG_JS) "/") + jsFile;
    +    std::ifstream js(fname.c_str(), std::ios::in | std::ios::binary);
    +
    +    if (!js)
    +      throw WtException("Could not load " + fname);
    +
    +    js.seekg(0, std::ios::end);
    +    int length = js.tellg();
    +    js.seekg(0, std::ios::beg);
    +
    +    boost::scoped_array<char> jstext(new char[length + 1]);
    +    js.read(jstext.get(), length);
    +    jstext[length] = 0;
    +
    +    doJavaScript(jstext.get(), false);
    +
    +    setJavaScriptLoaded(jsFile);
    +  }
    +}
    +#endif
    +
    +bool WApplication::javaScriptLoaded(const char *jsFile)
    +{
    +  return javaScriptLoaded_.find(jsFile) != javaScriptLoaded_.end();
    +}
    +
    +void WApplication::setJavaScriptLoaded(const char *jsFile)
    +{
    +  javaScriptLoaded_.insert(jsFile);
    +}
    +
    +void WApplication::setFocus(const std::string& id,
    +			    int selectionStart, int selectionEnd)
    +{
    +  focusId_ = id;
    +  selectionStart_ = selectionStart;
    +  selectionEnd_ = selectionEnd;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WServer::Exception::Exception(const std::string what)
    +  : what_(what)
    +{ }
    +
    +WServer::Exception::~Exception() throw()
    +{ }
    +#endif // WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBatchEditProxyModel b/wt-3.1.7a/src/Wt/WBatchEditProxyModel
    new file mode 100644
    index 0000000..476780b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBatchEditProxyModel
    @@ -0,0 +1,252 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBATCH_EDIT_PROXY_MODEL_H_
    +#define WBATCH_EDIT_PROXY_MODEL_H_
    +
    +#include <Wt/WAbstractProxyModel>
    +
    +namespace Wt {
    +
    +/*! \class WBatchEditProxyModel Wt/WBatchEditProxyModel Wt/WBatchEditProxyModel
    + *  \brief A proxy model for %Wt's item models that provides batch editing.
    + *
    + * This proxy model presents data from a source model, and caches any
    + * editing operation without affecting the underlying source model,
    + * until commitAll() or revertAll() is called. In this way, you can
    + * commit all the editing in batch to the underlying source model,
    + * only when the user confirms the changes.
    + *
    + * All editing operations are supported:
    + *  - changing data (setData())
    + *  - inserting and removing rows (insertRows() and removeRows())
    + *  - inserting and removing columns (insertColumns() and removeColumns())
    + *
    + * The model supports both simple tabular models, as well as
    + * hierarchical (tree-like / treetable-like) models, with children
    + * under items in the first column.
    + *
    + * Default values for a newly inserted row can be set using
    + * setNewRowData() and flags for its items using setNewRowFlags().
    + *
    + * \ingroup modelview
    + */
    +class WT_API WBatchEditProxyModel : public WAbstractProxyModel
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WBatchEditProxyModel(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WBatchEditProxyModel();
    +
    +  /*! \brief Returns whether changes have not yet been committed.
    +   *
    +   * Returns whether have been made to the proxy model, which could be
    +   * committed using commitAll() or reverted using revertAll().
    +   */
    +  bool isDirty() const;
    +
    +  /*! \brief Commits changes.
    +   *
    +   * This commits all changes to the source model.
    +   *
    +   * \sa revertAll()
    +   */
    +  void commitAll();
    +
    +  /*! \brief Reverts changes.
    +   *
    +   * This reverts all changes.
    +   *
    +   * \sa commitAll()
    +   */
    +  void revertAll();
    +
    +  /*! \brief Sets default data for a newly inserted row.
    +   *
    +   * You can use this method to initialize data for a newly inserted
    +   * row.
    +   */
    +  void setNewRowData(int column, const boost::any& data,
    +		     int role = DisplayRole);
    +
    +  /*! \brief Sets the item flags for items in a newly inserted row.
    +   *
    +   * By default, flags() will return ItemIsSelectable.
    +   */
    +  void setNewRowFlags(int column, WFlags<ItemFlag> flags);
    +
    +  /*! \brief Configures data used to indicate a modified item.
    +   *
    +   * This sets \p data for item data role \p role to be returned by
    +   * data() for an item that is dirty (e.g. because it belongs to a
    +   * newly inserted row/column, or because new data has been set for
    +   * it.
    +   *
    +   * When \p role is Wt::StyleClassRole, the style class is appended
    +   * to any style already returned by the source model or set by
    +   * setNewRowData().
    +   *
    +   * By default there is no dirty indication.
    +   */
    +  void setDirtyIndication(int role, const boost::any& data);
    +
    +  virtual WModelIndex mapFromSource(const WModelIndex& sourceIndex) const;
    +  virtual WModelIndex mapToSource(const WModelIndex& proxyIndex) const;
    +
    +  virtual void setSourceModel(WAbstractItemModel *sourceModel);
    +
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +
    +  using WAbstractItemModel::setData;
    +  using WAbstractItemModel::data;
    +  using WAbstractItemModel::setHeaderData;
    +
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const;
    +
    +  /*! \brief Sets item data.
    +   *
    +   * The default implementation will copy Wt::EditRole data to
    +   * Wt::DisplayRole. You may want to specialize the model to provide
    +   * a more specialized editing behaviour.
    +   */
    +  virtual bool setData(const WModelIndex& index, const boost::any& value,
    +		       int role = EditRole);
    +
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  virtual bool insertColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +
    +  virtual bool removeColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +private:
    +  struct Cell {
    +    int row;
    +    int column;
    +
    +    bool operator< (const Cell& other) const;
    +
    +    Cell(int r, int c) : row(r), column(c) { }
    +  };
    +
    +  typedef std::map<Cell, DataMap> ValueMap;
    +
    +  /*
    +   * For every proxy parent, we keep the following info:
    +   */
    +  struct Item : public BaseItem {
    +    Item *insertedParent_;    // !=0 when parent was inserted
    +
    +    ValueMap editedValues_;
    +    std::vector<int> removedRows_;      // sorted, proxy rows
    +    std::vector<int> insertedRows_;     // sorted, proxy rows
    +    std::vector<Item *> insertedItems_; // indexed by index in insertedRows_
    +
    +    std::vector<int> removedColumns_;   // sorted, proxy columns
    +    std::vector<int> insertedColumns_;  // sorted, proxy columns
    +
    +    Item(const WModelIndex& sourceIndex);
    +    Item(Item *insertedParent);
    +    virtual ~Item();
    +  };
    +
    +  bool submitting_;
    +  std::map<int, DataMap> newRowData_;
    +  std::map<int, WFlags<ItemFlag> > newRowFlags_;
    +  int dirtyIndicationRole_;
    +  boost::any dirtyIndicationData_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +  mutable ItemMap mappedIndexes_;
    +
    +  void sourceColumnsAboutToBeInserted(const WModelIndex& parent,
    +				      int start, int end);
    +  void sourceColumnsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceColumnsAboutToBeRemoved(const WModelIndex& parent,
    +				     int start, int end);
    +  void sourceColumnsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeInserted(const WModelIndex& parent,
    +				   int start, int end);
    +  void sourceRowsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeRemoved(const WModelIndex& parent,
    +				  int start, int end);
    +  void sourceRowsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceDataChanged(const WModelIndex& topLeft,
    +			 const WModelIndex& bottomRight);
    +
    +  void sourceHeaderDataChanged(Orientation orientation, int start, int end);
    +
    +  void sourceLayoutAboutToBeChanged();
    +  void sourceLayoutChanged();
    +
    +  Item *itemFromSourceIndex(const WModelIndex& sourceIndex,
    +			    bool autoCreate = true) const;
    +  Item *itemFromInsertedRow(Item *parentItem, const WModelIndex& index,
    +			    bool autoCreate = true) const;
    +  Item *parentItemFromIndex(const WModelIndex& index) const;
    +  Item *itemFromIndex(const WModelIndex& index, bool autoCreate = true) const;
    +  bool isRemoved(const WModelIndex& sourceIndex) const;
    +  int adjustedProxyRow(Item *item, int sourceRow) const;
    +  int adjustedSourceRow(Item *item, int proxyRow) const;
    +  int adjustedProxyColumn(Item *item, int sourceColumn) const;
    +  int adjustedSourceColumn(Item *item, int proxyColumn) const;
    +  int adjustedProxyIndex(int sourceIndex,
    +			 const std::vector<int>& ins,
    +			 const std::vector<int>& rem) const;
    +  int adjustedSourceIndex(int proxyIndex,
    +			  const std::vector<int>& ins,
    +			  const std::vector<int>& rem) const;
    +
    +  void insertIndexes(Item *item,
    +		     std::vector<int>& ins, std::vector<Item *> *rowItems,
    +		     int index, int count);
    +  void removeIndexes(Item *item,
    +		     std::vector<int>& ins, std::vector<int>& rem,
    +		     std::vector<Item *>* rowItems,
    +		     int index, int count);
    +
    +  void deleteItemsUnder(Item *item, int row);
    +  void shift(std::vector<int>& v, int row, int count);
    +  void shiftRows(ValueMap& v, int row, int count);
    +  void shiftRows(Item *item, int row, int count);
    +  void shiftColumns(ValueMap& v, int column, int count);
    +  void shiftColumns(Item *item, int column, int count);
    +
    +  void resetMappings();
    +
    +  boost::any indicateDirty(int role, const boost::any& value) const;
    +};
    +
    +}
    +
    +#endif // WBATCH_EDIT_PROXY_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WBatchEditProxyModel.C b/wt-3.1.7a/src/Wt/WBatchEditProxyModel.C
    new file mode 100644
    index 0000000..b9ea9a4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBatchEditProxyModel.C
    @@ -0,0 +1,1099 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +#include <iostream>
    +
    +#include "Wt/WBatchEditProxyModel"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace {
    +  bool isAncestor(const Wt::WModelIndex& i1, const Wt::WModelIndex& i2) {
    +    if (!i1.isValid())
    +      return false;
    +
    +    for (Wt::WModelIndex p = i1; p.isValid(); p = p.parent()) {
    +      if (p == i2)
    +	return true;
    +    }
    +
    +    return !i2.isValid();
    +  }
    +}
    +
    +namespace Wt {
    +
    +bool WBatchEditProxyModel::Cell::operator< (const Cell& other) const
    +{
    +  if (row < other.row)
    +    return true;
    +  else if (row > other.row)
    +    return false;
    +  else
    +    return column < other.column;
    +}
    +
    +WBatchEditProxyModel::Item::Item(const WModelIndex& sourceIndex)
    +  : BaseItem(sourceIndex),
    +    insertedParent_(0)
    +{ }
    +
    +WBatchEditProxyModel::Item::Item(Item *insertedParent)
    +  : BaseItem(WModelIndex()),
    +    insertedParent_(insertedParent)
    +{ }
    +
    +WBatchEditProxyModel::Item::~Item()
    +{ 
    +  for (unsigned i = 0; i < insertedItems_.size(); ++i)
    +    delete insertedItems_[i];
    +}
    +
    +WBatchEditProxyModel::WBatchEditProxyModel(WObject *parent)
    +  : WAbstractProxyModel(parent),
    +    submitting_(false),
    +    dirtyIndicationRole_(-1)
    +{ }
    +
    +WBatchEditProxyModel::~WBatchEditProxyModel()
    +{
    +  resetMappings();
    +}
    +
    +void WBatchEditProxyModel::setSourceModel(WAbstractItemModel *model)
    +{
    +  if (sourceModel()) {
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  WAbstractProxyModel::setSourceModel(model);
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeInserted().connect
    +     (this, &WBatchEditProxyModel::sourceColumnsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->columnsInserted().connect
    +     (this, &WBatchEditProxyModel::sourceColumnsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeRemoved().connect
    +     (this, &WBatchEditProxyModel::sourceColumnsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->columnsRemoved().connect
    +     (this, &WBatchEditProxyModel::sourceColumnsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeInserted().connect
    +     (this, &WBatchEditProxyModel::sourceRowsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->rowsInserted().connect
    +     (this, &WBatchEditProxyModel::sourceRowsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeRemoved().connect
    +     (this, &WBatchEditProxyModel::sourceRowsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->rowsRemoved().connect
    +     (this, &WBatchEditProxyModel::sourceRowsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->dataChanged().connect
    +     (this, &WBatchEditProxyModel::sourceDataChanged));
    +  modelConnections_.push_back(sourceModel()->headerDataChanged().connect
    +     (this, &WBatchEditProxyModel::sourceHeaderDataChanged));
    +
    +  modelConnections_.push_back(sourceModel()->layoutAboutToBeChanged().connect
    +     (this, &WBatchEditProxyModel::sourceLayoutAboutToBeChanged));
    +  modelConnections_.push_back(sourceModel()->layoutChanged().connect
    +     (this, &WBatchEditProxyModel::sourceLayoutChanged));
    +
    +  resetMappings();
    +}
    +
    +void WBatchEditProxyModel::setNewRowData(int column, const boost::any& data,
    +					 int role)
    +{
    +  newRowData_[column][role] = data;
    +}
    +
    +void WBatchEditProxyModel::setNewRowFlags(int column, WFlags<ItemFlag> flags)
    +{
    +  newRowFlags_[column] = flags;
    +}
    +
    +void WBatchEditProxyModel::resetMappings()
    +{
    +  for (ItemMap::iterator i = mappedIndexes_.begin(); i != mappedIndexes_.end();
    +       ++i)
    +    delete i->second;
    +
    +  mappedIndexes_.clear();
    +}
    +
    +WModelIndex WBatchEditProxyModel::mapFromSource(const WModelIndex& sourceIndex)
    +  const
    +{
    +  if (sourceIndex.isValid()) {
    +    if (isRemoved(sourceIndex.parent()))
    +      return WModelIndex();
    +
    +    WModelIndex sourceParent = sourceIndex.parent();
    +
    +    Item *parentItem = itemFromSourceIndex(sourceParent);
    +    int row = adjustedProxyRow(parentItem, sourceIndex.row());
    +    int column = adjustedProxyColumn(parentItem, sourceIndex.column());
    +
    +    if (row >= 0 && column >= 0)
    +      return createIndex(row, column, static_cast<void *>(parentItem));
    +    else
    +      return WModelIndex();      
    +  } else
    +    return WModelIndex();
    +}
    +
    +bool WBatchEditProxyModel::isRemoved(const WModelIndex& sourceIndex) const
    +{
    +  if (!sourceIndex.isValid())
    +    return false;
    +
    +  WModelIndex sourceParent = sourceIndex.parent();
    +
    +  if (isRemoved(sourceParent))
    +    return true;
    +  else {
    +    Item *parentItem = itemFromSourceIndex(sourceParent);
    +
    +    int row = adjustedProxyRow(parentItem, sourceIndex.row());
    +    if (row < 0)
    +      return true;
    +
    +    int column = adjustedProxyColumn(parentItem, sourceIndex.column());
    +    return column < 0;
    +  }
    +}
    +
    +WModelIndex WBatchEditProxyModel::mapToSource(const WModelIndex& proxyIndex)
    +  const
    +{
    +  if (proxyIndex.isValid()) {
    +    Item *parentItem = parentItemFromIndex(proxyIndex);
    +    int row = adjustedSourceRow(parentItem, proxyIndex.row());
    +    int column = adjustedSourceColumn(parentItem, proxyIndex.column());
    +
    +    if (row >=0 && column >= 0)
    +      return sourceModel()->index(row, column, parentItem->sourceIndex_);
    +    else
    +      return WModelIndex();
    +  } else
    +    return WModelIndex();
    +}
    +
    +int WBatchEditProxyModel::adjustedProxyRow(Item *item, int sourceRow) const
    +{
    +  return adjustedProxyIndex(sourceRow,
    +			    item->insertedRows_, item->removedRows_);
    +}
    +
    +int WBatchEditProxyModel::adjustedProxyColumn(Item *item, int sourceColumn)
    +  const
    +{
    +  return adjustedProxyIndex(sourceColumn, item->insertedColumns_,
    +			    item->removedColumns_);
    +}
    +
    +int WBatchEditProxyModel::adjustedProxyIndex(int sourceIndex,
    +					     const std::vector<int>& ins,
    +					     const std::vector<int>& rem) const
    +{
    +  /*
    +   * Cheap and obvious short-cut
    +   */
    +  if (ins.empty() && rem.empty())
    +    return sourceIndex;
    +
    +  int insi = 0;
    +  int remi = 0;
    +
    +  int proxyIndex = -1;
    +
    +  /*
    +   * This could be optimized by considering the next element in ins and
    +   * and rem vectors and skipping directly to there
    +   */
    +  for (int si = 0; si <= sourceIndex; ++si) {
    +    ++proxyIndex;
    +
    +    /*
    +     * First deal with removed rows/coluns
    +     */
    +    while (remi < static_cast<int>(rem.size()) && rem[remi] == proxyIndex) {
    +      // if was removed, doesn't matter if it was later re-inserted
    +      // return -1 - remi index
    +      if (si == sourceIndex)
    +	return -1 - remi;
    +
    +      ++remi;
    +      ++si;
    +    }
    +
    +    /*
    +     * When we are submitting inserted rows, we return the proxy row which
    +     * maps to the inserted row.
    +     */
    +    if (submitting_ && si == sourceIndex)
    +      return proxyIndex;
    +
    +    while (insi < static_cast<int>(ins.size()) && ins[insi] == proxyIndex) {
    +      ++insi;
    +      ++proxyIndex;
    +    }
    +  }
    +
    +  return proxyIndex;
    +}
    +
    +int WBatchEditProxyModel::adjustedSourceRow(Item *item, int proxyRow) const
    +{
    +  return adjustedSourceIndex(proxyRow, item->insertedRows_, item->removedRows_);
    +}
    +
    +int WBatchEditProxyModel::adjustedSourceColumn(Item *item, int proxyColumn)
    +  const
    +{
    +  return adjustedSourceIndex(proxyColumn, item->insertedColumns_,
    +			     item->removedColumns_);
    +}
    +
    +int WBatchEditProxyModel::adjustedSourceIndex(int proxyIndex,
    +					      const std::vector<int>& ins,
    +					      const std::vector<int>& rem) const
    +{
    +  /*
    +   * Note a row/column can at the same time be removed and inserted !
    +   *
    +   * Therefore we process removals before (re-)insertions
    +   */
    +
    +  // Suppose inserted:
    +  //  ins = [4, 5, 6, 8]
    +  //  then: adjustedSourceIndex(3) = 3
    +  //        adjustedSourceIndex(4) = -1
    +  //        adjustedSourceIndex(5) = -1
    +  //        adjustedSourceIndex(6) = -1
    +  //        adjustedSourceIndex(7) = 4
    +  //        adjustedSourceIndex(8) = -1
    +  //        adjustedSourceIndex(9) = 5
    +
    +  unsigned inserted = Utils::lower_bound(ins, proxyIndex);
    +
    +  if (inserted < ins.size() && ins[inserted] == proxyIndex)
    +    return -1;
    +
    +  // suppose five indexs were removed:
    +  //   first 3 at index 2, [i.e. source model 2, 3, and 4]
    +  //    -> rem = [2, 2, 2]
    +  //   then 2 at index 3  [i.e. source model 6 and 7]
    +  //    -> rem = [2, 2, 2, 3, 3]
    +  //  then: adjustedSourceIndex(1) -> 1 + 0 = 1
    +  //        adjustedSourceIndex(2) -> 2 + 3 = 5
    +  //        adjustedSourceIndex(3) -> 3 + 5 = 8
    +  //
    +  // what if: first 2 at row 3 [i.e. source model 3 and 4]
    +  //           -> rem = [3, 3]
    +  //          then 2 at row 2 [i.e. source model 2 and 5]
    +  //           -> rem = [2, 2, 2, 2]
    +  //
    +  unsigned removed = Utils::upper_bound(rem, proxyIndex);
    +
    +  // Together:
    +  //  then: adjustedSourceIndex(0) -> 0 ? = 0
    +  //        adjustedSourceIndex(1) -> 1 ? = 1
    +  //        adjustedSourceIndex(2) -> 2 ? = 5
    +  //        adjustedSourceIndex(3) -> 3 ? = 8
    +  //        adjustedSourceIndex(4) -> 4 ? = -1
    +  //        adjustedSourceIndex(5) -> 5 ? = -1
    +  //        adjustedSourceIndex(6) -> 6 ? = -1
    +  //        adjustedSourceIndex(7) -> 7 ? = 9 = 7 + 5 - 3
    +
    +  return proxyIndex + removed - inserted;
    +}
    +
    +WModelIndex WBatchEditProxyModel::index(int row, int column,
    +					const WModelIndex& parent) const
    +{
    +  Item *item = itemFromIndex(parent);
    +  return createIndex(row, column, static_cast<void *>(item));
    +}
    +
    +WModelIndex WBatchEditProxyModel::parent(const WModelIndex& index) const
    +{
    +  if (index.isValid()) {
    +    Item *parentItem = parentItemFromIndex(index);
    +
    +    return mapFromSource(parentItem->sourceIndex_);
    +  } else
    +    return WModelIndex();
    +}
    +
    +WBatchEditProxyModel::Item *
    +WBatchEditProxyModel::parentItemFromIndex(const WModelIndex& index) const
    +{
    +  return static_cast<Item *>(index.internalPointer());
    +}
    +
    +WBatchEditProxyModel::Item *
    +WBatchEditProxyModel::itemFromIndex(const WModelIndex& index,
    +				    bool autoCreate) const
    +{
    +  if (index.isValid()) {
    +    Item *parentItem = parentItemFromIndex(index);
    +
    +    int row = adjustedSourceRow(parentItem, index.row());
    +    int column = adjustedSourceColumn(parentItem, index.column());
    +
    +    if (row >= 0 && column >= 0) {
    +	WModelIndex sourceIndex
    +	= sourceModel()->index(row, column, parentItem->sourceIndex_);
    +      return itemFromSourceIndex(sourceIndex, autoCreate);
    +    } else {
    +      if (index.column() == 0)
    +	return itemFromInsertedRow(parentItem, index, autoCreate);
    +      else
    +	if (autoCreate)
    +	  throw WtException("WBatchEditProxyModel does not support children in "
    +			    "column > 0");
    +	else
    +	  return 0;
    +    }
    +  } else
    +    return itemFromSourceIndex(WModelIndex(), autoCreate);
    +}
    +
    +WBatchEditProxyModel::Item *
    +WBatchEditProxyModel::itemFromSourceIndex(const WModelIndex& sourceParent,
    +					  bool autoCreate)
    +  const
    +{
    +  if (isRemoved(sourceParent))
    +    return 0;
    +
    +  ItemMap::const_iterator i = mappedIndexes_.find(sourceParent);
    +  if (i == mappedIndexes_.end()) {
    +    if (autoCreate) {
    +      Item *result = new Item(sourceParent);
    +      mappedIndexes_[sourceParent] = result;
    +      return result;
    +    } else
    +      return 0;
    +  } else
    +    return dynamic_cast<Item *>(i->second);
    +}
    +
    +WBatchEditProxyModel::Item *
    +WBatchEditProxyModel::itemFromInsertedRow(Item *parentItem,
    +					  const WModelIndex& index,
    +					  bool autoCreate) const
    +{
    +  int i = Utils::indexOf(parentItem->insertedRows_, index.row());
    +
    +  if (!parentItem->insertedItems_[i] && autoCreate) {
    +    Item *item = new Item(parentItem);
    +    parentItem->insertedItems_[i] = item;
    +  }
    +
    +  return parentItem->insertedItems_[i];
    +}
    +
    +int WBatchEditProxyModel::columnCount(const WModelIndex& parent) const
    +{
    +  Item *item = itemFromIndex(parent, false);
    +
    +  if (item) {
    +    if (item->insertedParent_)
    +      return item->insertedColumns_.size();
    +    else
    +      return sourceModel()->columnCount(item->sourceIndex_)
    +	+ item->insertedColumns_.size() - item->removedColumns_.size();
    +  } else
    +    return sourceModel()->columnCount(mapToSource(parent));
    +}
    +
    +int WBatchEditProxyModel::rowCount(const WModelIndex& parent) const
    +{
    +  Item *item = itemFromIndex(parent, false);
    +
    +  if (item) {
    +    if (item->insertedParent_)
    +      return item->insertedRows_.size();
    +    else
    +      return sourceModel()->rowCount(item->sourceIndex_)
    +	+ item->insertedRows_.size() - item->removedRows_.size();
    +  } else
    +    return sourceModel()->rowCount(mapToSource(parent));
    +}
    +
    +void WBatchEditProxyModel::sourceColumnsAboutToBeInserted
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  if (isRemoved(parent))
    +    return;
    +
    +  beginInsertColumns(mapFromSource(parent), start, end);
    +}
    +
    +void WBatchEditProxyModel::sourceColumnsInserted(const WModelIndex& parent,
    +						 int start, int end)
    +{
    +  if (isRemoved(parent))
    +    return;
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  int count = end - start + 1;
    +
    +  for (int i = 0; i < count; ++i) {
    +    int proxyColumn = adjustedProxyColumn(item, start + i);
    +
    +    if (proxyColumn >= 0) {
    +      if (!submitting_) {
    +	beginInsertColumns(pparent, proxyColumn, proxyColumn);
    +	shiftColumns(item, proxyColumn, 1);
    +	endInsertColumns();
    +      } else {
    +	// The insert is being submitted. We do not need to shift
    +	// anything: the proxy indexes do not change
    +	int index = Utils::indexOf(item->insertedColumns_, proxyColumn);
    +	assert(index != -1);
    +	item->insertedColumns_.erase(item->insertedColumns_.begin() + index);
    +      }
    +    } else {
    +      // Since removed columns are processed first during submission,
    +      // it cannot be that the column is actually removed.
    +      assert(!submitting_);
    +
    +      // The source model is inserting where we actually deleted. We
    +      // simply insert before the 'deleted' column.
    +      int remi = -proxyColumn - 1;
    +      proxyColumn = item->removedColumns_[remi];
    +
    +      beginInsertColumns(pparent, proxyColumn, proxyColumn);
    +      shiftColumns(item, proxyColumn, 1);
    +      endInsertColumns();
    +    }
    +  }
    +}
    +
    +void WBatchEditProxyModel::sourceColumnsAboutToBeRemoved
    +  (const WModelIndex& parent, int start, int end)
    +{ 
    +  if (isRemoved(parent))
    +    return;
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  int count = end - start + 1;
    +
    +  for (int i = 0; i < count; ++i) {
    +    int proxyColumn = adjustedProxyColumn(item, start);
    +
    +    if (proxyColumn >= 0) {
    +      beginRemoveColumns(pparent, proxyColumn, proxyColumn);
    +
    +      shiftColumns(item, proxyColumn, -1);
    +
    +      endRemoveColumns();
    +    } else {
    +      // Was removed. We do not need to shift anything: the 'proxy'
    +      // indexes do not change
    +      int remi = -proxyColumn - 1;
    +      item->removedColumns_.erase(item->removedColumns_.begin() + remi);
    +    }
    +  }
    +}
    +
    +void WBatchEditProxyModel::sourceColumnsRemoved(const WModelIndex& parent,
    +						int start, int end)
    +{
    +  if (isRemoved(parent))
    +    return;
    +
    +  endRemoveColumns();
    +}
    +
    +void WBatchEditProxyModel::sourceRowsAboutToBeRemoved
    +(const WModelIndex& parent, int start, int end)
    +{
    +  if (isRemoved(parent))
    +    return;
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  int count = end - start + 1;
    +
    +  for (int i = 0; i < count; ++i) {
    +    int proxyRow = adjustedProxyRow(item, start);
    +
    +    if (proxyRow >= 0) {
    +      beginRemoveRows(pparent, proxyRow, proxyRow);
    +
    +      deleteItemsUnder(item, proxyRow);
    +
    +      shiftRows(item, proxyRow, -1);
    +
    +      endRemoveRows();
    +    } else {
    +      // Was removed. We do not need to shift anything: the 'proxy'
    +      // indexes do not change and also items at indexes for which the
    +      // erased row is ancestor were already deleted
    +      int remi = -proxyRow - 1;
    +      item->removedRows_.erase(item->removedRows_.begin() + remi);
    +    }
    +  }
    +}
    +
    +void WBatchEditProxyModel::deleteItemsUnder(Item *item, int row)
    +{
    +  WModelIndex sourceIndex = sourceModel()->index(row, 0, item->sourceIndex_);
    +
    +  for (ItemMap::iterator i = mappedIndexes_.lower_bound(sourceIndex);
    +       i != mappedIndexes_.end();) {
    +    if (isAncestor(sourceIndex, i->first)) {
    +      delete i->second;
    +      Utils::eraseAndNext(mappedIndexes_, i);
    +    } else
    +      break;
    +  }
    +}
    +
    +void WBatchEditProxyModel::sourceRowsRemoved(const WModelIndex& parent,
    +					     int start, int end)
    +{ 
    +  if (isRemoved(parent))
    +    return;
    +
    +  shiftModelIndexes(parent, start, -(end - start + 1), mappedIndexes_);
    +}
    +
    +void WBatchEditProxyModel::sourceRowsAboutToBeInserted
    +(const WModelIndex& parent, int start, int end)
    +{ }
    +
    +void WBatchEditProxyModel::sourceRowsInserted(const WModelIndex& parent,
    +					      int start, int end)
    +{
    +  if (isRemoved(parent))
    +    return;
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  int count = end - start + 1;
    +
    +  for (int i = 0; i < count; ++i) {
    +    int proxyRow = adjustedProxyRow(item, start + i);
    +
    +    if (proxyRow >= 0) {
    +      if (!submitting_) {
    +	beginInsertRows(pparent, proxyRow, proxyRow);
    +	shiftRows(item, proxyRow, 1);
    +	endInsertRows();
    +      } else {
    +	// The insert is being submitted. We do not need to shift anything:
    +	// the 'proxy' indexes do not change
    +	int index = Utils::indexOf(item->insertedRows_, proxyRow);
    +
    +	assert(index != -1);
    +
    +	Item *child = item->insertedItems_[index];
    +	if (child) {
    +	  child->sourceIndex_ = sourceModel()->index(start + i, 0, parent);
    +	  child->insertedParent_ = 0;
    +	  mappedIndexes_[child->sourceIndex_] = child;
    +	}
    +
    +	item->insertedItems_.erase(item->insertedItems_.begin() + index);
    +	item->insertedRows_.erase(item->insertedRows_.begin() + index);
    +      }
    +    } else {
    +      // Since removed rows are processed first, it cannot be that the
    +      // row is actually removed.
    +      assert(!submitting_);
    +
    +      // The source model is inserting where we actually deleted. We simply
    +      // insert before the 'deleted' row.
    +      int remi = -proxyRow - 1;
    +      proxyRow = item->removedRows_[remi];
    +
    +      beginInsertRows(pparent, proxyRow, proxyRow);
    +      shiftRows(item, proxyRow, 1);
    +      endInsertRows();
    +    }
    +  }
    +
    +  shiftModelIndexes(parent, start, (end - start + 1), mappedIndexes_);
    +}
    +
    +void WBatchEditProxyModel::sourceDataChanged(const WModelIndex& topLeft,
    +					     const WModelIndex& bottomRight)
    +{
    +  if (isRemoved(topLeft.parent()))
    +    return;
    +
    +  WModelIndex parent = mapFromSource(topLeft.parent());
    +
    +  for (int row = topLeft.row(); row <= bottomRight.row(); ++row) {
    +    for (int col = topLeft.column(); col <= bottomRight.column(); ++col) {
    +      WModelIndex l = sourceModel()->index(row, col, topLeft.parent());
    +      if (!isRemoved(l))
    +	dataChanged().emit(mapFromSource(l), mapFromSource(l));
    +    }
    +  }
    +}
    +
    +void WBatchEditProxyModel::sourceHeaderDataChanged(Orientation orientation, 
    +						   int start, int end)
    +{
    +  if (orientation == Vertical) {    
    +    Item *item = itemFromIndex(WModelIndex());
    +    for (int row = start; row <= end; ++row) {
    +      int proxyRow = adjustedProxyRow(item, row);
    +      if (proxyRow != -1)
    +	headerDataChanged().emit(orientation, proxyRow, proxyRow);
    +    }
    +  } else {
    +    // FIXME
    +    headerDataChanged().emit(orientation, start, end);
    +  }
    +}
    +
    +void WBatchEditProxyModel::sourceLayoutAboutToBeChanged()
    +{
    +  // FIXME: what ?
    +
    +  layoutAboutToBeChanged().emit();
    +  resetMappings();
    +}
    +
    +void WBatchEditProxyModel::sourceLayoutChanged()
    +{
    +  layoutChanged().emit();
    +}
    +
    +boost::any WBatchEditProxyModel::data(const WModelIndex& index, int role) const
    +{
    +  Item *item = itemFromIndex(index.parent());
    +
    +  ValueMap::const_iterator i
    +    = item->editedValues_.find(Cell(index.row(), index.column()));
    +
    +  if (i != item->editedValues_.end()) {
    +    DataMap::const_iterator j = i->second.find(role);
    +    if (j != i->second.end())
    +      return indicateDirty(role, j->second);
    +    else
    +      return indicateDirty(role, boost::any());
    +  }
    +
    +  WModelIndex sourceIndex = mapToSource(index);
    +  if (sourceIndex.isValid())
    +    return sourceModel()->data(sourceIndex, role);
    +  else
    +    return indicateDirty(role, boost::any());
    +}
    +
    +void WBatchEditProxyModel::setDirtyIndication(int role, const boost::any& data)
    +{
    +  dirtyIndicationRole_ = role;
    +  dirtyIndicationData_ = data;
    +}
    +
    +boost::any
    +WBatchEditProxyModel::indicateDirty(int role, const boost::any& value) const
    +{
    +  if (role == dirtyIndicationRole_) {
    +    if (role == StyleClassRole) {
    +      WString s1 = asString(value);
    +      WString s2 = asString(dirtyIndicationData_);
    +      if (!s1.empty())
    +	s1 += " ";
    +      s1 += s2;
    +      return boost::any(s1);
    +    } else
    +      return dirtyIndicationData_;
    +  } else
    +    return value;
    +}
    +
    +bool WBatchEditProxyModel::setData(const WModelIndex& index,
    +				   const boost::any& value, int role)
    +{
    +  Item *item = itemFromIndex(index.parent());
    +
    +  ValueMap::iterator i
    +    = item->editedValues_.find(Cell(index.row(), index.column()));
    +
    +  if (i == item->editedValues_.end()) {
    +    WModelIndex sourceIndex = mapToSource(index);
    +    DataMap dataMap;
    +
    +    if (sourceIndex.isValid())
    +      dataMap = sourceModel()->itemData(sourceIndex);
    +
    +    dataMap[role] = value;
    +
    +    if (role == EditRole)
    +      dataMap[DisplayRole] = value;
    +
    +    item->editedValues_[Cell(index.row(), index.column())] = dataMap;
    +  } else {
    +    i->second[role] = value;
    +    if (role == EditRole)
    +      i->second[DisplayRole] = value;
    +  }
    +
    +  dataChanged().emit(index, index);
    +
    +  return true;
    +}
    +
    +WFlags<ItemFlag> WBatchEditProxyModel::flags(const WModelIndex& index) const
    +{
    +  WModelIndex sourceIndex = mapToSource(index);
    +
    +  if (sourceIndex.isValid())
    +    return sourceModel()->flags(index);
    +  else {
    +    std::map<int, WFlags<ItemFlag> >::const_iterator i
    +      = newRowFlags_.find(index.column());
    +    if (i != newRowFlags_.end())
    +      return i->second;
    +    else
    +      return WAbstractProxyModel::flags(index);
    +  }
    +}
    +
    +boost::any WBatchEditProxyModel::headerData(int section,
    +					    Orientation orientation,
    +					    int role) const
    +{
    +  if (orientation == Vertical)
    +    return boost::any(); // nobody cares
    +  else
    +    // FIXME
    +    return sourceModel()->headerData(section, orientation, role);
    +}
    +
    +void WBatchEditProxyModel::shift(std::vector<int>& v, int index, int count)
    +{
    +  unsigned first = Utils::lower_bound(v, index);
    +
    +  for (unsigned i = first; i < v.size(); ++i)
    +    v[i] += count;
    +}
    +
    +void WBatchEditProxyModel::shiftRows(ValueMap& v, int row, int count)
    +{
    +  for (ValueMap::iterator i = v.begin(); i != v.end();) {
    +    if (i->first.row >= row) {
    +      Cell& c = const_cast<Cell&>(i->first);
    +      if (count < 0) {
    +	if (c.row >= row - count) {
    +	  c.row += count;
    +	  ++i;
    +	} else
    +	  Utils::eraseAndNext(v, i);
    +      } else {
    +	c.row += count;
    +	++i;
    +      }
    +    } else
    +      break;
    +  }
    +}
    +
    +void WBatchEditProxyModel::shiftColumns(ValueMap& v, int column, int count)
    +{
    +  for (ValueMap::iterator i = v.begin(); i != v.end();) {
    +    if (i->first.column >= column) {
    +      Cell& c = const_cast<Cell&>(i->first);
    +      if (count < 0) {
    +	if (c.column >= column - count) {
    +	  c.column += count;
    +	  ++i;
    +	} else
    +	  Utils::eraseAndNext(v, i);
    +      } else {
    +	c.column += count;
    +	++i;
    +      }
    +    } else
    +      ++i;
    +  }
    +}
    +
    +void WBatchEditProxyModel::shiftRows(Item *item, int row, int count)
    +{
    +  shift(item->insertedRows_, row, count);
    +  shift(item->removedRows_, row, count);
    +  shiftRows(item->editedValues_, row, count);
    +}
    +
    +void WBatchEditProxyModel::shiftColumns(Item *item, int column, int count)
    +{
    +  shift(item->insertedColumns_, column, count);
    +  shift(item->removedColumns_, column, count);
    +  shiftColumns(item->editedValues_, column, count);
    +}
    +
    +bool WBatchEditProxyModel::insertRows(int row, int count,
    +				      const WModelIndex& parent)
    +{
    +  if (columnCount(parent) == 0)
    +    insertColumns(0, 1, parent);
    +
    +  beginInsertRows(parent, row, row + count - 1);
    +
    +  Item *item = itemFromIndex(parent);
    +
    +  shiftRows(item, row, count);
    +
    +  insertIndexes(item, item->insertedRows_, &item->insertedItems_,
    +		row, count);
    +
    +  for (int i = 0; i < count; ++i) {
    +    for (int j = 0; j < columnCount(parent); ++j) {
    +      DataMap data;
    +      std::map<int, DataMap>::const_iterator nri = newRowData_.find(j);
    +      if (nri != newRowData_.end())
    +	data = nri->second;
    +      item->editedValues_[Cell(row + i, j)] = data;
    +    }
    +  }
    +
    +  endInsertRows();
    +
    +  return true;
    +}
    +
    +bool WBatchEditProxyModel::removeRows(int row, int count,
    +				      const WModelIndex& parent)
    +{
    +  beginRemoveRows(parent, row, row + count - 1);
    +
    +  Item *item = itemFromIndex(parent);
    +
    +  removeIndexes(item, item->insertedRows_, item->removedRows_,
    +		&item->insertedItems_, row, count);
    +
    +  shiftRows(item->editedValues_, row, count);
    +
    +  endRemoveRows();
    +
    +  return true;
    +}
    +
    +bool WBatchEditProxyModel::insertColumns(int column, int count,
    +					 const WModelIndex& parent)
    +{
    +  beginInsertColumns(parent, column, column + count - 1);
    +
    +  Item *item = itemFromIndex(parent);
    +
    +  shiftColumns(item, column, count);
    +
    +  insertIndexes(item, item->insertedColumns_, 0, column, count);
    +
    +  endInsertColumns();
    +
    +  return true;
    +}
    +
    +bool WBatchEditProxyModel::removeColumns(int column, int count,
    +					 const WModelIndex& parent)
    +{
    +  beginRemoveColumns(parent, column, column + count - 1);
    +
    +  Item *item = itemFromIndex(parent);
    +
    +  removeIndexes(item, item->insertedColumns_, item->removedColumns_,
    +		0, column, count);
    +
    +  shiftColumns(item->editedValues_, column, count);
    +
    +  endRemoveColumns();
    +
    +  return true;
    +}
    +
    +void WBatchEditProxyModel::insertIndexes(Item *item,
    +					 std::vector<int>& ins,
    +					 std::vector<Item *> *rowItems,
    +					 int index, int count)
    +{
    +  int insertIndex = Utils::lower_bound(ins, index);
    +
    +  for (int i = 0; i < count; ++i) {
    +    ins.insert(ins.begin() + insertIndex + i, index + i);
    +
    +    if (rowItems)
    +      rowItems->insert(rowItems->begin() + insertIndex + i, (Item *)0);
    +  }
    +}
    +
    +void WBatchEditProxyModel::removeIndexes(Item *item,
    +					 std::vector<int>& ins,
    +					 std::vector<int>& rem,
    +					 std::vector<Item *>* rowItems,
    +					 int index, int count)
    +{
    +  /*
    +   * Example: rem contains [4, 8]
    +   *          ins contains [4, 5, 6]
    +   *   (a row/col was first removed at row/col 4, and later a new one
    +   *    was inserted at row/col 4, 5 and 6, and next a row/col removed at 8)
    +   *
    +   * Then: removeIndexes(3, 3):
    +   *   -> rem: [3, 3, 5]
    +   *   -> ins: [3]
    +   *
    +   *  iter 1:
    +   *   -> rem: [3, 3, 7]
    +   *   -> ins: [3, 4, 5]
    +   *  iter 2:
    +   *   -> rem: [3, 3, 6]
    +   *   -> ins: [3, 4]
    +   *  iter 3:
    +   *   -> rem: [3, 3, 5]
    +   *   -> ins: [3]
    +   */
    +
    +  for (int i = 0; i < count; ++i) {
    +    /*
    +     * If inserted, then remove from the ins
    +     *              otherwise, add to rem
    +     * Shift inserted >= index with - 1,
    +     * Shift removed > index with -1
    +     */
    +    unsigned insi = Utils::lower_bound(ins, index);
    +
    +    if (insi != ins.size() && ins[insi] == index) {
    +      ins.erase(ins.begin() + insi);
    +
    +      if (rowItems) {
    +	delete (*rowItems)[insi];
    +	rowItems->erase(rowItems->begin() + insi);
    +      }
    +    } else {
    +      if (rowItems)
    +	deleteItemsUnder(item, index);
    +
    +      rem.insert(rem.begin() + Utils::lower_bound(rem, index), index);
    +    }
    +
    +    shift(ins, index, -1);
    +    shift(rem, index + 1, -1);
    +  }
    +}
    +
    +void WBatchEditProxyModel::sort(int column, SortOrder order)
    +{
    +  sourceModel()->sort(column, order);
    +}
    +
    +bool WBatchEditProxyModel::isDirty() const
    +{
    +  for (ItemMap::iterator i = mappedIndexes_.begin();
    +       i != mappedIndexes_.end(); ++i) {
    +    Item *item = dynamic_cast<Item *>(i->second);
    +
    +    if (!item->removedColumns_.empty()
    +	|| !item->insertedColumns_.empty()
    +	|| !item->removedRows_.empty()
    +	|| !item->insertedRows_.empty()
    +	|| !item->editedValues_.empty())
    +      return true;
    +  }
    +
    +  return false;
    +}
    +
    +void WBatchEditProxyModel::commitAll()
    +{
    +  submitting_ = true;
    +
    +  for (ItemMap::iterator i = mappedIndexes_.begin(); i != mappedIndexes_.end();
    +       ++i) {
    +    Item *item = dynamic_cast<Item *>(i->second);
    +
    +    while (!item->removedColumns_.empty())
    +      sourceModel()->removeColumn(item->removedColumns_[0], item->sourceIndex_);
    +
    +    while (!item->insertedColumns_.empty())
    +      sourceModel()->insertColumn(item->insertedColumns_[0],
    +				  item->sourceIndex_);
    +
    +    while (!item->removedRows_.empty())
    +      sourceModel()->removeRow(item->removedRows_[0], item->sourceIndex_);
    +
    +    while (!item->insertedRows_.empty())
    +      sourceModel()->insertRow(item->insertedRows_[0], item->sourceIndex_);
    +
    +    for (ValueMap::iterator j = item->editedValues_.begin();
    +	 j != item->editedValues_.end();) {
    +      WModelIndex index = sourceModel()->index(j->first.row,
    +					       j->first.column,
    +					       item->sourceIndex_);
    +      DataMap data = j->second;
    +
    +      Utils::eraseAndNext(item->editedValues_, j);
    +      sourceModel()->setItemData(index, data);
    +    }
    +  }
    +
    +  submitting_ = false;
    +}
    +
    +void WBatchEditProxyModel::revertAll()
    +{
    +  for (ItemMap::iterator i = mappedIndexes_.begin(); i != mappedIndexes_.end();
    +       ++i) {
    +    Item *item = dynamic_cast<Item *>(i->second);
    +
    +    WModelIndex proxyIndex = mapFromSource(item->sourceIndex_);
    +
    +    while (!item->insertedColumns_.empty())
    +      removeColumn(item->insertedColumns_[0], proxyIndex);
    +
    +    while (!item->removedColumns_.empty()) {
    +      int column = item->removedColumns_[0];
    +
    +      beginInsertColumns(proxyIndex, column, 1);
    +      item->removedColumns_.erase(item->removedColumns_.begin());
    +      shiftColumns(item, column, 1);
    +      endInsertColumns();
    +    }
    +
    +    while (!item->insertedRows_.empty())
    +      removeRow(item->insertedRows_[0], proxyIndex);
    +
    +    while (!item->removedRows_.empty()) {
    +      int row = item->removedRows_[0];
    +
    +      beginInsertRows(proxyIndex, row, 1);
    +      item->removedRows_.erase(item->removedRows_.begin());
    +      shiftRows(item, row, 1);
    +      endInsertRows();
    +    }
    +
    +    for (ValueMap::iterator j = item->editedValues_.begin();
    +	 j != item->editedValues_.end();) {
    +      Cell c = j->first;
    +      Utils::eraseAndNext(item->editedValues_, j);
    +      WModelIndex child = index(c.row, c.column, proxyIndex);
    +      dataChanged().emit(child, child);
    +    }
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBoostAny b/wt-3.1.7a/src/Wt/WBoostAny
    new file mode 100644
    index 0000000..b13878e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBoostAny
    @@ -0,0 +1,250 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBOOST_ANY_H_
    +#define WBOOST_ANY_H_
    +
    +#include <Wt/WGlobal>
    +#include <Wt/WString>
    +#include <boost/any.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +
    +/*! \brief A traits class for a type stored in a boost::any.
    + *
    + * The traits are used by %Wt's view classes (such as Wt::WTableView
    + * Wt::WTreeView, Wt::Chart::WCartesianChart) to deal with values in a
    + * Wt::WAbstractItemModel:
    + *  - conversion to a string by Wt::asString()
    + *  - conversion to a number by Wt::asNumber()
    + *  - sorting by Wt::WSortFilterProxyModel or WStandardItemModel.
    + *
    + * This traits class provides a default implementation for supporting
    + * values <i>value</i> of a custom type <i>Type</i> in %Wt's MVC system,
    + * which relies on:
    + * - serializing to a stream (std::ostream << <i>value</i>) for converting the
    + *   value to a string.
    + * - lexical interpretation as a number for converting the value to a number,
    + *   using boost::lexical_cast<double>(value).
    + * - sorting using operator== and operator<
    + *
    + * You can specialize these traits if you need to customize one or more of these
    + * operations.
    + *
    + * \ingroup modelview
    + */
    +template <typename Type>
    +struct boost_any_traits {
    +  /*! \brief Converts a value to a string.
    +   *
    +   * The default implementation uses a boost::lexical_cast, and thus
    +   * an overloaded std::ostream<< operator for the value.
    +   */
    +  static WString asString(const Type& value, const WString& format);
    +
    +  /*! \brief Converts a value to a number.
    +   *
    +   * The default implementation returns:
    +   * \code
    +   * boost::lexical_cast<double>(asString(v), "")
    +   * \endcode
    +   */
    +  static double asNumber(const Type& v);
    +
    +  /*! \brief Compares two values.
    +   *
    +   * The default implementation uses operator== and operator<.
    +   */
    +  static int compare(const Type& v1, const Type& v2);
    +};
    +
    +/*! \brief Interprets a boost::any as a string value.
    + *
    + * The conversion works as follows:
    + *  - A boost::any without a value is converted to an empty string
    + *  - Number values (integers and doubles) are formatted using the
    + *    format string with <i>snprintf()</i>, or with
    + *    <i>boost::lexical_cast<></i> if the format string is empty.
    + *  - Data of type WDate is converted with WDate::toString() using the indicated
    + *    format string. If the format string is empty, "dd/MM/yy" is assumed.
    + *  - Data of type WTime is converted with WTime::toString() using the indicated
    + *    format string. If the format string is emtpy, "HH:mm:ss" is assumed.
    + *  - Data of type WDateTime is converted with WDateTime::toString() using the
    + *    indicated format string. If the format string is empty,
    + *    "dd/MM/yy HH:mm:ss" is assumed.
    + *
    + * Other types are converted according to
    + * Wt::boost_any_traits<Type>::asString(). For these other types, you need
    + * to register their support first using Wt::registerType<Type>() and you may
    + * want to specialize Wt::boost_any_traits<Type> for a custom handling of
    + * their conversions.
    + *
    + * \sa asNumber(), boost_any_traits 
    + *
    + * \ingroup modelview
    + */
    +#ifdef DOXYGEN_ONLY
    +extern WString asString(const boost::any& v,
    +			const WT_USTRING& formatString = WT_USTRING());
    +#else
    +extern WT_API WString asString(const boost::any& v,
    +			       const WT_USTRING& formatString = WT_USTRING());
    +#endif
    +
    +/*! \brief Interprets a boost::any as a number value.
    + *
    + * The conversion works as follows:
    + * - A boost::any without a value, or a string that does not represent a
    + * number, is converted to a <i>NaN</i>.
    + * - A string is lexically casted to a double
    + * - Data of type WDate is converted to an integer number using
    + * WDate::toJulianDay().
    + * - Data of type WDateTime is converted to an integer number using
    + * WDateTime::toTime_t().
    + * - Data of type WTime is converted to an integer number as the number of
    + * milliseconds since midnight.
    + *
    + * Other types are converted according to
    + * Wt::boost_any_traits<Type>::asNumber(). For these other types, you need to
    + * register their support first using Wt::registerType<Type>() and you may
    + * want to specialize Wt::boost_any_traits<Type> for a custom handling of
    + * their conversions.
    + *
    + * \sa asString(), boost_any_traits 
    + *
    + * \ingroup modelview
    + */
    +#ifdef DOXYGEN_ONLY
    +extern double asNumber(const boost::any& v);
    +#else
    +extern WT_API double asNumber(const boost::any& v);
    +#endif // DOXYGEN_ONLY
    +
    +/*
    + * Converts a value of one type to a value of another type, using a
    + * WString as an intermediate form.
    + */
    +extern WT_API boost::any
    +convertAnyToAny(const boost::any& v,
    +		const std::type_info& type,
    +		const WT_USTRING& formatString = WT_USTRING());
    +
    +/*! \brief Registers MVC-support for a type passed in a boost::any.
    + *
    + * By registering a type using this method, the global function
    + * Wt::asString(), which converts a boost::any to a string, will know
    + * how to interpret a boost::any holding a value of type \p Type using
    + * Wt::boost_any_traits<Type>::asString(). This gives %Wt's built-in
    + * standard View classes the ability to display Wt::DisplayRole data
    + * of a Wt::WAbstractItemModel model.
    + *
    + * Similarly, Wt::asNumber() uses
    + * Wt::boost_any_traits<Type>::asNumber() for use by
    + * Wt::Chart::WCartesianChart and Wt::Chart::WPieChart as numerical
    + * data.
    + *
    + * The default implementation of Wt::boost_any_traits<Type> converts a
    + * value \p t to a Wt::WString by using
    + * boost::lexical_cast<std::string>() which it expects to return a
    + * UTF-8 string. This conversion thus relies on the std::ostream<<
    + * operator to be overloaded for the type. You may want to specialize
    + * Wt::boost_any_traits to provide a custom conversion for a type, or if
    + * you want to take into account the format string.
    + *
    + * The following types are registered by %Wt itself:
    + *  - strings of type WString or std::string
    + *  - WDate, WTime, WDateTime
    + *  - standard C++ numeric types (int, double, etc...)
    + *  - bool
    + *
    + * This method is thread-safe, and it is not an error to register the
    + * same type multiple times.
    + *
    + * \ingroup modelview
    + */
    +template <typename Type> void registerType();
    +
    +namespace Impl {
    +  class WT_API AbstractTypeHandler {
    +  public:
    +    AbstractTypeHandler();
    +    virtual ~AbstractTypeHandler();
    +    virtual WString asString(const boost::any& v, const WString& format) = 0;
    +    virtual double asNumber(const boost::any& v) = 0;
    +    virtual int compare(const boost::any& v1, const boost::any& v2) = 0;
    +  };
    +
    +  template <typename T>
    +  class TypeHandler : public AbstractTypeHandler {
    +    virtual WString asString(const boost::any& v, const WString& format) {
    +      return boost_any_traits<T>::asString(boost::any_cast<T>(v), format);
    +    }
    +
    +    virtual double asNumber(const boost::any& v) {
    +      return boost_any_traits<T>::asNumber(boost::any_cast<T>(v));
    +    }
    +
    +    virtual int compare(const boost::any& v1, const boost::any& v2) {
    +      return boost_any_traits<T>::compare(boost::any_cast<T>(v1),
    +					  boost::any_cast<T>(v2));
    +    }
    +  };
    +
    +  extern WT_API AbstractTypeHandler *getRegisteredType(const std::type_info *type,
    +						bool takeLock);
    +  extern WT_API void registerType(const std::type_info *type,
    +			   AbstractTypeHandler *handler);
    +
    +  extern WT_API void lockTypeRegistry();
    +  extern WT_API void unlockTypeRegistry();
    +
    +  extern WT_API bool matchValue(const boost::any& value,
    +				const boost::any& query,
    +				WFlags<MatchFlag> flags);
    +  extern WT_API int compare(const boost::any& d1, const boost::any& d2);
    +
    +  extern WT_API boost::any updateFromJS(const boost::any& v, std::string s);
    +
    +  extern WT_API std::string asJSLiteral(const boost::any& v, bool xhtml);
    +}
    +
    +template <typename Type> void registerType()
    +{
    +  Impl::lockTypeRegistry();
    +  try {
    +    if (!Impl::getRegisteredType(&typeid(Type), false))
    +      Impl::registerType(&typeid(Type), new Impl::TypeHandler<Type>());
    +
    +    Impl::unlockTypeRegistry();
    +  } catch (...) {
    +    Impl::unlockTypeRegistry();
    +    throw;
    +  }
    +}
    +
    +template <typename Type>
    +WString boost_any_traits<Type>::asString(const Type& value,
    +					 const WString& format)
    +{
    +  return WString::fromUTF8(boost::lexical_cast<std::string>(value));
    +}
    +
    +template <typename Type>
    +double boost_any_traits<Type>::asNumber(const Type& v)
    +{
    +  return boost::lexical_cast<double>(asString(v, WString::Empty).toUTF8());
    +}
    +
    +template <typename Type>
    +int boost_any_traits<Type>::compare(const Type& v1, const Type& v2)
    +{
    +  return v1 == v2 ? 0 : (v1 < v2 ? -1 : 1);
    +}
    +
    +}
    +
    +#endif // WBOOST_ANY_H_
    diff --git a/wt-3.1.7a/src/Wt/WBoostAny.C b/wt-3.1.7a/src/Wt/WBoostAny.C
    new file mode 100644
    index 0000000..b728884
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBoostAny.C
    @@ -0,0 +1,484 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <map>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +#include <stdio.h>
    +
    +#ifdef WT_THREADED
    +#include <boost/thread.hpp>
    +#include <boost/shared_ptr.hpp>
    +#endif // WT_THREADED
    +
    +#include "WtException.h"
    +
    +#include "Wt/WBoostAny"
    +#include "Wt/WDate"
    +#include "Wt/WDateTime"
    +#include "Wt/WTime"
    +#include "Wt/WWebWidget"
    +
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +namespace Wt {
    +  namespace Impl {
    +
    +#ifdef WT_THREADED
    +boost::mutex registryMutex_;
    +#endif // WT_THREADED
    +
    +typedef std::map<const std::type_info *,
    +		 boost::shared_ptr<AbstractTypeHandler> > TypeRegistryMap;
    +
    +TypeRegistryMap typeRegistry_;
    +
    +AbstractTypeHandler::AbstractTypeHandler()
    +{ }
    +
    +AbstractTypeHandler::~AbstractTypeHandler()
    +{ }
    +
    +void lockTypeRegistry()
    +{
    +#ifdef WT_THREADED
    +  registryMutex_.lock();
    +#endif // WT_THREADED
    +}
    +
    +void unlockTypeRegistry()
    +{
    +#ifdef WT_THREADED
    +  registryMutex_.unlock();
    +#endif // WT_THREADED
    +}
    +
    +AbstractTypeHandler *getRegisteredType(const std::type_info *type,
    +				       bool takeLock)
    +{
    +  if (takeLock)
    +    lockTypeRegistry();
    +
    +  TypeRegistryMap::iterator i = typeRegistry_.find(type);
    +
    +  AbstractTypeHandler *result = 0;
    +
    +  if (i != typeRegistry_.end())
    +    result = i->second.get();
    +
    +  if (takeLock)
    +    unlockTypeRegistry();
    +
    +  return result;
    +}
    +
    +void registerType(const std::type_info *type, AbstractTypeHandler *handler)
    +{
    +  typeRegistry_[type].reset(handler);
    +}
    +
    +bool matchValue(const boost::any& value, const boost::any& query,
    +		WFlags<MatchFlag> flags)
    +{
    +  WFlags<MatchFlag> f = flags & MatchTypeMask;
    +
    +  if ((f & MatchTypeMask) == MatchExactly)
    +    return (query.type() == value.type()) && asString(query) == asString(value);
    +  else {
    +    std::string query_str = asString(query).toUTF8();
    +    std::string value_str = asString(value).toUTF8();
    +
    +    switch (f) {
    +    case MatchStringExactly:
    +      return boost::iequals(value_str, query_str);
    +    case MatchStringExactly | (int)MatchCaseSensitive:
    +      return boost::equals(value_str, query_str);
    +
    +    case MatchStartsWith:
    +      return boost::istarts_with(value_str, query_str);
    +    case MatchStartsWith | (int)MatchCaseSensitive:
    +      return boost::starts_with(value_str, query_str);
    +
    +    case MatchEndsWith:
    +      return boost::iends_with(value_str, query_str);
    +    case MatchEndsWith | (int)MatchCaseSensitive:
    +      return boost::ends_with(value_str, query_str);
    +
    +    default:
    +      throw WtException("Not yet implemented: WAbstractItemModel::match with "
    +			"MatchFlags = "
    +			+ boost::lexical_cast<std::string>(flags));
    +    }
    +  }
    +}
    +
    +std::string asJSLiteral(const boost::any& v, bool xhtml)
    +{
    +  if (v.empty())
    +    return std::string("''");
    +  else if (v.type() == typeid(WString)) {
    +    WString s = boost::any_cast<WString>(v);
    +
    +    bool plainText = false;
    +    if (xhtml) {
    +      if (s.literal())
    +	plainText = !WWebWidget::removeScript(s);
    +    } else
    +      plainText = true;
    +
    +    if (plainText)
    +      s = WWebWidget::escapeText(s);
    +
    +    return s.jsStringLiteral();
    +  } else if (v.type() == typeid(std::string)
    +	     || v.type() == typeid(const char *)) {
    +    WString s = v.type() == typeid(std::string) 
    +      ? WString::fromUTF8(boost::any_cast<std::string>(v))
    +      : WString::fromUTF8(boost::any_cast<const char *>(v));
    +
    +    bool plainText;
    +    if (xhtml)
    +      plainText = !WWebWidget::removeScript(s);
    +    else
    +      plainText = true;
    +
    +    if (plainText)
    +      s = WWebWidget::escapeText(s);
    +
    +    return s.jsStringLiteral();
    +  } else if (v.type() == typeid(WDate)) {
    +    const WDate& d = boost::any_cast<WDate>(v);
    +
    +    return "new Date(" + boost::lexical_cast<std::string>(d.year())
    +      + ',' + boost::lexical_cast<std::string>(d.month() - 1)
    +      + ',' + boost::lexical_cast<std::string>(d.day())
    +      + ')';
    +  } else if (v.type() == typeid(WDateTime)) {
    +    const WDateTime& dt = boost::any_cast<WDateTime>(v);
    +    const WDate& d = dt.date();
    +    const WTime& t = dt.time();
    +
    +    return "new Date(" + boost::lexical_cast<std::string>(d.year())
    +      + ',' + boost::lexical_cast<std::string>(d.month() - 1)
    +      + ',' + boost::lexical_cast<std::string>(d.day())
    +      + ',' + boost::lexical_cast<std::string>(t.hour())
    +      + ',' + boost::lexical_cast<std::string>(t.minute())
    +      + ',' + boost::lexical_cast<std::string>(t.second())
    +      + ',' + boost::lexical_cast<std::string>(t.msec())
    +      + ')';
    +  }
    +
    +#define ELSE_LEXICAL_ANY(TYPE) \
    +  else if (v.type() == typeid(TYPE)) \
    +    return boost::lexical_cast<std::string>(boost::any_cast<TYPE>(v))
    +
    +  ELSE_LEXICAL_ANY(short);
    +  ELSE_LEXICAL_ANY(unsigned short);
    +  ELSE_LEXICAL_ANY(int);
    +  ELSE_LEXICAL_ANY(unsigned int);
    +  ELSE_LEXICAL_ANY(long);
    +  ELSE_LEXICAL_ANY(unsigned long);
    +  ELSE_LEXICAL_ANY(::int64_t);
    +  ELSE_LEXICAL_ANY(::uint64_t);
    +  ELSE_LEXICAL_ANY(long long);
    +  ELSE_LEXICAL_ANY(unsigned long long);
    +  ELSE_LEXICAL_ANY(float);
    +  ELSE_LEXICAL_ANY(double);
    +
    +#undef ELSE_LEXICAL_ANY
    +
    +  else {
    +    AbstractTypeHandler *handler = getRegisteredType(&v.type(), true);
    +    if (handler)
    +      return handler->asString(v, WString::Empty).jsStringLiteral();
    +    else
    +      throw WtException(std::string("WAbstractItemModel: unsupported type ")
    +			+ v.type().name());
    +  }
    +}
    +
    +boost::any updateFromJS(const boost::any& v, std::string s)
    +{
    +  if (v.empty())
    +    return boost::any(s);
    +  else if (v.type() == typeid(WString))
    +    return boost::any(WString::fromUTF8(s));
    +  else if (v.type() == typeid(std::string))
    +    return boost::any(s);
    +  else if (v.type() == typeid(const char *))
    +    return boost::any(s);
    +  else if (v.type() == typeid(WDate))
    +    return boost::any(WDate::fromString(WString::fromUTF8(s),
    +					"ddd MMM d yyyy"));
    +  else if (v.type() == typeid(WDateTime))
    +    return boost::any(WDateTime::fromString(WString::fromUTF8(s),
    +					    "ddd MMM d yyyy HH:mm:ss"));
    +#define ELSE_LEXICAL_ANY(TYPE) \
    +  else if (v.type() == typeid(TYPE)) \
    +    return boost::any(boost::lexical_cast<TYPE>(s))
    +
    +  ELSE_LEXICAL_ANY(short);
    +  ELSE_LEXICAL_ANY(unsigned short);
    +  ELSE_LEXICAL_ANY(int);
    +  ELSE_LEXICAL_ANY(unsigned int);
    +  ELSE_LEXICAL_ANY(long);
    +  ELSE_LEXICAL_ANY(unsigned long);
    +  ELSE_LEXICAL_ANY(int64_t);
    +  ELSE_LEXICAL_ANY(uint64_t);
    +  ELSE_LEXICAL_ANY(long long);
    +  ELSE_LEXICAL_ANY(unsigned long long);
    +  ELSE_LEXICAL_ANY(float);
    +  ELSE_LEXICAL_ANY(double);
    +
    +#undef ELSE_LEXICAL_ANY
    +
    +  else
    +    throw WtException(std::string("WAbstractItemModel: unsupported type ")
    +		      + v.type().name());
    +}
    +
    +int compare(const boost::any& d1, const boost::any& d2)
    +{
    +  const int UNSPECIFIED_RESULT = -1;
    +
    +  /*
    +   * If the types are the same then we use std::operator< on that type
    +   * otherwise we compare lexicographically
    +   */
    +  if (!d1.empty())
    +    if (!d2.empty()) {
    +      if (d1.type() == d2.type()) {
    +	if (d1.type() == typeid(bool))
    +	  return static_cast<int>(boost::any_cast<bool>(d1))
    +	    - static_cast<int>(boost::any_cast<bool>(d2));
    +
    +#define ELSE_COMPARE_ANY(TYPE)				\
    +	else if (d1.type() == typeid(TYPE)) {		\
    +	  TYPE v1 = boost::any_cast<TYPE>(d1);		\
    +	  TYPE v2 = boost::any_cast<TYPE>(d2);		\
    +	  return v1 == v2 ? 0 : (v1 < v2 ? -1 : 1);	\
    +        }
    +
    +	ELSE_COMPARE_ANY(WString)
    +	ELSE_COMPARE_ANY(std::string)
    +	ELSE_COMPARE_ANY(WDate)
    +	ELSE_COMPARE_ANY(WDateTime)
    +	ELSE_COMPARE_ANY(WTime)
    +	ELSE_COMPARE_ANY(short)
    +	ELSE_COMPARE_ANY(unsigned short)
    +	ELSE_COMPARE_ANY(int)
    +	ELSE_COMPARE_ANY(unsigned int)
    +	ELSE_COMPARE_ANY(long)
    +	ELSE_COMPARE_ANY(unsigned long)
    +	ELSE_COMPARE_ANY(::int64_t)
    +	ELSE_COMPARE_ANY(::uint64_t)
    +	ELSE_COMPARE_ANY(long long)
    +	ELSE_COMPARE_ANY(unsigned long long)
    +	ELSE_COMPARE_ANY(float)
    +	ELSE_COMPARE_ANY(double)
    +
    +#undef ELSE_COMPARE_ANY
    +	else {
    +	  AbstractTypeHandler *handler = getRegisteredType(&d1.type(), true);
    +	  if (handler)
    +	    return handler->compare(d1, d2);
    +	  else	  
    +	    throw WtException(std::string
    +			      ("WAbstractItemModel: unsupported type ")
    +			      + d1.type().name());
    +	}
    +      } else {
    +	WString s1 = asString(d1);
    +	WString s2 = asString(d2);
    +
    +	return s1 == s2 ? 0 : (s1 < s2 ? -1 : 1);
    +      }
    +    } else
    +      return -UNSPECIFIED_RESULT;
    +  else
    +    if (!d2.empty())
    +      return UNSPECIFIED_RESULT;
    +    else
    +      return 0;
    +}
    +
    +  }
    +
    +WString asString(const boost::any& v, const WT_USTRING& format)
    +{
    +  if (v.empty())
    +    return WString();
    +  else if (v.type() == typeid(WString))
    +    return boost::any_cast<WString>(v);
    +  else if (v.type() == typeid(std::string))
    +    return WString::fromUTF8(boost::any_cast<std::string>(v));
    +  else if (v.type() == typeid(const char *))
    +    return WString::fromUTF8(boost::any_cast<const char *>(v));
    +  else if (v.type() == typeid(WDate)) {
    +    const WDate& d = boost::any_cast<WDate>(v);
    +    return d.toString(format.empty() ? "dd/MM/yy" : format);
    +  } else if (v.type() == typeid(WDateTime)) {
    +    const WDateTime& dt = boost::any_cast<WDateTime>(v);
    +    return dt.toString(format.empty() ? "dd/MM/yy HH:mm:ss" : format);
    +  } else if (v.type() == typeid(WTime)) {
    +    const WTime& t = boost::any_cast<WTime>(v);
    +    return t.toString(format.empty() ? "HH:mm:ss" : format);
    +  }
    +
    +#define ELSE_LEXICAL_ANY(TYPE)						\
    +  else if (v.type() == typeid(TYPE)) {					\
    +    if (format.empty())							\
    +      return WString::fromUTF8(boost::lexical_cast<std::string>		\
    +			       (boost::any_cast<TYPE>(v)));		\
    +    else {								\
    +      char buf[100];							\
    +      snprintf(buf, 100, format.toUTF8().c_str(), boost::any_cast<TYPE>(v)); \
    +      return WString::fromUTF8(buf);					\
    +    }									\
    +  }
    +
    +  ELSE_LEXICAL_ANY(short)
    +  ELSE_LEXICAL_ANY(unsigned short)
    +  ELSE_LEXICAL_ANY(int)
    +  ELSE_LEXICAL_ANY(unsigned int)
    +  ELSE_LEXICAL_ANY(long)
    +  ELSE_LEXICAL_ANY(unsigned long)
    +  ELSE_LEXICAL_ANY(int64_t)
    +  ELSE_LEXICAL_ANY(uint64_t)
    +  ELSE_LEXICAL_ANY(long long)
    +  ELSE_LEXICAL_ANY(float)
    +  ELSE_LEXICAL_ANY(double)
    +
    +#undef ELSE_LEXICAL_ANY
    +
    +  else {
    +    Impl::AbstractTypeHandler *handler = Impl::getRegisteredType(&v.type(),
    +								 true);
    +    if (handler)
    +      return handler->asString(v, format);
    +    else	  
    +      throw WtException(std::string("WAbstractItemModel: unsupported type ")
    +			+ v.type().name());
    +  }
    +}
    +
    +double asNumber(const boost::any& v)
    +{
    +  if (v.empty())
    +    return std::numeric_limits<double>::signaling_NaN();
    +  else if (v.type() == typeid(WString))
    +    try {
    +      return boost::lexical_cast<double>(boost::any_cast<WString>(v).toUTF8());
    +    } catch (boost::bad_lexical_cast& e) {
    +      return std::numeric_limits<double>::signaling_NaN();
    +    }
    +  else if (v.type() == typeid(std::string))
    +    try {
    +      return boost::lexical_cast<double>(boost::any_cast<std::string>(v));
    +    } catch (boost::bad_lexical_cast& e) {
    +      return std::numeric_limits<double>::signaling_NaN();
    +    }
    +  else if (v.type() == typeid(const char *))
    +    try {
    +      return boost::lexical_cast<double>(boost::any_cast<const char *>(v));
    +    } catch (boost::bad_lexical_cast&) {
    +      return std::numeric_limits<double>::signaling_NaN();
    +    }
    +  else if (v.type() == typeid(WDate))
    +    return static_cast<double>(boost::any_cast<WDate>(v).toJulianDay());
    +  else if (v.type() == typeid(WDateTime)) {
    +    const WDateTime& dt = boost::any_cast<WDateTime>(v);
    +    return static_cast<double>(dt.toTime_t());
    +  } else if (v.type() == typeid(WTime)) {
    +    const WTime& t = boost::any_cast<WTime>(v);
    +    return static_cast<double>(WTime(0, 0).msecsTo(t));
    +  }
    +
    +#define ELSE_NUMERICAL_ANY(TYPE) \
    +  else if (v.type() == typeid(TYPE)) \
    +    return static_cast<double>(boost::any_cast<TYPE>(v))
    +
    +  ELSE_NUMERICAL_ANY(short);
    +  ELSE_NUMERICAL_ANY(unsigned short);
    +  ELSE_NUMERICAL_ANY(int);
    +  ELSE_NUMERICAL_ANY(unsigned int);
    +  ELSE_NUMERICAL_ANY(long);
    +  ELSE_NUMERICAL_ANY(unsigned long);
    +  ELSE_NUMERICAL_ANY(int64_t);
    +  ELSE_NUMERICAL_ANY(uint64_t);
    +  ELSE_NUMERICAL_ANY(long long);
    +  ELSE_NUMERICAL_ANY(float);
    +  ELSE_NUMERICAL_ANY(double);
    +
    +#undef ELSE_NUMERICAL_ANY
    +
    +  else {
    +    Impl::AbstractTypeHandler *handler = Impl::getRegisteredType(&v.type(),
    +								 true);
    +    if (handler)
    +      return handler->asNumber(v);
    +    else	  
    +      throw WtException(std::string("WAbstractItemModel: unsupported type ")
    +			+ v.type().name());
    +  }
    +}
    +
    +extern WT_API boost::any convertAnyToAny(const boost::any& v,
    +					 const std::type_info& type,
    +					 const WT_USTRING& format)
    +{
    +  if (v.empty())
    +    return boost::any();
    +  else if (v.type() == type)
    +    return v;
    +
    +  WString s = asString(v, format);
    +
    +  if (type == typeid(WString))
    +    return s;
    +  else if (type == typeid(std::string))
    +    return s.toUTF8();
    +  else if (type == typeid(const char *))
    +    return s.toUTF8().c_str();
    +  else if (type == typeid(WDate)) {
    +    return WDate::fromString
    +      (s, format.empty() ? "dd/MM/yy" : format);
    +  } else if (v.type() == typeid(WDateTime)) {
    +    return WDateTime::fromString
    +      (s, format.empty() ? "dd/MM/yy HH:mm:ss" : format);
    +  } else if (v.type() == typeid(WTime)) {
    +    return WTime::fromString
    +      (s, format.empty() ? "HH:mm:ss" : format);
    +  }
    +
    +#define ELSE_LEXICAL_ANY(TYPE)						\
    +  else if (v.type() == typeid(TYPE)) {					\
    +    return boost::lexical_cast<TYPE>(s.toUTF8());			\
    +  }
    +
    +  ELSE_LEXICAL_ANY(short)
    +  ELSE_LEXICAL_ANY(unsigned short)
    +  ELSE_LEXICAL_ANY(int)
    +  ELSE_LEXICAL_ANY(unsigned int)
    +  ELSE_LEXICAL_ANY(long)
    +  ELSE_LEXICAL_ANY(unsigned long)
    +  ELSE_LEXICAL_ANY(int64_t)
    +  ELSE_LEXICAL_ANY(uint64_t)
    +  ELSE_LEXICAL_ANY(long long)
    +  ELSE_LEXICAL_ANY(float)
    +  ELSE_LEXICAL_ANY(double)
    +
    +#undef ELSE_LEXICAL_ANY
    +
    +  else {
    +    // FIXME, add this to the traits.
    +    throw WtException(std::string("WAbstractItemModel: unsupported type ")
    +		      + v.type().name());
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBorder b/wt-3.1.7a/src/Wt/WBorder
    new file mode 100644
    index 0000000..8c54010
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBorder
    @@ -0,0 +1,118 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBORDER_H_
    +#define WBORDER_H_
    +
    +#include <Wt/WLength>
    +#include <Wt/WColor>
    +
    +namespace Wt {
    +
    +/*! \class WBorder Wt/WBorder Wt/WBorder
    + *  \brief A style class for the border of a widget.
    + *
    + * \ingroup style
    + */
    +class WT_API WBorder
    +{
    +public:
    +
    +  /*! \brief Enumeration for border width
    +   */
    +  enum Width { Thin,    //!< Browser-dependent 'thin' border.
    +	       Medium,  //!< Browser-dependent 'medium' border, default.
    +	       Thick,   //!< Browser-dependent 'thin' border.
    +	       Explicit //!< Explicit width. See also explicitWidth()
    +  };
    +
    +  /*! \brief Enumeration for border style
    +   */
    +  enum Style { None,    //!< No border (width ignored), default.
    +	       Hidden,  //!< Invisible border (of specified width). 
    +	       Dotted,  //!< Dotted border
    +	       Dashed,  //!< Dashed border
    +	       Solid,   //!< Solid border
    +	       Double,  //!< Double lined border
    +	       Groove,  //!< Relief border grooved into the canvas
    +	       Ridge,   //!< Relief border coming out of the canvas
    +	       Inset,   //!< Relief border lowering contents into the canvas 
    +	       Outset   //!< Relief border letting contents come out of the canvas
    +  };
    +
    +  /*! \brief Creates a border indicating <i>no border</i>.
    +   */
    +  WBorder();
    +
    +  /*! \brief Creates a border with given style, thickness and color.
    +   */
    +  explicit WBorder(Style style, Width = Medium, WColor color = WColor());
    +
    +  /*! \brief Creates a border with an absolute width.
    +   */
    +  WBorder(Style style, const WLength& width, WColor color = WColor());
    +
    +  /*! \brief Comparison operator
    +   */
    +  bool operator==(const WBorder& other) const;
    +
    +  /*! \brief Comparison operator
    +   */
    +  bool operator!=(const WBorder& other) const;
    +
    +  /*! \brief Sets the border width.
    +   *
    +   * If width == Explicit, then the width specified in
    +   * \p explicitWidth is used.
    +   */
    +  void setWidth(Width width, const WLength& explicitWidth = WLength::Auto);
    +
    +  /*! \brief Sets the border color.
    +   */
    +  void setColor(WColor color);
    +
    +  /*! \brief Sets the border style.
    +   */
    +  void setStyle(Style style);
    +
    +  /*! \brief Returns the border width.
    +   *
    +   * \sa setWidth()
    +   */
    +  Width width() const { return width_; }
    +
    +  /*! \brief Returns the border width when set explicitly.
    +   *
    +   * \sa setWidth()
    +   */
    +  WLength explicitWidth() const { return explicitWidth_; }
    +
    +  /*! \brief Returns the border color.
    +   *
    +   * \sa setColor()
    +   */
    +  WColor color() const { return color_; }
    +
    +  /*! \brief Returns the border style.
    +   *
    +   * \sa setStyle()
    +   */
    +  Style style() const { return style_; }
    +
    +  /*! \brief Returns the CSS text for this border style.
    +   */
    +  std::string cssText() const;
    +  
    +private:
    +  Width   width_;
    +  WLength explicitWidth_;
    +  WColor  color_;
    +  Style   style_;
    +};
    +
    +}
    +
    +#endif // WLENGTH
    diff --git a/wt-3.1.7a/src/Wt/WBorder.C b/wt-3.1.7a/src/Wt/WBorder.C
    new file mode 100644
    index 0000000..2b958ea
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBorder.C
    @@ -0,0 +1,98 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WBorder"
    +
    +namespace Wt {
    +
    +WBorder::WBorder()
    +  : width_(Medium),
    +    style_(None)
    +{ }
    +
    +WBorder::WBorder(Style style, Width width, WColor color)
    +  : width_(width),
    +    color_(color),
    +    style_(style)
    +{ }
    +
    +WBorder::WBorder(Style style, const WLength& width, WColor color)
    +  : width_(Explicit),
    +    explicitWidth_(width),
    +    color_(color),
    +    style_(style)
    +{ }
    +
    +bool WBorder::operator==(const WBorder& other) const
    +{
    +  return
    +    width_ == other.width_
    +    && color_ == other.color_
    +    && style_ == other.style_;
    +}
    +
    +bool WBorder::operator!=(const WBorder& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +void WBorder::setWidth(Width width, const WLength& explicitWidth)
    +{
    +  width_ = width;
    +  explicitWidth_ = explicitWidth;
    +}
    +
    +void WBorder::setColor(WColor color)
    +{
    +  color_ = color;
    +}
    +
    +void WBorder::setStyle(Style style)
    +{
    +  style_ = style;
    +}
    +
    +std::string WBorder::cssText() const
    +{
    +  std::string style;
    +  switch (style_) {
    +  case None:
    +    return "none";
    +  case Hidden:
    +    style = "hidden"; break;
    +  case Dotted:
    +    style = "dotted"; break;
    +  case Dashed:
    +    style = "dashed"; break;
    +  case Solid:
    +    style = "solid"; break;
    +  case Double:
    +    style = "double"; break;
    +  case Groove:
    +    style = "groove"; break;
    +  case Ridge:
    +    style = "ridge"; break;
    +  case Inset:
    +    style = "inset"; break;
    +  case Outset:
    +    style = "outset"; break;
    +  }
    +
    +  std::string width;
    +  switch (width_) {
    +  case Thin:
    +    width = "thin"; break;
    +  case Medium:
    +    width = "medium"; break;
    +  case Thick:
    +    width = "thick"; break;
    +  case Explicit:
    +    width = explicitWidth_.cssText();
    +  }
    +
    +  return width + " " + style + " " + color_.cssText();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBorderLayout b/wt-3.1.7a/src/Wt/WBorderLayout
    new file mode 100644
    index 0000000..5958ebc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBorderLayout
    @@ -0,0 +1,164 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBORDER_LAYOUT_H_
    +#define WBORDER_LAYOUT_H_
    +
    +#include <Wt/WGridLayout>
    +
    +namespace Wt {
    +
    +/*! \class WBorderLayout Wt/WBorderLayout Wt/WBorderLayout
    + *  \brief A layout manager which divides the container region in five regions.
    + *
    + * The five regions are composed of:
    + * <pre>
    +     ------------------------------------
    +     |              North               |
    +     ------------------------------------
    +     |      |                    |      |
    +     | West |       Center       | East |
    +     |      |                    |      |
    +     ------------------------------------
    +     |              South               |
    +     ------------------------------------
    + * </pre>
    + *
    + * Each region may hold no more than one widget, and for all but the
    + * Center region, the widget is optional.
    + *
    + * Widgets in the North and South regions need to have  The
    + * Center widget takes all available remaining space.
    + * 
    + * \if cpp
    + * This layout manager is applicable to WContainerWidget or
    + * Ext::Container container widgets. They use different properties from
    + * the widgets to determine the heights for the border panes:
    + *
    + *  - When used with an Ext::Container, the North and South regions
    + *    need to have their height defined using
    + *    WWidget::resize(), and likewise, widgets in the West ad East
    + *    regions need their width defined.
    + *  - When used with a WContainerWidget, the widget minimum sizes are
    + *    used for sizing the border widgets, whose default values may be
    + *    overridden using WWidget::setMinimumSize(). You may not define any
    + *    padding for the container widget. Instead, use setContentsMargins().
    + * \elseif java
    + * When used with a WContainerWidget, the widget minimum sizes are
    + * used for sizing the border widgets, whose default values may be
    + * overridden using WWidget::setMinimumSize(). You may not define any
    + * padding for the container widget. Instead, use setContentsMargins().
    + * \endif
    + * 
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
    + * Wt::WBorderLayout *layout = new Wt::WBorderLayout();
    + * layout->addWidget(new Wt::WText("West-side is best"), Wt::West);
    + * layout->addWidget(new Wt::WText("East-side is best"), Wt::East);
    + * layout->addWidget(contents, Wt::Center);
    + *
    + * // use layout but do not justify vertically
    + * w->setLayout(layout, Wt::AlignTop | Wt::AlignJustify);
    + * \endcode
    + * \endif
    + *
    + * \note When used on a WContainerWidget, this layout manager accepts the
    + *       following hints (see setLayoutHint()):
    + *  <ul>
    + *     <li>"table-layout" with possible values "auto" (default) or "fixed".<br>
    + *       Use "fixed" to prevent nested tables from overflowing the layout.
    + *       In that case, you will need to specify a width (in CSS or otherwise)
    + *       for at least one item in every column that has no stretch factor.</li>
    + *  </ul>
    + *
    + * \warning You should specify AlignTop in the alignment flags of
    + *          WContainerWidget::setLayout() if the container does not have a
    + *          height that is constrained somehow. Otherwise the behavior is
    + *          undefined (the parent container will continue to increase in size)
    + */
    +class WT_API WBorderLayout : public WLayout
    +{
    +public:
    +  /*! \brief Enumeration of possible positions in the layout.
    +   */
    +  enum Position {
    +    North,  //!< North (top)
    +    East,   //!< East (right)
    +    South,  //!< South (bottom)
    +    West,   //!< West (left)
    +    Center  //!< Center
    +  };
    +
    +  /*! \brief Creates a new border layout.
    +   */
    +  WBorderLayout(WWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WBorderLayout();
    +
    +  /*! \brief Sets spacing between each item.
    +   *
    +   * The default spacing is 6 pixels.
    +   */
    +  void setSpacing(int size);
    +
    +  /*! \brief Returns the spacing between each item.
    +   *
    +   * \sa setSpacing()
    +   */
    +  int spacing() const { return grid_.horizontalSpacing_; }
    +
    +  virtual void addItem(WLayoutItem *item);
    +  virtual void removeItem(WLayoutItem *item);
    +  virtual WLayoutItem *itemAt(int index) const;
    +  virtual int count() const;
    +
    +  /*! \brief Adds a widget to the given position.
    +   *
    +   * Only one widget per position is supported.
    +   *
    +   * \sa add(WLayoutItem *, Position)
    +   */
    +  void addWidget(WWidget *widget, Position position);
    +
    +  /*! \brief Adds a layout item to the given position.
    +   *
    +   * Only one widget per position is supported.
    +   */
    +  void add(WLayoutItem *item, Position position);
    +
    +  /*! \brief Returns the widget at a position.
    +   *
    +   * Returns \c 0 if no widget was set for that position.
    +   */
    +  WWidget *widgetAt(Position position) const;
    +
    +  /*! \brief Returns the item at a position.
    +   *
    +   * Returns \c 0 if no item was set for that position.
    +   */
    +  WLayoutItem *itemAt(Position position) const;
    +
    +  /*! \brief Returns the position at which the given layout item is set.
    +   */
    +  Position position(WLayoutItem *item) const;
    +
    +  Impl::Grid& grid() { return grid_; }
    +
    +private:
    +  Impl::Grid grid_;
    +
    +  const Impl::Grid::Item& itemAtPosition(Position position) const;
    +
    +  Impl::Grid::Item& itemAtPosition(Position position);
    +};
    +
    +}
    +
    +#endif // WBORDER_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WBorderLayout.C b/wt-3.1.7a/src/Wt/WBorderLayout.C
    new file mode 100644
    index 0000000..f29b409
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBorderLayout.C
    @@ -0,0 +1,163 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WBorderLayout"
    +#include "Wt/WWidgetItem"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WBorderLayout::WBorderLayout(WWidget *parent)
    +  : WLayout()
    +{
    +  grid_.columns_.insert(grid_.columns_.begin(), 3, Impl::Grid::Column(0));
    +  grid_.columns_[1].stretch_ = 1;
    +
    +  grid_.rows_.insert(grid_.rows_.begin(), 3, Impl::Grid::Row(0));
    +  grid_.rows_[1].stretch_ = 1;
    +
    +#ifndef WT_TARGET_JAVA
    +  grid_.items_.insert(grid_.items_.begin(), 3,
    +		      std::vector<Impl::Grid::Item>(3));
    +#else
    +  grid_.items_.insert(grid_.items_.begin(), 3, std::vector<Impl::Grid::Item>());
    +  for (unsigned i = 0; i < 3; ++i) {
    +    std::vector<Impl::Grid::Item>& items = grid_.items_[i];
    +    items.insert(items.begin(), 3, Impl::Grid::Item());
    +  }
    +#endif // WT_TARGET_JAVA
    +
    +  grid_.items_[0][0].colSpan_ = 3;
    +  grid_.items_[2][0].colSpan_ = 3;
    +
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +WBorderLayout::~WBorderLayout()
    +{ }
    +
    +void WBorderLayout::setSpacing(int size)
    +{
    +  grid_.horizontalSpacing_ = size;
    +  grid_.verticalSpacing_ = size;
    +}
    +
    +void WBorderLayout::addItem(WLayoutItem *item)
    +{
    +  add(item, Center);
    +}
    +
    +WLayoutItem *WBorderLayout::itemAt(int index) const
    +{
    +  int j = 0;
    +  for (int i = 0; i < 5; ++i) {
    +    WLayoutItem *it = itemAtPosition((Position)i).item_;
    +    if (it) {
    +      if (j == index)
    +	return it;
    +      else
    +	++j;
    +    }
    +  }
    +
    +  return 0;
    +}
    +
    +int WBorderLayout::count() const
    +{
    +  int j = 0;
    +  for (int i = 0; i < 5; ++i)
    +    if (itemAtPosition((Position)i).item_)
    +      ++j;
    +
    +  return j;
    +}
    +
    +Impl::Grid::Item& WBorderLayout::itemAtPosition(Position position)
    +{
    +  switch (position) {
    +  case North: return grid_.items_[0][0];
    +  case East: return grid_.items_[1][2];
    +  case South: return grid_.items_[2][0];
    +  case West: return grid_.items_[1][0];
    +  case Center: return grid_.items_[1][1];
    +  default:
    +    throw WtException("WBorderLayout::itemAtPosition(): invalid position");
    +  }
    +}
    +
    +const Impl::Grid::Item& WBorderLayout::itemAtPosition(Position position) const
    +{
    +  switch (position) {
    +  case North: return grid_.items_[0][0];
    +  case East: return grid_.items_[1][2];
    +  case South: return grid_.items_[2][0];
    +  case West: return grid_.items_[1][0];
    +  case Center: return grid_.items_[1][1];
    +  default:
    +    throw WtException("WBorderLayout::itemAtPosition(): invalid position");
    +  }
    +}
    +
    +void WBorderLayout::addWidget(WWidget *w, Position position)
    +{
    +  add(new WWidgetItem(w), position);
    +}
    +
    +WWidget *WBorderLayout::widgetAt(Position position) const
    +{
    +  WWidgetItem *item = dynamic_cast<WWidgetItem *>(itemAt(position));
    +  
    +  if (item)
    +    return item->widget();
    +  else
    +    return 0;
    +}
    +
    +void WBorderLayout::add(WLayoutItem *item, Position position)
    +{
    +  if (itemAtPosition(position).item_)
    +    throw WtException("WBorderLayout supports only one widget per position");
    +
    +  itemAtPosition(position).item_ = item;
    +  updateAddItem(item);
    +}
    +
    +WLayoutItem *WBorderLayout::itemAt(Position position) const
    +{
    +  const Impl::Grid::Item& gridItem = itemAtPosition(position);
    +
    +  return gridItem.item_;
    +}
    +
    +void WBorderLayout::removeItem(WLayoutItem *item)
    +{
    +  for (int i = 0; i < 5; ++i) {
    +    Impl::Grid::Item& gridItem = itemAtPosition((Position)i);
    +    if (gridItem.item_ == item) {
    +      gridItem.item_ = 0;
    +
    +      updateRemoveItem(item);
    +
    +      break;
    +    }
    +  }
    +}
    +
    +WBorderLayout::Position WBorderLayout::position(WLayoutItem *item) const
    +{
    +  for (int i = 0; i < 5; ++i) {
    +    if (itemAtPosition((Position)i).item_ == item) {
    +      return (Position)i;
    +    }
    +  }
    +
    +  throw WtException("WBorderLayout::position(): invalid item");
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBoxLayout b/wt-3.1.7a/src/Wt/WBoxLayout
    new file mode 100644
    index 0000000..a870aef
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBoxLayout
    @@ -0,0 +1,313 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBOX_LAYOUT_H_
    +#define WBOX_LAYOUT_H_
    +
    +#include <Wt/WGridLayout>
    +
    +namespace Wt {
    +
    +/*! \class WBoxLayout Wt/WBoxLayout Wt/WBoxLayout
    + *  \brief A layout manager which arranges widgets horizontally or vertically
    + *
    + * This layout manager arranges widgets horizontally or vertically
    + * inside the parent container. The space is divided so that each
    + * widgets is given its minimum size, and remaining space is divided
    + * according to stretch factors among the widgets. The widget minimum
    + * height or width is used for sizing each widget, whose default
    + * values may be overridden using WWidget::setMinimumSize().
    + *
    + * If you want to use the layout manager for a container which does
    + * not have a height that is constrained somehow, you need to specify
    + * AlignTop in the alignment flags of
    + * WContainerWidget::setLayout(). Otherwise the behavior is undefined
    + * (the parent container will continue to increase in size as it tries
    + * to satisfy the constraints assuming a contrained height).
    + * 
    + * You can use \link WContainerWidget::setOverflow()
    + * WContainerWidget::setOverflow(OverflowAuto) \endlink or use a
    + * WScrollArea to automatically show scrollbars on a widget inserted
    + * in the layout.
    + *
    + * A caveat with layout managers is that you cannot reliably use a
    + * stylesheet to add borders (or margin) to a widget inserted in a
    + * layout: this is broken on Internet Explorer. To provide the layout,
    + * the layout manager needs to set sizes on the contained widget but
    + * these sizes also need to take into account the border/margin
    + * width. Since on IE, this value will be 0 if the border or margin is
    + * provided by a stylesheet (as opposed to by inline CSS by using
    + * WWidget::decorationStyle()), the result will be wrong behaviour
    + * like widgets that keep growing in size.
    + *
    + * A layout manager may provide resize handles between items which
    + * allow the user to change the automatic layout provided by the
    + * layout manager (see setResizable()). Resize handles between rows
    + * for a vertically oriented box layout only work when the layout
    + * fills the parent vertical space (i.e. is not aligned to the
    + * top). Likewise, resize handles between columns for a horizontally
    + * oriented box layout only work when the layout fills the parent
    + * horiziontal space (i.e. is not aligned left, right or centered).
    + *
    + * Each item is separated using a constant spacing, which defaults to
    + * 6 pixels, and can be changed using setSpacing(). In addition, when
    + * this layout is a top-level layout (i.e. is not nested inside
    + * another layout), a margin is set around the contents, which thus
    + * replaces padding defined for the container. This margin defaults to
    + * 9 pixels, and can be changed using setContentsMargins(). It is not
    + * allowed to define padding for the container widget using its CSS
    + * 'padding' property or the WContainerWidget::setPadding(). You can
    + * add more space between two widgets using addSpacing().
    + *
    + * For each item a stretch factor may be defined, which controls how
    + * remaining space is used. Each item is stretched using the stretch
    + * factor to fill the remaining space.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
    + * w->resize(WLength(), 600);
    + *
    + * Wt::WBoxLayout *layout = new Wt::WBoxLayout(Wt::WBoxLayout::TopToBottom);
    + * layout->addWidget(new Wt::WText("One"));
    + * layout->addWidget(new Wt::WText("Two"));
    + * layout->addWidget(new Wt::WText("Three"));
    + * layout->addWidget(new Wt::WText("Four"));
    + *
    + * w->setLayout(layout);
    + * \endcode
    + * \endif
    + *
    + * \if cpp
    + * \note This layout manager is applicable only to WContainerWidget
    + * container widgets. You may use it within an Ext::Container
    + * indirectly by first setting a WContainerWidget using a WFitLayout.
    + * \endif
    + *
    + * \note When JavaScript support is not available, only Safari and
    + * Firefox properly implement this box layout. For other browsers,
    + * only the horizontal layout is properly implemented, while
    + * vertically all widgets use their minimum size.
    + *
    + * \note When set on a WContainerWidget, this layout manager accepts the
    + *       following hints (see setLayoutHint()):
    + *   <ul>
    + *     <li>"table-layout" with possible values "auto" (default) or "fixed".<br>
    + *       Use "fixed" to prevent nested tables from overflowing the layout.
    + *       In that case, you will need to specify a width (in CSS or otherwise)
    + *       for at least one item in every column that has no stretch factor.</li>
    + *  </ul>
    + */
    +class WT_API WBoxLayout : public WLayout
    +{
    +public:
    +  /*! \brief Enumeration of the direction in which widgets are layed out.
    +   */
    +  enum Direction {
    +    LeftToRight, //!< Horizontal layout, widgets are arranged from left to right
    +    RightToLeft, //!< Horizontal layout, widgets are arranged from right to left
    +    TopToBottom, //!< Vertical layout, widgets are arranged from top to bottom
    +    BottomToTop  //!< Vertical layout, widgets are arranged from bottom to top
    +  };
    +
    +  /*! \brief Creates a new box layout.
    +   *
    +   * This constructor is rarely used. Instead, use the convenient
    +   * constructors of the specialized WHBoxLayout or WVBoxLayout classes.
    +   *
    +   * Use \p parent = \c 0 to created a layout manager that can be
    +   * nested inside other layout managers.
    +   */
    +  WBoxLayout(Direction dir, WWidget *parent = 0);
    +
    +  virtual void addItem(WLayoutItem *item);
    +  virtual void removeItem(WLayoutItem *item);
    +  virtual WLayoutItem *itemAt(int index) const;
    +  virtual int count() const;
    +
    +  /*! \brief Sets the layout direction.
    +   *
    +   * \sa direction()
    +   */
    +  void setDirection(Direction direction);
    +
    +  /*! \brief Returns the layout direction.
    +   *
    +   * \sa setDirection()
    +   */
    +  Direction direction() const { return direction_; }
    +
    +  /*! \brief Sets spacing between each item.
    +   *
    +   * The default spacing is 6 pixels.
    +   */
    +  void setSpacing(int size);
    +
    +  /*! \brief Returns the spacing between each item.
    +   *
    +   * \sa setSpacing()
    +   */
    +  int spacing() const { return grid_.horizontalSpacing_; }
    +
    +  /*! \brief Adds a widget to the layout.
    +   *
    +   * Adds a widget to the layout, with given \p stretch factor. When
    +   * the stretch factor is 0, the widget will not be resized by the
    +   * layout manager (stretched to take excess space). You may use a
    +   * special stretch factor of -1 to indicate that the widget should
    +   * not take excess space but the contents height should still be
    +   * actively managed. This may make sense for example if the widget
    +   * is \link WWidget::setLayoutSizeAware() layout size
    +   * aware\endlink).
    +   *
    +   * The \p alignemnt parameter is a combination of a horizontal
    +   * and/or a vertical AlignmentFlag OR'ed together.
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire column or row. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addLayout(), insertWidget()
    +   */
    +  void addWidget(WWidget *widget, int stretch = 0,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds a nested layout to the layout.
    +   *
    +   * Adds a nested layout, with given \p stretch factor.
    +   *
    +   * \sa addWidget(WWidget *, int, WFlags<AlignmentFlag>), insertLayout()
    +   */
    +  void addLayout(WLayout *layout, int stretch = 0,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds extra spacing.
    +   *
    +   * Adds extra spacing to the layout.
    +   *
    +   * \sa addStretch(), insertStretch()
    +   */
    +  void addSpacing(const WLength& size);
    +
    +  /*! \brief Adds a stretch element.
    +   *
    +   * Adds a stretch element to the layout. This adds an empty space
    +   * that stretches as needed.
    +   *
    +   * \sa addSpacing(), insertStretch()
    +   */
    +  void addStretch(int stretch = 0);
    +
    +  /*! \brief Inserts a widget in the layout.
    +   *
    +   * Inserts a widget in the layout at position \p index, with given
    +   * \p stretch factor. When the stretch factor is 0, the widget will
    +   * not be resized by the layout manager (stretched to take excess
    +   * space). You may use a special stretch factor of -1 to indicate
    +   * that the widget should not take excess space but the contents
    +   * height should still be actively managed. This may make sense for
    +   * example if the widget is \link WWidget::setLayoutSizeAware()
    +   * layout size aware\endlink).
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire column or row. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa insertLayout(), addWidget(WWidget *, int, WFlags<AlignmentFlag>)
    +   */
    +  void insertWidget(int index, WWidget *widget, int stretch = 0,
    +		    WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Inserts a nested layout in the layout.
    +   *
    +   * Inserts a nested layout in the layout at position\p index,
    +   * with given \p stretch factor.
    +   *
    +   * \sa insertWidget(), addLayout()
    +   */
    +  void insertLayout(int index, WLayout *layout, int stretch = 0,
    +		    WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Inserts extra spacing in the layout.
    +   *
    +   * Inserts extra spacing in the layout at position \p index.
    +   *
    +   * \sa insertStretch(), addSpacing()
    +   */
    +  void insertSpacing(int index, const WLength& size);
    +
    +  /*! \brief Inserts a stretch element in the layout.
    +   *
    +   * Inserts a stretch element in the layout at position
    +   * \p index. This adds an empty space that stretches as needed.
    +   *
    +   * \sa insertSpacing(), addStretch()
    +   */
    +  void insertStretch(int index, int stretch = 0);
    +
    +  /*! \brief Sets the stretch factor for a nested layout.
    +   *
    +   * The \p layout must have previously been added to this layout
    +   * using insertLayout() or addLayout().
    +   *
    +   * Returns whether the \p stretch could be set.
    +   */
    +  bool setStretchFactor(WLayout *layout, int stretch);
    +
    +  /*! \brief Sets the stretch factor for a widget.
    +   *
    +   * The \p widget must have previously been added to this layout
    +   * using insertWidget() or addWidget().
    +   *
    +   * Returns whether the \p stretch could be set.
    +   */
    +  bool setStretchFactor(WWidget *widget, int stretch);
    +
    +  /*! \brief Sets whether the use may drag a particular border.
    +   *
    +   * This method sets whether the border that separates item
    +   * <i>index</i> from the next item may be resized by the user,
    +   * depending on the value of <i>enabled</i>.
    +   *
    +   * The default value is <i>false</i>.
    +   */
    +  void setResizable(int index, bool enabled = true);
    +
    +  /*! \brief Returns whether the user may drag a particular border.
    +   *
    +   * This method returns whether the border that separates item
    +   * <i>index</i> from the next item may be resized by the user.
    +   *
    +   * \sa setResizable()
    +   */
    +  bool isResizable(int index) const;
    +
    +  Impl::Grid& grid() { return grid_; }
    +
    +protected:
    +  void insertItem(int index, WLayoutItem *item, int stretch,
    +		  WFlags<AlignmentFlag> alignment);
    +
    +private:
    +  Direction  direction_;
    +  Impl::Grid grid_;
    +
    +  void setStretchFactor(int index, int stretch);
    +  WWidget *createSpacer(const WLength& size);
    +};
    +
    +}
    +
    +#endif // WBOX_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WBoxLayout.C b/wt-3.1.7a/src/Wt/WBoxLayout.C
    new file mode 100644
    index 0000000..e724c48
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBoxLayout.C
    @@ -0,0 +1,268 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "DomElement.h"
    +
    +#include "Wt/WBoxLayout"
    +#include "Wt/WWebWidget"
    +#include "Wt/WWidgetItem"
    +
    +namespace {
    +  class Spacer : public Wt::WWebWidget
    +  {
    +  public:
    +    Spacer() { setInline(false); }
    +
    +  protected:
    +    virtual Wt::DomElementType domElementType() const {
    +      return Wt::DomElement_DIV;
    +    }
    +  };
    +}
    +
    +namespace Wt {
    +
    +WBoxLayout::WBoxLayout(Direction dir, WWidget *parent)
    +  : WLayout(),
    +    direction_(dir)
    +{
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +void WBoxLayout::addItem(WLayoutItem *item)
    +{
    +  insertItem(count(), item, 0, 0);
    +}
    +
    +void WBoxLayout::removeItem(WLayoutItem *item)
    +{
    +  int index = indexOf(item);
    +
    +  if (index != -1) {
    +    switch (direction_) {
    +    case RightToLeft:
    +      index = grid_.columns_.size() - 1 - index;
    +    case LeftToRight:
    +      grid_.columns_.erase(grid_.columns_.begin() + index);
    +      grid_.items_[0].erase(grid_.items_[0].begin() + index);
    +      break;
    +    case BottomToTop:
    +      index = grid_.rows_.size() - 1 - index;
    +    case TopToBottom:
    +      grid_.rows_.erase(grid_.rows_.begin() + index);
    +      grid_.items_.erase(grid_.items_.begin() + index);
    +    }
    +
    +    updateRemoveItem(item);
    +  }
    +}
    +
    +WLayoutItem *WBoxLayout::itemAt(int index) const
    +{
    +  switch (direction_) {
    +  case RightToLeft:
    +    index = grid_.columns_.size() - 1 - index;    
    +  case LeftToRight:
    +    return grid_.items_[0][index].item_;
    +  case BottomToTop:
    +    index = grid_.rows_.size() - 1 - index;
    +  case TopToBottom:
    +    return grid_.items_[index][0].item_;
    +  }
    +
    +  assert(false);
    +  return 0;
    +}
    +
    +int WBoxLayout::count() const
    +{
    +  return grid_.rows_.size() * grid_.columns_.size();
    +}
    +
    +void WBoxLayout::setDirection(Direction direction)
    +{
    +  if (direction_ != direction) {
    +    direction_ = direction;
    +
    +    // FIXME: modify the grid
    +  }
    +}
    +
    +void WBoxLayout::setSpacing(int size)
    +{
    +  grid_.horizontalSpacing_ = size;
    +  grid_.verticalSpacing_ = size;
    +}
    +
    +void WBoxLayout::addWidget(WWidget *widget, int stretch,
    +			   WFlags<AlignmentFlag> alignment)
    +{
    +  insertWidget(count(), widget, stretch, alignment);
    +}
    +
    +void WBoxLayout::addLayout(WLayout *layout, int stretch,
    +			   WFlags<AlignmentFlag> alignment)
    +{
    +  insertLayout(count(), layout, stretch, alignment);
    +}
    +
    +void WBoxLayout::addSpacing(const WLength& size)
    +{
    +  insertSpacing(count(), size);
    +}
    +
    +void WBoxLayout::addStretch(int stretch)
    +{
    +  insertStretch(count(), stretch);
    +}
    +
    +void WBoxLayout::insertWidget(int index, WWidget *widget, int stretch,
    +			      WFlags<AlignmentFlag> alignment)
    +{
    +  if (widget->layoutSizeAware() && stretch == 0)
    +    stretch = -1;
    +
    +  insertItem(index, new WWidgetItem(widget), stretch, alignment);
    +}
    +
    +void WBoxLayout::insertLayout(int index, WLayout *layout, int stretch,
    +			      WFlags<AlignmentFlag> alignment)
    +{
    +  insertItem(index, layout, stretch, alignment);
    +}
    +
    +void WBoxLayout::insertSpacing(int index, const WLength& size)
    +{
    +  WWidget *spacer = createSpacer(size);
    +  insertItem(index, new WWidgetItem(spacer), 0, 0);
    +}
    +
    +void WBoxLayout::insertStretch(int index, int stretch)
    +{
    +  WWidget *spacer = createSpacer(WLength(0));
    +  insertItem(index, new WWidgetItem(spacer), stretch, 0);
    +}
    +
    +bool WBoxLayout::setStretchFactor(WWidget *widget, int stretch)
    +{
    +  for (int i = 0; i < count(); ++i) {
    +    WLayoutItem *item = itemAt(i);
    +    if (item && item->widget() == widget) {
    +      setStretchFactor(i, stretch);
    +
    +      return true;
    +    }
    +  }
    +
    +  return false;
    +}
    +
    +bool WBoxLayout::setStretchFactor(WLayout *layout, int stretch)
    +{
    +  for (int i = 0; i < count(); ++i) {
    +    WLayoutItem *item = itemAt(i);
    +    if (item && item->layout() == layout) {
    +      setStretchFactor(i, stretch);
    +
    +      return true;
    +    }
    +  }
    +
    +  return false;
    +}
    +
    +void WBoxLayout::setStretchFactor(int i, int stretch)
    +{
    +  switch (direction_) {
    +  case RightToLeft:
    +    i = grid_.columns_.size() - 1 - i;
    +  case LeftToRight:
    +    grid_.columns_[i].stretch_ = stretch;
    +    break;
    +  case BottomToTop:
    +    i = grid_.rows_.size() - 1 - i;
    +  case TopToBottom:
    +    grid_.rows_[i].stretch_ = stretch;
    +  }
    +}
    +
    +void WBoxLayout::insertItem(int index, WLayoutItem *item, int stretch,
    +			    WFlags<AlignmentFlag> alignment)
    +{
    +  switch (direction_) {
    +  case RightToLeft:
    +    index = grid_.columns_.size() - index;
    +  case LeftToRight:
    +    grid_.columns_.insert(grid_.columns_.begin() + index,
    +			  Impl::Grid::Column(stretch));
    +    if (grid_.items_.empty()) {
    +      grid_.items_.push_back(std::vector<Impl::Grid::Item>());
    +      grid_.rows_.push_back(Impl::Grid::Row());
    +      grid_.rows_[0].stretch_ = -1; // make height managed
    +    }
    +    grid_.items_[0].insert(grid_.items_[0].begin() + index,
    +			   Impl::Grid::Item(item, alignment));
    +    break;
    +  case BottomToTop:
    +    index = grid_.rows_.size() - index;
    +  case TopToBottom:
    +    if (grid_.columns_.empty())
    +      grid_.columns_.push_back(Impl::Grid::Column());
    +    grid_.rows_.insert(grid_.rows_.begin() + index,
    +		       Impl::Grid::Row(stretch));
    +    grid_.items_.insert(grid_.items_.begin() + index,
    +			std::vector<Impl::Grid::Item>());
    +    grid_.items_[index].push_back(Impl::Grid::Item(item, alignment));
    +    break;
    +  }
    +
    +  updateAddItem(item);
    +}
    +
    +WWidget *WBoxLayout::createSpacer(const WLength& size)
    +{
    +  Spacer *spacer = new Spacer();
    +  if (direction_ == LeftToRight || direction_ == RightToLeft)
    +    spacer->setMinimumSize(size, WLength::Auto);
    +  else
    +    spacer->setMinimumSize(WLength::Auto, size);
    +
    +  return spacer;
    +}
    +
    +void WBoxLayout::setResizable(int index, bool enabled)
    +{
    +  switch (direction_) {
    +  case RightToLeft:
    +    index = grid_.columns_.size() - 1 - index;
    +  case LeftToRight:
    +    grid_.columns_[index].resizable_ = enabled;
    +    break;
    +  case BottomToTop:
    +    index = grid_.rows_.size() - 1 - index;
    +  case TopToBottom:
    +    grid_.rows_[index].resizable_ = enabled;
    +  }
    +}
    +
    +bool WBoxLayout::isResizable(int index) const
    +{
    +  switch (direction_) {
    +  case RightToLeft:
    +    index = grid_.columns_.size() - 1 - index;
    +  case LeftToRight:
    +    return grid_.columns_[index].resizable_;
    +  case BottomToTop:
    +    index = grid_.rows_.size() - 1 - index;
    +  case TopToBottom:
    +    return grid_.rows_[index].resizable_;
    +  }
    +
    +  return false;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBreak b/wt-3.1.7a/src/Wt/WBreak
    new file mode 100644
    index 0000000..acf400a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBreak
    @@ -0,0 +1,38 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBREAK_H_
    +#define WBREAK_H_
    +
    +#include <Wt/WWebWidget>
    +
    +namespace Wt {
    +
    +/*! \class WBreak Wt/WBreak Wt/WBreak
    + *  \brief A widget that provides a line break between inline widgets.
    + *
    + * This is an \link WWidget::setInline(bool) inline \endlink widget
    + * that provides a line break inbetween its sibling widgets (such as WText).
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;br /&gt;</tt> tag and
    + * does not provide styling. Styling through CSS is not applicable.
    + */
    +class WT_API WBreak : public WWebWidget
    +{
    +public:
    +  /*! \brief Construct a line break.
    +   */
    +  WBreak(WContainerWidget *parent = 0);
    +
    +protected:
    +  virtual DomElementType domElementType() const;
    +};
    +
    +}
    +
    +#endif // WBREAK_H_
    diff --git a/wt-3.1.7a/src/Wt/WBreak.C b/wt-3.1.7a/src/Wt/WBreak.C
    new file mode 100644
    index 0000000..8ba7748
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBreak.C
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WBreak"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WBreak::WBreak(WContainerWidget *parent)
    +  : WWebWidget(parent)
    +{ }
    +
    +DomElementType WBreak::domElementType() const
    +{
    +  return DomElement_BR;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WBrush b/wt-3.1.7a/src/Wt/WBrush
    new file mode 100644
    index 0000000..0bc7e6c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBrush
    @@ -0,0 +1,103 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBRUSH_H_
    +#define WBRUSH_H_
    +
    +#include <Wt/WColor>
    +
    +namespace Wt {
    +
    +/*! \class WBrush Wt/WBrush Wt/WBrush
    + *  \brief Class that defines the style for filling areas
    + *
    + * A brush defines the properties of how areas (the interior of
    + * shapes) are filled. A brush is defined using a color and a fill
    + * type (currently only solid fills are supported).
    + *
    + * \sa WPainter::setBrush(), WPen
    + *
    + * \ingroup painting
    + */
    +class WT_API WBrush
    +{
    +public:
    +  /*! \brief Creates a brush.
    +   *
    +   * Creates a brush with a \link Wt::NoBrush NoBrush\endlink fill style.
    +   */
    +  WBrush();
    +
    +  /*! \brief Creates a black brush with given style.
    +   *
    +   * Creates a black brush with the indicated \p style.
    +   */
    +  WBrush(WBrushStyle style);
    +
    +  /*! \brief Creates a solid brush of a given color.
    +   *
    +   * Creates a solid brush with the indicated \p color.
    +   */
    +  WBrush(const WColor& color);
    +
    +  /*! \brief Creates a solid brush with a particular standard color.
    +   *
    +   * Creates a solid brush with the indicated \p color.
    +   */
    +  WBrush(GlobalColor color);
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Clone method.
    +   *
    +   * Clones this WBrush object.
    +   */
    +  WBrush clone() const;
    +#endif
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the brushes are exactly the same.
    +   */
    +  bool operator==(const WBrush& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the brushes are different.
    +   */
    +  bool operator!=(const WBrush& other) const;
    +
    +  /*! \brief Sets the brush style.
    +   *
    +   * \sa style()
    +   */
    +  void setStyle(WBrushStyle style);
    +
    +  /*! \brief Returns the fill style.
    +   *
    +   * \sa setStyle(WBrushStyle)
    +   */
    +  WBrushStyle style() const { return style_; }
    +
    +  /*! \brief Sets the brush color.
    +   *
    +   * \sa color()
    +   */
    +  void setColor(const WColor& color);
    +
    +  /*! \brief Returns the brush color.
    +   *
    +   * \sa color()
    +   */
    +  const WColor& color() const { return color_; }
    +
    +private:
    +  WBrushStyle style_;
    +  WColor      color_;
    +};
    +
    +}
    +
    +#endif // WBRUSH_H_
    diff --git a/wt-3.1.7a/src/Wt/WBrush.C b/wt-3.1.7a/src/Wt/WBrush.C
    new file mode 100644
    index 0000000..4cb66f8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WBrush.C
    @@ -0,0 +1,63 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WBrush"
    +
    +namespace Wt {
    +
    +WBrush::WBrush()
    +  : style_(NoBrush),
    +    color_(black)
    +{ }
    +
    +WBrush::WBrush(WBrushStyle style)
    +  : style_(style),
    +    color_(black)
    +{ }
    +
    +WBrush::WBrush(const WColor& color)
    +  : style_(SolidPattern),
    +    color_(color)
    +{ }
    +
    +WBrush::WBrush(GlobalColor color)
    +  : style_(SolidPattern),
    +    color_(color)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WBrush WBrush::clone() const
    +{
    +  WBrush result;
    +  result.color_ = color_;
    +  result.style_ = style_;
    +  return result;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WBrush::setColor(const WColor& color)
    +{
    +  color_ = color;
    +}
    +
    +void WBrush::setStyle(WBrushStyle style)
    +{
    +  style_ = style;
    +}
    +
    +bool WBrush::operator==(const WBrush& other) const
    +{
    +  return
    +       color_ == other.color_
    +    && style_ == other.style_;
    +}
    +
    +bool WBrush::operator!=(const WBrush& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WButtonGroup b/wt-3.1.7a/src/Wt/WButtonGroup
    new file mode 100644
    index 0000000..8b98b53
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WButtonGroup
    @@ -0,0 +1,217 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBUTTONGROUP_H_
    +#define WBUTTONGROUP_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WSignal>
    +
    +namespace Wt {
    +
    +class WRadioButton;
    +
    +  namespace Ext {
    +    class RadioButton;
    +  }
    +
    +/*! \class WButtonGroup Wt/WButtonGroup Wt/WButtonGroup
    + *  \brief A class for grouping radio buttons logically together.
    + *
    + * A button group manages a set of \link WRadioButton radio
    + * buttons\endlink, making them exclusive of each other.
    + *
    + * It is not a widget, but instead provides only a logical
    + * grouping. Radio buttons are aware of the group in which they have
    + * been added, see WRadioButton::group(). When a button is deleted, it
    + * is automatically removed its button group.
    + *
    + * It allows you to associate id's with each button, which you may use
    + * to identify a particular button. The special value of -1 is
    + * reserved to indicate <i>no button</i>.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
    + *
    + * // use a group box as widget container for 3 radio buttons, with a title
    + * Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
    + *
    + * // use a button group to logically group the 3 options
    + * Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
    + *
    + * Wt::WRadioButton *button;
    + * button = new Wt::WRadioButton("I voted Republican", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Republican);
    +
    + * button = new Wt::WRadioButton("I voted Democrat", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Democrate);
    +
    + * button = new Wt::WRadioButton("I didn't vote", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, NoVote);
    + *
    + * group->setCheckedButton(group->button(NoVote));
    + * \endcode
    + * \endif
    + *
    + * \if cpp
    + * \sa WRadioButton, Ext::RadioButton
    + * \elseif java
    + * \sa WRadioButton
    + * \endif
    + */
    +class WT_API WButtonGroup : public WObject
    +{
    +public:
    +  /*! \brief Creates a new empty button group.
    +   */
    +  WButtonGroup(WObject* parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * This does not delete the radio buttons, but simply removes them
    +   * from the group.
    +   */
    +  ~WButtonGroup();
    +
    +  /*! \brief Adds a radio button to the group.
    +   *
    +   * You can assign an id to the button. If \p id is -1, then a
    +   * unique id will be generated.
    +   *
    +   * \sa removeButton(WRadioButton *)
    +   */
    +  void addButton(WRadioButton *button, int id = -1);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Adds a radio button to the group.
    +   *
    +   * You can assign an id to the button. If \p id is -1, then a
    +   * unique id will be generated.
    +   *
    +   * \sa removeButton(Ext::RadioButton *)
    +   */
    +  void addButton(Ext::RadioButton *button, int id = -1);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Removes a radio button from the group.
    +   *
    +   * \sa addButton(WRadioButton *, int)
    +   */
    +  void removeButton(WRadioButton *button);
    +
    +  /*! \brief Removes a radio button from the group.
    +   *
    +   * \if cpp
    +   * \sa addButton(Ext::RadioButton *, int)
    +   * \endif
    +   */
    +  void removeButton(Ext::RadioButton *button);
    +
    +  /*! \brief Returns the button for the given id.
    +   *
    +   * \sa id(), addButton()
    +   */
    +  WRadioButton *button(int id) const;
    +
    +  /*! \brief Returns the id for the given button.
    +   *
    +   * \sa button(), addButton()
    +   */
    +  int id(WRadioButton *button) const;
    +
    +  virtual const std::string id() const { return WObject::id(); }
    +
    +  /*! \brief Returns the buttons in this group.
    +   */
    +  std::vector<WRadioButton *> buttons() const;
    +
    +  /*! \brief Returns the number of radiobuttons in this group.
    +   */
    +  int count() const;
    +
    +  /*! \brief Returns the id of the checked button.
    +   *
    +   * Returns the id of the currently checked button, or -1 if no button
    +   * is currently checked.
    +   */
    +  int checkedId() const;
    +
    +  /*! \brief Sets the currently checked radiobutton.
    +   *
    +   * The button \p button of this group is checked. A value of \c 0
    +   * will uncheck all radiobuttons.
    +   *
    +   * Initially, no button is checked.
    +   *
    +   * \sa checkedId()
    +   */
    +  void setCheckedButton(WRadioButton *button);
    +
    +  /*! \brief Returns the checked radiobutton.
    +   *
    +   * If there is no radiobutton currently checked this function
    +   * returns \c 0.
    +   *
    +   * \sa setCheckedButton(), selectedButtonIndex()
    +   */
    +  WRadioButton* checkedButton() const;
    +
    +#ifndef WT_TARGET_JAVA
    +  WRadioButton* selectedButton() const; // deprecated
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Sets the currently checked radiobutton.
    +   *
    +   * Sets the \p idx'th radiobutton checked. A value of -1 will
    +   * uncheck all radiobuttons.
    +   *
    +   * Initially, no button is checked.
    +   */
    +  void setSelectedButtonIndex(int idx);
    +
    +  /*! \brief Returns the index of the checked radiobutton.
    +   *
    +   * The index reflects the order in which the buttons have been added
    +   * to the button group. Use checkedId() if you want to know the id
    +   * of the button that is currently checked. If there is no
    +   * radiobutton selected this function returns -1.
    +   *
    +   * \sa checkedId()
    +   */
    +  int selectedButtonIndex() const;
    +
    +  /*! \brief %Signal emitted when a button was checked.
    +   *
    +   * The argument passed is the new checkedButton().
    +   */
    +  Signal<WRadioButton *>& checkedChanged();
    +
    +private:
    +  struct Button {
    +    WRadioButton *button;
    +    int           id;
    +  };
    +
    +  std::vector<Button> buttons_;
    +  Signal<WRadioButton *> checkedChanged_;
    +  bool                   checkedChangedConnected_;
    +
    +  void uncheckOthers(WRadioButton *button);
    +  int  generateId() const;
    +  void onButtonChange();
    +  virtual void setFormData(const FormData& formData);
    +
    +  friend class WRadioButton;
    +};
    +
    +}
    +
    +#endif // WBUTTONGROUP_H_
    diff --git a/wt-3.1.7a/src/Wt/WButtonGroup.C b/wt-3.1.7a/src/Wt/WButtonGroup.C
    new file mode 100644
    index 0000000..c5d046e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WButtonGroup.C
    @@ -0,0 +1,182 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Utils.h"
    +
    +#include "Wt/WButtonGroup"
    +#include "Wt/WRadioButton"
    +
    +namespace Wt {
    +
    +WButtonGroup::WButtonGroup(WObject* parent)
    +  : WObject(parent),
    +    checkedChangedConnected_(false)
    +{ }
    +
    +WButtonGroup::~WButtonGroup()
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    buttons_[i].button->setGroup(0);
    +}
    +
    +void WButtonGroup::addButton(WRadioButton *button, int id)
    +{
    +  Button b;
    +  b.button = button;
    +  b.id = id != -1 ? id : generateId();
    +  buttons_.push_back(b);
    +
    +  button->setGroup(this);
    +
    +  if (checkedChangedConnected_)
    +    button->changed().connect(this, &WButtonGroup::onButtonChange);
    +}
    +
    +void WButtonGroup::removeButton(WRadioButton *button)
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    if (buttons_[i].button == button) {
    +      buttons_.erase(buttons_.begin() + i);
    +      button->setGroup(0);
    +      return;
    +    }
    +}
    +
    +WRadioButton *WButtonGroup::button(int id) const
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    if (buttons_[i].id == id)
    +      return buttons_[i].button;
    +
    +  return 0;
    +}
    +
    +int WButtonGroup::id(WRadioButton *button) const
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    if (buttons_[i].button == button)
    +      return buttons_[i].id;
    +
    +  return -1;
    +}
    +
    +std::vector<WRadioButton *> WButtonGroup::buttons() const
    +{
    +  std::vector<WRadioButton *> buttons;
    +
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    buttons.push_back(buttons_[i].button);
    +
    +  return buttons;
    +}
    +
    +int WButtonGroup::count() const
    +{
    +  return buttons_.size();
    +}
    +
    +int WButtonGroup::checkedId() const
    +{
    +  int idx = selectedButtonIndex();
    +
    +  return idx == -1 ? -1 : buttons_[idx].id;
    +}
    +
    +void WButtonGroup::setCheckedButton(WRadioButton *button)
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i) {
    +    WRadioButton *b = buttons_[i].button;
    +    if (b == button && !b->isChecked())
    +      b->setChecked(true);
    +    else if (b != button && b->isChecked())
    +      b->setChecked(false);
    +  }
    +}
    +
    +WRadioButton *WButtonGroup::checkedButton() const
    +{
    +  int idx = selectedButtonIndex();
    +
    +  return idx != -1 ? buttons_[idx].button : 0;
    +}
    +
    +void WButtonGroup::setSelectedButtonIndex(int idx)
    +{
    +  setCheckedButton(idx != -1 ? buttons_[idx].button : 0);
    +}
    +
    +int WButtonGroup::selectedButtonIndex() const
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    if (buttons_[i].button->isChecked())
    +      return i;
    +  return -1;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WRadioButton* WButtonGroup::selectedButton() const
    +{
    +  return checkedButton();
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WButtonGroup::setFormData(const FormData& formData)
    +{
    +  if (!Utils::isEmpty(formData.values)) {
    +    const std::string& value = formData.values[0];
    +
    +    for (unsigned i = 0; i < buttons_.size(); ++i) {
    +      if (value == buttons_[i].button->id()) {
    +	if (buttons_[i].button->stateChanged_)
    +	  return;
    +
    +	uncheckOthers(buttons_[i].button);
    +	buttons_[i].button->state_ = Checked;
    +
    +	return;
    +      }
    +    }
    +  } else {
    +    /*
    +     * none checked (form submit) or always for ajax. In any case
    +     * we don't do anything, since none checked can only be if
    +     * there were actually none checked to start with ?
    +     */
    +  }
    +}
    +
    +void WButtonGroup::uncheckOthers(WRadioButton *button)
    +{
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    if (buttons_[i].button != button)
    +      buttons_[i].button->state_ = Unchecked;
    +}
    +
    +int WButtonGroup::generateId() const
    +{
    +  int id = 0;
    +
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    id = std::max(buttons_[i].id + 1, id);
    +
    +  return id;
    +}
    +
    +Signal<WRadioButton *>& WButtonGroup::checkedChanged()
    +{
    +  checkedChangedConnected_ = true;
    +
    +  for (unsigned i = 0; i < buttons_.size(); ++i)
    +    buttons_[i].button->changed().connect(this, &WButtonGroup::onButtonChange);
    +
    +  return checkedChanged_;
    +}
    +
    +void WButtonGroup::onButtonChange()
    +{
    +  checkedChanged_.emit(checkedButton());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCalendar b/wt-3.1.7a/src/Wt/WCalendar
    new file mode 100644
    index 0000000..8d702be
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCalendar
    @@ -0,0 +1,396 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCALENDAR_H_
    +#define WCALENDAR_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WDate>
    +#include <Wt/WSignalMapper>
    +#include <set>
    +
    +namespace boost {
    +  namespace gregorian {
    +    class date;
    +  }
    +}
    +
    +namespace Wt {
    +
    +class WComboBox;
    +class WInPlaceEdit;
    +class WTemplate;
    +
    +/*! \class WCalendar Wt/WCalendar Wt/WCalendar
    + *  \brief A calendar.
    + *
    + * The calendar provides navigation by month and year, and indicates the
    + * current day.
    + *
    + * You can listen for single click or double click events on a
    + * calendar cell using the clicked() and activated() methods.
    + *
    + * The calendar may be configured to allow selection of single or
    + * multiple days using setSelectionMode(), and you may listen for
    + * changes in the selection using the selectionChanged()
    + * signals. Selection can also be entirely disabled in which case you
    + * can implement your own selection handling by listening for cell
    + * click events.
    + *
    + * Cell rendering may be customized by reimplementing renderCell().
    + *
    + * Internationalization is provided by the internationalization
    + * features of the Wt::WDate class.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WDate today = Wt::WDate::currentDate();
    + *
    + * Wt::WCalendar *calendar = new Wt::WCalendar(this);
    + * calendar->browseTo(today.addMonths(1));
    + * calendar->select(today.addMonths(1).addDays(3));
    + * calendar->selected().connect(this, &MyWidget::daySelected);
    + * \endcode
    + * \endif
    + *
    + * Here is a snapshot, taken on 19/01/2010 (shown as
    + * today), and 14/01/2010 currently selected.
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WCalendar-default-1.png "WCalendar with default look" 
    + * </TD> <TD> 
    + * \image html WCalendar-polished-1.png "WCalendar with polished look" 
    + * </TD> </TR> </TABLE>
    + *
    + * <h3>CSS</h3>
    + *
    + * The calendar is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-calendar</tt> CSS class and the following
    + * selectors:
    + *
    + * \verbatim
    +.Wt-cal table       : The table
    +.Wt-cal table.d1    : The table (single letter day headers)
    +.Wt-cal table.d3    : The table (three letter day headers)
    +.Wt-cal table.dlong : The table (long day headers)
    +
    +.Wt-cal caption	    : The caption (containing the navigation buttons)
    +.Wt-cal-year        : The caption year in-place-edit
    +
    +.Wt-cal th          : Header cell (week day)
    +
    +.Wt-cal td          : Day cell
    +.Wt-cal-oom         : Out-of-month day
    +.Wt-cal-oor         : Out-of-range day (day < bottom or day > top)
    +.Wt-cal-sel         : Selected day
    +.Wt-cal-now         : Today day
    +\endverbatim
    + *
    + */
    +class WT_API WCalendar : public WCompositeWidget
    +{
    +public:
    +  /*! \brief The format of the horizontal header.
    +   */
    +  enum HorizontalHeaderFormat { 
    +    SingleLetterDayNames,  //!< First letter of a day (e.g. 'M' for Monday)
    +    ShortDayNames,         //!< First 3 letters of a day (e.g. 'Mon' for Monday)
    +    LongDayNames           //!< Full day name
    +    // NoHorizontalHeader  //No horizontal header (not yet implemented)
    +  };
    +
    +  /*! \brief Creates a new calendar.
    +   *
    +   * Constructs a new calendar with English day/month names.  The
    +   * calendar shows the current day, and has an empty selection.
    +   */
    +  WCalendar(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the selection mode.
    +   *
    +   * The default selection mode is
    +   * \link Wt::SingleSelection SingleSelection\endlink.
    +   */
    +  void setSelectionMode(SelectionMode mode);
    +
    +  /*! \brief Browses to the same month in the previous year.
    +   *
    +   * Displays the same month in the previous year. This does not
    +   * affect the selection.
    +   *
    +   * This will emit the currentPageChanged() singal.
    +   */
    +  void browseToPreviousYear();
    +
    +  /*! \brief Browses to the previous month.
    +   *
    +   * Displays the previous month. This does not affect the selection.
    +   *
    +   * This will emit the currentPageChanged() singal.
    +   */
    +  void browseToPreviousMonth();
    +
    +  /*! \brief Browses to the same month in the next year.
    +   *
    +   * Displays the same month in the next year. This does not change
    +   * the current selection.
    +   *
    +   * This will emit the currentPageChanged() singal.
    +   */
    +  void browseToNextYear();
    +
    +  /*! \brief Browses to the next month.
    +   *
    +   * Displays the next month. This does not change the current selection.
    +   *
    +   * This will emit the currentPageChanged() singal.
    +   */
    +  void browseToNextMonth();
    +
    +  /*! \brief Browses to a date.
    +   *
    +   * Displays the month which contains the given date. This does not change
    +   * the current selection.
    +   *
    +   * This will emit the currentPageChanged() signal if another month
    +   * is displayed.
    +   */
    +  void browseTo(const WDate& date);
    +
    +  /*! \brief Returns the current month displayed
    +   *
    +   * Returns the month (1-12) that is currently displayed.
    +   */
    +  int currentMonth() const { return currentMonth_; }
    +
    +  /*! \brief Returns the current year displayed
    +   *
    +   * Returns the year that is currently displayed.
    +   */
    +  int currentYear() const { return currentYear_; }
    +
    +  /*! \brief Clears the current selection.
    +   *
    +   * Clears the current selection. Will result in a selection() that is
    +   * empty().
    +   */
    +  void clearSelection();
    +
    +  /*! \brief Selects a date.
    +   *
    +   * Select one date. Both in single or multiple selection mode, this results
    +   * in a selection() that contains exactly one date.
    +   */
    +  void select(const WDate& date);
    +
    +  /*! \brief Selects multiple dates.
    +   *
    +   * Select multiple dates. In multiple selection mode, this results
    +   * in a selection() that contains exactly the given dates. In single
    +   * selection mode, at most one date is set.
    +   */
    +  void select(const std::set<WDate>& dates);
    +
    +  /*! \brief Sets the horizontal header format.
    +   *
    +   * The default horizontal header format is WCalendar::ShortDayNames.
    +   */
    +  void setHorizontalHeaderFormat(HorizontalHeaderFormat format);
    +
    +  /*! \brief Returns the horizontal header format.
    +   *
    +   * \sa setHorizontalHeaderFormat()
    +   */
    +  HorizontalHeaderFormat horizontalHeaderFormat() {
    +    return horizontalHeaderFormat_;
    +  }
    +
    +  /*! \brief Sets the first day of the week.
    +   *
    +   * Possible values or 1 to 7, as accepted by WDate::shortDayName().
    +   *
    +   * The default value is 1 ("Monday").
    +   */
    +  void setFirstDayOfWeek(int dayOfWeek);
    +
    +  /*! \brief Returns the current selection.
    +   *
    +   * Returns the set of dates currently selected. In single selection mode,
    +   * this set contains 0 or 1 dates.
    +   */
    +  const std::set<WDate>& selection() const { return selection_; }
    +
    +  /*! \brief %Signal emitted when the user changes the selection.
    +   *
    +   * Emitted after the user has changed the current selection.
    +   */
    +  Signal<>& selectionChanged() { return selectionChanged_; }
    +
    +  /*! \brief %Signal emitted when the user double-clicks a date.
    +   *
    +   * You may want to connect to this signal to treat a double click
    +   * as the selection of a date.
    +   */
    +  Signal<WDate>& activated() { return activated_; }
    +
    +  /*! \brief %Signal emitted when the user clicks a date.
    +   *
    +   * You may want to connect to this signal if you want to provide a
    +   * custom selection handling.
    +   */
    +  Signal<WDate>& clicked() { return clicked_; } 
    +
    +  /*! \brief %Signal emitted when the current month is changed.
    +   *
    +   * The method is emitted both when the change is done through the
    +   * user interface or via the public API. The two parameters are
    +   * respectively the new year and month.
    +   */
    +  Signal<int, int>& currentPageChanged() { return currentPageChanged_; }
    +
    +  /*! \brief Configures single or multiple selection mode (<b> deprecated </b>).
    +   *
    +   * In single selection mode, only one date may be selected: the selection()
    +   * will be empty or contain exactly one item. 
    +   *
    +   * \deprecated use setSelectionMode() instead.
    +   */
    +  void setMultipleSelection(bool multiple);
    +
    +  /*! \brief %Signal emitted when the user has double clicked on a date (<b>deprecated</b>).
    +    * 
    +    * This signal indicates that he user has selected a new date, which 
    +    * is only available when in single selection mode.
    +    *
    +    * \deprecated use activated() instead.
    +    */
    +  Signal<WDate>& selected() { return activated_; }
    +  
    +  /*! \brief Configures the calendar to use single click for activation (<b>deprecated</b>)
    +   *
    +   * By default, double click will trigger activate(). Use this method
    +   * if you want a single click to trigger activate() (and the now
    +   * deprecated selected() method). This only applies to a
    +   * single-selection calendar.
    +   *
    +   * \deprecated listen to the clicked() signal if you want to react
    +   * to a single click, or activated() signal if you want to react to
    +   * a double click.
    +   *
    +   * \sa setMultipleSelection()
    +   */
    +  void setSingleClickSelect(bool single);
    +
    +  /*! \brief Sets the length for the abbreviated day of week (<b> deprecated </b>).
    +   *
    +   * The \p chars may be 1 or 3, which render "Monday" as
    +   * respectively "M" or "Mon".
    +   *
    +   * The default length is 3.
    +   *
    +   * \deprecated use setHorizontalHeaderFormat() instead.
    +   */
    +  void setDayOfWeekLength(int chars);
    +
    +  /*! \brief Sets the bottom of the valid date range.
    +   *
    +   * \if cpp
    +   * The default is a null date constructed using WDate().
    +   * \elseif java 
    +   * The default bottom is null.
    +   * \endif
    +   */
    +  void setBottom(const WDate& bottom);
    +
    +  /*! \brief Returns the bottom date of the valid range.
    +   */
    +  const WDate& bottom() const { return bottom_; }
    +
    +  /*! \brief Sets the top of the valid date range.
    +   *
    +   * \if cpp
    +   * The default is a null date constructed using WDate().
    +   * \elseif java 
    +   * The default top is null.
    +   * \endif
    +   */
    +  void setTop(const WDate& top);
    +
    +  /*! \brief Returns the top date of the valid range.
    +   */
    +  const WDate& top() const { return top_; }
    +
    +protected:
    +  virtual void render(WFlags<RenderFlag> renderFlags);
    +  
    +  /*! \brief Creates or updates a widget that renders a cell.
    +   *
    +   * The default implementation creates a WText
    +   *
    +   * You may want to reimplement this method if you wish to customize
    +   * how a cell is rendered. When \p widget is \c 0, a new widget
    +   * should be created and returned. Otherwise, you may either modify
    +   * the passed \p widget, or return a new widget. If you return a new
    +   * widget, the prevoius widget will be deleted.
    +   */
    +  virtual WWidget* renderCell(WWidget* widget, const WDate& date);
    +
    +  /*! \brief Returns whether a date is selected.
    +   *
    +   * This is a convenience method that can be used when reimplementing
    +   * renderCell().
    +   */
    +  bool isSelected(const WDate& date) const;
    +
    +private:
    +  SelectionMode     selectionMode_;
    +  bool              singleClickSelect_;
    +  int               currentYear_;
    +  int               currentMonth_;
    +  HorizontalHeaderFormat horizontalHeaderFormat_;
    +  int               firstDayOfWeek_;
    +  std::set<WDate>   selection_;
    +  bool              needRenderMonth_;
    +
    +  Signal<>          selectionChanged_;
    +  Signal<WDate>     activated_;
    +  Signal<WDate>     clicked_;
    +  Signal<int, int>  currentPageChanged_;
    +
    +  WDate             bottom_, top_;
    +
    +  struct Coordinate {
    +    int i, j;
    +
    +    Coordinate() : i(0), j(0) { }
    +    Coordinate(int x, int y) { i = x; j = y; }
    +  };
    +
    +  WTemplate			      *impl_;
    +  WComboBox                           *monthEdit_;
    +  WInPlaceEdit                        *yearEdit_;
    +
    +  WSignalMapper<Coordinate, NoClass>  *cellClickMapper_;
    +  WSignalMapper<Coordinate, NoClass>  *cellDblClickMapper_;
    +
    +  void create();
    +  void renderMonth();
    +
    +  void emitCurrentPageChanged();
    +
    +  void monthChanged(int newMonth);
    +  void yearChanged(WString newYear);
    +  boost::gregorian::date dateForCell(int week, int dayOfWeek);
    +
    +  void selectInCurrentMonth(const WDate& d);
    +
    +  void cellClicked(Coordinate c);
    +  void cellDblClicked(Coordinate c);
    +};
    +
    +}
    +
    +#endif // WCALENDAR_H_
    diff --git a/wt-3.1.7a/src/Wt/WCalendar.C b/wt-3.1.7a/src/Wt/WCalendar.C
    new file mode 100644
    index 0000000..6b7c9df
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCalendar.C
    @@ -0,0 +1,506 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WCalendar"
    +
    +#include <boost/date_time/gregorian/gregorian.hpp>
    +using namespace boost::gregorian;
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WComboBox"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WInPlaceEdit"
    +#include "Wt/WLineEdit"
    +#include "Wt/WSignalMapper"
    +#include "Wt/WTable"
    +#include "Wt/WTemplate"
    +#include "Wt/WText"
    +#include "WtException.h"
    +
    +#include "Utils.h"
    +#include "EscapeOStream.h"
    +
    +namespace Wt {
    +
    +// Because WDate returns days and weeks as WT_USTRING, we need this:
    +#ifndef WT_TARGET_JAVA
    +#define DATE_NAME_STR(e) e
    +#else
    +#define DATE_NAME_STR(e) WString::fromUTF8(e)
    +#endif
    +
    +WCalendar::WCalendar(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    selectionChanged_(this),
    +    activated_(this),
    +    clicked_(this),
    +    currentPageChanged_(this)
    +{
    +  create();
    +}
    +
    +void WCalendar::setMultipleSelection(bool multiple)
    +{
    +  setSelectionMode(multiple?ExtendedSelection:SingleSelection);
    +}
    +
    +void WCalendar::setSelectionMode(SelectionMode mode) 
    +{
    +  if (selectionMode_ != mode) {
    +    if (mode != ExtendedSelection && selection_.size() > 1) {
    +      selection_.clear();
    +      renderMonth();
    +    }
    +    selectionMode_ = mode;
    +  }
    +}
    +
    +void WCalendar::setSingleClickSelect(bool single)
    +{
    +  singleClickSelect_ = single;
    +}
    +
    +void WCalendar::create()
    +{
    +  selectionMode_ = SingleSelection;
    +  singleClickSelect_ = false;
    +  horizontalHeaderFormat_ = ShortDayNames;
    +  firstDayOfWeek_ = 1;
    +  cellClickMapper_ = 0;
    +  cellDblClickMapper_ = 0;
    +
    +  clicked().connect(this, &WCalendar::selectInCurrentMonth);
    +
    +  WDate currentDay = WDate::currentDate();
    +
    +  currentYear_ = currentDay.year();
    +  currentMonth_ = currentDay.month();
    +
    +  SStream text;
    +
    +  text <<
    +    "<table class=\"${table-class}\" cellspacing=\"0\" cellpadding=\"0\">"
    +    """<caption>"
    +    ""  "${nav-prev} ${month} ${year} ${nav-next}"
    +    """</caption>"
    +    """<tr>";
    +
    +  for (int j = 0; j < 7; ++j)
    +    text <<
    +      "<th title=\"${t" << j << "}\" scope=\"col\">${d" << j << "}</th>";
    +
    +  text << "</tr>";
    +
    +  for (int i = 0; i < 6; ++i) {
    +    text << "<tr>";
    +    for (int j = 0; j < 7; ++j)
    +      text << "<td>${c" << (i * 7 + j) << "}</td>";
    +    text << "</tr>";
    +  }
    +
    +  text << "</table>";
    +
    +  setImplementation(impl_ = new WTemplate());
    +  impl_->setTemplateText(WString::fromUTF8(text.str()), XHTMLUnsafeText);
    +  impl_->setStyleClass("Wt-cal");
    +
    +  setSelectable(false);
    +
    +  WText *prevMonth = new WText(tr("Wt.WCalendar.PrevMonth"),
    +    PlainText);
    +  prevMonth->setStyleClass("Wt-cal-navbutton");
    +  prevMonth->clicked().connect(this, &WCalendar::browseToPreviousMonth);
    +
    +  WText *nextMonth = new WText(tr("Wt.WCalendar.NextMonth"), PlainText);
    +  nextMonth->setStyleClass("Wt-cal-navbutton");
    +  nextMonth->clicked().connect(this, &WCalendar::browseToNextMonth);
    +
    +  monthEdit_ = new WComboBox();
    +  for (unsigned i = 0; i < 12; ++i)
    +    monthEdit_->addItem(WDate::longMonthName(i+1));
    +  monthEdit_->activated().connect(this, &WCalendar::monthChanged);
    +
    +  yearEdit_ = new WInPlaceEdit("");
    +  yearEdit_->setButtonsEnabled(false);
    +  yearEdit_->lineEdit()->setTextSize(4);
    +  yearEdit_->setStyleClass("Wt-cal-year");
    +  yearEdit_->valueChanged().connect(this, &WCalendar::yearChanged);
    +
    +  impl_->bindWidget("nav-prev", prevMonth);
    +  impl_->bindWidget("nav-next", nextMonth);
    +  impl_->bindWidget("month", monthEdit_);
    +  impl_->bindWidget("year", yearEdit_);
    +
    +  setHorizontalHeaderFormat(horizontalHeaderFormat_);
    +  setFirstDayOfWeek(firstDayOfWeek_);
    +}
    +
    +void WCalendar::setFirstDayOfWeek(int dayOfWeek)
    +{
    +  firstDayOfWeek_ = dayOfWeek;
    +
    +  for (unsigned i = 0; i < 7; ++i) {
    +    int day = (i + firstDayOfWeek_ - 1) % 7 + 1;
    +
    +    WString title = WDate::longDayName(day);
    +    impl_->bindString("t" + boost::lexical_cast<std::string>(i), 
    +		      title, 
    +		      XHTMLUnsafeText);
    +
    +    WString abbr;
    +    switch (horizontalHeaderFormat_) {
    +    case SingleLetterDayNames:
    +      abbr = WString::fromUTF8(WDate::shortDayName(day).toUTF8().substr(0, 1));
    +      break;
    +    case ShortDayNames:
    +      abbr = WDate::shortDayName(day);
    +      break;
    +    case LongDayNames:
    +      abbr = WDate::longDayName(day);
    +      break;
    +    }
    +   
    +    impl_->bindString("d" + boost::lexical_cast<std::string>(i), 
    +		      abbr, 
    +		      XHTMLUnsafeText);
    +  }
    +
    +  renderMonth();
    +}
    +
    +void WCalendar::setHorizontalHeaderFormat(HorizontalHeaderFormat format)
    +{
    +  std::string d;
    +  switch (format) {
    +  case SingleLetterDayNames:
    +    d = "d1"; break;
    +  case ShortDayNames:
    +    d = "d3"; break;
    +  case LongDayNames:
    +    d = "dlong"; break;
    +  default:
    +    throw WtException("WCalendar: Invalid horizontal header format.");
    +  }
    +
    +  horizontalHeaderFormat_ = format;
    +
    +  impl_->bindString("table-class", d, XHTMLUnsafeText);
    +
    +  setFirstDayOfWeek(firstDayOfWeek_);
    +}
    +
    +void WCalendar::setDayOfWeekLength(int chars)
    +{
    +  setHorizontalHeaderFormat(chars == 3 ? ShortDayNames : SingleLetterDayNames);
    +}
    +
    +void WCalendar::renderMonth()
    +{
    +  needRenderMonth_ = true;
    +
    +  if (isRendered())
    +    askRerender();
    +}
    +
    +void WCalendar::render(WFlags<RenderFlag> flags)
    +{
    +  if (needRenderMonth_) {
    +    bool create = cellClickMapper_ == 0;
    +#ifndef WT_TARGET_JAVA
    +    char buf[30];
    +#else
    +    char *buf;
    +#endif // WT_TARGET_JAVA
    +
    +    if (create) {
    +      cellClickMapper_ = new WSignalMapper<Coordinate>(this);
    +      cellClickMapper_->mapped().connect(this, &WCalendar::cellClicked);
    +      cellDblClickMapper_ = new WSignalMapper<Coordinate>(this);
    +      cellDblClickMapper_->mapped().connect(this, &WCalendar::cellDblClicked);
    +    }
    +
    +    int m = currentMonth_ - 1;
    +    if (monthEdit_->currentIndex() != m)
    +      monthEdit_->setCurrentIndex(m);
    +
    +    int y = currentYear_;
    +    Utils::itoa(y, buf);
    +    if (yearEdit_->text().toUTF8() != buf)
    +      yearEdit_->setText(WString::fromUTF8(buf));
    +
    +    WDate todayd = WDate::currentDate();
    +    date today(todayd.year(), todayd.month(), todayd.day());
    +
    +    // The first line contains the last day of the previous month.
    +    date d(currentYear_, currentMonth_, 1);
    +    d -= date_duration(1);
    + 
    +    greg_weekday gw = firstDayOfWeek_ % 7;
    +    d = previous_weekday(d, gw);
    +
    +    for (unsigned i = 0; i < 6; ++i) {
    +      for (unsigned j = 0; j < 7; ++j) {
    +	Utils::itoa(i * 7 + j, buf);
    +	std::string cell = std::string("c") + buf;
    +	
    +	WDate date(d.year(), d.month(), d.day());
    +
    +	WWidget *w = impl_->resolveWidget(cell);
    +	WWidget *rw = renderCell(w, date);
    +	impl_->bindWidget(cell, rw);
    +
    +	WInteractWidget* iw = dynamic_cast<WInteractWidget*>(rw->webWidget());
    +
    +	if (iw && iw != w) {
    +	  cellClickMapper_
    +	    ->mapConnect(iw->clicked(), Coordinate(i, j));
    +	  cellDblClickMapper_
    +	    ->mapConnect(iw->doubleClicked(), Coordinate(i, j));
    +	}
    +
    +	d += date_duration(1);
    +      }
    +    }
    +
    +    needRenderMonth_ = false;
    +  }
    +
    +  WCompositeWidget::render(flags);
    +}
    +
    +WWidget* WCalendar::renderCell(WWidget* widget, const WDate& date)
    +{
    +  WText* t = dynamic_cast<WText*>(widget);
    +
    +  if (!t) {
    +    t = new WText();
    +    t->setInline(false);
    +    t->setTextFormat(PlainText);
    +  }
    +
    +#ifndef WT_TARGET_JAVA
    +    char buf[30];
    +#else
    +    char *buf;
    +#endif // WT_TARGET_JAVA
    +  Utils::itoa(date.day(), buf);
    +  t->setText(WString::fromUTF8(buf));
    +
    +  std::string styleClass;
    +
    +  if ((!bottom_.isNull() && date < bottom_) || 
    +       (!top_.isNull() && date > top_))
    +    styleClass += " Wt-cal-oor";
    +  else if (date.month() != currentMonth())
    +    styleClass += " Wt-cal-oom";
    +
    +  if (isSelected(date))
    +    styleClass += " Wt-cal-sel";
    +
    +  if (date == WDate::currentDate()) {
    +    if (!isSelected(date))
    +      styleClass += " Wt-cal-now";
    +    t->setToolTip("Today");
    +  } else
    +    t->setToolTip("");
    +
    +  t->setStyleClass(styleClass.c_str());
    +
    +  return t;
    +}
    +
    +bool WCalendar::isSelected(const WDate& d) const
    +{
    +  return selection_.find(d) != selection_.end();
    +}
    +
    +void WCalendar::clearSelection()
    +{
    +  selection_.clear();
    +
    +  renderMonth();
    +}
    +
    +void WCalendar::select(const WDate& date)
    +{
    +  selection_.clear();
    +
    +  selection_.insert(date);
    +  renderMonth();
    +}
    +
    +void WCalendar::browseTo(const WDate& date)
    +{
    +  bool rerender = false;
    +
    +  if (currentYear_ != date.year()) {
    +    currentYear_ = date.year();
    +    rerender = true;
    +  }
    +
    +  if (currentMonth_ != date.month()) {
    +    currentMonth_ = date.month();
    +    rerender = true;
    +  }
    +
    +  if (rerender) {
    +    emitCurrentPageChanged();
    +    renderMonth();
    +  }
    +}
    +
    +void WCalendar::select(const std::set<WDate>& dates)
    +{
    +  if (selectionMode_ == ExtendedSelection) {
    +    selection_ = dates;
    +    renderMonth();
    +  } else if(selectionMode_ == SingleSelection) {
    +    if (dates.empty())
    +      clearSelection();
    +    else
    +      select(*dates.begin());
    +  }
    +}
    +
    +void WCalendar::selectInCurrentMonth(const WDate& d)
    +{
    +  if (d.month() == currentMonth_ && selectionMode_ != NoSelection) {
    +    if (selectionMode_ == ExtendedSelection) {
    +      if (isSelected(d))
    +	selection_.erase(d);
    +      else
    +	selection_.insert(d);
    +
    +      selectionChanged().emit();
    +      renderMonth();
    +
    +    } else {
    +      selection_.clear();
    +      selection_.insert(d);
    +
    +      selectionChanged().emit();
    +      renderMonth();
    +    }
    +  }
    +}
    +
    +void WCalendar::cellClicked(Coordinate weekday)
    +{
    +  date dt = dateForCell(weekday.i, weekday.j);
    +  clicked().emit(WDate(dt.year(), dt.month(), dt.day()));
    +  
    +  if (selectionMode_ != ExtendedSelection && singleClickSelect_) 
    +    activated().emit(WDate(dt.year(), dt.month(), dt.day()));
    +}
    +
    +void WCalendar::cellDblClicked(Coordinate weekday)
    +{
    +  date dt = dateForCell(weekday.i, weekday.j);
    +  activated().emit(WDate(dt.year(), dt.month(), dt.day()));
    +}
    +
    +date WCalendar::dateForCell(int week, int dayOfWeek)
    +{
    +  date d(currentYear_, currentMonth_, 1);
    +  d -= date_duration(1);
    +  greg_weekday gw = firstDayOfWeek_ % 7;
    +  d = previous_weekday(d, gw);
    +
    +  d += date_duration(week * 7 + dayOfWeek);
    +
    +  return d;
    +}
    +
    +void WCalendar::emitCurrentPageChanged()
    +{
    +  currentPageChanged().emit(currentYear_, currentMonth_);
    +}
    +
    +void WCalendar::browseToPreviousYear()
    +{
    +  --currentYear_;
    +
    +  emitCurrentPageChanged();
    +  renderMonth();
    +}
    +
    +void WCalendar::browseToPreviousMonth()
    +{
    +  if (--currentMonth_ == 0) {
    +    currentMonth_ = 12;
    +    --currentYear_;
    +  }
    +
    +  emitCurrentPageChanged();
    +  renderMonth();
    +}
    +
    +void WCalendar::browseToNextYear()
    +{
    +  ++currentYear_;
    +
    +  emitCurrentPageChanged();
    +  renderMonth();
    +}
    +
    +void WCalendar::browseToNextMonth()
    +{
    +  if (++currentMonth_ == 13) {
    +    currentMonth_ = 1;
    +    ++currentYear_;
    +  }
    +
    +  emitCurrentPageChanged();
    +  renderMonth();
    +}
    +
    +void WCalendar::monthChanged(int newMonth)
    +{
    +  ++newMonth;
    +
    +  if (currentMonth_ != newMonth
    +      && (newMonth >= 1 && newMonth <= 12)) {
    +
    +    currentMonth_ = newMonth;
    +
    +    emitCurrentPageChanged();
    +    renderMonth();
    +  }
    +}
    +
    +void WCalendar::yearChanged(WString yearStr)
    +{
    +  try {
    +    int year = boost::lexical_cast<int>(yearStr);
    +
    +    if (currentYear_ != year &&
    +	(year >= 1900 && year <= 2200)) { // ??
    +      currentYear_ = year;
    +
    +      emitCurrentPageChanged();
    +      renderMonth();
    +    }
    +  } catch (boost::bad_lexical_cast& e) {
    +  }
    +}
    +
    +void WCalendar::setBottom(const WDate& bottom)
    +{
    +  if (bottom_ != bottom) {
    +    bottom_ = bottom;
    +    renderMonth();
    +  }
    +}
    +
    +void WCalendar::setTop(const WDate& top)
    +{
    +  if (top_ != top) {
    +    top_ = top;
    +    renderMonth();
    +  }
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCanvasPaintDevice b/wt-3.1.7a/src/Wt/WCanvasPaintDevice
    new file mode 100644
    index 0000000..122001e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCanvasPaintDevice
    @@ -0,0 +1,111 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCANVAS_PAINT_DEVICE_H_
    +#define WCANVAS_PAINT_DEVICE_H_
    +
    +#include <Wt/WBrush>
    +#include <Wt/WFont>
    +#include <Wt/WObject>
    +#include <Wt/WPaintDevice>
    +#include <Wt/WPen>
    +#include <Wt/WPointF>
    +#include <Wt/WShadow>
    +#include <Wt/WTransform>
    +
    +#include <sstream>
    +
    +namespace Wt {
    +
    +class DomElement;
    +class WTransform;
    +
    +/*! \class WCanvasPaintDevice Wt/WCanvasPaintDevice Wt/WCanvasPaintDevice
    + *  \brief A paint device for rendering using the HTML 5 &lt;canvas&gt; element.
    + *
    + * The %WCanvasPaintDevice is used by WPaintedWidget to render to the
    + * browser using the HTML 5 &lt;canvas&gt; element. You usually will
    + * not use the device directly, but rather rely on WPaintedWidget to
    + * use this device when appropriate.
    + *
    + * \note Older browsers do not have text support in &lt;canvas&gt;.
    + * Text is then rendered in an overlayed DIV and a consequence text is
    + * not subject to rotation and scaling components of the current
    + * transformation (but does take into account translation). On most
    + * browser you can use the WSvgImage or WVmlImage paint devices which
    + * do support text natively.
    + *
    + * \ingroup painting
    + */
    +class WT_API WCanvasPaintDevice : public WObject, public WPaintDevice
    +{
    +public:
    +  /*! \brief Create a canvas paint device.
    +   */
    +  WCanvasPaintDevice(const WLength& width, const WLength& height,
    +		     WObject *parent = 0);
    +
    +  virtual void setChanged(WFlags<ChangeFlag> flags);
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle);
    +  virtual void drawImage(const WRectF& rect, const std::string& imgUri,
    +			 int imgWidth, int imgHeight, const WRectF& sourceRect);
    +  virtual void drawLine(double x1, double y1, double x2, double y2);
    +  virtual void drawPath(const WPainterPath& path);
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text);
    +  virtual void init();
    +  virtual void done();
    +  virtual bool paintActive() const { return painter_ != 0; }
    +
    +  void render(const std::string& canvasId, DomElement* text);
    +
    +  virtual WLength width() const { return width_; }
    +  virtual WLength height() const { return height_; }
    +
    +protected:
    +  virtual WPainter *painter() const { return painter_; }
    +  virtual void setPainter(WPainter *painter) { painter_ = painter; }
    +  virtual void clear();
    +
    +private:
    +  enum TextMethod { MozText, Html5Text, DomText };
    +
    +  WLength     width_, height_;
    +  WPainter   *painter_;
    +  WFlags<ChangeFlag> changeFlags_;
    +
    +  TextMethod  textMethod_;
    +
    +  bool        busyWithPath_;
    +
    +  WTransform  currentTransform_;
    +  WBrush      currentBrush_;
    +  WPen        currentPen_;
    +  WShadow     currentShadow_;
    +  WFont       currentFont_;
    +  WPointF     pathTranslation_;
    +  AlignmentFlag currentTextHAlign_, currentTextVAlign_;
    +
    +  std::stringstream js_;
    +  std::vector<DomElement *> textElements_;
    +  std::vector<std::string> images_;
    +
    +  void finishPath();
    +  void renderTransform(std::stringstream& s, const WTransform& t,
    +		       bool invert = false);
    +  void renderStateChanges();
    +  void drawPlainPath(std::stringstream& s, const WPainterPath& path);
    +
    +  int createImage(const std::string& imgUri);
    +
    +  TextMethod textMethod() const { return textMethod_; }
    +
    +  friend class WWidgetCanvasPainter;
    +};
    +
    +}
    +
    +#endif // WCANVAS_PAINT_DEVICE_H_
    diff --git a/wt-3.1.7a/src/Wt/WCanvasPaintDevice.C b/wt-3.1.7a/src/Wt/WCanvasPaintDevice.C
    new file mode 100644
    index 0000000..c7f9cd3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCanvasPaintDevice.C
    @@ -0,0 +1,764 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCanvasPaintDevice"
    +#include "Wt/WEnvironment"
    +#include "Wt/WPainter"
    +#include "Wt/WPainterPath"
    +#include "Wt/WRectF"
    +#include "Wt/WWebWidget"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include <cmath>
    +#include <sstream>
    +#include <boost/lexical_cast.hpp>
    +
    +
    +namespace Wt {
    +
    +namespace {
    +
    +  static const double EPSILON=1E-5;
    +
    +  WPointF normalizedDegreesToRadians(double angle, double sweep) {
    +    angle = 360 - angle;
    +    int i = (int)angle / 360;
    +    angle -= (i * 360);
    +
    +    double r1 = WTransform::degreesToRadians(angle);
    +
    +    if (std::fabs(sweep - 360) < 0.01)
    +      sweep = 359.9;
    +    else if (std::fabs(sweep + 360) < 0.01)
    +      sweep = -359.9;
    +
    +    double a2 = angle - sweep;
    +
    +    double r2 = WTransform::degreesToRadians(a2);
    +
    +    return WPointF(r1, r2);
    +  }
    +
    +  bool fequal(double d1, double d2) {
    +    return std::fabs(d1 - d2) < 1E-5;
    +  }
    +}
    +
    +WCanvasPaintDevice::WCanvasPaintDevice(const WLength& width,
    +				       const WLength& height,
    +				       WObject *parent)
    +  : WObject(parent),
    +    width_(width),
    +    height_(height),
    +    painter_(0),
    +    busyWithPath_(false)
    +{ 
    +  textMethod_ = DomText;
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (app) {
    +    if (app->environment().agentIsIE()) {
    +      textMethod_ = Html5Text;
    +    } else if (app->environment().agentIsChrome()) {
    +      if (app->environment().agent() >= WEnvironment::Chrome2
    +	  && !app->environment().agentIsMobileWebKit())
    +	textMethod_ = Html5Text;
    +    } else if (app->environment().agentIsGecko()) {
    +      if (app->environment().agent() >= WEnvironment::Firefox3_5)
    +	textMethod_ = Html5Text;
    +      else if (app->environment().agent() >= WEnvironment::Firefox3_0)
    +	textMethod_ = MozText;
    +    } else if (app->environment().agentIsSafari()) {
    +      if (app->environment().agent() >= WEnvironment::Safari4)
    +	textMethod_ = Html5Text;
    +    }
    +  }
    +}
    +
    +void WCanvasPaintDevice::clear()
    +{
    +  js_.str(std::string());
    +  js_ << "ctx.clearRect(0,0,"
    +      << width().value() << "," << height().value() << ");";
    +}
    +
    +void WCanvasPaintDevice::render(const std::string& canvasId,
    +				DomElement *text)
    +{
    +  std::string canvasVar = WT_CLASS ".getElement('" + canvasId + "')";
    +
    +  std::stringstream tmp;
    +
    +  tmp <<
    +    "if(" << canvasVar << ".getContext){";
    +
    +  if (!images_.empty()) {
    +    tmp << "new Wt._p_.ImagePreloader([";
    +
    +    for (unsigned i = 0; i < images_.size(); ++i) {
    +      if (i != 0)
    +	tmp << ',';
    +      tmp << '\'' << images_[i] << '\'';
    +    }
    +
    +    tmp <<
    +      "],function(images)";
    +  }
    +
    +  tmp << "{var ctx=" << canvasVar << ".getContext('2d');"
    +      << "ctx.save();ctx.save();" << js_.str() 
    +      << "ctx.restore();ctx.restore();}";
    +
    +  if (!images_.empty()) {
    +    tmp << ");";
    +  }
    +
    +  tmp << "}";
    +
    +  text->callJavaScript(tmp.str());
    +
    +  for (unsigned i = 0; i < textElements_.size(); ++i)
    +    text->addChild(textElements_[i]);
    +}
    +
    +void WCanvasPaintDevice::init()
    +{
    +  currentBrush_ = WBrush();
    +  currentPen_ = WPen();
    +  currentShadow_ = WShadow();
    +  currentFont_ = WFont();
    +  currentTextVAlign_ = currentTextHAlign_ = AlignLength;
    +
    +  changeFlags_ = Transform | Pen | Brush | Shadow | Font;
    +}
    +
    +void WCanvasPaintDevice::done()
    +{
    +  finishPath();
    +}
    +
    +void WCanvasPaintDevice::drawArc(const WRectF& rect, double startAngle,
    +				 double spanAngle)
    +{
    +  finishPath();
    +  
    +  if (rect.width() < EPSILON || rect.height() < EPSILON)
    +    return;
    +
    +  renderStateChanges();
    +
    +  WPointF ra = normalizedDegreesToRadians(startAngle, spanAngle);
    +
    +  double sx, sy, r, lw;
    +  if (rect.width() > rect.height()) {
    +    sx = 1;
    +    sy = std::max(0.005, rect.height() / rect.width());
    +    r = rect.width()/2;
    +  } else {
    +    sx = std::max(0.005, rect.width() / rect.height());
    +    sy = 1;
    +    lw = painter()->normalizedPenWidth(painter()->pen().width(), true).value()
    +      * 1 / std::min(sx, sy);
    +    r = rect.height()/2;
    +  }
    +
    +  const WPen& pen = painter()->pen();
    +  if (pen.style() != NoPen)
    +    lw = painter()->normalizedPenWidth(pen.width(), true).value()
    +      * 1 / std::min(sx, sy);
    +  else
    +    lw = 0;
    +  r = std::max(0.005, r - lw/2);
    +
    +  char buf[30];
    +
    +  js_ << "ctx.save();"
    +      << "ctx.translate(" << Utils::round_str(rect.center().x(), 3, buf);
    +  js_ << "," << Utils::round_str(rect.center().y(), 3, buf);
    +  js_ << ");"
    +      << "ctx.scale(" << Utils::round_str(sx, 3, buf);
    +  js_ << "," << Utils::round_str(sy, 3, buf) << ");";
    +  js_ << "ctx.lineWidth = " << Utils::round_str(lw, 3, buf) << ";"
    +      << "ctx.beginPath();";
    +  js_ << "ctx.arc(0,0," << Utils::round_str(r, 3, buf);
    +  js_ << ',' << Utils::round_str(ra.x(), 3, buf);
    +  js_ << "," << Utils::round_str(ra.y(), 3, buf) << ",true);";
    +
    +  if (currentPen_.style() != NoPen) {
    +    js_ << "ctx.stroke();";
    +  }
    +
    +  if (currentBrush_.style() != NoBrush) {
    +    js_ << "ctx.fill();";
    +  }
    +
    +  js_ << "ctx.restore();";
    +}
    +
    +int WCanvasPaintDevice::createImage(const std::string& imgUri)
    +{
    +  images_.push_back(imgUri);
    +  return images_.size() - 1;
    +}
    +
    +void WCanvasPaintDevice::drawImage(const WRectF& rect,
    +				   const std::string& imgUri,
    +				   int imgWidth, int imgHeight,
    +				   const WRectF& sourceRect)
    +{
    +  finishPath();
    +
    +  renderStateChanges();
    +
    +  int imageIndex = createImage(imgUri);
    +
    +  char buf[30];
    +  js_ << "ctx.drawImage(images[" << imageIndex
    +      << "]," << Utils::round_str(sourceRect.x(), 3, buf);
    +  js_ << ',' << Utils::round_str(sourceRect.y(), 3, buf);
    +  js_ << ',' << Utils::round_str(sourceRect.width(), 3, buf);
    +  js_ << ',' << Utils::round_str(sourceRect.height(), 3, buf);
    +  js_ << ',' << Utils::round_str(rect.x(), 3, buf);
    +  js_ << ',' << Utils::round_str(rect.y(), 3, buf);
    +  js_ << ',' << Utils::round_str(rect.width(), 3, buf);
    +  js_ << ',' << Utils::round_str(rect.height(), 3, buf) << ");";
    +}
    +
    +void WCanvasPaintDevice::drawPlainPath(std::stringstream& out,
    +				       const WPainterPath& path)
    +{
    +  char buf[30];
    +
    +  if (!busyWithPath_) {
    +    out << "ctx.beginPath();";
    +    busyWithPath_ = true;
    +  }
    +
    +  const std::vector<WPainterPath::Segment>& segments = path.segments();
    +
    +  if (segments.size() > 0
    +      && segments[0].type() != WPainterPath::Segment::MoveTo)
    +    out << "ctx.moveTo(0,0);";
    +
    +  for (unsigned i = 0; i < segments.size(); ++i) {
    +    const WPainterPath::Segment s = segments[i];
    +
    +    switch (s.type()) {
    +    case WPainterPath::Segment::MoveTo:
    +      out << "ctx.moveTo(" << Utils::round_str(s.x() + pathTranslation_.x(),
    +					       3, buf);
    +      out << ',' << Utils::round_str(s.y() + pathTranslation_.y(),
    +				     3, buf) << ");";
    +      break;
    +    case WPainterPath::Segment::LineTo:
    +      out << "ctx.lineTo(" << Utils::round_str(s.x() + pathTranslation_.x(),
    +					       3, buf);
    +      out << ',' << Utils::round_str(s.y() + pathTranslation_.y(),
    +				     3, buf) << ");";
    +      break;
    +    case WPainterPath::Segment::CubicC1:
    +      out << "ctx.bezierCurveTo("
    +	  << Utils::round_str(s.x() + pathTranslation_.x(), 3, buf);
    +      out << ',' << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf);
    +      break;
    +    case WPainterPath::Segment::CubicC2:
    +      out << ',' << Utils::round_str(s.x() + pathTranslation_.x(), 3, buf)
    +	  << ',';
    +      out << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf);
    +      break;
    +    case WPainterPath::Segment::CubicEnd:
    +      out << ',' << Utils::round_str(s.x() + pathTranslation_.x(), 3, buf)
    +	  << ',';
    +      out << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf) << ");";
    +      break;
    +    case WPainterPath::Segment::ArcC:
    +      out << "ctx.arc(" << Utils::round_str(s.x() + pathTranslation_.x(), 3,
    +					    buf) << ',';
    +      out << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf);
    +      break;
    +    case WPainterPath::Segment::ArcR:
    +      out << ',' << Utils::round_str(s.x(), 3, buf);
    +      break;
    +    case WPainterPath::Segment::ArcAngleSweep:
    +      {
    +	WPointF r = normalizedDegreesToRadians(s.x(), s.y());
    +
    +	out << ',' << Utils::round_str(r.x(), 3, buf);
    +	out << ',' << Utils::round_str(r.y(), 3, buf);
    +	out << ',' << (s.y() > 0 ? "true" : "false") << ");";
    +      }
    +      break;
    +    case WPainterPath::Segment::QuadC: {
    +      /*
    +       * quadraticCurveTo() is broken in Firefox 1.5.
    +       * Therefore, we convert to a bezier Curve instead.
    +       */
    +      WPointF current = path.positionAtSegment(i);
    +      const double cpx = s.x();
    +      const double cpy = s.y();
    +      const double x = segments[i+1].x();
    +      const double y = segments[i+1].y();
    +      
    +      const double cp1x = current.x() + 2.0/3.0*(cpx - current.x());
    +      const double cp1y = current.y() + 2.0/3.0*(cpy - current.y());
    +      const double cp2x = cp1x + (x - current.x())/3.0;
    +      const double cp2y = cp1y + (y - current.y())/3.0;
    +
    +      // and now call cubic Bezier curve to function 
    +      out << "ctx.bezierCurveTo("
    +	  << Utils::round_str(cp1x + pathTranslation_.x(), 3, buf) << ',';
    +      out << Utils::round_str(cp1y + pathTranslation_.y(), 3, buf) << ',';
    +      out << Utils::round_str(cp2x + pathTranslation_.x(), 3, buf) << ',';
    +      out << Utils::round_str(cp2y + pathTranslation_.y(), 3, buf);
    +
    +      break;
    +    }
    +    case WPainterPath::Segment::QuadEnd:
    +      out << ','
    +	  << Utils::round_str(s.x() + pathTranslation_.x(), 3, buf) << ',';
    +      out << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf) << ");";
    +    }
    +  }
    +}
    +
    +void WCanvasPaintDevice::finishPath()
    +{
    +  if (busyWithPath_) {
    +    if (currentPen_.style() != NoPen)
    +      js_ << "ctx.stroke();";
    +
    +    if (currentBrush_.style() != NoBrush)
    +      js_ << "ctx.fill();";
    +
    +    js_ << '\n';
    +
    +    busyWithPath_ = false;
    +  }
    +}
    +
    +void WCanvasPaintDevice::drawPath(const WPainterPath& path)
    +{
    +  renderStateChanges();
    +
    +  drawPlainPath(js_, path);
    +}
    +
    +void WCanvasPaintDevice::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  WPainterPath path;
    +  path.moveTo(x1, y1);
    +  path.lineTo(x2, y2);
    +  drawPath(path);
    +}
    +
    +void WCanvasPaintDevice::drawText(const WRectF& rect,
    +				  WFlags<AlignmentFlag> flags,
    +				  const WString& text)
    +{
    +  AlignmentFlag horizontalAlign = flags & AlignHorizontalMask;
    +  AlignmentFlag verticalAlign = flags & AlignVerticalMask;
    +
    +  if (textMethod_ != DomText) {
    +    finishPath();
    +    renderStateChanges();
    +  }
    +
    +  switch (textMethod_) {
    +  case Html5Text: 
    +    {
    +      double x = 0, y = 0;
    +      
    +      if (horizontalAlign != currentTextHAlign_) {
    +	js_ << "ctx.textAlign='";
    +	switch (horizontalAlign) {
    +	case AlignLeft: js_ << "left"; break;
    +	case AlignRight: js_ << "right"; break;
    +	case AlignCenter: js_ << "center"; break;
    +	default: break;
    +	}
    +	js_ << "';";
    +	currentTextHAlign_ = horizontalAlign;
    +      }
    +
    +      switch (horizontalAlign) {
    +      case AlignLeft: x = rect.left(); break;
    +      case AlignRight: x = rect.right(); break;
    +      case AlignCenter: x = rect.center().x(); break;
    +      default: break;
    +      }
    +
    +      if (verticalAlign != currentTextVAlign_) {
    +	js_ << "ctx.textBaseline='";
    +	switch (verticalAlign) {
    +	case AlignTop: js_ << "top"; break;
    +	case AlignBottom: js_ << "bottom"; break;
    +	case AlignMiddle: js_ << "middle"; break;
    +	default: break;
    +	}
    +	js_ << "';";
    +	currentTextVAlign_ = verticalAlign;
    +      }
    +
    +      switch (verticalAlign) {
    +      case AlignTop: y = rect.top(); break;
    +      case AlignBottom: y = rect.bottom(); break;
    +      case AlignMiddle: y = rect.center().y(); break;
    +      default: break;
    +      }
    +
    +      if (currentBrush_.color() != currentPen_.color())
    +	js_ << "ctx.fillStyle=\""
    +	    << currentPen_.color().cssText(true) << "\";";
    +
    +      js_ << "ctx.fillText(" << text.jsStringLiteral()
    +	  << ',' << x << ',' << y << ");";
    +
    +      if (currentBrush_.color() != currentPen_.color())
    +	js_ << "ctx.fillStyle=\""
    +	    << currentBrush_.color().cssText(true) << "\";";
    +    }
    +    break;
    +  case MozText:
    +    {
    +      std::string x;
    +
    +      switch (horizontalAlign) {
    +      case AlignLeft:
    +	x = boost::lexical_cast<std::string>(rect.left());
    +	break;
    +      case AlignRight:
    +	x = boost::lexical_cast<std::string>(rect.right())
    +	  + " - ctx.mozMeasureText(" + text.jsStringLiteral() + ")";
    +	break;
    +      case AlignCenter:
    +	x = boost::lexical_cast<std::string>(rect.center().x())
    +	  + " - ctx.mozMeasureText(" + text.jsStringLiteral() + ")/2";
    +	break;
    +      default:
    +	break;
    +      }
    +
    +      double fontSize;
    +      switch (painter()->font().size()) {
    +      case WFont::FixedSize:
    +	fontSize = painter()->font().fixedSize().toPixels();
    +	break;
    +      default:
    +	fontSize = 16;
    +      }
    +
    +      double y = 0;
    +      switch (verticalAlign) {
    +      case AlignTop:
    +	y = rect.top() + fontSize * 0.75; break;
    +      case AlignMiddle:
    +	y = rect.center().y() + fontSize * 0.25; break;
    +      case AlignBottom:
    +	y = rect.bottom() - fontSize * 0.25 ; break;
    +      default:
    +	break;
    +      }
    +
    +      js_ << "ctx.save();";
    +      js_ << "ctx.translate(" << x << ", " << y << ");";
    +      if (currentBrush_.color() != currentPen_.color())
    +	js_ << "ctx.fillStyle=\""
    +	    << currentPen_.color().cssText(true) << "\";";
    +      js_ << "ctx.mozDrawText(" << text.jsStringLiteral() << ");";
    +      js_ << "ctx.restore();";
    +    }
    +    break;
    +  case DomText:
    +    {
    +      WPointF pos = painter()->combinedTransform().map(rect.topLeft());
    +
    +      DomElement *e = DomElement::createNew(DomElement_DIV);
    +      e->setProperty(PropertyStylePosition, "absolute");
    +      e->setProperty(PropertyStyleTop,
    +		     boost::lexical_cast<std::string>(pos.y()) + "px");
    +      e->setProperty(PropertyStyleLeft,
    +		     boost::lexical_cast<std::string>(pos.x()) + "px");
    +      e->setProperty(PropertyStyleWidth,
    +		     boost::lexical_cast<std::string>(rect.width()) + "px");
    +      e->setProperty(PropertyStyleHeight,
    +		     boost::lexical_cast<std::string>(rect.height()) + "px");
    +
    +      DomElement *t = e;
    +
    +      /*
    +       * HTML tricks to center things vertically -- does not work on IE,
    +       * (neither does canvas)
    +       */
    +      if (verticalAlign != AlignTop) {
    +	t = DomElement::createNew(DomElement_DIV);
    +
    +	if (verticalAlign == AlignMiddle) {
    +	  e->setProperty(PropertyStyleDisplay, "table");
    +	  t->setProperty(PropertyStyleDisplay, "table-cell");
    +	  t->setProperty(PropertyStyleVerticalAlign, "middle");
    +	} else if (verticalAlign == AlignBottom) {
    +	  t->setProperty(PropertyStylePosition, "absolute");
    +	  t->setProperty(PropertyStyleWidth, "100%");
    +	  t->setProperty(PropertyStyleBottom, "0px");
    +	}
    +      }
    +
    +      t->setProperty(PropertyInnerHTML,
    +		     WWebWidget::escapeText(text, true).toUTF8());
    +
    +      WFont f = painter()->font();
    +      f.updateDomElement(*t, false, true);
    +
    +      t->setProperty(PropertyStyleColor, painter()->pen().color().cssText());
    +
    +      if (horizontalAlign == AlignRight)
    +	t->setProperty(PropertyStyleTextAlign, "right");
    +      else if (horizontalAlign == AlignCenter)
    +	t->setProperty(PropertyStyleTextAlign, "center");
    +      else
    +	t->setProperty(PropertyStyleTextAlign, "left");
    +
    +      if (t != e)
    +	e->addChild(t);
    +
    +      textElements_.push_back(e);
    +    }
    +  }
    +}
    +
    +void WCanvasPaintDevice::setChanged(WFlags<ChangeFlag> flags)
    +{
    +  changeFlags_ |= flags;
    +}
    +
    +void WCanvasPaintDevice::renderTransform(std::stringstream& s,
    +					 const WTransform& t, bool invert)
    +{
    +  if (!t.isIdentity()) {
    +    char buf[30];
    +    WTransform::TRSRDecomposition d;
    +
    +    t.decomposeTranslateRotateScaleRotate(d);
    +
    +    if (!invert) {
    +      if (std::fabs(d.dx) > EPSILON || std::fabs(d.dy) > EPSILON) {
    +	s << "ctx.translate(" << Utils::round_str(d.dx, 3, buf) << ',';
    +	s << Utils::round_str(d.dy, 3, buf) << ");";
    +      }
    +
    +      if (std::fabs(d.alpha1) > EPSILON)
    +	s << "ctx.rotate(" << d.alpha1 << ");";
    +
    +      if (std::fabs(d.sx - 1) > EPSILON || std::fabs(d.sy - 1) > EPSILON) {
    +	s << "ctx.scale(" << Utils::round_str(d.sx, 3, buf) << ',';
    +	s << Utils::round_str(d.sy, 3, buf) << ");";
    +      }
    +
    +      if (std::fabs(d.alpha2) > EPSILON)
    +	s << "ctx.rotate(" << d.alpha2 << ");";
    +    } else {
    +      if (std::fabs(d.alpha2) > EPSILON)
    +	s << "ctx.rotate(" << -d.alpha2 << ");";
    +
    +      if (std::fabs(d.sx - 1) > EPSILON || std::fabs(d.sy - 1) > EPSILON) {
    +	s << "ctx.scale(" << Utils::round_str(1/d.sx, 3, buf) << ',';
    +	s << Utils::round_str(1/d.sy, 3, buf) << ");";
    +      }
    +
    +      if (std::fabs(d.alpha1) > EPSILON)
    +	s << "ctx.rotate(" << -d.alpha1 << ");";
    +
    +      if (std::fabs(d.dx) > EPSILON || std::fabs(d.dy) > EPSILON) {
    +	s << "ctx.translate(" << Utils::round_str(-d.dx, 3, buf) << ',';
    +	s << Utils::round_str(-d.dy, 3, buf) << ");";
    +      }
    +    }
    +  }
    +}
    +
    +void WCanvasPaintDevice::renderStateChanges()
    +{
    +  if (!changeFlags_)
    +    return;
    +
    +  bool brushChanged
    +    = (changeFlags_ & Brush) && (currentBrush_ != painter()->brush());
    +  bool penChanged
    +    = (changeFlags_ & Pen) && (currentPen_ != painter()->pen());
    +  bool penColorChanged
    +    = penChanged && (currentPen_.color() != painter()->pen().color());
    +  bool shadowChanged
    +    = (changeFlags_ & Shadow) && (currentShadow_ != painter()->shadow());
    +  bool fontChanged
    +    = (changeFlags_ & Font) && (currentFont_ != painter()->font());
    +
    +  if (changeFlags_ & (Transform | Clipping)) {
    +    bool resetTransform = false;
    +
    +    if (changeFlags_ & Clipping) {
    +      finishPath();
    +
    +      js_ << "ctx.restore();ctx.restore();ctx.save();";
    +
    +      const WTransform& t = painter()->clipPathTransform();
    +
    +      renderTransform(js_, t);
    +      if (painter()->hasClipping()) {
    +	pathTranslation_.setX(0);
    +	pathTranslation_.setY(0);
    +
    +	drawPlainPath(js_, painter()->clipPath());
    +	js_ << "ctx.clip();";
    +	busyWithPath_ = false;
    +      }
    +      renderTransform(js_, t, true);
    +
    +      js_ << "ctx.save();";
    +
    +      resetTransform = true;
    +    } else if (changeFlags_ & Transform) {
    +      WTransform f = painter()->combinedTransform();
    +
    +      resetTransform = currentTransform_ != f;
    +
    +      if (busyWithPath_) {
    +	if (   fequal(f.m11(), currentTransform_.m11())
    +	    && fequal(f.m12(), currentTransform_.m12())
    +	    && fequal(f.m21(), currentTransform_.m21())
    +	    && fequal(f.m22(), currentTransform_.m22())) {
    +	  /*
    +	   * Invert scale/rotate to compute the delta needed
    +	   * before applying these transformations to get the
    +	   * same as the global translation.
    +	   */
    +	  double det = f.m11() * f.m22() - f.m12() * f.m21();
    +	  double a11 = f.m22() / det;
    +	  double a12 = -f.m12() / det;
    +	  double a21 = -f.m21() / det;
    +	  double a22 = f.m11() / det;
    +
    +	  double fdx = f.dx() * a11 + f.dy() * a21;
    +	  double fdy = f.dx() * a12 + f.dy() * a22;
    +
    +	  const WTransform& g = currentTransform_;
    +
    +	  double gdx = g.dx() * a11 + g.dy() * a21;
    +	  double gdy = g.dx() * a12 + g.dy() * a22;
    +
    +	  double dx = fdx - gdx;
    +	  double dy = fdy - gdy;
    +
    +	  pathTranslation_.setX(dx);
    +	  pathTranslation_.setY(dy);
    +
    +	  changeFlags_ = 0;
    +
    +	  resetTransform = false;
    +	}
    +      } else if (!resetTransform) {
    +	pathTranslation_.setX(0);
    +	pathTranslation_.setY(0);
    +      }
    +
    +      if (resetTransform) {
    +	finishPath();
    +	js_ << "ctx.restore();ctx.save();";
    +      }
    +    }
    +
    +    if (resetTransform) {
    +      currentTransform_ = painter()->combinedTransform();
    +      renderTransform(js_, currentTransform_);
    +      pathTranslation_.setX(0);
    +      pathTranslation_.setY(0);
    +
    +      penChanged = true;
    +      penColorChanged = true;
    +      brushChanged = true;
    +      shadowChanged = true;
    +      fontChanged = true;
    +      currentTextHAlign_ = currentTextVAlign_ = AlignLength;
    +    }
    +  }
    +
    +  if (penChanged || brushChanged || shadowChanged)
    +    finishPath();
    +
    +  if (penChanged) {
    +    if (penColorChanged)
    +      js_ << "ctx.strokeStyle=\"" << painter()->pen().color().cssText(true)
    +	  << "\";";
    +
    +    js_ << "ctx.lineWidth="
    +	<< painter()->normalizedPenWidth(painter()->pen().width(), true).value()
    +	<< ';';
    +
    +    if (currentPen_.capStyle() != painter()->pen().capStyle())
    +      switch (painter()->pen().capStyle()) {
    +      case FlatCap:
    +	js_ << "ctx.lineCap='butt';";
    +	break;
    +      case SquareCap:
    +	js_ << "ctx.lineCap='square';";
    +	break;
    +      case RoundCap:
    +	js_ << "ctx.lineCap='round';";
    +      }
    +
    +    if (currentPen_.joinStyle() != painter()->pen().joinStyle())
    +      switch (painter()->pen().joinStyle()) {
    +      case MiterJoin:
    +	js_ << "ctx.lineJoin='miter';";
    +	break;
    +      case BevelJoin:
    +	js_ << "ctx.lineJoin='bevel';";
    +	break;
    +      case RoundJoin:
    +	js_ << "ctx.lineJoin='round';";
    +      }
    +
    +    currentPen_ = painter()->pen();
    +  }
    +
    +  if (brushChanged) {
    +    currentBrush_ = painter_->brush();
    +    js_ << "ctx.fillStyle=\"" 
    +	<< currentBrush_.color().cssText(true) << "\";";
    +  }
    +
    +  if (shadowChanged) {
    +    currentShadow_ = painter_->shadow();
    +
    +    js_ << "ctx.shadowOffsetX=" << currentShadow_.offsetX() << ';'
    +	<< "ctx.shadowOffsetY=" << currentShadow_.offsetY() << ';'
    +	<< "ctx.shadowBlur=" << currentShadow_.blur() << ';'
    +	<< "ctx.shadowColor=\"" << currentShadow_.color().cssText(true)
    +	<< "\";";
    +  }
    +
    +  if (fontChanged) {
    +    currentFont_ = painter_->font();
    +
    +    switch (textMethod_) {
    +    case Html5Text: 
    +      js_ << "ctx.font='" << painter()->font().cssText() << "';";
    +      break;
    +    case MozText:
    +      js_ << "ctx.mozTextStyle = '" << painter()->font().cssText() << "';";
    +      break;
    +    case DomText:
    +      break;
    +    }
    +  }
    +
    +  changeFlags_ = 0;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCheckBox b/wt-3.1.7a/src/Wt/WCheckBox
    new file mode 100644
    index 0000000..b3a7f8a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCheckBox
    @@ -0,0 +1,122 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCHECKBOX_H_
    +#define WCHECKBOX_H_
    +
    +#include <Wt/WAbstractToggleButton>
    +
    +namespace Wt {
    +
    +/*! \class WCheckBox Wt/WCheckBox Wt/WCheckBox
    + *  \brief A user control that represents a check box.
    + *
    + * By default, a checkbox can have two states: Wt::Checked or
    + * Wt::Unchecked, which can be inspected using isChecked(), and set
    + * using setChecked().
    + *
    + * A checkbox may also provide a third state, Wt::PartiallyChecked,
    + * which is useful to indicate that it is neither checked or
    + * unchecked. %Wt will use native browser support for this HTML5
    + * extension when available (Safari and MS IE), and use an image-based
    + * workaround otherwise. You may enable support for the third state
    + * using setTristate(), and use setCheckState() and checkState() to
    + * read all three states.
    + *
    + * A label is added as a sibling of the checkbox to the same parent.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WGroupBox *box = new Wt::WGroupBox("In-flight options");
    + *
    + * Wt::WCheckBox *w1 = new Wt::WCheckBox("Vegetarian diet", box);
    + * box->addWidget(new WBreak());
    + * Wt::WCheckBox *w2 = new Wt::WCheckBox("WIFI access", box);
    + * box->addWidget(new WBreak());
    + * Wt::WCheckBox *w3 = new Wt::WCheckBox("AC plug", box);
    + *
    + * w1->setChecked(false);
    + * w2->setChecked(true);
    + * w3->setChecked(true);
    + * \endcode
    + * \elseif java
    + * \code
    + * WGroupBox box = new WGroupBox("In-flight options");
    + *		 
    + * WCheckBox w1 = new WCheckBox("Vegetarian diet", box);
    + * box.addWidget(new WBreak());
    + * WCheckBox w2 = new WCheckBox("WIFI access", box);
    + * box.addWidget(new WBreak());
    + * WCheckBox w3 = new WCheckBox("AC plug", box);
    + *		 
    + * w1.setChecked(false);
    + * w2.setChecked(true);
    + * w3.setChecked(true);
    + * \endcode
    + * \endif
    + *
    + * %WCheckBox is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget corresponds to the HTML <tt>&lt;input
    + * type="checkbox"&gt;</tt> tag. Depending on whether a text is
    + * included, it may be nested in a <tt>&lt;span&gt;</tt> tag which
    + * also includes a rendered WLabel. This widget does not provide
    + * styling, and can be styled using inline or external CSS as
    + * appropriate.
    + *
    + * \sa WAbstractToggleButton
    + */
    +class WT_API WCheckBox : public WAbstractToggleButton
    +{
    +public:
    +  /*! \brief Creates a checkbox with empty label.
    +   */
    +  WCheckBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a checkbox with given label.
    +   */
    +  WCheckBox(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Makes a tristate checkbox.
    +   *
    +   * \note You should enable tristate functionality right after construction
    +   *       and this cannot be modified later.
    +   */
    +  void setTristate(bool tristate = true);
    +
    +  /*! \brief Returns whether the checkbox is tristate.
    +   *
    +   * \sa setTristate()
    +   */
    +  bool isTristate() const { return triState_; }
    +
    +  /*! \brief Sets the check state.
    +   *
    +   * Unless it is a tri-state checkbox, only Wt::Checked and Wt::Unchecked are
    +   * valid states.
    +   */
    +  void setCheckState(CheckState state);
    +
    +  /*! \brief Returns the check state.
    +   *
    +   * \sa setCheckState(), isChecked()
    +   */
    +  CheckState checkState() { return state_; }
    +
    +protected:
    +  virtual void updateInput(DomElement& input, bool all);
    +
    +private:
    +  bool triState_;
    +  bool safariWorkaround_;
    +};
    +
    +}
    +
    +#endif // WCHECKBOX_H_
    diff --git a/wt-3.1.7a/src/Wt/WCheckBox.C b/wt-3.1.7a/src/Wt/WCheckBox.C
    new file mode 100644
    index 0000000..a854ad1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCheckBox.C
    @@ -0,0 +1,64 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WCheckBox"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WJavaScript"
    +
    +#include "DomElement.h"
    +
    +namespace {
    +  Wt::JSlot safariWorkaroundJS("function(obj, e) { obj.onchange(); }");
    +  Wt::JSlot clearOpacityJS("function(obj, e) { obj.style.opacity=''; }");
    +}
    +
    +namespace Wt {
    +
    +WCheckBox::WCheckBox(WContainerWidget *parent)
    +  : WAbstractToggleButton(parent),
    +    triState_(false),
    +    safariWorkaround_(false)
    +{
    +  setFormObject(true);
    +}
    +
    +WCheckBox::WCheckBox(const WString& text, WContainerWidget *parent)
    +  : WAbstractToggleButton(text, parent),
    +    triState_(false),
    +    safariWorkaround_(false)
    +{
    +  setFormObject(true);
    +}
    +
    +void WCheckBox::setTristate(bool tristate)
    +{
    +  triState_ = tristate;
    +
    +  if (triState_) {
    +    if (!supportsIndeterminate(WApplication::instance()->environment()))
    +      clicked().connect(clearOpacityJS);
    +    else if (WApplication::instance()->environment().agentIsSafari()
    +	     && !safariWorkaround_) {
    +      clicked().connect(safariWorkaroundJS);
    +      safariWorkaround_ = true;
    +    }
    +  }
    +}
    +
    +void WCheckBox::setCheckState(CheckState state)
    +{
    +  WAbstractToggleButton::setCheckState(state);
    +}
    +
    +void WCheckBox::updateInput(DomElement& input, bool all)
    +{
    +  if (all)
    +    input.setAttribute("type", "checkbox");
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCircleArea b/wt-3.1.7a/src/Wt/WCircleArea
    new file mode 100644
    index 0000000..9e75e25
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCircleArea
    @@ -0,0 +1,90 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCIRCLE_AREA_H_
    +#define WCIRCLE_AREA_H_
    +
    +#include <Wt/WAbstractArea>
    +
    +namespace Wt {
    +
    +  class WPointF;
    +  class WPoint;
    +
    +/*! \class WCircleArea Wt/WCircleArea Wt/WCircleArea
    + *  \brief A interactive area in a widget, specified by a circle.
    + *
    + * The area may be added to a WImage or WPaintedWidget to provide
    + * interactivity on a circular area of the image. The circle is
    + * specified in pixel coordinates.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WImage *image = new Wt::WImage("images/events.png", this);
    + * Wt::WCircleArea *area = new Wt::WCircleArea(20, 30, 15);
    + * image->addArea(area);
    + *
    + * area->clicked().connect(this, &MyWidget::areaClicked);
    + * \endcode
    + * \endif
    + *
    + * \sa WImage::addArea(), WPaintedWidget::addArea()
    + * \sa WRectArea, WPolygonArea
    + */
    +class WT_API WCircleArea : public WAbstractArea
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Specifies a circular area with center (0, 0) and radius 0. 
    +   */
    +  WCircleArea();
    +
    +  /*! \brief Creates a circular area with given geometry. 
    +   *
    +   * The arguments are in pixel units.
    +   */
    +  WCircleArea(int x, int y, int radius);
    +
    +  /*! \brief Sets the center.
    +   */
    +  void setCenter(const WPoint& point);
    +
    +  /*! \brief Sets the center.
    +   */
    +  void setCenter(const WPointF& point);
    +
    +  /*! \brief Sets the center.
    +   */
    +  void setCenter(int x, int y);
    +
    +  /*! \brief Returns the center X coordinate.
    +   */
    +  int centerX() const { return x_; }
    +
    +  /*! \brief Returns the center Y coordinate.
    +   */
    +  int centerY() const { return y_; }
    +
    +  /*! \brief Sets the radius. 
    +   */
    +  void setRadius(int radius);
    +
    +  /*! \brief Returns the radius.
    +   */
    +  int radius() const { return r_; }
    +
    +private:
    +  int x_, y_, r_;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +};
    +
    +}
    +
    +#endif // WCIRCLE_AREA_H_
    diff --git a/wt-3.1.7a/src/Wt/WCircleArea.C b/wt-3.1.7a/src/Wt/WCircleArea.C
    new file mode 100644
    index 0000000..5bfd9fd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCircleArea.C
    @@ -0,0 +1,60 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WCircleArea"
    +#include "Wt/WPoint"
    +#include "Wt/WPointF"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WCircleArea::WCircleArea()
    +  : x_(0), y_(0), r_(0)
    +{ }
    +
    +WCircleArea::WCircleArea(int x, int y, int radius)
    +  : x_(x), y_(y), r_(radius)
    +{ }
    +
    +void WCircleArea::setCenter(const WPoint& point)
    +{
    +  setCenter(point.x(), point.y());
    +}
    +
    +void WCircleArea::setCenter(const WPointF& point)
    +{
    +  setCenter(static_cast<int>(point.x()),
    +	    static_cast<int>(point.y()));
    +}
    +
    +void WCircleArea::setCenter(int x, int y)
    +{
    +  x_ = x;
    +  y_ = y;
    +
    +  repaint();
    +}
    +
    +void WCircleArea::setRadius(int radius)
    +{
    +  r_ = radius;
    +
    +  repaint();
    +}
    +
    +void WCircleArea::updateDom(DomElement& element, bool all)
    +{
    +  element.setAttribute("shape", "circle");
    +
    +  std::stringstream coords;
    +  coords << x_ << ',' << y_ << ',' << r_;
    +  element.setAttribute("coords", coords.str());
    +
    +  WAbstractArea::updateDom(element, all);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WColor b/wt-3.1.7a/src/Wt/WColor
    new file mode 100644
    index 0000000..58f305d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WColor
    @@ -0,0 +1,161 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCOLOR_H_
    +#define WCOLOR_H_
    +
    +#include <Wt/WString>
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WGlobal>
    +
    +/*! \brief The namespace for %Wt.
    + */
    +namespace Wt {
    +
    +/*! \class WColor Wt/WColor Wt/WColor
    + *  \brief A class that specifies a color.
    + *
    + * A color corresponds to a CSS color. You can specify a color either using
    + * its red/green/blue components, or from a valid CSS name.
    + *
    + * The color supports an alpha channel, which determines the degree of
    + * transparency. An alpha value of 0 is completely transparent (and thus
    + * invisible), while a value of 255 is completely opaque.
    + *
    + * \ingroup style painting
    + */
    +class WT_API WColor
    +{
    +public:
    +  /*! \brief Creates a default color.
    +   *
    +   * The default color is depending on the context, another color (for
    +   * example from a hierarchical parent in a widget tree), or a
    +   * completely transparent color.
    +   */
    +  WColor();
    +
    +  /*! \brief Creates a color with given red/green/blue/alpha components.
    +   *
    +   * All four components must be specified with a value in the range
    +   * (0 - 255). The alpha channel determines the degree of
    +   * transparency. An alpha value of 0 is completely transparent (and
    +   * thus invisible), while a value of 255 is completely opaque.
    +   *
    +   * \sa setRgb(int, int, int, int)
    +   */
    +  WColor(int red, int green, int blue, int alpha = 255);
    +
    +  /*! \brief Creates a color from a CSS name.
    +   *
    +   * The \p name may be any valid CSS color name, including names
    +   * colors such as "aqua", or colors defined as RGB components.
    +   *
    +   * In either case, the result of the methods red(), green() and
    +   * blue() is undefined.
    +   *
    +   * See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color
    +   */
    +  WColor(const WString& name);
    +
    +  /*! \brief Creates a predefined color
    +   *
    +   * Constructs one of the 16 predefined %Wt colors constants.
    +   */
    +  WColor(GlobalColor name);
    +
    +  /*! \brief Sets the red/green/blue/alpha components.
    +   *
    +   * All four components must be specified with a value in the range
    +   * (0 - 255). The alpha channel determines the degree of
    +   * transparency. An alpha value of 0 is completely transparent (and
    +   * thus invisible), while a value of 255 is completely opaque.
    +   */
    +  void setRgb(int red, int green, int blue, int alpha = 255);
    +
    +  /*! \brief Sets the CSS name.
    +   *
    +   * The \p name may be any valid CSS color name, including names
    +   * colors such as "aqua", or colors defined as RGB components.
    +   *
    +   * In either case, the result of the methods red(), green() and
    +   * blue() is undefined.
    +   *
    +   * See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color
    +   */
    +  void setName(const WString& name);
    +
    +  /*! \brief Returns if the color is the default color.
    +   *
    +   * \sa WColor()
    +   */
    +  bool isDefault() const { return default_; }
    +
    +  /*! \brief Returns the red component.
    +   *
    +   * Only available when the color was specified in terms of the RGB
    +   * components using setRgb(int, int, int, int) or WColor(int, int,
    +   * int, int).
    +   */
    +  int red() const { return red_; }
    +
    +  /*! \brief Returns the green component.
    +   *
    +   * Only available when the color was specified in terms of the RGB
    +   * components using setRgb(int, int, int, int) or WColor(int, int,
    +   * int, int).
    +   */
    +  int green() const { return green_; }
    +
    +  /*! \brief Returns the blue component.
    +   *
    +   * Only available when the color was specified in terms of the RGB
    +   * components using setRgb(int, int, int, int) or WColor(int, int,
    +   * int, int).
    +   */
    +  int blue() const { return blue_; }
    +
    +  /*! \brief Returns the alpha component.
    +   *
    +   * Only available when the color was specified in terms of the RGB
    +   * components using setRgb(int, int, int, int) or WColor(int, int,
    +   * int, int).
    +   */
    +  int alpha() const { return alpha_; }
    +
    +  /*! \brief Returns the CSS name.
    +   *
    +   * Only available when it was set with setName(const WString&) or
    +   * WColor(const WString& name).
    +   */
    +  const WString& name() const { return name_; }
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the two colors were defined in exactly the same way.
    +   * It may return \c false although they actually represent the same color.
    +   */
    +  bool operator== (const WColor& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns false if the two colors were not defined in exactly the
    +   * same way. It may return return although they actually represent
    +   * the same color.
    +   */
    +  bool operator!= (const WColor& other) const;
    +
    +  const std::string cssText(bool withAlpha = false) const;
    +
    +private:
    +  bool    default_;
    +  int     red_, green_, blue_, alpha_;
    +  WString name_;
    +};
    +
    +}
    +
    +#endif // WCOLOR
    diff --git a/wt-3.1.7a/src/Wt/WColor.C b/wt-3.1.7a/src/Wt/WColor.C
    new file mode 100644
    index 0000000..884a9d8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WColor.C
    @@ -0,0 +1,127 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +#include <sstream>
    +
    +#include "Wt/WColor"
    +#include "Utils.h"
    +#include "EscapeOStream.h"
    +
    +namespace Wt {
    +
    +WColor::WColor()
    +  : default_(true),
    +    red_(0),
    +    green_(0),
    +    blue_(0),
    +    alpha_(255)
    +{ }
    +
    +WColor::WColor(int r, int g, int b, int a)
    +  : default_(false),
    +    red_(r),
    +    green_(g),
    +    blue_(b),
    +    alpha_(a)
    +{ }
    +
    +WColor::WColor(const WString& name)
    +  : default_(false),
    +    red_(-1),
    +    green_(-1),
    +    blue_(-1),
    +    alpha_(255),
    +    name_(name)
    +{ }
    +
    +WColor::WColor(Wt::GlobalColor name)
    +{
    +  switch(name) {
    +  case Wt::white:       setRgb(0xff, 0xff, 0xff); break;
    +  case Wt::black:       setRgb(0x00, 0x00, 0x00); break;
    +  case Wt::red:         setRgb(0xff, 0x00, 0x00); break;
    +  case Wt::darkRed:     setRgb(0x80, 0x00, 0x00); break;
    +  case Wt::green:       setRgb(0x00, 0xff, 0x00); break;
    +  case Wt::darkGreen:   setRgb(0x00, 0x80, 0x00); break;
    +  case Wt::blue:        setRgb(0x00, 0x00, 0xff); break;
    +  case Wt::darkBlue:    setRgb(0x00, 0x00, 0x80); break;
    +  case Wt::cyan:        setRgb(0x00, 0xff, 0xff); break;
    +  case Wt::darkCyan:    setRgb(0x00, 0x80, 0x80); break;
    +  case Wt::magenta:     setRgb(0xff, 0x00, 0xff); break;
    +  case Wt::darkMagenta: setRgb(0x80, 0x00, 0x80); break;
    +  case Wt::yellow:      setRgb(0xff, 0xff, 0x00); break;
    +  case Wt::darkYellow:  setRgb(0x80, 0x80, 0x00); break;
    +  case Wt::gray:        setRgb(0xa0, 0xa0, 0xa4); break;
    +  case Wt::darkGray:    setRgb(0x80, 0x80, 0x80); break;
    +  case Wt::lightGray:   setRgb(0xc0, 0xc0, 0xc0); break;
    +  case Wt::transparent: setRgb(0x00, 0x00, 0x00, 0x00); break;
    +  }
    +}
    +
    +bool WColor::operator==(const WColor& other) const
    +{
    +  return ((default_ == other.default_)
    +	  && (red_ == other.red_)
    +	  && (green_ == other.green_)
    +	  && (blue_ == other.blue_)
    +	  && (alpha_ == other.alpha_)
    +	  && (name_ == other.name_));
    +}
    +
    +bool WColor::operator!=(const WColor& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +void WColor::setRgb(int red, int green, int blue, int alpha)
    +{
    +  default_ = false;
    +  name_ = WString();
    +
    +  red_ = red;
    +  green_ = green;
    +  blue_ = blue;
    +  alpha_ = alpha;
    +}
    +
    +void WColor::setName(const WString& name)
    +{
    +  default_ = false;
    +  red_ = green_ = blue_ = -1;
    +  alpha_ = 255;
    +}
    +
    +const std::string WColor::cssText(bool withAlpha) const
    +{
    +  if (default_)
    +    return std::string();
    +  else {
    +    if (!name_.empty())
    +      return name_.toUTF8();
    +    else {
    +      EscapeOStream s;
    +#ifndef WT_TARGET_JAVA
    +      char buf[30];
    +#else
    +      char *buf;
    +#endif
    +      if (alpha_ != 255 && withAlpha) {
    +	s << "rgba(" << Utils::itoa(red_, buf);
    +	s << ',' << Utils::itoa(green_, buf);
    +	s << ',' << Utils::itoa(blue_, buf);
    +	s << ',' << Utils::round_str(alpha_ / 255., 2, buf) << ')';
    +      }	else {
    +	s << "rgb(" << Utils::itoa(red_, buf);
    +	s << ',' << Utils::itoa(green_, buf);
    +	s << ',' << Utils::itoa(blue_, buf) << ')';
    +      }
    +
    +      return s.c_str();
    +    }
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings b/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings
    new file mode 100644
    index 0000000..7ae2382
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings
    @@ -0,0 +1,66 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCOMBINED_LOCALIZED_STRINGS_
    +#define WCOMBINED_LOCALIZED_STRINGS_
    +
    +#include <vector>
    +#include <Wt/WLocalizedStrings>
    +
    +namespace Wt {
    +
    +class WMessageResources;
    +
    +/*! \class WCombinedLocalizedStrings Wt/WCombinedLocalizedStrings Wt/WCombinedLocalizedStrings
    + *  \brief A localized string resolver that bundles multiple string resolvers.
    + *
    + * This class implements the localized strings interface and delegates
    + * WString::tr() string resolution to one or more string
    + * resolvers. You will typically use this class if you want to combine
    + * different methods of string resolution (e.g. some from files, and
    + * other strings using a database).
    + *
    + * \sa WApplication::setLocalizedStrings()
    + */
    +class WT_API WCombinedLocalizedStrings : public WLocalizedStrings
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WCombinedLocalizedStrings();
    +
    +  virtual ~WCombinedLocalizedStrings();
    +
    +  /*! \brief Adds a string resolver.
    +   *
    +   * resolveKey() will consult each string resolver in the order they have
    +   * been added.
    +   */
    +  void add(WLocalizedStrings* stringResolver);
    +
    +  /*! \brief Returns all string resolver
    +   *
    +   * Returns the list of all string resolvers that were added by
    +   * a call to add().
    +   */
    +  const std::vector<WLocalizedStrings *> &items() const;
    +
    +  virtual void refresh();
    +  virtual void hibernate();
    +
    +#ifndef WT_TARGET_JAVA
    +  virtual bool resolveKey(const std::string& key, std::string& result);
    +#else // WT_TARGET_JAVA
    +  virtual std::string *resolveKey(const std::string& key) = 0;
    +#endif // WT_TARGET_JAVA
    +
    +private:
    +  std::vector<WLocalizedStrings *> localizedStrings_;
    +};
    +
    +}
    +
    +#endif // WCOMBINED_LOCALIZED_STRINGS_
    diff --git a/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings.C b/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings.C
    new file mode 100644
    index 0000000..e9dcce8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCombinedLocalizedStrings.C
    @@ -0,0 +1,71 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WCombinedLocalizedStrings"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WCombinedLocalizedStrings::WCombinedLocalizedStrings()
    +{ }
    +
    +WCombinedLocalizedStrings::~WCombinedLocalizedStrings()
    +{
    +  for (unsigned i = 0; i < localizedStrings_.size(); ++i)
    +    delete localizedStrings_[i];
    +}
    +
    +void WCombinedLocalizedStrings::add(WLocalizedStrings* localizedStrings)
    +{
    +  localizedStrings_.push_back(localizedStrings);
    +}
    +
    +const std::vector<WLocalizedStrings *> &
    +WCombinedLocalizedStrings::items() const
    +{
    +  return localizedStrings_;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WCombinedLocalizedStrings::resolveKey(const std::string& key,
    +					   std::string& result)
    +{
    +  for (unsigned i = 0; i < localizedStrings_.size(); ++i) {
    +    if (localizedStrings_[i]->resolveKey(key, result))
    +      return true;
    +  }
    +
    +  return false;
    +}
    +#else
    +std::string *WCombinedLocalizedStrings::resolveKey(const std::string& key)
    +{
    +  std::string *result = 0; 
    +
    +  for (unsigned i = 0; i < localizedStrings_.size(); ++i) {
    +    result = localizedStrings_[i]->resolveKey(key);
    +    if (result)
    +      return result;
    +  }
    +
    +  return 0;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WCombinedLocalizedStrings::refresh()
    +{
    +  for (unsigned i = 0; i < localizedStrings_.size(); ++i) {
    +    localizedStrings_[i]->refresh();
    +  }
    +}
    +
    +void WCombinedLocalizedStrings::hibernate()
    +{
    +  for (unsigned i = 0; i < localizedStrings_.size(); ++i)
    +    localizedStrings_[i]->hibernate();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WComboBox b/wt-3.1.7a/src/Wt/WComboBox
    new file mode 100644
    index 0000000..015330e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WComboBox
    @@ -0,0 +1,226 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCOMBOBOX_H_
    +#define WCOMBOBOX_H_
    +
    +#include <Wt/WAbstractItemModel>
    +#include <Wt/WFormWidget>
    +#include <string>
    +
    +namespace Wt {
    +
    +/*! \class WComboBox Wt/WComboBox Wt/WComboBox
    + *  \brief A widget that provides a drop-down combo-box control.
    + *
    + * A combo box provides the user with a set of options, from which one
    + * option may be selected.
    + *
    + * %WComboBox is an MVC view class, using a simple string list model
    + * by default. The model may be populated using addItem(const
    + * WString&) or insertItem(int, const WString&) and the contents can
    + * be cleared through clear(). These methods manipulate the underlying
    + * model().
    + *
    + * To use the combo box with a custom model instead of the default
    + * WStringListModel, use setModel().
    + *
    + * To react to selection events, connect to the changed(), activated()
    + * or sactivated() signals.
    + *
    + * At all times, the current selection index is available through
    + * currentIndex() and the current selection text using currentText().
    + *
    + * WComboBox does not have support for auto-completion, this behaviour
    + * can be found in the WSuggestionPopup.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WComboBox *combo = new Wt::WComboBox(this);
    + * combo->addItem("Clint Eastwood");
    + * combo->addItem("Mick Jagger");
    + * combo->addItem("Johnny Depp");
    + * combo->addItem("Kate Winslet");
    + *
    + * combo->setCurrentIndex(2); // Johnny Depp
    + * combo->activated().connect(this, &MyWidget::comboChanged);
    + * \endcode
    + * \endif 
    + *
    + * %WComboBox is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;select&gt;</tt> tag and
    + * does not provide styling. It can be styled using inline or external
    + * CSS as appropriate.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WComboBox : public WFormWidget
    +{
    +public:
    +  /*! \brief Creates an empty combo-box with optional <i>parent</i>.
    +   */
    +  WComboBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Adds an option item.
    +   *
    +   * Equivalent to
    +   * \link insertItem(int, const WString&) insertItem\endlink (count(),
    +   * \p text).
    +   */
    +  void addItem(const WString& text);
    +
    +  /*! \brief Returns the number of items
    +   */
    +  int count() const;
    +
    +  /*! \brief Returns the currently selected item.
    +   *
    +   * If no item is currently selected, the method returns -1.
    +   *
    +   * The default value is 0, unless the combo box is empty.
    +   */
    +  int currentIndex() const;
    +
    +  /*! \brief Inserts an item at the specified position.
    +   *
    +   * The item is inserted in the underlying model at position
    +   * \p index. This requires that the model() is editable.
    +   *
    +   * \sa addItem(const WString&), removeItem(int)
    +   */
    +  void insertItem(int index, const WString& text);
    +
    +  /*! \brief Removes the item at the specified position.
    +   *
    +   * The item is removed from the underlying model. This requires that
    +   * the model() is editable.
    +   *
    +   * \sa insertItem(int index, const WString&), clear()
    +   */
    +  void removeItem(int index);
    +
    +  /*! \brief Changes the current selection.
    +   *
    +   * Specify a value of -1 for \p index to clear the selection.
    +   */
    +  void setCurrentIndex(int index);
    +
    +  /*! \brief Changes the text for a specified option.
    +   *
    +   * The text for the item at position \p index is changed. This requires
    +   * that the model() is editable.
    +   */
    +  void setItemText(int index, const WString& text);
    +
    +  /*! \brief Returns the text of the currently selected item.
    +   *
    +   * \sa currentIndex(), itemText(int) const
    +   */
    +  const WString currentText() const;
    +
    +  /*! \brief Returns the text of a particular item.
    +   *
    +   * \sa setItemText(int, const WString&), currentText()
    +   */
    +  const WString itemText(int index) const;
    +
    +  /*! \brief Sets the model to be used for the items.
    +   *
    +   * The \p model may not be 0, and ownership of the model is not
    +   * transferred.
    +   *
    +   * The default value is a WStringListModel that is owned by the
    +   * combo box.
    +   *
    +   * \sa setModelColumn(int)
    +   */
    +  void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Sets the column in the model to be used for the items.
    +   *
    +   * The column \p index in the model will be used to retrieve data.
    +   *
    +   * The default value is 0.
    +   *
    +   * \sa setModel()
    +   */
    +  void setModelColumn(int index);
    +
    +  /*! \brief Returns the data model.
    +   *
    +   * \sa setModel()
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Returns the index of the first item that matches a text.
    +   */
    +  int findText(const WString& text,
    +	       WFlags<MatchFlag> flags = MatchExactly | MatchCaseSensitive);
    +
    +  WValidator::State validate();
    +
    +  virtual void refresh();
    +
    +  /*! \brief Clears all items.
    +   *
    +   * Removes all items from the underlying model. This requires that the
    +   * model() is editable.
    +   */
    +  void clear();
    +
    +  /*! \brief %Signal emitted when the selection changed.
    +   *
    +   * The newly selected item is passed as an argument.
    +   *
    +   * \sa sactivated(), currentIndex()
    +   */
    +  Signal<int>& activated() { return activated_; }
    +
    +  /*! \brief %Signal emitted when the selection changed.
    +   *
    +   * The newly selected text is passed as an argument.
    +   *
    +   * \sa activated(), currentText()
    +   */
    +  Signal<WString>& sactivated() { return sactivated_; }
    +
    +private:
    +  WAbstractItemModel *model_;
    +  int modelColumn_;
    +  int currentIndex_;
    +
    +  bool itemsChanged_;
    +  bool selectionChanged_;
    +  bool currentlyConnected_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  Signal<int>     activated_;
    +  Signal<WString> sactivated_;
    +
    +  void itemsChanged();
    +  void propagateChange();
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void propagateRenderOk(bool deep);
    +
    +  virtual void setFormData(const FormData& formData);
    +
    +  virtual bool isSelected(int index) const;
    +  virtual void dummy();
    +
    +  friend class WSelectionBox;
    +};
    +
    +}
    +
    +#endif // WCOMBOBOX_H_
    diff --git a/wt-3.1.7a/src/Wt/WComboBox.C b/wt-3.1.7a/src/Wt/WComboBox.C
    new file mode 100644
    index 0000000..eb08025
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WComboBox.C
    @@ -0,0 +1,294 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WComboBox"
    +#include "Wt/WLogger"
    +#include "Wt/WStringListModel"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WComboBox::WComboBox(WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    model_(0),
    +    modelColumn_(0),
    +    currentIndex_(-1),
    +    itemsChanged_(false),
    +    selectionChanged_(false),
    +    currentlyConnected_(false),
    +    activated_(this),
    +    sactivated_(this)
    +{ 
    +  setInline(true);
    +  setFormObject(true);
    +
    +  setModel(new WStringListModel(this));
    +}
    +
    +void WComboBox::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +
    +  modelConnections_.push_back
    +    (model_->columnsInserted().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +    (model_->columnsRemoved().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +     (model_->rowsInserted().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +     (model_->rowsRemoved().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +     (model_->dataChanged().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +     (model_->modelReset().connect(this, &WComboBox::itemsChanged));
    +  modelConnections_.push_back
    +    (model_->layoutChanged().connect(this, &WComboBox::itemsChanged));
    +
    +  /* Redraw contents of the combo box to match the contents of the new model.
    +   */
    +  refresh();
    +}
    +
    +void WComboBox::setModelColumn(int index)
    +{
    +  modelColumn_ = index;
    +}
    +
    +void WComboBox::addItem(const WString& text)
    +{
    +  insertItem(count(), text);
    +}
    +
    +int WComboBox::count() const
    +{
    +  return model_->rowCount();
    +}
    +
    +int WComboBox::currentIndex() const
    +{
    +  return currentIndex_;
    +}
    +
    +const WString WComboBox::currentText() const
    +{
    +  if (currentIndex_ != -1)
    +    return asString(model_->data(currentIndex_, modelColumn_));
    +  else
    +    return WString();
    +}
    +
    +void WComboBox::insertItem(int index, const WString& text)
    +{
    +  if (model_->insertRow(index))
    +    setItemText(index, text);
    +}
    +
    +const WString WComboBox::itemText(int index) const
    +{
    +  return asString(model_->data(index, modelColumn_));
    +}
    +
    +void WComboBox::removeItem(int index)
    +{
    +  model_->removeRow(index);
    +
    +  setCurrentIndex(currentIndex_);
    +}
    +
    +void WComboBox::setCurrentIndex(int index)
    +{
    +  int newIndex = std::min(index, count() - 1);
    +
    +  if (currentIndex_ != newIndex) {
    +    currentIndex_ = newIndex;
    +
    +    selectionChanged_ = true;
    +    repaint(RepaintPropertyIEMobile);
    +
    +    // changed().emit();
    +  }
    +}
    +
    +void WComboBox::setItemText(int index, const WString& text)
    +{
    +  model_->setData(index, modelColumn_, boost::any(text));
    +}
    +
    +void WComboBox::clear()
    +{
    +  model_->removeRows(0, count());
    +
    +  setCurrentIndex(currentIndex_);
    +}
    +
    +void WComboBox::propagateChange()
    +{
    +  /*
    +   * copy values for when widget would be deleted from activated_.emit()
    +   */
    +  int myCurrentIndex = currentIndex_;
    +  WString myCurrentValue;
    +
    +  if (currentIndex_ != -1)
    +    myCurrentValue = currentText();
    +
    +#ifndef WT_TARGET_JAVA
    +
    +  /*
    +   * use this connection to know if the widget was killed
    +   */
    +  boost::signals::connection alive
    +    = sactivated_.connect(this, &WComboBox::dummy);
    +
    +  activated_.emit(currentIndex_);
    +
    +  if (alive.connected()) {
    +    alive.disconnect();
    +
    +    if (myCurrentIndex != - 1)
    +      sactivated_.emit(myCurrentValue);
    +  }
    +
    +#else // WT_TARGET_JAVA
    +
    +  activated_.emit(currentIndex_);
    +  if (myCurrentIndex != - 1)
    +    sactivated_.emit(myCurrentValue);
    +
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WComboBox::dummy()
    +{ }
    +
    +bool WComboBox::isSelected(int index) const
    +{
    +  return index == currentIndex_;
    +}
    +
    +void WComboBox::updateDom(DomElement& element, bool all)
    +{
    +  if (itemsChanged_ || all) {
    +    if (all && count() > 0 && currentIndex_ == -1)
    +      currentIndex_ = 0;
    +
    +    if (!all)
    +      element.removeAllChildren();
    +
    +    for (int i = 0; i < count(); ++i) {
    +      DomElement *item = DomElement::createNew(DomElement_OPTION);
    +      item->setProperty(PropertyValue, boost::lexical_cast<std::string>(i));
    +      item->setProperty(PropertyInnerHTML,
    +			escapeText(asString(model_->data(i, modelColumn_)))
    +			.toUTF8());
    +      if (isSelected(i))
    +	item->setProperty(PropertySelected, "true");
    +
    +      WString sc = asString(model_->data(i, modelColumn_, StyleClassRole));
    +      if (!sc.empty())
    +	item->setProperty(PropertyClass, sc.toUTF8());
    +
    +      element.addChild(item);
    +    }
    +
    +    itemsChanged_ = false;
    +  }
    +
    +  if (selectionChanged_) {
    +    element.setProperty(PropertySelectedIndex,
    +			boost::lexical_cast<std::string>(currentIndex_));
    +    selectionChanged_ = false;
    +  }
    +
    +  if (!currentlyConnected_
    +      && (activated_.isConnected() || sactivated_.isConnected())) {
    +    currentlyConnected_ = true;
    +    changed().connect(this, &WComboBox::propagateChange);
    +  }
    +
    +  WFormWidget::updateDom(element, all);
    +}
    +
    +void WComboBox::propagateRenderOk(bool deep)
    +{
    +  itemsChanged_ = false;
    +  selectionChanged_ = false;
    +
    +  WFormWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WComboBox::domElementType() const
    +{
    +  return DomElement_SELECT;
    +}
    +
    +void WComboBox::setFormData(const FormData& formData)
    +{
    +  if (selectionChanged_)
    +    return;
    +
    +  if (!Utils::isEmpty(formData.values)) {
    +    const std::string& value = formData.values[0];
    +
    +    if (!value.empty()) {
    +      try {
    +	currentIndex_ = boost::lexical_cast<int>(value);
    +      } catch (boost::bad_lexical_cast& e) {
    +	wApp->log("error") << "WComboBox received illegal form value: '"
    +			   << value << "'";
    +      }
    +    } else
    +      currentIndex_ = -1;
    +  }
    +}
    +
    +void WComboBox::refresh()
    +{
    +  itemsChanged();
    +
    +  WFormWidget::refresh();
    +}
    +
    +WValidator::State WComboBox::validate()
    +{
    +  if (validator()) {
    +    WT_USTRING text = currentText();
    +
    +    return validator()->validate(text);
    +  } else
    +    return WValidator::Valid;
    +}
    +
    +void WComboBox::itemsChanged()
    +{
    +  itemsChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +int WComboBox::findText(const WString& text, WFlags<MatchFlag> flags)
    +{
    +  WModelIndexList list = model_->match(model_->index(0, modelColumn_),
    +				       DisplayRole, boost::any(text),
    +				       1, flags);
    +
    +  if (list.empty())
    +    return -1;
    +  else
    +    return list[0].row();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCompositeWidget b/wt-3.1.7a/src/Wt/WCompositeWidget
    new file mode 100644
    index 0000000..a9db942
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCompositeWidget
    @@ -0,0 +1,179 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCOMPOSITE_WIDGET_H_
    +#define WCOMPOSITE_WIDGET_H_
    +
    +#include <Wt/WWidget>
    +
    +namespace Wt {
    +
    +/*! \class WCompositeWidget Wt/WCompositeWidget Wt/WCompositeWidget
    + *  \brief A widget that hides the implementation of composite widgets.
    + *
    + * Composite widgets, built on top of the WebWidgets, should derive
    + * from this class, and use setImplementation() to set the widget that
    + * implements the composite widget (which is typically a WContainerWidget
    + * or a WTable, or another widget that allows composition, including perhaps
    + * another %WCompositeWidget).
    + *
    + * Using this class you can completely hide the implementation of your
    + * composite widget, and provide access to only the standard WWidget
    + * methods.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * class MyWidget : public Wt::WCompositeWidget
    + * {
    + * public:
    + *   MyWidget(WContainerWidget *parent = 0)
    + *     : WCompositeWidget(parent)
    + *       // initialize members ...
    + *   {
    + *     setImplementation(impl_ = new WContainerWidget());
    + *
    + *     // further initialization code ...
    + *   }
    + *
    + * private:
    + *   Wt::ContainerWidget *impl_;
    + * };
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is propagated to its implementation.
    + */
    +class WT_API WCompositeWidget : public WWidget
    +{
    +public:
    +  /*! \brief Creates a %WCompositeWidget.
    +   *
    +   * You need to set an implemetation using setImplementation().
    +   */
    +  WCompositeWidget(WContainerWidget* parent = 0);
    +
    +  /*! \brief Creates a %WCompositeWidget with given implementation.
    +   */
    +  WCompositeWidget(WWidget *implementation, WContainerWidget* parent);
    +
    +  ~WCompositeWidget();
    +
    +  virtual const std::string id() const;
    +
    +  virtual void setPositionScheme(PositionScheme scheme);
    +  virtual PositionScheme positionScheme() const;
    +  virtual void setOffsets(const WLength& offset, WFlags<Side> sides = All);
    +  virtual WLength offset(Side s) const;
    +  virtual void resize(const WLength& width, const WLength& height);
    +  virtual WLength width() const;
    +  virtual WLength height() const;
    +  virtual void setMinimumSize(const WLength& width, const WLength& height);
    +  virtual WLength minimumWidth() const;
    +  virtual WLength minimumHeight() const;
    +  virtual void setMaximumSize(const WLength& width, const WLength& height);
    +  virtual WLength maximumWidth() const;
    +  virtual WLength maximumHeight() const;
    +  virtual void setLineHeight(const WLength& height);
    +  virtual WLength lineHeight() const;
    +  virtual void setFloatSide(Side s);
    +  virtual Side floatSide() const;
    +  virtual void setClearSides(WFlags<Side> sides);
    +  virtual WFlags<Side> clearSides() const;
    +  virtual void setMargin(const WLength& margin, WFlags<Side> sides = All);
    +  virtual WLength margin(Side side) const;
    +  virtual void setHiddenKeepsGeometry(bool enabled);
    +  virtual bool hiddenKeepsGeometry() const;
    +  virtual void setHidden(bool);
    +  virtual bool isHidden() const;
    +  virtual bool isVisible() const;
    +  virtual void setDisabled(bool);
    +  virtual bool isDisabled() const;
    +  virtual bool isEnabled() const;
    +  virtual void setPopup(bool);
    +  virtual bool isPopup() const;
    +  virtual void setInline(bool);
    +  virtual bool isInline() const;
    +  virtual void setDecorationStyle(const WCssDecorationStyle& style);
    +  virtual WCssDecorationStyle& decorationStyle();
    +  virtual void setStyleClass(const WT_USTRING& styleClass);
    +  void setStyleClass(const char *styleClass);
    +  virtual WT_USTRING styleClass() const;
    +  virtual void addStyleClass(const WT_USTRING& styleClass, bool force = false);
    +  void addStyleClass(const char *styleClass, bool force = false);
    +  virtual void removeStyleClass(const WT_USTRING& styleClass,
    +				bool force = false);
    +  void removeStyleClass(const char *styleClass, bool force = false);
    +  virtual void setVerticalAlignment(AlignmentFlag alignment,
    +				    const WLength& length = WLength::Auto);
    +  virtual AlignmentFlag verticalAlignment() const;
    +  virtual WLength verticalAlignmentLength() const;
    +  virtual WWebWidget *webWidget();
    +  virtual void setToolTip(const WString& text);
    +  virtual WString toolTip() const;
    +  virtual void refresh();
    +  virtual void setAttributeValue(const std::string& name,
    +				 const WT_USTRING& value);
    +  virtual WT_USTRING attributeValue(const std::string& name) const;
    +  virtual void setJavaScriptMember(const std::string& name,
    +				   const std::string& value);
    +  virtual std::string javaScriptMember(const std::string& name) const;
    +  virtual void callJavaScriptMember(const std::string& name,
    +				    const std::string& args);
    +  virtual void load();
    +  virtual bool loaded() const;
    +  virtual void setTabIndex(int index);
    +  virtual int tabIndex() const;
    +  virtual void setId(const std::string& id);
    +  virtual WWidget *find(const std::string& name);
    +  virtual void setSelectable(bool selectable);  
    +
    +  virtual void propagateSetEnabled(bool enabled);
    +
    +protected:
    +  virtual void addChild(WWidget *child);
    +  virtual void removeChild(WWidget *child);
    +  virtual void setHideWithOffsets(bool how);
    +
    +  virtual bool isStubbed() const;
    +  virtual void enableAjax();
    +
    +  /*! \brief Set the implementation widget
    +   *
    +   * This sets the widget that implements this compositeWidget. Ownership
    +   * of the widget is completely transferred (including deletion).
    +   */
    +  void setImplementation(WWidget *widget);
    + 
    +  /*! \brief Get the implementation widget
    +   *
    +   * This returns the widget that implements this compositeWidget.
    +   */
    +  WWidget* implementation() {
    +    return impl_;
    +  };
    +
    +  virtual void getSDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app);
    +  virtual bool needsToBeRendered() const;
    +
    +  virtual int boxPadding(Orientation orientation) const;
    +  virtual int boxBorder(Orientation orientation) const;
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +private:
    +  WWidget *impl_;
    +
    +  virtual void setLayout(WLayout *layout);
    +  virtual WLayout *layout();
    +  virtual WLayoutItemImpl *createLayoutItemImpl(WLayoutItem *layoutItem);
    +};
    +
    +}
    +
    +#endif // WCOMPOSITE_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WCompositeWidget.C b/wt-3.1.7a/src/Wt/WCompositeWidget.C
    new file mode 100644
    index 0000000..fb76ecb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCompositeWidget.C
    @@ -0,0 +1,489 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + *
    + * Integrated memory management to XLObject
    + * abj <xynopsis@yahoo.com> 2006.4.20
    + *
    + */
    +
    +#include "Wt/WCompositeWidget"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WCompositeWidget::WCompositeWidget(WContainerWidget *parent)
    +  : WWidget(parent),
    +    impl_(0)
    +{
    +  if (parent)
    +    parent->addWidget(this);
    +}
    +
    +WCompositeWidget::WCompositeWidget(WWidget *implementation,
    +				   WContainerWidget *parent)
    +  : WWidget(parent),
    +    impl_(0)
    +{
    +  if (parent)
    +    parent->addWidget(this);
    +
    +  setImplementation(implementation);
    +}
    +
    +WCompositeWidget::~WCompositeWidget()
    +{
    +  setParentWidget(0);
    +
    +  delete impl_;
    +}
    +
    +const std::string WCompositeWidget::id() const
    +{
    +  return impl_->id();
    +}
    +
    +void WCompositeWidget::setId(const std::string& id)
    +{
    +  impl_->setId(id);
    +}
    +
    +WWidget *WCompositeWidget::find(const std::string& name)
    +{
    +  return impl_->find(name);
    +}
    +
    +void WCompositeWidget::setSelectable(bool selectable)
    +{
    +  impl_->setSelectable(selectable);
    +}
    +
    +void WCompositeWidget::setPositionScheme(PositionScheme scheme)
    +{
    +  impl_->setPositionScheme(scheme);
    +}
    +
    +PositionScheme WCompositeWidget::positionScheme() const
    +{
    +  return impl_->positionScheme();
    +}
    +
    +void WCompositeWidget::setOffsets(const WLength& offset, WFlags<Side> sides)
    +{
    +  impl_->setOffsets(offset, sides);
    +}
    +
    +WLength WCompositeWidget::offset(Side s) const
    +{
    +  return impl_->offset(s);
    +}
    +
    +void WCompositeWidget::resize(const WLength& width, const WLength& height)
    +{
    +  impl_->resize(width, height);
    +
    +  WWidget::resize(width, height);
    +}
    +
    +WLength WCompositeWidget::width() const
    +{
    +  return impl_->width();
    +}
    +
    +WLength WCompositeWidget::height() const
    +{
    +  return impl_->height();
    +}
    +
    +void WCompositeWidget::setMinimumSize(const WLength& width, const WLength& height)
    +{
    +  impl_->setMinimumSize(width, height);
    +}
    +
    +WLength WCompositeWidget::minimumWidth() const
    +{
    +  return impl_->minimumWidth();
    +}
    +
    +WLength WCompositeWidget::minimumHeight() const
    +{
    +  return impl_->minimumHeight();
    +}
    +
    +void WCompositeWidget::setMaximumSize(const WLength& width, const WLength& height)
    +{
    +  impl_->setMaximumSize(width, height);
    +}
    +
    +WLength WCompositeWidget::maximumWidth() const
    +{
    +  return impl_->maximumWidth();
    +}
    +
    +WLength WCompositeWidget::maximumHeight() const
    +{
    +  return impl_->maximumHeight();
    +}
    +
    +void WCompositeWidget::setLineHeight(const WLength& height)
    +{
    +  impl_->setLineHeight(height);
    +}
    +
    +WLength WCompositeWidget::lineHeight() const
    +{
    +  return impl_->lineHeight();
    +}
    +
    +void WCompositeWidget::setFloatSide(Side s)
    +{
    +  impl_->setFloatSide(s);
    +}
    +
    +Side WCompositeWidget::floatSide() const
    +{
    +  return impl_->floatSide();
    +}
    +
    +void WCompositeWidget::setClearSides(WFlags<Side> sides)
    +{
    +  impl_->setClearSides(sides);
    +}
    +
    +WFlags<Side> WCompositeWidget::clearSides() const
    +{
    +  return impl_->clearSides();
    +}
    +
    +void WCompositeWidget::setMargin(const WLength& margin, WFlags<Side> sides)
    +{
    +  impl_->setMargin(margin, sides);
    +}
    +
    +WLength WCompositeWidget::margin(Side side) const
    +{
    +  return impl_->margin(side);
    +}
    +
    +void WCompositeWidget::setHiddenKeepsGeometry(bool enabled)
    +{
    +  impl_->setHiddenKeepsGeometry(enabled);
    +}
    +
    +bool WCompositeWidget::hiddenKeepsGeometry() const
    +{
    +  return impl_->hiddenKeepsGeometry();
    +}
    +
    +void WCompositeWidget::setHidden(bool how)
    +{
    +  impl_->setHidden(how);
    +}
    +
    +bool WCompositeWidget::isHidden() const
    +{
    +  return impl_->isHidden();
    +}
    +
    +bool WCompositeWidget::isVisible() const
    +{
    +  if (isHidden())
    +    return false;
    +  else if (parent())
    +    return parent()->isVisible();
    +  else
    +    return true;
    +}
    +
    +void WCompositeWidget::setDisabled(bool disabled)
    +{
    +  impl_->setDisabled(disabled);
    +}
    +
    +bool WCompositeWidget::isDisabled() const
    +{
    +  return impl_->isDisabled();
    +}
    +
    +bool WCompositeWidget::isEnabled() const
    +{
    +  if (isDisabled())
    +    return false;
    +  else if (parent())
    +    return parent()->isEnabled();
    +  else
    +    return true;
    +}
    +
    +void WCompositeWidget::setPopup(bool how)
    +{
    +  impl_->setPopup(how);
    +}
    +
    +bool WCompositeWidget::isPopup() const
    +{
    +  return impl_->isPopup();
    +}
    +
    +void WCompositeWidget::setInline(bool how)
    +{
    +  resetLearnedSlot(&WWidget::show);
    +
    +  impl_->setInline(how);
    +}
    +
    +bool WCompositeWidget::isInline() const
    +{
    +  return impl_->isInline();
    +}
    +
    +void WCompositeWidget::setDecorationStyle(const WCssDecorationStyle& style)
    +{
    +  impl_->setDecorationStyle(style);
    +}
    +
    +WCssDecorationStyle& WCompositeWidget::decorationStyle()
    +{
    +  return impl_->decorationStyle();
    +}
    +
    +void WCompositeWidget::setStyleClass(const WT_USTRING& styleClass)
    +{
    +  impl_->setStyleClass(styleClass);
    +}
    +
    +void WCompositeWidget::setStyleClass(const char *styleClass)
    +{
    +  impl_->setStyleClass(WT_USTRING::fromUTF8(styleClass));
    +}
    +
    +WT_USTRING WCompositeWidget::styleClass() const
    +{
    +  return impl_->styleClass();
    +}
    +
    +void WCompositeWidget::addStyleClass(const WT_USTRING& styleClass,
    +				     bool force)
    +{
    +  impl_->addStyleClass(styleClass, force);
    +}
    +
    +void WCompositeWidget::addStyleClass(const char *styleClass, bool force)
    +{
    +  impl_->addStyleClass(WT_USTRING::fromUTF8(styleClass), force);
    +}
    +
    +void WCompositeWidget::removeStyleClass(const WT_USTRING& styleClass,
    +					bool force)
    +{
    +  impl_->removeStyleClass(styleClass, force);
    +}
    +
    +void WCompositeWidget::removeStyleClass(const char *styleClass, bool force)
    +{
    +  impl_->removeStyleClass(WT_USTRING::fromUTF8(styleClass), force);
    +}
    +
    +void WCompositeWidget::setVerticalAlignment(AlignmentFlag alignment,
    +					    const WLength& length)
    +{
    +  if (AlignHorizontalMask & alignment) {
    +    wApp->log("warning") << "WCompositeWidget::setVerticalAlignment: "
    +      "alignment " << alignment << "is horizontal, expected vertical";
    +  }
    +  impl_->setVerticalAlignment(alignment, length);
    +}
    +
    +AlignmentFlag WCompositeWidget::verticalAlignment() const
    +{
    +  return impl_->verticalAlignment();
    +}
    +
    +WLength WCompositeWidget::verticalAlignmentLength() const
    +{
    +  return impl_->verticalAlignmentLength();
    +}
    +
    +WWebWidget *WCompositeWidget::webWidget()
    +{
    +  return impl_ ? impl_->webWidget() : 0;
    +}
    +
    +void WCompositeWidget::setToolTip(const WString& text)
    +{
    +  impl_->setToolTip(text);
    +}
    +
    +WString WCompositeWidget::toolTip() const
    +{
    +  return impl_->toolTip();
    +}
    +
    +void WCompositeWidget::refresh()
    +{
    +  impl_->refresh();
    +
    +  WWidget::refresh();
    +}
    +
    +void WCompositeWidget::enableAjax()
    +{
    +  impl_->enableAjax();
    +}
    +
    +void WCompositeWidget::addChild(WWidget *child)
    +{
    +  if (child != impl_)
    +    impl_->addChild(child);
    +  else
    +    impl_->setParent(this);
    +}
    +
    +void WCompositeWidget::removeChild(WWidget *child)
    +{
    +  if (child != impl_)
    +    impl_->removeChild(child);
    +  else
    +    impl_->setParent(0);
    +}
    +
    +void WCompositeWidget::setHideWithOffsets(bool how)
    +{
    +  impl_->setHideWithOffsets(how);
    +}
    +
    +bool WCompositeWidget::isStubbed() const
    +{
    +  if (parent())
    +    return parent()->isStubbed();
    +  else
    +    return false;
    +}
    +
    +bool WCompositeWidget::needsToBeRendered() const
    +{
    +  return impl_->needsToBeRendered();
    +}
    +
    +void WCompositeWidget::setAttributeValue(const std::string& name,
    +					 const WT_USTRING& value)
    +{
    +  impl_->setAttributeValue(name, value);
    +}
    +
    +WT_USTRING WCompositeWidget::attributeValue(const std::string& name) const
    +{
    +  return impl_->attributeValue(name);
    +}
    +
    +void WCompositeWidget::setJavaScriptMember(const std::string& name,
    +					   const std::string& value)
    +{
    +  impl_->setJavaScriptMember(name, value);
    +}
    +
    +std::string WCompositeWidget::javaScriptMember(const std::string& name) const
    +{
    +  return impl_->javaScriptMember(name);
    +}
    +
    +void WCompositeWidget::callJavaScriptMember(const std::string& name,
    +					    const std::string& args)
    +{
    +  impl_->callJavaScriptMember(name, args);
    +}
    +
    +void WCompositeWidget::load()
    +{
    +  if (impl_)
    +    impl_->load();
    +}
    +
    +bool WCompositeWidget::loaded() const
    +{
    +  return impl_ ? impl_->loaded() : true;
    +}
    +
    +void WCompositeWidget::setTabIndex(int index)
    +{
    +  impl_->setTabIndex(index);
    +}
    +
    +int WCompositeWidget::tabIndex() const
    +{
    +  return impl_->tabIndex();
    +}
    +
    +void WCompositeWidget::setImplementation(WWidget *widget)
    +{
    +  if (widget->parent())
    +    throw WtException("WCompositeWidget implemnation widget "
    +		      "cannot have a parent");
    +
    +  delete impl_;
    +
    +  impl_ = widget;
    +  if (parent()) {
    +    WWebWidget *ww = impl_->webWidget();
    +    if (ww)
    +      ww->gotParent();
    +
    +    if (parent()->loaded())
    +      impl_->load();
    +  }
    +
    +  widget->setParentWidget(this);
    +}
    +
    +void WCompositeWidget::setLayout(WLayout *layout)
    +{
    +  impl_->setLayout(layout);
    +}
    +
    +WLayout *WCompositeWidget::layout()
    +{
    +  return impl_->layout();
    +}
    +
    +WLayoutItemImpl *WCompositeWidget::createLayoutItemImpl(WLayoutItem *item)
    +{
    +  return impl_->createLayoutItemImpl(item);
    +}
    +
    +void WCompositeWidget::getSDomChanges(std::vector<DomElement *>& result,
    +				      WApplication *app)
    +{
    +  if (needsToBeRendered())
    +    render(impl_->isRendered() ? RenderUpdate : RenderFull);
    +
    +  impl_->getSDomChanges(result, app);
    +}
    +
    +void WCompositeWidget::render(WFlags<RenderFlag> flags)
    +{
    +  impl_->render(flags);
    +
    +  renderOk();
    +}
    +
    +int WCompositeWidget::boxPadding(Orientation orientation) const
    +{
    +  return impl_->boxPadding(orientation);
    +}
    +
    +int WCompositeWidget::boxBorder(Orientation orientation) const
    +{
    +  return impl_->boxBorder(orientation);
    +}
    +
    +void WCompositeWidget::propagateSetEnabled(bool enabled)
    +{
    +  impl_->webWidget()->propagateSetEnabled(enabled);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WContainerWidget b/wt-3.1.7a/src/Wt/WContainerWidget
    new file mode 100644
    index 0000000..a512291
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WContainerWidget
    @@ -0,0 +1,424 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCONTAINER_WIDGET_H_
    +#define WCONTAINER_WIDGET_H_
    +
    +#include <Wt/WInteractWidget>
    +
    +namespace Wt {
    +
    +class WApplication;
    +class StdLayoutImpl;
    +
    +/*! \class WContainerWidget Wt/WContainerWidget Wt/WContainerWidget
    + *  \brief A widget that holds and manages child widgets.
    + *
    + * A %WContainerWidget acts as a container for child widgets. Child
    + * widgets may be added directly to the container or using a layout
    + * manager.
    + *
    + * Use addWidget() or pass the container as constructor argument to a
    + * widget to directly add children to the container, without using a
    + * layout manager. In that case, CSS-based layout is used, and the
    + * resulting display is determined by properties of the children and
    + * the container. By default, a %WContainerWidget is displayed as a
    + * \link WWidget::setInline() block \endlink and manages its children
    + * within a rectangle. Inline child widgets are layed out in lines,
    + * wrapping around as needed, while block child widgets are stacked
    + * vertically. The container may add padding at the container edges
    + * using setPadding(), and provide alignment of contents using
    + * setContentAlignment(). A container is rendered by default using a
    + * HTML <tt>div</tt> tag, but this may be changed to an HTML
    + * <tt>ul</tt> or <tt>ol</tt> tag to make use of other CSS layout
    + * techniques, using setList(). In addition, specializations of this
    + * class as implemented by WAnchor, WGroupBox, WStackedWidget and
    + * WTableCell provide other alternative rendering of the container.
    + *
    + * When setting the %WContainerWidget \link WWidget::setInline()
    + * inline \endlink the container only acts as a conceptual container,
    + * offering a common style to its children. Inline children are still
    + * layed out inline within the flow of the parent container of this
    + * container, as if they were inserted directly into that parent
    + * container. Block children are then not allowed (according to the
    + * HTML specification).
    + *
    + * To use a layout manager instead of CSS-based layout, use
    + * setLayout() or pass the container as constructor argument to a
    + * layout manager. In that case you should not define any padding for
    + * the container, and widgets and nested layout managers must be added
    + * to the layout manager, instead of to the container directly.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + *
    + * // Example 1:
    + * // Instantiate a container widget and add some children whose layout 
    + * // is governed based on HTML/CSS rules.
    + * Wt::WContainerWidget *container1 = new Wt::WContainerWidget();
    + * container1->addWidget(new Wt::WText("Some text"));
    + * container1->addWidget(new Wt::WImage("images/img.png"));
    + * Wt::WContainerWidget *child3 = new Wt::WContainerWidget(container1);
    + *
    + * // Example 2:
    + * // Instantiate a container widget which uses a layout manager
    + * Wt::WContainerWidget *container2 = new Wt::WContainerWidget();
    + * container2->resize(WLength::Auto, 600); // give the container a fixed height.
    + *
    + * Wt::WVBoxLayout *layout = new Wt::WVBoxLayout();
    + * layout->addWidget(new Wt::WText("Some text"));
    + * layout->addWidget(new Wt::WImage("images/img.png"));
    + *
    + * container2->setLayout(layout);      // set the layout to the container.
    + * \endcode
    + * \elseif java
    + * \code
    + * // Example 1:
    + * // Instantiate a container widget and add some children whose layout 
    + * // is governed based on HTML/CSS rules.
    + * WContainerWidget container1 = new WContainerWidget();
    + * container1.addWidget(new WText("Some text"));
    + * container1.addWidget(new WImage("images/img.png"));
    + * WContainerWidget child3 = new WContainerWidget(container1);
    +		 
    + * // Example 2:
    + * // Instantiate a container widget which uses a layout manager
    + * WContainerWidget container2 = new WContainerWidget();
    + * // give the container a fixed height
    + * container2.resize(WLength.Auto, new WLength(600)); 
    + *
    + * WVBoxLayout layout = new WVBoxLayout();
    + * layout.addWidget(new WText("Some text"));
    + * layout.addWidget(new WImage("images/img.png"));
    +		 
    + * container2.setLayout(layout);      // set the layout to the container.
    + * \endcode
    + * \endif
    + *
    + * When using a layout manager, you need to carefully consider the
    + * alignment of the layout manager with respect to the container: when
    + * the container's height is unconstrained (not specified explicitly
    + * using resize() or a style class, and the container is not included
    + * in a layout manager), you should pass AlignTop to setLayout().
    + *
    + * <h3>CSS</h3>
    + *
    + * Depending on its configuration and usage, the widget corresponds to the
    + * following HTML tags:
    + *  - By default, the widget corresponds to a <tt>&lt;div&gt;</tt> tag.
    + *  - When configured with setInline(true), the widget corresponds to a
    + *    <tt>&lt;span&gt;</tt>.
    + *  - When configured with setList(true), the widget corresponds to a
    + *    <tt>&lt;ul&gt;</tt>.
    + *  - When configured with setList(true, true), the widget corresponds to a
    + *    <tt>&lt;ol&gt;</tt>.
    + *  - When inserted into a container widget that isList(), the widget
    + *    corresponds to a <tt>&lt;li&gt;</tt>.
    + *
    + * This widget does not provide styling, and can be styled using
    + * inline or external CSS as appropriate.
    + */
    +class WT_API WContainerWidget : public WInteractWidget
    +{
    +public:
    +  /*! \brief How to handle overflow of inner content
    +   */
    +  enum Overflow {
    +    OverflowVisible=0x0,//!< Show content that overflows.
    +    OverflowAuto=0x1,   //!< Show scrollbars when needed.
    +    OverflowHidden=0x2, //!< Hide content that overflows.
    +    OverflowScroll=0x3  //!< Always show scroll bars.
    +  };
    +
    +  /*! \brief Creates a container with optional parent.
    +   */
    +  WContainerWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WContainerWidget();
    +
    +  /*! \brief Sets a layout manager for the container.
    +   *
    +   * Note that you can nest layout managers inside each other, to
    +   * create a complex layout hierarchy.
    +   *
    +   * If a previous layout manager was already set, it is first deleted.
    +   * In that case, you will need to make sure that you either readd all
    +   * widgets that were part of the previous layout to the new layout, or
    +   * delete them, to avoid memory leaks.
    +   *
    +   * The layout manager arranges children in the entire width and
    +   * height of the container. This is equivalent to
    +   * \link setLayout(WLayout*, WFlags<AlignmentFlag>) setLayout(layout, AlignJustify)\endlink
    +   *
    +   * \sa layout(), setLayout(WLayout *, WFlags<AlignmentFlag>)
    +   */
    +  void setLayout(WLayout *layout);  
    +
    +  /*! \brief Sets a layout manager for the container.
    +   *
    +   * The \p alignment argument determines how the layout is
    +   * aligned inside the container. By default, the layout manager
    +   * arranges children over the entire width and height of the
    +   * container, corresponding to a value of AlignJustify. This
    +   * requires that the container has a specified height (either
    +   * because it is managed by another layout manager, is the root
    +   * container widget, or has a height set).
    +   *
    +   * In general, \p alignment is the logical OR of a horizontal
    +   * and a vertical flag:
    +   * - The horizontal alignment option may be one of Wt::AlignLeft,
    +   *   Wt::AlignCenter, Wt::AlignRight, or Wt::AlignJustify.
    +   * - The vertical alignment option may be '0' (corresponding to vertical
    +   *   justification to the full height), or Wt::AlignTop.
    +   *
    +   * When using a horizontal alingment different from
    +   * Wt::AlignJustify, and a vertical alignment different from '0',
    +   * the widget is sized in that direction to fit the contents,
    +   * instead of the contents being adjusted to the widget size. This
    +   * is useful when the container does not have a specific size in
    +   * that direction and when the layout manager does not contain any
    +   * widgets that wish to consume all remaining space in that
    +   * direction.
    +   *
    +   * Only a single layout manager may be set. If you want to replace
    +   * the current layout manager, you have to erase all contents first
    +   * using clear(), which also deletes the layout manager.
    +   *
    +   * Note that you can nest layout managers inside each other, to
    +   * create a complex layout hierarchy.
    +   *
    +   * The widget will take ownership of \p layout.
    +   *
    +   * \sa layout()
    +   */
    +  void setLayout(WLayout *layout, WFlags<AlignmentFlag> alignment);
    +
    +  /*! \brief Returns the layout manager that was set for the container.
    +   *
    +   * If no layout manager was previously set using setLayout(WLayout
    +   * *), 0 is returned.
    +   *
    +   * \sa setLayout(WLayout *)
    +   */
    +  WLayout *layout() { return layout_; }
    +
    +  /*! \brief Adds a child widget to this container.
    +   *
    +   * This is equivalent to passing this container as the parent when
    +   * constructing the child. The widget is appended to the list of
    +   * children, and thus also layed-out at the end.
    +   */
    +  virtual void addWidget(WWidget *widget);
    +
    +  /*! \brief Inserts a child widget in this container, before another
    +   *         widget.
    +   *
    +   * The <i>widget</i> is inserted at the place of the \p before
    +   * widget, and subsequent widgets are shifted.
    +   *
    +   * \sa insertWidget(int index, WWidget *widget);
    +   */
    +  virtual void insertBefore(WWidget *widget, WWidget *before);
    +
    +  /*! \brief Inserts a child widget in this container at given index.
    +   *
    +   * The <i>widget</i> is inserted at the given \p index, and
    +   * subsequent widgets are shifted.
    +   *
    +   * \sa insertBefore(WWidget *widget, WWidget *before);
    +   */
    +  virtual void insertWidget(int index, WWidget *widget);
    +
    +  /*! \brief Removes a child widget from this container.
    +   *
    +   * This removes the widget from this container, but does not delete
    +   * the widget !
    +   */
    +  virtual void removeWidget(WWidget *widget);
    +
    +  /*! \brief Removes and deletes all child widgets.
    +   *
    +   * This deletes all children that have been added to this container.
    +   *
    +   * If a layout was set, also the layout manager is deleted.
    +   */
    +  virtual void clear();
    +
    +  /*! \brief Returns the index of a widget.
    +   */
    +  virtual int indexOf(WWidget *widget) const;
    +
    +  /*! \brief Returns the widget at <i>index</i>
    +   */
    +  virtual WWidget *widget(int index) const;
    +
    +  /*! \brief Returns the number of widgets in this container.
    +   */
    +  virtual int count() const;
    +
    +  /*! \brief Specifies how child widgets must be aligned within the container
    +   *
    +   * For a WContainerWidget, only specifes the horizontal alignment of
    +   * child widgets. Note that there is no way to specify vertical
    +   * alignment: children are always pushed to the top of the
    +   * container.
    +   *
    +   * For a WTableCell, this may also specify the vertical alignment.
    +   * The default alignment is (Wt::AlignTop | Wt::AlignLeft).
    +   */
    +  void setContentAlignment(WFlags<AlignmentFlag> contentAlignment);
    +
    +  /*! \brief Sets padding inside the widget
    +   *
    +   * Setting padding has the effect of adding distance between the
    +   * widget children and the border.
    +   */
    +  void setPadding(const WLength& padding, WFlags<Side> sides = All);
    +
    +  /*! \brief Returns the padding set for the widget.
    +   *
    +   * \sa setPadding(const WLength&, WFlags<Side>)
    +   */
    +  WLength padding(Side side) const;
    +
    +  /*! \brief Returns the alignment of children
    +   *
    +   * \sa setContentAlignment(WFlags<AlignmentFlag>)
    +   */
    +  WFlags<AlignmentFlag> contentAlignment() const { return contentAlignment_; }
    +
    +  /*! \brief Sets how overflow of contained children must be handled.
    +   *
    +   * This is an alternative (CSS-ish) way to provide scroll bars on a
    +   * container widget, compared to wrapping inside a WScrollArea.
    +   *
    +   * Note that currently, you cannot separately specify vertical and
    +   * horizontal scroll behaviour, since this is not supported on
    +   * Opera. Therefore, settings will apply automatically to both orientations.
    +   *
    +   * Unlike WScrollArea, horizontal scrolling does not work reliably
    +   * when the container widget is inserted in a layout manager: the
    +   * layout manager will overflow rather than use scrollbars for this
    +   * container widget. A solution there is to use WScrollArea instead.
    +   *
    +   * \sa WScrollArea
    +   */
    +  void setOverflow(Overflow overflow,
    +		   WFlags<Orientation> orientation = (Horizontal | Vertical));
    +
    +  /*! \brief Renders the container as an HTML list.
    +   *
    +   * Setting \p renderList to \c true will cause the container to be
    +   * using an HTML <tt>&lt;ul&gt;</tt> or <tt>&lt;ol&gt;</tt> type,
    +   * depending on the value of \p orderedList. This must be set
    +   * before the initial render of the container. When set, any
    +   * contained WContainerWidget will be rendered as an HTML
    +   * <tt>&lt;li&gt;</tt>. Adding non-WContainerWidget children results
    +   * in unspecified behaviour.
    +   *
    +   * Note that CSS default layout rules for <tt>&lt;ul&gt;</tt> and
    +   * <tt>&lt;ol&gt;</tt> add margin and padding to the container,
    +   * which may look odd if you do not use bullets.
    +   *
    +   * By default, a container is rendered using a <tt>&lt;div&gt;</tt>
    +   * element.
    +   *
    +   * \sa isList(), isOrderedList(), isUnorderedList()
    +   */
    +  void setList(bool list, bool ordered = false);
    +
    +  /*! \brief Returns if this container is rendered as a List
    +   *
    +   * \sa setList(), isOrderedList(), isUnorderedList()
    +   */  
    +  bool isList() const;
    +
    +  /*! \brief Returns if this container is rendered as an Unordered List
    +   *
    +   * \sa setList(), isList(), isOrderedList()
    +   */  
    +  bool isUnorderedList() const;
    +
    +  /*! \brief Returns if this container is rendered as an Ordered List
    +   *
    +   * \sa setList(), isList(), isUnorderedList()
    +   */  
    +  bool isOrderedList() const;
    +
    +  /*! \brief Event signal emitted when scrolling in the widget.
    +   *
    +   * This event is emitted when the user scrolls in the widget (for setting
    +   * the scroll bar policy, see setOverflow()). The event conveys details
    +   * such as the new scroll bar position, the total contents height and the
    +   * current widget height.
    +   *
    +   * \sa setOverflow()
    +   */
    +  EventSignal<WScrollEvent>& scrolled();
    +
    +private:
    +  static const char *SCROLL_SIGNAL;
    +
    +  static const int BIT_CONTENT_ALIGNMENT_CHANGED = 0;
    +  static const int BIT_PADDINGS_CHANGED = 1;
    +  static const int BIT_OVERFLOW_CHANGED = 2;
    +  static const int BIT_ADJUST_CHILDREN_ALIGN = 3;
    +  static const int BIT_LIST = 4;
    +  static const int BIT_ORDERED_LIST = 5;
    +  static const int BIT_LAYOUT_CHANGED = 6;
    +  static const int BIT_LAYOUT_NEEDS_UPDATE = 7;
    +
    +  /*
    +   * Frequently used attributes.
    +   */
    +  std::bitset<8>            flags_;
    +  WFlags<AlignmentFlag>     contentAlignment_;
    +  Overflow        *WT_ARRAY overflow_;
    +  WLength	  *WT_ARRAY padding_;
    +  WLayout                  *layout_;
    +
    +  bool wasEmpty() const;
    +
    +  void rootAsJavaScript(WApplication *app, std::ostream& out, bool all);
    +
    +  friend class WebRenderer;
    +
    +protected:
    +  virtual void removeChild(WWidget *child);
    +  virtual int firstChildIndex() const;
    +
    +  virtual void childResized(WWidget *child, WFlags<Orientation> directions);
    +  virtual void getDomChanges(std::vector<DomElement *>& result,
    +			     WApplication *app);
    +  void createDomChildren(DomElement& parent, WApplication *app);
    +
    +  virtual DomElementType domElementType() const;
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual DomElement    *createDomElement(WApplication *app);
    +
    +  virtual WLayoutItemImpl *createLayoutItemImpl(WLayoutItem *item);
    +  StdLayoutImpl *layoutImpl() const;
    +
    +  friend class StdLayoutImpl;
    +  void layoutChanged(bool deleted = false);
    +
    +private:
    +  void propagateLayoutItemsOk(WLayoutItem *item);
    +
    +  void removeFromLayout(WWidget *w);
    +
    +  friend class StdWidgetItemImpl;
    +  friend class WImage;
    +  friend class WTableCell;
    +};
    +
    +}
    +
    +#endif // WCONTAINER_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WContainerWidget.C b/wt-3.1.7a/src/Wt/WContainerWidget.C
    new file mode 100644
    index 0000000..2206ee1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WContainerWidget.C
    @@ -0,0 +1,806 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <algorithm>
    +
    +#include "StdWidgetItemImpl.h"
    +#include "StdGridLayoutImpl.h"
    +#include "WtException.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WBorderLayout"
    +#include "Wt/WBoxLayout"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WGridLayout"
    +#include "Wt/WWidgetItem"
    +#include "Utils.h"
    +
    +#include "DomElement.h"
    +#include "EscapeOStream.h"
    +#include "WebSession.h"
    +
    +namespace Wt {
    +
    +const char *WContainerWidget::SCROLL_SIGNAL = "scroll";
    +
    +/*
    + * Should addedChildren move to WWebWidget ?
    + * Should a WWebWidget know itself that it has been rendered to
    + * avoid the ugly setIgnoreChildRemoves() hack ?
    + * I think so ?
    + *
    + * The problem still exists with a child added with insertWidget since
    + * it is not in the addedChildren list even if if it is not rendered ?
    + * What if before gets deleted after adding a sibling ? then also
    + * things go wrong. So many wrong things !
    + */
    +
    +WContainerWidget::WContainerWidget(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    contentAlignment_(AlignLeft),
    +    overflow_(0),
    +    padding_(0),
    +    layout_(0)
    +{
    +  setInline(false);
    +  setLoadLaterWhenInvisible(false);
    +
    +  children_ = new std::vector<WWidget *>;
    +}
    +
    +EventSignal<WScrollEvent>& WContainerWidget::scrolled()
    +{
    +  return *scrollEventSignal(SCROLL_SIGNAL, true);
    +}
    +
    +WContainerWidget::~WContainerWidget()
    +{
    +#ifndef WT_NO_LAYOUT
    +  WLayout *layout = layout_;
    +  layout_ = 0;
    +  delete layout;
    +#endif // WT_NO_LAYOUT
    +  delete[] padding_;
    +  delete[] overflow_;
    +}
    +
    +#ifndef WT_NO_LAYOUT
    +StdLayoutImpl *WContainerWidget::layoutImpl() const
    +{
    +  return dynamic_cast<StdLayoutImpl *>(layout_->impl());
    +}
    +#endif // WT_NO_LAYOUT
    +
    +void WContainerWidget::setLayout(WLayout *layout)
    +{
    +  setLayout(layout, AlignJustify);
    +}
    +
    +void WContainerWidget::setLayout(WLayout *layout,
    +				 WFlags<AlignmentFlag> alignment)
    +{
    +#ifndef WT_NO_LAYOUT
    +  if (layout_ && layout != layout_)
    +    delete layout_;
    +
    +  contentAlignment_ = alignment;
    +
    +  if (layout != layout_) {
    +    layout_ = layout;
    +    flags_.set(BIT_LAYOUT_CHANGED);
    +
    +    if (layout) {
    +      WWidget::setLayout(layout);
    +      layoutImpl()->setContainer(this);
    +
    +      /*
    +       * Normally, scrollbars are not used automatically for a container,
    +       * which applies to when a layout overflows.
    +       *
    +       * Only for IE we really need to set this otherwise the parent
    +       * increases its size automatically and then we cannot reduce in
    +       * size (standard behaviour is overflow visible which says the
    +       * parent size should not be affected). Luckily, IE does not show the
    +       * scrollbars unless really needed
    +       */
    +      if (WApplication::instance()->environment().agentIsIE()) {
    +	AlignmentFlag vAlign = alignment & AlignVerticalMask;
    +	if (vAlign == 0)
    +	  setOverflow(WContainerWidget::OverflowHidden);
    +      }
    +    }
    +  }
    +#else
    +  assert(false);
    +#endif
    +}
    +
    +void WContainerWidget::childResized(WWidget *child,
    +				    WFlags<Orientation> directions)
    +{
    +#ifndef WT_NO_LAYOUT
    +  AlignmentFlag vAlign = contentAlignment_ & AlignVerticalMask;
    +  if (layout_
    +      && (directions & Vertical)
    +      && (vAlign == 0)) {
    +    if (!flags_.test(BIT_LAYOUT_NEEDS_UPDATE)) {
    +      WWidgetItem *item = layout_->findWidgetItem(child);
    +      if (item)
    +	if (dynamic_cast<StdLayoutImpl *>(item->parentLayout()->impl())
    +	    ->itemResized(item)) {
    +	  flags_.set(BIT_LAYOUT_NEEDS_UPDATE);
    +	  repaint(RepaintInnerHtml);
    +	}
    +    }
    +  } else
    +#endif
    +    WInteractWidget::childResized(child, directions);
    +}
    +
    +WLayoutItemImpl *WContainerWidget::createLayoutItemImpl(WLayoutItem *item)
    +{
    +#ifndef WT_NO_LAYOUT
    +  {
    +    WWidgetItem *wi = dynamic_cast<WWidgetItem *>(item);
    +    if (wi)
    +      return new StdWidgetItemImpl(wi);
    +  }
    +
    +  {
    +    WBorderLayout *l = dynamic_cast<WBorderLayout *>(item);
    +    if (l)
    +      return new StdGridLayoutImpl(l, l->grid());
    +  }
    +
    +  {
    +    WBoxLayout *l = dynamic_cast<WBoxLayout *>(item);
    +    if (l)
    +      return new StdGridLayoutImpl(l, l->grid());
    +  }
    +
    +  {
    +    WGridLayout *l = dynamic_cast<WGridLayout *>(item);
    +    if (l)
    +      return new StdGridLayoutImpl(l, l->grid());
    +  }
    +#endif
    +
    +  assert(false);
    +
    +  return 0;
    +}
    +
    +void WContainerWidget::addWidget(WWidget *widget)
    +{
    +  if (widget->parent()) {
    +    if (widget->parent() != this) {
    +      wApp->log("warn")
    +	<< "WContainerWidget::addWidget(): reparenting widget";
    +      widget->setParentWidget(0);
    +    } else
    +      return;
    +  }
    +
    +  if (!transientImpl_) {
    +    transientImpl_ = new TransientImpl();
    +
    +    // IE cannot replace a TD node using DOM API
    +    if (domElementType() != DomElement_TD
    +	|| !WApplication::instance()->environment().agentIsIE())
    +      setLoadLaterWhenInvisible(true);
    +  }
    +
    +  transientImpl_->addedChildren_.push_back(widget);
    +  flags_.set(BIT_ADJUST_CHILDREN_ALIGN); // children margins hacks
    +  repaint(RepaintInnerHtml);
    +
    +  widget->setParentWidget(this);
    +}
    +
    +void WContainerWidget::insertWidget(int index, WWidget *widget)
    +{
    +  if (index == (int)children_->size())
    +    addWidget(widget);
    +  else
    +    insertBefore(widget, children()[index]);
    +}
    +
    +void WContainerWidget::insertBefore(WWidget *widget, WWidget *before)
    +{
    +  if (before->parent() != this) {
    +    wApp->log("error") << "WContainerWidget::insertBefore(): 'before' not "
    +      "in this container";
    +    return;
    +  }
    +
    +  if (widget->parent()) {
    +    if (widget->parent() != this) {
    +      wApp->log("warn")
    +	<< "WContainerWidget::insertWidget(): reparenting widget";
    +      widget->setParentWidget(0);
    +    } else
    +      return;
    +  }
    +
    +  int i = Utils::indexOf(*children_, before);
    +  if (i == -1)
    +    i = children_->size();
    +
    +  children_->insert(children_->begin() + i, widget);
    +  flags_.set(BIT_ADJUST_CHILDREN_ALIGN); // children margins hacks
    +  repaint(RepaintInnerHtml);
    +
    +  if (!transientImpl_)
    +    transientImpl_ = new TransientImpl();
    +  transientImpl_->addedChildren_.push_back(widget);
    +
    +  // would try to add the widget again to children_
    +  // widget->setParent(this);
    +  // so instead, we copy the code from WWebWidget::addChild() here:
    +  widget->setParent(this);
    +
    +  if (loaded())
    +    doLoad(widget);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(this, false);
    +}
    +
    +void WContainerWidget::removeFromLayout(WWidget *widget)
    +{
    +#ifndef WT_NO_LAYOUT
    +  if (layout_)
    +    removeWidget(widget);
    +#endif // WT_NO_LAYOUT
    +}
    +
    +void WContainerWidget::removeWidget(WWidget *widget)
    +{
    +  widget->setParentWidget(0);
    +
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WContainerWidget::clear()
    +{
    +  // first delete the widgets, this will also remove them from
    +  // the layout
    +  while (!children().empty()) {
    +    WWidget *w = children().back();
    +    delete w;
    +  }
    +
    +#ifndef WT_NO_LAYOUT
    +  delete layout_;
    +  layout_ = 0;
    +#endif // WT_NO_LAYOUT
    +}
    +
    +int WContainerWidget::indexOf(WWidget *widget) const
    +{
    +  return Utils::indexOf(children(), widget);
    +}
    +
    +WWidget *WContainerWidget::widget(int index) const
    +{
    +  return children()[index];
    +}
    +
    +int WContainerWidget::count() const
    +{
    +  return children().size();
    +}
    +
    +void WContainerWidget::removeChild(WWidget *child)
    +{
    +  bool ignoreThisChildRemove = false;
    +
    +  if (transientImpl_) {
    +    if (Utils::erase(transientImpl_->addedChildren_, child)) {
    +      /*
    +       * Child was just added: do not render a child remove, since it
    +       * is not yet part of the DOM
    +       */
    +      ignoreThisChildRemove = true;
    +    }
    +  }
    +
    +#ifndef WT_NO_LAYOUT
    +  if (layout_) {
    +    ignoreThisChildRemove = true; // will be re-rendered by layout
    +    if (layout_->removeWidget(child))
    +      return;
    +  }
    +#endif // WT_NO_LAYOUT
    +
    +  if (ignoreThisChildRemove)
    +    if (ignoreChildRemoves())
    +      ignoreThisChildRemove = false; // was already ignoring them
    +
    +  if (ignoreThisChildRemove)
    +    setIgnoreChildRemoves(true);
    +
    +  WWebWidget::removeChild(child);
    +
    +  if (ignoreThisChildRemove)
    +    setIgnoreChildRemoves(false);
    +}
    +
    +void WContainerWidget::setContentAlignment(WFlags<AlignmentFlag> alignment)
    +{
    +  contentAlignment_ = alignment;
    +
    +  /* Make sure vertical alignment is always specified */
    +  AlignmentFlag vAlign = contentAlignment_ & AlignVerticalMask;
    +  if (vAlign == 0)
    +    contentAlignment_ |= AlignTop;
    +
    +  flags_.set(BIT_CONTENT_ALIGNMENT_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WContainerWidget::setList(bool list, bool ordered)
    +{
    +  flags_.set(BIT_LIST, list);
    +  flags_.set(BIT_ORDERED_LIST, ordered);
    +}
    +
    +bool WContainerWidget::isList() const
    +{
    +  return flags_.test(BIT_LIST);
    +}
    +
    +bool WContainerWidget::isOrderedList() const
    +{
    +  return flags_.test(BIT_LIST) && flags_.test(BIT_ORDERED_LIST);
    +}
    +
    +bool WContainerWidget::isUnorderedList() const
    +{
    +  return flags_.test(BIT_LIST) && !flags_.test(BIT_ORDERED_LIST);
    +}
    +
    +void WContainerWidget::setPadding(const WLength& length, WFlags<Side> sides)
    +{
    +  if (!padding_) {
    +    padding_ = new WLength[4];
    +#ifdef WT_TARGET_JAVA
    +    padding_[0] = padding_[1] = padding_[2] = padding_[3] = WLength::Auto;
    +#endif // WT_TARGET_JAVA
    +  }
    +
    +  if (sides.testFlag(Top))
    +    padding_[0] = length;
    +  if (sides.testFlag(Right))
    +    padding_[1] = length;
    +  if (sides.testFlag(Bottom))
    +    padding_[2] = length;
    +  if (sides.testFlag(Left))
    +    padding_[3] = length;
    +
    +  flags_.set(BIT_PADDINGS_CHANGED);
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WContainerWidget::setOverflow(Overflow value,
    +				   WFlags<Orientation> orientation)
    +{
    +  if (!overflow_) {
    +    overflow_ = new Overflow[2];
    +    overflow_[0] = overflow_[1] = OverflowVisible;
    +  }
    +
    +  if (orientation & Horizontal)
    +    overflow_[0] = value;
    +  if (orientation & Vertical)
    +    overflow_[1] = value;
    +  
    +  // Could be a workaround for IE, but sometimes causes other problems:
    +  // if (value == OverflowScroll || value == OverflowAuto)
    +  //   setPositionScheme(Relative);
    +
    +  flags_.set(BIT_OVERFLOW_CHANGED);
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WContainerWidget::padding(Side side) const
    +{
    +  if (!padding_)
    +    return WLength::Auto;
    +
    +  switch (side) {
    +  case Top:
    +    return padding_[0];
    +  case Right:
    +    return padding_[1];
    +  case Bottom:
    +    return padding_[2];
    +  case Left:
    +    return padding_[3];
    +  default:
    +    throw WtException("WContainerWidget::padding(Side) with invalid side.");
    +  }
    +}
    +
    +void WContainerWidget::updateDom(DomElement& element, bool all)
    +{
    +  if (all && element.type() == DomElement_LI && isInline())
    +    element.setProperty(PropertyStyleDisplay, "inline");
    +
    +  if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED) || all) {
    +    AlignmentFlag hAlign = contentAlignment_ & AlignHorizontalMask;
    +    switch (hAlign) {
    +    case AlignLeft:
    +      if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED))
    +	element.setProperty(PropertyStyleTextAlign, "left");
    +      break;
    +    case AlignRight:
    +      element.setProperty(PropertyStyleTextAlign, "right");
    +      break;
    +    case AlignCenter:
    +      element.setProperty(PropertyStyleTextAlign, "center");
    +      break;
    +    case AlignJustify:
    +#ifndef WT_NO_LAYOUT
    +      if (!layout_)
    +#endif // WT_NO_LAYOUT
    +	element.setProperty(PropertyStyleTextAlign, "justify");
    +      break;
    +    default:
    +      break;
    +    }
    +
    +    if (domElementType() == DomElement_TD) {
    +      AlignmentFlag vAlign = contentAlignment_ & AlignVerticalMask;
    +      switch (vAlign) {
    +      case AlignTop:
    +	if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED))
    +	  element.setProperty(PropertyStyleVerticalAlign, "top");
    +	break;
    +      case AlignMiddle:
    +	element.setProperty(PropertyStyleVerticalAlign, "middle");
    +	break;
    +      case AlignBottom:
    +	element.setProperty(PropertyStyleVerticalAlign, "bottom");
    +      default:
    +	break;
    +      }
    +    }
    +  }
    +
    +  if (flags_.test(BIT_ADJUST_CHILDREN_ALIGN)
    +      || flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED) || all) {
    +    /*
    +     * Welcome to CSS hell.
    +     *
    +     * Apparently, the text-align property only applies to inline elements.
    +     * To center non-inline children, the standard says to set its left and
    +     * right margin to 'auto'.
    +     *
    +     * I assume the same applies for aligning to the right ?
    +     */
    +    for (unsigned i = 0; i < children_->size(); ++i) {
    +      WWidget *child = (*children_)[i];
    +
    +      if (!child->isInline()) {
    +	AlignmentFlag ha = contentAlignment_ & AlignHorizontalMask;
    +	if (ha == AlignCenter) {
    +	  if (!child->margin(Left).isAuto())
    +	    child->setMargin(WLength::Auto, Left);
    +	  if (!child->margin(Right).isAuto())
    +	    child->setMargin(WLength::Auto, Right);
    +	} else if (ha == AlignRight) {
    +	  if (!child->margin(Left).isAuto())
    +	    child->setMargin(WLength::Auto, Left);
    +	}
    +      }
    +    }
    +
    +    flags_.reset(BIT_CONTENT_ALIGNMENT_CHANGED);
    +    flags_.reset(BIT_ADJUST_CHILDREN_ALIGN);
    +  }
    +
    +  if (flags_.test(BIT_PADDINGS_CHANGED)
    +      || (all && padding_ &&
    +	  !(   padding_[0].isAuto() && padding_[1].isAuto()
    +	    && padding_[2].isAuto() && padding_[3].isAuto()))) {
    +
    +    if ((padding_[0] == padding_[1])
    +	&& (padding_[0] == padding_[2])
    +	&& (padding_[0] == padding_[3]))
    +      element.setProperty(PropertyStylePadding,
    +			  padding_[0].cssText());
    +    else
    +      element.setProperty(PropertyStylePadding,
    +			  padding_[0].cssText()
    +			  + " " + padding_[1].cssText()
    +			  + " " + padding_[2].cssText()
    +			  + " " + padding_[3].cssText());
    +
    +    flags_.reset(BIT_PADDINGS_CHANGED);
    +  }
    +
    +  if (!wApp->session()->renderer().preLearning() && !layout_) {
    +    element.setWasEmpty(all || wasEmpty());
    +
    +    if (transientImpl_) {
    +      WApplication *app = WApplication::instance();
    +      std::vector<int> orderedInserts;
    +      std::vector<WWidget *>& ac = transientImpl_->addedChildren_;
    +
    +      for (unsigned i = 0; i < ac.size(); ++i)
    +	orderedInserts.push_back(Utils::indexOf(*children_, ac[i]));
    +
    +      Utils::sort(orderedInserts);
    +
    +      int addedCount = transientImpl_->addedChildren_.size();
    +      int totalCount = children_->size();
    +      int insertCount = 0;
    +      for (unsigned i = 0; i < orderedInserts.size(); ++i) {
    +	int pos = orderedInserts[i];
    +	
    +	DomElement *c = (*children_)[pos]->createSDomElement(app);
    +
    +	if (pos + (addedCount - insertCount) == totalCount)
    +	  element.addChild(c);
    +	else
    +	  element.insertChildAt(c, pos + firstChildIndex());
    +
    +	++insertCount;
    +      }
    +
    +      transientImpl_->addedChildren_.clear();
    +    }
    +  }
    +
    +  if (flags_.test(BIT_LAYOUT_NEEDS_UPDATE)) {
    +    if (layout_)
    +      layoutImpl()->updateDom();
    +
    +    flags_.reset(BIT_LAYOUT_NEEDS_UPDATE);
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +
    +  if (flags_.test(BIT_OVERFLOW_CHANGED)
    +      || (all && overflow_ &&
    +	  !(overflow_[0] == OverflowVisible
    +	    && overflow_[1] == OverflowVisible))) {
    +    static const char *cssText[] = { "visible", "auto", "hidden", "scroll" };
    +
    +    element.setProperty(PropertyStyleOverflowX, cssText[overflow_[0]]);
    +    //element.setProperty(PropertyStyleOverflowY, cssText[overflow_[1]]);
    +
    +    flags_.reset(BIT_OVERFLOW_CHANGED);
    +
    +    /* If a container widget has overflow, then, if ever something
    +     * inside it has position scheme relative/absolute, it will not
    +     * scroll properly unless every element up to the container and including 
    +     * the container itself has overflow: relative.
    +     *
    +     * The following fixes the common case:
    +     * container (overflow) - container - layout
    +     */
    +    WApplication *app = WApplication::instance();
    +    if (app->environment().agentIsIE()
    +	&& (overflow_[0] == OverflowAuto || overflow_[0] == OverflowScroll))
    +      element.setProperty(PropertyStylePosition, "relative");
    +  }
    +}
    +
    +int WContainerWidget::firstChildIndex() const
    +{
    +  return 0;
    +}
    +
    +void WContainerWidget::propagateLayoutItemsOk(WLayoutItem *item)
    +{
    +  if (!item)
    +    return;
    +
    +  if (item->layout()) {
    +    WLayout *layout = item->layout();
    +    const int c = layout->count();
    +    for (int i = 0; i < c; ++i)
    +      propagateLayoutItemsOk(layout->itemAt(i));
    +  } else if (item->widget()) {
    +    WWidget *w = item->widget();
    +    w->webWidget()->propagateRenderOk(true);
    +  }
    +}
    +
    +void WContainerWidget::propagateRenderOk(bool deep)
    +{
    +  flags_.reset(BIT_CONTENT_ALIGNMENT_CHANGED);
    +  flags_.reset(BIT_PADDINGS_CHANGED);
    +  flags_.reset(BIT_OVERFLOW_CHANGED);
    +  flags_.reset(BIT_LAYOUT_CHANGED);
    +  flags_.reset(BIT_LAYOUT_NEEDS_UPDATE);
    +
    +#ifndef WT_NO_LAYOUT
    +  if (layout_ && deep)
    +    propagateLayoutItemsOk(layout());
    +  else
    +#endif
    +    if (transientImpl_)
    +      transientImpl_->addedChildren_.clear();
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +bool WContainerWidget::wasEmpty() const
    +{
    +  /*
    +   * First case: on IE6, a popup widget has a shim child.
    +   * Second case: WGroupBox always has a legend
    +   */
    +  if (isPopup() || firstChildIndex() > 0)
    +    return false;
    +  else
    +    return ((transientImpl_ ? transientImpl_->addedChildren_.size() : 0)
    +	    == children_->size());
    +}
    +
    +DomElementType WContainerWidget::domElementType() const
    +{
    +  DomElementType type = isInline() ? DomElement_SPAN : DomElement_DIV;
    +
    +  WContainerWidget *p = dynamic_cast<WContainerWidget *>(parent());
    +  if (p && p->isList())
    +    type = DomElement_LI;
    +
    +  if (isList())
    +    type = isOrderedList() ? DomElement_OL : DomElement_UL;
    +
    +  return type;
    +}
    +
    +void WContainerWidget::getDomChanges(std::vector<DomElement *>& result,
    +				     WApplication *app)
    +{
    +  DomElement *e = DomElement::getForUpdate(this, domElementType());
    +
    +#ifndef WT_NO_LAYOUT
    +  if (!app->session()->renderer().preLearning()) {
    +    if (flags_.test(BIT_LAYOUT_CHANGED)) {
    +      e->removeAllChildren(firstChildIndex());
    +      createDomChildren(*e, app);
    +
    +      flags_.reset(BIT_LAYOUT_CHANGED);
    +      flags_.reset(BIT_LAYOUT_NEEDS_UPDATE);
    +    }
    +  }
    +#endif // WT_NO_LAYOUT
    +
    +  updateDom(*e, false);
    +
    +  result.push_back(e);
    +}
    +
    +DomElement *WContainerWidget::createDomElement(WApplication *app)
    +{
    +  if (transientImpl_)
    +    transientImpl_->addedChildren_.clear();
    +
    +  DomElement *result = WWebWidget::createDomElement(app);
    +  createDomChildren(*result, app);
    +
    +  return result;
    +}
    +
    +void WContainerWidget::createDomChildren(DomElement& parent, WApplication *app)
    +{
    +  if (layout_) {
    +#ifndef WT_NO_LAYOUT
    +    bool fitWidth = contentAlignment_ & AlignJustify;
    +    bool fitHeight = !(contentAlignment_ & AlignVerticalMask);
    +
    +    DomElement *c = layoutImpl()->createDomElement(fitWidth, fitHeight, app);
    +
    +    /*
    +     * Take the hint: if the container is relative, then we can use an absolute
    +     * layout for its contents, under the assumption that a .wtResize or
    +     * auto-javascript sets the width too (like in WTreeView, WTableView)
    +     */
    +    if (positionScheme() == Relative || positionScheme() == Absolute) {
    +      c->setProperty(PropertyStylePosition, "absolute");
    +      c->setProperty(PropertyStyleLeft, "0");
    +      c->setProperty(PropertyStyleRight, "0");
    +    } else if (app->environment().agentIsIE()) {
    +      /*
    +       * position: relative element needs to be in a position: relative
    +       * parent otherwise scrolling is broken
    +       */
    +      parent.setProperty(PropertyStylePosition, "relative");
    +    }
    +
    +    switch (contentAlignment_ & AlignHorizontalMask) {
    +    case AlignCenter: {
    +      DomElement *itable = DomElement::createNew(DomElement_TABLE);
    +      itable->setProperty(PropertyClass, "Wt-hcenter");
    +      if (fitHeight)
    +	itable->setProperty(PropertyStyle, "height:100%;");
    +      DomElement *irow = DomElement::createNew(DomElement_TR);
    +      DomElement *itd = DomElement::createNew(DomElement_TD);
    +      if (fitHeight)
    +	itd->setProperty(PropertyStyle, "height:100%;");
    +      itd->addChild(c);
    +      irow->addChild(itd);
    +      itable->addChild(irow);
    +      itable->setId(id() + "l");
    +      c = itable;
    +
    +      break;
    +    }
    +    case AlignLeft:
    +      //c->setProperty(PropertyStyleFloat, "left");
    +      break;
    +    case AlignRight:
    +      c->setProperty(PropertyStyleFloat, "right");
    +      break;
    +    default:
    +      break;
    +    }
    +
    +    parent.addChild(c);
    +
    +    flags_.reset(BIT_LAYOUT_CHANGED);
    +#endif // WT_NO_LAYOUT
    +  } else {
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      parent.addChild((*children_)[i]->createSDomElement(app));
    +  }
    +
    +  if (transientImpl_)
    +    transientImpl_->addedChildren_.clear();
    +}
    +
    +void WContainerWidget::rootAsJavaScript(WApplication *app, std::ostream& out,
    +					bool all)
    +{
    +  std::vector<WWidget *> *toAdd
    +    = all ? children_ : (transientImpl_ ? &transientImpl_->addedChildren_ : 0);
    +
    +  if (toAdd)
    +    for (unsigned i = 0; i < toAdd->size(); ++i) {
    +      DomElement *c = (*toAdd)[i]->createSDomElement(app);
    +      c->callMethod("omousemove=function(e) {"
    +		    "if (!e) e = window.event;"
    +		    "return " + app->javaScriptClass()
    +		    + "._p_.dragDrag(event); }");
    +      c->callMethod("mouseup=function(e) {"
    +		    "if (!e) e = window.event;"
    +		    "return " + app->javaScriptClass()
    +		  + "._p_.dragEnd(event);}");
    +      c->callMethod("dragstart=function(){return false;}");
    +      c->asJavaScript(out);
    +      delete c;
    +    }
    +
    +  if (transientImpl_)
    +    transientImpl_->addedChildren_.clear();
    +
    +  if (!all) {
    +    /* Note: we ignore rendering of deletion of a bound widget... */
    +  }
    +
    +  // FIXME
    +  propagateRenderOk(false);
    +}
    +
    +void WContainerWidget::layoutChanged(bool deleted)
    +{
    +#ifndef WT_NO_LAYOUT
    +  flags_.set(BIT_LAYOUT_CHANGED);
    +
    +  repaint(RepaintInnerHtml);
    +
    +  if (deleted)
    +    layout_ = 0;
    +#endif // WT_NO_LAYOUT
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCssDecorationStyle b/wt-3.1.7a/src/Wt/WCssDecorationStyle
    new file mode 100644
    index 0000000..6ff99f0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCssDecorationStyle
    @@ -0,0 +1,215 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCSSDECORATIONSTYLE_H_
    +#define WCSSDECORATIONSTYLE_H_
    +
    +#include <Wt/WBorder>
    +#include <Wt/WColor>
    +#include <Wt/WFont>
    +#include <Wt/WWidget>
    +
    +namespace Wt {
    +
    +class DomElement;
    +class WWebWidget;
    +
    +/*! \defgroup style Style classes
    + *  \brief Collection of classes for markup of widgets.
    + *
    + * The recommended way to provide style information for your %Wt
    + * application is using CSS stylesheets. You may add rules to the
    + * inline style sheet using WCssStyleSheet::addRule(), or by linking
    + * one or more external stylesheets using WApplication::useStyleSheet().
    + *
    + * Alternatively, you may also provide style information directly,
    + * using WCssDecorationStyle, which you can manipulate for each widget
    + * using WWidget::decorationStyle().
    + */
    +
    +/*! \class WCssDecorationStyle Wt/WCssDecorationStyle Wt/WCssDecorationStyle
    + *  \brief A style class for a single widget or style sheet rule.
    + *
    + * You can manipulate the decoration style of a single widget using
    + * WWidget::decorationStyle() or you can use a WCssDecorationStyle to
    + * add a rule to the inline style sheet using
    + * WCssStyleSheet::addRule(const std::string&, const WCssDecorationStyle& style, const std::string&).
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WWidget *widget = ...
    + * widget->decorationStyle().setCursor(PointingHandCursor);
    + * \endcode
    + * \endif
    + *
    + * \ingroup style
    + */
    +class WT_API WCssDecorationStyle
    +#ifdef WT_TARGET_JAVA
    +  : WObject
    +#endif
    +{
    +public:
    +  /*! \brief How a background image must be repeated.
    +   */
    +  enum Repeat { RepeatXY,  //!< Repeat horizontally and vertically, default
    +		RepeatX,   //!< Repeat horizontally
    +		RepeatY,   //!< Repeat vertically
    +		NoRepeat   //!< Do not repeat
    +  };
    +
    +  /*! \brief Text decoration options
    +   */
    +  enum TextDecoration { Underline   = 0x1, //!< Underline
    +			Overline    = 0x2, //!< Overline
    +			LineThrough = 0x4, //!< LineThrough
    +			Blink       = 0x8  //!< Blink
    +  };
    +
    +  /*! \brief Creates a default style.
    +   */
    +  WCssDecorationStyle();
    +
    +  /*! \brief Assignment operator.
    +   */
    +  WCssDecorationStyle& operator= (const WCssDecorationStyle& other);
    +
    +  /*! \brief Sets the cursor style.
    +   */
    +  void setCursor(Cursor c);
    +
    +  /*! \brief Returns the cursor style.
    +   */
    +  Cursor cursor() const { return cursor_; }
    +
    +  /*! \brief Sets a custom cursor image URI, with optionally a fallback cursor.
    +   * 
    +   * The URI should point to a .cur file (this shoul be a real .cur file, 
    +   * renaming an .ico is not enough for Internet Explorer).
    +   */
    +  void setCursor(std::string cursorImage, Cursor fallback = ArrowCursor);
    +
    +  /*! \brief Returns the cursor image.
    +   */
    +  std::string cursorImage() const { return cursorImage_; }
    +
    +  /*! \brief Sets the background color.
    +   */
    +  void setBackgroundColor(WColor color);
    +
    +  /*! \brief Returns the background color.
    +   */
    +  WColor backgroundColor() const { return backgroundColor_; }
    +
    +  /*! \brief Sets a background image URL.
    +   *
    +   * The image may be placed in a particular location by specifying
    +   * sides by OR'ing Wt::Side values together, e.g. (Right | Top).
    +   *
    +   * \sa setBackgroundImage()
    +   */
    +  void setBackgroundImage(const std::string& imageHRef,
    +			  Repeat repeat = RepeatXY,
    +			  WFlags<Side> sides = 0);
    +
    +  /*! \brief Sets a background image URL.
    +   *
    +   * The image may be placed in a particular location by specifying
    +   * sides by OR'ing Wt::Side values together, e.g. (Right | Top).
    +   *
    +   * \sa setBackgroundImage()
    +   */
    +  void setBackgroundImage(WResource *resource,
    +			  Repeat repeat = RepeatXY,
    +			  WFlags<Side> sides = 0);
    +
    +  /*! \brief Returns the background image URL.
    +   */
    +  const std::string& backgroundImage() const { return backgroundImage_; }
    +
    +  /*! \brief Returns the background image repeat.
    +   */
    +  Repeat backgroundImageRepeat() const { return backgroundImageRepeat_; }
    +
    +  /*! \brief Sets the foreground color.
    +   */
    +  void setForegroundColor(WColor color);
    +
    +  /*! \brief Returns the foreground color.
    +   */
    +  WColor foregroundColor() const { return foregroundColor_; }
    +
    +  /*! \brief Sets the border style.
    +   *  
    +   * A border may be placed in a particular location by specifying
    +   * sides by OR'ing WWidget::Side values together, e.g. (Right | Top).
    +   */
    +  void setBorder(WBorder border, WFlags<Side> sides = All);
    +
    +  /*! \brief Returns the border style.
    +   */
    +  WBorder border() const { return border_; }
    +
    +  /*! \brief Sets the font.
    +   */
    +  void setFont(const WFont& font);
    +
    +  /*! \brief Returns a reference to the font.
    +   */
    +  WFont& font() { return font_; }
    +
    +  /*! \brief Sets the text decoration options.
    +   *
    +   * You may logically or together any of the options of the
    +   * TextDecoration enumeration.
    +   *
    +   * The default is 0.
    +   */
    +  void setTextDecoration(WFlags<TextDecoration> decoration);
    +
    +  /*! \brief Returns the text decoration options.
    +   */
    +  WFlags<TextDecoration> textDecoration() const { return textDecoration_; }
    +
    +  std::string cssText();
    +  void updateDomElement(DomElement& element, bool all);
    +
    +private:
    +  WWebWidget               *widget_;
    +  Cursor                    cursor_;
    +  std::string               cursorImage_;
    +  WBorder                   border_;
    +  WColor                    backgroundColor_;
    +  WColor	            foregroundColor_;
    +  std::string	            backgroundImage_;
    +  WResource                *backgroundImageResource_;
    +  Repeat	            backgroundImageRepeat_;
    +  WFlags<Side>              backgroundImageLocation_;
    +  WFont		            font_;
    +  WFlags<TextDecoration>    textDecoration_;
    +  WFlags<Side>              borderPosition_;
    +
    +  bool		            cursorChanged_;
    +  bool		            borderChanged_;
    +  bool		            foregroundColorChanged_;
    +  bool		            backgroundColorChanged_;
    +  bool	  	            backgroundImageChanged_;
    +  bool		            fontChanged_;
    +  bool                      textDecorationChanged_;
    +
    +  void changed();
    +  void backgroundImageResourceChanged();
    +
    +  void setWebWidget(WWebWidget *widget);
    +  friend class WWebWidget;
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WCssDecorationStyle::TextDecoration)
    +
    +}
    +
    +#endif // WCSSDECORATIONSTYLE_H_
    diff --git a/wt-3.1.7a/src/Wt/WCssDecorationStyle.C b/wt-3.1.7a/src/Wt/WCssDecorationStyle.C
    new file mode 100644
    index 0000000..33d6253
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCssDecorationStyle.C
    @@ -0,0 +1,323 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WCssDecorationStyle"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WWidget"
    +#include "Wt/WWebWidget"
    +#include "Wt/WResource"
    +
    +#include "DomElement.h"
    +
    +using namespace Wt;
    +
    +WCssDecorationStyle::WCssDecorationStyle()
    +  : widget_(0),
    +    cursor_(AutoCursor),
    +    backgroundImageRepeat_(RepeatXY),
    +    backgroundImageLocation_(0),
    +    textDecoration_(0),
    +    borderPosition_(0),
    +    cursorChanged_(false),
    +    borderChanged_(false),
    +    foregroundColorChanged_(false),
    +    backgroundColorChanged_(false),
    +    backgroundImageChanged_(false),
    +    fontChanged_(false),
    +    textDecorationChanged_(false)
    +{ }
    +
    +WCssDecorationStyle&
    +WCssDecorationStyle::operator= (const WCssDecorationStyle& other)
    +{
    +  setCursor(other.cursor_);
    +  setBackgroundColor(other.backgroundColor());
    +  setBackgroundImage(other.backgroundImage(),
    +		     other.backgroundImageRepeat(),
    +		     other.backgroundImageLocation_);
    +  setForegroundColor(other.foregroundColor());
    +  setBorder(other.border());
    +  setFont(other.font_);
    +  setTextDecoration(other.textDecoration());
    +
    +  return *this;
    +}
    +
    +void WCssDecorationStyle::setWebWidget(WWebWidget *w)
    +{
    +  widget_ = w;
    +  font_.setWebWidget(w);
    +}
    +
    +void WCssDecorationStyle::changed()
    +{
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WCssDecorationStyle::setCursor(Cursor c)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || cursor_ != c) {
    +    cursor_ = c;
    +    cursorChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setCursor(std::string cursorImage, Cursor fallback)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || cursorImage_ != cursorImage
    +      || cursor_ != fallback) {
    +    cursorImage_ = cursorImage;
    +    cursor_ = fallback;
    +    cursorChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setFont(const WFont& font)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || font_ != font) {
    +    font_ = font;
    +    fontChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setBackgroundImage(const std::string& image,
    +					     Repeat repeat,
    +					     WFlags<Side> sides)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || backgroundImage_ != image
    +      || backgroundImageRepeat_ != repeat
    +      || backgroundImageLocation_ != sides) {
    +    backgroundImage_ = image;
    +    backgroundImageResource_ = 0;
    +    backgroundImageRepeat_ = repeat;
    +    backgroundImageLocation_ = sides;
    +    backgroundImageChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setBackgroundImage(WResource *resource,
    +					     Repeat repeat,
    +					     WFlags<Side> sides)
    +{
    +  backgroundImageResource_ = resource;
    +  resource->dataChanged().
    +    connect(this, &WCssDecorationStyle::backgroundImageResourceChanged);
    +  setBackgroundImage(resource->url(), repeat, sides);
    +}
    +
    +void WCssDecorationStyle::backgroundImageResourceChanged()
    +{
    +  if (backgroundImageResource_) {
    +    setBackgroundImage(backgroundImageResource_->url(),
    +                       backgroundImageRepeat_, backgroundImageLocation_);
    +  }
    +}
    +
    +void WCssDecorationStyle::setBackgroundColor(WColor color)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || backgroundColor_ != color) {
    +    backgroundColorChanged_ = true;
    +    backgroundColor_ = color;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setForegroundColor(WColor color)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || foregroundColor_ != color) {
    +    foregroundColor_ = color;
    +    foregroundColorChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setBorder(WBorder border, WFlags<Side> sides)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || border_ != border
    +      || borderPosition_ != sides) {
    +    border_ = border;
    +    borderPosition_ = sides;
    +    borderChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::setTextDecoration(WFlags<TextDecoration> options)
    +{
    +  if (!WWebWidget::canOptimizeUpdates()
    +      || textDecoration_ != options) {
    +    textDecoration_ = options;
    +    textDecorationChanged_ = true;
    +    changed();
    +  }
    +}
    +
    +void WCssDecorationStyle::updateDomElement(DomElement& element, bool all)
    +{
    +  /*
    +   * set cursor
    +   */
    +  if (cursorChanged_ || all) {
    +    switch (cursor_) {
    +    case AutoCursor:
    +      if (cursorChanged_)
    +	element.setProperty(PropertyStyleCursor, "auto");
    +      break;
    +    case ArrowCursor:
    +      element.setProperty(PropertyStyleCursor, "default"); break;
    +    case CrossCursor:
    +      element.setProperty(PropertyStyleCursor, "crosshair"); break;
    +    case PointingHandCursor:
    +      element.setProperty(PropertyStyleCursor, "pointer"); break;
    +    case OpenHandCursor:
    +      element.setProperty(PropertyStyleCursor, "move"); break;
    +    case WaitCursor:
    +      element.setProperty(PropertyStyleCursor, "wait"); break;
    +    case IBeamCursor:
    +      element.setProperty(PropertyStyleCursor, "text"); break;
    +    case WhatsThisCursor:
    +      element.setProperty(PropertyStyleCursor, "help"); break;
    +    }
    +
    +    if (!cursorImage_.empty()) {
    +      element.setProperty(PropertyStyleCursor, 
    +			  "url(" + cursorImage_ + "),"
    +			  + element.getProperty(PropertyStyleCursor));
    +    }
    +
    +    cursorChanged_ = false;
    +  }
    +
    +  /*
    +   * set font
    +   */
    +  font_.updateDomElement(element, fontChanged_, all);
    +  fontChanged_ = false;
    +
    +  /*
    +   * set border
    +   */
    +  if (borderChanged_ || all) {
    +    bool elementHasDefaultBorder
    +      = element.type() == DomElement_IFRAME
    +      || element.type() == DomElement_INPUT
    +      || element.type() == DomElement_SELECT
    +      || element.type() == DomElement_TEXTAREA;
    +
    +    if (borderChanged_
    +	|| elementHasDefaultBorder
    +	|| (border_.style() != WBorder::None)) {
    +      if (borderPosition_ & Top)
    +	  element.setProperty(PropertyStyleBorderTop, border_.cssText());
    +      if (borderPosition_ & Left)
    +	  element.setProperty(PropertyStyleBorderLeft, border_.cssText());
    +      if (borderPosition_ & Right)
    +	  element.setProperty(PropertyStyleBorderRight, border_.cssText());
    +      if (borderPosition_ & Bottom)
    +	  element.setProperty(PropertyStyleBorderBottom, border_.cssText());
    +    }
    +    borderChanged_ = false;
    +  }
    +
    +  /*
    +   * set colors
    +   */
    +  if (foregroundColorChanged_ || all) {
    +    if ((all && !foregroundColor_.isDefault())
    +	|| foregroundColorChanged_)
    +      element.setProperty(PropertyStyleColor, foregroundColor_.cssText());
    +    foregroundColorChanged_ = false;
    +  }
    +
    +  if (backgroundColorChanged_ || all) {
    +    if ((all && !backgroundColor_.isDefault())
    +	|| backgroundColorChanged_)
    +      element.setProperty(PropertyStyleBackgroundColor,
    +			  backgroundColor_.cssText());
    +    backgroundColorChanged_ = false;
    +  }
    +
    +  if (backgroundImageChanged_ || all) {
    +    if ((backgroundImage_.length() != 0) || backgroundImageChanged_) {
    +      element.setProperty(PropertyStyleBackgroundImage,
    +			  backgroundImage_.length() > 0
    +			  ? "url("
    +	  + WApplication::instance()->fixRelativeUrl(backgroundImage_) + ")" 
    +			  : "none");
    +      switch (backgroundImageRepeat_) {
    +      case RepeatXY:
    +	element.setProperty(PropertyStyleBackgroundRepeat, "repeat"); break;
    +      case RepeatX:
    +	element.setProperty(PropertyStyleBackgroundRepeat, "repeat-x"); break;
    +      case RepeatY:
    +	element.setProperty(PropertyStyleBackgroundRepeat, "repeat-y"); break;
    +      case NoRepeat:
    +	element.setProperty(PropertyStyleBackgroundRepeat, "no-repeat");break;
    +      }
    +
    +      if (backgroundImageLocation_) {
    +	// www3schools claims this is needed for mozilla -- but not true ?
    +	//element.setProperty(PropertyStyleBackgroundAttachment, "fixed");
    +
    +	std::string location;
    +	if (backgroundImageLocation_ & CenterY)
    +	  location += " center";
    +	else if (backgroundImageLocation_ & Bottom)
    +	  location += " bottom";
    +	else
    +	  location += " top";
    +
    +	if (backgroundImageLocation_ & CenterX)
    +	  location += " center";
    +	else if (backgroundImageLocation_ & Right)
    +	  location += " right";
    +	else 
    +	  location += " left";
    +
    +	element.setProperty(PropertyStyleBackgroundPosition, location);
    +      }
    +    }
    +
    +    backgroundImageChanged_ = false;
    +  }
    +
    +  if (textDecorationChanged_ ||  all) {
    +    std::string options;
    +
    +    if (textDecoration_ & Underline)
    +      options += " underline";
    +    if (textDecoration_ & Overline)
    +      options += " overline";
    +    if (textDecoration_ & LineThrough)
    +      options += " line-through";
    +    if (textDecoration_ & Blink)
    +      options += " blink";
    +
    +    if (!options.empty() || textDecorationChanged_)
    +      element.setProperty(PropertyStyleTextDecoration, options);
    +
    +    textDecorationChanged_ = false;
    +  }
    +}
    +
    +std::string WCssDecorationStyle::cssText()
    +{
    +  DomElement e(DomElement::ModeCreate, DomElement_A);
    +  updateDomElement(e, true);
    +
    +  return e.cssStyle();
    +}
    diff --git a/wt-3.1.7a/src/Wt/WCssStyleSheet b/wt-3.1.7a/src/Wt/WCssStyleSheet
    new file mode 100644
    index 0000000..6046a4b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCssStyleSheet
    @@ -0,0 +1,284 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCSS_STYLE_SHEET_H_
    +#define WCSS_STYLE_SHEET_H_
    +
    +#include <vector>
    +#include <set>
    +#include <string>
    +
    +#include <Wt/WBreak>
    +#include <Wt/WCssDecorationStyle>
    +
    +namespace Wt {
    +
    +class WApplication;
    +class WCssStyleSheet;
    +class WCssTemplateWidget;
    +
    +/*! \class WCssRule Wt/WCssStyleSheet Wt/WCssStyleSheet
    + *  \brief Abstract rule in a CSS style sheet.
    + *
    + * A rule presents CSS style properties that are applied to a selected
    + * set of elements.
    + *
    + * Use WCssTemplateRule if you would like to use a widget as a
    + * template for specifying (<i>and</i> updating) a style rule, using
    + * the widgets style properties, or WCssTextRule if you wish to
    + * directly specify the CSS declarations.
    + *
    + * \sa WCssStyleSheet
    + *
    + * \ingroup style
    + */
    +class WT_API WCssRule
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WCssRule();
    +
    +  /*! \brief Returns the selector.
    +   */
    +  const std::string& selector() const { return selector_; }
    +
    +  /*! \brief Returns the style sheet to which this rule belongs.
    +   */
    +  WCssStyleSheet *sheet() const { return sheet_; }
    +
    +  /*! \brief Indicates that the rule has changed and needs updating
    +   */
    +  void modified();
    +
    +  /*! \brief Returns the declarations.
    +   *
    +   * This is a semi-colon separated list of CSS declarations.
    +   */
    +  virtual const std::string declarations() = 0;
    +
    +  virtual bool updateDomElement(DomElement& cssRuleElement, bool all);
    +
    +protected:
    +  /*! \brief Creates a new CSS rule with given selector.
    +   */
    +  WCssRule(const std::string& selector);
    +
    +private:
    +  std::string  selector_;
    +  WCssStyleSheet *sheet_;
    +
    +  friend class WCssStyleSheet;
    +};
    +
    +/*! \class WCssTemplateRule Wt/WCssStyleSheet Wt/WCssStyleSheet
    + *  \brief A CSS rule based on a template widget.
    + *
    + * This is a CSS rule whose CSS style properties are defined based on
    + * properties of a template widget. When modifying the template
    + * widget, these changes are reflected on the CSS rule and thus all
    + * widgets that have this CSS rule.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WCssTemplateRule *styleRule = new Wt::WCssTemplateRule("#" + id() + " .item");
    + * Wt::WApplication::instance()->styleSheet().addRule(styleRule);
    + *
    + * styleRule->templateWidget()->resize(100, WLength::Auto);
    + * styleRule->templateWidget()->decorationStyle().setCursor(PointingHandCursor);
    + * \endcode
    + * \endif
    + *
    + * \sa Wt::WCssStyleSheet
    + *
    + * \ingroup style
    + */
    +class WT_API WCssTemplateRule : public WCssRule
    +{
    +public:
    +  /*! \brief Creates a CSS rule with a given selector.
    +   *
    +   * The selector should be a valid CSS selector.
    +   *
    +   * \note If you want to update the rule, then the selector should be
    +   * unique and not contain commas, since this is not supported by
    +   * Microsoft Internet Explorer.
    +   */
    +  WCssTemplateRule(const std::string& selector);
    +
    +  ~WCssTemplateRule();
    +
    +  /*! \brief Returns the widget that is used as a template.
    +   *
    +   * Various properties of the widget are reflected in the CSS style:
    +   * - size and dimensions: WWidget::resize(), WWidget::setMinimumSize(),
    +   * and WWidget::setMaximumSize()
    +   * - its position: WWidget::setPositionScheme(), WWidget::setOffsets(),
    +   * WWidget::setFloatSide(), WWidget::setClearSides()
    +   * - visibility: WWidget::hide(), WWidget::show() and WWidget::setHidden()
    +   * - margins: WWidget::setMargin()
    +   * - line height: WWidget::setLineHeight()
    +   * - all decoration style properties: WWidget::decorationStyle()
    +   *
    +   * When modifying one of these properties of the returned widget, the
    +   * rule will be updated accordingly.
    +   */
    +  WWidget *templateWidget();
    +
    +  const std::string declarations();
    +
    +  bool updateDomElement(DomElement& cssRuleElement, bool all);
    +
    +private:
    +  WCssTemplateWidget *widget_;
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +#define WT_USTRING WString
    +#else
    +#define WT_USTRING std::string
    +#endif // WT_TARGET_JAVA
    +
    +/*! \class WCssTextRule Wt/WCssStyleSheet Wt/WCssStyleSheet
    + *  \brief A CSS rule specified directly using CSS declarations
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WCssTextRule *styleRule = new Wt::WCssTextRule(".MyWidget .item", "width: 100px; cursor: pointer;");
    + * Wt::WApplication::instance()->styleSheet().addRule(styleRule);
    + * \endcode
    + * \endif
    + *
    + * \sa WCssStyleSheet
    + *
    + * \ingroup style
    + */
    +class WT_API WCssTextRule : public WCssRule
    +{
    +public:
    +  /*! \brief Creates a CSS rule with a given selector and declarations.
    +   */
    +  WCssTextRule(const std::string& selector, const WT_USTRING& declarations);
    +
    +  const std::string declarations();
    +
    +private:
    +  WT_USTRING declarations_;
    +};
    +
    +/*! \class WCssStyleSheet Wt/WCssStyleSheet Wt/WCssStyleSheet
    + *  \brief A CSS style sheet.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WApplication::instance()->styleSheet().addRule(".MyWidget .item", "width: 100px; cursor: pointer;");
    + * \endcode
    + * \endif
    + *
    + * \sa WApplication::styleSheet()
    + *
    + * \ingroup style
    + */
    +class WT_API WCssStyleSheet
    +{
    +public:
    +  /*! \brief Creates a new empty style sheet.
    +   */
    +  WCssStyleSheet();
    +
    +  /*! \brief Destroys a style sheet, and all rules in it.
    +   */
    +  ~WCssStyleSheet();
    +
    +  /*! \brief Adds a CSS rule.
    +   *
    +   * Add a rule using the CSS selector \p selector, with CSS
    +   * declarations in \p declarations. These declarations must be a
    +   * list separated by semi-colons (;).
    +   *
    +   * Optionally, you may give a \p ruleName, which may later be
    +   * used to check if the rule was already defined.
    +   *
    +   * \sa isDefined()
    +   */
    +  WCssTextRule *addRule(const std::string& selector,
    +			const WT_USTRING& declarations,
    +			const std::string& ruleName = std::string());
    +
    +#ifndef WT_TARGET_JAVA
    +  /* Interprets as UTF-8 */
    +  WCssTextRule *addRule(const std::string& selector,
    +			const std::string& declarations,
    +			const std::string& ruleName = std::string());
    +
    +  /* Interprets as UTF-8 */
    +  WCssTextRule *addRule(const std::string& selector,
    +			const char *declarations,
    +			const std::string& ruleName = std::string());
    +#endif
    +
    +  /*! \brief Adds a CSS rule.
    +   *
    +   * Add a rule using the CSS selector \p selector, with styles specified
    +   * in \p style.
    +   *
    +   * Optionally, you may give a \p ruleName, which may later be
    +   * used to check if the rule was already defined.
    +   *
    +   * \sa isDefined()
    +   */
    +  WCssTemplateRule *addRule(const std::string& selector,
    +			    const WCssDecorationStyle& style,
    +			    const std::string& ruleName = std::string());
    +
    +  /*! \brief Adds a CSS rule.
    +   *
    +   * Optionally, you may give a \p ruleName, which may later be
    +   * used to check if the rule was already defined.
    +   *
    +   * \sa isDefined()
    +   */
    +  WCssRule *addRule(WCssRule *rule,
    +		    const std::string& ruleName = std::string());
    +
    +  /*! \brief Returns if a rule was already defined in this style sheet.
    +   *
    +   * Returns whether a rule was added with the given \p ruleName.
    +   *
    +   * \sa addRule()
    +   */
    +  bool isDefined(const std::string& ruleName) const;
    +
    +  /*! \brief Removes a rule.
    +   */
    +  void removeRule(WCssRule *rule);
    +
    +  void ruleModified(WCssRule *rule);
    +
    +  std::string cssText(bool all);
    +  void javaScriptUpdate(WApplication *app, std::ostream& js, bool all);
    +
    +  void clear();
    +
    +private:
    +  typedef std::vector<WCssRule *> RuleList;
    +  typedef std::set<WCssRule *> RuleSet;
    +
    +  RuleList rules_;
    +  RuleList rulesAdded_;
    +
    +  RuleSet rulesModified_;
    +  std::vector<std::string> rulesRemoved_;
    +
    +  std::set<std::string> defined_;
    +};
    +
    +}
    +
    +#endif // WCSS_STYLE_SHEET_H_
    diff --git a/wt-3.1.7a/src/Wt/WCssStyleSheet.C b/wt-3.1.7a/src/Wt/WCssStyleSheet.C
    new file mode 100644
    index 0000000..5539ed3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WCssStyleSheet.C
    @@ -0,0 +1,325 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WCssStyleSheet"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +
    +#include "DomElement.h"
    +#include "EscapeOStream.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +class WCssTemplateWidget : public WWebWidget
    +{
    +public:
    +  WCssTemplateWidget(WCssTemplateRule *rule)
    +    : rule_(rule)
    +  { }
    +
    +  virtual void setPositionScheme(PositionScheme scheme) {
    +    WWebWidget::setPositionScheme(scheme);
    +    rule_->modified();
    +  }
    +
    +  virtual void setOffsets(const WLength& offset, WFlags<Side> sides = All) {
    +    WWebWidget::setOffsets(offset, sides);
    +    rule_->modified();
    +  }
    +
    +  virtual void resize(const WLength& width, const WLength& height) {
    +    WWebWidget::resize(width, height);
    +    rule_->modified();
    +  }
    +
    +  virtual void setMinimumSize(const WLength& width, const WLength& height) {
    +    WWebWidget::setMinimumSize(width, height);
    +    rule_->modified();
    +  }
    +
    +  virtual void setMaximumSize(const WLength& width, const WLength& height) {
    +    WWebWidget::setMaximumSize(width, height);
    +    rule_->modified();
    +  }
    +
    +  virtual void setLineHeight(const WLength& height) {
    +    WWebWidget::setLineHeight(height);
    +    rule_->modified();
    +  }
    +
    +  virtual void setFloatSide(Side s) {
    +    WWebWidget::setFloatSide(s);
    +    rule_->modified();
    +  }
    +
    +  virtual void setClearSides(WFlags<Side> sides) {
    +    WWebWidget::setClearSides(sides);
    +    rule_->modified();
    +  }
    +
    +  virtual void setMargin(const WLength& margin, WFlags<Side> sides = All) {
    +    WWebWidget::setMargin(margin, sides);
    +    rule_->modified();
    +  }
    +
    +  virtual void setHidden(bool hidden) {
    +    WWebWidget::setHidden(hidden);
    +    rule_->modified();
    +  }
    +
    +  virtual void setPopup(bool popup) {
    +    WWebWidget::setPopup(popup);
    +    rule_->modified();
    +  }
    +
    +  virtual void setInline(bool isinline) {
    +    WWebWidget::setInline(isinline);
    +    rule_->modified();
    +  }
    +
    +  virtual WCssDecorationStyle& decorationStyle() {
    +    // Assumption here! We should really catch modifications to the
    +    // stylesheet...
    +    rule_->modified();
    +
    +    return WWebWidget::decorationStyle();
    +  }
    +
    +  virtual void setVerticalAlignment(AlignmentFlag alignment,
    +				    const WLength& length) {
    +    WWebWidget::setVerticalAlignment(alignment, length);
    +    rule_->modified();
    +  }
    +
    +  virtual DomElementType domElementType() const { return DomElement_SPAN; }
    +
    +private:
    +  WCssTemplateRule *rule_;
    +};
    +
    +WCssRule::WCssRule(const std::string& selector)
    +  : selector_(selector),
    +    sheet_(0)
    +{ }
    +
    +WCssRule::~WCssRule()
    +{ 
    +  if (sheet_)
    +    sheet_->removeRule(this);
    +}
    +
    +void WCssRule::modified()
    +{
    +  if (sheet_)
    +    sheet_->ruleModified(this);
    +}
    +
    +bool WCssRule::updateDomElement(DomElement& cssRuleElement, bool all)
    +{
    +  return false;
    +}
    +
    +WCssTemplateRule::WCssTemplateRule(const std::string& selector)
    +  : WCssRule(selector)
    +{
    +  widget_ = new WCssTemplateWidget(this);
    +}
    +
    +WCssTemplateRule::~WCssTemplateRule()
    +{
    +  delete widget_;
    +}
    +
    +WWidget *WCssTemplateRule::templateWidget()
    +{
    +  return widget_;
    +}
    +
    +const std::string WCssTemplateRule::declarations()
    +{
    +  DomElement e(DomElement::ModeUpdate, widget_->domElementType());
    +  updateDomElement(e, true);
    +  return e.cssStyle();
    +}
    +
    +bool WCssTemplateRule::updateDomElement(DomElement& element, bool all)
    +{
    +  widget_->updateDom(element, all);
    +  return true;
    +}
    +
    +WCssTextRule::WCssTextRule(const std::string& selector,
    +			   const WT_USTRING& declarations)
    +  : WCssRule(selector),
    +    declarations_(declarations)
    +{ }
    +
    +const std::string WCssTextRule::declarations()
    +{
    +  return declarations_.toUTF8(); 
    +}
    +
    +WCssStyleSheet::WCssStyleSheet()
    +{ }
    +
    +WCssStyleSheet::~WCssStyleSheet()
    +{
    +  while (!rules_.empty())
    +    delete rules_.back();
    +}
    +
    +WCssRule *WCssStyleSheet::addRule(WCssRule *rule, const std::string& ruleName)
    +{
    +  rules_.push_back(rule);
    +  rulesAdded_.push_back(rule);
    +  rule->sheet_ = this;
    +
    +  if (!ruleName.empty())
    +    defined_.insert(ruleName);
    +
    +  return rule;
    +}
    +
    +WCssTemplateRule *WCssStyleSheet::addRule(const std::string& selector,
    +					  const WCssDecorationStyle& style,
    +					  const std::string& ruleName)
    +{
    +  WCssTemplateRule *result = new WCssTemplateRule(selector);
    +  result->templateWidget()->setDecorationStyle(style);
    +
    +  addRule(result, ruleName);
    +  return result;
    +}
    +
    +WCssTextRule *WCssStyleSheet::addRule(const std::string& selector,
    +				      const WT_USTRING& declarations,
    +				      const std::string& ruleName)
    +{
    +  WCssTextRule *result = new WCssTextRule(selector, declarations);
    +  addRule(result, ruleName);
    +  return result;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WCssTextRule *WCssStyleSheet::addRule(const std::string& selector,
    +				      const char *declarations,
    +				      const std::string& ruleName)
    +{
    +  return addRule(selector, WT_USTRING::fromUTF8(declarations), ruleName);
    +}
    +
    +WCssTextRule *WCssStyleSheet::addRule(const std::string& selector,
    +				      const std::string& declarations,
    +				      const std::string& ruleName)
    +{
    +  return addRule(selector, WT_USTRING::fromUTF8(declarations), ruleName);
    +}
    +#endif
    +
    +bool WCssStyleSheet::isDefined(const std::string& ruleName) const
    +{
    +  std::set<std::string>::const_iterator i = defined_.find(ruleName);
    +  return i != defined_.end();
    +}
    +
    +void WCssStyleSheet::removeRule(WCssRule *rule)
    +{
    +  if (Utils::erase(rules_, rule)) {
    +    if (!Utils::erase(rulesAdded_, rule))
    +      rulesRemoved_.push_back(rule->selector());
    +
    +    rulesModified_.erase(rule);
    +  }
    +}
    +
    +void WCssStyleSheet::ruleModified(WCssRule *rule)
    +{
    +  rulesModified_.insert(rule);
    +}
    +
    +std::string WCssStyleSheet::cssText(bool all)
    +{
    +  std::string result;
    +
    +  RuleList& toProcess = all ? rules_ : rulesAdded_;
    +
    +  for (unsigned i = 0; i < toProcess.size(); ++i) {
    +    WCssRule *rule = toProcess[i];
    +    result += rule->selector() + " { " + rule->declarations() + " }\n";
    +  }
    +
    +  rulesAdded_.clear();
    +
    +  if (all)
    +    rulesModified_.clear();
    +
    +  return result;
    +}
    +
    +void WCssStyleSheet::javaScriptUpdate(WApplication *app,
    +				      std::ostream& js, bool all)
    +{
    +  if (!all) {
    +    for (unsigned i = 0; i < rulesRemoved_.size(); ++i) {
    +      js << WT_CLASS ".removeCssRule(";
    +      DomElement::jsStringLiteral(js, rulesRemoved_[i], '\'');
    +      js << ");";
    +    }
    +    rulesRemoved_.clear();
    +
    +    for (RuleSet::const_iterator i = rulesModified_.begin();
    +	 i != rulesModified_.end(); ++i) {
    +      js << "{ var d= " WT_CLASS ".getCssRule(";
    +      DomElement::jsStringLiteral(js, (*i)->selector(), '\'');
    +      js << ");if(d){";
    +
    +      DomElement *d = DomElement::updateGiven("d", DomElement_SPAN);
    +      if ((*i)->updateDomElement(*d, false)) {
    +	EscapeOStream sout(js);
    +	d->asJavaScript(sout, DomElement::Update);
    +      }
    +
    +      delete d;
    +
    +      js << "}}";
    +    }
    +    rulesModified_.clear();
    +  }
    +
    +  if (!app->environment().agentIsIE()
    +      && app->environment().agent() != WEnvironment::Konqueror) {
    +    RuleList& toProcess = all ? rules_ : rulesAdded_;
    +
    +    for (unsigned i = 0; i < toProcess.size(); ++i) {
    +      WCssRule *rule = toProcess[i];
    +      js << WT_CLASS ".addCss('"
    +	 << rule->selector() << "',";
    +      DomElement::jsStringLiteral(js, rule->declarations(), '\'');
    +      js << ");" << std::endl;
    +    }
    +
    +    rulesAdded_.clear();
    +    if (all)
    +      rulesModified_.clear();
    +  } else {
    +    std::string text = cssText(all);
    +
    +    if (!text.empty()) {
    +      js << WT_CLASS ".addCssText(";
    +      DomElement::jsStringLiteral(js, text, '\'');
    +      js << ");" << std::endl;
    +    }
    +  }
    +}
    +
    +void WCssStyleSheet::clear()
    +{
    +  while (!rules_.empty())
    +    delete rules_.back();
    +}
    +
    +} // namespace Wt
    diff --git a/wt-3.1.7a/src/Wt/WDate b/wt-3.1.7a/src/Wt/WDate
    new file mode 100644
    index 0000000..7c0e225
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDate
    @@ -0,0 +1,429 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDATE_H_
    +#define WDATE_H_
    +
    +#include <Wt/WDateTime>
    +#include <Wt/WString>
    +#include <exception>
    +
    +namespace boost {
    +  namespace gregorian {
    +    class date;
    +  }
    +}
    +
    +namespace Wt {
    +
    +/*! \class InvalidDateException Wt/WDate Wt/WDate
    + *  \brief Exception thrown when calculating with an invalid date.
    + *
    + * \sa WDate
    + */
    +class WT_API InvalidDateException : public std::exception
    +{
    +public:
    +  InvalidDateException();
    +  ~InvalidDateException() throw();
    +
    +  /*! \brief Returns a message describing the error.
    +   */
    +  const char *what() const throw();
    +};
    +
    +/*! \class WDate Wt/WDate Wt/WDate
    + *  \brief A gregorian calendar date.
    + *
    + * Class which holds a date on the gregorian calendar, specified as
    + * day/month/year.
    + *
    + * A %WDate may either specify a valid date, or be a <i>Null</i> date
    + * (using the default constructor WDate::WDate(), for which isNull()
    + * returns \c true).
    + *
    + * A valid date may be specified by year, month, and day of month
    + * (using the \link WDate::WDate(int, int, int)
    + * WDate(year, month, day) \endlink constructor,
    + * or the setDate() method). When attempting to specify an
    + * invalid date (with an impossible combination of year/month/date),
    + * isIvalid() will return \c false.
    + *
    + * The class provides a flexible way for converting between strings
    + * and dates. Use toString() to convert to strings, and fromString()
    + * for parsing strings. Both methods take a format string, and the
    + * same format syntax is supported by both methods.
    + *
    + * Simple operations are supported to compare dates, or to calculate
    + * with dates. These operations throw InvalidDateException when one of
    + * the dates is invalid.
    + *
    + * <h3>i18n</h3>
    + *
    + * If the thread using a WDate is bound to a WApplication (i.e.
    + * WApplication::instance() does not return 0), the date strings
    + * can be localized by overriding the default values for
    + * the localized string keys in the resource bundles of the WApplication:
    + * - Short day names: Wt.WDate.Mon through Wt.WDate.Sun
    + * - Long day names: Wt.WDate.Monday through Wt.WDate.Sunday
    + * - Short month names: Wt.WDate.Jan through Wt.WDate.Dec
    + * - Long month names: Wt.WDate.January through Wt.WDate.December
    + *
    + * If the thread using a WDate is not bound to a WApplication (i.e.
    + * WApplication::instance() returns 0), english strings will be used.
    + *
    + * Internationalization affects both WDate to string conversions and
    + * string to WDate conversion.
    + */
    +class WT_API WDate
    +{
    +public:
    +  /*! \brief Construct a <i>Null</i> date.
    +   *
    +   * A date for which isNull() returns \c true. A \p Null date is also
    +   * invalid.
    +   *
    +   * \sa isValid(), isNull()
    +   */
    +  WDate();
    +
    +  /*! \brief Specify a date by year, month, and day.
    +   *
    +   * The \p month has range 1-12 and the \p day has range 1-31.
    +   * When the date is invalid, isValid() is set to \c false.
    +   *
    +   * \sa setDate(), year(), month(), day()
    +   */
    +  WDate(int year, int month, int day);
    +
    +  /*! \brief Sets the date by year, month, and day.
    +   *
    +   * The \p month has range 1-12 and the \p day has range 1-31.
    +   * When the new date is invalid, isValid() is set to \c false.
    +   *
    +   * \sa WDate(int year, int month, int day), year(), month(), day()
    +   */
    +  void setDate(int year, int month, int day);
    +
    +  /*! \brief Adds days.
    +   *
    +   * Returns a date that is \p ndays later than this
    +   * date. Negative values for \p ndays will result in a date that
    +   * is as many days earlier.
    +   *
    +   * \sa addMonths(), addYears()
    +   */
    +  WDate addDays(int ndays) const;
    +
    +  /*! \brief Adds months.
    +   *
    +   * Returns a date that is the same day of the month, but
    +   * \p nmonths later than this date. Negative values for
    +   * \p nmonths will result in a date that is as many months
    +   * earlier.
    +   *
    +   * \sa addDays(), addYears()
    +   */
    +  WDate addMonths(int nmonths) const;
    +
    +  /*! \brief Adds years.
    +   *
    +   * Returns a date that is \p nyears later than this
    +   * date. Negative values for \p nyears will result in a date
    +   * that is as many years earlier.
    +   *
    +   * \sa addDays(), addMonths()
    +   */
    +  WDate addYears(int nyears) const;
    +
    +  /*! \brief Returns if this date is <i>Null</i>.
    +   *
    +   * A null date is also invalid.
    +   *
    +   * \sa isValid(), WDate()
    +   */
    +  bool isNull() const;
    +
    +  /*! \brief Returns if this date is valid.
    +   *
    +   * \sa isNull(), WDate(int, int, int), setDate()
    +   */
    +  bool isValid() const { return valid_; }
    +
    +  /*! \brief Returns the year.
    +   */
    +  int year() const { return year_; }
    +
    +  /*! \brief Returns the month (1-12).
    +   */
    +  int month() const { return month_; }
    +
    +  /*! \brief Returns the day of month (1-31).
    +   */
    +  int day() const { return day_; }
    +
    +  /*! \brief Returns the day of week (1-7).
    +   *
    +   * Returns the day of week, from Monday (=1) to Sunday (=7).
    +   */
    +  int dayOfWeek() const;
    +
    +  /*! \brief Returns the difference between two dates (in days).
    +   */
    +  int daysTo(const WDate& date) const;
    +
    +  /*! \brief Converts the date to a Julian day. 
    +   *
    +   * \sa fromJulianDay()
    +   */
    +  int toJulianDay() const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator< (const WDate& other) const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator<= (const WDate& other) const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator> (const WDate& other) const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator>= (const WDate& other) const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator== (const WDate& other) const;
    +
    +  /*! \brief Compares two dates.
    +   */
    +  bool operator!= (const WDate& other) const;
    +
    +  static WT_USTRING defaultFormat();
    +
    +  /*! \brief Formats this date to a string using a default format.
    +   *
    +   * The default \p format is "ddd MMM d yyyy".
    +   * For example, a date constructed as:
    +   * \code
    +   *   WDate d(2007,8,29);
    +   * \endcode
    +   * will be formatted as:
    +   * \code
    +   *   "Wed Aug 29 2007"
    +   * \endcode
    +   *
    +   * \sa toString(const WString& format) const, fromString()
    +   */
    +  WT_USTRING toString() const;
    +
    +  /*! \brief Formats this date to a string using a specified format.
    +   *
    +   * The \p format is a string in which the following contents has
    +   * a special meaning.
    +   *
    +   * <table>
    +   *  <tr><td><b>Code</b></td><td><b>Meaning</b></td>
    +   *      <td><b>Example (for Mon Aug 3 2007)</b></td></tr>
    +   *  <tr><td>d</td><td>The day without leading zero (1-31)</td>
    +          <td>3</td></tr>
    +   *  <tr><td>dd</td><td>The day with leading zero (01-31)</td>
    +          <td>03</td></tr>
    +   *  <tr><td>ddd</td><td>The day abbreviated using shortDayName()</td>
    +          <td>Mon</td></tr>
    +   *  <tr><td>dddd</td><td>The day abbreviated using longDayName()</td>
    +          <td>Monday</td></tr>
    +   *  <tr><td>M</td><td>The month without leading zero (1-12)</td>
    +          <td>8</td></tr>
    +   *  <tr><td>MM</td><td>The month with leading zero (01-12)</td>
    +          <td>08</td></tr>
    +   *  <tr><td>MMM</td><td>The month abbreviated using shortMonthName()</td>
    +          <td>Aug</td></tr>
    +   *  <tr><td>MMMM</td><td>The month abbreviated using longMonthName()</td>
    +          <td>August</td></tr>
    +   *  <tr><td>yy</td><td>The year as a two-digit number (00-99)</td>
    +          <td>07</td></tr>
    +   *  <tr><td>yyyy</td><td>The year as a four-digit number (-9999-9999)</td>
    +          <td>2007</td></tr>
    +   * </table>
    +   *
    +   * Any other text is kept literally. String content between single
    +   * quotes (') are not interpreted as special codes. Inside a string, a literal
    +   * quote may be specifed using a double quote ('').
    +   *
    +   * Examples of format and result:
    +   * <table>
    +   *  <tr><td><b>Format</b></td><td><b>Result (for Mon Aug 3 2007)</b></td></tr>
    +   *  <tr><td>ddd MMM d yyyy</td><td>Mon Aug 3 2007</td></tr>
    +   *  <tr><td>dd/MM/yyyy</td><td>03/08/2007</td></tr>
    +   *  <tr><td>dddd, MMM d, yyyy</td><td>Wednesday, Aug 3, 2007</td></tr>
    +   *  <tr><td>'MM': MM, 'd': d, 'yyyy': yyyy</td><td>MM: 08, d: 3, yyyy: 2007</td></tr>
    +   * </table>
    +   *
    +   * \sa fromString(const WString& value, const WString& format)
    +   */
    +  WT_USTRING toString(const WT_USTRING& format) const;
    +
    +  /*! \brief Parses a string to a date using a default format.
    +   *
    +   * The default \p format is "ddd MMM d yyyy".
    +   * For example, a date specified as:
    +   * \code
    +   *   "Wed Aug 29 2007"
    +   * \endcode
    +   * will be parsed as a date that equals a date constructed as:
    +   * \code
    +   *   WDate d(2007,8,29);
    +   * \endcode
    +   *
    +   * When the date could not be parsed or is not valid, an invalid
    +   * date is returned (for which isValid() returns false).
    +   *
    +   * \sa fromString(const WString& s, const WString& format), isValid()
    +   */
    +  static WDate fromString(const WT_USTRING& s);
    +
    +  /*! \brief Parses a string to a date using a specified format.
    +   *
    +   * The \p format follows the same syntax as used by
    +   * \link toString(const WString& format) const toString(const WString& format)\endlink.
    +   *
    +   * When the date could not be parsed or is not valid, an invalid
    +   * date is returned (for which isValid() returns false). 
    +   *
    +   * \sa toString(const WString&) const
    +   */
    +  static WDate fromString(const WT_USTRING& s, const WT_USTRING& format);
    +
    +  /* \brief Converts a Julian Day <i>jd</i> to a \link Wt::WDate WDate \endlink.
    +   *
    +   * \sa toJulianDay() const
    +   */
    +  static WDate fromJulianDay(int jd);
    +
    +  /*! \brief Reports the current client date.
    +   *
    +   * This method uses browser information to retrieve the date that is
    +   * configured in the client.
    +   *
    +   * \note Not Yet Implemented !
    +   */
    +  static WDate currentDate();
    +
    +  /*! \brief Reports the current server date.
    +   *
    +   * This method returns the date as indicated by the system clock of
    +   * the server.
    +   */
    +  static WDate currentServerDate();
    +
    +  static bool isLeapYear(int year);
    +  static bool isValid(int year, int month, int day);
    +
    +  /*! \brief Returns the short day name.
    +   *
    +   * Results (for given \p weekDay) are (default English):<br>
    +   * "Mon" (1),<br> "Tue" (2),<br> "Wed" (3),<br>
    +   * "Thu" (4),<br> "Fri" (5),<br> "Sat" (6),<br> "Sun" (7).
    +   *
    +   * The result is affected by localization using the "Wt.WDate.Mon" to
    +   * "Wt.WDate.Sun" keys.
    +   *
    +   * \sa longDayName()
    +   */
    +  static WT_USTRING shortDayName(int weekday);
    +
    +  /*! \brief Returns the short month name.
    +   *
    +   * Results (for given \p month) are (default English):<br>
    +   * "Jan" (1),<br> "Feb" (2),<br> "Mar" (3),<br>
    +   * "Apr" (4),<br> "May" (5),<br> "Jun" (6),<br>
    +   * "Jul" (7),<br> "Aug" (8),<br> "Sep" (9),<br>
    +   * "Oct" (10),<br> "Nov" (11),<br> "Dec" (12)<br>.
    +   *
    +   * The result is affected by localization using the "Wt.WDate.Jan" to
    +   * "Wt.WDate.Dec" keys.
    +   *
    +   * \sa longMonthName()
    +   */
    +  static WT_USTRING shortMonthName(int month);
    +
    +  /*! \brief Returns the long day name.
    +   *
    +   * Results (for given \p weekDay) are (default English):<br>
    +   * "Monday" (1),<br> "Tuesday" (2),<br> "Wednesday" (3),<br>
    +   * "Thursday" (4),<br> "Friday" (5),<br> "Saturday" (6),<br> "Sunday" (7).
    +   *
    +   * The result is affected by localization using the "Wt.WDate.Monday" to
    +   * "Wt.WDate.Sunday" keys.
    +   *
    +   * \sa shortDayName()
    +   */
    +  static WT_USTRING longDayName(int weekday);
    +
    +  /*! \brief Returns the long month name.
    +   *
    +   * Results (for given \p month) are (default English):<br>
    +   * "January" (1),<br> "February" (2),<br> "March" (3),<br>
    +   * "April" (4),<br> "May" (5),<br> "June" (6),<br> "July" (7),<br>
    +   * "August" (8),<br> "September" (9),<br> "October" (10),<br>
    +   * "November" (11),<br> "December" (12).
    +   *
    +   * The result is affected by localization using the "Wt.WDate.January" to
    +   * "Wt.WDate.December" keys.
    +   *
    +   * \sa shortDayName()
    +   */
    +  static WT_USTRING longMonthName(int month);
    +
    +  static std::string extFormat(const WT_USTRING& format);
    +
    +  struct RegExpInfo {
    +    std::string regexp;
    +    std::string dayGetJS;
    +    std::string monthGetJS;
    +    std::string yearGetJS;
    +  };
    +
    +  static RegExpInfo formatToRegExp(const WT_USTRING& format);
    +
    +private:
    +  bool valid_;
    +  int  year_;
    +  int  month_;
    +  int  day_;
    +
    +  struct ParseState {
    +    int d, M, y;
    +    int day, month, year;
    +
    +    ParseState();
    +  };
    +
    +  static bool parseLast(const std::string& v, unsigned& vi,
    +			ParseState& state, const WString& format);
    +
    +  static WDateTime::CharState handleSpecial(char c, const std::string& v,
    +					    unsigned& vi, ParseState& parse,
    +					    const WString& format);
    +
    +  bool writeSpecial(const std::string& f, unsigned& i, std::stringstream& result)
    +    const;
    +
    +  static int parseShortMonthName(const std::string& v, unsigned& pos);
    +  static int parseLongMonthName(const std::string& v, unsigned& pos);
    +  static int parseShortDayName(const std::string& v, unsigned& pos);
    +  static int parseLongDayName(const std::string& v, unsigned& pos);
    +
    +  friend class WDateTime;
    +};
    +
    +}
    +
    +#endif // WDATE_H_
    diff --git a/wt-3.1.7a/src/Wt/WDate.C b/wt-3.1.7a/src/Wt/WDate.C
    new file mode 100644
    index 0000000..6c42367
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDate.C
    @@ -0,0 +1,947 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <stdlib.h>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WDate"
    +#include "Wt/WLogger"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#include <boost/date_time/gregorian/gregorian.hpp>
    +using namespace boost::gregorian;
    +
    +namespace {
    +  std::string WT_WDATE = "Wt.WDate.";
    +}
    +
    +namespace Wt {
    +
    +InvalidDateException::InvalidDateException()
    +{ }
    +
    +InvalidDateException::~InvalidDateException() throw()
    +{ }
    +
    +const char *InvalidDateException::what() const throw()
    +{ 
    +  return "Error: Attempted operation on an invalid WDate";
    +}
    +
    +WDate::WDate()
    +  : valid_(false),
    +    year_(-1),
    +    month_(0),
    +    day_(0)
    +{ }
    +
    +WDate::WDate(int year, int month, int day)
    +{
    +  setDate(year, month, day);
    +}
    +
    +WDate WDate::addDays(int ndays) const
    +{
    +  if (valid_) {
    +    date d(year_, month_, day_);
    +    d += date_duration(ndays);
    +
    +    return WDate(d.year(), d.month(), d.day());
    +  } else
    +    return *this;
    +}
    +
    +WDate WDate::addMonths(int nmonths) const
    +{
    +  if (valid_) {
    +    int month = month_ + nmonths;
    +    div_t a = div(month - 1, 12);
    +    int year = year_ + a.quot;
    +    month = 1 + a.rem;
    +
    +    if (month <= 0) {
    +      month += 12;
    +      year -= 1;
    +    }
    +
    +    return WDate(year, month, day_);
    +  } else
    +    return *this;
    +}
    +
    +WDate WDate::addYears(int nyears) const
    +{
    +  if (valid_) {
    +    return WDate(year_ + nyears, month_, day_);
    +  } else
    +    return *this;
    +}
    +
    +void WDate::setDate(int year, int month, int day)
    +{
    +  year_ = year;
    +  month_ = month;
    +  day_ = day;
    +  valid_ = false;
    +
    +  try {
    +    date d(year, month, day);
    +    valid_ = true;
    +  } catch (std::out_of_range& e) {
    +    WApplication *app = wApp;
    +    if (app)
    +      app->log("warn") << "Invalid date: " << e.what();
    +  }
    +}
    +
    +int WDate::dayOfWeek() const
    +{
    +  if (!isValid())
    +    throw InvalidDateException();
    +
    +  date d(year_, month_, day_);
    +
    +  int dow = d.day_of_week().as_number();
    +
    +  return (dow == 0 ? 7 : dow);
    +}
    +
    +int WDate::daysTo(const WDate& other) const
    +{
    +  if (!isValid() || !other.isValid())
    +    throw InvalidDateException();
    +
    +  date dthis(year_, month_, day_);
    +  date dother(other.year_, other.month_, other.day_);
    +  date_duration dd = dother - dthis;
    +
    +  return dd.days();
    +}
    +
    +int WDate::toJulianDay() const
    +{
    +  if (!isValid())
    +    return -1;
    +  else {
    +    date dthis(year_, month_, day_);
    +    return dthis.julian_day();
    +  }
    +}
    +
    +bool WDate::isNull() const
    +{
    +  return year_ == -1;
    +}
    +
    +bool WDate::isLeapYear(int year)
    +{
    +  return isValid(year, 2, 29);
    +}
    +
    +bool WDate::isValid(int year, int month, int day)
    +{
    +  WDate d(year, month, day);
    +
    +  return d.isValid();
    +}
    +
    +bool WDate::operator> (const WDate& other) const
    +{
    +  return other < *this;
    +}
    +
    +bool WDate::operator< (const WDate& other) const
    +{
    +  if (!isValid() || !other.isValid())
    +    throw InvalidDateException();
    +
    +  if (year_ < other.year_)
    +    return true;
    +  else
    +    if (year_ == other.year_) {
    +      if (month_ < other.month_)
    +	return true;
    +      else
    +	if (month_ == other.month_)
    +	  return day_ < other.day_;
    +	else
    +	  return false;
    +    } else
    +      return false;
    +}
    +
    +bool WDate::operator!= (const WDate& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +bool WDate::operator== (const WDate& other) const
    +{
    +  if ((!isValid() && !isNull()) || (!other.isValid() && !other.isNull()))
    +    throw InvalidDateException();
    +
    +  return (year_ == other.year_ && month_ == other.month_ && day_ == other.day_);
    +}
    +
    +bool WDate::operator<= (const WDate& other) const
    +{
    +  return (*this == other) || (*this < other);
    +}
    +
    +bool WDate::operator>= (const WDate& other) const
    +{
    +  return other <= *this;
    +}
    +
    +WDate WDate::currentServerDate()
    +{
    +  date cd = day_clock::local_day();
    +
    +  return WDate(cd.year(), cd.month(), cd.day());
    +}
    +
    +WDate WDate::currentDate()
    +{
    +  return currentServerDate(); // FIXME
    +}
    +
    +WString WDate::shortDayName(int weekday)
    +{
    +  static const char *v[]
    +    = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
    +
    +  if (WApplication::instance())
    +    return WString::tr(WT_WDATE + v[weekday - 1]);
    +  else
    +    return WString::fromUTF8(v[weekday - 1]);
    +}
    +
    +int WDate::parseShortDayName(const std::string& v, unsigned& pos)
    +{
    +  if (pos + 2 >= v.length())
    +    return -1;
    +
    +  std::string d = v.substr(pos, 3);
    +  
    +  for (int i = 1; i <= 7; ++i) {
    +    if (d == shortDayName(i).toUTF8()) {
    +      pos += 3;
    +      return i;
    +    }
    +  }
    +
    +  return -1;
    +}
    +
    +WString WDate::longDayName(int weekday)
    +{
    +  static const char *v[]
    +    = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
    +       "Sunday" };
    +
    +  if (WApplication::instance())
    +    return WString::tr(WT_WDATE + v[weekday - 1]);
    +  else
    +    return WString::fromUTF8(v[weekday - 1]);
    +}
    +
    +int WDate::parseLongDayName(const std::string& v, unsigned& pos)
    +{
    +  std::string remainder = v.substr(pos);
    +
    +  for (int i = 1; i <= 7; ++i) {
    +    std::string m = longDayName(i).toUTF8();
    +
    +    if (remainder.length() >= m.length())
    +      if (remainder.substr(0, m.length()) == m) {
    +	pos += m.length();
    +	return i;
    +      }
    +  }
    +
    +  return -1;
    +}
    +
    +WString WDate::shortMonthName(int month)
    +{
    +  static const char *v[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
    +			    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
    +
    +  if (WApplication::instance())
    +    return WString::tr(WT_WDATE + v[month - 1]);
    +  else
    +    return WString::fromUTF8(v[month - 1]);
    +}
    +
    +int WDate::parseShortMonthName(const std::string& v, unsigned& pos)
    +{
    +  if (pos + 2 >= v.length())
    +    return -1;
    +
    +  std::string m = v.substr(pos, 3);
    +  
    +  for (int i = 1; i <= 12; ++i) {
    +    if (m == shortMonthName(i).toUTF8()) {
    +      pos += 3;
    +      return i;
    +    }
    +  }
    +
    +  return -1;
    +}
    +
    +WString WDate::longMonthName(int month)
    +{
    +  static const char *v[] = {"January", "February", "March", "April", "May",
    +			    "June", "July", "August", "September",
    +			    "October", "November", "December" };
    +
    +  if (WApplication::instance())
    +    return WString::tr(WT_WDATE + v[month - 1]);
    +  else
    +    return WString::fromUTF8(v[month - 1]);
    +}
    +
    +int WDate::parseLongMonthName(const std::string& v, unsigned& pos)
    +{
    +  std::string remainder = v.substr(pos);
    +
    +  for (int i = 1; i <= 12; ++i) {
    +    std::string m = longMonthName(i).toUTF8();
    +
    +    if (remainder.length() >= m.length())
    +      if (remainder.substr(0, m.length()) == m) {
    +	pos += m.length();
    +	return i;
    +      }
    +  }
    +
    +  return -1;
    +}
    +
    +WString WDate::defaultFormat()
    +{
    +  return WString::fromUTF8("ddd MMM d yyyy"); 
    +}
    +
    +WDate WDate::fromString(const WString& s)
    +{
    +  return fromString(s, defaultFormat());
    +}
    +
    +WDate::ParseState::ParseState()
    +{
    +  d = M = y = 0;
    +  day = month = year = -1;
    +}
    +
    +WDate WDate::fromString(const WString& s, const WString& format)
    +{
    +  WDate result;
    +
    +  WDateTime::fromString(&result, 0, s, format);
    +
    +  return result;
    +}
    +
    +WDateTime::CharState WDate::handleSpecial(char c, const std::string& v,
    +					  unsigned& vi, ParseState& parse,
    +					  const WString& format)
    +{
    +  switch (c) {
    +  case 'd':
    +    if (parse.d == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.d;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'M':
    +    if (parse.M == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.M;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'y':
    +    if (parse.y == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.y;
    +
    +    return WDateTime::CharHandled;
    +
    +  default:
    +    if (!parseLast(v, vi, parse, format))
    +      return WDateTime::CharInvalid;
    +
    +    return WDateTime::CharUnhandled;
    +  }
    +}
    +
    +WDate WDate::fromJulianDay(int jd)
    +{
    +  int julian = jd;
    +  int day, month, year;
    +
    +  if (julian < 0) {
    +    julian = 0;
    +  }
    +
    +  int a = julian;
    +
    +  if (julian >= 2299161) {
    +    int jadj = (int)(((float)(julian - 1867216) - 0.25) / 36524.25);
    +    a += 1 + jadj - (int)(0.25 * jadj);
    +  }
    +
    +  int b = a + 1524;
    +  int c = (int)(6680.0 + ((float)(b - 2439870) - 122.1) / 365.25);
    +  int d = (int)(365 * c + (0.25 * c));
    +  int e = (int)((b - d) / 30.6001);
    +
    +  day = b - d - (int)(30.6001 * e);
    +  month = e - 1;
    +
    +  if (month > 12) {
    +    month -= 12;
    +  }
    +
    +  year = c - 4715;
    +
    +  if (month > 2) {
    +    --year;
    +  }
    +
    +  if (year <= 0) {
    +    --year;
    +  }
    +
    +  return WDate(year, month, day);
    +}
    +
    +static void fatalFormatError(const WString& format, int c, const char* cs)
    +{
    +  std::stringstream s;
    +  s << "WDate format syntax error (for \"" << format.toUTF8()
    +    << "\"): Cannot handle " << c << " consecutive " << cs;
    +
    +  throw WtException(s.str());
    +}
    +
    +bool WDate::parseLast(const std::string& v, unsigned& vi,
    +		      ParseState& parse,
    +		      const WString& format)
    +{
    +  if (parse.d != 0) {
    +    switch (parse.d) {
    +    case 1: {
    +      std::string dstr;
    +
    +      if (vi >= v.length())
    +	return false;
    +      dstr += v[vi++];
    +
    +      if (vi < v.length())
    +	if ('0' <= v[vi] && v[vi] <= '9')
    +	  dstr += v[vi++];
    +
    +      try {
    +	parse.day = boost::lexical_cast<int>(dstr);
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }
    +      
    +      break;
    +    }
    +    case 2: {
    +      if (vi + 1 >= v.length())
    +	return false;
    +
    +      std::string dstr = v.substr(vi, 2);
    +      vi += 2;
    +
    +      try {
    +	parse.day = boost::lexical_cast<int>(dstr);
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }      
    +
    +      break;
    +    }
    +    case 3:
    +      if (parseShortDayName(v, vi) == -1)
    +	return false;
    +      break;
    +    case 4:
    +      if (parseLongDayName(v, vi) == -1)
    +	return false;
    +      break;
    +    default:
    +      fatalFormatError(format, parse.d, "d's");
    +    }
    +
    +    parse.d = 0;
    +  }
    +
    +  if (parse.M != 0) {
    +    switch (parse.M) {
    +    case 1: {
    +      std::string Mstr;
    +
    +      if (vi >= v.length())
    +	return false;
    +      Mstr += v[vi++];
    +
    +      if (vi < v.length())
    +	if ('0' <= v[vi] && v[vi] <= '9')
    +	  Mstr += v[vi++];
    +
    +      try {
    +	parse.month = boost::lexical_cast<int>(Mstr);
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }
    +      
    +      break;
    +    }
    +    case 2: {
    +      if (vi + 1 >= v.length())
    +	return false;
    +
    +      std::string Mstr = v.substr(vi, 2);
    +      vi += 2;
    +
    +      try {
    +	parse.month = boost::lexical_cast<int>(Mstr);
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }      
    +
    +      break;
    +    }
    +    case 3:
    +      parse.month = parseShortMonthName(v, vi);
    +      if (parse.month == -1)
    +	return false;
    +      break;
    +    case 4:
    +      parse.month = parseLongMonthName(v, vi);
    +      if (parse.month == -1)
    +	return false;
    +      break;
    +    default:
    +      fatalFormatError(format, parse.M, "M's");
    +    }
    +
    +    parse.M = 0;
    +  }
    +
    +  if (parse.y != 0) {
    +    switch (parse.y) {
    +    case 2: {
    +      if (vi + 1 >= v.length())
    +	return false;
    +
    +      std::string ystr = v.substr(vi, 2);
    +      vi += 2;
    +
    +      try {
    +	parse.year = boost::lexical_cast<int>(ystr);
    +	if (parse.year < 38)
    +	  parse.year += 2000;
    +	else
    +	  parse.year += 1900;
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }      
    +
    +      break;
    +    }
    +    case 4: {
    +      if (vi + 3 >= v.length())
    +	return false;
    +
    +      std::string ystr = v.substr(vi, 4);
    +      vi += 4;
    +
    +      try {
    +	parse.year = boost::lexical_cast<int>(ystr);
    +      } catch (boost::bad_lexical_cast&) {
    +	return false;
    +      }      
    +
    +      break;
    +    }
    +    default:
    +      fatalFormatError(format, parse.y, "y's");
    +    }
    +
    +    parse.y = 0;
    +  }
    +
    +  return true;
    +}
    +
    +WString WDate::toString() const
    +{
    +  return WDate::toString(defaultFormat());
    +}
    +
    +WString WDate::toString(const WString& format) const
    +{
    +  return WDateTime::toString(this, 0, format);
    +}
    +
    +bool WDate::writeSpecial(const std::string& f, unsigned&i,
    +			 std::stringstream& result) const
    +{
    +  char buf[30];
    +
    +  switch (f[i]) {
    +  case 'd':
    +    if (f[i + 1] == 'd') {
    +      if (f[i + 2] == 'd') {
    +	if (f[i + 3] == 'd') {
    +	  // 4 d's
    +	  i += 3;
    +	  result << longDayName(dayOfWeek()).toUTF8();
    +	} else {
    +	  // 3 d's
    +	  i += 2;
    +	  result << shortDayName(dayOfWeek()).toUTF8();
    +	}
    +      } else {
    +	// 2 d's
    +	i += 1;
    +	result << Utils::pad_itoa(day_, 2, buf);
    +      }
    +    } else {
    +      // 1 d
    +      result << Utils::itoa(day_, buf);
    +    }
    +
    +    return true;
    +  case 'M':
    +    if (f[i + 1] == 'M') {
    +      if (f[i + 2] == 'M') {
    +	if (f[i + 3] == 'M') {
    +	  // 4 M's
    +	  i += 3;
    +	  result << longMonthName(month_).toUTF8();
    +	} else {
    +	  // 3 M's
    +	  i += 2;
    +	  result << shortMonthName(month_).toUTF8();
    +	}
    +      } else {
    +	// 2 M's
    +	i += 1;
    +	result << Utils::pad_itoa(month_, 2, buf);
    +      }
    +    } else {
    +      // 1 M
    +      result << Utils::itoa(month_, buf);
    +    }
    +
    +    return true;
    +  case 'y':
    +    if (f[i + 1] == 'y') {
    +      if (f[i + 2] == 'y' && f[i + 3] == 'y') {
    +	// 4 y's
    +	i += 3;
    +	result << Utils::itoa(year_, buf);
    +
    +	return true;
    +      } else {
    +	// 2 y's
    +	i += 1;
    +	result << Utils::pad_itoa(year_ % 100, 2, buf);
    +
    +	return true;
    +      }
    +    }
    +  default:
    +    return false;
    +  }
    +}
    +
    +namespace {
    +
    +  std::string extLiteral(char c) {
    +    char extSpecial[] = { ',', 'D', 'j', 'l', 'S', 'w', 'z', 'W', 'F', 'm', 'M',
    +			  'n', 't', 'L', 'Y', 'y', 'a', 'A', 'g', 'G', 'h', 'H',
    +			  'i', 's', 'O', 'T', 'Z', 0 };
    +
    +    for (int i = 0; extSpecial[i]; ++i) {
    +      if (c == extSpecial[i])
    +	return "\\" + c;
    +    }
    +
    +    return std::string() + c;
    +  }
    +
    +  void writeExtLast(std::string& result, int& d, int& M, int& y,
    +		    const WString& format) {
    +    if (d != 0) {
    +      switch (d) {
    +      case 1:
    +	result += 'j'; break;
    +      case 2:
    +	result += 'd'; break;
    +      case 3:
    +	result += 'D'; break;
    +      case 4:
    +	result += 'l'; break;
    +      default:
    +	fatalFormatError(format, d, "d's");
    +      }
    +
    +      d = 0;
    +    }
    +
    +    if (M != 0) {
    +      switch (M) {
    +      case 1:
    +	result += 'n'; break;
    +      case 2:
    +	result += 'm'; break;
    +      case 3:
    +	result += 'M'; break;
    +      case 4:
    +	result += 'F'; break;
    +      default:
    +	fatalFormatError(format, M, "M's");
    +      }
    +
    +      M = 0;
    +    }
    +
    +    if (y != 0) {
    +      switch (y) {
    +      case 2:
    +	result += 'y'; break;
    +      case 4:
    +	result += 'Y'; break;
    +      default:
    +	fatalFormatError(format, y, "y's");
    +      }
    +
    +      y = 0;
    +    }
    +  }
    +}
    +
    +std::string WDate::extFormat(const WString& format)
    +{
    +  std::string result;
    +  std::string f = format.toUTF8();
    +
    +  bool inQuote = false;
    +  bool gotQuoteInQuote = false;
    +
    +  int d = 0, M = 0, y = 0; 
    +
    +  for (unsigned i = 0; i < f.length(); ++i) {
    +    if (inQuote) {
    +      if (f[i] != '\'') {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  inQuote = false;
    +	} else
    +	  result += extLiteral(f[i]);
    +      } else {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  result += extLiteral(f[i]);
    +	} else
    +	  gotQuoteInQuote = true;
    +      }
    +    }
    +
    +    if (!inQuote) {
    +      switch (f[i]) {
    +      case 'd':
    +	if (d == 0)
    +	  writeExtLast(result, d, M, y, format);
    +	++d;
    +	break;
    +      case 'M':
    +	if (M == 0)
    +	  writeExtLast(result, d, M, y, format);
    +	++M;
    +	break;
    +      case 'y':
    +	if (y == 0)
    +	  writeExtLast(result, d, M, y, format);
    +	++y;
    +	break;
    +      default:
    +	writeExtLast(result, d, M, y, format);
    +	if (f[i] == '\'') {
    +	  inQuote = true;
    +	  gotQuoteInQuote = false;
    +	} else
    +	  result += extLiteral(f[i]);
    +      }
    +    }
    +  }
    +
    +  writeExtLast(result, d, M, y, format);
    +
    +  return result;
    +}
    +
    +namespace {
    +
    +  void fatalFormatRegExpError(const WString& format, int c, const char* cs)
    +  {
    +    std::stringstream s;
    +    s << "WDate to regexp: (for \"" << format.toUTF8()
    +      << "\"): cannot handle " << c << " consecutive " << cs;
    +    throw WtException(s.str());
    +  }
    +
    +  void writeRegExpLast(WDate::RegExpInfo& result, int& d, int& M, int& y,
    +		       const WString& format, int& currentGroup) {
    +    if (d != 0) {
    +      switch (d) {
    +      case 1:
    +      case 2:
    +	if (d == 1)
    +	  result.regexp += "(\\d{1,2})";
    +	else
    +	  result.regexp += "(\\d{2})";
    +
    +	result.dayGetJS = "parseInt(results["
    +	  + boost::lexical_cast<std::string>(currentGroup++) + "], 10)";
    +	break;
    +      default:
    +	fatalFormatRegExpError(format, d, "d's");
    +      }
    +
    +      d = 0;
    +    }
    +
    +    if (M != 0) {
    +      switch (M) {
    +      case 1:
    +      case 2:
    +	if (M == 1)
    +	  result.regexp += "(\\d{1,2})";
    +	else
    +	  result.regexp += "(\\d{2})";
    +
    +	result.monthGetJS = "parseInt(results["
    +	  + boost::lexical_cast<std::string>(currentGroup++) + "], 10)";
    +	break;
    +      default:
    +	fatalFormatRegExpError(format, M, "M's");
    +      }
    +
    +      M = 0;
    +    }
    +
    +    if (y != 0) {
    +      switch (y) {
    +      case 2:
    +	result.regexp += "(\\d{2})";
    +	result.yearGetJS = "function() { var y=parseInt(results["
    +	  + boost::lexical_cast<std::string>(currentGroup++) + "], 10);"
    +	  "return y>38?1900+y:2000+y;}()";
    +	break;
    +      case 4:
    +	result.regexp += "(\\d{4})";
    +	result.yearGetJS = "parseInt(results["
    +	  + boost::lexical_cast<std::string>(currentGroup++) + "], 10)";
    +	break;
    +      default:
    +	fatalFormatRegExpError(format, y, "y's");
    +      }
    +
    +      y = 0;
    +    }
    +  }
    +}
    +
    +WDate::RegExpInfo WDate::formatToRegExp(const WT_USTRING& format)
    +{
    +  RegExpInfo result;
    +  std::string f = format.toUTF8();
    +  int currentGroup = 1;
    +
    +  result.dayGetJS = "1";
    +  result.monthGetJS = "1";
    +  result.yearGetJS = "2000";
    +
    +  bool inQuote = false;
    +  bool gotQuoteInQuote = false;
    +
    +  static const std::string regexSpecial = "/[\\^$.|?*+()";
    +
    +  int d = 0, M = 0, y = 0; 
    +
    +  for (unsigned i = 0; i < f.length(); ++i) {
    +    if (inQuote) {
    +      if (f[i] != '\'') {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  inQuote = false;
    +	} else
    +	  result.regexp += f[i];
    +      } else {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  result.regexp += f[i];
    +	} else
    +	  gotQuoteInQuote = true;
    +      }
    +    }
    +
    +    if (!inQuote) {
    +      switch (f[i]) {
    +      case 'd':
    +	if (d == 0)
    +	  writeRegExpLast(result, d, M, y, format, currentGroup);
    +	++d;
    +	break;
    +      case 'M':
    +	if (M == 0)
    +	  writeRegExpLast(result, d, M, y, format, currentGroup);
    +	++M;
    +	break;
    +      case 'y':
    +	if (y == 0)
    +	  writeRegExpLast(result, d, M, y, format, currentGroup);
    +	++y;
    +	break;
    +      default:
    +	writeRegExpLast(result, d, M, y, format, currentGroup);
    +	if (f[i] == '\'') {
    +	  inQuote = true;
    +	  gotQuoteInQuote = false;
    +	} else if (regexSpecial.find(f[i]) != std::string::npos) {
    +	  result.regexp += "\\";
    +	  result.regexp += f[i];
    +	} else
    +	  result.regexp += f[i];
    +      }
    +    }
    +  }
    +
    +  writeRegExpLast(result, d, M, y, format, currentGroup);
    +
    +  return result;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDatePicker b/wt-3.1.7a/src/Wt/WDatePicker
    new file mode 100644
    index 0000000..26c2f6f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDatePicker
    @@ -0,0 +1,229 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDATEPICKER_H_
    +#define WDATEPICKER_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WDate>
    +#include <Wt/WJavaScriptSlot>
    +#include <set>
    +
    +namespace Wt {
    +
    +class WCalendar;
    +class WInteractWidget;
    +class WLineEdit;
    +class WTemplate;
    +
    +/*! \class WDatePicker Wt/WDatePicker Wt/WDatePicker
    + *  \brief A date picker.
    + *
    + * A date picker shows a line edit and an icon which when clicked
    + * popups a WCalendar for editing the date. Any date entered in the
    + * line edit is reflected in the calendar, and vice-versa.
    + *
    + * Each of these widgets may be accessed individually (lineEdit(),
    + * calendar(), and displayWidget()) and there is a constructor that
    + * allows you to specify an existing line edit and display widget.
    + * 
    + * The date format used by default is <tt>"dd/MM/yyyy"</tt> and can be
    + * changed using setFormat(). At any time, the date set may be read
    + * using date(), or can be changed using setDate().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WDatePicker *picker = new Wt::WDatePicker(this);
    + * picker->setFormat("dd-MM-yyyy");
    + * picker->setDate(Wt::WDate(1976, 6, 14));
    + * \endcode
    + * \endif
    + *
    + * <h3>i18n</h3>
    + *
    + * Internationalization of WDatePicker is mostly handled through
    + * the internationalization mechanism of WDate. The 'Close' button
    + * can be internationalized by overriding the default value for
    + * the localization key Wt.DatePicker.Close.
    + *
    + * <h3>CSS</h3>
    + *
    + * The date picker is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-datepicker</tt> and <tt>Wt-outset</tt>
    + * CSS class; the calendar itself can be styled as documented in
    + * WCalendar.
    + *
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WDatePicker-default-1.png "Example of a WDatePicker (default theme) 
    + * </TD> <TD> 
    + * \image html WDatePicker-polished-1.png "Example of a WDatePicker (polished theme) 
    + * </TD> </TR> </TABLE>
    + */
    +class WT_API WDatePicker : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Create a new date picker.
    +   *
    +   * This constructor creates a line edit with an icon that leads to a
    +   * popup calendar. A WDateValidator is configured for the line edit.
    +   */
    +  WDatePicker(WContainerWidget *parent = 0);
    +
    +  /*! \brief Create a new date picker for existing line edit and with custom
    +   *         display widget.
    +   *
    +   * The \p displayWidget is a button or image which much be
    +   * clicked to open the date picker. This widget will become owned by
    +   * the picker.
    +   *
    +   * The \p forEdit argument is the lineEdit that works in
    +   * conjunction with the date picker. This widget does not become
    +   * part of the date picker, and may be located anywhere else.
    +   */
    +  WDatePicker(WInteractWidget *displayWidget,
    +	      WLineEdit *forEdit,
    +	      WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WDatePicker();
    +
    +  /*! \brief Sets the format used for parsing or writing the date in
    +   *         the line edit.
    +   *
    +   * Sets the format used for representing the date in the line edit.
    +   * If the line edit has a WDateValidator configured for it, then also
    +   * there the format is updated.
    +   *
    +   * The default format is <tt>'dd/MM/yyyy'</tt>.
    +   *
    +   * \sa format(), WDate::toString()
    +   */
    +  void setFormat(const WT_USTRING& format);
    +
    +  /*! \brief Returns the format.
    +   *
    +   * \sa setFormat()
    +   */
    +  const WT_USTRING& format() const { return format_; }
    +
    +  /*! \brief The calendar widget.
    +   *
    +   * Returns the calendar widget.
    +   */
    +  WCalendar *calendar() const { return calendar_; }
    +
    +  /*! \brief The line edit.
    +   *
    +   * Returns the line edit which works in conjunction with this date
    +   * picker.
    +   */
    +  WLineEdit *lineEdit() const { return forEdit_; }
    +
    +  /*! \brief The display widget.
    +   *
    +   * Returns the widget which is displayed to activate the calendar.
    +   */
    +  WInteractWidget *displayWidget() const { return displayWidget_; }
    +
    +  /*! \brief The current date.
    +   *
    +   * Reads the current date from the lineEdit().
    +   *
    +   * \if cpp
    +   * Returns an invalid date (for which WDate::isValid() returns
    +   * \c false) if the date could not be parsed using the current
    +   * format(). <br>
    +   * \elseif java
    +   * Returns \c null if the date could not be parsed using the current
    +   * format(). <br>
    +   * \endif
    +   *
    +   * \sa setDate(), WDate::fromString(), WLineEdit::text()
    +   */
    +  WDate date() const;
    +
    +  /*! \brief Sets the current date.
    +   *
    +   * Does nothing if the current date is \p Null.
    +   *
    +   * \sa date()
    +   */
    +  void setDate(const WDate& date);
    +
    +  /*! \brief Sets whether the widget is enabled.
    +   *
    +   * This is the oppositie of setDisabled().
    +   */
    +  void setEnabled(bool enabled);
    +
    +  virtual void setDisabled(bool disabled);
    +
    +  /*! \brief Hide/unhide the widget.
    +   */
    +  void setHidden(bool hidden);
    +
    +  /*! \brief Sets the bottom of the valid date range.
    +   */
    +  void setBottom(const WDate& bottom);
    +
    +  /*! \brief Returns the bottom date of the valid range.
    +   */
    +  WDate bottom() const;
    +  
    +  /*! \brief Sets the top of the valid date range.
    +   */
    +  void setTop(const WDate& top);
    +
    +  /*! \brief Returns the top date of the valid range.
    +   */
    +  WDate top() const;
    +
    +  /*! \brief %Signal emitted when the value has changed.
    +   *
    +   * This signal is emitted when a new date has been entered (either
    +   * through the line edit, or through the calendar popup).
    +   */
    +  Signal<>& changed();
    +
    +  /*! \brief Controls how the calendar popup is positioned.
    +   *
    +   * When \p global is \c true, then the popup will position itself
    +   * globally. This avoids that the popup is affected by enclosing
    +   * parents with overflow settings that clip the popup. This makes
    +   * the popup however no longer follow the popup button when this
    +   * button moves.
    +   *
    +   * The default is \c false.
    +   */
    +  void setGlobalPopup(bool global);
    +
    +  /*! \brief Shows or hides the popup.
    +   */
    +  void setPopupVisible(bool visible);
    +
    +private:
    +  WT_USTRING        format_;
    +  WInteractWidget  *displayWidget_;
    +  WLineEdit        *forEdit_;
    +
    +  WContainerWidget *layout_;
    +  WTemplate        *popup_;
    +  WCalendar        *calendar_;
    +
    +  JSlot positionJS_;
    +
    +  void createDefault();
    +  void create(WInteractWidget *displayWidget, WLineEdit *forEdit);
    +
    +  void setFromCalendar();
    +  void setFromLineEdit();
    +};
    +
    +}
    +
    +#endif // WDATEPICKER_H_
    diff --git a/wt-3.1.7a/src/Wt/WDatePicker.C b/wt-3.1.7a/src/Wt/WDatePicker.C
    new file mode 100644
    index 0000000..5106528
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDatePicker.C
    @@ -0,0 +1,229 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WDatePicker"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCalendar"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WDateValidator"
    +#include "Wt/WImage"
    +#include "Wt/WInteractWidget"
    +#include "Wt/WTemplate"
    +#include "Wt/WLineEdit"
    +#include "Wt/WPushButton"
    +
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WDatePicker::WDatePicker(WContainerWidget *parent)
    +  : WCompositeWidget(parent)
    +{
    +  createDefault();
    +}
    +
    +WDatePicker::WDatePicker(WInteractWidget *displayWidget,
    +			 WLineEdit *forEdit, WContainerWidget *parent)
    +  : WCompositeWidget(parent)
    +{
    +  create(displayWidget, forEdit);
    +}
    +
    +WDatePicker::~WDatePicker()
    +{
    +  WApplication::instance()->doJavaScript
    +    (WT_CLASS ".remove('" + popup_->id() + "');");
    +}
    +
    +void WDatePicker::createDefault()
    +{
    +  WImage *icon = new WImage(WApplication::resourcesUrl() + "calendar_edit.png");
    +  icon->setVerticalAlignment(AlignMiddle);
    +  WLineEdit *lineEdit = new WLineEdit();
    +
    +  create(icon, lineEdit);
    +
    +  layout_->insertWidget(0, lineEdit);
    +
    +  lineEdit->setValidator(new WDateValidator(format_, this));
    +}
    +
    +void WDatePicker::create(WInteractWidget *displayWidget,
    +			 WLineEdit *forEdit)
    +{
    +  setImplementation(layout_ = new WContainerWidget());
    +
    +  displayWidget_ = displayWidget;
    +  forEdit_ = forEdit;
    +  forEdit_->setVerticalAlignment(AlignMiddle);
    +  forEdit_->changed().connect(this, &WDatePicker::setFromLineEdit);
    +  format_ = "dd/MM/yyyy";
    +
    +  layout_->setInline(true);
    +  layout_->addWidget(displayWidget);
    +
    +  const char *TEMPLATE =
    +    "${shadow-x1-x2}"
    +    "${calendar}"
    +    "<div style=\"text-align:center; margin-top:3px\">${close}</div>";
    +
    +  layout_->addWidget(popup_ = new WTemplate(WString::fromUTF8(TEMPLATE)));
    +
    +  calendar_ = new WCalendar();
    +  calendar_->activated().connect(popup_, &WWidget::hide);
    +  calendar_->selectionChanged().connect(this, &WDatePicker::setFromCalendar);
    +
    +  WPushButton *closeButton = new WPushButton(tr("Wt.WDatePicker.Close"));
    +  closeButton->clicked().connect(popup_, &WWidget::hide);
    +
    +  popup_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2);
    +  popup_->bindWidget("calendar", calendar_);
    +  popup_->bindWidget("close", closeButton);
    +
    +  popup_->hide();
    +  popup_->setPopup(true);
    +  popup_->setPositionScheme(Absolute);
    +  popup_->setStyleClass("Wt-outset Wt-datepicker");
    +
    +  // This confuses the close button hide ? XXX
    +  //WApplication::instance()->globalEscapePressed()
    +  //  .connect(popup_, &WWidget::hide);
    +  popup_->escapePressed().connect(popup_, &WWidget::hide);
    +  displayWidget->clicked().connect(popup_, &WWidget::show);
    +  displayWidget->clicked().connect(positionJS_);
    +  displayWidget->clicked().connect(this, &WDatePicker::setFromLineEdit);
    +
    +  setGlobalPopup(false);
    +}
    +
    +void WDatePicker::setPopupVisible(bool visible)
    +{
    +  popup_->setHidden(!visible);
    +}
    +
    +void WDatePicker::setGlobalPopup(bool global)
    +{
    +  positionJS_.setJavaScript("function() { " WT_CLASS ".positionAtWidget('"
    +			    + popup_->id()  + "','" + displayWidget_->id()
    +			    + "', " WT_CLASS ".Horizontal, "
    +			    + (global ? "true" : "false") + ");}");
    +}
    +
    +void WDatePicker::setFormat(const WT_USTRING& format)
    +{
    +  format_ = format;
    +
    +  WDateValidator *dv = dynamic_cast<WDateValidator *>(forEdit_->validator());
    +  if (dv)
    +    dv->setFormat(format);
    +}
    +
    +void WDatePicker::setFromCalendar()
    +{
    +  if (!calendar_->selection().empty()) {
    +    const WDate& calDate = *calendar_->selection().begin();
    +
    +    forEdit_->setText(calDate.toString(format_));
    +    forEdit_->changed().emit();
    +  }
    +}
    +
    +WDate WDatePicker::date() const
    +{
    +  return WDate::fromString(forEdit_->text(), format_);
    +}
    +
    +void WDatePicker::setDate(const WDate& date)
    +{
    +  if (!date.isNull()) {
    +    forEdit_->setText(date.toString(format_));
    +    calendar_->select(date);
    +    calendar_->browseTo(date);
    +  }
    +}
    +
    +void WDatePicker::setFromLineEdit()
    +{
    +  WDate d = WDate::fromString(forEdit_->text(), format_);
    +
    +  if (d.isValid()) {
    +    if (calendar_->selection().empty()) {
    +      calendar_->select(d);
    +      calendar_->selectionChanged().emit();
    +    } else {
    +      WDate j = Utils::first(calendar_->selection());
    +      if (j != d) {
    +	calendar_->select(d);
    +	calendar_->selectionChanged().emit();
    +      }
    +    }
    +
    +    calendar_->browseTo(d);
    +  }
    +}
    +
    +Signal<>& WDatePicker::changed()
    +{
    +  return calendar_->selectionChanged();
    +}
    +
    +void WDatePicker::setEnabled(bool enabled)
    +{
    +  setDisabled(!enabled);
    +}
    +
    +void WDatePicker::setDisabled(bool disabled)
    +{
    +  forEdit_->setDisabled(disabled);
    +  displayWidget_->setHidden(disabled);
    +}
    +
    +void WDatePicker::setHidden(bool hidden)
    +{
    +  WCompositeWidget::setHidden(hidden);
    +  forEdit_->setHidden(hidden);
    +  displayWidget_->setHidden(hidden);
    +}
    +
    +void WDatePicker::setBottom(const WDate& bottom)
    +{
    +  WDateValidator *dv = dynamic_cast<WDateValidator *>(forEdit_->validator());
    +  if (dv) {
    +    dv->setBottom(bottom);
    +    calendar_->setBottom(bottom);
    +  }
    +}
    +
    +WDate WDatePicker::bottom() const
    +{
    +  WDateValidator *dv = dynamic_cast<WDateValidator *>(forEdit_->validator());
    +  if (dv)
    +    return dv->bottom();
    +  else 
    +    return WDate();
    +}
    +  
    +void WDatePicker::setTop(const WDate& top) 
    +{
    +  WDateValidator *dv = dynamic_cast<WDateValidator *>(forEdit_->validator());
    +  if (dv) {
    +    dv->setTop(top);
    +    calendar_->setTop(top);
    +  }
    +}
    +
    +WDate WDatePicker::top() const
    +{
    +  WDateValidator *dv = dynamic_cast<WDateValidator *>(forEdit_->validator());
    +  if (dv)
    +    return dv->top();
    +  else 
    +    return WDate();
    +}
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDateTime b/wt-3.1.7a/src/Wt/WDateTime
    new file mode 100644
    index 0000000..6ffec7b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDateTime
    @@ -0,0 +1,331 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDATE_TIME_H_
    +#define WDATE_TIME_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WString>
    +#include <exception>
    +
    +#include <boost/date_time/posix_time/posix_time.hpp>
    +
    +namespace Wt {
    +
    +/*! \class InvalidDateTimeException Wt/WDateTime Wt/WDateTime
    + *  \brief Exception thrown when calculating with an invalid date.
    + *
    + * \sa WDateTime
    + */
    +class WT_API InvalidDateTimeException : public std::exception
    +{
    +public:
    +  InvalidDateTimeException();
    +  ~InvalidDateTimeException() throw();
    +
    +  /*! \brief Returns a message describing the error.
    +   */
    +  const char *what() const throw();
    +};
    +
    +class WDate;
    +class WTime;
    +
    +/*! \class WDateTime Wt/WDateTime Wt/WDateTime
    + *  \brief A calendar date and clock time.
    + *
    + * The date time class combines the functionality of a WDate (for a
    + * calendar date) and WTime (for clock time) into a single class.
    + *
    + * Conventionally date time is assumed in UTC, which affects the behaviour
    + * of the following methods:
    + * - toTime_t(), setTime_t()
    + * - currentDateTime()
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings returned by toString() and timeTo() can be localized.
    + * If the thread using a WDateTime is bound to a WApplication (i.e.
    + * WApplication::instance() does not return 0), the strings
    + * can be localized by overriding the default values for
    + * the localized string keys in the resource bundles of the WApplication.
    + * If the thread using a WDateTime is not bound to a WApplication (i.e.
    + * WApplication::instance() returns 0), english strings will be used.
    + *
    + * For toString(), localization is handled through the i18n functionality
    + * of the WDate class. An invalid WDateTime is converted to a string
    + * as "Null":
    + * - Wt.WDateTime.null: Null
    + *
    + * The timeTo() method contains the following localized strings:
    + * - Wt.WDateTime.second: one second
    + * - Wt.WDateTime.seconds: {1} seconds
    + * The placeholder {1} will be replaced by the actual number of seconds. The
    + * same keys also exist for minutes, hours, days, weeks, monts and years.
    + *
    + */
    +class WT_API WDateTime
    +{
    +public:
    +  /*! \brief Creates a <i>Null</i> datetime.
    +   *
    +   * A time for which isNull() returns \c true. A <i>Null</i> datetime
    +   * is also invalid.
    +   *
    +   * \sa isValid(), isNull()
    +   */
    +  WDateTime();
    +
    +  /*! \brief Creates a datetime given a date.
    +   *
    +   * The time is set to midnight (00:00). The datetime is valid if the
    +   * \p date is valid.
    +   */
    +  explicit WDateTime(const WDate& date);
    +
    +  /*! \brief Creates a datetime given a date and time.
    +   *
    +   * The datetime is valid if both \p date and \p time are valid.
    +   */
    +  WDateTime(const WDate& date, const WTime& time);
    +
    +  /*! \brief Sets the time in seconds from the Epoch.
    +   *
    +   * The \p time is the number of seconds since the Epoch (00:00:00
    +   * UTC, January 1, 1970).
    +   *
    +   * \sa toTime_t()
    +   */
    +  void setTime_t(std::time_t time);
    +
    +  /*! \brief Sets the date time.
    +   */
    +  void setPosixTime(const boost::posix_time::ptime& time);
    +
    +  /*! \brief Adds milliseconds.
    +   *
    +   * Returns a datetime that is \p ms milliseconds later than this
    +   * datetime. Negative values for \p ms will result in a datetime that
    +   * is as many milliseconds earlier.
    +   */
    +  WDateTime addMSecs(int ms) const;
    +
    +  /*! \brief Adds seconds.
    +   *
    +   * Returns a datetime that is \p s seconds later than this
    +   * datetime. Negative values for \p s will result in a datetime that
    +   * is as many seconds earlier.
    +   */
    +  WDateTime addSecs(int s) const;
    +
    +  /*! \brief Adds days.
    +   *
    +   * Returns a datetime that is \p ndays later than this
    +   * datetime. Negative values for \p ndays will result in a datetime
    +   * that is as many days earlier.
    +   *
    +   * \sa addMonths(), addYears()
    +   */
    +  WDateTime addDays(int ndays) const;
    +
    +  /*! \brief Adds months.
    +   *
    +   * Returns a datetime that is the same day of the month, but \p
    +   * nmonths later than this date. Negative values for \p nmonths will
    +   * result in a datetime that is as many months earlier.
    +   *
    +   * \sa addDays(), addYears()
    +   */
    +  WDateTime addMonths(int nmonths) const;
    +
    +  /*! \brief Adds years.
    +   *
    +   * Returns a datetime that is \p nyears later than this
    +   * datetime. Negative values for \p nyears will result in a datetime
    +   * that is as many years earlier.
    +   *
    +   * \sa addDays(), addMonths()
    +   */
    +  WDateTime addYears(int nyears) const;
    +
    +  /*! \brief Returns if this datetime is <i>Null</i>.
    +   *
    +   * A null time is also invalid.
    +   *
    +   * \sa isValid(), WDateTime()
    +   */
    +  bool isNull() const;
    +
    +  /*! \brief Returns if this datetime is valid.
    +   *
    +   * A date time is only valid if its date and time parts are valid.
    +   */
    +  bool isValid() const;
    +
    +  /*! \brief Sets the date part.
    +   *
    +   * Changes the date part part, leaving the time unmodified. If no time
    +   * was set, it is set to 00:00.
    +   *
    +   * \sa setTime()
    +   */
    +  void setDate(const WDate& date);
    +
    +  /*! \brief Returns the date part.
    +   *
    +   * Returns the date part.
    +   *
    +   * \sa time()
    +   */
    +  WDate date() const;
    +
    +  /*! \brief Sets the time part.
    +   *
    +   * If no valid date is set, the time is not set either.
    +   *
    +   * \sa setDate()
    +   */
    +  void setTime(const WTime& time);
    +
    +  /*! \brief Returns the time part.
    +   *
    +   * \sa setTime()
    +   */
    +  WTime time() const;
    +
    +  /*! \brief Returns the number of seconds since the Epoch.
    +   *
    +   * This returns the number of seconds since the Epoch (00:00:00 UTC,
    +   * January 1, 1970) represented by this datetime.
    +   */
    +  std::time_t toTime_t() const;
    +
    +  /*! \brief Returns the boost time.
    +   *
    +   * \sa fromPosixTime()
    +   */
    +  boost::posix_time::ptime toPosixTime() const;
    +
    +  /*! \brief Returns the difference between to datetime values (in seconds).
    +   *
    +   * \sa daysTo()
    +   */
    +  int secsTo(const WDateTime& other) const;
    +
    +  /*! \brief Returns the difference between two datetime values (in days).
    +   *
    +   * \sa secsTo()
    +   */
    +  int daysTo(const WDateTime& other) const;
    +
    +  /*! \brief Returns the difference between two datetime values (as text).
    +   *
    +   * This returns a textual representation of the approximate
    +   * difference between this time and \p other. The textual
    +   * representation returns the difference as a number of seconds,
    +   * minutes, hours, days, weeks, months, or years, using the coarsest
    +   * unit that is more than \p minValue.
    +   *
    +   * \sa daysTo(), secsTo()
    +   */
    +  WString timeTo(const WDateTime& other, int minValue = 1) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator< (const WDateTime& other) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator<= (const WDateTime& other) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator> (const WDateTime& other) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator>= (const WDateTime& other) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator== (const WDateTime& other) const;
    +
    +  /*! \brief Compares two datetime values.
    +   */
    +  bool operator!= (const WDateTime& other) const;
    +
    +  static WT_USTRING defaultFormat();
    +
    +  /*! \brief Formats this datetime to a string using a default format.
    +   *
    +   * The default format is "ddd MMM d hh:mm:ss yyyy".
    +   */
    +  WT_USTRING toString() const;
    +
    +  /*! \brief Formats this time to a string using a specified format.
    +   *
    +   * The \p format is a string which mixes the format for WDate and
    +   * WTime.
    +   *
    +   * \sa WDate::toString(), WTime::toString()
    +   */
    +  WT_USTRING toString(const WT_USTRING& format) const;
    +
    +  /*! \brief Parses a string to a time using a default format.
    +   *
    +   * The default format is "ddd MMM d hh:mm:ss yyyy".
    +   *
    +   * \sa WDate::fromString(), WTime::fromString().
    +   */
    +  static WDateTime fromString(const WT_USTRING& s);
    +
    +  /*! \brief Parses a string to a time using a specified format.
    +   *
    +   * The \p format is a string which mixes the format for WDate and
    +   * WTime.
    +   *
    +   * \sa WDate::fromString(), WTime::toString().
    +   */
    +  static WDateTime fromString(const WT_USTRING& s, const WT_USTRING& format);
    +
    +  /*! \brief Reports the current UTC datetime.
    +   *
    +   * This method returns the datetime as indicated by the system clock
    +   * of the server, in the UTC timezone.
    +   */
    +  static WDateTime currentDateTime();
    +
    +  /*! \brief Creates a date time based on a number of seconds since the Epoch.
    +   *
    +   * \sa setTime_t()
    +   */
    +  static WDateTime fromTime_t(std::time_t seconds);
    +
    +  /*! \brief Creates a date time from boost's date time type.
    +   *
    +   * \sa toPosixTime()
    +   */
    +  static WDateTime fromPosixTime(const boost::posix_time::ptime& datetime);
    +
    +private:
    +  boost::posix_time::ptime datetime_;
    +
    +  enum CharState { CharUnhandled, CharHandled, CharInvalid };
    +
    +  WDateTime(boost::posix_time::ptime datetime);
    +
    +  static void fromString(WDate *date, WTime *time, const WString& s,
    +			 const WString& format);
    +  static WString toString(const WDate *date, const WTime *time,
    +			  const WString& format);
    +
    +  friend class WDate;
    +  friend class WTime;
    +};
    +
    +}
    +
    +#endif // WDATE_TIME_H_
    diff --git a/wt-3.1.7a/src/Wt/WDateTime.C b/wt-3.1.7a/src/Wt/WDateTime.C
    new file mode 100644
    index 0000000..899dd57
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDateTime.C
    @@ -0,0 +1,524 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <stdlib.h>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WDateTime"
    +#include "Wt/WDate"
    +#include "Wt/WTime"
    +
    +#include <boost/date_time/gregorian/gregorian.hpp>
    +#include <boost/date_time/local_time_adjustor.hpp>
    +#include <boost/date_time/c_local_time_adjustor.hpp>
    +
    +#ifndef DOXYGEN_ONLY
    +
    +namespace posix = boost::posix_time;
    +namespace gregorian = boost::gregorian;
    +
    +/*
    + * TODO: -isValid() versus !isNull()
    + */
    +
    +namespace Wt {
    +
    +  namespace {
    +    std::string multiple(int value, std::string s)
    +    {
    +      if (abs(value) == 1)
    +        return std::string();
    +      else
    +        return s;
    +    }
    +    inline WString tr(const char *key)
    +    {
    +      return WString::tr(key);
    +    }
    +  }
    +
    +InvalidDateTimeException::InvalidDateTimeException()
    +{ }
    +
    +InvalidDateTimeException::~InvalidDateTimeException() throw()
    +{ }
    +
    +const char *InvalidDateTimeException::what() const throw()
    +{ 
    +  return "Error: Attempted operation on an invalid WDateTime";
    +}
    +
    +WDateTime::WDateTime()
    +{ }
    +
    +WDateTime::WDateTime(const WDate& date)
    +{
    +  if (date.isValid()) {
    +    gregorian::date d(date.year(), date.month(), date.day());
    +    posix::time_duration t(0, 0, 0, 0);
    +
    +    datetime_ = posix::ptime(d, t);
    +  }
    +}
    +
    +WDateTime::WDateTime(const WDate& date, const WTime& time)
    +{
    +  if (date.isValid() && time.isValid()) {
    +    gregorian::date d(date.year(), date.month(), date.day());
    +    posix::time_duration::fractional_seconds_type ticks_per_msec =
    +      posix::time_duration::ticks_per_second() / 1000;
    +    posix::time_duration t(time.hour(), time.minute(),
    +      time.second(), time.msec() * ticks_per_msec);
    +
    +    datetime_ = posix::ptime(d, t);
    +  }
    +}
    +
    +WDateTime::WDateTime(posix::ptime dt)
    +  : datetime_(dt)
    +{ }
    +
    +void WDateTime::setTime_t(std::time_t t)
    +{
    +  datetime_ = posix::from_time_t(t);
    +}
    +
    +void WDateTime::setPosixTime(const posix::ptime& dt)
    +{
    +  datetime_ = dt;
    +}
    +
    +void WDateTime::setDate(const WDate& date)
    +{
    +  if (isValid()) {
    +    *this = WDateTime(date, time());
    +  } else {
    +    *this = WDateTime(date, WTime(0, 0));
    +  }
    +}
    +
    +WDate WDateTime::date() const
    +{
    +  if (isValid()) {
    +    gregorian::date d = datetime_.date();
    +    return WDate(d.year(), d.month(), d.day());
    +  } else
    +    return WDate();
    +}
    +
    +void WDateTime::setTime(const WTime& time)
    +{
    +  if (isValid()) {
    +    *this = WDateTime(date(), time);
    +  } else {
    +    // FIXME: without a valid date, what to do ??
    +  }
    +}
    +
    +WTime WDateTime::time() const
    +{
    +  if (isValid()) {
    +    posix::time_duration d = datetime_.time_of_day();
    +    posix::time_duration::fractional_seconds_type ticks_per_msec =
    +      posix::time_duration::ticks_per_second() / 1000;
    +    posix::time_duration::fractional_seconds_type msec =
    +      d.fractional_seconds();
    +    msec = msec / ticks_per_msec;
    +    return WTime(d.hours(), d.minutes(), d.seconds(), (int)msec);
    +  } else
    +    return WTime();
    +}
    +
    +WDateTime WDateTime::addMSecs(int ms) const
    +{
    +  if (isValid()) {
    +    posix::time_duration::fractional_seconds_type ticks_per_msec =
    +      posix::time_duration::ticks_per_second() / 1000;
    +    posix::ptime dt = datetime_ + posix::time_duration(0, 0, 0, ms * ticks_per_msec);
    +    return WDateTime(dt);
    +  } else
    +    return *this;
    +}
    +
    +WDateTime WDateTime::addSecs(int s) const
    +{
    +  if (isValid()) {
    +    posix::ptime dt = datetime_ + posix::time_duration(0, 0, s, 0);
    +    return WDateTime(dt);
    +  } else
    +    return *this;
    +}
    +
    +WDateTime WDateTime::addDays(int ndays) const
    +{
    +  if (isValid()) {
    +    posix::ptime dt = datetime_ + gregorian::days(ndays);
    +    return WDateTime(dt);
    +  } else
    +    return *this;
    +}
    +
    +WDateTime WDateTime::addMonths(int nmonths) const
    +{
    +  if (isValid()) {
    +    WDate d = date().addMonths(nmonths);
    +    WTime t = time();
    +    return WDateTime(d, t);
    +  } else
    +    return *this;
    +}
    +
    +WDateTime WDateTime::addYears(int nyears) const
    +{
    +  if (isValid()) {
    +    WDate d = date().addYears(nyears);
    +    WTime t = time();
    +    return WDateTime(d, t);
    +  } else
    +    return *this;
    +}
    +
    +bool WDateTime::isNull() const
    +{
    +  return !isValid();
    +}
    +
    +bool WDateTime::isValid() const
    +{
    +  return !datetime_.is_not_a_date_time();
    +}
    +
    +std::time_t WDateTime::toTime_t() const
    +{
    +  return (datetime_ - posix::ptime(gregorian::date(1970, 1, 1)))
    +    .total_seconds();
    +}
    +
    +posix::ptime WDateTime::toPosixTime() const
    +{
    +  return datetime_;
    +}
    +
    +int WDateTime::secsTo(const WDateTime& other) const
    +{
    +  if (!isValid() || !other.isValid())
    +    throw InvalidDateTimeException();
    +
    +  return (int)other.toTime_t() - (int)toTime_t();
    +}
    +
    +int WDateTime::daysTo(const WDateTime& other) const
    +{
    +  return date().daysTo(other.date());
    +}
    +
    +WString WDateTime::timeTo(const WDateTime& other, int minValue) const
    +{
    +  int secs = secsTo(other);
    +
    +  if (abs(secs) < 1)
    +    if (WApplication::instance()) {
    +      return tr("Wt.WDateTime.LessThanASecond");
    +    } else {
    +      return "less than a second";
    +    }
    +  else if (abs(secs) < 60 * minValue)
    +    if (WApplication::instance()) {
    +      return secs > 1 ? tr("Wt.WDateTime.seconds").arg(secs) :
    +        tr("Wt.WDateTime.second");
    +    } else {
    +      return boost::lexical_cast<std::string>(secs) + " second"
    +        + multiple(secs, "s");
    +    }
    +  else {
    +    int minutes = secs / 60;
    +    if (abs(minutes) < 60 * minValue)
    +      if (WApplication::instance()) {
    +        return minutes > 1 ? tr("Wt.WDateTime.minutes").arg(minutes) :
    +          tr("Wt.WDateTime.minute");
    +      } else {
    +        return boost::lexical_cast<std::string>(minutes) + " minute"
    +          + multiple(minutes, "s");
    +      }
    +    else {
    +      int hours = minutes / 60;
    +      if (abs(hours) < 24 * minValue)
    +        if (WApplication::instance()) {
    +          return hours > 1 ? tr("Wt.WDateTime.hours").arg(hours) :
    +            tr("Wt.WDateTime.hour");
    +        } else {
    +          return boost::lexical_cast<std::string>(hours) + " hour"
    +            + multiple(hours, "s");
    +        }
    +      else {
    +	int days = hours / 24;
    +        if (abs(days) < 7 * minValue)
    +          if (WApplication::instance()) {
    +            return days > 1 ? tr("Wt.WDateTime.days").arg(days) :
    +              tr("Wt.WDateTime.day");
    +          } else {
    +            return boost::lexical_cast<std::string>(days) + " day"
    +              + multiple(days, "s");
    +          }
    +	else {
    +	  if (abs(days) < 31 * minValue) {
    +	    int weeks = days / 7;
    +            if (WApplication::instance()) {
    +              return weeks > 1 ? tr("Wt.WDateTime.weeks").arg(weeks) :
    +                tr("Wt.WDateTime.week");
    +            } else {
    +              return boost::lexical_cast<std::string>(weeks) + " week"
    +                + multiple(weeks, "s");
    +            }
    +	  } else {
    +	    if (abs(days) < 365 * minValue) {
    +	      int months = days / 30;
    +              if (WApplication::instance()) {
    +                return months > 1 ? tr("Wt.WDateTime.months").arg(months) :
    +                  tr("Wt.WDateTime.month");
    +              } else {
    +                return boost::lexical_cast<std::string>(months) + " month"
    +                  + multiple(months, "s");
    +              }
    +	    } else {
    +	      int years = days / 365;
    +              if (WApplication::instance()) {
    +                return years > 1 ? tr("Wt.WDateTime.years").arg(years) :
    +                  tr("Wt.WDateTime.year");
    +              } else {
    +                return years > 1 ? tr("Wt.WDateTime.years").arg(years) :
    +                  tr("Wt.WDateTime.year");
    +              }
    +	    }
    +	  }
    +	}
    +      }
    +    }
    +  }
    +}
    +
    +bool WDateTime::operator<(const WDateTime& other) const
    +{
    +  return datetime_ < other.datetime_;
    +}
    +
    +bool WDateTime::operator<=(const WDateTime& other) const
    +{
    +  return datetime_ <= other.datetime_;
    +}
    +
    +bool WDateTime::operator>(const WDateTime& other) const
    +{
    +  return datetime_ > other.datetime_;
    +}
    +
    +bool WDateTime::operator>=(const WDateTime& other) const
    +{
    +  return datetime_ >= other.datetime_;
    +}
    +
    +bool WDateTime::operator==(const WDateTime& other) const
    +{
    +  return datetime_ == other.datetime_;
    +}
    +
    +bool WDateTime::operator!=(const WDateTime& other) const
    +{
    +  return datetime_ != other.datetime_;
    +}
    +
    +WDateTime WDateTime::currentDateTime()
    +{
    +  return WDateTime(posix::microsec_clock::universal_time());
    +}
    +
    +WString WDateTime::defaultFormat()
    +{
    +  return WString::fromUTF8("ddd MMM d HH:mm:ss yyyy"); 
    +}
    +
    +WDateTime WDateTime::fromString(const WString& s)
    +{
    +  return fromString(s, defaultFormat());
    +}
    +
    +WDateTime WDateTime::fromString(const WString& s, const WString& format)
    +{
    +  WDate date;
    +  WTime time;
    +
    +  fromString(&date, &time, s, format);
    +
    +  return WDateTime(date, time);
    +}
    +
    +void WDateTime::fromString(WDate *date, WTime *time, const WString& s,
    +			   const WString& format)
    +{
    +  std::string v = s.toUTF8();
    +  std::string f = format.toUTF8();
    +
    +  bool inQuote = false;
    +  bool gotQuoteInQuote = false;
    +
    +  unsigned vi = 0;
    +
    +  WDate::ParseState dateParse;
    +  WTime::ParseState timeParse;
    +
    +  for (unsigned fi = 0; fi <= f.length(); ++fi) {
    +    bool finished = fi == f.length();
    +    char c = !finished ? f[fi] : 0;
    +
    +    if (finished && inQuote)
    +      return;
    +
    +    if (inQuote) {
    +      if (c != '\'') {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  inQuote = false;
    +	} else {
    +	  if (vi >= v.length() || (v[vi++] != c))
    +	    return;
    +	}
    +      } else {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  if (vi >= v.length() || (v[vi++] != c))
    +	    return;
    +	} else
    +	  gotQuoteInQuote = true;
    +      }
    +    }
    +
    +    if (!inQuote) {
    +      CharState state = CharUnhandled;
    +
    +      if (date) {
    +	CharState dateState = WDate::handleSpecial(c, v, vi, dateParse, format);
    +	if (dateState == CharInvalid)
    +	  return;
    +	else if (dateState == CharHandled)
    +	  state = CharHandled;
    +      }
    +
    +      if (time) {
    +	CharState timeState = WTime::handleSpecial(c, v, vi, timeParse, format);
    +	if (timeState == CharInvalid)
    +	  return;
    +	else if (timeState == CharHandled)
    +	  state = CharHandled;
    +      }
    +
    +      if (!finished && state == CharUnhandled) {
    +	if (c == '\'') {
    +	  inQuote = true;
    +	  gotQuoteInQuote = false;
    +	} else
    +	  if (vi >= v.length() || (v[vi++] != c))
    +	    return;
    +      }
    +    }
    +  }
    +
    +  if (date)
    +    *date = WDate(dateParse.year, dateParse.month, dateParse.day);
    +
    +  if (time) {
    +    if (timeParse.parseAMPM && timeParse.haveAMPM) {
    +      if (timeParse.pm)
    +	timeParse.hour = (timeParse.hour % 12) + 12;
    +      else
    +	timeParse.hour = timeParse.hour % 12;
    +    }
    +
    +    *time = WTime(timeParse.hour, timeParse.minute, timeParse.sec,
    +		  timeParse.msec);
    +  }
    +}
    +
    +WString WDateTime::toString() const
    +{
    +  return toString(defaultFormat());
    +}
    +
    +WString WDateTime::toString(const WString& format) const
    +{
    +  WDate d = date();
    +  WTime t = time();
    +
    +  return toString(&d, &t, format);
    +}
    +
    +WString WDateTime::toString(const WDate *date, const WTime *time,
    +			    const WString& format)
    +{
    +  if ((date && !date->isValid()) || (time && !time->isValid())) {
    +    if (WApplication::instance()) {
    +      return tr("Wt.WDateTime.null");
    +    } else {
    +      return WString::fromUTF8("Null");
    +    }
    +  }
    +
    +  std::stringstream result;
    +  std::string f = format.toUTF8() + std::string(3, 0);
    +
    +  bool inQuote = false;
    +  bool gotQuoteInQuote = false;
    +
    +  for (unsigned i = 0; i < f.length() - 3; ++i) {
    +    if (inQuote) {
    +      if (f[i] != '\'') {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  inQuote = false;
    +	} else
    +	  result.put(f[i]);
    +      } else {
    +	if (gotQuoteInQuote) {
    +	  gotQuoteInQuote = false;
    +	  result.put(f[i]);
    +	} else
    +	  gotQuoteInQuote = true;
    +      }
    +    }
    +
    +    if (!inQuote) {
    +      bool handled = false;
    +      if (date)
    +	handled = date->writeSpecial(f, i, result);
    +      if (!handled && time)
    +	handled = time->writeSpecial(f, i, result);
    +
    +      if (!handled) {
    +	if (f[i] == '\'') {
    +	  inQuote = true;
    +	  gotQuoteInQuote = false;
    +	} else
    +	  result.put(f[i]);
    +      }
    +    }
    +  }
    +
    +  return WString::fromUTF8(result.str());
    +}
    +
    +WDateTime WDateTime::fromTime_t(std::time_t t) {
    +  WDateTime dt;
    +  dt.setTime_t(t);
    +  
    +  return dt;
    +}
    +
    +WDateTime WDateTime::fromPosixTime(const posix::ptime& t) {
    +  return WDateTime(t);
    +}
    +
    +}
    +
    +#endif // DOXYGEN_ONLY
    diff --git a/wt-3.1.7a/src/Wt/WDateValidator b/wt-3.1.7a/src/Wt/WDateValidator
    new file mode 100644
    index 0000000..f7a8432
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDateValidator
    @@ -0,0 +1,210 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef WDATE_VALIDATOR_H_
    +#define WDATE_VALIDATOR_H_
    +
    +#include <Wt/WDate>
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +/*! \class WDateValidator Wt/WDateValidator Wt/WDateValidator
    + *  \brief A validator for date input.
    + *
    + * This validator accepts input in the given date format, and
    + * optionally checks if the date is within a given range.
    + *
    + * The format string used for validating user input are the same as
    + * those used by WDate::fromString().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
    + * Wt::WDateValidator *validator = new Wt::WDateValidator();
    + * validator->setFormat("dd-MM-yyyy");
    + * lineEdit->setValidator(validator);
    + * lineEdit->setText("01-03-2008");
    + * \endcode
    + * \endif 
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in the WDateValidator can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WDateValidator.DateTooEarly: The date must be after {1}
    + * - Wt.WDateValidator.DateTooLate: The date must be before {1}
    + * - Wt.WDateValidator.WrongDateRange: The date must be between {1} and {2}
    + * - Wt.WDateValidator.WrongFormat: Must be a date in the format '{1}'
    + */
    +class WT_API WDateValidator : public WValidator
    +{
    +public:
    +  /*! \brief Creates a date validator.
    +   *
    +   * The validator will accept any date of the format 'yyyy-MM-dd'.
    +   */
    +  WDateValidator(WObject *parent = 0);
    +
    +  /*! \brief Creates a date validator.
    +   *
    +   * The validator will accept dates in the indicated range in the
    +   * format 'yyyy-MM-dd'.
    +   */
    +  WDateValidator(const WDate& bottom,
    +		 const WDate& top, WObject *parent = 0);
    +
    +  /*! \brief Creates a date validator.
    +   *
    +   * The validator will accept dates in the date format \p format.
    +   *
    +   * The syntax for \p format is as in WDate::fromString()
    +   */
    +  WDateValidator(const WT_USTRING& format, WObject *parent = 0);
    +
    +  /*! \brief Creates a date validator.
    +   *
    +   * The validator will accept only dates within the indicated range
    +   * <i>bottom</i> to <i>top</i>, in the date format \p format.
    +   *
    +   * The syntax for \p format is as in WDate::fromString()
    +   */
    +  WDateValidator(const WT_USTRING& format,
    +		 const WDate& bottom,
    +		 const WDate& top, WObject *parent = 0);
    +
    +  /*! \brief Sets the bottom of the valid date range.
    +   *
    +   * The default is a null date constructed using WDate().
    +   */
    +  void setBottom(const WDate& bottom);
    +
    +  /*! \brief Returns the bottom date of the valid range.
    +   */
    +  const WDate& bottom() const { return bottom_; }
    +
    +  /*! \brief Sets the top of the valid date range.
    +   *
    +   * The default is a null date constructed using WDate().
    +   */
    +  void setTop(const WDate& top);
    +
    +  /*! \brief Returns the top date of the valid range.
    +   */
    +  const WDate& top() const { return top_; }
    +
    +  /*! \brief Sets the date format used to parse date strings.
    +   *
    +   * \sa WDate::fromString()
    +   */
    +  void setFormat(const WT_USTRING& format);
    +
    +  /*! \brief Returns the format string used to parse date strings
    +   *
    +   * \sa setFormat()
    +   */
    +  const WT_USTRING& format() const { return formats_[0]; }
    +
    +  /*! \brief Sets the date formats used to parse date strings.
    +   */
    +  void setFormats(const std::vector<WT_USTRING>& formats);
    +
    +  /*! \brief Returns the date formats used to parse date strings.
    +   */
    +  const std::vector<WT_USTRING>& formats() const { return formats_; }
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * The input is considered valid only when it is blank for a
    +   * non-mandatory field, or represents a date in the given format,
    +   * and within the valid range.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Parses a date from a string (<b>deprecated</b>).
    +   *
    +   * \deprecated see WDate::fromString() static methods.
    +   *
    +   * Equivalent to WDate::fromString(\p input, "yyyy-MM-dd");
    +   */
    +  static WDate parse(const WString& input);
    +#endif // WT_DEPRECATED_3_0_0
    +
    +  /*! \brief Sets the message to display when the input is not a date.
    +   *
    +   * The default message is "The date must be of the format {1}", with
    +   * as first argument the format string.
    +   */
    +  void setInvalidNotADateText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input is not a date.
    +   *
    +   * \sa setInvalidNotADateText(const WString&)
    +   */
    +  WString invalidNotADateText() const;
    +
    +  /*! \brief Sets the message to display when the date is earlier than bottom.
    +   *
    +   * \if cpp
    +   *
    +   * Depending on whether bottom() and top() are
    +   * defined (see WDate::isNull()), the default message is "The date
    +   * must be between {1} and {2}" or "The date must be after {1}".
    +   *
    +   * \elseif java
    +   *
    +   * The default message is "The date must be between {1} and {2}" or
    +   * "The date must be after {1}".
    +   *
    +   * \endif
    +   */
    +  void setInvalidTooEarlyText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when date is too early.
    +   *
    +   * \sa setInvalidTooEarlyText(const WString&)
    +   */
    +  WString invalidTooEarlyText() const;
    +
    +  /*! \brief Sets the message to display when the date is later than top.
    +   *
    +   * \if cpp
    +   * Depending on whether bottom() and top() are \link WDate::isNull
    +   * defined\endlink, the default message is "The date must be
    +   * between {1} and {2}" or "The date must be before {2}".
    +   * \elseif java
    +   * Depending on whether bottom() and top() are defined, the default message is
    +   * "The date must be between {1} and {2}" or "The date must be before {2}".
    +   * \endif 
    +   */
    +  void setInvalidTooLateText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the date is too late.
    +   *
    +   * \sa setInvalidTooLateText(const WString&)
    +   */
    +  WString invalidTooLateText() const;
    +
    +protected:
    +  std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +private:
    +  std::vector<WT_USTRING> formats_;
    +  WDate   bottom_, top_;
    +
    +  WString tooEarlyText_;
    +  WString tooLateText_;
    +  WString notADateText_;
    +};
    +
    +}
    +
    +#endif // DATE_VALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WDateValidator.C b/wt-3.1.7a/src/Wt/WDateValidator.C
    new file mode 100644
    index 0000000..bc088d5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDateValidator.C
    @@ -0,0 +1,260 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <sstream>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WDateValidator"
    +#include "Wt/WLogger"
    +#include "Wt/WWebWidget"
    +
    +namespace Wt {
    +
    +WDateValidator::WDateValidator(WObject *parent)
    +  : WValidator(parent)
    +{
    +  setFormat("yyyy-MM-dd");
    +}
    +
    +WDateValidator::WDateValidator(const WDate& bottom, const WDate& top,
    +			       WObject *parent)
    +  : WValidator(parent),
    +    bottom_(bottom),
    +    top_(top)
    +{
    +  setFormat("yyyy-MM-dd");
    +}
    +
    +WDateValidator::WDateValidator(const WT_USTRING& format, WObject *parent)
    +  : WValidator(parent)
    +{
    +  setFormat(format);
    +}
    +
    +WDateValidator::WDateValidator(const WT_USTRING& format,
    +			       const WDate& bottom, const WDate& top,
    +			       WObject *parent)
    +  : WValidator(parent),
    +    bottom_(bottom),
    +    top_(top)
    +{
    +  setFormat(format);
    +}
    +
    +void WDateValidator::setInvalidNotADateText(const WString& text)
    +{
    +  notADateText_ = text;
    +}
    +
    +WString WDateValidator::invalidNotADateText() const
    +{
    +  if (!notADateText_.empty()) {
    +    WString s = notADateText_;
    +    s.arg(formats_[0]);
    +    return s;
    +  } else
    +    return WString::tr("Wt.WDateValidator.WrongFormat").arg(formats_[0]);
    +}
    +
    +
    +void WDateValidator::setFormat(const WT_USTRING& format)
    +{
    +  formats_.clear();
    +  formats_.push_back(format);
    +  repaint();
    +}
    +
    +void WDateValidator::setFormats(const std::vector<WT_USTRING>& formats)
    +{
    +  formats_ = formats;
    +  repaint();
    +}
    +
    +void WDateValidator::setBottom(const WDate& bottom)
    +{
    +  if (bottom_ != bottom) {
    +    bottom_ = bottom;
    +    repaint();
    +  }
    +}
    +
    +void WDateValidator::setTop(const WDate& top)
    +{
    +  if (top_ != top) {
    +    top_ = top;
    +    repaint();
    +  }
    +}
    +
    +void WDateValidator::setInvalidTooEarlyText(const WString& text)
    +{
    +  tooEarlyText_ = text;
    +  repaint();
    +}
    +
    +WString WDateValidator::invalidTooEarlyText() const
    +{
    +  if (!tooEarlyText_.empty()) {
    +    WString s = tooEarlyText_;
    +    s.arg(bottom_.toString(formats_[0])).arg(top_.toString(formats_[0]));
    +    return s;
    +  } else
    +    if (bottom_.isNull())
    +      return WString();
    +    else
    +      if (top_.isNull())
    +        return WString::tr("Wt.WDateValidator.DateTooEarly")
    +          .arg(bottom_.toString(formats_[0]));
    +      else
    +        return WString::tr("Wt.WDateValidator.WrongDateRange")
    +          .arg(bottom_.toString(formats_[0]))
    +          .arg(top_.toString(formats_[0]));
    +}
    +
    +void WDateValidator::setInvalidTooLateText(const WString& text)
    +{
    +  tooLateText_ = text;
    +  repaint();
    +}
    +
    +WString WDateValidator::invalidTooLateText() const
    +{
    +  if (!tooLateText_.empty()) {
    +    WString s = tooLateText_;
    +    s.arg(bottom_.toString(formats_[0])).arg(top_.toString(formats_[0]));
    +    return s;
    +  } else
    +    if (top_.isNull())
    +      return WString();
    +    else
    +      if (bottom_.isNull())
    +        return WString::tr("Wt.WDateValidator.DateTooLate")
    +          .arg(top_.toString(formats_[0]));
    +      else
    +        return WString::tr("Wt.WDateValidator.WrongDateRange")
    +          .arg(bottom_.toString(formats_[0]))
    +          .arg(top_.toString(formats_[0]));
    +}
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +WDate WDateValidator::parse(const WString& input)
    +{
    +  return WDate::fromString(input, "yyyy-MM-dd");
    +}
    +#endif // WT_DEPRECATED_3_0_0
    +
    +WValidator::State WDateValidator::validate(WT_USTRING& input) const
    +{
    +  if (input.empty())
    +    return isMandatory() ? InvalidEmpty : Valid;
    +
    +  for (unsigned i = 0; i < formats_.size(); ++i) {
    +    try {
    +      WDate d = WDate::fromString(input, formats_[i]);
    +
    +      if (d.isValid()) {
    +	if (!bottom_.isNull())
    +	  if (d < bottom_)
    +	    return Invalid;
    +
    +	if (!top_.isNull())
    +	  if (d > top_)
    +	    return Invalid;
    +    
    +	return Valid;
    +      }
    +    } catch (std::exception& e) {
    +      wApp->log("warn") << "WDateValidator::validate(): " << e.what();
    +    }
    +  }
    +
    +  return Invalid;
    +}
    +
    +std::string WDateValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  std::stringstream js;
    +
    +  js << "function(e,te,tn,ts,tb){if(e.value.length==0)";
    +
    +  if (isMandatory())
    +    js << "return {valid:false,message:te};";
    +  else
    +    js << "return {valid:true};";
    +
    +  js << "var r,res,m=-1,d=-1,y=-1;";
    +
    +  for (unsigned i = 0; i < formats_.size(); ++i) {
    +    WDate::RegExpInfo r = WDate::formatToRegExp(formats_[i]);
    +
    +    js << "r=/^" << r.regexp << "$/;"
    +      "results=r.exec(e.value);"
    +      "if (results!=null) {"
    +      """m=" << r.monthGetJS << ";"
    +      """d=" << r.dayGetJS << ";"
    +      """y=" << r.yearGetJS << ";"
    +      "} else {";
    +  }
    +  js << "return {valid:false,message:tn};";
    +
    +  for (unsigned i = 0; i < formats_.size(); ++i)
    +    js << "}";
    +
    +  js << "if ((d<=0)||(d>31)||(m<=0)||(m>12))"
    +    "return {valid:false,message:tn};"
    +    "var dt=new Date(y,m-1,d);"
    +    "if (dt.getDate() != d || "
    +        "dt.getMonth() != m-1 || "
    +        "dt.getFullYear() != y) "
    +      "return {valid:false,massage:tn};";
    +
    +  if (!bottom_.isNull())
    +    js << "if(dt.getTime()<new Date(" << bottom_.year() << ','
    +       << bottom_.month()-1 << ',' << bottom_.day() << ").getTime())"
    +      "return {valid:false,message:ts};";
    +  if (!top_.isNull())
    +    js << "if(dt.getTime()>new Date(" << top_.year() << ','
    +       << top_.month()-1 << ',' << top_.day() << ").getTime())"
    +      "return {valid:false,message:tb};";
    +
    +  js << "return {valid:true};}(" << jsRef << ','
    +     << invalidBlankText().jsStringLiteral() << ','
    +     << invalidNotADateText().jsStringLiteral() << ','
    +     << invalidTooEarlyText().jsStringLiteral() << ','
    +     << invalidTooLateText().jsStringLiteral() << ')';
    +
    +  return js.str();
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WDateValidator::createExtConfig(std::ostream& config) const
    +{
    +  config << ",format:"
    +	 << WWebWidget::jsStringLiteral(WDate::extFormat(formats_[0]), '\'');
    +
    +  try {
    +    if (!bottom_.isNull())
    +      config << ",minValue:"
    +	     << WWebWidget::jsStringLiteral(bottom_.toString(formats_[0]));
    +    if (top_.isNull())
    +      config << ",maxValue:"
    +	     << WWebWidget::jsStringLiteral(top_.toString(formats_[0]));
    +  } catch (std::exception& e) {
    +    wApp->log("error") << "WDateValidator: " << e.what();
    +  }
    +
    +  if (!tooEarlyText_.empty())
    +    config << ",minText:" << tooEarlyText_.jsStringLiteral();
    +  if (!tooLateText_.empty())
    +    config << ",maxText:" << tooLateText_.jsStringLiteral();
    +  if (!notADateText_.empty())
    +    config << ",invalidText:" << notADateText_.jsStringLiteral();
    +
    +  WValidator::createExtConfig(config);
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDefaultLayout b/wt-3.1.7a/src/Wt/WDefaultLayout
    new file mode 100644
    index 0000000..00bb5d7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDefaultLayout
    @@ -0,0 +1,57 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDEFAULT_LAYOUT_H_
    +#define WDEFAULT_LAYOUT_H_
    +
    +#include <vector>
    +
    +#include <Wt/WLayout>
    +
    +namespace Wt {
    +
    +/*! \class WDefaultLayout Wt/WDefaultLayout Wt/WDefaultLayout
    + *  \brief A default layout manager.
    + *
    + * The default layout does not attempt to resize any of the widgets,
    + * and puts all widgets vertically above each other.
    + *
    + * \note This layout manager is applicable only to Ext::Container
    + * container widgets. However, its behaviour is equivalent to not
    + * using a layout manager on a WContainerWidget and adding contents
    + * directly using WContainerWidget::addWidget().
    + */
    +class WT_API WDefaultLayout : public WLayout
    +{
    +public:
    +  /*! \brief Creates a new %WDefaultLayout
    +   */
    +  WDefaultLayout(WWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WDefaultLayout();
    +
    +  /*! \brief Adds a layout <i>item</i>.
    +   *
    +   * The item may be a widget or nested layout, and is added below the last
    +   * added item.
    +   *
    +   * \sa removeItem(WLayoutItem *), addWidget(WWidget *)
    +   */
    +  virtual void addItem(WLayoutItem *item);
    +  virtual void removeItem(WLayoutItem *item);
    +  virtual WLayoutItem *itemAt(int index) const;
    +  virtual int indexOf(WLayoutItem *item) const;
    +  virtual int count() const;
    +
    +private:
    +  std::vector<WLayoutItem *> items_;
    +};
    +
    +}
    +
    +#endif // WDEFAULT_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WDefaultLayout.C b/wt-3.1.7a/src/Wt/WDefaultLayout.C
    new file mode 100644
    index 0000000..4849640
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDefaultLayout.C
    @@ -0,0 +1,58 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +
    +#include "Wt/WDefaultLayout"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WDefaultLayout::WDefaultLayout(WWidget *parent)
    +  : WLayout()
    +{ 
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +WDefaultLayout::~WDefaultLayout()
    +{
    +  for (unsigned i = 0; i < items_.size(); ++i)
    +    delete items_[i];
    +}
    +
    +void WDefaultLayout::addItem(WLayoutItem *item)
    +{
    +  items_.push_back(item);
    +  updateAddItem(item);
    +}
    +
    +void WDefaultLayout::removeItem(WLayoutItem *item)
    +{
    +  int i = indexOf(item);
    +
    +  if (i != -1) {
    +    items_.erase(items_.begin() + i);
    +    updateRemoveItem(item);
    +  }
    +}
    +
    +WLayoutItem *WDefaultLayout::itemAt(int index) const
    +{
    +  return items_[index];
    +}
    +
    +int WDefaultLayout::indexOf(WLayoutItem *item) const
    +{
    +  return Utils::indexOf(items_, item);
    +}
    +
    +int WDefaultLayout::count() const
    +{
    +  return items_.size();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator b/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator
    new file mode 100644
    index 0000000..bd40bdd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator
    @@ -0,0 +1,49 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDEFAULT_LOADING_INDICATOR_H_
    +#define WDEFAULT_LOADING_INDICATOR_H_
    +
    +#include <Wt/WText>
    +#include <Wt/WLoadingIndicator>
    +
    +namespace Wt {
    +
    +/*! \class WDefaultLoadingIndicator Wt/WDefaultLoadingIndicator Wt/WDefaultLoadingIndicator
    + *  \brief A default loading indicator.
    + *
    + * The default loading indicator displays the text message <span
    + * style="background-color: red; color: white; font-family:
    + * Arial,Helvetica,sans-serif; font-size: small;">Loading...</span> in
    + * the right top corner of the window.
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WDefaultLoadingIndicator.Loading: Loading...
    + *
    + * \sa WApplication::setLoadingIndicator()
    + */
    +class WT_API WDefaultLoadingIndicator : public WText, public WLoadingIndicator
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WDefaultLoadingIndicator();
    +
    +  virtual WWidget *widget() { return this; }
    +  virtual void setMessage(const WString& text);
    +};
    +
    +}
    +
    +#endif // WDEFAULT_LOADING_INDICATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator.C b/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator.C
    new file mode 100644
    index 0000000..a528189
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDefaultLoadingIndicator.C
    @@ -0,0 +1,48 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WDefaultLoadingIndicator"
    +
    +namespace Wt {
    +
    +WDefaultLoadingIndicator::WDefaultLoadingIndicator()
    +  : WText(tr("Wt.WDefaultLoadingIndicator.Loading"))
    +{
    +  setInline(false);
    +  setStyleClass("Wt-loading");
    +
    +  WApplication *app = WApplication::instance();
    +
    +  app->styleSheet().addRule("div.Wt-loading",
    +			    "background-color: red; color: white;"
    +			    "font-family: Arial,Helvetica,sans-serif;"
    +			    "font-size: small;"
    +			    "position: absolute; right: 0px; top: 0px;");
    +  app->styleSheet().addRule("body div > div.Wt-loading",
    +			    "position: fixed;");
    +
    +  if (app->environment().userAgent().find("MSIE 5.5") != std::string::npos
    +      || app->environment().userAgent().find("MSIE 6") != std::string::npos)
    +    app->styleSheet().addRule
    +      ("div.Wt-loading",
    +       "right: expression((("
    +       "ignoreMe2 = document.documentElement.scrollLeft ? "
    +       "document.documentElement.scrollLeft : "
    +       "document.body.scrollLeft )) + 'px' );"
    +       "top: expression((("
    +       "ignoreMe = document.documentElement.scrollTop ? "
    +       "document.documentElement.scrollTop : "
    +       "document.body.scrollTop)) + 'px' );");
    +}
    +
    +void WDefaultLoadingIndicator::setMessage(const WString& text)
    +{
    +  setText(text);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDialog b/wt-3.1.7a/src/Wt/WDialog
    new file mode 100644
    index 0000000..66e8b12
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDialog
    @@ -0,0 +1,285 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDIALOG_H_
    +#define WDIALOG_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +class WTable;
    +class WTemplate;
    +class WText;
    +
    +/*! \class WDialog Wt/WDialog Wt/WDialog
    + *  \brief A %WDialog shows a dialog.
    + *
    + * By default, the dialog is <i>modal</i>. A modal window blocks the
    + * user interface, and does not allow the user to interact with any
    + * other part of the user interface until the dialog is closed (this
    + * is enforced at the server side, so you may rely on this behavior).
    + *
    + * There are two distinct ways for using a %WDialog window.
    + * 
    + * A %WDialog can be used as any other widget. In this case, the
    + * %WDialog is simply instantiated as another widget. The dialog may
    + * be closed by calling accept(), reject() or done() (or connecting a
    + * signal to one of these methods). This will hide the dialog and emit
    + * the finished() signal, which you then can listen for to process the
    + * dialog result and delete the dialog. Unlike other widgets, a dialog
    + * does not need to be added to a parent widget, but is hidden by
    + * default. You must use the method show() or setHidden(true) to show
    + * the dialog.
    + *
    + * The easiest way to display a modal dialog is using exec(): after
    + * creating a %WDialog window, a call to exec() will block (suspend
    + * the thread) until the dialog window is closed, and return the
    + * dialog result. Typically, an OK button will be connected to
    + * accept(), and in some cases a Cancel button to reject(). This
    + * solution has the drawback that it is not scalable to many
    + * concurrent sessions, since for every session with a recursive event
    + * loop (which is running durring the exec() method), a thread is
    + * locked. In practical terms, this means it is only suitable for
    + * software with restricted access or deployed on an intranet or
    + * extranet.
    + * \if java
    + * This functionality is only available on Servlet 3.0 compatible 
    + * servlet containers.
    + * \endif
    + *
    + * Use setModal(false) to create a non-modal dialog. A non-modal
    + * dialog does not block the underlying user interface: the user must
    + * not first deal with the dialog before interacting with the rest of
    + * the user interface.
    + *
    + * Contents for the dialog is defined by adding it to the contents()
    + * widget.
    + *
    + * \if cpp
    + * Usage example, using the exec() method:
    + * \code
    + * Wt::WDialog dialog("Personalia");
    + *  
    + * new Wt::WText("Enter your name: ", dialog.contents());
    + * Wt::WLineEdit edit(dialog.contents());
    + * new Wt::WBreak(dialog.contents());
    + *  
    + * Wt::WPushButton ok("Ok", dialog.contents());
    + *
    + * // these events will accept() the Dialog
    + * edit.enterPressed().connect(&dialog, &Wt::WDialog::accept);
    + * ok.clicked().connect(&dialog, &Wt::WDialog::accept);
    + *  
    + * if (dialog.exec() == Wt::WDialog::Accepted)
    + *   setStatus("Welcome, " + edit.text());
    + * \endcode
    + * \endif
    + *
    + * This dialog looks like this (using the standard look):
    + *
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WDialog-default-1.png "A simple custom dialog (default)" 
    + * </TD> <TD>
    + * \image html WDialog-polished-1.png "A simple custom dialog (polished)" 
    + * </TD> </TR> </TABLE>
    + *
    + * <h3>CSS</h3>
    + *
    + * A dialog has the
    + * <tt>Wt-dialog</tt> and <tt>Wt-outset</tt> style classes. The look
    + * can be overridden using the following style class selectors:
    + *
    + * \verbatim
    + .Wt-dialog .titlebar : The title bar
    + .Wt-dialog .body     : The body (requires vertical padding 4px).
    + \endverbatim
    + *
    + * \note For the dialog (or rather, the silkscreen covering the user
    + *       interface below) to render properly in IE, the "html body"
    + *       margin is set to 0 (if it wasn't already).
    + */
    +class WT_API WDialog : public WCompositeWidget
    +{
    +public:
    +  /*! \brief The result of a modal dialog execution.
    +   */
    +  enum DialogCode { Rejected, //!< Dialog closed with reject()
    +		    Accepted  //!< Dialog closed with accept()
    +  };
    +
    +  /*! \brief Constructs a %WDialog with a given window title.
    +   *
    +   * Only a single Dialog may be constructed at any time. Unlike other
    +   * widgets, a dialog does not need to be added to a container
    +   * widget.
    +   */
    +  WDialog(const WString& windowTitle = WString());
    +
    +  /*! \brief Destructs a %WDialog.
    +   */
    +  ~WDialog();
    +
    +  /*! \brief Sets the dialog window title.
    +   *
    +   * The window title is displayed in the title bar.
    +   *
    +   * \sa setTitleBarEnabled()
    +   */
    +  void setWindowTitle(const WString& title);
    +
    +  /*! \brief Returns the dialog window title.
    +   *
    +   * \sa setWindowTitle()
    +   */
    +  const WString& windowTitle() const;
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Sets the dialog caption (<b>deprecated</b>).
    +   *
    +   * \deprecated Use setWindowTitle() instead.
    +   */
    +  void setCaption(const WString& caption);
    +
    +  /*! \brief Returns the dialog caption (<b>deprecated</b>).
    +   *
    +   * \deprecated Use windowTitle() instead.
    +   */
    +  const WString& caption() const;
    +#endif // WT_DEPRECATED_3_0_0
    +
    +  /*! \brief Enables or disables the title bar.
    +   *
    +   * The titlebar is enabled by default.
    +   */
    +  void setTitleBarEnabled(bool enabled);
    +
    +  /*! \brief Returns whether the title bar is enabled.
    +   *
    +   * \sa setTitleBarEnabled()
    +   */
    +  bool isTitleBarEnabled() const { return !titleBar_->isHidden(); }
    +
    +  /*! \brief Returns the dialog title bar container.
    +   *
    +   * The title bar contains a single text that contains the
    +   * caption. You may customize the title bar by for example adding
    +   * other content.
    +   */
    +  WContainerWidget *titleBar() const { return titleBar_; }
    +
    +  /*! \brief Returns the dialog contents container.
    +   *
    +   * Content to the dialog window may be added to this container widget. 
    +   */
    +  WContainerWidget *contents() const { return contents_; }
    +
    +  /*! \brief Executes the dialog in a recursive event loop.
    +   *
    +   * Executes the dialog. This blocks the current thread of execution
    +   * until one of done(DialogCode), accept() or reject() is called.
    +   *
    +   * <i>Warning: using exec() does not scale to many concurrent
    +   * sessions, since the thread is locked.</i>
    +   * \if java 
    +   * <i>This functionality is only available on Servlet 3.0 compatible 
    +   * servlet containers.</i>
    +   * \endif
    +   *
    +   * \sa done(DialogCode r), accept(), reject()
    +   */
    +  DialogCode exec();
    +
    +  /*! \brief Stops the dialog.
    +   *
    +   * Sets the dialog result, and emits the finished() signal.
    +   *
    +   * \if cpp
    +   * If a recursive event loop was started using the exec() method, it
    +   * is ended.
    +   * \endif
    +   *
    +   * \sa finished(), result()
    +   */
    +  virtual void done(DialogCode r);
    +
    +  /*! \brief Closes the dialog, with result is Accepted.
    +   *
    +   * \sa done(DialogCode r), reject()
    +   */
    +  virtual void accept();
    +
    +  /*! \brief Closes the dialog, with result is Rejected.
    +   *
    +   * \sa done(DialogCode r), accept()
    +   */
    +  virtual void reject();
    +
    +  /*! \brief Lets pressing the escape key reject the dialog.
    +   *
    +   * Before %Wt 3.1.5, pressing escape automatically rejected the dialog.
    +   * Since 3.1.4 this behaviour is no longer the default since it may
    +   * interfere with other functionality in the dialog. Use this method
    +   * to enable this behaviour.
    +   *
    +   * \sa reject()
    +   */
    +  void rejectWhenEscapePressed();
    +
    +  /*! \brief %Signal emitted when the dialog is closed.
    +   *
    +   * \sa done(DialogCode r), accept(), reject()
    +   */
    +  Signal<DialogCode>& finished() { return finished_; }
    +
    +  /*! \brief Returns the result that was set for this dialog.
    +   *
    +   * \sa done(DialogCode r)
    +   */
    +  DialogCode result() const { return result_; }
    +
    +  /*! \brief Sets whether the dialog is modal.
    +   *
    +   * A modal dialog will block the underlying user interface.
    +   *
    +   * By default a dialog is modal.
    +   */
    +  void setModal(bool modal);
    +
    +  /*! \brief Returns whether the dialog is modal.
    +   *
    +   * \sa setModal()
    +   */
    +  bool isModal() const { return modal_; }
    +
    +  virtual void setHidden(bool hidden);
    +
    +private:
    +  WTemplate        *impl_;
    +  WText            *caption_;
    +  WContainerWidget *titleBar_;
    +  WContainerWidget *contents_;
    +  bool              modal_;
    +
    +  WWidget          *previousExposeConstraint_;
    +  int               coverPreviousZIndex_;
    +  bool              coverWasHidden_;
    +
    +  Signal<DialogCode> finished_;
    +
    +  DialogCode result_;
    +
    +  bool recursiveEventLoop_;
    +
    +  void saveCoverState(WApplication *app, WContainerWidget *cover);
    +  void restoreCoverState(WApplication *app, WContainerWidget *cover);
    +};
    +
    +}
    +
    +#endif // WDIALOG_H_
    diff --git a/wt-3.1.7a/src/Wt/WDialog.C b/wt-3.1.7a/src/Wt/WDialog.C
    new file mode 100644
    index 0000000..56eb538
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDialog.C
    @@ -0,0 +1,269 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WTemplate"
    +#include "Wt/WText"
    +#include "Wt/WDialog"
    +#include "Wt/WVBoxLayout"
    +
    +#include "WebSession.h"
    +#include "WtException.h"
    +#include "WebController.h"
    +
    +#include "JavaScriptLoader.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WDialog.min.js"
    +#endif
    +
    +namespace Wt {
    +
    +WDialog::WDialog(const WString& windowTitle)
    +  : modal_(true),
    +    finished_(this),
    +    recursiveEventLoop_(false)
    +{ 
    +  const char *TEMPLATE =
    +      "${shadow-x1-x2}"
    +      "${titlebar}"
    +      "${contents}";
    +
    +  setImplementation(impl_ = new WTemplate(WString::fromUTF8(TEMPLATE)));
    +
    +  const char *CSS_RULES_NAME = "Wt::WDialog";
    +
    +  WApplication *app = WApplication::instance();
    +  if (!app->styleSheet().isDefined(CSS_RULES_NAME)) {
    +    if (app->environment().agentIsIElt(9))
    +      app->styleSheet().addRule("body", "height: 100%;");
    +
    +    app->styleSheet().addRule("div.Wt-dialogcover", std::string() + 
    +			      // IE: requres body.height=100%
    +			      "height: 100%; width: 100%;"
    +			      "top: 0px; left: 0px;"
    +			      "opacity: 0.5; position: fixed;" +
    +			      (app->environment().agentIsIElt(9) ?
    +			       "filter: alpha(opacity=50);"
    +			       : "opacity: 0.5"), CSS_RULES_NAME);
    +
    +    std::string position
    +      = app->environment().agent() == WEnvironment::IE6 ? "absolute" : "fixed";
    +
    +    // we use left: 50%, top: 50%, margin hack when JavaScript is not available
    +    // see below for an IE workaround
    +    app->styleSheet().addRule("div.Wt-dialog", std::string() +
    +			      (app->environment().ajax()
    +			       && !app->environment().agentIsIElt(9) ?
    +			       "visibility: hidden;" : "") +
    +			      "position: " + position + ';'
    +			      + (!app->environment().ajax() ?
    +				 "left: 50%; top: 50%;"
    +				 "margin-left: -100px; margin-top: -50px;" :
    +				 "left: 0px; top: 0px;"));
    +
    +    if (app->environment().agent() == WEnvironment::IE6) {
    +      app->styleSheet().addRule
    +	("div.Wt-dialogcover",
    +	 "position: absolute;"
    +	 "left: expression("
    +	 "(ignoreMe2 = document.documentElement.scrollLeft) + 'px' );"
    +	 "top: expression("
    +	 "(ignoreMe = document.documentElement.scrollTop) + 'px' );");
    +
    +      // simulate position: fixed left: 50%; top 50%
    +      if (!app->environment().ajax())
    +	app->styleSheet().addRule
    +	  ("div.Wt-dialog",
    +	   "position: absolute;"
    +	   "left: expression("
    +	   "(ignoreMe2 = document.documentElement.scrollLeft + "
    +	   "document.documentElement.clientWidth/2) + 'px' );"
    +	   "top: expression("
    +	   "(ignoreMe = document.documentElement.scrollTop + "
    +	   "document.documentElement.clientHeight/2) + 'px' );");
    +    }
    +  }
    +
    +  impl_->setStyleClass("Wt-dialog Wt-outset");
    +
    +  WContainerWidget *parent = app->domRoot();
    +
    +  setPopup(true);
    +
    +  const char *THIS_JS = "js/WDialog.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WDialog", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  setJavaScriptMember("_a", "0;new " WT_CLASS ".WDialog("
    +		    + app->javaScriptClass() + "," + jsRef() + ")");
    +  app->addAutoJavaScript
    +    ("{var obj = $('#" + id() + "').data('obj');"
    +     "if (obj) obj.centerDialog();}");
    +
    +  parent->addWidget(this);
    +
    +  titleBar_ = new WContainerWidget();
    +  titleBar_->setStyleClass("titlebar");
    +  caption_ = new WText(windowTitle, titleBar_);
    +
    +  impl_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2);
    +  impl_->bindWidget("titlebar", titleBar_);
    +
    +  contents_ = new WContainerWidget();
    +  contents_->setStyleClass("body");
    +
    +  impl_->bindWidget("contents", contents_);
    +
    +  saveCoverState(app, app->dialogCover());
    +
    +  setJavaScriptMember(WT_RESIZE_JS, "$('#" + id() + "').data('obj').wtResize");
    +
    +  hide();
    +}
    +
    +WDialog::~WDialog()
    +{
    +  hide();
    +}
    +
    +void WDialog::rejectWhenEscapePressed()
    +{
    +  WApplication::instance()->globalEscapePressed()
    +    .connect(this, &WDialog::reject);
    +
    +  impl_->escapePressed().connect(this, &WDialog::reject);  
    +}
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +void WDialog::setCaption(const WString& caption)
    +{
    +  setWindowTitle(caption);
    +}
    +
    +const WString& WDialog::caption() const
    +{
    +  return windowTitle();
    +}
    +#endif // WT_DEPRECATED_3_0_0
    +
    +void WDialog::setWindowTitle(const WString& windowTitle)
    +{
    +  caption_->setText(windowTitle);
    +}
    +
    +const WString& WDialog::windowTitle() const
    +{
    +  return caption_->text();
    +}
    +
    +void WDialog::setTitleBarEnabled(bool enable)
    +{
    +  titleBar_->setHidden(!enable);
    +}
    +
    +WDialog::DialogCode WDialog::exec()
    +{
    +  if (recursiveEventLoop_)
    +    throw WtException("WDialog::exec(): already in recursive event loop.");
    +
    +  show();
    +
    +#ifdef WT_TARGET_JAVA
    +  if (!WebController::isAsyncSupported()) {
    +    throw std::runtime_error("Recursive event loop requires a Servlet 3.0 API.");
    +  }
    +#endif
    +
    +  recursiveEventLoop_ = true;
    +  do {
    +    WApplication::instance()->session()->doRecursiveEventLoop();
    +  } while (recursiveEventLoop_);
    +
    +  hide();
    +
    +  return result_;
    +}
    +
    +void WDialog::done(DialogCode result)
    +{
    +  result_ = result;
    +
    +  if (recursiveEventLoop_) {
    +    recursiveEventLoop_ = false;
    +  } else
    +    hide();
    +
    +  finished_.emit(result);
    +}
    +
    +void WDialog::accept()
    +{
    +  done(Accepted);
    +}
    +
    +void WDialog::reject()
    +{
    +  done(Rejected);
    +}
    +
    +void WDialog::setModal(bool modal)
    +{
    +  modal_ = modal;
    +}
    +
    +void WDialog::saveCoverState(WApplication *app, WContainerWidget *cover)
    +{
    +  coverWasHidden_ = cover->isHidden();
    +  coverPreviousZIndex_ = cover->zIndex();
    +  previousExposeConstraint_ = app->exposeConstraint();
    +}
    +
    +void WDialog::restoreCoverState(WApplication *app, WContainerWidget *cover)
    +{
    +  cover->setHidden(coverWasHidden_);
    +  cover->setZIndex(coverPreviousZIndex_);
    +  app->constrainExposed(previousExposeConstraint_);
    +}
    +
    +void WDialog::setHidden(bool hidden)
    +{
    +  if (isHidden() != hidden) {
    +    if (modal_) {
    +      WApplication *app = WApplication::instance();
    +      WContainerWidget *cover = app->dialogCover();
    +
    +      if (!cover)
    +	return; // when application is being destroyed
    +      
    +      if (!hidden) {
    +	saveCoverState(app, cover);
    +
    +	cover->show();
    +	cover->setZIndex(impl_->zIndex() - 1);
    +	app->constrainExposed(this);
    +
    +	// FIXME: this should only blur if the active element is outside
    +	// of the dialog
    +	app->doJavaScript
    +	  ("try {"
    +	   """if (document.activeElement && document.activeElement.blur)"
    +	   ""  "document.activeElement.blur();"
    +	   "} catch (e) { }");
    +      } else
    +	restoreCoverState(app, cover);
    +    }
    +  }
    +
    +  WCompositeWidget::setHidden(hidden);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WDllDefs.h b/wt-3.1.7a/src/Wt/WDllDefs.h
    new file mode 100644
    index 0000000..46a0a0d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDllDefs.h
    @@ -0,0 +1,72 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2006 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDLLDEFS_H_
    +#define WDLLDEFS_H_
    +
    +// For backward compatibility wrt the WT_VERSION define
    +#include <Wt/WConfig.h>
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WT_IMPORT __declspec(dllimport)
    +  #define WT_EXPORT __declspec(dllexport)
    +  #define WT_DLLLOCAL
    +  #define WT_DLLPUBLIC
    +#else
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WT_IMPORT __attribute__ ((visibility("default")))
    +    #define WT_EXPORT __attribute__ ((visibility("default")))
    +    #define WT_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WT_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WT_IMPORT
    +    #define WT_EXPORT
    +    #define WT_DLLLOCAL
    +    #define WT_DLLPUBLIC
    +  #endif
    +#endif
    +
    +// Define wt_EXPORTS for DLL builds
    +#ifdef WIN32
    +  #ifdef wt_EXPORTS
    +    #define WT_API WT_EXPORT
    +  #else
    +    #ifdef WT_STATIC
    +      #define WT_API
    +    #else
    +      #define WT_API WT_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WT_API
    +#endif
    +
    +#ifndef WT_TARGET_JAVA
    +#define WT_ARRAY
    +#define W_JAVA_COMPARATOR(type)
    +#define WT_USTRING WString
    +#define WT_LOCALE std::string 
    +#define WT_BOSTREAM std::ostream
    +#else
    +#define WT_ARRAY volatile
    +#define W_JAVA_COMPARATOR(type) : public Comparator<type>
    +#define WT_USTRING std::string
    +#define WT_LOCALE Locale 
    +#define WT_BOSTREAM std::bostream
    +#endif
    +
    +#ifdef _MSC_VER
    +typedef __int64 int64_t;            /* 64 bit signed */
    +typedef unsigned __int64 uint64_t;  /* 64 bit unsigned */
    +typedef __int32 int32_t;            /* 64 bit signed */
    +typedef unsigned __int32 uint32_t;  /* 32 bit unsigned */
    +#else // _MSC_VER
    +#include <stdint.h>
    +#endif // _MSC_VER
    +
    +#endif // DLLDEFS_H_
    diff --git a/wt-3.1.7a/src/Wt/WDoubleValidator b/wt-3.1.7a/src/Wt/WDoubleValidator
    new file mode 100644
    index 0000000..3d340b4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDoubleValidator
    @@ -0,0 +1,140 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDOUBLEVALIDATOR_H_
    +#define WDOUBLEVALIDATOR_H_
    +
    +#include <limits>
    +
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +/*! \class WDoubleValidator Wt/WDoubleValidator Wt/WDoubleValidator
    + *  \brief A validator for validating floating point user input.
    + *
    + * This validator checks whether user input is a double in the pre-defined
    + * range.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
    + * Wt::WDoubleValidator *validator = new Wt::WDoubleValidator();
    + * lineEdit->setValidator(validator);
    + * lineEdit->setText("13.42");
    + * \endcode
    + * \endif
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * Wt.WDoubleValidator.NotANumber: Must be a number
    + * Wt.WDoubleValidator.TooSmall: The number must be larger than {1}
    + * Wt.WDoubleValidator.BadRange: The number must be in the range {1} to {2}
    + * Wt.WDoubleValidator.TooLarge: The number must be smaller than {1}
    + */
    +class WT_API WDoubleValidator : public WValidator
    +{
    +public:
    +  /*! \brief Creates a new double validator that accepts any double.
    +   */
    +  WDoubleValidator(WObject *parent = 0);
    +
    +  /*! \brief Creates a new double validator that accepts double
    +   *         within the given range.
    +   */
    +  WDoubleValidator(double minimum, double maximum, WObject *parent = 0);
    +
    +  /*! \brief Returns the bottom of the valid double range.
    +   */
    +  double bottom() const { return bottom_; }
    +
    +  /*! \brief Sets the bottom of the valid double range.
    +   *
    +   * The default value is the minimum double value.
    +   */
    +  void setBottom(double bottom);
    +
    +  /*! \brief Returns the top of the valid double range.
    +   */
    +  double top() const { return top_; }
    +
    +  /*! \brief Sets the top of the valid double range.
    +   *
    +   * The default value is the maximum double value.
    +   */
    +  void setTop(double top);
    +
    +  /*! \brief Sets the range of valid doubles.
    +   */
    +  virtual void setRange(double bottom, double top);
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * The input is considered valid only when it is blank for a non-mandatory
    +   * field, or represents a double within the valid range.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +  /*! \brief Sets the message to display when the input is not a number.
    +   *
    +   * The default value is "Must be a number."
    +   */
    +  void setInvalidNotANumberText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input is not a number.
    +   *
    +   * \sa setInvalidNotANumberText(const WString&)
    +   */
    +  WString invalidNotANumberText() const;
    +
    +  /*! \brief Sets the message to display when the number is too small
    +   *
    +   * Depending on whether bottom() and top() are real bounds, the
    +   * default message is "The number must be between {1} and {2}" or
    +   * "The number must be larger than {1}".
    +   */
    +  void setInvalidTooSmallText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the number is too small.
    +   *
    +   * \sa setInvalidTooSmallText(const WString&)
    +   */
    +  WString invalidTooSmallText() const;
    +
    +  /*! \brief Sets the message to display when the number is too large
    +   *
    +   * Depending on whether bottom() and top() are real bounds, the
    +   * default message is "The number must be between {1} and {2}" or
    +   * "The number must be smaller than {2}".
    +   */
    +  void setInvalidTooLargeText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the number is too large.
    +   *
    +   * \sa setInvalidTooLargeText(const WString&)
    +   */
    +  WString invalidTooLargeText() const;
    +
    +protected:
    +  std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +private:
    +  double bottom_;
    +  double top_;
    +
    +  WString tooSmallText_;
    +  WString tooLargeText_;
    +  WString nanText_;
    +};
    +
    +}
    +
    +#endif // WDOUBLEVALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WDoubleValidator.C b/wt-3.1.7a/src/Wt/WDoubleValidator.C
    new file mode 100644
    index 0000000..20c71af
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WDoubleValidator.C
    @@ -0,0 +1,182 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WDoubleValidator"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WDoubleValidator::WDoubleValidator(WObject *parent)
    +  : WValidator(parent),
    +    bottom_(-std::numeric_limits<double>::max()),
    +    top_(std::numeric_limits<double>::max())
    +{ }
    +
    +WDoubleValidator::WDoubleValidator(double bottom, double top, WObject *parent)
    +  : WValidator(parent),
    +    bottom_(bottom),
    +    top_(top)
    +{ }
    +
    +void WDoubleValidator::setBottom(double bottom)
    +{
    +  if (bottom != bottom_) {
    +    bottom_ = bottom;
    +    repaint();
    +  }
    +}
    +
    +void WDoubleValidator::setTop(double top)
    +{
    +  if (top != top_) {
    +    top_ = top;
    +    repaint();
    +  }
    +}
    +
    +void WDoubleValidator::setRange(double bottom, double top)
    +{
    +  setBottom(bottom);
    +  setTop(top);
    +}
    +
    +void WDoubleValidator::setInvalidNotANumberText(const WString& text)
    +{
    +  nanText_ = text;
    +  repaint();
    +}
    +
    +WString WDoubleValidator::invalidNotANumberText() const
    +{
    +  if (!nanText_.empty())
    +    return nanText_;
    +  else
    +    return WString::tr("Wt.WDoubleValidator.NotANumber");
    +}
    +
    +void WDoubleValidator::setInvalidTooSmallText(const WString& text)
    +{
    +  tooSmallText_ = text;
    +  repaint();
    +}
    +
    +WString WDoubleValidator::invalidTooSmallText() const
    +{
    +  if (!tooSmallText_.empty()) {
    +    WString s = tooSmallText_;
    +    s.arg(bottom_).arg(top_);
    +    return s;
    +  } else
    +    if (bottom_ == -std::numeric_limits<double>::max())
    +      return WString();
    +    else
    +      if (top_ == std::numeric_limits<double>::max())
    +        return WString::tr("Wt.WDoubleValidator.TooSmall").arg(bottom_);
    +      else
    +        return WString::tr("Wt.WDoubleValidator.BadRange").
    +          arg(bottom_).arg(top_);
    +}
    +
    +void WDoubleValidator::setInvalidTooLargeText(const WString& text)
    +{
    +  tooLargeText_ = text;
    +  repaint();
    +}
    +
    +WString WDoubleValidator::invalidTooLargeText() const
    +{
    +  if (!tooLargeText_.empty()) {
    +    WString s = tooLargeText_;
    +    s.arg(bottom_).arg(top_);
    +    return s;
    +  } else
    +    if (top_ == std::numeric_limits<double>::max())
    +      return WString();
    +    else
    +      if (bottom_ == -std::numeric_limits<int>::max())
    +	return WString::tr("Wt.WDoubleValidator.TooLarge").arg(top_);
    +      else
    +	return WString::tr("Wt.WDoubleValidator.BadRange").
    +          arg(bottom_).arg(top_);
    +}
    +
    +
    +WValidator::State WDoubleValidator::validate(WT_USTRING& input) const
    +{
    +  std::string text = input.toUTF8();
    +
    +  if (isMandatory()) {
    +    if (text.empty())
    +      return InvalidEmpty;
    +  } else {
    +    if (text.empty())
    +      return Valid;
    +  }
    +
    +  try {
    +    double i = boost::lexical_cast<double>(text);
    +
    +    if ((i >= bottom_) && (i <= top_))
    +      return Valid;
    +    else
    +      return Invalid;
    +  } catch (boost::bad_lexical_cast& e) {
    +    return Invalid;
    +  }
    +}
    +
    +std::string WDoubleValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  std::string js = "function(e,te,tn,ts,tb){if(e.value.length==0)";
    +
    +  if (isMandatory())
    +    js += "return {valid:false,message:te};";
    +  else
    +    js += "return {valid:true};";
    +
    +  js += "var n=Number(e.value);"
    +    "if (isNaN(n)) return {valid:false,message:tn};";
    +
    +  if (bottom_ != -std::numeric_limits<double>::max())
    +    js += "if(n<" + boost::lexical_cast<std::string>(bottom_)
    +      + ") return {valid:false,message:ts};";
    +  if (top_ != std::numeric_limits<double>::max())
    +    js += "if(n>" + boost::lexical_cast<std::string>(top_)
    +      + ") return {valid:false,message:tb};";
    +
    +  js += "return {valid:true};}(" + jsRef + ','
    +    + invalidBlankText().jsStringLiteral() + ','
    +    + invalidNotANumberText().jsStringLiteral() + ','
    +    + invalidTooSmallText().jsStringLiteral() + ','
    +    + invalidTooLargeText().jsStringLiteral() + ')';
    +
    +  return js;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WDoubleValidator::createExtConfig(std::ostream& config) const
    +{
    +  if (bottom_ >= 0)
    +    config << ",allowNegative:false";
    +  if (bottom_ != -std::numeric_limits<double>::max())
    +    config << ",minValue:" << bottom_;
    +  if (top_ != std::numeric_limits<double>::max())
    +    config << ",maxValue:" << top_;
    +
    +  if (!tooSmallText_.empty())
    +    config << ",minText:" << tooSmallText_.jsStringLiteral();
    +  if (!tooLargeText_.empty())
    +    config << ",maxText:" << tooLargeText_.jsStringLiteral();
    +  if (!nanText_.empty())
    +    config << ",nanText:" << nanText_.jsStringLiteral();
    +
    +  WValidator::createExtConfig(config);
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WEnvironment b/wt-3.1.7a/src/Wt/WEnvironment
    new file mode 100644
    index 0000000..731b953
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WEnvironment
    @@ -0,0 +1,602 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WENVIRONMENT_H_
    +#define WENVIRONMENT_H_
    +
    +#include <string>
    +#include <map>
    +#include <vector>
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/Http/Request>
    +
    +namespace Wt {
    +
    +class WAbstractServer;
    +class WebRequest;
    +class WebSession;
    +
    +/*! \class WEnvironment Wt/WEnvironment Wt/WEnvironment
    + *  \brief A class that captures information on the application environment.
    + *
    + * The environment provides information on the client, and gives access
    + * to startup arguments.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * const WEnvironment& env = WApplication::instance()->environment();
    + *
    + * // read an application startup argument 
    + * // (passed as argument in the URL or POST'ed to the application).
    + * if (!env.getParameterValues("login").empty()) {
    + *   std::string login = env.getParameterValues("login")[0];
    + *   ...
    + * }
    + *
    + * // Check for JavaScript/AJAX availability before using AJAX-only
    + * // widgets
    + * Wt::WTextArea *textEdit;
    + * if (!env.ajax())
    + *   textEdit = new Wt::WTextEdit(); // provide an HTML text editor
    + * else
    + *   textEdit = new Wt::WTextArea(); // fall-back to a plain old text area.
    + *
    + * \endcode
    + * \elseif java
    + * \code
    + * WEnvironment env = WApplication.instance().environment();
    + *	 
    + * // read an application startup argument 
    + * // (passed as argument in the URL or POST'ed to the application).
    + * if (!env.getParameterValues("login").isEmpty()) {
    + * String login = env.getParameterValues("login").get(0);
    + * //...
    + * }
    + *	 
    + * // Check for JavaScript/AJAX availability before using JavaScript-only
    + * // widgets
    + *  WTextArea textEdit;
    + * if (!env.isAjax())
    + *   textEdit = new WTextEdit(); // provide an HTML text editor
    + * else
    + *   textEdit = new WTextArea(); // fall-back to a plain old text area.
    + * \endcode
    + * \endif
    + */
    +class WT_API WEnvironment
    +{
    +public:
    +  /*! \brief An enumeration type for specific user agent.
    +   *
    +   * \sa agent()
    +   */
    +  enum UserAgent {
    +    Unknown = 0,                //!< Unknown user agent
    +    IEMobile = 1000,            //!< Internet Explorer Mobile, or Internet Explorer 5 or older
    +    IE6 = 1001,                 //!< Internet Explorer 6
    +    IE7 = 1002,                 //!< Internet Explorer 7
    +    IE8 = 1003,                 //!< Internet Explorer 8
    +    IE9 = 1004,                 //!< Internet Explorer 9 or later
    +    Opera = 3000,               //!< Opera
    +    WebKit = 4000,              //!< WebKit
    +    Safari = 4100,              //!< Safari 2 or older
    +    Safari3 = 4103,             //!< Safari 3
    +    Safari4 = 4104,             //!< Safari 4 or later
    +    Chrome0 = 4200,             //!< Chrome 0
    +    Chrome1 = 4201,             //!< Chrome 1
    +    Chrome2 = 4202,             //!< Chrome 2
    +    Chrome3 = 4203,             //!< Chrome 3
    +    Chrome4 = 4204,             //!< Chrome 4
    +    Chrome5 = 4205,             //!< Chrome 5 or later
    +    Arora = 4300,               //!< Arora
    +    MobileWebKit = 4400,        //!< Mobile WebKit
    +    MobileWebKitiPhone = 4450,  //!< Mobile WebKit iPhone/iPad
    +    MobileWebKitAndroid = 4500, //!< Mobile WebKit Android
    +    Konqueror = 5000,           //!< Konqueror
    +    Gecko = 6000,               //!< Gecko
    +    Firefox = 6100,             //!< Firefox 2 or older
    +    Firefox3_0 = 6101,          //!< Firefox 3.0
    +    Firefox3_1 = 6102,          //!< Firefox 3.1
    +    Firefox3_1b = 6103,         //!< Firefox 3.1b
    +    Firefox3_5 = 6104,          //!< Firefox 3.5
    +    Firefox3_6 = 6105,          //!< Firefox 3.6 or later
    +    BotAgent = 10000            //!< Bot user agent
    +  };
    +
    +  /*! \brief Enumeration for HTML content type.
    +   */
    +  enum ContentType {
    +    XHTML1, //!< XHTML1.x
    +    HTML4   //!< HTML4
    +  }; 
    +
    +  /*! \brief Cookie map.
    +   *
    +   * A std::map which associates a cookie name with a cookie value.
    +   *
    +   * \sa cookies()
    +   */
    +  typedef std::map<std::string, std::string> CookieMap;
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Wt's JavaScript scope.
    +   */
    +  static std::string javaScriptWtScope() { return WT_CLASS; } 
    +#endif //WT_TARGET_JAVA
    +
    +  /*! \brief Parameters passed to the application.
    +   *
    +   * Arguments passed to the application, either in the URL for a
    +   * http GET, or in both the URL and data submitted in a http POST.
    +   *
    +   * \sa getParameterValues()
    +   */
    +  const Http::ParameterMap& getParameterMap() const { return parameters_; }
    +
    +  /*! \brief Returns values for a query parameter.
    +   *
    +   * Returns an empty list if the parameter was not defined.
    +   *
    +   * One or more values may be associated with a single argument.
    +   *
    +   * For example a %Wt application <tt>foo.wt</tt> started as
    +   * <tt>http://.../foo.wt?hello=Hello&hello=World</tt> will result in
    +   * both values <tt>"Hello"</tt> and <tt>"World"</tt> to be
    +   * associated with the argument <tt>"hello"</tt>.
    +   *
    +   * \sa getParameterMap()
    +   */
    +  const Http::ParameterValues& getParameterValues(const std::string& name)
    +    const;
    +
    +  /*! \brief Returns a single value for a query parameter.
    +   *
    +   * Returns the first value for a parameter, or \c 0 if the parameter is
    +   * not found.
    +   *
    +   * \sa getParameterValues()
    +   */
    +  const std::string *getParameter(const std::string& name) const;
    +
    +  /*! \brief Cookies set in the initial call to the application.
    +   *
    +   * Note that cookies set with WApplication::setCookie() are not made
    +   * available in the environment.
    +   *
    +   * Not all clients may support cookies or have cookies enabled.
    +   *
    +   * \sa supportsCookies(), getCookie()
    +   */
    +  const CookieMap& cookies() const { return cookies_; }
    +
    +  /*! \brief Checks for existence and returns specified argument.
    +   *
    +   * \if cpp
    +   * Throws a <tt>std::runtime_error("Missing cookie: ...")</tt> when
    +   * the cookie is missing, or returns cookie value otherwise.
    +   * \elseif java
    +   * Throws a <tt>RuntimeException("Missing cookie: ...")</tt> when
    +   * the cookie is missing, or returns cookie value otherwise.
    +   * \endif
    +   */
    +  const std::string getCookie(const std::string& cookieNname) const;
    +
    +  /*! \brief Returns a header value.
    +   *
    +   * Returns a header value, or an empty string if the header was 
    +   * present.
    +   *
    +   * \note Currently, the header name is case sensitive, although this should
    +   * not be the case according to RFC2616
    +   */
    +  const std::string headerValue(const std::string& field) const;
    +
    +  /*! \brief Returns whether the browser has enabled support for cookies.
    +   *
    +   * When the user disables cookies during the visit of the page, this
    +   * value is not updated.
    +   *
    +   * \sa cookies(), getCookie()
    +   */
    +  bool supportsCookies() const { return doesCookies_; }
    +
    +  /*! \brief Returns whether the browser has enabled support for JavaScript.
    +   *
    +   * This is the same as ajax(): %Wt only considers using JavaScript
    +   * when it has detected AJAX support.
    +   *
    +   * \sa ajax()
    +   */
    +  bool javaScript() const { return doesAjax_; }
    +
    +  /*! \brief Returns whether the browser has enabled support for AJAX.
    +   *
    +   * Without support for JavaScript/AJAX, %Wt will still be able to
    +   * serve the application, but with one considerable limitation: only
    +   * the WTimer::timeout(), WInteractWidget::clicked(),
    +   * WApplication::internalPathChanged(), and WAbstractArea::clicked()
    +   * signals (and any derived signals) will generate events.
    +   *
    +   * Every event will cause the complete page to be rerendered.
    +   *
    +   * \sa javaScript()
    +   */
    +  bool ajax() const { return doesAjax_; }
    +
    +  /*! \brief Returns the browser-side DPI scaling factor
    +   *
    +   * Internet Explorer scales all graphics, fonts and other elements
    +   * on high-density screens to make them readable. This is controlled
    +   * by the DPI setting of the display. If all goes well, you do not
    +   * have to worry about this scaling factor. Unfortunately, not
    +   * all elements are scaled appropriately. The scaling factor is
    +   * supposed to be used only internally in %Wt and is in this interface
    +   * for informational purposes.
    +   *
    +   * \sa WVmlImage
    +   */
    +  double dpiScale() const { return dpiScale_; }
    +
    +  /*! \brief Returns the preferred language indicated in the request
    +   *         header.
    +   *
    +   * The language is parsed from the HTTP <tt>Accept-Language</tt>
    +   * field, if present. If not, the locale is empty.
    +   *
    +   * If multiple languages are present, the one with the highest
    +   * "q"uality is assumed, and if a tie is present, the first one
    +   * is taken.
    +   *
    +   * \sa WApplication::setLocale()
    +   */
    +  const WT_LOCALE& locale() const { return locale_; }
    +
    +  /*! \brief Returns the server host name that is used by the client.
    +   *
    +   * The hostname is the unresolved host name with optional port number,
    +   * which the browser used to connect to the application.
    +   *
    +   * Examples:
    +   *   - <tt>www.mydomain.com</tt>
    +   *   - <tt>localhost:8080</tt>
    +   *
    +   * For HTTP 1.1 requests, this information is fetched from the HTTP
    +   * <tt>Host</tt> header. If %Wt is configured behind a reverse
    +   * proxy, then the last entry in the HTTP <tt>X-Forwarded-Host</tt>
    +   * header field is used instead (to infer the name of the reverse
    +   * proxy instead).
    +   *
    +   * For HTTP 1.0 requests, the HTTP <tt>Host</tt> header is not
    +   * required. When not present, the server host name is inferred from
    +   * the configured server name, which defaults to the DNS name.
    +   */
    +  const std::string& hostName() const { return host_; }
    +
    +  /*! \brief Returns the URL scheme used for the current request
    +   * (<tt>"http"</tt> or <tt>"https"</tt>).
    +   */
    +  const std::string& urlScheme() const { return urlScheme_; }
    +
    +  /*! \brief Returns the user agent.
    +   *
    +   * The user agent, as reported in the HTTP <tt>User-Agent</tt> field.
    +   *
    +   * \sa agent()
    +   */
    +  const std::string& userAgent() const { return userAgent_; }
    +
    +  /*! \brief Returns the referer.
    +   *
    +   * The referer, as reported in the HTTP <tt>Referer</tt> field.
    +   */
    +  const std::string& referer() const { return referer_; }
    +
    +  /*! \brief Returns the accept header.
    +   *
    +   * The accept header, as reported in the HTTP <tt>Accept</tt> field.
    +   */
    +  const std::string& accept() const { return accept_; }
    +
    +  /*! \brief Returns if the user agent is a (known) indexing spider bot.
    +   *
    +   * Note: currently the list of know bots is quite small. This method
    +   * is used internally to render the web application for optimal
    +   * indexing by bots:
    +   * - there is no detection for JavaScript, instead the application is
    +   *   directly served assuming no JavaScript support.
    +   * - session information is omitted from the Urls.
    +   * - no sessions are created (they are immediately stopped after the request
    +   *   has been handled).
    +   * - auto-generated <tt>id</tt> and <tt>name</tt> attributes are omitted
    +   *   from DOM nodes. In this way, the generated page is always exactly the
    +   *   same.
    +   */
    +  bool agentIsSpiderBot() const { return agent_ == BotAgent; }
    +
    +  /*! \brief Returns the web server signature.
    +   *
    +   * The value of the CGI variable <tt>SERVER_SIGNATURE</tt>.
    +   *
    +   * Example: <tt>&lt;address&gt;Apache Server at localhost Port 80&lt;/address&gt;</tt>.
    +   */
    +  const std::string& serverSignature() const { return serverSignature_; }
    +
    +  /*! \brief Returns the web server software.
    +   *
    +   * The value of the CGI variable <tt>SERVER_SOFTWARE</tt>.
    +   *
    +   * Example: <tt>"Apache"</tt>
    +   */
    +  const std::string& serverSoftware() const { return serverSoftware_; }
    +
    +  /*! \brief Returns the email address of the server admin.
    +   *
    +   * The value of the CGI variable <tt>SERVER_ADMIN</tt>.
    +   *
    +   * Example: <tt>"root@localhost"</tt>
    +   */
    +  const std::string& serverAdmin() const { return serverAdmin_; }
    +
    +  /*! \brief Returns the IP address of the client.
    +   *
    +   * The (most likely) IP address of the client that is connected to
    +   * this session.
    +   *
    +   * This is taken to be the first public address that is given in the
    +   * Client-IP header, or in the X-Forwarded-For header (in case the
    +   * client is behind a proxy). If none of these headers is present,
    +   * the remote socket IP address is used. 
    +   */
    +  const std::string& clientAddress() const { return clientAddress_; }
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Returns the path info of the original request (<b>deprecated</b>)
    +   *
    +   * \deprecated Use internalPath() instead, which is consistent with the
    +   *             internal paths generated by %Wt.
    +   *
    +   * This is the equivalent of the CGI PATH_INFO environment variable.
    +   *
    +   * Assume for example that the application was deployed at
    +   * <tt>"stuff/app.wt"</tt>. When the user accesses the application
    +   * using the URL
    +   * <tt>"http://www.mydomain.com/stuff/app.wt"</tt>, this
    +   * method would return an empty string (<tt>""</tt>). When the user
    +   * accesses the site using
    +   * <tt>"http://www.mydomain.com/stuff/app.wt/this/there"</tt>, the
    +   * result would be <tt>"/this/there"</tt>.
    +   *
    +   * Together with getParameter(), this allows you to supply the
    +   * application with initial information.
    +   *
    +   * \sa getParameter(), internalPath()
    +   */
    +  const std::string& pathInfo() const { return pathInfo_; }
    +#endif // WT_DEPRECATED_3_0_0
    +
    +  /*! \brief Returns the initial internal path.
    +   *
    +   * This is the internal path with which the application was started.
    +   *
    +   * For an application deployed at <tt>"/stuff/app.wt"</tt>, the following
    +   * three URLs are considered equivalent, and indicate an internal path 
    +   * <tt>"/this/there"</tt>:
    +   * \code
    +   * http://www.mydomain.com/stuff/app.wt/this/there
    +   * http://www.mydomain.com/stuff/app.wt#/this/there
    +   * http://www.mydomain.com/stuff/app.wt?_=/this/there
    +   * \endcode
    +   *
    +   * The last form is generated by %Wt when the application ends with a
    +   * '/', as an alternative to the first form, which is then
    +   * impossible.
    +   *
    +   * \sa WApplication::setInternalPath(), deploymentPath()
    +   */
    +  const std::string& internalPath() const { return internalPath_; }
    +
    +  /*! \brief Returns the deployment path.
    +   *
    +   * This is the path at which the application is deployed.
    +   *
    +   * \sa internalPath().
    +   */
    +  const std::string& deploymentPath() const;
    +
    +  /*! \brief Returns the version of the %Wt library.
    +   *
    +   * Example: <tt>"1.99.2"</tt>
    +   */
    +  static std::string libraryVersion();
    +
    +  /*! \brief Returns the version of the %Wt library, broken down.
    +   *
    +   * The version of the %Wt library, broken down in its three numbers,
    +   *
    +   * Example: <i>series</i> = 1, <i>major</i> = 99, \p minor = 2.
    +   */
    +  void libraryVersion(int& series, int& major, int& minor) const;
    +
    +  /*! \brief Returns the %Wt session id.
    +   *
    +   * Retrieves the session id for this session. This is an
    +   * auto-generated random alpha-numerical id, whose length is
    +   * determined by settings in the configuration file.
    +   */
    +  std::string sessionId() const;
    +
    +  /*! \brief Returns a raw CGI environment variable.
    +   *
    +   * Retrieves the value for the given CGI environment variable (like
    +   * <tt>"SSL_CLIENT_S_DN_CN"</tt>), if it is defined, otherwise an
    +   * empty string.
    +   *
    +   * \sa serverSignature(), serverSoftware(), serverAdmin(),
    +   */
    +  std::string getCgiValue(const std::string& varName) const;
    +
    +  /*! \brief The type of the content provided to the browser.
    +   *
    +   * This is determined by listening to the capabilities of the browser.
    +   * Xhtml1 is chosen only if the browser reports support for it, and it is
    +   * allowed in the configuration file (wt_config.xml).
    +   *
    +   * Note that %Wt makes also use of common non-standard techniques implemented
    +   * in every major browser.
    +   */
    +  ContentType contentType() const { return contentType_; }
    +
    +  /*! \brief Returns the user agent type.
    +   *
    +   * This returns an interpretation of the userAgent(). It should be
    +   * used only for user-agent specific work-arounds (as a last
    +   * resort).
    +   *
    +   * \sa agentIsIE(), agentIsOpera(), agentIsGecko(), agentIsChrome(),
    +   *     agentIsSafari(), agentIsWebKit()
    +   */
    +  UserAgent agent() const { return agent_; }
    +
    +  /*! \brief Returns whether the user agent is Microsoft Internet Explorer.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsIE() const {
    +    return agent_ >= IEMobile && agent_ < Opera;
    +  }
    +
    +  /*! \brief Returns whether the user agent is an older version of IE
    +   *
    +   * Returns whether the agent is an IE version older than the given version.
    +
    +   * \sa agentIsIE()
    +   */
    +  bool agentIsIElt(int version) const {
    +    if (agentIsIE())
    +      return agent_ < IEMobile + (version - 5);
    +    else
    +      return false;
    +  }
    +
    +  /*! \brief Returns whether the user agent is Internet Explorer Mobile.
    +   *
    +   * Returns also \c true when the agent is Internet Explorer 5 or older.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsIEMobile() const {
    +    return agent_ == IEMobile;
    +  }
    +
    +  /*! \brief Returns whether the user agent is Opera.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsOpera() const {
    +    return agent_ >= Opera && agent_ < Safari;
    +  }
    +
    +  /*! \brief Returns whether the user agent is WebKit-based.
    +   *
    +   * Webkit-based browsers include Safari, Chrome, Arora and Konquerer
    +   * browsers.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsWebKit() const {
    +    return agent_ >= WebKit && agent_ < Konqueror;
    +  }
    +
    +   /*! \brief Returns whether the user agent is Mobile WebKit-based.
    +   *
    +   * Mobile Webkit-based browsers include the Android Mobile WebKit
    +   * and the iPhone Mobile WebKit browsers.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsMobileWebKit() const {
    +    return agent_ >= MobileWebKit && agent_ < Konqueror;
    +  }
    +
    +  /*! \brief Returns whether the user agent is Safari.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsSafari() const {
    +    return agent_ >= Safari && agent_ < Chrome0;
    +  }
    +
    +  /*! \brief Returns whether the user agent is Chrome.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsChrome() const {
    +    return agent_ >= Chrome0 && agent_ < Konqueror;
    +  }
    +  
    +  /*! \brief Returns whether the user agent is Gecko-based.
    +   *
    +   * Gecko-based browsers include Firefox.
    +   *
    +   * \sa agent()
    +   */
    +  bool agentIsGecko() const {
    +    return agent_ >= Gecko && agent_ < BotAgent;
    +  }
    +
    +#ifndef WT_TARGET_JAVA
    +  /** \brief Returns the server.
    +   */
    +  WAbstractServer *server() const;
    +#endif // WT_TARGET_JAVA
    +
    +protected:
    +  WebSession *session_;
    +  bool        doesAjax_;
    +  bool        doesCookies_;
    +  UserAgent   agent_;
    +  double      dpiScale_;
    +  ContentType contentType_;
    +
    +  Http::ParameterMap parameters_;
    +  CookieMap   cookies_;
    +
    +  WT_LOCALE locale_;
    +  std::string host_;
    +  std::string userAgent_;
    +  std::string urlScheme_;
    +  std::string referer_;
    +  std::string accept_;
    +  std::string serverSignature_;
    +  std::string serverSoftware_;
    +  std::string serverAdmin_;
    +  std::string clientAddress_;
    +  std::string pathInfo_;
    +  std::string internalPath_;
    +
    +  WEnvironment();
    +  void setUserAgent(const std::string& agent);
    +  void setInternalPath(const std::string& path);
    + 
    +private:
    +  WEnvironment(WebSession *session);
    +
    +  void init(const WebRequest& request);
    +
    +  std::string parsePreferredAcceptValue(const std::string& value);
    +  void        parseCookies(const std::string& value);
    +  bool        agentSupportsAjax() const;
    +
    +  friend class WebController;
    +  friend class WebSession;
    +  friend class WApplication;
    +};
    +
    +}
    +
    +#endif // WENVIRONMENT_H_
    diff --git a/wt-3.1.7a/src/Wt/WEnvironment.C b/wt-3.1.7a/src/Wt/WEnvironment.C
    new file mode 100644
    index 0000000..20f1c59
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WEnvironment.C
    @@ -0,0 +1,360 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLogger"
    +#include "Wt/WRegExp"
    +
    +#include "WebRequest.h"
    +#include "WebSession.h"
    +#include "WebController.h"
    +#include "Configuration.h"
    +#include "Utils.h"
    +
    +#include <stdexcept>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +#include <assert.h>
    +
    +namespace Wt {
    +
    +  namespace {
    +    bool regexMatchAny(const std::string& agent,
    +		       const std::vector<std::string>& regexList) {
    +      WT_USTRING s = WT_USTRING::fromUTF8(agent);
    +      for (unsigned i = 0; i < regexList.size(); ++i) {
    +	WRegExp expr(WT_USTRING::fromUTF8(regexList[i]));
    +
    +	if (expr.exactMatch(s))
    +	  return true;
    +      }
    +
    +      return false;
    +    }
    +  }
    +
    +WEnvironment::WEnvironment()
    +{ }
    +
    +WEnvironment::WEnvironment(WebSession *session)
    +  : session_(session),
    +    doesAjax_(false),
    +    doesCookies_(false),
    +    dpiScale_(1),
    +    contentType_(HTML4)
    +{ }
    +
    +void WEnvironment::setInternalPath(const std::string& path)
    +{
    +  internalPath_ = path.empty() ? "/" : path;
    +
    +#ifndef WT_TARGET_JAVA
    +  // emulate historyKey argument for < Wt-2.2
    +  if (!path.empty()) {
    +    Http::ParameterValues v;
    +    v.push_back(internalPath_);
    +    parameters_["historyKey"] = v;
    +  }
    +#endif // WT_TARGET_JAVA
    +}
    +
    +const std::string& WEnvironment::deploymentPath() const
    +{
    +  return session_->deploymentPath();
    +}
    +
    +void WEnvironment::init(const WebRequest& request)
    +{
    +  Configuration& conf = session_->controller()->configuration();
    +
    +  parameters_ = request.getParameterMap();
    +
    +  urlScheme_       = request.urlScheme();
    +  referer_         = request.headerValue("Referer");
    +  accept_          = request.headerValue("Accept");
    +  serverSignature_ = request.envValue("SERVER_SIGNATURE");
    +  serverSoftware_  = request.envValue("SERVER_SOFTWARE");
    +  serverAdmin_     = request.envValue("SERVER_ADMIN");
    +  pathInfo_        = request.pathInfo();
    +
    +  setUserAgent(request.headerValue("User-Agent"));
    +
    +  std::cerr << userAgent_ << std::endl;
    +
    +  /*
    +   * Determine server host name
    +   */
    +  if (conf.behindReverseProxy()) {
    +    /*
    +     * Take the last entry in X-Forwarded-Host, assuming that we are only
    +     * behind 1 proxy
    +     */
    +    std::string forwardedHost = request.headerValue("X-Forwarded-Host");
    +
    +    if (!forwardedHost.empty()) {
    +      std::string::size_type i = forwardedHost.rfind(',');
    +      if (i == std::string::npos)
    +	host_ = forwardedHost;
    +      else
    +	host_ = forwardedHost.substr(i+1);
    +    } else
    +      host_ = request.headerValue("Host");
    +  } else
    +    host_ = request.headerValue("Host");
    +
    +  if (host_.empty()) {
    +    /*
    +     * HTTP 1.0 doesn't require it: guess from config
    +     */
    +    host_ = request.serverName();
    +    if (!request.serverPort().empty())
    +      host_ += ":" + request.serverPort();
    +  }
    +
    +  /*
    +   * Determine client address, taking into account proxies
    +   */
    +  std::string ips;
    +  ips = request.headerValue("Client-IP") + ","
    +    + request.headerValue("X-Forwarded-For");
    +
    +  for (std::string::size_type pos = 0; pos != std::string::npos;) {
    +    std::string::size_type komma_pos = ips.find(',', pos);
    +    clientAddress_ = ips.substr(pos, komma_pos);
    +
    +    boost::trim(clientAddress_);
    +
    +    if (!boost::starts_with(clientAddress_, "10.")
    +	&& !boost::starts_with(clientAddress_, "172.16.")
    +	&& !boost::starts_with(clientAddress_, "192.168.")) {
    +      break;
    +    }
    +
    +    if (komma_pos != std::string::npos)
    +      pos = komma_pos + 1;
    +  }
    +
    +  if (clientAddress_.empty())
    +    clientAddress_ = request.envValue("REMOTE_ADDR");
    +
    +  std::string cookie = request.headerValue("Cookie");
    +  doesCookies_ = !cookie.empty();
    +
    +  if (doesCookies_)
    +    parseCookies(cookie);
    +
    +  locale_ = request.parseLocale();
    +
    +  /*
    +   * checked=\"checked\" seems not to work with IE9 XHTML mode
    +   */
    +  if (session_->controller()->configuration().sendXHTMLMimeType()
    +      && (accept_.find("application/xhtml+xml") != std::string::npos)
    +      && !agentIsIE())
    +    contentType_ = XHTML1;
    +}
    +
    +void WEnvironment::setUserAgent(const std::string& userAgent)
    +{
    +  userAgent_ = userAgent;
    +
    +  Configuration& conf = session_->controller()->configuration();
    +
    +  agent_ = Unknown;
    +
    +  if (userAgent_.find("MSIE 2") != std::string::npos
    +      || userAgent_.find("MSIE 3") != std::string::npos
    +      || userAgent_.find("MSIE 4") != std::string::npos
    +      || userAgent_.find("MSIE 5") != std::string::npos
    +      || userAgent_.find("IEMobile") != std::string::npos)
    +    agent_ = IEMobile;
    +  else if (userAgent_.find("MSIE 6") != std::string::npos)
    +    agent_ = IE6;
    +  else if (userAgent_.find("MSIE 7") != std::string::npos)
    +    agent_ = IE7;
    +  else if (userAgent_.find("MSIE 8") != std::string::npos)
    +    agent_ = IE8;
    +  else if (userAgent_.find("MSIE") != std::string::npos)
    +    agent_ = IE9;
    +
    +  if (userAgent_.find("Opera") != std::string::npos)
    +    agent_ = Opera;
    +
    +  if (userAgent_.find("Chrome") != std::string::npos) {
    +    if (userAgent_.find("Chrome/0") != std::string::npos)
    +      agent_ = Chrome0;
    +    else if (userAgent_.find("Chrome/1") != std::string::npos)
    +      agent_ = Chrome1;
    +    else if (userAgent_.find("Chrome/2") != std::string::npos)
    +      agent_ = Chrome2;
    +    else if (userAgent_.find("Chrome/3") != std::string::npos)
    +      agent_ = Chrome3;
    +    else if (userAgent_.find("Chrome/4") != std::string::npos)
    +      agent_ = Chrome4;
    +    else
    +      agent_ = Chrome5;
    +  } else if (userAgent_.find("Safari") != std::string::npos) {
    +    if (userAgent_.find("iPhone") != std::string::npos
    +	|| userAgent_.find("iPad") != std::string::npos) {
    +      agent_ = MobileWebKitiPhone;
    +    } else if (userAgent_.find("Android") != std::string::npos) {
    +      agent_ = MobileWebKitAndroid;
    +    } else if (userAgent_.find("Mobile") != std::string::npos) {
    +      agent_ = MobileWebKit;
    +    } else if (userAgent_.find("Version") == std::string::npos) {
    +      if (userAgent_.find("Arora") != std::string::npos)
    +	agent_ = Arora;
    +      else
    +	agent_ = Safari;
    +    } else if (userAgent_.find("Version/3") != std::string::npos)
    +      agent_ = Safari3;
    +    else
    +      agent_ = Safari4;
    +  } else if (userAgent_.find("WebKit") != std::string::npos) {
    +    if (userAgent_.find("iPhone") != std::string::npos)
    +      agent_ = MobileWebKitiPhone;
    +    else
    +      agent_ = WebKit;
    +  } else if (userAgent_.find("Konqueror") != std::string::npos)
    +    agent_ = Konqueror;
    +  else if (userAgent_.find("Gecko") != std::string::npos)
    +    agent_ = Gecko;
    +
    +  if (userAgent_.find("Firefox") != std::string::npos) {
    +    if (userAgent_.find("Firefox/0") != std::string::npos)
    +      agent_ = Firefox;
    +    else if (userAgent_.find("Firefox/1") != std::string::npos)
    +      agent_ = Firefox;
    +    else if (userAgent_.find("Firefox/2") != std::string::npos)
    +      agent_ = Firefox;
    +    else {
    +      if (userAgent_.find("Firefox/3.0") != std::string::npos)
    +	agent_ = Firefox3_0;
    +      else if (userAgent_.find("Firefox/3.1") != std::string::npos)
    +	agent_ = Firefox3_1;
    +      else if (userAgent_.find("Firefox/3.1b") != std::string::npos)
    +	agent_ = Firefox3_1b;
    +      else if (userAgent_.find("Firefox/3.5") != std::string::npos)
    +	agent_ = Firefox3_5;
    +      else
    +	agent_ = Firefox3_6;
    +    }
    +  }
    +
    +  if (regexMatchAny(userAgent_, conf.botList()))
    +    agent_ = BotAgent;
    +}
    +
    +bool WEnvironment::agentSupportsAjax() const
    +{
    +  Configuration& conf = session_->controller()->configuration();
    +
    +  bool matches = regexMatchAny(userAgent_, conf.ajaxAgentList());
    +  if (conf.ajaxAgentWhiteList())
    +    return matches;
    +  else
    +    return !matches;
    +}
    +
    +std::string WEnvironment::libraryVersion()
    +{
    +  return WT_VERSION_STR;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WEnvironment::libraryVersion(int& series, int& major, int& minor) const
    +{
    +  series = WT_SERIES;
    +  major = WT_MAJOR;
    +  minor = WT_MINOR;
    +}
    +#endif //WT_TARGET_JAVA
    +
    +std::string WEnvironment::sessionId() const
    +{
    +  return session_->sessionId();
    +}
    +
    +const Http::ParameterValues&
    +WEnvironment::getParameterValues(const std::string& name) const
    +{
    +  Http::ParameterMap::const_iterator i = parameters_.find(name);
    +
    +  if (i != parameters_.end())
    +    return i->second;
    +  else
    +    return WebRequest::emptyValues_;
    +}
    +
    +const std::string *WEnvironment::getParameter(const std::string& name) const
    +{
    +  const Http::ParameterValues& values = getParameterValues(name);
    +  if (!Utils::isEmpty(values))
    +    return &values[0];
    +  else
    +    return 0;
    +}
    +
    +const std::string WEnvironment::getCookie(const std::string& cookieNname) const
    +{
    +  CookieMap::const_iterator i = cookies_.find(cookieNname);
    +
    +  if (i == cookies_.end())
    +    throw std::runtime_error("Missing cookie: " + cookieNname);
    +  else
    +    return i->second;
    +}
    +
    +const std::string WEnvironment::headerValue(const std::string& name) const
    +{
    +  return session_->getCgiHeader(name);
    +}
    +
    +std::string WEnvironment::getCgiValue(const std::string& varName) const
    +{
    +  return session_->getCgiValue(varName);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WAbstractServer *WEnvironment::server() const
    +{
    +  return session_->controller()->server_;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WEnvironment::parseCookies(const std::string& str)
    +{
    +  // Cookie parsing strategy:
    +  // - First, split the string on cookie separators (-> name-value pair).
    +  //   ';' is cookie separator. ',' is not a cookie separator (as in PHP)
    +  // - Then, split the name-value pairs on the first '='
    +  // - URL decoding/encoding
    +  // - Trim the name, trim the value
    +  // - If a name-value pair does not contain an '=', the name-value pair
    +  //   was the name of the cookie and the value is empty
    +
    +  std::vector<std::string> cookies;
    +  boost::split(cookies, str, boost::is_any_of(";"));
    +  for (unsigned int i = 0; i < cookies.size(); ++i) {
    +    std::string::size_type e = cookies[i].find('=');
    +    std::string cookieName = cookies[i].substr(0, e);
    +    std::string cookieValue =
    +      (e != std::string::npos && cookies[i].size() > e + 1) ?
    +        cookies[i].substr(e + 1) : "";
    +
    +    boost::trim(cookieName);
    +    boost::trim(cookieValue);
    +
    +    Wt::Utils::urlDecode(cookieName);
    +    Wt::Utils::urlDecode(cookieValue);
    +    if (cookieName != "") {
    +      cookies_[cookieName] = cookieValue;
    +    }
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WEvent b/wt-3.1.7a/src/Wt/WEvent
    new file mode 100644
    index 0000000..f188d76
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WEvent
    @@ -0,0 +1,568 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEVENT_H_
    +#define WEVENT_H_
    +
    +#include <Wt/WGlobal>
    +#include <string>
    +#include <vector>
    +
    +namespace Wt {
    +
    +  /*! \brief A coordinate.
    +   */
    +  struct Coordinates {
    +    int x; //!< X coordinate
    +    int y; //!< Y coordinate
    +
    +    operator WPointF() const;
    +
    +    /*! \brief Constructor.
    +     */
    +    Coordinates(int X, int Y) : x(X), y(Y) { }
    +  };
    +
    +  /*! \brief A single finger touch of a touch event.
    +   *
    +   * \sa WTouchEvent
    +   */
    +  class Touch {
    +  public:
    +    /*! \brief Constructor.
    +     */
    +    Touch(int identifier,
    +	  int clientX, int clientY,
    +	  int documentX, int documentY,
    +	  int screenX, int screenY,
    +	  int widgetX, int widgetY);
    +
    +    /*! \brief Returns the touch position relative to the document.
    +     */
    +    Coordinates document() const { return Coordinates(documentX_, documentY_); }
    +    
    +    /*! \brief Returns the touch position relative to the window.
    +     *
    +     * This differs from document() only when scrolling through
    +     * the document.
    +     */
    +    Coordinates window() const { return Coordinates(clientX_, clientY_); }
    +
    +    /*! \brief Returns the touch position relative to the screen.
    +     */
    +    Coordinates screen() const { return Coordinates(screenX_, screenY_); }
    +
    +    /*! \brief Returns the touch position relative to the widget.
    +     */
    +    Coordinates widget() const { return Coordinates(widgetX_, widgetY_); }
    +
    +  private:
    +    int clientX_, clientY_;
    +    int documentX_, documentY_;
    +    int screenX_, screenY_;
    +    int widgetX_, widgetY_;
    +    int identifier_;
    +  };
    +
    +class WebRequest;
    +class WObject;
    +class WString;
    +
    +template<class E> class EventSignal;
    +
    +class WT_API JavaScriptEvent {
    +public:
    +  // for mouse events:
    +  int clientX, clientY;
    +  int documentX, documentY;
    +  int screenX, screenY;
    +  int widgetX, widgetY;
    +  int dragDX, dragDY;
    +  int wheelDelta; 
    +
    +  // for key events or mouse event modifiers
    +  int button;
    +  int keyCode, charCode;
    +  WFlags<KeyboardModifier> modifiers;
    +
    +  // for touch events
    +  std::vector<Touch> touches, targetTouches, changedTouches;
    +
    +  // for gesture events
    +  double scale, rotation;
    +
    +  // for scroll events
    +  int  scrollX, scrollY, viewportWidth, viewportHeight;
    +
    +  // event type
    +  std::string type;
    +
    +  // target id
    +  std::string tid;
    +
    +  std::string response;
    +
    +  std::vector<std::string> userEventArgs;
    +
    +  void get(const WebRequest& request, const std::string& se);
    +
    +  JavaScriptEvent();
    +};
    +
    +#ifdef WT_TARGET_JAVA
    +/*! \class WAbstractEvent Wt/WEvent Wt/WEvent
    + *  \brief Internal class WAbstractEvent.
    + */
    +class WAbstractEvent
    +{
    +public:
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent) = 0;
    +};
    +#endif // WT_TARGET_JAVA
    +
    +/*! \class WMouseEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a mouse event.
    + *
    + * \sa WInteractWidget::clicked(), WInteractWidget::doubleClicked(),
    + *     WInteractWidget::mouseWentDown(), WInteractWidget::mouseWentUp(),
    + *     WInteractWidget::mouseWentOver(), WInteractWidget::mouseMoved()
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WMouseEvent
    +#ifdef WT_TARGET_JAVA
    +                         : public WAbstractEvent
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Default constructor
    +   */
    +  WMouseEvent();
    +
    +  /*! \brief Enumeration for the mouse button.
    +   */
    +  enum Button { NoButton = 0,      //!< No button
    +		LeftButton = 1,    //!< Left button
    +		MiddleButton = 2,  //!< Middle button
    +		RightButton = 4    //!< Right button
    +  };
    +
    +  /*! \brief Mouse coordinates.
    +   */
    +  typedef Wt::Coordinates Coordinates;
    +
    +  /*! \brief Returns the button.
    +   *
    +   * If multiple buttons are currently pressed for a mouse moved or
    +   * mouse dragged event, then the one with the smallest numerical value
    +   * is returned.
    +   */
    +  Button button() const { return (Button)jsEvent_.button; }
    +
    +  /*! \brief Returns keyboard modifiers.
    +   *
    +   * The result is a logical OR of \link Wt::KeyboardModifier
    +   * KeyboardModifier\endlink flags.
    +   */
    +  WFlags<KeyboardModifier> modifiers() const { return jsEvent_.modifiers; }
    +
    +  /*! \brief Returns the mouse position relative to the document.
    +   */
    +  Coordinates document() const
    +  { return Coordinates(jsEvent_.documentX, jsEvent_.documentY); }
    +
    +  /*! \brief Returns the mouse position relative to the window.
    +   *
    +   * This differs from documentX() only through scrolling
    +   * through the document.
    +   */
    +  Coordinates window() const
    +  { return Coordinates(jsEvent_.clientX, jsEvent_.clientY); }
    +
    +  /*! \brief Returns the mouse position relative to the screen.
    +   */
    +  Coordinates screen() const
    +  { return Coordinates(jsEvent_.screenX, jsEvent_.screenY); }
    +
    +  /*! \brief Returns the mouse position relative to the widget.
    +   */
    +  Coordinates widget() const
    +  { return Coordinates(jsEvent_.widgetX, jsEvent_.widgetY); }
    +
    +  /*! \brief Returns the distance over which the mouse has been dragged.
    +   *
    +   * This is only defined for a WInteractWidget::mouseWentUp() event.
    +   */
    +  Coordinates dragDelta() const
    +  { return Coordinates(jsEvent_.dragDX, jsEvent_.dragDY); }
    +
    +  /*! \brief Returns the scroll wheel delta.
    +   *
    +   * This is 1 when wheel was scrolled up or -1 when wheel was scrolled down.
    +   *
    +   * This is only defined for a WInteractWidget::mouseWheel() event.
    +   */
    +  int wheelDelta() const { return jsEvent_.wheelDelta; }
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Returns whether the alt key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool altKey() const { return (jsEvent_.modifiers & AltModifier) != 0; }
    +
    +  /*! \brief Returns whether the meta key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool metaKey() const { return (jsEvent_.modifiers & MetaModifier) != 0; }
    +
    +  /*! \brief Returns whether the control key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool ctrlKey() const { return (jsEvent_.modifiers & ControlModifier) != 0; }
    +
    +  /*! \brief Returns whether the shift key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool shiftKey() const { return (jsEvent_.modifiers & ShiftModifier) != 0; }
    +#endif // WT_DEPRECATED_3_0_0
    +
    +#ifdef WT_TARGET_JAVA
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent)
    +  {
    +    return new WMouseEvent(jsEvent);
    +  }
    +
    +  static WMouseEvent templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +  WMouseEvent(const JavaScriptEvent& jsEvent);
    +
    +protected:
    +  JavaScriptEvent jsEvent_;
    +};
    +
    +/*! \class WKeyEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a keyboard event.
    + *
    + * A key event is associated with the WInteractWidget::keyWentDown(),
    + * WInteractWidget::keyWentUp() and WInteractWidget::keyPressed()
    + * signals.
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WKeyEvent
    +#ifdef WT_TARGET_JAVA
    +                         : public WAbstractEvent
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Default constructor
    +   */
    +  WKeyEvent();
    +
    +  /*! \brief Returns the key code key that was pressed or released.
    +   *
    +   * The key code corresponds to the actual key on the keyboard,
    +   * rather than the generated character.
    +   *
    +   * All three types of key events provide this information.
    +   *
    +   * \sa modifiers(), charCode()
    +   */
    +  Key key() const;
    +
    +  /*! \brief Returns keyboard modifiers.
    +   *
    +   * The result is a logical OR of \link Wt::KeyboardModifier
    +   * KeyboardModifier\endlink flags.
    +   *
    +   * All three types of key events provide this information.
    +   *
    +   * \sa key(), charCode()
    +   */
    +  WFlags<KeyboardModifier> modifiers() const { return jsEvent_.modifiers; }
    +
    +  /*! \brief Returns the unicode character code.
    +   *
    +   * This is only defined for a \link WInteractWidget::keyPressed
    +   * keyPressed \endlink event, and returns the unicode character code
    +   * of a character that is entered.
    +   *
    +   * For the \link WInteractWidget::keyWentDown keyWentDown \endlink
    +   * and \link WInteractWidget::keyWentUp keyWentUp \endlink events,
    +   * '0' is returned.
    +   *
    +   * The charCode() may be different from key(). For example, a \link
    +   * Wt::Key_M Key_M\endlink key may correspond to 'm' or 'M'
    +   * character, depending on whether the shift key is pressed
    +   * simultaneously.
    +   *
    +   * \sa key(), text()
    +   */
    +  int charCode() const;
    +
    +  /*! \brief The (unicode) text that this key generated.
    +   *
    +   * This is only defined for a \link WInteractWidget::keyPressed
    +   * keyPressed \endlink event, and returns a string that holds
    +   * exactly one unicode character, which corresponds to charCode().
    +   *
    +   * For the \link WInteractWidget::keyWentDown keyWentDown \endlink
    +   * and \link WInteractWidget::keyWentUp keyWentUp \endlink events,
    +   * an empty string is returned.
    +   *
    +   * \sa charCode()
    +   */
    +  WT_USTRING text() const;
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Returns the raw key code (<b>deprecated</b>).
    +   *
    +   * \deprecated The value returned is somewhat browser-specific, and
    +   * it is therefore recommended to use the key() method instead.
    +   *
    +   * \sa key()
    +   */
    +  int keyCode() const { return jsEvent_.keyCode; }
    +
    +  /*! \brief Returns whether the alt key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool altKey() const { return (jsEvent_.modifiers & AltModifier) != 0; }
    +
    +  /*! \brief Returns whether the meta key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool metaKey() const { return (jsEvent_.modifiers & MetaModifier) != 0; }
    +
    +  /*! \brief Returns whether the control key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool ctrlKey() const { return (jsEvent_.modifiers & ControlModifier) != 0; }
    +
    +  /*! \brief Returns whether the shift key is pressed (<b>deprecated</b>).
    +   *
    +   * \deprecated Use modifiers() instead.
    +   */
    +  bool shiftKey() const { return (jsEvent_.modifiers & ShiftModifier) != 0; }
    +#endif // WT_DEPRECATED_3_0_0
    +
    +#ifdef WT_TARGET_JAVA
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent)
    +  {
    +    return new WKeyEvent(jsEvent);
    +  }
    +
    +  static WKeyEvent templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +  WKeyEvent(const JavaScriptEvent& jsEvent);
    +
    +private:
    +  JavaScriptEvent jsEvent_;
    +};
    +
    +/*! \class WDropEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a drop event.
    + *
    + * \sa WWidget::dropEvent(WDropEvent)
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WDropEvent
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WDropEvent(WObject *source, const std::string& mimeType,
    +	     const WMouseEvent& mouseEvent);
    +
    +  /*! \brief Returns the source of the drag&drop operation.
    +   *
    +   * The source is the widget that was set draggable using
    +   * WInteractWidget::setDraggable().
    +   */
    +  WObject *source() const { return dropSource_; }
    +
    +  /*! \brief Returns the mime type of this drop event.
    +   */
    +  const std::string& mimeType() const { return dropMimeType_; }
    +
    +  /*! \brief Returns the original mouse event.
    +   */
    +  const WMouseEvent& mouseEvent() const { return mouseEvent_; }
    +
    +private:
    +  WObject            *dropSource_;
    +  std::string         dropMimeType_;
    +  const WMouseEvent&  mouseEvent_;
    +};
    +
    +/*! \class WScrollEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a scroll event.
    + *
    + * \sa WContainerWidget::scrolled()
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WScrollEvent
    +#ifdef WT_TARGET_JAVA
    +                         : public WAbstractEvent
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Default constructor
    +   */
    +  WScrollEvent();
    +
    +  /*! \brief Returns the current horizontal scroll position.
    +   *
    +   * \sa scrollY(), viewportWidth()
    +   */
    +  int scrollX() const { return jsEvent_.scrollX; }
    +
    +  /*! \brief Returns the current vertical scroll position.
    +   *
    +   * \sa scrollX(), viewportHeight()
    +   */
    +  int scrollY() const { return jsEvent_.scrollY; }
    +
    +  /*! \brief Returns the current horizontal viewport width.
    +   *
    +   * Returns the current viewport width.
    +   *
    +   * \sa viewportHeight(), scrollX()
    +   */
    +  int viewportWidth() const { return jsEvent_.viewportWidth; }
    +
    +  /*! \brief Returns the current horizontal viewport height.
    +   *
    +   * Returns the current viewport height.
    +   *
    +   * \sa viewportWidth(), scrollY()
    +   */
    +  int viewportHeight() const { return jsEvent_.viewportHeight; }
    +
    +#ifdef WT_TARGET_JAVA
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent)
    +  {
    +    return new WScrollEvent(jsEvent);
    +  }
    +
    +  static WScrollEvent templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +private:
    +  JavaScriptEvent jsEvent_;
    +
    +  WScrollEvent(const JavaScriptEvent& jsEvent);
    +
    +  friend class EventSignal<WScrollEvent>;
    +};
    +
    +/*! \class WTouchEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a touch event.
    + *
    + * \sa WInteractWidget::touchStarted(), WInteractWidget::touchMoved(),
    + *     WInteractWidget::touchEnded()
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WTouchEvent
    +#ifdef WT_TARGET_JAVA
    +                         : public WAbstractEvent
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Default constructor
    +   */
    +  WTouchEvent();
    +
    +  /*! \brief Returns a list of \link Touch\endlink objects for every finger 
    +   *         currently touching the screen.
    +   */
    +  const std::vector<Touch>& touches() const
    +    { return jsEvent_.touches; }
    +
    +  /*! \brief Returns a list of \link Touch\endlink objects for finger touches 
    +   *         that started out within the same widget.
    +   */
    +  const std::vector<Touch>& targetTouches() const
    +    { return jsEvent_.targetTouches; }
    +
    +  /*! \brief Returns a list of \link Touch\endlink objects for every finger 
    +   *         involved in the event.
    +   */
    +  const std::vector<Touch>& changedTouches() const
    +    { return jsEvent_.changedTouches; }
    +
    +#ifdef WT_TARGET_JAVA
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent)
    +  {
    +    return new WTouchEvent(jsEvent);
    +  }
    +
    +  static WTouchEvent templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +  WTouchEvent(const JavaScriptEvent& jsEvent);
    +
    +protected:
    +  JavaScriptEvent jsEvent_;
    +};
    +
    +/*! \class WGestureEvent Wt/WEvent Wt/WEvent
    + *  \brief A class providing details for a gesture event.
    + *
    + * \sa WInteractWidget::gestureStarted(), WInteractWidget::gestureChanged(),
    + *     WInteractWidget::gestureEnded()
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WGestureEvent
    +#ifdef WT_TARGET_JAVA
    +                         : public WAbstractEvent
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Default constructor
    +   */
    +  WGestureEvent();
    +
    +  /*! \brief Returns the multiplier which the user has pinched or pushed 
    +             (relative to 1).
    +   */
    +  double scale() const { return jsEvent_.scale; }
    +
    +  /*! \brief Returns the number of degrees the user has rotated his/her fingers.
    +   */
    +  double rotation() const { return jsEvent_.rotation; }
    +
    +#ifdef WT_TARGET_JAVA
    +  virtual WAbstractEvent *createFromJSEvent(const JavaScriptEvent& jsEvent)
    +  {
    +    return new WGestureEvent(jsEvent);
    +  }
    +
    +  static WGestureEvent templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +  WGestureEvent(const JavaScriptEvent& jsEvent);
    +
    +protected:
    +  JavaScriptEvent jsEvent_;
    +};
    +
    +}
    +
    +#endif // WEVENT_H_
    diff --git a/wt-3.1.7a/src/Wt/WEvent.C b/wt-3.1.7a/src/Wt/WEvent.C
    new file mode 100644
    index 0000000..fbebd54
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WEvent.C
    @@ -0,0 +1,299 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WEvent"
    +
    +#include "WebRequest.h"
    +#include "rapidxml/rapidxml.hpp"
    +
    +namespace {
    +  using namespace Wt;
    +
    +  int asInt(const std::string& v) {
    +    return boost::lexical_cast<int>(v);
    +  }
    +
    +  int parseIntParameter(const WebRequest& request, const std::string& name,
    +			int ifMissing) {
    +    const std::string *p;
    +
    +    if ((p = request.getParameter(name))) {
    +      try {
    +	return asInt(*p);
    +      } catch (const boost::bad_lexical_cast& ee) {
    +	wApp->log("error") << "Could not cast event property '" << name 
    +			   << ": " << *p << "' to int";
    +	return ifMissing;
    +      }
    +    } else
    +      return ifMissing;
    +  }
    +
    +  std::string getStringParameter(const WebRequest& request,
    +				 const std::string& name) {
    +    const std::string *p;
    +
    +    if ((p = request.getParameter(name))) {
    +      return *p;
    +    } else
    +      return std::string();
    +  }
    +
    +  void decodeTouches(std::string str, std::vector<Touch>& result) {
    +    if (str.empty())
    +      return;
    +
    +    std::vector<std::string> s;
    +    boost::split(s, str, boost::is_any_of(";"));
    +    
    +    if (s.size() % 9) {
    +      wApp->log("error") << "Could not parse touches array '" << str << "'";
    +      return;
    +    }
    +
    +    try {
    +      for (unsigned i = 0; i < s.size(); i += 9) {
    +	result.push_back(Touch(asInt(s[i + 0]),
    +			       asInt(s[i + 1]), asInt(s[i + 2]),
    +			       asInt(s[i + 3]), asInt(s[i + 4]),
    +			       asInt(s[i + 5]), asInt(s[i + 6]),
    +			       asInt(s[i + 7]), asInt(s[i + 8])));
    +      }
    +    } catch (const boost::bad_lexical_cast& ee) {
    +      wApp->log("error") << "Could not parse touches array '" << str << "'";
    +      return;
    +    }
    +  }
    +}
    +
    +namespace Wt {
    +
    +Touch::Touch(int identifier,
    +	     int clientX, int clientY,
    +	     int documentX, int documentY,
    +	     int screenX, int screenY,
    +	     int widgetX, int widgetY)
    +  : clientX_(clientX),
    +    clientY_(clientY),
    +    documentX_(documentX),
    +    documentY_(documentY),
    +    widgetX_(widgetX),
    +    widgetY_(widgetY),
    +    identifier_(identifier)
    +{ }
    +
    +JavaScriptEvent::JavaScriptEvent()
    +{ }
    +
    +void JavaScriptEvent::get(const WebRequest& request, const std::string& se)
    +{
    +  type = getStringParameter(request, se + "type");
    +  boost::to_lower(type);
    +
    +  clientX = parseIntParameter(request, se + "clientX", 0);
    +  clientY = parseIntParameter(request, se + "clientY", 0);
    +  documentX = parseIntParameter(request, se + "documentX", 0);
    +  documentY = parseIntParameter(request, se + "documentY", 0);
    +  screenX = parseIntParameter(request, se + "screenX", 0);
    +  screenY = parseIntParameter(request, se + "screenY", 0);
    +  widgetX = parseIntParameter(request, se + "widgetX", 0);
    +  widgetY = parseIntParameter(request, se + "widgetY", 0);
    +  dragDX = parseIntParameter(request, se + "dragdX", 0);
    +  dragDY = parseIntParameter(request, se + "dragdY", 0);
    +  wheelDelta = parseIntParameter(request, se + "wheel", 0);
    +
    +  /*
    +  if (widgetX == 0 && widgetY == 0) {
    +    const int signalLength = 7 + se.length();
    +    const Http::ParameterMap& entries = request.getParameterMap();
    +
    +    for (Http::ParameterMap::const_iterator i = entries.begin();
    +	 i != entries.end(); ++i) {
    +      std::string name = i->first;
    +
    +      if (name.substr(0, signalLength) == se + "signal=") {
    +	std::string e = name.substr(name.length() - 2);
    +	if (e == ".x") {
    +	  try {
    +	    widgetX = boost::lexical_cast<int>(i->second[0]);
    +	  } catch (const boost::bad_lexical_cast& ee) {
    +	  }
    +	} else if (e == ".y") {
    +	  try {
    +	    widgetY = boost::lexical_cast<int>(i->second[0]);
    +	  } catch (const boost::bad_lexical_cast& ee) {
    +	  }
    +	}
    +      }
    +    }
    +  }
    +  */
    +
    +  modifiers = 0;
    +  if (request.getParameter(se + "altKey") != 0)
    +    modifiers |= AltModifier;
    +
    +  if (request.getParameter(se + "ctrlKey") != 0)
    +    modifiers |= ControlModifier;
    +
    +  if (request.getParameter(se + "shiftKey") != 0)
    +    modifiers |= ShiftModifier;
    +
    +  if (request.getParameter(se + "metaKey") != 0)
    +    modifiers |= MetaModifier;
    +
    +  keyCode = parseIntParameter(request, se + "keyCode", 0);
    +  charCode = parseIntParameter(request, se + "charCode", 0);
    +
    +  button = parseIntParameter(request, se + "button", 0);
    +
    +  scrollX = parseIntParameter(request, se + "scrollX", 0);
    +  scrollY = parseIntParameter(request, se + "scrollY", 0);
    +  viewportWidth = parseIntParameter(request, se + "width", 0);
    +  viewportHeight = parseIntParameter(request, se + "height", 0);
    +
    +  response = getStringParameter(request, se + "response");
    +
    +  int uean = parseIntParameter(request, se + "an", 0);
    +  userEventArgs.clear();
    +  for (int i = 0; i < uean; ++i) {
    +    userEventArgs.push_back
    +      (getStringParameter(request, se + "a"
    +			  + boost::lexical_cast<std::string>(i)));
    +  }
    +
    +  decodeTouches(getStringParameter(request, se + "touches"), touches);
    +  decodeTouches(getStringParameter(request, se + "ttouches"), targetTouches);
    +  decodeTouches(getStringParameter(request, se + "ctouches"), changedTouches);  
    +}
    +
    +WMouseEvent::WMouseEvent()
    +{ }
    +
    +WMouseEvent::WMouseEvent(const JavaScriptEvent& jsEvent)
    +  : jsEvent_(jsEvent)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WMouseEvent WMouseEvent::templateEvent;
    +#endif // WT_TARGET_JAVA;
    +
    +WKeyEvent::WKeyEvent()
    +{ }
    +
    +WKeyEvent::WKeyEvent(const JavaScriptEvent& jsEvent)
    +  : jsEvent_(jsEvent)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WKeyEvent WKeyEvent::templateEvent;
    +
    +extern Key keyFromValue(int key);
    +#endif // WT_TARGET_JAVA
    +
    +Key WKeyEvent::key() const
    +{
    +  int key = jsEvent_.keyCode;
    +
    +  if (key == 0)
    +    key = jsEvent_.charCode;
    +
    +#ifndef WT_TARGET_JAVA
    +  if (key >= 'a' && key <= 'z')
    +    key -= ('a' - 'A');
    +
    +  if (key >= 'A' && key <= 'Z')
    +    return static_cast<Key>(key);
    +  else if (key == 8 || key == 9 || key == 13 || key == 27 || key == 32
    +	   || (key >= 16 && key <= 18)
    +	   || (key >= 33 && key <= 40)
    +	   || (key >= 45 && key <= 46))
    +    return static_cast<Key>(key);
    +  else
    +    return Key_unknown;
    +#else // WT_TARGET_JAVA
    +  return keyFromValue(key);
    +#endif // WT_TARGET_JAVA
    +
    +}
    +
    +int WKeyEvent::charCode() const
    +{
    +  return jsEvent_.charCode ? jsEvent_.charCode : jsEvent_.keyCode;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WString WKeyEvent::text() const
    +{
    +  int c = charCode();
    +  if (c != 0) {
    +    char buf[10]; // 4 is enough
    +    char *ptr = buf;
    +    try {
    +      rapidxml::xml_document<>::insert_coded_character<0>(ptr, charCode());
    +    } catch (rapidxml::parse_error& e) {
    +      if (WApplication::instance())
    +        WApplication::instance()->log("error")
    +          << "WKeyEvent charcode: " << e.what();
    +      return WString();
    +    }
    +    return WString::fromUTF8(std::string(buf, ptr));
    +  } else
    +    return WString();
    +}
    +#else // WT_TARGET_JAVA
    +std::string WKeyEvent::text() const
    +{
    +  return std::string() + (char)charCode();
    +}
    +#endif // WT_TARGET_JAVA
    +
    +WDropEvent::WDropEvent(WObject *source, const std::string& mimeType,
    +		       const WMouseEvent& mouseEvent)
    +  : dropSource_(source),
    +    dropMimeType_(mimeType),
    +    mouseEvent_(mouseEvent)
    +{ }
    +
    +WScrollEvent::WScrollEvent()
    +{ }
    +
    +WScrollEvent::WScrollEvent(const JavaScriptEvent& jsEvent)
    +  : jsEvent_(jsEvent)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WScrollEvent WScrollEvent::templateEvent;
    +#endif // WT_TARGET_JAVA
    +
    +WTouchEvent::WTouchEvent()
    +{ }
    +
    +WTouchEvent::WTouchEvent(const JavaScriptEvent& jsEvent)
    +  : jsEvent_(jsEvent)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WTouchEvent WTouchEvent::templateEvent;
    +#endif // WT_TARGET_JAVA;
    +
    +WGestureEvent::WGestureEvent()
    +{ }
    +
    +WGestureEvent::WGestureEvent(const JavaScriptEvent& jsEvent)
    +  : jsEvent_(jsEvent)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WGestureEvent WGestureEvent::templateEvent;
    +#endif // WT_TARGET_JAVA;
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFileResource b/wt-3.1.7a/src/Wt/WFileResource
    new file mode 100644
    index 0000000..3e7ff37
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFileResource
    @@ -0,0 +1,114 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    +  */
    +#ifndef WFILE_RESOURCE_H_
    +#define WFILE_RESOURCE_H_
    +
    +#include <string>
    +#include <Wt/WResource>
    +
    +namespace Wt {
    +
    +/*! \class WFileResource Wt/WFileResource Wt/WFileResource
    + *  \brief A resource which streams data from a local file
    + *
    + * To update the resource, either use setFileName() to point it to a
    + * new file, or emit the WResource::dataChanged() signal when only the
    + * file contents has changed, but not the filename.
    + *
    + * The resource makes use of continuations to transmit data piecewise,
    + * without blocking a thread or requiring the entire file to be read
    + * in memory. The size of the buffer can be changed using
    + * setBufferSize().
    + *
    + * \if cpp
    + * Usage examples:
    + * \code
    + * Wt::WFileResource *csvFile = new Wt::WFileResource("text/csv", "/opt/files/afile.csv");
    + * csvFile->suggestFileName("data.csv");
    + * Wt::WAnchor *anchor = new Wt::WAnchor(csvFile, "CSV data");
    + *
    + * Wt::WFileResource *imageFile = new Wt::WFileResource("image/png", "/opt/files/image.png");
    + * imageFile->suggestFileName("data.png");
    + * Wt::WImage *image = new Wt::WImage(imageFile, "PNG version");
    + * \endcode
    + * \endif
    + *
    + * \sa WMemoryResource
    + */
    +class WT_API WFileResource : public WResource
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * You need to set a file name (and mime type) for the resource
    +   * using setFileName() and setMimeType().
    +   */
    +  WFileResource(WObject *parent = 0);
    +
    +  /*! \brief Creates a new resource for a file.
    +   *
    +   * The mime type defaults to "text/plain".
    +   */
    +  WFileResource(const std::string& fileName, WObject *parent = 0);
    +
    +  /*! \brief Creates a new resource with given mime-type for a file.
    +   */
    +  WFileResource(const std::string& mimeType, const std::string& fileName,
    +		WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * It is up to the user to make sure that the resource is no longer
    +   * in use (by e.g. a WImage).
    +   */
    +  ~WFileResource();
    +
    +  /*! \brief Sets a (different) filename.
    +   *
    +   * Set the location of the file on the local filesystem which must be
    +   * streamed for this resource.
    +   */
    +  void setFileName(const std::string& fileName);
    +
    +  /*! \brief Returns the filename.
    +   */
    +  const std::string& fileName() const { return fileName_; }
    +
    +  /*! \brief Sets the mime-type.
    +   */
    +  void setMimeType(const std::string& mimeType);
    +
    +  /*! \brief Returns the mime-type.
    +   */
    +  const std::string& mimeType() const { return mimeType_; }
    +
    +  /*! \brief Configures the buffer size.
    +   *
    +   * This configures the size of the buffer used to transmit the file
    +   * piece by piece.
    +   */
    +  void setBufferSize(int size);
    +
    +  /*! \brief Returns the buffer size.
    +   *
    +   * \sa setBufferSize()
    +   */
    +  int bufferSize() const { return bufferSize_; }
    +
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +
    +private:
    +  std::string mimeType_;
    +  std::string fileName_;
    +  int         bufferSize_;
    +  ::uint64_t  beyondLastByte_;
    +};
    +
    +}
    +
    +#endif // WFILE_RESOURCE_H_
    diff --git a/wt-3.1.7a/src/Wt/WFileResource.C b/wt-3.1.7a/src/Wt/WFileResource.C
    new file mode 100644
    index 0000000..6e2bed3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFileResource.C
    @@ -0,0 +1,131 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <fstream>
    +
    +#include "Wt/WFileResource"
    +
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +#include "Wt/Http/ResponseContinuation"
    +
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +
    +WFileResource::WFileResource(WObject *parent)
    +  : WResource(parent),
    +    mimeType_("text/plain"),
    +    bufferSize_(8192)
    +{ }
    +
    +WFileResource::WFileResource(const std::string& fileName, WObject *parent)
    +  : WResource(parent),
    +    mimeType_("text/plain"),
    +    fileName_(fileName),
    +    bufferSize_(8192)
    +{ }
    +
    +WFileResource::WFileResource(const std::string& mimeType,
    +			     const std::string& fileName, WObject *parent)
    +  : WResource(parent),
    +    mimeType_(mimeType),
    +    fileName_(fileName),
    +    bufferSize_(8192)
    +{ }
    +
    +WFileResource::~WFileResource()
    +{
    +  beingDeleted();
    +}
    +
    +void WFileResource::setFileName(const std::string& fileName)
    +{
    +  fileName_ = fileName;
    +  setChanged();
    +}
    +
    +void WFileResource::setMimeType(const std::string& mimeType)
    +{
    +  mimeType_ = mimeType;
    +  setChanged();
    +}
    +
    +void WFileResource::setBufferSize(int bufferSize)
    +{
    +  bufferSize_ = bufferSize;
    +}
    +
    +void WFileResource::handleRequest(const Http::Request& request,
    +				  Http::Response& response)
    +{
    +  Http::ResponseContinuation *continuation = request.continuation();
    +  ::uint64_t startByte = continuation ?
    +      boost::any_cast< ::uint64_t >(continuation->data()) : 0;
    +
    +  std::ifstream r(fileName_.c_str(), std::ios::in | std::ios::binary);
    +
    +  if (startByte == 0) {
    +    /*
    +     * Initial request (not a continuation)
    +     */
    +    if (!r) {
    +      response.setStatus(404);
    +      return;
    +    }
    +
    +    /*
    +     * See if we should return a range.
    +     */
    +    r.seekg(0, std::ios::end);
    +    std::ifstream::pos_type fsize = r.tellg();
    +    r.seekg(0, std::ios::beg);
    +
    +    Http::Request::ByteRangeSpecifier ranges = request.getRanges(fsize);
    +
    +    if (!ranges.isSatisfiable()) {
    +      response.setStatus(416); // Requested range not satisfiable
    +      response.addHeader("Content-Range",
    +          "bytes */" + boost::lexical_cast<std::string>(fsize));
    +      return;
    +    }
    +
    +    if (ranges.size() == 1) {
    +      response.setStatus(206);
    +      startByte = ranges[0].firstByte();
    +      beyondLastByte_ = ranges[0].lastByte() + 1;
    +
    +      std::stringstream contentRange;
    +      contentRange << "bytes " << startByte << "-"
    +		   << beyondLastByte_ - 1 << "/" << fsize;
    +      response.addHeader("Content-Range", contentRange.str());
    +      response.setContentLength(beyondLastByte_ - startByte);
    +    } else {
    +      response.setContentLength(fsize);
    +      beyondLastByte_ = (::uint64_t)(fsize);
    +    }
    +
    +    response.setMimeType(mimeType_);
    +  }
    +
    +  r.seekg(static_cast<std::streamoff>(startByte));
    +
    +  char *buf = new char[bufferSize_];
    +  int bytesToRead = bufferSize_;
    +  if (startByte + bytesToRead > beyondLastByte_) {
    +    bytesToRead = (int)(beyondLastByte_ - startByte);
    +  }
    +  r.read(buf, bytesToRead);
    +  response.out().write(buf, r.gcount());
    +  delete[] buf;
    +
    +  if (r.good() && startByte + bytesToRead < beyondLastByte_) {
    +    continuation = response.createContinuation();
    +    continuation->setData(::uint64_t(startByte + bufferSize_));
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFileUpload b/wt-3.1.7a/src/Wt/WFileUpload
    new file mode 100644
    index 0000000..4b62f1f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFileUpload
    @@ -0,0 +1,350 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFILEUPLOAD_H_
    +#define WFILEUPLOAD_H_
    +
    +#include <Wt/WWebWidget>
    +
    +namespace Wt {
    +
    +/*! \class WFileUpload Wt/WFileUpload Wt/WFileUpload
    + *  \brief A widget that allows a file to be uploaded.
    + *
    + * This widget is displayed as a box in which a filename can be
    + * entered and a browse button.
    + *
    + * Depending on availability of JavaScript, the behaviour of the widget
    + * is different, but the API is designed in a way which facilitates
    + * a portable use.
    + *
    + * When JavaScript is available, the file will not be uploaded until
    + * upload() is called. This will start an asynchronous upload (and
    + * thus return immediately). \if cpp While the file is being uploaded,
    + * the dataReceived() signal is emitted when data is being received
    + * and if the connector library provides support (see also
    + * WResource::setUploadProgress() for a more detailed
    + * discussion). Although you can modify the GUI from this signal, you
    + * still need to have a mechanism in place to update the client
    + * interface (using a WTimer or using \link
    + * WApplication::enableUpdates() server-push\endlink). When the file
    + * has been uploaded, the uploaded() signal is emitted, or if the file
    + * was too large, the fileTooLarge() signal is emitted. You may
    + * configure a progress bar that is used to show the upload progress
    + * using setProgressBar(). \endif
    + *
    + * When no JavaScript is available, the file will be uploaded with the
    + * next click event. Thus, upload() has no effect -- the file will
    + * already be uploaded, and the corresponding signals will already be
    + * emitted. To test if upload() will start an upload, you may check
    + * using the canUpload() call.
    + *
    + * Thus, to properly use the widget, one needs to follow these
    + * rules:
    + * <ul>
    + *   <li>Be prepared to handle the uploaded() or fileTooLarge() signals
    + *       also when upload() was not called.</li>
    + *   <li>Check using canUpload() if upload() will schedule a new
    + *       upload. if (!canUpload()) then upload() will not have any
    + *       effect. if (canUpload()), upload() will start a new file upload,
    + *       which completes succesfully using an uploaded() signal or a
    + *       fileTooLarge() signals gets emitted.
    + *   </li>
    + * </ul>
    + *
    + * The %WFileUpload widget must be hidden or deleted when a file is
    + * received. In addition it is wise to prevent the user from uploading
    + * the file twice as in the example below.
    + *
    + * The uploaded file is automatically spooled to a local temporary
    + * file which will be deleted together with the WFileUpload widget,
    + * unless stealSpooledFile() is called.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WFileUpload *upload = new Wt::WFileUpload(this);
    + * upload->setFileTextSize(40);
    + *
    + * // Provide a button
    + * Wt::WPushButton *uploadButton = new Wt::WPushButton("Send", this);
    +
    + * // Upload when the button is clicked.
    + * uploadButton->clicked().connect(upload, &Wt::WFileUpload::upload);
    + * uploadButton->clicked().connect(uploadButton, &Wt::WPushButton::disable);
    + *
    + * // Upload automatically when the user entered a file.
    + * upload->changed().connect(upload, &WFileUpload::upload);
    + * upload->changed().connect(uploadButton, &Wt::WPushButton::disable);
    + *
    + * // React to a succesfull upload.
    + * upload->uploaded().connect(this, &MyWidget::fileUploaded);
    + *
    + * // React to a fileupload problem.
    + * upload->fileTooLarge().connect(this, &MyWidget::fileTooLarge);
    + * \endcode
    + * \endif
    + *
    + * %WFileUpload is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The file upload itself corresponds to a <tt>&lt;input
    + * type="file"&gt;</tt> tag, but may be wrapped in a
    + * <tt>&lt;form&gt;</tt> tag. This widget does not provide styling, 
    + * and styling through CSS is not well supported across browsers.
    + */
    +class WT_API WFileUpload : public WWebWidget
    +{
    +public:
    +  /*! \brief Creates a file upload widget
    +   */
    +  WFileUpload(WContainerWidget *parent = 0);
    +
    +  ~WFileUpload();
    +
    +  /*! \brief Sets whether the file upload accepts multiple files.
    +   *
    +   * In browsers which support the "multiple" attribute for the file
    +   * upload (to be part of HTML5) control, this will allow the user to
    +   * select multiple files at once.
    +   *
    +   * All uploaded files are available from uploadedFiles(). The
    +   * single-file API will return only information on the first
    +   * uploaded file.
    +   *
    +   * The default value is \c false.
    +   */
    +  void setMultiple(bool multiple);
    +
    +  /*! \brief Returns whether multiple files can be uploaded.
    +   *
    +   * \sa setMultiple()
    +   */
    +  bool multiple() const { return multiple_; }
    +
    +  /*! \brief Sets the size of the file input.
    +   */
    +  void setFileTextSize(int chars);
    +
    +  /*! \brief Returns the size of the file input.
    +   */
    +  int fileTextSize() const { return textSize_; }
    +
    +  /*! \brief Returns the spooled location of the uploaded file.
    +   *
    +   * Returns the temporary filename in which the uploaded file was
    +   * spooled. The file is guaranteed to exist as long as the
    +   * WFileUpload widget is not deleted, or a new file is not uploaded.
    +   *
    +   * When multiple files were uploaded, this returns the information
    +   * from the first file.
    +   *
    +   * \sa stealSpooledFile()
    +   * \sa uploaded
    +   */
    +  std::string spoolFileName() const;
    +
    +  /*! \brief Returns the client filename.
    +   *
    +   * When multiple files were uploaded, this returns the information
    +   * from the first file.
    +   */
    +  WT_USTRING clientFileName() const;
    +
    +  /*! \brief Returns the client content description.
    +   *
    +   * When multiple files were uploaded, this returns the information
    +   * from the first file.
    +   */
    +  WT_USTRING contentDescription() const;
    +
    +  /*! \brief Steals the spooled file.
    +   *
    +   * By stealing the file, the spooled file will no longer be deleted
    +   * together with this widget, which means you need to take care of
    +   * managing that.
    +   *
    +   * When multiple files were uploaded, this returns the information
    +   * from the first file.
    +   */
    +  void stealSpooledFile();
    +
    +  /*! \brief Returns whether one or more files have been uploaded.
    +   */
    +  bool empty() const;
    +
    +  /*! \brief Checks if no filename was given and thus no file uploaded.
    +   *         (<b>Deprecated</b>)
    +   *
    +   * Return whether a non-empty filename was given.
    +   *
    +   * \deprecated This method was renamed to empty()
    +   */
    +  bool emptyFileName() const;
    +
    +  /*! \brief Returns the uploaded files.
    +   */
    +  const std::vector<Http::UploadedFile>& uploadedFiles() const
    +    { return uploadedFiles_; }
    +
    +  /*! \brief Returns whether upload() will start a new file upload.
    +   *
    +   * A call to upload() will only start a new file upload if there is
    +   * no JavaScript support. Otherwise, the most recent file will
    +   * already be uploaded.
    +   *
    +   * \if cpp
    +   * \note This method was renamed, and its result inverted, from the
    +   *       now deprecated method isUploaded()
    +   * \endif
    +   */
    +  bool canUpload() const { return fileUploadTarget_ != 0; }
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Returns whether the upload() slot will not start a new
    +   *         upload. (<b>Deprecated</b>)
    +   *
    +   * \deprecated use canUpload() instead -- canUpload() == !isUploaded().
    +   *             the name was confusing.
    +   */
    +  bool isUploaded() const { return !canUpload(); }
    +#endif // WT_DEPRECATED_3_0_0
    +
    +  /*! \brief %Signal emitted when a new file was uploaded.
    +   *
    +   * This signal is emitted when file upload has been completed.  It
    +   * is good practice to hide or delete the WFileUpload widget when a
    +   * file has been uploaded succesfully.
    +   *
    +   * \sa upload()
    +   * \sa fileTooLarge()
    +   */
    +  EventSignal<>& uploaded();
    +
    +  /*! \brief %Signal emitted when the user tried to upload a too large file.
    +   *
    +   * The parameter is the (approximate) size of the file the user
    +   * tried to upload.
    +   *
    +   * The maximum file size is determined by the maximum request size,
    +   * which may be configured in the configuration file (<max-request-size>).
    +   *
    +   * \sa uploaded()
    +   * \sa WApplication::requestTooLarge()
    +   */
    +  Signal<int>& fileTooLarge() { return fileTooLarge_; }
    +
    +  /*! \brief %Signal emitted when the user selected a new file.
    +   *
    +   * One could react on the user selecting a (new) file, by uploading
    +   * the file immediately.
    +   *
    +   * Caveat: this signal is not emitted with konqueror and possibly
    +   * other browsers. Thus, in the above scenario you should still provide
    +   * an alternative way to call the upload() method.
    +   */
    +  EventSignal<>& changed();
    +
    +  /*! \brief Starts the file upload.
    +   *
    +   * The uploaded() signal is emitted when a file is uploaded, or the
    +   * fileTooLarge() signal is emitted when the file size exceeded the
    +   * maximum request size.
    +   *
    +   * \sa uploaded()
    +   * \sa canUpload()
    +   */
    +  void upload();
    +
    +  /*! \brief Sets a progress bar to indicate upload progress.
    +   *
    +   * When the file is being uploaded, upload progress is indicated
    +   * using the provided progress bar. Both the progress bar range and
    +   * values are configured when the upload starts.
    +   *
    +   * If the provided progress bar already has a parent, then the file
    +   * upload itself is hidden as soon as the upload starts. If the
    +   * provided progress bar does not yet have a parent, then the bar
    +   * becomes part of the file upload, and replaces the file prompt
    +   * when the upload is started.
    +   *
    +   * The default progress bar is 0 (no upload progress is indicated).
    +   *
    +   * \if java
    +   * To update the progess bar server push is used, you should only
    +   * use this functionality when using a Servlet 3.0 compatible servlet 
    +   * container.
    +   * \endif
    +   *
    +   * \sa dataReceived()
    +   */
    +  void setProgressBar(WProgressBar *progressBar);
    +
    +  /*! \brief Returns the progress bar.
    +   *
    +   * \sa setProgressBar()
    +   */
    +  WProgressBar *progressBar() const { return progressBar_; }
    +
    +  /*! \brief %Signal emitted while a file is being uploaded.
    +   *
    +   * When supported by the connector library, you can track the
    +   * progress of the file upload by listening to this signal.
    +   */
    +  Signal< ::uint64_t, ::uint64_t >& dataReceived() { return dataReceived_; }
    +
    +  virtual void enableAjax();
    +
    +private:
    +  static const char *CHANGE_SIGNAL;
    +  static const char *UPLOADED_SIGNAL;
    +  static const char *FILETOOLARGE_SIGNAL;
    +
    +  int textSize_;
    +
    +  std::vector<Http::UploadedFile> uploadedFiles_;
    +
    +  bool doUpload_;
    +  bool enableAjax_;
    +  bool uploading_;
    +  bool multiple_;
    +
    +  Signal<int> fileTooLarge_;
    +
    +  Signal< ::uint64_t, ::uint64_t > dataReceived_;
    +
    +  WResource *fileUploadTarget_;
    +  WProgressBar *progressBar_;
    +
    +  void create();
    +
    +  void onData(::uint64_t current, ::uint64_t total);
    +
    +  virtual void setRequestTooLarge(int size);
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElement    *createDomElement(WApplication *app);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +
    +private:
    +  EventSignal<>&         fileTooLargeImpl();
    +  void                   handleFileTooLargeImpl();
    +  int                    tooLargeSize_;
    +
    +  virtual void setFormData(const FormData& formData);
    +  void setFiles(const std::vector<Http::UploadedFile>& files);
    +
    +  friend class WFileUploadResource;
    +};
    +
    +}
    +
    +#endif // WFILEUPLOAD_H_
    diff --git a/wt-3.1.7a/src/Wt/WFileUpload.C b/wt-3.1.7a/src/Wt/WFileUpload.C
    new file mode 100644
    index 0000000..ec1a773
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFileUpload.C
    @@ -0,0 +1,427 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WText"
    +#include "Wt/WFileUpload"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WProgressBar"
    +#include "Wt/WResource"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +#include "DomElement.h"
    +#include "WebSession.h"
    +#include "WebRequest.h"
    +#include "Utils.h"
    +
    +#ifndef _MSC_VER
    +#include <unistd.h>
    +#endif
    +
    +namespace Wt {
    +
    +class WFileUploadResource : public WResource {
    +public:
    +  WFileUploadResource(WFileUpload *fileUpload)
    +    : WResource(fileUpload),
    +      fileUpload_(fileUpload)
    +  { }
    +
    +protected:
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response) {
    +    bool triggerUpdate = false;
    +
    +    std::vector<Http::UploadedFile> files;
    +#ifdef WT_TARGET_JAVA
    +    static Http::UploadedFile* uploaded;
    +#endif
    +    Utils::find(request.uploadedFiles(), "data", files);
    +
    +    if (!request.tooLarge())
    +      if (!files.empty() || request.getParameter("data"))
    +	triggerUpdate = true;
    +
    +    response.setMimeType("text/html; charset=utf-8");
    +    response.addHeader("Expires", "Sun, 14 Jun 2020 00:00:00 GMT");
    +    response.addHeader("Cache-Control", "max-age=315360000");
    +
    +#ifndef WT_TARGET_JAVA
    +    std::ostream& o = response.out();
    +#else
    +    std::ostream o(response.out());
    +#endif // WT_TARGET_JAVA
    +
    +    o << "<!DOCTYPE html PUBLIC "
    +      "\"-//W3C//DTD HTML 4.01 Transitional//EN\" "
    +      "\"http://www.w3.org/TR/html4/loose.dtd\">"
    +      "<html lang=\"en\" dir=\"ltr\">\n"
    +      "<head><title></title>\n"
    +      "<script type=\"text/javascript\">\n"
    +      "function load() { ";
    +
    +    if (triggerUpdate || request.tooLarge()) {
    +      o << "if (window.parent."
    +	<< WApplication::instance()->javaScriptClass() << ") ";
    +
    +      if (triggerUpdate) {
    +	o << "window.parent."
    +	  << WApplication::instance()->javaScriptClass()
    +	  << "._p_.update(null, '"
    +	  << fileUpload_->uploaded().encodeCmd() << "', null, true);";
    +      } else if (request.tooLarge()) {
    +	o << "window.parent."
    +	  << WApplication::instance()->javaScriptClass()
    +	  << "._p_.update(null, '"
    +	  << fileUpload_->fileTooLargeImpl().encodeCmd() << "', null, true);";
    +      }
    +    }
    +
    +    o << "}\n"
    +      "</script></head>"
    +      "<body onload=\"load();\""
    +      "style=\"margin:0;padding:0;\">";
    +
    +    o << "</body></html>";
    +
    +    if (request.tooLarge())
    +      fileUpload_->tooLargeSize_ = request.tooLarge();
    +    else
    +      if (!files.empty())
    +	fileUpload_->setFiles(files);
    +  }
    +
    +private:
    +  WFileUpload *fileUpload_;
    +};
    +
    +const char *WFileUpload::CHANGE_SIGNAL = "M_change";
    +const char *WFileUpload::UPLOADED_SIGNAL = "M_uploaded";
    +const char *WFileUpload::FILETOOLARGE_SIGNAL = "M_filetoolarge";
    +
    +/*
    + * Supporting the file API:
    + * - still create the resource
    + * - do not create the iframe
    + * - JavaScript method to do the upload
    + */
    +
    +WFileUpload::WFileUpload(WContainerWidget *parent)
    +  : WWebWidget(parent),
    +    textSize_(20),
    +    doUpload_(false),
    +    enableAjax_(false),
    +    uploading_(false),
    +    multiple_(false),
    +    fileTooLarge_(this),
    +    dataReceived_(this),
    +    progressBar_(0),
    +    tooLargeSize_(0)
    +{
    +  setInline(true);
    +  fileTooLargeImpl().connect(this, &WFileUpload::handleFileTooLargeImpl);
    +  create();
    +}
    +
    +void WFileUpload::create()
    +{
    +  // NOTE: this is broken on konqueror: you cannot target a form anymore
    +  bool methodIframe = WApplication::instance()->environment().ajax();
    +
    +  if (methodIframe)
    +    fileUploadTarget_ = new WFileUploadResource(this);
    +  else
    +    fileUploadTarget_ = 0;
    +
    +  setFormObject(!fileUploadTarget_);
    +}
    +
    +WFileUpload::~WFileUpload()
    +{
    +  if (uploading_)
    +    WApplication::instance()->enableUpdates(false);
    +}
    +
    +void WFileUpload::onData(::uint64_t current, ::uint64_t total)
    +{
    +  dataReceived_.emit(current, total);
    +
    +  if (WebSession::Handler::instance()->request()->postDataExceeded()) {
    +    if (uploading_) {
    +      uploading_ = false;
    +      handleFileTooLargeImpl();
    +
    +      WApplication *app = WApplication::instance();
    +      app->triggerUpdate();
    +      app->enableUpdates(false);
    +    }
    +
    +    return;
    +  }
    +
    +  if (progressBar_ && uploading_) {
    +    progressBar_->setRange(0, (double)total);
    +    progressBar_->setValue((double)current);
    +
    +    WApplication *app = WApplication::instance();
    +    app->triggerUpdate();
    +  }
    +
    +  if (current == total) {
    +    WApplication *app = WApplication::instance();
    +    uploading_ = false;
    +    app->enableUpdates(false);
    +  }
    +}
    +
    +void WFileUpload::enableAjax()
    +{
    +  create();
    +  enableAjax_ = true;
    +  repaint();
    +  WWebWidget::enableAjax();
    +}
    +
    +void WFileUpload::setProgressBar(WProgressBar *bar)
    +{
    +  delete progressBar_;
    +  progressBar_ = bar;
    +
    +  if (progressBar_) {
    +    if (!progressBar_->parent()) {
    +      progressBar_->setParentWidget(this);
    +      progressBar_->hide();
    +    }
    +  }
    +}
    +
    +EventSignal<>& WFileUpload::uploaded()
    +{
    +  return *voidEventSignal(UPLOADED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WFileUpload::changed()
    +{
    +  return *voidEventSignal(CHANGE_SIGNAL, true);
    +}
    +
    +EventSignal<>& WFileUpload::fileTooLargeImpl()
    +{
    +  return *voidEventSignal(FILETOOLARGE_SIGNAL, true);
    +}
    +
    +void WFileUpload::handleFileTooLargeImpl()
    +{
    +  fileTooLarge().emit(tooLargeSize_);
    +}
    +
    +void WFileUpload::setFileTextSize(int chars)
    +{
    +  textSize_ = chars;
    +}
    +
    +void WFileUpload::setMultiple(bool multiple)
    +{
    +  multiple_ = multiple;
    +}
    +
    +std::string WFileUpload::spoolFileName() const
    +{
    +  if (!empty())
    +    return uploadedFiles_[0].spoolFileName();
    +  else
    +    return std::string();
    +}
    +
    +WT_USTRING WFileUpload::clientFileName() const
    +{
    +  if (!empty())
    +    return WT_USTRING::fromUTF8(uploadedFiles_[0].clientFileName());
    +  else
    +    return WT_USTRING();
    +}
    +
    +WT_USTRING WFileUpload::contentDescription() const
    +{
    +  if (!empty())
    +    return WT_USTRING::fromUTF8(uploadedFiles_[0].contentType());
    +  else
    +    return WT_USTRING();
    +}
    +
    +void WFileUpload::stealSpooledFile()
    +{
    +  if (!empty())
    +    uploadedFiles_[0].stealSpoolFile();
    +}
    +
    +bool WFileUpload::emptyFileName() const
    +{
    +  return empty();
    +}
    +
    +bool WFileUpload::empty() const
    +{
    +  return uploadedFiles_.empty();
    +}
    +
    +void WFileUpload::updateDom(DomElement& element, bool all)
    +{
    +  if (fileUploadTarget_ && doUpload_) {
    +    element.callMethod("submit()");
    +    doUpload_ = false;
    +
    +    fileUploadTarget_->setUploadProgress(true);
    +    fileUploadTarget_->dataReceived().connect(this, &WFileUpload::onData);
    +
    +    if (progressBar_)
    +      if (progressBar_->parent() == this) {
    +	DomElement *inputE = DomElement::getForUpdate("in" + id(),
    +						      DomElement_INPUT);
    +	inputE->setProperty(PropertyStyleDisplay, "none");
    +	element.addChild(inputE);
    +      }
    +  }
    +
    +  if (element.type() != DomElement_INPUT
    +      && progressBar_ && !progressBar_->isRendered())
    +    element.addChild(((WWebWidget *)progressBar_)
    +		     ->createDomElement(WApplication::instance()));
    +
    +  WWebWidget::updateDom(element, all);
    +}
    +
    +void WFileUpload::propagateRenderOk(bool deep)
    +{
    +  // no need for anything not updated in updateDom()
    +  WWebWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WFileUpload::domElementType() const
    +{
    +  return fileUploadTarget_ ? DomElement_FORM : DomElement_INPUT;
    +}
    +
    +void WFileUpload::getDomChanges(std::vector<DomElement *>& result,
    +				WApplication *app)
    +{
    +  if (enableAjax_) {
    +    DomElement *plainE = DomElement::getForUpdate(this, DomElement_INPUT);
    +    DomElement *ajaxE = createDomElement(app);
    +    plainE->replaceWith(ajaxE);
    +    result.push_back(plainE);
    +  } else
    +    WWebWidget::getDomChanges(result, app);
    +}
    +
    +DomElement *WFileUpload::createDomElement(WApplication *app)
    +{
    +  DomElement *result = DomElement::createNew(domElementType());
    +  if (result->type() == DomElement_FORM)
    +    result->setId(id());
    +  else
    +    result->setName(id());
    +
    +  EventSignal<> *change = voidEventSignal(CHANGE_SIGNAL, false);
    +
    +  if (fileUploadTarget_) {
    +    DomElement *i = DomElement::createNew(DomElement_IFRAME);
    +    i->setProperty(PropertyClass, "Wt-resource");
    +    i->setProperty(PropertySrc, fileUploadTarget_->url());
    +    i->setName("if" + id());
    +
    +    DomElement *form = result;
    +
    +    form->setAttribute("method", "post");
    +    form->setAttribute("action", fileUploadTarget_->generateUrl());
    +    form->setAttribute("enctype", "multipart/form-data");
    +    form->setProperty(PropertyStyle, "margin:0;padding:0;display:inline");
    +    form->setProperty(PropertyTarget, "if" + id());
    +
    +    /*
    +     * wrap iframe in an extra span to work around bug in IE which does
    +     * not set the name use DOM methods
    +     */
    +    DomElement *d = DomElement::createNew(DomElement_SPAN);
    +    d->addChild(i);
    +
    +    form->addChild(d);
    +
    +    DomElement *input = DomElement::createNew(DomElement_INPUT);
    +    input->setAttribute("type", "file");
    +    if (multiple_)
    +      input->setAttribute("multiple", "multiple");
    +    input->setAttribute("name", "data");
    +    input->setAttribute("size", boost::lexical_cast<std::string>(textSize_));
    +    input->setId("in" + id());
    +
    +    if (change)
    +      updateSignalConnection(*input, *change, "change", true);
    +
    +    form->addChild(input);
    +
    +  } else {
    +    result->setAttribute("type", "file");
    +    if (multiple_)
    +      result->setAttribute("multiple", "multiple");
    +    result->setAttribute("size", boost::lexical_cast<std::string>(textSize_));
    +
    +    if (change)
    +      updateSignalConnection(*result, *change, "change", true);
    +  }
    +
    +  updateDom(*result, true);
    +
    +  enableAjax_ = false;
    +
    +  return result;
    +}
    +
    +void WFileUpload::setFormData(const FormData& formData)
    +{
    +  setFiles(formData.files);
    +
    +  if (!formData.files.empty())
    +    uploaded().emit();
    +}
    +
    +void WFileUpload::setFiles(const std::vector<Http::UploadedFile>& files)
    +{
    +  uploadedFiles_.clear();
    +
    +  for (unsigned i = 0; i < files.size(); ++i)
    +    if (!files[i].clientFileName().empty())
    +      uploadedFiles_.push_back(files[i]);
    +}
    +
    +void WFileUpload::setRequestTooLarge(int size)
    +{
    +  fileTooLarge().emit(size);
    +}
    +
    +void WFileUpload::upload()
    +{
    +  if (fileUploadTarget_ && !uploading_) {
    +    doUpload_ = true;
    +    repaint(RepaintPropertyIEMobile);
    +
    +    if (progressBar_) {
    +      if (progressBar_->parent() != this)
    +	hide();
    +      else
    +	progressBar_->show();
    +    }
    +
    +    WApplication::instance()->enableUpdates();
    +
    +    uploading_ = true;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFitLayout b/wt-3.1.7a/src/Wt/WFitLayout
    new file mode 100644
    index 0000000..bd83660
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFitLayout
    @@ -0,0 +1,44 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFIT_LAYOUT_H_
    +#define WFIT_LAYOUT_H_
    +
    +#include <Wt/WLayout>
    +
    +namespace Wt {
    +
    +/*! \class WFitLayout Wt/WFitLayout Wt/WFitLayout
    + *  \brief A layout manager which spans a single widget to all available space.
    + *
    + * This layout manager may manage only a single child widget, and sizes that
    + * widget so that it uses all space available in the parent.
    + *
    + * \note This layout manager is applicable only to Ext::Container
    + * container widgets. If you wish to fit widgets within a container
    + * widgets, use a WBoxLayout instead (with a single child).
    + */
    +class WT_API WFitLayout : public WLayout
    +{
    +public:
    +  /*! \brief Creates a new fit layout.
    +   */
    +  WFitLayout(WWidget *parent = 0);
    +  ~WFitLayout();
    +
    +  virtual void addItem(WLayoutItem *);
    +  virtual void removeItem(WLayoutItem *);
    +  virtual WLayoutItem *itemAt(int index) const;
    +  virtual int indexOf(WLayoutItem *item) const;
    +  virtual int count() const;
    +
    +private:
    +  WLayoutItem *item_;
    +};
    +
    +}
    +
    +#endif // WFIT_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WFitLayout.C b/wt-3.1.7a/src/Wt/WFitLayout.C
    new file mode 100644
    index 0000000..83ecc4a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFitLayout.C
    @@ -0,0 +1,62 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WFitLayout"
    +#include "Wt/WWidgetItem"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WFitLayout::WFitLayout(WWidget *parent)
    +  : WLayout(),
    +    item_(0)
    +{ 
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +WFitLayout::~WFitLayout()
    +{
    +  delete item_;
    +}
    +
    +void WFitLayout::addItem(WLayoutItem *item)
    +{
    +  if (item_)
    +    throw WtException("WFitLayout supports only one widget");
    +
    +  item_ = item;
    +  updateAddItem(item);
    +}
    +
    +void WFitLayout::removeItem(WLayoutItem *item)
    +{
    +  if (item == item_) {
    +    item_ = 0;
    +    updateRemoveItem(item);
    +  }
    +}
    +
    +WLayoutItem *WFitLayout::itemAt(int index) const
    +{
    +  return item_;
    +}
    +
    +int WFitLayout::indexOf(WLayoutItem *item) const
    +{
    +  if (item_ == item)
    +    return 0;
    +  else
    +    return -1;
    +}
    +
    +int WFitLayout::count() const
    +{
    +  return item_ ? 1 : 0;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFlags b/wt-3.1.7a/src/Wt/WFlags
    new file mode 100644
    index 0000000..eb25a34
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFlags
    @@ -0,0 +1,357 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFLAGS_H_
    +#define WFLAGS_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +#define WFLAGS_USE_TYPESAFE_MASKS
    +
    +namespace Wt {
    +
    +/*! \class WFlags Wt/WFlags Wt/WFlags
    + *  \brief Utility class for type-safe combinations of enumeration flags.
    + *
    + * This type is used in %Wt API whenever one or more flag options are
    + * expected, instead of an <tt>int</tt>. The class provides type
    + * safety, in the sense that it checks that the correct combination of
    + * enum values is bound to the argument, and does not cost any
    + * run-time overhead (internally it uses only an <tt>int</tt> to
    + * represent the combination of flags.
    + */
    +template<typename EnumType>
    +class WFlags
    +{
    +  class Zero_ {};
    +  typedef Zero_ *Zero;
    +#ifdef WFLAGS_USE_TYPESAFE_MASKS
    +  typedef const WFlags<EnumType>& MaskType;
    +#else
    +  typedef unsigned MaskType;
    +#endif
    +public:
    +  typedef EnumType enum_type;
    +
    +  /*! \brief Default constructor.
    +   */
    +  inline WFlags(Zero zero = 0);
    +
    +  /*! \brief Construct from a single enum value.
    +   */
    +  inline WFlags(EnumType flag);
    +
    +  /*! \brief Copy constructor.
    +   */
    +  inline WFlags(const WFlags<EnumType>& other);
    +
    +  /*! \brief Assignment operator.
    +   */
    +  inline WFlags<EnumType>& operator=(const WFlags<EnumType>& other);
    +
    +  /*! \brief Assignment operator.
    +   */
    +  inline WFlags<EnumType>& operator=(const EnumType other);
    +
    +  /*! \brief Returns whether a flag is set.
    +   */
    +  inline bool testFlag(EnumType flag) const;
    +
    +  /*! \brief Clears a flag.
    +   */
    +  inline WFlags<EnumType>& clear(EnumType value);
    +
    +  /*! \brief Cast to the enum type.
    +   *
    +   * The internal <tt>int</tt> representation is simply cast to the
    +   * enum type, without any additional checks.
    +   */
    +  inline operator EnumType() const;
    +
    +  inline int bitCount() const;
    +
    +  /*! \brief Negation operator.
    +   *
    +   * Returns whether different from 0.
    +   */
    +  inline bool operator!() const;
    +
    +  /*! \brief Bitwise AND operator.
    +   *
    +   * Returns flags that are the bitwise AND of this and \p mask.
    +   */
    +  inline WFlags<EnumType> operator&(EnumType mask) const;
    +
    +  /*! \brief Bitwise AND operator.
    +   *
    +   * Returns flags that are the bitwise AND of this and \p mask.
    +   */
    +  inline WFlags<EnumType> operator&(MaskType mask) const;
    +
    +  /*! \brief Modifying bitwise AND operator.
    +   *
    +   * Sets as value the bitwise AND of this and \p mask.
    +   */
    +  inline WFlags<EnumType>& operator&=(EnumType mask);
    +
    +  /*! \brief Modifying bitwise AND operator.
    +   *
    +   * Sets as value the bitwise AND of this and \p mask.
    +   */
    +  inline WFlags<EnumType>& operator&=(MaskType mask);
    +
    +  /*! \brief Bitwise XOR operator.
    +   *
    +   * Returns flags that are the bitwise XOR of this and \p other.
    +   */
    +  inline WFlags<EnumType> operator^(WFlags<EnumType> other) const;
    +
    +   /*! \brief Bitwise XOR operator.
    +   *
    +   * Returns flags that are the bitwise XOR of this and \p other.
    +   */
    + inline WFlags<EnumType> operator^(EnumType other) const;
    +
    +  /*! \brief Modifying bitwise XOR operator.
    +   *
    +   * Sets as value the bitwise XOR of this and \p other.
    +   */
    +  inline WFlags<EnumType>& operator^=(WFlags<EnumType> other);
    +
    +  /*! \brief Modifying bitwise XOR operator.
    +   *
    +   * Sets as value the bitwise XOR of this and \p other.
    +   */
    +  inline WFlags<EnumType>& operator^=(EnumType other);
    +
    +  /*! \brief Bitwise OR operator.
    +   *
    +   * Returns flags that are the bitwise OR of this and \p other.
    +   */
    +  inline WFlags<EnumType> operator|(WFlags<EnumType> other) const;
    +
    +  /*! \brief Bitwise OR operator.
    +   *
    +   * Returns flags that are the bitwise OR of this and \p other.
    +   */
    +  inline WFlags<EnumType> operator|(EnumType other) const;
    +
    +  /*! \brief Modifying bitwise OR operator.
    +   *
    +   * Sets as value the bitwise OR of this and \p other.
    +   */
    +  inline WFlags<EnumType>& operator|=(WFlags<EnumType> other);
    +
    +  /*! \brief Modifying bitwise OR operator.
    +   *
    +   * Sets as value the bitwise OR of this and \p other.
    +   */
    +  inline WFlags<EnumType>& operator|=(EnumType other);
    +
    +  /*! \brief Inversion operator.
    +   *
    +   * Returns flags that are the inverted of this.
    +   */
    +  inline WFlags<EnumType> operator~() const;
    +
    +#ifdef WT_TARGET_JAVA
    +  inline bool operator==(WFlags<EnumType> other) const;
    +  inline bool operator==(EnumType other) const;
    +  inline bool operator==(int zero) const;
    +  inline bool operator!=(WFlags<EnumType> other) const;
    +  inline bool operator!=(EnumType other) const;
    +  inline bool operator!=(int zero) const;
    +#endif
    +
    +private:
    +  unsigned int flags_;
    +
    +  WFlags(int flags, bool): flags_(flags) {}
    +  inline static WFlags<EnumType> createFromInt(int flags) {
    +    return WFlags(flags, false);
    +  }
    +
    +};
    +
    +#ifndef DOXYGEN_ONLY
    +
    +template<typename EnumType>
    +WFlags<EnumType>::WFlags(const WFlags<EnumType>& other):
    +  flags_(other.flags_)
    +{
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>::WFlags(enum_type flag):
    +  flags_(flag)
    +{
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>::WFlags(typename WFlags<EnumType>::Zero):
    +  flags_(0)
    +{
    +}
    +
    +template<typename EnumType>
    +bool WFlags<EnumType>::testFlag(enum_type flag) const
    +{
    +  return flags_ & flag;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::clear(enum_type flag)
    +{
    +  flags_ &= ~flag;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>::operator EnumType() const
    +{
    +  return static_cast<EnumType>(flags_);
    +}
    +
    +template<typename EnumType>
    +int WFlags<EnumType>::bitCount() const
    +{
    +  unsigned n = flags_;
    +  int retval = 0;
    +  while (n) {
    +    retval ++;
    +    n &= n - 1;
    +  }
    +  return retval;
    +}
    +
    +template<typename EnumType>
    +bool WFlags<EnumType>::operator!() const
    +{
    +  return !flags_;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator&(EnumType mask) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ & (unsigned)mask);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator&(MaskType mask) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ & (unsigned)mask);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> &WFlags<EnumType>::operator&=(MaskType mask)
    +{
    +  flags_ &= (unsigned)mask;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> &WFlags<EnumType>::operator&=(EnumType mask)
    +{
    +  flags_ &= (unsigned)mask;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator=(const WFlags<EnumType>& other)
    +{
    +  flags_ = other.flags_;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator=(const EnumType other)
    +{
    +  flags_ = other;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator^(WFlags<EnumType> other) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ ^ other.flags_);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator^(EnumType other) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ ^ other);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator^=(WFlags<EnumType> other)
    +{
    +  flags_ ^= other.flags_;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator^=(EnumType other)
    +{
    +  flags_ ^= other;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator|(WFlags<EnumType> other) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ | other.flags_);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator|(EnumType other) const
    +{
    +  return WFlags<EnumType>::createFromInt(flags_ | other);
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator|=(WFlags<EnumType> other)
    +{
    +  flags_ |= other.flags_;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType>& WFlags<EnumType>::operator|=(EnumType other)
    +{
    +  flags_ |= other;
    +  return *this;
    +}
    +
    +template<typename EnumType>
    +WFlags<EnumType> WFlags<EnumType>::operator~() const
    +{
    +  return WFlags<EnumType>::createFromInt(~flags_);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +#define W_DECLARE_OPERATORS_FOR_FLAGS(EnumType)				\
    +inline Wt::WFlags<EnumType> operator|(EnumType l, EnumType r) {         \
    +  Wt::WFlags<EnumType> retval(l);					\
    +  retval |= r;								\
    +  return retval;							\
    +}									\
    +inline Wt::WFlags<EnumType> operator|(EnumType l,		        \
    +                                             Wt::WFlags<EnumType> r) {	\
    +  return r | l;								\
    +}
    +#else
    +#define W_DECLARE_OPERATORS_FOR_FLAGS(EnumType)				\
    +Wt::WFlags<EnumType> operator|(EnumType l, EnumType r);                 \
    +Wt::WFlags<EnumType> operator|(EnumType l, Wt::WFlags<EnumType> r);     \
    +bool operator==(EnumType l, Wt::WFlags<EnumType> r);                    \
    +bool operator==(EnumType l, int zero);
    +#endif
    +}
    +
    +#endif // DOXYGEN_ONLY
    +
    +#endif // WFLAGS_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WFlashObject b/wt-3.1.7a/src/Wt/WFlashObject
    new file mode 100644
    index 0000000..3491773
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFlashObject
    @@ -0,0 +1,134 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFLASHOBJECT_H_
    +#define WFLASHOBJECT_H_
    +
    +#include <Wt/WWebWidget>
    +
    +namespace Wt {
    +
    +/*! \class WFlashObject Wt/WFlashObject Wt/WFlashObject
    + *  \brief A widget that renders a Flash object (also known as Flash movie).
    + *
    + * This class loads a .swf Flash file in the browser.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * WFlashObject *player = new WFlashObject("dummy.swf", parent);
    + * player->resize(300, 600);
    + * player->setFlashParameter("allowScriptAccess", "always");
    + * player->setFlashParameter("quality", "high");
    + * player->setFlashParameter("bgcolor", "#aaaaaa");
    + * player->setFlashVariable("someVar", "foo");
    + * \endcode
    + * \endif
    + *
    + * Flash objects must have their size set, so do not forget to call
    + * resize() after instantiation or your content will be invisible. %Wt
    + * will modify width and height attributes of the Flash object if resize()
    + * is called after the object is instantiated; it is however not clear
    + * if this is permitted by the Flash plugin.
    + *
    + * Any WWidget can be set with setAlternativeContent(), and this widget
    + * will be shown only when the browser has no Flash support. By default,
    + * a 'Download Flash' button will be displayed that links to a website
    + * where the Flash player can be downloaded. You may modify this to be
    + * any widget, such as a WImage, or a native %Wt implementation of the
    + * Flash movie.
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + */
    +class WT_API WFlashObject : public WWebWidget
    +{
    +public:
    +  /*! \brief Constructs a Flash widget.
    +   */
    +  WFlashObject(const std::string &url, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor
    +   *
    +   * The Flash object is removed.
    +   */
    +  ~WFlashObject();
    +
    +  virtual void resize(const WLength &width, const WLength &height);
    +
    +  /*! \brief Sets a Flash parameter.
    +   *
    +   * The Flash parameters are items such as quality, scale, menu, ...
    +   * They are passed as PARAM objects to the Flash movie. See the
    +   * adobe website for more information about these parameters:
    +   * http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_12701
    +   *
    +   * Setting the same Flash parameter a second time will overwrite the
    +   * previous value. Flash parameters can only be set before the widget
    +   * is rendered for the first time, so it is recommended to call this
    +   * method shortly after construction before returning to the idle loop.
    +   */
    +  void setFlashParameter(const std::string &name, const WString &value);
    +
    +  /*! \brief Sets a Flash variable.
    +   *
    +   * This method is a helper function to set variable values in the
    +   * flashvars parameter.
    +   *
    +   * The flash variables will be properly encoded (URL encoding) before
    +   * being passed to the flashvars parameter.
    +   *
    +   * Setting the same Flash variable a second time will overwrite the
    +   * previous value. Flash variables can only be set before the widget
    +   * is rendered for the first time, so it is recommended to call this
    +   * method shortly after construction before returning to the idle loop.
    +   */
    +  void setFlashVariable(const std::string &name, const WString &value);
    +
    +  /*! \brief A JavaScript expression that returns the DOM node of the Flash
    +   *         object.
    +   *
    +   * The Flash object is not stored in jsRef(), but in jsFlashRef(). Use this
    +   * method in conjuction with WApplication::doJavaScript() or JSlot in custom
    +   * JavaScript code to refer to the Flash content.
    +   *
    +   * The expression returned by jsFlashRef() may be null,
    +   * for example on IE when flash is not installed.
    +   */
    +  std::string jsFlashRef() const;
    +
    +  /*! \brief Sets content to be displayed if Flash is not available.
    +   *
    +   * Any widget can be a placeholder when Flash is not installed in the
    +   * users browser. By default, this will show a 'Download Flash' button
    +   * and link to the Flash download site.
    +   *
    +   * Call this method with a NULL pointer to remove the alternative content.
    +   */
    +  void setAlternativeContent(WWidget *alternative);
    +
    +protected:
    +  void updateDom(DomElement& element, bool all);
    +  void getDomChanges(std::vector<DomElement *>& result,
    +                     WApplication *app);
    +  DomElementType domElementType() const;
    +
    +private:
    +  std::string url_;
    +  bool sizeChanged_;
    +  std::map<std::string, WString> parameters_;
    +  std::map<std::string, WString> variables_;
    +  WWidget *alternative_;
    +  JSignal<> ieRendersAlternative_;
    +  bool replaceDummyIeContent_;
    +  void renderIeAltnerative();
    +};
    +
    +}
    +
    +#endif // WFLASHOBJECT_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WFlashObject.C b/wt-3.1.7a/src/Wt/WFlashObject.C
    new file mode 100644
    index 0000000..42ca5b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFlashObject.C
    @@ -0,0 +1,250 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WFlashObject"
    +#include "Wt/WAnchor"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include <boost/lexical_cast.hpp>
    +#include <sstream>
    +
    +namespace Wt {
    +
    +WFlashObject::WFlashObject(const std::string& url,
    +                           WContainerWidget *parent)
    +  : WWebWidget(parent),
    +    url_(url),
    +    sizeChanged_(false),
    +    alternative_(0),
    +    ieRendersAlternative_(this, "IeAltnernative"),
    +    replaceDummyIeContent_(false)
    +{
    +  setInline(false);
    +  setAlternativeContent(new WAnchor("http://www.adobe.com/go/getflashplayer",
    +    new WImage("http://www.adobe.com/images/"
    +               "shared/download_buttons/get_flash_player.gif")));
    +  ieRendersAlternative_.connect(this, &WFlashObject::renderIeAltnerative);
    +}
    +
    +WFlashObject::~WFlashObject()
    +{
    +}
    +
    +void WFlashObject::setFlashParameter(const std::string &name,
    +    const WString &value)
    +{
    +  WString v = value;
    +  parameters_[name] = v;
    +}
    +
    +void WFlashObject::setFlashVariable(const std::string &name,
    +    const WString &value)
    +{
    +  WString v = value;
    +  variables_[name] = v;
    +}
    +
    +void WFlashObject::updateDom(DomElement& element, bool all)
    +{
    +  if (all) {
    +    //http://latrine.dgx.cz/how-to-correctly-insert-a-flash-into-xhtml
    +    DomElement *obj = DomElement::createNew(DomElement_OBJECT);
    +
    +    if (isInLayout()) {
    +      // Layout-manager managed sizes need some CSS magic to display
    +      // correctly
    +      obj->setProperty(PropertyStylePosition, "absolute");
    +      obj->setProperty(PropertyStyleLeft, "0");
    +      obj->setProperty(PropertyStyleRight, "0");
    +      element.setProperty(PropertyStylePosition, "relative");
    +      std::stringstream ss;
    +      // Client-side auto-resize function
    +      ss <<
    +        """function(self, w, h) {"
    +        ""  "v=" + jsFlashRef() + ";"
    +        ""  "if(v){"
    +        ""    "v.setAttribute('width', w);"
    +        ""    "v.setAttribute('height', h);"
    +        ""  "}";
    +      if (alternative_) {
    +        ss <<
    +          """a=" + alternative_->jsRef() + ";"
    +          ""  "if(a && a." << WT_RESIZE_JS <<")"
    +          ""    "a." << WT_RESIZE_JS << "(a, w, h);";
    +      }
    +      ss
    +        <<"}";
    +      setJavaScriptMember(WT_RESIZE_JS, ss.str());
    +    }
    +
    +    obj->setId(id() + "_flash");
    +    obj->setAttribute("type", "application/x-shockwave-flash");
    +    if (!wApp->environment().agentIsIElt(9)) {
    +      obj->setAttribute("data", url_);
    +    }
    +    // Width/height: Adobe says: must be present, and specified as pixels or
    +    // percentage. We noticed that when left blank, most players come up with
    +    // a reasonable default. All other units (not px or %) are converted to
    +    // px. When percentage units, the surrounding div will have the % set.
    +    // The flash movie is thus set to 100% in order to fill the space of the
    +    // div.
    +    // http://kb2.adobe.com/cps/127/tn_12701.html
    +    if (width().isAuto()) {
    +      obj->setAttribute("width", "");
    +    } else if (width().unit() == WLength::Percentage) {
    +      obj->setAttribute("width", "100%");
    +    } else {
    +      obj->setAttribute("width",
    +        boost::lexical_cast<std::string>((int)width().toPixels()) + "px");
    +    }
    +    if (height().isAuto()) {
    +      obj->setAttribute("height", "");
    +    } else if (height().unit() == WLength::Percentage) {
    +      obj->setAttribute("height", "100%");
    +    } else {
    +      obj->setAttribute("height",
    +        boost::lexical_cast<std::string>((int)height().toPixels()) + "px");
    +    }
    +
    +    for(std::map<std::string, WString>::const_iterator i = parameters_.begin();
    +      i != parameters_.end(); ++i) {
    +        if (i->first != "flashvars") {
    +          DomElement *param = DomElement::createNew(DomElement_PARAM);
    +          param->setAttribute("name", i->first);
    +          param->setAttribute("value", i->second.toUTF8());
    +          obj->addChild(param);
    +        }
    +    }
    +    if (wApp->environment().agentIsIElt(9)) {
    +      obj->setAttribute("classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
    +      // The next line is considered bad practice
    +      //obj->setAttribute("codebase",
    +      //"http://download.macromedia.com/pub/shockwave/cabs/flash/
    +      //swflash.cab#version=6,0,0,0");
    +      DomElement *param = DomElement::createNew(DomElement_PARAM);
    +      param->setAttribute("name", "movie");
    +      param->setAttribute("value", url_);
    +      obj->addChild(param);
    +    }
    +    if (variables_.size() > 0) {
    +      std::stringstream ss;
    +      for (std::map<std::string, WString>::const_iterator i = variables_.begin();
    +        i != variables_.end(); ++i) {
    +          if (i != variables_.begin())
    +            ss << "&";
    +          ss << Wt::Utils::urlEncode(i->first) << "="
    +            << Wt::Utils::urlEncode(i->second.toUTF8());
    +      }
    +      DomElement *param = DomElement::createNew(DomElement_PARAM);
    +      param->setAttribute("name", "flashvars");
    +      param->setAttribute("value", ss.str());
    +      obj->addChild(param);
    +    }
    +    if (alternative_) {
    +      // Internet explorer simply eliminates the inner elements if they are
    +      // not needed, causing JavaScript errors lateron. So we will only
    +      // render the alternative content if we know for sure that it is not
    +      // eliminated by IE (in practice, this is when Flash support is
    +      // not available). To do so, we'll render a dummy div, verify if that
    +      // dummy element is not eliminated, and if it's not, replace it by
    +      // a call to alternative_->createDomElement().
    +      if (wApp->environment().javaScript() &&
    +          wApp->environment().agentIsIElt(9)) {
    +        DomElement *dummyDiv = DomElement::createNew(DomElement_DIV);
    +        dummyDiv->setId(alternative_->id());
    +        // As if it ain't bad enough, the altnerative content is only
    +        // inserted in the DOM after 'a while', so we can't test for it with
    +        // a simple doJavaScript() call. Additionally, all scripting-alike
    +        // stuff inside the alternative content is ignored (script element,
    +        // onrenderstatechange, ...). So this 'style=...' is indeed a hack.
    +        // You can't put semicolons or curly braces inside the expression,
    +        // so we added a helper function.
    +        dummyDiv->setAttribute("style",
    +          "width: expression(" + wApp->javaScriptClass()
    +          + "._p_.ieAlternative(this));");
    +        obj->addChild(dummyDiv);
    +      } else {
    +        obj->addChild(alternative_->createSDomElement(wApp));
    +      }
    +    }
    +    element.addChild(obj);
    +  }
    +
    +  WWebWidget::updateDom(element, all);
    +}
    +
    +std::string WFlashObject::jsFlashRef() const
    +{
    +  return WT_CLASS ".getElement('" + id() + "_flash')";
    +}
    +
    +void WFlashObject::getDomChanges(std::vector<DomElement *>& result,
    +                                 WApplication *app)
    +{
    +  WWebWidget::getDomChanges(result, app);
    +  if (sizeChanged_) {
    +    DomElement *obj =
    +      DomElement::getForUpdate(id()  + "_flash", DomElement_OBJECT);
    +
    +    if (width().isAuto()) {
    +      obj->setAttribute("width", "");
    +    } else if (width().unit() == WLength::Percentage) {
    +      obj->setAttribute("width", "100%");
    +    } else {
    +      obj->setAttribute("width",
    +        boost::lexical_cast<std::string>((int)width().toPixels()) + "px");
    +    }
    +    if (height().isAuto()) {
    +      obj->setAttribute("height", "");
    +    } else if (height().unit() == WLength::Percentage) {
    +      obj->setAttribute("height", "100%");
    +    } else {
    +      obj->setAttribute("height",
    +        boost::lexical_cast<std::string>((int)height().toPixels()) + "px");
    +    }
    +    result.push_back(obj);
    +    sizeChanged_ = false;
    +  }
    +  if (alternative_ && replaceDummyIeContent_) {
    +    DomElement *element =
    +      DomElement::getForUpdate(alternative_->id(), DomElement_DIV);
    +    element->replaceWith(alternative_->createSDomElement(app));
    +    result.push_back(element);
    +    replaceDummyIeContent_ = false;
    +  }
    +
    +}
    +
    +void WFlashObject::setAlternativeContent(WWidget *alternative)
    +{
    +  if (alternative_)
    +    delete alternative_;
    +  alternative_ = alternative;
    +  if (alternative_)
    +    addChild(alternative_);
    +}
    +
    +void WFlashObject::resize(const WLength &width, const WLength &height)
    +{
    +  sizeChanged_ = true;
    +  WWebWidget::resize(width, height);
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +DomElementType WFlashObject::domElementType() const
    +{
    +  return DomElement_DIV;
    +}
    +void WFlashObject::renderIeAltnerative()
    +{
    +  replaceDummyIeContent_ = true;
    +  repaint(Wt::RepaintInnerHtml);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFont b/wt-3.1.7a/src/Wt/WFont
    new file mode 100644
    index 0000000..98cb5ac
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFont
    @@ -0,0 +1,178 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFONT_H_
    +#define WFONT_H_
    +
    +#include <Wt/WLength>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class DomElement;
    +class WWebWidget;
    +
    +/*! \class WFont Wt/WFont Wt/WFont
    + *  \brief A style class describing a font.
    + *
    + * \ingroup style painting
    + */
    +class WT_API WFont
    +{
    +public:
    +  /*! \brief The generic font family.
    +   */
    +  enum GenericFamily { Default,   //!< Browser-dependent default
    +		       Serif,     //!< for example: Times
    +		       SansSerif, //!< for example: Helvetica
    +		       Cursive,   //!< for example: Zapf-Chancery
    +		       Fantasy,   //!< for example: Western
    +		       Monospace  //!< for example: Courier
    +  };
    +
    +  /*! \brief The font style.
    +   */
    +  enum Style { NormalStyle, //!< Normal (default)
    +	       Italic,      //!< Italic
    +	       Oblique      //!< Oblique
    +  };
    +
    +  /*! \brief The font variant.
    +   */
    +  enum Variant { NormalVariant, //!< Normal (default)
    +		 SmallCaps      //!< Small Capitals 
    +  };
    +
    +  /*! \brief The font weight.
    +   */
    +  enum Weight { NormalWeight, //!< Normal (default) (Value == 400)
    +		Bold,         //!< Bold (Value == 700)
    +		Bolder,       //!< Bolder than the parent widget
    +		Lighter,      //!< Lighter than the parent widget
    +		Value         //!< Specify a value (100 - 900)
    +  };
    +
    +  /*! \brief The font size.
    +   */
    +  enum Size { XXSmall,  //!< Extra Extra small
    +	      XSmall,   //!< Extra small
    +	      Small,    //!< Small
    +	      Medium,   //!< Medium, default
    +	      Large,    //!< Large
    +	      XLarge,   //!< Extra large
    +	      XXLarge,  //!< Extra Extra large
    +	      Smaller,  //!< Relatively smaller than the parent widget
    +	      Larger,   //!< Relatively larger than the parent widget
    +	      FixedSize //!< Explicit size, See also fontFixedSize()
    +  };
    +
    +  /*! \brief A default font (dependent on the user agent).
    +   */
    +  WFont();
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator==(const WFont& other) const;
    +  bool operator!=(const WFont& other) const;
    +
    +  /*! \brief Sets the font family.
    +   *
    +   * The font family is specified using a generic family name,
    +   * in addition to a comma-seperated list of specific font choices.
    +   *
    +   * The first specific font that can be matched will be used, otherwise
    +   * a generic font will be used.
    +   */
    +  void setFamily(GenericFamily genericFamily,
    +		 const WString& specificFamilies = WString());
    +
    +  /*! \brief Returns the font generic family.
    +   */
    +  GenericFamily genericFamily() const { return genericFamily_; }
    +
    +  /*! \brief Returns the font specific family names.
    +   */
    +  const WString& specificFamilies() const { return specificFamilies_; }
    +
    +  /*! \brief Sets the font style.
    +   */
    +  void setStyle(Style style);
    +
    +  /*! \brief Returns the font style.
    +   */
    +  Style style() const { return style_; }
    +
    +  /*! \brief Sets the font variant.
    +   */
    +  void setVariant(Variant variant);
    +
    +  /*! \brief Returns the font variant.
    +   */
    +  Variant variant() const { return variant_; }
    +
    +  /*! \brief Sets the font weight.
    +   *
    +   * When setting weight == Value, you may specify a value.
    +   *
    +   * Valid values are between 100 and 900, and are rounded to multiples of
    +   * 100.
    +   */
    +  void setWeight(Weight weight, int value = 400);
    +
    +  /*! \brief Returns the font weight.
    +   */
    +  Weight weight() const { return weight_; }
    +
    +  /*! \brief Returns the font weight value.
    +   */
    +  int weightValue() const { return weightValue_; }
    +
    +  /*! \brief Sets the font size.
    +   */
    +  void setSize(Size size, const WLength& fixedSize = WLength::Auto);
    +
    +  /*! \brief Returns the font size.
    +   */
    +  Size size() const { return size_; }
    +
    +  /*! \brief Returns the fixed font size for \link WFont::FixedSize FixedSize \endlink.
    +   */
    +  WLength fixedSize() const { return fixedSize_; }
    +
    +  const std::string cssText(bool combined = true) const;
    +
    +  void updateDomElement(DomElement& element, bool fontall, bool all);
    +
    +private:
    +  WWebWidget    *widget_;
    +  GenericFamily genericFamily_;
    +  WString       specificFamilies_;
    +  Style         style_;
    +  Variant       variant_;
    +  Weight        weight_;
    +  int           weightValue_;
    +  Size          size_;
    +  WLength       fixedSize_;
    +
    +  bool familyChanged_;
    +  bool styleChanged_;
    +  bool variantChanged_;
    +  bool weightChanged_;
    +  bool sizeChanged_;
    +
    +  std::string cssStyle(bool all) const;
    +  std::string cssVariant(bool all) const;
    +  std::string cssWeight(bool all) const;
    +  std::string cssFamily(bool all) const;
    +  std::string cssSize(bool all) const;
    +
    +  void setWebWidget(WWebWidget *w);
    +  friend class WCssDecorationStyle;
    +};
    +
    +}
    +
    +#endif // WFONT_H_
    diff --git a/wt-3.1.7a/src/Wt/WFont.C b/wt-3.1.7a/src/Wt/WFont.C
    new file mode 100644
    index 0000000..e92d9e0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFont.C
    @@ -0,0 +1,274 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WWidget"
    +#include "Wt/WWebWidget"
    +#include "Wt/WFont"
    +
    +#include "EscapeOStream.h"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WFont::WFont()
    +  : widget_(0),
    +    genericFamily_(Default),
    +    style_(NormalStyle),
    +    variant_(NormalVariant),
    +    weight_(NormalWeight),
    +    weightValue_(400),
    +    size_(Medium),
    +    familyChanged_(false),
    +    styleChanged_(false),
    +    variantChanged_(false),
    +    weightChanged_(false),
    +    sizeChanged_(false)
    +{ }
    +
    +void WFont::setWebWidget(WWebWidget *w)
    +{
    +  widget_ = w;
    +}
    +
    +bool WFont::operator==(const WFont& other) const
    +{
    +  return
    +       genericFamily_    == other.genericFamily_
    +    && specificFamilies_ == other.specificFamilies_
    +    && style_            == other.style_
    +    && variant_          == other.variant_
    +    && weight_           == other.weight_
    +    && weightValue_      == other.weightValue_
    +    && size_             == other.size_
    +    && fixedSize_        == other.fixedSize_;
    +}
    +
    +bool WFont::operator!=(const WFont& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +void WFont::setFamily(GenericFamily genericFamily,
    +		      const WString& specificFamilies)
    +{
    +  genericFamily_ = genericFamily;
    +  specificFamilies_ = specificFamilies;
    +  familyChanged_ = true;
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WFont::setStyle(Style style)
    +{
    +  style_ = style;
    +  styleChanged_ = true;
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WFont::setVariant(Variant variant)
    +{
    +  variant_ = variant;
    +  variantChanged_ = true;
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WFont::setWeight(Weight weight, int value)
    +{
    +  weight_ = weight;
    +  weightValue_ = value;
    +  weightChanged_ = true;
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WFont::setSize(Size size, const WLength& fixedSize)
    +{
    +  size_ = size;
    +  if(size_ == FixedSize) {
    +    fixedSize_ = fixedSize;
    +  } else {
    +    fixedSize_ = WLength::Auto;
    +  }
    +  sizeChanged_ = true;
    +  if (widget_) widget_->repaint(RepaintPropertyAttribute);
    +}
    +
    +void WFont::updateDomElement(DomElement& element, bool fontall, bool all)
    +{
    +  if (familyChanged_ || fontall || all) {
    +    std::string family = cssFamily(fontall);
    +
    +    if (!family.empty())
    +      element.setProperty(PropertyStyleFontFamily, family);
    +
    +    familyChanged_ = false;
    +  }
    +
    +  if (styleChanged_ || fontall || all) {
    +    std::string style = cssStyle(fontall);
    +
    +    if (!style.empty())
    +      element.setProperty(PropertyStyleFontStyle, style);
    +
    +    styleChanged_ = false;
    +  }
    +
    +  if (variantChanged_ || fontall || all) {
    +    std::string variant = cssVariant(fontall);
    +
    +    if (!variant.empty())
    +      element.setProperty(PropertyStyleFontVariant, variant);
    +
    +    variantChanged_ = false;
    +  }
    +
    +  if (weightChanged_ || fontall || all) {
    +    std::string weight = cssWeight(fontall);
    +
    +    if (!weight.empty())
    +      element.setProperty(PropertyStyleFontWeight, weight);
    +
    +    weightChanged_ = false;
    +  }
    +
    +  if (sizeChanged_ || fontall || all) {
    +    std::string size = cssSize(fontall);
    +
    +    if (!size.empty())
    +      element.setProperty(PropertyStyleFontSize, size);
    +
    +    sizeChanged_ = false;
    +  }
    +}
    +
    +std::string WFont::cssStyle(bool all) const
    +{
    +  switch (style_) {
    +  case NormalStyle:
    +    if (styleChanged_ || all)
    +      return "normal";
    +    break;
    +  case Italic: return "italic";
    +  case Oblique: return "oblique";
    +  }
    +
    +  return std::string();
    +}
    +
    +std::string WFont::cssVariant(bool all) const
    +{
    +  switch (variant_) {
    +  case NormalVariant:
    +    if (variantChanged_ || all)
    +      return "normal";
    +    break;
    +  case SmallCaps:
    +    return "small-caps";
    +  }
    +
    +  return std::string();
    +}
    +
    +
    +std::string WFont::cssWeight(bool all) const
    +{
    +  switch (weight_) {
    +  case NormalWeight:
    +    if (weightChanged_ || all)
    +      return "normal";
    +    break;
    +    case Bold: return "bold";
    +    case Bolder:return "bolder";
    +    case Lighter: return "lighter";
    +    case Value: {
    +      int v = std::min(900, std::max(100, ((weightValue_ / 100))*100));
    +      return boost::lexical_cast<std::string>(v);
    +    }
    +  }
    +
    +  return std::string();
    +}
    +
    +std::string WFont::cssSize(bool all) const
    +{
    +  switch (size_) {
    +  case Medium:
    +    if (sizeChanged_ || all)
    +      return "medium";
    +    break;
    +  case XXSmall: return "xx-small";
    +  case XSmall: return "x-small";
    +  case Small: return "small";
    +  case Large: return "large" ;
    +  case XLarge: return "x-large" ;
    +  case XXLarge: return "xx-large";
    +  case Smaller: return "smaller";
    +  case Larger: return "larger";
    +  case FixedSize: return fixedSize_.cssText();
    +  }
    +
    +  return std::string();
    +}
    +
    +std::string WFont::cssFamily(bool all) const
    +{
    +  std::string family = specificFamilies_.toUTF8();
    +  if (!family.empty())
    +    family += ',';
    +
    +  switch (genericFamily_) {
    +  case Default:
    +    if (familyChanged_ || all)
    +      family = "inherit"; // discard specific families
    +    break;
    +  case Serif:
    +    family += "serif"; break;
    +  case SansSerif:
    +    family += "sans-serif"; break;
    +  case Cursive:
    +    family += "cursive"; break;
    +  case Fantasy:
    +    family += "fantasay"; break;
    +  case Monospace:
    +    family += "monospace"; break;
    +  }
    +
    +  return family;
    +}
    +
    +const std::string WFont::cssText(bool combined) const
    +{
    +  SStream result;
    +
    +  if (combined)
    +    result << cssStyle(false) << ' ' << cssVariant(false) << ' '
    +	   << cssWeight(false) << ' ' << cssSize(true) << ' ' << cssFamily(true);
    +  else {
    +    std::string s;
    +    s = cssFamily(false);
    +    if (!s.empty())
    +      result << "font-family: " << s << ";";
    +
    +    s = cssSize(false);
    +    if (!s.empty())
    +      result << "font-size: " << s << ";";
    +
    +    s = cssStyle(false);
    +    if (!s.empty())
    +      result << "font-style: " << s << ";";
    +
    +    s = cssVariant(false);
    +    if (!s.empty())
    +      result << "font-variant: " << s << ";";
    +
    +    s = cssWeight(false);
    +    if (!s.empty())
    +      result << "font-weight: " << s << ";";
    +  }
    +
    +  return result.str();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WFormWidget b/wt-3.1.7a/src/Wt/WFormWidget
    new file mode 100644
    index 0000000..014b059
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFormWidget
    @@ -0,0 +1,210 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WFORM_WIDGET_H_
    +#define WFORM_WIDGET_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +class WLabel;
    +
    +/*! \class WFormWidget Wt/WFormWidget Wt/WFormWidget
    + *  \brief An abstract widget that corresponds to an HTML form element.
    + *
    + * A %WFormWidget may receive focus, can be disabled, and can have a
    + * label that acts as proxy for getting focus. It provides signals
    + * which reflect changes to its value, or changes to its focus.
    + *
    + * Form widgets also have built-in support for validation, using
    + * setValidator(WValidator *). If the validator provide client-side
    + * validation, then an invalid validation state is reflected using the
    + * style class <tt>"Wt-invalid"</tt>. All validators provided by %Wt
    + * implement client-side validation.
    + *
    + * On the server-side, use validate() method to validate the content
    + * using a validator previously set.
    + */
    +class WT_API WFormWidget : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates a %WFormWidget with an optional parent.
    +   */
    +  WFormWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * If a label was associated with the widget, its buddy is reset to \c 0.
    +   */
    +  ~WFormWidget();
    +
    +  /*! \brief Returns the label associated with this widget.
    +   *
    +   * Returns the label (if there is one) that acts as a proxy for this
    +   * widget.
    +   *
    +   * \sa WLabel::setBuddy(WFormWidget *)
    +   */
    +  WLabel *label() const { return label_; }
    +
    +  /*! \brief Sets the hidden state of this widget.
    +   *
    +   * If the widget has a label, it is hidden and shown together with
    +   * this widget.
    +   */
    +  virtual void setHidden(bool hidden);
    +
    +  /*! \brief Sets a validator for this field.
    +   *
    +   * The validator is used to validate the current input.
    +   *
    +   * If the validator has no parent yet, then ownership is transferred
    +   * to the form field, and thus the validator will be deleted
    +   * together with the form field.
    +   *
    +   * The default value is \c 0.
    +   *
    +   * \sa validate()
    +   */
    +  void setValidator(WValidator *validator);
    +
    +  /*! \brief Returns the validator.
    +   */
    +  WValidator *validator() const { return validator_; }
    +
    +  /*! \brief Validates the field.
    +   */
    +  virtual WValidator::State validate();
    +
    +  /*! \brief Sets whether the widget is enabled.
    +   *
    +   * A widget that is disabled cannot receive focus or user interaction.
    +   *
    +   * This is the opposite of setDisabled().
    +   */
    +  void setEnabled(bool enabled);
    +
    +  /*! \brief Gives focus.
    +   *
    +   * Giving focus to an input element only works when JavaScript is enabled.
    +   */
    +  void setFocus();
    +
    +  /*! \brief Changes focus.
    +   *
    +   * When using \p focus = \c false, you can undo a previous setFocus() call.
    +   */
    +  void setFocus(bool focus);
    +
    +  /*! \brief Returns whether this widget has focus.
    +   */
    +  bool hasFocus() const;
    +
    +  virtual void setTabIndex(int index);
    +  virtual int tabIndex() const;
    +
    +  /*! \brief Sets the element read-only.
    +   *
    +   * A read-only form element cannot be edited, but the contents can
    +   * still be selected.
    +   *
    +   * By default, a form element area is not read-only.
    +   *
    +   * \sa setEnabled()
    +   */
    +  void setReadOnly(bool readOnly);
    +
    +  /*! \brief Returns whether the form element is read-only.
    +   *
    +   * \sa setReadOnly()
    +   */
    +  bool isReadOnly() const;
    +
    +  /*! \brief Sets the empty text to be shown when the field is empty.
    +   *
    +   * \sa emptyText()
    +   */
    +  void setEmptyText(const WString& emptyText);
    +
    +  /*! \brief Returns the empty text to be shown when the field is empty.
    +   *
    +   * \sa setEmptyText()
    +   */
    +  const WString& emptyText() {
    +    return emptyText_;
    +  }
    +
    +  /*! \brief %Signal emitted when the value was changed.
    +   */
    +  EventSignal<>& changed();
    +
    +  /*! \brief %Signal emitted when ??
    +   */
    +  EventSignal<>& selected();
    +
    +  /*! \brief %Signal emitted when the widget lost focus.
    +   */
    +  EventSignal<>& blurred();
    +
    +  /*! \brief %Signal emitted when the widget recieved focus.
    +   */
    +  EventSignal<>& focussed();
    +
    +protected:
    +  WLabel     *label_;
    +  WValidator *validator_;
    +  JSlot      *validateJs_, *filterInput_, *removeEmptyText_;
    +  WString     emptyText_;
    +
    +  // also used in WAbstractToggleButton
    +  static const char *CHANGE_SIGNAL;
    +
    +  void updateEmptyText();
    +
    +  virtual void enableAjax();
    +
    +private:
    +  static const char *SELECT_SIGNAL;
    +  static const char *FOCUS_SIGNAL;
    +  static const char *BLUR_SIGNAL;
    +
    +  static const int BIT_ENABLED_CHANGED  = 0;
    +  static const int BIT_GOT_FOCUS        = 1;
    +  static const int BIT_INITIAL_FOCUS    = 2;
    +  static const int BIT_READONLY         = 3;
    +  static const int BIT_READONLY_CHANGED = 4;
    +  static const int BIT_TABINDEX_CHANGED = 5;
    +
    +  std::bitset<6> flags_;
    +  int            tabIndex_;
    +
    +  void undoSetFocus();
    +
    +  void setLabel(WLabel *label);
    +
    +  void validatorChanged();
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual WStatelessSlot *getStateless(Method method);
    +
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +  virtual void propagateSetEnabled(bool enabled);
    +
    +  virtual std::string formName() const;
    +
    +  friend class WLabel;
    +  friend class WValidator;
    +  friend class WebSession;
    +};
    +
    +}
    +
    +#endif // WFORM_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WFormWidget.C b/wt-3.1.7a/src/Wt/WFormWidget.C
    new file mode 100644
    index 0000000..2b7134f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WFormWidget.C
    @@ -0,0 +1,394 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WAbstractToggleButton"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WFormWidget"
    +#include "Wt/WJavaScript"
    +#include "Wt/WLabel"
    +
    +#include "JavaScriptLoader.h"
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WFormWidget.min.js"
    +#endif
    +
    +namespace Wt {
    +
    +const char *WFormWidget::CHANGE_SIGNAL = "M_change";
    +const char *WFormWidget::SELECT_SIGNAL = "select";
    +const char *WFormWidget::FOCUS_SIGNAL = "focus";
    +const char *WFormWidget::BLUR_SIGNAL = "blur";
    +
    +WFormWidget::WFormWidget(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    label_(0),
    +    validator_(0),
    +    validateJs_(0),
    +    filterInput_(0),
    +    removeEmptyText_(0),
    +    tabIndex_(0)
    +{ }
    +
    +#ifndef WT_TARGET_JAVA
    +WStatelessSlot *WFormWidget::getStateless(Method method)
    +{
    +  typedef void (WFormWidget::*Type)();
    +
    +  Type focusMethod = &WFormWidget::setFocus;
    +
    +  if (method == static_cast<WObject::Method>(focusMethod))
    +    return implementStateless(&WFormWidget::setFocus,
    +			      &WFormWidget::undoSetFocus);
    +  else
    +    return WInteractWidget::getStateless(method);
    +}
    +#endif
    +
    +WFormWidget::~WFormWidget()
    +{
    +  if (label_)
    +    label_->setBuddy((WFormWidget *)0);
    +
    +  if (validator_)
    +    validator_->removeFormWidget(this);
    +
    +  delete removeEmptyText_;
    +  delete validateJs_;
    +  delete filterInput_;
    +}
    +
    +EventSignal<>& WFormWidget::changed()
    +{
    +  return *voidEventSignal(CHANGE_SIGNAL, true);
    +}
    +
    +EventSignal<>& WFormWidget::selected()
    +{
    +  return *voidEventSignal(SELECT_SIGNAL, true);
    +}
    +
    +EventSignal<>& WFormWidget::blurred()
    +{
    +  return *voidEventSignal(BLUR_SIGNAL, true);
    +}
    +
    +EventSignal<>& WFormWidget::focussed()
    +{
    +  return *voidEventSignal(FOCUS_SIGNAL, true);
    +}
    +
    +void WFormWidget::setFocus(bool focus)
    +{
    +  flags_.set(BIT_GOT_FOCUS, focus);
    +  repaint(RepaintPropertyIEMobile);
    +
    +  WApplication *app = WApplication::instance();
    +  if (focus)
    +    app->setFocus(id(), -1, -1);
    +  else if (app->focus() == id())
    +    app->setFocus(std::string(), -1, -1);
    +}
    +
    +void WFormWidget::setFocus()
    +{
    +  setFocus(true);
    +}
    +
    +void WFormWidget::undoSetFocus()
    +{
    +}
    +
    +bool WFormWidget::hasFocus() const
    +{
    +  return WApplication::instance()->focus() == id();
    +}
    +
    +void WFormWidget::setEnabled(bool enabled)
    +{
    +  setDisabled(!enabled);
    +}
    +
    +void WFormWidget::propagateSetEnabled(bool enabled)
    +{
    +  flags_.set(BIT_ENABLED_CHANGED);
    +  repaint(RepaintPropertyAttribute);
    +  
    +  WInteractWidget::propagateSetEnabled(enabled);
    +}
    +
    +void WFormWidget::setReadOnly(bool readOnly)
    +{
    +  flags_.set(BIT_READONLY, readOnly);
    +  flags_.set(BIT_READONLY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +bool WFormWidget::isReadOnly() const
    +{
    +  return flags_.test(BIT_READONLY);
    +}
    +
    +void WFormWidget::setEmptyText(const WString& emptyText) 
    +{
    +  emptyText_ = emptyText;
    +
    +  WApplication* app = WApplication::instance();
    +  const WEnvironment& env = app->environment();
    +
    +  if (env.ajax()) {
    +    if (!emptyText_.empty()) {
    +      const char *THIS_JS = "js/WFormWidget.js";
    +
    +      if (!app->javaScriptLoaded(THIS_JS)) {
    +	LOAD_JAVASCRIPT(app, THIS_JS, "WFormWidget", wtjs1);
    +	app->setJavaScriptLoaded(THIS_JS);
    +      }
    +
    +      if (!removeEmptyText_) {
    +	removeEmptyText_ = new JSlot(this);
    +      
    +	focussed().connect(*removeEmptyText_);
    +	blurred().connect(*removeEmptyText_);
    +	keyWentDown().connect(*removeEmptyText_);
    +
    +	std::string jsFunction = 
    +	  "function(obj, event) {"
    +	  """jQuery.data(" + jsRef() + ", 'obj').updateEmptyText();"
    +	  "}";
    +	removeEmptyText_->setJavaScript(jsFunction);
    +      }
    +    } else {
    +      delete removeEmptyText_;
    +    }
    +  } else {
    +    setToolTip(emptyText);
    +  }
    +}
    +
    +void WFormWidget::render(WFlags<RenderFlag> flags)
    +{
    +  if ((flags & RenderFull) && !emptyText_.empty()) {
    +    WApplication* app = WApplication::instance();
    +    const WEnvironment& env = app->environment();
    +    if (env.ajax())
    +      app->doJavaScript("new " WT_CLASS ".WFormWidget("
    +			+ app->javaScriptClass() + "," 
    +			+ jsRef() + ","
    +			+ "'" + emptyText_.toUTF8() + "');");
    +  }
    +
    +  WInteractWidget::render(flags);
    +}
    +
    +void WFormWidget::updateEmptyText()
    +{
    +  if (!emptyText_.empty() && isRendered())
    +    WApplication::instance()
    +      ->doJavaScript("jQuery.data(" + jsRef() + ", 'obj')"
    +		     ".updateEmptyText();");
    +}
    +
    +void WFormWidget::enableAjax()
    +{
    +  if (!emptyText_.empty() && toolTip() == emptyText_) {
    +    setToolTip("");
    +    setEmptyText(emptyText_);
    +  }
    +  
    +  WInteractWidget::enableAjax();
    +}
    +
    +void WFormWidget::validatorChanged()
    +{
    +  std::string validateJS = validator_->javaScriptValidate(jsRef());
    +  if (!validateJS.empty()) {
    +    if (!validateJs_) {
    +      validateJs_ = new JSlot(this);
    +
    +      keyWentUp().connect(*validateJs_);
    +      changed().connect(*validateJs_);
    +      clicked().connect(*validateJs_);
    +    }
    +
    +    validateJs_->setJavaScript
    +      ("function(self, event) {"
    +       """var v=" + validateJS + ";"
    +       """if (v.valid) {"
    +       ""  "self.removeAttribute('title');"
    +       ""  "$(self).removeClass('Wt-invalid');"
    +       """} else {"
    +       ""  "self.setAttribute('title', v.message);"
    +       ""  "$(self).addClass('Wt-invalid');"
    +       """}"
    +       "}");
    +  } else {
    +    delete validateJs_;
    +    validateJs_ = 0;
    +  }
    +
    +  std::string inputFilter = validator_->inputFilter();
    +  if (!inputFilter.empty()) {
    +    if (!filterInput_) {
    +      filterInput_ = new JSlot();
    +
    +      keyPressed().connect(*filterInput_);
    +    }
    +
    +    Wt::Utils::replace(inputFilter, '/', "\\/");
    +
    +    filterInput_->setJavaScript
    +      ("function(self,e){\n"
    +       """var c=\n"
    +       ""  "String.fromCharCode((typeof e.charCode!=='undefined') ?"
    +       ""                       "e.charCode : e.keyCode);\n"
    +       """if(/" + inputFilter + "/.test(c))\n"
    +       ""  "return true;\n"
    +       """else\n"
    +       ""  WT_CLASS ".cancelEvent(e);\n"
    +       "}");
    +  } else {
    +    delete filterInput_;
    +    filterInput_ = 0;
    +  }
    +}
    +
    +void WFormWidget::updateDom(DomElement& element, bool all)
    +{
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  if (!env.agentIsIE() || !dynamic_cast<WAbstractToggleButton *>(this)) {
    +    EventSignal<> *s = voidEventSignal(CHANGE_SIGNAL, false);
    +    if (s)
    +      updateSignalConnection(element, *s, "change", all);
    +  }
    +
    +  if (flags_.test(BIT_ENABLED_CHANGED) || all) {
    +    if (!all || !isEnabled())
    +      element.setProperty(Wt::PropertyDisabled,
    +			  isEnabled() ? "false" : "true");
    +    flags_.reset(BIT_ENABLED_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_READONLY_CHANGED) || all) {
    +    if (!all || isReadOnly())
    +      element.setProperty(Wt::PropertyReadOnly,
    +			  isReadOnly() ? "true" : "false");
    +    flags_.reset(BIT_READONLY_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_TABINDEX_CHANGED) || all) {
    +    if (!all || tabIndex_)
    +      element.setProperty(PropertyTabIndex,
    +			  boost::lexical_cast<std::string>(tabIndex_));
    +    flags_.reset(BIT_TABINDEX_CHANGED);
    +  }
    +
    +  if (isEnabled()) {
    +    if (all && flags_.test(BIT_GOT_FOCUS))
    +      flags_.set(BIT_INITIAL_FOCUS);
    +
    +    if (flags_.test(BIT_GOT_FOCUS)
    +	|| (all && flags_.test(BIT_INITIAL_FOCUS))) {
    +      element.callJavaScript("setTimeout(function() {"
    +			     """var f = " + jsRef() + ";"
    +			     """if (f) f.focus(); }, "
    +			     + (env.agentIsIElt(9) ? "500" : "10") + ");");
    +
    +      flags_.reset(BIT_GOT_FOCUS);
    +    }
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WFormWidget::propagateRenderOk(bool deep)
    +{
    +  flags_.reset(BIT_ENABLED_CHANGED);
    +  flags_.reset(BIT_TABINDEX_CHANGED);
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +void WFormWidget::setLabel(WLabel *label)
    +{
    +  if (label_) {
    +    WLabel *l = label_;
    +    label_ = 0;
    +    l->setBuddy((WFormWidget *)0);
    +  }
    +  label_ = label;
    +
    +  if (label_)
    +    label_->setHidden(isHidden());
    +}
    +
    +void WFormWidget::setHidden(bool hidden)
    +{
    +  if (label_)
    +    label_->setHidden(hidden);
    +
    +  WInteractWidget::setHidden(hidden);
    +}
    +
    +void WFormWidget::setValidator(WValidator *validator)
    +{
    +  if (validator_)
    +    validator_->removeFormWidget(this);
    +
    +  validator_ = validator;
    +
    +  if (validator_) {
    +#ifndef WT_TARGET_JAVA
    +    if (!validator_->parent())
    +      WObject::addChild(validator_);
    +#endif // WT_TARGET_JAVA
    +
    +    validator_->addFormWidget(this);
    +    validatorChanged();
    +    validate();
    +#ifndef WT_TARGET_JAVA
    +    if (!validator_->parent())
    +      WObject::addChild(validator_);
    +#endif // WT_TARGET_JAVA
    +  } else {
    +    removeStyleClass("Wt-invalid", true);
    +    delete validateJs_;
    +    validateJs_ = 0;
    +    delete filterInput_;
    +    filterInput_ = 0;
    +  }
    +
    +}
    +
    +WValidator::State WFormWidget::validate()
    +{
    +  return WValidator::Valid;
    +}
    +
    +std::string WFormWidget::formName() const
    +{
    +  return id();
    +}
    +
    +void WFormWidget::setTabIndex(int index)
    +{
    +  tabIndex_ = index;
    +
    +  flags_.set(BIT_TABINDEX_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +int WFormWidget::tabIndex() const
    +{
    +  return tabIndex_;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WGLWidget b/wt-3.1.7a/src/Wt/WGLWidget
    new file mode 100644
    index 0000000..6375f64
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGLWidget
    @@ -0,0 +1,2019 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WGLWIDGET_H_
    +#define WGLWIDGET_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WGenericMatrix>
    +
    +namespace Wt {
    +
    +#if 0
    +#define GLDEBUG do {js_ << "\n{var err = ctx.getError(); if(err != ctx.NO_ERROR) {alert('error " << __FUNCTION__ << ": ' + err); debugger;}}\n";} while(false)
    +#else
    +#define GLDEBUG
    +#endif
    +
    +class WHTML5Video;
    +class WImage;
    +
    +// Incomplete implementation of the new webgl standard. This is to be
    +// considered as a technology preview, and we welcome comments regarding
    +// this interface.
    +// Expect this interface to change.
    +// TODO: provide a mechanism to write your own JavaScript
    +
    +/*! \class WGLWidget Wt/WGLWidget Wt/WGLWidget
    + *  \brief WebGL support class
    + *
    + * The WGLWidget class is an interface to the HTML5 WebGL infrastructure. Its
    + * implementation started based on the working drafts of the Khronos group, and
    + * will be updated as the standard stabilizes.
    + *
    + * The goal of the WGLWidget class is to provide a method to render 3D
    + * structures in the browser, where rendering and rerendering is normally
    + * done in JavaScript without interaction from the server, unless the
    + * scene requires updates.
    + *
    + * This widget is work in progress. The API may change in the future because
    + * of new features, reorganizations or changes in the WebGL draft.
    + *
    + * For this purpose, the JavaScript functions to render the class are cached
    + * on the browser. There are four functions that you may implement in a
    + * specialization of this class:
    + * <ul>
    + * <li>initializeGL(): this function is executed only once, right after the
    + *     successful detection of WebGL in the browser. (note: in future versions,
    + *     it may be re-executed when the webglcontextlost signal is fired, but
    + *     this is currently not yet implemented). This is the ideal location to
    + *     compose shader programs, send VBO's to the client, extract uniform and
    + *     attribute locations, ... Due to the presence of VBO's, this function
    + *     may generate a large response to the client.
    + * <li>resizeGL(): this function is executed whenever the canvas dimensions
    + *     change. A change in canvas size will require you to invoke the
    + *     viewport() function again, as well as recalculate the projection
    + *     matrices (especially when the aspect ratio has changed). Thie
    + *     resizeGL() function is therefore the ideal location to set those
    + *     properties.
    + *     The resizeGL() function is invoked automatically on every resize,
    + *     and after the first initializeGL() invocation. Additional invocations
    + *     may be triggered by calling repaint() with the RESIZE_GL flag.
    + * <li>paintGL(): this is the workhorse. It is executed every time that the
    + *     scene is to be redrawn. You can use the VBO's and shaders prepared
    + *     in the initializeGL() phase. Usually, this function sets uniforms
    + *     and attributes, links attributes to VBO's, applies textures, and
    + *     draws primitives.
    + *     You may also create local programs, buffers, ... Remeber that this
    + *     function is executed a lot of times, so every buffer/program created
    + *     in this function should also be destroyed to avoid memory leaks.
    + *     This function is transmitted once to the client, and is executed
    + *     when the scene needs to be redrawn. Redraws may be triggered from
    + *     mouse events, timer triggers, events on e.g. a video element, or
    + *     whatever other event.
    + *     The paintGL() function can be updated through invoking repaintGL()
    + *     with the PAINT_GL flag.
    + * <li>updateGL(): VBO's, programs, uniforms, GL properties, or anything
    + *     else set during intializeGL() are not necessarily immutable. If
    + *     you want to change, add, remove or reconfigure those properties,
    + *     the execution of an updateGL() function can be triggered by invoking
    + *     repaintGL() with the UPDATE_GL flag. This signals that updateGL()
    + *     needs to be evaluated - just once.
    + * </ul>
    + *
    + * The WebGL functions are intended to be used exclusively from within the
    + * invocation of the four callback functions mentioned above. In order to
    + * manually trigger the execution of these function, use the repaintGL().
    + *
    + * A WGLWidget must be given a size explicitly, or must be put inside a
    + * layout manager that manages its width and height. The behaviour of a
    + * WGLWidget that was not given a size is undefined.
    + *
    + *
    + * Client side matrices.
    + * The WGLWidget has a mechanism to use client-side modifiable matrices
    + * in the render functions. These matrices can be used identically to the
    + * 'constant', with the advantage that there is no need to have a
    + * roundtrip to the server to redraw the scene when they are changed.
    + * As such, they are ideal for mouse-based camera manipulations, timer
    + * triggered animations, or object manipulations.
    + *
    + * Note: the client side matrices are currently not yet communicated back
    + * to the server, but that is an implementation idea for the future.
    + */
    +class WT_API WGLWidget: public WInteractWidget
    +{
    +public:
    +  typedef std::string Shader;
    +  typedef std::string Program;
    +  typedef std::string AttribLocation;
    +  typedef std::string Buffer;
    +  typedef std::string UniformLocation;
    +  typedef std::string Texture;
    +
    +  /*! \brief A client-side JavaScript matrix
    +   *
    +   * A JavaScriptMatrix has methods that make it possible to do client-side
    +   * calculations on matrices.
    +   *
    +   * Important: only the jsRef() of the return value from a call to
    +   * createJavaScriptMatrix() is a variable name that can be used 
    +   * in custom JavaScript to modify a matrix from external scripts.
    +   * The jsRef() of return values of operations should not be
    +   * used as (they refer to unnamed temporary objects - rvalues in
    +   * C++-lingo).
    +   */
    +  class WT_API JavaScriptMatrix4x4 {
    +  public:
    +    // Create an identity matrix
    +    JavaScriptMatrix4x4(const std::string &jsVariable);
    +    JavaScriptMatrix4x4();
    +    JavaScriptMatrix4x4(const JavaScriptMatrix4x4 &other);
    +
    +    JavaScriptMatrix4x4 &operator=(const JavaScriptMatrix4x4 &rhs);
    +
    +    std::string jsRef() const { return jsRef_; }
    +
    +    JavaScriptMatrix4x4 inverted() const;
    +    JavaScriptMatrix4x4 transposed() const;
    +
    +    JavaScriptMatrix4x4 operator*(const WGenericMatrix<double, 4, 4> &m) const;
    +
    +  private:
    +    std::string jsRef_;
    +  };
    +
    +  /*! \brief Construct a WebGL widget.
    +   *
    +   * Before the first rendering, you must apply a size to the WGLWidget.
    +   *
    +   * /code
    +   * /endcode
    +   */
    +  WGLWidget(WContainerWidget *parent);
    +
    +  /*! \brief Destructor
    +   */
    +  ~WGLWidget();
    +
    +  /*! \brief Initialize the WebGL state when the widget is first shown.
    +   *
    +   * initializeGL() is called once, when the widget is first rendered. It
    +   * usually creates most of the WebGL related state: shaders, VBOs,
    +   * uniform locations, ...
    +   *
    +   * If this state is to be updated during the lifetime of the widget,
    +   * you should specialize the updateGL() to accomodate for this.
    +   *
    +   * Note: in a future version, this method will probably also be invoked
    +   * on contextrestore events.
    +   */
    +  virtual void initializeGL();
    +
    +  /*! \brief Act on resize events
    +   *
    +   * Usually, this method only contains functions to set the viewport
    +   * and the projection matrix (as this is aspect ration dependent).
    +   *
    +   * resizeGL() is rendered after initializeGL, and whenever widget is
    +   * resized. After this method finishes, the widget is repainted with
    +   * the cached client-side paint function.
    +   */
    +  virtual void resizeGL(int width, int height);
    +
    +  /*! \brief Update the client-side painting function.
    +   *
    +   * This method is invoked client-side when a repaint is required,
    +   * i.e. when the repaintSlot() (a JavaScript-side JSlot) is triggered.
    +   * Typical examples are: after mouse-based camera movements, after
    +   * a timed update of a camera or an object's position, after
    +   * a resize event (resizeGL() will also be called then), after
    +   * an animation event, ... In many cases, this function will be
    +   * executed client-side many many times.
    +   *
    +   * Using the WebGL functions from this class, you construct a scene.
    +   * The implementation tracks all JavaScript calls that need to be
    +   * performed to draw the scenes, and will replay them verbatim on
    +   * every trigger of the repaintSlot(). There are a few mechanisms
    +   * that may be employed to change what is rendered without updating
    +   * the paintGL() cache:
    +   * <ul>
    +   * <li>Client-side matrices may be used to change camera viewpoints,
    +   *     manipilate separate object's model transformation matrices, ...
    +   *     </li>
    +   * <li>Shader sources can be updated without requiring the paint
    +   *     function to be renewed</li>
    +   * </ul>
    +   *
    +   * Updating the paintGL() cache is usually not too expensive; the VBOs,
    +   * which are large in many cases, are already at the client side, while
    +   * the paintGL() code only draws the VBOs. Of course, if you have to
    +   * draw many separate objects, the paintGL() JS code may become large
    +   * and updating is more expensive.
    +   *
    +   * In order to update the paintGL() cache, call repaintGL() with
    +   * the PAINT_GL parameter, which will cause the invocation of this
    +   * method.
    +   */
    +  virtual void paintGL();
    +
    +  /*! \brief Update state set in initializeGL()
    +   *
    +   * Invoked when repaint is called with the UPDATE_GL call.
    +   *
    +   * This is intended to be executed when you want to change programs,
    +   * 'constant' uniforms, or even VBO's, ... without resending already
    +   * initialized data. It is a mechanism to make changes to what you've
    +   * set in intializeGL(). For every server-side invocation of this method,
    +   * the result will be rendered client-side exactly once.
    +   */
    +  virtual void updateGL();
    +
    +  /*! \brief Specifies what WebGL function needs to be updated
    +   */
    +  enum ClientSideRenderer {PAINT_GL = 1,  //!< refresh paintGL()
    +                           RESIZE_GL = 2, //!< refresh resizeGL()
    +                           UPDATE_GL = 4  //!< refresh updateGL()
    +  };
    +
    +  /*
    +   * Request invocation of resizeGL, paintGL and/or updateGL.
    +   *
    +   * If invoked with PAINT_GL, the client-side cached paint function
    +   * is updated. If invoked with RESIZE_GL or UPDATE_GL, the code
    +   * will be executed once.
    +   *
    +   * If invoked with multiple flags set, the order of execution will be
    +   * updateGL(), resizeGL(), paintGL().
    +   */
    +  void repaintGL(WFlags<ClientSideRenderer> which);
    +
    +  void resize(const WLength &width, const WLength &height);
    +
    +
    +
    +  /*! \brief The enourmous GLenum
    +   *
    +   * This enum contains all numeric constants defined by the WebGL standard.
    +   */
    +  enum GLenum {
    +    /* ClearBufferMask */
    +    DEPTH_BUFFER_BIT               = 0x00000100,
    +    STENCIL_BUFFER_BIT             = 0x00000400,
    +    COLOR_BUFFER_BIT               = 0x00004000,
    +    
    +    /* BeginMode */
    +    POINTS                         = 0x0000,
    +    LINES                          = 0x0001,
    +    LINE_LOOP                      = 0x0002,
    +    LINE_STRIP                     = 0x0003,
    +    TRIANGLES                      = 0x0004,
    +    TRIANGLE_STRIP                 = 0x0005,
    +    TRIANGLE_FAN                   = 0x0006,
    +    
    +    /* AlphaFunction (not supported in ES20) */
    +    /*      NEVER */
    +    /*      LESS */
    +    /*      EQUAL */
    +    /*      LEQUAL */
    +    /*      GREATER */
    +    /*      NOTEQUAL */
    +    /*      GEQUAL */
    +    /*      ALWAYS */
    +    
    +    /* BlendingFactorDest */
    +    ZERO                           = 0,
    +    ONE                            = 1,
    +    SRC_COLOR                      = 0x0300,
    +    ONE_MINUS_SRC_COLOR            = 0x0301,
    +    SRC_ALPHA                      = 0x0302,
    +    ONE_MINUS_SRC_ALPHA            = 0x0303,
    +    DST_ALPHA                      = 0x0304,
    +    ONE_MINUS_DST_ALPHA            = 0x0305,
    +    
    +    /* BlendingFactorSrc */
    +    /*      ZERO */
    +    /*      ONE */
    +    DST_COLOR                      = 0x0306,
    +    ONE_MINUS_DST_COLOR            = 0x0307,
    +    SRC_ALPHA_SATURATE             = 0x0308,
    +    /*      SRC_ALPHA */
    +    /*      ONE_MINUS_SRC_ALPHA */
    +    /*      DST_ALPHA */
    +    /*      ONE_MINUS_DST_ALPHA */
    +    
    +    /* BlendEquationSeparate */
    +    FUNC_ADD                       = 0x8006,
    +    BLEND_EQUATION                 = 0x8009,
    +    BLEND_EQUATION_RGB             = 0x8009,   /* same as BLEND_EQUATION */
    +    BLEND_EQUATION_ALPHA           = 0x883D,
    +    
    +    /* BlendSubtract */
    +    FUNC_SUBTRACT                  = 0x800A,
    +    FUNC_REVERSE_SUBTRACT          = 0x800B,
    +    
    +    /* Separate Blend Functions */
    +    BLEND_DST_RGB                  = 0x80C8,
    +    BLEND_SRC_RGB                  = 0x80C9,
    +    BLEND_DST_ALPHA                = 0x80CA,
    +    BLEND_SRC_ALPHA                = 0x80CB,
    +    CONSTANT_COLOR                 = 0x8001,
    +    ONE_MINUS_CONSTANT_COLOR       = 0x8002,
    +    CONSTANT_ALPHA                 = 0x8003,
    +    ONE_MINUS_CONSTANT_ALPHA       = 0x8004,
    +    BLEND_COLOR                    = 0x8005,
    +    
    +    /* Buffer Objects */
    +    ARRAY_BUFFER                   = 0x8892,
    +    ELEMENT_ARRAY_BUFFER           = 0x8893,
    +    ARRAY_BUFFER_BINDING           = 0x8894,
    +    ELEMENT_ARRAY_BUFFER_BINDING   = 0x8895,
    +    
    +    STREAM_DRAW                    = 0x88E0,
    +    STATIC_DRAW                    = 0x88E4,
    +    DYNAMIC_DRAW                   = 0x88E8,
    +    
    +    BUFFER_SIZE                    = 0x8764,
    +    BUFFER_USAGE                   = 0x8765,
    +    
    +    CURRENT_VERTEX_ATTRIB          = 0x8626,
    +    
    +    /* CullFaceMode */
    +    FRONT                          = 0x0404,
    +    BACK                           = 0x0405,
    +    FRONT_AND_BACK                 = 0x0408,
    +    
    +    /* DepthFunction */
    +    /*      NEVER */
    +    /*      LESS */
    +    /*      EQUAL */
    +    /*      LEQUAL */
    +    /*      GREATER */
    +    /*      NOTEQUAL */
    +    /*      GEQUAL */
    +    /*      ALWAYS */
    +    
    +    /* EnableCap */
    +    /* TEXTURE_2D */
    +    CULL_FACE                      = 0x0B44,
    +    BLEND                          = 0x0BE2,
    +    DITHER                         = 0x0BD0,
    +    STENCIL_TEST                   = 0x0B90,
    +    DEPTH_TEST                     = 0x0B71,
    +    SCISSOR_TEST                   = 0x0C11,
    +    POLYGON_OFFSET_FILL            = 0x8037,
    +    SAMPLE_ALPHA_TO_COVERAGE       = 0x809E,
    +    SAMPLE_COVERAGE                = 0x80A0,
    +    
    +    /* ErrorCode */
    +    NO_ERROR                       = 0,
    +    INVALID_ENUM                   = 0x0500,
    +    INVALID_VALUE                  = 0x0501,
    +    INVALID_OPERATION              = 0x0502,
    +    OUT_OF_MEMORY                  = 0x0505,
    +    
    +    /* FrontFaceDirection */
    +    CW                             = 0x0900,
    +    CCW                            = 0x0901,
    +    
    +    /* GetPName */
    +    LINE_WIDTH                     = 0x0B21,
    +    ALIASED_POINT_SIZE_RANGE       = 0x846D,
    +    ALIASED_LINE_WIDTH_RANGE       = 0x846E,
    +    CULL_FACE_MODE                 = 0x0B45,
    +    FRONT_FACE                     = 0x0B46,
    +    DEPTH_RANGE                    = 0x0B70,
    +    DEPTH_WRITEMASK                = 0x0B72,
    +    DEPTH_CLEAR_VALUE              = 0x0B73,
    +    DEPTH_FUNC                     = 0x0B74,
    +    STENCIL_CLEAR_VALUE            = 0x0B91,
    +    STENCIL_FUNC                   = 0x0B92,
    +    STENCIL_FAIL                   = 0x0B94,
    +    STENCIL_PASS_DEPTH_FAIL        = 0x0B95,
    +    STENCIL_PASS_DEPTH_PASS        = 0x0B96,
    +    STENCIL_REF                    = 0x0B97,
    +    STENCIL_VALUE_MASK             = 0x0B93,
    +    STENCIL_WRITEMASK              = 0x0B98,
    +    STENCIL_BACK_FUNC              = 0x8800,
    +    STENCIL_BACK_FAIL              = 0x8801,
    +    STENCIL_BACK_PASS_DEPTH_FAIL   = 0x8802,
    +    STENCIL_BACK_PASS_DEPTH_PASS   = 0x8803,
    +    STENCIL_BACK_REF               = 0x8CA3,
    +    STENCIL_BACK_VALUE_MASK        = 0x8CA4,
    +    STENCIL_BACK_WRITEMASK         = 0x8CA5,
    +    VIEWPORT                       = 0x0BA2,
    +    SCISSOR_BOX                    = 0x0C10,
    +    /*      SCISSOR_TEST */
    +    COLOR_CLEAR_VALUE              = 0x0C22,
    +    COLOR_WRITEMASK                = 0x0C23,
    +    UNPACK_ALIGNMENT               = 0x0CF5,
    +    PACK_ALIGNMENT                 = 0x0D05,
    +    MAX_TEXTURE_SIZE               = 0x0D33,
    +    MAX_VIEWPORT_DIMS              = 0x0D3A,
    +    SUBPIXEL_BITS                  = 0x0D50,
    +    RED_BITS                       = 0x0D52,
    +    GREEN_BITS                     = 0x0D53,
    +    BLUE_BITS                      = 0x0D54,
    +    ALPHA_BITS                     = 0x0D55,
    +    DEPTH_BITS                     = 0x0D56,
    +    STENCIL_BITS                   = 0x0D57,
    +    POLYGON_OFFSET_UNITS           = 0x2A00,
    +    /*      POLYGON_OFFSET_FILL */
    +    POLYGON_OFFSET_FACTOR          = 0x8038,
    +    TEXTURE_BINDING_2D             = 0x8069,
    +    SAMPLE_BUFFERS                 = 0x80A8,
    +    SAMPLES                        = 0x80A9,
    +    SAMPLE_COVERAGE_VALUE          = 0x80AA,
    +    SAMPLE_COVERAGE_INVERT         = 0x80AB,
    +    
    +    /* GetTextureParameter */
    +    /*      TEXTURE_MAG_FILTER */
    +    /*      TEXTURE_MIN_FILTER */
    +    /*      TEXTURE_WRAP_S */
    +    /*      TEXTURE_WRAP_T */
    +    
    +    NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2,
    +    COMPRESSED_TEXTURE_FORMATS     = 0x86A3,
    +    
    +    /* HintMode */
    +    DONT_CARE                      = 0x1100,
    +    FASTEST                        = 0x1101,
    +    NICEST                         = 0x1102,
    +    
    +    /* HintTarget */
    +    GENERATE_MIPMAP_HINT            = 0x8192,
    +    
    +    /* DataType */
    +    BYTE                           = 0x1400,
    +    UNSIGNED_BYTE                  = 0x1401,
    +    SHORT                          = 0x1402,
    +    UNSIGNED_SHORT                 = 0x1403,
    +    INT                            = 0x1404,
    +    UNSIGNED_INT                   = 0x1405,
    +    FLOAT                          = 0x1406,
    +    
    +    /* PixelFormat */
    +    DEPTH_COMPONENT                = 0x1902,
    +    ALPHA                          = 0x1906,
    +    RGB                            = 0x1907,
    +    RGBA                           = 0x1908,
    +    LUMINANCE                      = 0x1909,
    +    LUMINANCE_ALPHA                = 0x190A,
    +    
    +    /* PixelType */
    +    /*      UNSIGNED_BYTE */
    +    UNSIGNED_SHORT_4_4_4_4         = 0x8033,
    +    UNSIGNED_SHORT_5_5_5_1         = 0x8034,
    +    UNSIGNED_SHORT_5_6_5           = 0x8363,
    +    
    +    /* Shaders */
    +    FRAGMENT_SHADER                  = 0x8B30,
    +    VERTEX_SHADER                    = 0x8B31,
    +    MAX_VERTEX_ATTRIBS               = 0x8869,
    +    MAX_VERTEX_UNIFORM_VECTORS       = 0x8DFB,
    +    MAX_VARYING_VECTORS              = 0x8DFC,
    +    MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D,
    +    MAX_VERTEX_TEXTURE_IMAGE_UNITS   = 0x8B4C,
    +    MAX_TEXTURE_IMAGE_UNITS          = 0x8872,
    +    MAX_FRAGMENT_UNIFORM_VECTORS     = 0x8DFD,
    +    SHADER_TYPE                      = 0x8B4F,
    +    DELETE_STATUS                    = 0x8B80,
    +    LINK_STATUS                      = 0x8B82,
    +    VALIDATE_STATUS                  = 0x8B83,
    +    ATTACHED_SHADERS                 = 0x8B85,
    +    ACTIVE_UNIFORMS                  = 0x8B86,
    +    ACTIVE_UNIFORM_MAX_LENGTH        = 0x8B87,
    +    ACTIVE_ATTRIBUTES                = 0x8B89,
    +    ACTIVE_ATTRIBUTE_MAX_LENGTH      = 0x8B8A,
    +    SHADING_LANGUAGE_VERSION         = 0x8B8C,
    +    CURRENT_PROGRAM                  = 0x8B8D,
    +    
    +    /* StencilFunction */
    +    NEVER                          = 0x0200,
    +    LESS                           = 0x0201,
    +    EQUAL                          = 0x0202,
    +    LEQUAL                         = 0x0203,
    +    GREATER                        = 0x0204,
    +    NOTEQUAL                       = 0x0205,
    +    GEQUAL                         = 0x0206,
    +    ALWAYS                         = 0x0207,
    +    
    +    /* StencilOp */
    +    /*      ZERO */
    +    KEEP                           = 0x1E00,
    +    REPLACE                        = 0x1E01,
    +    INCR                           = 0x1E02,
    +    DECR                           = 0x1E03,
    +    INVERT                         = 0x150A,
    +    INCR_WRAP                      = 0x8507,
    +    DECR_WRAP                      = 0x8508,
    +    
    +    /* StringName */
    +    VENDOR                         = 0x1F00,
    +    RENDERER                       = 0x1F01,
    +    VERSION                        = 0x1F02,
    +    
    +    /* TextureMagFilter */
    +    NEAREST                        = 0x2600,
    +    LINEAR                         = 0x2601,
    +    
    +    /* TextureMinFilter */
    +    /*      NEAREST */
    +    /*      LINEAR */
    +    NEAREST_MIPMAP_NEAREST         = 0x2700,
    +    LINEAR_MIPMAP_NEAREST          = 0x2701,
    +    NEAREST_MIPMAP_LINEAR          = 0x2702,
    +    LINEAR_MIPMAP_LINEAR           = 0x2703,
    +    
    +    /* TextureParameterName */
    +    TEXTURE_MAG_FILTER             = 0x2800,
    +    TEXTURE_MIN_FILTER             = 0x2801,
    +    TEXTURE_WRAP_S                 = 0x2802,
    +    TEXTURE_WRAP_T                 = 0x2803,
    +    
    +    /* TextureTarget */
    +    TEXTURE_2D                     = 0x0DE1,
    +    TEXTURE                        = 0x1702,
    +    
    +    TEXTURE_CUBE_MAP               = 0x8513,
    +    TEXTURE_BINDING_CUBE_MAP       = 0x8514,
    +    TEXTURE_CUBE_MAP_POSITIVE_X    = 0x8515,
    +    TEXTURE_CUBE_MAP_NEGATIVE_X    = 0x8516,
    +    TEXTURE_CUBE_MAP_POSITIVE_Y    = 0x8517,
    +    TEXTURE_CUBE_MAP_NEGATIVE_Y    = 0x8518,
    +    TEXTURE_CUBE_MAP_POSITIVE_Z    = 0x8519,
    +    TEXTURE_CUBE_MAP_NEGATIVE_Z    = 0x851A,
    +    MAX_CUBE_MAP_TEXTURE_SIZE      = 0x851C,
    +    
    +    /* TextureUnit */
    +    TEXTURE0                       = 0x84C0,
    +    TEXTURE1                       = 0x84C1,
    +    TEXTURE2                       = 0x84C2,
    +    TEXTURE3                       = 0x84C3,
    +    TEXTURE4                       = 0x84C4,
    +    TEXTURE5                       = 0x84C5,
    +    TEXTURE6                       = 0x84C6,
    +    TEXTURE7                       = 0x84C7,
    +    TEXTURE8                       = 0x84C8,
    +    TEXTURE9                       = 0x84C9,
    +    TEXTURE10                      = 0x84CA,
    +    TEXTURE11                      = 0x84CB,
    +    TEXTURE12                      = 0x84CC,
    +    TEXTURE13                      = 0x84CD,
    +    TEXTURE14                      = 0x84CE,
    +    TEXTURE15                      = 0x84CF,
    +    TEXTURE16                      = 0x84D0,
    +    TEXTURE17                      = 0x84D1,
    +    TEXTURE18                      = 0x84D2,
    +    TEXTURE19                      = 0x84D3,
    +    TEXTURE20                      = 0x84D4,
    +    TEXTURE21                      = 0x84D5,
    +    TEXTURE22                      = 0x84D6,
    +    TEXTURE23                      = 0x84D7,
    +    TEXTURE24                      = 0x84D8,
    +    TEXTURE25                      = 0x84D9,
    +    TEXTURE26                      = 0x84DA,
    +    TEXTURE27                      = 0x84DB,
    +    TEXTURE28                      = 0x84DC,
    +    TEXTURE29                      = 0x84DD,
    +    TEXTURE30                      = 0x84DE,
    +    TEXTURE31                      = 0x84DF,
    +    ACTIVE_TEXTURE                 = 0x84E0,
    +    
    +    /* TextureWrapMode */
    +    REPEAT                         = 0x2901,
    +    CLAMP_TO_EDGE                  = 0x812F,
    +    MIRRORED_REPEAT                = 0x8370,
    +    
    +    /* Uniform Types */
    +    FLOAT_VEC2                     = 0x8B50,
    +    FLOAT_VEC3                     = 0x8B51,
    +    FLOAT_VEC4                     = 0x8B52,
    +    INT_VEC2                       = 0x8B53,
    +    INT_VEC3                       = 0x8B54,
    +    INT_VEC4                       = 0x8B55,
    +    BOOL                           = 0x8B56,
    +    BOOL_VEC2                      = 0x8B57,
    +    BOOL_VEC3                      = 0x8B58,
    +    BOOL_VEC4                      = 0x8B59,
    +    FLOAT_MAT2                     = 0x8B5A,
    +    FLOAT_MAT3                     = 0x8B5B,
    +    FLOAT_MAT4                     = 0x8B5C,
    +    SAMPLER_2D                     = 0x8B5E,
    +    SAMPLER_CUBE                   = 0x8B60,
    +    
    +    /* Vertex Arrays */
    +    VERTEX_ATTRIB_ARRAY_ENABLED        = 0x8622,
    +    VERTEX_ATTRIB_ARRAY_SIZE           = 0x8623,
    +    VERTEX_ATTRIB_ARRAY_STRIDE         = 0x8624,
    +    VERTEX_ATTRIB_ARRAY_TYPE           = 0x8625,
    +    VERTEX_ATTRIB_ARRAY_NORMALIZED     = 0x886A,
    +    VERTEX_ATTRIB_ARRAY_POINTER        = 0x8645,
    +    VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F,
    +    
    +    /* Shader Source */
    +    COMPILE_STATUS                 = 0x8B81,
    +    INFO_LOG_LENGTH                = 0x8B84,
    +    SHADER_SOURCE_LENGTH           = 0x8B88,
    +    
    +    /* Shader Precision-Specified Types */
    +    LOW_FLOAT                      = 0x8DF0,
    +    MEDIUM_FLOAT                   = 0x8DF1,
    +    HIGH_FLOAT                     = 0x8DF2,
    +    LOW_INT                        = 0x8DF3,
    +    MEDIUM_INT                     = 0x8DF4,
    +    HIGH_INT                       = 0x8DF5,
    +    
    +    /* Framebuffer Object. */
    +    FRAMEBUFFER                    = 0x8D40,
    +    RENDERBUFFER                   = 0x8D41,
    +    
    +    RGBA4                          = 0x8056,
    +    RGB5_A1                        = 0x8057,
    +    RGB565                         = 0x8D62,
    +    DEPTH_COMPONENT16              = 0x81A5,
    +    STENCIL_INDEX                  = 0x1901,
    +    STENCIL_INDEX8                 = 0x8D48,
    +    DEPTH_STENCIL                  = 0x84F9,
    +    
    +    RENDERBUFFER_WIDTH             = 0x8D42,
    +    RENDERBUFFER_HEIGHT            = 0x8D43,
    +    RENDERBUFFER_INTERNAL_FORMAT   = 0x8D44,
    +    RENDERBUFFER_RED_SIZE          = 0x8D50,
    +    RENDERBUFFER_GREEN_SIZE        = 0x8D51,
    +    RENDERBUFFER_BLUE_SIZE         = 0x8D52,
    +    RENDERBUFFER_ALPHA_SIZE        = 0x8D53,
    +    RENDERBUFFER_DEPTH_SIZE        = 0x8D54,
    +    RENDERBUFFER_STENCIL_SIZE      = 0x8D55,
    +    
    +    FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           = 0x8CD0,
    +    FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           = 0x8CD1,
    +    FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         = 0x8CD2,
    +    FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3,
    +    
    +    COLOR_ATTACHMENT0              = 0x8CE0,
    +    DEPTH_ATTACHMENT               = 0x8D00,
    +    STENCIL_ATTACHMENT             = 0x8D20,
    +    DEPTH_STENCIL_ATTACHMENT       = 0x821A,
    +    
    +    NONE                           = 0,
    +    
    +    FRAMEBUFFER_COMPLETE                      = 0x8CD5,
    +    FRAMEBUFFER_INCOMPLETE_ATTACHMENT         = 0x8CD6,
    +    FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7,
    +    FRAMEBUFFER_INCOMPLETE_DIMENSIONS         = 0x8CD9,
    +    FRAMEBUFFER_UNSUPPORTED                   = 0x8CDD,
    +    
    +    FRAMEBUFFER_BINDING            = 0x8CA6,
    +    RENDERBUFFER_BINDING           = 0x8CA7,
    +    MAX_RENDERBUFFER_SIZE          = 0x84E8,
    +    
    +    INVALID_FRAMEBUFFER_OPERATION  = 0x0506,
    +    
    +    /* WebGL-specific enums */
    +    UNPACK_FLIP_Y_WEBGL            = 0x9240,
    +    UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241,
    +    CONTEXT_LOST_WEBGL             = 0x9242,
    +    UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243,
    +    BROWSER_DEFAULT_WEBGL          = 0x9244,
    +  };
    +  
    +  
    +  /*! @name WebGL methods
    +   * The WebGL methods are mostly 1-on-1 translated to the identical
    +   * JavaScript call. You can use the WebGL methods in your resizeGL(),
    +   * paintGL() and updateGL() specializations. Wt takes care that data,
    +   * arguments, ... are transfered to the client side and that the equivalent
    +   * JavaScript WebGL funtion is executed.
    +   * @{
    +   */
    +  /*! \brief GL function to activate an existing texture
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glActiveTexture.xml">
    +   * glActiveTexture() OpenGL ES manpage</a>
    +   */
    +  void activeTexture(GLenum texture);
    +
    +  /*! \brief GL function to attach a shader to a program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glAttachShader.xml">
    +   * glAttachShader() OpenGL ES manpage</a>
    +   */
    +  void attachShader(Program program, Shader shader);
    +
    +  /*! \brief GL function to bind an attribute to a given location
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBindAttribLocation.xml">
    +   * glBindAttribLocation() OpenGL ES manpage</a>
    +   */
    +  void bindAttribLocation(Program program, unsigned index,
    +                          const std::string &name);
    +
    +  /*! \brief GL function to bind a buffer to a target
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBindBuffer.xml">
    +   * glBindBuffer() OpenGL ES manpage</a>
    +   */
    +  void bindBuffer(GLenum target, Buffer buffer);
    +
    +  //void bindFramebuffer(GLenum target, WebGLFramebuffer framebuffer);
    +  //void bindRenderbuffer(GLenum target, WebGLRenderbuffer renderbuffer);
    +
    +  /*! \brief GL function to bind a texture to a target
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBindTexture.xml">
    +   * glBindTexture() OpenGL ES manpage</a>
    +   */
    +  void bindTexture(GLenum target, Texture texture);
    +
    +  /*! \brief GL function to set the blending color
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBlendColor.xml">
    +   * glBlendColor() OpenGL ES manpage</a>
    +   */
    +  void blendColor(double red, double green, double blue, double alpha);
    +
    +  /*! \brief GL function to set the blending equation
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBlendEquation.xml">
    +   * glBlendEquation() OpenGL ES manpage</a>
    +   */
    +  void blendEquation(GLenum mode);
    +
    +  /*! \brief GL function that sets separate blending functions for RGB and alpha
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBlendEquationSeparate.xml">
    +   * glBlendEquationSeparate() OpenGL ES manpage</a>
    +   */
    +  void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
    +
    +  /*! \brief GL function to configure the blending function
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBlendFunc.xml">
    +   * glBlendFunc() OpenGL ES manpage</a>
    +   */
    +  void blendFunc(GLenum sfactor, GLenum dfactor);
    +
    +  /*! \brief GL function that configures the blending function
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBlendFuncSeparate.xml">
    +   * glBlendFuncSeparate() OpenGL ES manpage</a>
    +   */
    +  void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, 
    +                         GLenum srcAlpha, GLenum dstAlpha);
    +
    +  /*! \brief GL function that loads float or double data in a VBO
    +   *
    +   * Unlike the C version, we can't accept a void * here. We must be able
    +   * to interpret the buffer's data in order to transmit it to the JS side.
    +   *
    +   * Later we may also want versions with strides and offsets to cope with
    +   * more complex buffer layouts that we typically see on desktop WebGL apps;
    +   * suggestions to improve this are welcome
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBufferData.xml">
    +   * glBufferData() OpenGL ES manpage</a>
    +   */
    +  template<typename Iterator>
    +  void bufferDatafv(GLenum target, const Iterator begin, const Iterator end, GLenum usage) {
    +    js_ << "ctx.bufferData(" << toString(target) << ",";
    +    renderfv(js_, begin, end);
    +    js_ << ","<< toString(usage) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function that updates an existing VBO with new integer data
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBufferData.xml">
    +   * glBufferData() OpenGL ES manpage</a>
    +   */
    +  template<typename Iterator>
    +  void bufferDataiv(GLenum target, const Iterator begin, const Iterator end,
    +                    GLenum usage, GLenum type)
    +  {
    +    js_ << "ctx.bufferData(" << toString(target) << ",";
    +    renderiv(js_, begin, end, type);
    +    js_ << ","<< toString(usage) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function that updates an existing VBO with new float or double
    +   * data
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBufferSubData.xml">
    +   * glBufferSubData() OpenGL ES manpage</a>
    +   */
    +  template<typename Iterator>
    +  void bufferSubDatafv(GLenum target, unsigned offset, const Iterator begin, const Iterator end)
    +  {
    +    js_ << "ctx.bufferSubData(" << toString(target) << "," << offset << ",";
    +    renderfv(js_, begin, end);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function that loads integer data in a VBO
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glBufferSubData.xml">
    +   * glBufferSubData() OpenGL ES manpage</a>
    +   */
    +  template<typename Iterator>
    +  void bufferSubDataiv(GLenum target, unsigned offset, const Iterator begin, Iterator end, GLenum type)
    +  {
    +    js_ << "ctx.bufferSubData(" << toString(target) << "," << offset << ",";
    +    renderiv(js_, begin, end, type);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +
    +  //GLenum checkFramebufferStatus(GLenum target);
    +
    +  /*! \brief GL function that clears the given buffers
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glClear.xml">
    +   * glClear() OpenGL ES manpage</a>
    +   */
    +  void clear(WFlags<GLenum> mask);
    +
    +  /*! \brief GL function that sets the clear color of the color buffer
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glClearColor.xml">
    +   * glClearColor() OpenGL ES manpage</a>
    +   */
    +  void clearColor(double r, double g, double b, double a);
    +
    +  /*! \brief GL function that configures the depth to be set when the
    +   * depth buffer is cleared
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glClearDepthf.xml">
    +   * glClearDepthf() OpenGL ES manpage</a>
    +   */
    +  void clearDepth(double depth);
    +
    +  /*! \brief GL function
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glClearStencil.xml">
    +   * glClearStencil() OpenGL ES manpage</a>
    +   */
    +  void clearStencil(int s);
    +
    +  /*! \brief GL function
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glColorMask.xml">
    +   * glColorMask() OpenGL ES manpage</a>
    +   */
    +  void colorMask(bool red, bool green, bool blue, bool alpha);
    +
    +  /*! \brief GL function to compile a shader
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCompileShader.xml">
    +   * glCompileShader() OpenGL ES manpage</a>
    +   */
    +  void compileShader(Shader shader);
    +
    +  /*! \brief GL function to copy a texture image
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCopyTexImage2D.xml">
    +   * glCopyTexImage2D() OpenGL ES manpage</a>
    +   */
    +  void copyTexImage2D(GLenum target, int level,
    +                      GLenum internalformat,
    +                      int x, int y,
    +                      unsigned width, unsigned height, 
    +                      int border);
    +
    +  /*! \brief GL function that copies a part of a texture image
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCopyTexSubImage2D.xml">
    +   * glCopyTexSubImage2D() OpenGL ES manpage</a>
    +   */
    +  void copyTexSubImage2D(GLenum target, int level,
    +                         int xoffset, int yoffset,
    +                         int x, int y,
    +                         unsigned width, unsigned height);
    +
    +  /*! \brief GL function that creates an empty VBO
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGenBuffers.xml">
    +   * glGenBuffers() OpenGL ES manpage</a>
    +   */
    +  Buffer createBuffer();
    +
    +  //WebGLFramebuffer createFramebuffer();
    +
    +  /*! \brief GL function that creates an empty program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCreateProgram.xml">
    +   * glCreateProgram() OpenGL ES manpage</a>
    +   */
    +  Program createProgram();
    +
    +  //WebGLRenderbuffer createRenderbuffer();
    +
    +  /*! \brief GL function that creates an empty shader
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCreateShader.xml">
    +   * glCreateShader() OpenGL ES manpage</a>
    +   */
    +  Shader createShader(GLenum shader);
    +
    +  /*! \brief GL function that creates an empty texture
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGenTextures.xml">
    +   * glGenTextures() OpenGL ES manpage</a>
    +   */
    +  Texture createTexture();
    +
    +  /*! \brief GL function that creates an image texture
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGenTextures.xml">
    +   * glGenTextures() OpenGL ES manpage</a>
    +   */
    +  Texture createTextureAndLoad(const std::string &url);
    +
    +  /*! \brief GL function that configures the backface culling mode
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glCullFace.xml">
    +   * glCullFace() OpenGL ES manpage</a>
    +   */
    +  void cullFace(GLenum mode);
    +
    +  /*! \brief GL function that deletes a VBO
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDeleteBuffers.xml">
    +   * glDeleteBuffers() OpenGL ES manpage</a>
    +   */
    +  void deleteBuffer(Buffer buffer);
    +
    +  //void deleteFramebuffer(WebGLFramebuffer framebuffer);
    +
    +  /*! \brief GL function that deletes a program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDeleteProgram.xml">
    +   * glDeleteProgram() OpenGL ES manpage</a>
    +   */
    +  void deleteProgram(Program program);
    +
    +  //void deleteRenderbuffer(WebGLRenderbuffer renderbuffer);
    +
    +  /*! \brief GL function that depetes a shader
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDeleteShader.xml">
    +   * glDeleteShader() OpenGL ES manpage</a>
    +   */
    +  void deleteShader(Shader shader);
    +
    +  /*! \brief GL function that deletes a texture
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDeleteTextures.xml">
    +   * glDeleteTextures() OpenGL ES manpage</a>
    +   */
    +  void deleteTexture(Texture texture);
    +
    +  /*! \brief GL function to set the depth test function
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDepthFunc.xml">
    +   * glDepthFunc() OpenGL ES manpage</a>
    +   */
    +  void depthFunc(GLenum func);
    +
    +  /*! \brief GL function that enables or disables writing to the depth buffer
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDepthMask.xml">
    +   * glDepthMask() OpenGL ES manpage</a>
    +   */
    +  void depthMask(bool flag);
    +
    +  /*! \brief GL function that specifies to what range the normalized [-1,1] z
    +   * values should match.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDepthRangef.xml">
    +   * glDepthRangef() OpenGL ES manpage</a>
    +   */
    +  void depthRange(double zNear, double zFar);
    +
    +  /*! \brief GL function that detaches a shader from a program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDetachShader.xml">
    +   * glDetachShader() OpenGL ES manpage</a>
    +   */
    +  void detachShader(Program program, Shader shader);
    +
    +  /*! \brief GL function to disable features
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDisable.xml">
    +   * glDisable() OpenGL ES manpage</a>
    +   */
    +  void disable(GLenum cap);
    +
    +  /*! \brief GL function to draw a VBO
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDrawArrays.xml">
    +   * glDrawArrays() OpenGL ES manpage</a>
    +   */
    +  void drawArrays(GLenum mode, int first, unsigned count);
    +
    +  /*! \brief GL function to draw indexed VBOs
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glDrawElements.xml">
    +   * glDrawElements() OpenGL ES manpage</a>
    +   */
    +  void drawElements(GLenum mode, unsigned count, GLenum type, unsigned offset);
    +
    +  /*! \brief GL function to enable features
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glEnable.xml">
    +   * glEnable() OpenGL ES manpage</a>
    +   */
    +  void enable(GLenum cap);
    +
    +  /*! \brief GL function to enable the vertex attribute array
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glEnableVertexAttribArray.xml">
    +   * glEnableVertexAttribArray() OpenGL ES manpage</a>
    +   */
    +  void enableVertexAttribArray(AttribLocation index);
    +
    +  /*! \brief GL function to wait until given commands are executed
    +   *
    +   * This call is transfered to JS, but the server will never wait on
    +   * this call.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glFinish.xml">
    +   * glFinish() OpenGL ES manpage</a>
    +   */
    +  void finish();
    +
    +  /*! \brief GL function to force execution of GL commands in finite time.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glFlush.xml">
    +   * glFlush() OpenGL ES manpage</a>
    +   */
    +  void flush();
    +
    +  //void framebufferRenderbuffer(GLenum target, GLenum attachment, 
    +  //                             GLenum renderbuffertarget, 
    +  //                             WebGLRenderbuffer renderbuffer);
    +
    +  //void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, 
    +  //                          WebGLTexture texture, GLint level);
    +
    +  /*! \brief GL function that specifies which side of a triangle is the
    +   * front side
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glFrontFace.xml">
    +   * glFrontFace() OpenGL ES manpage</a>
    +   */
    +  void frontFace(GLenum mode);
    +
    +  /*! \brief GL function that generates a set of mipmaps for a texture
    +   * object.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGenerateMipmap.xml">
    +   * glGenerateMipmap() OpenGL ES manpage</a>
    +   */
    +  void generateMipmap(GLenum target);
    +
    +  //WebGLActiveInfo getActiveAttrib(WebGLProgram program, GLuint index);
    +  //WebGLActiveInfo getActiveUniform(WebGLProgram program, GLuint index);
    +  //WebGLShader[ ] getAttachedShaders(WebGLProgram program);
    +
    +  /*! \brief GL function to retrieve an attribute's location in a Program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGetAttribLocation.xml">
    +   * glGetAttribLocation() OpenGL ES manpage</a>
    +   */
    +  AttribLocation getAttribLocation(Program program, const std::string &attrib);
    +
    +  //any getParameter(GLenum pname);
    +  //any getBufferParameter(GLenum target, GLenum pname);
    +
    +  //GLenum getError();
    +
    +  //any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, 
    +  //                                      GLenum pname);
    +  //any getProgramParameter(WebGLProgram program, GLenum pname);
    +  //DOMString getProgramInfoLog(WebGLProgram program);
    +  //any getRenderbufferParameter(GLenum target, GLenum pname);
    +  //any getShaderParameter(WebGLShader shader, GLenum pname);
    +  //DOMString getShaderInfoLog(WebGLShader shader);
    +
    +  //DOMString getShaderSource(WebGLShader shader);
    +
    +  //any getTexParameter(GLenum target, GLenum pname);
    +
    +  //any getUniform(WebGLProgram program, WebGLUniformLocation location);
    +
    +  /*! \brief GL function to retrieve a Uniform's location in a Program.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glGetUniformLocation.xml">
    +   * glGetUniformLocation() OpenGL ES manpage</a>
    +   */
    +  UniformLocation getUniformLocation(Program program, const std::string location);
    +
    +  //any getVertexAttrib(GLuint index, GLenum pname);
    +
    +  //GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname);
    +
    +  /*! \brief GL function to give hints to the render pipeline
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glHint.xml">
    +   * glHint() OpenGL ES manpage</a>
    +   */
    +  void hint(GLenum target, GLenum mode);
    +
    +  //GLboolean isBuffer(WebGLBuffer buffer);
    +  //GLboolean isEnabled(GLenum cap);
    +  //GLboolean isFramebuffer(WebGLFramebuffer framebuffer);
    +  //GLboolean isProgram(WebGLProgram program);
    +  //GLboolean isRenderbuffer(WebGLRenderbuffer renderbuffer);
    +  //GLboolean isShader(WebGLShader shader);
    +  //GLboolean isTexture(WebGLTexture texture);
    +
    +  /*! \brief GL function to set the line width
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glLineWidth.xml">
    +   * glLineWidth() OpenGL ES manpage</a>
    +   */
    +  void lineWidth(double width);
    +
    +  /*! \brief GL function to link a program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glLinkProgram.xml">
    +   * glLinkProgram() OpenGL ES manpage</a>
    +   */
    +  void linkProgram(Program program);
    +
    +  /*! \brief GL function to set the pixel storage mode
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glPixelStorei.xml">
    +   * glPixelStorei() OpenGL ES manpage</a>
    +   */
    +  void pixelStorei(GLenum pname, int param);
    +
    +  /*! \brief GL function to apply modifications to Z values
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glPolygonOffset.xml">
    +   * glPolygonOffset() OpenGL ES manpage</a>
    +   */
    +  void polygonOffset(double factor, double units);
    +
    +  //void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, 
    +  //                GLenum format, GLenum type, ArrayBufferView pixels);
    +
    +  //void renderbufferStorage(GLenum target, GLenum internalformat, 
    +  //                         GLsizei width, GLsizei height);
    +
    +  /*! \brief GL function to set multisample parameters
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glSampleCoverage.xml">
    +   * glSampleCoverage() OpenGL ES manpage</a>
    +   */
    +  void sampleCoverage(double value, bool invert);
    +
    +  /*! \brief GL function to define the scissor box
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glScissor.xml">
    +   * glScissor() OpenGL ES manpage</a>
    +   */
    +  void scissor(int x, int y, unsigned width, unsigned height);
    +
    +  /*! \brief GL function to set a shader's source code
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glShaderSource.xml">
    +   * glShaderSource() OpenGL ES manpage</a>
    +   */
    +  void shaderSource(Shader shader, const std::string &src);
    +
    +  /*! \brief GL function to set stencil test parameters
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilFunc.xml">
    +   * glStencilFunc() OpenGL ES manpage</a>
    +   */
    +  void stencilFunc(GLenum func, int ref, unsigned mask);
    +
    +  /*! \brief GL function to set stencil test parameters for front and/or
    +   * back stencils
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilFuncSeparate.xml">
    +   * glStencilFuncSeparate() OpenGL ES manpage</a>
    +   */
    +  void stencilFuncSeparate(GLenum face, GLenum func, int ref, unsigned mask);
    +
    +  /*! \brief GL function to control which bits are to be written in the stencil
    +   * buffer
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilMask.xml">
    +   * glStencilMask() OpenGL ES manpage</a>
    +   */
    +  void stencilMask(unsigned mask);
    +
    +  /*! \brief GL function to control which bits are written to the front and/or
    +   * back stencil buffers
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilMaskSeparate.xml">
    +   * glStencilMaskSeparate() OpenGL ES manpage</a>
    +   */
    +  void stencilMaskSeparate(GLenum face, unsigned mask);
    +
    +  /*! \brief GL function to set stencil test actions
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilOp.xml">
    +   * glStencilOp() OpenGL ES manpage</a>
    +   */
    +  void stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
    +
    +  /*! \brief GL function to set front and/or back stencil test actions
    +   * separately
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glStencilOpSeparate.xml">
    +   * glStencilOpSeparate() OpenGL ES manpage</a>
    +   */
    +  void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
    +
    +  //void texImage2D(TextureTargetEnum target, int level, PixelFormatEnum internalformat, 
    +  //                GLsizei width, GLsizei height, GLint border, PixelFormatEnum format, 
    +  //                GLenum type, ArrayBufferView pixels);
    +
    +  //void texImage2D(TextureTargetEnum target, int level, PixelFormatEnum internalformat,
    +  //                PixelFormatEnum format, GLenum type, ImageData pixels);
    +
    +  /*! \brief GL function to load a 2D texture from a WImage
    +   *
    +   * Note: WImage must be loaded before this function is executed.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glTexImage2D.xml">
    +   * glTexImage2D() OpenGL ES manpage</a>
    +   */
    +  void texImage2D(GLenum target, int level, GLenum internalformat,
    +                  GLenum format, GLenum type, WImage *image);
    +
    +  //void texImage2D(TextureTargetEnum target, int level, PixelFormatEnum internalformat,
    +  //                PixelFormatEnum format, GLenum type, HTMLCanvasElement canvas);
    +
    +  /*! \brief GL function to load a 2D texture from a HTML5Video object
    +   *
    +   * Note: the video must be loaded prior to calling this function. The
    +   * current frame is used as texture image.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glTexImage2D.xml">
    +   * glTexImage2D() OpenGL ES manpage</a>
    +   */
    +  void texImage2D(GLenum target, int level, GLenum internalformat, GLenum format,
    +                  GLenum type, WHTML5Video *video);
    +
    +  /*! \brief GL function to load a 2D texture loaded with createTextureAndLoad()
    +   *
    +   * This function must only be used for textures created with
    +   * createTextureAndLoad()
    +   *
    +   * Note: the WGLWidget implementation will delay rendering until
    +   * all textures created with createTextureAndLoad() are loaded in the
    +   * browser.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glTexImage2D.xml">
    +   * glTexImage2D() OpenGL ES manpage</a>
    +   */
    +  void texImage2D(GLenum target, int level, GLenum internalformat,
    +                  GLenum format, GLenum type, Texture texture);
    +
    +  //void texParameterf(TextureTargetEnum target,
    +  //                   TextureParameterNameEnum pname, double param);
    +
    +  /*! \brief GL function to set texture parameters
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glTexParameter.xml">
    +   * glTexParameter() OpenGL ES manpage</a>
    +   */
    +  void texParameteri(GLenum target, GLenum pname, GLenum param);
    +
    +  //void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
    +  //                   GLsizei width, GLsizei height, 
    +  //                   GLenum format, GLenum type, ArrayBufferView pixels);
    +  //void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
    +  //                   GLenum format, GLenum type, ImageData pixels);
    +  //void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
    +  //                   GLenum format, GLenum type, HTMLImageElement image);
    +  //void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
    +  //                   GLenum format, GLenum type, HTMLCanvasElement canvas);
    +  //void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
    +  //                   GLenum format, GLenum type, HTMLVideoElement video);
    +
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform1f(const UniformLocation &location, double x) {
    +    char buf[30];
    +    js_ << "ctx.uniform1f(" << location << "," << makeFloat(x, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform1fv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform1fv(" << location << ",";
    +    renderfv(js_, value, value + 1);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform1i(const UniformLocation &location, int x) {
    +    char buf[30];
    +    js_ << "ctx.uniform1i(" << location << ",";
    +    js_ << makeInt(x, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform1iv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform1iv(" << location << ",";
    +    renderiv(js_, value, value + 1, INT);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform2f(const UniformLocation &location, double x, double y) {
    +    char buf[30];
    +    js_ << "ctx.uniform2f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform2fv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform2fv(" << location << ",";
    +    renderfv(js_, value, value + 2);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform2i(const UniformLocation &location, int x, int y) {
    +    char buf[30];
    +    js_ << "ctx.uniform2i(" << location << ",";
    +    js_ << makeInt(x, buf) << ",";
    +    js_ << makeInt(y, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform2iv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform2iv(" << location << ",";
    +    renderiv(js_, value, value + 2, INT);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform3f(const UniformLocation &location,
    +                 double x, double y, double z) {
    +    char buf[30];
    +    js_ << "ctx.uniform3f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ",";
    +    js_ << makeFloat(z, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform3fv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform3fv(" << location << ",";
    +    renderfv(js_, value, value + 3);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform3i(const UniformLocation &location, int x, int y, int z) {
    +    char buf[30];
    +    js_ << "ctx.uniform3i(" << location << ",";
    +    js_ << makeInt(x, buf) << ",";
    +    js_ << makeInt(y, buf) << ",";
    +    js_ << makeInt(z, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform3iv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform3iv(" << location << ",";
    +    renderiv(js_, value, value + 3, INT);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform4f(const UniformLocation &location,
    +                 double x, double y, double z, double w) {
    +    char buf[30];
    +    js_ << "ctx.uniform4f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ",";
    +    js_ << makeFloat(z, buf) << ",";
    +    js_ << makeFloat(w, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform4fv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform4fv(" << location << ",";
    +    renderfv(js_, value, value + 4);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniform4i(const UniformLocation &location, int x, int y, int z, int w) {
    +    char buf[30];
    +    js_ << "ctx.uniform4i(" << location << ",";
    +    js_ << makeInt(x, buf) << ",";
    +    js_ << makeInt(y, buf) << ",";
    +    js_ << makeInt(z, buf) << ",";
    +    js_ << makeInt(w, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform variable of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void uniform4iv(const UniformLocation &location, const Array *value) {
    +    js_ << "ctx.uniform4iv(" << location << ",";
    +    renderiv(js_, value, value + 4, INT);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * Attention: The OpenGL ES specification states that transpose MUST be
    +   * false.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename MatrixType>
    +  void uniformMatrix2fv(const UniformLocation &location,
    +                        bool transpose, const MatrixType *value) {
    +    js_ << "ctx.uniformMatrix2fv(" << location << ","
    +      << (transpose?"true":"false") << ",";
    +    renderfv(js_, value, value + 4);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * This function renders the matrix in the proper row/column order.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template< typename T>
    +  void uniformMatrix2(const UniformLocation &location,
    +                      const WGenericMatrix<T, 2, 2> &m) {
    +    js_ << "ctx.uniformMatrix2fv(" << location << ",false,";
    +    WGenericMatrix<T, 2, 2> t(m.transposed());
    +    renderfv(js_, t.data().begin(), t.data().end());
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * Attention: The OpenGL ES specification states that transpose MUST be
    +   * false.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename MatrixType>
    +  void uniformMatrix3fv(const UniformLocation &location, bool transpose, const MatrixType *value) {
    +    js_ << "ctx.uniformMatrix3fv(" << location << ","
    +      << (transpose?"true":"false") << ",";
    +    renderfv(js_, value,value + 9);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * This function renders the matrix in the proper row/column order.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename T>
    +  void uniformMatrix3(const UniformLocation &location,
    +                      const WGenericMatrix<T, 3, 3> &m) {
    +    js_ << "ctx.uniformMatrix3fv(" << location << ",false,";
    +    WGenericMatrix<T, 3, 3> t(m.transposed());
    +    renderfv(js_, t.data().begin(), t.data().end());
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * Attention: The OpenGL ES specification states that transpose MUST be
    +   * false.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename MatrixType>
    +  void uniformMatrix4fv(const UniformLocation &location, bool transpose,
    +                        const MatrixType *value) {
    +    js_ << "ctx.uniformMatrix4fv(" << location << ","
    +      << (transpose?"true":"false") << ",";
    +    renderfv(js_, value, value + 16);
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * This function renders the matrix in the proper row/column order.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  template<typename T>
    +  void uniformMatrix4(const UniformLocation &location,
    +                      const WGenericMatrix<T, 4, 4> &m) {
    +    js_ << "ctx.uniformMatrix4fv(" << location << ",false,";
    +    WGenericMatrix<T, 4, 4> t(m.transposed());
    +    renderfv(js_, t.data().begin(), t.data().end());
    +    js_ << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of a uniform matrix of the current
    +   * program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUniform.xml">
    +   * glUniform() OpenGL ES manpage</a>
    +   */
    +  void uniformMatrix4(const UniformLocation &location,
    +                      const JavaScriptMatrix4x4 &m) {
    +    js_ << "ctx.uniformMatrix4fv(" << location << ",false,";
    +    js_ << m.jsRef() << ");";
    +    GLDEBUG;
    +  }
    +
    +
    +  /*! \brief GL function to set the current active shader program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glUseProgram.xml">
    +   * glUseProgram() OpenGL ES manpage</a>
    +   */
    +  void useProgram(Program program);
    +
    +  /*! \brief GL function to validate a program
    +   *
    +   * implementation note: there is currently not yet a method to read
    +   * out the validation result.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glValidateProgram.xml">
    +   * glValidateProgram() OpenGL ES manpage</a>
    +   */
    +  void validateProgram(Program program);
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  void vertexAttrib1f(AttribLocation location, double x) {
    +    char buf[30];
    +    js_ << "ctx.vertexAttrib1f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void vertexAttrib1fv(AttribLocation location, const Array *values) {
    +    vertexAttrib1f(location, values[0]);
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  void vertexAttrib2f(AttribLocation location, double x, double y) {
    +    char buf[30];
    +    js_ << "ctx.vertexAttrib2f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void vertexAttrib2fv(AttribLocation location, const Array *values) {
    +    vertexAttrib2f(location, values[0], values[1]);
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  void vertexAttrib3f(AttribLocation location, double x, double y, double z) {
    +    char buf[30];
    +    js_ << "ctx.vertexAttrib3f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ",";
    +    js_ << makeFloat(z, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void vertexAttrib3fv(AttribLocation location, const Array *values) {
    +    vertexAttrib3f(location, values[0], values[1], values[2]);
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  void vertexAttrib4f(AttribLocation location,
    +                      double x, double y, double z, double w) {
    +    char buf[30];
    +    js_ << "ctx.vertexAttrib4f(" << location << ",";
    +    js_ << makeFloat(x, buf) << ",";
    +    js_ << makeFloat(y, buf) << ",";
    +    js_ << makeFloat(z, buf) << ",";
    +    js_ << makeFloat(w, buf) << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! \brief GL function to set the value of an attribute of the current program
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttrib.xml">
    +   * glVertexAttrib() OpenGL ES manpage</a>
    +   */
    +  template<typename Array>
    +  void vertexAttrib4fv(AttribLocation location, const Array *values) {
    +    vertexAttrib4f(location, values[0], values[1], values[2], values[3]);
    +  }
    +
    +  /*! \brief GL function to bind a VBO to an attribute
    +   *
    +   * This function links the given attribute to the VBO currently bound
    +   * to the ARRAY_BUFFER target.
    +   *
    +   * The size parameter specifies the number of components per attribute (1
    +   * to 4). The type parameter is also used to determine the size of each
    +   * component.
    +   *
    +   * The size of a float is 8 bytes.
    +   *
    +   * In WGLWidget, the size of an int is 4 bytes.
    +   *
    +   * The stride is in bytes.
    +   *
    +   * The maximum stride is 255.
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glVertexAttribPointer.xml">
    +   * glVertexAttribPointer() OpenGL ES manpage</a>
    +   */
    +  void vertexAttribPointer(AttribLocation location, int size,
    +    GLenum type, bool normalized, unsigned stride, unsigned offset);
    +
    +  /*! \brief GL function to set the viewport
    +   *
    +   * <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/glViewport.xml">
    +   * glViewport() OpenGL ES manpage</a>
    +   */
    +  void viewport(int x, int y, unsigned width, unsigned height);
    +
    +  /*! @}
    +   */
    +
    +  /*! @name Additional WebGL methods
    +   *
    +   * These methods are used to render WebGL content, but have no equivalent
    +   * in WebGL.
    +   *
    +   * Like the WebGL methods, you can use the WebGL methods in your resizeGL(),
    +   * paintGL() and updateGL() specializations. It makes no sense to call these
    +   * methods outside those functions.
    +   * @{
    +   */
    +  /*! \brief Create a matrix that can be manipulated in client-side
    +   * JavaScript
    +   */
    +  JavaScriptMatrix4x4 createJavaScriptMatrix4();
    +
    +  /*! \brief Set the value of a client-side JavaScript matrix created by
    +   * createJavaScriptMatrix4x4()
    +   */
    +  template<typename T>
    +  void setJavaScriptMatrix4(const JavaScriptMatrix4x4 &jsm,
    +                            const WGenericMatrix<T, 4, 4> &m) {
    +    js_ << WT_CLASS ".glMatrix.mat4.set(";
    +    WGenericMatrix<T, 4, 4> t(m.transposed());
    +    renderfv(js_, t.data().begin(), t.data().end());
    +    js_ << ", " << jsm.jsRef() << ");";
    +    GLDEBUG;
    +  }
    +
    +  /*! @}
    +   */
    +
    +  // Todo:
    +  // Get the current client-side value of a JavaScriptMatrix
    +  //WMatrix4x4 getJavaScriptMatrix4();
    +
    +  /*! \brief Add a mouse handler to the widget that looks at a given point
    +   *
    +   * This will allow a user to change client-side matrix m with the
    +   * mouse. M is a model transformation matrix, representing the viewpoint of
    +   * the camera.
    +   *
    +   * Through mouse operations, the camera can be changed by the user, but
    +   * (lX, lY, lZ) will always be at the center of the display, (uX, uY, uZ)
    +   * is considered to be the up direction, and the distance of the camera to
    +   * (lX, lY, lZ) will never change.
    +   *
    +   * Pressing the left mouse button and moving the mouse left/right will
    +   * rotate the camera around the up (uX, uY, uZ) direction. Moving up/down
    +   * will tilt the camera (causing it to move up/down to keep the lookpoint
    +   * centered). The scroll wheel simulates zooming by scaling the scene.
    +   *
    +   * pitchRate and yawRate control how much the camera will move per mouse
    +   * pixel.
    +   *
    +   * Usually this method is called after setting a camera transformation
    +   * with a client-side matrix in initializeGL(). However, this function
    +   * may also be called from outside the intializeGL()/paintGL()/updateGL()
    +   * methods (but not before m was initialized).
    +   */
    +  void setClientSideLookAtHandler(const JavaScriptMatrix4x4 &m,
    +                                  double lX, double lY, double lZ,
    +                                  double uX, double uY, double uZ,
    +                                  double pitchRate, double yawRate);
    +
    +  /*! \brief Add a mouse handler to the widget that allows 'walking' in
    +   * the scene
    +   *
    +   * This will allow a user to change client-side matrix m with the
    +   * mouse. M is a model transformation matrix, representing the viewpoint of
    +   * the camera.
    +   *
    +   * Through mouse operations, the camera can be changed by the user, as if
    +   * he is walking around on a plane. 
    +   *
    +   * Pressing the left mouse button and moving the mouse left/right will
    +   * rotate the camera around Y axis. Moving the mouse up/down will move
    +   * the camera in the Z direction (walking forward/backward).
    +   * centered).
    +   *
    +   * frontStep and rotStep control how much the camera will move per mouse
    +   * pixel.
    +   *
    +   * Usually this method is called after setting a camera transformation
    +   * with a client-side matrix in initializeGL(). However, this function
    +   * may also be called from outside the intializeGL()/paintGL()/updateGL()
    +   * methods (but not before m was initialized).
    +   */
    +  void setClientSideWalkHandler(const JavaScriptMatrix4x4 &m,
    +                                double frontStep, double rotStep);
    +
    +  /*! \brief Sets the content to be displayed when WebGL is not available.
    +   *
    +   * If Wt cannot create a working WebGL context, this content will be
    +   * shown to the user. This may be a text explanation, or a pre-rendered
    +   * image, or a video, a flash movie, ...
    +   *
    +   * The default is a widget that explains to the user that he has no
    +   * WebGL support.
    +   */
    +  void setAlternativeContent(WWidget *alternative);
    +
    +  /*! \brief A JavaScript slot that repaints the widget when triggered.
    +   *
    +   * This is useful for client-side initiated repaints. You may e.g. use this
    +   * if you write your own client-side mouse handler, or if you updated
    +   * a texture, or if you're playing a video texture.
    +   */
    +  JSlot &repaintSlot() { return repaintSlot_; }
    +
    +protected:
    +  DomElementType domElementType() const;
    +  DomElement *createDomElement(WApplication *app);
    +  void getDomChanges(std::vector<DomElement *>& result, WApplication *app);
    +  void updateDom(DomElement &element, bool all);
    +
    +  void render(WFlags<RenderFlag> flags);
    +  std::string renderRemoveJs();
    +
    +private:
    +  std::string glObjJsRef();
    +  void layoutSizeChanged(int width, int height);
    +
    +  int renderWidth_;
    +  int renderHeight_;
    +  bool updatePaintGL_;
    +  bool updateResizeGL_;
    +  bool updateGL_;
    +  bool sizeChanged_;
    +
    +  WWidget *alternative_;
    +
    +  unsigned shaders_;
    +  unsigned programs_;
    +  unsigned attributes_;
    +  unsigned uniforms_;
    +  unsigned buffers_;
    +  unsigned textures_;
    +  unsigned matrices_;
    +  std::vector<std::pair<std::string, std::string> > preloadImages_;
    +
    +  // If client detects that a WebGL context cannot be created, it fires this
    +  // signal, and the handler sets wegGlNotAvailable_ to true. If this happens,
    +  // the client side will have deleted the canvas widget.
    +  JSignal<void> webglNotAvailable_;
    +  void webglNotAvailable();
    +  bool webGlNotAvailable_;
    +
    +  JSlot mouseWentDownSlot_;
    +  JSlot mouseWentUpSlot_;
    +  JSlot mouseDraggedSlot_;
    +  JSlot mouseWheelSlot_;
    +  JSlot repaintSlot_;
    +
    +  std::stringstream delayedJavaScript_;
    +  std::stringstream js_;
    +
    +#ifndef WT_TARGET_JAVA
    +  template<typename Iterator>
    +  static void renderfv(std::ostream &os, Iterator begin, Iterator end)
    +  {
    +    char buf[30];
    +    os << "new Float32Array([";
    +    for (Iterator i = begin; i != end; ++i)
    +      os << (i == begin ? "" : ",") << makeFloat(*i, buf);
    +    os << "])";
    +  }
    +#endif
    +
    +  template<typename Iterator>
    +  static void renderiv(std::ostream &os, Iterator begin, Iterator end, GLenum type)
    +  {
    +    switch (type) {
    +    case BYTE:
    +      os << "new Int8Array([";
    +      break;
    +    case UNSIGNED_BYTE:
    +      os << "new Uint8Array([";
    +      break;
    +    case SHORT:
    +      os << "new Int16Array([";
    +      break;
    +    case UNSIGNED_SHORT:
    +      os << "new Uint16Array([";
    +      break;
    +    case INT:
    +      os << "new Int32Array([";
    +      break;
    +    default:
    +      // Should we warn?
    +    case UNSIGNED_INT:
    +      os << "new Uint32Array([";
    +      break;
    +    }
    +    char buf[30];
    +    for (Iterator i = begin; i != end; ++i)
    +      os << (i == begin ? "" : ",") << makeInt(*i, buf);
    +    os << "])";
    +  }
    +
    +  static char *makeFloat(double d, char *buf);
    +  static char *makeInt(int i, char *buf);
    +
    +  static const char *toString(GLenum e);
    +
    +  void defineJavaScript();
    +  void connectJavaScript(EventSignalBase &s,
    +                         const std::string &methodName);
    +
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WGLWidget::GLenum)
    +W_DECLARE_OPERATORS_FOR_FLAGS(WGLWidget::ClientSideRenderer)
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/Wt/WGLWidget.C b/wt-3.1.7a/src/Wt/WGLWidget.C
    new file mode 100644
    index 0000000..0b55a03
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGLWidget.C
    @@ -0,0 +1,1253 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WGLWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WHTML5Video"
    +#include "Wt/WImage"
    +#include "Wt/WText"
    +#include "Wt/WWebWidget"
    +#include "DomElement.h"
    +#include "Utils.h"
    +#include "Wt/WApplication"
    +
    +#include "JavaScriptLoader.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WGLWidget.min.js"
    +#include "js/WtGlMatrix.min.js"
    +#endif
    +
    +using namespace Wt;
    +
    +// TODO: for uniform*v, attribute8v, generate the non-v version in js. We
    +//       will probably end up with less bw and there's no use in allocating
    +//       an extra array.
    +// TODO: allow VBO's to be served from a file
    +
    +const char *WGLWidget::toString(GLenum e)
    +{
    +  switch(e) {
    +    case DEPTH_BUFFER_BIT: return "ctx.DEPTH_BUFFER_BIT";
    +    case STENCIL_BUFFER_BIT: return "ctx.STENCIL_BUFFER_BIT";
    +    case COLOR_BUFFER_BIT: return "ctx.COLOR_BUFFER_BIT";
    +    case POINTS: return "ctx.POINTS";
    +    case LINES: return "ctx.LINES";
    +    case LINE_LOOP: return "ctx.LINE_LOOP";
    +    case LINE_STRIP: return "ctx.LINE_STRIP";
    +    case TRIANGLES: return "ctx.TRIANGLES";
    +    case TRIANGLE_STRIP: return "ctx.TRIANGLE_STRIP";
    +    case TRIANGLE_FAN: return "ctx.TRIANGLE_FAN";
    +    //case ZERO: return "ctx.ZERO";
    +    //case ONE: return "ctx.ONE";
    +    case SRC_COLOR: return "ctx.SRC_COLOR";
    +    case ONE_MINUS_SRC_COLOR: return "ctx.ONE_MINUS_SRC_COLOR";
    +    case SRC_ALPHA: return "ctx.SRC_ALPHA";
    +    case ONE_MINUS_SRC_ALPHA: return "ctx.ONE_MINUS_SRC_ALPHA";
    +    case DST_ALPHA: return "ctx.DST_ALPHA";
    +    case ONE_MINUS_DST_ALPHA: return "ctx.ONE_MINUS_DST_ALPHA";
    +    case DST_COLOR: return "ctx.DST_COLOR";
    +    case ONE_MINUS_DST_COLOR: return "ctx.ONE_MINUS_DST_COLOR";
    +    case SRC_ALPHA_SATURATE: return "ctx.SRC_ALPHA_SATURATE";
    +    case FUNC_ADD: return "ctx.FUNC_ADD";
    +    case BLEND_EQUATION: return "ctx.BLEND_EQUATION";
    +    //case BLEND_EQUATION_RGB: return "ctx.BLEND_EQUATION_RGB";
    +    case BLEND_EQUATION_ALPHA: return "ctx.BLEND_EQUATION_ALPHA";
    +    case FUNC_SUBTRACT: return "ctx.FUNC_SUBTRACT";
    +    case FUNC_REVERSE_SUBTRACT: return "ctx.FUNC_REVERSE_SUBTRACT";
    +    case BLEND_DST_RGB: return "ctx.BLEND_DST_RGB";
    +    case BLEND_SRC_RGB: return "ctx.BLEND_SRC_RGB";
    +    case BLEND_DST_ALPHA: return "ctx.BLEND_DST_ALPHA";
    +    case BLEND_SRC_ALPHA: return "ctx.BLEND_SRC_ALPHA";
    +    case CONSTANT_COLOR: return "ctx.CONSTANT_COLOR";
    +    case ONE_MINUS_CONSTANT_COLOR: return "ctx.ONE_MINUS_CONSTANT_COLOR";
    +    case CONSTANT_ALPHA: return "ctx.CONSTANT_ALPHA";
    +    case ONE_MINUS_CONSTANT_ALPHA: return "ctx.ONE_MINUS_CONSTANT_ALPHA";
    +    case BLEND_COLOR: return "ctx.BLEND_COLOR";
    +    case ARRAY_BUFFER: return "ctx.ARRAY_BUFFER";
    +    case ELEMENT_ARRAY_BUFFER: return "ctx.ELEMENT_ARRAY_BUFFER";
    +    case ARRAY_BUFFER_BINDING: return "ctx.ARRAY_BUFFER_BINDING";
    +    case ELEMENT_ARRAY_BUFFER_BINDING: return "ctx.ELEMENT_ARRAY_BUFFER_BINDING";
    +    case STREAM_DRAW: return "ctx.STREAM_DRAW";
    +    case STATIC_DRAW: return "ctx.STATIC_DRAW";
    +    case DYNAMIC_DRAW: return "ctx.DYNAMIC_DRAW";
    +    case BUFFER_SIZE: return "ctx.BUFFER_SIZE";
    +    case BUFFER_USAGE: return "ctx.BUFFER_USAGE";
    +    case CURRENT_VERTEX_ATTRIB: return "ctx.CURRENT_VERTEX_ATTRIB";
    +    case FRONT: return "ctx.FRONT";
    +    case BACK: return "ctx.BACK";
    +    case FRONT_AND_BACK: return "ctx.FRONT_AND_BACK";
    +    case CULL_FACE: return "ctx.CULL_FACE";
    +    case BLEND: return "ctx.BLEND";
    +    case DITHER: return "ctx.DITHER";
    +    case STENCIL_TEST: return "ctx.STENCIL_TEST";
    +    case DEPTH_TEST: return "ctx.DEPTH_TEST";
    +    case SCISSOR_TEST: return "ctx.SCISSOR_TEST";
    +    case POLYGON_OFFSET_FILL: return "ctx.POLYGON_OFFSET_FILL";
    +    case SAMPLE_ALPHA_TO_COVERAGE: return "ctx.SAMPLE_ALPHA_TO_COVERAGE";
    +    case SAMPLE_COVERAGE: return "ctx.SAMPLE_COVERAGE";
    +    //case NO_ERROR: return "ctx.NO_ERROR";
    +    case INVALID_ENUM: return "ctx.INVALID_ENUM";
    +    case INVALID_VALUE: return "ctx.INVALID_VALUE";
    +    case INVALID_OPERATION: return "ctx.INVALID_OPERATION";
    +    case OUT_OF_MEMORY: return "ctx.OUT_OF_MEMORY";
    +    case CW: return "ctx.CW";
    +    case CCW: return "ctx.CCW";
    +    case LINE_WIDTH: return "ctx.LINE_WIDTH";
    +    case ALIASED_POINT_SIZE_RANGE: return "ctx.ALIASED_POINT_SIZE_RANGE";
    +    case ALIASED_LINE_WIDTH_RANGE: return "ctx.ALIASED_LINE_WIDTH_RANGE";
    +    case CULL_FACE_MODE: return "ctx.CULL_FACE_MODE";
    +    case FRONT_FACE: return "ctx.FRONT_FACE";
    +    case DEPTH_RANGE: return "ctx.DEPTH_RANGE";
    +    case DEPTH_WRITEMASK: return "ctx.DEPTH_WRITEMASK";
    +    case DEPTH_CLEAR_VALUE: return "ctx.DEPTH_CLEAR_VALUE";
    +    case DEPTH_FUNC: return "ctx.DEPTH_FUNC";
    +    case STENCIL_CLEAR_VALUE: return "ctx.STENCIL_CLEAR_VALUE";
    +    case STENCIL_FUNC: return "ctx.STENCIL_FUNC";
    +    case STENCIL_FAIL: return "ctx.STENCIL_FAIL";
    +    case STENCIL_PASS_DEPTH_FAIL: return "ctx.STENCIL_PASS_DEPTH_FAIL";
    +    case STENCIL_PASS_DEPTH_PASS: return "ctx.STENCIL_PASS_DEPTH_PASS";
    +    case STENCIL_REF: return "ctx.STENCIL_REF";
    +    case STENCIL_VALUE_MASK: return "ctx.STENCIL_VALUE_MASK";
    +    case STENCIL_WRITEMASK: return "ctx.STENCIL_WRITEMASK";
    +    case STENCIL_BACK_FUNC: return "ctx.STENCIL_BACK_FUNC";
    +    case STENCIL_BACK_FAIL: return "ctx.STENCIL_BACK_FAIL";
    +    case STENCIL_BACK_PASS_DEPTH_FAIL: return "ctx.STENCIL_BACK_PASS_DEPTH_FAIL";
    +    case STENCIL_BACK_PASS_DEPTH_PASS: return "ctx.STENCIL_BACK_PASS_DEPTH_PASS";
    +    case STENCIL_BACK_REF: return "ctx.STENCIL_BACK_REF";
    +    case STENCIL_BACK_VALUE_MASK: return "ctx.STENCIL_BACK_VALUE_MASK";
    +    case STENCIL_BACK_WRITEMASK: return "ctx.STENCIL_BACK_WRITEMASK";
    +    case VIEWPORT: return "ctx.VIEWPORT";
    +    case SCISSOR_BOX: return "ctx.SCISSOR_BOX";
    +    case COLOR_CLEAR_VALUE: return "ctx.COLOR_CLEAR_VALUE";
    +    case COLOR_WRITEMASK: return "ctx.COLOR_WRITEMASK";
    +    case UNPACK_ALIGNMENT: return "ctx.UNPACK_ALIGNMENT";
    +    case PACK_ALIGNMENT: return "ctx.PACK_ALIGNMENT";
    +    case MAX_TEXTURE_SIZE: return "ctx.MAX_TEXTURE_SIZE";
    +    case MAX_VIEWPORT_DIMS: return "ctx.MAX_VIEWPORT_DIMS";
    +    case SUBPIXEL_BITS: return "ctx.SUBPIXEL_BITS";
    +    case RED_BITS: return "ctx.RED_BITS";
    +    case GREEN_BITS: return "ctx.GREEN_BITS";
    +    case BLUE_BITS: return "ctx.BLUE_BITS";
    +    case ALPHA_BITS: return "ctx.ALPHA_BITS";
    +    case DEPTH_BITS: return "ctx.DEPTH_BITS";
    +    case STENCIL_BITS: return "ctx.STENCIL_BITS";
    +    case POLYGON_OFFSET_UNITS: return "ctx.POLYGON_OFFSET_UNITS";
    +    case POLYGON_OFFSET_FACTOR: return "ctx.POLYGON_OFFSET_FACTOR";
    +    case TEXTURE_BINDING_2D: return "ctx.TEXTURE_BINDING_2D";
    +    case SAMPLE_BUFFERS: return "ctx.SAMPLE_BUFFERS";
    +    case SAMPLES: return "ctx.SAMPLES";
    +    case SAMPLE_COVERAGE_VALUE: return "ctx.SAMPLE_COVERAGE_VALUE";
    +    case SAMPLE_COVERAGE_INVERT: return "ctx.SAMPLE_COVERAGE_INVERT";
    +    case NUM_COMPRESSED_TEXTURE_FORMATS: return "ctx.NUM_COMPRESSED_TEXTURE_FORMATS";
    +    case COMPRESSED_TEXTURE_FORMATS: return "ctx.COMPRESSED_TEXTURE_FORMATS";
    +    case DONT_CARE: return "ctx.DONT_CARE";
    +    case FASTEST: return "ctx.FASTEST";
    +    case NICEST: return "ctx.NICEST";
    +    case GENERATE_MIPMAP_HINT: return "ctx.GENERATE_MIPMAP_HINT";
    +    case BYTE: return "ctx.BYTE";
    +    case UNSIGNED_BYTE: return "ctx.UNSIGNED_BYTE";
    +    case SHORT: return "ctx.SHORT";
    +    case UNSIGNED_SHORT: return "ctx.UNSIGNED_SHORT";
    +    case INT: return "ctx.INT";
    +    case UNSIGNED_INT: return "ctx.UNSIGNED_INT";
    +    case FLOAT: return "ctx.FLOAT";
    +    case DEPTH_COMPONENT: return "ctx.DEPTH_COMPONENT";
    +    case ALPHA: return "ctx.ALPHA";
    +    case RGB: return "ctx.RGB";
    +    case RGBA: return "ctx.RGBA";
    +    case LUMINANCE: return "ctx.LUMINANCE";
    +    case LUMINANCE_ALPHA: return "ctx.LUMINANCE_ALPHA";
    +    case UNSIGNED_SHORT_4_4_4_4: return "ctx.UNSIGNED_SHORT_4_4_4_4";
    +    case UNSIGNED_SHORT_5_5_5_1: return "ctx.UNSIGNED_SHORT_5_5_5_1";
    +    case UNSIGNED_SHORT_5_6_5: return "ctx.UNSIGNED_SHORT_5_6_5";
    +    case FRAGMENT_SHADER: return "ctx.FRAGMENT_SHADER";
    +    case VERTEX_SHADER: return "ctx.VERTEX_SHADER";
    +    case MAX_VERTEX_ATTRIBS: return "ctx.MAX_VERTEX_ATTRIBS";
    +    case MAX_VERTEX_UNIFORM_VECTORS: return "ctx.MAX_VERTEX_UNIFORM_VECTORS";
    +    case MAX_VARYING_VECTORS: return "ctx.MAX_VARYING_VECTORS";
    +    case MAX_COMBINED_TEXTURE_IMAGE_UNITS: return "ctx.MAX_COMBINED_TEXTURE_IMAGE_UNITS";
    +    case MAX_VERTEX_TEXTURE_IMAGE_UNITS: return "ctx.MAX_VERTEX_TEXTURE_IMAGE_UNITS";
    +    case MAX_TEXTURE_IMAGE_UNITS: return "ctx.MAX_TEXTURE_IMAGE_UNITS";
    +    case MAX_FRAGMENT_UNIFORM_VECTORS: return "ctx.MAX_FRAGMENT_UNIFORM_VECTORS";
    +    case SHADER_TYPE: return "ctx.SHADER_TYPE";
    +    case DELETE_STATUS: return "ctx.DELETE_STATUS";
    +    case LINK_STATUS: return "ctx.LINK_STATUS";
    +    case VALIDATE_STATUS: return "ctx.VALIDATE_STATUS";
    +    case ATTACHED_SHADERS: return "ctx.ATTACHED_SHADERS";
    +    case ACTIVE_UNIFORMS: return "ctx.ACTIVE_UNIFORMS";
    +    case ACTIVE_UNIFORM_MAX_LENGTH: return "ctx.ACTIVE_UNIFORM_MAX_LENGTH";
    +    case ACTIVE_ATTRIBUTES: return "ctx.ACTIVE_ATTRIBUTES";
    +    case ACTIVE_ATTRIBUTE_MAX_LENGTH: return "ctx.ACTIVE_ATTRIBUTE_MAX_LENGTH";
    +    case SHADING_LANGUAGE_VERSION: return "ctx.SHADING_LANGUAGE_VERSION";
    +    case CURRENT_PROGRAM: return "ctx.CURRENT_PROGRAM";
    +    case NEVER: return "ctx.NEVER";
    +    case LESS: return "ctx.LESS";
    +    case EQUAL: return "ctx.EQUAL";
    +    case LEQUAL: return "ctx.LEQUAL";
    +    case GREATER: return "ctx.GREATER";
    +    case NOTEQUAL: return "ctx.NOTEQUAL";
    +    case GEQUAL: return "ctx.GEQUAL";
    +    case ALWAYS: return "ctx.ALWAYS";
    +    case KEEP: return "ctx.KEEP";
    +    case REPLACE: return "ctx.REPLACE";
    +    case INCR: return "ctx.INCR";
    +    case DECR: return "ctx.DECR";
    +    case INVERT: return "ctx.INVERT";
    +    case INCR_WRAP: return "ctx.INCR_WRAP";
    +    case DECR_WRAP: return "ctx.DECR_WRAP";
    +    case VENDOR: return "ctx.VENDOR";
    +    case RENDERER: return "ctx.RENDERER";
    +    case VERSION: return "ctx.VERSION";
    +    case NEAREST: return "ctx.NEAREST";
    +    case LINEAR: return "ctx.LINEAR";
    +    case NEAREST_MIPMAP_NEAREST: return "ctx.NEAREST_MIPMAP_NEAREST";
    +    case LINEAR_MIPMAP_NEAREST: return "ctx.LINEAR_MIPMAP_NEAREST";
    +    case NEAREST_MIPMAP_LINEAR: return "ctx.NEAREST_MIPMAP_LINEAR";
    +    case LINEAR_MIPMAP_LINEAR: return "ctx.LINEAR_MIPMAP_LINEAR";
    +    case TEXTURE_MAG_FILTER: return "ctx.TEXTURE_MAG_FILTER";
    +    case TEXTURE_MIN_FILTER: return "ctx.TEXTURE_MIN_FILTER";
    +    case TEXTURE_WRAP_S: return "ctx.TEXTURE_WRAP_S";
    +    case TEXTURE_WRAP_T: return "ctx.TEXTURE_WRAP_T";
    +    case TEXTURE_2D: return "ctx.TEXTURE_2D";
    +    case TEXTURE: return "ctx.TEXTURE";
    +    case TEXTURE_CUBE_MAP: return "ctx.TEXTURE_CUBE_MAP";
    +    case TEXTURE_BINDING_CUBE_MAP: return "ctx.TEXTURE_BINDING_CUBE_MAP";
    +    case TEXTURE_CUBE_MAP_POSITIVE_X: return "ctx.TEXTURE_CUBE_MAP_POSITIVE_X";
    +    case TEXTURE_CUBE_MAP_NEGATIVE_X: return "ctx.TEXTURE_CUBE_MAP_NEGATIVE_X";
    +    case TEXTURE_CUBE_MAP_POSITIVE_Y: return "ctx.TEXTURE_CUBE_MAP_POSITIVE_Y";
    +    case TEXTURE_CUBE_MAP_NEGATIVE_Y: return "ctx.TEXTURE_CUBE_MAP_NEGATIVE_Y";
    +    case TEXTURE_CUBE_MAP_POSITIVE_Z: return "ctx.TEXTURE_CUBE_MAP_POSITIVE_Z";
    +    case TEXTURE_CUBE_MAP_NEGATIVE_Z: return "ctx.TEXTURE_CUBE_MAP_NEGATIVE_Z";
    +    case MAX_CUBE_MAP_TEXTURE_SIZE: return "ctx.MAX_CUBE_MAP_TEXTURE_SIZE";
    +    case TEXTURE0: return "ctx.TEXTURE0";
    +    case TEXTURE1: return "ctx.TEXTURE1";
    +    case TEXTURE2: return "ctx.TEXTURE2";
    +    case TEXTURE3: return "ctx.TEXTURE3";
    +    case TEXTURE4: return "ctx.TEXTURE4";
    +    case TEXTURE5: return "ctx.TEXTURE5";
    +    case TEXTURE6: return "ctx.TEXTURE6";
    +    case TEXTURE7: return "ctx.TEXTURE7";
    +    case TEXTURE8: return "ctx.TEXTURE8";
    +    case TEXTURE9: return "ctx.TEXTURE9";
    +    case TEXTURE10: return "ctx.TEXTURE10";
    +    case TEXTURE11: return "ctx.TEXTURE11";
    +    case TEXTURE12: return "ctx.TEXTURE12";
    +    case TEXTURE13: return "ctx.TEXTURE13";
    +    case TEXTURE14: return "ctx.TEXTURE14";
    +    case TEXTURE15: return "ctx.TEXTURE15";
    +    case TEXTURE16: return "ctx.TEXTURE16";
    +    case TEXTURE17: return "ctx.TEXTURE17";
    +    case TEXTURE18: return "ctx.TEXTURE18";
    +    case TEXTURE19: return "ctx.TEXTURE19";
    +    case TEXTURE20: return "ctx.TEXTURE20";
    +    case TEXTURE21: return "ctx.TEXTURE21";
    +    case TEXTURE22: return "ctx.TEXTURE22";
    +    case TEXTURE23: return "ctx.TEXTURE23";
    +    case TEXTURE24: return "ctx.TEXTURE24";
    +    case TEXTURE25: return "ctx.TEXTURE25";
    +    case TEXTURE26: return "ctx.TEXTURE26";
    +    case TEXTURE27: return "ctx.TEXTURE27";
    +    case TEXTURE28: return "ctx.TEXTURE28";
    +    case TEXTURE29: return "ctx.TEXTURE29";
    +    case TEXTURE30: return "ctx.TEXTURE30";
    +    case TEXTURE31: return "ctx.TEXTURE31";
    +    case ACTIVE_TEXTURE: return "ctx.ACTIVE_TEXTURE";
    +    case REPEAT: return "ctx.REPEAT";
    +    case CLAMP_TO_EDGE: return "ctx.CLAMP_TO_EDGE";
    +    case MIRRORED_REPEAT: return "ctx.MIRRORED_REPEAT";
    +    case FLOAT_VEC2: return "ctx.FLOAT_VEC2";
    +    case FLOAT_VEC3: return "ctx.FLOAT_VEC3";
    +    case FLOAT_VEC4: return "ctx.FLOAT_VEC4";
    +    case INT_VEC2: return "ctx.INT_VEC2";
    +    case INT_VEC3: return "ctx.INT_VEC3";
    +    case INT_VEC4: return "ctx.INT_VEC4";
    +    case BOOL: return "ctx.BOOL";
    +    case BOOL_VEC2: return "ctx.BOOL_VEC2";
    +    case BOOL_VEC3: return "ctx.BOOL_VEC3";
    +    case BOOL_VEC4: return "ctx.BOOL_VEC4";
    +    case FLOAT_MAT2: return "ctx.FLOAT_MAT2";
    +    case FLOAT_MAT3: return "ctx.FLOAT_MAT3";
    +    case FLOAT_MAT4: return "ctx.FLOAT_MAT4";
    +    case SAMPLER_2D: return "ctx.SAMPLER_2D";
    +    case SAMPLER_CUBE: return "ctx.SAMPLER_CUBE";
    +    case VERTEX_ATTRIB_ARRAY_ENABLED: return "ctx.VERTEX_ATTRIB_ARRAY_ENABLED";
    +    case VERTEX_ATTRIB_ARRAY_SIZE: return "ctx.VERTEX_ATTRIB_ARRAY_SIZE";
    +    case VERTEX_ATTRIB_ARRAY_STRIDE: return "ctx.VERTEX_ATTRIB_ARRAY_STRIDE";
    +    case VERTEX_ATTRIB_ARRAY_TYPE: return "ctx.VERTEX_ATTRIB_ARRAY_TYPE";
    +    case VERTEX_ATTRIB_ARRAY_NORMALIZED: return "ctx.VERTEX_ATTRIB_ARRAY_NORMALIZED";
    +    case VERTEX_ATTRIB_ARRAY_POINTER: return "ctx.VERTEX_ATTRIB_ARRAY_POINTER";
    +    case VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: return "ctx.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING";
    +    case COMPILE_STATUS: return "ctx.COMPILE_STATUS";
    +    case INFO_LOG_LENGTH: return "ctx.INFO_LOG_LENGTH";
    +    case SHADER_SOURCE_LENGTH: return "ctx.SHADER_SOURCE_LENGTH";
    +    case LOW_FLOAT: return "ctx.LOW_FLOAT";
    +    case MEDIUM_FLOAT: return "ctx.MEDIUM_FLOAT";
    +    case HIGH_FLOAT: return "ctx.HIGH_FLOAT";
    +    case LOW_INT: return "ctx.LOW_INT";
    +    case MEDIUM_INT: return "ctx.MEDIUM_INT";
    +    case HIGH_INT: return "ctx.HIGH_INT";
    +    case FRAMEBUFFER: return "ctx.FRAMEBUFFER";
    +    case RENDERBUFFER: return "ctx.RENDERBUFFER";
    +    case RGBA4: return "ctx.RGBA4";
    +    case RGB5_A1: return "ctx.RGB5_A1";
    +    case RGB565: return "ctx.RGB565";
    +    case DEPTH_COMPONENT16: return "ctx.DEPTH_COMPONENT16";
    +    case STENCIL_INDEX: return "ctx.STENCIL_INDEX";
    +    case STENCIL_INDEX8: return "ctx.STENCIL_INDEX8";
    +    case DEPTH_STENCIL: return "ctx.DEPTH_STENCIL";
    +    case RENDERBUFFER_WIDTH: return "ctx.RENDERBUFFER_WIDTH";
    +    case RENDERBUFFER_HEIGHT: return "ctx.RENDERBUFFER_HEIGHT";
    +    case RENDERBUFFER_INTERNAL_FORMAT: return "ctx.RENDERBUFFER_INTERNAL_FORMAT";
    +    case RENDERBUFFER_RED_SIZE: return "ctx.RENDERBUFFER_RED_SIZE";
    +    case RENDERBUFFER_GREEN_SIZE: return "ctx.RENDERBUFFER_GREEN_SIZE";
    +    case RENDERBUFFER_BLUE_SIZE: return "ctx.RENDERBUFFER_BLUE_SIZE";
    +    case RENDERBUFFER_ALPHA_SIZE: return "ctx.RENDERBUFFER_ALPHA_SIZE";
    +    case RENDERBUFFER_DEPTH_SIZE: return "ctx.RENDERBUFFER_DEPTH_SIZE";
    +    case RENDERBUFFER_STENCIL_SIZE: return "ctx.RENDERBUFFER_STENCIL_SIZE";
    +    case FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: return "ctx.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE";
    +    case FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: return "ctx.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME";
    +    case FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: return "ctx.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL";
    +    case FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: return "ctx.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE";
    +    case COLOR_ATTACHMENT0: return "ctx.COLOR_ATTACHMENT0";
    +    case DEPTH_ATTACHMENT: return "ctx.DEPTH_ATTACHMENT";
    +    case STENCIL_ATTACHMENT: return "ctx.STENCIL_ATTACHMENT";
    +    case DEPTH_STENCIL_ATTACHMENT: return "ctx.DEPTH_STENCIL_ATTACHMENT";
    +    //case NONE: return "ctx.NONE";
    +    case FRAMEBUFFER_COMPLETE: return "ctx.FRAMEBUFFER_COMPLETE";
    +    case FRAMEBUFFER_INCOMPLETE_ATTACHMENT: return "ctx.FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
    +    case FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: return "ctx.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";
    +    case FRAMEBUFFER_INCOMPLETE_DIMENSIONS: return "ctx.FRAMEBUFFER_INCOMPLETE_DIMENSIONS";
    +    case FRAMEBUFFER_UNSUPPORTED: return "ctx.FRAMEBUFFER_UNSUPPORTED";
    +    case FRAMEBUFFER_BINDING: return "ctx.FRAMEBUFFER_BINDING";
    +    case RENDERBUFFER_BINDING: return "ctx.RENDERBUFFER_BINDING";
    +    case MAX_RENDERBUFFER_SIZE: return "ctx.MAX_RENDERBUFFER_SIZE";
    +    case INVALID_FRAMEBUFFER_OPERATION: return "ctx.INVALID_FRAMEBUFFER_OPERATION";
    +    case UNPACK_FLIP_Y_WEBGL: return "ctx.UNPACK_FLIP_Y_WEBGL";
    +    case UNPACK_PREMULTIPLY_ALPHA_WEBGL: return "ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL";
    +    case CONTEXT_LOST_WEBGL: return "ctx.CONTEXT_LOST_WEBGL";
    +    case UNPACK_COLORSPACE_CONVERSION_WEBGL: return "ctx.UNPACK_COLORSPACE_CONVERSION_WEBGL";
    +    case BROWSER_DEFAULT_WEBGL: return "ctx.BROWSER_DEFAULT_WEBGL";
    +  }
    +  return "BAD_GL_ENUM";
    +}
    +
    +
    +WGLWidget::WGLWidget(WContainerWidget *parent):
    +  WInteractWidget(parent),
    +  renderWidth_(100),
    +  renderHeight_(100),
    +  updatePaintGL_(true),
    +  updateResizeGL_(true),
    +  updateGL_(false),
    +  sizeChanged_(true),
    +  alternative_(0),
    +  shaders_(0),
    +  programs_(0),
    +  attributes_(0),
    +  uniforms_(0),
    +  buffers_(0),
    +  textures_(0),
    +  matrices_(0),
    +  webglNotAvailable_(this, "webglNotAvailable"),
    +  webGlNotAvailable_(false),
    +  mouseWentDownSlot_("function(){}", this),
    +  mouseWentUpSlot_("function(){}", this),
    +  mouseDraggedSlot_("function(){}", this),
    +  mouseWheelSlot_("function(){}", this),
    +  repaintSlot_("function() {"
    +    "var o = " + this->glObjJsRef() + ";"
    +    "if(o.ctx) o.paintGL();"
    +    "}", this)
    +
    +{
    +  setInline(false);
    +  setLayoutSizeAware(true);
    +  // A canvas must have a size set.
    +  resize(100, 100);
    +  webglNotAvailable_.connect(this, &WGLWidget::webglNotAvailable);
    +
    +  mouseWentDown().connect(mouseWentDownSlot_);
    +  mouseWentUp().connect(mouseWentUpSlot_);
    +  mouseDragged().connect(mouseDraggedSlot_);
    +  mouseWheel().connect(mouseWheelSlot_);
    +  setAlternativeContent(new WText("Your browser does not support WebGL"));
    +}
    +
    +WGLWidget::~WGLWidget()
    +{
    +}
    +
    +void WGLWidget::setAlternativeContent(WWidget *alternative)
    +{
    +  if (alternative_)
    +    delete alternative_;
    +  alternative_ = alternative;
    +  if (alternative_)
    +    addChild(alternative_);
    +}
    +
    +void WGLWidget::webglNotAvailable()
    +{
    +  std::cout << "WebGL Not available in client!\n";
    +  webGlNotAvailable_ = true;
    +}
    +
    +std::string WGLWidget::renderRemoveJs()
    +{
    +  if (webGlNotAvailable_) {
    +    // The canvas was already deleted client-side
    +    return alternative_->webWidget()->renderRemoveJs();
    +  } else {
    +    // Nothing special, behave as usual
    +    return WInteractWidget::renderRemoveJs();
    +  }
    +}
    +
    +std::string WGLWidget::glObjJsRef()
    +{
    +  return "(function(){"
    +    "var r = " + jsRef() + ";"
    +    "var o = r ? jQuery.data(r,'obj') : null;"
    +    "return o ? o : {ctx: null};"
    +    "})()";
    +}
    +
    +char *WGLWidget::makeFloat(double d, char *buf)
    +{
    +  return Utils::round_str(d, 6, buf);
    +}
    +
    +char *WGLWidget::makeInt(int i, char *buf)
    +{
    +  return Utils::itoa(i, buf);
    +}
    +
    +DomElement *WGLWidget::createDomElement(WApplication *app)
    +{
    +  DomElement *result = 0;
    +  if (app->environment().agentIsIElt(9) ||
    +      app->environment().agent() == WEnvironment::MobileWebKitAndroid) {
    +    // Shortcut: IE misbehaves when it encounters a canvas element
    +    result = DomElement::createNew(DomElement_DIV);
    +    if (alternative_)
    +      result->addChild(alternative_->createSDomElement(app));
    +  } else {
    +    result = DomElement::createNew(DomElement_CANVAS);;
    +    if (alternative_) {
    +      result->addChild(alternative_->createSDomElement(app));
    +    }
    +  }
    +  setId(result, app);
    +
    +  std::stringstream tmp;
    +    tmp <<
    +      "{\n"
    +      """var o = new " WT_CLASS ".WGLWidget(" << app->javaScriptClass() << "," << jsRef() << ");\n"
    +      """o.discoverContext(function(){" << webglNotAvailable_.createCall() << "});\n";
    +
    +    js_.str("");
    +    initializeGL();
    +    tmp <<
    +      """o.initializeGL=function(){\n"
    +      //"""debugger;\n"
    +      """var obj=" << glObjJsRef() << ";\n"
    +      """var ctx=obj.ctx;\n" <<
    +      "" << js_.str() <<
    +      """o.initialized = true;\n"
    +      // updates are queued until initialization is complete
    +      """var key;\n"
    +      """for(key in o.updates) o.updates[key]();\n"
    +      """o.updates = new Array();\n"
    +      // Similar, resizeGL is not executed until initialized
    +      """o.resizeGL();\n"
    +      "};\n"
    +      "}\n";
    +  tmp << delayedJavaScript_.str();
    +  delayedJavaScript_.str("");
    +  result->callJavaScript(tmp.str());
    +
    +  repaintGL(PAINT_GL | RESIZE_GL);
    +
    +  updateDom(*result, true);
    +
    +
    +  return result;
    +}
    +
    +void WGLWidget::repaintGL(WFlags<ClientSideRenderer> which)
    +{
    +  if (which & PAINT_GL)
    +    updatePaintGL_ = true;
    +  if (which & RESIZE_GL)
    +    updateResizeGL_ = true;
    +  if (which & UPDATE_GL)
    +    updateGL_ = true;
    +  if (which != 0)
    +    repaint(Wt::RepaintPropertyAttribute); // FIXME: correct?
    +}
    +
    +void WGLWidget::updateDom(DomElement &element, bool all)
    +{
    +  if (webGlNotAvailable_)
    +    return;
    +
    +  DomElement *el = &element;
    +  if (all || sizeChanged_) {
    +    el->setAttribute("width", boost::lexical_cast<std::string>(renderWidth_));
    +    el->setAttribute("height", boost::lexical_cast<std::string>(renderHeight_));
    +    sizeChanged_ = false;
    +  }
    +  if (updateGL_ || updateResizeGL_ || updatePaintGL_) {
    +    std::stringstream tmp;
    +    tmp <<
    +      "var o = " << glObjJsRef() << ";\n"
    +      "if(o.ctx){\n";
    +    if (updateGL_) {
    +      js_.str("");
    +      updateGL();
    +      tmp << "var update =function(){\n"
    +        "var obj=" << glObjJsRef() << ";\n"
    +        "var ctx=obj.ctx;\n"
    +        << js_.str() << "\n};\n"
    +        // cannot execute updates before initializeGL is executed
    +        "o.updates.push(update);";
    +    }
    +    if (updateResizeGL_) {
    +      js_.str("");
    +      resizeGL(renderWidth_, renderHeight_);
    +      tmp << "o.resizeGL=function(){\n"
    +        "var obj=" << glObjJsRef() << ";\n"
    +        "var ctx=obj.ctx;\n"
    +        << js_.str() << "};";
    +    }
    +    if (updatePaintGL_) {
    +      js_.str("");
    +      paintGL();
    +      tmp << "o.paintGL=function(){\n"
    +        "var obj=" << glObjJsRef() << ";\n"
    +        "var ctx=obj.ctx;\n"
    +        << js_.str() << "};";
    +    }
    +    js_.str("");
    +    // Make sure textures are loaded before we render
    +    tmp << "}\n";
    +    if (preloadImages_.size() > 0) {
    +      tmp << "new Wt._p_.ImagePreloader([";
    +      for (unsigned i = 0; i < preloadImages_.size(); ++i) {
    +        if (i != 0)
    +          tmp << ',';
    +        tmp << '\'' << fixRelativeUrl(preloadImages_[i].second) << '\'';
    +      }
    +      tmp <<
    +        "],function(images){\n"
    +        "var o=" << glObjJsRef() << ";\n"
    +        "var ctx=null;\n"
    +        " if(o) ctx=o.ctx;\n"
    +        "if(ctx == null) return;\n";
    +      for (unsigned i = 0; i < preloadImages_.size(); ++i) {
    +        std::string texture = preloadImages_[i].first;
    +        tmp << texture << "=ctx.createTexture();\n"
    +          << texture << ".image=images[" << i << "];\n";
    +      }
    +      tmp <<
    +        "if(o.initialized){"
    +        // Delay calling of update() to after textures are loaded
    +        """var key;"
    +        """for(key in o.updates) o.updates[key]();"
    +        """o.updates = new Array();"
    +        // Delay calling of resizeGL() to after updates are executed
    +        """o.resizeGL();"
    +        """o.paintGL();"
    +        "} else {"
    +        // initializeGL will call updates and resizeGL
    +        """o.initializeGL();\n"
    +        """o.paintGL();\n"
    +        "}});";
    +    } else {
    +      // No textures to load - go and paint
    +      tmp <<
    +        "if(o.initialized) {"
    +        """var key;"
    +        """for(key in o.updates) o.updates[key]();"
    +        """o.updates = new Array();"
    +        """o.resizeGL();"
    +        """o.paintGL();"
    +        "} else {"
    +        """o.initializeGL();"
    +        """o.paintGL();"
    +        "}";
    +    }
    +    el->callJavaScript(tmp.str());
    +    updateGL_ = updatePaintGL_ = updateResizeGL_ = false;
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WGLWidget::getDomChanges(std::vector<DomElement *>& result,
    +                                WApplication *app)
    +{
    +  WWebWidget::getDomChanges(result, app);
    +}
    +
    +DomElementType WGLWidget::domElementType() const
    +{
    +  return Wt::DomElement_CANVAS;
    +}
    +
    +void WGLWidget::resize(const WLength &width, const WLength &height)
    +{
    +  WInteractWidget::resize(width, height);
    +  layoutSizeChanged(width.value(), height.value());
    +}
    +
    +void WGLWidget::layoutSizeChanged(int width, int height)
    +{
    +  renderWidth_ = width;
    +  renderHeight_ = height;
    +  sizeChanged_ = true;
    +  repaint(Wt::RepaintPropertyAttribute);
    +  repaintGL(RESIZE_GL);
    +}
    +
    +void WGLWidget::defineJavaScript()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  const char *GLMATRIX_JS = "js/WtGlMatrix.js";
    +
    +  if (!app->javaScriptLoaded(GLMATRIX_JS)) {
    +    LOAD_JAVASCRIPT(app, GLMATRIX_JS, "glMatrix", wtjs2);
    +    app->setJavaScriptLoaded(GLMATRIX_JS);
    +  }
    +
    +  const char *THIS_JS = "js/WGLWidget.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WGLWidget", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +}
    +
    +void WGLWidget::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull)
    +    defineJavaScript();
    +  WInteractWidget::render(flags);
    +}
    +
    +void WGLWidget::paintGL()
    +{
    +}
    +
    +void WGLWidget::resizeGL(int width, int height)
    +{
    +}
    +
    +void WGLWidget::initializeGL()
    +{
    +}
    +
    +void WGLWidget::updateGL()
    +{
    +}
    +
    +void WGLWidget::activeTexture(GLenum texture)
    +{
    +  js_ << "ctx.activeTexture(" << toString(texture) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::attachShader(Program program, Shader shader)
    +{
    +  js_ << "ctx.attachShader(" << program << ", " << shader << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::bindAttribLocation(Program program, unsigned index, const std::string &name)
    +{
    +  js_ << "ctx.bindAttribLocation(" << program << "," << index
    +    << "," << jsStringLiteral(name) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::bindBuffer(GLenum target, Buffer buffer)
    +{
    +  js_ << "ctx.bindBuffer(" << toString(target) << "," << buffer << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::bindTexture(GLenum target, Texture texture)
    +{
    +  js_ << "ctx.bindTexture(" << toString(target) << "," << texture << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::blendColor(double red, double green, double blue, double alpha)
    +{
    +  char buf[30];
    +  js_ << "ctx.blendColor(" << makeFloat(red, buf) << ",";
    +  js_ << makeFloat(green, buf) << ",";
    +  js_ << makeFloat(blue, buf) << ",";
    +  js_ << makeFloat(alpha, buf) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::blendEquation(GLenum mode)
    +{
    +  js_ << "ctx.blendEquation(" << toString(mode) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::blendEquationSeparate(GLenum modeRGB,
    +                                      GLenum modeAlpha)
    +{
    +  js_ << "ctx.blendEquationSeparate(" << toString(modeRGB) << "," 
    +    << toString(modeAlpha) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::blendFunc(GLenum sfactor, GLenum dfactor)
    +{
    +  js_ << "ctx.blendFunc(" << toString(sfactor) << ","
    +    << toString(dfactor) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::blendFuncSeparate(GLenum srcRGB,
    +                                  GLenum dstRGB,
    +                                  GLenum srcAlpha,
    +                                  GLenum dstAlpha)
    +{
    +  js_ << "ctx.blendFuncSeparate(" << toString(srcRGB) << ","
    +    << toString(dstRGB) << "," << toString(srcAlpha) << ","
    +    << toString(dstAlpha) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::clear(WFlags<GLenum> mask)
    +{
    +  js_ << "ctx.clear(";
    +  if (mask & COLOR_BUFFER_BIT) js_ << "ctx.COLOR_BUFFER_BIT|";
    +  if (mask & DEPTH_BUFFER_BIT) js_ << "ctx.DEPTH_BUFFER_BIT|";
    +  if (mask & STENCIL_BUFFER_BIT) js_ << "ctx.STENCIL_BUFFER_BIT|";
    +
    +  js_ << "0);";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::clearColor(double r, double g, double b, double a)
    +{
    +  char buf[30];
    +  js_ << "ctx.clearColor(" << makeFloat(r, buf) << ",";
    +  js_ << makeFloat(g, buf) << ",";
    +  js_ << makeFloat(b, buf) << ",";
    +  js_ << makeFloat(a, buf) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::clearDepth(double depth)
    +{
    +  char buf[30];
    +  js_ << "ctx.clearDepth(" << makeFloat(depth, buf) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::clearStencil(int s)
    +{
    +  js_ << "ctx.clearStencil(" << s << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::colorMask(bool red, bool green, bool blue, bool alpha)
    +{
    +  js_ << "ctx.colorMask(" << (red ? "true" : "false") << ","
    +    << (green ? "true" : "false") << ","
    +    << (blue ? "true" : "false") << ","
    +    << (alpha ? "true" : "false") << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::compileShader(Shader shader)
    +{
    +  js_ << "ctx.compileShader(" << shader << ");";
    +  js_ << "if (!ctx.getShaderParameter(" << shader << ", ctx.COMPILE_STATUS)) {"
    +    << "alert(ctx.getShaderInfoLog(" << shader << "));}";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::copyTexImage2D(GLenum target, int level,
    +                               GLenum internalFormat,
    +                               int x, int y,
    +                               unsigned width, unsigned height, 
    +                               int border)
    +{
    +  js_ << "ctx.copyTexImage2D(" << toString(target) << "," << level << ","
    +    << toString(internalFormat) << "," << x << "," << y << ","
    +    << width << "," << height << "," << border << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::copyTexSubImage2D(GLenum target, int level,
    +                                  int xoffset, int yoffset,
    +                                  int x, int y,
    +                                  unsigned width, unsigned height)
    +{
    +  js_ << "ctx.copyTexSubImage2D(" << toString(target) << "," << level << ","
    +    << xoffset << "," << yoffset << "," << x << "," << y << ","
    +    << width << "," << height << ");";
    +  GLDEBUG;
    +}
    +
    +WGLWidget::Buffer WGLWidget::createBuffer()
    +{
    +  Buffer retval = "ctx.WtBuffer" + boost::lexical_cast<std::string>(buffers_++);
    +  js_ << retval << "=ctx.createBuffer();";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +WGLWidget::Program WGLWidget::createProgram()
    +{
    +  Program retval = "ctx.WtProgram" + boost::lexical_cast<std::string>(programs_++);
    +  js_ << retval << "=ctx.createProgram();";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +WGLWidget::Shader WGLWidget::createShader(GLenum shader)
    +{
    +  Shader retval = "ctx.WtShader" + boost::lexical_cast<std::string>(shaders_++);
    +  js_ << retval << "=ctx.createShader(" << toString(shader) << ");";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +WGLWidget::Texture WGLWidget::createTexture()
    +{
    +  Texture retval = "ctx.WtTexture" + boost::lexical_cast<std::string>(textures_++);
    +  js_ << retval << "=ctx.createTexture();";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +WGLWidget::Texture WGLWidget::createTextureAndLoad(const std::string &url)
    +{
    +  Texture retval = "ctx.WtTexture" + boost::lexical_cast<std::string>(textures_++);
    +  preloadImages_.push_back(std::make_pair<std::string, std::string>(retval, url));
    +  GLDEBUG;
    +  return retval;
    +
    +}
    +
    +void WGLWidget::cullFace(GLenum mode)
    +{
    +  js_ << "ctx.cullFace(" << toString(mode) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::deleteBuffer(Buffer buffer)
    +{
    +  js_ << "ctx.deleteBuffer(" << buffer << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::deleteProgram(Program program)
    +{
    +  js_ << "ctx.deleteProgram(" << program << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::deleteShader(Shader shader)
    +{
    +  js_ << "ctx.deleteShader(" << shader << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::deleteTexture(Texture texture)
    +{
    +  js_ << "ctx.deleteTexture(" << texture << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::depthFunc(GLenum func)
    +{
    +  js_ << "ctx.depthFunc(" << toString(func) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::depthMask(bool flag)
    +{
    +  js_ << "ctx.depthMask(" << (flag ? "true" : "false") << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::depthRange(double zNear, double zFar)
    +{
    +  char buf[30];
    +  js_ << "ctx.depthRange(" << makeFloat(zNear, buf) << ",";
    +  js_ << makeFloat(zFar, buf) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::detachShader(Program program, Shader shader)
    +{
    +  js_ << "ctx.detachShader(" << program << "," << shader << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::disable(GLenum cap)
    +{
    +  js_ << "ctx.disable(" << toString(cap) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::drawArrays(GLenum mode, int first, unsigned count)
    +{
    +  js_ << "ctx.drawArrays(" << toString(mode) << "," << first << "," << count << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::drawElements(GLenum mode, unsigned count,
    +                             GLenum type, unsigned offset)
    +{
    +  js_ << "ctx.drawElements(" << toString(mode) << "," << count << ","
    +    << toString(type) << "," << offset << ");";
    +}
    +
    +void WGLWidget::enable(GLenum cap)
    +{
    +  js_ << "ctx.enable(" << toString(cap) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::enableVertexAttribArray(AttribLocation index)
    +{
    +  js_ << "ctx.enableVertexAttribArray(" << index << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::finish()
    +{
    +  js_ << "ctx.finish();";
    +  GLDEBUG;
    +}
    +void WGLWidget::flush()
    +{
    +  js_ << "ctx.flush();";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::frontFace(GLenum mode)
    +{
    +  js_ << "ctx.frontFace(" << toString(mode) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::generateMipmap(GLenum target)
    +{
    +  js_ << "ctx.generateMipmap(" << toString(target) << ");";
    +  GLDEBUG;
    +}
    +
    +WGLWidget::AttribLocation WGLWidget::getAttribLocation(Program program, const std::string &attrib)
    +{
    +  AttribLocation retval = "ctx.WtAttrib" + boost::lexical_cast<std::string>(attributes_++);
    +  js_ << retval << "=ctx.getAttribLocation(" << program << "," << jsStringLiteral(attrib) << ");";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +WGLWidget::UniformLocation WGLWidget::getUniformLocation(Program program, const std::string location)
    +{
    +  UniformLocation retval = "ctx.WtUniform" + boost::lexical_cast<std::string>(uniforms_++);
    +  js_ << retval << "=ctx.getUniformLocation(" << program << "," << jsStringLiteral(location) << ");";
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +void WGLWidget::hint(GLenum target, GLenum mode)
    +{
    +  js_ << "ctx.hint(" << toString(target) << "," << toString(mode) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::lineWidth(double width)
    +{
    +  char buf[30];
    +  js_ << "ctx.lineWidth(" << makeFloat(width, buf) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::linkProgram(Program program)
    +{
    +  js_ << "ctx.linkProgram(" << program << ");";
    +  js_ << "if(!ctx.getProgramParameter(" << program << ",ctx.LINK_STATUS)){"
    +    << "alert('Could not initialize shaders: ' + ctx.getProgramInfoLog(" << program << "));}";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::pixelStorei(GLenum pname, int param)
    +{
    +  js_ << "ctx.pixelStorei(" << toString(pname) << "," << param << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::polygonOffset(double factor, double units)
    +{
    +  char buf[30];
    +  js_ << "ctx.polygonOffset(" << makeFloat(factor, buf) << ",";
    +  js_ << makeFloat(units, buf) << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::sampleCoverage(double value, bool invert)
    +{
    +  char buf[30];
    +  js_ << "ctx.sampleCoverage(" << makeFloat(value, buf) << ","
    +    << (invert ? "true" : "false") << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::scissor(int x, int y, unsigned width, unsigned height)
    +{
    +  js_ << "ctx.scissor(" << x << "," << y << ","
    +    << width << "," << height << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::shaderSource(Shader shader, const std::string &src)
    +{
    +  js_ << "ctx.shaderSource(" << shader << "," << jsStringLiteral(src) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::stencilFunc(GLenum func, int ref, unsigned mask)
    +{
    +  js_ << "ctx.stencilFunc(" << toString(func) << "," << ref << "," << mask << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::stencilFuncSeparate(GLenum face,
    +                                    GLenum func, int ref,
    +                                    unsigned mask)
    +{
    +  js_ << "ctx.stencilFuncSeparate(" << toString(face) << "," << toString(func)
    +    << "," << ref << "," << mask << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::stencilMask(unsigned mask)
    +{
    +  js_ << "ctx.stencilMask(" << mask << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::stencilMaskSeparate(GLenum face, unsigned mask)
    +{
    +  js_ << "ctx.stencilMaskSeparate(" << toString(face) << "," << mask << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::stencilOp(GLenum fail, GLenum zfail,
    +                          GLenum zpass)
    +{
    +  js_ << "ctx.stencilOp(" << toString(fail) << "," << toString(zfail) << ","
    +    << toString(zpass) << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::stencilOpSeparate(GLenum face, GLenum fail,
    +                                  GLenum zfail, GLenum zpass)
    +{
    +  js_ << "ctx.stencilOpSeparate(" << toString(face) << ","
    +    << toString(fail) << "," << toString(zfail) << ","
    +    << toString(zpass) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::texImage2D(GLenum target, int level,
    +                           GLenum internalformat,
    +                           GLenum format, GLenum type,
    +                           WImage *image)
    +{
    +  js_ << "ctx.texImage2D(" << toString(target) << "," << level << ","
    +    << toString(internalformat) << "," << toString(format) << "," << toString(type)
    +    << "," << image->jsRef() << ");";
    +  GLDEBUG;
    +}
    +#if 0
    +void WGLWidget::texImage2D(GLenum target, int level,
    +                           GLenum internalformat,
    +                           GLenum format, GLenum type,
    +                           W)
    +{
    +  js_ << "ctx.texImage2D(" << toString(target) << "," << level << ","
    +    << toString(internalformat) << "," << toString(format) << "," << toString(type)
    +    << "," << image << ");";
    +  GLDEBUG;
    +}
    +#endif
    +void WGLWidget::texImage2D(GLenum target, int level,
    +                           GLenum internalformat,
    +                           GLenum format, GLenum type,
    +                           WHTML5Video *video)
    +{
    +  js_ << "if (" << video->jsMediaRef()<< ")"
    +    " ctx.texImage2D(" << toString(target) << "," << level << ","
    +    << toString(internalformat) << "," << toString(format) << "," << toString(type)
    +    << "," << video->jsMediaRef() << ");";
    +  GLDEBUG;
    +}
    +void WGLWidget::texImage2D(GLenum target, int level,
    +                           GLenum internalformat,
    +                           GLenum format, GLenum type,
    +                           Texture texture)
    +{
    +  js_ << "ctx.texImage2D(" << toString(target) << "," << level << ","
    +    << toString(internalformat) << "," << toString(format) << "," << toString(type)
    +    << "," << texture << ".image);";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::texParameteri(GLenum target,
    +                              GLenum pname,
    +                              GLenum param)
    +{
    +  js_ << "ctx.texParameteri(" << toString(target) << "," << toString(pname)
    +    << "," << toString(param) << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::useProgram(Program program)
    +{
    +  js_ << "ctx.useProgram(" << program << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::validateProgram(Program program)
    +{
    +  js_ << "ctx.validateProgram(" << program << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::vertexAttribPointer(AttribLocation location, int size,
    +                                 GLenum type, bool normalized,
    +                                 unsigned stride, unsigned offset)
    +{
    +  js_ << "ctx.vertexAttribPointer(" << location << "," << size << "," << toString(type)
    +    << "," << (normalized?"true":"false") << "," << stride << "," << offset << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::viewport(int x, int y, unsigned width, unsigned height)
    +{
    +  js_ << "ctx.viewport(" << x << "," << y << "," << width << "," << height << ");";
    +  GLDEBUG;
    +}
    +
    +void WGLWidget::connectJavaScript(Wt::EventSignalBase &s,
    +                                  const std::string &methodName)
    +{
    +  std::string jsFunction =
    +    "function(obj, event){"
    +    """var o=" + glObjJsRef() + ";"
    +    """if(o) o." + methodName + "(obj,event);"
    +    "}";
    +  s.connect(jsFunction);
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4 WGLWidget::createJavaScriptMatrix4()
    +{
    +  WGenericMatrix<double, 4, 4> m; // unit matrix
    +  JavaScriptMatrix4x4 retval("ctx.WtMatrix" + boost::lexical_cast<std::string>(matrices_++));
    +  js_ << retval.jsRef() << "=";
    +  renderfv(js_, m.data().begin(), m.data().end());
    +  js_ << ";";
    +
    +  GLDEBUG;
    +  return retval;
    +}
    +
    +void WGLWidget::setClientSideLookAtHandler(const JavaScriptMatrix4x4 &m,
    +                                           double centerX, double centerY, double centerZ,
    +                                           double uX, double uY, double uZ,
    +                                           double pitchRate, double yawRate)
    +{
    +  mouseWentDownSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseDown(o, e);}");
    +  mouseWentUpSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseUp(o, e);}");
    +  mouseDraggedSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseDragLookAt(o, e);}");
    +  mouseWheelSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseWheelLookAt(o, e);}");
    +  js_ <<
    +    "obj.setLookAtParams("
    +    << m.jsRef()
    +    << ",[" << centerX << "," << centerY << "," << centerZ << "],"
    +    << "[" << uX << "," << uY << "," << uZ << "],"
    +    << pitchRate << "," << yawRate << ");";
    +//  if (this->isRendered()) {
    +//    doJavaScript(ss.str());
    +//  } else {
    +//    delayedJavaScript_ << ss.str();
    +//  }
    +}
    +
    +void WGLWidget::setClientSideWalkHandler(const JavaScriptMatrix4x4 &m, double frontStep, double rotStep)
    +{
    +  mouseWentDownSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseDown(o, e);}");
    +  mouseWentUpSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseUp(o, e);}");
    +  mouseDraggedSlot_.setJavaScript("function(o, e){" + glObjJsRef() + ".mouseDragWalk(o, e);}");
    +  mouseWheelSlot_.setJavaScript("function(o, e){}");
    +  std::stringstream ss;
    +  ss << "(function(){var o = " << glObjJsRef() << ";"
    +    "if(o.ctx == null) return;"
    +    "o.setWalkParams(o."
    +    << m.jsRef() << ","
    +    << frontStep << "," << rotStep << ");})()";
    +  if (this->isRendered()) {
    +    doJavaScript(ss.str());
    +  } else {
    +    delayedJavaScript_ << ss.str();
    +  }
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4::JavaScriptMatrix4x4(const std::string &jsVariable):
    +  jsRef_(jsVariable)
    +{
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4::JavaScriptMatrix4x4()
    +{
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4::JavaScriptMatrix4x4(const WGLWidget::JavaScriptMatrix4x4 &other):
    +  jsRef_(other.jsRef())
    +{
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4 &
    +WGLWidget::JavaScriptMatrix4x4::operator=(const WGLWidget::JavaScriptMatrix4x4 &rhs)
    +{
    +  jsRef_ = rhs.jsRef_;
    +  return *this;
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::inverted() const
    +{
    +  return WGLWidget::JavaScriptMatrix4x4(WT_CLASS ".glMatrix.mat4.inverse(" +
    +    jsRef_ + ", " WT_CLASS ".glMatrix.mat4.create())");
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::transposed() const
    +{
    +  return WGLWidget::JavaScriptMatrix4x4(WT_CLASS ".glMatrix.mat4.transpose(" +
    +    jsRef_ + ", " WT_CLASS ".glMatrix.mat4.create())");
    +}
    +
    +WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::operator*(const WGenericMatrix<double, 4, 4> &m) const
    +{
    +  std::stringstream ss;
    +  ss << WT_CLASS ".glMatrix.mat4.multiply(" << jsRef_ << ",";
    +  WGenericMatrix<double, 4, 4> t(m.transposed());
    +  renderfv(ss, t.data().begin(), t.data().end());
    +  ss << ", " WT_CLASS ".glMatrix.mat4.create())";
    +  return WGLWidget::JavaScriptMatrix4x4(ss.str());
    +}
    diff --git a/wt-3.1.7a/src/Wt/WGenericMatrix b/wt-3.1.7a/src/Wt/WGenericMatrix
    new file mode 100644
    index 0000000..babfb92
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGenericMatrix
    @@ -0,0 +1,313 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WGENERICMATRIX_H_
    +#define WGENERICMATRIX_H_
    +
    +#include <Wt/WDllDefs.h>
    +#ifdef _MSC_VER
    +// Avoid 64-bit related warnings on MSVC
    +#pragma warning( push )
    +#pragma warning( disable : 4244 )
    +#pragma warning( disable : 4267 )
    +#endif
    +#define BOOST_SERIALIZATION_NO_LIB
    +#include <boost/numeric/ublas/matrix.hpp>
    +#ifdef _MSC_VER
    +#pragma warning( pop )
    +#endif
    +#include <boost/numeric/ublas/matrix_proxy.hpp>
    +#include <boost/numeric/ublas/io.hpp>
    +
    +namespace Wt {
    +
    +/*! \class WGenericMatrix Wt/WGenericMatrix Wt/WGenericMatrix
    + * \brief A generalized matrix class
    + *
    + * This class represents a fixed-size dense (!= sparse) matrix. It
    + * can be templatized to the number of rows and columns, and to the
    + * datatype stored (integer types, floatin point types, complex types, ...)
    + *
    + * The row order of this matrix class is row-major. This means that when
    + * accessing the raw data store linearly, you will first encounter all
    + * elements of the first row, then the second row, and so on.
    + *
    + * This template class is used in Wt as base class for transformation
    + * matrices, but can also be used as a general matrix class. Efficiency
    + * for this use case was considered when this class was implemented, but
    + * we recommend that you use a more specialized matrix class library
    + * if the algorithms you need exceed what's offered here (for example,
    + * if you intend to do many linear algebra computations, you may
    + * consider boost ublass, MTL, ...).
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +class WGenericMatrix
    +{
    +  typedef boost::numeric::ublas::bounded_matrix<T, Rows, Cols,
    +    boost::numeric::ublas::row_major> MatrixType;
    +public:
    +  typedef typename boost::numeric::ublas::bounded_matrix<T, Rows, Cols,
    +    boost::numeric::ublas::row_major>::array_type ArrayType;
    +
    +  /*! \brief Construct a identity matrix
    +   *
    +   * An identity matrix in this context is a matrix where m(i,i) = 1
    +   * and m(i,j) = 0, for i != j.
    +   */
    +  WGenericMatrix()
    +  {
    +    setToIdentity();
    +  }
    +
    +  /*! \brief Copy Constructor
    +   */
    +  WGenericMatrix(const WGenericMatrix<T, Rows, Cols> &other): m_(other.m_) {}
    +
    +  /*! \brief Constructs a matrix from an array of elements.
    +   *
    +   * The input array is assumed to be in row-major order. If elements is 0,
    +   * the matrix data is not initialized.
    +   */
    +  explicit WGenericMatrix(const T* elements)
    +  {
    +    if (elements) {
    +      for(unsigned int i = 0; i < Rows; ++i)
    +        for(unsigned int j = 0; j < Cols; ++j)
    +          m_(i, j) = elements[i * Rows + j];
    +    }
    +  }
    +
    +  /*! \brief Returns a const pointer to the internal data store.
    +   *
    +   * The array can be indexed with []. You can iterate over the
    +   * entire data store by using begin() and end() iterators. The
    +   * row order of the data is row major.
    +   */
    +  const ArrayType &constData() const { return m_.data(); }
    +
    +  /*! \brief Export the matrix data
    +   *
    +   * Stores the matrix in an array of Rows*Cols elements of type T,
    +   * pointed to by data. The data will be stored in row major order.
    +   */
    +  void copyDataTo(T *data)
    +  {
    +    for(unsigned int i = 0; i < Rows; ++i)
    +      for (unsigned int j = 0; j < Cols; ++j)
    +        data[i * Rows + j] = m_(i, j);
    +  }
    +
    +  /*! \brief Returns a reference to the internal data store.
    +   *
    +   * The array can be indexed with []. You can iterate over the
    +   * entire data store by using begin() and end() iterators. The
    +   * row order of the data is row major.
    +   */
    +  ArrayType &data() { return m_.data(); }
    +
    +  /*! \brief Returns a const reference to the internal data store.
    +   *
    +   * The array can be indexed with []. You can iterate over the
    +   * entire data store by using begin() and end() iterators. The
    +   * row order of the data is row major.
    +   */
    +  const ArrayType &data() const { return m_.data(); }
    +
    +  /*! \brief Fills every element of the matrix with the given value
    +   */
    +  void fill(T value)
    +  {
    +    for (unsigned i = 0; i < Rows * Cols; ++i)
    +      m_.data()[i] = value;
    +  }
    +
    +  /*! \brief Identity check.
    +   *
    +   * Returns true if the transform represents an identity transformation.
    +   */
    +  bool isIdentity() const
    +  {
    +    using namespace boost::numeric::ublas;
    +    identity_matrix<T> I(Rows > Cols ? Rows : Cols);
    +    for(unsigned i = 0; i < Rows; ++i)
    +      for (unsigned j = 0; j < Cols; ++j)
    +        if (m_(i, j) != I(i, j))
    +          return false;
    +    return true;
    +  }
    +
    +  /*! \brief Set this matrix to the identity matrix
    +   *
    +   * An identity matrix is in this context a matrix where m(i,i) = 1
    +   * and m(i,j) = 0, for i != j.
    +   */
    +  void setToIdentity()
    +  {
    +    #ifndef WT_TARGET_JAVA
    +    using namespace boost::numeric::ublas;
    +    m_ = project(identity_matrix<T>(Rows > Cols ? Rows : Cols),
    +        range(0, Rows), range(0, Cols));
    +    #endif
    +  }
    +
    +  /*! \brief Returns the transposed of the matrix
    +   */
    +  WGenericMatrix<T, Cols, Rows> transposed() const
    +  {
    +    return WGenericMatrix<T, Cols, Rows>(boost::numeric::ublas::trans(m_));
    +  }
    +
    +  /*! \brief Equality operator.
    +   *
    +   * Returns \c true if the matrices are exactly the same.
    +   */
    +  bool operator==(const WGenericMatrix<T, Rows, Cols>& rhs) const
    +  {
    +    for(unsigned i = 0; i < Rows; ++i)
    +      for (unsigned j = 0; j < Cols; ++j)
    +        if (rhs.m_(i, j) != m_(i, j))
    +          return false;
    +    return true;
    +  }
    +
    +  /*! \brief Inequality operator.
    +   *
    +   * Returns \c true if the transforms are different.
    +   */
    +  bool operator!=(const WGenericMatrix<T, Rows, Cols> &rhs) const {
    +    return !(*this == rhs);
    +   }
    +
    +  /*! \brief Returns the element at the given position
    +   */
    +  const T &operator()(int row, int column) const
    +  {
    +    return m_(row, column);
    +  }
    +
    +  /*! \brief Returns the element at the given position
    +   */
    +  T &operator()(int row, int column) { return m_(row, column); }
    +
    +  /*! \brief Multiply every element of the matrix with the given factor
    +   */
    +  WGenericMatrix<T, Rows, Cols> &operator*=(const T &factor)
    +  {
    +    m_ *= factor;
    +    return *this;
    +  }
    +
    +  /*! \brief Divide every element of the matrix by the given factor
    +   */
    +  WGenericMatrix<T, Rows, Cols> &operator/=(const T &factor)
    +  {
    +    m_ /= factor;
    +    return *this;
    +  }
    +
    +  /*! \brief Add the given matrix to this matrix
    +   */
    +  WGenericMatrix<T, Rows, Cols> &operator+=(
    +    const WGenericMatrix<T, Rows, Cols> &rhs)
    +  {
    +    m_ += rhs.m_;
    +    return *this;
    +  }
    +
    +  /*! \brief Substract the given matrix from this matrix
    +   */
    +  WGenericMatrix<T, Rows, Cols> &operator-=(
    +    const WGenericMatrix<T, Rows, Cols> &rhs)
    +  {
    +    m_ -= rhs.m_;
    +    return *this;
    +  }
    +
    +  MatrixType &impl() { return m_; }
    +  const MatrixType &impl() const { return m_; }
    +  WGenericMatrix(const MatrixType &m): m_(m) {}
    +
    +private:
    +  MatrixType m_;
    +};
    +
    +/*! \brief Multiply two matrices
    + */
    +template<typename T, std::size_t A, std::size_t B, std::size_t C>
    +inline WGenericMatrix<T, A, C> operator*(const WGenericMatrix<T, A, B> &l,
    +  const WGenericMatrix<T, B, C> &r)
    +{
    +  using namespace boost::numeric::ublas;
    +  return prod(l.impl(), r.impl());
    +}
    +
    +/*! \brief Print the matrix to an ostream
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +std::ostream &operator<<(std::ostream &os,
    +  const WGenericMatrix<T, Rows, Cols> &m)
    +{
    +  return os << m.impl();
    +}
    +
    +/*! \brief Multiply every element in the matrix with the given factor
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator*(const T &factor,
    +  const WGenericMatrix<T, Rows, Cols> &m)
    +{
    +  return factor * m.impl();
    +}
    +
    +/*! \brief Multiply every element in the matrix with the given factor
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator*(
    +  const WGenericMatrix<T, Rows, Cols> &m, const T &factor)
    +{
    +  return m.impl() * factor;
    +}
    +
    +/*! \brief Divide every element in the matrix by the given factor
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator/(
    +  const WGenericMatrix<T, Rows, Cols> &m, const T &factor)
    +{
    +  return m.impl() / factor;
    +}
    +
    +/*! \brief Add two matrices together
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator+(
    +  const WGenericMatrix<T, Rows, Cols> &l,
    +  const WGenericMatrix<T, Rows, Cols> &r)
    +{
    +  return l.impl() + r.impl();
    +}
    +
    +/*! \brief Substract two matrices
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator-(
    +  const WGenericMatrix<T, Rows, Cols> &l,
    +  const WGenericMatrix<T, Rows, Cols> &r)
    +{
    +  return l.impl() - r.impl();
    +}
    +
    +/*! \brief Negate every element in the matrix
    + */
    +template<typename T, std::size_t Rows, std::size_t Cols>
    +inline WGenericMatrix<T, Rows, Cols> operator-(
    +  const WGenericMatrix<T, Rows, Cols> &m)
    +{
    +  return -m.impl();
    +}
    +
    +}
    +#endif // WGENERICMATRIX_H_
    diff --git a/wt-3.1.7a/src/Wt/WGlobal b/wt-3.1.7a/src/Wt/WGlobal
    new file mode 100644
    index 0000000..468ffbc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGlobal
    @@ -0,0 +1,810 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WGLOBAL_H_
    +#define WGLOBAL_H_
    +
    +#include <Wt/WFlags>
    +
    +namespace Wt {
    +  class JSlot;
    +  class WAbstractArea;
    +  class WAbstractItemDelegate;
    +  class WAbstractItemModel;
    +  class WAbstractItemView;
    +  class WAbstractListModel;
    +  class WAbstractProxyModel;
    +  class WAbstractServer;
    +  class WAbstractTableModel;
    +  class WAbstractToggleButton;
    +  class WAggregateProxyModel;
    +  class WAnchor;
    +  class WApplication;
    +  class WBatchEditProxyModel;
    +  class WBorder;
    +  class WBorderLayout;
    +  class WBreak;
    +  class WBrush;
    +  class WButtonGroup;
    +  class WCalendar;
    +  class WCanvasPaintDevice;
    +  class WCheckBox;
    +  class WCircleArea;
    +  class WColor;
    +  class WCombinedLocalizedStrings;
    +  class WComboBox;
    +  class WCompositeWidget;
    +  class WContainerWidget;
    +  class WCssDecorationStyle;
    +  class WCssStyleSheet;
    +  class WDate;
    +  class WDatePicker;
    +  class WDateTime;
    +  class WDateValidator;
    +  class WDefaultLayout;
    +  class WDefaultLoadingIndicator;
    +  class WDialog;
    +  class WDoubleValidator;
    +  class WEnvironment;
    +  class WFileResource;
    +  class WFileUpload;
    +  class WFitLayout;
    +  class WFlashObject;
    +  class WFont;
    +  class WFormWidget;
    +  class WGoogleMap;
    +  class WGridLayout;
    +  class WGroupBox;
    +  class WHboxLayout;
    +  class WHTML5Audio;
    +  class WHTML5Media;
    +  class WHTML5Video;
    +  class WMouseEvent;
    +  class WIconPair;
    +  class WImage;
    +  class WInPlaceEdit;
    +  class WIntValidator;
    +  class WInteractWidget;
    +  class WItemDelegate;
    +  class WItemSelectionModel;
    +  class WKeyEvent;
    +  class WLabel;
    +  class WLayout;
    +  class WLayoutItem;
    +  class WLength;
    +  class WLengthValidator;
    +  class WLineEdit;
    +  class WLineF;
    +  class WLoadingIndicator;
    +  class WLocalizedStrings;
    +  class WLogger;
    +  class WMemoryResource;
    +  class WMenu;
    +  class WMenuItem;
    +  class WMessageBox;
    +  class WMessageResourceBundle;
    +  class WMessageResources;
    +  class WModelIndex;
    +  class WMouseEvent;
    +  class WObject;
    +  class WOverlayLoadingIndicator;
    +  class WPaintDevice;
    +  class WPaintedWidget;
    +  class WPainter;
    +  class WPainterPath;
    +  class WPanel;
    +  class WPdfImage;
    +  class WPen;
    +  class WPoint;
    +  class WPointF;
    +  class WPolygonArea;
    +  class WPopupMenu;
    +  class WPopupMenuItem;
    +  class WProgressBar;
    +  class WPushButton;
    +  class WRadioButton;
    +  class WRasterImage;
    +  class WRectArea;
    +  class WRectF;
    +  class WRegExp;
    +  class WRegExpValidator;
    +  class WResource;
    +  class WScrollArea;
    +  class WScrollBar;
    +  class WSelectionBox;
    +  class WServer;
    +  class WShadow;
    +  class WSlider;
    +  class WSocketNotifier;
    +  class WSortFilterProxyModel;
    +  class WSound;
    +  class WSpinBox;
    +  class WStackedWidget;
    +  class WStandardItem;
    +  class WStandardItemModel;
    +  class WString;
    +  class WStringListModel;
    +  class WSubMenuItem;
    +  class WSuggestionPopup;
    +  class WSvgImage;
    +  class WTabWidget;
    +  class WTable;
    +  class WTableCell;
    +  class WTableColumn;
    +  class WTableRow;
    +  class WTableView;
    +  class WTemplate;
    +  class WText;
    +  class WTextArea;
    +  class WTextEdit;
    +  class WTime;
    +  class WTimer;
    +  class WTransform;
    +  class WTree;
    +  class WTreeNode;
    +  class WTreeTable;
    +  class WTreeTableNode;
    +  class WTreeView;
    +  class WVBoxLayout;
    +  class WValidationStatus;
    +  class WValidator;
    +  class WViewWidget;
    +  class WVirtualImage;
    +  class WVmlImage;
    +  class WWebWidget;
    +  class WWidget;
    +  class WWidgetItem;
    +
    +/*! \brief Enumeration that indicates a direction.
    + */
    +enum Orientation { Horizontal = 0x1, //!< Horizontal
    +		   Vertical   = 0x2  //!< Vertical
    +};
    +W_DECLARE_OPERATORS_FOR_FLAGS(Orientation)
    +
    +/*! \brief Enumeration that indicates a standard button.
    + *
    + * Multiple buttons may be specified by logically or'ing these values
    + * together, e.g.
    + * \code
    + * Ok | Cancel
    + * \endcode
    + *
    + * \sa WMessageBox
    + */
    +enum StandardButton {
    +  NoButton = 0x00,  //!< No button
    +  Ok = 0x01,        //!< An OK button.
    +  Cancel = 0x02,    //!< A Cancel button.
    +  Yes = 0x04,       //!< A Yes button.
    +  No = 0x08,        //!< A No button.
    +  Abort = 0x10,     //!< An Abort button.
    +  Retry = 0x20,     //!< A Retry button.
    +  Ignore = 0x40,    //!< An Ignore button.
    +  YesAll = 0x80,    //!< A Yes-to-All button.
    +  NoAll = 0x100     //!< A No-to-All button.
    +};
    +W_DECLARE_OPERATORS_FOR_FLAGS(StandardButton)
    +
    +/*! \brief Enumeration that indiciates a standard icon.
    + *
    + * \note Not used yet.
    + */
    +enum Icon {
    +  NoIcon = 0,       //!< No icon
    +  Information = 1,  //!< An information icon <i>(not implemented)</i>
    +  Warning = 2,      //!< An warning icon <i>(not implemented)</i>
    +  Critical = 3,     //!< An critical icon <i>(not implemented)</i>
    +  Question = 4      //!< An question icon <i>(not implemented)</i>
    +};
    +
    +/*! \brief Enumeration that indicates how items may be selected.
    + *
    + * \sa WTreeView::setSelectionMode()
    + */
    +enum SelectionMode { NoSelection = 0,      //!< No selections
    +		     SingleSelection = 1,  //!< Single selection only
    +		     ExtendedSelection = 3 //!< Multiple selection
    +};
    +
    +/*! \brief Enumeration that indicates what is being selected.
    + *
    + * \sa WTreeView::setSelectionBehavior()
    + */
    +enum SelectionBehavior { SelectItems = 0,    //!< Select single items
    +			 SelectRows = 1      //!< Select only rows
    +			 /*, SelectColumns */
    +};
    +
    +/*! \brief Enumeration that indicates how to change a selection.
    + *
    + * \sa WTreeView::select()
    + */
    +enum SelectionFlag {
    +  Select = 1,          //!< Add to selection
    +  Deselect = 2,        //!< Remove from selection
    +  ToggleSelect = 3,    //!< Toggle in selection
    +  ClearAndSelect = 4   //!< Clear selection and add single item
    +};
    +
    +/*! \brief Enumeration that indicates a relative location.
    + *
    + * Values of CenterX, CenterY, and CenterXY are only valid for
    + * WCssDecorationStyle::setBackgroundImage()
    + *
    + * \sa WWidget::setMargin(const WLength& x, WFlags<Side> sides)
    + * \sa WWidget::setOffsets(const WLength& x, WFlags<Side> sides)
    + * \sa WWidget::setFloatSide(Side s)
    + * \sa WWidget::setClearSides(WFlags<Side> sides)
    + * \sa WContainerWidget::setPadding(const WLength& x, WFlags<Side> sides)
    + * \sa WCssDecorationStyle::setBackgroundImage()
    + */
    +enum Side {
    +  Top = 0x1,                          //!< Top side
    +  Bottom = 0x2,                       //!< Bottom side
    +  Left = 0x4,                         //!< Left side
    +  Right = 0x8,                        //!< Right side
    +  CenterX = 0x10,                     //!< Center horiziontally
    +  CenterY = 0x20                      //!< Center vertically
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(Side)
    +
    +/** \brief No side */
    +static const WFlags<Side> None = 0;
    +/** \brief (CenterX | CenterY) */
    +static const WFlags<Side> CenterXY = CenterX | CenterY;
    +/** \brief (Left | Right) */
    +static const WFlags<Side> Horizontals = Left | Right;
    +/** \brief (Top | Bottom) */
    +static const WFlags<Side> Verticals = Top | Bottom;
    +/** \brief All sides */
    +static const WFlags<Side> All = Top | Bottom | Left | Right;
    +
    +/*! \brief Enumeration that specifies a horizontal or a vertical alignment.
    + *
    + * The vertical alignment flags are AlignBaseline, AlignSub, AlignSuper,
    + * AlignTop, AlignTextTop, AlignMiddle, AlignBottom and AlignTextBottom.
    + * The horizontal alignment flags are AlignLeft, AlignRight, AlignCenter
    + * and AlignJustify. Functions expecting either horizontal or vertical
    + * alignment flags throw an exception when they are called with the wrong
    + * alignment flag.
    + *
    + * When used with setVerticalAlignment(), this applies only
    + * to inline widgets and determines how to position itself on the
    + * current line, with respect to sibling inline widgets.
    + *
    + * When used with WTableCell::setContentAlignment(), this determines the
    + * vertical alignment of contents within the table cell.
    + *
    + * When used with WPainter::drawText(), this determines the horizontal and
    + * vertical alignment of the text with respect to the bounding rectangle.
    + *
    + * When used with WContainerWidget::setContentAlignment(), this specifies how
    + * contents should be aligned horizontally within the container.
    + *
    + * Not all values are applicable in all situations. The most commonly
    + * used values are AlignLeft, AlignCenter, AlignRight, AlignBottom,
    + * AlignMiddle and AlignTop.
    + */
    +enum AlignmentFlag {
    +  /*! \brief Align to the left
    +   */
    +  AlignLeft=0x1,
    +  /*! \brief Align to the right
    +   */
    +  AlignRight=0x2,
    +  /*! \brief Align horizontally in the center
    +   */
    +  AlignCenter=0x4,
    +  /*! \brief Justify left and right
    +   */
    +  AlignJustify=0x8,
    +  /*! \brief Align at baseline (default alignment).
    +   */
    +  AlignBaseline=0x10,
    +  /*! \brief Align below the baseline (as if subscript).
    +   */
    +  AlignSub=0x20,
    +  /*! \brief Align above the baseline (as if superscript).
    +   */
    +  AlignSuper=0x40,
    +  /*! \brief Align top of widget with top of tallest sibling widget.
    +   */
    +  AlignTop=0x80,
    +  /*! \brief Align top of widget with the top of the parent widget's font.
    +   */
    +  AlignTextTop=0x100,
    +  /*! \brief Align vertically the middle to the middle of the parent widget.
    +   */
    +  AlignMiddle=0x200,
    +  /*! \brief Align bottom of widget to the bottom of the lowest sigling widget.
    +   */
    +  AlignBottom=0x400,
    +  /*! \brief Align bottom of widget to the bottom of parent widget's font.
    +   */
    +  AlignTextBottom=0x800,
    +  AlignLength=0x1000  // ?
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(AlignmentFlag)
    +
    +/*! \brief Combination of all horizontal alignment flags */
    +static const WFlags<AlignmentFlag> AlignHorizontalMask
    +  = AlignLeft | AlignRight | AlignCenter | AlignJustify;
    +
    +/*! \brief Combination of all vertical alignment flags */
    +static const WFlags<AlignmentFlag> AlignVerticalMask
    +  = AlignBaseline | AlignSub | AlignSuper | AlignTop | AlignTextTop
    +  | AlignMiddle | AlignBottom | AlignTextBottom | AlignLength;
    +
    +/*! \brief Enumeration that specifies a layout mechanism for a widget.
    + *
    + * The layout mechanism determines how the widget positions itself relative
    + * to the parent or sibling widgets.
    + *
    + * \sa WWidget::setPositionScheme(PositionScheme scheme)
    + */
    +enum PositionScheme {
    +  /*! \brief Static position scheme.
    +   *
    +   *  The widget is layed-out with other \link Wt::Static
    +   *  Static \endlink and \link Wt::Relative Relative \endlink
    +   *  sibling widgets, one after another.
    +   *
    +   *  Inline widgets are layed out in horizontal lines (like text),
    +   *  wrapping around at the end of the line to continue on the next
    +   *  line. Block widgets are stacked vertically.
    +   *
    +   *  Static widgets may also float to the left or right border,
    +   *  using setFloatSide().
    +   */
    +  Static,
    +
    +  /*! \brief Relative position scheme.
    +   *
    +   *  The widget is first layed out according to Static layout
    +   *  rules, but after layout, the widget may be offset relative to
    +   *  where it would be in a static layout, using setOffsets().
    +   *
    +   *  Another common use of a Relative position scheme (even with no
    +   *  specified offsets) is to provide a new reference coordinate
    +   *  system for Absolutely positioned widgets.
    +   */
    +  Relative,
    +
    +  /*! \brief Absolute position scheme.
    +   *
    +   *  The widget is positioned at an absolute position
    +   *  with respect to the nearest ancestor widget that is either:
    +   *  <ul>
    +   *    <li> a WTableCell </li>
    +   *    <li> or has a position scheme that is \link Wt::Relative
    +   *  Relative\endlink or \link Wt::Absolute Absolute\endlink. </li>
    +   *  </ul>
    +   */
    +  Absolute,
    +
    +  /*! \brief Fixed position scheme.
    +   *
    +   *  The widget is positioned at fixed position with respect to
    +   *  the browser's view-pane.
    +   */
    +  Fixed
    +};
    +
    +/*! \brief Enumeration for a cursor style
    + *
    + * \sa WCssDecorationStyle::setCursor(), WAbstractArea::setCursor()
    + */
    +enum Cursor {
    +  ArrowCursor,        //!< Arrow, CSS 'default' cursor
    +  AutoCursor,         //!< Cursor chosen by the browser, CSS 'auto' cursor.
    +  CrossCursor,        //!< Crosshair, CSS 'cross' cursor
    +  PointingHandCursor, //!< Pointing hand, CSS 'pointer' cursor
    +  OpenHandCursor,     //!< Open hand, CSS 'move' cursor
    +  WaitCursor,         //!< Wait, CSS 'wait' cursor
    +  IBeamCursor,        //!< Text edit, CSS 'text' cursor
    +  WhatsThisCursor     //!< Help, CSS 'help' cursor
    +};
    +
    +/*! \brief Enumeration that indicates a character encoding.
    + *
    + * Character encodings are used to represent characters in a stream of
    + * bytes.
    + *
    + * \relates WString
    + */
    +enum CharEncoding {
    +  /*! \brief The (server) system locale.
    +   *
    +   * Each byte represents a character, according to the locale
    +   * of the server-side system.
    +   */
    +  LocalEncoding,
    +
    +  /*! \brief UTF-8 unicode encoding.
    +   *
    +   * The byte stream represents unicode characters encoded using
    +   * UTF-8.
    +   */
    +  UTF8
    +};
    +
    +/*! \brief Enumeration that indicates a pen style.
    + *
    + * \ingroup painting
    + *
    + * \relates WPen
    + */
    +enum PenStyle {
    +  NoPen,          //!< Do not stroke
    +  SolidLine,      //!< Stroke with a solid line
    +  DashLine,       //!< Stroked with a dashed line
    +  DotLine,        //!< Stroke with a dotted line
    +  DashDotLine,    //!< Stroke with a dash dot line
    +  DashDotDotLine  //!< Stroke with a dash dot dot line
    +};
    +
    +/*! \brief Enumeration that indicates how line end points are rendered
    + *
    + * \ingroup painting
    + *
    + * \relates WPen
    + */
    +enum PenCapStyle {
    +  FlatCap,        //!< Flat ends
    +  SquareCap,      //!< Square ends (prolongs line with half width)
    +  RoundCap        //!< Round ends (terminates with a half circle)
    +};
    +
    +/*! \brief Enumeration that indicates how line joins are rendered.
    + *
    + * \ingroup painting
    + *
    + * \relates WPen
    + */
    +enum PenJoinStyle {
    +  MiterJoin,      //!< Pointy joins
    +  BevelJoin,      //!< Squared-off joins
    +  RoundJoin       //!< Rounded joins
    +};
    +
    +/*! \brief Enumeration that indicates a fill style.
    + *
    + * \ingroup painting
    + *
    + * \relates WBrush
    + */
    +enum WBrushStyle {
    +  NoBrush = 0,      //!< Do not fill
    +  SolidPattern = 1  //!< Fill with a solid color
    +};
    +
    +/*! \brief Enumeration that specifies where the target of an anchor should
    + *         be displayed.
    + *
    + * \sa WAnchor::setTarget()
    + */
    +enum AnchorTarget {
    +  TargetSelf,      //!< Show Instead of the application
    +  TargetThisWindow,//!< Show in the top level frame of the application window
    +  TargetNewWindow  //!< Show in a separate new tab or window
    +};
    +
    +/*! \brief Enumeration that indicates the text format.
    + *
    + * \sa WText::setTextFormat()
    + */
    +enum TextFormat {
    +  XHTMLText,       //!< Format text as XSS-safe XHTML markup'ed text
    +  XHTMLUnsafeText, //!< Format text as XHTML markup'ed text
    +  PlainText        //!< Format text as plain text
    +};
    +
    +/*! \brief Enumeration for predefined colors
    + *
    + * \ingroup style
    + */
    +enum GlobalColor {
    +  /*! \brief Color white.
    +   */
    +  white,
    +  /*! \brief Color black.
    +   */
    +  black,
    +  /*! \brief Color red.
    +   */
    +  red,
    +  /*! \brief Color dark red.
    +   */
    +  darkRed,
    +  /*! \brief Color green.
    +   */
    +  green,
    +  /*! \brief Color dark green.
    +   */
    +  darkGreen,
    +  /*! \brief Color blue.
    +   */
    +  blue,
    +  /*! \brief Color dark blue.
    +   */
    +  darkBlue,
    +  /*! \brief Color cyan.
    +   */
    +  cyan,
    +  /*! \brief Color dark cyan.
    +   */
    +  darkCyan,
    +  /*! \brief Color magenta.
    +   */
    +  magenta,
    +  /*! \brief Color dark magenta.
    +   */
    +  darkMagenta,
    +  /*! \brief Color yellow.
    +   */
    +  yellow,
    +  /*! \brief Color dark yellow.
    +   */
    +  darkYellow,
    +  /*! \brief Color medium gray.
    +   */
    +  gray,
    +  /*! \brief Color dark gray.
    +   */
    +  darkGray,
    +  /*! \brief Color light gray.
    +   */
    +  lightGray,
    +  /*! \brief Color transparent.
    +   */
    +  transparent
    +};
    +
    +/*! \brief Enumeration for keyboard modifiers
    + *
    + * \sa WMouseEvent::modifiers(), WKeyEvent::modifiers()
    + *
    + * \ingroup signalslot
    + */
    +enum KeyboardModifier {
    +  NoModifier = 0x0,       //!< No modifiers
    +  ShiftModifier = 0x1,    //!< Shift key pressed
    +  ControlModifier = 0x2,  //!< Control key pressed
    +  AltModifier = 0x4,      //!< Alt key pressed
    +  MetaModifier = 0x8      //!< Meta key pressed ("Windows" or "Command" (Mac) key)
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(KeyboardModifier)
    +
    +/*! \brief Enumeration for key codes
    + *
    + * These are key codes that identify a key on a keyboard. All keys
    + * listed here can be identified across all browsers and (Western)
    + * keyboards. A %Key is returned by WKeyEvent::key(). If you want to
    + * identify a character, you should use the WKeyEvent::charCode()
    + * method instead.
    + *
    + * \sa WInteractWidget::keyWentDown, WInteractWidget::keyWentUp
    + *
    + * \ingroup signalslot
    + */
    +enum Key {
    +  Key_unknown = 0,     //!< Unknown key.
    +  Key_Enter = 13,      //!< Enter key.
    +  Key_Tab = 9,         //!< Tab key.
    +  Key_Backspace = 8,   //!< Backspace key.
    +  Key_Shift = 16,      //!< Shift key.
    +  Key_Control = 17,    //!< Control key.
    +  Key_Alt = 18,        //!< Alt key.
    +  Key_PageUp = 33,     //!< Page up key.
    +  Key_PageDown = 34,   //!< Page down key.
    +  Key_End = 35,        //!< End key.
    +  Key_Home = 36,       //!< Home key.
    +  Key_Left = 37,       //!< Left arrow key.
    +  Key_Up = 38,         //!< Up arrow key.
    +  Key_Right = 39,      //!< Right arrow key.
    +  Key_Down = 40,       //!< Down arrow key.
    +  Key_Insert = 45,     //!< Insert key.
    +  Key_Delete = 46,     //!< Delete key.
    +  Key_Escape = 27,     //!< Escape key.
    +  Key_F1 = 112,        //!< F1 function key.
    +  Key_F2 = 113,        //!< F2 function key.
    +  Key_F3 = 114,        //!< F3 function key.
    +  Key_F4 = 115,        //!< F4 function key.
    +  Key_F5 = 116,        //!< F5 function key.
    +  Key_F6 = 117,        //!< F6 function key.
    +  Key_F7 = 118,        //!< F7 function key.
    +  Key_F8 = 119,        //!< F8 function key.
    +  Key_F9 = 120,        //!< F9 function key.
    +  Key_F10 = 121,       //!< F10 function key.
    +  Key_F11 = 122,       //!< F11 function key.
    +  Key_F12 = 123,       //!< F12 function key.
    +  Key_Space = ' ',     //!< Space
    +  Key_A = 'A',         //!< 'A' key
    +  Key_B = 'B',         //!< 'B' key
    +  Key_C = 'C',         //!< 'C' key
    +  Key_D = 'D',         //!< 'D' key
    +  Key_E = 'E',         //!< 'E' key
    +  Key_F = 'F',         //!< 'F' key
    +  Key_G = 'G',         //!< 'G' key
    +  Key_H = 'H',         //!< 'H' key
    +  Key_I = 'I',         //!< 'I' key
    +  Key_J = 'J',         //!< 'J' key
    +  Key_K = 'K',         //!< 'K' key
    +  Key_L = 'L',         //!< 'L' key
    +  Key_M = 'M',         //!< 'M' key
    +  Key_N = 'N',         //!< 'N' key
    +  Key_O = 'O',         //!< 'O' key
    +  Key_P = 'P',         //!< 'P' key
    +  Key_Q = 'Q',         //!< 'Q' key
    +  Key_R = 'R',         //!< 'R' key
    +  Key_S = 'S',         //!< 'S' key
    +  Key_T = 'T',         //!< 'T' key
    +  Key_U = 'U',         //!< 'U' key
    +  Key_V = 'V',         //!< 'V' key
    +  Key_W = 'W',         //!< 'W' key
    +  Key_X = 'X',         //!< 'X' key
    +  Key_Y = 'Y',         //!< 'Y' key
    +  Key_Z = 'Z'          //!< 'Z' key
    +};
    +
    +/*! \brief Enumeration for the check state of a check box.
    + *
    + * \sa WCheckBox
    + */
    +enum CheckState {
    +  Unchecked,        //!< Unchecked
    +  PartiallyChecked, //!< Partially checked (for a tri-state checkbox)
    +  Checked           //!< Checked
    +};
    +
    +/*! \brief Enumeration that indicates how to change a selection.
    + *
    + * \sa WPaintedWidget::update(), WPaintDevice::paintFlags()
    + */
    +enum PaintFlag {
    +  PaintUpdate = 0x1 //!< The canvas is not cleared, but further painted on.
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(PaintFlag);
    +
    +#ifndef WT_TARGET_JAVA
    +
    +/*! \brief Enumeration that indicates a regular expression option.
    + *
    + * \sa WSortFilterProxyModel::setFilterOptions(), WRegExpValidator::setOptions()
    + */
    +enum RegExpFlag {
    +  MatchCaseInsensitive = 0x1 //!< Case insensitive matching
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(RegExpFlag);
    +
    +#else // WT_TARGET_JAVA
    +
    +enum RegExpFlag { };
    +const int MatchCaseInsensitive = 0x1;
    +
    +#endif // WT_TARGET_JAVA
    +
    +/*! \brief Enumeration that indicates a %Wt entrypoint type.
    + *
    + * An entry point binds a behavior to a public URL. Only the wthttpd
    + * connector currently supports multiple entry points.
    + */
    +enum EntryPointType {
    +  /*! \brief Specifies a full-screen application.
    +   *
    +   * A full screen application manages the entire browser window and
    +   * provides its own HTML page.
    +   *
    +   * \sa WServer::addEntryPoint(), WApplication::root()
    +   */
    +  Application,
    +
    +  /*! \brief Specifies an application that manages one or more widgets.
    +   *
    +   * A widget set application is part of an existing HTML page. One or
    +   * more HTML elements in that web page may be bound to widgets
    +   * managed by the application.
    +   *
    +   * The application presents itself as a JavaScript file, and
    +   * therefore should be embedded in the web page using a
    +   * &lt;script&gt; tag, from within the &lt;body&gt; (since it needs
    +   * access to the &lt;body&gt;).
    +   *
    +   * \note A WidgetSet application requires JavaScript support
    +   *
    +   * \sa WServer::addEntryPoint(), WApplication::bindWidget()
    +   */
    +  WidgetSet,
    +
    +  /*! \brief Specifies a static resource.
    +   *
    +   * A static resource binds a WResource to a public URL, and is not bound
    +   * to a specific session.
    +   *
    +   * \sa WServer::addResource()
    +   */
    +  StaticResource
    +};
    +
    +enum RenderFlag {
    +  RenderFull    = 0x1,
    +  RenderUpdate  = 0x2
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(RenderFlag)
    +
    +/*! \brief Flags that specify how to match two values.
    + *
    + * Except when MatchExactly, the lexical matching is done (by comparing
    + * string representations of the value with the query). This is by default
    + * case insensitive, unless MatchCaseSensitive is OR'ed.
    + *
    + * \ingroup modelview
    + */
    +enum MatchFlag {
    +  MatchExactly = 0x0,       //!< Same type and value
    +  MatchStringExactly = 0x1, //!< Lexical match
    +  MatchStartsWith = 0x2,    //!< Match start with query
    +  MatchEndsWith = 0x3,      //!< Match end with query
    +  MatchRegExp = 0x4,        //!< Regular expression match
    +  MatchWildCard = 0x5,      //!< Wildcard match
    +  MatchCaseSensitive = 0x10,//!< Case sensitive
    +  MatchWrap = 0x20          //!< Wrap around whole model
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(MatchFlag)
    +
    +/*! \brief Type part of MatchFlags */
    +static const WFlags<MatchFlag> MatchTypeMask = 
    +  MatchExactly | MatchStringExactly | MatchStartsWith | MatchEndsWith |
    +  MatchRegExp | MatchWildCard;
    +
    +/*! \brief Flags that indicate table header options
    + *
    + * \sa WAbstractItemModel::headerFlags()
    + *
    + * \ingroup modelview
    + */
    +enum HeaderFlag {
    +  /*! \brief Flag that indicates that the column can be expanded.
    +   *
    +   * \sa WAbstractItemModel::expandColumn()
    +   */
    +  ColumnIsCollapsed = 0x1,
    +
    +  /*! \brief Flag that indicates that the column was expanded to the left.
    +   *
    +   * \sa WAbstractItemModel::collapseColumn()
    +   */
    +  ColumnIsExpandedLeft = 0x2,
    +
    +  /*! \brief Flag that indicates that the column was expanded to the right.
    +   *
    +   * \sa WAbstractItemModel::collapseColumn()
    +   */
    +  ColumnIsExpandedRight = 0x4
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(HeaderFlag)
    +
    +/*! \brief Enumeration that indicates a meta header type.
    + *
    + * \sa WApplication::addMetaHeader()
    + */
    +enum MetaHeaderType {
    +  MetaName,       //!< A normal meta header defining a document property
    +  MetaHttpHeader  //!< A http-equiv meta header defining a HTTP header
    +};
    +
    +}
    +
    +#endif // WGLOBALS_H_
    diff --git a/wt-3.1.7a/src/Wt/WGoogleMap b/wt-3.1.7a/src/Wt/WGoogleMap
    new file mode 100644
    index 0000000..10d400b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGoogleMap
    @@ -0,0 +1,275 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + *
    + * Contributed by: Richard Ulrich.
    + */
    +#ifndef WGOOGLEMAP_H_
    +#define WGOOGLEMAP_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WJavaScript>
    +#include <Wt/WSignal>
    +
    +#include <vector>
    +#include <string>
    +
    +namespace Wt
    +{
    +
    +  class WColor;
    +
    +/*! \class WGoogleMap Wt/WGoogleMap Wt/WGoogleMap
    + *  \brief A widget that displays a google map.
    + *
    + * This widget uses the online Google Maps server to display a map. It
    + * exposes a part of the google maps API.
    + *
    + * To use the map on a public server you will need to obtain a
    + * key. The widget will look for this key as the configuration
    + * property <tt>"google_api_key"</tt>. If this configuration property
    + * has not been set, it will use a key that is suitable for localhost.
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * Contributed by: Richard Ulrich.
    + */
    +class WT_API WGoogleMap : public WCompositeWidget
    +{
    +public:
    +  /*! \brief MapTypeControl
    +   */
    +  enum MapTypeControl {
    +    NoControl,          //!< Show no maptype control
    +    DefaultControl,     //!< Show the default maptype control
    +    MenuControl,        //!< Show the menu maptype control
    +    HierarchicalControl //!< Show the hierarchical maptype control
    +  };
    +
    +  /*! \class Coordinate
    +   *  \brief A geographical coordinate (latitude/longitude)
    +   */
    +  class WT_API Coordinate
    +  {
    +  public:
    +    /*! \brief Default constructor
    +     */
    +    Coordinate();
    +
    +    /*! \brief Creates with given latitude and longitude.
    +     */
    +    Coordinate(double latitude, double longitude);
    +
    +    #ifndef WT_TARGET_JAVA
    +    explicit Coordinate(const std::pair<double, double>& lat_long);
    +    #endif
    +
    +    /*! \brief Sets the latitude.
    +     */
    +    void setLatitude(double latitude);
    +
    +    /*! \brief Sets the longitude.
    +     */
    +    void setLongitude(double longitude);
    +
    +    /*! \brief Returns the latitude.
    +     */
    +    double latitude() const { return lat_; }
    +
    +    /*! \brief Returns the longitude.
    +     */
    +    double longitude() const { return lon_; }
    +
    +    /*! \brief Calculates the distance between two points in km (approximate).
    +     *
    +     * The calculation uses a sphere. Results can be out by 0.3%.
    +     */
    +    double distanceTo(const Coordinate &rhs) const;
    +
    +    #ifndef WT_TARGET_JAVA
    +    /*! \brief Conversion operator to pair of double.
    +     */
    +    std::pair<double, double> operator ()() const;
    +    #endif
    +
    +  private:
    +    double lat_, lon_;
    +  };
    +
    +  /*! \brief Creates a map widget with optional parent.
    +   */
    +  WGoogleMap(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WGoogleMap();
    +
    +  /*! \brief Adds a marker overlay to the map.
    +   */
    +  void addMarker(const Coordinate &pos);
    +
    +  /*! \brief Adds a polyline overlay to the map.
    +   *
    +   *  specify a value between 0.0 and 1.0 for the opacity.
    +   */
    +  void addPolyline(const std::vector<Coordinate>& points,
    +		   const WColor& color = red, int width = 2,
    +		   double opacity = 1.0);
    +
    +  /*! \brief Removes all overlays from the map.
    +   */
    +  void clearOverlays();
    +
    +  /*! \brief Opens a text bubble with html text at a specific location.
    +   */
    +  void openInfoWindow(const Coordinate&pos, const Wt::WString& myHtml);
    +
    +  /*! \brief Sets the map view to the given center.
    +   */
    +  void setCenter(const Coordinate& center);
    +
    +  /*! \brief Sets the map view to the given center and zoom level.
    +   */
    +  void setCenter(const Coordinate& center, int zoom);
    +
    +  /*! \brief Changes the center point of the map to the given point.
    +   *
    +   * If the point is already visible in the current map view, change
    +   * the center in a smooth animation.
    +   */
    +  void panTo(const Coordinate& center);
    +
    +  #ifndef WT_TARGET_JAVA
    +  /*! \brief Zooms the map to a region defined by a bounding box.
    +   */
    +  void zoomWindow(const std::pair<Coordinate, Coordinate>& bbox);
    +  #endif
    +
    +  /*! \brief Zooms the map to a region defined by a bounding box.
    +   */
    +  void zoomWindow(const Coordinate& topLeft, const Coordinate& bottomRight);
    +
    +  /*! \brief Sets the zoom level to the given new value.
    +   */
    +  void setZoom(int level);
    +
    +  /*! \brief Increments zoom level by one.
    +   */
    +  void zoomIn();
    +
    +  /*! \brief Decrements zoom level by one.
    +   */
    +  void zoomOut();
    +
    +  /*! \brief Stores the current map position and zoom level.
    +   *
    +   * You can later restore this position using
    +   * returnToSavedPosition().
    +   */
    +  void savePosition();
    +
    +  /*! \brief Restores the map view that was saved by savePosition().
    +   */
    +  void returnToSavedPosition();
    +
    +  /*! \brief Notifies the map of a change of the size of its container.
    +   *
    +   * Call this method after the size of the container DOM object has changed,
    +   * so that the map can adjust itself to fit the new size.
    +   */
    +  void checkResize();
    +
    +  /*! \brief Enables the dragging of the map (enabled by default).
    +   */
    +  void enableDragging();
    +
    +  /*! \brief Disables the dragging of the map.
    +   */
    +  void disableDragging();
    +
    +  /*! \brief Enables double click to zoom in and out (enabled by default).
    +   */
    +  void enableDoubleClickZoom();
    +
    +  /*! \brief Disables double click to zoom in and out.
    +   */
    +  void disableDoubleClickZoom();
    +
    +  /*! \brief Enables the GoogleBar, an integrated search control, on the map.
    +   *
    +   * When enabled, this control takes the place of the default Powered
    +   * By Google logo.
    +   *
    +   * This control is initially disabled.
    +   */
    +  void enableGoogleBar();
    +
    +  /*! \brief Disables the GoogleBar integrated search control.
    +   *
    +   * When disabled, the default Powered by Google logo occupies the
    +   * position formerly containing this control. Note that this control
    +   * is already disabled by default.
    +   */
    +  void disableGoogleBar();
    +
    +  /*! \brief Enables zooming using a mouse's scroll wheel.
    +   *
    +   * Scroll wheel zoom is disabled by default.
    +   */
    +  void enableScrollWheelZoom();
    +
    +  /*! \brief Disables zooming using a mouse's scroll wheel.
    +   *
    +   * Scroll wheel zoom is disabled by default.
    +   */
    +  void disableScrollWheelZoom();
    +
    +  /*! \brief Sets the map type control.
    +   *
    +   * The control allows selecting and switching between supported map types
    +   * via buttons.
    +   */
    +  void setMapTypeControl(MapTypeControl type);
    +
    +  /*! \brief The click event.
    +   *
    +   * This event is fired when the user clicks on the map with the mouse.
    +   */
    +  JSignal<Coordinate>& clicked() { return clicked_; }
    +
    +  /*! \brief The double click event.
    +   *
    +   * This event is fired when a double click is done on the map.
    +   */
    +  JSignal<Coordinate>& doubleClicked() { return doubleClicked_; }
    +
    +  /*! \brief This event is fired when the user moves the mouse inside the map.
    +   */
    +  JSignal<Coordinate>& mouseMoved() { return mouseMoved_; }
    +
    +private:
    +  JSignal<Coordinate> clicked_;
    +  JSignal<Coordinate> doubleClicked_;
    +  JSignal<Coordinate> mouseMoved_;
    +
    +protected:
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +private:
    +  std::vector<std::string> additions_;
    +
    +  virtual void doGmJavaScript(const std::string& jscode, bool sepScope);
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +extern WT_API std::istream& operator>> (std::istream& i,
    +				        WGoogleMap::Coordinate& coordinate);
    +#endif
    +
    +} //  namespace Wt
    +
    +#endif // WGOOGLEMAP_H_INCLUDED
    diff --git a/wt-3.1.7a/src/Wt/WGoogleMap.C b/wt-3.1.7a/src/Wt/WGoogleMap.C
    new file mode 100644
    index 0000000..9a95a6c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGoogleMap.C
    @@ -0,0 +1,401 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + *
    + * Contributed by: Richard Ulrich.
    + */
    +
    +#include <Wt/WGoogleMap>
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +
    +#include <boost/bind.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +#include <string>
    +#include <sstream>
    +#include <utility>
    +#include <iostream>
    +#include <cmath>
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
    +namespace {
    +  // if there is no google api key configured, use the one for
    +  // http://localhost:8080/
    +  static const std::string localhost_key
    +    = "ABQIAAAAWqrN5o4-ISwj0Up_depYvhTwM0brOpm-"
    +      "All5BF6PoaKBxRWWERS-S9gPtCri-B6BZeXV8KpT4F80DQ";
    +}
    +
    +namespace Wt {
    +
    +WGoogleMap::Coordinate::Coordinate()
    +  : lat_(0), lon_(0)
    +{ }
    +
    +WGoogleMap::Coordinate::Coordinate(double lat, double lon)
    +{
    +  setLatitude(lat);
    +  setLongitude(lon);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WGoogleMap::Coordinate::Coordinate(const std::pair<double, double>& lat_long)
    +{
    +  setLatitude(lat_long.first);
    +  setLongitude(lat_long.second);
    +}
    +#endif 
    +
    +void WGoogleMap::Coordinate::setLatitude(double latitude)
    +{
    +  if (latitude < -90.0 || latitude > 90.0)
    +    throw std::out_of_range("invalid latitude: "
    +			    + boost::lexical_cast<std::string>(latitude));
    +
    +  lat_ = latitude;
    +}
    +
    +void WGoogleMap::Coordinate::setLongitude(double longitude)
    +{
    +  if (longitude < -180.0 || longitude > 180.0)
    +    throw std::out_of_range("invalid longitude: "
    +			    + boost::lexical_cast<std::string>(longitude));
    +
    +  lon_ = longitude;
    +}
    +
    +double WGoogleMap::Coordinate::distanceTo(const Coordinate &rhs) const
    +{
    +  const double lat1 = lat_ * M_PI / 180.0;
    +  const double lat2 = rhs.latitude() * M_PI / 180.0;
    +  const double deltaLong = (rhs.longitude() - lon_) * M_PI / 180.0;
    +  const double angle = std::sin(lat1) * std::sin(lat2)
    +    + std::cos(lat1) * std::cos(lat2) * std::cos(deltaLong);
    +  const double earthRadius = 6371.0; // km
    +  const double dist = earthRadius * std::acos(angle);
    +
    +  return dist;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +std::pair<double, double> WGoogleMap::Coordinate::operator ()() const
    +{
    +  return std::make_pair(lat_, lon_);
    +}
    +
    +std::istream& operator>> (std::istream& i, WGoogleMap::Coordinate& c)
    +{
    +  double lat, lon;
    +  i >> lat >> std::ws >> lon;
    +  c.setLatitude(lat);
    +  c.setLongitude(lon);
    +
    +  return i;
    +}
    +#endif
    +
    +// example javascript code from :
    +// http://code.google.com/apis/maps/documentation/
    +
    +WGoogleMap::WGoogleMap(WContainerWidget *parent)
    + : clicked_(this, "click"),
    +   doubleClicked_(this, "dblclick"),
    +   mouseMoved_(this, "mousemove")
    +{
    +  setImplementation(new WContainerWidget());
    +
    +  WApplication *app = WApplication::instance();
    +
    +  std::string googlekey = localhost_key;
    +  Wt::WApplication::readConfigurationProperty("google_api_key", googlekey);
    +
    +  // init the google javascript api
    +  const std::string gmuri = "http://www.google.com/jsapi?key=" + googlekey;
    +  app->require(gmuri, "google");
    +
    +  if (parent)
    +    parent->addWidget(this);
    +}
    +
    +WGoogleMap::~WGoogleMap()
    +{ }
    +
    +void WGoogleMap::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull) {
    +    // initialize the map
    +    std::stringstream strm;
    +    strm <<
    +      "{ function initialize() {"
    +      """var self = " << jsRef() << ";"
    +      """var map = new google.maps.Map2(self);"
    +      """map.setCenter(new google.maps.LatLng(47.01887777, 8.651888), 13);"
    +      """self.map = map;"
    +
    +      // eventhandling
    +      """google.maps.Event.addListener(map, \"click\", "
    +      ""                              "function(overlay, latlng) {"
    +      ""  "if (latlng) {"
    +      ""  << clicked_.createCall("latlng.lat() +' '+ latlng.lng()") << ";"
    +      ""  "}"
    +      """});"
    +
    +      """google.maps.Event.addListener(map, \"dblclick\", "
    +      ""                              "function(overlay, latlng) {"
    +      ""  "if (latlng) {"
    +      ""  << doubleClicked_.createCall("latlng.lat() +' '+ latlng.lng()") << ";"
    +      ""  "}"
    +      """});"
    +
    +      """google.maps.Event.addListener(map, \"mousemove\", "
    +      ""                              "function(latlng) {"
    +      ""  "if (latlng) {"
    +      ""  << mouseMoved_.createCall("latlng.lat() +' '+ latlng.lng()") << ";"
    +      ""  "}"
    +      """});";
    +
    +    // additional things
    +    for (unsigned int i = 0; i < additions_.size(); i++)
    +      strm << additions_[i];
    +
    +    strm <<
    +      "}" // function initialize()
    +      "google.load(\"maps\", \"2\", "
    +      ""          "{other_params:\"sensor=false\", callback: initialize});"
    +      "}"; // private scope
    +
    +    additions_.clear();
    +
    +    WApplication::instance()->doJavaScript(strm.str());
    +  }
    +
    +  WCompositeWidget::render(flags);
    +}
    +
    +void WGoogleMap::clearOverlays()
    +{
    +  doGmJavaScript(jsRef() + ".map.clearOverlays();", false);
    +}
    +
    +void WGoogleMap::doGmJavaScript(const std::string& jscode, bool sepScope)
    +{
    +  std::string js = jscode;
    +  // to keep the variables inside a scope where they don't interfere
    +  if (sepScope)
    +    js = "{" + js + "}";
    +
    +  if (isRendered())
    +    WApplication::instance()->doJavaScript(js);
    +  else
    +    additions_.push_back(js);
    +}
    +
    +void WGoogleMap::addMarker(const Coordinate& pos)
    +{
    +  std::stringstream strm;
    +  strm << "var marker = new google.maps.Marker(new google.maps.LatLng("
    +       << pos.latitude() << ", " << pos.longitude() << "));"
    +       << jsRef() << ".map.addOverlay(marker);";
    +
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +void WGoogleMap::addPolyline(const std::vector<Coordinate>& points,
    +			     const WColor& color, int width, double opacity)
    +{
    +  // opacity has to be between 0.0 and 1.0
    +  opacity = std::max(std::min(opacity, 1.0), 0.0);
    +
    +  std::stringstream strm;
    +  strm << "var waypoints = [];";
    +  for (size_t i = 0; i < points.size(); ++i)
    +    strm << "waypoints[" << i << "] = new google.maps.LatLng("
    +	 << points[i].latitude() << ", " << points[i].longitude() << ");";
    +
    +  strm << "var poly = new google.maps.Polyline(waypoints, \""
    +       << color.cssText() << "\", " << width << ", " << opacity << ");"
    +       << jsRef() << ".map.addOverlay(poly);";
    +
    +  doGmJavaScript(strm.str(), true);
    +}
    +
    +void WGoogleMap::openInfoWindow(const Coordinate& pos,
    +				const WString& myHtml)
    +{
    +  std::stringstream strm;
    +  strm << jsRef() << ".map.openInfoWindow(new google.maps.LatLng("
    +       << pos.latitude() << ", " << pos.longitude() << "), "
    +       << WWebWidget::jsStringLiteral(myHtml) << ");";
    +
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +void WGoogleMap::setCenter(const Coordinate& center)
    +{
    +  std::stringstream strm;
    +  strm << jsRef() << ".map.setCenter(new google.maps.LatLng("
    +       << center.latitude() << ", " << center.longitude() << "));";
    +
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +void WGoogleMap::setCenter(const Coordinate& center, int zoom)
    +{
    +  std::stringstream strm;
    +  strm << jsRef() << ".map.setCenter(new google.maps.LatLng("
    +       << center.latitude() << ", " << center.longitude() << "), "
    +       << zoom << ");";
    +
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +void WGoogleMap::panTo(const Coordinate& center)
    +{
    +  std::stringstream strm;
    +  strm << jsRef() << ".map.panTo(new google.maps.LatLng("
    +       << center.latitude() << ", " << center.longitude() << "));";
    +
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +void WGoogleMap::setZoom(int level)
    +{
    +  doGmJavaScript(jsRef() + ".map.setZoom("
    +		 + boost::lexical_cast<std::string>(level) + ");", false);
    +}
    +
    +void WGoogleMap::zoomIn()
    +{
    +  doGmJavaScript(jsRef() + ".map.zoomIn();", false);
    +}
    +
    +void WGoogleMap::zoomOut()
    +{
    +  doGmJavaScript(jsRef() + ".map.zoomOut();", false);
    +}
    +
    +void WGoogleMap::savePosition()
    +{
    +  doGmJavaScript(jsRef() + ".map.savePosition();", false);
    +}
    +
    +void WGoogleMap::returnToSavedPosition()
    +{
    +  doGmJavaScript(jsRef() + ".map.returnToSavedPosition();", false);
    +}
    +
    +void WGoogleMap::checkResize()
    +{
    +  doGmJavaScript(jsRef() + ".map.checkResize();", false);
    +}
    +
    +void WGoogleMap::enableDragging()
    +{
    +  doGmJavaScript(jsRef() + ".map.enableDragging();", false);
    +}
    +
    +void WGoogleMap::disableDragging()
    +{
    +  doGmJavaScript(jsRef() + ".map.disableDragging();", false);
    +}
    +
    +void WGoogleMap::enableDoubleClickZoom()
    +{
    +  doGmJavaScript(jsRef() + ".map.enableDoubleClickZoom();", false);
    +}
    +
    +void WGoogleMap::disableDoubleClickZoom()
    +{
    +  doGmJavaScript(jsRef() + ".map.disableDoubleClickZoom();", false);
    +}
    +
    +void WGoogleMap::enableGoogleBar()
    +{
    +  doGmJavaScript(jsRef() + ".map.enableGoogleBar();", false);
    +}
    +
    +void WGoogleMap::disableGoogleBar()
    +{
    +  doGmJavaScript(jsRef() + ".map.disableGoogleBar();", false);
    +}
    +
    +void WGoogleMap::enableScrollWheelZoom()
    +{
    +  doGmJavaScript(jsRef() + ".map.enableScrollWheelZoom();", false);
    +}
    +
    +void WGoogleMap::disableScrollWheelZoom()
    +{
    +  doGmJavaScript(jsRef() + ".map.disableScrollWheelZoom();", false);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WGoogleMap::zoomWindow(const std::pair<Coordinate, Coordinate>& bbox)
    +{
    +  zoomWindow(bbox.first, bbox.second);
    +}
    +#endif
    +
    +void WGoogleMap::zoomWindow(const Coordinate& topLeft, 
    +			    const Coordinate& rightBottom)
    +{
    +  Coordinate topLeftC = topLeft;
    +  Coordinate rightBottomC = rightBottom;
    +
    +  const Coordinate center
    +    ((topLeftC.latitude() + rightBottomC.latitude()) / 2.0,
    +     (topLeftC.longitude() + rightBottomC.longitude()) / 2.0);
    +
    +  topLeftC = 
    +    Coordinate(std::min(topLeftC.latitude(), rightBottomC.latitude()),
    +	       std::min(topLeftC.longitude(), rightBottomC.longitude()));
    +  rightBottomC = 
    +    Coordinate(std::max(topLeftC.latitude(), rightBottomC.latitude()),
    +	       std::max(topLeftC.longitude(), rightBottomC.longitude()));
    +  std::stringstream strm;
    +  strm << "var bbox = new google.maps.LatLngBounds(new google.maps.LatLng("
    +       << topLeftC.latitude()  << ", " << topLeftC.longitude() << "), "
    +       << "new google.maps.LatLng("
    +       << rightBottomC.latitude() << ", " << rightBottomC.longitude() << "));"
    +       << "var zooml = " << jsRef() << ".map.getBoundsZoomLevel(bbox);"
    +       << jsRef() << ".map.setCenter(new google.maps.LatLng("
    +       << center.latitude() << ", " << center.longitude() << "), zooml);";
    +
    +  doGmJavaScript(strm.str(), true);
    +}
    +
    +void WGoogleMap::setMapTypeControl(MapTypeControl type)
    +{
    +  std::string control;
    +  switch (type) {
    +  case DefaultControl:
    +    control = "google.maps.MapTypeControl";
    +    break;
    +  case MenuControl:
    +    control = "google.maps.MenuMapTypeControl";
    +    break;
    +  case HierarchicalControl:
    +    control = "google.maps.HierarchicalMapTypeControl";
    +    break;
    +  default:
    +    control = "";
    +  }
    +
    +  std::stringstream strm;
    +  strm << jsRef() << ".map.removeControl(" << jsRef() << ".mtc);";
    +       
    +  if(control != "")
    +    strm << "var mtc = new " << control << "();"
    +	 << jsRef() << ".mtc = mtc;"
    +	 << jsRef() << ".map.addControl(mtc);";
    +  
    +  doGmJavaScript(strm.str(), false);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WGridLayout b/wt-3.1.7a/src/Wt/WGridLayout
    new file mode 100644
    index 0000000..b456c26
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGridLayout
    @@ -0,0 +1,418 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WGRID_LAYOUT_H_
    +#define WGRID_LAYOUT_H_
    +
    +#include <vector>
    +#include <Wt/WLayout>
    +#include <Wt/WLength>
    +#include <Wt/WGlobal>
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +
    +struct Grid {
    +  int horizontalSpacing_, verticalSpacing_;
    +
    +  struct Row {
    +    int stretch_;
    +    bool resizable_;
    +
    +    Row(int stretch = 0);
    +  };
    +
    +  struct Column {
    +    int stretch_;
    +    bool resizable_;
    +
    +    Column(int stretch = 0);
    +  };
    +
    +  struct Item {
    +    WLayoutItem *item_;
    +    int rowSpan_;
    +    int colSpan_;
    +    WFlags<AlignmentFlag> alignment_;
    +
    +    Item(WLayoutItem *item = 0, WFlags<AlignmentFlag> alignment = 0);
    +  };
    +
    +  std::vector<Row>    rows_;
    +  std::vector<Column> columns_;
    +  std::vector<std::vector<Item> > items_; // [row][column]
    +
    +  Grid();
    +  ~Grid();
    +};
    +
    +  }
    +
    +/*! \class WGridLayout Wt/WGridLayout Wt/WGridLayout
    + *  \brief A layout manager which arranges widgets in a grid
    + *
    + * This is a layout class that arranges widgets in a grid, to span the
    + * entire area of the parent container. Each grid location (row,
    + * column) may contain one widget or nested layout. Horizontal and
    + * vertical space are divided so that each column/row is given its
    + * minimum size and the remaining space is dived according to stretch
    + * factors among the columns/rows. The minimum width of a column/row
    + * is based on the minimum dimensions of contained widgets or nested
    + * layouts. The default minimum height and width may be overridden
    + * using WWidget::setMinimumSize().
    + *
    + * If you want to use the layout manager for a container which does
    + * not have a height that is constrained somehow, you need to specify
    + * AlignTop in the alignment flags of
    + * WContainerWidget::setLayout(). Otherwise the behavior is undefined
    + * (the parent container will continue to increase in size as it tries
    + * to satisfy the constraints assuming a contrained height).
    + *
    + * You can use \link WContainerWidget::setOverflow()
    + * WContainerWidget::setOverflow(OverflowAuto) \endlink or use a
    + * WScrollArea to automatically show scrollbars on a widget inserted
    + * in the layout.
    + *
    + * A caveat with layout managers is that you cannot reliably use a
    + * stylesheet to add borders (or margin) to a widget inserted in a
    + * layout: this is broken on Internet Explorer. To provide the layout,
    + * the layout manager needs to set sizes on the contained widget but
    + * these sizes also need to take into account the border/margin
    + * width. Since on IE, this value will be 0 if the border or margin is
    + * provided by a stylesheet (as opposed to by inline CSS by using
    + * WWidget::decorationStyle()), the result will be wrong behaviour
    + * like widgets that keep growing in size.
    + *
    + * A layout manager may provide resize handles between columns or rows
    + * which allow the user to change the automatic layout provided by the
    + * layout manager (see setRowResizable() and
    + * setColumnResizable()). Resize handles between rows only work when
    + * the layout fills the parent vertical space (i.e. is not aligned to
    + * the top). Likewise, resize handles between columns only work when
    + * the layout fills the parent horiziontal space (i.e. is not aligned
    + * left, right or centered).
    + *
    + * Columns and rows are separated using a constant spacing, which
    + * defaults to 6 pixels by default, and can be changed using
    + * setHorizontalSpacing() and setVerticalSpacing(). In addition, when
    + * this layout is a top-level layout (i.e. is not nested inside
    + * another layout), a margin is set around the contents, which thus
    + * replaces padding defined for the container. It is not allowed to
    + * define padding for the container widget using its CSS 'padding'
    + * property or the WContainerWidget::setPadding(). This margin also
    + * defaults to 9 pixels, and can be changed using
    + * setContentsMargins().
    + *
    + * For each column or row, a stretch factor may be defined, which
    + * controls how remaining horizontal or vertical space is used. Each
    + * column and row is stretched using the stretch factor to fill the
    + * remaining space. When the stretch factor is 0, the height of the row
    + * and its contents is not actively managed. As a consequence, the contents
    + * of each cell will not fill the cell. You may use a special stretch factor
    + * of -1 to indicate that the height of the row should not stretch but the
    + * contents height should be actively managed. This has as draw-back that
    + * the height of the row will no longer reduce in size when any of the cell
    + * contents reduces in size.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
    + * w->resize(WLength::Auto, 600);
    + *
    + * Wt::WGridLayout *layout = new Wt::WGridLayout();
    + * layout->addWidget(new Wt::WText("Item 0 0"), 0, 0);
    + * layout->addWidget(new Wt::WText("Item 0 1"), 0, 1);
    + * layout->addWidget(new Wt::WText("Item 1 0"), 1, 0);
    + * layout->addWidget(new Wt::WText("Item 1 1"), 1, 1);
    + *
    + * w->setLayout(layout);
    + * \endcode
    + * \elseif java
    + * \code
    + * WContainerWidget w = new WContainerWidget(this);
    + * w.resize(WLength.Auto, new WLength(600));
    + *		 
    + * WGridLayout layout = new WGridLayout();
    + * layout.addWidget(new WText("Item 0 0"), 0, 0);
    + * layout.addWidget(new WText("Item 0 1"), 0, 1);
    + * layout.addWidget(new WText("Item 1 0"), 1, 0);
    + * layout.addWidget(new WText("Item 1 1"), 1, 1);
    + *		 
    + * w.setLayout(layout);
    + * \endcode
    + * \endif
    + *
    + * \if cpp
    + * \note This layout manager is applicable only to WContainerWidget
    + * container widgets. You may use it within an Ext::Container
    + * indirectly by first setting a WContainerWidget using a WFitLayout.
    + * \endif
    + *
    + * \note When JavaScript support is not available, only Safari and
    + * Firefox properly implement this layout. For other browsers, only
    + * the horizontal layout is properly implemented, while vertically all
    + * widgets use their minimum size.
    + *
    + * \note When set on a WContainerWidget, this layout manager accepts the
    + *       following hints (see setLayoutHint()):
    + *   <ul>
    + *     <li>"table-layout" with possible values "auto" (default) or "fixed".<br>
    + *       Use "fixed" to prevent nested tables from overflowing the layout.
    + *       In that case, you will need to specify a width (in CSS or otherwise)
    + *       for at least one item in every column that has no stretch factor.</li>
    + *  </ul>
    + */
    +class WT_API WGridLayout : public WLayout
    +{
    +public:
    +  /*! \brief Create a new grid layout.
    +   *
    +   * The grid will grow dynamically as items are added.
    +   *
    +   * Use \p parent = \c 0 to create a layout manager that can be
    +   * nested inside other layout managers or to specify a specific alignment
    +   * when setting the layout to a WContainerWidget.
    +   */
    +  WGridLayout(WWidget *parent = 0);
    +
    +  virtual void addItem(WLayoutItem *item);
    +  virtual void removeItem(WLayoutItem *item);
    +  virtual WLayoutItem *itemAt(int index) const;
    +  virtual int count() const;
    +
    +  /*! \brief Adds a layout item to the grid.
    +   *
    +   * Adds the <i>item</i> at (<i>row</i>, \p column). If an item
    +   * was already added to that location, it is replaced (but not
    +   * deleted).
    +   *
    +   * An item may span several more rows or columns, which is
    +   * controlled by <i>rowSpan</i> and \p columnSpan.
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire grid cell. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addLayout(), addWidget() 
    +   */
    +  void addItem(WLayoutItem *item, int row, int column,
    +	       int rowSpan = 1, int columnSpan = 1,
    +	       WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds a nested layout item to the grid.
    +   *
    +   * Adds the <i>layout</i> at (<i>row</i>, \p column). If an item
    +   * was already added to that location, it is replaced (but not
    +   * deleted).
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire grid cell. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addLayout(WLayout *, int, int, int, int, WFlags<AlignmentFlag>) 
    +   */
    +  void addLayout(WLayout *layout, int row, int column,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds a nested layout item to the grid.
    +   *
    +   * Adds the <i>layout</i> at (<i>row</i>, \p column). If an item
    +   * was already added to that location, it is replaced (but not
    +   * deleted).
    +   *
    +   * An item may span several more rows or columns, which is
    +   * controlled by <i>rowSpan</i> and \p columnSpan.
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire grid cell. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addLayout(WLayout *, int, int, WFlags<AlignmentFlag>) 
    +   */
    +  void addLayout(WLayout *layout, int row, int column,
    +		 int rowSpan, int columnSpan,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds a widget to the grid.
    +   *
    +   * Adds the <i>widget</i> at (<i>row</i>, \p column). If an item
    +   * was already added to that location, it is replaced (but not
    +   * deleted).
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire grid cell. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addWidget(WWidget *, int, int, int, int, WFlags<AlignmentFlag>) 
    +   */
    +  void addWidget(WWidget *widget, int row, int column,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Adds a widget to the grid.
    +   *
    +   * Adds the <i>widget</i> at (<i>row</i>, \p column). If an item
    +   * was already added to that location, it is replaced (but not
    +   * deleted).
    +   *
    +   * The widget may span several more rows or columns, which is
    +   * controlled by <i>rowSpan</i> and \p columnSpan.
    +   *
    +   * The \p alignment specifies the vertical and horizontal
    +   * alignment of the item. The default value 0 indicates that the
    +   * item is stretched to fill the entire grid cell. The alignment can
    +   * be specified as a logical combination of a horizontal alignment
    +   * (Wt::AlignLeft, Wt::AlignCenter, or Wt::AlignRight) and a
    +   * vertical alignment (Wt::AlignTop, Wt::AlignMiddle, or
    +   * Wt::AlignBottom).
    +   *
    +   * \sa addWidget(WWidget *, int, int, WFlags<AlignmentFlag>)
    +   */
    +  void addWidget(WWidget *widget, int row, int column,
    +		 int rowSpan, int columnSpan,
    +		 WFlags<AlignmentFlag> alignment = 0);
    +
    +  /*! \brief Sets the horizontal spacing.
    +   *
    +   * The default horizontal spacing is 9 pixels.
    +   *
    +   * \sa setVerticalSpacing(int) 
    +   */
    +  void setHorizontalSpacing(int size);
    +
    +  /*! \brief Returns the horizontal spacing.
    +   *
    +   * \sa setHorizontalSpacing(int) 
    +   */
    +  int horizontalSpacing() const { return grid_.horizontalSpacing_; }
    +
    +  /*! \brief Sets the vertical spacing.
    +   *
    +   * The default vertical spacing is 9 pixels.
    +   *
    +   * \sa setHorizontalSpacing(int) 
    +   */
    +  void setVerticalSpacing(int size);
    +
    +  /*! \brief Returns the vertical spacing.
    +   *
    +   * \sa setVerticalSpacing(int) 
    +   */
    +  int verticalSpacing() const { return grid_.verticalSpacing_; }
    +
    +  /*! \brief Returns the column count.
    +   *
    +   * The grid dimensions change dynamically when adding contents to
    +   * the grid.
    +   *
    +   * \sa rowCount()
    +   */
    +  int columnCount() const;
    +
    +  /*! \brief Returns the row count.
    +   *
    +   * The grid dimensions change dynamically when adding contents to
    +   * the grid.
    +   *
    +   * \sa columnCount()
    +   */
    +  int rowCount() const;
    +
    +  /*! \brief Sets the column stretch.
    +   *
    +   * Sets the <i>stretch</i> factor for column \p column.
    +   *
    +   * \sa columnStretch()
    +   */
    +  void setColumnStretch(int column, int stretch);
    +
    +  /*! \brief Returns the column stretch.
    +   *
    +   * \sa setColumnStretch(int, int)
    +   */
    +  int columnStretch(int column) const;
    +
    +  /*! \brief Sets the row stretch.
    +   *
    +   * Sets the <i>stretch</i> factor for row \p row. See the
    +   * description for the special value of -1.
    +   *
    +   * \sa rowStretch()
    +   */
    +  void setRowStretch(int row, int stretch);
    +
    +  /*! \brief Returns the column stretch.
    +   *
    +   * \sa setRowStretch(int, int)
    +   */
    +  int rowStretch(int row) const;
    +
    +  /*! \brief Sets whether the user may drag a particular column border.
    +   *
    +   * This method sets whether the border that separates column
    +   * <i>column</i> from the next column may be resized by the user,
    +   * depending on the value of <i>enabled</i>.
    +   *
    +   * The default value is <i>false</i>.
    +   */
    +  void setColumnResizable(int column, bool enabled = true);
    +
    +  /*! \brief Returns whether the user may drag a particular column border.
    +   *
    +   * This method returns whether the border that separates column
    +   * <i>column</i> from the next column may be resized by the user.
    +   *
    +   * \sa setColumnResizable()
    +   */
    +  bool columnIsResizable(int column) const;
    +
    +  /*! \brief Sets whether the user may drag a particular row border.
    +   *
    +   * This method sets whether the border that separates row <i>row</i> from
    +   * the next row may be resized by the user, depending on the value of
    +   * <i>enabled</i>.
    +   *
    +   * The default value is <i>false</i>.
    +   */
    +  void setRowResizable(int row, bool enabled = true);
    +
    +  /*! \brief Returns whether the user may drag a particular row border.
    +   *
    +   * This method returns whether the border that separates row
    +   * <i>row</i> from the next row may be resized by the user.
    +   *
    +   * \sa setRowResizable()
    +   */
    +  bool rowIsResizable(int row) const;
    +
    +  Impl::Grid& grid() { return grid_; }
    +
    +private:
    +  Impl::Grid grid_;
    +
    +  void expand(int row, int column, int rowSpan, int columnSpan);
    +};
    +
    +}
    +
    +#endif // WGRID_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WGridLayout.C b/wt-3.1.7a/src/Wt/WGridLayout.C
    new file mode 100644
    index 0000000..c857d7c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGridLayout.C
    @@ -0,0 +1,248 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WContainerWidget"
    +#include "Wt/WGridLayout"
    +#include "Wt/WWidgetItem"
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +
    +Grid::Row::Row(int stretch)
    +  : stretch_(stretch),
    +    resizable_(false)
    +{ }
    +
    +Grid::Column::Column(int stretch)
    +  : stretch_(stretch),
    +    resizable_(false)
    +{ }
    +
    +Grid::Item::Item(WLayoutItem *item, WFlags<AlignmentFlag> alignment)
    +  : item_(item),
    +    rowSpan_(1),
    +    colSpan_(1),
    +    alignment_(alignment)
    +{ }
    +
    +Grid::Grid()
    +  : horizontalSpacing_(6),
    +    verticalSpacing_(6)
    +{ }
    +
    +Grid::~Grid()
    +{
    +  for (unsigned i = 0; i < items_.size(); ++i)
    +    for (unsigned j = 0; j < items_[i].size(); ++j) {
    +      WLayoutItem *item = items_[i][j].item_;
    +      items_[i][j].item_ = 0;;
    +      delete item;
    +    }
    +}
    +
    +  }
    +
    +WGridLayout::WGridLayout(WWidget *parent)
    +  : WLayout()
    +{
    +  if (parent)
    +    setLayoutInParent(parent);
    +}
    +
    +void WGridLayout::addItem(WLayoutItem *item)
    +{
    +  addItem(item, 0, columnCount());
    +}
    +
    +void WGridLayout::removeItem(WLayoutItem *item)
    +{
    +  int index = indexOf(item);
    +
    +  if (index != -1) {
    +    int row = index / columnCount();
    +    int col = index % columnCount();
    +
    +    grid_.items_[row][col].item_ = 0;
    +
    +    updateRemoveItem(item);
    +  }
    +}
    +
    +WLayoutItem *WGridLayout::itemAt(int index) const
    +{
    +  int row = index / columnCount();
    +  int col = index % columnCount();
    +
    +  return grid_.items_[row][col].item_;
    +}
    +
    +int WGridLayout::count() const
    +{
    +  return grid_.rows_.size() * grid_.columns_.size();
    +}
    +
    +void WGridLayout::addItem(WLayoutItem *item, int row, int column,
    +			  int rowSpan, int columnSpan,
    +			  WFlags<AlignmentFlag> alignment)
    +{
    +  columnSpan = std::max(1, columnSpan);
    +  rowSpan = std::max(1, rowSpan);
    +
    +  expand(row, column, rowSpan, columnSpan);
    +
    +  Impl::Grid::Item& gridItem = grid_.items_[row][column];
    +
    +  if (gridItem.item_) {
    +    WLayoutItem *oldItem = gridItem.item_;
    +    gridItem.item_ = 0;
    +    updateRemoveItem(oldItem);
    +  }
    +
    +  gridItem.item_ = item;
    +  gridItem.rowSpan_ = rowSpan;
    +  gridItem.colSpan_ = columnSpan;
    +  gridItem.alignment_ = alignment;
    +
    +  updateAddItem(item);
    +}
    +
    +void WGridLayout::addLayout(WLayout *layout, int row, int column,
    +			    WFlags<AlignmentFlag> alignment)
    +{
    +  addItem(layout, row, column, 1, 1, alignment);
    +}
    +
    +void WGridLayout::addLayout(WLayout *layout, int row, int column,
    +			    int rowSpan, int columnSpan,
    +			    WFlags<AlignmentFlag> alignment)
    +{
    +  addItem(layout, row, column, rowSpan, columnSpan, alignment);
    +}
    +
    +void WGridLayout::addWidget(WWidget *widget, int row, int column,
    +			    WFlags<AlignmentFlag> alignment)
    +{
    +  addItem(new WWidgetItem(widget), row, column, 1, 1, alignment);
    +}
    +
    +void WGridLayout::addWidget(WWidget *widget, int row, int column,
    +			    int rowSpan, int columnSpan,
    +			    WFlags<AlignmentFlag> alignment)
    +{
    +  addItem(new WWidgetItem(widget), row, column, rowSpan, columnSpan, alignment);
    +}
    +
    +void WGridLayout::setHorizontalSpacing(int size)
    +{
    +  grid_.horizontalSpacing_ = size;
    +
    +  update();
    +}
    +
    +void WGridLayout::setVerticalSpacing(int size)
    +{
    +  grid_.verticalSpacing_ = size;
    +
    +  update();
    +}
    +
    +int WGridLayout::columnCount() const
    +{
    +  return grid_.columns_.size();
    +}
    +
    +int WGridLayout::rowCount() const
    +{
    +  return grid_.rows_.size();
    +}
    +
    +void WGridLayout::setColumnStretch(int column, int stretch)
    +{
    +  expand(0, column, 0, 1);
    +  grid_.columns_[column].stretch_ = stretch;
    +
    +  update();
    +}
    +
    +int WGridLayout::columnStretch(int column) const
    +{
    +  return grid_.columns_[column].stretch_;
    +}
    +
    +void WGridLayout::setRowStretch(int row, int stretch)
    +{
    +  expand(row, 0, 1, 0);
    +  grid_.rows_[row].stretch_ = stretch;
    +
    +  update();
    +}
    +
    +int WGridLayout::rowStretch(int row) const
    +{
    +  return grid_.rows_[row].stretch_;
    +}
    +
    +void WGridLayout::setRowResizable(int row, bool enabled)
    +{
    +  expand(row, 0, 1, 0);
    +  grid_.rows_[row].resizable_ = enabled;
    +
    +  update();
    +}
    +
    +bool WGridLayout::rowIsResizable(int row) const
    +{
    +  return grid_.rows_[row].resizable_;
    +}
    +
    +void WGridLayout::setColumnResizable(int column, bool enabled)
    +{
    +  expand(0, column, 0, 1);
    +  grid_.columns_[column].resizable_ = enabled;
    +
    +  update();
    +}
    +
    +bool WGridLayout::columnIsResizable(int column) const
    +{
    +  return grid_.columns_[column].resizable_;
    +}
    +
    +void WGridLayout::expand(int row, int column, int rowSpan, int columnSpan)
    +{
    +  int newRowCount = std::max(rowCount(), row + rowSpan);
    +  int newColumnCount = std::max(columnCount(), column + columnSpan);
    +
    +  int extraRows = newRowCount - rowCount();
    +  int extraColumns = newColumnCount - columnCount();
    +
    +  if (extraColumns > 0) {
    +    for (int a_row = 0; a_row < rowCount(); ++a_row)
    +      grid_.items_[a_row].insert(grid_.items_[a_row].end(), extraColumns,
    +				 Impl::Grid::Item());
    +    grid_.columns_.insert(grid_.columns_.end(), extraColumns,
    +			  Impl::Grid::Column());
    +  }
    +
    +  if (extraRows > 0) {
    +#ifndef WT_TARGET_JAVA
    +    grid_.items_.insert(grid_.items_.end(), extraRows,
    +			std::vector<Impl::Grid::Item>(newColumnCount));
    +#else
    +    grid_.items_.insert(grid_.items_.end(), extraRows,
    +			std::vector<Impl::Grid::Item>());
    +    for (int i = 0; i < extraRows; ++i) {
    +      std::vector<Impl::Grid::Item>& items
    +	= grid_.items_[grid_.items_.size() - extraRows + i];
    +      items.insert(items.end(), newColumnCount, Impl::Grid::Item());
    +    }
    +#endif // WT_TARGET_JAVA
    +    grid_.rows_.insert(grid_.rows_.end(), extraRows, Impl::Grid::Row());
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WGroupBox b/wt-3.1.7a/src/Wt/WGroupBox
    new file mode 100644
    index 0000000..a49a322
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGroupBox
    @@ -0,0 +1,122 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WGROUP_BOX_H_
    +#define WGROUP_BOX_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +
    +/*! \class WGroupBox Wt/WGroupBox Wt/WGroupBox
    + *  \brief A widget which group widgets into a frame with a title.
    + *
    + * This is typically used in a form to group certain form elements
    + * together.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
    + *
    + * // use a group box as widget container for 3 radio buttons, with a title
    + * Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
    + *
    + * // use a button group to logically group the 3 options
    + * Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
    + *
    + * Wt::WRadioButton *button;
    + * button = new Wt::WRadioButton("I voted Republican", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Republican);
    +
    + * button = new Wt::WRadioButton("I voted Democrat", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Democrate);
    +
    + * button = new Wt::WRadioButton("I didn't vote", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, NoVote);
    + *
    + * group->setCheckedButton(group->button(NoVote));
    + * \endcode
    + * \elseif java
    + * \code
    + * enum Vote { Republican , Democrate , NoVote };
    + * 
    + * // use a group box as widget container for 3 radio buttons, with a title
    + * WGroupBox container = new WGroupBox("USA elections vote");
    + * 		 
    + * // use a button group to logically group the 3 options
    + * WButtonGroup group = new WButtonGroup(this);
    + *		 
    + * WRadioButton button;
    + * button = new WRadioButton("I voted Republican", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.Republican.ordinal());
    + *
    + * button = new WRadioButton("I voted Democrat", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.Democrate.ordinal());
    + *
    + * button = new WRadioButton("I didn't vote", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.NoVote.ordinal());
    + *		 
    + * group.setCheckedButton(group.button(Vote.NoVote.ordinal()));
    + * \endcode
    + * \endif
    + *
    + * Like WContainerWidget, %WGroupBox is by default displayed as a
    + * \link WWidget::setInline() block\endlink.
    + *
    + * \image html WGroupBox-1.png "WGroupBox example"
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;fieldset&gt;</tt> tag,
    + * and the title in a nested <tt>&lt;legend&gt;</tt> tag. This widget
    + * does not provide styling, and can be styled using inline or
    + * external CSS as appropriate.
    + */
    +class WT_API WGroupBox : public WContainerWidget
    +{
    +public:
    +  /*! \brief Creates a groupbox with empty title.
    +   */
    +  WGroupBox(WContainerWidget *parent = 0);
    +  
    +  /*! \brief Creates a groupbox with given title message.
    +   */
    +  WGroupBox(const WString& title, WContainerWidget *parent = 0);
    +
    +  /*! \brief Returns the title.
    +   */
    +  const WString& title() const { return title_; }
    +
    +  /*! \brief Returns the title.
    +   */
    +  void setTitle(const WString& title);
    +
    +  virtual void refresh();
    +
    +private:
    +  WString title_;
    +
    +  bool titleChanged_;
    +
    +protected:
    +  virtual DomElementType domElementType() const;
    +
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateSetEnabled(bool enabled);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual int firstChildIndex() const;
    +};
    +
    +}
    +
    +#endif // WGROUP_BOX_H_
    diff --git a/wt-3.1.7a/src/Wt/WGroupBox.C b/wt-3.1.7a/src/Wt/WGroupBox.C
    new file mode 100644
    index 0000000..34e515c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WGroupBox.C
    @@ -0,0 +1,87 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WGroupBox"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WGroupBox::WGroupBox(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    titleChanged_(false)
    +{ }
    +
    +WGroupBox::WGroupBox(const WString& title, WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    title_(title),
    +    titleChanged_(false)
    +{ }
    +
    +void WGroupBox::setTitle(const WString& title)
    +{
    +  title_ = title;
    +  titleChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WGroupBox::updateDom(DomElement& element, bool all)
    +{
    +  if (all || titleChanged_) {
    +    DomElement *legend;
    +    if (all) {
    +      legend = DomElement::createNew(DomElement_LEGEND);
    +      legend->setId(id() + "l");
    +    } else
    +      legend = DomElement::getForUpdate(id() + "l", DomElement_LEGEND);
    +
    +    legend->setProperty(Wt::PropertyInnerHTML, escapeText(title_).toUTF8());
    +    element.addChild(legend);
    +
    +    titleChanged_ = false;
    +  }
    +
    +  WContainerWidget::updateDom(element, all);
    +}
    +
    +void WGroupBox::propagateSetEnabled(bool enabled)
    +{
    +  if (enabled)
    +    removeStyleClass("Wt-disabled");
    +  else
    +    addStyleClass("Wt-disabled");
    +
    +  WInteractWidget::propagateSetEnabled(enabled);
    +}
    +
    +void WGroupBox::propagateRenderOk(bool deep)
    +{
    +  titleChanged_ = false;
    +
    +  WContainerWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WGroupBox::domElementType() const
    +{
    +  return DomElement_FIELDSET;
    +}
    +
    +void WGroupBox::refresh()
    +{
    +  if (title_.refresh()) {
    +    titleChanged_ = true;
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  WContainerWidget::refresh();
    +}
    +
    +int WGroupBox::firstChildIndex() const
    +{
    +  return 1; // Legend is before
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WHBoxLayout b/wt-3.1.7a/src/Wt/WHBoxLayout
    new file mode 100644
    index 0000000..3845230
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHBoxLayout
    @@ -0,0 +1,68 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WHBOX_LAYOUT_H_
    +#define WHBOX_LAYOUT_H_
    +
    +#include <Wt/WBoxLayout>
    +
    +namespace Wt {
    +
    +/*! \class WHBoxLayout Wt/WHBoxLayout Wt/WHBoxLayout
    + *  \brief A layout manager which arranges widgets horizontally
    + *
    + * This convenience class creates a horizontal box layout, laying contained
    + * widgets out from left to right.
    + *
    + * See the WBoxLayout documentation for available member methods and
    + * more information.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
    + *
    + * Wt::WHBoxLayout *layout = new Wt::WHBoxLayout();
    + * layout->addWidget(new Wt::WText("One"));
    + * layout->addWidget(new Wt::WText("Two"));
    + * layout->addWidget(new Wt::WText("Three"));
    + * layout->addWidget(new Wt::WText("Four"));
    + *
    + * w->setLayout(layout, AlignTop | AlignJustify);
    + * \endcode
    + * \elseif java
    + * \code
    + * WContainerWidget w = new WContainerWidget(this);
    + *		
    + * WHBoxLayout layout = new WHBoxLayout();
    + * layout.addWidget(new WText("One"));
    + * layout.addWidget(new WText("Two"));
    + * layout.addWidget(new WText("Three"));
    + * layout.addWidget(new WText("Four"));
    + *	 
    + * w.setLayout(layout, AlignmentFlag.AlignTop, AlignmentFlag.AlignJustify);
    + * \endcode
    + * \endif
    + *
    + * \note First consider if you can achieve your layout using CSS !
    + *
    + * \sa WVBoxLayout
    + */
    +class WT_API WHBoxLayout : public WBoxLayout
    +{
    +public:
    +  /*! \brief Creates a new horizontal box layout.
    +   *
    +   * Use \p parent = \c 0 to create a layout manager that can be
    +   * nested inside other layout managers, or to specify a specific alignment
    +   * when setting the layout to a WContainerWidget.
    +   */
    +  WHBoxLayout(WWidget *parent = 0);
    +};
    +
    +}
    +
    +#endif // WHBOX_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WHBoxLayout.C b/wt-3.1.7a/src/Wt/WHBoxLayout.C
    new file mode 100644
    index 0000000..5c18f08
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHBoxLayout.C
    @@ -0,0 +1,15 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WHBoxLayout"
    +
    +namespace Wt {
    +
    +WHBoxLayout::WHBoxLayout(WWidget *parent)
    +  : WBoxLayout(LeftToRight, parent)
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Audio b/wt-3.1.7a/src/Wt/WHTML5Audio
    new file mode 100644
    index 0000000..2761852
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Audio
    @@ -0,0 +1,92 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WHTML5AUDIO_H_
    +#define WHTML5AUDIO_H_
    +
    +#include <Wt/WHTML5Media>
    +
    +namespace Wt {
    +
    +/*! \class WHTML5Audio Wt/WHTML5Audio Wt/WHTML5Audio
    + *  \brief A widget that plays audio using the HTML5 audio element.
    + *
    + * This class plays HTML5 audio. In a typical usage scenario,
    + * you instantiate the class, set options, and add one or multiple
    + * audio sources. The browser will play the first audio stream that
    + * it is capable to play back.
    + *
    + * Since not every browser supports HTML5 audio,
    + * the class provides a mechanism to display alternative content
    + * in browsers that cannot play the audio. A Flash based player,
    + * configured to play the same audio file, is an example of
    + * sensible alternative content.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * WHTML5Audio *a = new WHTML5Audio(parent);
    + * v->setOptions(WHTML5Media::Autoplay | WHTML5Media::Controls);
    + * // Addsources may be called multiple times for different formats:
    + * // Firefox only plays ogg
    + * a->addSource("the_wt_song.ogg");
    + * // many others play mp3
    + * a->addSource("the_wt_song.mp3", "audio/mp3");
    + * // You may display a simple text to explain that you need html5 support...
    + * // a->setAlternativeContent(new WText("You have no HTML5 Audio!"));
    + * // ... or provide an alternative player, e.g. Flash-based
    + * WFlashObject *f = new WFlashObject("player.swf");
    + * f->setFlashVariable("src", "the_wt_song.mp3");
    + * v->setAlternativeContent(f);
    + * \endcode
    + * \endif
    + *
    + * There are two reasons why the a browser may use the alternative
    + * content: either because the browser does not support the HTML5
    + * audio tag (alternative content is displayed even when JavaScript
    + * is not available), or because none of the specified sources contain
    + * an audio format that is understood by the browser (requires
    + * JavaScript to display the alternative content).
    + *
    + * addSource() and setAlternativeContent() must not be called after
    + * the WHTML5Audio was rendered. This can easily be avoided by calling
    + * these functions right after construction.
    + *
    + * This is a technology-specific class. To let %Wt choose a technology
    + * (and fallback technologies) to display your videos, use the WSound class.
    + *
    + * \sa WHTML5Media, WSound
    + */
    +class WT_API WHTML5Audio : public WHTML5Media
    +{
    +public:
    +  /*! \brief Creates a HTML5 audio widget.
    +   *
    +   * A freshly constructed HTML5Audio widget has no media sources,
    +   * no options, and has preload mode set to PreloadAuto.
    +   */
    +  WHTML5Audio(WContainerWidget *parent = 0);
    +
    +  /*! \brief Returns the JavaScript reference to the audio object, or null.
    +   *
    +   * It is possible, for browser compatibility reasons, that jsRef() is
    +   * not the HTML5 audio element. jsAudioRef() is guaranteed to be an
    +   * expression that evaluates to the media object. This expression may
    +   * yield null, if the video object is not rendered at all (e.g. on
    +   * older versions of Internet Explorer).
    +   */
    +  std::string jsAudioRef() const;
    +
    +protected:
    +  virtual DomElement *createMediaDomElement();
    +  DomElementType domElementType() const;
    +
    +};
    +
    +}
    +
    +#endif // WHTML5AUDIO_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Audio.C b/wt-3.1.7a/src/Wt/WHTML5Audio.C
    new file mode 100644
    index 0000000..02b589d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Audio.C
    @@ -0,0 +1,30 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WHTML5Audio"
    +#include "DomElement.h"
    +
    +using namespace Wt;
    +
    +WHTML5Audio::WHTML5Audio(WContainerWidget *parent):
    +  WHTML5Media(parent)
    +{
    +}
    +
    +DomElement *WHTML5Audio::createMediaDomElement()
    +{
    +  return DomElement::createNew(DomElement_AUDIO);
    +}
    +
    +std::string WHTML5Audio::jsAudioRef() const
    +{
    +  return jsMediaRef();
    +}
    +
    +DomElementType WHTML5Audio::domElementType() const
    +{
    +  return DomElement_AUDIO;
    +}
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Media b/wt-3.1.7a/src/Wt/WHTML5Media
    new file mode 100644
    index 0000000..055a1b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Media
    @@ -0,0 +1,242 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WHTML5MEDIA_H_
    +#define WHTML5MEDIA_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WFlags>
    +
    +namespace Wt {
    +
    +/*! \class WHTML5Media Wt/WHTML5Media Wt/WHTML5Media
    + *  \brief Abstract baseclass for HTML5 media elements.
    + *
    + * This class is an abstract base class for HTML5 media elements
    + * (audio, video).
    + */
    +class WT_API WHTML5Media : public WInteractWidget
    +{
    +public:
    +  /*! \brief Enumeration for playback options
    +   */
    +  enum Options {
    +    Autoplay = 1, //!< Start playing as soon as the video is loaded
    +    Loop     = 2, //!< Enable loop mode
    +    Controls = 4  //!< Show video controls in the browser
    +  };
    +
    +  /*! \brief Enumeration for preload strategy
    +   */
    +  enum PreloadMode {
    +    PreloadNone,    //!< Hints that the user will probably not play the video
    +    PreloadAuto,    //!< Hints that it is ok to download the entire resource
    +    PreloadMetadata //!< Hints that retrieving metadata is a good option
    +  };
    +
    +  /*! \brief Consctructor for a HTML5 media widget.
    +   *
    +   * A freshly constructed HTML5Video widget has no options set, no
    +   * media sources, and has preload mode set to PreloadAuto.
    +   */
    +  WHTML5Media(WContainerWidget *parent = 0);
    +
    +  ~WHTML5Media();
    +
    +  /*! \brief Set the media element options
    +   *
    +   * \sa Options
    +   */
    +  void setOptions(const WFlags<Options> &flags);
    +
    +  /*! \brief Retrieve the configured options
    +   */
    +  WFlags<Options> getOptions() const;
    +
    +  /*! \brief Set the preload mode
    +   */
    +  void setPreloadMode(PreloadMode mode);
    +
    +  /*! \brief Retrieve the preload mode
    +   */
    +  PreloadMode preloadMode() const;
    +
    +  /*! \brief Removes all source elements
    +   *
    +   * This method can be used to remove all media sources. Afterward, you
    +   * may add new media sources with calls to addSource().
    +   *
    +   * Use this to reuse a WHTML5Media instantiation to play something else.
    +   */
    +  void clearSources();
    +
    +  /*! \brief Add a media source
    +   *
    +   * This method specifies a media source. You may add as many media
    +   * sources as you want. The browser will select the appropriate
    +   * media stream to display to the user.
    +   *
    +   * This method specifies a media source using the URL, the mime type,
    +   * and the media attribute. HTML allows for empty type and media
    +   * attributes.
    +   */
    +  void addSource(const std::string &url, const std::string &type = "",
    +    const std::string &media = "");
    +
    +  /*! \brief Add a media source
    +   *
    +   * This method specifies a media source. You may add as many media
    +   * sources as you want. The browser will select the appropriate
    +   * media stream to display to the user.
    +   *
    +   * This method specifies a media source using the URL, the mime type,
    +   * and the media attribute. HTML allows for empty type and media
    +   * attributes.
    +   */
    +  void addSource(WResource *resource, const std::string &type = "",
    +    const std::string &media = "");
    +
    +  /*! \brief Content to be shown when media cannot be played
    +   *
    +   * As the HTML5 media tags are not supported by all browsers, it is a good
    +   * idea to provide fallback options when the media cannot be displayed.
    +   * If the media can be played by the browser, the alternative content
    +   * will be suppressed.
    +   *
    +   * The two reasons to display the alternative content are (1) the
    +   * media tag is not supported, or (2) the media tag is supported, but
    +   * none of the media sources are supported by the browser. In the first
    +   * case, fall-back is automatic and does not rely on JavaScript in the
    +   * browser; in the latter case, JavaScript is required to make the
    +   * fallback work.
    +   *
    +   * The alternative content can be any widget: you can set it to an
    +   * alternative media player (QuickTime, Flash, ...), show a
    +   * Flash movie, an animated gif, a text, a poster image, ...
    +   */
    +  void setAlternativeContent(WWidget *alternative);
    +
    +  /*! \brief Invoke play() on the media element
    +   *
    +   * JavaScript must be available for this function to work.
    +   */
    +  void play();
    +
    +  /*! \brief Invoke pause() on the media element
    +   *
    +   * JavaScript must be available for this function to work.
    +   */
    +  void pause();
    +
    +  /*! \brief Returns whether the media is playing.
    +   */
    +  bool playing() const { return playing_; }
    +
    +  /*! \brief Event signal emitted when playback has begun.
    +   *
    +   * This event fires when play was invoked, or when the media element
    +   * starts playing because the Autoplay option was provided.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<>& playbackStarted();
    +
    +  /*! \brief Event signal emitted when the playback has paused.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<>& playbackPaused();
    +
    +  /*! \brief Event signal emitted when the playback stopped because
    +   *         the end of the media was reached.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<>& ended();
    +
    +  /*! \brief Event signal emitted when the current playback position has
    +   *         changed.
    +   *
    +   * This event is fired when the playback position has changed,
    +   * both when the media is in a normal playing mode, but also when it has
    +   * changed discontinuously because of another reason.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<>& timeUpdated();
    +
    +  /*! \brief Event signal emitted when the playback volume has changed.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<>& volumeChanged();
    +
    +  /*! \brief Returns the JavaScript reference to the media object, or null.
    +   *
    +   * It is possible, for browser compatibility reasons, that jsRef() is
    +   * not the HTML5 media element. jsMediaRef() is guaranteed to be an
    +   * expression that evaluates to the media object. This expression may
    +   * yield null, if the video object is not rendered at all (e.g. on
    +   * older versions of Internet Explorer).
    +   */
    +  std::string jsMediaRef() const;
    +
    +protected:
    +  void getDomChanges(std::vector<DomElement *>& result,
    +                     WApplication *app);
    +  DomElement *createDomElement(WApplication *app);
    +
    +  virtual void updateMediaDom(DomElement& element, bool all);
    +  virtual DomElement *createMediaDomElement() = 0;
    +
    +  virtual void setFormData(const FormData& formData);
    +
    +private:
    +  struct Source 
    +#ifdef WT_TARGET_JAVA
    +    : public WObject
    +#endif
    +  {
    +    Source(WHTML5Media *parent, WResource *resource, const std::string &type,
    +           const std::string &media);
    +    Source(const std::string &url, const std::string &type,
    +	   const std::string &media);
    +    ~Source();
    +
    +    void resourceChanged();
    +
    +    WHTML5Media *parent;
    +    boost::signals::connection connection;
    +    std::string type, url, media;
    +    WResource *resource;
    +  };
    +  void renderSource(DomElement* element, WHTML5Media::Source &source,
    +   bool isLast);
    +
    +  std::vector<Source *> sources_;
    +  std::size_t sourcesRendered_;
    +  std::string mediaId_;
    +  WFlags<Options> flags_;
    +  PreloadMode preloadMode_;
    +  WWidget *alternative_;
    +  bool flagsChanged_, preloadChanged_, sourcesChanged_;
    +
    +  bool playing_;
    +  
    +  static const char *PLAYBACKSTARTED_SIGNAL;
    +  static const char *PLAYBACKPAUSED_SIGNAL;
    +  static const char *ENDED_SIGNAL;
    +  static const char *TIMEUPDATED_SIGNAL;
    +  static const char *VOLUMECHANGED_SIGNAL;
    +
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WHTML5Media::Options);
    +
    +}
    +
    +#endif // WHTML5MEDIA_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Media.C b/wt-3.1.7a/src/Wt/WHTML5Media.C
    new file mode 100644
    index 0000000..4f3ed28
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Media.C
    @@ -0,0 +1,424 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WHTML5Media"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WResource"
    +#include "Wt/WLogger"
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include "JavaScriptLoader.h"
    +#ifndef WT_DEBUG_JS
    +#include "js/WHTML5Media.min.js"
    +#endif
    +
    +#include <boost/algorithm/string.hpp>
    +
    +using namespace Wt;
    +const char *WHTML5Media::PLAYBACKSTARTED_SIGNAL = "play";
    +const char *WHTML5Media::PLAYBACKPAUSED_SIGNAL = "pause";
    +const char *WHTML5Media::ENDED_SIGNAL = "ended";
    +const char *WHTML5Media::TIMEUPDATED_SIGNAL = "timeupdate";
    +const char *WHTML5Media::VOLUMECHANGED_SIGNAL = "volumechange";
    +
    +WHTML5Media::WHTML5Media(WContainerWidget *parent):
    +  WInteractWidget(parent),
    +  sourcesRendered_(0),
    +  flags_(0),
    +  preloadMode_(PreloadAuto),
    +  alternative_(0),
    +  flagsChanged_(false),
    +  preloadChanged_(false),
    +  sourcesChanged_(false),
    +  playing_(false)
    +{
    +  setInline(false);
    +  setFormObject(true);
    +
    +  WApplication *app = wApp;
    +  const char *THIS_JS = "js/WHTML5Media.js";
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WHTML5Media", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +  doJavaScript("new " WT_CLASS ".WHTML5Media("
    +    + app->javaScriptClass() + "," + jsRef() + ");");
    +  setJavaScriptMember("WtPlay",
    +    "function() {jQuery.data(" + jsRef() + ", 'obj').play();}");
    +  setJavaScriptMember("WtPause",
    +    "function() {jQuery.data(" + jsRef() + ", 'obj').pause();}");
    +
    +#ifndef WT_TARGET_JAVA
    +  implementStateless(&WHTML5Media::play, &WHTML5Media::play);
    +  implementStateless(&WHTML5Media::pause, &WHTML5Media::pause);
    +#endif //WT_TARGET_JAVA
    +}
    +
    +WHTML5Media::~WHTML5Media()
    +{
    +  for (std::size_t i = 0; i < sources_.size(); ++i)
    +    delete sources_[i];
    +}
    +
    +EventSignal<>& WHTML5Media::playbackStarted()
    +{
    +  return *voidEventSignal(PLAYBACKSTARTED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WHTML5Media::playbackPaused()
    +{
    +  return *voidEventSignal(PLAYBACKPAUSED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WHTML5Media::ended()
    +{
    +  return *voidEventSignal(ENDED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WHTML5Media::timeUpdated()
    +{
    +  return *voidEventSignal(TIMEUPDATED_SIGNAL, true);
    +}
    +
    +EventSignal<>& WHTML5Media::volumeChanged()
    +{
    +  return *voidEventSignal(VOLUMECHANGED_SIGNAL, true);
    +}
    +
    +void WHTML5Media::setFormData(const FormData& formData)
    +{
    +  if (!Utils::isEmpty(formData.values)) {
    +    std::vector<std::string> attributes;
    +    boost::split(attributes, formData.values[0], boost::is_any_of(";"));
    +    if (attributes.size() == 5) {
    +      double volume, current, duration;
    +      bool paused, ended;
    +      try {
    +        volume = boost::lexical_cast<double>(attributes[0]);
    +        current = boost::lexical_cast<double>(attributes[1]);
    +        duration = boost::lexical_cast<double>(attributes[2]);
    +        paused = (attributes[3] == "1");
    +        ended = (attributes[4] == "1");
    +
    +	playing_ = !paused;
    +
    +	// Are other values any useful ?
    +      } catch (boost::bad_lexical_cast &e) {
    +	WApplication::instance()->log("error")
    +	  << "WHTML5Media: could not parse form data: " << formData.values[0];
    +      }
    +    }
    +  }
    +}
    +
    +void WHTML5Media::play()
    +{
    +  doJavaScript(jsRef() + ".WtPlay();");
    +}
    +
    +void WHTML5Media::pause()
    +{
    +  doJavaScript(jsRef() + ".WtPause();");
    +}
    +
    +void WHTML5Media::renderSource(DomElement* element,
    +                               WHTML5Media::Source &source, bool isLast)
    +{
    +  // src is mandatory
    +  element->setAttribute("src", fixRelativeUrl(source.url));
    +  if (source.type != "") element->setAttribute("type", source.type);
    +  if (source.media != "") element->setAttribute("media", source.media);
    +  if (isLast && alternative_) {
    +    // Last element -> add error handler for unsupported content
    +    element->setAttribute("onerror",
    +      """var media = this.parentNode;"
    +      """if(media){"
    +      ""  "while (media && media.children.length)"
    +      ""    "if (" WT_CLASS ".hasTag(media.firstChild,'SOURCE')){"
    +      ""      "media.removeChild(media.firstChild);"
    +      ""    "}else{"
    +      ""      "media.parentNode.insertBefore(media.firstChild, media);"
    +      ""    "}"
    +      ""  "media.style.display= 'none';"
    +      """}"
    +      );
    +  } else {
    +    element->setAttribute("onerror", "");
    +  }
    +}
    +
    +void WHTML5Media::updateMediaDom(DomElement& element, bool all)
    +{
    +  // Only if not IE
    +  if (all && alternative_) {
    +    element.setAttribute("onerror",
    +      """if(event.target.error && event.target.error.code=="
    +      ""   "event.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED){"
    +      ""  "while (this.hasChildNodes())"
    +      ""    "if (" WT_CLASS ".hasTag(this.firstChild,'SOURCE')){"
    +      ""      "this.removeChild(this.firstChild);"
    +      ""    "}else{"
    +      ""      "this.parentNode.insertBefore(this.firstChild, this);"
    +      ""    "}"
    +      ""  "this.style.display= 'none';"
    +      """}"
    +      );
    +  }
    +  if (all || flagsChanged_) {
    +    if ((!all) || flags_ & Controls)
    +      element.setAttribute("controls", flags_ & Controls ? "controls" : "");
    +    if ((!all) || flags_ & Autoplay)
    +      element.setAttribute("autoplay", flags_ & Autoplay ? "autoplay" : "");
    +    if ((!all) || flags_ & Loop)
    +      element.setAttribute("loop", flags_ & Loop ? "loop" : "");
    +  }
    +  if (all || preloadChanged_) {
    +    switch (preloadMode_) {
    +      case PreloadNone:
    +        element.setAttribute("preload", "none");
    +        break;
    +      default:
    +      case PreloadAuto:
    +        element.setAttribute("preload", "auto");
    +        break;
    +      case PreloadMetadata:
    +        element.setAttribute("preload", "metadata");
    +        break;
    +    }
    +  }
    +
    +  updateEventSignals(element, all);
    +
    +  if (all)
    +    if (alternative_) {
    +      element.addChild(alternative_->createSDomElement(wApp));
    +    }
    +  flagsChanged_ = preloadChanged_ = false;
    +}
    +
    +DomElement *WHTML5Media::createDomElement(WApplication *app)
    +{
    +  DomElement *result = 0;
    +
    +  if (isInLayout()) {
    +    // It's easier to set WT_RESIZE_JS after the following code,
    +    // but if it's not set, the alternative content will think that
    +    // it is not included in a layout manager. Set some phony function
    +    // now, which will be overwritten later in this method.
    +    setJavaScriptMember(WT_RESIZE_JS, "function() {}");
    +  }
    +
    +  if (app->environment().agentIsIElt(9) ||
    +      app->environment().agent() == WEnvironment::MobileWebKitAndroid) {
    +    // Shortcut: IE misbehaves when it encounters a media element
    +    result = DomElement::createNew(DomElement_DIV);
    +    if (alternative_)
    +      result->addChild(alternative_->createSDomElement(app));
    +  } else {
    +    DomElement *media = createMediaDomElement();
    +    DomElement *wrap = 0;
    +    if (isInLayout()) {
    +      media->setProperty(PropertyStylePosition, "absolute");
    +      media->setProperty(PropertyStyleLeft, "0");
    +      media->setProperty(PropertyStyleRight, "0");
    +      wrap = DomElement::createNew(DomElement_DIV);
    +      wrap->setProperty(PropertyStylePosition, "relative");
    +    }
    +    result = wrap ? wrap : media;
    +    if (wrap) {
    +      mediaId_ = id() + "_media";
    +      media->setId(mediaId_);
    +    } else {
    +      mediaId_ = id();
    +    }
    +
    +    updateMediaDom(*media, true);
    +    // Create the 'source' elements
    +    for (std::size_t i = 0; i < sources_.size(); ++i) {
    +      DomElement *src = DomElement::createNew(DomElement_SOURCE);
    +      src->setId(mediaId_ + "s" + boost::lexical_cast<std::string>(i));
    +      renderSource(src, *sources_[i], i + 1 >= sources_.size());
    +      media->addChild(src);
    +    }
    +    sourcesRendered_ = sources_.size();
    +    sourcesChanged_ = false;
    +
    +    if (wrap) {
    +      wrap->addChild(media);
    +    }
    +  }
    +
    +  if (isInLayout()) {
    +    std::stringstream ss;
    +    ss <<
    +      """function(self, w, h) {";
    +    if (!mediaId_.empty()) {
    +      ss <<
    +        ""  "v=" + jsMediaRef() + ";"
    +        ""  "if(v){"
    +        ""    "v.setAttribute('width', w);"
    +        ""    "v.setAttribute('height', h);"
    +        ""  "}";
    +    }
    +    if (alternative_) {
    +      ss <<
    +        """a=" + alternative_->jsRef() + ";"
    +        ""  "if(a && a." << WT_RESIZE_JS <<")"
    +        ""    "a." << WT_RESIZE_JS << "(a, w, h);";
    +    }
    +    ss
    +      <<"}";
    +    setJavaScriptMember(WT_RESIZE_JS, ss.str());
    +  }
    +
    +  setId(result, app);
    +  updateDom(*result, true);
    +
    +  if (isInLayout()) {
    +    result->setEvent(PLAYBACKSTARTED_SIGNAL, std::string());
    +    result->setEvent(PLAYBACKPAUSED_SIGNAL, std::string());
    +    result->setEvent(ENDED_SIGNAL, std::string());
    +    result->setEvent(TIMEUPDATED_SIGNAL, std::string());
    +    result->setEvent(VOLUMECHANGED_SIGNAL, std::string());
    +  }
    +
    +  setJavaScriptMember("mediaId", "'" + mediaId_ + "'");
    +
    +  return result;
    +}
    +
    +std::string WHTML5Media::jsMediaRef() const
    +{
    +  if (mediaId_.empty()) {
    +    return "null";
    +  } else {
    +    return WT_CLASS ".getElement('" + mediaId_ + "')";
    +  }
    +}
    +
    +void WHTML5Media::getDomChanges(std::vector<DomElement *>& result,
    +                                WApplication *app)
    +{
    +  if (!mediaId_.empty()) {
    +    DomElement *media = DomElement::getForUpdate(mediaId_, DomElement_DIV);
    +    updateMediaDom(*media, false);
    +    if (sourcesChanged_) {
    +      // Updating source elements seems to be ill-supported in at least FF,
    +      // so we delete them all and reinsert them.
    +      // Delete source elements that are no longer required
    +      for (std::size_t i = 0; i < sourcesRendered_; ++i)
    +	media->callJavaScript
    +	  (WT_CLASS ".remove('" + mediaId_ + "s"
    +	   + boost::lexical_cast<std::string>(i) + "');",
    +	   true);
    +      sourcesRendered_ = 0;
    +      for (std::size_t i = 0; i < sources_.size(); ++i) {
    +        DomElement *src = DomElement::createNew(DomElement_SOURCE);
    +        src->setId(mediaId_ + "s" + boost::lexical_cast<std::string>(i));
    +        renderSource(src, *sources_[i], i + 1 >= sources_.size());
    +        media->addChild(src);
    +      }
    +      sourcesRendered_ = sources_.size();
    +      sourcesChanged_ = false;
    +      // Explicitly request rerun of media selection algorithm
    +      // 4.8.9.2 says it should happen automatically, but FF doesn't
    +      media->callJavaScript(jsMediaRef() + ".load();");
    +    }
    +    result.push_back(media);
    +  }
    +  WInteractWidget::getDomChanges(result, app);
    +}
    +
    +void WHTML5Media::setOptions(const WFlags<Options> &flags)
    +{
    +  flags_ = flags;
    +  flagsChanged_ = true;
    +  this->repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +WFlags<WHTML5Media::Options> WHTML5Media::getOptions() const
    +{
    +  return flags_;
    +}
    +
    +void WHTML5Media::setPreloadMode(PreloadMode mode)
    +{
    +  preloadMode_ = mode;
    +  preloadChanged_ = true;
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +WHTML5Media::PreloadMode WHTML5Media::preloadMode() const
    +{
    +  return preloadMode_;
    +}
    +
    +void WHTML5Media::clearSources()
    +{
    +  for (std::size_t i = 0; i < sources_.size(); ++i) {
    +    delete sources_[i];
    +  }
    +  sources_.clear();
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +void WHTML5Media::addSource(const std::string &url, const std::string &type,
    +                            const std::string &media)
    +{
    +  sources_.push_back(new Source(url, type, media));
    +  sourcesChanged_ = true;
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +void WHTML5Media::addSource(WResource *resource,
    +                            const std::string &type,
    +                            const std::string &media)
    +{
    +  sources_.push_back(new Source(this, resource, type, media));
    +  sourcesChanged_ = true;
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +void WHTML5Media::setAlternativeContent(WWidget *alternative)
    +{
    +  if (alternative_)
    +    delete alternative_;
    +  alternative_ = alternative;
    +  if (alternative_)
    +    addChild(alternative_);
    +}
    +
    +WHTML5Media::Source::Source(WHTML5Media *parent,
    +                            WResource *resource, const std::string &type,
    +                            const std::string &media)
    +  :  parent(parent),
    +     type(type),
    +     url(resource->url()),
    +     media(media),
    +     resource(resource)
    +{
    +  connection = resource->dataChanged().connect(this, &Source::resourceChanged);
    +}
    +
    +WHTML5Media::Source::Source(const std::string &url, const std::string &type,
    +			    const std::string &media)
    +  : type(type), url(url), media(media)
    +{ }
    +
    +WHTML5Media::Source::~Source()
    +{
    +  connection.disconnect();
    +}
    +
    +void WHTML5Media::Source::resourceChanged()
    +{
    +  url = resource->url();
    +  parent->sourcesChanged_ = true;
    +  parent->repaint(Wt::RepaintPropertyAttribute);
    +}
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Video b/wt-3.1.7a/src/Wt/WHTML5Video
    new file mode 100644
    index 0000000..52d0777
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Video
    @@ -0,0 +1,110 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WHTML5VIDEO_H_
    +#define WHTML5VIDEO_H_
    +
    +#include <Wt/WHTML5Media>
    +
    +namespace Wt {
    +
    +/*! \class WHTML5Video Wt/WHTML5Video Wt/WHTML5Video
    + *  \brief A widget that renders video using the HTML5 video element.
    + *
    + * This class renders HTML5 video. In a typical usage scenario,
    + * you instantiate the class, set options, add one or multiple
    + * video sources. Since not every browser supports HTML5 video,
    + * the class provides a mechanism to display alternative content
    + * in browsers that cannot play the video.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * WHTML5Video *v = new WHTML5Video(parent);
    + * v->setOptions(WHTML5Video::Autoplay | WHTML5Video::Controls);
    + * // Addsources may be called multiple times for different formats:
    + * // Firefox only plays ogg
    + * v->addSource("wt.ogv");
    + * // many others play mp4
    + * v->addSource("wt.mp4", "video/mp4");
    + * // Image to be displayed before playback starts
    + * v->setPoster("wt.jpg");
    + * // You may display a simple text to explain that you need html5 support...
    + * // v->setAlternativeContent(new WText("You have no HTML5 Video!"));
    + * // ... or provide an alternative player, e.g. Flash-based
    + * WFlashObject *f = new WFlashObject("player.swf", root());
    + * f->setFlashVariable("startimage", "wt.jpg");
    + * f->setFlashVariable("flv", "wt.mp4");
    + * f->resize(640, 384);
    + * v->setAlternativeContent(f);
    + * \endcode
    + * \endif
    + *
    + * There are two reasons why the a browser may use the alternative
    + * content: either because the browser does not support the HTML5
    + * video tag (alternative content is displayed even when JavaScript
    + * is not available), or because none of the specified sources contain
    + * a video format that is understood by the browser (requires
    + * JavaScript to display the alternative content).
    + *
    + * addSource() and setAlternativeContent() must not be called after
    + * the WHTML5Video was rendered. This can easily be avoided by calling
    + * these functions right after construction.
    + *
    + * This is a technology-specific class. To let %Wt choose a technology
    + * (and fallback technologies) to display your videos, use the WVideo class.
    + */
    +class WT_API WHTML5Video : public WHTML5Media
    +{
    +public:
    +  /*! \brief Creates a HTML5 video widget.
    +   *
    +   * The constructor sets the 'controls' option, which causes the browser
    +   * to display a bar with play/pauze/volume/... controls.
    +   *
    +   * A freshly constructed HTML5Video widget has no poster image, no
    +   * media sources, has preload mode set to PreloadAuto, and only the
    +   * Controls flag is set.
    +   */
    +  WHTML5Video(WContainerWidget *parent = 0);
    +  
    +  /*! \brief Set the poster image
    +   *
    +   * On browsers that support it, the poster image is displayed before
    +   * the video is playing. Some browsers display the first frame of the
    +   * video stream once the video stream is loaded; it is therefore a
    +   * good idea to include the poster image as first frame in the video
    +   * feed too.
    +   */
    +  void setPoster(const std::string &url);
    +  
    +  /*! \brief Returns the JavaScript reference to the video object, or null.
    +   *
    +   * It is possible, for compatibility reasons, that jsRef() is not the
    +   * HTML5 video element. jsVideoRef() is guaranteed to be an expression
    +   * that evaluates to the video object. This expression may yield null, if
    +   * the video object is not rendered at all (e.g. on older versions of
    +   * Internet Explorer).
    +   */
    +  std::string jsVideoRef() const;
    +
    +  virtual void resize(const WLength &width, const WLength &height);
    +
    +protected:
    +  virtual DomElement *createMediaDomElement();
    +  DomElementType domElementType() const;
    +  void updateMediaDom(DomElement& element, bool all);
    +
    +private:
    +  std::string posterUrl_;
    +  PreloadMode preloadMode_;
    +  bool sizeChanged_, posterChanged_;
    +};
    +
    +}
    +
    +#endif // WHTML5VIDEO_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WHTML5Video.C b/wt-3.1.7a/src/Wt/WHTML5Video.C
    new file mode 100644
    index 0000000..c20a49e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WHTML5Video.C
    @@ -0,0 +1,75 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WHTML5Video"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WTemplate"
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +using namespace Wt;
    +
    +WHTML5Video::WHTML5Video(WContainerWidget *parent):
    +  WHTML5Media(parent),
    +  sizeChanged_(false),
    +  posterChanged_(false)
    +{
    +  setInline(false);
    +  this->setOptions(Controls);
    +}
    +
    +void WHTML5Video::updateMediaDom(DomElement& element, bool all)
    +{
    +  WHTML5Media::updateMediaDom(element, all);
    +  // Video has a few extra attributes...
    +  if (all || sizeChanged_) {
    +    if ((!all) || !width().isAuto())
    +      element.setAttribute("width",
    +        width().isAuto() ? "" :
    +          boost::lexical_cast<std::string>((int)width().toPixels()));
    +    if ((!all) || !height().isAuto())
    +      element.setAttribute("height",
    +        height().isAuto() ? "" :
    +          boost::lexical_cast<std::string>((int)height().toPixels()));
    +  }
    +  if (all || posterChanged_) {
    +    if ((!all) || posterUrl_ != "") {
    +      element.setAttribute("poster", fixRelativeUrl(posterUrl_));
    +    }
    +  }
    +  sizeChanged_ = posterChanged_ = false;
    +}
    +
    +DomElement *WHTML5Video::createMediaDomElement()
    +{
    +  return DomElement::createNew(DomElement_VIDEO);
    +}
    +
    +std::string WHTML5Video::jsVideoRef() const
    +{
    +  return jsMediaRef();
    +}
    +
    +DomElementType WHTML5Video::domElementType() const
    +{
    +  return DomElement_VIDEO;
    +}
    +
    +void WHTML5Video::setPoster(const std::string &url)
    +{
    +  posterUrl_ = url;
    +  posterChanged_ = true;
    +  this->repaint(Wt::RepaintPropertyAttribute);
    +}
    +
    +void WHTML5Video::resize(const WLength &width, const WLength &height)
    +{
    +  sizeChanged_ = true;
    +  WWebWidget::resize(width, height);
    +  repaint(Wt::RepaintPropertyAttribute);
    +}
    diff --git a/wt-3.1.7a/src/Wt/WIconPair b/wt-3.1.7a/src/Wt/WIconPair
    new file mode 100644
    index 0000000..1a41f44
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WIconPair
    @@ -0,0 +1,108 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WICONPAIR_H_
    +#define WICONPAIR_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WEvent>
    +
    +namespace Wt {
    +
    +class WImage;
    +
    +/*! \class WIconPair Wt/WIconPair Wt/WIconPair
    + *  \brief A widget that shows one of two icons depending on its state.
    + *
    + * This is a utility class that simply manages two images, only one of
    + * which is shown at a single time, which reflects the current
    + * 'state'.
    + *
    + * The widget may react to click events, by changing state.
    + *
    + * <h3>CSS</h3>
    + * 
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + * The image may be styled via the <tt>&lt;img&gt;</tt> elements.
    + */
    +class WT_API WIconPair : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Construct an icon pair from the two icons.
    +   *
    +   * The constructor takes the URL of the two icons. When
    +   * \p clickIsSwitch is set \c true, clicking on the icon will
    +   * switch state.
    +   */
    +  WIconPair(const std::string& icon1URL, const std::string& icon2URL,
    +	    bool clickIsSwitch = true, WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the state, which determines the visible icon.
    +   *
    +   * The first icon has number 0, and the second icon has number 1.
    +   *
    +   * The default state is 0.
    +   *
    +   * \sa state()
    +   */
    +  void setState(int num);
    +
    +  /*! \brief Returns the current state.
    +   *
    +   * \sa setState()
    +   */
    +  int state() const;
    +
    +  /*! \brief Returns the first icon image
    +   */
    +  WImage *icon1() const { return icon1_; }
    +  
    +  /*! \brief Returns the second icon image
    +   */
    +  WImage *icon2() const { return icon2_; }
    +
    +  /*! \brief Sets the state to 0 (show icon 1).
    +   *
    +   * \sa setState(int)
    +   */
    +  void showIcon1();
    +
    +  /*! \brief Sets the state to 1 (show icon 2).
    +   *
    +   * \sa setState(int)
    +   */ 
    +  void showIcon2();
    +
    +  /*! \brief %Signal emitted when clicked while in state 0 (icon 1 is
    +   *         shown).
    +   *
    +   * Equivalent to:
    +   * \code
    +   * icon1()->clicked()
    +   * \endcode
    +   */
    +  EventSignal<WMouseEvent>& icon1Clicked();
    +
    +  /*! \brief %Signal emitted when clicked while in state 1 (icon 2 is
    +   *         shown).
    +   *
    +   * Equivalent to:
    +   * \code
    +   * icon2()->clicked()
    +   * \endcode
    +   */
    +  EventSignal<WMouseEvent>& icon2Clicked();
    +
    +private:
    +  WContainerWidget *impl_;
    +  WImage *icon1_;
    +  WImage *icon2_;
    +};
    +
    +}
    +
    +#endif // WICONPAIR_H_
    diff --git a/wt-3.1.7a/src/Wt/WIconPair.C b/wt-3.1.7a/src/Wt/WIconPair.C
    new file mode 100644
    index 0000000..1b30248
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WIconPair.C
    @@ -0,0 +1,89 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WIconPair"
    +
    +namespace Wt {
    +
    +WIconPair::WIconPair(const std::string& icon1URI, const std::string& icon2URI,
    +		     bool clickIsSwitch, WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    impl_(new WContainerWidget()),
    +    icon1_(new WImage(icon1URI, impl_)),
    +    icon2_(new WImage(icon2URI, impl_))
    +{
    +  setImplementation(impl_);
    +  impl_->setLoadLaterWhenInvisible(false);
    +
    +  setInline(true);
    +
    +  icon2_->hide();
    +
    +  if (clickIsSwitch) {
    +#ifndef WT_TARGET_JAVA
    +    std::string fic1 = icon1_->id();
    +    std::string fic2 = icon2_->id();
    +    std::string hide_1 = WT_CLASS ".hide('" + fic1 +"');";
    +    std::string show_1 = WT_CLASS ".inline('" + fic1 +"');";
    +    std::string hide_2 = WT_CLASS ".hide('" + fic2 +"');";
    +    std::string show_2 = WT_CLASS ".inline('" + fic2 +"');";
    +    implementJavaScript(&WIconPair::showIcon1, hide_2 + show_1
    +			+ WT_CLASS ".cancelEvent(e);");
    +    implementJavaScript(&WIconPair::showIcon2, hide_1 + show_2
    +			+ WT_CLASS ".cancelEvent(e);");
    +#else
    +    icon1_->clicked().preventPropagation();
    +    icon2_->clicked().preventPropagation();
    +#endif // WT_TARGET_JAVA
    +
    +    icon1_->clicked().connect(this, &WIconPair::showIcon2);
    +    icon2_->clicked().connect(this, &WIconPair::showIcon1);
    +
    +    decorationStyle().setCursor(PointingHandCursor);
    +  }
    +}
    +
    +void WIconPair::setState(int num)
    +{
    +  if (num == 0) {
    +    icon1_->show();
    +    icon2_->hide();
    +  } else {
    +    icon1_->hide();
    +    icon2_->show();
    +  }
    +}
    +
    +int WIconPair::state() const
    +{
    +  return (icon1_->isHidden() ? 1 : 0);
    +}
    +
    +void WIconPair::showIcon1()
    +{
    +  setState(0);
    +}
    +
    +void WIconPair::showIcon2()
    +{
    +  setState(1);
    +}
    +
    +EventSignal<WMouseEvent>& WIconPair::icon1Clicked()
    +{
    +  return icon1_->clicked();
    +}
    +
    +EventSignal<WMouseEvent>& WIconPair::icon2Clicked()
    +{
    +  return icon2_->clicked();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WImage b/wt-3.1.7a/src/Wt/WImage
    new file mode 100644
    index 0000000..dbea6cf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WImage
    @@ -0,0 +1,219 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WIMAGE_H_
    +#define WIMAGE_H_
    +
    +#include <Wt/WInteractWidget>
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +    class MapWidget;
    +  }
    +
    +  class WAbstractArea;
    +
    +/*! \class WImage Wt/WImage Wt/WImage
    + *  \brief A widget that displays an image.
    + *
    + * The image may be specified either as a URL, or may be dynamically
    + * generated by a WResource.
    + *
    + * You may listen to events by attaching event listeners to signals
    + * such as clicked(). Since mouse events pass the coordinates through
    + * a WMouseEvent object, it is possible to react to clicks in specific
    + * parts of the image. An alternative is to define interactive areas
    + * on the image using addArea(), which in addition allows to have
    + * customized tool tips for certain image areas (using
    + * WAbstractArea::setToolTip()).
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WImage *img = new Wt::WImage("images/johnny_cash.png", this);
    + * img->setAlternateText("Johnny Cash sings a song");
    + * \endcode
    + * \endif
    + *
    + * %WImage is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;img&gt;</tt> tag and
    + * does not provide styling. It can be styled using inline or external
    + * CSS as appropriate.
    + *
    + * \sa WResource, WPaintedWidget
    + */
    +class WT_API WImage : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates an empty image widget.
    +   */
    +  WImage(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an image widget with given image URL.
    +   */
    +  WImage(const std::string& imageRef, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an image widget with given image URL and alternate text.
    +   */
    +  WImage(const std::string& imageRef, const WString& altText,
    +	 WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an image widget with given image resource and alternate
    +   *         text.
    +   *
    +   * Use this constructor if you want to present a dynamically generated
    +   * image.
    +   */
    +  WImage(WResource *resource, const WString& altText,
    +	 WContainerWidget *parent = 0);
    +
    +  ~WImage();
    +
    +  /*! \brief Sets an alternate text.
    +   *
    +   * The alternate text should provide a fallback for browsers that do
    +   * not display an image. If no sensible fallback text can be
    +   * provided, an empty text is preferred over nonsense.
    +   *
    +   * This should not be confused with toolTip() text, which provides
    +   * additional information that is displayed when the mouse hovers
    +   * over the image.
    +   *
    +   * The default alternate text is an empty text ("").
    +   *
    +   * \sa alternateText()
    +   */
    +  void setAlternateText(const WString& text);
    +
    +  /*! \brief Returns the alternate text.
    +   *
    +   * \sa setAlternateText()
    +   */
    +  const WString& alternateText() const { return altText_; }
    +
    +  /*! \brief Sets the image URL.
    +   *
    +   * This should not be used when the image is specified as a resource.
    +   *
    +   * \sa setResource()
    +   */
    +  void setImageRef(const std::string& url);
    +
    +  /*! \brief Returns the image URL.
    +   *
    +   * When the image is specified as a resource, this returns the current
    +   * resource URL.
    +   */
    +  const std::string imageRef() const;
    +
    +  /*! \brief Sets the image resource.
    +   *
    +   * A resource specifies application-dependent content, which may be
    +   * used to generate an image on demand.
    +   *
    +   * This sets \p resource as the contents for the image, as an
    +   * alternative to setImageRef(). The resource may be cleared by
    +   * passing \p resource = \c 0.
    +   *
    +   * The image does not assume ownership of the resource.
    +   *
    +   * \sa setImageRef()
    +   */
    +  void setResource(WResource *resource);
    +
    +  /*! \brief Returns the image resource.
    +   *
    +   * Returns \c 0 if no image resource was set.
    +   */
    +  WResource *resource() const { return resource_; }
    +
    +  /*! \brief Adds an interactive area.
    +   *
    +   * Adds the \p area which listens to events in a specific region
    +   * of the image. Areas are organized in an indexed list, to which
    +   * the given \p area is appended. When areas overlap, the area
    +   * with the lowest index receives the event.
    +   *
    +   * Ownership of the \p area is transferred to the image.
    +   *
    +   * \sa insertArea(int, WAbstractArea *)
    +   */
    +  void addArea(WAbstractArea *area);
    +
    +  /*! \brief Inserts an interactive area.
    +   *
    +   * Inserts the \p area which listens to events in the
    +   * coresponding area of the image. Areas are organized in a list,
    +   * and the <i>area</i> is inserted at index \p index. When areas
    +   * overlap, the area with the lowest index receives the event.
    +   *
    +   * Ownership of the \p area is transferred to the image.
    +   *
    +   * \sa addArea(WAbstractArea *)
    +   */
    +  void insertArea(int index, WAbstractArea *area);
    +
    +  /*! \brief Removes an interactive area.
    +   *
    +   * Removes the \p area from this widget, and also returns the
    +   * ownership.
    +   *
    +   * \sa addArea(WAbstractArea *)
    +   */
    +  void removeArea(WAbstractArea *area);
    +
    +  /*! \brief Returns the interactive area at the given index.
    +   *
    +   * Returns \c 0 if \p index was invalid.
    +   *
    +   * \sa insertArea(int, WAbstractArea *)
    +   */
    +  WAbstractArea *area(int index) const;
    +
    +  /*! \brief Returns the interactive areas set for this widget.
    +   *
    +   * \sa addArea()
    +   */
    +  const std::vector<WAbstractArea *> areas() const;
    +
    +  /*! \brief Event emitted when the image was loaded.
    +   */
    +  EventSignal<>& imageLoaded();
    +
    +private:
    +  static const char *LOAD_SIGNAL;
    +
    +  static const int BIT_ALT_TEXT_CHANGED = 0;
    +  static const int BIT_IMAGE_REF_CHANGED = 1;
    +  static const int BIT_MAP_CREATED = 2;
    +
    +  WString                    altText_;
    +  std::string                imageRef_;
    +  WResource                 *resource_;
    +  Impl::MapWidget           *map_;
    +  std::bitset<3>             flags_;
    +
    +  void resourceChanged();
    +
    +protected:
    +  virtual void getDomChanges(std::vector<DomElement *>& result,
    +			     WApplication *app);
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void propagateRenderOk(bool deep);
    +
    +  friend class WLabel;
    +
    +  static std::vector<WAbstractArea *> noAreas_;
    +};
    +
    +}
    +
    +#endif // WIMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WImage.C b/wt-3.1.7a/src/Wt/WImage.C
    new file mode 100644
    index 0000000..50b2958
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WImage.C
    @@ -0,0 +1,242 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WImage"
    +#include "Wt/WAbstractArea"
    +#include "Wt/WLogger"
    +#include "Wt/WResource"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +
    +    class MapWidget : public WContainerWidget
    +    {
    +    public:
    +      MapWidget() { }
    +
    +    protected:
    +      virtual void updateDom(DomElement& element, bool all)
    +      {
    +	if (all)
    +	  element.setAttribute("name", id());
    +
    +	WContainerWidget::updateDom(element, all);
    +      }
    +
    +      virtual DomElementType domElementType() const {
    +	return DomElement_MAP;
    +      }
    +    };
    +
    +  }
    +
    +const char *WImage::LOAD_SIGNAL = "load";
    +
    +WImage::WImage(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    resource_(0),
    +    map_(0)
    +{
    +  setLoadLaterWhenInvisible(false);
    +}
    +
    +WImage::WImage(const std::string& imageRef, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    imageRef_(imageRef),
    +    resource_(0),
    +    map_(0)
    +{
    +  setLoadLaterWhenInvisible(false);
    +}
    +
    +WImage::WImage(const std::string& imageRef, const WString& altText,
    +	       WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    altText_(altText),
    +    imageRef_(imageRef),
    +    resource_(0),
    +    map_(0)
    +{
    +  setLoadLaterWhenInvisible(false);
    +}
    +
    +WImage::WImage(WResource *resource, const WString& altText,
    +	       WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    altText_(altText),
    +    resource_(resource),
    +    map_(0)
    +{
    +  resource_->dataChanged().connect(this, &WImage::resourceChanged);
    +  imageRef_ = resource_->url();
    +
    +  setLoadLaterWhenInvisible(false);
    +}
    +
    +WImage::~WImage()
    +{ 
    +  delete map_;
    +}
    +
    +EventSignal<>& WImage::imageLoaded()
    +{
    +  return *voidEventSignal(LOAD_SIGNAL, true);
    +}
    +
    +void WImage::setResource(WResource *resource)
    +{
    +  resource_ = resource;
    +
    +  if (resource_) {
    +    resource_->dataChanged().connect(this, &WImage::resourceChanged);
    +    setImageRef(resource_->url());
    +  } else
    +    setImageRef("#");
    +}
    +
    +void WImage::setAlternateText(const WString& text)
    +{
    +  if (canOptimizeUpdates() && (text == altText_))
    +    return;
    +
    +  altText_ = text;
    +  flags_.set(BIT_ALT_TEXT_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WImage::setImageRef(const std::string& ref)
    +{
    +  if (canOptimizeUpdates() && (ref == imageRef_))
    +    return;
    +
    +  imageRef_ = ref;
    +  flags_.set(BIT_IMAGE_REF_CHANGED);
    +
    +  repaint(RepaintPropertyIEMobile);
    +}
    +
    +const std::string WImage::imageRef() const
    +{
    +  return imageRef_;
    +}
    +
    +void WImage::resourceChanged()
    +{
    +  if (resource_)
    +    setImageRef(resource_->url());
    +}
    +
    +void WImage::addArea(WAbstractArea *area)
    +{
    +  insertArea(map_ ? map_->count() : 0, area);
    +}
    +
    +void WImage::insertArea(int index, WAbstractArea *area)
    +{
    +  if (!map_) {
    +    addChild(map_ = new Impl::MapWidget());
    +    flags_.set(BIT_MAP_CREATED);
    +    repaint(RepaintPropertyAttribute);
    +  }
    +
    +  map_->insertWidget(index, area->impl());
    +}
    +
    +WAbstractArea *WImage::area(int index) const
    +{
    +  if (map_ && index < map_->count())
    +    return WAbstractArea::areaForImpl(map_->widget(index));
    +  else
    +    return 0;
    +}
    +
    +const std::vector<WAbstractArea *> WImage::areas() const
    +{
    +  std::vector<WAbstractArea *> result;
    +
    +  if (map_) {
    +    for (int i = 0; i < map_->count(); ++i)
    +      result.push_back(WAbstractArea::areaForImpl(map_->widget(i)));
    +  }
    +
    +  return result;
    +}
    +
    +void WImage::removeArea(WAbstractArea *area)
    +{
    +  if (!map_) {
    +    wApp->log("error") << "WImage::removeArea(): no such area";
    +    return;
    +  }
    +
    +  map_->removeWidget(area->impl());
    +}
    +
    +void WImage::updateDom(DomElement& element, bool all)
    +{
    +  DomElement *img = &element;
    +  if (all && element.type() == DomElement_SPAN) {
    +    DomElement *map = map_->createDomElement(WApplication::instance());
    +    element.addChild(map);
    +
    +    img = DomElement::createNew(DomElement_IMG);
    +    img->setId("i" + id());
    +  }
    +
    +  if (flags_.test(BIT_IMAGE_REF_CHANGED) || all) {
    +    if (!imageRef_.empty())
    +      img->setProperty(Wt::PropertySrc, fixRelativeUrl(imageRef_));
    +    flags_.reset(BIT_IMAGE_REF_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_ALT_TEXT_CHANGED) || all) {
    +    img->setAttribute("alt", altText_.toUTF8());
    +    flags_.reset(BIT_ALT_TEXT_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_MAP_CREATED) || (all && map_)) {
    +    img->setAttribute("usemap", '#' + map_->id());
    +    flags_.reset(BIT_MAP_CREATED);
    +  }
    +
    +  WInteractWidget::updateDom(*img, all);
    +
    +  if (&element != img)
    +    element.addChild(img);
    +}
    +
    +void WImage::getDomChanges(std::vector<DomElement *>& result,
    +			   WApplication *app)
    +{
    +  if (map_) {
    +    // TODO: check if BIT_MAP_CREATED: then need to replace the whole
    +    // element with a <span><img/><map/></span>. Currently we document
    +    // this as a limitation.
    +    DomElement *e = DomElement::getForUpdate("i" + id(), DomElement_IMG);
    +    updateDom(*e, false);
    +    result.push_back(e);
    +  } else
    +    WInteractWidget::getDomChanges(result, app);
    +}
    +
    +void WImage::propagateRenderOk(bool deep)
    +{
    +  flags_.reset(BIT_IMAGE_REF_CHANGED);
    +  flags_.reset(BIT_ALT_TEXT_CHANGED);
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WImage::domElementType() const
    +{
    +  return map_ ? DomElement_SPAN : DomElement_IMG;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WInPlaceEdit b/wt-3.1.7a/src/Wt/WInPlaceEdit
    new file mode 100644
    index 0000000..f244d25
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WInPlaceEdit
    @@ -0,0 +1,154 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WINPLACE_EDIT_H_
    +#define WINPLACE_EDIT_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +class WText;
    +class WLineEdit;
    +class WPushButton;
    +
    +/*! \class WInPlaceEdit Wt/WInPlaceEdit Wt/WInPlaceEdit
    + *  \brief A widget that provides in-place-editable text.
    + *
    + * The %WInPlaceEdit provides a text that may be edited in place by
    + * the user by clicking on it. When clicked, the text turns into a
    + * line edit, with optionally a save and cancel button (see
    + * setButtonsEnabled()).
    + *
    + * When the user saves the edit, the valueChanged() signal is emitted.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget();
    + * new Wt::WText("Name: ", w);
    + * Wt::WInPlaceEdit *edit = new Wt::WInPlaceEdit("Bob Smith", w);
    + * edit->setStyleClass("inplace");
    + * \endcode
    + * \elseif java
    + * \code 
    + * WContainerWidget w = new WContainerWidget();
    + * new WText("Name: ", w);
    + * WInPlaceEdit edit = new WInPlaceEdit("Bob Smith", w);
    + * edit.setStyleClass("inplace");
    + * \endcode
    + * \endif
    + *
    + * This code will produce an edit that looks like:
    + * \image html WInPlaceEdit-1.png "WInPlaceEdit text mode"
    + * When the text is clicked, the edit will expand to become:
    + * \image html WInPlaceEdit-2.png "WInPlaceEdit edit mode"
    + *
    + * <h3>CSS</h3>
    + *
    + * A WInPlaceEdit widget renders as a <tt>&lt;span&gt;</tt> containing
    + * a WText, a WLineEdit and optional buttons (WPushButton). All these
    + * widgets may be styled as such. It does not provide style information.
    + *
    + * In particular, you may want to provide a visual indication that the text
    + * is editable e.g. using a hover effect:
    + *
    + * CSS stylesheet:
    + * \code
    + * .inplace span:hover {
    + *    background-color: gray;
    + * }
    + * \endcode
    + */
    +class WT_API WInPlaceEdit : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates an in-place edit with the given text.
    +   */
    +  WInPlaceEdit(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Returns the current value.
    +   *
    +   * \sa setText()
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Sets the current value.
    +   *
    +   * \sa text()
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Sets the empty text to be shown when the field is empty 
    +   * and not editable.
    +   *
    +   * \sa emptyText()
    +   */
    +  void setEmptyText(const WString& emptyText);
    +
    +  /*! \brief Returns the empty text to be shown when the field is empty 
    +   * and not editable.
    +   *
    +   * \sa setEmptyText()
    +   */
    +  const WString& emptyText();
    +
    +  /*! \brief Returns the line edit.
    +   *
    +   * You may use this for example to set a validator on the line edit.
    +   */
    +  WLineEdit *lineEdit() const { return edit_; }
    +
    +  /*! \brief Returns the save button.
    +   *
    +   * This method returns \c 0 if the buttons were disabled.
    +   *
    +   * \sa cancelButton(), setButtonsEnabled()
    +   */
    +  WPushButton *saveButton() const { return save_; }
    +
    +  /*! \brief Returns the cancel button.
    +   *
    +   * This method returns \c 0 if the buttons were disabled.
    +   *
    +   * \sa saveButton(), setButtonsEnabled()
    +   */
    +  WPushButton *cancelButton() const { return cancel_; }
    +
    +  /*! \brief %Signal emitted when the value has been changed.
    +   *
    +   * The signal argument provides the new value.
    +   */
    +  Signal<WString>& valueChanged() { return valueChanged_; }
    +
    +  /*! \brief Displays the Save and 'Cancel' button during editing
    +   *
    +   * By default, the Save and Cancel buttons are shown. Call this
    +   * function with \p enabled = \c false to only show a line edit. In
    +   * this mode, the enter key has the effect of the save button and
    +   * the escape key has the effect of the cancel button.
    +   */
    +  void setButtonsEnabled(bool enabled = true);
    +
    +private:
    +  void save();
    +  void cancel();
    +
    +private:
    +  Signal<WString> valueChanged_;
    +  WContainerWidget *impl_;
    +  WText            *text_;
    +  WString          emptyText_;
    +  WLineEdit        *edit_;
    +  WPushButton      *save_;
    +  WPushButton      *cancel_;
    +  boost::signals::connection c1_;
    +  boost::signals::connection c2_;
    +};
    +
    +}
    +
    +#endif // WINPLACE_EDIT_H_
    diff --git a/wt-3.1.7a/src/Wt/WInPlaceEdit.C b/wt-3.1.7a/src/Wt/WInPlaceEdit.C
    new file mode 100644
    index 0000000..12b84fa
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WInPlaceEdit.C
    @@ -0,0 +1,138 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WInPlaceEdit"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WPushButton"
    +#include "Wt/WText"
    +#include "Wt/WLineEdit"
    +
    +namespace Wt {
    +
    +WInPlaceEdit::WInPlaceEdit(const WString& text, WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    valueChanged_(this)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  setInline(true);
    +
    +  text_ = new WText(text, PlainText, impl_);
    +  text_->decorationStyle().setCursor(ArrowCursor);
    +
    +  edit_ = new WLineEdit(text, impl_);
    +  edit_->setTextSize(20);
    +  save_ = 0;
    +  cancel_ = 0;
    +  edit_->hide();
    +
    +  /*
    +   * This is stateless implementation heaven
    +   */
    +  text_->clicked().connect(text_, &WWidget::hide);
    +  text_->clicked().connect(edit_, &WWidget::show);
    +  text_->clicked().connect(edit_, &WFormWidget::setFocus);
    +
    +  edit_->enterPressed().connect(edit_, &WFormWidget::disable);
    +  edit_->enterPressed().connect(this, &WInPlaceEdit::save);
    +  edit_->enterPressed().preventDefaultAction();
    +
    +  edit_->escapePressed().connect(edit_, &WWidget::hide);
    +  edit_->escapePressed().connect(text_, &WWidget::show);
    +  edit_->escapePressed().connect(this, &WInPlaceEdit::cancel);
    +  edit_->escapePressed().preventDefaultAction();
    +
    +  setButtonsEnabled();
    +}
    +
    +const WString& WInPlaceEdit::text() const
    +{
    +  return edit_->text();
    +}
    +
    +void WInPlaceEdit::setText(const WString& text)
    +{
    +  if (text != WString::Empty)
    +    text_->setText(text);
    +  else
    +    text_->setText(emptyText_);
    +
    +  edit_->setText(text);
    +}
    +
    +void WInPlaceEdit::setEmptyText(const WString& emptyText)
    +{
    +  emptyText_ = emptyText;
    +}
    +
    +const WString& WInPlaceEdit::emptyText()
    +{
    +  return emptyText_;
    +}
    +
    +void WInPlaceEdit::save()
    +{
    +  edit_->hide();
    +  text_->show();
    +
    +  if (edit_->text() != WString::Empty)
    +    text_->setText(edit_->text());
    +  else
    +    text_->setText(emptyText_);
    +
    +  edit_->enable();
    +
    +  valueChanged().emit(edit_->text());
    +}
    +
    +void WInPlaceEdit::cancel()
    +{
    +  edit_->setText(text_->text());
    +}
    +
    +void WInPlaceEdit::setButtonsEnabled(bool enabled)
    +{
    +  if (c1_.connected())
    +    c1_.disconnect();
    +  if (c2_.connected())
    +    c2_.disconnect();
    +
    +  if (enabled) {
    +    save_ = new WPushButton(tr("Wt.WInPlaceEdit.Save"), impl_);
    +    cancel_ = new WPushButton(tr("Wt.WInPlaceEdit.Cancel"), impl_);
    +    save_->hide();
    +    cancel_->hide();
    +
    +    text_->clicked().connect(save_,   &WWidget::show);
    +    text_->clicked().connect(cancel_, &WWidget::show);
    +
    +    edit_->enterPressed() .connect(save_,   &WWidget::hide);
    +    edit_->enterPressed() .connect(cancel_, &WWidget::hide);
    +    edit_->escapePressed().connect(save_,   &WWidget::hide);
    +    edit_->escapePressed().connect(cancel_, &WWidget::hide);
    +
    +    save_->clicked().connect(save_,   &WWidget::hide);
    +    save_->clicked().connect(cancel_, &WWidget::hide);
    +    save_->clicked().connect(edit_,   &WFormWidget::disable);
    +    save_->clicked().connect(this,    &WInPlaceEdit::save);
    +    
    +    cancel_->clicked().connect(save_,   &WWidget::hide);
    +    cancel_->clicked().connect(cancel_, &WWidget::hide);
    +    cancel_->clicked().connect(edit_,   &WWidget::hide);
    +    cancel_->clicked().connect(text_,   &WWidget::show);
    +    cancel_->clicked().connect(this,    &WInPlaceEdit::cancel);
    +
    +  } else {
    +    delete save_;
    +    save_ = 0;
    +    delete cancel_;
    +    cancel_ = 0;
    +    c1_ = edit_->blurred().connect(edit_, &WFormWidget::disable);
    +    c2_ = edit_->blurred().connect(this,  &WInPlaceEdit::save);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WIntValidator b/wt-3.1.7a/src/Wt/WIntValidator
    new file mode 100644
    index 0000000..65094ab
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WIntValidator
    @@ -0,0 +1,142 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WINTVALIDATOR_H_
    +#define WINTVALIDATOR_H_
    +
    +#include <limits>
    +
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +/*! \class WIntValidator Wt/WIntValidator Wt/WIntValidator
    + *  \brief A validator that validates integer user input.
    + *
    + * This validator checks whether user input is an integer number in a
    + * pre-defined range.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
    + * Wt::WIntValidator *validator = new Wt::WIntValidator(0, 100);
    + * lineEdit->setValidator(validator);
    + * lineEdit->setText("50");
    + * \endcode
    + * \endif
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WIntValidator.NotAnInteger: Must be an integer number
    + * - Wt.WIntValidator.TooSmall: The number must be larger than {1}
    + * - Wt.WIntValidator.BadRange: The number must be in the range {1} to {2}
    + * - Wt.WIntValidator.TooLarge: The number must be smaller than {1}
    + */
    +class WT_API WIntValidator : public WValidator
    +{
    +public:
    +  /*! \brief Creates a new integer validator that accepts any integer.
    +   */
    +  WIntValidator(WObject *parent = 0);
    +
    +  /*! \brief Creates a new integer validator that accepts integer input
    +   *         within the given range.
    +   */
    +  WIntValidator(int minimum, int maximum, WObject *parent = 0);
    +
    +  /*! \brief Returns the bottom of the valid integer range.
    +   */
    +  int bottom() const { return bottom_; }
    +
    +  /*! \brief Sets the bottom of the valid integer range.
    +   *
    +   * The default value is the minimum integer value.
    +   */
    +  void setBottom(int bottom);
    +
    +  /*! \brief Returns the top of the valid integer range.
    +   */
    +  int top() const { return top_; }
    +
    +  /*! \brief Sets the top of the valid integer range.
    +   *
    +   * The default value is the maximum integer value.
    +   */
    +  void setTop(int top);
    +
    +  /*! \brief Sets the range of valid integers.
    +   */
    +  virtual void setRange(int bottom, int top);
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * The input is considered valid only when it is blank for a non-mandatory
    +   * field, or represents an integer within the valid range.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +  /*! \brief Sets the message to display when the input is not a number.
    +   *
    +   * The default value is "Must be an integer number."
    +   */
    +  void setInvalidNotANumberText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input is not a number.
    +   *
    +   * \sa setInvalidNotANumberText(const WString&)
    +   */
    +  WString invalidNotANumberText() const;
    +
    +  /*! \brief Sets the message to display when the number is too small
    +   *
    +   * Depending on whether bottom() and top() are real bounds, the
    +   * default message is "The number must be between {1} and {2}" or
    +   * "The number must be larger than {1}".
    +   */
    +  void setInvalidTooSmallText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the number is too small.
    +   *
    +   * \sa setInvalidTooSmallText(const WString&)
    +   */
    +  WString invalidTooSmallText() const;
    +
    +  /*! \brief Sets the message to display when the number is too large
    +   *
    +   * Depending on whether bottom() and top() are real bounds, the
    +   * default message is "The number must be between {1} and {2}" or
    +   * "The number must be smaller than {2}".
    +   */
    +  void setInvalidTooLargeText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the number is too large.
    +   *
    +   * \sa setInvalidTooLargeText(const WString&)
    +   */
    +  WString invalidTooLargeText() const;
    +
    +protected:
    +  std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +  std::string inputFilter() const;
    +
    +private:
    +  int bottom_;
    +  int top_;
    +
    +  WString tooSmallText_;
    +  WString tooLargeText_;
    +  WString nanText_;
    +};
    +
    +}
    +
    +#endif // WINTVALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WIntValidator.C b/wt-3.1.7a/src/Wt/WIntValidator.C
    new file mode 100644
    index 0000000..8106de7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WIntValidator.C
    @@ -0,0 +1,186 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WIntValidator"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WIntValidator::WIntValidator(WObject *parent)
    +  : WValidator(parent),
    +    bottom_(std::numeric_limits<int>::min()),
    +    top_(std::numeric_limits<int>::max())
    +{ }
    +
    +WIntValidator::WIntValidator(int bottom, int top, WObject *parent)
    +  : WValidator(parent),
    +    bottom_(bottom),
    +    top_(top)
    +{ }
    +
    +void WIntValidator::setBottom(int bottom)
    +{
    +  if (bottom != bottom_) {
    +    bottom_ = bottom;
    +    repaint();
    +  }
    +}
    +
    +void WIntValidator::setTop(int top)
    +{
    +  if (top != top_) {
    +    top_ = top;
    +    repaint();
    +  }
    +}
    +
    +void WIntValidator::setRange(int bottom, int top)
    +{
    +  setBottom(bottom);
    +  setTop(top);
    +}
    +
    +void WIntValidator::setInvalidNotANumberText(const WString& text)
    +{
    +  nanText_ = text;
    +  repaint();
    +}
    +
    +WString WIntValidator::invalidNotANumberText() const
    +{
    +  if (!nanText_.empty())
    +    return nanText_;
    +  else
    +    return WString::tr("Wt.WIntValidator.NotAnInteger");
    +}
    +
    +void WIntValidator::setInvalidTooSmallText(const WString& text)
    +{
    +  tooSmallText_ = text;
    +  repaint();
    +}
    +
    +WString WIntValidator::invalidTooSmallText() const
    +{
    +  if (!tooSmallText_.empty()) {
    +    WString s = tooSmallText_;
    +    s.arg(bottom_).arg(top_);
    +    return s;
    +  } else
    +    if (bottom_ == std::numeric_limits<int>::min())
    +      return WString();
    +    else
    +      if (top_ == std::numeric_limits<int>::max())
    +	return WString::tr("Wt.WIntValidator.TooSmall").arg(bottom_);
    +      else
    +	return WString::tr("Wt.WIntValidator.BadRange").arg(bottom_).arg(top_);
    +}
    +
    +void WIntValidator::setInvalidTooLargeText(const WString& text)
    +{
    +  tooLargeText_ = text;
    +  repaint();
    +}
    +
    +WString WIntValidator::invalidTooLargeText() const
    +{
    +  if (!tooLargeText_.empty()) {
    +    WString s = tooLargeText_;
    +    s.arg(bottom_).arg(top_);
    +    return s;
    +  } else
    +    if (top_ == std::numeric_limits<int>::max())
    +      return WString();
    +    else
    +      if (bottom_ == std::numeric_limits<int>::min())
    +	return WString::tr("Wt.WIntValidator.TooLarge").arg(top_);
    +      else
    +	return WString::tr("Wt.WIntValidator.BadRange").arg(bottom_).arg(top_);
    +}
    +
    +WValidator::State WIntValidator::validate(WT_USTRING& input) const
    +{
    +  std::string text = input.toUTF8();
    +
    +  if (isMandatory()) {
    +    if (text.empty())
    +      return InvalidEmpty;
    +  } else {
    +    if (text.empty())
    +      return Valid;
    +  }
    +
    +  try {
    +    int i = boost::lexical_cast<int>(text);
    +
    +    if ((i >= bottom_) && (i <= top_))
    +      return Valid;
    +    else
    +      return Invalid;
    +  } catch (boost::bad_lexical_cast& e) {
    +    return Invalid;
    +  }
    +}
    +
    +std::string WIntValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  std::string js = "function(e,te,tn,ts,tb){if(e.value.length==0)";
    +
    +  if (isMandatory())
    +    js += "return {valid:false,message:te};";
    +  else
    +    js += "return {valid:true};";
    +
    +  js += "var n=Number(e.value);"
    +    "if (isNaN(n)||(Math.round(n) != n)) return {valid:false,message:tn};";
    +
    +  if (bottom_ != std::numeric_limits<int>::min())
    +    js += "if(n<" + boost::lexical_cast<std::string>(bottom_)
    +      + ") return {valid:false,message:ts};";
    +  if (top_ != std::numeric_limits<int>::max())
    +    js += "if(n>" + boost::lexical_cast<std::string>(top_)
    +      + ") return {valid:false,message:tb};";
    +
    +  js += "return {valid:true};}(" + jsRef + ','
    +    + invalidBlankText().jsStringLiteral() + ','
    +    + invalidNotANumberText().jsStringLiteral() + ','
    +    + invalidTooSmallText().jsStringLiteral() + ','
    +    + invalidTooLargeText().jsStringLiteral() + ')';
    +
    +  return js;
    +}
    +
    +std::string WIntValidator::inputFilter() const
    +{
    +  return "[-+0-9]";
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WIntValidator::createExtConfig(std::ostream& config) const
    +{
    +  config << ",allowDecimals:false";
    +
    +  if (bottom_ >= 0)
    +    config << ",allowNegative:false";
    +  if (bottom_ != std::numeric_limits<int>::min())
    +    config << ",minValue:" << bottom_;
    +  if (top_ != std::numeric_limits<int>::max())
    +    config << ",maxValue:" << top_;
    +
    +  if (!tooSmallText_.empty())
    +    config << ",minText:" << tooSmallText_.jsStringLiteral();
    +  if (!tooLargeText_.empty())
    +    config << ",maxText:" << tooLargeText_.jsStringLiteral();
    +  if (!nanText_.empty())
    +    config << ",nanText:" << nanText_.jsStringLiteral();
    +
    +  WValidator::createExtConfig(config);
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WInteractWidget b/wt-3.1.7a/src/Wt/WInteractWidget
    new file mode 100644
    index 0000000..af902be
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WInteractWidget
    @@ -0,0 +1,356 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WINTERACT_WIDGET_H_
    +#define WINTERACT_WIDGET_H_
    +
    +#include <Wt/WWebWidget>
    +#include <Wt/WEvent>
    +
    +namespace Wt {
    +
    +class JSlot;
    +
    +/*! \class WInteractWidget Wt/WInteractWidget Wt/WInteractWidget
    + *  \brief An abstract widget that can receive user-interface interaction
    + *
    + * This abstract widget provides access to event signals that
    + * correspond to user-interface interaction through mouse or keyboard.
    + *
    + * When JavaScript is disabled, only the clicked() event will
    + * propagate (but without event details information).
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + */
    +class WT_API WInteractWidget : public WWebWidget
    +{
    +public:
    +  /*! \brief Create an InteractWidget with optional parent.
    +   */
    +  WInteractWidget(WContainerWidget *parent = 0);
    +
    +  ~WInteractWidget();
    +
    +  /*! \brief Event signal emitted when a keyboard key is pushed down.
    +   *
    +   * The keyWentDown signal is the first signal emitted when a key is
    +   * pressed (before the keyPressed signal). Unlike keyPressed()
    +   * however it is also emitted for modifier keys (such as "shift",
    +   * "control", ...) or keyboard navigation keys that do not have a
    +   * corresponding character.
    +   *
    +   * Form widgets (like WLineEdit) will receive key events when
    +   * focussed. Other widgets will receive key events when they contain
    +   * (directly or indirectly) a form widget that has focus.
    +   *
    +   * To capture a key down event when no element has focus, see
    +   * WApplication::globalKeyWentDown()
    +   *
    +   * \sa keyPressed(), keyWentUp()
    +   */
    +  EventSignal<WKeyEvent>& keyWentDown();
    +
    +  /*! \brief Event signal emitted when a "character" was entered.
    +   *
    +   * The keyPressed signal is emitted when a key is pressed, and a
    +   * character is entered. Unlike keyWentDown(), it is emitted only
    +   * for key presses that result in a character being entered, and
    +   * thus not for modifier keys or keyboard navigation keys.
    +   *
    +   * Form widgets (like WLineEdit) will receive key events when
    +   * focussed. Other widgets will receive key events when they contain
    +   * (directly or indirectly) a form widget that has focus.
    +   *
    +   * To capture a key press when no element has focus, see
    +   * WApplication::globalKeyPressed()
    +   *
    +   * \sa keyWentDown()
    +   */
    +  EventSignal<WKeyEvent>& keyPressed();
    +    
    +  /*! \brief Event signal emitted when a keyboard key is released.
    +   *
    +   * This is the counter-part of the keyWentDown() event. Every
    +   * key-down has its corresponding key-up.
    +   *
    +   * Form widgets (like WLineEdit) will receive key events when
    +   * focussed. Other widgets will receive key events when they contain
    +   * (directly or indirectly) a form widget that has focus.
    +   *
    +   * To capture a key up event when no element has focus, see
    +   * WApplication::globalKeyWentUp()
    +   *
    +   * \sa keyWentDown()
    +   */
    +  EventSignal<WKeyEvent>& keyWentUp();
    +
    +  /*! \brief Event signal emitted when enter was pressed.
    +   *
    +   * This signal is emitted when the Enter or Return key was pressed.
    +   *
    +   * Form widgets (like WLineEdit) will receive key events when
    +   * focussed. Other widgets will receive key events when they contain
    +   * (directly or indirectly) a form widget that has focus.
    +   *
    +   * To capture an enter press when no element has focus, see
    +   * WApplication::globalEnterPressed()
    +   *
    +   * \sa keyPressed(), Key_Enter
    +   */
    +  EventSignal<>& enterPressed();
    +
    +  /*! \brief Event signal emitted when escape was pressed.
    +   *
    +   * This signal is emitted when the Escape key was pressed.
    +   *
    +   * Form widgets (like WLineEdit) will receive key events when
    +   * focussed. Other widgets will receive key events when they contain
    +   * (directly or indirectly) a form widget that has focus.
    +   *
    +   * To capture an escape press when no element has focus, see
    +   * WApplication::globalEscapePressed()
    +   *
    +   * \sa keyPressed(), Key_Escape
    +   */
    +  EventSignal<>& escapePressed();
    +
    +  /*! \brief Event signal emitted when a mouse key was clicked on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the event details contain
    +   * invalid information.
    +   */
    +  EventSignal<WMouseEvent>& clicked();
    +
    +  /*! \brief Event signal emitted when a mouse key was double clicked
    +   *         on this widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& doubleClicked();
    +
    +  /*! \brief Event signal emitted when a mouse key was pushed down on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentDown();
    +
    +  /*! \brief Event signal emitted when a mouse key was released on this
    +   *         widget.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::button button\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentUp();
    +
    +  /*! \brief Event signal emitted when the mouse went out of this widget.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentOut();
    +    
    +  /*! \brief Event signal emitted when the mouse entered this widget.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWentOver();
    +
    +  /*! \brief Event signal emitted when the mouse moved over this widget.
    +   *
    +   * The mouse event contains information on the button(s) currently
    +   * pressed. If multiple buttons are currently pressed, only the
    +   * button with smallest enum value is returned.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseMoved();
    +
    +  /*! \brief Event signal emitted when the mouse is dragged over this widget.
    +   *
    +   * The mouse event contains information on the button(s) currently
    +   * pressed. If multiple buttons are currently pressed, only the
    +   * button with smallest enum value is returned.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseDragged();
    +
    +  /*! \brief Event signal emitted when the mouse scroll wheel was used.
    +   *
    +   * The event details contains information such as the \link
    +   * WMouseEvent::wheelDelta() wheel delta\endlink, optional \link
    +   * WMouseEvent::modifiers() keyboard modifiers\endlink, and mouse
    +   * coordinates relative to the \link WMouseEvent::widget()
    +   * widget\endlink, the window \link WMouseEvent::window()
    +   * window\endlink, or the \link WMouseEvent::document()
    +   * document\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WMouseEvent>& mouseWheel();
    +
    +  /*! \brief Event signal emitted when a finger is placed on the screen.
    +   *
    +   * The event details contains information such as the \link
    +   * WTouchEvent::touches() touches\endlink, \link WTouchEvent::targetTouches()
    +   * target touches\endlink and \link WTouchEvent::changedTouches() changed
    +   * touches\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WTouchEvent>& touchStarted();
    +  
    +  /*! \brief Event signal emitted when a finger is removed from the screen.
    +   *
    +   * The event details contains information such as the \link
    +   * WTouchEvent::touches() touches\endlink, \link WTouchEvent::targetTouches()
    +   * target touches\endlink and \link WTouchEvent::changedTouches() changed
    +   * touches\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WTouchEvent>& touchEnded();
    +
    +  /*! \brief Event signal emitted when a finger, which is already placed on the
    +   *         screen, is moved across the screen.
    +   *
    +   * The event details contains information such as the \link
    +   * WTouchEvent::touches() touches\endlink, \link WTouchEvent::targetTouches()
    +   * target touches\endlink and \link WTouchEvent::changedTouches() changed
    +   * touches\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WTouchEvent>& touchMoved();
    +  
    +  /*! \brief Event signal emitted when a gesture is started.
    +   *
    +   * The event details contains information about the \link
    +   * WGestureEvent::scale() scale\endlink and the \link 
    +   * WGestureEvent::rotation() rotation\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WGestureEvent>& gestureStarted();
    +
    +  /*! \brief Event signal emitted when a gesture is changed.
    +   *
    +   * The event details contains information about the \link
    +   * WGestureEvent::scale() scale\endlink and the \link 
    +   * WGestureEvent::rotation() rotation\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WGestureEvent>& gestureChanged();
    +
    +  /*! \brief Event signal emitted when a gesture is ended.
    +   *
    +   * The event details contains information about the \link
    +   * WGestureEvent::scale() scale\endlink and the \link 
    +   * WGestureEvent::rotation() rotation\endlink.
    +   *
    +   * \note When JavaScript is disabled, the signal will never fire.
    +   */
    +  EventSignal<WGestureEvent>& gestureEnded();
    +
    +  /*! \brief Configure dragging for drag and drop.
    +   *
    +   * Enable drag&drop for this widget. The mimeType is used to find a
    +   * suitable drop target, which must accept dropping of this mimetype.
    +   *
    +   * By default, the entire widget is dragged. One may specify another
    +   * widget to be dragged (for example the parent as \p dragWidget) or
    +   * a \p dragWidget whose function is only to represent the drag
    +   * visually (when \p isDragWidgetOnly = \c true).
    +   *
    +   * The widget to be identified as source in the dropEvent may be given
    +   * explicitly, and will default to this widget otherwise.
    +   *
    +   * \note When JavaScript is disabled, drag&drop does not work.
    +   *
    +   * \sa WWidget::dropEvent(), WWidget::acceptDrops(), WDropEvent
    +   */
    +  void setDraggable(const std::string& mimeType, WWidget *dragWidget = 0,
    +		    bool isDragWidgetOnly = false, WObject *sourceWidget = 0);
    +
    +  virtual void load();
    +  virtual bool isEnabled() const;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual void propagateSetEnabled(bool enabled);
    +
    +  void updateEventSignals(DomElement& element, bool all);
    +
    +  JSlot *dragSlot_;
    +
    +protected:
    +  // also used in WAbstractToggleButton
    +  static const char *CLICK_SIGNAL;
    +
    +private:
    +  static const char *KEYDOWN_SIGNAL;
    +  static const char *KEYPRESS_SIGNAL;
    +  static const char *KEYUP_SIGNAL;
    +  static const char *ENTER_PRESS_SIGNAL;
    +  static const char *ESCAPE_PRESS_SIGNAL;
    +  static const char *DBL_CLICK_SIGNAL;
    +  static const char *MOUSE_DOWN_SIGNAL;
    +  static const char *MOUSE_UP_SIGNAL;
    +  static const char *MOUSE_OUT_SIGNAL;
    +  static const char *MOUSE_OVER_SIGNAL;
    +  static const char *MOUSE_MOVE_SIGNAL;
    +  static const char *MOUSE_DRAG_SIGNAL;
    +  static const char *MOUSE_WHEEL_SIGNAL;
    +  static const char *TOUCH_START_SIGNAL;
    +  static const char *TOUCH_MOVE_SIGNAL;
    +  static const char *TOUCH_END_SIGNAL;
    +  static const char *GESTURE_START_SIGNAL;
    +  static const char *GESTURE_CHANGE_SIGNAL;
    +  static const char *GESTURE_END_SIGNAL;
    +
    +  friend class DomElement;
    +  friend class WWebWidget;
    +};
    +
    +}
    +
    +#endif // WINTERACT_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WInteractWidget.C b/wt-3.1.7a/src/Wt/WInteractWidget.C
    new file mode 100644
    index 0000000..2847ce8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WInteractWidget.C
    @@ -0,0 +1,432 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WInteractWidget"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WFormWidget"
    +#include "Wt/WJavaScript"
    +
    +#include "DomElement.h"
    +
    +/*
    + * FIXME: provide a cross-browser mechanism to "cancel" the default
    + * action for a keyboard event (and other events!).
    + *
    + * Note that for key-up/key-down events, you will need to do something with
    + * the key-press event, as per http://unixpapa.com/js/key.html
    + */
    +
    +namespace Wt {
    +
    +const char *WInteractWidget::KEYDOWN_SIGNAL = "M_keydown";
    +const char *WInteractWidget::KEYPRESS_SIGNAL = "keypress";
    +const char *WInteractWidget::KEYUP_SIGNAL = "keyup";
    +const char *WInteractWidget::ENTER_PRESS_SIGNAL = "M_enterpress";
    +const char *WInteractWidget::ESCAPE_PRESS_SIGNAL = "M_escapepress";
    +const char *WInteractWidget::CLICK_SIGNAL = "click";
    +const char *WInteractWidget::DBL_CLICK_SIGNAL = "dblclick";
    +const char *WInteractWidget::MOUSE_DOWN_SIGNAL = "M_mousedown";
    +const char *WInteractWidget::MOUSE_UP_SIGNAL = "M_mouseup";
    +const char *WInteractWidget::MOUSE_OUT_SIGNAL = "mouseout";
    +const char *WInteractWidget::MOUSE_OVER_SIGNAL = "mouseover";
    +const char *WInteractWidget::MOUSE_MOVE_SIGNAL = "M_mousemove";
    +const char *WInteractWidget::MOUSE_DRAG_SIGNAL = "M_mousedrag";
    +const char *WInteractWidget::MOUSE_WHEEL_SIGNAL = "mousewheel";
    +const char *WInteractWidget::TOUCH_START_SIGNAL = "touchstart";
    +const char *WInteractWidget::TOUCH_MOVE_SIGNAL = "touchmove";
    +const char *WInteractWidget::TOUCH_END_SIGNAL = "touchend";
    +const char *WInteractWidget::GESTURE_START_SIGNAL = "gesturestart";
    +const char *WInteractWidget::GESTURE_CHANGE_SIGNAL = "gesturechange";
    +const char *WInteractWidget::GESTURE_END_SIGNAL = "gestureend";
    +
    +WInteractWidget::WInteractWidget(WContainerWidget *parent)
    +  : WWebWidget(parent),
    +    dragSlot_(0)
    +{ }
    +
    +WInteractWidget::~WInteractWidget()
    +{
    +  delete dragSlot_;
    +}
    +
    +EventSignal<WKeyEvent>& WInteractWidget::keyWentDown()
    +{
    +  return *keyEventSignal(KEYDOWN_SIGNAL, true);
    +}
    +
    +EventSignal<WKeyEvent>& WInteractWidget::keyPressed()
    +{
    +  return *keyEventSignal(KEYPRESS_SIGNAL, true);
    +}
    +
    +EventSignal<WKeyEvent>& WInteractWidget::keyWentUp()
    +{
    +  return *keyEventSignal(KEYUP_SIGNAL, true);
    +}
    +
    +EventSignal<>& WInteractWidget::enterPressed()
    +{
    +  return *voidEventSignal(ENTER_PRESS_SIGNAL, true);
    +}
    +
    +EventSignal<>& WInteractWidget::escapePressed()
    +{
    +  return *voidEventSignal(ESCAPE_PRESS_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::clicked()
    +{
    +  return *mouseEventSignal(CLICK_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::doubleClicked()
    +{
    +  return *mouseEventSignal(DBL_CLICK_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseWentDown()
    +{
    +  return *mouseEventSignal(MOUSE_DOWN_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseWentUp()
    +{
    +  return *mouseEventSignal(MOUSE_UP_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseWentOut()
    +{
    +  return *mouseEventSignal(MOUSE_OUT_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseWentOver()
    +{
    +  return *mouseEventSignal(MOUSE_OVER_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseMoved()
    +{
    +  return *mouseEventSignal(MOUSE_MOVE_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseDragged()
    +{
    +  return *mouseEventSignal(MOUSE_DRAG_SIGNAL, true);
    +}
    +
    +EventSignal<WMouseEvent>& WInteractWidget::mouseWheel()
    +{
    +  return *mouseEventSignal(MOUSE_WHEEL_SIGNAL, true);
    +}
    +
    +EventSignal<WTouchEvent>& WInteractWidget::touchStarted()
    +{
    +  return *touchEventSignal(TOUCH_START_SIGNAL, true);
    +}
    +
    +EventSignal<WTouchEvent>& WInteractWidget::touchMoved()
    +{
    +  return *touchEventSignal(TOUCH_MOVE_SIGNAL, true);
    +}
    +
    +EventSignal<WTouchEvent>& WInteractWidget::touchEnded()
    +{
    +  return *touchEventSignal(TOUCH_END_SIGNAL, true);
    +}
    +
    +EventSignal<WGestureEvent>& WInteractWidget::gestureStarted()
    +{
    +  return *gestureEventSignal(GESTURE_START_SIGNAL, true);
    +}
    +
    +EventSignal<WGestureEvent>& WInteractWidget::gestureChanged()
    +{
    +  return *gestureEventSignal(GESTURE_CHANGE_SIGNAL, true);
    +}
    +
    +EventSignal<WGestureEvent>& WInteractWidget::gestureEnded()
    +{
    +  return *gestureEventSignal(GESTURE_END_SIGNAL, true);
    +}
    +
    +void WInteractWidget::updateDom(DomElement& element, bool all)
    +{
    +  bool updateKeyDown = false;
    +
    +  EventSignal<> *enterPress = voidEventSignal(ENTER_PRESS_SIGNAL, false);
    +  EventSignal<> *escapePress = voidEventSignal(ESCAPE_PRESS_SIGNAL, false);
    +  EventSignal<WKeyEvent> *keyDown = keyEventSignal(KEYDOWN_SIGNAL, false);
    +
    +  updateKeyDown = (enterPress && enterPress->needsUpdate(all))
    +    || (escapePress && escapePress->needsUpdate(all))
    +    || (keyDown && keyDown->needsUpdate(all));
    +
    +  if (updateKeyDown) {
    +    std::vector<DomElement::EventAction> actions;
    +
    +    if (enterPress) {
    +      if (enterPress->isConnected()) {
    +	/*
    +	 * prevent enterPressed from triggering a changed event on all
    +	 * browsers except for Opera and IE
    +	 */
    +	std::string extraJS;
    +	const WEnvironment& env = WApplication::instance()->environment();
    +
    +	if (dynamic_cast<WFormWidget *>(this)
    +	    && !env.agentIsOpera() && !env.agentIsIE())
    +	  extraJS = "var g=this.onchange;"
    +	    ""      "this.onchange=function(){this.onchange=g;};";
    +
    +	actions.push_back
    +	  (DomElement::EventAction("(e.keyCode && e.keyCode == 13)",
    +				   enterPress->javaScript() + extraJS,
    +				   enterPress->encodeCmd(),
    +				   enterPress->isExposedSignal()));
    +      }
    +      enterPress->updateOk();
    +    }
    +
    +    if (escapePress) {
    +      if (escapePress->isConnected()) {
    +	actions.push_back
    +	  (DomElement::EventAction("(e.keyCode && e.keyCode == 27)",
    +				   escapePress->javaScript(),
    +				   escapePress->encodeCmd(),
    +				   escapePress->isExposedSignal()));
    +      }
    +      escapePress->updateOk();
    +    }
    +
    +    if (keyDown) {
    +      if (keyDown->isConnected()) {
    +	actions.push_back
    +	  (DomElement::EventAction(std::string(),
    +				   keyDown->javaScript(),
    +				   keyDown->encodeCmd(),
    +				   keyDown->isExposedSignal()));
    +      }
    +      keyDown->updateOk();
    +    }
    +
    +    if (!actions.empty())
    +      element.setEvent("keydown", actions);
    +    else if (!all)
    +      element.setEvent("keydown", std::string(), std::string());
    +  }
    +
    +  EventSignal<WMouseEvent> *mouseDown
    +    = mouseEventSignal(MOUSE_DOWN_SIGNAL, false);
    +  EventSignal<WMouseEvent> *mouseUp
    +    = mouseEventSignal(MOUSE_UP_SIGNAL, false);
    +  EventSignal<WMouseEvent> *mouseMove
    +    = mouseEventSignal(MOUSE_MOVE_SIGNAL, false);
    +  EventSignal<WMouseEvent> *mouseDrag
    +    = mouseEventSignal(MOUSE_DRAG_SIGNAL, false);
    +
    +  bool updateMouseMove
    +    = (mouseMove && mouseMove->needsUpdate(all))
    +    || (mouseDrag && mouseDrag->needsUpdate(all));
    +
    +  bool updateMouseDown
    +    = (mouseDown && mouseDown->needsUpdate(all))
    +    || updateMouseMove;
    +
    +  bool updateMouseUp
    +    = (mouseUp && mouseUp->needsUpdate(all))
    +    || updateMouseMove;
    +
    +  if (updateMouseDown) {
    +    /*
    +     * when we have a mouseUp event, we also need a mouseDown event
    +     * to be able to compute dragDX/Y.
    +     *
    +     * When we have:
    +     *  - a mouseDrag
    +     *  - or a mouseDown + (mouseMove or mouseUp),
    +     * we need to capture everything after on mouse down, and keep track of the
    +     * down button if we have a mouseMove or mouseDrag
    +     */
    +    std::string js;
    +    if (mouseUp && mouseUp->isConnected())
    +      js += WApplication::instance()->javaScriptClass()
    +	+ "._p_.saveDownPos(event);";
    +
    +    if ((mouseDrag && mouseDrag->isConnected())
    +	|| (mouseDown && mouseDown->isConnected()
    +	    && ((mouseUp && mouseUp->isConnected())
    +		|| (mouseMove && mouseMove->isConnected()))))
    +      js += WT_CLASS ".capture(this);";
    +
    +    if ((mouseMove && mouseMove->isConnected())
    +	|| (mouseDrag && mouseDrag->isConnected()))
    +      js += WT_CLASS ".mouseDown(e);";
    +
    +    if (mouseDown) {
    +      js += mouseDown->javaScript();
    +      element.setEvent("mousedown", js,
    +		       mouseDown->encodeCmd(), mouseDown->isExposedSignal());
    +      mouseDown->updateOk();
    +    } else
    +      element.setEvent("mousedown", js, std::string(), false);
    +  }
    +
    +  if (updateMouseUp) {
    +    /*
    +     * when we have a mouseMove or mouseDrag event, we need to keep track
    +     * of unpressing the button.
    +     */
    +    std::string js;
    +    if ((mouseMove && mouseMove->isConnected())
    +	|| (mouseDrag && mouseDrag->isConnected()))
    +      js += WT_CLASS ".mouseUp(e);";
    +      
    +    if (mouseUp) {
    +      js += mouseUp->javaScript();
    +      element.setEvent("mouseup", js,
    +		       mouseUp->encodeCmd(), mouseUp->isExposedSignal());
    +      mouseUp->updateOk();
    +    } else
    +      element.setEvent("mouseup", js, std::string(), false);
    +  }
    +
    +  if (updateMouseMove) {
    +    /*
    +     * We need to mix mouseDrag and mouseMove events.
    +     */
    +    std::vector<DomElement::EventAction> actions;
    +    
    +    if (mouseMove) {
    +      actions.push_back
    +	(DomElement::EventAction(std::string(),
    +				 mouseMove->javaScript(),
    +				 mouseMove->encodeCmd(),
    +				 mouseMove->isExposedSignal()));
    +      mouseMove->updateOk();
    +    }
    +
    +    if (mouseDrag) {
    +      actions.push_back
    +	(DomElement::EventAction(WT_CLASS ".buttons",
    +				 mouseDrag->javaScript(),
    +				 mouseDrag->encodeCmd(),
    +				 mouseDrag->isExposedSignal()));
    +      mouseDrag->updateOk();
    +    }
    +
    +    element.setEvent("mousemove", actions);
    +  }
    +
    +  updateEventSignals(element, all);
    +
    +  WWebWidget::updateDom(element, all);
    +}
    +
    +void WInteractWidget::updateEventSignals(DomElement& element, bool all)
    +{
    +  EventSignalList& other = eventSignals();
    +
    +  for (EventSignalList::iterator i = other.begin(); i != other.end(); ++i) {
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +    EventSignalBase& s = *i;
    +#else
    +    EventSignalBase& s = **i;
    +#endif
    +
    +    if (s.name() == WInteractWidget::CLICK_SIGNAL
    +	&& flags_.test(BIT_REPAINT_TO_AJAX))
    +      element.unwrap();
    +
    +    if ((s.name() != WInteractWidget::CLICK_SIGNAL
    +	 && s.name() != WInteractWidget::DBL_CLICK_SIGNAL)
    +	|| flags_.test(BIT_ENABLED))
    +      updateSignalConnection(element, s, s.name(), all);
    +    else
    +      element.setEvent(s.name(), WT_CLASS ".cancelEvent(event||window.event);");
    +  }
    +}
    +
    +void WInteractWidget::propagateRenderOk(bool deep)
    +{
    +  EventSignalList& other = eventSignals();
    +
    +  for (EventSignalList::iterator i = other.begin(); i != other.end(); ++i) {
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +    EventSignalBase& s = *i;
    +#else
    +    EventSignalBase& s = **i;
    +#endif
    +    s.updateOk();
    +  }
    +
    +  WWebWidget::propagateRenderOk(deep);
    +}
    +
    +void WInteractWidget::load()
    +{
    +  if (!isDisabled()) {
    +    if (parent())
    +      flags_.set(BIT_ENABLED, parent()->isEnabled());
    +    else
    +      flags_.set(BIT_ENABLED, true);
    +  } else
    +    flags_.set(BIT_ENABLED, false);
    +
    +  WWebWidget::load();
    +}
    +
    +bool WInteractWidget::isEnabled() const
    +{
    +  return !isDisabled() && flags_.test(BIT_ENABLED);
    +}
    +
    +void WInteractWidget::propagateSetEnabled(bool enabled)
    +{
    +  flags_.set(BIT_ENABLED, enabled);
    +
    +  EventSignal<WMouseEvent> *s;
    +
    +  s = mouseEventSignal(CLICK_SIGNAL, false);
    +  if (s)
    +    s->senderRepaint();
    +
    +  s = mouseEventSignal(DBL_CLICK_SIGNAL, false);
    +  if (s)
    +    s->senderRepaint();
    +
    +  WWebWidget::propagateSetEnabled(enabled);
    +}
    +
    +void WInteractWidget::setDraggable(const std::string& mimeType,
    +				   WWidget *dragWidget, bool isDragWidgetOnly,
    +				   WObject *sourceObject)
    +{
    +  if (dragWidget == 0)
    +    dragWidget = this;
    +
    +  if (sourceObject == 0)
    +    sourceObject = this;
    +
    +  if (isDragWidgetOnly) {
    +    dragWidget->hide();
    +  }
    +
    +  WApplication *app = WApplication::instance();
    +
    +  setAttributeValue("dmt", mimeType);
    +  setAttributeValue("dwid", dragWidget->id());
    +  setAttributeValue("dsid", app->encodeObject(sourceObject));
    +
    +  if (!dragSlot_) {
    +    dragSlot_ = new JSlot();
    +    dragSlot_->setJavaScript("function(o,e){" + app->javaScriptClass()
    +			     + "._p_.dragStart(o,e);" + "}");
    +  }
    +
    +  mouseWentDown().connect(*dragSlot_);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WItemDelegate b/wt-3.1.7a/src/Wt/WItemDelegate
    new file mode 100644
    index 0000000..93431a2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WItemDelegate
    @@ -0,0 +1,289 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WITEMDELEGATE_H_
    +#define WITEMDELEGATE_H_
    +
    +#include <Wt/WAbstractItemDelegate>
    +#include <Wt/WCheckBox>
    +#include <Wt/WLineEdit>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +  class WAnchor;
    +  class WCheckBox;
    +  class WContainerWidget;
    +  class WImage;
    +  class WLineEdit;
    +  class WText;
    +
    +#ifndef WT_CNOR
    +  template <class Widget> class IndexEdit;
    +  typedef IndexEdit<WCheckBox> IndexCheckBox;
    +#else
    +  class IndexCheckBox;
    +#endif // WT_CNOR
    +
    +/*! \class WItemDelegate Wt/WItemDelegate Wt/WItemDelegate
    + *  \brief Standard delegate class for rendering a view item.
    + *
    + * This class provides the standard implementation for rendering an
    + * item (as in a WAbstractItemView), and renders data provided by the
    + * standard data roles (see ItemDataRole). It also provides default
    + * editing support using a line edit.
    + *
    + * You may provide special editing support for an item by specializing
    + * the widget and reimplement createEditor(), setModelData(),
    + * editState(), and setEditState().
    + *
    + * \ingroup modelview
    + */
    +class WT_API WItemDelegate : public WAbstractItemDelegate
    +{
    +public:
    +  /*! \brief Create an item delegate.
    +   */
    +  WItemDelegate(WObject *parent = 0);
    +
    +  /*! \brief Creates or updates a widget that renders an item.
    +   *
    +   * The following properties of an item are rendered:
    +   *
    +   * - text using the Wt::DisplayRole data, with the format specified
    +   *   by setTextFormat()
    +   * - a check box depending on the Wt::ItemIsUserCheckable flag and
    +   *   Wt::CheckStateRole data
    +   * - an anchor depending on Wt::InternalPathRole or Wt::UrlRole values
    +   * - an icon depending on the value of Wt::DecorationRole
    +   * - a tooltip depending on the value of Wt::ToolTipRole
    +   * - a custom style class depending on the value of Wt::StyleClassRole
    +   *
    +   * When the flags indicates Wt::RenderEditing, then createEditor() is
    +   * called to create a suitable editor for editing the item.
    +   */
    +  virtual WWidget *update(WWidget *widget, const WModelIndex& index,
    +			  WFlags<ViewItemRenderFlag> flags);
    +
    +  virtual void updateModelIndex(WWidget *widget, const WModelIndex& index);
    +
    +  /*! \brief Sets the text format string.
    +   *
    +   * \if cpp
    +   *
    +   * The DisplayRole data is converted to a string using asString() by passing
    +   * the given format.
    +   *
    +   * \elseif java
    +   *
    +   * The DisplayRole data is converted to a string using {javadoclink
    +   * StringUtils#asString(Object)}, passing the given format. If the format is
    +   * an empty string, this corresponds to {javadoclink Object#toString()}.
    +   *
    +   * \endif 
    +   *
    +   * The default value is "".
    +   */
    +  void setTextFormat(const WT_USTRING& format);
    +
    +  /*! \brief Returns the text format string.
    +   *
    +   * \sa setTextFormat()
    +   */
    +  const WT_USTRING& textFormat() const { return textFormat_; }
    +
    +  /*! \brief Saves the edited data to the model.
    +   *
    +   * The default implementation saves the current edit value to the model.
    +   * You will need to reimplement this method for a custom editor.
    +   *
    +   * As an example of how to deal with a specialized editor, consider the
    +   * default implementation:
    +   * \if cpp
    +   * \code
    +   * void WItemDelegate::setModelData(const boost::any& editState,
    +   *                                  Wt::WAbstractItemModel *model,
    +   *                                  const Wt::WModelIndex& index) const
    +   * {
    +   *   model->setData(index, editState, EditRole);
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * public void setModelData(Object editState, WAbstractItemModel model, WModelIndex index) {
    +   *   model.setData(index, editState, ItemDataRole.EditRole);
    +   * }
    +   * \endcode
    +   * \endif
    +   *
    +   * \sa createEditor(), editState()
    +   */
    +  virtual void setModelData(const boost::any& editState,
    +			    WAbstractItemModel *model,
    +			    const WModelIndex& index) const;
    +
    +  /*! \brief Returns the current edit state.
    +   *
    +   * The default implementation returns the current text in the line edit.
    +   * You will need to reimplement this method for a custom editor.
    +   *
    +   * As an example of how to deal with a specialized editor, consider the
    +   * default implementation:
    +   * \if cpp
    +   * \code
    +   * boost::any WItemDelegate::editState(Wt::WWidget *editor) const
    +   * {
    +   *   Wt::WContainerWidget *w = dynamic_cast<Wt::WContainerWidget *>(editor);
    +   *   Wt::WLineEdit *lineEdit = dynamic_cast<Wt::WLineEdit *>(w->widget(0));
    +   *
    +   *   return boost::any(lineEdit->text());
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * public Object getEditState(WWidget editor) {
    +   *   WContainerWidget w = (WContainerWidget) editor;
    +   *   WLineEdit lineEdit = (WLineEdit) w.getWidget(0);
    +   *   return lineEdit.getText();
    +   * }
    +   * \endcode
    +   * \endif
    +   *
    +   * \sa createEditor(), setEditState(), setModelData()
    +   */
    +  virtual boost::any editState(WWidget *editor) const;
    +
    +  /*! \brief Sets the editor data from the editor state.
    +   *
    +   * The default implementation resets the text in the line edit.
    +   * You will need to reimplement this method if for a custom editor.
    +   *
    +   * As an example of how to deal with a specialized editor, consider the
    +   * default implementation:
    +   * \if cpp
    +   * \code
    +   * void WItemDelegate::setEditState(Wt::WWidget *editor, const boost::any& value) const
    +   * {
    +   *   Wt::WContainerWidget *w = dynamic_cast<Wt::WContainerWidget *>(editor);
    +   *   Wt::WLineEdit *lineEdit = dynamic_cast<Wt::WLineEdit *>(w->widget(0));
    +   *
    +   *   lineEdit->setText(boost::any_cast<Wt::WString>(value));
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * public void setEditState(WWidget editor, Object value) {
    +   *   WContainerWidget w = (WContainerWidget) editor;
    +   *   WLineEdit lineEdit = (WLineEdit) w.getWidget(0);
    +   *   lineEdit.setText((String) value);
    +   * }
    +   * \endcode
    +   * \endif
    +   *
    +   * \sa createEditor()
    +   */
    +  virtual void setEditState(WWidget *editor, const boost::any& value) const;
    +
    +protected:
    +  /*! \brief Creates an editor for a data item.
    +   *
    +   * The default implementation returns a WLineEdit which edits the
    +   * item's Wt::EditRole value.
    +   *
    +   * You may reimplement this method to provide a suitable editor, or
    +   * to attach a custom validator. In that case, you will probably
    +   * also want to reimplement editState(), setEditState(), and
    +   * setModelData().
    +   *
    +   * The editor should not keep a reference to the model index (it
    +   * does not need to since setModelData() will provide the proper
    +   * model index to save the data to the model). Otherwise, because
    +   * model indexes may shift because of row or column insertions, you
    +   * should reimplement updateModelIndex().
    +   *
    +   * As an example of how to provide a specialized editor, consider the
    +   * default implementation, which returns a WLineEdit:
    +   * \if cpp
    +   * \code
    +   * Wt::WWidget *WItemDelegate::createEditor(const Wt::WModelIndex& index, WFlags<ViewItemRenderFlag> flags) const
    +   * {
    +   *   Wt::WContainerWidget *result = new Wt::WContainerWidget();
    +   *   result->setSelectable(true);
    +   *
    +   *   Wt::WLineEdit *lineEdit = new Wt::WLineEdit();
    +   *   lineEdit->setText(asString(index.data(EditRole), textFormat_));
    +   *   lineEdit->enterPressed().connect(boost::bind(&WItemDelegate::doCloseEditor, this, result, true));
    +   *   lineEdit->escapePressed().connect(boost::bind(&WItemDelegate::doCloseEditor, this, result, false));
    +   *
    +   *   if (flags & RenderFocused)
    +   *     lineEdit->setFocus();
    +   *
    +   *   // We use a layout so that the line edit fills the entire cell.
    +   *   result->setLayout(new WHBoxLayout());
    +   *   result->layout()->setContentsMargins(1, 1, 1, 1);
    +   *   result->layout()->addWidget(lineEdit);
    +   *
    +   *   return result;
    +   * }
    +   *
    +   * void WItemDelegate::doCloseEditor(Wt::WWidget *editor, bool save) const
    +   * {
    +   *   closeEditor().emit(editor, save);
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * protected WWidget createEditor(WModelIndex index, EnumSet&lt;ViewItemRenderFlag&gt; flags) {
    +   *  final WContainerWidget result = new WContainerWidget();
    +   *  result.setSelectable(true);
    +   *  WLineEdit lineEdit = new WLineEdit();
    +   *  lineEdit.setText(StringUtils.asString(index.getData(ItemDataRole.EditRole), this.textFormat_).toString());
    +   *  lineEdit.enterPressed().addListener(this, new Signal.Listener() {
    +   *    public void trigger() {
    +   *      WItemDelegate.this.closeEditor().trigger(result, true);
    +   *    }
    +   *  });
    +   *  lineEdit.escapePressed().addListener(this, new Signal.Listener() {
    +   *    public void trigger() {
    +   *      WItemDelegate.this.closeEditor().trigger(result, false);
    +   *    }
    +   *  });
    +   *
    +   *  if (flags.contains(ViewItemRenderFlag.RenderFocused))
    +   *    lineEdit.setFocus();
    +   *
    +   *  result.setLayout(new WHBoxLayout());
    +   *  result.getLayout().setContentsMargins(1, 1, 1, 1);
    +   *  result.getLayout().addWidget(lineEdit);
    +   *  return result;
    +   * }
    +   * \endcode
    +   * \endif
    +   */
    +  virtual WWidget *createEditor(const WModelIndex& index,
    +				WFlags<ViewItemRenderFlag> flags) const;
    +
    +private:
    +  WT_USTRING textFormat_;
    +
    +  struct WidgetRef {
    +    WWidget *w;
    +    WidgetRef(WWidget *widget) : w(widget) { }
    +  };
    +
    +  IndexCheckBox *checkBox(WidgetRef& w, const WModelIndex& index,
    +			 bool autoCreate, bool triState = false);
    +
    +  WText *textWidget(WidgetRef& w);
    +  WImage *iconWidget(WidgetRef& w, bool autoCreate = false);
    +  WAnchor *anchorWidget(WidgetRef& w);
    +
    +  void onCheckedChange(IndexCheckBox *checkBox) const;
    +  void doCloseEditor(WWidget *editor, bool save) const;
    +};
    +
    +}
    +
    +#endif // WITEMDELEGATE_H_
    diff --git a/wt-3.1.7a/src/Wt/WItemDelegate.C b/wt-3.1.7a/src/Wt/WItemDelegate.C
    new file mode 100644
    index 0000000..a293940
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WItemDelegate.C
    @@ -0,0 +1,380 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WItemDelegate"
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WAnchor"
    +#include "Wt/WApplication"
    +#include "Wt/WCheckBox"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WModelIndex"
    +#include "Wt/WHBoxLayout"
    +#include "Wt/WText"
    +
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +template <class Widget>
    +class IndexEdit : public Widget
    +{
    +public:
    +  IndexEdit(const WModelIndex& index)
    +    : index_(index)
    +  { }
    +
    +  void setIndex(const WModelIndex& index) {
    +    index_ = index;
    +  }
    +
    +  const WModelIndex& index() const {
    +    return index_;
    +  }
    +
    +private:
    +  WModelIndex index_;
    +};
    +
    +#ifdef WT_CNOR
    +class IndexCheckBox : public IndexEdit<WCheckBox>
    +{
    +public:
    +  IndexCheckBox(const WModelIndex& index);
    +
    +  void setIndex(const WModelIndex& index);
    +  const WModelIndex& index();
    +};
    +#endif // WT_CNOR
    +
    +WItemDelegate::WItemDelegate(WObject *parent)
    +  : WAbstractItemDelegate(parent)
    +{ }
    +
    +void WItemDelegate::setTextFormat(const WT_USTRING& format)
    +{
    +  textFormat_ = format;
    +}
    +
    +WWidget *WItemDelegate::update(WWidget *widget, const WModelIndex& index,
    +			       WFlags<ViewItemRenderFlag> flags)
    +{
    +  bool editing = widget && widget->find("t") == 0;
    +
    +  if (flags & RenderEditing) {
    +    if (!editing) {
    +      delete widget;
    +      widget = createEditor(index, flags);
    +      WInteractWidget *iw = dynamic_cast<WInteractWidget *>(widget);
    +      if (iw) {
    +	// Disable drag & drop and selection behaviour
    +	iw->mouseWentDown().preventPropagation();
    +	iw->clicked().preventPropagation();
    +      }
    +    }
    +  } else {
    +    if (editing) {
    +      delete widget;
    +      widget = 0;
    +    }
    +  }
    +
    +  WidgetRef widgetRef(widget);
    +
    +  bool isNew = false;
    +
    +  if (!(flags & RenderEditing)) {
    +    if (!widgetRef.w) {
    +      isNew = true;
    +      WText *t = new WText();
    +      t->setObjectName("t");
    +      if (index.isValid() && !(index.flags() & ItemIsXHTMLText))
    +	t->setTextFormat(PlainText);
    +      t->setWordWrap(true);
    +      widgetRef.w = t;
    +    }
    +
    +    if (!index.isValid())
    +      return widgetRef.w;
    +
    +    bool haveCheckBox = false;
    +
    +    if (index.flags() & ItemIsUserCheckable) {
    +      boost::any checkedData = index.data(CheckStateRole);
    +      CheckState state = checkedData.empty() ? Unchecked
    +	: (checkedData.type() == typeid(bool) ?
    +	   (boost::any_cast<bool>(checkedData) ? Checked : Unchecked)
    +	   : (checkedData.type() == typeid(CheckState) ?
    +	      boost::any_cast<CheckState>(checkedData) : Unchecked));
    +      checkBox(widgetRef, index, true, index.flags() & ItemIsTristate)
    +	->setCheckState(state);
    +      haveCheckBox = true;
    +    } else if (!isNew)
    +      delete checkBox(widgetRef, index, false);
    +
    +    std::string internalPath = asString(index.data(InternalPathRole)).toUTF8();
    +    std::string url = asString(index.data(UrlRole)).toUTF8();
    +
    +    if (!internalPath.empty() || !url.empty()) {
    +      WAnchor *a = anchorWidget(widgetRef);
    +
    +      if (!internalPath.empty())
    +	a->setRefInternalPath(internalPath);
    +      else
    +	a->setRef(url);
    +    }
    +
    +    WText *t = textWidget(widgetRef);
    +
    +    WString label = asString(index.data(), textFormat_);
    +    if (label.empty() && haveCheckBox)
    +      label = WString::fromUTF8(" ");
    +    t->setText(label);
    +
    +    std::string iconUrl = asString(index.data(DecorationRole)).toUTF8();
    +    if (!iconUrl.empty()) {
    +      iconWidget(widgetRef, true)->setImageRef(iconUrl);
    +    } else if (!isNew)
    +      delete iconWidget(widgetRef, false);
    +  }
    +
    +  WString tooltip = asString(index.data(ToolTipRole));
    +  if (!tooltip.empty() || !isNew)
    +    widgetRef.w->setToolTip(tooltip);
    +
    +  WT_USTRING sc = asString(index.data(StyleClassRole));
    +
    +  if (flags & RenderSelected)
    +    sc += WT_USTRING::fromUTF8(" Wt-selected");
    +
    +  if (flags & RenderEditing)
    +    sc += WT_USTRING::fromUTF8(" Wt-delegate-edit");
    +
    +  widgetRef.w->setStyleClass(sc);
    +
    +  if (index.flags() & ItemIsDropEnabled)
    +    widgetRef.w->setAttributeValue("drop", WString::fromUTF8("true"));
    +  else
    +    if (!widgetRef.w->attributeValue("drop").empty())
    +      widgetRef.w->setAttributeValue("drop", WString::fromUTF8("f"));
    +
    +  return widgetRef.w;
    +}
    +
    +/*
    + * Possible layouts:
    + *  1) WText "t"
    + * or
    + *  2) WContainerWidget "o" ([WCheckbox "c"] [WImage "i"] [inv] WText "t")
    + * or
    + *  3) WAnchor "a" ([WImage "i"] [inv] WText "t")
    + * or
    + *  4) WContainerWidget "o" ([WCheckbox "c"] WAnchor "a" ([Image "i"] [inv] WText "t"))
    + */
    +
    +IndexCheckBox *WItemDelegate::checkBox(WidgetRef& w, const WModelIndex& index,
    +				      bool autoCreate, bool triState)
    +{
    +  IndexCheckBox *checkBox = dynamic_cast<IndexCheckBox *>(w.w->find("c"));
    +
    +  if (!checkBox) {
    +    if (autoCreate) {
    +      IndexCheckBox * const result = checkBox = new IndexCheckBox(index);
    +
    +      checkBox->setObjectName("c");
    +
    +      WContainerWidget *wc = dynamic_cast<WContainerWidget *>(w.w->find("o"));
    +      if (!wc) {
    +	wc = new WContainerWidget();
    +	wc->setObjectName("o");
    +	w.w->setInline(true);
    +	w.w->setStyleClass(WString::Empty);
    +
    +	/* We first remove to avoid reparenting warnings */
    +	WContainerWidget *p = dynamic_cast<WContainerWidget *>(w.w->parent());
    +	if (p)
    +	  p->removeWidget(w.w);
    +
    +	wc->addWidget(w.w);
    +	w.w = wc;
    +      }
    +      
    +      wc->insertWidget(0, checkBox);
    +      checkBox->changed().connect
    +	(boost::bind(&WItemDelegate::onCheckedChange, this, result));
    +    } else
    +      return 0;
    +  }
    +
    +  checkBox->setTristate(triState);
    +
    +  return checkBox;
    +}
    +
    +WText *WItemDelegate::textWidget(WidgetRef& w)
    +{
    +  return dynamic_cast<WText *>(w.w->find("t"));
    +}
    +
    +WImage *WItemDelegate::iconWidget(WidgetRef& w, bool autoCreate)
    +{
    +  WImage *image = dynamic_cast<WImage *>(w.w->find("i"));
    +  if (image || !autoCreate)
    +    return image;
    +
    +  WContainerWidget *wc = dynamic_cast<WContainerWidget *>(w.w->find("a"));
    +      
    +  if (!wc)
    +    wc = dynamic_cast<WContainerWidget *>(w.w->find("o"));
    +
    +  if (!wc) {
    +    wc = new WContainerWidget();
    +    wc->setObjectName("o");
    +    wc->addWidget(w.w);
    +    w.w = wc;
    +  }
    +
    +  image = new WImage();
    +  image->setObjectName("i");
    +  image->setStyleClass("icon");
    +  wc->insertWidget(wc->count() - 1, image);
    +
    +  // IE does not want to center vertically without this:
    +  if (wApp->environment().agentIsIE()) {
    +    WImage *inv = new WImage(wApp->onePixelGifUrl());
    +    inv->setStyleClass("rh w0 icon");
    +    inv->resize(0, WLength::Auto);
    +    wc->insertWidget(wc->count() -1, inv);
    +  }
    +
    +  return image;
    +}
    +
    +WAnchor *WItemDelegate::anchorWidget(WidgetRef& w)
    +{
    +  WAnchor *anchor = dynamic_cast<WAnchor *>(w.w->find("a"));
    +  if (anchor)
    +    return anchor;
    +
    +  anchor = new WAnchor();
    +  anchor->setObjectName("a");
    +
    +  WContainerWidget *wc = dynamic_cast<WContainerWidget *>(w.w->find("o"));
    +  if (wc) {
    +    /*
    +     * Convert (2) -> (4)
    +     */
    +    int firstToMove = 0;
    +
    +    WCheckBox *cb = dynamic_cast<WCheckBox *>(wc->widget(0));
    +    if (cb)
    +      firstToMove = 1;
    +
    +    wc->insertWidget(firstToMove, anchor);
    +
    +    while (wc->count() > firstToMove + 1) { 
    +      WWidget *c = wc->widget(firstToMove + 1);
    +      wc->removeWidget(c);
    +      anchor->addWidget(c);
    +    }
    +  } else {
    +    /*
    +     * Convert (1) -> (3)
    +     */
    +    anchor->addWidget(w.w);
    +    w.w = anchor;
    +  }
    +
    +  return anchor;
    +}
    +
    +void WItemDelegate::updateModelIndex(WWidget *widget, const WModelIndex& index)
    +{
    +  WidgetRef w(widget);
    +
    +  if (index.flags() & ItemIsUserCheckable) {
    +    IndexCheckBox *cb = checkBox(w, index, false, false);
    +    if (cb)
    +      cb->setIndex(index);
    +  }
    +}
    +
    +void WItemDelegate::onCheckedChange(IndexCheckBox *cb) const
    +{
    +  WAbstractItemModel *model
    +    = const_cast<WAbstractItemModel *>(cb->index().model());
    +
    +  if (cb->isTristate())
    +    model->setData(cb->index(), boost::any(cb->checkState()), CheckStateRole);
    +  else
    +    model->setData(cb->index(), boost::any(cb->isChecked()), CheckStateRole);
    +}
    +
    +WWidget *WItemDelegate::createEditor(const WModelIndex& index,
    +				     WFlags<ViewItemRenderFlag> flags) const
    +{
    +  WContainerWidget *const result = new WContainerWidget();
    +  result->setSelectable(true);
    +
    +  WLineEdit *lineEdit = new WLineEdit();
    +  lineEdit->setText(asString(index.data(EditRole), textFormat_));
    +  lineEdit->enterPressed().connect
    +    (boost::bind(&WItemDelegate::doCloseEditor, this, result, true));
    +  lineEdit->escapePressed().connect
    +    (boost::bind(&WItemDelegate::doCloseEditor, this, result, false));
    +  lineEdit->escapePressed().preventPropagation();
    +
    +  if (flags & RenderFocused)
    +    lineEdit->setFocus();
    +
    +  // We use a layout so that the line edit fills the entire cell.
    +  // Somehow, this does not work with konqueror, but it does respond
    +  // properly to width, height being set to 100% !
    +  WApplication *app = WApplication::instance();
    +  if (app->environment().agent() != WEnvironment::Konqueror) {
    +    result->setLayout(new WHBoxLayout());
    +    result->layout()->setContentsMargins(1, 1, 1, 1);
    +    result->layout()->addWidget(lineEdit);
    +  } else {
    +    lineEdit->resize(WLength(100, WLength::Percentage),
    +		     WLength(100, WLength::Percentage));
    +    result->addWidget(lineEdit);
    +  }
    +
    +  return result;
    +}
    +
    +void WItemDelegate::doCloseEditor(WWidget *editor, bool save) const
    +{
    +  closeEditor().emit(editor, save);
    +}
    +
    +boost::any WItemDelegate::editState(WWidget *editor) const
    +{
    +  WContainerWidget *w = dynamic_cast<WContainerWidget *>(editor);
    +  WLineEdit *lineEdit = dynamic_cast<WLineEdit *>(w->widget(0));
    +
    +  return boost::any(lineEdit->text());
    +}
    +
    +void WItemDelegate::setEditState(WWidget *editor, const boost::any& value) const
    +{
    +  WContainerWidget *w = dynamic_cast<WContainerWidget *>(editor);
    +  WLineEdit *lineEdit = dynamic_cast<WLineEdit *>(w->widget(0));
    +
    +  lineEdit->setText(boost::any_cast<WT_USTRING>(value));
    +}
    +
    +void WItemDelegate::setModelData(const boost::any& editState,
    +				 WAbstractItemModel *model,
    +				 const WModelIndex& index) const
    +{
    +  model->setData(index, editState, EditRole);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WItemSelectionModel b/wt-3.1.7a/src/Wt/WItemSelectionModel
    new file mode 100644
    index 0000000..706373f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WItemSelectionModel
    @@ -0,0 +1,94 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WITEM_SELECTION_MODEL_H_
    +#define WITEM_SELECTION_MODEL_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WModelIndex>
    +#include <Wt/WGlobal>
    +
    +namespace Wt {
    +
    +class WAbstractItemModel;
    +class WAbstractItemView;
    +
    +/*! \class WItemSelectionModel Wt/WItemSelectionModel Wt/WItemSelectionModel
    + *  \brief A class that represents a selection for a WAbstractItemView.
    + *
    + * This model is currently only used by WTreeView, and plays only
    + * a role in drag & drop of an item selection.
    + *
    + * When an item selection is dragged from a view widget, the generated
    + * drop events will have as source object (see WDropEvent::source())
    + * this selection model.
    + *
    + * Although this class does not (yet) allow you to modify the
    + * selection, note that manipulations to the model may modify the
    + * selection (row insertions and removals may shift the selection, and
    + * row deletions may shrink the selection).
    + *
    + * \note Currently this class cannot be shared between multiple views.
    + *
    + * \ingroup modelview
    + *
    + * \sa WTreeView, WTableView, WAbstractItemModel
    + */
    +class WT_API WItemSelectionModel : public WObject
    +{
    +public:
    +  /*! \brief Returns the WAbstractItemModel.
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Returns the set of selected items.
    +   *
    +   * The model indexes are returned as a set, topologically ordered (in
    +   * the order they appear in the view).
    +   */
    +  WModelIndexSet selectedIndexes() const { return selection_; }
    +
    +  /*! \brief Returns wheter an item is selected.
    +   *
    +   * \sa selectedIndexes()
    +   */
    +  bool isSelected(const WModelIndex& index) const;
    +
    +  /*! \brief Sets the selection behaviour.
    +   *
    +   * By default, the selection contains rows (\link Wt::SelectRows
    +   * SelectRows\endlink), in which case model indexes will always be
    +   * have column 0, but represent the whole row.
    +   *
    +   * Alternatively, you can allow selection for individual items
    +   * (\link Wt::SelectItems SelectItems\endlink).
    +   */
    +  void setSelectionBehavior(SelectionBehavior behavior);
    +
    +  /*! \brief Returns the selection behaviour.
    +   *
    +   * \sa setSelectionBehavior()
    +   */
    +  SelectionBehavior selectionBehavior() const { return selectionBehavior_; }
    +
    +private:
    +  WModelIndexSet      selection_;
    +  WAbstractItemModel *model_;
    +  SelectionBehavior   selectionBehavior_;
    +
    +  WItemSelectionModel(WAbstractItemModel *model, WObject *parent = 0);
    +
    +  void modelLayoutAboutToBeChanged();
    +  void modelLayoutChanged();
    +
    +  friend class WAbstractItemView;
    +  friend class WTableView;
    +  friend class WTreeView;
    +};
    +
    +}
    +
    +#endif // WITEM_SELECTION_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WItemSelectionModel.C b/wt-3.1.7a/src/Wt/WItemSelectionModel.C
    new file mode 100644
    index 0000000..4aa33ab
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WItemSelectionModel.C
    @@ -0,0 +1,46 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WItemSelectionModel"
    +#include "Wt/WAbstractItemModel"
    +
    +namespace Wt {
    +
    +WItemSelectionModel::WItemSelectionModel(WAbstractItemModel *model,
    +					 WObject *parent)
    +  : WObject(parent),
    +    model_(model),
    +    selectionBehavior_(SelectRows)
    +{ 
    +  if (model_) {
    +    model_->layoutAboutToBeChanged()
    +      .connect(this, &WItemSelectionModel::modelLayoutAboutToBeChanged);
    +    model_->layoutChanged()
    +      .connect(this, &WItemSelectionModel::modelLayoutChanged);
    +  }
    +}
    +
    +void WItemSelectionModel::setSelectionBehavior(SelectionBehavior behavior)
    +{
    +  selectionBehavior_ = behavior;
    +}
    +
    +bool WItemSelectionModel::isSelected(const WModelIndex& index) const
    +{
    +  return selection_.find(index) != selection_.end();
    +}
    +
    +void WItemSelectionModel::modelLayoutAboutToBeChanged()
    +{
    +  WModelIndex::encodeAsRawIndexes(selection_);
    +}
    +
    +void WItemSelectionModel::modelLayoutChanged()
    +{
    +  selection_ = WModelIndex::decodeFromRawIndexes(selection_);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WJavaScript b/wt-3.1.7a/src/Wt/WJavaScript
    new file mode 100644
    index 0000000..4faa9f0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WJavaScript
    @@ -0,0 +1,623 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WJAVASCRIPT_H_
    +#define WJAVASCRIPT_H_
    +
    +#include <Wt/WSignal>
    +#include <Wt/WEvent>
    +#include <Wt/WJavaScriptSlot>
    +#include <Wt/WString>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +
    +/*! \class JSignal Wt/WJavaScript Wt/WJavaScript
    + *  \brief A signal to relay JavaScript to C++ calls.
    + *
    + * A JSignal, like an EventSignal, provides communicates events from
    + * JavaScript to C++ code. However, it not tied to a built-in
    + * event. Instead, it can be emitted from within custom JavaScript
    + * code using the JavaScript Wt.emit() function.
    + *
    + * The signal is identified by a unique name within the scope of a
    + * WObject, or a unique global name (when declaring the signal in your
    + * WApplication).
    + * 
    + * The signal supports up to 6 arguments. Values for these arguments
    + * may be specified in the JavaScript Wt.emit() (or the deprecated
    + * global function WtSignalEmit()).
    + *
    + * Example code:
    + * \code
    + * class MyWidget : public WCompositeWidget
    + * {
    + * public:
    + *   MyWidget()
    + *     : doSome_(this, "doSome")
    + *   {
    + *     ...
    + *   }
    + *
    + *   JSignal<std::string, int>& doSome() { return doSome_; }
    + *
    + * private:
    + *   JSignal<std::string, int> doSome_;
    + *
    + *   ...
    + * };
    + *
    + * \endcode
    + *
    + * The following JavaScript statement will emit the signal for a DOM
    + * element <i>element</i> that corresponds to a widget of class
    + * <tt>MyWidget</tt>:
    + *
    + * \code
    + * Wt.emit(element, 'dosome', 'foo', 42);
    + * \endcode
    + *
    + * The <i>element</i> can be a \link WWidget::jsRef() DOM
    + * element\endlink, or the \link WObject::id() object ID\endlink of a
    + * WObject, or the constant 'Wt' which is an alias for
    + * 'Wt::WApplication::instance()->id()'. The conversion between the
    + * JavaScript arguments (ax) and the C++ type Ax uses
    + * <tt>boost::lexical_cast<Ax>(ax)</tt>.
    + *
    + * You can use the methods createCall() to let the signal itself
    + * generate this JavaScript call for you:
    + * \code
    + * doSome_.createCall("'foo'", "42");
    + * \endcode
    + *
    + * The JavaScript generated by createCall() is possibly affected by every
    + * connect or disconnect to the signal. In practice, you will use JSignal
    + * internally within a widget and call createCall() only after you connected
    + * internal slots to signal.
    + *
    + * It is also possible to propagate an original JavaScript event as a
    + * last argument, of type WMouseEvent or WKeyEvent. In that case, the
    + * second argument in <tt>Wt.emit()</tt> must be an object which
    + * indicates also the JavaScript event and event target.
    + *
    + * Consider a signal declaration:
    + * \code
    + * JSignal<std::string, int, WMouseEvent> doSome();
    + * \endcode
    + *
    + * Then, the following would be a suitable JavaScript call:
    + *
    + * \code
    + * Wt.emit(Wt, {name: 'dosome', event: event, eventObject: object}, 'foo', 42);
    + * \endcode
    + *
    + * The method createEventCall() may be used this variation for the JavaScript
    + * method call.
    + *
    + * Since the conversion from JavaScript to C++ uses
    + * <tt>boost::lexical_cast<T>(arg)</tt>, you may provide support for
    + * custom types by implementing the c++ input stream operator
    + * <tt>operator<< (std::istream&, T& t)</tt> for your type.
    + *
    + * \sa WWidget::jsRef(), WObject::id()
    + *
    + * \ingroup signalslot
    + */
    +template <typename A1 = NoClass, typename A2 = NoClass,
    +	  typename A3 = NoClass, typename A4 = NoClass,
    +	  typename A5 = NoClass, typename A6 = NoClass>
    +class JSignal : public EventSignalBase
    +{
    +public:
    +  /*! \brief Construct a signal for the given object, and name.
    +   *
    +   * The given \p name must be unique for all user signals
    +   * specified for the object \p object. Ownership of the signal
    +   * is not transferred to the object.
    +   *
    +   * If \p collectSlotJavaScript is \c true, then javascript specified
    +   * for connected slots (using JSlot) or learned by stateless slot
    +   * learning, is collected to client-side JavaScript.
    +   *
    +   * Use the utility methods createCall() or createEventCall() to
    +   * create the appropriate JavaScript statements that invoke the
    +   * signal, which take into account possible other client-side
    +   * JavaScript handling associated with the signal.
    +   *
    +   * \sa \link WObject::implementStateless() stateless slot learning\endlink
    +   */
    +  JSignal(WObject *object, const std::string& name,
    +	  bool collectSlotJavaScript = false);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~JSignal();
    +
    +  /*! \brief Returns the signal name.
    +   */
    +  const std::string& name() const { return name_; }
    +
    +  virtual const std::string encodeCmd() const;
    +
    +  /*! \brief Returns a JavaScript call that triggers the signal.
    +   *
    +   * This is:
    +   * \code
    +     Wt.emit([element], [name], arg1, ...);
    +   * \endcode
    +   *
    +   * When the signal was constructed with \p collectSlotJavaScript ==
    +   * \c true, the inline JavaScript from slots defined as JavaScript
    +   * or from learned stateless slots is included as well.
    +   *
    +   * \sa createEventCall()
    +   */
    +  const std::string createCall(const std::string& arg1 = std::string(),
    +			       const std::string& arg2 = std::string(),
    +			       const std::string& arg3 = std::string(),
    +			       const std::string& arg4 = std::string(),
    +			       const std::string& arg5 = std::string(),
    +			       const std::string& arg6 = std::string()) const;
    +
    +  /*! \brief Returns a JavaScript call that triggers the signal, passing
    +   *         the original event too.
    +   *
    +   * Similar to createCall(), the following JavaScript is returned:
    +   * \code
    +     Wt.emit([element], { name: [name], eventObject: [jsObject], event: [jsEvent]},
    +             arg1, ...);
    +   * \endcode
    +   *
    +   * In addition to information identifying the signal (\p element
    +   * and \p name) and the arguments, also information on the original
    +   * JavaScript event is transferred. In this way, you can propagate the
    +   * corresponding event class (WMouseEvent or WKeyEvent) as an additional
    +   * last argument in the slot.
    +   */
    +  const std::string createEventCall(const std::string& jsObject,
    +				    const std::string& jsEvent,
    +				    const std::string& arg1 = std::string(),
    +				    const std::string& arg2 = std::string(),
    +				    const std::string& arg3 = std::string(),
    +				    const std::string& arg4 = std::string(),
    +				    const std::string& arg5 = std::string())
    +    const;
    +
    +  /*! \brief Returns whether the signal is connected to at least one slot.
    +   */
    +  virtual bool isConnected() const;
    +
    +  /*! \brief Connect to a function.
    +   *
    +   * This variant of the overloaded connect() method supports a
    +   * template function object (which supports operator ()).
    +   *
    +   * When the receiver function is an object method, the signal will
    +   * automatically be disconnected when the object is deleted, as long as the
    +   * object inherits from WObject or boost::signals::trackable.
    +   *
    +   * The function may leave 1 parameters unbound (e.g. using
    +   * boost::bind placeholders _1) that may be bound to the event
    +   * detail object passed by the signal.
    +   */
    +  template<class F>
    +    boost::signals::connection connect(const F& function);
    +
    +  /*! \brief Connect a slot that takes no arguments.
    +   *
    +   * The slot is specified as a method of an object \p target of class
    +   * \p T, which equals class \p V, or is a base class of class \p
    +   * V. In addition, to check for stateless implementations, class \p
    +   * T must be also be a descendant of WObject. Thus, the following
    +   * statement must return a non-null pointer:
    +   *
    +   * \code
    +   * WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
    +   * \endcode
    +   *
    +   * If a stateless implementation is specified for the slot, then
    +   * the visual behaviour will be learned in terms of JavaScript, and
    +   * will be cached on the client side for instant feed-back, in
    +   * addition running the slot on the server.
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +  /*! \brief Connect a slot that takes one argument.
    +   *
    +   * This is only possible for signals that take at least one argument.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(A1));
    +
    +  /*! \brief Connect a slot that takes two arguments.
    +   *
    +   * This is only possible for signals that take at least two arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(A1, A2));
    +
    +  /*! \brief Connect a slot that takes three arguments.
    +   *
    +   * This is only possible for signals that take at least three arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3));
    +
    +  /*! \brief Connect a slot that takes four arguments.
    +   *
    +   * This is only possible for signals that take at least four arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4));
    +
    +  /*! \brief Connect a slot that takes five arguments.
    +   *
    +   * This is only possible for signals that take at least five arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4,A5));
    +
    +  /*! \brief Connect a slot that takes six arguments.
    +   *
    +   * This is only possible for signals that take at least six arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4,A5,A6));
    +
    +  /*! \brief Connect a slot that is specified as JavaScript only.
    +   *
    +   * This will provide a client-side connection between the event and
    +   * some JavaScript code as implemented by the slot. Unlike other
    +   * connects, this does not cause the event to propagated to the
    +   * application, and thus the state changes induced by the
    +   * \p slot are invisible to the server-side.
    +   */
    +  void connect(JSlot& slot);
    +
    +  /*! \brief Emit the signal.
    +   *
    +   * The arguments must exactly match the arguments of the target
    +   * function.
    +   *
    +   * This will cause all connected slots to be triggered, with the given
    +   * arguments.
    +   */
    +  void emit(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
    +	    A3 a3 = NoClass::none, A4 a4 = NoClass::none,
    +	    A5 a5 = NoClass::none, A6 a6 = NoClass::none);
    +
    +  /*! \brief Emit the signal.
    +   *
    +   * This is equivalent to emit().
    +   *
    +   * \sa emit
    +   */
    +  void operator()(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
    +		  A3 a3 = NoClass::none, A4 a4 = NoClass::none,
    +		  A5 a5 = NoClass::none, A6 a6 = NoClass::none);
    +
    +  virtual boost::signals::connection connect(WObject *target,
    +					     void (WObject::*method)());
    +
    +private:
    +  JSignal(const JSignal<A1, A2, A3, A4, A5, A6>&);
    +
    +  std::string name_;
    +  bool collectSlotJavaScript_;
    +  void processDynamic(const JavaScriptEvent& e);
    +
    +  boost::signal6<void, A1, A2, A3, A4, A5, A6> *impl_;
    +};
    +
    +#ifndef WT_CNOR
    +
    +/*
    + * JSignal -- specialization for void
    + */
    +template<>
    +class WT_API JSignal<void> : public JSignal<>
    +{ 
    +public:
    +  JSignal(WObject *object, const std::string& name,
    +	  bool collectSlotJavaScript = false);
    +};
    +
    +#else // WT_CNOR
    +
    +class WT_API JSignal0 : public JSignal<NoClass>
    +{
    +public:
    +  JSignal0(WObject *object, const std::string& name,
    +	   bool collectSlotJavaScript = false);
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +  void emit();
    +};
    +
    +#endif // WT_CNOR
    +
    +#ifndef WT_CNOR
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +JSignal<A1, A2, A3, A4, A5, A6>::JSignal(WObject *object,
    +					 const std::string& name,
    +					 bool collectSlotJavaScript)
    +  : EventSignalBase(0, object),
    +    name_(name),
    +    collectSlotJavaScript_(collectSlotJavaScript),
    +    impl_(0)
    +{ }
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +JSignal<A1, A2, A3, A4, A5, A6>::~JSignal()
    +{
    +  prepareDestruct();
    +  delete impl_;
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +const std::string JSignal<A1, A2, A3, A4, A5, A6>::encodeCmd() const
    +{
    +  return sender()->uniqueId() + "." + name_;
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +const std::string JSignal<A1, A2, A3, A4, A5, A6>
    +::createCall(const std::string& arg1, const std::string& arg2,
    +	     const std::string& arg3, const std::string& arg4,
    +	     const std::string& arg5, const std::string& arg6) const
    +{
    +  return EventSignalBase::createUserEventCall(std::string(), std::string(),
    +					      name_, arg1, arg2, arg3,
    +					      arg4, arg5, arg6);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +const std::string JSignal<A1, A2, A3, A4, A5, A6>
    +::createEventCall(const std::string& jsObject, const std::string& jsEvent,
    +		  const std::string& arg1, const std::string& arg2,
    +		  const std::string& arg3, const std::string& arg4,
    +		  const std::string& arg5) const
    +{
    +  return EventSignalBase::createUserEventCall(jsObject, jsEvent,
    +					      name_, arg1, arg2, arg3,
    +					      arg4, arg5, "");
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class F>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(const F& function)
    +{
    +  exposeSignal();
    +  if (!impl_)
    +    impl_ = new boost::signal6<void, A1, A2, A3, A4, A5, A6>;
    +  return impl_->connect(function);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4, A5, A6))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return
    +    connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4, ::_5, ::_6));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4, A5))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4, ::_5));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)())
    +{
    +  exposeSignal();
    +  WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
    +  assert(o);
    +
    +  WStatelessSlot *s = o->isStateless(static_cast<WObject::Method>(method));
    +
    +  if (collectSlotJavaScript_ && s)
    +    return EventSignalBase::connectStateless
    +      (static_cast<WObject::Method>(method), o, s);
    +  else
    +    return connect(boost::bind(method, target));
    +}
    +
    +extern void WT_API throwWtException(const std::string& msg);
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void JSignal<A1, A2, A3, A4, A5, A6>::connect(JSlot& slot)
    +{
    +  if (!collectSlotJavaScript_)
    +    throwWtException("JSignal::connect(JSlot) only makes sense for a JSignal "
    +		     "which collects JavaScript from slots");
    +
    +  EventSignalBase::connect(slot);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +boost::signals::connection JSignal<A1, A2, A3, A4, A5, A6>
    +::connect(WObject *target, void (WObject::*method)())
    +{
    +  exposeSignal();
    +  WStatelessSlot *s = target->isStateless(method);
    +  if (collectSlotJavaScript_ && s)
    +    return EventSignalBase::connectStateless(method, target, s);
    +  else
    +    return connect(boost::bind(method, target));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void JSignal<A1, A2, A3, A4, A5, A6>::emit(A1 a1, A2 a2, A3 a3,
    +					   A4 a4, A5 a5, A6 a6)
    +{
    +  if (impl_) {
    +    pushSender(sender());
    +    (*impl_)(a1, a2, a3, a4, a5, a6);
    +    popSender();
    +  }
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void JSignal<A1, A2, A3, A4, A5, A6>::operator()(A1 a1, A2 a2, A3 a3,
    +						 A4 a4, A5 a5, A6 a6)
    +{
    +  emit(a1, a2, a3, a4, a5, a6);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +bool JSignal<A1, A2, A3, A4, A5, A6>::isConnected() const
    +{
    +  return impl_ ? impl_->num_slots() > 0 : EventSignalBase::isConnected();
    +}
    +
    +template <typename T>
    +struct SignalArgTraits
    +{
    +  static T unMarshal(const JavaScriptEvent& jse, int argi) {
    +    if ((unsigned)argi >= jse.userEventArgs.size())
    +      throwWtException("Missing JavaScript argument: "
    +		       + boost::lexical_cast<std::string>(argi));
    +
    +    try {
    +      std::string v = jse.userEventArgs[argi];
    +      WString::checkUTF8Encoding(v);
    +      return boost::lexical_cast<T>(v);
    +    } catch (boost::bad_lexical_cast) {
    +      throwWtException("Bad argument format: '"
    +		       + jse.userEventArgs[argi] + "' for C++ type '"
    +		       + typeid(T).name() + "'");
    +      return T();
    +    }
    +  }
    +};
    +
    +template<>
    +struct SignalArgTraits<NoClass>
    +{
    +  static NoClass unMarshal(const JavaScriptEvent& jse, int argi) {
    +    if ((unsigned)argi < jse.userEventArgs.size())
    +      throwWtException("Redundant JavaScript argument: '"
    +		       + jse.userEventArgs[argi] + "'");
    +    return NoClass::none;
    +  }
    +};
    +
    +template<>
    +struct SignalArgTraits<WMouseEvent>
    +{
    +  static WMouseEvent unMarshal(const JavaScriptEvent& jse, int) {
    +    return WMouseEvent(jse);
    +  }
    +};
    +
    +template<>
    +struct SignalArgTraits<WKeyEvent>
    +{
    +  static WKeyEvent unMarshal(const JavaScriptEvent& jse, int) {
    +    return WKeyEvent(jse);
    +  }
    +};
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void JSignal<A1, A2, A3, A4, A5, A6>::processDynamic(const JavaScriptEvent& jse)
    +{
    +  emit(SignalArgTraits<A1>::unMarshal(jse, 0),
    +       SignalArgTraits<A2>::unMarshal(jse, 1),
    +       SignalArgTraits<A3>::unMarshal(jse, 2),
    +       SignalArgTraits<A4>::unMarshal(jse, 3),
    +       SignalArgTraits<A5>::unMarshal(jse, 4),
    +       SignalArgTraits<A6>::unMarshal(jse, 5));
    +}
    +
    +#endif // WT_CNOR
    +
    +}
    +
    +#endif // WUSER_SIGNAL_H_
    diff --git a/wt-3.1.7a/src/Wt/WJavaScript.C b/wt-3.1.7a/src/Wt/WJavaScript.C
    new file mode 100644
    index 0000000..3a80f67
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WJavaScript.C
    @@ -0,0 +1,24 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WJavaScript"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +#ifndef WT_CNOR
    +JSignal<void>::JSignal(WObject *object, const std::string& name,
    +		       bool collectSlotJavaScript)
    +  : JSignal<>(object, name, collectSlotJavaScript)
    +{ }
    +#endif
    +
    +void throwWtException(const std::string& msg)
    +{
    +  throw WtException(msg);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WJavaScriptSlot b/wt-3.1.7a/src/Wt/WJavaScriptSlot
    new file mode 100644
    index 0000000..f4869c6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WJavaScriptSlot
    @@ -0,0 +1,158 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WJAVASCRIPTSLOT_H_
    +#define WJAVASCRIPTSLOT_H_
    +
    +#include "Wt/WObject"
    +
    +namespace Wt {
    +
    +class WWidget;
    +
    +/*! \class JSlot Wt/WJavaScript Wt/WJavaScript
    + *  \brief A slot that is only implemented in client side JavaScript code.
    + *
    + * This class provides a hook for adding your own JavaScript to respond to
    + * events.
    + *
    + * Carefully consider the use of this. Not only is writing cross-browser
    + * JavaScript hard and tedious, but one must also be aware of possible
    + * security problems (see further), and ofcourse, the event handling will
    + * not be available when JavaScript is disabled or not present at all.
    + * 
    + * \if cpp
    + * If you wish to add client side event handling, with automatic
    + * fall-back to server-side event handling and without writing
    + * JavaScript code with the associated risks and problems, consider
    + * using stateless slot implementations instead (see
    + * WObject::implementStateless())
    + * \endif 
    + *
    + * For some purposes, stateless slot implementations are not
    + * sufficient, since they do not allow state inspection. At the same
    + * time, the non-availability in case of disabled JavaScript may also
    + * be fine for some non-essential functionality (see for example the
    + * WSuggestionPopup widget), or when you simply do not care. For these
    + * situations a %JSlot can be used to add client-side event handling.
    + *
    + * The JavaScript code may be set (or changed) using the
    + * setJavaScript() method which takes a string that implements a
    + * JavaScript function with the following signature:
    + *
    + * \code
    + * function(sender, event) {
    + *   // handle the event, and sender is a reference to the DOM element
    + *   // which captured the event (and holds the signal). Therefore it
    + *   // equivalent to the sender for a normal %Wt slot.
    + *
    + *   // You can prevent the default action using:
    + *   ${WT_CLASS}.cancelEvent(event);
    + *   // (where ${WT_CLASS} should be the value of the WT_CLASS define
    + * }
    + * \endcode
    + * 
    + * In the JavaScript code, you may use WWidget::jsRef() to obtain the
    + * DOM element corresponding to any WWidget, or WWidget::id() to
    + * obtain the DOM id. In addition you may trigger server-side events
    + * using the JavaScript WtSignalEmit function (see JSignal
    + * documentation). That's how far we can help you. For the rest you
    + * are left to yourself, buggy browsers and quirky JavaScript
    + * (http://www.quirksmode.org/ was a reliable companion to me) -- good
    + * luck.
    + *
    + * \ingroup signalslot
    + */
    +class WT_API JSlot
    +{
    +public:
    +  /*! \brief Constructs a JavaScript-only slot within the parent scope.
    +   *
    +   * The JavaScript code block will reside within the scope of the
    +   * given widget.  By picking a long-lived parent, one may reuse a
    +   * single block of JavasCript code for multiple widgets.
    +   *
    +   * When \p parent = \c 0, then the JavaScript will be inlined in
    +   * each caller (possibly replicating the same JavaScript).
    +   */
    +  JSlot(WWidget *parent = 0);
    +
    +  /*! \brief Constructs a JavaScript-only and sets the JavaScript code.
    +   *
    +   * \sa JSlot(WWidget *), setJavaScript()
    +   */
    +  JSlot(const std::string& javaScript, WWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~JSlot();
    +
    +  /*! \brief Sets or modify the JavaScript code associated with the slot.
    +   *
    +   * When the slot is triggered, the corresponding function defined by
    +   * \p javaScript is executed.
    +   *
    +   * The JavaScript function takes two parameters and thus should look like:
    +   * \code
    +     function(obj, event) {
    +       // ...
    +     }
    +     \endcode
    +   * 
    +   * The first parameter \p obj is a reference to the DOM element
    +   * that generates the event. The \p event refers to the
    +   * JavaScript event object.
    +   *
    +   * \sa WWidget::jsRef()
    +   */
    +  void setJavaScript(const std::string& javaScript);
    +
    +  /*! \brief Executes the JavaScript code.
    +   *
    +   * This executes the JavaScript code in the same way as when
    +   * triggered by a EventSignal. This function returns immediately,
    +   * and execution of the JavaScript code is deferred until after the
    +   * event handling.
    +   *
    +   * The arguments are the <tt>"object, event"</tt> arguments of the
    +   * JavaScript event callback function.
    +   *
    +   * \sa setJavaScript()
    +   */
    +  void exec(const std::string& object = "null",
    +	    const std::string& event = "null");
    +
    +  /*! \brief Returns a JavaScript statement that executes the slot.
    +   *
    +   * This returns the JavaScript code to execute the slot.
    +   *
    +   * The arguments are the <tt>"object, event"</tt> arguments of the
    +   * JavaScript event callback function.
    +   *
    +   * \sa exec()
    +   */
    +   std::string execJs(const std::string& object = "null",
    +		      const std::string& event = "null");
    +
    +private:
    +  WWidget *widget_;
    +  WStatelessSlot* imp_;
    +
    +  std::string jsFunctionName() const;
    +  WStatelessSlot* slotimp();
    +  void create();
    +
    +  int fid_;
    +  static int nextFid_;
    +
    +  friend class EventSignalBase;
    +};
    +
    +typedef JSlot WJavaScriptSlot;
    +
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/Wt/WJavaScriptSlot.C b/wt-3.1.7a/src/Wt/WJavaScriptSlot.C
    new file mode 100644
    index 0000000..809a7df
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WJavaScriptSlot.C
    @@ -0,0 +1,82 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WJavaScriptSlot"
    +#include "Wt/WStatelessSlot"
    +#include "Wt/WWidget"
    +#include "Wt/WWebWidget"
    +
    +namespace Wt {
    +
    +int JSlot::nextFid_ = 0;
    +
    +class WStatelessSlotImpl : public WStatelessSlot {
    +public:
    +  WStatelessSlotImpl(WObject *target, WObjectMethod method,
    +		     const std::string& javaScript) :
    +    WStatelessSlot(target, method, javaScript) { }
    +};
    +
    +JSlot::JSlot(WWidget *parent)
    +  : widget_(parent),
    +    fid_(nextFid_++)
    +{
    +  create();
    +}
    +
    +JSlot::JSlot(const std::string& javaScript, WWidget *parent)
    +  : widget_(parent),
    +    fid_(nextFid_++)
    +{
    +  create();
    +  setJavaScript(javaScript);
    +}
    +
    +void JSlot::create()
    +{
    +  imp_ = new WStatelessSlotImpl
    +    (widget_, 0, widget_
    +     ? WApplication::instance()->javaScriptClass()
    +     + '.' + jsFunctionName() + "(o,e);"
    +     : "");
    +}
    +
    +JSlot::~JSlot()
    +{
    +  delete imp_;
    +}
    +
    +std::string JSlot::jsFunctionName() const
    +{
    +  return "sf" + boost::lexical_cast<std::string>(fid_);
    +}
    +
    +void JSlot::setJavaScript(const std::string& js)
    +{
    +  if (widget_)
    +    WApplication::instance()->declareJavaScriptFunction(jsFunctionName(), js);
    +  else
    +    imp_->setJavaScript("{var f=" + js + ";f(o,e);}");
    +}
    +
    +WStatelessSlot* JSlot::slotimp()
    +{
    +  return imp_;
    +}
    +
    +std::string JSlot::execJs(const std::string& object, const std::string& event)
    +{
    +  return "{var o=" + object + ", e=" + event + ";" + imp_->javaScript() + "}";
    +}
    +
    +void JSlot::exec(const std::string& object, const std::string& event)
    +{
    +  WApplication::instance()->doJavaScript(execJs(object, event));
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLabel b/wt-3.1.7a/src/Wt/WLabel
    new file mode 100644
    index 0000000..10db5d6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLabel
    @@ -0,0 +1,168 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLABEL_H_
    +#define WLABEL_H_
    +
    +#include <Wt/WInteractWidget>
    +
    +namespace Wt {
    +
    +  class WFormWidget;
    +  class WImage;
    +  class WText;
    +
    +  namespace Ext {
    +
    +    class FormField;
    +
    +  }
    +
    +/*! \class WLabel Wt/WLabel Wt/WLabel
    + *  \brief A label for a form field.
    + *
    + * The label may contain an image and/or text. It acts like a proxy
    + * for giving focus to a WFormWidget. When both an image and text are
    + * specified, the image is put to the left of the text.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget();
    + * Wt::WLabel *label = new Wt::WLabel("Favourite Actress: ", w);
    + * Wt::WLineEdit *edit = new Wt::WLineEdit("Renee Zellweger", w);
    + * label->setBuddy(edit);
    + * \endcode
    + * \elseif java
    + * \code
    + * WContainerWidget w = new WContainerWidget();
    + * WLabel label = new WLabel("Favourite Actress: ", w);
    + * WLineEdit edit = new WLineEdit("Renee Zellweger", w);
    + * label.setBuddy(edit);
    + * \endcode
    + * \endif
    + *
    + * The widget corresponds to the HTML <tt>&lt;label&gt;</tt> tag. When
    + * no buddy is set, it is rendered using an HTML <tt>&lt;span&gt;</tt>
    + * or <tt>&lt;div&gt;</tt> to avoid click event handling misbehavior
    + * on Microsoft Internet Explorer.
    + *
    + * %WLabel is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + * 
    + * This widget does not provide styling, and can be styled using
    + * inline or external CSS as appropriate.  A label's text may be
    + * styled via a nested <tt>&lt;span&gt;</tt> element, and it's
    + * image may be styled via a nested <tt>&lt;img&gt;</tt> element.
    + */
    +class WT_API WLabel : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates a label with empty text and optional parent.
    +   */
    +  WLabel(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a label with a given text.
    +   */
    +  WLabel(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a label with an image.
    +   */
    +  WLabel(WImage *image, WContainerWidget *parent = 0);
    +
    +  ~WLabel();
    +
    +  /*! \brief Returns the buddy of this label.
    +   *
    +   * \sa setBuddy(WFormWidget *)
    +   */
    +  WFormWidget *buddy() const { return buddy_; }
    +
    +  /*! \brief Sets the buddy of this label.
    +   *
    +   * Sets the buddy FormWidget for which this label acts as a proxy.
    +   * 
    +   * \if cpp
    +   * \sa WFormWidget::label(), setBuddy(Ext::FormField *), buddy()
    +   * \elseif java
    +   * \sa WFormWidget::label(), buddy()
    +   * \endif 
    +   */
    +  void setBuddy(WFormWidget *buddy);
    +
    +  #ifndef WT_TARGET_JAVA
    +  /*! \brief Sets the buddy of this label.
    +   *
    +   * Sets the buddy Ext::FormField for which this label acts as a proxy.
    +   * When using this method, the result of buddy() is not defined.
    +   *
    +   * \sa Ext::FormField::label(), setBuddy(WFormWidget *)
    +   */
    +  void setBuddy(Ext::FormField *buddy);
    +  #endif //WT_TARGET_JAVA
    +
    +  /*! \brief Sets the label text.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the label text.
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Sets the image.
    +   */
    +  void setImage(WImage *image, Side side = Left);
    +
    +  /*! \brief Returns the image.
    +   */
    +  WImage *image() const { return image_; }
    +
    +  /*! \brief Configures word wrapping.
    +   *
    +   * When \p wordWrap is \c true, the widget may break lines, creating a
    +   * multi-line text. When \p wordWrap is \c false, the text will displayed
    +   * on a single line, unless the text contains end-of-lines (for
    +   * Wt::PlainText) or &lt;br /&gt; tags or other block-level tags
    +   * (for Wt::XHTMLText).
    +   *
    +   * The default value is \c false.
    +   *
    +   * \sa wordWrap()
    +   */
    +  void setWordWrap(bool wordWrap);
    +
    +  /*! \brief Returns whether word wrapping is on.
    +   *
    +   * \sa setWordWrap()
    +   */
    +  bool wordWrap() const;
    +
    +private:
    +  WFormWidget *buddy_;
    +  WText  *text_;
    +  WImage *image_;
    +  Side    imageSide_;
    +
    +  bool buddyChanged_, newImage_, newText_;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +  virtual void           propagateRenderOk(bool deep);
    +  virtual void           propagateSetEnabled(bool enabled);
    +
    +  void updateImage(DomElement& element, bool all, WApplication *app, int pos);
    +  void updateText(DomElement& element, bool all, WApplication *app, int pos);
    +
    +  friend class WAnchor;
    +};
    +
    +}
    +
    +#endif // WLABEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WLabel.C b/wt-3.1.7a/src/Wt/WLabel.C
    new file mode 100644
    index 0000000..4c70006
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLabel.C
    @@ -0,0 +1,216 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLabel"
    +#include "Wt/WText"
    +#include "Wt/WImage"
    +#include "Wt/WFormWidget"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WLabel::WLabel(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    buddy_(0),
    +    text_(0),
    +    image_(0),
    +    buddyChanged_(false),
    +    newImage_(false),
    +    newText_(false)
    +{ }
    +
    +WLabel::WLabel(const WString& text, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    buddy_(0),
    +    image_(0),
    +    buddyChanged_(false),
    +    newImage_(false),
    +    newText_(false)
    +{
    +  text_ = new WText(text);
    +  text_->setWordWrap(false);
    +  text_->setParentWidget(this);
    +}
    +
    +WLabel::WLabel(WImage *image, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    buddy_(0),
    +    text_(0),
    +    buddyChanged_(false),
    +    newImage_(false),
    +    newText_(false)
    +{ 
    +  image_ = image;
    +  image_->setParentWidget(this);
    +}
    +
    +WLabel::~WLabel()
    +{
    +  setBuddy((WFormWidget *) 0);
    +}
    +
    +void WLabel::setBuddy(WFormWidget *buddy)
    +{
    +  if (buddy_)
    +    buddy_->setLabel(0);
    +
    +  buddy_ = buddy;
    +  if (buddy_)
    +    buddy_->setLabel(this);
    +
    +  buddyChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WLabel::setText(const WString& text)
    +{
    +  if (this->text() == text)
    +    return;
    +
    +  if (!text_) {
    +    text_ = new WText();
    +    text_->setWordWrap(false);
    +    text_->setParentWidget(this);
    +    newText_ = true;
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  text_->setText(text);
    +}
    +
    +const WString& WLabel::text() const
    +{
    +  static WString empty("");
    +  if (text_)
    +    return text_->text();
    +  else
    +    return empty;
    +}
    +
    +void WLabel::setImage(WImage *image, Side side)
    +{
    +  delete image_;
    +  image_ = image;
    +  if (image_) {
    +    image_->setParentWidget(this);
    +    imageSide_ = side;
    +  }
    +
    +  newImage_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WLabel::setWordWrap(bool wordWrap)
    +{
    +  if (!text_) {
    +    text_ = new WText();
    +    text_->setParentWidget(this);
    +    newText_ = true;
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  text_->setWordWrap(wordWrap);
    +}
    +
    +bool WLabel::wordWrap() const
    +{
    +  return text_ ? text_->wordWrap() : false;
    +}
    +
    +void WLabel::updateDom(DomElement& element, bool all)
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (image_ && text_)
    +    if (imageSide_ == Left) {
    +      updateImage(element, all, app, 0);
    +      updateText(element, all, app, 1);
    +    } else {
    +      updateText(element, all, app, 0);
    +      updateImage(element, all, app, 1);
    +    }
    +  else {
    +    updateText(element, all, app, 0);
    +    updateImage(element, all, app, 0);
    +  }
    +
    +  if (buddyChanged_ || all) {
    +    if (buddy_)
    +      element.setAttribute("for", buddy_->formName());
    +    buddyChanged_ = false;
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WLabel::updateImage(DomElement& element, bool all, WApplication *app,
    +			 int pos)
    +{
    +  if (newImage_ || all) {
    +    if (image_)
    +      element.insertChildAt(((WWebWidget *)image_)->createDomElement(app), pos);
    +    newImage_ = false;
    +  }
    +}
    +
    +void WLabel::updateText(DomElement& element, bool all, WApplication *app,
    +			int pos)
    +{
    +  if (newText_ || all) {
    +    if (text_)
    +      element.insertChildAt(((WWebWidget *)text_)->createDomElement(app), pos);
    +    newText_ = false;
    +  }
    +}
    +
    +void WLabel::propagateSetEnabled(bool enabled)
    +{
    +  if (text_) {
    +    if (enabled)
    +      text_->removeStyleClass("Wt-disabled");
    +    else
    +      text_->addStyleClass("Wt-disabled");
    +  }
    +
    +  WInteractWidget::propagateSetEnabled(enabled);
    +}
    +
    +void WLabel::propagateRenderOk(bool deep)
    +{
    +  newImage_ = false;
    +  newText_ = false;
    +  buddyChanged_ = false;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WLabel::domElementType() const
    +{
    +  // The label in <a><label /></a> eats an onclick event in IE
    +  // We should explicitly continue to propagate the onclick event ? 
    +  // For now we avoid to create a LABEL element if no buddy is set
    +  // (This is used e.g. in WTreeView)
    +  if (buddy_)
    +    return DomElement_LABEL;
    +  else
    +    return isInline() ? DomElement_SPAN : DomElement_DIV;
    +}
    +
    +void WLabel::getDomChanges(std::vector<DomElement *>& result,
    +			   WApplication *app)
    +{
    +  WInteractWidget::getDomChanges(result, app);
    +
    +  if (text_)
    +    ((WWebWidget *)text_)->getDomChanges(result, app);
    +  if (image_)
    +    ((WWebWidget *)image_)->getDomChanges(result, app);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLayout b/wt-3.1.7a/src/Wt/WLayout
    new file mode 100644
    index 0000000..04ebe8b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayout
    @@ -0,0 +1,220 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLAYOUT_H_
    +#define WLAYOUT_H_
    +
    +#include <string>
    +#include <vector>
    +
    +#include <Wt/WGlobal>
    +#include <Wt/WLayoutItem>
    +#include <Wt/WObject>
    +
    +namespace Wt {
    +
    +class WWidgetItem;
    +class WLayoutItemImpl;
    +
    +/*! \class WLayout Wt/WLayout Wt/WLayout
    + *  \brief An abstract base class for layout managers.
    + *
    + * This class is the abstract base class for any layout manager. A layout
    + * manager is associated with a container widget, and manages the layout of
    + * children inside the whole space available to the container widget.
    + *
    + * \if cpp
    + * Layout managers may be used with WContainerWidget and
    + * Ext::Container container widgets. A suitable implementation for all
    + * layout classes is not yet available for both containers, and thus
    + * you need to refer to the documentation of a layout manager to
    + * see if it is applicable to your situation.
    + * \endif
    + *
    + * The implementation of the layout manager depends on the container widget
    + * to which it is set, and is therefore deferred to WLayoutImpl.
    + *
    + * A layout never assumes ownership of contained items, instead these
    + * are owned by the parent widget to which the layout is applied.
    + *
    + * \note When applying a layout manager to a WContainerWidget, you may
    + * not define any padding for the container widget. Instead, use
    + * setContentsMargins().
    + */
    +class WT_API WLayout : public WLayoutItem, public WObject
    +{
    +public:
    +  /*! \brief Destructor.
    +   *
    +   * This will delete the layout (and nested layouts), but not the
    +   * contained widgets.
    +   */
    +  virtual ~WLayout();
    +
    +  /*! \brief Adds a layout <i>item</i>.
    +   *
    +   * The item may be a widget or nested layout.
    +   *
    +   * How the item is layed out with respect to siblings is
    +   * implementation specific to the layout manager. In some cases, a
    +   * layout manager will overload this method with extra arguments
    +   * that specify layout options.
    +   *
    +   * \sa removeItem(WLayoutItem *), addWidget(WWidget *)
    +   */
    +  virtual void addItem(WLayoutItem *item) = 0;
    +
    +  /*! \brief Adds the given <i>widget</i> to the layout.
    +   *
    +   * This method wraps the widget in a WWidgetItem and calls
    +   * addItem(WLayoutItem *).
    +   *
    +   * How the widget is layed out with respect to siblings is
    +   * implementation specific to the layout manager. In some cases, a
    +   * layout manager will overload this method with extra arguments
    +   * that specify layout options.
    +   *
    +   * \sa removeWidget(WWidget *), addItem(WLayoutItem *)
    +   */
    +  void addWidget(WWidget *widget);
    +
    +  /*! \brief Removes a layout <i>item</i> (widget or nested layout).
    +   *
    +   * \sa addItem(WLayoutItem *), removeWidget(WWidget *)
    +   */
    +  virtual void removeItem(WLayoutItem *item) = 0;
    +
    +  /*! \brief Removes the given <i>widget</i> from the layout.
    +   *
    +   * This method finds the corresponding WWidgetItem and calls
    +   * removeItem(WLayoutItem *). The widget itself is not destroyed.
    +   *
    +   * Returns \c true if succesful.
    +   *
    +   * \sa addWidget(WWidget *), removeItem(WLayoutItem *)
    +   */
    +  bool removeWidget(WWidget *widget);
    +
    +  /*! \brief Returns the number of items in this layout.
    +   *
    +   * This may be a theoretical number, which is greater than the
    +   * actual number of items. It can be used to iterate over the items
    +   * in the layout, in conjunction with itemAt().
    +   */
    +  virtual int count() const = 0;
    +
    +  /*! \brief Returns the layout item at a specific <i>index</i>.
    +   *
    +   * If there is no item at the \p index, \c 0 is returned.
    +   *
    +   * \sa indexOf(WLayoutItem *) const, count()
    +   */
    +  virtual WLayoutItem *itemAt(int index) const = 0;
    +
    +  /*! \brief Returns the index of a given <i>item</i>.
    +   *
    +   * The default implementation loops over all items, and returns the
    +   * index for which itemAt(index) equals \p item.
    +   *
    +   * \sa itemAt(int) const
    +   */
    +  virtual int indexOf(WLayoutItem *item) const;
    +
    +  /*! \brief Finds the widget item associated with the given <i>widget</i>.
    +   */
    +  virtual WWidgetItem *findWidgetItem(WWidget *widget);
    +
    +  /*! \brief Provides a hint to the layout implementation.
    +   *
    +   * In some cases, a layout implementation may require some hints for
    +   * rendering its contents. Possible hints are indicated in the
    +   * reference documentation for each layout manager.
    +   */
    +  void setLayoutHint(const std::string& name, const std::string& value);
    +
    +  virtual WWidget *widget() { return 0; }
    +  virtual WLayout *layout() { return this; }
    +  virtual WLayout *parentLayout() const;
    +
    +  WLayoutItemImpl *impl() const { return impl_; }
    +
    +  /*! \brief Set contents margins (in pixels).
    +   *
    +   * The default contents margins are 9 pixels in all directions.
    +   *
    +   * \note Only used when the layout manager is applied to a WContainerWidget.
    +   *
    +   * \sa setContentsMargins()
    +   */
    +  void setContentsMargins(int left, int top, int right, int bottom);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Returns the contents margins.
    +   *
    +   * \sa setContentsMargins()
    +   */
    +  void getContentsMargins(int *left, int *top, int *right, int *bottom) const;
    +#else // WT_TARGET_JAVA
    +  /*! \brief Returns a contents margin.
    +   *
    +   * \sa setContentsMargins()
    +   */
    +  int getContentsMargin(Side side) const;
    +#endif // WT_TARGET_JAVA
    +
    +protected:
    +  /*! \brief Create a layout.
    +   */
    +  WLayout();
    +
    +  /*! \brief Update the layout.
    +   *
    +   * Must be called whenever some properties of the layout have changed.
    +   */
    +  void update(WLayoutItem *item = 0);
    +
    +  /*! \brief Update the layout, adding the given layout <i>item</i>.
    +   *
    +   * Must be called from the implementation of addItem(WLayoutItem *)
    +   */
    +  void updateAddItem(WLayoutItem *item);
    +
    +  /*! \brief Update the layout, remove the given layout <i>item</i>.
    +   *
    +   * Must be called from the implementation of removeItem(WLayoutItem *)
    +   */
    +  void updateRemoveItem(WLayoutItem *item);
    +
    +  /*! \brief Set the layout in the <i>parent</i>.
    +   *
    +   * Must be called from the constructor after the layout has been fully
    +   * created (since it will call virtual methods count() and itemAt()).
    +   */
    +  void setLayoutInParent(WWidget *parent);
    +
    +private:
    +  struct Hint {
    +    Hint(const std::string& aName, const std::string& aValue)
    +      : name(aName), value(aValue) { }
    +    std::string name;
    +    std::string value;
    +  };
    +
    +  typedef std::vector<Hint> HintsList;
    +
    +  int    *WT_ARRAY margins_;
    +  WLayoutItemImpl *impl_;
    +  HintsList       *hints_;
    +
    +  virtual void setParentWidget(WWidget *parent);
    +  virtual void setParentLayout(WLayout *parentLayout);
    +
    +  friend class WWidget;
    +};
    +
    +}
    +
    +#endif // WLAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WLayout.C b/wt-3.1.7a/src/Wt/WLayout.C
    new file mode 100644
    index 0000000..841dc7b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayout.C
    @@ -0,0 +1,207 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WLayout"
    +#include "Wt/WLayoutItemImpl"
    +#include "Wt/WWidget"
    +#include "Wt/WWidgetItem"
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WLayout::WLayout()
    +  : margins_(0),
    +    impl_(0),
    +    hints_(0)
    +{ }
    +
    +WLayout::~WLayout()
    +{
    +  if (!parentLayout())
    +    setParent(0);
    +
    +  delete impl_;
    +  delete hints_;
    +  delete[] margins_;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +
    +void WLayout::getContentsMargins(int *left, int *top, int *right, int *bottom)
    +  const
    +{
    +  if (margins_) {
    +    *left = margins_[0];
    +    *top = margins_[1];
    +    *right = margins_[2];
    +    *bottom = margins_[3];
    +  } else {
    +    *left = 9;
    +    *right = 9;
    +    *top = 9;
    +    *bottom = 9;
    +  }
    +}
    +
    +#else // WT_TARGET_JAVA
    +
    +int WLayout::getContentsMargin(Side side) const
    +{
    +  if (!margins_)
    +    return 9;
    +
    +  switch (side) {
    +  case Left:
    +    return margins_[0];
    +  case Top:
    +    return margins_[1];
    +  case Right:
    +    return margins_[2];
    +  case Bottom:
    +    return margins_[3];
    +  default:
    +    return 9;
    +  }
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WLayout::setContentsMargins(int left, int top, int right, int bottom)
    +{
    +  if (!margins_)
    +    margins_ = new int[4];
    +
    +  margins_[0] = left;
    +  margins_[1] = top;
    +  margins_[2] = right;
    +  margins_[3] = bottom;
    +}
    +
    +int WLayout::indexOf(WLayoutItem *item) const
    +{
    +  int c = count();
    +  for (int i = 0; i < c; ++i)
    +    if (itemAt(i) == item)
    +      return i;
    +
    +  return -1;
    +}
    +
    +void WLayout::addWidget(WWidget *w)
    +{
    +  addItem(new WWidgetItem(w));
    +}
    +
    +bool WLayout::removeWidget(WWidget *w)
    +{
    +  WWidgetItem *widgetItem = findWidgetItem(w);
    +
    +  if (widgetItem) {
    +    widgetItem->parentLayout()->removeItem(widgetItem);
    +    delete widgetItem;
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void WLayout::updateAddItem(WLayoutItem *item)
    +{
    +  if (item->parentLayout())
    +    throw WtException("Cannot add item to two Layouts");
    +
    +  item->setParentLayout(this);
    +
    +  if (impl_) {
    +    item->setParentWidget(impl_->parentWidget());
    +    impl_->updateAddItem(item);
    +  }
    +}
    +
    +void WLayout::updateRemoveItem(WLayoutItem *item)
    +{
    +  if (impl_)
    +    impl_->updateRemoveItem(item);
    +
    +  item->setParentLayout(0);
    +}
    +
    +void WLayout::update(WLayoutItem *item)
    +{
    +  if (impl_)
    +    impl_->update(item);
    +}
    +
    +WWidgetItem *WLayout::findWidgetItem(WWidget *widget)
    +{
    +  int c = count();
    +
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = itemAt(i);
    +    if (item) {
    +      WWidgetItem *result = item->findWidgetItem(widget);
    +
    +      if (result)
    +	return result;
    +    }
    +  }
    +
    +  return 0;
    +}
    +
    +void WLayout::setLayoutInParent(WWidget *parent)
    +{
    +  parent->setLayout(this);
    +}
    +
    +void WLayout::setParentWidget(WWidget *parent)
    +{
    +  if (!this->parent())
    +    setParent(parent);
    +
    +  assert(!impl_);
    +
    +  int c = count();
    +  for (int i = 0; i < c; ++i) {
    +    WLayoutItem *item = itemAt(i);
    +    if (item)
    +      item->setParentWidget(parent);
    +  }
    +
    +  impl_ = parent->createLayoutItemImpl(this);
    +
    +  if (hints_) {
    +    for (unsigned i = 0; i < hints_->size(); ++i)
    +      impl_->setHint((*hints_)[i].name, (*hints_)[i].value);
    +    delete hints_;
    +    hints_ = 0;
    +  }
    +}
    +
    +void WLayout::setParentLayout(WLayout *layout)
    +{
    +  if (layout)
    +    layout->addChild(this);
    +  else
    +    setParent(0);
    +}
    +
    +WLayout *WLayout::parentLayout() const
    +{
    +  return dynamic_cast<WLayout *>(parent());
    +}
    +
    +void WLayout::setLayoutHint(const std::string& name, const std::string& value)
    +{
    +  if (impl_)
    +    impl_->setHint(name, value);
    +  else {
    +    if (!hints_)
    +      hints_ = new HintsList();
    +    hints_->push_back(Hint(name, value));
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLayoutItem b/wt-3.1.7a/src/Wt/WLayoutItem
    new file mode 100644
    index 0000000..0c56a58
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayoutItem
    @@ -0,0 +1,74 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLAYOUT_ITEM_H_
    +#define WLAYOUT_ITEM_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +  class WLayout;
    +  class WWidget;
    +  class WWidgetItem;
    +  class WLayoutItemImpl;
    +
    +/*! \class WLayoutItem Wt/WLayoutItem Wt/WLayoutItem
    + *  \brief An abstract base class for items that can participate in a layout.
    + *
    + * \sa WLayout
    + */
    +class WT_API WLayoutItem
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WLayoutItem();
    +
    +  /*! \brief Finds the widget item corresponding to the given <i>widget</i>
    +   *
    +   * The widget is searched for recursively inside nested layouts.
    +   */
    +  virtual WWidgetItem *findWidgetItem(WWidget *widget) = 0;
    +
    +  /*! \brief Returns the layout that implements this WLayoutItem.
    +   *
    +   * This implements a type-safe upcasting mechanism to a WLayout.
    +   */
    +  virtual WLayout *layout() = 0;
    +
    +  /*! \brief Returns the widget that is held by this WLayoutItem.
    +   *
    +   * This implements a type-safe upcasting mechanism to a WWidgetItem.
    +   */
    +  virtual WWidget *widget() = 0;
    +
    +  /*! \brief Returns the layout in which this item is contained.
    +   */
    +  virtual WLayout *parentLayout() const = 0;
    +
    +  /*! \brief Returns the implementation for this layout item.
    +   *
    +   * The implementation of a layout item depends on the kind of
    +   * container for which the layout does layout management.
    +   */
    +  virtual WLayoutItemImpl *impl() const = 0;
    +
    +private:
    +  /*! \brief Internal method.
    +   */
    +  virtual void setParentWidget(WWidget *parent) = 0;
    +  
    +  /*! \brief Internal method.
    +   */
    +  virtual void setParentLayout(WLayout *parentLayout) = 0;
    +
    +  friend class WLayout;
    +};
    +
    +}
    +
    +#endif // WLAYOUT_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WLayoutItem.C b/wt-3.1.7a/src/Wt/WLayoutItem.C
    new file mode 100644
    index 0000000..15123a1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayoutItem.C
    @@ -0,0 +1,15 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WLayoutItem"
    +#include "Wt/WLayout"
    +
    +namespace Wt {
    +
    +WLayoutItem::~WLayoutItem()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLayoutItemImpl b/wt-3.1.7a/src/Wt/WLayoutItemImpl
    new file mode 100644
    index 0000000..1ff2d6c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayoutItemImpl
    @@ -0,0 +1,56 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLAYOUT_ITEM_IMPL_H_
    +#define WLAYOUT_ITEM_IMPL_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <string>
    +
    +namespace Wt {
    +
    +class WLayoutItem;
    +class WWidget;
    +
    +/*! \class WLayoutItemImpl Wt/WLayoutItemImpl Wt/WLayoutItemImpl
    + *  \brief An abstract base class for implementing layout managers.
    + *
    + * \sa WLayoutItem, WLayout
    + */
    +class WT_API WLayoutItemImpl
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WLayoutItemImpl();
    +
    +  /*! \brief Adds a layout <i>item</i>.
    +   *
    +   * The \p item already has an implementation set.
    +   */
    +  virtual void updateAddItem(WLayoutItem *item) = 0;
    +
    +  /*! \brief Removes a layout <i>item</i>.
    +   */
    +  virtual void updateRemoveItem(WLayoutItem *item) = 0;
    +
    +  /*! \brief Updates the layout.
    +   */
    +  virtual void update(WLayoutItem *item) = 0;
    +
    +  /*! \brief Returns the widget for which this layout item participates in
    +   *         layout management.
    +   */
    +  virtual WWidget *parentWidget() const = 0;
    +
    +  /*! \brief Provides a hint that can aid in layout strategy / algorithm.
    +   */
    +  virtual void setHint(const std::string& name, const std::string& value) = 0;
    +};
    +
    +}
    +
    +#endif // WLAYOUT_ITEM_IMPL_H_
    diff --git a/wt-3.1.7a/src/Wt/WLayoutItemImpl.C b/wt-3.1.7a/src/Wt/WLayoutItemImpl.C
    new file mode 100644
    index 0000000..0f9a2b0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLayoutItemImpl.C
    @@ -0,0 +1,14 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WLayoutItemImpl"
    +
    +namespace Wt {
    +
    +WLayoutItemImpl::~WLayoutItemImpl()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLength b/wt-3.1.7a/src/Wt/WLength
    new file mode 100644
    index 0000000..c4631b8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLength
    @@ -0,0 +1,118 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLENGTH_H_
    +#define WLENGTH_H_
    +
    +#include <string>
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +/*! \class WLength Wt/WLength Wt/WLength
    + *  \brief A class that specifies a CSS length.
    + *
    + * The class combines a value with a unit. There is a special value
    + * <i>auto</i> which has a different meaning depending on the context.
    + */
    +class WT_API WLength
    +{
    +public:
    +  /*! \brief The unit
    +   */
    +  enum Unit {FontEm,     //!< The relative font size
    +	     FontEx,     //!< The height of an 'x' in the font
    +	     Pixel,      //!< Pixel, relative to canvas resolution
    +	     Inch,       //!< Inche
    +	     Centimeter, //!< Centimeter
    +	     Millimeter, //!< Millimeter
    +	     Point,      //!< Point (1/72 Inch)
    +	     Pica,       //!< Pica (12 Point)
    +	     Percentage  //!< Percentage (meaning context-sensitive)
    +  };
    +
    +  /*! \brief An 'auto' length.
    +   *
    +   * \sa WLength()
    +   */
    +  static WLength Auto;
    +
    +  /*! \brief Creates an 'auto' length
    +   *
    +   * Specifies an 'auto' length.
    +   *
    +   * \sa Auto
    +   */
    +  WLength();
    +
    +  /*! \brief Creates a length with value and unit.
    +   *
    +   * This constructor will also provide the implicit conversion between
    +   * a double and WLength, using a pixel unit.
    +   */
    +  WLength(double value, Unit unit = Pixel);
    +
    +  /*! \brief Returns whether the length is 'auto'.
    +   *
    +   * \sa WLength(), Auto
    +   */
    +  bool isAuto() const { return auto_; }
    +
    +  /*! \brief Returns the value.
    +   *
    +   * \sa unit()
    +   */
    +  double value() const { return value_; }
    +
    +  /*! \brief Returns the unit.
    +   *
    +   * \sa value()
    +   */
    +  Unit unit() const { return unit_; }
    +
    +  /*! \brief Returns the CSS text.
    +   */
    +  const std::string cssText() const;
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator== (const WLength& other) const;
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator!= (const WLength& other) const;
    +
    +  /*! \brief Returns the (approximate) length in pixels.
    +   *
    +   * When the length isAuto(), 0 is returned, otherwise the approximate
    +   * length in pixels.
    +   */
    +  double toPixels() const;
    +  
    +private:
    +  bool auto_;
    +  Unit unit_;
    +  double value_;
    +};
    +
    +inline Wt::WLength operator*(const Wt::WLength &l, double s)
    +{
    +  return Wt::WLength(l.value() * s, l.unit());
    +}
    +
    +inline Wt::WLength operator*(double s, const Wt::WLength &l)
    +{
    +  return l * s;
    +}
    +
    +inline Wt::WLength operator/(const Wt::WLength &l, double s)
    +{
    +  return l * (1/s);
    +}
    +
    +}
    +
    +#endif // WLENGTH_H_
    diff --git a/wt-3.1.7a/src/Wt/WLength.C b/wt-3.1.7a/src/Wt/WLength.C
    new file mode 100644
    index 0000000..cb8dc13
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLength.C
    @@ -0,0 +1,82 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WLength"
    +
    +#include "Utils.h"
    +
    +#include <stdio.h>
    +#include <boost/lexical_cast.hpp>
    +#include <cstring>
    +
    +namespace Wt {
    +
    +WLength WLength::Auto;
    +
    +WLength::WLength()
    +  : auto_(true),
    +    unit_(Pixel),
    +    value_(-1)
    +{ }
    +
    +WLength::WLength(double value, Unit unit)
    +  : auto_(false),
    +    unit_(unit),
    +    value_(value)
    +{ }
    +
    +bool WLength::operator== (const WLength& other) const
    +{
    +  return
    +       auto_  == other.auto_
    +    && unit_  == other.unit_
    +    && value_ == other.value_;
    +}
    +
    +bool WLength::operator!= (const WLength& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +const std::string WLength::cssText() const
    +{
    +  static const char *unitText[]
    +    = { "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" };
    +
    +  if (auto_)
    +    return "auto";
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    char buf[30];
    +    Utils::round_str(value_, 1, buf);
    +    std::strcat(buf, unitText[unit_]);
    +    return buf;
    +#else
    +    return boost::lexical_cast<std::string>(value_) + unitText[unit_];
    +#endif
    +  }
    +}
    +
    +double WLength::toPixels() const
    +{
    +  static const double pxPerPt = 4.0/3.0;
    +  static const double unitFactor[]
    +    = { 16,
    +	8,                   // approximate: ex/em is 0.46 to 0.56...
    +	1,
    +	72 * pxPerPt,        // 72 'CSS'points in an inch
    +	72 / 2.54 * pxPerPt, // 2.54 cm in an inch
    +	72 / 25.4 * pxPerPt, // 25.4 mm in an inch
    +	pxPerPt,
    +	12 * pxPerPt,        // 12 points per pica
    +	0.16 };              // 12pt = 16px = 1em = 100%
    +
    +  if (auto_)
    +    return 0;
    +  else
    +    return value_ * unitFactor[unit_];
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLengthValidator b/wt-3.1.7a/src/Wt/WLengthValidator
    new file mode 100644
    index 0000000..5afcddb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLengthValidator
    @@ -0,0 +1,129 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLENGTHVALIDATOR_H_
    +#define WLENGTHVALIDATOR_H_
    +
    +#include <limits>
    +
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +/*! \class WLengthValidator Wt/WLengthValidator Wt/WLengthValidator
    + *  \brief A validator that checks the string length of user input.
    + *
    + * This validator checks whether user input is within the specified range
    + * of accepted string lengths.
    + *
    + * If you only want to limit the length on a line edit, you may also
    + * use WLineEdit::setMaxLength().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
    + * Wt::WLengthValidator *validator = new Wt::WLengthValidator(5, 15);
    + * lineEdit->setValidator(validator);
    + * lineEdit->setText("abcdef");
    + * \endcode
    + * \endif
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WLengthValidator.TooShort: The input must be at least {1} characters
    + * - Wt.WLengthValidator.BadRange: The input must have a length between {1} and {2} characters
    + * - Wt.WLengthValidator.TooLong: The input must be no more than {1} characters
    + */
    +class WT_API WLengthValidator : public WValidator
    +{
    +public:
    +  /*! \brief Creates a length validator that accepts input of any length.
    +   */
    +  WLengthValidator(WObject *parent = 0);
    +
    +  /*! \brief Creates a length validator that accepts input within a length range.
    +   */
    +  WLengthValidator(int minLength, int maxLength, WObject *parent = 0);
    +
    +  /*! \brief Sets the minimum length.
    +   *
    +   * The default value is 0.
    +   */
    +  void setMinimumLength(int minimum);
    +
    +  /*! \brief Returns the minimum length.
    +   *
    +   * \sa setMinimumLength(int)
    +   */
    +  int minimumLength() const { return minLength_; }
    +
    +  /*! \brief Sets the maximum length.
    +   *
    +   * The default value is the maximum integer value. 
    +   */
    +  void setMaximumLength(int maximum);
    +
    +  /*! \brief Returns the maximum length.
    +   *
    +   * \sa setMaximumLength(int)
    +   */
    +  int maximumLength() const { return maxLength_; }
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * The input is considered valid only when it is blank for a non-mandatory
    +   * field, or has a length within the valid range.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +  /*! \brief Sets the message to display when the input is too short.
    +   *
    +   * Depending on whether maximumLength() is a real bound, the default
    +   * message is "The input must have a length between {1} and {2}
    +   * characters" or " "The input must be at least {1} characters".
    +   */
    +  void setInvalidTooShortText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input is too short.
    +   *
    +   * \sa setInvalidTooShortText(const WString&)
    +   */
    +  WString invalidTooShortText() const;
    +
    +  /*! \brief Sets the message to display when the input is too long.
    +   *
    +   * Depending on whether minimumLength() is different from zero, the
    +   * default message is "The input must have a length between {1} and
    +   * {2} characters" or " "The input must be no more than {2}
    +   * characters".
    +   */
    +  void setInvalidTooLongText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input is too long.
    +   *
    +   * \sa setInvalidTooLongText(const WString&)
    +   */
    +  WString invalidTooLongText() const;
    +
    +protected:
    +  std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +private:
    +  int minLength_;
    +  int maxLength_;
    +
    +  WString tooLongText_;
    +  WString tooShortText_;
    +};
    +
    +}
    +
    +#endif // WLENGTHVALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WLengthValidator.C b/wt-3.1.7a/src/Wt/WLengthValidator.C
    new file mode 100644
    index 0000000..fb47028
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLengthValidator.C
    @@ -0,0 +1,158 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WLengthValidator"
    +
    +namespace Wt {
    +
    +WLengthValidator::WLengthValidator(WObject *parent)
    +  : WValidator(parent),
    +    minLength_(0),
    +    maxLength_(std::numeric_limits<int>::max())
    +{ }
    +
    +WLengthValidator::WLengthValidator(int minLength, int maxLength,
    +				   WObject *parent)
    +  : WValidator(parent),
    +    minLength_(minLength),
    +    maxLength_(maxLength)
    +{ }
    +
    +void WLengthValidator::setMinimumLength(int minLength)
    +{
    +  if (minLength_ != minLength) {
    +    minLength_ = minLength;
    +    repaint();
    +  }
    +}
    +
    +void WLengthValidator::setMaximumLength(int maxLength)
    +{
    +  if (maxLength_ != maxLength) {
    +    maxLength_ = maxLength;
    +    repaint();
    +  }
    +}
    +
    +void WLengthValidator::setInvalidTooShortText(const WString& text)
    +{
    +  tooShortText_ = text;
    +  repaint();
    +}
    +
    +WString WLengthValidator::invalidTooShortText() const
    +{
    +  if (!tooShortText_.empty()) {
    +    WString s = tooShortText_;
    +    s.arg(minLength_).arg(maxLength_);
    +    return s;
    +  } else
    +    if (minLength_ == 0)
    +      return WString();
    +    else
    +      if (maxLength_ == std::numeric_limits<int>::max())
    +	return WString::tr("Wt.WLengthValidator.TooShort").arg(minLength_);
    +      else
    +	return WString::tr("Wt.WLengthValidator.BadRange")
    +          .arg(minLength_).arg(maxLength_);
    +}
    +
    +void WLengthValidator::setInvalidTooLongText(const WString& text)
    +{
    +  tooLongText_ = text;
    +  repaint();
    +}
    +
    +WString WLengthValidator::invalidTooLongText() const
    +{
    +  if (!tooLongText_.empty()) {
    +    WString s = tooLongText_;
    +    s.arg(minLength_).arg(maxLength_);
    +    return s;
    +  } else
    +    if (maxLength_ == std::numeric_limits<int>::max())
    +      return WString();
    +    else
    +      if (minLength_ == 0)
    +	return WString::tr("Wt.WLengthValidator.TooLong").arg(maxLength_);
    +      else
    +	return WString::tr("Wt.WLengthValidator.BadRange")
    +          .arg(minLength_).arg(maxLength_);
    +}
    +
    +WValidator::State WLengthValidator::validate(WT_USTRING& input) const
    +{
    +#ifndef WT_TARGET_JAVA
    +#ifndef WT_NO_STD_WSTRING
    +  std::wstring text = input.value();
    +#else
    +  std::string text = input.narrow();
    +#endif
    +#else
    +  std::string text = input;
    +#endif
    +
    +  if (isMandatory()) {
    +    if (text.empty())
    +      return InvalidEmpty;
    +  } else {
    +    if (text.empty())
    +      return Valid;
    +  }
    +
    +  if ((int)text.length() >= minLength_
    +      && (int)text.length() <= maxLength_)
    +    return Valid;
    +  else
    +    return Invalid;
    +}
    +
    +std::string WLengthValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  std::string js = "function(e,te,ts,tb){if(e.value.length==0)";
    +
    +  if (isMandatory())
    +    js += "return {valid:false,message:te};";
    +  else
    +    js += "return {valid:true};";
    +
    +  if (minLength_ != 0)
    +    js += "if(e.value.length<" + boost::lexical_cast<std::string>(minLength_)
    +      + ") return {valid:false,message:ts};";
    +  if (maxLength_ != std::numeric_limits<int>::max())
    +    js += "if(e.value.length>" + boost::lexical_cast<std::string>(maxLength_)
    +      + ") return {valid:false,message:tb};";
    +
    +  js += "return {valid:true};}(" + jsRef + ','
    +    + invalidBlankText().jsStringLiteral() + ','
    +    + invalidTooShortText().jsStringLiteral() + ','
    +    + invalidTooLongText().jsStringLiteral() + ')';
    +
    +  return js;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WLengthValidator::createExtConfig(std::ostream& config) const
    +{
    +  if (minLength_ != 0) {
    +    config << ",minLength:" << minLength_;
    +    if (!tooShortText_.empty())
    +      config << ",minLengthText:" << tooShortText_.jsStringLiteral();
    +  }
    +
    +  if (maxLength_ != std::numeric_limits<int>::max()) {
    +    config << ",maxLength:" << maxLength_;
    +    if (!tooLongText_.empty())
    +      config << ",maxLengthText:" << tooLongText_.jsStringLiteral();
    +  }
    +
    +  WValidator::createExtConfig(config);
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLineEdit b/wt-3.1.7a/src/Wt/WLineEdit
    new file mode 100644
    index 0000000..ba96391
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLineEdit
    @@ -0,0 +1,189 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLINEEDIT_H_
    +#define WLINEEDIT_H_
    +
    +#include <Wt/WFormWidget>
    +
    +namespace Wt {
    +
    +/*! \class WLineEdit Wt/WLineEdit Wt/WLineEdit
    + *  \brief A widget that provides a single line edit.
    + *
    + * To act upon text changes, connect a slot to the changed()
    + * signal. This signal is emitted when the user changed the content,
    + * and subsequently removes the focus from the line edit.
    + *
    + * To act upon editing, connect a slot to the keyWentUp() signal.
    + *
    + * At all times, the current content may be accessed with the text()
    + * method.
    + *
    + * You may specify a maximum length for the input using
    + * setMaxLength(). If you wish to provide more detailed input
    + * validation, you may set a validator using the
    + * setValidator(WValidator *) method. Validators provide, in general,
    + * both client-side validation (as visual feed-back only) and
    + * server-side validation when calling validate().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget();
    + * Wt::WLabel *label = new Wt::WLabel("Age:", w);
    + * Wt::WLineEdit *edit = new Wt::WLineEdit("13", w);
    + * edit->setValidator(new Wt::WIntValidator(0, 200));
    + * label->setBuddy(edit);
    + * \endcode
    + * \endif
    + *
    + * The widget corresponds to the HTML <tt>&lt;input type="text"&gt;</tt> or
    + * <tt>&lt;input type="password"&gt;</tt> tag.
    + *
    + * %WLineEdit is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The emptyText style can be configured via .Wt-edit-emptyText,
    + * other styling can be done using inline or external CSS as appropriate.
    + *
    + * \sa WTextArea
    + */
    +class WT_API WLineEdit : public WFormWidget
    +{
    +public:
    +  /*! \brief Enumeration that describes how the contents is displayed.
    +   *
    +   * \sa setEchoMode(EchoMode)
    +   */
    +  enum EchoMode { Normal,   //!< Characters are shown.
    +		  Password  //!< Hide the contents as for a password.
    +  };
    +
    +  /*! \brief Creates a line edit with empty content and optional parent.
    +   */
    +  WLineEdit(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a line edit with given content and optional parent.
    +   */
    +  WLineEdit(const WT_USTRING& content, WContainerWidget *parent = 0);
    +
    +  /*! \brief Specifies the width of the line edit in number of characters.
    +   *
    +   * This specifies the width of the line edit that is roughly
    +   * equivalent with \p chars characters. This does not limit the
    +   * maximum length of a string that may be entered, which may be set
    +   * using setMaxLength(int).
    +   *
    +   * The default value is 10.
    +   */
    +  void setTextSize(int chars);
    +
    +  /*! \brief Returns the current width of the line edit in number of characters.
    +   *
    +   * \sa setTextSize(int)
    +   */
    +  int textSize() const { return textSize_; }
    +
    +  /*! \brief Sets the content of the line edit.
    +   *
    +   * The default value is "".
    +   *
    +   * \sa text()
    +   */
    +  virtual void setText(const WT_USTRING& text);
    +
    +  /*! \brief Returns the current content.
    +   *
    +   * \sa setText()
    +   */
    +  const WT_USTRING& text() const { return content_; }
    +
    +  /*! \brief Specifies the maximum length of text that can be entered.
    +   *
    +   * A value <= 0 indicates that there is no limit.
    +   *
    +   * The default value is -1.
    +   */
    +  void setMaxLength(int length);
    +
    +  /*! \brief Returns the maximum length of text that can be entered.
    +   *
    +   * \sa setMaxLength(int)
    +   */
    +  int maxLength() const { return maxLength_; }
    +
    +  /*! \brief Sets the echo mode.
    +   *
    +   * The default echo mode is Normal.
    +   */
    +  void setEchoMode(EchoMode echoMode);
    +
    +  /*! \brief Returns the echo mode.
    +   *
    +   * \sa setEchoMode(EchoMode)
    +   */
    +  EchoMode echoMode() const { return echoMode_; }
    +
    +  /*! \brief Returns the current selection start.
    +   *
    +   * Returns -1 if there is no selected text.
    +   *
    +   * \sa hasSelectedText(), selectedText()
    +   */
    +  int selectionStart() const;
    +
    +  /*! \brief Returns the currently selected text.
    +   *
    +   * Returns an empty string if there is currently no selected text.
    +   *
    +   * \sa hasSelectedText()
    +   */
    +  WT_USTRING selectedText() const;
    +
    +  /*! \brief Returns whether there is selected text.
    +   *
    +   * \sa selectedtext()
    +   */
    +  bool hasSelectedText() const;
    +
    +  /*! \brief Returns the current cursor position.
    +   *
    +   * Returns -1 if the widget does not have the focus.
    +   */
    +  int cursorPosition() const;
    +
    +  WValidator::State validate();
    +
    +private:
    +  WT_USTRING content_;
    +  int        textSize_;
    +  int        maxLength_;
    +  EchoMode   echoMode_;
    +
    +  static const int BIT_CONTENT_CHANGED    = 0;
    +  static const int BIT_TEXT_SIZE_CHANGED  = 1;
    +  static const int BIT_MAX_LENGTH_CHANGED = 2;
    +  static const int BIT_ECHO_MODE_CHANGED  = 3;
    +
    +  std::bitset<4> flags_;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +  virtual void setFormData(const FormData& formData);
    +
    +  virtual int boxPadding(Orientation orientation) const;
    +  virtual int boxBorder(Orientation orientation) const;
    +};
    +
    +}
    +
    +#endif // WLINEEDIT_H_
    diff --git a/wt-3.1.7a/src/Wt/WLineEdit.C b/wt-3.1.7a/src/Wt/WLineEdit.C
    new file mode 100644
    index 0000000..75de1e6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLineEdit.C
    @@ -0,0 +1,232 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WLineEdit"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WStringUtil"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WLineEdit::WLineEdit(WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    textSize_(10),
    +    maxLength_(-1),
    +    echoMode_(Normal)
    +{ 
    +  setInline(true);
    +  setFormObject(true);
    +}
    +
    +WLineEdit::WLineEdit(const WT_USTRING& text, WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    content_(text),
    +    textSize_(10),
    +    maxLength_(-1),
    +    echoMode_(Normal)
    +{ 
    +  setInline(true);
    +  setFormObject(true);
    +}
    +
    +void WLineEdit::setText(const WT_USTRING& text)
    +{
    +  if (content_ != text) {
    +    content_ = text;
    +    flags_.set(BIT_CONTENT_CHANGED);
    +    repaint(RepaintPropertyIEMobile);
    +
    +    validate();
    +
    +    updateEmptyText();
    +  }
    +}
    +
    +void WLineEdit::setTextSize(int chars)
    +{
    +  if (textSize_ != chars) {
    +    textSize_ = chars;
    +    flags_.set(BIT_TEXT_SIZE_CHANGED);
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WLineEdit::setMaxLength(int chars)
    +{
    +  if (maxLength_ != chars) {
    +    maxLength_ = chars;
    +    flags_.set(BIT_MAX_LENGTH_CHANGED);
    +    // IMPROVE: could be RepaintPropertyIEMobile if we would use property
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WLineEdit::setEchoMode(EchoMode echoMode)
    +{
    +  if (echoMode_ != echoMode) {
    +    echoMode_ = echoMode;
    +    flags_.set(BIT_ECHO_MODE_CHANGED);
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WLineEdit::updateDom(DomElement& element, bool all)
    +{
    +  if (all || flags_.test(BIT_CONTENT_CHANGED)) {
    +    element.setProperty(Wt::PropertyValue, content_.toUTF8());
    +    flags_.reset(BIT_CONTENT_CHANGED);
    +  }
    +
    +  if (all || flags_.test(BIT_ECHO_MODE_CHANGED)) {
    +    element.setAttribute("type", echoMode_ == Normal ? "text" : "password");
    +    flags_.reset(BIT_ECHO_MODE_CHANGED);
    +  }
    +
    +  if (all || flags_.test(BIT_TEXT_SIZE_CHANGED)) {
    +    element.setAttribute("size",
    +			 boost::lexical_cast<std::string>(textSize_));
    +    flags_.reset(BIT_TEXT_SIZE_CHANGED);
    +  }
    +
    +  if (all || flags_.test(BIT_MAX_LENGTH_CHANGED)) {
    +    if (!all || maxLength_ > 0)
    +      element.setAttribute("maxLength",
    +			   boost::lexical_cast<std::string>(maxLength_));
    +
    +    flags_.reset(BIT_MAX_LENGTH_CHANGED);
    +  }
    +
    +  WFormWidget::updateDom(element, all);
    +}
    +
    +void WLineEdit::getDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app)
    +{
    +  if (app->environment().agentIsIE() && flags_.test(BIT_ECHO_MODE_CHANGED)) {
    +    DomElement *e = DomElement::getForUpdate(this, domElementType());
    +    DomElement *d = createDomElement(app);
    +    e->replaceWith(d);
    +    result.push_back(e);
    +  } else
    +    WFormWidget::getDomChanges(result, app);
    +}
    +
    +void WLineEdit::propagateRenderOk(bool deep)
    +{
    +  flags_.reset();
    +
    +  WFormWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WLineEdit::domElementType() const
    +{
    +  return DomElement_INPUT;
    +}
    +
    +void WLineEdit::setFormData(const FormData& formData)
    +{
    +  // if the value was updated through the API, then ignore the update from
    +  // the browser, this happens when an action generated multiple events,
    +  // and we do not want to revert the changes made through the API
    +  if (flags_.test(BIT_CONTENT_CHANGED))
    +    return;
    +
    +  if (!Utils::isEmpty(formData.values)) {
    +    const std::string& value = formData.values[0];
    +    content_ = WT_USTRING::fromUTF8(value, true);
    +  }
    +}
    +
    +WValidator::State WLineEdit::validate()
    +{
    +  if (validator()) {
    +    WValidator::State result = validator()->validate(content_);
    +    if (result == WValidator::Valid)
    +      removeStyleClass("Wt-invalid", true);
    +    else
    +      addStyleClass("Wt-invalid", true);
    +
    +    return result;
    +  } else
    +    return WValidator::Valid;
    +}
    +
    +
    +int WLineEdit::boxPadding(Orientation orientation) const
    +{
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  if (env.agentIsIE() || env.agentIsOpera())
    +    return 1;
    +  else if (env.agent() == WEnvironment::Arora)
    +    return 0;
    +  else if (env.userAgent().find("Mac OS X") != std::string::npos)
    +    return 1;
    +  else if (env.userAgent().find("Windows") != std::string::npos
    +	   && !env.agentIsGecko())
    +    return 0;
    +  else
    +    return 1;
    +}
    +
    +int WLineEdit::boxBorder(Orientation orientation) const
    +{
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  if (env.userAgent().find("Mac OS X") != std::string::npos
    +      && env.agentIsGecko())
    +    return 3;
    +  else if (env.agent() == WEnvironment::Arora)
    +    return 0;
    +  else
    +    return 2;
    +}
    +
    +int WLineEdit::selectionStart() const
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->focus() == id()) {
    +    if (app->selectionStart() != -1
    +	&& app->selectionEnd() != app->selectionStart()) {
    +      return app->selectionStart();
    +    } else
    +      return -1;
    +  } else
    +    return -1;
    +}
    +
    +WT_USTRING WLineEdit::selectedText() const
    +{
    +  if (selectionStart() != -1) {
    +    WApplication *app = WApplication::instance();
    +
    +    return WString::fromUTF8(UTF8Substr(text().toUTF8(), app->selectionStart(),
    +		    app->selectionEnd() - app->selectionStart()));
    +  } else
    +    return WString::Empty;
    +}
    +
    +bool WLineEdit::hasSelectedText() const
    +{
    +  return selectionStart() != -1;
    +}
    +
    +int WLineEdit::cursorPosition() const
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->focus() == id())
    +    return app->selectionEnd();
    +  else
    +    return -1;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLineF b/wt-3.1.7a/src/Wt/WLineF
    new file mode 100644
    index 0000000..eb0fe41
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLineF
    @@ -0,0 +1,84 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLINEF_H_
    +#define WLINEF_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WPointF;
    +
    +/*! \class WLineF Wt/WLineF Wt/WLineF
    + *  \brief Utility class that defines a single line.
    + *
    + * \ingroup painting
    + */
    +class WT_API WLineF
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Constructs a line from (<i>x1=0</i>,<i>y1=0</i>) to (<i>x2=0</i>,\p y2=0).
    +   */
    +  WLineF();
    +
    +  /*! \brief Construct a line connecting two points.
    +   *
    +   * Constructs a line from <i>p1</i> to \p p2.
    +   */
    +  WLineF(const WPointF& p1, const WPointF& p2);
    +
    +  /*! \brief Construct a line connecting two points.
    +   *
    +   * Constructs a line from (<i>x1</i>,<i>y1</i>) to (<i>x2</i>,\p y2).
    +   */
    +  WLineF(double x1, double y1, double x2, double y2);
    +
    +  /*! \brief Returns the X coordinate of the first point.
    +   *
    +   * \sa y1(), p1()
    +   */
    +  double x1() const { return x1_; }
    +
    +  /*! \brief Returns the Y coordinate of the first point.
    +   *
    +   * \sa x1(), p1()
    +   */
    +  double y1() const { return y1_; }
    +
    +  /*! \brief Returns the X coordinate of the second point.
    +   *
    +   * \sa y2(), p2()
    +   */
    +  double x2() const { return x2_; }
    +
    +  /*! \brief Returns the Y coordinate of the second point.
    +   *
    +   * \sa x2(), p2()
    +   */
    +  double y2() const { return y2_; }
    +
    +  /*! \brief Returns the first point.
    +   *
    +   * \sa x1(), y1()
    +   */
    +  WPointF p1() const;
    +
    +  /*! \brief Returns the second point.
    +   *
    +   * \sa x2(), y2()
    +   */
    +  WPointF p2() const;
    +
    +private:
    +  double x1_, y1_, x2_, y2_;
    +};
    +
    +};
    +
    +#endif // WLINEF_H_
    diff --git a/wt-3.1.7a/src/Wt/WLineF.C b/wt-3.1.7a/src/Wt/WLineF.C
    new file mode 100644
    index 0000000..feed492
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLineF.C
    @@ -0,0 +1,35 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WLineF>
    +#include <Wt/WPointF>
    +
    +namespace Wt {
    +
    +WLineF::WLineF()
    +  : x1_(0), y1_(0), x2_(0), y2_(0)
    +{ }
    +
    +WLineF::WLineF(const WPointF& p1, const WPointF& p2)
    +  : x1_(p1.x()), y1_(p1.y()), x2_(p2.x()), y2_(p2.y())
    +{ }
    +
    +WLineF::WLineF(double x1, double y1, double x2, double y2)
    +  : x1_(x1), y1_(y1), x2_(x2), y2_(y2)
    +{ }
    +
    +WPointF WLineF::p1() const
    +{
    +  return WPointF(x1_, y1_);
    +}
    +
    +WPointF WLineF::p2() const
    +{
    +  return WPointF(x2_, y2_);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLoadingIndicator b/wt-3.1.7a/src/Wt/WLoadingIndicator
    new file mode 100644
    index 0000000..f23b556
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLoadingIndicator
    @@ -0,0 +1,68 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLOADING_INDICATOR_H_
    +#define WLOADING_INDICATOR_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WString;
    +class WWidget;
    +
    +/*! \class WLoadingIndicator Wt/WLoadingIndicator Wt/WLoadingIndicator
    + *  \brief An abstract interface for a loading indicator.
    + *
    + * The loading indicator displays a message while a response from the
    + * server is pending.
    + *
    + * By providing a custom implementation of this interface, you may use
    + * a custom loading indicator using
    + * WApplication::setLoadingIndicator(),instead of the default
    + * implementation (WDefaultLoadingIndicator).
    + *
    + * \sa WApplication::setLoadingIndicator()
    + */
    +class WT_API WLoadingIndicator
    +{
    +public:
    +  /*! \brief Destructor.
    +   *
    +   * The destructor must delete the widget().
    +   */
    +  virtual ~WLoadingIndicator();
    +
    +  /*! \brief Returns the widget that visually represents the indicator.
    +   *
    +   * You should reimplement this method to return a widget that will
    +   * be shown to indicate that a response is pending. The widget
    +   * should be positioned using CSS.
    +   *
    +   * The widget will be shown and hidden using WWidget::show() and
    +   * WWidget::hide(). If you want to customize this behaviour, you
    +   * should reimplement the WWidget::setHidden() method. Note that
    +   * show() and hide() are stateless slots, and thus you need to make
    +   * sure that your implementation comforms to that contract, so that
    +   * it may be optimized to JavaScript (the server-side implementation
    +   * will only be called during stateless slot prelearning).
    +   *
    +   * \note The widget will not be added to the WApplication::root() container.
    +   */
    +  virtual WWidget *widget() = 0;
    +
    +  /*! \brief Sets the message that you want to be displayed.
    +   *
    +   * If the indicator is capable of displaying a text message, then
    +   * you should reimplement this method to allow this message to be
    +   * modified.
    +   */
    +  virtual void setMessage(const WString& text) = 0;
    +};
    +
    +}
    +
    +#endif // WLOADING_INDICATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WLoadingIndicator.C b/wt-3.1.7a/src/Wt/WLoadingIndicator.C
    new file mode 100644
    index 0000000..e616bec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLoadingIndicator.C
    @@ -0,0 +1,14 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WLoadingIndicator"
    +
    +namespace Wt {
    +
    +  WLoadingIndicator::~WLoadingIndicator() {
    +  }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLocalizedStrings b/wt-3.1.7a/src/Wt/WLocalizedStrings
    new file mode 100644
    index 0000000..8a258c3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLocalizedStrings
    @@ -0,0 +1,75 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLOCALIZED_STRINGS_
    +#define WLOCALIZED_STRINGS_
    +
    +#include <string>
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WString;
    +
    +/*! \class WLocalizedStrings Wt/WLocalizedStrings Wt/WLocalizedStrings
    + *  \brief An abstract class that provides support for localized strings.
    + *
    + * This abstract class provides the content to localized WStrings, by
    + * resolving the key to a string using the current application locale.
    + *
    + * \sa WString::tr(), WApplication::setLocalizedStrings()
    + */
    +class WT_API WLocalizedStrings
    +{
    +public:
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WLocalizedStrings();
    +
    +  /*! \brief Rereads the message resources.
    +   *
    +   * Purge any cached key/values, if applicable.
    +   *
    +   * The default implementation does nothing.
    +   */
    +  virtual void refresh();
    +
    +  /*! \brief Purges memory resources, if possible.
    +   * 
    +   * This is called afer event handling, and is an opportunity to
    +   * conserve memory inbetween events, by freeing memory used for
    +   * cached key/value bindings, if applicable.
    +   *
    +   * The default implementation does nothing.
    +   */
    +  virtual void hibernate();
    +
    +  /*! \brief Resolves a key in the current locale.
    +   * 
    +   * This method is used by WString to obtain the UTF8 value corresponding
    +   * to a key in the current locale.
    +   *
    +   * \if cpp
    +   * Returns \c true if the key could be resolved. The value is written
    +   * in \p result, encoded using UTF8.
    +   * \endif
    +   *
    +   * \if java
    +   * Returns the value if the key could be resolved. Returns \c null otherwise.
    +   * \endif
    +   *
    +   * \sa WApplication::locale()
    +   */
    +#ifndef WT_TARGET_JAVA
    +  virtual bool resolveKey(const std::string& key, std::string& result) = 0;
    +#else // WT_TARGET_JAVA
    +  virtual std::string *resolveKey(const std::string& key) = 0;
    +#endif // WT_TARGET_JAVA
    +};
    +
    +}
    +
    +#endif // WSTRING_TRANSLATOR_
    diff --git a/wt-3.1.7a/src/Wt/WLocalizedStrings.C b/wt-3.1.7a/src/Wt/WLocalizedStrings.C
    new file mode 100644
    index 0000000..b88d8c6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLocalizedStrings.C
    @@ -0,0 +1,21 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WLocalizedStrings"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WLocalizedStrings::~WLocalizedStrings()
    +{ }
    +
    +void WLocalizedStrings::refresh()
    +{ }
    +
    +void WLocalizedStrings::hibernate()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WLogger b/wt-3.1.7a/src/Wt/WLogger
    new file mode 100644
    index 0000000..93e6797
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLogger
    @@ -0,0 +1,243 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WLOGGER_H_
    +#define WLOGGER_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <iostream>
    +#include <sstream>
    +#include <string>
    +#include <vector>
    +
    +namespace Wt {
    +
    +class WLogEntry;
    +
    +/*! \class WLogger Wt/WLogger Wt/WLogger
    + *  \brief A simple logging class.
    + *
    + * This class logs events to a stream in a flexible way. It allows to
    + * create log files using the commonly used <a
    + * href="http://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format">Common
    + * Log Format</a> or <a
    + * href="http://httpd.apache.org/docs/1.3/logs.html#combined">Combined
    + * Log Format</a>, but provides a general way for logging entries that
    + * consists of a fixed number of fields.
    + *
    + * It is used by %Wt to create the application log
    + * (WApplication::log()), and built-in httpd access log.
    + *
    + * To use this class for custom logging, you should instantiate a
    + * logger, add one or more field definitions using addField(), and set
    + * an output stream using setStream() or setFile(). To stream data to
    + * the logger, use entry() to start formatting a new entry.
    + *
    + * Usage example:
    + * \code
    + * // Setup the logger
    + * Wt::WLogger logger;
    + * logger.addField("datetime", false);
    + * logger.addField("session", false);
    + * logger.addField("type", false);
    + * logger.addField("message", true);
    + *
    + * logger.setFile("/tmp/mylog.txt");
    + *
    + * // Add an entry
    + * Wt::WLogEntry entry = logger.entry();
    + * entry << Wt::WLogger::timestamp << Wt::WLogger::sep
    + *       << '[' << wApp->sessionId() << ']' << Wt::WLogger::sep
    + *       << '[' << "notice" << ']' << Wt::WLogger::sep
    + *       << "Succesfully started.";
    + * \endcode
    + *
    + * \sa WApplication::log()
    + */
    +class WT_API WLogger
    +{
    +public:
    +  /*! \brief Class that indicates a field separator.
    +   *
    +   * \sa sep
    +   */
    +  struct Sep { };
    +
    +  /*! \brief %Field separator constant.
    +   *
    +   * \sa WLogEntry::operator<<(const WLogger::Sep&)
    +   */
    +  static const Sep sep;
    +
    +  /*! \brief Class that indicates a time stamp.
    +   *
    +   * \sa timestamp
    +   */
    +  struct TimeStamp { };
    +
    +  /*! \brief Timestamp field constant.
    +   *
    +   * \sa WLogEntry::operator<<(const WLogger::TimeStamp&)
    +   */
    +  static const TimeStamp timestamp;
    +
    +  /*! \brief Class that holds the configuration for a single field.
    +   *
    +   * \sa addField()
    +   */
    +  class Field {
    +  public:
    +    /*! \brief Returns the field name.
    +     */
    +    std::string name() const { return name_; }
    +
    +    /*! \brief Returns if the field is a quoted string.
    +     *
    +     * String fields can contain white-space, and are therefore quoted
    +     * in the log.
    +     */
    +    bool isString() const { return string_; }
    +
    +  private:
    +    std::string name_;
    +    bool string_;
    +
    +    Field(const std::string& name, bool isString);
    +
    +    friend class WLogger;
    +  };
    +
    +  /*! \brief Create a new logger.
    +   */
    +  WLogger();
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WLogger();
    +
    +  /*! \brief Set the output stream.
    +   *
    +   * \sa setFile()
    +   */
    +  void setStream(std::ostream& o);
    +
    +  /*! \brief Set the output file.
    +   *
    +   * Opens a file output stream for \p path.
    +   *
    +   * \sa setStream()
    +   */
    +  void setFile(const std::string& path);
    +
    +  /*! \brief Add a field.
    +   *
    +   * Add a field to the logger. When \p isString is \p true, values
    +   * will be quoted.
    +   */
    +  void addField(const std::string& name, bool isString);
    +
    +  /*! \brief Returns the field list.
    +   */
    +  const std::vector<Field>& fields() const { return fields_; }
    +
    +  /*! \brief Start a new log entry.
    +   *
    +   * Returns a new entry. The entry is logged in the destructor of
    +   * the entry (i.e. when the entry goes out of scope).
    +   */
    +  WLogEntry entry() const;
    +
    +private:
    +  std::ostream*      o_;
    +  bool               ownStream_;
    +  std::vector<Field> fields_;
    +
    +  void addLine(const std::string& s) const;
    +
    +  friend class WLogEntry;
    +};
    +
    +/*! \class WLogEntry Wt/WLogger Wt/WLogger
    + *  \brief A stream-like object for creating an entry in a log file.
    + *
    + * This class is returned by WLogger::entry() and creates a log entry using
    + * a stream-like interface.
    + */
    +class WT_API WLogEntry
    +{
    +public:
    +  /*! \brief Copy constructor.
    +   *
    +   * Only the new object can be used, the original object is no longer
    +   * valid.
    +   */
    +  WLogEntry(const WLogEntry& from);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WLogEntry();
    +
    +  /*! \brief Writes a field separator.
    +   *
    +   * You must separate fields in a single entry using the WLogger::sep
    +   * constant.
    +   */
    +  WLogEntry& operator<< (const WLogger::Sep&);
    +
    +  /*! \brief Writes a time stamp in the current field.
    +   *
    +   * Formats a timestamp (date+time) to the current field.
    +   */
    +  WLogEntry& operator<< (const WLogger::TimeStamp&);
    +
    +  /*! \brief Writes a string in the current field.
    +   */
    +  WLogEntry& operator<< (const char *);
    +
    +  /*! \brief Writes a string in the current field.
    +   */
    +  WLogEntry& operator<< (const std::string&);
    +
    +  /*! \brief Writes a number value in the current field.
    +   */
    +  template <typename T>
    +  WLogEntry& operator<< (T t) {
    +    startField();
    +    impl_->currentLine_ << t;
    +
    +    return *this;
    +  }
    +
    +private:
    +  struct Impl {
    +    const WLogger&    logger_;
    +    std::stringstream currentLine_;
    +    int               currentField_;
    +    bool              fieldStarted_;
    +
    +    Impl(const WLogger& logger);
    +
    +    bool quote() const;
    +
    +    void finish();
    +    void finishField();
    +    void nextField();
    +    void startField();
    +  };
    +
    +  mutable Impl *impl_;
    +
    +  WLogEntry(const WLogger& logger);
    +
    +  void checkImpl();
    +  void startField();
    +
    +  friend class WLogger;
    +};
    +
    +}
    +
    +#endif // WLOGGER_H_
    diff --git a/wt-3.1.7a/src/Wt/WLogger.C b/wt-3.1.7a/src/Wt/WLogger.C
    new file mode 100644
    index 0000000..33f7c71
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WLogger.C
    @@ -0,0 +1,200 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <fstream>
    +#include <boost/date_time/posix_time/posix_time.hpp>
    +using namespace boost::posix_time;
    +
    +#include "Wt/WLogger"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WLogEntry::WLogEntry(const WLogEntry& other)
    +  : impl_(other.impl_)
    +{
    +  other.impl_ = 0;
    +}
    +
    +WLogEntry::~WLogEntry()
    +{
    +  if (impl_) {
    +    impl_->finish();
    +    impl_->logger_.addLine(impl_->currentLine_.str());
    +  }
    +
    +  delete impl_;
    +}
    +
    +WLogEntry& WLogEntry::operator<< (const WLogger::Sep&)
    +{
    +  checkImpl();
    +
    +  impl_->nextField();
    +
    +  return *this;
    +}
    +
    +WLogEntry& WLogEntry::operator<< (const WLogger::TimeStamp&)
    +{
    +  std::string dt = to_simple_string(microsec_clock::local_time());
    +
    +  return *this << '[' << dt << ']';
    +}
    +
    +WLogEntry& WLogEntry::operator<< (const char *s)
    +{
    +  return *this << std::string(s);
    +}
    +
    +WLogEntry& WLogEntry::operator<< (const std::string& s)
    +{
    +  checkImpl();
    +
    +  if (impl_->quote()) {
    +    startField();
    +
    +    std::string ss(s);
    +    Wt::Utils::replace(ss, '"', "\"\"");
    +
    +    impl_->currentLine_ << ss;
    +  } else
    +    if (!s.empty()) {
    +      startField();
    +      impl_->currentLine_ << s;
    +    }
    +
    +  return *this;
    +}
    +
    +WLogEntry::WLogEntry(const WLogger& logger)
    +{ 
    +  impl_ = new Impl(logger);
    +}
    +
    +void WLogEntry::checkImpl()
    +{
    +  if (!impl_)
    +    throw WtException("WLogger: cannot use copied WLogEntry");
    +}
    +
    +void WLogEntry::startField()
    +{
    +  checkImpl();
    +
    +  impl_->startField();
    +}
    +
    +WLogEntry::Impl::Impl(const WLogger& logger)
    +  : logger_(logger),
    +    currentField_(0),
    +    fieldStarted_(false)
    +{ }
    +
    +void WLogEntry::Impl::startField()
    +{
    +  if (!fieldStarted_) {
    +    if (quote())
    +      currentLine_ << '"';
    +    fieldStarted_ = true;
    +  }
    +}
    +
    +void WLogEntry::Impl::finishField()
    +{
    +  if (fieldStarted_) {
    +    if (quote())
    +      currentLine_ << '"';
    +  } else
    +    currentLine_ << '-';
    +}
    +
    +void WLogEntry::Impl::nextField()
    +{
    +  finishField();
    +
    +  currentLine_ << ' ';
    +  fieldStarted_ = false;
    +  ++currentField_;
    +}
    +
    +void WLogEntry::Impl::finish()
    +{
    +  while (currentField_ < (int)logger_.fields().size() - 1)
    +    nextField();
    +
    +  finishField();
    +}
    +
    +bool WLogEntry::Impl::quote() const
    +{
    +  return logger_.fields()[currentField_].isString();
    +}
    +
    +const WLogger::Sep WLogger::sep = WLogger::Sep();
    +const WLogger::TimeStamp WLogger::timestamp = WLogger::TimeStamp();
    +
    +WLogger::Field::Field(const std::string& name, bool isString)
    +  : name_(name),
    +    string_(isString)
    +{ }
    +
    +WLogger::WLogger()
    +  : o_(0),
    +    ownStream_(false)
    +{ }
    +
    +WLogger::~WLogger()
    +{ 
    +  if (ownStream_)
    +    delete o_;
    +}
    +
    +void WLogger::setStream(std::ostream& o)
    +{
    +  if (ownStream_)
    +    delete o_;
    +
    +  o_ = &o;
    +  ownStream_ = false;
    +}
    +
    +void WLogger::setFile(const std::string& path)
    +{
    +  if (ownStream_)
    +    delete o_;
    +
    +#ifdef _MSC_VER
    +  FILE *file = _fsopen(path.c_str(), "at", _SH_DENYNO);
    +  if (file) {
    +    o_ = new std::ofstream(file);
    +  } else {
    +    o_ = new std::ofstream(path.c_str(), std::ios_base::out | std::ios_base::ate);
    +  }
    +#else
    +  o_ = new std::ofstream(path.c_str(), std::ios_base::out | std::ios_base::ate);
    +#endif
    +  ownStream_ = true;
    +}
    +
    +void WLogger::addField(const std::string& name, bool isString)
    +{
    +  fields_.push_back(Field(name, isString));
    +}
    +
    +WLogEntry WLogger::entry() const
    +{
    +  return WLogEntry(*this);
    +}
    +
    +void WLogger::addLine(const std::string& s) const
    +{
    +  if (o_)
    +    *o_ << s << std::endl;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMatrix4x4 b/wt-3.1.7a/src/Wt/WMatrix4x4
    new file mode 100644
    index 0000000..09082e3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMatrix4x4
    @@ -0,0 +1,397 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMATRIX4X4_H_
    +#define WMATRIX4X4_H_
    +
    +#include <Wt/WGenericMatrix>
    +
    +namespace Wt {
    +
    +/*! \class WMatrix4x4 Wt/WMatrix4x4 Wt/WMatrix4x4
    + *  \brief A 3D affine transformation matrix.
    + *
    + * The matrix is a 4x4 matrix encoded using 16 parameters. The matrix
    + * stores its data internally in row order.
    + *
    + * Normally, a transformation matrix (composed translation/rotation/scale,
    + * but without perspective) is of this form:
    + * \code
    + * m00 m01 m02 dx
    + * m10 m11 m12 dy
    + * m20 m21 m22 dz
    + * 0   0   0   1
    + * \endcode
    + *
    + * In this representation, dx, dy and dz (= m(0, 3), m(1, 3) and m(2, 3))
    + * represent the translation components, and m(<i>x, y</i>) represent a
    + * 3D matrix that contains the scale, rotation (and skew) components. The
    + * matrix is also capable of representing perspective projections. In that
    + * case, the matrix will not match the form depicted above.
    + *
    + * In order to calculate the transformed vector w of a 3D vector v by the
    + * transformation contained in matrix T, v will be left-multiplied by T:
    + * \code
    + * w = T * v;
    + * \endcode
    + * In the formula above, v and w are homogenous 3D column vectors
    + * (x, y, z, w), equal to (x/w, y/w, z/w, 1). In normal use cases w is 1,
    + * except for vectors that were transformed by a perspective projection
    + * matrix.
    + *
    + * The transformation is used to represent a tansformed coordinate
    + * system, and provides methods to rotate(), scale() or
    + * translate() this coordinate system.
    + *
    + * This matrix class is matched to OpenGL's coordinate system and
    + * matrix notation. The rotate, translate, scale, lookAt, perspective,
    + * frustum and ortho methods of this class behave exactly like
    + * their OpenGL equivalents. The only difference is that the storage of this
    + * matrix is row-major, while OpenGL uses column-major. This should
    + * only be a concern if you need to access the raw data of the matrix,
    + * in which case you should use transposed().data() instead.
    + * When WWebGL uses this class, it sends the data in the correct order
    + * to the client.
    + *
    + */
    +class WT_API WMatrix4x4: public WGenericMatrix<double, 4, 4>
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Creates the identity transformation matrix.
    +   */
    +  WMatrix4x4() {}
    +
    +  /*! \brief Copy constructor.
    +   */
    +  WMatrix4x4(const WMatrix4x4 &other): WGenericMatrix<double, 4, 4>(other) {}
    +  
    +  /*! \brief Construct for a WGenericMatrix
    +   *
    +   * Creates the identity transformation matrix. As we inherit from
    +   * WGenericMatrix, most overloaded operators create a WGenericMatrix.
    +   * This implicit constructor ensures that you will not notice this.
    +   */
    +  WMatrix4x4(const WGenericMatrix<double, 4, 4> &other): WGenericMatrix<double, 4, 4>(other) {}
    +
    +  /*! \brief Constructs a matrix from an array of elements.
    +   *
    +   * The input array is assumed to be in row-major order. If elements is 0,
    +   * the matrix is not initialized.
    +   */
    +  // Assumes d is ROW order
    +  explicit WMatrix4x4(double *d): WGenericMatrix<double, 4, 4>(d) {}
    +
    +  /*! \brief Construct a custom matrix by specifying the parameters.
    +   *
    +   * Creates a matrix from the specified parameters.
    +   */
    +  WMatrix4x4(double m11, double m12, double m13, double m14,
    +    double m21, double m22, double m23, double m24,
    +    double m31, double m32, double m33, double m34,
    +    double m41, double m42, double m43, double m44): WGenericMatrix<double, 4, 4>(0)
    +  {
    +    (*this)(0, 0) = m11;
    +    (*this)(0, 1) = m12;
    +    (*this)(0, 2) = m13;
    +    (*this)(0, 3) = m14;
    +    (*this)(1, 0) = m21;
    +    (*this)(1, 1) = m22;
    +    (*this)(1, 2) = m23;
    +    (*this)(1, 3) = m24;
    +    (*this)(2, 0) = m31;
    +    (*this)(2, 1) = m32;
    +    (*this)(2, 2) = m33;
    +    (*this)(2, 3) = m34;
    +    (*this)(3, 0) = m41;
    +    (*this)(3, 1) = m42;
    +    (*this)(3, 2) = m43;
    +    (*this)(3, 3) = m44;
    +  }
    +
    +  /*! \brief Returns the determinant.
    +   */
    +  double determinant() const;
    +
    +  /*! \brief Switch between left-hand and right-hand side coordinate systems
    +   *
    +   * Equivalent to scale(1, -1, -1)
    +   */
    +  void flipCoordinates()
    +  {
    +    scale(1, -1, -1);
    +  }
    +
    +  /*! \brief Construct a perspective projection matrix
    +   *
    +   * This function constructs a perspective projection where the
    +   * camera is located in the origin. The visible volume is determined
    +   * by whatever that is visible when looking from the origin through the
    +   * rectangular 'window' defined by the coordinates (l, b, n) and
    +   * (r, t, n) (parallel to the XY plane). The zone is further delimited
    +   * by the near and the far clipping planes.
    +   *
    +   * The perspective matrix (P) is right-multiplied with the current
    +   * transformation matrix (M): M * P. Usually, you will want M to be
    +   * the identity matrix when using this method.
    +   */
    +  void frustum(double left, double right, double bottom, double top,
    +      double near, double far)
    +  {
    +    using namespace boost::numeric::ublas;
    +    WMatrix4x4 f(0);
    +    f(0, 0) = 2 * near / (right - left);
    +    f(0, 1) = 0;
    +    f(0, 2) = (right + left) / (right - left);
    +    f(0, 3) = 0;
    +    
    +    f(1, 0) = 0;
    +    f(1, 1) = 2 * near / (top - bottom);
    +    f(1, 2) = (top + bottom) / (top - bottom);
    +    f(1, 3) = 0;
    +    
    +    f(2, 0) = 0;
    +    f(2, 1) = 0;
    +    f(2, 2) = - (far + near) / (far - near);
    +    f(2, 3) = - 2 * far * near / (far - near);
    +    
    +    f(3, 0) = 0;
    +    f(3, 1) = 0;
    +    f(3, 2) = -1;
    +    f(3, 3) = 0;
    +    impl() = prod(impl(), f.impl());
    +  }
    +
    +  /*! \brief Returns the inversion of this matrix, if invertible
    +   *
    +   * If invertible is not 0, it will contain a bool that indicates if
    +   * the operation succeeded and the inverse matrix is returned. Else,
    +   * this method returns the unit matrix.
    +   */
    +  WMatrix4x4 inverted(bool *invertible = 0) const;
    +
    +  /*! \brief Apply a transformation to position a camera
    +   *
    +   * (eyeX, eyeY, eyeZ) is the position of the camera.
    +   *
    +   * The camera looks at (centerX, centerY, centerZ).
    +   *
    +   * (upX, upY, upZ) is a vector that is the direction of the up vector.
    +   *
    +   * This method applies a rotation and translation transformation to
    +   * the current matrix so that the given eye becomes (0, 0, 0), the
    +   * center point is on the negative Z axis, and the up vector lies in the
    +   * X=0 plane, with its Y component in the positive Y axis direction.
    +   *
    +   * The up vector must not be parallel to the line between eye and center.
    +   * The vectors will be normalized and are not required to be perpendicular.
    +   *
    +   * If the lookat transformation matrix is M, and the current value of
    +   * the Matrix4x4 matrix is T, the resulting matrix after lookAt returns
    +   * will be M * T.
    +   *
    +   * This matrix is often used in conjunction with the
    +   * perspective() method:
    +   * \code
    +   * // First, apply the lookAt transformation
    +   * projectionMatrix.lookAt(1, 1, 1, 0, 0, 0, 0, 1, 0);
    +   * // Then apply some perspective
    +   * projectionMatrix.perspective(90, aspect, 0.1, 10);
    +   * \endcode
    +   *
    +   */
    +  void lookAt(double eyeX, double eyeY, double eyeZ,
    +    double centerX, double centerY, double centerZ,
    +    double upX, double upY, double upZ)
    +  {
    +    using namespace boost::numeric::ublas;
    +    // A 3D vector class would be handy here
    +    // Compute and normalize lookDir
    +    double lookDirX = centerX - eyeX;
    +    double lookDirY = centerY - eyeY;
    +    double lookDirZ = centerZ - eyeZ;
    +    double lookDirNorm = std::sqrt(lookDirX*lookDirX + lookDirY*lookDirY + lookDirZ*lookDirZ);
    +    lookDirX /= lookDirNorm;
    +    lookDirY /= lookDirNorm;
    +    lookDirZ /= lookDirNorm;
    +    // Compute and normalize the 'side' vector: cross product of lookDir and upDir
    +    double sideX = lookDirY*upZ - upY*lookDirZ;
    +    double sideY = -(lookDirX*upZ - upX*lookDirZ);
    +    double sideZ = lookDirX*upY - upX*lookDirY;
    +    double sideNormal = std::sqrt(sideX*sideX + sideY*sideY + sideZ*sideZ);
    +    sideX /= sideNormal;
    +    sideY /= sideNormal;
    +    sideZ /= sideNormal;
    +    // Compute the normalized 'up' vector: cross-prod of normalized look
    +    // and side dirs:
    +    double upDirX = sideY*lookDirZ - lookDirY*sideZ;
    +    double upDirY = -(sideX*lookDirZ - lookDirX*sideZ);
    +    double upDirZ = sideX*lookDirY - lookDirX*sideY;
    +    WMatrix4x4 l(
    +      sideX,     sideY,     sideZ,     -(eyeX*sideX + eyeY*sideY + eyeZ*sideZ),
    +      upDirX,    upDirY,    upDirZ,    -(eyeX*upDirX + eyeY*upDirY + eyeZ*upDirZ),
    +      -lookDirX, -lookDirY, -lookDirZ, +(+eyeX*lookDirX + eyeY*lookDirY + eyeZ*lookDirZ),
    +          0,      0,         0,     1
    +    );
    +    impl() = prod(impl(), l.impl());;
    +  }
    +
    +  /* \brief Create an orhtographic projection matrix for use in OpenGL
    +   *
    +   * Create an orthographic projection matrix. The given left, right,
    +   * bottom, top, near and far points will be linearly mapped to the OpenGL
    +   * unit cube ((1,1,1) to (-1,-1,-1)).
    +   *
    +   * The orthographic matrix (O) is right-multiplied with the current
    +   * transformation matrix (M): M * O. Usually, you will want M to be
    +   * the identity matrix when using this method.
    +   */
    +  void orhto(double left, double right, double bottom, double top,
    +      double nearPlane, double farPlane)
    +  {
    +    using namespace boost::numeric::ublas;
    +    WMatrix4x4 o(
    +      2 / (right - left), 0, 0, - (right + left) / (right - left),
    +      0, 2 / (top - bottom), 0, - (top + bottom) / (top - bottom),
    +      0, 0, -2 / (farPlane - nearPlane), - (farPlane + nearPlane) / (farPlane - nearPlane),
    +      0, 0, 0, 1
    +    );
    +    impl() = prod(impl(), o.impl());;
    +  }
    +
    +  /*! \brief Construct a perspective projection matrix for use in OpenGL
    +   *
    +   * The camera is located in the origin and look in the direction of the
    +   * negative Z axis.
    +   *
    +   * Angle is the vertical view angle, in degrees. Aspect is the aspect ratio
    +   * of the viewport, and near and far are the distances of the front and
    +   * rear clipping plane from the camera.
    +   *
    +   * The perspective matrix (P) is right-multiplied with the current
    +   * transformation matrix (M): M * P. Usually, you will want M to be
    +   * the identity matrix when using this method.
    +   */
    +  void perspective(double angle, double aspect,
    +      double nearPlane, double farPlane)
    +  {
    +    double halfHeight =
    +      nearPlane * std::tan(angle / 2 / 180 * 3.14159265358979323846);
    +    double halfWidth = halfHeight * aspect;
    +    frustum(-halfWidth, halfWidth, -halfHeight, halfHeight,
    +      nearPlane, farPlane);
    +  }
    +
    +  /*! \brief Rotates the transformation around a random axis.
    +   *
    +   * Applies a rotation to the current transformation
    +   * matrix, over \p angle degrees. The current matrix (M) is
    +   * right-multiplied by the rotation matrix: M = M * R
    +   *
    +   */
    +  void rotate(double angle, double x, double y, double z)
    +  {
    +    using namespace boost::numeric::ublas;
    +    double t = angle / 180.0 * 3.14159265358979323846;
    +    double norm2 = std::sqrt(x*x + y*y + z*z);
    +    x /= norm2;
    +    y /= norm2;
    +    z /= norm2;
    +    double cost = std::cos(t);
    +    double sint = std::sin(t);
    +    WMatrix4x4 rot(0);
    +    rot(0,0) = cost + x*x*(1-cost);
    +    rot(0,1) = x*y*(1-cost) - z*sint;
    +    rot(0,2) = x*z*(1-cost) + y*sint;
    +    rot(0,3) = 0;
    +    rot(1,0) = y*x*(1-cost) + z*sint;
    +    rot(1,1) = cost + y*y*(1 - cost);
    +    rot(1,2) = y*z*(1-cost) - x*sint;
    +    rot(1,3) = 0;
    +    rot(2,0) = z*x*(1-cost) - y*sint;
    +    rot(2,1) = z*y*(1-cost) + x*sint;
    +    rot(2,2) = cost + z*z*(1-cost);
    +    rot(2,3) = 0;
    +    rot(3,0) = 0;
    +    rot(3,1) = 0;
    +    rot(3,2) = 0;
    +    rot(3,3) = 1;
    +
    +    impl() = prod(impl(), rot.impl());;
    +  }
    +
    +  /*! \brief Scales the transformation.
    +   *
    +   * Equivalent to scale(xFactor, yFactor, 1);
    +   *
    +   * \sa scale(double, double, double)
    +   */
    +  void scale(double xFactor, double yFactor) { scale (xFactor, yFactor, 1); }
    +
    +  /*! \brief Scales the transformation.
    +   *
    +   * Equivalent to M * S where M is the current transformation and S is
    +   * \code
    +   * x 0 0 0
    +   * 0 y 0 0
    +   * 0 0 z 0
    +   * 0 0 0 1
    +   * \endcode
    +   */
    +  void scale(double x, double y, double z)
    +  {
    +    for (unsigned i = 0; i < 4; ++i) {
    +      (*this)(i, 0) *= x;
    +      (*this)(i, 1) *= y;
    +      (*this)(i, 2) *= z;
    +    }
    +  }
    +
    +  /*! \brief Scales the transformation.
    +   *
    +   * Equivalent to scale(factor, factor, factor);
    +   *
    +   * \sa scale(double, double, double)
    +   */
    +  void scale(double factor) { scale(factor, factor, factor); }
    +
    +  /*! \brief Translates the transformation.
    +   *
    +   * Equivalent to translate(x, y, 0)
    +   */
    +  void translate(double x, double y)
    +  {
    +    translate(x, y, 0);
    +  }
    +
    +  /*! \brief Translates the transformation.
    +   *
    +   * Translates the current transformation.
    +   *
    +   * Equivalent to M * T where M is the current transformation matrix
    +   * and T is:
    +   * \code
    +   * 1 0 0 x
    +   * 0 1 0 y
    +   * 0 0 1 z
    +   * 0 0 0 1
    +   * \endcode
    +   */
    +  void translate(double x, double y, double z)
    +  {
    +    using namespace boost::numeric::ublas;
    +    WMatrix4x4 T;
    +    T(0, 3) = x;
    +    T(1, 3) = y;
    +    T(2, 3) = z;
    +    impl() = prod(impl(), T.impl());;
    +  }
    +};
    +
    +}
    +
    +#endif // WMATRIX4X4_H
    diff --git a/wt-3.1.7a/src/Wt/WMatrix4x4.C b/wt-3.1.7a/src/Wt/WMatrix4x4.C
    new file mode 100644
    index 0000000..7b97809
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMatrix4x4.C
    @@ -0,0 +1,51 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WMatrix4x4"
    +#include <boost/numeric/ublas/lu.hpp>
    +
    +
    +using namespace Wt;
    +
    +double WMatrix4x4::determinant() const
    +{
    +  using namespace boost::numeric::ublas;
    +  bounded_matrix<double, 4, 4, row_major> tmp(impl());
    +  boost::numeric::ublas::permutation_matrix<unsigned> pivots(4);
    +  double det = 1.0;
    +  if (boost::numeric::ublas::lu_factorize(tmp, pivots)) {
    +    // Singular matrix
    +    det = 0.0;
    +  } else {
    +    for(std::size_t i = 0; i < 4; ++i) {
    +      if (pivots(i) != i)
    +        det *= -1;
    +      det *= tmp(i,i);
    +    }
    +  }
    +  return det;
    +}
    +
    +WMatrix4x4 WMatrix4x4::inverted(bool *invertible) const
    +{
    +  using namespace boost::numeric::ublas;
    +  WMatrix4x4 retval; // Identity matrix now
    +  bounded_matrix<double, 4, 4, row_major> tmp(impl());
    +  boost::numeric::ublas::permutation_matrix<unsigned> pivots(4);
    +
    +  if (boost::numeric::ublas::lu_factorize(tmp, pivots)) {
    +    // Singular matrix, not invertible
    +    if (invertible)
    +      *invertible = false;
    +    return retval;
    +  } else {
    +    if (invertible)
    +      *invertible = true;
    +    boost::numeric::ublas::lu_substitute(tmp, pivots, retval.impl());
    +    return retval;
    +  }
    +}
    +
    diff --git a/wt-3.1.7a/src/Wt/WMemoryResource b/wt-3.1.7a/src/Wt/WMemoryResource
    new file mode 100644
    index 0000000..b616d70
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMemoryResource
    @@ -0,0 +1,96 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2007 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMEMORY_RESOURCE_H_
    +#define WMEMORY_RESOURCE_H_
    +
    +#include <string>
    +#include <Wt/WResource>
    +
    +namespace Wt {
    +
    +/*! \class WMemoryResource Wt/WMemoryResource Wt/WMemoryResource
    + *  \brief A resource which streams data from memory
    + *
    + * Use this resource if you want to serve resource data from memory. This
    + * is suitable for relatively small resources, which still require some
    + * computation.
    + *
    + * If creating the data requires computation which you would like to
    + * post-pone until the resource is served, then you may want to
    + * directly reimplement WResource instead and compute the data on the
    + * fly while streaming.
    + *
    + * Usage examples:
    + * \code
    + * Wt::WMemoryResource *imageResource = new Wt::WMemoryResource("image/gif", this);
    + *
    + * static const unsigned char gifData[]
    + *    = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00,
    + *        0x80, 0x00, 0x00, 0xdb, 0xdf, 0xef, 0x00, 0x00, 0x00, 0x21,
    + *        0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
    + *        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44,
    + *        0x01, 0x00, 0x3b };
    + *
    + * imageResource->setData(gifData, 43);
    + * Wt::WImage *image = new Wt::WImage(imageResource, "1 transparent pixel");
    + * \endcode
    + *
    + * \sa WFileResource.
    + */
    +class WT_API WMemoryResource : public WResource
    +{
    +public:
    +  /*! \brief Creates a new resource.
    +   *
    +   * You must call setMimeType() and setData() before using the resource.
    +   */
    +  WMemoryResource(WObject *parent = 0);
    +
    +  /*! \brief Creates a new resource with given mime-type.
    +   *
    +   * You must call setData() before using the resource.
    +   */
    +  WMemoryResource(const std::string& mimeType, WObject *parent = 0);
    +
    +  /*! \brief Creates a new resource with given mime-type and data
    +   */
    +  WMemoryResource(const std::string& mimeType,
    +		  const std::vector<unsigned char> &data,
    +		  WObject *parent = 0);
    +
    +  ~WMemoryResource();
    +
    +  /*! \brief Sets new data for the resource to serve.
    +   */
    +  void setData(const std::vector<unsigned char> &data);
    +
    +  /*! \brief Sets new data for the resource to serve.
    +   *
    +   * Sets the data from using the first \p count bytes from the
    +   * C-style \p data array.
    +   */
    +  void setData(const unsigned char *data, int count);
    +
    +  /*! \brief Returns the mime-type.
    +   */
    +  const std::string mimeType() const { return mimeType_; }
    +
    +  /*! \brief Sets the mime-type.
    +   */
    +  void setMimeType(const std::string& mimeType);
    +
    +private:
    +  std::string mimeType_;
    +  std::vector<unsigned char> data_;
    +
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +};
    +
    +}
    +
    +#endif // WMEMORY_RESOURCE_H_
    diff --git a/wt-3.1.7a/src/Wt/WMemoryResource.C b/wt-3.1.7a/src/Wt/WMemoryResource.C
    new file mode 100644
    index 0000000..449561b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMemoryResource.C
    @@ -0,0 +1,65 @@
    +/*
    + * Copyright (C) 2007 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WMemoryResource"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +namespace Wt {
    +
    +WMemoryResource::WMemoryResource(WObject *parent)
    +  : WResource(parent)
    +{ }
    +
    +WMemoryResource::WMemoryResource(const std::string& mimeType,
    +				 WObject *parent)
    +  : WResource(parent),
    +    mimeType_(mimeType)
    +{ }
    +
    +WMemoryResource::WMemoryResource(const std::string& mimeType,
    +				 const std::vector<unsigned char> &data,
    +				 WObject *parent)
    +  : WResource(parent),
    +    mimeType_(mimeType),
    +    data_(data)
    +{ }
    +
    +WMemoryResource::~WMemoryResource()
    +{
    +  beingDeleted();
    +}
    +
    +void WMemoryResource::setMimeType(const std::string& mimeType)
    +{
    +  mimeType_ = mimeType;
    +  setChanged();
    +}
    +
    +void WMemoryResource::setData(const std::vector<unsigned char>& data)
    +{
    +  data_ = data;
    +  setChanged();
    +}
    +
    +void WMemoryResource::setData(const unsigned char *data, int count)
    +{
    +  data_.clear();
    +  data_.insert(data_.end(), data, data + count);
    +
    +  setChanged();
    +}
    +
    +void WMemoryResource::handleRequest(const Http::Request& request,
    +				    Http::Response& response)
    +{
    +  response.setMimeType(mimeType_);
    +
    +  for (unsigned int i = 0; i < data_.size(); ++i)
    +    response.out().put(data_[i]);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMenu b/wt-3.1.7a/src/Wt/WMenu
    new file mode 100644
    index 0000000..4571dbf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMenu
    @@ -0,0 +1,589 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMENU_H_
    +#define WMENU_H_
    +
    +#include <vector>
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WMenuItem>
    +
    +namespace Wt {
    +
    +class WStackedWidget;
    +class WTable;
    +
    +/*! \class WMenu Wt/WMenu Wt/WMenu
    + *  \brief A widget that shows a menu of options.
    + *
    + * The %WMenu widget offers menu navigation.
    + *
    + * Typically, a menu is used in conjunction with a WStackedWidget (but
    + * can be used without too), where different 'contents' are stacked
    + * upon each other. Each choice in the menu (which is implemented as a
    + * WMenuItem) corresponds to a tab in the contents stack. The contents
    + * stack may contain other items, and could be shared with other WMenu
    + * instances.
    + *
    + * When used without a contents stack, you can react to menu item
    + * selection using the itemSelected() signal, to implement some custom
    + * handling of item selection.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * // create the stack where the contents will be located
    + * Wt::WStackedWidget *contents = new Wt::WStackedWidget(contentsParent);
    + *
    + * // create a menu
    + * Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical, menuParent);
    + * menu->setRenderAsList(true);
    + *
    + * // add four items using the default lazy loading policy.
    + * menu->addItem("Introduction", new Wt::WText("intro"));
    + * menu->addItem("Download", new Wt::WText("Not yet available"));
    + * menu->addItem("Demo", new DemoWidget());
    + * menu->addItem(new Wt::WMenuItem("Demo2", new DemoWidget()));
    + * \endcode
    + * \elseif java
    + * \code
    + * // create the stack where the contents will be located
    + * WStackedWidget contents = new WStackedWidget(contentsParent);
    + *		 
    + * // create a menu
    + * WMenu menu = new WMenu(contents, Orientation.Vertical, menuParent);
    + * menu.setRenderAsList(true);
    + *		 
    + * // add four items using the default lazy loading policy.
    + * menu.addItem("Introduction", new WText("intro"));
    + * menu.addItem("Download", new WText("Not yet available"));
    + * menu.addItem("Demo", new DemoWidget());
    + * menu.addItem(new WMenuItem("Demo2", new DemoWidget()));
    + * \endcode
    + * \endif
    + *
    + * Historically, a menu was implemented as a table, but \link
    + * setRenderAsList() rendering as a list\endlink (<tt>&lt;ul&gt;</tt>)
    + * is preferred, as it is the norm form implementations.
    + *
    + * After contruction, the first entry will be selected. At any time,
    + * it is possible to select a particular item using select().
    + *
    + * Each item of %WMenu may be closeable (see WMenuItem::setCloseable(bool).
    + * Like selection, at any time, it is possible to close a particular item
    + * using close(). You can react to close of item by using the itemClosed()
    + * signal.
    + *
    + * The %WMenu implementation offers fine-grained control on how
    + * contents should be preloaded. By default, all contents is
    + * lazy-loaded, only when needed. To improve response time, an item
    + * may also be preloaded (using addItem()). In that case, the item
    + * will be loaded in the background, before its first use. In any
    + * case, once the contents corresponding to a menu item is loaded,
    + * subsequent navigation to it is handled entirely client-side.
    + *
    + * The %WMenu may participate in the application's internal path,
    + * which lets menu items correspond to internal URLs, see
    + * setInternalPathEnabled().
    + *
    + * The layout of the menu may be Horizontal or Vertical. The look of
    + * the items may be defined through style sheets. The default
    + * WMenuItem implementation uses four style classes to distinguish
    + * between inactivated, activated, closeable inactivated and closeable
    + * activated menu items: <tt>"item"</tt>, <tt>"itemselected"</tt>,
    + * <tt>"citem"</tt>, <tt>"citemselected"</tt>. By using CSS nested selectors,
    + * a different style may be defined for items in a different menu.
    + *
    + * You may customize the rendering and behaviour of menu entries by
    + * specializing WMenuItem.
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling a menu will be different depending of the rendering mode
    + * (table, list). Conventionally, menus like this are styled as a list
    + * (setRenderAsList()).
    + *
    + * You will want to differentiate between unselected and selected items
    + * based on the <tt>"item"</tt> and <tt>"itemselected"</tt> style classes
    + * as well as between unselected and selected closeable items based on the
    + * <tt>"citem"</tt> and <tt>"citemselected"</tt> style classes.
    + *
    + * For menus without closeable items a styling is pretty simple. For
    + * example, assuming you set a <tt>"menu"</tt> style class for your
    + * menu, you can style the items using:
    + *
    + * \code
    +.menu * .item {
    +  cursor: pointer; cursor: hand;
    +  color: blue;
    +  text-decoration: underline;
    +}
    +
    +.menu * .itemselected {
    +  color: blue;
    +  text-decoration: underline;
    +  font-weight: bold;  
    +}
    + * \endcode
    + *
    + * For menus which supports closing and/or enabling disabling of
    + * items, the styling is more complex. The close icon is styled by the
    + * current CSS theme and can be overriden by using
    + * <tt>"Wt-closeicon"</tt> CSS class. The look of the menu, assuming
    + * the default implementation for WMenuItem, can be customized by
    + * using the following selectors (again assuming a menu with as
    + * styleclass <tt>"menu"</tt>):
    + *
    + * \verbatim
    +.Wt-closeicon                     : a close icon
    +
    +.menu                             : the list (you custom menu class)
    +.menu li                          : a list item
    +.menu span                        : spans of a list item
    +
    +# not closable items:
    +.menu a.item span                 : the inner span of the label of an enabled item
    +.menu span.item                   : the label of a disabled item
    +.menu a.itemselected span         : the inner span the label of an enabled selected item
    +.menu span.itemselected           : the label of a disabled selected item
    +
    +# closable items:
    +.menu .citem a.label span         : the inner span of the label of an enabled item
    +.menu .citem span.label           : the label of a disabled item
    +.menu .citemselected a.label span : the inner span the label of an enabled selected item
    +.menu .citemselected span.label   : the label of a disabled selected item
    +\endverbatim
    + *
    + * Example of styling a menu with closeable items:
    + * 
    + * \code
    +.menu {
    +  overflow: auto;
    +}
    +
    +.menu li {
    +  display: inline;
    +}
    +
    +.menu span {
    +  display: block; float: left;
    +}
    +
    +.menu a.item span {
    +  cursor: pointer; cursor: hand;
    +  color: blue;
    +  margin-right: 5px;
    +}
    +
    +.menu span.item {
    +  color: gray;
    +  margin-right: 5px;
    +}
    +
    +.menu a.itemselected span {
    +  color: black;
    +  font-weight: bold;
    +  text-decoration: none;
    +  margin-right: 5px;
    +}
    +
    +.menu span.itemselected {
    +  color: gray;
    +  font-weight: bold;
    +  text-decoration: none;
    +  margin-right: 5px;
    +}
    +
    +.menu .citem a.label span {
    +  cursor: pointer; cursor: hand;
    +  color: blue;
    +}
    +
    +.menu .citem span.label {
    +  color: gray;
    +}
    +
    +.menu .citemselected a.label span {
    +  color: black;
    +  font-weight: bold;
    +  text-decoration: none;
    +}
    +
    +.menu .citemselected span.label {
    +  color: gray;
    +  font-weight: bold;
    +  text-decoration: none;
    +}
    + * \endcode
    + * 
    + * \sa WMenuItem
    + */
    +class WT_API WMenu : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a new menu.
    +   *
    +   * Construct a menu with given \p orientation. The menu is not
    +   * associated with a contents stack, and thus you will want to react
    +   * to the itemSelected() signal to react to menu changes.
    +   */
    +  WMenu(Orientation orientation, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a new menu.
    +   *
    +   * Construct a menu to manage the widgets in \p contentsStack,
    +   * and sets the menu \p orientation.
    +   *
    +   * Each menu item will manage a single widget in the
    +   * \p contentsStack, making it the current widget when the menu
    +   * item is activated.
    +   */
    +  WMenu(WStackedWidget *contentsStack, Orientation orientation,
    +	WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WMenu();
    +
    +  /*! \brief Adds an item.
    +   *
    +   * Adds a menu item with given \p contents, which is added to the
    +   * menu's associated contents stack.
    +   *
    +   * \p contents may be \c 0 for two reasons:
    +   * - if the menu is not associated with a contents stack, then you cannot
    +   *   associate a menu item with a contents widget
    +   * - or, you may have one or more items which which are not associated with
    +   *   a contents widget in the contents stack.
    +   *
    +   * Returns the corresponding WMenuItem.
    +   *
    +   * \sa addItem(WMenuItem *)
    +   */
    +  WMenuItem *addItem(const WString& name, WWidget *contents,
    +		     WMenuItem::LoadPolicy policy = WMenuItem::LazyLoading);
    +
    +  /*! \brief Adds an item.
    +   *
    +   * Adds a menu item. Use this form to add specialized WMenuItem
    +   * implementations.
    +   *
    +   * \sa addItem(const WString&, WWidget *, WMenuItem::LoadPolicy)
    +   */
    +  WMenuItem *addItem(WMenuItem *item);
    +
    +  /*! \brief Removes an item.
    +   *
    +   * Removes the given item. The item and its contents is not deleted.
    +   *
    +   * \sa addItem()
    +   */
    +  void removeItem(WMenuItem *item);
    +
    +  /*! \brief Selects an item.
    +   *
    +   * Select the menu item \p item.
    +   *
    +   * \sa select(int), currentItem(), WMenuItem::select()
    +   */
    +  void select(WMenuItem *item);
    +
    +  /*! \brief Selects an item.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to
    +   * \p N - 1.
    +   *
    +   * \sa select(WMenuItem *), currentIndex()
    +   */
    +  void select(int index);
    +
    +  /*! \brief %Signal which indicates that a new item was selected.
    +   *
    +   * This signal is emitted when an item was selected. It is emitted
    +   * both when the user activated an item, or when select() was
    +   * invoked.
    +   *
    +   * \sa itemSelectRendered()
    +   */
    +  Signal<WMenuItem *>& itemSelected() { return itemSelected_; }
    +
    +  /*! \brief %Signal which indicates that a new selected item is rendered.
    +   *
    +   * This signal is similar to \link WMenu::itemSelected
    +   * itemSelected\endlink, but is emitted from within a stateless
    +   * slot. Therefore, any slot connected to this signal will be
    +   * optimized to client-side JavaScript, and must support the
    +   * contract of a stateless slot (i.e., be idempotent).
    +   *
    +   * If you are unsure what is the difference with the \link
    +   * WMenu::itemSelected itemSelected\endlink signal, you'll probably
    +   * need the latter instead.
    +   *
    +   * \sa itemSelected()
    +   */
    +  Signal<WMenuItem *>& itemSelectRendered() { return itemSelectRendered_; }
    +
    +  /*! \brief Closes an item.
    +   *
    +   * Close the menu item \p item. Only \link WMenuItem::setCloseable(bool)
    +   * closeable\endlink items can be closed.
    +   *
    +   * \sa close(int), WMenuItem::close()
    +   */
    +  void close(WMenuItem *item);
    +
    +  /*! \brief Closes an item.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to
    +   * \p N - 1.
    +   *
    +   * \sa close(WMenuItem *)
    +   */
    +  void close(int index);
    +
    +  /*! \brief Returns the items.
    +   *
    +   * Returns the list of menu items in this menu.
    +   */
    +  const std::vector<WMenuItem *>& items() const { return items_; }
    +
    +  /*! \brief %Signal which indicates that an item was closed.
    +   *
    +   * This signal is emitted when an item was closed. It is emitted
    +   * both when the user closes an item, or when close() was
    +   * invoked.
    +   */
    +  Signal<WMenuItem *>& itemClosed() { return itemClosed_; }
    +
    +  /*! \brief Hides an item.
    +   *
    +   * Hides the menu item \p item. By default, all menu items are
    +   * visible.
    +   *
    +   * If the item was currently selected, then the next item to be selected
    +   * is determined by nextAfterHide().
    +   *
    +   * \sa setItemHidden(int, bool), WMenuItem::hide()
    +   */
    +  void setItemHidden(WMenuItem *item, bool hidden);
    +
    +  /*! \brief Hides an item.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to \p N - 1.
    +   *
    +   * \sa setItemHidden(WMenuItem *, bool)
    +   */
    +  void setItemHidden(int index, bool hidden);
    +
    +  /*! \brief Returns whether the item widget of the given item is hidden.
    +   *
    +   * \sa setItemHidden()
    +   */
    +  bool isItemHidden(WMenuItem *item) const;
    +
    +  /*! \brief Returns whether the item widget of the given index is hidden.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to \p N - 1.
    +   *
    +   * \sa setItemHidden()
    +   */
    +  bool isItemHidden(int index) const;
    +
    +  /*! \brief Disables an item.
    +   *
    +   * Disables the menu item \p item. Only an item that is enabled can
    +   * be selected. By default, all menu items are enabled.
    +   *
    +   * \sa setItemDisabled(int, bool), WMenuItem::setDisabled()
    +   */
    +  void setItemDisabled(WMenuItem *item, bool disabled);
    +
    +  /*! \brief Disables an item.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to
    +   * \p N - 1.
    +   *
    +   * \sa setItemDisabled(WMenuItem *, bool)
    +   */
    +  void setItemDisabled(int index, bool disabled);
    +
    +  /*! \brief Returns whether the item widget of the given item is disabled.
    +   *
    +   * \sa setItemDisabled()
    +   */
    +  bool isItemDisabled(WMenuItem *item) const;
    +
    +  /*! \brief Returns whether the item widget of the given index is disabled.
    +   *
    +   * Menu items in a menu with \p N items are numbered from 0 to
    +   * \p N - 1.
    +   *
    +   * \sa setItemDisabled()
    +   */
    +  bool isItemDisabled(int index) const;
    +
    +  /*! \brief Returns the currently selected item.
    +   *
    +   * \sa currentIndex(), select(WMenuItem *)
    +   */
    +  WMenuItem *currentItem() const;
    +
    +  /*! \brief Returns the index of the currently selected item.
    +   *
    +   * \sa currentItem(), select(int)
    +   */
    +  int currentIndex() const { return current_; }
    +
    +  /*! \brief Returns the orientation.
    +   *
    +   * The orientation is set at time of construction.
    +   */
    +  Orientation orientation() const { return orientation_; }
    +
    +  /*! \brief Renders using an HTML list.
    +   *
    +   * By default, the the menu is rendered using an HTML
    +   * <tt>&lt;table&gt;</tt> element for layout. Setting this option
    +   * enables rendering using <tt>&lt;ul&gt;</tt> and
    +   * <tt>&lt;il&gt;</tt> elements, as is commonly done for CSS-based
    +   * designs.
    +   *
    +   * \note You cannot use this method after items have been added to
    +   * the menu.
    +   */
    +  void setRenderAsList(bool enable);
    +
    +  /*! \brief Returns whether the menu is rendered as an HTML list.
    +   *
    +   * \sa setRenderAsList(bool)
    +   */
    +  bool renderAsList() const { return renderAsList_; }
    +
    +  /*! \brief Enables internal paths for items.
    +   *
    +   * The menu participates in the internal path by changing the
    +   * internal path when an item has been selected, and listening for
    +   * path changes to react to path selections. As a consequence this
    +   * allows the user to bookmark the current menu selection and
    +   * revisit it later, use back/forward buttons to navigate through
    +   * history of visited menu items, and allows indexing of pages.
    +   *
    +   * For each menu item, WMenuItem::pathComponent() is appended to the
    +   * internal base path (internalBasePath()), which defaults to the
    +   * internal path (WApplication::internalPath()) but may be changed
    +   * using setInternalBasePath(), with a '/' appended to turn it into
    +   * a folder, if needed.
    +   *
    +   * By default, menu interaction does not change the application
    +   * internal path.
    +   *
    +   * \sa WMenuItem::setPathComponent().
    +   */
    +  void setInternalPathEnabled(const std::string& basePath = "");
    +
    +  /*! \brief Returns whether the menu generates internal paths entries.
    +   *
    +   * \sa setInternalPathEnabled()
    +   */
    +  bool internalPathEnabled() const { return internalPathEnabled_; }
    +
    +  /*! \brief Sets the internal base path.
    +   *
    +   * A '/' is appended to turn it into a folder, if needed.
    +   *
    +   * \sa setInternalPathEnabled(), internalBasePath()
    +   */
    +  void setInternalBasePath(const std::string& basePath);
    +
    +  /*! \brief Returns the internal base path.
    +   *
    +   * The default value is the application's internalPath
    +   * (WApplication::internalPath()) that was recorded when
    +   * setInternalPathEnabled() was called, and together with each
    +   * WMenuItem::pathComponent() determines the paths for each item.
    +   *
    +   * For example, if internalBasePath() is <tt>"/examples/"</tt> and
    +   * pathComponent() for a particular item is <tt>"charts/"</tt>, then
    +   * the internal path for that item will be
    +   * <tt>"/examples/charts/"</tt>.
    +   *
    +   * \sa setInternalPathEnabled()
    +   */
    +  const std::string& internalBasePath() const { return basePath_; }
    +
    +  /*! \brief Returns the contents stack associated with the menu.
    +   */
    +  WStackedWidget *contentsStack() const { return contentsStack_; }
    +
    +protected:
    +  virtual void enableAjax();
    +
    +  /*! \brief Handling of internal path changes.
    +   *
    +   * This methods makes the menu react to internal path changes (and also
    +   * the initial internal path).
    +   *
    +   * You may want to reimplement this if you want to customize the internal
    +   * path handling.
    +   */
    +  virtual void internalPathChanged(const std::string& path);
    +
    +  /*! \brief Returns the index of the item to be selected after hides.
    +   *
    +   * Returns the index of the item to be selected after the item with given
    +   * index will be hidden.
    +   *
    +   * By default, if the given index is an index of currently selected item,
    +   * returns an index of the first visible item to the right of it. If it is not
    +   * found, returns the index of the first visible item to the left of it. If
    +   * there are no visible items around the currently selected item, returns the
    +   * index of currently selected item.
    +   *
    +   * You may want to reimplement this if you want to customize the algorithm
    +   * of determining the index of the item to be selected after hiding the item
    +   * with given index.
    +   */
    +  virtual int nextAfterHide(int index);
    +
    +private:
    +  WWidget          *impl_;
    +  WStackedWidget   *contentsStack_;
    +  Orientation       orientation_;
    +  bool              renderAsList_;
    +  bool              internalPathEnabled_;
    +  bool              emitPathChange_;
    +  std::string       basePath_, previousInternalPath_;
    +
    +  Signal<WMenuItem *> itemSelected_, itemSelectRendered_;
    +  Signal<WMenuItem *> itemClosed_;
    +
    +  std::vector<WMenuItem *> items_;
    +
    +  void select(int index, bool changePath);
    +
    +  int current_;
    +  int previousCurrent_;
    +  int previousStackIndex_;
    +
    +  int indexOf(WMenuItem *item) const;
    +
    +  void selectVisual(WMenuItem *item);
    +  void selectVisual(int item, bool changePath);
    +  void undoSelectVisual();
    +  friend class WMenuItem;
    +  friend class WSubMenuItem;
    +
    +  void recreateItem(int index);
    +  void recreateItem(WMenuItem *item);
    +  void doSetHiddenItem(int index, bool hidden);
    +  void doSetHiddenItem(WMenuItem *item, bool hidden);
    +  void updateItems();
    +};
    +
    +}
    +
    +#endif // WMENU_H_
    diff --git a/wt-3.1.7a/src/Wt/WMenu.C b/wt-3.1.7a/src/Wt/WMenu.C
    new file mode 100644
    index 0000000..1c0bbc1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMenu.C
    @@ -0,0 +1,493 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WBreak"
    +#include "Wt/WLogger"
    +#include "Wt/WMenu"
    +#include "Wt/WMenuItem"
    +#include "Wt/WStackedWidget"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WMenu::WMenu(Orientation orientation, WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    contentsStack_(0),
    +    orientation_(orientation),
    +    internalPathEnabled_(false),
    +    emitPathChange_(false),
    +    itemSelected_(this),
    +    itemSelectRendered_(this),
    +    itemClosed_(this),
    +    current_(-1)
    +{
    +  setRenderAsList(false);
    +}
    +
    +WMenu::WMenu(WStackedWidget *contentsStack, Orientation orientation,
    +	     WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    contentsStack_(contentsStack),
    +    orientation_(orientation),
    +    internalPathEnabled_(false),
    +    emitPathChange_(false),
    +    itemSelected_(this),
    +    itemSelectRendered_(this),
    +    itemClosed_(this),
    +    current_(-1)
    +{
    +  setRenderAsList(false);
    +}
    +
    +void WMenu::setRenderAsList(bool enable)
    +{
    +  if (enable) {
    +    WContainerWidget *c = new WContainerWidget();
    +    //WBreak *w = new WBreak(c);
    +    //w->setAttributeValue("style","clear:both;");
    +    c->setList(true);
    +
    +    setImplementation(impl_ = c);
    +  } else {
    +    setImplementation(impl_ = new WTable());
    +  }
    +
    +  renderAsList_ = enable;
    +}
    +
    +WMenu::~WMenu()
    +{
    +  for (unsigned i = 0; i < items_.size(); ++i) {
    +    items_[i]->setMenu(0);
    +    delete items_[i];
    +  }
    +}
    +
    +void WMenu::setInternalPathEnabled(const std::string& basePath)
    +{
    +  if (!internalPathEnabled_) {
    +    internalPathEnabled_ = true;
    +
    +    WApplication *app = wApp;
    +
    +    basePath_
    +      = Utils::terminate(basePath.empty() ? app->internalPath() : basePath,
    +			 '/');
    +
    +    app->internalPathChanged().connect(this, &WMenu::internalPathChanged);
    +
    +    previousInternalPath_ = app->internalPath();
    +
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +    if (app->oldInternalPathAPI())
    +      internalPathChanged(basePath_);
    +    else
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +      internalPathChanged(app->internalPath());
    +
    +    updateItems();
    +  }
    +}
    +
    +void WMenu::enableAjax()
    +{
    +  for (unsigned i = 0; i < items_.size(); ++i) {
    +    WMenuItem *item = items_[i];
    +    item->enableAjax();
    +  }
    +
    +  WCompositeWidget::enableAjax();
    +}
    +
    +void WMenu::setInternalBasePath(const std::string& basePath)
    +{
    +  std::string bp = Utils::terminate(basePath, '/');
    +  if (basePath_ != bp) {
    +    basePath_ = bp;
    +
    +    if (internalPathEnabled_) {
    +      WApplication *app = wApp;
    +      previousInternalPath_ = app->internalPath();
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +      if (app->oldInternalPathAPI())
    +	internalPathChanged(basePath_);
    +      else
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +	internalPathChanged(app->internalPath());
    +
    +      updateItems();
    +    }
    +  }
    +}
    +
    +void WMenu::updateItems()
    +{
    +  for (unsigned i = 0; i < items_.size(); ++i) {
    +    WMenuItem *item = items_[i];
    +    item->updateItemWidget(item->itemWidget());
    +    item->resetLearnedSlots();
    +  }
    +}
    +
    +WMenuItem *WMenu::addItem(const WString& name, WWidget *contents,
    +			  WMenuItem::LoadPolicy policy)
    +{
    +  return addItem(new WMenuItem(name, contents, policy));
    +}
    +
    +WMenuItem *WMenu::addItem(WMenuItem *item)
    +{
    +  item->setMenu(this);
    +  items_.push_back(item);
    +
    +  if (renderAsList_) {
    +    WContainerWidget *p = dynamic_cast<WContainerWidget *>(impl_);
    +    WContainerWidget *li = new WContainerWidget();
    +    p->insertWidget(p->count()/* - 1 */, li);
    +    li->addWidget(item->itemWidget());
    +  } else {
    +    WTable *layout = dynamic_cast<WTable *>(impl_);
    +    WTableCell *parent
    +      = layout->elementAt((orientation_ == Vertical) ? items_.size() - 1 : 0, 0);
    +
    +    WWidget *w = item->itemWidget();
    +    parent->addWidget(w);
    +
    +    // separate horizontal items so wrapping will occur inbetween items.
    +    if (orientation_ == Horizontal) {
    +      w->setInline(true);
    +      new WText(" ", parent);
    +    }
    +  }
    +
    +  for (unsigned i = 0; i < items_.size(); ++i)
    +    items_[i]->resetLearnedSlots();
    +
    +  if (contentsStack_) {
    +    WWidget *contents = item->contents();
    +    if (contents)
    +      contentsStack_->addWidget(contents);
    +
    +    if (contentsStack_->count() == 1) {
    +      current_ = 0;
    +      if (contents)
    +	contentsStack_->setCurrentWidget(contents);
    +
    +      items_[0]->renderSelected(true);
    +      items_[0]->loadContents();
    +    } else
    +      item->renderSelected(false);
    +  } else
    +    item->renderSelected(false);
    +
    +  item->renderHidden(item->isHidden());
    +
    +  if (internalPathEnabled_) {
    +    WApplication *app = wApp;
    +
    +    if (app->internalPathMatches(basePath_ + item->pathComponent()))
    +      select(items_.size() - 1, false);
    +  }
    +
    +  return item;
    +}
    +
    +void WMenu::removeItem(WMenuItem *item)
    +{
    +  int itemIndex = indexOf(item);
    +
    +  if (itemIndex != -1) {
    +    items_.erase(items_.begin() + itemIndex);
    +
    +    if (renderAsList_) {
    +      WContainerWidget *li
    +	= dynamic_cast<WContainerWidget *>(item->itemWidget()->parent());
    +      li->removeWidget(item->itemWidget());
    +      delete li;
    +    } else {
    +      WTableCell *parent =
    +        dynamic_cast<WTableCell *>(item->itemWidget()->parent());
    +
    +      if (orientation_ == Horizontal) {
    +        WWidget *itemWidget = item->itemWidget();
    +        WWidget *separator = parent->widget(parent->indexOf(itemWidget) + 1);
    +
    +        parent->removeWidget(itemWidget);
    +        delete separator;
    +      } else {
    +        WTable *table = parent->table();
    +        parent->removeWidget(item->itemWidget());
    +        table->deleteRow(parent->row());
    +      }
    +    }
    +
    +    if (contentsStack_ && item->contents())
    +      contentsStack_->removeWidget(item->contents());
    +
    +    item->setMenu(0);
    +
    +    if (itemIndex <= current_ && current_ >= 0)
    +      --current_;
    +
    +    for (unsigned i = 0; i < items_.size(); ++i)
    +      items_[i]->resetLearnedSlots();
    +
    +    select(current_, true);
    +  }
    +}
    +
    +void WMenu::select(int index)
    +{
    +  select(index, true);
    +}
    +
    +void WMenu::select(int index, bool changePath)
    +{
    +  selectVisual(index, changePath);
    +
    +  if (index != -1) {
    +    if (isItemHidden(index))
    +      setItemHidden(index, false);
    +
    +    items_[index]->loadContents();
    +    itemSelected_.emit(items_[current_]);
    +
    +    if (changePath && emitPathChange_) {
    +      WApplication *app = wApp;
    +      app->internalPathChanged().emit(app->internalPath());
    +      emitPathChange_ = false;
    +    }
    +  }
    +}
    +
    +void WMenu::selectVisual(int index, bool changePath)
    +{
    +  previousCurrent_ = current_;
    +
    +  if (contentsStack_)
    +    previousStackIndex_ = contentsStack_->currentIndex();
    +
    +  current_ = index;
    +
    +  if (changePath && internalPathEnabled_ && current_ != -1) {
    +    WApplication *app = wApp;
    +    previousInternalPath_ = app->internalPath();
    +
    +    std::string newPath = basePath_ + items_[current_]->pathComponent();
    +    if (newPath != app->internalPath())
    +      emitPathChange_ = true;
    +
    +    // The change is emitted in select()
    +    app->setInternalPath(newPath);
    +  }
    +
    +  for (unsigned i = 0; i < items_.size(); ++i)
    +    items_[i]->renderSelected((int)i == current_);
    +
    +  if (index == -1)
    +    return;
    +
    +  if (contentsStack_) {
    +    WWidget *contents = items_[current_]->contents();
    +    if (contents)
    +      contentsStack_->setCurrentWidget(contents);
    +  }
    +
    +  itemSelectRendered_.emit(items_[current_]);
    +}
    +
    +void WMenu::setItemHidden(int index, bool hidden)
    +{
    +  items_[index]->setHidden(hidden);
    +}
    +
    +void WMenu::doSetHiddenItem(int index, bool hidden)
    +{
    +  if (hidden) {
    +    int nextItem = nextAfterHide(index);
    +    if (nextItem != current_)
    +      select(nextItem);
    +  }
    +
    +  items_[index]->renderHidden(hidden);
    +}
    +
    +void WMenu::doSetHiddenItem(WMenuItem *item, bool hidden)
    +{
    +  doSetHiddenItem(indexOf(item), hidden);
    +}
    +
    +int WMenu::nextAfterHide(int index)
    +{
    +  if (current_ == index) {
    +    // Try to find visible item to the right of the current.
    +    for (unsigned i = current_ + 1; i < items_.size(); ++i)
    +      if (!isItemHidden(i))
    +        return i;
    +
    +    // Try to find visible item to the left of the current.
    +    for (int i = current_ - 1; i >= 0; --i)
    +      if (!isItemHidden(i))
    +        return i;
    +  }
    +
    +  return current_;
    +}
    +
    +void WMenu::setItemHidden(WMenuItem *item, bool hidden)
    +{
    +  setItemHidden(indexOf(item), hidden);
    +}
    +
    +bool WMenu::isItemHidden(int index) const
    +{
    +  return items_[index]->isHidden();
    +}
    +
    +bool WMenu::isItemHidden(WMenuItem *item) const
    +{
    +  return isItemHidden(indexOf(item));
    +}
    +
    +void WMenu::setItemDisabled(int index, bool disabled)
    +{
    +  items_[index]->setDisabled(disabled);
    +}
    +
    +void WMenu::setItemDisabled(WMenuItem* item, bool disabled)
    +{
    +  setItemDisabled(indexOf(item), disabled);
    +}
    +
    +bool WMenu::isItemDisabled(int index) const
    +{
    +  return items_[index]->isDisabled();
    +}
    +
    +bool WMenu::isItemDisabled(WMenuItem *item) const
    +{
    +  return isItemDisabled(indexOf(item));
    +}
    +
    +void WMenu::close(int index)
    +{
    +  WMenuItem *item = items_[index];
    +  if (item->isCloseable()) {
    +    item->hide();
    +    itemClosed_.emit(item);
    +  }
    +}
    +
    +void WMenu::close(WMenuItem *item)
    +{
    +  close(indexOf(item));
    +}
    +
    +void WMenu::internalPathChanged(const std::string& path)
    +{
    +  WApplication *app = wApp;
    +
    +  if (
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +      (app->oldInternalPathAPI() && path == basePath_) ||
    +#endif // WT_WITH_OLD_INTERNALPATH_API 
    +      app->internalPathMatches(basePath_)) {
    +
    +    std::string value = app->internalPathNextPart(basePath_);
    +
    +    for (unsigned i = 0; i < items_.size(); ++i) {
    +      if (items_[i]->pathComponent() == value
    +	  || items_[i]->pathComponent() == (value + '/')) {
    +	items_[i]->setFromInternalPath(path);
    +	return;
    +      }
    +    }
    +
    +    if (!value.empty())
    +      wApp->log("error") << "WMenu: unknown path: '"<< value << "'";
    +    else
    +      select(-1, false);
    +  }
    +}
    +
    +void WMenu::select(WMenuItem *item)
    +{
    +  select(indexOf(item), true);
    +}
    +
    +void WMenu::selectVisual(WMenuItem *item)
    +{
    +  selectVisual(indexOf(item), true);
    +}
    +
    +int WMenu::indexOf(WMenuItem *item) const
    +{
    +  return Utils::indexOf(items_, item);
    +}
    +
    +void WMenu::undoSelectVisual()
    +{
    +  std::string prevPath = previousInternalPath_;
    +  int prevStackIndex = previousStackIndex_;
    +
    +  selectVisual(previousCurrent_, true);
    +
    +  if (internalPathEnabled_) {
    +    WApplication *app = wApp;
    +    app->setInternalPath(prevPath);
    +  }
    +
    +  if (contentsStack_)
    +    contentsStack_->setCurrentIndex(prevStackIndex);
    +}
    +
    +WMenuItem *WMenu::currentItem() const
    +{
    +  return current_ >= 0 ? items_[current_] : 0;
    +}
    +
    +void WMenu::recreateItem(int index)
    +{
    +  WMenuItem *item = items_[index];
    +
    +  if (renderAsList_) {
    +    WContainerWidget *li =
    +      dynamic_cast<WContainerWidget *>(item->itemWidget()->parent());
    +    li->addWidget(item->recreateItemWidget());
    +  } else {
    +    WTableCell *parent =
    +      dynamic_cast<WTableCell *>(item->itemWidget()->parent());
    +
    +    if (orientation_ == Horizontal) {
    +      const int pos = parent->indexOf(item->itemWidget());
    +      WWidget *newItemWidget = item->recreateItemWidget();
    +      parent->insertWidget(pos, newItemWidget);
    +      newItemWidget->setInline(true);
    +    } else
    +      parent->addWidget(item->recreateItemWidget());
    +  }
    +
    +  item->renderSelected(current_ == index);
    +  item->renderHidden(item->isHidden());
    +
    +  for (unsigned i = 0; i < items_.size(); ++i)
    +    items_[i]->resetLearnedSlots();
    +}
    +
    +void WMenu::recreateItem(WMenuItem *item)
    +{
    +  recreateItem(indexOf(item));
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMenuItem b/wt-3.1.7a/src/Wt/WMenuItem
    new file mode 100644
    index 0000000..74c3948
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMenuItem
    @@ -0,0 +1,380 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMENU_ITEM_H_
    +#define WMENU_ITEM_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class SignalBase;
    +class WContainerWidget;
    +class WMenu;
    +class WWidget;
    +
    +/*! \brief A single item in a menu.
    + *
    + * The item determines the look and behaviour of a single item in a
    + * WMenu.
    + *
    + * By default, for enabled menu items a WMenuItem uses a WAnchor widget. For
    + * disabled menu items it uses a WText widget. If item is closeable, WMenuItem
    + * puts these widgets and extra WText widget (for a close icon) in
    + * a WContainerWidget.
    + * When the menu participates in application internal paths
    + * (see WMenu::setInternalPathEnabled()), the anchor references the
    + * bookmark URL corresponding to the pathComponent() for the item (see
    + * WApplication::bookmarkUrl()).
    + *
    + * To provide another look for the menu items (such as perhaps adding
    + * an icon), you can specialize this class, and reimplement the
    + * virtual methods:
    + *
    + * - createItemWidget(): to provide another widget to represent the
    + *   item.
    + * - updateItemWidget(): to update the widget to reflect item changes,
    + *   triggered by for example setText() and setPathComponent().
    + * - optionally, activateSignal(): to bind the event for activating
    + *   the item to something else than the clicked event.
    + * - optionally, closeSignal(): to bind the event for closing
    + *   the item to something else than the clicked event.
    + * - optionally, renderSelected(bool): if you need to do additional
    + *   styling to reflect a selection, other than changing style classes.
    + * - optionally, renderHidden(bool): if you need to do additionanl
    + *   styling to reflect a hide, other than hiding (see
    + *   WWebWidget::setHidden(bool)).
    + *
    + * To provide another look for the close icon you can override
    + * <tt>Wt-closeicon</tt> CSS class (see WMenu for more details).
    + * 
    + * \sa WMenu
    + * \sa WMenu::addItem(WMenuItem *)
    + */
    +class WT_API WMenuItem : public WObject
    +{
    +public:
    +  /*! \brief Enumeration that determines when contents should be loaded.
    +   */
    +  enum LoadPolicy {
    +    LazyLoading, //!< Lazy loading: on first use
    +    PreLoading   //!< Pre-loading: before first use
    +  };
    +
    +  /*! \brief Creates a new item.
    +   *
    +   * The text specifies the item text. The contents is the widget that must
    +   * be shown in the WMenu contents stack when the item is selected.
    +   *
    +   * The load policy specifies whether the contents widgets is transmitted
    +   * only when it the item is activated for the first time (LazyLoading)
    +   * or transmitted prior to first rendering.
    +   *
    +   * The pathComponent() is derived from \p text, and can be
    +   * customized using setPathComponent().
    +   *
    +   * \p contents may be 0, in which case no contents is associated with
    +   * the item in the contents stack.
    +   */
    +  WMenuItem(const WString& text, WWidget *contents,
    +	    LoadPolicy policy = LazyLoading);
    +
    +  /* !\brief Destructor.
    +   *
    +   * Removes the item from the menu (if it was added previously to one), and
    +   * also deletes the contents that was associated with the item.
    +   *
    +   * \sa WMenu::removeItem()
    +   */
    +  ~WMenuItem();
    +
    +  /*! \brief Sets the text for this item.
    +   *
    +   * Unless a custom path component was defined, the pathComponent()
    +   * is also updated based on the new text.
    +   *
    +   * The item widget is updated using updateItemWidget().
    +   *
    +   * \sa setPathComponent();
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the text for this item.
    +   *
    +   * \sa setText();
    +   */
    +  const WString& text() const { return text_; }
    +
    +  /*! \brief Sets the path component for this item.
    +   *
    +   * The path component is used by the menu item in the application
    +   * internal path (see WApplication::setInternalPath()), when
    +   * internal paths are enabled (see WMenu::setInternalPathEnabled())
    +   * for the menu.
    +   *
    +   * You may specify an empty \p path to let a menu item be the
    +   * "default" menu option.
    +   *
    +   * For example, if WMenu::internalBasePath() is
    +   * <tt>"/examples/"</tt> and pathComponent() for is
    +   * <tt>"charts/"</tt>, then the internal path for the item will be
    +   * <tt>"/examples/charts/"</tt>.
    +   *
    +   * By default, the path is automatically derived from text(). If a
    +   * \link WString::literal() literal text\endlink is used, the path
    +   * is based on the text itself, otherwise on the \link
    +   * WString::key() key\endlink. It is converted to lower case, and
    +   * replacing white space and special characters with '_'.
    +   *
    +   * \sa setText(), WMenu::setInternalPathEnabled()
    +   */
    +  void setPathComponent(const std::string& path);
    +
    +  /*! \brief Returns the path component for this item.
    +   *
    +   * You may want to reimplement this to customize the path component
    +   * set by the item in the application internal path.
    +   *
    +   * \sa setPathComponent()
    +   */
    +  virtual std::string pathComponent() const;
    +
    +  /*! \brief Make it possible to close this item interactively or by close().
    +   *
    +   * \sa close(), isCloseable()
    +   */
    +  void setCloseable(bool closeable);
    +
    +  /*! \brief Returns whether the item is closeable.
    +   *
    +   * \sa setCloseable()
    +   */
    +  bool isCloseable() const { return closeable_; }
    +
    +  /*! \brief Closes this item.
    +   *
    +   * Hides the item widget and emits WMenu::itemClosed() signal. Only closeable
    +   * items can be closed.
    +   *
    +   * \sa setCloseable(), hide()
    +   */
    +  void close();
    +
    +  /*! \brief Sets whether the item widget is hidden.
    +   *
    +   * Hides or show the item widget.
    +   * 
    +   * \sa hide(), show(), isHidden()
    +   */
    +  void setHidden(bool hidden);
    +
    +  /*! \brief Returns whether the item widget is hidden.
    +   *
    +   * \sa setHidden()
    +   */
    +  bool isHidden() const { return hidden_; }
    +
    +  /*! \brief Hides the item widget.
    +   *
    +   * This calls \link setHidden() setHidden(true)\endlink.
    +   *
    +   * \sa show()
    +   */
    +  void hide();
    +
    +  /*! \brief Shows the item widget.
    +   *
    +   * If the item was previously closed it will be shown.
    +   * 
    +   * This calls \link setHidden() setHidden(false)\endlink.
    +   *
    +   * \sa hide(), select()
    +   */
    +  void show();
    +
    +  /*! \brief Enables or disables an item.
    +   *
    +   * A disabled item cannot be activated.
    +   *
    +   * \sa enable(), disable(), isEnabled()
    +   */
    +  void setDisabled(bool disabled);
    +
    +  /*! \brief Returns whether an item is enabled.
    +   *
    +   * \sa setDisabled()
    +   */
    +  bool isDisabled() const { return disabled_ ; }
    +
    +  /*! \brief Enables the item.
    +   *
    +   * This calls \link setDisabled() setDisabled(false)\endlink.
    +   *
    +   * \sa disable()
    +   */
    +  void enable();
    +
    +  /*! \brief Disables the item.
    +   *
    +   * This calls \link setDisabled() setDisabled(true)\endlink.
    +   *
    +   * \sa enable()
    +   */
    +  void disable();
    +
    +  /*! \brief Sets a tooltip.
    +   *
    +   * The tooltip is displayed when the cursor hovers over the label of the item,
    +   * i.e. WAnchor or WText, depending on whether the item is enabled or not
    +   * (see createItemWidget()).
    +   *
    +   * \sa toolTip()
    +   */
    +  void setToolTip(const WString& tip);
    +
    +  /*! \brief Returns the tooltip.
    +   */
    +  const WString& toolTip() const { return tip_; }
    +
    +  /*! \brief Returns the menu.
    +   */
    +  WMenu *menu() const { return menu_; }
    +
    +  /*! \brief Returns the contents widget for this item.
    +   *
    +   * The contents widget is the widget in the WStackedWidget associated with
    +   * this item.
    +   */
    +  WWidget *contents() const;
    +  WWidget *takeContents();
    +
    +  /*! \brief Returns the widget that represents the item.
    +   *
    +   * This returns the item widget, creating it using
    +   * createItemWidget() if necessary.
    +   */
    +  WWidget *itemWidget();
    +
    +  /*! \brief Selects this item.
    +   *
    +   * If the item was previously closed it will be shown.
    +   *
    +   * \sa close()
    +   */
    +  void select();
    +
    +protected:
    +  /*! \brief Creates the widget that represents the item.
    +   *
    +   * The default implementation will return:
    +   * - a WAnchor if item is not closeable and enabled;
    +   * - a WText if item is not closeable and disabled;
    +   * - a WContainerWidget with WAnchor or WText (the label of enabled
    +   * or disabled item accordingly) and WText (the close icon) inside if
    +   * item is closeable.
    +   * 
    +   * A call to createItemWidget() is immediately followed by
    +   * updateItemWidget().
    +   *
    +   * If you reimplement this method, you should probably also
    +   * reimplement updateItemWidget().
    +   */
    +  virtual WWidget *createItemWidget();
    +
    +  /*! \brief Updates the widget that represents the item.
    +   *
    +   * The default implementation will cast the \p itemWidget to a
    +   * WAnchor, and set the anchor's text and destination according to
    +   * text() and pathComponent().
    +   *
    +   * \sa createItemWidget()
    +   */
    +  virtual void updateItemWidget(WWidget *itemWidget);
    +
    +  /*! \brief Renders the item as selected or unselected.
    +   *
    +   * The default implementation sets the styleclass for itemWidget()
    +   * to 'item' for an unselected not closeable, 'itemselected' for
    +   * selected not closeable, 'citem' for an unselected closeable and
    +   * 'citemselected' for selected closeable item.
    +   *
    +   * Note that this method is called from within a stateless slot
    +   * implementation, and thus should be stateless as well.
    +   */
    +  virtual void renderSelected(bool selected);
    +
    +  /*! \brief Renders the item as hidden or closed.
    +   *
    +   * The default implementation hides the item widget (including all its
    +   * descendant widgets).
    +   */
    +  virtual void renderHidden(bool hidden);
    +
    +  /*! \brief Returns the signal used to activate the item.
    +   *
    +   * The default implementation will tries to cast the itemWidget() or
    +   * its first child if item is \link WMenuItem::setCloseable closeable\endlink
    +   * to a WInteractWidget and returns the \link WInteractWidget::clicked
    +   * clicked signal\endlink.
    +   */
    +  virtual SignalBase& activateSignal();
    +
    +  /*! \brief Returns the signal used to close the item.
    +   *
    +   * The default implementation will tries to cast the itemWidget() (or
    +   * its second child if item is \link WMenuItem::setCloseable closeable\endlink)
    +   * to a WInteractWidget and returns the \link WInteractWidget::clicked
    +   * clicked signal\endlink.
    +   */
    +  virtual SignalBase& closeSignal();
    +
    +  virtual void setFromInternalPath(const std::string& path);
    +
    +  /*! \brief Progresses to an Ajax-enabled widget.
    +   *
    +   * This method is called when the progressive bootstrap method is
    +   * used, and support for AJAX has been detected. The default
    +   * behavior will upgrade the menu and the contents event handling to use AJAX
    +   * instead of full page reloads.
    +   *
    +   * You may want to reimplement this method if you want to make
    +   * changes to widget when AJAX is enabled.
    +   *
    +   * \sa WMenu::enableAjax()
    +   */
    +  virtual void enableAjax();
    +
    +private:
    +  WWidget          *itemWidget_;
    +  WContainerWidget *contentsContainer_;
    +  WWidget          *contents_;
    +  WMenu            *menu_;
    +  WString           text_;
    +  WString           tip_;
    +  std::string       pathComponent_;
    +  bool              customPathComponent_;
    +  bool              closeable_;
    +  bool              disabled_;
    +  bool              hidden_;
    +
    +  bool contentsLoaded() const;
    +  void loadContents();
    +  void setMenu(WMenu *menu);
    +  void selectNotLoaded();
    +  void selectVisual();
    +  void undoSelectVisual();
    +  void connectActivate();
    +  void connectClose();
    +  void connectSignals();
    +  WWidget *recreateItemWidget();
    +
    +  friend class WMenu;
    +};
    +
    +}
    +
    +#endif // WMENU_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WMenuItem.C b/wt-3.1.7a/src/Wt/WMenuItem.C
    new file mode 100644
    index 0000000..6f9b2e5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMenuItem.C
    @@ -0,0 +1,424 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAnchor"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLabel"
    +#include "Wt/WMenuItem"
    +#include "Wt/WMenu"
    +#include "Wt/WStackedWidget"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +
    +#include "StdGridLayoutImpl.h"
    +#include "WebSession.h"
    +
    +#include "WtException.h"
    +
    +#include <cctype>
    +
    +namespace Wt {
    +
    +WMenuItem::WMenuItem(const WString& text, WWidget *contents,
    +		     LoadPolicy policy)
    +  : itemWidget_(0),
    +    contentsContainer_(0),
    +    contents_(contents),
    +    menu_(0),
    +    customPathComponent_(false),
    +    closeable_(false),
    +    disabled_(false),
    +    hidden_(false)
    +{
    +  setText(text);
    +
    +  if (policy == PreLoading)
    +    // prelearn the stateless slot only if already needed.
    +    implementStateless(&WMenuItem::selectVisual, &WMenuItem::undoSelectVisual);
    +  else if (contents_) {
    +    contentsContainer_ = new WContainerWidget();
    +    contentsContainer_
    +      ->setJavaScriptMember("wtResize", StdGridLayoutImpl::childrenResizeJS());
    +
    +    addChild(contents_);
    +
    +    WT_DEBUG( contentsContainer_->setObjectName("contents-container") );
    +    contentsContainer_->resize(WLength::Auto,
    +			       WLength(100, WLength::Percentage));
    +  }
    +}
    +
    +WMenuItem::~WMenuItem()
    +{
    +  if (menu_)
    +    menu_->removeItem(this);
    +
    +  delete itemWidget_;
    +  delete contents();
    +}
    +
    +WWidget *WMenuItem::createItemWidget()
    +{
    +  WAnchor *enabledLabel = 0;
    +  WText *disabledLabel = 0;
    +
    +  if (!disabled_) {
    +    enabledLabel = new WAnchor();
    +    enabledLabel->setWordWrap(false);
    +  } else {
    +    disabledLabel = new WText("");
    +    disabledLabel->setWordWrap(false);
    +  }
    +
    +  if (closeable_) {
    +    WText *closeIcon = new WText("");
    +    closeIcon->setStyleClass("Wt-closeicon");
    +    WContainerWidget *c = new WContainerWidget();
    +    c->setInline(true);
    +    if (enabledLabel) {
    +      enabledLabel->setStyleClass("label");
    +      c->addWidget(enabledLabel);
    +    } else {
    +      disabledLabel->setStyleClass("label");
    +      c->addWidget(disabledLabel);
    +    }
    +
    +    c->addWidget(closeIcon);
    +
    +    return c;
    +  } else if (enabledLabel)
    +    return enabledLabel;
    +  else
    +    return disabledLabel;
    +}
    +
    +WWidget *WMenuItem::recreateItemWidget()
    +{
    +  delete itemWidget_;
    +  itemWidget_ = 0;
    +  return itemWidget();
    +}
    +
    +void WMenuItem::setText(const WString& text)
    +{
    +  text_ = text;
    +
    +  if (!customPathComponent_) {
    +    std::string result;
    +    if (text_.literal())
    +      result = text_.narrow();
    +    else
    +      result = text_.key();
    +
    +    for (unsigned i = 0; i < result.length(); ++i) {
    +      if (std::isspace((unsigned char)result[i]))
    +	result[i] = '-';
    +      else if (std::isalnum((unsigned char)result[i]))
    +	result[i] = std::tolower((unsigned char)result[i]);
    +      else
    +	result[i] = '_';
    +    }
    +
    +    pathComponent_ = result;
    +  }
    +
    +  if (itemWidget_)
    +    updateItemWidget(itemWidget_);
    +}
    +
    +std::string WMenuItem::pathComponent() const
    +{
    +  return pathComponent_;
    +}
    +
    +void WMenuItem::setPathComponent(const std::string& path)
    +{
    +  customPathComponent_ = true;
    +  pathComponent_ = path;
    +
    +  if (itemWidget_)
    +    updateItemWidget(itemWidget_);
    +}
    +
    +void WMenuItem::setCloseable(bool closeable)
    +{
    +  closeable_ = closeable;
    +
    +  if (menu_)
    +    menu_->recreateItem(this);
    +}
    +
    +void WMenuItem::setHidden(bool hidden)
    +{
    +  hidden_ = hidden;
    +
    +  if (menu_)
    +    menu_->doSetHiddenItem(this, hidden_);
    +}
    +
    +void WMenuItem::hide()
    +{
    +  setHidden(true);
    +}
    +
    +void WMenuItem::show()
    +{
    +  setHidden(false);
    +}
    +
    +void WMenuItem::close()
    +{
    +  if (menu_)
    +    menu_->close(this);
    +}
    +
    +WWidget *WMenuItem::itemWidget()
    +{
    +  if (!itemWidget_) {
    +    itemWidget_ = createItemWidget();
    +    updateItemWidget(itemWidget_);
    +    connectSignals();
    +  }
    +
    +  return itemWidget_;
    +}
    +
    +void WMenuItem::connectActivate()
    +{
    +  SignalBase& as = activateSignal();
    +  if (contentsContainer_ && contentsContainer_->count() == 0)
    +    // load contents (will only do something on the first activation).
    +    as.connect(this, &WMenuItem::selectNotLoaded);
    +  else {
    +    as.connect(this, &WMenuItem::selectVisual);
    +    as.connect(this, &WMenuItem::select);
    +  }
    +}
    +
    +void WMenuItem::connectClose()
    +{
    +  SignalBase& cs = closeSignal();
    +  cs.connect(this, &WMenuItem::close);
    +}
    +
    +void WMenuItem::enableAjax()
    +{
    +  if (!contentsLoaded())
    +    contents_->enableAjax();
    +
    +  if (menu_->internalPathEnabled()) {
    +    updateItemWidget(itemWidget());
    +    resetLearnedSlots();
    +  }
    +}
    +
    +void WMenuItem::updateItemWidget(WWidget *itemWidget)
    +{
    +  WAnchor *enabledLabel = 0;
    +  WText *disabledLabel = 0;
    +
    +  if (closeable_) {
    +    WContainerWidget *c = dynamic_cast<WContainerWidget *>(itemWidget);
    +    if (!disabled_)
    +      enabledLabel = dynamic_cast<WAnchor *>(c->children()[0]);
    +    else
    +      disabledLabel = dynamic_cast<WText *>(c->children()[0]);
    +  } else if (!disabled_)
    +    enabledLabel = dynamic_cast<WAnchor *>(itemWidget);
    +  else
    +    disabledLabel = dynamic_cast<WText *>(itemWidget);
    +
    +  if (enabledLabel) {
    +    enabledLabel->setText(text());
    +
    +    std::string url;
    +    if (menu_ && menu_->internalPathEnabled()) {
    +      std::string internalPath = menu_->internalBasePath() + pathComponent();
    +      WApplication *app = WApplication::instance();
    +      if (app->environment().ajax() || app->environment().agentIsSpiderBot())
    +	url = app->bookmarkUrl(internalPath);
    +      else {
    +	// If no JavaScript is available, then we still add the session
    +	// so that when used in WAnchor it will be handled by the same
    +	// session.
    +	url = app->session()->mostRelativeUrl(internalPath);
    +      }
    +    } else
    +      url = "#";
    +
    +    enabledLabel->setRef(url);
    +    enabledLabel->setToolTip(toolTip());
    +    enabledLabel->clicked().preventDefaultAction();
    +  } else {
    +    disabledLabel->setText(text());
    +    disabledLabel->setToolTip(toolTip());
    +  }
    +}
    +
    +SignalBase& WMenuItem::activateSignal()
    +{
    +  WWidget *w = 0;
    +
    +  if (closeable_) {
    +    WContainerWidget *c = dynamic_cast<WContainerWidget *>(itemWidget_);
    +    w = c->children()[0];
    +  } else
    +    w = itemWidget_;
    +
    +  WInteractWidget *wi  = dynamic_cast<WInteractWidget *>(w->webWidget());
    +
    +  if (wi)
    +    return wi->clicked();
    +  else
    +    throw WtException("WMenuItem::activateSignal(): "
    +                      "could not dynamic_cast itemWidget() or "
    +                      "itemWidget()->children()[0] to a WInteractWidget");
    +}
    +
    +SignalBase& WMenuItem::closeSignal()
    +{
    +  WContainerWidget *c = dynamic_cast<WContainerWidget *>(itemWidget_);
    +  WInteractWidget *ci = dynamic_cast<WInteractWidget *>(c->children()[1]);
    +
    +  if (ci)
    +    return ci->clicked();
    +  else
    +    throw WtException("WMenuItem::closeSignal(): "
    +                      "could not dynamic_cast itemWidget()->children()[1] "
    +                      "to a WInteractWidget");
    +}
    +
    +void WMenuItem::renderSelected(bool selected)
    +{
    +  if (closeable_)
    +    itemWidget()->setStyleClass(selected ? "citemselected" : "citem");
    +  else
    +    itemWidget()->setStyleClass(selected ? "itemselected" : "item");
    +}
    +
    +void WMenuItem::renderHidden(bool hidden)
    +{
    +  itemWidget()->setHidden(hidden);
    +}
    +
    +void WMenuItem::selectNotLoaded()
    +{
    +  if (!contentsLoaded())
    +    select();
    +}
    +
    +bool WMenuItem::contentsLoaded() const
    +{
    +  return !contentsContainer_ || contentsContainer_->count() == 1;
    +}
    +
    +void WMenuItem::loadContents()
    +{
    +  if (!contentsLoaded()) {
    +    removeChild(contents_);
    +    contentsContainer_->addWidget(contents_);
    +
    +    // A user should do the following himself, if he wants.
    +    // contents_->resize(WLength::Auto, WLength(100, WLength::Percentage));
    +
    +    // now prelearn the stateless slot
    +    implementStateless(&WMenuItem::selectVisual, &WMenuItem::undoSelectVisual);
    +
    +    connectActivate();
    +  }
    +}
    +
    +void WMenuItem::setMenu(WMenu *menu)
    +{
    +  menu_ = menu;
    +}
    +
    +WWidget *WMenuItem::contents() const
    +{
    +  if (contentsContainer_)
    +    return contentsContainer_;
    +  else
    +    return contents_;
    +}
    +
    +WWidget *WMenuItem::takeContents()
    +{
    +  WWidget *result = contents_;
    +
    +  if (!contentsLoaded())
    +    removeChild(contents_);
    +
    +  contents_ = 0;
    +
    +  return result;
    +}
    +
    +void WMenuItem::setFromInternalPath(const std::string& path)
    +{
    +  if (menu_->contentsStack_
    +      && menu_->contentsStack_->currentWidget() != contents())
    +    menu_->select(menu_->indexOf(this), false);
    +}
    +
    +void WMenuItem::select()
    +{
    +  if (menu_)
    +    menu_->select(this);
    +}
    +
    +void WMenuItem::selectVisual()
    +{
    +  if (menu_)
    +    menu_->selectVisual(this);
    +}
    +
    +void WMenuItem::undoSelectVisual()
    +{
    +  if (menu_)
    +    menu_->undoSelectVisual();
    +}
    +
    +void WMenuItem::setToolTip(const WString& tip)
    +{
    +  tip_ = tip;
    +
    +  if (itemWidget_)
    +    updateItemWidget(itemWidget_);
    +}
    +
    +void WMenuItem::setDisabled(bool disabled)
    +{
    +  disabled_ = disabled;
    +
    +  if (menu_)
    +    menu_->recreateItem(this);
    +}
    +
    +void WMenuItem::enable()
    +{
    +  setDisabled(false);
    +}
    +
    +void WMenuItem::disable()
    +{
    +  setDisabled(true);
    +}
    +
    +void WMenuItem::connectSignals()
    +{
    +  if (!disabled_) {
    +    if (contentsLoaded())
    +      implementStateless(&WMenuItem::selectVisual, &WMenuItem::undoSelectVisual);
    +    connectActivate();
    +  }
    +
    +  if (closeable_)
    +    connectClose();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMessageBox b/wt-3.1.7a/src/Wt/WMessageBox
    new file mode 100644
    index 0000000..ec1667f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageBox
    @@ -0,0 +1,188 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMESSAGEBOX_
    +#define WMESSAGEBOX_
    +
    +#include <Wt/WDialog>
    +#include <Wt/WSignalMapper>
    +
    +namespace Wt {
    +
    +class WContainerWidget;
    +class WImage;
    +class WPushButton;
    +class WText;
    +
    +/*! \class WMessageBox Wt/WMessageBox Wt/WMessageBox
    + *  \brief A standard dialog for confirmation or to get simple user input
    + *
    + * The message box shows a message in a dialog window, with a number
    + * of buttons. These buttons may be standard buttons, or customized.
    + *
    + * There are two distinct ways for using a %WMessageBox, which reflect
    + * the two ways of dealing with a WDialog box.
    + * 
    + * \if cpp
    + * The easiest way is using the static show() method, which shows a
    + * message box, blocks the current thread, and returns the button that
    + * was pressed by the user. Since this uses the WDialog::exec(), it suffers
    + * from the same scalability issues.
    + * \endif
    + *
    + * The more elaborate way is by creating a WMessageBox, and connecting
    + * the buttonClicked signal to a method. This method then interpretes
    + * the result and deletes the message box.
    + * 
    + * \if cpp
    + * Example code (using the exec() method):
    + * \code
    + * StandardButton
    + *   result = WMessageBox::show("Confirm", "About to wreak havoc... Continue ?",
    + *                              Ok | Cancel);
    + * \endcode
    + * \endif
    + *
    + * This will show a message box that looks like this:
    + *
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WMessageBox-default-1.png "Example of a WMessageBox (default)"
    + * </TD> <TD>
    + * \image html WMessageBox-polished-1.png "Example of a WMessageBox (polished)"
    + * </TD> </TR> </TABLE>
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in the WMessageBox buttons can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WMessageBox.Abort: Abort
    + * - Wt.WMessageBox.Cancel: Cancel
    + * - Wt.WMessageBox.Ignore: Ignore
    + * - Wt.WMessageBox.No: No
    + * - Wt.WMessageBox.NoToAll: No to All
    + * - Wt.WMessageBox.Ok: Ok
    + * - Wt.WMessageBox.Retry: Retry
    + * - Wt.WMessageBox.Yes: Yes
    + * - Wt.WMessageBox.YesToAll: Yes to All
    + *
    + * <h3>CSS</h3>
    + *
    + * A WMessageBox can be styled using the <tt>Wt-dialog</tt> and 
    + * <tt>Wt-outset</tt> style classes from it's superclass WDialog. 
    + * The messagebox' buttons can be styled using <tt>Wt-msgbox-buttons</tt>
    + * style class.
    + */
    +class WT_API WMessageBox : public WDialog
    +{
    +public:
    +  using WDialog::show;
    +
    +  /*! \brief Creates an empty message box.
    +   */
    +  WMessageBox();
    +
    +  /*! \brief Creates a message box with given caption, text, icon, and
    +   *         buttons.
    +   */
    +  WMessageBox(const WString& caption, const WString& text, Icon icon,
    +	      WFlags<StandardButton> buttons);
    +
    +  /*! \brief Sets the text for the message box.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the message box text.
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Returns the text widget.
    +   *
    +   * This may be useful to customize the style or layout of the displayed
    +   * text.
    +   */
    +  WText *textWidget() const { return text_; }
    +
    +  /*! \brief Sets the icon.
    +   */
    +  void setIcon(Icon icon);
    +
    +  /*! \brief Returns the icon.
    +   */
    +  Icon icon() const { return icon_; }
    +
    +  /* !\brief Returns the icon image.
    +   *
    +   * This may be useful to customize the style or layout of the displayed
    +   * icon. If icon() == NoIcon, then this method returns \c 0.
    +   */
    +  WImage *iconImage() const { return iconImage_; }
    +
    +  /*! \brief Add a custom button with given text.
    +   *
    +   * When the button is clicked, the associated result will be returned.
    +   */
    +  WPushButton *addButton(const WString& text, StandardButton result);
    +
    +  /*! \brief Sets standard buttons for the message box.
    +   */
    +  void setButtons(WFlags<StandardButton> buttons);
    +
    +  /*! \brief Returns the standard buttons.
    +   */
    +  WFlags<StandardButton> buttons() const { return buttons_; }
    +
    +  /*! \brief Returns the button widget for the given standard button.
    +   *
    +   * This may be useful to customize the style or layout of the button.
    +   */
    +  WPushButton *button(StandardButton b);
    +
    +  /*! \brief Returns the result of this message box.
    +   *
    +   * This value is only defined after a button has been clicked.
    +   */
    +  StandardButton buttonResult() { return result_; }
    +
    +  /*! \brief Convenience method to show a message box, blocking the current
    +   *         thread.
    +   *
    +   * Show a message box, blocking the current thread until the message box
    +   * is closed, and return the result.
    +   */
    +  static StandardButton show(const WString& caption,
    +			     const WString& text,
    +			     WFlags<StandardButton> buttons);
    +
    +  /*! \brief %Signal emitted when a button is clicked.
    +   */
    +  Signal<StandardButton>& buttonClicked() { return buttonClicked_; }
    +
    +private:
    +  WFlags<StandardButton> buttons_;
    +  Icon icon_;
    +  StandardButton result_;
    +  Signal<StandardButton> buttonClicked_;
    +
    +  WContainerWidget *buttonContainer_;
    +  WText            *text_;
    +  WImage           *iconImage_;
    +
    +  WSignalMapper<StandardButton,NoClass> *buttonMapper_;
    +
    +  void create();
    +
    +  void onButtonClick(StandardButton b);
    +  void mappedButtonClick(StandardButton b);
    +
    +  static StandardButton order_[];
    +
    +  static const char *buttonText_[];
    +  static const char *iconURI[];
    +};
    +
    +}
    +
    +#endif // WMESSAGEBOX_
    diff --git a/wt-3.1.7a/src/Wt/WMessageBox.C b/wt-3.1.7a/src/Wt/WMessageBox.C
    new file mode 100644
    index 0000000..7a24a5a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageBox.C
    @@ -0,0 +1,159 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WImage"
    +#include "Wt/WMessageBox"
    +#include "Wt/WPushButton"
    +#include "Wt/WSignalMapper"
    +#include "Wt/WText"
    +
    +namespace Wt {
    +
    +StandardButton WMessageBox::order_[] = { Ok, Yes, YesAll, Retry, No,
    +					 NoAll, Abort, Ignore, Cancel };
    +
    +const char *WMessageBox::buttonText_[]
    +  = { "Wt.WMessageBox.Ok", "Wt.WMessageBox.Yes", "Wt.WMessageBox.YesToAll",
    +      "Wt.WMessageBox.Retry", "Wt.WMessageBox.No", "Wt.WMessageBox.NoToAll",
    +      "Wt.WMessageBox.Abort", "Wt.WMessageBox.Ignore", "Wt.WMessageBox.Cancel"
    +    };
    +
    +const char *WMessageBox::iconURI[]
    +  = { "icons/information.png",
    +      "icons/warning.png",
    +      "icons/critical.png",
    +      "icons/question.png" };
    +
    +WMessageBox::WMessageBox()
    +  : buttons_(0),
    +    icon_(NoIcon),
    +    result_(NoButton),
    +    buttonClicked_(this)
    +{
    +  create();
    +}
    +
    +WMessageBox::WMessageBox(const WString& caption, const WString& text,
    +			 Icon icon, WFlags<StandardButton> buttons)
    +  : WDialog(caption),
    +    buttons_(0),
    +    icon_(NoIcon),
    +    buttonClicked_(this)
    +{
    +  create();
    +
    +  setText(text);
    +  setIcon(icon);
    +  setButtons(buttons);
    +}
    +
    +WPushButton *WMessageBox::addButton(const WString& text, StandardButton result)
    +{
    +  WPushButton *b = new WPushButton(text, buttonContainer_);
    +  buttonMapper_->mapConnect(b->clicked(), result);
    +
    +  return b;
    +}
    +
    +void WMessageBox::create()
    +{
    +  iconImage_ = 0;
    +  text_ = new WText(contents());
    +  WContainerWidget *buttons = new WContainerWidget(contents());
    +  buttons->setMargin(WLength(3), Top);
    +  buttons->setPadding(WLength(5), Left|Right);
    +  buttonContainer_ = new WContainerWidget(buttons);
    +  buttonMapper_ = new WSignalMapper<StandardButton>(this);
    +  buttonMapper_->mapped().connect(this, &WMessageBox::onButtonClick);
    +
    +  //buttonMapper_->mapConnect(contents()->escapePressed, Cancel);
    +  //contents()->escapePressed.preventDefault();
    +
    +  buttonContainer_->setStyleClass("Wt-msgbox-buttons");
    +
    +  rejectWhenEscapePressed();
    +}
    +
    +void WMessageBox::setText(const WString& text)
    +{
    +  text_->setText(text);
    +}
    +
    +const WString& WMessageBox::text() const
    +{
    +  return text_->text();
    +}
    +
    +void WMessageBox::setIcon(Icon icon)
    +{
    +  icon_ = icon;
    +
    +  /*
    +   * Ignore icons for now... Icons are so desktop ?
    +   */
    +  if (false && icon_ != NoIcon) {
    +    if (!iconImage_) {
    +      iconImage_ = new WImage(iconURI[icon_ - 1]);
    +      contents()->insertBefore(iconImage_, text_);
    +    } else
    +      iconImage_->setImageRef(iconURI[icon_ - 1]);
    +  } else {
    +    delete iconImage_;
    +    iconImage_ = 0;
    +  }
    +}
    +
    +void WMessageBox::setButtons(WFlags<StandardButton> buttons)
    +{
    +  buttons_ = buttons;
    +  buttonContainer_->clear();
    +
    +  for (int i = 0; i < 9; ++i)
    +    if (buttons_ & order_[i]) {
    +      WPushButton *b
    +	= new WPushButton(tr(buttonText_[i]), buttonContainer_);
    +      buttonMapper_->mapConnect(b->clicked(), order_[i]);
    +
    +      if (order_[i] == Ok || order_[i] == Yes)
    +	b->setFocus();
    +    }
    +}
    +
    +WPushButton *WMessageBox::button(StandardButton b)
    +{
    +  int index = 0;
    +  for (int i = 1; i <= 9; ++i)
    +    if (buttons_ & order_[i]) {
    +      if (order_[i] == b)
    +	return
    +	  dynamic_cast<WPushButton *>(buttonContainer_->children()[index]);
    +      ++index;
    +    }
    +
    +  return 0;
    +}
    +
    +void WMessageBox::onButtonClick(StandardButton b)
    +{
    +  result_ = b;
    +  buttonClicked_.emit(b);
    +}
    +
    +StandardButton WMessageBox::show(const WString& caption,
    +				 const WString& text,
    +				 WFlags<StandardButton> buttons)
    +{
    +  WMessageBox box(caption, text, Information, buttons);
    +  box.buttonClicked().connect(&box, &WMessageBox::accept);
    +
    +  box.exec();
    +
    +  return box.buttonResult();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMessageResourceBundle b/wt-3.1.7a/src/Wt/WMessageResourceBundle
    new file mode 100644
    index 0000000..f6ac1bb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageResourceBundle
    @@ -0,0 +1,133 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMESSAGE_RESOURCE_BUNDLE_
    +#define WMESSAGE_RESOURCE_BUNDLE_
    +
    +#include <vector>
    +#include <set>
    +#include <Wt/WFlags>
    +#include <Wt/WLocalizedStrings>
    +
    +namespace Wt {
    +
    +class WMessageResources;
    +
    +/*! \class WMessageResourceBundle Wt/WMessageResourceBundle Wt/WMessageResourceBundle
    + *  \brief Support for localized strings using XML files.
    + *
    + * The resource bundle manages a number of resource files, which allow
    + * the developer to conceptually manage its messages in a number of
    + * libraries.
    + *
    + * For example, a WApplication may have a generic message library, that is
    + * shared with many other libraries, with re-occurring messages (such as
    + * 'welcome', 'add to shopping cart', and 'pay'), and a specific message
    + * library for specific messages.
    + *
    + * Usage example:
    + *
    + * XML file "general.xml":
    + * \code
    + * <?xml version="1.0" encoding="UTF-8"?>
    + * <messages>
    + *   <message id='welcome-text'>
    + *     Welcome dear visiter, {1} of the WFooBar magic website !
    + *   </message>
    + *   <message id='company-policy'>
    + *     The company policy is to <b>please our share-holders</b>.
    + *   </message>
    + * </messages>
    + * \endcode
    + *
    + * \if cpp
    + * Use this resource bundle in your program:
    + * \code
    + * // load the message resource bundle
    + * Wt::WApplication *app = Wt::WApplication::instance();
    + * app->messageResourceBundle().use("general");
    + *
    + * // resolve a string using the resource bundle
    + * Wt::WText *welcome = new Wt::WText(tr("welcome-visitor").arg("Bart"));
    + * \endcode
    + * \endif
    + */
    +class WT_API WMessageResourceBundle : public WLocalizedStrings
    +{
    +public:
    +  /*! \brief Resource key scope */
    +  enum Scope {Default=1, Local=2};
    +
    +  /*! \brief Creates a message resource bundle.
    +   */
    +  WMessageResourceBundle();
    +
    +  virtual ~WMessageResourceBundle();
    +
    +  /*! \brief Adds a (series) of message resource files to be used.
    +   *
    +   * The \p path is not a URI, and relative paths will be resolved
    +   * with respect to the working directory of the server. The XML
    +   * files do not need to be deployed in the web server's docroot.
    +   *
    +   * When you give as \p path: /path/to/name, then the following message
    +   * resource files will be used:
    +   *  - /path/to/name.xml (default, English)
    +   *  - /path/to/name_nl.xml (for Dutch)
    +   *  - /path/to/name_fr.xml (for French)
    +   *  - etc...
    +   *
    +   * The message file that is used depends on the application's locale.
    +   *
    +   * A Message resource file must be formatted as follows:
    +   * \code
    +     <?xml version="1.0" encoding="UTF-8"?>
    +     <messages>
    +       <message id='welcome-text'>
    +         Welcome dear visiter, {1} of the WFooBar magic website !
    +       </message>
    +       <message id='company-policy'>
    +         The company policy is to <b>please our share-holders</b>.
    +       </message>
    +     </messages>
    +     \endcode
    +   *
    +   * The encodings supported are ASCII, UTF-8 (recommended) or UTF-16.
    +   *
    +   * To refer the two messages defined in this resource file, use
    +   * WString::tr("welcome-text").\link WString::arg()
    +   * arg\endlink(userName) or WWidget::tr("company-policy").
    +   *
    +   * \sa WApplication::locale(), WString::tr(), WWidget::tr()
    +   */
    +  void use(const std::string& path, bool loadInMemory = true);
    +
    +  /*! \brief Returns a set of all keys connected with this WMessageResources.
    +      
    +    Returns a set of all keys connected with this WMessageResources, 
    +    within the scope provided as parameter.
    +   */
    +  const std::set<std::string> keys(WFlags<Scope> scope) const;
    +
    +  virtual void refresh();
    +  virtual void hibernate();
    +
    +#ifndef WT_TARGET_JAVA
    +  virtual bool resolveKey(const std::string& key, std::string& result);
    +#else // WT_TARGET_JAVA
    +  virtual std::string *resolveKey(const std::string& key) = 0;
    +#endif // WT_TARGET_JAVA
    +
    +private:
    +  void useBuiltin(const char *xmlbundle);
    +  std::vector<WMessageResources *> messageResources_;
    +  
    +  friend class WApplication;
    +};
    +
    +}
    +
    +#endif // WMESSAGE_RESOURCE_BUNDLE_
    diff --git a/wt-3.1.7a/src/Wt/WMessageResourceBundle.C b/wt-3.1.7a/src/Wt/WMessageResourceBundle.C
    new file mode 100644
    index 0000000..e802ef2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageResourceBundle.C
    @@ -0,0 +1,82 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WMessageResourceBundle"
    +#include "Wt/WMessageResources"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WMessageResourceBundle::WMessageResourceBundle()
    +{
    +}
    +
    +WMessageResourceBundle::~WMessageResourceBundle()
    +{
    +  for (unsigned i = 0; i < messageResources_.size(); ++i)
    +    delete messageResources_[i];
    +}
    +
    +void WMessageResourceBundle::use(const std::string& path, bool loadInMemory)
    +{
    +  for (unsigned i = 0; i < messageResources_.size(); ++i)
    +    if ((!messageResources_[i]->path().empty()) &&
    +        messageResources_[i]->path() == path)
    +      return;
    +
    +  messageResources_.push_back(new WMessageResources(path, loadInMemory));
    +}
    +
    +void WMessageResourceBundle::useBuiltin(const char *xmlbundle)
    +{
    +  messageResources_.push_back(new WMessageResources(xmlbundle));
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WMessageResourceBundle::resolveKey(const std::string& key,
    +					std::string& result)
    +{
    +  for (unsigned i = 0; i < messageResources_.size(); ++i) {
    +    if (messageResources_[i]->resolveKey(key, result))
    +      return true;
    +  }
    +
    +  return false;
    +}
    +#else
    +std::string *WMessageResourceBundle::resolveKey(const std::string& key)
    +{
    +  return 0;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WMessageResourceBundle::refresh()
    +{
    +  for (unsigned i = 0; i < messageResources_.size(); ++i) {
    +    messageResources_[i]->refresh();
    +  }
    +}
    +
    +void WMessageResourceBundle::hibernate()
    +{
    +  for (unsigned i = 0; i < messageResources_.size(); ++i)
    +    messageResources_[i]->hibernate();
    +}
    +
    +const std::set<std::string> 
    +WMessageResourceBundle::keys(WFlags<Scope> scope) const
    +{
    +  std::set<std::string> keys;
    +
    +  for (unsigned i = 0; i < messageResources_.size(); ++i) {
    +    const std::set<std::string>& resources = messageResources_[i]->keys(scope);
    +    keys.insert(resources.begin(), resources.end());
    +  }
    +
    +  return keys;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WMessageResources b/wt-3.1.7a/src/Wt/WMessageResources
    new file mode 100644
    index 0000000..0afc71a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageResources
    @@ -0,0 +1,56 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMESSAGE_RESOURCES_
    +#define WMESSAGE_RESOURCES_
    +
    +#include <string>
    +#include <vector>
    +#include <map>
    +#include <set>
    +#include <Wt/WFlags>
    +#include <Wt/WMessageResourceBundle>
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WString;
    +
    +class WT_API WMessageResources
    +{
    +public:
    +  WMessageResources(const std::string& path, bool loadInMemory = true);
    +  WMessageResources(const char *data);
    +
    +  void hibernate();
    +
    +  const std::string& path() const { return path_; }
    +
    +  bool resolveKey(const std::string& key, std::string& value);
    +
    +  void refresh();
    +
    +  std::set<std::string> keys(WFlags<WMessageResourceBundle::Scope> scope) const;
    +
    +  typedef std::map<std::string, std::string> KeyValueMap;
    +
    +private:
    +  const bool loadInMemory_;
    +  bool loaded_;
    +  const std::string path_;
    +
    +  KeyValueMap local_;
    +  KeyValueMap defaults_;
    +
    +  bool readResourceFile(const std::string& locale, KeyValueMap& valueMap);
    +  bool readResourceStream(std::istream &s, KeyValueMap& valueMap,
    +                          const std::string &fileName);
    +
    +};
    +
    +}
    +
    +#endif // WMESSAGE_RESOURCES_
    diff --git a/wt-3.1.7a/src/Wt/WMessageResources.C b/wt-3.1.7a/src/Wt/WMessageResources.C
    new file mode 100644
    index 0000000..cb630e5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WMessageResources.C
    @@ -0,0 +1,317 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_CNOR
    +#include <fstream>
    +#include <stdexcept>
    +#include <cstring>
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/scoped_array.hpp>
    +
    +#include "DomElement.h"
    +#include "Wt/WLogger"
    +#include "Wt/WMessageResources"
    +#include "Wt/WString"
    +#include "Wt/WApplication"
    +
    +#include "rapidxml/rapidxml.hpp"
    +#include "rapidxml/rapidxml_print.hpp"
    +
    +using namespace Wt;
    +using namespace rapidxml;
    +
    +namespace {
    +  void encode_utf8(unsigned long code, char *&out)
    +  {
    +    if (code < 0x80) { // 1 byte sequence
    +      out[0] = static_cast<unsigned char>(code);
    +      out += 1;
    +    } else if (code < 0x800) {  // 2 byte sequence
    +      out[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[0] = static_cast<unsigned char>(code | 0xC0);
    +      out += 2;
    +    } else if (code < 0x10000) { // 3 byte sequence
    +      out[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[0] = static_cast<unsigned char>(code | 0xE0);
    +      out += 3;
    +    } else if (code < 0x110000) { // 4 byte sequence
    +      out[3] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
    +      out[0] = static_cast<unsigned char>(code | 0xF0);
    +      out += 4;
    +    } else
    +      // impossible since UTF16 is already checked ?
    +      throw std::runtime_error("Invalid UTF-16 stream");
    +  }
    +
    +  void fixSelfClosingTags(xml_node<> *x_node)
    +  {
    +    for (xml_node<> *x_child = x_node->first_node(); x_child;
    +	 x_child = x_child->next_sibling())
    +      fixSelfClosingTags(x_child);
    +
    +    if (!x_node->first_node()
    +	&& x_node->value_size() == 0
    +	&& !Wt::DomElement::isSelfClosingTag
    +	(std::string(x_node->name(), x_node->name_size()))) {
    +      // We need to add an emtpy data node since <div /> is illegal HTML
    +      // (but valid XML / XHTML)
    +      xml_node<> *empty
    +	= x_node->document()->allocate_node(node_data, 0, 0, 0, 0);
    +      x_node->append_node(empty);
    +    }
    +  }
    +}
    +
    +namespace Wt {
    +
    +WMessageResources::WMessageResources(const std::string& path,
    +				     bool loadInMemory)
    +  : loadInMemory_(loadInMemory),
    +    loaded_(false),
    +    path_(path)
    +{}
    +
    +WMessageResources::WMessageResources(const char *data)
    +  : loadInMemory_(true),
    +    loaded_(false),
    +    path_("")
    +{
    +  std::istringstream s(data,  std::ios::in | std::ios::binary);
    +  readResourceStream(s, defaults_, "<internal resource bundle>");
    +}
    +
    +std::set<std::string> 
    +WMessageResources::keys(WFlags<WMessageResourceBundle::Scope> scope) const
    +{
    +  std::set<std::string> keys;
    +  
    +  std::map<std::string, std::string>::const_iterator it;
    +
    +  if (scope & WMessageResourceBundle::Local)
    +    for (it = local_.begin() ; it != local_.end(); it++)
    +      keys.insert((*it).first);
    +
    +  if (scope & WMessageResourceBundle::Default)
    +    for (it = defaults_.begin() ; it != defaults_.end(); it++)
    +      keys.insert((*it).first);
    +
    +  return keys;
    +}
    +
    +void WMessageResources::refresh()
    +{
    +  if (!path_.empty()) {
    +    defaults_.clear();
    +    readResourceFile("", defaults_);
    +
    +    local_.clear();
    +    WApplication *app = WApplication::instance();
    +    std::string locale = app ? app->locale() : std::string();
    +
    +    if (!locale.empty())
    +      for(;;) {
    +        if (readResourceFile(locale, local_))
    +          break;
    +
    +        /* try a lesser specified variant */
    +        std::string::size_type l = locale.rfind('-');
    +        if (l != std::string::npos)
    +          locale.erase(l);
    +        else
    +          break;
    +      }
    +
    +      loaded_ = true;
    +  }
    +}
    +
    +void WMessageResources::hibernate()
    +{
    +  if (!loadInMemory_) {
    +    defaults_.clear();
    +    local_.clear();
    +    loaded_ = false;
    +  }
    +}
    +
    +bool WMessageResources::resolveKey(const std::string& key, std::string& result)
    +{
    +  if (!loaded_)
    +    refresh();
    +
    +  KeyValueMap::const_iterator j;
    +
    +  j = local_.find(key);
    +  if (j != local_.end()) {
    +    result = j->second;
    +    return true;
    +  }
    +
    +  j = defaults_.find(key);
    +  if (j != defaults_.end()) {
    +    result = j->second;
    +    return true;
    +  }
    +
    +  return false;
    +}
    +
    +bool WMessageResources::readResourceFile(const std::string& locale,
    +				         KeyValueMap& valueMap)
    +{
    +  if (!path_.empty()) {
    +    std::string fileName
    +      = path_ + (locale.length() > 0 ? "_" : "") + locale + ".xml";
    +
    +    std::ifstream s(fileName.c_str(), std::ios::binary);
    +    return readResourceStream(s, valueMap, fileName);
    +  } else {
    +    return false;
    +  }
    +}
    +
    +bool WMessageResources::readResourceStream(std::istream &s,
    +					   KeyValueMap& valueMap,
    +                                           const std::string &fileName)
    +{
    +  if (!s)
    +    return false;
    +
    +  s.seekg(0, std::ios::end);
    +  int length = s.tellg();
    +  s.seekg(0, std::ios::beg);
    +
    +  enum { UTF8, UTF16LE, UTF16BE } encoding = UTF8;
    +
    +  // See if we have UTF16 BOM
    +  if (length >= 2) {
    +    unsigned char m1, m2;
    +    m1 = s.get();
    +    m2 = s.get();
    +
    +    if (m1 == 0xFE && m2 == 0xFF)
    +      encoding = UTF16BE;
    +    else if (m1 == 0xFF && m2 == 0xFE)
    +      encoding = UTF16LE;
    +    else {
    +      s.unget();
    +      s.unget();
    +    }
    +  }
    +
    +  boost::scoped_array<char> text
    +    (new char[encoding == UTF8 ? length + 1 : (length-2)*2 + 1]);
    +
    +  if (encoding != UTF8) {
    +    // Transcode from UTF16 stream to UTF8 text
    +    const int BUFSIZE = 2048;
    +    unsigned char buf[BUFSIZE];
    +
    +    unsigned long firstWord = 0;
    +    char *out = text.get();
    +
    +    for (;;) {
    +      s.read((char *)buf, BUFSIZE);
    +      int read = s.gcount();
    +
    +      for (int i = 0; i < read; i += 2) {
    +	unsigned long ch;
    +
    +	// read next 2-byte char
    +	if (encoding == UTF16LE) {
    +	  ch = buf[i+1];
    +	  ch = (ch << 8) | buf[i];
    +	} else {
    +	  ch = buf[i];
    +	  ch = (ch << 8) | buf[i+1];
    +	}
    +
    +	if (firstWord) {
    +	  // second word of multi-word
    +	  if (ch < 0xDC00 || ch > 0xDFFF) {
    +	    read = 0;
    +	    break;
    +	  }
    +
    +	  unsigned long cp = 0x10000 + (((firstWord & 0x3FF) << 10)
    +					| (ch & 0x3FF));
    +
    +	  encode_utf8(cp, out);
    +
    +	  firstWord = 0;
    +	} else if (ch >= 0xD800 && ch <= 0xDBFF) {
    +	  // first word of multi-word
    +	  firstWord = ch;
    +	} else {
    +	  // single-word
    +	  encode_utf8(ch, out);
    +
    +	  firstWord = 0;
    +	}
    +      }
    +
    +      if (read != BUFSIZE)
    +	break;
    +    }
    +
    +    length = out - text.get();
    +  } else {
    +    s.read(text.get(), length);
    +  }
    +
    +  text[length] = 0;
    +
    +  try {
    +    xml_document<> doc;
    +    doc.parse<parse_no_string_terminators
    +      | parse_comment_nodes
    +      | parse_xhtml_entity_translation
    +      | parse_validate_closing_tags>(text.get());
    +
    +    xml_node<> *x_root = doc.first_node("messages");
    +    if (!x_root)
    +      throw parse_error("Expected <messages> root element", text.get());
    +
    +    // factor 2 in case we expanded <span/> to <span></span>
    +    boost::scoped_array<char> buf(new char[length * 2]);
    +
    +    for (xml_node<> *x_message = x_root->first_node("message");
    +	 x_message; x_message = x_message->next_sibling("message")) {
    +      if (std::strncmp(x_message->name(), "message", x_message->name_size()) != 0)
    +	throw parse_error("Expected <message>", x_message->value());
    +
    +      xml_attribute<> *x_id = x_message->first_attribute("id");
    +      if (!x_id)
    +	throw parse_error("Missing message id", x_message->value());
    +
    +      std::string id(x_id->value(), x_id->value_size());
    +
    +      char *ptr = buf.get();
    +
    +      for (xml_node<> *x_child = x_message->first_node();
    +	   x_child; x_child = x_child->next_sibling()) {
    +	fixSelfClosingTags(x_child);
    +	ptr = print(ptr, *x_child, print_no_indenting);
    +      }
    +
    +      valueMap[id] = std::string(buf.get(), ptr - buf.get());
    +    }
    +  } catch (parse_error& e) {
    +    WApplication::instance()->log("error")
    +      << "Error reading " << fileName
    +      << ": at character " << e.where<char>() - text.get()
    +      << ": " << e.what();
    +  }
    +
    +  return true;
    +}
    +
    +}
    +#endif // WT_CNOR
    +
    diff --git a/wt-3.1.7a/src/Wt/WModelIndex b/wt-3.1.7a/src/Wt/WModelIndex
    new file mode 100644
    index 0000000..9c25086
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WModelIndex
    @@ -0,0 +1,435 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WMODEL_INDEX_H_
    +#define WMODEL_INDEX_H_
    +
    +#include <vector>
    +#include <set>
    +#include <boost/any.hpp>
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WFlags>
    +
    +namespace Wt {
    +
    +class WAbstractItemModel;
    +class WModelIndex;
    +
    +#ifndef WT_TARGET_JAVA
    +typedef std::set<WModelIndex> WModelIndexSet;
    +
    +extern std::size_t hash_value(const Wt::WModelIndex& index);
    +#else
    +typedef std::treeset<WModelIndex> WModelIndexSet;
    +#endif
    +
    +/*! \defgroup modelview Model/view system
    + *  \brief Classes that implement %Wt's model/view system.
    + *
    + * <h2>1. Models</h2>
    + *
    + * The library provides support for tabular, tree-like and tree-table like
    + * models. All of these implement WAbstractItemModel.
    + *
    + * <h3>Concrete model implementations</h3>
    + *
    + * The following concrete model implementations are provided:
    + * - Wt::WStandardItemModel: a full general purpose model, which stores data
    + *   in memory.
    + * - Wt::WStringListModel: a low-height single column model, useful for simple
    + *   list views
    + * - Wt::Dbo::QueryModel: a database query backed model
    + *
    + * <h3>Proxy model implementations</h3>
    + *
    + * Proxy models are helper models which wrap around another model, to
    + * provide additional functionality on top of the existing model. The
    + * following propy models:
    + *
    + * - Wt::WSortFilterProxyModel: provides sorting and filtering support
    + * - Wt::WAggregateProxyModel: provides column aggregation (useful only for
    + *   views that implement column aggregation such as WAbstractItemView's).
    + *
    + * <h3>Abstract models</h3>
    + *
    + * Abstract models cannot be instantiated as such, but are the base point
    + * for custom model implementations:
    + *
    + * - Wt::WAbstractItemModel: abstract base class of all models
    + * - Wt::WAbstractTableModel: abstract base class for tabular models
    + * - Wt::WAbstractProxyModel: abstract base class for proxy models.
    + *
    + * <h2>2. Views</h2>
    + *
    + * <h3>Item-based views</h3>
    + *
    + * - WComboBox: a combo box
    + * - WSelectionBox: a selection box
    + * - WTableView: a table view (with editing support)
    + * - WTreeView: a tree(-table) view (with editing support)
    + * - WSuggestionPopup: an intelligent input-driven combo box
    + *
    + * <h3>Graphical views</h3>
    + *
    + * - Chart::WCartesianChart: 2D cartesian chart
    + * - Chart::WPieChart: pie charts
    + *
    + * <h3>ExtJS-based (JavaScript-only) views</h3>
    + *
    + * These views are being deprecated in favour of accessible
    + * counterparts.
    + *
    + * - Ext::ComboBox: ExtJS implementation of combo box
    + * - Ext::TableView: ExtJS implementation of table view (with editing support)
    + *
    + * <h2>3. Helper classes</h2>
    + *
    + * <h3>Model indexes</h3>
    + *
    + * WModelIndex represents an index to an item of a WAbstractItemModel,
    + * identified by a row, column and parent node.
    + *
    + * <h3>Item delegates</h3>
    + *
    + * Item delegates are used by WTableView and WTreeView to render a
    + * single item and to provide editing support.
    + *
    + * The abstract base class is WAbstractItemDelegate, and a default
    + * implementation is provided by WItemDelegate.
    + */
    +
    +/*! \brief Enumeration that indicates a role for a data item.
    + *
    + * A single data item can have data associated with it corresponding
    + * to different roles. Each role may be used by the corresponding view
    + * class in a different way.
    + *
    + * \sa WModelIndex::data()
    + *
    + * \ingroup modelview
    + */
    +enum ItemDataRole {
    +  DisplayRole = 0,      //!< Role for textual representation
    +  DecorationRole = 1,   //!< Role for the url of an icon
    +  EditRole = 2,         //!< Role for the edited value
    +  StyleClassRole = 3,   //!< Role for the style class
    +  /*! Role that indicates the check state. Data for this role should be
    +   * a <tt>bool</tt>. When the Wt::ItemIsTristate flag is set for the item,
    +   * data for this role should be of type Wt::CheckState.
    +   */
    +  CheckStateRole = 4,   
    +  ToolTipRole = 5,      //!< Role for a tooltip
    +  InternalPathRole = 6, //!< Role for an internal path activated when clicked
    +  UrlRole = 7,          //!< Role for a url activated when clicked
    +  LevelRole = 8,        //!< Level in aggregation, for header data.
    +  MarkerPenColorRole = 16,  //!< Marker pen color (for Chart::WCartesianChart)
    +  MarkerBrushColorRole = 17,//!< Marker brush color (for Chart::WCartesianChart)
    +  UserRole = 32         //!< First role reserved for user purposes
    +};
    +
    +/*! \brief Flags that indicate data item options
    + *
    + * \sa WModelIndex::flags()
    + *
    + * \ingroup modelview
    + */
    +enum ItemFlag {
    +  ItemIsSelectable = 0x1,    //!< Item can be selected
    +  ItemIsEditable = 0x2,      //!< Item can be edited
    +  ItemIsUserCheckable = 0x4, //!< Item can be checked
    +  ItemIsDragEnabled = 0x8,   //!< Item can be dragged
    +  ItemIsDropEnabled = 0x10,  //!< Item can be a drop target
    +  /*! Item has tree states. When set, Wt::CheckStateRole data is of type
    +   * Wt::CheckState
    +   */
    +  ItemIsTristate = 0x20,
    +  ItemIsXHTMLText = 0x40,    //!< Item's textual is HTML
    +  ItemIsDirty = 0x80         //!< Item's value has been modified
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(ItemFlag)
    +
    +/*! \brief Enumeration that indicates a sort order.
    + *
    + * \ingroup modelview
    + */
    +enum SortOrder {
    +  AscendingOrder,  //!< Ascending sort order
    +  DescendingOrder  //!< Descending sort order
    +};
    +
    +/*! \brief Enumeration that indicates a drop action.
    + *
    + * \sa WAbstractItemModel::dropEvent()
    + *
    + * \ingroup modelview
    + */
    +enum DropAction {
    +  CopyAction = 0x1, //!< Copy the selection
    +  MoveAction = 0x2  //!< Move the selection (deleting originals)
    +};
    +
    +/*! \class WModelIndex Wt/WModelIndex Wt/WModelIndex
    + *  \brief An index to an item in a item data model.
    + *
    + * Indexes are used to indicate a particular item in a
    + * WAbstractItemModel. An index points to the item by identifying its
    + * row and column location within a parent model index.
    + *
    + * An index is immutable.
    + *
    + * The default constructor creates an <i>invalid index</i>, which by
    + * convention indicates the parent of top level indexes. Thus, a model
    + * that specifies only a list or table of data (but no hierarchical
    + * data) would have as valid indexes only indexes that specify the
    + * <i>invalid</i> model index as parent.
    + *
    + * Upon the model's choice, model indexes for hierarchical models may
    + * have an internal Id represented by a int64_t (internalId()), a
    + * pointer (internalPointer()).
    + *
    + * Indexes are created by the model, within the protected
    + * WAbstractItemModel::createIndex() methods. In this way, models can
    + * define an internal pointer or id suitable for identifying parent
    + * items in the model.
    + *
    + * When a model's geometry changes due to row or column insertions or
    + * removals, you may need to update your indexes, as otherwise they
    + * may no longer point to the same item (but instead still to the same
    + * row/column). Thus, if you store indexes and want to support model
    + * changes such as row or columns insertions/removals, then you need
    + * to react to the corresponding signals such as
    + * WAbstractItemModel::rowsInserted() to update these indexes
    + * (i.e. shift them), or even remove them when the corresponding
    + * row/column has been removed.
    + *
    + * When a model's layout changes (it is rearranging its contents for
    + * example in response to a sort operation), a similar problem
    + * arises. Some models support tracking of indexes over layout
    + * changes, using <i>raw</i> indexes. In reaction to
    + * WAbstractItemModel::layoutAboutToBeChanged(), you should encode any
    + * index which you wish to recover after the layout change using
    + * encodeAsRawIndex(), and in WAbstractItemModel::layoutChanged() you
    + * can obtain an index that points to the same item using
    + * decodeFromRawIndex().
    + *
    + * \sa WAbstractItemModel
    + *
    + * \ingroup modelview
    + */
    +class WT_API WModelIndex
    +{
    +public:
    +  /*! \brief Create an invalid WModelIndex.
    +   *
    +   * Returns a model index for which isValid() return \c false.
    +   */
    +  WModelIndex();
    +
    +  /*! \brief Returns the column for this model index.
    +   *
    +   * \sa row()
    +   */
    +  int column() const { return column_; }
    +
    +  /*! \brief Returns the row for this model index.
    +   *
    +   * \sa column()
    +   */
    +  int row() const { return row_; }
    +
    +  /*! \brief Returns the internal pointer.
    +   *
    +   * The internal pointer is used by the model to retrieve the corresponding
    +   * data.
    +   *
    +   * This is only defined when the model created the index using
    +   * WAbstractItemModel::createIndex(int, int, void *) const.
    +   *
    +   * \sa internalId(),
    +   * \sa WAbstractItemModel::createIndex(int, int, void *) const
    +   */
    +  void *internalPointer() const { return reinterpret_cast<void*>(internalId_); }
    +
    +  /*! \brief Returns the internal id.
    +   *
    +   * The internal id is used by the model to retrieve the
    +   * corresponding data.
    +   *
    +   * This is only defined when the model created the index using
    +   * WAbstractItemModel::createIndex(int, int, uint64_t) const.
    +   *
    +   * \sa internalPointer()
    +   * \sa WAbstractItemModel::createIndex(int, int, uint64_t) const
    +   */
    +  ::uint64_t internalId() const { return internalId_; }
    +
    +  /*! \brief Returns a model index for a child item.
    +   *
    +   * This is a convenience method, and is only defined for indexes
    +   * that are valid().
    +   *
    +   * It has the same function as WAbstractItemModel::index() but is
    +   * less general because the latter expression may also be used to
    +   * retrieve top level children, i.e. when \p index is invalid.
    +   *
    +   * \sa WAbstractItemModel::index(), isValid()
    +   */
    +  WModelIndex child(int row, int column) const;
    +
    +  /*! \brief Returns an index to the parent.
    +   *
    +   * This is a convenience method for WAbstractItemModel::parent().
    +   *
    +   * For a top level data item, the parent() is an invalid index (see
    +   * WModelIndex()).
    +   *
    +   * \sa WAbstractItemModel::parent()
    +   */
    +  WModelIndex parent() const;
    +
    +  /*! \brief Returns data in the model at this index.
    +   *
    +   * This is a convenience method for WAbstractItemModel::data().
    +   *
    +   * \sa WAbstractItemModel::data()
    +   * \sa ItemDataRole
    +   */
    +  boost::any data(int role = DisplayRole) const;
    +
    +  /*! \brief Returns the flags for this item.
    +   *
    +   * This is a convenience method for WAbstractItemModel::flags().
    +   *
    +   * \sa WAbstractItemModel::flags()
    +   * \sa ItemFlag
    +   */
    +  WFlags<ItemFlag> flags() const;
    +
    +  /*! \brief Returns whether the index is a real valid index.
    +   *
    +   * Returns \c true when the index points to a valid data item,
    +   * i.e. at a valid row() and column().
    +   *
    +   * An index may be invalid for two reasons:
    +   *  - an operation requested an index that was out of model bounds,
    +   *  - or, the index corresponds to the model's top level root item, and is
    +   *    thus the parent index for top level items.
    +   */
    +  bool isValid() const { return model_ != 0; }
    +
    +  /*! \brief Returns the model to which this (valid) index is bound.
    +   *
    +   * This returns the model that created the model index.
    +   */
    +  const WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true only if the indexes point at the same data, in the
    +   * same model.
    +   */
    +  bool operator== (const WModelIndex& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * \sa operator==()
    +   */
    +  bool operator!= (const WModelIndex& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the index comes topologically before \p other.
    +   *
    +   * Topological order follows the order in which the indexes would be
    +   * displayed in a tree table view, from top to bottom followed by
    +   * left to right.
    +   */
    +  bool operator< (const WModelIndex& other) const;
    +
    +  /*! \brief Encode to raw index (before a layout change).
    +   *
    +   * Use this method to encode an index for which you want to recover
    +   * an index after the layout change to the same item (which may
    +   * still be in the model, but at a different location).
    +   *
    +   * An index that has been encoded as a raw index cannot be used for
    +   * anything but decodeFromRawIndex() at a later point.
    +   *
    +   * \sa WAbstractItemModel::toRawIndex(), WAbstractItemModel::layoutAboutToBeChanged()
    +   * \sa decodeFromRawIndex()
    +   */
    +  void encodeAsRawIndex();
    +
    +  /*! \brief Decodes a raw index (after a layout change).
    +   *
    +   * A raw index can be decoded, within the context of a model that has been
    +   * re-layed out.
    +   *
    +   * This method returns a new index that points to the same item, or,
    +   * WModelIndex() if the underlying model did not support encoding to
    +   * raw indexes, or, if the item to which the index previously
    +   * pointed, is no longer part of the model.
    +   *
    +   * \sa WAbstractItemModel::fromRawIndex(), WAbstractItemModel::layoutChanged()
    +   * \sa encodeAsRawIndex()
    +   */
    +  WModelIndex decodeFromRawIndex() const;
    +
    +  /*! \brief Utility method for converting an entire set of indexes to raw.
    +   *
    +   * \sa encodeAsRawIndex()
    +   */
    +  static void encodeAsRawIndexes(WModelIndexSet& indexes);
    +
    +  /*! \brief Utility method to decode an entire set of raw indexes.
    +   *
    +   * \sa decodeFromRawIndex()
    +   */
    +  static
    +    WModelIndexSet decodeFromRawIndexes(const WModelIndexSet& encodedIndexes);
    +
    +  struct UnorderedLess {
    +    bool operator()(const WModelIndex& i1, const WModelIndex& i2) const;
    +  };
    +
    +  /*! \brief Returns whether i2 is an ancestor of i1
    +   */
    +  static bool isAncestor(const Wt::WModelIndex& i1, const Wt::WModelIndex& i2);
    +
    +private:
    +  const WAbstractItemModel *model_;
    +  int row_, column_;
    +  ::uint64_t internalId_;
    +
    +  WModelIndex(int row, int column, const WAbstractItemModel *model, void *ptr);
    +  WModelIndex(int row, int column, const WAbstractItemModel *model,
    +	      ::uint64_t id);
    +
    +  friend class WAbstractItemModel;
    +
    +  WModelIndex ancestor(int depth) const;
    +  int depth() const;
    +
    +  bool isRawIndex() const;
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +typedef std::set<WModelIndex> WModelIndexSet;
    +
    +extern std::size_t hash_value(const Wt::WModelIndex& index);
    +#else
    +typedef std::treeset<WModelIndex> WModelIndexSet;
    +#endif
    +
    +typedef std::vector<WModelIndex> WModelIndexList;
    +
    +}
    +
    +/*! @} */
    +
    +#endif // WMODEL_INDEX_H_
    diff --git a/wt-3.1.7a/src/Wt/WModelIndex.C b/wt-3.1.7a/src/Wt/WModelIndex.C
    new file mode 100644
    index 0000000..f049a29
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WModelIndex.C
    @@ -0,0 +1,232 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +#include <cstring>
    +#include <boost/functional/hash.hpp>
    +
    +#include "Wt/WModelIndex"
    +#include "Wt/WAbstractItemModel"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WModelIndex::WModelIndex()
    +  : model_(0),
    +    row_(0),
    +    column_(0),
    +    internalId_(0)
    +{ }
    +
    +boost::any WModelIndex::data(int role) const
    +{
    +  return model_->data(*this, role);
    +}
    +
    +WFlags<ItemFlag> WModelIndex::flags() const
    +{
    +  return model_->flags(*this);
    +}
    +
    +WModelIndex WModelIndex::child(int row, int column) const
    +{
    +  return model_ ? model_->index(row, column, *this) : WModelIndex();
    +}
    +
    +WModelIndex WModelIndex::parent() const
    +{
    +  return model_ ? model_->parent(*this) : WModelIndex();
    +}
    +
    +WModelIndex WModelIndex::ancestor(int depth) const
    +{
    +  if (depth == 0)
    +    return *this;
    +  else
    +    return parent().ancestor(depth - 1);
    +}
    +
    +int WModelIndex::depth() const
    +{
    +  if (isValid())
    +    return parent().depth() + 1;
    +  else
    +    return 0;
    +}
    +
    +bool WModelIndex::operator== (const WModelIndex& other) const
    +{
    +  return model_ == other.model_ &&
    +    row_ == other.row_ &&
    +    column_ == other.column_ &&
    +    internalId_ == other.internalId_;
    +}
    +
    +bool WModelIndex::operator!= (const WModelIndex& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +bool WModelIndex::operator< (const WModelIndex& i2) const
    +{
    +  const WModelIndex& i1 = *this;
    +
    +  if (!i1.isValid())
    +    return i2.isValid();
    +  else if (!i2.isValid())
    +    return false;
    +  else if (i1 == i2)
    +    return false;
    +  else if (i1.model() != i2.model()) {
    +    std::cerr << "Comparing indexes from different models are you?"
    +	      << std::endl;
    +    return false;
    +  }
    +
    +  int i1Depth = i1.depth();
    +  int i2Depth = i2.depth();
    +  unsigned e = std::min(i1Depth, i2Depth);
    +
    +  WModelIndex a1 = i1.ancestor(i1Depth - e);
    +  WModelIndex a2 = i2.ancestor(i2Depth - e);
    +
    +  if (a1 == a2)
    +    return i1Depth < i2Depth;
    +
    +  for (unsigned i = e; i > 0; --i) {
    +    WModelIndex p1 = a1.parent();
    +    WModelIndex p2 = a2.parent();
    +
    +    if (p1 == p2) {
    +      if (a1.row() < a2.row())
    +	return true;
    +      else if (a1.row() > a2.row())
    +	return false;
    +      else if (a1.column() < a2.column())
    +	return true;
    +      else
    +	return false;
    +    }
    +
    +    a1 = p1;
    +    a2 = p2;
    +  }
    +
    +  return false; // unreachable code
    +}
    +
    +bool WModelIndex::UnorderedLess::operator() (const WModelIndex& i1,
    +					     const WModelIndex& i2) const
    +{
    +  if (!i1.isValid())
    +    return i2.isValid();
    +  else if (!i2.isValid())
    +    return false;
    +  else if (i1 == i2)
    +    return false;
    +  else if (i1.model() != i2.model()) {
    +    std::cerr << "Comparing indexes from different models are you?"
    +	      << std::endl;
    +    return false;
    +  } else if (i1.row() < i2.row())
    +    return true;
    +  else if (i1.row() > i2.row())
    +    return false;
    +  else if (i1.column() < i2.column())
    +    return true;
    +  else if (i1.column() > i2.column())
    +    return false;
    +  else
    +    return i1.internalId_ < i2.internalId_;
    +}
    +
    +WModelIndex::WModelIndex(int row, int column, const WAbstractItemModel *model,
    +			 void *ptr)
    +  : model_(model),
    +    row_(row),
    +    column_(column),
    +    internalId_(reinterpret_cast< ::uint64_t >(ptr))
    +{ }
    +
    +WModelIndex::WModelIndex(int row, int column, const WAbstractItemModel *model,
    +			 ::uint64_t id)
    +  : model_(model),
    +    row_(row),
    +    column_(column),
    +    internalId_(id)
    +{ }
    +
    +std::size_t hash_value(const Wt::WModelIndex& index) {
    +  boost::hash<int> intHasher;
    +  boost::hash< ::uint64_t > longHasher;
    +
    +  return intHasher(index.row()) + intHasher(index.column())
    +    + longHasher(index.internalId());
    +}
    +
    +void WModelIndex::encodeAsRawIndex()
    +{
    +  if (model_) {
    +    if (isRawIndex())
    +      throw WtException("WModelIndex::encodeAsRawIndex(): "
    +			"cannot encode a raw index to raw again");
    +
    +    internalId_ = reinterpret_cast< ::uint64_t >(model_->toRawIndex(*this));
    +    row_ = column_ = -42;
    +  }
    +}
    +
    +WModelIndex WModelIndex::decodeFromRawIndex() const
    +{
    +  if (model_) {
    +    if (!isRawIndex())
    +      throw WtException("WModelIndex::decodeFromRawIndex(): "
    +			"can only decode an encoded raw index");
    +
    +    return model_->fromRawIndex(internalPointer());
    +  } else
    +    return *this;
    +}
    +
    +bool WModelIndex::isRawIndex() const
    +{
    +  return row_ == -42 && column_ == -42;
    +}
    +
    +void WModelIndex::encodeAsRawIndexes(WModelIndexSet& indexes)
    +{
    +  for (WModelIndexSet::iterator i = indexes.begin(); i != indexes.end(); ++i)
    +    (const_cast<WModelIndex &>(*i)).encodeAsRawIndex();
    +}
    +
    +WModelIndexSet
    +WModelIndex::decodeFromRawIndexes(const WModelIndexSet& encodedIndexes)
    +{
    +  WModelIndexSet result;
    +
    +  for (WModelIndexSet::const_iterator i = encodedIndexes.begin();
    +       i != encodedIndexes.end(); ++i) {
    +    WModelIndex n = i->decodeFromRawIndex();
    +    if (n.isValid())
    +      result.insert(n);
    +  }
    +
    +  return result;
    +}
    +
    +bool WModelIndex::isAncestor(const Wt::WModelIndex& i1,
    +			     const Wt::WModelIndex& i2) {
    +  if (!i1.isValid())
    +    return false;
    +
    +  for (Wt::WModelIndex p = i1.parent(); p.isValid(); p = p.parent()) {
    +    if (p == i2)
    +      return true;
    +  }
    +
    +  return !i2.isValid();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WObject b/wt-3.1.7a/src/Wt/WObject
    new file mode 100644
    index 0000000..1b7c242
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WObject
    @@ -0,0 +1,410 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WOBJECT_H_
    +#define WOBJECT_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WGlobal>
    +#include <Wt/Http/Request>
    +
    +#include <boost/signals/trackable.hpp>
    +#include <vector>
    +#include <map>
    +
    +namespace Wt {
    +
    +class JavaScriptEvent;
    +
    +struct WT_API NoClass
    +{
    +  NoClass() { }
    +  NoClass(const JavaScriptEvent&) { }
    +
    +  static NoClass none;
    +};
    +
    +#ifndef WT_CNOR
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +  class Signal;
    +#endif // WT_CNOR
    +
    +class WStatelessSlot;
    +
    +/*! \class WObject Wt/WObject Wt/WObject
    + *  \brief A base class for objects that participate in the signal/slot system.
    + *
    + * The main feature offered by %WObject is automated object life-time
    + * tracking when involved in signal/slot connections. Connections
    + * between signals and slots of %WObject instances implement a
    + * type-safe event callback system. For example, one can simply
    + * connect() the WInteractWidget::clicked() signal of a WPushButton to
    + * the WApplication::quit() method, to exit the application when the
    + * button is clicked:
    + *
    + * \code
    + * Wt::WInteractWidget *sender = new Wt::WText("Quit.");
    + * Wt::WApplication *app = Wt::WApplication::instance();
    + * sender->clicked().connect(app, &Wt::WApplication::quit);
    + * \endcode
    + *
    + * %Wt's signals may also propagate arguments to slots. For example,
    + * the same clicked() signal provides event details in
    + * a WMouseEvent details class, and these details may be received in
    + * the slot:
    + * \code
    + * class MyClass : public Wt::WContainerWidget
    + * {
    + * public:
    + *   MyClass(Wt::WContainerWidget *parent = 0)
    + *     : Wt::WContainerWidget(parent)
    + *   {
    + *     Wt::WText *text = Wt::WText("Click here", this);
    + *     text->clicked().connect(this, &MyClass::handleClick);
    + *
    + *     ...
    + *   }
    + *
    + * private:
    + *   void handleClick(const Wt::WMouseEvent& event) {
    + *     if (event.modifiers() & Wt::ShiftModifier) {
    + *       ...
    + *     }
    + *   }
    + * };
    + * \endcode
    + * As the example illustrates, slots are ordinary %WObject methods.
    + *
    + * A second feature of %WObject is that they allow ownership
    + * organization in ownership object trees. When an object is created
    + * with another object as parent, it's ownership is transferred to the
    + * parent. If not deleted explicitly, the child object will be deleted
    + * together with the parent. Child objects may also be deleted
    + * manually: they will remove themselves from their parent in the
    + * process.
    + *
    + * In conjunction with EventSignal, %WObject also facilitates learning
    + * of client-side event handling (in JavaScript) through invocation of
    + * the slot method. This is only possible when the slot behaviour is
    + * stateless, i.e. independent of any application state, and can be
    + * specified using the implementStateless() methods.
    + *
    + * \sa Signal, EventSignal
    + *
    + * \ingroup signalslot
    + */
    +class WT_API WObject : public boost::signals::trackable
    +{
    +public:
    +  /*! \brief Typedef for a %WObject method without arguments.
    +   */
    +  typedef void (WObject::*Method)();
    +
    +  /*! \brief Create a %WObject with a given parent object.
    +   * 
    +   * If the optional parent is specified, the parent object will
    +   * destroy all child objects. Set parent to \c 0 to create an object
    +   * with no parent.
    +   *
    +   * \sa addChild()
    +   */
    +  WObject(WObject* parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * This automatically:
    +   * - deletes all child objects
    +   * - invalidates this object as sender or receiver in signals and slots
    +   */
    +  virtual ~WObject();  
    +
    +  /*
    +   * Unique id's
    +   */
    +  unsigned rawUniqueId() const { return id_; }
    +  const std::string uniqueId() const;
    +
    +  /*! \brief Returns the (unique) identifier for this object
    +   *
    +   * For a %WWidget, this corresponds to the id of the DOM element
    +   * that represents the widget. This is not entirely unique, since a
    +   * \link WCompositeWidget composite widget\endlink shares the same
    +   * id as its implementation.
    +   *
    +   * By default, the id is auto-generated, unless a custom id is set
    +   * for a widget using WWidget::setId(). The auto-generated id is created
    +   * by concatenating objectName() with a unique number.
    +   *
    +   * \sa WWidget::jsRef()
    +   */
    +  virtual const std::string id() const;
    +
    +  /*! \brief Sets an object name.
    +   *
    +   * The object name can be used to easily identify a type of object
    +   * in the DOM, and does not need to be unique. It will usually
    +   * reflect the widget type or role. The object name is prepended to
    +   * the auto-generated object id().
    +   *
    +   * The default object name is empty.
    +   *
    +   * \sa id()
    +   */
    +  void setObjectName(const std::string& name);
    +
    +  /*! \brief Returns the object name.
    +   *
    +   * \sa setObjectName()
    +   */
    +  virtual std::string objectName() const;
    +
    +  /*! \brief Resets learned stateless slot implementations.
    +   *
    +   * Clears the stateless implementation for all slots declared to be
    +   * implemented with a stateless implementation.
    +   *
    +   * \sa resetLearnedSlot(), implementStateless() 
    +   */
    +  void resetLearnedSlots();
    +
    +  /*! \brief Resets a learned stateless slot implementation.
    +   *
    +   * Clears the stateless implementation for the given slot that
    +   * was declared to be implemented with a stateless implementation.
    +   *
    +   * When something has changed that breaks the contract of a
    +   * stateless slot to always have the same effect, you may call this
    +   * method to force the application to discard the current
    +   * implementation.
    +   *
    +   * \sa implementStateless()
    +   */
    +  template <class T>
    +    void resetLearnedSlot(void (T::*method)());
    +   
    +  /*! \brief Declares a slot to be stateless and learn client-side behaviour
    +   *         on first invocation.
    +   *
    +   * Indicate that the given slot is stateless, and meets the requirement
    +   * that the slot's code does not depend on any state of the object, but
    +   * performs the same visual effect regardless of any state, or at
    +   * least until resetLearnedSlot() is called.
    +   *
    +   * When this slot is connected to an EventSignal (such as those exposed
    +   * by WInteractWidget and WFormWidget), the %Wt library may decide to
    +   * cache the visual effect of this slot in JavaScript code at client-side:
    +   * this effect will be learned automatically at the first invocation.
    +   * This has no consequences for the normal event handling, since the slot
    +   * implementation is still executed in response to any event notification.
    +   * Therefore, it is merely an optimization of the latency for the visual
    +   * effect, but it does not change the behaviour of the application.
    +   *
    +   * When for some reason the visual effect does change, one may use
    +   * resetLearnedSlot() or resetLearnedSlots() to flush the existing cached
    +   * visual effect, forcing the library to relearn it.
    +   *
    +   * It is crucial that this function be applied first to a slot that is 
    +   * intended to be stateless before any %EventSignal connects to that slot.
    +   * Otherwise, the connecting %EventSignal cannot find the stateless
    +   * slot implementation for the intended slot, and the statement will have
    +   * no effect for that connection.
    +   *
    +   * \sa resetLearnedSlot(), EventSignal
    +   */
    +#ifndef WT_TARGET_JAVA
    +  template <class T>
    +    WStatelessSlot *implementStateless(void (T::*method)());
    +#else // WT_TARGET_JAVA
    +  template <class T1>
    +    WStatelessSlot *implementStateless(T1 method);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Declares a slot to be stateless and learn client-side behaviour
    +   *         in advance.
    +   *
    +   * This method has the same effect as
    +   *\link implementStateless() implementStateless(void (T::*method)())\endlink,
    +   * but learns the visual effect of the slot before the first
    +   * invocation of the event.
    +   *
    +   * To learn the visual effect, the library will simulate the event and
    +   * record the visual effect. To restore the application state, it will
    +   * call the undoMethod which must restore the effect of method. 
    +   *
    +   * \sa \link implementStateless() implementStateless(void (T::*method)())\endlink
    +   */
    +#ifndef WT_TARGET_JAVA
    +  template <class T>
    +    WStatelessSlot *implementStateless(void (T::*method)(),
    +				       void (T::*undoMethod)());
    +#else // WT_TARGET_JAVA
    +  template <class T1, class T2>
    +    WStatelessSlot *implementStateless(T1 method, T2 undoMethod);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Provides a JavaScript implementation for a method
    +   *
    +   * This method sets the JavaScript implementation for a method. As a
    +   * result, if JavaScript is available, the JavaScript version will
    +   * be used on the client side and the visual effect of the C++
    +   * implementation will be ignored.
    +   *
    +   * This is very similar to an auto-learned stateless slot, but here the
    +   * learning is avoided by directly setting the JavaScript implementation.
    +   *
    +   * The \p jsCode should be one or more valid JavaScript statements.
    +   *
    +   * \sa \link implementStateless() implementStateless(void (T::*method)())\endlink
    +   */
    +  template <class T>
    +    WStatelessSlot *implementJavaScript(void (T::*method)(),
    +					const std::string& jsCode);
    +
    +  /*! \brief Adds a child object.
    +   *
    +   * Take responsibility of deleting the child object, together with this
    +   * object.
    +   *
    +   * \sa removeChild()
    +   */
    +  void addChild(WObject *child);
    +
    +  /*! \brief Removes a child object.
    +   *
    +   * The child must have been previously added.
    +   *
    +   * \sa addChild()
    +   */
    +  void removeChild(WObject *child);
    +
    +  /*! \brief Returns the children.
    +   */
    +  const std::vector<WObject *>& children() const;
    + 
    +  /*! \brief Returns the parent object.
    +   */
    +  WObject *parent() const { return parent_; }
    +
    +#ifndef WT_CNOR
    +  Signal<WObject *, NoClass, NoClass, NoClass, NoClass, NoClass>& destroyed();
    +#endif // WT_CNOR
    +
    +  virtual bool hasParent() const;
    +
    +protected:
    +  virtual void signalConnectionsChanged();
    +
    +  /*! \brief Returns the sender of the current slot call.
    +   *
    +   * Use this function to know who emitted the signal that triggered this
    +   * slot call. It may be \c 0 if the signal has no owner information, or
    +   * if there is no signal triggering the current slot, but instead the slot
    +   * method is called directly.
    +   */
    +  static WObject *sender();
    +
    +  virtual void setParent(WObject *parent);
    +
    +  struct FormData {
    +    FormData(const Http::ParameterValues& aValues,
    +	     const std::vector<Http::UploadedFile>& aFiles)
    +      : values(aValues), files(aFiles) { }
    +
    +    const Http::ParameterValues& values;
    +    std::vector<Http::UploadedFile> files;
    +  };
    +
    +  virtual void setFormData(const FormData& formData);
    +  virtual void setRequestTooLarge(int size);
    +
    +  /*! \brief On-demand stateless slot implementation.
    +   *
    +   * This method returns a stateless slot implementation for the given
    +   * \p method. To avoid the cost of declaring methods to be
    +   * stateless when they are not used, you may reimplement this method
    +   * to provide a stateless implementation for a method only when the
    +   * method is involved in a slot connection.
    +   *
    +   * Use implementStateless() to provide a stateless implementation of the
    +   * given \p method, or return the base class implementation otherwise.
    +   */
    +  virtual WStatelessSlot *getStateless(Method method);
    +
    +private:
    +  WStatelessSlot *implementPrelearn(Method method, Method undoMethod);
    +  WStatelessSlot *implementPrelearned(Method method, const std::string& jsCode);
    +  WStatelessSlot *implementAutolearn(Method method);
    +  void resetLearnedSlot(Method method);
    +
    +  WStatelessSlot* isStateless(Method method);
    +  std::vector<WStatelessSlot *> statelessSlots_;
    +
    +  WObject(const WObject&);
    +  unsigned    id_;
    +  std::string name_;
    +
    +  static unsigned nextObjId_;
    +
    +  std::vector<WObject *> *children_;
    +  WObject                *parent_;
    +
    +#ifndef WT_CNOR
    +  Signal<WObject *, NoClass, NoClass, NoClass, NoClass, NoClass> *destroyed_;
    +#endif // WT_CNOR
    +
    +  static std::vector<WObject *> emptyObjectList_;
    +
    +#ifndef WT_CNOR
    +  template <typename E> friend class EventSignal;
    +  template <typename A1, typename A2, typename A3,
    +            typename A4, typename A5, typename A6> friend class JSignal;
    +#endif // WT_CNOR
    +
    +  friend class EventSignalBase;
    +  friend class WebSession;
    +};
    +
    +template <class T>
    +void WObject::resetLearnedSlot(void (T::*method)())
    +{
    +  assert(dynamic_cast<T *>(this));
    +  resetLearnedSlot(static_cast<Method>(method));
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +template <class T>
    +WStatelessSlot *WObject::implementStateless(void (T::*method)())
    +{
    +  assert(dynamic_cast<T *>(this));
    +  return implementAutolearn(static_cast<Method>(method));
    +}
    +
    +template <class T>
    +WStatelessSlot *WObject::implementStateless(void (T::*method)(),
    +					    void (T::*undoMethod)())
    +{
    +  assert(dynamic_cast<T *>(this));
    +  return implementPrelearn(static_cast<Method>(method),
    +			   static_cast<Method>(undoMethod));
    +}
    +#endif // WT_TARGET_JAVA
    +
    +template <class T>
    +WStatelessSlot *WObject::implementJavaScript(void (T::*method)(),
    +					     const std::string& jsCode)
    +{
    +  assert(dynamic_cast<T *>(this));
    +  return implementPrelearned(static_cast<Method>(method), jsCode);
    +}
    +
    +}
    +
    +#ifdef USING_NAMESPACE_WT
    +using namespace Wt;
    +#endif // USING_NAMESPACE_WT
    +
    +#endif // WOBJECT_H_
    diff --git a/wt-3.1.7a/src/Wt/WObject.C b/wt-3.1.7a/src/Wt/WObject.C
    new file mode 100644
    index 0000000..f703e3e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WObject.C
    @@ -0,0 +1,221 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WObject"
    +#include "Wt/WStatelessSlot"
    +#include "Wt/WSignal"
    +#include "Utils.h"
    +
    +#include "WtException.h"
    +
    +#include <stdio.h>
    +
    +namespace Wt {
    +
    +unsigned WObject::nextObjId_ = 0;
    +std::vector<WObject *> WObject::emptyObjectList_;
    +
    +WObject::WObject(WObject* parent)
    +  : statelessSlots_(0),
    +    id_(nextObjId_++),
    +    children_(0),
    +    parent_(parent)
    +#ifndef WT_CNOR
    +    , destroyed_(0)
    +#endif
    +{
    +  if (parent) {
    +    if (!parent->children_)
    +      parent->children_ = new std::vector<WObject *>;
    +    parent->children_->push_back(this);
    +  }
    +}
    +
    +void WObject::setParent(WObject *parent)
    +{
    +  parent_ = parent;
    +}
    +
    +bool WObject::hasParent() const
    +{
    +  return parent_;
    +}
    +
    +void WObject::addChild(WObject *child)
    +{
    +  if (child->parent_)
    +    child->parent_->removeChild(child);
    +
    +  if (!children_)
    +    children_ = new std::vector<WObject *>;
    +
    +  child->setParent(this);
    +  children_->push_back(child);
    +}
    +
    +void WObject::removeChild(WObject *child)
    +{
    +  if (child->parent_ != this)
    +    throw WtException("WObject::removeChild() called with non-child");
    +
    +  assert(children_);
    +  Utils::erase(*children_, child);
    +  child->setParent(0);
    +}
    +
    +WObject::~WObject()
    +{
    +#ifndef WT_CNOR
    +  if (destroyed_)
    +    destroyed_->emit(this);
    +#endif
    +
    +  for (unsigned i = 0; i < statelessSlots_.size(); ++i)
    +    delete statelessSlots_[i];
    +
    +  if (parent_)
    +    Utils::erase(*parent_->children_, this);
    +
    +  if (children_) {
    +    for (unsigned i = 0; i < children_->size(); ++i) {
    +      (*children_)[i]->parent_ = 0;
    +      delete (*children_)[i];
    +    }
    +    delete children_;
    +  }
    +}
    +
    +const std::vector<WObject *>& WObject::children() const
    +{
    +  return children_ ? *children_ : emptyObjectList_;
    +}
    +
    +#ifndef WT_CNOR
    +Signal<WObject *>& WObject::destroyed()
    +{
    +  if (!destroyed_)
    +    destroyed_ = new Signal<WObject *>(this);
    +
    +  return *destroyed_;
    +}
    +#endif
    +
    +void WObject::setObjectName(const std::string& name)
    +{
    +  // We could optimize this so that id() does not have to
    +  // concatenate on the fly by appending internally already the
    +  // uniqueId()
    +  name_ = name;
    +}
    +
    +std::string WObject::objectName() const
    +{
    +  return name_;
    +}
    +
    +const std::string WObject::uniqueId() const
    +{
    +  char buf[20];
    +  buf[0] = 'o';
    +  Utils::itoa(id_, buf + 1, 16);
    +  return std::string(buf);
    +}
    +
    +const std::string WObject::id() const
    +{
    +  std::string result = objectName();
    +
    +  if (!result.empty())
    +    return result + '_' + uniqueId();
    +  else
    +    return uniqueId();
    +}
    +
    +void WObject::setFormData(const FormData& formData)
    +{ }
    +
    +void WObject::setRequestTooLarge(int size)
    +{ }
    +
    +void WObject::signalConnectionsChanged()
    +{ }
    +
    +void WObject::resetLearnedSlots()
    +{
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++)
    +    statelessSlots_[i]->setNotLearned();
    +}
    +
    +void WObject::resetLearnedSlot(Method method)
    +{
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++) {
    +    if (statelessSlots_[i]->implementsMethod(method)) {
    +      statelessSlots_[i]->setNotLearned();
    +      return;
    +    }
    +  }
    +}
    +
    +WStatelessSlot *WObject::getStateless(Method method)
    +{
    +  return 0;
    +}
    +
    +WStatelessSlot* WObject::isStateless(Method method)
    +{
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++) {
    +    if (statelessSlots_[i]->implementsMethod(method))
    +      return statelessSlots_[i];
    +  }
    +
    +  return getStateless(method);
    +}
    +
    +WStatelessSlot *WObject::implementAutolearn(Method method)
    +{
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++)
    +    if (statelessSlots_[i]->implementsMethod(method)) {
    +      statelessSlots_[i]->setNotLearned();
    +      return statelessSlots_[i];
    +    }
    +
    +  WStatelessSlot *result = new WStatelessSlot(this, method);
    +  statelessSlots_.push_back(result);
    +  return result;
    +}
    +
    +WStatelessSlot *WObject::implementPrelearn(Method method, Method undoMethod)
    +{        
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++)
    +    if (statelessSlots_[i]->implementsMethod(method)) {
    +      statelessSlots_[i]->reimplementPreLearn(undoMethod);
    +      return statelessSlots_[i];
    +    }
    +
    +  WStatelessSlot *result = new WStatelessSlot(this, method, undoMethod);
    +  statelessSlots_.push_back(result);
    +  return result;
    +}
    +
    +WStatelessSlot *WObject::implementPrelearned(Method method,
    +					     const std::string& jsCode)
    +{        
    +  for (unsigned i = 0; i < statelessSlots_.size(); i++)
    +    if (statelessSlots_[i]->implementsMethod(method)) {
    +      statelessSlots_[i]->reimplementJavaScript(jsCode);
    +      return statelessSlots_[i];
    +    }
    +
    +  WStatelessSlot *result = new WStatelessSlot(this, method, jsCode);
    +  statelessSlots_.push_back(result);
    +  return result;
    +}
    +
    +WObject *WObject::sender()
    +{
    +  return SignalBase::currentSender();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator b/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator
    new file mode 100644
    index 0000000..1396364
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator
    @@ -0,0 +1,107 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WOVERLAY_LOADING_INDICATOR_H_
    +#define WOVERLAY_LOADING_INDICATOR_H_
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WLoadingIndicator>
    +
    +namespace Wt {
    +
    +class WText;
    +
    +/*! \class WOverlayLoadingIndicator Wt/WOverlayLoadingIndicator Wt/WOverlayLoadingIndicator
    + *  \brief A more obvious loading indicator that grays the window.
    + *
    + * This loading indicator uses a gray semi-transparent overlay to
    + * darken the window contents, and centers a loading icon (with some
    + * text).
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WApplication *app = Wt::WApplication::instance();
    + * app->setLoadingIndicator(new Wt::WOverlayLoadingIndicator());
    + * \endcode
    + * \endif
    + *
    + * \image html WOverlayLoadingIndicator.png "The overlay loading indicator" 
    + *
    + * \note For this loading indicator to render properly in IE, you need to
    + *       reset the "body" margin to 0. Using the inline stylesheet, this could
    + *       be done using:
    + * \if cpp
    + * \code
    + *   WApplication::instance()->styleSheet().addRule("body", "margin: 0px");
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WOverlayLoadingIndicator.Loading: Loading...
    + *
    + * \sa WApplication::setLoadingIndicator()
    + */
    +class WT_API WOverlayLoadingIndicator : public WContainerWidget,
    +				 public WLoadingIndicator
    +{
    +public:
    +  /*! \brief Construct the loading indicator.
    +   *  \param styleClass the style class for the central box
    +   *  \param backgroundStyleClass the style class for the "background" part
    +   *         of the indicator
    +   *  \param textStyleClass the style class for the text that is displayed
    +   *
    +   *  \note if styleClass is not set, the central box gets the CSS style
    +   *        elements
    +   *        \code
    +   *             background: white;
    +   *             border: 3px solid #333333;
    +   *             z-index: 10001; visibility: visible;
    +   *             position: absolute; left: 50%; top: 50%;
    +   *             margin-left: -50px; margin-top: -40px;
    +   *             width: 100px; height: 80px;
    +   *             font-family: arial,sans-serif;
    +   *             text-align: center
    +   *        \endcode
    +   *  \note if backgroundStyleClass is not set, the background gets the CSS
    +   *        style elements
    +   *        \code
    +   *             background: #DDDDDD;
    +   *             height: 100%; width: 100%;
    +   *             top: 0px; left: 0px;
    +   *             z-index: 10000;
    +   *             -moz-background-clip: -moz-initial;
    +   *             -moz-background-origin: -moz-initial;
    +   *             -moz-background-inline-policy: -moz-initial;
    +   *             opacity: 0.5; filter: alpha(opacity=50); -moz-opacity:0.5;
    +   *             position: absolute;
    +   *        \endcode
    +   */
    +  WOverlayLoadingIndicator(const WT_USTRING& styleClass = WT_USTRING(),
    +			   const WT_USTRING& backgroundStyleClass = WT_USTRING(),
    +			   const WT_USTRING& textStyleClass = WT_USTRING());
    +
    +  virtual WWidget *widget() { return this; }
    +  virtual void setMessage(const WString& text);
    +
    +private:
    +  WContainerWidget *cover_;
    +  WContainerWidget *center_;
    +  WText            *text_;
    +};
    +
    +}
    +
    +#endif // WOVERLAY_LOADING_INDICATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator.C b/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator.C
    new file mode 100644
    index 0000000..e4c78ec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WOverlayLoadingIndicator.C
    @@ -0,0 +1,72 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WText"
    +#include "Wt/WOverlayLoadingIndicator"
    +
    +namespace Wt {
    +
    +WOverlayLoadingIndicator::WOverlayLoadingIndicator(const WT_USTRING& styleClass, const WT_USTRING& backgroundStyleClass, const WT_USTRING& textStyleClass)
    +{
    +  setInline(false);
    +
    +  WApplication *app = WApplication::instance();
    +
    +  cover_ = new WContainerWidget(this);
    +  center_ = new WContainerWidget(this);
    +
    +  WImage *img = new WImage(WApplication::resourcesUrl()
    +			   + "ajax-loading.gif", center_);
    +  img->setMargin(7, Top | Bottom);
    +
    +  text_ = new WText(tr("Wt.WOverlayLoadingIndicator.Loading"), center_);
    +  text_->setInline(false);
    +  text_->setMargin(WLength::Auto, Left | Right);
    +
    +  if (!styleClass.empty())
    +    center_->setStyleClass(styleClass);
    +  if (!textStyleClass.empty())
    +    text_->setStyleClass(textStyleClass);
    +  if (!backgroundStyleClass.empty())
    +    cover_->setStyleClass(backgroundStyleClass);
    +
    +  if (app->environment().agentIsIE())
    +    app->styleSheet().addRule("body", "height: 100%; margin: 0;");
    +
    +  if (backgroundStyleClass.empty())
    +    app->styleSheet().addRule("div#" + cover_->id(), std::string() +
    +			      "background: #DDDDDD;"
    +			      "height: 100%; width: 100%;"
    +			      "top: 0px; left: 0px;"
    +			      "position: absolute;"
    +			      "z-index: 10000;" +
    +			      (app->environment().agentIsIE() ?
    +			       "filter: alpha(opacity=50);"
    +			       :
    +			       "opacity: 0.5;"
    +			       ));
    +
    +  if (styleClass.empty())
    +    app->styleSheet().addRule("div#" + center_->id(),
    +			      "background: white;"
    +			      "border: 3px solid #333333;"
    +			      "z-index: 10001; visibility: visible;"
    +			      "position: absolute; left: 50%; top: 50%;"
    +			      "margin-left: -50px; margin-top: -40px;"
    +			      "width: 100px; height: 80px;"
    +			      "font-family: arial,sans-serif;"
    +			      "text-align: center");
    +}
    +
    +void WOverlayLoadingIndicator::setMessage(const WString& text)
    +{
    +  text_->setText(text);
    +}
    +  
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPaintDevice b/wt-3.1.7a/src/Wt/WPaintDevice
    new file mode 100644
    index 0000000..d0d63da
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPaintDevice
    @@ -0,0 +1,178 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPAINTDEVICE_H_
    +#define WPAINTDEVICE_H_
    +
    +#include <Wt/WLength>
    +#include <Wt/WString>
    +#include <Wt/WGlobal>
    +
    +namespace Wt {
    +
    +class WPainter;
    +class WPainterPath;
    +class WRectF;
    +
    +/*! \class WPaintDevice Wt/WPaintDevice Wt/WPaintDevice
    + *  \brief The abstract base class for a paint device
    + *
    + * A %WPaintDevice is a device on which may be painted using a
    + * WPainter. You should never paint directly on a paint device.
    + *
    + * The device defines the size of the drawing area, using width() and
    + * height(). These dimensions must be defined in pixel units. In the
    + * future, additional information will be included to convert these pixel
    + * units to lengths (using DPI information).
    + *
    + * You should reimplement this class if you wish to extend the %Wt
    + * paint system to paint on other devices than the ones provided by
    + * the library.
    + *
    + * <i>Note: this interface is subject to changes to increase
    + * optimization possibilities for the painting using different
    + * devices.</i>
    + *
    + * \sa WPainter
    + *
    + * \ingroup painting
    + */
    +class WT_API WPaintDevice
    +{
    +public:
    +  /*! \brief Enumeration to communicate painter state changes.
    +   *
    +   * \sa setChanged(WFlags<ChangeFlag>)
    +   */
    +  enum ChangeFlag {
    +    Pen = 0x1,         //!< Properties of the pen have changed
    +    Brush = 0x2,       //!< Properties of the brush have changed
    +    Font = 0x4,        //!< Properties of the font have changed
    +    Hints = 0x8,       //!< Some render hints have changed
    +    Transform = 0x10,  //!< The transformation has changed
    +    Clipping = 0x20,   //!< The clipping has changed
    +    Shadow = 0x40      //!< Properties of the shadow have changed
    +  };
    +
    +  /*! \brief Destructor.
    +   *
    +   * Frees all resources associated with this device.
    +   */
    +  virtual ~WPaintDevice();
    +
    +  /*! \brief Returns the device width.
    +   *
    +   * The device width, in pixels, establishes the width of the device
    +   * coordinate system.
    +   */
    +  virtual WLength width() const = 0;
    +
    +  /*! \brief Returns the device height.
    +   *
    +   * The device height, in pixels, establishes the height of the device
    +   * coordinate system.
    +   */
    +  virtual WLength height() const = 0;
    +
    +  /*! \brief Indicates changes in painter state.
    +   *
    +   * The \p flags argument is the logical OR of one or more change flags.
    +   *
    +   * \sa ChangeFlag
    +   */
    +  virtual void setChanged(WFlags<ChangeFlag> flags) = 0;
    +
    +  /*! \brief Draws an arc.
    +   *
    +   * The arc is defined as in WPainter::drawArc(const WRectF&,
    +   * startAngle, spanAngle), but the angle is expressed in degrees.
    +   *
    +   * The arc must be stroked, filled, and transformed using the
    +   * current painter settings.
    +   */
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle)
    +    = 0;
    +
    +  /*! \brief Draws an image.
    +   *
    +   * Draws <i>sourceRect</i> from the image with URL \p imageUri
    +   * and original dimensions <i>imgWidth</i> and \p imgHeight to
    +   * the location, into the rectangle defined by \p rect.
    +   *
    +   * The image is transformed using the current painter settings.
    +   */
    +  virtual void drawImage(const WRectF& rect, const std::string& imageUri,
    +			 int imgWidth, int imgHeight,
    +			 const WRectF& sourceRect) = 0;
    +
    +  /*! \brief Draws a line.
    +   *
    +   * The line must be stroked and transformed using the current
    +   * painter settings.
    +   */
    +  virtual void drawLine(double x1, double y1, double x2, double y2) = 0;
    +
    +  /*! \brief Draws a path.
    +   *
    +   * The path must be stroked, filled, and transformed using the
    +   * current painter settings.
    +   */
    +  virtual void drawPath(const WPainterPath& path) = 0;
    +
    +  /*! \brief Draws text.
    +   *
    +   * The text must be rendered, stroked and transformed using the
    +   * current painter settings.
    +   */
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text) = 0;
    +
    +  /*! \brief Initializes the device for painting.
    +   *
    +   * This method is called when a WPainter starts painting.
    +   *
    +   * \sa WPainter::begin(WPaintDevice *), painter()
    +   */
    +  virtual void init() = 0;
    +
    +  /*! \brief Finishes painting on the device.
    +   *
    +   * This method is called when a WPainter stopped painting.
    +   *
    +   * \sa WPainter::end()
    +   */
    +  virtual void done() = 0;
    +
    +  /*! \brief Returns whether painting is active.
    +   *
    +   * \sa init(), painter()
    +   */
    +  virtual bool paintActive() const = 0;
    +
    +protected:
    +  /*! \brief Returns the painter that is currently painting on the device.
    +   *
    +   * \sa init()
    +   */
    +  virtual WPainter *painter() const = 0;
    +
    +  /*! \brief Sets the painter.
    +   */
    +  virtual void setPainter(WPainter *painter) = 0;
    +
    +  /*! \brief Clears the paint device.
    +   */
    +  virtual void clear() = 0;
    +
    +  friend class WPainter;
    +  friend class WPaintedWidget;
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WPaintDevice::ChangeFlag)
    +
    +}
    +
    +#endif // WPAINTER_H_
    diff --git a/wt-3.1.7a/src/Wt/WPaintDevice.C b/wt-3.1.7a/src/Wt/WPaintDevice.C
    new file mode 100644
    index 0000000..9bb2350
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPaintDevice.C
    @@ -0,0 +1,14 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WPaintDevice"
    +
    +namespace Wt {
    +
    +WPaintDevice::~WPaintDevice()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPaintedWidget b/wt-3.1.7a/src/Wt/WPaintedWidget
    new file mode 100644
    index 0000000..081cdee
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPaintedWidget
    @@ -0,0 +1,261 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPAINTED_WIDGET_H_
    +#define WPAINTED_WIDGET_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +class WAbstractArea;
    +class WImage;
    +class WPaintDevice;
    +class WWidgetPainter;
    +
    +/*! \class WPaintedWidget Wt/WPaintedWidget Wt/WPaintedWidget
    + *  \brief A widget that is painted using vector graphics.
    + *
    + * A painted widget is rendered from basic drawing
    + * primitives. Rendering is done not on the server but on the browser,
    + * using different rendering methods:
    + *
    + * <table>
    + *   <tr><td><b>Browser</b></td><td><b>Methods</b></td>
    + *       <td><b>Default method</b></td></tr>
    + *   <tr><td>Firefox 1.5+</td><td>HtmlCanvas, InlineSVG, PngImage</td>
    + *       <td>HtmlCanvas</td></tr>
    + *   <tr><td>Internet Explorer 6.0+</td><td>InlineVML, PngImage</td>
    + *       <td>InlineVML</td></tr>
    + *   <tr><td>Safari</td><td>HtmlCanvas, InlineSVG, PngImage</td>
    + *       <td>HtmlCanvas</td></tr>
    + *   <tr><td>Opera</td><td>InlineSVG, HtmlCanvas*, PngImage</td>
    + *       <td>InlineSVG</td></tr>
    + *   <tr><td>other</td><td>?</td><td>HtmlCanvas, PngImage</td></tr>
    + * </table>
    + *
    + * <i>* HtmlCanvas occasionally suffers from rendering artefacts in Opera.</i>
    + *
    + * The different rendering methods correspond to different
    + * WPaintDevice implementations, from which this widget choses a
    + * suitable one depending on the browser capabilities and configuration.
    + *
    + * If no JavaScript is available, the JavaScript-based HtmlCanvas will
    + * not be used, and InlineSVG will be used instead. The method used
    + * may be changed by using setPreferredMethod().
    + *
    + * InlineSVG requires that the document is rendered as XHTML. This
    + * must be enabled in the configuration file using the
    + * <tt>&lt;send-xhtml-mime-type&gt;</tt> option. By default, this
    + * option is off.
    + *
    + * The PngImage is the most portable rendering method, and may be the
    + * fastest if the painting is of high complexity and/or the image is
    + * fairly small.
    + *
    + * To use a %WPaintedWidget, you must derive from it and reimplement
    + * paintEvent(WPaintDevice *paintDevice). To paint on a WPaintDevice,
    + * you will need to use a WPainter. Repainting is triggered by calling
    + * the update() method.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * class MyPaintedWidget : public Wt::WPaintedWidget
    + * {
    + * public:
    + *   MyPaintedWidget(Wt::WContainerWidget *parent = 0)
    + *     : Wt::WPaintedWidget(parent),
    + *       foo_(100)
    + *   {
    + *      resize(200, 200); // provide a default size
    + *   }
    + *
    + *   void setFoo(int foo) {
    + *      foo_ = foo;
    + *      update(); // trigger a repaint
    + *   }
    + *
    + * protected:
    + *   void paintEvent(Wt::WPaintDevice *paintDevice) {
    + *     Wt::WPainter painter(paintDevice);
    + *     painter.drawLine(20, 20, foo_, foo_);
    + *     ...
    + *   }
    + *
    + * private:
    + *   int foo_;
    + * };
    + * \endcode
    + * \endif
    + * 
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * \note A %WPaintedWidget requires that it is given a size using resize() or
    + *       by a layout manager.
    + *
    + * \sa WImage
    + *
    + * \ingroup painting
    + */
    +class WT_API WPaintedWidget : public WInteractWidget
    +{
    +public:
    +  /*! \brief Enumeration that indicates a rendering method.
    +   */
    +  enum Method {
    +    /*! \brief SVG (Most browsers) or VML (Internet Explorer) embedded in
    +     *         the page.
    +     */
    +    InlineSvgVml,
    +
    +    /*! \brief The WHATWG HTML 5 canvas element.
    +     */
    +    HtmlCanvas,
    +
    +    /*! \brief Using a PNG image resource.
    +     */
    +    PngImage
    +  };
    +
    +  /*! \brief Create a new painted widget.
    +   */
    +  WPaintedWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WPaintedWidget();
    +
    +  /*! \brief Sets the preferred rendering method.
    +   *
    +   * When \p method is supported by the browser, then it is chosen
    +   * for rendering.
    +   */
    +  void setPreferredMethod(Method method);
    +
    +  /*! \brief Returns the preferred rendering method.
    +   *
    +   * \sa setPreferredMethod(Method)
    +   */
    +  Method preferredMethod() const { return preferredMethod_; }
    +
    +  /*! \brief Lets the widget repaint itself.
    +   *
    +   * Repainting is not immediate, but happens after when the event loop
    +   * is exited.
    +   *
    +   * Unless a Wt::PaintUpdate paint flag is set, the widget is first
    +   * cleared.
    +   */
    +  void update(WFlags<PaintFlag> flags = 0);
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +  /*! \brief Adds an interactive area.
    +   *
    +   * Adds the \p area which listens to events in a specific region
    +   * of the widget. Areas are organized in a list, to which the given
    +   * \p area is appended. When areas overlap, the area with the
    +   * lowest index receives the event.
    +   *
    +   * Ownership of the \p area is transferred to the widget.
    +   *
    +   * \note When defining at least one area, no more events will
    +   * propagate to the widget itself. As a work-around, you can emulate
    +   * this by listening for events on a WRectArea that corresponds to
    +   * the whole widget, and which is added as the last area (catching
    +   * all events that were not caught by preceding areas).
    +   *
    +   * \sa insertArea(int, WAbstractArea *)
    +   */
    +  void addArea(WAbstractArea *area);
    +
    +  /*! \brief Inserts an interactive area.
    +   *
    +   * Inserts the \p area which listens to events in the
    +   * coresponding area of the widget. Areas are organized in a list,
    +   * and the <i>area</i> is inserted at index \p index. When areas
    +   * overlap, the area with the lowest index receives the event.
    +   *
    +   * Ownership of the \p Area is transferred to the widget.
    +   *
    +   * \note When defining at least one area, no more events will
    +   * propagate to the widget itself. As a work-around, you can emulate
    +   * this by listening for events on a WRectArea that corresponds to
    +   * the whole widget, and which is added as the last area (catching
    +   * all events that were not caught by preceding areas).
    +   *
    +   * \sa addArea(WAbstractArea *)
    +   */
    +  void insertArea(int index, WAbstractArea *area);
    +
    +  /*! \brief Removes an interactive area.
    +   *
    +   * Removes the \p area from this widget, returning the
    +   * ownership.
    +   *
    +   * \sa addArea(WAbstractArea *)
    +   */
    +  void removeArea(WAbstractArea *area);
    +
    +  /*! \brief Returns the interactive area at the given index.
    +   *
    +   * Returns \c 0 if \p index was invalid.
    +   *
    +   * \sa insertArea(int, WAbstractArea *)
    +   */
    +  WAbstractArea *area(int index) const;
    +
    +  /*! \brief Returns the interactive areas set for this widget.
    +   *
    +   * \sa addArea()
    +   */
    +  const std::vector<WAbstractArea *> areas() const;
    +
    +protected:
    +  virtual void layoutSizeChanged(int width, int height);
    +
    +  /*! \brief Paints the widget.
    +   *
    +   * You should reimplement this method to paint the contents of the widget,
    +   * using the given paintDevice.
    +   */
    +  virtual void paintEvent(WPaintDevice *paintDevice) = 0;
    +
    +  virtual DomElementType domElementType() const;
    +  virtual void        updateDom(DomElement& element, bool all);
    +  virtual DomElement *createDomElement(WApplication *app);
    +  virtual void        getDomChanges(std::vector<DomElement *>& result,
    +				    WApplication *app);
    +  virtual void        propagateRenderOk(bool deep);
    +
    +  virtual void enableAjax();
    +
    +private:
    +  Method            preferredMethod_;
    +  WWidgetPainter   *painter_;
    +  bool              needRepaint_;
    +  bool              sizeChanged_;
    +  bool              areaImageAdded_;
    +  WFlags<PaintFlag> repaintFlags_;
    +  WImage           *areaImage_;
    +  int               renderWidth_, renderHeight_;
    +
    +  void resizeCanvas(int width, int height);
    +  bool createPainter();
    +  void createAreaImage();
    +
    +  friend class WWidgetVectorPainter;
    +  friend class WWidgetCanvasPainter;
    +  friend class WWidgetRasterPainter;
    +};
    +
    +}
    +
    +#endif // WPAINTED_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WPaintedWidget.C b/wt-3.1.7a/src/Wt/WPaintedWidget.C
    new file mode 100644
    index 0000000..135b202
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPaintedWidget.C
    @@ -0,0 +1,630 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCanvasPaintDevice"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WPainter"
    +#include "Wt/WPaintedWidget"
    +#include "Wt/WResource"
    +#include "Wt/WSvgImage"
    +#include "Wt/WVmlImage"
    +
    +#ifdef HAVE_RASTER_IMAGE
    +#include "Wt/WRasterImage"
    +#endif // HAVE_RASTER_IMAGE
    +
    +#include "WtException.h"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +class WWidgetPainter {
    +public:
    +  enum RenderType {
    +    InlineVml,
    +    InlineSvg,
    +    HtmlCanvas,
    +    PngImage
    +  };
    +
    +public:
    +  virtual ~WWidgetPainter();
    +  virtual WPaintDevice *getPaintDevice() = 0;
    +  virtual void createContents(DomElement *element, WPaintDevice *device) = 0;
    +  virtual void updateContents(std::vector<DomElement *>& result,
    +			      WPaintDevice *device) = 0;
    +  virtual RenderType renderType() const = 0;
    +
    +protected:
    +  WWidgetPainter(WPaintedWidget *widget);
    +
    +  WPaintedWidget *widget_;
    +};
    +
    +class WWidgetVectorPainter : public WWidgetPainter
    +{
    +public:
    +  WWidgetVectorPainter(WPaintedWidget *widget, RenderType renderType);
    +  virtual WPaintDevice *getPaintDevice();
    +  virtual void createContents(DomElement *element, WPaintDevice *device);
    +  virtual void updateContents(std::vector<DomElement *>& result,
    +			      WPaintDevice *device);
    +  virtual RenderType renderType() const { return renderType_; }
    +
    +private:
    +  RenderType renderType_;
    +};
    +
    +class WWidgetCanvasPainter : public WWidgetPainter
    +{
    +public:
    +  WWidgetCanvasPainter(WPaintedWidget *widget);
    +  virtual WPaintDevice *getPaintDevice();
    +  virtual void createContents(DomElement *element, WPaintDevice *device);
    +  virtual void updateContents(std::vector<DomElement *>& result,
    +			      WPaintDevice *device); 
    +  virtual RenderType renderType() const { return HtmlCanvas; }
    +};
    +
    +class WWidgetRasterPainter : public WWidgetPainter
    +{
    +public:
    +  WWidgetRasterPainter(WPaintedWidget *widget);
    +  ~WWidgetRasterPainter();
    +  virtual WPaintDevice *getPaintDevice();
    +  virtual void createContents(DomElement *element, WPaintDevice *device);
    +  virtual void updateContents(std::vector<DomElement *>& result,
    +			      WPaintDevice *device); 
    +  virtual RenderType renderType() const { return PngImage; }
    +
    +private:
    +  WPaintDevice *device_;
    +};
    +
    +WPaintedWidget::WPaintedWidget(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    preferredMethod_(HtmlCanvas),
    +    painter_(0),
    +    needRepaint_(false),
    +    sizeChanged_(false),
    +    areaImageAdded_(false),
    +    repaintFlags_(0),
    +    areaImage_(0),
    +    renderWidth_(0), renderHeight_(0)
    +{
    +  if (WApplication::instance()) {
    +    const WEnvironment& env = WApplication::instance()->environment();
    +
    +    if (env.agentIsOpera()
    +	&& env.userAgent().find("Mac OS X") == std::string::npos)
    +      preferredMethod_ = InlineSvgVml;
    +  }
    +
    +  setLayoutSizeAware(true);
    +  setInline(false);
    +}
    +
    +WPaintedWidget::~WPaintedWidget()
    +{
    +  delete painter_;
    +  delete areaImage_;
    +}
    +
    +void WPaintedWidget::setPreferredMethod(Method method)
    +{
    +  if (preferredMethod_ != method) {
    +    delete painter_;
    +    painter_ = 0;
    +    preferredMethod_ = method;
    +  }
    +}
    +
    +void WPaintedWidget::resize(const WLength& width, const WLength& height)
    +{
    +  if (!width.isAuto() && !height.isAuto()) {
    +    setLayoutSizeAware(false);
    +    resizeCanvas(static_cast<int>(width.toPixels()),
    +		 static_cast<int>(height.toPixels()));
    +  }
    +
    +  WInteractWidget::resize(width, height);
    +}
    +
    +void WPaintedWidget::resizeCanvas(int width, int height)
    +{
    +  renderWidth_ = width;
    +  renderHeight_ = height;
    +
    +  if (areaImage_)
    +    areaImage_->resize(renderWidth_, renderHeight_);
    +
    +  sizeChanged_ = true;
    +  update();
    +}
    +
    +void WPaintedWidget::layoutSizeChanged(int width, int height)
    +{
    +  resize(WLength::Auto, WLength::Auto);
    +
    +  resizeCanvas(width, height-5);
    +}
    +
    +void WPaintedWidget::update(WFlags<PaintFlag> flags)
    +{
    +  needRepaint_ = true;
    +  repaintFlags_ |= flags;
    +
    +  WInteractWidget::repaint();
    +}
    +
    +void WPaintedWidget::enableAjax()
    +{
    +  if (dynamic_cast<WWidgetCanvasPainter *>(painter_)
    +      && renderWidth_ != 0 && renderHeight_ != 0)
    +    update();
    +
    +  WInteractWidget::enableAjax();
    +}
    +
    +bool WPaintedWidget::createPainter()
    +{
    +  if (painter_)
    +    return false;
    +
    +  if (preferredMethod_ == PngImage) {
    +    painter_ = new WWidgetRasterPainter(this);
    +    return true;
    +  }
    +
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  /*
    +   * For IE: no choice. Use VML
    +   */
    +  if (env.agentIsIElt(9)) {
    +    painter_ = new WWidgetVectorPainter(this, WWidgetPainter::InlineVml);
    +    return true;
    +  }
    +
    +  /* Otherwise, combined preferred method with actual capabilities */
    +  Method method;
    +
    +  if (env.contentType() != WEnvironment::XHTML1)
    +    method = HtmlCanvas;
    +  else 
    +    if (!env.javaScript())
    +      method = InlineSvgVml;
    +    else {
    +      /*
    +       * For Firefox pre 3.0 on Mac: SVG support is buggy (text filling
    +       * is broken).
    +       */
    +      bool oldFirefoxMac =
    +	(env.userAgent().find("Firefox/1.5") != std::string::npos
    +	 || env.userAgent().find("Firefox/2.0") != std::string::npos)
    +	&& env.userAgent().find("Macintosh") != std::string::npos;
    +
    +      if (oldFirefoxMac)
    +	method = HtmlCanvas;
    +      else
    +	method = preferredMethod_;
    +
    +      /*
    +       * Nokia 810's default browser does not do SVG but there is no way of
    +       * finding that out, ASFAIK.
    +       */
    +      bool nokia810 =
    +	(env.userAgent().find("Linux arm") != std::string::npos
    +	 && env.userAgent().find("Tablet browser") != std::string::npos
    +	 && env.userAgent().find("Gecko") != std::string::npos);
    +
    +      if (nokia810)
    +	method = HtmlCanvas;
    +      else
    +	method = preferredMethod_;
    +    }
    +
    +  if (method == InlineSvgVml)
    +    painter_ = new WWidgetVectorPainter(this, WWidgetPainter::InlineSvg);
    +  else
    +    painter_ = new WWidgetCanvasPainter(this);
    +
    +  return true;
    +}
    +
    +DomElementType WPaintedWidget::domElementType() const
    +{
    +  if (isInline() && WApplication::instance()->environment().agentIsIE())
    +    return DomElement_SPAN;
    +  else  
    +    return DomElement_DIV;
    +}
    +
    +DomElement *WPaintedWidget::createDomElement(WApplication *app)
    +{
    +  createPainter();
    +
    +  DomElement *result = DomElement::createNew(domElementType());
    +  setId(result, app);
    +
    +  DomElement *wrap = result;
    +
    +  if (width().isAuto() && height().isAuto()) {
    +    result->setProperty(PropertyStylePosition, "relative");
    +
    +    wrap = DomElement::createNew(DomElement_DIV);
    +    wrap->setProperty(PropertyStylePosition, "absolute");
    +    wrap->setProperty(PropertyStyleLeft, "0");
    +    wrap->setProperty(PropertyStyleRight, "0");
    +  }
    +
    +  DomElement *canvas = DomElement::createNew(DomElement_DIV);
    +
    +  if (!app->environment().agentIsSpiderBot())
    +    canvas->setId('p' + id());
    +
    +  WPaintDevice *device = painter_->getPaintDevice();
    +  device->clear();
    +
    +  //handle the widget correctly when inline and using VML 
    +  if (painter_->renderType() == WWidgetPainter::InlineVml && isInline()) {
    +    result->setProperty(PropertyStyle, "zoom: 1;");
    +    canvas->setProperty(PropertyStyleDisplay, "inline");
    +    canvas->setProperty(PropertyStyle, "zoom: 1;");
    +  }
    +
    +  if (renderWidth_ != 0 && renderHeight_ != 0) {
    +    paintEvent(device);
    +
    +#ifdef WT_TARGET_JAVA
    +    if (device->painter())
    +      device->painter()->end();
    +#endif // WT_TARGET_JAVA
    +
    +  }
    +
    +  painter_->createContents(canvas, device);
    +
    +  needRepaint_ = false;
    +
    +  wrap->addChild(canvas);
    +  if (wrap != result)
    +    result->addChild(wrap);
    +
    +  updateDom(*result, true);
    +
    +  return result;
    +}
    +
    +void WPaintedWidget::updateDom(DomElement& element, bool all)
    +{
    +  if ((all && areaImage_) || areaImageAdded_) {
    +    element.addChild(((WWebWidget *)areaImage_)
    +		     ->createDomElement(WApplication::instance()));
    +    areaImageAdded_ = false;
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WPaintedWidget::propagateRenderOk(bool deep)
    +{
    +  needRepaint_ = false;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +void WPaintedWidget::getDomChanges(std::vector<DomElement *>& result,
    +				   WApplication *app)
    +{
    +  DomElement *e = DomElement::getForUpdate(this, DomElement_DIV);
    +  updateDom(*e, false);
    +  result.push_back(e);
    +
    +  bool createdNew = createPainter();
    +
    +  if (needRepaint_) {
    +    WPaintDevice *device = painter_->getPaintDevice();
    +
    +    if (createdNew || !(repaintFlags_ & PaintUpdate))
    +      device->clear();
    +
    +    if (renderWidth_ != 0 && renderHeight_ != 0)
    +      paintEvent(device);
    +
    +#ifdef WT_TARGET_JAVA
    +  if (device->painter())
    +    device->painter()->end();
    +#endif // WT_TARGET_JAVA
    +
    +    if (createdNew) {
    +      DomElement *canvas = DomElement::getForUpdate('p' + id(), DomElement_DIV);
    +      canvas->removeAllChildren();
    +      painter_->createContents(canvas, device);
    +      result.push_back(canvas);
    +    } else {
    +      painter_->updateContents(result, device);
    +    }
    +
    +    needRepaint_ = false;
    +    repaintFlags_ = 0;
    +  }
    +}
    +
    +void WPaintedWidget::addArea(WAbstractArea *area)
    +{
    +  createAreaImage();
    +  areaImage_->addArea(area);
    +}
    +
    +void WPaintedWidget::insertArea(int index, WAbstractArea *area)
    +{
    +  createAreaImage();
    +  areaImage_->insertArea(index, area);
    +}
    +
    +void WPaintedWidget::removeArea(WAbstractArea *area)
    +{
    +  createAreaImage();
    +  areaImage_->removeArea(area);
    +}
    +
    +WAbstractArea *WPaintedWidget::area(int index) const
    +{
    +  return areaImage_ ? areaImage_->area(index) : 0;
    +}
    +
    +const std::vector<WAbstractArea *> WPaintedWidget::areas() const
    +{
    +  return areaImage_ ? areaImage_->areas()
    +    : static_cast<const std::vector<WAbstractArea *> >(std::vector<WAbstractArea *>());
    +}
    +
    +void WPaintedWidget::createAreaImage()
    +{
    +  if (!areaImage_) {
    +    areaImage_ = new WImage(wApp->onePixelGifUrl());
    +    areaImage_->setParentWidget(this);
    +
    +    if (positionScheme() == Static)
    +      setPositionScheme(Relative);
    +    areaImage_->setPositionScheme(Absolute);
    +    areaImage_->setOffsets(0, Left | Top);
    +    areaImage_->setMargin(0, Top);
    +    areaImage_->resize(renderWidth_, renderHeight_);
    +    areaImage_->setPopup(true);
    +
    +    areaImageAdded_ = true;
    +  }
    +}
    +
    +/*
    + * WWidgetPainter
    + */
    +
    +WWidgetPainter::WWidgetPainter(WPaintedWidget *widget)
    +  : widget_(widget)
    +{ }
    +
    +WWidgetPainter::~WWidgetPainter()
    +{ }
    +
    +/*
    + * WWidgetVectorPainter
    + */
    +
    +WWidgetVectorPainter::WWidgetVectorPainter(WPaintedWidget *widget,
    +					   RenderType renderType)
    +  : WWidgetPainter(widget),
    +    renderType_(renderType)
    +{ }
    +
    +WPaintDevice *WWidgetVectorPainter::getPaintDevice()
    +{
    +  if (renderType_ == InlineSvg)
    +    return new WSvgImage(widget_->renderWidth_, widget_->renderHeight_);
    +  else
    +    return new WVmlImage(widget_->renderWidth_, widget_->renderHeight_);
    +}
    +
    +void WWidgetVectorPainter::createContents(DomElement *canvas,
    +					  WPaintDevice *device)
    +{
    +  WVectorImage *vectorDevice = dynamic_cast<WVectorImage *>(device);
    +  canvas->setProperty(PropertyInnerHTML, vectorDevice->rendered());
    +  delete device;
    +}
    +
    +void WWidgetVectorPainter::updateContents(std::vector<DomElement *>& result,
    +					  WPaintDevice *device)
    +{
    +  WVectorImage *vectorDevice = dynamic_cast<WVectorImage *>(device);
    +
    +  if (widget_->repaintFlags_ & PaintUpdate) {
    +    DomElement *painter = DomElement::updateGiven
    +      (WT_CLASS ".getElement('p" + widget_->id()+ "').firstChild",
    +       DomElement_DIV);
    +
    +    painter->setProperty(PropertyAddedInnerHTML, vectorDevice->rendered());
    +
    +    WApplication *app = WApplication::instance();
    +    if (app->environment().agentIsOpera())
    +      painter->callMethod("forceRedraw();");
    +
    +    result.push_back(painter);
    +  } else {
    +    DomElement *canvas = DomElement::getForUpdate
    +      ('p' + widget_->id(), DomElement_DIV);
    +
    +    /*
    +     * In fact, we should use another property, since we could be using
    +     * document.importNode() instead of myImportNode() since the xml does not
    +     * need to be interpreted as HTML...
    +     */
    +    canvas->setProperty(PropertyInnerHTML, vectorDevice->rendered());
    +    result.push_back(canvas);
    +  }
    +
    +  widget_->sizeChanged_ = false;
    +
    +  delete device;
    +}
    +
    +/*
    + * WWidgetCanvasPainter
    + */
    +
    +WWidgetCanvasPainter::WWidgetCanvasPainter(WPaintedWidget *widget)
    +  : WWidgetPainter(widget)
    +{ }
    +
    +WPaintDevice *WWidgetCanvasPainter::getPaintDevice()
    +{
    +  return new WCanvasPaintDevice(widget_->renderWidth_, widget_->renderHeight_);
    +}
    +
    +void WWidgetCanvasPainter::createContents(DomElement *result,
    +					  WPaintDevice *device)
    +{
    +  std::string wstr = boost::lexical_cast<std::string>(widget_->renderWidth_);
    +  std::string hstr = boost::lexical_cast<std::string>(widget_->renderHeight_);
    +
    +  result->setProperty(PropertyStylePosition, "relative");
    +  result->setProperty(PropertyStyleOverflowX, "hidden");
    +
    +  DomElement *canvas = DomElement::createNew(DomElement_CANVAS);
    +  canvas->setId('c' + widget_->id());
    +  canvas->setAttribute("width", wstr);
    +  canvas->setAttribute("height", hstr);
    +  result->addChild(canvas);
    +
    +  WCanvasPaintDevice *canvasDevice = dynamic_cast<WCanvasPaintDevice *>(device);
    +
    +  DomElement *text = 0;
    +  if (canvasDevice->textMethod() == WCanvasPaintDevice::DomText) {
    +    text = DomElement::createNew(DomElement_DIV);
    +    text->setId('t' + widget_->id());
    +    text->setProperty(PropertyStylePosition, "absolute");
    +    text->setProperty(PropertyStyleZIndex, "1");
    +    text->setProperty(PropertyStyleTop, "0px");
    +    text->setProperty(PropertyStyleLeft, "0px");
    +  }
    +
    +  canvasDevice->render("c" + widget_->id(), text ? text : result);
    +
    +  if (text)
    +    result->addChild(text);
    +
    +  delete device;
    +}
    +
    +void WWidgetCanvasPainter::updateContents(std::vector<DomElement *>& result,
    +					  WPaintDevice *device)
    +{
    +  WCanvasPaintDevice *canvasDevice = dynamic_cast<WCanvasPaintDevice *>(device);
    +
    +  if (widget_->sizeChanged_) {
    +    DomElement *canvas = DomElement::getForUpdate('c' + widget_->id(),
    +						  DomElement_CANVAS);
    +    canvas->setAttribute("width",
    +		 boost::lexical_cast<std::string>(widget_->renderWidth_));
    +    canvas->setAttribute("height",
    +		 boost::lexical_cast<std::string>(widget_->renderHeight_));
    +    result.push_back(canvas);
    +
    +    widget_->sizeChanged_ = false;
    +  }
    +
    +  bool domText = canvasDevice->textMethod() == WCanvasPaintDevice::DomText;
    +
    +  DomElement *el
    +    = DomElement::getForUpdate(domText ? 't' + widget_->id() : widget_->id(),
    +			       DomElement_DIV);
    +  if (domText)
    +    el->removeAllChildren();
    +
    +  canvasDevice->render('c' + widget_->id(), el);
    +
    +  result.push_back(el);
    +
    +  delete device;
    +}
    +
    +/*
    + * WWidgetRasterPainter
    + */
    +
    +WWidgetRasterPainter::WWidgetRasterPainter(WPaintedWidget *widget)
    +  : WWidgetPainter(widget),
    +    device_(0)
    +{ }
    +
    +WWidgetRasterPainter::~WWidgetRasterPainter()
    +{
    +  delete device_;
    +}
    +
    +WPaintDevice *WWidgetRasterPainter::getPaintDevice()
    +{
    +  if (!device_) {
    +#ifdef HAVE_RASTER_IMAGE
    +    device_ = new WRasterImage("png", widget_->renderWidth_, widget_->renderHeight_);
    +#else
    +    throw WtException("Wt was built without WRasterImage (graphicsmagick)");
    +#endif
    +  }
    +
    +  return device_;
    +}
    +
    +void WWidgetRasterPainter::createContents(DomElement *result,
    +					  WPaintDevice *device)
    +{
    +  std::string wstr = boost::lexical_cast<std::string>(widget_->renderWidth_);
    +  std::string hstr = boost::lexical_cast<std::string>(widget_->renderHeight_);
    +
    +  DomElement *img = DomElement::createNew(DomElement_IMG);
    +  img->setId('i' + widget_->id());
    +  img->setAttribute("width", wstr);
    +  img->setAttribute("height", hstr);
    +  img->setAttribute("class", "unselectable");
    +  img->setAttribute("unselectable", "on");
    +  img->setAttribute("onselectstart", "return false;");
    +  img->setAttribute("onmousedown", "return false;");
    +
    +  WResource *resource = dynamic_cast<WResource *>(device);
    +  img->setAttribute("src", resource->generateUrl());
    +
    +  result->addChild(img);
    +}
    +
    +void WWidgetRasterPainter::updateContents(std::vector<DomElement *>& result,
    +					  WPaintDevice *device)
    +{
    +  WResource *resource = dynamic_cast<WResource *>(device);
    +
    +  DomElement *img
    +    = DomElement::getForUpdate('i' + widget_->id(), DomElement_IMG);
    +
    +  if (widget_->sizeChanged_) {
    +    img->setAttribute("width",
    +		      boost::lexical_cast<std::string>(widget_->renderWidth_));
    +    img->setAttribute("height",
    +		      boost::lexical_cast<std::string>(widget_->renderHeight_));
    +    widget_->sizeChanged_ = false;
    +  }
    +
    +  img->setAttribute("src", resource->generateUrl());
    +
    +  result.push_back(img);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPainter b/wt-3.1.7a/src/Wt/WPainter
    new file mode 100644
    index 0000000..084aca6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPainter
    @@ -0,0 +1,918 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPAINTER_H_
    +#define WPAINTER_H_
    +
    +#include <Wt/WBrush>
    +#include <Wt/WFont>
    +#include <Wt/WGlobal>
    +#include <Wt/WPainterPath>
    +#include <Wt/WPen>
    +#include <Wt/WShadow>
    +#include <Wt/WTransform>
    +
    +namespace Wt {
    +
    +class WLineF;
    +class WPaintDevice;
    +class WPainterPath;
    +class WPointF;
    +class WRectF;
    +
    +/*! \defgroup painting Painting system
    +    \brief Classes that provide support for vector graphics painting
    +
    +  %Wt provides a vector graphics painting system, which depending on
    +  the browser support, uses one of four different methods to paint the
    +  graphics (inline SVG, inline VML, HTML 5 &lt;canvas&gt; or a raster
    +  image). Vector graphics has as benefit a lower bandwidth usage
    +  compared to raster images, indepedent of the image size. To use the
    +  paint system, you need to specialize WPaintedWidget and use a
    +  WPainter to paint the contents of the widget inside its
    +  WPaintedWidget::paintEvent().
    +
    +  In addition, a PDF backend is included in the library, which can be used
    +  to make a PDF version of a painting, or to embed a painting in a
    +  PDF document.
    +
    +  To use inline SVG, you need to enable xhtml support in your
    +  configuration file by enabling send-xhtml-mimetype, see \ref
    +  config_general.
    +*/
    +
    +/*! \class WPainter Wt/WPainter Wt/WPainter
    + *  \brief Vector graphics painting class.
    + *
    + * The painter class provides a vector graphics interface for
    + * painting. It needs to be used in conjunction with a WPaintDevice,
    + * onto which it paints. To start painting on a device, either pass
    + * the device through the constructor, or use begin().
    + *
    + * A typical use is to instantiate a %WPainter from within a
    + * specialized WPaintedWidget::paintEvent() implementation, to paint
    + * on the given paint device, but you can also use a painter to paint
    + * directly to a particular paint device of choice, for example to
    + * create SVG, PDF or PNG images (as resources).
    + *
    + * The painter maintains state such as the current \link setPen()
    + * pen\endlink, \link setBrush() brush\endlink, \link setFont()
    + * font\endlink, \link shadow() shadow\endlink, \link worldTransform()
    + * transformation\endlink and clipping settings (see setClipping() and
    + * setClipPath()). A particular state can be saved using save() and
    + * later restored using restore().
    + *
    + * The painting system distinguishes between device coordinates,
    + * logical coordinates, and local coordinates. The device coordinate
    + * system ranges from (0, 0) in the top left corner of the device, to
    + * (device->width().toPixels(), device->height().toPixels()) for the
    + * bottom right corner. The logical coordinate system defines a
    + * coordinate system that may be chosen independent of the geometry of
    + * the device, which is convenient to make abstraction of the actual
    + * device size. Finally, the current local coordinate system may be
    + * different from the logical coordinate system because of a
    + * transformation set (using translate(), rotate(), and
    + * scale()). Initially, the local coordinate system coincides with the
    + * logical coordinate system, which coincides with the device
    + * coordinate system.
    + *
    + * The device coordinates are defined in terms of pixels. Even though
    + * most underlying devices are actual vector graphics formats, when
    + * used in conjunction with a WPaintedWidget, these vector graphics
    + * are rendered by the browser onto a pixel-based canvas (like the
    + * rest of the user-interface). The coordinates are defined such that
    + * integer values correspond to an imaginary raster which separates
    + * the individual pixels, as in the figure below.
    + *
    + * \image html WPainter.png "The device coordinate system for a 6x5 pixel device"
    + *
    + * As a consequence, to avoid anti-aliasing effects when drawing
    + * straight lines of width one pixel, you will need to use vertices
    + * that indicate the middle of a pixel to get a crisp one-pixel wide
    + * line, as in the example figure.
    + *
    + * By setting a viewPort() and a window(), a viewPort transformation
    + * is defined which maps logical coordinates onto device
    + * coordinates. By changing the world transformation (using
    + * setWorldTransform(), or translate(), rotate(), scale() operations),
    + * it is defined how current local coordinates map onto logical
    + * coordinates.
    + *
    + * The painter provides support for clipping using an arbitrary \link
    + * WPainterPath path\endlink, but not that the %VmlImage only has
    + * limited support for clipping.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * class MyPaintedWidget : public Wt::WPaintedWidget
    + * {
    + * public:
    + *   MyPaintedWidget(Wt::WContainerWidget *parent = 0)
    + *     : Wt::WPaintedWidget(parent),
    + *       foo_(100)
    + *   {
    + *      resize(200, 200); // provide a default size
    + *   }
    + *
    + *   void setFoo(int foo) {
    + *      foo_ = foo;
    + *      update(); // trigger a repaint
    + *   }
    + *
    + * protected:
    + *   void paintEvent(Wt::WPaintedWidget *paintDevice) {
    + *     Wt::WPainter painter(paintDevice);
    + *     painter.drawLine(20, 20, foo_, foo_);
    + *     ...
    + *   }
    + *
    + * private:
    + *   int foo_;
    + * };
    + * \endcode
    + * \endif
    + *
    + * \sa WPaintedWidget::paintEvent(WPaintDevice *)
    + *
    + * \ingroup painting
    + */
    +class WT_API WPainter
    +{
    +public:
    +  /*! \brief Enumeration for render hints
    +   */
    +  enum RenderHint {
    +    Antialiasing = 1, //!< Antialiasing
    +    LowQualityShadows = 2  //!< Use low-quality shadows (applies only to VML)
    +  };
    +
    +  /*! \brief Default constructor.
    +   *
    +   * Before painting, you must invoke begin(WPaintDevice *) on a paint device.
    +   *
    +   * \sa WPainter(WPaintDevice *)
    +   */
    +  WPainter();
    +
    +  /*! \brief Creates a painter on a given paint device.
    +   */
    +  WPainter(WPaintDevice *device);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WPainter();
    +
    +  /*! \brief Begins painting on a paint device.
    +   *
    +   * \sa end(), isActive()
    +   */
    +  bool begin(WPaintDevice *device);
    +
    +  /*! \brief Returns whether this painter is active on a paint device.
    +   *
    +   * \sa begin(WPaintDevice *), end()
    +   */
    +  bool isActive() const;
    +
    +  /*! \brief Ends painting.
    +   *
    +   * \if cpp
    +   * This method is called automatically from the destructor.
    +   * \endif
    +   */
    +  bool end();
    +
    +  /*! \brief Returns the device on which this painter is active (or 0 if not active).
    +   *
    +   * \sa begin(WPaintDevice *), WPainter(WPaintDevice *), isActive()
    +   */
    +  WPaintDevice *device() const { return device_; }
    +
    +  /*! \brief Sets a render hint.
    +   *
    +   * Renderers may ignore particular hints for which they have no
    +   * support.
    +   */
    +  void setRenderHint(RenderHint hint, bool on = true);
    +
    +  /*! \brief Returns the current render hints.
    +   *
    +   * Returns the logical OR of render hints currently set.
    +   *
    +   * \sa setRenderHint(RenderHint, bool).
    +   */
    +  int renderHints() const { return s().renderHints_; }
    +
    +  /*! \brief Draws an arc.
    +   *
    +   * Draws an arc using the current pen, and fills using the current brush.
    +   *
    +   * The arc is defined as a segment from an ellipse, which fits in
    +   * the <i>rectangle</i>. The segment starts at \p startAngle, and
    +   * spans an angle given by \p spanAngle. These angles have as
    +   * unit 1/16th of a degree, and are measured counter-clockwise
    +   * starting from the 3 o'clock position.
    +   *
    +   * \sa drawEllipse(const WRectF&), drawChord(const WRectF&, int, int)
    +   * \sa drawArc(double, double, double, double, int, int)
    +   */
    +  void drawArc(const WRectF& rectangle, int startAngle, int spanAngle);
    +
    +  /*! \brief Draws an arc.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawArc(const WRectF&, int, int)
    +   */
    +  void drawArc(double x, double y, double width, double height,
    +	       int startAngle, int spanAngle);
    +
    +  /*! \brief Draws a chord.
    +   *
    +   * Draws an arc using the current pen, and connects start and end
    +   * point with a line. The area is filled using the current brush.
    +   *
    +   * The arc is defined as a segment from an ellipse, which fits in
    +   * the <i>rectangle</i>. The segment starts at \p startAngle, and
    +   * spans an angle given by \p spanAngle. These angles have as
    +   * unit 1/16th of a degree, and are measured counter-clockwise
    +   * starting at 3 o'clock.
    +   *
    +   * \sa drawEllipse(const WRectF&), drawArc(const WRectF&, int, int)
    +   * \sa drawChord(double, double, double, double, int, int)
    +   */
    +  void drawChord(const WRectF& rectangle, int startAngle, int spanAngle);
    +
    +  /*! \brief Draws a chord.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawChord(const WRectF&, int, int)
    +   */
    +  void drawChord(double x, double y, double width, double height,
    +		 int startAngle, int spanAngle);
    +
    +  /*! \brief Draws an ellipse.
    +   *
    +   * Draws an ellipse using the current pen and fills it using the
    +   * current brush.
    +   *
    +   * The ellipse is defined as being bounded by the \p rectangle.
    +   *
    +   * \sa drawArc(const WRectF&, int, int)
    +   * \sa drawEllipse(double, double, double, double)
    +   */
    +  void drawEllipse(const WRectF& rectangle);
    +
    +  /*! \brief Draws an ellipse.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawEllipse(const WRectF&)
    +   */
    +  void drawEllipse(double x, double y, double width, double height);
    +
    +  /*! \brief An image that can be rendered on a WPainter.
    +   *
    +   * The image is specified in terms of a URL, and the width and
    +   * height.
    +   *
    +   * \sa drawImage()
    +   */
    +  class WT_API Image {
    +  public:
    +    /*! \brief Creates an image.
    +     *
    +     * Create an image which is located at the <i>uri</i>, and which has
    +     * dimensions <i>width</i> x <i>height</i>.
    +     */
    +    Image(const std::string& uri, int width, int height);
    +
    +    /*! \brief Creates an image.
    +     *
    +     * Create an image which is located at <i>uri</i> which is available on
    +     * the local filesystem as <i>file</i>. The image dimensions are
    +     * retrieved from the file.
    +     */
    +    Image(const std::string& uri, const std::string& file);
    +
    +    /*! \brief Returns the uri.
    +     */
    +    std::string uri() const { return uri_; }
    +
    +    /*! \brief Returns the image width.
    +     */
    +    int width() const { return width_; }
    +
    +    /*! \brief Returns the image height.
    +     */
    +    int height() const { return height_; }
    +
    +  private:
    +    std::string uri_;
    +    int width_, height_;
    +  };
    +
    +  /*! \brief Draws an image.
    +   *
    +   * Draws the \p image so that the top left corner corresponds to
    +   * \p point.
    +   *
    +   * This is an overloaded method provided for convenience.
    +   */
    +  void drawImage(const WPointF& point, const Image& image);
    +
    +  /*! \brief Draws part of an image.
    +   *
    +   * Draws the \p sourceRect rectangle from an image to the
    +   * location \p point.
    +   *
    +   * This is an overloaded method provided for convenience.
    +   */
    +  void drawImage(const WPointF& point, const Image& image,
    +		 const WRectF& sourceRect);
    +
    +  /*! \brief Draws an image inside a rectangle.
    +   *
    +   * Draws the <i>image</i> inside \p rect (If necessary, the image
    +   * is scaled to fit into the rectangle).
    +   *
    +   * This is an overloaded method provided for convenience.
    +   */
    +  void drawImage(const WRectF& rect, const Image& image);
    +
    +  /*! \brief Draws part of an image inside a rectangle.
    +   *
    +   * Draws the \p sourceRect rectangle from an image inside
    +   * \p rect (If necessary, the image is scaled to fit into the
    +   * rectangle).
    +   */
    +  void drawImage(const WRectF& rect, const Image& image,
    +		 const WRectF& sourceRect);
    +
    +  /*! \brief Draws part of an image.
    +   *
    +   * Draws the \p sourceRect rectangle with top left corner
    +   * (<i>sx</i>, <i>sy</i>) and size <i>sw</i> x \p sh from an
    +   * image to the location (<i>x</i>, \p y).
    +   */
    +  void drawImage(double x, double y, const Image& image,
    +		 double sx = 0, double sy = 0, double sw = -1, double sh = -1);
    +
    +  /*! \brief Draws a line.
    +   *
    +   * Draws a line using the current pen.
    +   *
    +   * \sa drawLine(const WPointF&, const WPointF&),
    +   *     drawLine(double, double, double, double)
    +   */  
    +  void drawLine(const WLineF& line);
    +
    +  /*! \brief Draws a line.
    +   *
    +   * Draws a line defined by two points.
    +   *
    +   * \sa drawLine(const WLineF&),
    +   *     drawLine(double, double, double, double)
    +   */  
    +  void drawLine(const WPointF& p1, const WPointF& p2);
    +
    +  /*! \brief Draws a line.
    +   *
    +   * Draws a line defined by two points.
    +   *
    +   * \sa drawLine(const WLineF&),
    +   *     drawLine(const WPointF&, const WPointF&)
    +   */  
    +  void drawLine(double x1, double y1, double x2, double y2);
    +
    +  /*! \brief Draws an array of lines.
    +   *
    +   * Draws the \p lineCount first lines from the given array of lines.
    +   */  
    +  void drawLines(const WT_ARRAY WLineF *lines, int lineCount);
    +
    +  /*! \brief Draws an array of lines.
    +   *
    +   * Draws \p lineCount lines, where each line is specified using
    +   * a begin and end point that are read from an array. Thus, the
    +   * <i>pointPairs</i> array must have at least 2*\p lineCount
    +   * points.
    +   */
    +  void drawLines(const WT_ARRAY WPointF *pointPairs, int lineCount);
    +
    +  /*! \brief Draws an array of lines.
    +   *
    +   * Draws the lines given in the vector.
    +   */  
    +  void drawLines(const std::vector<WLineF>& lines);
    +
    +  /*! \brief Draws an array of lines.
    +   *
    +   * Draws a number of lines that are specified by pairs of begin- and
    +   * endpoints. The vector should hold a number of points that is a
    +   * multiple of two.
    +   */  
    +  void drawLines(const std::vector<WPointF>& pointPairs);
    +
    +  /*! \brief Draws a (complex) path.
    +   *
    +   * Draws and fills the given path using the current pen and brush.
    +   *
    +   * \sa strokePath(const WPainterPath&, const WPen&),
    +   *     fillPath(const WPainterPath&, const WBrush&)
    +   */  
    +  void drawPath(const WPainterPath& path);
    +
    +  /*! \brief Draws a pie.
    +   *
    +   * Draws an arc using the current pen, and connects start and end
    +   * point with the center of the corresponding ellipse. The area is
    +   * filled using the current brush.
    +   *
    +   * The arc is defined as a segment from an ellipse, which fits in
    +   * the <i>rectangle</i>. The segment starts at \p startAngle, and
    +   * spans an angle given by \p spanAngle. These angles have as
    +   * unit 1/16th of a degree, and are measured counter-clockwise
    +   * starting at 3 o'clock.
    +   *
    +   * \sa drawEllipse(const WRectF&), drawArc(const WRectF&, int, int)
    +   * \sa drawPie(double, double, double, double, int, int)
    +   */
    +  void drawPie(const WRectF& rectangle, int startAngle, int spanAngle);
    +
    +  /*! \brief Draws a pie.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawPie(const WRectF&, int, int)
    +   */
    +  void drawPie(double x, double y, double width, double height,
    +	       int startAngle, int spanAngle);
    +
    +  /*! \brief Draws a point.
    +   *
    +   * Draws a single point using the current pen. This is implemented
    +   * by drawing a very short line, centered around the given \p
    +   * position. To get the result of a single point, you should use a
    +   * pen with a Wt::SquareCap or Wt::RoundCap pen cap style.
    +   *
    +   * \sa drawPoint(double, double)
    +   */
    +  void drawPoint(const WPointF& position);
    +
    +  /*! \brief Draws a point.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawPoint(const WPointF&)
    +   */
    +  void drawPoint(double x, double y);
    +
    +  /*! \brief Draws a number of points.
    +   *
    +   * Draws the \p pointCount first points from the given array of points.
    +   *
    +   * \sa drawPoint(const WPointF&)
    +   */
    +  void drawPoints(const WT_ARRAY WPointF *points, int pointCount);
    +
    +  /*! \brief Draws a polygon.
    +   *
    +   * Draws a polygon that is specified by a list of points, using the
    +   * current pen. The polygon is closed by connecting the last point
    +   * with the first point, and filled using the current brush.
    +   *
    +   * \sa drawPath(const WPainterPath&), drawPolyline()
    +   */
    +  void drawPolygon(const WT_ARRAY WPointF *points, int pointCount
    +		   /*, FillRule fillRule */);
    +
    +  /*! \brief Draws a polyline.
    +   *
    +   * Draws a polyline that is specified by a list of points, using the
    +   * current pen.
    +   *
    +   * \sa drawPath(const WPainterPath&), drawPolygon()
    +   */
    +  void drawPolyline(const WT_ARRAY WPointF *points, int pointCount);
    +
    +  /*! \brief Draws a rectangle.
    +   *
    +   * Draws and fills a rectangle using the current pen and brush.
    +   *
    +   * \sa drawRect(double, double, double, double)
    +   */
    +  void drawRect(const WRectF& rectangle);
    +
    +  /*! \brief Draws a rectangle.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawRect(const WRectF&)
    +   */
    +  void drawRect(double x, double y, double width, double height);
    +
    +  /*! \brief Draws a number of rectangles.
    +   *
    +   * Draws and fills the \p rectCount first rectangles from the
    +   * given array, using the current pen and brush.
    +   *
    +   * \sa drawRect(const WRectF&)
    +   */
    +  void drawRects(const WT_ARRAY WRectF *rectangles, int rectCount);
    +
    +  /*! \brief Draws a number of rectangles.
    +   *
    +   * Draws and fills a list of rectangles using the current pen and
    +   * brush.
    +   *
    +   * \sa drawRect(const WRectF&)
    +   */
    +  void drawRects(const std::vector<WRectF>& rectangles);
    +  
    +  /*! \brief Draws text.
    +   *
    +   * Draws text using inside the rectangle, using the current font. The
    +   * text is aligned inside the rectangle following alignment
    +   * indications given in \p flags. The text is drawn using the
    +   * current transformation, pen color (pen()) and font settings
    +   * (font()).
    +   *
    +   * Flags is the logical OR of a horizontal and vertical
    +   * alignment. Horizontal alignment may be one of AlignLeft,
    +   * AlignCenter, or AlignRight. Vertical alignment is one of
    +   * AlignTop, AlignMiddle or AlignBottom.
    +   *
    +   * \note HtmlCanvas: on older browsers implementing Html5 canvas,
    +   * text will be rendered horizontally (unaffected by rotation and
    +   * unaffected by the scaling component of the transformation
    +   * matrix). In that case, text is overlayed on top of painted shapes
    +   * (in DOM div's), and is not covered by shapes that are painted
    +   * after the text. Use the SVG and VML renderers
    +   * (WPaintedWidget::inlineSvgVml) for the most accurate font
    +   * rendering. Native HTML5 text rendering is supported on Firefox3+,
    +   * Chrome2+ and Safari4+.
    +   */
    +  void drawText(const WRectF& rectangle, WFlags<AlignmentFlag> flags,
    +		const WString& text);
    +
    +  /*! \brief Draws text.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa drawText(const WRectF&, WFlags<AlignmentFlag>, const WString&)
    +   */
    +  void drawText(double x, double y, double width, double height,
    +		WFlags<AlignmentFlag> flags, const WString& text);
    +
    +  /*! \brief Fills a (complex) path.
    +   *
    +   * Like drawPath(const WPainterPath&), but does not stroke the path,
    +   * and fills the path with the given \p brush.
    +   *
    +   * \sa drawPath(const WPainterPath&), strokePath(const WPainterPath&, const WPen&)
    +   */
    +  void fillPath(const WPainterPath& path, const WBrush& brush);
    +
    +  /*! \brief Fills a rectangle.
    +   *
    +   * Like drawRect(const WRectF&), but does not stroke the rect, and
    +   * fills the rect with the given \p brush.
    +   *
    +   * \sa drawRect(const WRectF&)
    +   */
    +  void fillRect(const WRectF& rectangle, const WBrush& brush);
    +
    +  /*! \brief Fills a rectangle.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa fillRect(const WRectF&, const WBrush&)
    +   */
    +  void fillRect(double x, double y, double width, double height,
    +		const WBrush& brush);
    +
    +  /*! \brief Strokes a path.
    +   *
    +   * Like drawPath(const WPainterPath&), but does not fill the path,
    +   * and strokes the path with the given \p pen.
    +   *
    +   * \sa drawPath(const WPainterPath&), fillPath(const WPainterPath&, const WBrush&)
    +   */
    +  void strokePath(const WPainterPath& path, const WPen& pen);
    +
    +  /*! \brief Sets a shadow effect.
    +   *
    +   * The shadow effect is applied to all things drawn (paths, text and images).
    +   *
    +   * \note With the VML backend (IE), the shadow is not applied to images,
    +   *       and the shadow color is always black; only the opacity (alpha)
    +   *       channel is taken into account.
    +   * \sa LowQualityShadows render hint
    +   */
    +  void setShadow(const WShadow& shadow);
    +
    +  /*! \brief Returns the current shadow effect.
    +   *
    +   * \sa setShadow()
    +   */
    +  const WShadow& shadow() const { return s().currentShadow_; }
    +
    +  /*! \brief Sets the fill style.
    +   *
    +   * Changes the fills style for subsequent draw operations.
    +   *
    +   * \sa brush(), setPen(const WPen&)
    +   */
    +  void setBrush(const WBrush& brush);
    +
    +  /*! \brief Sets the font.
    +   *
    +   * Changes the font for subsequent text rendering. Note that only
    +   * font sizes that are defined as an explicit size (see
    +   * WFont::FixedSize) will render correctly in all devices (SVG, VML,
    +   * and HtmlCanvas).
    +   *
    +   * \sa font(), drawText()
    +   */
    +  void setFont(const WFont& font);
    +
    +  /*! \brief Sets the pen.
    +   *
    +   * Changes the pen used for stroking subsequent draw operations.
    +   *
    +   * \sa pen(), setBrush(const WBrush&)
    +   */
    +  void setPen(const WPen& pen);
    +
    +  /*! \brief Returns the current brush.
    +   *
    +   * Returns the brush style that is currently used for filling.
    +   *
    +   * \sa setBrush(const WBrush&)
    +   */
    +  const WBrush& brush() const { return s().currentBrush_; }
    +
    +  /*! \brief Returns the current font.
    +   *
    +   * Returns the font that is currently used for rendering text.
    +   * The default font is a 10pt sans serif font.
    +   *
    +   * \sa setFont(const WFont&)
    +   */
    +  const WFont& font() const { return s().currentFont_; }
    +
    +  /*! \brief Returns the current pen.
    +   *
    +   * Returns the pen that is currently used for stroking.
    +   *
    +   * \sa setPen(const WPen&)
    +   */
    +  const WPen& pen() const { return s().currentPen_; }
    +
    +  /*! \brief Enables or disables clipping.
    +   *
    +   * Enables are disables clipping for subsequent operations using the
    +   * current clip path set using setClipPath().
    +   *
    +   * \p Note: Clipping is not supported for the VML renderer.
    +   *
    +   * \sa hasClipping(), setClipPath(const WPainterPath&)
    +   */
    +  void setClipping(bool enable);
    +
    +  /*! \brief Returns whether clipping is enabled.
    +   *
    +   * \p Note: Clipping is not supported for the VML renderer.
    +   *
    +   * \sa setClipping(bool), setClipPath(const WPainterPath&)
    +   */
    +  bool hasClipping() const { return s().clipping_; }
    +
    +  /*! \brief Sets the clip path.
    +   *
    +   * Sets the path that is used for clipping subsequent drawing
    +   * operations. The clip path is only used when clipping is enabled
    +   * using setClipping(bool). The path is specified in local
    +   * coordinates.
    +   *
    +   * <i>Note: Only clipping with a rectangle is supported for the VML
    +   *    renderer (see WPainterPath::addRect()). The rectangle must,
    +   *    after applying the combined transformation system, be aligned
    +   *    with the window.</i>
    +   *
    +   * \sa clipPath(), setClipping(bool)
    +   */
    +  void setClipPath(const WPainterPath& clipPath);
    +
    +  /*! \brief Returns the clip path.
    +   *
    +   * The clip path is returned as it was defined: in the local
    +   * coordinates at time of definition.
    +   *
    +   * \sa setClipPath(const WPainterPath&)
    +   */
    +  WPainterPath clipPath() const { return s().clipPath_; }
    +
    +  /*! \brief Resets the current transformation.
    +   *
    +   * Resets the current transformation to the identity transformation
    +   * matrix, so that the logical coordinate system coincides with the
    +   * device coordinate system.
    +   */
    +  void resetTransform();
    +
    +  /*! \brief Rotates the logical coordinate system.
    +   *
    +   * Rotates the logical coordinate system around its origin. The
    +   * \p angle is specified in degrees, and positive values are
    +   * clock-wise.
    +   *
    +   * \sa scale(double, double), translate(double, double), resetTransform()
    +   */
    +  void rotate(double angle);
    +
    +  /*! \brief Scales the logical coordinate system.
    +   *
    +   * Scales the logical coordinate system around its origin, by a factor
    +   * in the X and Y directions.
    +   *
    +   * \sa rotate(double), translate(double, double), resetTransform()
    +   */
    +  void scale(double sx, double sy);
    +
    +  /*! \brief Translates the origin of the logical coordinate system.
    +   *
    +   * Translates the origin of the logical coordinate system to a new
    +   * location relative to the current logical coordinate system.
    +   *
    +   * \sa translate(double, double), rotate(double),
    +   *     scale(double, double), resetTransform()
    +   */
    +  void translate(const WPointF& offset);
    +
    +  /*! \brief Translates the origin of the logical coordinate system.
    +   *
    +   * Translates the origin of the logical coordinate system to a new
    +   * location relative to the logical coordinate system.
    +   *
    +   * \sa translate(const WPointF& offset), rotate(double),
    +   *     scale(double, double), resetTransform()
    +   */
    +  void translate(double dx, double dy);
    +
    +  /*! \brief Sets a transformation for the logical coordinate system.
    +   *
    +   * Sets a new transformation which transforms logical coordinates to
    +   * device coordinates. When \p combine is \c true, the
    +   * transformation is combined with the current world transformation
    +   * matrix.
    +   *
    +   * \sa worldTransform()
    +   * \sa rotate(double), scale(double, double), translate(double, double)
    +   * \sa resetTransform()
    +   */
    +  void setWorldTransform(const WTransform& matrix, bool combine = false);
    +
    +  /*! \brief Returns the current world transformation matrix.
    +   *
    +   * \sa setWorldTransform()
    +   */
    +  const WTransform& worldTransform() const { return s().worldTransform_; }
    +
    +  /*! \brief Saves the current state.
    +   *
    +   * A copy of the current state is saved on a stack. This state will
    +   * may later be restored by popping this state from the stack using
    +   * restore().
    +   *
    +   * The state that is saved is the current \link setPen()
    +   * pen\endlink, \link setBrush() brush\endlink, \link setFont()
    +   * font\endlink, \link shadow() shadow\endlink, \link
    +   * worldTransform() transformation\endlink and clipping settings
    +   * (see setClipping() and setClipPath()).
    +   *
    +   * \sa restore()
    +   */
    +  void save();
    +
    +  /*! \brief Returns the last save state.
    +   *
    +   * Pops the last saved state from the state stack.
    +   *
    +   * \sa save()
    +   */
    +  void restore();
    +
    +  /*! \brief Sets the viewport.
    +   *
    +   * Selects the part of the device that will correspond to the logical
    +   * coordinate system.
    +   *
    +   * By default, the viewport spans the entire device: it is the
    +   * rectangle (0, 0) to (device->width(), device->height()). The
    +   * window defines how the viewport is mapped to logical coordinates.
    +   *
    +   * \sa viewPort(), setWindow(const WRectF&)
    +   */
    +  void setViewPort(const WRectF& viewPort);
    +
    +  /*! \brief Sets the viewport.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa setViewPort(const WRectF&)
    +   */
    +  void setViewPort(double x, double y, double width, double height);
    +
    +  /*! \brief Returns the viewport.
    +   *
    +   * \sa setViewPort(const WRectF&)
    +   */
    +  WRectF viewPort() const { return viewPort_; }
    +
    +  /*! \brief Sets the window.
    +   *
    +   * Defines the viewport rectangle in logical coordinates, and thus how
    +   * logical coordinates map onto the viewPort.
    +   *
    +   * By default, is (0, 0) to (device->width(), device->height()). Thus,
    +   * the default window and viewport leave logical coordinates identical
    +   * to device coordinates.
    +   *
    +   * \sa window(), setViewPort(const WRectF&)
    +   */
    +  void setWindow(const WRectF& window);
    +
    +  /*! \brief Sets the window.
    +   *
    +   * This is an overloaded method for convenience.
    +   *
    +   * \sa setWindow(const WRectF&)
    +   */
    +  void setWindow(double x, double y, double width, double height);
    +
    +  /*! \brief Returns the current window.
    +   *
    +   * \sa setViewPort(const WRectF&)
    +   */
    +  WRectF window() const { return window_; }
    +
    +  /*! \brief Returns the combined transformation matrix.
    +   *
    +   * Returns the transformation matrix that maps coordinates to device
    +   * coordinates. It is the combination of the current world
    +   * transformation (which defines the transformation within the
    +   * logical coordinate system) and the window/viewport transformation
    +   * (which transforms logical coordinates to device coordinates).
    +   *
    +   * \sa setWorldTransform(), setViewPort(), setWindow()
    +   */
    +  WTransform combinedTransform() const;
    +
    +  const WTransform& clipPathTransform() const;
    +
    +  WLength normalizedPenWidth(const WLength& penWidth, bool correctCosmetic)
    +    const;
    +
    +private:
    +  WPaintDevice *device_;
    +  WRectF        viewPort_, window_;
    +  WTransform    viewTransform_;
    +
    +  struct State {
    +    WTransform    worldTransform_;
    +    WBrush        currentBrush_;
    +    WFont         currentFont_;
    +    WPen          currentPen_;
    +    WShadow       currentShadow_;
    +    int           renderHints_;
    +    WPainterPath  clipPath_;
    +    WTransform    clipPathTransform_;
    +    bool          clipping_;
    +
    +    State();
    +
    +#ifdef WT_TARGET_JAVA
    +    State clone();
    +#endif
    +  };
    +
    +  std::vector<State> stateStack_;
    +
    +  State& s() { return stateStack_.back(); }
    +  const State& s() const { return stateStack_.back(); }
    +
    +  void recalculateViewTransform();
    +};
    +
    +}
    +
    +/*! @} */
    +
    +#endif // WPAINTER_H_
    diff --git a/wt-3.1.7a/src/Wt/WPainter.C b/wt-3.1.7a/src/Wt/WPainter.C
    new file mode 100644
    index 0000000..b2490a1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPainter.C
    @@ -0,0 +1,692 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cassert>
    +#include <cmath>
    +#include <cstring>
    +#include <fstream>
    +#include <string.h>
    +
    +#include "Wt/WLineF"
    +#include "Wt/WPainter"
    +#include "Wt/WPainterPath"
    +#include "Wt/WPaintDevice"
    +#include "Wt/WRectF"
    +#include "Wt/WTransform"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WPainter::State::State()
    +  : renderHints_(0),
    +    clipping_(false)
    +{
    +  currentFont_.setFamily(WFont::SansSerif);
    +  currentFont_.setSize(WFont::FixedSize, WLength(10, WLength::Point));
    +}
    +
    +#ifdef WT_TARGET_JAVA
    +WPainter::State WPainter::State::clone()
    +{
    +  State result;
    +
    +  result.worldTransform_ = worldTransform_;
    +  result.currentBrush_ = currentBrush_;
    +  result.currentFont_ = currentFont_;
    +  result.currentPen_ = currentPen_;
    +  result.currentShadow_ = currentShadow_;
    +  result.renderHints_ = renderHints_;
    +  result.clipPath_ = clipPath_;
    +  result.clipPathTransform_ = clipPathTransform_;
    +  result.clipping_ = clipping_;
    +
    +  return result;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +WPainter::Image::Image(const std::string& uri, int width, int height)
    +  : uri_(uri),
    +    width_(width),
    +    height_(height)
    +{ }
    +
    +#ifndef WT_TARGET_JAVA
    +WPainter::Image::Image(const std::string& uri, const std::string& fileName)
    +  : uri_(uri)
    +{
    +  /*
    +   * Contributed by Daniel Derr @ ArrowHead Electronics Health-Care
    +   */
    +  unsigned char header[25];
    +  std::ifstream file;
    +  file.open(fileName.c_str(), std::ios::binary | std::ios::in);
    +
    +  if (file.good()) {
    +    file.seekg(0, std::ios::beg);
    +    file.read((char*)header, 25);
    +    file.close();
    +
    +    if (std::memcmp(header, "\211PNG\r\n\032\n", 8) == 0) {
    +      // PNG FILE
    +      width_ = ( ( ( int(header[16]) << 8
    +		     | int(header[17])) << 8
    +		   | int(header[18])) << 8
    +		 | int(header[19]));
    +      height_ = ( ( ( int(header[20]) << 8
    +		      | int(header[21])) << 8
    +		    | int(header[22])) << 8
    +		  | int(header[23]));
    +    } else if ((std::memcmp(header,"GIF8", 4) == 0)
    +	       && ((header[4] == '9') || (header[4] == '7'))
    +	       && (header[5] == 'a')) {
    +      // GIF FILE
    +      width_ = int(header[7]) << 8 | int(header[6]);
    +      height_ = int(header[9]) << 8 | int(header[8]);
    +    } else {
    +      throw Wt::WtException("'" + fileName + "': unsupported file format");
    +    }
    +  } else
    +    throw Wt::WtException("'" + fileName + "': could not read");
    +}
    +#endif // WT_TARGET_JAVA
    +
    +WPainter::WPainter()
    +  : device_(0)
    +{
    +  stateStack_.push_back(State());
    +}
    +
    +WPainter::WPainter(WPaintDevice *device)
    +  : device_(0)
    +{
    +  begin(device);
    +}
    +
    +WPainter::~WPainter()
    +{
    +  end();
    +}
    +
    +void WPainter::setRenderHint(RenderHint hint, bool on)
    +{
    +  int old = s().renderHints_;
    +
    +  if (on)
    +    s().renderHints_ |= hint;
    +  else
    +    s().renderHints_ &= ~hint;
    +
    +  if (device_ && old != s().renderHints_)
    +    device_->setChanged(WPaintDevice::Hints);
    +}
    +
    +bool WPainter::begin(WPaintDevice *device)
    +{
    +  if (device_)
    +    return false;
    +
    +  if (device->paintActive())
    +    return false;
    +
    +  stateStack_.clear();
    +  stateStack_.push_back(State());
    +
    +  device_ = device;
    +  device_->setPainter(this);
    +
    +  device_->init();
    +
    +  viewPort_.setX(0);
    +  viewPort_.setY(0);
    +  viewPort_.setWidth(device_->width().value());
    +  viewPort_.setHeight(device_->height().value());
    +
    +  window_ = viewPort_;
    +  recalculateViewTransform();
    +
    +  return true;
    +}
    +
    +bool WPainter::end()
    +{
    +  if (!device_)
    +    return false;
    +
    +  device_->done();
    +
    +  device_->setPainter(0);
    +  device_ = 0;
    +
    +  stateStack_.clear();
    +
    +  return true;
    +}
    +
    +bool WPainter::isActive() const
    +{
    +  return device_ != 0;
    +}
    +
    +void WPainter::save()
    +{
    +  stateStack_.push_back(State(stateStack_.back()));
    +}
    +
    +void WPainter::restore()
    +{
    +  if (stateStack_.size() > 1) {
    +    WFlags<WPaintDevice::ChangeFlag> flags = 0;
    +
    +    State& last = stateStack_.back();
    +    State& next = stateStack_[stateStack_.size() - 2];
    +
    +    if (last.worldTransform_ != next.worldTransform_)
    +      flags |= WPaintDevice::Transform;
    +    if (last.currentBrush_ != next.currentBrush_)
    +      flags |= WPaintDevice::Brush;
    +    if (last.currentFont_ != next.currentFont_)
    +      flags |= WPaintDevice::Font;
    +    if (last.currentPen_ != next.currentPen_)
    +      flags |= WPaintDevice::Pen;
    +    if (last.currentShadow_ != next.currentShadow_)
    +      flags |= WPaintDevice::Shadow;
    +    if (last.renderHints_ != next.renderHints_)
    +      flags |= WPaintDevice::Hints;
    +    if (last.clipPath_ != next.clipPath_)
    +      flags |= WPaintDevice::Clipping;
    +    if (last.clipping_ != next.clipping_)
    +      flags |= WPaintDevice::Clipping;
    +
    +    stateStack_.erase(stateStack_.begin() + stateStack_.size() - 1);
    +
    +    if (flags && device_)
    +      device_->setChanged(flags);
    +  }
    +}
    +
    +void WPainter::drawArc(const WRectF& rectangle, int startAngle, int spanAngle)
    +{
    +  WBrush oldBrush = WBrush(brush());
    +
    +  setBrush(NoBrush);
    +  device_->drawArc(rectangle.normalized(), startAngle / 16., spanAngle / 16.);
    +  setBrush(oldBrush);
    +}
    +
    +void WPainter::drawArc(double x, double y, double width, double height,
    +		       int startAngle, int spanAngle)
    +{
    +  drawArc(WRectF(x, y, width, height), startAngle, spanAngle);
    +}
    +
    +void WPainter::drawChord(const WRectF& rectangle, int startAngle, int spanAngle)
    +{
    +  WTransform oldTransform = WTransform(worldTransform());
    +
    +  translate(rectangle.center().x(), rectangle.center().y());
    +  scale(1., rectangle.height() / rectangle.width());
    +
    +  double start = startAngle / 16.;
    +  double span = spanAngle / 16.;
    +
    +  WPainterPath path;
    +  path.arcMoveTo(0, 0, rectangle.width()/2., start);
    +  path.arcTo(0, 0, rectangle.width()/2., start, span);
    +  path.closeSubPath();
    +
    +  drawPath(path);
    +
    +  setWorldTransform(oldTransform);
    +}
    +
    +void WPainter::drawChord(double x, double y, double width, double height,
    +			 int startAngle, int spanAngle)
    +{
    +  drawChord(WRectF(x, y, width, height), startAngle, spanAngle);
    +}
    +
    +void WPainter::drawEllipse(const WRectF& rectangle)
    +{
    +  device_->drawArc(rectangle.normalized(), 0, 360);
    +}
    +
    +void WPainter::drawEllipse(double x, double y, double width, double height)
    +{
    +  drawEllipse(WRectF(x, y, width, height));
    +}
    +
    +void WPainter::drawImage(const WPointF& point, const Image& image)
    +{
    +  drawImage(WRectF(point.x(), point.y(), image.width(), image.height()),
    +	    image, WRectF(0, 0, image.width(), image.height()));
    +}
    +
    +void WPainter::drawImage(const WPointF& point, const Image& image,
    +			 const WRectF& sourceRect)
    +{
    +  drawImage(WRectF(point.x(), point.y(),
    +		   sourceRect.width(), sourceRect.height()),
    +	    image, sourceRect);
    +}
    +
    +void WPainter::drawImage(const WRectF& rect, const Image& image)
    +{
    +  drawImage(rect, image, WRectF(0, 0, image.width(), image.height()));
    +}
    +
    +void WPainter::drawImage(const WRectF& rect, const Image& image,
    +			 const WRectF& sourceRect)
    +{
    +  device_->drawImage(rect.normalized(), image.uri(),
    +		     image.width(), image.height(),
    +		     sourceRect.normalized());
    +}
    +
    +void WPainter::drawImage(double x, double y, const Image& image,
    +			 double sx, double sy, double sw, double sh)
    +{
    +  if (sw <= 0)
    +    sw = image.width() - sx;
    +  if (sh <= 0)
    +    sh = image.height() - sy;
    +
    +  device_->drawImage(WRectF(x, y, sw, sh),
    +		     image.uri(), image.width(), image.height(),
    +		     WRectF(sx, sy, sw, sh));
    +}
    +
    +void WPainter::drawLine(const WLineF& line)
    +{
    +  drawLine(line.x1(), line.y1(), line.x2(), line.y2());
    +}
    +
    +void WPainter::drawLine(const WPointF& p1, const WPointF& p2)
    +{
    +  drawLine(p1.x(), p1.y(), p2.x(), p2.y());
    +}
    +
    +void WPainter::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  device_->drawLine(x1, y1, x2, y2);
    +}
    +
    +void WPainter::drawLines(const WT_ARRAY WLineF *lines, int lineCount)
    +{
    +  for (int i = 0; i < lineCount; ++i)
    +    drawLine(lines[i]);
    +}
    +
    +void WPainter::drawLines(const WT_ARRAY WPointF *pointPairs, int lineCount)
    +{
    +  for (int i = 0; i < lineCount; ++i)
    +    drawLine(pointPairs[i*2], pointPairs[i*2 + 1]);
    +}
    +
    +void WPainter::drawLines(const std::vector<WLineF>& lines)
    +{
    +  for (unsigned i = 0; i < lines.size(); ++i)
    +    drawLine(lines[i]);
    +}
    +
    +void WPainter::drawLines(const std::vector<WPointF>& pointPairs)
    +{
    +  for (unsigned i = 0; i < pointPairs.size()/2; ++i)
    +    drawLine(pointPairs[i*2], pointPairs[i*2 + 1]);
    +}
    +
    +void WPainter::drawPath(const WPainterPath& path)
    +{
    +  device_->drawPath(path);
    +}
    +
    +void WPainter::drawPie(const WRectF& rectangle, int startAngle, int spanAngle)
    +{
    +  WTransform oldTransform = WTransform(worldTransform());
    +
    +  translate(rectangle.center().x(), rectangle.center().y());
    +  scale(1., rectangle.height() / rectangle.width());
    +
    +  WPainterPath path(WPointF(0.0, 0.0));
    +  path.arcTo(0.0, 0.0, rectangle.width() / 2.0,
    +	     startAngle / 16., spanAngle / 16.);
    +  path.closeSubPath();
    +
    +  drawPath(path);
    +
    +  setWorldTransform(oldTransform);
    +}
    +
    +void WPainter::drawPie(double x, double y, double width, double height,
    +		       int startAngle, int spanAngle)
    +{
    +  drawPie(WRectF(x, y, width, height), startAngle, spanAngle);
    +}
    +
    +void WPainter::drawPoint(double x, double y)
    +{ 
    +  drawLine(x - 0.05, y - 0.05, x + 0.05, y + 0.05);
    +}
    +
    +void WPainter::drawPoint(const WPointF& point)
    +{
    +  drawPoint(point.x(), point.y());
    +}
    +
    +void WPainter::drawPoints(const WT_ARRAY WPointF *points, int pointCount)
    +{
    +  for (int i = 0; i < pointCount; ++i)
    +    drawPoint(points[i]);
    +}
    +
    +void WPainter::drawPolygon(const WT_ARRAY WPointF *points, int pointCount
    +			   /*, FillRule fillRule */)
    +{
    +  if (pointCount < 2)
    +    return;
    +
    +  WPainterPath path;
    +
    +  path.moveTo(points[0]);
    +  for (int i = 1; i < pointCount; ++i)
    +    path.lineTo(points[i]);
    +
    +  path.closeSubPath();
    +
    +  drawPath(path);
    +}
    +
    +void WPainter::drawPolyline(const WT_ARRAY WPointF *points, int pointCount)
    +{
    +  if (pointCount < 2)
    +    return;
    +
    +  WPainterPath path;
    +
    +  path.moveTo(points[0]);
    +  for (int i = 1; i < pointCount; ++i)
    +    path.lineTo(points[i]);
    +
    +  WBrush oldBrush = WBrush(brush());
    +  setBrush(WBrush());
    +  drawPath(path);
    +  setBrush(oldBrush);
    +}
    +
    +void WPainter::drawRect(const WRectF& rectangle)
    +{
    +  drawRect(rectangle.x(), rectangle.y(), rectangle.width(), rectangle.height());
    +}
    +
    +void WPainter::drawRect(double x, double y, double width, double height)
    +{
    +  WPainterPath path(WPointF(x, y));
    +
    +  path.lineTo(x + width, y);
    +  path.lineTo(x + width, y + height);
    +  path.lineTo(x, y + height);
    +  path.closeSubPath();
    +
    +  drawPath(path);
    +}
    +
    +void WPainter::drawRects(const WT_ARRAY WRectF *rectangles, int rectCount)
    +{
    +  for (int i = 0; i < rectCount; ++i)
    +    drawRect(rectangles[i]);
    +}
    +
    +void WPainter::drawRects(const std::vector<WRectF>& rectangles)
    +{
    +  for (unsigned i = 0; i < rectangles.size(); ++i)
    +    drawRect(rectangles[i]);
    +}
    +
    +void WPainter::drawText(const WRectF& rectangle, WFlags<AlignmentFlag> flags,
    +			const WString& text)
    +{
    +  if (!(flags & AlignVerticalMask))
    +    flags |= AlignTop;
    +  if (!(flags & AlignHorizontalMask))
    +    flags |= AlignLeft;
    +
    +  device_->drawText(rectangle.normalized(), flags, text);
    +}
    +
    +void WPainter::drawText(double x, double y, double width, double height,
    +			WFlags<AlignmentFlag> flags, const WString& text)
    +{
    +  drawText(WRectF(x, y, width, height), flags, text);
    +}
    +
    +void WPainter::fillPath(const WPainterPath& path, const WBrush& b)
    +{
    +  WBrush oldBrush = WBrush(brush());
    +  WPen   oldPen = WPen(pen());
    +
    +  setBrush(b);
    +  setPen(NoPen);
    +
    +  drawPath(path);
    +
    +  setBrush(oldBrush);
    +  setPen(oldPen);
    +}
    +
    +void WPainter::fillRect(const WRectF& rectangle, const WBrush& b)
    +{
    +  WBrush oldBrush = WBrush(brush());
    +  WPen   oldPen = WPen(pen());
    +
    +  setBrush(b);
    +  setPen(NoPen);
    +
    +  drawRect(rectangle);
    +
    +  setBrush(oldBrush);
    +  setPen(oldPen);
    +}
    +
    +void WPainter::fillRect(double x, double y, double width, double height,
    +			const WBrush& brush)
    +{
    +  fillRect(WRectF(x, y, width, height), brush);
    +}
    +
    +void WPainter::strokePath(const WPainterPath& path, const WPen& p)
    +{
    +  WBrush oldBrush = WBrush(brush());
    +  WPen   oldPen = WPen(pen());
    +
    +  setBrush(WBrush());
    +  setPen(p);
    +
    +  drawPath(path);
    +
    +  setBrush(oldBrush);
    +  setPen(oldPen);
    +}
    +
    +void WPainter::setBrush(const WBrush& b)
    +{
    +  if (brush() != b) {
    +    s().currentBrush_ = b;
    +    device_->setChanged(WPaintDevice::Brush);
    +  }
    +}
    +
    +void WPainter::setFont(const WFont& f)
    +{
    +  if (font() != f) {
    +    s().currentFont_ = f;
    +    device_->setChanged(WPaintDevice::Font);
    +  }
    +}
    +
    +void WPainter::setPen(const WPen& p)
    +{
    +  if (pen() != p) {
    +    s().currentPen_ = p;
    +    device_->setChanged(WPaintDevice::Pen);
    +  }
    +}
    +
    +void WPainter::setShadow(const WShadow& shadow)
    +{
    +  if (this->shadow() != shadow) {
    +    s().currentShadow_ = shadow;
    +    device_->setChanged(WPaintDevice::Shadow);
    +  }
    +}
    +
    +void WPainter::resetTransform()
    +{
    +  s().worldTransform_.reset();
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +void WPainter::rotate(double angle)
    +{
    +  s().worldTransform_.rotate(angle);
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +void WPainter::scale(double sx, double sy)
    +{
    +  s().worldTransform_.scale(sx, sy);
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +void WPainter::translate(double dx, double dy)
    +{
    +  s().worldTransform_.translate(dx, dy);
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +void WPainter::translate(const WPointF& p)
    +{
    +  translate(p.x(), p.y());
    +}
    +
    +void WPainter::setWorldTransform(const WTransform& matrix, bool combine)
    +{
    +  if (combine)
    +    s().worldTransform_ *= matrix;
    +  else
    +    s().worldTransform_ = matrix;
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +void WPainter::setViewPort(const WRectF& viewPort)
    +{
    +  viewPort_ = viewPort;
    +
    +  recalculateViewTransform();
    +}
    +
    +void WPainter::setViewPort(double x, double y, double width, double height)
    +{
    +  setViewPort(WRectF(x, y, width, height));
    +}
    +
    +void WPainter::setWindow(const WRectF& window)
    +{
    +  window_ = window;
    +
    +  recalculateViewTransform();
    +}
    +
    +void WPainter::setWindow(double x, double y, double width, double height)
    +{
    +  setWindow(WRectF(x, y, width, height));
    +}
    +
    +void WPainter::recalculateViewTransform()
    +{
    +  viewTransform_ = WTransform(); 
    +
    +  double scaleX = viewPort_.width() / window_.width();
    +  double scaleY = viewPort_.height() / window_.height();
    +
    +  viewTransform_.translate(viewPort_.x() - window_.x() * scaleX,
    +			   viewPort_.y() - window_.y() * scaleY);
    +  viewTransform_.scale(scaleX, scaleY);
    +
    +  if (device_)
    +    device_->setChanged(WPaintDevice::Transform);
    +}
    +
    +WTransform WPainter::combinedTransform() const
    +{
    +  return viewTransform_ * s().worldTransform_;
    +}
    +
    +const WTransform& WPainter::clipPathTransform() const
    +{
    +  return s().clipPathTransform_;
    +}
    +
    +void WPainter::setClipping(bool enable)
    +{
    +  if (s().clipping_ != enable) {
    +    s().clipping_ = enable;
    +    if (device_)
    +      device_->setChanged(WPaintDevice::Clipping);
    +  }
    +}
    +
    +void WPainter::setClipPath(const WPainterPath& clipPath)
    +{
    +  s().clipPath_ = clipPath;
    +  s().clipPathTransform_ = combinedTransform();
    +
    +  if (s().clipping_ && device_)
    +    device_->setChanged(WPaintDevice::Clipping);
    +}
    +
    +WLength WPainter::normalizedPenWidth(const WLength& penWidth,
    +				     bool correctCosmetic) const
    +{
    +  double w = penWidth.value();
    +
    +  if (w == 0 && correctCosmetic) {
    +    // cosmetic width -- must be untransformed 1 pixel
    +    const WTransform& t = combinedTransform();
    +    if (!t.isIdentity()) {
    +      WTransform::TRSRDecomposition d;
    +      t.decomposeTranslateRotateScaleRotate(d);
    +
    +      w = 2.0/(std::fabs(d.sx) + std::fabs(d.sy));
    +    } else
    +      w = 1.0;
    +
    +    return WLength(w, WLength::Pixel);
    +  } else if (w != 0 && !correctCosmetic) {
    +    // non-cosmetic width -- must be transformed
    +    const WTransform& t = combinedTransform();
    +    if (!t.isIdentity()) {
    +      WTransform::TRSRDecomposition d;
    +      t.decomposeTranslateRotateScaleRotate(d);
    +
    +      w *= (std::fabs(d.sx) + std::fabs(d.sy))/2.0;
    +    }
    +
    +    return WLength(w, WLength::Pixel);
    +  } else
    +    return penWidth;
    +}
    +
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPainterPath b/wt-3.1.7a/src/Wt/WPainterPath
    new file mode 100644
    index 0000000..d50729b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPainterPath
    @@ -0,0 +1,378 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPAINTERPATH_H_
    +#define WPAINTERPATH_H_
    +
    +#include <Wt/WPointF>
    +#include <Wt/WRectF>
    +#include <vector>
    +
    +namespace Wt {
    +
    +/*! \class WPainterPath Wt/WPainterPath Wt/WPainterPath
    + *  \brief A path defining a shape.
    + *
    + * A painter path represents a (complex) path that may be composed of
    + * lines, arcs and bezier curve segments, and painted onto a paint device
    + * using WPainter::drawPath().
    + *
    + * The path that is composed in a painter path may consist of multiple
    + * closed sub-paths. Only the last sub-path can be left open.
    + *
    + * To compose a path, this class maintains a current position, which
    + * is the starting point for the next drawing operation. An operation
    + * may draw a line (see lineTo()), arc (see arcTo()), or bezier curve
    + * (see quadTo() and cubicTo()) from the current position to a new
    + * position. A new sub path may be started by moving the current
    + * position to a new location (see moveTo()), which automatically
    + * closes the previous sub path.
    + *
    + * When sub paths overlap, the result is undefined (it is dependent on
    + * the underlying painting device).
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WPainter painter(...);
    + *
    + * Wt::WPainterPath path(Wt::WPointF(10, 10));
    + * path.lineTo(10, 20);
    + * path.lineTo(30, 20);
    + * path.closeSubPath();
    + *
    + * painter.setPen(Wt::red);
    + * painter.setBrush(Wt::blue);
    + * painter.drawPath(path);
    + * \endcode
    + * \elseif java
    + * \code
    + * WPainter painter = new WPainter();
    + *	 
    + * WPainterPath path = new WPainterPath(new WPointF(10, 10));
    + * path.lineTo(10, 20);
    + * path.lineTo(30, 20);
    + * path.closeSubPath();
    + *		 
    + * painter.setPen(new WPen(WColor.red));
    + * painter.setBrush(new WBrush(WColor.blue));
    + * painter.drawPath(path);
    + * \endcode
    + * \endif
    + *
    + * \sa WPainter::drawPath()
    + *
    + * \ingroup painting
    + */
    +class WT_API WPainterPath
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Creates an empty path, and sets the current position to (0, 0).
    +   */
    +  WPainterPath();
    +
    +  /*! \brief Construct a new path, and set the initial position.
    +   *
    +   * Creates an empty path, and sets the current position to
    +   * \p startPoint.
    +   */
    +  WPainterPath(const WPointF& startPoint);
    +
    +  /*! \brief Copy constructor.
    +   */
    +  WPainterPath(const WPainterPath& path);
    +
    +  /*! \brief Assignment operator.
    +   */
    +  WPainterPath& operator= (const WPainterPath& path);
    +
    +  /*! \brief Returns the current position.
    +   *
    +   * Returns the current position, which is the end point of the last
    +   * move or draw operation, and which well be the start point of the
    +   * next draw operation.
    +   */
    +  WPointF currentPosition() const;
    +
    +  /*! \brief Returns whether the path is empty.
    +   *
    +   * Returns \c true if the path contains no drawing operations. Note that
    +   * move operations are not considered drawing operations.
    +   */
    +  bool isEmpty() const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the paths are exactly the same.
    +   */
    +  bool operator== (const WPainterPath& path) const;  
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the paths are different.
    +   */
    +  bool operator!= (const WPainterPath& path) const;
    +
    +  /*! \brief Closes the last sub path.
    +   *
    +   * Draws a line from the current position to the start position of
    +   * the last sub path (which is the end point of the last move
    +   * operation), and sets the current position to (0, 0).
    +   */
    +  void closeSubPath();
    +  
    +  /*! \brief Moves the current position to a new location.
    +   *
    +   * Moves the current position to a new point, implicitly closing the last
    +   * sub path.
    +   *
    +   * \sa closeSubPath(), moveTo(double, double)
    +   */
    +  void moveTo(const WPointF& point);
    +  
    +  /*! \brief Moves the current position to a new location.
    +   *
    +   * Moves the current position to a new point, implicitly closing the last
    +   * sub path.
    +   *
    +   * \sa closeSubPath(), moveTo(double, double)
    +   */
    +  void moveTo(double x, double y);
    +  
    +  /*! \brief Draws a straight line.
    +   *
    +   * Draws a straight line from the current position to \p point,
    +   * which becomes the new current position.
    +   *
    +   * \sa lineTo(double, double)
    +   */
    +  void lineTo(const WPointF& point);
    +  
    +  /*! \brief Draws a straight line.
    +   *
    +   * Draws a straight line from the current position to (\p x,
    +   * \p y), which becomes the new current position.
    +   *
    +   * \sa lineTo(const WPointF&)
    +   */
    +  void lineTo(double x, double y);
    +  
    +  /*! \brief Draws a cubic bezier curve.
    +   *
    +   * Draws a cubic bezier curve from the current position to
    +   * \p endPoint, which becomes the new current position. The
    +   * bezier curve uses the two control points <i>c1</i> and \p c2.
    +   *
    +   * \sa cubicTo(double c1x, double c1y, double c2x, double c2y, double endPointx, double endPointy)
    +   */
    +  void cubicTo(const WPointF& c1, const WPointF& c2, const WPointF& endPoint);
    +  
    +  /*! \brief Draws a cubic bezier curve.
    +   *
    +   * This is an overloaded method provided for convenience.
    +   *
    +   * \sa cubicTo(const WPointF&, const WPointF&, const WPointF&)
    +   */
    +  void cubicTo(double c1x, double c1y, double c2x, double c2y,
    +	       double endPointx, double endPointy);
    +  
    +  /*! \brief Draws an arc.
    +   *
    +   * Draws an arc which is a segment of a circle. The circle is
    +   * defined with center (<i>cx</i>, <i>cy</i>) and \p radius. The
    +   * segment starts at \p startAngle, and spans an angle given by
    +   * \p spanAngle. These angles are expressed in degrees, and are
    +   * measured counter-clockwise starting from the 3 o'clock position.
    +   *
    +   * Implicitly draws a line from the current position to the start of
    +   * the arc, if the current position is different from the start.
    +   *
    +   * \sa arcMoveTo(double cx, double cy, double radius, double angle)
    +   */
    +  void arcTo(double cx, double cy, double radius,
    +	     double startAngle, double sweepLength);
    +
    +  /*! \brief Moves to a point on an arc.
    +   *
    +   * Moves to a point on a circle. The circle is defined with center
    +   * (<i>cx</i>, <i>cy</i>) and \p radius, and the point is at
    +   * \p angle degrees measured counter-clockwise starting from the
    +   * 3 o'clock position.
    +   *
    +   * \sa arcTo(double cx, double cy, double radius, double startAngle, double sweepLength)
    +   */
    +  void arcMoveTo(double cx, double cy, double radius, double angle);
    +
    +  /*! \brief Move to a point on an arc.
    +   *
    +   * Moves to a point on an ellipse. The ellipse fits in the
    +   * rectangle defined by top left position (\p x,
    +   * <i>y</i>), and size <i>width</i> x \p height, and the point is at
    +   * \p angle degrees measured counter-clockwise starting from the
    +   * 3 o'clock position.
    +   *
    +   * \sa arcTo()
    +   */
    +  void arcMoveTo(double x, double y, double width, double height, double angle);
    +
    +  /*! \brief Draws a quadratic bezier curve
    +   *
    +   * Draws a quadratic bezier curve from the current position to
    +   * \p endPoint, which becomes the new current position. The
    +   * bezier curve uses the single control point \p c.
    +   *
    +   * \sa quadTo(double cx, double cy, double endPointx, double endPointy)
    +   */
    +  void quadTo(const WPointF& c, const WPointF& endPoint);
    +
    +  /*! \brief Draws a quadratic bezier curve.
    +   *
    +   * This is an overloaded method provided for convenience.
    +   *
    +   * \sa quadTo(const WPointF&, const WPointF&)
    +   */
    +  void quadTo(double cx, double cy, double endPointx, double endPointy);
    +
    +  /*! \brief Draws an ellipse.
    +   *
    +   * This method closes the current sub path, and adds an ellipse that is
    +   * bounded by the rectangle \p boundingRectangle.
    +   *
    +   * \p Note: some renderers only support circles (width == height)
    +   *
    +   * \sa addEllipse(double x, double y, double width, double height), arcTo()
    +   */
    +  void addEllipse(const WRectF& boundingRectangle);
    +
    +  /*! \brief Draws an ellipse.
    +   *
    +   * This method closes the current sub path, and adds an ellipse that is
    +   * bounded by the rectangle defined by top left position (\p x,
    +   * <i>y</i>), and size <i>width</i> x \p height.
    +   *
    +   * \note Some renderers only support circles (width == height)
    +   *
    +   * \sa addEllipse(const WRectF&), arcTo()
    +   */
    +  void addEllipse(double x, double y, double width, double height);
    +
    +  /*! \brief Draws a rectangle.
    +   *
    +   * This method closes the current sub path, and adds a rectangle
    +   * that is defined by \p rectangle.
    +   *
    +   * \sa addRect(double x, double y, double width, double height)
    +   */
    +  void addRect(const WRectF& rectangle);
    +
    +  /*! \brief Draws a rectangle.
    +   *
    +   * This method closes the current sub path, and adds a rectangle
    +   * that is defined by top left position (<i>x</i>, \p y), and
    +   * size <i>width</i> x \p height.
    +   *
    +   * \sa addRect(const WRectF&)
    +   */
    +  void addRect(double x, double y, double width, double height);
    +
    +  /*! \brief Adds a path.
    +   *
    +   * Adds an entire \p path to the current path. If the path's
    +   * begin position is different from the current position, the last
    +   * sub path is first closed, otherwise the last sub path is extended
    +   * with the path's first sub path.
    +   *
    +   * \sa connectPath(const WPainterPath&)
    +   */
    +  void addPath(const WPainterPath& path);
    +
    +  /*! \brief Adds a path, connecting.
    +   *
    +   * Adds an entire \p path to the current path. If the path's
    +   * begin position is different from the current position, the last
    +   * sub path is first closed, otherwise the last sub path is extended
    +   * with the path's first sub path.
    +   *
    +   * \sa connectPath(const WPainterPath&)
    +   */
    +  void connectPath(const WPainterPath& path);
    +
    +  /*! \brief A segment.
    +   */
    +  class Segment {
    +  public:
    +    enum Type {
    +      MoveTo, LineTo,
    +      CubicC1, CubicC2, CubicEnd,
    +      QuadC, QuadEnd,
    +      ArcC, ArcR, ArcAngleSweep 
    +    };
    +
    +    double x() const { return x_; }
    +    double y() const { return y_; }
    +    Type   type() const { return type_; }
    +
    +    bool operator== (const Segment& other) const;
    +    bool operator!= (const Segment& other) const;
    +
    +  private:
    +    Segment(double x, double y, Type type);
    +
    +    double x_, y_;
    +    Type   type_;
    +
    +    friend class WPainterPath;
    +  };
    +
    +  const std::vector<Segment>& segments() const { return segments_; }
    +
    +  /* Returns the start position before drawing segment i */
    +  WPointF positionAtSegment(int i) const;
    +
    +  bool asRect(WRectF& result) const;
    +
    +  /*! \brief Returns the bounding box of the control points.
    +   *
    +   * Returns the bounding box of all control points. This is guaranteed to
    +   * be a superset of the actual bounding box.
    +   */
    +  WRectF controlPointRect() const;
    +
    +private:
    +  bool isRect_;
    +  std::vector<Segment> segments_;
    +
    +  WPointF getSubPathStart() const;
    +  WPointF beginPosition() const;
    +
    +  static WPointF getArcPosition(double cx, double cy, double rx, double ry,
    +				double angle);
    +
    +  /* Draws an arc (<b>deprecated</b>).
    +   *
    +   * Deprecated: use arcTo(double cx, double cy, double radius, double startAngle, double sweepLength) instead since not all renderers support elliptical segments (width != height).
    +   *
    +   * Draws an arc which is a segment of an ellipse, which fits in the
    +   * rectangle defined by top left position (\p x,
    +   * <i>y</i>), and size <i>width</i> x \p height. The segment starts at
    +   * \p startAngle, and spans an angle given by
    +   * \p spanAngle. These angles are expressed in degrees, and are
    +   * measured counter-clockwise starting from the 3 o'clock position.
    +   *
    +   * \sa arcMoveTo(double cx, double cy, double radius, double startAngle, double sweepLength)
    +   *
    +   */
    +  void arcTo(double x, double y, double width, double height,
    +	     double startAngle, double sweepLength);
    +
    +  friend class WSvgImage;
    +};
    +
    +}
    +
    +#endif // WPAINTERPATH_H_
    diff --git a/wt-3.1.7a/src/Wt/WPainterPath.C b/wt-3.1.7a/src/Wt/WPainterPath.C
    new file mode 100644
    index 0000000..2c28b9e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPainterPath.C
    @@ -0,0 +1,364 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <limits>
    +
    +#include <cmath>
    +#include <cassert>
    +
    +#include "Wt/WPainterPath"
    +
    +#include "Utils.h"
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
    +namespace {
    +  double degreesToRadians(double r) {
    +    return (r / 180.) * M_PI;
    +  }
    +}
    +
    +namespace Wt {
    +
    +WPainterPath::Segment::Segment(double x, double y, Type type)
    +  : x_(x), y_(y), type_(type)
    +{ }
    +
    +bool WPainterPath::Segment::operator== (const Segment& other) const
    +{
    +  return type_ == other.type_
    +    && x_ == other.x_
    +    && y_ == other.y_;
    +}
    +
    +bool WPainterPath::Segment::operator!= (const Segment& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +WPainterPath::WPainterPath()
    +  : isRect_(false)
    +{ }
    +
    +WPainterPath::WPainterPath(const WPointF& startPoint)
    +  : isRect_(false)
    +{
    +  moveTo(startPoint);
    +}
    +
    +WPainterPath::WPainterPath(const WPainterPath& path)
    +  : isRect_(path.isRect_),
    +    segments_(path.segments_)
    +{ }
    +
    +WPainterPath& WPainterPath::operator= (const WPainterPath& path)
    +{
    +  segments_ = path.segments_;
    +  isRect_ = path.isRect_;
    +
    +  return *this;
    +}
    +
    +WPointF WPainterPath::getArcPosition(double cx, double cy,
    +				     double rx, double ry,
    +				     double angle)
    +{
    +  /*
    +   * angles are counter-clockwise, which means against the logic of
    +   * the downward X-Y system
    +   */
    +  double a = -degreesToRadians(angle);
    +
    +  return WPointF(cx + rx * std::cos(a), cy + ry * std::sin(a));
    +}
    +
    +WPointF WPainterPath::beginPosition() const
    +{
    +  WPointF result(0, 0);
    +
    +  for (unsigned int i = 0;
    +       i < segments_.size() && segments_[i].type() == Segment::MoveTo;
    +       ++i)
    +    result = WPointF(segments_[i].x(), segments_[i].y());
    +
    +  return result;
    +}
    +
    +WPointF WPainterPath::currentPosition() const
    +{
    +  return positionAtSegment(segments_.size());
    +}
    +
    +WPointF WPainterPath::positionAtSegment(int index) const
    +{
    +  if (index > 0) {
    +    const Segment& s = segments_[index - 1];
    +    switch (s.type()) {
    +    case Segment::MoveTo:
    +    case Segment::LineTo:
    +    case Segment::CubicEnd:
    +    case Segment::QuadEnd:
    +      return WPointF(s.x(), s.y());
    +    case Segment::ArcAngleSweep: {
    +      int i = segments_.size() - 3;
    +      double cx = segments_[i].x();
    +      double cy = segments_[i].y();
    +      double rx = segments_[i+1].x();
    +      double ry = segments_[i+1].y();
    +      double theta1 = segments_[i+2].x();
    +      double deltaTheta = segments_[i+2].y();
    +
    +      return getArcPosition(cx, cy, rx, ry, theta1 + deltaTheta);
    +    }
    +    default:
    +      assert(false);
    +    }
    +  }
    +
    +  return WPointF(0, 0);
    +}
    +
    +WPointF WPainterPath::getSubPathStart() const
    +{
    +  /*
    +   * Find start point of last sub path, which is the point of the last
    +   * moveTo operation, or either (0, 0).
    +   */
    +  for (int i = segments_.size() - 1; i >= 0; --i)
    +    if (segments_[i].type() == Segment::MoveTo)
    +      return WPointF(segments_[i].x(), segments_[i].y());
    +
    +  return WPointF(0, 0);
    +}
    +
    +void WPainterPath::closeSubPath()
    +{
    +  moveTo(0, 0);
    +}
    +
    +bool WPainterPath::isEmpty() const
    +{
    +  for (unsigned i = 0; i < segments_.size(); ++i)
    +    if (segments_[i].type() != Segment::MoveTo)
    +      return false;
    +
    +  return true;
    +}
    +
    +bool WPainterPath::operator==(const WPainterPath& path) const
    +{
    +  if (segments_.size() != path.segments_.size())
    +    return false;
    +
    +  for (unsigned i = 0; i < segments_.size(); ++i)
    +    if (segments_[i] != path.segments_[i])
    +      return false;
    +
    +  return true;
    +}
    +
    +bool WPainterPath::operator!=(const WPainterPath& path) const
    +{
    +  return !(*this == path);
    +}
    +
    +void WPainterPath::moveTo(const WPointF& point)
    +{
    +  moveTo(point.x(), point.y());
    +}
    +
    +void WPainterPath::moveTo(double x, double y)
    +{
    +  /*
    +   * first close previous sub path
    +   */
    +  if (!segments_.empty() && segments_.back().type() != Segment::MoveTo) {
    +    WPointF startP = getSubPathStart();
    +    WPointF currentP = currentPosition();
    +
    +    if (startP != currentP)
    +      lineTo(startP.x(), startP.y());
    +  }
    +
    +  segments_.push_back(Segment(x, y, Segment::MoveTo));  
    +}
    +
    +void WPainterPath::lineTo(const WPointF& point)
    +{
    +  lineTo(point.x(), point.y());
    +}
    +
    +void WPainterPath::lineTo(double x, double y)
    +{
    +  segments_.push_back(Segment(x, y, Segment::LineTo));
    +}
    +
    +void WPainterPath::cubicTo(const WPointF& c1, const WPointF& c2,
    +			   const WPointF& endPoint)
    +{
    +  cubicTo(c1.x(), c1.y(), c2.x(), c2.y(), endPoint.x(), endPoint.y());
    +}
    +
    +void WPainterPath::cubicTo(double c1x, double c1y, double c2x, double c2y,
    +			   double endPointx, double endPointy)
    +{
    +  segments_.push_back(Segment(c1x, c1y, Segment::CubicC1));
    +  segments_.push_back(Segment(c2x, c2y, Segment::CubicC2));
    +  segments_.push_back(Segment(endPointx, endPointy, Segment::CubicEnd));
    +}
    +
    +void WPainterPath::arcTo(double cx, double cy, double radius,
    +			 double startAngle, double sweepLength)
    +{
    +  arcTo(cx - radius, cy - radius, radius * 2, radius * 2,
    +	startAngle, sweepLength);
    +}
    +
    +void WPainterPath::arcTo(double x, double y, double width, double height,
    +			 double startAngle, double sweepLength)
    +{
    +  segments_.push_back(Segment(x + width/2, y + height/2, Segment::ArcC));
    +  segments_.push_back(Segment(width/2, height/2, Segment::ArcR));
    +  segments_.push_back(Segment(startAngle, sweepLength, Segment::ArcAngleSweep));
    +}
    +
    +void WPainterPath::arcMoveTo(double cx, double cy, double radius, double angle)
    +{
    +  moveTo(getArcPosition(cx, cy, radius, radius, angle));
    +}
    +
    +void WPainterPath::arcMoveTo(double x, double y, double width, double height,
    +			     double angle)
    +{
    +  moveTo(getArcPosition(x + width/2, y + height/2, width/2, height/2, angle));
    +}
    +
    +void WPainterPath::quadTo(double cx, double cy,
    +			  double endPointX, double endPointY)
    +{
    +  segments_.push_back(Segment(cx, cy, Segment::QuadC));
    +  segments_.push_back(Segment(endPointX, endPointY, Segment::QuadEnd));
    +}
    +
    +void WPainterPath::quadTo(const WPointF& c, const WPointF& endPoint)
    +{
    +  quadTo(c.x(), c.y(), endPoint.x(), endPoint.y());
    +}
    +
    +void WPainterPath::addEllipse(double x, double y, double width, double height)
    +{
    +  moveTo(x + width, y + height/2);
    +  arcTo(x, y, width, height, 0, 360);
    +}
    +
    +void WPainterPath::addEllipse(const WRectF& rect)
    +{
    +  addEllipse(rect.x(), rect.y(), rect.width(), rect.height());
    +}
    +
    +void WPainterPath::addRect(double x, double y, double width, double height)
    +{
    +  if (isEmpty())
    +    isRect_ = true;
    +
    +  moveTo(x, y);
    +  lineTo(x + width, y);
    +  lineTo(x + width, y + height);
    +  lineTo(x, y + height);
    +  lineTo(x, y);
    +}
    +
    +void WPainterPath::addRect(const WRectF& rectangle)
    +{
    +  addRect(rectangle.x(), rectangle.y(), rectangle.width(), rectangle.height());
    +}
    +
    +void WPainterPath::addPath(const WPainterPath& path)
    +{
    +  if (currentPosition() != path.beginPosition())
    +    moveTo(path.beginPosition());
    +
    +  Utils::insert(segments_, path.segments_);
    +}
    +
    +void WPainterPath::connectPath(const WPainterPath& path)
    +{
    +  if (currentPosition() != path.beginPosition())
    +    lineTo(path.beginPosition());
    +
    +  addPath(path);
    +}
    +
    +bool WPainterPath::asRect(WRectF& result) const
    +{
    +  if (isRect_) {
    +    if (segments_.size() == 4) {
    +      result = WRectF(0, 0, segments_[0].x(), segments_[1].y());
    +      return true;
    +    } else if (segments_.size() == 5
    +	       && segments_[0].type() == Segment::MoveTo) {
    +      result = WRectF(segments_[0].x(), segments_[0].y(),
    +		      segments_[1].x() - segments_[0].x(),
    +		      segments_[2].y() - segments_[0].y());
    +      return true;
    +    } else
    +      return false;
    +  } else
    +    return false;
    +}
    +
    +WRectF WPainterPath::controlPointRect() const
    +{
    +  if (isEmpty())
    +    return WRectF();
    +  else {
    +    double minX, minY, maxX, maxY;
    +    minX = minY = std::numeric_limits<double>::max();
    +    maxX = maxY = std::numeric_limits<double>::min();
    +
    +    for (unsigned i = 0; i < segments_.size(); ++i) {
    +      const Segment& s = segments_[i];
    +
    +      switch (s.type()) {
    +      case Segment::MoveTo:
    +      case Segment::LineTo:
    +      case Segment::CubicC1:
    +      case Segment::CubicC2:
    +      case Segment::CubicEnd:
    +      case Segment::QuadC:
    +      case Segment::QuadEnd: {
    +	minX = std::min(s.x(), minX);
    +	minY = std::min(s.y(), minY);
    +	maxX = std::max(s.x(), maxX);
    +	maxY = std::max(s.y(), maxY);
    +	break;
    +      }
    +      case Segment::ArcC: {
    +	const Segment& s2 = segments_[i+1];
    +
    +	WPointF tl(s.x() - s2.x(), s.y() - s2.y());
    +	minX = std::min(tl.x(), minX);
    +	minY = std::min(tl.y(), minY);
    +
    +	WPointF br(s.x() + s2.x(), s.y() + s2.y());
    +	maxX = std::max(br.x(), maxX);
    +	maxY = std::max(br.y(), maxY);
    +
    +	i += 2;
    +	break;
    +      }
    +      default:
    +	assert(false);
    +      }
    +    }
    +
    +    return WRectF(minX, minY, maxX - minX, maxY - minY);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPanel b/wt-3.1.7a/src/Wt/WPanel
    new file mode 100644
    index 0000000..7cb6539
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPanel
    @@ -0,0 +1,233 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPANEL_H_
    +#define WPANEL_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +  class WContainerWidget;
    +  class WIconPair;
    +  class WTemplate;
    +  class WText;
    +
    +/*! \class WPanel Wt/WPanel Wt/WPanel
    + *  \brief A %WPanel provides a container with a title bar.
    + *
    + * The panel provides a container with an optional title bar, and an
    + * optional collapse icon.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WPanel *panel = new Wt::WPanel();
    + * panel->setTitle("A panel");
    + * panel->setCentralWidget(new Wt::WText("This is the panel contents"));
    + * panel->setCollapsible(true);
    + * \endcode
    + * \endif
    + *
    + * \image html WPanel-default-1.png "Two panels: one collapsed and one expanded (default theme)"
    + * \image html WPanel-polished-1.png "Two panels: one collapsed and one expanded (polished theme)"
    + *
    + * \if cpp
    + * \note This widget is in development. It will provide features similar to the
    + *       Ext::Panel.
    + *
    + * \sa Ext::Panel
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * A panel has the <tt>Wt-panel</tt> and <tt>Wt-outset</tt> style
    + * classes. The look can be overridden using the following style class
    + * selectors:
    + *
    + * \verbatim
    + .Wt-panel .titlebar : The title bar
    + .Wt-panel .body     : The body (requires vertical padding 4px).
    +\endverbatim
    + *
    + */
    +class WT_API WPanel : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a panel.
    +   */
    +  WPanel(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets a title.
    +   *
    +   * The panel title is set in the title bar. This method also makes
    +   * the title bar visible by calling setTitleBar(true).
    +   *
    +   * The default value is "" (no title).
    +   *
    +   * \sa title(), setTitleBar(bool)
    +   */
    +  void setTitle(const WString& title);
    +
    +  /*! \brief Returns the title.
    +   *
    +   * \sa setTitle(const WString&)
    +   */
    +  WString title() const;
    +
    +  /*! \brief Shows or hides the title bar for the panel.
    +   *
    +   * The title bar appears at the top of the panel.
    +   *
    +   * The default value is \c false: the title bar is not shown unless a
    +   * title is set or the panel is made collapsible.
    +   *
    +   * \sa setTitle(const WString&), setCollapsible(bool)
    +   */
    +  void setTitleBar(bool enable);
    +
    +  /*! \brief Returns if a title bar is set.
    +   *
    +   * \sa setTitleBar(bool)
    +   */
    +  bool titleBar() const;
    +
    +  /*! \brief Returns the title bar widget.
    +   *
    +   * The title bar widget contains the collapse/expand icon (if the
    +   * panel isCollapsible()), and the title text (if a title was set
    +   * using setTitle()). You can access the title bar widget to customize
    +   * the contents of the title.
    +   *
    +   * The method returns \c 0 if titleBar() is \p false. You need to call
    +   * setTitleBar() first.
    +   *
    +   * \sa setTitleBar()
    +   */
    +  WContainerWidget *titleBarWidget() const;
    +
    +  /*! \brief Makes the panel collapsible.
    +   *
    +   * When \p on is \c true, a collapse/expand icon is added to the
    +   * title bar. This also calls setTitleBar(true) to enable the
    +   * title bar.
    +   *
    +   * The default value is \c false.
    +   *
    +   * \sa setTitleBar(bool), setCollapsed(bool), isCollapsed()
    +   */
    +  void setCollapsible(bool on);
    +
    +  /*! \brief Returns if the panel can be collapsed by the user.
    +   *
    +   * \sa setCollapsible(bool)
    +   */
    +  bool isCollapsible() const { return collapseIcon_ != 0; } 
    +
    +  /*! \brief Sets the panel expanded or collapsed.
    +   *
    +   * When \p on is \c true, equivalent to collapse(), otherwise to
    +   * expand().
    +   *
    +   * The default value is \c false.
    +   *
    +   * \sa setCollapsible(bool)
    +   */
    +  void setCollapsed(bool on);
    +
    +  /*! \brief Returns if the panel is collapsed.
    +   *
    +   * \sa setCollapsed(bool)
    +   * \sa collapsed(), expanded()
    +   */
    +  bool isCollapsed() const;
    +
    +  /*! \brief Collapses the panel.
    +   *
    +   * When isCollapsible() is true, the panel is collapsed to minimize
    +   * screen real-estate.
    +   *
    +   * \sa setCollapsible(bool), expand()
    +   */
    +  void collapse();
    +
    +  /*! \brief Collapses the panel.
    +   *
    +   * When isCollapsible() is true, the panel is expanded to its original
    +   * state.
    +   *
    +   * \sa setCollapsible(bool), expand()
    +   */
    +  void expand();
    +
    +  /*! \brief Sets the central widget.
    +   *
    +   * Sets the widget that is the contents of the panel. When a widget was
    +   * previously set, the old widget is deleted first.
    +   *
    +   * The default value is \c 0 (no widget set).
    +   */
    +  void setCentralWidget(WWidget *);
    +
    +  /*! \brief Returns the central widget.
    +   *
    +   * \sa setCentralWidget()
    +   */
    +  WWidget *centralWidget() const { return centralWidget_; }
    +
    +  /*! \brief %Signal emitted when the panel is collapsed.
    +   *
    +   * %Signal emitted when the panel is collapsed. The signal is only
    +   * emitted when the panel is collapsed by the user using the
    +   * collapse icon in the tible bar, not when calling
    +   * setCollapsed(bool).
    +   *
    +   * \sa expanded()
    +   */
    +  Signal<>& collapsed() { return collapsed_; }
    +
    +  /*! \brief %Signal emitted when the panel is expanded.
    +   *
    +   * %Signal emitted when the panel is expanded. The signal is only
    +   * emitted when the panel is expanded by the user using the expand
    +   * icon in the title bar, not when calling setCollapsed(bool).
    +   *
    +   * \sa collapsed()
    +   */
    +  Signal<>& expanded() { return expanded_; }
    +
    +  Signal<bool>& collapsedSS() { return collapsedSS_; }
    +  Signal<bool>& expandedSS() { return expandedSS_; }
    +
    +  WIconPair *collapseIcon() const { return collapseIcon_; }
    +
    +private:
    +  WIconPair        *collapseIcon_;
    +  WText 	   *title_;
    +
    +  WTemplate        *impl_;
    +  WWidget          *centralWidget_;
    +
    +  Signal<> collapsed_, expanded_;
    +  Signal<bool> collapsedSS_, expandedSS_;
    +
    +  bool wasCollapsed_;
    +
    +  void setJsSize();
    +  void doExpand();
    +  void doCollapse();
    +  void undoExpand();
    +  void undoCollapse();
    +
    +  virtual void onExpand();
    +  virtual void onCollapse();
    +
    +  WContainerWidget *centralArea() const;
    +};
    +
    +}
    +
    +#endif // WPANEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WPanel.C b/wt-3.1.7a/src/Wt/WPanel.C
    new file mode 100644
    index 0000000..d0ae282
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPanel.C
    @@ -0,0 +1,224 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include <Wt/WApplication>
    +#include <Wt/WContainerWidget>
    +#include <Wt/WIconPair>
    +#include <Wt/WPanel>
    +#include <Wt/WTemplate>
    +#include <Wt/WText>
    +
    +namespace Wt {
    +
    +WPanel::WPanel(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    collapseIcon_(0),
    +    title_(0),
    +    centralWidget_(0),
    +    collapsed_(this),
    +    expanded_(this),
    +    collapsedSS_(this),
    +    expandedSS_(this)
    +{
    +  const char *TEMPLATE =
    +    "${shadow-x1-x2}"
    +    "${titlebar}"
    +    "${contents}";
    +
    +  setImplementation(impl_ = new WTemplate(WString::fromUTF8(TEMPLATE)));
    +  impl_->setStyleClass("Wt-panel Wt-outset");
    +
    +  implementStateless(&WPanel::doExpand, &WPanel::undoExpand);
    +  implementStateless(&WPanel::doCollapse, &WPanel::undoCollapse);
    +
    +  WContainerWidget *centralArea = new WContainerWidget();
    +  centralArea->setStyleClass("body");
    +
    +  impl_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2);
    +  impl_->bindWidget("titlebar", 0);
    +  impl_->bindWidget("contents", centralArea);
    +
    +  setJavaScriptMember
    +    (WT_RESIZE_JS,
    +     "function(self, w, h) {"
    +     """self.style.height= h + 'px';"
    +     """var c = self.lastChild;"
    +     """var t = c.previousSibling;"
    +     """if (t.className == 'titlebar')"
    +     ""  "h -= t.offsetHeight;"
    +     """h -= 8;"
    +     """if (h > 0) {"
    +     ""  "c.style.height = h + 'px';"
    +     // this seems golden, but, JQuery docs say it doesn't work when
    +     // the panel is indirectly hidden: will this back-fire ?
    +     ""  "$(c).children().each(function() { "
    +     ""      "var self = $(this), "
    +     ""          "padding = self.outerHeight() - self.height();"
    +     ""      "self.height(h - padding);"
    +     ""  "});"
    +     """}"
    +     "};");
    +}
    +
    +void WPanel::setTitle(const WString& title)
    +{
    +  setTitleBar(true);
    +  if (!title_) {
    +    title_ = new WText();
    +    titleBarWidget()->insertWidget(titleBarWidget()->count() - 1, title_);
    +  }
    +
    +  title_->setText(title);
    +}
    +
    +WString WPanel::title() const
    +{
    +  if (title_)
    +    return title_->text();
    +  else
    +    return WString();
    +}
    +
    +bool WPanel::titleBar() const
    +{
    +  return titleBarWidget() != 0;
    +}
    +
    +WContainerWidget *WPanel::titleBarWidget() const
    +{
    +  return dynamic_cast<WContainerWidget *>(impl_->resolveWidget("titlebar"));
    +}
    +
    +void WPanel::setTitleBar(bool enable)
    +{
    +  if (enable && !titleBarWidget()) {
    +    WContainerWidget *titleBar = new WContainerWidget();
    +    impl_->bindWidget("titlebar", titleBar);
    +    titleBar->setStyleClass("titlebar");
    +
    +    WBreak *br;
    +    titleBar->addWidget(br = new WBreak());
    +    br->setClearSides(Horizontals);
    +  } else if (!enable && titleBar()) {
    +    impl_->bindWidget("titlebar", 0);
    +    title_ = 0;
    +    collapseIcon_ = 0;
    +  }
    +}
    +
    +void WPanel::setCollapsible(bool on)
    +{
    +  if (on && !collapseIcon_) {
    +    std::string resources = WApplication::resourcesUrl();
    +
    +    setTitleBar(true);
    +    collapseIcon_ = new WIconPair(resources + "collapse.gif",
    +				  resources + "expand.gif");
    +    collapseIcon_->setInline(false);
    +    collapseIcon_->setFloatSide(Left);
    +    titleBarWidget()->insertWidget(0, collapseIcon_);
    +
    +    collapseIcon_->icon1Clicked().connect(this, &WPanel::doCollapse);
    +    collapseIcon_->icon1Clicked().connect(this, &WPanel::onCollapse);
    +    collapseIcon_->icon2Clicked().connect(this, &WPanel::doExpand);
    +    collapseIcon_->icon2Clicked().connect(this, &WPanel::onExpand);
    +    collapseIcon_->setState(0);
    +  } else if (!on && collapseIcon_) {
    +    delete collapseIcon_;
    +    collapseIcon_ = 0;
    +  }
    +}
    +
    +void WPanel::setCollapsed(bool on)
    +{
    +  if (on)
    +    collapse();
    +  else
    +    expand();
    +}
    +
    +bool WPanel::isCollapsed() const
    +{
    +  return isCollapsible() && collapseIcon_->state() == 1;
    +}
    +
    +void WPanel::collapse()
    +{
    +  if (isCollapsible()) {
    +    collapseIcon_->showIcon2();
    +
    +    doCollapse();
    +  }
    +}
    +
    +void WPanel::expand()
    +{
    +  if (isCollapsible()) {
    +    collapseIcon_->showIcon1();
    +
    +    doExpand();
    +  }
    +}
    +
    +void WPanel::doCollapse()
    +{
    +  wasCollapsed_ = isCollapsed();
    +  centralArea()->hide();
    +
    +  collapsedSS_.emit(true);
    +}
    +
    +void WPanel::doExpand()
    +{
    +  wasCollapsed_ = isCollapsed();
    +  centralArea()->show();
    +
    +  expandedSS_.emit(true);
    +}
    +
    +void WPanel::undoCollapse()
    +{
    +  if (!wasCollapsed_)
    +    expand();
    +
    +  collapsedSS_.emit(false);
    +}
    +
    +void WPanel::undoExpand()
    +{
    +  if (wasCollapsed_)
    +    collapse();
    +
    +  expandedSS_.emit(false);
    +}
    +
    +void WPanel::onCollapse()
    +{
    +  collapsed_.emit();
    +}
    +
    +void WPanel::onExpand()
    +{
    +  expanded_.emit();
    +}
    +
    +void WPanel::setCentralWidget(WWidget * w)
    +{
    +  delete centralWidget_;
    +  centralWidget_ = w;
    +
    +  if (w)
    +    centralArea()->addWidget(w);
    +}
    +
    +WContainerWidget *WPanel::centralArea() const
    +{
    +  return dynamic_cast<WContainerWidget *>(impl_->resolveWidget("contents"));
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPdfImage b/wt-3.1.7a/src/Wt/WPdfImage
    new file mode 100644
    index 0000000..220adee
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPdfImage
    @@ -0,0 +1,137 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPDF_IMAGE_H_
    +#define WPDF_IMAGE_H_
    +
    +#include <Wt/WPaintDevice>
    +#include <Wt/WResource>
    +
    +/*
    + * Forwards for libharu types
    + */
    +struct _HPDF_Dict_Rec;
    +struct _HPDF_Doc_Rec;
    +typedef _HPDF_Dict_Rec *HPDF_Page;
    +typedef _HPDF_Doc_Rec *HPDF_Doc;
    +typedef float HPDF_REAL;
    +typedef long unsigned HPDF_STATUS;
    +
    +namespace Wt {
    +
    +  class WTransform;
    +
    +/*! \class WPdfImage Wt/WPdfImage Wt/WPdfImage
    + *  \brief A paint device for rendering to a PDF.
    + *
    + * A %WPdfImage paint device should be used in conjunction with a
    + * WPainter, and can be used to make a PDF version of a
    + * WPaintedWidget's contents.
    + *
    + * The PDF is generated using <a href="http://libharu.org/">The Haru
    + * Free PDF Library</a>, and this class is included in the library
    + * only if <tt>libharu</tt> was found during the build of the library.
    + *
    + * You can use the image as a resource and specialize handleRequest()
    + * to paint the contents on the fly. Alternatively can also use
    + * write() to serialize to a PDF file (std::ostream).
    + *
    + * The latter usage is illustrated by the code below:
    + * \code
    + * Wt::Chart::WCartesianChart *chart = ...
    + *
    + * Wt::WPdfImage pdfImage(Wt::WLength(4, Wt::WLength::Centimeter), Wt::WLength(3, Wt::WLength::Centimeter));
    + * {
    + *   Wt::WPainter p(&pdfImage);
    + *   chart->paint(p);
    + * }
    + * std::ofstream f("chart.pdf");
    + * pdfImage.write(f);
    + * \endcode
    + *
    + * A constructor is provided which allows the generated PDF image to
    + * be embedded directly into a page of a larger <tt>libharu</tt>
    + * document.
    + *
    + * This paint device has the following limitations:
    + * - images (WPainter::drawImage()) can only be included from local
    + * files, and is restricted to JPG and PNG images.
    + * - drop shadows are not supported.
    + *
    + * \ingroup painting
    + */
    +class WT_API WPdfImage : public WResource, public WPaintDevice
    +{
    +public:
    +  /*! \brief Create a PDF resource that represents a single-page PDF document.
    +   *
    +   * The single page will have a size \p width x \p height.  The PDF
    +   * will be using the same DPI (72dpi) as is conventionally used for
    +   * the web. Thus, you can use both physical units for width and
    +   * height (such as 4 cm by 3 cm), as well as pixel units.
    +   *
    +   * \sa write()
    +   */
    +  WPdfImage(const WLength& width, const WLength& height, WObject *parent = 0);
    +
    +  /*! \brief Create a PDF paint device to paint inside an existing page.
    +   *
    +   * The image will be drawn in the existing page, as an image with lower-left
    +   * point (\p x, \p y) and size (\p width x \p height).
    +   */
    +  WPdfImage(HPDF_Doc pdf, HPDF_Page page,
    +	    HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height,
    +	    WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WPdfImage();
    +
    +  virtual void setChanged(WFlags<ChangeFlag> flags);
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle);
    +  virtual void drawImage(const WRectF& rect, const std::string& imgUri,
    +			 int imgWidth, int imgHeight, const WRectF& sourceRect);
    +  virtual void drawLine(double x1, double y1, double x2, double y2);
    +  virtual void drawPath(const WPainterPath& path);
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text);
    +  virtual void init();
    +  virtual void done();
    +  virtual bool paintActive() const { return painter_ != 0; }
    +
    +  virtual WLength width() const { return width_; }
    +  virtual WLength height() const { return height_; }
    +
    +  void errorHandler(HPDF_STATUS error_no, HPDF_STATUS detail_no);
    +  
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +
    +protected:
    +  virtual WPainter *painter() const { return painter_; }
    +  virtual void setPainter(WPainter *painter) { painter_ = painter; }
    +  virtual void clear();
    +
    +private:
    +  WLength width_, height_;
    +  WPainter *painter_;
    +
    +  HPDF_Doc pdf_;
    +  HPDF_Page page_;
    +
    +  bool myPdf_;
    +  double x_, y_;
    +
    +  double fontSize_;
    +
    +  void paintPath();
    +  void drawPlainPath(const WPainterPath& path);
    +  void applyTransform(const WTransform& f);
    +};
    +
    +}
    +
    +#endif // WPDF_IMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WPdfImage.C b/wt-3.1.7a/src/Wt/WPdfImage.C
    new file mode 100644
    index 0000000..24a0684
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPdfImage.C
    @@ -0,0 +1,565 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WBrush"
    +#include "Wt/WPainter"
    +#include "Wt/WPen"
    +#include "Wt/WPdfImage"
    +#include "Wt/WTransform"
    +#include "Wt/Http/Response"
    +
    +#include "web/WtException.h"
    +
    +#include <stdio.h>
    +#include "hpdf.h"
    +#ifdef WIN32
    +// Disable warnings about conversions from double to real (data loss)
    +#pragma warning(disable: 4244)
    +#define snprintf _snprintf
    +#endif
    +
    +namespace {
    +  std::string toUpper(const std::string& s) {
    +    std::string result = s;
    +    std::transform(result.begin(), result.end(), result.begin(), toupper);
    +    return result;
    +  }
    +
    +  void error_handler(HPDF_STATUS   error_no,
    +		     HPDF_STATUS   detail_no,
    +		     void         *user_data) {
    +    Wt::WPdfImage *image = (Wt::WPdfImage *)user_data;
    +
    +    image->errorHandler(error_no, detail_no);
    +  }
    +}
    +
    +namespace Wt {
    +
    +WPdfImage::WPdfImage(const WLength& width, const WLength& height,
    +		     WObject *parent)
    +  : WResource(parent),
    +    width_(width),
    +    height_(height),
    +    painter_(0)
    +{
    +  myPdf_ = true;
    +
    +  pdf_ = HPDF_New(error_handler, this);
    +  if (!pdf_)
    +    throw WtException("Could not create PDF object.");
    +
    +  HPDF_SetCompressionMode(pdf_, HPDF_COMP_ALL);
    +
    +  page_ = HPDF_AddPage(pdf_);
    +
    +  x_ = y_ = 0;
    +
    +  HPDF_Page_SetWidth(page_, width_.toPixels());
    +  HPDF_Page_SetHeight(page_, height_.toPixels());
    +
    +  HPDF_Page_GSave(page_);
    +}
    +
    +WPdfImage::WPdfImage(HPDF_Doc pdf, HPDF_Page page, HPDF_REAL x, HPDF_REAL y,
    +		     HPDF_REAL width, HPDF_REAL height, WObject *parent)
    +  : WResource(parent),
    +    width_(width, WLength::Pixel),
    +    height_(height, WLength::Pixel),
    +    painter_(0),
    +    pdf_(pdf),
    +    page_(page),
    +    x_(x),
    +    y_(y)
    +{
    +  myPdf_ = false;
    +}
    +
    +WPdfImage::~WPdfImage()
    +{
    +  beingDeleted();
    +
    +  if (myPdf_)
    +    HPDF_Free(pdf_);
    +}
    +
    +void WPdfImage::clear()
    +{
    +  // FIXME
    +}
    +
    +void WPdfImage::init()
    +{
    +  HPDF_Page_GSave(page_); // for Wt -> HPDF
    +
    +  HPDF_Page_Concat(page_, 1, 0, 0, -1, 0, height_.toPixels());
    +  HPDF_Page_Concat(page_, 1, 0, 0, 1, x_, y_);
    +
    +  HPDF_Page_GSave(page_); // for painter->combinedTransform()
    +}
    +
    +void WPdfImage::done()
    +{
    +  HPDF_Page_GRestore(page_); // for painter->combinedTransform()
    +  HPDF_Page_GRestore(page_); // for Wt -> HPDF
    +}
    +
    +void WPdfImage::applyTransform(const WTransform& t)
    +{
    +  HPDF_Page_Concat(page_, t.m11(), t.m12(), t.m21(),
    +		   t.m22(), t.dx(), t.dy());
    +}
    +
    +void WPdfImage::setChanged(WFlags<ChangeFlag> flags)
    +{
    +  if (flags & (Transform | Clipping)) {
    +    HPDF_Page_GRestore(page_);
    +    HPDF_Page_GSave(page_);
    +
    +    if (painter()->hasClipping()) {
    +      const WTransform& t = painter()->clipPathTransform();
    +
    +      applyTransform(t);
    +
    +      drawPlainPath(painter()->clipPath());
    +      HPDF_Page_Clip(page_);
    +      HPDF_Page_EndPath(page_);
    +
    +      applyTransform(t.inverted());
    +    }
    +
    +    applyTransform(painter()->combinedTransform());
    +
    +    flags = Pen | Brush | Font;
    +  }
    +
    +  if (flags & Pen) {
    +    const WPen& pen = painter()->pen();
    +
    +    if (pen.style() != NoPen) {
    +      const WColor& color = pen.color();
    +
    +      HPDF_Page_SetRGBStroke(page_,
    +			     color.red() / 255.,
    +			     color.green() / 255.,
    +			     color.blue() / 255.);
    +
    +      WLength w = painter()->normalizedPenWidth(pen.width(), false);
    +      HPDF_Page_SetLineWidth(page_, w.toPixels());
    +
    +      switch (pen.capStyle()) {
    +      case FlatCap:
    +	HPDF_Page_SetLineCap(page_, HPDF_BUTT_END);
    +	break;
    +      case SquareCap:
    +	HPDF_Page_SetLineCap(page_, HPDF_PROJECTING_SCUARE_END); // scuary !
    +	break;
    +      case RoundCap:
    +	HPDF_Page_SetLineCap(page_, HPDF_ROUND_END);
    +	break;
    +      }
    +
    +      switch (pen.joinStyle()) {
    +      case MiterJoin:
    +	HPDF_Page_SetLineJoin(page_, HPDF_MITER_JOIN);
    +	break;
    +      case BevelJoin:
    +	HPDF_Page_SetLineJoin(page_, HPDF_BEVEL_JOIN);
    +	break;
    +      case RoundJoin:
    +	HPDF_Page_SetLineJoin(page_, HPDF_ROUND_JOIN);
    +	break;
    +      }
    +
    +      switch (pen.style()) {
    +      case NoPen:
    +	break;
    +      case SolidLine:
    +	HPDF_Page_SetDash(page_, 0, 0, 0);
    +	break;
    +      case DashLine: {
    +	const HPDF_UINT16 dash_ptn[] = { 4, 2 };
    +	HPDF_Page_SetDash(page_, dash_ptn, 2, 0);
    +	break;
    +      }
    +      case DotLine: {
    +	const HPDF_UINT16 dash_ptn[] = { 1, 2 };
    +	HPDF_Page_SetDash(page_, dash_ptn, 2, 0);
    +	break;
    +      }
    +      case DashDotLine: {
    +	const HPDF_UINT16 dash_ptn[] = { 4, 2, 1, 2 };
    +	HPDF_Page_SetDash(page_, dash_ptn, 4, 0);
    +	break;
    +      }
    +      case DashDotDotLine: {
    +	const HPDF_UINT16 dash_ptn[] = { 4, 2, 1, 2, 1, 2 };
    +	HPDF_Page_SetDash(page_, dash_ptn, 6, 0);
    +	break;
    +      }
    +      }
    +    }
    +  }
    +
    +  if (flags & Brush) {
    +    const WBrush& brush = painter()->brush();
    +
    +    if (brush.style() != NoBrush) {
    +      const WColor& color = painter()->brush().color();
    +
    +      HPDF_Page_SetRGBFill(page_,
    +			   color.red() / 255.,
    +			   color.green() / 255.,
    +			   color.blue() / 255.);
    +    }
    +  }
    +
    +  if (flags & Font) {
    +    const WFont& font = painter()->font();
    +
    +    const char *base;
    +    const char *italic = 0;
    +    const char *bold = 0;
    +
    +    switch (font.genericFamily()) {
    +    case WFont::Default:
    +    case WFont::Serif:
    +      base = "Times";
    +      italic = "Italic";
    +      bold = "Bold";
    +      break;
    +    case WFont::SansSerif:
    +      base = "Helvetica";
    +      italic = "Olbique";
    +      bold = "Bold";
    +      break;
    +    case WFont::Monospace:
    +      base = "Courier";
    +      italic = "Oblique";
    +      bold = "Bold";
    +      break;
    +    case WFont::Fantasy: // Not really !
    +      base = "Symbol";
    +      break;
    +    case WFont::Cursive: // Not really !
    +      base = "ZapfDingbats";
    +    }
    +
    +    if (italic)
    +      switch (font.style()) {
    +      case WFont::NormalStyle:
    +	italic = 0;
    +	break;
    +      default:
    +	break;
    +      }
    +
    +    if (bold)
    +      switch (font.weight()) {
    +      case WFont::NormalWeight:
    +	bold = 0;
    +	break;
    +      case WFont::Bold:
    +      case WFont::Bolder:
    +	break;
    +      default:
    +	bold = 0;
    +      }
    +
    +    std::string name = base;
    +    if (bold) {
    +      name += std::string("-") + bold;
    +      if (italic)
    +	name += italic;
    +    } else if (italic)
    +      name += std::string("-") + italic;
    +
    +    if (name == "Times")
    +      name = "Times-Roman";
    +
    +    HPDF_Font f = HPDF_GetFont(pdf_, name.c_str(), 0);
    +
    +    switch (font.size()) {
    +    case WFont::FixedSize:
    +      fontSize_ = font.fixedSize().toPixels();
    +      break;
    +    default:
    +      fontSize_ = 12;
    +    }
    +
    +    HPDF_Page_SetFontAndSize(page_, f, fontSize_);
    +  }
    +}
    +
    +void WPdfImage::drawArc(const WRectF& rect, double startAngle, double spanAngle)
    +{
    +  HPDF_Page_GSave(page_);
    +
    +  HPDF_Page_Concat(page_, 1, 0, 0, rect.height() / rect.width(),
    +		   rect.center().x(), rect.center().y());
    +
    +  double start = startAngle;
    +  double end = start + spanAngle;
    +
    +  if (end < start)
    +    std::swap(start, end);
    +
    +  HPDF_Page_Arc(page_, 0, 0, rect.width()/1, start + 90, end + 90);
    +
    +  paintPath();
    +
    +  HPDF_Page_GRestore(page_);
    +}
    +
    +void WPdfImage::paintPath()
    +{
    +  if (painter()->pen().style() != NoPen)
    +    if (painter()->brush().style() != NoBrush)
    +      HPDF_Page_FillStroke(page_);
    +    else
    +      HPDF_Page_Stroke(page_);
    +  else
    +    if (painter()->brush().style() != NoBrush)
    +      HPDF_Page_Fill(page_);
    +    else
    +      HPDF_Page_EndPath(page_);
    +}
    +
    +void WPdfImage::drawImage(const WRectF& rect, const std::string& imgUri,
    +			  int imgWidth, int imgHeight,
    +			  const WRectF& srect)
    +{
    +  HPDF_Image img = 0;
    +
    +  if (imgUri.length() >= 4) {
    +    if (toUpper(imgUri.substr(imgUri.length() - 4)) == ".PNG")
    +      img = HPDF_LoadPngImageFromFile2(pdf_, imgUri.c_str());
    +    else if (toUpper(imgUri.substr(imgUri.length() - 4)) == ".JPG"
    +	     || (toUpper(imgUri.substr(imgUri.length() - 4)) == "JPEG"))
    +      img = HPDF_LoadJpegImageFromFile(pdf_, imgUri.c_str());
    +  }
    +
    +  if (!img)
    +    throw WtException("WPdfImage::drawImage(): cannot load image: " + imgUri);
    +
    +  double x = rect.x();
    +  double y = rect.y();
    +  double width = rect.width();
    +  double height = rect.height();
    +
    +  HPDF_Page_GSave(page_);
    +
    +  if (srect.x() != 0
    +      || srect.y() != 0
    +      || srect.width() != imgWidth
    +      || srect.height() != imgHeight) {
    +    double scaleX = width / imgWidth;
    +    double scaleY = height / imgHeight;
    +
    +    x -= srect.x() * scaleX;
    +    y -= srect.y() * scaleY;
    +    width *= scaleX;
    +    height *= scaleY;
    +
    +    HPDF_Page_Rectangle(page_, rect.x(), rect.y(), rect.width(), rect.height());
    +    HPDF_Page_Clip(page_);
    +  }
    +
    +  HPDF_Page_Concat(page_, 1, 0, 0, -1, x, y); // revert upside-down
    +
    +  HPDF_Page_DrawImage(page_, img, 0, 0, width, height);
    +
    +  HPDF_Page_GRestore(page_);
    +}
    +
    +void WPdfImage::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  if (painter()->pen().style() != NoPen) {
    +    HPDF_Page_MoveTo(page_, x1, y1);
    +    HPDF_Page_LineTo(page_, x2, y2);
    +
    +    HPDF_Page_Stroke(page_);
    +  }
    +}
    +
    +void WPdfImage::drawPath(const WPainterPath& path)
    +{
    +  drawPlainPath(path);
    +
    +  paintPath();
    +}
    +
    +void WPdfImage::drawPlainPath(const WPainterPath& path)
    +{
    +  const std::vector<WPainterPath::Segment>& segments = path.segments();
    +
    +  if (segments.size() > 0
    +      && segments[0].type() != WPainterPath::Segment::MoveTo)
    +    HPDF_Page_MoveTo(page_, 0, 0);
    +
    +  for (unsigned i = 0; i < segments.size(); ++i) {
    +    const WPainterPath::Segment s = segments[i];
    +
    +    switch (s.type()) {
    +    case WPainterPath::Segment::MoveTo:
    +      HPDF_Page_MoveTo(page_, s.x(), s.y());
    +      break;
    +    case WPainterPath::Segment::LineTo:
    +      HPDF_Page_LineTo(page_, s.x(), s.y());
    +      break;
    +    case WPainterPath::Segment::CubicC1: {
    +      const double x1 = s.x();
    +      const double y1 = s.y();
    +      const double x2 = segments[i+1].x();
    +      const double y2 = segments[i+1].y();
    +      const double x3 = segments[i+2].x();
    +      const double y3 = segments[i+2].y();
    +
    +      HPDF_Page_CurveTo(page_, x1, y1, x2, y2, x3, y3);
    +
    +      i += 2;
    +      break;
    +    }
    +    case WPainterPath::Segment::CubicC2:
    +    case WPainterPath::Segment::CubicEnd:
    +      assert(false);
    +    case WPainterPath::Segment::ArcC: {
    +      const double x = s.x();
    +      const double y = s.y();
    +      const double radius = segments[i+1].x();
    +      double ang1 = segments[i+2].x();
    +      double ang2 = ang1 + segments[i+2].y();
    +
    +      HPDF_Page_Arc(page_, x, y, radius, ang1 + 90, ang2 + 90);
    +
    +      i += 2;
    +      break;
    +    }
    +    case WPainterPath::Segment::ArcR:
    +    case WPainterPath::Segment::ArcAngleSweep:
    +      assert(false);
    +    case WPainterPath::Segment::QuadC: {
    +      const double x1 = s.x();
    +      const double y1 = s.y();
    +      const double x2 = segments[i+1].x();
    +      const double y2 = segments[i+1].y();
    +
    +      // or CurveTo3 ?? Are these any different ??
    +      HPDF_Page_CurveTo2(page_, x1, y1, x2, y2);
    +
    +      i += 1;
    +
    +      break;
    +    }
    +    case WPainterPath::Segment::QuadEnd:
    +      assert(false);
    +    }
    +  }
    +}
    +
    +void WPdfImage::drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			 const WString& text)
    +{
    +  // horizontal alignment: provided by TextRect, use very wide rect
    +  // vertical alignment: provided by shifting the rect up or down, as done
    +  // for WSvgImage
    +
    +  HPDF_REAL left, top, right, bottom;
    +  HPDF_TextAlignment alignment;
    +
    +  AlignmentFlag horizontalAlign = flags & AlignHorizontalMask;
    +  AlignmentFlag verticalAlign = flags & AlignVerticalMask;
    +
    +  switch (horizontalAlign) {
    +  case AlignLeft:
    +    left = rect.left();
    +    right = left + 1000;
    +    alignment = HPDF_TALIGN_LEFT;
    +    break;
    +  case AlignRight:
    +    right = rect.right();
    +    left = right - 1000;
    +    alignment = HPDF_TALIGN_RIGHT;
    +    break;
    +  case AlignCenter:
    +    {
    +      float center = rect.center().x();
    +      left = center - 500;
    +      right = center + 500;
    +      alignment = HPDF_TALIGN_CENTER;
    +      break;
    +    }
    +  default:
    +    break;
    +  }
    +
    +  switch (verticalAlign) {
    +  case AlignTop:
    +    top = rect.top(); break;
    +  case AlignMiddle:
    +    top = rect.center().y() - 0.60 * fontSize_; break;
    +  case AlignBottom:
    +    top = rect.bottom() - fontSize_; break;
    +  default:
    +    break;
    +  }
    +
    +  bottom = top + fontSize_;
    +
    +  HPDF_Page_GSave(page_);
    +
    +  // Undo the global inversion
    +  HPDF_Page_Concat(page_, 1, 0, 0, -1, 0, bottom);
    +
    +  HPDF_Page_BeginText(page_);
    +
    +  // Need to fill text using pen color
    +  const WColor& penColor = painter()->pen().color();
    +  HPDF_Page_SetRGBFill(page_,
    +		       penColor.red() / 255.,
    +		       penColor.green() / 255.,
    +		       penColor.blue() / 255.);
    +
    +  HPDF_Page_TextRect(page_, left, fontSize_, right, 0, text.narrow().c_str(),
    +		     alignment, 0);
    +  
    +  HPDF_Page_EndText(page_);
    +
    +  HPDF_Page_GRestore(page_);
    +}
    +
    +void WPdfImage::handleRequest(const Http::Request& request,
    +			      Http::Response& response)
    +{
    +  HPDF_SaveToStream(pdf_);
    +
    +  HPDF_ResetStream(pdf_);
    +
    +  response.setMimeType("application/pdf");
    +
    +  for (;;) {
    +    HPDF_BYTE buf[4096];
    +    HPDF_UINT32 siz = 4096;
    +    HPDF_ReadFromStream (pdf_, buf, &siz);
    + 
    +    if (siz == 0)
    +        break;
    +
    +    response.out().write((const char *)buf, siz);
    +  }
    +}
    +
    +void WPdfImage::errorHandler(HPDF_STATUS error_no,
    +			     HPDF_STATUS detail_no)
    +{
    +  char buf[200];
    +  snprintf(buf, 200, "WPdfImage error: error_no=%04X, detail_no=%d",
    +    (unsigned int) error_no, (int) detail_no);
    +
    +  throw WtException(buf);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPen b/wt-3.1.7a/src/Wt/WPen
    new file mode 100644
    index 0000000..2ad082f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPen
    @@ -0,0 +1,163 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPEN_H_
    +#define WPEN_H_
    +
    +#include <Wt/WLength>
    +#include <Wt/WColor>
    +
    +namespace Wt {
    +
    +/*! \class WPen Wt/WPen Wt/WPen
    + *  \brief Class that defines the style for pen strokes
    + *
    + * A pen defines the properties of how lines (that may surround
    + * shapes) are rendered.
    + *
    + * A pen with width 0 is a <i>cosmetic</i> pen, and is always rendered
    + * as 1 pixel width, regardless of transformations. Otherwized, the
    + * pen width is modified by the \link WPainter::worldTransform()
    + * transformation\endlink set on the painter.
    + *
    + * \sa WPainter::setPen(), WBrush
    + *
    + * \ingroup painting
    + */
    +class WT_API WPen
    +{
    +public:
    +  /*! \brief Creates a black cosmetic pen.
    +   *
    +   * Constructs a black solid pen of 0 width (i.e. cosmetic single
    +   * pixel width), with \link Wt::SquareCap SquareCap\endlink line
    +   * ends and \link Wt::BevelJoin BevelJoin\endlink line join style.
    +   */
    +  WPen();
    +
    +  /*! \brief Creates a black pen with a particular style.
    +   *
    +   * Constructs a black pen of 0 width (i.e. cosmetic single pixel
    +   * width), with \link Wt::SquareCap SquareCap\endlink line ends and
    +   * \link Wt::BevelJoin BevelJoin\endlink line join style.
    +   *
    +   * The line style is set to \p style.
    +   */
    +  WPen(PenStyle style);
    +
    +  /*! \brief Creates a solid pen of a particular color.
    +   *
    +   * Constructs a solid pen of 0 width (i.e. cosmetic single pixel
    +   * width), with \link Wt::SquareCap SquareCap\endlink line ends and
    +   * \link Wt::BevelJoin BevelJoin\endlink line join style.
    +   *
    +   * The pen color is set to \p color.
    +   */
    +  WPen(const WColor& color);
    +
    +  /*! \brief Creates a solid pen of a particular standard color.
    +   *
    +   * Constructs a solid pen of 0 width (i.e. cosmetic single pixel
    +   * width), with \link Wt::SquareCap SquareCap\endlink line ends and
    +   * \link Wt::BevelJoin BevelJoin\endlink line join style.
    +   *
    +   * The pen color is set to \p color.
    +   */
    +  WPen(GlobalColor color);
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Clone method.
    +   *
    +   * Clones this pen.
    +   */
    +  WPen clone() const;
    +#endif
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the pens are exactly the same.
    +   */
    +  bool operator==(const WPen& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the pens are different.
    +   */
    +  bool operator!=(const WPen& other) const;
    +
    +  /*! \brief Sets the pen style.
    +   *
    +   * \sa style()
    +   */
    +  void setStyle(PenStyle style);
    +
    +  /*! \brief Returns the pen style.
    +   *
    +   * \sa setStyle(PenStyle)
    +   */
    +  PenStyle style() const { return penStyle_; }
    +
    +  /*! \brief Sets the style for rendering line ends.
    +   *
    +   * \sa capStyle()
    +   */
    +  void setCapStyle(PenCapStyle style);
    +
    +  /*! \brief Returns the style for rendering line ends.
    +   *
    +   * \sa setCapStyle(PenCapStyle)
    +   */
    +  PenCapStyle capStyle() const { return penCapStyle_; }
    +
    +  /*! \brief Sets the style for rendering line joins.
    +   *
    +   * \sa joinStyle()
    +   */
    +  void setJoinStyle(PenJoinStyle style);
    +
    +  /*! \brief Returns the style for rendering line joins.
    +   *
    +   * \sa setJoinStyle(PenJoinStyle)
    +   */
    +  PenJoinStyle joinStyle() const { return penJoinStyle_; }
    +
    +  /*! \brief Sets the pen width.
    +   *
    +   * A pen width \p must be specified using WLength::Pixel units.
    +   *
    +   * \sa width()
    +   */
    +  void setWidth(const WLength& width);
    +
    +  /*! \brief Returns the pen width.
    +   *
    +   * \sa setWidth(const WLength&)
    +   */
    +  const WLength& width() const { return width_; }
    +
    +  /*! \brief Sets the pen color.
    +   *
    +   * \sa color()
    +   */
    +  void setColor(const WColor& color);
    +
    +  /*! \brief Returns the pen color.
    +   *
    +   * \sa color()
    +   */
    +  const WColor& color() const { return color_; }
    +
    +private:
    +  PenStyle penStyle_;
    +  PenCapStyle penCapStyle_;
    +  PenJoinStyle penJoinStyle_;
    +  WLength  width_;
    +  WColor   color_;
    +};
    +
    +}
    +
    +#endif // WPEN_H_
    diff --git a/wt-3.1.7a/src/Wt/WPen.C b/wt-3.1.7a/src/Wt/WPen.C
    new file mode 100644
    index 0000000..ed40e2e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPen.C
    @@ -0,0 +1,96 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WPen"
    +
    +namespace Wt {
    +
    +WPen::WPen()
    +  : penStyle_(SolidLine),
    +    penCapStyle_(SquareCap),
    +    penJoinStyle_(BevelJoin),
    +    width_(0),
    +    color_(black)
    +{ }
    +
    +WPen::WPen(PenStyle style)
    +  : penStyle_(style),
    +    penCapStyle_(SquareCap),
    +    penJoinStyle_(BevelJoin),
    +    width_(0),
    +    color_(black)
    +{ }
    +
    +WPen::WPen(const WColor& color)
    +  : penStyle_(SolidLine),
    +    penCapStyle_(SquareCap),
    +    penJoinStyle_(BevelJoin),
    +    width_(0),
    +    color_(color)
    +{ }
    +
    +WPen::WPen(GlobalColor color)
    +  : penStyle_(SolidLine),
    +    penCapStyle_(SquareCap),
    +    penJoinStyle_(BevelJoin),
    +    width_(0),
    +    color_(color)
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WPen WPen::clone() const
    +{
    +  WPen result;
    +  result.penStyle_ = penStyle_;
    +  result.penCapStyle_ = penCapStyle_;
    +  result.penJoinStyle_ = penJoinStyle_;
    +  result.width_ = width_;
    +  result.color_ = color_;
    +  return result;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WPen::setStyle(PenStyle style)
    +{
    +  penStyle_ = style;
    +}
    +
    +void WPen::setCapStyle(PenCapStyle style)
    +{
    +  penCapStyle_ = style;
    +}
    +
    +void WPen::setJoinStyle(PenJoinStyle style)
    +{
    +  penJoinStyle_ = style;
    +}
    +
    +void WPen::setWidth(const WLength& width)
    +{
    +  width_ = width;
    +}
    +
    +void WPen::setColor(const WColor& color)
    +{
    +  color_ = color;
    +}
    +
    +bool WPen::operator==(const WPen& other) const
    +{
    +  return
    +       penStyle_ == other.penStyle_
    +    && penCapStyle_ == other.penCapStyle_
    +    && penJoinStyle_ == other.penJoinStyle_
    +    && width_ == other.width_
    +    && color_ == other.color_;
    +}
    +
    +bool WPen::operator!=(const WPen& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPoint b/wt-3.1.7a/src/Wt/WPoint
    new file mode 100644
    index 0000000..d05ee0f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPoint
    @@ -0,0 +1,63 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPOINT_H_
    +#define WPOINT_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +/*! \class WPoint Wt/WPoint Wt/WPoint
    + *  \brief Utility class that defines a 2D point with integer coordinates.
    + *
    + * \sa WPolygonArea
    + */
    +class WT_API WPoint
    +{
    +public:
    +  /*! \brief Creates a point (0, 0).
    +   */
    +  WPoint();
    +
    +  /*! \brief Creates a point (x, y).
    +   */
    +  WPoint(int x, int y)
    +    : x_(x), y_(y) { }
    +
    +  /*! \brief Sets the X coordinate.
    +   */
    +  void setX(int x) { x_ = x; }
    +
    +  /*! \brief Sets the Y coordinate.
    +   */
    +  void setY(int y) { y_ = y; }
    +
    +  /*! \brief Returns the X coordinate.
    +   */
    +  int x() const { return x_; }
    +
    +  /*! \brief Returns the Y coordinate.
    +   */
    +  int y() const { return y_; }
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator== (const WPoint& other) const;
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator!= (const WPoint& other) const;
    +
    +  WPoint& operator+= (const WPoint& other);
    +
    +private:
    +  int x_, y_;
    +};
    +
    +};
    +
    +#endif // WPOINT_H_
    diff --git a/wt-3.1.7a/src/Wt/WPoint.C b/wt-3.1.7a/src/Wt/WPoint.C
    new file mode 100644
    index 0000000..a94269b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPoint.C
    @@ -0,0 +1,33 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WPoint"
    +
    +namespace Wt {
    +
    +WPoint::WPoint()
    +  : x_(0), y_(0)
    +{ }
    +
    +bool WPoint::operator== (const WPoint& other) const
    +{
    +  return (x_ == other.x_) && (y_ == other.y_);
    +}
    +
    +bool WPoint::operator!= (const WPoint& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +WPoint& WPoint::operator+= (const WPoint& other)
    +{
    +  x_ += other.x_;
    +  y_ += other.y_;
    +
    +  return *this;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPointF b/wt-3.1.7a/src/Wt/WPointF
    new file mode 100644
    index 0000000..08df168
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPointF
    @@ -0,0 +1,74 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPOINTF_H_
    +#define WPOINTF_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WEvent>
    +
    +namespace Wt {
    +
    +/*! \class WPointF Wt/WPointF Wt/WPointF
    + *  \brief Utility class that defines a 2D point.
    + *
    + * \ingroup painting
    + */
    +class WT_API WPointF
    +{
    +public:
    +  /*! \brief Creates point (0, 0).
    +   */
    +  WPointF();
    +
    +  /*! \brief Creates a point (x, y).
    +   */
    +  WPointF(double x, double y)
    +    : x_(x), y_(y) { }
    +
    +  /*! \brief Copy constructor.
    +   */
    +  WPointF(const WPointF& other)
    +    : x_(other.x()), y_(other.y()) { }
    +
    +  /*! \brief Creates a point from mouse coordinates.
    +   */
    +  WPointF(const WMouseEvent::Coordinates& other)
    +    : x_(other.x), y_(other.y) { }
    +
    +  /*! \brief Sets the X coordinate.
    +   */
    +  void setX(double x) { x_ = x; }
    +
    +  /*! \brief Sets the Y coordinate.
    +   */
    +  void setY(double y) { y_ = y; }
    +
    +  /*! \brief Returns the X coordinate.
    +   */
    +  double x() const { return x_; }
    +
    +  /*! \brief Returns the Y coordinate.
    +   */
    +  double y() const { return y_; }
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator== (const WPointF& other) const;
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator!= (const WPointF& other) const;
    +
    +  WPointF& operator+= (const WPointF& other);
    +
    +private:
    +  double x_, y_;
    +};
    +
    +}
    +
    +#endif // WPOINTF_H_
    diff --git a/wt-3.1.7a/src/Wt/WPointF.C b/wt-3.1.7a/src/Wt/WPointF.C
    new file mode 100644
    index 0000000..c2ca85b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPointF.C
    @@ -0,0 +1,33 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WPointF"
    +
    +namespace Wt {
    +
    +WPointF::WPointF()
    +  : x_(0), y_(0)
    +{ }
    +
    +bool WPointF::operator== (const WPointF& other) const
    +{
    +  return (x_ == other.x_) && (y_ == other.y_);
    +}
    +
    +bool WPointF::operator!= (const WPointF& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +WPointF& WPointF::operator+= (const WPointF& other)
    +{
    +  x_ += other.x_;
    +  y_ += other.y_;
    +
    +  return *this;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPolygonArea b/wt-3.1.7a/src/Wt/WPolygonArea
    new file mode 100644
    index 0000000..6eaf629
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPolygonArea
    @@ -0,0 +1,119 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPOLYGON_AREA_H_
    +#define WPOLYGON_AREA_H_
    +
    +#include <Wt/WAbstractArea>
    +#include <Wt/WPoint>
    +
    +namespace Wt {
    +
    +class WPointF;
    +
    +/*! \class WPolygonArea Wt/WPolygonArea Wt/WPolygonArea
    + *  \brief An interactive area in a widget, specified by a polygon.
    + *
    + * The area may be added to a WImage or WPaintedWidget to provide
    + * interactivity on a polygon area of the image. The polygon is
    + * specified in pixel coordinates, and uses an even-odd winding rule
    + * (overlaps create holes).
    + * 
    + * \if cpp
    + * \code
    + * Wt::WImage *image = new Wt::WImage("images/family.jpg");
    + * Wt::WPolygonArea *face = new Wt::WPolygonArea();
    + * face->addPoint(100, 120);
    + * face->addPoint(300, 120);
    + * face->addPoint (200, 250);
    + * face->setToolTip("Uncle Frank");
    + * image->addArea(face);
    + * \endcode
    + * \endif
    + *
    + * The polygon area corresponds to the HTML <tt>&lt;area shape="poly"&gt;</tt>
    + * tag.
    + *
    + * \sa WImage::addArea(), WPaintedWidget::addArea()
    + * \sa WCircleArea, WRectArea
    + */
    +class WT_API WPolygonArea : public WAbstractArea
    +{
    +public:
    +  /*! \brief Creates an empty polygon.
    +   *
    +   * Defines an empty polygon. 
    +   */
    +  WPolygonArea();
    +
    +  /*! \brief Creates a polygon area with given vertices.
    +   *
    +   * The polygon is defined with vertices corresponding to
    +   * \p points. The polygon is closed by connecting the last point
    +   * with the first point.
    +   */
    +  WPolygonArea(const std::vector<WPoint>& points);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Creates a polygon area with given vertices.
    +   *
    +   * The polygon is defined with vertices corresponding to
    +   * \p points. The polygon is closed by connecting the last point
    +   * with the first point.
    +   */
    +  WPolygonArea(const std::vector<WPointF>& points);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Adds a point.
    +   */
    +  void addPoint(int x, int y);
    +
    +  /*! \brief Adds a point.
    +   */
    +  void addPoint(double x, double y);
    +
    +  /*! \brief Adds a point.
    +   */
    +  void addPoint(const WPoint& point);
    +
    +  /*! \brief Adds a point.
    +   */
    +  void addPoint(const WPointF& point);
    +
    +  /*! \brief Sets the polygon vertices. 
    +   *
    +   * The polygon is defined with vertices corresponding to
    +   * \p points. The polygon is closed by connecting the last point
    +   * with the first point.
    +   */
    +  void setPoints(const std::vector<WPoint>& points);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief Sets the polygon vertices. 
    +   *
    +   * The polygon is defined with vertices corresponding to
    +   * \p points. The polygon is closed by connecting the last point
    +   * with the first point.
    +   */
    +  void setPoints(const std::vector<WPointF>& points);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns the polygon vertices.
    +   *
    +   * \sa setPoints()
    +   */
    +  const std::vector<WPoint>& points() const { return points_; }
    +
    +private:
    +  std::vector<WPoint> points_;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +};
    +
    +}
    +
    +#endif // WPOLYGON_AREA_H_
    diff --git a/wt-3.1.7a/src/Wt/WPolygonArea.C b/wt-3.1.7a/src/Wt/WPolygonArea.C
    new file mode 100644
    index 0000000..6b35150
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPolygonArea.C
    @@ -0,0 +1,78 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WPolygonArea"
    +#include "Wt/WPointF"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WPolygonArea::WPolygonArea()
    +{ }
    +
    +WPolygonArea::WPolygonArea(const std::vector<WPoint>& points)
    + : points_(points)
    +{ }
    +
    +#ifndef WT_TARGET_JAVA
    +WPolygonArea::WPolygonArea(const std::vector<WPointF>& points)
    +{
    +  setPoints(points);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WPolygonArea::addPoint(int x, int y)
    +{
    +  points_.push_back(WPoint(x, y));
    +}
    +
    +void WPolygonArea::addPoint(double x, double y)
    +{
    +  points_.push_back(WPoint(static_cast<int>(x), static_cast<int>(y)));
    +}
    +
    +void WPolygonArea::addPoint(const WPoint& point)
    +{
    +  points_.push_back(point);
    +}
    +
    +void WPolygonArea::addPoint(const WPointF& point)
    +{
    +  points_.push_back(WPoint(static_cast<int>(point.x()),
    +			   static_cast<int>(point.y())));
    +}
    +
    +void WPolygonArea::setPoints(const std::vector<WPoint>& points)
    +{
    +  points_ = points;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WPolygonArea::setPoints(const std::vector<WPointF>& points)
    +{
    +  points_.clear();
    +  for (unsigned i = 0; i < points.size(); ++i)
    +    addPoint(points[i]);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WPolygonArea::updateDom(DomElement& element, bool all)
    +{
    +  element.setAttribute("shape", "poly");
    +
    +  std::stringstream coords;
    +  for (unsigned i = 0; i < points_.size(); ++i) {
    +    if (i != 0)
    +      coords << ',';
    +    coords << points_[i].x() << ',' << points_[i].y();
    +  }
    +  element.setAttribute("coords", coords.str());
    +
    +  WAbstractArea::updateDom(element, all);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPopupMenu b/wt-3.1.7a/src/Wt/WPopupMenu
    new file mode 100644
    index 0000000..e479e39
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPopupMenu
    @@ -0,0 +1,328 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPOPUP_MENU_H_
    +#define WPOPUP_MENU_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WJavaScript>
    +#include <Wt/WPopupMenuItem>
    +
    +namespace Wt {
    +
    +  class WApplication;
    +  class WTemplate;
    +  class WMouseEvent;
    +  class WPoint;
    +  class WPopupMenuItem;
    +
    +/*! \class WPopupMenu Wt/WPopupMenu Wt/WPopupMenu
    + *  \brief A menu presented in a popup window.
    + *
    + * The menu implements a typical context menu, with support for
    + * submenu's. It is not to be confused with WMenu which implements an
    + * always-visible navigation menu for a web application.
    + *
    + * When initially created, the menu is invisible, until popup() or
    + * exec() is called. Then, the menu will remain visible until an item
    + * is selected, or the user cancels the menu (by hitting Escape or
    + * clicking elsewhere).
    + *
    + * The implementation assumes availability of JavaScript to position
    + * the menu at the current mouse position and provide feed-back of the
    + * currently selected item.
    + *
    + * Similar in use as WDialog, there are two ways of using the
    + * menu. The simplest way is to use one of the exec() methods, to use
    + * a reentrant event loop and wait until the user cancelled the popup
    + * menu (by hitting Escape or clicking elsewhere), or selected an item.
    + *
    + * Alternatively, you can use one of the popup() methods to show the
    + * menu and listen to the \link WPopupMenu::aboutToHide
    + * aboutToHide\endlink signal where you read the result().
    + *
    + * You have several options to react to the selection of an item:
    + * - Either you use the WPopupMenuItem itself to identify the action,
    + *   perhaps by specialization or simply by binding custom data using
    + *   WPopupMenuItem::setData().
    + * - You can bind a separate method to each item's WPopupMenuItem::triggered
    + *   signal.
    + * \if cpp
    + * - You can use a WSignalMapper to bind extra data with an item's
    + *   WPopupMenuItem::triggered signal, and handle them in a single
    + *   slot.
    + * \endif
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * // Create a menu with some items
    + * WPopupMenu popup;
    + * popup.addItem("icons/item1.gif", "Item 1");
    + * popup.addItem("Item 2")->setCheckable(true);
    + * popup.addItem("Item 3");
    + * popup.addSeparator();
    + * popup.addItem("Item 4");
    + * popup.addSeparator();
    + * popup.addItem("Item 5");
    + * popup.addItem("Item 6");
    + * popup.addSeparator();
    + *
    + * WPopupMenu *subMenu = new WPopupMenu();
    + * subMenu->addItem("Sub Item 1");
    + * subMenu->addItem("Sub Item 2");
    + * popup.addMenu("Item 7", subMenu);
    + *
    + * WPopupMenuItem *item = popup.exec(event);
    + *
    + * if (item) {
    + *   // ... do associated action.
    + * }
    + * \endcode
    + * \elseif java
    + * \code
    + * // Create a menu with some items
    + * WPopupMenu popup = new WPopupMenu();
    + * popup.addItem("icons/item1.gif", "Item 1");
    + * popup.addItem("Item 2").setCheckable(true);
    + * popup.addItem("Item 3");
    + * popup.addSeparator();
    + * popup.addItem("Item 4");
    + * popup.addSeparator();
    + * popup.addItem("Item 5");
    + * popup.addItem("Item 6");
    + * popup.addSeparator();
    + *		 
    + * WPopupMenu subMenu = new WPopupMenu();
    + * subMenu.addItem("Sub Item 1");
    + * subMenu.addItem("Sub Item 2");
    + * popup.addMenu("Item 7", subMenu);
    + *		 
    + * WPopupMenuItem item = popup.exec(event);
    + *		 
    + * if (item) {
    + *  // ... do associated action.
    + * }
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * A WPopupMenu has the <tt>Wt-popupmenu</tt> style class. 
    + * The look can be overridden using the following style class
    + * selectors:
    + *
    + * \verbatim
    +.Wt-popupmenu .Wt-item, .Wt-popupmenu .Wt-selected : item
    +.Wt-popupmenu .Wt-selected                         : selected item
    +.Wt-popupmenu .Wt-separator                        : separator
    +\endverbatim
    + *
    + * A snapshot of the WPopupMenu: 
    + * \image html WPopupMenu-default-1.png "WPopupMenu example (default)"
    + * \image html WPopupMenu-polished-1.png "WPopupMenu example (polished)"
    + * \sa WPopupMenuItem
    + */
    +class WT_API WPopupMenu : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a new popup menu.
    +   *
    +   * The menu is hidden, by default, and must be shown using popup()
    +   * or exec().
    +   */
    +  WPopupMenu();
    +
    +  /*! \brief Adds an item with given text.
    +   *
    +   * Adds an item to the menu with given text, and returns the
    +   * corresponding item object.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  WPopupMenuItem *addItem(const WString& text);
    +
    +  /*! \brief Adds an item with given icon and text.
    +   *
    +   * Adds an item to the menu with given text and icon, and returns
    +   * the corresponding item object.
    +   *
    +   * \note The icon should have a width of 16 pixels.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  WPopupMenuItem *addItem(const std::string& iconPath, const WString& text);
    +
    +  /*! \brief Adds an item with given text, and specify a slot method to be
    +   *         called when the item is triggered.
    +   *
    +   * The <i>target</i> and \p method are connected to the
    +   * WPopupMenuItem::triggered signal.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  template<class T, class V>
    +    WPopupMenuItem *addItem(const WString& text,
    +			    T *target, void (V::*method)());
    +    
    +  /*! \brief Adds an item with given text and icon, and specify a slot
    +   *         method to be called when activated.
    +   *
    +   * The <i>target</i> and \p method are connected to the
    +   * WPopupMenuItem::triggered signal.
    +   *
    +   * \note The icon should have a width of 16 pixels.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  template<class T, class V>
    +    WPopupMenuItem *addItem(const std::string& iconPath, const WString& text,
    +			    T *target, void (V::*method)());
    +
    +  /*! \brief Adds a submenu, with given text.
    +   *
    +   * Adds an item with text \p text, that leads to a submenu
    +   * \p menu.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  WPopupMenuItem *addMenu(const WString& text, WPopupMenu *menu);
    +
    +  /*! \brief Adds a submenu, with given icon and text.
    +   *
    +   * Adds an item with given text and icon, that leads to a submenu
    +   * \p menu.
    +   *
    +   * \sa add(WPopupMenuItem *)
    +   */
    +  WPopupMenuItem *addMenu(const std::string& iconPath, const WString& text,
    +			  WPopupMenu *menu);
    +
    +  /*! \brief Adds a menu item.
    +   *
    +   * Adds an item to the popup menu.
    +   */
    +  void add(WPopupMenuItem *item);
    +
    +  /*! \brief Adds a separator to the menu.
    +   *
    +   * Adds a separator the popup menu. The separator is an empty div with
    +   * style-class "separator".
    +   */
    +  void addSeparator();
    +
    +  /*! \brief Shows the the popup at a position.
    +   *
    +   * Displays the popup at a point with document coordinates
    +   * \p point. The positions intelligent, and will chose one of
    +   * the four menu corners to correspond to this point so that the
    +   * popup menu is completely visible within the window.
    +   *
    +   * \sa exec()
    +   */
    +  void popup(const WPoint& point);
    +
    +  /*! \brief Shows the the popup at the location of a mouse event.
    +   *
    +   * This is a convenience method for popup(const WPoint&) that uses the
    +   * event's document coordinates.
    +   *
    +   * \sa popup(const WPoint& p), WMouseEvent::document()
    +   */
    +  void popup(const WMouseEvent& event);
    +
    +  /*! \brief Shows the popup besides a widget.
    +   *
    +   * \sa positionAt(), popup(const WPointF&)
    +   */
    +  void popup(WWidget *location, Orientation orientation = Vertical);
    +
    +  /*! \brief Executes the the popup at a position.
    +   *
    +   * Displays the popup at a point with document coordinates \p p,
    +   * using popup(), and the waits until a menu item is selected, or
    +   * the menu is cancelled.
    +   *
    +   * Returns the selected menu (or sub-menu) item, or \c 0 if the user
    +   * cancelled the menu.
    +   *
    +   * \sa popup()
    +   */
    +  WPopupMenuItem *exec(const WPoint& point);
    +
    +  /*! \brief Executes the the popup at the location of a mouse event.
    +   *
    +   * This is a convenience method for exec(const WPoint& p) that uses the
    +   * event's document coordinates.
    +   *
    +   * \sa exec(const WPoint&)
    +   */
    +  WPopupMenuItem *exec(const WMouseEvent& event);
    +
    +  /*! \brief Executes the popup besides a widget.
    +   *
    +   * \sa positionAt(), popup(const WPointF&)
    +   */
    +  WPopupMenuItem *exec(WWidget *location, Orientation orientation = Vertical);
    +
    +  /*! \brief Returns the last triggered menu item.
    +   *
    +   * The result is \c 0 when the user cancelled the popup menu.
    +   */
    +  WPopupMenuItem *result() const { return result_; }
    +
    +  virtual void setHidden(bool hidden);
    +
    +  /*! \brief %Signal emitted when the popup is hidden.
    +   *
    +   * This signal is emitted when the popup is hidden, either because an item
    +   * was selected, or when the menu was cancelled.
    +   *
    +   * You can use result() to get the selected item.
    +   */
    +  Signal<>& aboutToHide() { return aboutToHide_; }
    +
    +private:
    +  WTemplate      *impl_;
    +  WPopupMenuItem *parentItem_, *result_;
    +
    +  Signal<> aboutToHide_;
    +
    +  boost::signals::connection globalClickConnection_, globalEscapeConnection_;
    +  bool                       recursiveEventLoop_;
    +
    +  WContainerWidget *contents();
    +  WPopupMenu *topLevelMenu();
    +  void        done();
    +  void        done(WPopupMenuItem *result);
    +  void        popupImpl();
    +  void        popupToo(WWidget *location);
    +  void        prepareRender(WApplication *app);
    +  void        renderOutAll();
    +
    +  friend class WPopupMenuItem;
    +};
    +
    +template<class T, class V>
    +WPopupMenuItem *WPopupMenu::addItem(const WString& text,
    +				    T *target, void (V::*method)())
    +{
    +  return addItem(std::string(), text, target, method);
    +}
    +
    +template<class T, class V>
    +WPopupMenuItem *WPopupMenu::addItem(const std::string& iconPath,
    +				    const WString& text,
    +				    T *target, void (V::*method)())
    +{
    +  WPopupMenuItem *item = addItem(iconPath, text);
    +  item->triggered().connect(target, method);
    +  return item;
    +}
    +
    +}
    +
    +#endif // WPOPUP_MENU_H_
    diff --git a/wt-3.1.7a/src/Wt/WPopupMenu.C b/wt-3.1.7a/src/Wt/WPopupMenu.C
    new file mode 100644
    index 0000000..eb2bec2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPopupMenu.C
    @@ -0,0 +1,241 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WPoint"
    +#include "Wt/WPopupMenu"
    +#include "Wt/WPopupMenuItem"
    +#include "Wt/WTemplate"
    +
    +#include "WebSession.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WPopupMenu::WPopupMenu()
    +  : WCompositeWidget(),
    +    parentItem_(0),
    +    result_(0),
    +    aboutToHide_(this),
    +    recursiveEventLoop_(false)
    +{
    +  const char *TEMPLATE =
    +    "${shadow-x1-x2}"
    +    "${contents}";
    +
    +  setImplementation(impl_ = new WTemplate(WString::fromUTF8(TEMPLATE)));
    +  impl_->setLoadLaterWhenInvisible(false);
    +
    +  setPositionScheme(Absolute);
    +  setStyleClass("Wt-popupmenu Wt-outset");
    +
    +  impl_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2);
    +  impl_->bindWidget("contents", new WContainerWidget());
    +
    +  const char *CSS_RULES_NAME = "Wt::WPopupMenu";
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->styleSheet().isDefined(CSS_RULES_NAME))
    +    app->styleSheet().addRule
    +      (".Wt-notselected .Wt-popupmenu", "visibility: hidden;", CSS_RULES_NAME);
    +
    +  app->domRoot()->addWidget(this);
    +
    +  hide();
    +}
    +
    +WContainerWidget *WPopupMenu::contents()
    +{
    +  return dynamic_cast<WContainerWidget *>(impl_->resolveWidget("contents"));
    +}
    +
    +WPopupMenuItem *WPopupMenu::addItem(const WString& text)
    +{
    +  return addItem(std::string(), text);
    +}
    +
    +WPopupMenuItem *WPopupMenu::addItem(const std::string& iconPath,
    +				    const WString& text)
    +{
    +  WPopupMenuItem *item = new WPopupMenuItem(iconPath, text);
    +  add(item);
    +  return item;
    +}
    +
    +WPopupMenuItem *WPopupMenu::addMenu(const WString& text, WPopupMenu *menu)
    +{
    +  return addMenu(std::string(), text, menu);
    +}
    +
    +WPopupMenuItem *WPopupMenu::addMenu(const std::string& iconPath,
    +				    const WString& text, WPopupMenu *menu)
    +{
    +  WPopupMenuItem *item = addItem(iconPath, text);
    +  item->setPopupMenu(menu);
    +  return item;
    +}
    +
    +void WPopupMenu::add(WPopupMenuItem *item)
    +{
    +  contents()->addWidget(item);
    +}
    +
    +void WPopupMenu::addSeparator()
    +{
    +  add(new WPopupMenuItem(true));
    +}
    +
    +WPopupMenu *WPopupMenu::topLevelMenu()
    +{
    +  return parentItem_ ? parentItem_->topLevelMenu() : this;
    +}
    +
    +void WPopupMenu::setHidden(bool hidden)
    +{
    +  WCompositeWidget::setHidden(hidden);
    +
    +  if (hidden)
    +    renderOutAll();
    +}
    +
    +void WPopupMenu::renderOutAll()
    +{
    +  WContainerWidget *c = contents();
    +  for (int i = 0; i < c->count(); ++i) {
    +    WPopupMenuItem *item = dynamic_cast<WPopupMenuItem *>(c->widget(i));
    +    item->renderOut();
    +  }
    +}
    +
    +void WPopupMenu::done(WPopupMenuItem *result)
    +{
    +  result_ = result;
    +
    +  hide();
    +
    +  WApplication::instance()->root()->clicked()
    +    .disconnect(globalClickConnection_);
    +  WApplication::instance()->globalEscapePressed()
    +    .disconnect(globalEscapeConnection_);
    +
    +  recursiveEventLoop_ = false;
    +
    +  aboutToHide_.emit();
    +}
    +
    +void WPopupMenu::done()
    +{
    +  done(0);
    +}
    +
    +void WPopupMenu::popup(WWidget *location, Orientation orientation)
    +{
    +  popupImpl();
    +  positionAt(location, orientation);
    +}
    +
    +void WPopupMenu::popupToo(WWidget *location)
    +{
    +  show();
    +  positionAt(location, Horizontal);
    +}
    +
    +void WPopupMenu::popup(const WMouseEvent& e)
    +{
    +  popup(WPoint(e.document().x, e.document().y));
    +}
    +
    +void WPopupMenu::popupImpl()
    +{
    +  renderOutAll();
    +
    +  result_ = 0;
    +
    +  WApplication *app = WApplication::instance();
    +
    +  // XXX
    +  // We rely here on the fact that no other widget is listening for
    +  // escape on the root()
    +  if (app->globalEscapePressed().isConnected())
    +    app->globalEscapePressed().emit();
    +
    +  globalClickConnection_
    +    = app->root()->clicked().connect(this, &WPopupMenu::done);
    +  globalEscapeConnection_
    +    = app->globalEscapePressed().connect(this, &WPopupMenu::done);
    +
    +  prepareRender(app);
    +
    +  show();
    +}
    +
    +void WPopupMenu::popup(const WPoint& p)
    +{
    +  popupImpl();
    +
    +  // make sure we are not confused by client-side being positioned properly
    +  setOffsets(42, Left | Top);
    +  setOffsets(-10000, Left | Top);
    +
    +  WApplication::instance()->doJavaScript
    +    (WT_CLASS ".positionXY('" + id() + "',"
    +     + boost::lexical_cast<std::string>(p.x()) + ","
    +     + boost::lexical_cast<std::string>(p.y()) + ");");
    +}
    +
    +void WPopupMenu::prepareRender(WApplication *app)
    +{
    +  if (app->environment().agentIsIE()) {
    +    app->doJavaScript(jsRef() + ".lastChild.style.width="
    +		      + jsRef() + ".lastChild.offsetWidth+'px';");
    +  }
    +
    +  // FIXME: we should really also prepareRender() of submenus when shown...
    +}
    +
    +WPopupMenuItem *WPopupMenu::exec(const WPoint& p)
    +{
    +  if (recursiveEventLoop_)
    +    throw WtException("WPopupMenu::exec(): already in recursive event loop.");
    +
    +  WebSession *session = WApplication::instance()->session();
    +  recursiveEventLoop_ = true;
    +
    +  popup(p);
    +  do {
    +    session->doRecursiveEventLoop();
    +  } while (recursiveEventLoop_);
    + 
    +  return result_;
    +}
    +
    +WPopupMenuItem *WPopupMenu::exec(const WMouseEvent& e)
    +{
    +  return exec(WPoint(e.document().x, e.document().y));
    +}
    +
    +WPopupMenuItem *WPopupMenu::exec(WWidget *location, Orientation orientation)
    +{
    +  if (recursiveEventLoop_)
    +    throw WtException("WPopupMenu::exec(): already in recursive event loop.");
    +
    +  WebSession *session = WApplication::instance()->session();
    +  recursiveEventLoop_ = true;
    +
    +  popup(location, orientation);
    +  do {
    +    session->doRecursiveEventLoop();
    +  } while (recursiveEventLoop_);
    + 
    +  return result_;
    +}
    +
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WPopupMenuItem b/wt-3.1.7a/src/Wt/WPopupMenuItem
    new file mode 100644
    index 0000000..28f89a1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPopupMenuItem
    @@ -0,0 +1,168 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPOPUP_MENU_ITEM_H_
    +#define WPOPUP_MENU_ITEM_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +class WCheckBox;
    +class WPopupMenu;
    +class WText;
    +
    +/*! \class WPopupMenuItem Wt/WPopupMenuItem Wt/WPopupMenuItem
    + *  \brief An item in a popup menu.
    + *
    + * An item may have a text, icon, and can be checkable or lead to a
    + * submenu.
    + *
    + * When the mouse hovers over the item, its class is changed from
    + * "Wt-item" to "Wt-selected".
    + *
    + * \sa WPopupMenu
    + */
    +class WT_API WPopupMenuItem : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a new item with given text.
    +   *
    +   * \sa WPopupMenu::addItem(const WString& text)
    +   */
    +  WPopupMenuItem(const WString& text);
    +
    +  /*! \brief Creates a new item with given icon and text.
    +   *
    +   * The icon is displayed left to the text.
    +   *
    +   * \note The icon should have a width of 16 pixels.
    +   *
    +   * \sa WPopupMenu::addItem(const std::string& iconPath, const WString& text)
    +   */
    +  WPopupMenuItem(const std::string& iconPath, const WString& text);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WPopupMenuItem();
    +
    +  /*! \brief Sets the item text.
    +   *
    +   * \sa setIcon()
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the item text.
    +   *
    +   * \sa setText()
    +   */
    +  const WString& text() const;
    +
    +  /*! \brief Sets the item icon path.
    +   *
    +   * The icon should have a width of 16 pixels.
    +   *
    +   * \sa setText()
    +   */
    +  void setIcon(const std::string& path);
    +
    +  /*! \brief Returns the item icon path.
    +   *
    +   * \sa setIcon()
    +   */
    +  const std::string& icon();
    +
    +  /*! \brief Sets if the item is checkable.
    +   *
    +   * When an item is checkable, a checkbox is displayed to the left of the
    +   * item text (instead of an icon).
    +   *
    +   * \sa setChecked(), isChecked()
    +   */
    +  void setCheckable(bool how);
    +
    +  /*! \brief Returns whether the item is checkable.
    +   *
    +   * \sa setCheckable()
    +   */
    +  bool isCheckable() const { return checkBox_ != 0; }
    +
    +  /*! \brief Sets a sub menu for the item.
    +   *
    +   * Sets a submenu for the item. Ownership of the submenu is transferred
    +   * to the item.
    +   *
    +   * \sa popupMenu()
    +   */
    +  void setPopupMenu(WPopupMenu *menu);
    +
    +  /*! \brief Returns the sub menu.
    +   *
    +   * \sa setPopupMenu()
    +   */
    +  WPopupMenu *popupMenu() const { return subMenu_; }
    +
    +  /*! \brief Sets the checked state.
    +   *
    +   * This is only used when isCheckable() == \c true.
    +   *
    +   * \sa setCheckable(bool), isCheckable()
    +   */
    +  void setChecked(bool how);
    +
    +  /*! \brief Returns the checked state.
    +   *
    +   * This is only used when isCheckable() == \c true.
    +   *
    +   * \sa setChecked(bool), isCheckable()
    +   */
    +  bool isChecked() const;
    +
    +  /*! \brief Sets associated additional data with the item.
    +   */
    +  void setData(void *data) { data_ = data; }
    +
    +  /*! \brief Returns additional data of the item.
    +   */
    +  void *data() const { return data_; }
    +
    +  WCheckBox *checkBox() const { return checkBox_; }
    +
    +  /*! \brief %Signal emitted when an item is activated.
    +   */
    +  Signal<>& triggered() { return triggered_; }
    +
    +  virtual void load();
    +  virtual void setDisabled(bool disabled);
    +
    +private:
    +  // Constructs a separator
    +  WPopupMenuItem(bool);
    +
    +  WContainerWidget *impl_;
    +  WText            *text_;
    +  WCheckBox        *checkBox_;
    +  WPopupMenu       *subMenu_;
    +  void             *data_;
    +  bool              separator_;
    +
    +  Signal<>          triggered_;
    +
    +  void create();
    +  void renderOver();
    +  void renderOut();
    +  void renderSelected(bool selected);
    +  void onMouseUp();
    +
    +  WPopupMenu *parentMenu();
    +  WPopupMenu *topLevelMenu();
    +
    +  friend class WPopupMenu;
    +};
    +
    +}
    +
    +#endif // WPOPUP_MENU_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WPopupMenuItem.C b/wt-3.1.7a/src/Wt/WPopupMenuItem.C
    new file mode 100644
    index 0000000..bd53faf
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPopupMenuItem.C
    @@ -0,0 +1,238 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCheckBox"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WPopupMenu"
    +#include "Wt/WPopupMenuItem"
    +#include "Wt/WText"
    +
    +namespace {
    +  int ICON_WIDTH = 24;
    +  int CHECKBOX_WIDTH = 20;
    +  int SUBMENU_ARROW_WIDTH = 24;
    +}
    +
    +namespace Wt {
    +
    +WPopupMenuItem::WPopupMenuItem(bool)
    +  : text_(0),
    +    checkBox_(0),
    +    subMenu_(0),
    +    data_(0),
    +    separator_(true),
    +    triggered_(this)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  impl_->setLoadLaterWhenInvisible(false);
    +  setStyleClass("Wt-separator");
    +}
    +
    +WPopupMenuItem::WPopupMenuItem(const WString& text)
    +  : text_(0),
    +    checkBox_(0),
    +    subMenu_(0),
    +    data_(0),
    +    separator_(false),
    +    triggered_(this)
    +{
    +  create();
    +
    +  setText(text);
    +}
    +
    +WPopupMenuItem::WPopupMenuItem(const std::string& iconPath, const WString& text)
    +  : text_(0),
    +    checkBox_(0),
    +    subMenu_(0),
    +    data_(0),
    +    separator_(false),
    +    triggered_(this)
    +{
    +  create();
    +
    +  setText(text);
    +
    +  if (!iconPath.empty())
    +    setIcon(iconPath);
    +}
    +
    +WPopupMenuItem::~WPopupMenuItem()
    +{
    +  delete subMenu_;
    +}
    +
    +void WPopupMenuItem::create()
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +
    +  implementStateless(&WPopupMenuItem::renderOver, &WPopupMenuItem::renderOut);
    +  impl_->mouseWentUp().connect(this, &WPopupMenuItem::onMouseUp);
    +
    +  setStyleClass("Wt-item");
    +}
    +
    +void WPopupMenuItem::load()
    +{
    +  WCompositeWidget::load();
    +
    +  //impl_->mouseWentOver().connect(parentMenu(), &WPopupMenuItem::show);
    +  impl_->mouseWentOver().connect(this, &WPopupMenuItem::renderOver);
    +  impl_->mouseWentOver().setNotExposed();
    +}
    +
    +void WPopupMenuItem::setDisabled(bool disabled)
    +{
    +  if (disabled)
    +    addStyleClass("Wt-disabled");
    +  else
    +    removeStyleClass("Wt-disabled");
    +
    +  resetLearnedSlot(&WPopupMenuItem::renderOver);
    +
    +  WCompositeWidget::setDisabled(disabled);
    +}
    +
    +void WPopupMenuItem::setText(const WString& text)
    +{
    +  if (!text_) {
    +    text_ = new WText(impl_);
    +    text_->setInline(false);
    +    text_->setMargin(ICON_WIDTH, Left);
    +    text_->setMargin(3, Right);
    +    text_->setAttributeValue
    +      ("style", "padding-right: "
    +       + boost::lexical_cast<std::string>(SUBMENU_ARROW_WIDTH) + "px");
    +  }
    +
    +  text_->setText(text);
    +}
    +
    +const WString& WPopupMenuItem::text() const
    +{
    +  return text_->text();
    +}
    +
    +void WPopupMenuItem::setIcon(const std::string& path)
    +{
    +  decorationStyle().
    +    setBackgroundImage(path, WCssDecorationStyle::NoRepeat, CenterY);
    +  setAttributeValue("style", "background-position: 3px center");
    +}
    +
    +const std::string& WPopupMenuItem::icon()
    +{
    +  return decorationStyle().backgroundImage();
    +}
    +
    +void WPopupMenuItem::setCheckable(bool how)
    +{
    +  if (isCheckable() != how) {
    +    if (how) {
    +      text_->setMargin(ICON_WIDTH - CHECKBOX_WIDTH, Left);
    +      checkBox_ = new WCheckBox();
    +      impl_->insertWidget(0, checkBox_);
    +      text_->setInline(true);
    +    } else {
    +      delete checkBox_;
    +      text_->setMargin(ICON_WIDTH, Left);
    +      text_->setInline(false);
    +    }
    +  }
    +}
    +
    +void WPopupMenuItem::setPopupMenu(WPopupMenu *menu)
    +{
    +  delete subMenu_;
    +  subMenu_ = menu;
    +
    +  std::string resources = WApplication::resourcesUrl();
    +
    +  if (subMenu_) {
    +    subMenu_->webWidget()->setLoadLaterWhenInvisible(false);
    +    subMenu_->parentItem_ = this;
    +    text_->decorationStyle().
    +      setBackgroundImage(resources + "right-arrow.gif",
    +			 WCssDecorationStyle::NoRepeat, Right | CenterY);
    +  }
    +}
    +
    +void WPopupMenuItem::setChecked(bool how)
    +{
    +  if (checkBox_)
    +    checkBox_->setChecked(how);
    +}
    +
    +bool WPopupMenuItem::isChecked() const
    +{
    +  return checkBox_ ? checkBox_->isChecked() : false;
    +}
    +
    +void WPopupMenuItem::renderOver()
    +{
    +  parentMenu()->renderOutAll();
    +
    +  if (!isDisabled())
    +    renderSelected(true);
    +}
    +
    +void WPopupMenuItem::renderOut()
    +{
    +  if (!isDisabled())
    +    renderSelected(false);
    +}
    +
    +void WPopupMenuItem::renderSelected(bool selected)
    +{
    +  if (separator_)
    +    return;
    +
    +  if (selected) {
    +    addStyleClass("Wt-selected", true); removeStyleClass("Wt-item", true);
    +  } else {
    +    addStyleClass("Wt-item", true); removeStyleClass("Wt-selected", true);
    +  }
    +
    +  if (subMenu_) {
    +    if (selected)
    +      subMenu_->popupToo(this);
    +    else {
    +      subMenu_->show();
    +      subMenu_->hide();
    +    }
    +  }
    +}
    +
    +void WPopupMenuItem::onMouseUp()
    +{
    +  if (isDisabled() || subMenu_)
    +    return;
    +
    +  if (checkBox_)
    +    checkBox_->setChecked(!checkBox_->isChecked());
    +
    +  topLevelMenu()->result_ = this;
    +
    +  triggered_.emit();
    +
    +  topLevelMenu()->done(this);
    +}
    +
    +WPopupMenu *WPopupMenuItem::parentMenu()
    +{
    +  return dynamic_cast<WPopupMenu *>(parent()->parent()->parent());
    +}
    +
    +WPopupMenu *WPopupMenuItem::topLevelMenu()
    +{
    +  return parentMenu()->topLevelMenu();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WProgressBar b/wt-3.1.7a/src/Wt/WProgressBar
    new file mode 100644
    index 0000000..77f5107
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WProgressBar
    @@ -0,0 +1,148 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Thomas Suckow.
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPROGRESSBAR_H_
    +#define WPROGRESSBAR_H_
    +
    +#include <Wt/WInteractWidget>
    +
    +namespace Wt {
    +
    +/*! \brief A progress bar.
    + *
    + * The progress bar can be used to indicate the progress of a certain
    + * operation. The text displayed in the progress bar can be customized
    + * by specializing text().
    + *
    + * To use the progress bar, you need to give it a range (minimum and maximum
    + * value), and update the progress using setValue().
    + *
    + * %WProgressBar is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * Using HTML4, the widget is implemented using a set of nested
    + * DIVs. The element can be styled using the <tt>Wt-progressbar</tt>
    + * style. It may be styled through the current theme, or you can
    + * override the style using internal or external CSS as appropriate.
    + *
    + * \note With the advent of HTML5, this widget will be implemented using
    + *       the native HTML5 control when available.
    + */
    +class WT_API WProgressBar : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates a progress bar.
    +   */
    +  WProgressBar(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the minimum value.
    +   *
    +   * The minimum value is the value that corresponds to 0%.
    +   *
    +   * The default value is 0.
    +   */
    +  void setMinimum(double minimum);
    +
    +  /*! \brief Returns the minimum value.
    +   *
    +   * \sa setMinimum()
    +   */
    +  double minimum() const { return min_; }
    +
    +  /*! \brief Sets the maximum value.
    +   *
    +   * The maximum value is the value that corresponds to 0%.
    +   *
    +   * The default value is 100.
    +   */
    +  void setMaximum(double maximum);
    +
    +  /*! \brief Returns the maximum value.
    +   *
    +   * \sa setMaximum()
    +   */
    +  double maximum() const { return max_; }
    +
    +  /*! \brief Sets the range.
    +   *
    +   * \sa setMinimum(), setMaximum()
    +   */
    +  void setRange(double minimum, double maximum);
    +
    +  /*! \brief Sets the current progress.
    +   *
    +   * \p value must be a value between minimum() and maximum().
    +   */
    +  void setValue(double value);
    +
    +  /*! \brief Returns the current progress.
    +   */
    +  double value() const { return value_; }
    +
    +  /*! \brief Sets the progress format string.
    +   *
    +   * The format is used by text() to indicate the progress value.
    +   *
    +   * The default value is "%.0f %%"
    +   */
    +  void setFormat(const WString& format);
    +
    +  /*! \brief Returns the progress format string.
    +   *  
    +   * \sa setFormat() 
    +   */
    +  const WString& format() const { return format_; }
    +
    +  /*! \brief Returns the text displayed inside the progress bar.
    +   *
    +   * This text must be an XHTML formatted text fragment. The default
    +   * text prints the current progress using format(). You may want to
    +   * reimplement this method to display a different text corresponding
    +   * to the current value().
    +   */
    +  virtual WT_USTRING text() const;
    +
    +  /*! \brief A %signal that indicates when the value has changed.
    +   *
    +   * This signal is emitted when setValue() is called.
    +   *
    +   * \sa setValue()
    +   */
    +  Signal<double>& valueChanged() { return valueChanged_; }
    +
    +  /*! \brief A %signal that indicates when 100% is reached.
    +   *
    +   * This signal is emitted when setValue(maximum()) is called.
    +   *
    +   * \sa setValue()
    +   */
    +  Signal<>& progressCompleted() { return progressCompleted_; }
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +
    +private:
    +  double min_, max_, value_;
    +  WString format_;
    +  bool changed_;
    +
    +  void onChange();
    +
    +  Signal<double> valueChanged_;
    +  Signal<> progressCompleted_;
    +  
    +  double percentage() const;
    +};
    +
    +}
    +
    +#endif // WPROGRESSBAR_H_
    diff --git a/wt-3.1.7a/src/Wt/WProgressBar.C b/wt-3.1.7a/src/Wt/WProgressBar.C
    new file mode 100644
    index 0000000..2daf944
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WProgressBar.C
    @@ -0,0 +1,167 @@
    +/*
    + * Copyright (C) 2010 Thomas Suckow.
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + *   progressCompleted() and valueChanged() contributed by Omer Katz.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WProgressBar>
    +#include <Wt/WText>
    +#include <Wt/WContainerWidget>
    +
    +#include <stdio.h>
    +#include "DomElement.h"
    +
    +using namespace Wt;
    +
    +#ifdef WIN32
    +#define snprintf _snprintf
    +#endif
    +
    +namespace Wt {
    +
    +WProgressBar::WProgressBar(WContainerWidget *parent)
    +   : WInteractWidget(parent),
    +     min_(0),
    +     max_(100),
    +     value_(0),
    +     changed_(false)
    +{
    +  format_ = WString::fromUTF8("%.0f %%");
    +
    +  setStyleClass("Wt-progressbar");
    +  setInline(true);
    +}
    +
    +void WProgressBar::setValue(double value)
    +{
    +  value_ = value;
    +
    +  valueChanged_.emit(value_);
    +  
    +  if (value_ == max_)
    +    progressCompleted_.emit();
    +  
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WProgressBar::setMinimum(double minimum)
    +{
    +  min_ = minimum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WProgressBar::setMaximum(double maximum)
    +{
    +  max_ = maximum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WProgressBar::setRange(double minimum, double maximum)
    +{
    +  min_ = minimum;
    +  max_ = maximum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WProgressBar::setFormat(const WString& format)
    +{
    +  format_ = format;
    +}
    +
    +WT_USTRING WProgressBar::text() const
    +{
    +  std::string f = format_.toUTF8();
    +  int buflen = f.length() + 5;
    +
    +#ifndef WT_TARGET_JAVA
    +  char *buf = new char[buflen];
    +#else
    +  char *buf = 
    +#endif // WT_TARGET_JAVA
    +
    +  snprintf(buf, buflen, f.c_str(), percentage());
    +
    +  WT_USTRING result = WT_USTRING::fromUTF8(buf);
    +
    +  delete[] buf;
    +
    +  return result;
    +}
    +
    +double WProgressBar::percentage() const
    +{
    +  return (value() - minimum()) * 100 / (maximum() - minimum());
    +}
    +
    +DomElementType WProgressBar::domElementType() const
    +{
    +  return DomElement_DIV; // later support DomElement_PROGRESS
    +}
    +
    +void WProgressBar::resize(const WLength& width, const WLength& height)
    +{
    +  WInteractWidget::resize(width, height);
    +
    +  if (!height.isAuto())
    +    setAttributeValue("style", "line-height: " + height.cssText());
    +}
    +
    +void WProgressBar::updateDom(DomElement& element, bool all)
    +{
    +  DomElement *bar = 0, *label = 0;
    +
    +  if (all) {
    +    bar = DomElement::createNew(DomElement_DIV);
    +    bar->setId("bar" + id());
    +    bar->setProperty(PropertyClass, "Wt-pgb-bar");
    +
    +    label = DomElement::createNew(DomElement_DIV);
    +    label->setId("lbl" + id());
    +    label->setProperty(PropertyClass, "Wt-pgb-label");
    +  }
    +
    +  if (changed_ || all) {
    +    if (!bar)
    +      bar = DomElement::getForUpdate("bar" + id(), DomElement_DIV);
    +    if (!label)
    +      label = DomElement::getForUpdate("lbl" + id(), DomElement_DIV);
    +
    +    bar->setProperty(PropertyStyleWidth,
    +		     boost::lexical_cast<std::string>(percentage()) + "%");
    +
    +    WString s = text();
    +    removeScript(s);
    +
    +    label->setProperty(PropertyInnerHTML, s.toUTF8());
    +
    +    changed_ = false;
    +  }
    +
    +  if (bar)
    +    element.addChild(bar);
    +
    +  if (label)
    +    element.addChild(label);
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WProgressBar::propagateRenderOk(bool deep)
    +{
    +  changed_ = false;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +}
    +
    diff --git a/wt-3.1.7a/src/Wt/WPushButton b/wt-3.1.7a/src/Wt/WPushButton
    new file mode 100644
    index 0000000..12fce02
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPushButton
    @@ -0,0 +1,153 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WPUSHBUTTON_H_
    +#define WPUSHBUTTON_H_
    +
    +#include <Wt/WFormWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +/*! \class WPushButton Wt/WPushButton Wt/WPushButton
    + *  \brief A widget that represents a push button.
    + *
    + * To act on a button click, connect a slot to the clicked() signal.
    + * 
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WPushButton *ok = new Wt::WPushButton("Okay");
    + * ok->clicked().connect(ok, &Wt::WPushButton::disable);
    + * ok->clicked().connect(this, &MyClass::processData);
    + * \endcode
    + * \endif
    + *
    + * %WPushButton is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;button&gt;</tt> tag and
    + * has the <tt>Wt-btn</tt> style. It may be styled through the current
    + * theme, or you can override the style using internal or external CSS
    + * as appropriate.
    + */
    +class WT_API WPushButton : public WFormWidget
    +{
    +public:
    +  /*! \brief Creates a push button.
    +   */
    +  WPushButton(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a push button with given label text.
    +   */
    +  WPushButton(const WString& text, WContainerWidget *parent = 0);
    +
    +  virtual ~WPushButton();
    +
    +  /*! \brief Sets the button text.
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the button text.
    +   *
    +   * \sa setText()
    +   */
    +  const WString& text() const { return text_; }
    +
    +  /*! \brief Sets an icon.
    +   *
    +   * The icon is placed to the left of the text.
    +   */
    +  void setIcon(const std::string& url);
    +
    +  /*! \brief Returns the icon.
    +   *
    +   * \sa setIcon()
    +   */
    +  const std::string& icon() const { return icon_; }
    +
    +  /*! \brief Sets a destination URL.
    +   *
    +   * This method can be used to make the button behave like a WAnchor
    +   * (or conversely, an anchor look like a button) and redirect to
    +   * another URL when clicked.
    +   *
    +   * By default, a button does not refer to an URL and you should
    +   * listen to the clicked() signal to react to a click event.
    +   *
    +   * \sa setResource(), setRefInternalPath()
    +   */
    +  void setRef(const std::string& url);
    +
    +  /*! \brief Returns the destination URL.
    +   *
    +   * When the button refers to a resource, the current resource URL is
    +   * returned. Otherwise, the URL is returned that was set using
    +   * setRef().
    +   *
    +   * \sa setRef(), WResource::url()
    +   */
    +  const std::string& ref() const { return ref_; }
    +
    +  /*! \brief Sets a destination resource.
    +   *
    +   * This method can be used to make the button behave like a WAnchor
    +   * (or conversely, an anchor look like a button) and redirect to
    +   * another resource when clicked.
    +   *
    +   * A resource specifies application-dependent content, which may be
    +   * generated by your application on demand.
    +   *
    +   * This sets the \p resource as the destination of the button,
    +   * and is an alternative to setRef(). The resource may be cleared by
    +   * passing \p resource = \c 0.
    +   *
    +   * The button does not assume ownership of the resource.
    +   *
    +   * \sa setRef()
    +   */
    +  void setResource(WResource *resource);
    +
    +  /*! \brief Returns the destination resource.
    +   *
    +   * Returns \c 0 if no resource has been set.
    +   *
    +   * \sa setResource()
    +   */
    +  WResource *resource() const { return resource_; }
    +
    +  virtual void refresh();
    +
    +private:
    +  static const int BIT_TEXT_CHANGED = 0;
    +  static const int BIT_ICON_CHANGED = 1;
    +  static const int BIT_ICON_RENDERED = 2;
    +  static const int BIT_REF_CHANGED = 3;
    +
    +  WString        text_;
    +  std::string    icon_;
    +  std::string    ref_;
    +  WResource     *resource_;
    +  std::bitset<4> flags_;
    +
    +  JSlot         *redirectJS_;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +
    +private:
    +  void doRedirect();
    +  void resourceChanged();
    +};
    +
    +}
    +
    +#endif // WPUSHBUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/WPushButton.C b/wt-3.1.7a/src/Wt/WPushButton.C
    new file mode 100644
    index 0000000..53ddb32
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WPushButton.C
    @@ -0,0 +1,177 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WPushButton"
    +#include "Wt/WResource"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WPushButton::WPushButton(WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    resource_(0),
    +    redirectJS_(0)
    +{ }
    +
    +WPushButton::WPushButton(const WString& text, WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    text_(text),
    +    resource_(0),
    +    redirectJS_(0)
    +{ }
    +
    +WPushButton::~WPushButton()
    +{
    +  delete redirectJS_;
    +}
    +
    +void WPushButton::setText(const WString& text)
    +{
    +  if (canOptimizeUpdates() && (text == text_))
    +    return;
    +
    +  text_ = text;
    +  flags_.set(BIT_TEXT_CHANGED);
    +
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WPushButton::setIcon(const std::string& url)
    +{
    +  if (canOptimizeUpdates() && (url == icon_))
    +    return;
    +
    +  icon_ = url;
    +  flags_.set(BIT_ICON_CHANGED);
    +
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WPushButton::setRef(const std::string& url)
    +{
    +  if (ref_ == url)
    +    return;
    +
    +  ref_ = url;
    +  flags_.set(BIT_REF_CHANGED);
    +
    +  repaint(RepaintPropertyIEMobile);
    +}
    +
    +void WPushButton::setResource(WResource *resource)
    +{
    +  resource_ = resource;
    +
    +  if (resource_) {
    +    resource_->dataChanged().connect(this, &WPushButton::resourceChanged);
    +    resourceChanged();
    +  }
    +}
    +
    +void WPushButton::resourceChanged()
    +{
    +  setRef(resource_->url());
    +}
    +
    +void WPushButton::doRedirect()
    +{
    +  if (!WApplication::instance()->environment().ajax())
    +    WApplication::instance()->redirect(ref_);
    +}
    +
    +DomElementType WPushButton::domElementType() const
    +{
    +  return DomElement_BUTTON;
    +}
    +
    +void WPushButton::updateDom(DomElement& element, bool all)
    +{
    +  if (all) {
    +    element.setAttribute("type", "button");
    +    element.setProperty(PropertyClass, "Wt-btn");
    +  }
    +
    +  if (flags_.test(BIT_ICON_CHANGED) || (all && !icon_.empty())) {
    +    DomElement *image = DomElement::createNew(DomElement_IMG);
    +    image->setProperty(PropertySrc, icon_);
    +    image->setId("im" + formName());
    +    element.insertChildAt(image, 0);
    +    flags_.set(BIT_ICON_RENDERED);
    +  }
    +
    +  if (flags_.test(BIT_TEXT_CHANGED) || all) {
    +    element
    +      .setProperty(Wt::PropertyInnerHTML,
    +		   text_.literal() ? escapeText(text_, true).toUTF8()
    +		   : text_.toUTF8());
    +    flags_.reset(BIT_TEXT_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_REF_CHANGED) || (all && !ref_.empty())) {
    +    if (!ref_.empty()) {
    +      if (!redirectJS_) {
    +	redirectJS_ = new JSlot();
    +	clicked().connect(*redirectJS_);
    +
    +	if (!WApplication::instance()->environment().ajax())
    +	  clicked().connect(this, &WPushButton::doRedirect);
    +      }
    +
    +      redirectJS_->setJavaScript
    +	("function(){"
    +	 "window.location=" + jsStringLiteral(ref_) + ";"
    +	 "}");
    +      clicked().senderRepaint(); // XXX only for Java port necessary
    +    } else {
    +      delete redirectJS_;
    +      redirectJS_ = 0;
    +    }
    +  }
    +
    +  WFormWidget::updateDom(element, all);
    +}
    +
    +void WPushButton::getDomChanges(std::vector<DomElement *>& result,
    +				WApplication *app)
    +{
    +  if (flags_.test(BIT_ICON_CHANGED) && flags_.test(BIT_ICON_RENDERED)) {
    +    DomElement *image = DomElement::getForUpdate("im" + formName(),
    +						 DomElement_IMG);
    +    if (icon_.empty()) {
    +      image->removeFromParent();
    +      flags_.reset(BIT_ICON_RENDERED);
    +    } else
    +      image->setProperty(PropertySrc, icon_);
    +
    +    result.push_back(image);
    +
    +    flags_.reset(BIT_ICON_CHANGED);
    +  }
    +
    +  WFormWidget::getDomChanges(result, app);
    +}
    +
    +void WPushButton::propagateRenderOk(bool deep)
    +{
    +  flags_.reset();
    +
    +  WFormWidget::propagateRenderOk(deep);
    +}
    +
    +void WPushButton::refresh()
    +{
    +  if (text_.refresh()) {
    +    flags_.set(BIT_TEXT_CHANGED);
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  WFormWidget::refresh();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRadioButton b/wt-3.1.7a/src/Wt/WRadioButton
    new file mode 100644
    index 0000000..a3abdc6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRadioButton
    @@ -0,0 +1,127 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WRADIOBUTTON_H_
    +#define WRADIOBUTTON_H_
    +
    +#include <Wt/WAbstractToggleButton>
    +
    +namespace Wt {
    +
    +class WButtonGroup;
    +
    +/*! \class WRadioButton Wt/WRadioButton Wt/WRadioButton
    + *  \brief A user control that represents a radio button.
    + *
    + * Use a WButtonGroup to group together radio buttons that reflect
    + * options that are mutually exclusive.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };
    + *
    + * // use a group box as widget container for 3 radio buttons, with a title
    + * Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");
    + *
    + * // use a button group to logically group the 3 options
    + * Wt::WButtonGroup *group = new Wt::WButtonGroup(this);
    + *
    + * Wt::WRadioButton *button;
    + * button = new Wt::WRadioButton("I voted Republican", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Republican);
    +
    + * button = new Wt::WRadioButton("I voted Democrat", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, Democrate);
    +
    + * button = new Wt::WRadioButton("I didn't vote", container);
    + * new Wt::WBreak(container);
    + * group->addButton(button, NoVote);
    + *
    + * group->setCheckedButton(group->button(NoVote));
    + * \endcode
    + * \elseif java
    + * \code
    + * enum Vote { Republican, Democrate, NoVote };
    + *
    + * // use a group box as widget container for 3 radio buttons, with a title
    + * WGroupBox container = new WGroupBox("USA elections vote");
    +		 
    + * // use a button group to logically group the 3 options
    + * WButtonGroup group = new WButtonGroup(this);
    +		 
    + * WRadioButton button;
    + * button = new WRadioButton("I voted Republican", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.Republican.ordinal());
    + * button = new WRadioButton("I voted Democrat", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.Democrate.ordinal());
    +
    + * button = new WRadioButton("I didn't vote", container);
    + * new WBreak(container);
    + * group.addButton(button, Vote.NoVote.ordinal());
    +		 
    + * group.setCheckedButton(group.button(Vote.NoVote.ordinal()));	
    + * \endcode
    + * \endif
    + *
    + * %WRadioButton is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget corresponds to the HTML <tt>&lt;input
    + * type="radio"&gt;</tt> tag. Depending on whether a text is
    + * included, it may be nested in a <tt>&lt;span&gt;</tt> tag which
    + * also includes a rendered WLabel. This widget does not provide
    + * styling, and can be styled using inline or external CSS as
    + * appropriate.
    + *
    + * \sa WAbstractToggleButton, WButtonGroup
    + */
    +class WT_API WRadioButton : public WAbstractToggleButton
    +{
    +public:
    +  /*! \brief Creates an unchecked radio button with empty label and optional
    +   *         parent.
    +   */
    +  WRadioButton(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates an unchecked radio button with given text and optional
    +   *         parent.
    +   */
    +  WRadioButton(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WRadioButton();
    +
    +  /*! \brief Returns the button group.
    +   *
    +   * Returns the button group to which this button belongs.
    +   *
    +   * \sa WButtonGroup::addButton(WRadioButton *, int)
    +   */
    +  WButtonGroup *group() const { return buttonGroup_; }
    +
    +private:
    +  WButtonGroup *buttonGroup_;
    +
    +  void setGroup(WButtonGroup *buttonGroup);
    +  friend class WButtonGroup;
    +
    +protected:
    +  virtual void updateInput(DomElement& input, bool all);
    +  virtual void getFormObjects(FormObjectsMap& formObjects);
    +
    +  virtual void setFormData(const FormData& formData);
    +};
    +
    +}
    +
    +#endif // WRADIOBUTTON_H_
    diff --git a/wt-3.1.7a/src/Wt/WRadioButton.C b/wt-3.1.7a/src/Wt/WRadioButton.C
    new file mode 100644
    index 0000000..14aecdb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRadioButton.C
    @@ -0,0 +1,83 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WRadioButton"
    +#include "Wt/WButtonGroup"
    +
    +#include "Utils.h"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WRadioButton::WRadioButton(WContainerWidget *parent)
    +  : WAbstractToggleButton(parent),
    +    buttonGroup_(0)
    +{
    +  setFormObject(true);
    +}
    +
    +WRadioButton::WRadioButton(const WString& text, WContainerWidget *parent)
    +  : WAbstractToggleButton(text, parent),
    +    buttonGroup_(0)
    +{
    +  setFormObject(true);
    +}
    +
    +WRadioButton::~WRadioButton()
    +{
    +  if (buttonGroup_)
    +    buttonGroup_->removeButton(this);
    +}
    +
    +void WRadioButton::updateInput(DomElement& input, bool all)
    +{
    +  if (all) {
    +    input.setAttribute("type", "radio");
    +
    +    if (buttonGroup_) {
    +      input.setAttribute("name", buttonGroup_->id());
    +      input.setAttribute("value", id());
    +    }
    +  }
    +}
    +
    +void WRadioButton::getFormObjects(FormObjectsMap& formObjects)
    +{
    +  if (buttonGroup_)
    +    formObjects[buttonGroup_->id()] = buttonGroup_;
    +
    +  WAbstractToggleButton::getFormObjects(formObjects);
    +}
    +
    +void WRadioButton::setGroup(WButtonGroup *group)
    +{
    +  buttonGroup_ = group;
    +}
    +
    +void WRadioButton::setFormData(const FormData& formData)
    +{
    +  if (stateChanged_)
    +    return;
    +
    +  if (!Utils::isEmpty(formData.values)) {
    +    const std::string& value = formData.values[0];
    +
    +    if (value == id()) {
    +      if (buttonGroup_) {
    +	buttonGroup_->uncheckOthers(this);
    +	state_ = Checked;
    +      }
    +    } else
    +      if (!buttonGroup_)
    +	WAbstractToggleButton::setFormData(formData);
    +  } else
    +    if (!buttonGroup_)
    +      WAbstractToggleButton::setFormData(formData);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRasterImage b/wt-3.1.7a/src/Wt/WRasterImage
    new file mode 100644
    index 0000000..025fb3c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRasterImage
    @@ -0,0 +1,141 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WRASTER_IMAGE_H_
    +#define WRASTER_IMAGE_H_
    +
    +#include <Wt/WPaintDevice>
    +#include <Wt/WResource>
    +
    +#include <list>
    +
    +typedef struct _DrawContext *DrawContext;
    +typedef struct _Image Image;
    +
    +namespace Wt {
    +
    +class WTransform;
    +
    +/*! \class WRasterImage Wt/WRasterImage Wt/WRasterImage
    + *  \brief A paint device for rendering to a raster image.
    + *
    + * A %WRasterImage paint device provides support for creating raster
    + * images (such as PNG or GIF images).
    + *
    + * It implements two main use-cases:
    + *
    + *  - When used either in conjunction with a WPainter, it supports
    + *    vector graphics operations, and can be used to make a PNG or GIF
    + *    version of a WPaintedWidget's contents.
    + *
    + *  - It also provides a low-level API to color individual pixels using
    + *    setPixel(), which directly sets the raster pixels.
    + *
    + * The rendering is provided by <a
    + * href="http://www.graphicsmagick.org/">GraphicsMagick</a>, and this
    + * class is included in the library only if <tt>libgraphicsmagick</tt>
    + * was found during the build of the library.
    + *
    + * You can use the image as a resource and specialize handleRequest()
    + * to paint the contents on the fly. Alternatively can also use
    + * write() to serialize to an image file (std::ostream).
    + *
    + * The latter usage is illustrated by the code below:
    + * \code
    + * Wt::Chart::WCartesianChart *chart = ...
    + *
    + * Wt::WRasterImage pngImage("png", 600, 400);
    + * {
    + *   Wt::WPainter p(&pngImage);
    + *   chart->paint(p);
    + * }
    + * std::ofstream f("chart.png");
    + * pngImage.write(f);
    + * \endcode
    + *
    + * This paint device has the following limitations:
    + * - including images (WPainter::drawImage()) is not yet implemented.
    + * - drop shadows are (not yet?) supported.
    + * 
    + * \ingroup painting
    + */
    +class WT_API WRasterImage : public WResource, public WPaintDevice
    +{
    +public:
    +  /*! \brief Creates a raster image.
    +   * 
    +   * \p type indicates an image type. The mime type of the resource is
    +   * <tt>"image/"</tt> \p type.
    +   *
    +   * %Wt supports the following image types (amongst others):
    +   * - png: Portable Network Graphics
    +   * - gif: Graphics Interchange Format
    +   * - bmp: Microsoft windows bitmap
    +   * - jpeg: Joint Photographic Experts Group JFIF format
    +   */
    +  WRasterImage(const std::string& type,
    +	       const WLength& width, const WLength& height,
    +	       WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WRasterImage();
    +
    +  virtual void setChanged(WFlags<ChangeFlag> flags);
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle);
    +  virtual void drawImage(const WRectF& rect, const std::string& imgUri,
    +			 int imgWidth, int imgHeight, const WRectF& sourceRect);
    +  virtual void drawLine(double x1, double y1, double x2, double y2);
    +  virtual void drawPath(const WPainterPath& path);
    +
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text);
    +  virtual void init();
    +  virtual void done();
    +  virtual bool paintActive() const { return painter_ != 0; }
    +
    +  virtual WLength width() const { return width_; }
    +  virtual WLength height() const { return height_; }
    +
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +
    +  /*! \brief Low-level paint method.
    +   *
    +   * Use this method to directly set colors for individual pixels, when
    +   * using the paint device without a painter.
    +   */
    +  void setPixel(int x, int y, const WColor& color);
    +
    +protected:
    +  virtual WPainter *painter() const { return painter_; }
    +  virtual void setPainter(WPainter *painter) { painter_ = painter; }
    +  virtual void clear();
    +
    +private:
    +  WLength width_, height_;
    +  std::string type_;
    +
    +  WPainter *painter_;
    +
    +  unsigned long w_, h_;
    +  unsigned char *pixels_;
    +  DrawContext context_;
    +  Image *image_;
    +  double fontSize_;
    +
    +  typedef std::list< std::pair<WPainterPath, int> > PathCache;
    +  PathCache clipPathCache_;
    +
    +  void paintPath();
    +  void drawPlainPath(const WPainterPath& path);
    +  void setTransform(const WTransform& t);
    +  void applyTransform(const WTransform& f);
    +};
    +
    +}
    +
    +#endif // WRASTER_IMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WRasterImage.C b/wt-3.1.7a/src/Wt/WRasterImage.C
    new file mode 100644
    index 0000000..8fffd46
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRasterImage.C
    @@ -0,0 +1,582 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WBrush"
    +#include "Wt/WPainter"
    +#include "Wt/WPen"
    +#include "Wt/WRasterImage"
    +#include "Wt/WTransform"
    +#include "Wt/Http/Response"
    +
    +#include "web/WtException.h"
    +#include "web/Utils.h"
    +
    +#include <cstdio>
    +#include <magick/api.h>
    +#include <boost/lexical_cast.hpp>
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
    +namespace {
    +
    +  double adjust360(double d) {
    +    if (std::fabs(d - 360) < 0.01)
    +      return 359.5;
    +    else if (std::fabs(d + 360) < 0.01)
    +      return -359.5;
    +    else 
    +      return d;
    +  }
    +
    +  bool fequal(double d1, double d2) {
    +    return std::fabs(d1 - d2) < 1E-5;
    +  }
    +
    +  void WColorToPixelPacket(const Wt::WColor& color, PixelPacket *pp)
    +  {
    +    pp->red = static_cast<unsigned char>(color.red());
    +    pp->green = static_cast<unsigned char>(color.green());
    +    pp->blue = static_cast<unsigned char>(color.blue());
    +    pp->opacity = 0;
    +  }
    +
    +}
    +
    +namespace Wt {
    +
    +WRasterImage::WRasterImage(const std::string& type,
    +			   const WLength& width, const WLength& height,
    +			   WObject *parent)
    +  : WResource(parent),
    +    width_(width),
    +    height_(height),
    +    type_(type),
    +    painter_(0)
    +{
    +  w_ = static_cast<unsigned long>(width.toPixels());
    +  h_ = static_cast<unsigned long>(height.toPixels());
    +
    +  unsigned long bufSize = 3 * w_ * h_;
    +  pixels_ = new unsigned char[bufSize];
    +  for (unsigned i = 0; i < w_ * h_; ++i)
    +    pixels_[i*3] = pixels_[i*3 + 1] = pixels_[i*3 + 2] = 254;
    +
    +  ExceptionInfo exception;
    +  GetExceptionInfo(&exception);
    +  image_ = ConstituteImage(w_, h_, "RGB", CharPixel, pixels_, &exception);
    +
    +  std::string magick = type;
    +  std::transform(magick.begin(), magick.end(), magick.begin(), toupper);
    +  strcpy(image_->magick, type.c_str());
    +
    +  context_ = 0;
    +}
    +
    +void WRasterImage::clear()
    +{
    +  PixelPacket *pixel = SetImagePixels(image_, 0, 0, w_, h_);
    +  for (unsigned i = 0; i < w_ * h_; ++i)
    +    WColorToPixelPacket(white, pixel + i);
    +  SyncImagePixels(image_);
    +}
    +
    +WRasterImage::~WRasterImage()
    +{
    +  beingDeleted();
    +
    +  DestroyImage(image_);
    +  delete[] pixels_;
    +}
    +
    +void WRasterImage::init()
    +{
    +  context_ = DrawAllocateContext(0, image_);
    +
    +  DrawPushGraphicContext(context_);
    +
    +  DrawSetFillRule(context_, NonZeroRule);
    +  DrawTranslate(context_, -0.5, -0.5);
    +  DrawSetTextEncoding(context_, "UTF-8");
    +
    +  DrawPushGraphicContext(context_); // for painter->clipping();
    +  DrawPushGraphicContext(context_); // for painter->combinedTransform()
    +}
    +
    +void WRasterImage::done()
    +{
    +  DrawPopGraphicContext(context_); // for painter->combinedTransform()
    +  DrawPopGraphicContext(context_); // for painter->clipping();
    +  DrawPopGraphicContext(context_);
    +
    +  DrawRender(context_);
    +
    +  DrawDestroyContext(context_);
    +}
    +
    +void WRasterImage::applyTransform(const WTransform& t)
    +{
    +  AffineMatrix matrix;
    +  matrix.sx = t.m11();
    +  matrix.rx = t.m12();
    +  matrix.ry = t.m21();
    +  matrix.sy = t.m22();
    +  matrix.tx = t.dx();
    +  matrix.ty = t.dy();
    +
    +  DrawAffine(context_, &matrix);
    +}
    +
    +void WRasterImage::setTransform(const WTransform& t)
    +{
    +  DrawPopGraphicContext(context_);
    +  DrawPushGraphicContext(context_);
    +
    +  applyTransform(t);
    +}
    +
    +void WRasterImage::setChanged(WFlags<ChangeFlag> flags)
    +{
    +  if (flags & Clipping) {
    +    DrawPopGraphicContext(context_);
    +    DrawPopGraphicContext(context_);
    +    DrawPushGraphicContext(context_);
    +
    +    if (painter()->hasClipping()) {
    +      if (clipPathCache_.empty())
    +	clipPathCache_.resize(3); // keep 3
    +
    +      int index = -1;
    +      int nextIndex = 0;
    +
    +      for (PathCache::iterator i = clipPathCache_.begin();
    +	   i != clipPathCache_.end(); ++i) {
    +	if (i->first == painter()->clipPath()) {
    +	  index = i->second;
    +	  clipPathCache_.splice(clipPathCache_.begin(), clipPathCache_, i);
    +	  break;
    +	} else {
    +	  nextIndex = std::max(i->second, nextIndex);
    +	}
    +      }
    +
    +      if (index == -1) {
    +	index = nextIndex + 1;
    +	DrawPushClipPath
    +	  (context_,("clip" + boost::lexical_cast<std::string>(index)).c_str());
    +	drawPath(painter()->clipPath());
    +	DrawPopClipPath(context_);
    +
    +	clipPathCache_.pop_back(); // implement LRU
    +	clipPathCache_.push_front(std::make_pair(painter()->clipPath(), index));
    +      }
    +
    +      const WTransform& t = painter()->clipPathTransform();
    +
    +      applyTransform(t);
    +
    +      DrawSetClipUnits(context_, UserSpaceOnUse);
    +      DrawSetClipPath
    +	(context_, ("clip" + boost::lexical_cast<std::string>(index)).c_str());
    +    }
    +
    +    DrawPushGraphicContext(context_);
    +
    +    flags = Transform;
    +  }
    +
    +  if (flags & Transform) {
    +    setTransform(painter()->combinedTransform());
    +    flags = Pen | Brush | Font;
    +  }
    +
    +  if (flags & Pen) {
    +    const WPen& pen = painter()->pen();
    +
    +    if (pen.style() != NoPen) {
    +      const WColor& color = pen.color();
    +
    +      PixelPacket pp;
    +      WColorToPixelPacket(color, &pp);
    +      DrawSetStrokeColor(context_, &pp);
    +      DrawSetStrokeOpacity(context_, color.alpha() / 255.0);
    +
    +      WLength w = painter()->normalizedPenWidth(pen.width(), true);
    +      DrawSetStrokeWidth(context_, w.toPixels());
    +
    +      switch (pen.capStyle()) {
    +      case FlatCap:
    +	DrawSetStrokeLineCap(context_, ::ButtCap);
    +	break;
    +      case SquareCap:
    +	DrawSetStrokeLineCap(context_, ::SquareCap);
    +	break;
    +      case RoundCap:
    +	DrawSetStrokeLineCap(context_, ::RoundCap);
    +	break;
    +      }
    +
    +      /*
    +      switch (pen.joinStyle()) {
    +      case MiterJoin:
    +	DrawSetStrokeLineJoin(context_, ::MiterJoin);
    +	DrawSetStrokeMiterLimit(context_, 3);
    +	break;
    +      case BevelJoin:
    +	DrawSetStrokeLineJoin(context_, ::BevelJoin);
    +	break;
    +      case RoundJoin:
    +	DrawSetStrokeLineJoin(context_, ::RoundJoin);
    +	break;
    +      }
    +      */
    +
    +      switch (pen.style()) {
    +      case NoPen:
    +	break;
    +      case SolidLine:
    +	DrawSetStrokeDashArray(context_, 0, 0);
    +	break;
    +      case DashLine: {
    +	const double dasharray[] = { 4, 2 };
    +	DrawSetStrokeDashArray(context_, 2, dasharray);
    +	break;
    +      }
    +      case DotLine: {
    +	const double dasharray[] = { 1, 2 };
    +	DrawSetStrokeDashArray(context_, 2, dasharray);
    +	break;
    +      }
    +      case DashDotLine: {
    +	const double dasharray[] = { 4, 2, 1, 2 };
    +	DrawSetStrokeDashArray(context_, 4, dasharray);
    +	break;
    +      }
    +      case DashDotDotLine: {
    +	const double dasharray[] = { 4, 2, 1, 2, 1, 2 };
    +	DrawSetStrokeDashArray(context_, 6, dasharray);
    +	break;
    +      }
    +      }
    +
    +    } else
    +      DrawSetStrokeOpacity(context_, 0);
    +  }
    +
    +  if (flags & Brush) {
    +    const WBrush& brush = painter()->brush();
    +
    +    if (brush.style() != NoBrush) {
    +      const WColor& color = painter()->brush().color();
    +      PixelPacket pp;
    +      WColorToPixelPacket(color, &pp);
    +      DrawSetFillColor(context_, &pp);
    +      DrawSetFillOpacity(context_, color.alpha() / 255.0);
    +    } else
    +      DrawSetFillOpacity(context_, 0);
    +  }
    +
    +  if (flags & Font) {
    +    const WFont& font = painter()->font();
    +
    +    const char *base;
    +    const char *italic = 0;
    +    const char *bold = 0;
    +
    +    switch (font.genericFamily()) {
    +    case WFont::Default:
    +    case WFont::Serif:
    +      base = "Times";
    +      italic = "Italic";
    +      bold = "Bold";
    +      break;
    +    case WFont::SansSerif:
    +      base = "Helvetica";
    +      italic = "Olbique";
    +      bold = "Bold";
    +      break;
    +    case WFont::Monospace:
    +      base = "Courier";
    +      italic = "Oblique";
    +      bold = "Bold";
    +      break;
    +    case WFont::Fantasy: // Not really !
    +      base = "Symbol";
    +      break;
    +    case WFont::Cursive: // Not really !
    +      base = "ZapfDingbats";
    +    }
    +
    +    if (italic)
    +      switch (font.style()) {
    +      case WFont::NormalStyle:
    +	italic = 0;
    +	break;
    +      default:
    +	break;
    +      }
    +
    +    if (bold)
    +      switch (font.weight()) {
    +      case WFont::NormalWeight:
    +	bold = 0;
    +	break;
    +      case WFont::Bold:
    +      case WFont::Bolder:
    +	break;
    +      default:
    +	bold = 0;
    +      }
    +
    +    std::string name = base;
    +    if (bold) {
    +      name += std::string("-") + bold;
    +      if (italic)
    +	name += italic;
    +    } else if (italic)
    +      name += std::string("-") + italic;
    +
    +    if (name == "Times")
    +      name = "Times-Roman";
    +
    +    DrawSetFont(context_, name.c_str());
    +
    +    switch (font.size()) {
    +    case WFont::FixedSize:
    +      fontSize_ = font.fixedSize().toPixels();
    +      break;
    +    default:
    +      fontSize_ = 12;
    +    }
    +
    +    DrawSetFontSize(context_, fontSize_);
    +  }
    +}
    +
    +void WRasterImage::drawArc(const WRectF& rect,
    +			   double startAngle, double spanAngle)
    +{
    +  DrawArc(context_, rect.left(), rect.top(), rect.right(), rect.bottom(), 
    +	  startAngle, startAngle + spanAngle);
    +}
    +
    +void WRasterImage::drawImage(const WRectF& rect, const std::string& imgUri,
    +			     int imgWidth, int imgHeight,
    +			     const WRectF& srect)
    +{
    +  // TODO: DrawComposite
    +}
    +
    +void WRasterImage::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  DrawLine(context_, x1, y1, x2, y2);
    +}
    +
    +void WRasterImage::drawPath(const WPainterPath& path)
    +{
    +  if (!path.isEmpty()) {
    +    DrawPathStart(context_);
    +
    +    drawPlainPath(path);
    +
    +    DrawPathFinish(context_);
    +  }
    +}
    +
    +void WRasterImage::setPixel(int x, int y, const WColor& c)
    +{
    +  if (painter_)
    +    throw WtException("renderPixel: cannot be used while a painter is active");
    +
    +  PixelPacket *pixel = SetImagePixels(image_, x, y, 1, 1);
    +  WColorToPixelPacket(c, pixel);
    +  SyncImagePixels(image_);
    +}
    +
    +void WRasterImage::drawPlainPath(const WPainterPath& path)
    +{ 
    +  const std::vector<WPainterPath::Segment>& segments = path.segments();
    +
    +  if (segments.size() > 0
    +      && segments[0].type() != WPainterPath::Segment::MoveTo)
    +    DrawPathMoveToAbsolute(context_, 0, 0);
    +
    +  for (unsigned i = 0; i < segments.size(); ++i) {
    +    const WPainterPath::Segment s = segments[i];
    +
    +    switch (s.type()) {
    +    case WPainterPath::Segment::MoveTo:
    +      DrawPathMoveToAbsolute(context_, s.x(), s.y());
    +      break;
    +    case WPainterPath::Segment::LineTo:
    +      DrawPathLineToAbsolute(context_, s.x(), s.y());
    +      break;
    +    case WPainterPath::Segment::CubicC1: {
    +      const double x1 = s.x();
    +      const double y1 = s.y();
    +      const double x2 = segments[i+1].x();
    +      const double y2 = segments[i+1].y();
    +      const double x3 = segments[i+2].x();
    +      const double y3 = segments[i+2].y();
    +
    +      DrawPathCurveToAbsolute(context_, x1, y1, x2, y2, x3, y3);
    +
    +      i += 2;
    +      break;
    +    }
    +    case WPainterPath::Segment::CubicC2:
    +    case WPainterPath::Segment::CubicEnd:
    +      assert(false);
    +    case WPainterPath::Segment::ArcC: {
    +      WPointF current = path.positionAtSegment(i);
    +      // See also WSvgImage arc drawing
    +
    +      const double cx = s.x();
    +      const double cy = s.y();
    +      const double rx = segments[i+1].x();
    +      const double ry = segments[i+1].y();
    +      const double theta1 = -WTransform::degreesToRadians(segments[i+2].x());
    +      const double deltaTheta
    +	= -WTransform::degreesToRadians(adjust360(segments[i+2].y()));
    +
    +      const double x1 = rx * std::cos(theta1) + cx;
    +      const double y1 = ry * std::sin(theta1) + cy;
    +      const double x2 = rx * std::cos(theta1 + deltaTheta) + cx;
    +      const double y2 = ry * std::sin(theta1 + deltaTheta) + cy;
    +      const int fa = (std::fabs(deltaTheta) > M_PI ? 1 : 0);
    +      const int fs = (deltaTheta > 0 ? 1 : 0);
    +
    +      if (!fequal(current.x(), x1) || !fequal(current.y(), y1))
    +	DrawPathLineToAbsolute(context_, x1, y1);
    +
    +      DrawPathEllipticArcAbsolute(context_, rx, ry, 0, fa, fs, x2, y2);
    +
    +      i += 2;
    +      break;
    +    }
    +    case WPainterPath::Segment::ArcR:
    +    case WPainterPath::Segment::ArcAngleSweep:
    +      assert(false);
    +    case WPainterPath::Segment::QuadC: {
    +      const double x1 = s.x();
    +      const double y1 = s.y();
    +      const double x2 = segments[i+1].x();
    +      const double y2 = segments[i+1].y();
    +
    +      DrawPathCurveToQuadraticBezierAbsolute(context_, x1, y1, x2, y2);
    +
    +      i += 1;
    +
    +      break;
    +    }
    +    case WPainterPath::Segment::QuadEnd:
    +      assert(false);
    +    }
    +  }
    +}
    +
    +void WRasterImage::drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			    const WString& text)
    +{
    +  AlignmentFlag horizontalAlign = flags & AlignHorizontalMask;
    +  AlignmentFlag verticalAlign = flags & AlignVerticalMask;
    +
    +  /*
    +   * For centering horizontally, we use graphicsmagick totally insane
    +   * gravity system.
    +   */
    +  GravityType gravity = NorthWestGravity;
    +
    +  const WTransform& t = painter()->combinedTransform();
    +
    +  WPointF p;
    +
    +  double ascent = 0.8 * fontSize_;
    +  double descent = fontSize_ - ascent;
    +
    +  switch (verticalAlign) {
    +  case AlignTop:
    +    p = rect.topLeft();
    +    p.setY(p.y() + ascent);
    +    break;
    +  case AlignMiddle:
    +    p = rect.center();
    +    p.setY(p.y() + ascent - fontSize_/2);
    +    break;
    +  case AlignBottom:
    +    p = rect.bottomLeft();
    +    p.setY(p.y() - descent);
    +    break;
    +  default:
    +    break;
    +  }
    +
    +  switch (horizontalAlign) {
    +  case AlignLeft:
    +    gravity = NorthWestGravity;
    +    p.setX(rect.left());
    +    break;
    +  case AlignCenter:
    +    gravity = NorthGravity;
    +    p.setX(rect.center().x());
    +
    +    p = t.map(p);
    +    p.setX(p.x() - w_/2);
    +    p = t.inverted().map(p);
    +    break;
    +  case AlignRight:
    +    gravity = NorthEastGravity;
    +    p.setX(rect.right());
    +
    +    p = t.map(p);
    +    p.setX(w_ - p.x());
    +    p = t.inverted().map(p);
    +    break;
    +  default:
    +    break;
    +  }
    +
    +  DrawPushGraphicContext(context_);
    +
    +  PixelPacket pp;
    +  WColorToPixelPacket(painter()->pen().color(), &pp);
    +  DrawSetFillColor(context_, &pp);
    +  DrawSetFillOpacity(context_, 1);
    +  DrawSetStrokeOpacity(context_, 0);
    +  
    +  DrawSetGravity(context_, gravity);
    +
    +  std::string utf8 = text.toUTF8();
    +  Utils::replace(utf8, '%', "%%");
    +
    +  DrawAnnotation(context_, p.x(), p.y(), (const unsigned char *)utf8.c_str());
    +
    +  DrawPopGraphicContext(context_);
    +
    +  setChanged(Transform);
    +}
    +
    +void WRasterImage::handleRequest(const Http::Request& request,
    +				 Http::Response& response)
    +{
    +  response.setMimeType("image/" + type_);
    +
    +  ImageInfo info;
    +  GetImageInfo(&info);
    +
    +  ExceptionInfo exception;
    +  GetExceptionInfo(&exception);
    +
    +  std::size_t size;
    +  void *data = ImageToBlob(&info, image_, &size, &exception);
    +
    +  response.out().write((const char *)data, size);
    +
    +  free(data);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRectArea b/wt-3.1.7a/src/Wt/WRectArea
    new file mode 100644
    index 0000000..7c80605
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRectArea
    @@ -0,0 +1,103 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WRECT_AREA_H_
    +#define WRECT_AREA_H_
    +
    +#include <Wt/WAbstractArea>
    +#include <Wt/WRectF>
    +
    +namespace Wt {
    +
    +/*! \class WRectArea Wt/WRectArea Wt/WRectArea
    + *  \brief A interactive area in a widget, specified by a rectangle.
    + *
    + * The area may be added to a WImage or WPaintedWidget to provide
    + * interactivity on a rectangular area of the image. The rectangle
    + * is specified in pixel coordinates.
    + * 
    + * \if cpp
    + * \code
    + * Wt::WImage *image = new Wt::WImage("images/family.jpg");
    + * Wt::WRectArea *face = new Wt::WRectArea(100, 120, 200, 130);
    + * face->setToolTip("Uncle Frank");
    + * image->addArea(face);
    + * \endcode
    + * \endif
    + *
    + * \sa WImage::addArea(), WPaintedWidget::addArea()
    + * \sa WCircleArea, WPolygonArea
    + */
    +class WT_API WRectArea : public WAbstractArea
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * The default constructor creates a rectangular area spans the
    +   * whole widget.
    +   */
    +  WRectArea();
    +
    +  /*! \brief Creates a rectangular area with given geometry.
    +   *
    +   * The arguments are in pixel units.
    +   */  
    +  WRectArea(int x, int y, int width, int height);
    +
    +  /*! \brief Creates a rectangular area with given geometry.
    +   *
    +   * The arguments are in pixel units.
    +   */  
    +  WRectArea(double x, double y, double width, double height);
    +
    +  /*! \brief Creates a rectangular area with given geometry.
    +   *
    +   * The \p rect argument is in pixel units.
    +   */  
    +  WRectArea(const WRectF& rect);
    +
    +  /*! \brief Sets the top-left X coordinate.
    +   */
    +  void setX(int x);
    +
    +  /*! \brief Returns the top-left X coordinate.
    +   */
    +  int x() const { return x_; }
    +
    +  /*! \brief Sets the top-left Y coordinate.
    +   */
    +  void setY(int y);
    +
    +  /*! \brief Returns the top-left Y coordinate.
    +   */
    +  int y() const { return y_; }
    +
    +  /*! \brief Sets the width.
    +   */
    +  void setWidth(int width);
    +
    +  /*! \brief Returns the width.
    +   */
    +  int width() const { return width_; }
    +
    +  /*! \brief Sets the height.
    +   */
    +  void setHeight(int height);
    +
    +  /*! \brief Returns the height.
    +   */
    +  int height() const { return height_; }
    +
    +private:
    +  int x_, y_, width_, height_;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +};
    +
    +}
    +
    +#endif // WRECT_AREA_H_
    diff --git a/wt-3.1.7a/src/Wt/WRectArea.C b/wt-3.1.7a/src/Wt/WRectArea.C
    new file mode 100644
    index 0000000..9eeae98
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRectArea.C
    @@ -0,0 +1,78 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WRectArea"
    +
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WRectArea::WRectArea()
    +  : x_(0), y_(0), width_(0), height_(0)
    +{ }
    +
    +WRectArea::WRectArea(int x, int y, int width, int height)
    +  : x_(x), y_(y), width_(width), height_(height)
    +{ }
    +
    +WRectArea::WRectArea(double x, double y, double width, double height)
    +  : x_(static_cast<int>(x)),
    +    y_(static_cast<int>(y)),
    +    width_(static_cast<int>(width)),
    +    height_(static_cast<int>(height))
    +{ }
    +
    +WRectArea::WRectArea(const WRectF& rect)
    +  : x_(static_cast<int>(rect.x())),
    +    y_(static_cast<int>(rect.y())),
    +    width_(static_cast<int>(rect.width())),
    +    height_(static_cast<int>(rect.height()))
    +{ }
    +
    +void WRectArea::setX(int x)
    +{
    +  x_ = x;
    +  
    +  repaint();
    +}
    +
    +void WRectArea::setY(int y)
    +{
    +  y_ = y;
    +  
    +  repaint();
    +}
    +
    +void WRectArea::setWidth(int width)
    +{
    +  width_ = width;
    +
    +  repaint();
    +}
    +
    +void WRectArea::setHeight(int height)
    +{
    +  height_ = height;
    +
    +  repaint();
    +}
    +
    +void WRectArea::updateDom(DomElement& element, bool all)
    +{
    +  element.setAttribute("shape", "rect");
    +
    +  std::stringstream coords;
    +
    +  if (x_ == 0 && y_ == 0 && width_ == 0 && height_ == 0)
    +    coords << "0%,0%,100%,100%";
    +  else
    +    coords << x_ << ',' << y_ << ',' << (x_ + width_) << ',' << (y_ + height_);
    +  element.setAttribute("coords", coords.str());
    +
    +  WAbstractArea::updateDom(element, all);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRectF b/wt-3.1.7a/src/Wt/WRectF
    new file mode 100644
    index 0000000..17bc760
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRectF
    @@ -0,0 +1,217 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WRECTF_H_
    +#define WRECTF_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WPointF;
    +
    +/*! \class WRectF Wt/WRectF Wt/WRectF
    + *  \brief Utility class that defines a rectangle.
    + *
    + * The rectangle is defined by a top-left point and a width and height.
    + *
    + * \ingroup painting
    + */
    +class WT_API WRectF
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * \if cpp
    +   * Constructs a \p null rectangle.
    +   * 
    +   * \sa isNull()
    +   * \elseif java
    +   * Constructs a rectangle from top left point (<i>x=0</i>, \p y=0)
    +   * and size <i>width=0</i> x \p height=0.
    +   * \endif
    +   */
    +  WRectF();
    +
    +  /*! \brief Creates a rectangle.
    +   *
    +   * Constructs a rectangle with top left point (<i>x</i>, \p y)
    +   * and size <i>width</i> x \p height.
    +   */
    +  WRectF(double x, double y, double width, double height);
    +
    +  /*! \brief Creates a rectangle.
    +   *
    +   * Constructs a rectangle from the two points \p topLeft and
    +   * \p bottomRight.
    +   *
    +   * If you want to create a rectangle from two arbitrary corner points,
    +   * you can use this constructor too, but should call normalized()
    +   * afterwords.
    +   */
    +  WRectF(const WPointF& topLeft, const WPointF& bottomRight);
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Internal assign method. 
    +   */
    +  WRectF& operator= (const WRectF& rhs);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Comparison operator.
    +   */
    +  bool operator== (const WRectF& rhs) const;
    +  bool operator!= (const WRectF& rhs) const;
    +
    +  /*! \brief Checks for a <i>null</i> rectangle.
    +   *
    +   * \sa WRectF()
    +   */
    +  bool isNull() const;
    +
    +  /*! \brief Determines whether or not this rectangle is empty. 
    +   *
    +   * A rectangle is empty if its width or its height is less than 
    +   * or equal to zero.
    +   */
    +  bool isEmpty() const;
    +
    +  /*! \brief Sets the X-position of the left side.
    +   *
    +   * The right side of the rectangle does not move, and as a result,
    +   * the rectangle may be resized.
    +   */
    +  void setX(double x);
    +
    +  /*! \brief Sets the Y-position of the top side.
    +   *
    +   * The bottom side of the rectangle does not move, and as a result,
    +   * the rectangle may be resized.
    +   */
    +  void setY(double y);
    +
    +  /*! \brief Sets the width.
    +   *
    +   * The right side of the rectangle may move, but does not change the X
    +   * position of the left side.
    +   */
    +  void setWidth(double width) { width_ = width; }
    +
    +  /*! \brief Sets the Y-position of the top side.
    +   *
    +   * The bottom side of the rectangle may move, but does not change
    +   * the Y position of the top side.
    +   */
    +  void setHeight(double height) { height_ = height; }
    +
    +  /*! \brief Returns the X-position of the left side.
    +   *
    +   * This is equivalent to left().
    +   *
    +   * \sa y(), left()
    +   */
    +  double x() const { return x_; }
    +
    +  /*! \brief Returns the Y-position of the top side.
    +   *
    +   * This is equivalent to top().
    +   *
    +   * \sa x(), top()
    +   */
    +  double y() const { return y_; }
    +
    +  /*! \brief Returns the width.
    +   *
    +   * \sa height()
    +   */
    +  double width() const { return width_; }
    +
    +  /*! \brief Returns the height.
    +   *
    +   * \sa width()
    +   */
    +  double height() const { return height_; }
    +
    +  /*! \brief Returns the X position of the left side.
    +   *
    +   * \sa x(), right()
    +   */
    +  double left() const { return x_; }
    +
    +  /*! \brief Returns the Y position of the top side.
    +   *
    +   * \sa y(), bottom()
    +   */
    +  double top() const { return y_; }
    +
    +  /*! \brief Returns the X position of the right side.
    +   *
    +   * \sa left()
    +   */
    +  double right() const { return x_ + width_; }
    +
    +  /*! \brief Returns the Y position of the bottom side.
    +   *
    +   * \sa top()
    +   */
    +  double bottom() const { return y_ + height_; }
    +
    +  /*! \brief Returns the top left point.
    +   *
    +   * \sa left(), top()
    +   */
    +  WPointF topLeft() const;
    +
    +  /*! \brief Returns the top right point.
    +   *
    +   * \sa right(), top()
    +   */
    +  WPointF topRight() const;
    +
    +  /*! \brief Returns the center point.
    +   */
    +  WPointF center() const;
    +
    +  /*! \brief Returns the bottom left point.
    +   *
    +   * \sa left(), bottom()
    +   */
    +  WPointF bottomLeft() const;
    +
    +  /*! \brief Returns the bottom right point.
    +   *
    +   * \sa right(), bottom()
    +   */
    +  WPointF bottomRight() const;
    +
    +  /*! \brief Tests if a rectangle contains a point.
    +   */
    +  bool contains(const WPointF& p) const;
    +
    +  /*! \brief Tests if a rectangle contains a point.
    +   */
    +  bool contains(double x, double y) const;
    +
    +  /*! \brief Tests if two rectangles intersect.
    +   */
    +  bool intersects(const WRectF& other) const;
    +
    +  /*! \brief Makes the union of to rectangles.
    +   */
    +  WRectF united(const WRectF& other) const;
    +
    +  /*! \brief Returns a normalized rectangle.
    +   *
    +   * A normalized rectangle has a positive width and height.
    +   */
    +  WRectF normalized() const;
    +
    +private:
    +  double x_, y_, width_, height_;
    +};
    +
    +}
    +
    +#endif // WRECTF_H_
    diff --git a/wt-3.1.7a/src/Wt/WRectF.C b/wt-3.1.7a/src/Wt/WRectF.C
    new file mode 100644
    index 0000000..d016db8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRectF.C
    @@ -0,0 +1,171 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +
    +#include "Wt/WRectF"
    +#include "Wt/WPointF"
    +
    +namespace Wt {
    +
    +WRectF::WRectF()
    +  : x_(0), y_(0), width_(0), height_(0)
    +{ }
    +
    +WRectF::WRectF(double x, double y, double width, double height)
    +  : x_(x), y_(y), width_(width), height_(height)
    +{ }
    +
    +WRectF::WRectF(const WPointF& topLeft, const WPointF& bottomRight)
    +  : x_(topLeft.x()),
    +    y_(topLeft.y()),
    +    width_(bottomRight.x() - topLeft.x()),
    +    height_(bottomRight.y() - topLeft.y())
    +{ }
    +
    +#ifdef WT_TARGET_JAVA
    +WRectF& WRectF::operator=(const WRectF& rhs)
    +{
    +  x_ = rhs.x_;
    +  y_ = rhs.y_;
    +  width_ = rhs.width_;
    +  height_ = rhs.height_;
    +
    +  return *this;
    +}
    +#endif // WT_TARGET_JAVA
    +
    +bool WRectF::operator==(const WRectF& rhs) const
    +{
    +  return (x_ == rhs.x_ && y_ == rhs.y_
    +	  && width_ == rhs.width_ && height_ == rhs.height_);
    +}
    +
    +bool WRectF::operator!=(const WRectF& rhs) const
    +{
    +  return !(*this == rhs);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WRectF::isNull() const
    +{
    +  return x_ == 0 && y_ == 0 && width_ == 0 && height_ == 0;
    +}
    +#endif //WT_TARGET_JAVA
    +
    +bool WRectF::isEmpty() const
    +{
    +  return width_ <= 0 || height_ <= 0;
    +}
    +
    +void WRectF::setX(double x)
    +{
    +  width_ += (x_ - x);
    +  x_ = x;
    +}
    +
    +void WRectF::setY(double y)
    +{
    +  height_ += (y_ - y);
    +  y_ = y;
    +}
    +
    +WPointF WRectF::center() const
    +{
    +  return WPointF(x_ + width_/2, y_ + height_/2);
    +}
    +
    +WPointF WRectF::topLeft() const
    +{
    +  return WPointF(x_, y_);
    +}
    +
    +WPointF WRectF::topRight() const
    +{
    +  return WPointF(x_ + width_, y_);
    +}
    +
    +WPointF WRectF::bottomLeft() const
    +{
    +  return WPointF(x_, y_ + height_);
    +}
    +
    +WPointF WRectF::bottomRight() const
    +{
    +  return WPointF(x_ + width_, y_ + height_);
    +}
    +
    +bool WRectF::contains(double x, double y) const
    +{
    +  return x >= x_ && x <= (x_ + width_) && y >= y_ && y <= (y_ + height_);
    +}
    +
    +bool WRectF::contains(const WPointF& p) const
    +{
    +  return contains(p.x(), p.y());
    +}
    +
    +bool WRectF::intersects(const WRectF& other) const
    +{
    +  if (isEmpty() || other.isEmpty())
    +    return false;
    +  else {
    +    WRectF r1 = normalized();
    +    WRectF r2 = other.normalized();
    +
    +    bool intersectX = (r2.left() >= r1.left() && r2.left() <= r1.right())
    +      || (r2.right() >= r1.left() && r2.right() <= r1.right());
    +
    +    bool intersectY = (r2.top() >= r1.top() && r2.top() <= r1.bottom())
    +      || (r2.bottom() >= r1.top() && r2.bottom() <= r1.bottom());
    +
    +    return intersectX && intersectY;
    +  }
    +}
    +
    +WRectF WRectF::united(const WRectF& other) const
    +{
    +  if (isEmpty())
    +    return other;
    +  else if (other.isEmpty())
    +    return *this;
    +  else {
    +    WRectF r1 = normalized();
    +    WRectF r2 = other.normalized();
    +
    +    double l = std::min(r1.left(), r2.left());
    +    double r = std::max(r1.right(), r2.right());
    +    double t = std::min(r1.top(), r2.top());
    +    double b = std::max(r1.bottom(), r2.bottom());
    +
    +    return WRectF(l, t, r - l, b - t);
    +  }
    +}
    +
    +WRectF WRectF::normalized() const
    +{
    +  double x, y, w, h;
    +
    +  if (width_ > 0) {
    +    x = x_;
    +    w = width_;
    +  } else {
    +    x = x_ + width_;
    +    w = -width_;
    +  }
    +
    +  if (height_ > 0) {
    +    y = y_;
    +    h = height_;
    +  } else {
    +    y = y_ + height_;
    +    h = -height_;
    +  }
    +
    +  return WRectF(x, y, w, h);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRegExp b/wt-3.1.7a/src/Wt/WRegExp
    new file mode 100644
    index 0000000..d16d9ef
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRegExp
    @@ -0,0 +1,49 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WREGEXP_H_
    +#define WREGEXP_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +
    +#ifdef WT_HAVE_GNU_REGEX
    +#include <regex.h>
    +#else
    +#include <boost/regex.hpp>
    +#endif // WT_HAVE_GNU_REGEX
    +
    +namespace Wt {
    +
    +class WT_API WRegExp {
    +public:
    +  WRegExp();
    +  WRegExp(const WT_USTRING& pattern);
    +  ~WRegExp();
    +
    +  void setPattern(const WT_USTRING& pattern, WFlags<RegExpFlag> flags);
    +  WT_USTRING pattern() const;
    +  WFlags<RegExpFlag> flags() const { return flags_; }
    +
    +  bool isValid() const;
    +
    +  bool exactMatch(const WT_USTRING& s) const;
    +
    +private:
    +  WFlags<RegExpFlag> flags_;
    +
    +#ifndef WT_HAVE_GNU_REGEX
    +  boost::regex rx_;
    +#else
    +  regex_t    rx_;
    +  WT_USTRING pattern_;
    +  bool       valid_;
    +#endif // WT_HAVE_GNU_REGEX
    +};
    +
    +}
    +
    +#endif // WREGEXP_H_
    diff --git a/wt-3.1.7a/src/Wt/WRegExp.C b/wt-3.1.7a/src/Wt/WRegExp.C
    new file mode 100644
    index 0000000..54c215a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRegExp.C
    @@ -0,0 +1,87 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WRegExp"
    +
    +namespace Wt {
    +
    +WRegExp::WRegExp()
    +{
    +#ifdef WT_HAVE_GNU_REGEX
    +  valid_ = false;
    +#endif
    +}
    +
    +WRegExp::WRegExp(const WT_USTRING& pattern)
    +#ifndef WT_HAVE_GNU_REGEX
    +  : rx_(pattern.toUTF8())
    +{ }
    +#else
    +{
    +  valid_ = false;
    +  setPattern(pattern);
    +}
    +#endif
    +
    +WRegExp::~WRegExp()
    +{
    +#ifdef WT_HAVE_GNU_REGEX
    +  if (valid_)
    +    regfree(&rx_);
    +#endif // WT_HAVE_GNU_REGEX
    +}
    +
    +void WRegExp::setPattern(const WT_USTRING& pattern,
    +			 WFlags<RegExpFlag> flags)
    +{
    +  flags_ = flags;
    +
    +#ifndef WT_HAVE_GNU_REGEX
    +  boost::regex::flag_type opt = boost::regex::normal;
    +  if (flags & MatchCaseInsensitive)
    +    opt |= boost::regex::icase;
    +  rx_ = boost::regex(pattern.toUTF8(), opt);
    +#else
    +  if (valid_)
    +    regfree(&rx_);
    +  pattern_ = pattern;
    +
    +  int opt = REG_EXTENDED;
    +  if (flags & MatchCaseInsensitive)
    +    opt |= REG_ICASE;
    +
    +  valid_ = regcomp(&rx_, pattern.toUTF8().c_str(), opt) == 0;
    +#endif
    +}
    +
    +WT_USTRING WRegExp::pattern() const
    +{
    +#ifndef WT_HAVE_GNU_REGEX
    +  return WT_USTRING::fromUTF8(rx_.str());
    +#else
    +  return pattern_;
    +#endif
    +}
    +
    +bool WRegExp::isValid() const
    +{
    +#ifndef WT_HAVE_GNU_REGEX
    +  return rx_.status() == 0;
    +#else
    +  return valid_;
    +#endif
    +}
    +
    +bool WRegExp::exactMatch(const WT_USTRING& s) const
    +{
    +#ifndef WT_HAVE_GNU_REGEX
    +  return boost::regex_match(s.toUTF8(), rx_);
    +#else
    +  return regexec(&rx_, s.toUTF8().c_str(), 0, 0, 0) == 0;
    +#endif
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WRegExpValidator b/wt-3.1.7a/src/Wt/WRegExpValidator
    new file mode 100644
    index 0000000..a683cbb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRegExpValidator
    @@ -0,0 +1,136 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WREGEXPVALIDATOR_H_
    +#define WREGEXPVALIDATOR_H_
    +
    +#include <limits>
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +class WRegExp;
    +
    +/*! \class WRegExpValidator Wt/WRegExpValidator Wt/WRegExpValidator
    + *  \brief A validator that checks user input against a regular expression.
    + *
    + * This validator checks whether user input is matched by the given
    + * (perl-like) regular expression.
    + *
    + * The following perl features are not supported (since client-side validation
    + * cannot handle them):
    + * <ul>
    + *   <li>No Lookbehind support, i.e. the constructs (?<=text) and (?<!text).
    + *     </li>
    + *   <li>No atomic grouping, i.e. the construct (?>group).</li>
    + *   <li>No conditional expressions, i.e. the consturct (?ifthen|else).</li>
    + * </ul>
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WLineEdit *lineEdit = new Wt::WLineEdit(this);
    + * // an email address validator
    + * Wt::WRegExpValidator *validator = new Wt::WRegExpValidator("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}");
    + * lineEdit->setValidator(validator);
    + * lineEdit->setText("koen@emweb.be");
    + * \endcode
    + * \elseif java
    + * \code
    + * WLineEdit lineEdit = new WLineEdit(this);
    + * // an email address validator
    + * WRegExpValidator validator = new WRegExpValidator("[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}");
    + * lineEdit.setValidator(validator);
    + * lineEdit.setText("pieter@emweb.be");
    + * \endcode
    + * \endif
    + *
    + * \note This validator does not fully support unicode: it matches on the
    + * UTF8-encoded representation of the string.
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WRegExpValidator.Invalid: Invalid input
    + */
    +class WT_API WRegExpValidator : public WValidator
    +{
    +public:
    +  /*! \brief Sets a new regular expression validator.
    +   */
    +  WRegExpValidator(WObject *parent = 0);
    +
    +  /*! \brief Sets a new regular expression validator that accepts input
    +   *         that matches the given regular expression.
    +   *
    +   * This constructs a validator that matches the perl regular
    +   * expression \p expr.
    +   */
    +  WRegExpValidator(const WT_USTRING& pattern, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WRegExpValidator();
    +
    +  /*! \brief Sets the regular expression for valid input.
    +   *
    +   * Sets the perl regular expression \p expr.
    +   */
    +  void setRegExp(const WT_USTRING& pattern);
    +
    +  /*! \brief Returns the regular expression for valid input.
    +   *
    +   * Returns the perl regular expression.
    +   */
    +  WT_USTRING regExp() const;
    +
    +  /*! \brief Sets regular expression matching flags.
    +   */
    +  void setFlags(WFlags<RegExpFlag> flags);
    +
    +  /*! \brief Returns regular expression matching flags.
    +   */
    +  WFlags<RegExpFlag> flags() const;
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * The input is considered valid only when it is blank for a non-mandatory
    +   * field, or matches the regular expression.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +  /*! \brief Sets the text to be shown if no match can be found.
    +   *
    +   * Sets the text to be shown if no match can be found.
    +   */
    +  void setNoMatchText(const WString& text);
    +
    +  /*! \brief Sets the message to display when the input does not match.
    +   *
    +   * The default value is "Invalid input".
    +   */
    +  void setInvalidNoMatchText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when the input does not match.
    +   *
    +   * \sa setInvalidNoMatchText(const WString&)
    +   */
    +  WString invalidNoMatchText() const;
    +
    +protected:
    +  std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +private:
    +  WRegExp *regexp_;
    +  WString  noMatchText_;
    +};
    +
    +}
    +
    +#endif // WREGEXPVALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WRegExpValidator.C b/wt-3.1.7a/src/Wt/WRegExpValidator.C
    new file mode 100644
    index 0000000..7b54a2e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WRegExpValidator.C
    @@ -0,0 +1,148 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/regex.hpp>
    +
    +#include "Wt/WRegExpValidator"
    +#include "Wt/WRegExp"
    +#include "Wt/WString"
    +
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WRegExpValidator::WRegExpValidator(WObject *parent)
    +  : WValidator(parent),
    +    regexp_(0)
    +{ }
    +
    +WRegExpValidator::WRegExpValidator(const WT_USTRING& pattern, WObject *parent)
    +  : WValidator(parent),
    +    regexp_(new WRegExp(pattern))
    +{ }
    +
    +WRegExpValidator::~WRegExpValidator()
    +{
    +  delete regexp_;
    +}
    +
    +void WRegExpValidator::setRegExp(const WT_USTRING& pattern)
    +{
    +  if (!regexp_)
    +    regexp_ = new WRegExp(pattern);
    +  else
    +    regexp_->setPattern(pattern, regexp_->flags());
    +
    +  repaint();
    +}
    +
    +void WRegExpValidator::setFlags(WFlags<RegExpFlag> flags)
    +{
    +  if (!regexp_)
    +    regexp_ = new WRegExp(".*");
    +
    +  regexp_->setPattern(regexp_->pattern(), flags);
    +}
    +
    +WFlags<RegExpFlag> WRegExpValidator::flags() const
    +{
    +  if (regexp_)
    +    return regexp_->flags();
    +  else 
    +    return (int)0;
    +}
    +
    +WT_USTRING WRegExpValidator::regExp() const
    +{
    +  return regexp_ ? regexp_->pattern() : WT_USTRING();
    +}
    +
    +void WRegExpValidator::setNoMatchText(const WString& text)
    +{
    +  setInvalidNoMatchText(text);
    +}
    +
    +void WRegExpValidator::setInvalidNoMatchText(const WString& text)
    +{
    +  noMatchText_ = text;
    +  repaint();
    +}
    +
    +WString WRegExpValidator::invalidNoMatchText() const
    +{
    +  if (!noMatchText_.empty())
    +    return noMatchText_;
    +  else
    +    return WString::tr("Wt.WRegExpValidator.Invalid");
    +}
    +
    +WValidator::State WRegExpValidator::validate(WT_USTRING& input) const
    +{
    +  if (isMandatory()) {
    +    if (input.empty())
    +      return InvalidEmpty;
    +  } else {
    +    if (input.empty())
    +      return Valid;
    +  }
    +
    +  if (!regexp_ || regexp_->exactMatch(input))
    +    return Valid;
    +  else
    +    return Invalid;
    +}
    +
    +std::string WRegExpValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  std::string js = "function(e,te,tn){if(e.value.length==0)";
    +
    +  if (isMandatory())
    +    js += "return {valid:false,message:te};";
    +  else
    +    js += "return {valid:true};";
    +
    +  if (regexp_) {
    +    std::string s = regexp_->pattern().toUTF8();
    +    Wt::Utils::replace(s, '/', "\\/");
    +
    +    js += "var r=/^" + s + "$/";
    +
    +#ifndef WT_TARGET_JAVA
    +    WFlags<RegExpFlag> flags = regexp_->flags();
    +#else
    +    int flags = regexp_->flags();
    +#endif
    +
    +    if (flags & MatchCaseInsensitive)
    +      js += "i";
    +
    +    js += "; return {valid:r.test(e.value),message:tn};";
    +  } else
    +    js += "return {valid:true};";
    +
    +  js += "}(" + jsRef + ',' + invalidBlankText().jsStringLiteral() + ','
    +    + invalidNoMatchText().jsStringLiteral() + ')';
    +
    +  return js;
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WRegExpValidator::createExtConfig(std::ostream& config) const
    +{
    +  std::string s = regexp_ ? regexp_->pattern().toUTF8() : "";
    +  Wt::Utils::replace(s, '/', "\\/");
    +
    +  config << ",regex:/^" << s << "$/";
    +
    +  if (!noMatchText_.empty())
    +    config << ",regexText:" << noMatchText_.jsStringLiteral();
    +
    +  WValidator::createExtConfig(config);
    +}
    +#endif //WT_TARGET_JAVA
    +
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WResource b/wt-3.1.7a/src/Wt/WResource
    new file mode 100644
    index 0000000..d9fa3c6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WResource
    @@ -0,0 +1,353 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WRESOURCE_H_
    +#define WRESOURCE_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WGlobal>
    +#include <Wt/WSignal>
    +
    +#include <iostream>
    +
    +namespace boost {
    +  class recursive_mutex;
    +}
    +
    +namespace Wt {
    +
    +  class WebRequest;
    +  class WebResponse;
    +  class WebSession;
    +
    +  namespace Http {
    +    class Request;
    +    class Response;
    +    class ResponseContinuation;
    +  }
    +
    +/*! \class WResource Wt/WResource Wt/WResource
    + *  \brief An object which can be rendered in the HTTP protocol.
    + *
    + * <h3>Usage</h3>
    + *
    + * Besides the main page, other objects may be rendered as additional
    + * resources, for example documents or images. Classes such as WAnchor
    + * or WImage can use a resource instead of a URL to provide their
    + * contents. Whenever the resource has changed, you should call the
    + * setChanged() method. setChanged() will make sure that the browser will
    + * use a new version of the resource by generating a new URL, and emits the
    + * dataChanged() signal to make those that refer to the resource aware
    + * that they should update their references to the new URL.
    + *
    + * You can help the browser to start a suitable helper application to
    + * handle the downloaded resource, or suggest to the user a suitable
    + * filename for saving the resource, by setting an appropriate file
    + * name using suggestFileName().
    + *
    + * To serve resources that you create on the fly, you need to specialize
    + * this class and implement handleRequest().
    + * 
    + * \if cpp
    + * Example for a custom resource implementation:
    + * \code
    + * class MyResource : public Wt::WResource
    + * {
    + * public:
    + *   MyResource(Wt::WObject *parent = 0)
    + *     : Wt::WResource(parent)
    + *   {
    + *     suggestFileName("data.txt");
    + *   }
    + *
    + *   ~MyResource() {
    + *     beingDeleted(); // see "Concurrency issues" below.
    + *   }
    + *
    + *   void handleRequest(const Wt::Http::Request& request,
    + *                      Wt::Http::Response& response) {
    + *     response.setMimeType("plain/text");
    + *     response.out() << "I am a text file." << std::endl;
    + *   }
    + * };
    + * \endcode
    + * \endif
    + *
    + * <h3>Concurrency issues</h3>
    + *
    + * Because of the nature of the web, a resource may be requested one
    + * time or multiple times at the discretion of the browser, and
    + * therefore your resource should in general not have any side-effects
    + * except for what is needed to render its own contents. Unlike event
    + * notifications to a %Wt application, resource requests are not
    + * serialized, but are handled concurrently. You need to grab the
    + * application lock if you want to access or modify other widget state
    + * from within the resource. When deleting a resource, any pending
    + * request is cancelled first. For this mechanism to work you need to
    + * specialize the destructor and call beingDeleted(). This method may
    + * safely be called multiple times (i.e. from within each destructor
    + * in the hierachy).
    + *
    + * <h3>Continuations for asynchronous I/O</h3>
    + *
    + * With respect to I/O, the current strategy is to cache the whole
    + * response first in a buffer and use async I/O to push the data to
    + * the client, in order to free the thread while waiting for I/O on a
    + * possibly slow link. You do not necessarily have to provide all
    + * output at once, instead you can obtain a Http::ResponseContinuation
    + * object for a response, construct the response piecewise. A new
    + * request() will be made to continue the response.
    + *
    + * Example for a custom resource implementation using continuations:
    + * \code
    + * class MyResource : public Wt::WResource
    + * {
    + * public:
    + *   MyResource(int iterations, Wt::WObject *parent = 0)
    + *     : Wt::WResource(parent)
    + *     : iterations_(iterations)
    + *   {
    + *     suggestFileName("data.txt");
    + *   }
    + *
    + *   ~MyResource() {
    + *     beingDeleted();
    + *   }
    + *
    + *   void handleRequest(const Wt::Http::Request& request,
    + *                      const Wt::Http::Response& response) {
    + *     // see if this request is for a continuation:
    + *     Wt::Http::ResponseContinuation *continuation = request.continuation();
    + *
    + *     // calculate the current start
    + *     int iteration = continuation ? boost::any_cast<int>(continuation->data()) : 0;
    + *     if (iteration == 0)
    + *       response.setMimeType("plain/text");
    + *
    + *     int last = std::min(iterations_, iteration + 100);
    + *     for (int i = iteration; i < last; ++i)
    + *       response.out() << "Data item " << i << std::endl;
    + *
    + *     // if we have not yet finished, create a continuation to serve more
    + *     if (last < iterations_)
    + *       continuation = response.createContinuation();
    + *       // remember what to do next
    + *       continuation->setData(last);
    + *     }
    + *   }
    + *
    + * private:
    + *   int iterations_;
    + * };
    + * \endcode
    + *
    + * <h3>Global and private resources</h3>
    + *
    + * By default, a resource is private to an application: access to it
    + * is protected by same secret session Id that protects any other
    + * access to the application.
    + *
    + * You can also deploy static resources, which are global, using
    + * WServer::addResource().
    + *
    + * <h3>Monitoring upload progress</h3>
    + *
    + * A resource may also handle the uploading of files (in fact,
    + * WFileUpload uses a WResource to do exactly that) or transmission of
    + * other large bodies of data being POST'ed or PUT to the resource
    + * URL. For these requests, it may be convenient to enable upload
    + * progress monitoring using setUploadProgress(), which allows you to
    + * be notified of data being received.
    + *
    + * \sa WAnchor, WImage
    + */
    +class WT_API WResource : public WObject
    +{
    +public:
    +  /*! \brief Creates a new resource.
    +   */
    +  WResource(WObject* parent = 0);
    +
    +  /*! \brief Destroys the resource.
    +   *
    +   * When specializing a resource, you MUST call beingDeleted() from
    +   * within the specialized destructor, in order to stop any further
    +   * requests to the resource.
    +   */
    +  ~WResource();
    +
    +  /*! \brief Suggests a filename to the user for the data streamed by this
    +   *         resource.
    +   *
    +   * For resources, intended to be downloaded by the user, suggest a
    +   * name used for saving. The filename extension may also help the
    +   * browser to identify the correct program for opening the resource.
    +   */
    +  void suggestFileName(const std::string& name);
    +
    +  /*! \brief Returns the suggested file name.
    +   *
    +   * \sa suggestFileName();
    +   */
    +  const std::string& suggestedFileName() const { return suggestedFileName_; }
    +
    +  /*! \brief Generates a new URL for this resource and emits the changed signal
    +   *
    +   * This does not work when the resource is deployed at an internal path using
    +   * setInternalPath().
    +   */
    +  void setChanged();
    +
    +  /*! \brief Sets an internal path for this resource.
    +   *
    +   * Using this method you can deploy the resource at a fixed path. Unless
    +   * you deploy using cookies for session tracking (not recommended), a
    +   * session identifier will be appended to the path.
    +   *
    +   * You should use internal paths that are different from internal paths
    +   * handled by your application (WApplication::setInternalPath()), if you
    +   * do not want a conflict between these two when the browser does not use
    +   * AJAX (and thus url fragments for its internal paths).
    +   *
    +   * The default value is empty. By default the URL for a resource is
    +   * unspecified and a URL will be generated by the library. 
    +   *
    +   * The internal path for a static resource is the deployment path
    +   * specified using WServer::addResource().
    +   */
    +  void setInternalPath(const std::string& path);
    +
    +  /*! \brief Returns the internal path.
    +   *
    +   * \sa setInternalPath().
    +   */
    +  std::string internalPath() const { return internalPath_; }
    +
    +  /*! \brief Generates an URL for this resource.
    +   *
    +   * Generates a new url that refers to this resource. The url is
    +   * unique to assure that it is not cached by the web browser, and
    +   * can thus be used to refer to a new "version" of the resource,
    +   * which can be indicated by emitting the dataChanged() signal.
    +   *
    +   * The old urls are not invalidated by calling this method.
    +   */
    +  const std::string& generateUrl();
    +
    +  /*! \brief Returns the current URL for this resource.
    +   *
    +   * Returns the url that references this resource.
    +   */
    +  const std::string& url() const;
    +
    +  /*! \brief Signal emitted when the data presented in this resource
    +   *         has changed.
    +   *
    +   * Widgets that reference the resource (such as anchors and images) will
    +   * make sure the new data is rendered.
    +   *
    +   * It is better to call setChanged() than to emit this signal. setChanged
    +   * generates a new URL for this resource to avoid caching problems and then
    +   * emits this signal.
    +   */
    +  Signal<>& dataChanged() { return dataChanged_; }
    +
    +  /*! \brief Indicate interest in upload progress.
    +   *
    +   * When supported, you can track upload progress using this
    +   * signal. While data is being received, and before handleRequest()
    +   * is called, progress information is indicated using
    +   * dataReceived().
    +   *
    +   * We envision that in the future support will depend on a
    +   * combination of browser and connector. Currently only the wthttp
    +   * connector provides support for this across all AJAX browsers. In
    +   * the future, we are likely to implement this also using JavaScript
    +   * File API features making it independent of connectors.
    +   *
    +   * The default value is \c false.
    +   */
    +  void setUploadProgress(bool enabled);
    +
    +  /*! \brief Signal emitted when data has been received for this resource.
    +   *
    +   * When this signal is emitted, you have the update lock to modify
    +   * the application. Because there is however no corresponding
    +   * request from the browser, any update to the user interface is not
    +   * immediately reflected in the client. To update the client
    +   * interface, you need to use a WTimer or enable \link
    +   * WApplication::enableUpdates() server-push\endlink.
    +   *
    +   * \sa setUploadProgress()
    +   */
    +  Signal< ::uint64_t, ::uint64_t >& dataReceived() { return dataReceived_; }
    +
    +  /*! \brief Stream the resource to a stream.
    +   *
    +   * This is a convenience method to serialize to a stream (for
    +   * example a file stream).
    +   */
    +  void write(WT_BOSTREAM& out,
    +	     const Http::ParameterMap& parameters = Http::ParameterMap(),
    +	     const Http::UploadedFileMap& files = Http::UploadedFileMap());
    +
    +  /*! \brief Handles a request.
    +   *
    +   * Reimplement this method so that a proper response is generated
    +   * for the given request. From the \p request object you can
    +   * access request parameters and whether the request is a
    +   * continuation request. In the \p response object, you should
    +   * set the mime type and stream the output data.
    +   *
    +   * A request may also concern a continuation, indicated in
    +   * Http::Request::continuation(), in which case the next part for a
    +   * previously created continuation should be served.
    +   *
    +   * While handling a request, which may happen at any time together
    +   * with event handling, the library makes sure that the resource is
    +   * not being concurrently deleted, but multiple requests may happend
    +   * simultaneously for a single resource.
    +   */
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response) = 0;
    +protected:
    +  /*! \brief Prepares the resource for deletion.
    +   *
    +   * When specializing a resource, you MUST call beingDeleted() from
    +   * within the specialized destructor, in order to stop any further
    +   * requests to the resource.
    +   */
    +  void beingDeleted();
    +
    +private:
    +#ifndef WT_TARGET_JAVA
    +  boost::shared_ptr<boost::recursive_mutex> mutex_;
    +#endif // WT_TARGET_JAVA
    +
    +  Signal<void> dataChanged_;
    +  Signal< ::uint64_t, ::uint64_t > dataReceived_;
    +
    +  bool beingDeleted_, trackUploadProgress_;
    +
    +  std::vector<Http::ResponseContinuation *> continuations_;
    +
    +  void doContinue(Http::ResponseContinuation *continuation);
    +  void handle(WebRequest *webRequest, WebResponse *webResponse,
    +	      Http::ResponseContinuation *continuation = 0);
    +
    +  std::string suggestedFileName_;
    +  std::string currentUrl_;
    +  std::string internalPath_;
    +
    +  friend class Http::ResponseContinuation;
    +  friend class WebSession;
    +  friend class WebController;
    +  friend class Configuration;
    +};
    +
    +}
    +
    +#endif // WRESOURCE_H_
    diff --git a/wt-3.1.7a/src/Wt/WResource.C b/wt-3.1.7a/src/Wt/WResource.C
    new file mode 100644
    index 0000000..576ac77
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WResource.C
    @@ -0,0 +1,203 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <string>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WResource"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +#include "WebController.h"
    +#include "WebRequest.h"
    +#include "WebSession.h"
    +#include "WtRandom.h"
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#ifdef WT_THREADED
    +#include <boost/thread/recursive_mutex.hpp>
    +#endif // WT_THREADED
    +
    +namespace Wt {
    +
    +WResource::WResource(WObject* parent)
    +  : WObject(parent),
    +    dataChanged_(this),
    +    beingDeleted_(false),
    +    trackUploadProgress_(false)
    +{ 
    +#ifdef WT_THREADED
    +  mutex_.reset(new boost::recursive_mutex());
    +#endif // WT_THREADED
    +}
    +
    +void WResource::beingDeleted()
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(*mutex_);
    +  beingDeleted_ = true;
    +#endif // WT_THREADED
    +}
    +
    +WResource::~WResource()
    +{
    +  beingDeleted();
    +
    +  for (unsigned i = 0; i < continuations_.size(); ++i) {
    +    continuations_[i]->stop();
    +    delete continuations_[i];
    +  }
    +
    +  if (wApp) {
    +    wApp->removeExposedResource(this);
    +    if (trackUploadProgress_)
    +      WebSession::instance()->controller()->removeUploadProgressUrl(url());
    +  }
    +}
    +
    +void WResource::setUploadProgress(bool enabled)
    +{
    +  if (trackUploadProgress_ != enabled) {
    +    trackUploadProgress_ = enabled;
    +
    +    WebController *c = WebSession::instance()->controller();
    +    if (enabled)
    +      c->addUploadProgressUrl(url());
    +    else
    +      c->removeUploadProgressUrl(url());
    +  }
    +}
    +
    +void WResource::doContinue(Http::ResponseContinuation *continuation)
    +{
    +  WebResponse *webResponse = continuation->response();
    +  WebRequest *webRequest = webResponse;
    +
    +  try {
    +    handle(webRequest, webResponse, continuation);
    +  } catch (std::exception& e) {
    +    std::cerr << "Exception while handling resource continuation: "
    +	      << e.what() << std::endl;
    +  } catch (...) {
    +    std::cerr << "Exception while handling resource continuation." << std::endl;
    +  }
    +}
    +
    +void WResource::handle(WebRequest *webRequest, WebResponse *webResponse,
    +		       Http::ResponseContinuation *continuation)
    +{
    +#ifdef WT_THREADED
    +  boost::shared_ptr<boost::recursive_mutex> mutex = mutex_;
    +  boost::recursive_mutex::scoped_lock lock(*mutex);
    +
    +  if (beingDeleted_)
    +    return;
    +
    +  // when we are handling a continuation, we do not have the session
    +  // lock
    +  if (!continuation) {
    +    WebSession::Handler *h = WebSession::Handler::instance();
    +    if (h && h->lock().owns_lock())
    +      h->lock().unlock();
    +  }
    +#endif // WT_THREADED
    +
    +  if (continuation)
    +    continuation->resource_ = 0;
    +
    +  Http::Request  request(*webRequest, continuation);
    +  Http::Response response(this, webResponse, continuation);
    +
    +  if (!continuation && !suggestedFileName_.empty())
    +    response.addHeader("Content-Disposition",
    +		       "attachment;filename=" + suggestedFileName_);
    +
    +  handleRequest(request, response);
    +
    +  if (!response.continuation_ || !response.continuation_->resource_) {
    +    if (response.continuation_) {
    +      Utils::erase(continuations_, response.continuation_);
    +      delete response.continuation_;
    +    }
    +    webResponse->flush(WebResponse::ResponseDone);
    +  } else
    +    webResponse->flush(WebResponse::ResponseFlush,
    +		       boost::bind(&Http::ResponseContinuation::doContinue,
    +				   response.continuation_));
    +}
    +
    +void WResource::suggestFileName(const std::string& name)
    +{
    +  suggestedFileName_ = name;
    +
    +  generateUrl();
    +}
    +
    +void WResource::setInternalPath(const std::string& path)
    +{
    +  internalPath_ = path;
    +
    +  generateUrl();
    +}
    +
    +void WResource::setChanged()
    +{
    +  generateUrl();
    +
    +  dataChanged_.emit();
    +}
    +
    +const std::string& WResource::url() const
    +{
    +  if (currentUrl_.empty())
    +    (const_cast<WResource *>(this))->generateUrl();
    +
    +  return currentUrl_;
    +}
    +
    +const std::string& WResource::generateUrl()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (app) {
    +    WebController *c = 0;
    +    if (trackUploadProgress_)
    +      c = WebSession::instance()->controller();
    +
    +    if (c && !currentUrl_.empty())
    +      c->removeUploadProgressUrl(currentUrl_);
    +    currentUrl_ = app->addExposedResource(this, internalPath_);
    +    if (c)
    +      c->addUploadProgressUrl(currentUrl_);    
    +  } else
    +    currentUrl_ = internalPath_;
    +
    +  return currentUrl_;
    +}
    +
    +void WResource::write(WT_BOSTREAM& out,
    +		      const Http::ParameterMap& parameters,
    +		      const Http::UploadedFileMap& files)
    +{
    +  Http::Request  request(parameters, files);
    +  Http::Response response(this, out);
    +
    +  handleRequest(request, response);
    +
    +  // While the resource indicates more data to be sent, get it too.
    +  while (response.continuation_	&& response.continuation_->resource_) {
    +    response.continuation_->resource_ = 0;
    +    request.continuation_ = response.continuation_;
    +
    +    handleRequest(request, response);
    +  }
    +
    +  delete response.continuation_;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WScrollArea b/wt-3.1.7a/src/Wt/WScrollArea
    new file mode 100644
    index 0000000..d10ab4d
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WScrollArea
    @@ -0,0 +1,118 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSCROLLAREA_H_
    +#define WSCROLLAREA_H_
    +
    +#include <Wt/WWebWidget>
    +
    +namespace Wt {
    +
    +class WScrollBar;
    +
    +/*! \class WScrollArea Wt/WScrollArea Wt/WScrollArea
    + *  \brief A widget that adds scrolling capabilities to its content.
    + *
    + * Use a WScrollArea to add scrolling capabilities to another widget.
    + * When the content is bigger than the WScrollArea, scrollbars are added
    + * so that the user can still view the entire content.
    + *
    + * Use setScrollBarPolicy() to configure if and when the scrollbars may
    + * appear.
    + *
    + * In many cases, it might be easier to use the CSS overflow property
    + * on a WContainerWidget (see
    + * WContainerWidget::setOverflow()). However, this class will behave
    + * better when used inside a layout manager: in that case it will make
    + * sure horizontal scrolling works properly, since otherwise the
    + * layout manager would overflow rather than scrollbars appear.
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget is rendered using a <tt>&lt;div&gt;</tt> with a CSS
    + * overflow attribute. When in a layout manager it is positioned
    + * absolutely. It can be styled using inline or external CSS as
    + * appropriate.
    + */
    +class WT_API WScrollArea : public WWebWidget
    +{
    +public:
    +  /*! brief Policy for showing a scrollbar.
    +   */
    +  enum ScrollBarPolicy {
    +    ScrollBarAsNeeded,	//!< Automatic
    +    ScrollBarAlwaysOff, //!< Always show a scrollbar
    +    ScrollBarAlwaysOn   //!< Never show a scrollbar
    +  };
    +
    +  /*! \brief Creates a scroll area.
    +   */
    +  WScrollArea(WContainerWidget *parent = 0);
    +
    +  ~WScrollArea();
    +
    +  /*! \brief Sets the widget that is the contents of the scroll area.
    +   *
    +   * Setting a new widget will delete the previously set widget.
    +   */
    +  void setWidget(WWidget *widget);
    +
    +  /*! \brief Remove the widget content.
    +   */
    +  WWidget *takeWidget();
    +
    +  /*! \brief Returns the widget content.
    +   */
    +  WWidget *widget() const { return widget_; }
    +
    +  /*! \brief Returns the horizontal scrollbar.
    +   */
    +  WScrollBar *horizontalScrollBar() const { return horizontalScrollBar_; }
    +
    +  /*! \brief Returns the vertical scrollbar.
    +   */
    +  WScrollBar *verticalScrollBar() const { return verticalScrollBar_; }
    +
    +  /*! \brief Returns the policy for both scrollbars.
    +   *
    +   * \sa setHorizontalScrollBarPolicy(), setVerticalScrollBarPolicy()
    +   */
    +  void setScrollBarPolicy(ScrollBarPolicy scrollBarPolicy);
    +
    +  /*! \brief Returns the horizontal scroll bar policy.
    +   *
    +   * \sa setScrollBarPolicy()
    +   */
    +  void setHorizontalScrollBarPolicy(ScrollBarPolicy scrollBarPolicy);
    +
    +  /*! \brief Returns the vertical scroll bar policy.
    +   *
    +   * \sa setScrollBarPolicy()
    +   */
    +  void setVerticalScrollBarPolicy(ScrollBarPolicy scrollBarPolicy);
    +
    +private:
    +  WWidget *widget_;
    +  bool widgetChanged_;
    +
    +  WScrollBar *horizontalScrollBar_;
    +  WScrollBar *verticalScrollBar_;
    +  bool scrollBarChanged_;
    +
    +  ScrollBarPolicy horizontalScrollBarPolicy_, verticalScrollBarPolicy_;
    +  bool scrollBarPolicyChanged_;
    +
    +  void scrollBarChanged();
    +  friend class WScrollBar;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +};
    +
    +}
    +
    +#endif // WSCROLLAREA
    diff --git a/wt-3.1.7a/src/Wt/WScrollArea.C b/wt-3.1.7a/src/Wt/WScrollArea.C
    new file mode 100644
    index 0000000..3de5c84
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WScrollArea.C
    @@ -0,0 +1,155 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WScrollArea"
    +#include "Wt/WScrollBar"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WScrollArea::WScrollArea(WContainerWidget *parent)
    +  : WWebWidget(parent),
    +    widget_(0),
    +    widgetChanged_(false),
    +    scrollBarChanged_(false),
    +    horizontalScrollBarPolicy_(ScrollBarAsNeeded),
    +    verticalScrollBarPolicy_(ScrollBarAsNeeded),
    +    scrollBarPolicyChanged_(false)
    +{
    +  setInline(false);
    +
    +  horizontalScrollBar_ = new WScrollBar(this, Horizontal);
    +  verticalScrollBar_ = new WScrollBar(this, Vertical);
    +}
    +
    +WScrollArea::~WScrollArea()
    +{
    +  delete horizontalScrollBar_;
    +  delete verticalScrollBar_;
    +}
    +
    +void WScrollArea::scrollBarChanged()
    +{
    +  scrollBarChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WScrollArea::setWidget(WWidget *widget)
    +{
    +  delete widget_;
    +
    +  widget_ = widget;
    +  widgetChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  if (widget)
    +    widget->setParentWidget(this);
    +}
    +
    +WWidget *WScrollArea::takeWidget()
    +{
    +  WWidget *result = widget_;
    +  widget_ = 0;
    +
    +  setWidget(0);
    +
    +  if (result)
    +    result->setParentWidget(0);
    +
    +  return result;
    +}
    +
    +void WScrollArea::setHorizontalScrollBarPolicy(ScrollBarPolicy policy)
    +{
    +  horizontalScrollBarPolicy_ = policy;
    +  scrollBarPolicyChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WScrollArea::setVerticalScrollBarPolicy(ScrollBarPolicy policy)
    +{
    +  verticalScrollBarPolicy_ = policy;
    +  scrollBarPolicyChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WScrollArea::setScrollBarPolicy(ScrollBarPolicy policy)
    +{
    +  horizontalScrollBarPolicy_ = verticalScrollBarPolicy_ = policy;
    +  scrollBarPolicyChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WScrollArea::updateDom(DomElement& element, bool all)
    +{
    +  if (all)
    +    if (isInLayout() && WApplication::instance()->environment().ajax()) {
    +      setJavaScriptMember("wtResize",
    +			  "function(s, w, h) {"
    +			  "s.style.width=w+'px';"
    +			  "s.style.height=h+'px';"
    +			  "}");
    +    }
    +
    +  if (widgetChanged_ || all) {
    +    if (widget_)
    +      element.addChild(widget_->webWidget()
    +		       ->createDomElement(WApplication::instance()));
    +
    +    widgetChanged_ = false;
    +  }
    +
    +  if (scrollBarChanged_ || all) {
    +    if ((horizontalScrollBar_->tiesChanged_)
    +	|| (verticalScrollBar_->tiesChanged_)) {
    +      horizontalScrollBar_->tiesChanged_ = true;
    +      verticalScrollBar_->tiesChanged_ = true;
    +    }
    +    horizontalScrollBar_->updateDom(element, all);
    +    verticalScrollBar_->updateDom(element, all);
    +
    +    scrollBarChanged_ = false;
    +  }
    +
    +  if (scrollBarPolicyChanged_ || all) {
    +    switch (horizontalScrollBarPolicy_) {
    +    case ScrollBarAsNeeded:
    +      element.setProperty(Wt::PropertyStyleOverflowX, "auto");
    +      break;
    +    case ScrollBarAlwaysOff:
    +      element.setProperty(Wt::PropertyStyleOverflowX, "hidden");
    +      break;
    +    case ScrollBarAlwaysOn:
    +      element.setProperty(Wt::PropertyStyleOverflowX, "scroll");
    +      break;
    +    }
    +
    +    switch (verticalScrollBarPolicy_) {
    +    case ScrollBarAsNeeded:
    +      element.setProperty(Wt::PropertyStyleOverflowY, "auto");
    +      break;
    +    case ScrollBarAlwaysOff:
    +      element.setProperty(Wt::PropertyStyleOverflowY, "hidden");
    +      break;
    +    case ScrollBarAlwaysOn:
    +      element.setProperty(Wt::PropertyStyleOverflowY, "scroll");
    +      break;
    +    }
    +
    +    scrollBarPolicyChanged_ = false;
    +  }    
    +
    +  WWebWidget::updateDom(element, all);
    +}
    +
    +DomElementType WScrollArea::domElementType() const
    +{
    +  return DomElement_DIV;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WScrollBar b/wt-3.1.7a/src/Wt/WScrollBar
    new file mode 100644
    index 0000000..84d102e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WScrollBar
    @@ -0,0 +1,74 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSCROLLBAR_H_
    +#define WSCROLLBAR_H_
    +
    +#include <Wt/WWidget>
    +
    +namespace Wt {
    +
    +class WScrollArea;
    +class DomElement;
    +
    +/*! \class WScrollBar Wt/WScrollBar Wt/WScrollBar
    + *  \brief A scrollbar attached to a scroll area.
    + *
    + * A WScrollArea always has two scrollbars (even if they are not visible,
    + * for example when the policy is WScrollArea::ScrollBarAlwaysOff). Using the
    + * tie(WScrollBar *one, WScrollBar *two) functions, it is possible to tie to
    + * scrollbars together, so that they will scroll together.
    + *
    + * \sa WScrollArea
    + */
    +class WT_API WScrollBar : public WObject
    +{
    +public:
    +  /*! \brief Returns the orientation of this scrollbar.
    +   */
    +  Orientation orientation() const { return orientation_; }
    +
    +  /*! \brief Ties two scrollbars together.
    +   *
    +   * The effect of this call is that these scrollbars will keep their
    +   * positions synchronised.
    +   */
    +  static void tie(WScrollBar *one, WScrollBar *two);
    +
    +  /*! \brief Unties two scrollbars, that were previously tied together.
    +   *
    +   * Undo a tie(WScrollBar *one, WScrollBar *two);
    +   *
    +   */
    +  static void unTie(WScrollBar *one, WScrollBar *two);
    +
    +  /*! \brief Sets the scrollbar value.
    +   *
    +   * This will move the scrollbar to the given value.
    +   */
    +  void setValue(int value);
    +
    +private:
    +  WScrollBar(WScrollArea *area, Orientation orientation);
    +  ~WScrollBar();
    +
    +  WScrollArea *scrollArea_;
    +  Orientation orientation_;
    +
    +  std::vector<WScrollBar *> ties_;
    +  bool tiesChanged_;
    +
    +  int value_;
    +  bool valueSet_;
    +
    +  void updateDom(DomElement& element, bool all);
    +
    +  friend class WScrollArea;
    +};
    +
    +}
    +
    +#endif // WSCROLLBAR_H_
    diff --git a/wt-3.1.7a/src/Wt/WScrollBar.C b/wt-3.1.7a/src/Wt/WScrollBar.C
    new file mode 100644
    index 0000000..07b571a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WScrollBar.C
    @@ -0,0 +1,89 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WScrollBar"
    +#include "Wt/WScrollArea"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WScrollBar::WScrollBar(WScrollArea *area, Orientation orientation)
    +  : scrollArea_(area),
    +    orientation_(orientation),
    +    tiesChanged_(false),
    +    valueSet_(false)
    +{ }
    +
    +WScrollBar::~WScrollBar()
    +{
    +  while (ties_.size())
    +    unTie(this, ties_[0]);
    +}
    +
    +void WScrollBar::setValue(int value)
    +{
    +  value_ = value;
    +  valueSet_ = true;
    +
    +  scrollArea_->scrollBarChanged();
    +}
    +
    +void WScrollBar::tie(WScrollBar *one, WScrollBar *two)
    +{
    +  one->ties_.push_back(two);
    +  two->ties_.push_back(one);
    +
    +  one->tiesChanged_ = true;
    +  two->tiesChanged_ = true;
    +  one->scrollArea_->scrollBarChanged();
    +  two->scrollArea_->scrollBarChanged();
    +}
    +
    +void WScrollBar::unTie(WScrollBar *one, WScrollBar *two)
    +{
    +  Utils::erase(one->ties_, two);
    +  Utils::erase(two->ties_, one);
    +
    +  one->tiesChanged_ = true;
    +  two->tiesChanged_ = true;
    +  one->scrollArea_->scrollBarChanged();
    +  two->scrollArea_->scrollBarChanged();
    +}
    +
    +void WScrollBar::updateDom(DomElement& element, bool all)
    +{
    +  if (tiesChanged_ || all) {
    +    std::string jsCode;
    +    for (unsigned i = 0; i < ties_.size(); ++i) {
    +      std::string tieElement
    +	= WT_CLASS ".getElement('" + ties_[i]->scrollArea_->id() + "')";
    +      std::string scrollElement
    +	= WT_CLASS ".getElement('" + scrollArea_->id() + "')";
    +      std::string side = (orientation_ == Horizontal ? "Left" : "Top");
    +
    +      jsCode +=	tieElement + ".scroll" + side
    +	+ "=" + scrollElement + ".scroll" + side + ";";
    +    }
    +
    +    element.setEvent("scroll", jsCode, "");
    +
    +    tiesChanged_ = false;
    +  }
    +}
    +
    +/*
    +  for iframe (but does not work either in konqueror)
    +
    +  window.pageXOffset
    +  window.pageYOffset
    +  document.body.scrollLeft
    +  document.body.scrollTop
    +
    +  window.scrollTo()
    +*/
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSelectionBox b/wt-3.1.7a/src/Wt/WSelectionBox
    new file mode 100644
    index 0000000..f9624d9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSelectionBox
    @@ -0,0 +1,136 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSELECTIONBOX_H_
    +#define WSELECTIONBOX_H_
    +
    +#include <Wt/WComboBox>
    +
    +namespace Wt {
    +
    +/*! \class WSelectionBox Wt/WSelectionBox Wt/WSelectionBox
    + *  \brief A selection box allows selection from a list of options.
    + *
    + * By default, a selection box may be used to let the user select one
    + * item from a list. This may be changed to multiple selection mode
    + * using setSelectionMode().
    + *
    + * The current selection may be set and read using setCurrentIndex()
    + * and currentIndex(), for \link Wt::SingleSelection
    + * SingleSelection\endlink mode, or setSelectedIndexes() and
    + * selectedIndexes() for Wt::ExtendedSelection mode. 
    + * The activated() and sactivated()
    + * signals are not emited in the Wt::ExtendedSelection mode, use the
    + * changed() signal changed().
    + *
    + * %WSelectionBox is an MVC view class, using a simple string list
    + * model by default. The model may be populated using WComboBox::addItem() 
    + * or WComboBox::insertItem() and the contents can 
    + * be cleared through clear(). These methods manipulate the underlying
    + * model().
    + *
    + * To use the selectionbox with a custom model instead of the default
    + * WStringListModel, use setModel().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WSelectionBox *selectionBox = new Wt::WSelectionBox(this);
    + * selectionBox->addItem("Clint Eastwood");
    + * selectionBox->addItem("Mick Jagger");
    + * selectionBox->addItem("Johnny Depp");
    + * selectionBox->addItem("Kate Winslet");
    + *
    + * selectionBox->setCurrentIndex(2); // Johnny Depp
    + * selectionBox->activated().connect(this, &MyWidget::comboChanged);
    + * \endcode
    + * \endif
    + *
    + * %WSelectionBox is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;select&gt;</tt> tag and
    + * does not provide styling. It can be styled using inline or external
    + * CSS as appropriate.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WSelectionBox : public WComboBox
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WSelectionBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the number of items that are visible.
    +   *
    +   * If more items are available, a scroll-bar is provided.
    +   */
    +  int verticalSize() const { return verticalSize_; }
    +
    +  /*! \brief Returns the number of items that are visible.
    +   */
    +  void setVerticalSize(int items);
    +
    +  /*! \brief Sets the selection mode.
    +   *
    +   * The default selection mode is SingleSelection. You can change to
    +   * Wt::ExtendedSelection to allow selection of multiple items.
    +   */
    +  void setSelectionMode(SelectionMode mode);
    +
    +  /*! \brief Returns the selection mode.
    +   *
    +   * \sa setSelectionMode(SelectionMode)
    +   */
    +  SelectionMode selectionMode() const { return selectionMode_; }   
    +
    +  /*! \brief Returns the current selection (in Wt::ExtendedSelection mode).
    +   *
    +   * Get the list of currently selected items. This method is only defined
    +   * when selectionMode() is Wt::ExtendedSelection. Otherwise, you should use
    +   * currentIndex() to get item currently selected.
    +   *
    +   * \sa currentIndex()
    +   */
    +  const std::set<int>& selectedIndexes() const { return selection_; }
    +
    +  /*! \brief Sets the selection (in Wt::ExtendedSelection mode).
    +   *
    +   * For an Wt::ExtendedSelection mode, set the list of currently selected
    +   * items.
    +   *
    +   * \sa selectedIndexes()
    +   */
    +  void setSelectedIndexes(const std::set<int>& selection);
    +
    +  /*! \brief Clears the current selection.
    +   *
    +   * Clears the current selection.
    +   *
    +   * \sa setCurrentIndex(), setSelectedIndexes()
    +   */
    +  void clearSelection();
    +
    +private:
    +  int           verticalSize_;
    +  SelectionMode selectionMode_;
    +  std::set<int> selection_;
    +
    +  bool configChanged_;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void setFormData(const FormData& formData);
    +  virtual void propagateRenderOk(bool deep);
    +
    +  virtual bool isSelected(int index) const;
    +};
    +
    +}
    +
    +#endif // WSELECTIONBOX_
    diff --git a/wt-3.1.7a/src/Wt/WSelectionBox.C b/wt-3.1.7a/src/Wt/WSelectionBox.C
    new file mode 100644
    index 0000000..5108a90
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSelectionBox.C
    @@ -0,0 +1,142 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WSelectionBox"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WSelectionBox::WSelectionBox(WContainerWidget *parent)
    +  : WComboBox(parent),
    +    verticalSize_(5),
    +    selectionMode_(SingleSelection),
    +    configChanged_(false)
    +{ }
    +
    +void WSelectionBox::setVerticalSize(int items)
    +{
    +  verticalSize_ = items;
    +  configChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WSelectionBox::setSelectionMode(SelectionMode mode)
    +{
    +  if (mode != selectionMode_) {
    +    selectionMode_ = mode;
    +    configChanged_ = true;
    +    repaint(RepaintPropertyAttribute);
    +
    +    if (mode == ExtendedSelection) {
    +      selection_.clear();
    +      if (currentIndex() != -1)
    +	selection_.insert(currentIndex());
    +    } else {
    +      if (selection_.size() == 1)
    +	setCurrentIndex(*selection_.begin());
    +      else
    +	setCurrentIndex(-1);
    +      selection_.clear();
    +    }
    +  }
    +}
    +
    +void WSelectionBox::setSelectedIndexes(const std::set<int>& selection)
    +{
    +  if (selectionMode_ != ExtendedSelection)
    +    throw WtException("WSelectionBox::setSelectedIndexes() can only be used "
    +		      "for an ExtendedSelection mode");
    +
    +  selection_ = selection;
    +  selectionChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WSelectionBox::clearSelection()
    +{
    +  if (selectionMode_ == ExtendedSelection)
    +    setSelectedIndexes(std::set<int>());
    +  else
    +    setCurrentIndex(-1);
    +}
    +
    +bool WSelectionBox::isSelected(int index) const
    +{
    +  if (selectionMode_ == ExtendedSelection) {
    +    std::set<int>::const_iterator i = selection_.find(index);
    +    return i != selection_.end();
    +  } else
    +    return WComboBox::isSelected(index);
    +}
    +
    +void WSelectionBox::updateDom(DomElement& element, bool all)
    +{
    +  if (configChanged_ || all) {
    +    element.setAttribute("size",
    +			 boost::lexical_cast<std::string>(verticalSize_));
    +
    +    if (!all || (selectionMode_ == ExtendedSelection)) {
    +      element.setProperty(PropertyMultiple, selectionMode_ == ExtendedSelection
    +			  ? "true" : "false");
    +      if (!all)
    +	selectionChanged_ = true;
    +    }
    +
    +    configChanged_ = false;
    +  }
    +
    +  if (selectionMode_ == ExtendedSelection)
    +    if (selectionChanged_ && !all) {
    +      for (int i = 0; i < count(); ++i) {
    +	element.callMethod("options[" + boost::lexical_cast<std::string>(i)
    +			+ "].selected=" + (isSelected(i) ? "true" : "false"));
    +      }
    +      selectionChanged_ = false;
    +    }
    +
    +  WComboBox::updateDom(element, all);
    +}
    +
    +void WSelectionBox::propagateRenderOk(bool deep)
    +{
    +  configChanged_ = false;
    +  selectionChanged_ = false;
    +
    +  WComboBox::propagateRenderOk(deep);
    +}
    +
    +void WSelectionBox::setFormData(const FormData& formData)
    +{
    +  if (selectionChanged_)
    +    return;
    +
    +  if (selectionMode_ == SingleSelection)
    +    WComboBox::setFormData(formData);
    +  else {
    +    selection_.clear();
    +
    +    for (int j = 0; j < Utils::size(formData.values); ++j) {
    +      const std::string& v = formData.values[j];
    +      if (!v.empty()) {
    +	try {
    +	  int i = boost::lexical_cast<int>(v);
    +	  selection_.insert(i);
    +	} catch (boost::bad_lexical_cast& error) {
    +	  wApp->log("error") << "WSelectionBox received illegal form value: '"
    +			     << v << "'";
    +	}
    +      }
    +    }
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WServer b/wt-3.1.7a/src/Wt/WServer
    new file mode 100644
    index 0000000..d5a8620
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WServer
    @@ -0,0 +1,273 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSERVER_H_
    +#define WSERVER_H_
    +
    +#include <Wt/WApplication>
    +#include <Wt/WAbstractServer>
    +
    +#ifndef WT_TARGET_JAVA
    +
    +namespace Wt {
    +
    +struct WServerImpl;
    +
    +/*! \class WServer Wt/WServer Wt/WServer
    + *  \brief A class encapsulating an application server.
    + *
    + * This server class represents an instance of an application server.
    + *
    + * It offers support for multiple application entry points and control
    + * over starting and stopping the server (the latter functionality is
    + * only for supported for the built-in httpd). This may be used as an
    + * alternative to using WRun() when you wish to support multiple
    + * application entry points, or for integrating a Wt (stand-alone
    + * httpd) server application into an existing application, when you want
    + * to and start and stop the server as appropriate.
    + *
    + * As an example usage, consider the implementation of WRun(), which
    + * starts the server until a Ctrl-C is pressed or a termination signal
    + * has been received, or a restart is indicated using SIGHUP or a changed
    + * binary (argv[0]):
    + *
    + * \code
    +int WRun(int argc, char *argv[], ApplicationCreator createApplication)
    +{
    +  try {
    +    // use argv[0] as the application name to match a suitable entry
    +    // in the Wt configuration file, and use the default configuration
    +    // file (which defaults to /etc/wt/wt_config.xml unless the environment
    +    // variable WT_CONFIG_XML is set)
    +    WServer server(argv[0]);
    +
    +    // WTHTTP_CONFIGURATION is e.g. "/etc/wt/wthttpd"
    +    server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
    +
    +    // add a single entry point, at the default location (as determined
    +    // by the server configuration's deploy-path)
    +    server.addEntryPoint(Wt::Application, createApplication);
    +    if (server.start()) {
    +      int sig = WServer::waitForShutdown(argv[0]);
    +
    +      std::cerr << "Shutdown (signal = " << sig << ")" << std::endl;
    +      server.stop();
    +
    +      if (sig == SIGHUP)
    +	WServer::restart(argc, argv, environ);
    +    }
    +  } catch (WServer::Exception& e) {
    +    std::cerr << e.what() << "\n";
    +    return 1;
    +  } catch (std::exception& e) {
    +    std::cerr << "exception: " << e.what() << "\n";
    +    return 1;
    +  }
    +}
    + * \endcode
    + *
    + * \note Currently, only a single server instance may be created. We plan to
    + *       remove this limiation in the future.
    + */
    +class WTCONNECTOR_API WServer : public WAbstractServer
    +{
    +public:
    +  /*! \class Exception
    +   *  \brief Server %Exception class.
    +   */
    +  class WT_API Exception : public std::exception
    +  {
    +  public:
    +    Exception(const std::string what);
    +    ~Exception() throw();
    +
    +    /*! \brief Returns the error message.
    +     */
    +    const char *what() const throw() { return what_.c_str(); }
    +
    +  private:
    +    std::string what_;
    +  };
    +
    +  /*! \brief Creates a new server instance.
    +   *
    +   * The \p wtApplicationPath is used to match specific
    +   * application-settings in the %Wt configuration file. If no
    +   * specific match could be found, the general settings are used
    +   * (corresponding to the '*' selector).
    +   *
    +   * The %Wt application configuration is read from the
    +   * \p wtConfigurationFile. If empty, this defaults to the value
    +   * configured at build time.
    +   *
    +   * For more information on configuring %Wt applications, see \ref
    +   * configuration_sec "Configuration".
    +   *
    +   * \throws Exception : indicates a configuration problem.
    +   *
    +   * \sa setServerConfiguration()
    +   */
    +  WServer(const std::string& wtApplicationPath = std::string(),
    +	  const std::string& wtConfigurationFile = std::string());
    +
    +  /*! \brief Destructor.
    +   *
    +   * If the server was still running, it is stopped first by calling
    +   * stop(). It is probably safer to call stop() first yourself, since
    +   * this allows exceptions to be caught.
    +   *
    +   * \sa isRunning(), stop()
    +   */
    +  virtual ~WServer();
    +
    +  /*! \brief Configures the HTTP(S) server or FastCGI process.
    +   *
    +   * Configures the HTTP(S) server using command-line arguments, a
    +   * configuration file, or both. The valid options are described in
    +   * \ref config_wthttpd "Built-in httpd configuration".
    +   *
    +   * The applications themselves are configured using the configuration
    +   * file passed to the constructor.
    +   *
    +   * The server configuration must be set before any other
    +   * functionality can be used.
    +   *
    +   * In case of FastCGI deployment, the \p serverConfigurationFile
    +   * argument is ignored, and depending on the command-line arguments,
    +   * this process may become a FastCGI protocol relay process which
    +   * never returning from this call but directs the FastCGI stream to
    +   * the correct session, rather than a Wt application server.
    +   *
    +   * \throws Exception : indicates a configuration problem.
    +   */  
    +  void setServerConfiguration(int argc, char *argv[],
    +			      const std::string& serverConfigurationFile
    +			      = std::string());
    +
    +  /*! \brief Binds an entry-point to a callback function to create
    +   *         a new application.
    +   *
    +   * The \p path is the local URL at which the application is
    +   * deployed: when a user visits this URL, the callback will be
    +   * called to create a new application. If empty, the URL is inferred
    +   * from the server configuration's deploy-path (see also \ref
    +   * config_wthttpd "Built-in httpd configuration").
    +   *
    +   * The path must start with a '/'.
    +   *
    +   * The optional \p favicon is a URL path (which should not
    +   * contain the host part!) to a favicon, which is the icon displayed
    +   * in the browser for your application. Alternatively, you may
    +   * specify a favicon using the "favicon" property in the
    +   * configuration file (see als \ref config_general "Application
    +   * settings (wt_config.xml)").
    +   */
    +  void addEntryPoint(EntryPointType type, ApplicationCreator callback,
    +		     const std::string& path = std::string(),
    +                     const std::string& favicon = std::string());
    +
    +  /*! \brief Binds a resource to a fixed path.
    +   *
    +   * Resources may either be private to a single session or
    +   * public. Use this method to add a public resource with a fixed
    +   * path.
    +   */
    +  void addResource(WResource *resource, const std::string& path);
    +
    +  /*! \brief Starts the server in the background.
    +   *
    +   * Returns whether the server could be successfully started.
    +   *
    +   * \throws Exception : indicates a problem starting the server.
    +   *
    +   * \sa isRunning(), stop()
    +   */
    +  bool start();
    +
    +  /*! \brief Stops the server.
    +   *
    +   * All active application sessions are terminated cleanly, and the
    +   * HTTP(S) server is shut down.
    +   *
    +   * \throw Exception : indicates a problem while stopping the server.
    +   *
    +   * \sa isRunning(), start()
    +   */
    +  void stop();
    +
    +  /*! \brief Waits for a shutdown signal.
    +   *
    +   * This static method blocks the current thread, waiting for a
    +   * shutdown signal. The implementation and details are platform
    +   * dependent, but this is usually Ctrl-C (SIGINT), SIGKILL, or
    +   * SIGHUP.
    +   *
    +   * This method is convenient if you want to customize how the server
    +   * is started (by instantiating a WServer object yourself, instead
    +   * of using Wt::Wrun()), but still want to use %Wt as a standalone
    +   * server that cleanly terminates on interruption.
    +   *
    +   * The optional \p restartWatchFile parameter can be used to let the
    +   * server watch for changes to a particular file (usually the binary
    +   * itself, argv[0]) which it will also interpret as SIGHUP. This may
    +   * be convenient to start the new binary after cleanly shutting down,
    +   * using restart(). <i>(Experimental, UNIX only)</i>
    +   */
    +  static int waitForShutdown(const char *restartWatchFile = 0);
    +
    +  /*! \brief A utility method to restart.
    +   *
    +   * This will result the application with the new image (argv[0]), effectively
    +   * loading a newly deployed version. <i>(Experimental, UNIX only)</i>
    +   */
    +  static void restart(int argc, char **argv, char **envp);
    +
    +  /*! \brief Returns whether the server is running.
    +   *
    +   * \sa start(), stop()
    +   */
    +  bool isRunning() const;
    +
    +  /*! \brief Returns the server http port number.
    +   *
    +   * Returns -1 if the port is not known (i.e. because the connector is
    +   * not aware of how the http server is configured).
    +   */
    +  int httpPort() const;
    +
    +  /*! \brief Returns the approot special property
    +   *
    +   * \sa WApplication::appRoot()
    +   */
    +  std::string appRoot() const;
    +
    +  /*! \brief Reads a configuration property.
    +   *
    +   * As properties are unique to an executable location, they are defined
    +   * from the moment that setServerConfiguration() is invoked. Use this
    +   * method to access configuration properties outside of an active
    +   * session, e.g. from within the main() function.
    +   *
    +   * \sa WApplication::readConfigurationProperty()
    +   */
    +   bool readConfigurationProperty(const std::string& name,
    +				  std::string& value) const;
    +
    +  void expireSessions();
    +
    +  WServerImpl *impl() { return impl_; }
    +
    +  virtual void handleRequest(WebRequest *request);
    +
    +private:
    +  WServerImpl *impl_;
    +};
    +
    +}
    +
    +#endif // WT_TARGET_JAVA
    +
    +#endif // WSERVER_H_ 
    diff --git a/wt-3.1.7a/src/Wt/WShadow b/wt-3.1.7a/src/Wt/WShadow
    new file mode 100644
    index 0000000..c1aee8c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WShadow
    @@ -0,0 +1,105 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSHADOW_H_
    +#define WSHADOW_H_
    +
    +#include <Wt/WColor>
    +
    +namespace Wt {
    +
    +/*! \class WShadow Wt/WShadow Wt/WShadow
    + *  \brief Class that defines a shadow style
    + *
    + * \sa WPainter::setShadow()
    + *
    + * \ingroup painting
    + */
    +class WT_API WShadow
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Constructs a disabled shadow effect (offsetX = offsetY = blur = 0)
    +   */
    +  WShadow();
    +
    +  /*! \brief Constructs a shadow with given offset and color.
    +   */
    +  WShadow(double dx, double dy, const WColor& color, double blur);
    +
    +#ifdef WT_TARGET_JAVA
    +    /*! \brief Clone method.
    +   *
    +   * Clones this shadow.
    +   */
    +  WShadow clone() const;
    +#endif
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the shadows are exactly the same.
    +   */
    +  bool operator==(const WShadow& other) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the shadows are different.
    +   */
    +  bool operator!=(const WShadow& other) const;
    +
    +  /*! \brief Returns whether the shadow effect is nihil.
    +   */
    +  bool none() const;
    +
    +  /*! \brief Sets the shadow offset.
    +   */
    +  void setOffsets(double dx, double dy);
    +
    +  /*! \brief Returns the shadow X offset.
    +   *
    +   * \sa setOffsets()
    +   */
    +  double offsetX() const { return offsetX_; }
    +
    +  /*! \brief Returns the shadow Y offset.
    +   *
    +   * \sa setOffsets()
    +   */
    +  double offsetY() const { return offsetY_; }
    +
    +  /*! \brief Changes the shadow color.
    +   *
    +   * \sa color()
    +   */
    +  void setColor(const WColor& color);
    +
    +  /*! \brief Returns the shadow color.
    +   *
    +   * \sa setColor()
    +   */
    +  const WColor& color() const { return color_; }
    +
    +  /*! \brief Sets the blur.
    +   *
    +   * \sa blur()
    +   */
    +  void setBlur(double blur);
    +
    +  /*! \brief Returns the blur.
    +   *
    +   * \sa setBlur()
    +   */
    +  double blur() const { return blur_; }
    +
    +private:
    +  WColor color_;
    +  double offsetX_, offsetY_, blur_;
    +};
    +
    +}
    +
    +#endif // WSHADOW_H_
    diff --git a/wt-3.1.7a/src/Wt/WShadow.C b/wt-3.1.7a/src/Wt/WShadow.C
    new file mode 100644
    index 0000000..3346e2a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WShadow.C
    @@ -0,0 +1,59 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WShadow"
    +
    +namespace Wt {
    +
    +WShadow::WShadow()
    +  : color_(black),
    +    offsetX_(0),
    +    offsetY_(0),
    +    blur_(0)
    +{ }
    +
    +WShadow::WShadow(double dx, double dy, const WColor& color, double blur)
    +  : color_(color),
    +    offsetX_(dx),
    +    offsetY_(dy),
    +    blur_(blur)
    +{ }
    +
    +bool WShadow::none() const
    +{
    +  return offsetX_ == 0 && offsetY_ == 0 && blur_ == 0;
    +}
    +
    +bool WShadow::operator==(const WShadow& other) const
    +{
    +  return color_ == other.color_
    +    && offsetX_ == other.offsetX_
    +    && offsetY_ == other.offsetY_
    +    && blur_ == other.blur_;
    +}
    +
    +bool WShadow::operator!=(const WShadow& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +void WShadow::setOffsets(double dx, double dy)
    +{
    +  offsetX_ = dx;
    +  offsetY_ = dy;
    +}
    +
    +void WShadow::setColor(const WColor& color)
    +{
    +  color_ = color;
    +}
    +
    +void WShadow::setBlur(double blur)
    +{
    +  blur_ = blur;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSignal b/wt-3.1.7a/src/Wt/WSignal
    new file mode 100644
    index 0000000..411df18
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSignal
    @@ -0,0 +1,1103 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSIGNAL_H_
    +#define WSIGNAL_H_
    +
    +#include <Wt/WObject>
    +#include <bitset>
    +
    +#include <boost/bind.hpp>
    +#include <boost/intrusive/list.hpp>
    +#include <boost/signal.hpp>
    +#include <boost/utility.hpp>
    +
    +namespace Wt {
    +
    +class JSlot;
    +class SlotLearnerInterface;
    +class WStatelessSlot;
    +class JavaScriptEvent;
    +
    +#ifndef WT_NO_SLOT_MACROS
    +#define SLOT(x, y) x, &y
    +#define slots
    +#endif // WT_NO_SLOT_MACROS
    +
    +/*! \defgroup signalslot Signal/slot system
    +    \brief Support for event handling using signals and slots.
    +
    +   To respond to user-interactivity events, or in general to communicate
    +   events from one widget to any other, %Wt uses a signal/slot system.
    +  
    +   A slot is any method of any descendant of WObject. To connect a
    +   signal with a slot, the only requirement is that the method
    +   signature of the slot must be compatible with the signal
    +   definition. In this way every method may be used as a slot, and it
    +   is not necessary to explicitly indicate a particular method to be a
    +   slot (as is needed in Qt), by putting them in a special section.
    +   Nevertheless, you may still do that if you wish to emphasize that
    +   these functions can be used as slots, or, if you have done extra
    +   work to optimize the implementation of these methods as client-side
    +   JavaScript code (see below).
    +  
    +   A signal may be created by adding a \link Signal Signal<X,
    +   ...>\endlink object to your class. You may specify up to 6
    +   arguments which may be of arbitrary types that are <i>Copyable</i>,
    +   that may be passed through the signal to connected slots.
    +  
    +   The library defines several user-event signals on various widgets,
    +   and it is easy and convenient to add signals and slots to widget
    +   classes to communicate events and trigger callbacks.
    +  
    +   Event signals (\link EventSignal EventSignal<E>\endlink)
    +   are signals that may be triggered internally by the library to
    +   respond to user interactivity events.  The abstract base classes
    +   WInteractWidget and WFormWidget define most of these event
    +   signals. To react to one of these events, the programmer connects a
    +   self-defined or already existing slot to such a signal.
    +
    +   To connect a signal from multiple senders to a single slot, the
    +   \link WSignalMapper WSignalMapper<T> \endlink class may be
    +   convenient. Using that class you can still identify the sender,
    +   using an arbitrary property of the sender which you define when
    +   making the connection. That property is passed as an additional
    +   slot argument.
    +*/
    +
    +/*! \brief Abstract base class of a signal.
    + *
    + * Base class for all signals.
    + *
    + * \ingroup signalslot
    + */
    +  class WT_API SignalBase : boost::noncopyable
    +{
    +public:
    +  virtual ~SignalBase();
    +
    +  /*! \brief Returns the sender.
    +   *
    +   * The sender usually corresponds to the owner, and is used by the
    +   * WSignalMapper to associated sender-specific data.
    +   *
    +   * During a slot invocation, you can access the sender from WObject::sender().
    +   */
    +  WObject *sender() const { return sender_; }
    +
    +  /*! \brief Returns whether this signal is connected.
    +   *
    +   * Returns true when the signal was connected to to at least one slot.
    +   */
    +  virtual bool isConnected() const = 0;
    +
    +  void setBlocked(bool block);
    +  bool isBlocked() const { return blocked_; }
    +
    +  /*! \brief Connects to a slot.
    +   *
    +   * Every signal can be connected to a slot which does not take any
    +   * arguments (and may thus ignore signal arguments).
    +   */
    +  virtual boost::signals::connection connect(WObject *target,
    +					     WObject::Method method) = 0;
    +
    +  /*! \brief Connects to a slot.
    +   *
    +   * Every signal can be connected to a slot which does not take any
    +   * arguments (and may thus ignore signal arguments).
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +protected:
    +  SignalBase(WObject *sender)
    +    : sender_(sender), blocked_(false)
    +  { }
    +
    +  static void pushSender(WObject *sender);
    +  static void popSender();
    +
    +private:
    +  SignalBase(const SignalBase& other);
    +
    +  WObject *sender_;
    +  bool     blocked_;
    +
    +  static WObject *currentSender();  
    +
    +  friend class WObject;
    +};
    +
    +/*
    + * Normal signals wrap simply around boost signals
    + */
    +
    +/*! \class Signal Wt/WSignal Wt/WSignal
    + *  \brief A signal that propagates events to listeners.
    + *
    + * Use Signal/slots to let one object (<i>A</i>) listen to events
    + * caused by another object (<i>B</i>). In this scenario, object
    + * <i>B</i> provides in its public interface access to a signal, to
    + * which object <i>A</i> connects one of its member function (which
    + * act as slot). Object <i>A</i> can then signal an event (which
    + * triggers the connected callback functions), by emitting the
    + * signal. Signal/slot is a generalization of the popular observer
    + * pattern used in GUIs.
    + *
    + * A signal can provide details of the event, using up to 6
    + * parameters. A slot must have a compatible signature to connect to
    + * a signal, based on its parameters. A compatible signature provides
    + * the same parameters in the member function, or less (leaving out
    + * parameters at the end).
    + *
    + * The signal automatically disconnects from the slot when the
    + * target is deleted. In addition, the signal may be deleted at any
    + * time, in particular also while it is being emitted.
    + *
    + * The %Signal objects integrate with WObject objects. A %Signal
    + * requires that the target of a connection, i.e. the object that
    + * listens for an event, is a %WObject. In addition, every signal may
    + * specify one %WObject to be the owner of the signal, and a target
    + * may find out the sender of a signal emission, using
    + * WObject::sender().
    + *
    + * \code
    + * class MyWidget : public Wt::WContainerWidget
    + * {
    + * public:
    + *   MyWidget(Wt::WContainerWidget *parent = 0)
    + *     : Wt::WContainerWidget(parent),
    + *       done_(this)
    + *   {
    + *      ...
    + *      Wt::WPushButton *button = new Wt::WPushButton("Okay");
    + *      button->clicked().connect(this, &MyWidget::process);
    + *   }
    + *
    + *   // provide an accessor for the signal
    + *   Wt::Signal<int, std::string>& done() { return done_; }
    + *
    + * private:
    + *   Wt::Signal<int, std::string> done_;
    + *
    + *   void process() {
    + *     ...
    + *     done_.emit(42, "Totally done"); // emit the signal
    + *   }
    + * };
    + * \endcode
    + *
    + * This widget could then be used from another class:
    + * \code
    + * class GUIClass : public Wt::WContainerWidget
    + * {
    + *   ...
    + *
    + * private:
    + *   void init() {
    + *     MyWidget *widget = new MyWidget(this);
    + *     widget->done().connect(this, &GUIClass::whenDone);
    + *   }
    + *
    + *   void whenDone(int result, const std::string& description) {
    + *     ...
    + *   }
    + * };
    + * \endcode
    + *
    + * The WSignalMapper is a utility class that helps in situations where
    + * you want to connect multiple signals to a single slot, and still be
    + * identify the sender using some property.
    + *
    + * \sa WSignalMapper
    + *
    + * \ingroup signalslot
    + */
    +template <typename A1 = NoClass, typename A2 = NoClass,
    +	  typename A3 = NoClass, typename A4 = NoClass,
    +	  typename A5 = NoClass, typename A6 = NoClass>
    +class Signal : public SignalBase
    +{
    +public:
    +  /*! \brief Creates a signal.
    +   *
    +   * The \p sender is the object that will be identified as
    +   * WObject::sender() when executing connected slots may be passed as
    +   * an argument.
    +   *
    +   * The \p sender should not be \c 0 when you want to map the signal
    +   * using the WSignalMapper.
    +   */
    +  Signal(WObject *sender = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~Signal();
    +
    +  virtual boost::signals::connection connect(WObject *target,
    +					     WObject::Method method);
    +
    +  /*! \brief Connects to a function.
    +   *
    +   * This variant of the overloaded connect() method supports a
    +   * template function object (which supports operator ()).
    +   *
    +   * When the receiver function is an object method, the signal will
    +   * automatically be disconnected when the object is deleted, as long as the
    +   * object inherits from WObject or boost::signals::trackable.
    +   *
    +   * The function may leave up to <i>N</i> parameters unbound
    +   * (e.g. using boost::bind placeholders _1 to _N) that may be bound
    +   * to values passed by the signal.
    +   */
    +#ifndef WT_CNOR
    +  template <class F> boost::signals::connection connect(const F& function);
    +#else
    +  boost::signals::connection connect(const boost::bound& f);
    +#endif
    +
    +  /*! \brief Connects a slot that takes no arguments.
    +   *
    +   * This is always possible (even when the signal specifies a number
    +   * of arguments).
    +   *
    +   * The slot is as a \p method of an object \p target of class \p T,
    +   * which equals class \p V, or is a base class of class \p V. Thus,
    +   * the following statement must return a non-null pointer:
    +   *
    +   * \code
    +   * V *v = dynamic_cast<V *>(target);
    +   * \endcode
    +   *
    +   * In practice, to facilitate automatic disconnects on deletion of
    +   * the \p target, class \p T must be also be a descendant of WObject,
    +   * but this is not enforced by the interface.
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +  /*! \brief Connects a slot that takes one argument.
    +   *
    +   * This is only possible for signals that take at least one argument.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(A1));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&));
    +
    +  /*! \brief Connects a slot that takes two arguments.
    +   *
    +   * This is only possible for signals that take at least two arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(A1, A2));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&,
    +								    A2));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(A1,
    +								    const A2&));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&,
    +								    const A2&));
    +
    +  /*! \brief Connects a slot that takes three arguments.
    +   *
    +   * This is only possible for signals that take at least three arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&,
    +								    A2,A3));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&,
    +								    const A2&,
    +								    A3));
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const A1&,
    +								    const A2&,
    +								    const A3&));
    +
    +  /*! \brief Connects a slot that takes four arguments.
    +   *
    +   * This is only possible for signals that take at least four arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4));
    +
    +  /*! \brief Connects a slot that takes five arguments.
    +   *
    +   * This is only possible for signals that take at least five arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4,A5));
    +
    +  /*! \brief Connects a slot that takes six arguments.
    +   *
    +   * This is only possible for signals that take at least six arguments.
    +   *
    +   * \sa connect(T *target, void (V::*method)())
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target,
    +				       void (V::*method)(A1,A2,A3,A4,A5,A6));
    +
    +  /*! \brief Emits the signal.
    +   *
    +   * The arguments must exactly match the arguments of the target
    +   * function.
    +   *
    +   * This will cause all connected slots to be triggered, with the given
    +   * arguments.
    +   */
    +  void emit(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
    +	    A3 a3 = NoClass::none, A4 a4 = NoClass::none,
    +	    A5 a5 = NoClass::none, A6 a6 = NoClass::none) const;
    +
    +  /*! \brief Emits the signal.
    +   *
    +   * This is equivalent to emit().
    +   *
    +   * \sa emit
    +   */
    +  void operator()(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
    +		  A3 a3 = NoClass::none, A4 a4 = NoClass::none,
    +		  A5 a5 = NoClass::none, A6 a6 = NoClass::none) const;
    +
    +  virtual bool isConnected() const;
    +
    +private:
    +  Signal(const Signal<A1, A2, A3, A4, A5, A6>&);
    +
    +  boost::signal6<void, A1, A2, A3, A4, A5, A6> *impl_;
    +};
    +
    +#ifndef WT_CNOR
    +
    +/*
    + * Normal signal -- specialization for void
    + */
    +template<>
    +class WT_API Signal<void> : public Signal<>
    +{ 
    +public:
    +  Signal<void, NoClass, NoClass, NoClass, NoClass, NoClass>
    +    (WObject *sender = 0);
    +};
    +
    +#else // WT_CNOR
    +
    +class WT_API Signal0 : public Signal<NoClass>
    +{
    +public:
    +  Signal0(WObject *sender = 0);
    +
    +  void emit() const;
    +
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +};
    +
    +#endif // WT_CNOR
    +
    +/*! \brief Abstract base class of an event signal.
    + *
    + * An event signal is directly associated with a user-interface generated
    + * event.
    + *
    + * \ingroup signalslot
    + */
    +class WT_API EventSignalBase : public SignalBase
    +#if !(defined(WT_TARGET_JAVA) || defined(WT_NO_BOOST_INTRUSIVE))
    +			     ,public boost::intrusive::list_base_hook<>
    +#endif
    +{
    +public:
    +  virtual ~EventSignalBase();
    +
    +  /*! \brief Returns the event name.
    +   *
    +   * The event name is implementation-defined.
    +   */
    +  const char *name() const { return name_; }
    +
    +  bool needsUpdate(bool all) const;
    +  void updateOk();
    +  virtual bool isConnected() const;
    +
    +  virtual const std::string encodeCmd() const;
    +  const std::string javaScript() const;
    +  bool isExposedSignal() const;
    +  void setNotExposed();
    +  void disconnect(boost::signals::connection& conn);
    +
    +  /*! \brief Prevents the default browser action.
    +   *
    +   * Use this method to prevent the default browser action associated
    +   * with this event.
    +   *
    +   * \sa setPreventPropagation()
    +   */
    +  void preventDefaultAction(bool prevent = true);
    +
    +  /*! \brief Returns whether the default browser action is prevented.
    +   *
    +   * \sa preventDefaultAction()
    +   */
    +  bool defaultActionPrevented() const;
    +
    +  /*! \brief Prevents event propagation.
    +   *
    +   * Use this method to prevent that the event propagates further to
    +   * its ancestors.
    +   *
    +   * \sa preventDefaultAction()
    +   */
    +  void preventPropagation(bool prevent = true);
    +
    +  /*! \brief Returns whether event propagation is prevented.
    +   *
    +   * \sa preventPropagation()
    +   */
    +  bool propagationPrevented() const;
    +
    +  const std::string createUserEventCall(const std::string& jsObject,
    +					const std::string& jsEvent,
    +					const std::string& eventName,
    +					const std::string& arg1,
    +					const std::string& arg2,
    +					const std::string& arg3,
    +					const std::string& arg4,
    +					const std::string& arg5,
    +					const std::string& arg6) const;
    +
    +  boost::signals::connection connectStateless(WObject::Method method, 
    +					      WObject *target,
    +					      WStatelessSlot *slot);
    +  using SignalBase::connect;
    +  void connect(JSlot& slot);
    +  void connect(const std::string& function);
    +
    +  void senderRepaint();
    +
    +protected:
    +  struct StatelessConnection {
    +    boost::signals::connection connection;
    +    WObject                   *target;
    +    WStatelessSlot            *slot;
    +
    +    bool ok() const;
    +
    +    StatelessConnection(const boost::signals::connection& c,
    +			WObject *target, WStatelessSlot *slot);
    +  };
    +
    +  static const int BIT_NEED_UPDATE = 0;
    +  static const int BIT_EXPOSED = 1;
    +  static const int BIT_NEEDS_AUTOLEARN = 2;
    +  static const int BIT_PREVENT_DEFAULT = 3;
    +  static const int BIT_PREVENT_PROPAGATION = 4;
    +
    +  static int nextId_;
    +
    +  const char                       *name_;
    +  const int                         id_;
    +  std::vector<StatelessConnection>  connections_;
    +  std::bitset<5>                    flags_;
    +
    +  /*
    +   * Dummy signal used for knowing if stateless connections are still
    +   * connected.
    +   */
    +  boost::signal0<void>              dummy_;
    +
    +  EventSignalBase(const char *name, WObject *sender)
    +    : SignalBase(sender), name_(name), id_(nextId_++) { }
    +
    +  void prepareDestruct();
    +  void exposeSignal();
    +  void processLearnedStateless() const;
    +  void processNonLearnedStateless() const;
    +
    +  static void *alloc();
    +  static void free(void *s);
    +
    +private:
    +  /*
    +   * Our own list of connections to process them in a custom way.
    +   */
    +
    +  void removeSlot(WStatelessSlot *slot);
    +
    +  void processPreLearnStateless(SlotLearnerInterface *learner);
    +  void processAutoLearnStateless(SlotLearnerInterface *learner);
    +  virtual void processDynamic(const JavaScriptEvent& e) = 0;
    +
    +  friend class WStatelessSlot;
    +  friend class WebRenderer;
    +  friend class WebSession;
    +};
    +
    +/*! \class EventSignal Wt/WSignal Wt/WSignal
    + *  \brief A signal that conveys user-interface events.
    + *
    + * An %EventSignal is a special %Signal that may be triggered by user
    + * interface events such as a mouse click, key press, or focus change.
    + * They are made available through the library in widgets like
    + * WInteractWidget, and should not be instantiated directly.
    + *
    + * In addition to the behaviour of %Signal, they are capable of both
    + * executing client-side and server-side slot code. They may learn
    + * JavaScript from C++ code, through stateless slot learning, when
    + * connected to a slot that has a stateless implementation, using
    + * WObject::implementStateless(). Or they may be connected to a JSlot
    + * which provides manual JavaScript code.
    + *
    + * The typically relay UI event details, using event details objects
    + * like WKeyEvent or WMouseEvent.
    + *
    + * \sa Signal, JSignal
    + *
    + * \ingroup signalslot
    + */
    +template<typename E = NoClass>
    +class EventSignal : public EventSignalBase
    +{
    +public:
    +#ifndef WT_TARGET_JAVA
    +#ifndef __clang__
    +  // see bug: http://llvm.org/bugs/show_bug.cgi?id=6920
    +  static void *operator new(std::size_t size);
    +  static void operator delete(void *deletable, std::size_t size);
    +#endif // __clang__
    +
    +  EventSignal(const char *name, WObject *sender);
    +#else
    +  EventSignal(const char *name, WObject *sender, const E& e);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns whether the signal is connected.
    +   */
    +  virtual bool isConnected() const;
    +
    +  /*! \brief Connects to a function.
    +   *
    +   * This variant of the overloaded connect() method supports a
    +   * template function object (which supports operator ()).
    +   *
    +   * When the receiver function is an object method, the signal will
    +   * automatically be disconnected when the object is deleted, as long as the
    +   * object inherits from WObject or boost::signals::trackable.
    +   *
    +   * The function may leave 1 parameters unbound (e.g. using
    +   * boost::bind placeholders _1) that may be bound to the event
    +   * detail object passed by the signal.
    +   */
    +#ifndef WT_CNOR
    +  template <class F> boost::signals::connection connect(const F& function);
    +#else
    +  boost::signals::connection connect(const boost::bound& function);
    +#endif
    +
    +  /*! \brief Connects a slot that takes no arguments.
    +   *
    +   * If a stateless implementation is specified for the slot, then
    +   * the visual behaviour will be learned in terms of JavaScript, and
    +   * will be cached on the client side for instant feed-back, in
    +   * addition running the slot on the server.
    +   *
    +   * The slot is as a \p method of an object \p target of class \p T,
    +   * which equals class \p V, or is a base class of class \p V. In
    +   * addition, to check for stateless implementations, class \p T must
    +   * be also be a descendant of WObject. Thus, the following statement
    +   * must return a non-null pointer:
    +   *
    +   * \code
    +   * WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
    +   * \endcode
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +  /*! \brief Connects a slot that takes one argument.
    +   *
    +   * This is only possible for signals that take at least one argument.
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(E));
    +
    +  /*! \brief Connects a slot that takes a 'const argument&'.
    +   *
    +   * This is only possible for signals that take at least one argument.
    +   */
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)(const E&));
    +
    +  /*! \brief Connects a JavaScript function.
    +   *
    +   * This will provide a client-side connection between the event and
    +   * a JavaScript function. The argument must be a JavaScript function
    +   * which optinally accepts two arguments (the object and the event):
    +   *
    +   * \code
    +   * function(object, event) {
    +   *   ...
    +   * }
    +   * \endcode
    +   *
    +   * Unlike a JSlot, there is no automatic connection management: the
    +   * connection cannot be removed. If you need automatic connection
    +   * management, you should use connect(JSlot&) instead.
    +   */
    +  void connect(const std::string& function);
    +  void connect(const char * function);
    +
    +  /*! \brief Connects a slot that is specified as JavaScript only.
    +   *
    +   * This will provide a client-side connection between the event and
    +   * some JavaScript code as implemented by the slot. Unlike other
    +   * connects, this does not cause the event to propagated to the
    +   * application, and thus the state changes caused by the JavaScript
    +   * slot are not tracked client-side.
    +   *
    +   * The connection is tracked, taking into account the life-time of
    +   * the JSlot object, and can be updated by modifying the \p slot. If
    +   * you do not need connection management (e.g. because the slot has
    +   * the same life-time as the signal), then you can use connect(const
    +   * std::string&) instead.
    +   */
    +  void connect(JSlot& slot);
    +
    +  /*! \brief Emits the signal.
    +   *
    +   * This will cause all connected slots to be triggered, with the given
    +   * argument.
    +   */
    +  void emit(E e = NoClass::none) const;
    +
    +  /*! \brief Emits the signal.
    +   *
    +   * This is equivalent to emit().
    +   *
    +   * \sa emit()
    +   */
    +  void operator()(E e) const;
    +
    +  virtual boost::signals::connection connect(WObject *target,
    +					     WObject::Method method);
    +
    +private:
    +  typedef boost::signal1<void, E> BoostSignalType;
    +  BoostSignalType dynamic_;
    +
    +  void processDynamic(const JavaScriptEvent& e);
    +};
    +
    +#ifdef WT_CNOR
    +
    +class WT_API EventSignal0 : public EventSignalBase
    +{
    +public:
    +  EventSignal0(const char *name, WObject *sender);
    +  ~EventSignal0();
    +
    +  virtual bool isConnected() const;
    +
    +  boost::signals::connection connect(const boost::bound& f);
    +  void connect(const std::string& function);
    +  void connect(JSlot& slot);
    +  template<class T, class V>
    +    boost::signals::connection connect(T *target, void (V::*method)());
    +
    +  void emit() const;
    +  void operator()() const;
    +};
    +
    +#endif // WT_CNOR
    +
    +#ifndef WT_CNOR
    +
    +template <class T, class V>
    +boost::signals::connection SignalBase::connect(T *target,
    +					       void (V::*method)())
    +{
    +  WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
    +  assert(o);
    +  return connect(o, static_cast<WObject::Method>(method));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +Signal<A1, A2, A3, A4, A5, A6>::Signal(WObject *sender)
    +  : SignalBase(sender),
    +    impl_(0)
    +{ }
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +Signal<A1, A2, A3, A4, A5, A6>::~Signal()
    +{  
    +  delete impl_;
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class F>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(const F& function)
    +{
    +  if (!impl_)
    +    impl_ = new boost::signal6<void, A1, A2, A3, A4, A5, A6>;
    +  return impl_->connect(function, boost::signals::at_front);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4, A5, A6))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4, ::_5, ::_6));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4, A5))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4, ::_5));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3, A4))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3, ::_4));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&, const A2&, const A3&))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&, const A2&, A3))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&, A2, A3))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2, A3))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2, ::_3));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&, const A2&))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&, A2))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2));
    +}
    +
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, const A2&))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1, A2))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1, ::_2));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(const A1&))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, _1));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)(A1))
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target, ::_1));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +template <class T, class V>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(T *target, void (V::*method)())
    +{
    +  assert(dynamic_cast<V *>(target));
    +  return connect(boost::bind(method, target));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +boost::signals::connection Signal<A1, A2, A3, A4, A5, A6>
    +::connect(WObject *target, WObject::Method method)
    +{
    +  return connect(boost::bind(method, target));
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void Signal<A1, A2, A3, A4, A5, A6>::emit(A1 a1, A2 a2, A3 a3,
    +					  A4 a4, A5 a5, A6 a6) const
    +{
    +  if (impl_ && !isBlocked()) {
    +    pushSender(sender());
    +    (*impl_)(a1, a2, a3, a4, a5, a6);
    +    popSender();
    +  }
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +void Signal<A1, A2, A3, A4, A5, A6>::operator()(A1 a1, A2 a2, A3 a3,
    +						A4 a4, A5 a5, A6 a6) const
    +{
    +  emit(a1, a2, a3, a4, a5, a6);
    +}
    +
    +template <typename A1, typename A2, typename A3,
    +	  typename A4, typename A5, typename A6>
    +bool Signal<A1, A2, A3, A4, A5, A6>::isConnected() const
    +{
    +  return impl_ ? impl_->num_slots() > 0 : false;
    +}
    +
    +#ifndef __clang__
    +template <typename E>
    +void *EventSignal<E>::operator new(std::size_t size) {
    +  return EventSignalBase::alloc();
    +}
    +
    +template <typename E>
    +void EventSignal<E>::operator delete(void *deletable, std::size_t size) {
    +  EventSignalBase::free(deletable);
    +}
    +#endif // __clang__
    +
    +template <typename E>
    +EventSignal<E>::EventSignal(const char *name, WObject *sender)
    +  : EventSignalBase(name, sender)
    +{ }
    +
    +template <typename E>
    +bool EventSignal<E>::isConnected() const
    +{
    +  if (EventSignalBase::isConnected())
    +    return true;
    +
    +  return dynamic_.num_slots() > 0;
    +}
    +
    +template <typename E>
    +template <class F>
    +boost::signals::connection EventSignal<E>::connect(const F& function)
    +{
    +  exposeSignal();
    +  return dynamic_.connect(function, boost::signals::at_front);
    +}
    +
    +template <typename E>
    +template <class T, class V>
    +boost::signals::connection EventSignal<E>::connect(T *target,
    +						   void (V::*method)())
    +{
    +  exposeSignal();
    +  WObject *o = dynamic_cast<WObject *>(dynamic_cast<V *>(target));
    +  assert(o);
    +
    +  WStatelessSlot *s = o->isStateless(static_cast<WObject::Method>(method));
    +
    +  if (s)
    +    return EventSignalBase::connectStateless
    +      (static_cast<WObject::Method>(method), o, s);
    +  else
    +    return dynamic_.connect(boost::bind(method, target),
    +			    boost::signals::at_front);
    +}
    +
    +template <typename E>
    +template <class T, class V>
    +boost::signals::connection EventSignal<E>::connect(T *target,
    +						   void (V::*method)(E))
    +{
    +  exposeSignal();
    +  assert(dynamic_cast<V *>(target));
    +
    +  return dynamic_.connect(boost::bind(method, target, ::_1),
    +			  boost::signals::at_front);
    +}
    +
    +template <typename E>
    +template <class T, class V>
    +boost::signals::connection EventSignal<E>::connect(T *target,
    +						   void (V::*method)(const E&))
    +{
    +  exposeSignal();
    +  assert(dynamic_cast<V *>(target));
    +
    +  return dynamic_.connect(boost::bind(method, target, ::_1),
    +			  boost::signals::at_front);
    +}
    +
    +template <typename E>
    +void EventSignal<E>::connect(const char *function)
    +{
    +  EventSignalBase::connect(function);
    +}
    +
    +template <typename E>
    +void EventSignal<E>::connect(const std::string& function)
    +{
    +  EventSignalBase::connect(function);
    +}
    +
    +template <typename E>
    +void EventSignal<E>::connect(JSlot& slot)
    +{
    +  EventSignalBase::connect(slot);
    +}
    +
    +template <typename E>
    +boost::signals::connection
    +EventSignal<E>::connect(WObject *target, WObject::Method method)
    +{
    +  exposeSignal();
    +  WStatelessSlot *s = target->isStateless(method);
    +  if (s)
    +    return EventSignalBase::connectStateless(method, target, s);
    +  else
    +    return dynamic_.connect(boost::bind(method, target),
    +			    boost::signals::at_front);
    +}
    +
    +template <typename E>
    +void EventSignal<E>::emit(E e) const
    +{
    +  if (isBlocked())
    +    return;
    +
    +  pushSender(sender());
    +
    +  processLearnedStateless();
    +  processNonLearnedStateless();
    +
    +  dynamic_(e);
    +
    +  popSender();
    +}
    +
    +template <typename E>
    +void EventSignal<E>::operator()(E e) const
    +{
    +  emit(e);
    +}
    +
    +template <typename E>
    +void EventSignal<E>::processDynamic(const JavaScriptEvent& jse)
    +{
    +  processNonLearnedStateless();
    +
    +  E event(jse);
    +
    +  if (dynamic_.num_slots()) {
    +    pushSender(sender());
    +    dynamic_(event);
    +    popSender();
    +  }
    +}
    +
    +#endif // WT_CNOR
    +
    +}
    +
    +#endif // WSIGNAL_H_
    diff --git a/wt-3.1.7a/src/Wt/WSignal.C b/wt-3.1.7a/src/Wt/WSignal.C
    new file mode 100644
    index 0000000..3886b78
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSignal.C
    @@ -0,0 +1,422 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/pool/pool.hpp>
    +#include <stdio.h>
    +
    +#include "Wt/WSignal"
    +#include "Wt/WApplication"
    +#include "Wt/WStatelessSlot"
    +#include "Wt/WJavaScriptSlot"
    +
    +#include "Utils.h"
    +#include "WebSession.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +Wt::NoClass Wt::NoClass::none;
    +
    +SignalBase::~SignalBase()
    +{ }
    +
    +void SignalBase::setBlocked(bool blocked)
    +{
    +  blocked_ = blocked;
    +}
    +
    +void SignalBase::pushSender(WObject *sender)
    +{
    +  WebSession *sess = WebSession::instance();
    +  if (sess) {
    +    sess->pushEmitStack(sender);
    +  }
    +}
    +
    +void SignalBase::popSender()
    +{
    +  WebSession *sess = WebSession::instance();
    +  if (sess) {
    +    sess->popEmitStack();
    +  }
    +}
    +
    +WObject *SignalBase::currentSender()
    +{
    +  WebSession *sess = WebSession::instance();
    +  if (sess) {
    +    return sess->emitStackTop();
    +  } else {
    +    return 0;
    +  }
    +}
    +
    +#ifndef WT_CNOR
    +Signal<void>::Signal(WObject *sender)
    +  : Signal<>(sender)
    +{ }
    +#endif // WT_CNOR
    +
    +void *EventSignalBase::alloc()
    +{
    +  return WApplication::instance()->eventSignalPool_->malloc();
    +}
    +
    +void EventSignalBase::free(void *s)
    +{
    +  if (s)
    +    WApplication::instance()->eventSignalPool_->free(s);
    +}
    +
    +EventSignalBase
    +::StatelessConnection::StatelessConnection(const boost::signals::connection& c,
    +                                           WObject *t,
    +                                           WStatelessSlot *s)
    +  : connection(c),
    +    target(t),
    +    slot(s)
    +{ }
    +
    +bool EventSignalBase::StatelessConnection::ok() const
    +{
    +  return target == 0 || connection.connected();
    +}
    +
    +int EventSignalBase::nextId_ = 0;
    +
    +bool EventSignalBase::needsUpdate(bool all) const
    +{
    +  return (!all && flags_.test(BIT_NEED_UPDATE))
    +    || (all &&
    +	(isConnected() || defaultActionPrevented() || propagationPrevented()));
    +}
    +
    +void EventSignalBase::updateOk()
    +{
    +  flags_.set(BIT_NEED_UPDATE, false);
    +}
    +
    +void EventSignalBase::removeSlot(WStatelessSlot *s)
    +{
    +  for (unsigned i = 0; i < connections_.size(); ++i) {
    +    if (connections_[i].slot == s) {
    +      connections_.erase(connections_.begin() + i);
    +      senderRepaint();
    +      return;
    +    }
    +  }
    +
    +  assert(false);
    +}
    +
    +const std::string EventSignalBase::encodeCmd() const
    +{
    +  char buf[20];
    +  buf[0] = 's';
    +  Utils::itoa(id_, buf + 1, 16);
    +  return std::string(buf);
    +}
    +
    +const std::string
    +EventSignalBase::createUserEventCall(const std::string& jsObject,
    +				     const std::string& jsEvent,
    +				     const std::string& eventName,
    +				     const std::string& arg1,
    +				     const std::string& arg2,
    +				     const std::string& arg3,
    +				     const std::string& arg4,
    +				     const std::string& arg5,
    +				     const std::string& arg6) const
    +{
    +  std::stringstream result;
    +
    +  result << javaScript();
    +
    +  if (isExposedSignal()) {
    +    WApplication *app = WApplication::instance();
    +
    +    result << app->javaScriptClass() << ".emit('"
    +	   << sender()->uniqueId();
    +
    +    if (!jsObject.empty())
    +      result << "', { name:'" << eventName << "', eventObject:" << jsObject
    +	     << ", event:" << jsEvent << "}";
    +    else
    +      result << "','" << eventName << "'";
    +
    +    if (!arg1.empty()) {
    +      result << "," << arg1;
    +      if (!arg2.empty()) {
    +	result << "," << arg2;
    +	if (!arg3.empty()) {
    +	  result << "," << arg3;
    +	  if (!arg4.empty()) {
    +	    result << "," << arg4;
    +	    if (!arg5.empty()) {
    +	      result << "," << arg5;
    +	      if (!arg6.empty()) {
    +		result << "," << arg6;
    +	      }
    +	    }
    +	  }
    +	}
    +      }
    +    }
    +
    +    result << ");";
    +  }
    +
    +  return result.str();
    +}
    +
    +const std::string EventSignalBase::javaScript() const
    +{
    +  std::string result = "";
    +
    +  for (unsigned i = 0; i < connections_.size(); ++i) {
    +    if (connections_[i].ok()) {
    +      if (connections_[i].slot->learned())
    +	result += connections_[i].slot->javaScript();
    +    }
    +  }
    +
    +  if (defaultActionPrevented() || propagationPrevented()) {
    +    result += WT_CLASS ".cancelEvent(e";
    +    if (defaultActionPrevented() && propagationPrevented())
    +      result += ");";
    +    else if (defaultActionPrevented())
    +      result += ",0x2);";
    +    else
    +      result += ",0x1);";
    +  }
    +
    +  return result;
    +}
    +
    +void EventSignalBase::setNotExposed()
    +{
    +  flags_.reset(BIT_EXPOSED);
    +}
    +
    +void EventSignalBase::disconnect(boost::signals::connection& conn)
    +{
    +  conn.disconnect();
    +
    +  if (flags_.test(BIT_NEEDS_AUTOLEARN))
    +    if (!isConnected()) {
    +      WApplication *app = WApplication::instance();
    +      app->removeExposedSignal(this);
    +      flags_.reset(BIT_NEEDS_AUTOLEARN);
    +      setNotExposed();
    +    }
    +
    +  senderRepaint();
    +}
    +
    +bool EventSignalBase::isExposedSignal() const
    +{
    +  return flags_.test(BIT_EXPOSED);
    +}
    +
    +void EventSignalBase::preventDefaultAction(bool prevent)
    +{
    +  if (defaultActionPrevented() != prevent) {
    +    flags_.set(BIT_PREVENT_DEFAULT, prevent);
    +    senderRepaint();
    +  }
    +}
    +
    +bool EventSignalBase::defaultActionPrevented() const
    +{
    +  return flags_.test(BIT_PREVENT_DEFAULT);
    +}
    +
    +void EventSignalBase::preventPropagation(bool prevent)
    +{
    +  if (propagationPrevented() != prevent) {
    +    flags_.set(BIT_PREVENT_PROPAGATION, prevent);
    +    senderRepaint();
    +  }
    +}
    +
    +bool EventSignalBase::propagationPrevented() const
    +{
    +  return flags_.test(BIT_PREVENT_PROPAGATION);
    +}
    +
    +void EventSignalBase::prepareDestruct()
    +{
    +  // uses virtual method encodeCmd()
    +  if (flags_.test(BIT_NEEDS_AUTOLEARN)) {
    +    WApplication *app = WApplication::instance();
    +    if (app)
    +      app->removeExposedSignal(this);
    +    flags_.reset(BIT_NEEDS_AUTOLEARN);
    +  }
    +}
    +
    +EventSignalBase::~EventSignalBase()
    +{
    +  prepareDestruct();
    +
    +  for (unsigned i = 0; i < connections_.size(); ++i) {
    +    if (connections_[i].ok())
    +      if (!connections_[i].slot->removeConnection(this))
    +	delete connections_[i].slot;
    +  }
    +}
    +
    +#ifndef WT_CNOR
    +boost::signals::connection
    +EventSignalBase::connectStateless(WObject::Method method,
    +				  WObject *target,
    +				  WStatelessSlot *slot)
    +{
    +  boost::signals::connection c = dummy_.connect(boost::bind(method, target));
    +  slot->addConnection(this);
    +  connections_.push_back(StatelessConnection(c, target, slot));
    +
    +  senderRepaint();
    +
    +  return c;
    +}
    +#endif // WT_CNOR
    +
    +void EventSignalBase::connect(JSlot& slot)
    +{
    +  WStatelessSlot *s = slot.slotimp();
    +
    +  if (s->addConnection(this)) {
    +    boost::signals::connection c;
    +    connections_.push_back(StatelessConnection(c, 0, s));
    +
    +    senderRepaint();
    +  }
    +}
    +
    +void EventSignalBase::connect(const std::string& javaScript)
    +{
    +  boost::signals::connection c;
    +  connections_.push_back
    +    (StatelessConnection(c, 0,
    +			 new WStatelessSlot("(" + javaScript  + ")(o,e);")));
    +
    +  senderRepaint();
    +}
    +
    +#ifndef WT_CNOR
    +bool EventSignalBase::isConnected() const
    +{
    +  bool result = dummy_.num_slots() > 0;
    +
    +  if (!result) {
    +    for (unsigned i = 0; i < connections_.size(); ++i) {
    +      if (connections_[i].target == 0)
    +	return true;
    +    }
    +  }
    +
    +  return result;
    +}
    +#endif // WT_CNOR
    +
    +void EventSignalBase::exposeSignal()
    +{
    +  /*
    +   * - BIT_EXPOSED indicates whether the signal invokes a server-side event
    +   * - BIT_AUTOLEARN indicates whether the signal is in the WApplication's
    +   *   exposed signals list, which is used as a list of signals that require
    +   *   stateless slot learning.
    +   *
    +   * The difference is only signals in those widgets that are used to
    +   * render a WViewWidget: they are not exposed but need learning
    +   */
    +
    +  // cheap catch: if it's exposed, for sure it is also autolearn
    +  if (flags_.test(BIT_EXPOSED)) {
    +    senderRepaint();
    +    return;
    +  }
    +
    +  WApplication *app = WApplication::instance();
    +  app->addExposedSignal(this);
    +
    +  flags_.set(BIT_NEEDS_AUTOLEARN);
    +
    +  if (app->exposeSignals())
    +    flags_.set(BIT_EXPOSED);
    +
    +  senderRepaint();
    +}
    +
    +void EventSignalBase::senderRepaint()
    +{
    +  flags_.set(BIT_NEED_UPDATE, true);
    +  sender()->signalConnectionsChanged();
    +}
    +
    +void EventSignalBase::processNonLearnedStateless() const
    +{
    +  std::vector<StatelessConnection> copy = connections_;
    +
    +  for (unsigned i = 0; i < copy.size(); ++i) {
    +    StatelessConnection& c = copy[i];
    +
    +    if (c.ok() && !c.slot->learned())
    +      c.slot->trigger();
    +  }
    +}
    +
    +void EventSignalBase::processLearnedStateless() const
    +{
    +  std::vector<StatelessConnection> copy = connections_;
    +
    +  for (unsigned i = 0; i < copy.size(); ++i) {
    +    StatelessConnection& c = copy[i];
    +
    +    if (c.ok() && c.slot->learned())
    +      c.slot->trigger();
    +  }
    +}
    +
    +void EventSignalBase::processPreLearnStateless(SlotLearnerInterface *learner)
    +{
    +  std::vector<StatelessConnection> copy = connections_;
    +
    +  for (unsigned i = 0; i < copy.size(); ++i) {
    +    StatelessConnection& c = copy[i];
    +
    +    if (c.ok()
    +	&& !c.slot->learned()
    +	&& c.slot->type() == WStatelessSlot::PreLearnStateless) {
    +      learner->learn(c.slot);
    +    }
    +  }
    +}
    +
    +void EventSignalBase::processAutoLearnStateless(SlotLearnerInterface *learner)
    +{
    +  bool changed = false;
    +
    +  std::vector<StatelessConnection> copy = connections_;
    +
    +  for (unsigned i = 0; i < copy.size(); ++i) {
    +    StatelessConnection& c = copy[i];
    +
    +    if (c.ok()
    +	&& !c.slot->learned()
    +	&& c.slot->type() == WStatelessSlot::AutoLearnStateless) {
    +      learner->learn(c.slot);
    +      changed = true;
    +    }
    +  }
    +
    +  if (changed)
    +    senderRepaint();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSignalMapper b/wt-3.1.7a/src/Wt/WSignalMapper
    new file mode 100644
    index 0000000..42e1e13
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSignalMapper
    @@ -0,0 +1,237 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSIGNALMAPPER_H_
    +#define WSIGNALMAPPER_H_
    +
    +#include <map>
    +#include <Wt/WSignal>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +/*! \class WSignalMapper Wt/WSignalMapper Wt/WSignalMapper
    + *  \brief A utility class to connect multiple senders to a single slot.
    + *
    + * This class is useful if you would like to respond to signals of
    + * many objects or widgets within a single slot, but need to identify
    + * the particular sender through some property.
    + *
    + * Usage example:
    + * \code
    + * void Test::createWidgets()
    + * {
    + *   Wt::WSignalMapper<WText *> *MyMap = new Wt::WSignalMapper<Wt::WText *>(this);
    + *   // connect mapped() to our target slot
    + *   MyMap->mapped().connect(this, &Test::onClick);
    + *
    + *   // connect and map every source signal to the mapper
    + *   MyMap->mapConnect(text1->clicked(), text1);
    + *   MyMap->mapConnect(text2->clicked(), text2);
    + *   MyMap->mapConnect(text3->clicked(), text3);
    + * }
    + *
    + * void Test::onClick(WText* source)
    + * {
    + *   // source is where it is coming from
    + *   // ...
    + * }
    + * \endcode
    + *
    + * The type <i>T</i> may be any type that has proper copy semantics
    + * and a default constructor. The mapper may pass one extra argument
    + * (type <i>A1</i>) from the original signal to the mapped() signal.
    + * In that case, you must connect the original signal to the map1()
    + * slot, or use mapConnect1().
    + *
    + * \ingroup signalslot
    + */
    +template <typename T, typename A1 = NoClass>
    +class WSignalMapper : public WObject
    +{
    +public:
    +  /*! \brief Creates a new %WSignalMapper.
    +   */
    +  WSignalMapper(WObject *parent = 0);
    +
    +  /*! \brief Associates data with a sender.
    +   *
    +   * Associate data with a sender, which wel emitted by the mapped()
    +   * signal, when the corresponding sender signal triggers map() or
    +   * map1().
    +   */
    +  void setMapping(WObject *sender, const T& data);
    +
    +#ifndef WT_CNOR
    +  /*! \brief Maps a signal without arguments.
    +   *
    +   * Connect the given signal with the slot, and associate the data
    +   * when it is triggered.
    +   *
    +   * \code
    +   * Wt::WSignalMapper<T> *mapper = ...
    +   *
    +   * mapper->mapConnect(widget->clicked(), data);
    +   * \endcode
    +   * is equivalent to:
    +   * \code
    +   * Wt::WSignalMapper<T> *mapper = ...
    +   *
    +   * widget->clicked().connect(mapper, &Wt::WSignalMapper<T>::map);
    +   * mapper->setMapping(widget, data);
    +   * \endcode
    +   */
    +  boost::signals::connection mapConnect(SignalBase& signal, const T& data);
    +#else
    +#ifndef WT_TARGET_JAVA
    +  boost::signals::connection mapConnect(SignalBase& signal, const T& data);
    +#endif
    +  template<typename S>
    +   boost::signals::connection mapConnect(EventSignal<S>& signal, const T& data);
    +  
    +  boost::signals::connection mapConnect(EventSignal<>& signal, const T& data);
    +#endif
    +
    +  /*! \brief Maps a signal with one argument.
    +   *
    +   * Connect the given signal with the slot, and associate the data
    +   * when it is triggered. The signal argument will be passed to the
    +   * mapped() signal.
    +   *
    +   * \code
    +   * Wt::WSignalMapper<T, Wt::WMouseEvent> *mapper = ...
    +   *
    +   * mapper->mapConnect(widget->clicked(), data);
    +   * \endcode
    +   * is equivalent to:
    +   * \code
    +   * Wt::WSignalMapper<T, Wt::WMouseEvent> *mapper = ...
    +   *
    +   * widget->clicked().connect(mapper, &Wt::WSignalMapper<T, Wt::WMouseEvent>::map1);
    +   * mapper->setMapping(widget, data);
    +   * \endcode
    +   */
    +  template<typename S>
    +    boost::signals::connection mapConnect1(S& signal, const T& data);
    +
    +  /*! \brief %Signal emitted in response to a signal sent to map() or map1().
    +   *
    +   * The first argument propagated is the data that is associated with
    +   * the specific sender, set in setMapping() or mapConnect(). The
    +   * second argument is an argument passed from the originating signal.
    +   */
    +  Signal<T, A1>& mapped() { return mapped_; }
    +
    +  /*! \brief Slot to which to connect the source signal.
    +   *
    +   * When a signal triggers the slot, the sender is identified and
    +   * used to find corresponding data set with setMapping(), which is
    +   * then use to propagate further in the mapped() signal.
    +   */
    +  void map();
    +
    +  /*! \brief Slot to which to connect the source signal, passing the argument
    +   *         to the receiver.
    +   *
    +   * When a signal triggers the slot, the sender is identified and
    +   * used to find corresponding data set with setMapping(), which is
    +   * then use to propagate further in the mapped() signal. The
    +   * additional argument \p a is passed as the second argument to
    +   * the mapped() signal.
    +   */
    +  void map1(A1 a);
    +
    +  /*! \brief Removes the mapping of an object
    +   *
    +   * This method does not disconnect any signals; that is the responsability of
    +   * the user of WSignalMapper. If no mapping of for an object exits,
    +   * the mapper will ignore the signal, and not emit the mapped signal.
    +   */
    +   void removeMapping(WObject *sender);
    +
    +private:
    +  Signal<T, A1> mapped_;
    +
    +  typedef std::map<WObject *, T> DataMap;
    +  DataMap mappings_;
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +
    +#ifdef _MSC_VER
    +#pragma warning( push )
    +#pragma warning( disable : 4355 )
    +#endif // _MSC_VER
    +
    +template <typename T, typename A1>
    +WSignalMapper<T, A1>::WSignalMapper(WObject *parent)
    +  : WObject(parent),
    +    mapped_(this)
    +{ }
    +
    +#ifdef _MSC_VER
    +#pragma warning( pop )
    +#endif // _MSC_VER
    +
    +template <typename T, typename A1>
    +void WSignalMapper<T, A1>::setMapping(WObject *sender, const T& data)
    +{
    +  mappings_[sender] = data;
    +}
    +
    +template <typename T, typename A1>
    +boost::signals::connection WSignalMapper<T, A1>::mapConnect(SignalBase& signal, const T& data)
    +{
    +  mappings_[signal.sender()] = data;
    +  return signal.connect
    +    (this, static_cast<void (WObject::*)()>(&WSignalMapper<T, A1>::map));
    +}
    +
    +template <typename T, typename A1>
    +template <typename S>
    +boost::signals::connection WSignalMapper<T, A1>::mapConnect1(S& signal, const T& data)
    +{
    +  mappings_[signal.sender()] = data;
    +  return signal.connect(this, &WSignalMapper<T, A1>::map1);
    +}
    +
    +template <typename T, typename A1>
    +void WSignalMapper<T, A1>::map()
    +{
    +  WObject *theSender = sender();
    +
    +  typename DataMap::const_iterator i = mappings_.find(theSender);
    +  if (i != mappings_.end()) {
    +    mapped_.emit(i->second, A1());
    +  }
    +}
    +
    +template <typename T, typename A1>
    +void WSignalMapper<T, A1>::map1(A1 a1)
    +{
    +  WObject *theSender = sender();
    +
    +  typename DataMap::const_iterator i = mappings_.find(theSender);
    +  if (i != mappings_.end()) {
    +    mapped_.emit(i->second, a1);
    +  }
    +}
    +
    +template <typename T, typename A1>
    +void WSignalMapper<T, A1>::removeMapping(WObject *sender)
    +{
    +  typename DataMap::iterator i = mappings_.find(sender);
    +  if (i != mappings_.end()) {
    +    mappings_.erase(i);
    +  }
    +
    +}
    +
    +#endif
    +
    +}
    +
    +#endif // WSIGNALMAPPER_H_
    diff --git a/wt-3.1.7a/src/Wt/WSlider b/wt-3.1.7a/src/Wt/WSlider
    new file mode 100644
    index 0000000..d5ccb4c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSlider
    @@ -0,0 +1,258 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSLIDER_H_
    +#define WSLIDER_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +class WSliderBackground;
    +
    +/*! \class WSlider Wt/WSlider Wt/WSlider
    + *  \brief A horizontal or vertical slider control.
    + *
    + * A slider allows the user to specify an integer value within a particular
    + * range using a visual slider.
    + *
    + * The slider must be sized explicitly using WWidget::resize(). The
    + * default size is 150 x 50 pixels for a horizontal slider, and 50 x
    + * 150 pixels for a vertical slider.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WSlider *scaleSlider = new Wt::WSlider(Wt::Horizontal);
    + * scaleSlider->setMinimum(0);
    + * scaleSlider->setMaximum(20);
    + * scaleSlider->setValue(10);
    + * scaleSlider->setTickInterval(5);
    + * scaleSlider->setTickPosition(Wt::WSlider::TicksBothSides);
    + * scaleSlider->resize(300, 50);
    + * scaleSlider->valueChanged().connect(this, &ThisClass::scaleShape);
    + * \endcode
    + * \endif
    + *
    + * \image html WSlider-1.png "Horizontal slider with ticks on both sides."
    + *
    + * <h3>CSS</h3>
    + *
    + * The slider is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-slider</tt> CSS class and the following
    + * selectors:
    + *
    + * \verbatim
    +.Wt-slider .handle-v : The vertical handle
    +.Wt-slider .handle-h : The horizontal handle
    +\endverbatim
    + */
    +class WT_API WSlider : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Enumeration that specifies the location of ticks.
    +   */
    +  enum TickPosition {
    +    TicksAbove = 0x1,     //!< Render ticks above (horizontal slider)
    +    TicksBelow = 0x2     //!< Render ticks below (horizontal slider)
    +#ifndef WT_TARGET_JAVA
    +    ,TicksLeft = 0x1,      //!< Render ticks on the left side (vertical slider)
    +    TicksRight = 0x2      //!< Render ticks on the right side (vertical slider)
    +#endif // WT_TARGET_JAVA
    +  };
    +
    +  //! Do not render ticks.
    +  static const Wt::WFlags<TickPosition> NoTicks;
    +
    +  //! Render ticks on both sides.
    +  static const Wt::WFlags<TickPosition> TicksBothSides;
    +
    +  /*! \brief Creates a default horizontal slider.
    +   *
    +   * The slider shows no ticks, has a range from 0 to 99, and has tickInterval
    +   * of 0 (defaulting to three ticks over the whole range).
    +   *
    +   * The initial value is 0.
    +   */
    +  WSlider(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a default slider of the given orientation.
    +   *
    +   * The slider shows no ticks, has a range from 0 to 99, and has tickInterval
    +   * of 0 (defaulting to three ticks over the whole range).
    +   *
    +   * The initial value is 0.
    +   */
    +  WSlider(Orientation orientation, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WSlider();
    +
    +  /*! \brief Sets the slider orientation.
    +   *
    +   * \sa orientation()
    +   */
    +  void setOrientation(Wt::Orientation orientation);
    +
    +  /*! \brief Returns the slider orientation.
    +   *
    +   * \sa setOrientation()
    +   */
    +  Orientation orientation() const { return orientation_; }
    +
    +  /*! \brief Sets the tick interval.
    +   *
    +   * The tick interval specifies the interval for placing ticks along
    +   * the slider. The interval is specified in value units (not pixel
    +   * units). A value of 0 specifies an automatic tick interval, which
    +   * defaults to 3 ticks spanning the whole range.
    +   *
    +   * \sa tickInterval(), setTickPosition()
    +   */
    +  void setTickInterval(int tickInterval);
    +
    +  /*! \brief Returns the tick interval.
    +   *
    +   * \sa setTickInterval()
    +   */
    +  int tickInterval() const { return tickInterval_; }
    +
    +  /*! \brief Sets the tick position.
    +   *
    +   * The tick position indicates if and where ticks are placed around the
    +   * slider groove.
    +   *
    +   * \sa tickPosition(), setTickInterval()
    +   */
    +  void setTickPosition(WFlags<TickPosition> tickPosition);
    +
    +  /*! \brief Returns the tick position.
    +   *
    +   * \sa setTickPosition(), setTickInterval()
    +   */
    +  WFlags<TickPosition> tickPosition() const { return tickPosition_; }
    +
    +  /*! \brief Sets the slider value.
    +   *
    +   * The value is automatically trimmed to the valid range (minimum()
    +   * to maximum()).
    +   *
    +   * \sa value()
    +   */
    +  void setValue(int value);
    +
    +  /*! \brief Returns the current slider value.
    +   *
    +   * \sa setValue()
    +   */
    +  int value() const { return value_; }
    +
    +  /*! \brief Sets the maximum value.
    +   *
    +   * The maximum value defines the upper limit of the valid range. The
    +   * lower limit and current value are automatically adjusted to
    +   * remain valid.
    +   *
    +   * \sa maximum(), setMinimum(), setRange()
    +   */
    +  void setMaximum(int maximum);
    +
    +  /*! \brief Returns the maximum value.
    +   *
    +   * \sa setMaximum(int)
    +   */
    +  int maximum() const { return maximum_; }
    +
    +  /*! \brief Sets the minimum value.
    +   *
    +   * The minimum value defines the lower limit of the valid range. The
    +   * upper limit and current value are automatically adjusted to
    +   * remain valid.
    +   *
    +   * \sa minimum(), setMaximum(), setRange()
    +   */
    +  void setMinimum(int minimum);
    +
    +  /*! \brief Returns the minimum value.
    +   *
    +   * \sa setMinimum(int)
    +   */
    +  int minimum() const { return minimum_; }
    +
    +  /*! \brief Sets the value range.
    +   *
    +   * \sa setMinimum(), setMaximum()
    +   */
    +  void setRange(int minimum, int maximum);
    +
    +  /*! \brief %Signal emitted when the user has changed the value of the
    +   *         slider.
    +   *
    +   * The new value is passed as the argument.
    +   *
    +   * \sa sliderMoved()
    +   */
    +  Signal<int>& valueChanged() { return valueChanged_; }
    +
    +  /*! \brief %Signal emitted while the user drags the slider.
    +   *
    +   * The current dragged position is passed as the argument. Note that the
    +   * slider value is not changed while dragging the slider, but only after
    +   * the slider has been released.
    +   *
    +   * \sa valueChanged()
    +   */
    +  JSignal<int>& sliderMoved() { return sliderMoved_; }
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +protected:
    +  virtual void signalConnectionsChanged();
    +  virtual void layoutSizeChanged(int width, int height);
    +
    +private:
    +  Orientation          orientation_;
    +  int                  tickInterval_;
    +  WFlags<TickPosition> tickPosition_;
    +  int                  minimum_, maximum_;
    +
    +  int                  value_;
    +
    +  Signal<int>          valueChanged_;
    +  JSignal<int>         sliderMoved_;
    +  JSignal<int>         sliderReleased_;
    +
    +  WContainerWidget    *impl_;
    +  WSliderBackground   *background_;
    +  WContainerWidget    *handle_;
    +
    +  JSlot mouseDownJS_, mouseMovedJS_, mouseUpJS_;
    +
    +  int range() const { return maximum_ - minimum_; }
    +
    +  void create();
    +  void update();
    +  void updateSliderPosition();
    +
    +  void onSliderClick(const WMouseEvent& event);
    +  void onSliderReleased(int u);
    +
    +  WLength w() const;
    +  WLength h() const;
    +
    +  static const int HANDLE_WIDTH = 17;
    +  static const int HANDLE_HEIGHT = 21;
    +
    +  friend class WSliderBackground;
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WSlider::TickPosition)
    +
    +}
    +
    +#endif // WSLIDER_H_
    diff --git a/wt-3.1.7a/src/Wt/WSlider.C b/wt-3.1.7a/src/Wt/WSlider.C
    new file mode 100644
    index 0000000..8130cc7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSlider.C
    @@ -0,0 +1,388 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WPaintedWidget"
    +#include "Wt/WPainter"
    +#include "Wt/WSlider"
    +
    +namespace Wt {
    +
    +const Wt::WFlags<WSlider::TickPosition> WSlider::NoTicks = 0;
    +const Wt::WFlags<WSlider::TickPosition> WSlider::TicksBothSides
    +  = TicksAbove | TicksBelow;
    +
    +  namespace {
    +    const int HANDLE_WIDTH = 17;
    +    const int HANDLE_HEIGHT = 21;
    +  }
    +
    +  class WSliderBackground : public WPaintedWidget
    +  {
    +  public:
    +    WSliderBackground(WSlider *slider)
    +      : WPaintedWidget(),
    +	slider_(slider)
    +    { }
    +
    +  protected:
    +    void paintEvent(WPaintDevice *paintDevice);
    +
    +  private:
    +    WSlider *slider_;
    +  };
    +
    +  void WSliderBackground::paintEvent(WPaintDevice *paintDevice)
    +  {
    +    WPainter painter(paintDevice);
    +
    +    int w, h;
    +
    +    if (slider_->orientation() == Horizontal) {
    +      w = (int)width().toPixels();
    +      h = (int)height().toPixels();
    +    } else {
    +      w = (int)height().toPixels();
    +      h = (int)width().toPixels();
    +
    +      painter.translate(0, w);
    +      painter.rotate(-90);
    +    }
    +
    +    /*
    +     * Draw inset slider groove, as three lines
    +     */
    +    WPen p1;
    +    p1.setCapStyle(FlatCap);
    +    p1.setColor(WColor(0x89, 0x89, 0x89));
    +    painter.setPen(p1);
    +
    +    painter.drawLine(WSlider::HANDLE_WIDTH/2,     h/2 - 2 + 0.5,
    +		     w - WSlider::HANDLE_WIDTH/2, h/2 - 2 + 0.5);
    +
    +    WPen p2;
    +    p2.setCapStyle(FlatCap);
    +    p2.setColor(WColor(0xb7, 0xb7, 0xb7));
    +    painter.setPen(p2);
    +
    +    painter.drawLine(WSlider::HANDLE_WIDTH/2,     h/2 + 1 + 0.5,
    +		     w - WSlider::HANDLE_WIDTH/2, h/2 + 1 + 0.5);
    +
    +    WPen p3;
    +    p3.setCapStyle(FlatCap);
    +    p3.setColor(WColor(0xd7, 0xd7, 0xd7));
    +    p3.setWidth(2);
    +    painter.setPen(p3);
    +
    +    painter.drawLine(WSlider::HANDLE_WIDTH/2,     h/2,
    +		     w - WSlider::HANDLE_WIDTH/2, h/2);
    +
    +    /*
    +     * Draw ticks
    +     */
    +    if (slider_->tickPosition()) {
    +      int tickInterval = slider_->tickInterval();
    +      int range = slider_->maximum() - slider_->minimum();
    +      if (tickInterval == 0)
    +	tickInterval = range / 2;
    +
    +      double tickStep = ((double)w - WSlider::HANDLE_WIDTH)
    +	/ (range / tickInterval);
    +
    +      WPen pen;
    +      pen.setColor(WColor(0xd7, 0xd7, 0xd7));
    +      pen.setCapStyle(FlatCap);
    +      pen.setWidth(1);
    +      painter.setPen(pen);
    +
    +      int y1 = h / 4;
    +      int y2 = h / 2 - 4;
    +      int y3 = h / 2 + 4;
    +      int y4 = h - h/4;
    +
    +      for (unsigned i = 0; ; ++i) {
    +	int x = WSlider::HANDLE_WIDTH/2 + (int) (i * tickStep);
    +
    +	if (x > w - WSlider::HANDLE_WIDTH/2)
    +	  break;
    +
    +	if (slider_->tickPosition() & WSlider::TicksAbove)
    +	  painter.drawLine(x + 0.5, y1, x + 0.5, y2);
    +	if (slider_->tickPosition() & WSlider::TicksBelow)
    +	  painter.drawLine(x + 0.5, y3, x + 0.5, y4);
    +      }
    +    }
    +  }
    +
    +WSlider::WSlider(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    orientation_(Horizontal),
    +    tickInterval_(0),
    +    tickPosition_(0),
    +    minimum_(0),
    +    maximum_(99),
    +    value_(0),
    +    valueChanged_(this),
    +    sliderMoved_(this, "moved"),
    +    sliderReleased_(this, "released")
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  create();
    +}
    +
    +WSlider::WSlider(Orientation orientation, WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    orientation_(orientation),
    +    tickInterval_(0),
    +    tickPosition_(0),
    +    minimum_(0),
    +    maximum_(99),
    +    value_(0),
    +    valueChanged_(this),
    +    sliderMoved_(this, "moved"),
    +    sliderReleased_(this, "released")
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  create();
    +}
    +
    +WSlider::~WSlider()
    +{ }
    +
    +void WSlider::resize(const WLength& width, const WLength& height)
    +{
    +  WCompositeWidget::resize(width, height);
    +  background_->resize(width, height);
    +  update();
    +}
    +
    +void WSlider::layoutSizeChanged(int width, int height)
    +{
    +  WCompositeWidget::resize(WLength::Auto, WLength::Auto);
    +  background_->resize(width, height);
    +  update();
    +}
    +
    +WLength WSlider::w() const
    +{
    +  return background_->width();
    +}
    +
    +WLength WSlider::h() const
    +{
    +  return background_->height();
    +}
    +
    +void WSlider::create()
    +{
    +  impl_->setStyleClass("Wt-slider");
    +
    +  setPositionScheme(Relative);
    +
    +  impl_->addWidget(background_ = new WSliderBackground(this));
    +  impl_->addWidget(handle_ = new WContainerWidget());
    +
    +  handle_->setPopup(true);
    +  handle_->setPositionScheme(Absolute);
    +
    +  if (orientation_ == Horizontal)
    +    resize(150, 50);
    +  else
    +    resize(50, 150);
    +
    +  handle_->mouseWentDown().connect(mouseDownJS_);
    +  handle_->mouseMoved().connect(mouseMovedJS_);
    +  handle_->mouseWentUp().connect(mouseUpJS_);
    +
    +  background_->clicked().connect(this, &WSlider::onSliderClick);
    +  sliderReleased_.connect(this, &WSlider::onSliderReleased);
    +
    +  setLayoutSizeAware(true);
    +
    +  update();
    +}
    +
    +void WSlider::update()
    +{
    +  std::string resourcesURL = WApplication::resourcesUrl();
    +
    +  background_->update();
    +
    +  handle_->setStyleClass(std::string("handle-")
    +			 + (orientation_ == Horizontal ? 'h': 'v'));
    +
    +  if (orientation_ == Horizontal) {
    +    handle_->resize(HANDLE_WIDTH, HANDLE_HEIGHT);
    +    handle_->setOffsets(h().toPixels() / 2 + 2, Top);
    +  } else {
    +    handle_->resize(HANDLE_HEIGHT, HANDLE_WIDTH);
    +    handle_->setOffsets(w().toPixels() / 2 - HANDLE_HEIGHT - 2, Left);
    +  }
    +
    +  double l = (orientation_ == Horizontal ? w() : h()).toPixels();
    +  double pixelsPerUnit = (l - HANDLE_WIDTH) / range();
    +
    +  std::string dir = (orientation_ == Horizontal ? "left" : "top");
    +  std::string u = (orientation_ == Horizontal ? "x" : "y");
    +  std::string U = (orientation_ == Horizontal ? "X" : "Y");
    +  std::string maxS = boost::lexical_cast<std::string>(l - HANDLE_WIDTH);
    +  std::string ppU = boost::lexical_cast<std::string>(pixelsPerUnit);
    +  std::string minimumS = boost::lexical_cast<std::string>(minimum_);
    +  std::string maximumS = boost::lexical_cast<std::string>(maximum_);
    +
    +  /*
    +   * Note: cancelling the mouseDown event prevents the selection behaviour
    +   */
    +  mouseDownJS_.setJavaScript
    +    ("function(obj, event) {"
    +     """obj.setAttribute('down', " WT_CLASS ".widgetCoordinates(obj, event)."
    +     + u + "); "
    +        WT_CLASS ".cancelEvent(event);"
    +     "}");
    +
    +  // = 'u' position relative to background, corrected for slider
    +  std::string computeD =
    +    ""  "var objh = " + handle_->jsRef() + ","
    +    ""      "objb = " + background_->jsRef() + ","
    +    ""      "u = WT.pageCoordinates(event)." + u + " - down,"
    +    ""      "w = WT.widgetPageCoordinates(objb)." + u + ","
    +    ""      "d = u-w;";
    +
    +  mouseMovedJS_.setJavaScript
    +    ("function(obj, event) {"
    +     """var down = obj.getAttribute('down');"
    +     """var WT = " WT_CLASS ";"
    +     """if (down != null && down != '') {"
    +     + computeD +
    +     ""  "d = Math.max(0, Math.min(d, " + maxS + "));"
    +     ""  "var v = Math.round(d/" + ppU + ");"
    +     ""  "var intd = v*" + ppU + ";"
    +     ""  "if (Math.abs(WT.pxself(objh, '" + dir + "') - intd) > 1) {"
    +     ""    "objh.style." + dir + " = intd + 'px';" +
    +     sliderMoved_.createCall(orientation_ == Horizontal ?
    +			     "v + " + minimumS
    +			     : maximumS + " - v") + 
    +     ""  "}"
    +     """}"
    +     "}");
    +
    +  mouseUpJS_.setJavaScript
    +    ("function(obj, event) {"
    +     """var down = obj.getAttribute('down');"
    +     """var WT = " WT_CLASS ";"
    +     """if (down != null && down != '') {"
    +     + computeD +
    +     """d += " + boost::lexical_cast<std::string>(HANDLE_WIDTH / 2) + ";" +
    +     sliderReleased_.createCall("d") + 
    +     ""  "obj.removeAttribute('down');"
    +     """}"
    +     "}");
    +
    +  updateSliderPosition();
    +}
    +
    +void WSlider::onSliderClick(const WMouseEvent& event)
    +{
    +  onSliderReleased(orientation_ == Horizontal
    +		   ? event.widget().x : event.widget().y);
    +}
    +
    +void WSlider::onSliderReleased(int u)
    +{
    +  if (orientation_ == Horizontal)
    +    u -= HANDLE_WIDTH / 2;
    +  else
    +    u = (int)h().toPixels() - (u + HANDLE_WIDTH / 2);
    +
    +  double l = (orientation_ == Horizontal ? w() : h()).toPixels();
    +  double pixelsPerUnit = (l - HANDLE_WIDTH) / range();
    +
    +  double v = std::max(minimum_,
    +		      std::min(maximum_,
    +			       minimum_ + (int)((double)u / pixelsPerUnit
    +						+ 0.5)));
    +
    +  sliderMoved_.emit(static_cast<int>(v));
    +
    +  setValue(static_cast<int>(v));
    +  valueChanged_.emit(value());  
    +}
    +
    +void WSlider::updateSliderPosition()
    +{
    +  double l = (orientation_ == Horizontal ? w() : h()).toPixels();
    +  double pixelsPerUnit = (l - HANDLE_WIDTH) / range();
    +
    +  double u = ((double)value_ - minimum_) * pixelsPerUnit;
    +
    +  if (orientation_ == Horizontal)
    +    handle_->setOffsets(u, Left);
    +  else
    +    handle_->setOffsets(h().toPixels() - HANDLE_WIDTH - u, Top);
    +}
    +
    +void WSlider::setOrientation(Orientation orientation)
    +{
    +  orientation_ = orientation;
    +
    +  update();
    +}
    +
    +void WSlider::setTickPosition(WFlags<TickPosition> tickPosition)
    +{
    +  tickPosition_ = tickPosition;
    +
    +  background_->update();
    +}
    +
    +void WSlider::setTickInterval(int tickInterval)
    +{
    +  tickInterval_ = tickInterval;
    +
    +  background_->update();
    +}
    +
    +void WSlider::setMinimum(int minimum)
    +{
    +  minimum_ = minimum;
    +  value_ = std::max(minimum_, value_);
    +  maximum_ = std::max(minimum_ + 1, maximum_);
    +
    +  update();
    +}
    +
    +void WSlider::setMaximum(int maximum)
    +{
    +  maximum_ = maximum;
    +  value_ = std::min(maximum_, value_);
    +  minimum_ = std::min(maximum_ - 1, minimum_);
    +
    +  update();
    +}
    +
    +void WSlider::setRange(int minimum, int maximum)
    +{
    +  minimum_ = minimum;
    +  maximum_ = maximum;
    +  value_ = std::min(maximum_, std::max(minimum_, value_));
    +
    +  update();
    +}
    +
    +void WSlider::setValue(int value)
    +{
    +  value_ = std::min(maximum_, std::max(minimum_, value));
    +  updateSliderPosition();
    +}
    +
    +void WSlider::signalConnectionsChanged()
    +{
    +  WCompositeWidget::signalConnectionsChanged();
    +
    +  update();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSocketNotifier b/wt-3.1.7a/src/Wt/WSocketNotifier
    new file mode 100644
    index 0000000..e71429e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSocketNotifier
    @@ -0,0 +1,135 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSOCKETNOTIFIER_H_
    +#define WSOCKETNOTIFIER_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WSignal>
    +
    +namespace Wt {
    +
    +/*! \class WSocketNotifier Wt/WSocketNotifier Wt/WSocketNotifier
    + *  \brief A utility class for asynchronous notification of socket activity.
    + *
    + * Use a aocket notifier to integrate listening for socket events into
    + * the %Wt event loop. In this way, you do not need a separate thread
    + * to listen for socket activity. Socket activity is either the
    + * availability of data to be read (\link WSocketNotifier::Read Read
    + * event\endlink), possibility to write data (\link
    + * WSocketNotifier::Write Write event\endlink), or an exception that
    + * occurred (\link WSocketNotifier::Exception Exception
    + * event\endlink).
    + *
    + * When an event on a socket is available, the notifier emits the
    + * activated() signal. As in the case of a user interface event (like
    + * for example WInteractWidget::clicked()), you will typically modify
    + * the widget tree in response to the event. But, unless you use a
    + * timer (WTimer) or use server-initiated updates (see
    + * WApplication::triggerUpdates()), these changes are not propagated
    + * to the user interface, until the next user interface event.
    + *
    + * Like other events, socket notification events are serial (not
    + * simultaneous), and there are no thread safety issues (you don't
    + * need to take the WApplication::UpdateLock).
    + *
    + * \code
    + * Wt::WSocketNotifier *notifier_;
    + *
    + * void init() {
    + *   ...
    + *   int sock = ...
    + *   notifier_ = new Wt::WSocketNotifier(sock, Wt::WSocketNotifier::Read, this);
    + *   notifier_->activated().connect(this, &HelloApplication::readData);
    + * }
    + *
    + * void readData() {
    + *   // data is available on socket, or socket was closed by peer
    + *   char buf[100];
    + *   int s = read(notifier_->socket(), buf, 99);
    + *
    + *   if (s > 0) {
    + *     ...
    + *   } else {
    + *     // closed by peer
    + *     notifier_->setEnabled(false);
    + *     close(notifier_->socket());
    + *   }
    + * }
    + *
    + * \endcode
    + * 
    + * <i>Note: At present, WSocketNotifier works only in conjunction with
    + * the wthttpd connector, and not when using the FastCGI connector.</i>
    + */
    +class WT_API WSocketNotifier : public WObject
    +{
    +public:
    +  /*! \brief Enumeration that event type.
    +   */
    +  enum Type { Read,      //!< Ready to read
    +	      Write,     //!< Ready to write
    +	      Exception  //!< Exception
    +  };
    +
    +  /*! \brief Creates a new socket notifier.
    +   *
    +   * Create a new socket listener to listen for events of given \p type
    +   * on a socket with file descriptor \p socket. The WSocketNotifier is
    +   * enabled after construction.
    +   */
    +  WSocketNotifier(int socket, Type type, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WSocketNotifier();
    +
    +  /*! \brief Returns the socket.
    +   */
    +  int socket() const { return socket_; }
    +
    +  /*! \brief Returns the event type.
    +   */
    +  Type type() const { return type_; }
    +
    +  /*! \brief Enables or disable the notifier.
    +   *
    +   * By default, the socket notifier is enabled to receive
    +   * events. When disabled, no events will be notified (as if the
    +   * socket notifier didn't exist).
    +   */
    +  void setEnabled(bool enabled);
    +
    +  /*! \brief Returns if the notifier is enabled.
    +   */
    +  bool isEnabled() const { return enabled_; }
    +
    +  /*! \brief %Signal indicating an event.
    +   *
    +   * The signal is emitted when an event that was waited for is
    +   * available. The signal argument is socket().
    +   */
    +  Signal<int>& activated() { return activated_; }
    +
    +private:
    +  int socket_;
    +  Type type_;
    +  bool enabled_;
    +  bool beingNotified_;
    +  std::string sessionId_;
    +
    +  Signal<int> activated_;
    +
    +  const std::string& sessionId() const { return sessionId_; }
    +  void notify();
    +  void dummy();
    +
    +  friend class WebController;
    +};
    +
    +}
    +
    +#endif // WSOCKETNOTIFIER_H_
    diff --git a/wt-3.1.7a/src/Wt/WSocketNotifier.C b/wt-3.1.7a/src/Wt/WSocketNotifier.C
    new file mode 100644
    index 0000000..c35b691
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSocketNotifier.C
    @@ -0,0 +1,76 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WSocketNotifier"
    +#include "Wt/WApplication"
    +
    +#include "WebController.h"
    +#include "WebSession.h"
    +
    +namespace Wt {
    +
    +WSocketNotifier::WSocketNotifier(int socket, Type type, WObject *parent)
    +  : WObject(parent),
    +    socket_(socket),
    +    type_(type),
    +    enabled_(false),
    +    beingNotified_(false),
    +    sessionId_(WApplication::instance()->sessionId()),
    +    activated_(this)
    +{
    +  setEnabled(true);
    +}
    +
    +WSocketNotifier::~WSocketNotifier()
    +{
    +  setEnabled(false);
    +}
    +
    +void WSocketNotifier::setEnabled(bool enabled)
    +{
    +  if (enabled != enabled_) {
    +    enabled_ = enabled;
    +
    +    if (!beingNotified_) {
    +      WebController *controller
    +	= WApplication::instance()->session()->controller();
    +      if (enabled_)
    +        controller->addSocketNotifier(this);
    +      else
    +	controller->removeSocketNotifier(this);
    +    }
    +  }
    +}
    +
    +void WSocketNotifier::dummy()
    +{
    +}
    +
    +void WSocketNotifier::notify()
    +{
    +  beingNotified_ = true;
    +
    +  /*
    +   * use this connection to know if the notifier was killed while
    +   * processing the notification
    +   */
    +  boost::signals::connection alive
    +    = activated_.connect(this, &WSocketNotifier::dummy);
    +
    +  activated_.emit(socket_);
    +
    +  if (alive.connected()) {
    +    alive.disconnect();
    +
    +    beingNotified_ = false;
    +
    +    if (enabled_)
    +      WApplication::instance()->session()->controller()
    +        ->addSocketNotifier(this);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSortFilterProxyModel b/wt-3.1.7a/src/Wt/WSortFilterProxyModel
    new file mode 100644
    index 0000000..1e68722
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSortFilterProxyModel
    @@ -0,0 +1,346 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSORT_FILTER_PROXY_MODEL_H_
    +#define WSORT_FILTER_PROXY_MODEL_H_
    +
    +#include <Wt/WAbstractProxyModel>
    +
    +namespace Wt {
    +
    +class WRegExp;
    +
    +/*! \class WSortFilterProxyModel Wt/WSortFilterProxyModel Wt/WSortFilterProxyModel
    + *  \brief A proxy model for %Wt's item models that provides filtering
    + *         and/or sorting.
    + *
    + * This proxy model does not store data itself, but presents data from
    + * a source model, after filtering rows. It also allows sorting of the
    + * source model data, without actually altering the source model. This
    + * may be convenient when the source model does not support sorting
    + * (i.e. does not reimplement WAbstractProxyModel::sort()), or you do
    + * not want to reorder the underlying model since that affects all views
    + * on the model.
    + *
    + * To use the proxy model to filter data, you use the methods
    + * setFilterKeyColumn(), setFilterRegExp() and setFilterRole() to
    + * specify a filtering operation based on the values of a single
    + * column. If this filtering mechanism is too limiting, you can
    + * provide specialized filtering by reimplementing the
    + * filterAcceptRow() method.
    + *
    + * Sorting is provided by reimplementing the standard
    + * WAbstractItemModel::sort() method. In this way, a view class such
    + * as WTreeView may resort the model as indicated by the user. Use
    + * setSortRole() to indicate on what data role sorting should be done,
    + * or reimplement the lessThan() method to provide a specialized
    + * sorting method.
    + *
    + * By default, the proxy does not automatically refilter and resort
    + * when the original model changes. Data changes or row additions to
    + * the source model are not automatically reflected in the proxy
    + * model, but to maintain integrity, row removals in the source model
    + * are always reflected in the proxy model. You can enable the model
    + * to always refilter and resort when the underlying model changes
    + * using setDynamicSortFilter().
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * // model is the source model
    + * Wt::WAbstractItemModel *model = ...
    + *
    + * // we setup a proxy to filter the source model
    + * Wt::WSortFilterProxyModel *proxy = new Wt::WSortFilterProxyModel(this);
    + * proxy->setSourceModel(model);
    + * proxy->setDynamicSortFilter(true);
    + * proxy->setFilterKeyColumn(0);
    + * proxy->setFilterRole(Wt::UserRole);
    + * proxy->setFilterRegExp("Wt::.*");
    + *
    + * // configure a view to use the proxy model instead of the source model
    + * Wt::WTreeView *view = new Wt::WTreeView(this);
    + * view->setModel(proxy);
    + * ...
    + * \endcode
    + * \elseif java
    + * \code
    + * // model is the source model
    + *  WAbstractItemModel model = ...
    + * 
    + * // we setup a proxy to filter the source model
    + * WSortFilterProxyModel proxy = new WSortFilterProxyModel(this);
    + * proxy.setSourceModel(model);
    + * proxy.setDynamicSortFilter(true);
    + * proxy.setFilterKeyColumn(0);
    + * proxy.setFilterRole(ItemDataRole.UserRole);
    + * proxy.setFilterRegExp(".*");
    + *		 
    + * // configure a view to use the proxy model instead of the source model
    + * WTreeView view = new WTreeView(this);
    + * view.setModel(proxy);
    + * ...
    + * \endcode
    + * \endif
    + *
    + * \ingroup modelview
    + */
    +class WT_API WSortFilterProxyModel : public WAbstractProxyModel
    +{
    +public:
    +  /*! \brief Constructor.
    +   */
    +  WSortFilterProxyModel(WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WSortFilterProxyModel();
    +
    +  virtual WModelIndex mapFromSource(const WModelIndex& sourceIndex) const;
    +  virtual WModelIndex mapToSource(const WModelIndex& proxyIndex) const;
    +
    +  virtual void setSourceModel(WAbstractItemModel *sourceModel);
    +
    +  /*! \brief Specify the column on which the filtering is applied.
    +   *
    +   * This configures the column on which the filterRegExp() is applied.
    +   *
    +   * The default value is 0.
    +   *
    +   * \sa setFilterRegExp(), setFilterRole()
    +   */
    +  void setFilterKeyColumn(int column);
    +
    +  /*! \brief Return the column on which the filtering is applied.
    +   *
    +   * \sa setFilterKeyColumn()
    +   */
    +  int filterKeyColumn() const { return filterKeyColumn_; }
    +
    +  /*! \brief Specify a regular expression for filtering.
    +   *
    +   * This configures the regular expression used for filtering on
    +   * filterKeyColumn().
    +   *
    +   * The default value is an empty expression, which disables
    +   * filtering.
    +   *
    +   * \sa setFilterKeyColumn(), setFilterRole()
    +   */
    +  void setFilterRegExp(const WT_USTRING& pattern);
    +
    +  /*! \brief Return the regular expression used for filtering.
    +   *
    +   * \sa setFilterRegExp()
    +   */
    +  WT_USTRING filterRegExp() const;
    +
    +  /*! \brief Sets the filter regular expression flags.
    +   */
    +  void setFilterFlags(WFlags<RegExpFlag> flags);
    +
    +  /*! \brief Returns the filter regular expression flags.
    +   */
    +  WFlags<RegExpFlag> filterFlags() const;
    +
    +  /*! \brief Specify the data role used for filtering.
    +   *
    +   * This configures the data role used for filtering on
    +   * filterKeyColumn().
    +   *
    +   * The default value is \link Wt::DisplayRole DisplayRole\endlink.
    +   *
    +   * \sa setFilterKeyColumn(), setFilterRegExp()
    +   */
    +  void setFilterRole(int role);
    +
    +  /*! \brief Return the data role used for filtering.
    +   *
    +   * \sa setFilterRole()
    +   */
    +  int filterRole() const { return filterRole_; }
    +
    +  /*! \brief Specify the data role used used for sorting.
    +   *
    +   * This configures the data role used for sorting.
    +   *
    +   * The default value is \link Wt::DisplayRole DisplayRole\endlink.
    +   *
    +   * \sa lessThan()
    +   */
    +  void setSortRole(int role);
    +
    +  /*! \brief Return the data role used for sorting.
    +   *
    +   * \sa setSortRole()
    +   */
    +  int sortRole() const { return sortRole_; }
    +
    +  /*! \brief Configure the proxy to dynamically track changes in the
    +   *         source model.
    +   *
    +   * When \p enable is \c true, the proxy will re-filter and re-sort
    +   * the model when changes happen to the source model.
    +   *
    +   * \note This may be ackward when editing through the proxy model,
    +   * since changing some data may rearrange the model and thus
    +   * invalidate model indexes. Therefore it is usually less
    +   * complicated to manipulate directly the source model instead.
    +   *
    +   * \sa lessThan()
    +   */
    +  void setDynamicSortFilter(bool enable);
    +
    +  /*! \brief Returns whether this proxy dynmically filters and sorts.
    +   *
    +   * \sa setDynamicSortFilter()
    +   */
    +  bool dynamicSortFilter() const { return dynamic_; }
    +
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual bool setHeaderData(int section, Orientation orientation,
    +			     const boost::any& value,
    +			     int role = EditRole);
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +  /*! \brief Inserts a number rows.
    +   *
    +   * The rows are inserted in the source model, and if successful,
    +   * also in the proxy model regardless of whether they are matched by
    +   * the current filter. They are inserted at the indicated row,
    +   * regardless of whether this is the correct place according to the
    +   * defined sorting.
    +   *
    +   * As soon as you set data for the column on which the filtering is
    +   * active, or which affects the sorting, the row may be filtered out
    +   * or change position when dynamic sorting/filtering is
    +   * enabled. Therefore, it is usually a good idea to temporarily
    +   * disable the dynamic sort/filtering behaviour while inserting new
    +   * row(s) of data.
    +   */
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  /*! \brief Removes a number rows.
    +   *
    +   * The rows are removed from the source model.
    +   */
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +protected:
    +  /*! \brief Returns whether a source row is accepted by the filter.
    +   *
    +   * The default implementation uses filterKeyColumn(), filterRole()
    +   * and filterRegExp().
    +   *
    +   * You may want to reimplement this method to provide specialized
    +   * filtering.
    +   */
    +  virtual bool filterAcceptRow(int sourceRow, const WModelIndex& sourceParent)
    +    const;
    +
    +  /*! \brief Compares two indexes.
    +   *
    +   * The default implementation uses sortRole() and an ordering using
    +   * the operator< when the data is of the same type or compares
    +   * lexicographically otherwise.
    +   *
    +   * You may want to reimplement this method to provide specialized
    +   * sorting.
    +   */
    +  virtual bool lessThan(const WModelIndex& lhs, const WModelIndex& rhs)
    +    const;
    +
    +private:
    +  /*
    +   * For every proxy parent, we keep the following info:
    +   */
    +  struct Item : public BaseItem {
    +    // maps source rows to proxy rows
    +    std::vector<int> sourceRowMap_;
    +    // maps proxy rows to source rows
    +    std::vector<int> proxyRowMap_;
    +
    +    Item(const WModelIndex& sourceIndex) : BaseItem(sourceIndex) { }
    +    virtual ~Item();
    +  };
    +
    +  struct Compare W_JAVA_COMPARATOR(int) {
    +    Compare(const WSortFilterProxyModel *aModel, Item *anItem)
    +      : model(aModel), item(anItem) { }
    +
    +#ifndef WT_TARGET_JAVA
    +    bool operator()(int sourceRow1, int sourceRow2) const;
    +
    +    bool lessThan(int sourceRow1, int sourceRow2) const;
    +#endif // WT_TARGET_JAVA
    +
    +    int compare(int sourceRow1, int sourceRow2) const;
    +
    +    const WSortFilterProxyModel *model;
    +    Item *item;
    +  };
    +
    +  WRegExp *regex_;
    +
    +  int       filterKeyColumn_, filterRole_;
    +  int       sortKeyColumn_, sortRole_;
    +  SortOrder sortOrder_;
    +  bool      dynamic_, inserting_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +  mutable ItemMap mappedIndexes_;
    +  mutable Item* mappedRootItem_;
    +
    +  void sourceColumnsAboutToBeInserted(const WModelIndex& parent,
    +				      int start, int end);
    +  void sourceColumnsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceColumnsAboutToBeRemoved(const WModelIndex& parent,
    +				     int start, int end);
    +  void sourceColumnsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeInserted(const WModelIndex& parent,
    +				   int start, int end);
    +  void sourceRowsInserted(const WModelIndex& parent, int start, int end);
    +
    +  void sourceRowsAboutToBeRemoved(const WModelIndex& parent,
    +				  int start, int end);
    +  void sourceRowsRemoved(const WModelIndex& parent, int start, int end);
    +
    +  void sourceDataChanged(const WModelIndex& topLeft,
    +			 const WModelIndex& bottomRight);
    +
    +  void sourceHeaderDataChanged(Orientation orientation, int start, int end);
    +
    +  void sourceLayoutAboutToBeChanged();
    +  void sourceLayoutChanged();
    +
    +  Item *itemFromSourceIndex(const WModelIndex& sourceIndex) const;
    +  Item *parentItemFromIndex(const WModelIndex& index) const;
    +  Item *itemFromIndex(const WModelIndex& index) const;
    +  void resetMappings();
    +  void updateItem(Item *item) const;
    +  void rebuildSourceRowMap(Item *item) const;
    +
    +  int mappedInsertionPoint(int sourceRow, Item *item) const;
    +  int compare(const WModelIndex& lhs, const WModelIndex& rhs) const;
    +};
    +
    +}
    +
    +#endif // WSORT_FILTER_PROXY_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WSortFilterProxyModel.C b/wt-3.1.7a/src/Wt/WSortFilterProxyModel.C
    new file mode 100644
    index 0000000..ae4014a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSortFilterProxyModel.C
    @@ -0,0 +1,653 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +#include <iostream>
    +
    +#include "Wt/WSortFilterProxyModel"
    +#include "Wt/WRegExp"
    +
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +#ifndef DOXYGEN_ONLY
    +#ifndef WT_TARGET_JAVA
    +bool WSortFilterProxyModel::Compare::operator()(int sourceRow1,
    +						int sourceRow2) const
    +{
    +  if (model->sortOrder_ == AscendingOrder)
    +    return lessThan(sourceRow1, sourceRow2);
    +  else
    +    return lessThan(sourceRow2, sourceRow1);
    +}
    +
    +bool WSortFilterProxyModel::Compare::lessThan(int sourceRow1, int sourceRow2)
    +  const
    +{
    +  if (model->sortKeyColumn_ == -1)
    +    return sourceRow1 < sourceRow2;
    +
    +  WModelIndex lhs
    +    = model->sourceModel()->index(sourceRow1, model->sortKeyColumn_,
    +				  item->sourceIndex_);
    +
    +  WModelIndex rhs
    +    = model->sourceModel()->index(sourceRow2, model->sortKeyColumn_,
    +				  item->sourceIndex_);
    +
    +  return model->lessThan(lhs, rhs);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +int WSortFilterProxyModel::Compare::compare(int sourceRow1, int sourceRow2)
    +  const
    +{
    +  int factor = (model->sortOrder_ == AscendingOrder) ? 1 : -1;
    +
    +  if (model->sortKeyColumn_ == -1)
    +    return factor * (sourceRow1 - sourceRow2);
    +
    +  WModelIndex lhs
    +    = model->sourceModel()->index(sourceRow1, model->sortKeyColumn_,
    +				  item->sourceIndex_);
    +
    +  WModelIndex rhs
    +    = model->sourceModel()->index(sourceRow2, model->sortKeyColumn_,
    +				  item->sourceIndex_);
    +
    +  return factor * model->compare(lhs, rhs);
    +}
    +
    +#endif // DOXYGEN_ONLY
    +
    +WSortFilterProxyModel::Item::~Item()
    +{ }
    +
    +WSortFilterProxyModel::WSortFilterProxyModel(WObject *parent)
    +  : WAbstractProxyModel(parent),
    +    regex_(0),
    +    filterKeyColumn_(0),
    +    filterRole_(DisplayRole),
    +    sortKeyColumn_(-1),
    +    sortRole_(DisplayRole),
    +    sortOrder_(AscendingOrder),
    +    dynamic_(false),
    +    inserting_(false),
    +    mappedRootItem_(0)
    +{ }
    +
    +WSortFilterProxyModel::~WSortFilterProxyModel()
    +{
    +  delete regex_;
    +
    +  resetMappings();
    +}
    +
    +void WSortFilterProxyModel::setSourceModel(WAbstractItemModel *model)
    +{
    +  if (sourceModel()) {
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  WAbstractProxyModel::setSourceModel(model);
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeInserted().connect
    +     (this, &WSortFilterProxyModel::sourceColumnsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->columnsInserted().connect
    +     (this, &WSortFilterProxyModel::sourceColumnsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->columnsAboutToBeRemoved().connect
    +     (this, &WSortFilterProxyModel::sourceColumnsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->columnsRemoved().connect
    +     (this, &WSortFilterProxyModel::sourceColumnsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeInserted().connect
    +     (this, &WSortFilterProxyModel::sourceRowsAboutToBeInserted));
    +  modelConnections_.push_back(sourceModel()->rowsInserted().connect
    +     (this, &WSortFilterProxyModel::sourceRowsInserted));
    +
    +  modelConnections_.push_back(sourceModel()->rowsAboutToBeRemoved().connect
    +     (this, &WSortFilterProxyModel::sourceRowsAboutToBeRemoved));
    +  modelConnections_.push_back(sourceModel()->rowsRemoved().connect
    +     (this, &WSortFilterProxyModel::sourceRowsRemoved));
    +
    +  modelConnections_.push_back(sourceModel()->dataChanged().connect
    +     (this, &WSortFilterProxyModel::sourceDataChanged));
    +  modelConnections_.push_back(sourceModel()->headerDataChanged().connect
    +     (this, &WSortFilterProxyModel::sourceHeaderDataChanged));
    +
    +  modelConnections_.push_back(sourceModel()->layoutAboutToBeChanged().connect
    +     (this, &WSortFilterProxyModel::sourceLayoutAboutToBeChanged));
    +  modelConnections_.push_back(sourceModel()->layoutChanged().connect
    +     (this, &WSortFilterProxyModel::sourceLayoutChanged));
    +
    +  resetMappings();
    +}
    +
    +void WSortFilterProxyModel::setFilterKeyColumn(int column)
    +{
    +  filterKeyColumn_ = column;
    +}
    +
    +void WSortFilterProxyModel::setFilterRole(int role)
    +{
    +  filterRole_ = role;
    +}
    +
    +void WSortFilterProxyModel::setSortRole(int role)
    +{
    +  sortRole_ = role;
    +}
    +
    +void WSortFilterProxyModel::setFilterRegExp(const WT_USTRING& pattern)
    +{
    +  if (!regex_)
    +    regex_ = new WRegExp(pattern);
    +  else
    +    regex_->setPattern(pattern, regex_->flags());
    +
    +  if (sourceModel()) {
    +    layoutAboutToBeChanged().emit();
    +
    +    resetMappings();
    +
    +    layoutChanged().emit();
    +  }
    +}
    +
    +WT_USTRING WSortFilterProxyModel::filterRegExp() const
    +{
    +  return regex_ ? regex_->pattern() : WT_USTRING();
    +}
    +
    +void WSortFilterProxyModel::setFilterFlags(WFlags<RegExpFlag> flags)
    +{
    +  if (!regex_)
    +    regex_ = new WRegExp(".*");
    +
    +  regex_->setPattern(regex_->pattern(), flags);
    +}
    +
    +WFlags<RegExpFlag> WSortFilterProxyModel::filterFlags() const
    +{
    +  if (regex_)
    +    return regex_->flags();
    +  else 
    +    return (int)0;
    +}
    +
    +void WSortFilterProxyModel::sort(int column, SortOrder order)
    +{
    +  sortKeyColumn_ = column;
    +  sortOrder_ = order;
    +
    +  if (sourceModel()) {
    +    layoutAboutToBeChanged().emit();
    +
    +    resetMappings();
    +
    +    layoutChanged().emit();
    +  }
    +}
    +
    +void WSortFilterProxyModel::setDynamicSortFilter(bool enable)
    +{
    +  dynamic_ = enable;
    +}
    +
    +void WSortFilterProxyModel::resetMappings()
    +{
    +  for (ItemMap::iterator i = mappedIndexes_.begin();
    +       i != mappedIndexes_.end(); ++i)
    +    delete i->second;
    +
    +  mappedIndexes_.clear();
    +
    +  delete mappedRootItem_;
    +  mappedRootItem_ = 0;
    +}
    +
    +WModelIndex WSortFilterProxyModel::mapFromSource(const WModelIndex& sourceIndex)
    +  const
    +{
    +  if (sourceIndex.isValid()) {
    +    WModelIndex sourceParent = sourceIndex.parent();
    +
    +    Item *item = itemFromSourceIndex(sourceParent);
    +
    +    int row = item->sourceRowMap_[sourceIndex.row()];
    +    if (row != -1)
    +      return createIndex(row, sourceIndex.column(),
    +			 static_cast<void *>(item));
    +    else
    +      return WModelIndex();
    +  } else
    +    return WModelIndex();
    +}
    +
    +WModelIndex WSortFilterProxyModel::mapToSource(const WModelIndex& proxyIndex)
    +  const
    +{
    +  if (proxyIndex.isValid()) {
    +    Item *parentItem = parentItemFromIndex(proxyIndex);
    +    return sourceModel()->index(parentItem->proxyRowMap_[proxyIndex.row()],
    +				proxyIndex.column(),
    +				parentItem->sourceIndex_);
    +  } else
    +    return WModelIndex();
    +}
    +
    +WModelIndex WSortFilterProxyModel::index(int row, int column,
    +					 const WModelIndex& parent) const
    +{
    +  Item *item = itemFromIndex(parent);
    +
    +  return createIndex(row, column, static_cast<void *>(item));
    +}
    +
    +WModelIndex WSortFilterProxyModel::parent(const WModelIndex& index) const
    +{
    +  if (index.isValid()) {
    +    Item *parentItem = parentItemFromIndex(index);
    +
    +    return mapFromSource(parentItem->sourceIndex_);
    +  } else
    +    return WModelIndex();
    +}
    +
    +WSortFilterProxyModel::Item *
    +WSortFilterProxyModel::parentItemFromIndex(const WModelIndex& index) const
    +{
    +  return static_cast<Item *>(index.internalPointer());
    +}
    +
    +WSortFilterProxyModel::Item *
    +WSortFilterProxyModel::itemFromIndex(const WModelIndex& index) const
    +{
    +  if (index.isValid()) {
    +    Item *parentItem = parentItemFromIndex(index);
    +
    +    WModelIndex sourceIndex
    +      = sourceModel()->index(parentItem->proxyRowMap_[index.row()],
    +			     index.column(), parentItem->sourceIndex_);
    +    return itemFromSourceIndex(sourceIndex);
    +  } else
    +    return itemFromSourceIndex(WModelIndex());
    +}
    +
    +WSortFilterProxyModel::Item *
    +WSortFilterProxyModel::itemFromSourceIndex(const WModelIndex& sourceParent)
    +  const
    +{
    +  if (!sourceParent.isValid()) {
    +    if (!mappedRootItem_) {
    +      Item *result = new Item(sourceParent);
    +      mappedRootItem_ = result;
    +      updateItem(result);
    +    }
    +    return mappedRootItem_;
    +  }
    +
    +  ItemMap::const_iterator i = mappedIndexes_.find(sourceParent);
    +  if (i == mappedIndexes_.end()) {
    +    Item *result = new Item(sourceParent);
    +    mappedIndexes_[sourceParent] = result;
    +    updateItem(result);
    +    return result;
    +  } else
    +    return dynamic_cast<Item *>(i->second);
    +}
    +
    +void WSortFilterProxyModel::updateItem(Item *item) const
    +{
    +  int sourceRowCount = sourceModel()->rowCount(item->sourceIndex_);
    +  item->sourceRowMap_.resize(sourceRowCount);
    +  item->proxyRowMap_.clear();
    +
    +  /*
    +   * Filter...
    +   */
    +  for (int i = 0; i < sourceRowCount; ++i) {
    +    if (filterAcceptRow(i, item->sourceIndex_)) {
    +      item->sourceRowMap_[i] = item->proxyRowMap_.size();
    +      item->proxyRowMap_.push_back(i);
    +    } else
    +      item->sourceRowMap_[i] = -1;
    +  }
    +
    +  /*
    +   * Sort...
    +   */
    +  if (sortKeyColumn_ != -1) {
    +    Utils::stable_sort(item->proxyRowMap_, Compare(this, item));
    +
    +    rebuildSourceRowMap(item);
    +  }
    +}
    +
    +void WSortFilterProxyModel::rebuildSourceRowMap(Item *item) const
    +{
    +  for (unsigned i = 0; i < item->proxyRowMap_.size(); ++i)
    +    item->sourceRowMap_[item->proxyRowMap_[i]] = i;
    +}
    +
    +int WSortFilterProxyModel::mappedInsertionPoint(int sourceRow, Item *item) const
    +{
    +  /*
    +   * Filter...
    +   */
    +  bool acceptRow = filterAcceptRow(sourceRow, item->sourceIndex_);
    +
    +  if (!acceptRow)
    +    return -1;
    +  else
    +    return Utils::insertion_point(item->proxyRowMap_ , sourceRow,
    +				  Compare(this, item));
    +}
    +
    +bool WSortFilterProxyModel::filterAcceptRow(int sourceRow,
    +					    const WModelIndex& sourceParent)
    +  const
    +{
    +  if (regex_) {
    +    WString s = asString(sourceModel()
    +			 ->index(sourceRow, filterKeyColumn_, sourceParent)
    +			 .data(filterRole_));
    +    bool result = regex_->exactMatch(s);
    +
    +    return result;
    +  } else
    +    return true;
    +}
    +
    +bool WSortFilterProxyModel::lessThan(const WModelIndex& lhs,
    +				     const WModelIndex& rhs) const
    +{
    +  return compare(lhs, rhs) < 0;
    +}
    +
    +int WSortFilterProxyModel::compare(const WModelIndex& lhs,
    +				   const WModelIndex& rhs) const
    +{
    +  return Wt::Impl::compare(lhs.data(sortRole_), rhs.data(sortRole_));
    +}
    +
    +int WSortFilterProxyModel::columnCount(const WModelIndex& parent) const
    +{
    +  return sourceModel()->columnCount(mapToSource(parent));
    +}
    +
    +int WSortFilterProxyModel::rowCount(const WModelIndex& parent) const
    +{
    +  Item *item = itemFromIndex(parent);
    +
    +  return item->proxyRowMap_.size();
    +}
    +
    +bool WSortFilterProxyModel::setHeaderData(int section, Orientation orientation,
    +					  const boost::any& value, int role)
    +{
    +  if (orientation == Vertical)
    +    section = mapToSource(index(section, 0)).row();
    +
    +  return sourceModel()->setHeaderData(section, orientation, value, role);
    +}
    +
    +boost::any WSortFilterProxyModel::headerData(int section,
    +					     Orientation orientation, int role)
    +  const
    +{
    +  if (orientation == Vertical)
    +    section = mapToSource(index(section, 0)).row();
    +
    +  return sourceModel()->headerData(section, orientation, role);
    +}
    +
    +void WSortFilterProxyModel::sourceColumnsAboutToBeInserted
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  beginInsertColumns(mapFromSource(parent), start, end);
    +}
    +
    +void WSortFilterProxyModel::sourceColumnsInserted(const WModelIndex& parent,
    +						  int start, int end)
    +{
    +  endInsertColumns();
    +}
    +
    +void WSortFilterProxyModel::sourceColumnsAboutToBeRemoved
    +  (const WModelIndex& parent, int start, int end)
    +{ 
    +  beginRemoveColumns(mapFromSource(parent), start, end);
    +}
    +
    +void WSortFilterProxyModel::sourceColumnsRemoved(const WModelIndex& parent,
    +						 int start, int end)
    +{ 
    +  endRemoveColumns();
    +}
    +
    +void WSortFilterProxyModel::sourceRowsAboutToBeInserted
    +  (const WModelIndex& parent, int start, int end)
    +{
    +  if (inserting_)
    +    return;
    +
    +  /*
    +   * Make sure the item starts in a known state, otherwise if the item
    +   * does not yet have a sourceRowMap, it will be created taking into
    +   * account the already updated number of source rows, in
    +   * sourceRowsInserted().
    +   *
    +   * BTW. one might wonder if a user of the proxy model is interested
    +   * at all in changes to a node which he has not yet 'opened' ..., but
    +   * strictly spoken we are obliged to propagate these changes !
    +   */
    +  itemFromIndex(mapFromSource(parent));
    +}
    +
    +void WSortFilterProxyModel::sourceRowsInserted(const WModelIndex& parent,
    +					       int start, int end)
    +{
    +  shiftModelIndexes(parent, start, (end - start + 1), mappedIndexes_);
    +
    +  if (inserting_)
    +    return;
    +
    +  int count = end - start + 1;
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  // Shift existing entries in proxyRowMap, and reserve place in sourceRowMap
    +  // After this step, existing rows are okay again.
    +  for (unsigned i = 0; i < item->proxyRowMap_.size(); ++i) {
    +    if (item->proxyRowMap_[i] >= start)
    +      item->proxyRowMap_[i] += count;
    +  }
    +
    +  item->sourceRowMap_.insert(item->sourceRowMap_.begin() + start, count, -1);
    +
    +  if (!dynamic_)
    +    return;
    +
    +  for (int row = start; row <= end; ++row) {
    +    int newMappedRow = mappedInsertionPoint(row, item);
    +    if (newMappedRow != -1) {
    +      beginInsertRows(pparent, newMappedRow, newMappedRow);
    +      item->proxyRowMap_.insert
    +	(item->proxyRowMap_.begin() + newMappedRow, row);
    +      rebuildSourceRowMap(item); // insertion may have shifted some
    +      endInsertRows();
    +    } else
    +      item->sourceRowMap_[row] = -1;
    +  }
    +}
    +
    +void WSortFilterProxyModel::sourceRowsAboutToBeRemoved
    +(const WModelIndex& parent, int start, int end)
    +{
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  for (int row = start; row <= end; ++row) {
    +    int mappedRow = item->sourceRowMap_[row];
    +
    +    if (mappedRow != -1) {
    +      beginRemoveRows(pparent, mappedRow, mappedRow);
    +      item->proxyRowMap_.erase(item->proxyRowMap_.begin() + mappedRow);
    +      rebuildSourceRowMap(item); // erase may have shifted some
    +      endRemoveRows();
    +    }
    +  }
    +}
    +
    +void WSortFilterProxyModel::sourceRowsRemoved(const WModelIndex& parent,
    +					      int start, int end)
    +{
    +  int count = end - start + 1;
    +
    +  shiftModelIndexes(parent, start, -count, mappedIndexes_);
    +
    +  WModelIndex pparent = mapFromSource(parent);
    +  Item *item = itemFromIndex(pparent);
    +
    +  // Shift existing entries in proxyRowMap, and remove entries in sourceRowMap
    +  for (unsigned i = 0; i < item->proxyRowMap_.size(); ++i) {
    +    if (item->proxyRowMap_[i] >= start)
    +      item->proxyRowMap_[i] -= count;
    +  }
    +
    +  item->sourceRowMap_.erase(item->sourceRowMap_.begin() + start,
    +			    item->sourceRowMap_.begin() + start + count);
    +}
    +
    +void WSortFilterProxyModel::sourceDataChanged(const WModelIndex& topLeft,
    +					      const WModelIndex& bottomRight)
    +{
    +  bool refilter
    +    = dynamic_ && (filterKeyColumn_ >= topLeft.column() 
    +		   && filterKeyColumn_ <= bottomRight.column());
    +
    +  bool resort
    +    = dynamic_ && (sortKeyColumn_ >= topLeft.column() 
    +		   && sortKeyColumn_ <= bottomRight.column());
    +
    +  WModelIndex parent = mapFromSource(topLeft.parent());
    +  Item *item = itemFromIndex(parent);
    +
    +  for (int row = topLeft.row(); row <= bottomRight.row(); ++row) {
    +    int oldMappedRow = item->sourceRowMap_[row];
    +    bool propagateDataChange = oldMappedRow != -1;
    +
    +    if (refilter || resort) {
    +      // Determine new insertion point: erase it temporarily for this
    +      item->proxyRowMap_.erase(item->proxyRowMap_.begin() + oldMappedRow);
    +      int newMappedRow = mappedInsertionPoint(row, item);
    +      item->proxyRowMap_.insert(item->proxyRowMap_.begin() + oldMappedRow, row);
    +
    +      if (newMappedRow != oldMappedRow) {
    +	if (oldMappedRow != -1) {
    +	  beginRemoveRows(parent, oldMappedRow, oldMappedRow);
    +	  item->proxyRowMap_.erase
    +	    (item->proxyRowMap_.begin() + oldMappedRow);
    +	  rebuildSourceRowMap(item);
    +	  endRemoveRows();
    +	}
    +
    +	if (newMappedRow != -1) {
    +	  beginInsertRows(parent, newMappedRow, newMappedRow);
    +	  item->proxyRowMap_.insert
    +	    (item->proxyRowMap_.begin() + newMappedRow, row);
    +	  rebuildSourceRowMap(item);
    +	  endInsertRows();
    +	}
    +
    +	propagateDataChange = false;
    +      }
    +    }
    +
    +    if (propagateDataChange) {
    +      WModelIndex l = sourceModel()->index(row, topLeft.column(),
    +					   topLeft.parent());
    +      WModelIndex r = sourceModel()->index(row, bottomRight.column(),
    +					   topLeft.parent());
    +
    +      dataChanged().emit(mapFromSource(l), mapFromSource(r));
    +    }
    +  }
    +}
    +
    +void WSortFilterProxyModel::sourceHeaderDataChanged(Orientation orientation, 
    +						    int start, int end)
    +{
    +  if (orientation == Vertical) {
    +    Item *item = itemFromIndex(WModelIndex());
    +    for (int row = start; row <= end; ++row) {
    +      int mappedRow = item->sourceRowMap_[row];
    +      if (mappedRow != -1)
    +	headerDataChanged().emit(orientation, mappedRow, mappedRow);
    +    }
    +  } else
    +    headerDataChanged().emit(orientation, start, end);
    +}
    +
    +void WSortFilterProxyModel::sourceLayoutAboutToBeChanged()
    +{ 
    +  layoutAboutToBeChanged().emit();
    +  resetMappings();
    +}
    +
    +void WSortFilterProxyModel::sourceLayoutChanged()
    +{
    +  layoutChanged().emit();
    +}
    +
    +bool WSortFilterProxyModel::insertRows(int row, int count,
    +				       const WModelIndex& parent)
    +{
    +  int sourceRow;
    +
    +  int currentCount = rowCount(parent);
    +  if (row < currentCount)
    +    sourceRow = mapToSource(index(row, 0, parent)).row();
    +  else
    +    sourceRow = sourceModel()->rowCount(mapToSource(parent));
    +
    +  inserting_ = true;
    +  bool result
    +    = sourceModel()->insertRows(sourceRow, count, mapToSource(parent));
    +  inserting_ = false;
    +
    +  if (!result)
    +    return false;
    +
    +  Item *item = itemFromIndex(parent);
    +
    +  beginInsertRows(parent, row, row);
    +  item->proxyRowMap_.push_back(sourceRow);
    +  item->sourceRowMap_.insert(item->sourceRowMap_.begin() + sourceRow, row);
    +  endInsertRows();
    +
    +  return true;
    +}
    +
    +bool WSortFilterProxyModel::removeRows(int row, int count,
    +				       const WModelIndex& parent)
    +{
    +  for (int i = 0; i < count; ++i) {
    +    int sourceRow = mapToSource(index(row, 0, parent)).row();
    +    if (!sourceModel()->removeRows(sourceRow, 1, mapToSource(parent)))
    +      return false;
    +  }
    +
    +  return true;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSound b/wt-3.1.7a/src/Wt/WSound
    new file mode 100644
    index 0000000..300c8b1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSound
    @@ -0,0 +1,110 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSOUND_H_
    +#define WSOUND_H_
    +
    +#include <Wt/WObject>
    +
    +namespace Wt {
    +class SoundManager;
    +
    +/*! \class WSound Wt/WSound Wt/WSound
    + * \brief Utility class to play a sound.
    + *
    + * This class provides a way to play a sound asynchonously (if the
    + * browser supports this). It is intended as a simple way to play
    + * event sounds (not quite for a media center).
    + *
    + * The current implementation uses Adobe Flash to play sounds in the
    + * web browser. Future releases may use the HTML5 tags to play audio
    + * in the browser. The appropriate file formats depend on the Flash
    + * player or the browser support, but MP3 or WAV are most widely
    + * supported.
    + *
    + * This class uses <i>resourcesURL</i>"WtSoundManager.swf", a flash
    + * object, and <i>resourcesURL</i>"swfobject.js", a companion
    + * JavaScript library, which are both distributed with %Wt in the
    + * resources folder, see \ref deployment "deployment and resources".
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * WSound *s = new WSound("djing.mp3", parent);
    + * s->setLoops(3);
    + * s->play();
    + * playButton->clicked().connect(s, &WSound::play);
    + * stopButton->clicked().connect(s, &WSound::stop);
    + * \endcode
    + * \endif
    + *
    + * \note The current implementation has occasional problems with playing
    + *       sound on Internet Explorer.
    + */
    +class WT_API WSound : public WObject
    +{
    +public:
    +  /*! \brief Constructs a sound object that will play the given URL.
    +   */
    +  WSound(const std::string &url, WObject *parent = 0);
    +
    +  //WSound(WResource *resource, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * The destructor calls stop() and unloads the sound object.
    +   */
    +  ~WSound();
    +
    +  /*! \brief Returns the url played by this class.
    +   */
    +  const std::string &url() const;
    +
    +  /*! \brief Returns the configured number of loops for this object.
    +   *
    +   * When play() is called, the sound will be played for this amount of loops.
    +   */
    +  int loops() const;
    +  /*! \brief Sets the amount of times the sound has to be played for every
    +   *         invocation of play()
    +   *
    +   * The behavior is undefined for negative loop numbers.
    +   */
    +  void setLoops(int number);
    +
    +  /*! \brief Start asynchronous playback of the sound.
    +   *
    +   * This method returns immediately. It will cause the song to be played for
    +   * the configured amount of loops.
    +   *
    +   * The behavior of play() when a sound is already playing depends on the
    +   * method to play songs in the browser (Flash/HTML5). It may be mixed with
    +   * an already playing instance, or replace the previous instance. It is
    +   * recommended to call stop() before play() if you want to avoid mixing
    +   * multiple instances of a single WSound object.
    +   */
    +  void play();
    +
    +  /*! \brief Stops playback of the sound.
    +   *
    +   * This method returns immediately. It causes the playback of this
    +   * WSound to be terminated.
    +   */
    +  void stop();
    +
    +  //static bool isAvailable();
    +
    +private:
    +  std::string                url_;
    +  //WResource                 *resource_;
    +  int                        loops_;
    +  SoundManager *sm_;
    +};
    +
    +}
    +
    +#endif // WSOUND_H_
    +
    diff --git a/wt-3.1.7a/src/Wt/WSound.C b/wt-3.1.7a/src/Wt/WSound.C
    new file mode 100644
    index 0000000..35f594f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSound.C
    @@ -0,0 +1,56 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "WSound"
    +#include "WApplication"
    +#include "SoundManager.h"
    +
    +namespace Wt {
    +
    +WSound::WSound(const std::string &url, WObject *parent)
    +  : WObject(parent),
    +  url_(url),
    +  loops_(1)
    +{
    +  sm_ = wApp->getSoundManager();
    +  sm_->add(this);
    +}
    +
    +WSound::~WSound()
    +{
    +  stop();
    +  sm_->remove(this);
    +}
    +
    +const std::string &WSound::url() const
    +{
    +  return url_;
    +}
    +
    +//bool isFinished() const;
    +
    +int WSound::loops() const
    +{
    +  return loops_;
    +}
    +
    +//int loopsRemaining() const;
    +
    +void WSound::setLoops(int number)
    +{
    +  loops_ = number;
    +}
    +
    +void WSound::play()
    +{
    +  sm_->play(this, loops_);
    +}
    +
    +void WSound::stop()
    +{
    +  sm_->stop(this);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSpinBox b/wt-3.1.7a/src/Wt/WSpinBox
    new file mode 100644
    index 0000000..e48be9f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSpinBox
    @@ -0,0 +1,122 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 20082010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSPIN_BOX_H_
    +#define WSPIN_BOX_H_
    +
    +#include <Wt/WLineEdit>
    +
    +namespace Wt {
    +
    +/*! \class WSpinBox Wt/WSpinBox Wt/WSpinBox
    + *  \brief A spin box.
    + *
    + * The spin box provides a control for entering a number. It consists
    + * of a line edit, and buttons which allow to increase or decrease the
    + * value.
    + *
    + * %WSpinBox is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * Using HTML4, the widget is implemented using a &lt;input
    + * type="text"&gt; The element can be styled using the
    + * <tt>Wt-spinbox</tt> style. It may be styled through the current
    + * theme, or you can override the style using internal or external CSS
    + * as appropriate.
    + *
    + * \note With the advent of HTML5, this widget will be implemented using
    + *       the native HTML5 control when available.
    + */
    +class WT_API WSpinBox : public WLineEdit
    +{
    +public:
    +  /*! \brief Creates a spin-box.
    +   *
    +   * The range is (0-99) and the step size 1.
    +   */
    +  WSpinBox(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the minimum value.
    +   *
    +   * The default value is 0.
    +   */
    +  void setMinimum(double minimum);
    +
    +  /*! \brief Returns the minimum value.
    +   *
    +   * \sa setMinimum()
    +   */
    +  double minimum() const { return min_; }
    +
    +  /*! \brief Sets the maximum value.
    +   *
    +   * The default value is 99.
    +   */
    +  void setMaximum(double maximum);
    +
    +  /*! \brief Returns the maximum value.
    +   *
    +   * \sa setMaximum()
    +   */
    +  double maximum() const { return max_; }
    +
    +  /*! \brief Sets the range.
    +   *
    +   * \sa setMinimum(), setMaximum()
    +   */
    +  void setRange(double minimum, double maximum);
    +
    +  /*! \brief Sets the step value.
    +   *
    +   * The default value is 1.
    +   */
    +  void setSingleStep(double step);
    +
    +  /*! \brief Returns the step value.
    +   */
    +  double singleStep() const { return step_; }
    +
    +  /*! \brief Sets the value.
    +   *
    +   * \p value must be a value between minimum() and maximum().
    +   *
    +   * The default value is 0
    +   */
    +  void setValue(double value);
    +
    +  /*! \brief Returns the value.
    +   */
    +  double value() const;
    +
    +  /*! \brief A %signal that indicates when the value has changed.
    +   *
    +   * This signal is emitted when setValue() is called.
    +   *
    +   * \sa setValue()
    +   */
    +  Signal<double>& valueChanged() { return valueChanged_; }
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +private:
    +  double min_, max_, step_;
    +  bool changed_;
    +
    +  Signal<double> valueChanged_;
    +
    +  void onChange();
    +  void defineJavaScript();
    +  void connectJavaScript(EventSignalBase& s, const std::string& methodName);
    +  void updateValidator();
    +};
    +
    +}
    +
    +#endif // WSPIN_BOX_H_
    diff --git a/wt-3.1.7a/src/Wt/WSpinBox.C b/wt-3.1.7a/src/Wt/WSpinBox.C
    new file mode 100644
    index 0000000..28c94bb
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSpinBox.C
    @@ -0,0 +1,194 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <Wt/WApplication>
    +#include <Wt/WDoubleValidator>
    +#include <Wt/WIntValidator>
    +#include <Wt/WSpinBox>
    +
    +#include "DomElement.h"
    +
    +#include "JavaScriptLoader.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WSpinBox.min.js"
    +#endif
    +
    +using namespace Wt;
    +
    +namespace Wt {
    +
    +WSpinBox::WSpinBox(WContainerWidget *parent)
    +   : WLineEdit(parent),
    +     min_(0),
    +     max_(99),
    +     step_(1),
    +     changed_(false)
    +{
    +  setStyleClass("Wt-spinbox");
    +
    +  changed().connect(this, &WSpinBox::onChange);
    +
    +#ifdef WT_CNOR // ??
    +  EventSignalBase& b = mouseMoved();
    +  EventSignalBase& c = keyWentDown();
    +#endif
    +
    +  connectJavaScript(mouseMoved(), "mouseMove");
    +  connectJavaScript(mouseWentUp(), "mouseUp");
    +  connectJavaScript(mouseWentDown(), "mouseDown");
    +  connectJavaScript(mouseWentOut(), "mouseOut");
    +  connectJavaScript(keyWentDown(), "keyDown");
    +
    +  updateValidator();
    +
    +  setValue(0);
    +}
    +
    +void WSpinBox::setValue(double value)
    +{
    +  if (static_cast<int>(value) == value)
    +    setText(WT_USTRING::fromUTF8(boost::lexical_cast<std::string>
    +				 (static_cast<int>(value))));
    +  else
    +    setText(WT_USTRING::fromUTF8(boost::lexical_cast<std::string>(value)));
    +
    +  valueChanged_.emit(value);
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +double WSpinBox::value() const
    +{
    +  try {
    +    return boost::lexical_cast<double>(text().toUTF8());
    +  } catch (const boost::bad_lexical_cast& e) {
    +    return 0;
    +  }
    +}
    +
    +void WSpinBox::setMinimum(double minimum)
    +{
    +  min_ = minimum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  updateValidator();
    +}
    +
    +void WSpinBox::setMaximum(double maximum)
    +{
    +  max_ = maximum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  updateValidator();
    +}
    +
    +void WSpinBox::setRange(double minimum, double maximum)
    +{
    +  min_ = minimum;
    +  max_ = maximum;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  updateValidator();
    +}
    +
    +void WSpinBox::setSingleStep(double step)
    +{
    +  step_ = step;
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  updateValidator();
    +}
    +
    +void WSpinBox::updateValidator()
    +{
    +  WValidator *v = validator();
    +
    +  if (!v)
    +    setValidator(new WDoubleValidator(min_, max_));
    +  else {
    +    WDoubleValidator *dv = dynamic_cast<WDoubleValidator *>(v);
    +    dv->setRange(min_, max_);
    +  }
    +}
    +
    +void WSpinBox::updateDom(DomElement& element, bool all)
    +{
    +  if (changed_) {
    +    element.callJavaScript("jQuery.data(" + jsRef() + ", 'obj').update("
    +			   + boost::lexical_cast<std::string>(min_)
    +			   + ','
    +			   + boost::lexical_cast<std::string>(max_)
    +			   + ','
    +			   + boost::lexical_cast<std::string>(step_)
    +			   + ");");
    +
    +    changed_ = false;
    +  }
    +
    +  WLineEdit::updateDom(element, all);
    +}
    +
    +void WSpinBox::propagateRenderOk(bool deep)
    +{
    +  changed_ = false;
    +
    +  WLineEdit::propagateRenderOk(deep);
    +}
    +
    +void WSpinBox::defineJavaScript()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  const char *THIS_JS = "js/WSpinBox.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WSpinBox", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  app->doJavaScript("new " WT_CLASS ".WSpinBox("
    +		    + app->javaScriptClass() + "," + jsRef() + ","
    +		    + boost::lexical_cast<std::string>(min_) + ","
    +		    + boost::lexical_cast<std::string>(max_) + ","
    +		    + boost::lexical_cast<std::string>(step_) + ");");
    +  changed_ = false;
    +}
    +
    +void WSpinBox::connectJavaScript(Wt::EventSignalBase& s,
    +				 const std::string& methodName)
    +{
    +  std::string jsFunction = 
    +    "function(obj, event) {"
    +    """var o = jQuery.data(" + jsRef() + ", 'obj');"
    +    """if (o) o." + methodName + "(obj, event);"
    +    "}";
    +  s.connect(jsFunction);
    +}
    +
    +void WSpinBox::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull)
    +    defineJavaScript();
    +
    +  WLineEdit::render(flags);
    +}
    +
    +void WSpinBox::onChange()
    +{
    +  valueChanged_.emit(value());
    +}
    +
    +}
    +
    diff --git a/wt-3.1.7a/src/Wt/WStackedWidget b/wt-3.1.7a/src/Wt/WStackedWidget
    new file mode 100644
    index 0000000..eff9ee7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStackedWidget
    @@ -0,0 +1,90 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTACKEDWIDGET_H_
    +#define WSTACKEDWIDGET_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +
    +/*! \class WStackedWidget Wt/WStackedWidget Wt/WStackedWidget
    + *  \brief A container widget that stacks its widgets on top of each
    + *         other.
    + *
    + * This is a container widgets which at all times has only one item
    + * visible. The widget accomplishes this using setHidden(bool) on the
    + * children.
    + *
    + * Using currentIndex() and setCurrentIndex(int index) you can
    + * retrieve or set the visible widget.
    + *
    + * %WStackedWidget, like WContainerWidget, is by default not inline.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget is rendered using an HTML <tt>&lt;div&gt;</tt> tag and
    + * does not provide styling. It can be styled using inline or external
    + * CSS as appropriate.
    + *
    + * \sa WMenu
    + */
    +class WT_API WStackedWidget : public WContainerWidget
    +{
    +public:
    +  /*! \brief Created a new stacked container widget.
    +   */
    +  WStackedWidget(WContainerWidget *parent = 0);
    +
    +  virtual void addWidget(WWidget *widget);
    +
    +  /*! \brief Returns the index of the widget that is currently shown.
    +   *
    +   * \sa setCurrentIndex(), currentWidget()
    +   */
    +  int currentIndex() const;
    +
    +  /*! \brief Returns the widget that is currently shown.
    +   *
    +   * \sa setCurrentWidget(), currentIndex()
    +   */
    +  WWidget *currentWidget() const;
    +
    +  /*! \brief Insert a widget at a given index
    +   */
    +  void insertWidget(int index, WWidget *widget);
    +
    +  /*! \brief Shows a particular widget.
    +   *
    +   * The widget with index \p index is made visible, while all other
    +   * widgets are invisible.
    +   *
    +   * \sa currentIndex(), setCurrentWidget()
    +   */
    +  void setCurrentIndex(int index);
    +
    +  /*! \brief Shows a particular widget.
    +   *
    +   * The widget \p widget, which must have been added before, is
    +   * made visible, while all other widgets are invisible.
    +   *
    +   * \sa currentWidget(), setCurrentIndex()
    +   */
    +  void setCurrentWidget(WWidget *widget);
    +
    +protected:
    +  virtual void removeChild(WWidget *child);
    +  virtual DomElement *createDomElement(WApplication *app);
    +  virtual void        getDomChanges(std::vector<DomElement *>& result,
    +				    WApplication *app);
    +
    +private:
    +  int currentIndex_;
    +};
    +
    +}
    +
    +#endif // WSTACKEDWIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WStackedWidget.C b/wt-3.1.7a/src/Wt/WStackedWidget.C
    new file mode 100644
    index 0000000..f7a01ba
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStackedWidget.C
    @@ -0,0 +1,86 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WStackedWidget"
    +
    +#include "StdGridLayoutImpl.h"
    +
    +#include <iostream>
    +
    +namespace Wt {
    +
    +WStackedWidget::WStackedWidget(WContainerWidget *parent)
    +  : WContainerWidget(parent),
    +    currentIndex_(-1)
    +{
    +  WT_DEBUG( setObjectName("WStackedWidget") );
    +  setJavaScriptMember(WT_RESIZE_JS, StdGridLayoutImpl::childrenResizeJS());
    +}
    +
    +void WStackedWidget::addWidget(WWidget *widget)
    +{
    +  WContainerWidget::addWidget(widget);
    +
    +  if (currentIndex_ == -1)
    +    currentIndex_ = 0;
    +}
    +
    +int WStackedWidget::currentIndex() const
    +{
    +  return currentIndex_;
    +}
    +
    +WWidget *WStackedWidget::currentWidget() const
    +{
    +  if (currentIndex_ >= 0)
    +    return widget(currentIndex_);
    +  else
    +    return 0;
    +}
    +
    +void WStackedWidget::insertWidget(int index, WWidget *widget)
    +{
    +  WContainerWidget::insertWidget(index, widget);
    +
    +  if (currentIndex_ == -1)
    +    currentIndex_ = 0;
    +}
    +
    +void WStackedWidget::removeChild(WWidget *child)
    +{
    +  WContainerWidget::removeChild(child);
    +
    +  if (currentIndex_ >= count())
    +    setCurrentIndex(count() - 1);
    +}
    +
    +void WStackedWidget::setCurrentIndex(int index)
    +{
    +  currentIndex_ = index;
    +
    +  for (int i = 0; i < count(); ++i)
    +    widget(i)->setHidden(currentIndex_ != i);
    +}
    +
    +void WStackedWidget::setCurrentWidget(WWidget *widget)
    +{
    +  setCurrentIndex(indexOf(widget));
    +}
    +
    +DomElement *WStackedWidget::createDomElement(WApplication *app)
    +{
    +  setCurrentIndex(currentIndex_);
    +  return WContainerWidget::createDomElement(app);
    +}
    +
    +void WStackedWidget::getDomChanges(std::vector<DomElement *>& result,
    +				   WApplication *app)
    +{
    +  setCurrentIndex(currentIndex_);
    +  WContainerWidget::getDomChanges(result, app);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WStandardItem b/wt-3.1.7a/src/Wt/WStandardItem
    new file mode 100644
    index 0000000..5eca9ba
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStandardItem
    @@ -0,0 +1,685 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTANDARD_ITEM_H_
    +#define WSTANDARD_ITEM_H_
    +
    +#include <map>
    +#include <string>
    +#include <vector>
    +#include <Wt/WModelIndex>
    +#include <Wt/WGlobal>
    +
    +namespace Wt {
    +
    +class WStandardItemModel;
    +class WString;
    +
    +/*! \class WStandardItem Wt/WStandardItem Wt/WStandardItem
    + *  \brief An item in a WStandardItemModel.
    + *
    + * The item provides access to various data properties: \link
    + * setText() text\endlink, \link setIcon() icon\endlink, \link
    + * setStyleClass() CSS style class\endlink, \link setToolTip() tool
    + * tip\endlink, and \link setChecked() check state\endlink, and
    + * data flags (setFlags() and setCheckable()).
    + *
    + * An item may contain a table of children items: the initial geometry
    + * may be specified in the constructor, or using the methods
    + * setRowCount() and setModelCount(). Unspecified items are 0. You can
    + * set or inspect children items using the setChild() and child()
    + * methods.
    + *
    + * It is possible to reimplement this class and specialize the methods
    + * for data acess (setData() and data()), or provide custom sorting
    + * functionality by reimplementing 
    + * \if cpp
    + * operator<().
    + * \elseif java
    + * compare().
    + * \endif
    + *
    + * \ingroup modelview
    + */
    +class WT_API WStandardItem
    +{
    +public:
    +  /*! \brief Creates an empty standard item.
    +   */
    +  WStandardItem();
    +
    +  /*! \brief Creates an item with a text.
    +   *
    +   * \sa setText()
    +   */
    +  WStandardItem(const WString& text);
    +
    +  /*! \brief Creates an item with an icon and a text.
    +   *
    +   * \sa setText(), setIcon()
    +   */
    +  WStandardItem(const std::string& iconUri, const WString& text);
    +
    +  /*! \brief Creates an item with an initial geometry.
    +   *
    +   * \sa setRowCount(), setColumnCount()
    +   */
    +  WStandardItem(int rows, int columns = 1);
    +
    +  /*! \brief Destructor.
    +   */
    +  virtual ~WStandardItem();
    +
    +  /*! \brief Sets the text.
    +   *
    +   * The text is stored as \link Wt::DisplayRole DisplayRole\endlink data.
    +   *
    +   * The default text is empty ("").
    +   *
    +   * \sa text(), setData()
    +   */
    +  void setText(const WString& text);
    +
    +  /*! \brief Returns the text.
    +   *
    +   * \sa setText()
    +   */
    +  WString text() const;
    +
    +  /*! \brief Sets the icon url.
    +   *
    +   * The icon is stored as \link Wt::DecorationRole
    +   * DecorationRole\endlink data.
    +   *
    +   * The default icon url is empty ("").
    +   *
    +   * \sa icon(), setData()
    +   */
    +  void setIcon(const std::string& uri);
    +
    +  /*! \brief Returns the icon url.
    +   *
    +   * \sa setIcon()
    +   */
    +  std::string icon() const;
    +
    +  /*! \brief Sets the CSS style class.
    +   *
    +   * The style class is stored as \link Wt::StyleClassRole
    +   * StyleClassRole\endlink data.
    +   *
    +   * The default style class is empty ("").
    +   *
    +   * \sa styleClass(), setData()
    +   */
    +  void setStyleClass(const WString& styleClass);
    +
    +  /*! \brief Returns the item style class.
    +   *
    +   * \sa setStyleClass()
    +   */
    +  WString styleClass() const;
    +
    +  /*! \brief Sets a tool tip.
    +   *
    +   * The tool tip is stored as \link Wt::ToolTipRole ToolTipRole\endlink data.
    +   *
    +   * The default tool tip is empty ("").
    +   *
    +   * \sa toolTip(), setData()
    +   */
    +  void setToolTip(const WString& toolTip);
    +
    +  /*! \brief Returns the tool tip.
    +   *
    +   * \sa setToolTip()
    +   */
    +  WString toolTip() const;
    +
    +  /*! \brief Sets an anchor to an internal path.
    +   *
    +   * The internal path is stored as \link Wt::InternalPathRole
    +   * InternalPathRole\endlink data.
    +   *
    +   * \sa internalPath(), setData()
    +   */
    +  void setInternalPath(const std::string& internalpath);
    +
    +  /*! \brief Returns the anchor to an internal path.
    +   *
    +   * \sa setInternalPath(), setData()
    +   */
    +  std::string internalPath() const;
    +
    +  /*! \brief Sets an anchor to an external URL.
    +   *
    +   * The anchor Url is stored as \link Wt::UrlRole UrlRole\endlink data.
    +   *
    +   * \sa setInternalPath(), setData()
    +   */
    +  void setUrl(const std::string& url);
    +
    +  /*! \brief Returns the url referenced by this item.
    +   *
    +   * \sa setUrl(), setData()
    +   */
    +  std::string url() const;
    +
    +  /*! \brief Checks or unchecks the item.
    +   *
    +   * The value is stored as \link Wt::CheckStateRole
    +   * CheckStateRole\endlink data.
    +   *
    +   * By default, an item is not checked.
    +   *
    +   * Note: this requires that the item is checkable (see setCheckable()).
    +   *
    +   * If the item is tri-state, you may consider using setCheckState() instead
    +   * which supports also setting the third Wt::PartiallyChecked state.
    +   *
    +   * \sa setCheckable(), setCheckState()
    +   */
    +  void setChecked(bool checked);
    +
    +  /*! \brief Returns whether the item is checked.
    +   *
    +   * \sa setChecked()
    +   */
    +  bool isChecked() const;
    +
    +  /*! \brief Sets the check state.
    +   *
    +   * Like setChecked(), this sets the check state, but allows also setting
    +   * the Wt::PartiallyChecked state when the item is tri-state checkable.
    +   *
    +   * The value is stored as \link Wt::CheckStateRole CheckStateRole\endlink
    +   * data.
    +   *
    +   * \sa setCheckable(), setData()
    +   */
    +  void setCheckState(CheckState checked);
    +
    +  /*! \brief Returns the item's check state.
    +   *
    +   * \sa setCheckState()
    +   */
    +  CheckState checkState() const;
    +
    +  /*! \brief Sets the flags.
    +   *
    +   * The default flag value is \link Wt::ItemIsSelectable
    +   * ItemIsSelectable\endlink.
    +   *
    +   * \sa ItemFlag, flags(), setCheckable()
    +   */
    +  void setFlags(WFlags<ItemFlag> flags);
    +
    +  /*! \brief Returns the flags.
    +   *
    +   * \sa setFlags()
    +   */
    +  WFlags<ItemFlag> flags() const;
    +
    +  /*! \brief Makes the item checkable.
    +   *
    +   * Adds \link Wt::ItemIsUserCheckable ItemIsUserCheckable
    +   * \endlink to the item's flags.
    +   *
    +   * \sa setFlags(), setChecked()
    +   */
    +  void setCheckable(bool checkable);
    +
    +  /*! \brief Returns whether the item is checkable.
    +   *
    +   * \sa setCheckable()
    +   */
    +  bool isCheckable() const;
    +
    +  /*! \brief Makes the item tri-state checkable.
    +   *
    +   * When \p tristate is \c true, the item is checkable with three
    +   * states: Wt::Unchecked, Wt::Checked, and Wt::PartiallyChecked.
    +   *
    +   * This requires that the item is also checkable (see setCheckable())
    +   *
    +   * \sa setCheckable()
    +   */
    +  void setTristate(bool tristate);
    +
    +  /*! \brief Returns whether the item is tri-state checkable.
    +   *
    +   * \sa setTristate()
    +   */
    +  bool isTristate() const;
    +
    +  void setEditable(bool editable);
    +  bool isEditable() const;
    +
    +  /*! \brief Sets item data.
    +   *
    +   * Sets item data for the given role.
    +   *
    +   * \sa data()
    +   */
    +  virtual void setData(const boost::any& data, int role = UserRole);
    +
    +  /*! \brief Returns item data.
    +   *
    +   * Returns item data for the given role.
    +   *
    +   * \sa data()
    +   */
    +  virtual boost::any data(int role = UserRole) const;
    +
    +  /*! \brief Returns whether the item has any children.
    +   *
    +   * This is a convenience method and checks whether rowCount() and
    +   * columnCount() differ both from 0.
    +   *
    +   * \sa rowCount(), columnCount()
    +   */
    +  bool hasChildren() const;
    +
    +  /*! \brief Sets the row count.
    +   *
    +   * If \p rows is bigger than the current row count, empty rows
    +   * are appended.
    +   *
    +   * If \p rows is smaller than the current row count, rows are
    +   * deleted at the end.
    +   *
    +   * \note If \p rows > 0, and columnCount() == 0, columnCount
    +   * is first increased to 1 using setColumnCount(1).
    +   *
    +   * \sa setColumnCount(), rowCount()
    +   */
    +  void setRowCount(int rows);
    +
    +  /*! \brief Returns the row count.
    +   *
    +   * \sa setRowCount()
    +   */
    +  int rowCount() const;
    +
    +  /*! \brief Sets the column count.
    +   *
    +   * If \p columns is bigger than the current column count, empty
    +   * columns are appended.
    +   *
    +   * If \p columns is smaller than the current column count,
    +   * columns are deleted at the end.
    +   *
    +   * \sa setRowCount(), columnCount()
    +   */
    +  void setColumnCount(int columns);
    +
    +  /*! \brief Returns the column count.
    +   *
    +   * \sa setRowCount()
    +   */
    +  int columnCount() const;
    +
    +  /*! \brief Add a single column of items.
    +   *
    +   * Appends a single column of \p items. If necessary,
    +   * the row count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertColumn(columnCount(), items);
    +   * \endcode
    +   *
    +   * \sa insertColumn(), appendRow()
    +   */
    +  void appendColumn(const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Inserts a single column of items.
    +   *
    +   * Inserts a single column of \p items at column
    +   * \p column. If necessary, the row count is increased.
    +   * 
    +   * \sa WStandardItem::insertRow()
    +   */
    +  void insertColumn(int column, const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Add a single row of items.
    +   *
    +   * Appends a single row of \p items. If necessary,
    +   * the column count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertRow(rowCount(), items);
    +   * \endcode
    +   *
    +   * \sa insertRow(), appendColumn()
    +   */
    +  void appendRow(const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Inserts a single row of items.
    +   *
    +   * Inserts a single row of <i>items</i> at row \p row. If
    +   * necessary, the column count is increased.
    +   * 
    +   * \sa insertColumn()
    +   */
    +  void insertRow(int row, const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Inserts a number of empty columns.
    +   *
    +   * Inserts <i>count</i> empty columns at position \p column.
    +   * 
    +   * \sa insertRows()
    +   */
    +  void insertColumns(int column, int count);
    +
    +  /*! \brief Inserts a number of empty rows.
    +   *
    +   * Inserts <i>count</i> empty rows at position \p row.
    +   * 
    +   * \sa insertColumns()
    +   */
    +  void insertRows(int row, int count);
    +
    +  /*! \brief Appends a row containing one item.
    +   *
    +   * This is a convenience method for nodes with a single column (for
    +   * example for tree nodes). This adds a row with a single item, and
    +   * is equivalent to:
    +   *
    +   * \code
    +   * insertRow(rowCount(), item);
    +   * \endcode
    +   * 
    +   * \sa insertRow(int, WStandardItem *)
    +   */
    +  void appendRow(WStandardItem *item);
    +
    +  /*! \brief Inserts a row containing one item.
    +   *
    +   * This is a convenience method for nodes with a single column (for
    +   * example for tree nodes). This inserts a row with a single item,
    +   * and is equivalent to:
    +   *
    +   * \if cpp
    +   * \code
    +   * std::vector<WStandardItem *> r;
    +   * r.push_back(item);
    +   * insertRow(row, r);
    +   * \endcode
    +   * \elseif java
    +   * \code 
    +   * List<WStandardItem> r;
    +   * r.add(item);
    +   * insertRow(row, r);
    +   * \endcode
    +   * \endif
    +   * 
    +   * \sa insertRow(int, const std::vector<WStandardItem *>&)
    +   */
    +  void insertRow(int row, WStandardItem *item);
    +
    +  /*! \brief Appends multiple rows containing one item.
    +   *
    +   * This is a convenience method for nodes with a single column (for
    +   * example for tree nodes). This adds a number of rows, each
    +   * containing a single item, and is equivalent to:
    +   *
    +   * \code
    +   * insertRows(rowCount(), items);
    +   * \endcode
    +   * 
    +   * \sa insertRows(int, const std::vector<WStandardItem *>&)
    +   */
    +  void appendRows(const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Inserts multiple rows containing one item.
    +   *
    +   * This is a convenience method for nodes with a single column (for
    +   * example for tree nodes). This inserts a number of rows at row
    +   * \p row, each containing a single item, and is equivalent to:
    +   *
    +   * \if cpp
    +   * \code
    +   * for (unsigned i = 0; i < items.size(); ++i)
    +   *   insertRow(row + i, items[i]);
    +   * \endcode
    +   * \endif
    +   * 
    +   * \sa insertRow(int, WStandardItem *)
    +   */
    +  void insertRows(int row, const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Sets a child item.
    +   *
    +   * Sets a child item <i>item</i> at position (\p row,
    +   * \p column). If an item was previously set, it is deleted
    +   * first.
    +   *
    +   * If necessary, the rowCount() and/or the columnCount() is increased.
    +   *
    +   * \sa child().
    +   */
    +  void setChild(int row, int column, WStandardItem *item);
    +
    +  /*! \brief Sets a child item.
    +   *
    +   * This is a convenience method for nodes with a single column
    +   * (e.g. tree nodes), and is equivalent to:
    +   * \code
    +   * setChild(row, 0, item);
    +   * \endcode
    +   *
    +   * \sa setChild(int, int, WStandardItem *).
    +   */
    +  void setChild(int row, WStandardItem *item);
    +
    +  /*! \brief Returns a child item.
    +   *
    +   * Returns the child item at position (<i>row</i>, \p column).
    +   * This may be \c 0 if an item was not previously set, or if the
    +   * position is out of bounds.
    +   *
    +   * \sa setChild(int, int, WStandardItem *).
    +   */
    +  WStandardItem *child(int row, int column = 0) const;
    +
    +  /*! \brief Takes a child out of the item.
    +   *
    +   * Returns the child item at position (<i>row</i>, \p column),
    +   * and removes it (by setting \c 0 instead). Ownership of the item is
    +   * transferred to the caller.
    +   *
    +   * \sa child(), setChild(int, int, WStandardItem *)
    +   */
    +  WStandardItem *takeChild(int row, int column);
    +
    +  /*! \brief Takes a column of children out of the item.
    +   *
    +   * Returns the column \p column, and removes the
    +   * column from the model (reducing the column count by
    +   * one). Ownership of all items is transferred to the caller.
    +   *
    +   * \sa takeRow(), removeColumn()
    +   */
    +  std::vector<WStandardItem *> takeColumn(int column);
    +
    +  /*! \brief Takes a row of children out of the item.
    +   *
    +   * Returns the row \p row, and removes the row from the
    +   * model (reducing the row count by one). Ownership of all items is
    +   * transferred to the caller.
    +   *
    +   * \sa takeColumn(), removeRow()
    +   */
    +  std::vector<WStandardItem *> takeRow(int row);
    +
    +  /*! \brief Removes a single column.
    +   *
    +   * Removes the column \p column from the model (reducing the
    +   * column count by one). Is equivalent to:
    +   * \code
    +   * removeColumns(column, 1);
    +   * \endcode
    +   *
    +   * \sa removeColumns(), takeColumn()
    +   */
    +  void removeColumn(int column);
    +
    +  /*! \brief Removes a number of columns.
    +   *
    +   * Removes \p count columns from the model (reducing the
    +   * column count by \p count).
    +   *
    +   * \sa removeColumn(), removeRows()
    +   */
    +  void removeColumns(int column, int count);
    +
    +  /*! \brief Removes a single row.
    +   *
    +   * Removes the row \p row from the model (reducing the
    +   * row count by one). Is equivalent to:
    +   * \code
    +   * removeRows(row, 1);
    +   * \endcode
    +   *
    +   * \sa removeRows(), takeRow()
    +   */
    +  void removeRow(int row);
    +
    +  /*! \brief Removes a number of rows.
    +   *
    +   * Removes \p count rows from the model (reducing the
    +   * row count by \p count).
    +   *
    +   * \sa removeRow(), removeColumns()
    +   */
    +  void removeRows(int row, int count);
    +
    +  /*! \brief Returns the model index for this item.
    +   *
    +   * \sa WStandardItemModel::indexFromItem()
    +   */
    +  WModelIndex index() const;
    +
    +  /*! \brief Returns the model.
    +   *
    +   * This is the model that this item belongs to, or 0 if the item is
    +   * not associated with a model.
    +   */
    +  WStandardItemModel *model() const { return model_; }
    +
    +  /*! \brief Returns the parent item.
    +   *
    +   * Returns the parent item.
    +   *
    +   * \sa setChild()
    +   */
    +  WStandardItem *parent() const { return parent_; }
    +
    +  /*! \brief Returns the row index.
    +   *
    +   * Returns the row index of this item in the parent.
    +   *
    +   * \sa column()
    +   */
    +  int row() const { return row_; }
    +
    +  /*! \brief Returns the column index.
    +   *
    +   * Returns the column index of this item in the parent.
    +   *
    +   * \sa column()
    +   */
    +  int column() const { return column_; }
    +
    +  /*! \brief Returns a clone of this item.
    +   *
    +   * \sa WStandardItemModel::setItemPrototype()
    +   */
    +  virtual WStandardItem *clone() const;
    +
    +  /*! \brief Compares the item with another item.
    +   *
    +   * This is used during sorting (from sortChildren()), and returns
    +   * which of the two items is the lesser, based on their data.
    +   *
    +   * The default implementation compares the data based on the value
    +   * corresponding to the WStandardItemModel::sortRole().
    +   *
    +   * \sa sortChildren(), WStandardItemModel::setSortRole()
    +   */
    +  virtual bool operator< (const WStandardItem& other) const;
    +
    +  /*! \brief Sorts the children according to a given column and sort order.
    +   *
    +   * Children of this item, and all children items are sorted
    +   * recursively. Existing model indexes will be invalidated by
    +   * the operation (will point to other items).
    +   *
    +   * The WStandardItemModel::layoutAboutToBeChanged and
    +   * WStandardItemModel::layoutChanged signals are emitted before and
    +   * after the operation so that you get a chance to invalidate or
    +   * update model indexes.
    +   * 
    +   * \if cpp
    +   * \sa operator<(), WStandardItemModel::setSortRole()
    +   * \elseif java
    +   * \sa compare(), WStandardItemModel::setSortRole()
    +   * \endif
    +   */
    +  virtual void sortChildren(int column, SortOrder order);
    +
    +protected:
    +  /*! \brief Set the model for this WStandardItem and its children.
    +   *
    +   * You may override this method if you want to change its behaviour.
    +   */
    +  virtual void setModel(WStandardItemModel *model);
    +
    +private:
    +#ifndef WT_TARGET_JAVA
    +  typedef std::map<int, boost::any> DataMap;
    +#else
    +  typedef std::treemap<int, boost::any> DataMap;
    +#endif
    +  typedef std::vector<WStandardItem *> Column;
    +  typedef std::vector<Column> ColumnList;
    +
    +  /*! \brief Compares the item with another item.
    +   *
    +   * This is used during sorting (from sortChildren()), and returns
    +   * which of the two items is the lesser, based on their data.
    +   *
    +   * The default implementation compares the data based on the value
    +   * corresponding to the WStandardItemModel::sortRole().
    +   *
    +   * \sa sortChildren(), WStandardItemModel::setSortRole()
    +   */
    +  int compare(const WStandardItem& other) const;
    +
    +  WStandardItemModel *model_;
    +  WStandardItem      *parent_;
    +  int                 row_, column_;
    +
    +  DataMap          data_;
    +  WFlags<ItemFlag> flags_;
    +
    +  ColumnList *columns_;
    +
    +  void signalModelDataChange();
    +  void adoptChild(int row, int column, WStandardItem *item);
    +  void orphanChild(WStandardItem *item);
    +  void recursiveSortChildren(int column, SortOrder order);
    +  void renumberColumns(int column);
    +  void renumberRows(int row);
    +
    +  friend class WStandardItemModel;
    +};
    +
    +}
    +
    +#endif // WSTANDARD_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WStandardItem.C b/wt-3.1.7a/src/Wt/WStandardItem.C
    new file mode 100644
    index 0000000..2eb2911
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStandardItem.C
    @@ -0,0 +1,856 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +
    +#include "Wt/WDate"
    +#include "Wt/WStandardItem"
    +#include "Wt/WStandardItemModel"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#define UNSPECIFIED_RESULT -1
    +
    +namespace {
    +
    +  using namespace Wt;
    +
    +  struct WStandardItemCompare W_JAVA_COMPARATOR(int)
    +  {
    +    WStandardItemCompare(WStandardItem *anItem, int aColumn, SortOrder anOrder)
    +      : item(anItem),
    +	column(aColumn),
    +	order(anOrder)
    +    { }
    +
    +#ifndef WT_TARGET_JAVA
    +    bool operator()(int r1, int r2) const {
    +
    +      if (order == AscendingOrder)
    +	return compare(r1, r2);
    +      else
    +	return compare(r2, r1);
    +    }
    +
    +    bool compare(int r1, int r2) const {
    +      WStandardItem *item1 = item->child(r1, column);
    +      WStandardItem *item2 = item->child(r2, column);
    +
    +      if (item1)
    +	if (item2)
    +	  return (*item1) < (*item2);
    +	else
    +	  return UNSPECIFIED_RESULT == -1;
    +      else
    +	if (item2)
    +	  return UNSPECIFIED_RESULT != -1;
    +	else
    +	  return false;
    +    }
    +#endif // WT_TARGET_JAVA
    +
    +#ifdef WT_TARGET_JAVA
    +    int compare(int r1, int r2) const {
    +      WStandardItem *item1 = item->child(r1, column);
    +      WStandardItem *item2 = item->child(r2, column);
    +
    +      int result;
    +
    +      if (item1)
    +	if (item2)
    +          result = item1->compare(*item2);
    +	else
    +	  result = -UNSPECIFIED_RESULT;
    +      else
    +	if (item2)
    +	  result = UNSPECIFIED_RESULT;
    +	else
    +	  result = 0;
    +
    +      if (order == DescendingOrder)
    +	result = -result;
    +
    +      return result;
    +    }
    +#endif // WT_TARGET_JAVA
    +
    +    WStandardItem *item;
    +    int            column;
    +    SortOrder      order;
    +  };
    +
    +}
    +
    +namespace Wt {
    +
    +/*
    + * As per the contract of a WAbstractItemModel:
    + *  rowCount() > 0 => columnCount() > 0
    + * but it is possible to have
    + *  rowCount() = 0 && columnCount() > 0
    + */
    +WStandardItem::WStandardItem()
    +  : model_(0),
    +    parent_(0),
    +    row_(-1), column_(-1),
    +    flags_(ItemIsSelectable),
    +    columns_(0)
    +{ }
    +
    +WStandardItem::WStandardItem(const WString& text)
    +  : model_(0),
    +    parent_(0),
    +    row_(-1), column_(-1),
    +    flags_(ItemIsSelectable),
    +    columns_(0)
    +{
    +  setText(text);
    +}
    +
    +WStandardItem::WStandardItem(const std::string& iconUri, const WString& text)
    +  : model_(0),
    +    parent_(0),
    +    row_(-1), column_(-1),
    +    flags_(ItemIsSelectable),
    +    columns_(0)
    +{
    +  setText(text);
    +  setIcon(iconUri);
    +}
    +
    +WStandardItem::WStandardItem(int rows, int columns)
    +  : model_(0),
    +    parent_(0),
    +    row_(-1), column_(-1),
    +    flags_(ItemIsSelectable),
    +    columns_(0)
    +{
    +  // create at least one column if we have at least one row
    +  if (rows > 0)
    +    columns = std::max(columns, 1);
    +
    +  if (columns > 0) {
    +    columns_ = new ColumnList();
    +#ifndef WT_TARGET_JAVA
    +    columns_->insert(columns_->end(), columns, Column(rows));
    +#else // WT_TARGET_JAVA
    +    for (int i = 0; i < columns; ++i) {
    +      Column c;
    +      c.insert(c.end(), rows, static_cast<WStandardItem *>(0));
    +      columns_->push_back(c);
    +    }
    +#endif // WT_TARGET_JAVA
    +  }
    +}
    +
    +WStandardItem::~WStandardItem()
    +{
    +  if (columns_) {
    +    for (unsigned i = 0; i < columns_->size(); ++i)
    +      for (unsigned j = 0; j < (*columns_)[i].size(); ++j)
    +	delete (*columns_)[i][j];
    +
    +    delete columns_;
    +  }
    +}
    +
    +void WStandardItem::setData(const boost::any& d, int role)
    +{
    +  if (role == EditRole)
    +      role = DisplayRole;
    +
    +  data_[role] = d;
    +
    +  if (model_) {
    +    WModelIndex self = index();
    +    model_->dataChanged().emit(self, self);
    +    model_->itemChanged().emit(this);
    +  }
    +}
    +
    +boost::any WStandardItem::data(int role) const
    +{
    +  DataMap::const_iterator i = data_.find(role);
    +
    +  if (i != data_.end())
    +    return i->second;
    +  else
    +    if (role == EditRole)
    +      return data(DisplayRole);
    +    else
    +      return boost::any();
    +}
    +
    +void WStandardItem::setText(const WString& text)
    +{
    +  setData(boost::any(text), DisplayRole);
    +}
    +
    +WString WStandardItem::text() const
    +{
    +  boost::any d = data(DisplayRole);
    +
    +  return asString(d);
    +}
    +
    +void WStandardItem::setIcon(const std::string& uri)
    +{
    +  setData(uri, DecorationRole);
    +}
    +
    +std::string WStandardItem::icon() const
    +{
    +  boost::any d = data(DisplayRole);
    +
    +  if (!d.empty() && d.type() == typeid(std::string))
    +    return boost::any_cast<std::string>(d);
    +  else
    +    return std::string();
    +}
    +
    +void WStandardItem::setInternalPath(const std::string& internalpath)
    +{
    +  setData(internalpath, InternalPathRole);
    +}
    +
    +std::string WStandardItem::internalPath() const
    +{
    +  boost::any d = data(InternalPathRole);
    +
    +  if (!d.empty() && d.type() == typeid(std::string))
    +    return boost::any_cast<std::string>(d);
    +  else
    +    return std::string();
    +}
    +
    +void WStandardItem::setUrl(const std::string& url)
    +{
    +  setData(url, UrlRole);
    +}
    +
    +std::string WStandardItem::url() const
    +{
    +  boost::any d = data(UrlRole);
    +
    +  if (!d.empty() && d.type() == typeid(std::string))
    +    return boost::any_cast<std::string>(d);
    +  else
    +    return std::string();
    +}
    +
    +void WStandardItem::setFlags(WFlags<ItemFlag> flags)
    +{
    +  if (flags_ != flags) {
    +    flags_ = flags;
    +    signalModelDataChange();
    +  }
    +}
    +
    +WFlags<ItemFlag> WStandardItem::flags() const
    +{
    +  return flags_;
    +}
    +
    +void WStandardItem::setStyleClass(const WString& styleClass)
    +{
    +  setData(styleClass, StyleClassRole);
    +}
    +
    +WString WStandardItem::styleClass() const
    +{
    +  boost::any d = data(StyleClassRole);
    +
    +  if (!d.empty() && d.type() == typeid(WString))
    +    return boost::any_cast<WString>(d);
    +  else
    +    return WString();
    +}
    +
    +void WStandardItem::setToolTip(const WString& toolTip)
    +{
    +  setData(toolTip, ToolTipRole);
    +}
    +
    +WString WStandardItem::toolTip() const
    +{
    +  boost::any d = data(ToolTipRole);
    +
    +  if (!d.empty() && d.type() == typeid(WString))
    +    return boost::any_cast<WString>(d);
    +  else
    +    return WString();
    +}
    +
    +void WStandardItem::setCheckable(bool checkable)
    +{
    +  if (!isCheckable() && checkable) {
    +    flags_ |= ItemIsUserCheckable;
    +    signalModelDataChange();
    +  } if (isCheckable() && !checkable) {
    +    flags_.clear(ItemIsUserCheckable);
    +    signalModelDataChange();
    +  }
    +}
    +
    +bool WStandardItem::isCheckable() const
    +{
    +  return flags_ & ItemIsUserCheckable;
    +}
    +
    +void WStandardItem::setChecked(bool checked)
    +{
    +  if (isChecked() != checked)
    +    setCheckState(checked ? Checked : Unchecked);
    +}
    +
    +void WStandardItem::setCheckState(CheckState state)
    +{
    +  if (checkState() != state) {
    +    if (isTristate())
    +      setData(boost::any(state), CheckStateRole);
    +    else
    +      setData(boost::any(state == Checked), CheckStateRole);
    +  }
    +}
    +
    +bool WStandardItem::isChecked() const
    +{
    +  return checkState() == Checked;
    +}
    +
    +CheckState WStandardItem::checkState() const
    +{
    +  boost::any d = data(CheckStateRole);
    +
    +  if (d.empty())
    +    return Unchecked;
    +  else if (d.type() == typeid(bool))
    +    return boost::any_cast<bool>(d) ? Checked : Unchecked;
    +  else if (d.type() == typeid(CheckState))
    +    return boost::any_cast<CheckState>(d);
    +  else
    +    return Unchecked;
    +}
    +
    +void WStandardItem::setTristate(bool tristate)
    +{
    +  flags_ |= ItemIsTristate;
    +}
    +
    +bool WStandardItem::isTristate() const
    +{
    +  return flags_ & ItemIsTristate;
    +}
    +
    +void WStandardItem::setEditable(bool editable)
    +{
    +  if (!isEditable()) {
    +    flags_ |= ItemIsEditable;
    +    signalModelDataChange();
    +  }
    +}
    +
    +bool WStandardItem::isEditable() const
    +{
    +  return flags_ & ItemIsEditable;
    +}
    +
    +bool WStandardItem::hasChildren() const
    +{
    +  return columns_;
    +}
    +
    +void WStandardItem::setRowCount(int rows)
    +{
    +  if (rows > rowCount())
    +    insertRows(rowCount(), rows - rowCount());
    +  else if (rows < rowCount())
    +    removeRows(rows, rowCount() - rows);
    +}
    +
    +int WStandardItem::rowCount() const
    +{
    +  return columns_ ? (*columns_)[0].size() : 0;
    +}
    +
    +void WStandardItem::setColumnCount(int columns)
    +{
    +  if (columns > columnCount())
    +    insertColumns(columnCount(), columns - columnCount());
    +  else
    +    if (columns < columnCount())
    +      removeColumns(columns, columnCount() - columns);
    +}
    +
    +int WStandardItem::columnCount() const
    +{
    +  return columns_ ? columns_->size() : 0;
    +}
    +
    +void WStandardItem::appendColumn(const std::vector<WStandardItem *>& items)
    +{
    +  insertColumn(columnCount(), items);
    +}
    +
    +void WStandardItem::insertColumn(int column,
    +				 const std::vector<WStandardItem *>& items)
    +{
    +  unsigned rc = rowCount();
    +
    +  if (!columns_)
    +    columns_ = new ColumnList();
    +  else {
    +    if (rc < items.size()) {
    +      setRowCount(items.size());
    +      rc = items.size();
    +    }
    +  }
    +
    +  if (model_)
    +    model_->beginInsertColumns(index(), column, column);
    +
    +  columns_->insert(columns_->begin() + column, items);
    +  for (unsigned i = 0; i < items.size(); ++i)
    +    if (items[i])
    +      adoptChild(i, column, items[i]);
    +
    +  if (items.size() < rc) {
    +    std::vector<WStandardItem *>& inserted = (*columns_)[column];
    +    inserted.resize(rc);
    +  }
    +
    +  renumberColumns(column + 1);
    +
    +  if (model_)
    +    model_->endInsertColumns();
    +}
    +
    +void WStandardItem::appendRow(const std::vector<WStandardItem *>& items)
    +{
    +  insertRow(rowCount(), items);
    +}
    +
    +void WStandardItem::insertRow(int row,
    +			      const std::vector<WStandardItem *>& items)
    +{
    +  if (!columns_)
    +    setColumnCount(1);
    +
    +  unsigned cc = columnCount();
    +
    +  if (cc < items.size()) {
    +    setColumnCount(items.size());
    +    cc = items.size();
    +  }
    +
    +  if (model_)
    +    model_->beginInsertRows(index(), row, row);
    +
    +  for (unsigned i = 0; i < cc; ++i) {
    +    Column& c = (*columns_)[i];
    +
    +    WStandardItem *item = i < items.size() ? items[i] : 0;
    +    c.insert(c.begin() + row, item);
    +    adoptChild(row, i, item);
    +  }
    +
    +  renumberRows(row + 1);
    +
    +  if (model_)
    +    model_->endInsertRows();
    +}
    +
    +void WStandardItem::insertColumns(int column, int count)
    +{
    +  if (count > 0) {
    +    if (model_)
    +      model_->beginInsertColumns(index(), column, column + count - 1);    
    +
    +    int rc = rowCount();
    +
    +    if (!columns_)
    +      columns_ = new ColumnList;
    +
    +#ifndef WT_TARGET_JAVA
    +    columns_->insert(columns_->begin() + column, count, Column(rc));
    +#else
    +    for (int i = 0; i < count; ++i) {
    +      Column c;
    +      c.insert(c.end(), rc, static_cast<WStandardItem *>(0));
    +      columns_->insert(columns_->begin() + column + i, c);
    +    }
    +#endif
    +
    +    renumberColumns(column + count);
    +
    +    if (model_)
    +      model_->endInsertColumns();
    +  }
    +}
    +
    +void WStandardItem::insertRows(int row, int count)
    +{
    +  if (count > 0) {
    +    if (model_)
    +      model_->beginInsertRows(index(), row, row + count - 1);
    +
    +    if (!columns_)
    +      setColumnCount(1);
    +
    +    unsigned cc = columnCount();
    +
    +    for (unsigned i = 0; i < cc; ++i) {
    +      Column& c = (*columns_)[i];
    +      c.insert(c.begin() + row, count, static_cast<WStandardItem *>(0));
    +    }
    +
    +    renumberRows(row + count);
    +
    +    if (model_)
    +      model_->endInsertRows();
    +  }
    +}
    +
    +void WStandardItem::appendRow(WStandardItem *item)
    +{
    +  insertRow(rowCount(), item);
    +}
    +
    +void WStandardItem::insertRow(int row, WStandardItem *item)
    +{
    +  std::vector<WStandardItem *> r;
    +  r.push_back(item);
    +
    +  insertRow(row, r);
    +}
    +
    +void WStandardItem::appendRows(const std::vector<WStandardItem *>& items)
    +{
    +  insertRows(rowCount(), items);
    +}
    +
    +void WStandardItem::insertRows(int row,
    +			       const std::vector<WStandardItem *>& items)
    +{
    +  // FIXME, could be done smarter and more efficient
    +#ifndef WT_TARGET_JAVA
    +  std::vector<WStandardItem *> r(1);
    +#else
    +  std::vector<WStandardItem *> r;
    +  r.push_back(0);
    +#endif
    +
    +  for (unsigned i = 0; i < items.size(); ++i) {
    +    r[0] = items[i];
    +
    +    insertRow(row + i, r);
    +  }
    +}
    +
    +void WStandardItem::setChild(int row, int column, WStandardItem *item)
    +{
    +  if (column >= columnCount())
    +    setColumnCount(column + 1);
    +
    +  if (row >= rowCount())
    +    setRowCount(row + 1);
    +
    +  delete (*columns_)[column][row];
    +  (*columns_)[column][row] = item;
    +
    +  adoptChild(row, column, item);
    +
    +  if (model_) {
    +    WModelIndex self = item->index();
    +    model_->dataChanged().emit(self, self);
    +    model_->itemChanged().emit(this);
    +  }
    +}
    +
    +void WStandardItem::adoptChild(int row, int column, WStandardItem *item)
    +{
    +  if (item) {
    +    item->parent_ = this;
    +    item->row_ = row;
    +    item->column_ = column;
    +
    +    item->setModel(model_);
    +  }
    +}
    +
    +void WStandardItem::orphanChild(WStandardItem *item)
    +{
    +  if (item) {
    +    item->parent_ = 0;
    +    item->row_ = -1;
    +    item->column_ = -1;
    +
    +    item->setModel(0);
    +  }
    +}
    +
    +void WStandardItem::setModel(WStandardItemModel *model)
    +{
    +  model_ = model;
    +
    +  for (int i = 0; i < columnCount(); ++i)
    +    for (int j = 0; j < rowCount(); ++j) {
    +      WStandardItem *c = (*columns_)[i][j];
    +
    +      if (c)
    +	c->setModel(model);
    +    }
    +}
    +
    +void WStandardItem::setChild(int row, WStandardItem *item)
    +{
    +  setChild(row, 0, item);
    +}
    +
    +WStandardItem *WStandardItem::child(int row, int column) const
    +{
    +  if (row < rowCount() && column < columnCount())
    +    return (*columns_)[column][row];
    +  else
    +    return 0;
    +}
    +
    +WStandardItem *WStandardItem::takeChild(int row, int column)
    +{
    +  WStandardItem *result = child(row, column);
    +  if (result) {
    +    orphanChild(result);
    +    (*columns_)[column][row] = 0;
    +  }
    +
    +  return result;
    +}
    +
    +std::vector<WStandardItem *> WStandardItem::takeColumn(int column)
    +{
    +  if (model_)
    +    model_->beginRemoveColumns(index(), column, column);
    +
    +  std::vector<WStandardItem *> result = (*columns_)[column];
    +
    +  columns_->erase(columns_->begin() + column);
    +
    +  if (columns_->empty()) {
    +    delete columns_;
    +    columns_ = 0;
    +  }
    +
    +  for (unsigned i = 0; i < result.size(); ++i)
    +    orphanChild(result[i]);
    +
    +  renumberColumns(column);
    +
    +  if (model_)
    +    model_->endRemoveColumns();
    +
    +  return result;
    +}
    +
    +std::vector<WStandardItem *> WStandardItem::takeRow(int row)
    +{
    +  if (model_)
    +    model_->beginRemoveRows(index(), row, row);
    +
    +#ifndef WT_TARGET_JAVA
    +  std::vector<WStandardItem *> result(columnCount());
    +#else
    +  std::vector<WStandardItem *> result;
    +  result.insert(result.end(), columnCount(), static_cast<WStandardItem *>(0));
    +#endif
    +
    +  for (unsigned i = 0; i < result.size(); ++i) {
    +    Column& c = (*columns_)[i];
    +    result[i] = c[row];
    +    orphanChild(result[i]);
    +    c.erase(c.begin() + row);
    +  }
    +
    +  renumberRows(row);
    +
    +  if (model_)
    +    model_->endRemoveRows();
    +
    +  return result;
    +}
    +
    +void WStandardItem::removeColumn(int column)
    +{
    +  removeColumns(column, 1);
    +}
    +
    +void WStandardItem::removeColumns(int column, int count)
    +{
    +  if (model_)
    +    model_->beginRemoveColumns(index(), column, column + count - 1);
    +
    +  for (int i = 0; i < count; ++i)
    +    for (int j = 0; j < rowCount(); ++j)
    +      delete (*columns_)[column + i][j];
    +
    +  columns_->erase(columns_->begin() + column,
    +		  columns_->begin() + column + count);
    +
    +  if (columns_->empty()) {
    +    delete columns_;
    +    columns_ = 0;
    +  }
    +
    +  renumberColumns(column);
    +
    +  if (model_)
    +    model_->endRemoveColumns();
    +}
    +
    +void WStandardItem::removeRow(int row)
    +{
    +  removeRows(row, 1);
    +}
    +
    +void WStandardItem::removeRows(int row, int count)
    +{
    +  if (model_)
    +    model_->beginRemoveRows(index(), row, row + count - 1);
    +
    +  for (int i = 0; i < columnCount(); ++i) {
    +    Column& c = (*columns_)[i];
    +
    +    for (int j = 0; j < count; ++j)
    +      delete c[row + j];
    +
    +    c.erase(c.begin() + row, c.begin() + row + count);
    +  }
    +
    +  renumberRows(row);
    +
    +  if (model_)
    +    model_->endRemoveRows();
    +}
    +
    +void WStandardItem::renumberColumns(int column)
    +{
    +  for (int c = column; c < columnCount(); ++c)
    +    for (int r = 0; r < rowCount(); ++r) {
    +      WStandardItem *item = child(r, c);
    +      if (item)
    +	item->column_ = c;
    +    }
    +}
    +
    +void WStandardItem::renumberRows(int row)
    +{
    +  for (int c = 0; c < columnCount(); ++c)
    +    for (int r = row; r < rowCount(); ++r) {
    +      WStandardItem *item = child(r, c);
    +      if (item)
    +	item->row_ = r;
    +    }
    +}
    +
    +WModelIndex WStandardItem::index() const
    +{
    +  if (model_)
    +    return model_->indexFromItem(this);
    +  else
    +    return WModelIndex();
    +}
    +
    +WStandardItem *WStandardItem::clone() const
    +{
    +  WStandardItem *result = new WStandardItem();
    +
    +  result->data_ = DataMap(data_);
    +  result->flags_ = flags_;
    +
    +  return result;
    +}
    +
    +void WStandardItem::sortChildren(int column, SortOrder order)
    +{
    +  if (model_)
    +    model_->layoutAboutToBeChanged().emit();
    +
    +  recursiveSortChildren(column, order);
    +
    +  if (model_)
    +    model_->layoutChanged().emit();
    +}
    +
    +bool WStandardItem::operator< (const WStandardItem& other) const
    +{
    +  return compare(other) < 0;
    +}
    +
    +int WStandardItem::compare(const WStandardItem& other) const
    +{
    +  int role = model_ ? model_->sortRole() : DisplayRole;
    +
    +  boost::any d1 = data(role);
    +  boost::any d2 = other.data(role);
    +
    +  return Wt::Impl::compare(d1, d2);
    +}
    +
    +void WStandardItem::recursiveSortChildren(int column, SortOrder order)
    +{
    +  if (column < columnCount()) {
    +#ifndef WT_TARGET_JAVA
    +    std::vector<int> permutation(rowCount());
    +
    +    for (unsigned i = 0; i < permutation.size(); ++i)
    +      permutation[i] = i;
    +#else
    +    std::vector<int> permutation;
    +    for (unsigned i = 0; i < rowCount(); ++i)
    +      permutation.push_back(i);
    +#endif // WT_TARGET_JAVA
    +
    +    Utils::stable_sort(permutation, WStandardItemCompare(this, column, order));
    +
    +#ifndef WT_TARGET_JAVA
    +    Column temp(rowCount());
    +#endif
    +
    +    for (int c = 0; c < columnCount(); ++c) {
    +#ifdef WT_TARGET_JAVA
    +    Column temp;
    +#endif // WT_TARGET_JAVA
    +      Column& cc = (*columns_)[c];
    +      for (int r = 0; r < rowCount(); ++r) {
    +#ifndef WT_TARGET_JAVA
    +	temp[r] = cc[permutation[r]];
    +#else
    +	temp.push_back(cc[permutation[r]]);
    +#endif // WT_TARGET_JAVA
    +	if (temp[r])
    +	  temp[r]->row_ = r;
    +      }
    +      (*columns_)[c] = temp;
    +    }
    +  }
    +
    +  for (int c = 0; c < columnCount(); ++c)
    +    for (int r = 0; r < rowCount(); ++r) {
    +      WStandardItem *ch = child(r, c);
    +      if (ch)
    +	ch->recursiveSortChildren(column, order);
    +    }
    +}
    +
    +void WStandardItem::signalModelDataChange()
    +{
    +  if (model_) {
    +    WModelIndex self = index();
    +    model_->dataChanged().emit(self, self);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WStandardItemModel b/wt-3.1.7a/src/Wt/WStandardItemModel
    new file mode 100644
    index 0000000..d616c79
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStandardItemModel
    @@ -0,0 +1,415 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTANDARD_ITEM_MODEL_H_
    +#define WSTANDARD_ITEM_MODEL_H_
    +
    +#include <Wt/WAbstractItemModel>
    +
    +namespace Wt {
    +
    +class WStandardItem;
    +
    +/*! \class WStandardItemModel Wt/WStandardItemModel Wt/WStandardItemModel
    + *  \brief A standard data model, which stores its data in memory.
    + *
    + * The standard item model supports all features of
    + * WAbstractItemModel, and can thus be used to represent tables, trees
    + * and tree tables.
    + *
    + * The data itself are organized in WStandardItem objects. There is
    + * one invisible root object (invisibleRootItem()) that holds the
    + * toplevel data. Most methods in this class that access or manipulate
    + * data internally operate on this root item.
    + *
    + * If you want to use the model as a table, then you can use
    + * WStandardItemModel(int, int, WObject *) to set the initial table
    + * size, and use the item() and setItem() methods to set data. You can
    + * change the geometry by inserting rows (insertRow()) or columns
    + * (insertColumn()) or removing rows (removeRow()) or columns
    + * (removeColumn()).
    + *
    + * If you want to use the model as a tree (or tree table), then you
    + * can use the default constructor to start with an empty tree, and
    + * use the WStandardItem API on invisibleRootItem() to manipulate the
    + * tree root. When you are building a tree, the column count at each
    + * node is 1. When you are building a tree table, you can add
    + * additional columns of data for each internal node. Only the items
    + * in the first column have children that result in a hierarchical
    + * tree structure.
    + *
    + * When using the model with a view class, you can use the
    + * itemFromIndex() and indexFromItem() models to translate between
    + * model indexes (that are used by the view class) and standard items.
    + * 
    + * \if cpp
    + * Usage example for tabular data:
    + * \code
    + * int rows = 5;
    + * int columns = 4;
    + *
    + * Wt::WStandardItemModel *model = new Wt::WStandardItemModel(rows, columns, this);
    + *
    + * for (int row = 0; row < rows; ++row) {
    + *   for (int column = 0; column < columns; ++column) {
    + *     Wt::WStandardItem *item = new Wt::WStandardItem();
    + *     item->setText("Item " + boost::lexical_cast<std::string>(row)
    + *                   + ", " + boost::lexical_cast<std::string>(column));
    + *     model->setItem(row, column, item);
    + *   }
    + * }
    + * \endcode
    + *
    + * Usage example for tree-like data:
    + * \code
    + * int topLevelRows = 5;
    + * int secondLevelRows = 7;
    + *
    + * Wt::WStandardItemModel *model = new Wt::WStandardItemModel();
    + * Wt::WStandardItem *root = model->invisibleRootItem();
    + *
    + * for (int row = 0; row < topLevelRows; ++row) {
    + *   Wt::WStandardItem *topLevel = new Wt::WStandardItem();
    + *   topLevel->setText("Item " + boost::lexical_cast<std::string>(row));
    + *   for (int row2 = 0; row2 < secondLevelRows; ++row2) {
    + *     Wt::WStandardItem *item = new Wt::WStandardItem();
    + *     item->setText("Item " + boost::lexical_cast<std::string>(row)
    + *                   + ": " + boost::lexical_cast<std::string>(row2));
    + *     topLevel->appendRow(item);
    + *   }
    + *   root->appendRow(topLevel);
    + * }
    + * \endcode
    + * \endif 
    + *
    + * \ingroup modelview
    + */
    +class WT_API WStandardItemModel : public WAbstractItemModel
    +{
    +public:
    +  /*! \brief Creates a new standard item model.
    +   */
    +  WStandardItemModel(WObject *parent = 0);
    +
    +  /*! \brief Creates a new standard item model with an initial geometry.
    +   *
    +   * Creates a standard item model with a geometry of
    +   * <i>rows</i> x \p columns. All items are set to \c 0.
    +   */
    +  WStandardItemModel(int rows, int columns, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WStandardItemModel();
    +
    +  /*! \brief Erases all data in the model.
    +   *
    +   * After clearing the model, rowCount() and columnCount() are 0.
    +   */
    +  void clear();
    +
    +  /*! \brief Returns the invisible root item.
    +   *
    +   * The invisible root item is a special item that is not rendered
    +   * itself, but holds the top level data.
    +   */
    +  WStandardItem *invisibleRootItem() const { return invisibleRootItem_; }
    +
    +  /*! \brief Returns the model index for a particular item.
    +   *
    +   * If the \p item is the invisibleRootItem(), then an invalid
    +   * index is returned.
    +   *
    +   * \sa itemFromIndex()
    +   */
    +  WModelIndex indexFromItem(const WStandardItem *item) const;
    +
    +  /*! \brief Returns the standard item that corresponds to a model index.
    +   *
    +   * If the index is an invalid index, then the invisibleRootItem() is
    +   * returned.
    +   *
    +   * \sa indexFromItem()
    +   */
    +  WStandardItem *itemFromIndex(const WModelIndex& index) const;
    +
    +  /*! \brief Adds a single column of top level items.
    +   *
    +   * Appends a single column of top level \p items. If necessary,
    +   * the row count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertColumn(columnCount(), items);
    +   * \endcode
    +   *
    +   * \sa insertColumn(), appendRow()
    +   */
    +  void appendColumn(const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Inserts a single column of top level items.
    +   *
    +   * Inserts a single column of top level \p items at column
    +   * \p column. If necessary, the row count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->insertColumn(column, items);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::insertColumn()
    +   */
    +  void insertColumn(int column, const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Adds a single row of top level items.
    +   *
    +   * Appends a single row of top level \p items. If necessary,
    +   * the column count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertRow(rowCount(), items);
    +   * \endcode
    +   *
    +   * \sa insertRow(), appendColumn()
    +   */
    +  void appendRow(const std::vector<WStandardItem *>& items);
    +
    +  using WAbstractItemModel::insertRow;
    +
    +  /*! \brief Inserts a single row of top level items.
    +   *
    +   * Inserts a single row of top level \p items at row
    +   * \p row. If necessary, the column count is increased.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->insertRow(row, items);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::insertRow()
    +   */
    +  void insertRow(int row, const std::vector<WStandardItem *>& items);
    +
    +  /*! \brief Appends a single row containing a single item.
    +   *
    +   * Appends a single toplevel row, with a single item.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertRow(rowCount(), item);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::insertRow(int, WStandardItem *)
    +   */
    +  void appendRow(WStandardItem *item);
    +
    +  /*! \brief Inserts a single row containing a single item.
    +   *
    +   * Inserts a single toplevel row, with a single item.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->insertRow(row, item);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::insertRow(int, WStandardItem *)
    +   */
    +  void insertRow(int row, WStandardItem *item);
    +
    +  /*! \brief Returns a toplevel item.
    +   *
    +   * Returns the top level at at (<i>row</i>, \p column). This may
    +   * be 0 if no item was set previously at that position, or if the
    +   * indicated position is out of bounds.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->child(row, column);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::child()
    +   */
    +  WStandardItem *item(int row, int column = 0) const;
    +
    +  /*! \brief Sets a toplevel item.
    +   *
    +   * Sets the top level at at (<i>row</i>, \p column). If
    +   * necessary, the number of rows or columns is increased.
    +   *
    +   * If an item was previously set for that position, it is deleted
    +   * first.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->setChild(row, column, item);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::setChild(int, int, WStandardItem *item)
    +   */
    +  void setItem(int row, int column, WStandardItem *item);
    +
    +  /*! \brief Returns the item prototype.
    +   *
    +   * \sa setItemPrototype()
    +   */
    +  WStandardItem *itemPrototype() const;
    +
    +  /*! \brief Returns the item prototype.
    +   *
    +   * Set the item that is cloned when an item needs to be created
    +   * because the model is manipulated through its WAbstractItemModel
    +   * API. For example, this may be needed when a view sets data at a
    +   * position for which no item was previously set and thus created.
    +   *
    +   * The new item is created based on this prototype by using
    +   * WStandardItem::clone().
    +   *
    +   * The default prototype is WStandardItem().
    +   *
    +   * \sa setItemPrototype()
    +   */
    +  void setItemPrototype(WStandardItem *item);
    +
    +  /*! \brief Takes a column out of the model.
    +   *
    +   * Removes a column from the model, and returns the items that it
    +   * contained. Ownership of the items is transferred out of the
    +   * model.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->takeColumn(column);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::takeColumn(), WStandardItem::takeRow()
    +   */
    +  std::vector<WStandardItem *> takeColumn(int column);
    +
    +  /*! \brief Takes a row out of the model.
    +   *
    +   * Removes a row from the model, and returns the items that it
    +   * contained. Ownership of the items is transferred out of the
    +   * model.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->takeRow(row);
    +   * \endcode
    +   *
    +   * \sa WStandardItem::takeRow(), takeColumn()
    +   */
    +  std::vector<WStandardItem *> takeRow(int row);
    +
    +  /*! \brief Takes an item out of the model.
    +   *
    +   * Removes an item from the model, and returns it. Ownership of the
    +   * item is transferred out of the model.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * invisibleRootItem()->takeItem(row, column);
    +   * \endcode
    +   *
    +   * \sa takeItem(), WStandardItem::takeRow(), WStandardItem::takeColumn()
    +   */
    +  WStandardItem *takeItem(int row, int column = 0);
    +
    +#ifndef DOXYGEN_ONLY
    +  using WAbstractItemModel::setData;
    +  using WAbstractItemModel::data;
    +  using WAbstractItemModel::setHeaderData;
    +
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  virtual WModelIndex parent(const WModelIndex& index) const;
    +
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const;
    +  virtual boost::any headerData(int section,
    +				Orientation orientation = Horizontal,
    +				int role = DisplayRole) const;
    +
    +  virtual WModelIndex index(int row, int column,
    +			    const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual int columnCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual bool insertColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +  virtual bool removeColumns(int column, int count,
    +			     const WModelIndex& parent = WModelIndex());
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +  virtual bool setData(const WModelIndex& index, const boost::any& value,
    +		       int role = EditRole);
    +  virtual bool setHeaderData(int section, Orientation orientation,
    +			     const boost::any& value, int role = EditRole);
    +
    +  virtual void *toRawIndex(const WModelIndex& index) const;
    +  virtual WModelIndex fromRawIndex(void *rawIndex) const;
    +
    +#endif // DOXYGEN_ONLY
    +
    +  /*! \brief Set the role used to sort the model.
    +   *
    +   * The default role is \link Wt::DisplayRole DisplayRole\endlink.
    +   *
    +   * \sa sort().
    +   */
    +  void setSortRole(int role);
    +
    +  /*! \brief Returns the role used to sort the model.
    +   *
    +   * \sa setSortRole()
    +   */
    +  int sortRole() const { return sortRole_; }
    +
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +  /*! \brief %Signal emitted when an item is changed.
    +   *
    +   * This signal is emitted whenever date of an item has changed. The
    +   * item that has changed is passed as the first parameter.
    +   *
    +   * \sa WStandardItem::setData()
    +   */
    +  Signal<WStandardItem *>& itemChanged() { return itemChanged_; }
    +
    +protected:
    +#ifndef DOXYGEN_ONLY
    +  void beginInsertColumns(const WModelIndex& parent, int first, int last);
    +  void beginInsertRows(const WModelIndex& parent, int first, int last);
    +  void beginRemoveColumns(const WModelIndex& parent, int first, int last);
    +  void beginRemoveRows(const WModelIndex& parent, int first, int last);
    +#endif // DOXYGEN_ONLY
    +
    +private:
    +  typedef std::map<int, boost::any> HeaderData;
    +  int sortRole_;
    +
    +  std::vector<HeaderData> columnHeaderData_, rowHeaderData_;
    +  WStandardItem *invisibleRootItem_, *itemPrototype_;
    +
    +  Signal<WStandardItem *> itemChanged_;
    +
    +  void init();
    +  WStandardItem *itemFromIndex(const WModelIndex& index, bool lazyCreate) const;
    +  void insertHeaderData(std::vector<HeaderData>& headerData,
    +			WStandardItem *item, int index,	int count);
    +  void removeHeaderData(std::vector<HeaderData>& headerData,
    +			WStandardItem *item, int index, int count);
    +
    +  friend class WStandardItem;
    +};
    +
    +}
    +
    +#endif // WSTANDARD_ITEM_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WStandardItemModel.C b/wt-3.1.7a/src/Wt/WStandardItemModel.C
    new file mode 100644
    index 0000000..59cebec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStandardItemModel.C
    @@ -0,0 +1,383 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WStandardItem"
    +#include "Wt/WStandardItemModel"
    +
    +#ifndef DOXYGEN_ONLY
    +
    +namespace Wt {
    +
    +WStandardItemModel::WStandardItemModel(WObject *parent)
    +  : WAbstractItemModel(parent),
    +    sortRole_(DisplayRole),
    +    itemChanged_(this)
    +{
    +  init();
    +}
    +
    +WStandardItemModel::WStandardItemModel(int rows, int columns, WObject *parent)
    +  : WAbstractItemModel(parent),
    +    sortRole_(DisplayRole),
    +    itemChanged_(this)
    +{
    +  init();
    +
    +  invisibleRootItem_->setColumnCount(columns);
    +  invisibleRootItem_->setRowCount(rows);
    +}
    +
    +void WStandardItemModel::init()
    +{
    +  invisibleRootItem_ = new WStandardItem();
    +  invisibleRootItem_->model_ = this;
    +
    +  itemPrototype_ = new WStandardItem();
    +}
    +
    +WStandardItemModel::~WStandardItemModel()
    +{
    +  delete invisibleRootItem_;
    +  delete itemPrototype_;
    +}
    +
    +void WStandardItemModel::clear()
    +{
    +  invisibleRootItem_->setRowCount(0);
    +  invisibleRootItem_->setColumnCount(0);
    +
    +  columnHeaderData_.clear();
    +  rowHeaderData_.clear();
    +
    +  reset();
    +}
    +
    +WModelIndex WStandardItemModel::indexFromItem(const WStandardItem *item) const
    +{
    +  if (item == invisibleRootItem_)
    +    return WModelIndex();
    +  else
    +    return createIndex(item->row(), item->column(),
    +		       static_cast<void *>(item->parent()));
    +}
    +
    +WStandardItem *WStandardItemModel::itemFromIndex(const WModelIndex& index) const
    +{
    +  return itemFromIndex(index, true);
    +}
    +
    +WStandardItem *WStandardItemModel::itemFromIndex(const WModelIndex& index,
    +						 bool lazyCreate) const
    +{
    +  if (!index.isValid())
    +    return invisibleRootItem_;
    +  else
    +    if (index.model() != this)
    +      return 0;
    +    else {
    +      WStandardItem *parent
    +	= static_cast<WStandardItem *>(index.internalPointer());
    +      WStandardItem *c = parent->child(index.row(), index.column());
    +
    +      if (lazyCreate && !c) {
    +	c = itemPrototype()->clone();
    +	parent->setChild(index.row(), index.column(), c);
    +      }
    +      
    +      return c;
    +    }
    +}
    +
    +
    +void WStandardItemModel::appendColumn(const std::vector<WStandardItem *>& items)
    +{
    +  insertColumn(columnCount(), items);
    +}
    +
    +void WStandardItemModel::insertColumn(int column,
    +				      const std::vector<WStandardItem *>& items)
    +{
    +  invisibleRootItem_->insertColumn(column, items);
    +}
    +
    +void WStandardItemModel::appendRow(const std::vector<WStandardItem *>& items)
    +{
    +  insertRow(rowCount(), items);
    +}
    +
    +void WStandardItemModel::insertRow(int row,
    +				   const std::vector<WStandardItem *>& items)
    +{
    +  invisibleRootItem_->insertRow(row, items);
    +}
    +
    +void WStandardItemModel::appendRow(WStandardItem *item)
    +{
    +  insertRow(rowCount(), item);
    +}
    +
    +void WStandardItemModel::insertRow(int row, WStandardItem *item)
    +{
    +  invisibleRootItem_->insertRow(row, item);
    +}
    +  
    +WStandardItem *WStandardItemModel::item(int row, int column) const
    +{
    +  return invisibleRootItem_->child(row, column);
    +}
    +
    +void WStandardItemModel::setItem(int row, int column, WStandardItem *item)
    +{
    +  invisibleRootItem_->setChild(row, column, item);
    +}
    +
    +WStandardItem *WStandardItemModel::itemPrototype() const
    +{
    +  return itemPrototype_;
    +}
    +
    +void WStandardItemModel::setItemPrototype(WStandardItem *item)
    +{
    +  delete itemPrototype_;
    +  itemPrototype_ = item;
    +}
    +
    +std::vector<WStandardItem *> WStandardItemModel::takeColumn(int column)
    +{
    +  return invisibleRootItem_->takeColumn(column);
    +}
    +
    +std::vector<WStandardItem *> WStandardItemModel::takeRow(int row)
    +{
    +  return invisibleRootItem_->takeRow(row);
    +}
    +
    +WStandardItem *WStandardItemModel::takeItem(int row, int column)
    +{
    +  return invisibleRootItem_->takeChild(row, column);
    +}
    +
    +WFlags<ItemFlag> WStandardItemModel::flags(const WModelIndex& index) const
    +{
    +  WStandardItem *item = itemFromIndex(index, false);
    +
    +  return item ? item->flags() : WFlags<ItemFlag>(0);
    +}
    +
    +WModelIndex WStandardItemModel::parent(const WModelIndex& index) const
    +{
    +  if (!index.isValid())
    +    return index;
    +
    +  WStandardItem *parent = static_cast<WStandardItem *>(index.internalPointer());
    +
    +  return indexFromItem(parent);
    +}
    +
    +boost::any WStandardItemModel::data(const WModelIndex& index, int role) const
    +{
    +  WStandardItem *item = itemFromIndex(index, false);
    +
    +  return item ? item->data(role) : boost::any();
    +}
    +
    +boost::any WStandardItemModel::headerData(int section, Orientation orientation,
    +					  int role) const
    +{
    +  if (role == LevelRole)
    +    return 0;
    +
    +  const HeaderData& d = (orientation == Horizontal)
    +    ? columnHeaderData_[section]
    +    : rowHeaderData_[section];
    +
    +  HeaderData::const_iterator i = d.find(role);
    +
    +  return i != d.end() ? i->second : boost::any();
    +}
    +
    +WModelIndex WStandardItemModel::index(int row, int column,
    +				      const WModelIndex& parent) const
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent, false);
    +
    +  if (parentItem
    +      && row >= 0
    +      && column >= 0
    +      && row < parentItem->rowCount()
    +      && column < parentItem->columnCount())
    +    return createIndex(row, column, static_cast<void *>(parentItem));
    +
    +  return WModelIndex();
    +}
    +
    +int WStandardItemModel::columnCount(const WModelIndex& parent) const
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent, false);
    +
    +  return parentItem ? parentItem->columnCount() : 0;
    +}
    +
    +int WStandardItemModel::rowCount(const WModelIndex& parent) const
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent, false);
    +
    +  return parentItem ? parentItem->rowCount() : 0;
    +}
    +
    +bool WStandardItemModel::insertColumns(int column, int count,
    +				       const WModelIndex& parent)
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent); // lazy create ok
    +
    +  if (parentItem)
    +    parentItem->insertColumns(column, count);
    +
    +  return parentItem;
    +}
    +
    +bool WStandardItemModel::insertRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent); // lazy create ok
    +
    +  if (parentItem)
    +    parentItem->insertRows(row, count);
    +
    +  return parentItem;
    +}
    +
    +bool WStandardItemModel::removeColumns(int column, int count,
    +				       const WModelIndex& parent)
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent, false);
    +
    +  if (parentItem)
    +    parentItem->removeColumns(column, count);
    +
    +  return parentItem;
    +}
    +
    +bool WStandardItemModel::removeRows(int row, int count,
    +				    const WModelIndex& parent)
    +{
    +  WStandardItem *parentItem = itemFromIndex(parent, false);
    +
    +  if (parentItem)
    +    parentItem->removeRows(row, count);
    +
    +  return parentItem;  
    +}
    +
    +void WStandardItemModel::beginInsertColumns(const WModelIndex& parent,
    +					    int first, int last)
    +{
    +  WAbstractItemModel::beginInsertColumns(parent, first, last);
    +
    +  insertHeaderData(columnHeaderData_, itemFromIndex(parent),
    +		   first, last - first + 1);
    +}
    +
    +void WStandardItemModel::beginInsertRows(const WModelIndex& parent,
    +					 int first, int last)
    +{
    +  WAbstractItemModel::beginInsertRows(parent, first, last);
    +
    +  insertHeaderData(rowHeaderData_, itemFromIndex(parent),
    +		   first, last - first + 1);
    +}
    +
    +void WStandardItemModel::beginRemoveColumns(const WModelIndex& parent,
    +					    int first, int last)
    +{
    +  WAbstractItemModel::beginRemoveColumns(parent, first, last);
    +
    +  removeHeaderData(columnHeaderData_, itemFromIndex(parent),
    +		   first, last - first + 1);
    +}
    +
    +void WStandardItemModel::beginRemoveRows(const WModelIndex& parent,
    +					 int first, int last)
    +{ 
    +  WAbstractItemModel::beginRemoveRows(parent, first, last);
    +
    +  removeHeaderData(rowHeaderData_, itemFromIndex(parent),
    +		   first, last - first + 1);
    +}
    +
    +void WStandardItemModel::insertHeaderData(std::vector<HeaderData>& headerData,
    +					  WStandardItem *item, int index,
    +					  int count)
    +{
    +  if (item == invisibleRootItem_)
    +    headerData.insert(headerData.begin() + index, count, HeaderData());
    +}
    +
    +void WStandardItemModel::removeHeaderData(std::vector<HeaderData>& headerData,
    +					  WStandardItem *item, int index,
    +					  int count)
    +{
    +  if (item == invisibleRootItem_)
    +    headerData.erase(headerData.begin() + index,
    +		     headerData.begin() + index + count);
    +}
    +
    +bool WStandardItemModel::setData(const WModelIndex& index,
    +				 const boost::any& value, int role)
    +{
    +  WStandardItem *item = itemFromIndex(index);
    +
    +  if (item)
    +    item->setData(value, role);
    +
    +  return item;
    +}
    +
    +bool WStandardItemModel::setHeaderData(int section, Orientation orientation,
    +				       const boost::any& value, int role)
    +{
    +  std::vector<HeaderData>& header
    +    = (orientation == Horizontal) ? columnHeaderData_ : rowHeaderData_;
    +
    +  HeaderData& d = header[section];
    +
    +  if (role == EditRole)
    +    role = DisplayRole;
    +
    +  d[role] = value;
    +
    +  headerDataChanged().emit(orientation, section, section);
    +
    +  return true;
    +}
    +
    +void *WStandardItemModel::toRawIndex(const WModelIndex& index) const
    +{
    +  return static_cast<void *>(itemFromIndex(index));
    +}
    +
    +WModelIndex WStandardItemModel::fromRawIndex(void *rawIndex) const
    +{
    +  return indexFromItem(static_cast<WStandardItem *>(rawIndex));
    +}
    +
    +void WStandardItemModel::setSortRole(int role)
    +{
    +  sortRole_ = role;
    +}
    +
    +void WStandardItemModel::sort(int column, SortOrder order)
    +{
    +  invisibleRootItem_->sortChildren(column, order);
    +}
    +
    +}
    +
    +#endif // DOXYGEN_ONLY
    diff --git a/wt-3.1.7a/src/Wt/WStatelessSlot b/wt-3.1.7a/src/Wt/WStatelessSlot
    new file mode 100644
    index 0000000..d69af88
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStatelessSlot
    @@ -0,0 +1,80 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTATELESSSLOT_H_
    +#define WSTATELESSSLOT_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <vector>
    +#include <string>
    +
    +namespace Wt {
    +
    +class WObject;
    +class JSlot;
    +class EventSignalBase;
    +
    +class WT_API WStatelessSlot
    +{
    +public:
    +  WStatelessSlot(const std::string& javaScript);
    +  ~WStatelessSlot();
    +
    +  typedef void (WObject::*WObjectMethod)();
    +
    +  enum SlotType { 
    +    AutoLearnStateless,
    +    PreLearnStateless,
    +    JavaScriptSpecified
    +  };
    +    
    +  SlotType type() const; 
    +  bool learned() const;
    +  void setNotLearned();
    +  void setJavaScript(const std::string& javaScript);
    +
    +  bool addConnection(EventSignalBase *);
    +  bool removeConnection(EventSignalBase *);	
    +
    +  const std::string& javaScript() const { return jscript_; }
    +
    +  void trigger();
    +  void undoTrigger();
    +
    +  bool implementsMethod(WObjectMethod method) const;
    +
    +protected:
    +  WStatelessSlot(WObject *target, WObjectMethod method);
    +  WStatelessSlot(WObject *target, WObjectMethod method,
    +		 WObjectMethod undoMethod);
    +  WStatelessSlot(WObject *target, WObjectMethod method,
    +		 const std::string& javaScript);
    +
    +private:
    +  void reimplementPreLearn(WObjectMethod undoMethod);
    +  void reimplementJavaScript(const std::string& javaScript);
    +
    +  WObject       *target_;
    +  WObjectMethod  method_;
    +  WObjectMethod  undoMethod_;
    +
    +  bool                           learned_;
    +  std::string                    jscript_;
    +  std::vector<EventSignalBase *> connectingSignals_;     
    +
    +  friend class WObject;
    +  friend class JSlot;
    +};
    +
    +class WT_API SlotLearnerInterface {
    +public:
    +  virtual std::string learn(WStatelessSlot* slot) = 0;
    +  virtual ~SlotLearnerInterface() { }
    +};
    +
    +}
    +
    +#endif // WSTATELESSSLOT_H_
    diff --git a/wt-3.1.7a/src/Wt/WStatelessSlot.C b/wt-3.1.7a/src/Wt/WStatelessSlot.C
    new file mode 100644
    index 0000000..2be85d6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStatelessSlot.C
    @@ -0,0 +1,129 @@
    +#include "Wt/WObject"
    +#include "Wt/WStatelessSlot"
    +#include "Wt/WSignal"
    +
    +#include <string>
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WStatelessSlot::WStatelessSlot(WObject* obj, WObjectMethod method)
    +  : target_(obj),
    +    method_(method),
    +    undoMethod_(0),
    +    learned_(false)
    +{ }
    +
    +WStatelessSlot::WStatelessSlot(WObject* obj, WObjectMethod method, 
    +			       WObjectMethod undomethod)
    +  : target_(obj),
    +    method_(method),
    +    undoMethod_(undomethod),
    +    learned_(false)
    +{ }
    +
    +WStatelessSlot::WStatelessSlot(WObject* obj, WObjectMethod method,
    +			       const std::string& javaScript)
    +  : target_(obj),
    +    method_(method),
    +    undoMethod_(0),
    +    learned_(true),
    +    jscript_(javaScript)
    +{ }
    +
    +WStatelessSlot::WStatelessSlot(const std::string& javaScript)
    +  : target_(0),
    +    method_(0),
    +    undoMethod_(0),
    +    learned_(true),
    +    jscript_(javaScript)
    +{ }
    +
    +WStatelessSlot::~WStatelessSlot()
    +{
    +  for (unsigned i = 0; i < connectingSignals_.size(); ++i)
    +    connectingSignals_[i]->removeSlot(this);
    +}
    +
    +bool WStatelessSlot::implementsMethod(WObjectMethod method) const
    +{
    +  return method_ == method;
    +}
    +
    +void WStatelessSlot::reimplementPreLearn(WObjectMethod undoMethod)
    +{
    +  undoMethod_ = undoMethod;
    +  setNotLearned();
    +}
    +
    +void WStatelessSlot::reimplementJavaScript(const std::string& javaScript)
    +{
    +  undoMethod_ = 0;
    +  learned_ = true;
    +  setJavaScript(javaScript);
    +}
    +
    +WStatelessSlot::SlotType WStatelessSlot::type() const
    +{
    +  if (method_ == 0)
    +    return JavaScriptSpecified;
    +  else
    +    if (undoMethod_ == 0)
    +      return AutoLearnStateless;
    +    else
    +      return PreLearnStateless;
    +} 
    + 
    +bool WStatelessSlot::learned() const
    +{
    +  return learned_;
    +}
    +
    +void WStatelessSlot::setJavaScript(const std::string& javaScript)
    +{
    +  jscript_ = javaScript;
    +  learned_ = true;
    +
    +  for (size_t i = 0; i < connectingSignals_.size(); i++)
    +    connectingSignals_[i]->senderRepaint();
    +}
    +
    +void WStatelessSlot::setNotLearned()
    +{
    +  if (learned_) {
    +    jscript_.clear();
    +    learned_ = false;
    +
    +    for (size_t i = 0; i < connectingSignals_.size(); i++)
    +      connectingSignals_[i]->senderRepaint();    
    +  }
    +}
    +
    +void WStatelessSlot::trigger()
    +{
    +  if (method_)
    +    (target_->*(method_))();
    +}
    +
    +void WStatelessSlot::undoTrigger()
    +{
    +  if (undoMethod_)
    +    (target_->*(undoMethod_))();
    +}
    +
    +bool WStatelessSlot::addConnection(EventSignalBase* s)
    +{
    +  int f = Utils::indexOf(connectingSignals_, s);
    +  if (f == -1) {
    +    connectingSignals_.push_back(s);
    +    return true;
    +  } else
    +    return false;
    +}	
    +
    +bool WStatelessSlot::removeConnection(EventSignalBase* s)	
    +{
    +  return Utils::erase(connectingSignals_, s);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WString b/wt-3.1.7a/src/Wt/WString
    new file mode 100644
    index 0000000..afce138
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WString
    @@ -0,0 +1,620 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTRING_H_
    +#define WSTRING_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WGlobal>
    +
    +#include <string>
    +#include <vector>
    +#include <iosfwd>
    +#ifndef WT_NO_STD_LOCALE
    +#include <locale>
    +#endif
    +
    +namespace Wt {
    +
    +/*! \class WString Wt/WString Wt/WString
    + *  \brief A unicode string class, with support for localization.
    + *
    + * %Wt offers this string to facilitate handling of unicode text
    + * through the user interface, and to offer support for localized text
    + * using message resource bundles.
    + *
    + * A %WString may be constructed from a std::string, std::wstring or
    + * c-style strings (const char * and const wchar_t *), and converted
    + * to each of these strings taking into account the locale in which
    + * the %Wt application runs on the web server. Independent of the
    + * locale on the web server, you may convert from and to UTF8 unicode
    + * encoded std::strings.
    + *
    + * By using the static functions WString::tr() (or WWidget::tr()), one
    + * may construct a localized string. The key is used to retrieve its
    + * current value from the application's message-resource
    + * bundles.
    + *
    + * Argument place holder in a string, denoted using {<i>n</i>} for the
    + * <i>n</i>'th argument, may be substituted by values set using
    + * arg(int) and arg(std::string).
    + *
    + * %WString is used by all built-in widgets for displayed text. By
    + * calling WApplication::setLocale() or WApplication::refresh(), the
    + * contents of every %WString is reevaluated in the new locale, by
    + * calling refresh(). In this way, the contents of the whole user
    + * interface is adapted to a possibly changed locale.
    + *
    + * To benefit from the localization properties of %WString, you should
    + * design your own widget classes to use %WString in their interface
    + * for any text that is displayed. In this way, your own widgets will
    + * automatically, and without any extra effort, participate in a
    + * relocalization triggered by WApplication::setLocale().
    + *
    + * This string class does not provide anything more than basic
    + * manipulations. Instead, you should convert to a standard library
    + * string class to manipulate the string contents and perform string
    + * algorithms on them. In particular, we recommend to use the
    + * conversion methods toUTF8(), fromUTF8() to convert from and to UTF8
    + * encoded std::strings. In this way, you can support the whole
    + * unicode character set, with backward compatible support for the
    + * standard 7-bit ASCII set. Since %WString internally uses
    + * UTF8-encoding, and UTF8-encoding is used by the library for
    + * communication with the browser, there is no actual conversion
    + * overhead. Only when you need to run string algorithms that require
    + * the actual length of the string in number of characters, you would
    + * need to convert to a wide string representation such as
    + * std::wstring.
    + *
    + * \sa WApplication::messageResourceBundle()
    + * \sa WApplication::locale()
    + */
    +class WT_API WString
    +{
    +public:
    +  /*! \brief Creates an empty string
    +   *
    +   * Create a literal string with empty contents ("").
    +   */
    +  WString();
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Creates a %WString from a wide C string
    +   *
    +   * The wide string is implicitly converted to proper unicode. Note
    +   * that there are known issues with the portability of wchar_t since
    +   * its width and encoding are platform dependent.
    +   */
    +  WString(const wchar_t *value);
    +#endif
    +
    +  /*! \brief Copy constructor
    +   */
    +  WString(const WString& other);
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Creates a %WString from a wide C++ string
    +   *
    +   * The wide string is implicitly converted to proper unicode. Note
    +   * that there are known issues with the portability of wchar_t since
    +   * its width and encoding are platform dependent.
    +   */
    +  WString(const std::wstring& value);
    +#endif
    +
    +  /*! \brief Creates a %WString from a C string.
    +   *
    +   * The C string is implicitly converted to unicode. When
    +   * \p encoding is \link Wt::LocalEncoding LocalEncoding\endlink,
    +   * the current locale is used to interpret the C string. When
    +   * encoding is \link Wt::UTF8 UTF8\endlink, the C string is
    +   * interpreted as a UTF8 encoded unicode string.
    +   */
    +  WString(const char *value, CharEncoding encoding = LocalEncoding);
    +
    +#ifndef WT_NO_STD_LOCALE
    +  /*! \brief Creates a %WString from a C string.
    +   *
    +   * The C string is implicitly converted to unicode. The
    +   * string is interpreted within the character set of the given locale.
    +   */
    +  WString(const char *value, const std::locale &loc);
    +#endif
    +
    +
    +  /*! \brief Creates a %WString from a C++ string.
    +   *
    +   * The C++ string is implicitly converted to unicode. When
    +   * \p encoding is \link Wt::LocalEncoding LocalEncoding\endlink,
    +   * the current locale is used to interpret the C++ string. When
    +   * encoding is \link Wt::UTF8 UTF8\endlink, the C++ string is
    +   * interpreted as a UTF8 encoded unicode string.
    +   */
    +  WString(const std::string& value, CharEncoding encoding = LocalEncoding);
    +
    +#ifndef WT_NO_STD_LOCALE
    +  /*! \brief Creates a %WString from a C++ string.
    +   *
    +   * The C++ string is implicitly converted to unicode. The
    +   * string is interpreted within the character set of the given locale.
    +   */
    +  WString(const std::string& value, const std::locale &loc);
    +#endif
    +
    +  /*! \brief Destructor
    +   */
    +  ~WString();
    +
    +  /*! \brief Assignment operator
    +   *
    +   * Copy another string into this string.
    +   */
    +  WString& operator= (const WString& rhs);
    +
    +  /*! \brief Comparison operator
    +   *
    +   * Compares to strings and returns \c true if the strings are exactly
    +   * the same. This may require evaluating a localized string in the
    +   * current locale.
    +   */
    +  bool operator== (const WString& rhs) const;
    +
    +  /*! \brief Comparison operator
    +   *
    +   * Compares to strings lexicographically. This may require
    +   * evaluating a localized string in the current locale. The unicode
    +   * representation of the strings are compared.
    +   */
    +  bool operator< (const WString& rhs) const;
    +
    +  /*! \brief Comparison operator
    +   *
    +   * Compares to strings lexicographically. This may require
    +   * evaluating a localized string in the current locale. The unicode
    +   * representation of the strings are compared.
    +   */
    +  bool operator> (const WString& rhs) const;
    +
    +  /*! \brief Self-concatenation operator
    +   *
    +   * Appends a string to the current value. If the string was localized,
    +   * this automatically converts it to a literal string, by evaluating the
    +   * string using the current locale.
    +   */
    +  WString& operator+= (const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Self-concatenation operator
    +   *
    +   * Appends a string to the current value. If the string was localized,
    +   * this automatically converts it to a literal string, by evaluating the
    +   * string using the current locale.
    +   */
    +  WString& operator+= (const std::wstring& rhs);
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Self-concatenation operator
    +   *
    +   * Appends a string to the current value. If the string was localized,
    +   * this automatically converts it to a literal string, by evaluating the
    +   * string using the current locale.
    +   */
    +  WString& operator+= (const wchar_t *rhs);
    +#endif
    +
    +  /*! \brief Self-concatenation operator
    +   *
    +   * Appends a string to the current value. The right hand side is
    +   * interpreted in the server locale and converted to unicode. If the
    +   * string was localized, this automatically converts it to a literal
    +   * string, by evaluating the string using the current locale.
    +   */
    +  WString& operator+= (const std::string& rhs);
    +
    +  /*! \brief Self-concatenation operator
    +   *
    +   * Appends a string to the current value. The right hand side is
    +   * interpreted in the server locale and converted to unicode. If the
    +   * string was localized, this automatically converts it to a literal
    +   * string, by evaluating the string using the current locale.
    +   */
    +  WString& operator+= (const char *rhs);
    +
    +  /*! \brief Returns whether the string is empty.
    +   */
    +  bool empty() const;
    +
    +  /*! \brief Creates a %WString from a UTF8 unicode encoded string.
    +   *
    +   * This is equivalent to using the constructor WString(\p value,
    +   * UTF8).
    +   *
    +   * When \p checkValid is \c true, the UTF8 encoding is validated. You
    +   * should enable this only if you cannot trust the origin of the string.
    +   * The library uses this internally whenever it receives data from the
    +   * browser (in UTF-8 format).
    +   */
    +  static WString fromUTF8(const std::string& value, bool checkValid = false);
    +
    +  /*! \brief Creates a %WString from a UTF8 unicode encoded string.
    +   *
    +   * This is equivalent to using the constructor WString(\p value,
    +   * UTF8).
    +   *
    +   * When \p checkValid is \c true, the UTF8 encoding is validated. You
    +   * should enable this only if you cannot trust the origin of the string.
    +   * The library uses this internally whenever it receives data from the
    +   * browser (in UTF-8 format).
    +   */
    +  static WString fromUTF8(const char *value, bool checkValid = false);
    +
    +  /*! \brief Returns the value as a UTF8 unicode encoded string.
    +   *
    +   * For a localized string, returns the current localized value.
    +   *
    +   * \sa fromUTF8()
    +   */
    +  std::string toUTF8() const;
    +
    +  /*! \brief Creates a localized string from a key.
    +   *
    +   * Whenever the value of the string is needed, the key is used for a
    +   * lookup in the application message resource bundles taking into
    +   * account the current application locale. If the key cannot be
    +   * resolved, its value is set to '??key??'.
    +   *
    +   * \sa WApplication::messageResourceBundle(), WApplication::locale(), WApplication::localizedStrings()
    +   */
    +  static WString tr(const char *key);
    +
    +  /*! \brief Creates a localized string with the specified key.
    +   *
    +   * \sa tr(const char *)
    +   */
    +  static WString tr(const std::string& key);
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Returns the value as a wide C++ string.
    +   *
    +   * A localized string is resolved using the WApplication::localizedStrings().
    +   *
    +   * Argument place holders are substitued with actual arguments.
    +   */
    +  std::wstring value() const;
    +#endif
    +
    +  /*! \brief Returns the value as a narrow C++ string.
    +   *
    +   * A localized string is resolved using the WApplication::localizedStrings().
    +   *
    +   * Argument place holders are substitued with actual arguments.
    +   *
    +   * Any wide character is narrowed using the provided locale, possibly
    +   * losing information. If you wish to keep all information, use toUTF8()
    +   * instead, which encodes wide characters in the string.
    +   *
    +   * \sa toUTF8()
    +   */
    +#ifndef WT_NO_STD_LOCALE
    +  std::string narrow(const std::locale &loc = std::locale()) const;
    +#else
    +  std::string narrow() const;
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Returns the value as a wide C++ string.
    +   *
    +   * A localized string is resolved using the WApplication::localizedStrings().
    +   *
    +   * Argument place holders are substitued with actual arguments.
    +   */
    +  operator std::wstring() const;
    +#endif
    +
    +  /*! \brief Retuns whether the string is literal or localized.
    +   *
    +   * \sa tr()
    +   */
    +  bool literal() const { return !impl_ || impl_->key_.empty(); }
    +
    +  /*! \brief Returns the key for a localized string.
    +   *
    +   * When the string is literal, the result is undefined.
    +   */
    +  const std::string key() const;
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Substitutes the next positional argument with a string value.
    +   *
    +   * In the string, the \p n-th argument is referred to as using
    +   * {\p n}.
    +   *
    +   * For example: the string "<tt>{1} bought {2} apples in the
    +   * shop.</tt>" with first argument value "<tt>Bart</tt>" and second
    +   * argument value <tt>5</tt> becomes: "<tt>Bart bought 5 apples in
    +   * the shop.</tt>"
    +   */
    +  WString& arg(const std::wstring& value);
    +#endif
    +
    +  /*! \brief Substitutes the next positional argument with a string value.
    +   *
    +   * In the string, the \p n-th argument is referred to as using
    +   * {\p n}.
    +   *
    +   * For example: the string "<tt>{1} bought {2} apples in the
    +   * shop.</tt>" with first argument value "<tt>Bart</tt>" and second
    +   * argument value <tt>5</tt> becomes: "<tt>Bart bought 5 apples in
    +   * the shop.</tt>"
    +   */
    +  WString& arg(const std::string& value, CharEncoding = LocalEncoding);
    +
    +  WString& arg(const char *value, CharEncoding = LocalEncoding);
    +
    +  /*! \brief Substitutes the next positional argument with a string value.
    +   *
    +   * In the string, the \p n-th argument is referred to as using
    +   * {\p n}.
    +   *
    +   * For example: the string "<tt>{1} bought {2} apples in the
    +   * shop.</tt>" with first argument value "<tt>Bart</tt>" and second
    +   * argument value <tt>5</tt> becomes: "<tt>Bart bought 5 apples in
    +   * the shop.</tt>"
    +   */
    +  WString& arg(const WString& value);
    +
    +  /*! \brief Substitutes the next positional argument with an integer value.
    +   *
    +   * In the string, the \p n-th argument is reffered to as using
    +   * {\p n}.
    +   *
    +   * For example: the string "<tt>{1} bought {2} apples in the
    +   * shop.</tt>" with first argument value "<tt>Bart</tt>" and second
    +   * argument value <tt>5</tt> becomes: "<tt>Bart bought 5 apples in
    +   * the shop.</tt>"
    +   */
    +  WString& arg(int value);
    +
    +  /*! \brief Substitutes the next positional argument with a double value.
    +   *
    +   * In the string, the \p n-th argument is reffered to as using
    +   * {\p n}.
    +   *
    +   * For example: the string "<tt>{1} bought {2} apples in the
    +   * shop.</tt>" with first argument value "<tt>Bart</tt>" and second
    +   * argument value <tt>5</tt> becomes: "<tt>Bart bought 5 apples in
    +   * the shop.</tt>"
    +   */
    +  WString& arg(double value);
    +
    +  /*! \brief Returns the list of arguments
    +   *
    +   * Each argument is UTF8 encoded.
    +   */
    +  const std::vector<std::string>& args() const;
    +
    +  /*! \brief Refreshes the string.
    +   *
    +   * For a localized string, its value is resolved again.
    +   *
    +   * Returns whether the value has (potentially) changed.
    +   */
    +  bool refresh();
    +
    +  /*! \brief Returns the string as a JavaScript literal
    +   *
    +   * The \p delimiter may be a single or double quote.
    +   *
    +   * \sa WWebWidget::jsStringLiteral()
    +   */
    +  std::string jsStringLiteral(char delimiter = '\'') const;
    +
    +#ifdef WT_CNOR
    +  WString& operator+(const char *);
    +  WString& operator+(const WString &);
    +#endif
    +
    +  /*! \brief Comparison operator
    +   *
    +   * Compares to strings and returns \c true if the strings are exactly
    +   * the same. This may require evaluating a localized string in the
    +   * current locale.
    +   */
    +  bool operator!= (const WString& rhs) const { return !(*this == rhs); }
    +
    +  /** \brief An emtpy string.
    +   */
    +  static const WString Empty;
    +
    +  static void checkUTF8Encoding(std::string& value);
    +
    +private:
    +  WString(const char *key, bool);
    +
    +  std::string utf8_;
    +
    +  void resolveKey(const std::string& key, std::string& result) const;
    +
    +  void makeLiteral();
    +
    +  struct Impl {
    +    std::string              key_;
    +    std::vector<std::string> arguments_;
    +  };
    +
    +  static std::vector<std::string> stArguments_;
    +
    +  void createImpl();
    +
    +  Impl *impl_;
    +};
    +
    +#ifndef WT_CNOR
    +
    +/* \brief Short hand for WString(const char * value, UTF8)
    + *
    + * \relates WString
    + */
    +extern WString utf8(const char *value);
    +
    +/* \brief Short hand for WString(const std::string& value, UTF8)
    + *
    + * \relates WString
    + */
    +extern WString utf8(const std::string& value);
    +
    +/*! \brief Concatenate two WStrings
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const WString& lhs, const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Conatenate a WString with a C++ wide string
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const WString& lhs, const std::wstring& rhs);
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Conatenate a WString with a C wide string
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const WString& lhs, const wchar_t *rhs);
    +#endif
    +
    +/*! \brief Conatenate a WStrin with a C++ string
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const WString& lhs, const std::string& rhs);
    +
    +/*! \brief Conatenate a WString with a C string
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const WString& lhs, const char *rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Conatenate a C++ wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const std::wstring& lhs, const WString& rhs);
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Conatenate a C wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const wchar_t *lhs, const WString& rhs);
    +#endif
    +
    +/*! \brief Conatenate a C++ string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const std::string& lhs, const WString& rhs);
    +
    +/*! \brief Conatenate a C string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API WString operator+ (const char *lhs, const WString& rhs);
    +
    +/*! \brief Compare a C string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator== (const char *lhs, const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Compare a C wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator== (const wchar_t *lhs, const WString& rhs);
    +#endif
    +
    +/*! \brief Compare a C++ string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator== (const std::string& lhs, const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Compare a C++ wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator== (const std::wstring& lhs, const WString& rhs);
    +#endif
    +
    +/*! \brief Compare a C string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator!= (const char *lhs, const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Compare a C wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator!= (const wchar_t *lhs, const WString& rhs);
    +#endif
    +
    +/*! \brief Compare a C++ string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator!= (const std::string& lhs, const WString& rhs);
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Compare a C++ wide string with a WString
    + *
    + * \relates WString
    + */
    +extern WT_API bool operator!= (const std::wstring& lhs, const WString& rhs);
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +/*! \brief Output a WString to a C++ wide stream
    + *
    + * \relates WString
    + */
    +extern WT_API std::wostream& operator<< (std::wostream& lhs, const WString& rhs);
    +#endif
    +
    +/*! \brief Output a WString to a C++ stream
    + *
    + * The string is narrowed using the currently global C++ locale, possibly
    + * losing information.
    + * \relates WString
    + */
    +extern WT_API std::ostream& operator<< (std::ostream& lhs, const WString& rhs);
    +#endif // WT_CNOR
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +/*! \brief Alias for %WString (<b>deprecated</b>).
    + *
    + * \deprecated use WString instead.
    + *
    + * %WString provides all the functionality of the now deprecated
    + * WMessage, but is used more consistently through the API.
    + *
    + * \relates WString
    + */
    +typedef WString WMessage;
    +#endif // WT_DEPRECATED_3_0_0
    +
    +}
    +
    +#endif // WSTRING_H_
    diff --git a/wt-3.1.7a/src/Wt/WString.C b/wt-3.1.7a/src/Wt/WString.C
    new file mode 100644
    index 0000000..5db1bc8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WString.C
    @@ -0,0 +1,505 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "rapidxml/rapidxml.hpp"
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WString"
    +#include "Wt/WStringUtil"
    +#include "Wt/WWebWidget"
    +#include "Wt/WCombinedLocalizedStrings"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#ifndef WT_CNOR
    +namespace Wt {
    +
    +std::vector<std::string> WString::stArguments_;
    +const WString WString::Empty;
    +
    +WString::WString()
    +  : impl_(0)
    +{ }
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString::WString(const wchar_t *value)
    +  : impl_(0)
    +{ 
    +  if (value)
    +    utf8_ = Wt::toUTF8(value);
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString::WString(const std::wstring& value)
    +  : impl_(0)
    +{ 
    +  utf8_ = Wt::toUTF8(value);
    +}
    +#endif
    +
    +WString::WString(const char *value, CharEncoding encoding)
    +  : impl_(0)
    +{
    +  if (value) {
    +    if (encoding == UTF8)
    +      utf8_ = value;
    +    else
    +      utf8_ = Wt::toUTF8(value);
    +  }
    +}
    +
    +WString::WString(const std::string& value, CharEncoding encoding)
    +  : impl_(0)
    +{ 
    +  if (encoding == UTF8)
    +    utf8_ = value;
    +  else
    +    utf8_ = Wt::toUTF8(value);
    +}
    +
    +#ifndef WT_NO_STD_LOCALE
    +WString::WString(const char *value, const std::locale& loc)
    +  : impl_(0)
    +{
    +  utf8_ = Wt::toUTF8(value, loc);
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_LOCALE
    +WString::WString(const std::string& value, const std::locale& loc)
    +  : impl_(0)
    +{
    +  utf8_ = Wt::toUTF8(value, loc);
    +}
    +#endif
    +
    +WString::WString(const WString& other)
    +  : utf8_(other.utf8_),
    +    impl_(0)
    +{
    +  if (other.impl_)
    +    impl_ = new Impl(*other.impl_);
    +}
    +
    +WString::~WString()
    +{
    +  delete impl_;
    +}
    +
    +bool WString::operator== (const WString& rhs) const
    +{
    +  return toUTF8() == rhs.toUTF8();
    +}
    +
    +bool WString::operator< (const WString& rhs) const
    +{
    +  return toUTF8() < rhs.toUTF8();
    +}
    +
    +bool WString::operator> (const WString& rhs) const
    +{
    +  return toUTF8() > rhs.toUTF8();
    +}
    +
    +WString& WString::operator= (const WString& rhs)
    +{
    +  if (this != &rhs) {
    +    this->WString::~WString();
    +    new (this) WString(rhs);
    +  }
    +
    +  return *this;
    +}
    +
    +WString& WString::operator+= (const WString& rhs)
    +{
    +  makeLiteral();
    +  utf8_ += rhs.toUTF8();
    +
    +  return *this;
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString& WString::operator+= (const std::wstring& rhs)
    +{
    +  makeLiteral();
    +  utf8_ += Wt::toUTF8(rhs);
    +
    +  return *this;
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString& WString::operator+= (const wchar_t *rhs)
    +{
    +  makeLiteral();
    +  utf8_ += Wt::toUTF8(rhs);
    +
    +  return *this;
    +}
    +#endif
    +
    +WString& WString::operator+= (const std::string& rhs)
    +{
    +  makeLiteral();
    +  utf8_ += Wt::toUTF8(rhs);
    +
    +  return *this;
    +}
    +
    +WString& WString::operator+= (const char *rhs)
    +{
    +  makeLiteral();
    +  utf8_ += Wt::toUTF8(rhs);
    +
    +  return *this;
    +}
    +
    +bool WString::empty() const
    +{
    +  if (literal())
    +    return utf8_.empty();
    +  else
    +    return toUTF8().empty();
    +}
    +
    +WString WString::fromUTF8(const std::string& value, bool checkValid)
    +{
    +  WString result(value, UTF8);
    +  if (checkValid)
    +    checkUTF8Encoding(result.utf8_);
    +  return result;
    +}
    +
    +WString WString::fromUTF8(const char *value, bool checkValid)
    +{
    +  WString result(value, UTF8);
    +  if (checkValid)
    +    checkUTF8Encoding(result.utf8_);
    +  return result;
    +}
    +
    +void WString::checkUTF8Encoding(std::string& value)
    +{
    +  const char *c = value.c_str();
    +  for (; c != value.c_str() + value.length();) {
    +    const char *at = c;
    +    try {
    +      char *dest = 0;
    +      rapidxml::xml_document<>::copy_check_utf8(c, dest);
    +    } catch (rapidxml::parse_error& e) {
    +      for (const char *i = at; i < c; ++i)
    +	value[i - value.c_str()] = '?';
    +    }
    +  }
    +}
    +
    +void WString::resolveKey(const std::string& key, std::string& result) const
    +{
    +  if ((!wApp) ||
    +      !wApp->localizedStrings_->resolveKey(impl_->key_, result))
    +    result = "??" + key + "??";
    +}
    +
    +std::string WString::toUTF8() const
    +{
    +  if (impl_) {
    +    std::string result = utf8_;
    +
    +    if (!impl_->key_.empty())
    +      resolveKey(impl_->key_, result);
    +
    +    for (unsigned i = 0; i < impl_->arguments_.size(); ++i) {
    +      std::string key = '{' + boost::lexical_cast<std::string>(i+1) + '}';
    +      Wt::Utils::replace(result, key, impl_->arguments_[i]);
    +    }
    +
    +    return result;
    +  } else
    +    return utf8_;
    +}
    +
    +WString WString::tr(const char *key)
    +{
    +  return WString(key, true);
    +}
    +
    +WString WString::tr(const std::string& key)
    +{
    +  return WString(key.c_str(), true);
    +}
    +
    +WString::WString(const char *key, bool)
    +{
    +  impl_ = new Impl;
    +  impl_->key_ = key;
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +std::wstring WString::value() const
    +{
    +  return Wt::fromUTF8(toUTF8());
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_LOCALE
    +std::string WString::narrow(const std::locale &loc) const
    +{
    +  return Wt::fromUTF8(toUTF8(), loc);
    +}
    +#else
    +std::string WString::narrow() const
    +{
    +  return Wt::fromUTF8(toUTF8(), LocalEncoding);
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString::operator std::wstring() const
    +{
    +  return value();
    +}
    +#endif
    +
    +const std::string WString::key() const
    +{
    +  if (impl_)
    +    return impl_->key_;
    +  else
    +    return std::string();
    +}
    +
    +void WString::createImpl()
    +{
    +  if (!impl_)
    +    impl_ = new Impl();
    +}
    +
    +WString& WString::arg(const std::string& value, CharEncoding encoding)
    +{
    +  createImpl();
    +
    +  if (encoding == UTF8) {
    +    impl_->arguments_.push_back(value);
    +    checkUTF8Encoding(impl_->arguments_.back());
    +  } else
    +    impl_->arguments_.push_back(Wt::toUTF8(value));
    +
    +  return *this;
    +}
    +
    +WString& WString::arg(const char *value, CharEncoding encoding)
    +{
    +  return arg(std::string(value), encoding);
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString& WString::arg(const std::wstring& value)
    +{
    +  createImpl();
    +
    +  impl_->arguments_.push_back(Wt::toUTF8(value));
    +
    +  return *this;
    +}
    +#endif
    +
    +WString& WString::arg(const WString& value)
    +{
    +  createImpl();
    +
    +  impl_->arguments_.push_back(value.toUTF8());
    +
    +  return *this;
    +}
    +
    +WString& WString::arg(int value)
    +{
    +  createImpl();
    +
    +  impl_->arguments_.push_back(boost::lexical_cast<std::string>(value));
    +
    +  return *this;
    +}
    +
    +WString& WString::arg(double value)
    +{
    +  createImpl();
    +
    +  impl_->arguments_.push_back(boost::lexical_cast<std::string>(value));
    +
    +  return *this;
    +}
    +
    +bool WString::refresh()
    +{
    +  if (literal())
    +    return false;
    +  else
    +    return true;
    +}
    +
    +const std::vector<std::string>& WString::args() const
    +{
    +  if (impl_)
    +    return impl_->arguments_;
    +  else
    +    return stArguments_;
    +}
    +
    +WString utf8(const char *value)
    +{
    +  return WString(value, UTF8);
    +}
    +
    +WString utf8(const std::string& value)
    +{
    +  return WString(value, UTF8);
    +}
    +
    +std::string WString::jsStringLiteral(char delimiter) const
    +{
    +  return WWebWidget::jsStringLiteral(toUTF8(), delimiter);
    +}
    +
    +WString operator+ (const WString& lhs, const WString& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString operator+ (const WString& lhs, const std::wstring& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString operator+ (const WString& lhs, const wchar_t *rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +#endif
    +
    +WString operator+ (const WString& lhs, const std::string& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +
    +WString operator+ (const WString& lhs, const char *rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString operator+ (const std::wstring& lhs, const WString& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +WString operator+ (const wchar_t *lhs, const WString& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +#endif
    +
    +WString operator+ (const std::string& lhs, const WString& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +
    +WString operator+ (const char *lhs, const WString& rhs)
    +{
    +  WString result = lhs;
    +  return result += rhs;
    +}
    +
    +bool operator== (const char *lhs, const WString& rhs)
    +{
    +  return rhs == lhs;
    +}
    +
    +bool operator== (const std::string& lhs, const WString& rhs)
    +{
    +  return rhs == lhs;
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +bool operator== (const std::wstring& lhs, const WString& rhs)
    +{
    +  return rhs == lhs;
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +bool operator== (const wchar_t *lhs, const WString& rhs)
    +{
    +  return rhs == lhs;
    +}
    +#endif
    +
    +
    +bool operator!= (const char *lhs, const WString& rhs)
    +{
    +  return !(rhs == lhs);
    +}
    +
    +bool operator!= (const std::string& lhs, const WString& rhs)
    +{
    +  return !(rhs == lhs);
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +bool operator!= (const std::wstring& lhs, const WString& rhs)
    +{
    +  return !(rhs == lhs);
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +bool operator!= (const wchar_t *lhs, const WString& rhs)
    +{
    +  return !(rhs == lhs);
    +}
    +#endif
    +
    +void WString::makeLiteral()
    +{
    +  if (!literal()) {
    +    resolveKey(impl_->key_, utf8_);
    +    impl_->key_ = std::string();
    +  }
    +}
    +
    +#ifndef WT_NO_STD_WSTRING
    +std::wostream& operator<< (std::wostream& lhs, const WString& rhs)
    +{
    +  return lhs << rhs.value();
    +}
    +#endif
    +
    +std::ostream& operator<< (std::ostream& lhs, const WString& rhs)
    +{
    +  return lhs << rhs.narrow();
    +}
    +
    +}
    +
    +#endif // WT_CNOR
    +
    diff --git a/wt-3.1.7a/src/Wt/WStringListModel b/wt-3.1.7a/src/Wt/WStringListModel
    new file mode 100644
    index 0000000..d3be1a0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStringListModel
    @@ -0,0 +1,114 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSTRING_LIST_MODEL_H_
    +#define WSTRING_LIST_MODEL_H_
    +
    +#include <Wt/WAbstractListModel>
    +
    +namespace Wt {
    +
    +/*! \class WStringListModel Wt/WStringListModel Wt/WStringListModel
    + *  \brief An model that manages a list of strings.
    + *
    + * This model only manages a unidimensional list of strings. It is
    + * used as the default model for view classes that show a
    + * list.
    + *
    + * The model only presents \link Wt::DisplayRole DisplayRole\endlink
    + * data of a single column of data, but otherwise provides support for
    + * all standard features of a model, including editing and addition
    + * and removal of data rows.
    + *
    + * You can populate the model by passing a list of strings to its
    + * consructor, or by using the setStringList() method. You can set or
    + * retrieve data using the setData() and data() methods, and add or
    + * remove data using the insertRows() and removeRows() methods.
    + *
    + * \if cpp
    + * \sa WComboBox, WSelectionBox, Ext::ComboBox
    + * \elseif java
    + * \sa WComboBox, WSelectionBox
    + * \endif
    + *
    + * \ingroup modelview
    + */
    +class WT_API WStringListModel : public WAbstractListModel
    +{
    +public:
    +  /*! \brief Creates a new empty string list model.
    +   */
    +  WStringListModel(WObject *parent = 0);
    +
    +  /*! \brief Creates a new string list model.
    +   */
    +  WStringListModel(const std::vector<WString>& strings, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WStringListModel();
    +
    +  /*! \brief Sets a new string list.
    +   *
    +   * Replaces the current string list with a new list.
    +   *
    +   * \sa dataChanged()
    +   * \sa addString()
    +   */
    +  void setStringList(const std::vector<WString>& strings);
    +
    +  /*! \brief Inserts a string.
    +   *
    +   * \sa setStringList()
    +   */
    +  void insertString(int row, const WString& string);
    +
    +  /*! \brief Adds a string.
    +   *
    +   * \sa setStringList()
    +   */
    +  void addString(const WString& string);
    +
    +  /*! \brief Returns the string list.
    +   *
    +   * \sa setStringList()
    +   */
    +  const std::vector<WString>& stringList() const { return strings_; }
    +
    +  /*! \brief Returns the flags for an item.
    +   *
    +   * This method is reimplemented to return \link Wt::ItemIsSelectable
    +   * ItemIsSelectable\endlink | \link Wt::ItemIsEditable
    +   * ItemIsEditable\endlink.
    +   *
    +   * \sa Wt::ItemFlag
    +   */
    +  virtual WFlags<ItemFlag> flags(const WModelIndex& index) const;
    +
    +  using WAbstractListModel::setData;
    +  virtual bool setData(const WModelIndex& index, const boost::any& value,
    +		       int role = EditRole);
    +
    +  virtual boost::any data(const WModelIndex& index, int role = DisplayRole)
    +    const;
    +
    +  virtual int rowCount(const WModelIndex& parent = WModelIndex()) const;
    +
    +  virtual bool insertRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  virtual bool removeRows(int row, int count,
    +			  const WModelIndex& parent = WModelIndex());
    +
    +  virtual void sort(int column, SortOrder order = AscendingOrder);
    +
    +private:
    +  std::vector<WString> strings_;
    +};
    +
    +}
    +
    +#endif // WSTRING_LIST_MODEL_H_
    diff --git a/wt-3.1.7a/src/Wt/WStringListModel.C b/wt-3.1.7a/src/Wt/WStringListModel.C
    new file mode 100644
    index 0000000..ac912c3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStringListModel.C
    @@ -0,0 +1,126 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <Wt/WStringListModel>
    +#include <Utils.h>
    +
    +#include <functional>
    +
    +namespace Wt {
    +
    +WStringListModel::WStringListModel(WObject *parent)
    +  : WAbstractListModel(parent)
    +{ }
    +
    +WStringListModel::WStringListModel(const std::vector<WString>& strings,
    +				   WObject *parent)
    +  : WAbstractListModel(parent),
    +    strings_(strings)
    +{ }
    +
    +WStringListModel::~WStringListModel()
    +{ }
    +
    +void WStringListModel::setStringList(const std::vector<WString>& strings)
    +{
    +  int currentSize = strings_.size();
    +  int newSize = strings.size();
    +
    +  if (newSize > currentSize)
    +    beginInsertRows(WModelIndex(), currentSize, newSize - 1);
    +  else if (newSize < currentSize)
    +    beginRemoveRows(WModelIndex(), newSize, currentSize - 1);
    +
    +  strings_ = strings;
    +
    +  if (newSize > currentSize)
    +    endInsertRows();
    +  else if (newSize < currentSize)
    +    endRemoveRows();
    +
    +  int numChanged = std::min(currentSize, newSize);
    +
    +  if (numChanged)
    +    dataChanged().emit(index(0, 0), index(numChanged - 1, 0));
    +}
    +
    +void WStringListModel::addString(const WString& string)
    +{
    +  insertString(rowCount(), string);
    +}
    +
    +void WStringListModel::insertString(int row, const WString& string)
    +{
    +  insertRows(row, 1);
    +  setData(row, 0, string);
    +}
    +
    +int WStringListModel::rowCount(const WModelIndex& parent) const
    +{
    +  return parent.isValid() ? 0 : strings_.size();
    +}
    +
    +boost::any WStringListModel::data(const WModelIndex& index, int role) const
    +{
    +  return role == DisplayRole ? boost::any(strings_[index.row()]) : boost::any();
    +}
    +
    +bool WStringListModel::setData(const WModelIndex& index,
    +			       const boost::any& value, int role)
    +{
    +  if (role == EditRole)
    +    role = DisplayRole;
    +
    +  if (role == DisplayRole) {
    +    strings_[index.row()] = asString(value);
    +    dataChanged().emit(index, index);
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +WFlags<ItemFlag> WStringListModel::flags(const WModelIndex& index) const
    +{
    +  return ItemIsSelectable | ItemIsEditable;
    +}
    +
    +bool WStringListModel::insertRows(int row, int count, const WModelIndex& parent)
    +{
    +  if (!parent.isValid()) {
    +    beginInsertRows(parent, row, row + count - 1);
    +    strings_.insert(strings_.begin() + row, count, WString());
    +    endInsertRows();
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +bool WStringListModel::removeRows(int row, int count, const WModelIndex& parent)
    +{
    +  if (!parent.isValid()) {
    +    beginRemoveRows(parent, row, row + count - 1);
    +    strings_.erase(strings_.begin() + row, strings_.begin() + row + count);
    +    endRemoveRows();
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void WStringListModel::sort(int column, SortOrder order)
    +{
    +  layoutAboutToBeChanged().emit();
    +
    +  if (order == AscendingOrder)
    +    Utils::sort(strings_);
    +  else
    +    Utils::sort(strings_, std::greater<WString>());
    +
    +  layoutChanged().emit();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WStringUtil b/wt-3.1.7a/src/Wt/WStringUtil
    new file mode 100644
    index 0000000..f3411da
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStringUtil
    @@ -0,0 +1,143 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef WSTRING_UTIL_H_
    +#define WSTRING_UTIL_H_
    +
    +#include <string>
    +#include <Wt/WDllDefs.h>
    +#ifndef WT_NO_STD_LOCALE
    +#include <locale>
    +#endif
    +
    +namespace Wt {
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Convert a narrow to a wide string.
    +   *
    +   * Convert a narrow string to a wide string. This method will interpret
    +   * the input string as being encoded in the given locale (by default the
    +   * currently configured global C++ locale).
    +   *
    +   * \sa narrow(const std::wstring&), fromUTF8(const std::string& s)
    +   *
    +   * \relates WString
    +   */
    +#ifndef WT_NO_STD_LOCALE
    +  extern WT_API std::wstring widen(const std::string& s,
    +      const std::locale &loc = std::locale());
    +#else
    +  extern WT_API std::wstring widen(const std::string& s);
    +#endif // WT_NO_STD_LOCALE
    +#endif // WT_NO_STD_WSTRING
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Convert a wide to a narrow string.
    +   *
    +   * Convert a wide string to a narrow string. This method will encode
    +   * the characters in the given locale, if possible.
    +   *
    +   * In general this will lead to a loss of information. If you wish to
    +   * preserve all information, you should us toUTF8() instead.
    +   *
    +   * \sa widen(const std::string&), toUTF8(const std::wstring& s)
    +   *
    +   * \relates WString
    +   */
    +#ifndef WT_NO_STD_LOCALE
    +  extern WT_API std::string narrow(const std::wstring& s,
    +      const std::locale &loc = std::locale());
    +#else
    +  extern WT_API std::string narrow(const std::wstring& s);
    +#endif // WT_NO_STD_LOCALE
    +#endif // WT_NO_STD_WSTRING
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Decode a UTF8 string a wide string.
    +   *
    +   * Decode a UTF8 string to a wide string. In a UTF8 encoded unicode string,
    +   * some unicode characters are represented in more than one byte.
    +   * This method will decode to extract the proper unicode characters from
    +   * the string. The resulting string may thus be shorter (has less characters)
    +   * than the original, but does not lead to a loss of information.
    +   *
    +   * \sa toUTF8(const std::string& s), narrow(const std::wstring&)
    +   *
    +   * \relates WString
    +   */
    +  extern WT_API std::wstring fromUTF8(const std::string& s);
    +#endif // WT_NO_STD_WSTRING
    +
    +  /*! \brief Decode a UTF8 string into a (narrow) string.
    +   *
    +   * Decode a UTF8 string to a normal string.
    +   * Not all Unicode characters can be represented in a narrow string,
    +   * and quite a lot characters will have no equivalent in the target
    +   * character set, so you may loose information.
    +   *
    +   * To distinguish from the other fromUTF8() function, that returns a
    +   * wstring, the locale is not an optional argument, as in most other
    +   * locale-conversing functions. You may choose to use the
    +   * default-constructed std::locale().
    +   *
    +   * \sa toUTF8(const std::string& s, const std::locale &),
    +   *     fromUTF8(const std::string& s)
    +   *
    +   * \relates WString
    +   */
    +#ifndef WT_NO_STD_LOCALE
    +  extern WT_API std::string fromUTF8(const std::string& s,
    +      const std::locale &loc);
    +#else
    +  // in order to be unambiguous with the fromUTF8 function that returns a
    +  // wstring, this version takes an extra CharEncoding parameter.
    +  extern WT_API std::string fromUTF8(const std::string& s,
    +      CharEncoding encoding);
    +#endif
    +
    +#ifndef WT_NO_STD_WSTRING
    +  /*! \brief Encode a wide string to UTF8.
    +   *
    +   * Convert a wide string to UTF8. This method will encode the given
    +   * wide string in UTF8. This may result in a string that is possibly
    +   * longer (has more characters), but does not lead to a loss of
    +   * information.
    +   *
    +   * \sa fromUTF8(const std::string& s), narrow(const std::wstring&) 
    +   *
    +   * \relates WString
    +   */
    +  extern WT_API std::string toUTF8(const std::wstring& s);
    +#endif // WT_NO_STD_WSTRING
    +
    +  /*! \brief Encode an character string (encoding known) to UTF8.
    +   *
    +   * Convert a char * string to UTF8. This method will encode the given
    +   * string in UTF8, assuming that the original string was encoded in the
    +   * given locale. This conversion does not lead to a loss of information.
    +   *
    +   * The reverse operation is in principle narrow(fromUTF8(str), locale).
    +   *
    +   * Do not call this function multiple times: toUTF8(toUTF8(str)) is
    +   * meaningless.
    +   *
    +   * \sa toUTF8(const std::wstring& s), fromUTF8(const std::string &),
    +   * narrow(const std::wstring&) 
    +   *
    +   * \relates WString
    +   */
    +#ifndef WT_NO_STD_LOCALE
    +  extern WT_API std::string toUTF8(const std::string& s,
    +      const std::locale &loc = std::locale());
    +#else
    +  extern WT_API std::string toUTF8(const std::string& s);
    +#endif
    +
    +  // Following is WT_API for testing
    +  std::string WT_API UTF8Substr(const std::string &s, int begin, int length);
    +}
    +
    +#endif // WSTRING_UTIL_H_
    diff --git a/wt-3.1.7a/src/Wt/WStringUtil.C b/wt-3.1.7a/src/Wt/WStringUtil.C
    new file mode 100644
    index 0000000..e369806
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WStringUtil.C
    @@ -0,0 +1,330 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WStringUtil"
    +
    +#include "WtException.h"
    +#include "rapidxml/rapidxml.hpp"
    +
    +#ifndef WT_NO_STD_LOCALE
    +#include <locale>
    +#endif
    +
    +namespace Wt {
    +
    +#ifndef WT_NO_STD_LOCALE
    +std::wstring widen(const std::string& s, const std::locale &loc)
    +{
    +  typedef std::codecvt<wchar_t, char, std::mbstate_t> Cvt;
    +
    +  const Cvt& myfacet = std::use_facet<Cvt>(loc);
    +
    +  Cvt::result myresult;
    +
    +  std::size_t size = s.length();
    +  wchar_t *pwstr = new wchar_t[size + 1];
    +
    +  const char* pc = s.c_str();
    +  wchar_t* pwc = pwstr;
    +
    +  std::mbstate_t mystate = std::mbstate_t();
    +  bool error = false;
    +
    +  for (;;) {
    +    myresult = myfacet.in(mystate, pc, s.c_str() + size, pc,
    +			  pwc, pwstr + size + 1, pwc);
    +
    +    if (myresult != Cvt::ok) {
    +      *pwc++ = L'?';
    +      pc++;
    +
    +      error = true;
    +    } else
    +      break;
    +  }
    +
    +  if (error) {
    +    if (WApplication::instance())
    +      WApplication::instance()->log("error")
    +	<< "WString::widen(): could not widen string: " << s;
    +    else
    +      std::cerr << "WString::widen(): could not widen string: "
    +		<< s << std::endl;
    +  }
    +
    +  std::wstring result = std::wstring(pwstr, pwc - pwstr);
    +  delete[] pwstr;
    +
    +  return result;
    +}
    +#else
    +// Assumes pure ASCII-7 encoding. The wstring will be UCS encoded.
    +std::wstring widen(const std::string& s)
    +{
    +  std::wstring retval;
    +  for(unsigned int i = 0; i < s.size(); ++i) {
    +    if (s[i] & 0x80)
    +      retval.push_back('?'); // invalid ASCII character
    +    else
    +      retval.push_back(s[i]); // ASCII-7 doesn't change in unicode
    +  }
    +  return retval;
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_LOCALE
    +std::string narrow(const std::wstring& s, const std::locale &loc)
    +{
    +  typedef std::codecvt<wchar_t, char, std::mbstate_t> Cvt;
    +
    +  const Cvt& myfacet = std::use_facet<Cvt>(loc);
    +
    +  Cvt::result myresult;
    +
    +  const wchar_t *pwstr = s.c_str();
    +  const wchar_t *pwend = s.c_str() + s.length();
    +  const wchar_t *pwc = pwstr;
    +
    +  int size = s.length() + 1;
    +
    +  char *pstr = new char [size];
    +  char *pc = pstr;
    +
    +  std::mbstate_t mystate = std::mbstate_t();
    +  bool error = false;
    +
    +  for (;;) {
    +    myresult = myfacet.out(mystate, pwc, pwend, pwc, pc, pc + size, pc);
    +
    +    if (myresult == Cvt::ok) {
    +      break;
    +    } else {
    +      if (myresult == Cvt::partial || pc >= pstr + size) {
    +	size += s.length();
    +	std::size_t sofar = pc - pstr;
    +	pstr = (char *)std::realloc(pstr, size);
    +	pc = pstr + sofar;
    +      }
    +
    +      if (myresult == Cvt::error) {
    +	*pc++ = '?';
    +	pwc++;
    +	error = true;
    +      }
    +    }
    +  }
    +
    +  std::string result(pstr, pc - pstr);
    +
    +  if (error) {
    +    if (WApplication::instance())
    +      WApplication::instance()->log("warning")
    +	<< "WString::narrow(): loss of detail: " << result;
    +    else
    +      std::cerr << "WString::narrow(): loss of detail: " << result << std::endl;
    +  }
    +
    +  delete[] pstr;
    +
    +  return result;
    +}
    +#else
    +std::string narrow(const std::wstring& s)
    +{
    +  std::string retval;
    +  for (unsigned int i = 0; i < s.size(); ++i) {
    +    if (retval[i] < 128)
    +      retval.push_back(s[i]);
    +    else
    +      retval.push_back('?');
    +  }
    +  return retval;
    +}
    +#endif
    +
    +std::string toUTF8(const std::wstring& s)
    +{
    +  std::string result;
    +  result.reserve(s.length() * 3);
    +
    +  char buf[4];
    +  for (std::wstring::const_iterator i = s.begin(); i != s.end(); ++i) {
    +    char *end = buf;
    +    try {
    +      rapidxml::xml_document<>::insert_coded_character<0>(end, *i);
    +      for (char *b = buf; b != end; ++b)
    +	result += *b;
    +    } catch (rapidxml::parse_error& e) {
    +      if (WApplication::instance())
    +	WApplication::instance()->log("error") << e.what();
    +      else
    +	std::cerr << "WString::toUTF8(): " << e.what() << std::endl;
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +std::wstring fromUTF8(const std::string& s)
    +{
    +  std::wstring result;
    +  result.reserve(s.length());
    +
    +  for (unsigned i = 0; i < s.length(); ++i) {
    +    bool legal = false;
    +    if ((unsigned char)s[i] <= 0x7F) {
    +      unsigned char c = s[i];
    +      if (c == 0x09 || c == 0x0A || c == 0x0D || c >= 0x20) {
    +	result += (wchar_t)(c);
    +	legal = true;
    +      }
    +    } else if ((unsigned char)s[i] >= 0xF0) {
    +      if (i + 3 < s.length()) {
    +	if ((
    +	     // F0 90-BF 80-BF 80-BF
    +	     (                                    (unsigned char)s[i] == 0xF0)
    +	     && (0x90 <= (unsigned char)s[i+1] && (unsigned char)s[i+1] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+2] && (unsigned char)s[i+2] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+3] && (unsigned char)s[i+3] <= 0xBF)
    +	     ) ||
    +	    (
    +	     // F1-F3 80-BF 80-BF 80-BF
    +	     (   0xF1 <= (unsigned char)s[i]   && (unsigned char)s[i] <= 0xF3)
    +	     && (0x80 <= (unsigned char)s[i+1] && (unsigned char)s[i+1] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+2] && (unsigned char)s[i+2] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+3] && (unsigned char)s[i+3] <= 0xBF)
    +	     )) {
    +	  legal = true;
    +
    +	  wchar_t wc = ((unsigned char)s[i]) & 0x0F;
    +	  for (unsigned j = 1; j < 4; ++j) {
    +	    wc <<= 6;
    +	    wc |= ((unsigned char)s[i+j]) & 0x3F;
    +	  }
    +
    +	  result += wc;
    +	}
    +      }
    +      i += 3;
    +    } else if ((unsigned char)s[i] >= 0xE0) {
    +      if (i + 2 < s.length()) {
    +	if ((
    +	     // E0 A0*-BF 80-BF
    +	     (                                    (unsigned char)s[i] == 0xE0)
    +	     && (0xA0 <= (unsigned char)s[i+1] && (unsigned char)s[i+1] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+2] && (unsigned char)s[i+2] <= 0xBF)
    +	     ) ||
    +	    (
    +	     // E1-EF 80-BF 80-BF
    +	     (   0xE1 <= (unsigned char)s[i]   && (unsigned char)s[i] <= 0xF1)
    +	     && (0x80 <= (unsigned char)s[i+1] && (unsigned char)s[i+1] <= 0xBF)
    +	     && (0x80 <= (unsigned char)s[i+2] && (unsigned char)s[i+2] <= 0xBF)
    +	     )) {
    +	  legal = true;
    +
    +	  wchar_t wc = ((unsigned char)s[i]) & 0x1F;
    +	  for (unsigned j = 1; j < 3; ++j) {
    +	    wc <<= 6;
    +	    wc |= ((unsigned char)s[i+j]) & 0x3F;
    +	  }
    +
    +	  result += wc;
    +	}
    +      }
    +      i += 2;
    +    } else if ((unsigned char)s[i] >= 0xC0) {
    +      if (i + 1 < s.length()) {
    +	if (
    +	    // C2-DF 80-BF
    +	    (   0xC2 <= (unsigned char)s[i]   && (unsigned char)s[i] <= 0xDF)
    +	    && (0x80 <= (unsigned char)s[i+1] && (unsigned char)s[i+1] <= 0xBF)
    +	    ) {
    +	  legal = true;
    +
    +	  wchar_t wc = ((unsigned char)s[i]) & 0x3F;
    +	  for (unsigned j = 1; j < 2; ++j) {
    +	    wc <<= 6;
    +	    wc |= ((unsigned char)s[i+j]) & 0x3F;
    +	  }
    +
    +	  result += wc;
    +	}
    +      }
    +      i += 1;
    +    }
    +
    +    if (!legal)
    +      result += (wchar_t)0xFFFD;
    +  }
    +
    +  return result;
    +}
    +
    +#ifndef WT_NO_STD_LOCALE
    +std::string fromUTF8(const std::string& s, const std::locale &loc)
    +{
    +  return narrow(fromUTF8(s), loc);
    +}
    +#else
    +std::string fromUTF8(const std::string& s, CharEncoding encoding)
    +{
    +  switch(encoding) {
    +    case LocalEncoding: return narrow(fromUTF8(s));
    +    case UTF8: return s;
    +  }
    +}
    +#endif
    +
    +#ifndef WT_NO_STD_LOCALE
    +std::string toUTF8(const std::string& s, const std::locale &loc)
    +{
    +  return toUTF8(widen(s, loc));
    +}
    +#else
    +std::string toUTF8(const std::string& s)
    +{
    +  return toUTF8(widen(s));
    +}
    +#endif
    +
    +std::string UTF8Substr(const std::string &s, int begin, int length)
    +{
    +  std::string retval;
    +  // pos, beginPos and endPos refer to byte positions in s
    +  unsigned pos = 0;
    +  unsigned beginPos = 0;
    +  unsigned endPos = -1;
    +
    +  for(int i = 0; i < begin && pos < s.size(); ++i) {
    +    unsigned char c = s[pos];
    +    if ((c & 0x80) == 0x0) pos++;
    +    else if ((c & 0xe0) == 0xc0) pos += 2;
    +    else if ((c & 0xf0) == 0xe0) pos += 3;
    +    else if ((c & 0xf8) == 0xf0) pos += 4;
    +    else pos++; // invalid!
    +  }
    +  beginPos = pos;
    +
    +  if (length != -1) {
    +    for(int i = 0; i < length && pos < s.size(); ++i) {
    +      unsigned char c = s[pos];
    +      if ((c & 0x80) == 0x0) pos++;
    +      else if ((c & 0xe0) == 0xc0) pos += 2;
    +      else if ((c & 0xf0) == 0xe0) pos += 3;
    +      else if ((c & 0xf8) == 0xf0) pos += 4;
    +      else pos++; // invalid!
    +    }
    +    endPos = pos;
    +    return s.substr(beginPos, endPos - beginPos);
    +  } else {
    +    endPos = -1;
    +    return s.substr(beginPos, std::string::npos);
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSubMenuItem b/wt-3.1.7a/src/Wt/WSubMenuItem
    new file mode 100644
    index 0000000..d46da99
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSubMenuItem
    @@ -0,0 +1,95 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSUB_MENU_ITEM_H_
    +#define WSUB_MENU_ITEM_H_
    +
    +#include <Wt/WMenuItem>
    +
    +namespace Wt {
    +
    +  class WMenu;
    +
    +/*! \brief A menu item that contains a nested sub menu.
    + *
    + * This class specializes menu item to have an optional sub menu.
    + *
    + * When the item is shown and hidden when the item is selected
    + * respectively deselected.
    + * 
    + * \if cpp
    + * Usage example:
    + * \code
    + * // create the stack where the contents will be located
    + * Wt::WStackedWidget *contents = new Wt::WStackedWidget();
    + *
    + * // create a top-level menu
    + * Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical);
    + *
    + * // add two plain items
    + * menu->addItem("Introduction", new Wt::WText(tr("intro"));
    + * menu->addItem("Download", new Wt::WText("Not yet available"));
    +
    + * // add an item with a sub menu
    + * Wt::WSubMenuItem *examples = new Wt::WSubMenuItem("Examples", new Wt::WText(tr("examples")));
    + * Wt::WMenu *examplesMenu = new Wt::WMenu(contents, Wt::Vertical);
    + * examplesMenu->addItem("Hello world", new Wt::WText(tr("example.hello-world")));
    + * examplesMenu->addItem("Shopping cart", new Wt::WText(tr("example.shopping")));
    + * examples->setSubMenu(examplesMenu);
    + * menu->addItem(examples);
    + *
    + * addWidget(menu);
    + * addWidget(contents);
    + * \endcode
    + * \endif
    + *
    + * \sa WMenuItem, WMenu
    + */
    +class WT_API WSubMenuItem : public WMenuItem
    +{
    +public:
    +  /*! \brief Creates a new item.
    +   *
    +   * \sa WMenuItem::WMenuItem(const WString&, WWidget *, LoadPolicy)
    +   */
    +  WSubMenuItem(const WString& text, WWidget *contents,
    +	       LoadPolicy policy = LazyLoading);
    +
    +  /*! \brief Sets a sub menu.
    +   *
    +   * Ownership of the \p subMenu is transferred to the item. In
    +   * most cases, the sub menu would use the same contents stack as the
    +   * parent menu.
    +   *
    +   * The default submenu is \c 0, in which case the item behaves as a
    +   * plain WMenuItem.
    +   *
    +   * \note A sub menu can only be set before the item is added to a menu.
    +   */
    +  void setSubMenu(WMenu *subMenu);
    +
    +  /*! \brief Returns the sub menu.
    +   *
    +   * \sa setSubMenu()
    +   */
    +  WMenu *subMenu() { return subMenu_; }
    +
    +  virtual std::string pathComponent() const;
    +
    +protected:
    +  virtual WWidget *createItemWidget();
    +  virtual void updateItemWidget(WWidget *itemWidget);
    +  virtual void renderSelected(bool selected);
    +  virtual SignalBase& activateSignal();
    +  virtual void setFromInternalPath(const std::string& path);
    +
    +private:
    +  WMenu *subMenu_;
    +};
    +
    +}
    +
    +#endif // SUB_MENU_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WSubMenuItem.C b/wt-3.1.7a/src/Wt/WSubMenuItem.C
    new file mode 100644
    index 0000000..69eabca
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSubMenuItem.C
    @@ -0,0 +1,82 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <iostream>
    +
    +#include <Wt/WContainerWidget>
    +#include <Wt/WMenu>
    +#include <Wt/WSubMenuItem>
    +
    +namespace Wt {
    +
    +WSubMenuItem::WSubMenuItem(const WString& text, WWidget *contents,
    +			   LoadPolicy policy)
    +  : WMenuItem(text, contents, policy)
    +{ }
    +
    +void WSubMenuItem::setSubMenu(WMenu *subMenu)
    +{
    +  subMenu_ = subMenu;
    +}
    +
    +WWidget *WSubMenuItem::createItemWidget()
    +{
    +  if (subMenu_) {
    +    WContainerWidget *contents = new WContainerWidget();
    +    WWidget *anchor = WMenuItem::createItemWidget();
    +    contents->addWidget(anchor);
    +    contents->addWidget(subMenu_);
    +    subMenu_->hide();
    +
    +    return contents;
    +  } else
    +    return WMenuItem::createItemWidget();
    +}
    +
    +void WSubMenuItem::updateItemWidget(WWidget *itemWidget)
    +{
    +  if (subMenu_) {
    +    WContainerWidget *contents = dynamic_cast<WContainerWidget *>(itemWidget);
    +    WWidget *anchor = contents->widget(0);
    +    WMenuItem::updateItemWidget(anchor);
    +  } else
    +    WMenuItem::updateItemWidget(itemWidget);
    +}
    +
    +void WSubMenuItem::renderSelected(bool selected)
    +{
    +  if (subMenu_)
    +    subMenu_->setHidden(!selected);
    +
    +  WMenuItem::renderSelected(selected);
    +}
    +
    +SignalBase& WSubMenuItem::activateSignal()
    +{
    +  if (subMenu_) {
    +    WContainerWidget *contents = dynamic_cast<WContainerWidget *>(itemWidget());
    +    WInteractWidget *wi = dynamic_cast<WInteractWidget *>
    +      (contents->widget(0)->webWidget());
    +
    +    return wi->clicked();
    +  } else
    +    return WMenuItem::activateSignal();
    +}
    +
    +std::string WSubMenuItem::pathComponent() const
    +{
    +  return WMenuItem::pathComponent() + "/";
    +}
    +
    +void WSubMenuItem::setFromInternalPath(const std::string& path)
    +{
    +  WMenuItem::setFromInternalPath(path);
    +
    +  if (subMenu_ && subMenu_->internalPathEnabled())
    +    subMenu_->internalPathChanged(path);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSuggestionPopup b/wt-3.1.7a/src/Wt/WSuggestionPopup
    new file mode 100644
    index 0000000..6ea1a59
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSuggestionPopup
    @@ -0,0 +1,495 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSUGGESTION_POPUP_H_
    +#define WSUGGESTION_POPUP_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WJavaScript>
    +
    +namespace Wt {
    +
    +class WAbstractItemModel;
    +class WModelIndex;
    +class WFormWidget;
    +class WTemplate;
    +
    +/*! \class WSuggestionPopup Wt/WSuggestionPopup Wt/WSuggestionPopup
    + *  \brief A widget which popups to assist in editing a textarea or lineedit.
    + *
    + * This widget may be associated with one or more \link WFormWidget
    + * WFormWidgets\endlink (typically a WLineEdit or a WTextArea).
    + *
    + * The popup provides the user with suggestions to enter input. The
    + * popup can be used by one or more editors, using forEdit(). The
    + * popup will show when the user starts editing the edit field, or
    + * when the user opens the suggestions explicitly using a drop down
    + * icon or with the down key. The popup positions itself intelligently
    + * just below or just on top of the edit field. It offers a list of
    + * suggestions that match in some way with the current edit field, and
    + * dynamically adjusts this list. The implementation for matching
    + * individual suggestions with the current text is provided through a
    + * JavaScript function. This function may also highlight part(s) of
    + * the suggestions to provide feed-back on how they match.
    + *
    + * %WSuggestionPopup is an MVC view class, using a simple
    + * WStringListModel by default. You can set a custom model using
    + * setModel(). The model can provide different text for the suggestion
    + * text (Wt::DisplayRole) and value (Wt::UserRole). The member methods
    + * clearSuggestions() and addSuggestion() manipulate this model.
    + *
    + * By default, the popup implements all filtering client-side. To
    + * support large datasets, you may enable server-side filtering of
    + * suggestions based on the input. The server-side filtering may
    + * provide a coarse filtering using a fixed size prefix of the entered
    + * text, and complement the client-side filtering. To enable
    + * server-side filtering, use setFilterLength() and listen to filter
    + * notification using the modelFilter() signal. Whenever a filter
    + * event is generated you can adjust the model's content according to
    + * the filter (e.g. using a WSortFilterProxyModel). By using
    + * setMaximumSize() you can also limit the maximum height of the
    + * popup, in which case scrolling is supported (similar to a
    + * combo-box).
    + *
    + * The class is initialized with an Options struct which configures
    + * how suggestion filtering and result editing is done. Alternatively,
    + * you can provide two JavaScript functions, one for filtering the
    + * suggestions, and one for editing the value of the textarea when a
    + * suggestion is selected.
    + *
    + * The matcherJS function must have the following JavaScript signature:
    + * 
    + * \code
    + * function (editElement) {
    + *   // fetch the location of cursor and current text in the editElement.
    + *
    + *   // return a function that matches a given suggestion with the current value of the editElement.
    + *   return function(suggestion) {
    + *
    + *     // 1) if suggestion is null, simply return the current text 'value'
    + *     // 2) check suggestion if it matches
    + *     // 3) add highlighting markup to suggestion if necessary
    + *
    + *     return { match : ...,      // does the suggestion match ? (boolean)
    + *              suggestion : ...  // modified suggestion with highlighting
    + *             };
    + *   }
    + * }
    + * \endcode
    + *
    + * The replacerJS function that edits the value has the following
    + * JavaScript signature.
    + *
    + * \code
    + * function (editElement, suggestionText, suggestionValue) {
    + *   // editElement is the form element which must be edited.
    + *   // suggestionText is the displayed text for the matched suggestion.
    + *   // suggestionValue is the stored value for the matched suggestion.
    + *
    + *   // computed modifiedEditValue and modifiedPos ...
    + *
    + *   editElement.value = modifiedEditValue;
    + *   editElement.selectionStart = edit.selectionEnd = modifiedPos;
    + * }
    + * \endcode
    + *
    + * To style the suggestions, you should style the \<span\> element inside
    + * this widget, and the \<span\>."sel" element to style the current selection.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * // options for email address suggestions
    + * Wt::WSuggestionPopup::Options contactOptions
    + * = { "<b>",         // highlightBeginTag
    + *     "</b>",        // highlightEndTag
    + *     ',',           // listSeparator      (for multiple addresses)
    + *     " \\n",        // whitespace
    + *     "-., \"@\\n;", // wordSeparators     (within an address)
    + *     ", "           // appendReplacedText (prepare next email address)
    + *    };
    + *
    + * Wt::WSuggestionPopup *popup = new Wt::WSuggestionPopup(contactOptions, this);
    + * Wt::WTextArea *textEdit = new Wt::WTextArea(this);
    + * popup->forEdit(textEdit);
    + *
    + * // load popup data
    + * for (unsigned i = 0; i < contacts.size(); ++i)
    + *   popup->addSuggestion(contacts[i].formatted(), contacts[i].formatted());
    + * \endcode
    + * \elseif java
    + * \code
    + * // options for email address suggestions
    + * WSuggestionPopup.Options contactOptions = new WSuggestionPopup.Options(); 
    + * contactOptions.highlightBeginTag = "<b>";
    + * contactOptions.highlightEndTag = "</b>";
    + * contactOptions.listSeparator = ','; //for multiple addresses)
    + * contactOptions.whitespace = " \\n";
    + * contactOptions.wordSeparators = "-., \"@\\n;"; //within an address
    + * contactOptions.appendReplacedText = ", "; //prepare next email address
    + *	
    + * WSuggestionPopup popup = new WSuggestionPopup(contactOptions, this);
    + * 
    + * WTextArea textEdit = new WTextArea(this);
    + * popup.forEdit(textEdit);
    + *		 
    + * // load popup data
    + * for (int i = 0; i < contacts.size(); ++i)
    + * popup.addSuggestion(contacts.get(i).formatted(), contacts.get(i).formatted());
    + * \endcode
    + * \endif
    + *
    + * A screenshot of this example:
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WSuggestionPopup-default-1.png "An example WSuggestionPopup (default)"
    + * </TD> <TD>
    + * \image html WSuggestionPopup-polished-1.png "An example WSuggestionPopup (polished)"
    + * </TD> </TR> </TABLE>
    + *
    + * <h3>CSS</h3>
    + *
    + * The suggestion popup is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-suggest</tt> CSS class and the following
    + * selectors:
    + *
    + * \verbatim
    +.Wt-suggest .content div : A suggestion element
    +.Wt-suggest .sel :         A selected suggestion element
    +\endverbatim
    + *
    + * When using the DropDownIcon trigger, an additional style class is
    + * provided for the edit field: <tt>Wt-suggest-dropdown</tt>, which
    + * renders the icon to the right inside the edit field. This class may
    + * be used to customize how the drop down icon is rendered.
    + *
    + * \note This widget requires JavaScript support.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WSuggestionPopup : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Enumeration that defines a trigger for showing the popup.
    +   *
    +   * \sa forEdit()
    +   */
    +  enum PopupTrigger {
    +    /*! \brief Shows popup when the user starts editing.
    +     *
    +     * The popup is shown when the currently edited text has a length
    +     * longer than the \link setFilterLength() filter length\endlink.
    +     */
    +    Editing = 0x1,
    +
    +    /*! \brief Shows popup when user clicks a drop down icon.
    +     *
    +     * The lineedit is modified to show a drop down icon, and clicking
    +     * the icon shows the suggestions, very much like a WComboCox.
    +     */
    +    DropDownIcon = 0x2
    +  };
    +
    +  /*! \brief A configuration object to generate a matcher and replacer
    +   *         JavaScript function.
    +   *
    +   * \sa WSuggestionPopup
    +   */
    +  struct Options {
    +    /*! \brief Open tag to highlight a match in a suggestion.
    +     *
    +     * Must be an opening markup tag, such as &lt;b&gt;.
    +     *
    +     * Used during matching.
    +     */
    +    std::string highlightBeginTag;
    +
    +    /*! \brief Close tag to highlight a match in a suggestion.
    +     *
    +     * Must be a closing markup tag, such as &lt;/b&gt;.
    +     *
    +     * Used during matching.
    +     */
    +    std::string highlightEndTag;
    +
    +    /*! \brief When editing a list of values, the separator used
    +     *         for different items.
    +     *
    +     * For example, ',' to separate different values on komma. Specify
    +     * 0 ('\\0') for no list separation.
    +     *
    +     * Used during matching and replacing.
    +     */
    +    char listSeparator;
    +
    +    /*! \brief When editing a value, the whitespace characters ignored
    +     *         before the current value.
    +     *
    +     * For example, " \\n" to ignore spaces and newlines.
    +     *
    +     * Used during matching and replacing.
    +     */
    +    std::string whitespace;
    +
    +    /*! \brief To show suggestions based on matches of the edited
    +     *         value with parts of the suggestion.
    +     *
    +     * For example, " .@" will also match with suggestion text after a space,
    +     * a dot (.) or an at-symbol (@).
    +     *
    +     * Used during matching.
    +     */
    +    std::string wordSeparators;
    +
    +    /*! \brief When replacing the current edited value with suggestion value,
    +     *         append the following string as well.
    +     *
    +     * Used during replacing.
    +     */
    +    std::string appendReplacedText;
    +  };
    +
    +  /*! \brief Creates a suggestion popup.
    +   *
    +   * The popup using a standard matcher and replacer implementation
    +   * that is configured using the provided \p options.
    +   *
    +   * \sa generateMatcherJS(), generateReplacerJS()
    +   */
    +  WSuggestionPopup(const Options& options, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a suggestion popup with given matcherJS and replacerJS.
    +   *
    +   * See supra for the expected signature of the matcher and replace
    +   * JavaScript functions.
    +   */
    +  WSuggestionPopup(const std::string& matcherJS, const std::string& replacerJS,
    +		   WContainerWidget *parent = 0);
    +
    +  /*! \brief Lets this suggestion popup assist in editing the given edit field.
    +   *
    +   * A single suggestion popup may assist in several edits by repeated calls
    +   * of this method.
    +   *
    +   * The \p popupTriggers control how editing is triggered (either by the user
    +   * editing the field by entering keys or by an explicit drop down menu that
    +   * is shown inside the edit).
    +   *
    +   * \sa removeEdit()
    +   */
    +  void forEdit(WFormWidget *edit, WFlags<PopupTrigger> popupTriggers = Editing);
    +
    +  /*! \brief Removes the edit field from the list of assisted editors.
    +   *
    +   * The editor will no longer be assisted by this popup widget.
    +   *
    +   * \sa forEdit().
    +   */
    +  void removeEdit(WFormWidget *edit);
    +
    +  /*! \brief Clears the list of suggestions.
    +   *
    +   * This clears the underlying model.
    +   *
    +   * \sa addSuggestion()
    +   */
    +  void clearSuggestions();
    +
    +  /*! \brief Adds a new suggestion.
    +   *
    +   * This adds an entry to the underlying model. The \p suggestionText
    +   * is set as Wt::DisplayRole and the \p suggestionValue (which is
    +   * inserted into the edit field on selection) is set as
    +   * Wt::UserRole.
    +   *
    +   * \sa clearSuggestions(), setModel()
    +   */
    +  void addSuggestion(const WString& suggestionText,
    +		     const WString& suggestionValue);
    +
    +  /*! \brief Sets the model to be used for the suggestions.
    +   *
    +   * The \p model may not be \c 0, and ownership of the model is not
    +   * transferred.
    +   *
    +   * The default value is a WStringListModel that is owned by the
    +   * suggestion popup.
    +   *
    +   * The Wt::DisplayRole is used for the suggestion text. The
    +   * Wt::UserRole is used for the suggestion value, unless empty, in
    +   * which case the suggestion text is used as value.
    +   *
    +   * Note that since the default %WStringListModel does not support
    +   * UserRole data, you will want to change it to a more general model
    +   * (e.g. WStandardItemModel) if you want suggestion values that are
    +   * different from display values.
    +   *
    +   * \sa setModelColumn(int)
    +   */
    +  void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Returns the data model.
    +   *
    +   * \sa setModel()
    +   */
    +  WAbstractItemModel *model() const { return model_; }
    +
    +  /*! \brief Sets the column in the model to be used for the items.
    +   *
    +   * The column \p index in the model will be used to retrieve data.
    +   *
    +   * The default value is 0.
    +   *
    +   * \sa setModel()
    +   */
    +  void setModelColumn(int index);
    +
    +  /*! \brief Sets a default selected value.
    +   *
    +   * \p row is the model row that is selected by default (only if it
    +   * matches the current input).
    +   *
    +   * The default value is -1, indicating no default.
    +   */
    +  void setDefaultIndex(int row);
    +
    +  /*! \brief Returns the default value.
    +   *
    +   * \sa setDefaultValue()
    +   */
    +  int defaultIndex() const { return defaultValue_; }
    +
    +  /*! \brief Creates a standard matcher JavaScript function.
    +   *
    +   * This returns a JavaScript function that provides a standard
    +   * implementation for the matching input, based on the given \p
    +   * \options.
    +   */
    +  static std::string generateMatcherJS(const Options& options);
    +
    +  /*! \brief Creates a standard replacer JavaScript function.
    +   *
    +   * This returns a JavaScript function that provides a standard
    +   * implementation for the matching input, based on the given \p
    +   * \options.
    +   */
    +  static std::string generateReplacerJS(const Options& options);
    +
    +  /*! \brief Sets the minimum input length before showing the popup.
    +   *
    +   * When the user has typed this much characters, filterModel() is
    +   * emitted which allows you to filter the model based on the initial
    +   * input.
    +   *
    +   * The default value is 0, which has the effect of always show the
    +   * entire model.
    +   *
    +   * \sa filterModel()
    +   */
    +  void setFilterLength(int count);
    +
    +  /*! \brief Returns the filter length.
    +   *
    +   * \sa setFilterLength()
    +   */
    +  int filterLength() const { return filterLength_; }
    +
    +  /*! \brief %Signal that indicates that the model should be filtered.
    +   *
    +   * The argument is the initial input. When \link
    +   * WSuggestionPopup::Editing Editing\endlink is used as edit
    +   * trigger, its length will always equal the filterLength(). When
    +   * \link WSuggestionPopup::DropDownIcon DropDownIcon\endlink is used
    +   * as edit trigger, the input length may be less than
    +   * filterLength(), and the the signal will be called repeatedly as
    +   * the user provides more input.
    +   *
    +   * For example, if you are using a WSortFilterProxyModel, you could
    +   * react to this signal with:
    +   * \if cpp
    +   * \code
    +   * void MyClass::filterSuggestions(const WString& filter)
    +   * {
    +   *   proxyModel->setFilterRegExp(filter + ".*");
    +   * }
    +   * \endcode
    +   * \elseif java
    +   * \code
    +   * public filterSuggestions(String filter) {
    +   *   proxyModel.setFilterRegExp(filter + ".*");
    +   * }
    +   * \endcode
    +   * \endif 
    +   */
    +  Signal<WT_USTRING>& filterModel() { return filterModel_; }
    +
    +  /*! \brief %Signal emitted when a suggestion was selected.
    +   *
    +   * The selected item is passed as the first argument and the editor as
    +   * the second.
    +   */
    +  Signal<int, WFormWidget *>& activated() { return activated_; }
    +
    +  /*! \brief Controls how the suggestion popup is positioned.
    +   *
    +   * When \p global is \c true, then the popup will position itself
    +   * globally. This avoids that the popup is affected by enclosing
    +   * parents with overflow settings that clip the popup. This makes
    +   * the popup however no longer follow the popup button when this
    +   * button moves.
    +   *
    +   * The default is \c false.
    +   */
    +  void setGlobalPopup(bool global) { global_ = global; }
    +
    +  virtual void setMaximumSize(const WLength& width, const WLength& height);
    +  virtual void setMinimumSize(const WLength& width, const WLength& height);
    +
    +private:
    +  WTemplate *impl_;
    +  WAbstractItemModel *model_;
    +  int modelColumn_;
    +  int filterLength_;
    +  bool filtering_;
    +  int defaultValue_;
    +
    +  std::string       matcherJS_;
    +  std::string       replacerJS_;
    +  WContainerWidget *content_;
    +
    +  Signal<WT_USTRING> filterModel_;
    +  Signal<int, WFormWidget *> activated_;
    +
    +  std::vector<boost::signals::connection> modelConnections_;
    +
    +  JSignal<std::string> filter_;
    +  JSignal<std::string, std::string> jactivated_;
    +
    +  std::vector<WFormWidget *> edits_;
    +
    +  bool global_;
    +
    +  void init();
    +  void doFilter(std::string input);
    +  void doActivate(std::string itemId, std::string editId);
    +  void connectObjJS(EventSignalBase& s, const std::string& methodName);
    +
    +  void modelRowsInserted(const WModelIndex& parent, int start, int end);
    +  void modelRowsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelDataChanged(const WModelIndex& topLeft,
    +			const WModelIndex& bottomRight);
    +  void modelLayoutChanged();
    +
    +  void defineJavaScript();
    +
    +protected:
    +  virtual void render(WFlags<RenderFlag> flags);
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(WSuggestionPopup::PopupTrigger);
    +
    +}
    +
    +#endif // WSUGGESTION_POPUP_H_
    diff --git a/wt-3.1.7a/src/Wt/WSuggestionPopup.C b/wt-3.1.7a/src/Wt/WSuggestionPopup.C
    new file mode 100644
    index 0000000..41acc3e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSuggestionPopup.C
    @@ -0,0 +1,381 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WContainerWidget"
    +#include "Wt/WTemplate"
    +#include "Wt/WText"
    +#include "Wt/WFormWidget"
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +
    +#include "Wt/WSuggestionPopup"
    +#include "Wt/WStringListModel"
    +
    +#include "JavaScriptLoader.h"
    +#include "Utils.h"
    +#include "EscapeOStream.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WSuggestionPopup.min.js"
    +#endif
    +
    +namespace {
    +  std::string instantiateStdMatcher(const Wt::WSuggestionPopup::Options&
    +				    options) {
    +    Wt::SStream s;
    +
    +    s << "new " WT_CLASS ".WSuggestionPopupStdMatcher("
    +      << Wt::WWebWidget::jsStringLiteral(options.highlightBeginTag) << ", "
    +      << Wt::WWebWidget::jsStringLiteral(options.highlightEndTag) << ", ";
    +
    +    if (options.listSeparator)
    +      s << Wt::WWebWidget::jsStringLiteral
    +	(std::string() + options.listSeparator);
    +    else
    +      s << "null";
    +
    +    s << ", " << Wt::WWebWidget::jsStringLiteral(options.whitespace) << ", "
    +      << Wt::WWebWidget::jsStringLiteral(options.wordSeparators) << ", "
    +      << Wt::WWebWidget::jsStringLiteral(options.appendReplacedText) << ")";
    +
    +    return s.str();
    +  }
    +}
    +
    +namespace Wt {
    +
    +#define TEMPLATE "${shadow-x1-x2}${contents}"
    +
    +WSuggestionPopup::WSuggestionPopup(const Options& options,
    +				   WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    impl_(new WTemplate(WString::fromUTF8(TEMPLATE))),
    +    model_(0),
    +    modelColumn_(0),
    +    filterLength_(0),
    +    filtering_(false),
    +    matcherJS_(generateMatcherJS(options)),
    +    replacerJS_(generateReplacerJS(options)),
    +    filterModel_(this),
    +    activated_(this),
    +    filter_(impl_, "filter"),
    +    jactivated_(impl_, "select"),
    +    global_(false)
    +{
    +  init();
    +}
    +
    +WSuggestionPopup::WSuggestionPopup(const std::string& matcherJS,
    +				   const std::string& replacerJS,
    +				   WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    impl_(new WTemplate(WString::fromUTF8(TEMPLATE))),
    +    model_(0),
    +    modelColumn_(0),
    +    filterLength_(0),
    +    filtering_(false),
    +    defaultValue_(-1),
    +    matcherJS_(matcherJS),
    +    replacerJS_(replacerJS),
    +    filter_(impl_, "filter"),
    +    jactivated_(impl_, "select"),
    +    global_(false)
    +{
    +  init();
    +}
    +
    +void WSuggestionPopup::init()
    +{
    +  setImplementation(impl_);
    +  impl_->setLoadLaterWhenInvisible(false);
    +  impl_->setStyleClass("Wt-suggest Wt-outset");
    +
    +  impl_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2);
    +  impl_->bindWidget("contents", content_ = new WContainerWidget());
    +  content_->setStyleClass("content");
    +
    +  setAttributeValue("style", "z-index: 10000");
    +  setPositionScheme(Absolute);
    +
    +  hide();
    +
    +  setModel(new WStringListModel(this));
    +
    +  filter_.connect(this, &WSuggestionPopup::doFilter);
    +  jactivated_.connect(this, &WSuggestionPopup::doActivate);
    +}
    +
    +void WSuggestionPopup::setMaximumSize(const WLength& width,
    +				      const WLength& height)
    +{
    +  WCompositeWidget::setMaximumSize(width, height);
    +  content_->setMaximumSize(width, height);
    +}
    +
    +void WSuggestionPopup::setMinimumSize(const WLength& width,
    +				      const WLength& height)
    +{
    +  WCompositeWidget::setMinimumSize(width, height);
    +  content_->setMinimumSize(width, height);
    +}
    +
    +void WSuggestionPopup::defineJavaScript()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  const char *THIS_JS = "js/WSuggestionPopup.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WSuggestionPopup", wtjs1);
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WSuggestionPopupStdMatcher", wtjs2);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  app->doJavaScript("new " WT_CLASS ".WSuggestionPopup("
    +		    + app->javaScriptClass() + "," + jsRef() + ","
    +		    + replacerJS_ + "," + matcherJS_ + ","
    +		    + boost::lexical_cast<std::string>(filterLength_) + ","
    +		    + boost::lexical_cast<std::string>(defaultValue_) + ","
    +		    + (global_ ? "true" : "false") + ");");
    +}
    +
    +void WSuggestionPopup::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull)
    +    defineJavaScript();
    +
    +  WCompositeWidget::render(flags);
    +}
    +
    +void WSuggestionPopup::connectObjJS(EventSignalBase& s, 
    +				     const std::string& methodName)
    +{
    +  std::string jsFunction = 
    +    "function(obj, event) {"
    +    """var o = jQuery.data(" + jsRef() + ", 'obj');"
    +    """if (o) o." + methodName + "(obj, event);"
    +    "}";
    +  s.connect(jsFunction);
    +}
    +
    +void WSuggestionPopup::setModel(WAbstractItemModel *model)
    +{
    +  if (model_) {
    +    /* disconnect slots from previous model */
    +    for (unsigned i = 0; i < modelConnections_.size(); ++i)
    +      modelConnections_[i].disconnect();
    +    modelConnections_.clear();
    +  }
    +
    +  model_ = model;
    +
    +  /* connect slots to new model */
    +  modelConnections_.push_back(model_->rowsInserted().connect
    +     (this, &WSuggestionPopup::modelRowsInserted));
    +  modelConnections_.push_back(model_->rowsRemoved().connect
    +     (this, &WSuggestionPopup::modelRowsRemoved));
    +  modelConnections_.push_back(model_->dataChanged().connect
    +     (this, &WSuggestionPopup::modelDataChanged));
    +  modelConnections_.push_back(model_->layoutChanged().connect
    +     (this, &WSuggestionPopup::modelLayoutChanged));
    +  modelConnections_.push_back(model_->modelReset().connect
    +     (this, &WSuggestionPopup::modelLayoutChanged));
    +
    +  setModelColumn(modelColumn_);
    +}
    +
    +void WSuggestionPopup::setModelColumn(int modelColumn)
    +{
    +  modelColumn_ = modelColumn;
    +
    +  content_->clear();
    +  modelRowsInserted(WModelIndex(), 0, model_->rowCount() - 1);
    +}
    +
    +void WSuggestionPopup::setDefaultIndex(int row)
    +{
    +  if (defaultValue_ != row) {
    +    defaultValue_ = row;
    +
    +    if (isRendered()) {
    +      WApplication *app = WApplication::instance();
    +      app->doJavaScript("jQuery.data(" + jsRef() + ", 'obj').defaultValue = "
    +			+ boost::lexical_cast<std::string>(defaultValue_)
    +			+ ';');      
    +    }
    +  }
    +}
    +
    +void WSuggestionPopup::modelRowsInserted(const WModelIndex& parent,
    +					 int start, int end)
    +{
    +  if (filterLength_ > 0 && !filtering_)
    +    return;
    +
    +  if (modelColumn_ >= model_->columnCount())
    +    return;
    +
    +  if (parent.isValid())
    +    return;
    +
    +  for (int i = start; i <= end; ++i) {
    +    WContainerWidget *line = new WContainerWidget();
    +    content_->insertWidget(i, line);
    +
    +    boost::any d = model_->data(i, modelColumn_);
    +    WText *value = new WText(asString(d), PlainText);
    +
    +    boost::any d2 = model_->data(i, modelColumn_, UserRole);
    +    if (d2.empty())
    +      d2 = d;
    +
    +    line->addWidget(value);
    +    value->setAttributeValue("sug", asString(d2));
    +  }
    +}
    +
    +void WSuggestionPopup::modelRowsRemoved(const WModelIndex& parent,
    +					int start, int end)
    +{
    +  if (parent.isValid())
    +    return;
    +
    +  for (int i = start; i <= end; ++i)
    +    if (start < content_->count())
    +      delete content_->widget(start);
    +    else
    +      break;
    +}
    +
    +void WSuggestionPopup::modelDataChanged(const WModelIndex& topLeft,
    +					const WModelIndex& bottomRight)
    +{
    +  if (topLeft.parent().isValid())
    +    return;
    +
    +  if (modelColumn_ < topLeft.column() || modelColumn_ > bottomRight.column())
    +    return;
    +
    +  for (int i = topLeft.row(); i <= bottomRight.row(); ++i) {
    +    WContainerWidget *w = dynamic_cast<WContainerWidget *>(content_->widget(i));
    +    WText *value = dynamic_cast<WText *>(w->widget(0));
    +
    +    boost::any d = model_->data(i, modelColumn_);
    +    value->setText(asString(d));
    +
    +    boost::any d2 = model_->data(i, modelColumn_, UserRole);
    +    if (d2.empty())
    +      d2 = d;
    +
    +    value->setAttributeValue("sug", asString(d2));
    +  }
    +}
    +
    +void WSuggestionPopup::modelLayoutChanged()
    +{
    +  content_->clear();
    +  modelRowsInserted(WModelIndex(), 0, model_->rowCount() - 1);
    +}
    +
    +void WSuggestionPopup::forEdit(WFormWidget *edit, WFlags<PopupTrigger> triggers)
    +{
    +#ifdef WT_CNOR // ??
    +  EventSignalBase& b = edit->keyPressed();
    +  EventSignalBase& c = edit->clicked();
    +#endif
    +
    +  connectObjJS(edit->keyPressed(), "editKeyDown");
    +  connectObjJS(edit->keyWentDown(), "editKeyDown");
    +  connectObjJS(edit->keyWentUp(), "editKeyUp");
    +  connectObjJS(edit->blurred(), "delayHide");
    +
    +  if (triggers & Editing)
    +    edit->addStyleClass("Wt-suggest-onedit");
    +
    +  if (triggers & DropDownIcon) {
    +    edit->addStyleClass("Wt-suggest-dropdown");
    +    connectObjJS(edit->clicked(), "editClick");
    +    connectObjJS(edit->mouseMoved(), "editMouseMove");
    +  }
    +
    +  edits_.push_back(edit);
    +}
    +
    +void WSuggestionPopup::removeEdit(WFormWidget *edit)
    +{
    +  if (Utils::erase(edits_, edit)) {
    +    edit->removeStyleClass("Wt-suggest-onedit");
    +    edit->removeStyleClass("Wt-suggest-dropdown");
    +  }
    +}
    +
    +void WSuggestionPopup::clearSuggestions()
    +{
    +  model_->removeRows(0, model_->rowCount());
    +}
    +
    +void WSuggestionPopup::addSuggestion(const WString& suggestionText,
    +				     const WString& suggestionValue)
    +{
    +  int row = model_->rowCount();
    +
    +  if (model_->insertRow(row)) {
    +    model_->setData(row, modelColumn_, boost::any(suggestionText), DisplayRole);
    +    model_->setData(row, modelColumn_, boost::any(suggestionValue), UserRole);
    +  }
    +}
    +
    +void WSuggestionPopup::setFilterLength(int length)
    +{
    +  filterLength_ = length;
    +}
    +
    +void WSuggestionPopup::doFilter(std::string input)
    +{
    +  filtering_ = true;
    +  filterModel_.emit(WT_USTRING::fromUTF8(input));
    +  filtering_ = false;
    +
    +  WApplication *app = WApplication::instance();
    +  app->doJavaScript("jQuery.data(" + jsRef() + ", 'obj').filtered("
    +		    + WWebWidget::jsStringLiteral(input) + ")");
    +}
    +
    +void WSuggestionPopup::doActivate(std::string itemId, std::string editId)
    +{
    +  WFormWidget *edit = 0;
    +
    +  for (unsigned i = 0; i < edits_.size(); ++i)
    +    if (edits_[i]->id() == editId) {
    +      edit = edits_[i];
    +      break;
    +    }
    +
    +  if (edit == 0)
    +    wApp->log("error") << "WSuggestionPopup activate from bogus editor";
    +
    +  for (int i = 0; i < content_->count(); ++i)
    +    if (content_->widget(i)->id() == itemId) {
    +      activated_.emit(i, edit);
    +      return;
    +    }
    +
    +  wApp->log("error") << "WSuggestionPopup activate for bogus item";
    +}
    +
    +std::string WSuggestionPopup::generateMatcherJS(const Options& options)
    +{
    +  return instantiateStdMatcher(options) + ".match";
    +}
    +
    +std::string WSuggestionPopup::generateReplacerJS(const Options& options)
    +{
    +  return instantiateStdMatcher(options) + ".replace";
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WSvgImage b/wt-3.1.7a/src/Wt/WSvgImage
    new file mode 100644
    index 0000000..a6669f9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSvgImage
    @@ -0,0 +1,128 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WSVG_IMAGE_H_
    +#define WSVG_IMAGE_H_
    +
    +#include <Wt/WBrush>
    +#include <Wt/WFont>
    +#include <Wt/WPen>
    +#include <Wt/WPointF>
    +#include <Wt/WResource>
    +#include <Wt/WShadow>
    +#include <Wt/WTransform>
    +#include <Wt/WVectorImage>
    +
    +#include <sstream>
    +
    +namespace Wt {
    +
    +  class SStream;
    +
    +/*! \class WSvgImage Wt/WSvgImage Wt/WSvgImage
    + *  \brief A paint device for rendering using Scalable Vector Graphics (SVG).
    + *
    + * The %WSvgImage is primarily used by WPaintedWidget to render to the
    + * browser in Support Vector Graphics (SVG) format.
    + *
    + * \if cpp
    + * You may also use the %WSvgImage as an independent resource, for example
    + * in conjunction with a WAnchor or WImage, or to make a hard copy of an
    + * image in SVG format, using write():
    + * \code
    + * Wt::Chart::WCartesianChart *chart = ...
    + *
    + * Wt::WSvgImage svgImage(800, 400);
    + * Wt::WPainter p(&svgImage);
    + * chart->paint(p);
    + * p.end();
    + * std::ofstream f("chart.svg");
    + * svgImage.write(f);
    + * \endcode
    + * \endif
    + *
    + * \ingroup painting
    + */
    +class WT_API WSvgImage : public WResource, public WVectorImage
    +{
    +public:
    +  /*! \brief Create an SVG paint device.
    +   */
    +  WSvgImage(const WLength& width, const WLength& height, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WSvgImage();
    +
    +  virtual void setChanged(WFlags<ChangeFlag> flags);
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle);
    +  virtual void drawImage(const WRectF& rect, const std::string& imgUri,
    +			 int imgWidth, int imgHeight, const WRectF& sourceRect);
    +  virtual void drawLine(double x1, double y1, double x2, double y2);
    +  virtual void drawPath(const WPainterPath& path);
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text);
    +  virtual void init();
    +  virtual void done();
    +  virtual bool paintActive() const { return painter_ != 0; }
    +
    +  virtual std::string rendered();
    +
    +  virtual WLength width() const { return width_; }
    +  virtual WLength height() const { return height_; }
    +
    +  virtual void handleRequest(const Http::Request& request,
    +			     Http::Response& response);
    +
    +protected:
    +  virtual WPainter *painter() const { return painter_; }
    +  virtual void setPainter(WPainter *painter) { painter_ = painter; }
    +  virtual void clear();
    +
    +private:
    +  WLength   width_, height_;
    +  WPainter *painter_;
    +  bool      paintUpdate_;
    +  WFlags<ChangeFlag> changeFlags_;
    +
    +  bool        newGroup_;
    +  bool        newClipPath_;
    +  bool        busyWithPath_;
    +  int         currentClipId_;
    +  static int  nextClipId_;
    +
    +  WTransform  currentTransform_;
    +  WBrush      currentBrush_;
    +  WFont       currentFont_;
    +  WPen        currentPen_;
    +  WShadow     currentShadow_;
    +  int         currentShadowId_, nextShadowId_;
    +
    +  WPointF     pathTranslation_;
    +
    +  std::stringstream shapes_;
    +
    +  void finishPath();
    +  void makeNewGroup();
    +  std::string fillStyle() const;
    +  std::string strokeStyle() const;
    +  std::string fontStyle() const;
    +  std::string clipPath() const;
    +  int createShadowFilter(SStream& out);
    +
    +  std::string fillStyle_, strokeStyle_, fontStyle_;
    +
    +  static std::string quote(double s);
    +  static std::string quote(const std::string& s);
    +
    +  void drawPlainPath(std::stringstream& s, const WPainterPath& path);
    +
    +  void streamResourceData(std::ostream& stream);
    +};
    +
    +}
    +
    +#endif // WSVG_IMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WSvgImage.C b/wt-3.1.7a/src/Wt/WSvgImage.C
    new file mode 100644
    index 0000000..acb6966
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WSvgImage.C
    @@ -0,0 +1,761 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WSvgImage"
    +#include "Wt/WPainter"
    +#include "Wt/WPainterPath"
    +#include "Wt/WRectF"
    +#include "Wt/WWebWidget"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +#include "Utils.h"
    +#include "EscapeOStream.h"
    +
    +#include <cmath>
    +#include <sstream>
    +#include <boost/lexical_cast.hpp>
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
    +#define SVG ""
    +//#define SVG "svg:"
    +
    +namespace {
    +  double adjust360(double d) {
    +    if (std::fabs(d - 360) < 0.01)
    +      return 359.5;
    +    else if (std::fabs(d + 360) < 0.01)
    +      return -359.5;
    +    else 
    +      return d;
    +  }
    +
    +  bool fequal(double d1, double d2) {
    +    return std::fabs(d1 - d2) < 1E-5;
    +  }
    +}
    +
    +namespace Wt {
    +
    +int WSvgImage::nextClipId_ = 0;
    +
    +WSvgImage::WSvgImage(const WLength& width, const WLength& height,
    +		     WObject *parent)
    +  : WResource(parent),
    +    width_(width),
    +    height_(height),
    +    painter_(0),
    +    paintUpdate_(true),
    +    newGroup_(true),
    +    newClipPath_(false),
    +    busyWithPath_(false),
    +    currentClipId_(-1),
    +    currentShadowId_(-1),
    +    nextShadowId_(0)
    +{ }
    +
    +WSvgImage::~WSvgImage()
    +{
    +  beingDeleted();
    +}
    +
    +void WSvgImage::clear()
    +{
    +  paintUpdate_ = false;
    +
    +  shapes_.str(std::string());
    +}
    +
    +void WSvgImage::init()
    +{ 
    +  currentBrush_ = painter()->brush();
    +  currentPen_ = painter()->pen();
    +  currentFont_ = painter()->font();
    +
    +  strokeStyle_ = strokeStyle();
    +  fillStyle_ = fillStyle();
    +  fontStyle_ = fontStyle();
    +
    +  //this is not for clipping, but for settings the initial pen stroke
    +  //in makeNewGroup()
    +  newClipPath_ = true;
    +}
    +
    +void WSvgImage::done()
    +{
    +  finishPath();
    +}
    +
    +void WSvgImage::drawArc(const WRectF& rect, double startAngle, double spanAngle)
    +{
    +  char buf[30];
    +
    +  if (std::fabs(spanAngle - 360.0) < 0.01) {
    +    finishPath();
    +    makeNewGroup();
    +
    +    shapes_ << "<"SVG"ellipse "
    +	    << " cx=\""<< Utils::round_str(rect.center().x(), 3, buf);
    +    shapes_ << "\" cy=\"" << Utils::round_str(rect.center().y(), 3, buf);
    +    shapes_ << "\" rx=\"" << Utils::round_str(rect.width() / 2, 3, buf);
    +    shapes_ << "\" ry=\"" << Utils::round_str(rect.height() / 2, 3, buf)
    +	    << "\" />";
    +  } else {
    +    WPainterPath path;
    +
    +    path.arcMoveTo(rect.x(), rect.y(), rect.width(), rect.height(), startAngle);
    +    path.arcTo(rect.x(), rect.y(), rect.width(), rect.height(), startAngle,
    +	       spanAngle);
    +
    +    drawPath(path);
    +  }
    +}
    +
    +void WSvgImage::setChanged(WFlags<ChangeFlag> flags)
    +{
    +  if (flags)
    +    newGroup_ = true;
    +
    +  if (flags & Clipping)
    +    newClipPath_ = true;
    +
    +  changeFlags_ |= flags;
    +}
    +
    +void WSvgImage::makeNewGroup()
    +{
    +  if (!newGroup_)
    +    return;
    +
    +  bool brushChanged
    +    = (changeFlags_ & Brush) && (currentBrush_ != painter()->brush());
    +  bool penChanged
    +    = changeFlags_ & Hints
    +    || ((changeFlags_ & Pen) && (currentPen_ != painter()->pen()));
    +  bool fontChanged
    +    = (changeFlags_ & Font) && (currentFont_ != painter()->font());
    +  bool shadowChanged = false;
    +  if (changeFlags_ & Shadow) {
    +    if (currentShadowId_ == -1)
    +      shadowChanged = !painter()->shadow().none();
    +    else
    +      shadowChanged = currentShadow_ != painter()->shadow();
    +  }
    +
    +  if (shadowChanged)
    +    newClipPath_ = true;
    +
    +  if (!newClipPath_) {
    +    if (!brushChanged && !penChanged) {
    +      WTransform f = painter()->combinedTransform();
    +
    +      if (busyWithPath_) {
    +	if (   fequal(f.m11(), currentTransform_.m11())
    +	    && fequal(f.m12(), currentTransform_.m12())
    +	    && fequal(f.m21(), currentTransform_.m21())
    +	    && fequal(f.m22(), currentTransform_.m22())) {
    +
    +	  /*
    +	   * Invert scale/rotate to compute the delta needed
    +	   * before applying these transformations to get the
    +	   * same as the global translation.
    +	   */
    +	  double det = f.m11() * f.m22() - f.m12() * f.m21();
    +	  double a11 = f.m22() / det;
    +	  double a12 = -f.m12() / det;
    +	  double a21 = -f.m21() / det;
    +	  double a22 = f.m11() / det;
    +
    +	  double fdx = f.dx() * a11 + f.dy() * a21;
    +	  double fdy = f.dx() * a12 + f.dy() * a22;
    +
    +	  const WTransform& g = currentTransform_;
    +
    +	  double gdx = g.dx() * a11 + g.dy() * a21;
    +	  double gdy = g.dx() * a12 + g.dy() * a22;
    +
    +	  double dx = fdx - gdx;
    +	  double dy = fdy - gdy;
    +
    +	  pathTranslation_.setX(dx);
    +	  pathTranslation_.setY(dy);
    +
    +	  changeFlags_ = 0;
    +
    +	  return;
    +	}
    +      } else {
    +	if (!fontChanged && currentTransform_ == f) {
    +	  newGroup_ = false;
    +
    +	  changeFlags_ = 0;
    +
    +	  return;
    +	}
    +      }
    +    }
    +  }
    +
    +  newGroup_ = false;
    +
    +  finishPath();
    +
    +  char buf[30];
    +  SStream tmp;
    +
    +  tmp << "</"SVG"g>";
    +
    +  currentTransform_ = painter()->combinedTransform();
    +
    +  if (newClipPath_) {
    +    tmp << "</"SVG"g>";
    +    if (painter()->hasClipping()) {
    +      currentClipId_ = nextClipId_++;
    +      tmp << "<"SVG"defs><"SVG"clipPath id=\"clip" << currentClipId_ << "\">";
    +      shapes_ << tmp.c_str();
    +      tmp.clear();
    +
    +      drawPlainPath(shapes_, painter()->clipPath());
    +
    +      tmp << '"';
    +      busyWithPath_ = false;
    +
    +      const WTransform& t = painter()->clipPathTransform();
    +      if (!t.isIdentity()) {
    +	tmp << " transform=\"matrix("
    +	    <<        Utils::round_str(t.m11(), 3, buf);
    +	tmp << ' ' << Utils::round_str(t.m12(), 3, buf);
    +	tmp << ' ' << Utils::round_str(t.m21(), 3, buf);
    +	tmp << ' ' << Utils::round_str(t.m22(), 3, buf);
    +	tmp << ' ' << Utils::round_str(t.m31(), 3, buf);
    +	tmp << ' ' << Utils::round_str(t.m32(), 3, buf)
    +	    << ")\"";
    +      }
    +      tmp << "/></"SVG"clipPath></"SVG"defs>";
    +    }
    +
    +    newClipPath_ = false;
    +
    +    if (shadowChanged) {
    +      if (!painter()->shadow().none()) {
    +	if (painter()->shadow() != currentShadow_) {
    +	  currentShadow_ = painter()->shadow();
    +	  currentShadowId_ = createShadowFilter(tmp);
    +	} else
    +	  currentShadowId_ = nextShadowId_;
    +      } else
    +	currentShadowId_ = -1;
    +    }
    +
    +    tmp << "<"SVG"g";
    +    if (painter()->hasClipping())
    +      tmp << clipPath();
    +
    +    if (currentShadowId_ != -1)
    +      tmp << " filter=\"url(#f" << currentShadowId_ << ")\"";
    +
    +    tmp << '>';
    +  }
    +
    +  if (penChanged) {
    +    currentPen_ = painter()->pen();
    +    strokeStyle_ = strokeStyle();
    +  }
    +
    +  if (brushChanged) {
    +    currentBrush_ = painter()->brush();
    +    fillStyle_ = fillStyle();
    +  }
    +
    +  if (fontChanged) {
    +    currentFont_ = painter()->font();
    +    fontStyle_ = fontStyle();
    +  }
    +
    +  tmp << "<"SVG"g style=\"" << fillStyle_ << strokeStyle_ << fontStyle_ << '"';
    +
    +  if (!currentTransform_.isIdentity()) {
    +    tmp << " transform=\"matrix("
    +	<< Utils::round_str(currentTransform_.m11(), 3, buf);
    +    tmp << ' ' << Utils::round_str(currentTransform_.m12(), 3, buf);
    +    tmp << ' ' << Utils::round_str(currentTransform_.m21(), 3, buf);
    +    tmp << ' ' << Utils::round_str(currentTransform_.m22(), 3, buf);
    +    tmp << ' ' << Utils::round_str(currentTransform_.m31(), 3, buf);
    +    tmp << ' ' << Utils::round_str(currentTransform_.m32(), 3, buf)
    +	<< ")\"";
    +  }
    +
    +  tmp << '>';
    +  
    +  shapes_ << tmp.c_str();
    +
    +  changeFlags_ = 0;
    +}
    +
    +int WSvgImage::createShadowFilter(SStream& out)
    +{
    +  char buf[30];
    +  int result = ++nextShadowId_;
    +
    +  out << "<filter id=\"f" << result << "\" width=\"150%\" height=\"150%\">"
    +    "<feOffset result=\"offOut\" in=\"SourceAlpha\" dx=\""
    +      << Utils::round_str(currentShadow_.offsetX(), 3, buf) << "\" dy=\"";
    +  out << Utils::round_str(currentShadow_.offsetY(), 3, buf) << "\" />";
    +
    +  out << "<feColorMatrix result=\"colorOut\" in=\"offOut\" type=\"matrix\" values=\"";
    +  double r = currentShadow_.color().red() / 255.;
    +  double g = currentShadow_.color().green() / 255.;
    +  double b = currentShadow_.color().blue() / 255.;
    +  double a = currentShadow_.color().alpha() / 255.;
    +
    +  out << "0 0 0 " << Utils::round_str(r, 3, buf) << " 0 ";
    +  out << "0 0 0 " << Utils::round_str(g, 3, buf) << " 0 ";
    +  out << "0 0 0 " << Utils::round_str(b, 3, buf) << " 0 ";
    +  out << "0 0 0 " << Utils::round_str(a, 3, buf) << " 0\"/>";
    +  out << "<feGaussianBlur result=\"blurOut\" in=\"colorOut\" stdDeviation=\""
    +      << Utils::round_str(std::sqrt(currentShadow_.blur()), 3, buf) << "\" />"
    +    "<feBlend in=\"SourceGraphic\" in2=\"blurOut\" mode=\"normal\" />"
    +    "</filter>";
    +  return result;
    +}
    +
    +void WSvgImage::drawPlainPath(std::stringstream& out, const WPainterPath& path)
    +{
    +  char buf[30];
    +
    +  if (!busyWithPath_) {
    +    out << "<"SVG"path d=\"";
    +    busyWithPath_ = true;
    +    pathTranslation_.setX(0);
    +    pathTranslation_.setY(0);
    +  }
    +
    +  const std::vector<WPainterPath::Segment>& segments = path.segments();
    +
    +  if (!segments.empty()
    +      && segments[0].type() != WPainterPath::Segment::MoveTo)
    +    out << "M0,0";
    +
    +  for (unsigned i = 0; i < segments.size(); ++i) {
    +    const WPainterPath::Segment s = segments[i];
    +
    +    if (s.type() == WPainterPath::Segment::ArcC) {
    +      WPointF current = path.positionAtSegment(i);
    +
    +      const double cx = segments[i].x();
    +      const double cy = segments[i].y();
    +      const double rx = segments[i+1].x();
    +      const double ry = segments[i+1].y();
    +      const double theta1 = -WTransform::degreesToRadians(segments[i+2].x());
    +      const double deltaTheta
    +	= -WTransform::degreesToRadians(adjust360(segments[i+2].y()));
    +
    +      i += 2;
    +
    +      /*
    +       * formulas from:
    +       * http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
    +       * with phi = 0
    +       */
    +      const double x1 = rx * std::cos(theta1) + cx;
    +      const double y1 = ry * std::sin(theta1) + cy;
    +      const double x2 = rx * std::cos(theta1 + deltaTheta) + cx;
    +      const double y2 = ry * std::sin(theta1 + deltaTheta) + cy;
    +      const int fa = (std::fabs(deltaTheta) > M_PI ? 1 : 0);
    +      const int fs = (deltaTheta > 0 ? 1 : 0);
    +
    +      if (!fequal(current.x(), x1) || !fequal(current.y(), y1)) {
    +	out << 'L' << Utils::round_str(x1 + pathTranslation_.x(), 3, buf);
    +	out << ',' << Utils::round_str(y1 + pathTranslation_.y(), 3, buf);
    +      }
    +
    +      out << 'A' << Utils::round_str(rx, 3, buf);
    +      out << ',' << Utils::round_str(ry, 3, buf);
    +      out << " 0 " << fa << "," << fs;
    +      out << ' ' << Utils::round_str(x2 + pathTranslation_.x(), 3, buf);
    +      out << ',' << Utils::round_str(y2 + pathTranslation_.y(), 3, buf);
    +    } else {
    +      switch (s.type()) {
    +      case WPainterPath::Segment::MoveTo:
    +	out << 'M';
    +	break;
    +      case WPainterPath::Segment::LineTo:
    +	out << 'L';
    +	break;
    +      case WPainterPath::Segment::CubicC1:
    +	out << 'C';
    +	break;
    +      case WPainterPath::Segment::CubicC2:
    +      case WPainterPath::Segment::CubicEnd:
    +	out << ' ';
    +	break;
    +      case WPainterPath::Segment::QuadC:
    +	out << 'Q';
    +	break;
    +      case WPainterPath::Segment::QuadEnd:
    +	out << ' ';
    +	break;
    +      default:
    +	assert(false);
    +      }
    +
    +      out << Utils::round_str(s.x() + pathTranslation_.x(), 3, buf);
    +      out << ',' << Utils::round_str(s.y() + pathTranslation_.y(), 3, buf);
    +    }
    +  }
    +}
    +
    +void WSvgImage::finishPath()
    +{
    +  if (busyWithPath_) {
    +    busyWithPath_ = false;
    +
    +    shapes_ << "\" />";
    +  }
    +}
    +
    +void WSvgImage::drawPath(const WPainterPath& path)
    +{
    +  makeNewGroup();
    +
    +  drawPlainPath(shapes_, path);
    +}
    +
    +void WSvgImage::drawImage(const WRectF& rect, const std::string& imageUri,
    +			  int imgWidth, int imgHeight,
    +			  const WRectF& srect)
    +{
    +  finishPath();
    +  makeNewGroup();
    +
    +  WRectF drect = rect;
    +
    +  char buf[30];
    +
    +  bool transformed = false;
    +
    +  if (drect.width() != srect.width()
    +      || drect.height() != srect.height()) {
    +    shapes_ << "<"SVG"g transform=\"matrix("
    +	    << Utils::round_str(drect.width() / srect.width(), 3, buf);
    +    shapes_ << " 0 0 " 
    +	    << Utils::round_str(drect.height() / srect.height(), 3, buf);
    +    shapes_ << ' ' << Utils::round_str(drect.x(), 3, buf);
    +    shapes_ << ' ' << Utils::round_str(drect.y(), 3, buf) << ")\">";
    +
    +    drect = WRectF(0, 0, srect.width(), srect.height());
    +
    +    transformed = true;
    +  }
    +
    +  double scaleX = drect.width() / srect.width();
    +  double scaleY = drect.height() / srect.height();
    +
    +  double x = drect.x() - srect.x() * scaleX;
    +  double y = drect.y() - srect.y() * scaleY;
    +  //double width = drect.width() * imgWidth / srect.width();
    +  //double height = drect.height() * imgHeight / srect.height();
    +  double width = imgWidth;
    +  double height = imgHeight;
    +
    +  bool useClipPath = false;
    +
    +  int imgClipId = nextClipId_++;
    +
    +  if (WRectF(x, y, width, height) != drect) {
    +    shapes_ << "<"SVG"clipPath id=\"imgClip" << imgClipId << "\">";
    +    shapes_ << "<"SVG"rect x=\"" << Utils::round_str(drect.x(), 3, buf) << '"';
    +    shapes_ << " y=\"" << Utils::round_str(drect.y(), 3, buf) << '"';
    +    shapes_ << " width=\"" << Utils::round_str(drect.width(), 3, buf) << '"';
    +    shapes_ << " height=\"" << Utils::round_str(drect.height(), 3, buf) << '"';
    +    shapes_ << " /></"SVG"clipPath>";
    +    useClipPath = true;
    +  }
    +
    +  shapes_ << "<"SVG"image xlink:href=\"" << imageUri << "\"";
    +  shapes_ << " x=\"" << Utils::round_str(x, 3, buf) << '"';
    +  shapes_ << " y=\"" << Utils::round_str(y, 3, buf) << '"';
    +  shapes_ << " width=\"" << Utils::round_str(width, 3, buf) << '"';
    +  shapes_ << " height=\"" << Utils::round_str(height, 3, buf) << '"';
    +
    +  if (useClipPath)
    +    shapes_ << " clip-path=\"url(#imgClip" << imgClipId << ")\"";
    +
    +  shapes_ << "/>";
    +
    +  if (transformed)
    +    shapes_ << "</"SVG"g>";
    +}
    +
    +void WSvgImage::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  WPainterPath path;
    +  path.moveTo(x1, y1);
    +  path.lineTo(x2, y2);
    +  drawPath(path);
    +}
    +
    +void WSvgImage::drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			 const WString& text)
    +{
    +  finishPath();
    +  makeNewGroup();
    +
    +  char buf[30];
    +  shapes_ << "<"SVG"text";
    +
    +  // SVG uses fill color to fill text, but we want pen color.
    +  shapes_ << " style=\"stroke:none;";
    +  if (painter()->pen().color() != painter()->brush().color()
    +      || painter()->brush().style() == NoBrush) {
    +    const WColor& color = painter()->pen().color();
    +    shapes_ << "fill:" + color.cssText() << ';';
    +    if (color.alpha() != 255)
    +      shapes_ << "fill-opacity:" 
    +	      << Utils::round_str(color.alpha() / 255., 3, buf)
    +	      << ';';
    +  }
    +  shapes_ << '"';
    +
    +  AlignmentFlag horizontalAlign = flags & AlignHorizontalMask;
    +  AlignmentFlag verticalAlign = flags & AlignVerticalMask;
    +
    +  switch (horizontalAlign) {
    +  case AlignLeft:
    +    shapes_ << " x=" << quote(rect.left());
    +    break;
    +  case AlignRight:
    +    shapes_ << " x=" << quote(rect.right())
    +	    << " text-anchor=\"end\"";
    +    break;
    +  case AlignCenter:
    +    shapes_ << " x=" << quote(rect.center().x())
    +	    << " text-anchor=\"middle\"";
    +    break;
    +  default:
    +    break;
    +  }
    +
    +/*
    + * Opera doesn't do dominant-baseline yet
    + */
    +#if 0
    +  switch (verticalAlign) {
    +  case AlignTop:
    +    shapes_ << " y=" << quote(rect.top())
    +	    << " dominant-baseline=\"text-before-edge\"";
    +    break;
    +  case AlignBottom:
    +    shapes_ << " y=" << quote(rect.bottom())
    +	    << " dominant-baseline=\"text-after-edge\"";
    +    break;
    +  case AlignMiddle:
    +    shapes_ << " y=" << quote(rect.center().y())
    +	    << " dominant-baseline=\"middle\"";
    +    break;
    +  default:
    +    break;
    +  }
    +
    +  shapes << ">" << WWebWidget::escapeText(text, false).toUTF8() 
    +	 << "</"SVG"text>";
    +
    +#else
    +
    +  /*
    +   * Workaround: estimate the location of the default baseline which corresponds
    +   * with the font baseline.
    +   */
    +  double fontSize;
    +  switch (painter()->font().size()) {
    +  case WFont::FixedSize:
    +    fontSize = painter()->font().fixedSize().toPixels();
    +    break;
    +  default:
    +    fontSize = 16;
    +  }
    +
    +  double y = rect.center().y();
    +  switch (verticalAlign) {
    +  case AlignTop:
    +    y = rect.top() + fontSize * 0.75; break;
    +  case AlignMiddle:
    +    y = rect.center().y() + fontSize * 0.25; break;
    +  case AlignBottom:
    +    y = rect.bottom() - fontSize * 0.25 ; break;
    +  default:
    +    break;
    +  }
    +
    +  shapes_ << " y=" << quote(y);
    +
    +  shapes_ << ">" << WWebWidget::escapeText(text, false).toUTF8() 
    +	  << "</"SVG"text>";
    +#endif
    +}
    +
    +std::string WSvgImage::quote(const std::string& s)
    +{
    +  return '"' + s + '"';
    +}
    +
    +std::string WSvgImage::quote(double d)
    +{
    +  char buf[30];
    +  return quote(Utils::round_str(d, 3, buf));
    +}
    +
    +std::string WSvgImage::fillStyle() const
    +{
    +  char buf[30];
    +  std::string result;
    +
    +  switch (painter()->brush().style()) {
    +  case NoBrush:
    +    result += "fill:none;";
    +    break;
    +  case SolidPattern: {
    +    const WColor& color = painter()->brush().color();
    +    result += "fill:" + color.cssText() + ";";
    +    if (color.alpha() != 255) {
    +      result += "fill-opacity:";
    +      result += Utils::round_str(color.alpha() / 255., 3, buf);
    +      result += ';';
    +    }
    +    break;
    +  }
    +  }
    +
    +  return result;
    +}
    +
    +std::string WSvgImage::clipPath() const
    +{
    +  if (painter()->hasClipping())
    +    return " clip-path=\"url(#clip"
    +      + boost::lexical_cast<std::string>(currentClipId_) + ")\"";
    +  else
    +    return std::string();
    +}
    +
    +std::string WSvgImage::strokeStyle() const
    +{
    +  SStream result;
    +#ifndef WT_TARGET_JAVA
    +  char buf[30];
    +#else
    +  char *buf;
    +#endif
    +
    +  const WPen& pen = painter()->pen();
    +
    +  if (!(painter()->renderHints() & WPainter::Antialiasing))
    +    result << "shape-rendering:optimizeSpeed;";
    +
    +  if (pen.style() != NoPen) {
    +    const WColor& color = pen.color();
    +
    +    result << "stroke:" << color.cssText() << ';';
    +    if (color.alpha() != 255)
    +      result << "stroke-opacity:"
    +	     << Utils::round_str(color.alpha() / 255., 2, buf) << ';';
    +
    +    WLength w = painter()->normalizedPenWidth(pen.width(), true);
    +    if (w != WLength(1))
    +      result << "stroke-width:" << w.cssText() << ";";
    +
    +    switch (pen.capStyle()) {
    +    case FlatCap:
    +      break;
    +    case SquareCap:
    +      result << "stroke-linecap:square;";
    +      break;
    +    case RoundCap:
    +      result << "stroke-linecap:round;";
    +    }
    +
    +    switch (pen.joinStyle()) {
    +    case MiterJoin:
    +      break;
    +    case BevelJoin:
    +      result << "stroke-linejoin:bevel;";
    +      break;
    +    case RoundJoin:
    +      result << "stroke-linejoin:round;";
    +    }
    +
    +    switch (pen.style()) {
    +    case NoPen:
    +      break;
    +    case SolidLine:
    +      break;
    +    case DashLine:
    +      result << "stroke-dasharray:4,2;";
    +      break;
    +    case DotLine:
    +      result << "stroke-dasharray:1,2;";
    +      break;
    +    case DashDotLine:
    +      result << "stroke-dasharray:4,2,1,2;";
    +      break;
    +    case DashDotDotLine:
    +      result << "stroke-dasharray:4,2,1,2,1,2;";
    +      break;
    +    }
    +  }
    +
    +  return result.c_str();
    +}
    +
    +std::string WSvgImage::fontStyle() const
    +{
    +  return painter()->font().cssText(false);
    +}
    +
    +std::string WSvgImage::rendered()
    +{
    +  std::stringstream s;
    +  streamResourceData(s);
    +  return s.str();
    +}
    +
    +void WSvgImage::handleRequest(const Http::Request& request,
    +			      Http::Response& response)
    +{
    +  response.setMimeType("image/svg+xml");
    +
    +#ifndef WT_TARGET_JAVA
    +  std::ostream& o = response.out();
    +#else
    +  std::ostream o(response.out());
    +#endif // WT_TARGET_JAVA
    +
    +  streamResourceData(o);
    +}
    +
    +void WSvgImage::streamResourceData(std::ostream& stream)
    +{
    +  finishPath();
    +
    +  if (paintUpdate_)
    +    stream << "<"SVG"g xmlns=\"http://www.w3.org/2000/svg\""
    +      " xmlns:xlink=\"http://www.w3.org/1999/xlink\"><"SVG"g><"SVG"g>"
    +	   << shapes_.str()
    +	   << "</"SVG"g></"SVG"g></"SVG"g>";
    +  else
    +    stream << "<"SVG"svg xmlns=\"http://www.w3.org/2000/svg\""
    +      " xmlns:xlink=\"http://www.w3.org/1999/xlink\""
    +      " version=\"1.1\" baseProfile=\"full\""
    +      " width=\"" << width().cssText() << "\""
    +      " height=\"" << height().cssText() << "\">"
    +	   << "<"SVG"g><"SVG"g>" << shapes_.str()
    +	   << "</"SVG"g></"SVG"g></"SVG"svg>";
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTabWidget b/wt-3.1.7a/src/Wt/WTabWidget
    new file mode 100644
    index 0000000..2d22691
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTabWidget
    @@ -0,0 +1,249 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTABWIDGET_H_
    +#define WTABWIDGET_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +  class WMenu;
    +  class WMenuItem;
    +  class WStackedWidget;
    +
    +/*! \class WTabWidget Wt/WTabWidget Wt/WTabWidget
    + *  \brief A widget that organizes contents in tab panes.
    + *
    + * This widget combines a horizontal WMenu with a WStackedWidget, and a
    + * tab-like look.
    + *
    + * A tab widget will place the tab bar on top of the contents, and fit the
    + * contents below it.
    + *
    + * Usage example:
    + * \if cpp
    + * \code
    + * Wt::WTabWidget *examples = new Wt::WTabWidget(this);
    + *
    + * examples->addTab(helloWorldExample(), "Hello World");
    + * examples->addTab(chartExample(), "Charts");
    + * examples->addTab(new Wt::WText("A WText"), "WText");
    + *
    + * examples->currentChanged().connect(this, &MyClass::logInternalPath);
    + * examples->setInternalPathEnabled();
    + * examples->setInternalBasePath("/examples");
    + * \endcode
    + * \elseif java
    + * \code
    + * WTabWidget examples = new WTabWidget(this);
    + *	 
    + * examples.addTab(helloWorldExample(), "Hello World");
    + * examples.addTab(chartExample(), "Charts");
    + * examples.addTab(new WText("A WText"), "WText");
    + *	 
    + * examples.currentChanged().addListener(this, new Signal.Listener(){
    + *	public void trigger() {
    + *		//custom code
    + *	}
    + *  });
    + * examples.setInternalPathEnabled();
    + * examples.setInternalBasePath("/examples");		
    + * \endcode
    + * \endif
    + *
    +  * <h3>CSS</h3>
    + *
    + * The tab widget is styled by the current CSS theme. The look (of the
    + * header) can be overridden using the <tt>Wt-tabs</tt> CSS class and
    + * the following selectors:
    + *
    + * \verbatim
    +.Wt-tabs ul        : the list
    +.Wt-tabs li        : a list item
    +.Wt-tabs span      : outer span of a list item
    +.Wt-span span span : inner span of a list item
    +\endverbatim
    +* 
    +* <TABLE border="0" align="center"> <TR> <TD> 
    +* \image html WTabWidget-default-1.png "An example WTabWidget (default)"
    +* </TD> <TD>
    +* \image html WTabWidget-polished-1.png "An example WTabWidget (polished)"
    +* </TD> </TR> </TABLE>
    + */
    +class WT_API WTabWidget : public WCompositeWidget
    +{
    +public:
    +  /*! \brief When should the contents be loaded ?
    +   */
    +  enum LoadPolicy { LazyLoading,     //!< Lazy loading: on first use
    +		    PreLoading       //!< Pre-loading: before first use
    +  };
    +
    +  /*! \brief Creates a new tab widget
    +   */
    +  WTabWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a new tab widget (indicating layout alignment) (<b>deprecated</b>).
    +   *
    +   * \deprecated Since %Wt 3.1.1, the \p layoutAlignment is no longer needed and
    +   *             its value is ignored
    +   */
    +  WTabWidget(WFlags<AlignmentFlag> layoutAlignment,
    +	     WContainerWidget *parent = 0);
    +
    +  /*! \brief Adds a new tab, with <i>child</i> as content, and the given label.
    +   *
    +   * Returns the menu item that implements the tab item.
    +   */
    +  WMenuItem *addTab(WWidget *child, const WString& label,
    +		    LoadPolicy = LazyLoading);
    +
    +  /*! \brief Removes a tab item.
    +   *
    +   * The widget itself is not deleted.
    +   *
    +   * \sa WMenu::removeItem()
    +   */
    +  void removeTab(WWidget *widget);
    +
    +  /*! \brief Returns the number of tabs.
    +   */
    +  int count() const;
    +
    +  /*! \brief Returns the content widget at the given tab <i>index</i>.
    +   */
    +  WWidget *widget(int index) const;
    +
    +  /*! \brief Returns the index of the tab of the given content widget.
    +   *
    +   * If the widget is not in this tab widget, then -1 is returned.
    +   */
    +  int indexOf(WWidget *widget) const;
    +
    +  /*! \brief Activates the tab at <i>index</i>.
    +   */
    +  void setCurrentIndex(int index);
    +
    +  /*! \brief Returns the index of the activated tab.
    +   */
    +  int currentIndex() const;
    +
    +  /*! \brief Activates the tab showing the given <i>widget</i>
    +   */
    +  void setCurrentWidget(WWidget *widget);
    +
    +  /*! \brief Returns the widget of the activated tab.
    +   */
    +  WWidget *currentWidget() const;
    +
    +  /*! \brief Enables or disables a tab.
    +   *
    +   * Enables or disables the tab at \p index. A disabled tab cannot be
    +   * activated.
    +   */
    +  void setTabEnabled(int index, bool enable);
    +
    +  /*! \brief Returns whether a tab is enabled.
    +   *
    +   * \sa WMenu::enableItem(), WMenu::disableItem()
    +   */
    +  bool isTabEnabled(int index) const;
    +
    +  /*! \brief Hides or shows a tab.
    +   *
    +   * Hides or shows the tab at \p index.
    +   */
    +  void setTabHidden(int index, bool hidden);
    +
    +  /*! \brief Returns whether a tab is hidden.
    +   */
    +  bool isTabHidden(int index) const;
    +
    +  /*! \brief Make it possible to close a tab interactively or by
    +   * \link WTabWidget::closeTab() closeTab\endlink.
    +   */
    +  void setTabCloseable(int index, bool closeable);
    +
    +  /*! \brief Returns whether a tab is closeable.
    +   */
    +  bool isTabCloseable(int index);
    +
    +  /*! \brief Changes the label for a tab.
    +   */
    +  void setTabText(int index, const WString& label);
    +
    +  /*! \brief Returns the label for a tab.
    +   */
    +  const WString& tabText(int index) const;
    +
    +  /*! \brief Sets the tooltip for a tab.
    +   *
    +   * The tooltip is shown when the user hovers over the label.
    +   */
    +  void setTabToolTip(int index, const WString& tip);
    +
    +  /*! \brief Returns the tooltip for a tab.
    +   */
    +  const WString& tabToolTip(int index) const;
    +
    +  /*! \brief Enables internal paths for items.
    +   *
    +   * \copydetails WMenu::setInternalPathEnabled
    +   */
    +  void setInternalPathEnabled(const std::string& basePath = "");
    +
    +  /*! \brief Returns whether internal paths are enabled.
    +   *
    +   * \copydetails WMenu::internalPathEnabled
    +   */
    +  bool internalPathEnabled() const;
    +
    +  /*! \brief Sets the internal base path.
    +   *
    +   * \copydetails WMenu::setInternalBasePath
    +   */
    +  void setInternalBasePath(const std::string& path);
    +
    +  /*! \brief Returns the internal base path.
    +   *
    +   * \copydetails WMenu::internalBasePath
    +   */
    +  const std::string& internalBasePath() const;
    +
    +  /*! \brief %Signal emitted when the user activates a tab.
    +   *
    +   * The index of the newly activated tab is passed as an argument.
    +   */
    +  Signal<int>& currentChanged() { return currentChanged_; }
    +
    +  /*! \brief Closes a tab at \p index.
    +   */
    +  void closeTab(int index);
    +
    +  /*! \brief %Signal emitted when the user closes a tab.
    +   *
    +   * The index of the closed tab is passed as an argument.
    +   */
    +  Signal<int>& tabClosed() { return tabClosed_; }
    +
    +private:
    +  Signal<int> currentChanged_;
    +  Signal<int> tabClosed_;
    +  WContainerWidget *layout_;
    +  WMenu            *menu_;
    +
    +  std::vector<WWidget *> contentsWidgets_;
    +
    +  void create(WFlags<AlignmentFlag> layoutAlignment);
    +  void onItemSelected(WMenuItem *item);
    +
    +  void setJsSize();
    +};
    +
    +}
    +
    +#endif // WTABWIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WTabWidget.C b/wt-3.1.7a/src/Wt/WTabWidget.C
    new file mode 100644
    index 0000000..673e895
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTabWidget.C
    @@ -0,0 +1,285 @@
    +
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WAnchor"
    +#include "Wt/WBreak"
    +#include "Wt/WText"
    +#include "Wt/WApplication"
    +#include "Wt/WTabWidget"
    +#include "Wt/WMenu"
    +#include "Wt/WMenuItem"
    +#include "Wt/WStackedWidget"
    +#include "Wt/WVBoxLayout"
    +
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +namespace {
    +
    +class TabWidgetItem : public WMenuItem
    +{
    +public:
    +  TabWidgetItem(const WString& text, WWidget *contents, LoadPolicy loadPolicy);
    +
    +protected:
    +  virtual WWidget *createItemWidget();
    +  virtual void updateItemWidget(WWidget *itemWidget);
    +  virtual SignalBase& activateSignal();
    +};
    +
    +TabWidgetItem::TabWidgetItem(const WString& text, WWidget *contents,
    +			     LoadPolicy loadPolicy)
    +  : WMenuItem(text, contents, loadPolicy)
    +{ }
    +
    +void TabWidgetItem::updateItemWidget(WWidget *itemWidget)
    +{
    +  if (!isCloseable()) {
    +    WContainerWidget *c = dynamic_cast<WContainerWidget *>(itemWidget);
    +    WWidget *label = 0;
    +    if (!isDisabled())
    +      label = dynamic_cast<WAnchor *>(c->children()[0]);
    +    else
    +      label = dynamic_cast<WText *>(c->children()[0]);
    +
    +    WMenuItem::updateItemWidget(label);
    +  }
    +  else
    +    WMenuItem::updateItemWidget(itemWidget);
    +}
    +
    +WWidget *TabWidgetItem::createItemWidget()
    +{
    +  if (!isCloseable()) {
    +    WContainerWidget *c = new WContainerWidget();
    +    c->setInline(true);
    +    c->addWidget(WMenuItem::createItemWidget());
    +
    +    return c;
    +  } else
    +    return WMenuItem::createItemWidget();
    +}
    +
    +SignalBase& TabWidgetItem::activateSignal()
    +{
    +  WContainerWidget *c = dynamic_cast<WContainerWidget *>(itemWidget());
    +
    +  return dynamic_cast<WInteractWidget *>(c->children()[0])->clicked();
    +}
    +
    +}
    +
    +WTabWidget::WTabWidget(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    currentChanged_(this)
    +{
    +  create(AlignJustify);
    +}
    +
    +WTabWidget::WTabWidget(WFlags<AlignmentFlag> layoutAlignment,
    +		       WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    currentChanged_(this)
    +{
    +  create(layoutAlignment);
    +}
    +
    +void WTabWidget::create(WFlags<AlignmentFlag> layoutAlignment)
    +{
    +  setImplementation(layout_ = new WContainerWidget());
    +
    +  WT_DEBUG( setObjectName("WTabWidget") );
    +
    +  menu_ = new WMenu(new WStackedWidget(), Horizontal);
    +  menu_->setRenderAsList(true);
    +
    +  WBreak *clear = new WBreak();
    +  clear->setStyleClass("Wt-tabs-clear");
    +
    +  WContainerWidget *menuDiv = new WContainerWidget();
    +  menuDiv->setStyleClass("Wt-tabs");
    +  menuDiv->addWidget(menu_);
    +  menuDiv->addWidget(clear);
    +
    +  layout_->addWidget(menuDiv);
    +  layout_->addWidget(menu_->contentsStack());
    +
    +  setJavaScriptMember
    +    (WT_RESIZE_JS, std::string() +
    +     "function(self, w, h) {"
    +     """self.style.height= h + 'px';"
    +     """var c = self.firstChild;"
    +     """var t = self.lastChild;"
    +     """h -= c.offsetHeight;"
    +     """if (h > 0)"
    +     ""  "t." + WT_RESIZE_JS + "(t, w, h);"
    +     "};");
    +
    +  menu_->itemSelected().connect(this, &WTabWidget::onItemSelected);
    +}
    +
    +WMenuItem *WTabWidget::addTab(WWidget *child, const WString& label,
    +			      LoadPolicy loadPolicy)
    +{
    +  WMenuItem::LoadPolicy policy = WMenuItem::PreLoading;
    +  switch (loadPolicy) {
    +  case PreLoading: policy = WMenuItem::PreLoading; break;
    +  case LazyLoading: policy = WMenuItem::LazyLoading; break;
    +  }
    +
    +  WMenuItem *result = new TabWidgetItem(label, child, policy);
    +
    +  menu_->addItem(result);
    +
    +  contentsWidgets_.push_back(child);
    +
    +  return result;
    +}
    +
    +void WTabWidget::removeTab(WWidget *child)
    +{
    +  int tabIndex = indexOf(child);
    +
    +  if (tabIndex != -1) {
    +    contentsWidgets_.erase(contentsWidgets_.begin() + tabIndex);
    +
    +    WMenuItem *item = menu_->items()[tabIndex];
    +    menu_->removeItem(item);
    +
    +    item->takeContents();
    +    delete item;
    +  }
    +}
    +
    +int WTabWidget::count() const
    +{
    +  return contentsWidgets_.size();
    +}
    +
    +WWidget *WTabWidget::widget(int index) const
    +{
    +  return contentsWidgets_[index];
    +}
    +
    +int WTabWidget::indexOf(WWidget *widget) const
    +{
    +  return Utils::indexOf(contentsWidgets_, widget);
    +}
    +
    +void WTabWidget::setCurrentIndex(int index)
    +{
    +  menu_->select(index);
    +}
    +
    +int WTabWidget::currentIndex() const
    +{
    +  return menu_->currentIndex();
    +}
    +
    +void WTabWidget::setCurrentWidget(WWidget *widget)
    +{
    +  setCurrentIndex(indexOf(widget));
    +}
    +
    +WWidget *WTabWidget::currentWidget() const
    +{
    +  return menu_->currentItem()->contents();
    +}
    +
    +void WTabWidget::setTabEnabled(int index, bool enable)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  item->setDisabled(!enable);
    +}
    +
    +bool WTabWidget::isTabEnabled(int index) const
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  return !item->isDisabled();
    +}
    +
    +void WTabWidget::setTabHidden(int index, bool hidden)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  item->setHidden(hidden);
    +}
    +
    +bool WTabWidget::isTabHidden(int index) const
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  return item->isHidden();
    +}
    +
    +void WTabWidget::setTabCloseable(int index, bool closeable)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  item->setCloseable(closeable);
    +}
    +
    +bool WTabWidget::isTabCloseable(int index)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  return item->isCloseable();
    +}
    +
    +void WTabWidget::closeTab(int index)
    +{
    +  setTabHidden(index, true);
    +  tabClosed_.emit(index);
    +}
    +
    +void WTabWidget::setTabText(int index, const WString& label)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  item->setText(label);
    +}
    +
    +const WString& WTabWidget::tabText(int index) const
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  return item->text();
    +}
    +
    +void WTabWidget::setTabToolTip(int index, const WString& tip)
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  item->setToolTip(tip);
    +}
    +
    +const WString& WTabWidget::tabToolTip(int index) const
    +{
    +  TabWidgetItem *item = dynamic_cast<TabWidgetItem *>(menu_->items()[index]);
    +  return item->toolTip();
    +}
    +
    +bool WTabWidget::internalPathEnabled() const
    +{
    +  return menu_->internalPathEnabled();
    +}
    +
    +void WTabWidget::setInternalPathEnabled(const std::string& basePath)
    +{
    +  menu_->setInternalPathEnabled(basePath);
    +}
    +
    +const std::string& WTabWidget::internalBasePath() const
    +{
    +  return menu_->internalBasePath();
    +}
    +
    +void WTabWidget::setInternalBasePath(const std::string& path)
    +{
    +  menu_->setInternalBasePath(path);
    +}
    +
    +void WTabWidget::onItemSelected(WMenuItem *item)
    +{
    +  currentChanged_.emit(menu_->currentIndex());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTable b/wt-3.1.7a/src/Wt/WTable
    new file mode 100644
    index 0000000..5a5d5fa
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTable
    @@ -0,0 +1,193 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTABLE_H_
    +#define WTABLE_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WTableCell>
    +#include <Wt/WTableColumn>
    +#include <Wt/WTableRow>
    +
    +namespace Wt {
    +
    +/*! \class WTable Wt/WTable Wt/WTable
    + *  \brief A container widget which provides layout of children in a table grid.
    + *
    + * A %WTable arranges its children in a table.
    + *
    + * To insert or access contents, use elementAt(int row, int column) to
    + * access the \link WTableCell cell\endlink at a particular location
    + * in the table. The %WTable expands automatically to create the indexed
    + * (row, column) as necessary.
    + *
    + * It is possible to insert and delete entire rows or columns from the
    + * table using the insertColumn(int column), insertRow(int row),
    + * deleteColumn(int column), or deleteRow(int row) methods.
    + *
    + * You may indicate a number of rows and columns that act as headers
    + * using setHeaderCount(). Header cells are rendered as
    + * <tt>&lt;th&gt;</tt> instead of <tt>&lt;td&gt;</tt> elements. By
    + * default, no rows or columns are configured as headers.
    + *
    + * %WTable is displayed as a \link WWidget::setInline(bool) block\endlink.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WTable *table = new Wt::WTable(this);
    + * table->elementAt(0, 0)->addWidget(new Wt::WText("Item @ row 0, column 0"));
    + * table->elementAt(0, 1)->addWidget(new Wt::WText("Item @ row 0, column 1"));
    + * table->elementAt(1, 0)->addWidget(new Wt::WText("Item @ row 1, column 0"));
    + * table->elementAt(1, 1)->addWidget(new Wt::WText("Item @ row 1, column 1"));
    + *
    + * Wt::WTableCell *cell = table->elementAt(2, 0);
    + * cell->addWidget(new Wt::WText("Item @ row 2"));
    + * cell->setColumnSpan(2);
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;table&gt;</tt> tag and
    + * does not provide styling. It can be styled using inline or external
    + * CSS as appropriate.
    + *
    + * \sa WTableCell, WTableRow, WTableColumn
    + */
    +class WT_API WTable : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates an empty table.
    +   */
    +  WTable(WContainerWidget *parent = 0);
    +
    +  /*! \brief Deletes the table and its entire contents.
    +   */
    +  ~WTable();
    +
    +  /*! \brief Accesses the table element at the given row and column.
    +   *
    +   * If the row/column is beyond the current table dimensions, then
    +   * the table is expanded automatically.
    +   */
    +  WTableCell *elementAt(int row, int column);
    +
    +  /*! \brief Returns the row object for the given row.
    +   *
    +   * Like with elementAt(), the table expands automatically when the row
    +   * is beyond the current table dimensions.
    +   *
    +   * \sa elementAt(int, int), columnAt(int)
    +   */
    +  WTableRow    *rowAt(int row);
    +
    +  /*! \brief Returns the column object for the given column.
    +   *
    +   * Like with elementAt(), the table expands automatically when the
    +   * column is beyond the current table dimensions.
    +   *
    +   * \sa elementAt(int, int), rowAt(int)
    +   */
    +  WTableColumn *columnAt(int column);
    +
    +  /*! \brief Deletes a table cell and its contents.
    +   *
    +   * The table cell at that position is recreated.
    +   */
    +  void removeCell(WTableCell *item);
    +
    +  /*! \brief Deletes the table cell at the given position.
    +   *
    +   * \sa removeCell(WTableCell *)
    +   */
    +  void removeCell(int row, int column);
    +
    +  /*! \brief Inserts an empty row.
    +   */
    +  WTableRow* insertRow(int row);
    +
    +  /*! \brief Deletes a row and all its contents.
    +   *
    +   * Rows below the given row are shifted up.
    +   */
    +  void deleteRow(int row);
    +
    +  /*! \brief Inserts an empty column.
    +   */
    +  WTableColumn* insertColumn(int column);
    +
    +  /*! \brief Delete a column and all its contents.
    +   */
    +  void deleteColumn(int column);
    +
    +  /*! \brief Clears the entire table.
    +   *
    +   * This method clears the entire table: all cells and their contents
    +   * are deleted.
    +   */
    +  void clear();
    +
    +  /*! \brief Returns the number of rows in the table.
    +   */
    +  int rowCount() const;
    +
    +  /*! \brief Returns the number of columns in the table.
    +   */
    +  int columnCount() const;
    +
    +  /*! \brief Sets the number of header rows or columns.
    +   *
    +   * The default values are 0.
    +   *
    +   * \note This must be set before the initial rendering and cannot
    +   *       be changed later.
    +   */
    +  void setHeaderCount(int count, Orientation orientation = Horizontal);
    +
    +  /*! \brief Returns the number of header rows or columns.
    +   *
    +   * \sa setHeaderCount()
    +   */
    +  int headerCount(Orientation orientation = Horizontal);
    +
    +private:
    +  static const int BIT_GRID_CHANGED = 0;
    +  static const int BIT_COLUMNS_CHANGED = 1;
    +
    +  std::bitset<3>               flags_;
    +
    +  std::vector<WTableRow *>     rows_;
    +  std::vector<WTableColumn *>  columns_;
    +  std::set<WTableRow *>       *rowsChanged_;
    +  unsigned                     rowsAdded_;
    +  int                          headerRowCount_, headerColumnCount_;
    +
    +  void expand(int row, int column, int rowSpan, int columnSpan);
    +  WTableRow::TableData& itemAt(int row, int column);
    +
    +  void repaintRow(WTableRow *row);
    +  void repaintColumn(WTableColumn *col);
    +
    +  friend class WTableCell;
    +  friend class WTableColumn;
    +  friend class WTableRow;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual DomElement    *createDomElement(WApplication *app);
    +  virtual void           getDomChanges(std::vector<DomElement *>& result,
    +				       WApplication *app);
    +  virtual void           propagateRenderOk(bool deep);
    +
    +private:
    +  DomElement *createRow(int row, bool withIds, WApplication *app);
    +};
    +
    +}
    +
    +#endif // WTABLE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTable.C b/wt-3.1.7a/src/Wt/WTable.C
    new file mode 100644
    index 0000000..6f51a15
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTable.C
    @@ -0,0 +1,404 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WTable::WTable(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    rowsChanged_(0),
    +    rowsAdded_(0),
    +    headerRowCount_(0),
    +    headerColumnCount_(0)
    +{ 
    +  setInline(false);
    +  setIgnoreChildRemoves(true);
    +}
    +
    +WTable::~WTable()
    +{
    +  for (unsigned i = 0; i < rows_.size(); ++i)
    +    delete rows_[i];
    +
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    delete columns_[i];
    +
    +  delete rowsChanged_;
    +  rowsChanged_ = 0;
    +}
    +
    +WTableCell *WTable::elementAt(int row, int column)
    +{
    +  expand(row, column, 1, 1);
    +
    +  WTableRow::TableData& d = itemAt(row, column);
    +
    +  return d.cell;
    +}
    +
    +WTableRow *WTable::rowAt(int row)
    +{
    +  expand(row, 0, 1, 0);
    +
    +  return rows_[row];
    +}
    +
    +WTableColumn *WTable::columnAt(int column)
    +{
    +  expand(0, column, 0, 1);
    +
    +  return columns_[column];
    +}
    +
    +void WTable::removeCell(WTableCell *item)
    +{
    +  removeCell(item->row(), item->column());
    +}
    +
    +void WTable::removeCell(int row, int column)
    +{
    +  WTableRow::TableData& d = itemAt(row, column);
    +
    +  delete d.cell;
    +  d.cell = new WTableCell(rows_[row], column);
    +}
    +
    +void WTable::expand(int row, int column, int rowSpan, int columnSpan)
    +{
    +  int newNumRows = row + rowSpan;
    +  int curNumColumns = columnCount();
    +  int newNumColumns = std::max(curNumColumns, column + columnSpan);
    +
    +  if ((newNumRows > rowCount())
    +      || (newNumColumns > curNumColumns)) {
    +    if (newNumColumns == curNumColumns && rowCount() >= headerRowCount_)
    +      rowsAdded_ += newNumRows - rowCount();
    +    else
    +      flags_.set(BIT_GRID_CHANGED);
    +
    +    repaint(RepaintInnerHtml);
    +
    +    for (int r = rowCount(); r < newNumRows; ++r)
    +      rows_.push_back(new WTableRow(this, newNumColumns));
    +
    +    if (newNumColumns > curNumColumns) {
    +      for (int r = 0; r < rowCount(); ++r) {
    +	WTableRow *tr = rows_[r];
    +	tr->expand(newNumColumns);
    +      }
    +
    +      for (int c = curNumColumns; c <= column; ++c)
    +	columns_.push_back(new WTableColumn(this));
    +    }
    +  }
    +
    +  //printDebug();
    +}
    +
    +int WTable::rowCount() const
    +{
    +  return rows_.size();
    +}
    +
    +int WTable::columnCount() const
    +{
    +  return columns_.size();
    +}
    +
    +WTableRow* WTable::insertRow(int row)
    +{
    +  if (row == rowCount())
    +    return rowAt(row); // trigger a simple expand()
    +  else {
    +    WTableRow* tableRow = new WTableRow(this, columnCount());
    +
    +    rows_.insert(rows_.begin() + row, tableRow);
    +    flags_.set(BIT_GRID_CHANGED);
    +    repaint(RepaintInnerHtml);
    +  
    +    return tableRow;
    +  }
    +}
    +
    +WTableColumn* WTable::insertColumn(int column)
    +{
    +  for (unsigned i = 0; i < rows_.size(); ++i)
    +    rows_[i]->insertColumn(column);
    +
    +  WTableColumn* tableColumn = 0;
    +  if ((unsigned)column <= columns_.size()) {
    +    tableColumn = new WTableColumn(this);
    +    columns_.insert(columns_.begin() + column, tableColumn);
    +  }
    +
    +  flags_.set(BIT_GRID_CHANGED);
    +  repaint(RepaintInnerHtml);
    +
    +  return tableColumn;
    +}
    +
    +void WTable::deleteRow(int row)
    +{
    +  if (rowsChanged_) {
    +    rowsChanged_->erase(rows_[row]);
    +    if (rowsChanged_->empty()) {
    +      delete rowsChanged_;
    +      rowsChanged_ = 0;
    +    }
    +  }
    +
    +  for (int i = 0; i < columnCount(); ++i) {
    +    WTableCell *cell = rows_[row]->cells_[i].cell;
    +    delete cell;
    +  }
    +
    +  if (row >= static_cast<int>(rowCount() - rowsAdded_))
    +    --rowsAdded_;
    +  else {
    +    flags_.set(BIT_GRID_CHANGED);
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  delete rows_[row];
    +  rows_.erase(rows_.begin() + row);
    +}
    +
    +void WTable::deleteColumn(int column)
    +{
    +  for (int i = 0; i < rowCount(); ++i)
    +    rows_[i]->deleteColumn(column);
    +
    +  if ((unsigned)column <= columns_.size()) {
    +    delete columns_[column];
    +    columns_.erase(columns_.begin() + column);
    +  }
    +
    +  flags_.set(BIT_GRID_CHANGED);
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WTable::repaintRow(WTableRow *row)
    +{
    +  if (row->rowNum() >= static_cast<int>(rowCount() - rowsAdded_))
    +    return;
    +
    +  if (!rowsChanged_)
    +    rowsChanged_ = new std::set<WTableRow *>();
    +
    +  rowsChanged_->insert(row);
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WTable::repaintColumn(WTableColumn *column)
    +{
    +  flags_.set(BIT_COLUMNS_CHANGED);
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WTable::clear()
    +{
    +  while (rowCount() > 0)
    +    deleteRow(rowCount() - 1);
    +
    +  while (columnCount() > 0)
    +    deleteColumn(columnCount() - 1);
    +}
    +
    +void WTable::setHeaderCount(int count, Orientation orientation)
    +{
    +  if (orientation == Horizontal)
    +    headerRowCount_ = count;
    +  else
    +    headerColumnCount_ = count;
    +}
    +
    +int WTable::headerCount(Orientation orientation)
    +{
    +  if (orientation == Horizontal)
    +    return headerRowCount_;
    +  else
    +    return headerColumnCount_;
    +}
    +
    +void WTable::updateDom(DomElement& element, bool all)
    +{
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WTable::propagateRenderOk(bool deep)
    +{
    +  flags_.reset();
    +  if (rowsChanged_) {
    +    delete rowsChanged_;
    +    rowsChanged_ = 0;
    +  }
    +
    +  rowsAdded_ = 0;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WTable::domElementType() const
    +{
    +  return DomElement_TABLE;
    +}
    +
    +DomElement *WTable::createDomElement(WApplication *app)
    +{
    +  bool withIds = !app->environment().agentIsSpiderBot();
    +
    +  DomElement *table = DomElement::createNew(domElementType());
    +  setId(table, app);
    +
    +  DomElement *thead = 0;
    +  if (headerRowCount_ != 0) {
    +    thead = DomElement::createNew(DomElement_THEAD);
    +    if (withIds)
    +      thead->setId(id() + "th");
    +  }
    +
    +  DomElement *tbody = DomElement::createNew(DomElement_TBODY);
    +  if (withIds)
    +    tbody->setId(id() + "tb");
    +
    +  for (unsigned col = 0; col < columns_.size(); ++col) {
    +    DomElement *c = DomElement::createNew(DomElement_COL);
    +    if (withIds)
    +      c->setId(columns_[col]->id());
    +    columns_[col]->updateDom(*c, true);
    +    table->addChild(c);
    +  }
    +  
    +  flags_.reset(BIT_COLUMNS_CHANGED);
    +
    +  for (unsigned row = 0; row < (unsigned)rowCount(); ++row)
    +    for (unsigned col = 0; col < (unsigned)columnCount(); ++col)
    +      itemAt(row, col).overSpanned = false;
    +  
    +  for (unsigned row = 0; row < (unsigned)rowCount(); ++row) {
    +    DomElement *tr = createRow(row, withIds, app);
    +    if (row < static_cast<unsigned>(headerRowCount_))
    +      thead->addChild(tr);
    +    else
    +      tbody->addChild(tr);
    +  }
    +  rowsAdded_ = 0;
    +
    +  if (thead)
    +    table->addChild(thead);
    +  table->addChild(tbody);
    +
    +  updateDom(*table, true);
    +
    +  flags_.reset(BIT_GRID_CHANGED);
    +  delete rowsChanged_;
    +  rowsChanged_ = 0;
    +
    +  return table;
    +}
    +
    +DomElement *WTable::createRow(int row, bool withIds, WApplication *app)
    +{
    +  DomElement *tr = DomElement::createNew(DomElement_TR);
    +  if (withIds)
    +    tr->setId(rows_[row]->id());
    +  rows_[row]->updateDom(*tr, true);
    +
    +  // because of the mix of addChild() and insertChildAt()
    +  tr->setWasEmpty(false);
    +
    +  for (int col = 0; col < columnCount(); ++col) {
    +    WTableRow::TableData& d = itemAt(row, col);
    +
    +    if (!d.overSpanned) {
    +      DomElement *td = d.cell->createSDomElement(app);
    +
    +      /*
    +       * So, IE gets confused when doing appendChild() for TH followed by
    +       * insertCell(-1) for TD. But, we cannot insertChild() for element 0,
    +       * so we do TH with appendChild, and insertCell(col).
    +       */
    +      if (col < headerColumnCount_ || row < headerRowCount_)
    +	tr->addChild(td);
    +      else
    +	tr->insertChildAt(td, col);
    +
    +      for (int i = 0; i < d.cell->rowSpan(); ++i)
    +	for (int j = 0; j < d.cell->columnSpan(); ++j)
    +	  if (i + j > 0) {
    +	    itemAt(row + i, col + j).overSpanned = true;
    +	    itemAt(row + i, col + j).cell->setRendered(false);
    +	  }
    +    }
    +  }
    +
    +  return tr;
    +}
    +
    +void WTable::getDomChanges(std::vector<DomElement *>& result,
    +			   WApplication *app)
    +{
    +  DomElement *e = DomElement::getForUpdate(this, domElementType());
    +
    +  if (!isStubbed() && flags_.test(BIT_GRID_CHANGED)) {
    +    DomElement *newE = createDomElement(app);
    +    e->replaceWith(newE);
    +  } else {
    +    if (rowsChanged_) {
    +      for (std::set<WTableRow *>::iterator i = rowsChanged_->begin();
    +	   i != rowsChanged_->end(); ++i) {
    +	DomElement *e2 = DomElement::getForUpdate(*i, DomElement_TR);
    +	(*i)->updateDom(*e2, false);
    +	result.push_back(e2);
    +      }
    +
    +      delete rowsChanged_;
    +      rowsChanged_ = 0;
    +    }
    +
    +    if (rowsAdded_) {
    +      DomElement *etb = DomElement::getForUpdate(id() + "tb",
    +						 DomElement_TBODY);
    +      for (unsigned i = 0; i < static_cast<unsigned>(rowsAdded_); ++i) {
    +	DomElement *tr = createRow(rowCount() - rowsAdded_ + i, true, app);
    +	etb->addChild(tr);
    +      }
    +
    +      result.push_back(etb);
    +
    +      rowsAdded_ = 0;
    +    }
    +
    +    if (flags_.test(BIT_COLUMNS_CHANGED)) {
    +	for (unsigned i = 0; i < columns_.size(); ++i) {
    +	  DomElement *e2
    +	    = DomElement::getForUpdate(columns_[i], DomElement_COL);
    +	  columns_[i]->updateDom(*e2, false);
    +	  result.push_back(e2);
    +	}
    +
    +      flags_.reset(BIT_COLUMNS_CHANGED);
    +    }
    +
    +    updateDom(*e, false);
    +  }
    +
    +  result.push_back(e);
    +}
    +
    +WTableRow::TableData& WTable::itemAt(int row, int column)
    +{
    +  return rows_[row]->cells_[column];
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTableCell b/wt-3.1.7a/src/Wt/WTableCell
    new file mode 100644
    index 0000000..d9bc74f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableCell
    @@ -0,0 +1,104 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTABLECELL_H_
    +#define WTABLECELL_H_
    +
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +
    +class WTable;
    +class WTableRow;
    +
    +/*! \class WTableCell Wt/WTableCell Wt/WTableCell
    + *  \brief A container widget that represents a cell in a table.
    + *
    + * A WTable provides a table of %WTableCell container widgets. A
    + * %WTableCell may overspan more than one grid location in the table,
    + * by specifying a \link setRowSpan() rowSpan \endlink and \link
    + * setColumnSpan() columnSpan \endlink. Table cells at overspanned
    + * positions are hidden. You cannot directly create a %WTableCell,
    + * instead, they are created automatically by a table.
    + *
    + * A %WTableCell acts as any other WContainerWidget, except that both
    + * the vertical and horizontal alignment of contents may be specified
    + * by setContentAlignment().
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to the HTML <tt>&lt;td&gt;</tt> or
    + * <tt>&lt;th&gt;</tt> tag, depending on whether the cell is a plain
    + * cell or a header cell. The widget does not provide styling, and can
    + * be styled using inline or external CSS as appropriate.
    + *
    + * \sa WTable
    + */
    +class WT_API WTableCell : public WContainerWidget
    +{
    +public:
    +  /*! \brief Sets the row span.
    +   *
    +   * The row span indicates how many table rows this WTableCell
    +   * overspans. By default, a WTableCell has a row span of 1, only
    +   * occupying its own grid cell. A row span greater than 1 indicates
    +   * that table cells to the right of this one are overspanned.
    +   */
    +  void setRowSpan(int rowSpan);
    +  
    +  /*! \brief Returns the row span.
    +   *
    +   * \sa setRowSpan(int rowSpan)
    +   */
    +  int rowSpan() const { return rowSpan_; }
    +
    +  /*! \brief Sets the column span.
    +   *
    +   * The column span indicates how many table columns this WTableCell
    +   * overspans. By default, a WTableCell has a column span of 1, only
    +   * occupying its own grid cell. A column span greater than 1 indicates
    +   * that table cells below this one are overspanned.
    +   */
    +  void setColumnSpan(int colSpan);
    +
    +  /*! \brief Returns the column span.
    +   *
    +   * \sa setColumnSpan(int colSpan)
    +   */
    +  int columnSpan() const { return columnSpan_; }
    +
    +  /*! \brief Returns the row index of this cell.
    +   */
    +  int row() const;
    +
    +  /*! \brief Returns the column index of this cell.
    +   */
    +  int column() const { return column_; }
    +
    +  /*! \brief Returns the table to which this cell belongs.
    +   */
    +  WTable *table() const;
    +
    +private:
    +  WTableCell(WTableRow *row, int column);
    +
    +  WTableRow *row_;
    +  int  column_;
    +  int  rowSpan_, columnSpan_;
    +  bool spanChanged_;
    +
    +  friend class WTableRow;
    +  friend class WTable;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +};
    +
    +}
    +
    +#endif // WTEXT_H_
    diff --git a/wt-3.1.7a/src/Wt/WTableCell.C b/wt-3.1.7a/src/Wt/WTableCell.C
    new file mode 100644
    index 0000000..8b9524a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableCell.C
    @@ -0,0 +1,96 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WTableCell"
    +#include "Wt/WTable"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WTableCell::WTableCell(WTableRow *row, int column)
    +  : WContainerWidget(0),
    +    row_(row),
    +    column_(column),
    +    rowSpan_(1),
    +    columnSpan_(1),
    +    spanChanged_(false)
    +{
    +  contentAlignment_ = AlignLeft | AlignTop;
    +  setParentWidget(row->table());
    +}
    +
    +int WTableCell::row() const
    +{
    +  return row_->rowNum();
    +}
    +
    +WTable *WTableCell::table() const
    +{
    +  return row_->table();
    +}
    +
    +void WTableCell::setRowSpan(int rowSpan)
    +{
    +  if (rowSpan_ != rowSpan) {
    +    rowSpan_ = rowSpan;
    +    row_->table()->expand(row(), column_, rowSpan_, columnSpan_);
    +    spanChanged_ = true;
    +    
    +    table()->flags_.set(WTable::BIT_GRID_CHANGED);
    +    table()->repaint(RepaintInnerHtml);
    +  }
    +}
    +
    +void WTableCell::setColumnSpan(int colSpan)
    +{
    +  if (columnSpan_ != colSpan) {
    +    columnSpan_ = colSpan;
    +    row_->table()->expand(row(), column_, rowSpan_, columnSpan_);
    +    spanChanged_ = true;
    +    
    +    table()->flags_.set(WTable::BIT_GRID_CHANGED);
    +    table()->repaint(RepaintInnerHtml);
    +  }
    +}
    +
    +DomElementType WTableCell::domElementType() const
    +{
    +  if (column_ < table()->headerCount(Vertical)
    +      || row() < table()->headerCount(Horizontal))
    +    return DomElement_TH;
    +  else
    +    return DomElement_TD;
    +}
    +
    +void WTableCell::updateDom(DomElement& element, bool all)
    +{
    +  if ((all && rowSpan_ != 1) || spanChanged_)
    +    element.setProperty(PropertyRowSpan,
    +			boost::lexical_cast<std::string>(rowSpan_));
    +
    +  if ((all && columnSpan_ != 1) || spanChanged_)
    +    element.setProperty(PropertyColSpan,
    +			boost::lexical_cast<std::string>(columnSpan_));
    +
    +  if (row() < table()->headerCount(Horizontal))
    +    element.setAttribute("scope", "col");
    +  else if (column_ < table()->headerCount(Vertical))
    +    element.setAttribute("scope", "row");
    +
    +  spanChanged_ = false;
    +
    +  WContainerWidget::updateDom(element, all);
    +}
    +
    +void WTableCell::propagateRenderOk(bool deep)
    +{
    +  spanChanged_ = false;
    +
    +  WContainerWidget::propagateRenderOk(deep);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTableColumn b/wt-3.1.7a/src/Wt/WTableColumn
    new file mode 100644
    index 0000000..1c89ae4
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableColumn
    @@ -0,0 +1,105 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTABLE_COLUMN_H_
    +#define WTABLE_COLUMN_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class DomElement;
    +class WLength;
    +class WTable;
    +
    +/*! \class WTableColumn Wt/WTableColumn Wt/WTableColumn
    + *  \brief A table column.
    + *
    + * A %WTableColumn is returned by WTable::columnAt() and managing
    + * various properties of a single column in a table (it is however not
    + * a widget).
    + *
    + * You cannot access table cells through the column. Instead, to access
    + * table cells, see WTable::elementAt().
    + *
    + * A table column corresponds to the HTML <tt>&lt;col&gt;</tt> tag.
    + *
    + * \sa WTable, WTableRow
    + */
    +class WT_API WTableColumn : public WObject 
    +{
    +public:
    +  /*! \brief Returns the table to which this column belongs.
    +   *
    +   * \sa WTable::rowAt()
    +   */
    +  WTable *table() const { return table_; }
    +
    +  /*! \brief Returns the column number of this column in the table.
    +   *
    +   * \sa WTable::rowAt()
    +   */
    +  int columnNum() const;
    +
    +   /*! \brief Sets the column width.
    +   *
    +   * The default column width is WLength::Auto.
    +   *
    +   * \sa width(), WWidget::resize()
    +   */
    +  void setWidth(const WLength& width);
    +
    +  /*! \brief Returns the column width.
    +   *
    +   * \sa setWidth(const WLength&)
    +   */
    +  WLength width() const;
    +
    +  /*! \brief Sets the CSS style class for this column.
    +   *
    +   * The style is inherited by all table cells in this column.
    +   *
    +   * \sa styleClass(), WWidget::setStyleClass()
    +   */
    +  void setStyleClass(const WT_USTRING& style);
    +
    +  /*! \brief Returns the CSS style class for this column.
    +   *
    +   * \sa styleClass(), WWidget::styleClass()
    +   */
    +  const WT_USTRING& styleClass() const { return styleClass_; }
    +
    +  /*! \brief Sets the CSS Id.
    +   *
    +   * Sets a custom Id. Note that the Id must be unique across the whole
    +   * widget tree, can only be set right after construction and cannot
    +   * be changed.
    +   *
    +   * \sa WObject::id()
    +   */
    +  void setId(const std::string& id);
    +
    +  virtual const std::string id() const;
    +
    +private:
    +  WTableColumn(WTable *table);
    +  ~WTableColumn();
    +
    +  WTable *table_;
    +
    +  WLength *width_;
    +  std::string *id_;
    +  WT_USTRING styleClass_;
    +
    +  void updateDom(DomElement& element, bool all);
    +
    +  friend class WTable;
    +};
    +
    +}
    +
    +#endif // WTABLE_COLUMN_H_
    diff --git a/wt-3.1.7a/src/Wt/WTableColumn.C b/wt-3.1.7a/src/Wt/WTableColumn.C
    new file mode 100644
    index 0000000..ad3d14c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableColumn.C
    @@ -0,0 +1,89 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WTableColumn"
    +
    +namespace Wt {
    +
    +WTableColumn::WTableColumn(WTable *table)
    +  : table_(table),
    +    width_(0),
    +    id_(0)
    +{ }
    +
    +WTableColumn::~WTableColumn()
    +{
    +  delete width_;
    +  delete id_;
    +}
    +
    +int WTableColumn::columnNum() const
    +{
    +  for (unsigned i =0; i < table_->columns_.size(); i++) 
    +    if (table_->columns_[i] == this)
    +      return i;
    +
    +  return -1;
    +}
    +
    +void WTableColumn::setWidth(const WLength& width)
    +{
    +#ifndef WT_TARGET_JAVA
    +  if (!width_)
    +    width_ = new WLength(width);
    +  else
    +#endif
    +    *width_ = width;
    +
    +  table_->repaintColumn(this);
    +}
    +
    +void WTableColumn::setStyleClass(const WT_USTRING& style)
    +{
    +  if (WWebWidget::canOptimizeUpdates() && (style == styleClass_))
    +    return;
    +
    +  styleClass_ = style;
    +  table_->repaintColumn(this);
    +}
    +
    +WLength WTableColumn::width() const
    +{
    +  return width_ ? *width_ : WLength::Auto;
    +}
    +
    +void WTableColumn::setId(const std::string& id)
    +{
    +  if (!id_)
    +    id_ = new std::string();
    +
    +  *id_ = id;
    +}
    +
    +const std::string WTableColumn::id() const
    +{
    +  if (id_)
    +    return *id_;
    +  else
    +    return WObject::id();
    +}
    +
    +void WTableColumn::updateDom(DomElement& element, bool all)
    +{
    +  if (width_)
    +    element.setProperty(PropertyStyleWidth, width_->cssText());
    +
    +  if (!all || !styleClass_.empty())
    +    element.setProperty(PropertyClass, styleClass_.toUTF8());
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTableRow b/wt-3.1.7a/src/Wt/WTableRow
    new file mode 100644
    index 0000000..3a61347
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableRow
    @@ -0,0 +1,149 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTABLE_ROW_H_
    +#define WTABLE_ROW_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class DomElement;
    +class WTable;
    +class WTableCell;
    +
    +/*! \class WTableRow Wt/WTableRow Wt/WTableRow
    + *  \brief A table row.
    + *
    + * A %WTableRow is returned by WTable::rowAt() and managing various
    + * properties of a single row in a table (it is however not a widget).
    + *
    + * You cannot access table cells through the row. Instead, to access
    + * table cells, see WTable::elementAt().
    + *
    + * A table row corresponds to the HTML <tt>&lt;tr&gt;</tt> tag.
    + *
    + * \sa WTable, WTableColumn
    + */
    +class WT_API WTableRow : public WObject 
    +{
    +public:
    +  /*! \brief Returns the table to which this row belongs.
    +   *
    +   * \sa WTable::rowAt()
    +   */
    +  WTable *table() const { return table_; }
    +
    +  /*! \brief Returns the row number of this row in the table.
    +   *
    +   * \sa WTable::rowAt()
    +   */
    +  int rowNum() const;
    +
    +  /*! \brief Sets the row height.
    +   *
    +   * The default row height is WLength::Auto.
    +   *
    +   * \sa height(), WWidget::resize()
    +   */
    +  void setHeight(const WLength& height);
    +
    +  /*! \brief Returns the row height.
    +   *
    +   * \sa setHeight(const WLength&)
    +   */
    +  WLength height() const;
    +
    +  /*! \brief Sets the CSS style class for this row.
    +   *
    +   * The style is inherited by all table cells in this row.
    +   *
    +   * \sa styleClass(), WWidget::setStyleClass()
    +   */
    +  void setStyleClass(const WT_USTRING& style);
    +
    +  /*! \brief Returns the CSS style class for this row.
    +   *
    +   * \sa styleClass(), WWidget::styleClass()
    +   */
    +  const WT_USTRING& styleClass() const { return styleClass_; }
    +
    +  /*! \brief Sets whether the row must be hidden.
    +   *
    +   * Hide or show the row.
    +   *
    +   * The default value is \c false (row is not hidden).
    +   *
    +   * \sa hide(), show()
    +   */
    +  void setHidden(bool how);
    +
    +  /*! \brief Returns whether the rows is hidden.
    +   *
    +   * \sa setHidden()
    +   */
    +  bool isHidden() const { return hidden_; }
    +
    +  /*! \brief Hides the row.
    +   *
    +   * \sa setHidden()
    +   */
    +  void hide();
    +
    +  /*! \brief Shows the row.
    +   *
    +   * \sa setHidden()
    +   */
    +  void show();
    +
    +  /*! \brief Sets the CSS Id.
    +   *
    +   * Sets a custom Id. Note that the Id must be unique across the whole
    +   * widget tree, can only be set right after construction and cannot
    +   * be changed.
    +   *
    +   * \sa WObject::id()
    +   */
    +  void setId(const std::string& id);
    +
    +  virtual const std::string id() const;
    +
    +private:
    +  WTableRow(WTable *table, int numCells);
    +  ~WTableRow();
    +  void expand(int numCells);
    +
    +  struct TableData {
    +    WTableCell *cell;
    +
    +    /* used during rendering */
    +    bool overSpanned;
    +
    +    TableData();
    +  };
    +
    +  WTable *table_;
    +  std::vector<TableData> cells_;
    +
    +  WLength *height_;
    +  std::string *id_;
    +  WT_USTRING styleClass_;
    +  bool hidden_, hiddenChanged_, wasHidden_;
    +
    +  void updateDom(DomElement& element, bool all);
    +
    +  void insertColumn(int column);
    +  void deleteColumn(int column);
    +
    +  void undoHide();
    +
    +  friend class WTable;
    +};
    +
    +}
    +
    +#endif // WTABLE_ROW_H_
    diff --git a/wt-3.1.7a/src/Wt/WTableRow.C b/wt-3.1.7a/src/Wt/WTableRow.C
    new file mode 100644
    index 0000000..14904d2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableRow.C
    @@ -0,0 +1,157 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WTableRow"
    +
    +namespace Wt {
    +
    +WTableRow::WTableRow(WTable *table, int numCells)
    +  : table_(table),
    +    height_(0),
    +    id_(0),
    +    hidden_(false),
    +    hiddenChanged_(false)
    +{ 
    +  expand(numCells);
    +
    +  implementStateless(&WTableRow::hide, &WTableRow::undoHide);
    +  implementStateless(&WTableRow::show, &WTableRow::undoHide);
    +}
    +
    +WTableRow::~WTableRow()
    +{
    +  delete height_;
    +  delete id_;
    +}
    +
    +WTableRow::TableData::TableData()
    +  : cell(0),
    +    overSpanned(false)
    +{ }
    +
    +void WTableRow::expand(int numCells)
    +{
    +  int cursize = cells_.size();
    +
    +  for (int col = cursize; col < numCells; ++col) {
    +    cells_.push_back(TableData());
    +    cells_.back().cell = new WTableCell(this, col);
    +  }
    +}
    +
    +void WTableRow::insertColumn(int column)
    +{
    +  cells_.insert(cells_.begin() + column, TableData());
    +  cells_[column].cell = new WTableCell(this, column);
    +
    +  for (unsigned i = column; i < cells_.size(); ++i)
    +    cells_[i].cell->column_ = i;
    +}
    +
    +void WTableRow::deleteColumn(int column)
    +{
    +  delete cells_[column].cell;
    +  cells_.erase(cells_.begin() + column);
    +
    +  for (unsigned i = column; i < cells_.size(); ++i)
    +    cells_[i].cell->column_ = i;
    +}
    +
    +int WTableRow::rowNum() const
    +{
    +  return Utils::indexOf(table_->rows_, const_cast<WTableRow *>(this));
    +}
    +
    +void WTableRow::setHeight(const WLength& height)
    +{
    +#ifndef WT_TARGET_JAVA
    +  if (!height_)
    +    height_ = new WLength(height);
    +  else
    +#endif
    +    *height_ = height;
    +
    +  table_->repaintRow(this);
    +}
    +
    +void WTableRow::setStyleClass(const WT_USTRING& style)
    +{
    +  if (WWebWidget::canOptimizeUpdates() && (style == styleClass_))
    +    return;
    +
    +  styleClass_ = style;
    +  table_->repaintRow(this);
    +}
    +
    +WLength WTableRow::height() const
    +{
    +  return height_ ? *height_ : WLength::Auto;
    +}
    +
    +void WTableRow::hide()
    +{
    +  setHidden(true);
    +}
    +
    +void WTableRow::show()
    +{
    +  setHidden(false);
    +}
    +
    +void WTableRow::undoHide()
    +{
    +  setHidden(wasHidden_);
    +}
    +
    +void WTableRow::setHidden(bool how)
    +{
    +  if (WWebWidget::canOptimizeUpdates() && hidden_ == how)
    +    return;
    +
    +  wasHidden_ = hidden_;
    +  hidden_ = how;
    +  hiddenChanged_ = true;
    +
    +  table_->repaintRow(this);
    +}
    +
    +void WTableRow::setId(const std::string& id)
    +{
    +  if (!id_)
    +    id_ = new std::string();
    +
    +  *id_ = id;
    +}
    +
    +const std::string WTableRow::id() const
    +{
    +  if (id_)
    +    return *id_;
    +  else
    +    return WObject::id();
    +}
    +
    +void WTableRow::updateDom(DomElement& element, bool all)
    +{
    +  if (height_)
    +    element.setProperty(PropertyStyleHeight, height_->cssText());
    +
    +  if (!all || !styleClass_.empty())
    +    element.setProperty(PropertyClass, styleClass_.toUTF8());
    +
    +  if ((all && hidden_) || (!all && hiddenChanged_)) {
    +    element.setProperty(PropertyStyleDisplay, hidden_ ? "none" : "");
    +    hiddenChanged_ = false;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTableView b/wt-3.1.7a/src/Wt/WTableView
    new file mode 100644
    index 0000000..954afc0
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableView
    @@ -0,0 +1,207 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_WTABLEVIEW_H_
    +#define WT_WTABLEVIEW_H_
    +
    +#include <Wt/WAbstractItemView>
    +#include <Wt/WContainerWidget>
    +
    +namespace Wt {
    +
    +  class WContainerWidget;
    +  class WModelIndex;
    +
    +/*! \class WTableView Wt/WTableView Wt/WTableView
    + *  \brief An MVC View widget for tabular data.
    + *
    + * The view displays data from a WAbstractItemModel in a table. It
    + * provides incremental rendering, without excessive use of client- or
    + * serverside resources.
    + *
    + * The rendering (and editing) of items is handled by a
    + * WAbstractItemDelegate, by default it uses WItemDelegate which
    + * renders data of all predefined roles (see also Wt::ItemDataRole),
    + * including text, icons, checkboxes, and tooltips.
    + *
    + * The view provides virtual scrolling in both horizontal and vertical
    + * directions, and can therefore be used to display large data models
    + * (with large number of columns and rows).
    + *
    + * The view may support editing of items, if the model indicates
    + * support (see the Wt::ItemIsEditable flag). You can define triggers
    + * that initiate editing of an item using setEditTriggers(). The
    + * actual editing is provided by the item delegate (you can set an
    + * appropriate delegate for one column using
    + * setItemDelegateForColumn()). Using setEditOptions() you can
    + * customize if and how the view deals with multiple editors.
    + *
    + * By default, all columns are given a width of 150px. Column widths
    + * of all columns can be set through the API method setColumnWidth(),
    + * and also by the user using handles provided in the header.
    + *
    + * If the model supports sorting (WAbstractItemModel::sort()), such as
    + * the WStandardItemModel, then you can enable sorting buttons in the
    + * header, using setSortingEnabled().
    + *
    + * You can allow selection on row or item level (using
    + * setSelectionBehavior()), and selection of single or multiple items
    + * (using setSelectionMode()), and listen for changes in the selection
    + * using the selectionChanged() signal.
    + *
    + * You may enable drag & drop support for this view, whith awareness
    + * of the items in the model. When enabling dragging (see
    + * setDragEnabled()), the current selection may be dragged, but only
    + * when all items in the selection indicate support for dragging
    + * (controlled by the \link Wt::ItemIsDragEnabled
    + * ItemIsDragEnabled\endlink flag), and if the model indicates a
    + * mime-type (controlled by WAbstractItemModel::mimeType()). Likewise,
    + * by enabling support for dropping (see setDropsEnabled()), the view
    + * may receive a drop event on a particular item, at least if the item
    + * indicates support for drops (controlled by the \link
    + * Wt::ItemIsDropEnabled ItemIsDropEnabled\endlink flag).
    + *
    + * You may also react to mouse click events on any item, by connecting
    + * to one of the clicked() or doubleClicked() signals.
    + *
    + * \ingroup modelview
    + */
    +class WT_API WTableView : public WAbstractItemView
    +{
    +public:
    +  /*! \brief Constructor
    +   */
    +  WTableView(WContainerWidget *parent = 0);
    +
    +  virtual ~WTableView();
    +
    +  virtual void setModel(WAbstractItemModel* model);
    +
    +  virtual void setColumnWidth(int column, const WLength& width);
    +  virtual void setAlternatingRowColors(bool enable);
    +  virtual void setRowHeight(const WLength& rowHeight);
    +  virtual void setHeaderHeight(const WLength& height, bool multiLine = false);
    +  virtual void setColumnBorder(const WColor& color);
    +  virtual void resize(const WLength& width, const WLength& height);
    +  virtual void setColumnHidden(int column, bool hidden);
    +
    +  virtual int pageCount() const;
    +  virtual int pageSize() const;
    +  virtual int currentPage() const;
    +  virtual void setCurrentPage(int page);
    +
    +private:
    +  class ColumnWidget : public WContainerWidget
    +  {
    +  public:
    +    ColumnWidget(WTableView *view, int column);
    +    int column() const { return column_; }
    +
    +  private:
    +    int column_;
    +  };
    +
    +  /* For Ajax implementation */
    +  WContainerWidget *headers_, *canvas_, *table_;
    +  WContainerWidget *headerContainer_, *contentsContainer_;
    +
    +  /* For plain HTML implementation */
    +  WTable *plainTable_;
    +
    +  JSignal<int, int, std::string, std::string, WMouseEvent> dropEvent_;
    +  JSignal<int, int> columnWidthChanged_;
    +  JSignal<int, int, int, int> scrolled_;
    +
    +  /* Ajax only: First and last columns rendered (this somewhat
    +   * redundant with the state contained in the widgets, but because
    +   * columns are variable width, we cache these values as well). The
    +   * first and last rows rendered can be derived from widget
    +   * properties. */
    +  int firstColumn_, lastColumn_;
    +
    +  /* Current size of the viewport */
    +  int viewportLeft_, viewportWidth_, viewportTop_, viewportHeight_;
    +
    +  /* Desired rendered area */
    +  int renderedFirstRow_, renderedLastRow_,
    +    renderedFirstColumn_, renderedLastColumn_;
    +
    +  int tabIndex_;
    +
    +  void updateTableBackground();
    +
    +  ColumnWidget *columnContainer(int renderedColumn) const;
    +
    +  void modelColumnsInserted(const WModelIndex& parent, int start, int end);
    +  void modelColumnsAboutToBeRemoved(const WModelIndex& parent,
    +				    int start, int end);
    +  void modelRowsInserted(const WModelIndex& parent, int start, int end);
    +  void modelRowsAboutToBeRemoved(const WModelIndex& parent, int start, int end);
    +  void modelRowsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelDataChanged(const WModelIndex& topLeft,
    +			const WModelIndex& bottomRight);
    +  void modelHeaderDataChanged(Orientation orientation, int start, int end);
    +
    +  virtual void modelLayoutChanged();
    +
    +  WWidget* renderWidget(WWidget* w, const WModelIndex& index);
    +
    +  int spannerCount(const Side side) const;
    +  void setSpannerCount(const Side side, const int count);
    +
    +  void renderTable(const int firstRow, const int lastRow, 
    +		   const int firstColumn, const int lastColumn);
    +  void addSection(const Side side, const std::vector<WWidget *>& items);
    +  void removeSection(const Side side);
    +  int firstRow() const;
    +  int lastRow() const;
    +  int firstColumn() const;
    +  int lastColumn() const;
    +
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +  void reset();
    +  void rerenderHeader();
    +  void rerenderData();
    +  void adjustToViewport();
    +  void computeRenderedArea();
    +
    +  WContainerWidget* headerContainer() { return headerContainer_; }
    +
    +  virtual WWidget *headerWidget(int column, bool contentsOnly = true);
    +
    +  void onViewportChange(int left, int top, int width, int height);
    +  void resetGeometry();
    +  
    +  void handleSingleClick(const WMouseEvent& event);
    +  void handleDoubleClick(const WMouseEvent& event);
    +  void handleMouseWentDown(const WMouseEvent& event);
    +  WModelIndex translateModelIndex(const WMouseEvent& event);
    +
    +  virtual bool internalSelect(const WModelIndex& index, SelectionFlag option);
    +  virtual void selectRange(const WModelIndex& first, const WModelIndex& last);
    +  void shiftModelIndexes(int start, int count);
    +  void renderSelected(bool selected, const WModelIndex& index);
    +
    +  void defineJavaScript();
    +
    +  bool isRowRendered(const int row);
    +  bool isColumnRendered(const int column);
    +  void updateColumnOffsets();
    +
    +  void onDropEvent(int renderedRow, int columnId,
    +		   std::string sourceId, std::string mimeType,
    +		   WMouseEvent event);
    +
    +  void deleteItem(int row, int col, WWidget *widget);
    +
    +  bool ajaxMode() const { return table_ != 0; }
    +  double canvasHeight() const;
    +};
    +
    +}
    +
    +#endif // WT_WTABLEVIEW_H
    diff --git a/wt-3.1.7a/src/Wt/WTableView.C b/wt-3.1.7a/src/Wt/WTableView.C
    new file mode 100644
    index 0000000..4257984
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTableView.C
    @@ -0,0 +1,1497 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WTableView"
    +
    +#include "Wt/WTable"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WModelIndex"
    +#include "Wt/WAbstractItemDelegate"
    +#include "Wt/WApplication"
    +#include "Wt/WText"
    +#include "Wt/WItemDelegate"
    +#include "Wt/WEnvironment"
    +#include "Wt/WVBoxLayout"
    +#include "Wt/WVBoxLayout"
    +
    +#include "JavaScriptLoader.h"
    +#include "Utils.h"
    +#include "EscapeOStream.h"
    +
    +#ifndef WT_DEBUG_JS
    +
    +#include "js/WTableView.min.js"
    +#endif
    +
    +#include <iostream>
    +#include <math.h>
    +
    +// TODO:
    +//  call updateModelIndex when shifting indexes
    +
    +namespace Wt {
    +
    +WTableView::WTableView(WContainerWidget *parent)
    +  : WAbstractItemView(parent),
    +    headers_(0),
    +    canvas_(0),
    +    table_(0),
    +    headerContainer_(0),
    +    contentsContainer_(0),
    +    plainTable_(0),
    +    dropEvent_(impl_, "dropEvent"),
    +    columnWidthChanged_(impl_, "columnResized"),
    +    scrolled_(impl_, "scrolled"),
    +    viewportLeft_(0),
    +    viewportWidth_(1000),
    +    viewportTop_(0),
    +    viewportHeight_(600)
    +{ 
    +  setSelectable(false);
    +
    +  dropEvent_.connect(this, &WTableView::onDropEvent);
    +
    +  setStyleClass("Wt-tableview");
    +
    +  const char *CSS_RULES_NAME = "Wt::WTableView";
    +  
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->styleSheet().isDefined(CSS_RULES_NAME)) {
    +    /* header */
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-headertable",
    +       "-moz-user-select: none;"
    +       "-khtml-user-select: none;"
    +       "user-select: none;"
    +       "overflow: hidden;"
    +       "width: 100%;", CSS_RULES_NAME);
    +
    +    if (app->environment().agentIsIE())
    +      app->styleSheet().addRule
    +	(".Wt-tableview .Wt-header .Wt-label",
    +	 "zoom: 1;");
    +
    +    /* resize handles */
    +    app->styleSheet().addRule
    +      (".Wt-tableview div.Wt-tv-rh",
    +       "float: right; width: 4px; cursor: col-resize;"
    +       "padding-left: 0px;");
    +    
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-header-el, .Wt-tableview .Wt-tv-c",
    +       "text-overflow: ellipsis;"
    +       "overflow: hidden;"
    +       "white-space: nowrap;"
    +       "padding: 0px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-header .Wt-tv-c",
    +       "overflow: visible;"
    +       "padding-left: 6px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-contents .Wt-tv-c,"
    +       ".Wt-plaintable .Wt-tv-c",
    +       "padding: 0px 3px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-rh:hover",
    +       "background-color: #DDDDDD;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-tableview div.Wt-tv-rhc0",
    +       "float: left; width: 4px;");
    +
    +    /* sort handles */
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-sh", std::string() +
    +       "float: right; width: 16px; height: 16px; padding-bottom: 6px;"
    +       "cursor: pointer; cursor:hand;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-sh-nrh", std::string() + 
    +       "float: right; width: 16px; height: 16px;"
    +       "cursor: pointer; cursor:hand;");
    +
    +    /* borders: needed here for IE */
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-br, "
    +       ".Wt-tableview .Wt-tv-contents .Wt-tv-c",
    +       "border-right: 1px solid white;");
    +
    +    /* data item icons */
    +    app->styleSheet().addRule
    +      (".Wt-tableview .Wt-tv-contents img.icon, "
    +       ".Wt-tableview .Wt-tv-contents input.icon",
    +       "margin: 0px 3px 2px 0px; vertical-align: middle");
    +  }
    +
    +  /* item drag & drop */
    +  app->styleSheet().addRule
    +    ("#" + id() + "dw",
    +     "width: 32px; height: 32px;"
    +     "background: url(" + WApplication::resourcesUrl() + "items-not-ok.gif);");
    +
    +  app->styleSheet().addRule
    +    ("#" + id() + "dw.Wt-valid-drop",
    +     "width: 32px; height: 32px;"
    +     "background: url(" + WApplication::resourcesUrl() + "items-ok.gif);");
    +
    +  if (app->environment().ajax()) {
    +    impl_->setPositionScheme(Relative);
    +
    +    headers_ = new WContainerWidget();
    +    headers_->setStyleClass("Wt-headertable headerrh");
    +
    +    table_ = new WContainerWidget();
    +    table_->setStyleClass("Wt-tv-contents");
    +
    +    WVBoxLayout *layout = new WVBoxLayout();
    +    layout->setSpacing(0);
    +    layout->setContentsMargins(0, 0, 0, 0);
    +
    +    headerContainer_ = new WContainerWidget();
    +    headerContainer_->setStyleClass("Wt-header headerrh cwidth");
    +    headerContainer_->setOverflow(WContainerWidget::OverflowHidden);
    +    headerContainer_->addWidget(headers_);
    +
    +    contentsContainer_ = new WContainerWidget();
    +    contentsContainer_->setStyleClass("cwidth");
    +    contentsContainer_->setOverflow(WContainerWidget::OverflowAuto);
    +    contentsContainer_->setPositionScheme(Absolute);
    +
    +    canvas_ = new WContainerWidget();
    +    canvas_->setStyleClass("Wt-spacer");
    +    canvas_->setPositionScheme(Relative);
    +    canvas_->clicked()      .connect(this, &WTableView::handleSingleClick);
    +    canvas_->doubleClicked().connect(this, &WTableView::handleDoubleClick);
    +    canvas_->mouseWentDown().connect(this, &WTableView::handleMouseWentDown); 
    +    canvas_->addWidget(table_);
    +
    +    table_->setPositionScheme(Absolute);
    +    table_->resize(WLength(100, WLength::Percentage), WLength::Auto);
    +
    +    contentsContainer_->addWidget(canvas_);
    +
    +    scrolled_.connect(this, &WTableView::onViewportChange);
    +
    +    layout->addWidget(headerContainer_);
    +    layout->addWidget(contentsContainer_, 1);
    +
    +    impl_->setLayout(layout);
    +
    +    app->addAutoJavaScript
    +      ("{var obj = $('#" + id() + "').data('obj');"
    +       "if (obj) obj.autoJavaScript();}");
    +
    +    connectObjJS(canvas_->mouseWentDown(), "mouseDown");
    +  } else {
    +    plainTable_ = new WTable();
    +    plainTable_->setStyleClass("Wt-plaintable");
    +    plainTable_->setAttributeValue("style", "table-layout: fixed;");
    +    plainTable_->setHeaderCount(1);
    +
    +    impl_->addWidget(plainTable_);
    +
    +    resize(width(), height());
    +  }
    +
    +  setRowHeight(rowHeight());
    +
    +  updateTableBackground();
    +}
    +
    +void WTableView::resize(const WLength& width, const WLength& height)
    +{
    +  if (ajaxMode()) {
    +    if (!height.isAuto()) {
    +      viewportHeight_
    +	= static_cast<int>(ceil((height.toPixels()
    +				 - headerHeight().toPixels())));
    +    }
    +  } else { // Plain HTML mode
    +    if (!plainTable_) // Not yet rendered
    +      return;
    +
    +    plainTable_->resize(width, WLength::Auto);
    +
    +    if (!height.isAuto()) {
    +      if (impl_->count() < 2)
    +	impl_->addWidget(createPageNavigationBar());
    +    }
    +  }
    +
    +  computeRenderedArea();
    +
    +  WCompositeWidget::resize(width, height);
    +
    +  scheduleRerender(NeedAdjustViewPort);
    +}
    +
    +WTableView::~WTableView()
    +{ 
    +  impl_->clear();
    +}
    +
    +void WTableView::updateTableBackground()
    +{
    +  std::string backgroundImage;
    +
    +  if (alternatingRowColors())
    +    backgroundImage = "/stripes/stripe-";
    +  else
    +    backgroundImage = "/no-stripes/no-stripe-";
    +
    +  backgroundImage = WApplication::resourcesUrl()
    +    + "themes/" + WApplication::instance()->cssTheme()
    +    + backgroundImage 
    +    + boost::lexical_cast<std::string>(static_cast<int>(rowHeight().toPixels()))
    +    + "px.gif";
    +
    +  if (ajaxMode())
    +    table_->decorationStyle().setBackgroundImage(backgroundImage);
    +  else
    +    // FIXME avoid background on header row ?
    +    plainTable_->decorationStyle().setBackgroundImage(backgroundImage);	
    +}
    +
    +void WTableView::setModel(WAbstractItemModel* model)
    +{  
    +  WAbstractItemView::setModel(model);
    +
    +  /* connect slots to new model */
    +  modelConnections_.push_back(model->columnsInserted().connect
    +			      (this, &WTableView::modelColumnsInserted));
    +  modelConnections_.push_back(model->columnsAboutToBeRemoved().connect
    +			     (this, &WTableView::modelColumnsAboutToBeRemoved));
    +  modelConnections_.push_back(model->rowsInserted().connect
    +			      (this, &WTableView::modelRowsInserted));
    +  modelConnections_.push_back(model->rowsAboutToBeRemoved().connect
    +			      (this, &WTableView::modelRowsAboutToBeRemoved));
    +  modelConnections_.push_back(model->rowsRemoved().connect
    +			      (this, &WTableView::modelRowsRemoved));
    +  modelConnections_.push_back(model->dataChanged().connect
    +			      (this, &WTableView::modelDataChanged));
    +  modelConnections_.push_back(model->headerDataChanged().connect
    +			      (this, &WTableView::modelHeaderDataChanged));
    +  modelConnections_.push_back(model->layoutAboutToBeChanged().connect
    +			      (this, &WTableView::modelLayoutAboutToBeChanged));
    +  modelConnections_.push_back(model->layoutChanged().connect
    +			      (this, &WTableView::modelLayoutChanged));
    +  modelConnections_.push_back(model->modelReset().connect
    +			      (this, &WTableView::modelReset));
    +}
    +
    +WWidget* WTableView::renderWidget(WWidget* widget, const WModelIndex& index) 
    +{
    +  WAbstractItemDelegate *itemDelegate = this->itemDelegate(index.column());
    +
    +  WFlags<ViewItemRenderFlag> renderFlags = 0;
    +
    +  if (ajaxMode()) {
    +    if (   (selectionBehavior() == SelectItems && isSelected(index))
    +	   || (selectionBehavior() == SelectRows
    +	       && isSelected(model()->index(index.row(), 0, rootIndex()))))
    +      renderFlags |= RenderSelected;
    +  }
    +
    +  if (isEditing(index)) {
    +    renderFlags |= RenderEditing;
    +    if (hasEditFocus(index))
    +      renderFlags |= RenderFocused;
    +  }
    +
    +  if (!isValid(index)) {
    +    renderFlags |= RenderInvalid;
    +  }
    +
    +  bool initial = !widget;
    +
    +  widget = itemDelegate->update(widget, index, renderFlags);
    +  widget->setInline(false);
    +  widget->addStyleClass("Wt-tv-c");
    +  widget->resize(WLength::Auto, rowHeight());
    +
    +  if (renderFlags & RenderEditing) {
    +    widget->setTabIndex(-1);
    +    setEditorWidget(index, widget);
    +  }
    +
    +  if (initial) {
    +    /*
    +     * If we are re-creating an old editor, then reset its current edit
    +     * state (we do not actually check if it is an old editor, but we could
    +     * now with stateSaved)
    +     */
    +    if (renderFlags & RenderEditing) {
    +      boost::any state = editState(index);
    +      if (!state.empty())
    +	itemDelegate->setEditState(widget, state);
    +    }
    +  }
    +
    +  return widget;
    +}
    +
    +int WTableView::spannerCount(const Side side) const
    +{
    +  assert(ajaxMode());
    +
    +  switch (side) {
    +  case Top: {
    +    return (int)(table_->offset(Top).toPixels() / rowHeight().toPixels());
    +  }
    +  case Bottom: {
    +    return (int)(model()->rowCount(rootIndex())
    +      - (table_->offset(Top).toPixels() + table_->height().toPixels())
    +		 / rowHeight().toPixels());
    +  }
    +  case Left:
    +    return firstColumn_;
    +  case Right:
    +    return columnCount() - (lastColumn_ + 1);
    +  default:
    +    assert(false);
    +    return -1;
    +  }
    +}
    +
    +void WTableView::setSpannerCount(const Side side, const int count)
    +{
    +  assert(ajaxMode());
    +
    +  switch (side) {
    +  case Top: {
    +    int size = model()->rowCount(rootIndex()) - count - spannerCount(Bottom);
    +    table_->setOffsets(count * rowHeight().toPixels(), Top);
    +    table_->resize(table_->width(), size * rowHeight().toPixels());
    +    break;
    +  }
    +  case Bottom: {
    +    int size = model()->rowCount(rootIndex()) - spannerCount(Top) - count;
    +    table_->resize(table_->width(), size * rowHeight().toPixels());
    +    break;
    +  }
    +  case Left: {
    +    int total = 0;
    +    for (int i = 0; i < count; i++)
    +      if (!columnInfo(i).hidden)
    +	total += (int)columnInfo(i).width.toPixels() + 7;
    +    table_->setOffsets(total, Left);
    +    firstColumn_ = count;
    +    break;
    +  }
    +  case Right:
    +    lastColumn_ = columnCount() - count - 1;
    +    break;
    +  default:
    +    assert(false);
    +  }
    +}
    +
    +int WTableView::firstRow() const
    +{
    +  if (ajaxMode())
    +    return spannerCount(Top);
    +  else
    +    return renderedFirstRow_;
    +}
    +
    +int WTableView::lastRow() const
    +{
    +  if (ajaxMode())
    +    return model()->rowCount(rootIndex()) - spannerCount(Bottom) - 1;
    +  else
    +    return renderedLastRow_;
    +}
    +
    +int WTableView::firstColumn() const
    +{
    +  if (ajaxMode())
    +    return firstColumn_;
    +  else
    +    return 0;
    +}
    +
    +int WTableView::lastColumn() const
    +{
    +  if (ajaxMode())
    +    return lastColumn_;
    +  else
    +    return model()->columnCount(rootIndex()) - 1;
    +}
    +
    +void WTableView::addSection(const Side side,
    +			    const std::vector<WWidget *>& items)
    +{
    +  assert(ajaxMode());
    +
    +  switch (side) {
    +  case Top:
    +    for (unsigned i = 0; i < items.size(); ++i) {
    +      ColumnWidget *w = columnContainer(i);
    +      w->insertWidget(0, items[i]);
    +    }
    +
    +    setSpannerCount(side, spannerCount(side) - 1);
    +    break;
    +  case Bottom:
    +    for (unsigned i = 0; i < items.size(); ++i) {
    +      ColumnWidget *w = columnContainer(i);
    +      w->addWidget(items[i]);
    +    }
    +
    +    setSpannerCount(side, spannerCount(side) - 1);
    +    break;
    +  case Left: {
    +    ColumnWidget *w = new ColumnWidget(this, firstColumn() - 1);
    +    for (unsigned i = 0; i < items.size(); ++i)
    +      w->addWidget(items[i]);
    +
    +    if (!columnInfo(w->column()).hidden)
    +      table_->setOffsets(table_->offset(Left).toPixels()
    +			 - columnWidth(w->column()).toPixels() - 7, Left);
    +    else
    +      w->hide();
    +
    +    --firstColumn_;
    +    break;
    +  }
    +  case Right: {
    +    ColumnWidget *w = new ColumnWidget(this, lastColumn() + 1);
    +    for (unsigned i = 0; i < items.size(); ++i)
    +      w->addWidget(items[i]);
    +    if (columnInfo(w->column()).hidden)
    +      w->hide();
    +
    +    ++lastColumn_;
    +    break;
    +  }
    +  default:
    +    assert(false);
    +  }
    +}
    +
    +void WTableView::deleteItem(int row, int col, WWidget *w)
    +{
    +  WModelIndex index = model()->index(row, col, rootIndex());
    +
    +  if (isEditing(index)) {
    +    setEditState(index, itemDelegate(col)->editState(w));
    +    setEditorWidget(index, 0);
    +  }
    +
    +  delete w;
    +}
    +
    +void WTableView::removeSection(const Side side)
    +{
    +  assert(ajaxMode());
    +
    +  int row = firstRow(), col = firstColumn();
    +
    +  switch (side) {
    +  case Top:
    +    setSpannerCount(side, spannerCount(side) + 1);
    +
    +    for (int i = 0; i < table_->count(); ++i) {
    +      ColumnWidget *w = columnContainer(i);
    +      deleteItem(row, col + i, w->widget(0));
    +    }
    +    break;
    +  case Bottom:
    +    row = lastRow();
    +    setSpannerCount(side, spannerCount(side) + 1);
    +
    +    for (int i = 0; i < table_->count(); ++i) {
    +      ColumnWidget *w = columnContainer(i);
    +      deleteItem(row, col + i, w->widget(w->count() - 1));
    +    }
    +    break;
    +  case Left: {
    +    ColumnWidget *w = columnContainer(0);
    +
    +    if (!columnInfo(w->column()).hidden)
    +      table_->setOffsets(table_->offset(Left).toPixels()
    +			 + columnWidth(w->column()).toPixels() + 7, Left);
    +    ++firstColumn_;
    +
    +    for (int i = w->count() - 1; i >= 0; --i)
    +      deleteItem(row + i, col, w->widget(i));
    +
    +    delete w;
    +
    +    break;
    +  }
    +  case Right: {
    +    ColumnWidget *w = columnContainer(-1);
    +    col = w->column();
    +
    +    --lastColumn_;
    +
    +    for (int i = w->count() - 1; i >= 0; --i)
    +      deleteItem(row + i, col, w->widget(i));
    +
    +    delete w;
    +
    +    break;
    +  }
    +  default:
    +    break;
    +  }
    +}
    +
    +void WTableView::renderTable(const int fr, const int lr,
    +			     const int fc, const int lc)
    +{
    +  assert(ajaxMode());
    +
    +  if (fr > lastRow() || firstRow() > lr || 
    +      fc > lastColumn() || firstColumn() > lc)
    +    reset();
    +
    +  int oldFirstRow = firstRow();
    +  int oldLastRow = lastRow();
    +
    +  int topRowsToAdd = 0;
    +  int bottomRowsToAdd = 0;
    +
    +  if (oldLastRow - oldFirstRow < 0) {
    +    topRowsToAdd = 0;
    +    setSpannerCount(Top, fr);
    +    setSpannerCount(Bottom, spannerCount(Bottom) - fr);
    +    bottomRowsToAdd = lr - fr + 1;
    +  } else {
    +    topRowsToAdd = firstRow() - fr;
    +    bottomRowsToAdd = lr - lastRow();
    +  }
    +
    +  int oldFirstCol = firstColumn();
    +  int oldLastCol = lastColumn();
    +
    +  int leftColsToAdd = 0;
    +  int rightColsToAdd = 0;
    + 
    +  if (oldLastCol - oldFirstCol < 0) {
    +    leftColsToAdd = 0;
    +    setSpannerCount(Left, fc);
    +    setSpannerCount(Right, spannerCount(Right) - fc);
    +    rightColsToAdd = lc - fc + 1;
    +  } else {
    +    leftColsToAdd = firstColumn() - fc;
    +    rightColsToAdd = lc - lastColumn();
    +  }
    +
    +  // Remove columns
    +  for (int i = 0; i < -leftColsToAdd; ++i)
    +    removeSection(Left);
    +  for (int i = 0; i < -rightColsToAdd; ++i)
    +    removeSection(Right);
    +
    +  // Remove rows
    +  for (int i = 0; i < -topRowsToAdd; ++i)
    +    removeSection(Top);
    +  for (int i = 0; i < -bottomRowsToAdd; ++i)
    +    removeSection(Bottom);
    +
    +  // Add rows
    +  for (int i = 0; i < topRowsToAdd; i++) {
    +    int row = firstRow() - 1;
    +
    +    std::vector<WWidget *> items;
    +    for (int j = firstColumn(); j <= lastColumn(); ++j)
    +      items.push_back(renderWidget(0, model()->index(row, j, rootIndex())));
    +
    +    addSection(Top, items);
    +  }
    +
    +  for (int i = 0; i < bottomRowsToAdd; ++i) {
    +    int row = lastRow() + 1;
    +
    +    std::vector<WWidget *> items;
    +    for (int j = firstColumn(); j <= lastColumn(); ++j)
    +      items.push_back(renderWidget(0, model()->index(row, j, rootIndex())));
    +
    +    addSection(Bottom, items);
    +  }
    +
    +  // Add columns
    +  for (int i = 0; i < leftColsToAdd; ++i) {
    +    int col = firstColumn() - 1;
    +
    +    std::vector<WWidget *> items;
    +    for (int j = firstRow(); j <= lastRow(); ++j)
    +      items.push_back(renderWidget(0, model()->index(j, col, rootIndex())));
    +
    +    addSection(Left, items);
    +  }
    +
    +  for (int i = 0; i < rightColsToAdd; ++i) {
    +    int col = lastColumn() + 1;
    +
    +    std::vector<WWidget *> items;
    +    for (int j = firstRow(); j <= lastRow(); ++j)
    +      items.push_back(renderWidget(0, model()->index(j, col, rootIndex())));
    +
    +    addSection(Right, items);
    +  }
    +
    +  updateColumnOffsets();
    +
    +  int scrollX1 = std::max(0, viewportLeft_ - viewportWidth_ / 2);
    +  int scrollX2 = viewportLeft_ + viewportWidth_ + viewportWidth_ / 2;
    +  int scrollY1 = std::max(0, viewportTop_ - viewportHeight_ / 2);
    +  int scrollY2 = viewportTop_ + viewportHeight_ + viewportHeight_ / 2;
    +
    +  SStream s;
    +
    +  s << "jQuery.data(" << jsRef() << ", 'obj').scrolled("
    +    << scrollX1 << ", " << scrollX2 << ", " << scrollY1 << ", " << scrollY2
    +    << ");";
    +
    +  WApplication::instance()->doJavaScript(s.str());			
    +}
    +
    +void WTableView::resetGeometry()
    +{
    +  if (ajaxMode()) {
    +    reset();
    +  } else { // plain HTML
    +    renderedLastRow_
    +      = std::min(model()->rowCount(rootIndex()) - 1,
    +		 renderedFirstRow_ + pageSize() - 1);
    +    renderedLastColumn_ = model()->columnCount(rootIndex()) - 1;
    +  }
    +}
    +
    +double WTableView::canvasHeight() const
    +{
    +  return std::max(1.0,
    +		  model()->rowCount(rootIndex()) * rowHeight().toPixels());
    +}
    +
    +void WTableView::reset()
    +{
    +  assert(ajaxMode());
    +
    +  int total = 0;
    +  for (int i = 0; i < columnCount(); ++i)
    +    if (!columnInfo(i).hidden)
    +      total += (int)columnInfo(i).width.toPixels() + 7;
    +
    +  headers_->resize(total, headers_->height());
    +  canvas_->resize(total, canvasHeight());
    +
    +  computeRenderedArea();
    +
    +  int renderedRows = lastRow() - firstRow() + 1;
    +  for (int i = 0; i < renderedRows; ++i)
    +    removeSection(Top);
    +
    +  setSpannerCount(Top, 0);
    +  setSpannerCount(Left, 0);
    +
    +  table_->clear();
    +
    +  setSpannerCount(Bottom, model()->rowCount(rootIndex()));
    +  setSpannerCount(Right, columnCount());
    +}
    +
    +void WTableView::defineJavaScript()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  const char *THIS_JS = "js/WTableView.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WTableView", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  app->doJavaScript("new " WT_CLASS ".WTableView("
    +		    + app->javaScriptClass() + "," + jsRef() + ","
    +		    + contentsContainer_->jsRef() + ","
    +		    + headerContainer_->jsRef() + ");");
    +}
    +
    +void WTableView::render(WFlags<RenderFlag> flags)
    +{
    +  if (ajaxMode() && (flags & RenderFull))
    +    defineJavaScript();
    +
    +  if (model())
    +    while (renderState_ != RenderOk) {
    +      RenderState s = renderState_;
    +      renderState_ = RenderOk;
    +
    +      switch (s) {
    +      case NeedRerender:
    +	resetGeometry();
    +	rerenderHeader();
    +	rerenderData();
    +	break;
    +      case NeedRerenderHeader:
    +	rerenderHeader();
    +	break;
    +      case NeedRerenderData:
    +	rerenderData();
    +	break;
    +      case NeedAdjustViewPort:
    +	adjustToViewport();
    +	break;
    +      default:
    +	break;
    +      }
    +    }
    +
    +  WAbstractItemView::render(flags);
    +}
    +
    +void WTableView::rerenderData()
    +{
    +  if (ajaxMode()) {
    +    reset();
    +
    +    renderTable(renderedFirstRow_, 
    +		renderedLastRow_, 
    +		renderedFirstColumn_, 
    +		renderedLastColumn_);
    +  } else {
    +    pageChanged().emit();
    +
    +    while (plainTable_->rowCount() > 1)
    +      plainTable_->deleteRow(plainTable_->rowCount() - 1);
    +
    +    for (int i = firstRow(); i <= lastRow(); ++i) {
    +      int renderedRow = i - firstRow();
    +
    +      if (selectionBehavior() == SelectRows
    +	  && isSelected(model()->index(i, 0, rootIndex()))) {
    +	WTableRow *row = plainTable_->rowAt(renderedRow + 1);
    +	row->setStyleClass("Wt-selected");
    +      }
    +
    +      for (int j = firstColumn(); j <= lastColumn(); ++j) {
    +	int renderedCol = j - firstColumn();
    +
    +	WModelIndex index = model()->index(i, j, rootIndex());
    +	WWidget *w = renderWidget(0, index);
    +	WTableCell *cell = plainTable_->elementAt(renderedRow + 1, renderedCol);
    +	cell->addWidget(w);
    +
    +	WInteractWidget *wi = dynamic_cast<WInteractWidget *>(w);
    +	if (wi && !isEditing(index))
    +	  clickedMapper_->mapConnect1(wi->clicked(), index);
    +
    +	if (selectionBehavior() == SelectItems && isSelected(index))
    +	  cell->setStyleClass("Wt-selected");
    +      }
    +    }
    +  }
    +}
    +
    +void WTableView::rerenderHeader()
    +{
    +  for (int i = 0; i < columnCount(); ++i) {
    +    WWidget *w = columnInfo(i).extraHeaderWidget;
    +    if (!w)
    +      columnInfo(i).extraHeaderWidget = createExtraHeaderWidget(i);
    +    else
    +      dynamic_cast<WContainerWidget *>(w->parent())->removeWidget(w);
    +  }
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (ajaxMode()) {
    +    headers_->clear();
    +
    +    for (int i = 0; i < columnCount(); ++i) {
    +      WWidget *w = createHeaderWidget(app, i);
    +      w->setFloatSide(Left);
    +      headers_->addWidget(w);
    +      w->resize(columnInfo(i).width.toPixels() + 1, WLength::Auto);
    +      if (columnInfo(i).hidden)
    +	w->hide();
    +    }
    +  } else { // Plain HTML mode
    +    for (int i = 0; i < columnCount(); ++i) {
    +      WWidget *w = createHeaderWidget(app, i);
    +      WTableCell *cell = plainTable_->elementAt(0, i);
    +      cell->addWidget(w);
    +      w->resize(columnInfo(i).width.toPixels() + 1, WLength::Auto);
    +      cell->resize(columnInfo(i).width.toPixels() + 1, w->height());
    +      if (columnInfo(i).hidden)
    +	cell->hide();
    +    }
    +  }
    +
    +  if (model())
    +    modelHeaderDataChanged(Horizontal, 0, columnCount() - 1);
    +}
    +
    +void WTableView::setColumnHidden(int column, bool hidden)
    +{
    +  if (columnInfo(column).hidden != hidden) {
    +    WAbstractItemView::setColumnHidden(column, hidden);
    +
    +    int delta = static_cast<int>(columnInfo(column).width.toPixels()) + 7;
    +    if (hidden)
    +      delta = -delta;
    +
    +    headers_->resize(headers_->width().toPixels() + delta, headers_->height());
    +    canvas_->resize(canvas_->width().toPixels() + delta, canvas_->height());
    +
    +    if (isColumnRendered(column))
    +      updateColumnOffsets();
    +    else
    +      if (column < firstColumn())
    +	setSpannerCount(Left, spannerCount(Left));
    +
    +    WWidget *hc = headers_->widget(column);
    +    if (!ajaxMode())
    +      hc->parent()->setHidden(hidden);
    +    else
    +      hc->setHidden(hidden);
    +  }
    +}
    +
    +void WTableView::setColumnWidth(int column, const WLength& width)
    +{
    +  int delta = (int)(width.toPixels() - columnInfo(column).width.toPixels());
    +  columnInfo(column).width = width;
    +
    +  if (columnInfo(column).hidden)
    +    delta = 0;
    +
    +  if (ajaxMode()) {
    +    headers_->resize(headers_->width().toPixels() + delta, headers_->height());
    +    canvas_->resize(canvas_->width().toPixels() + delta, canvas_->height());
    +
    +    if (renderState_ >= NeedRerenderHeader)
    +      return;
    +
    +    if (isColumnRendered(column))
    +      updateColumnOffsets();
    +    else
    +      if (column < firstColumn())
    +	setSpannerCount(Left, spannerCount(Left));
    +  }
    +
    +  if (renderState_ >= NeedRerenderHeader)
    +    return;
    +
    +  WWidget *hc = headers_->widget(column);
    +  hc->resize(width.toPixels() + 1, hc->height());
    +  if (!ajaxMode())
    +    hc->parent()->resize(width.toPixels() + 1, hc->height());
    +}
    +
    +bool WTableView::isRowRendered(const int row)
    +{
    +  return row >= firstRow() && row <= lastRow();
    +}
    +
    +bool WTableView::isColumnRendered(const int column)
    +{
    +  return column >= firstColumn() && column <= lastColumn();
    +}
    +
    +WTableView::ColumnWidget::ColumnWidget(WTableView *view, int column)
    +  : column_(column)
    +{
    +  assert(view->ajaxMode());
    +
    +  WTableView::ColumnInfo& ci = view->columnInfo(column);
    +  setStyleClass(ci.styleClass());
    +  setPositionScheme(Absolute);
    +  setOffsets(0, Top | Left);
    +  setOverflow(OverflowHidden);
    +
    +  if (view->table_->count() == 0
    +      || column > view->columnContainer(-1)->column())
    +    view->table_->addWidget(this);
    +  else
    +    view->table_->insertWidget(0, this);
    +}
    +
    +WTableView::ColumnWidget *WTableView::columnContainer(int renderedColumn) const
    +{
    +  assert(ajaxMode());
    +
    +  if (table_->count() > 0) {
    +    if (renderedColumn < 0)
    +      return dynamic_cast<ColumnWidget *>(table_->widget(table_->count() - 1));
    +    else
    +      return dynamic_cast<ColumnWidget *>(table_->widget(renderedColumn));
    +  } else
    +    return 0;
    +}
    +
    +void WTableView::updateColumnOffsets()
    +{
    +  assert(ajaxMode());
    +
    +  int fc = firstColumn();
    +  int lc = lastColumn();
    +
    +  int totalRendered = 0, total = 0;
    +  for (int i = 0; i < columnCount(); ++i) {
    +    ColumnInfo ci = columnInfo(i);
    +
    +    if (i >= fc && i <= lc) {
    +      ColumnWidget *w = columnContainer(i - fc);
    +
    +      w->setOffsets(totalRendered, Left);
    +      w->resize(ci.width.toPixels() + 7, WLength::Auto);
    +
    +      if (!columnInfo(i).hidden)
    +	totalRendered += (int)columnInfo(i).width.toPixels() + 7;
    +
    +      w->setHidden(columnInfo(i).hidden);
    +    }
    +
    +    if (!columnInfo(i).hidden)
    +      total += (int)columnInfo(i).width.toPixels() + 7;
    +  }
    +
    +  canvas_->resize(total, canvasHeight());
    +  headers_->resize(total, headers_->height());
    +}
    +
    +void WTableView::setRowHeight(const WLength& rowHeight)
    +{
    +  int renderedRowCount = model() ? lastRow() - firstRow() + 1 : 0;
    +
    +  WAbstractItemView::setRowHeight(rowHeight);
    +
    +  if (ajaxMode()) {
    +    canvas_->setAttributeValue("style", "line-height: " + rowHeight.cssText());
    +
    +    if (model()) {
    +      canvas_->resize(canvas_->width(), canvasHeight());
    +      table_->resize(table_->width(), renderedRowCount * rowHeight.toPixels());
    +    }
    +  } else // Plain HTML mode
    +    resize(width(), height());
    +
    +  updateTableBackground();
    +
    +  scheduleRerender(NeedRerenderData);
    +}
    +
    +void WTableView::setHeaderHeight(const WLength& height, bool multiLine)
    +{
    +  WAbstractItemView::setHeaderHeight(height, multiLine);
    +
    +  if (!ajaxMode())
    +    resize(this->width(), this->height());
    +
    +  if (renderState_ >= NeedRerenderHeader)
    +    return;
    +
    +  if (!WApplication::instance()->environment().agentIsIE())
    +    for (int i = 0; i < columnCount(); ++i)
    +      headerTextWidget(i)->setWordWrap(multiLine);
    +}
    +
    +WWidget* WTableView::headerWidget(int column, bool contentsOnly)
    +{
    +  WWidget *result = 0;
    +
    +  if (ajaxMode()) {
    +    if (headers_ && column < headers_->count())
    +      result = headers_->widget(column);
    +  } else
    +    if (plainTable_ && column < plainTable_->columnCount())
    +      result = plainTable_->elementAt(0, column)->widget(0);
    +
    +  if (result && contentsOnly)
    +    return result->find("contents");
    +  else
    +    return result;
    +}
    +
    +void WTableView::setColumnBorder(const WColor& color)
    +{
    +  // FIXME
    +}
    +
    +void WTableView::shiftModelIndexes(int start, int count)
    +{
    +  WModelIndexSet& set = selectionModel()->selection_;
    +  
    +  std::vector<WModelIndex> toShift;
    +  std::vector<WModelIndex> toErase;
    +
    +  for (WModelIndexSet::iterator it
    +	 = set.lower_bound(model()->index(start, 0, rootIndex()));
    +       it != set.end(); ++it) {
    +
    +    if (count < 0) {
    +      if ((*it).row() < start - count) {
    +	toErase.push_back(*it);
    +	continue;
    +      }
    +    }
    +
    +    toShift.push_back(*it);
    +    toErase.push_back(*it);
    +  }
    +
    +  for (unsigned i = 0; i < toErase.size(); ++i)
    +    set.erase(toErase[i]);
    +
    +  for (unsigned i = 0; i < toShift.size(); ++i) {
    +    WModelIndex newIndex = model()->index(toShift[i].row() + count,
    +					 toShift[i].column(),
    +					 toShift[i].parent());
    +    set.insert(newIndex);
    +  }
    +}
    +
    +void WTableView::modelColumnsInserted(const WModelIndex& parent, 
    +				      int start, int end)
    +{
    +  if (parent != rootIndex())
    +    return;
    +
    +  int count = end - start + 1;
    +  int width = 0;
    +
    +  for (int i = start; i < start + count; ++i) {
    +    columns_.insert(columns_.begin() + i, createColumnInfo(i));
    +    width += (int)columnInfo(i).width.toPixels() + 7;
    +  }
    +
    +  if (ajaxMode())
    +    canvas_->resize(canvas_->width().toPixels() + width, canvas_->height());
    +
    +  if (renderState_ < NeedRerenderHeader)
    +    scheduleRerender(NeedRerenderHeader);
    +
    +  if (start > lastColumn() || 
    +      renderState_ == NeedRerender || 
    +      renderState_ == NeedRerenderData)
    +    return;
    +
    +  scheduleRerender(NeedRerenderData);
    +}
    +
    +void WTableView::modelColumnsAboutToBeRemoved(const WModelIndex& parent, 
    +					      int start, int end)
    +{
    +  if (parent != rootIndex())
    +    return;
    +
    +  for (int r = 0; r < model()->rowCount(); r++) {
    +    for (int c = start; c <= end; c++) {
    +      closeEditor(model()->index(r, c), false);
    +    }
    +  }
    +
    +  int count = end - start + 1;
    +  int width = 0;
    +
    +  for (int i = start; i < start + count; ++i)
    +    if (!columnInfo(i).hidden)
    +      width += (int)columnInfo(i).width.toPixels() + 7;
    +
    +  columns_.erase(columns_.begin() + start, columns_.begin() + start + count);
    +
    +  if (ajaxMode())
    +    canvas_->resize(canvas_->width().toPixels() - width, canvas_->height());
    +
    +  if (start <= currentSortColumn_ && currentSortColumn_ <= end)
    +    currentSortColumn_ = -1;
    +
    +  if (renderState_ < NeedRerenderHeader)
    +    scheduleRerender(NeedRerenderHeader);
    +
    +  if (start > lastColumn() || 
    +      renderState_ == NeedRerender || 
    +      renderState_ == NeedRerenderData)
    +    return;
    +
    +  scheduleRerender(NeedRerenderData);
    +}
    +
    +void WTableView::modelRowsInserted(const WModelIndex& parent, 
    +				   int start, int end)
    +{
    +  if (parent != rootIndex())
    +    return;
    +
    +  shiftModelIndexes(start, end - start + 1);
    +
    +  if (ajaxMode()) {
    +    canvas_->resize(canvas_->width(), canvasHeight());
    +    scheduleRerender(NeedAdjustViewPort);
    +  }
    +
    +  computeRenderedArea();
    +
    +  if (start <= lastRow())
    +    scheduleRerender(NeedRerenderData);
    +}
    +
    +void WTableView::modelRowsAboutToBeRemoved(const WModelIndex& parent,
    +					   int start, int end)
    +{
    +  if (parent != rootIndex())
    +    return;
    +
    +  for (int c = 0; c < model()->columnCount(); c++) {
    +    for (int r = start; r <= end; r++) {
    +      closeEditor(model()->index(r, c), false);
    +    }
    +  }
    +}
    +
    +void WTableView::modelRowsRemoved(const WModelIndex& parent, int start, int end)
    +{
    +  if (parent != rootIndex())
    +    return;
    +
    +  shiftModelIndexes(start, -(end - start + 1));
    +
    +  if (ajaxMode()) {
    +    canvas_->resize(canvas_->width(), canvasHeight());
    +    scheduleRerender(NeedAdjustViewPort);
    +  }
    +
    +  computeRenderedArea();
    +
    +  if (start <= lastRow())
    +    scheduleRerender(NeedRerenderData);
    +}
    +
    +
    +void WTableView::modelDataChanged(const WModelIndex& topLeft, 
    +				  const WModelIndex& bottomRight)
    +{
    +  if (topLeft.parent() != rootIndex())
    +    return;
    +
    +  if (renderState_ < NeedRerenderData) {
    +    int row1 = std::max(topLeft.row(), firstRow());
    +    int row2 = std::min(bottomRight.row(), lastRow());
    +    int col1 = std::max(topLeft.column(), firstColumn());
    +    int col2 = std::min(bottomRight.column(), lastColumn());
    +    for (int i = row1; i <= row2; ++i)
    +      for (int j = col1; j <= col2; ++j) {
    +	int renderedRow = i - firstRow();
    +	int renderedColumn = j - firstColumn();
    +
    +	WContainerWidget *parentWidget;
    +	WWidget *w;
    +	int wIndex;
    +
    +	if (ajaxMode()) {
    +	  parentWidget = columnContainer(renderedColumn);
    +	  wIndex = renderedRow;
    +	} else {
    +	  parentWidget
    +	    = plainTable_->elementAt(renderedRow + 1, renderedColumn);
    +	  wIndex = 0;
    +	}
    +
    +	w = parentWidget->widget(wIndex);
    +
    +	WModelIndex index = model()->index(i, j, rootIndex());
    +
    +	w = renderWidget(w, index);
    +
    +	if (!w->parent()) {
    +	  parentWidget->insertWidget(wIndex, w);
    +
    +	  if (!ajaxMode() && !isEditing(index)) {
    +	    WInteractWidget *wi = dynamic_cast<WInteractWidget *>(w);
    +	    if (wi)
    +	      clickedMapper_->mapConnect1(wi->clicked(), index);
    +	  }
    +	}
    +      }
    +  }
    +}
    + 
    +void WTableView::modelHeaderDataChanged(Orientation orientation, 
    +					int start, int end)
    +{
    +  if (renderState_ < NeedRerenderHeader) {
    +    if (orientation == Horizontal) {
    +      for (int i = start; i <= end; ++i) {
    +	WString label = asString(model()->headerData(i));
    +	headerTextWidget(i)->setText(label);
    +      }
    +    }
    +  }
    +}
    +
    +void WTableView::onViewportChange(int left, int top, int width, int height)
    +{
    +  assert(ajaxMode());
    +
    +  viewportLeft_ = left;
    +  viewportWidth_ = width;
    +  viewportTop_ = top;
    +  viewportHeight_ = height;
    +
    +  computeRenderedArea();
    +
    +  scheduleRerender(NeedAdjustViewPort);  
    +}
    +
    +void WTableView::computeRenderedArea()
    +{
    +  if (ajaxMode()) {
    +    const int borderRows = 5;
    +    const int borderColumnPixels = 200;
    +
    +    /* row range */
    +    int top = std::min(viewportTop_,
    +		       static_cast<int>(canvas_->height().toPixels()));
    +    int height = std::min(viewportHeight_,
    +			  static_cast<int>(canvas_->height().toPixels()));
    +
    +    renderedFirstRow_ = static_cast<int>(top / rowHeight().toPixels());
    +
    +    int renderedRows = static_cast<int>(height / rowHeight().toPixels() + 0.5);
    +
    +    if (model())
    +      renderedLastRow_
    +	= std::min(renderedFirstRow_ + renderedRows * 2 + borderRows,
    +		   model()->rowCount(rootIndex()) - 1);
    +    renderedFirstRow_
    +      = std::max(renderedFirstRow_ - renderedRows - borderRows, 0);
    +
    +    if (renderedFirstRow_ % 2 == 1)
    +      --renderedFirstRow_;
    +
    +    /* column range */
    +    int left
    +      = std::max(0, viewportLeft_ - viewportWidth_ - borderColumnPixels);
    +    int right
    +      = std::min(static_cast<int>(canvas_->width().toPixels()),
    +		 viewportLeft_ + 2 * viewportWidth_ + borderColumnPixels);
    +
    +    int total = 0;
    +    renderedFirstColumn_ = 0;
    +    renderedLastColumn_ = columnCount() - 1;
    +    for (int i = 0; i < columnCount(); i++) {
    +      int w = static_cast<int>(columnInfo(i).width.toPixels());
    +
    +      if (total <= left && left < total + w)
    +	renderedFirstColumn_ = i;
    +
    +      if (total <= right && right < total + w) {
    +	renderedLastColumn_ = i;
    +	break;
    +      }
    +
    +      total += w + 7;
    +    }
    +
    +    assert(renderedLastColumn_ == -1
    +	   || renderedFirstColumn_ <= renderedLastColumn_);
    +  } else { // Plain HTML
    +    renderedFirstColumn_ = 0;
    +    if (model()) {
    +      renderedLastColumn_ = model()->columnCount(rootIndex()) - 1;
    +
    +      int cp = std::max(0, std::min(currentPage(), pageCount() - 1));
    +      setCurrentPage(cp);
    +    } else
    +      renderedFirstRow_ = renderedLastRow_ = 0;
    +  }
    +}
    +
    +void WTableView::adjustToViewport()
    +{
    +  assert(ajaxMode());
    +
    +  if (renderedFirstRow_ != firstRow() || 
    +      renderedLastRow_ != lastRow() ||
    +      renderedFirstColumn_ != firstColumn()||
    +      renderedLastColumn_ != lastColumn()) {
    +    renderTable(renderedFirstRow_, 
    +		renderedLastRow_, 
    +		renderedFirstColumn_, 
    +		renderedLastColumn_);
    +  }
    +}
    +
    +void WTableView::setAlternatingRowColors(bool enable)
    +{
    +  WAbstractItemView::setAlternatingRowColors(enable);
    +  updateTableBackground();
    +}
    +
    +void WTableView::handleSingleClick(const WMouseEvent& event)
    +{
    +  WModelIndex index = translateModelIndex(event);
    +  if (index.isValid())
    +    WAbstractItemView::handleClick(index, event);
    +}
    +
    +void WTableView::handleDoubleClick(const WMouseEvent& event)
    +{
    +  WModelIndex index = translateModelIndex(event);
    +  if (index.isValid())
    +    WAbstractItemView::handleDoubleClick(index, event);
    +}
    +
    +void WTableView::handleMouseWentDown(const WMouseEvent& event)
    +{
    +  WModelIndex index = translateModelIndex(event);
    +  if (index.isValid())
    +    WAbstractItemView::handleMouseDown(index, event);
    +}
    +
    +void WTableView::modelLayoutChanged()
    +{
    +  WAbstractItemView::modelLayoutChanged();
    +
    +  resetGeometry();
    +}
    +
    +WModelIndex WTableView::translateModelIndex(const WMouseEvent& event)
    +{
    +  int row = (int)(event.widget().y / rowHeight().toPixels());
    +  int column = -1;
    +
    +  int total = 0;
    +  for (int i = 0; i < columnCount(); i++) {
    +    if (!columnInfo(i).hidden)
    +      total += static_cast<int>(columnInfo(i).width.toPixels()) + 7;
    +
    +    if (event.widget().x < total) {
    +      column = i;
    +      break;
    +    }
    +  }
    +
    +  if (column >= 0 && row >= 0 && row < model()->rowCount(rootIndex()))
    +    return model()->index(row, column, rootIndex());
    +  else
    +    return WModelIndex();
    +}
    +
    +bool WTableView::internalSelect(const WModelIndex& index, SelectionFlag option)
    +{
    +  if (selectionBehavior() == SelectRows && index.column() != 0)
    +    return internalSelect(model()->index(index.row(), 0, index.parent()),
    +			  option);
    +
    +  if (WAbstractItemView::internalSelect(index, option)) {
    +    renderSelected(isSelected(index), index);
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +void WTableView::renderSelected(bool selected, const WModelIndex& index)
    +{
    +  if (selectionBehavior() == SelectRows) {
    +    if (isRowRendered(index.row())) {
    +      int renderedRow = index.row() - firstRow();
    +
    +      if (ajaxMode()) {
    +	for (int i = 0; i < table_->count(); ++i) {
    +	  ColumnWidget *column = columnContainer(i);
    +	  WWidget *w = column->widget(renderedRow);
    +	  if (selected)
    +	    w->addStyleClass("Wt-selected");
    +	  else
    +	    w->removeStyleClass("Wt-selected");
    +	}
    +      } else {
    +	WTableRow *row = plainTable_->rowAt(renderedRow + 1);
    +	row->setStyleClass(selected ? "Wt-selected" : "");
    +      }
    +    }
    +  } else {
    +    if (isRowRendered(index.row()) && isColumnRendered(index.column())) {
    +      int renderedRow = index.row() - firstRow();
    +      int renderedCol = index.column() - firstColumn();
    +
    +      WWidget *w = 0;
    +      if (ajaxMode()) {
    +	ColumnWidget *column = columnContainer(renderedCol);
    +	w = column->widget(renderedRow);
    +      } else {
    +	w = plainTable_->elementAt(renderedRow + 1, renderedCol);
    +      }
    +
    +      if (selected)
    +	w->addStyleClass("Wt-selected");
    +      else
    +	w->removeStyleClass("Wt-selected");
    +    }
    +  }
    +}
    +
    +void WTableView::selectRange(const WModelIndex& first, const WModelIndex& last)
    +{
    +  for (int c = first.column(); c <= last.column(); ++c)
    +    for (int r = first.row(); r <= last.row(); ++r)
    +      internalSelect(model()->index(r, c, rootIndex()), Select);
    +}
    +
    +void WTableView::onDropEvent(int renderedRow, int columnId,
    +			     std::string sourceId, std::string mimeType,
    +			     WMouseEvent event)
    +{
    +  WDropEvent e(WApplication::instance()->decodeObject(sourceId), mimeType,
    +	       event);
    +
    +  WModelIndex index = model()->index(firstRow() + renderedRow,
    +				    columnById(columnId), rootIndex());
    +
    +  dropEvent(e, index);
    +}
    +
    +void WTableView::setCurrentPage(int page)
    +{
    +  renderedFirstRow_ = page * pageSize();
    +
    +  if (model())
    +    renderedLastRow_= std::min(renderedFirstRow_ + pageSize() - 1,
    +			       model()->rowCount(rootIndex()) - 1);
    +  else
    +    renderedLastRow_ = renderedFirstRow_;
    + 
    +  scheduleRerender(NeedRerenderData);
    +}
    +
    +int WTableView::currentPage() const
    +{
    +  return renderedFirstRow_ / pageSize();
    +}
    +
    +int WTableView::pageCount() const
    +{
    +  if (model()) {
    +    return (model()->rowCount(rootIndex()) - 1) / pageSize() + 1;
    +  } else
    +    return 1;
    +}
    +
    +int WTableView::pageSize() const
    +{
    +  if (height().isAuto())
    +    return 10000;
    +  else {
    +    const int navigationBarHeight = 25; // set in wt.css
    +
    +    return static_cast<int>
    +      ((height().toPixels() - headerHeight().toPixels() - navigationBarHeight)
    +       / rowHeight().toPixels());
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTemplate b/wt-3.1.7a/src/Wt/WTemplate
    new file mode 100644
    index 0000000..e8a88af
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTemplate
    @@ -0,0 +1,286 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTEMPLATE_H_
    +#define WTEMPLATE_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +/*! \class WTemplate Wt/WTemplate Wt/WTemplate
    + *  \brief A widget that renders an XHTML template.
    + *
    + * The XHTML template may contain references to variables which
    + * replaced by strings are widgets.
    + *
    + * Since the template text may be supplied by a WString, you can
    + * conveniently store the string in a message resource bundle, and
    + * make it localized by using WString::tr().
    + *
    + * Variable references use a <tt>${<i>varName</i>}</tt> syntax to
    + * reference the variable <tt>"varName"</tt>. To use a literal
    + * <tt>"${"</tt>, use <tt>"$${"</tt>.
    + *
    + * You can bind widgets and values to variables using bindWidget(),
    + * bindString() or bindInt() or by reimplementing the resolveString()
    + * and resolveWidget() methods.
    + *
    + * Usage example:
    + * \code
    + * WString userName = ...;
    + *
    + * WTemplate *t = new WTemplate();
    + * t->setTemplateText("<div> How old are you, ${friend} ? ${age-input} </div>");
    + *
    + * t->bindString("friend", userName);
    + * t->bindWidget("age-input", ageEdit_ = new WLineEdit());
    + * \endcode
    + *
    + * \if cpp
    + * The template can return a bound widget using resolve(), which already
    + * tries to cast the widget to the proper type.
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + */
    +class WT_API WTemplate : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates a template widget.
    +   */
    +  WTemplate(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a template widget with given template.
    +   *
    +   * The \p templateText must be proper XHTML, and this is checked
    +   * unless the XHTML is resolved from a message resource bundle. This
    +   * behavior is similar to a WText when configured with the
    +   * Wt::XHTMLText textformat.
    +   */
    +  WTemplate(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Returns the template.
    +   *
    +   * \sa setTemplateText(const WString&)
    +   */
    +  const WString& templateText() const { return text_; }
    +
    +  /*! \brief Sets the template text.
    +   *
    +   * The \p text must be proper XHTML, and this is checked unless the
    +   * XHTML is resolved from a message resource bundle or TextFormat is
    +   * Wt::XHTMLUnsafeText. This behavior is similar to a WText when
    +   * configured with the Wt::XHTMLText textformat.
    +   *
    +   * Changing the template text does not clear() bound widgets or
    +   * values.
    +   *
    +   * \sa clear()
    +   */
    +  void setTemplateText(const WString& text, TextFormat textFormat = XHTMLText);
    +
    +  /*! \brief Binds a widget to a variable name.
    +   *
    +   * The corresponding variable reference within the template will be
    +   * replaced with the widget (rendered as XHTML). Since a single
    +   * widget may be instantiated only once in a template, the variable
    +   * \p varName may occur at most once in the template.
    +   *
    +   * If a widget was already bound to the variable, it is deleted
    +   * first. If previously a string or other value was bound to the
    +   * variable, it is removed.
    +   *
    +   * You may also pass a \c 0 \p widget, which will resolve to an empty
    +   * string.
    +   *
    +   * \sa bindString()
    +   * \sa resolveWidget()
    +   */
    +  void bindWidget(const std::string& varName, WWidget *widget);
    +
    +  /*! \brief Binds a string value to a variable name.
    +   *
    +   * Each occurrence of the variable within the template will be
    +   * substituted by its value.
    +   *
    +   * Depending on the \p textFormat, the \p value is validated according
    +   * as for a WText.
    +   *
    +   * \sa bindWidget(), bindInt()
    +   * \sa resolveString()
    +   */
    +  void bindString(const std::string& varName, const WString& value,
    +		  TextFormat textFormat = XHTMLText);
    +
    +  /*! \brief Binds an integer value to a variable name.
    +   *
    +   * \sa bindString()
    +   */
    +  void bindInt(const std::string& varName, int value);
    +
    +  /*! \brief Resolves the string value for a variable name.
    +   *
    +   * This is the main method used to resolve variables in the template
    +   * text, during rendering.
    +   *
    +   * The default implementation considers first whether a string was
    +   * bound using bindString(). If so, that string is returned. If
    +   * not, it will attempt to resolve a widget with that variable name
    +   * using resolveWidget(), and render it as XHTML. If that fails too,
    +   * handleUnresolvedVariable() is called, passing the initial arguments.
    +   *
    +   * You may want to reimplement this method to provide on-demand
    +   * loading of strings for your template.
    +   *
    +   * The result stream expects a UTF-8 encoded string value.
    +   *
    +   * \warning When specializing this class, you need to make sure that
    +   * you append proper XHTML to the \p result, without unsafe active
    +   * contents. The format() methods may be used for this purpose.
    +   *
    +   * \sa renderTemplate()
    +   */
    +  virtual void resolveString(const std::string& varName,
    +			     const std::vector<WString>& args,
    +			     std::ostream& result);
    +
    +  /*! \brief Handles a variable that could not be resolved.
    +   *
    +   * This method is called from resolveString() for variables that could
    +   * not be resolved.
    +   *
    +   * The default implementation implementation writes 
    +   * "??" + varName + "??"  to the result stream.
    +   *
    +   * The result stream expects a UTF-8 encoded string value.
    +   *
    +   * \warning When specializing this class, you need to make sure that
    +   * you append proper XHTML to the \p result, without unsafe active
    +   * contents. The format() methods may be used for this purpose.
    +   *
    +   * \sa resolveString()
    +   */
    +   virtual void handleUnresolvedVariable(const std::string& varName,
    +                                         const std::vector<WString>& args,
    +                                         std::ostream& result);
    +
    +  /*! \brief Resolves a widget for a variable name.
    +   *
    +   * The default implementation returns a widget that was bound using
    +   * bindWidget().
    +   *
    +   * You may want to reimplement this method to create widgets
    +   * on-demand. All widgets that are returned by this method are
    +   * reparented to the WTemplate, so they will be deleted when the
    +   * template is destroyed, but they are not deleted by clear() (unless
    +   * bind was called on them as in the example below).
    +   *
    +   * This method is typically used for delayed binding of widgets.
    +   * Usage example:
    +   * \code
    +   * {
    +   *   if (Widget *known = WTemplate::resolveWidget(varName)) {
    +   *     return known;
    +   *   } else {
    +   *     if (varName == "age-input") {
    +   *       WWidget *w = new WLineEdit(); // widget only created when used
    +   *       bind(varName, w);
    +   *       return w;
    +   *     }
    +   *   }
    +   * }
    +   * \endcode
    +   */
    +  virtual WWidget *resolveWidget(const std::string& varName);
    +
    +  /*! \brief Returns a widget for a variable name.
    +   *
    +   * This is a convience method, which calls resolveWidget() and casts
    +   * the result to type \p T. You may use this method to fetch widgets
    +   * that have previously been bound using bindWidget().
    +   */
    +  template <typename T> T resolve(const std::string& varName);
    +
    +  /*! \brief Erases all variable bindings.
    +   *
    +   * Removes all strings and deletes all widgets that were previously
    +   * bound using bindString() and bindWidget().
    +   */
    +  void clear();
    +
    +  /*! \brief Refreshes the template.
    +   *
    +   * This rerenders the template.
    +   */
    +  virtual void refresh();
    +
    +  static const char *DropShadow_x1_x2;
    +
    +protected:
    +  /*! \brief Renders the template into the given result stream.
    +   *
    +   * The default implementation will parse the template, and resolve variables
    +   * by calling resolveString().
    +   *
    +   * You may want to reimplement this method to manage resources that are
    +   * needed to load content on-demand (e.g. database objects), or support
    +   * a custom template language.
    +   */
    +  virtual void renderTemplate(std::ostream& result);
    +
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +
    +  /*! \brief Utility method to safely format an XHTML string.
    +   *
    +   * The string is formatted according to the indicated \p
    +   * textFormat. It is recommended to use this method when
    +   * specializing resolveString() to avoid security risks.
    +   */
    +  void format(std::ostream& result, const std::string& s,
    +	      TextFormat textFormat = PlainText);
    +
    +  /*! \brief Utility method to safely format an XHTML string.
    +   *
    +   * The string is formatted according to the indicated \p
    +   * textFormat. It is recommended to use this method when
    +   * specializing resolveString() to avoid security risks.
    +   */
    +  void format(std::ostream& result, const WString& s,
    +	      TextFormat textFormat = PlainText);
    +
    +  virtual void enableAjax();
    +
    +private:
    +  typedef std::map<std::string, WWidget *> WidgetMap;
    +  typedef std::map<std::string, std::string> StringMap;
    +
    +  std::set<WWidget *> *previouslyRendered_;
    +  std::vector<WWidget *> *newlyRendered_;
    +
    +  WidgetMap widgets_;
    +  StringMap strings_;
    +  WString   text_;
    +
    +  bool      changed_;
    +};
    +
    +template <typename T> T WTemplate::resolve(const std::string& varName)
    +{
    +  WWidget *w = resolveWidget(varName);
    +  return dynamic_cast<T>(w);
    +}
    +
    +
    +}
    +
    +#endif // WTEMPLATE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTemplate.C b/wt-3.1.7a/src/Wt/WTemplate.C
    new file mode 100644
    index 0000000..2ad88e6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTemplate.C
    @@ -0,0 +1,294 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +#include <iostream>
    +
    +#include "Wt/WTemplate"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +const char *WTemplate::DropShadow_x1_x2
    +  ="<span class=\"Wt-x1\">"
    +  """<span class=\"Wt-x1a\"></span>"
    +  "</span>"
    +  "<span class=\"Wt-x2\">"
    +  """<span class=\"Wt-x2a\"></span>"
    +  "</span>";
    +
    +WTemplate::WTemplate(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    changed_(false)
    +{
    +  setInline(false);
    +}
    +
    +WTemplate::WTemplate(const WString& text, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    changed_(false)
    +{
    +  setInline(false);
    +  setTemplateText(text);
    +}
    +
    +void WTemplate::clear()
    +{
    +  setIgnoreChildRemoves(true);
    +  for (WidgetMap::iterator i = widgets_.begin(); i != widgets_.end(); ++i)
    +    delete i->second;
    +  setIgnoreChildRemoves(false);
    +
    +  widgets_.clear();
    +  strings_.clear();
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);  
    +}
    +
    +void WTemplate::bindWidget(const std::string& varName, WWidget *widget)
    +{
    +  WidgetMap::iterator i = widgets_.find(varName);
    +  if (i != widgets_.end()) {
    +    if (i->second == widget)
    +      return;
    +    else
    +      delete i->second;
    +  }
    +
    +  if (widget) {
    +    widget->setParentWidget(this);
    +    widgets_[varName] = widget;
    +    strings_.erase(varName);
    +  } else
    +    strings_[varName] = std::string();
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);  
    +}
    +
    +void WTemplate::bindString(const std::string& varName, const WString& value,
    +			   TextFormat textFormat)
    +{
    +  WString v = value;
    +
    +  if (textFormat == XHTMLText && text_.literal()) {
    +    if (!removeScript(v))
    +      v = escapeText(v, true);
    +  } else if (textFormat == PlainText)
    +    v = escapeText(v, true);
    +
    +  StringMap::const_iterator i = strings_.find(varName);
    +
    +  if (i == strings_.end() || i->second != v.toUTF8()) {
    +    strings_[varName] = v.toUTF8();
    +
    +    changed_ = true;
    +    repaint(RepaintInnerHtml);  
    +  }
    +}
    +
    +void WTemplate::bindInt(const std::string& varName, int value)
    +{
    +  bindString(varName, boost::lexical_cast<std::string>(value), XHTMLUnsafeText);
    +}
    +
    +void WTemplate::resolveString(const std::string& varName,
    +			      const std::vector<WString>& args,
    +			      std::ostream& result)
    +{
    +  /*
    +   * FIXME: have an extra result parameter which indicates whether the
    +   * widget is view-only. Better to do that in resolveValue() and
    +   * provide a utility method that converst a widget to XHTML ?
    +   */
    +
    +  StringMap::const_iterator i = strings_.find(varName);
    +  if (i != strings_.end())
    +    result << i->second;
    +  else {
    +    WWidget *w = resolveWidget(varName);
    +    if (w) {
    +      w->setParentWidget(this);
    +
    +      if (previouslyRendered_
    +	  && previouslyRendered_->find(w) != previouslyRendered_->end()) {
    +	result << "<span id=\"" << w->id() << "\"> </span>";
    +      } else
    +	w->htmlText(result);
    +
    +      newlyRendered_->push_back(w);
    +    } else
    +      handleUnresolvedVariable(varName, args, result);
    +  }
    +}
    +
    +void WTemplate::handleUnresolvedVariable(const std::string& varName,
    +                                         const std::vector<WString>& args,
    +                                         std::ostream& result)
    +{
    +  result << "??" << varName << "??";
    +}
    +
    +WWidget *WTemplate::resolveWidget(const std::string& varName)
    +{
    +  WidgetMap::const_iterator j = widgets_.find(varName);
    +  if (j != widgets_.end())
    +    return j->second;
    +  else
    +    return 0;
    +}
    +
    +void WTemplate::setTemplateText(const WString& text, TextFormat textFormat)
    +{
    +  text_ = text;
    +
    +  if (textFormat == XHTMLText && text_.literal()) {
    +    if (!removeScript(text_))
    +      text_ = escapeText(text_, true);
    +  } else if (textFormat == PlainText)
    +    text_ = escapeText(text_, true);
    +
    +  changed_ = true;
    +  repaint(RepaintInnerHtml);
    +}
    +
    +void WTemplate::updateDom(DomElement& element, bool all)
    +{
    +  if (changed_ || all) {
    +    std::set<WWidget *> previouslyRendered;
    +    std::vector<WWidget *> newlyRendered;
    +
    +    for (WidgetMap::const_iterator i = widgets_.begin(); i != widgets_.end();
    +	 ++i) {
    +      WWidget *w = i->second;
    +      if (w->isRendered())
    +	previouslyRendered.insert(w);
    +    }
    +
    +    bool saveWidgets = element.mode() == DomElement::ModeUpdate;
    +
    +    previouslyRendered_ = saveWidgets ? &previouslyRendered : 0;
    +    newlyRendered_ = &newlyRendered;
    +
    +    std::stringstream html;
    +    renderTemplate(html);
    +
    +    previouslyRendered_ = 0;
    +    newlyRendered_ = 0;
    +
    +    for (unsigned i = 0; i < newlyRendered.size(); ++i) {
    +      WWidget *w = newlyRendered[i];
    +      if (previouslyRendered.find(w) != previouslyRendered.end()) {
    +	if (saveWidgets)
    +	  element.saveChild(w->id());
    +	previouslyRendered.erase(w);
    +      }
    +    }
    +
    +    element.setProperty(Wt::PropertyInnerHTML, html.str());
    +    changed_ = false;
    +
    +    for (std::set<WWidget *>::const_iterator i = previouslyRendered.begin();
    +	 i != previouslyRendered.end(); ++i) {
    +      WWidget *w = *i;
    +      w->webWidget()->setRendered(false);
    +    }
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WTemplate::renderTemplate(std::ostream& result)
    +{
    +  std::string text = text_.toUTF8();
    +
    +  std::size_t lastPos = 0;
    +  for (std::size_t pos = text.find('$'); pos != std::string::npos;
    +       pos = text.find('$', pos)) {
    +
    +    result << text.substr(lastPos, pos - lastPos);
    +    lastPos = pos;
    +
    +    if (pos + 1 < text.length()) {
    +      if (text[pos + 1] == '$') { // $$ -> $
    +	result << '$';
    +	lastPos += 2;
    +      } else if (text[pos + 1] == '{') {
    +	std::size_t startName = pos + 2;
    +	std::size_t endName = text.find_first_of(" \r\n\t}", startName);
    +	std::size_t endVar = text.find('}', endName);
    +	if (endName == std::string::npos || endVar == std::string::npos)
    +	  throw std::runtime_error("WTemplate syntax error at pos "
    +				   + boost::lexical_cast<std::string>(pos));
    +
    +	std::string name = text.substr(startName, endName - startName);
    +	std::vector<WString> args;
    +	resolveString(name, args, result);
    +
    +	lastPos = endVar + 1;
    +      } else {
    +	result << '$'; // $. -> $.
    +	lastPos += 1;
    +      }
    +    } else {
    +      result << '$'; // $ at end of template -> $
    +      lastPos += 1;
    +    }
    +
    +    pos = lastPos;
    +  }
    +
    +  result << text.substr(lastPos);
    +}
    +
    +void WTemplate::format(std::ostream& result, const std::string& s,
    +		       TextFormat textFormat)
    +{
    +  format(result, WString::fromUTF8(s), textFormat);
    +}
    +
    +void WTemplate::format(std::ostream& result, const WString& s,
    +		       TextFormat textFormat)
    +{
    +  WString v = s;
    +
    +  if (textFormat == XHTMLText) {
    +    if (!removeScript(v))
    +      v = escapeText(v, true);
    +  } else if (textFormat == PlainText)
    +    v = escapeText(v, true);
    +
    +  result << v.toUTF8();
    +}
    +
    +void WTemplate::propagateRenderOk(bool deep)
    +{
    +  changed_ = false;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +void WTemplate::enableAjax()
    +{
    +  WInteractWidget::enableAjax();
    +}
    +
    +DomElementType WTemplate::domElementType() const
    +{
    +  return isInline() ? DomElement_SPAN : DomElement_DIV;
    +}
    +
    +void WTemplate::refresh()
    +{
    +  if (text_.refresh()) {
    +    changed_ = true;
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  WInteractWidget::refresh();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WText b/wt-3.1.7a/src/Wt/WText
    new file mode 100644
    index 0000000..51f6f7a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WText
    @@ -0,0 +1,236 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTEXT_H_
    +#define WTEXT_H_
    +
    +#include <Wt/WInteractWidget>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +/*! \class WText Wt/WText Wt/WText
    + *  \brief A widget that renders (XHTML) text.
    + *
    + * The text is provided through a WString, which may either hold a
    + * literal text, or a key to localized text which is looked up in
    + * locale dependent XML files (see WString::tr()).
    + *
    + * Use setTextFormat() to configure the textFormat of the text. The
    + * default textFormat is Wt::XHTMLText, which allows XHMTL markup to
    + * be included in the text. Tags and attributes that indicate "active"
    + * content are not allowed and stripped out, to avoid security risks
    + * exposed by JavaScript such as the common web-based <a
    + * href="http://en.wikipedia.org/wiki/Cross_site_scriptingCross-Site">
    + * Cross-Site Scripting (XSS)</a> malicious attack. XSS is the
    + * situation where one user of your web application is able to execute
    + * a script in another user's browser while your application only
    + * intended to display a message entered by the mailicious user to the
    + * other user. To defeat this attack, %Wt assumes that content in a
    + * %WText is intended to be passive, and not contain any scripting
    + * elements.
    + *
    + * The Wt::PlainText format will display the text literally
    + * (escaping any HTML special characters).
    + *
    + * In some situations, Wt::XHTMLUnsafeText may be useful to explicitly
    + * allow scripting content. Like XHTMLText, it allows XHTML markup,
    + * but it also allows potentially dangerous tags and attributes. Use
    + * this if you're sure that a user cannot interfere with the text set,
    + * and XHTMLText is too limiting.
    + *
    + * %WText is by default \link WWidget::setInline()
    + * inline\endlink, unless the XHTML contents starts with an
    + * element such as <tt>&lt;div&gt;</tt>, <tt>&lt;h&gt;</tt> or
    + * <tt>&lt;p&gt;</tt> that is displayed as a block, in which case the
    + * widget will also display as a block.
    + *
    + * \if cpp
    + * Usage examples:
    + * \code
    + * Wt::WContainerWidget *container = new Wt::WContainerWidget();
    + *
    + * // display an XHTML text:
    + * container->addWidget(new Wt::WText("Hello <i>dear</i> visitor."));
    + *
    + * // display a plain text:
    + * container->addWidget(new Wt::WText("The <i> tag displays italic text.", Wt::PlainText));
    + *
    + * // display an XHTML fragment from a resource bundle:
    + * container->addWidget(new Wt::WText(tr("introduction")));
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to an HTML <tt>&lt;span&gt;</tt> tag or an
    + * HTML <tt>&lt;div&gt;</tt> depending on whether the widget is inline.
    + *
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + *
    + * \sa WApplication::setLocale()
    + * \if cpp
    + * \sa WApplication::messageResourceBundle()
    + * \endif
    + */
    +class WT_API WText : public WInteractWidget
    +{
    +public:
    +  /*! \brief Creates a text widget with an empty text.
    +   */
    +  WText(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a text widget with given text.
    +   *
    +   * The textFormat is set to Wt::XHTMLText, unless the \p text is
    +   * literal (not created using WString::tr()) and it could not be
    +   * parsed as valid XML. In that case the textFormat is set to
    +   * Wt::PlainText.
    +   *
    +   * Therefore, if you wish to use Wt::XHTMLText, 
    +   * but cannot be sure about \p text being valid XML, 
    +   * you should verify that the textFormat() is Wt::XHTMLText
    +   * after construction.
    +   *
    +   * The XML parser will silently discard malicious tags and
    +   * attributes for literal Wt::XHTMLText text.
    +   */
    +  WText(const WString& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a text widget with given text and format
    +   *
    +   * If <i>textFormat</i> is Wt::XHTMLText and \p text is not
    +   * literal (not created using WString::tr()), then if the
    +   * \p text could not be parsed as valid XML, the textFormat is
    +   * changed to Wt::PlainText.
    +   *
    +   * Therefore, if you wish to use Wt::XHTMLText, but cannot be sure
    +   * about \p text being valid XML, you should verify that the
    +   * textFormat() is Wt::XHTMLText after construction.
    +   *
    +   * The XML parser will silently discard malicious tags and
    +   * attributes for literal Wt::XHTMLText text.
    +   */
    +  WText(const WString& text, TextFormat textFormat,
    +	WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WText();
    +
    +  /*! \brief Returns the text.
    +   *
    +   * When a literal XHTMLFormatted text was set, this may differ from
    +   * the text that was set since malicious tags/attributes may have
    +   * been stripped.
    +   *
    +   * \sa setText(const WString&)
    +   */
    +  const WString& text() const { return text_; }
    +
    +  /*! \brief Sets the text.
    +   *
    +   * When the current format is Wt::XHTMLText, and
    +   * \p text is literal (not created using WString::tr()), it is
    +   * parsed using an XML parser which discards malicious tags and
    +   * attributes silently. When the parser encounters an XML parse
    +   * error, the textFormat is changed to Wt::PlainText.
    +   *
    +   * Returns whether the text could be set using the current
    +   * textFormat. A return value of \c false indicates that the textFormat
    +   * was changed in order to be able to accept the new text.
    +   *
    +   * \sa text(), setText()
    +   */
    +  bool setText(const WString& text);
    +
    +  /*! \brief Sets the text format.
    +   *
    +   * The textFormat controls how the string should be interpreted:
    +   * either as plain text, which is displayed literally, or as
    +   * XHTML-markup.
    +   *
    +   * When changing the textFormat to Wt::XHTMLText, and the
    +   * current text is literal (not created using WString::tr()), the
    +   * current text is parsed using an XML parser which discards
    +   * malicious tags and attributes silently. When the parser
    +   * encounters an XML parse error, the textFormat is left unchanged,
    +   * and this method returns false.
    +   *
    +   * Returns whether the textFormat could be set for the current text.
    +   *
    +   * The default format is Wt::XHTMLText.
    +   */
    +  bool setTextFormat(TextFormat format);
    +
    +  /*! \brief Returns the text format.
    +   *
    +   * \sa setTextFormat()
    +   */
    +  TextFormat textFormat() const { return textFormat_; }
    +
    +  /*! \brief Configures word wrapping.
    +   *
    +   * When \p wordWrap is \c true, the widget may break lines, creating a
    +   * multi-line text. When \p wordWrap is \c false, the text will displayed
    +   * on a single line, unless the text contains end-of-lines (for
    +   * Wt::PlainText) or &lt;br /&gt; tags or other block-level tags
    +   * (for Wt::XHTMLText).
    +   *
    +   * The default value is \c true.
    +   *
    +   * \sa wordWrap()
    +   */
    +  void setWordWrap(bool wordWrap);
    +
    +  /*! \brief Returns whether the widget may break lines.
    +   *
    +   * \sa setWordWrap(bool)
    +   */
    +  bool wordWrap() const { return wordWrap_; }
    +
    +  /*! \brief Sets padding inside the widget
    +   *
    +   * Setting padding has the effect of adding distance between the
    +   * widget children and the border, for a WText padding is only supported
    +   * on the left and/or right.
    +   */
    +  void setPadding(const WLength& padding, WFlags<Side> sides = Left | Right);
    +
    +  /*! \brief Returns the padding set for the widget.
    +   *
    +   * \sa setPadding(const WLength&, WFlags<Side>)
    +   */
    +  WLength padding(Side side) const;
    +
    +  virtual void refresh();
    +
    +private:
    +  WString      text_;
    +  TextFormat   textFormat_;
    +  bool         wordWrap_;
    +
    +  bool textChanged_, wordWrapChanged_, paddingsChanged_;
    +
    +  bool        checkWellFormed();
    +  std::string formattedText() const;
    +  void        autoAdjustInline();
    +
    +  WLength     *WT_ARRAY padding_;
    +
    +protected:
    +  virtual void           render(WFlags<RenderFlag> flags);
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +
    +  friend class WLabel;
    +};
    +
    +}
    +
    +#endif // WTEXT_H_
    diff --git a/wt-3.1.7a/src/Wt/WText.C b/wt-3.1.7a/src/Wt/WText.C
    new file mode 100644
    index 0000000..74faf1e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WText.C
    @@ -0,0 +1,229 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/algorithm/string.hpp>
    +#include <iostream>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WText"
    +#include "DomElement.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WText::WText(WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    textFormat_(XHTMLText),
    +    wordWrap_(true),
    +    textChanged_(false),
    +    wordWrapChanged_(false),
    +    paddingsChanged_(false),
    +    padding_(0)
    +{
    +  WT_DEBUG(setObjectName("WText"));
    +}
    +
    +WText::WText(const WString& text, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    textFormat_(XHTMLText),
    +    wordWrap_(true),
    +    textChanged_(false),
    +    wordWrapChanged_(false),
    +    paddingsChanged_(false),
    +    padding_(0)
    +{
    +  WT_DEBUG(setObjectName("WText"));
    +  setText(text);
    +}
    +
    +WText::WText(const WString& text, TextFormat format, WContainerWidget *parent)
    +  : WInteractWidget(parent),
    +    textFormat_(format),
    +    wordWrap_(true),
    +    textChanged_(false),
    +    wordWrapChanged_(false),
    +    paddingsChanged_(false),
    +    padding_(0)
    +{
    +  WT_DEBUG(setObjectName("WText"));
    +  setText(text);
    +}
    +
    +WText::~WText() 
    +{
    +  delete[] padding_;
    +}
    +
    +bool WText::setText(const WString& text)
    +{
    +  if (canOptimizeUpdates() && (text == text_))
    +    return true;
    +
    +  text_ = text;
    +
    +  bool textok = checkWellFormed();
    +  if (!textok)
    +    textFormat_ = PlainText;
    +
    +  textChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  return textok;
    +}
    +
    +void WText::autoAdjustInline()
    +{
    +  if (textFormat_ != PlainText && isInline()) {
    +    std::string t = text_.toUTF8();
    +    boost::trim_left(t);
    +    if (   boost::istarts_with(t, "<div")
    +	|| boost::istarts_with(t, "<p")
    +	|| boost::istarts_with(t, "<h"))
    +      setInline(false);
    +  }
    +}
    +
    +void WText::setWordWrap(bool wordWrap)
    +{
    +  if (wordWrap_ != wordWrap) {
    +    wordWrap_ = wordWrap;
    +    wordWrapChanged_ = true;
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WText::updateDom(DomElement& element, bool all)
    +{
    +  if (textChanged_ || all) {
    +    std::string text = formattedText();
    +    if (textChanged_ || !text.empty())
    +      element.setProperty(Wt::PropertyInnerHTML, formattedText());
    +    textChanged_ = false;
    +  }
    +
    +  if (wordWrapChanged_ || all) {
    +    if (!all || !wordWrap_)
    +      element.setProperty(Wt::PropertyStyleWhiteSpace,
    +			  wordWrap_ ? "normal" : "nowrap");
    +    wordWrapChanged_ = false;
    +  }
    +
    +  if (paddingsChanged_
    +      || (all && padding_ &&
    +	  !(padding_[0].isAuto() && padding_[1].isAuto()))) {
    +    
    +    element.setProperty(PropertyStylePaddingRight, padding_[0].cssText());
    +    element.setProperty(PropertyStylePaddingLeft, padding_[1].cssText());
    +
    +    paddingsChanged_ = false;
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +void WText::propagateRenderOk(bool deep)
    +{
    +  textChanged_ = false;
    +  wordWrapChanged_ = false;
    +
    +  WInteractWidget::propagateRenderOk(deep);
    +}
    +
    +bool WText::setTextFormat(TextFormat textFormat)
    +{
    +  if (textFormat_ != textFormat) {
    +    TextFormat oldTextFormat = textFormat_;
    +
    +    textFormat_ = textFormat;
    +    bool textok = checkWellFormed();
    +
    +    if (!textok)
    +      textFormat_ = oldTextFormat;
    +
    +    return textok;
    +  } else
    +    return true;
    +}
    +
    +bool WText::checkWellFormed()
    +{
    +  if (textFormat_ == XHTMLText && text_.literal()) {
    +    return removeScript(text_);
    +  } else
    +    return true;
    +}
    +
    +void WText::setPadding(const WLength& length, WFlags<Side> sides)
    +{
    +  if (!padding_) {
    +    padding_ = new WLength[2];
    +#ifdef WT_TARGET_JAVA
    +    padding_[0] = padding_[1] = WLength::Auto;
    +#endif // WT_TARGET_JAVA
    +  }
    +
    +  if (sides.testFlag(Right))
    +    padding_[0] = length;
    +  if (sides.testFlag(Left))
    +    padding_[1] = length;
    +
    +  if (sides.testFlag(Top))
    +    throw WtException("WText::padding on Top is not supported.");
    +  if (sides.testFlag(Bottom))
    +    throw WtException("WText::padding on Bottom is not supported.");
    +
    +  paddingsChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WText::padding(Side side) const
    +{
    +  if (!padding_)
    +    return WLength::Auto;
    +
    +  switch (side) {
    +  case Top:
    +    throw WtException("WText::padding on Top is not supported.");
    +  case Right:
    +    return padding_[1];
    +  case Bottom:
    +    throw WtException("WText::padding on Bottom is not supported.");
    +  case Left:
    +    return padding_[3];
    +  default:
    +    throw WtException("WText::padding(Side) with invalid side.");
    +  }
    +}
    +
    +std::string WText::formattedText() const
    +{
    +  if (textFormat_ == PlainText)
    +    return escapeText(text_, true).toUTF8();
    +  else
    +    return text_.toUTF8();
    +}
    +
    +DomElementType WText::domElementType() const
    +{
    +  return isInline() ? DomElement_SPAN : DomElement_DIV;
    +}
    +
    +void WText::render(WFlags<RenderFlag> flags)
    +{
    +  if (textChanged_)
    +    autoAdjustInline();
    +}
    +
    +void WText::refresh()
    +{
    +  if (text_.refresh()) {
    +    textChanged_ = true;
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  WInteractWidget::refresh();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTextArea b/wt-3.1.7a/src/Wt/WTextArea
    new file mode 100644
    index 0000000..5a4cdd8
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTextArea
    @@ -0,0 +1,143 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTEXTAREA_H_
    +#define WTEXTAREA_H_
    +
    +#include <Wt/WFormWidget>
    +
    +namespace Wt {
    +
    +/*! \class WTextArea Wt/WTextArea Wt/WTextArea
    + *  \brief A widget that provides a multi-line edit.
    + *
    + * To act upon text changes, connect a slot to the changed() signal.
    + * This signal is emitted when the user changed the content, and
    + * subsequently removes the focus from the line edit.
    + *
    + * To act upon editing, connect a slot to the keyWentUp() signal.
    + *
    + * At all times, the current content may be accessed with the text()
    + * method.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget();
    + * Wt::WLabel *label = new Wt::WLabel("Comments:", w);
    + * Wt::WTextArea *edit = new Wt::WTextArea("", w);
    + * label->setBuddy(edit);
    + * \endcode
    + * \endif
    + *
    + * %WTextArea is an \link WWidget::setInline(bool) inline \endlink widget.
    + *
    + * <h3>CSS</h3>
    + *
    + * The widget corresponds to an HTML <tt>&lt;textarea&gt;</tt> tag can be 
    + * styled using inline or external CSS as appropriate.
    + * The emptyText style can be configured via .Wt-edit-emptyText.
    + *
    + * \sa WLineEdit
    + */
    +class WT_API WTextArea : public WFormWidget
    +{
    +public:
    +  /*! \brief Creates a text area with empty content and optional parent.
    +   */
    +  WTextArea(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a text area with given content and optional parent.
    +   */
    +  WTextArea(const WT_USTRING& content, WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the number of columns.
    +   *
    +   * The default value is 20.
    +   */
    +  void setColumns(int cols);
    +
    +  /*! \brief Sets the number of rows.
    +   *
    +   * The default value is 5.
    +   */
    +  void setRows(int rows);
    +
    +  /*! \brief Returns the number of columns.
    +   *
    +   * \sa setColumns()
    +   */
    +  int  columns() const { return cols_; }
    +
    +  /*! \brief Returns the number of rows.
    +   *
    +   * \sa setRows()
    +   */
    +  int  rows() const { return rows_; }
    +
    +  /*! \brief Returns the current content.
    +   */
    +  const WT_USTRING& text() const { return content_; }
    +
    +  /*! \brief Sets the content of the text area.
    +   *
    +   * The default text is "".
    +   */
    +  virtual void setText(const WT_USTRING& text);
    +
    +  /*! \brief Returns the current selection start.
    +   *
    +   * Returns -1 if there is no selected text.
    +   *
    +   * \sa hasSelectedText(), selectedText()
    +   */
    +  int selectionStart() const;
    +
    +  /*! \brief Returns the currently selected text.
    +   *
    +   * Returns an empty string if there is currently no selected text.
    +   *
    +   * \sa hasSelectedText()
    +   */
    +  WT_USTRING selectedText() const;
    +
    +  /*! \brief Returns whether there is selected text.
    +   *
    +   * \sa selectedtext()
    +   */
    +  bool hasSelectedText() const;
    +
    +  /*! \brief Returns the current cursor position.
    +   *
    +   * Returns -1 if the widget does not have the focus.
    +   */
    +  int cursorPosition() const;
    +
    +  WValidator::State validate();
    +
    +private:
    +  WT_USTRING content_;
    +  int      cols_, rows_;
    +
    +  bool contentChanged_;
    +  bool attributesChanged_;
    +
    +protected:
    +  virtual void           updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual void           propagateRenderOk(bool deep);
    +
    +  virtual void           setFormData(const FormData& formData);
    +
    +  virtual int boxPadding(Orientation orientation) const;
    +  virtual int boxBorder(Orientation orientation) const;
    +
    +  void resetContentChanged();
    +};
    +
    +}
    +
    +#endif // WTEXTAREA_H_
    diff --git a/wt-3.1.7a/src/Wt/WTextArea.C b/wt-3.1.7a/src/Wt/WTextArea.C
    new file mode 100644
    index 0000000..a9b5651
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTextArea.C
    @@ -0,0 +1,211 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WStringUtil"
    +#include "Wt/WTextArea"
    +
    +#include "DomElement.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WTextArea::WTextArea(WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    cols_(20),
    +    rows_(5),
    +    contentChanged_(false),
    +    attributesChanged_(false)
    +{ 
    +  setInline(true);
    +  setFormObject(true);
    +}
    +
    +WTextArea::WTextArea(const WT_USTRING& text, WContainerWidget *parent)
    +  : WFormWidget(parent),
    +    content_(text),
    +    cols_(20),
    +    rows_(5),
    +    contentChanged_(false),
    +    attributesChanged_(false)
    +{ 
    +  setInline(true);
    +  setFormObject(true);
    +}
    +
    +void WTextArea::setText(const WT_USTRING& text)
    +{
    +  content_ = text;
    +  contentChanged_ = true;
    +  repaint(RepaintInnerHtml);
    +
    +  validate();
    +
    +  updateEmptyText();
    +}
    +
    +void WTextArea::setColumns(int columns)
    +{
    +  cols_ = columns;
    +  attributesChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WTextArea::setRows(int rows)
    +{
    +  rows_ = rows;
    +  attributesChanged_ = true;
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WTextArea::resetContentChanged()
    +{
    +  contentChanged_ = false;
    +}
    +
    +void WTextArea::updateDom(DomElement& element, bool all)
    +{
    +  if (element.type() == DomElement_TEXTAREA)
    +    if (contentChanged_ || all) {
    +      if (all)
    +	element.setProperty(Wt::PropertyInnerHTML,
    +			    escapeText(content_).toUTF8());
    +      else
    +	element.setProperty(Wt::PropertyValue, content_.toUTF8());
    +      contentChanged_ = false;
    +    }
    +
    +  if (attributesChanged_ || all) {
    +    element.setAttribute("cols",
    +			 boost::lexical_cast<std::string>(cols_));
    +    element.setAttribute("rows",
    +			 boost::lexical_cast<std::string>(rows_));
    +
    +    attributesChanged_ = false;
    +  }
    +
    +  WFormWidget::updateDom(element, all);
    +}
    +
    +void WTextArea::propagateRenderOk(bool deep)
    +{
    +  attributesChanged_ = false;
    +  contentChanged_ = false;
    +  
    +  WFormWidget::propagateRenderOk(deep);
    +}
    +
    +DomElementType WTextArea::domElementType() const
    +{
    +  return DomElement_TEXTAREA;
    +}
    +
    +void WTextArea::setFormData(const FormData& formData)
    +{
    +  if (contentChanged_)
    +    return;
    +
    +  if (!Utils::isEmpty(formData.values)) {
    +    std::string value = formData.values[0];
    +
    +    /*
    +     * IE puts \r\b for a newline, but then gets confused about this itself
    +     * when deriving the selection start/end
    +     */
    +    Utils::replace(value, '\r', "");
    +    content_ = WT_USTRING::fromUTF8(value, true);
    +  }
    +}
    +
    +WValidator::State WTextArea::validate()
    +{
    +  if (validator()) {
    +    WValidator::State result = validator()->validate(content_);
    +    if (result == WValidator::Valid)
    +      removeStyleClass("Wt-invalid", true);
    +    else
    +      addStyleClass("Wt-invalid", true);
    +
    +    return result;
    +  } else
    +    return WValidator::Valid;
    +}
    +
    +int WTextArea::boxPadding(Orientation orientation) const
    +{
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  if (env.agentIsIE() || env.agentIsOpera())
    +    return 1;
    +  else if (env.agentIsChrome())
    +    return 2;
    +  else if (env.userAgent().find("Mac OS X") != std::string::npos)
    +    return 0;
    +  else if (env.userAgent().find("Windows") != std::string::npos)
    +    return 0;
    +  else
    +    return 1;
    +}
    +
    +int WTextArea::boxBorder(Orientation orientation) const
    +{
    +  const WEnvironment& env = WApplication::instance()->environment();
    +
    +  if (env.agentIsIE() || env.agentIsOpera())
    +    return 2;
    +  else if (env.agentIsChrome())
    +    return 1;
    +  else if (env.userAgent().find("Mac OS X") != std::string::npos)
    +    return 1;
    +  else if (env.userAgent().find("Windows") != std::string::npos)
    +    return 2;
    +  else
    +    return 2;
    +}
    +
    +int WTextArea::selectionStart() const
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->focus() == id()) {
    +    if (app->selectionStart() != -1
    +	&& app->selectionEnd() != app->selectionStart()) {
    +      return app->selectionStart();
    +    } else
    +      return -1;
    +  } else
    +    return -1;
    +}
    +
    +WT_USTRING WTextArea::selectedText() const
    +{
    +  if (selectionStart() != -1) {
    +    WApplication *app = WApplication::instance();
    +
    +    return UTF8Substr(text().toUTF8(), app->selectionStart(),
    +		    app->selectionEnd() - app->selectionStart());
    +  } else
    +    return WString::Empty;
    +}
    +
    +bool WTextArea::hasSelectedText() const
    +{
    +  return selectionStart() != -1;
    +}
    +
    +int WTextArea::cursorPosition() const
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->focus() == id())
    +    return app->selectionEnd();
    +  else
    +    return -1;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTextEdit b/wt-3.1.7a/src/Wt/WTextEdit
    new file mode 100644
    index 0000000..6dde827
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTextEdit
    @@ -0,0 +1,176 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTEXTEDIT_H_
    +#define WTEXTEDIT_H_
    +
    +#include <Wt/WTextArea>
    +
    +namespace Wt {
    +
    +/*! \class WTextEdit Wt/WTextEdit Wt/WTextEdit
    + *  \brief A rich-text XHTML editor.
    + *
    + * The editor provides interactive editing of XHTML text. By default
    + * it provides basic mark-up (font, formatting, color, links, and
    + * lists), but additional buttons may be added to the tool bars that
    + * add additional formatting options.
    + *
    + * The implementation is based on <a
    + * href="http://tinymce.moxiecode.com/">TinyMCE</a>. The widget may be
    + * configured and tailored using the setExtraPlugins() and
    + * setToolBar() methods that provide direct access to the underlying
    + * TinyMCE component.
    + * 
    + * \if cpp
    + * To use this widget, you need to download TinyMCE (version 3.0.7 or
    + * later) and deploy the <tt>tinymce/jscripts/tiny_mce</tt> folder to
    + * <i>tinyMCEURL</i>. The default value for <i>tinyMCEURL</i> is
    + * <i>resourcesURL</i><tt>/tiny_mce</tt>, where <i>resourcesURL</i> is
    + * the configuration property that locates the %Wt <tt>resources/</tt>
    + * folder (i.e., we assume by default that you copy the
    + * <tt>tiny_mce</tt> folder to the <tt>resources/</tt> folder), see
    + * also \ref deployment "deployment and resources".
    + * \endif
    + *
    + * The value may be overridden with a URL that points to the directory
    + * where the <tt>tiny_mce</tt> folder is located, by configuring the
    + * <i>tinyMCEURL</i> property in your %Wt configuration file, see \ref
    + * config_general "configuration properties".
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget();
    + * Wt::WLabel *label = new Wt::WLabel("Comments:", w);
    + * Wt::WTextEdit *edit = new Wt::WTextEdit("", w);
    + * label->setBuddy(edit);
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + *
    + * \image html WTextEdit-1.png "Default configuration of a WTextEdit"
    + */
    +class WT_API WTextEdit : public WTextArea
    +{
    +public:
    +  /*! \brief Creates a new text editor.
    +   */
    +  WTextEdit(WContainerWidget *parent = 0);
    +
    +  /*! \brief Creates a new text editor and initialize with given text.
    +   *
    +   * The \p text should be valid XHTML.
    +   */
    +  WTextEdit(const WT_USTRING& text, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WTextEdit();
    +
    +  /*! \brief Sets the content.
    +   *
    +   * The \p text should be valid XHTML.
    +   *
    +   * The default value is "".
    +   */
    +  virtual void setText(const WT_USTRING& text);
    +
    +  /*! \brief Sets the stylesheet for displaying the content.
    +   *
    +   * The content is rendered using the rules defined in this
    +   * stylesheet. The stylesheet is also used to derive additional
    +   * styles that are available in the text editor, for example in the
    +   * "styleselect" button.
    +   *
    +   * Multiple stylesheets may be specified as a comma separated list.
    +   */
    +  void setStyleSheet(const std::string& uri);
    +
    +  /*! \brief Returns the content stylesheet.
    +   *
    +   * \sa setStyleSheet()
    +   */
    +  const std::string& styleSheet() const { return styleSheet_; }
    +
    +  /*! \brief Loads additional TinyMCE plugins.
    +   *
    +   * %Wt loads by default only the plugin 'safari' (which adds support
    +   * for the Safari web browser). Use this method to load additional
    +   * plugins. Multiple plugins may be specified as a comma separated
    +   * list.
    +   *
    +   * The various plugins are described in the <a
    +   * href="http://wiki.moxiecode.com/index.php/TinyMCE:Plugins">TinyMCE
    +   * documentation</a>.
    +   *
    +   * \note Plugins can only be loaded before the initial display of
    +   * the widget.
    +   */
    +  void setExtraPlugins(const std::string& plugins);
    +
    +  /*! \brief Returns the extra plugins.
    +   *
    +   * \sa setExtraPlugins()
    +   */
    +  const std::string& extraPlugins() const { return extraPlugins_; }
    +
    +  /*! \brief Configures a tool bar.
    +   *
    +   * This configures the buttons for the \p i'th tool bar (with 0
    +   * <= \p i <= 3).
    +   *
    +   * The syntax and available buttons is documented in the <a
    +   * href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_buttons_1_n">TinyMCE
    +   * documentation</a>.
    +   *
    +   * The default <i>config</i> for the first tool bar (\p i = 0)
    +    is: "fontselect, |, bold, italic, underline, |, fontsizeselect, |,
    +    forecolor, backcolor, |, justifyleft, justifycenter, justifyright,
    +    justifyfull, |, anchor, |, numlist, bullist".
    +   *
    +   * By default, the other three tool bars are disabled (\p config = "").
    +   *
    +   * Note that some buttons are only available after loading extra
    +   * plugins using setExtraPlugins().
    +   *
    +   * \note The tool bar configuration can only be set before the
    +   * initial display of the widget.
    +   */
    +  void setToolBar(int i, const std::string& config);
    +
    +  /*! \brief Returns a tool bar configuration.
    +   *
    +   * \sa setToolBar()
    +   */
    +  const std::string& toolBar(int i) { return buttons_[i]; }
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +protected:
    +  virtual std::string renderRemoveJs();
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void getDomChanges(std::vector<DomElement *>& result,
    +			     WApplication *app);
    +
    +  virtual int boxPadding(Orientation orientation) const;
    +  virtual int boxBorder(Orientation orientation) const;
    +
    +private:
    +  bool contentChanged_;
    +  std::string styleSheet_, extraPlugins_;
    +  std::string buttons_[4];
    +
    +  void init();
    +  static void initTinyMCE();
    +};
    +
    +}
    +
    +#endif // WTEXTEDIT_H_
    diff --git a/wt-3.1.7a/src/Wt/WTextEdit.C b/wt-3.1.7a/src/Wt/WTextEdit.C
    new file mode 100644
    index 0000000..5b940f5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTextEdit.C
    @@ -0,0 +1,242 @@
    +
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WTextEdit"
    +
    +#include "DomElement.h"
    +#include "WebSession.h"
    +
    +namespace Wt {
    +
    +WTextEdit::WTextEdit(WContainerWidget *parent)
    +  : WTextArea(parent),
    +    contentChanged_(false)
    +{
    +  init();
    +}
    +
    +WTextEdit::WTextEdit(const WT_USTRING& text, WContainerWidget *parent)
    +  : WTextArea(text, parent),
    +    contentChanged_(false)
    +{
    +  init();
    +}
    +
    +void WTextEdit::init()
    +{
    +#ifdef WT_TARGET_JAVA
    +  for (unsigned i = 0; i < 4; ++i)
    +    buttons_[i] = "";
    +#endif // WT_TARGET_JAVA
    +
    +  setInline(false);
    +  buttons_[0] = "fontselect,|,bold,italic,underline,|,fontsizeselect,|"
    +    ",forecolor,backcolor,|"
    +    ",justifyleft,justifycenter,justifyright,justifyfull,|,anchor,|"
    +    ",numlist,bullist";
    +
    +  initTinyMCE();
    +  
    +  setJavaScriptMember
    +    (WT_RESIZE_JS,
    +     "function(e,w,h){" WT_CLASS ".tinyMCEResize(e, w, h); };");
    +}
    +
    +WTextEdit::~WTextEdit()
    +{
    +  // to have virtual renderRemoveJs():
    +  setParentWidget(0);
    +}
    +
    +void WTextEdit::setStyleSheet(const std::string& uri)
    +{
    +  styleSheet_ = uri;
    +}
    +
    +void WTextEdit::setExtraPlugins(const std::string& plugins)
    +{
    +  extraPlugins_ = plugins;
    +}
    +
    +void WTextEdit::setToolBar(int i, const std::string& config)
    +{
    +  buttons_[i] = config;
    +}
    +
    +std::string WTextEdit::renderRemoveJs()
    +{
    +  return jsRef() + ".ed.remove();" WT_CLASS ".remove('" + id() + "');";
    +}
    +
    +void WTextEdit::initTinyMCE()
    +{
    +  std::string tinyMCEBaseURL = WApplication::resourcesUrl() + "tiny_mce/";
    +
    +  WApplication::readConfigurationProperty("tinyMCEBaseURL", tinyMCEBaseURL);
    +
    +  if (!tinyMCEBaseURL.empty()
    +      && tinyMCEBaseURL[tinyMCEBaseURL.length()-1] != '/')
    +    tinyMCEBaseURL += '/';
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->environment().ajax())
    +    app->doJavaScript("window.tinyMCE_GZ = { loaded: true };", false);
    +
    +  if (app->require(tinyMCEBaseURL + "tiny_mce.js", "window['tinyMCE']")) {
    +    /*
    +      interesting config options:
    +
    +      directionality, docs_language, language ?
    +      entities ?
    +
    +      we should not use display:none for hiding?
    +    */
    +    if (app->environment().ajax())
    +      app->doJavaScript("tinymce.dom.Event._pageInit();", false);
    +
    +    app->doJavaScript("tinyMCE.init();", false);
    +    app->styleSheet().addRule(".mceEditor", "height: 100%;");
    +
    +    // Adjust the height: this can only be done by adjusting the iframe height.
    +    app->doJavaScript
    +      (WT_CLASS ".tinyMCEResize=function(e,w,h){"
    +       """e.style.height = (h - 2) + 'px';"
    +       ""
    +       """var iframe = " WT_CLASS ".getElement(e.id + '_ifr');"
    +       """if (iframe) {"
    +       ""  "var row=iframe.parentNode.parentNode,"
    +       ""      "tbl=row.parentNode.parentNode,"
    +       ""      "i, il;"
    +       ""
    +       // deduct height of toolbars
    +       ""  "for (i=0, il=tbl.rows.length; i<il; i++) {"
    +       ""    "if (tbl.rows[i] != row)"
    +       ""      "h -= Math.max(28, tbl.rows[i].offsetHeight);"
    +       ""  "}"
    +       ""
    +       ""  "h = (h - 2) + 'px';"
    +       ""
    +       ""  "if (iframe.style.height != h) iframe.style.height=h;"
    +       """}"
    +       "};", false);
    +  }
    +}
    +
    +void WTextEdit::resize(const WLength& width, const WLength& height)
    +{
    +  WTextArea::resize(width, height);
    +}
    +
    +void WTextEdit::setText(const WT_USTRING& text)
    +{
    +  WTextArea::setText(text);
    +  contentChanged_ = true;
    +}
    +
    +void WTextEdit::updateDom(DomElement& element, bool all)
    +{
    +  WTextArea::updateDom(element, all);
    +
    +  if (element.type() == DomElement_TEXTAREA)
    +    element.removeProperty(PropertyStyleDisplay);
    +
    +  // we are creating the actual element
    +  if (all && element.type() == DomElement_TEXTAREA) {
    +    std::stringstream config;
    +
    +    config <<
    +      "{button_tile_map:true"
    +      ",doctype:'" + wApp->docType() + "'"
    +      ",relative_urls:true"
    +      ",plugins:'safari";
    +
    +    if (!extraPlugins_.empty())
    +      config << ',' << extraPlugins_;
    +    config << "'";
    +
    +    config << ",theme:'advanced'";
    +
    +    for (unsigned i = 0; i < 4; ++i)
    +      config << ",theme_advanced_buttons" << (i+1) << ":'"
    +	     << buttons_[i] << '\'';
    +
    +    config <<
    +      ",theme_advanced_toolbar_location:'top'"
    +      ",theme_advanced_toolbar_align:'left'";
    +
    +    if (!styleSheet_.empty())
    +      config << ",content_css: '" << styleSheet_ << '\''; 
    +
    +    config <<
    +      ",init_instance_callback: " << jsRef() << ".init" << ""
    +      "}";
    +
    +    DomElement dummy(DomElement::ModeUpdate, DomElement_TABLE);
    +    updateDom(dummy, true);
    +
    +    /*
    +     * When initialized, we apply the inline style.
    +     */
    +    element.callMethod("init=function(){"
    +		       "var d=" WT_CLASS ".getElement('" + id() + "_tbl');"
    +		       "d.style.cssText='width:100%;" + dummy.cssStyle() + "';"
    +		       "};");
    +    element.callMethod("ed=new tinymce.Editor('" + id() + "',"
    +		       + config.str() + ");");
    +    element.callMethod("ed.render();");
    +    element.callMethod("ed.onChange.add(function(ed) { ed.save(); });");
    +
    +    contentChanged_ = false;
    +  }
    +
    +  if (!all && contentChanged_) {
    +    element.callJavaScript(jsRef() + ".ed.load();");
    +    contentChanged_ = false;
    +  }
    +}
    +
    +void WTextEdit::getDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app)
    +{
    +  /*
    +   * We apply changes directly to the table element, except of the textarea
    +   * contents. Therefore we first update the TABLE element, then collect
    +   * the contentChange to the TEXTAREA element, but reverse the order in
    +   * which they get applied since the load() statement expects the contents
    +   * to be set in the textarea first.
    +   */
    +
    +  /*
    +   * Problem! ed.render() returns before the element is actually rendered,
    +   * and therefore, the _tbl element may not yet be available.
    +   *
    +   * This causes fail when a text edit is progressively enhanced. The solution
    +   * is to listen for the onInit() event -> we should be able to add a
    +   * wrapping ... .onInit(function(ed) { .... }) around the changes
    +   */
    +  DomElement *e = DomElement::getForUpdate(formName() + "_tbl",
    +					   DomElement_TABLE);
    +  updateDom(*e, false);
    +
    +  WTextArea::getDomChanges(result, app);
    +
    +  result.push_back(e);
    +}
    +
    +int WTextEdit::boxPadding(Orientation orientation) const
    +{
    +  return 0;
    +}
    +
    +int WTextEdit::boxBorder(Orientation orientation) const
    +{
    +  return 0;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTime b/wt-3.1.7a/src/Wt/WTime
    new file mode 100644
    index 0000000..46ede7c
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTime
    @@ -0,0 +1,290 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTIME_H_
    +#define WTIME_H_
    +
    +#include <Wt/WDateTime>
    +#include <Wt/WString>
    +#include <exception>
    +
    +namespace Wt {
    +
    +/*! \class InvalidTimeException Wt/WTime Wt/WTime
    + *  \brief Exception thrown when calculating with an invalid time.
    + *
    + * \sa WTime
    + */
    +class WT_API InvalidTimeException : public std::exception
    +{
    +public:
    +  InvalidTimeException();
    +  ~InvalidTimeException() throw();
    +
    +  /*! \brief Returns a message describing the error.
    +   */
    +  const char *what() const throw();
    +};
    +
    +/*! \class WTime Wt/WTime Wt/WTime
    + *  \brief A clock time.
    + *
    + * A clock time represents the time of day (0 to 24 hour), up to
    + * millisecond precision.
    + *
    + * \sa WDate, WDateTime
    + */
    +class WT_API WTime
    +{
    +public:
    +  /*! \brief Construct a <i>Null</i> time.
    +   *
    +   * A time for which isNull() returns true. A <i>Null</i> time is also
    +   * invalid.
    +   *
    +   * \sa isValid(), isNull()
    +   */
    +  WTime();
    +
    +  /*! \brief Construct a time given hour, minutes, seconds, and milliseconds.
    +   *
    +   * \p h has range 0-23, \p m and \p s have range 0-59, and \p ms has
    +   * range 0-999.
    +   *
    +   * When the time is invalid, isValid() is set to \c false.
    +   */
    +  WTime(int h, int m, int s = 0, int ms = 0);
    +
    +  /*! \brief Sets the time.
    +   *
    +   * \p h has range 0-23, \p m and \p s have range 0-59, and \p ms has
    +   * range 0-999.
    +   *
    +   * When the time is invalid, isValid() is set to \c false.
    +   */
    +  bool setHMS(int h, int m, int s, int ms = 0);
    +
    +  /*! \brief Adds seconds.
    +   *
    +   * Returns a time that is \p s seconds later than this time. Negative
    +   * values for \p s will result in a time that is as many seconds
    +   * earlier.
    +   */
    +  WTime addSecs(int s) const;
    +
    +  /*! \brief Adds milliseconds.
    +   *
    +   * Returns a time that is \p ms milliseconds later than this
    +   * time. Negative values for \p ms will result in a time that
    +   * is as many milliseconds earlier.
    +   */
    +  WTime addMSecs(int ms) const;
    +
    +  /*! \brief Returns if this time is <i>Null</i>.
    +   *
    +   * A null time is also invalid.
    +   *
    +   * \sa isValid(), WTime()
    +   */
    +  bool isNull() const;
    +
    +  /*! \brief Returns if this time is valid.
    +   */
    +  bool isValid() const { return valid_; }
    +
    +  /*! \brief Returns the hour (0-23).
    +   */
    +  int hour() const;
    +
    +  /*! \brief Returns the minutes (0-59).
    +   */
    +  int minute() const;
    +
    +  /*! \brief Returns the seconds (0-59).
    +   */
    +  int second() const;
    +
    +  /*! \brief Returns the milliseconds (0-999)
    +   */
    +  int msec() const;
    +
    +  /*! \brief Returns the difference between to time values (in seconds).
    +   *
    +   * This returns a value between -86400 s and 86400 s.
    +   */
    +  int secsTo(const WTime& t) const;
    +
    +  /*! \brief Returns the difference between to time values (in milliseconds).
    +   *
    +   * This returns a value between -86400000 ms and 86400000 ms.
    +   */
    +  int msecsTo(const WTime& t) const;
    +
    +  int start();
    +  int restart();
    +  int elapsed();
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator< (const WTime& other) const;
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator<= (const WTime& other) const;
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator> (const WTime& other) const;
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator>= (const WTime& other) const;
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator== (const WTime& other) const;
    +
    +  /*! \brief Compares two time values.
    +   */
    +  bool operator!= (const WTime& other) const;
    +
    +  static WT_USTRING defaultFormat();
    +
    +  /*! \brief Formats this time to a string using a default format.
    +   *
    +   * The default format is "hh:mm:ss".
    +   */
    +  WT_USTRING toString() const;
    +
    +  /*! \brief Formats this time to a string using a specified format.
    +   *
    +   * The \p format is a string in which the following contents has
    +   * a special meaning.
    +   *
    +   * <table>
    +   *  <tr><td><b>Code</b></td><td><b>Meaning</b></td>
    +   *      <td><b>Example (for 14:06:23.045)</b></td></tr>
    +   *  <tr><td>h</td><td>The hour without leading zero (0-23 or 1-12 for AM/PM display)</td>
    +          <td>14 or 2</td></tr>
    +   *  <tr><td>hh</td><td>The hour with leading zero (00-23 or 01-12 for AM/PM display)</td>
    +          <td>14 or 02</td></tr>
    +   *  <tr><td>H</td><td>The hour without leading zero (0-23)</td>
    +          <td>14</td></tr>
    +   *  <tr><td>HH</td><td>The hour with leading zero (00-23)</td>
    +          <td>14</td></tr>
    +   *  <tr><td>m</td><td>The minutes without leading zero (0-59)</td>
    +          <td>6</td></tr>
    +   *  <tr><td>mm</td><td>The minutes with leading zero (00-59)</td>
    +          <td>06</td></tr>
    +   *  <tr><td>s</td><td>The seconds without leading zero (0-59)</td>
    +          <td>23</td></tr>
    +   *  <tr><td>ss</td><td>The seconds with leading zero (00-59)</td>
    +          <td>23</td></tr>
    +   *  <tr><td>z</td><td>The milliseconds without leading zero (0-999)</td>
    +          <td>45</td></tr>
    +   *  <tr><td>zzz</td><td>The millisecons with leading zero (000-999)</td>
    +          <td>045</td></tr>
    +   *  <tr><td>AP or A</td><td>use AM/PM display: affects h or hh display and is replaced itself by AM/PM</td>
    +          <td>PM</td></tr>
    +   *  <tr><td>ap or a</td><td>use am/pm display: affects h or hh display and is replaced itself by am/pm</td>
    +          <td>pm</td></tr>
    +   * </table>
    +   *
    +   * Any other text is kept literally. String content between single
    +   * quotes (') are not interpreted as special codes. Inside a string, a literal
    +   * quote may be specifed using a double quote ('').
    +   *
    +   * Examples of format and result:
    +   * <table>
    +   *  <tr><td><b>Format</b></td><td><b>Result (for 22:53:13.078)</b></td></tr>
    +   *  <tr><td>hh:mm:ss.zzz</td><td>22:53:13.078</td></tr>
    +   *  <tr><td>hh:mm:ss AP</td><td>10:53:13 PM</td></tr>
    +   * </table>
    +   *
    +   * \sa fromString(const WString& value, const WString& format)
    +   */
    +  WT_USTRING toString(const WT_USTRING& format) const;
    +
    +  /*! \brief Parses a string to a time using a default format.
    +   *
    +   * The default format is "hh:mm:ss".
    +   * For example, a time specified as:
    +   * \code
    +   *   "22:55:15"
    +   * \endcode
    +   * will be parsed as a time that equals a time constructed as:
    +   * \code
    +   *   WTime d(22,55,15);
    +   * \endcode
    +   *
    +   * When the time could not be parsed or is not valid, an invalid
    +   * time is returned (for which isValid() returns false).
    +   *
    +   * \sa fromString(const WString& s, const WString& format), isValid()
    +   */
    +  static WTime fromString(const WT_USTRING& s);
    +
    +  /*! \brief Parses a string to a time using a specified format.
    +   *
    +   * The \p format follows the same syntax as used by
    +   * \link toString(const WString& format) const toString(const WString& format)\endlink.
    +   *
    +   * When the time could not be parsed or is not valid, an invalid
    +   * time is returned (for which isValid() returns false). 
    +   *
    +   * \sa toString(const WString&) const
    +   */
    +  static WTime fromString(const WT_USTRING& s, const WT_USTRING& format);
    +
    +  /*! \brief Reports the current server time.
    +   *
    +   * This method returns the time as indicated by the system clock of
    +   * the server.
    +   */
    +  static WTime currentServerTime();
    +
    +  struct RegExpInfo {
    +    std::string regexp;
    +    std::string hourGetJS;
    +    std::string minuteGetJS;
    +    std::string secGetJS;
    +    std::string msecGetJS;
    +  };
    +
    +  static RegExpInfo formatToRegExp(const WT_USTRING& format);
    +
    +private:
    +  bool valid_;
    +  long time_;
    +
    +  WTime (long time);
    +
    +  struct ParseState {
    +    int h, m, s, z, a;
    +    int hour, minute, sec, msec;
    +    bool pm, parseAMPM, haveAMPM;
    +
    +    ParseState();
    +  };
    +
    +  static bool parseLast(const std::string& v, unsigned& vi,
    +			ParseState& parse, const WString& format);
    +
    +  static WDateTime::CharState handleSpecial(char c, const std::string& v,
    +					    unsigned& vi, ParseState& parse,
    +					    const WString& format);
    +
    +  bool writeSpecial(const std::string& f, unsigned& i, std::stringstream& result)
    +    const;
    +
    +  int pmhour() const;
    +
    +  friend class WDateTime;
    +};
    +
    +}
    +
    +#endif // WTIME_H_
    diff --git a/wt-3.1.7a/src/Wt/WTime.C b/wt-3.1.7a/src/Wt/WTime.C
    new file mode 100644
    index 0000000..a770bfe
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTime.C
    @@ -0,0 +1,453 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <stdlib.h>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WTime"
    +#include "Wt/WLogger"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +#include <boost/date_time/posix_time/posix_time_types.hpp>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace Wt {
    +
    +  namespace {
    +    const int MSECS_PER_DAY = 24 * 60 * 60 * 1000;
    +  }
    +
    +InvalidTimeException::InvalidTimeException()
    +{ }
    +
    +InvalidTimeException::~InvalidTimeException() throw()
    +{ }
    +
    +const char *InvalidTimeException::what() const throw()
    +{ 
    +  return "Error: Attempted operation on an invalid WTime";
    +}
    +
    +WTime::WTime()
    +  : valid_(false),
    +    time_(-1)
    +{ }
    +
    +WTime::WTime(int h, int m, int s, int ms)
    +{
    +  setHMS(h, m, s, ms);
    +}
    +
    +bool WTime::setHMS(int h, int m, int s, int ms)
    +{
    +  if (   h >= 0 && h <= 23
    +      && m >= 0 && m <= 59
    +      && s >= 0 && s <= 59
    +      && ms >= 0 && ms <= 999) {
    +    valid_ = true;
    +    time_ = ((h * 60 + m) * 60 + s) * 1000 + ms;
    +  } else {
    +    WApplication *app = wApp;
    +    if (app)
    +      app->log("warn") << "Invalid time: "
    +		       << h << ":" << m << ":" << s << "." << ms;
    +    valid_ = false;
    +    time_ = 0; // !null
    +  }
    +
    +  return valid_;
    +}
    +
    +WTime WTime::addMSecs(int ms) const
    +{
    +  if (valid_) {
    +    long t = ((time_ + ms) % MSECS_PER_DAY + MSECS_PER_DAY) % MSECS_PER_DAY;
    +    return WTime(t);
    +  } else
    +    return *this;
    +}
    +
    +WTime WTime::addSecs(int s) const
    +{
    +  return addMSecs(1000 * s);
    +}
    +
    +bool WTime::isNull() const
    +{
    +  return time_ == -1;
    +}
    +
    +int WTime::hour() const
    +{
    +  return time_ / (1000 * 60 * 60);
    +}
    +
    +int WTime::minute() const
    +{
    +  return (time_ / (1000 * 60)) % 60;
    +}
    +
    +int WTime::second() const
    +{
    +  return (time_ / 1000) % 60;
    +}
    +
    +int WTime::msec() const
    +{
    +  return time_ % 1000;
    +}
    +
    +int WTime::secsTo(const WTime& t) const
    +{
    +  return msecsTo(t) / 1000;
    +}
    +
    +int WTime::msecsTo(const WTime& t) const
    +{
    +  if (!isValid() || !t.isValid())
    +    throw InvalidTimeException();
    +
    +  return t.time_ - time_;
    +}
    +
    +bool WTime::operator> (const WTime& other) const
    +{
    +  return other < *this;
    +}
    +
    +bool WTime::operator< (const WTime& other) const
    +{
    +  if (!isValid() && !other.isValid())
    +    return false;
    +
    +  if (!isValid() || !other.isValid())
    +    throw InvalidTimeException();
    +
    +  return time_ < other.time_;
    +}
    +
    +bool WTime::operator!= (const WTime& other) const
    +{
    +  return !(*this == other);
    +}
    +
    +bool WTime::operator== (const WTime& other) const
    +{
    +  if (!isValid() && !other.isValid())
    +    return true;
    +
    +  if (!isValid() || !other.isValid())
    +    throw InvalidTimeException();
    +
    +  return time_ == other.time_;
    +}
    +
    +bool WTime::operator<= (const WTime& other) const
    +{
    +  if (!isValid() && !other.isValid())
    +    return true;
    +
    +  if (!isValid() || !other.isValid())
    +    throw InvalidTimeException();
    +
    +  return time_ <= other.time_;
    +}
    +
    +bool WTime::operator>= (const WTime& other) const
    +{
    +  return other <= *this;
    +}
    +
    +WTime WTime::currentServerTime()
    +{
    +  return WTime((long)boost::posix_time::microsec_clock::local_time()
    +	       .time_of_day().total_milliseconds());
    +}
    +
    +WString WTime::defaultFormat()
    +{
    +  return WString::fromUTF8("HH:mm:ss"); 
    +}
    +
    +WTime WTime::fromString(const WString& s)
    +{
    +  return fromString(s, defaultFormat());
    +}
    +
    +WTime::ParseState::ParseState()
    +{
    +  h = m = s = z = a = 0;
    +  hour = minute = sec = msec = 0;
    +  pm = parseAMPM = haveAMPM = false;
    +}
    +
    +WTime WTime::fromString(const WString& s, const WString& format)
    +{
    +  WTime result;
    +
    +  WDateTime::fromString(0, &result, s, format);
    +
    +  return result;
    +}
    +
    +WDateTime::CharState WTime::handleSpecial(char c, const std::string& v,
    +					  unsigned& vi, ParseState& parse,
    +					  const WString& format)
    +{
    +  switch (c) {
    +  case 'H':
    +  case 'h':
    +    parse.parseAMPM = c == 'h';
    +
    +    if (parse.h == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.h;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'm':
    +    if (parse.m == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.m;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 's':
    +    if (parse.s == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.s;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'z':
    +    if (parse.z == 0)
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +    ++parse.z;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'A':
    +  case 'a':
    +    if (!parseLast(v, vi, parse, format))
    +      return WDateTime::CharInvalid;
    +
    +    parse.a = 1;
    +
    +    return WDateTime::CharHandled;
    +
    +  case 'P':
    +  case 'p':
    +    if (parse.a == 1) {
    +      if (!parseLast(v, vi, parse, format))
    +	return WDateTime::CharInvalid;
    +
    +      return WDateTime::CharHandled;
    +    }
    +
    +    /* fall through */
    +
    +  default:
    +    if (!parseLast(v, vi, parse, format))
    +      return WDateTime::CharInvalid;
    +
    +    return WDateTime::CharUnhandled;
    +  }
    +}
    +
    +static void fatalFormatError(const WString& format, int c, const char* cs)
    +{
    +  std::stringstream s;
    +  s << "WTime format syntax error (for \"" << format.toUTF8()
    +    << "\"): Cannot handle " << c << " consecutive " << cs;
    +
    +  throw WtException(s.str());
    +}
    +
    +bool WTime::parseLast(const std::string& v, unsigned& vi,
    +		      ParseState& parse,
    +		      const WString& format)
    +{
    +  const char *letter[] = { "h's", "m's", "s'es", "z's" };
    +
    +  for (int i = 0; i < 4; ++i) {
    +    int *count;
    +    int *value;
    +    int maxCount = 2;
    +
    +    switch (i) {
    +    case 0:
    +      count = &parse.h;
    +      value = &parse.hour;
    +      break;
    +    case 1:
    +      count = &parse.m;
    +      value = &parse.minute;
    +      break;
    +    case 2:
    +      count = &parse.s;
    +      value = &parse.sec;
    +      break;
    +    case 3:
    +      count = &parse.z;
    +      value = &parse.msec;
    +      maxCount = 3;
    +    }
    +
    +    if (*count != 0) {
    +      if (*count == 1) {
    +	std::string str;
    +
    +	if (vi >= v.length())
    +	  return false;
    +	str += v[vi++];
    +
    +	for (int j = 0; j < maxCount - 1; ++j)
    +	  if (vi < v.length())
    +	    if ('0' <= v[vi] && v[vi] <= '9')
    +	      str += v[vi++];
    +	try {
    +	  *value = boost::lexical_cast<int>(str);
    +	} catch (boost::bad_lexical_cast&) {
    +	  return false;
    +	}
    +
    +      } else if (*count == maxCount) {
    +	if (vi + (maxCount - 1) >= v.length())
    +	  return false;
    +
    +	std::string str = v.substr(vi, maxCount);
    +	vi += maxCount;
    +
    +	try {
    +	  *value = boost::lexical_cast<int>(str);
    +	} catch (boost::bad_lexical_cast&) {
    +	  return false;
    +	}
    +      } else 
    +	fatalFormatError(format, *count, letter[i]);
    +    }
    +
    +    *count = 0;
    +  }
    +
    +  if (parse.a) {
    +    if (vi + 1 >= v.length())
    +      return false;
    +
    +    std::string str = v.substr(vi, 2);
    +    vi += 2;
    +
    +    parse.haveAMPM = true;
    +
    +    if (str == "am" || str == "AM") {
    +      parse.pm = false;
    +    } else if (str == "pm" || str == "PM") {
    +      parse.pm = true;
    +    } else
    +      return false;
    +
    +    parse.a = 0;
    +  }
    +
    +  return true;
    +}
    +
    +WString WTime::toString() const
    +{
    +  return WTime::toString(defaultFormat());
    +}
    +
    +WString WTime::toString(const WString& format) const
    +{
    +  return WDateTime::toString(0, this, format);
    +}
    +
    +int WTime::pmhour() const
    +{
    +  int result = hour() % 12;
    +  return result != 0 ? result : 12;
    +}
    +
    +bool WTime::writeSpecial(const std::string& f, unsigned& i,
    +			 std::stringstream& result) const
    +{
    +  char buf[30];
    +
    +  bool useAMPM = false; // FIXME
    +
    +  switch (f[i]) {
    +  case 'h':
    +    if (f[i + 1] == 'h') {
    +      ++i;
    +      result << Utils::pad_itoa(useAMPM ? pmhour() : hour(), 2, buf);
    +    } else
    +      result << Utils::itoa(useAMPM ? pmhour() : hour(), buf);
    +
    +    return true;
    +  case 'H':
    +    if (f[i + 1] == 'H') {
    +      ++i;
    +      result << Utils::pad_itoa(hour(), 2, buf);
    +    } else
    +      result << Utils::itoa(hour(), buf);
    +
    +    return true;
    +  case 'm':
    +    if (f[i + 1] == 'm') {
    +      ++i;
    +      result << Utils::pad_itoa(minute(), 2, buf);
    +    } else
    +      result << Utils::itoa(minute(), buf);
    +
    +    return true;
    +  case 's':
    +    if (f[i + 1] == 's') {
    +      ++i;
    +      result << Utils::pad_itoa(second(), 2, buf);
    +    } else
    +      result << Utils::itoa(second(), buf);
    +
    +    return true;
    +  case 'z':
    +    if (f.substr(i + 1, 2) == "zz") {
    +      i += 2;
    +      result << Utils::pad_itoa(msec(), 3, buf);
    +    } else
    +      result << Utils::itoa(msec(), buf);
    +
    +    return true;
    +  case 'a':
    +  case 'A':
    +    if (f[i + 1] == 'p' || f[i + 1] == 'P')
    +      ++i;
    +
    +    if (hour() < 12)
    +      result << ((f[i] == 'a') ? "am" : "AM");
    +    else
    +      result << ((f[i] == 'p') ? "pm" : "PM");
    + 
    +    return true;
    +  default:
    +    return false;
    +  }
    +}
    +
    +WTime::WTime(long t)
    +  : valid_(true),
    +    time_(t)
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTimer b/wt-3.1.7a/src/Wt/WTimer
    new file mode 100644
    index 0000000..ff0bc62
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTimer
    @@ -0,0 +1,193 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTIMER_H_
    +#define WTIMER_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WSignal>
    +#include <Wt/WEvent>
    +
    +#ifndef WT_TARGET_JAVA
    +#include <boost/bind.hpp>
    +#endif // WT_TARGET_JAVA
    +
    +namespace Wt {
    +
    +class WTimerWidget;
    +class Time;
    +
    +/*! \class WTimer Wt/WTimer Wt/WTimer
    + *  \brief A utility class which provides timer signals and single-shot timers.
    + *
    + * To use a timer, create a %WTimer instance, set the timer
    + * interval using setInterval() and connect a slot to the timeout signal.
    + * Then, start the timer using start(). An active timer may be cancelled
    + * at any time using stop().
    + *
    + * By default, a timer will continue to generate events until you
    + * stop() it. To create a timer that will fire only once, use
    + * setSingleShot(). 
    + * \if cpp
    + * There is also a convience static method singleShot().
    + * \endif 
    + *
    + * When connecting stateless slot implementations to the timeout
    + * signal, these stateless slot implementations will be used as for
    + * any other signal (when Ajax is available).
    + *
    + * In clients without (enabled) JavaScript support, the minimum
    + * resolution of the timer is one second (1000 milli-seconds), and it
    + * is probably wise to use timers sparingly.
    + *
    + * A WTimer is only usable inside of a %Wt event loop.
    + * \if cpp
    + * If you want to create a timer outside the %Wt event loop, take a look at asio deadline_timer.
    + * \else
    + * If you want to create a timer outside the %Wt event loop, take a look at {javadoclink java.util.Timer}.
    + * \endif
    + * 
    + * \if cpp
    + * Timers are one way to provide updates of a web page without the
    + * user generating an event. Alternatively you may consider
    + * server-initiated updates, see WApplication::enableUpdates().
    + * \endif
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * // setup a timer which calls MyClass::timeout() every 2 seconds, until timer->stop() is called.
    + * Wt::WTimer *timer = new Wt::WTimer();
    + * timer->setInterval(2000);
    + * timer->timeout().connect(this, &MyClass::timeout);
    + * timer->start();
    + * \endcode
    + * \endif
    + */
    +class WT_API WTimer : public WObject
    +{
    +public:
    +  /*! \brief Construct a new timer with the given parent.
    +   */
    +  WTimer(WObject *parent = 0);
    +
    +  /*! \brief Destuctor.
    +   */
    +  ~WTimer();
    +
    +  /*! \brief Returns the interval (msec).
    +   */
    +  int interval() const { return interval_; }
    +
    +  /*! \brief Sets the interval (msec).
    +   */
    +  void setInterval(int msec);
    +
    +  /*! \brief Returns if the timer is running.
    +   */
    +  bool isActive() const { return active_; }
    +
    +  /*! \brief Is this timer set to fire only once.
    +   */
    +  bool isSingleShot() const { return singleShot_; }
    +
    +  /*! \brief Configures this timer to fire only once.
    +   *
    +   * A Timer is by default not single shot, and will fire continuously,
    +   * until it is stopped.
    +   *
    +   * \if cpp
    +   * \sa singleShot()
    +   * \endif
    +   */
    +  void setSingleShot(bool singleShot);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*! \brief This static function calls a slot after a given time interval.
    +   *
    +   * For example, the following code will call this->doSome() after 2
    +   * seconds: 
    +   * \code
    +   *   WTimer::singleShot(2000, this, &MyClass::doSome);
    +   * \endcode
    +   */
    +  template <class T, class V>
    +  static void singleShot(int msec, T *receiver, void (V::*method)());
    +
    +  /*! \brief This static function calls a function after a given time interval.
    +   *
    +   * This variant of the overloaded singleShot() method supports a
    +   * template function object (which supports operator ()).
    +   */
    +  template <class F>
    +  static void singleShot(int msec, const F& f);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Starts the timer.
    +   *
    +   * The timer will be isActive(), until either the interval has
    +   * elapsed, after which the timeout signal is activated,
    +   * or until stop() is called.
    +   */
    +  void start();
    +
    +  /*! \brief Stops the timer.
    +   *
    +   * You may stop the timer during its timeout(), or cancel a running timer
    +   * at any other time.
    +   *
    +   * \sa start()
    +   */
    +  void stop();
    +
    +  /*! \brief %Signal emitted when the timer timeouts.
    +   *
    +   * The %WMouseEvent does not provide any meaningful information but is
    +   * an implementation artefact.
    +   */
    +  EventSignal<WMouseEvent>& timeout();
    +
    +private:
    +  WTimerWidget *timerWidget_;
    +
    +  bool singleShot_;
    +  bool selfDestruct_;
    +  int  interval_;
    +  bool active_;
    +  bool timeoutConnected_;
    +
    +  Time *timeout_;
    +
    +  void gotTimeout();
    +
    +  void setSelfDestruct();
    +  int getRemainingInterval() const;
    +
    +  friend class WTimerWidget;
    +};
    +
    +#ifndef WT_TARGET_JAVA
    +template <class T, class V>
    +void WTimer::singleShot(int msec, T *receiver, void (V::*method)())
    +{
    +  singleShot(msec, boost::bind(method, receiver));
    +}
    +
    +template <class F>
    +void WTimer::singleShot(int msec, const F& f)
    +{
    +  WTimer *timer = new WTimer();
    +  timer->setSingleShot(true);
    +  timer->setInterval(msec);
    +  timer->setSelfDestruct();
    +  timer->timeout().connect(f);
    +  timer->start();
    +}
    +#endif // WT_TARGET_JAVA
    +
    +}
    +
    +#endif // WTIMER_H_
    diff --git a/wt-3.1.7a/src/Wt/WTimer.C b/wt-3.1.7a/src/Wt/WTimer.C
    new file mode 100644
    index 0000000..078ae77
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTimer.C
    @@ -0,0 +1,105 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WTimer"
    +#include "Wt/WTimerWidget"
    +#include "Wt/WContainerWidget"
    +#include "TimeUtil.h"
    +
    +namespace Wt {
    +
    +WTimer::WTimer(WObject *parent)
    +  : WObject(parent),
    +    timerWidget_(new WTimerWidget(this)),
    +    singleShot_(false),
    +    selfDestruct_(false),
    +    interval_(0),
    +    active_(false),
    +    timeoutConnected_(false),
    +    timeout_(new Time())
    +{ }
    +
    +EventSignal<WMouseEvent>& WTimer::timeout()
    +{
    +  return timerWidget_->clicked();
    +}
    +
    +WTimer::~WTimer()
    +{
    +  if (active_)
    +    stop();
    +
    +  delete timerWidget_;
    +  delete timeout_;
    +}
    +
    +void WTimer::setInterval(int msec)
    +{
    +  interval_ = msec;
    +}
    +
    +void WTimer::setSingleShot(bool singleShot)
    +{
    +  singleShot_ = singleShot;
    +}
    +
    +void WTimer::start()
    +{
    +  if (!active_) {
    +    WApplication *app = WApplication::instance();    
    +    if (app && app->timerRoot())
    +      app->timerRoot()->addWidget(timerWidget_);
    +    active_ = true;
    +    *timeout_ = Time() + interval_;
    +
    +    bool jsRepeat = !timeout().isExposedSignal() && !singleShot_;
    +
    +    timerWidget_->timerStart(jsRepeat);
    +
    +    if (timeout().isExposedSignal() && !timeoutConnected_) {
    +      timeout().connect(this, &WTimer::gotTimeout);
    +      timeoutConnected_ = true;
    +    }
    +  }
    +}
    +
    +void WTimer::stop()
    +{
    +  if (active_) {
    +    WApplication *app = WApplication::instance();
    +    if (app && app->timerRoot())
    +      app->timerRoot()->removeWidget(timerWidget_);
    +    active_ = false;
    +  }
    +}
    +
    +void WTimer::setSelfDestruct()
    +{
    +  selfDestruct_ = true;
    +}
    +
    +void WTimer::gotTimeout()
    +{
    +  if (active_) {
    +    if (!singleShot_) {
    +      *timeout_ = Time() + interval_;
    +      timerWidget_->timerStart(false);    
    +    } else
    +      stop();
    +  }
    +
    +  if (selfDestruct_)
    +    delete this;
    +}
    +
    +int WTimer::getRemainingInterval() const
    +{
    +  int remaining = *timeout_ - Time();
    +  return std::max(0, remaining);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTimerWidget b/wt-3.1.7a/src/Wt/WTimerWidget
    new file mode 100644
    index 0000000..baae7c1
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTimerWidget
    @@ -0,0 +1,47 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTIMERWIDGET_
    +#define WTIMERWIDGET_
    +
    +#include <Wt/WInteractWidget>
    +
    +namespace Wt {
    +
    +class WTimer;
    +
    +/*
    + * Wt-private widget that is created in conjunction with
    + * WTimer widget. It's clicked signal serves as the event signal
    + * that will be activated when the event expires.
    + */
    +class WT_API WTimerWidget : public WInteractWidget
    +{
    +public:
    +  WTimerWidget(WTimer *timer);
    +  ~WTimerWidget();
    +
    +  void timerStart(bool jsRepeat);
    +  bool timerExpired();
    +
    +private:
    +  WTimer *timer_;
    +  bool timerStarted_;
    +  bool jsRepeat_;
    +
    +protected:
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual DomElementType domElementType() const;
    +  virtual std::string renderRemoveJs();
    +
    +  virtual void enableAjax();
    +
    +  friend class WebSession;
    +};
    +
    +}
    +
    +#endif // WTIMERWIDGET_
    diff --git a/wt-3.1.7a/src/Wt/WTimerWidget.C b/wt-3.1.7a/src/Wt/WTimerWidget.C
    new file mode 100644
    index 0000000..0e3bad7
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTimerWidget.C
    @@ -0,0 +1,77 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WTimerWidget"
    +#include "Wt/WTimer"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WTimerWidget::WTimerWidget(WTimer *timer)
    +  : timer_(timer),
    +    timerStarted_(false)
    +{ }
    +
    +WTimerWidget::~WTimerWidget()
    +{
    +  timer_->timerWidget_ = 0;
    +}
    +
    +std::string WTimerWidget::renderRemoveJs()
    +{
    + return "{"
    +   "var obj=" + jsRef() + ";"
    +   "if (obj && obj.timer) {"
    +   """clearTimeout(obj.timer);"
    +   """obj.timer = null;"
    +   "}" WT_CLASS ".remove('" + id() + "');}";
    +}
    +
    +void WTimerWidget::timerStart(bool jsRepeat)
    +{
    +  timerStarted_ = true;
    +  jsRepeat_ = jsRepeat;
    +
    +  repaint();
    +}
    +
    +void WTimerWidget::enableAjax()
    +{
    +  if (timer_->isActive()) {
    +    timerStarted_ = true;
    +    repaint();
    +  }
    +
    +  WInteractWidget::enableAjax();
    +}
    +
    +bool WTimerWidget::timerExpired()
    +{
    +  return timer_->getRemainingInterval() == 0;
    +}
    +
    +void WTimerWidget::updateDom(DomElement& element, bool all)
    +{
    +  if (timerStarted_
    +      || ((!WApplication::instance()->environment().javaScript() || all)
    +	  && timer_->isActive())) {
    +    element.setTimeout(timer_->getRemainingInterval(), jsRepeat_);
    +
    +    timerStarted_ = false;
    +  }
    +
    +  WInteractWidget::updateDom(element, all);
    +}
    +
    +DomElementType WTimerWidget::domElementType() const
    +{
    +  return DomElement_SPAN;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTransform b/wt-3.1.7a/src/Wt/WTransform
    new file mode 100644
    index 0000000..21203ce
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTransform
    @@ -0,0 +1,312 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTRANSFORM_H_
    +#define WTRANSFORM_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WPointF;
    +
    +/*! \class WTransform Wt/WTransform Wt/WTransform
    + *  \brief A 2D affine transformation matrix.
    + *
    + * The matrix is encoded using 6 parameters:
    + * \code
    + * m11  m12   0
    + * m21  m22   0
    + * dx   dy    1
    + * \endcode
    + * 
    + * In this representation, dx() (= m31()) and dy() (= m32()) represent
    + * the translation components, and m<i>xy</i> represent a 2D matrix
    + * that contains the scale, rotation (and skew) components.
    + *
    + * The transformation is used to represent a tansformed coordinate
    + * system, and provides methods to rotate(), scale(), shear() or
    + * translate() this coordinate system.
    + *
    + * There are also 2 methods to decompose an arbitrary matrix into
    + * elementary operations:
    + * - decomposeTranslateRotateScaleSkew() \htmlonly
    + * decomposes into a <i>T</i> &#x2218; <i>R</i> &#x2218; <i>Sxx</i>
    + * &#x2218; <i>Sxy</i>\endhtmlonly
    + * - decomposeTranslateRotateScaleRotate() \htmlonly
    + * decomposes into a <i>T</i> &#x2218; <i>R1</i> &#x2218; <i>Sxx</i>
    + * &#x2218; <i>R2</i>\endhtmlonly
    + *
    + * with <i>T</i> a translation, <i>R</i> a rotation, <i>Sxx</i> a scale, and <i>Sxy</i> a skew component.
    + *
    + * \ingroup painting
    + */
    +class WT_API WTransform
    +{
    +public:
    +  /*! \brief Default constructor.
    +   *
    +   * Creates the identity transformation matrix.
    +   */
    +  WTransform();
    +
    +  /*! \brief Construct a custom matrix by specifying the parameters.
    +   *
    +   * Creates a matrix from the specified parameters.
    +   */
    +  WTransform(double m11, double m12, double m21, double m22,
    +	     double dx, double dy);
    +
    +  /*! \brief Assignment operator.
    +   *
    +   * Copies the transformation from the \p rhs.
    +   */
    +  WTransform& operator=(const WTransform& rhs);
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Clone method.
    +   *
    +   * Clones this WTransform object.
    +   */
    +  WTransform clone() const;
    +#endif
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the transforms are exactly the same.
    +   */
    +  bool operator==(const WTransform& rhs) const;
    +
    +  /*! \brief Comparison operator.
    +   *
    +   * Returns \c true if the transforms are different.
    +   */
    +  bool operator!=(const WTransform& rhs) const;
    +
    +  /*! \brief Identity check.
    +   *
    +   * Returns true if the transform represents an identity transformation.
    +   */
    +  bool isIdentity() const;
    +  
    +  /*! \brief Returns the horizontal scaling factor.
    +   */
    +  double m11() const { return m_[M11]; }
    +
    +  /*! \brief Returns the vertical shearing factor.
    +   */
    +  double m12() const { return m_[M21]; }
    +
    +  /*! \brief Returns m13 = 0.
    +   */
    +  double m13() const { return 0; }
    +
    +  /*! \brief Returns the horizontal shearing factor.
    +   */
    +  double m21() const { return m_[M12]; }
    +
    +  /*! \brief Returns the vertical scaling factor.
    +   */
    +  double m22() const { return m_[M22]; }
    +
    +  /*! \brief Returns m23 = 0.
    +   */
    +  double m23() const { return 0; }
    +
    +  /*! \brief Returns the horizontal translation factor.
    +   *
    +   * Is equivalent to dx()
    +   */
    +  double m31() const { return m_[M13]; }
    +
    +  /*! \brief Returns the vertical translation factor.
    +   *
    +   * Is equivalent to dy()
    +   */
    +  double m32() const { return m_[M23]; }
    +
    +  /*! \brief Returns m33 = 1.
    +   */
    +  double m33() const { return 1; }
    +
    +  /*! \brief Returns the horizontal translation factor.
    +   *
    +   * Is equivalent to m31()
    +   */
    +  double dx() const { return m_[DX]; }
    +
    +  /*! \brief Returns the vertical translation factor.
    +   *
    +   * Is equivalent to m32()
    +   */
    +  double dy() const { return m_[DY]; }
    +
    +  /*! \brief Applys the transformation to a point.
    +   *
    +   * Returns the transformed point.
    +   *
    +   * \sa map(double x, double y, double *tx, double *ty) const
    +   */
    +  WPointF map(const WPointF& p) const;
    +
    +  /*! \brief Applys the transformation to a point.
    +   *
    +   * Sets the point (<i>tx</i>, \p ty) to the transformation of
    +   * the point (<i>x</i>, \p y).
    +   *
    +   * \sa map(const WPointF&) const
    +   */
    +  void map(double x, double y, double *tx, double *ty) const;
    +
    +  /*! \brief Resets the transformation to the identity.
    +   *
    +   * \sa isIdentity(), WTransform()
    +   */
    +  void reset();
    +
    +  /*! \brief Rotates the transformation.
    +   *
    +   * Applies a clock-wise rotation to the current transformation
    +   * matrix, over \p angle degrees.
    +   *
    +   * \sa rotateRadians()
    +   */
    +  WTransform& rotate(double angle);
    +
    +  /*! \brief Rotates the transformation.
    +   *
    +   * Applies a clock-wise rotation to the current transformation
    +   * matrix, over \p angle radians.
    +   *
    +   * \sa rotate()
    +   */
    +  WTransform& rotateRadians(double angle);
    +
    +  /*! \brief Scales the transformation.
    +   *
    +   * Applies a clock-wise rotation to the current transformation
    +   * matrix, over \p angle radians.
    +   *
    +   * \sa shear()
    +   */
    +  WTransform& scale(double sx, double sy);
    +
    +  /*! \brief Shears the transformation.
    +   *
    +   * Shears the current transformation.
    +   *
    +   * \sa scale(), rotate()
    +   */
    +  WTransform& shear(double sh, double sv);
    +
    +  /*! \brief Translates the transformation.
    +   *
    +   * Translates the current transformation.
    +   */
    +  WTransform& translate(double dx, double dy);
    +
    +  /*! \brief Adds a transform that is conceptually applied after this transform.
    +   */
    +  WTransform& operator*= (const WTransform& rhs);
    +
    +  /*! \brief Multiply 2 transform objects.
    +   */
    +  WTransform operator* (const WTransform& rhs) const;
    +
    +  /*! \brief Returns the determinant.
    +   */
    +  double determinant() const;
    +
    +  /*! \brief Returns the adjoint.
    +   */
    +  WTransform adjoint() const;
    +
    +  /*! \brief Returns the inverted transformation.
    +   *
    +   * Returns \p this if the transformation could not be inverted
    +   * (determinant() == 0), and logs an error instead.
    +   */
    +  WTransform inverted() const;
    +
    +  /*! \brief Result of a TRSS decomposition
    +   *
    +   * \sa decomposeTranslateRotateScaleSkew()
    +   */
    +  struct TRSSDecomposition {
    +    double dx, //!< X component of translation
    +      dy,      //!< Y component of translation
    +      alpha,   //!< Rotation angle (radians)
    +      sx,      //!< X component of scale
    +      sy,      //!< Y component of scale
    +      sh;      //!< Shear (in Y direction)
    +  };
    +
    +  /*! \brief Decomposes the transformation
    +   *
    +   * Decomposes the transformation into elementary operations:
    +   * translation (<i>dx</i>, \p dy), followed by rotation
    +   * (<i>alpha</i>), followed by scale (<i>sx</i>, \p sy) and
    +   * vertical shearing factor (\p sh). The angle is expressed in
    +   * radians.
    +   *
    +   * This performs a <a
    +   * href="http://en.wikipedia.org/wiki/Gram_schmidt">Gram-Schmidt
    +   * orthonormalization</a>.
    +   */
    +  void decomposeTranslateRotateScaleSkew(TRSSDecomposition& result) const;
    +
    +  /*! \brief Result of a TRSR decomposition
    +   *
    +   * \sa decomposeTranslateRotateScaleRotate()
    +   */
    +  struct TRSRDecomposition {
    +    double dx, //!< X component of translation
    +      dy,      //!< Y component of translation
    +      alpha1,  //!< First rotation angle (radians)
    +      sx,      //!< X component of scale
    +      sy,      //!< Y component of scale
    +      alpha2;  //!< Second rotation angle (radians)
    +  };
    +
    +  /*! \brief Decomposes the transformation
    +   *
    +   * Decomposes the transformation into elementary operations:
    +   * translation (<i>dx</i>, \p dy), followed by rotation
    +   * (<i>alpha2</i>), followed by scale (<i>sx</i>, \p sy) and
    +   * again a rotation (\p alpha2). The angles are expressed in
    +   * radians.
    +   *
    +   * This performs a <a
    +   * href="http://en.wikipedia.org/wiki/Singular_value_decomposition">Singular
    +   * Value Decomposition (SVD)</a>.
    +   */
    +  void decomposeTranslateRotateScaleRotate(TRSRDecomposition& result) const;
    +
    +  /*! \brief Utility method to convert degrees to radians.
    +   */
    +  static double degreesToRadians(double angle);
    +
    +private:
    +  // we use row,column indices; prepend transformations to the left,
    +  // and transform column point vectors: X' = M.X
    +
    +  // by row: real 2x2 matrix:
    +  static const int M11 = 0;
    +  static const int M12 = 1;
    +  static const int M21 = 2;
    +  static const int M22 = 3;
    +
    +  static const int M13 = 4;
    +  static const int DX = 4;
    +  static const int M23 = 5;
    +  static const int DY = 5;
    +
    +  double m_[6];
    +};
    +
    +}
    +
    +#endif // WTRANSFORM_H_
    diff --git a/wt-3.1.7a/src/Wt/WTransform.C b/wt-3.1.7a/src/Wt/WTransform.C
    new file mode 100644
    index 0000000..0caee81
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTransform.C
    @@ -0,0 +1,405 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifdef DEBUG_SVD
    +#include <iostream>
    +#endif // DEBUG_SVD
    +
    +#include <cmath>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WPointF"
    +#include "Wt/WTransform"
    +
    +namespace Wt {
    +
    +WTransform::WTransform()
    +{
    +  reset();
    +}
    +
    +WTransform::WTransform(double m11, double m12, double m21, double m22,
    +		       double dx, double dy)
    +{
    +  m_[M11] = m11;
    +  m_[M12] = m21;
    +  m_[M13] = dx;
    +  m_[M21] = m12;
    +  m_[M22] = m22;
    +  m_[M23] = dy;
    +}
    +
    +WTransform& WTransform::operator= (const WTransform& rhs)
    +{
    +  for (unsigned i = 0; i < 6; ++i)
    +    m_[i] = rhs.m_[i];
    +
    +  return *this;
    +}
    +
    +#ifdef WT_TARGET_JAVA
    +WTransform WTransform::clone() const
    +{
    +  WTransform result;
    +  result = *this;
    +  return result;
    +}
    +#endif
    +
    +bool WTransform::operator== (const WTransform& rhs) const
    +{
    +  for (unsigned i = 0; i < 6; ++i)
    +    if (m_[i] != rhs.m_[i])
    +      return false;
    +
    +  return true;
    +}
    +
    +bool WTransform::operator!= (const WTransform& rhs) const
    +{
    +  return !(*this == rhs);
    +}
    +
    +bool WTransform::isIdentity() const
    +{
    +  return (m_[M11] == 1.0)
    +    && (m_[M22] == 1.0)
    +    && (m_[M21] == 0.0)
    +    && (m_[M12] == 0.0)
    +    && (m_[M13] == 0.0)
    +    && (m_[M23] == 0.0);
    +}
    +
    +void WTransform::reset()
    +{
    +  m_[M11] = m_[M22] = 1;
    +  m_[M21] = m_[M12] = m_[M13] = m_[M23] = 0;
    +}
    +
    +WPointF WTransform::map(const WPointF& p) const
    +{
    +  double x, y;
    +  map(p.x(), p.y(), &x, &y);
    +  return WPointF(x, y);
    +}
    +
    +void WTransform::map(double x, double y, double *tx, double *ty) const
    +{
    +  *tx = m_[M11] * x + m_[M12] * y + m_[M13];
    +  *ty = m_[M21] * x + m_[M22] * y + m_[M23];
    +}
    +
    +WTransform& WTransform::rotateRadians(double angle)
    +{
    +  double r11 = std::cos(angle);
    +  double r12 = -std::sin(angle);
    +  double r21 = -r12;
    +  double r22 = r11;
    +
    +  // note: our public constructor is transposed!
    +  return *this *= WTransform(r11, r21, r12, r22, 0, 0);
    +}
    +
    +WTransform& WTransform::rotate(double angle)
    +{
    +  rotateRadians(degreesToRadians(angle));
    +  return *this;
    +}
    +
    +#ifndef M_PI
    +#define M_PI 3.14159265358979323846
    +#endif
    +
    +double WTransform::degreesToRadians(double angle)
    +{
    +  return (angle / 180.) * M_PI;  
    +}
    +
    +WTransform& WTransform::scale(double sx, double sy)
    +{
    +  return *this *= WTransform(sx, 0, 0, sy, 0, 0);
    +}
    +
    +WTransform& WTransform::shear(double sh, double sv)
    +{
    +  return *this *= WTransform(0, sv, sh, 0, 0, 0);
    +}
    +
    +WTransform& WTransform::translate(double dx, double dy)
    +{
    +  return *this *= WTransform(1, 0, 0, 1, dx, dy);
    +}
    +
    +static double norm(double x1, double x2)
    +{
    +  return std::sqrt(x1 * x1 + x2 * x2);
    +}
    +
    +double WTransform::determinant() const
    +{
    +  return m11() * (m33() * m22() - m32() * m23())
    +    - m21() * (m33() * m12() - m32() * m13())
    +    + m31() * (m23() * m12() - m22() * m13());
    +}
    +
    +WTransform WTransform::adjoint() const
    +{
    +  return WTransform(m33() * m22() - m32() * m23(),
    +		    - (m33() * m12() - m32() * m13()),
    +		    - (m33() * m21() - m31() * m23()),
    +		    m33() * m11() - m31() * m13(),
    +		    m32() * m21() - m31() * m22(),
    +		    - (m32() * m11() - m31() * m12()));
    +}
    +
    +WTransform WTransform::inverted() const
    +{
    +  double det = determinant();
    +
    +  if (det != 0) {
    +    WTransform adj = adjoint();
    +
    +    return WTransform(adj.m11() / det, adj.m12() / det,
    +		      adj.m21() / det, adj.m22() / det,
    +		      adj.m31() / det, adj.m32() / det);
    +  } else {
    +    wApp->log("error") << "WTransform::inverted(): determinant == 0";
    +
    +    return *this;
    +  }
    +}
    +
    +void WTransform::decomposeTranslateRotateScaleSkew(TRSSDecomposition& result)
    +  const
    +{
    +  // Performs a Gram Schmidt orthonormalization
    +
    +  double q1[2], q2[2];
    +
    +  double r11 = norm(m_[M11], m_[M21]);
    +  q1[0] = m_[M11]/r11;
    +  q1[1] = m_[M21]/r11;
    +
    +  double r12 = m_[M12]*q1[0] + m_[M22]*q1[1];
    +  double r22 = norm(m_[M12] - r12*q1[0], m_[M22] - r12*q1[1]);
    +  q2[0] = (m_[M12] - r12 * q1[0])/r22;
    +  q2[1] = (m_[M22] - r12 * q1[1])/r22;
    +
    +  result.alpha = std::atan2(q1[1], q1[0]);
    +
    +  result.sx = r11;
    +  result.sy = r22;
    +  result.sh = r12 / r11;
    +
    +  result.dx = m_[DX];
    +  result.dy = m_[DY];
    +}
    +
    +static void matrixMultiply(double a11, double a12, double a21, double a22,
    +			   double b11, double b12, double b21, double b22,
    +			   WT_ARRAY double *result)
    +{
    +  result[0] = a11 * b11 + a12 * b21;
    +  result[1] = a11 * b12 + a12 * b22;
    +  result[2] = a21 * b11 + a22 * b21;
    +  result[3] = a21 * b12 + a22 * b22;
    +}
    +
    +static void eigenValues(WT_ARRAY double *m, WT_ARRAY double* l,
    +			WT_ARRAY double *v)
    +{
    +  const double a = m[0];
    +  const double b = m[1];
    +  const double c = m[2];
    +  const double d = m[3];
    +
    +  double B = - a - d;
    +  double C = a * d - b * c;
    +  double Dsqr = B*B - 4*C;
    +  if (Dsqr <= 0) Dsqr = 0;
    +  double D = std::sqrt(Dsqr);
    +
    +  l[0] = -(B + (B < 0 ? -D : D)) / 2.0;
    +  l[1] = -B - l[0];
    +
    +  if (std::fabs(l[0] - l[1]) < 1E-5) {
    +    v[0] = 1;
    +    v[2] = 0;
    +    v[1] = 0;
    +    v[3] = 1;
    +  } else if (std::fabs(c) > 1E-5) {
    +    v[0] = d - l[0];
    +    v[2] = -c;
    +    v[1] = d - l[1];
    +    v[3] = -c;
    +  } else if (std::fabs(b) > 1E-5) {
    +    v[0] = -b;
    +    v[2] = a - l[0];
    +    v[1] = -b;
    +    v[3] = a - l[1];
    +  } else {
    +    if (std::fabs(l[0] - a) < 1E-5) {
    +      v[0] = 1;
    +      v[2] = 0;
    +      v[1] = 0;
    +      v[3] = 1;
    +    } else {
    +      v[0] = 0;
    +      v[2] = 1;
    +      v[1] = 1;
    +      v[3] = 0;
    +    }
    +  }
    +
    +  double v1l = std::sqrt(v[0]*v[0] + v[2]*v[2]);
    +  v[0] /= v1l;
    +  v[2] /= v1l;
    +
    +  double v2l = std::sqrt(v[1]*v[1] + v[3]*v[3]);
    +  v[1] /= v2l;
    +  v[3] /= v2l;
    +}
    +
    +//#define DEBUG_SVD
    +
    +void WTransform::decomposeTranslateRotateScaleRotate(TRSRDecomposition& result)
    +  const
    +{
    +  // Performs a Singular Value Decomposition
    +
    +  double mtm[4];
    +
    +#ifdef DEBUG_SVD
    +  std::cerr << "M: " << m_[M11] << " " << m_[M12] << std::endl
    +	    << "   " << m_[M21] << " " << m_[M22] << std::endl;
    +#endif
    +
    +  matrixMultiply(m_[M11], m_[M21], m_[M12], m_[M22],
    +		 m_[M11], m_[M12], m_[M21], m_[M22],
    +		 mtm);
    +
    +  double e[2];
    +  double V[4];
    +
    +  eigenValues(mtm, e, V);
    +
    +  result.sx = std::sqrt(e[0]);
    +  result.sy = std::sqrt(e[1]);
    +
    +#ifdef DEBUG_SVD
    +  std::cerr << "V: " << V[M11] << " " << V[M12] << std::endl
    +	    << "   " << V[M21] << " " << V[M22] << std::endl;
    +#endif
    +
    +  /*
    +   * if V is no rotation matrix, it contains a reflexion. A rotation
    +   * matrix has determinant of 1; a matrix that contains a reflexion
    +   * it has determinant -1. We reflect around the Y axis:
    +   */
    +  if (V[0]*V[3] - V[1]*V[2] < 0) {
    +    result.sx = -result.sx;
    +    V[0] = -V[0];
    +    V[2] = -V[2];
    +  }
    +
    +  double U[4];
    +
    +  matrixMultiply(m_[0], m_[1], m_[2], m_[3],
    +		 V[0], V[1], V[2], V[3],
    +		 U);
    +  U[0] /= result.sx;
    +  U[2] /= result.sx;
    +  U[1] /= result.sy;
    +  U[3] /= result.sy;
    +
    +#ifdef DEBUG_SVD
    +  std::cerr << "U: " << U[M11] << " " << U[M12] << std::endl
    +	    << "   " << U[M21] << " " << U[M22] << std::endl;
    +#endif
    +
    +  if (U[0]*U[3] - U[1]*U[2] < 0) {
    +    result.sx = -result.sx;
    +    U[0] = -U[0];
    +    U[2] = -U[2];
    +  }
    +
    +  result.alpha1 = std::atan2(U[2], U[0]);
    +  result.alpha2 = std::atan2(V[1], V[0]);
    +
    +#ifdef DEBUG_SVD
    +  std::cerr << "alpha1: " << result.alpha1 << ", alpha2: " << result.alpha2
    +	    << ", sx: " << result.sx << ", sy: " << result.sy << std::endl;
    +#endif
    +
    +  /*
    +  // check our SVD: m_ = U S VT
    +  double tmp[4], tmp2[4];
    +  matrixMultiply(U[0], U[1], U[2], U[3],
    +		 sx, 0, 0, sy,
    +		 tmp);
    +  matrixMultiply(tmp[0], tmp[1], tmp[2], tmp[3],
    +		 V[0], V[2], V[1], V[3],
    +		 tmp2);
    +
    +  std::cerr << "check: " << std::endl
    +	    << tmp2[0] << " " << tmp2[1] << std::endl
    +	    << tmp2[2] << " " << tmp2[3] << std::endl;
    +  */
    +
    +  result.dx = m_[DX];
    +  result.dy = m_[DY];
    +}
    +
    +WTransform& WTransform::operator*= (const WTransform& Y)
    +{
    +  // conceptually:                  Z = Y * X
    +  // our transposed representation: Z = X * Y
    +
    +  const WTransform& X = *this;
    +
    +  double z11 = X.m_[M11] * Y.m_[M11]
    +             + X.m_[M12] * Y.m_[M21]
    +          /* + X.m_[M13] * Y.m_[M31]=0*/;
    +
    +  double z12 = X.m_[M11] * Y.m_[M12]
    +             + X.m_[M12] * Y.m_[M22]
    +          /* + X.m_[M13] * Y.m_[M32]=0*/;
    +
    +  double z13 = X.m_[M11] * Y.m_[M13]
    +             + X.m_[M12] * Y.m_[M23]
    +             + X.m_[M13] /* * Y.m_[M33]=1*/;
    +
    +  double z21 = X.m_[M21] * Y.m_[M11]
    +             + X.m_[M22] * Y.m_[M21]
    +          /* + X.m_[M23] * Y.m_[M31]=0*/;
    +
    +  double z22 = X.m_[M21] * Y.m_[M12]
    +             + X.m_[M22] * Y.m_[M22]
    +          /* + X.m_[M23] * Y.m_[M32]=0*/;
    +
    +  double z23 = X.m_[M21] * Y.m_[M13]
    +             + X.m_[M22] * Y.m_[M23]
    +             + X.m_[M23] /* * Y.m_[M33]=1*/;
    +
    +  m_[M11] = z11;
    +  m_[M12] = z12;
    +  m_[M13] = z13;
    +  m_[M21] = z21;
    +  m_[M22] = z22;
    +  m_[M23] = z23;
    +
    +  return *this;
    +}
    +
    +WTransform WTransform::operator* (const WTransform& rhs) const
    +{
    +  WTransform result;
    +  result = *this;
    +  return result *= rhs;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTree b/wt-3.1.7a/src/Wt/WTree
    new file mode 100644
    index 0000000..6cf0e34
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTree
    @@ -0,0 +1,168 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTREE_H_
    +#define WTREE_H_
    +
    +#include <set>
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WSignalMapper>
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +    class SentinelTreeNode;
    +  }
    +
    +  class WTreeNode;
    +
    +/*! \class WTree Wt/WTree Wt/WTree
    + *  \brief A widget that represents a navigatable tree
    + *
    + * %WTree provides a tree widget, and coordinates selection
    + * functionality.
    + *
    + * Unlike the MVC-based WTreeView, the tree renders a widget
    + * hierarchy, rather than a hierarhical standard model. This provides
    + * extra flexibility (as any widget can be used as contents), at the
    + * cost of server-side, client-side and bandwidth resources
    + * (especially for large tree tables).
    + *
    + * The tree is implemented as a hierarchy of WTreeNode widgets.
    + *
    + * Selection is rendered by calling WTreeNode::renderSelected(bool). Only
    + * tree nodes that are \link WTreeNode::setSelectable(bool) selectable\endlink
    + * may participate in the selection.
    + * 
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WIconPair *folderIcon = new Wt::WIconPair("icons/yellow-folder-closed.png",
    + *				               "icons/yellow-folder-open.png", false);
    + *
    + * Wt::WTree *tree = new Wt::WTree();
    + * tree->setSelectionMode(Wt::SingleSelection);
    + *
    + * Wt::WTreeNode *root = new Wt::WTreeNode("Tree root", folderIcon);
    + * root->setStyleClass("example-tree");
    + * tree->setTreeRoot(root);
    + * root->label()->setTextFormat(Wt::PlainText);
    + * root->setImagePack("resources/");
    + * root->setLoadPolicy(Wt::WTreeNode::NextLevelLoading);
    + * root->addChildNode(new Wt::WTreeNode("one"));
    + * root->addChildNode(new Wt::WTreeNode("two"));
    + *
    + * Wt::WTreeNode *three = new Wt::WTreeNode("three");
    + * three->addChildNode(new WTreeNode("three: one"));
    + * three->addChildNode(new WTreeNode("three: two"));
    + * root->addChildNode(three);
    + *
    + * root->expand();
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * The tree is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-tree</tt> CSS class. The style
    + * selectors that affect the rendering of the decoration of the nodes
    + * are indicated in the documentation for WTreeNode. In addition, the
    + * following selector may be used to style the header:
    + *
    + * \verbatim
    +.Wt-tree .Wt-selected : selected item
    +\endverbatim
    + *
    + * A screenshot of the tree:
    + * <TABLE border="0" align="center"> <TR> <TD> 
    + * \image html WTree-default-1.png "An example WTree (default)"
    + * </TD> <TD>
    + * \image html WTree-polished-1.png "An example WTree (polished)"
    + * </TD> </TR> </TABLE>
    + *
    + * \sa WTreeNode, WTreeTable, WTreeView
    + */
    +class WT_API WTree : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a new tree.
    +   */
    +  WTree(WContainerWidget *parent = 0);
    +
    +  /*! \brief Sets the tree root node.
    +   *
    +   * \sa treeRoot()
    +   */
    +  void setTreeRoot(WTreeNode *root);
    +
    +  /*! \brief Returns the root node.
    +   *
    +   * \sa setTreeRoot(WTreeNode *)
    +   */
    +  WTreeNode *treeRoot() const { return treeRoot_; }
    +
    +  /*! \brief Sets the selection mode.
    +   *
    +   * The default selection mode is Wt::NoSelection.
    +   */
    +  void setSelectionMode(SelectionMode mode);
    +
    +  /*! \brief Returns the selection mode.
    +   */
    +  SelectionMode selectionMode() const { return selectionMode_; } 
    +
    +  /*! \brief Typedef for a set of WTreeNode's.
    +   */
    +  typedef std::set<WTreeNode *> WTreeNodeSet;
    +
    +  /*! \brief Returns the set of selected tree nodes.
    +   */
    +  const WTreeNodeSet& selectedNodes() const { return selection_; }
    +
    +  /*! \brief Sets a selection of tree nodes.
    +   */
    +  void select(const WTreeNodeSet& nodes);
    +
    +  /*! \brief Selects or unselect the given <i>node</i>.
    +   */
    +  void select(WTreeNode *node, bool selected = true);
    +
    +  /*! \brief Returns if the given <i>node</i> is currently selected.
    +   */
    +  bool isSelected(WTreeNode *node) const;
    +
    +  /*! \brief Clears the current selection.
    +   */
    +  void clearSelection();
    +
    +  /*! \brief %Signal that is emitted when the selection changes.
    +   */
    +  Signal<>& itemSelectionChanged() { return itemSelectionChanged_; }
    +
    +private:
    +  WTreeNode                 *treeRoot_;
    +  Impl::SentinelTreeNode    *sentinelRoot_;
    +
    +  SelectionMode              selectionMode_;
    +  WTreeNodeSet               selection_;
    +  Signal<>                   itemSelectionChanged_;
    +
    +  void onClick(WTreeNode *node, WMouseEvent event);
    +
    +  void selectRange(WTreeNode *from, WTreeNode *to);
    +  void extendSelection(WTreeNode *node);
    +
    +protected:
    +  void nodeRemoved(WTreeNode *node);
    +  void nodeAdded(WTreeNode * const node);
    +
    +  friend class Impl::SentinelTreeNode;
    +};
    +
    +}
    +
    +#endif // WTREE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTree.C b/wt-3.1.7a/src/Wt/WTree.C
    new file mode 100644
    index 0000000..e8c13ec
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTree.C
    @@ -0,0 +1,334 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WCheckBox"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WImage"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +#include "Wt/WTree"
    +#include "Wt/WTreeNode"
    +#include "Utils.h"
    +
    +namespace {
    +  using namespace Wt;
    +
    +  /*
    +   * Get the ancestors of n as a list, starting from the tree root,
    +   * and including n.
    +   *
    +   * Returns false if node n is currently not visible because one of its
    +   * ancestors is not expanded.
    +   */
    +  bool getAncestors(WTreeNode *n, std::vector<WTreeNode *>& ancestors)
    +  {
    +    WTreeNode *p = n->parentNode();
    +    if (p) {
    +      if (!p->isExpanded())
    +	return false;
    +      else
    +	if (!getAncestors(p, ancestors))
    +	  return false;
    +    }
    +
    +    ancestors.push_back(n);
    +    return true;
    +  }
    +
    +  /*
    +   * Compares two nodes and returns the one that is rendered higher in
    +   * the list. Returns 0 if one of the nodes is currently not rendered
    +   * (invisible).
    +   */
    +  WTreeNode *firstNode(WTreeNode *n1, WTreeNode *n2)
    +  {
    +    std::vector<WTreeNode *> ancestors1, ancestors2;
    +
    +    bool visible1 = n1 ? getAncestors(n1, ancestors1) : true;
    +    bool visible2 = n2 ? getAncestors(n2, ancestors2) : true;
    +
    +    if (!visible1 || !visible2)
    +      return 0;
    +
    +    if (!n1)
    +      return n2;
    +
    +    if (!n2)
    +      return n1;
    +
    +    for (unsigned i = 1; i < std::min(ancestors1.size(), ancestors2.size());
    +	 ++i) {
    +      if (ancestors1[i] != ancestors2[i]) {
    +	WTreeNode *parent = ancestors1[i-1];
    +	int i1 = Utils::indexOf(parent->childNodes(), ancestors1[i]);
    +	int i2 = Utils::indexOf(parent->childNodes(), ancestors2[i]);
    +
    +	if (i1 < i2)
    +	  return n1;
    +	else
    +	  return n2;
    +      }
    +    }
    +
    +    if (ancestors1.size() > ancestors2.size())
    +      return n2;
    +    else
    +      return n1;
    +  }
    +}
    +
    +namespace Wt {
    +
    +  namespace Impl {
    +    class SentinelTreeNode : public WTreeNode
    +    {
    +    public:
    +      SentinelTreeNode(WTree *tree)
    +	: WTreeNode(""),
    +	  tree_(tree)
    +      {
    +	addStyleClass("Wt-sentinel");
    +	setNodeVisible(false);
    +	expand();
    +
    +	// avoid IE bug where height of table remains too large when
    +	// collapsing nodes
    +	if (WApplication::instance()->environment().agentIsIE())
    +	  impl()->elementAt(1, 0)->resize(1, WLength::Auto);
    +     }
    +
    +    protected:
    +      virtual void descendantRemoved(WTreeNode *node)
    +      {
    +	tree_->nodeRemoved(node);
    +      }
    +
    +      virtual void descendantAdded(WTreeNode *node)
    +      {
    +	tree_->nodeAdded(node);
    +      }
    +
    +    private:
    +      WTree *tree_;
    +    };
    +  }
    +
    +WTree::WTree(WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    treeRoot_(0),
    +    selectionMode_(NoSelection),
    +    itemSelectionChanged_(this)
    +{
    +  setImplementation(sentinelRoot_ = new Impl::SentinelTreeNode(this));
    +}
    +
    +void WTree::setTreeRoot(WTreeNode *node)
    +{
    +  if (treeRoot_) {
    +    sentinelRoot_->removeChildNode(treeRoot_);
    +    delete treeRoot_;
    +  }
    +
    +  treeRoot_ = node;
    +  sentinelRoot_->addChildNode(node);
    +}
    +
    +void WTree::setSelectionMode(SelectionMode mode)
    +{
    +  if (mode != selectionMode_) {
    +    selectionMode_ = mode;
    +    clearSelection();
    +  }
    +}
    +
    +void WTree::clearSelection()
    +{
    +  while (!selection_.empty()) {
    +    WTreeNode *n = *selection_.begin();
    +    select(n, false);
    +  }
    +}
    +
    +void WTree::select(WTreeNode *node, bool selected)
    +{
    +  if (selectionMode_ == SingleSelection && selected && 
    +      selection_.size() == 1 && Utils::first(selection_) == node)
    +    return; // node was already selected, avoid re-emission of signals
    +
    +  if (selectionMode_ == SingleSelection && selected)
    +    clearSelection();
    +
    +  if (!selected || selectionMode_ != NoSelection) {
    +    if (selected) {
    +      if (node->isSelectable()) {
    +	selection_.insert(node);
    +	node->renderSelected(selected);
    +      }
    +    } else {
    +      if (selection_.erase(node))
    +	node->renderSelected(false);
    +      else
    +	return; // node was not selected, avoid re-emission of signals
    +    }
    +  }
    +
    +  itemSelectionChanged_.emit();
    +}
    +
    +void WTree::select(const WTreeNodeSet& nodes)
    +{
    +  clearSelection();
    +
    +  for (WTreeNodeSet::const_iterator i = nodes.begin(); i != nodes.end(); ++i)
    +    select(*i);
    +
    +  itemSelectionChanged_.emit();
    +}
    +
    +void WTree::nodeRemoved(WTreeNode *node)
    +{
    +  select(node, false);
    +
    +  node->clickedConnection_.disconnect();
    +
    +  for (unsigned i = 0; i < node->childNodes().size(); ++i)
    +    nodeRemoved(node->childNodes()[i]);
    +}
    +
    +void WTree::nodeAdded(WTreeNode * const node)
    +{
    +  if (node->isSelectable()) {
    +    WInteractWidget *w = node->label();
    +    if (!w)
    +      w = node->labelArea();
    +
    +    node->clickedConnection_ = node->impl()->clicked().connect
    +      (boost::bind(&WTree::onClick, this, node, ::_1));
    +    node->impl()->clicked().preventPropagation();
    +
    +    for (unsigned i = 0; i < node->childNodes().size(); ++i)
    +      nodeAdded(node->childNodes()[i]);
    +  }
    +
    +  // This doesn't hurt but sounds like it is not something the library
    +  // should deal with ...
    +  if (!node->parentNode()->isSelectable() && isSelected(node->parentNode()))
    +    select(node->parentNode(), false);
    +}
    +
    +void WTree::selectRange(WTreeNode *from, WTreeNode *to)
    +{
    +  clearSelection();
    +
    +  WTreeNode *n = from;
    +  for (;;) {
    +    select(n);
    +
    +    if (n == to)
    +      break;
    +    else {
    +      if (n->isExpanded() && !n->childNodes().empty())
    +	n = n->childNodes()[0];
    +      else {
    +	for (;;) {
    +	  const std::vector<WTreeNode *>& cs = n->parentNode()->childNodes();
    +	  int i = Utils::indexOf(cs, n);
    +
    +	  i++;
    +	  if (i < static_cast<int>(cs.size())) {
    +	    n = cs[i];
    +	    break;
    +	  } else {
    +	    n = n->parentNode();
    +	  }
    +	}
    +      }
    +    }
    +  }
    +}
    +
    +void WTree::extendSelection(WTreeNode *node)
    +{
    +  if (selection_.empty()) {
    +    select(node);
    +  } else {
    +    /*
    +     * Expand current selection. First we find the selection extremes.
    +     * If node is in between or below, we select from the top item to
    +     * node. If node is above, select everything from the bottom item
    +     * to node. Only visible nodes count.
    +     */
    +    WTreeNode *top = 0, *bottom = 0;
    +
    +    for (WTreeNodeSet::const_iterator i = selection_.begin();
    +	 i != selection_.end(); ++i) {
    +      WTreeNode *s = *i;
    +
    +      WTreeNode *f1 = firstNode(top, s);
    +      if (!f1)
    +	continue;
    +
    +      top = f1;
    +
    +      if (!bottom)
    +	bottom = s;
    +      else {
    +	WTreeNode *f2 = firstNode(bottom, s);
    +	if (f2 == bottom)
    +	  bottom = s;
    +      }
    +    }
    +
    +    /*
    +     * All selected nodes are invisible: assume nothing was selected
    +     */
    +    if (!top) {
    +      clearSelection();
    +      select(node);
    +      return;
    +    }
    +
    +    WTreeNode *f1 = firstNode(node, top);
    +
    +    if (f1 == top)
    +      selectRange(top, node);
    +    else
    +      selectRange(node, bottom);
    +  }
    +}
    +
    +void WTree::onClick(WTreeNode *node, WMouseEvent event)
    +{
    +  if (selectionMode_ == NoSelection)
    +    return;
    +
    +  if (selectionMode_ == ExtendedSelection) {
    +    if (event.modifiers() & ShiftModifier) {
    +      extendSelection(node);
    +    } else {
    +      if (!(event.modifiers() & (ControlModifier | MetaModifier))) {
    +	if (isSelected(node))
    +	  return;
    +	else {
    +	  clearSelection();
    +	  select(node);
    +	}
    +      } else
    +	select(node, !isSelected(node));
    +    }
    +  } else
    +    select(node);
    +}
    +
    +bool WTree::isSelected(WTreeNode *node) const
    +{
    +  WTreeNodeSet::const_iterator i = selection_.find(node);
    +  return i != selection_.end();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTreeNode b/wt-3.1.7a/src/Wt/WTreeNode
    new file mode 100644
    index 0000000..414d552
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeNode
    @@ -0,0 +1,440 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTREENODE_H_
    +#define WTREENODE_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +class WIconPair;
    +class WTable;
    +class WText;
    +class WImage;
    +class WTableCell;
    +
    +/*! \class WTreeNode Wt/WTreeNode Wt/WTreeNode
    + *  \brief A single node in a tree.
    + *
    + * A tree list is constructed by combining several tree node objects
    + * in a tree hierarchy, by passing the parent tree node as the last
    + * argument in the child node constructor, or by using addChildNode(),
    + * to add a child to its parent.
    + *
    + * Each tree node has a label, and optionally a label icon pair. The
    + * icon pair offers the capability to show a different icon depending
    + * on the state of the node (expanded or collapsed). When the node has
    + * any children, a child count may be displayed next to the label
    + * using setChildCountPolicy().
    + *
    + * Expanding a tree node it will collapse all its children, so that a user
    + * may collapse/expand a node as a short-cut to collapsing all children.
    + *
    + * The treenode provides several policies to communicate the current
    + * contents of the tree to the client (if possible):
    + * <ul>
    + *   <li>WTreeNode::PreLoading: the entire tree is transmitted to the client,
    + *     and all tree navigation requires no further communication.</li>
    + *   <li>WTreeNode::LazyLoading: only the minimum is transmitted to the
    + *     client. When expanding a node for the first time, only then it is
    + *     transmitted to the client, and this may thus have some latency.</li>
    + *   <li>WTreeNode::NextLevelLoading: all leafs of visible children are
    + *     transmitted, but not their children. This provides a good trade-off
    + *     between bandwith use and interactivity, since expanding any
    + *     tree node will happen instantly, and at the same time trigger some
    + *     communication in the back-ground to load the next level of
    + *     invisible nodes.</li>
    + * </ul>
    + *
    + * The default policy is WTreeNode::LazyLoading. Another load policy
    + * may be specified using setLoadPolicy() on the root node and before
    + * adding any children. The load policy is inherited by all children
    + * in the tree.
    + *
    + * There are a few scenarios where it makes sense to specialize the
    + * %WTreeNode class. One scenario is create a tree that is populated
    + * dynamically while browsing. For this purpose you should reimplement the
    + * populate() method, whose default implementation does nothing. This
    + * method is called when 'loading' the node. The exact moment for loading
    + * a treenode depends on the LoadPolicy.
    + *
    + * A second scenario that is if you want to customize the look of the
    + * tree label (see labelArea()) or if you want to modify or augment
    + * the event collapse/expand event handling (see doExpand() and
    + * doCollapse()).
    + *
    + * See WTree for a usage example.
    + *
    + * <h3>CSS</h3>
    + *
    + * The tree is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-tree</tt> CSS class and the following
    + * selectors:
    + *
    + * \verbatim
    +.Wt-tree .Wt-trunk          : vertical line, trunk
    +.Wt-tree .Wt-end            : vertical line, last item
    +.Wt-tree .Wt-collapse       : collapse icon (img *)
    +.Wt-tree .Wt-expand         : expand icon (img *)
    +.Wt-tree .Wt-noexpand       : leaf icon
    +
    +.Wt-tree .Wt-label          : the node label
    +.Wt-tree .Wt-childcount     : the node child count
    +.Wt-tree .Wt-node           : the node's table row
    +\endverbatim
    + * * The collapse and expand icons are fetched themselves as images,
    + * <tt>nav-plus.gif</tt> and <tt>nav-minus.gif</tt>.
    + *
    + * \sa WTree, WTreeTableNode
    + */
    +class WT_API WTreeNode : public WCompositeWidget
    +{
    +public:
    +  /*! \brief An enumeration for the policy to load children.
    +   */
    +  enum LoadPolicy { LazyLoading,     //!< Load-on-demand of child nodes
    +		    PreLoading,      //!< Pre-load all child nodes
    +		    NextLevelLoading //!< Pre-load one level of child nodes
    +  };
    +
    +  /*! \brief An enumeration for the policy to display the child count
    +   */
    +  enum ChildCountPolicy {
    +    Disabled, //!< Do not display a child count
    +    Enabled,  //!< Always display a child count
    +    Lazy      //!< Only display a child count when the node is populated
    +  };
    +
    +  /*! \brief Creates a tree node with the given label.
    +   *
    +   * The labelIcon, if specified, will appear just before the label and
    +   * its state reflect the expand/collapse state of the node.
    +   *
    +   * The node is initialized to be collapsed.
    +   */
    +  WTreeNode(const WString& labelText,
    +	    WIconPair *labelIcon = 0,
    +	    WTreeNode *parentNode = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WTreeNode();
    +
    +  /*! \brief Returns the label.
    +   */
    +  WText *label() const { return labelText_; }
    +
    +  /*! \brief Returns the label icon.
    +   */
    +  WIconPair *labelIcon() const { return labelIcon_; }
    +
    +  /*! \brief Sets the label icon.
    +   */
    +  void setLabelIcon(WIconPair *labelIcon);
    +
    +  /*! \brief Inserts a child node.
    +   *
    +   * Inserts the node \p node at index \p index.
    +   */
    +  virtual void insertChildNode(int index, WTreeNode *node);
    +
    +  /*! \brief Adds a child node.
    +   *
    +   * Equivalent to:
    +   * \code
    +   * insertChildNode(childNodes().size(), node);
    +   * \endcode
    +   *
    +   * \sa insertChildNode()
    +   */
    +  void addChildNode(WTreeNode *node);
    +
    +  /*! \brief Removes a child node.
    +   */
    +  void removeChildNode(WTreeNode *node);
    +
    +  /*! \brief Returns the list of children.
    +   */
    +  const std::vector<WTreeNode *>& childNodes() const { return childNodes_; }
    +
    +  /*! \brief Returns the number of children that should be displayed.
    +   *
    +   * This is used to display the count in the count label. The default
    +   * implementation simply returns childNodes().size().
    +   */
    +  virtual int displayedChildCount() const;
    +
    +  /*! \brief Configures how and when the child count should be displayed
    +   *
    +   * By default, no child count indication is disabled (this is the behaviour
    +   * since 2.1.1). Use this method to enable child count indications.
    +   *
    +   * The child count policy is inherited by all children in the tree.
    +   */
    +  void setChildCountPolicy(ChildCountPolicy policy);
    +
    +  /*! \brief Returns the child count policy
    +   *
    +   * \sa setChildCountPolicy(ChildCountPolicy policy)
    +   */
    +  ChildCountPolicy childCountPolicy() const { return childCountPolicy_; }
    +
    +  /*! \brief Sets the image pack for this (sub)tree (<b>deprecated</b>).
    +   *
    +   * \deprecated This method does not do anything since %Wt 3.1.1, as the
    +   *             tree is now styled based on the current CSS theme.
    +   */
    +  void setImagePack(const std::string& url);
    +
    +  /*! \brief Sets the load policy for this tree.
    +   *
    +   * This may only be set on the root of a tree, and before adding
    +   * any children.
    +   */
    +  void setLoadPolicy(LoadPolicy loadPolicy);  
    +
    +  /*! \brief Returns whether this node is expanded.
    +   */
    +  bool isExpanded() const;
    +
    +  /*! \brief Allows this node to be selected.
    +   *
    +   * By default, all nodes may be selected.
    +   *
    +   * \sa isSelectable(), WTree::select(WTreeNode *, bool)
    +   */
    +  void setSelectable(bool selectable);
    +
    +  /*! \brief Returns if this node may be selected.
    +   *
    +   * \sa setSelectable(bool)
    +   */
    +  virtual bool isSelectable() const { return selectable_; }
    +
    +  /*! \brief Returns the parent node
    +   *
    +   * \sa childNodes()
    +   */
    +  WTreeNode *parentNode() const { return parentNode_; }
    +
    +  /*! \brief Sets the visibility of the node itself
    +   *
    +   * If \c false, then the node itself is not displayed, but only its children.
    +   * This is typically used to hide the root node of a tree.
    +   */
    +  void setNodeVisible(bool visible);
    +
    +  /*! \brief Sets whether this node's children are decorated.
    +   *
    +   * By default, node's children have expand/collapse and other lines
    +   * to display their linkage and offspring.
    +   *
    +   * By setting \p decorated to \c false, you can hide the decorations for the 
    +   * node's children.
    +   */
    +  void setChildrenDecorated(bool decorated);
    +  
    +
    +  /*! \brief Sets whether this node is interactive.
    +   * 
    +   * Interactive nodes can be clicked upon and will populate a list of children 
    +   * when clicked. By disabling the interactivity, a node will not react to a 
    +   * click event. 
    +   */
    +  void setInteractive(bool interactive);
    +
    +  /*! \brief Expands this node.
    +   *
    +   * Besides the actual expansion of the node, this may also trigger
    +   * the loading and population of the node children, or of the children's
    +   * children.
    +   *
    +   * \sa collapse()
    +   * \sa doExpand()
    +   */
    +  void expand();
    +
    +  /*! \brief Collapses this node.
    +   *
    +   * \sa expand()
    +   * \sa doCollapse()
    +   */
    +  void collapse();
    +
    +  /*! \brief %Signal emitted when the node is expanded by the user.
    +   *
    +   * \sa collapsed()
    +   */
    +  EventSignal<WMouseEvent>& expanded();
    +
    +  /*! \brief %Signal emitted when the node is collapsed by the user.
    +   *
    +   * \sa expanded()
    +   */
    +  EventSignal<WMouseEvent>& collapsed();
    +
    +  /*! \brief %Signal that is emitted when the node is added or removed from
    +   *         the selection
    +   *
    +   * \sa WTree::itemSelectionChanged
    +   */
    +  Signal<bool>& selected() { return selected_; }
    +
    +#ifndef WT_TARGET_JAVA
    +  virtual bool hasParent() const;
    +#endif //WT_TARGET_JAVA
    +
    +protected:
    +  /*! \brief Creates a tree node with empty labelArea().
    +   *
    +   * This tree node has no label or labelicon, and is therefore ideally
    +   * suited to provide a custom look.
    +   */
    +  WTreeNode(WTreeNode *parentNode = 0);
    +
    +  /*! \brief Accesses the container widget that holds the label area.
    +   *
    +   * Use this to customize how the label should look like.
    +   */
    +  WTableCell *labelArea();
    +
    +  /*! \brief Populates the node dynamically on loading.
    +   *
    +   * Reimplement this method if you want to populate the widget dynamically,
    +   * as the tree is being browsed and therefore loaded. This is only
    +   * usefull with LazyLoading or NextLevelLoading strategies.
    +   */
    +  virtual void populate();
    +
    +  /*! \brief Returns whether this node has already been populated.
    +   *
    +   * \sa populate()
    +   */
    +  bool populated() const { return populated_; }
    +
    +  /*! \brief Returns whether this node can be expanded.
    +   *
    +   * The default implementation populates the node if necessary, and then
    +   * checks if there are any child nodes.
    +   *
    +   * You may wish to reimplement this method if you reimplement populate(),
    +   * and you have a quick default for determining whether a node may be
    +   * expanded (which does not require populating the node).
    +   *
    +   * \sa populate()
    +   */
    +  virtual bool expandable();
    +
    +  /*! \brief Renders the node to be selected.
    +   *
    +   * The default implementation changes the style class of the labelArea()
    +   * to "selected".
    +   */
    +  virtual void renderSelected(bool selected);
    +
    +  /*! \brief The image pack that is used for this tree node (<b>deprecated</b>).
    +   *
    +   * \deprecated This method returns "" since %Wt 3.1.1, as the image pack is
    +   *             no longer used in favour of the CSS themes.
    +   */
    +  std::string imagePack() const;
    +
    +  /*! \brief Reacts to the removal of a descendant node.
    +   *
    +   * Reimplement this method if you wish to react on the removal of a
    +   * descendant node. The default implementation simply propagates the
    +   * event to the parent.
    +   */
    +  virtual void descendantRemoved(WTreeNode *node);
    +
    +  /*! \brief Reacts to the addition of a descendant node.
    +   *
    +   * Reimplement this method if you wish to react on the addition of a
    +   * descendant node. The default implementation simply propagates the
    +   * event to the parent.
    +   */
    +  virtual void descendantAdded(WTreeNode *node);
    +
    +  /*! \brief The actual expand.
    +   *
    +   * This method, which is implemented as a stateless slot, performs the
    +   * actual expansion of the node.
    +   *
    +   * You may want to reimplement this function (and undoDoExpand()) if you
    +   * wish to do additional things on node expansion.
    +   *
    +   * \sa doCollapse()
    +   * \sa expand()
    +   */
    +  virtual void doExpand();
    +
    +  /*! \brief The actual collapse.
    +   *
    +   * This method, which is implemented as a stateless slot, performs the
    +   * actual collapse of the node.
    +   *
    +   * You may want to reimplement this function (and undoDoCollapse()) if you
    +   * wish to do additional things on node expansion.
    +   *
    +   * \sa doExpand()
    +   * \sa collapse()
    +   */
    +  virtual void doCollapse();
    +
    +  /*! \brief Undo method for doCollapse() stateless implementation.
    +   *
    +   * \sa doCollapse()
    +   */
    +  virtual void undoDoExpand();
    +
    +  /*! \brief Undo method for doCollapse() stateless implementation.
    +   *
    +   * \sa doExpand()
    +   */
    +  virtual void undoDoCollapse();
    +
    +  WTable *impl() { return layout_; }
    +
    +private:
    +  std::vector<WTreeNode *> childNodes_;
    +  bool                    collapsed_, selectable_, visible_, childrenDecorated_;
    +  WTreeNode		  *parentNode_;
    +  LoadPolicy               loadPolicy_;
    +  ChildCountPolicy         childCountPolicy_;
    +
    +  WTable                  *layout_;
    +  WIconPair               *expandIcon_;
    +  WText                   *noExpandIcon_;
    +  WIconPair		  *labelIcon_;
    +  WText			  *labelText_;
    +  WText			  *childCountLabel_;
    +
    +  bool                     childrenLoaded_;
    +  bool                     populated_;
    +  bool                     interactive_;
    +
    +  Signal<bool>             selected_;
    +
    +  void loadChildren();
    +  void loadGrandChildren();
    +  void create();
    +  void update();
    +  bool isLastChildNode() const;
    +  void updateChildren(bool recursive = false);
    +  bool wasCollapsed_;
    +  bool doPopulate();
    +
    +  static const char* imagePlus_;
    +  static const char* imageMin_;
    +
    +  boost::signals::connection clickedConnection_;
    +  friend class WTree;
    +};
    +
    +}
    +
    +#endif // WTREENODE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTreeNode.C b/wt-3.1.7a/src/Wt/WTreeNode.C
    new file mode 100644
    index 0000000..0f4d018
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeNode.C
    @@ -0,0 +1,570 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Utils.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WEnvironment"
    +#include "Wt/WIconPair"
    +#include "Wt/WImage"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +#include "Wt/WTreeNode"
    +
    +namespace Wt {
    +
    +const char *WTreeNode::imagePlus_ = "nav-plus.gif";
    +const char *WTreeNode::imageMin_ = "nav-minus.gif";
    +
    +WTreeNode::WTreeNode(const WString& labelText,
    +		     WIconPair *labelIcon, WTreeNode *parent)
    +  : collapsed_(true),
    +    selectable_(true),
    +    visible_(true),
    +    childrenDecorated_(true),
    +    parentNode_(0),
    +    childCountPolicy_(Disabled),
    +    labelIcon_(labelIcon),
    +    labelText_(new WText(labelText)),
    +    childrenLoaded_(false),
    +    populated_(false),
    +    interactive_(true),
    +    selected_(this)
    +{
    +  create();
    +
    +  if (parent)
    +    parent->addChildNode(this);
    +}
    +
    +WTreeNode::WTreeNode(WTreeNode *parent)
    +  : collapsed_(true),
    +    selectable_(true),
    +    visible_(true),
    +    childrenDecorated_(true),
    +    parentNode_(0),
    +    childCountPolicy_(Disabled),
    +    labelIcon_(0),
    +    labelText_(0),
    +    childrenLoaded_(false),
    +    populated_(false),
    +    interactive_(true),
    +    selected_(this)
    +{
    +  create();
    +
    +  if (parent)
    +    parent->addChildNode(this);
    +}
    +
    +EventSignal<WMouseEvent>& WTreeNode::expanded()
    +{
    +  return expandIcon_->icon1Clicked();
    +}
    +
    +EventSignal<WMouseEvent>& WTreeNode::collapsed()
    +{
    +  return expandIcon_->icon2Clicked();
    +}
    +
    +int WTreeNode::displayedChildCount() const
    +{
    +  return childNodes_.size();
    +}
    +
    +void WTreeNode::setSelectable(bool selectable)
    +{
    +  selectable_ = selectable;
    +}
    +
    +void WTreeNode::setInteractive(bool interactive)
    +{
    +  interactive_ = interactive;
    +}
    +
    +WTableCell *WTreeNode::labelArea()
    +{
    +  return layout_->elementAt(0, 1);
    +}
    +
    +WTreeNode::~WTreeNode()
    +{
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    delete childNodes_[i];
    +
    +  // also delete these two as only one of them is inserted in the
    +  // widget hierarchy at any time
    +  delete noExpandIcon_;
    +  delete expandIcon_;
    +}
    +
    +void WTreeNode::populate()
    +{ }
    +
    +bool WTreeNode::doPopulate()
    +{
    +  if (!populated_) {
    +    populated_ = true;
    +    populate();
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +bool WTreeNode::expandable()
    +{
    +  if (interactive_) {
    +    doPopulate();
    +
    +    return !childNodes_.empty();
    +  } else
    +    return false;
    +}
    +
    +void WTreeNode::setImagePack(const std::string& url)
    +{ }
    +
    +std::string WTreeNode::imagePack() const
    +{
    +  return "";
    +}
    +
    +void WTreeNode::setNodeVisible(bool visible)
    +{
    +  visible_ = visible;
    +  updateChildren(false);
    +}
    +
    +void WTreeNode::setChildrenDecorated(bool decorated)
    +{
    +  childrenDecorated_ = decorated;
    +  updateChildren(false);
    +}
    +
    +void WTreeNode::create()
    +{
    +  setImplementation(layout_ = new WTable());
    +
    +  setStyleClass("Wt-tree");
    +  layout_->setSelectable(false);
    +
    +  implementStateless(&WTreeNode::doExpand, &WTreeNode::undoDoExpand);
    +  implementStateless(&WTreeNode::doCollapse, &WTreeNode::undoDoCollapse);
    +
    +  WApplication *app = WApplication::instance();
    +
    +  expandIcon_
    +    = new WIconPair(WApplication::resourcesUrl() + "themes/" + app->cssTheme()
    +		    + "/" + imagePlus_,
    +		    WApplication::resourcesUrl() + "themes/" + app->cssTheme()
    +		    + "/" + imageMin_);
    +  noExpandIcon_ = new WText();
    +  noExpandIcon_->setStyleClass("Wt-noexpand");
    +
    +  layout_->rowAt(1)->hide();
    +
    +  if (labelText_)
    +    // "treenodelabel" is for backwards compatibility with Wt < 3.1.1
    +    labelText_->setStyleClass("Wt-label treenodelabel");
    +
    +  childCountLabel_ = 0;
    +
    +  layout_->elementAt(0, 0)->setStyleClass("Wt-trunk");
    +  layout_->elementAt(0, 0)->addWidget(noExpandIcon_);
    +
    +  if (labelIcon_) {
    +    layout_->elementAt(0, 1)->addWidget(labelIcon_);
    +    labelIcon_->setVerticalAlignment(AlignMiddle);
    +  }
    +
    +  if (labelText_)
    +    layout_->elementAt(0, 1)->addWidget(labelText_);
    +
    +  layout_->elementAt(0, 0)->setContentAlignment(AlignLeft | AlignTop);
    +  layout_->elementAt(0, 1)->setContentAlignment(AlignLeft | AlignMiddle);
    +
    +  layout_->rowAt(0)->setStyleClass("Wt-node");
    +
    +  childrenLoaded_ = false;
    +
    +  setLoadPolicy(LazyLoading);
    +}
    +
    +void WTreeNode::setChildCountPolicy(ChildCountPolicy policy)
    +{
    +  if (policy != Disabled && !childCountLabel_) {
    +    childCountLabel_ = new WText();
    +    childCountLabel_->setMargin(WLength(7), Left);
    +    // "treenodechildcount" is for backwards compatibility.
    +    childCountLabel_->setStyleClass("Wt-childcount treenodechildcount");
    +
    +    layout_->elementAt(0, 1)->addWidget(childCountLabel_);
    +  }
    +
    +  childCountPolicy_ = policy;
    +
    +  if (childCountPolicy_ == Enabled) {
    +    WTreeNode *parent = parentNode();
    + 
    +    if (parent && parent->isExpanded())
    +      if (doPopulate())
    +	update();
    +  }
    +
    +  if (childCountPolicy_ != Disabled) {
    +    for (unsigned i = 0; i < childNodes_.size(); ++i)
    +      childNodes_[i]->setChildCountPolicy(childCountPolicy_);
    +  }
    +}
    +
    +void WTreeNode::setLoadPolicy(LoadPolicy loadPolicy)
    +{
    +  loadPolicy_ = loadPolicy;
    +
    +  switch (loadPolicy) {
    +  case PreLoading:
    +    loadChildren();
    +
    +    break;
    +  case NextLevelLoading:
    +    if (isExpanded()) {
    +      loadChildren();
    +      loadGrandChildren();
    +    } else {
    +      WTreeNode *parent = parentNode();
    +      if (parent && parent->isExpanded())
    +	loadChildren();
    +
    +      expandIcon_
    +	->icon1Clicked().connect(this, &WTreeNode::loadGrandChildren);
    +    }
    +    break;
    +  case LazyLoading:
    +    if (isExpanded())
    +      loadChildren();
    +    else {
    +      if (childCountPolicy_ == Enabled) {
    +	WTreeNode *parent = parentNode();
    +	if (parent && parent->isExpanded())
    +	  doPopulate();
    +      }
    +
    +      expandIcon_->icon1Clicked().connect(this, &WTreeNode::expand);
    +    }
    +  }
    +
    +  if (loadPolicy_ != LazyLoading) {
    +    for (unsigned i = 0; i < childNodes_.size(); ++i)
    +      childNodes_[i]->setLoadPolicy(loadPolicy_);
    +  }
    +}
    +
    +void WTreeNode::loadChildren()
    +{
    +  if (!childrenLoaded_) {
    +    doPopulate();
    +
    +    for (unsigned i = 0; i < childNodes_.size(); ++i)
    +      layout_->elementAt(1, 1)->addWidget(childNodes_[i]);
    +
    +    expandIcon_->icon1Clicked().connect(this, &WTreeNode::doExpand);
    +    expandIcon_->icon2Clicked().connect(this, &WTreeNode::doCollapse);
    +
    +    resetLearnedSlots();
    +
    +    childrenLoaded_ = true;
    +  }
    +}
    +
    +void WTreeNode::loadGrandChildren()
    +{
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->loadChildren();
    +}
    +
    +bool WTreeNode::isLastChildNode() const
    +{
    +  WTreeNode *parent = parentNode();
    +
    +  if (parent)
    +    return parent->childNodes_.back() == this;
    +  else
    +    return true;
    +}
    +
    +void WTreeNode::descendantAdded(WTreeNode *node)
    +{
    +  WTreeNode *parent = parentNode();
    +
    +  if (parent)
    +    parent->descendantAdded(node);  
    +}
    +
    +void WTreeNode::descendantRemoved(WTreeNode *node)
    +{
    +  WTreeNode *parent = parentNode();
    +
    +  if (parent)
    +    parent->descendantRemoved(node);
    +}
    +
    +void WTreeNode::addChildNode(WTreeNode *node)
    +{
    +  insertChildNode(childNodes_.size(), node);
    +}
    +
    +void WTreeNode::insertChildNode(int index, WTreeNode *node)
    +{
    +  childNodes_.insert(childNodes_.begin() + index, node);
    +  node->parentNode_ = this;
    +
    +  if (childrenLoaded_)
    +    layout_->elementAt(1, 1)->insertWidget(index, node);
    +  else
    +    node->setParent(0); // because node->hasParent() has Changed
    +
    +  descendantAdded(node);
    +
    +  if (loadPolicy_ != node->loadPolicy_)
    +    node->setLoadPolicy(loadPolicy_);
    +
    +  if (childCountPolicy_ != node->childCountPolicy_)
    +    node->setChildCountPolicy(childCountPolicy_);
    +
    +  /*
    +   * If newly inserted node is last, then previous last node needs to
    +   * be updated.
    +   */
    +  if (index == (int)childNodes_.size() - 1 && childNodes_.size() > 1)
    +    childNodes_[childNodes_.size() - 2]->update();
    +
    +  node->update();
    +  update();
    +  resetLearnedSlots();
    +}
    +
    +void WTreeNode::removeChildNode(WTreeNode *node)
    +{
    +  Utils::erase(childNodes_, node);
    +  node->parentNode_ = 0;
    +
    +  if (childrenLoaded_)
    +    layout_->elementAt(1, 1)->removeWidget(node);
    +
    +  descendantRemoved(node);
    +
    +  updateChildren();
    +}
    +
    +void WTreeNode::updateChildren(bool recursive)
    +{
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    if (recursive)
    +      childNodes_[i]->updateChildren(recursive);
    +    else
    +      childNodes_[i]->update();
    +
    +  update();
    +
    +  resetLearnedSlots();
    +}
    +
    +bool WTreeNode::isExpanded() const
    +{
    +  return !collapsed_;
    +}
    +
    +void WTreeNode::expand()
    +{
    +  if (!isExpanded()) {
    +    if (!childrenLoaded_) {
    +      loadChildren();
    +    }
    +
    +    /*
    +     * Happens if expandable() for an unpopulated node returned true,
    +     * but after populate(), there were no children: update the node to
    +     * reflect that in fact this node cannot be expanded after all
    +     */
    +    if (parentNode() && childNodes_.empty()) {
    +      parentNode()->resetLearnedSlots();
    +      update();
    +      return;
    +    }
    +
    +    if (loadPolicy_ == NextLevelLoading)
    +      loadGrandChildren();
    +
    +    doExpand();
    +
    +    updateChildren();
    +  }
    +}
    +
    +void WTreeNode::collapse()
    +{
    +  if (isExpanded())
    +    doCollapse();
    +}
    +
    +void WTreeNode::doExpand()
    +{
    +  wasCollapsed_ = !isExpanded();
    +  collapsed_ = false;
    +
    +  if (!childNodes_.empty()) {
    +    expandIcon_->setState(1);
    +    layout_->rowAt(1)->show();
    +
    +    if (labelIcon_)
    +      labelIcon_->setState(1);
    +  }
    +
    +  /*
    +   * collapse all children
    +   */
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->doCollapse();
    +}
    +
    +void WTreeNode::doCollapse()
    +{
    +  wasCollapsed_ = !isExpanded();
    +  collapsed_ = true;
    +
    +  expandIcon_->setState(0);
    +  layout_->rowAt(1)->hide();
    +
    +  if (labelIcon_)
    +    labelIcon_->setState(0);
    +}
    +
    +void WTreeNode::undoDoCollapse()
    +{
    +  if (!wasCollapsed_) {
    +    // re-expand
    +    expandIcon_->setState(1);
    +    layout_->rowAt(1)->show();
    +    if (labelIcon_)
    +      labelIcon_->setState(1);
    +    collapsed_ = false;
    +  }
    +}
    +
    +void WTreeNode::undoDoExpand()
    +{
    +  if (wasCollapsed_) {
    +    // re-collapse
    +    expandIcon_->setState(0);
    +    layout_->rowAt(1)->hide();
    +    if (labelIcon_)
    +      labelIcon_->setState(0);
    +
    +    collapsed_ = true;
    +  }
    +
    +  /*
    +   * undo collapse of children
    +   */
    +  for (unsigned i = 0; i < childNodes_.size(); ++i)
    +    childNodes_[i]->undoDoCollapse();  
    +}
    +
    +void WTreeNode::setLabelIcon(WIconPair *labelIcon)
    +{
    +  delete labelIcon_;
    +  labelIcon_ = labelIcon;
    +
    +  if (labelIcon_) {
    +    if (labelText_)
    +      layout_->elementAt(0, 1)->insertBefore(labelIcon_, labelText_);
    +    else
    +      layout_->elementAt(0, 1)->addWidget(labelIcon_);
    +
    +    labelIcon_->setState(isExpanded() ? 1 : 0);
    +  }
    +}
    +
    +void WTreeNode::renderSelected(bool isSelected)
    +{
    +  layout_->rowAt(0)->setStyleClass(isSelected ? "Wt-selected selected" : "");
    +  selected().emit(isSelected);
    +}
    +
    +void WTreeNode::update()
    +{
    +  bool isLast = isLastChildNode();
    +
    +  if (!visible_) {
    +    layout_->rowAt(0)->hide();
    +    expandIcon_->hide();
    +    layout_->elementAt(0, 0)->resize(0, WLength::Auto);
    +    layout_->elementAt(1, 0)->resize(0, WLength::Auto);
    +  }
    +
    +  WTreeNode *parent = parentNode();
    +  if (parent && !parent->childrenDecorated_) {
    +    layout_->elementAt(0, 0)->hide();
    +    layout_->elementAt(1, 0)->hide();
    +  }
    +
    +  if (expandIcon_->state() != (isExpanded() ? 1 : 0))
    +    expandIcon_->setState(isExpanded() ? 1 : 0);
    +  if (layout_->rowAt(1)->isHidden() != !isExpanded())
    +    layout_->rowAt(1)->setHidden(!isExpanded());
    +  if (labelIcon_ && (labelIcon_->state() != (isExpanded() ? 1 : 0)))
    +    labelIcon_->setState(isExpanded() ? 1 : 0);
    +
    +  if (isLast) {
    +    layout_->elementAt(0, 0)->setStyleClass("Wt-end");
    +    layout_->elementAt(1, 0)->setStyleClass("");
    +  } else {
    +    layout_->elementAt(0, 0)->setStyleClass("Wt-trunk");
    +    layout_->elementAt(1, 0)->setStyleClass("Wt-trunk");
    +  }
    +
    +  if (!parentNode() || parentNode()->isExpanded()) {
    +    if (childCountPolicy_ == Enabled && !populated_)
    +      doPopulate();
    +
    +    if (!expandable()) {
    +      if (noExpandIcon_->parent() == 0) {
    +	layout_->elementAt(0, 0)->addWidget(noExpandIcon_);
    +	layout_->elementAt(0, 0)->removeWidget(expandIcon_);
    +      }
    +    } else {
    +      if (expandIcon_->parent() == 0) {
    +	layout_->elementAt(0, 0)->addWidget(expandIcon_);
    +	layout_->elementAt(0, 0)->removeWidget(noExpandIcon_);
    +      }
    +    }
    +  }
    +
    +  if (childCountPolicy_ != Disabled && populated_ && childCountLabel_) {
    +    int n = displayedChildCount();
    +    if (n)
    +      childCountLabel_->setText
    +	(WString::fromUTF8("(" + boost::lexical_cast<std::string>(n) + ")"));
    +    else
    +      childCountLabel_->setText(WString());
    +  }
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WTreeNode::hasParent() const
    +{
    +  if (parentNode_)
    +    return true;
    +  else
    +    return WCompositeWidget::hasParent();
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTreeTable b/wt-3.1.7a/src/Wt/WTreeTable
    new file mode 100644
    index 0000000..89a2dcc
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeTable
    @@ -0,0 +1,183 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTREETABLE_H_
    +#define WTREETABLE_H_
    +
    +#include <Wt/WCompositeWidget>
    +
    +namespace Wt {
    +
    +class WTree;
    +class WTreeTableNode;
    +class WText;
    +
    +/*! \class WTreeTable Wt/WTreeTable Wt/WTreeTable
    + *  \brief A table with a navigatable tree in the first column.
    + *
    + * A %WTreeTable implements a tree table, where additional data
    + * associated is associated with tree items, which are organized in
    + * columns.
    + *
    + * Unlike the MVC-based WTreeView widget, the tree renders a widget
    + * hierarchy, rather than a hierarhical standard model. This provides
    + * extra flexibility (as any widget can be used as contents), at the
    + * cost of server-side, client-side and bandwidth resources
    + * (especially for large tree tables).
    + *
    + * The actual data is organized and provided by WTreeTableNode widgets.
    + *
    + * To use the tree table, you must first use addColumn() to specify
    + * the additional data columns. Then, you must set the tree root using
    + * setTreeRoot() and bind additional information (text or other
    + * widgets) in each node using WTreeTableNode::setColumnWidget().
    + *
    + * The table cannot be given a height using CSS style rules, instead you
    + * must use layout managers, or use resize().
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WTreeTable *treeTable = new Wt::WTreeTable();
    + * treeTable->resize(650, 300);
    + *
    + * // Add 3 extra columns
    + * treeTable->addColumn("Yuppie Factor", 125);
    + * treeTable->addColumn("# Holidays", 125);
    + * treeTable->addColumn("Favorite Item", 125);
    + *
    + * // Create and set the root node
    + * Wt::WTreeTableNode *root = new Wt::WTreeTableNode("All Personnel");
    + * root->setImagePack("resources/");
    + * treeTable->setTreeRoot(root, "Emweb Organigram");
    + *
    + * // Populate the tree with data nodes.
    + * Wt::WTreeTableNode *node1 = new Wt::WTreeTableNode("Upper Management", 0, root);
    + * Wt::WTreeTableNode *node2;
    + * node2 = new Wt::WTreeTableNode("Chief Anything Officer", 0, node1);
    + * node2->setColumnWidget(1, new Wt::WText("-2.8"));
    + * node2->setColumnWidget(2, new Wt::WText("20"));
    + * node2->setColumnWidget(3, new Wt::WText("Scepter"));
    + *
    + * node2 = new WTreeTableNode("Vice President of Parties", 0, node1);
    + * node2->setColumnWidget(1, new Wt::WText("13.57"));
    + * node2->setColumnWidget(2, new Wt::WText("365"));
    + * node2->setColumnWidget(3, new Wt::WText("Flag"));
    + *
    + * root->expand();
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * The treetable is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-treetable</tt> CSS class. The style
    + * selectors that affect the rendering of the tree are indicated in
    + * the documentation for WTree (for selection) and WTreeNode (for
    + * decoration). In addition, the following selector may be used to to
    + * style the header:
    + *
    + * \verbatim
    +.Wt-treetable .Wt-header : header
    +\endverbatim
    + *
    + * A screenshot of the treetable:
    + * \image html WTreeTable-default-1.png "An example WTreeTable (default)"
    + * \image html WTreeTable-polished-1.png "An example WTreeTable (polished)"
    + *
    + * \sa WTreeTableNode, WTreeView
    + */
    +class WT_API WTreeTable : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Creates a new tree table.
    +   *
    +   * The treeRoot() is \c 0. The table should first be properly dimensioned
    +   * using addColumn() calls, and then data using setTreeRoot().
    +   */
    +  WTreeTable(WContainerWidget *parent = 0);
    +
    +  /*! \brief Adds an extra column.
    +   *
    +   * Add an extra column, specifying the column header and a column
    +   * width. The extra columns are numbered from 1 as column 0 contains
    +   * the tree itself. The header for column 0 (the tree itself) is
    +   * specified in setTreeRoot(), and the width of column 0 takes the
    +   * remaining available width.
    +   */
    +  void addColumn(const WString& header, const WLength& width);
    +
    +  /*! \brief Returns the number of columns in this table.
    +   *
    +   * Returns the number of columns in the table, including in the count
    +   * column 0 (which contains the tree).
    +   *
    +   * \sa addColumn()
    +   */
    +  int columnCount() const { return (int)columnWidths_.size(); }
    +
    +  /*! \brief Sets the tree root.
    +   *
    +   * Sets the data for the tree table, and specify the header for the
    +   * first column.
    +   *
    +   * \sa treeRoot(), setTree(WTree *tree, const WString&)
    +   */
    +  void setTreeRoot(WTreeTableNode *root, const WString& header);
    +
    +  /*! \brief Returns the tree root.
    +   */
    +  WTreeTableNode *treeRoot();
    +
    +  /*! \brief Sets the tree which provides the data for the tree table.
    +   *
    +   * \sa setTreeRoot(WTreeTableNode *, const WString&).
    +   */
    +  void setTree(WTree *tree, const WString& header);
    +
    +  /*! \brief Returns the tree that provides the data this table.
    +   *
    +   * \sa setTree(WTree *tree, const WString&).
    +   */
    +  WTree *tree() const { return tree_; }
    +
    +  /*! \brief Returns the column width for the given column.
    +   *
    +   * The width of the first column (with index 0), containing the
    +   * tree, is implied by the width set for the table minus the width
    +   * of all other columns.
    +   *
    +   * \sa addColumn(), setTreeRoot()
    +   */
    +  WLength columnWidth(int column) const { return columnWidths_[column]; }
    +
    +  /*! \brief Returns the header for the given column.
    +   *
    +   * \sa addColumn(), setTreeRoot()
    +   */
    +  WText *header(int column) const;
    +
    +  /*! \brief Returns the header widget.
    +   *
    +   * This is the widget that contains the column headers.
    +   */
    +  WWidget *headerWidget() const;
    +
    +protected:
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +private:
    +  WContainerWidget *impl_;
    +  WContainerWidget *headers_;
    +  WContainerWidget *headerContainer_;
    +  WTree            *tree_;
    +
    +  std::vector<WLength> columnWidths_;  
    +};
    +
    +}
    +
    +#endif // WTREETABLE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTreeTable.C b/wt-3.1.7a/src/Wt/WTreeTable.C
    new file mode 100644
    index 0000000..4d8de11
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeTable.C
    @@ -0,0 +1,152 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WApplication"
    +#include "Wt/WVBoxLayout"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +#include "Wt/WString"
    +#include "Wt/WTree"
    +#include "Wt/WTreeTable"
    +#include "Wt/WText"
    +#include "Wt/WTreeTableNode"
    +
    +namespace Wt {
    +
    +WTreeTable::WTreeTable(WContainerWidget *parent)
    +  : WCompositeWidget(parent)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +
    +  setStyleClass("Wt-treetable");
    +  setPositionScheme(Relative);
    +
    +  headers_ = new WContainerWidget(impl_);
    +  headers_->setStyleClass("Wt-header header");
    +
    +  /*
    +   * spacer for when a scroll bar is visible
    +   */
    +  WContainerWidget *spacer = new WContainerWidget(headers_);
    +  spacer->setStyleClass("Wt-sbspacer");
    +
    +  headerContainer_ = new WContainerWidget(headers_);
    +  headerContainer_->setFloatSide(Right);
    +
    +  headers_->addWidget(new WText());
    +  columnWidths_.push_back(WLength::Auto);
    +
    +  WContainerWidget *content = new WContainerWidget(impl_);
    +  content->setStyleClass("Wt-content");
    +  content->resize(WLength(100, WLength::Percentage),
    +		  WLength(100, WLength::Percentage));
    +  if (!wApp->environment().agentIsIE())
    +    content->setOverflow(WContainerWidget::OverflowAuto);
    +  else
    +    content->setAttributeValue
    +      ("style", "overflow-y: auto; overflow-x: hidden; zoom: 1");
    +
    +  content->addWidget(tree_ = new WTree());
    +
    +  tree_->setMargin(3, Top);
    +  tree_->resize(WLength(100, WLength::Percentage), WLength::Auto);
    + 
    +  setJavaScriptMember
    +    (WT_RESIZE_JS,
    +     "function(self, w, h) {"
    +     """self.style.height= h + 'px';"
    +     """var c = self.lastChild;"
    +     """var t = self.firstChild;"
    +     """h -= $(t).outerHeight();"
    +     """if (h > 0) "
    +     ""  "c.style.height = h + 'px';"
    +     "};");
    +}
    +
    +void WTreeTable::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull) {
    +    /*
    +     * Ugly JavaScript hack to make headers stay on top of content when
    +     * scrollbars appear
    +     */
    +    WApplication::instance()->doJavaScript
    +      ("{"
    +       """var id='" + id() + "';"
    +
    +       """function sb() {"
    +       ""  "var $el=$('#' + id);"
    +       ""  "if ($el.size()) {"
    +       ""    "var e=$el.find('.Wt-content').get(0);"
    +       ""    "var sp=$el.find('.Wt-sbspacer').get(0);"
    +       ""    "if (e.scrollHeight > e.offsetHeight) {"
    +       ""      "sp.style.display='block';"
    +       ""    "} else {"
    +       ""      "sp.style.display='none';"
    +       ""    "}"
    +       ""    "setTimeout(sb, 20);"
    +       ""  "}"
    +       """}"
    +
    +       """sb();"
    +       "}");
    +  }
    +
    +  WCompositeWidget::render(flags);
    +}
    +
    +WWidget *WTreeTable::headerWidget() const
    +{
    +  return headers_;
    +}
    +
    +void WTreeTable::setTreeRoot(WTreeTableNode *root, const WString& h)
    +{
    +  tree_->setTreeRoot(root);
    +  header(0)->setText(h);
    +  root->setTable(this);
    +}
    +
    +WTreeTableNode *WTreeTable::treeRoot()
    +{
    +  return dynamic_cast<WTreeTableNode *>(tree_->treeRoot());
    +}
    +
    +void WTreeTable::setTree(WTree *root, const WString& h)
    +{
    +  WContainerWidget *parent = dynamic_cast<WContainerWidget *>(tree_->parent());
    +
    +  delete tree_;
    +
    +  header(0)->setText(h);
    +  parent->addWidget(tree_ = new WTree());
    +  tree_->resize(WLength(100, WLength::Percentage), WLength::Auto);
    +
    +  treeRoot()->setTable(this);
    +}
    +
    +void WTreeTable::addColumn(const WString& header, const WLength& width)
    +{
    +  WText *t = new WText(header);
    +  t->resize(width, WLength::Auto);
    +  t->setInline(false);
    +  t->setFloatSide(Left);
    +  headerContainer_->addWidget(t);
    +
    +  columnWidths_.push_back(width);
    +}
    +
    +WText *WTreeTable::header(int column) const
    +{
    +  if (column == 0)
    +    return dynamic_cast<WText *>
    +      (dynamic_cast<WContainerWidget *>(impl_->children()[0])
    +       ->children()[2]);
    +  else
    +    return dynamic_cast<WText *>(headerContainer_->children()[column - 1]);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTreeTableNode b/wt-3.1.7a/src/Wt/WTreeTableNode
    new file mode 100644
    index 0000000..12911a2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeTableNode
    @@ -0,0 +1,100 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WTREETABLENODE_H_
    +#define WTREETABLENODE_H_
    +
    +#include <Wt/WTreeNode>
    +
    +namespace Wt {
    +
    +class WTreeTable;
    +
    +/*! \class WTreeTableNode Wt/WTreeTableNode Wt/WTreeTableNode
    + *  \brief A specialized tree node which allows additional data to be
    + *         associated with each node.
    + *
    + * Additional data for each column can be set using setColumnWidget().
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget is styled by the current CSS theme. See WTreeNode for details.
    + *
    + * \sa WTreeNode, WTreeTable
    + */
    +class WT_API WTreeTableNode : public WTreeNode
    +{
    +public:
    +  /*! \brief Creates a new tree table node.
    +   *
    +   * \sa WTreeNode::WTreeNode()
    +   */
    +  WTreeTableNode(const WString& labelText,
    +		 WIconPair *labelIcon = 0,
    +		 WTreeTableNode *parentNode = 0);
    +
    +  /*! \brief Sets a widget to be displayed in the given column for this node.
    +   *
    +   * Columns are counted starting from 0 for the tree list itself, and 1
    +   * for the first additional column.
    +   */
    +  void setColumnWidget(int column, WWidget *item);
    +
    +  /*! \brief Returns the widget set for a column.
    +   *
    +   * Returns the widget set previously using setColumnWidget(), or \c 0
    +   * if no widget was previously set.
    +   */
    +  WWidget *columnWidget(int column);
    +
    +  WTreeTable *table() const { return table_; }
    +
    +  virtual void insertChildNode(int index, WTreeNode *node);
    +
    +protected:
    +
    +  /*! \brief Sets the table for this node.
    +   *
    +   * This method is called when the node is inserted, directly, or indirectly
    +   * into a table.
    +   *
    +   * You may want to reimplement this method if you wish to customize the
    +   * behaviour of the node depending on table properties. For example to only
    +   * associate data with the node when the tree list is actually used inside
    +   * a table.
    +   */
    +  virtual void setTable(WTreeTable *table);
    +
    +private:
    +  WTreeTable                               *table_;
    +  WContainerWidget                         *row_;
    +
    +  struct ColumnWidget {
    +    WWidget *widget;
    +    bool     isSet;
    +
    +    ColumnWidget(WWidget *aWidget, bool set)
    +      : widget(aWidget), isSet(set) { }
    +  };
    +
    +  std::vector<ColumnWidget> columnWidgets_;
    +
    +  /*
    +   * the number of columns, besides the the tree itself
    +   */
    +  void                      createExtraColumns(int numColumns);
    +
    +  /*
    +   * The width for the column, counting from 1
    +   */
    +  WLength                  columnWidth(int column);
    +
    +  friend class WTreeTable;
    +};
    +
    +}
    +
    +#endif // WTREETABLENODE_H_
    diff --git a/wt-3.1.7a/src/Wt/WTreeTableNode.C b/wt-3.1.7a/src/Wt/WTreeTableNode.C
    new file mode 100644
    index 0000000..23d264b
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeTableNode.C
    @@ -0,0 +1,114 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WContainerWidget"
    +#include "Wt/WIconPair"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +#include "Wt/WTreeTable"
    +#include "Wt/WTreeTableNode"
    +
    +namespace Wt {
    +
    +WTreeTableNode::WTreeTableNode(const WString& labelText,
    +			       WIconPair *labelIcon,
    +			       WTreeTableNode *parentNode)
    +  : WTreeNode(labelText, labelIcon),
    +    table_(0),
    +    row_(0)
    +{ 
    +  if (parentNode)
    +    parentNode->addChildNode(this);
    +}
    +
    +void WTreeTableNode::insertChildNode(int index, WTreeNode *node)
    +{
    +  WTreeNode::insertChildNode(index, node);
    +
    +  if (table_)
    +    (dynamic_cast<WTreeTableNode *>(node))->setTable(table_);
    +}
    +
    +void WTreeTableNode::setColumnWidget(int column, WWidget *widget)
    +{
    +  --column;
    +
    +  createExtraColumns(column);
    +
    +  if (column < (int)columnWidgets_.size()) {
    +    delete columnWidgets_[column].widget;
    +    columnWidgets_[column] = ColumnWidget(widget, true);
    +  } else {
    +    columnWidgets_.push_back(ColumnWidget(widget, true));
    +  }
    +
    +  widget->setInline(false);
    +  widget->setFloatSide(Left);
    +  widget->resize(columnWidth(column + 1), WLength::Auto);
    +  if (column == static_cast<int>(columnWidgets_.size()) - 1)
    +    row_->addWidget(widget);
    +  else
    +    row_->insertBefore(widget, columnWidgets_[column + 1].widget);
    +}
    +
    +void WTreeTableNode::createExtraColumns(int numColumns)
    +{
    +  if (!row_) {
    +    row_ = new WContainerWidget();
    +    labelArea()->insertBefore(row_, labelArea()->children()[0]);
    +    row_->setFloatSide(Right);
    +    labelArea()->resize(WLength(100, WLength::Percentage), WLength::Auto);
    +    labelArea()->table()->resize(WLength(100, WLength::Percentage),
    +				 WLength::Auto);
    +  }
    +
    +  while (static_cast<int>(columnWidgets_.size()) < numColumns) {
    +    WText *w = new WText(WString::fromUTF8(" "), row_);
    +    w->setInline(false);
    +    columnWidgets_.push_back(ColumnWidget(w, false));
    +    w->setFloatSide(Left);
    +    w->resize(columnWidth(columnWidgets_.size()), 1);
    +  }
    +}
    +
    +WWidget *WTreeTableNode::columnWidget(int column)
    +{
    +  --column;
    +
    +  return
    +    (column < static_cast<int>(columnWidgets_.size())
    +     && columnWidgets_[column].isSet)
    +    ? columnWidgets_[column].widget
    +    : 0;
    +}
    +
    +WLength WTreeTableNode::columnWidth(int column)
    +{
    +  if (table_)
    +    return table_->columnWidth(column);
    +  else
    +    return WLength::Auto;
    +}
    +
    +void WTreeTableNode::setTable(WTreeTable *table)
    +{
    +  if (table_ != table) {
    +    table_ = table;
    +
    +    for (unsigned i = 0; i < childNodes().size(); ++i)
    +      dynamic_cast<WTreeTableNode *>(childNodes()[i])->setTable(table);
    +
    +    createExtraColumns(table->columnCount() - 1);
    +
    +    for (unsigned i = 0; i < columnWidgets_.size(); ++i) {
    +      WWidget *w = columnWidgets_[i].widget;
    +      w->resize(columnWidth(i + 1), w->height());
    +    }
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WTreeView b/wt-3.1.7a/src/Wt/WTreeView
    new file mode 100644
    index 0000000..30f1ed3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeView
    @@ -0,0 +1,435 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_TREEVIEW_H_
    +#define WT_TREEVIEW_H_
    +
    +#include <set>
    +#include <vector>
    +#include <boost/unordered_map.hpp>
    +
    +#include <Wt/WAbstractItemView>
    +#include <Wt/WJavaScript>
    +#include <Wt/WModelIndex>
    +#include <Wt/WSignalMapper>
    +
    +namespace Wt {
    +
    +  class WCheckBox;
    +  class WCssRule;
    +  class WItemSelectionModel;
    +  class WText;
    +  class WTreeViewNode;
    +  class ToggleButtonConfig;
    +
    +/*! \class WTreeView Wt/WTreeView Wt/WTreeView
    + *  \brief A view class that displays a model as a tree or tree table.
    + *
    + * The view displays data from a WAbstractItemModel in a tree or tree
    + * table. It provides incremental rendering, allowing the display of
    + * data models of any size efficiently, without excessive use of
    + * client- or serverside resources.
    + *
    + * The rendering (and editing) of items is handled by a
    + * WAbstractItemDelegate, by default it uses WItemDelegate which
    + * renders data of all predefined roles (see also Wt::ItemDataRole),
    + * including text, icons, checkboxes, and tooltips.
    + *
    + * The view may support editing of items, if the model indicates
    + * support (see the Wt::ItemIsEditable flag). You can define triggers
    + * that initiate editing of an item using setEditTriggers(). The
    + * actual editing is provided by the item delegate (you can set an
    + * appropriate delegate for one column using
    + * setItemDelegateForColumn()). Using setEditOptions() you can
    + * customize if and how the view deals with multiple editors.
    + *
    + * By default, all but the first columns are given a width of 150px,
    + * and the first column takes the remaining size. <b>Note that this
    + * may have as consequence that the first column's size is reduced to
    + * 0.</b> Column widths of all columns, including the first column,
    + * can be set through the API method setColumnWidth(), and also by the
    + * user using handles provided in the header.
    + *
    + * Optionally, the treeview may be configured so that the first column
    + * is always visible while scrolling through the other columns, which
    + * may be convenient if you wish to display a model with many
    + * columns. Use setColumn1Fixed() to enable this behaviour.
    + *
    + * If the model supports sorting (WAbstractItemModel::sort()), such as
    + * the WStandardItemModel, then you can enable sorting buttons in the
    + * header, using setSortingEnabled().
    + *
    + * You can allow selection on row or item level (using
    + * setSelectionBehavior()), and selection of single or multiple items
    + * (using setSelectionMode()), and listen for changes in the selection
    + * using the selectionChanged() signal.
    + *
    + * You may enable drag & drop support for this view, whith awareness
    + * of the items in the model. When enabling dragging (see
    + * setDragEnabled()), the current selection may be dragged, but only
    + * when all items in the selection indicate support for dragging
    + * (controlled by the \link Wt::ItemIsDragEnabled
    + * ItemIsDragEnabled\endlink flag), and if the model indicates a
    + * mime-type (controlled by WAbstractItemModel::mimeType()). Likewise,
    + * by enabling support for dropping (see setDropsEnabled()), the
    + * treeview may receive a drop event on a particular item, at least if
    + * the item indicates support for drops (controlled by the \link
    + * Wt::ItemIsDropEnabled ItemIsDropEnabled\endlink flag).
    + *
    + * You may also react to mouse click events on any item, by connecting
    + * to one of the clicked() or doubleClicked() signals.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * // WTreeView will display the data of a model
    + * Wt::WAbstractItemModel *model = ...
    + *
    + * // Create the WTreeView
    + * Wt::WTreeView *gitView = new Wt::WTreeView();
    + * gitView->resize(300, Wt::WLength::Auto);
    + * gitView->setSortingEnabled(false);
    + * gitView->setModel(model);
    + * gitView->setSelectionMode(SingleSelection);
    + * \endcode
    + * \endif
    + *
    + * <h3>Graceful degradation</h3>
    + *
    + * The view provides a virtual scrolling behavior which relies on Ajax
    + * availability. When Ajax is not available, a page navigation bar is
    + * used instead, see createPageNavigationBar(). In that case, the widget
    + * needs to be given an explicit height using resize() which determines the
    + * number of rows that are displayed at a time.
    + *
    + * <h3>CSS</h3>
    + *
    + * The treeview is styled by the current CSS theme. The look can be
    + * overridden using the <tt>Wt-treeview</tt> CSS class and the following
    + * selectors.
    + *
    + * Selectors that apply to the header:
    + * \verbatim
    +.Wt-treeview .Wt-headerdiv         : header (background)
    +.Wt-treeview .Wt-header .Wt-label  : header label
    +.Wt-treeview .Wt-tv-rh             : column resize handle
    +.Wt-treeview .Wt-tv-sh-none        : column sort handle, no sorting
    +.Wt-treeview .Wt-tv-sh-up          : column sort handle, sort up
    +.Wt-treeview .Wt-tv-sh-down        : column sort handle, sort down
    +\endverbatim
    + * Selectors that apply to the tree decoration:
    + * \verbatim
    +.Wt-treeview .Wt-trunk          : vertical line, trunk
    +.Wt-treeview .Wt-end            : vertical line, last item
    +.Wt-treeview .Wt-collapse       : collapse icon
    +.Wt-treeview .Wt-expand         : expand icon
    +.Wt-treeview .Wt-noexpand       : leaf icon
    +\endverbatim
    + * Selectors that apply to the table contents:
    + * \verbatim
    +.Wt-treeview .Wt-spacer         : spacer for non-loaded content
    +.Wt-treeview .Wt-selected       : selected item
    +.Wt-treeview .Wt-drop-site      : possible drop site
    +\endverbatim
    + * Selectors that apply to the table borders (which must be 1 pixel wide)
    + * \verbatim
    +.Wt-treeview .Wt-tv-row .Wt-tv-c      : border-right property of cells
    +.Wt-treeview .Wt-header .Wt-tv-row,
    +  .Wt-treeview .Wt-tv-node .Wt-tv-row : border-left property of cells
    +\endverbatim
    + *
    + * A snapshot of the WTreeView: 
    + * \image html WTreeView-default-1.png "WTreeView example (default)"
    + * \image html WTreeView-polished-1.png "WTreeView example (polished)"
    + *
    + * \ingroup modelview
    + */
    +class WT_API WTreeView : public WAbstractItemView
    +{
    +public:
    +  /*! \brief Creates a new tree view.
    +   */
    +  WTreeView(WContainerWidget *parent = 0);
    +
    +  ~WTreeView();
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +  /*! \brief Sets the column format string (<b>deprecated</b>).
    +   *
    +   * \if cpp
    +   * The DisplayRole data for that column is converted to a string using
    +   * asString(), with the given format.
    +   * \elseif java
    +   * The DisplayRole data for that column is converted to a string using
    +   * {javadoclink StringUtils#asString(Object)}, with the given format.
    +   * \endif
    +   *
    +   * The default value is "".
    +   *
    +   * \deprecated use itemDelegateForColumn() to customize the formatting. This
    +   *             method will create a new WItemDelegate for the
    +   *             column, and configure its format.
    +   */
    +  void setColumnFormat(int column, const WT_USTRING& format);
    +
    +  /*! \brief Returns the column format string (<b>deprecated</b>).
    +   *
    +   * \sa setColumnFormat()
    +   *
    +   * \deprecated use itemDelegateForColumn() to customize the formatting. This
    +   *             method will try to cast the itemDelegateForColumn() to
    +   *             a WItemDelegate and return the format.
    +   */
    +  WT_USTRING columnFormat(int column) const;
    +#endif // WT_DEPRECATED_3_0_0
    +
    +  /*! \brief Expands or collapses a node.
    +   *
    +   * \sa expand(), collapse()
    +   */
    +  void setExpanded(const WModelIndex&, bool expanded);
    +
    +  /*! \brief Returns whether a node is expanded.
    +   *
    +   * \sa setExpanded()
    +   */
    +  bool isExpanded(const WModelIndex& index) const;
    +
    +  /*! \brief Collapses a node.
    +   *
    +   * \sa setExpanded(), expand()
    +   */
    +  void collapse(const WModelIndex& index);
    +
    +  /*! \brief Expands a node.
    +   *
    +   * \sa setExpanded(), collapse()
    +   */
    +  void expand(const WModelIndex& index);
    +
    +  /*! \brief Expands all nodes to a depth.
    +   *
    +   * Expands all nodes to the given \p depth. A depth of 1 corresponds
    +   * to the top level nodes.
    +   *
    +   * \sa expand()
    +   */
    +  void expandToDepth(int depth);
    +
    +  /*! \brief Sets whether toplevel items are decorated.
    +   *
    +   * By default, top level nodes have expand/collapse and other lines
    +   * to display their linkage and offspring, like any node.
    +   *
    +   * By setting \p show to \c false, you can hide these decorations
    +   * for root nodes, and in this way mimic a plain list. You could also
    +   * consider using a WTableView instead.
    +   */
    +  void setRootIsDecorated(bool show);
    +
    +  /*! \brief Returns whether toplevel items are decorated.
    +   *
    +   * \sa setRootIsDecorated()
    +   */
    +  bool rootIsDecorated() const { return rootIsDecorated_; }
    +
    +  /*! \brief Configures whether horizontal scrolling includes the first column.
    +   *
    +   * To display a model with many columns, this option allows you to
    +   * keep the first column fixed while scrolling through the other
    +   * columns of the model.
    +   *
    +   * The default value is \c false.
    +   *
    +   * \note Currently, you must set this option before any other manipulation
    +   *       of a newly created treeview, and only \p enable = \c true
    +   *       is supported.
    +   */
    +  void setColumn1Fixed(bool enable);
    +
    +  /*! \brief Returns whether horizontal scrolling includes the first column.
    +   *
    +   * \sa setColumn1Fixed()
    +   */
    +  bool column1Fixed() const { return column1Fixed_; }
    +
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +  /*! \brief %Signal emitted when a node is collapsed.
    +   *
    +   * \sa setExpanded(), expanded()
    +   */
    +  Signal<WModelIndex>& collapsed() { return collapsed_; }
    +
    +  /*! \brief %Signal emitted when a node is expanded.
    +   *
    +   * \sa setExpanded(), collapsed()
    +   */
    +  Signal<WModelIndex>& expanded() { return expanded_; }
    +
    +  virtual void setModel(WAbstractItemModel *model);
    +
    +  /*! \brief Sets the column width.
    +   *
    +   * For a model with \link WAbstractItemModel::columnCount()
    +   * columnCount()\endlink == \p N, the initial width of columns 1..\p
    +   * N is set to 150 pixels, and column 0 will take all remaining
    +   * space.
    +   *
    +   * \note The actual space occupied by each column is the column width
    +   *       augmented by 7 pixels for internal padding and a border.
    +   *
    +   * \sa setRowHeight()
    +   */
    +  virtual void setColumnWidth(int column, const WLength& width);
    +  virtual void setAlternatingRowColors(bool enable);
    +  virtual void setRowHeight(const WLength& rowHeight);
    +  virtual void setHeaderHeight(const WLength& height, bool multiLine = false);
    +  virtual void setColumnBorder(const WColor& color);
    +  virtual void setColumnHidden(int column, bool hidden);
    +
    +  virtual int pageCount() const;
    +  virtual int pageSize() const;
    +  virtual int currentPage() const;
    +  virtual void setCurrentPage(int page);
    +
    +protected:
    +  virtual void render(WFlags<RenderFlag> flags);
    +  virtual void enableAjax();
    +
    +private:
    +  typedef boost::unordered_map<WModelIndex, WTreeViewNode *> NodeMap;
    +
    +  WModelIndexSet       expandedSet_;
    +  NodeMap              renderedNodes_;
    +  bool                 renderedNodesAdded_;
    +  WTreeViewNode       *rootNode_;
    +  WCssTemplateRule    *rowHeightRule_, *rowWidthRule_, 
    +                      *rowContentsWidthRule_, *c0WidthRule_;
    +  WCssRule            *borderColorRule_;
    +
    +  bool                 rootIsDecorated_;
    +  bool                 column1Fixed_;
    +
    +  Signal<WModelIndex>  collapsed_;
    +  Signal<WModelIndex>  expanded_;
    +
    +  // in rows, as indicated by the current position of the viewport:
    +  int viewportTop_;
    +  int viewportHeight_;
    +
    +  // the firstRenderedRow may differ from viewportTop_, because the user
    +  // adjusted the view port slightly, but not enough to trigger a correction
    +  //
    +  // the validRowCount may differ from viewportHeight_ as a result of
    +  // expanding or collapsing nodes, or inserting and deleting rows.
    +  // it takes into account that an expanded node may be incomplete, and
    +  // thus everything beyond is irrelevant
    +  int firstRenderedRow_;
    +  int validRowCount_;
    +
    +  // rendered nodes in memory (including those collapsed and not included in
    +  // actualRenderedRowCount_), but excluding nodes that are simply there since
    +  // some of its children are rendered
    +  int nodeLoad_;
    +
    +  WContainerWidget *headers_, *headerContainer_;
    +  WContainerWidget *contents_, *contentsContainer_;
    +  WContainerWidget *scrollBarC_;
    +
    +  int firstRemovedRow_, removedHeight_;
    +
    +  JSignal<std::string, int, std::string, std::string,
    +          std::string, WMouseEvent> itemEvent_;
    +
    +  ToggleButtonConfig *expandConfig_;
    +
    +  JSlot tieRowsScrollJS_;
    +  
    +  virtual ColumnInfo createColumnInfo(int column) const;
    +
    +  void defineJavaScript();
    +  void rerenderHeader();
    +  void rerenderTree();
    +  void setup();
    +
    +  virtual void scheduleRerender(RenderState what);
    +
    +  void modelColumnsInserted(const WModelIndex& parent, int start, int end);
    +  void modelColumnsAboutToBeRemoved(const WModelIndex& parent,
    +				    int start, int end);
    +  void modelColumnsRemoved(const WModelIndex& parent, int start, int end);
    +  void modelRowsInserted(const WModelIndex& parent, int start, int end);
    +  void modelRowsAboutToBeRemoved(const WModelIndex& parent, int start, int end);
    +  void modelRowsRemoved(const WModelIndex& parent, int start, int end);
    +  virtual void modelDataChanged(const WModelIndex& topLeft,
    +				const WModelIndex& bottomRight);
    +  void modelHeaderDataChanged(Orientation orientation, int start, int end);
    +  virtual void modelLayoutAboutToBeChanged();
    +  virtual void modelLayoutChanged();
    +
    +  void onViewportChange(WScrollEvent event);
    +  void onItemEvent(std::string nodeId, int columnId, std::string type,
    +		   std::string extra1, std::string extra2, WMouseEvent event);
    +  void setRootNodeStyle();
    +  void setCollapsed(const WModelIndex& index);
    +
    +  int calcOptimalFirstRenderedRow() const;
    +  int calcOptimalRenderedRowCount() const;
    +
    +  void shiftModelIndexes(const WModelIndex& parent, int start, int count);
    +  static int shiftModelIndexes(const WModelIndex& parent, int start, int count,
    +			       WAbstractItemModel *model, WModelIndexSet& set);
    +
    +  void addRenderedNode(WTreeViewNode *node);
    +  void removeRenderedNode(WTreeViewNode *node);
    +
    +  void adjustToViewport(WTreeViewNode *changed = 0);
    +
    +  int pruneNodes(WTreeViewNode *node, int theNodeRow);
    +  int adjustRenderedNode(WTreeViewNode *node, int theNodeRow);
    +
    +  WWidget *widgetForIndex(const WModelIndex& index) const;
    +  WTreeViewNode *nodeForIndex(const WModelIndex& index) const;
    +
    +  int subTreeHeight(const WModelIndex& index,
    +		    int lowerBound = 0,
    +		    int upperBound = std::numeric_limits<int>::max());
    +  int renderedRow(const WModelIndex& index,
    +		  WWidget *w,
    +		  int lowerBound = 0,
    +		  int upperBound = std::numeric_limits<int>::max());
    +  int getIndexRow(const WModelIndex& index,
    +		  const WModelIndex& ancestor,
    +		  int lowerBound = 0,
    +		  int upperBound = std::numeric_limits<int>::max());
    +
    +  std::string columnStyleClass(int column) const;
    +
    +  int renderLowerBound() const;
    +  int renderUpperBound() const;
    +
    +  void renderedRowsChanged(int row, int count);
    +
    +  WContainerWidget *headerRow();
    +
    +  virtual bool internalSelect(const WModelIndex& index, SelectionFlag option);
    +  virtual void selectRange(const WModelIndex& first, const WModelIndex& last);
    +
    +  void expandChildrenToDepth(const WModelIndex& index, int depth);
    +
    +  void updateColumnWidth(int columnId, int width);
    +
    +  virtual WContainerWidget* headerContainer() { return headerContainer_; }
    +
    +  virtual WWidget *headerWidget(int column, bool contentsOnly = true) ;
    +
    +  friend class WTreeViewNode;
    +};
    +
    +}
    +
    +#endif // WT_TREEVIEW_H_
    diff --git a/wt-3.1.7a/src/Wt/WTreeView.C b/wt-3.1.7a/src/Wt/WTreeView.C
    new file mode 100644
    index 0000000..1d31199
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WTreeView.C
    @@ -0,0 +1,2819 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cmath>
    +#include <iostream>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WAbstractItemModel"
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WIconPair"
    +#include "Wt/WItemDelegate"
    +#include "Wt/WItemSelectionModel"
    +#include "Wt/WImage"
    +#include "Wt/WPushButton"
    +#include "Wt/WTable"
    +#include "Wt/WTableCell"
    +#include "Wt/WText"
    +#include "Wt/WTreeView"
    +#include "Wt/WVBoxLayout"
    +#include "Wt/WWebWidget"
    +
    +#include "EscapeOStream.h"
    +#include "JavaScriptLoader.h"
    +#include "Utils.h"
    +
    +#ifndef WT_DEBUG_JS
    +#include "js/WTreeView.min.js"
    +#endif
    +
    +/*
    +  TODO:
    +
    +  nice to have:
    +   - stateless slot implementations
    +   - keyboard navigation ?
    +*/
    +
    +#ifndef DOXYGEN_ONLY
    +
    +// Widest scrollbar found ? My Gnome Firefox has this
    +#define SCROLLBAR_WIDTH_TEXT "22"
    +#define SCROLLBAR_WIDTH      22
    +
    +namespace Wt {
    +
    +class ToggleButtonConfig
    +{
    +public:
    +  ToggleButtonConfig(WWidget *parent) : toggleJS_(0)
    +  {
    +    toggleJS_ = new JSlot(parent);
    +  }
    +
    +  ~ToggleButtonConfig() {
    +    delete toggleJS_;
    +  }
    +
    +  void addState(const std::string& className) {
    +    states_.push_back(className);
    +  }
    +
    +  void generate() {
    +    WApplication *app = WApplication::instance();
    +
    +    std::stringstream js;
    +    js << 
    +      "function(s, e) {"
    +      """var states = new Array(";
    +
    +    for (unsigned i = 0; i < states_.size(); ++i) {
    +      if (i != 0)
    +	js << ',';
    +      js << '\'' << states_[i] << '\'';
    +    }
    +
    +    js <<
    +      """), i, il;"
    +      """for (i=0; i<" << states_.size() << "; ++i) {"
    +      ""  "if (s.className == states[i]) {"
    +      "" << app->javaScriptClass() << ".emit(s, 't-'+s.className);"
    +      ""    "s.className = states[(i+1) % " << states_.size() << "];"
    +      ""    "break;"
    +      ""  "}"
    +      """}"
    +      "}";
    +    
    +    toggleJS_->setJavaScript(js.str());
    +  }
    +
    +  const std::vector<std::string>& states() const { return states_; }
    +
    +private:
    +  std::vector<std::string> states_;
    +  JSlot *toggleJS_;
    +
    +  friend class ToggleButton;
    +};
    +
    +class ToggleButton : public Wt::WText
    +{
    +public:
    +  ToggleButton(ToggleButtonConfig *config, WContainerWidget *parent = 0) 
    +    : WText(parent),
    +      config_(config)
    +  {
    +    setInline(false);
    +
    +    if (WApplication::instance()->environment().ajax()) {
    +      clicked().connect(*config_->toggleJS_);
    +
    +      for (unsigned i = 0; i < config_->states().size(); ++i)
    +	signals_.push_back(new JSignal<>(this, "t-" + config_->states()[i]));
    +    } else {
    +      clicked().connect(this, &ToggleButton::handleClick);
    +      for (unsigned i = 0; i < config_->states().size(); ++i)
    +	signals_.push_back(new Signal<>(this));
    +    }
    +  }
    +
    +  virtual ~ToggleButton() {
    +    for (unsigned i = 0; i < signals_.size(); ++i)
    +      delete signals_[i];
    +  }
    +
    +  SignalBase& signal(int i) { return *signals_[i]; }
    +
    +  void setState(int i)
    +  {
    +    setStyleClass(config_->states()[i]);
    +  }
    +
    +private:
    +  std::vector<SignalBase *> signals_;
    +  ToggleButtonConfig       *config_;
    +
    +  void handleClick() {
    +    for (unsigned i = 0; i < config_->states().size(); ++i)
    +      if (config_->states()[i] == styleClass().toUTF8()) {
    +	(dynamic_cast<Signal<> *>(signals_[i]))->emit();
    +	break;
    +      }
    +  }
    +};
    +
    +class RowSpacer : public Wt::WWebWidget
    +{
    +public:
    +  RowSpacer(Wt::WTreeViewNode *node, int height)
    +    : node_(node),
    +      height_(0)
    +  {
    +    resize(Wt::WLength::Auto, 0);
    +    setInline(false);
    +    setStyleClass("Wt-spacer");
    +  }
    +
    +  void setRows(int height, bool force = false);
    +
    +  int rows() const { return height_; }
    +  Wt::WTreeViewNode *node() const { return node_; }
    +
    +  int renderedRow(int lowerBound = 0,
    +		  int upperBound = std::numeric_limits<int>::max());
    +
    +protected:
    +  virtual Wt::DomElementType domElementType() const {
    +    return Wt::DomElement_DIV;
    +  }
    +
    +private:
    +  Wt::WTreeViewNode *node_;
    +  int height_;
    +};
    +
    +class WTreeViewNode : public WTable
    +{
    +public:
    +  WTreeViewNode(WTreeView *view, const WModelIndex& index,
    +		int childrenHeight, bool isLast, WTreeViewNode *parent);
    +  ~WTreeViewNode();
    +
    +  void update(int firstColumn, int lastColumn);
    +  void updateGraphics(bool isLast, bool isEmpty);
    +  void insertColumns(int column, int count);
    +  void removeColumns(int column, int count);
    +  bool isLast() const;
    +
    +  void rerenderSpacers();
    +
    +  const WModelIndex& modelIndex() const { return index_; }
    +  int childrenHeight() const { return childrenHeight_; }
    +  int renderedHeight();
    +  bool childrenLoaded() const { return childrenLoaded_; }
    +
    +  WWidget *widgetForModelRow(int row);
    +  WTreeViewNode *nextChildNode(WTreeViewNode *n);
    +
    +  bool isAllSpacer();
    +
    +  void setTopSpacerHeight(int rows);
    +  void addTopSpacerHeight(int rows);
    +  int topSpacerHeight();
    +
    +  void setBottomSpacerHeight(int rows);
    +  void addBottomSpacerHeight(int rows);
    +  int bottomSpacerHeight();
    +
    +  RowSpacer *topSpacer(bool create = false);
    +  RowSpacer *bottomSpacer(bool create = false);
    +
    +  WContainerWidget *childContainer();
    +
    +  void shiftModelIndexes(int start, int count);
    +
    +  WTreeViewNode *parentNode() const { return parentNode_; }
    +
    +  bool isExpanded();
    +
    +  void adjustChildrenHeight(int diff);
    +  void normalizeSpacers();
    +
    +  void selfCheck();
    +
    +  WTreeView *view() const { return view_; }
    +
    +  int renderedRow(int lowerBound = 0,
    +		  int upperBound = std::numeric_limits<int>::max());
    +  int renderedRow(WTreeViewNode *node,
    +		  int lowerBound = 0,
    +		  int upperBound = std::numeric_limits<int>::max());
    +
    +  void renderSelected(bool selected, int column);
    +
    +  void doExpand();
    +  void doCollapse();
    +
    +  WWidget *widget(int column);
    +
    +private:
    +  WTreeView     *view_;
    +  WModelIndex    index_;
    +  int            childrenHeight_;
    +  WTreeViewNode *parentNode_;
    +
    +  bool           childrenLoaded_;
    +  ToggleButton  *expandButton_;
    +  WText         *noExpandIcon_;
    +
    +  void loadChildren();
    +
    +  WModelIndex childIndex(int column);
    +
    +  void setWidget(int column, WWidget *w);
    +  void addColumnStyleClass(int column, WWidget *w);
    +};
    +
    +void RowSpacer::setRows(int height, bool force)
    +{
    +  if (height == 0)
    +    delete this;
    +  else
    +    if (force || height != height_) {
    +      height_ = height;
    +      resize(Wt::WLength::Auto, node_->view()->rowHeight() * height);
    +    }
    +}
    +
    +int RowSpacer::renderedRow(int lowerBound, int upperBound)
    +{
    +  Wt::WTreeViewNode *n = node();
    +
    +  int result = 0;
    +  if (this == n->bottomSpacer())
    +    result = n->childrenHeight() - n->bottomSpacerHeight();
    +
    +  if (result > upperBound)
    +    return result;
    +  else
    +    return result
    +      + n->renderedRow(lowerBound - result, upperBound - result);
    +}
    +
    +WTreeViewNode::WTreeViewNode(WTreeView *view, const WModelIndex& index,
    +			     int childrenHeight, bool isLast,
    +			     WTreeViewNode *parent)
    +  : view_(view),
    +    index_(index),
    +    childrenHeight_(childrenHeight),
    +    parentNode_(parent),
    +    childrenLoaded_(false),
    +    expandButton_(0),
    +    noExpandIcon_(0)
    +{
    +  setStyleClass("Wt-tv-node");
    +
    +  int selfHeight = 0;
    +
    +  if (index_ != view_->rootIndex() && !view->isExpanded(index_))
    +    rowAt(1)->hide();
    +
    +  bool needLoad = view_->isExpanded(index_);
    +
    +  if (needLoad) {
    +    childrenLoaded_ = true;
    +    if (childrenHeight_ == -1)
    +      childrenHeight_ = view_->subTreeHeight(index_) - selfHeight;
    +
    +    if (childrenHeight_ > 0)
    +      setTopSpacerHeight(childrenHeight_);
    +  } else
    +    childrenHeight_ = 0;
    +
    +  if (index_ != view_->rootIndex()) {
    +    elementAt(0, 1)->setStyleClass("c1 rh");
    +
    +    updateGraphics(isLast, view_->model()->rowCount(index_) == 0);
    +    insertColumns(0, view_->columnCount());
    +
    +    selfHeight = 1;
    +
    +    if (view_->selectionBehavior() == SelectRows && view_->isSelected(index_))
    +      renderSelected(true, 0);
    +  } else
    +    if (WApplication::instance()->environment().agentIsIE())
    +      elementAt(0, 0)->resize(1, WLength::Auto); 
    +
    +  view_->addRenderedNode(this);
    +}
    +
    +WTreeViewNode::~WTreeViewNode()
    +{
    +  view_->removeRenderedNode(this);
    +
    +  if (view_->isEditing()) {
    +    WModelIndex parent = index_.parent();
    +
    +    int thisNodeCount = view_->model()->columnCount(parent);
    +
    +    for (int i = 0; i < thisNodeCount; ++i) {
    +      WModelIndex child = childIndex(i);
    +
    +      if (view_->isEditing(child)) {
    +	boost::any editState = view_->itemDelegate(i)->editState(widget(i));
    +	view_->setEditState(child, editState);
    +	view_->setEditorWidget(child, 0);
    +      }
    +    }
    +  }
    +}
    +
    +void WTreeViewNode::update(int firstColumn, int lastColumn)
    +{
    +  WModelIndex parent = index_.parent();
    +
    +  int thisNodeCount = view_->model()->columnCount(parent);
    +
    +  for (int i = firstColumn; i <= lastColumn; ++i) {
    +    WModelIndex child = i < thisNodeCount ? childIndex(i) : WModelIndex();
    +
    +    WWidget *w = widget(i);
    +
    +    WFlags<ViewItemRenderFlag> renderFlags = 0;
    +    if (view_->selectionBehavior() == SelectItems && view_->isSelected(child))
    +      renderFlags |= RenderSelected;
    +
    +    if (view_->isEditing(child)) {
    +      renderFlags |= RenderEditing;
    +      if (view_->hasEditFocus(child))
    +	renderFlags |= RenderFocused;
    +    }
    +
    +    if (!view_->isValid(child)) {
    +      renderFlags |= RenderInvalid;
    +    }
    +    
    +    w = view_->itemDelegate(i)->update(w, child, renderFlags);
    +
    +    if (renderFlags & RenderEditing)
    +      view_->setEditorWidget(child, w);
    +
    +    if (!w->parent()) {
    +      setWidget(i, w);
    +
    +      /*
    +       * If we are creating a new editor, then reset its current edit
    +       * state.
    +       */
    +      if (renderFlags & RenderEditing) {
    +	boost::any state = view_->editState(child);
    +	if (!state.empty())
    +	  view_->itemDelegate(i)->setEditState(w, state);
    +      }
    +    } else
    +      addColumnStyleClass(i, w);
    +  }
    +}
    +
    +void WTreeViewNode::updateGraphics(bool isLast, bool isEmpty)
    +{
    +  if (index_ == view_->rootIndex())
    +    return;
    +
    +  if (index_.parent() == view_->rootIndex() && !view_->rootIsDecorated()) {
    +    delete expandButton_;
    +    expandButton_ = 0;
    +    delete noExpandIcon_;
    +    noExpandIcon_ = 0;
    +    elementAt(0, 0)->setStyleClass("c0");
    +    elementAt(1, 0)->setStyleClass("c0");
    +
    +    return;
    +  }
    +
    +  if (!isEmpty) {
    +    if (!expandButton_) {
    +      delete noExpandIcon_;
    +      noExpandIcon_ = 0;
    +      expandButton_ = new ToggleButton(view_->expandConfig_);
    +      if (WApplication::instance()->environment().agentIsIE())
    +	expandButton_->resize(19, WLength::Auto);
    +      elementAt(0, 0)->addWidget(expandButton_);
    +
    +      expandButton_->signal(0).connect(this, &WTreeViewNode::doExpand);
    +      expandButton_->signal(1).connect(this, &WTreeViewNode::doCollapse);
    +
    +      expandButton_->setState(isExpanded() ? 1 : 0);
    +    }
    +  } else {
    +    if (!noExpandIcon_) {
    +      delete expandButton_;
    +      expandButton_ = 0;
    +      noExpandIcon_ = new WText();
    +      noExpandIcon_->setInline(false);
    +      noExpandIcon_->setStyleClass("Wt-noexpand");
    +      if (WApplication::instance()->environment().agentIsIE())
    +	noExpandIcon_->resize(19, WLength::Auto);
    +      elementAt(0, 0)->addWidget(noExpandIcon_);
    +    }
    +  }
    +
    +  if (!isLast) {
    +    elementAt(0, 0)->setStyleClass("Wt-trunk c0");
    +    elementAt(1, 0)->setStyleClass("Wt-trunk c0");
    +  } else {
    +    elementAt(0, 0)->setStyleClass("Wt-end c0");
    +    elementAt(1, 0)->setStyleClass("c0");
    +  }
    +}
    +
    +void WTreeViewNode::insertColumns(int column, int count)
    +{
    +  WTableCell *tc = elementAt(0, 1);
    +  tc->clear();
    +
    +  if (view_->columnCount() > 1) {
    +    WContainerWidget *row = new WContainerWidget();
    +
    +    if (view_->column1Fixed_) {
    +      row->setStyleClass("Wt-tv-rowc rh");
    +      WContainerWidget *rowWrap = new WContainerWidget();
    +      rowWrap->addWidget(row);
    +      row = rowWrap;
    +    }
    +
    +    row->setObjectName("row");
    +    row->setStyleClass("Wt-tv-row rh");
    +    tc->insertWidget(0, row);
    +  }
    +
    +  update(0, view_->columnCount() - 1);
    +}
    +
    +void WTreeViewNode::removeColumns(int column, int count)
    +{
    +  insertColumns(0, 0);
    +}
    +
    +bool WTreeViewNode::isLast() const
    +{
    +  return index_ == view_->rootIndex()
    +    || (index_.row() == view_->model()->rowCount(index_.parent()) - 1);
    +}
    +
    +WModelIndex WTreeViewNode::childIndex(int column)
    +{
    +  return view_->model()->index(index_.row(), column, index_.parent());
    +}
    +
    +void WTreeViewNode::addColumnStyleClass(int column, WWidget *w)
    +{
    +  SStream s;
    +
    +  s << view_->columnStyleClass(column) << " Wt-tv-c rh "
    +    << w->styleClass().toUTF8();
    +
    +  w->setStyleClass(WString::fromUTF8(s.c_str()));
    +}
    +
    +void WTreeViewNode::setWidget(int column, WWidget *newW)
    +{
    +  WTableCell *tc = elementAt(0, 1);
    +
    +  WWidget *current = widget(column);
    +
    +  addColumnStyleClass(column, newW);
    +
    +  if (current)
    +    current->setStyleClass(WString::Empty);
    +
    +  if (column == 0) {
    +    if (current)
    +      tc->removeWidget(current);
    +
    +    newW->setInline(false);
    +    tc->addWidget(newW);
    +  } else {
    +    WContainerWidget *row = dynamic_cast<WContainerWidget *>(tc->widget(0));
    +    if (view_->column1Fixed_)
    +      row = dynamic_cast<WContainerWidget *>(row->widget(0));
    +
    +    if (current)
    +      row->removeWidget(current);
    +
    +    row->insertWidget(column - 1, newW);
    +  }
    +
    +  if (!WApplication::instance()->environment().ajax()) {
    +    WInteractWidget *wi = dynamic_cast<WInteractWidget *>(newW);
    +    if (wi)
    +      view_->clickedMapper_->mapConnect1(wi->clicked(), childIndex(column));
    +  }
    +}
    +
    +WWidget *WTreeViewNode::widget(int column)
    +{
    +  WTableCell *tc = elementAt(0, 1);
    +
    +  if (column == 0) {
    +    if (tc->count() > 0) {
    +      WWidget *result = tc->widget(tc->count() - 1);
    +      return (tc->count() > 1 || result->objectName() != "row") ? result : 0;
    +    } else
    +      return 0;
    +  } else {
    +    WContainerWidget *row = dynamic_cast<WContainerWidget *>(tc->widget(0));
    +
    +    if (view_->column1Fixed_)
    +      row = dynamic_cast<WContainerWidget *>(row->widget(0));
    +
    +    return row->count() >= column ? row->widget(column - 1) : 0;
    +  }
    +}
    +
    +void WTreeViewNode::doExpand()
    +{
    +  if (isExpanded())
    +    return;
    +
    +  loadChildren();
    +
    +  if (expandButton_)
    +    expandButton_->setState(1);
    +
    +  view_->expandedSet_.insert(index_);
    +
    +  rowAt(1)->show();
    +  if (parentNode())
    +    parentNode()->adjustChildrenHeight(childrenHeight_);
    +
    +  view_->adjustRenderedNode(this, renderedRow());
    +  view_->scheduleRerender(WTreeView::NeedAdjustViewPort);
    +
    +  view_->expanded_.emit(index_);
    +}
    +
    +void WTreeViewNode::doCollapse()
    +{
    +  if (!isExpanded())
    +    return;
    +
    +  if (expandButton_)
    +    expandButton_->setState(0);
    +
    +  view_->setCollapsed(index_);
    +
    +  rowAt(1)->hide();
    +  if (parentNode())
    +    parentNode()->adjustChildrenHeight(-childrenHeight_);
    +
    +  view_->renderedRowsChanged(renderedRow(), -childrenHeight_);
    +
    +  view_->collapsed_.emit(index_);
    +}
    +
    +bool WTreeViewNode::isExpanded()
    +{
    +  return index_ == view_->rootIndex() || !rowAt(1)->isHidden();
    +}
    +
    +void WTreeViewNode::normalizeSpacers()
    +{
    +  if (childrenLoaded_ && childContainer()->count() == 2) {
    +    RowSpacer *top = topSpacer();
    +    RowSpacer *bottom = bottomSpacer();
    +
    +    if (top && bottom && top != bottom) {
    +      top->setRows(top->rows() + bottom->rows());
    +      delete bottom;
    +    }
    +  }
    +}
    +
    +void WTreeViewNode::rerenderSpacers()
    +{
    +  RowSpacer *s = topSpacer();
    +  if (s)
    +    s->setRows(topSpacerHeight(), true);
    +
    +  s = bottomSpacer();
    +  if (s)
    +    s->setRows(bottomSpacerHeight(), true);
    +}
    +
    +bool WTreeViewNode::isAllSpacer()
    +{
    +  return childrenLoaded_ && topSpacer() && (topSpacer() == bottomSpacer());
    +}
    +
    +void WTreeViewNode::loadChildren()
    +{
    +  if (!childrenLoaded_) {
    +    childrenLoaded_ = true;
    +
    +    view_->expandedSet_.insert(index_);
    +    childrenHeight_ = view_->subTreeHeight(index_) - 1;
    +    view_->expandedSet_.erase(index_);
    +
    +    if (childrenHeight_ > 0)
    +      setTopSpacerHeight(childrenHeight_);
    +  }
    +}
    +
    +void WTreeViewNode::adjustChildrenHeight(int diff)
    +{
    +  childrenHeight_ += diff;
    +
    +  if (isExpanded()) {
    +    WTreeViewNode *parent = parentNode();
    +
    +    if (parent)
    +      parent->adjustChildrenHeight(diff);
    +    else
    +      view_->pageChanged().emit();
    +  }
    +}
    +
    +WContainerWidget *WTreeViewNode::childContainer()
    +{
    +  return elementAt(index_ == view_->rootIndex() ? 0 : 1, 1);
    +}
    +
    +WWidget *WTreeViewNode::widgetForModelRow(int modelRow)
    +{
    +  if (!childrenLoaded_)
    +    return 0;
    +
    +  WContainerWidget *c = childContainer();
    +
    +  int first = topSpacer() ? 1 : 0;
    +
    +  if (first < c->count()) {
    +    WTreeViewNode *n = dynamic_cast<WTreeViewNode *>(c->widget(first));
    +    if (n) {
    +      int row = topSpacerHeight();
    +      int index = first + (modelRow - row);
    +
    +      if (index < first)
    +	return topSpacer();
    +      else if (index < c->count())
    +	return c->widget(index);
    +      else
    +	return bottomSpacer();
    +    } else
    +      return bottomSpacer();
    +  } else // isAllSpacer()
    +    return topSpacer();
    +}
    +
    +void WTreeViewNode::shiftModelIndexes(int start, int offset)
    +{
    +  if (!childrenLoaded_)
    +    return;
    +
    +  WContainerWidget *c = childContainer();
    +
    +  int first, end, inc;
    +
    +  if (offset > 0) {
    +    first = c->count() - 1;
    +    end = -1;
    +    inc = -1;
    +  } else {
    +    first = 0;
    +    end = c->count();
    +    inc = 1;
    +  }
    +
    +  for (int i = first; i != end; i += inc) {
    +    WTreeViewNode *n = dynamic_cast<WTreeViewNode *>(c->widget(i));
    +
    +    if (n && n->modelIndex().row() >= start) {
    +      view_->removeRenderedNode(n);
    +
    +      n->index_ = view_->model()->index(n->modelIndex().row() + offset,
    +					n->modelIndex().column(), index_);
    +
    +      // update items through delegate
    +      int lastColumn = view_->columnCount() - 1;
    +      int thisNodeCount = view_->model()->columnCount(index_);
    +
    +      for (int j = 0; j <= lastColumn; ++j) {
    +	WModelIndex child = j < thisNodeCount
    +	  ? n->childIndex(j) : WModelIndex();
    +	view_->itemDelegate(j)->updateModelIndex(n->widget(j), child);
    +      }
    +
    +      view_->addRenderedNode(n);
    +    }
    +  }
    +}
    +
    +int WTreeViewNode::renderedHeight()
    +{
    +  return index_ == view_->rootIndex() ? childrenHeight_ :
    +    (1 + (isExpanded() ? childrenHeight_ : 0));
    +}
    +
    +int WTreeViewNode::topSpacerHeight()
    +{
    +  RowSpacer *s = topSpacer();
    +
    +  return s ? s->rows() : 0;
    +}
    +
    +void WTreeViewNode::setTopSpacerHeight(int rows)
    +{
    +  if (rows == 0)
    +    delete topSpacer();
    +  else
    +    topSpacer(true)->setRows(rows);
    +}
    +
    +void WTreeViewNode::addTopSpacerHeight(int rows)
    +{
    +  setTopSpacerHeight(topSpacerHeight() + rows);
    +}
    +
    +RowSpacer *WTreeViewNode::topSpacer(bool create)
    +{
    +  WContainerWidget *c = childContainer();
    +
    +  RowSpacer *result = 0;
    +  if (c->count() == 0 || !(result = dynamic_cast<RowSpacer *>(c->widget(0)))) {
    +    if (!create)
    +      return 0;
    +    else {
    +      result = new RowSpacer(this, 0);
    +      c->insertWidget(0, result);
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +int WTreeViewNode::bottomSpacerHeight()
    +{
    +  RowSpacer *s = bottomSpacer();
    +
    +  return s ? s->rows() : 0;
    +}
    +
    +void WTreeViewNode::setBottomSpacerHeight(int rows)
    +{
    +  if (!rows)
    +    delete bottomSpacer();
    +  else
    +    bottomSpacer(true)->setRows(rows);
    +}
    +
    +void WTreeViewNode::addBottomSpacerHeight(int rows)
    +{
    +  setBottomSpacerHeight(bottomSpacerHeight() + rows);
    +}
    +
    +RowSpacer *WTreeViewNode::bottomSpacer(bool create)
    +{
    +  WContainerWidget *c = childContainer();
    +
    +  RowSpacer *result = 0;
    +  if (c->count() == 0
    +      || !(result = dynamic_cast<RowSpacer *>(c->widget(c->count() - 1)))) {
    +    if (!create)
    +      return 0;
    +    else {
    +      result = new RowSpacer(this, 0);
    +      c->addWidget(result);
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +WTreeViewNode *WTreeViewNode::nextChildNode(WTreeViewNode *prev)
    +{
    +  if (!childrenLoaded_)
    +    return 0;
    +
    +  WContainerWidget *c = childContainer();
    +
    +  int nextI = prev ? c->indexOf(prev) + 1 : topSpacer() ? 1 : 0;
    +
    +  if (nextI < c->count())
    +    return dynamic_cast<WTreeViewNode *>(c->widget(nextI));
    +  else
    +    return 0;
    +}
    +
    +int WTreeViewNode::renderedRow(int lowerBound, int upperBound)
    +{
    +  if (!parentNode_)
    +    return 0;
    +  else {
    +    int result = parentNode_->renderedRow(0, upperBound);
    +
    +    if (result > upperBound)
    +      return result;
    +
    +    return result
    +      + parentNode_->renderedRow(this, lowerBound - result,
    +				 upperBound - result);
    +  }
    +}
    +
    +int WTreeViewNode::renderedRow(WTreeViewNode *node,
    +			       int lowerBound, int upperBound)
    +{
    +  if (renderedHeight() < lowerBound)
    +    return renderedHeight();
    +
    +  int result = topSpacerHeight();
    +
    +  if (result > upperBound)
    +    return result;
    +
    +  for (WTreeViewNode *c = nextChildNode(0); c; c = nextChildNode(c)) {
    +    if (c == node)
    +      return result;
    +    else {
    +      result += c->renderedHeight();
    +      if (result > upperBound)
    +	return result;
    +    }
    +  }
    +
    +  assert(false);
    +  return 0;
    +}
    +
    +void WTreeViewNode::renderSelected(bool selected, int column)
    +{
    +  if (view_->selectionBehavior() == SelectRows)
    +    rowAt(0)->setStyleClass(selected ? "Wt-selected" : "");
    +  else {
    +    WWidget *w = widget(column);
    +    if (selected)
    +      w->addStyleClass(WT_USTRING::fromUTF8("Wt-selected"));
    +    else
    +      w->removeStyleClass(WT_USTRING::fromUTF8("Wt-selected"));
    +  }
    +}
    +
    +void WTreeViewNode::selfCheck()
    +{
    +  assert(renderedHeight() == view_->subTreeHeight(index_));
    +
    +  int childNodesHeight = 0;
    +  for (WTreeViewNode *c = nextChildNode(0); c; c = nextChildNode(c)) {
    +    c->selfCheck();
    +    childNodesHeight += c->renderedHeight();
    +  }
    +
    +  if (childNodesHeight == 0) {
    +    assert(topSpacer() == bottomSpacer());
    +    assert(topSpacerHeight() == childrenHeight());
    +  } else {
    +    assert(topSpacerHeight() + childNodesHeight + bottomSpacerHeight()
    +	   == childrenHeight());
    +  }
    +}
    +
    +WTreeView::WTreeView(WContainerWidget *parent)
    +  : WAbstractItemView(parent),
    +    renderedNodesAdded_(false),
    +    rootNode_(0),
    +    borderColorRule_(0),
    +    rootIsDecorated_(true),
    +    column1Fixed_(false),
    +    collapsed_(this),
    +    expanded_(this),
    +    viewportTop_(0),
    +    viewportHeight_(30),
    +    nodeLoad_(0),
    +    headerContainer_(0),
    +    contentsContainer_(0),
    +    scrollBarC_(0),
    +    itemEvent_(impl_, "itemEvent")
    +{
    +  setSelectable(false);
    +
    +  expandConfig_ = new ToggleButtonConfig(this);
    +  expandConfig_->addState("Wt-expand");
    +  expandConfig_->addState("Wt-collapse");
    +  expandConfig_->generate();
    +
    +  itemEvent_.connect(this, &WTreeView::onItemEvent);
    +
    +  setStyleClass("Wt-treeview");
    +
    +  const char *CSS_RULES_NAME = "Wt::WTreeView";
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->styleSheet().isDefined(CSS_RULES_NAME)) {
    +    /* header */
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-headerdiv",
    +       "-moz-user-select: none;"
    +       "-khtml-user-select: none;"
    +       "user-select: none;"
    +       "overflow: hidden;"
    +       "width: 100%;", CSS_RULES_NAME);
    +
    +    if (app->environment().agentIsIE())
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-header .Wt-label",
    +	 "zoom: 1;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview table", "width: 100%");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .c1", "width: 100%; overflow: hidden;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .c0",
    +       "width: 19px; vertical-align: middle");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-row", "float: right; overflow: hidden;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-row .Wt-tv-c",
    +       "display: block; float: left;"
    +       "padding: 0px 3px;"
    +       "text-overflow: ellipsis;"
    +       "overflow: hidden;"
    +       "white-space: nowrap;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-c",
    +       "padding: 0px 3px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview img.icon, .Wt-treeview input.icon",
    +       "margin: 0px 3px 2px 0px; vertical-align: middle");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-node img.w0",
    +       "width: 0px; margin: 0px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-node .c0 img, .Wt-treeview .Wt-tv-node .c0 input",
    +       "margin-right: 0px; margin: -4px 0px;");
    +
    +    /* resize handles */
    +    app->styleSheet().addRule
    +      (".Wt-treeview div.Wt-tv-rh",
    +       "float: right; width: 4px; cursor: col-resize;"
    +       "padding-left: 0px;");
    +
    +    if (app->environment().agentIsIE()) {
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-header .Wt-tv-c",
    +	 "padding: 0px;"
    +	 "padding-left: 7px;");
    +    } else
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-header .Wt-tv-c",
    +	 "padding: 0px;"
    +	 "margin-left: 7px;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-rh:hover",
    +       "background-color: #DDDDDD;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview div.Wt-tv-rhc0",
    +       "float: left; width: 4px;");
    +
    +    /* borders: needed here for IE */
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-br, "                      // header
    +       ".Wt-treeview .Wt-tv-node .Wt-tv-row .Wt-tv-c", // data
    +       "margin-right: 0px; border-right: 1px solid white;");
    +
    +    /* sort handles */
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-sh", std::string() +
    +       "float: right; width: 16px; height: 16px; padding-bottom: 6px;"
    +       "cursor: pointer; cursor:hand;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-sh-nrh", std::string() + 
    +       "float: right; width: 16px; height: 16px;"
    +       "cursor: pointer; cursor:hand;");
    +
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-tv-shc0", "float: left;");
    +
    +    /* bottom scrollbar */
    +    if (app->environment().agentIsWebKit() || app->environment().agentIsOpera())
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-tv-rowc", "position: relative;");
    +
    +    if (app->environment().agentIsIE())
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-scroll",
    +	 "position: absolute; overflow-x: auto;"
    +	 "height: " SCROLLBAR_WIDTH_TEXT "px;");
    +    else
    +      app->styleSheet().addRule
    +	(".Wt-treeview .Wt-scroll", "overflow: auto;"
    +	 "height: " SCROLLBAR_WIDTH_TEXT "px;");
    +    app->styleSheet().addRule
    +      (".Wt-treeview .Wt-scroll div", "height: 1px;");
    +  }
    +
    +  setColumnBorder(white);
    +
    +  app->styleSheet().addRule("#" + id() + " .cwidth", "");
    +
    +  rowHeightRule_ = new WCssTemplateRule("#" + id() + " .rh");
    +  app->styleSheet().addRule(rowHeightRule_);
    +
    +  rowWidthRule_ = new WCssTemplateRule("#" + id() + " .Wt-tv-row");
    +  app->styleSheet().addRule(rowWidthRule_);
    +
    +  rowContentsWidthRule_ = new WCssTemplateRule("#" + id() +" .Wt-tv-rowc");
    +  app->styleSheet().addRule(rowContentsWidthRule_);
    +
    +  app->addAutoJavaScript
    +    ("{var obj = $('#" + id() + "').data('obj');"
    +     "if (obj) obj.autoJavaScript();}");
    +
    +  if (parent)
    +    parent->addWidget(this);
    +
    +  setup();
    +}
    +
    +void WTreeView::setup()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  impl_->clear();
    +
    +  rootNode_ = 0;
    +
    +  /*
    +   * Setup main layout
    +   */
    +  headers_ = new WContainerWidget();
    +  headers_->setStyleClass("Wt-headerdiv headerrh");
    +
    +  contents_ = new WContainerWidget();
    +  WContainerWidget *wrapRoot = new WContainerWidget();
    +  contents_->addWidget(wrapRoot);
    +
    +  if (app->environment().agentIsIE()) {
    +    wrapRoot->setAttributeValue("style", "zoom: 1");
    +    contents_->setAttributeValue("style", "zoom: 1");
    +  }
    +
    +  if (app->environment().ajax()) {
    +    impl_->setPositionScheme(Relative);
    +
    +    WVBoxLayout *layout = new WVBoxLayout();
    +    layout->setSpacing(0);
    +    layout->setContentsMargins(0, 0, 0, 0);
    +
    +    headerContainer_ = new WContainerWidget();
    +    headerContainer_->setOverflow(WContainerWidget::OverflowHidden);
    +    headerContainer_->setStyleClass("Wt-header headerrh cwidth");
    +    headerContainer_->addWidget(headers_);
    +
    +    contentsContainer_ = new WContainerWidget();
    +    contentsContainer_->setStyleClass("cwidth");
    +    contentsContainer_->setOverflow(WContainerWidget::OverflowAuto);
    +    contentsContainer_->scrolled().connect(this, &WTreeView::onViewportChange);
    +    contentsContainer_->scrolled().connect
    +      ("function(obj, event) {"
    +       "" + headerContainer_->jsRef() + ".scrollLeft=obj.scrollLeft;"
    +       /* the following is a workaround for IE7 */
    +       """var t = " + contents_->jsRef() + ".firstChild;"
    +       """var h = " + headers_->jsRef() + ";"
    +       """h.style.width = (t.offsetWidth - 1) + 'px';"
    +       """h.style.width = t.offsetWidth + 'px';"
    +       "}");
    +    contentsContainer_->addWidget(contents_);
    +
    +    layout->addWidget(headerContainer_);
    +    layout->addWidget(contentsContainer_, 1);
    +
    +    impl_->setLayout(layout);
    +  } else {
    +    contentsContainer_ = new WContainerWidget();
    +    contentsContainer_->addWidget(contents_);
    +    contentsContainer_->setOverflow(WContainerWidget::OverflowHidden);
    +
    +    impl_->setPositionScheme(Relative);
    +    contentsContainer_->setPositionScheme(Relative);
    +    contents_->setPositionScheme(Relative);
    +
    +    impl_->addWidget(headers_);
    +    impl_->addWidget(contentsContainer_);
    +
    +    viewportHeight_ = 1000;
    +
    +    resize(width(), height());
    +  }
    +
    +  setRowHeight(rowHeight());
    +}
    +
    +void WTreeView::defineJavaScript()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  if (!app->environment().ajax())
    +    return;
    +
    +  const char *THIS_JS = "js/WTreeView.js";
    +
    +  if (!app->javaScriptLoaded(THIS_JS)) {
    +    LOAD_JAVASCRIPT(app, THIS_JS, "WTreeView", wtjs1);
    +    app->setJavaScriptLoaded(THIS_JS);
    +  }
    +
    +  app->doJavaScript("new " WT_CLASS ".WTreeView("
    +		    + app->javaScriptClass() + "," + jsRef() + ","
    +		    + contentsContainer_->jsRef() + ","
    +		    + headerContainer_->jsRef() + ","
    +		    + (column1Fixed_ ? "true" : "false") + ");");
    +}
    +
    +void WTreeView::setColumn1Fixed(bool fixed)
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  // This kills progressive enhancement too
    +  if (!app->environment().ajax())
    +    return;
    +
    +  if (fixed && !column1Fixed_) {
    +    column1Fixed_ = fixed;
    +
    +    setStyleClass("Wt-treeview column1");
    +    WContainerWidget *rootWrap
    +      = dynamic_cast<WContainerWidget *>(contents_->widget(0));
    +    rootWrap->resize(WLength(100, WLength::Percentage), WLength::Auto);
    +    rootWrap->setOverflow(WContainerWidget::OverflowHidden);
    +
    +    // needed for IE, otherwise row expands automatically to content width
    +    rowWidthRule_->templateWidget()->resize(0, WLength::Auto);
    +
    +    bool useStyleLeft
    +      = app->environment().agentIsWebKit()
    +      || app->environment().agentIsOpera();
    +
    +    if (useStyleLeft)
    +      tieRowsScrollJS_.setJavaScript
    +	("function(obj, event) {"
    +	 "" WT_CLASS ".getCssRule('#" + id() + " .Wt-tv-rowc').style.left"
    +	 ""  "= -obj.scrollLeft + 'px';"
    +	 "}");
    +    else {
    +      /*
    +       * this is for some reason very very slow in webkit, and with
    +       * application/xml on Firefox (jQuery suffers)
    +       */
    +      tieRowsScrollJS_.setJavaScript
    +	("function(obj, event) {"
    +	 "obj.parentNode.style.width = "
    +	 "" WT_CLASS ".getCssRule('#" + id() + " .cwidth').style.width;"
    +	 "$('#" + id() + " .Wt-tv-rowc').parent().scrollLeft(obj.scrollLeft);"
    +	 "}");
    +    }
    +
    +    WContainerWidget *scrollBarContainer = new WContainerWidget();
    +    scrollBarContainer->setStyleClass("cwidth");
    +    scrollBarContainer->resize(WLength::Auto, SCROLLBAR_WIDTH);
    +    scrollBarC_ = new WContainerWidget(scrollBarContainer);
    +    scrollBarC_->setStyleClass("Wt-tv-row Wt-scroll");
    +    scrollBarC_->scrolled().connect(tieRowsScrollJS_);
    +
    +    if (app->environment().agentIsIE()) {
    +      scrollBarContainer->setPositionScheme(Relative);
    +      scrollBarC_->setAttributeValue("style", "right: 0px");
    +      // and still it doesn't work properly...
    +    }
    +
    +    WContainerWidget *scrollBar = new WContainerWidget(scrollBarC_);
    +    scrollBar->setStyleClass("Wt-tv-rowc");
    +    if (useStyleLeft)
    +      scrollBar->setAttributeValue("style", "left: 0px;");
    +    impl_->layout()->addWidget(scrollBarContainer);
    +  }
    +}
    +
    +WTreeView::~WTreeView()
    +{ 
    +  delete expandConfig_;
    +  delete rowHeightRule_;
    +
    +  impl_->clear();
    +}
    +
    +std::string WTreeView::columnStyleClass(int column) const
    +{
    +  return columnInfo(column).styleClass();
    +}
    +
    +#ifndef WT_DEPRECATED_3_0_0
    +void WTreeView::setColumnFormat(int column, const WT_USTRING& format)
    +{
    +  ColumnInfo& info = columnInfo(column);
    +
    +  WItemDelegate *id;
    +  if (info.itemDelegate_)
    +    id = dynamic_cast<WItemDelegate *>(info.itemDelegate_);
    +  else
    +    info.itemDelegate_ = id = new WItemDelegate(this);
    +
    +  if (id)
    +    id->setTextFormat(format);
    +}
    +
    +WT_USTRING WTreeView::columnFormat(int column) const
    +{
    +  ColumnInfo& info = columnInfo(column);
    +  if (info.itemDelegate_) {
    +    WItemDelegate *id = dynamic_cast<WItemDelegate *>(info.itemDelegate_);
    +    return id ? id->textFormat() : WT_USTRING();
    +  } else
    +    return WT_USTRING();
    +}
    +#endif // WT_DEPRECATED_3_0_0
    +
    +void WTreeView::setColumnWidth(int column, const WLength& width)
    +{
    +  columnInfo(column).width = width;
    +
    +  WWidget *toResize = columnInfo(column).styleRule->templateWidget();
    +  toResize->resize(0, WLength::Auto);
    +  toResize->resize(width.toPixels(), WLength::Auto);
    +
    +  WApplication *app = WApplication::instance();
    +
    +  if (app->environment().ajax() && renderState_ < NeedRerenderHeader)
    +    app->doJavaScript("$('#" + id() + "').data('obj').adjustColumns();");
    +
    +  if (!app->environment().ajax() && column == 0 && !width.isAuto()) {
    +    double total = 0;
    +    for (int i = 0; i < columnCount(); ++i)
    +      if (!columnInfo(i).hidden)
    +	total += columnWidth(i).toPixels();
    +
    +    resize(total, height());
    +  }
    +}
    +
    +void WTreeView::setColumnHidden(int column, bool hidden)
    +{
    +  if (columnInfo(column).hidden != hidden) {
    +    WAbstractItemView::setColumnHidden(column, hidden);
    +
    +    WWidget *toHide = columnInfo(column).styleRule->templateWidget();
    +    toHide->setHidden(hidden);
    +
    +    setColumnWidth(column, columnWidth(column));
    +  }
    +}
    +
    +void WTreeView::setColumnBorder(const WColor& color)
    +{
    +  delete borderColorRule_;
    +  borderColorRule_
    +    = new WCssTextRule
    +    (".Wt-treeview .Wt-tv-br, "             // header columns 1-n
    +     ".Wt-treeview .header .Wt-tv-row, "    // header column 0
    +     ".Wt-treeview .Wt-tv-node .Wt-tv-row .Wt-tv-c, "   // data columns 1-n
    +     ".Wt-treeview .Wt-tv-node .Wt-tv-row", // data column 0
    +     "border-color: " + color.cssText());
    +  WApplication::instance()->styleSheet().addRule(borderColorRule_);
    +}
    +
    +void WTreeView::setRootIsDecorated(bool show)
    +{
    +  rootIsDecorated_ = show;
    +}
    +
    +void WTreeView::setAlternatingRowColors(bool enable)
    +{
    +  WAbstractItemView::setAlternatingRowColors(enable);
    +  setRootNodeStyle();
    +}
    +
    +void WTreeView::setRootNodeStyle()
    +{
    +  if (!rootNode_)
    +    return;
    +
    +  if (alternatingRowColors())
    +    rootNode_->decorationStyle().setBackgroundImage
    +      (WApplication::resourcesUrl()
    +       + "themes/" + WApplication::instance()->cssTheme()
    +       + "/stripes/stripe-" + boost::lexical_cast<std::string>
    +       (static_cast<int>(rowHeight().toPixels())) + "px.gif");
    +   else
    +     rootNode_->decorationStyle().setBackgroundImage("");
    + }
    +
    +void WTreeView::setRowHeight(const WLength& rowHeight)
    +{
    +  WAbstractItemView::setRowHeight(rowHeight);
    +
    +  rowHeightRule_->templateWidget()->resize(WLength::Auto, rowHeight);
    +  rowHeightRule_->templateWidget()->setLineHeight(rowHeight);
    +
    +  if (!WApplication::instance()->environment().ajax() && !height().isAuto())
    +    viewportHeight_ = static_cast<int>(contentsContainer_->height().toPixels()
    +				       / rowHeight.toPixels());
    +
    +  setRootNodeStyle();
    +
    +  for (NodeMap::const_iterator i = renderedNodes_.begin();
    +       i != renderedNodes_.end(); ++i)
    +    i->second->rerenderSpacers();
    +
    +  if (rootNode_)
    +    scheduleRerender(NeedAdjustViewPort);
    +}
    +
    +void WTreeView::setHeaderHeight(const WLength& height, bool multiLine)
    +{
    +  WAbstractItemView::setHeaderHeight(height, multiLine);
    +
    +  if (renderState_ >= NeedRerenderHeader)
    +    return;
    +
    +  // XX: cannot do it for column 0!
    +  if (!WApplication::instance()->environment().agentIsIE())
    +    for (int i = 1; i < columnCount(); ++i)
    +      headerTextWidget(i)->setWordWrap(multiLine);
    +}
    +
    +void WTreeView::resize(const WLength& width, const WLength& height)
    +{
    +  WApplication *app = WApplication::instance();
    +  WLength w = app->environment().ajax() ? WLength::Auto : width;
    +
    +  contentsContainer_->resize(w, WLength::Auto);
    +  
    +  if (headerContainer_)
    +    headerContainer_->resize(w, WLength::Auto);
    +
    +  if (!height.isAuto()) {
    +    if (!app->environment().ajax()) {
    +      if (impl_->count() < 3)
    +	impl_->addWidget(createPageNavigationBar());
    +
    +      double navigationBarHeight = 25;
    +      double headerHeight = this->headerHeight().toPixels();
    +
    +      contentsContainer_->resize(width, height.toPixels()
    +				 - navigationBarHeight - headerHeight);
    +      viewportHeight_
    +	= static_cast<int>(contentsContainer_->height().toPixels()
    +			   / rowHeight().toPixels());
    +    } else
    +      viewportHeight_ = static_cast<int>
    +	(std::ceil(height.toPixels() / rowHeight().toPixels()));
    +  } else {
    +    if (app->environment().ajax())
    +      viewportHeight_ = 30;
    +
    +    scheduleRerender(NeedAdjustViewPort);
    +  }
    +
    +  WCompositeWidget::resize(width, height);
    +}
    +
    +int WTreeView::calcOptimalFirstRenderedRow() const
    +{
    +  if (WApplication::instance()->environment().ajax())
    +    return std::max(0, viewportTop_ - viewportHeight_ - viewportHeight_ / 2);
    +  else
    +    return viewportTop_;
    +}
    +
    +int WTreeView::calcOptimalRenderedRowCount() const
    +{
    +  if (WApplication::instance()->environment().ajax())
    +    return 4 * viewportHeight_;
    +  else
    +    return viewportHeight_ + 5; // some margin... something inaccurate going on?
    +}
    +
    +void WTreeView::setModel(WAbstractItemModel *model)
    +{
    +  WAbstractItemView::setModel(model);
    +
    +  /* connect slots to new model */
    +  modelConnections_.push_back(model->columnsInserted().connect
    +			      (this, &WTreeView::modelColumnsInserted));
    +  modelConnections_.push_back(model->columnsAboutToBeRemoved().connect
    +			      (this, &WTreeView::modelColumnsAboutToBeRemoved));
    +  modelConnections_.push_back(model->columnsRemoved().connect
    +			      (this, &WTreeView::modelColumnsRemoved));
    +  modelConnections_.push_back(model->rowsInserted().connect
    +			      (this, &WTreeView::modelRowsInserted));
    +  modelConnections_.push_back(model->rowsAboutToBeRemoved().connect
    +			      (this, &WTreeView::modelRowsAboutToBeRemoved));
    +  modelConnections_.push_back(model->rowsRemoved().connect
    +			      (this, &WTreeView::modelRowsRemoved));
    +  modelConnections_.push_back(model->dataChanged().connect
    +			      (this, &WTreeView::modelDataChanged));
    +  modelConnections_.push_back(model->headerDataChanged().connect
    +			      (this, &WTreeView::modelHeaderDataChanged));
    +  modelConnections_.push_back(model->layoutAboutToBeChanged().connect
    +			      (this, &WTreeView::modelLayoutAboutToBeChanged));
    +  modelConnections_.push_back(model->layoutChanged().connect
    +			      (this, &WTreeView::modelLayoutChanged));
    +  modelConnections_.push_back(model->modelReset().connect
    +			      (this, &WTreeView::modelReset));
    +
    +  expandedSet_.clear();
    +
    +  while (static_cast<int>(columns_.size()) > model->columnCount()) {
    +    delete columns_.back().styleRule;
    +    columns_.erase(columns_.begin() + columns_.size() - 1);
    +  }
    +
    +  pageChanged().emit();
    +}
    +
    +void WTreeView::scheduleRerender(RenderState what)
    +{
    +  if (what == NeedRerender || what == NeedRerenderData) {
    +    delete rootNode_;
    +    rootNode_ = 0;
    +  }
    +
    +  WAbstractItemView::scheduleRerender(what);
    +}
    +
    +void WTreeView::render(WFlags<RenderFlag> flags)
    +{
    +  if (flags & RenderFull)
    +    defineJavaScript();
    +
    +  while (renderState_ != RenderOk) {
    +    RenderState s = renderState_;
    +    renderState_ = RenderOk;
    +
    +    switch (s) {
    +    case NeedRerender:
    +      rerenderHeader();
    +      rerenderTree();
    +      break;
    +    case NeedRerenderHeader:
    +      rerenderHeader();
    +      break;
    +    case NeedRerenderData:
    +      rerenderTree();
    +      break;
    +    case NeedAdjustViewPort:
    +      adjustToViewport();
    +      break;
    +    default:
    +      break;
    +    }
    +  }
    +
    +
    +  if (column1Fixed_ && renderedNodesAdded_) {
    +    WApplication::instance()->doJavaScript
    +      ("{var s=" + scrollBarC_->jsRef() + ";"
    +       """if (s) {" + tieRowsScrollJS_.execJs("s") + "}"
    +       "}");
    +    renderedNodesAdded_ = false;
    +  }
    +
    +  WAbstractItemView::render(flags);
    +}
    +
    +void WTreeView::rerenderHeader()
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  for (int i = 0; i < columnCount(); ++i) {
    +    WWidget *w = columnInfo(i).extraHeaderWidget;
    +    if (!w)
    +      columnInfo(i).extraHeaderWidget = createExtraHeaderWidget(i);
    +    else
    +      dynamic_cast<WContainerWidget *>(w->parent())->removeWidget(w);
    +  }
    +
    +  headers_->clear();
    +
    +  WContainerWidget *row = new WContainerWidget(headers_);
    +  row->setFloatSide(Right);
    +
    +  if (column1Fixed_) {
    +    row->setStyleClass("Wt-tv-row headerrh background");
    +    row = new WContainerWidget(row);
    +    row->setStyleClass("Wt-tv-rowc headerrh");
    +  } else
    +    row->setStyleClass("Wt-tv-row");
    +
    +  for (int i = 0; i < columnCount(); ++i) {
    +    WWidget *w = createHeaderWidget(app, i);
    +
    +    if (i != 0) {
    +      w->setFloatSide(Left);
    +      row->addWidget(w);
    +    } else
    +      headers_->addWidget(w);
    +  }
    +
    +  if (app->environment().ajax())
    +    app->doJavaScript("$('#" + id() + "').data('obj').adjustColumns();");
    +
    +  if (model())
    +    modelHeaderDataChanged(Horizontal, 0, columnCount() - 1);
    +}
    +
    +void WTreeView::enableAjax()
    +{
    +  setup();
    +  defineJavaScript();
    +
    +  rerenderHeader();
    +  rerenderTree();
    +
    +  WCompositeWidget::enableAjax();
    +}
    +
    +void WTreeView::rerenderTree()
    +{
    +  WContainerWidget *wrapRoot
    +    = dynamic_cast<WContainerWidget *>(contents_->widget(0));
    +
    +  wrapRoot->clear();
    +
    +  firstRenderedRow_ = calcOptimalFirstRenderedRow();
    +  validRowCount_ = 0;
    +
    +  rootNode_ = new WTreeViewNode(this, rootIndex(), -1, true, 0);
    +  rootNode_->resize(WLength(100, WLength::Percentage), 1);
    +
    +  if (WApplication::instance()->environment().ajax()) {
    +    connectObjJS(rootNode_->clicked(), "click");
    +    connectObjJS(rootNode_->doubleClicked(), "dblClick");
    +    if (mouseWentDown().isConnected() || dragEnabled_)
    +      connectObjJS(rootNode_->mouseWentDown(), "mouseDown");
    +    if (mouseWentUp().isConnected())
    +      connectObjJS(rootNode_->mouseWentUp(), "mouseUp");
    +  }
    +
    +  setRootNodeStyle();
    +
    +  wrapRoot->addWidget(rootNode_);
    +
    +  pageChanged().emit();
    +
    +  adjustToViewport();
    +}
    +
    +void WTreeView::onViewportChange(WScrollEvent e)
    +{
    +  viewportTop_ = static_cast<int>
    +    (std::floor(e.scrollY() / rowHeight().toPixels()));
    +
    +  viewportHeight_ = static_cast<int>
    +    (std::ceil(e.viewportHeight() / rowHeight().toPixels()));
    +
    +  scheduleRerender(NeedAdjustViewPort);
    +}
    +
    +void WTreeView::onItemEvent(std::string nodeId, int columnId, std::string type,
    +			    std::string extra1, std::string extra2,
    +			    WMouseEvent event)
    +{
    +  int column = (columnId == 0 ? 0 : -1);
    +  for (unsigned i = 0; i < columns_.size(); ++i)
    +    if (columns_[i].id == columnId) {
    +      column = i;
    +      break;
    +    }
    +
    +  if (column == -1)
    +    return; // illegal column Id
    +
    +  WModelIndex c0index;
    +  for (NodeMap::const_iterator i = renderedNodes_.begin();
    +       i != renderedNodes_.end(); ++i) {
    +    if (i->second->id() == nodeId) {
    +      c0index = i->second->modelIndex();
    +      break;
    +    }
    +  }
    +
    +  if (!c0index.isValid()) {
    +    std::cerr << "Warning (error?): illegal id in WTreeView::onItemEvent()"
    +	      << std::endl;
    +    return; // illegal node Id
    +  }
    +
    +  WModelIndex index = model()->index(c0index.row(), column, c0index.parent());
    +
    +  if (type == "clicked") {
    +    handleClick(index, event);
    +  } else if (type == "dblclicked") {
    +    handleDoubleClick(index, event);
    +  } else if (type == "mousedown") {
    +    mouseWentDown().emit(index, event);
    +  } else if (type == "mouseup") {
    +    mouseWentUp().emit(index, event);
    +  } else if (type == "drop") {
    +    WDropEvent e(WApplication::instance()->decodeObject(extra1), extra2, event);
    +    dropEvent(e, index);
    +  }
    +}
    +
    +int WTreeView::subTreeHeight(const WModelIndex& index,
    +			     int lowerBound, int upperBound)
    +{
    +  int result = 0;
    +
    +  if (index != rootIndex())
    +    ++result;
    +
    +  if (result >= upperBound)
    +    return result;
    +
    +  if (isExpanded(index)) {
    +    int childCount = model()->rowCount(index);
    +
    +    for (int i = 0; i < childCount; ++i) {
    +      WModelIndex childIndex = model()->index(i, 0, index);
    +
    +      result += subTreeHeight(childIndex, upperBound - result);
    +
    +      if (result >= upperBound)
    +	return result;
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +bool WTreeView::isExpanded(const WModelIndex& index) const
    +{
    +  return index == rootIndex()
    +    || expandedSet_.find(index) != expandedSet_.end();
    +}
    +
    +void WTreeView::setCollapsed(const WModelIndex& index)
    +{
    +  expandedSet_.erase(index);
    +
    +  bool selectionHasChanged = false;
    +  WModelIndexSet& selection = selectionModel()->selection_;
    +
    +  for (WModelIndexSet::iterator it = selection.lower_bound(index);
    +       it != selection.end();) {    
    +    /*
    +     * The following is needed because internalSelect(Deselect) will remove
    +     * the iterated element
    +     */
    +#ifndef WT_TARGET_JAVA
    +    WModelIndexSet::iterator n = it;
    +    ++n;
    +#endif
    +
    +    WModelIndex i = *it;
    +    if (i == index) {
    +    } else if (WModelIndex::isAncestor(i, index)) {
    +      if (internalSelect(i, Deselect))
    +	selectionHasChanged = true;
    +    } else
    +      break;
    +
    +#ifndef WT_TARGET_JAVA
    +    it = n;
    +#endif
    +  }
    +
    +  if (selectionHasChanged)
    +    selectionChanged().emit();
    +}
    +
    +void WTreeView::setExpanded(const WModelIndex& index, bool expanded)
    +{
    +  if (isExpanded(index) != expanded) {
    +    WWidget *w = widgetForIndex(index);
    +
    +    WTreeViewNode *node = w ? dynamic_cast<WTreeViewNode *>(w) : 0;
    +
    +    if (node) {
    +      if (expanded)
    +	node->doExpand();
    +      else
    +	node->doCollapse();
    +    } else {
    +      if (expanded)
    +	expandedSet_.insert(index);
    +      else
    +	setCollapsed(index);
    +
    +      if (w) {
    +	RowSpacer *spacer = dynamic_cast<RowSpacer *>(w);
    +
    +	int height = subTreeHeight(index);
    +	int diff = subTreeHeight(index) - height;
    +
    +	spacer->setRows(spacer->rows() + diff);
    +	spacer->node()->adjustChildrenHeight(diff);
    +
    +	renderedRowsChanged(renderedRow(index, spacer,
    +					renderLowerBound(), renderUpperBound()),
    +			    diff);
    +      }
    +    }
    +  }
    +}
    +
    +void WTreeView::expand(const WModelIndex& index)
    +{
    +  setExpanded(index, true);
    +}
    +
    +void WTreeView::collapse(const WModelIndex& index)
    +{
    +  setExpanded(index, false);
    +}
    +
    +void WTreeView::expandToDepth(int depth)
    +{
    +  if (depth > 0)
    +    expandChildrenToDepth(rootIndex(), depth);
    +}
    +
    +void WTreeView::expandChildrenToDepth(const WModelIndex& index, int depth)
    +{
    +  for (int i = 0; i < model()->rowCount(index); ++i) {
    +    WModelIndex c = model()->index(i, 0, index);
    +
    +    expand(c);
    +
    +    if (depth > 1)
    +      expandChildrenToDepth(c, depth - 1);
    +  }
    +}
    +
    +/*
    + * Returns the widget that renders the node indicated by index.
    + *
    + * It may be:
    + *  - a tree node (node->modelIndex() == index)
    + *  - 0 if index is not somewhere in column 0
    + *  - a spacer which includes the 'index', when all intermediate
    + *    nodes are expanded, or
    + *  - 0 otherwise
    + */
    +WWidget *WTreeView::widgetForIndex(const WModelIndex& index) const
    +{
    +  if (!index.isValid())
    +    return rootNode_;
    +
    +  if (index.column() != 0)
    +    return 0;
    +
    +  NodeMap::const_iterator i = renderedNodes_.find(index);
    +
    +  if (i != renderedNodes_.end())
    +    return i->second;
    +  else {
    +    if (!isExpanded(index.parent()))
    +      return 0;
    +
    +    WWidget *parent = widgetForIndex(index.parent());
    +    WTreeViewNode *parentNode = dynamic_cast<WTreeViewNode *>(parent);
    +
    +    if (parentNode)
    +      return parentNode->widgetForModelRow(index.row());
    +    else
    +      return parent;
    +  }
    +}
    +
    +void WTreeView::modelColumnsInserted(const WModelIndex& parent,
    +				     int start, int end)
    +{
    +  int count = end - start + 1;
    +  if (!parent.isValid()) {
    +
    +    WApplication *app = WApplication::instance();
    +    for (int i = start; i < start + count; ++i)
    +      columns_.insert(columns_.begin() + i, createColumnInfo(i));
    +
    +    if (renderState_ < NeedRerenderHeader) {
    +      if (start == 0)
    +	scheduleRerender(NeedRerenderHeader);
    +      else {
    +	if (app->environment().ajax())
    +	  app->doJavaScript("$('#" + id() + "').data('obj').adjustColumns();");
    +
    +	WContainerWidget *row = headerRow();
    +
    +	for (int i = start; i < start + count; ++i) {
    +	  WWidget* w = createHeaderWidget(app, i);
    +	  w->setFloatSide(Left);
    +	  row->insertWidget(i - 1, w);
    +	}
    +      }
    +    }
    +  }
    +
    +  if (renderState_ == NeedRerender || renderState_ == NeedRerenderData)
    +    return;
    +
    +  if (start == 0)
    +    scheduleRerender(NeedRerenderData);
    +  else {
    +    WTreeViewNode *node = nodeForIndex(parent);
    +    if (node)
    +      for (WTreeViewNode *c = node->nextChildNode(0); c;
    +	   c = node->nextChildNode(c))
    +	c->insertColumns(start, count);
    +  }
    +}
    +
    +void WTreeView::modelColumnsAboutToBeRemoved(const WModelIndex& parent,
    +					     int start, int end)
    +{
    +  int count = end - start + 1;
    +  if (!parent.isValid()) {
    +    if (renderState_ < NeedRerenderHeader) {
    +      WApplication *app = wApp;
    +      if (app->environment().ajax())
    +	app->doJavaScript("$('#" + id() + "').data('obj').adjustColumns();");
    +    }
    +
    +    columns_.erase(columns_.begin() + start, columns_.begin() + start + count);
    +
    +    if (renderState_ < NeedRerenderHeader) {
    +      if (start == 0)
    +	scheduleRerender(NeedRerenderHeader);
    +      else {
    +	for (int i = start; i < start + count; ++i)
    +	  delete headerWidget(start, false);
    +      }
    +    }
    +  }
    +
    +  if (start == 0)
    +    scheduleRerender(NeedRerenderData);
    +}
    +
    +void WTreeView::modelColumnsRemoved(const WModelIndex& parent,
    +				    int start, int end)
    +{
    +  if (renderState_ == NeedRerender || renderState_ == NeedRerenderData)
    +    return;
    +
    +  int count = end - start + 1;
    +
    +  if (start != 0) {
    +    WTreeViewNode *node = nodeForIndex(parent);
    +    if (node)
    +      for (WTreeViewNode *c = node->nextChildNode(0); c;
    +	   c = node->nextChildNode(c))
    +	c->removeColumns(start, count);
    +  }
    +
    +  if (start <= currentSortColumn_ && currentSortColumn_ <= end)
    +    currentSortColumn_ = -1;
    +}
    +
    +void WTreeView::modelRowsInserted(const WModelIndex& parent,
    +				  int start, int end)
    +{
    +  int count = end - start + 1;
    +  shiftModelIndexes(parent, start, count);
    +
    +  if (renderState_ == NeedRerender || renderState_ == NeedRerenderData)
    +    return;
    +
    +  WWidget *parentWidget = widgetForIndex(parent);
    +
    +  if (parentWidget) {
    +    WTreeViewNode *parentNode = dynamic_cast<WTreeViewNode *>(parentWidget);
    +
    +    if (parentNode) {
    +      if (parentNode->childrenLoaded()) {
    +	WWidget *startWidget = 0;
    +
    +	/*
    +	 * First we decide between inserting in the top spacer, bottom spacer
    +	 * and in actually rendered nodes.
    +	 */
    +	if (end < model()->rowCount(parent) - 1)
    +	  startWidget = parentNode->widgetForModelRow(start);
    +	else if (parentNode->bottomSpacerHeight() != 0)
    +	  startWidget = parentNode->bottomSpacer();
    +
    +	parentNode->adjustChildrenHeight(count);
    +	parentNode->shiftModelIndexes(start, count);
    +
    +	if (startWidget && startWidget == parentNode->topSpacer()) {
    +	  parentNode->addTopSpacerHeight(count);
    +	  renderedRowsChanged(renderedRow(model()->index(start, 0, parent),
    +					  parentNode->topSpacer(),
    +					  renderLowerBound(),
    +					  renderUpperBound()),
    +			      count);
    +
    +	} else if (startWidget && startWidget == parentNode->bottomSpacer()) {
    +	  parentNode->addBottomSpacerHeight(count);
    +	  renderedRowsChanged(renderedRow(model()->index(start, 0, parent),
    +					  parentNode->bottomSpacer(),
    +					  renderLowerBound(),
    +					  renderUpperBound()),
    +			      count);
    +	} else {
    +	  int maxRenderHeight
    +	    = firstRenderedRow_ + std::max(validRowCount_, viewportHeight_)
    +	    - parentNode->renderedRow() - parentNode->topSpacerHeight();
    +
    +	  int containerIndex = startWidget ? parentNode->childContainer()
    +	    ->indexOf(startWidget) : parentNode->childContainer()->count();
    +
    +	  int parentRowCount = model()->rowCount(parent);
    +
    +	  int nodesToAdd = std::min(count, maxRenderHeight);
    +
    +	  WTreeViewNode *first = 0;
    +	  for (int i = 0; i < nodesToAdd; ++i) {
    +	    WTreeViewNode *n
    +	      = new WTreeViewNode(this, model()->index(start + i, 0, parent), -1,
    +				  start + i == parentRowCount - 1,
    +				  parentNode);
    +	    parentNode->childContainer()->insertWidget(containerIndex + i, n);
    +
    +	    ++validRowCount_;
    +
    +	    if (!first)
    +	      first = n;
    +	  }
    +
    +	  if (nodesToAdd < count) {
    +	    parentNode->addBottomSpacerHeight(count - nodesToAdd);
    +
    +	    // +1 for bottom spacer
    +	    int targetSize = containerIndex + nodesToAdd + 1;
    +
    +	    int extraBottomSpacer = 0;
    +	    while (parentNode->childContainer()->count() > targetSize) {
    +	      WTreeViewNode *n
    +		= dynamic_cast<WTreeViewNode *>(parentNode->childContainer()
    +						->widget(targetSize - 1));
    +	      assert(n);
    +	      extraBottomSpacer += n->renderedHeight();
    +	      validRowCount_ -= n->renderedHeight();
    +
    +	      delete n;
    +	    }
    +
    +	    if (extraBottomSpacer)
    +	      parentNode->addBottomSpacerHeight(extraBottomSpacer);
    +
    +	    parentNode->normalizeSpacers();
    +	  }
    +
    +	  if (first)
    +	    renderedRowsChanged(first->renderedRow(renderLowerBound(),
    +						   renderUpperBound()),
    +				nodesToAdd);
    +
    +	  // Update graphics if the last node has changed, i.e. if we are
    +	  // adding rows at the back
    +	  if (end == model()->rowCount(parent) - 1 && start >= 1) {
    +	    WTreeViewNode *n = dynamic_cast<WTreeViewNode *>
    +	      (parentNode->widgetForModelRow(start - 1));
    +
    +	    if (n)
    +	      n->updateGraphics(false,
    +				model()->rowCount(n->modelIndex()) == 0);
    +	  }
    +	}
    +      } /* else:
    +	   children not loaded -- so we do not need to bother
    +	 */
    +
    +      // Update graphics for parent when first children have een added
    +      if (model()->rowCount(parent) == count)
    +	parentNode->updateGraphics(parentNode->isLast(), false);
    +    } else {
    +      RowSpacer *s = dynamic_cast<RowSpacer *>(parentWidget);
    +
    +      s->setRows(s->rows() + count);
    +      s->node()->adjustChildrenHeight(count);
    +
    +      renderedRowsChanged(renderedRow(model()->index(start, 0, parent), s,
    +				      renderLowerBound(), renderUpperBound()),
    +			  count);
    +    }
    +  } else {
    +    /* else:
    +       parentWidget is 0: it means it is not even part of any spacer.
    +       FIXME: the parent could still be rendered but (somehow) collapsed ?
    +     */
    +  }
    +}
    +
    +void WTreeView::modelRowsAboutToBeRemoved(const WModelIndex& parent,
    +					  int start, int end)
    +{
    +  int count = end - start + 1;
    +
    +  if (renderState_ != NeedRerender || renderState_ != NeedRerenderData) {
    +    firstRemovedRow_ = -1;
    +    removedHeight_ = 0;
    +
    +    WWidget *parentWidget = widgetForIndex(parent);
    +
    +    if (parentWidget) {
    +      WTreeViewNode *parentNode = dynamic_cast<WTreeViewNode *>(parentWidget);
    +
    +      if (parentNode) {
    +	if (parentNode->childrenLoaded()) {
    +	  for (int i = end; i >= start; --i) {
    +	    WWidget *w = parentNode->widgetForModelRow(i);
    +	    assert(w);
    +
    +	    RowSpacer *s = dynamic_cast<RowSpacer *>(w);
    +	    if (s) {
    +	      WModelIndex childIndex = model()->index(i, 0, parent);
    +
    +	      if (i == start)
    +		firstRemovedRow_ = renderedRow(childIndex, w);
    +
    +	      int childHeight = subTreeHeight(childIndex);
    +	      removedHeight_ += childHeight;
    +
    +	      s->setRows(s->rows() - childHeight);
    +	    } else {
    +	      WTreeViewNode *node = dynamic_cast<WTreeViewNode *>(w);
    +
    +	      if (i == start)
    +		firstRemovedRow_ = node->renderedRow();
    +
    +	      removedHeight_ += node->renderedHeight();
    +
    +	      delete node;
    +	    }
    +	  }
    +
    +	  parentNode->normalizeSpacers();
    +
    +	  // Update graphics for last node in parent, if we are removing rows
    +	  // at the back. This is not affected by widgetForModelRow() returning
    +	  // accurate information of rows just deleted and indexes not yet
    +	  // shifted
    +	  if (end == model()->rowCount(parent) - 1 && start >= 1) {
    +	    WTreeViewNode *n = dynamic_cast<WTreeViewNode *>
    +	      (parentNode->widgetForModelRow(start - 1));
    +
    +	    if (n)
    +	      n->updateGraphics(true, model()->rowCount(n->modelIndex()) == 0);
    +	  }
    +	} /* else:
    +	     children not loaded -- so we do not need to bother
    +	  */
    +
    +	// Update graphics for parent when all rows have been removed
    +	if (model()->rowCount(parent) == count)
    +	  parentNode->updateGraphics(parentNode->isLast(), true);
    +      } else {
    +	RowSpacer *s = dynamic_cast<RowSpacer *>(parentWidget);
    +
    +	for (int i = start; i <= end; ++i) {
    +	  WModelIndex childIndex = model()->index(i, 0, parent);
    +	  int childHeight = subTreeHeight(childIndex);
    +	  removedHeight_ += childHeight;
    +
    +	  if (i == start)
    +	    firstRemovedRow_ = renderedRow(childIndex, s);
    +	}
    +
    +	WTreeViewNode *node = s->node();
    +	s->setRows(s->rows() - removedHeight_); // could delete s ?
    +	node->adjustChildrenHeight(-removedHeight_);
    +      }
    +    } else {
    +      /*
    +	parentWidget is 0: it means it is not even part of any spacer.
    +	FIXME: but it could still be rendered, yet (somehow) collapsed ?
    +      */
    +    }
    +  }
    +}
    +
    +void WTreeView::modelRowsRemoved(const WModelIndex& parent,
    +				 int start, int end)
    +{
    +  int count = end - start + 1;
    +
    +  if (renderState_ != NeedRerender || renderState_ != NeedRerenderData) {
    +    WWidget *parentWidget = widgetForIndex(parent);
    +    if (parentWidget) {
    +      WTreeViewNode *parentNode = dynamic_cast<WTreeViewNode *>(parentWidget);
    +      if (parentNode) {
    +	if (parentNode->childrenLoaded()) {
    +	  parentNode->adjustChildrenHeight(-removedHeight_);
    +	  parentNode->shiftModelIndexes(start, -count);
    +	}
    +      }
    +    }
    +  }
    +
    +  shiftModelIndexes(parent, start, -count);
    +
    +  renderedRowsChanged(firstRemovedRow_, -removedHeight_);
    +}
    +
    +void WTreeView::modelDataChanged(const WModelIndex& topLeft,
    +				 const WModelIndex& bottomRight)
    +{
    +  if (renderState_ == NeedRerender || renderState_ == NeedRerenderData)
    +    return;
    +  
    +  WModelIndex parent = topLeft.parent();  
    +  WWidget *parentWidget = widgetForIndex(parent);
    +
    +  if (parentWidget) {
    +    WTreeViewNode *parentNode = dynamic_cast<WTreeViewNode *>(parentWidget);
    +
    +    if (parentNode) {
    +      if (parentNode->childrenLoaded()) {
    +	for (int r = topLeft.row(); r <= bottomRight.row(); ++r) {
    +	  WModelIndex index = model()->index(r, 0, parent);
    +
    +	  WTreeViewNode *n
    +	    = dynamic_cast<WTreeViewNode *>(widgetForIndex(index));
    +
    +	  if (n)
    +	    n->update(topLeft.column(), bottomRight.column());
    +	}
    +      } /* else:
    +	   children not loaded -- so we do not need to bother
    +	 */
    +    } /* else:
    +	 parentWidget is a spacer -- we do not need to bother
    +       */
    +  } else {
    +    /*
    +      parent is not displayed
    +      FIXME: but it could still be rendered, yet (somehow) not expanded ?
    +    */
    +  }
    +}
    +
    +void WTreeView::modelHeaderDataChanged(Orientation orientation,
    +				       int start, int end)
    +{
    +  if (renderState_ < NeedRerenderHeader) {
    +    if (orientation == Horizontal) {
    +      for (int i = start; i <= end; ++i) {
    +	WString label = asString(model()->headerData(i));
    +	headerTextWidget(i)->setText(label);
    +      }
    +    }
    +  }
    +}
    +
    +WWidget *WTreeView::headerWidget(int column, bool contentsOnly)
    +{
    +  WWidget *result = 0;
    +
    +  if (headers_ && headers_->count() > 0) {
    +    if (column == 0)
    +      result = headers_->widget(headers_->count() - 1);
    +    else
    +      result = headerRow()->widget(column - 1);
    +  }
    +
    +  if (result && contentsOnly)
    +    return result->find("contents");
    +  else
    +    return result;
    +}
    +
    +WContainerWidget *WTreeView::headerRow()
    +{
    +  WContainerWidget *row
    +    = dynamic_cast<WContainerWidget *>(headers_->widget(0));
    +  if (column1Fixed_)
    +    row = dynamic_cast<WContainerWidget *>(row->widget(0));
    +  return row;
    +}
    +
    +int WTreeView::renderedRow(const WModelIndex& index, WWidget *w,
    +			   int lowerBound, int upperBound)
    +{
    +  WTreeViewNode *node = dynamic_cast<WTreeViewNode *>(w);
    +
    +  if (node)
    +    return node->renderedRow(lowerBound, upperBound);
    +  else {
    +    RowSpacer *s = dynamic_cast<RowSpacer *>(w);
    +
    +    int result = s->renderedRow(0, upperBound);
    +
    +    if (result > upperBound)
    +      return result;
    +    else if (result + s->node()->renderedHeight() < lowerBound)
    +      return result;
    +    else
    +      return result + getIndexRow(index, s->node()->modelIndex(),
    +				  lowerBound - result, upperBound - result);
    +  }
    +}
    +
    +int WTreeView::getIndexRow(const WModelIndex& child,
    +			   const WModelIndex& ancestor,
    +			   int lowerBound, int upperBound)
    +{
    +  if (child == ancestor)
    +    return 0;
    +  else {
    +    WModelIndex parent = child.parent();
    +
    +    int result = 0;
    +    for (int r = 0; r < child.row(); ++r) {
    +      result += subTreeHeight(model()->index(r, 0, parent), 0,
    +			      upperBound - result);
    +      if (result >= upperBound)
    +	return result;
    +    }
    +
    +    return result + getIndexRow(parent, ancestor,
    +				lowerBound - result, upperBound - result);
    +  }
    +}
    +
    +int WTreeView::renderLowerBound() const
    +{
    +  return firstRenderedRow_;
    +}
    +
    +int WTreeView::renderUpperBound() const
    +{
    +  return firstRenderedRow_ + validRowCount_;
    +}
    +
    +void WTreeView::renderedRowsChanged(int row, int count)
    +{
    +  if (count < 0
    +      && row - count >= firstRenderedRow_
    +      && row < firstRenderedRow_ + validRowCount_)
    +    validRowCount_ += std::max(firstRenderedRow_ - row + count, count);
    +
    +  if (row < firstRenderedRow_)
    +    firstRenderedRow_ += count;
    +
    +  scheduleRerender(NeedAdjustViewPort);
    +}
    +
    +void WTreeView::adjustToViewport(WTreeViewNode *changed)
    +{
    +  //assert(rootNode_->rowCount() == 1);
    +
    +  firstRenderedRow_ = std::max(0, firstRenderedRow_);
    +  validRowCount_
    +    = std::max(0, std::min(validRowCount_,
    +			   rootNode_->renderedHeight() - firstRenderedRow_));
    +
    +  int viewportBottom = std::min(rootNode_->renderedHeight(),
    +				viewportTop_ + viewportHeight_);
    +  int lastValidRow = firstRenderedRow_ + validRowCount_;
    +
    +  bool renderMore =
    +    (std::max(0,
    +	      viewportTop_ - viewportHeight_) < firstRenderedRow_)
    +    || (std::min(rootNode_->renderedHeight(),
    +		 viewportBottom + viewportHeight_) > lastValidRow);
    +
    +  bool pruneFirst = false;
    +
    +  //assert(rootNode_->rowCount() == 1);
    +
    +  if (renderMore) {
    +    int newFirstRenderedRow = std::min(firstRenderedRow_,
    +				       calcOptimalFirstRenderedRow());
    +    int newLastValidRow = std::max(lastValidRow,
    +				   std::min(rootNode_->renderedHeight(),
    +					    calcOptimalFirstRenderedRow()
    +					    + calcOptimalRenderedRowCount()));
    +    //assert(rootNode_->rowCount() == 1);
    +
    +    int newValidRowCount = newLastValidRow - newFirstRenderedRow;
    +
    +    int newRows = std::max(0, firstRenderedRow_ - newFirstRenderedRow)
    +      + std::max(0, newLastValidRow - lastValidRow);
    +
    +    const int pruneFactor
    +      = WApplication::instance()->environment().ajax() ? 9 : 1;
    +
    +    if (nodeLoad_ + newRows > pruneFactor * viewportHeight_) {
    +      pruneFirst = true;
    +    } else
    +      if (newFirstRenderedRow < firstRenderedRow_
    +	  || newLastValidRow > lastValidRow) {
    +	firstRenderedRow_ = newFirstRenderedRow;
    +	validRowCount_ = newValidRowCount;
    +	adjustRenderedNode(rootNode_, 0);
    +      }
    +  }
    +
    +  const int pruneFactor
    +    = WApplication::instance()->environment().ajax() ? 5 : 1;
    +
    +  if (pruneFirst || nodeLoad_ > pruneFactor * viewportHeight_) {
    +    firstRenderedRow_ = calcOptimalFirstRenderedRow();
    +    validRowCount_ = calcOptimalRenderedRowCount();
    +
    +    pruneNodes(rootNode_, 0);
    +
    +    if (pruneFirst && nodeLoad_ < calcOptimalRenderedRowCount()) {
    +      adjustRenderedNode(rootNode_, 0);
    +    } 
    +  }
    +
    +  //assert(rootNode_->rowCount() == 1);
    +}
    +
    +int WTreeView::adjustRenderedNode(WTreeViewNode *node, int theNodeRow)
    +{
    +  //assert(rootNode_->rowCount() == 1);
    +
    +  WModelIndex index = node->modelIndex();
    +
    +  if (index != rootIndex())
    +    ++theNodeRow;
    +
    +  if (!isExpanded(index) && !node->childrenLoaded())
    +    return theNodeRow;
    +
    +  int nodeRow = theNodeRow;
    +
    +  if (node->isAllSpacer()) {
    +    if (nodeRow + node->childrenHeight() > firstRenderedRow_
    +	&& nodeRow < firstRenderedRow_ + validRowCount_) {
    +      // replace spacer by some nodes
    +      int childCount = model()->rowCount(index);
    +
    +      bool firstNode = true;
    +      int rowStubs = 0;
    +
    +      for (int i = 0; i < childCount; ++i) {
    +	WModelIndex childIndex = model()->index(i, 0, index);
    +
    +	int childHeight = subTreeHeight(childIndex);
    +
    +	if (nodeRow <= firstRenderedRow_ + validRowCount_
    +	    && nodeRow + childHeight > firstRenderedRow_) {
    +	  if (firstNode) {
    +	    firstNode = false;
    +	    node->setTopSpacerHeight(rowStubs);
    +	    rowStubs = 0;
    +	  }
    +
    +	  // assert(rootNode_->rowCount() == 1);
    +
    +	  WTreeViewNode *n = new WTreeViewNode(this, childIndex,
    +					       childHeight - 1,
    +					       i == childCount - 1, node);
    +
    +	  // assert(rootNode_->rowCount() == 1);
    +
    +	  node->childContainer()->addWidget(n);
    +
    +	  int nestedNodeRow = nodeRow;
    +	  nestedNodeRow = adjustRenderedNode(n, nestedNodeRow);
    +	  assert(nestedNodeRow == nodeRow + childHeight);
    +	} else {
    +	  rowStubs += childHeight;
    +	}
    +	nodeRow += childHeight;
    +      }
    +      node->setBottomSpacerHeight(rowStubs);
    +    } else
    +      nodeRow += node->childrenHeight();
    +  } else {
    +    // get a reference to the first existing child, which we'll recursively
    +    // adjust later
    +    int topSpacerHeight = node->topSpacerHeight();
    +    int nestedNodeRow = nodeRow + topSpacerHeight;
    +    WTreeViewNode *child = node->nextChildNode(0);
    +
    +    int childCount = model()->rowCount(index);
    +    while (topSpacerHeight != 0
    +	   && nodeRow + topSpacerHeight > firstRenderedRow_) {
    +      // eat from top spacer and replace with actual nodes
    +      WTreeViewNode *n
    +	= dynamic_cast<WTreeViewNode *>(node->childContainer()->widget(1));
    +
    +      assert(n);
    +
    +      WModelIndex childIndex
    +	= model()->index(n->modelIndex().row() - 1, 0, index);
    +
    +      int childHeight = subTreeHeight(childIndex);
    +
    +      n = new WTreeViewNode(this, childIndex, childHeight - 1,
    +			    childIndex.row() == childCount - 1, node);
    +      node->childContainer()->insertWidget(1, n);
    +
    +      nestedNodeRow = nodeRow + topSpacerHeight - childHeight;
    +      nestedNodeRow = adjustRenderedNode(n, nestedNodeRow);
    +      assert(nestedNodeRow == nodeRow + topSpacerHeight);
    +
    +      topSpacerHeight -= childHeight;
    +      node->addTopSpacerHeight(-childHeight);
    +    }
    +
    +    for (; child; child=node->nextChildNode(child))
    +      nestedNodeRow = adjustRenderedNode(child, nestedNodeRow);
    +
    +    int nch = node->childrenHeight();
    +    int bottomSpacerStart = nch - node->bottomSpacerHeight();
    +
    +    while (node->bottomSpacerHeight() != 0
    +	   && nodeRow + bottomSpacerStart
    +	      <= firstRenderedRow_ + validRowCount_){
    +      // eat from bottom spacer and replace with actual nodes
    +      int lastNodeIndex = node->childContainer()->count() - 2;
    +      WTreeViewNode *n = dynamic_cast<WTreeViewNode *>
    +	(node->childContainer()->widget(lastNodeIndex));
    +
    +      assert(n);
    +
    +      WModelIndex childIndex
    +	= model()->index(n->modelIndex().row() + 1, 0, index);
    +
    +      int childHeight = subTreeHeight(childIndex);
    +
    +      n = new WTreeViewNode(this, childIndex, childHeight - 1,
    +			    childIndex.row() == childCount - 1, node);
    +      node->childContainer()->insertWidget(lastNodeIndex + 1, n);
    +
    +      nestedNodeRow = nodeRow + bottomSpacerStart;
    +      nestedNodeRow = adjustRenderedNode(n, nestedNodeRow);
    +      assert(nestedNodeRow == nodeRow + bottomSpacerStart + childHeight);
    +
    +      node->addBottomSpacerHeight(-childHeight);
    +      bottomSpacerStart += childHeight;
    +    }
    +
    +    nodeRow += nch;
    +  }
    +
    +  // assert(rootNode_->rowCount() == 1);
    +
    +  // if a node has children loaded but is not currently expanded, then still
    +  // adjust it, but do not return the calculated nodeRow for it.
    +  return isExpanded(index) ? nodeRow : theNodeRow;
    +}
    +
    +int WTreeView::pruneNodes(WTreeViewNode *node, int nodeRow)
    +{
    +  // remove unneeded nodes: nodes within collapsed tree nodes, and nodes
    +  // beyond the optimal bounds
    +  WModelIndex index = node->modelIndex();
    +
    +  ++nodeRow;
    +
    +  if (isExpanded(index)) {
    +    // prune away nodes until we are within the rendered region
    +    nodeRow += node->topSpacerHeight();
    +
    +    bool done = false;
    +    WTreeViewNode *c = 0;
    +
    +    for (; nodeRow < firstRenderedRow_; ) {
    +      c = node->nextChildNode(0);
    +      if (!c) {
    +	done = true;
    +	break;
    +      }
    +
    +      if (nodeRow + c->renderedHeight() < firstRenderedRow_) {
    +	node->addTopSpacerHeight(c->renderedHeight());
    +	nodeRow += c->renderedHeight();
    +	delete c;
    +	c = 0;
    +      } else {
    +	nodeRow = pruneNodes(c, nodeRow);
    +	break;
    +      }
    +    }
    +
    +    if (!done) {
    +      for (; nodeRow <= firstRenderedRow_ + validRowCount_; ) {
    +	c = node->nextChildNode(c);
    +
    +	if (!c) {
    +	  done = true;
    +	  break;
    +	}
    +
    +	nodeRow = pruneNodes(c, nodeRow);
    +      }
    +    }
    +
    +    if (!done) {
    +      c = node->nextChildNode(c);
    +
    +      if (c != 0) {
    +	int i = node->childContainer()->indexOf(c);
    +	int prunedHeight = 0;
    +
    +	while (c && i < node->childContainer()->count()) {
    +	  c = dynamic_cast<WTreeViewNode *> (node->childContainer()->widget(i));
    +	  if (c) {
    +	    prunedHeight += c->renderedHeight();
    +	    delete c;
    +	  }
    +	}
    +
    +	node->addBottomSpacerHeight(prunedHeight);
    +      }
    +    }
    +
    +    nodeRow += node->bottomSpacerHeight();
    +
    +    node->normalizeSpacers();
    +
    +  } else
    +    if (node->childrenLoaded()) {
    +      int prunedHeight = 0;
    +      for (;;) {
    +	WTreeViewNode *c = node->nextChildNode(0);
    +	if (!c)
    +	  break;
    +
    +	prunedHeight += c->renderedHeight();
    +	delete c;
    +      }
    +
    +      node->addBottomSpacerHeight(prunedHeight);
    +      node->normalizeSpacers();
    +    }
    +
    +  return nodeRow;
    +}
    +
    +int WTreeView::shiftModelIndexes(const WModelIndex& parent,
    +				 int start, int count,
    +				 WAbstractItemModel *model,
    +				 WModelIndexSet& set)
    +{
    +  /*
    +   * handle the set of exanded model indexes:
    +   *  - collect indexes in the same parent at lower rows that need to
    +   *    be shifted
    +   *  - if deleting, delete indexes that are within the range of deleted
    +   *    rows
    +   */
    +  std::vector<WModelIndex> toShift;
    +  std::vector<WModelIndex> toErase;
    +
    +  for (WModelIndexSet::iterator it
    +	 = set.lower_bound(model->index(start, 0, parent)); it != set.end();) {
    +#ifndef WT_TARGET_JAVA
    +    WModelIndexSet::iterator n = it;
    +    ++n;
    +#endif
    +
    +    WModelIndex i = *it;
    +
    +    WModelIndex p = i.parent();
    +    if (p != parent && !WModelIndex::isAncestor(p, parent))
    +      break;
    +
    +    if (p == parent) {
    +      toShift.push_back(i);
    +      toErase.push_back(i);
    +    } else if (count < 0) {
    +      // delete indexes that are about to be deleted, if they are within
    +      // the range of deleted indexes
    +      do {
    +	if (p.parent() == parent
    +	    && p.row() >= start
    +	    && p.row() < start - count) {
    +	  toErase.push_back(i);
    +	  break;
    +	} else
    +	  p = p.parent();
    +      } while (p != parent);
    +    }
    +
    +#ifndef WT_TARGET_JAVA
    +    it = n;
    +#endif
    +  }
    +
    +  for (unsigned i = 0; i < toErase.size(); ++i)
    +    set.erase(toErase[i]);
    +
    +  int removed = 0;
    +  for (unsigned i = 0; i < toShift.size(); ++i) {
    +    // for negative count: only reinsert model indexes that need
    +    // not be removed (they are currently all removed)
    +    if (toShift[i].row() + count >= start) {
    +      WModelIndex newIndex = model->index(toShift[i].row() + count,
    +					  toShift[i].column(), parent);
    +      set.insert(newIndex);
    +    } else
    +      ++removed;
    +  }
    +
    +  return removed;
    +}
    +
    +void WTreeView::shiftModelIndexes(const WModelIndex& parent,
    +				  int start, int count)
    +{
    +  shiftModelIndexes(parent, start, count, model(), expandedSet_);
    +
    +  int removed = shiftModelIndexes(parent, start, count, model(),
    +				  selectionModel()->selection_);
    +
    +  if (removed)
    +    selectionChanged().emit();
    +}
    +
    +void WTreeView::modelLayoutAboutToBeChanged()
    +{
    +  WModelIndex::encodeAsRawIndexes(expandedSet_);
    +
    +  WAbstractItemView::modelLayoutAboutToBeChanged();
    +}
    +
    +void WTreeView::modelLayoutChanged()
    +{
    +  WAbstractItemView::modelLayoutChanged();
    +
    +  expandedSet_ = WModelIndex::decodeFromRawIndexes(expandedSet_);
    +
    +  renderedNodes_.clear();
    +
    +  pageChanged().emit();
    +}
    +
    +void WTreeView::addRenderedNode(WTreeViewNode *node)
    +{
    +  renderedNodes_[node->modelIndex()] = node;
    +  ++nodeLoad_;
    +  renderedNodesAdded_ = true;
    +}
    +
    +void WTreeView::removeRenderedNode(WTreeViewNode *node)
    +{
    +  renderedNodes_.erase(node->modelIndex());
    +  --nodeLoad_;
    +}
    +
    +bool WTreeView::internalSelect(const WModelIndex& index, SelectionFlag option)
    +{
    +  if (selectionBehavior() == SelectRows && index.column() != 0)
    +    return internalSelect(model()->index(index.row(), 0, index.parent()),
    +			  option);
    +
    +  if (WAbstractItemView::internalSelect(index, option)) {
    +    WTreeViewNode *node = nodeForIndex(index);
    +    if (node)
    +      node->renderSelected(isSelected(index), index.column());
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +WTreeViewNode *WTreeView::nodeForIndex(const WModelIndex& index) const
    +{
    +  if (index == rootIndex())
    +    return rootNode_;
    +  else {
    +    WModelIndex column0Index = model()->index(index.row(), 0, index.parent());
    +    NodeMap::const_iterator i = renderedNodes_.find(column0Index);
    +    return i != renderedNodes_.end() ? i->second : 0;
    +  }
    +}
    +
    +void WTreeView::selectRange(const WModelIndex& first, const WModelIndex& last)
    +{
    +  WModelIndex index = first;
    +  for (;;) {
    +    for (int c = first.column(); c <= last.column(); ++c) {
    +      WModelIndex ic = model()->index(index.row(), c, index.parent());
    +      internalSelect(ic, Select);
    +
    +      if (ic == last)
    +	return;
    +    }
    +
    +    WModelIndex indexc0
    +      = index.column() == 0 ? index
    +      : model()->index(index.row(), 0, index.parent());
    +
    +    if (isExpanded(indexc0) && model()->rowCount(indexc0) > 0)
    +      index = model()->index(0, first.column(), indexc0);
    +    else {
    +      for (;;) {
    +	// next row in parent, if one is available
    +	WModelIndex parent = index.parent();
    +	if (index.row() + 1 < model()->rowCount(parent)) {
    +	  index = model()->index(index.row() + 1, first.column(), parent);
    +	  break;
    +	} else
    +	  // otherwise go up one level
    +	  index = index.parent();
    +      }
    +    }
    +  }
    +}
    +
    +WAbstractItemView::ColumnInfo WTreeView::createColumnInfo(int column) const
    +{
    +  ColumnInfo ci = WAbstractItemView::createColumnInfo(column);
    +
    +  if (column == 0) {
    +    // column 0 needs width auto, so we override the ci.styleRule with
    +    // a more specific rule. We also set the correct overflow attributes
    +
    +    ci.width = WLength::Auto;
    +    ci.styleRule->templateWidget()->resize(WLength::Auto, WLength::Auto);
    +
    +    WApplication *app = WApplication::instance();
    +    app->styleSheet().addRule("#" + this->id() + " .Wt-tv-node"
    +			      " ." + ci.styleClass(),
    +			      "width: auto;"
    +			      "text-overflow: ellipsis;"
    +			      "overflow: hidden");
    +  }
    +
    +  return ci;
    +}
    +
    +void WTreeView::setCurrentPage(int page)
    +{
    +  viewportTop_ = page * viewportHeight_;
    +
    +  contents_->setOffsets(-viewportTop_ * rowHeight().toPixels(), Top);
    +
    +  pageChanged().emit();
    +
    +  scheduleRerender(NeedAdjustViewPort);
    +}
    +
    +int WTreeView::currentPage() const
    +{
    +  return viewportTop_ / viewportHeight_;
    +}
    +
    +int WTreeView::pageCount() const
    +{
    +  if (rootNode_) {
    +    return (rootNode_->renderedHeight() - 1) / viewportHeight_ + 1;
    +  } else
    +    return 1;
    +}
    +
    +int WTreeView::pageSize() const
    +{
    +  return viewportHeight_;
    +}
    +
    +}
    +
    +#endif // DOXYGEN_ONLY
    diff --git a/wt-3.1.7a/src/Wt/WVBoxLayout b/wt-3.1.7a/src/Wt/WVBoxLayout
    new file mode 100644
    index 0000000..72f681f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVBoxLayout
    @@ -0,0 +1,55 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVBOX_LAYOUT_H_
    +#define WVBOX_LAYOUT_H_
    +
    +#include <Wt/WBoxLayout>
    +
    +namespace Wt {
    +
    +/*! \class WVBoxLayout Wt/WVBoxLayout Wt/WVBoxLayout
    + *  \brief A layout manager which arranges widgets vertically
    + *
    + * This convenience class creates a vertical box layout, laying contained
    + * widgets out from top to bottom. 
    + *
    + * See WBoxLayout for available member methods and more information.
    + *
    + * \if cpp
    + * Usage example:
    + * \code
    + * Wt::WContainerWidget *w = new Wt::WContainerWidget(this);
    + * w->resize(WLength::Auto, 600);
    + *
    + * Wt::WVBoxLayout *layout = new Wt::WVBoxLayout();
    + * layout->addWidget(new Wt::WText("One"));
    + * layout->addWidget(new Wt::WText("Two"));
    + * layout->addWidget(new Wt::WText("Three"));
    + * layout->addWidget(new Wt::WText("Four"));
    + *
    + * w->setLayout(layout);
    + * \endcode
    + * \endif
    + *
    + * \note First consider if you can achieve your layout using CSS !
    + *
    + * \sa WHBoxLayout
    + */
    +class WT_API WVBoxLayout : public WBoxLayout
    +{
    +public:
    +  /*! \brief Create a new vertical box layout.
    +   *
    +   * Use \p parent=0 to created a layout manager that can be
    +   * nested inside other layout managers.
    +   */
    +  WVBoxLayout(WWidget *parent = 0);
    +};
    +
    +}
    +
    +#endif // WVBOX_LAYOUT_H_
    diff --git a/wt-3.1.7a/src/Wt/WVBoxLayout.C b/wt-3.1.7a/src/Wt/WVBoxLayout.C
    new file mode 100644
    index 0000000..d00d5b3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVBoxLayout.C
    @@ -0,0 +1,15 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WVBoxLayout"
    +
    +namespace Wt {
    +
    +WVBoxLayout::WVBoxLayout(WWidget *parent)
    +  : WBoxLayout(TopToBottom, parent)
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WValidationStatus b/wt-3.1.7a/src/Wt/WValidationStatus
    new file mode 100644
    index 0000000..9424c89
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WValidationStatus
    @@ -0,0 +1,90 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVALIDATIONSTATUS_H_
    +#define WVALIDATIONSTATUS_H_
    +
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WValidator>
    +
    +namespace Wt {
    +
    +class WFormWidget;
    +
    +/*! \class WValidationStatus Wt/WValidationStatus Wt/WValidationStatus
    + *  \brief A widget that keeps track of the validation status of a form widget.
    + *
    + * <i>Since %Wt 2.1.3, all standard validators provide client-side
    + * validation and this is reflected in the form widget using the style
    + * class "Wt-invalid" when the validator returns not
    + * WValidator::Valid. Therefore, it is unlikely you will need this
    + * class anymore.</i>
    + *
    + * Use a %WValidationStatus widget to act to changes in validation of a
    + * WFormWidget. The widget may show visual feed-back of the validation
    + * state of the input.
    + *
    + * Visual feed-back may be given by showing an invalidStateWidget when
    + * input is invalid, an invalidEmptyStateWidget when the input is
    + * invalid because mandatory and empty, or a validStateWidget when
    + * input is valid. All of these widgets may be 0, indicating that no
    + * widget will be shown for the corresponding state.
    + *
    + * When validation state changes from invalid to valid, or from valid
    + * to invalid, the widget emits the validated signal. This may be used
    + * to for example enable or disable a button.
    + * 
    + * \deprecated Since %Wt 3.1.1, validation is handled directly on WFormWidget 
    + * subclasses.
    + */
    +class WT_API WValidationStatus : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Construct a WValidationStatus widget for another widget.
    +   *
    +   * Constructs a validation status widget for the given field.
    +   *
    +   * The validation stateWidgets (if not \c 0) will be managed by this
    +   * widget, and shown and hidden to reflect the current validation
    +   * state.
    +   */
    +  WValidationStatus(WFormWidget *field,
    +		    WWidget *validStateWidget = 0,
    +		    WWidget *invalidStateWidget = 0,
    +		    WWidget *invalidEmptyStateWidget = 0,
    +		    WContainerWidget *parent = 0);
    +
    +  /*! \brief Is the field currently considered valid?
    +   */
    +  bool valid() const { return state_ == WValidator::Valid; }
    +
    +  /*! \brief Signal emitted when the validation state changed.
    +   *
    +   * The new state of the validation (valid or invalid) is given
    +   * as argument. This signal gets emitted when the state changes
    +   * from WValidator::Valid to WValidator::Invalid, or from
    +   * WValidator::Invalid to WValidator::Valid.
    +   */
    +  Signal<bool>& validated() { return validated_; }
    +
    +private:
    +  Signal<bool> validated_;
    +
    +  WContainerWidget *impl_;
    +
    +  WFormWidget *field_;
    +  WWidget     *validStateWidget_;
    +  WWidget     *invalidStateWidget_;
    +  WWidget     *invalidEmptyStateWidget_;
    +
    +  WValidator::State state_;
    +
    +  void inputChanged();
    +};
    +
    +}
    +
    +#endif // WVALIDATION_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WValidationStatus.C b/wt-3.1.7a/src/Wt/WValidationStatus.C
    new file mode 100644
    index 0000000..6290c27
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WValidationStatus.C
    @@ -0,0 +1,64 @@
    +#include "Wt/WValidationStatus"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WFormWidget"
    +
    +namespace Wt {
    +
    +WValidationStatus::WValidationStatus(WFormWidget *field,
    +				     WWidget *validStateWidget,
    +				     WWidget *invalidStateWidget,
    +				     WWidget *invalidEmptyStateWidget,
    +				     WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    validated_(this),
    +    field_(field),
    +    validStateWidget_(validStateWidget),
    +    invalidStateWidget_(invalidStateWidget),
    +    invalidEmptyStateWidget_(invalidEmptyStateWidget)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +  impl_->setInline(true);
    +
    +  state_ = field_->validate();
    +
    +  if (validStateWidget_) {
    +    impl_->addWidget(validStateWidget_);
    +    validStateWidget_->setHidden(state_ != WValidator::Valid);
    +  }
    +
    +  if (invalidStateWidget_) {
    +    impl_->addWidget(invalidStateWidget_);
    +    invalidStateWidget_->setHidden(state_ != WValidator::Invalid);
    +  }
    +
    +  if (invalidEmptyStateWidget_) {
    +    impl_->addWidget(invalidEmptyStateWidget_);
    +    invalidEmptyStateWidget_->setHidden(state_ != WValidator::InvalidEmpty);
    +  }
    +
    +  field->changed().connect(this, &WValidationStatus::inputChanged);
    +  field->keyWentUp().connect(this, &WValidationStatus::inputChanged);
    +  //field->keyPressed().connect(this, &WValidationStatus::inputChanged);
    +}
    +
    +void WValidationStatus::inputChanged()
    +{
    +  WValidator::State state = field_->validate();
    +
    +  if (state != state_) {
    +    if (validStateWidget_)
    +      validStateWidget_->setHidden(state != WValidator::Valid);
    +    if (invalidStateWidget_)
    +      invalidStateWidget_->setHidden(state != WValidator::Invalid);
    +    if (invalidEmptyStateWidget_)
    +      invalidEmptyStateWidget_->setHidden(state != WValidator::InvalidEmpty);
    +
    +    if ((state_ == WValidator::Valid) || (state == WValidator::Valid)) {
    +      state_ = state;
    +      validated_.emit(state_ == WValidator::Valid);
    +    } else
    +      state_ = state;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WValidator b/wt-3.1.7a/src/Wt/WValidator
    new file mode 100644
    index 0000000..8875bca
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WValidator
    @@ -0,0 +1,173 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVALIDATOR_H_
    +#define WVALIDATOR_H_
    +
    +#include <iostream>
    +
    +#include <Wt/WObject>
    +#include <Wt/WString>
    +
    +namespace Wt {
    +
    +class WFormWidget;
    +
    +/*! \class WValidator Wt/WValidator Wt/WValidator
    + *  \brief A validator is used to validate user input according to
    + *         pre-defined rules.
    + *
    + * A validator may be associated with a form widget using
    + * WFormWidget::setValidator().
    + *
    + * The validator validates the user input. A validator may have a
    + * split implementation to provide both validation at the client-side
    + * (which gives instant feed-back to the user while editing), and
    + * server-side validation (to be sure that the client was not tampered
    + * with). The feed-back given by (client-side and server-side)
    + * validation is reflected in the style class of the form field: a
    + * style class of <tt>Wt-invalid</tt> is set for a field that is
    + * invalid.
    + *
    + * This %WValidator only checks that mandatory fields are not empty.
    + * This class is reimplemented in WDateValidator, WIntValidator,
    + * WDoubleValidator, WLengthValidator and WRegExpValidator. All these
    + * validators provibe both client-side and server-side validation.
    + *
    + * If these validators are not suitable, you can inherit from this
    + * class, and provide a suitable implementation to validate() which
    + * does the server-side validation. If you want to provide client-side
    + * validation for your own validator, you may also reimplement
    + * javaScriptValidate().
    + *
    + * <h3>i18n</h3>
    + *
    + * The strings used in this class can be translated by overriding
    + * the default values for the following localization keys:
    + * - Wt.WValidator.Invalid: This field cannot be empty
    + *
    + * \sa WFormWidget
    + */
    +class WT_API WValidator : public WObject
    +{
    +public:
    +  /*! \brief The state in which validated input can exist.
    +   */
    +  enum State { Invalid,	     //!< The input is invalid.
    +	       InvalidEmpty, //!< The input is invalid (emtpy and mandatory).
    +	       Valid	     //!< The input is valid.
    +  };
    +
    +  /*! \brief Creates a new validator.
    +   */
    +  WValidator(WObject *parent = 0);
    +
    +  /*! \brief Creates a new validator.
    +   *
    +   * Indicate whether input is mandatory.
    +   *
    +   * \sa setMandatory(bool)
    +   */
    +  WValidator(bool mandatory, WObject *parent = 0);
    +
    +  /*! \brief Destructor.
    +   *
    +   * The validator automatically removes itself from all formfields to
    +   * which it was associated.
    +   */
    +  ~WValidator();
    +
    +  /*! \brief Sets if input is mandatory
    +   *
    +   * When an input is not mandatory, then an empty field is always
    +   * valid.
    +   */
    +  void setMandatory(bool how);
    +
    +  /*! \brief Returns if input is mandatory.
    +   */
    +  bool isMandatory() const { return mandatory_; }
    +
    +  /*! \brief Sets the message to display when a mandatory field is left blank
    +   *
    +   * The default value is "This field cannot be empty".
    +   */
    +  void setInvalidBlankText(const WString& text);
    +
    +  /*! \brief Returns the message displayed when a mandatory field is left blank
    +   *
    +   * \sa setInvalidBlankText(const WString&)
    +   */
    +  WString invalidBlankText() const;
    +
    +  /*! \brief This function attempts to change input to be valid according to
    +   *         the validator's rules.
    +   *
    +   * In general the function needs not to change the input into a
    +   * valid input. The default implementation does nothing. But it may
    +   * help the user in getting its input right.
    +   */
    +  virtual void fixup(WString& input) const;
    +
    +  /*! \brief Validates the given input.
    +   *
    +   * This function returns the current validation state of the
    +   * input. The default implementation only checks whether a mandatory
    +   * field is not left blank.
    +   */
    +  virtual State validate(WT_USTRING& input) const;
    +
    +  /*! \brief Provides Ext-compatible config options for client-side validation.
    +   */
    +  virtual void createExtConfig(std::ostream& config) const;
    +
    +protected:
    +  /*! \brief Creates a Javascript expression that validates the input.
    +   *
    +   * The JavaScript expression should evaluate to an object with two
    +   * fields: a boolean <i>valid</i>, and a \p message that
    +   * indicates the problem if not valid.
    +   *
    +   * Return an empty string if you are not provide the client-side
    +   * validation.
    +   *
    +   * \sa inputFilter()
    +   */
    +  virtual std::string javaScriptValidate(const std::string& jsRef) const;
    +
    +  /*! \brief Returns a regular expression that filters input.
    +   *
    +   * The returned regular expression is used to filter keys
    +   * presses. The regular expression should accept valid single
    +   * characters.
    +   *
    +   * For details on valid regular expressions, see WRegExpValidator.
    +   * As an example, "[0-9]" would only accept numbers as valid input.
    +   *
    +   * The default implementation returns an empty string, which does not
    +   * filter any input.
    +   *
    +   * \sa javaScriptValidate()
    +   */
    +  virtual std::string inputFilter() const;
    +
    +  void repaint();
    +
    +private:
    +  bool         mandatory_;
    +  WString      mandatoryText_;
    +
    +  std::vector<WFormWidget *> formWidgets_;
    +
    +  void addFormWidget(WFormWidget *w);
    +  void removeFormWidget(WFormWidget *w);
    +
    +  friend class WFormWidget;
    +};
    +
    +}
    +
    +#endif // WVALIDATOR_H_
    diff --git a/wt-3.1.7a/src/Wt/WValidator.C b/wt-3.1.7a/src/Wt/WValidator.C
    new file mode 100644
    index 0000000..d40a769
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WValidator.C
    @@ -0,0 +1,109 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Utils.h"
    +
    +#include "Wt/WFormWidget"
    +#include "Wt/WValidator"
    +#include "Wt/WString"
    +
    +namespace Wt {
    +
    +WValidator::WValidator(WObject *parent)
    +  : WObject(parent),
    +    mandatory_(false)
    +{ }
    +
    +WValidator::WValidator(bool mandatory, WObject *parent)
    +  : WObject(parent),
    +    mandatory_(mandatory)
    +{ }
    +
    +WValidator::~WValidator()
    +{
    +  for (int i = formWidgets_.size() - 1; i >= 0; --i)
    +    formWidgets_[i]->setValidator(0);
    +}
    +
    +void WValidator::setMandatory(bool mandatory)
    +{
    +  if (mandatory_ != mandatory) {
    +    mandatory_ = mandatory;
    +    repaint();
    +  }
    +}
    +
    +void WValidator::setInvalidBlankText(const WString& text)
    +{
    +  mandatoryText_ = text;
    +  repaint();
    +}
    +
    +WString WValidator::invalidBlankText() const
    +{
    +  if (!mandatoryText_.empty())
    +    return mandatoryText_;
    +  else
    +    return WString::tr("Wt.WValidator.Invalid");
    +}
    +
    +void WValidator::fixup(WString& input) const
    +{ }
    +
    +WValidator::State WValidator::validate(WT_USTRING& input) const
    +{
    +  if (isMandatory()) {
    +    if (input.empty())
    +      return InvalidEmpty;
    +  }
    +
    +  return Valid;
    +}
    +
    +std::string WValidator::javaScriptValidate(const std::string& jsRef) const
    +{
    +  if (!mandatory_) {
    +    return "{valid:true}";
    +  } else {
    +    return "function(e,t){"
    +      "var v=e.value.length!=0;"
    +      "return {valid:v,message:t};"
    +      "}(" + jsRef + "," + invalidBlankText().jsStringLiteral() + ")";
    +  }
    +}
    +
    +std::string WValidator::inputFilter() const
    +{
    +  return std::string();
    +}
    +
    +void WValidator::repaint()
    +{
    +  for (unsigned i = 0; i < formWidgets_.size(); ++i)
    +    formWidgets_[i]->validatorChanged();
    +}
    +
    +void WValidator::addFormWidget(WFormWidget *w)
    +{
    +  formWidgets_.push_back(w);
    +}
    +
    +void WValidator::removeFormWidget(WFormWidget *w)
    +{
    +  Utils::erase(formWidgets_, w);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WValidator::createExtConfig(std::ostream& config) const
    +{
    +  if (mandatory_) {
    +    config << ",allowBlank:false";
    +    if (!mandatoryText_.empty())
    +      config << ",blankText:" << mandatoryText_.jsStringLiteral();
    +  }
    +}
    +#endif //WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WVectorImage b/wt-3.1.7a/src/Wt/WVectorImage
    new file mode 100644
    index 0000000..3f9a58a
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVectorImage
    @@ -0,0 +1,31 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVECTOR_IMAGE_H_
    +#define WVECTOR_IMAGE_H_
    +
    +#include <Wt/WPaintDevice>
    +
    +namespace Wt {
    +
    +/*! \class WVectorImage Wt/WVectorImage Wt/WVectorImage
    + *  \brief An abstract paint device for rendering using native vector graphics.
    + *
    + * \ingroup painting
    + */
    +class WT_API WVectorImage : public WPaintDevice
    +{
    +public:
    +  ~WVectorImage();
    +
    +  /*! \brief Internal method.
    +   */
    +  virtual std::string rendered() = 0;
    +};
    +
    +}
    +
    +#endif // WVECTOR_IMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WVectorImage.C b/wt-3.1.7a/src/Wt/WVectorImage.C
    new file mode 100644
    index 0000000..eae2cf9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVectorImage.C
    @@ -0,0 +1,14 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WVectorImage"
    +
    +namespace Wt {
    +
    +WVectorImage::~WVectorImage()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WViewWidget b/wt-3.1.7a/src/Wt/WViewWidget
    new file mode 100644
    index 0000000..34a38e9
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WViewWidget
    @@ -0,0 +1,190 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVIEWWIDGET_H_
    +#define WVIEWWIDGET_H_
    +
    +#include <Wt/WWebWidget>
    +
    +namespace Wt {
    +
    +/*! \class WViewWidget Wt/WViewWidget Wt/WViewWidget
    + *  \brief An abstract base class for an MVC view that is rendered using a
    + *         widget.
    + *
    + * In principle, %Wt widgets are self-contained and manage both their
    + * content, behavior and layout. From the point of view of a
    + * Model-View-Controller (MVC) design pattern, they implement each of
    + * these, except for the view widgets that work in conjunction with
    + * WAbstractItemModel. As a developer you can chose to keep Model,
    + * View and Controller together or separate them as you wish.
    + *
    + * This widget facilitates separation of the View from the Model and
    + * Controller in a particular way. The %View is rendered as a %Wt
    + * widget. The use of this widget provides two benefits. The classic
    + * MVC benefit is a decoupling between view and model, which may allow
    + * easier maintainance of code. In addition, this widget enforces the
    + * View to be stateless, as it is only created transiently on the
    + * server. Therefore the View does not require session resources. This
    + * may increase scalability for Internet-deployments.
    + *
    + * The rendered View widget returned by renderView() should reflect
    + * the current model state. Whenever the model changes, rerendering
    + * can be triggered by calling update().
    + *
    + * Currently, the View cannot enclose \link WFormWidget
    + * WFormWidgets\endlink which would allow direct manipulation of the
    + * model (but we are working to remove this limitation in the future,
    + * and let the Model/Controller handle editing changes) and the View
    + * may only be updated by a complete rerendering of the entire view.
    + *
    + * The View widget may contain event handling code, but only in one of
    + * the following ways:
    + * <ul>
    + *   <li>event handling implemented directly in JavaScript code</li>
    + *   <li>event handling implemented in pre-learned stateless slot
    + *     implementations</li>
    + * </ul>
    + * Thus, currently, event handling code related to the View cannot be
    + * implemented at server-side (but we are thinking about a solution for
    + * this as well...).
    + *
    + * \if cpp
    + * Implementation example:
    + * \code
    + * // Shows the contents for a specific role of a model index in a WText widget
    + * class SourceView : public Wt::WViewWidget
    + * {
    + * public:
    + *   // role is the ItemDataRole
    + *   SourceView(int role)
    + *     : role_(role)
    + *   { }
    + *
    + *   // set an index
    + *   void setIndex(const Wt::WModelIndex& index) {
    + *     if (index != index_
    + *         && (!index.isValid() || !index.data(role_).empty())) {
    + *       index_ = index;
    + *       update(); // trigger rerendering of the view
    + *     }
    + *   }
    + *
    + * private:
    + *   Wt::WModelIndex index_;
    + *   int             role_;
    + *
    + * protected:
    + *   virtual Wt::WWidget *renderView() {
    + *     Wt::WText *result = new Wt::WText();
    + *     result->setInline(false);
    + *
    + *     if (!index_.isValid())
    + *       return result;
    + *
    + *     boost::any d = index_.data(role_);
    + *     const std::string& t = boost::any_cast<const std::string&>(d);
    + *
    + *     result->setTextFormat(Wt::PlainText);
    + *     result->setText(t);
    + *
    + *     return result;
    + *   }
    + * };
    + * 
    + * \endcode
    + * \endif
    + *
    + * <h3>CSS</h3>
    + *
    + * This widget does not provide styling, 
    + * and can be styled using inline or external CSS as appropriate.
    + */
    +class WT_API WViewWidget : public WWebWidget
    +{
    +public:
    +  /*! \brief Creates a new view widget.
    +   */
    +  WViewWidget(WContainerWidget *parent = 0);
    +
    +  /*! \brief Updates the view.
    +   *
    +   * Typically, the model will want to update the view when the model
    +   * has changed.
    +   *
    +   * This will trigger a call to renderView() to ask for a new rendering of
    +   * the view.
    +   */
    +  void update();
    +
    +  virtual void load();
    +  virtual void render(WFlags<RenderFlag> flags);
    +  virtual void refresh();
    +
    +protected:
    +  /*! \brief Creates a widget that renders the View.
    +   *
    +   * This method must be reimplemented to return a widget that renders the
    +   * view. The returned widget will be deleted by %WViewWidget.
    +   */
    +  virtual WWidget *renderView() = 0;
    +
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep);
    +  virtual DomElementType domElementType() const;
    +
    +  virtual void doneRerender();
    +
    +private:
    +  WWidget *contents_;
    +  bool needContentsUpdate_;
    +};
    +
    +/*! \class WStaticModelView Wt/WViewWidget Wt/WViewWidget
    + *  \brief A widget that implements a view for a non-changing model.
    + *
    + * This model uses a function object which is passed in the
    + * constructor to render the View, and does not react to changes.
    + *
    + * You may want to use the utility function Wt::makeStaticModel() to create an
    + * instance of this class.
    + */
    +template <typename Renderer>
    +class WStaticModelView : public WViewWidget
    +{
    +public:
    +  /*! \brief Creates a new static model view, given a function
    +   *         object to render the View widget.
    +   */
    +  WStaticModelView(Renderer f, WContainerWidget *parent = 0)
    +    : WViewWidget(parent),
    +      f_(f) { }
    +
    +protected:
    +  WWidget *renderView() {
    +    return f_();
    +  }
    +
    +  Renderer f_;
    +};
    +
    +/*! \brief Wraps a widget into a view with a non-changing model.
    + *
    + * The ViewRenderer is called without arguments and must return a
    + * newly created widget (WWidget *).
    + *
    + * \relates WStaticModelView
    + */
    +template <typename Renderer>
    +WStaticModelView<Renderer>
    +*makeStaticModel(Renderer f, WContainerWidget *parent = 0)
    +{
    +  return new WStaticModelView<Renderer>(f, parent);
    +}
    +
    +}
    +
    +#endif // WVIEWWIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WViewWidget.C b/wt-3.1.7a/src/Wt/WViewWidget.C
    new file mode 100644
    index 0000000..1c99891
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WViewWidget.C
    @@ -0,0 +1,108 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WViewWidget"
    +
    +#include "WebSession.h"
    +#include "DomElement.h"
    +
    +namespace Wt {
    +
    +WViewWidget::WViewWidget(WContainerWidget *parent)
    +  : WWebWidget(parent),
    +    contents_(0)
    +{ }
    +
    +void WViewWidget::load()
    +{
    +  update();
    +
    +  WWebWidget::load();
    +}
    +
    +void WViewWidget::update()
    +{
    +  needContentsUpdate_ = true;
    +  if (isRendered())
    +    askRerender();
    +}
    +
    +void WViewWidget::refresh()
    +{
    +  if (!contents_)
    +    update();
    +}
    +
    +void WViewWidget::render(WFlags<RenderFlag> flags)
    +{
    +  if (needContentsUpdate_) {
    +    delete contents_; // just to be safe
    +
    +    WApplication::instance()->setExposeSignals(false);
    +    contents_ = renderView();
    +    WApplication::instance()->setExposeSignals(true);
    +
    +    addChild(contents_);
    +    setInline(contents_->isInline());
    +
    +    needContentsUpdate_ = false;
    +  }
    +
    +  WWebWidget::render(flags);
    +}
    +
    +void WViewWidget::updateDom(DomElement& element, bool all)
    +{
    +  WApplication *app = WApplication::instance();
    +  
    +  if (!app->session()->renderer().preLearning()) {
    +    if (all && !contents_) {
    +      needContentsUpdate_ = true;
    +      render(RenderFull);
    +    }
    +
    +    if (contents_) {
    +      bool savedVisibleOnly = app->session()->renderer().visibleOnly();
    +
    +      WApplication::instance()->session()->renderer().setVisibleOnly(false);
    +
    +      DomElement *e = contents_->createSDomElement(WApplication::instance());
    +
    +      if (!all)
    +	element.setWasEmpty(true); // removes previous content
    +      element.addChild(e);
    +
    +      WApplication::instance()->session()->renderer()
    +	.setVisibleOnly(savedVisibleOnly);
    +
    +      needContentsUpdate_ = false;
    +    }
    +  }
    +
    +  WWebWidget::updateDom(element, all);
    +}
    +
    +void WViewWidget::propagateRenderOk(bool deep)
    +{
    +  needContentsUpdate_ = false;
    +
    +  WWebWidget::propagateRenderOk(deep);
    +}
    +
    +void WViewWidget::doneRerender()
    +{
    +  setIgnoreChildRemoves(true);
    +  delete contents_;
    +  contents_ = 0;
    +  setIgnoreChildRemoves(false);
    +}
    +
    +DomElementType WViewWidget::domElementType() const
    +{
    +  return isInline() ? DomElement_SPAN : DomElement_DIV;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WVirtualImage b/wt-3.1.7a/src/Wt/WVirtualImage
    new file mode 100644
    index 0000000..d6aa76f
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVirtualImage
    @@ -0,0 +1,252 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVIRTUALIMAGE_H_
    +#define WVIRTUALIMAGE_H_
    +
    +#include <limits>
    +#include <Wt/WCompositeWidget>
    +#include <Wt/WJavaScriptSlot>
    +
    +namespace Wt {
    +
    +class WImage;
    +class WMouseEvent;
    +
    +/*! \class WVirtualImage Wt/WVirtualImage Wt/WVirtualImage
    + *  \brief An abstract widget that shows a viewport to a virtually large image.
    + *
    + * %WVirtualImage is an abstract class which renders a large image in
    + * small pieces. The large image is broken down, and rendered as a
    + * grid of smaller square images parts.
    + *
    + * The %WVirtualImage may provide interactive navigation using the
    + * mouse, by reacting to dragging of the mouse on the image.
    + * 
    + * The %WVirtualImage renders pieces in and bordering the current
    + * viewport. In this way, provided the individual pieces load
    + * sufficiently fast, the user has effectively the impression of
    + * scrolling through a single large image, without glitches. Whenever
    + * the image is navigated, if necessary, new images are rendered to
    + * maintain the border. Images that are too far from the current
    + * viewport are pruned away, so that browser memory remains bounded.
    + *
    + * To use this class, you must reimplement one of two virtual methods
    + * to specify the contents of each grid piece. Either you provide a
    + * suitable WImage for every grid piece, or you provide a WResource
    + * which renders the contents for a WImage for every grid piece.
    + *
    + * The total image dimensions are (0, 0) to (imageWidth, imageHeight)
    + * for a finite image, and become unbounded (including negative numbers)
    + * for each dimension which is Infinite.
    + * 
    + * <h3>CSS</h3>
    + *
    + * Styling through CSS is not applicable.
    + */
    +class WT_API WVirtualImage : public WCompositeWidget
    +{
    +public:
    +  /*! \brief Special value for imageWidth or imageHeight
    +   */
    +  static const ::int64_t Infinite;
    +
    +  /*! \brief Creates a viewport for a virtual image.
    +   *
    +   * You must specify the size of the viewport, and the size of the
    +   * virtual image. The latter dimensions may be the special value
    +   * Infinite, indicating that in one or more dimensions, the image
    +   * size is infinite (in practice limited by the maximum integer value).
    +   *
    +   * In addition, you must specify the size of each square grid
    +   * item. The default is 256 by 256.
    +   */
    +  WVirtualImage(int viewPortWidth, int viewPortHeight,
    +		::int64_t imageWidth, ::int64_t imageHeight,
    +		int gridImageSize = 256, WContainerWidget *parent = 0);
    +
    +  /*! \brief Destructor.
    +   */
    +  ~WVirtualImage();
    +
    +  /*! \brief Regenerates and redraws the image pieces.
    +   *
    +   * This method invalidates all current grid images, and recreates
    +   * them.
    +   */
    +  void redrawAll();
    +
    +  /*! \brief Enables mouse dragging to scroll around the image.
    +   *
    +   * The cursor is changed to a 'move' symbol to indicate the interactivity.
    +   */
    +  void enableDragging();
    +
    +  /*! \brief Scrolls the viewport of the image over a distance.
    +   *
    +   * \sa scrollTo()
    +   */
    +  void scroll(::int64_t dx, ::int64_t dy);
    +
    +  /*! \brief Scrolls the viewport of the image to a specific coordinate.
    +   *
    +   * Scroll the viewport so that its top left coordinate becomes (x, y).
    +   *
    +   * \sa scroll()
    +   */
    +  void scrollTo(::int64_t x, ::int64_t y);
    +
    +  /*! \brief Returns the virtual image width.
    +   *
    +   * \sa imageHeight(), resizeImage()
    +   */
    +  ::int64_t imageWidth() const { return imageWidth_; }
    +
    +  /*! \brief Returns the virtual image height.
    +   *
    +   * \sa imageWidth(), resizeImage()
    +   */
    +  ::int64_t imageHeight() const { return imageHeight_; }
    +
    +  /*! \brief Resizes the virtual image.
    +   *
    +   * This sets a new virtual size for the image. The viewport size sets the
    +   * visible portion of the image.
    +   *
    +   * \sa imageWidth(), imageHeight()
    +   */
    +  void resizeImage(::int64_t w, ::int64_t h);
    +
    +  /*! \brief Returns the viewport width.
    +   *
    +   * \sa viewPortHeight()
    +   */
    +  int viewPortWidth() const { return viewPortWidth_; }
    +
    +  /*! \brief Returns the viewport height.
    +   *
    +   * \sa viewPortWidth()
    +   */
    +  int viewPortHeight() const { return viewPortHeight_; }
    +
    +  /*! \brief Returns the size of a single piece.
    +   *
    +   * This is the size of a side of the square pieces that is used to render
    +   * the visible part of the image.
    +   */
    +  int gridImageSize() const { return gridImageSize_; }
    +
    +  /*! \brief Returns the current top left X coordinate.
    +   *
    +   * \sa currentTopLeftY()
    +   */
    +  ::int64_t currentTopLeftX() const { return currentX_; }
    +
    +  /*! \brief Returns the current top left Y coordinate.
    +   *
    +   * \sa currentTopLeftX()
    +   */
    +  ::int64_t currentTopLeftY() const { return currentY_; }
    +
    +  /*! \brief Returns the current bottom right X coordinate.
    +   *
    +   * \sa currentBottomRightY()
    +   */
    +  ::int64_t currentBottomRightX() const { return currentX_ + viewPortWidth_; }
    +
    +  /*! \brief Returns the current bottom right Y coordinate.
    +   *
    +   * \sa currentBottomRightX()
    +   */
    +  ::int64_t currentBottomRightY() const { return currentY_ + viewPortHeight_; }
    +
    +  /*! \brief %Signal emitted whenever the viewport changes.
    +   *
    +   * The viewport can be changed by the user dragging the image or through
    +   * the API methods scrollTo() and scroll().
    +   */
    +  Signal< ::int64_t, ::int64_t >& viewPortChanged() { return viewPortChanged_; }
    +
    +protected:
    +  /*! \brief Creates a grid image for the given rectangle.
    +   *
    +   * Create the image which spans image coordinates with left upper
    +   * corner (x, y) and given width and height.
    +   *
    +   * Width and height will not necesarilly equal gridImageSize(), if the
    +   * the image is not infinite sized.
    +   *
    +   * The default implementation calls render() and creates an image
    +   * for the resource returned.
    +   *
    +   * You should override this method if you wish to serve for example
    +   * static image content.
    +   *
    +   * \sa render()
    +   */
    +  virtual WImage *createImage(::int64_t x, ::int64_t y, int width, int height);
    +
    +  /*! \brief Render a grid image for the given rectangle.
    +   *
    +   * Returns a resource that streams an image which renders the
    +   * rectangle which spans image coordinates with left upper corner
    +   * (x, y) and given width and height.
    +   *
    +   * Width and height will not necesarilly equal to gridImageSize(), if the
    +   * the image is not infinite sized.
    +   *
    +   * The default implementation throws an Exception. You must
    +   * reimplement this method unless you reimplement createImage().
    +   *
    +   * \sa createImage()
    +   */
    +  virtual WResource *render(::int64_t x, ::int64_t y, int width, int height);
    +
    +private:
    +  Signal<int64_t, int64_t> viewPortChanged_;
    +
    +  WContainerWidget *impl_;
    +  WContainerWidget *contents_;
    +
    +  struct Rect {
    +    ::int64_t x1, y1, x2, y2;
    +    
    +    Rect(::int64_t x1_, ::int64_t y1_, ::int64_t x2_, ::int64_t y2_)
    +      : x1(x1_), y1(y1_), x2(x2_), y2(y2_) { }
    +  };
    +
    +  typedef std::map< ::int64_t, WImage * > GridMap;
    +  GridMap grid_;
    +
    +  int gridImageSize_;
    +
    +  int viewPortWidth_;
    +  int viewPortHeight_;
    +  ::int64_t imageWidth_;
    +  ::int64_t imageHeight_;
    +
    +  ::int64_t currentX_;
    +  ::int64_t currentY_;
    +
    +  void mouseUp(const WMouseEvent& e);
    +
    +  Rect neighbourhood(::int64_t x, ::int64_t y, int marginX, int marginY);
    +  ::int64_t gridKey(::int64_t i, ::int64_t j);
    +  struct Coordinate {
    +    ::int64_t i;
    +    ::int64_t j;
    +  };
    +  void decodeKey(::int64_t key, Coordinate& coordinate);
    +  void generateGridItems(::int64_t newX, ::int64_t newY);
    +  void cleanGrid();
    +  bool visible(::int64_t i, ::int64_t j) const;
    +
    +  void internalScrollTo(::int64_t x, ::int64_t y, bool moveViewPort);
    +};
    +
    +}
    +
    +#endif // WVIRTUALIMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WVirtualImage.C b/wt-3.1.7a/src/Wt/WVirtualImage.C
    new file mode 100644
    index 0000000..2a19832
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVirtualImage.C
    @@ -0,0 +1,279 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WCssDecorationStyle"
    +#include "Wt/WImage"
    +#include "Wt/WResource"
    +#include "Wt/WScrollArea"
    +#include "Wt/WVirtualImage"
    +
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +const ::int64_t WVirtualImage::Infinite
    +  = std::numeric_limits< ::int64_t >::max();
    +
    +WVirtualImage::WVirtualImage(int viewPortWidth, int viewPortHeight,
    +			     ::int64_t imageWidth, ::int64_t imageHeight,
    +			     int gridImageSize,
    +			     WContainerWidget *parent)
    +  : WCompositeWidget(parent),
    +    viewPortChanged_(this),
    +    gridImageSize_(gridImageSize),
    +    viewPortWidth_(viewPortWidth),
    +    viewPortHeight_(viewPortHeight),
    +    imageWidth_(imageWidth),
    +    imageHeight_(imageHeight),
    +    currentX_(0),
    +    currentY_(0)
    +{
    +  setImplementation(impl_ = new WContainerWidget());
    +
    +  impl_->resize(viewPortWidth_, viewPortHeight_);
    +  impl_->setPositionScheme(Relative);
    +
    +  WScrollArea *scrollArea = new WScrollArea(impl_);
    +  scrollArea->resize(WLength(100, WLength::Percentage),
    +		     WLength(100, WLength::Percentage));
    +  scrollArea->setScrollBarPolicy(WScrollArea::ScrollBarAlwaysOff);
    +  scrollArea->setPositionScheme(Absolute);
    +
    +  contents_ = new WContainerWidget();
    +  contents_->setPositionScheme(Absolute);
    +
    +  scrollArea->setWidget(contents_);
    +}
    +
    +void WVirtualImage::enableDragging()
    +{
    +  /*
    +   * For dragging the virtual image, in client-side JavaScript if available.
    +   */
    +  impl_->mouseWentDown().connect("function(obj, event) {"
    +     "  var pc = " WT_CLASS ".pageCoordinates(event);"
    +     "  obj.setAttribute('dsx', pc.x);"
    +     "  obj.setAttribute('dsy', pc.y);"
    +     "}");
    +
    +  impl_->mouseMoved().connect("function(obj, event) {"
    +     """var WT= " WT_CLASS ";"
    +     """var lastx = obj.getAttribute('dsx');"
    +     """var lasty = obj.getAttribute('dsy');"
    +     """if (lastx != null && lastx != '') {"
    +     ""  "var nowxy = WT.pageCoordinates(event);"
    +     ""  "var img = " + contents_->jsRef() + ";"
    +     ""  "img.style.left = (WT.pxself(img, 'left')+nowxy.x-lastx) + 'px';"
    +     ""  "img.style.top = (WT.pxself(img, 'top')+nowxy.y-lasty) + 'px';"
    +     ""  "obj.setAttribute('dsx', nowxy.x);"
    +     ""  "obj.setAttribute('dsy', nowxy.y);"
    +     """}"
    +     "}");
    +
    +  impl_->mouseWentUp().connect("function(obj, event) {"
    +     + impl_->jsRef() + ".removeAttribute('dsx');"
    +     "}");
    +
    +  impl_->mouseWentUp().connect(this, &WVirtualImage::mouseUp);
    +  impl_->decorationStyle().setCursor(OpenHandCursor);
    +}
    +
    +WVirtualImage::~WVirtualImage()
    +{
    +  for (GridMap::iterator it = grid_.begin(); it != grid_.end(); ++it) {
    +    delete it->second->resource();
    +    delete it->second;
    +  }
    +}
    +
    +void WVirtualImage::mouseUp(const WMouseEvent& e)
    +{
    +  internalScrollTo(currentX_ - e.dragDelta().x, currentY_ - e.dragDelta().y,
    +		   !WApplication::instance()->environment().ajax());
    +}
    +
    +void WVirtualImage::redrawAll()
    +{
    +  for (GridMap::iterator it = grid_.begin(); it != grid_.end(); ++it) {
    +    delete it->second->resource();
    +    delete it->second;
    +  }
    +
    +  grid_.clear();
    +
    +  generateGridItems(currentX_, currentY_);
    +}
    +
    +void WVirtualImage::resizeImage(::int64_t w, ::int64_t h)
    +{
    +  imageWidth_ = w;
    +  imageHeight_ = h;
    +
    +  redrawAll();
    +}
    +
    +void WVirtualImage::scrollTo(::int64_t newX, ::int64_t newY)
    +{
    +  internalScrollTo(newX, newY, true);
    +}
    +
    +void WVirtualImage::internalScrollTo(::int64_t newX, ::int64_t newY,
    +				     bool moveViewPort)
    +{
    +  if (imageWidth_ != Infinite)
    +    newX = std::min(imageWidth_ - viewPortWidth_,
    +		    std::max((::int64_t)0, newX));
    +  if (imageHeight_ != Infinite)
    +    newY = std::min(imageHeight_ - viewPortHeight_,
    +		    std::max((::int64_t)0, newY));
    +
    +  if (moveViewPort) {
    +    contents_->setOffsets((double)-newX, Left);
    +    contents_->setOffsets((double)-newY, Top);
    +  }
    +
    +  generateGridItems(newX, newY);
    +
    +  viewPortChanged_.emit(currentX_, currentY_);
    +}
    +
    +void WVirtualImage::scroll(::int64_t dx, ::int64_t dy)
    +{
    +  scrollTo(currentX_ + dx, currentY_ + dy);
    +}
    +
    +WImage *WVirtualImage::createImage(::int64_t x, ::int64_t y,
    +				   int width, int height)
    +{
    +  WResource *r = render(x, y, width, height);
    +  return new WImage(r, "");
    +}
    +
    +WResource *WVirtualImage::render(::int64_t x, ::int64_t y,
    +				 int width, int height)
    +{
    +  throw WtException("You should reimplement WVirtualImage::render()");
    +}
    +
    +void WVirtualImage::generateGridItems(::int64_t newX, ::int64_t newY)
    +{
    +  /*
    +   * The coordinates of the two extreme corners of the new rendered
    +   * neighbourhood
    +   */
    +  Rect newNb = neighbourhood(newX, newY, viewPortWidth_, viewPortHeight_);  
    +
    +  ::int64_t i1 = newNb.x1 / gridImageSize_;
    +  ::int64_t j1 = newNb.y1 / gridImageSize_;
    +  ::int64_t i2 = newNb.x2 / gridImageSize_ + 1;
    +  ::int64_t j2 = newNb.y2 / gridImageSize_ + 1;
    +
    +  for (int invisible = 0; invisible < 2; ++invisible) {
    +    for (::int64_t i = i1; i < i2; ++i)
    +      for (::int64_t j = j1; j < j2; ++j) {
    +	::int64_t key = gridKey(i, j);
    +
    +	GridMap::iterator it = grid_.find(key);
    +	if (it == grid_.end()) {
    +	  bool v = visible(i, j);
    +	  if ((v && !invisible) || (!v && invisible)) {
    +	    ::int64_t brx = i * gridImageSize_ + gridImageSize_;
    +	    ::int64_t bry = j * gridImageSize_ + gridImageSize_;
    +	    brx = std::min(brx, imageWidth_);
    +	    bry = std::min(bry, imageHeight_);
    +
    +	    WImage *img = createImage(i * gridImageSize_, j * gridImageSize_,
    +				      (int)(brx - i * gridImageSize_),
    +				      (int)(bry - j * gridImageSize_));
    +
    +	    img->setAttributeValue("onmousedown", "return false;");
    +	    contents_->addWidget(img);
    +	    img->setPositionScheme(Absolute);
    +	    img->setOffsets((double)i * gridImageSize_, Left);
    +	    img->setOffsets((double)j * gridImageSize_, Top);
    +
    +	    grid_[key] = img;
    +	  }
    +	}
    +      }
    +  }
    +
    +  currentX_ = newX;
    +  currentY_ = newY;
    +
    +  cleanGrid();
    +}
    +
    +::int64_t WVirtualImage::gridKey(::int64_t i, ::int64_t j)
    +{
    +  return i * 1000 + j; // I should consider fixing this properly ...
    +}
    +
    +bool WVirtualImage::visible(::int64_t i, ::int64_t j) const
    +{
    +  ::int64_t x1 = i * gridImageSize_;
    +  ::int64_t y1 = j * gridImageSize_;
    +  ::int64_t x2 = x1 + gridImageSize_;
    +  ::int64_t y2 = y1 + gridImageSize_;
    +
    +  return ((x2 >= currentX_) && (y2 >= currentY_)
    +	  && (x1 <= currentX_ + viewPortWidth_)
    +	  && (y1 <= currentY_ + viewPortHeight_));
    +}
    +
    +void WVirtualImage::decodeKey(::int64_t key, Coordinate& coordinate)
    +{
    +  coordinate.i = key / 1000;
    +  coordinate.j = key % 1000;
    +}
    +
    +void WVirtualImage::cleanGrid()
    +{
    +  Rect cleanNb = neighbourhood(currentX_, currentY_, 
    +			       viewPortWidth_ * 3, viewPortHeight_ * 3);
    +
    +  ::int64_t i1 = cleanNb.x1 / gridImageSize_;
    +  ::int64_t j1 = cleanNb.y1 / gridImageSize_;
    +  ::int64_t i2 = cleanNb.x2 / gridImageSize_ + 1;
    +  ::int64_t j2 = cleanNb.y2 / gridImageSize_ + 1;
    +
    +  for (GridMap::iterator it = grid_.begin(); it != grid_.end();) {
    +    Coordinate coordinate;
    +    decodeKey(it->first, coordinate);
    +
    +    if (coordinate.i < i1 || coordinate.i > i2 || 
    +	coordinate.j < j1 || coordinate.j > j2) {
    +      delete it->second->resource();
    +      delete it->second;
    +      Utils::eraseAndNext(grid_, it);
    +    } else
    +      ++it;
    +  }
    +}
    +
    +WVirtualImage::Rect WVirtualImage::neighbourhood(::int64_t x, ::int64_t y,
    +						 int marginX, int marginY)
    +{
    +  ::int64_t x1 = x - marginX;
    +
    +  if (imageWidth_ != Infinite)
    +    x1 = std::max((::int64_t)0, x1);
    +
    +  ::int64_t y1 = std::max((::int64_t)0, y - marginY);
    +
    +  ::int64_t x2 = x + viewPortWidth_ + marginX;
    +  if (imageWidth_ != Infinite)
    +    x2 = std::min(imageWidth_, x2);
    +  
    +  ::int64_t y2 = std::min(imageHeight_, y + viewPortHeight_ + marginY);
    +
    +  return Rect(x1, y1, x2, y2);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WVmlImage b/wt-3.1.7a/src/Wt/WVmlImage
    new file mode 100644
    index 0000000..6aa83c3
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVmlImage
    @@ -0,0 +1,109 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WVML_IMAGE_H_
    +#define WVML_IMAGE_H_
    +
    +#include <Wt/WBrush>
    +#include <Wt/WPen>
    +#include <Wt/WRectF>
    +#include <Wt/WShadow>
    +#include <Wt/WTransform>
    +#include <Wt/WVectorImage>
    +#include <Wt/WResource>
    +
    +#include <sstream>
    +
    +namespace Wt {
    +
    +class WColor;
    +
    +/*! \class WVmlImage Wt/WVmlImage Wt/WVmlImage
    + *  \brief A paint device for rendering using the VML pseudo-standard.
    + *
    + * The %WVmlImage is used by WPaintedWidget to render to the browser
    + * using the Vector Markup Language (VML) (to support graphics on
    + * Internet Explorer browsers).
    + *
    + * \note The current implementation has only limited support for
    + * clipping: only rectangular areas aligned with the X/Y axes can be used
    + * as clipping path.
    + *
    + * \ingroup painting
    + */
    +class WT_API WVmlImage : public WVectorImage
    +{
    +public:
    +  /*! \brief Create a VML paint device.
    +   */
    +  WVmlImage(const WLength& width, const WLength& height);
    +
    +  virtual void setChanged(WFlags<ChangeFlag> flags);
    +  virtual void drawArc(const WRectF& rect, double startAngle, double spanAngle);
    +  virtual void drawImage(const WRectF& rect, const std::string& imgUri,
    +			 int imgWidth, int imgHeight, const WRectF& sourceRect);
    +  virtual void drawLine(double x1, double y1, double x2, double y2);
    +  virtual void drawPath(const WPainterPath& path);
    +  virtual void drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			const WString& text);
    +  virtual void init();
    +  virtual void done();
    +  virtual bool paintActive() const { return painter_ != 0; }
    +
    +  virtual std::string rendered();
    +
    +  virtual WLength width() const { return width_; }
    +  virtual WLength height() const { return height_; }
    +
    +protected:
    +  virtual WPainter *painter() const { return painter_; }
    +  virtual void setPainter(WPainter *painter) { painter_ = painter; }
    +  virtual void clear();
    +
    +private:
    +  WLength    width_, height_;
    +  WPainter  *painter_;
    +  bool       paintUpdate_;
    +
    +  bool       penBrushShadowChanged_;
    +  bool       clippingChanged_;
    +
    +  WBrush     currentBrush_;
    +  WPen       currentPen_;
    +  WShadow    currentShadow_;
    +
    +  struct ActivePath {
    +    std::string path;
    +    WRectF      bbox;
    +
    +    ActivePath() { };
    +  };
    +
    +  std::vector<ActivePath> activePaths_;
    +
    +  std::stringstream rendered_;
    +
    +  void        finishPaths();
    +  void        processClipping();
    +  std::string fillElement(const WBrush& brush) const;
    +  std::string strokeElement(const WPen& pen) const;
    +  std::string skewElement(const WTransform& transform) const;
    +  std::string shadowElement(const WShadow& shadow) const;
    +  std::string createShadowFilter() const;
    +
    +  static std::string colorAttributes(const WColor& color);
    +  static std::string quote(double s);
    +  static std::string quote(const std::string& s);
    +
    +  void startClip(const WRectF& rect);
    +  void stopClip();
    +
    +  WRectF currentRect_;
    +};
    +
    +}
    +
    +#endif // WVML_IMAGE_H_
    diff --git a/wt-3.1.7a/src/Wt/WVmlImage.C b/wt-3.1.7a/src/Wt/WVmlImage.C
    new file mode 100644
    index 0000000..31b86cd
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WVmlImage.C
    @@ -0,0 +1,783 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*
    + * The rendering of VML on high DPI displays on IE6 and IE7 is not fully
    + * supported. That is because IE scales entire websites up on such
    + * displays, but somebody forgot about VML. For more information about
    + * this scaling, google for strings such as UseHR (the registry key
    + * to enable/disable this scaling), screen.deviceXDPI, screen.logicalXDPI.
    + *
    + * At the time, there is only a handful computers who have this setting
    + * enabled, and the rest of the internet does not appear to care about
    + * them too much (e.g. google maps renders wrong on such displays). We do
    + * our best, but some artefacts cannot be compensated for.
    + *
    + * Known limitations:
    + * - mirrored text will be drawn as upside-down text
    + * - rotated text will not show up on the exact correct position. The longer
    + *   the string, the wronger the position
    + *
    + * We blame this on a problematic amount of bugs in the VML rendering of IE.
    + *
    + */
    +
    +#include "DomElement.h"
    +#include "EscapeOStream.h"
    +#include "Utils.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLogger"
    +#include "Wt/WPainter"
    +#include "Wt/WPainterPath"
    +#include "Wt/WRectF"
    +#include "Wt/WVmlImage"
    +#include "Wt/WWebWidget"
    +
    +#include <cmath>
    +#include <sstream>
    +#include <boost/lexical_cast.hpp>
    +
    +namespace {
    +  const int Z = 10;
    +
    +  int myzround(double a, bool doScale = true) {
    +    Wt::WApplication *app = Wt::WApplication::instance();
    +    double dpiScale = doScale ? app->environment().dpiScale() : 1.0;
    +    return static_cast<int>(dpiScale * ( (Z * a) - Z/2 + 0.5 ));
    +  }  
    +
    +  bool fequal(double d1, double d2) {
    +    return std::fabs(d1 - d2) < 1E-5;
    +  }
    +
    +  double norm(const Wt::WPointF& p) {
    +    return std::sqrt(p.x() * p.x() + p.y() * p.y());
    +  }
    +}
    +
    +/*
    + * Optimization possibilities:
    + * - like SVG, process transform completely to allow continuing an existing
    + *   path (not just translation)
    + * - use style classes to avoid the excessive repeated style information
    + */
    +
    +namespace Wt {
    +
    +WVmlImage::WVmlImage(const WLength& width, const WLength& height)
    +  : width_(width),
    +    height_(height),
    +    painter_(0),
    +    paintUpdate_(true),
    +    clippingChanged_(false)
    +{ }
    +
    +void WVmlImage::clear()
    +{
    +  paintUpdate_ = false;
    +  rendered_.str(std::string());
    +}
    +
    +void WVmlImage::init()
    +{ 
    +  currentBrush_ = painter()->brush();
    +  currentPen_ = painter()->pen();
    +  currentShadow_ = painter()->shadow();
    +  penBrushShadowChanged_ = true;
    +
    +  startClip(WRectF(0, 0, width().value(), height().value()));
    +}
    +
    +void WVmlImage::done()
    +{
    +  finishPaths();
    +  stopClip();
    +}
    +
    +void WVmlImage::setChanged(WFlags<ChangeFlag> flags)
    +{
    +  if (flags & (Pen | Brush | Shadow))
    +    penBrushShadowChanged_ = true;
    +
    +  if (flags & Clipping)
    +    clippingChanged_ = true;
    +}
    +
    +void WVmlImage::drawArc(const WRectF& rect, double startAngle, double spanAngle)
    +{
    +  painter()->save();
    +
    +  painter()->translate(rect.center().x(), rect.center().y());
    +  painter()->scale(1., rect.height() / rect.width());
    +
    +  WPainterPath path;
    +  path.arcMoveTo(0, 0, rect.width()/2., startAngle);
    +  path.arcTo(0, 0, rect.width()/2., startAngle, spanAngle);
    +  painter()->drawPath(path);
    +
    +  painter()->restore();
    +}
    +
    +void WVmlImage::drawImage(const WRectF& rect, const std::string& imgUri,
    +			  int imgWidth, int imgHeight, const WRectF& sourceRect)
    +{
    +  finishPaths();
    +  processClipping();
    +
    +  WTransform t = painter()->combinedTransform();
    +  WPointF tl = t.map(rect.topLeft());
    +
    +  rendered_ << "<v:group style=\"width:" << Z * width().value() << "px;height:"
    +	    << Z * height().value() << "px;";
    +
    +  double cx = 1, cy = 1;
    +
    +  if (t.m11() != 1.0 || t.m22() != 1.0 || t.m12() != 0.0 || t.m21() != 0.0) {
    +    cx = width().value() / rect.width();
    +    cy = height().value() / rect.height();
    +
    +    // FIXME: figure out padding ?
    +
    +    rendered_ << "filter:progid:DXImageTransform.Microsoft.Matrix(M11='"
    +	      << t.m11() / cx << "',M12='" << t.m21() / cy << "',M21='"
    +	      << t.m12() / cx << "',M22='" << t.m22() / cy << "',Dx='"
    +	      << tl.x() << "',Dy='" << tl.y() << "',sizingmethod='clip');";
    +  } else
    +    rendered_ << "top:" << Z * tl.y() << "px;left:" << Z * tl.x() << "px;";
    +
    +  rendered_ << "\"><v:image src=\"" << imgUri
    +	    << "\" style=\"width:" << Z * rect.width() * cx
    +	    << "px;height:" << Z * rect.height() * cy
    +	    << "px\" cropleft=\"" << sourceRect.x() / imgWidth
    +	    << "\" croptop=\"" << sourceRect.y() / imgHeight
    +	    << "\" cropright=\"" << (imgWidth - sourceRect.right())/imgWidth
    +	    << "\" cropbottom=\"" << (imgHeight - sourceRect.bottom())/imgHeight
    +	    << "\"/></v:group>";
    +}
    +
    +static WRectF transformBbox(const WTransform& t, const WRectF& r)
    +{
    +  double minX, minY, maxX, maxY;
    +
    +  WPointF p = t.map(r.topLeft());
    +  minX = maxX = p.x();
    +  minY = maxY = p.y();
    +
    +  for (unsigned i = 0; i < 3; ++i) {
    +    WPointF p2 = t.map(i == 0 ? r.bottomLeft()
    +		      : i == 1 ? r.topRight()
    +		      : r.bottomRight());
    +    minX = std::min(minX, p2.x());
    +    maxX = std::max(maxX, p2.x());
    +    minY = std::min(minY, p2.y());
    +    maxY = std::max(maxY, p2.y());
    +  }
    +
    +  return WRectF(minX, minY, maxX - minX, maxY - minY);
    +}
    +
    +void WVmlImage::drawPath(const WPainterPath& path)
    +{
    +  if (penBrushShadowChanged_)
    +    if ((currentPen_ != painter()->pen())
    +	|| (currentBrush_ != painter()->brush())
    +	|| (currentShadow_ != painter()->shadow()))
    +      finishPaths();
    +
    +  if (clippingChanged_) {
    +    if (!activePaths_.empty())
    +      finishPaths();
    +    processClipping();
    +  }
    +
    +  WTransform transform = painter()->combinedTransform();
    +  WRectF bbox = transformBbox(transform, path.controlPointRect());
    +
    +  int thisPath = -1;
    +  if (!activePaths_.empty())
    +    for (unsigned i = 0; i < activePaths_.size(); ++i) {
    +      if (!activePaths_[i].bbox.intersects(bbox)) {
    +	thisPath = i;
    +	break;
    +      }
    +    }
    +
    +  if (activePaths_.empty()) {
    +    currentPen_       = painter()->pen();
    +    currentBrush_     = painter()->brush();
    +    currentShadow_    = painter()->shadow();
    +    penBrushShadowChanged_ = false;
    +  }
    +
    +  SStream tmp;
    +
    +  const std::vector<WPainterPath::Segment>& segments = path.segments();
    +
    +  if (thisPath == -1) {
    +    tmp << "<v:shape style=\"width:" << (int)(Z * currentRect_.width())
    +	<< "px;height:" << (int)(Z * currentRect_.height())
    +	<< "px;\" path=\"m0,0l0,0";
    +
    +    activePaths_.push_back(ActivePath());
    +    thisPath = activePaths_.size() - 1;
    +  }
    +
    +#ifdef DEBUG_BBOX
    +  tmp << "m" << myzround(bbox.left()) << "," << myzround(bbox.top())
    +      << "l" << myzround(bbox.right()) << "," << myzround(bbox.bottom());
    +
    +  if (!activePaths_[thisPath].bbox.isEmpty()) {
    +    const WRectF& bbox = activePaths_[thisPath].bbox;
    +
    +    tmp << "m" << myzround(bbox.left()) << "," << myzround(bbox.top())
    +	<< "l" << myzround(bbox.right()) << "," << myzround(bbox.bottom());
    +  }
    +#endif // DEBUG_BBOX
    +
    +  if (segments.size() > 0
    +      && segments[0].type() != WPainterPath::Segment::MoveTo)
    +    tmp << "m0,0";
    +
    +  for (unsigned i = 0; i < segments.size(); ++i) {
    +    const WPainterPath::Segment s = segments[i];
    +
    +    /*
    +     * a move as last operation is (wrongly?) rendered as a stroke...
    +     * but this is common after a closeSubPath()
    +     */
    +    if ((i == segments.size() - 1)
    +	&& (s.type() == WPainterPath::Segment::MoveTo))
    +      break;
    +
    +    double x = s.x();
    +    double y = s.y();
    +
    +    if (s.type() == WPainterPath::Segment::ArcC) {
    +      double cx = segments[i].x();
    +      double cy = segments[i].y();
    +      double rx = segments[i+1].x();
    +      double ry = segments[i+1].y();
    +      double theta1 = -WTransform::degreesToRadians(segments[i+2].x());
    +      double deltaTheta = -WTransform::degreesToRadians(segments[i+2].y());
    +      i += 2;
    +
    +      WPointF c = transform.map(WPointF(cx, cy));
    +
    +      WPointF p1(rx * std::cos(theta1) + cx,
    +		 ry * std::sin(theta1) + cy);
    +      WPointF p2(rx * std::cos(theta1 + deltaTheta) + cx,
    +		 ry * std::sin(theta1 + deltaTheta) + cy);
    +
    +      // XXX: VML can only have ellipses with axes parallel to the X/Y
    +      //      axis. So this will fail if there is a rotation + unequal
    +      //      scale in X/Y direction.
    +      rx *= norm(WPointF(transform.m11(), transform.m12()));
    +      ry *= norm(WPointF(transform.m21(), transform.m22()));
    +
    +      WPointF a(c.x() - rx, c.y() - ry);
    +      WPointF b(c.x() + rx, c.y() + ry);
    +
    +      p1 = transform.map(p1);
    +      p2 = transform.map(p2);
    +
    +      tmp << (deltaTheta < 0 ? "at" : "wa")
    +	  <<        myzround(a.x()) << "," << myzround(a.y())
    +	  << "," << myzround(b.x()) << "," << myzround(b.y())
    +	  << "," << myzround(p1.x()) << "," << myzround(p1.y())
    +	  << "," << myzround(p2.x()) << "," << myzround(p2.y());
    +    } else {
    +      switch (s.type()) {
    +      case WPainterPath::Segment::MoveTo:
    +	tmp << "m";
    +	break;
    +      case WPainterPath::Segment::LineTo:
    +	tmp << "l";
    +	break;
    +      case WPainterPath::Segment::CubicC1:
    +	tmp << "c";
    +	break;
    +      case WPainterPath::Segment::CubicC2:
    +      case WPainterPath::Segment::CubicEnd:
    +	tmp << ",";
    +	break;
    +      case WPainterPath::Segment::QuadC: {
    +	/*
    +	 * VML's quadratic bezier don't seem to work as advertized ?
    +	 */
    +	WPointF current = path.positionAtSegment(i);
    +	const double cpx = s.x();
    +	const double cpy = s.y();
    +	const double xend = segments[i+1].x();
    +	const double yend = segments[i+1].y();
    +      
    +	const double cp1x = current.x() + 2.0/3.0*(cpx - current.x());
    +	const double cp1y = current.y() + 2.0/3.0*(cpy - current.y());
    +	const double cp2x = cp1x + (xend - current.x())/3.0;
    +	const double cp2y = cp1y + (yend - current.y())/3.0;
    +
    +	WPointF cp1(cp1x, cp1y);
    +        cp1 = transform.map(cp1);
    +
    +	tmp << "c" << myzround(cp1.x()) << "," << myzround(cp1.y()) << ",";
    +	x = cp2x;
    +	y = cp2y;
    +
    +	break;
    +      }
    +      case WPainterPath::Segment::QuadEnd:
    +	tmp << ",";
    +	break;
    +      default:
    +	assert(false);
    +      }
    +
    +      WPointF p(x, y);
    +      p = transform.map(p);
    +
    +      tmp << myzround(p.x()) << "," << myzround(p.y());
    +    }
    +  }
    +
    +  activePaths_[thisPath].path += tmp.str();
    +  activePaths_[thisPath].bbox = activePaths_[thisPath].bbox.united(bbox);
    +}
    +
    +std::string WVmlImage::createShadowFilter() const
    +{
    +  char buf[30];
    +  SStream filter;
    +  double r = std::sqrt(2 * currentShadow_.blur());
    +  filter << "left: " << myzround(currentShadow_.offsetX() - r/2 - 1) << "px;";
    +  filter << "top: " << myzround(currentShadow_.offsetY() - r/2 - 1) 
    +	 << "px;z-index:-10;";
    +  filter << "filter:progid:DXImageTransform.Microsoft.Blur(makeShadow=1,";
    +  filter << "pixelradius="
    +	 << Utils::round_str(r, 2, buf);
    +  filter << ",shadowOpacity="
    +	 << Utils::round_str(currentShadow_.color().alpha()/255., 2, buf)
    +	 << ");";
    +  return filter.str();
    +}
    +
    +void WVmlImage::finishPaths()
    +{
    +  for (unsigned i = 0; i < activePaths_.size(); ++i) {
    +    /*
    +     * High quality shadows are created by duplicating the path and
    +     * blurring it using a filter
    +     */
    +    if (!(painter()->renderHints() & WPainter::LowQualityShadows)
    +	&& !currentShadow_.none()) {
    +      const std::string& path = activePaths_[i].path;
    +      std::size_t pos = path.find("style=\"") + 7;
    +
    +      rendered_ << path.substr(0, pos)
    +		<< createShadowFilter()
    +		<< path.substr(pos)
    +		<< "e\">"
    +		<< strokeElement(currentPen_)
    +		<< fillElement(currentBrush_)
    +		<< "</v:shape>";
    +    }
    +    rendered_ << activePaths_[i].path
    +	      << "e\">"
    +	      << strokeElement(currentPen_)
    +	      << fillElement(currentBrush_)
    +	      << shadowElement(currentShadow_)
    +	      << "</v:shape>";
    +  }
    +
    +  activePaths_.clear();
    +}
    +
    +void WVmlImage::drawLine(double x1, double y1, double x2, double y2)
    +{
    +  WPainterPath path;
    +  path.moveTo(x1, y1);
    +  path.lineTo(x2, y2);
    +
    +  WBrush oldBrush = painter()->brush();
    +  painter()->setBrush(WBrush());
    +  drawPath(path);
    +  painter()->setBrush(oldBrush);
    +}
    +
    +void WVmlImage::drawText(const WRectF& rect, WFlags<AlignmentFlag> flags,
    +			 const WString& text)
    +{
    +  finishPaths();
    +
    +  WFlags<AlignmentFlag> horizontalAlign = flags & AlignHorizontalMask;
    +  WFlags<AlignmentFlag> verticalAlign = flags & AlignVerticalMask;
    +
    +#ifdef TEXT_DIVS
    +  DomElement *e = DomElement::createNew(DomElement::DIV);
    +
    +  WPointF pos = painter()->combinedTransform().map(rect.topLeft());
    +
    +  /*
    +   * HTML tricks to center things vertically in IE
    +   */
    +  e->setProperty(PropertyStylePosition, "absolute");
    +  e->setProperty(PropertyStyleTop,
    +		 boost::lexical_cast<std::string>(pos.y()) + "px");
    +  e->setProperty(PropertyStyleLeft,
    +		 boost::lexical_cast<std::string>(pos.x()) + "px");
    +  e->setProperty(PropertyStyleWidth,
    +		 boost::lexical_cast<std::string>(rect.width()) + "px");
    +  e->setProperty(PropertyStyleHeight,
    +		 boost::lexical_cast<std::string>(rect.height()) + "px");
    +
    +  DomElement *t = e;
    +  DomElement *i = 0;
    +
    +  if (verticalAlign != AlignTop) {
    +    t = DomElement::createNew(DomElement::DIV);
    +
    +    if (verticalAlign == AlignMiddle) {      
    +      i = DomElement::createNew(DomElement::DIV);
    +      i->setProperty(PropertyStylePosition, "absolute");
    +      i->setProperty(PropertyStyleTop, "50%");
    +
    +      t->setProperty(PropertyStylePosition, "relative");
    +      t->setProperty(PropertyStyleTop, "-50%");      
    +    } else if (verticalAlign == AlignBottom) {
    +      t->setProperty(PropertyStylePosition, "absolute");
    +      t->setProperty(PropertyStyleWidth, "100%");
    +      t->setProperty(PropertyStyleBottom, "0px");
    +    }
    +  }
    +
    +  t->setProperty(PropertyInnerHTML,
    +		 WWebWidget::escapeText(text, true).toUTF8());
    +
    +  WFont f = painter()->font();
    +  f.updateDomElement(*t, false, true);
    +
    +  t->setProperty(PropertyStyleColor, painter()->pen().color().cssText());
    +
    +  if (horizontalAlign == AlignRight) {
    +    t->setProperty(PropertyStyleTextAlign, "right");
    +    if (i)
    +      i->setProperty(PropertyStyleRight, "0px");
    +  } else if (horizontalAlign == AlignCenter)
    +    t->setProperty(PropertyStyleTextAlign, "center");
    +
    +  if (i) {
    +    i->addChild(t);
    +    e->addChild(i);
    +  } else if (t != e)
    +    e->addChild(t);
    +
    +  {
    +    EscapeOStream os(rendered_);
    +    DomElement::TimeoutList notused;
    +    e->asHTML(os, notused);
    +  }
    +
    +  delete e;
    +
    +#else
    +
    +  double fontSize;
    +  switch (painter()->font().size()) {
    +  case WFont::FixedSize:
    +    fontSize = painter()->font().fixedSize().toPixels();
    +    break;
    +  default:
    +    fontSize = 16;
    +  }
    +
    +  double y = rect.center().y();
    +  switch (verticalAlign) {
    +  case AlignTop:
    +    y = rect.top() + fontSize * 0.55; break;
    +  case AlignMiddle:
    +    y = rect.center().y(); break;
    +  case AlignBottom:
    +    y = rect.bottom() - fontSize * 0.45 ; break;
    +  default:
    +    break;
    +  }
    +
    +  EscapeOStream render;
    +  render << "<v:shape style=\"width:" << (int)(Z * currentRect_.width())
    +	 << "px;height:" << (int)(Z * currentRect_.height())
    +	 << "px;\"><v:path textpathok=\"True\" v=\"m"
    +	 << myzround(rect.left(), false) << ',' << myzround(y, false) << 'l'
    +	 << myzround(rect.right(), false) << ',' << myzround(y, false)
    +	 << "m0,0l0,0e\"/><v:fill on=\"True\" "
    +	 << colorAttributes(painter()->pen().color())
    +	 << "/><v:stroke on=\"False\"/>"
    +	 << skewElement(painter()->combinedTransform())
    +	 << "<v:textpath on=\"True\" string=\"";
    +
    +  render.pushEscape(EscapeOStream::HtmlAttribute);
    +  render << text.toUTF8();
    +  render.popEscape();
    +
    +  render << "\" style=\"v-text-align:";
    +
    +  switch (horizontalAlign) {
    +  case AlignLeft:
    +    render << "left"; break;
    +  case AlignCenter:
    +    render << "center"; break;
    +  case AlignRight:
    +    render << "right"; break;
    +  default:
    +    break;
    +  }
    +
    +  Wt::WApplication *app = Wt::WApplication::instance();
    +  Wt::WFont textFont(painter()->font());
    +  textFont.setSize(textFont.size(),
    +		   textFont.fixedSize() * app->environment().dpiScale());
    +
    +  render << ";font:" << textFont.cssText() << "\"/></v:shape>";
    +
    +  if (!(painter()->renderHints() & WPainter::LowQualityShadows)
    +      && !currentShadow_.none()) {
    +    std::string result = render.str();
    +    std::size_t pos = result.find("style=\"") + 7;
    +    rendered_ << result.substr(0, pos)
    +	      << createShadowFilter()
    +	      << result.substr(pos);
    +  }
    +
    +  rendered_ << render.str();
    +#endif
    +}
    +
    +std::string WVmlImage::quote(const std::string& s)
    +{
    +  return '"' + s + '"';
    +}
    +
    +std::string WVmlImage::quote(double d)
    +{
    +  char buf[30];
    +  return quote(Utils::round_str(d, 5, buf));
    +}
    +
    +std::string WVmlImage::colorAttributes(const WColor& color)
    +{
    +  std::string result = " color=" + quote(color.cssText());
    +
    +  if (color.alpha() != 255)
    +    result += " opacity=" + quote(color.alpha() / 255.);
    +
    +  return result;
    +}
    +
    +std::string WVmlImage::skewElement(const WTransform& t) const
    +{
    +  if (!t.isIdentity()) {
    +    char buf[30];
    +    SStream s;
    +
    +    s << "<v:skew on=\"true\" matrix=\""
    +      << Utils::round_str(t.m11(), 5, buf) << ',';
    +    s << Utils::round_str(t.m21(), 5, buf) << ',';
    +    s << Utils::round_str(t.m12(), 5, buf) << ',';
    +    s << Utils::round_str(t.m22(), 5, buf)
    +      << ",0,0\""
    +      " origin=\"-0.5 -0.5\""
    +      " offset=\"";
    +    s << Utils::round_str(t.dx() + std::fabs(t.m11()) * 0.5, 5, buf)
    +      << "px,";
    +    s << Utils::round_str(t.dy() + std::fabs(t.m22()) * 0.5, 5, buf)
    +      << "px\"/>";
    +
    +    /*
    +     * Note adding negative t.m11() and t.m22() seems to correct a
    +     * slight discrepancy in the paint example -- not sure if it is 
    +     * a good general rule though !
    +     * The vertical correction is another weird thing ?
    +     */
    +
    +    return s.str();
    +  } else
    +    return std::string();
    +}
    +
    +std::string WVmlImage::shadowElement(const WShadow& shadow) const
    +{
    +  if (!(painter()->renderHints() & WPainter::LowQualityShadows))
    +    return std::string();
    +
    +  char buf[30];
    +
    +  if (!shadow.none()) {
    +    SStream result;
    +
    +    result << "<v:shadow on=\"true\" offset=\""
    +	   << Utils::round_str(shadow.offsetX(), 3, buf) << "px,";
    +    result << Utils::round_str(shadow.offsetY(), 3, buf) << "px\" "
    +	   << colorAttributes(shadow.color()) << "/>";
    +
    +    return result.str();
    +  } else
    +    return std::string();
    +}
    +
    +std::string WVmlImage::fillElement(const WBrush& brush) const
    +{
    +  if (brush.style() != NoBrush) {
    +    return "<v:fill " + colorAttributes(brush.color()) + "/>";
    +  } else
    +    return "<v:fill on=\"false\" />";
    +}
    +
    +std::string WVmlImage::strokeElement(const WPen& pen) const
    +{
    +  if (pen.style() != NoPen) {
    +    std::string result;
    +
    +    result = "<v:stroke " + colorAttributes(pen.color());
    +
    +    switch (pen.capStyle()) {
    +    case FlatCap:
    +      result += " endcap=\"flat\"";
    +      break;
    +    case SquareCap:
    +      result += " endcap=\"square\"";
    +      break;
    +    case RoundCap:
    +      break;
    +    }
    +
    +    switch (pen.joinStyle()) {
    +    case MiterJoin:
    +      result += " joinstyle=\"miter\"";
    +      break;
    +    case BevelJoin:
    +      result += " joinstyle=\"bevel\"";
    +      break;
    +    case RoundJoin:
    +      break;
    +    }
    +
    +    switch (pen.style()) {
    +    case NoPen:
    +      break;
    +    case SolidLine:
    +      break;
    +    case DashLine:
    +      result += " dashstyle=\"dash\"";
    +      break;
    +    case DotLine:
    +      result += " dashstyle=\"dot\"";
    +      break;
    +    case DashDotLine:
    +      result += " dashstyle=\"dashdot\"";
    +      break;
    +    case DashDotDotLine:
    +      result += " dashstyle=\"2 2 0 2 0 2\"";
    +      break;
    +    }
    +
    +    WLength w = painter()->normalizedPenWidth(pen.width(), false);
    +    if (w != WLength(1))
    +      result += " weight=" + quote(w.cssText());
    +
    +    return result + "/>";
    +  } else
    +    return "<v:stroke on=\"false\" />";
    +}
    +
    +void WVmlImage::processClipping()
    +{
    +  if (clippingChanged_) {
    +    /*
    +     * We can only deal with rectangles.
    +     */
    +    if (painter()->hasClipping()) {
    +      WRectF rect;
    +      if (painter()->clipPath().asRect(rect)) {
    +	WTransform t = painter()->clipPathTransform();
    +
    +	WPointF tl = t.map(rect.topLeft());
    +	WPointF tr = t.map(rect.topRight());
    +	WPointF bl = t.map(rect.bottomLeft());
    +	WPointF br = t.map(rect.bottomRight());
    +
    +	double tlx = 0, tly = 0, brx = 0, bry = 0;
    +	bool ok = false;
    +	if (fequal(tl.y(), tr.y())) {
    +	  tlx = std::min(tl.x(), tr.x());
    +	  brx = std::max(tl.x(), tr.x());
    +	  tly = std::min(tl.y(), bl.y());
    +	  bry = std::max(tl.y(), br.y());
    +
    +	  ok = true;
    +	} else if (fequal(tl.x(), tr.x())) {
    +	  tlx = std::min(tl.x(), bl.x());
    +	  brx = std::max(tl.x(), bl.x());
    +	  tly = std::min(tl.y(), tr.y());
    +	  bry = std::max(tl.y(), tr.y());
    +
    +	  ok = true;
    +	}
    +
    +	if (ok) {
    +	  stopClip();
    +	  startClip(WRectF(tlx, tly, brx - tlx, bry - tly));
    +	} else
    +	  wApp->log("warn") << "VML only supports rectangle clipping "
    +	    "with rectangles aligned to the window";
    +      } else
    +	wApp->log("warn") << "VML only supports rectangle clipping";
    +    } else {
    +      stopClip();
    +      startClip(WRectF(0, 0, width().value(), height().value()));
    +    }
    +
    +    clippingChanged_ = false;
    +  }
    +}
    +
    +std::string WVmlImage::rendered()
    +{
    +
    +  if (paintUpdate_)
    +    return rendered_.str();
    +  else {
    +    SStream s;
    +    s << "<div style=\"position:relative;width:"
    +      << width().cssText() << ";height:" << height().cssText()
    +      << ";overflow:hidden;\">"
    +      << rendered_.str()
    +      << "</div>";
    +    return s.str();
    +  }
    +}
    +
    +void WVmlImage::startClip(const WRectF& rect)
    +{
    +  rendered_ << "<div style=\"position:absolute;left:"
    +	    << rect.left() << "px;top:" << rect.top() << "px;width:"
    +	    << rect.width() << "px;height:" << rect.height() 
    +	    << "px;overflow:hidden;\""
    +	    << " onselectstart=\"return false;\">"
    +	    << "<v:group style=\"position:absolute;left:0px;top:0px;width:"
    +	    << rect.width() << "px;height:" 
    +	    << rect.height() << "px\" coordorigin=\""
    +	    << 0.5 * rect.left() * Z 
    +	    << "," << 0.5 * rect.top() * Z << "\" coordsize=\""
    +	    << rect.width() * Z << "," << rect.height() * Z << "\">";
    +
    +  currentRect_ = rect;
    +}
    +
    +void WVmlImage::stopClip()
    +{
    +  rendered_ << "</v:group></div>";
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WWebWidget b/wt-3.1.7a/src/Wt/WWebWidget
    new file mode 100644
    index 0000000..44b187e
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWebWidget
    @@ -0,0 +1,461 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WWEB_WIDGET_H_
    +#define WWEB_WIDGET_H_
    +
    +#include <set>
    +#include <bitset>
    +
    +#include <Wt/WString>
    +#include <Wt/WWidget>
    +#include <Wt/WEvent>
    +
    +#ifdef WT_CNOR
    +#include <Wt/WJavaScript>
    +#endif // WT_CNOR
    +
    +namespace Wt {
    +
    +class SStream;
    +class WApplication;
    +
    +enum DomElementType {
    +  DomElement_A, DomElement_BR, DomElement_BUTTON, DomElement_COL,
    +  DomElement_DIV, DomElement_FIELDSET, DomElement_FORM,
    +  DomElement_H1, DomElement_H2, DomElement_H3, DomElement_H4,
    +
    +  DomElement_H5, DomElement_H6, DomElement_IFRAME, DomElement_IMG,
    +  DomElement_INPUT, DomElement_LABEL, DomElement_LEGEND, DomElement_LI,
    +  DomElement_OL,
    +
    +  DomElement_OPTION, DomElement_UL, DomElement_SCRIPT, DomElement_SELECT,
    +  DomElement_SPAN, DomElement_TABLE, DomElement_TBODY, DomElement_THEAD,
    +  DomElement_TH, DomElement_TD,
    +  DomElement_TEXTAREA,
    +
    +  DomElement_TR, DomElement_P, DomElement_CANVAS,
    +  DomElement_MAP, DomElement_AREA,
    +
    +  DomElement_OBJECT, DomElement_PARAM,
    +  
    +  DomElement_AUDIO, DomElement_VIDEO, DomElement_SOURCE
    +};
    +
    +enum RepaintFlag {
    +  RepaintPropertyIEMobile = 0x1 << 12,  // pocket PC 2002 or later
    +  RepaintPropertyAttribute = 0x1 << 13, // any attribute or property
    +  RepaintInnerHtml = 0x1 << 14,
    +  RepaintToAjax = 0x1 << 15
    +};
    +
    +W_DECLARE_OPERATORS_FOR_FLAGS(RepaintFlag);
    +
    +static const WFlags<RepaintFlag> RepaintAll
    +  = RepaintPropertyIEMobile | RepaintPropertyAttribute | RepaintInnerHtml;
    +
    +class WCssDecorationStyle;
    +class WContainerWidget;
    +class DomElement;
    +
    +#ifndef WT_CNOR
    +template <typename A1, typename A2, typename A3, typename A4,
    +	  typename A5, typename A6> class JSignal;
    +#endif
    +
    +/*! \class WWebWidget Wt/WWebWidget Wt/WWebWidget
    + *  \brief A base class for widgets with an HTML counterpart.
    + *
    + * All descendants of %WWebWidget implement a widget which corresponds
    + * almost one-on-one with an HTML element. These widgets provide most
    + * capabilities of these HTML elements, but rarely make no attempt to
    + * do anything more.
    + *
    + * \sa WCompositeWidget
    + */
    +class WT_API WWebWidget : public WWidget
    +{
    +public:
    +  /*! \brief Construct a WebWidget with a given parent.
    +   *
    +   * \sa WWidget::WWidget
    +   */
    +  WWebWidget(WContainerWidget *parent = 0);
    +  virtual ~WWebWidget();
    +
    +  virtual void setPositionScheme(PositionScheme scheme);
    +  virtual PositionScheme positionScheme() const;
    +  virtual void setOffsets(const WLength& offset, WFlags<Side> sides = All);
    +  virtual WLength offset(Side s) const;
    +  virtual void resize(const WLength& width, const WLength& height);
    +  virtual WLength width() const;
    +  virtual WLength height() const;
    +  virtual void setMinimumSize(const WLength& width, const WLength& height);
    +  virtual WLength minimumWidth() const;
    +  virtual WLength minimumHeight() const;
    +  virtual void setMaximumSize(const WLength& width, const WLength& height);
    +  virtual WLength maximumWidth() const;
    +  virtual WLength maximumHeight() const;
    +  virtual void setLineHeight(const WLength& height);
    +  virtual WLength lineHeight() const;
    +  virtual void setFloatSide(Side s);
    +  virtual Side floatSide() const;
    +  virtual void setClearSides(WFlags<Side> sides);
    +  virtual WFlags<Side> clearSides() const;
    +  virtual void setMargin(const WLength& margin, WFlags<Side> sides = All);
    +  virtual WLength margin(Side side) const;
    +  virtual void setHiddenKeepsGeometry(bool enabled);
    +  virtual bool hiddenKeepsGeometry() const;
    +  virtual void setHidden(bool);
    +  virtual bool isHidden() const;
    +  virtual bool isVisible() const;
    +  virtual void setDisabled(bool);
    +  virtual bool isDisabled() const;
    +  virtual bool isEnabled() const;
    +  virtual void setPopup(bool);
    +  virtual bool isPopup() const;
    +  virtual void setInline(bool);
    +  virtual bool isInline() const;
    +  virtual void setDecorationStyle(const WCssDecorationStyle& style);
    +  virtual WCssDecorationStyle& decorationStyle();
    +  virtual void setStyleClass(const WT_USTRING& styleClass);
    +  void setStyleClass(const char *styleClass);
    +  virtual WT_USTRING styleClass() const;
    +  virtual void addStyleClass(const WT_USTRING& styleClass,
    +			     bool force = false);
    +  void addStyleClass(const char *styleClass, bool force = false);
    +  virtual void removeStyleClass(const WT_USTRING& styleClass,
    +				bool force = false);
    +  void removeStyleClass(const char *styleClass, bool force = false);
    +  virtual void setVerticalAlignment(AlignmentFlag alignment,
    +				    const WLength& length = WLength());
    +  virtual AlignmentFlag verticalAlignment() const;
    +  virtual WLength verticalAlignmentLength() const;
    +  virtual void setToolTip(const WString& toolTip);
    +  virtual WString toolTip() const;
    +  virtual void refresh();
    +  virtual void setAttributeValue(const std::string& name,
    +				 const WT_USTRING& value);
    +  virtual WT_USTRING attributeValue(const std::string& name) const;
    +  virtual void setJavaScriptMember(const std::string& name,
    +				   const std::string& value);
    +  virtual std::string javaScriptMember(const std::string& name) const;
    +  virtual void callJavaScriptMember(const std::string& name,
    +				    const std::string& args);
    +  virtual void load();
    +  virtual bool loaded() const;
    +  virtual void setTabIndex(int index);
    +  virtual int tabIndex() const;
    +
    +  virtual void setId(const std::string& id);
    +  virtual WWidget *find(const std::string& name);
    +  virtual void setSelectable(bool selectable);
    +  virtual const std::string id() const;
    +
    +  virtual DomElement *createDomElement(WApplication *app);
    +  virtual void getDomChanges(std::vector<DomElement *>& result,
    +			     WApplication *app);
    +  virtual DomElementType domElementType() const = 0;
    +
    +  DomElement *createStubElement(WApplication *app);
    +  DomElement *createActualElement(WApplication *app);
    +
    +  /*! \brief Change the way the widget is loaded when invisible.
    +   *
    +   * By default, invisible widgets are loaded only after visible content.
    +   * For tiny widgets this may lead to a performance loss, instead of the
    +   * expected increase, because they require many more DOM manipulations
    +   * to render, reducing the overall responsiveness of the application.
    +   *
    +   * Therefore, this is disabled for some widgets like WImage, or
    +   * empty WContainerWidgets.
    +   *
    +   * You may also want to disable deferred loading when JavaScript event
    +   * handling expects the widget to be loaded.
    +   *
    +   * Usually the default settings are fine, but you may want to change
    +   * the behaviour.
    +   *
    +   * \sa WApplication::setTwoPhaseRenderingThreshold()
    +   */
    +  void setLoadLaterWhenInvisible(bool);
    +
    +  /*! \brief Escape HTML control characters in the text, to display literally.
    +   */
    +  static WString escapeText(const WString& text, bool newlinesToo = false);
    +
    +  /*! \brief Escape HTML control characters in the text, to display literally.
    +   */
    +  static std::string& escapeText(std::string& text, bool newlinestoo = false);
    +
    +  /*! \brief Remove tags/attributes from text that are not passive.
    +   *
    +   * This removes tags and attributes from XHTML-formatted text that
    +   * do not simply display something but may trigger scripting, and
    +   * could have been injected by a malicious user for Cross-Site
    +   * Scripting (XSS).
    +   *
    +   * This method is used by the library to sanitize XHTML-formatted
    +   * text set in WText, but it may also be useful outside the library
    +   * to sanitize user content when direcly using JavaScript.
    +   *
    +   * Modifies the \p text if needed. When the text is not proper
    +   * XML, returns \c false.
    +   */
    +  static bool removeScript(WString& text);
    +
    +  /*! \brief Turn a UTF8 encoded string into a JavaScript string literal
    +   *
    +   * The \p delimiter may be a single or double quote.
    +   */
    +  static std::string jsStringLiteral(const std::string& v,
    +				     char delimiter = '\'');
    +  static std::string jsStringLiteral(const WString& v,
    +				     char delimiter = '\'');
    +
    +  /*! \brief Returns contained widgets.
    +   *
    +   * \sa WContainerWidget::addWidget()
    +   */
    +  const std::vector<WWidget *>& children() const;
    +
    +  static std::string fixRelativeUrl(const std::string& url);
    +
    +  void setFormObject(bool how);
    +  static bool canOptimizeUpdates();
    +  int zIndex() const;
    +  void setZIndex(int zIndex);
    +
    +  bool isRendered() const;
    +
    +protected:
    +  typedef std::map<std::string, WObject *> FormObjectsMap;
    +
    +  void repaint(WFlags<RepaintFlag> flags = RepaintAll);
    +
    +  virtual void getFormObjects(FormObjectsMap& formObjects);
    +  virtual void doneRerender();
    +  virtual void updateDom(DomElement& element, bool all);
    +  virtual void propagateRenderOk(bool deep = true);
    +  virtual std::string renderRemoveJs();
    +
    +  virtual void propagateSetEnabled(bool enabled);
    +  virtual bool isStubbed() const;
    +  virtual void enableAjax();
    +
    +  virtual void addChild(WWidget *child);
    +  virtual void removeChild(WWidget *child);
    +  virtual void setHideWithOffsets(bool how = true);
    +
    +  void doLoad(WWidget *w);
    +
    +  virtual void render(WFlags<RenderFlag> flags);
    +
    +  /*! \brief Executes the given JavaScript statements, possibly delayed
    +   *  until after the widget is rendered.
    +   *
    +   * Calling WApplication::doJavaScript() with JavaScript code that refers
    +   * to a widget that is still to be rendered causes JavaScript errors. This
    +   * happens for example when an object is created, but not yet inserted in
    +   * the widget tree.
    +   *
    +   * This method offers an alternative: it queues up all doJavaScript calls
    +   * for widgets that were not yet rendered until they are rendered.
    +   */
    +  void doJavaScript(const std::string& javascript);
    +
    +private:
    +  /*
    +   * Booleans packed in a bitset.
    +   */
    +  static const int BIT_INLINE = 0;
    +  static const int BIT_HIDDEN = 1;
    +  static const int BIT_LOADED = 2;
    +  static const int BIT_RENDERED = 3;
    +  static const int BIT_STUBBED = 4;
    +  static const int BIT_FORM_OBJECT = 5;
    +  static const int BIT_IGNORE_CHILD_REMOVES = 6;
    +  static const int BIT_GEOMETRY_CHANGED = 7;
    +  static const int BIT_HIDE_WITH_OFFSETS = 8;
    +  static const int BIT_BEING_DELETED = 9;
    +  static const int BIT_DONOT_STUB = 10;
    +  static const int BIT_FLOAT_SIDE_CHANGED = 11;
    +  static const int BIT_REPAINT_PROPERTY_IEMOBILE = 12;
    +  static const int BIT_REPAINT_PROPERTY_ATTRIBUTE = 13;
    +  static const int BIT_REPAINT_INNER_HTML = 14;
    +  static const int BIT_REPAINT_TO_AJAX = 15;
    +  static const int BIT_TOOLTIP_CHANGED = 16;
    +  static const int BIT_MARGINS_CHANGED = 17;
    +  static const int BIT_STYLECLASS_CHANGED = 18;
    +  static const int BIT_SET_UNSELECTABLE = 19;
    +  static const int BIT_SET_SELECTABLE = 20;
    +  static const int BIT_SELECTABLE_CHANGED = 21;
    +  static const int BIT_WIDTH_CHANGED = 22;
    +  static const int BIT_HEIGHT_CHANGED = 23;
    +  static const int BIT_DISABLED = 24;
    +  static const int BIT_DISABLED_CHANGED = 25;
    +  static const int BIT_HIDE_WITH_VISIBILITY = 26;
    +  static const int BIT_HIDDEN_CHANGED = 27;
    +  static const int BIT_ENABLED = 28; // caches isEnabled() for WInteractWidget
    +
    +#ifndef WT_TARGET_JAVA
    +  static const std::bitset<29> AllChangeFlags;
    +#endif // WT_TARGET_JAVA
    +
    +  /*
    +   * Frequently used attributes.
    +   */
    +  std::bitset<29> flags_;
    +  WLength	 *width_;
    +  WLength	 *height_;
    +
    +  struct TransientImpl {
    +    std::vector<std::string> childRemoveChanges_;
    +    std::vector<WWidget *>   addedChildren_;
    +    std::vector<WT_USTRING>  addedStyleClasses_, removedStyleClasses_;
    +
    +    bool specialChildRemove_;
    +
    +    TransientImpl();
    +    ~TransientImpl();
    +  };
    +
    +  TransientImpl *transientImpl_;
    +
    +  struct LayoutImpl {
    +    PositionScheme	    positionScheme_;
    +    Side		    floatSide_;
    +    WFlags<Side>	    clearSides_;
    +    WLength		    offsets_[4]; // left, right, top, bottom
    +    WLength		    minimumWidth_;
    +    WLength		    minimumHeight_;
    +    WLength		    maximumWidth_;
    +    WLength		    maximumHeight_;
    +    int			    zIndex_; // -1 = wants popup
    +    AlignmentFlag	    verticalAlignment_;
    +    WLength		    verticalAlignmentLength_;
    +    WLength		    margin_[4];
    +    WLength                 lineHeight_;
    +
    +    LayoutImpl();
    +  };
    +
    +  LayoutImpl *layoutImpl_;
    +
    +  struct LookImpl {
    +    WCssDecorationStyle    *decorationStyle_;
    +    WT_USTRING              styleClass_;
    +    WString                *toolTip_;
    +
    +    LookImpl();
    +    ~LookImpl();
    +  };
    +
    +  LookImpl *lookImpl_;
    +
    +  struct DropMimeType {
    +    WT_USTRING hoverStyleClass;
    +
    +    DropMimeType();
    +    DropMimeType(const WT_USTRING& hoverStyleClass);
    +  };
    +
    +  struct OtherImpl {
    +    struct Member {
    +      std::string name;
    +      std::string value;
    +    };
    +
    +    std::string                         *id_;
    +
    +    std::map<std::string, WT_USTRING>   *attributes_;
    +    std::vector<std::string>            *attributesSet_;
    +    std::vector<Member>            *jsMembers_;
    +    std::vector<std::string>            *jsMembersSet_;
    +    std::vector<std::string>            *jsMemberCalls_;
    +
    +    // drag source id, drag mime type
    +    JSignal<std::string, std::string, WMouseEvent,
    +	    struct NoClass, struct NoClass, struct NoClass> *dropSignal_;
    +
    +    typedef std::map<std::string, DropMimeType>   MimeTypesMap;
    +    MimeTypesMap                                 *acceptedDropMimeTypes_;
    +
    +    SStream *delayedDoJavaScript_;
    +
    +    OtherImpl();
    +    ~OtherImpl();
    +  };
    +
    +  OtherImpl *otherImpl_;
    +  std::vector<WWidget *>    *children_;
    +  static std::vector<WWidget *> emptyWidgetList_;
    +
    +  virtual void signalConnectionsChanged();
    +
    +  void renderOk();
    +  void calcZIndex();
    +
    +  virtual bool needsToBeRendered() const;
    +  virtual void getSDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app);
    +  void         getSFormObjects(FormObjectsMap& formObjects);
    +
    +  void gotParent();
    +
    +  /*
    +   * Drag & drop stuff.
    +   */
    +  bool          setAcceptDropsImpl(const std::string& mimeType,
    +				   bool accept,
    +				   const WT_USTRING& hoverStyleClass);
    +
    +  void setIgnoreChildRemoves(bool how);
    +  bool ignoreChildRemoves() const;
    +  void beingDeleted();
    +
    +  int indexOfJavaScriptMember(const std::string& name) const;
    +
    +protected:
    +  void setRendered(bool rendered);
    +
    +  void setId(DomElement *element, WApplication *app);
    +  virtual WWebWidget *webWidget() { return this; }
    +
    +  EventSignal<> *voidEventSignal(const char *name, bool create);
    +  EventSignal<WKeyEvent> *keyEventSignal(const char *name, bool create);
    +  EventSignal<WMouseEvent> *mouseEventSignal(const char *name, bool create);
    +  EventSignal<WScrollEvent> *scrollEventSignal(const char *name, bool create);
    +  EventSignal<WTouchEvent> *touchEventSignal(const char *name, bool create);
    +  EventSignal<WGestureEvent> *gestureEventSignal(const char *name, bool create);
    +
    +  void updateSignalConnection(DomElement& element, EventSignalBase& signal,
    +			      const char *name, bool all);
    +
    +  /*
    +   * WWebWidget ended up with more friends than me...
    +   */
    +  friend class WebRenderer;
    +  friend class WebSession;
    +
    +  friend class WApplication;
    +  friend class WCompositeWidget;
    +  friend class WContainerWidget;
    +  friend class WCssDecorationStyle;
    +  friend class WCssTemplateRule;
    +  friend class WFont;
    +  friend class WGLWidget;
    +  friend class WInteractWidget;
    +  friend class JSlot;
    +  friend class WTable;
    +  friend class WViewWidget;
    +  friend class WWidget;
    +  friend class WTemplate;
    +};
    +
    +}
    +
    +#endif // WWEB_WIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WWebWidget.C b/wt-3.1.7a/src/Wt/WWebWidget.C
    new file mode 100644
    index 0000000..7a5f5f2
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWebWidget.C
    @@ -0,0 +1,2059 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCompositeWidget"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLogger"
    +#include "Wt/WWebWidget"
    +#include "Wt/WJavaScript"
    +
    +#include "DomElement.h"
    +#include "WebRenderer.h"
    +#include "WebSession.h"
    +#include "WebSession.h"
    +#include "WtException.h"
    +#include "Utils.h"
    +#include "XSSFilter.h"
    +#ifdef max
    +#undef max
    +#endif
    +using namespace Wt;
    +
    +std::vector<WWidget *> WWebWidget::emptyWidgetList_;
    +
    +#ifndef WT_TARGET_JAVA
    +const std::bitset<29> WWebWidget::AllChangeFlags = std::bitset<29>()
    +  .set(BIT_HIDDEN_CHANGED)
    +  .set(BIT_GEOMETRY_CHANGED)
    +  .set(BIT_FLOAT_SIDE_CHANGED)
    +  .set(BIT_TOOLTIP_CHANGED)
    +  .set(BIT_MARGINS_CHANGED)
    +  .set(BIT_STYLECLASS_CHANGED)
    +  .set(BIT_SELECTABLE_CHANGED)
    +  .set(BIT_WIDTH_CHANGED)
    +  .set(BIT_HEIGHT_CHANGED)
    +  .set(BIT_DISABLED_CHANGED);
    +#endif // WT_TARGET_JAVA
    +
    +WWebWidget::TransientImpl::TransientImpl()
    +{ 
    +  specialChildRemove_ = false;
    +}
    +
    +WWebWidget::TransientImpl::~TransientImpl()
    +{
    +}
    +
    +WWebWidget::LayoutImpl::LayoutImpl()
    +  : positionScheme_(Static),
    +    floatSide_(static_cast<Side>(0)),
    +    clearSides_(0),
    +    zIndex_(0),
    +    verticalAlignment_(AlignBaseline)
    +{ 
    +  for (unsigned i = 0; i < 4; ++i) {
    +#ifdef WT_TARGET_JAVA
    +    offsets_[i] = WLength::Auto;
    +#endif // WT_TARGET_JAVA
    +    margin_[i] = WLength(0);
    +  }
    +}
    +
    +WWebWidget::LookImpl::LookImpl()
    +  : decorationStyle_(0),
    +    toolTip_(0)
    +{ }
    +
    +WWebWidget::LookImpl::~LookImpl()
    +{
    +  delete decorationStyle_;
    +  delete toolTip_;
    +}
    +
    +WWebWidget::OtherImpl::OtherImpl()
    +  : id_(0),
    +    attributes_(0),
    +    attributesSet_(0),
    +    jsMembers_(0),
    +    jsMembersSet_(0),
    +    jsMemberCalls_(0),
    +    dropSignal_(0),
    +    acceptedDropMimeTypes_(0),
    +    delayedDoJavaScript_(0)
    +{ }
    +
    +WWebWidget::OtherImpl::~OtherImpl()
    +{
    +  delete id_;
    +  delete attributes_;
    +  delete attributesSet_;
    +  delete jsMembers_;
    +  delete jsMembersSet_;
    +  delete jsMemberCalls_;
    +  delete dropSignal_;
    +  delete acceptedDropMimeTypes_;
    +  delete delayedDoJavaScript_;
    +}
    +
    +WWebWidget::WWebWidget(WContainerWidget *parent)
    +  : WWidget(parent),
    +    width_(0),
    +    height_(0),
    +    transientImpl_(0),
    +    layoutImpl_(0),
    +    lookImpl_(0),
    +    otherImpl_(0),
    +    children_(0)
    +{
    +  flags_.set(BIT_INLINE);
    +  flags_.set(BIT_ENABLED);
    +
    +  if (parent)
    +    parent->addWidget(this);
    +}
    +
    +void WWebWidget::setFormObject(bool how)
    +{
    +  flags_.set(BIT_FORM_OBJECT, how);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(this, false);
    +}
    +
    +void WWebWidget::setId(const std::string& id)
    +{
    +  if (!otherImpl_)
    +    otherImpl_ = new OtherImpl();
    +
    +  if (!otherImpl_->id_)
    +    otherImpl_->id_ = new std::string();
    +
    +  *otherImpl_->id_ = id;
    +}
    +
    +void WWebWidget::setSelectable(bool selectable)
    +{
    +  flags_.set(BIT_SET_SELECTABLE, selectable);
    +  flags_.set(BIT_SET_UNSELECTABLE, !selectable);
    +  flags_.set(BIT_SELECTABLE_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +const std::string WWebWidget::id() const
    +{
    +  if (otherImpl_ && otherImpl_->id_)
    +    return *otherImpl_->id_;
    +  else
    +    return WWidget::id();  
    +}
    +
    +void WWebWidget::repaint(WFlags<RepaintFlag> flags)
    +{
    +  /*
    +   * If the widget is currently within a stubbed widget (but not
    +   * stubbed itself, since then it is considered to be painted), we need
    +   * to redo the slot learning while unstubbing.
    +   */
    +  if (!flags_.test(BIT_STUBBED) && isStubbed()) {
    +    WebRenderer& renderer = WApplication::instance()->session()->renderer();
    +    if (renderer.preLearning())
    +      renderer.learningIncomplete();
    +  }
    +
    +  /*
    +   * We ignore repaints to an unrendered widget.
    +   */
    +  if (!flags_.test(BIT_RENDERED))
    +    return;
    +
    +  WWidget::askRerender();
    +
    +#ifndef WT_TARGET_JAVA
    +  flags_ |= (int)flags;
    +#else
    +  if (flags & RepaintPropertyIEMobile)
    +    flags_.set(BIT_REPAINT_PROPERTY_IEMOBILE);
    +  if (flags & RepaintPropertyAttribute)
    +    flags_.set(BIT_REPAINT_PROPERTY_ATTRIBUTE);
    +  if (flags & RepaintInnerHtml)
    +    flags_.set(BIT_REPAINT_INNER_HTML);
    +  if (flags & RepaintToAjax)
    +    flags_.set(BIT_REPAINT_TO_AJAX);
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WWebWidget::renderOk()
    +{
    +  WWidget::renderOk();
    +
    +#ifndef WT_TARGET_JAVA
    +  flags_ &= ~(int)(RepaintAll | RepaintToAjax);
    +#else // WT_TARGET_JAVA
    +  flags_.reset(BIT_REPAINT_PROPERTY_IEMOBILE);
    +  flags_.reset(BIT_REPAINT_PROPERTY_ATTRIBUTE);
    +  flags_.reset(BIT_REPAINT_INNER_HTML);
    +  flags_.reset(BIT_REPAINT_TO_AJAX);
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WWebWidget::signalConnectionsChanged()
    +{
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::beingDeleted()
    +{
    +  // flag that we are being deleted, this allows some optimalizations
    +  flags_.set(BIT_BEING_DELETED);
    +  flags_.set(BIT_IGNORE_CHILD_REMOVES);  
    +}
    +
    +WWebWidget::~WWebWidget()
    +{
    +  beingDeleted();
    +
    +  setParentWidget(0);
    +
    +  delete width_;
    +  delete height_;
    +
    +  if (children_) {
    +    while (children_->size())
    +      delete (*children_)[0];
    +    delete children_;
    +  }
    +
    +  delete transientImpl_;
    +  delete layoutImpl_;
    +  delete lookImpl_;
    +  delete otherImpl_;
    +}
    +
    +WCssDecorationStyle& WWebWidget::decorationStyle()
    +{
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  if (!lookImpl_->decorationStyle_) {
    +    lookImpl_->decorationStyle_ = new WCssDecorationStyle();
    +    lookImpl_->decorationStyle_->setWebWidget(this);
    +  }
    +
    +  return *lookImpl_->decorationStyle_;
    +}
    +
    +void WWebWidget::setDecorationStyle(const WCssDecorationStyle& style)
    +{
    +#ifndef WT_TARGET_JAVA
    +  decorationStyle() = style;
    +#else
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  lookImpl_->decorationStyle_ = &style;
    +#endif // WT_TARGET_JAVA
    +}
    +
    +std::string WWebWidget::renderRemoveJs()
    +{
    +  return "_" + id();
    +}
    +
    +void WWebWidget::removeChild(WWidget *child)
    +{
    +  assert(children_ != 0);
    +
    +  int i = Utils::indexOf(*children_, child);
    +
    +  assert (i != -1);
    +
    +  if (!flags_.test(BIT_IGNORE_CHILD_REMOVES)) {
    +    std::string js = child->webWidget()->renderRemoveJs();
    +
    +    if (!transientImpl_)
    +      transientImpl_ = new TransientImpl();
    +
    +    transientImpl_->childRemoveChanges_.push_back(js);
    +    if (js[0] != '_')
    +      transientImpl_->specialChildRemove_ = true;
    +
    +    repaint(RepaintInnerHtml);
    +  }
    +
    +  /*
    +    -- does not work properly: should in reality propagate the render
    +    remove to all grand children; but perhaps we don't need this
    +
    +    std::vector<DomElement *> *nestedRemoveChanges
    +      = w->webWidget()->childRemoveChanges_;
    +
    +    if (nestedRemoveChanges_) {
    +      for (unsigned k = 0; k < w->nestedRemoveChanges_->size(); ++k) {
    +	DomElement *f = (*nestedRemoveChanges_)[k];
    +
    +	if (!f->discardWithParent()) {
    +	  if (!childRemoveChanges_)
    +	    childRemoveChanges_ = new std::vector<DomElement *>;
    +	  childRemoveChanges_->push_back(f);
    +
    +	  nestedRemoveChanges_->erase(nestedRemoveChanges_->begin() + k);
    +	  --k;
    +	}
    +      }
    +    }
    +    */
    +
    +  child->setParent(0);
    +    
    +  /*
    +   * When the child is about to be deleted, all of its descendants
    +   * properly removes itself from the renderer "dirty" list. If not,
    +   * we here force this propagation.
    +   */
    +  if (!child->webWidget()->flags_.test(BIT_BEING_DELETED))
    +    child->webWidget()->setRendered(false);
    +
    +  children_->erase(children_->begin() + i);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(child->webWidget(), true);
    +}
    +
    +void WWebWidget::setPositionScheme(PositionScheme scheme)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->positionScheme_ = scheme;
    +
    +  if ((scheme == Absolute) || (scheme == Fixed))
    +    flags_.reset(BIT_INLINE);
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +PositionScheme WWebWidget::positionScheme() const
    +{
    +  return layoutImpl_ ? layoutImpl_->positionScheme_ : Static;
    +}
    +
    +void WWebWidget::resize(const WLength& width, const WLength& height)
    +{
    +  if (!width_ && !width.isAuto())
    +    width_ = new WLength();
    +
    +  if (width_ && *width_ != width) {
    +    *width_ = width;
    +    flags_.set(BIT_WIDTH_CHANGED);
    +  }
    +
    +  if (!height_ && !height.isAuto())
    +    height_ = new WLength();
    +
    +  if (height_ && *height_ != height) {
    +    *height_ = height;
    +    flags_.set(BIT_HEIGHT_CHANGED);
    +  }
    +
    +  repaint(RepaintPropertyAttribute);
    +
    +  WWidget::resize(width, height);
    +}
    +
    +WLength WWebWidget::width() const
    +{
    +  return width_ ? *width_ : WLength::Auto;
    +}
    +
    +WLength WWebWidget::height() const
    +{
    +  return height_ ? *height_ : WLength::Auto;
    +}
    +
    +void WWebWidget::setMinimumSize(const WLength& width, const WLength& height)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->minimumWidth_ = width;
    +  layoutImpl_->minimumHeight_ = height;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WWebWidget::minimumWidth() const
    +{
    +  return layoutImpl_ ? layoutImpl_->minimumWidth_ : WLength::Auto;
    +}
    +
    +WLength WWebWidget::minimumHeight() const
    +{
    +  return layoutImpl_ ? layoutImpl_->minimumHeight_ : WLength::Auto;
    +}
    +
    +void WWebWidget::setMaximumSize(const WLength& width, const WLength& height)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->maximumWidth_ = width;
    +  layoutImpl_->maximumHeight_ = height;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WWebWidget::maximumWidth() const
    +{
    +  return layoutImpl_ ? layoutImpl_->maximumWidth_ : WLength::Auto;
    +}
    +
    +WLength WWebWidget::maximumHeight() const
    +{
    +  return layoutImpl_ ? layoutImpl_->maximumHeight_ : WLength::Auto;
    +}
    +
    +void WWebWidget::setLineHeight(const WLength& height)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->lineHeight_ = height;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WWebWidget::lineHeight() const
    +{
    +  return layoutImpl_ ? layoutImpl_->lineHeight_ : WLength::Auto;
    +}
    +
    +void WWebWidget::setFloatSide(Side s)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->floatSide_ = s;
    +
    +  flags_.set(BIT_FLOAT_SIDE_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +Side WWebWidget::floatSide() const
    +{
    +  if (layoutImpl_)
    +    return layoutImpl_->floatSide_;
    +  else
    +    return static_cast<Side>(0);
    +}
    +
    +void WWebWidget::setClearSides(WFlags<Side> sides)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->clearSides_ = sides;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WFlags<Side> WWebWidget::clearSides() const
    +{
    +  if (layoutImpl_)
    +    return layoutImpl_->clearSides_;
    +  else
    +    return WFlags<Side>(None);
    +}
    +
    +void WWebWidget::setVerticalAlignment(AlignmentFlag alignment,
    +				      const WLength& length)
    +{
    +  if (AlignHorizontalMask & alignment) {
    +    wApp->log("warning") << "WWebWidget::setVerticalAlignment(): alignment "
    +      "(" << alignment << ") is horizontal, expected vertical";
    +  }
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->verticalAlignment_ = alignment;
    +  layoutImpl_->verticalAlignmentLength_ = length;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +AlignmentFlag WWebWidget::verticalAlignment() const
    +{
    +  return layoutImpl_ ? layoutImpl_->verticalAlignment_ : AlignBaseline;
    +}
    +
    +WLength WWebWidget::verticalAlignmentLength() const
    +{
    +  return layoutImpl_ ? layoutImpl_->verticalAlignmentLength_ : WLength::Auto;
    +}
    +
    +void WWebWidget::setOffsets(const WLength& offset, WFlags<Side> sides)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();  
    +
    +  if (sides & Top)
    +    layoutImpl_->offsets_[0] = offset;
    +  if (sides & Right)
    +    layoutImpl_->offsets_[1] = offset;
    +  if (sides & Bottom)
    +    layoutImpl_->offsets_[2] = offset;
    +  if (sides & Left)
    +    layoutImpl_->offsets_[3] = offset;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WWebWidget::offset(Side s) const
    +{
    +  if (!layoutImpl_)
    +    return WLength::Auto;
    +
    +  switch (s) {
    +  case Top:
    +    return layoutImpl_->offsets_[0];
    +  case Right:
    +    return layoutImpl_->offsets_[1];
    +  case Bottom:
    +    return layoutImpl_->offsets_[2];
    +  case Left:
    +    return layoutImpl_->offsets_[3];
    +  default:
    +    throw WtException("WWebWidget::offset(Side) with invalid side.");
    +  }
    +}
    +
    +int WWebWidget::zIndex() const
    +{
    +  if (layoutImpl_)
    +    return layoutImpl_->zIndex_;
    +  else
    +    return 0;
    +}
    +
    +void WWebWidget::setInline(bool inl)
    +{
    +  flags_.set(BIT_INLINE, inl);
    +
    +  resetLearnedSlot(&WWidget::show);
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +bool WWebWidget::isInline() const
    +{
    +  return flags_.test(BIT_INLINE);
    +}
    +
    +void WWebWidget::setPopup(bool popup)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->zIndex_ = popup ? -1 : 0;
    +
    +  if (popup && parent())
    +    calcZIndex();
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::setZIndex(int zIndex)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();
    +
    +  layoutImpl_->zIndex_ = zIndex;
    +
    +  flags_.set(BIT_GEOMETRY_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::gotParent()
    +{
    +  if (isPopup())
    +    calcZIndex();
    +}
    +
    +void WWebWidget::calcZIndex()
    +{
    +  layoutImpl_->zIndex_ = -1;
    +
    +  // find parent webwidget, i.e. skipping composite widgets
    +  WWidget *p = this;
    +  do {
    +    p = p->parent();
    +  } while (p != 0 && dynamic_cast<WCompositeWidget *>(p) != 0);
    +
    +  if (p == 0)
    +    return;
    +
    +  WWebWidget *ww = p->webWidget();
    +  if (ww) {
    +    const std::vector<WWidget *>& children = ww->children();
    +
    +    int maxZ = 0;
    +    for (unsigned i = 0; i < children.size(); ++i) {
    +      WWebWidget *wi = children[i]->webWidget();
    +      maxZ = std::max(maxZ, wi->zIndex());
    +    }
    +
    +    layoutImpl_->zIndex_ = maxZ + 5;
    +  }
    +}
    +
    +bool WWebWidget::isPopup() const
    +{
    +  return layoutImpl_ ? layoutImpl_->zIndex_ != 0 : false;
    +}
    +
    +void WWebWidget::setMargin(const WLength& margin, WFlags<Side> sides)
    +{
    +  if (!layoutImpl_)
    +    layoutImpl_ = new LayoutImpl();  
    +
    +  if (sides & Top)
    +    layoutImpl_->margin_[0] = margin;
    +  if (sides & Right)
    +    layoutImpl_->margin_[1] = margin;
    +  if (sides & Bottom)
    +    layoutImpl_->margin_[2] = margin;
    +  if (sides & Left)
    +    layoutImpl_->margin_[3] = margin;
    +
    +  flags_.set(BIT_MARGINS_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WLength WWebWidget::margin(Side side) const
    +{
    +  if (!layoutImpl_)
    +    return WLength(0);
    +
    +  switch (side) {
    +  case Top:
    +    return layoutImpl_->margin_[0];
    +  case Right:
    +    return layoutImpl_->margin_[1];
    +  case Bottom:
    +    return layoutImpl_->margin_[2];
    +  case Left:
    +    return layoutImpl_->margin_[3];
    +  default:
    +    throw WtException("WWebWidget::margin(Side) with invalid side");
    +  }
    +}
    +
    +void WWebWidget::addStyleClass(const WT_USTRING& styleClass, bool force)
    +{
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  std::string currentClass = lookImpl_->styleClass_.toUTF8();
    +  std::set<std::string> classes;
    +  Utils::split(classes, currentClass, " ", true);
    +  
    +  if (classes.find(styleClass.toUTF8()) == classes.end()) {
    +    lookImpl_->styleClass_
    +      = WT_USTRING::fromUTF8(Utils::addWord(lookImpl_->styleClass_.toUTF8(),
    +					    styleClass.toUTF8()));
    +
    +    if (!force) {
    +      flags_.set(BIT_STYLECLASS_CHANGED);
    +      repaint(RepaintPropertyAttribute);
    +    }
    +  }
    +
    +  if (force && isRendered()) {
    +    if (!transientImpl_)
    +      transientImpl_ = new TransientImpl();
    +
    +    transientImpl_->addedStyleClasses_.push_back(styleClass);
    +    Utils::erase(transientImpl_->removedStyleClasses_, styleClass);
    +
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WWebWidget::removeStyleClass(const WT_USTRING& styleClass, bool force)
    +{
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  std::string currentClass = lookImpl_->styleClass_.toUTF8();
    +  std::set<std::string> classes;
    +  Utils::split(classes, currentClass, " ", true);
    +
    +  if (classes.find(styleClass.toUTF8()) != classes.end()) {
    +    // perhaps it is quicker to join the classes back, but then we need to
    +    // make sure we keep the original order ?
    +    lookImpl_->styleClass_
    +      = WT_USTRING::fromUTF8(Utils::eraseWord(lookImpl_->styleClass_.toUTF8(),
    +					      styleClass.toUTF8()));
    +    if (!force) {
    +      flags_.set(BIT_STYLECLASS_CHANGED);
    +      repaint(RepaintPropertyAttribute);
    +    }
    +  }
    +
    +  if (force && isRendered()) {
    +    if (!transientImpl_)
    +      transientImpl_ = new TransientImpl();
    +
    +    transientImpl_->removedStyleClasses_.push_back(styleClass);
    +    Utils::erase(transientImpl_->addedStyleClasses_, styleClass);
    +
    +    repaint(RepaintPropertyAttribute);
    +  }
    +}
    +
    +void WWebWidget::addStyleClass(const char *styleClass, bool force)
    +{
    +  addStyleClass(WString::fromUTF8(styleClass), force);
    +}
    +
    +void WWebWidget::removeStyleClass(const char *styleClass, bool force)
    +{
    +  removeStyleClass(WString::fromUTF8(styleClass), force);
    +}
    +
    +void WWebWidget::setStyleClass(const WT_USTRING& styleClass)
    +{
    +  if (canOptimizeUpdates() && (styleClass == this->styleClass()))
    +    return;
    +
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  lookImpl_->styleClass_ = styleClass;
    +
    +  flags_.set(BIT_STYLECLASS_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::setStyleClass(const char *styleClass)
    +{
    +  setStyleClass(WString::fromUTF8(styleClass));
    +}
    +
    +WT_USTRING WWebWidget::styleClass() const
    +{
    +  return lookImpl_ ? lookImpl_->styleClass_ : WT_USTRING();
    +}
    +
    +void WWebWidget::setAttributeValue(const std::string& name,
    +				   const WT_USTRING& value)
    +{
    +  if (!otherImpl_)
    +    otherImpl_ = new OtherImpl();
    +
    +  if (!otherImpl_->attributes_)
    +    otherImpl_->attributes_ = new std::map<std::string, WT_USTRING>;
    +
    +  std::map<std::string, WT_USTRING>::const_iterator i
    +    = otherImpl_->attributes_->find(name);
    +  
    +  if (i != otherImpl_->attributes_->end() && i->second == value)
    +    return;
    +
    +  (*otherImpl_->attributes_)[name] = value;
    +
    +  if (!otherImpl_->attributesSet_)
    +    otherImpl_->attributesSet_ = new std::vector<std::string>;
    +
    +  otherImpl_->attributesSet_->push_back(name);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WT_USTRING WWebWidget::attributeValue(const std::string& name) const
    +{
    +  if (otherImpl_) {
    +    std::map<std::string, WT_USTRING>::const_iterator i
    +      = otherImpl_->attributes_->find(name);
    +
    +    if (i != otherImpl_->attributes_->end())
    +      return i->second;
    +  }
    +
    +  return WT_USTRING();
    +}
    +
    +void WWebWidget::setJavaScriptMember(const std::string& name,
    +				     const std::string& value)
    +{
    +  if (!otherImpl_)
    +    otherImpl_ = new OtherImpl();
    +
    +  if (!otherImpl_->jsMembers_)
    +    otherImpl_->jsMembers_ = new std::vector<OtherImpl::Member>;
    +  
    +  std::vector<OtherImpl::Member>& members = *otherImpl_->jsMembers_;
    +  int index = indexOfJavaScriptMember(name);
    +  
    +  if (index != -1 && members[index].value == value)
    +    return;
    +
    +  if (value.empty()) {
    +    if (index != -1)
    +      members.erase(members.begin() + index);
    +    else
    +      return;
    +  } else {
    +    OtherImpl::Member m;
    +    m.name = name;
    +    m.value = value;
    +    members.push_back(m);
    +  }
    +
    +  if (!otherImpl_->jsMembersSet_)
    +    otherImpl_->jsMembersSet_ = new std::vector<std::string>;
    +
    +  otherImpl_->jsMembersSet_->push_back(name);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +std::string WWebWidget::javaScriptMember(const std::string& name) const
    +{
    +  int index = indexOfJavaScriptMember(name);
    +  if (index != -1)
    +    return (*otherImpl_->jsMembers_)[index].value;
    +  else
    +    return std::string();
    +}
    +
    +int WWebWidget::indexOfJavaScriptMember(const std::string& name) const 
    +{
    +  if (otherImpl_ && otherImpl_->jsMembers_)
    +  for (unsigned i = 0; i < otherImpl_->jsMembers_->size(); i++)
    +    if ((*otherImpl_->jsMembers_)[i].name == name)
    +      return i;
    +
    +  return -1;
    +}
    +
    +void WWebWidget::callJavaScriptMember(const std::string& name,
    +				      const std::string& args)
    +{
    +  if (!otherImpl_)
    +    otherImpl_ = new OtherImpl();
    +
    +  if (!otherImpl_->jsMemberCalls_)
    +    otherImpl_->jsMemberCalls_ = new std::vector<std::string>;
    +
    +  otherImpl_->jsMemberCalls_->push_back(name + "(" + args + ");");
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::setToolTip(const WString& message)
    +{
    +  if (canOptimizeUpdates() && (toolTip() == message))
    +    return;
    +
    +  if (!lookImpl_)
    +    lookImpl_ = new LookImpl();
    +
    +  if (!lookImpl_->toolTip_)
    +    lookImpl_->toolTip_ = new WString();
    +
    +  *lookImpl_->toolTip_ = message;
    +
    +  flags_.set(BIT_TOOLTIP_CHANGED);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +WString WWebWidget::toolTip() const
    +{
    +  return lookImpl_ ? (lookImpl_->toolTip_ ? *lookImpl_->toolTip_ : WString())
    +    : WString();
    +}
    +
    +void WWebWidget::setHiddenKeepsGeometry(bool enabled)
    +{
    +  flags_.set(BIT_DONOT_STUB);
    +  flags_.set(BIT_HIDE_WITH_VISIBILITY, enabled);
    +  flags_.set(BIT_HIDDEN_CHANGED);
    +}
    +
    +bool WWebWidget::hiddenKeepsGeometry() const
    +{
    +  return flags_.test(BIT_HIDE_WITH_VISIBILITY)
    +    && !flags_.test(BIT_HIDE_WITH_OFFSETS);
    +}
    +
    +void WWebWidget::setHidden(bool hidden)
    +{
    +  if (canOptimizeUpdates() && (hidden == isHidden()))
    +    return;
    +
    +  flags_.set(BIT_HIDDEN, hidden);
    +  flags_.set(BIT_HIDDEN_CHANGED);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(this, true);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +bool WWebWidget::isHidden() const
    +{
    +  return flags_.test(BIT_HIDDEN);
    +}
    +
    +bool WWebWidget::isVisible() const
    +{
    +  if (flags_.test(BIT_STUBBED) || flags_.test(BIT_HIDDEN))
    +    return false;
    +  else
    +    if (parent())
    +      return parent()->isVisible();
    +    else
    +      return true;
    +}
    +
    +void WWebWidget::setDisabled(bool disabled)
    +{
    +  if (canOptimizeUpdates() && (disabled == flags_.test(BIT_DISABLED)))
    +    return;
    +
    +  flags_.set(BIT_DISABLED, disabled);
    +  flags_.set(BIT_DISABLED_CHANGED);
    +
    +  propagateSetEnabled(!disabled);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(this, true);
    +
    +  repaint(RepaintPropertyAttribute);
    +}
    +
    +void WWebWidget::propagateSetEnabled(bool enabled)
    +{
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i) {
    +      WWidget *c = (*children_)[i];
    +      if (!c->isDisabled())
    +	c->webWidget()->propagateSetEnabled(enabled);
    +    }
    +}
    +
    +bool WWebWidget::isDisabled() const
    +{
    +  return flags_.test(BIT_DISABLED);
    +}
    +
    +bool WWebWidget::isEnabled() const
    +{
    +  if (isDisabled())
    +    return false;
    +  else
    +    if (parent())
    +      return parent()->isEnabled();
    +    else
    +      return true;
    +}
    +
    +void WWebWidget::addChild(WWidget *child)
    +{
    +  if (child->parent() == this)
    +    return;
    +
    +  if (child->parent() != 0) {
    +    child->setParentWidget(0);
    +    wApp->log("warn") << "WWebWidget::addChild(): reparenting child";
    +  }
    +
    +  if (!children_)
    +    children_ = new std::vector<WWidget *>;
    +
    +  children_->push_back(child);
    +
    +  child->setParent(this);
    +
    +  WWebWidget *ww = child->webWidget();
    +  if (ww)
    +    ww->gotParent();
    +
    +  if (flags_.test(BIT_LOADED))
    +    doLoad(child);
    +
    +  WApplication::instance()
    +    ->session()->renderer().updateFormObjects(this, false);
    +}
    +
    +const std::vector<WWidget *>& WWebWidget::children() const
    +{
    +  return children_ ? *children_ : emptyWidgetList_;
    +}
    +
    +void WWebWidget::setHideWithOffsets(bool how)
    +{
    +  if (how) {
    +    if (!flags_.test(BIT_HIDE_WITH_OFFSETS)) {
    +      flags_.set(BIT_HIDE_WITH_VISIBILITY);
    +      flags_.set(BIT_HIDE_WITH_OFFSETS);
    +
    +      resetLearnedSlot(&WWidget::show);
    +      resetLearnedSlot(&WWidget::hide);
    +
    +      if (parent())
    +	parent()->setHideWithOffsets(true);
    +    }
    +  }
    +}
    +
    +void WWebWidget::updateDom(DomElement& element, bool all)
    +{
    +  /*
    +   * determine display
    +   */
    +  if (flags_.test(BIT_GEOMETRY_CHANGED)
    +      || (!flags_.test(BIT_HIDE_WITH_VISIBILITY)
    +	  && flags_.test(BIT_HIDDEN_CHANGED))
    +      || all) {
    +    if (flags_.test(BIT_HIDE_WITH_VISIBILITY) || !flags_.test(BIT_HIDDEN)) {
    +      if (element.isDefaultInline() != flags_.test(BIT_INLINE)) {
    +	if (flags_.test(BIT_INLINE)) {
    +	  if (element.type() == DomElement_TABLE)
    +	    element.setProperty(PropertyStyleDisplay, "inline-table");
    +	  if (element.type() == DomElement_LI)
    +	    element.setProperty(PropertyStyleDisplay, "inline");
    +	  else if (element.type() != DomElement_TD) {
    +	    WApplication *app = WApplication::instance();
    +	    if (app->environment().agentIsIElt(9)) {
    +	      element.setProperty(PropertyStyleDisplay, "inline");
    +	      element.setProperty(PropertyStyleZoom, "1");
    +	    } else
    +	      element.setProperty(PropertyStyleDisplay, "inline-block");
    +	  }
    +	} else {
    +	  element.setProperty(PropertyStyleDisplay, "block");
    +	}
    +      } else if (!all && flags_.test(BIT_HIDDEN_CHANGED)) {
    +	if (element.isDefaultInline() == flags_.test(BIT_INLINE))
    +	  element.setProperty(PropertyStyleDisplay, "");
    +	else
    +	  element.setProperty(PropertyStyleDisplay,
    +			      flags_.test(BIT_INLINE) ? "inline" : "block");
    +      }
    +    } else
    +      element.setProperty(PropertyStyleDisplay, "none");
    +
    +    if (!flags_.test(BIT_HIDE_WITH_VISIBILITY))
    +      flags_.reset(BIT_HIDDEN_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_GEOMETRY_CHANGED) || all) {
    +    if (layoutImpl_) {
    +      /*
    +       * set position
    +       */
    +      if (!(flags_.test(BIT_HIDE_WITH_VISIBILITY) && flags_.test(BIT_HIDDEN)))
    +	switch (layoutImpl_->positionScheme_) {
    +	case Static:
    +	  break;
    +	case Relative:
    +	  element.setProperty(PropertyStylePosition, "relative"); break;
    +	case Absolute:
    +	  element.setProperty(PropertyStylePosition, "absolute"); break;
    +	case Fixed:
    +	  element.setProperty(PropertyStylePosition, "fixed"); break;
    +	}
    +
    +      /*
    +       * set z-index
    +       */
    +      if (layoutImpl_->zIndex_ > 0) {
    +	element.setProperty(PropertyStyleZIndex,
    +		    boost::lexical_cast<std::string>(layoutImpl_->zIndex_));
    +	WApplication *app = WApplication::instance();
    +	if (all && app->environment().agent() == WEnvironment::IE6
    +	    && element.type() == DomElement_DIV) {
    +	  DomElement *i = DomElement::createNew(DomElement_IFRAME);
    +	  i->setId("sh" + id());
    +	  i->setProperty(PropertyClass, "Wt-shim");
    +	  i->setProperty(PropertySrc, "javascript:false;");
    +	  i->setAttribute("title", "Popup Shim");
    +	  i->setAttribute("tabindex", "-1");
    +	  i->setAttribute("frameborder", "0");
    +
    +	  app->addAutoJavaScript
    +	    ("{var w = " + jsRef() + ";"
    +	     "if (w && !" WT_CLASS ".isHidden(w)) {"
    +	     "var i = " WT_CLASS ".getElement('" + i->id() + "');"
    +	     "i.style.width=w.clientWidth + 'px';"
    +	     "i.style.height=w.clientHeight + 'px';"
    +	     "}}");
    +
    +	  element.addChild(i);
    +	}
    +      }
    +
    +      /*
    +       * set clear: FIXME: multiple values
    +       */
    +      if (layoutImpl_->clearSides_ == Left) {
    +	element.setProperty(PropertyStyleClear, "left");
    +      } else if (layoutImpl_->clearSides_ == Right) {
    +	element.setProperty(PropertyStyleClear, "right");
    +      } else if (layoutImpl_->clearSides_ == Horizontals) {
    +	element.setProperty(PropertyStyleClear, "both");
    +      }
    +
    +      if (!layoutImpl_->minimumWidth_.isAuto()
    +	  && (layoutImpl_->minimumWidth_.value() != 0))
    +	element.setProperty(PropertyStyleMinWidth,
    +			    layoutImpl_->minimumWidth_.cssText());
    +      if (!layoutImpl_->minimumHeight_.isAuto()
    +	  && (layoutImpl_->minimumHeight_.value() != 0))
    +	element.setProperty(PropertyStyleMinHeight,
    +			    layoutImpl_->minimumHeight_.cssText());
    +      if (!layoutImpl_->maximumWidth_.isAuto()) // == none
    +	element.setProperty(PropertyStyleMaxWidth,
    +			    layoutImpl_->maximumWidth_.cssText());
    +      if (!layoutImpl_->maximumHeight_.isAuto()) // == none
    +	element.setProperty(PropertyStyleMaxHeight,
    +			    layoutImpl_->maximumHeight_.cssText());
    +
    +      /*
    +       * set offsets
    +       */
    +      if (layoutImpl_->positionScheme_ != Static) {
    +	static const Property properties[] = { PropertyStyleTop,
    +					       PropertyStyleRight,
    +					       PropertyStyleBottom,
    +					       PropertyStyleLeft };
    +
    +	for (unsigned i = 0; i < 4; ++i) {
    +	  if (!layoutImpl_->offsets_[i].isAuto())
    +	    element.setProperty(properties[i],
    +				layoutImpl_->offsets_[i].cssText());
    +	}
    +      }
    +
    +      /*
    +       * set vertical alignment
    +       */
    +      switch (layoutImpl_->verticalAlignment_) {
    +      case AlignBaseline:
    +	break;
    +      case AlignSub:
    +	element.setProperty(PropertyStyleVerticalAlign, "sub"); break;
    +      case AlignSuper:
    +	element.setProperty(PropertyStyleVerticalAlign, "super"); break;
    +      case AlignTop:
    +	element.setProperty(PropertyStyleVerticalAlign, "top"); break;
    +      case AlignTextTop:
    +	element.setProperty(PropertyStyleVerticalAlign, "text-top"); break;
    +      case AlignMiddle:
    +	element.setProperty(PropertyStyleVerticalAlign, "middle"); break;
    +      case AlignBottom:
    +	element.setProperty(PropertyStyleVerticalAlign, "bottom"); break;
    +      case AlignTextBottom:
    +	element.setProperty(PropertyStyleVerticalAlign, "text-bottom"); break;
    +      case AlignLength:
    +	element.setProperty(PropertyStyleVerticalAlign,
    +			    layoutImpl_->verticalAlignmentLength_.cssText());
    +	break;
    +      default:
    +	break;
    +      }
    +
    +      if (!layoutImpl_->lineHeight_.isAuto()) // == none
    +	element.setProperty(PropertyStyleLineHeight,
    +			    layoutImpl_->lineHeight_.cssText());
    +
    +    }
    +
    +    flags_.reset(BIT_GEOMETRY_CHANGED);
    +  }
    +
    +
    +  /*
    +   * set width & height
    +   */
    +  if (width_ && (flags_.test(BIT_WIDTH_CHANGED) || all)) {
    +    if (!all || !width_->isAuto())
    +      element.setProperty(PropertyStyleWidth, width_->cssText());
    +    flags_.reset(BIT_WIDTH_CHANGED);
    +  }
    +
    +  if (height_ && (flags_.test(BIT_HEIGHT_CHANGED) || all)) {
    +    if (!all || !height_->isAuto())
    +      element.setProperty(PropertyStyleHeight, height_->cssText());
    +    flags_.reset(BIT_HEIGHT_CHANGED);
    +  }
    +
    +  if (flags_.test(BIT_FLOAT_SIDE_CHANGED) || all) {
    +    if (layoutImpl_) {
    +      if (layoutImpl_->floatSide_ == 0) { 
    +	if (flags_.test(BIT_FLOAT_SIDE_CHANGED))
    +	  element.setProperty(PropertyStyleFloat, "none");
    +      }
    +      else {
    +        /*
    +        * set float
    +        */
    +        switch (layoutImpl_->floatSide_) {
    +        case Left:
    +	  element.setProperty(PropertyStyleFloat, "left");
    +	  break;
    +        case Right:
    +	  element.setProperty(PropertyStyleFloat, "right");
    +	  break;
    +        default:
    +	  /* illegal values */
    +	  ;
    +        }
    +      }
    +    }
    +
    +    flags_.reset(BIT_FLOAT_SIDE_CHANGED);
    +  }
    +
    +  if (layoutImpl_) {
    +    if (flags_.test(BIT_MARGINS_CHANGED) || all) {
    +      if (!all || (layoutImpl_->margin_[0].value() != 0))
    +	element.setProperty(PropertyStyleMarginTop,
    +			    layoutImpl_->margin_[0].cssText());
    +      if (!all || (layoutImpl_->margin_[1].value() != 0))
    +	element.setProperty(PropertyStyleMarginRight,
    +			    layoutImpl_->margin_[1].cssText());
    +      if (!all || (layoutImpl_->margin_[2].value() != 0))
    +	element.setProperty(PropertyStyleMarginBottom,
    +			    layoutImpl_->margin_[2].cssText());
    +      if (!all || (layoutImpl_->margin_[3].value() != 0))
    +	element.setProperty(PropertyStyleMarginLeft,
    +			    layoutImpl_->margin_[3].cssText());
    +
    +      flags_.reset(BIT_MARGINS_CHANGED);
    +    }
    +  }
    +
    +  if (lookImpl_) {
    +    if (lookImpl_->toolTip_
    +	&& (flags_.test(BIT_TOOLTIP_CHANGED) || all)) {
    +      if (!all || (!lookImpl_->toolTip_->empty()))
    +	element.setAttribute("title", lookImpl_->toolTip_->toUTF8());
    +
    +      flags_.reset(BIT_TOOLTIP_CHANGED);
    +    }
    +
    +    if (lookImpl_->decorationStyle_)
    +      lookImpl_->decorationStyle_->updateDomElement(element, all);
    +
    +    if (all || flags_.test(BIT_STYLECLASS_CHANGED))
    +      if (!all || !lookImpl_->styleClass_.empty())
    +	element.setProperty(PropertyClass,
    +			    Utils::addWord(element.getProperty(PropertyClass),
    +					   lookImpl_->styleClass_.toUTF8()));
    +
    +    flags_.reset(BIT_STYLECLASS_CHANGED);
    +  }
    +
    +  if (transientImpl_) {
    +    for (unsigned i = 0; i < transientImpl_->addedStyleClasses_.size(); ++i)
    +      element.callJavaScript("$('#" + id() + "').addClass('"
    +			     + transientImpl_->addedStyleClasses_[i].toUTF8()
    +			     +"');");
    +
    +    for (unsigned i = 0; i < transientImpl_->removedStyleClasses_.size(); ++i)
    +      element.callJavaScript("$('#" + id() + "').removeClass('"
    +			     + transientImpl_->removedStyleClasses_[i].toUTF8()
    +			     +"');");
    +
    +    if (!transientImpl_->childRemoveChanges_.empty()) {
    +      if ((children_
    +	   && (children_->size() != transientImpl_->addedChildren_.size()))
    +	  || transientImpl_->specialChildRemove_) {
    +	for (unsigned i = 0; i < transientImpl_->childRemoveChanges_.size();
    +	     ++i) {
    +	  const std::string& js = transientImpl_->childRemoveChanges_[i];
    +	  if (js[0] == '_')
    +	    element.callJavaScript(WT_CLASS ".remove('" + js.substr(1) + "');",
    +				   true);
    +	  else
    +	    element.callJavaScript(js);
    +	}
    +      } else
    +	element.removeAllChildren();
    +
    +      transientImpl_->childRemoveChanges_.clear();
    +      transientImpl_->specialChildRemove_ = false;
    +    }
    +  }
    +
    +  if (all || flags_.test(BIT_SELECTABLE_CHANGED)) {
    +    if (flags_.test(BIT_SET_UNSELECTABLE)) {
    +      element.setProperty(PropertyClass,
    +			  Utils::addWord(element.getProperty(PropertyClass),
    +					 "unselectable"));
    +      element.setAttribute("unselectable", "on");
    +      element.setAttribute("onselectstart", "return false;");
    +    } else if (flags_.test(BIT_SET_SELECTABLE)) {
    +      element.setProperty(PropertyClass,
    +			  Utils::addWord(element.getProperty(PropertyClass),
    +					 "selectable"));
    +      element.setAttribute("unselectable", "off");
    +      element.setAttribute("onselectstart",
    +			   "event.cancelBubble=true; return true;");
    +    }
    +
    +    flags_.reset(BIT_SELECTABLE_CHANGED);
    +  }
    +
    +  if (otherImpl_) {
    +    if (otherImpl_->attributes_) {
    +      if (all) {
    +	for (std::map<std::string, WT_USTRING>::const_iterator i
    +	       = otherImpl_->attributes_->begin();
    +	     i != otherImpl_->attributes_->end(); ++i)
    +	  if (i->first == "style")
    +	    element.setProperty(PropertyStyle, i->second.toUTF8());
    +	  else
    +	    element.setAttribute(i->first, i->second.toUTF8());
    +      } else if (otherImpl_->attributesSet_) {
    +	for (unsigned i = 0; i < otherImpl_->attributesSet_->size(); ++i) {
    +	  std::string attr = (*otherImpl_->attributesSet_)[i];
    +	  if (attr == "style")
    +	    element.setProperty(PropertyStyle,
    +				(*otherImpl_->attributes_)[attr].toUTF8());
    +	  else
    +	    element.setAttribute(attr,
    +				 (*otherImpl_->attributes_)[attr].toUTF8());
    +	}
    +      }
    +
    +      delete otherImpl_->attributesSet_;
    +      otherImpl_->attributesSet_ = 0;
    +    }
    +
    +    if (otherImpl_->jsMembers_) {
    +      if (all) {
    +	for (unsigned i = 0; i < otherImpl_->jsMembers_->size(); i++) {
    +	  OtherImpl::Member member = (*otherImpl_->jsMembers_)[i];
    +	  element.callMethod(member.name + "=" + member.value);
    +	}
    +      } else if (otherImpl_->jsMembersSet_) {
    +	for (unsigned i = 0; i < otherImpl_->jsMembersSet_->size(); ++i) {
    +	  std::string m = (*otherImpl_->jsMembersSet_)[i];
    +
    +	  std::string value = javaScriptMember(m);
    +
    +	  if (!value.empty())
    +	    element.callMethod(m + "=" + value);
    +	  else
    +	    element.callMethod(m + "= null");
    +	}
    +      }
    +
    +      delete otherImpl_->jsMembersSet_;
    +      otherImpl_->jsMembersSet_ = 0;
    +    }
    +
    +    if (otherImpl_->jsMemberCalls_) {
    +      for (unsigned i = 0; i < otherImpl_->jsMemberCalls_->size(); ++i) {
    +	std::string m = (*otherImpl_->jsMemberCalls_)[i];
    +	element.callMethod(m);
    +      }
    +
    +      delete otherImpl_->jsMemberCalls_;
    +      otherImpl_->jsMemberCalls_ = 0;
    +    }
    +  }
    +
    +  if (flags_.test(BIT_HIDE_WITH_VISIBILITY)) {
    +    if (flags_.test(BIT_HIDDEN_CHANGED)
    +	|| (all && flags_.test(BIT_HIDDEN))) {
    +
    +      if (flags_.test(BIT_HIDDEN)) {
    +	element.setProperty(PropertyStyleVisibility, "hidden");
    +	if (flags_.test(BIT_HIDE_WITH_OFFSETS)) {
    +	  element.setProperty(PropertyStylePosition, "absolute");
    +	  element.setProperty(PropertyStyleTop, "-10000px");
    +	  element.setProperty(PropertyStyleLeft, "-10000px");
    +	}
    +      } else {
    +	if (flags_.test(BIT_HIDE_WITH_OFFSETS)) {
    +	  if (layoutImpl_) {
    +	    switch (layoutImpl_->positionScheme_) {
    +	    case Static:
    +	      element.setProperty(PropertyStylePosition, "static"); break;
    +	    case Relative:
    +	      element.setProperty(PropertyStylePosition, "relative"); break;
    +	    case Absolute:
    +	      element.setProperty(PropertyStylePosition, "absolute"); break;
    +	    case Fixed:
    +	      element.setProperty(PropertyStylePosition, "fixed"); break;
    +	    }
    +	    element.setProperty(PropertyStyleTop,
    +				layoutImpl_->offsets_[0].cssText());
    +	    element.setProperty(PropertyStyleLeft,
    +				layoutImpl_->offsets_[3].cssText());
    +	  } else {
    +	    element.setProperty(PropertyStylePosition, "static");
    +	  }
    +
    +	  element.setProperty(PropertyStyleTop, "0px");
    +	  element.setProperty(PropertyStyleLeft, "0px");
    +	}
    +	element.setProperty(PropertyStyleVisibility, "visible");
    +	element.setProperty(PropertyStyleDisplay, ""); // XXX
    +      }
    +
    +      flags_.reset(BIT_HIDDEN_CHANGED);
    +    }
    +  }
    +
    +  renderOk();
    +
    +  delete transientImpl_;
    +  transientImpl_ = 0;
    +}
    +
    +bool WWebWidget::isStubbed() const
    +{
    +  if (flags_.test(BIT_STUBBED))
    +    return true;
    +  else {
    +    WWidget *p = parent();
    +    return p ? p->isStubbed() : false;
    +  }
    +}
    +
    +bool WWebWidget::needsToBeRendered() const
    +{
    +  /*
    +   * Returns whether this widget should be rendered. The only alternative
    +   * is to be stubbed as an invisible widget.
    +   */
    +  return flags_.test(BIT_DONOT_STUB)
    +    || !flags_.test(BIT_HIDDEN)
    +    || !WApplication::instance()->session()->renderer().visibleOnly();
    +}
    +
    +void WWebWidget::getSFormObjects(FormObjectsMap& result)
    +{
    +  if (!flags_.test(BIT_STUBBED) && !flags_.test(BIT_HIDDEN))
    +    getFormObjects(result);
    +}
    +
    +void WWebWidget::getFormObjects(FormObjectsMap& formObjects)
    +{
    +  if (flags_.test(BIT_FORM_OBJECT))
    +    formObjects[id()] = this;
    +
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      (*children_)[i]->webWidget()->getSFormObjects(formObjects);
    +}
    +
    +void WWebWidget::getDomChanges(std::vector<DomElement *>& result,
    +			       WApplication *app)
    +{
    +  DomElement *e = DomElement::getForUpdate(this, domElementType());
    +  updateDom(*e, false);
    +  result.push_back(e);
    +}
    +
    +void WWebWidget::getSDomChanges(std::vector<DomElement *>& result,
    +				WApplication *app)
    +{
    +  bool isIEMobile = app->environment().agentIsIEMobile();
    +
    +  if (flags_.test(BIT_STUBBED)) {
    +    /*
    +     * If we are prelearning, we still want to catch changes to *this*
    +     * widget, since it could be related to the prelearning. Note that
    +     * this assumes that getDomChanges() does not attempt to do things
    +     * like recreating the widget...
    +     *
    +     * ... which is what happens in WContainerWidget, we make the exception
    +     * there...
    +     */
    +    if (app->session()->renderer().preLearning()) {
    +      getDomChanges(result, app);
    +      askRerender(true);
    +    } else {
    +      if (!app->session()->renderer().visibleOnly()) {
    +	flags_.reset(BIT_STUBBED);
    +
    +	if (!isIEMobile) {
    +	  DomElement *stub = DomElement::getForUpdate(this, DomElement_SPAN);
    +	  setRendered(true);
    +	  render(RenderFull);
    +	  DomElement *realElement = createDomElement(app);
    +	  stub->unstubWith(realElement, !flags_.test(BIT_HIDE_WITH_OFFSETS));
    +	  result.push_back(stub);
    +	} else
    +	  propagateRenderOk();
    +      }
    +    }
    +  } else {
    +    render(RenderUpdate);
    +
    +    if (isIEMobile) {
    +      if (flags_.test(BIT_REPAINT_PROPERTY_ATTRIBUTE)) {
    +	WWidget *p = this;
    +	WWebWidget *w = this;
    +	do {
    +	  p = p->parent();
    +	  if (p)
    +	    w = p->webWidget();
    +	} while (p && w == this);
    +
    +	if (w != this)
    +	  w->getSDomChanges(result, app);
    +      } else if (flags_.test(BIT_REPAINT_INNER_HTML)
    +		 || !flags_.test(BIT_REPAINT_PROPERTY_IEMOBILE)) {
    +	// the last condition results from repainting the parent, in which
    +	// case no change flags are set
    +	DomElement *e = createDomElement(app);
    +	e->updateInnerHtmlOnly();
    +	result.push_back(e);
    +      } else { // BIT_REPAINT_PROPERTY_IEMOBILE only
    +	getDomChanges(result, app);
    +      }
    +
    +      return;
    +    }
    +
    +    getDomChanges(result, app);
    +  }
    +}
    +
    +void WWebWidget::doneRerender()
    +{
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      (*children_)[i]->webWidget()->doneRerender();
    +}
    +
    +void WWebWidget::propagateRenderOk(bool deep)
    +{
    +#ifndef WT_TARGET_JAVA
    +  flags_ &= ~AllChangeFlags;
    +#else
    +  flags_.reset(BIT_HIDDEN_CHANGED);
    +  flags_.reset(BIT_GEOMETRY_CHANGED);
    +  flags_.reset(BIT_FLOAT_SIDE_CHANGED);
    +  flags_.reset(BIT_TOOLTIP_CHANGED);
    +  flags_.reset(BIT_MARGINS_CHANGED);
    +  flags_.reset(BIT_STYLECLASS_CHANGED);
    +  flags_.reset(BIT_SELECTABLE_CHANGED);
    +  flags_.reset(BIT_WIDTH_CHANGED);
    +  flags_.reset(BIT_HEIGHT_CHANGED);
    +  flags_.reset(BIT_DISABLED_CHANGED);
    +#endif
    +
    +  renderOk();
    +
    +  if (deep && children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      (*children_)[i]->webWidget()->propagateRenderOk();
    +
    +  delete transientImpl_;
    +  transientImpl_ = 0;
    +}
    +
    +void WWebWidget::setRendered(bool rendered)
    +{
    +  if (rendered)
    +    flags_.set(BIT_RENDERED);
    +  else {
    +    flags_.reset(BIT_RENDERED);
    +
    +    renderOk();
    +
    +    if (children_)
    +      for (unsigned i = 0; i < children_->size(); ++i)
    +	(*children_)[i]->webWidget()->setRendered(false);
    +  }
    +}
    +
    +void WWebWidget::setLoadLaterWhenInvisible(bool how)
    +{
    +  flags_.set(BIT_DONOT_STUB, !how);
    +}
    +
    +void WWebWidget::setId(DomElement *element, WApplication *app)
    +{
    +  if (!app->environment().agentIsSpiderBot()
    +      || (otherImpl_ && otherImpl_->id_)) {
    +    if (!flags_.test(BIT_FORM_OBJECT))
    +      element->setId(id());
    +    else
    +      element->setName(id());
    +  }
    +}
    +
    +WWidget *WWebWidget::find(const std::string& name)
    +{
    +  if (objectName() == name)
    +    return this;
    +  else {
    +    if (children_)
    +      for (unsigned i = 0; i < children_->size(); ++i) {
    +	WWidget *result = (*children_)[i]->find(name);
    +	if (result)
    +	  return result;
    +      }
    +  }
    +
    +  return 0;
    +}
    +
    +DomElement *WWebWidget::createDomElement(WApplication *app)
    +{
    +  setRendered(true);
    +
    +  DomElement *result = DomElement::createNew(domElementType());
    +  setId(result, app);
    +  updateDom(*result, true);
    +
    +  return result;
    +}
    +
    +bool WWebWidget::isRendered() const
    +{
    +  return flags_.test(WWebWidget::BIT_RENDERED);
    +}
    +
    +DomElement *WWebWidget::createStubElement(WApplication *app)
    +{
    +  /*
    +   * Make sure the object itself is clean, so that stateless slot
    +   * learning is not confused.
    +   */
    +  propagateRenderOk();
    + 
    +  flags_.set(BIT_STUBBED);
    +
    +  DomElement *stub = DomElement::createNew(DomElement_SPAN);
    +  if (!flags_.test(BIT_HIDE_WITH_OFFSETS)) {
    +    stub->setProperty(Wt::PropertyStyleDisplay, "none");
    +  } else {
    +    stub->setProperty(PropertyStylePosition, "absolute");
    +    stub->setProperty(PropertyStyleLeft, "-10000px");
    +    stub->setProperty(PropertyStyleTop, "-10000px");
    +    stub->setProperty(PropertyStyleVisibility, "hidden");
    +  }
    +  if (app->environment().javaScript())
    +    stub->setProperty(Wt::PropertyInnerHTML, "...");
    +
    +  if (!app->environment().agentIsSpiderBot()
    +      || (otherImpl_ && otherImpl_->id_))
    +    stub->setId(id());
    +
    +  return stub;
    +}
    +
    +DomElement *WWebWidget::createActualElement(WApplication *app)
    +{
    +  flags_.reset(BIT_STUBBED);
    +
    +  return createDomElement(app);
    +}
    +
    +void WWebWidget::refresh()
    +{
    +  if (lookImpl_ && lookImpl_->toolTip_)
    +    if (lookImpl_->toolTip_->refresh()) {
    +      flags_.set(BIT_TOOLTIP_CHANGED);
    +      repaint(RepaintPropertyAttribute);
    +    }
    +
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      (*children_)[i]->refresh();
    +
    +  WWidget::refresh();
    +}
    +
    +void WWebWidget::enableAjax()
    +{
    +  /*
    +   * What needs to be done ? We want to get to the same state as the normal
    +   * AJAX bootstrap: thus still leaving stubs as is.
    +   */
    +  if (!isStubbed()) {
    +    for (EventSignalList::iterator i = eventSignals().begin();
    +	 i != eventSignals().end(); ++i) {
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +      EventSignalBase& s = *i;
    +#else
    +      EventSignalBase& s = **i;
    +#endif
    +      if (s.name() == WInteractWidget::CLICK_SIGNAL)
    +	repaint(RepaintToAjax);
    +
    +      s.senderRepaint();
    +    }
    +  }
    +
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      (*children_)[i]->enableAjax();
    +}
    +
    +void WWebWidget::setIgnoreChildRemoves(bool how)
    +{
    +  if (how)
    +    flags_.set(BIT_IGNORE_CHILD_REMOVES);
    +  else
    +    flags_.reset(BIT_IGNORE_CHILD_REMOVES);
    +}
    +
    +bool WWebWidget::ignoreChildRemoves() const
    +{
    +  return flags_.test(BIT_IGNORE_CHILD_REMOVES);
    +}
    +
    +WString WWebWidget::escapeText(const WString& text, bool newlinestoo)
    +{
    +  std::string result = text.toUTF8();
    +  result = escapeText(result, newlinestoo);
    +  return WString::fromUTF8(result);
    +}
    +
    +std::string& WWebWidget::escapeText(std::string& text, bool newlinestoo)
    +{
    +  EscapeOStream sout;
    +  if (newlinestoo)
    +    sout.pushEscape(EscapeOStream::PlainTextNewLines);
    +  else
    +    sout.pushEscape(EscapeOStream::PlainText);
    +
    +  Wt::Utils::sanitizeUnicode(sout, text);
    +
    +  text = sout.str();
    +
    +  return text;
    +}
    +
    +std::string WWebWidget::jsStringLiteral(const std::string& value,
    +					char delimiter)
    +{
    +  std::stringstream result;
    +  DomElement::jsStringLiteral(result, value, delimiter);
    +  return result.str();
    +}
    +
    +std::string WWebWidget::jsStringLiteral(const WString& value,
    +					char delimiter)
    +{
    +  return value.jsStringLiteral(delimiter);
    +}
    +
    +void WWebWidget::load()
    +{
    +  flags_.set(BIT_LOADED);
    +
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i)
    +      doLoad((*children_)[i]);
    +
    +  if (flags_.test(BIT_HIDE_WITH_OFFSETS))
    +    parent()->setHideWithOffsets(true);
    +}
    +
    +void WWebWidget::doLoad(WWidget *w)
    +{
    +  w->load();
    +  if (!w->loaded())
    +    std::cerr << "Improper load() implementation: base implementation not "
    +      "called?" << std::endl;
    +}
    +
    +void WWebWidget::render(WFlags<RenderFlag> flags)
    +{
    +  WWidget::render(flags);
    +  if (otherImpl_ && otherImpl_->delayedDoJavaScript_) {
    +    wApp->doJavaScript(otherImpl_->delayedDoJavaScript_->str());
    +    delete otherImpl_->delayedDoJavaScript_;
    +    otherImpl_->delayedDoJavaScript_ = 0;
    +  }
    +}
    +
    +void WWebWidget::doJavaScript(const std::string& javascript)
    +{
    +  if (isRendered())
    +    wApp->doJavaScript(javascript);
    +  else {
    +    if (!otherImpl_)
    +      otherImpl_ = new OtherImpl;
    +    if (!otherImpl_->delayedDoJavaScript_)
    +      otherImpl_->delayedDoJavaScript_ = new SStream;
    +    (*otherImpl_->delayedDoJavaScript_) << javascript;
    +  }
    +}
    +
    +bool WWebWidget::loaded() const
    +{
    +  return flags_.test(BIT_LOADED);
    +}
    +
    +void WWebWidget::setTabIndex(int index)
    +{
    +  if (children_)
    +    for (unsigned i = 0; i < children_->size(); ++i) {
    +      WWidget *c = (*children_)[i];
    +      c->setTabIndex(index);
    +    }
    +}
    +
    +int WWebWidget::tabIndex() const
    +{
    +  if (children_) {
    +    int result = 0;
    +
    +    for (unsigned i = 0; i < children_->size(); ++i) {
    +      WWidget *c = (*children_)[i];
    +      result = std::max(result, c->tabIndex());
    +    }
    +
    +    return result;
    +  } else
    +    return 0;
    +}
    +
    +WWebWidget::DropMimeType::DropMimeType(const WT_USTRING& aHoverStyleClass)
    +  : hoverStyleClass(aHoverStyleClass)
    +{ }
    +
    +WWebWidget::DropMimeType::DropMimeType()
    +{ }
    +
    +bool WWebWidget::setAcceptDropsImpl(const std::string& mimeType, bool accept,
    +				    const WT_USTRING& hoverStyleClass)
    +{
    +  bool result  = false; // whether the signal needs to be connected.
    +  bool changed = false;
    +
    +  if (!otherImpl_)
    +    otherImpl_ = new OtherImpl();
    +  if (!otherImpl_->acceptedDropMimeTypes_)
    +    otherImpl_->acceptedDropMimeTypes_ = new OtherImpl::MimeTypesMap;
    +
    +  OtherImpl::MimeTypesMap::iterator i
    +    = otherImpl_->acceptedDropMimeTypes_->find(mimeType);
    +
    +  if (i == otherImpl_->acceptedDropMimeTypes_->end()) {
    +    if (accept) {
    +      result = otherImpl_->acceptedDropMimeTypes_->empty();
    +      (*otherImpl_->acceptedDropMimeTypes_)[mimeType]
    +	= DropMimeType(hoverStyleClass);
    +      changed = true;
    +    }
    +  } else {
    +    if (!accept) {
    +#ifndef WT_TARGET_JAVA
    +      otherImpl_->acceptedDropMimeTypes_->erase(i);
    +#else
    +      otherImpl_->acceptedDropMimeTypes_->erase(mimeType);
    +#endif // WT_TARGET_JAVA
    +      changed = true;
    +    }
    +  }
    +
    +  if (changed) {
    +    std::string mimeTypes = "";
    +
    +    for (OtherImpl::MimeTypesMap::const_iterator j
    +	   = otherImpl_->acceptedDropMimeTypes_->begin();
    +	 j != otherImpl_->acceptedDropMimeTypes_->end(); ++j) {
    +      mimeTypes
    +	+= "{" + j->first + ":" + j->second.hoverStyleClass.toUTF8() + "}";
    +    }
    +
    +    setAttributeValue("amts", mimeTypes);
    +  }
    +
    +  if (result && !otherImpl_->dropSignal_)
    +    otherImpl_->dropSignal_
    +      = new JSignal<std::string,std::string, WMouseEvent>(this, "_drop");
    +
    +  return result;
    +}
    +
    +EventSignal<WKeyEvent> *WWebWidget::keyEventSignal(const char *name,
    +						   bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<WKeyEvent> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    EventSignal<WKeyEvent> *result = new EventSignal<WKeyEvent>(name, this);
    +#else
    +    EventSignal<WKeyEvent> *result
    +      = new EventSignal<WKeyEvent>(name, this, WKeyEvent::templateEvent);
    +#endif // WT_TARGET_JAVA
    +
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +EventSignal<> *WWebWidget::voidEventSignal(const char *name, bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +    EventSignal<> *result = new EventSignal<>(name, this);
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +EventSignal<WMouseEvent> *WWebWidget::mouseEventSignal(const char *name,
    +						       bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<WMouseEvent> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    EventSignal<WMouseEvent> *result = new EventSignal<WMouseEvent>(name, this);
    +#else
    +    EventSignal<WMouseEvent> *result
    +      = new EventSignal<WMouseEvent>(name, this, WMouseEvent::templateEvent);
    +#endif // WT_TARGET_JAVA
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +EventSignal<WTouchEvent> *WWebWidget::touchEventSignal(const char *name,
    +						       bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<WTouchEvent> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    EventSignal<WTouchEvent> *result = new EventSignal<WTouchEvent>(name, this);
    +#else
    +    EventSignal<WTouchEvent> *result
    +      = new EventSignal<WTouchEvent>(name, this, WTouchEvent::templateEvent);
    +#endif // WT_TARGET_JAVA
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +EventSignal<WGestureEvent> *WWebWidget::gestureEventSignal(const char *name,
    +							   bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<WGestureEvent> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    EventSignal<WGestureEvent> *result
    +      = new EventSignal<WGestureEvent>(name, this);
    +#else
    +    EventSignal<WGestureEvent> *result
    +      = new EventSignal<WGestureEvent>(name, this,
    +				       WGestureEvent::templateEvent);
    +#endif // WT_TARGET_JAVA
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +EventSignal<WScrollEvent> *WWebWidget::scrollEventSignal(const char *name,
    +							 bool create)
    +{
    +  EventSignalBase *b = getEventSignal(name);
    +  if (b)
    +    return static_cast<EventSignal<WScrollEvent> *>(b);
    +  else if (!create)
    +    return 0;
    +  else {
    +#ifndef WT_TARGET_JAVA
    +    EventSignal<WScrollEvent> *result
    +      = new EventSignal<WScrollEvent>(name, this);
    +#else
    +    EventSignal<WScrollEvent> *result
    +      = new EventSignal<WScrollEvent>(name, this, WScrollEvent::templateEvent);
    +#endif // WT_TARGET_JAVA
    +    addEventSignal(*result);
    +    return result;
    +  }
    +}
    +
    +void WWebWidget::updateSignalConnection(DomElement& element,
    +					EventSignalBase &signal,
    +					const char *name,
    +					bool all)
    +{
    +  if (name[0] != 'M' && signal.needsUpdate(all)) {
    +    element.setEventSignal(name, signal);
    +    signal.updateOk();
    +  }
    +}
    +
    +bool WWebWidget::canOptimizeUpdates()
    +{
    +  return !WApplication::instance()->session()->renderer().preLearning();
    +}
    +
    +std::string WWebWidget::fixRelativeUrl(const std::string& url)
    +{
    +  return WApplication::instance()->fixRelativeUrl(url);
    +}
    +
    +bool WWebWidget::removeScript(WString& text)
    +{
    +#ifndef WT_NO_XSS_FILTER
    +  return XSSFilterRemoveScript(text);
    +#else
    +  return true;
    +#endif
    +}
    diff --git a/wt-3.1.7a/src/Wt/WWidget b/wt-3.1.7a/src/Wt/WWidget
    new file mode 100644
    index 0000000..68527a5
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWidget
    @@ -0,0 +1,1047 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WWIDGET_H_
    +#define WWIDGET_H_
    +
    +#include <Wt/WObject>
    +#include <Wt/WLength>
    +#include <Wt/WBorder>
    +#include <Wt/WSignal>
    +#include <Wt/WJavaScript>
    +#include <Wt/WGlobal>
    +
    +#include <boost/utility.hpp>
    +#include <vector>
    +#include <sstream>
    +
    +namespace Wt {
    +
    +class WContainerWidget;
    +class WCssDecorationStyle;
    +class WDropEvent;
    +class WLayout;
    +class WLayoutItemImpl;
    +class WLayoutItem;
    +class WMouseEvent;
    +class WString;
    +class WWebWidget;
    +class DomElement;
    +
    +/*! \class WWidget Wt/WWidget Wt/WWidget
    + *  \brief The abstract base class for a user-interface component.
    + *
    + * The user-interface is organized in a tree structure, in which each
    + * nodes is a widgets. All widgets, except for the application's root
    + * widget and dialogs, have a parent which is usually a
    + * WContainerWidget.
    + *
    + * \if cpp
    + *
    + * When a widget is deleted, it is also visually removed from the
    + * user-interface and all children are deleted recursively.
    + *
    + * \endif
    + *
    + * This is an abstract base class. Implementations derive either from
    + * the abstract WWebWidget (for basic widgets with a direct HTML
    + * counter-part) or from the abstract WCompositeWidget (for anything
    + * else). To add a %WWebWidget directly to a parent container, either
    + * specify the parent in the constructor (which is conventionally the
    + * last constructor argument), or add the widget to the parent using
    + * WContainerWidget::addWidget(). Alternatively, you may add the widget
    + * to a layout manager set for a %WContainerWidget.
    + *
    + * A widget provides methods to manage its decorative style base on
    + * CSS. It also provides access to CSS-based layout, which you may not
    + * use when the widget is not inserted into a layout manager.
    + */
    +class WT_API WWidget : public WObject
    +#ifndef WT_TARGET_JAVA
    +  , boost::noncopyable
    +#endif // WT_TARGET_JAVA
    +{
    +public:
    +  /*! \brief Destructor.
    +   *
    +   * Deletes a widget and all children (recursively). If the widget is
    +   * contained in another widget, it is removed first.
    +   *
    +   * \sa WContainerWidget::removeWidget()
    +   */
    +  virtual ~WWidget();
    +
    +  /*! \brief Returns the parent widget.
    +   *
    +   * With a few exceptions, the parent is a WContainerWidget, and has
    +   * been set implicitly when adding the widget to a container using
    +   * WContainerWidget::addWidget(), by passing a container as a parent
    +   * to the constructor, or by inserting the widget into a layout
    +   * manager.
    +   */
    +  WWidget *parent() const { return dynamic_cast<WWidget *>(WObject::parent()); }
    +
    +  /*! \brief Sets the CSS position scheme.
    +   *
    +   * Establishes how the widget must be layed-out relative to its
    +   * siblings. The default position scheme is Static.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa Wt::PositionScheme, positionScheme()
    +   */
    +  virtual void setPositionScheme(PositionScheme scheme) = 0;
    +
    +  /*! \brief Returns the CSS position scheme.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa Wt::PositionScheme, setPositionScheme(PositionScheme)
    +   */
    +  virtual PositionScheme positionScheme() const = 0;
    +
    +  /*! \brief Sets CSS offsets for a non-statically positioned widget.
    +   *
    +   * The argument \p sides may be a combination of Wt::Left,
    +   * Wt::Right, Wt::Top, and Wt::Bottom.
    +   *
    +   * This applies only to widgets that have a position scheme that is
    +   * Wt::Relative, Wt::Absolute, or Wt::Fixed, and has a slightly
    +   * different meaning for these three cases.
    +   *
    +   * For a \link Wt::Relative relatively positioned\endlink widget, an
    +   * offset applies relative to the position the widget would have
    +   * when layed-out using a \link Wt::Static static\endlink position
    +   * scheme. The widget may be shifted to the left or right by
    +   * specifying an offset for the \link Wt::Left left\endlink or \link
    +   * Wt::Right right\endlink) side. The widget may be shifted
    +   * vertically, by specifying an offset for the \link Wt::AlignTop
    +   * top\endlink or \link Wt::Bottom bottom\endlink side.
    +   *
    +   * For an \link Wt::Absolute absolutely positioned\endlink widget,
    +   * an offset specifies a distance of the corresponding side of the
    +   * widget with respect to the corresponding side of the reference
    +   * parent widget. Thus, setting all offsets to 0 result in a widget
    +   * that spans the entire reference widget. The reference parent
    +   * widget is the first ancestor widget that is a table cell, or a
    +   * widget with a relative, absolute or fixed position scheme.
    +   *
    +   * For an \link Wt::Fixed fixed positioned\endlink widget, an offset
    +   * specifies a distance of the corresponding side of the widget with
    +   * respect to the browser window, regardless of scrolling. Thus,
    +   * setting all offsets to 0 result in a widget that spans the entire
    +   * browser window.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa offset(Side) const
    +   */
    +  virtual void setOffsets(const WLength& offset, WFlags<Side> sides = All) = 0;
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Sets CSS offsets for a non-statically positioned widget.
    +   *
    +   * This is a convenience method for applying offsets in pixel units.
    +   *
    +   * \sa setOffsets(const WLength&, WFlags<Side>)
    +   */
    +  void setOffsets(int pixels, WFlags<Side> sides = All);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns a CSS offset.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setOffsets(const WLength&, WFlags<Side>)
    +   */
    +  virtual WLength offset(Side side) const = 0;
    +
    +  /*! \brief Resizes the widget.
    +   *
    +   * Specify a new size for this widget, by specifying width and height.
    +   * By default a widget has automatic width and height, see WLength::isAuto().
    +   *
    +   * This applies to CSS-based layout, and only \link setInline() block\endlink
    +   * widgets can be given a size reliably.
    +   *
    +   * When inserted in a layout manager, the widget may be informed
    +   * about its current size using setLayoutSizeAware(). If you have
    +   * defined a <tt>"wtResize()"</tt> JavaScript method for the widget, then
    +   * this method will also be called.
    +   * operation.
    +   *
    +   * \sa width(), height()
    +   */
    +  virtual void resize(const WLength& width, const WLength& height);
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Resizes the widget.
    +   *
    +   * This is a convenience method for resizing a widget using pixel units.
    +   *
    +   * \sa resize(const WLength&, const WLength&)
    +   */
    +  void resize(int widthPixels, int heightPixels);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns the width.
    +   *
    +   * Returns the width set for this widget. This is not a calculated
    +   * width, based on layout, but the width as specified with
    +   * resize(const WLength&, const WLength&).
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa resize(const WLength&, const WLength&), height()
    +   */
    +  virtual WLength width() const = 0;
    +
    +  /*! \brief Returns the height.
    +   *
    +   * Returns the height set for this widget. This is not a calculated
    +   * height, based on layout, but the height as specified previously
    +   * with resize(const WLength& width, const WLength& height).
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa resize(const WLength&, const WLength&), width()
    +   */
    +  virtual WLength height() const = 0;
    +
    +  /*! \brief Sets a minimum size.
    +   *
    +   * Specify a minimum size for this widget. When the widget is
    +   * managed using a layout manager, these sizes are also taken into
    +   * account.
    +   *
    +   * \sa resize(), minimumWidth(), minimumHeight()
    +   */
    +  virtual void setMinimumSize(const WLength& width, const WLength& height) = 0;
    +
    +  /*! \brief Returns the minimum width.
    +   *
    +   * Returns the minimum width set for this widget with setMinimumSize().
    +   *
    +   * \sa setMinimumSize(), minimumHeight()
    +   */
    +  virtual WLength minimumWidth() const = 0;
    +
    +  /*! \brief Returns the minimum height.
    +   *
    +   * Returns the minmum height set for this widget with setMinimumSize().
    +   *
    +   * \sa setMinimumSize(), minimumWidth()
    +   */
    +  virtual WLength minimumHeight() const = 0;
    +
    +  /*! \brief Sets a maximum size.
    +   *
    +   * Specify a minimum size for this widget.
    +   *
    +   * \sa resize(), maximumWidth(), maximumHeight()
    +   */
    +  virtual void setMaximumSize(const WLength& width, const WLength& height) = 0;
    +
    +  /*! \brief Returns the maximum width.
    +   *
    +   * Returns the maximum width set for this widget with setMaximumSize().
    +   *
    +   * \sa setMaximumSize(), maximumHeight()
    +   */
    +  virtual WLength maximumWidth() const = 0;
    +
    +  /*! \brief Returns the maximum height.
    +   *
    +   * Returns the minmum height set for this widget with setMaximumSize().
    +   *
    +   * \sa setMaximumSize(), maximumWidth()
    +   */
    +  virtual WLength maximumHeight() const = 0;
    +
    +  /*! \brief Positions a widget next to another widget.
    +   *
    +   * Positions this absolutely positioned widget next to another \p
    +   * widget. Both widgets must be visible.
    +   *
    +   * When \p orientation = Wt::Vertical, the widget is displayed below the
    +   * other widget (or above in case there is not enough room
    +   * below). It is aligned so that the left edges align (or the right
    +   * edges if there is not enough room to the right).
    +   *
    +   * Conversely, when \p orientation = Wt::Horizontal, the widget is
    +   * displayed to the right of the other widget (or to the left in
    +   * case there is not enough room to the right). It is aligned so
    +   * that the top edges align (or the bottom edges if there is not
    +   * enough room below).
    +   *
    +   * \note This only works if JavaScript is available.
    +   */
    +  void positionAt(const WWidget *widget, Orientation orientation = Vertical);
    +
    +  /*! \brief Sets the CSS line height for contained text.
    +   */
    +  virtual void setLineHeight(const WLength& height) = 0;
    +
    +  /*! \brief Returns the CSS line height for contained text.
    +   *
    +   * sa setLineHeight()
    +   */
    +  virtual WLength lineHeight() const = 0;
    +
    +  /*! \brief Specifies a CSS float side.
    +   *
    +   * This only applies to widgets with a Wt::Static positionScheme().
    +   *
    +   * This lets the widget float to one of the sides of the parent
    +   * widget, at the current line. A typical use is to position images
    +   * within text. Valid values for Side or \if cpp Wt::None \elseif
    +   * java {javadoclink Side#None None} \endif, Wt::Left or Wt::Right.
    +   *
    +   * This applies to CSS-based layout.
    +   */
    +  virtual void setFloatSide(Side s) = 0;
    +
    +  /*! \brief Returns the CSS float side.
    +   *
    +   * \sa setFloatSide(Side)
    +   */
    +  virtual Side floatSide() const = 0;
    +
    +  /*! \brief Sets the sides that should be cleared of floats.
    +   *
    +   * This pushes the widget down until it is not surrounded by floats
    +   * at the \p sides (which may be a combination of Wt::Left and
    +   * Wt::Right).
    +   * 
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setFloatSide()
    +   */
    +  virtual void setClearSides(WFlags<Side> sides) = 0;
    +
    +  /*! \brief Returns the sides that should remain empty.
    +   *
    +   * \sa setClearSides(WFlags<Side>)
    +   */
    +  virtual WFlags<Side> clearSides() const = 0;
    +
    +  /*! \brief Sets CSS margins around the widget.
    +   *
    +   * Setting margin has the effect of adding a distance between the widget
    +   * and surrounding widgets. The default margin (with an automatic length)
    +   * is zero.
    +   *
    +   * Use any combination of Wt::Left, Wt::Right, Wt::Bottom, or Wt::Top.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa margin()
    +   */
    +  virtual void setMargin(const WLength& margin, WFlags<Side> sides = All) = 0;
    +
    +#ifdef WT_TARGET_JAVA
    +  /*! \brief Sets CSS margins around the widget.
    +   *
    +   * This is a convenience method for setting margins in pixel units.
    +   *
    +   * \sa setMargin(const WLength&, WFlags<Side>)
    +   */
    +  virtual void setMargin(int pixels, WFlags<Side> sides = All);
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Returns a CSS margin set.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setMargin()
    +   */
    +  virtual WLength margin(Side side) const = 0;
    +
    +  /*! \brief Sets whether the widget keeps its geometry when hidden.
    +   *
    +   * Normally, a widget that is hidden will no longer occupy space,
    +   * causing a reflow of sibling widgets. Using this method you may
    +   * change this behavior to keep an (open) space when hidden.
    +   *
    +   * \note Currently you can only set this before initial rendering.
    +   *
    +   * \sa setHidden()
    +   */
    +  virtual void setHiddenKeepsGeometry(bool enabled) = 0;
    +
    +  /*! \brief Returns whether the widget keeps its geometry when hidden.
    +   *
    +   * \sa setHiddenKeepsGeometry()
    +   */
    +  virtual bool hiddenKeepsGeometry() const = 0;
    +
    +  /*! \brief Sets whether the widget is hidden.
    +   *
    +   * Hides or show the widget (including all its descendant widgets).
    +   * When setting \p hidden = \c false, this widget and all descendant
    +   * widgets that are not hidden will be shown. A widget is only
    +   * visible if it and all its ancestors in the widget tree are
    +   * visible, which may be checked using isVisible().
    +   *
    +   * \sa hide(), show()
    +   */
    +  virtual void setHidden(bool hidden) = 0;
    +
    +  /*! \brief Returns whether the widget is set hidden.
    +   *
    +   * A widget that is not hidden may still be not visible when one of
    +   * its ancestor widgets is hidden. Use isVisible() to check the
    +   * visibility of a widget.
    +   *
    +   * \sa setHidden(), isVisible()
    +   */
    +  virtual bool isHidden() const = 0;
    +
    +  /*! \brief Returns whether the widget is visible.
    +   *
    +   * A widget is visible if it is not hidden, and none of its
    +   * ancestors are hidden. This method returns the true visibility,
    +   * while isHidden() returns whether a widget has been explicitly
    +   * hidden.
    +   *
    +   * Note that a widget may be at the same time not hidden, and not
    +   * visible, in case one of its ancestors was hidden.
    +   *
    +   * \sa isHidden()
    +   */
    +  virtual bool isVisible() const = 0;
    +
    +  /*! \brief Sets whether the widget is disabled.
    +   *
    +   * Enables or disables the widget (including all its descendant
    +   * widgets). setDisabled(false) will enable this widget and all
    +   * descendant widgets that are not disabled. A widget is only
    +   * enabled if it and all its ancestors in the widget tree are
    +   * disabled.
    +   *
    +   * Typically, a disabled form widget will not allow changing the
    +   * value, and disabled widgets will not react to mouse click events.
    +   *
    +   * \sa disable(), enable()
    +   */
    +  virtual void setDisabled(bool disabled) = 0;
    +
    +  /*! \brief Returns whether the widget is set disabled.
    +   *
    +   * A widget that is not set disabled may still be disabled when one
    +   * of its ancestor widgets is set disabled. Use isEnabled() to find
    +   * out whether a widget is enabled.
    +   *
    +   * \sa setDisabled(), isEnabled()
    +   */
    +  virtual bool isDisabled() const = 0;
    +
    +  /*! \brief Returns whether the widget is enabled.
    +   *
    +   * A widget is enabled if it is not disabled, and none of its
    +   * ancestors are disabled. This method returns whether the widget is
    +   * rendered as enabled, while isDisabled() returns whether a widget
    +   * has been explicitly disabled.
    +   *
    +   * Note that a widget may be at the same time not enabled, and not
    +   * disabled, in case one of its ancestors was disabled.
    +   *
    +   * \sa isDisabled()
    +   */
    +  virtual bool isEnabled() const = 0;
    +
    +  /*! \brief Lets the widget overlay over other sibling widgets.
    +   *
    +   * A widget that isPopup() will be rendered on top of any other
    +   * sibling widget contained within the same parent (including other
    +   * popup widgets previously added to the container).
    +   *
    +   * This will only have an effect when the widgetis either
    +   * Wt::Absolute or Wt::Fixed positionScheme().
    +   *
    +   * This applies to CSS-based layout, and configures the z-index
    +   * property.
    +   */
    +  virtual void setPopup(bool popup) = 0;
    +
    +  /*! \brief Returns whether the widget is overlayed.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setPopup(bool)
    +   */
    +  virtual bool isPopup() const = 0;
    +
    +  /*! \brief Sets whether the widget is displayed inline or as a block.
    +   *
    +   * This option changes whether this widget must be rendered in line
    +   * with sibling widgets wrapping at the right edge of the parent
    +   * container (like text), or whether this widget must be rendered as
    +   * a rectangular block that stacks vertically with sibling widgets
    +   * (unless a CSS float property is applied). Depending on the widget
    +   * type, the default value is inline (such as for example for WText,
    +   * or WPushButton), or block (such as for example for a
    +   * WContainerWidget).
    +   *
    +   * This applies to CSS-based layout.
    +   */
    +  virtual void setInline(bool inlined) = 0;
    +
    +  /*! \brief Returns whether the widget is displayed inline or as block.
    +   *
    +   * \sa setInline(bool)
    +   */
    +  virtual bool isInline() const = 0;
    +
    +  /*! \brief Sets a CSS decoration style.
    +   *
    +   * This copies the style over its current decorationStyle()
    +   */
    +  virtual void setDecorationStyle(const WCssDecorationStyle& style) = 0;
    +
    +  /*! \brief Returns the decoration style of this widget.
    +   *
    +   * This groups all decorative aspects of the widget, which do not
    +   * affect the widget layout (except for the border properties which
    +   * may behave like extra margin around the widget).
    +   *
    +   * When a decoration style has not been previously set, it returns a
    +   * default decoration style object.
    +   *
    +   * \sa setDecorationStyle()
    +   */
    +  virtual WCssDecorationStyle& decorationStyle() = 0;
    +
    +  /*! \brief Sets (one or more) CSS style classes.
    +   *
    +   * You may set one or more space separated style classes. CSS style
    +   * class works in conjunction with style sheet, and provides a
    +   * flexible way to provide many widgets the same markup.
    +   *
    +   * Setting an empty string removes the style class(es).
    +   * 
    +   * \sa WApplication::styleSheet()
    +   */
    +  virtual void setStyleClass(const WT_USTRING& styleClass) = 0;
    +
    +  void setStyleClass(const char *styleClass);
    +
    +  /*! \brief Returns the CSS style class.
    +   *
    +   * \sa setStyleClass()
    +   */
    +  virtual WT_USTRING styleClass() const = 0;
    +
    +  /*! \brief Adds a CSS style class.
    +   *
    +   * When \p force = \c true, a JavaScript call will be used to add
    +   * the style class to the DOM element (if JavaScript is
    +   * available). This may be necessary when client-side JavaScript
    +   * manipulates the same style class.
    +   */
    +  virtual void addStyleClass(const WT_USTRING& styleClass,
    +			     bool force = false) = 0;
    +
    +  void addStyleClass(const char *styleClass, bool force = false);
    +
    +  /*! \brief Removes a CSS style class.
    +   *
    +   * When \p force = \c true, a JavaScript call will be used to remove
    +   * the style class from the DOM element (if JavaScript is
    +   * available). This may be necessary when client-side JavaScript
    +   * manipulates the same style class.
    +   */
    +  virtual void removeStyleClass(const WT_USTRING& styleClass,
    +				bool force = false) = 0;
    +
    +  void removeStyleClass(const char *styleClass, bool force = false);
    +
    +  /*! \brief Sets the vertical alignment.
    +   *
    +   * This only applies to inline widgets, and determines how to position
    +   * itself on the current line, with respect to sibling inline widgets.
    +   *
    +   * This applies to CSS-based layout.
    +   */
    +  virtual void setVerticalAlignment(AlignmentFlag alignment,
    +				    const WLength& length = WLength::Auto) = 0;
    +
    +  /*! \brief Returns the vertical alignment.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setVerticalAlignment()
    +   */
    +  virtual AlignmentFlag verticalAlignment() const = 0;
    +
    +  /*! \brief Returns the fixed vertical alignment that was set.
    +   *
    +   * This applies to CSS-based layout.
    +   *
    +   * \sa setVerticalAlignment()
    +   */
    +  virtual WLength verticalAlignmentLength() const = 0;
    +
    +  /*! \brief Sets a tooltip.
    +   *
    +   * The tooltip is displayed when the cursor hovers over the widget.
    +   */
    +  virtual void setToolTip(const WString& text) = 0;
    +
    +  /*! \brief Returns the tooltip.
    +   */
    +  virtual WString toolTip() const = 0;
    +
    +  /*! \brief Refresh the widget.
    +   *
    +   * The refresh method is invoked when the locale is changed using
    +   * WApplication::setLocale() or when the user hit the refresh button.
    +   *
    +   * The widget must actualize its contents in response.
    +   */
    +  virtual void refresh();
    +
    +  /*! \brief Returns a JavaScript expression to the corresponding DOM node.
    +   *
    +   * You may want to use this in conjunction with JSlot or
    +   * WApplication::doJavaScript() in custom JavaScript code.
    +   *
    +   * \sa isRendered()
    +   */
    +  std::string jsRef() const;
    +
    +  /*! \brief Sets an attribute value.
    +   *
    +   * Associate an extra attribute with this widget, with the given value.
    +   * This is only useful when processing dom nodes associated with widgets
    +   * in custom JavaScript code.
    +   *
    +   * \sa JSlot, WApplication::doJavaScript()
    +   */
    +  virtual void setAttributeValue(const std::string& name,
    +				 const WT_USTRING& value) = 0;
    +
    +  /*! \brief Returns an attribute value.
    +   *
    +   * \sa setAttributeValue()
    +   */
    +  virtual WT_USTRING attributeValue(const std::string& name) const = 0;
    +
    +  /*! \brief Sets a JavaScript member.
    +   *
    +   * This binds a JavaScript member, which is set as a JavaScript property
    +   * to the DOM object that implements this widget. The value may be any
    +   * JavaScript expression, including a function.
    +   *
    +   * Members that start with <tt>"wt"</tt> are reserved for internal
    +   * use. You may define a member <tt>"wtResize(self, width,
    +   * height)"</tt> method if your widget needs active layout
    +   * management. If defined, this method will be used by layout
    +   * managers and when doing resize() to set the size of the widget,
    +   * instead of setting the CSS width and height properties.
    +   */
    +  virtual void setJavaScriptMember(const std::string& name,
    +				   const std::string& value) = 0;
    +
    +  /*! \brief Returns the value of a JavaScript member.
    +   *
    +   * \sa setJavaScriptMember()
    +   */
    +  virtual std::string javaScriptMember(const std::string& name) const = 0;
    +
    +  /*! \brief Calls a JavaScript member.
    +   *
    +   * This calls a JavaScript member.
    +   *
    +   * \sa setJavaScriptMember()
    +   */
    +  virtual void callJavaScriptMember(const std::string& name,
    +				    const std::string& args) = 0;
    +
    +  /*! \brief Short hand for WString::tr()
    +   *
    +   * Creates a localized string with the given key.
    +   */
    +  static WString tr(const char *key);
    +  static WString tr(const std::string& key);
    +
    +  /*! \brief Loads content just before the widget is used.
    +   *
    +   * When the widget is inserted in the widget hierarchy, this method
    +   * is called. Widgets that get inserted in the widget hierarchy will
    +   * be rendered. Visible widgets are rendered immediately, and
    +   * invisible widgets in the back-ground (or not for a plain HTML
    +   * session). This method is called when the widget is directly or
    +   * indirectly inserted into the widget tree.
    +   *
    +   * The default implementation simply propagates the load signal to
    +   * its children. You may want to override this method to delay loading
    +   * of resource-intensive contents.
    +   *
    +   * During the life-time of a widget, this method may be called
    +   * multiple times, so you should make sure that you do a deferred
    +   * initializiation only once.
    +   */
    +  virtual void load() = 0;
    +
    +  /*! \brief Returns whether this widget has been loaded.
    +   *
    +   * \sa load()
    +   */
    +  virtual bool loaded() const = 0;
    +
    +  /*! \brief Sets the tab index.
    +   *
    +   * For widgets that receive focus, focus is passed on to the next
    +   * widget in the <i>tabbing chain</i> based on their tab index. When
    +   * the user navigates through form widgets using the keyboard,
    +   * widgets receive focus starting from the element with the lowest
    +   * tab index to elements with the highest tab index.
    +   *
    +   * A tab index only applies to widgets than can receive focus (which
    +   * are WFormWidget, WAnchor, WPushButton), but setting a tab index
    +   * on any other type of widget will propagate to its contained form
    +   * widgets.
    +   *
    +   * Widgets with a same tab index will receive focus in the same order
    +   * as they are inserted in the widget tree.
    +   *
    +   * The default tab index is 0.
    +   *
    +   * \sa setTabOrder()
    +   */
    +  virtual void setTabIndex(int index) = 0;
    +
    +  /*! \brief Returns the tab index.
    +   *
    +   * \sa setTabIndex()
    +   */
    +  virtual int tabIndex() const = 0;
    +
    +  /*! \brief Sets a mime type to be accepted for dropping.
    +   *
    +   * You may specify a style class that is applied to the widget when the
    +   * specified mimetype hovers on top of it.
    +   *
    +   * \sa dropEvent(), WInteractWidget::setDraggable(), stopAcceptDrops()
    +   */
    +  virtual void acceptDrops(const std::string& mimeType,
    +			   const WT_USTRING& hoverStyleClass = WT_USTRING());
    +
    +  /*! \brief Indicates that a mime type is no longer accepted for dropping.
    +   *
    +   * \sa acceptDrops()
    +   */
    +  virtual void stopAcceptDrops(const std::string& mimeType);
    +
    +  /*! \brief Sets the CSS Id.
    +   *
    +   * Sets a custom Id. Note that the Id must be unique across the whole
    +   * widget tree, can only be set right after construction and cannot
    +   * be changed. This is mostly useful for in tests using a test plan that
    +   * manipulates DOM elements by Id.
    +   *
    +   * By default, auto-generated id's are used.
    +   *
    +   * \sa WObject::id()
    +   */
    +  virtual void setId(const std::string& id) = 0;
    +
    +  /*! \brief Finds a descendend widget by name.
    +   *
    +   * \sa setObjectName()
    +   */
    +  virtual WWidget *find(const std::string& name) = 0;
    +
    +  /*! \brief Streams the (X)HTML representation.
    +   *
    +   * Streams the widget as UTF8-encoded (HTML-compatible) XHTML.
    +   *
    +   * This may be useful as a debugging tool for the web-savvy, or in
    +   * other rare situations. Usually, you will not deal directly with
    +   * HTML, and calling this method on a widget that is rendered may
    +   * interfere with the library keeping track of changes to the
    +   * widget.
    +   */
    +  virtual void htmlText(std::ostream& out);
    +
    +  /*! \brief Sets as selectable.
    +   *
    +   * When a widget is made unselectable, a selection of text (or images)
    +   * will not be visible (but may still be possible).
    +   *
    +   * By default, the widget inherits this property from its parent,
    +   * and this property propagates to all children. The top level
    +   * container (WApplication::root()) selectable by default.
    +   */
    +  virtual void setSelectable(bool selectable) = 0;
    +
    +  /*! \brief Returns whether the widget is rendered.
    +   *
    +   * \sa jsRef()
    +   */
    +  bool isRendered() const;
    +
    +  std::string inlineCssStyle();
    +
    +  std::string createJavaScript(std::stringstream& js, std::string insertJS);
    +
    +#ifndef WT_TARGET_JAVA
    +  Signal<WWidget *> destroyed;
    +#endif // WT_TARGET_JAVA
    +
    +  /*! \brief Hides the widget.
    +   *
    +   * This calls \link setHidden() setHidden(true)\endlink.
    +   */
    +  void hide();
    +
    +  /*! \brief Shows the widget.
    +   *
    +   * This calls \link setHidden() setHidden(false)\endlink.
    +   */
    +  void show();
    +
    +  /*! \brief Enables the widget.
    +   *
    +   * This calls \link setDisabled() setDisabled(false)\endlink.
    +   */
    +  void enable();
    +
    +  /*! \brief Disable thes widget.
    +   *
    +   * This calls \link setDisabled() setDisabled(true)\endlink.
    +   */
    +  void disable();
    +
    +   /*! \brief Returns whether the widget is layout size aware.
    +   *
    +   * \sa setLayoutSizeAware()
    +   */
    +  bool layoutSizeAware() const;
    +
    +  DomElement *createSDomElement(WApplication *app);
    +
    +  static void setTabOrder(WWidget *first, WWidget *second);
    +
    +protected:
    +  static const char *WT_RESIZE_JS;
    +
    +  /*! \brief Sets the widget to be aware of its size set by a layout manager.
    +   *
    +   * When the widget is inserted in a layout manager, it will be
    +   * resized to fit within the constraints imposed by the layout
    +   * manager. By default, this done client-side only by setting the
    +   * CSS height (and if needed, width) properties of the DOM element
    +   * corresponding to the widget.
    +   *
    +   * A widget may define a JavaScript method, <tt>"wtResize(self,
    +   * width, height)"</tt>, to actively manage its client-side width
    +   * and height, if it wants to react to these client-side size hints
    +   * in a custom way (see setJavaScriptMember()).
    +   *
    +   * By setting \p sizeAware to true, the widget will propagate the
    +   * width and height provided by the layout manager to the virtual
    +   * layoutSizeChanged() method, so that you may for example change
    +   * the size of contained children in a particular way (doing a
    +   * custom, manual, layout).
    +   *
    +   * \sa layoutSizeChanged()
    +   */
    +  void setLayoutSizeAware(bool sizeAware);
    +
    +  /*! \brief Virtual method that indicates a size change.
    +   *
    +   * This method propagates the client-side width and height of the
    +   * widget when the widget is contained by a layout manager and
    +   * setLayoutSizeAware(true) was called.
    +   *
    +   * \sa setLayoutSizeAware()
    +   */
    +  virtual void layoutSizeChanged(int width, int height);
    +
    +  /*! \brief Creates a widget.
    +   *
    +   * When a parent container is specified, the widget is added to the
    +   * container, using WContainerWidget::addWidget().
    +   */
    +  WWidget(WContainerWidget* parent = 0);
    +
    +  /*! \brief Handles a drop event.
    +   *
    +   * Reimplement this method to handle a drop events for mime types you
    +   * declared to accept using acceptDrops.
    +   *
    +   * The default implementation simply completes the drag and drop operation
    +   * as if nothing happened.
    +   *
    +   * \sa acceptDrops(), WInteractWidget::setDraggable()
    +   */
    +  virtual void dropEvent(WDropEvent dropEvent);
    +
    +  /*! \brief Progresses to an Ajax-enabled widget.
    +   *
    +   * This method is called when the progressive bootstrap method is
    +   * used, and support for AJAX has been detected. The default
    +   * behavior will upgrade the widget's event handling to use AJAX
    +   * instead of full page reloads, and propagate the call to its
    +   * children.
    +   *
    +   * You may want to reimplement this method if you want to make
    +   * changes to widget when AJAX is enabled. You should always call
    +   * the base implementation.
    +   *
    +   * \sa WApplication::enableAjax()
    +   */
    +  virtual void enableAjax() = 0;
    +
    +  /*! \brief Returns the widget's built-in padding.
    +   *
    +   * This is used by the layout managers to correct for a built-in
    +   * padding which interferes with setting a widget's width (or
    +   * height) to 100%.
    +   *
    +   * A layout manager needs to set the width to 100% only for form
    +   * widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore,
    +   * only for those widgets this needs to return the padding (the
    +   * default implementation returns 0).
    +   *
    +   * For form widgets, the padding depends on the specific
    +   * browser/platform combination, unless an explicit padding is set
    +   * for the widget.
    +   *
    +   * When setting an explicit padding for the widget using a style
    +   * class, you will want to reimplement this method to return this
    +   * padding in case you want to set the widget inside a layout
    +   * manager.
    +   *
    +   * \sa boxBorder()
    +   */
    +  virtual int boxPadding(Orientation orientation) const;
    +
    +  /*! \brief Returns the widget's built-in border width.
    +   *
    +   * This is used by the layout managers to correct for a built-in
    +   * border which interferes with setting a widget's width (or height)
    +   * to 100%.
    +   *
    +   * A layout manager needs to set the width to 100% only for form
    +   * widgets (WTextArea, WLineEdit, WComboBox, etc...). Therefore,
    +   * only for those widgets this needs to return the border width (the
    +   * default implementation returns 0).
    +   *
    +   * For form widgets, the border width depends on the specific
    +   * browser/platform combination, unless an explicit border is set
    +   * for the widget.
    +   *
    +   * When setting an explicit border for the widget using a style
    +   * class, you will want to reimplement this method to return this
    +   * border width, in case you want to set the widget inside a layout
    +   * manager.
    +   *
    +   * \sa boxPadding()
    +   */
    +  virtual int boxBorder(Orientation orientation) const;
    +
    +  /*! \brief Propagates that a widget was enabled or disabled through children.
    +   *
    +   * When enabling or disabling a widget, you usually also want to disable
    +   * contained children. This method is called by setDisabled() to propagate
    +   * its state to all children.
    +   *
    +   * You may want to reimplement this method if they wish to render
    +   * differently when a widget is disabled. The default implementation will
    +   * propagate the signal to all children.
    +   */
    +  virtual void propagateSetEnabled(bool enabled) = 0;
    +
    +  void getDrop(const std::string sourceId, const std::string mimeType,
    +	       WMouseEvent event);
    +
    +  virtual void addChild(WWidget *child) = 0;
    +  virtual void removeChild(WWidget *child) = 0;
    +  virtual void setHideWithOffsets(bool how = true) = 0;
    +
    +  virtual void setParentWidget(WWidget *parent);
    +
    +  virtual bool isStubbed() const = 0;
    +  virtual void render(WFlags<RenderFlag> flags);
    +  virtual void childResized(WWidget *child, WFlags<Orientation> directions);
    +
    +  WWidget *adam();
    +
    +  virtual void setLayout(WLayout *layout);
    +
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +  typedef boost::intrusive::list<EventSignalBase> EventSignalList;
    +#else
    +  typedef std::list<EventSignalBase *> EventSignalList;
    +#endif
    +
    +  void addEventSignal(EventSignalBase& s);
    +  EventSignalBase *getEventSignal(const char *name);
    +  EventSignalList& eventSignals() { return eventSignals_; }
    +
    +  virtual WStatelessSlot *getStateless(Method method);
    +
    +  void renderOk();
    +  void askRerender(bool laterOnly = false);
    +  bool needRerender() const { return flags_.test(BIT_NEED_RERENDER); }
    +
    +  virtual void getSDomChanges(std::vector<DomElement *>& result,
    +			      WApplication *app) = 0;
    +  virtual bool needsToBeRendered() const = 0;
    +  bool isInLayout() const;
    +
    +  virtual bool hasParent() const;
    +
    +private:
    +  /*
    +   * Booleans packed in a bitset.
    +   */
    +  static const int BIT_WAS_HIDDEN = 0;
    +  static const int BIT_WAS_DISABLED = 1;
    +  static const int BIT_NEED_RERENDER = 2;
    +  static const int BIT_HAS_PARENT = 3;
    +  std::bitset<4> flags_;
    +
    +  JSignal<int, int> *resized_;
    +  EventSignalList eventSignals_;
    +
    +  void setHasParent(bool hasParent);
    +  void setJsSize();
    +  void undoHideShow();
    +  void undoDisableEnable();
    +
    +  virtual WWebWidget *webWidget() = 0;
    +
    +  virtual WLayoutItemImpl  *createLayoutItemImpl(WLayoutItem *layout);
    +  virtual WLayout          *layout();
    +
    +  friend class StdWidgetItemImpl;
    +  friend class WAbstractArea;
    +  friend class WAbstractItemView;
    +  friend class WApplication;
    +  friend class WContainerWidget;
    +  friend class WCompositeWidget;
    +  friend class WFileUpload;
    +  friend class WGLWidget;
    +  friend class WebRenderer;
    +  friend class WLayout;
    +  friend class WMenuItem;
    +  friend class WPaintedWidget;
    +  friend class WScrollArea;
    +  friend class WSubMenuItem;
    +  friend class WViewWidget;
    +  friend class WWebWidget;
    +  friend class WWidgetItem;
    +  friend class WTemplate;
    +  friend class WCalendar;
    +};
    +
    +}
    +
    +#endif // WWIDGET_H_
    diff --git a/wt-3.1.7a/src/Wt/WWidget.C b/wt-3.1.7a/src/Wt/WWidget.C
    new file mode 100644
    index 0000000..8510382
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWidget.C
    @@ -0,0 +1,446 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WWidget"
    +#include "Wt/WWebWidget"
    +#include "Wt/WCompositeWidget"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLayout"
    +#include "Wt/WJavaScript"
    +
    +#include "DomElement.h"
    +#include "EscapeOStream.h"
    +#include "WebRenderer.h"
    +#include "WebSession.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +const char *WWidget::WT_RESIZE_JS = "wtResize";
    +
    +WWidget::WWidget(WContainerWidget* parent)
    +  : WObject(0),
    +    resized_(0)
    +{ 
    +  flags_.set(BIT_NEED_RERENDER);
    +}
    +
    +WWidget::~WWidget()
    +{
    +  while (!eventSignals_.empty()) {
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +    EventSignalBase *s = &eventSignals_.front();
    +#else
    +    EventSignalBase *s = eventSignals_.front();
    +#endif
    +    eventSignals_.pop_front();
    +#ifndef WT_TARGET_JAVA
    +    delete s;
    +#else
    +    s->~EventSignalBase();
    +#endif
    +  }
    +
    +  delete resized_;
    +  resized_ = 0;
    +
    +  renderOk();
    +}
    +
    +void WWidget::setParentWidget(WWidget *p)
    +{
    +  if (p == parent())
    +    return;
    +
    +  if (parent())
    +    parent()->removeChild(this);
    +  if (p)
    +    p->addChild(this);
    +}
    +
    +void WWidget::refresh()
    +{
    +  setJsSize();
    +}
    +
    +void WWidget::resize(const WLength& width, const WLength& height)
    +{
    +  setJsSize();
    +}
    +
    +void WWidget::setJsSize()
    +{
    +  if (!height().isAuto() && height().unit() != WLength::Percentage
    +      && !javaScriptMember(WT_RESIZE_JS).empty())
    +    callJavaScriptMember
    +      (WT_RESIZE_JS, jsRef() + ","
    +       + boost::lexical_cast<std::string>(width().toPixels()) + ","
    +       + boost::lexical_cast<std::string>(height().toPixels()));
    +}
    +
    +void WWidget::render(WFlags<RenderFlag> flags)
    +{ }
    +
    +bool WWidget::isRendered() const
    +{
    +  WWidget *self = const_cast<WWidget *>(this);
    +  return self->webWidget()->isRendered();
    +}
    +
    +void WWidget::renderOk()
    +{
    +  if (flags_.test(BIT_NEED_RERENDER)) {
    +    flags_.reset(BIT_NEED_RERENDER);
    +    WApplication *app = WApplication::instance();
    +    if (app)
    +      app->session()->renderer().doneUpdate(this);
    +  }
    +}
    +
    +void WWidget::askRerender(bool laterOnly)
    +{
    +  if (!flags_.test(BIT_NEED_RERENDER)) {
    +    flags_.set(BIT_NEED_RERENDER);
    +    WApplication::instance()->session()->renderer().needUpdate(this, laterOnly);
    +
    +    /*
    +     * Let's start with assuming that every change is a potential resize
    +     *
    +     * Propagate event up, this will be caught by a container widget
    +     * with a layout manager.
    +     */
    +    WWidget *p = parent();
    +
    +    if (p)
    +      p->childResized(this, Vertical);
    +  }
    +}
    +
    +void WWidget::childResized(WWidget *child, WFlags<Orientation> directions)
    +{
    +  WWidget *p = parent();
    +
    +  if (p)
    +    p->childResized(this, directions);
    +}
    +
    +void WWidget::setStyleClass(const char *styleClass)
    +{
    +  setStyleClass(WString::fromUTF8(styleClass));
    +}
    +
    +void WWidget::addStyleClass(const char *styleClass, bool force)
    +{
    +  addStyleClass(WString::fromUTF8(styleClass), force);
    +}
    +
    +void WWidget::removeStyleClass(const char *styleClass, bool force)
    +{
    +  removeStyleClass(WString::fromUTF8(styleClass), force);
    +}
    +
    +void WWidget::hide()
    +{
    +  flags_.set(BIT_WAS_HIDDEN, isHidden());
    +  setHidden(true);
    +}
    +
    +void WWidget::show()
    +{ 
    +  flags_.set(BIT_WAS_HIDDEN, isHidden());
    +  setHidden(false);
    +}
    +
    +void WWidget::disable()
    +{
    +  flags_.set(BIT_WAS_DISABLED, isDisabled());
    +  setDisabled(true);
    +}
    +
    +void WWidget::enable()
    +{ 
    +  flags_.set(BIT_WAS_DISABLED, isDisabled());
    +  setDisabled(false);
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +WStatelessSlot *WWidget::getStateless(Method method)
    +{
    +  if (method == static_cast<WObject::Method>(&WWidget::hide))
    +    return implementStateless(&WWidget::hide, &WWidget::undoHideShow);
    +  else if (method == static_cast<WObject::Method>(&WWidget::show))
    +    return implementStateless(&WWidget::show, &WWidget::undoHideShow);
    +  else if (method == static_cast<WObject::Method>(&WWidget::enable))
    +    return implementStateless(&WWidget::enable, &WWidget::undoDisableEnable);
    +  else if (method == static_cast<WObject::Method>(&WWidget::disable))
    +    return implementStateless(&WWidget::disable, &WWidget::undoDisableEnable);
    +  else
    +    return WObject::getStateless(method);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WWidget::undoHideShow()
    +{
    +  setHidden(flags_.test(BIT_WAS_HIDDEN));
    +}
    +
    +void WWidget::undoDisableEnable()
    +{
    +  setDisabled(flags_.test(BIT_WAS_DISABLED));
    +}
    +
    +#ifdef WT_TARGET_JAVA
    +void WWidget::resize(int widthPixels, int heightPixels)
    +{
    +  resize(WLength(widthPixels), WLength(heightPixels));
    +}
    +
    +void WWidget::setMargin(int pixels, WFlags<Side> sides)
    +{
    +  setMargin(WLength(pixels), sides);
    +}
    +
    +void WWidget::setOffsets(int pixels, WFlags<Side> sides)
    +{
    +  setOffsets(WLength(pixels), sides);
    +}
    +#endif // WT_TARGET_JAVA
    +
    +std::string WWidget::jsRef() const
    +{
    +  return "$('#" + id() + "').get(0)";
    +}
    +
    +void WWidget::htmlText(std::ostream& out)
    +{
    +  DomElement *element = createSDomElement(WApplication::instance());
    +
    +  DomElement::TimeoutList timeouts;
    +  EscapeOStream sout(out);
    +  EscapeOStream js;
    +  element->asHTML(sout, js, timeouts);
    +
    +  WApplication::instance()->doJavaScript(js.str());
    +
    +  delete element;
    +}
    +
    +std::string WWidget::inlineCssStyle()
    +{
    +  WWebWidget *ww = webWidget();
    +  DomElement *e = DomElement::getForUpdate(ww, ww->domElementType());
    +  ww->updateDom(*e, true);
    +  std::string result = e->cssStyle();
    +  delete e;
    +  return result;
    +}
    +
    +WWidget *WWidget::adam()
    +{
    +  WWidget *p = parent();
    +  return p ? p->adam() : this;
    +}
    +
    +WString WWidget::tr(const char *key)
    +{
    +  return WString::tr(key);
    +}
    +
    +WString WWidget::tr(const std::string& key)
    +{
    +  return WString::tr(key);
    +}
    +
    +void WWidget::acceptDrops(const std::string& mimeType,
    +			  const WT_USTRING& hoverStyleClass)
    +{
    +  WWebWidget *thisWebWidget = webWidget();
    +
    +  if (thisWebWidget->setAcceptDropsImpl(mimeType, true, hoverStyleClass)) {
    +    thisWebWidget->otherImpl_->dropSignal_->connect(this, &WWidget::getDrop);
    +  }
    +}
    +
    +void WWidget::stopAcceptDrops(const std::string& mimeType)
    +{
    +  WWebWidget *thisWebWidget = webWidget();
    +
    +  thisWebWidget->setAcceptDropsImpl(mimeType, false, "");
    +}
    +
    +void WWidget::getDrop(const std::string sourceId, const std::string mimeType,
    +		      WMouseEvent event)
    +{
    +  WDropEvent e(WApplication::instance()->decodeObject(sourceId), mimeType,
    +	       event);
    +
    +  dropEvent(e);
    +}
    +
    +void WWidget::dropEvent(WDropEvent event)
    +{ }
    +
    +DomElement *WWidget::createSDomElement(WApplication *app)
    +{
    +  if (!needsToBeRendered()) {
    +    DomElement *result = webWidget()->createStubElement(app);
    +    renderOk();
    +    askRerender(true);
    +    return result;
    +  } else {
    +    webWidget()->setRendered(true);
    +    render(RenderFull);
    +    return webWidget()->createActualElement(app);
    +  }
    +}
    +
    +std::string WWidget::createJavaScript(std::stringstream& js,
    +				      std::string insertJS)
    +{
    +  WApplication *app = WApplication::instance();
    +  DomElement *de = createSDomElement(app);
    +
    +  std::string var = de->createVar();
    +  if (!insertJS.empty())
    +    insertJS += var + ");";
    +  de->createElement(js, app, insertJS);
    +
    +  delete de;
    +
    +  return var;
    +}
    +
    +void WWidget::setLayout(WLayout *layout)
    +{
    +  layout->setParentWidget(this);
    +}
    +
    +WLayout *WWidget::layout()
    +{
    +  return 0;
    +}
    +
    +WLayoutItemImpl *WWidget::createLayoutItemImpl(WLayoutItem *item)
    +{
    +  throw WtException("WWidget::setLayout(): widget does not support "
    +		    "layout managers");
    +}
    +
    +void WWidget::addEventSignal(EventSignalBase& s)
    +{
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +  eventSignals_.push_back(s);
    +#else
    +  eventSignals_.push_back(&s);
    +#endif
    +}
    +
    +EventSignalBase *WWidget::getEventSignal(const char *name)
    +{
    +  for (EventSignalList::iterator i = eventSignals_.begin();
    +       i != eventSignals_.end(); ++i) {
    +#ifndef WT_NO_BOOST_INTRUSIVE
    +    EventSignalBase& s = *i;
    +#else
    +    EventSignalBase& s = **i;
    +#endif
    +    if (s.name() == name)
    +      return &s;
    +  }
    +
    +  return 0;
    +}
    +
    +int WWidget::boxPadding(Orientation orientation) const
    +{
    +  return 0;
    +}
    +
    +int WWidget::boxBorder(Orientation orientation) const
    +{
    +  return 0;
    +}
    +
    +void WWidget::positionAt(const WWidget *widget, Orientation orientation)
    +{
    +  std::string side = (orientation == Horizontal ? ".Horizontal" : ".Vertical");
    +
    +  WApplication::instance()->doJavaScript
    +    (WT_CLASS ".positionAtWidget('"
    +     + id() + "','"
    +     + widget->id() + "',"
    +     WT_CLASS + side + ");");
    +}
    +
    +void WWidget::setLayoutSizeAware(bool aware)
    +{
    +  if (aware == (resized_ != 0))
    +    return;
    +
    +  if (aware && WApplication::instance()) {
    +    resized_ = new JSignal<int, int>(this, "resized");
    +    resized_->connect(this, &WContainerWidget::layoutSizeChanged);
    +
    +    setJavaScriptMember
    +      (WT_RESIZE_JS,
    +       "function(self, w, h) {"
    +       ""  "if (!self.wtWidth || self.wtWidth!=w "
    +       ""      "|| !self.wtHeight || self.wtHeight!=h) {"
    +       ""    "self.wtWidth=w; self.wtHeight=h;"
    +       ""    "self.style.height=h + 'px';"
    +       + resized_->createCall("Math.round(w)", "Math.round(h)") +
    +       ""  "}"
    +       "};");
    +  } else {
    +    if (!javaScriptMember(WT_RESIZE_JS).empty())
    +      setJavaScriptMember(WT_RESIZE_JS, "");
    +    delete resized_;
    +    resized_ = 0;
    +  }
    +}
    +
    +bool WWidget::layoutSizeAware() const
    +{
    +  return resized_ != 0;
    +}
    +
    +void WWidget::layoutSizeChanged(int width, int height)
    +{ } 
    +
    +bool WWidget::isInLayout() const
    +{
    +  WWidget *p = parent();
    +  if (p != 0 &&
    +      (dynamic_cast<WCompositeWidget *>(p) != 0 ||
    +       !p->javaScriptMember(WT_RESIZE_JS).empty()))
    +    return p->isInLayout();
    +
    +  WContainerWidget *c = dynamic_cast<WContainerWidget *>(p);
    +
    +  return c != 0 && c->layout() != 0;
    +}
    +
    +void WWidget::setTabOrder(WWidget *first, WWidget *second)
    +{
    +  second->setTabIndex(first->tabIndex() + 1);
    +}
    +
    +void WWidget::setHasParent(bool hasParent)
    +{
    +  flags_.set(BIT_HAS_PARENT, hasParent);
    +
    +  setParent(parent()); // since hasParent() has changed
    +}
    +
    +bool WWidget::hasParent() const
    +{
    +  if (flags_.test(BIT_HAS_PARENT))
    +    return true;
    +  else
    +    return WObject::hasParent();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/Wt/WWidgetItem b/wt-3.1.7a/src/Wt/WWidgetItem
    new file mode 100644
    index 0000000..d8867e6
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWidgetItem
    @@ -0,0 +1,47 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WWIDGET_ITEM_H_
    +#define WWIDGET_ITEM_H_
    +
    +#include <Wt/WLayoutItem>
    +
    +namespace Wt {
    +
    +/*! \class WWidgetItem Wt/WWidgetItem Wt/WWidgetItem
    + *  \brief A layout item that holds a single widget.
    + *
    + * \sa WLayout::addWidget(WWidget *)
    + */
    +class WT_API WWidgetItem : public WLayoutItem
    +{
    +public:
    +  /*! \brief Creates a new item for the given <i>widget</i>.
    +   */
    +  WWidgetItem(WWidget *widget);
    +
    +  virtual ~WWidgetItem();
    +
    +  virtual WWidget *widget() { return widget_; }
    +  virtual WLayout *layout() { return 0; }
    +  virtual WLayout *parentLayout() const { return parentLayout_; }
    +
    +  virtual WWidgetItem *findWidgetItem(WWidget *widget);
    +
    +  WLayoutItemImpl *impl() const { return impl_; }
    +
    +private:
    +  WWidget         *widget_;
    +  WLayout         *parentLayout_;
    +  WLayoutItemImpl *impl_;
    +
    +  virtual void setParentWidget(WWidget *parent);
    +  virtual void setParentLayout(WLayout *layout);
    +};
    +
    +}
    +
    +#endif // WWIDGET_ITEM_H_
    diff --git a/wt-3.1.7a/src/Wt/WWidgetItem.C b/wt-3.1.7a/src/Wt/WWidgetItem.C
    new file mode 100644
    index 0000000..bd04c40
    --- /dev/null
    +++ b/wt-3.1.7a/src/Wt/WWidgetItem.C
    @@ -0,0 +1,47 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WWidget"
    +#include "Wt/WWidgetItem"
    +#include "Wt/WLayoutItemImpl"
    +
    +namespace Wt {
    +
    +WWidgetItem::WWidgetItem(WWidget *widget)
    +  : widget_(widget),
    +    parentLayout_(0),
    +    impl_(0)
    +{ 
    +  widget_->setHasParent(true);
    +}
    +
    +WWidgetItem::~WWidgetItem()
    +{
    +  widget_->setHasParent(false);
    +
    +  delete impl_;
    +}
    +
    +WWidgetItem *WWidgetItem::findWidgetItem(WWidget *widget)
    +{
    +  if (widget_ == widget)
    +    return this;
    +  else
    +    return 0;
    +}
    +
    +void WWidgetItem::setParentWidget(WWidget *parent)
    +{ 
    +  assert(!impl_);
    +  impl_ = parent->createLayoutItemImpl(this);
    +}
    +
    +void WWidgetItem::setParentLayout(WLayout *parentLayout)
    +{
    +  parentLayout_ = parentLayout;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/fcgi/CMakeLists.txt b/wt-3.1.7a/src/fcgi/CMakeLists.txt
    new file mode 100644
    index 0000000..f95cbf8
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/CMakeLists.txt
    @@ -0,0 +1,38 @@
    +IF(CONNECTOR_FCGI)
    +  IF(NOT FCGI_FOUND)
    +
    +    MESSAGE("** Disabling FCGI connector: requires libfcgi ")
    +    MESSAGE("   Indicate the location of libfcgi using -DUSERLIB_ROOT=..., or omit this connector using -DCONNECTOR_FCGI=OFF")
    +
    +  ELSE(NOT FCGI_FOUND)
    +    MESSAGE("** Enabling FastCGI connector.")
    +
    +    SET(libfcgisources
    +      FCGIRecord.C
    +      FCGIStream.C
    +      Server.C
    +      SessionInfo.C
    +    )
    +
    +    INCLUDE_DIRECTORIES(${FCGI_INCLUDE_DIRS})
    +    ADD_LIBRARY(wtfcgi ${libfcgisources})
    +    TARGET_LINK_LIBRARIES(wtfcgi wt ${FCGI_LIB} ${FCGIPP_LIB})
    +
    +    SET_TARGET_PROPERTIES(
    +      wtfcgi
    +    PROPERTIES
    +      VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +      SOVERSION ${WTFCGI_SOVERSION}
    +      DEBUG_POSTFIX "d"
    +    )
    +
    +    INSTALL(TARGETS wtfcgi
    +      RUNTIME DESTINATION bin
    +      LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +      ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +  ENDIF(NOT FCGI_FOUND)
    +ELSE(CONNECTOR_FCGI)
    +  MESSAGE("** Disabling FastCGI connector.")
    +ENDIF(CONNECTOR_FCGI)
    +
    diff --git a/wt-3.1.7a/src/fcgi/FCGIRecord.C b/wt-3.1.7a/src/fcgi/FCGIRecord.C
    new file mode 100644
    index 0000000..9f89dd6
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/FCGIRecord.C
    @@ -0,0 +1,262 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "FCGIRecord.h"
    +
    +#include <unistd.h>
    +#include <errno.h>
    +#include <cstdlib>
    +#include <cstring>
    +
    +using std::malloc;
    +using std::free;
    +using std::realloc;
    +using std::memcpy;
    +
    +FCGIRecord::FCGIRecord()
    +  : good_(false),
    +    contentData_(0),
    +    plainTextBuf_(0)
    +{ }
    +
    +FCGIRecord::FCGIRecord(short requestId, char version)
    +  : good_(true),
    +    contentData_(0),
    +    plainTextBuf_(0)
    +{
    +  plainTextBufLength_ = 8 + 8;
    +  plainTextBuf_ = (unsigned char *) malloc(plainTextBufLength_ * sizeof(char));
    +  plainTextBuf_[0] = version;
    +  plainTextBuf_[1] = 3;  // FCGI_END_REQUEST
    +  plainTextBuf_[2] = requestId >> 8;
    +  plainTextBuf_[3] = requestId & 0x0F;
    +  plainTextBuf_[4] = 0;
    +  plainTextBuf_[5] = 8;
    +  plainTextBuf_[6] = 0;
    +  plainTextBuf_[7] = 0;
    +  
    +  plainTextBuf_[8] = 0;
    +  plainTextBuf_[9] = 0;
    +  plainTextBuf_[10] = 0;
    +  plainTextBuf_[11] = 0;
    +  plainTextBuf_[12] = 0; // FCGI_REQUEST_COMPLETE
    +}
    +
    +FCGIRecord::~FCGIRecord()
    +{
    +  clear();
    +}
    +
    +void FCGIRecord::clear()
    +{
    +  delete contentData_;
    +
    +  if (plainTextBuf_)
    +    free(plainTextBuf_);
    +
    +  contentData_ = 0;
    +  plainTextBufLength_ = 0;
    +  plainTextBuf_ = 0;
    +  plainTextLength_ = 0;
    +}
    +
    +int FCGIRecord::getChar(int fd, bool waitForIt)
    +{
    +  unsigned char buf[1];
    +
    +  int result;
    +  for (;;) {
    +    result = ::read(fd, buf, 1);
    +    if (result == -1) {
    +      if (errno != EINTR) {
    +	perror("read");
    +	throw Exception("Error reading (1)");
    +      }
    +    } else
    +      break;
    +  }
    +
    +  if (result == 0) {
    +    if (waitForIt) {
    +      while (result == 0) {
    +	usleep(100);
    +	result = ::read(fd, buf, 1);
    +	if (result == -1) {
    +	  if (errno != EINTR) {
    +	    perror("read");
    +	    throw Exception("Error reading (2)");
    +	  } else
    +	    result = 0; // try again
    +	}
    +      }
    +    } else
    +      return -1;
    +  }
    +     
    +  if (plainTextLength_ >= plainTextBufLength_) {
    +    plainTextBufLength_ += 100;
    +    plainTextBuf_ = (unsigned char *)
    +      realloc(plainTextBuf_, plainTextBufLength_);
    +  }
    +
    +  plainTextBuf_[plainTextLength_++] = buf[0];
    +
    +  return buf[0];
    +}
    +
    +bool FCGIRecord::getAndAssign(int fd, unsigned char& result,
    +			      bool waitForIt)
    +{
    +  int c = getChar(fd, waitForIt);
    +  if (c != -1) {
    +    result = c;
    +    return true;
    +  } else {
    +    return false;
    +  }
    +}
    +
    +bool FCGIRecord::getBuffer(int fd, unsigned char *buf,
    +			   int length)
    +{
    +  int count = 0;
    +
    +  while (count < length) {
    +    int result = ::read(fd, buf + count, length - count);
    +    if (result == -1) {
    +      if (errno != EINTR) {
    +	perror("read");
    +	throw Exception("Error reading (3)");
    +      } // else try again
    +    } else {
    +      count += result;
    +    }
    +  }
    +
    +  if (plainTextLength_ + length > plainTextBufLength_) {
    +    plainTextBufLength_ += length;
    +    plainTextBuf_ = (unsigned char *)
    +      realloc(plainTextBuf_, plainTextBufLength_);
    +  }
    +
    +  memcpy(plainTextBuf_ + plainTextLength_, buf, length);
    +  plainTextLength_ += length;
    +
    +  return true;
    +}
    +
    +void FCGIRecord::read(int fd)
    +{
    +  clear();
    +
    +  if (!getAndAssign(fd, version_, false))
    +    return;
    +
    +  if (!getAndAssign(fd, type_, true))
    +    return;
    +
    +  unsigned char IdB1;
    +  unsigned char IdB0;
    +
    +  if (!getAndAssign(fd, IdB1, true))
    +    return;
    +  if (!getAndAssign(fd, IdB0, true))
    +    return;
    +
    +  requestId_ = (IdB1 << 8) | IdB0;
    +
    +  unsigned char contentLengthB1;
    +  unsigned char contentLengthB0;
    +
    +  if (!getAndAssign(fd, contentLengthB1, true))
    +    return;
    +  if (!getAndAssign(fd, contentLengthB0, true))
    +    return;
    +
    +  contentLength_ = (contentLengthB1 << 8) | contentLengthB0;
    +
    +  if (!getAndAssign(fd, paddingLength_, true))
    +    return;
    +
    +  if (!getAndAssign(fd, reserved_, true))
    +    return;
    +
    +  contentData_ = new unsigned char[contentLength_];
    +  if (!getBuffer(fd, contentData_, contentLength_))
    +    return;
    +
    +  unsigned char c;
    +  for (unsigned i = 0; i < paddingLength_; ++i)
    +    if (!getAndAssign(fd, c, true))
    +      return;
    +
    +  good_ = true;
    +}
    +
    +std::ostream& operator<< (std::ostream& o, const FCGIRecord& r)
    +{
    +  o << "version = " << (int)r.version()
    +    << " type = " << (int)r.type()
    +    << " requestId = " << (int)r.requestId()
    +    << " contentLength = " << r.contentLength();
    +
    +  if (true || (r.type() == 5)) {
    +    o << " content =\n";
    +    for (unsigned i = 0; i < r.contentLength(); ++i)
    +      o << r.contentData()[i];
    +  }
    +
    +  return o;
    +}
    +
    +bool FCGIRecord::getParam(const std::string name, std::string& value) const
    +{
    +  for (unsigned i = 0; i < contentLength_;) {
    +    unsigned int nameLen;
    +
    +    if ((contentData_[i] >> 7) == 0) {
    +      nameLen = contentData_[i];
    +      i += 1;
    +    } else {
    +      nameLen =
    +	((unsigned)(contentData_[i] & 0x7F) << 24)
    +	| ((unsigned)contentData_[i+1] << 16)
    +	| ((unsigned)contentData_[i+2] << 8)
    +	| ((unsigned)contentData_[i+3]);
    +      i += 4;
    +    }
    +
    +    unsigned int valueLen;
    +  
    +    if ((contentData_[i] >> 7) == 0) {
    +      valueLen = contentData_[i];
    +      i += 1;
    +    } else {
    +      valueLen =
    +	(((unsigned)contentData_[i] & 0x7F) << 24)
    +	| ((unsigned)contentData_[i+1] << 16)
    +	| ((unsigned)contentData_[i+2] << 8)
    +	| ((unsigned)contentData_[i+3]);
    +      i += 4;
    +    }
    +
    +    std::string thisname = std::string((char *)contentData_ + i, nameLen);
    +    value = std::string((char *)contentData_ + i + nameLen, valueLen);
    +
    +    if (name == thisname)
    +      return true;
    +
    +    i += nameLen + valueLen;
    +  }
    +
    +  return false;
    +}
    +
    +FCGIRecord::Exception::Exception(const std::string what)
    +  : what_(what)
    +{ }
    +
    +FCGIRecord::Exception::~Exception() throw()
    +{ }
    diff --git a/wt-3.1.7a/src/fcgi/FCGIRecord.h b/wt-3.1.7a/src/fcgi/FCGIRecord.h
    new file mode 100644
    index 0000000..ff84e8e
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/FCGIRecord.h
    @@ -0,0 +1,72 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +// This may look like C code, but it's really -*- C++ -*-
    +#ifndef FCGIRECORD_H_
    +#define FCGIRECORD_H_
    +
    +#include <stdio.h>
    +#include <iostream>
    +
    +class FCGIRecord
    +{
    +public:
    +  FCGIRecord();
    +  FCGIRecord(short requestId, char version);
    +  ~FCGIRecord();
    +
    +  void clear();
    +  bool good() { return good_; }
    +
    +  unsigned char type() const { return type_; }
    +  unsigned char version() const { return version_; }
    +  unsigned short requestId() const { return requestId_; }
    +  unsigned short contentLength() const { return contentLength_; }
    +  const unsigned char *contentData() const { return contentData_; }
    +
    +  unsigned short plainTextLength() const { return plainTextLength_; }
    +  const unsigned char *plainText() const { return plainTextBuf_; }
    +
    +  void read(int fd);
    +
    +  bool getParam(const std::string name, std::string& value) const;
    +
    +  class Exception : public std::exception
    +  {
    +  public:
    +    const char *what() const throw() { return what_.c_str(); }
    +
    +  private:
    +    Exception(const std::string what);
    +    ~Exception() throw();
    +
    +    std::string what_;
    +
    +    friend class FCGIRecord;
    +  };
    +
    +private:
    +  bool good_;
    +
    +  unsigned char version_;
    +  unsigned char type_;
    +  unsigned short requestId_;
    +  unsigned short contentLength_;
    +  unsigned char paddingLength_;
    +  unsigned char reserved_;
    +  unsigned char *contentData_;
    +
    +  unsigned short plainTextLength_;
    +  unsigned char *plainTextBuf_;
    +  unsigned short plainTextBufLength_;
    +
    +  int getChar(int fd, bool waitForIt);
    +  bool getBuffer(int fd, unsigned char *buf, int length);
    +  bool getAndAssign(int fd, unsigned char& r, bool waitForIt);
    +};
    +
    +extern std::ostream& operator<< (std::ostream&, const FCGIRecord& r);
    +
    +#endif // FCGIRECORD_H_
    diff --git a/wt-3.1.7a/src/fcgi/FCGIStream.C b/wt-3.1.7a/src/fcgi/FCGIStream.C
    new file mode 100644
    index 0000000..a86736a
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/FCGIStream.C
    @@ -0,0 +1,226 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +#include <cctype>
    +#include <cstring>
    +#include <errno.h>
    +#include <stdio.h>
    +
    +#include "FCGIStream.h"
    +#include "WebController.h"
    +#include "Configuration.h"
    +
    +#include "fcgio.h"
    +#include "fcgi_config.h"  // HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
    +
    +using std::memset;
    +using std::exit;
    +
    +namespace {
    +  using namespace Wt;
    +
    +  class FCGIRequest : public WebRequest
    +  {
    +  public:
    +    FCGIRequest(FCGX_Request *request)
    +      : request_(request)
    +    { 
    +      in_streambuf_ = new fcgi_streambuf(request_->in);
    +      out_streambuf_ = new fcgi_streambuf(request_->out);
    +      err_streambuf_ = new fcgi_streambuf(request_->err);
    +      in_ = new std::istream(in_streambuf_);
    +      out_ = new std::ostream(out_streambuf_);
    +      err_ = new std::ostream(err_streambuf_);
    +
    +      //std::cerr.rdbuf(err_->rdbuf());
    +    }
    +
    +    ~FCGIRequest() {
    +      delete err_;
    +      delete out_;
    +      delete in_;
    +      delete err_streambuf_;
    +      delete out_streambuf_;
    +      delete in_streambuf_;
    +
    +      FCGX_Finish_r(request_);
    +      delete request_;
    +    }
    +
    +    virtual void flush(ResponseState state, CallbackFunction callback) {
    +      out_->flush();
    +
    +      if (state == ResponseFlush) {
    +        setAsyncCallback(callback);
    +      } else {
    +        setAsyncCallback(0);
    +      }
    +      emulateAsync(state);
    +    }
    +
    +    virtual std::istream& in() { return *in_; }
    +    virtual std::ostream& out() { return *out_; }
    +    virtual std::ostream& err() { return *err_; }
    +
    +    virtual void setStatus(int status)
    +    {
    +      out() << "Status: " << status << "\r\n";
    +    }
    +
    +    virtual void setContentType(const std::string& value)
    +    {
    +      out() << "Content-Type: " << value << "\r\n\r\n";
    +    }
    +
    +    virtual void addHeader(const std::string& name, const std::string& value)
    +    {
    +      out() << name << ": " << value << "\r\n";
    +    }
    +
    +    virtual void setContentLength(::int64_t length)
    +    {
    +      addHeader("Content-Length", boost::lexical_cast<std::string>(length));
    +    }
    +
    +    virtual void setRedirect(const std::string& url)
    +    {
    +      out() << "Location: " << url << "\r\n\r\n";
    +    }
    +
    +    virtual std::string headerValue(const std::string& name) const {
    +      return envValue(cgiEnvName(name));
    +    }
    +
    +    virtual std::string envValue(const std::string& name) const {
    +      char *result = FCGX_GetParam(name.c_str(), request_->envp);
    +      if (result)
    +	return result;
    +      else
    +	return "";
    +    }
    +
    +    std::string cgiEnvName(const std::string& name) const {
    +      std::string result = name;
    +      std::string::size_type i;
    +      while ((i = result.find('-')) != std::string::npos)
    +	result[i] = '_';
    +
    +      std::transform(result.begin(), result.end(), result.begin(), toupper);
    +
    +      return "HTTP_" + result;
    +    }
    +
    +    virtual std::string scriptName() const {
    +      if (entryPoint_) {
    +        return envValue("SCRIPT_NAME") + entryPoint_->path();
    +      } else {
    +        return envValue("SCRIPT_NAME");
    +      }
    +    }
    +
    +    virtual std::string serverName() const {
    +      return envValue("SERVER_NAME");
    +    }
    +
    +    virtual std::string requestMethod() const {
    +      return envValue("REQUEST_METHOD");
    +    }
    +
    +    virtual std::string queryString() const {
    +      return envValue("QUERY_STRING");
    +    }
    +
    +    virtual std::string serverPort() const {
    +      return envValue("SERVER_PORT");
    +    }
    +
    +    virtual std::string pathInfo() const {
    +      if (entryPoint_) {
    +        std::string pi = envValue("PATH_INFO");
    +        if (pi.size() >= entryPoint_->path().size()) {
    +          return pi.substr(entryPoint_->path().size());
    +        } else {
    +          return pi;
    +        }
    +      } else {
    +        return envValue("PATH_INFO");
    +      }
    +    }
    +
    +    virtual std::string remoteAddr() const {
    +      return envValue("REMOTE_ADDR");
    +    }
    +
    +    virtual std::string urlScheme() const {
    +      std::string https = envValue("HTTPS");
    +      if (https == "ON" || https == "on")
    +	return "https";
    +      else
    +	return "http";
    +    }
    +
    +    virtual bool isSynchronous() const {
    +      return true;
    +    }
    +
    +  private:
    +    FCGX_Request *request_;
    +    fcgi_streambuf *in_streambuf_, *out_streambuf_, *err_streambuf_;
    +    std::istream *in_;
    +    std::ostream *out_, *err_;
    +  };
    +}
    +
    +namespace Wt {
    +
    +FCGIStream::FCGIStream()
    +  : WebStream(true)
    +{
    +  FCGX_Init();
    +}
    +
    +FCGIStream::~FCGIStream()
    +{ }
    +
    +WebRequest *FCGIStream::getNextRequest(int timeoutsec)
    +{
    +  fd_set rfds;
    +  FD_ZERO(&rfds);
    +  FD_SET(0, &rfds);
    +  struct timeval timeout;
    +  timeout.tv_sec = timeoutsec;
    +  timeout.tv_usec = 0;
    +
    +  for(;;) {
    +    int result = select(FD_SETSIZE, &rfds, 0, 0, &timeout);
    +
    +    if (result == 0)
    +      return 0; // timeout
    +    else if (result == -1) {
    +      if (errno != EINTR) {
    +	perror("select");
    +	exit(1); // FIXME: throw exception
    +      } else
    +	; // EINTR, try again
    +    } else
    +      break;
    +  }
    +
    +  FCGX_Request *request = new FCGX_Request();
    +  FCGX_InitRequest(request, 0, 0);
    +
    +  if (FCGX_Accept_r(request) == 0) {
    +    return new FCGIRequest(request);
    +  } else {
    +    std::cerr << "Could not FCGX_Accept ?" << std::endl;
    +    delete request;
    +
    +    exit(1); // FIXME: throw exception
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/fcgi/FCGIStream.h b/wt-3.1.7a/src/fcgi/FCGIStream.h
    new file mode 100644
    index 0000000..b7b0b95
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/FCGIStream.h
    @@ -0,0 +1,28 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef FCGI_STREAM_H_
    +#define FCGI_STREAM_H_
    +
    +#include "WebStream.h"
    +#include "WebRequest.h"
    +
    +class FCGX_Request;
    +
    +namespace Wt {
    +
    +class FCGIStream : public WebStream
    +{
    +public:
    +  FCGIStream();
    +  ~FCGIStream();
    +
    +  virtual WebRequest *getNextRequest(int timeoutsec);
    +};
    +
    +}
    +
    +#endif // FCGI_STREAM_H_
    diff --git a/wt-3.1.7a/src/fcgi/Server.C b/wt-3.1.7a/src/fcgi/Server.C
    new file mode 100644
    index 0000000..187d7bf
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/Server.C
    @@ -0,0 +1,969 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <csignal>
    +#include <errno.h>
    +#include <unistd.h>
    +#include <fstream>
    +#include <boost/regex.hpp>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#include <sys/socket.h>
    +#include <sys/un.h>
    +#include <sys/wait.h>
    +#include <signal.h>
    +#include <exception>
    +#include <vector>
    +#include <stdlib.h>
    +
    +#include "fcgiapp.h"
    +#include "FCGIRecord.h"
    +#include "FCGIStream.h"
    +#include "Server.h"
    +#include "SessionInfo.h"
    +#include "WebController.h"
    +
    +#include "Wt/WResource"
    +#include "Wt/WServer"
    +#include "Wt/WLogger"
    +
    +using std::exit;
    +using std::strcpy;
    +using std::strlen;
    +using std::memset;
    +
    +namespace {
    +
    +bool bindUDStoStdin(const std::string& socketPath, Wt::Configuration& conf)
    +{
    +  int s = socket(AF_UNIX, SOCK_STREAM, 0);
    +  if (s == -1) {
    +    conf.log("fatal") << "socket(): " << strerror(errno);
    +    return false;
    +  }
    +
    +  struct sockaddr_un local;
    +  local.sun_family = AF_UNIX;
    +
    +  strncpy (local.sun_path, socketPath.c_str(), sizeof (local.sun_path));
    +  local.sun_path[sizeof (local.sun_path) - 1] = '\0';
    +  unlink(local.sun_path);
    +  socklen_t len = offsetof (struct sockaddr_un, sun_path)
    +    + strlen(local.sun_path) + 1;
    +
    +  if (bind(s, (struct sockaddr *)& local, len) == -1) {
    +    conf.log("fatal") << "bind(): " << strerror(errno);
    +    return false;
    +  }
    +
    +  if (listen(s, 5) == -1) {
    +    conf.log("fatal") << "listen(): " << strerror(errno);
    +    return false;
    +  }
    +
    +  if (dup2(s, STDIN_FILENO) == -1) {
    +    conf.log("fatal") << "dup2(): " << strerror(errno);
    +    return false;
    +  }
    +
    +  return true;
    +}
    +
    +}
    +
    +namespace Wt {
    + 
    +/*
    + * From the FCGI Specifaction
    + */
    +const int FCGI_BEGIN_REQUEST = 1;
    +const int FCGI_ABORT_REQUEST = 2;
    +const int FCGI_END_REQUEST   = 3;
    +const int FCGI_PARAMS        = 4;
    +
    +/*
    + * New server implementation: 2 modes.
    + *
    + * 1) one-session-per-process (current implementation)
    + *     session file = socket
    + *
    + * 2) spread sessions over X processes
    + *     session file points to socket file
    + *     session is allocated and session file is created within the session
    + */
    +
    +Server *Server::instance = 0;
    +
    +Server::Server(int argc, char *argv[])
    +  : argc_(argc),
    +    argv_(argv),
    +    conf_(argv[0], "", "", Configuration::FcgiServer,
    +	  "Wt: initializing FastCGI session process manager")
    +#ifdef WT_THREADED
    +  , threadPool_(conf_.numThreads())
    +#endif // WT_THREADED
    +{
    +  instance = this;
    +
    +  srand48(getpid());
    +
    +  /*
    +   * Spawn the session processes for shared process policy
    +   */
    +  if (conf_.sessionPolicy() == Configuration::SharedProcess) {
    +    for (int i = 0; i < conf_.numProcesses(); ++i) {
    +      spawnSharedProcess();
    +    }
    +  }
    +}
    +
    +void Server::execChild(bool debug, const std::string& extraArg)
    +{
    +#ifdef _GNU_SOURCE
    +  /*
    +   * if you want to make sure that all delete actually releases
    +   * memory back to the OS:
    +   */
    +  //const char *const envp[]
    +  //  = { "GLIBCXX_FORCE_NEW=1",
    +  //      "GLIBCPP_FORCE_NEW=1",
    +  //	NULL };
    +
    +  /*
    +   * It's more useful to pass on the environment:
    +   */
    +  char **envp = environ;
    +#else
    +  const char *const envp[] = { NULL };
    +#endif // _GNU_SOURCE
    +
    +  std::string prepend;
    +  if (debug && conf_.debug())
    +    prepend = conf_.valgrindPath();
    +
    +  std::vector<std::string > prependArgv;
    +  if (!prepend.empty())
    +    boost::split(prependArgv, prepend, boost::is_any_of(" "));
    +
    +  /* up to 3 arguments + 0: argv_[0] client [extraArg] */
    +  const char **argv = new const char *[prependArgv.size() + 4];
    +
    +  unsigned i = 0;
    +  for (; i < prependArgv.size(); ++i)
    +    argv[i] = prependArgv[i].c_str();
    +
    +  argv[i++] = argv_[0];
    +  argv[i++] = "client";
    +  if (!extraArg.empty())
    +    argv[i++] = extraArg.c_str();
    +  argv[i++] = 0;
    +
    +  execve(argv[0], const_cast<char *const *>(argv),
    +	 const_cast<char *const *>(envp));
    +
    +  delete[] argv;
    +}
    +
    +void Server::spawnSharedProcess()
    +{
    +  pid_t pid = fork();
    +  if (pid == -1) {
    +    conf_.log("fatal") << "fork(): " << strerror(errno);
    +    exit(1);
    +  } else if (pid == 0) {
    +    /* the child process */
    +    execChild(true, std::string());
    +    exit(1);
    +  } else {
    +    conf_.log("notice") << "Spawned session process: pid = " << pid;
    +    sessionProcessPids_.push_back(pid);
    +  }
    +}
    +
    +const std::string Server::socketPath(const std::string& sessionId)
    +{
    +  std::string sessionPath = conf_.runDirectory() + "/" + sessionId;
    +
    +  if (conf_.sessionPolicy() == Configuration::SharedProcess) {
    +    std::ifstream f(sessionPath.c_str());
    +
    +    if (f) {
    +      std::string pid;
    +      f >> pid;
    +
    +      if (!pid.empty())
    +	return conf_.runDirectory() + "/server-" + pid;
    +      else
    +	return std::string();
    +    } else
    +      return std::string();
    +
    +  } else
    +    return sessionPath;
    +}
    +
    +void handleSigChld(int)
    +{
    +  Server::instance->handleSigChld();
    +}
    +
    +void handleServerSigTerm(int)
    +{
    +  Server::instance->handleSignal("SIGTERM");
    +}
    +
    +void handleServerSigUsr1(int)
    +{
    +  Server::instance->handleSignal("SIGUSR1");
    +}
    +
    +void handleServerSigHup(int)
    +{
    +  Server::instance->handleSignal("SIGHUP");
    +}
    +
    +void Server::handleSignal(const char *signal)
    +{
    +  conf_.log("notice") << "Shutdown (caught " << signal << ")";
    +
    +  /* We need to kill all children */
    +  for (unsigned i = 0; i < sessionProcessPids_.size(); ++i)
    +    kill(sessionProcessPids_[i], SIGTERM); 
    +
    +  exit(0);
    +}
    +
    +void Server::handleSigChld()
    +{
    +  pid_t cpid;
    +  int stat;
    +
    +  while ((cpid = waitpid(0, &stat, WNOHANG)) > 0) {
    +    conf_.log("notice") << "Caught SIGCHLD: pid=" << cpid
    +			<< ", stat=" << stat;
    +
    +    if (conf_.sessionPolicy() == Configuration::DedicatedProcess) {
    +      for (Server::SessionMap::iterator i = sessions_.begin();
    +	   i != sessions_.end(); ++i)
    +	if (i->second->childPId() == cpid) {
    +	  conf_.log("notice") << "Deleting session: " << i->second->sessionId();
    +
    +	  unlink(socketPath(i->second->sessionId()).c_str());
    +	  delete i->second;
    +	  sessions_.erase(i);
    +
    +	  break;
    +	}
    +    } else {
    +      for (unsigned i = 0; i < sessionProcessPids_.size(); ++i) {
    +	if (sessionProcessPids_[i] == cpid) {
    +	  sessionProcessPids_.erase(sessionProcessPids_.begin() + i);
    +
    +	  /*
    +	   * TODO: cleanup all sessions that pointed to this pid
    +	   */
    +
    +	  static int childrenDied = 0;
    +
    +	  ++childrenDied;
    +
    +	  if (childrenDied < 5)
    +	    spawnSharedProcess();
    +	  else
    +	    conf_.log("error") << "Sessions process restart limit (5) reached";
    +
    +	  break;
    +	}
    +      }
    +    }
    +  }
    +}
    +
    +bool Server::getSessionFromQueryString(const std::string& queryString,
    +				       std::string& sessionId)
    +{
    +  static const boost::regex
    +    session_e(".*wtd=([a-zA-Z0-9]{"
    +	      + boost::lexical_cast<std::string>(conf_.sessionIdLength())
    +	      + "}).*");
    +
    +  boost::smatch what;
    +  if (boost::regex_match(queryString, what, session_e)) {
    +    sessionId = what[1];
    +    return true;
    +  }
    +
    +  return false;
    +}
    +
    +int Server::connectToSession(const std::string& sessionId,
    +			     const std::string& socketPath, int maxTries)
    +{
    +  int s = socket(AF_UNIX, SOCK_STREAM, 0);
    +  if (s == -1) {
    +    conf_.log("fatal") << "socket(): " << strerror(errno);
    +    exit(1);
    +  }
    +
    +  struct sockaddr_un local;
    +  local.sun_family = AF_UNIX;
    +  strcpy(local.sun_path, socketPath.c_str());
    +  socklen_t len = strlen(local.sun_path) + sizeof(local.sun_family) + 1;
    +
    +  int tries = 0;
    +  for (tries = 0; tries < maxTries; ++tries) {
    +    int result = connect(s, (struct sockaddr *)&local, len);
    +    if (result == -1) {
    +      usleep(100000); // 0.1 second
    +    } else
    +      break;
    +  }
    +
    +  if (tries == maxTries) {
    +    conf_.log("error") << "connect(): " << strerror(errno);
    +    conf_.log("notice") << "Giving up on session: " << sessionId
    +			<< " (" << socketPath << ")";
    +    close(s);
    +    unlink(socketPath.c_str());
    +
    +    return -1;
    +  }
    +
    +  return s;
    +}
    +
    +void Server::checkConfig()
    +{
    +  /*
    +   * Create the run directory if it does not yet exist.
    +   */
    +  FILE *test = fopen((conf_.runDirectory() + "/test").c_str(), "w+");
    +
    +  if (test == NULL) {
    +    if (mkdir(conf_.runDirectory().c_str(), 777) != 0) {
    +      conf_.log("fatal") << "Cannot create run directory '"
    +			 << conf_.runDirectory() << "'";
    +      exit(1);
    +    }
    +  } else
    +    unlink((conf_.runDirectory() + "/test").c_str());
    +}
    +
    +int Server::main()
    +{
    +  checkConfig();
    +
    +  /*
    +   * We partially parse the FCGI protocol. We need to delineate the
    +   * FCGI_BEGIN_REQUEST in the server stream,
    +   * and the end-of FCGI_PARAMS, for determining presence of the session ID.
    +   * and FCGI_END_REQUEST messages from the application stream.
    +   */
    +  struct sockaddr_un clientname;
    +  socklen_t socklen = sizeof(clientname);
    +
    +  if (signal(SIGCHLD, Wt::handleSigChld) == SIG_ERR) 
    +    conf_.log("error") << "Cannot catch SIGCHLD: signal(): "
    +		       << strerror(errno);
    +  if (signal(SIGTERM, Wt::handleServerSigTerm) == SIG_ERR)
    +    conf_.log("error") << "Cannot catch SIGTERM: signal(): "
    +		       << strerror(errno);
    +  if (signal(SIGUSR1, Wt::handleServerSigUsr1) == SIG_ERR) 
    +    conf_.log("error") << "Cannot catch SIGUSR1: signal(): "
    +		       << strerror(errno);
    +  if (signal(SIGHUP, Wt::handleServerSigHup) == SIG_ERR) 
    +    conf_.log("error") << "Cannot catch SIGHUP: signal(): "
    +		       << strerror(errno);
    +
    +  if (argc_ == 2 && boost::starts_with(argv_[1], "--socket=")) {
    +    std::string socketName = std::string(argv_[1]).substr(9);
    +    boost::trim(socketName);
    +    if (!bindUDStoStdin(socketName, conf_))
    +      return -1;
    +    conf_.log("notice") << "Reading FastCGI stream from socket '"
    +			<< socketName << '\'';
    +  } else
    +    conf_.log("notice") << "Reading FastCGI stream from stdin";
    +
    +  for (;;) {
    +    //std::cerr << "accepting()" << std::endl;
    +
    +    int serverSocket = accept(STDIN_FILENO, (sockaddr *) &clientname,
    +			      &socklen);
    +
    +    //std::cerr << "accept()" << std::endl;
    +
    +    if (serverSocket < 0) {
    +      conf_.log("fatal") << "accept(): " << strerror(errno);
    +      exit (1);
    +    }
    +
    +    handleRequestThreaded(serverSocket);
    +  }
    +
    +  return 0;
    +}
    +
    +void Server::handleRequestThreaded(int serverSocket)
    +{
    +#ifdef WT_THREADED
    +  threadPool_.schedule(boost::bind(&Server::handleRequest, this, serverSocket));
    +#else
    +  handleRequest(serverSocket);
    +#endif // WT_THREADED
    +}
    +
    +bool Server::writeToSocket(int socket, const unsigned char *buf, int bufsize)
    +{
    +  while (bufsize > 0) {
    +    int result = write(socket, buf, bufsize);
    +    if (result < 0)
    +      return false;
    +    else {
    +      bufsize -= result;
    +      buf += result;
    +    }
    +  }
    +
    +  return true;
    +}
    +
    +void Server::handleRequest(int serverSocket)
    +{
    +  int clientSocket = -1;
    +  bool debug = false;
    +
    +  try {
    +    /*
    +     * handle a new request
    +     */
    +    std::vector<FCGIRecord *> consumedRecords_;
    +
    +    bool haveSessionId = false;
    +    std::string sessionId = "";
    +
    +    std::string cookies;
    +    std::string scriptName;
    +
    +    char version;
    +    short requestId;
    +
    +    for (;;) {
    +      FCGIRecord *d = new FCGIRecord();
    +      d->read(serverSocket);
    +      version = d->version();
    +      requestId = d->requestId();
    +
    +      //std::cerr << "server read" << std::endl;
    +
    +      if (d->good()) {
    +	//std::cerr << *d << std::endl;
    +	consumedRecords_.push_back(d);
    +
    +	if (d->type() == FCGI_PARAMS) {
    +	  if (d->contentLength() == 0)
    +	    break;
    +	  else {
    +	    std::string value;
    +
    +	    if (d->getParam("QUERY_STRING", value))
    +	      haveSessionId = getSessionFromQueryString(value, sessionId);
    +	    if (d->getParam("HTTP_COOKIE", value))
    +	      cookies = value;
    +	    if (d->getParam("SCRIPT_NAME", value))
    +	      scriptName = value;
    +	  }
    +	}
    +      }
    +    }
    +
    +    /*
    +     * Session tracking:
    +     *   what should we give priority ? We should give priority to the
    +     *   cookie, because in that case the URL may still contain an invalid
    +     *   session id (when the user had for example bookmarked like that)
    +     *
    +     * But not when we want to get a new session when reloading, in that
    +     * case we ignore the set cookie.
    +     */
    +    if ((conf_.sessionTracking() == Configuration::CookiesURL)
    +	&& !cookies.empty() && !scriptName.empty()
    +	&& !conf_.reloadIsNewSession()) {
    +      std::string cookieSessionId
    +	= WebController::sessionFromCookie(cookies, scriptName,
    +					   conf_.sessionIdLength());
    +      if (!cookieSessionId.empty()) {
    +	sessionId = cookieSessionId;
    +	haveSessionId = true;
    +      }
    +    }
    +
    +    /*
    +     * Forward the request to the session.
    +     */
    +    clientSocket = -1;
    +
    +    /*
    +     * See if the session is alive.
    +     */
    +    if (haveSessionId) {
    +      struct stat finfo;
    +
    +      // exists, try to connect (for 1 second)
    +      std::string path = socketPath(sessionId);
    +      if (stat(path.c_str(), &finfo) != -1)
    +	clientSocket = connectToSession(sessionId, path, 10);
    +    }
    +
    +    while (clientSocket == -1) {
    +      /*
    +       * New session
    +       */
    +      if (conf_.sessionPolicy() == Configuration::DedicatedProcess) {
    +	/*
    +	 * For dedicated process, create session at server, so that we
    +	 * can keep track of process id for the session
    +	 */
    +	sessionId = conf_.generateSessionId();
    +	std::string path = socketPath(sessionId);
    +
    +	/*
    +	 * Create and fork a new session.
    +	 *
    +	 * But not if we have already too many sessions running...
    +	 */
    +	if ((int)sessions_.size() > conf_.maxNumSessions()) {
    +	  conf_.log("error") << "Session limit reached ("
    +			     << conf_.maxNumSessions() << ')';
    +	  break;
    +	}
    +
    +	pid_t pid = fork();
    +	if (pid == -1) {
    +	  conf_.log("fatal") << "fork(): " << strerror(errno);
    +	  exit(1);
    +	} else if (pid == 0) {
    +	  /* the child process */
    +	  execChild(debug, sessionId);
    +	  exit(1);
    +	} else {
    +	  conf_.log("notice") << "Spawned dedicated process for "
    +			      << sessionId << ": pid=" << pid;
    +	  {
    +#ifdef WT_THREADED
    +	    boost::recursive_mutex::scoped_lock sessionsLock(mutex_);
    +#endif
    +	    sessions_[sessionId] = new SessionInfo(sessionId, pid);
    +	  }
    +
    +	  clientSocket = connectToSession(sessionId, path, 1000);
    +	}
    +      } else {
    +	/*
    +	 * For SharedProcess, connect to a random server.
    +	 */
    +
    +	/*
    +	 * Patch from Andrii Arsirii: it could be that the
    +	 * sessionProcessPids_ vector is empty because concurrently a
    +	 * shared process died: we need to wait until it is respawned.
    +	 */
    +	for (;;) {
    +	  int processCount = sessionProcessPids_.size();
    +	  if (processCount == 0)
    +	    sleep(1);
    +	  else {
    +	    unsigned i = lrand48() % processCount;
    +
    +	    if (i >= sessionProcessPids_.size())
    +	      sleep(1);
    +	    else {
    +	      // This is still not entirely okay: a race condition could
    +	      // still occur between checking the size and getting the
    +	      // element.
    +	      int pid = sessionProcessPids_[i];
    +	      std::string path = conf_.runDirectory() + "/server-"
    +		+ boost::lexical_cast<std::string>(pid);
    +
    +	      clientSocket = connectToSession("", path, 100);
    +
    +	      if (clientSocket == -1)
    +		conf_.log("error") << "Session process " << pid
    +				   << " not responding ?";
    +
    +	      break;
    +	    }
    +	  }
    +	}
    +      }
    +    }
    +
    +    if (clientSocket == -1) {
    +      close(serverSocket);
    +      return;
    +    }
    +
    +    /*
    +     * Forward all data that was consumed to the application.
    +     */
    +    for (unsigned i = 0; i < consumedRecords_.size(); ++i) {
    +      if (!writeToSocket(clientSocket, consumedRecords_[i]->plainText(),
    +			 consumedRecords_[i]->plainTextLength())) {
    +	conf_.log("error") << "Error writing to client";
    +	return;
    +      }
    +
    +      delete consumedRecords_[i];
    +    }
    +
    +    /*
    +     * Now, we must copy data from both the server to the application,
    +     * as well as from the application to the server, until the application
    +     * sends the FCGI_END_REQUEST message.
    +     */
    +    for (;;) {
    +      fd_set rfds;
    +      FD_ZERO(&rfds);
    +      FD_SET(serverSocket, &rfds);
    +      FD_SET(clientSocket, &rfds);
    +
    +      //std::cerr << "select()" << std::endl;
    +      if (select(FD_SETSIZE, &rfds, NULL, NULL, NULL) < 0) {
    +	if (errno != EINTR)
    +	  conf_.log("fatal") << "select(): " << strerror(errno);
    +
    +	break;
    +      }
    +
    +      bool got = false;
    +      if (FD_ISSET(serverSocket, &rfds)) {
    +	got = true;
    +	FCGIRecord d;
    +	d.read(serverSocket);
    +
    +	if (d.good()) {
    +	  //std::cerr << "Got record from server: " << d << std::endl;
    +	  if (!writeToSocket(clientSocket, d.plainText(),
    +			     d.plainTextLength())) {
    +	    conf_.log("error") << "Error writing to application";
    +
    +	    break;
    +	  }
    +	} else {
    +	  conf_.log("error") << "Error reading from web server";
    +
    +	  break;
    +	}
    +      }
    +
    +      if (FD_ISSET(clientSocket, &rfds)) {
    +	got = true;
    +	FCGIRecord d;
    +	d.read(clientSocket);
    +
    +	if (d.good()) {
    +	  //std::cerr << "Got record from client: " << d << std::endl;
    +	  if (!writeToSocket(serverSocket, d.plainText(),
    +			     d.plainTextLength())) {
    +	    conf_.log("error") << "Error writing to web server";
    +
    +	    break;
    +	  }
    +
    +	  if (d.type() == FCGI_END_REQUEST)
    +	    break;
    +	} else {
    +	  conf_.log("error") << "Error reading from application";
    +
    +	  break;
    +	}
    +      }
    +    }
    +
    +    //std::cerr << "Request done." << std::endl;
    +
    +    shutdown(serverSocket, SHUT_RDWR);
    +    close(serverSocket);
    +    close(clientSocket);
    +  } catch (std::exception&) {
    +    close(serverSocket);
    +    if (clientSocket != -1)
    +      close(clientSocket);
    +  }
    +}
    +
    +/*
    + ******************
    + * Client routines
    + ******************
    + */
    +
    +static std::string socketPath;
    +static WebController *theController = 0;
    +
    +static void doShutdown(const char *signal)
    +{
    +  unlink(socketPath.c_str());
    +  if (theController) {
    +    theController->configuration().log("notice") << "Caught " << signal;
    +    theController->forceShutdown();
    +  }
    +
    +  exit(0);
    +}
    +
    +static void handleSigTerm(int)
    +{
    +  doShutdown("SIGTERM");
    +}
    +
    +static void handleSigUsr1(int)
    +{
    +  doShutdown("SIGUSR1");
    +}
    +
    +static void handleSigHup(int)
    +{
    +  doShutdown("SIGHUP");
    +}
    +
    +void runSession(Configuration& conf, WServer *server, std::string sessionId)
    +{
    +  if (!bindUDStoStdin(conf.runDirectory() + "/" + sessionId, conf))
    +    exit(1);
    +
    +  try {
    +    FCGIStream fcgiStream;
    +    WebController controller(conf, server, &fcgiStream, sessionId);
    +    theController = &controller;
    +
    +    controller.run();
    +
    +    sleep(1);
    +
    +    theController = 0;
    +
    +    unlink(socketPath.c_str());
    +  } catch (std::exception& e) {
    +    conf.log("fatal") << "Dedicated session process for " << sessionId 
    +		      << ": caught unhandled exception: " << e.what();
    +
    +    unlink(socketPath.c_str());
    +
    +    throw;
    +  } catch (...) {
    +    conf.log("fatal") << "Dedicated session process for " << sessionId 
    +		      << ": caught unkown, unhandled exception.";
    +
    +    unlink(socketPath.c_str());
    +
    +    throw;
    +  }
    +}
    +
    +void startSharedProcess(Configuration& conf, WServer *server)
    +{
    +  if (!bindUDStoStdin(conf.runDirectory() + "/server-"
    +		      + boost::lexical_cast<std::string>(getpid()),
    +		      conf))
    +    exit(1);
    +
    +  try {
    +    FCGIStream fcgiStream;
    +    WebController controller(conf, server, &fcgiStream);
    +    theController = &controller;
    +
    +    controller.run();
    +
    +    theController = 0;
    +
    +    unlink(socketPath.c_str());
    +  } catch (std::exception& e) {
    +    conf.log("fatal") << "Shared session server: caught unhandled exception: "
    +		      << e.what();
    +
    +    unlink(socketPath.c_str());
    +
    +    throw;
    +  } catch (...) {
    +    conf.log("fatal") << "Shared session server: caught unknown, unhandled "
    +      "exception.";
    +
    +    unlink(socketPath.c_str());
    +
    +    throw;
    +  }
    +}
    +
    +struct WServerImpl {
    +  WServerImpl(const std::string& applicationPath,
    +	      const std::string& configurationFile)
    +    : applicationPath_(applicationPath),
    +      configurationFile_(configurationFile),
    +      configuration_(0),
    +      relayServer_(0),
    +      running_(false)
    +  { }
    +
    +  std::string applicationPath_;
    +  std::string configurationFile_;
    +
    +  Configuration *configuration_;
    +  Server        *relayServer_;
    +  bool          running_;
    +  std::string   sessionId_;
    +};
    +
    +WServer::WServer(const std::string& applicationPath,
    +		 const std::string& configurationFile)
    +  : impl_(new WServerImpl(applicationPath, configurationFile))
    +{ }
    +
    +WServer::~WServer()
    +{
    +  delete impl_;
    +}
    +
    +void WServer::setServerConfiguration(int argc, char *argv[],
    +				     const std::string& serverConfigurationFile)
    +{
    +  bool isServer = argc < 2 || strcmp(argv[1], "client") != 0; 
    +
    +  if (isServer) {
    +    Server webServer(argc, argv);
    +    exit(webServer.main());
    +  } else {
    +    /*
    +     * FastCGI configures the working directory to the location of the
    +     * binary, which is a convenient default, but not really ideal.
    +     */
    +    std::string appRoot;
    +    impl_->configuration_
    +      = new Configuration(impl_->applicationPath_,
    +			  appRoot,
    +			  impl_->configurationFile_,
    +			  Configuration::FcgiServer,
    +			  "Wt: initializing session process");
    +
    +    if (argc >= 3)
    +      impl_->sessionId_ = argv[2];
    +  }
    +}
    +
    +void WServer::addEntryPoint(EntryPointType type, ApplicationCreator callback,
    +			    const std::string& path, const std::string& favicon)
    +{
    +  if (!impl_->configuration_)
    +    throw Exception("WServer::addEntryPoint(): "
    +		    "call setServerConfiguration() first");
    +
    +  impl_->configuration_
    +    ->addEntryPoint(EntryPoint(type, callback, path, favicon));
    +}
    +
    +bool WServer::start()
    +{
    +  if (!impl_->configuration_)
    +    throw Exception("WServer::start(): call setServerConfiguration() first");
    +
    +  if (isRunning()) {
    +    std::cerr << "WServer::start() error: server already started!" << std::endl;
    +    return false;
    +  }
    +
    +  if (signal(SIGTERM, Wt::handleSigTerm) == SIG_ERR)
    +    impl_->configuration_->log("error") << "Cannot catch SIGTERM: signal(): "
    +					<< strerror(errno);
    +  if (signal(SIGUSR1, Wt::handleSigUsr1) == SIG_ERR) 
    +    impl_->configuration_->log("error") << "Cannot catch SIGUSR1: signal(): "
    +					<< strerror(errno);
    +  if (signal(SIGHUP, Wt::handleSigHup) == SIG_ERR) 
    +    impl_->configuration_->log("error") << "Cannot catch SIGHUP: signal(): "
    +					<< strerror(errno);
    +
    +  impl_->running_ = true;
    +
    +  if (impl_->sessionId_.empty())
    +    startSharedProcess(*impl_->configuration_, this);
    +  else
    +    runSession(*impl_->configuration_, this, impl_->sessionId_);
    +
    +  return false;
    +}
    +
    +bool WServer::isRunning() const
    +{
    +  return impl_ && impl_->running_;
    +}
    +
    +int WServer::httpPort() const
    +{
    +  return -1;
    +}
    +
    +void WServer::stop()
    +{
    +  if (!isRunning()) {
    +    std::cerr << "WServer::stop() error: server not yet started!" << std::endl;
    +    return;
    +  }
    +}
    +
    +int WServer::waitForShutdown(const char *restartWatchFile)
    +{
    +  for (;;)
    +    sleep(10000);
    +
    +  return 0;
    +}
    +
    +void WServer::addResource(WResource *resource, const std::string& path)
    +{
    +  if (!boost::starts_with(path, "/")) 
    +    throw WServer::Exception("WServer::addResource() error: "
    +                             "static resource path should start with \'/\'");
    +
    +  resource->setInternalPath(path);
    +  impl_->configuration_->addEntryPoint(EntryPoint(resource, path));
    +
    +}
    +
    +void WServer::handleRequest(WebRequest *request)
    +{
    +  theController->handleRequest(request);
    +}
    +
    +std::string WServer::appRoot() const
    +{
    +  return impl_->configuration_->appRoot();
    +}
    +
    +int WRun(int argc, char *argv[], ApplicationCreator createApplication)
    +{
    +  try {
    +    WServer server(argv[0], "");
    +
    +    try {
    +      server.setServerConfiguration(argc, argv);
    +      server.addEntryPoint(Application, createApplication);
    +      server.start();
    +
    +      return 0;
    +    } catch (std::exception& e) {
    +      server.impl()->configuration_->log("fatal") << e.what();
    +      return 1;
    +    }
    +  } catch (Wt::WServer::Exception& e) {
    +    std::cerr << e.what() << std::endl;
    +    return 1;
    +  } catch (std::exception& e) {
    +    std::cerr << "exception: " << e.what() << std::endl;
    +    return 1;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/fcgi/Server.h b/wt-3.1.7a/src/fcgi/Server.h
    new file mode 100644
    index 0000000..136f889
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/Server.h
    @@ -0,0 +1,79 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef SERVER_H_
    +#define SERVER_H_
    +
    +#include <string>
    +#include <map>
    +
    +#ifndef WT_TARGET_JAVA
    +#ifdef WT_THREADED
    +#include <boost/thread.hpp>
    +#include "threadpool/threadpool.hpp"
    +#endif
    +#endif // WT_TARGET_JAVA
    +
    +#include "Configuration.h"
    +
    +namespace Wt {
    +
    +class SessionInfo;
    +
    +class Server
    +{
    +public:
    +  Server(int argc, char *argv[]);
    +  int main();
    +
    +  static Server *instance;
    +
    +  void handleSigChld();
    +  void handleSignal(const char *signal);
    +
    +private:
    +  int argc_;
    +  char **argv_;
    +  Configuration conf_;
    +
    +#ifdef WT_THREADED
    +  // mutex to protect access to the sessions map
    +  boost::recursive_mutex mutex_;
    +
    +  boost::threadpool::pool threadPool_;
    +#endif
    +
    +  void spawnSharedProcess();
    +  void execChild(bool debug, const std::string& extraArg);
    +
    +  int  connectToSession(const std::string& sessionId,
    +			const std::string& socketPath,
    +			int maxTries);
    +  bool getSessionFromQueryString(const std::string& uri,
    +				 std::string& sessionId);
    +  void checkConfig();
    +  bool writeToSocket(int socket, const unsigned char *buf, int bufsize);
    +
    +  /*
    +   * For DedicatedProcess session policy
    +   */
    +  typedef std::map<std::string, SessionInfo *> SessionMap;
    +  SessionMap sessions_;
    +
    +  void handleRequestThreaded(int serverSocket);
    +  void handleRequest(int serverSocket);
    +
    +  /*
    +   * For SharedProcess session policy
    +   */
    +  std::vector<int> sessionProcessPids_;
    +
    +  const std::string socketPath(const std::string& sessionId);
    +};
    +
    +}
    +
    +#endif // WT_SERVER_H_
    diff --git a/wt-3.1.7a/src/fcgi/SessionInfo.C b/wt-3.1.7a/src/fcgi/SessionInfo.C
    new file mode 100644
    index 0000000..4bc60a5
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/SessionInfo.C
    @@ -0,0 +1,15 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "SessionInfo.h"
    +
    +namespace Wt {
    +
    +SessionInfo::SessionInfo(const std::string sessionId, pid_t childPId)
    +  : sessionId_(sessionId),
    +    childPId_(childPId)
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/fcgi/SessionInfo.h b/wt-3.1.7a/src/fcgi/SessionInfo.h
    new file mode 100644
    index 0000000..91cb641
    --- /dev/null
    +++ b/wt-3.1.7a/src/fcgi/SessionInfo.h
    @@ -0,0 +1,30 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +// This may look like C code, but it's really -*- C++ -*-
    +#ifndef WT_SESSIONINFO_H_
    +#define WT_SESSIONINFO_H_
    +
    +#include <stdio.h>
    +#include <string>
    +
    +namespace Wt {
    +
    +class SessionInfo
    +{
    +public:
    +  SessionInfo(const std::string sessionId, pid_t childPId);
    +
    +  const std::string sessionId() const { return sessionId_; }
    +  pid_t childPId() const { return childPId_; }
    +
    +private:
    +  std::string sessionId_;
    +  pid_t       childPId_;
    +};
    +
    +}
    +
    +#endif // WT_SESSIONINFO_H_
    diff --git a/wt-3.1.7a/src/filetostring.cmake b/wt-3.1.7a/src/filetostring.cmake
    new file mode 100644
    index 0000000..be388c6
    --- /dev/null
    +++ b/wt-3.1.7a/src/filetostring.cmake
    @@ -0,0 +1,7 @@
    +FILE(READ ${infile} f0)
    +STRING( REGEX REPLACE "\\\\" "\\\\\\\\" f1 "${f0}" )
    +STRING( REGEX REPLACE "\"" "\\\\\"" f2 "${f1}" )
    +STRING( REGEX REPLACE "\r?\n" "\\\\r\\\\n\"\n  \"" f3 "${f2}" )
    +SET( f4 "// This is automatically generated code -- do not edit!\n// Generated from ${file} \n\nnamespace skeletons {\n\n  const char * ${var} =\n  \"${f3}\";\n}\n" )
    +FILE(WRITE ${outfile} "${f4}")
    +
    diff --git a/wt-3.1.7a/src/flash/WtSoundManager.as b/wt-3.1.7a/src/flash/WtSoundManager.as
    new file mode 100644
    index 0000000..8b6ad5f
    --- /dev/null
    +++ b/wt-3.1.7a/src/flash/WtSoundManager.as
    @@ -0,0 +1,68 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/*
    + * To compile:
    + * mtasc -main -swf WtSoundManager.swf WtSoundManager.as -version 8 -header 16:16:30
    + */
    +import flash.external.ExternalInterface;
    +
    +class WtSound {
    +  static var app: WtSound;
    +
    +  static function main(mc) {
    +    app = new WtSound();
    +  }
    +
    +  function WtSound() {
    +    var JSObject = "WtSoundManager";
    +    var sounds = [];
    +
    +    var add = function(ID, url)
    +    {
    +      sounds[ID] = new Sound();
    +      sounds[ID].setVolume(100);
    +      sounds[ID].loadSound(url, false); // loops don't work with streaming
    +      sounds[ID].doPlay = false;
    +      sounds[ID].onLoad = function(success) {
    +        if (success) {
    +          sounds[ID].isLoaded = true;
    +          if (sounds[ID].doPlay) {
    +            sounds[ID].start(0, sounds[ID].loops);
    +          }
    +        }
    +      }
    +    }
    +
    +    var remove = function(ID)
    +    {
    +      if (sounds[ID]) {
    +        delete sounds[ID];
    +      }
    +    }
    +
    +    var play = function(ID, loops)
    +    {
    +      if (sounds[ID].isLoaded) {
    +        sounds[ID].start(0, parseInt(loops));
    +      } else {
    +        sounds[ID].doPlay = true;
    +        sounds[ID].loops = loops;
    +      }
    +    }
    +
    +    var stop = function(ID)
    +    {
    +      sounds[ID].stop();
    +    }
    +
    +    ExternalInterface.addCallback('WtAdd', this, add);
    +    ExternalInterface.addCallback('WtRemove', this, remove);
    +    ExternalInterface.addCallback('WtPlay', this, play);
    +    ExternalInterface.addCallback('WtStop', this, stop);
    +    ExternalInterface.call(JSObject + ".flashInitializedCB");
    +  }
    +}
    diff --git a/wt-3.1.7a/src/http/Buffer.h b/wt-3.1.7a/src/http/Buffer.h
    new file mode 100644
    index 0000000..f18c204
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Buffer.h
    @@ -0,0 +1,23 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#ifndef HTTP_BUFFER_HPP
    +#define HTTP_BUFFER_HPP
    +
    +#include <boost/asio.hpp>
    +
    +#include <boost/array.hpp>
    +
    +namespace http {
    +namespace server {
    +
    +typedef boost::array<char, 8192> Buffer;
    +
    +}
    +}
    +
    +#endif // HTTP_BUFFER_HPP
    diff --git a/wt-3.1.7a/src/http/CMakeLists.txt b/wt-3.1.7a/src/http/CMakeLists.txt
    new file mode 100644
    index 0000000..e55babd
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/CMakeLists.txt
    @@ -0,0 +1,107 @@
    +IF(CONNECTOR_HTTP)
    +  MESSAGE("** Enabling built-in httpd.")
    +
    +  SET(libhttpsources
    +    Configuration.C
    +    Connection.C
    +    ConnectionManager.C
    +    HTTPRequest.C
    +    HTTPStream.C
    +    MimeTypes.C
    +    Reply.C
    +    Request.C
    +    RequestHandler.C
    +    RequestParser.C
    +    Server.C
    +    SslConnection.C
    +    StaticReply.C
    +    StockReply.C
    +    TcpConnection.C
    +    WServer.C
    +    WtReply.C
    +    md5.c
    +  )
    +    
    +  OPTION(HTTP_WITH_SSL "Support for SSL (https)" ${SSL_FOUND})
    +  OPTION(HTTP_WITH_ZLIB "Support for zlib (http compression)" ${ZLIB_FOUND})
    +
    +  IF (HTTP_WITH_SSL)
    +    IF (NOT SSL_FOUND)
    +      MESSAGE("** HTTP_WITH_SSL enabled but could not find OpenSSL")
    +      MESSAGE(FATAL "   Indicate location of OpenSSL using -DUSERLIB_ROOT=...")
    +    ENDIF (NOT SSL_FOUND)
    +    ADD_DEFINITIONS(-DHTTP_WITH_SSL)
    +    SET(MY_SSL_LIBS ${SSL_LIBRARIES})
    +    INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
    +  ELSE (HTTP_WITH_SSL)
    +    SET(MY_SSL_LIBS "")
    +  ENDIF (HTTP_WITH_SSL)
    +
    +  IF(NOT BOOST_WTHTTP_FOUND)
    +
    +    MESSAGE(FATAL "** Could not find all boost libraries required to build the httpe connector (thread, filesystem, programoptions, datetime)")
    +
    +  ENDIF(NOT BOOST_WTHTTP_FOUND)
    +  IF(HTTP_WITH_ZLIB)
    +    ADD_DEFINITIONS(-DWTHTTP_WITH_ZLIB ${ZLIB_DEFINITIONS})
    +    SET(MY_ZLIB_LIBS ${ZLIB_LIBRARIES})
    +    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
    +  ELSE(HTTP_WITH_ZLIB)
    +    SET(MY_ZLIB_LIBS "")
    +  ENDIF(HTTP_WITH_ZLIB)
    +
    +  INCLUDE_DIRECTORIES(
    +    ${BOOST_INCLUDE_DIRS}
    +    ${CMAKE_CURRENT_SOURCE_DIR}/../web
    +    ${CMAKE_CURRENT_SOURCE_DIR}/../wt
    +    ${CMAKE_CURRENT_BINARY_DIR}/
    +  )
    +
    +  IF(WIN32)
    +    ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
    +  ENDIF(WIN32)
    +
    +  ADD_DEFINITIONS(${ZLIB_DEFINITIONS})
    +  ADD_LIBRARY(wthttp ${libhttpsources})
    +
    +  TARGET_LINK_LIBRARIES(wthttp
    +    wt
    +    ${MY_ZLIB_LIBS}
    +    ${MY_SSL_LIBS}
    +    ${BOOST_WTHTTP_LIBRARIES}
    +  )
    +
    +  IF(BOOST_WT_MT_FOUND)
    +    TARGET_LINK_LIBRARIES(wthttp ${CMAKE_THREAD_LIBS_INIT})
    +  ENDIF(BOOST_WT_MT_FOUND)
    +  IF(WIN32)
    +    TARGET_LINK_LIBRARIES(wthttp ws2_32 mswsock)
    +  ENDIF(WIN32)
    +
    +  INSTALL(TARGETS wthttp
    +    RUNTIME DESTINATION bin
    +    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +  SET_TARGET_PROPERTIES(
    +    wthttp
    +  PROPERTIES
    +    VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +    SOVERSION ${WTHTTP_SOVERSION}
    +    DEBUG_POSTFIX "d"
    +  )
    +
    +  IF(MSVC)
    +    SET_TARGET_PROPERTIES(
    +        wthttp
    +      PROPERTIES
    +        COMPILE_FLAGS "${BUILD_PARALLEL} /wd4251 /wd4275 /wd4355 /wd4800 /wd4996 /wd4101 /wd4267 /wd4267"
    +    )
    +  ENDIF(MSVC)
    +
    +  ADD_DEPENDENCIES(wthttp wt ${EXAMPLES_CONNECTOR})
    +
    +ELSE(CONNECTOR_HTTP)
    +  MESSAGE("** Disabling built-in httpd.")
    +ENDIF(CONNECTOR_HTTP)
    +
    diff --git a/wt-3.1.7a/src/http/Configuration.C b/wt-3.1.7a/src/http/Configuration.C
    new file mode 100644
    index 0000000..db8297f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Configuration.C
    @@ -0,0 +1,343 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#include "Wt/WConfig.h"
    +#include "Wt/WLogger"
    +#include "Wt/WServer"
    +
    +#include "Configuration.h"
    +
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#ifndef WIN32
    +#include <unistd.h>
    +#endif
    +#ifdef WIN32
    +#include <process.h> // for getpid()
    +#include <Winsock2.h> // for gethostname()
    +#endif
    +#include <iostream>
    +#include <fstream>
    +
    +#ifdef __CYGWIN__
    +#include <Winsock2.h> // for gethostname()
    +#endif
    +
    +namespace http {
    +namespace server {
    +
    +Configuration *Configuration::instance_ = 0;
    +
    +Configuration::Configuration(Wt::WLogger& logger, bool silent)
    +  : logger_(logger),
    +    silent_(silent),
    +    threads_(10),
    +    docRoot_(),
    +    errRoot_(),
    +    deployPath_("/"),
    +    pidPath_(),
    +    serverName_(),
    +    compression_(true),
    +    gdb_(false),
    +    configPath_(),
    +    httpPort_("80"),
    +    httpsPort_("443"),
    +    sslCertificateChainFile_(),
    +    sslPrivateKeyFile_(),
    +    sslTmpDHFile_(),
    +    sessionIdPrefix_(),
    +    accessLog_(),
    +    maxMemoryRequestSize_(128*1024)
    +{
    +  if (instance_)
    +    throw Wt::WServer::Exception("Internal error: two Configuration instances?");
    +  instance_ = this;
    +
    +  char buf[100];
    +  if (gethostname(buf, 100) == 0)
    +    serverName_ = buf;
    +
    +#ifndef WTHTTP_WITH_ZLIB
    +  compression_ = false;
    +#endif
    +}
    +
    +Configuration::~Configuration()
    +{
    +  instance_ = 0;
    +  unlink(pidPath_.c_str());
    +}
    +
    +void Configuration::createOptions(po::options_description& options)
    +{
    +  po::options_description general("General options");
    +  general.add_options()
    +    ("help,h", "produce help message")
    +
    +    ("threads,t",
    +     po::value<int>(&threads_)->default_value(threads_),
    +     "number of threads")
    +
    +    ("servername",
    +     po::value<std::string>(&serverName_)->default_value(serverName_),
    +     "servername (IP address or DNS name)")
    +
    +    ("docroot",
    +     po::value<std::string>()->default_value(docRoot_),
    +     "document root for static files")
    +
    +    ("errroot",
    +     po::value<std::string>(&errRoot_)->default_value(errRoot_),
    +     "root for error pages")
    +
    +    ("accesslog",
    +     po::value<std::string>(&accessLog_),
    +     "access log file (defaults to stdout)")
    +
    +    ("no-compression",
    +     "do not compress dynamic text/html and text/plain responses")
    +
    +    ("deploy-path",
    +     po::value<std::string>(&deployPath_)->default_value(deployPath_),
    +     "location for deployment")
    +
    +    ("session-id-prefix",
    +     po::value<std::string>(&sessionIdPrefix_)->default_value(sessionIdPrefix_),
    +     "prefix for session-id's (overrides wt_config.xml setting)")
    +
    +    ("pid-file,p",
    +     po::value<std::string>(&pidPath_)->default_value(pidPath_),
    +     "path to pid file (optional)")
    +
    +    ("config,c",
    +     po::value<std::string>(&configPath_),
    +     ("location of wt_config.xml. If unspecified, WT_CONFIG_XML is searched "
    +     "in the environment, if it does not exist then the compiled-in default ("
    +     + std::string(WT_CONFIG_XML) + ") is tried. If the default does not "
    +      "exist, we revert to default values for all parameters.").c_str())
    +
    +    ("max-memory-request-size",
    +     po::value< ::int64_t >(&maxMemoryRequestSize_),
    +     "Requests are usually read in memory before being processed. To avoid "
    +     "DOS attacks where large requests take up all RAM, use this parameter "
    +     "to force requests that are larger than the specified size (bytes) to "
    +     "be spooled to disk. This will also spool file uploads to disk.")
    +
    +    ("gdb",
    +     "do not shutdown when receiving Ctrl-C (and let gdb break instead)")
    +     ;
    +
    +  po::options_description http("HTTP/WebSocket server options");
    +  http.add_options()
    +    ("http-address", po::value<std::string>(),
    +     "IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)")
    +    ("http-port", po::value<std::string>(&httpPort_)->default_value(httpPort_),
    +     "HTTP port (e.g. 80)")
    +    ;
    +
    +  po::options_description https("HTTPS/Secure WebSocket server options");
    +  https.add_options()
    +    ("https-address", po::value<std::string>(),
    +     "IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)")
    +    ("https-port",
    +     po::value<std::string>(&httpsPort_)->default_value(httpsPort_),
    +     "HTTPS port (e.g. 443)")
    +    ("ssl-certificate",
    +     po::value<std::string>()->default_value(sslCertificateChainFile_),
    +     "SSL server certificate chain file\n"
    +     "e.g. \"/etc/ssl/certs/vsign1.pem\"")
    +    ("ssl-private-key", po::value<std::string>()->default_value(sslPrivateKeyFile_),
    +     "SSL server private key file\n"
    +     "e.g. \"/etc/ssl/private/company.pem\"")
    +    ("ssl-tmp-dh", po::value<std::string>()->default_value(sslTmpDHFile_),
    +     "File for temporary Diffie-Hellman parameters\n"
    +     "e.g. \"/etc/ssl/dh512.pem\"")
    +    ;
    +
    +  options.add(general).add(http).add(https);
    +}
    +
    +void Configuration::setOptions(int argc, char **argv,
    +			       const std::string& configurationFile)
    +{
    +  po::options_description all_options("Allowed options");
    +  createOptions(all_options);
    +
    +  try {
    +    po::variables_map vm;
    +
    +    if (argc)
    +      po::store(po::parse_command_line(argc, argv, all_options), vm);
    +
    +    if (!configurationFile.empty()) {
    +      std::ifstream cfgFile(configurationFile.c_str(),
    +	std::ios::in | std::ios::binary);
    +      if (cfgFile) {
    +	if (!silent_)
    +	  log("notice") << "Reading wthttpd configuration from: "
    +			<< configurationFile;
    +	po::store(po::parse_config_file(cfgFile, all_options), vm);
    +      }
    +    }
    +
    +    po::notify(vm);
    +
    +    if (vm.count("help")) {
    +      std::cout << all_options << std::endl;
    +
    +      if (!configurationFile.empty())
    +	std::cout << "Settings may be set in the configuration file "
    +		  << configurationFile << std::endl;
    +
    +      std::cout << std::endl;
    +
    +      throw Wt::WServer::Exception("");
    +    }
    +
    +    readOptions(vm);
    +  } catch (Wt::WServer::Exception& e) {
    +    throw;
    +  } catch (std::exception& e) {
    +    throw Wt::WServer::Exception(std::string("Error: ") + e.what());
    +  } catch (...) {
    +    throw Wt::WServer::Exception("Exception of unknown type!\n");
    +  }
    +}
    +
    +void Configuration::readOptions(const po::variables_map& vm)
    +{
    +  if (!pidPath_.empty()) {
    +    std::ofstream pidFile(pidPath_.c_str());
    +
    +    if (!pidFile)
    +      throw Wt::WServer::Exception("Cannot write to '" + pidPath_ + "'");
    +
    +    pidFile << getpid() << std::endl;
    +  }
    +
    +  gdb_ = vm.count("gdb");
    +
    +  compression_ = !vm.count("no-compression");
    +#ifndef WTHTTP_WITH_ZLIB
    +  if(compression_) {
    +    std::cout << "Option no-compression is implied because wthttp was built "
    +	      << "without zlib support.\n";
    +    compression_ = false;
    +  }
    +#endif
    +
    +  checkPath(vm, "docroot", "Document root", docRoot_, Directory);
    +
    +  if (vm.count("http-address"))
    +    httpAddress_ = vm["http-address"].as<std::string>();
    +
    +  if (errRoot_.empty()) {
    +    errRoot_ = docRoot_;
    +    if (!errRoot_.empty()) {
    +      if (errRoot_[errRoot_.length()-1] != '/')
    +	errRoot_+= '/';
    +    }
    +    errRoot_ += "error/";
    +  }
    +  if (errRoot_[errRoot_.length()-1] != '/')
    +    errRoot_+= '/';
    +
    +  if (deployPath_.empty())
    +    deployPath_ = "/";
    +  else
    +    if (deployPath_[0] != '/')
    +      throw Wt::WServer::Exception("Deployment root must start with '/'");
    +
    +  if (vm.count("https-address")) {
    +    httpsAddress_ = vm["https-address"].as<std::string>();
    +
    +    checkPath(vm, "ssl-certificate", "SSL Certificate chain file",
    +	      sslCertificateChainFile_, RegularFile);
    +    checkPath(vm, "ssl-private-key", "SSL Private key file",
    +	      sslPrivateKeyFile_, RegularFile | Private);
    +    checkPath(vm, "ssl-tmp-dh", "SSL Temporary Diffie-Hellman file",
    +	      sslTmpDHFile_, RegularFile);
    +  }
    +
    +  if (httpAddress_.empty() && httpsAddress_.empty()) {
    +    throw Wt::WServer::Exception
    +      ("Specify http-address and/or https-address "
    +       "to run a HTTP and/or HTTPS server.");
    +  } 
    +}
    +
    +Wt::WLogEntry Configuration::log(const std::string& type) const
    +{
    +  Wt::WLogEntry e = logger_.entry();
    +
    +  e << Wt::WLogger::timestamp << Wt::WLogger::sep
    +    << getpid() << Wt::WLogger::sep
    +    << /* sessionId << */ Wt::WLogger::sep
    +    << '[' << type << ']' << Wt::WLogger::sep;
    +
    +  return e;
    +}
    +
    +#ifdef _MSC_VER
    +static inline bool S_ISREG(unsigned short mode)
    +{
    +   return (mode & S_IFREG) != 0;
    +}
    +
    +static inline bool S_ISDIR(unsigned short mode)
    +{
    +   return (mode & S_IFDIR) != 0;
    +}
    +#endif
    +
    +void Configuration::checkPath(const po::variables_map& vm,
    +			      std::string varName,
    +			      std::string varDescription,
    +			      std::string& result,
    +			      int options)
    +{
    +  if (vm.count(varName)) {
    +    result = vm[varName].as<std::string>();
    +
    +    struct stat t;
    +    if (stat(result.c_str(), &t) != 0) {
    +      std::perror("stat");
    +      throw Wt::WServer::Exception(varDescription
    +				   + " (\"" + result + "\") not valid.");
    +    } else {
    +      if (options & Directory) {
    +	while (result[result.length()-1] == '/')
    +	  result = result.substr(0, result.length() - 1);
    +
    +	if (!S_ISDIR(t.st_mode)) {
    +	  throw Wt::WServer::Exception(varDescription + " (\"" + result
    +				       + "\") must be a directory.");
    +	}
    +      }
    +
    +      if (options & RegularFile) {
    +	if (!S_ISREG(t.st_mode)) {
    +	  throw Wt::WServer::Exception(varDescription + " (\"" + result
    +				       + "\") must be a regular file.");
    +	}
    +      }
    +#ifndef WIN32
    +      if (options & Private) {
    +	if (t.st_mode & (S_IRWXG | S_IRWXO)) {
    +	  throw Wt::WServer::Exception(varDescription + " (\"" + result
    +			     + "\") must be unreadable for group and others.");
    +	}
    +      }
    +#endif
    +    }
    +  } else {
    +    throw Wt::WServer::Exception(varDescription + " (--" + varName
    +				 + ") was not set.");
    +  }
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/Configuration.h b/wt-3.1.7a/src/http/Configuration.h
    new file mode 100644
    index 0000000..7af2f2b
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Configuration.h
    @@ -0,0 +1,117 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#ifndef HTTP_CONFIGURATION_HPP
    +#define HTTP_CONFIGURATION_HPP
    +
    +#include <exception>
    +#include <string>
    +#include <boost/program_options.hpp>
    +#include <boost/cstdint.hpp>
    +
    +// For ::int64_t and ::uint64_t on Windows only
    +#include "Wt/WDllDefs.h"
    +
    +namespace po = boost::program_options;
    +
    +namespace boost {
    +  namespace program_options {
    +    class variables_map;
    +  }
    +}
    +
    +namespace Wt {
    +  class WLogger;
    +  class WLogEntry;
    +}
    +
    +namespace http {
    +namespace server {
    +
    +class Configuration
    +{
    +public:
    +  Configuration(Wt::WLogger& logger, bool silent = false);
    +  ~Configuration();
    +
    +  void setOptions(int argc, char **argv, const std::string& configurationFile);
    +
    +  static Configuration& instance() { return *instance_; }
    +
    +  int threads() const { return threads_; }
    +  const std::string& docRoot() const { return docRoot_; }
    +  const std::string& errRoot() const { return errRoot_; }
    +  const std::string& deployPath() const { return deployPath_; }
    +  const std::string& pidPath() const { return pidPath_; }
    +  const std::string& serverName() const { return serverName_; }
    +  bool compression() const { return compression_; }
    +  bool gdb() const { return gdb_; }
    +  const std::string& configPath() const { return configPath_; }
    +
    +  const std::string& httpAddress() const { return httpAddress_; }
    +  const std::string& httpPort() const { return httpPort_; }
    +
    +  const std::string& httpsAddress() const { return httpsAddress_; }
    +  const std::string& httpsPort() const { return httpsPort_; }
    +  const std::string& sslCertificateChainFile() const 
    +    { return sslCertificateChainFile_; }
    +  const std::string& sslPrivateKeyFile() const { return sslPrivateKeyFile_; }
    +  const std::string& sslTmpDHFile() const { return sslTmpDHFile_; }
    +
    +  const std::string& sessionIdPrefix() const { return sessionIdPrefix_; }
    +  const std::string& accessLog() const { return accessLog_; }
    +
    +  ::int64_t maxMemoryRequestSize() const { return maxMemoryRequestSize_; }
    +
    +  Wt::WLogEntry log(const std::string& type) const;
    +
    +private:
    +  Wt::WLogger& logger_;
    +  bool silent_;
    +
    +  int threads_;
    +  std::string docRoot_;
    +  std::string errRoot_;
    +  std::string deployPath_;
    +  std::string pidPath_;
    +  std::string serverName_;
    +  bool compression_;
    +  bool gdb_;
    +  std::string configPath_;
    +
    +  std::string httpAddress_;
    +  std::string httpPort_;
    +
    +  std::string httpsAddress_;
    +  std::string httpsPort_;
    +  std::string sslCertificateChainFile_;
    +  std::string sslPrivateKeyFile_;
    +  std::string sslTmpDHFile_;
    +
    +  std::string sessionIdPrefix_;
    +  std::string accessLog_;
    +
    +  ::int64_t maxMemoryRequestSize_;
    +
    +  static Configuration *instance_;
    +
    +  void createOptions(po::options_description& options);
    +  void readOptions(const po::variables_map& vm);
    +
    +  void checkPath(const boost::program_options::variables_map& vm, std::string varName,
    +		 std::string varDescription, std::string& result,
    +		 int options);
    +
    +  enum PathOptions { RegularFile = 0x1,
    +		     Directory = 0x2,
    +		     Private = 0x4 };
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_CONFIGURATION_HPP
    diff --git a/wt-3.1.7a/src/http/Connection.C b/wt-3.1.7a/src/http/Connection.C
    new file mode 100644
    index 0000000..b340671
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Connection.C
    @@ -0,0 +1,255 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +// 
    +// connection.cpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include <vector>
    +#include <boost/bind.hpp>
    +
    +#include "Connection.h"
    +#include "ConnectionManager.h"
    +#include "RequestHandler.h"
    +#include "StockReply.h"
    +
    +//#define DEBUG
    +
    +namespace http {
    +namespace server {
    +
    +static const int CONNECTION_TIMEOUT = 120; // 2 minutes
    +static const int KEEPALIVE_TIMEOUT  = 10;  // 10 seconds
    +
    +Connection::Connection(asio::io_service& io_service, Server *server,
    +    ConnectionManager& manager, RequestHandler& handler)
    +  : ConnectionManager_(manager),
    +    request_handler_(handler),
    +    timer_(io_service),
    +    request_parser_(server),
    +    server_(server)
    +{ }
    +
    +Connection::~Connection()
    +{ }
    +
    +void Connection::finishReply()
    +{
    +  if (reply_.get())
    +    reply_->setConnection(0);
    +}
    +
    +void Connection::start()
    +{
    +  request_parser_.reset();
    +  request_.reset();
    +  try {
    +    request_.remoteIP = socket().remote_endpoint().address().to_string();
    +  } catch (std::exception& e) {
    +    std::cerr << "remote_endpoint() threw: " << e.what() << std::endl;
    +  }
    +
    +  socket().set_option(asio::ip::tcp::no_delay(true));
    +
    +  startAsyncReadRequest(buffer_, CONNECTION_TIMEOUT);
    +}
    +
    +void Connection::setTimeout(int seconds)
    +{
    +  timer_.expires_from_now(boost::posix_time::seconds(seconds));
    +  timer_.async_wait(boost::bind(&Connection::timeout, shared_from_this(),
    +  				asio::placeholders::error));  
    +}
    +
    +void Connection::cancelTimer()
    +{
    +  timer_.cancel();
    +}
    +
    +void Connection::timeout(const asio_error_code& e)
    +{
    +  if (e != asio::error::operation_aborted) {
    +    asio_error_code ignored_ec;
    +    socket().shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
    +  }
    +}
    +
    +void Connection::handleReadRequest0()
    +{
    +#ifdef DEBUG
    +    std::cerr << "Incoming request: "
    +	    << socket().remote_endpoint().port() << ": "
    +	      << std::string(remaining_,
    +			     std::min(buffer_.data()
    +				      - remaining_ + buffer_size_,
    +				      (long unsigned)150)) << std::endl;
    +#endif // DEBUG
    +
    +  boost::tribool result;
    +  boost::tie(result, remaining_)
    +    = request_parser_.parse(request_,
    +			    remaining_, buffer_.data() + buffer_size_);
    +
    +  if (result) {
    +    Reply::status_type status = request_parser_.validate(request_);
    +    if (status >= 300)
    +      sendStockReply(status);
    +    else {
    +      if (request_.isWebSocketRequest())
    +	request_.urlScheme = "ws" + urlScheme().substr(4);
    +      else
    +	request_.urlScheme = urlScheme();
    +
    +      request_.port = socket().local_endpoint().port();
    +      reply_ = request_handler_.handleRequest(request_);
    +      reply_->setConnection(this);
    +      moreDataToSend_ = true;
    +
    +      handleReadBody();
    +    }
    +  } else if (!result) {
    +    sendStockReply(StockReply::bad_request);
    +  } else {
    +    startAsyncReadRequest(buffer_, 
    +			  request_parser_.initialState()
    +			  ? KEEPALIVE_TIMEOUT 
    +			  : CONNECTION_TIMEOUT);
    +  }
    +}
    +
    +void Connection::sendStockReply(StockReply::status_type status)
    +{
    +  if (reply_)
    +    reply_->release();
    +  reply_.reset(new StockReply(request_, status, "",
    +			      request_handler_.getErrorRoot()));
    +
    +  reply_->setConnection(this);
    +  reply_->setCloseConnection();
    +  moreDataToSend_ = true;
    +
    +  startWriteResponse();
    +}
    +
    +void Connection::handleReadRequest(const asio_error_code& e,
    +				   std::size_t bytes_transferred)
    +{
    +  cancelTimer();
    +
    +  if (!e) {
    +    remaining_ = buffer_.data();
    +    buffer_size_ = bytes_transferred;
    +    handleReadRequest0();
    +  } else if (e != asio::error::operation_aborted
    +	     && e != asio::error::bad_descriptor) {
    +    handleError(e);
    +  }
    +}
    +
    +void Connection::handleError(const asio_error_code& e)
    +{
    +  if (reply_)
    +    reply_->release();
    +  // std::cerr << "asio error: " << this << " " << e.message() << std::endl;
    +  ConnectionManager_.stop(shared_from_this());
    +}
    +
    +void Connection::handleReadBody()
    +{
    +  bool result = request_parser_
    +    .parseBody(request_, reply_, remaining_, buffer_.data() + buffer_size_);
    +
    +  if (!result)
    +    startAsyncReadBody(buffer_, CONNECTION_TIMEOUT);
    +}
    +
    +bool Connection::readAvailable()
    +{
    +  return (remaining_ < buffer_.data() + buffer_size_) || socket().available();
    +}
    +
    +void Connection::handleReadBody(const asio_error_code& e,
    +				std::size_t bytes_transferred)
    +{
    +  cancelTimer();
    +
    +  if (!e) {
    +    remaining_ = buffer_.data();
    +    buffer_size_ = bytes_transferred;
    +    handleReadBody();
    +  } else if (e != asio::error::operation_aborted
    +	     && e != asio::error::bad_descriptor) {
    +    handleError(e);
    +  }
    +}
    +
    +void Connection::startWriteResponse()
    +{
    +  std::vector<asio::const_buffer> buffers;
    +  moreDataToSend_ = !reply_->nextBuffers(buffers);
    +
    +#ifdef DEBUG
    +  std::cerr << "Sending" << std::endl;
    +  for (unsigned i = 0; i < buffers.size(); ++i) {
    +    char *data = (char *)asio::detail::buffer_cast_helper(buffers[i]);
    +    int size = asio::buffer_size(buffers[i]);
    +
    +    for (int j = 0; j < size; ++j)
    +      std::cerr << data[j];
    +  }
    +#endif
    +
    +  if (!buffers.empty()) {
    +    startAsyncWriteResponse(buffers, CONNECTION_TIMEOUT);
    +  } else {
    +    cancelTimer();
    +    handleWriteResponse();
    +  }
    +}
    +
    +void Connection::handleWriteResponse()
    +{
    +  if (moreDataToSend_) {
    +    startWriteResponse();
    +  } else {
    +    if (reply_->waitMoreData()) {
    +      /*
    +       * Keep connection open and wait for more data.
    +       */
    +    } else {
    +      reply_->logReply(request_handler_.logger());
    +
    +      if (reply_->closeConnection()) {
    +	ConnectionManager_.stop(shared_from_this());
    +      } else {
    +	request_parser_.reset();
    +	request_.reset();
    +	reply_.reset();
    +	handleReadRequest0();
    +      }
    +    }
    +  }
    +}
    +
    +void Connection::handleWriteResponse(const asio_error_code& e)
    +{
    +  cancelTimer();
    +
    +  if (e != asio::error::operation_aborted) {
    +    if (e) {
    +      handleError(e);
    +    }
    +    handleWriteResponse();
    +  }
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/Connection.h b/wt-3.1.7a/src/http/Connection.h
    new file mode 100644
    index 0000000..568c933
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Connection.h
    @@ -0,0 +1,144 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// connection.hpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_CONNECTION_HPP
    +#define HTTP_CONNECTION_HPP
    +
    +#include <boost/asio.hpp>
    +namespace asio = boost::asio;
    +typedef boost::system::error_code asio_error_code;
    +typedef boost::system::system_error asio_system_error;
    +
    +#include <boost/array.hpp>
    +#include <boost/noncopyable.hpp>
    +#include <boost/shared_ptr.hpp>
    +#include <boost/enable_shared_from_this.hpp>
    +
    +#include "Buffer.h"
    +#include "Reply.h"
    +#include "Request.h"
    +#include "RequestHandler.h"
    +#include "RequestParser.h"
    +
    +namespace http {
    +namespace server {
    +
    +class ConnectionManager;
    +class Server;
    +
    +/// Represents a single connection from a client.
    +class Connection
    +  : public boost::enable_shared_from_this<Connection>,
    +    private boost::noncopyable
    +{
    +public:
    +  /// Construct a connection with the given io_service.
    +  explicit Connection(asio::io_service& io_service, Server *server,
    +      ConnectionManager& manager, RequestHandler& handler);
    +
    +  /// Get the socket associated with the connection.
    +  virtual asio::ip::tcp::socket& socket() = 0;
    +
    +  /// Start the first asynchronous operation for the connection.
    +  virtual void start();
    +
    +  /// Stop all asynchronous operations associated with the connection.
    +  virtual void stop() = 0;
    +
    +  /// Like CGI's Url scheme: http or https
    +  virtual std::string urlScheme() = 0;
    +
    +  virtual ~Connection();
    +
    +  Server *server() const { return server_; }
    +
    +public: // huh?
    +  void handleWriteResponse(const asio_error_code& e);
    +  void handleWriteResponse();
    +  void startWriteResponse();
    +  void handleReadRequest(const asio_error_code& e,
    +			 std::size_t bytes_transferred);
    +  /// Process read buffer, reading request.
    +  void handleReadRequest0();
    +  void handleReadBody(const asio_error_code& e,
    +		      std::size_t bytes_transferred);
    +  void handleReadBody();
    +  bool readAvailable();
    +
    +protected:
    +  void setTimeout(int seconds);
    +
    +  /// The manager for this connection.
    +  ConnectionManager& ConnectionManager_;
    +
    +  void finishReply();
    +
    +private:
    +  /*
    +   * Asynchronoulsy reading a request
    +   */
    +  /// Start reading request.
    +  virtual void startAsyncReadRequest(Buffer& buffer, int timeout) = 0;
    +
    +  /*
    +   * Asynchronoulsy reading a request body
    +   */
    +  virtual void startAsyncReadBody(Buffer& buffer, int timeout) = 0;
    +  void handleError(const asio_error_code& e);
    +  void sendStockReply(Reply::status_type code);
    +
    +  /*
    +   * Asynchronoulsy writing a response
    +   */
    +  virtual void startAsyncWriteResponse
    +      (const std::vector<asio::const_buffer>& buffers, int timeout) = 0;
    +
    +  /// The handler used to process the incoming request.
    +  RequestHandler& request_handler_;
    +
    +  void cancelTimer();
    +  void timeout(const asio_error_code& e);
    +
    +  /// Timer for reading data.
    +  asio::deadline_timer timer_;
    +
    +  /// Current buffer data, from last operation.
    +  Buffer buffer_;
    +  std::size_t buffer_size_;
    +  Buffer::const_iterator remaining_;
    +
    +  /// The incoming request.
    +  Request request_;
    +
    +  /// The parser for the incoming request.
    +  RequestParser request_parser_;
    +
    +  /// The reply to be sent back to the client.
    +  ReplyPtr reply_;
    +
    +  /// The reply is complete.
    +  bool moreDataToSend_;
    +
    +  /// The server that owns this connection
    +  Server *server_;
    +};
    +
    +typedef boost::shared_ptr<Connection> ConnectionPtr;
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_CONNECTION_HPP
    diff --git a/wt-3.1.7a/src/http/ConnectionManager.C b/wt-3.1.7a/src/http/ConnectionManager.C
    new file mode 100644
    index 0000000..572ca1d
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/ConnectionManager.C
    @@ -0,0 +1,79 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// connection_manager.cpp
    +// ~~~~~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "ConnectionManager.h"
    +
    +#include <algorithm>
    +#include <boost/bind.hpp>
    +
    +namespace http {
    +namespace server {
    +
    +void ConnectionManager::start(ConnectionPtr c)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  connections_.insert(c);
    +#ifdef WT_THREADED
    +  lock.unlock();
    +#endif // WT_THREADED
    +
    +  c->start();
    +}
    +
    +void ConnectionManager::stop(ConnectionPtr c)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  std::set<ConnectionPtr>::iterator i = connections_.find(c);
    +  if(i != connections_.end()) {
    +    connections_.erase(i);
    +  } else {
    +#ifndef WIN32
    +    /*
    +     * Error you may get when multiple transmitMore() were outstanding
    +     * during server push, and the last one indicated that the connection
    +     * needed to be closed: as a consequence they will all try to close
    +     * the connection.
    +     */
    +    std::cerr << "ConnectionManager::stop(): oops - stopping again?"
    +	      << std::endl;
    +    return;
    +#endif // WIN32
    +  }
    +#ifdef WT_THREADED
    +  lock.unlock();
    +#endif // WT_THREADED
    +
    +  /*
    +   * Note: access to the connection's reply ptr is not thread-safe in
    +   * this way (FIXME).
    +   */
    +  c->stop();
    +}
    +
    +void ConnectionManager::stopAll()
    +{
    +  while(connections_.size()) {
    +    stop(*connections_.begin());
    +  }
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/ConnectionManager.h b/wt-3.1.7a/src/http/ConnectionManager.h
    new file mode 100644
    index 0000000..009343a
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/ConnectionManager.h
    @@ -0,0 +1,59 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// connection_manager.hpp
    +// ~~~~~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_CONNECTION_MANAGER_HPP
    +#define HTTP_CONNECTION_MANAGER_HPP
    +
    +#include <set>
    +#include <boost/noncopyable.hpp>
    +#include "Connection.h" // On WIN32, must be before thread stuff
    +#ifdef THREADED
    +#include <boost/thread/mutex.hpp>
    +#endif // WT_THREADED
    +
    +
    +namespace http {
    +namespace server {
    +
    +/// Manages open connections so that they may be cleanly stopped when the server
    +/// needs to shut down.
    +class ConnectionManager
    +  : private boost::noncopyable
    +{
    +public:
    +  /// Add the specified connection to the manager and start it.
    +  void start(ConnectionPtr c);
    +
    +  /// Stop the specified connection.
    +  void stop(ConnectionPtr c);
    +
    +  /// Stop all connections.
    +  void stopAll();
    +
    +private:
    +  /// The managed connections.
    +  std::set<ConnectionPtr> connections_;
    +
    +#ifdef WT_THREADED
    +  /// Mutex to protect access to connections_
    +  boost::mutex mutex_;
    +#endif // WT_THREADED
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_CONNECTION_MANAGER_HPP
    diff --git a/wt-3.1.7a/src/http/HTTPRequest.C b/wt-3.1.7a/src/http/HTTPRequest.C
    new file mode 100644
    index 0000000..e98cc33
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/HTTPRequest.C
    @@ -0,0 +1,146 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "HTTPRequest.h"
    +#include "Configuration.h"
    +#include "WtReply.h"
    +
    +namespace http {
    +namespace server {
    +
    +HTTPRequest::HTTPRequest(WtReplyPtr reply, const Wt::EntryPoint *entryPoint)
    +  : reply_(reply)
    +{
    +  entryPoint_ = entryPoint;
    +}
    +
    +void HTTPRequest::flush(ResponseState state, CallbackFunction callback)
    +{
    +  std::string s = outstream_.str();
    +  outstream_.str("");
    +  reply_->send(s, callback);
    +
    +  if (state == ResponseDone)
    +    delete this; // also deletes the reply if the connection was closed
    +}
    +
    +void HTTPRequest::readWebSocketMessage(CallbackFunction callback)
    +{
    +  reply_->readWebSocketMessage(callback);
    +}
    +
    +bool HTTPRequest::webSocketMessagePending() const
    +{
    +  return reply_->readAvailable();
    +}
    +
    +void HTTPRequest::setStatus(int status)
    +{
    +  reply_->setStatus(status);
    +}
    +
    +void HTTPRequest::setContentLength(::int64_t length)
    +{
    +  reply_->setContentLength(length);
    +}
    +
    +void HTTPRequest::addHeader(const std::string& name, const std::string& value)
    +{
    +  reply_->addHeader(name, value);
    +}
    +
    +void HTTPRequest::setContentType(const std::string& value)
    +{
    +  reply_->setContentType(value);
    +}
    +
    +void HTTPRequest::setRedirect(const std::string& url)
    +{
    +  reply_->setLocation(url);
    +}
    +
    +std::string HTTPRequest::headerValue(const std::string& name) const
    +{
    +  Request::HeaderMap::const_iterator
    +    i = reply_->request().headerMap.find(name);
    +  if (i != reply_->request().headerMap.end())
    +    return i->second;
    +  else
    +    return std::string();
    +}
    +
    +std::string HTTPRequest::envValue(const std::string& name) const
    +{
    +  if (name == "CONTENT_TYPE") {
    +    return headerValue("Content-Type");
    +  } else if (name == "CONTENT_LENGTH") {
    +    return headerValue("Content-Length");
    +  } else if (name == "SERVER_SIGNATURE") {
    +    return "<address>Wt httpd Server ("
    +      + envValue("SERVER_SOFTWARE")
    +      + ")</address>";
    +  } else if (name == "SERVER_SOFTWARE") {
    +    return "Wthttpd/"
    +      + boost::lexical_cast<std::string>(WT_SERIES) + '.'
    +      + boost::lexical_cast<std::string>(WT_MAJOR) + '.'
    +      + boost::lexical_cast<std::string>(WT_MINOR);
    +  } else if (name == "SERVER_ADMIN") {
    +    return "webmaster@localhost"; // FIXME
    +  } else if (name == "REMOTE_ADDR") {
    +    return remoteAddr();
    +  } else
    +    return std::string();
    +}
    +
    +std::string HTTPRequest::serverName() const
    +{
    +  return Configuration::instance().serverName();
    +}
    +
    +std::string HTTPRequest::serverPort() const
    +{
    +  return boost::lexical_cast<std::string>(reply_->request().port);
    +}
    +
    +std::string HTTPRequest::scriptName() const
    +{
    +  return reply_->request().request_path;
    +}
    +
    +std::string HTTPRequest::requestMethod() const
    +{
    +  return reply_->request().method;
    +}
    +
    +std::string HTTPRequest::queryString() const
    +{
    +  return reply_->request().request_query;
    +}
    +
    +std::string HTTPRequest::pathInfo() const
    +{
    +  return reply_->request().request_extra_path;
    +}
    +
    +std::string HTTPRequest::remoteAddr() const
    +{
    +  return reply_->request().remoteIP;
    +}
    +
    +std::string HTTPRequest::urlScheme() const
    +{
    +  return reply_->urlScheme();
    +}
    +
    +bool HTTPRequest::isSynchronous() const
    +{
    +  return false;
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/HTTPRequest.h b/wt-3.1.7a/src/http/HTTPRequest.h
    new file mode 100644
    index 0000000..d779b3e
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/HTTPRequest.h
    @@ -0,0 +1,58 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_HTTP_REQUEST_H_
    +#define HTTP_HTTP_REQUEST_H_
    +
    +#include <sstream>
    +
    +#include "WebRequest.h"
    +#include "WtReply.h"
    +
    +namespace http {
    +namespace server {
    +
    +class HTTPRequest : public Wt::WebRequest
    +{
    +public:
    +  HTTPRequest(WtReplyPtr wtReply, const Wt::EntryPoint *entryPoint);
    +
    +  virtual void flush(ResponseState state, CallbackFunction callback);
    +  virtual void readWebSocketMessage(CallbackFunction callback);
    +  virtual bool webSocketMessagePending() const;
    +
    +  virtual std::istream& in() { return reply_->cin(); }
    +  virtual std::ostream& out() { return outstream_; }
    +  virtual std::ostream& err() { return std::cerr; }
    +
    +  virtual void setStatus(int status);
    +  virtual void setContentLength(::int64_t length);
    +
    +  virtual void addHeader(const std::string& name, const std::string& value);
    +  virtual void setContentType(const std::string& value);
    +  virtual void setRedirect(const std::string& url);
    +
    +  virtual std::string envValue(const std::string& name) const;
    +  virtual std::string headerValue(const std::string& name) const;
    +  virtual std::string serverName() const;
    +  virtual std::string serverPort() const;
    +  virtual std::string scriptName() const;
    +  virtual std::string requestMethod() const;
    +  virtual std::string queryString() const;
    +  virtual std::string pathInfo() const;
    +  virtual std::string remoteAddr() const;
    +  virtual std::string urlScheme() const;
    +  virtual bool isSynchronous() const;
    +
    +private:
    +  WtReplyPtr reply_;
    +  std::stringstream outstream_;
    +};
    +
    +}
    +}
    +
    +#endif // HTTP_HTTP_REQUEST_H_
    diff --git a/wt-3.1.7a/src/http/HTTPStream.C b/wt-3.1.7a/src/http/HTTPStream.C
    new file mode 100644
    index 0000000..8c44053
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/HTTPStream.C
    @@ -0,0 +1,26 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <assert.h>
    +
    +#include "Wt/WSocketNotifier"
    +
    +#include "HTTPStream.h"
    +#include "Server.h"
    +
    +namespace Wt {
    +
    +HTTPStream::HTTPStream()
    +  : WebStream(true)
    +{ }
    +
    +WebRequest *HTTPStream::getNextRequest(int timeoutsec)
    +{
    +  assert(false);
    +  return 0;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/http/HTTPStream.h b/wt-3.1.7a/src/http/HTTPStream.h
    new file mode 100644
    index 0000000..78be4f8
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/HTTPStream.h
    @@ -0,0 +1,26 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef HTTP_STREAM_H_
    +#define HTTP_STREAM_H_
    +
    +#include "WebStream.h"
    +#include "WebRequest.h"
    +
    +namespace Wt {
    +
    +class HTTPStream : public WebStream
    +{
    +public:
    +  HTTPStream();
    +
    +  virtual WebRequest *getNextRequest(int timeoutsec);
    +
    +};
    +
    +}
    +
    +#endif // HTTP_STREAM_H_
    diff --git a/wt-3.1.7a/src/http/LICENSE_1_0.txt b/wt-3.1.7a/src/http/LICENSE_1_0.txt
    new file mode 100644
    index 0000000..36b7cd9
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/LICENSE_1_0.txt
    @@ -0,0 +1,23 @@
    +Boost Software License - Version 1.0 - August 17th, 2003
    +
    +Permission is hereby granted, free of charge, to any person or organization
    +obtaining a copy of the software and accompanying documentation covered by
    +this license (the "Software") to use, reproduce, display, distribute,
    +execute, and transmit the Software, and to prepare derivative works of the
    +Software, and to permit third-parties to whom the Software is furnished to
    +do so, all subject to the following:
    +
    +The copyright notices in the Software and this entire statement, including
    +the above license grant, this restriction and the following disclaimer,
    +must be included in all copies of the Software, in whole or in part, and
    +all derivative works of the Software, unless such copies or derivative
    +works are solely in the form of machine-executable object code generated by
    +a source language processor.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    +DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/src/http/MimeTypes.C b/wt-3.1.7a/src/http/MimeTypes.C
    new file mode 100644
    index 0000000..fd39e28
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/MimeTypes.C
    @@ -0,0 +1,56 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// mime_types.cpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "MimeTypes.h"
    +
    +namespace http {
    +namespace server {
    +namespace mime_types {
    +
    +struct mapping
    +{
    +  const char *extension;
    +  const char * mime_type;
    +} mappings[] =
    +{
    +  { "css", "text/css" },
    +  { "gif", "image/gif" },
    +  { "htm", "text/html" },
    +  { "html", "text/html" },
    +  { "jpg", "image/jpeg" },
    +  { "png", "image/png" },
    +  { "js", "text/javascript" },
    +  { "oga", "audio/ogg" },
    +  { "ogg", "audio/ogg" },
    +  { "ogv", "video/ogg" },
    +  { "mp4", "video/mp4" },
    +  { "mp3", "audio/mp3" },
    +  { 0, 0 } // Marks end of list.
    +};
    +
    +const char *extensionToType(const std::string& extension)
    +{
    +  for (mapping* m = mappings; m->extension; ++m) {
    +    if (m->extension == extension) {
    +      return m->mime_type;
    +    }
    +  }
    +
    +  return "application/octet-stream";
    +}
    +
    +} // namespace mime_types
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/MimeTypes.h b/wt-3.1.7a/src/http/MimeTypes.h
    new file mode 100644
    index 0000000..3682f14
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/MimeTypes.h
    @@ -0,0 +1,33 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// mime_types.hpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_MIME_TYPES_HPP
    +#define HTTP_MIME_TYPES_HPP
    +
    +#include <string>
    +
    +namespace http {
    +namespace server {
    +namespace mime_types {
    +
    +/// Convert a file extension into a MIME type.
    +const char *extensionToType(const std::string& extension);
    +
    +} // namespace mime_types
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_MIME_TYPES_HPP
    diff --git a/wt-3.1.7a/src/http/Reply.C b/wt-3.1.7a/src/http/Reply.C
    new file mode 100644
    index 0000000..ab77bfc
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Reply.C
    @@ -0,0 +1,575 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// reply.cpp
    +// ~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "Configuration.h"
    +#include "Connection.h"
    +#include "Reply.h"
    +#include "Request.h"
    +
    +#include <time.h>
    +#include <string>
    +#include <boost/lexical_cast.hpp>
    +
    +#ifdef WIN32
    +#ifdef WT_THREADED
    +#include <boost/thread/mutex.hpp>
    +#endif
    +#endif
    +
    +#ifdef WIN32
    +static struct tm* gmtime_r(const time_t* t, struct tm* r)
    +{
    +  // gmtime is threadsafe in windows because it uses TLS
    +  struct tm *theTm = gmtime(t);
    +  if (theTm) {
    +    *r = *theTm;
    +    return r;
    +  } else {
    +    return 0;
    +  }
    +}
    +#else
    +extern struct tm* gmtime_r(const time_t* t, struct tm* r);
    +#endif
    +
    +namespace http {
    +namespace server {
    +
    +namespace status_strings {
    +
    +const std::string switching_protocols =
    +  "101 Switching Protocol\r\n";
    +const std::string ok =
    +  "200 OK\r\n";
    +const std::string created =
    +  "201 Created\r\n";
    +const std::string accepted =
    +  "202 Accepted\r\n";
    +const std::string no_content =
    +  "204 No Content\r\n";
    +const std::string partial_content =
    +  "206 Partial Content\r\n";
    +const std::string multiple_choices =
    +  "300 Multiple Choices\r\n";
    +const std::string moved_permanently =
    +  "301 Moved Permanently\r\n";
    +const std::string found =
    +  "302 Found\r\n";
    +const std::string see_other =
    +  "303 See Other\r\n";
    +const std::string not_modified =
    +  "304 Not Modified\r\n";
    +const std::string moved_temporarily =
    +  "307 Moved Temporarily\r\n";
    +const std::string bad_request =
    +  "400 Bad Request\r\n";
    +const std::string unauthorized =
    +  "401 Unauthorized\r\n";
    +const std::string forbidden =
    +  "403 Forbidden\r\n";
    +const std::string not_found =
    +  "404 Not Found\r\n";
    +const std::string request_entity_too_large =
    +  "413 Request Entity too Large\r\n";
    +const std::string requested_range_not_satisfiable =
    +  "416 Requested Range Not Satisfiable\r\n";
    +const std::string internal_server_error =
    +  "500 Internal Server Error\r\n";
    +const std::string not_implemented =
    +  "501 Not Implemented\r\n";
    +const std::string bad_gateway =
    +  "502 Bad Gateway\r\n";
    +const std::string service_unavailable =
    +  "503 Service Unavailable\r\n";
    +
    +const std::string& toText(Reply::status_type status)
    +{
    +  switch (status)
    +  {
    +  case Reply::switching_protocols:
    +    return switching_protocols;
    +  case Reply::ok:
    +    return ok;
    +  case Reply::created:
    +    return created;
    +  case Reply::accepted:
    +    return accepted;
    +  case Reply::no_content:
    +    return no_content;
    +  case Reply::partial_content:
    +    return partial_content;
    +  case Reply::multiple_choices:
    +    return multiple_choices;
    +  case Reply::found:
    +    return found;
    +  case Reply::moved_permanently:
    +    return moved_permanently;
    +  case Reply::see_other:
    +    return see_other;
    +  case Reply::not_modified:
    +    return not_modified;
    +  case Reply::moved_temporarily:
    +    return moved_temporarily;
    +  case Reply::bad_request:
    +    return bad_request;
    +  case Reply::unauthorized:
    +    return unauthorized;
    +  case Reply::forbidden:
    +    return forbidden;
    +  case Reply::not_found:
    +    return not_found;
    +  case Reply::request_entity_too_large:
    +    return request_entity_too_large;
    +  case Reply::requested_range_not_satisfiable:
    +    return requested_range_not_satisfiable;
    +  case Reply::internal_server_error:
    +    return internal_server_error;
    +  case Reply::not_implemented:
    +    return not_implemented;
    +  case Reply::bad_gateway:
    +    return bad_gateway;
    +  case Reply::service_unavailable:
    +    return service_unavailable;
    +  default:
    +    return internal_server_error;
    +  }
    +}
    +
    +} // namespace status_strings
    +
    +namespace misc_strings {
    +
    +const char name_value_separator[] = { ':', ' ' };
    +const char crlf[] = { '\r', '\n' };
    +
    +} // namespace misc_strings
    +
    +Reply::Reply(const Request& request)
    +  : request_(request),
    +    emptyBuffer((void *)0, 0),
    +    connection_(0),
    +    transmitting_(false),
    +    closeConnection_(false),
    +    chunkedEncoding_(false),
    +    gzipEncoding_(false),
    +    waitMoreData_(false),
    +    finishing_(false),
    +    contentSent_(0),
    +    contentOriginalSize_(0)
    +{
    +#ifndef WIN32
    +  gettimeofday(&startTime_, 0);
    +#endif
    +}
    +
    +Reply::~Reply()
    +{ }
    +
    +void Reply::release()
    +{ }
    +
    +std::string Reply::location()
    +{
    +  return std::string();
    +}
    +
    +void Reply::setWaitMoreData(bool how)
    +{
    +  waitMoreData_ = how;
    +}
    +
    +void Reply::addHeader(const std::string name, const std::string value)
    +{
    +  headers_.push_back(std::make_pair(name, value));
    +}
    +
    +bool Reply::nextBuffers(std::vector<asio::const_buffer>& result)
    +{
    +  bufs_.clear();
    +
    +  if (relay_.get())
    +    return finishing_ = relay_->nextBuffers(result);
    +  else {
    +    if (!transmitting_) {
    +      transmitting_ = true;
    +      bool http10 = (request_.http_version_major == 1)
    +	&& (request_.http_version_minor == 0);
    +
    +      closeConnection_
    +	= closeConnection_ || request_.closeConnection();
    +
    +      /*
    +       * Status line.
    +       */
    +      result.push_back
    +	(buf("HTTP/"
    +	     + boost::lexical_cast<std::string>(request_.http_version_major)
    +	     + "."
    +	     + boost::lexical_cast<std::string>(request_.http_version_minor)
    +	     + " "));
    +
    +      result.push_back(buf(status_strings::toText(responseStatus())));
    +
    +      if (!http10 && responseStatus() != switching_protocols) {
    +	/*
    +	 * Date header (current time)
    +	 */
    +	result.push_back(buf(std::string("Date: ") + httpDate(time(0))));
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +      }
    +
    +      /*
    +       * Content type or location
    +       */
    +
    +      std::string ct;
    +      if (responseStatus() >= 300 && responseStatus() < 400) {
    +	result.push_back(buf(std::string("Location: ") + location()));
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +      } else if (responseStatus() != not_modified
    +		 && responseStatus() != switching_protocols) {
    +	ct = contentType();
    +	result.push_back(buf("Content-Type: " + ct));
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +      }
    +
    +      /*
    +       * Other provided headers
    +       */
    +      bool haveContentEncoding = false;
    +      for (unsigned i = 0; i < headers_.size(); ++i) {
    +	if (headers_[i].first == "Content-Encoding")
    +	  haveContentEncoding = true;
    +	result.push_back(asio::buffer(headers_[i].first));
    +	result.push_back(asio::buffer(misc_strings::name_value_separator));
    +	result.push_back(asio::buffer(headers_[i].second));
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +      }
    +
    +      /*
    +       * Connection
    +       */
    +      //closeConnection_ = true;
    +      if (closeConnection_) {
    +	result.push_back(buf("Connection: close"));
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +      } else {
    +	if (http10) {
    +	  result.push_back(buf("Connection: keep-alive"));
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +	}
    +      }
    +
    +      if (responseStatus() != not_modified) {
    +	::int64_t cl = contentLength();
    +
    +#ifdef WTHTTP_WITH_ZLIB
    +	/*
    +	 * Content-Encoding: gzip ?
    +	 */
    +	gzipEncoding_ = 
    +	     !haveContentEncoding
    +	  && Configuration::instance().compression()
    +	  && request_.acceptGzipEncoding()
    +	  && (cl == -1)
    +	  && (ct.find("text/html") != std::string::npos
    +	      || ct.find("text/plain") != std::string::npos
    +	      || ct.find("text/javascript") != std::string::npos
    +	      || ct.find("text/css") != std::string::npos
    +	      || ct.find("application/xhtml+xml")!= std::string::npos
    +	      || ct.find("image/svg+xml")!= std::string::npos
    +	      || ct.find("text/x-json") != std::string::npos);
    +
    +	if (gzipEncoding_) {
    +	  result.push_back(buf("Content-Encoding: gzip"));
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +	  
    +	  initGzip();
    +	}
    +#endif
    +
    +	if ((cl == -1) && http10 && !closeConnection_) {
    +	  /*
    +	   * We need to determine the length of the response...
    +	   */
    +	  contentSent_ = 0;
    +	  std::vector<asio::const_buffer> contentBuffers;
    +	  for (;;) {
    +	    int originalSize;
    +	    int encodedSize;
    +	    encodeNextContentBuffer(contentBuffers, originalSize, encodedSize);
    +
    +	    contentSent_ += encodedSize;
    +	    contentOriginalSize_ += originalSize;
    +
    +	    if (originalSize == 0)
    +	      break;
    +	  }
    +
    +	  result.push_back 
    +	    (buf("Content-Length: "
    +		 + boost::lexical_cast<std::string>(contentSent_)));
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +      
    +	  result.insert(result.end(),
    +			contentBuffers.begin(), contentBuffers.end());
    +
    +	  return finishing_ = true;
    +	} else {
    +	  /*
    +	   * We do not need to determine the length of the response...
    +	   * Transmit only header first.
    +	   */
    +	  if (cl != -1) {
    +	    result.push_back 
    +	      (buf("Content-Length: " + boost::lexical_cast<std::string>(cl)));
    +	    result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	    chunkedEncoding_ = false;
    +	  } else
    +	    if (closeConnection_)
    +	      chunkedEncoding_ = false; // should be false
    +	    else
    +	      if (!http10 && responseStatus() != switching_protocols)
    +		chunkedEncoding_ = true;
    +
    +	  if (chunkedEncoding_) {
    +	    result.push_back(buf("Transfer-Encoding: chunked"));
    +	    result.push_back(asio::buffer(misc_strings::crlf));
    +	  }
    +
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	  return finishing_ = false;
    +	}
    +      } else { // responseStatus() == not-modified
    +	result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	return finishing_ = true;
    +      }
    +    } else { // transmitting (data)
    +      std::vector<asio::const_buffer> contentBuffers;
    +      int originalSize;
    +      int encodedSize;
    +
    +      encodeNextContentBuffer(contentBuffers, originalSize, encodedSize);
    +
    +      bool lastData = originalSize == 0;
    +
    +      contentSent_ += encodedSize;
    +      contentOriginalSize_ += originalSize;
    +
    +      if (chunkedEncoding_) {
    +	if (encodedSize || lastData) {
    +	  std::ostringstream length;
    +	  length << std::hex << encodedSize;
    +	  result.push_back(buf(length.str()));
    +	  result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	  if (encodedSize) {
    +	    result.insert(result.end(),
    +			  contentBuffers.begin(), contentBuffers.end());
    +	    result.push_back(asio::buffer(misc_strings::crlf));
    +
    +	    if (!originalSize) {
    +	      result.push_back(buf("0"));
    +	      result.push_back(asio::buffer(misc_strings::crlf));
    +	      result.push_back(asio::buffer(misc_strings::crlf));
    +	    }
    +	  } else
    +	    result.push_back(asio::buffer(misc_strings::crlf));
    +	}
    +
    +	return finishing_ = lastData;
    +      } else {
    +	result = contentBuffers;
    +
    +	return finishing_ = lastData;
    +      }
    +    }
    +  }
    +
    +  assert(false);
    +
    +  return false;
    +}
    +
    +void Reply::setConnection(Connection *connection)
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +  connection_ = connection;
    +
    +  if (relay_.get())
    +    relay_->setConnection(connection);
    +
    +  if (connection) {
    +    try {
    +      remoteAddress_
    +	= connection_->socket().remote_endpoint().address().to_string();
    +    } catch (std::exception& e) {
    +      std::cerr << "remote_endpoint() threw: " << e.what() << std::endl;
    +    }
    +    requestMethod_ = request_.method;
    +    requestUri_ = request_.uri;
    +    requestMajor_ = request_.http_version_major;
    +    requestMinor_ = request_.http_version_minor;
    +  }
    +}
    +
    +void Reply::send()
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  if (/* !finishing_ && */ connection_)
    +    connection_->startWriteResponse();
    +}
    +
    +void Reply::setRelay(ReplyPtr reply)
    +{
    +  assert(!transmitting_);
    +
    +  relay_ = reply;
    +  relay_->connection_ = connection_;
    +
    +  relay_->remoteAddress_ = remoteAddress_;
    +  relay_->requestMethod_ = requestMethod_;
    +  relay_->requestUri_ = requestUri_;
    +  relay_->requestMajor_ = requestMajor_;
    +  relay_->requestMinor_ = requestMinor_;
    +}
    +
    +void Reply::logReply(Wt::WLogger& logger)
    +{
    +  if (relay_.get())
    +    return relay_->logReply(logger);
    +
    +  Wt::WLogEntry e = logger.entry();
    +
    +  e << remoteAddress_ << Wt::WLogger::sep
    +    << /* rfc931 << */ Wt::WLogger::sep
    +    << /* authuser << */ Wt::WLogger::sep
    +    << Wt::WLogger::timestamp << Wt::WLogger::sep
    +    << requestMethod_ << ' ' << requestUri_ << " HTTP/"
    +    << requestMajor_ << '.' << requestMinor_ << Wt::WLogger::sep
    +    << responseStatus() << Wt::WLogger::sep
    +    << contentSent_;
    +
    +  /*
    +  if (gzipEncoding_)
    +      std::cerr << " <" << contentOriginalSize_ << ">";
    +  */
    +
    +#if 0
    +#ifndef WIN32
    +    struct timeval endTime;
    +    gettimeofday(&endTime, 0);
    +    
    +    std::cerr << " (" 
    +	      << (endTime.tv_sec - startTime_.tv_sec)*1000
    +                 + (endTime.tv_usec - startTime_.tv_usec)/1000
    +	      << "ms)";
    +#endif
    +#endif
    +}
    +
    +asio::const_buffer Reply::buf(const std::string s)
    +{
    +  bufs_.push_back(s);
    +  return asio::buffer(bufs_.back());
    +}
    +
    +std::string Reply::httpDate(time_t t)
    +{
    +  struct tm td;
    +  gmtime_r(&t, &td);
    +  char buffer[100];
    +  strftime(buffer, 100, "%a, %d %b %Y %H:%M:%S GMT", &td);
    +
    +  return buffer;
    +}
    +
    +#ifdef WTHTTP_WITH_ZLIB
    +void Reply::initGzip()
    +{
    +  gzipStrm_.zalloc = Z_NULL;
    +  gzipStrm_.zfree = Z_NULL;
    +  gzipStrm_.opaque = Z_NULL;
    +  gzipStrm_.next_in = Z_NULL;
    +  int r = 0;
    +  r = deflateInit2(&gzipStrm_, Z_DEFAULT_COMPRESSION,
    +		   Z_DEFLATED, 15+16, 8, Z_DEFAULT_STRATEGY);
    +  assert(r == Z_OK);
    +}
    +#endif
    +
    +void Reply::encodeNextContentBuffer(
    +       std::vector<asio::const_buffer>& result, int& originalSize,
    +       int& encodedSize)
    +{
    +  asio::const_buffer b = nextContentBuffer();
    +  originalSize = buffer_size(b);
    +
    +#ifdef WTHTTP_WITH_ZLIB
    +  if (gzipEncoding_) {
    +    encodedSize = 0;
    +
    +    gzipStrm_.avail_in = originalSize;
    +    gzipStrm_.next_in
    +      = (unsigned char *)asio::detail::buffer_cast_helper(b);
    +
    +    unsigned char out[16*1024];
    +    do {
    +      gzipStrm_.next_out = out;
    +      gzipStrm_.avail_out = sizeof(out);
    +
    +      // do not attempt to flush gzip deflate when we are still expecting data
    +      if (gzipStrm_.avail_in == 0 && originalSize != 0)
    +	return;
    +
    +      int r = 0;
    +      r = deflate(&gzipStrm_, gzipStrm_.avail_in == 0 ? Z_FINISH : Z_NO_FLUSH);
    +
    +      assert(r != Z_STREAM_ERROR);
    +    
    +      unsigned have = sizeof(out) - gzipStrm_.avail_out;
    +
    +      if (have) {
    +	encodedSize += have;
    +	result.push_back(buf(std::string((char *)out, have)));
    +      }
    +    } while (gzipStrm_.avail_out == 0);
    +
    +    if (originalSize == 0)
    +      deflateEnd(&gzipStrm_);
    +
    +  } else {
    +#endif
    +    encodedSize = originalSize;
    +
    +    if (encodedSize)
    +      result.push_back(b);
    +#ifdef WTHTTP_WITH_ZLIB
    +  }
    +#endif
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/Reply.h b/wt-3.1.7a/src/http/Reply.h
    new file mode 100644
    index 0000000..c576986
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Reply.h
    @@ -0,0 +1,170 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// reply.hpp
    +// ~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_REPLY_HPP
    +#define HTTP_REPLY_HPP
    +
    +#include <time.h>
    +
    +#include <list>
    +#include <string>
    +#include <vector>
    +
    +#include <boost/asio.hpp>
    +namespace asio = boost::asio;
    +
    +#ifdef WT_THREADED
    +#include <boost/thread/recursive_mutex.hpp>
    +#endif // WT_THREADED
    +
    +#include <boost/shared_ptr.hpp>
    +#include <boost/enable_shared_from_this.hpp>
    +
    +#include <boost/tuple/tuple.hpp>
    +#ifdef WTHTTP_WITH_ZLIB
    +#include <zlib.h>
    +#endif
    +
    +#include "Wt/WLogger"
    +
    +#include "Buffer.h"
    +#include "WHttpDllDefs.h"
    +#include "Request.h"
    +
    +namespace http {
    +namespace server {
    +
    +class Connection;
    +class Reply;
    +
    +typedef boost::shared_ptr<Reply> ReplyPtr;
    +
    +class WTHTTP_API Reply : public boost::enable_shared_from_this<Reply>
    +{
    +public:
    +  Reply(const Request& request);
    +  virtual ~Reply();
    +
    +  enum status_type
    +  {
    +    switching_protocols = 101,
    +    ok = 200,
    +    created = 201,
    +    accepted = 202,
    +    no_content = 204,
    +    partial_content = 206,
    +    multiple_choices = 300,
    +    moved_permanently = 301,
    +    found = 302,
    +    see_other = 303,
    +    not_modified = 304,
    +    moved_temporarily = 307,
    +    bad_request = 400,
    +    unauthorized = 401,
    +    forbidden = 403,
    +    not_found = 404,
    +    request_entity_too_large = 413,
    +    requested_range_not_satisfiable = 416,
    +    internal_server_error = 500,
    +    not_implemented = 501,
    +    bad_gateway = 502,
    +    service_unavailable = 503
    +  };
    +
    +  virtual void consumeData(Buffer::const_iterator begin,
    +			   Buffer::const_iterator end,
    +			   Request::State state) = 0;
    +
    +  void setConnection(Connection *connection);
    +  bool nextBuffers(std::vector<asio::const_buffer>& result);
    +  bool closeConnection() const { return closeConnection_; }
    +  void setCloseConnection() { closeConnection_ = true; }
    +
    +  void addHeader(const std::string name, const std::string value);
    +
    +  bool waitMoreData() const { return waitMoreData_; }
    +  void setWaitMoreData(bool how);
    +  void send();
    +  virtual void release();
    +
    +  void logReply(Wt::WLogger& logger);
    +
    +  virtual status_type responseStatus() = 0;
    +
    +protected:
    +  const Request& request_;
    +  std::string remoteAddress_;
    +  std::string requestMethod_;
    +  std::string requestUri_;
    +  int requestMajor_, requestMinor_;
    +
    +  virtual std::string contentType() = 0;
    +  virtual std::string location();
    +  virtual ::int64_t contentLength() = 0;
    +
    +  virtual asio::const_buffer nextContentBuffer() = 0;
    +
    +  void setRelay(ReplyPtr reply);
    +
    +  asio::const_buffer emptyBuffer;
    +
    +  static std::string httpDate(time_t t);
    +
    +#ifdef WT_THREADED
    +  boost::recursive_mutex mutex_;
    +#endif // WT_THREADED
    +
    +  Connection *connection() { return connection_; }
    +private:
    +  std::vector<std::pair<std::string, std::string> > headers_;
    +
    +  // protected by replyMutex_
    +  Connection *connection_;
    +
    +#ifndef WIN32
    +  struct timeval startTime_;
    +#endif
    +
    +  bool transmitting_;
    +  bool closeConnection_;
    +  bool chunkedEncoding_;
    +  bool gzipEncoding_;
    +  bool waitMoreData_;
    +  bool finishing_;
    +
    +  ::int64_t contentSent_;
    +  ::int64_t contentOriginalSize_;
    +
    +  ReplyPtr relay_;
    +  std::list<std::string> bufs_;
    +
    +  asio::const_buffer buf(const std::string s);
    +
    +  void encodeNextContentBuffer(std::vector<asio::const_buffer>& result,
    +			       int& originalSize,
    +			       int& encodedSize);
    +#ifdef WTHTTP_WITH_ZLIB
    +  void initGzip();
    +  z_stream gzipStrm_;
    +#endif
    +};
    +
    +typedef boost::shared_ptr<Reply> ReplyPtr;
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_REPLY_HPP
    diff --git a/wt-3.1.7a/src/http/Request.C b/wt-3.1.7a/src/http/Request.C
    new file mode 100644
    index 0000000..879633f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Request.C
    @@ -0,0 +1,95 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#include <ostream>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include "Request.h"
    +
    +namespace http {
    +namespace server {
    +
    +void Request::reset()
    +{
    +  method.clear();
    +  uri.clear();
    +  urlScheme.clear();
    +  headerMap.clear();
    +  headerOrder.clear();
    +  request_path.clear();
    +  request_query.clear();
    +
    +  contentLength = -1;
    +}
    +
    +void Request::transmitHeaders(std::ostream& out) const
    +{
    +  static const char *CRLF = "\r\n";
    +
    +  out << method << " " << uri << " HTTP/"
    +      << http_version_major << "."
    +      << http_version_minor << CRLF;
    +
    +  for (std::size_t i = 0; i < headerOrder.size(); ++i) {
    +    HeaderMap::const_iterator it = headerOrder[i];
    +    out << it->first << ": " << it->second << CRLF;
    +  }
    +}
    +
    +bool Request::isWebSocketRequest() const
    +{
    +  HeaderMap::const_iterator i = headerMap.find("Connection");
    +  if (i != headerMap.end() && boost::iequals(i->second, "Upgrade")) {
    +    HeaderMap::const_iterator j = headerMap.find("Upgrade");
    +    if (j != headerMap.end() && boost::iequals(j->second, "WebSocket"))
    +      return true;
    +  }
    +
    +  return false;
    +}
    +
    +bool Request::closeConnection() const 
    +{
    +  if ((http_version_major == 1)
    +      && (http_version_minor == 0)) {
    +    HeaderMap::const_iterator i = headerMap.find("Connection");
    +
    +    if (i != headerMap.end()) {
    +      if (boost::iequals(i->second, "Keep-Alive"))
    +	return false;
    +    }
    +
    +    return true;
    +  }
    +
    +  if ((http_version_major == 1)
    +      && (http_version_minor == 1)) {
    +    HeaderMap::const_iterator i = headerMap.find("Connection");
    +    
    +    if (i != headerMap.end()) {
    +      if (boost::icontains(i->second, "close"))
    +	return true;
    +    }
    +
    +    return false;
    +  }
    +
    +  return true;
    +}
    +
    +bool Request::acceptGzipEncoding() const
    +{
    +  HeaderMap::const_iterator i = headerMap.find("Accept-Encoding");
    +
    +  if (i != headerMap.end())
    +    return i->second.find("gzip") != std::string::npos;
    +  else
    +    return false;
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/Request.h b/wt-3.1.7a/src/http/Request.h
    new file mode 100644
    index 0000000..714dc6f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Request.h
    @@ -0,0 +1,82 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// request.hpp
    +// ~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_REQUEST_HPP
    +#define HTTP_REQUEST_HPP
    +
    +#include <string>
    +#include <map>
    +#include <vector>
    +#include <boost/cstdint.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +// For ::int64_ and ::uint64_t on Windows only
    +#include "Wt/WDllDefs.h"
    +
    +namespace http {
    +namespace server {
    +
    +/*
    + * boost::is_iless throws bad_cast -- here is my ad hoc version.
    + */
    +struct my_iless
    +{
    +  bool operator()(const std::string& a, const std::string& b) const {
    +#if defined(WIN32) && !defined(__CYGWIN__)
    +    return _stricmp(a.c_str(), b.c_str()) < 0;
    +#else
    +    return strcasecmp(a.c_str(), b.c_str()) < 0;
    +#endif
    +  }
    +};
    +
    +/// A request received from a client.
    +/// A request with a body will have a content-length.
    +class Request
    +{
    +public:
    +  enum State { Partial, Complete, Error };
    +
    +  std::string method;
    +  std::string uri;
    +  std::string urlScheme;
    +  std::string remoteIP;
    +  short port;
    +  int http_version_major;
    +  int http_version_minor;
    +
    +  typedef std::map<std::string, std::string, my_iless> HeaderMap;
    +  HeaderMap headerMap;
    +  std::vector<HeaderMap::iterator> headerOrder;
    +  ::int64_t contentLength;
    +
    +  std::string request_path;
    +  std::string request_query;
    +  std::string request_extra_path;
    +
    +  void reset();
    +
    +  bool closeConnection() const;
    +  bool acceptGzipEncoding() const;
    +  bool isWebSocketRequest() const;
    +
    +  void transmitHeaders(std::ostream& out) const;
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_REQUEST_HPP
    diff --git a/wt-3.1.7a/src/http/RequestHandler.C b/wt-3.1.7a/src/http/RequestHandler.C
    new file mode 100644
    index 0000000..3fc2845
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/RequestHandler.C
    @@ -0,0 +1,176 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// request_handler.cpp
    +// ~~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "RequestHandler.h"
    +
    +#include <fstream>
    +#include <sstream>
    +#include <string>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/filesystem/exception.hpp>
    +
    +#include "Request.h"
    +#include "StaticReply.h"
    +#include "StockReply.h"
    +#include "WtReply.h"
    +
    +namespace http {
    +namespace server {
    +
    +RequestHandler::RequestHandler(const Configuration &config,
    +			       const Wt::EntryPointList& entryPoints,
    +			       Wt::WLogger& logger)
    +  : config_(config),
    +    entryPoints_(entryPoints),
    +    logger_(logger)
    +{ }
    +
    +/*
    + * Determine what to do with the request (based on the header),
    + * and do it and create a Reply object which will do it.
    + */
    +ReplyPtr RequestHandler::handleRequest(Request& req)
    +{
    +  if ((req.method != "GET")
    +      && (req.method != "HEAD")
    +      && (req.method != "POST")
    +      && (req.method != "PUT")
    +      && (req.method != "DELETE"))
    +    return ReplyPtr(new StockReply(req, Reply::not_implemented,
    +				   "", config_.errRoot()));
    +
    +  if ((req.http_version_major != 1)
    +      || (req.http_version_minor != 0 
    +	  && req.http_version_minor != 1))
    +    return ReplyPtr(new StockReply(req, Reply::not_implemented, 
    +				   "", config_.errRoot()));
    +
    +  // Decode url to path.
    +  if (!url_decode(req.uri, req.request_path, req.request_query)) {
    +    return ReplyPtr(new StockReply(req, Reply::bad_request,
    +				   "", config_.errRoot()));
    +  }
    +
    +  std::size_t anchor = req.request_path.find("/#");
    +  if (anchor != std::string::npos) {
    +    // IE6 bug: it sends an anchor at the end of an URL '/' in AJAX requests.
    +    // We should therefore make sure we truncate here the path.
    +    req.request_path.erase(anchor + 1);
    +  }
    +
    +  // Request path must be absolute and not contain "..".
    +  if (req.request_path.empty() || req.request_path[0] != '/'
    +      || req.request_path.find("..") != std::string::npos) {
    +    return ReplyPtr(new StockReply(req, Reply::bad_request,
    +				   "", config_.errRoot()));
    +  }
    +
    +  for (unsigned i = 0; i < entryPoints_.size(); ++i) {
    +    const Wt::EntryPoint& ep = entryPoints_[i];
    +
    +    bool matchesApp = false;
    +
    +    // Check if path matches with the entry point's path (e.g. app.wt)
    +    // we should also match /app.wt/foobar.csv?bla=bo
    +
    +    std::string pathInfo;
    +    unsigned entryPathLength = ep.path().length();
    +
    +    if (boost::starts_with(req.request_path, ep.path())) {
    +      if (req.request_path.length() > entryPathLength) {
    +	char next = req.request_path[entryPathLength];
    +	if (next == '/') {
    +	  pathInfo = req.request_path.substr(entryPathLength);
    +	  matchesApp = true;	  
    +	}
    +      } else
    +	matchesApp = true;
    +    }
    +
    +    if (matchesApp) {
    +      req.request_extra_path = pathInfo;
    +      if (!pathInfo.empty())
    +	req.request_path = ep.path();
    +
    +      return ReplyPtr(new WtReply(req, ep, config_));
    +    }
    +  }
    +
    +  // If path ends in slash (i.e. is a directory) then add "index.html".
    +  if (req.request_path[req.request_path.size() - 1] == '/') {
    +    req.request_path += "index.html";
    +  }
    +
    +  // Determine the file extension.
    +  std::size_t last_slash_pos = req.request_path.find_last_of("/");
    +  std::size_t last_dot_pos = req.request_path.find_last_of(".");
    +  std::string extension;
    +  if (last_dot_pos != std::string::npos && last_dot_pos > last_slash_pos) {
    +    extension = req.request_path.substr(last_dot_pos + 1);
    +  }
    +
    +  std::string full_path = config_.docRoot() + req.request_path;
    +  return ReplyPtr(new StaticReply(full_path, extension,
    +    req, config_.errRoot()));
    +}
    +
    +bool RequestHandler::url_decode(const std::string& in,
    +				std::string& path,
    +				std::string& query)
    +{
    +  std::string *out = &path;
    +
    +  out->clear();
    +  out->reserve(in.size());
    +
    +  for (std::size_t i = 0; i < in.size(); ++i)
    +  {
    +    if (in[i] == '%')
    +    {
    +      if (i + 2 < in.size())
    +      {
    +        int value;
    +        std::istringstream is(in.substr(i + 1, 2));
    +        if (is >> std::hex >> value)
    +        {
    +          (*out) += static_cast<char>(value);
    +	  i += 2;
    +        }
    +        else
    +        {
    +          return false;
    +        }
    +      }
    +      else
    +      {
    +        return false;
    +      }
    +    }
    +    else if ((in[i] == '?') && (out == &path))
    +    {
    +      query = in.substr(i + 1);
    +      return true;
    +    }
    +    else
    +    {
    +      (*out) += in[i];
    +    }
    +  }
    +  return true;
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/RequestHandler.h b/wt-3.1.7a/src/http/RequestHandler.h
    new file mode 100644
    index 0000000..6b82145
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/RequestHandler.h
    @@ -0,0 +1,72 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// request_handler.hpp
    +// ~~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_REQUEST_HANDLER_HPP
    +#define HTTP_REQUEST_HANDLER_HPP
    +
    +#include <string>
    +#include <boost/noncopyable.hpp>
    +
    +#include "Wt/WLogger"
    +
    +#include "Configuration.h"
    +#include "Reply.h"
    +#include "../web/Configuration.h"
    +
    +namespace http {
    +namespace server {
    +
    +class Configuration;
    +class Request;
    +
    +/// The common handler for all incoming requests.
    +class RequestHandler
    +  : private boost::noncopyable
    +{
    +public:
    +  /// Construct with a directory containing files to be served.
    +  explicit RequestHandler(const Configuration &config,
    +			  const Wt::EntryPointList& entryPoints,
    +			  Wt::WLogger& logger);
    +
    +  /// Handle a request and produce a reply.
    +  ReplyPtr handleRequest(Request& req);
    +
    +  const std::string getErrorRoot() const
    +  {
    +    return config_.errRoot();
    +  }
    +
    +  Wt::WLogger& logger() const { return logger_; }
    +
    +private:
    +  /// The server configuration
    +  const Configuration &config_;
    +  /// The paths that match applications
    +  const Wt::EntryPointList& entryPoints_;
    +  /// The logger
    +  Wt::WLogger& logger_;
    +
    +  /// Perform URL-decoding on a string and separates in path and
    +  /// query. Returns false if the encoding was invalid.
    +  static bool url_decode(const std::string& in, std::string& path,
    +			 std::string& query);
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_REQUEST_HANDLER_HPP
    diff --git a/wt-3.1.7a/src/http/RequestParser.C b/wt-3.1.7a/src/http/RequestParser.C
    new file mode 100644
    index 0000000..b190c04
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/RequestParser.C
    @@ -0,0 +1,711 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// request_parser.cpp
    +// ~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "md5.h"
    +
    +#include "RequestParser.h"
    +#include "Request.h"
    +#include "Reply.h"
    +#include "Server.h"
    +#include "WebController.h"
    +
    +#undef min
    +
    +/*
    + * mongrel does this (http://mongrel.rubyforge.org/security.html):
    + *
    + * Any header over 112k.
    + * Any query string over 10k.
    + * Any header field value over 80k.
    + * Any header field name over 256 bytes.
    + * Any request URI greater than 10k bytes.
    + */
    +
    +static std::size_t MAX_REQUEST_HEADER_SIZE = 112*1024;
    +static int MAX_URI_SIZE = 10*1024;
    +static int MAX_FIELD_VALUE_SIZE = 80*1024;
    +static int MAX_FIELD_NAME_SIZE = 256;
    +static int MAX_METHOD_SIZE = 16;
    +
    +static int MAX_WEBSOCKET_MESSAGE_LENGTH = 112*1024;
    +
    +namespace http {
    +namespace server {
    +
    +RequestParser::RequestParser(Server *server)
    +  : server_(server)
    +{
    +  reset();
    +}
    +
    +void RequestParser::reset()
    +{
    +  httpState_ = method_start;
    +  wsState_ = ws_start;
    +  frameType_ = 0x00;
    +  requestSize_ = 0;
    +  buf_ptr_ = 0;
    +}
    +
    +bool RequestParser::consumeChar(char c)
    +{
    +  if (buf_ptr_ + dest_->length() > maxSize_)
    +    return false;
    +
    +  buf_[buf_ptr_++] = c;
    +  
    +  if (buf_ptr_ == sizeof(buf_)) {
    +    dest_->append(buf_, sizeof(buf_));
    +    buf_ptr_ = 0;
    +  }
    +
    +  return true;
    +}
    +
    +void RequestParser::consumeToString(std::string& result, int maxSize)
    +{
    +  buf_ptr_ = 0;
    +  dest_ = &result;
    +  maxSize_ = maxSize;
    +  dest_->clear();
    +}
    +
    +void RequestParser::consumeComplete()
    +{
    +  if (buf_ptr_)
    +    dest_->append(buf_, buf_ptr_);
    +  buf_ptr_ = 0;
    +}
    +
    +bool RequestParser::initialState() const
    +{
    +  return (httpState_ == method_start);
    +}
    +
    +boost::tuple<boost::tribool, Buffer::const_iterator>
    +RequestParser::parse(Request& req, Buffer::const_iterator begin,
    +		     Buffer::const_iterator end)
    +{
    +  boost::tribool Indeterminate = boost::indeterminate;
    +  boost::tribool& result(Indeterminate);
    +
    +  while (boost::indeterminate(result) && (begin != end))
    +    result = consume(req, *begin++);
    +
    +  return boost::make_tuple(result, begin);
    +}
    +
    +bool RequestParser::parseBody(Request& req, ReplyPtr reply,
    +			      Buffer::const_iterator& begin,
    +			      Buffer::const_iterator end)
    +{
    +  static bool doWebSockets = server_->controller()->configuration().webSockets();
    +
    +  if (doWebSockets && req.isWebSocketRequest()) {
    +    Request::State state = parseWebSocketMessage(req, reply, begin, end);
    +
    +    if (state == Request::Error)
    +      reply->consumeData(begin, begin, Request::Error);
    +
    +    return state != Request::Partial;
    +  } else {
    +    ::int64_t thisSize = std::min((::int64_t)(end - begin), remainder_);
    +
    +    Buffer::const_iterator thisBegin = begin;
    +    Buffer::const_iterator thisEnd = begin + thisSize;
    +    remainder_ -= thisSize;
    +
    +    begin = thisEnd;
    +
    +    bool endOfRequest = remainder_ == 0;
    +
    +    reply->consumeData(thisBegin, thisEnd,
    +		       endOfRequest ? Request::Complete : Request::Partial);
    +
    +    if (reply->responseStatus() == Reply::request_entity_too_large)
    +      return true;
    +    else
    +      return endOfRequest;
    +  }
    +}
    +
    +bool RequestParser::doWebSocketHandShake(const Request& req)
    +{
    +  Request::HeaderMap::const_iterator k1, k2, origin;
    +
    +  k1 = req.headerMap.find("Sec-WebSocket-Key1");
    +  k2 = req.headerMap.find("Sec-WebSocket-Key2");
    +  origin = req.headerMap.find("Origin");
    +
    +  if (k1 != req.headerMap.end() && k2 != req.headerMap.end()
    +      && origin != req.headerMap.end()) {
    +    ::uint32_t n1, n2;
    +
    +    if (parseCrazyWebSocketKey(k1->second, n1)
    +	&& parseCrazyWebSocketKey(k2->second, n2)) {
    +      unsigned char key3[8];
    +      memcpy(key3, buf_, 8);
    +
    +      ::uint32_t v;
    +
    +      v = htonl(n1);
    +      memcpy(buf_, &v, 4);
    +
    +      v = htonl(n2);
    +      memcpy(buf_ + 4, &v, 4);
    +
    +      memcpy(buf_ + 8, key3, 8);
    +
    +      md5_state_t c;
    +      md5_init(&c);
    +      md5_append(&c, (unsigned char *)buf_, 16);
    +      md5_finish(&c, (unsigned char *)buf_);
    +
    +      return true;
    +    } else
    +      return false;
    +  } else
    +    return false;
    +}
    +
    +bool RequestParser::parseCrazyWebSocketKey(const std::string& key,
    +					   ::uint32_t& result)
    +{
    +  std::string number;
    +  int spaces = 0;
    +
    +  for (unsigned i = 0; i < key.length(); ++i)
    +    if (key[i] >= '0' && key[i] <= '9')
    +      number += key[i];
    +    else if (key[i] == ' ')
    +      ++spaces;
    +
    +  ::uint64_t n = boost::lexical_cast< ::uint64_t >(number);
    +
    +  if (!spaces)
    +    return false;
    +  
    +  if (n % spaces == 0) {
    +    result = n / spaces;
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +
    +Request::State
    +RequestParser::parseWebSocketMessage(Request& req,
    +				     ReplyPtr reply,
    +				     Buffer::const_iterator& begin,
    +				     Buffer::const_iterator end)
    +{
    +  if (wsState_ == ws_start) {
    +    wsState_ = ws_hand_shake;
    +
    +    reply->consumeData(begin, begin, Request::Complete);
    +
    +    return Request::Complete;
    +  } else if (wsState_ == ws_hand_shake) {
    +    ::int64_t thisSize = std::min((::int64_t)(end - begin), 8 - remainder_);
    +
    +    memcpy(buf_ + remainder_, begin, thisSize);
    +    remainder_ += thisSize;
    +    begin += thisSize;
    +
    +    if (remainder_ == 8) {
    +      bool okay = doWebSocketHandShake(req);
    +
    +      if (okay) {
    +	wsState_ = frame_start;
    +	
    +	reply->consumeData(buf_, buf_ + 16, Request::Complete);
    +
    +	return Request::Complete;
    +      } else
    +	return Request::Error;
    +    } else
    +      return Request::Partial;
    +  }
    +
    +  Buffer::const_iterator dataBegin = begin;
    +  Buffer::const_iterator dataEnd = end;
    +
    +  Request::State state = Request::Partial;
    +
    +  while (begin < end && state == Request::Partial) {
    +    switch (wsState_) {
    +    case frame_start:
    +      frameType_ = *begin;
    +
    +      if (frameType_ & 0x80) {
    +	wsState_ = binary_length;
    +	remainder_ = 0;
    +      } else {
    +	wsState_ = text_data;
    +	dataBegin = begin;
    +        ++dataBegin;
    +	remainder_ = 0;
    +      }
    +
    +      ++begin;
    +      break;
    +
    +    case binary_length:
    +      remainder_ = remainder_ << 7 | (*begin & 0x7F);
    +      if ((*begin & 0x80) == 0) {
    +	if (remainder_ == 0 || remainder_ >= MAX_WEBSOCKET_MESSAGE_LENGTH)
    +	  return Request::Error;
    +	wsState_ = binary_data;
    +      }
    +
    +      ++begin;
    +      break;
    +
    +    case text_data:
    +      if (static_cast<unsigned char>(*begin) == 0xFF) {
    +	state = Request::Complete;
    +	dataEnd = begin;
    +      } else {
    +	++remainder_;
    +
    +	if (remainder_ >= MAX_WEBSOCKET_MESSAGE_LENGTH)
    +	  return Request::Error;
    +      }
    +
    +      ++begin;
    +      break;
    +
    +    case binary_data:
    +      {
    +	::int64_t thisSize = std::min((::int64_t)(end - begin), remainder_);
    +
    +	dataBegin = begin;
    +	begin = begin + thisSize;
    +	dataEnd = begin;
    +	remainder_ -= thisSize;
    +
    +	if (remainder_ == 0)
    +	  state = Request::Complete;
    +	break;
    +      }
    +
    +    default:
    +      assert(false);
    +    }
    +  }
    +
    +  if (state == Request::Complete)
    +    wsState_ = frame_start;
    +
    +  if (frameType_ == 0x00) {
    +    if (dataBegin < dataEnd || state == Request::Complete) {
    +      assert(*dataBegin != 0);
    +
    +      reply->consumeData(dataBegin, dataEnd, state);
    +    }
    +  } else
    +    return Request::Error;
    +
    +  return state;
    +}
    +
    +boost::tribool& RequestParser::consume(Request& req, char input)
    +{
    +  static boost::tribool False(false);
    +  static boost::tribool True(true);
    +  static boost::tribool Indeterminate(boost::indeterminate);
    +
    +  if (++requestSize_ > MAX_REQUEST_HEADER_SIZE)
    +    return False;
    +
    +  switch (httpState_)
    +  {
    +  case method_start:
    +    if (input == '\r')
    +    {
    +      /*
    +       * allow a new line before a request -- this seems to be
    +       * accepted practice when dealing with multiple requests
    +       * in one connection, separated by a CRLF.
    +       */
    +      httpState_ = expecting_newline_0;
    +      return Indeterminate;
    +    } else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      httpState_ = method;
    +      consumeToString(req.method, MAX_METHOD_SIZE);
    +      consumeChar(input);
    +      return Indeterminate;
    +    }
    +  case expecting_newline_0:
    +    if (input == '\n')
    +    {
    +      httpState_ = method_start;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case method:
    +    if (input == ' ')
    +    {
    +      consumeComplete();
    +      httpState_ = uri_start;
    +      return Indeterminate;
    +    }
    +    else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      if (consumeChar(input))
    +	return Indeterminate;
    +      else
    +	return False;
    +    }
    +  case uri_start:
    +    if (is_ctl(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      httpState_ = uri;
    +      consumeToString(req.uri, MAX_URI_SIZE);
    +      consumeChar(input);
    +      return Indeterminate;
    +    }
    +  case uri:
    +    if (input == ' ')
    +    {
    +      consumeComplete();
    +
    +      httpState_ = http_version_h;
    +      return Indeterminate;
    +    }
    +    else if (is_ctl(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      if (consumeChar(input))
    +	return Indeterminate;
    +      else
    +	return False;
    +    }
    +  case http_version_h:
    +    if (input == 'H')
    +    {
    +      httpState_ = http_version_t_1;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_t_1:
    +    if (input == 'T')
    +    {
    +      httpState_ = http_version_t_2;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_t_2:
    +    if (input == 'T')
    +    {
    +      httpState_ = http_version_p;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_p:
    +    if (input == 'P')
    +    {
    +      httpState_ = http_version_slash;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_slash:
    +    if (input == '/')
    +    {
    +      req.http_version_major = 0;
    +      req.http_version_minor = 0;
    +      httpState_ = http_version_major_start;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_major_start:
    +    if (is_digit(input))
    +    {
    +      req.http_version_major = req.http_version_major * 10 + input - '0';
    +      httpState_ = http_version_major;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_major:
    +    if (input == '.')
    +    {
    +      httpState_ = http_version_minor_start;
    +      return Indeterminate;
    +    }
    +    else if (is_digit(input))
    +    {
    +      req.http_version_major = req.http_version_major * 10 + input - '0';
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_minor_start:
    +    if (is_digit(input))
    +    {
    +      req.http_version_minor = req.http_version_minor * 10 + input - '0';
    +      httpState_ = http_version_minor;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case http_version_minor:
    +    if (input == '\r')
    +    {
    +      httpState_ = expecting_newline_1;
    +      return Indeterminate;
    +    }
    +    else if (is_digit(input))
    +    {
    +      req.http_version_minor = req.http_version_minor * 10 + input - '0';
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case expecting_newline_1:
    +    if (input == '\n')
    +    {
    +      httpState_ = header_line_start;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case header_line_start:
    +    if (input == '\r')
    +    {
    +      httpState_ = expecting_newline_3;
    +      return Indeterminate;
    +    }
    +    else if (!req.headerMap.empty() && (input == ' ' || input == '\t'))
    +    {
    +      // continuation of previous header
    +      httpState_ = header_lws;
    +      return Indeterminate;
    +    }
    +    else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      consumeToString(headerName_, MAX_FIELD_NAME_SIZE);
    +      consumeChar(input);
    +      httpState_ = header_name;
    +      return Indeterminate;
    +    }
    +  case header_lws:
    +    if (input == '\r')
    +    {
    +      httpState_ = expecting_newline_2;
    +      return Indeterminate;
    +    }
    +    else if (input == ' ' || input == '\t')
    +    {
    +      return Indeterminate;
    +    }
    +    else if (is_ctl(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      httpState_ = header_value;
    +      headerValue_.push_back(input);
    +      return Indeterminate;
    +    }
    +  case header_name:
    +    if (input == ':')
    +    {
    +      consumeComplete();
    +      httpState_ = space_before_header_value;
    +      return Indeterminate;
    +    }
    +    else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      if (consumeChar(input))
    +	return Indeterminate;
    +      else
    +	return False;
    +    }
    +  case space_before_header_value:
    +    if (input == ' ')
    +    {
    +      consumeToString(headerValue_, MAX_FIELD_VALUE_SIZE);
    +      httpState_ = header_value;
    +
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      consumeToString(headerValue_, MAX_FIELD_VALUE_SIZE);
    +      httpState_ = header_value;
    +    }
    +  case header_value:
    +    if (input == '\r')
    +    {
    +      consumeComplete();
    +
    +      if (req.headerMap.find(headerName_) != req.headerMap.end()) {
    +	req.headerMap[headerName_] += ',' + headerValue_;
    +      } else {
    +	Request::HeaderMap::iterator i
    +	  = req.headerMap.insert(std::make_pair(headerName_, headerValue_))
    +	    .first;
    +	req.headerOrder.push_back(i);
    +      }
    +
    +      httpState_ = expecting_newline_2;
    +      return Indeterminate;
    +    }
    +    else if (is_ctl(input))
    +    {
    +      return False;
    +    }
    +    else
    +    {
    +      if (consumeChar(input))
    +	return Indeterminate;
    +      else
    +	return False;
    +    }
    +  case expecting_newline_2:
    +    if (input == '\n')
    +    {
    +      httpState_ = header_line_start;
    +      return Indeterminate;
    +    }
    +    else
    +    {
    +      return False;
    +    }
    +  case expecting_newline_3:
    +    if (input == '\n')
    +      return True;
    +    else
    +      return False;
    +  default:
    +    return False;
    +  }
    +}
    +
    +bool RequestParser::is_char(int c)
    +{
    +  return c >= 0 && c <= 127;
    +}
    +
    +bool RequestParser::is_ctl(int c)
    +{
    +  return (c >= 0 && c <= 31) || c == 127;
    +}
    +
    +bool RequestParser::is_tspecial(int c)
    +{
    +  switch (c)
    +  {
    +  case '(': case ')': case '<': case '>': case '@':
    +  case ',': case ';': case ':': case '\\': case '"':
    +  case '/': case '[': case ']': case '?': case '=':
    +  case '{': case '}': case ' ': case '\t':
    +    return true;
    +  default:
    +    return false;
    +  }
    +}
    +
    +bool RequestParser::is_digit(int c)
    +{
    +  return c >= '0' && c <= '9';
    +}
    +
    +Reply::status_type RequestParser::validate(Request& req)
    +{
    +  req.contentLength = 0;
    +
    +  Request::HeaderMap::const_iterator i = req.headerMap.find("Content-Length");
    +  if (i != req.headerMap.end()) {
    +    try {
    +      req.contentLength = boost::lexical_cast< ::int64_t >(i->second);
    +    } catch (boost::bad_lexical_cast&) {
    +      return Reply::bad_request;
    +    }
    +  }
    +
    +  /*
    +   * We could probably be more pedantic here.
    +   */
    +  remainder_ = req.contentLength;
    +
    +  /*
    +   * Other things that we could check: if there is a body expected (like
    +   * POST, but there is no content-length: return 411 Length Required
    +   *
    +   * HTTP 1.1 (RFC 2616) and HTTP 1.0 (RFC 1945) validation
    +   */
    +
    +  return Reply::ok;
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/RequestParser.h b/wt-3.1.7a/src/http/RequestParser.h
    new file mode 100644
    index 0000000..0b40bb1
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/RequestParser.h
    @@ -0,0 +1,143 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// request_parser.hpp
    +// ~~~~~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_REQUEST_PARSER_HPP
    +#define HTTP_REQUEST_PARSER_HPP
    +
    +#include <boost/logic/tribool.hpp>
    +#include <boost/tuple/tuple.hpp>
    +
    +#include "Buffer.h"
    +#include "Reply.h"
    +
    +namespace http {
    +namespace server {
    +
    +class Request;
    +class Server;
    +
    +/// Parser for incoming requests.
    +class RequestParser
    +{
    +public:
    +  /// Construct ready to parse the request method.
    +  RequestParser(Server *server);
    +
    +  /// Reset to initial parser state.
    +  void reset();
    +
    +  /// Parse some data. The tribool return value is true when a complete request
    +  /// has been parsed, false if the data is invalid, indeterminate when more
    +  /// data is required. The iterator return value indicates how much
    +  /// of the input has been consumed.
    +  boost::tuple<boost::tribool, Buffer::const_iterator>
    +    parse(Request& req, Buffer::const_iterator begin,
    +	  Buffer::const_iterator end);
    +
    +  /// Validate
    +  Reply::status_type validate(Request& req);
    +
    +  bool parseBody(Request& req, ReplyPtr reply,
    +		 Buffer::const_iterator& begin, Buffer::const_iterator end);
    +
    +  bool initialState() const;
    +
    +
    +private:
    +  /// Handle the next character of input.
    +  boost::tribool& consume(Request& req, char input);
    +
    +  /// Check if a byte is an HTTP character.
    +  static bool is_char(int c);
    +
    +  /// Check if a byte is an HTTP control character.
    +  static bool is_ctl(int c);
    +
    +  /// Check if a byte is defined as an HTTP tspecial character.
    +  static bool is_tspecial(int c);
    +
    +  /// Check if a byte is a digit.
    +  static bool is_digit(int c);
    +
    +  bool consumeChar(char input);
    +  void consumeToString(std::string& result, int maxSize);
    +  void consumeComplete();
    +
    +  Request::State parseWebSocketMessage(Request& req, ReplyPtr reply,
    +				       Buffer::const_iterator& begin,
    +				       Buffer::const_iterator end);
    +
    +  bool doWebSocketHandShake(const Request& req);
    +  bool parseCrazyWebSocketKey(const std::string& key, ::uint32_t& number);
    +
    +  Server *server_;
    +
    +  /// The current state of the request parser.
    +  enum http_state
    +  {
    +    method_start,
    +    expecting_newline_0,
    +    method,
    +    uri_start,
    +    uri,
    +    http_version_h,
    +    http_version_t_1,
    +    http_version_t_2,
    +    http_version_p,
    +    http_version_slash,
    +    http_version_major_start,
    +    http_version_major,
    +    http_version_minor_start,
    +    http_version_minor,
    +    expecting_newline_1,
    +    header_line_start,
    +    header_lws,
    +    header_name,
    +    space_before_header_value,
    +    header_value,
    +    expecting_newline_2,
    +    expecting_newline_3
    +  } httpState_;
    +
    +  enum ws_state {
    +    ws_start,
    +    ws_hand_shake,
    +    frame_start,
    +    text_data,
    +    binary_length,
    +    binary_data
    +  } wsState_;
    +
    +  unsigned char frameType_;
    +
    +  std::string  headerName_;
    +  std::string  headerValue_;
    +
    +  ::uint64_t   requestSize_;
    +
    +  // used for HTTP POST body, WS hand-shake, and WS binary frame length
    +  ::int64_t    remainder_;
    +
    +  char         buf_[4096];
    +  unsigned     buf_ptr_;
    +  std::string *dest_;
    +  unsigned     maxSize_;
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_REQUEST_PARSER_HPP
    diff --git a/wt-3.1.7a/src/http/Server.C b/wt-3.1.7a/src/http/Server.C
    new file mode 100644
    index 0000000..06b6c7f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Server.C
    @@ -0,0 +1,266 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// server.cpp
    +// ~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "Server.h"
    +#include "Configuration.h"
    +#include "WebController.h"
    +
    +#include <boost/asio/buffer.hpp>
    +
    +#include <boost/bind.hpp>
    +
    +#ifdef HTTP_WITH_SSL
    +
    +#include <boost/asio/ssl.hpp>
    +
    +#endif // HTTP_WITH_SSL
    +
    +#if defined(WIN32)
    +namespace {
    +  SOCKET dup(SOCKET handle) {
    +    WSAPROTOCOL_INFO ProtocolInfo;
    +    if (WSADuplicateSocket(handle, GetCurrentProcessId(), &ProtocolInfo) == 0) {
    +      return WSASocket(ProtocolInfo.iAddressFamily,
    +        ProtocolInfo.iSocketType, ProtocolInfo.iProtocol,
    +        &ProtocolInfo, 0, 0);
    +    } else {
    +      return INVALID_SOCKET;
    +    }
    +  }
    +}
    +#endif
    +
    +namespace http {
    +namespace server {
    +
    +Server *Server::instance_ = 0;
    +
    +Server::Server(const Configuration& config, const Wt::Configuration& wtConfig,
    +               Wt::WebController& controller)
    +  : config_(config),
    +    io_service_(),
    +    accept_strand_(io_service_),
    +    tcp_acceptor_(io_service_),
    +#ifdef HTTP_WITH_SSL
    +    ssl_context_(io_service_, asio::ssl::context::sslv23),
    +    ssl_acceptor_(io_service_),
    +#endif // HTTP_WITH_SSL
    +    connection_manager_(),
    +    request_handler_(config, wtConfig.entryPoints(),
    +		     accessLogger_),
    +    controller_(&controller)
    +{
    +  assert(instance_ == 0);
    +  instance_ = this;
    +
    +  if (config.accessLog().empty())
    +    accessLogger_.setStream(std::cout);
    +  else {
    +    accessLogger_.setFile(config.accessLog());
    +  }
    +
    +  accessLogger_.addField("remotehost", false);
    +  accessLogger_.addField("rfc931", false);
    +  accessLogger_.addField("authuser", false);
    +  accessLogger_.addField("date", false);
    +  accessLogger_.addField("request", true);
    +  accessLogger_.addField("status", false);
    +  accessLogger_.addField("bytes", false);
    +
    +  asio::ip::tcp::resolver resolver(io_service_);
    +
    +  // HTTP
    +  if (!config.httpAddress().empty()) {
    +    std::string httpPort = config.httpPort();
    +
    +    asio::ip::tcp::endpoint tcp_endpoint;
    +
    +    if (httpPort == "0")
    +      tcp_endpoint.address(asio::ip::address::from_string
    +			   (config.httpAddress()));
    +    else {
    +#ifndef NO_RESOLVE_ACCEPT_ADDRESS
    +      asio::ip::tcp::resolver::query tcp_query(config.httpAddress(),
    +					       config.httpPort());
    +      tcp_endpoint = *resolver.resolve(tcp_query);
    +#else // !NO_RESOLVE_ACCEPT_ADDRESS
    +      tcp_endpoint.address
    +	(asio::ip::address::from_string(config.httpAddress()));
    +      tcp_endpoint.port(atoi(httpPort.c_str()));
    +#endif // NO_RESOLVE_ACCEPT_ADDRESS
    +    }
    +
    +    tcp_acceptor_.open(tcp_endpoint.protocol());
    +    tcp_acceptor_.set_option(asio::ip::tcp::acceptor::reuse_address(true));
    +    tcp_acceptor_.bind(tcp_endpoint);
    +    tcp_acceptor_.listen();
    +
    +    config.log("notice") << "Started server: http://" << config.httpAddress() << ":"
    +			 << this->httpPort();
    +
    +    new_tcpconnection_.reset
    +      (new TcpConnection(io_service_, this, connection_manager_, request_handler_));
    +
    +  }
    +
    +  // HTTPS
    +  if (!config.httpsAddress().empty()) {
    +#ifdef HTTP_WITH_SSL
    +    config.log("notice")
    +      << "Starting server: https://" << config.httpsAddress() << ":"
    +      << config.httpsPort();
    +
    +    ssl_context_.set_options(asio::ssl::context::default_workarounds
    +			     | asio::ssl::context::no_sslv2
    +			     | asio::ssl::context::single_dh_use);
    +    ssl_context_.use_certificate_chain_file(config.sslCertificateChainFile());
    +    ssl_context_.use_private_key_file(config.sslPrivateKeyFile(),
    +				      asio::ssl::context::pem);
    +    ssl_context_.use_tmp_dh_file(config.sslTmpDHFile());
    +    
    +    asio::ip::tcp::endpoint ssl_endpoint;
    +#ifndef NO_RESOLVE_ACCEPT_ADDRESS
    +    asio::ip::tcp::resolver::query ssl_query(config.httpsAddress(),
    +					     config.httpsPort());
    +    ssl_endpoint = *resolver.resolve(ssl_query);
    +#else // !NO_RESOLVE_ACCEPT_ADDRESS
    +    ssl_endpoint.address(asio::ip::address::from_string(config.httpsAddress()));
    +    ssl_endpoint.port(atoi(httpsPort.c_str()));
    +#endif // NO_RESOLVE_ACCEPT_ADDRESS
    +
    +    ssl_acceptor_.open(ssl_endpoint.protocol());
    +    ssl_acceptor_.set_option(asio::ip::tcp::acceptor::reuse_address(true));
    +    ssl_acceptor_.bind(ssl_endpoint);
    +    ssl_acceptor_.listen();
    +
    +    new_sslconnection_.reset
    +      (new SslConnection(io_service_, this, ssl_context_, connection_manager_,
    +			 request_handler_));
    +
    +#else // HTTP_WITH_SSL
    +    config.log("error")
    +      << "Wthttpd was built without support for SSL: "
    +      "cannot start https server.";
    +#endif // HTTP_WITH_SSL
    +  }
    +
    +  // Win32 cancels the non-blocking accept when the thread that called
    +  // accept exits. To avoid that this happens when called within the
    +  // WServer context, we post the action of calling accept to one of
    +  // the threads in the threadpool.
    +  io_service_.post(boost::bind(&Server::startAccept, this));
    +}
    +
    +int Server::httpPort() const
    +{
    +  return tcp_acceptor_.local_endpoint().port();
    +}
    +
    +void Server::startAccept()
    +{
    +  /*
    +   * For simplicity, we are using the same accept_strand_ for Tcp
    +   * and Ssl, to prevent the close() from within handleStop() and
    +   * async_accept() methods to be called simultaneously.
    +   *
    +   * While this also prevents simultaneously accepting a new Tcp and
    +   * Ssl connection, this performance impact is negligible (and both
    +   * need to access the ConnectionManager mutex in any case).
    +   */
    +  if (new_tcpconnection_) {
    +    tcp_acceptor_.async_accept(new_tcpconnection_->socket(),
    +			accept_strand_.wrap(
    +			       boost::bind(&Server::handleTcpAccept, this,
    +					   asio::placeholders::error)));
    +  }
    +#ifdef HTTP_WITH_SSL
    +  if (new_sslconnection_) {
    +    ssl_acceptor_.async_accept(new_sslconnection_->socket(),
    +	                accept_strand_.wrap(
    +			       boost::bind(&Server::handleSslAccept, this,
    +					   asio::placeholders::error)));
    +  }
    +#endif // HTTP_WITH_SSL
    +}
    +
    +Server::~Server()
    +{
    +  instance_ = 0;
    +}
    +
    +void Server::run()
    +{
    +  // The io_service::run() call will block until all asynchronous operations
    +  // have finished. While the server is running, there is always at least one
    +  // asynchronous operation outstanding: the asynchronous accept call waiting
    +  // for new incoming connections.
    +  io_service_.run();
    +}
    +
    +void Server::stop()
    +{
    +  // Post a call to the stop function so that server::stop() is safe
    +  // to call from any thread, and not simultaneously with waiting for
    +  // a new async_accept() call.
    +  io_service_.post(accept_strand_.wrap
    +		   (boost::bind(&Server::handleStop, this)));
    +}
    +
    +void Server::handleTcpAccept(const asio_error_code& e)
    +{
    +  if (!e)
    +  {
    +    connection_manager_.start(new_tcpconnection_);
    +    new_tcpconnection_.reset(new TcpConnection(io_service_, this,
    +          connection_manager_, request_handler_));
    +    tcp_acceptor_.async_accept(new_tcpconnection_->socket(),
    +	                accept_strand_.wrap(
    +                    boost::bind(&Server::handleTcpAccept, this,
    +				asio::placeholders::error)));
    +  }
    +}
    +
    +#ifdef HTTP_WITH_SSL
    +void Server::handleSslAccept(const asio_error_code& e)
    +{
    +  if (!e)
    +  {
    +    connection_manager_.start(new_sslconnection_);
    +    new_sslconnection_.reset(new SslConnection(io_service_, this,
    +          ssl_context_, connection_manager_, request_handler_));
    +    ssl_acceptor_.async_accept(new_sslconnection_->socket(),
    +	                accept_strand_.wrap(
    +	           boost::bind(&Server::handleSslAccept, this,
    +			       asio::placeholders::error)));
    +  }
    +}
    +#endif // HTTP_WITH_SSL
    +
    +void Server::handleStop()
    +{
    +  // The server is stopped by cancelling all outstanding asynchronous
    +  // operations. Once all operations have finished the io_service::run() call
    +  // will exit.
    +  tcp_acceptor_.close();
    +
    +#ifdef HTTP_WITH_SSL
    +  ssl_acceptor_.close();
    +#endif // HTTP_WITH_SSL
    +
    +  connection_manager_.stopAll();
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/Server.h b/wt-3.1.7a/src/http/Server.h
    new file mode 100644
    index 0000000..6c6b39f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/Server.h
    @@ -0,0 +1,132 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// server.hpp
    +// ~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_SERVER_HPP
    +#define HTTP_SERVER_HPP
    +
    +#ifdef HTTP_WITH_SSL
    +#include <boost/asio.hpp>
    +#include <boost/asio/ssl.hpp>
    +namespace asio = boost::asio;
    +#endif // HTTP_WITH_SSL
    +
    +#include <string>
    +#include <boost/noncopyable.hpp>
    +#include <boost/version.hpp>
    +
    +#include "TcpConnection.h"
    +
    +#ifdef HTTP_WITH_SSL
    +#include "SslConnection.h"
    +#endif // HTTP_WITH_SSL
    +
    +#include "Configuration.h"
    +#include "ConnectionManager.h"
    +#include "RequestHandler.h"
    +
    +#include "Wt/WLogger"
    +
    +namespace http {
    +namespace server {
    +
    +class Configuration;
    +
    +/// The top-level class of the HTTP server.
    +class Server
    +  : private boost::noncopyable
    +{
    +public:
    +  /// Construct the server to listen on the specified TCP address and port, and
    +  /// serve up files from the given directory.
    +  explicit Server(const Configuration& config,
    +		  const Wt::Configuration& wtConfig,
    +                  Wt::WebController& controller);
    +
    +  ~Server();
    +
    +  /// Run the server's io_service loop.
    +  void run();
    +
    +  /// Stop the server.
    +  void stop();
    +
    +  /// Returns the http port number.
    +  int httpPort() const;
    +
    +  static Server* instance() { return instance_; }
    +
    +  Wt::WebController *controller() { return controller_; }
    +
    +  const Configuration &configuration() { return config_; }
    +
    +  asio::io_service &service() { return io_service_; }
    +private:
    +  /// Starts accepting http/https connections
    +  void startAccept();
    +
    +  /// Handle completion of an asynchronous accept operation.
    +  void handleTcpAccept(const asio_error_code& e);
    +
    +  /// Handle a request to stop the server.
    +  void handleStop();
    +
    +  /// The server's configuration
    +  Configuration config_;
    +
    +  /// The logger
    +  Wt::WLogger   accessLogger_;
    +
    +  /// The io_service used to perform asynchronous operations.
    +  asio::io_service io_service_;
    +
    +  /// The strand for handleTcpAccept(), handleSslAccept() and handleStop()
    +  asio::strand accept_strand_;
    +
    +  /// Acceptor used to listen for incoming http connections.
    +  asio::ip::tcp::acceptor tcp_acceptor_;
    +
    +#ifdef HTTP_WITH_SSL
    +  /// Ssl context information
    +  asio::ssl::context ssl_context_;
    +
    +  /// Acceptor used to listen for incoming https connections
    +  asio::ip::tcp::acceptor ssl_acceptor_;
    +
    +  /// Handle completion of an asynchronous SSL accept operation.
    +  void handleSslAccept(const asio_error_code& e);
    +
    +  /// The next SSL connection to be accepted.
    +  SslConnectionPtr new_sslconnection_;
    +#endif // HTTP_WITH_SSL
    +
    +  /// The connection manager which owns all live connections.
    +  ConnectionManager connection_manager_;
    +
    +  /// The next TCP connection to be accepted.
    +  TcpConnectionPtr new_tcpconnection_;
    +
    +  /// The handler for all incoming requests.
    +  RequestHandler request_handler_;
    +
    +  Wt::WebController *controller_;
    +
    +  static Server *instance_;
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_SERVER_HPP
    diff --git a/wt-3.1.7a/src/http/SslConnection.C b/wt-3.1.7a/src/http/SslConnection.C
    new file mode 100644
    index 0000000..a3317c0
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/SslConnection.C
    @@ -0,0 +1,126 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +// 
    +// connection.cpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifdef HTTP_WITH_SSL
    +
    +#include <vector>
    +#include <boost/bind.hpp>
    +
    +#include "SslConnection.h"
    +#include "ConnectionManager.h"
    +#include "Server.h"
    +
    +namespace http {
    +namespace server {
    +
    +SslConnection::SslConnection(asio::io_service& io_service, Server *server,
    +    asio::ssl::context& context,
    +    ConnectionManager& manager, RequestHandler& handler)
    +  : Connection(io_service, server, manager, handler),
    +    socket_(io_service, context)
    +{ }
    +
    +asio::ip::tcp::socket& SslConnection::socket()
    +{
    +  return socket_.next_layer();
    +}
    +
    +void SslConnection::start()
    +{
    +  socket_.async_handshake(asio::ssl::stream_base::server,
    +      boost::bind(&SslConnection::handleHandshake, this,
    +		  asio::placeholders::error));
    +}
    +
    +void SslConnection::handleHandshake(const asio_error_code& error)
    +{
    +  if (!error)
    +    Connection::start();
    +  else
    +    ConnectionManager_.stop(shared_from_this());
    +}
    +
    +void SslConnection::stop()
    +{
    +  finishReply();
    +  try {
    +    socket().close();
    +  } catch (asio_system_error&) {
    +  }
    +}
    +
    +typedef void (Connection::*HandleRead)(const asio_error_code&, std::size_t);
    +typedef void (Connection::*HandleWrite)(const asio_error_code&);
    +
    +void SslConnection::startAsyncReadRequest(Buffer& buffer, int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  socket_.async_read_some(asio::buffer(buffer),
    +       boost::bind(static_cast<HandleRead>(
    +         &SslConnection::handleReadRequestSsl),
    +         shared_from_this(),
    +         asio::placeholders::error,
    +         asio::placeholders::bytes_transferred));
    +}
    +
    +void SslConnection::handleReadRequestSsl(const asio_error_code& e,
    +                                         std::size_t bytes_transferred)
    +{
    +  // Asio SSL does not perform a write until the read handler
    +  // has returned. In the normal case, a read handler does not
    +  // return in case of a recursive event loop, so the SSL write
    +  // deadlocks a session. Hence, post the processing of the data
    +  // read, so that the read handler can return here immediately.
    +  server()->service().post(boost::bind(&Connection::handleReadRequest,
    +                                       shared_from_this(),
    +                                       e, bytes_transferred));
    +}
    +
    +void SslConnection::startAsyncReadBody(Buffer& buffer, int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  socket_.async_read_some(asio::buffer(buffer),
    +       boost::bind(static_cast<HandleRead>(&SslConnection::handleReadBodySsl),
    +		   shared_from_this(),
    +		   asio::placeholders::error,
    +		   asio::placeholders::bytes_transferred));
    +}
    +
    +void SslConnection::handleReadBodySsl(const asio_error_code& e,
    +                                      std::size_t bytes_transferred)
    +{
    +  // See handleReadRequestSsl for explanation
    +  server()->service().post(boost::bind(&SslConnection::handleReadBody,
    +                                       shared_from_this(),
    +                                       e, bytes_transferred));
    +}
    +
    +void SslConnection::startAsyncWriteResponse
    +    (const std::vector<asio::const_buffer>& buffers, int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  asio::async_write(socket_, buffers,
    +	boost::bind(static_cast<HandleWrite>(&Connection::handleWriteResponse),
    +		    shared_from_this(),
    +		    asio::placeholders::error));
    +}
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_WITH_SSL
    diff --git a/wt-3.1.7a/src/http/SslConnection.h b/wt-3.1.7a/src/http/SslConnection.h
    new file mode 100644
    index 0000000..02ba711
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/SslConnection.h
    @@ -0,0 +1,79 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// connection.hpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_SSL_CONNECTION_HPP
    +#define HTTP_SSL_CONNECTION_HPP
    +
    +#ifdef HTTP_WITH_SSL
    +
    +#include <boost/asio/ssl.hpp>
    +
    +#include <boost/array.hpp>
    +#include <boost/noncopyable.hpp>
    +#include <boost/shared_ptr.hpp>
    +#include <boost/enable_shared_from_this.hpp>
    +
    +#include "Connection.h"
    +
    +namespace http {
    +namespace server {
    +
    +class RequestHandler;
    +class Server;
    +
    +typedef asio::ssl::stream<asio::ip::tcp::socket> ssl_socket;
    +
    +/// Represents a single connection from a client.
    +class SslConnection : public Connection
    +{
    +public:
    +  /// Construct a connection with the given io_service.
    +  explicit SslConnection(asio::io_service& io_service, Server *server,
    +      asio::ssl::context& context,
    +      ConnectionManager& manager, RequestHandler& handler);
    +
    +  /// Get the socket associated with the connection.
    +  virtual asio::ip::tcp::socket& socket();
    +
    +  virtual void start();
    +  virtual void stop();
    +  virtual std::string urlScheme() { return "https"; }
    +
    +private:
    +  virtual void startAsyncReadRequest(Buffer& buffer, int timeout);
    +  virtual void startAsyncReadBody(Buffer& buffer, int timeout);
    +  virtual void startAsyncWriteResponse
    +      (const std::vector<asio::const_buffer>& buffers, int timeout);
    +  void handleReadRequestSsl(const asio_error_code& e,
    +                            std::size_t bytes_transferred);
    +  void handleReadBodySsl(const asio_error_code& e,
    +                         std::size_t bytes_transferred);
    +
    +private:
    +  void handleHandshake(const asio_error_code& error);
    +
    +  /// Socket for the connection.
    +  ssl_socket socket_;
    +};
    +
    +typedef boost::shared_ptr<SslConnection> SslConnectionPtr;
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_WITH_SSL
    +
    +#endif // HTTP_SSL_CONNECTION_HPP
    diff --git a/wt-3.1.7a/src/http/StaticReply.C b/wt-3.1.7a/src/http/StaticReply.C
    new file mode 100644
    index 0000000..948ddc8
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/StaticReply.C
    @@ -0,0 +1,264 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/filesystem/operations.hpp>
    +#include <boost/spirit/include/classic_core.hpp>
    +
    +#include "Request.h"
    +#include "StaticReply.h"
    +#include "StockReply.h"
    +#include "MimeTypes.h"
    +
    +
    +using namespace BOOST_SPIRIT_CLASSIC_NS;
    +
    +namespace http {
    +namespace server {
    +
    +StaticReply::StaticReply(const std::string &full_path,
    +			 const std::string &extension,
    +			 const Request& request,
    +			 const std::string &err_root)
    +  : Reply(request),
    +    path_(full_path),
    +    extension_(extension)
    +{
    +  bool stockReply = false;
    +  bool gzipReply = false;
    +  std::string modifiedDate, etag;
    +
    +  parseRangeHeader();
    +
    +  // Do not consider .gz files if we will respond with a range, as we cannot
    +  // stream partial data from a .gz file
    +  if (request.acceptGzipEncoding() && !hasRange_) {
    +    std::string gzipPath = path_ + ".gz";
    +    stream_.open(gzipPath.c_str(), std::ios::in | std::ios::binary);
    +
    +    if (stream_) {
    +      path_ = gzipPath;
    +      gzipReply = true;
    +    } else {
    +      stream_.clear();
    +      stream_.open(path_.c_str(), std::ios::in | std::ios::binary);
    +    }
    +  } else
    +    stream_.open(path_.c_str(), std::ios::in | std::ios::binary);
    +
    +  if (!stream_) {
    +    stockReply = true;
    +    setRelay(ReplyPtr(new StockReply(request, StockReply::not_found,
    +				     "", err_root)));
    +  } else {
    +    try {
    +      fileSize_ = boost::filesystem::file_size(path_);
    +      modifiedDate = computeModifiedDate();
    +      etag = computeETag();
    +    } catch (...) {
    +      fileSize_ = -1;
    +    }
    +  }
    +
    +  // Can't specify zero-length Content-Range headers. But for zero-length
    +  // files, we just ignore the Range header and send the full file instead of
    +  // a 416 Requested Range Not Satisfiable error
    +  if (stockReply || (fileSize_ == 0))
    +    hasRange_ = false;
    +
    +  if ((!stockReply) && hasRange_) {
    +    stream_.seekg((std::streamoff)rangeBegin_, std::ios_base::cur);
    +    std::streamoff curpos = stream_.tellg();
    +    if (curpos != rangeBegin_) {
    +      // Won't be able to send even a single byte -> error 416
    +      stockReply = true;
    +      ReplyPtr sr(new StockReply(request,
    +        StockReply::requested_range_not_satisfiable, "", err_root));
    +      if (fileSize_ != -1) {
    +        // 416 SHOULD include a Content-Range with byte-range-resp-spec * and
    +        // instance-length set to current lenght
    +        sr->addHeader("Content-Range",
    +          "bytes */" + boost::lexical_cast<std::string>(fileSize_));
    +      }
    +      setRelay(sr);
    +    } else {
    +      ::int64_t last = rangeEnd_;
    +      if (fileSize_ != -1 && last >= fileSize_) {
    +        last = fileSize_ - 1;
    +      }
    +      std::stringstream contentRange;
    +      // Note: if fileSize is unknown, we're not sure we'll be able to
    +      // transmit the requested range (i.e. when the file is not large enough
    +      // to satisfy the request). Wt wil report that it understood the request,
    +      // and close the link prematurely if it can't provide the requested bytes
    +      contentRange << "bytes " << rangeBegin_ << "-" << last << "/";
    +      if (fileSize_ == -1) {
    +        contentRange << "*";
    +      } else {
    +        contentRange << fileSize_;
    +      }
    +      addHeader("Content-Range", contentRange.str());
    +    }
    +  }
    +
    +  if (!stockReply) {
    +    /*
    +     * Check if can send a 304 not modified reply
    +     */
    +    Request::HeaderMap::const_iterator ims
    +      = request.headerMap.find("If-Modified-Since");
    +    Request::HeaderMap::const_iterator inm
    +      = request.headerMap.find("If-None-Match");
    +
    +    if ((ims != request.headerMap.end() && ims->second == modifiedDate)
    +	|| (inm != request.headerMap.end() && inm->second == etag)) {
    +      stockReply = true;
    +      setRelay(ReplyPtr(new StockReply(request, StockReply::not_modified)));
    +    }
    +  }
    +  if (!stockReply) {
    +    /*
    +     * Add headers for caching, but not for IE since it in fact makes it
    +     * cache less (images)
    +     */
    +    Request::HeaderMap::const_iterator ua=request.headerMap.find("User-Agent");
    +
    +    if (   ua == request.headerMap.end()
    +	|| ua->second.find("MSIE") == std::string::npos) {
    +      addHeader("Cache-Control", "max-age=3600");
    +      if (!etag.empty())
    +	addHeader("ETag", etag);
    +
    +      addHeader("Expires", computeExpires());
    +    } else {
    +      // We experienced problems with some swf files if they are cached in IE.
    +      // Therefore, don't cache swf files on IE.
    +      if (boost::iequals(extension_, "swf")) {
    +        addHeader("Cache-Control", "no-cache");
    +      }
    +    }
    +
    +    if (!modifiedDate.empty())
    +      addHeader("Last-Modified", modifiedDate);
    +  }
    + 
    +  if ((!stockReply) && gzipReply)
    +    addHeader("Content-Encoding", "gzip");
    +}
    +
    +std::string StaticReply::computeModifiedDate() const
    +{
    +  return httpDate(boost::filesystem::last_write_time(path_));
    +}
    +
    +std::string StaticReply::computeETag() const
    +{
    +  return boost::lexical_cast<std::string>(fileSize_)
    +    + "-" + computeModifiedDate();
    +}
    +
    +std::string StaticReply::computeExpires()
    +{
    +  time_t t = time(0);
    +  t += 3600*24*31;
    +  return httpDate(t);
    +}
    +
    +void StaticReply::consumeData(Buffer::const_iterator begin,
    +			      Buffer::const_iterator end,
    +			      Request::State state)
    +{
    +  if (state != Request::Partial)
    +    send();
    +}
    +
    +Reply::status_type StaticReply::responseStatus()
    +{
    +  if (hasRange_) {
    +    return partial_content;
    +  } else {
    +    return ok;
    +  }
    +}
    +
    +std::string StaticReply::contentType()
    +{
    +  return mime_types::extensionToType(extension_);
    +}
    +
    +::int64_t StaticReply::contentLength()
    +{
    +  if (hasRange_) {
    +    if (fileSize_ == -1) {
    +      return -1;
    +    }
    +    if (rangeBegin_ >= fileSize_) {
    +      return 0;
    +    }
    +    if (rangeEnd_ < fileSize_) {
    +      return rangeEnd_ - rangeBegin_ + 1;
    +    } else {
    +      return fileSize_ - rangeBegin_;
    +    }
    +  } else {
    +    return fileSize_;
    +  }
    +}
    +
    +asio::const_buffer StaticReply::nextContentBuffer()
    +{
    +  if (request_.method == "HEAD")
    +    return emptyBuffer;
    +  else {
    +    boost::uintmax_t rangeRemainder
    +      = (std::numeric_limits< ::int64_t>::max)();
    +    if (hasRange_)
    +      rangeRemainder = rangeEnd_ - stream_.tellg() + 1;
    +    stream_.read(buf_,
    +                 (std::streamsize)(std::min<boost::uintmax_t>)(rangeRemainder,
    +                                                               sizeof(buf_)));
    +
    +    if (stream_.gcount() > 0) {
    +      return asio::buffer(buf_, stream_.gcount());
    +    } else
    +      return emptyBuffer;
    +  }
    +}
    +
    +void StaticReply::parseRangeHeader()
    +{
    +  // Wt only support these types of ranges for now:
    +  // Range: bytes=0-
    +  // Range: bytes=10-
    +  // Range: bytes=250-499
    +  // NOT SUPPORTED: multiple ranges, and the suffix-byte-range-spec:
    +  // Range: bytes=10-20,30-40
    +  // Range: bytes=-500 // 'last 500 bytes'
    +  Request::HeaderMap::const_iterator range
    +    = request_.headerMap.find("Range");
    +
    +  hasRange_ = false;
    +  rangeBegin_ = (std::numeric_limits< ::int64_t>::max)();
    +  rangeEnd_ = (std::numeric_limits< ::int64_t>::max)();
    +  if (range != request_.headerMap.end()) {
    +    std::string rangeHeader = range->second;
    +    uint_parser< ::int64_t> const uint_max_p = uint_parser< ::int64_t>();
    +    hasRange_ = parse(rangeHeader.c_str(),
    +      str_p("bytes") >> ch_p('=') >>
    +      (uint_max_p[assign_a(rangeBegin_)] >>
    +      ch_p('-') >>
    +      !uint_max_p[assign_a(rangeEnd_)]),
    +      space_p).full;
    +    if (hasRange_) {
    +      // Validation of the Range header
    +      if (rangeBegin_ > rangeEnd_)
    +        hasRange_ = false;
    +    }
    +  }
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/http/StaticReply.h b/wt-3.1.7a/src/http/StaticReply.h
    new file mode 100644
    index 0000000..fa5acb2
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/StaticReply.h
    @@ -0,0 +1,73 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// reply.hpp
    +// ~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_STATIC_REPLY_HPP
    +#define HTTP_STATIC_REPLY_HPP
    +
    +#include <string>
    +#include <vector>
    +#include <fstream>
    +#include <boost/asio.hpp>
    +namespace asio = boost::asio;
    +
    +#include "Reply.h"
    +
    +namespace http {
    +namespace server {
    +
    +class StockReply;
    +class Request;
    +
    +class StaticReply : public Reply
    +{
    +public:
    +  StaticReply(const std::string &full_path, const std::string &extension,
    +	      const Request& request, const std::string &err_root);
    +
    +  virtual void consumeData(Buffer::const_iterator begin,
    +			   Buffer::const_iterator end,
    +			   Request::State state);
    +
    +protected:
    +  virtual status_type responseStatus();
    +  virtual std::string contentType();
    +  virtual ::int64_t contentLength();
    +
    +  virtual asio::const_buffer nextContentBuffer();
    +
    +private:
    +  std::string     path_;
    +  std::string     extension_;
    +  std::ifstream   stream_;
    +  ::int64_t fileSize_;
    +
    +  char buf_[64 * 1024];
    +
    +  std::string computeModifiedDate() const;
    +  std::string computeETag() const;
    +  static std::string computeExpires();
    +
    +  void parseRangeHeader();
    +  bool hasRange_;
    +  ::int64_t rangeBegin_;
    +  ::int64_t rangeEnd_;
    +
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_STATIC_REPLY_HPP
    diff --git a/wt-3.1.7a/src/http/StockReply.C b/wt-3.1.7a/src/http/StockReply.C
    new file mode 100644
    index 0000000..c56ea2f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/StockReply.C
    @@ -0,0 +1,397 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// reply.cpp
    +// ~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include "StockReply.h"
    +
    +#include <string>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/filesystem/fstream.hpp>
    +#include "Request.h"
    +
    +namespace http {
    +namespace server {
    +
    +namespace stock_replies {
    +
    +const std::string ok = "";
    +const std::string ok_name = "200-ok.html";
    +const std::string created =
    +  "<html>"
    +  "<head><title>Created</title></head>"
    +  "<body><h1>201 Created</h1></body>"
    +  "</html>";
    +const std::string created_name = "201-created.html";
    +const std::string accepted =
    +  "<html>"
    +  "<head><title>Accepted</title></head>"
    +  "<body><h1>202 Accepted</h1></body>"
    +  "</html>";
    +const std::string accepted_name = "202-accepted.html";
    +const std::string no_content =
    +  "<html>"
    +  "<head><title>No Content</title></head>"
    +  "<body><h1>204 Content</h1></body>"
    +  "</html>";
    +const std::string no_content_name = "204-nocontent.html";
    +const std::string multiple_choices =
    +  "<html>"
    +  "<head><title>Multiple Choices</title></head>"
    +  "<body><h1>300 Multiple Choices</h1></body>"
    +  "</html>";
    +const std::string multiple_choices_name = "300-multiple-choices.html";
    +const std::string moved_permanently =
    +  "<html>"
    +  "<head><title>Moved Permanently</title></head>"
    +  "<body><h1>301 Moved Permanently</h1></body>"
    +  "</html>";
    +const std::string moved_permanently_name = "301-moved-permanently.html";
    +const std::string found =
    +  "<html>"
    +  "<head><title>Found</title></head>"
    +  "<body><h1>302 Found</h1></body>"
    +  "</html>";
    +const std::string found_name = "302-found.html";
    +const std::string see_other =
    +  "<html>"
    +  "<head><title>See Other</title></head>"
    +  "<body><h1>303 See Other</h1></body>"
    +  "</html>";
    +const std::string see_other_name = "303-see-other.html";
    +const std::string not_modified =
    +  "<html>"
    +  "<head><title>Not Modified</title></head>"
    +  "<body><h1>304 Not Modified</h1></body>"
    +  "</html>";
    +const std::string not_modified_name = "304-not-modified.html";
    +const std::string moved_temporarily =
    +  "<html>"
    +  "<head><title>Moved Temporarily</title></head>"
    +  "<body><h1>307 Moved Temporarily</h1></body>"
    +  "</html>";
    +const std::string moved_temporarily_name = "307-moved-temporarily.html";
    +const std::string bad_request =
    +  "<html>"
    +  "<head><title>Bad Request</title></head>"
    +  "<body><h1>400 Bad Request</h1></body>"
    +  "</html>";
    +const std::string bad_request_name = "400-bad-request.html";
    +const std::string unauthorized =
    +  "<html>"
    +  "<head><title>Unauthorized</title></head>"
    +  "<body><h1>401 Unauthorized</h1></body>"
    +  "</html>";
    +const std::string unauthorized_name = "401-unauthorized.html";
    +const std::string forbidden =
    +  "<html>"
    +  "<head><title>Forbidden</title></head>"
    +  "<body><h1>403 Forbidden</h1></body>"
    +  "</html>";
    +const std::string forbidden_name = "403-forbidden.html";
    +const std::string not_found =
    +  "<html>"
    +  "<head><title>Not Found</title></head>"
    +  "<body><h1>404 Not Found</h1></body>"
    +  "</html>";
    +const std::string not_found_name = "404-not-found.html";
    +const std::string request_entity_too_large =
    +  "<html>"
    +  "<head><title>Request Entity Too Large</title></head>"
    +  "<body><h1>413 Request Entity Too Large</h1></body>"
    +  "</html>";
    +const std::string request_entity_too_large_name = "413-request-entity-too-large.html";
    +const std::string requested_range_not_satisfiable =
    +  "<html>"
    +  "<head><title>Requested Range Not Satisfiable</title></head>"
    +  "<body><h1>416 Requested Range Not Satisfiable</h1></body>"
    +  "</html>";
    +const std::string requested_range_not_satisfiable_name =
    +  "416-requested-range-not-satisfiable.html";
    +const std::string internal_server_error =
    +  "<html>"
    +  "<head><title>Internal Server Error</title></head>"
    +  "<body><h1>500 Internal Server Error</h1></body>"
    +  "</html>";
    +const std::string internal_server_error_name = "500-internal-server-error.html";
    +const std::string not_implemented =
    +  "<html>"
    +  "<head><title>Not Implemented</title></head>"
    +  "<body><h1>501 Not Implemented</h1></body>"
    +  "</html>";
    +const std::string not_implemented_name = "501-not-implemented.html";
    +const std::string bad_gateway =
    +  "<html>"
    +  "<head><title>Bad Gateway</title></head>"
    +  "<body><h1>502 Bad Gateway</h1></body>"
    +  "</html>";
    +const std::string bad_gateway_name = "502-bad-gateway.html";
    +const std::string service_unavailable =
    +  "<html>"
    +  "<head><title>Service Unavailable</title></head>"
    +  "<body><h1>503 Service Unavailable</h1></body>"
    +  "</html>";
    +const std::string service_unavailable_name ="503-service-unavailable.html";
    +
    +const std::string& toText(Reply::status_type status)
    +{
    +  switch (status)
    +  {
    +  case Reply::ok:
    +    return ok;
    +  case Reply::created:
    +    return created;
    +  case Reply::accepted:
    +    return accepted;
    +  case Reply::no_content:
    +    return no_content;
    +  case Reply::multiple_choices:
    +    return multiple_choices;
    +  case Reply::moved_permanently:
    +    return moved_permanently;
    +  case Reply::found:
    +    return found;
    +  case Reply::see_other:
    +    return see_other;
    +  case Reply::not_modified:
    +    return not_modified;
    +  case Reply::moved_temporarily:
    +    return moved_temporarily;
    +  case Reply::bad_request:
    +    return bad_request;
    +  case Reply::unauthorized:
    +    return unauthorized;
    +  case Reply::forbidden:
    +    return forbidden;
    +  case Reply::not_found:
    +    return not_found;
    +  case Reply::request_entity_too_large:
    +    return request_entity_too_large;
    +  case Reply::requested_range_not_satisfiable:
    +    return requested_range_not_satisfiable;
    +  case Reply::internal_server_error:
    +    return internal_server_error;
    +  case Reply::not_implemented:
    +    return not_implemented;
    +  case Reply::bad_gateway:
    +    return bad_gateway;
    +  case Reply::service_unavailable:
    +    return service_unavailable;
    +  default:
    +    return internal_server_error;
    +  }
    +}
    +
    +const std::string& toName(Reply::status_type status)
    +{
    +  switch (status)
    +  {
    +  case Reply::ok:
    +    return ok_name;
    +  case Reply::created:
    +    return created_name;
    +  case Reply::accepted:
    +    return accepted_name;
    +  case Reply::no_content:
    +    return no_content_name;
    +  case Reply::multiple_choices:
    +    return multiple_choices_name;
    +  case Reply::moved_permanently:
    +    return moved_permanently_name;
    +  case Reply::found:
    +    return found_name;
    +  case Reply::see_other:
    +    return see_other_name;
    +  case Reply::not_modified:
    +    return not_modified_name;
    +  case Reply::moved_temporarily:
    +    return moved_temporarily_name;
    +  case Reply::bad_request:
    +    return bad_request_name;
    +  case Reply::unauthorized:
    +    return unauthorized_name;
    +  case Reply::forbidden:
    +    return forbidden_name;
    +  case Reply::not_found:
    +    return not_found_name;
    +  case Reply::request_entity_too_large:
    +    return request_entity_too_large_name;
    +  case Reply::requested_range_not_satisfiable:
    +    return requested_range_not_satisfiable;
    +  case Reply::internal_server_error:
    +    return internal_server_error_name;
    +  case Reply::not_implemented:
    +    return not_implemented_name;
    +  case Reply::bad_gateway:
    +    return bad_gateway_name;
    +  case Reply::service_unavailable:
    +    return service_unavailable_name;
    +  default:
    +    return internal_server_error_name;
    +  }
    +}
    +
    +void buildOriginalURL(const Request &req, std::string &url)
    +{
    +  if (url.empty()) {
    +    url = "http://";
    +    for (std::size_t i = 0; i < req.headerOrder.size(); ++i) {
    +      Request::HeaderMap::const_iterator it = req.headerOrder[i];
    +      if (it->first == "Host") {
    +	url += it->second;
    +	break;
    +      }
    +    }
    +    url += req.uri;
    +  }
    +}
    +
    +void escapeOriginalUrl(const std::string &original, std::string &escaped)
    +{
    +  static const char bin2hex[] = "0123456789abcdef";
    +  std::string::const_iterator iter(original.begin());
    +
    +  for (;iter != original.end(); iter++) {
    +    char act = *iter;
    +    if ((act >= '0' && act <= '9') ||
    +	(act >= 'a' && act <= 'z') ||
    +	(act >= 'Z' && act <= 'Z') ||
    +	(act == '-' || act == '_'))
    +      escaped += act;
    +    else {
    +      escaped += '%';
    +      escaped += bin2hex[(((unsigned char)act) >> 4) & 0x0F];
    +      escaped += bin2hex[(((unsigned char)act)     ) & 0x0F];
    +    }
    +  }
    +  std::cerr << "ORIGINAL URL: " << original
    +	    << " ESCAPED: " << escaped << std::endl;
    +}
    +
    +} // namespace stock_replies
    +
    +StockReply::StockReply(const Request& request,
    +		       status_type status)
    +  : Reply(request),
    +    status_(status),
    +    transmitted_(false)
    +{ }
    +
    +StockReply::StockReply(const Request& request,
    +		       status_type status, std::string extraContent)
    +  : Reply(request),
    +    status_(status),
    +    content_(extraContent),
    +    transmitted_(false)
    +{ }
    +
    +StockReply::StockReply(const Request& request, status_type status,
    +		       const std::string &extraContent,
    +		       const std::string &err_root)
    +  : Reply(request),
    +    status_(status),
    +    err_root_(err_root),
    +    content_(extraContent),
    +    transmitted_(false)
    +{ }
    +
    +void StockReply::consumeData(Buffer::const_iterator begin,
    +			     Buffer::const_iterator end,
    +			     Request::State state)
    +{
    +  if (state != Request::Partial)
    +    send();
    +}
    +
    +Reply::status_type StockReply::responseStatus()
    +{
    +  return status_;
    +}
    +
    +std::string StockReply::contentType()
    +{
    +  return "text/html";
    +}
    +
    +::int64_t StockReply::contentLength()
    +{
    +  std::string full_path(err_root_ + stock_replies::toName(status_));
    +  std::string original_url;
    +  std::string content = "";
    +  std::string line;
    +  size_t clen = content_.length();
    +  std::ifstream ifstr(full_path.c_str(), std::ios::in | std::ios::binary);
    +
    +  while (ifstr.good() && !ifstr.eof()) {
    +    std::getline(ifstr, line);
    +    size_t index = 0;
    +
    +    while ((index = line.find("<-- SPECIAL CONTENT -->", index)) != line.npos) {
    +      line.replace(index,sizeof("<-- SPECIAL CONTENT -->")-1, content_);
    +      index += clen;
    +    }
    +
    +    index = line.find("<-- ORIGINAL URL -->");
    +
    +    if (index != line.npos) {
    +      stock_replies::buildOriginalURL(request_, original_url);
    +      clen = original_url.length();
    +
    +      do {
    +	line.replace(index,sizeof("<-- ORIGINAL URL -->")-1, original_url);
    +	index += clen;
    +      } while((index = line.find("<-- ORIGINAL URL -->", index) != line.npos));
    +
    +    }
    +
    +    index = line.find("<-- ORIGINAL URL ESCAPED -->");
    +
    +    if (index != line.npos) {
    +      if (original_url.empty())
    +	stock_replies::buildOriginalURL(request_, original_url);
    +
    +      std::string escapedUrl;
    +      stock_replies::escapeOriginalUrl(original_url, escapedUrl);
    +      clen = escapedUrl.length();
    +
    +      do {
    +	line.replace(index,sizeof("<-- ORIGINAL URL ESCAPED -->") - 1,
    +		     escapedUrl);
    +	index += clen;
    +      } while((index = line.find("<-- ORIGINAL URL ESCAPED -->", index)
    +	       != line.npos));
    +    }
    +    content += line + "\r\n";
    +  }
    +  ifstr.close();
    +
    +  if (content.empty())
    +    content_ = stock_replies::toText(status_) + content_;
    +  else
    +    content_ = content;
    +
    +  return content_.length();
    +}
    +
    +asio::const_buffer StockReply::nextContentBuffer()
    +{
    +  if (!transmitted_) {
    +    transmitted_ = true;
    +    return asio::buffer(content_);
    +  } else
    +    return emptyBuffer;
    +}
    +
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/StockReply.h b/wt-3.1.7a/src/http/StockReply.h
    new file mode 100644
    index 0000000..3f3b929
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/StockReply.h
    @@ -0,0 +1,62 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// reply.hpp
    +// ~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_STOCK_REPLY_HPP
    +#define HTTP_STOCK_REPLY_HPP
    +
    +#include <string>
    +#include <vector>
    +#include <boost/asio.hpp>
    +namespace asio = boost::asio;
    +
    +#include "Reply.h"
    +#include "WHttpDllDefs.h"
    +
    +namespace http {
    +namespace server {
    +
    +/// A stock reply to be sent to a client.
    +class WTHTTP_API StockReply : public Reply
    +{
    +public:
    +  StockReply(const Request& request, status_type status);
    +  StockReply(const Request& request, status_type status,
    +	     std::string extraContent);
    +  StockReply(const Request& request, status_type status,
    +	     const std::string &extraContent, const std::string &err_root);
    +
    +  virtual void consumeData(Buffer::const_iterator begin,
    +			   Buffer::const_iterator end,
    +			   Request::State state);
    +
    +protected:
    +  virtual status_type responseStatus();
    +  virtual std::string contentType();
    +  virtual ::int64_t contentLength();
    +
    +  virtual asio::const_buffer nextContentBuffer();  
    +
    +private:
    +  status_type status_;
    +  std::string err_root_;
    +  std::string content_;
    +  bool transmitted_;
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_STOCK_REPLY_HPP
    diff --git a/wt-3.1.7a/src/http/TcpConnection.C b/wt-3.1.7a/src/http/TcpConnection.C
    new file mode 100644
    index 0000000..63c051f
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/TcpConnection.C
    @@ -0,0 +1,84 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +// 
    +// connection.cpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#include <vector>
    +#include <boost/bind.hpp>
    +
    +#include "TcpConnection.h"
    +
    +namespace http {
    +namespace server {
    +
    +TcpConnection::TcpConnection(asio::io_service& io_service, Server *server,
    +    ConnectionManager& manager, RequestHandler& handler)
    +  : Connection(io_service, server, manager, handler),
    +    socket_(io_service)
    +{ }
    +
    +asio::ip::tcp::socket& TcpConnection::socket()
    +{
    +  return socket_;
    +}
    +
    +void TcpConnection::stop()
    +{
    +  finishReply();
    +  try {
    +    boost::system::error_code ignored_ec;
    +    socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
    +    socket_.close();
    +  } catch (asio_system_error&) {
    +  }
    +}
    +
    +typedef void (Connection::*HandleRead)(const asio_error_code&, std::size_t);
    +typedef void (Connection::*HandleWrite)(const asio_error_code&);
    +
    +void TcpConnection::startAsyncReadRequest(Buffer& buffer, int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  socket_.async_read_some(asio::buffer(buffer),
    +      boost::bind(static_cast<HandleRead>(&Connection::handleReadRequest),
    +		  shared_from_this(),
    +		  asio::placeholders::error,
    +		  asio::placeholders::bytes_transferred));
    +}
    +
    +void TcpConnection::startAsyncReadBody(Buffer& buffer, int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  socket_.async_read_some(asio::buffer(buffer),
    +       boost::bind(static_cast<HandleRead>(&Connection::handleReadBody),
    +		   shared_from_this(),
    +		   asio::placeholders::error,
    +		   asio::placeholders::bytes_transferred));
    +}
    +
    +void TcpConnection::startAsyncWriteResponse
    +    (const std::vector<asio::const_buffer>& buffers,
    +     int timeout)
    +{
    +  setTimeout(timeout);
    +
    +  asio::async_write(socket_, buffers,
    +       boost::bind(static_cast<HandleWrite>(&Connection::handleWriteResponse),
    +		   shared_from_this(),
    +		   asio::placeholders::error));
    +}
    +
    +} // namespace server
    +} // namespace http
    diff --git a/wt-3.1.7a/src/http/TcpConnection.h b/wt-3.1.7a/src/http/TcpConnection.h
    new file mode 100644
    index 0000000..53b8749
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/TcpConnection.h
    @@ -0,0 +1,65 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +// connection.hpp
    +// ~~~~~~~~~~~~~~
    +//
    +// Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com)
    +//
    +// Distributed under the Boost Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +//
    +
    +#ifndef HTTP_TCP_CONNECTION_HPP
    +#define HTTP_TCP_CONNECTION_HPP
    +
    +#include <boost/asio.hpp>
    +namespace asio = boost::asio;
    +
    +#include <boost/array.hpp>
    +#include <boost/noncopyable.hpp>
    +#include <boost/shared_ptr.hpp>
    +#include <boost/enable_shared_from_this.hpp>
    +
    +#include "Connection.h"
    +
    +namespace http {
    +namespace server {
    +
    +class RequestHandler;
    +class Server;
    +
    +/// Represents a single connection from a client.
    +class TcpConnection : public Connection
    +{
    +public:
    +  /// Construct a connection with the given io_service.
    +  explicit TcpConnection(asio::io_service& io_service, Server *server,
    +      ConnectionManager& manager, RequestHandler& handler);
    +
    +  /// Get the socket associated with the connection.
    +  virtual asio::ip::tcp::socket& socket();
    +
    +  virtual void stop();
    +  virtual std::string urlScheme() { return "http"; }
    +
    +protected:
    +  virtual void startAsyncReadRequest(Buffer& buffer, int timeout);
    +  virtual void startAsyncReadBody(Buffer& buffer, int timeout);
    +  virtual void startAsyncWriteResponse
    +      (const std::vector<asio::const_buffer>& buffers, int timeout);
    +
    +  /// Socket for the connection.
    +  asio::ip::tcp::socket socket_;
    +};
    +
    +typedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // HTTP_CONNECTION_HPP
    diff --git a/wt-3.1.7a/src/http/WHttpDllDefs.h b/wt-3.1.7a/src/http/WHttpDllDefs.h
    new file mode 100644
    index 0000000..c2e510b
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/WHttpDllDefs.h
    @@ -0,0 +1,50 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2006 Wim Dumon, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WHTTPDLLDEFS_H_
    +#define WHTTPDLLDEFS_H_
    +
    +#include "Wt/WConfig.h"
    +
    +// Source: http://www.nedprod.com/programs/gccvisibility.html
    +
    +#ifdef WIN32
    +  #define WTHTTP_IMPORT __declspec(dllimport)
    +  #define WTHTTP_EXPORT __declspec(dllexport)
    +  #define WTHTTP_DLLLOCAL
    +  #define WTHTTP_DLLPUBLIC
    +#else
    +  #define WTHTTP_IMPORT
    +  #ifdef GCC_HASCLASSVISIBILITY
    +    #define WTHTTP_IMPORT __attribute__ ((visibility("default")))
    +    #define WTHTTP_EXPORT __attribute__ ((visibility("default")))
    +    #define WTHTTP_DLLLOCAL __attribute__ ((visibility("hidden")))
    +    #define WTHTTP_DLLPUBLIC __attribute__ ((visibility("default")))
    +  #else
    +    #define WTHTTP_IMPORT
    +    #define WTHTTP_EXPORT
    +    #define WTHTTP_DLLLOCAL
    +    #define WTHTTP_DLLPUBLIC
    +  #endif
    +#endif
    +
    +// Define wthttp_EXPORTS for DLL builds
    +#ifdef WIN32
    +  #ifdef wthttp_EXPORTS
    +    #define WTHTTP_API WTHTTP_EXPORT
    +  #else
    +    #ifdef WTHTTP_STATIC
    +      #define WTHTTP_API
    +    #else
    +      #define WTHTTP_API WTHTTP_IMPORT
    +    #endif
    +  #endif
    +#else
    +  #define WTHTTP_API
    +#endif
    +
    +#endif
    +
    diff --git a/wt-3.1.7a/src/http/WServer.C b/wt-3.1.7a/src/http/WServer.C
    new file mode 100644
    index 0000000..1f056b2
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/WServer.C
    @@ -0,0 +1,472 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Wt/WServer"
    +#include "Wt/WResource"
    +
    +#include <iostream>
    +#include <string>
    +
    +#if !defined(_WIN32)
    +#include <signal.h>
    +#include <sys/types.h>
    +#include <sys/wait.h>
    +#include <pthread.h>
    +#endif // !_WIN32
    +
    +#ifdef WT_THREADED
    +#include <boost/asio.hpp>
    +#include <boost/thread.hpp>
    +#endif // WT_THREADED
    +
    +#include <boost/bind.hpp>
    +
    +#include "Connection.h"
    +#include "Server.h"
    +#include "Configuration.h"
    +#include "../web/Configuration.h"
    +#include "WebController.h"
    +#include "HTTPStream.h"
    +
    +#ifdef WT_THREADED
    +typedef boost::thread thread_t;
    +#endif
    +namespace {
    +  bool gdb = false;
    +
    +  static std::string getWtConfigXml(int argc, char *argv[],
    +				    const std::string& configurationFile)
    +  {
    +    std::string wt_config_xml;
    +    Wt::WLogger stderrLogger;
    +    stderrLogger.setStream(std::cerr);
    +    
    +    http::server::Configuration serverConfiguration(stderrLogger, true);
    +    serverConfiguration.setOptions(argc, argv, configurationFile);
    +    
    +    return serverConfiguration.configPath();
    +  }
    +
    +}
    +
    +namespace Wt {
    +
    +struct WServerImpl {
    +  WServerImpl(const std::string& wtApplicationPath,
    +	      const std::string& wtConfigurationFile)
    +    : applicationPath_(wtApplicationPath),
    +      wtConfigurationFile_(wtConfigurationFile),
    +      wtConfiguration_(0),
    +      webController_(0),
    +      serverConfiguration_(0),
    +      server_(0)
    +  { }
    +  
    +  ~WServerImpl() {
    +    delete serverConfiguration_;
    +    delete webController_;
    +    delete wtConfiguration_;
    +  }
    +
    +  void readConfiguration(const WServer *server) {
    +    readConfiguration(0, 0, std::string(), server);
    +  }
    +
    +  void readConfiguration(int argc, char *argv[],
    +			 const std::string& serverConfigurationFile,
    +			 const WServer *server)
    +  {
    +    if (!wtConfiguration_) {
    +      if (wtConfigurationFile_.empty())
    +	wtConfigurationFile_ = getWtConfigXml(argc, argv,
    +					      serverConfigurationFile);
    +
    +      wtConfiguration_
    +	= new Wt::Configuration(applicationPath_, "",
    +				wtConfigurationFile_,
    +				Wt::Configuration::WtHttpdServer,
    +				"Wt: initializing built-in httpd");
    +
    +      webController_
    +	= new Wt::WebController(*wtConfiguration_,
    +				const_cast<WServer *>(server), &stream_);
    +
    +      serverConfiguration_
    +	= new http::server::Configuration(wtConfiguration_->logger());
    +
    +      if (argc != 0)
    +	serverConfiguration_->setOptions(argc, argv, serverConfigurationFile);
    +    }
    +  }
    +
    +  std::string    applicationPath_, wtConfigurationFile_;
    +  Configuration *wtConfiguration_;
    +  HTTPStream     stream_;
    +  WebController *webController_;
    +
    +  http::server::Configuration *serverConfiguration_;
    +  http::server::Server        *server_;
    +#ifdef WT_THREADED
    +  thread_t **threads_;
    +#endif
    +};
    +
    +WServer::WServer(const std::string& applicationPath,
    +		 const std::string& wtConfigurationFile)
    +  : impl_(new WServerImpl(applicationPath, wtConfigurationFile))
    +{ }
    +
    +WServer::~WServer()
    +{
    +  if (impl_->server_) {
    +    try {
    +      stop();
    +    } catch (...) {
    +      std::cerr << "WServer::~WServer: oops, stop() threw exception!"
    +		<< std::endl;
    +    }
    +  }
    +
    +  delete impl_;
    +}
    +
    +void WServer::setServerConfiguration(int argc, char *argv[],
    +				     const std::string& serverConfigurationFile)
    +{
    +  impl_->readConfiguration(argc, argv, serverConfigurationFile, this);
    +}
    +
    +void WServer::addEntryPoint(EntryPointType type, ApplicationCreator callback,
    +			    const std::string& path, const std::string& favicon)
    +{
    +  if (!path.empty() && !boost::starts_with(path, "/")) 
    +    throw WServer::Exception("WServer::addEntryPoint() error: "
    +			     "deployment path should start with \'/\'");
    +
    +  impl_->readConfiguration(this);
    +  impl_->wtConfiguration_->addEntryPoint(EntryPoint(type, callback,
    +						    path, favicon));
    +}
    +
    +void WServer::addResource(WResource *resource, const std::string& path)
    +{
    +  if (!boost::starts_with(path, "/")) 
    +    throw WServer::Exception("WServer::addResource() error: "
    +			     "static resource path should start with \'/\'");
    +
    +  resource->setInternalPath(path);
    +
    +  impl_->readConfiguration(this);
    +  impl_->wtConfiguration_->addEntryPoint(EntryPoint(resource, path));
    +}
    +
    +bool WServer::start()
    +{
    +  impl_->readConfiguration(this);
    +
    +  gdb = impl_->serverConfiguration_->gdb();
    +
    +  if (isRunning()) {
    +    std::cerr << "WServer::start() error: server already started!" << std::endl;
    +    return false;
    +  }
    +
    +#ifndef WIN32
    +  srand48(getpid());
    +#endif
    +
    +  // Override sessionIdPrefix setting
    +  if (!impl_->serverConfiguration_->sessionIdPrefix().empty())
    +    impl_->wtConfiguration_->setSessionIdPrefix
    +      (impl_->serverConfiguration_->sessionIdPrefix());
    +
    +  // Set default entry point
    +  impl_->wtConfiguration_->setDefaultEntryPoint
    +    (impl_->serverConfiguration_->deployPath());
    +
    +  try {
    +    impl_->server_ = new http::server::Server(*impl_->serverConfiguration_,
    +					      *impl_->wtConfiguration_,
    +                                              *impl_->webController_);
    +#ifndef WT_THREADED
    +    impl_->serverConfiguration_->log("warn")
    +      << "No boost thread support, running in main thread.";
    +
    +    impl_->server_->run();
    +
    +    delete impl_->server_;
    +    impl_->server_ = 0;
    +
    +    return false;
    +#else // WT_THREADED
    +
    +#if !defined(_WIN32)
    +    // Block all signals for background threads.
    +    sigset_t new_mask;
    +    sigfillset(&new_mask);
    +    sigset_t old_mask;
    +    pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
    +#endif // _WIN32
    +
    +    int NUM_THREADS = impl_->serverConfiguration_->threads();
    +
    +    impl_->threads_ = new thread_t *[NUM_THREADS];
    +
    +    for (int i = 0; i < NUM_THREADS; ++i)
    +      impl_->threads_[i] =
    +	new thread_t(boost::bind(&http::server::Server::run, impl_->server_));
    +
    +#if !defined(_WIN32)
    +    // Restore previous signals.
    +    pthread_sigmask(SIG_SETMASK, &old_mask, 0);
    +#endif // _WIN32
    +
    +#endif // WT_THREADED
    +
    +    return true;
    +  } catch (asio_system_error& e) {
    +    throw Exception(std::string("Error (asio): ") + e.what());
    +  } catch (std::exception& e) {
    +    throw Exception(std::string("Error: ") + e.what());
    +  }
    +}
    +
    +bool WServer::isRunning() const
    +{
    +  return impl_->server_;
    +}
    +
    +#if defined(_WIN32) && defined(WT_THREADED)
    +
    +boost::mutex     terminationMutex;
    +boost::condition ctrlCHit;
    +boost::condition serverStopped;
    +
    +BOOL WINAPI console_ctrl_handler(DWORD ctrl_type)
    +{
    +  switch (ctrl_type)
    +  {
    +  case CTRL_C_EVENT:
    +  case CTRL_BREAK_EVENT:
    +  case CTRL_CLOSE_EVENT:
    +  case CTRL_SHUTDOWN_EVENT:
    +    {
    +      boost::mutex::scoped_lock terminationLock(terminationMutex);
    +
    +      ctrlCHit.notify_all(); // should be just 1
    +      return TRUE;
    +    }
    +  default:
    +    return FALSE;
    +  }
    +}
    +#endif
    +
    +void WServer::stop()
    +{
    +  if (!isRunning()) {
    +    std::cerr << "WServer::stop() error: server not yet started!" << std::endl;
    +    return;
    +  }
    +
    +#ifdef WT_THREADED
    +  try {
    +    // Stop the Wt application server (cleaning up all sessions).
    +    impl_->webController_->forceShutdown();
    +
    +    // Stop the server.
    +    impl_->server_->stop();
    +
    +    int NUM_THREADS = impl_->serverConfiguration_->threads();
    +    for (int i = 0; i < NUM_THREADS; ++i) {
    +      impl_->threads_[i]->join();
    +      delete impl_->threads_[i];
    +    }
    +
    +    delete[] impl_->threads_;
    +    impl_->threads_ = 0;
    +
    +    delete impl_->server_;
    +    impl_->server_ = 0;
    +  } catch (asio_system_error& e) {
    +    throw Exception(std::string("Error (asio): ") + e.what());
    +  } catch (std::exception& e) {
    +    throw Exception(std::string("Error: ") + e.what());
    +  }
    +
    +#if defined(_WIN32)
    +  serverStopped.notify_all();
    +#endif // WIN32
    +
    +#else // WT_THREADED
    +  impl_->webController_->forceShutdown();
    +  impl_->server_->stop();
    +#endif // WT_THREADED
    +}
    +
    +int WServer::httpPort() const
    +{
    +  return impl_->server_->httpPort();
    +}
    +
    +void WServer::restart(int argc, char **argv, char **envp)
    +{
    +#ifndef WIN32
    +  char *path = realpath(argv[0], 0);
    +
    +  // Try a few times since this may fail because we have an incomplete
    +  // binary...
    +  for (int i = 0; i < 5; ++i) {
    +    int result = execve(path, argv, envp);
    +    if (result != 0)
    +#ifndef WIN32
    +      sleep(1);
    +#else
    +      Sleep(1000);
    +#endif
    +  }
    +  perror("execve");
    +#endif
    +}
    +
    +void WServer::handleRequest(WebRequest *request)
    +{
    +  impl_->webController_->handleRequest(request);
    +}
    +
    +int WServer::waitForShutdown(const char *restartWatchFile)
    +{
    +#if !defined(WIN32)
    +  if (gdb) {
    +    for(;;)
    +      sleep(0x1<<16);
    +  }
    +#endif // WIN32
    +
    +#ifdef WT_THREADED
    +
    +#if !defined(_WIN32)
    +  sigset_t wait_mask;
    +  sigemptyset(&wait_mask);
    +
    +  sigaddset(&wait_mask, SIGHUP);
    +  sigaddset(&wait_mask, SIGINT);
    +  sigaddset(&wait_mask, SIGQUIT);
    +  sigaddset(&wait_mask, SIGTERM);
    +  pthread_sigmask(SIG_BLOCK, &wait_mask, 0);
    +
    +#ifdef RESTART_WATCH_FILE
    +  struct stat st;
    +  time_t mtime = 0;
    +  if (restartWatchFile && (stat(restartWatchFile, &st) == 0))
    +    mtime = st.st_mtime;
    +#endif // RESTART_WATCH_FILE
    +
    +  for (;;) {
    +    int sig;
    +#ifdef RESTART_WATCH_FILE
    +    if (mtime) {
    +      struct timespec ts;
    +      ts.tv_sec = 0;
    +      ts.tv_nsec = 100*1000;
    +      sig = sigtimedwait(&wait_mask, 0, &ts);
    +    } else
    +#endif // RESTART_WATCH_FILE
    +      sigwait(&wait_mask, &sig);
    +
    +    if (sig != -1)
    +      return sig;
    +#ifdef RESTART_WATCH_FILE
    +    else
    +      if (errno != EAGAIN && errno != EINTR) {
    +	perror("sigtimedwait");
    +	return -1;
    +      } else if (errno == EAGAIN && mtime) {
    +	if (stat(restartWatchFile, &st) == 0)
    +	  if (st.st_mtime != mtime)
    +	    return SIGHUP;
    +      }
    +#endif // RESTART_WATCH_FILE
    +  }
    +
    +#else  // WIN32
    +
    +  boost::mutex::scoped_lock terminationLock(terminationMutex);
    +  SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
    +  ctrlCHit.wait(terminationLock);
    +  SetConsoleCtrlHandler(console_ctrl_handler, FALSE);
    +  return 0;
    +
    +#endif // WIN32
    +#else
    +  return 0;
    +#endif // WT_THREADED
    +}
    +
    +void WServer::expireSessions()
    +{
    +  impl_->webController_->expireSessions();
    +}
    +
    +std::string WServer::appRoot() const
    +{
    +  impl_->readConfiguration(this);
    +
    +  return impl_->webController_->configuration().appRoot();
    +}
    +
    +bool WServer::readConfigurationProperty(const std::string& name,
    +    std::string& value) const
    +{
    +  impl_->readConfiguration(this);
    +
    +  return impl_->webController_->configuration()
    +    .readConfigurationProperty(name, value);
    +}
    +
    +int WRun(int argc, char *argv[], ApplicationCreator createApplication)
    +{
    +  try {
    +    WServer server(argv[0], "");
    +    try {
    +      server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
    +      server.addEntryPoint(Application, createApplication);
    +      if (server.start()) {
    +#ifdef WT_THREADED
    +	int sig = WServer::waitForShutdown(argv[0]);
    +	server.impl()->serverConfiguration_->log("notice")
    +	  << "Shutdown (signal = " << sig << ")";
    +#endif
    +	server.stop();
    +
    +#ifdef WT_THREADED
    +#ifndef WIN32
    +	if (sig == SIGHUP)
    +	  // Mac OSX: _NSGetEnviron()
    +	  WServer::restart(argc, argv, 0);
    +#endif // WIN32
    +#endif // WT_THREADED
    +      }
    +
    +      return 0;
    +    } catch (std::exception& e) {
    +      if (server.impl()->serverConfiguration_)
    +	server.impl()->serverConfiguration_->log("fatal") << e.what();
    +      else
    +	std::cerr << "Error: " << e.what() << std::endl;
    +      return 1;
    +    }
    +  } catch (Wt::WServer::Exception& e) {
    +    std::cerr << e.what() << std::endl;
    +    return 1;
    +  } catch (std::exception& e) {
    +    std::cerr << "exception: " << e.what() << std::endl;
    +    return 1;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/http/WtReply.C b/wt-3.1.7a/src/http/WtReply.C
    new file mode 100644
    index 0000000..c2bb8cf
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/WtReply.C
    @@ -0,0 +1,339 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/pointer_cast.hpp>
    +
    +#include "Wt/WServer"
    +#include "WtReply.h"
    +#include "StockReply.h"
    +#include "HTTPRequest.h"
    +#include "WebController.h"
    +#include "Server.h"
    +#include "Utils.h"
    +
    +#include <fstream>
    +
    +namespace http {
    +  namespace server {
    +
    +WtReply::WtReply(const Request& request, const Wt::EntryPoint& entryPoint,
    +                 const Configuration &config)
    +  : Reply(request),
    +    entryPoint_(entryPoint),
    +    contentLength_(-1),
    +    bodyReceived_(0),
    +    sendingMessages_(false),
    +    sending_(false)
    +{
    +  urlScheme_ = request.urlScheme;
    +
    +  status_ = ok;
    +
    +  if (request.contentLength > config.maxMemoryRequestSize()) {
    +    requestFileName_ = Wt::Utils::createTempFileName();
    +    // First, create the file
    +    std::ofstream o(requestFileName_.c_str());
    +    o.close();
    +    // Now, open it for read/write
    +    cin_ = new std::fstream(requestFileName_.c_str(),
    +      std::ios::in | std::ios::out | std::ios::binary);
    +    if (!*cin_) {
    +      // Give up, spool to memory
    +      requestFileName_ = "";
    +      delete cin_;
    +      cin_ = &cin_mem_;
    +    }
    +  } else {
    +    cin_ = &cin_mem_;
    +  }
    +
    +  httpRequest_ = 0;
    +}
    +
    +void WtReply::release()
    +{
    +  delete httpRequest_;
    +  httpRequest_ = 0;
    +}
    +
    +WtReply::~WtReply()
    +{
    +  if (&cin_mem_ != cin_) {
    +    dynamic_cast<std::fstream *>(cin_)->close();
    +    delete cin_;
    +  }
    +  if (requestFileName_ != "") {
    +    unlink(requestFileName_.c_str());
    +  }
    +}
    +
    +void WtReply::consumeData(Buffer::const_iterator begin,
    +			  Buffer::const_iterator end,
    +			  Request::State state)
    +{
    +  if (readMessageCallback_)
    +    consumeWebSocketMessage(begin, end, state);
    +  else
    +    consumeRequestBody(begin, end, state);
    +}
    +
    +void WtReply::consumeRequestBody(Buffer::const_iterator begin,
    +				 Buffer::const_iterator end,
    +				 Request::State state)
    +{
    +  if (status_ != request_entity_too_large)
    +    cin_->write(begin, static_cast<std::streamsize>(end - begin));
    +
    +  if (!request().isWebSocketRequest()) {
    +    if (!httpRequest_)
    +      httpRequest_ = new HTTPRequest(boost::dynamic_pointer_cast<WtReply>
    +				     (shared_from_this()), &entryPoint_);
    +
    +    if (end - begin > 0) {
    +      bodyReceived_ += (end - begin);
    +
    +      if (!connection()->server()->controller()->requestDataReceived
    +	  (httpRequest_, bodyReceived_, request().contentLength)) {
    +	status_ = request_entity_too_large;
    +	setCloseConnection();
    +	state = Request::Error;
    +      }
    +    }
    +  }
    +
    +  if (state != Request::Partial) {
    +    if (request().isWebSocketRequest()) {
    +      if (status_ == ok) {
    +	assert(state == Request::Complete);
    +
    +	std::string origin = request().headerMap.find("Origin")->second;
    +
    +	status_ = switching_protocols;
    +	addHeader("Connection", "Upgrade");
    +	addHeader("Upgrade", "WebSocket");
    +	addHeader("Sec-WebSocket-Origin", origin);
    +
    +	std::string location
    +	  = "ws" + origin.substr(4)
    +	  + request().request_path + "?" + request().request_query;
    +	addHeader("Sec-WebSocket-Location", location);
    +
    +	/*
    +	 * We defer reading the rest of the handshake until after we
    +	 * have sent the 101: some intermediaries may be holding back this
    +	 * data because they are still in HTTP mode
    +	 */
    +	setWaitMoreData(true);
    +	responseSent_ = true;
    +	sending_ = true;
    +	Reply::send();
    +
    +	// This will read more data, starting with the hand-shake.
    +	// The computed handshake response will be passed to the next
    +	// invocation of this method.
    +	connection()->handleReadBody();
    +      } else {
    +	/*
    +	 * We got the nonce and the expected challenge response is
    +	 * available in in(). This should be copied to out() by the
    +	 * web.
    +	 */
    +	if (state == Request::Complete) {
    +	  HTTPRequest *r = new HTTPRequest(boost::dynamic_pointer_cast<WtReply>
    +					   (shared_from_this()), &entryPoint_);
    +
    +	  connection()->server()->controller()->server_->handleRequest(r);
    +	} else {
    +	  setWaitMoreData(false);
    +	  setCloseConnection();
    +	  Reply::send();
    +	  return;
    +	}
    +      }
    +
    +      return;
    +    }
    +
    +    if (status_ >= 300) {
    +      release();
    +      setRelay(ReplyPtr(new StockReply(request(), status_)));
    +      Reply::send();
    +      return;
    +    }
    +
    +    assert(state == Request::Complete);
    +
    +    cin_->seekg(0); // rewind
    +    responseSent_ = false;
    +
    +    HTTPRequest *r = httpRequest_;
    +    httpRequest_ = 0;
    +    connection()->server()->controller()->server_->handleRequest(r);
    +  }
    +}
    +
    +void WtReply::consumeWebSocketMessage(Buffer::const_iterator begin,
    +				      Buffer::const_iterator end,
    +				      Request::State state)
    +{
    +  cin_mem_.write(begin, static_cast<std::streamsize>(end - begin));
    +
    +  if (state != Request::Partial) {
    +    if (state == Request::Error)
    +      cin_mem_.str("");
    +    else {
    +      cin_mem_.seekg(0);
    +    }
    +
    +    CallbackFunction cb = readMessageCallback_;
    +    readMessageCallback_ = 0;
    +    cb();
    +  }
    +}
    +
    +void WtReply::setStatus(int status)
    +{
    +  status_ = (status_type)status;
    +}
    +
    +void WtReply::setContentLength(::int64_t length)
    +{
    +  contentLength_ = length;
    +}
    +
    +void WtReply::setContentType(const std::string& type)
    +{
    +  contentType_ = type;
    +}
    +
    +void WtReply::setLocation(const std::string& location)
    +{
    +  location_ = location;
    +  if (status_ < 300)
    +    status_ = found;
    +}
    +
    +void WtReply::send(const std::string& text, CallbackFunction callBack)
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  if (!connection())
    +    return;
    +
    +  fetchMoreDataCallback_ = callBack;
    +
    +  if (request().isWebSocketRequest() && sendingMessages_) {
    +    // std::cerr << this << " Sending frame of length "
    +    //           << text.length() << std::endl;
    +    nextCout_.clear();
    +    nextCout_ += (char)0;
    +    nextCout_ += text;
    +    nextCout_ += (char)0xFF;
    +  } else {
    +    // std::cerr << this << "Sending response of length "
    +    //           << text.length() << std::endl;
    +    nextCout_.assign(text);
    +    sendingMessages_ = true;
    +  }
    +
    +  responseSent_ = false;
    +
    +  if (!sending_) {
    +    sending_ = true;
    +    Reply::send();
    +  }
    +}
    +
    +void WtReply::readWebSocketMessage(CallbackFunction callBack)
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  assert(request().isWebSocketRequest());
    +
    +  if (readMessageCallback_)
    +    return;
    +
    +  readMessageCallback_ = callBack;
    +
    +  if (&cin_mem_ != cin_) {
    +    dynamic_cast<std::fstream *>(cin_)->close();
    +    delete cin_;
    +    cin_ = &cin_mem_;
    +  }
    +
    +  cin_mem_.str("");
    +
    +  if (connection())
    +    connection()->handleReadBody();
    +}
    +
    +bool WtReply::readAvailable()
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  if (connection())
    +    return connection()->readAvailable();
    +  else
    +    return false;
    +}
    +
    +Reply::status_type WtReply::responseStatus()
    +{
    +  return status_;
    +}
    +
    +std::string WtReply::contentType()
    +{
    +  return contentType_;
    +}
    +
    +std::string WtReply::location()
    +{
    +  return location_;
    +}
    +
    +::int64_t WtReply::contentLength()
    +{
    +  return contentLength_;
    +}
    +
    +asio::const_buffer WtReply::nextContentBuffer()
    +{
    +  // std::cerr << this << "(sending: " << sending_
    +  // 	       << ", reponseSent_: " << responseSent_
    +  //	       << ") nextContentBuffer: " << nextCout_.length() << std::endl;
    +  cout_.clear();
    +  cout_.swap(nextCout_);
    +
    +  if (!responseSent_) {
    +    responseSent_ = true;
    +    if (!cout_.empty())
    +      return asio::buffer(cout_);
    +  } else
    +    cout_.clear();
    +
    +  while (cout_.empty() && fetchMoreDataCallback_) {
    +    CallbackFunction f = fetchMoreDataCallback_;
    +    fetchMoreDataCallback_ = 0;
    +    f();
    +    cout_.swap(nextCout_);
    +  }
    +
    +  if (cout_.empty())
    +    sending_ = false;
    +
    +  return asio::buffer(cout_);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/http/WtReply.h b/wt-3.1.7a/src/http/WtReply.h
    new file mode 100644
    index 0000000..7f8ded7
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/WtReply.h
    @@ -0,0 +1,91 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +//
    +#ifndef HTTP_WT_REPLY_HPP
    +#define HTTP_WT_REPLY_HPP
    +
    +#include <string>
    +#include <sstream>
    +#include <vector>
    +
    +#include "Reply.h"
    +#include "Connection.h"
    +
    +namespace http {
    +namespace server {
    +
    +class StockReply;
    +class HTTPRequest;
    +class WtReply;
    +
    +typedef boost::shared_ptr<WtReply> WtReplyPtr;
    +
    +/// A Wt application reply to be sent to a client.
    +class WtReply : public Reply
    +{
    +public:
    +  typedef boost::function<void(void)> CallbackFunction;
    +
    +  WtReply(const Request& request, const Wt::EntryPoint& ep,
    +	  const Configuration &config);
    +  ~WtReply();
    +
    +  virtual void consumeData(Buffer::const_iterator begin,
    +			   Buffer::const_iterator end,
    +			   Request::State state);
    +
    +  void setStatus(int status);
    +  void setContentLength(::int64_t length);
    +  void setContentType(const std::string& type);
    +  void setLocation(const std::string& location);
    +  void send(const std::string& text, CallbackFunction callBack);
    +  void readWebSocketMessage(CallbackFunction callBack);
    +  bool readAvailable();
    +
    +  std::istream& cin() { return *cin_; }
    +  const Request& request() const { return request_; }
    +  std::string urlScheme() const { return urlScheme_; }
    +
    +protected:
    +  const Wt::EntryPoint& entryPoint_;
    +  std::iostream    *cin_;
    +  std::stringstream cin_mem_;
    +  std::string       requestFileName_;
    +  std::string       cout_, nextCout_;
    +  std::string       contentType_;
    +  std::string       location_;
    +  std::string       urlScheme_;
    +  bool              responseSent_;
    +  status_type       status_;
    +  ::int64_t         contentLength_, bodyReceived_;
    +  bool              sendingMessages_;
    +  CallbackFunction  fetchMoreDataCallback_, readMessageCallback_;
    +  HTTPRequest      *httpRequest_;
    +  bool              sending_;
    +
    +  virtual status_type     responseStatus();
    +  virtual std::string     contentType();
    +  virtual std::string     location();
    +  virtual ::int64_t       contentLength();
    +  virtual void            release();
    +
    +  virtual asio::const_buffer nextContentBuffer();  
    +
    +private:
    +  void consumeRequestBody(Buffer::const_iterator begin,
    +			  Buffer::const_iterator end,
    +			  Request::State state);
    +
    +  void consumeWebSocketMessage(Buffer::const_iterator begin,
    +			       Buffer::const_iterator end,
    +			       Request::State state);
    +};
    +
    +} // namespace server
    +} // namespace http
    +
    +#endif // WT_REPLY_HPP
    diff --git a/wt-3.1.7a/src/http/md5.c b/wt-3.1.7a/src/http/md5.c
    new file mode 100644
    index 0000000..c35d96c
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/md5.c
    @@ -0,0 +1,381 @@
    +/*
    +  Copyright (C) 1999, 2000, 2002 Aladdin Enterprises.  All rights reserved.
    +
    +  This software is provided 'as-is', without any express or implied
    +  warranty.  In no event will the authors be held liable for any damages
    +  arising from the use of this software.
    +
    +  Permission is granted to anyone to use this software for any purpose,
    +  including commercial applications, and to alter it and redistribute it
    +  freely, subject to the following restrictions:
    +
    +  1. The origin of this software must not be misrepresented; you must not
    +     claim that you wrote the original software. If you use this software
    +     in a product, an acknowledgment in the product documentation would be
    +     appreciated but is not required.
    +  2. Altered source versions must be plainly marked as such, and must not be
    +     misrepresented as being the original software.
    +  3. This notice may not be removed or altered from any source distribution.
    +
    +  L. Peter Deutsch
    +  ghost@aladdin.com
    +
    + */
    +/* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */
    +/*
    +  Independent implementation of MD5 (RFC 1321).
    +
    +  This code implements the MD5 Algorithm defined in RFC 1321, whose
    +  text is available at
    +	http://www.ietf.org/rfc/rfc1321.txt
    +  The code is derived from the text of the RFC, including the test suite
    +  (section A.5) but excluding the rest of Appendix A.  It does not include
    +  any code or documentation that is identified in the RFC as being
    +  copyrighted.
    +
    +  The original and principal author of md5.c is L. Peter Deutsch
    +  <ghost@aladdin.com>.  Other authors are noted in the change history
    +  that follows (in reverse chronological order):
    +
    +  2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
    +	either statically or dynamically; added missing #include <string.h>
    +	in library.
    +  2002-03-11 lpd Corrected argument list for main(), and added int return
    +	type, in test program and T value program.
    +  2002-02-21 lpd Added missing #include <stdio.h> in test program.
    +  2000-07-03 lpd Patched to eliminate warnings about "constant is
    +	unsigned in ANSI C, signed in traditional"; made test program
    +	self-checking.
    +  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
    +  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
    +  1999-05-03 lpd Original version.
    + */
    +
    +#include "md5.h"
    +#include <string.h>
    +
    +#undef BYTE_ORDER	/* 1 = big-endian, -1 = little-endian, 0 = unknown */
    +#ifdef ARCH_IS_BIG_ENDIAN
    +#  define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
    +#else
    +#  define BYTE_ORDER 0
    +#endif
    +
    +#define T_MASK ((md5_word_t)~0)
    +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
    +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
    +#define T3    0x242070db
    +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
    +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
    +#define T6    0x4787c62a
    +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
    +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
    +#define T9    0x698098d8
    +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
    +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
    +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
    +#define T13    0x6b901122
    +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
    +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
    +#define T16    0x49b40821
    +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
    +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
    +#define T19    0x265e5a51
    +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
    +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
    +#define T22    0x02441453
    +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
    +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
    +#define T25    0x21e1cde6
    +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
    +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
    +#define T28    0x455a14ed
    +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
    +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
    +#define T31    0x676f02d9
    +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
    +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
    +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
    +#define T35    0x6d9d6122
    +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
    +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
    +#define T38    0x4bdecfa9
    +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
    +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
    +#define T41    0x289b7ec6
    +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
    +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
    +#define T44    0x04881d05
    +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
    +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
    +#define T47    0x1fa27cf8
    +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
    +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
    +#define T50    0x432aff97
    +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
    +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
    +#define T53    0x655b59c3
    +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
    +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
    +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
    +#define T57    0x6fa87e4f
    +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
    +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
    +#define T60    0x4e0811a1
    +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
    +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
    +#define T63    0x2ad7d2bb
    +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
    +
    +
    +static void
    +md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
    +{
    +    md5_word_t
    +	a = pms->abcd[0], b = pms->abcd[1],
    +	c = pms->abcd[2], d = pms->abcd[3];
    +    md5_word_t t;
    +#if BYTE_ORDER > 0
    +    /* Define storage only for big-endian CPUs. */
    +    md5_word_t X[16];
    +#else
    +    /* Define storage for little-endian or both types of CPUs. */
    +    md5_word_t xbuf[16];
    +    const md5_word_t *X;
    +#endif
    +
    +    {
    +#if BYTE_ORDER == 0
    +	/*
    +	 * Determine dynamically whether this is a big-endian or
    +	 * little-endian machine, since we can use a more efficient
    +	 * algorithm on the latter.
    +	 */
    +	static const int w = 1;
    +
    +	if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
    +#endif
    +#if BYTE_ORDER <= 0		/* little-endian */
    +	{
    +	    /*
    +	     * On little-endian machines, we can process properly aligned
    +	     * data without copying it.
    +	     */
    +	    if (!((data - (const md5_byte_t *)0) & 3)) {
    +		/* data are properly aligned */
    +		X = (const md5_word_t *)data;
    +	    } else {
    +		/* not aligned */
    +		memcpy(xbuf, data, 64);
    +		X = xbuf;
    +	    }
    +	}
    +#endif
    +#if BYTE_ORDER == 0
    +	else			/* dynamic big-endian */
    +#endif
    +#if BYTE_ORDER >= 0		/* big-endian */
    +	{
    +	    /*
    +	     * On big-endian machines, we must arrange the bytes in the
    +	     * right order.
    +	     */
    +	    const md5_byte_t *xp = data;
    +	    int i;
    +
    +#  if BYTE_ORDER == 0
    +	    X = xbuf;		/* (dynamic only) */
    +#  else
    +#    define xbuf X		/* (static only) */
    +#  endif
    +	    for (i = 0; i < 16; ++i, xp += 4)
    +		xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
    +	}
    +#endif
    +    }
    +
    +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
    +
    +    /* Round 1. */
    +    /* Let [abcd k s i] denote the operation
    +       a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
    +#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
    +#define SET(a, b, c, d, k, s, Ti)\
    +  t = a + F(b,c,d) + X[k] + Ti;\
    +  a = ROTATE_LEFT(t, s) + b
    +    /* Do the following 16 operations. */
    +    SET(a, b, c, d,  0,  7,  T1);
    +    SET(d, a, b, c,  1, 12,  T2);
    +    SET(c, d, a, b,  2, 17,  T3);
    +    SET(b, c, d, a,  3, 22,  T4);
    +    SET(a, b, c, d,  4,  7,  T5);
    +    SET(d, a, b, c,  5, 12,  T6);
    +    SET(c, d, a, b,  6, 17,  T7);
    +    SET(b, c, d, a,  7, 22,  T8);
    +    SET(a, b, c, d,  8,  7,  T9);
    +    SET(d, a, b, c,  9, 12, T10);
    +    SET(c, d, a, b, 10, 17, T11);
    +    SET(b, c, d, a, 11, 22, T12);
    +    SET(a, b, c, d, 12,  7, T13);
    +    SET(d, a, b, c, 13, 12, T14);
    +    SET(c, d, a, b, 14, 17, T15);
    +    SET(b, c, d, a, 15, 22, T16);
    +#undef SET
    +
    +     /* Round 2. */
    +     /* Let [abcd k s i] denote the operation
    +          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
    +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
    +#define SET(a, b, c, d, k, s, Ti)\
    +  t = a + G(b,c,d) + X[k] + Ti;\
    +  a = ROTATE_LEFT(t, s) + b
    +     /* Do the following 16 operations. */
    +    SET(a, b, c, d,  1,  5, T17);
    +    SET(d, a, b, c,  6,  9, T18);
    +    SET(c, d, a, b, 11, 14, T19);
    +    SET(b, c, d, a,  0, 20, T20);
    +    SET(a, b, c, d,  5,  5, T21);
    +    SET(d, a, b, c, 10,  9, T22);
    +    SET(c, d, a, b, 15, 14, T23);
    +    SET(b, c, d, a,  4, 20, T24);
    +    SET(a, b, c, d,  9,  5, T25);
    +    SET(d, a, b, c, 14,  9, T26);
    +    SET(c, d, a, b,  3, 14, T27);
    +    SET(b, c, d, a,  8, 20, T28);
    +    SET(a, b, c, d, 13,  5, T29);
    +    SET(d, a, b, c,  2,  9, T30);
    +    SET(c, d, a, b,  7, 14, T31);
    +    SET(b, c, d, a, 12, 20, T32);
    +#undef SET
    +
    +     /* Round 3. */
    +     /* Let [abcd k s t] denote the operation
    +          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
    +#define H(x, y, z) ((x) ^ (y) ^ (z))
    +#define SET(a, b, c, d, k, s, Ti)\
    +  t = a + H(b,c,d) + X[k] + Ti;\
    +  a = ROTATE_LEFT(t, s) + b
    +     /* Do the following 16 operations. */
    +    SET(a, b, c, d,  5,  4, T33);
    +    SET(d, a, b, c,  8, 11, T34);
    +    SET(c, d, a, b, 11, 16, T35);
    +    SET(b, c, d, a, 14, 23, T36);
    +    SET(a, b, c, d,  1,  4, T37);
    +    SET(d, a, b, c,  4, 11, T38);
    +    SET(c, d, a, b,  7, 16, T39);
    +    SET(b, c, d, a, 10, 23, T40);
    +    SET(a, b, c, d, 13,  4, T41);
    +    SET(d, a, b, c,  0, 11, T42);
    +    SET(c, d, a, b,  3, 16, T43);
    +    SET(b, c, d, a,  6, 23, T44);
    +    SET(a, b, c, d,  9,  4, T45);
    +    SET(d, a, b, c, 12, 11, T46);
    +    SET(c, d, a, b, 15, 16, T47);
    +    SET(b, c, d, a,  2, 23, T48);
    +#undef SET
    +
    +     /* Round 4. */
    +     /* Let [abcd k s t] denote the operation
    +          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
    +#define I(x, y, z) ((y) ^ ((x) | ~(z)))
    +#define SET(a, b, c, d, k, s, Ti)\
    +  t = a + I(b,c,d) + X[k] + Ti;\
    +  a = ROTATE_LEFT(t, s) + b
    +     /* Do the following 16 operations. */
    +    SET(a, b, c, d,  0,  6, T49);
    +    SET(d, a, b, c,  7, 10, T50);
    +    SET(c, d, a, b, 14, 15, T51);
    +    SET(b, c, d, a,  5, 21, T52);
    +    SET(a, b, c, d, 12,  6, T53);
    +    SET(d, a, b, c,  3, 10, T54);
    +    SET(c, d, a, b, 10, 15, T55);
    +    SET(b, c, d, a,  1, 21, T56);
    +    SET(a, b, c, d,  8,  6, T57);
    +    SET(d, a, b, c, 15, 10, T58);
    +    SET(c, d, a, b,  6, 15, T59);
    +    SET(b, c, d, a, 13, 21, T60);
    +    SET(a, b, c, d,  4,  6, T61);
    +    SET(d, a, b, c, 11, 10, T62);
    +    SET(c, d, a, b,  2, 15, T63);
    +    SET(b, c, d, a,  9, 21, T64);
    +#undef SET
    +
    +     /* Then perform the following additions. (That is increment each
    +        of the four registers by the value it had before this block
    +        was started.) */
    +    pms->abcd[0] += a;
    +    pms->abcd[1] += b;
    +    pms->abcd[2] += c;
    +    pms->abcd[3] += d;
    +}
    +
    +void
    +md5_init(md5_state_t *pms)
    +{
    +    pms->count[0] = pms->count[1] = 0;
    +    pms->abcd[0] = 0x67452301;
    +    pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
    +    pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
    +    pms->abcd[3] = 0x10325476;
    +}
    +
    +void
    +md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
    +{
    +    const md5_byte_t *p = data;
    +    int left = nbytes;
    +    int offset = (pms->count[0] >> 3) & 63;
    +    md5_word_t nbits = (md5_word_t)(nbytes << 3);
    +
    +    if (nbytes <= 0)
    +	return;
    +
    +    /* Update the message length. */
    +    pms->count[1] += nbytes >> 29;
    +    pms->count[0] += nbits;
    +    if (pms->count[0] < nbits)
    +	pms->count[1]++;
    +
    +    /* Process an initial partial block. */
    +    if (offset) {
    +	int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
    +
    +	memcpy(pms->buf + offset, p, copy);
    +	if (offset + copy < 64)
    +	    return;
    +	p += copy;
    +	left -= copy;
    +	md5_process(pms, pms->buf);
    +    }
    +
    +    /* Process full blocks. */
    +    for (; left >= 64; p += 64, left -= 64)
    +	md5_process(pms, p);
    +
    +    /* Process a final partial block. */
    +    if (left)
    +	memcpy(pms->buf, p, left);
    +}
    +
    +void
    +md5_finish(md5_state_t *pms, md5_byte_t digest[16])
    +{
    +    static const md5_byte_t pad[64] = {
    +	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    +    };
    +    md5_byte_t data[8];
    +    int i;
    +
    +    /* Save the length before padding. */
    +    for (i = 0; i < 8; ++i)
    +	data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
    +    /* Pad to 56 bytes mod 64. */
    +    md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
    +    /* Append the length. */
    +    md5_append(pms, data, 8);
    +    for (i = 0; i < 16; ++i)
    +	digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
    +}
    diff --git a/wt-3.1.7a/src/http/md5.h b/wt-3.1.7a/src/http/md5.h
    new file mode 100644
    index 0000000..698c995
    --- /dev/null
    +++ b/wt-3.1.7a/src/http/md5.h
    @@ -0,0 +1,91 @@
    +/*
    +  Copyright (C) 1999, 2002 Aladdin Enterprises.  All rights reserved.
    +
    +  This software is provided 'as-is', without any express or implied
    +  warranty.  In no event will the authors be held liable for any damages
    +  arising from the use of this software.
    +
    +  Permission is granted to anyone to use this software for any purpose,
    +  including commercial applications, and to alter it and redistribute it
    +  freely, subject to the following restrictions:
    +
    +  1. The origin of this software must not be misrepresented; you must not
    +     claim that you wrote the original software. If you use this software
    +     in a product, an acknowledgment in the product documentation would be
    +     appreciated but is not required.
    +  2. Altered source versions must be plainly marked as such, and must not be
    +     misrepresented as being the original software.
    +  3. This notice may not be removed or altered from any source distribution.
    +
    +  L. Peter Deutsch
    +  ghost@aladdin.com
    +
    + */
    +/* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */
    +/*
    +  Independent implementation of MD5 (RFC 1321).
    +
    +  This code implements the MD5 Algorithm defined in RFC 1321, whose
    +  text is available at
    +	http://www.ietf.org/rfc/rfc1321.txt
    +  The code is derived from the text of the RFC, including the test suite
    +  (section A.5) but excluding the rest of Appendix A.  It does not include
    +  any code or documentation that is identified in the RFC as being
    +  copyrighted.
    +
    +  The original and principal author of md5.h is L. Peter Deutsch
    +  <ghost@aladdin.com>.  Other authors are noted in the change history
    +  that follows (in reverse chronological order):
    +
    +  2002-04-13 lpd Removed support for non-ANSI compilers; removed
    +	references to Ghostscript; clarified derivation from RFC 1321;
    +	now handles byte order either statically or dynamically.
    +  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
    +  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
    +	added conditionalization for C++ compilation from Martin
    +	Purschke <purschke@bnl.gov>.
    +  1999-05-03 lpd Original version.
    + */
    +
    +#ifndef md5_INCLUDED
    +#  define md5_INCLUDED
    +
    +/*
    + * This package supports both compile-time and run-time determination of CPU
    + * byte order.  If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
    + * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
    + * defined as non-zero, the code will be compiled to run only on big-endian
    + * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
    + * run on either big- or little-endian CPUs, but will run slightly less
    + * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
    + */
    +
    +typedef unsigned char md5_byte_t; /* 8-bit byte */
    +typedef unsigned int md5_word_t; /* 32-bit word */
    +
    +/* Define the state of the MD5 Algorithm. */
    +typedef struct md5_state_s {
    +    md5_word_t count[2];	/* message length in bits, lsw first */
    +    md5_word_t abcd[4];		/* digest buffer */
    +    md5_byte_t buf[64];		/* accumulate block */
    +} md5_state_t;
    +
    +#ifdef __cplusplus
    +extern "C" 
    +{
    +#endif
    +
    +/* Initialize the algorithm. */
    +void md5_init(md5_state_t *pms);
    +
    +/* Append a string to the message. */
    +void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
    +
    +/* Finish the message and return the digest. */
    +void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
    +
    +#ifdef __cplusplus
    +}  /* end extern "C" */
    +#endif
    +
    +#endif /* md5_INCLUDED */
    diff --git a/wt-3.1.7a/src/isapi/CMakeLists.txt b/wt-3.1.7a/src/isapi/CMakeLists.txt
    new file mode 100644
    index 0000000..e2f222c
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/CMakeLists.txt
    @@ -0,0 +1,49 @@
    +IF(CONNECTOR_ISAPI)
    +  IF(NOT MULTI_THREADED)
    +    MESSAGE("** Disabling ISAPI because MULTI_THREADED is disabled.")
    +  ELSE(NOT MULTI_THREADED)
    +    IF(BUILD_SHARED_LIBS)
    +      MESSAGE("** Disabling ISAPI: ISAPI is not supported in SHARED_LIBS mode.")
    +    ELSE(BUILD_SHARED_LIBS)
    +      MESSAGE("** Enabling ISAPI.")
    +
    +      ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501 -DWTISAPI_STATIC)
    +
    +      SET(libsapisources
    +        Server.C
    +        Isapi.C
    +        IsapiRequest.C
    +        IsapiStream.C
    +      )
    +
    +      INCLUDE_DIRECTORIES(${FCGI_INCLUDE_DIRS})
    +      ADD_LIBRARY(wtisapi ${libsapisources})
    +      TARGET_LINK_LIBRARIES(wtisapi wt)
    +
    +      SET_TARGET_PROPERTIES(
    +        wtisapi
    +      PROPERTIES
    +        VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
    +        SOVERSION ${WTISAPI_SOVERSION}
    +        DEBUG_POSTFIX "d"
    +      )
    +      IF(MSVC)
    +        SET_TARGET_PROPERTIES(
    +            wtisapi
    +          PROPERTIES
    +            COMPILE_FLAGS "${BUILD_PARALLEL} /wd4267 /wd4251 /wd4275"
    +        )
    +      ENDIF(MSVC)
    +
    +      INSTALL(TARGETS wtisapi
    +        RUNTIME DESTINATION bin
    +        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    +        ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
    +
    +    ENDIF(BUILD_SHARED_LIBS)
    +  ENDIF(NOT MULTI_THREADED)
    +
    +ELSE(CONNECTOR_ISAPI)
    +  MESSAGE("** Disabling ISAPI.")
    +ENDIF(CONNECTOR_ISAPI)
    +
    diff --git a/wt-3.1.7a/src/isapi/Isapi.C b/wt-3.1.7a/src/isapi/Isapi.C
    new file mode 100644
    index 0000000..803fdd1
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/Isapi.C
    @@ -0,0 +1,60 @@
    +#include "WebController.h"
    +#include "Server.h"
    +#include "IsapiRequest.h"
    +
    +#include <windows.h>
    +#include <httpext.h>
    +
    +#include <sstream>
    +
    +using namespace Wt;
    +
    +
    +namespace {
    +  isapi::IsapiServer *theServer;
    +}
    +
    +BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO* pVer)
    +{
    +#if 0
    +#ifdef _DEBUG
    +  char buffer[2048];
    +  std::string workingdir;
    +  DWORD retval = GetCurrentDirectory(sizeof(buffer), buffer);
    +  if (retval > 0 && retval < sizeof(buffer)) {
    +    workingdir = buffer;
    +  }
    +  std::stringstream ss;
    +  ss << "Please attach a debugger to the process " << GetCurrentProcessId() << " and click OK" << std::endl;
    +  ss << "Current working dir: " << workingdir;
    +  //char title[] = "Wt/ISAPI Debug Time!";
    +  //DWORD response;
    +  //WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, 1, title, sizeof(title), (LPSTR)ss.str().c_str(), ss.str().length() + 1, MB_OK, 0, &response, TRUE);
    +  MessageBox(NULL, ss.str().c_str(), "Wt/ISAPI Debug Time!", MB_OK|MB_SERVICE_NOTIFICATION);
    +#endif
    +#endif
    +
    +  pVer->dwExtensionVersion = HSE_VERSION;
    +  strncpy_s(pVer->lpszExtensionDesc, "Wt ISAPI Connector", HSE_MAX_EXT_DLL_NAME_LEN);
    +
    +  // Instantiate the server
    +  theServer = isapi::IsapiServer::instance();
    +
    +  return TRUE;
    +}
    +
    +BOOL WINAPI TerminateExtension(DWORD dwFlags)
    +{
    +  isapi::IsapiServer::instance()->shutdown();
    +  delete theServer;
    +  return TRUE;
    +}
    +
    +DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
    +{
    +  // IsapiRequest will schedule itself to be processed in the
    +  // server when it is completely received.
    +  new isapi::IsapiRequest(lpECB, theServer, false);
    +  return HSE_STATUS_PENDING;
    +}
    +
    diff --git a/wt-3.1.7a/src/isapi/Isapi.def b/wt-3.1.7a/src/isapi/Isapi.def
    new file mode 100644
    index 0000000..dd2758e
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/Isapi.def
    @@ -0,0 +1,5 @@
    +EXPORTS
    +	HttpExtensionProc
    +	GetExtensionVersion
    +	TerminateExtension
    +	DllMain
    diff --git a/wt-3.1.7a/src/isapi/IsapiRequest.C b/wt-3.1.7a/src/isapi/IsapiRequest.C
    new file mode 100644
    index 0000000..cdaf064
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/IsapiRequest.C
    @@ -0,0 +1,522 @@
    +#include "IsapiRequest.h"
    +#include "Server.h"
    +#include "Utils.h"
    +#include <boost/algorithm/string/case_conv.hpp>
    +#include <fstream>
    +
    +namespace Wt {
    +  namespace isapi {
    +
    +// Important: an IsapiRequest must ALWAYS be pushed to the server,
    +// even on error. Otherwise you created a memory leak.
    +IsapiRequest::IsapiRequest(LPEXTENSION_CONTROL_BLOCK ecb,
    +                           IsapiServer *server, bool forceSynchronous)
    +  : ecb_(ecb),
    +  server_(server),
    +  good_(true),
    +  synchronous_(true),
    +  reading_(true),
    +  chunking_(false),
    +  contentLength_(-1),
    +  headerSent_(false)
    +{
    +  std::string version = envValue("HTTP_VERSION");
    +  if (version == "HTTP/1.1") {
    +    version_ = HTTP_1_1;
    +  } else if (version == "HTTP/1.0") {
    +    version_ = HTTP_1_0;
    +  } else {
    +    version_ = HTTP_1_0;
    +  }
    +
    +  if (!forceSynchronous) {
    +    // Try to configure async mode (synchronous_ must be set right, also
    +    // if only used for write)
    +    if (ecb->ServerSupportFunction(ecb->ConnID, HSE_REQ_IO_COMPLETION,
    +        &IsapiRequest::completionCallback, 0, (LPDWORD)this)) {
    +	  // Note: we don't expect this to happen
    +      synchronous_ = false;
    +    }
    +  }
    +
    +  // Read whatever has already been read
    +  bool done = false;
    +  bytesToRead_ = ecb->cbTotalBytes;
    +
    +  bool spooltofile = false;
    +  if (server_->configuration()) {
    +    spooltofile =
    +      bytesToRead_ >(unsigned)server_->configuration()->isapiMaxMemoryRequestSize();
    +  } else {
    +    spooltofile = bytesToRead_ > 128*1024;
    +  }
    +  if (spooltofile) {
    +    requestFileName_ = Wt::Utils::createTempFileName();
    +    // First, create the file
    +    std::ofstream o(requestFileName_.c_str());
    +    o.close();
    +    // Now, open it for read/write
    +    in_ = new std::fstream(requestFileName_.c_str(),
    +      std::ios::in | std::ios::out | std::ios::binary);
    +    if (!*in_) {
    +      // Give up, spool to memory
    +      requestFileName_ = "";
    +      delete in_;
    +      in_ = &in_mem_;
    +    }
    +  } else {
    +    in_ = &in_mem_;
    +  }
    +
    +  if (ecb->lpbData && ecb->cbAvailable) {
    +    in_->write((const char *)ecb_->lpbData, ecb->cbAvailable);
    +  }
    +  if (bytesToRead_ != 0xffffffff) {
    +    bytesToRead_ -= ecb->cbAvailable;
    +  }
    +  if (bytesToRead_ == 0) {
    +    in_->seekg(0);
    +    server->pushRequest(this);
    +    return;
    +  }
    +
    +  if (!synchronous_) {
    +    processAsyncRead(0, 0, true);
    +  } else {
    +    // TODO: store in tmp file if too big
    +    while (bytesToRead_ != 0 && !done) {
    +      bufferSize_ = sizeof(buffer_);
    +      if (bytesToRead_ != 0xffffffff && bytesToRead_ < bufferSize_) {
    +        bufferSize_ = bytesToRead_;
    +      }
    +      if (ecb->ReadClient(ecb->ConnID, (LPVOID)buffer_, &bufferSize_)) {
    +        if (bytesToRead_ != 0xffffffff) {
    +          bytesToRead_ -= bufferSize_;
    +        }
    +        if (bufferSize_ != 0) {
    +          in_->write(buffer_, bufferSize_);
    +        } else {
    +          done = true;
    +        }
    +      } else {
    +        int err = GetLastError();
    +        if (server_->configuration())
    +          server_->log("error")
    +          << "ISAPI Synchronous Read failed with error " << err;
    +        good_ = false; // TODO: retry on timeout?
    +        done = true;
    +      }
    +    }
    +    in_->seekg(0);
    +    server->pushRequest(this);
    +  }
    +}
    +
    +IsapiRequest::~IsapiRequest()
    +{
    +  if (&in_mem_ != in_) {
    +    dynamic_cast<std::fstream *>(in_)->close();
    +    delete in_;
    +  }
    +  if (requestFileName_ != "") {
    +    unlink(requestFileName_.c_str());
    +  }
    +
    +}
    +
    +void WINAPI IsapiRequest::completionCallback(LPEXTENSION_CONTROL_BLOCK lpECB,
    +                                          PVOID pContext,
    +                                          DWORD cbIO,
    +                                          DWORD dwError)
    +{
    +  IsapiRequest *req = reinterpret_cast<IsapiRequest *>(pContext);
    +  if (req->reading_)
    +    req->processAsyncRead(cbIO, dwError, false);
    +  else
    +    req->writeAsync(cbIO, dwError, false);
    +}
    +
    +void IsapiRequest::processAsyncRead(DWORD cbIO, DWORD dwError, bool first)
    +{
    +  // TODO: spool to a file if the stringstream becomes to big
    +  // First, queue up the bytes received
    +  if (bytesToRead_ != 0xffffffff) {
    +    bytesToRead_ -= cbIO;
    +  }
    +  if (cbIO != 0) {
    +    in_->write(buffer_, cbIO);
    +  }
    +
    +  // Then, read more, if applicable
    +  if ((first && bytesToRead_ != 0) ||
    +      (cbIO != 0 && bytesToRead_ != 0 && dwError == 0)) {
    +    bufferSize_ = sizeof(buffer_);
    +    if (bytesToRead_ != 0xffffffff && bytesToRead_ < bufferSize_) {
    +      bufferSize_ = bytesToRead_;
    +    }
    +    DWORD dwFlags = HSE_IO_ASYNC;
    +    if (!ecb_->ServerSupportFunction(ecb_->ConnID,
    +          HSE_REQ_ASYNC_READ_CLIENT, (LPVOID)buffer_, &bufferSize_,
    +          (LPDWORD)&dwFlags)) {
    +      int err = GetLastError();
    +      if (server_->configuration())
    +        server_->log("error")
    +          << "ISAPI Asynchronous Read scheduling failed with error " << err;
    +      good_ = false;
    +      in_->seekg(0);
    +      server_->pushRequest(this);
    +    } else {
    +      // Don't do anything here, the readclient callback may already
    +      // be invoked
    +    }
    +  } else {
    +    // Nothing more to read, or error
    +    if (dwError) {
    +      if (server_->configuration())
    +        server_->log("error")
    +          << "ISAPI Asynchronous Read failed with error " << dwError;
    +      good_ = false;
    +    }
    +    in_->seekg(0);
    +    server_->pushRequest(this);
    +  }
    +}
    +
    +bool IsapiRequest::isSynchronous() const
    +{
    +  return synchronous_;
    +}
    +
    +void IsapiRequest::sendHeader()
    +{
    +  // Finish up the header
    +  if (chunking_) {
    +    header_ << "Transfer-Encoding: chunked\r\n\r\n";
    +  } else if (contentLength_ != -1) {
    +    header_ << "Content-Length: " << contentLength_ << "\r\n\r\n";
    +  } else {
    +    header_ << "\r\n";
    +  }
    +  // TODO: add proper human-readable description
    +  std::string status =
    +    boost::lexical_cast<std::string>(ecb_->dwHttpStatusCode);
    +  std::string header = header_.str();
    +  HSE_SEND_HEADER_EX_INFO hei = { 0 };
    +  hei.pszStatus = status.c_str();
    +  hei.cchStatus = static_cast<DWORD>(status.size() + 1);
    +  hei.pszHeader = header.c_str();
    +  hei.cchHeader = static_cast<DWORD>(header.size() + 1);
    +  hei.fKeepConn =  version_ == HTTP_1_1 && ((contentLength_ != -1) || chunking_);
    +  ecb_->ServerSupportFunction(ecb_->ConnID, HSE_REQ_SEND_RESPONSE_HEADER_EX,
    +    &hei, 0, 0);
    +  headerSent_ = true;
    +}
    +
    +bool IsapiRequest::isGood()
    +{
    +  return good_;
    +}
    +
    +void IsapiRequest::abort()
    +{
    +  ecb_->ServerSupportFunction(ecb_->ConnID, HSE_REQ_CLOSE_CONNECTION,
    +    0, 0, 0);
    +  good_ = false;
    +  DWORD status = HSE_STATUS_ERROR;
    +  ecb_->ServerSupportFunction(ecb_->ConnID, HSE_REQ_DONE_WITH_SESSION,
    +    &status, 0, 0);
    +}
    +
    +void IsapiRequest::flush(ResponseState state, CallbackFunction callback)
    +{
    +  reading_ = false;
    +  if (!headerSent_) {
    +    // Determine how we will tell the client how long the response is
    +    if (state != ResponseDone) {
    +      if (version_ == HTTP_1_1 && contentLength_ == -1) {
    +        chunking_ = true;
    +      }
    +    } else {
    +      out_.seekg(0, std::ios_base::end);
    +      contentLength_ = out_.tellg();
    +      if (contentLength_ == -1) contentLength_ = 0;
    +      out_.seekg(0);
    +    }
    +    sendHeader();
    +  }
    +
    +  flushState_ = state;
    +  if (state == ResponseFlush) {
    +    setAsyncCallback(callback);
    +  } else {
    +    setAsyncCallback(CallbackFunction());
    +  }
    +
    +  // Reserve some space so that data doesn't get copied around
    +  writeData_.reserve(5);
    +
    +  out_.flush();
    +  out_.seekg(0, std::ios_base::end);
    +  std::streamsize size = out_.tellg();
    +  if (size == -1) size = 0;
    +  out_.seekg(0);
    +  if (chunking_) {
    +    std::string chunkPrefix;
    +    std::stringstream hexsize;
    +    hexsize << std::hex << size << std::dec << "\r\n";
    +    writeData_.push_back(chunkPrefix = hexsize.str());
    +    if (state == ResponseDone) {
    +      out_ << "\r\n0\r\n\r\n";
    +    } else {
    +      out_ << "\r\n";
    +    }
    +  }
    +  writeData_.push_back(out_.str());
    +  out_.str("");
    +
    +  if (!synchronous_) {
    +    writeAsync(0, 0, true);
    +  } else {
    +    writeSync();
    +  }
    +}
    +
    +void IsapiRequest::writeSync()
    +{
    +  for (unsigned int i = 0; i < writeData_.size(); ++i) {
    +    bool more = true;
    +    DWORD offset = 0;
    +    while (more) {
    +      DWORD size = static_cast<DWORD>(writeData_[i].size() - offset);
    +      if (ecb_->WriteClient(ecb_->ConnID, (LPVOID)(writeData_[i].data() + offset),
    +          &size, HSE_IO_SYNC)) {
    +        offset += size;
    +        if (offset >= writeData_[i].size()) {
    +          more = false;
    +        }
    +      } else {
    +        int err = GetLastError();
    +        err = err;
    +        abort();
    +        server_->log("error")
    +          << "ISAPI Synchronous Write failed with error " << err;
    +        // Note: it would be appropriate to call the callback function here
    +        // with a notification that the continuation was aborted.
    +        delete this;
    +        return;
    +      }
    +    }
    +  }
    +
    +  // When done:
    +  writeData_.clear();
    +  flushDone();
    +}
    +
    +void IsapiRequest::writeAsync(DWORD cbIO, DWORD dwError, bool first)
    +{
    +  bool error = dwError != 0;
    +  if (dwError) {
    +    server_->log("error")
    +      << "ISAPI Asynchronous Write failed with error " << dwError;
    +  }
    +  if (first) {
    +    writeIndex_ = 0;
    +    writeOffset_ = 0;
    +  }
    +  writeOffset_ += cbIO;
    +  if (writeIndex_ < writeData_.size() && writeOffset_ >= writeData_[writeIndex_].size()) {
    +    writeIndex_++;
    +    writeOffset_ = 0;
    +  }
    +  if (!error) {
    +    if (writeIndex_ < writeData_.size()) {
    +      DWORD size = static_cast<DWORD>(writeData_[writeIndex_].size() - writeOffset_);
    +      if (ecb_->WriteClient(ecb_->ConnID, (LPVOID)(writeData_[writeIndex_].data() + writeOffset_),
    +        &size, HSE_IO_ASYNC)) {
    +        // Don't do anything anymore, the callback will take over
    +        return;
    +      } else {
    +        error = true;
    +        int err = GetLastError();
    +        server_->log("error")
    +          << "ISAPI Asynchronous Write schedule failed with error " << err;
    +      }
    +    } else {
    +      // Everything is written, finish up
    +      writeData_.clear();
    +      flushDone();
    +      return;
    +    }
    +  }
    +
    +  if (error) {
    +    abort();
    +    delete this;
    +    return;
    +  }
    +}
    +
    +void IsapiRequest::flushDone()
    +{
    +  if (flushState_ == ResponseDone) {
    +    DWORD status;
    +    if (version_ == HTTP_1_0) {
    +      status = HSE_STATUS_SUCCESS;
    +    } else {
    +      status = HSE_STATUS_SUCCESS_AND_KEEP_CONN;
    +    }
    +    DWORD err;
    +    err = ecb_->ServerSupportFunction(ecb_->ConnID, HSE_REQ_DONE_WITH_SESSION,
    +      &status, 0, 0);
    +    if (synchronous_) {
    +      emulateAsync(flushState_);
    +      return;
    +    } else {
    +      delete this;
    +      return;
    +    }
    +  } else if (flushState_ == ResponseFlush) {
    +    if (synchronous_) {
    +      emulateAsync(flushState_);
    +    } else {
    +      getAsyncCallback()();
    +    }
    +  }
    +}
    +
    +void IsapiRequest::sendSimpleReply(int status, const std::string &msg)
    +{
    +  setStatus(status);
    +  out() << msg;
    +  flush(ResponseDone);
    +}
    +
    +void IsapiRequest::setStatus(int status)
    +{
    +  ecb_->dwHttpStatusCode = status;
    +  header_ << "Status: " << status << "\r\n";
    +}
    +
    +void IsapiRequest::setContentLength(boost::intmax_t length)
    +{
    +  contentLength_ = length;
    +}
    +
    +void IsapiRequest::setContentType(const std::string& value)
    +{
    +  header_ << "Content-Type: " << value << "\r\n";
    +}
    +
    +void IsapiRequest::addHeader(const std::string& name, const std::string& value)
    +{
    +  header_ << name << ": " << value << "\r\n";
    +}
    +
    +void IsapiRequest::setRedirect(const std::string& url)
    +{
    +  header_ << "Location: " << url << "\r\n";
    +}
    +
    +std::string IsapiRequest::headerValue(const std::string& name) const
    +{
    +  std::string retval = envValue("HEADER_" + name);
    +  if (retval == "") {
    +    std::string hdr = name;
    +    for (unsigned int i = 0; i < hdr.size(); ++i) {
    +      if (hdr[i] == '-')
    +        hdr[i] = '_';
    +    }
    +    retval = envValue("HTTP_" + hdr);
    +  }
    +  return retval;
    +}
    +
    +std::string IsapiRequest::envValue(const std::string& hdr) const
    +{
    +  std::string name = boost::algorithm::to_upper_copy(hdr);
    +  char buffer[1024];
    +  DWORD size = sizeof(buffer);
    +  if (!ecb_->GetServerVariable(ecb_->ConnID, (LPSTR)name.c_str(), buffer, &size)) {
    +    switch(GetLastError()) {
    +    case ERROR_INVALID_PARAMETER:
    +      return "";
    +      break;
    +    case ERROR_INVALID_INDEX:
    +      return "";
    +      break;
    +    case ERROR_INSUFFICIENT_BUFFER:
    +      {
    +        char *buf = new char[size];
    +        std::string retval;
    +        if (!ecb_->GetServerVariable(ecb_->ConnID, (LPSTR)name.c_str(), buf, &size)) {
    +          // Give up
    +        } else {
    +          retval = std::string(buf, buf + size - 1);
    +        }
    +        delete[] buf;
    +        return retval;
    +      }
    +      break;
    +    case ERROR_NO_DATA:
    +      return "";
    +      break;
    +    }
    +    return "";
    +  } else {
    +    return std::string(buffer, buffer + size - 1);
    +  }
    +}
    +
    +std::string IsapiRequest::scriptName() const {
    +  if (entryPoint_) {
    +    return envValue("SCRIPT_NAME") + entryPoint_->path();
    +  } else {
    +    return envValue("SCRIPT_NAME");
    +  }
    +}
    +
    +std::string IsapiRequest::serverName() const {
    +  return envValue("SERVER_NAME");
    +}
    +
    +std::string IsapiRequest::requestMethod() const {
    +  return envValue("REQUEST_METHOD");
    +}
    +
    +std::string IsapiRequest::queryString() const {
    +  return envValue("QUERY_STRING");
    +}
    +
    +std::string IsapiRequest::serverPort() const {
    +  return envValue("SERVER_PORT");
    +}
    +
    +std::string IsapiRequest::pathInfo() const {
    +  if (entryPoint_) {
    +    std::string pi = envValue("PATH_INFO");
    +    if (pi.size() >= entryPoint_->path().size()) {
    +      // assert(boost::starts_with(pi, entryPoint_->path()))
    +      return pi.substr(entryPoint_->path().size());
    +    } else {
    +      return pi;
    +    }
    +  } else {
    +    return envValue("PATH_INFO");
    +  }
    +}
    +
    +std::string IsapiRequest::remoteAddr() const {
    +  return envValue("REMOTE_ADDR");
    +}
    +
    +std::string IsapiRequest::urlScheme() const {
    +  std::string https = envValue("HTTPS");
    +  if (https == "ON" || https == "on")
    +    return "https";
    +  else
    +    return "http";
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/isapi/IsapiRequest.h b/wt-3.1.7a/src/isapi/IsapiRequest.h
    new file mode 100644
    index 0000000..e77e1db
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/IsapiRequest.h
    @@ -0,0 +1,107 @@
    +#include "WebRequest.h"
    +#include <sstream>
    +#include <httpext.h>
    +
    +namespace Wt {
    +  namespace isapi {
    +
    +class IsapiServer;
    +
    +class IsapiRequest : public WebRequest
    +{
    +public:
    +  IsapiRequest(LPEXTENSION_CONTROL_BLOCK ecb, IsapiServer *server,
    +    bool forceSynchronous);
    +
    +  ~IsapiRequest();
    +
    +  // Signal ISAPI that this connection is to be closed and that we're
    +  // done with it. The IsapiRequest object must be deleted after calling
    +  // this method.
    +  void abort();
    +
    +  // Returns true if the HTTP request was received without errors
    +  bool isGood();
    +
    +  virtual bool isSynchronous() const;
    +
    +  virtual void flush(ResponseState state = ResponseDone,
    +		     CallbackFunction callback = CallbackFunction());
    +
    +  // Sends a simple text reply
    +  void sendSimpleReply(int status, const std::string &msg);
    +
    +  virtual std::istream& in() { return *in_; }
    +  virtual std::ostream& out() { return out_; }
    +  virtual std::ostream& err() { return err_; }
    +
    +  virtual void setStatus(int status);
    +
    +  virtual void setContentLength(boost::intmax_t length);
    +
    +  virtual void setContentType(const std::string& value);
    +
    +  virtual void addHeader(const std::string& name, const std::string& value);
    +
    +  virtual void setRedirect(const std::string& url);
    +
    +  virtual std::string headerValue(const std::string& name) const;
    +
    +  virtual std::string envValue(const std::string& name) const;
    +
    +  virtual std::string scriptName() const;
    +
    +  virtual std::string serverName() const;
    +
    +  virtual std::string requestMethod() const;
    +
    +  virtual std::string queryString() const;
    +
    +  virtual std::string serverPort() const;
    +
    +  virtual std::string pathInfo() const;
    +
    +  virtual std::string remoteAddr() const;
    +
    +  virtual std::string urlScheme() const;
    +
    +private:
    +  LPEXTENSION_CONTROL_BLOCK ecb_;
    +  IsapiServer *server_;
    +  bool good_;
    +
    +  bool synchronous_;
    +  bool reading_;
    +  DWORD bytesToRead_;
    +  char buffer_[1024];
    +  DWORD bufferSize_;
    +
    +  //boost::mutex intermediateBufferedLock_;
    +  //int intermediateBufferedCounter_;
    +
    +  void processAsyncRead(DWORD cbIO, DWORD dwError, bool first);
    +  static void WINAPI completionCallback(LPEXTENSION_CONTROL_BLOCK lpECB,
    +    PVOID pContext, DWORD cbIO, DWORD dwError);
    +  void writeSync();
    +  void writeAsync(DWORD cbIO, DWORD dwError, bool first);
    +  void flushDone();
    +
    +  std::vector<std::string> writeData_;
    +  unsigned int writeIndex_; // next index to be written in writeData_
    +  unsigned int writeOffset_; // offset withing current item of writeData_
    +  ResponseState flushState_;
    +
    +  std::stringstream header_, in_mem_, out_, err_;
    +  std::iostream *in_;
    +  std::string requestFileName_;
    +
    +  bool chunking_;
    +  boost::intmax_t contentLength_;
    +  bool headerSent_;
    +  void sendHeader();
    +  enum {HTTP_1_0, HTTP_1_1} version_;
    +};
    +
    +}
    +}
    +
    diff --git a/wt-3.1.7a/src/isapi/IsapiStream.C b/wt-3.1.7a/src/isapi/IsapiStream.C
    new file mode 100644
    index 0000000..2597273
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/IsapiStream.C
    @@ -0,0 +1,29 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "IsapiStream.h"
    +#include "IsapiRequest.h"
    +#include "Server.h"
    +
    +namespace Wt {
    +  namespace isapi {
    +
    +IsapiStream::IsapiStream(IsapiServer *server)
    +  : WebStream(true),
    +  server_(server)
    +{
    +}
    +
    +IsapiStream::~IsapiStream()
    +{ }
    +
    +WebRequest *IsapiStream::getNextRequest(int timeoutsec)
    +{
    +  return server_->popRequest(timeoutsec);
    +}
    +
    +}
    +}
    diff --git a/wt-3.1.7a/src/isapi/IsapiStream.h b/wt-3.1.7a/src/isapi/IsapiStream.h
    new file mode 100644
    index 0000000..775b610
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/IsapiStream.h
    @@ -0,0 +1,35 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ISAPI_STREAM_H_
    +#define ISAPI_STREAM_H_
    +
    +#include "WebStream.h"
    +#include "WebRequest.h"
    +
    +class FCGX_Request;
    +
    +namespace Wt {
    +  namespace isapi {
    +
    +class IsapiServer;
    +
    +class IsapiStream : public WebStream
    +{
    +public:
    +  IsapiStream(IsapiServer *server);
    +  ~IsapiStream();
    +
    +  virtual WebRequest *getNextRequest(int timeoutsec);
    +
    +private:
    +  IsapiServer *server_;
    +};
    +
    +}
    +}
    +
    +#endif // ISAPI_STREAM_H_
    diff --git a/wt-3.1.7a/src/isapi/Server.C b/wt-3.1.7a/src/isapi/Server.C
    new file mode 100644
    index 0000000..f852b3e
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/Server.C
    @@ -0,0 +1,374 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Server.h"
    +#include "Configuration.h"
    +#include "IsapiRequest.h"
    +#include "IsapiStream.h"
    +
    +#include <windows.h>
    +#include <boost/regex.hpp>
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#include <exception>
    +#include <vector>
    +
    +#include "WebController.h"
    +
    +#include "Wt/WResource"
    +#include "Wt/WServer"
    +#include "Wt/WLogger"
    +
    +using std::exit;
    +using std::strcpy;
    +using std::strlen;
    +using std::memset;
    +extern int main(int argc, char **argv);
    +
    +namespace {
    +  const char *terminationMsg = 0;
    +  const char *mainReturnedReply =
    +    "<html>"
    +    "<head><title>Internal Server Error</title></head>"
    +    "<body><h1>Internal Server Error</h1>Wt-ISAPI terminated: returned from main</body>"
    +    "</html>";
    +  const char *uncaughtExceptionReply =
    +    "<html>"
    +    "<head><title>Internal Server Error</title></head>"
    +    "<body><h1>Internal Server Error</h1>Wt-ISAPI terminated: uncaught exception</body>"
    +    "</html>";
    +}
    +
    +namespace Wt {
    +  namespace isapi {
    +
    +IsapiServer *IsapiServer::instance_;
    +
    +IsapiServer::IsapiServer():
    +  server_(0),
    +  terminated_(false),
    +  configuration_(0)
    +{
    +  serverThread_ = boost::thread(boost::bind(&IsapiServer::serverEntry, this));
    +}
    +
    +IsapiServer::~IsapiServer()
    +{
    +  delete configuration_;
    +}
    +
    +namespace {
    +  HMODULE GetCurrentModule()
    +  {
    +    HMODULE hModule = 0;
    +    GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
    +      (LPCTSTR)GetCurrentModule, &hModule);
    +
    +    return hModule;
    +  }
    +}
    +
    +void IsapiServer::serverEntry() {
    +  HMODULE module = GetCurrentModule();
    +  char DllPath[_MAX_PATH];
    +  char *pDllPath = DllPath;
    +  GetModuleFileName(module, DllPath, _MAX_PATH);
    +  FreeLibrary(module);
    +
    +  try {
    +    main(1, &pDllPath);
    +    terminationMsg = mainReturnedReply;
    +    if (configuration())
    +      log("fatal") << "ISAPI: main() returned";
    +  } catch (std::exception &e) {
    +    terminationMsg = uncaughtExceptionReply;
    +    if (configuration())
    +      log("fatal") << "ISAPI: uncaught main() exception: " << e.what();
    +  } catch(...) {
    +    terminationMsg = uncaughtExceptionReply;
    +    if (configuration())
    +      log("fatal") << "ISAPI: unknown uncaught main() exception";
    +  }
    +  setTerminated();
    +}
    +
    +void IsapiServer::pushRequest(IsapiRequest *request) {
    +  if (request->isGood()) {
    +    boost::mutex::scoped_lock l(queueMutex_);
    +    if (!terminated_) {
    +      queue_.push_back(request);
    +      queueCond_.notify_all();
    +    } else {
    +      request->sendSimpleReply(500, terminationMsg);
    +    }
    +  } else {
    +    // incomplete request received
    +    request->abort();
    +    delete request;
    +  }
    +}
    +
    +IsapiRequest *IsapiServer::popRequest(int timeoutSec)
    +{
    +  boost::system_time const deadline =
    +    boost::get_system_time() + boost::posix_time::seconds(timeoutSec);
    +  boost::mutex::scoped_lock l(queueMutex_);
    +  while (true) {
    +    if (queue_.size()) {
    +      IsapiRequest *retval = queue_.front();
    +      queue_.pop_front();
    +      return retval;
    +    } else {
    +      // Wait until an element is inserted in the queue...
    +      if (!queueCond_.timed_wait(l, deadline)) {
    +        // timeout
    +        return 0;
    +      }
    +    }
    +  }
    +  return 0;
    +}
    +
    +void IsapiServer::setTerminated()
    +{
    +  boost::mutex::scoped_lock l(queueMutex_);
    +  terminated_ = true;
    +  while (queue_.size()) {
    +    IsapiRequest *retval = queue_.front();
    +    queue_.pop_front();
    +    l.unlock();
    +    retval->sendSimpleReply(500, terminationMsg);
    +    l.lock();
    +  }
    +}
    +
    +void IsapiServer::shutdown()
    +{
    +  if (configuration())
    +    log("notice") << "ISAPI: shutdown requested...";
    +  {
    +    boost::mutex::scoped_lock l(queueMutex_);
    +    server_->stop();
    +  }
    +  serverThread_.join();
    +  if (configuration())
    +    log("notice") << "ISAPI: shutdown completed...";
    +}
    +
    +IsapiServer *IsapiServer::instance()
    +{
    +  if (!instance_) {
    +    instance_ = new IsapiServer();
    +  }
    +  return instance_;
    +}
    +
    +bool IsapiServer::addServer(WServer *server)
    +{
    +  boost::mutex::scoped_lock l(queueMutex_);
    +  if (server_) return false;
    +  server_ = server;
    +  return true;
    +}
    +
    +void IsapiServer::removeServer(WServer *server)
    +{
    +  boost::mutex::scoped_lock l(queueMutex_);
    +  if (server_ != server) {
    +    if (configuration()) {
    +      log("error") << "ISAPI internal error: removeServer() inconsistent";
    +    }
    +  }
    +  server_ = 0;
    +}
    +
    +WLogEntry IsapiServer::log(const std::string& type)
    +{
    +  return configuration()->log(type);
    +}
    +
    +}
    +
    +static WebController *theController = 0;
    +
    +struct WServerImpl {
    +  WServerImpl()
    +    : running_(false)
    +  { }
    +
    +  Configuration *configuration() {
    +    return isapi::IsapiServer::instance()->configuration();
    +  }
    +  bool running_;
    +};
    +
    +WServer::WServer(const std::string& applicationPath,
    +		 const std::string& configurationFile)
    +  : impl_(new WServerImpl())
    +{
    +  if (!isapi::IsapiServer::instance()->addServer(this))
    +    throw Exception("WServer::WServer(): "
    +		    "Only one simultaneous WServer supported");
    +
    +  std::stringstream approotLog;
    +  std::string approot;
    +  {
    +    std::string inifile = applicationPath + ".ini";
    +    char buffer[1024];
    +    GetPrivateProfileString("isapi", "approot", "",
    +      buffer, sizeof(buffer), inifile.c_str());
    +    approot = buffer;
    +    if (approot != "") {
    +      approotLog << "ISAPI: read approot (" << approot
    +        << ") from ini file " << inifile;
    +    }
    +  }
    +
    +  isapi::IsapiServer::instance()->setConfiguration(
    +    new Configuration(applicationPath, approot, configurationFile,
    +      Configuration::IsapiServer, "Wt: initializing session process"));
    +
    +  if (approotLog.str() != "") {
    +    impl_->configuration()->log("notice") << approotLog.str();
    +  }
    +}
    +
    +WServer::~WServer()
    +{
    +  isapi::IsapiServer::instance()->removeServer(this);
    +  delete impl_;
    +}
    +
    +void WServer::setServerConfiguration(int argc, char *argv[],
    +				     const std::string& serverConfigurationFile)
    +{
    +
    +}
    +
    +void WServer::addEntryPoint(EntryPointType type, ApplicationCreator callback,
    +			    const std::string& path, const std::string& favicon)
    +{
    +  if (!impl_->configuration())
    +    throw Exception("WServer::addEntryPoint(): "
    +		    "call setServerConfiguration() first");
    +
    +  impl_->configuration()
    +    ->addEntryPoint(EntryPoint(type, callback, path, favicon));
    +}
    +
    +bool WServer::start()
    +{
    +  if (!impl_->configuration())
    +    throw Exception("WServer::start(): call setServerConfiguration() first");
    +
    +  if (isRunning()) {
    +    impl_->configuration()->log("error")
    +      << "WServer::start() error: server already started!";
    +    return false;
    +  }
    +
    +  impl_->running_ = true;
    +
    +  try {
    +    isapi::IsapiStream isapiStream(isapi::IsapiServer::instance());
    +    WebController controller(*impl_->configuration(), this, &isapiStream);
    +    theController = &controller;
    +
    +    controller.run();
    +
    +    theController = 0;
    +
    +  } catch (std::exception& e) {
    +    impl_->configuration()->log("fatal")
    +      << "ISAPI server: caught unhandled exception: " << e.what();
    +
    +    throw;
    +  } catch (...) {
    +    impl_->configuration()->log("fatal")
    +      << "ISAPI server: caught unknown, unhandled exception.";
    +    throw;
    +  }
    +  return true;
    +}
    +
    +bool WServer::isRunning() const
    +{
    +  return impl_ && impl_->running_;
    +}
    +
    +int WServer::httpPort() const
    +{
    +  return -1;
    +}
    +
    +void WServer::stop()
    +{
    +  if (!isRunning()) {
    +    std::cerr << "WServer::stop() error: server not yet started!" << std::endl;
    +    return;
    +  }
    +  theController->forceShutdown();
    +}
    +
    +int WServer::waitForShutdown(const char *restartWatchFile)
    +{
    +  for (;;)
    +    Sleep(10000 * 1000);
    +
    +  return 0;
    +}
    +
    +void WServer::addResource(WResource *resource, const std::string& path)
    +{
    +  if (!boost::starts_with(path, "/")) 
    +    throw WServer::Exception("WServer::addResource() error: "
    +			     "static resource path should start with \'/\'");
    +
    +  resource->setInternalPath(path);
    +  impl_->configuration()->addEntryPoint(EntryPoint(resource, path));
    +}
    +
    +void WServer::handleRequest(WebRequest *request)
    +{
    +  theController->handleRequest(request);
    +}
    +
    +std::string WServer::appRoot() const
    +{
    +  return impl_->configuration()->appRoot();
    +}
    +
    +bool WServer::readConfigurationProperty(const std::string& name,
    +                                        std::string& value) const
    +{
    +  return impl_->configuration()->readConfigurationProperty(name, value);
    +}
    +
    +int WRun(int argc, char *argv[], ApplicationCreator createApplication)
    +{
    +  try {
    +    WServer server(argv[0], "");
    +
    +    try {
    +      server.setServerConfiguration(argc, argv);
    +      server.addEntryPoint(Application, createApplication);
    +      server.start();
    +
    +      return 0;
    +    } catch (std::exception& e) {
    +      server.impl()->configuration()->log("fatal") << e.what();
    +      return 1;
    +    }
    +  } catch (Wt::WServer::Exception& e) {
    +    std::cerr << e.what() << std::endl;
    +    return 1;
    +  } catch (std::exception& e) {
    +    std::cerr << "exception: " << e.what() << std::endl;
    +    return 1;
    +  }
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/isapi/Server.h b/wt-3.1.7a/src/isapi/Server.h
    new file mode 100644
    index 0000000..803507a
    --- /dev/null
    +++ b/wt-3.1.7a/src/isapi/Server.h
    @@ -0,0 +1,78 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef SERVER_H_
    +#define SERVER_H_
    +
    +#include <string>
    +#include <map>
    +
    +#ifndef WT_TARGET_JAVA
    +#ifdef WT_THREADED
    +#include <boost/thread.hpp>
    +#include "threadpool/threadpool.hpp"
    +#endif
    +#endif // WT_TARGET_JAVA
    +
    +#include "Configuration.h"
    +
    +namespace Wt {
    +class WServer;
    +  namespace isapi {
    +
    +class IsapiRequest;
    +
    +class IsapiServer {
    +  IsapiServer();
    +
    +public:
    +  ~IsapiServer();
    +
    +  void serverEntry();
    +
    +  void pushRequest(IsapiRequest *ecb);
    +  IsapiRequest *popRequest(int timeoutSec);
    +
    +  void shutdown();
    +
    +  static IsapiServer *instance();
    +
    +  bool addServer(WServer *server);
    +  void removeServer(WServer *server);
    +
    +  // Test to see if configuration() is non-zero before
    +  // invoking this log()!! So if (configuration()) log("notice") << "ok";
    +  WLogEntry log(const std::string& type);
    +
    +  Configuration *configuration() const { return configuration_; }
    +
    +  // IsapiServer takes ownership of the Configuration object and
    +  // will delete it on destruction. Once set, it must not be changed.
    +  void setConfiguration(Configuration *c) { configuration_ = c; }
    +
    +private:
    +  static IsapiServer *instance_;
    +
    +  boost::thread serverThread_;
    +
    +  boost::mutex queueMutex_;
    +  boost::condition_variable queueCond_;
    +  std::deque<IsapiRequest *> queue_;
    +
    +  // Also protected by queueMuex_;
    +  WServer *server_;
    +  // Once configuration_ is set, it remains valid until the IsapiServer is
    +  // destroyed.
    +  Configuration *configuration_;
    +
    +  void setTerminated();
    +  bool terminated_;
    +};
    +
    +}
    +}
    +
    +#endif // WT_SERVER_H_
    diff --git a/wt-3.1.7a/src/js/SizeHandle.js b/wt-3.1.7a/src/js/SizeHandle.js
    new file mode 100644
    index 0000000..4b87df6
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/SizeHandle.js
    @@ -0,0 +1,86 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +  (1, "SizeHandle",
    +   function(WT, orientation, width, height, minDelta, maxDelta,
    +	    dragWidgetClass, doneFn, el, parent, event, offsetX, offsetY) {
    +     var handle = document.createElement('div');
    +     handle.style.position = 'absolute';
    +     handle.style.zIndex = '100';
    +
    +     if (orientation == 'v') {
    +       handle.style.width = height + 'px';
    +       handle.style.height = width + 'px';
    +     } else {
    +       handle.style.height = height + 'px';
    +       handle.style.width = width + 'px';
    +     }
    +
    +     var offset, elpos = WT.widgetPageCoordinates(el),
    +         parentpos = WT.widgetPageCoordinates(parent);
    +
    +     if (event.touches) {
    +       offset = WT.widgetCoordinates(el, event.touches[0]);
    +     } else {
    +       offset = WT.widgetCoordinates(el, event);
    +       WT.capture(null);
    +       WT.capture(handle);
    +     }
    +
    +     offsetX -= WT.px(el, 'marginLeft');
    +     offsetY -= WT.px(el, 'marginTop');
    +     elpos.x += offsetX - parentpos.x;
    +     elpos.y += offsetY - parentpos.y;
    +     offset.x -= offsetX - parentpos.x;
    +     offset.y -= offsetY - parentpos.y;
    +
    +     handle.style.left = elpos.x + 'px';
    +     handle.style.top = elpos.y + 'px';
    +     handle.className = dragWidgetClass;
    +
    +     parent.appendChild(handle);
    +
    +     WT.cancelEvent(event);
    +
    +     function computeDelta(event) {
    +       var p, result;
    +
    +       if (!WT.isIE && event.changedTouches)
    +	 p = { x: event.changedTouches[0].pageX,
    +	       y: event.changedTouches[0].pageY };
    +       else
    +	 p = WT.pageCoordinates(event);
    +
    +       if (orientation == 'h')
    +         result = (p.x - offset.x) - elpos.x;
    +       else
    +         result = (p.y - offset.y) - elpos.y;
    +
    +       return Math.min(Math.max(result, minDelta), maxDelta);
    +     }
    +
    +     handle.onmousemove = parent.ontouchmove = function(event) {
    +       var delta = computeDelta(event);
    +       if (orientation == 'h')
    +         handle.style.left = (elpos.x + delta) + 'px';
    +       else
    +         handle.style.top = (elpos.y + delta) + 'px';
    +
    +       WT.cancelEvent(event);
    +     };
    +
    +     handle.onmouseup = parent.ontouchend = function(event) {
    +       if (handle.parentNode != null) {
    +	 handle.parentNode.removeChild(handle);
    +	 doneFn(computeDelta(event));
    +	 parent.ontouchmove = null;
    +       }
    +     };
    +  }
    +   );
    \ No newline at end of file
    diff --git a/wt-3.1.7a/src/js/SizeHandle.min.js b/wt-3.1.7a/src/js/SizeHandle.min.js
    new file mode 100644
    index 0000000..21c84e6
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/SizeHandle.min.js
    @@ -0,0 +1,3 @@
    +WT_DECLARE_WT_MEMBER(1,"SizeHandle",function(b,j,e,m,p,q,r,s,g,h,i,k,l){function n(c){c=!b.isIE&&c.changedTouches?{x:c.changedTouches[0].pageX,y:c.changedTouches[0].pageY}:b.pageCoordinates(c);return Math.min(Math.max(j=="h"?c.x-f.x-d.x:c.y-f.y-d.y,p),q)}var a=document.createElement("div");a.style.position="absolute";a.style.zIndex="100";if(j=="v"){a.style.width=m+"px";a.style.height=e+"px"}else{a.style.height=m+"px";a.style.width=e+"px"}var f,d=b.widgetPageCoordinates(g);e=b.widgetPageCoordinates(h);
    +if(i.touches)f=b.widgetCoordinates(g,i.touches[0]);else{f=b.widgetCoordinates(g,i);b.capture(null);b.capture(a)}k-=b.px(g,"marginLeft");l-=b.px(g,"marginTop");d.x+=k-e.x;d.y+=l-e.y;f.x-=k-e.x;f.y-=l-e.y;a.style.left=d.x+"px";a.style.top=d.y+"px";a.className=r;h.appendChild(a);b.cancelEvent(i);a.onmousemove=h.ontouchmove=function(c){var o=n(c);if(j=="h")a.style.left=d.x+o+"px";else a.style.top=d.y+o+"px";b.cancelEvent(c)};a.onmouseup=h.ontouchend=function(c){if(a.parentNode!=null){a.parentNode.removeChild(a);
    +s(n(c));h.ontouchmove=null}}});
    diff --git a/wt-3.1.7a/src/js/StdGridLayoutImpl.js b/wt-3.1.7a/src/js/StdGridLayoutImpl.js
    new file mode 100644
    index 0000000..3d3ca53
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/StdGridLayoutImpl.js
    @@ -0,0 +1,598 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "StdLayout",
    + function(WT, id, config) {
    +   var self = this;
    +   var initialized = false;
    +
    +   this.getId = function() {
    +     return id;
    +   };
    +
    +   this.WT = WT;
    +
    +   this.marginH = function(el) {
    +     var p = el.parentNode;
    +     var result = WT.px(el, 'marginLeft');
    +     result += WT.px(el, 'marginRight');
    +     result += WT.px(el, 'borderLeftWidth');
    +     result += WT.px(el, 'borderRightWidth');
    +     result += WT.px(el, 'paddingLeft');
    +     result += WT.px(el, 'paddingRight');
    +     result += WT.pxself(p, 'paddingLeft');
    +     result += WT.pxself(p, 'paddingRight');
    +     return result;
    +   };
    +
    +   this.marginV = function(el) {
    +     // TODO: consider caching
    +     //var p = el.parentNode;
    +     var result = WT.px(el, 'marginTop');
    +     result += WT.px(el, 'marginBottom');
    +     result += WT.px(el, 'borderTopWidth');
    +     result += WT.px(el, 'borderBottomWidth');
    +     result += WT.px(el, 'paddingTop');
    +     result += WT.px(el, 'paddingBottom');
    +     // result += WT.pxself(p, 'paddingTop');
    +     // result += WT.pxself(p, 'paddingBottom');
    +     return result;
    +   };
    +
    +   this.getColumn = function(columni) {
    +     var widget = WT.getElement(id),
    +         t = widget.firstChild;
    +
    +     var i, j, jl, chn=t.childNodes;
    +     for (i=0, j=0, jl=chn.length; j<jl; j++) {
    +       var col=chn[j]; // for finding a column
    +
    +       if (WT.hasTag(col, 'COLGROUP')) { // IE
    +	 j=-1;
    +	 chn=col.childNodes;
    +	 jl=chn.length;
    +       }
    +
    +       if (!WT.hasTag(col, 'COL'))
    +	 continue;
    +
    +       if (col.className != 'Wt-vrh') {
    +	 if (i == columni) {
    +	   return col;
    +	 } else
    +	   ++i;
    +       }
    +     }
    +
    +     return null;
    +   };
    +
    +   this.adjustCell = function(td, height, col) {
    +     var shallow = height == 0;
    +
    +     height -= WT.pxself(td, 'paddingTop');
    +     height -= WT.pxself(td, 'paddingBottom');
    +
    +     if (height <= 0)
    +       height = 0;
    +
    +     td.style.height = height+'px';
    +     if (td.style['verticalAlign'] || td.childNodes.length == 0)
    +       return;
    +
    +     var ch = td.childNodes[0]; // 'ch' is cell contents
    +     if (height <= 0)
    +       height = 0;
    +
    +     if (ch.className == 'Wt-hcenter') {
    +       ch.style.height = height+'px';
    +       var itd = ch.firstChild.firstChild;
    +       if (!WT.hasTag(itd, 'TD'))
    +	 itd = itd.firstChild;
    +       if (itd.style.height != height+'px')
    +	 itd.style.height = height+'px';
    +       ch = itd.firstChild;
    +     }
    +
    +     if (td.childNodes.length == 1)
    +       height -= this.marginV(ch);
    +
    +       if (height <= 0)
    +	 height = 0;
    +
    +     if (WT.hasTag(ch, 'TABLE'))
    +       return;
    +
    +     if (!shallow && ch.wtResize) {
    +       var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch);
    +       if (col != -1 && self.getColumn(col).style.width != '') {
    +	 ch.style.position = 'absolute';
    +	 ch.style.width = w+'px';
    +       }
    +       ch.wtResize(ch, w, height);
    +     } else if (ch.style.height != height+'px') {
    +       ch.style.height = height+'px';
    +       if (ch.className == 'Wt-wrapdiv') {
    +	 if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) {
    +	   ch.firstChild.style.height
    +	     = (height - WT.pxself(ch, 'marginBottom')) + 'px';
    +	 }
    +       }
    +     }
    +   };
    +
    +   /*
    +    * FIXME: we should merge getColumn() functionality here to
    +    * avoid repeatedly calling it
    +    */
    +   this.adjustRow = function(row, height) {
    +     var rowspan_tds = [];
    +
    +     if (row.style.height != height + 'px')
    +       row.style.height = height + 'px';
    +
    +     var tds = row.childNodes, j, jl, td, col;
    +     for (j=0, col=-1, jl = tds.length; j<jl; ++j) {
    +       td=tds[j];
    +
    +       if (td.className != 'Wt-vrh')
    +	 ++col;
    +
    +       if (td.rowSpan != 1) {
    +	 this.adjustCell(td, 0, -1);
    +	 rowspan_tds.push(td);
    +	 continue;
    +       }
    +
    +       this.adjustCell(td, height, -1);
    +     }
    +
    +     return rowspan_tds;
    +   };
    +
    +   this.adjust = function() {
    +     var widget = WT.getElement(id);
    +     if (!widget)
    +       return false;
    +
    +     if (self.initResize)
    +       self.initResize(WT, id, config);
    +
    +     if (WT.isHidden(widget))
    +      return true;
    +
    +     var t = widget.firstChild, p = widget.parentNode;
    +
    +     if (t.style.height != '')
    +       t.style.height = '';
    +
    +     var doit = widget.dirty
    +       || t.w != p.clientWidth
    +       || t.h != p.clientHeight;
    +
    +     if (!doit)
    +       return true;
    +
    +     widget.dirty = null;
    +
    +     /*
    +      * 'r' holds the target height for this table. If a
    +      * height has been explicitly set, we use that height,
    +      * otherwise we use the computed height. Note that we need to
    +      * remove padding of the parent, and margin of myself.
    +      */
    +     var r = WT.pxself(p, 'height');
    +     if (r == 0) {
    +       r = p.clientHeight;
    +       r -= WT.px(p, 'paddingTop');
    +       r -= WT.px(p, 'paddingBottom');
    +     }
    +
    +     r -= WT.px(widget, 'marginTop');
    +     r -= WT.px(widget, 'marginBottom');
    +
    +     /*
    +      * Sometimes, there may be other elements; e.g. in FIELDSET.
    +      * Remove the height of these too
    +      */
    +     var i, il;
    +     if (p.children) {
    +       for (i=0, il=p.children.length; i<il; ++i) {
    +	 var w = p.children[i];
    +	   if (w != widget)
    +	     r -= $(w).outerHeight();
    +       }
    +     }
    +
    +     /*
    +      * Reduce 'r' with the total height of rows with stretch=0.
    +      */
    +     var ts=0,                         // Sum of stretch factors
    +         tmh=0,                          // Min heights
    +	 ri, j, jl, row, tds; // Iterator variables
    +
    +     for (i=0, ri=0, il=t.rows.length; i<il; i++) {
    +       row = t.rows[i];
    +
    +       if (row.className == 'Wt-hrh') {  // Skip resize rows
    +	 r -= row.offsetHeight;          // Reduce r
    +	 continue;
    +       }
    +
    +       tmh += config.minheight[ri];
    +       if (config.stretch[ri] <= 0)
    +	 r -= row.offsetHeight; // reduce r
    +       else
    +	 ts += config.stretch[ri];
    +       ++ri;
    +     }
    +
    +     r=r>tmh?r:tmh;
    +
    +     var rowspan_tds = [];
    +
    +     /*
    +      *  Now, iterate over the whole table, and adjust the height
    +      *  for every row (which has a stretch) and for every cell. Apply the
    +      *  same height to each cell's contents as well
    +      */
    +     if (ts!=0 && r>0) {
    +       var left=r, // remaining space to be divided
    +           h;
    +
    +       for (i=0, ri=0, il=t.rows.length; i<il; i++) {
    +	 if (t.rows[i].className=='Wt-hrh') // Skip resize rows
    +	   continue;
    +
    +	 row = t.rows[i];
    +
    +	 if (config.stretch[ri] != 0) {
    +	   /*
    +	    * The target height 'h', cannot be more than what is still
    +	    * left to distribute, and cannot be less than the minimum
    +	    * height
    +	    */
    +
    +	   if (config.stretch[ri] != -1) {
    +	     h=r*config.stretch[ri]/ts;
    +	     h=left>h?h:left;
    +	     h=Math.round(config.minheight[ri] > h
    +			  ? config.minheight[ri] : h);
    +	     left -= h;
    +	   } else {
    +	     h=row.offsetHeight;
    +	   }
    +
    +	   WT.addAll(rowspan_tds, this.adjustRow(row, h));
    +	 }
    +	 ++ri;
    +       }
    +     }
    +
    +     for (i = 0, il = rowspan_tds.length; i < il; ++i) {
    +       var td = rowspan_tds[i];
    +       this.adjustCell(td, td.offsetHeight, col);
    +     }
    +
    +     t.w = p.clientWidth;
    +     t.h = p.clientHeight;
    +
    +     /*
    +      * Column widths: for every column which has no % width set,
    +      * we compute the maximum width of the contents, and set this
    +      * as the width of the first cell, taking into account the
    +      * cell padding.
    +      */
    +     if (t.style.tableLayout != 'fixed')
    +       return true;
    +
    +     var jc=0, chn=t.childNodes;
    +     for (j=0, jl=chn.length; j<jl; j++) {
    +       var col=chn[j], ch,
    +           w, mw,      // maximum column width
    +	   c, ci, cil; // for finding a column
    +
    +       if (WT.hasTag(col, 'COLGROUP')) { // IE
    +	 j=-1;
    +	 chn=col.childNodes;
    +	 jl=chn.length;
    +       }
    +
    +	if (!WT.hasTag(col, 'COL'))
    +	  continue;
    +
    +       if (WT.pctself(col, 'width') == 0) {
    +	 mw = 0;
    +	 for (i=0, il=t.rows.length; i<il; i++) {
    +	   row = t.rows[i];
    +	   tds = row.childNodes;
    +	   c = 0;
    +	   for (ci=0, cil=tds.length; ci<cil; ci++) {
    +	     td = tds[ci];
    +	     if (td.colSpan==1 && c==jc && td.childNodes.length==1) {
    +	       ch = td.firstChild;
    +	       w = ch.offsetWidth + self.marginH(ch);
    +	       mw = Math.max(mw, w);
    +	       break;
    +	     }
    +	     c += td.colSpan;
    +	     if (c > jc)
    +	       break;
    +	    }
    +	 }
    +	 if (mw > 0 && WT.pxself(col, 'width') != mw)
    +	   col.style.width=mw+'px';
    +       }
    +       ++jc;
    +     }
    +
    +     return true;
    +   };
    +
    +   this.contains = function(layout) {
    +     var thisw = WT.getElement(id);
    +     var otherw = WT.getElement(layout.getId());
    +
    +     if (thisw && otherw)
    +       return WT.contains(thisw, otherw);
    +     else
    +       return false;
    +   };
    +
    +   this.adjust();
    + });
    +
    +WT_DECLARE_WT_MEMBER
    +(2, "StdLayout.prototype.initResize",
    + function(WT, id, config) {
    +   var self = this;
    +
    +   var getColumn = self.getColumn;
    +
    +   function getColumnWidth(col, columni) {
    +     /* col.offsetWidth = 0 in webkit/chrome */
    +     if (col.offsetWidth > 0)
    +       return col.offsetWidth;
    +     else {
    +       var t = widget.firstChild, row = t.rows[0];
    +       var td, j, ci, jl;
    +       for (j=0, ci=0, jl=row.childNodes.length; j<jl; ++j) {
    +	 td = row.childNodes[j];
    +
    +	 if (td.className != 'Wt-vrh') {
    +	   if (ci == columni)
    +	     return td.offsetWidth;
    +	   ci += td.colSpan;
    +	 }
    +       }
    +       return 0;
    +     }
    +   }
    +
    +   function adjustColumn(columni, width) {
    +     var widget = WT.getElement(id),
    +         t = widget.firstChild;
    +
    +     getColumn(columni).style.width = width + 'px';
    +
    +     var i, ri, il, row; // Iterator variables
    +     for (i=0, ri=0, il=t.rows.length; i<il; i++) {
    +       row = t.rows[i];
    +
    +       if (row.className != 'Wt-hrh') {
    +	 var td, j, ci, jl;
    +	 for (j=0, ci=0, jl=row.childNodes.length; j<jl; ++j) {
    +	   td = row.childNodes[j];
    +
    +	   if (td.className != 'Wt-vrh') {
    +	     if (td.colSpan == 1 && ci == columni && td.childNodes.length==1) {
    +	       var ch = td.firstChild;
    +	       var w = width - self.marginH(ch);
    +	       ch.style.width = w + 'px';
    +
    +	       break;
    +	     }
    +
    +	     ci += td.colSpan;
    +	   }
    +	 }
    +
    +	 ++ri;
    +       }
    +     }
    +   }
    +
    +   function startRowResize(td, ri, event) {
    +     var minDelta = -td.parentNode.previousSibling.offsetHeight,
    +         maxDelta = td.parentNode.nextSibling.offsetHeight,
    +         div = td.firstChild;
    +
    +     new WT.SizeHandle(WT, 'v', div.offsetHeight, div.offsetWidth,
    +		       minDelta, maxDelta, 'Wt-vsh',
    +		       function(delta) {
    +			 doneRowResize(td, ri, delta);
    +		       }, div, widget, event, 0, 0);
    +   }
    +
    +   function startColResize(td, ci, event) {
    +     var minDelta = -td.previousSibling.offsetWidth,
    +         maxDelta = td.nextSibling.offsetWidth,
    +         div = td.firstChild,
    +         padTop = WT.pxself(t.rows[0].childNodes[0], 'paddingTop'),
    +	 padBottom = WT.pxself(t.rows[t.rows.length-1].childNodes[0],
    +			       'paddingBottom'),
    +	 height = t.offsetHeight - padTop - padBottom;
    +
    +     new WT.SizeHandle(WT, 'h', div.offsetWidth, height,
    +		       minDelta, maxDelta, 'Wt-hsh',
    +		       function(delta) {
    +			 doneColResize(td, ci, delta);
    +		       }, div, widget, event, 0, -td.offsetTop + padTop
    +		       - WT.pxself(td, 'paddingTop'));
    +   }
    +
    +   function doneRowResize(td, ri, delta) {
    +     var row = td.parentNode.previousSibling,
    +         rown = td.parentNode.nextSibling,
    +	 rowh = row.offsetHeight,
    +	 rownh = rown.offsetHeight;
    +
    +     if (config.stretch[ri] > 0 && config.stretch[ri + 1] > 0)
    +       config.stretch[ri] = -1;
    +
    +     if (config.stretch[ri + 1] == 0)
    +       config.stretch[ri + 1] = -1;
    +
    +     if (config.stretch[ri] <= 0)
    +       self.adjustRow(row, rowh + delta);
    +
    +     if (config.stretch[ri + 1] <= 0)
    +       self.adjustRow(rown, rownh - delta);
    +
    +     WT.getElement(id).dirty = true;
    +
    +     window.onresize();
    +   }
    +
    +   function adjustTo100() {
    +     var ci, totalPct = 0;
    +
    +     for (ci = 0; ; ++ci) {
    +       var c = getColumn(ci);
    +
    +       if (c)
    +	 totalPct += WT.pctself(c, 'width');
    +       else
    +	 break;
    +     }
    +
    +     if (totalPct == 0)
    +       return;
    +
    +     for (ci = 0; ; ++ci) {
    +       var c = getColumn(ci);
    +
    +       if (c) {
    +	 var pct = WT.pctself(c, 'width');
    +	 if (pct)
    +	   c.style.width = (pct*100/totalPct) + '%';
    +       } else
    +	 break;
    +     }
    +   }
    +
    +   function doneColResize(td, ci, delta) {
    +     var col = getColumn(ci),
    +         colw = getColumnWidth(col, ci),
    +	 coln = getColumn(ci + 1),
    +	 colnw = getColumnWidth(coln, ci + 1);
    +
    +     if (WT.pctself(col, 'width') > 0
    +         && WT.pctself(coln, 'width') > 0) {
    +       col.style.width = '';
    +       adjustTo100();
    +     }
    +
    +     if (WT.pctself(col, 'width') == 0)
    +       adjustColumn(ci, colw + delta);
    +
    +     if (WT.pctself(coln, 'width') == 0)
    +       adjustColumn(ci + 1, colnw - delta);
    +
    +     window.onresize();
    +   }
    +
    +   var widget = WT.getElement(id);
    +   if (!widget)
    +     return;
    +
    +   if (self.resizeInitialized)
    +     return;
    +
    +   var t = widget.firstChild;
    +
    +   var i, ri, il, row; // Iterator variables
    +   for (i=0, ri=0, il=t.rows.length; i<il; i++) {
    +     row = t.rows[i];
    +
    +     if (row.className == 'Wt-hrh') {
    +       var td = row.firstChild;
    +       td.ri = ri - 1;
    +       td.onmousedown = td.ontouchstart = function(event) {
    +	 var e = event||window.event;
    +	 startRowResize(this, this.ri, e);
    +       };
    +     } else {
    +       var td, j, ci, jl;
    +       for (j=0, ci=0, jl=row.childNodes.length; j<jl; ++j) {
    +	 td = row.childNodes[j];
    +
    +	 if (td.className == 'Wt-vrh') {
    +	   td.ci = ci - 1;
    +	   td.onmousedown = td.ontouchstart = function(event) {
    +	     var e = event||window.event;
    +	     startColResize(this, this.ci, e);
    +	   };
    +	 } else {
    +	   ci += td.colSpan;
    +	 }
    +       }
    +
    +       ++ri;
    +     }
    +   }
    +
    +   self.resizeInitialized = true;
    + });
    +
    +WT_DECLARE_APP_MEMBER(1, "layouts",
    +  new (function() {
    +    var layouts = [], adjusting = false;
    +
    +    this.add = function(layout) {
    +      var i, il;
    +
    +      for (i=0, il = layouts.length ;i < il; ++i) {
    +        var l = layouts[i];
    +
    +        if (l.getId() == layout.getId()) {
    +	  layouts[i] = layout;
    + 	  return;
    +        } else if (layout.contains(l)) {
    +	  layouts.splice(i, 0, layout);
    +	  return;
    +        }
    +      }
    +      layouts.push(layout);
    +    };
    +
    +    this.adjust = function(id) {
    +      if (id) {
    +	var layout=$('#' + id).get(0);
    +	if (layout)
    +	  layout.dirty = true;
    +	return;
    +      }
    +
    +      if (adjusting)
    +	return;
    +
    +      adjusting = true;
    +      for (var i = 0; i < layouts.length; ++i) {
    +	var layout = layouts[i];
    +	if (!layout.adjust()) {
    +	  layout.WT.arrayRemove(layouts, i); --i;
    +	}
    +      }
    +
    +      adjusting = false;
    +    };
    +
    +  }) ()
    +);
    diff --git a/wt-3.1.7a/src/js/StdGridLayoutImpl.min.js b/wt-3.1.7a/src/js/StdGridLayoutImpl.min.js
    new file mode 100644
    index 0000000..6e7e278
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/StdGridLayoutImpl.min.js
    @@ -0,0 +1,14 @@
    +WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,h){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(b){var c=b.parentNode,f=a.px(b,"marginLeft");f+=a.px(b,"marginRight");f+=a.px(b,"borderLeftWidth");f+=a.px(b,"borderRightWidth");f+=a.px(b,"paddingLeft");f+=a.px(b,"paddingRight");f+=a.pxself(c,"paddingLeft");f+=a.pxself(c,"paddingRight");return f};this.marginV=function(b){var c=a.px(b,"marginTop");c+=a.px(b,"marginBottom");c+=a.px(b,"borderTopWidth");c+=a.px(b,"borderBottomWidth");
    +c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,i,d=a.getElement(t).firstChild.childNodes;f=c=0;for(i=d.length;f<i;f++){var k=d[f];if(a.hasTag(k,"COLGROUP")){f=-1;d=k.childNodes;i=d.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c,f){var i=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length==
    +0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!i&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(f!=-1&&o.getColumn(f).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height=
    +c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var i,d,k,g;i=0;g=-1;for(d=b.length;i<d;++i){k=b[i];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0,-1);f.push(k)}else this.adjustCell(k,c,-1)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
    +t,h);if(a.isHidden(b))return true;var c=b.firstChild,f=b.parentNode;if(c.style.height!="")c.style.height="";if(!(b.dirty||c.w!=f.clientWidth||c.h!=f.clientHeight))return true;b.dirty=null;var i=a.pxself(f,"height");if(i==0){i=f.clientHeight;i-=a.px(f,"paddingTop");i-=a.px(f,"paddingBottom")}i-=a.px(b,"marginTop");i-=a.px(b,"marginBottom");var d,k;if(f.children){d=0;for(k=f.children.length;d<k;++d){var g=f.children[d];if(g!=b)i-=$(g).outerHeight()}}var p=b=0,l,s;l=d=0;for(k=c.rows.length;d<k;d++){g=
    +c.rows[d];if(g.className=="Wt-hrh")i-=g.offsetHeight;else{p+=h.minheight[l];if(h.stretch[l]<=0)i-=g.offsetHeight;else b+=h.stretch[l];++l}}i=i>p?i:p;p=[];if(b!=0&&i>0){s=i;var q;l=d=0;for(k=c.rows.length;d<k;d++)if(c.rows[d].className!="Wt-hrh"){g=c.rows[d];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){q=i*h.stretch[l]/b;q=s>q?q:s;q=Math.round(h.minheight[l]>q?h.minheight[l]:q);s-=q}else q=g.offsetHeight;a.addAll(p,this.adjustRow(g,q))}++l}}d=0;for(k=p.length;d<k;++d){g=p[d];this.adjustCell(g,g.offsetHeight,
    +v)}c.w=f.clientWidth;c.h=f.clientHeight;if(c.style.tableLayout!="fixed")return true;b=0;l=c.childNodes;f=0;for(i=l.length;f<i;f++){var v=l[f],A,z;if(a.hasTag(v,"COLGROUP")){f=-1;l=v.childNodes;i=l.length}if(a.hasTag(v,"COL")){if(a.pctself(v,"width")==0){d=p=0;for(k=c.rows.length;d<k;d++){g=c.rows[d];s=g.childNodes;A=q=0;for(z=s.length;A<z;A++){g=s[A];if(g.colSpan==1&&q==b&&g.childNodes.length==1){g=g.firstChild;g=g.offsetWidth+o.marginH(g);p=Math.max(p,g);break}q+=g.colSpan;if(q>b)break}}if(p>0&&
    +a.pxself(v,"width")!=p)v.style.width=p+"px"}++b}}return true};this.contains=function(b){var c=a.getElement(t);b=a.getElement(b.getId());return c&&b?a.contains(c,b):false};this.adjust()});
    +WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,t,h){function o(e,j){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==j)return m.offsetWidth;r+=m.colSpan}}return 0}}function b(e,j){var m=a.getElement(t).firstChild;p(e).style.width=j+"px";var n,r,u,w;r=n=0;for(u=m.rows.length;n<u;n++){w=m.rows[n];if(w.className!="Wt-hrh"){var x,B,D,F;D=B=0;for(F=w.childNodes.length;B<
    +F;++B){x=w.childNodes[B];if(x.className!="Wt-vrh"){if(x.colSpan==1&&D==e&&x.childNodes.length==1){w=x.firstChild;x=j-g.marginH(w);w.style.width=x+"px";break}D+=x.colSpan}}++r}}}function c(e,j,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){i(e,j,r)},n,l,m,0,0)}function f(e,j,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,w=a.pxself(s.rows[0].childNodes[0],
    +"paddingTop"),x=a.pxself(s.rows[s.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,s.offsetHeight-w-x,n,r,"Wt-hsh",function(B){k(e,j,B)},u,l,m,0,-e.offsetTop+w-a.pxself(e,"paddingTop"))}function i(e,j,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(h.stretch[j]>0&&h.stretch[j+1]>0)h.stretch[j]=-1;if(h.stretch[j+1]==0)h.stretch[j+1]=-1;h.stretch[j]<=0&&g.adjustRow(n,r+m);h.stretch[j+1]<=0&&g.adjustRow(e,u-m);
    +a.getElement(t).dirty=true;window.onresize()}function d(){var e,j=0;for(e=0;;++e){var m=p(e);if(m)j+=a.pctself(m,"width");else break}if(j!=0)for(e=0;;++e)if(m=p(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/j+"%"}else break}function k(e,j,m){e=p(j);var n=o(e,j),r=p(j+1),u=o(r,j+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";d()}a.pctself(e,"width")==0&&b(j,n+m);a.pctself(r,"width")==0&&b(j+1,u-m);window.onresize()}var g=this,p=g.getColumn,l=a.getElement(t);if(l)if(!g.resizeInitialized){var s=
    +l.firstChild,q,v,A,z;v=q=0;for(A=s.rows.length;q<A;q++){z=s.rows[q];if(z.className=="Wt-hrh"){var y=z.firstChild;y.ri=v-1;y.onmousedown=y.ontouchstart=function(e){c(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){y=z.childNodes[C];if(y.className=="Wt-vrh"){y.ci=E-1;y.onmousedown=y.ontouchstart=function(e){f(this,this.ci,e||window.event)}}else E+=y.colSpan}++v}}g.resizeInitialized=true}});
    +WT_DECLARE_APP_MEMBER(1,"layouts",new (function(){var a=[],t=false;this.add=function(h){var o,b;o=0;for(b=a.length;o<b;++o){var c=a[o];if(c.getId()==h.getId()){a[o]=h;return}else if(h.contains(c)){a.splice(o,0,h);return}}a.push(h)};this.adjust=function(h){if(h){if(h=$("#"+h).get(0))h.dirty=true}else if(!t){t=true;for(var o=0;o<a.length;++o){h=a[o];if(!h.adjust()){h.WT.arrayRemove(a,o);--o}}t=false}}}));
    diff --git a/wt-3.1.7a/src/js/WDialog.js b/wt-3.1.7a/src/js/WDialog.js
    new file mode 100644
    index 0000000..7c4fbed
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WDialog.js
    @@ -0,0 +1,95 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WDialog",
    + function(APP, el) {
    +   jQuery.data(el, 'obj', this);
    +
    +   var self = this;
    +   var titlebar = $(el).find(".titlebar").first().get(0);
    +   var WT = APP.WT;
    +   var dsx, dsy;
    +   var moved = false;
    +
    +   if (el.style.left != '' || el.style.top != '')
    +     moved = true;
    +
    +   function handleMove(event) {
    +     var e = event||window.event;
    +     var nowxy = WT.pageCoordinates(e);
    +     var wxy = WT.windowCoordinates(e);
    +     var wsize = WT.windowSize();
    +
    +     if (wxy.x > 0 && wxy.x < wsize.x && wxy.y > 0 && wxy.y < wsize.y) {
    +       moved = true;
    +
    +       el.style.left = (WT.pxself(el, 'left') + nowxy.x - dsx) + 'px';
    +       el.style.top = (WT.pxself(el, 'top') + nowxy.y - dsy) + 'px';
    +       dsx = nowxy.x;
    +       dsy = nowxy.y;
    +     }
    +   };
    +
    +   if (titlebar) {
    +     titlebar.onmousedown = function(event) {
    +       var e = event||window.event;
    +       WT.capture(titlebar);
    +       var pc = WT.pageCoordinates(e);
    +       dsx = pc.x;
    +       dsy = pc.y;
    +
    +       titlebar.onmousemove = handleMove;
    +     };
    +
    +     titlebar.onmouseup = function(event) {
    +       titlebar.onmousemove = null;
    +
    +       WT.capture(null);
    +     };
    +   }
    +
    +   this.centerDialog = function() {
    +     if (el.parentNode == null) {
    +       el = titlebar = null;
    +       this.centerDialog = function() { };
    +       return;
    +     }
    +
    +     if (el.style.display != 'none') {
    +       if (!moved) {
    +	 var ws = WT.windowSize();
    +	 var w = el.offsetWidth, h = el.offsetHeight;
    +	 el.style.left = Math.round((ws.x - w)/2
    +	   + (WT.isIE6 ? document.documentElement.scrollLeft : 0)) + 'px';
    +	 el.style.top = Math.round((ws.y - h)/2
    +	   + (WT.isIE6 ? document.documentElement.scrollTop : 0)) + 'px';
    +	 el.style.marginLeft='0px';
    +	 el.style.marginTop='0px';
    +
    +	 if (el.style.width != '' && el.style.height != '')
    +	   self.wtResize(el, w, h);
    +       }
    +       el.style.visibility = 'visible';
    +     }
    +   };
    +
    +   this.wtResize = function(self, w, h) {
    +     h -= 2; w -= 2; // 2 = dialog border
    +     self.style.height= h + 'px';
    +     self.style.width= w + 'px';
    +     var c = self.lastChild;
    +     var t = c.previousSibling;
    +     h -= t.offsetHeight + 8; // 8 = body padding
    +     if (h > 0) {
    +       c.style.height = h + 'px';
    +       if (APP.layouts)
    +	 APP.layouts.adjust();
    +     }
    +   };
    + });
    diff --git a/wt-3.1.7a/src/js/WDialog.min.js b/wt-3.1.7a/src/js/WDialog.min.js
    new file mode 100644
    index 0000000..1ddcb3e
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WDialog.min.js
    @@ -0,0 +1,3 @@
    +WT_DECLARE_WT_MEMBER(1,"WDialog",function(g,b){function k(a){var c=a||window.event;a=d.pageCoordinates(c);c=d.windowCoordinates(c);var e=d.windowSize();if(c.x>0&&c.x<e.x&&c.y>0&&c.y<e.y){h=true;b.style.left=d.pxself(b,"left")+a.x-i+"px";b.style.top=d.pxself(b,"top")+a.y-j+"px";i=a.x;j=a.y}}jQuery.data(b,"obj",this);var l=this,f=$(b).find(".titlebar").first().get(0),d=g.WT,i,j,h=false;if(b.style.left!=""||b.style.top!="")h=true;if(f){f.onmousedown=function(a){a=a||window.event;d.capture(f);a=d.pageCoordinates(a);
    +i=a.x;j=a.y;f.onmousemove=k};f.onmouseup=function(){f.onmousemove=null;d.capture(null)}}this.centerDialog=function(){if(b.parentNode==null){b=f=null;this.centerDialog=function(){}}else if(b.style.display!="none"){if(!h){var a=d.windowSize(),c=b.offsetWidth,e=b.offsetHeight;b.style.left=Math.round((a.x-c)/2+(d.isIE6?document.documentElement.scrollLeft:0))+"px";b.style.top=Math.round((a.y-e)/2+(d.isIE6?document.documentElement.scrollTop:0))+"px";b.style.marginLeft="0px";b.style.marginTop="0px";b.style.width!=
    +""&&b.style.height!=""&&l.wtResize(b,c,e)}b.style.visibility="visible"}};this.wtResize=function(a,c,e){e-=2;c-=2;a.style.height=e+"px";a.style.width=c+"px";a=a.lastChild;e-=a.previousSibling.offsetHeight+8;if(e>0){a.style.height=e+"px";g.layouts&&g.layouts.adjust()}}});
    diff --git a/wt-3.1.7a/src/js/WFormWidget.js b/wt-3.1.7a/src/js/WFormWidget.js
    new file mode 100644
    index 0000000..2d35b70
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WFormWidget.js
    @@ -0,0 +1,34 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WFormWidget",
    + function(APP, el, emptyText) {
    +   jQuery.data(el, 'obj', this);
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   this.updateEmptyText = function() {
    +     var emptyTextStyle = 'Wt-edit-emptyText';
    +
    +     if (WT.hasFocus(el)) {
    +       if ($(el).hasClass(emptyTextStyle)) {
    +	 $(el).removeClass(emptyTextStyle);
    +	 el.value = '';
    +       }
    +     } else {
    +       if (el.value == '') {
    +	 $(el).addClass(emptyTextStyle);
    +	 el.value = emptyText;
    +       }
    +     }
    +   };
    +
    +   this.updateEmptyText();
    + });
    diff --git a/wt-3.1.7a/src/js/WFormWidget.min.js b/wt-3.1.7a/src/js/WFormWidget.min.js
    new file mode 100644
    index 0000000..8c65d17
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WFormWidget.min.js
    @@ -0,0 +1 @@
    +WT_DECLARE_WT_MEMBER(1,"WFormWidget",function(b,a,c){jQuery.data(a,"obj",this);var d=b.WT;this.updateEmptyText=function(){if(d.hasFocus(a)){if($(a).hasClass("Wt-edit-emptyText")){$(a).removeClass("Wt-edit-emptyText");a.value=""}}else if(a.value==""){$(a).addClass("Wt-edit-emptyText");a.value=c}};this.updateEmptyText()});
    diff --git a/wt-3.1.7a/src/js/WGLWidget.js b/wt-3.1.7a/src/js/WGLWidget.js
    new file mode 100644
    index 0000000..853cafe
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WGLWidget.js
    @@ -0,0 +1,147 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WGLWidget",
    + function(APP, canvas) {
    +   jQuery.data(canvas, 'obj', this);
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   var vec3 = WT.glMatrix.vec3;
    +   var mat3 = WT.glMatrix.mat3;
    +   var mat4 = WT.glMatrix.mat4;
    +
    +   this.ctx = null;
    +
    +   // Placeholders for the initializeGL and paintGL functions,
    +   // which will be overwritten by whatever is rendered
    +   this.initializeGL = function() {};
    +   this.paintGL = function() {};
    +   this.resizeGL = function() {};
    +   this.updates = new Array();
    +   this.initialized = false;
    +
    +   var dragPreviousXY = null;
    +   var lookAtCenter = null;
    +   var lookAtUpDir = null;
    +   var lookAtPitchRate = 0;
    +   var lookAtYawRate = 0;
    +   var cameraMatrix = null;
    +   var walkFrontRate = 0;
    +   var walkYawRate = 0;
    +
    +   this.discoverContext = function(noGLHandler) {
    +     if (canvas.getContext) {
    +       try {
    +         this.ctx = canvas.getContext('webgl', {antialias: true});
    +       } catch (e) {}
    +       if (this.ctx == null) {
    +         try {
    +           this.ctx = canvas.getContext('experimental-webgl');
    +         } catch (e) {}
    +       }
    +       if (this.ctx == null) {
    +         var alternative = canvas.firstChild;
    +         var parentNode = canvas.parentNode;
    +         parentNode.replaceChild(alternative, canvas);
    +         noGLHandler();
    +       }
    +     }
    +     return this.ctx;
    +   };
    +
    +   this.setLookAtParams = function(matrix, center, up, pitchRate, yawRate) {
    +     cameraMatrix = matrix;
    +     lookAtCenter = center;
    +     lookAtUpDir = up;
    +     lookAtPitchRate = pitchRate;
    +     lookAtYawRate = yawRate;
    +   };
    +
    +   this.mouseDragLookAt = function(o, event) {
    +     if (this.ctx == null) return; // no WebGL support
    +     var c = WT.pageCoordinates(event);
    +     var dx=(c.x - dragPreviousXY.x);
    +     var dy=(c.y - dragPreviousXY.y);
    +     var s=vec3.create();
    +     s[0]=cameraMatrix[0];
    +     s[1]=cameraMatrix[4];
    +     s[2]=cameraMatrix[8];
    +     var r=mat4.create();
    +     mat4.identity(r);
    +     mat4.translate(r, lookAtCenter);
    +     mat4.rotate(r, dy * lookAtPitchRate, s);
    +     mat4.rotate(r, dx * lookAtYawRate, lookAtUpDir);
    +     vec3.negate(lookAtCenter);
    +     mat4.translate(r, lookAtCenter);
    +     vec3.negate(lookAtCenter);
    +     mat4.multiply(cameraMatrix,r,cameraMatrix);
    +     //console.log('mouseDragLookAt after: ' + mat4.str(cameraMatrix));
    +     // Repaint!
    +     //console.log('mouseDragLookAt: repaint');
    +     this.paintGL();
    +     // store mouse coord for next action
    +     dragPreviousXY = WT.pageCoordinates(event);
    +   };
    +
    +   // Mouse wheel = zoom in/out
    +   this.mouseWheelLookAt = function(o, event) {
    +     if (this.ctx == null) return; // no WebGL support
    +     WT.cancelEvent(event);
    +     //alert('foo');
    +     var d = WT.wheelDelta(event);
    +     var s = Math.pow(1.2, d);
    +     mat4.translate(cameraMatrix, lookAtCenter);
    +     mat4.scale(cameraMatrix, [s, s, s]);
    +     vec3.negate(lookAtCenter);
    +     mat4.translate(cameraMatrix, lookAtCenter);
    +     vec3.negate(lookAtCenter);
    +     // Repaint!
    +     this.paintGL();
    +   };
    +
    +   this.setWalkParams = function(matrix, frontRate, yawRate) {
    +     cameraMatrix = matrix;
    +     walkFrontRate = frontRate;
    +     walkYawRate = yawRate;
    +   };
    +
    +   this.mouseDragWalk = function(o, event){
    +     if (this.ctx == null) return; // no WebGL support
    +     var c = WT.pageCoordinates(event);
    +     var dx=(c.x - dragPreviousXY.x);
    +     var dy=(c.y - dragPreviousXY.y);
    +     var r=mat4.create();
    +     mat4.identity(r);
    +     mat4.rotateY(r, dx * walkYawRate);
    +     var t=vec3.create();
    +     t[0]=0;
    +     t[1]=0;
    +     t[2]=-walkFrontRate * dy;
    +     mat4.translate(r, t);
    +     mat4.multiply(r, cameraMatrix, cameraMatrix);
    +     this.paintGL();
    +     dragPreviousXY = WT.pageCoordinates(event);
    +   };
    +
    +
    +   this.mouseDown = function(o, event) {
    +     WT.capture(null);
    +     WT.capture(canvas);
    +
    +     dragPreviousXY = WT.pageCoordinates(event);
    +   };
    +
    +   this.mouseUp = function(o, event) {
    +     if (dragPreviousXY != null)
    +       dragPreviousXY = null;
    +   };
    +
    + });
    diff --git a/wt-3.1.7a/src/js/WGLWidget.min.js b/wt-3.1.7a/src/js/WGLWidget.min.js
    new file mode 100644
    index 0000000..859db2a
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WGLWidget.min.js
    @@ -0,0 +1,4 @@
    +WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,j){jQuery.data(j,"obj",this);var f=r.WT,l=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};this.resizeGL=function(){};this.updates=[];this.initialized=false;var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(a){if(j.getContext){try{this.ctx=j.getContext("webgl",{antialias:true})}catch(c){}if(this.ctx==null)try{this.ctx=j.getContext("experimental-webgl")}catch(d){}if(this.ctx==
    +null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams=function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=
    +null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);
    +f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}});
    diff --git a/wt-3.1.7a/src/js/WHTML5Media.js b/wt-3.1.7a/src/js/WHTML5Media.js
    new file mode 100644
    index 0000000..efe521e
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WHTML5Media.js
    @@ -0,0 +1,51 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +WT_DECLARE_WT_MEMBER
    +(1, "WHTML5Media",
    + function(APP, el) {
    +   jQuery.data(el, 'obj', this);
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   function handleMove(event) {
    +   };
    +
    +   this.play = function() {
    +     if (el.mediaId) {
    +       var mediaEl = $('#' + el.mediaId).get(0);
    +       if (mediaEl) {
    +         mediaEl.play();
    +         return;
    +       }
    +     }
    +     if (el.alternativeId) {
    +       var alternativeEl = $('#' + el.alternativeId).get(0);
    +       if (alternativeEl && alternativeEl.WtPlay) {
    +         alternativeEl.WtPlay();
    +       }
    +     }
    +   };
    +
    +   this.pause = function() {
    +     if (el.mediaId) {
    +       var mediaEl = $('#' + el.mediaId).get(0);
    +       if (mediaEl) {
    +         mediaEl.pause();
    +         return;
    +       }
    +     }
    +     if (el.alternativeId) {
    +       var alternativeEl = $('#' + el.alternativeId).get(0);
    +       if (alternativeEl && alternativeEl.WtPlay) {
    +         alternativeEl.WtPause();
    +       }
    +     }
    +    };
    +
    + });
    diff --git a/wt-3.1.7a/src/js/WHTML5Media.min.js b/wt-3.1.7a/src/js/WHTML5Media.min.js
    new file mode 100644
    index 0000000..3f1a3f3
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WHTML5Media.min.js
    @@ -0,0 +1 @@
    +WT_DECLARE_WT_MEMBER(1,"WHTML5Media",function(c,b){jQuery.data(b,"obj",this);this.play=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.play();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPlay()};this.pause=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.pause();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPause()}});
    diff --git a/wt-3.1.7a/src/js/WSpinBox.js b/wt-3.1.7a/src/js/WSpinBox.js
    new file mode 100644
    index 0000000..21f4c82
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WSpinBox.js
    @@ -0,0 +1,117 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WSpinBox",
    + function(APP, edit, minValue, maxValue, stepValue) {
    +   jQuery.data(edit, 'obj', this);
    +
    +   var self = this, WT = APP.WT, key_up = 38, key_down = 40, CH = 'crosshair',
    +     $edit = $(edit);
    +
    +   var dragStartXY = null, dragStartValue;
    +
    +   function setValue(v) {
    +     if (v > maxValue)
    +       v = maxValue;
    +     else if (v < minValue)
    +     v = minValue;
    +     edit.value = v;
    +   }
    +
    +   function inc() {
    +     var v = Number(edit.value);
    +     v += stepValue;
    +     setValue(v);
    +     edit.onchange();
    +   }
    +
    +   function dec() {
    +     var v = Number(edit.value);
    +     v -= stepValue;
    +     setValue(v);
    +     edit.onchange();
    +   }
    +
    +   this.update = function(aMin, aMax, aStep) {
    +     minValue = aMin;
    +     maxValue = aMax;
    +     stepValue = aStep;
    +   };
    +
    +   this.mouseOut = function(o, event) {
    +     $edit.removeClass('Wt-spinbox-dn').removeClass('Wt-spinbox-up');
    +   }
    +
    +   this.mouseMove = function(o, event) {
    +     if (!dragStartXY) {
    +       var xy = WT.widgetCoordinates(edit, event);
    +       $edit.removeClass('Wt-spinbox-dn').removeClass('Wt-spinbox-up');
    +       if (xy.x > edit.offsetWidth - 16) {
    +	 var mid = edit.offsetHeight/2;
    +	 if (xy.y >= mid - 1 && xy.y <= mid + 1)
    +	   edit.style.cursor = CH;
    +	 else {
    +	   edit.style.cursor = 'default';
    +	   if (xy.y < mid - 1)
    +	     $edit.addClass('Wt-spinbox-up');
    +	   else
    +	     $edit.addClass('Wt-spinbox-dn');
    +	 }
    +       } else
    +	 edit.style.cursor = '';
    +     } else {
    +       var dy = WT.pageCoordinates(event).y - dragStartXY.y;
    +
    +       var v = dragStartValue;
    +       v = v - dy*stepValue;
    +
    +       setValue(v);
    +     }
    +   };
    +
    +   this.mouseDown = function(o, event) {
    +     if (edit.style.cursor == CH) {
    +       WT.capture(null);
    +       WT.capture(edit);
    +
    +       dragStartXY = WT.pageCoordinates(event);
    +       dragStartValue = Number(edit.value);
    +     } else {
    +       var xy = WT.widgetCoordinates(edit, event);
    +       if (xy.x > edit.offsetWidth - 16) {
    +	 // suppress selection, focus
    +	 WT.cancelEvent(event);
    +	 WT.capture(edit);
    +       }
    +     }
    +   };
    +
    +   this.keyDown = function(o, event) {
    +     if (event.keyCode == key_down)
    +       dec();
    +     else if (event.keyCode == key_up)
    +       inc();
    +   };
    +
    +   this.mouseUp = function(o, event) {
    +     if (dragStartXY != null) {
    +       dragStartXY = null;
    +       o.onchange();
    +     } else {
    +       var xy = WT.widgetCoordinates(edit, event);
    +       if (xy.x > edit.offsetWidth - 16) {
    +	 var mid = edit.offsetHeight/2;
    +	 if (xy.y < mid)
    +	   inc();
    +	 else
    +	   dec();
    +       }
    +     }
    +   };
    + });
    diff --git a/wt-3.1.7a/src/js/WSpinBox.min.js b/wt-3.1.7a/src/js/WSpinBox.min.js
    new file mode 100644
    index 0000000..1822377
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WSpinBox.min.js
    @@ -0,0 +1,3 @@
    +WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(n,b,h,i,f){function j(a){if(a>i)a=i;else if(a<h)a=h;b.value=a}function k(){var a=Number(b.value);a+=f;j(a);b.onchange()}function l(){var a=Number(b.value);a-=f;j(a);b.onchange()}jQuery.data(b,"obj",this);var d=n.WT,g=$(b),e=null,m;this.update=function(a,c,o){h=a;i=c;f=o};this.mouseOut=function(){g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up")};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=m;c-=a*f;j(c)}else{a=d.widgetCoordinates(b,
    +c);g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up");if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;if(a.y>=c-1&&a.y<=c+1)b.style.cursor="crosshair";else{b.style.cursor="default";a.y<c-1?g.addClass("Wt-spinbox-up"):g.addClass("Wt-spinbox-dn")}}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);m=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=
    +function(a,c){if(c.keyCode==40)l();else c.keyCode==38&&k()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?k():l()}}});
    diff --git a/wt-3.1.7a/src/js/WSuggestionPopup.js b/wt-3.1.7a/src/js/WSuggestionPopup.js
    new file mode 100644
    index 0000000..65f75b0
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WSuggestionPopup.js
    @@ -0,0 +1,429 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WSuggestionPopup",
    + function(APP, el, replacerJS, matcherJS, filterLength, defaultValue, global) {
    +   $('.Wt-domRoot').add(el);
    +
    +   jQuery.data(el, 'obj', this);
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   var key_tab = 9;
    +   var key_enter = 13;
    +   var key_escape = 27;
    +
    +   var key_pup = 33;
    +   var key_pdown = 34;
    +   var key_left = 37;
    +   var key_up = 38;
    +   var key_right = 39;
    +   var key_down = 40;
    +
    +   var selId = null, editId = null, kd = false,
    +       filter = null, filtering = null, delayHideTimeout = null,
    +       lastFilterValue = null, droppedDown = false;
    +
    +   this.defaultValue = defaultValue;
    +
    +   /* Checks if we are (still) assisting the given edit */
    +   function checkEdit(edit) {
    +     return $(edit).hasClass("Wt-suggest-onedit")
    +         || $(edit).hasClass("Wt-suggest-dropdown");
    +   }
    +
    +   function visible() {
    +     return el.style.display != 'none';
    +   }
    +
    +   function hidePopup() {
    +     el.style.display = 'none';
    +   }
    +
    +   function positionPopup(edit) {
    +     WT.positionAtWidget(el.id, edit.id, WT.Vertical, global);
    +   }
    +
    +   function contentClicked(event) {
    +     var e = event || window.event;
    +     var line = WT.target(e);
    +     if (line.className == "content")
    +       return;
    +
    +     while (line && !WT.hasTag(line, "DIV"))
    +       line = line.parentNode;
    +
    +     if (line)
    +       suggestionClicked(line);
    +   }
    +
    +   function suggestionClicked(line) {
    +     var suggestion = line.firstChild,
    +         edit = WT.getElement(editId),
    +         sText = suggestion.innerHTML,
    +         sValue = suggestion.getAttribute('sug');
    +
    +     edit.focus();
    +     APP.emit(el, "select", line.id, edit.id);
    +
    +     replacerJS(edit, sText, sValue);
    +
    +     hidePopup();
    +
    +     editId = null;
    +   };
    +
    +   this.showPopup = function() {
    +     el.style.display = '';
    +     selId = null;
    +     lastFilterValue = null;
    +   };
    +
    +   this.editMouseMove = function(edit, event) {
    +     if (!checkEdit(edit))
    +       return;
    +
    +     var xy = WT.widgetCoordinates(edit, event);
    +     if (xy.x > edit.offsetWidth - 16)
    +       edit.style.cursor = 'default';
    +     else
    +       edit.style.cursor = '';
    +   };
    +
    +   this.editClick = function(edit, event) {
    +     if (!checkEdit(edit))
    +       return;
    +
    +     var xy = WT.widgetCoordinates(edit, event);
    +     if (xy.x > edit.offsetWidth - 16) {
    +       if (editId != edit.id || !visible()) {
    +	 hidePopup();
    +	 editId = edit.id;
    +	 droppedDown = true;
    +	 self.refilter();
    +       } else {
    +	 editId = null;
    +	 hidePopup();
    +       }
    +     }
    +   };
    +
    +   function next(n, down) {
    +     for (n = down ? n.nextSibling : n.previousSibling;
    +	  n;
    +	  n = down ? n.nextSibling : n.previousSibling) {
    +       if (WT.hasTag(n, 'DIV'))
    +	 if (n.style.display != 'none')
    +	   return n;
    +     }
    +
    +     return null;
    +   }
    +
    +   this.editKeyDown = function(edit, event) {
    +     if (!checkEdit(edit))
    +       return true;
    +
    +     if (editId != edit.id) {
    +       if ($(edit).hasClass("Wt-suggest-onedit")) {
    +	 editId = edit.id;
    +	 droppedDown = false;
    +       } else if ($(edit).hasClass("Wt-suggest-dropdown")
    +		  && event.keyCode == key_down) {
    +	 editId = edit.id;
    +	 droppedDown = true;
    +       } else {
    +	 editId = null;
    +	 return true;
    +       }
    +     }
    +
    +     var sel = selId ? WT.getElement(selId) : null;
    +
    +     if (visible() && sel) {
    +       if ((event.keyCode == key_enter) || (event.keyCode == key_tab)) {
    +	 /*
    +	  * Select currently selectd
    +	  */
    +         suggestionClicked(sel);
    +         WT.cancelEvent(event);
    +	 setTimeout(function() { edit.focus(); }, 0);
    +	 return false;
    +       } else if (   event.keyCode == key_down
    +		  || event.keyCode == key_up
    +		  || event.keyCode == key_pdown
    +		  || event.keyCode == key_pup) {
    +	 /*
    +	  * Handle navigation in list
    +	  */
    +         if (event.type.toUpperCase() == 'KEYDOWN') {
    +           kd = true;
    +	   WT.cancelEvent(event, WT.CancelDefaultAction);
    +	 }
    +
    +         if (event.type.toUpperCase() == 'KEYPRESS' && kd == true) {
    +           WT.cancelEvent(event);
    +           return false;
    +         }
    +
    +	 /*
    +	  * Find next selected node
    +	  */
    +         var n = sel,
    +	     down = event.keyCode == key_down || event.keyCode == key_pdown,
    +	     count = (event.keyCode == key_pdown || event.keyCode == key_pup ?
    +		      el.clientHeight / sel.offsetHeight : 1),
    +	     i;
    +
    +	 for (i = 0; n && i < count; ++i) {
    +	   var l = next(n, down);
    +	   if (!l)
    +	     break;
    +	   n = l;
    +	 }
    +
    +         if (n && WT.hasTag(n, 'DIV')) {
    +           sel.className = '';
    +           n.className = 'sel';
    +           selId = n.id;
    +         }
    +
    +         return false;
    +       }
    +     }
    +     return (event.keyCode != key_enter && event.keyCode != key_tab);
    +   };
    +
    +   this.filtered = function(f) {
    +     filter = f;
    +     self.refilter();
    +   };
    +
    +   function scrollToSelected(sel) {
    +     var p = sel.parentNode;
    +
    +     if (sel.offsetTop + sel.offsetHeight > p.scrollTop + p.clientHeight)
    +       p.scrollTop = sel.offsetTop + sel.offsetHeight - p.clientHeight;
    +     else if (sel.offsetTop < p.scrollTop)
    +       p.scrollTop = sel.offsetTop;
    +   }
    +
    +   /*
    +    * Refilter the current selection list based on the edit value.
    +    */
    +   this.refilter = function() {
    +     var sel = selId ? WT.getElement(selId) : null,
    +         edit = WT.getElement(editId),
    +         matcher = matcherJS(edit),
    +         sels = el.lastChild.childNodes,
    +         text = matcher(null);
    +
    +     lastFilterValue = edit.value;
    +
    +     if (filterLength) {
    +       if (text.length < filterLength && !droppedDown) {
    +	 hidePopup();
    +	 return;
    +       } else {
    +	 var nf = text.substring(0, filterLength);
    +	 if (nf != filter) {
    +	   if (nf != filtering) {
    +	     filtering = nf;
    +	     APP.emit(el, "filter", nf);
    +	   }
    +
    +	   if (!droppedDown) {
    +	     // better would be to set a Loading indicator
    +	     hidePopup();
    +	     return;
    +	   }
    +	 }
    +       }
    +     }
    +
    +     var first = null, toselect = null,
    +         showall = droppedDown && text.length == 0,
    +         i, il;
    +
    +     for (i = 0, il = sels.length; i < il; ++i) {
    +       var child = sels[i];
    +       if (WT.hasTag(child, 'DIV')) {
    +         if (child.orig == null) {
    +           child.orig = child.firstChild.innerHTML;
    +	 }
    +
    +	 var result = matcher(child.orig),
    +	     match = showall || result.match;
    +
    +	 if (result.suggestion != child.firstChild.innerHTML)
    +	   child.firstChild.innerHTML = result.suggestion;
    +
    +         if (match) {
    +	   if (child.style.display != '')
    +             child.style.display = '';
    +           if (first == null)
    +	     first = child;
    +	   if (i == this.defaultValue) {
    +	     toselect = child;
    +	   }
    +         } else if (child.style.display != 'none')
    +           child.style.display = 'none';
    +
    +	 if (child.className != '')
    +	   child.className = '';
    +       }
    +     }
    +
    +     if (first == null) {
    +       hidePopup();
    +     } else {
    +       if (!visible()) {
    +	 positionPopup(edit);
    +	 self.showPopup();
    +	 sel = null;
    +       }
    +
    +       if (!sel || (sel.style.display == 'none')) {
    +	 sel = toselect || first ;
    +	 sel.parentNode.scrollTop = 0;
    +         selId = sel.id;
    +       }
    +
    +       sel.className = 'sel';
    +       scrollToSelected(sel);
    +     }
    +   };
    +
    +   this.editKeyUp = function(edit, event) {
    +     if (editId == null)
    +       return;
    +
    +     if (!checkEdit(edit))
    +       return;
    +
    +     if ((event.keyCode == key_enter || event.keyCode == key_tab)
    +       && el.style.display == 'none')
    +       return;
    +
    +     if (event.keyCode == key_escape
    +         || event.keyCode == key_left
    +         || event.keyCode == key_right) {
    +       el.style.display = 'none';
    +       if (event.keyCode == key_escape) {
    +	 editId = null;
    +	 if ($(edit).hasClass("Wt-suggest-dropdown"))
    +	   hidePopup();
    +	 else
    +	   edit.blur();
    +       }
    +     } else {
    +       if (edit.value != lastFilterValue)
    +	 self.refilter();
    +       else {
    +	 var sel = selId ? WT.getElement(selId) : null;
    +	 if (sel)
    +	   scrollToSelected(sel);
    +       }
    +     }
    +   };
    +
    +   el.lastChild.onclick = contentClicked;
    +
    +   /*
    +    * In Safari, scrolling causes the edit to lose focus, but we don't want
    +    * that. Can it be avoided? In any case, this fixes it.
    +    */
    +   el.lastChild.onscroll = function() {
    +     if (delayHideTimeout) {
    +       clearTimeout(delayHideTimeout);
    +       var edit = WT.getElement(editId);
    +       if (edit)
    +	 edit.focus();
    +     }
    +   };
    +
    +   this.delayHide = function(edit, event) {
    +     delayHideTimeout = setTimeout(function() {
    +       delayHideTimeout = null;
    +       if (el && (edit == null || editId == edit.id))
    +	   hidePopup();
    +       }, 300);
    +   };
    + });
    +
    +WT_DECLARE_WT_MEMBER
    +(2, "WSuggestionPopupStdMatcher",
    + function(highlightBeginTag, highlightEndTag, listSeparator, whiteSpace,
    +	  wordSeparators, appendReplacedText) {
    +   function parseEdit(edit) {
    +     var value = edit.value;
    +     var pos = edit.selectionStart ? edit.selectionStart : value.length;
    +
    +     var start = listSeparator
    +       ? value.lastIndexOf(listSeparator, pos - 1) + 1 : 0;
    +
    +     while ((start < pos)
    +            && (whiteSpace.indexOf(value.charAt(start)) != -1))
    +       ++start;
    +
    +     return { start: start, end: pos };
    +   }
    +
    +   this.match = function(edit) {
    +     var range = parseEdit(edit);
    +     var value = edit.value.substring(range.start, range.end);
    +
    +     var regexp = "^";
    +     if (wordSeparators.length != 0)
    +       regexp = "(^|(?:[" + wordSeparators + "]))";
    +
    +     regexp += "(" + value.replace
    +       (new RegExp("([\\^\\\\\\][\\-.$*+?()|{}])","g"), "\\$1") + ")";
    +
    +     regexp = new RegExp(regexp, "gi");
    +
    +     return function(suggestion) {
    +       if (!suggestion)
    +	 return value;
    +
    +       var matched = false;
    +
    +       if (value.length) {
    +	 var highlighted
    +	   = suggestion.replace(regexp, "$1" + highlightBeginTag + "$2"
    +				+ highlightEndTag);
    +	 if (highlighted != suggestion) {
    +	   matched = true;
    +	   suggestion = highlighted;
    +	 }
    +       }
    +
    +       return { match: matched, suggestion: suggestion };
    +     };
    +   };
    +
    +   this.replace = function(edit, suggestionText, suggestionValue) {
    +     var range = parseEdit(edit);
    +
    +     var nv = edit.value.substring(0, range.start) + suggestionValue
    +       + appendReplacedText;
    +
    +     if (range.end < edit.value.length)
    +      nv += edit.value.substring(range.end, edit.value.length);
    +
    +     edit.value = nv;
    +
    +     if (edit.selectionStart) {
    +       edit.selectionStart = range.start + suggestionValue.length
    +	 + appendReplacedText.length;
    +       edit.selectionEnd = edit.selectionStart;
    +     }
    +   };
    + });
    diff --git a/wt-3.1.7a/src/js/WSuggestionPopup.min.js b/wt-3.1.7a/src/js/WSuggestionPopup.min.js
    new file mode 100644
    index 0000000..f4cbe25
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WSuggestionPopup.min.js
    @@ -0,0 +1,10 @@
    +WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(s,f,w,C,q,x,y){function c(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function g(){return f.style.display!="none"}function d(){f.style.display="none"}function m(a){e.positionAtWidget(f.id,a.id,e.Vertical,y)}function o(a){a=e.target(a||window.event);if(a.className!="content"){for(;a&&!e.hasTag(a,"DIV");)a=a.parentNode;a&&t(a)}}function t(a){var b=a.firstChild,k=e.getElement(i),l=b.innerHTML;b=b.getAttribute("sug");
    +k.focus();s.emit(f,"select",a.id,k.id);w(k,l,b);d();i=null}function z(a,b){for(a=b?a.nextSibling:a.previousSibling;a;a=b?a.nextSibling:a.previousSibling)if(e.hasTag(a,"DIV"))if(a.style.display!="none")return a;return null}function F(a){var b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}$(".Wt-domRoot").add(f);jQuery.data(f,"obj",this);var A=this,e=s.WT,n=null,i=null,
    +G=false,H=null,I=null,B=null,D=null,r=false;this.defaultValue=x;this.showPopup=function(){f.style.display="";D=n=null};this.editMouseMove=function(a,b){if(c(a))a.style.cursor=e.widgetCoordinates(a,b).x>a.offsetWidth-16?"default":""};this.editClick=function(a,b){if(c(a))if(e.widgetCoordinates(a,b).x>a.offsetWidth-16)if(i!=a.id||!g()){d();i=a.id;r=true;A.refilter()}else{i=null;d()}};this.editKeyDown=function(a,b){if(!c(a))return true;if(i!=a.id)if($(a).hasClass("Wt-suggest-onedit")){i=a.id;r=false}else if($(a).hasClass("Wt-suggest-dropdown")&&
    +b.keyCode==40){i=a.id;r=true}else{i=null;return true}var k=n?e.getElement(n):null;if(g()&&k)if(b.keyCode==13||b.keyCode==9){t(k);e.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){G=true;e.cancelEvent(b,e.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&G==true){e.cancelEvent(b);return false}var l=k,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?f.clientHeight/
    +k.offsetHeight:1;var j;for(j=0;l&&j<b;++j){var u=z(l,p);if(!u)break;l=u}if(l&&e.hasTag(l,"DIV")){k.className="";l.className="sel";n=l.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){H=a;A.refilter()};this.refilter=function(){var a=n?e.getElement(n):null,b=e.getElement(i),k=C(b),l=f.lastChild.childNodes,p=k(null);D=b.value;if(q)if(p.length<q&&!r){d();return}else{var j=p.substring(0,q);if(j!=H){if(j!=I){I=j;s.emit(f,"filter",j)}if(!r){d();return}}}var u=j=null;p=r&&p.length==
    +0;var v,J;v=0;for(J=l.length;v<J;++v){var h=l[v];if(e.hasTag(h,"DIV")){if(h.orig==null)h.orig=h.firstChild.innerHTML;var E=k(h.orig),K=p||E.match;if(E.suggestion!=h.firstChild.innerHTML)h.firstChild.innerHTML=E.suggestion;if(K){if(h.style.display!="")h.style.display="";if(j==null)j=h;if(v==this.defaultValue)u=h}else if(h.style.display!="none")h.style.display="none";if(h.className!="")h.className=""}}if(j==null)d();else{if(!g()){m(b);A.showPopup();a=null}if(!a||a.style.display=="none"){a=u||j;a.parentNode.scrollTop=
    +0;n=a.id}a.className="sel";F(a)}};this.editKeyUp=function(a,b){if(i!=null)if(c(a))if(!((b.keyCode==13||b.keyCode==9)&&f.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){f.style.display="none";if(b.keyCode==27){i=null;$(a).hasClass("Wt-suggest-dropdown")?d():a.blur()}}else if(a.value!=D)A.refilter();else(a=n?e.getElement(n):null)&&F(a)};f.lastChild.onclick=o;f.lastChild.onscroll=function(){if(B){clearTimeout(B);var a=e.getElement(i);a&&a.focus()}};this.delayHide=function(a){B=
    +setTimeout(function(){B=null;if(f&&(a==null||i==a.id))d()},300)}});
    +WT_DECLARE_WT_MEMBER(2,"WSuggestionPopupStdMatcher",function(s,f,w,C,q,x){function y(c){var g=c.value;c=c.selectionStart?c.selectionStart:g.length;for(var d=w?g.lastIndexOf(w,c-1)+1:0;d<c&&C.indexOf(g.charAt(d))!=-1;)++d;return{start:d,end:c}}this.match=function(c){var g=y(c),d=c.value.substring(g.start,g.end),m="^";if(q.length!=0)m="(^|(?:["+q+"]))";m+="("+d.replace(new RegExp("([\\^\\\\\\][\\-.$*+?()|{}])","g"),"\\$1")+")";m=new RegExp(m,"gi");return function(o){if(!o)return d;var t=false;if(d.length){var z=
    +o.replace(m,"$1"+s+"$2"+f);if(z!=o){t=true;o=z}}return{match:t,suggestion:o}}};this.replace=function(c,g,d){g=y(c);var m=c.value.substring(0,g.start)+d+x;if(g.end<c.value.length)m+=c.value.substring(g.end,c.value.length);c.value=m;if(c.selectionStart){c.selectionStart=g.start+d.length+x.length;c.selectionEnd=c.selectionStart}}});
    diff --git a/wt-3.1.7a/src/js/WTableView.js b/wt-3.1.7a/src/js/WTableView.js
    new file mode 100644
    index 0000000..d9246d3
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WTableView.js
    @@ -0,0 +1,283 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WTableView",
    + function(APP, el, contentsContainer, headerContainer) {
    +   jQuery.data(el, 'obj', this);
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   var scrollX1 = 0, scrollX2 = 0, scrollY1 = 0, scrollY2 = 0;
    +
    +   contentsContainer.onscroll = function() {
    +     headerContainer.scrollLeft = contentsContainer.scrollLeft;
    +
    +     if (contentsContainer.scrollTop < scrollY1
    +	 || contentsContainer.scrollTop > scrollY2
    +	 || contentsContainer.scrollLeft < scrollX1
    +	 || contentsContainer.scrollLeft > scrollX2)
    +       APP.emit(el, 'scrolled', contentsContainer.scrollLeft,
    +	        contentsContainer.scrollTop, contentsContainer.clientWidth,
    +	        contentsContainer.clientHeight);
    +   };
    +
    +   function getItem(event) {
    +     var columnId = -1, rowIdx = -1, selected = false,
    +         drop = false, ele = null;
    +
    +     var t = WT.target(event);
    +
    +     while (t) {
    +       var $t = $(t);
    +       if ($t.hasClass('Wt-tv-contents')) {
    +	 break;
    +       } else if ($t.hasClass('Wt-tv-c')) {
    +	 if (t.getAttribute('drop') === 'true')
    +	   drop = true;
    +	 if ($t.hasClass('Wt-selected'))
    +	   selected = true;
    +	 ele = t;
    +	 t = t.parentNode;
    +	 columnId = t.className.split(' ')[0].substring(7) * 1;
    +	 break;
    +       }
    +       t = t.parentNode;
    +     }
    +
    +     return { columnId: columnId, rowIdx: rowIdx, selected: selected,
    +	      drop: drop, el: ele };
    +   };
    +
    +   function indexOf(child) {
    +     var i, il, plist = child.parentNode.childNodes;
    +
    +     for (i = 0, il = plist.length; i < il; ++i)
    +       if (plist[i] == child)
    +	 return i;
    +
    +     return -1;
    +   }
    +
    +   function resizeColumn(header, delta) {
    +     var columnClass = header.className.split(' ')[0],
    +         columnId = columnClass.substring(7) * 1,
    +         headers = headerContainer.firstChild,
    +         contents = contentsContainer.firstChild,
    +	 column = $(contents).find('.' + columnClass).get(0),
    +         h = header.nextSibling, c = column.nextSibling,
    +         newWidth = WT.pxself(header, 'width') - 1 + delta;
    +
    +     headers.style.width = contents.style.width
    +       = (WT.pxself(headers, 'width') + delta) + 'px';
    +     header.style.width = (newWidth + 1) + 'px';
    +     column.style.width = (newWidth + 7) + 'px';
    +
    +     for (; h; h = h.nextSibling) {
    +       if (c) {
    +	 c.style.left = (WT.pxself(c, 'left') + delta) + 'px';
    +	 c = c.nextSibling;
    +       }
    +     }
    +
    +     APP.emit(el, 'columnResized', columnId, parseInt(newWidth));
    +   }
    +
    +   this.mouseDown = function(obj, event) {
    +     WT.capture(null);
    +
    +     var item = getItem(event);
    +     if (el.getAttribute('drag') === 'true' && item.selected)
    +       APP._p_.dragStart(el, event);
    +   };
    +
    +   this.resizeHandleMDown = function(obj, event) {
    +     var header = obj.parentNode.parentNode,
    +         cw = WT.pxself(header, 'width') - 1,
    +         minDelta = -cw,
    +         maxDelta = 10000;
    +
    +     new WT.SizeHandle(WT, 'h', obj.offsetWidth, el.offsetHeight,
    +		       minDelta, maxDelta, 'Wt-hsh',
    +		       function (delta) {
    +			 resizeColumn(header, delta);
    +		       }, obj, el, event, -2, -1);
    +   };
    +
    +   this.scrolled = function(X1, X2, Y1, Y2) {
    +     scrollX1 = X1;
    +     scrollX2 = X2;
    +     scrollY1 = Y1;
    +     scrollY2 = Y2;
    +   };
    +
    +   var dropEl = null;
    +
    +   el.handleDragDrop=function(action, object, event, sourceId, mimeType) {
    +     if (dropEl) {
    +       dropEl.className = dropEl.classNameOrig;
    +       dropEl = null;
    +     }
    +
    +     if (action == 'end')
    +       return;
    +
    +     var item = getItem(event);
    +
    +     if (!item.selected && item.drop) {
    +       if (action == 'drop') {
    +	 APP.emit(el, { name: 'dropEvent', eventObject: object, event: event },
    +		  item.rowIdx, item.columnId, sourceId, mimeType);
    +       } else {
    +         object.className = 'Wt-valid-drop';
    +         dropEl = item.el;
    +         dropEl.classNameOrig = dropEl.className;
    +         dropEl.className = dropEl.className + ' Wt-drop-site';
    +       }
    +     } else {
    +       object.className = '';
    +     }
    +   };
    +
    +   /* Handle TAB/SHIFT-TAB for cycling through editors in the right order */
    +   el.onkeydown=function(e) {
    +     var event = e||window.event;
    +
    +     var leftKey = 37,
    +       upKey = 38,
    +       rightKey = 39,
    +       downKey = 40;
    +
    +     if (event.keyCode == 9) {
    +       WT.cancelEvent(event);
    +
    +       /* Find next/prev input element, first by row, then by column */
    +       var item = getItem(event);
    +       if (!item.el)
    +	 return;
    +
    +       var col = item.el.parentNode,
    +           rowi = indexOf(item.el),
    +           coli = indexOf(col),
    +           cols = col.parentNode.childNodes.length,
    +           rows = col.childNodes.length,
    +	   back = event.shiftKey,
    +	   wrapped = false;
    +
    +       var i = rowi, j;
    +
    +       for (;;) {
    +	 for (;
    +	      back ? i >= 0 : i < rows;
    +	      i = (back ? i-1 : i+1)) {
    +	   if (i == rowi && !wrapped)
    +	     j = back ? coli - 1 : coli + 1;
    +	   else
    +	     j = back ? cols - 1 : 0;
    +	   for (;
    +		back ? j >= 0 : j < cols;
    +		j = (back ? j-1 : j+1)) {
    +	     /* We have wrapped and arrived back at the beginning */
    +	     if (i == rowi && j == coli)
    +	       return;
    +	     col = col.parentNode.childNodes[j];
    +	     var elij = col.childNodes[i];
    +	     var inputs = $(elij).find(":input");
    +	     if (inputs.size() > 0) {
    +	       setTimeout(function() { inputs.focus(); }, 0);
    +	       return;
    +	     }
    +	   }
    +	 }
    +	 i = back ? rows - 1 : 0;
    +	 wrapped = true;
    +       }
    +     }
    +     /* If keycode is up/down/right/left */
    +     else if (event.keyCode >= leftKey && event.keyCode <= downKey) {
    +       var currentEl = WT.target(event);
    +
    +       //do not allow arrow navigation from select
    +       if (currentEl.nodeName == 'select')
    +	 return;
    +
    +       var item = getItem(event);
    +       if (!item.el)
    +	 return;
    +
    +       var col = item.el.parentNode,
    +           rowi = indexOf(item.el),
    +           coli = indexOf(col),
    +           cols = col.parentNode.childNodes.length,
    +	   rows = col.childNodes.length;
    +
    +       switch (event.keyCode) {
    +	 case rightKey:
    +	 if (WT.hasTag(currentEl,'INPUT')
    +	       && currentEl.type == 'text') {
    +	     var range = WT.getSelectionRange(currentEl);
    +	     if (range.start != currentEl.value.length)
    +	       return;
    +	   }
    +	   coli++; break;
    +	 case upKey:
    +	   rowi--; break;
    +	 case leftKey:
    +	   if (WT.hasTag(currentEl,'INPUT')
    +	       && currentEl.type == 'text') {
    +	     var range = WT.getSelectionRange(currentEl);
    +	     if (range.start != 0)
    +	       return;
    +	   }
    +	   coli--; break;
    +	 case downKey:
    +	   rowi++; break;
    +	 default:
    +	   return;
    +       }
    +
    +       WT.cancelEvent(event);
    +
    +       if (rowi > -1 && rowi < rows && coli > -1 && coli < cols) {
    +	 col = col.parentNode.childNodes[coli];
    +	 var elToSelect = col.childNodes[rowi];
    +	 var inputs = $(elToSelect).find(":input");
    +	 if (inputs.size() > 0) {
    +	   setTimeout(function() { inputs.focus(); }, 0);
    +	   return;
    +	 }
    +       }
    +     }
    +   };
    +
    +   this.autoJavaScript = function() {
    +     if (el.parentNode == null) {
    +       el = contentsContainer = headerContainer = null;
    +       this.autoJavaScript = function() { };
    +       return;
    +     }
    +
    +     if (WT.isHidden(el))
    +       return;
    +
    +     var tw = el.offsetWidth - WT.px(el, 'borderLeftWidth')
    +	      - WT.px(el, 'borderRightWidth');
    +
    +     var scrollwidth = contentsContainer.offsetWidth
    +       - contentsContainer.clientWidth;
    +     tw -= scrollwidth;
    +
    +     if (tw > 200  // XXX: IE's incremental rendering foobars completely
    +         && (tw != contentsContainer.tw)) {
    +       contentsContainer.tw = tw;
    +       contentsContainer.style.width = (tw + scrollwidth) + 'px';
    +       headerContainer.style.width = tw + 'px';
    +     }
    +   };
    + });
    diff --git a/wt-3.1.7a/src/js/WTableView.min.js b/wt-3.1.7a/src/js/WTableView.min.js
    new file mode 100644
    index 0000000..e6c5595
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WTableView.min.js
    @@ -0,0 +1,7 @@
    +WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,i,g,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=f.target(a);a;){var h=$(a);if(h.hasClass("Wt-tv-contents"))break;else if(h.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(h.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==a)return b;
    +return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,h=g.firstChild;c=$(h).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=f.pxself(a,"width")-1+b;k.style.width=h.style.width=f.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=f.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(i,"columnResized",d,parseInt(l))}jQuery.data(i,"obj",this);var f=n.WT,s=0,t=0,u=0,v=0;g.onscroll=function(){p.scrollLeft=
    +g.scrollLeft;if(g.scrollTop<u||g.scrollTop>v||g.scrollLeft<s||g.scrollLeft>t)n.emit(i,"scrolled",g.scrollLeft,g.scrollTop,g.clientWidth,g.clientHeight)};this.mouseDown=function(a,b){f.capture(null);a=q(b);i.getAttribute("drag")==="true"&&a.selected&&n._p_.dragStart(i,b)};this.resizeHandleMDown=function(a,b){var c=a.parentNode.parentNode,d=-(f.pxself(c,"width")-1);new f.SizeHandle(f,"h",a.offsetWidth,i.offsetHeight,d,1E4,"Wt-hsh",function(k){w(c,k)},a,i,b,-2,-1)};this.scrolled=function(a,b,c,d){s=
    +a;t=b;u=c;v=d};var m=null;i.handleDragDrop=function(a,b,c,d,k){if(m){m.className=m.classNameOrig;m=null}if(a!="end"){var h=q(c);if(!h.selected&&h.drop)if(a=="drop")n.emit(i,{name:"dropEvent",eventObject:b,event:c},h.rowIdx,h.columnId,d,k);else{b.className="Wt-valid-drop";m=h.el;m.classNameOrig=m.className;m.className+=" Wt-drop-site"}else b.className=""}};i.onkeydown=function(a){var b=a||window.event;if(b.keyCode==9){f.cancelEvent(b);var c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);var d=r(a),k=a.parentNode.childNodes.length,
    +h=a.childNodes.length;b=b.shiftKey;for(var j=false,e=c,l;;){for(;b?e>=0:e<h;e=b?e-1:e+1)for(l=e==c&&!j?b?d-1:d+1:b?k-1:0;b?l>=0:l<k;l=b?l-1:l+1){if(e==c&&l==d)return;a=a.parentNode.childNodes[l];var o=$(a.childNodes[e]).find(":input");if(o.size()>0){setTimeout(function(){o.focus()},0);return}}e=b?h-1:0;j=true}}}else if(b.keyCode>=37&&b.keyCode<=40){j=f.target(b);if(j.nodeName!="select"){c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);d=r(a);k=a.parentNode.childNodes.length;h=a.childNodes.length;switch(b.keyCode){case 39:if(f.hasTag(j,
    +"INPUT")&&j.type=="text"){e=f.getSelectionRange(j);if(e.start!=j.value.length)return}d++;break;case 38:c--;break;case 37:if(f.hasTag(j,"INPUT")&&j.type=="text"){e=f.getSelectionRange(j);if(e.start!=0)return}d--;break;case 40:c++;break;default:return}f.cancelEvent(b);if(c>-1&&c<h&&d>-1&&d<k){a=a.parentNode.childNodes[d];o=$(a.childNodes[c]).find(":input");o.size()>0&&setTimeout(function(){o.focus()},0)}}}}};this.autoJavaScript=function(){if(i.parentNode==null){i=g=p=null;this.autoJavaScript=function(){}}else if(!f.isHidden(i)){var a=
    +i.offsetWidth-f.px(i,"borderLeftWidth")-f.px(i,"borderRightWidth"),b=g.offsetWidth-g.clientWidth;a-=b;if(a>200&&a!=g.tw){g.tw=a;g.style.width=a+b+"px";p.style.width=a+"px"}}}});
    diff --git a/wt-3.1.7a/src/js/WTreeView.js b/wt-3.1.7a/src/js/WTreeView.js
    new file mode 100644
    index 0000000..be8f7e1
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WTreeView.js
    @@ -0,0 +1,283 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +(1, "WTreeView",
    + function(APP, el, contentsContainer, headerContainer, column1Fixed) {
    +   jQuery.data(el, 'obj', this);
    +
    +   var contents = contentsContainer.firstChild;
    +   var headers = headerContainer.firstChild;
    +
    +   var self = this;
    +   var WT = APP.WT;
    +
    +   function getItem(event) {
    +     var columnId = -1, nodeId = null, selected = false,
    +         drop = false, ele = null;
    +
    +     var t = WT.target(event);
    +
    +     while (t) {
    +       if (t.className.indexOf('c1 rh') == 0) {
    +	 if (columnId == -1)
    +           columnId = 0;
    +       } else if (t.className.indexOf('Wt-tv-c') == 0) {
    +	 if (t.className.indexOf('Wt-tv-c') == 0)
    +           columnId = t.className.split(' ')[0].substring(7) * 1;
    +	 else if (columnId == -1)
    +	 columnId = 0;
    +	 if (t.getAttribute('drop') === 'true')
    +	   drop = true;
    +	 ele = t;
    +       } else if (t.className == 'Wt-tv-node') {
    +	 nodeId = t.id;
    +	 break;
    +       }
    +       if (t.className === 'Wt-selected')
    +	 selected = true;
    +       t = t.parentNode;
    +       if (WT.hasTag(t, 'BODY'))
    +	 break;
    +     }
    +
    +     return { columnId: columnId, nodeId: nodeId, selected: selected,
    +	      drop: drop, el: ele };
    +   };
    +
    +   this.click = function(obj, event) {
    +     var item = getItem(event);
    +     if (item.columnId != -1) {
    +       APP.emit(el, { name: 'itemEvent', eventObject: obj, event: event },
    +		item.nodeId, item.columnId, 'clicked', '', '');
    +     }
    +   };
    +
    +   this.dblClick = function(obj, event) {
    +     var item = getItem(event);
    +     if (item.columnId != -1) {
    +       APP.emit(el, { name: 'itemEvent', eventObject: obj, event: event },
    +		item.nodeId, item.columnId, 'dblclicked', '', '');
    +     }
    +   };
    +
    +   this.mouseDown = function(obj, event) {
    +     WT.capture(null);
    +     var item = getItem(event);
    +     if (item.columnId != -1) {
    +       APP.emit(el, { name: 'itemEvent', eventObject: obj, event: event },
    +		item.nodeId, item.columnId, 'mousedown', '', '');
    +       if (el.getAttribute('drag') === 'true' && item.selected)
    +         APP._p_.dragStart(el, event);
    +     }
    +   };
    +
    +   this.mouseUp = function(obj, event) {
    +     var item = getItem(event);
    +     if (item.columnId != -1) {
    +       APP.emit(el, { name: 'itemEvent', eventObject: obj, event: event },
    +		item.nodeId, item.columnId, 'mouseup', '', '');
    +     }
    +   };
    +
    +   this.resizeHandleMDown = function(obj, event) {
    +     var parent = obj.parentNode.parentNode,
    +         c = parent.className.split(' ')[0];
    +
    +     if (c) {
    +       var r = WT.getCssRule('#' + el.id + ' .' + c),
    +           cw = WT.pxself(r, 'width'),
    +           minDelta = -cw,
    +           maxDelta = 10000;
    +
    +       new WT.SizeHandle(WT, 'h', obj.offsetWidth, el.offsetHeight,
    +	                 minDelta, maxDelta, 'Wt-hsh',
    +			 function (delta) {
    +			   var newWidth = cw + delta,
    +			       columnId = c.substring(7) * 1;
    +			   r.style.width = newWidth + 'px';
    +			   self.adjustColumns();
    +			     APP.emit(el, 'columnResized', columnId,
    +				      parseInt(newWidth));
    +			 }, obj, el, event, -2, -1);
    +     }
    +   };
    +
    +   /*
    +    * this adjusts invariants that take into account column resizes
    +    *
    +    * c0w is set as soon as possible.
    +    *
    +    *  if (!column1 fixed):
    +    *    1) width('Wt-headerdiv') = sum(column widths)
    +    *    2) width('float: right') = sum(column(-1) widths)
    +    *    3) width(table parent) = width('Wt-headerdiv')
    +    *  else
    +    *    4) width('Wt-rowc') = sum(column(-1) widths)
    +    */
    +   this.adjustColumns = function() {
    +     var t = contents.firstChild, // table parent
    +         hc = headers.firstChild, // Wt-tv-row
    +         allw_1=0, allw=0,
    +         c0id = headers.lastChild.className.split(' ')[0],
    +         c0r = WT.getCssRule('#' + el.id + ' .' + c0id);
    +
    +     if (column1Fixed)
    +       hc = hc.firstChild; // Wt-tv-rowc
    +
    +     if (WT.isHidden(el))
    +       return;
    +
    +     for (var i=0, length=hc.childNodes.length; i < length; ++i) {
    +       if (hc.childNodes[i].className) { // IE may have only a text node
    +	 var cl = hc.childNodes[i].className.split(' ')[0],
    +	     r = WT.getCssRule('#' + el.id + ' .' + cl);
    +
    +	 if (r.style.display == 'none')
    +	   continue;
    +
    +	 // 7 = 2 * 3px (padding) + 1px border
    +	 allw_1 += WT.pxself(r, 'width') + 7;
    +       }
    +     }
    +
    +     if (!column1Fixed)
    +       if (!c0r.style.width)  // first resize and c0 width not set
    +	 c0r.style.width = (headers.offsetWidth - hc.offsetWidth - 8) + 'px';
    +       else
    +	 $(el).find('.Wt-headerdiv .' + c0id).css('width', c0r.style.width);
    +
    +     allw = allw_1 + WT.pxself(c0r, 'width') + (WT.isIE6 ? 10 : 8);
    +
    +     if (!column1Fixed) {
    +       headers.style.width = t.style.width = allw + 'px';
    +       hc.style.width = allw_1 + 'px';
    +     } else {
    +       var r = WT.getCssRule('#' + el.id + ' .Wt-tv-rowc');
    +       r.style.width = allw_1 + 'px';
    +       $(el).find('.Wt-tv-rowc').css('width', allw_1 + 'px').css('width', '');
    +       el.changed = true;
    +       this.autoJavaScript();
    +     }
    +   };
    +
    +   var dropEl = null;
    +
    +   el.handleDragDrop=function(action, object, event, sourceId, mimeType) {
    +     if (dropEl) {
    +       dropEl.className = dropEl.classNameOrig;
    +       dropEl = null;
    +     }
    +
    +     if (action=='end')
    +       return;
    +
    +     var item = getItem(event);
    +
    +     if (!item.selected && item.drop && item.columnId != -1) {
    +       if (action=='drop') {
    +	 APP.emit(el, { name: 'itemEvent', eventObject: object, event: event },
    +		  item.nodeId, item.columnId, 'drop', sourceId, mimeType);
    +       } else {
    +         object.className = 'Wt-valid-drop';
    +         dropEl = item.el;
    +         dropEl.classNameOrig = dropEl.className;
    +         dropEl.className = dropEl.className + ' Wt-drop-site';
    +       }
    +     } else {
    +       object.className = '';
    +     }
    +   };
    +
    +  /*
    +   * This adjusts invariants that depend on the size of the whole
    +   * treeview:
    +   *
    +   *  - changes to the total width (tw inc. affected by scrollbar)
    +   *  - when column1 is fixed:
    +   *    * .row width
    +   *    * table parent width
    +   */
    +  this.autoJavaScript = function() {
    +    if (el.parentNode == null) {
    +      el = contentsContainer = headerContainer = contents = headers = null;
    +      this.autoJavaScript = function() { };
    +      return;
    +    }
    +
    +    if (WT.isHidden(el))
    +      return;
    +
    +    var $el=$(el),
    +      tw = $el.innerWidth(),
    +        c0id, c0r, c0w = null;
    +
    +    var scrollwidth = contentsContainer.offsetWidth
    +      - contentsContainer.clientWidth;
    +
    +    tw -= scrollwidth;
    +
    +    if ($el.hasClass('column1')) {
    +      c0id = $el.find('.Wt-headerdiv').get(0).lastChild.className.split(' ')[0];
    +      c0r = WT.getCssRule('#' + el.id + ' .' + c0id);
    +      c0w = WT.pxself(c0r, 'width');
    +    }
    +
    +    // XXX: IE's incremental rendering foobars completely
    +    if ((!WT.isIE || tw > 100)
    +        && (tw != contentsContainer.tw ||
    +            c0w != contentsContainer.c0w ||
    +            el.changed)) {
    +      var adjustColumns = !el.changed;
    +
    +      contentsContainer.tw = tw;
    +      contentsContainer.c0w = c0w;
    +
    +      c0id = $el.find('.Wt-headerdiv').get(0).lastChild.className.split(' ')[0];
    +      c0r = WT.getCssRule('#' + el.id + ' .' + c0id);
    +
    +      var table = contents.firstChild,
    +          r = WT.getCssRule('#' + el.id + ' .cwidth'),
    +          contentstoo = (r.style.width == headers.style.width),
    +          hc = headers.firstChild;
    +
    +      r.style.width = tw + 'px';
    +      contentsContainer.style.width = (tw + scrollwidth) + 'px';
    +      headers.style.width = table.offsetWidth + 'px';
    +
    +      if (c0w != null) {
    +        var w = tw - c0w - (WT.isIE6 ? 10 : 8);
    +
    +        if (w > 0) {
    +          var w2 = Math.min(w,
    +	      WT.pxself(WT.getCssRule('#' + el.id + ' .Wt-tv-rowc'),'width'));
    +          tw -= (w - w2);
    +
    +          WT.getCssRule('#' + el.id + ' .Wt-tv-row').style.width = w2 + 'px';
    +          $el.find(' .Wt-tv-row').css('width', w2 + 'px').css('width', '');
    +          headers.style.width=tw + 'px';
    +          table.style.width=tw + 'px';
    +        }
    +      } else if (contentstoo) {
    +        headers.style.width=r.style.width;
    +        table.style.width=r.style.width;
    +      }
    +
    +      if (!column1Fixed)
    +	c0r.style.width = (table.offsetWidth - hc.offsetWidth - 8) + 'px';
    +
    +      el.changed = false;
    +
    +      if (adjustColumns/* && WT.isIE */)
    +	self.adjustColumns();
    +    }
    +  };
    +
    +  self.adjustColumns();
    +
    + });
    diff --git a/wt-3.1.7a/src/js/WTreeView.min.js b/wt-3.1.7a/src/js/WTreeView.min.js
    new file mode 100644
    index 0000000..c7eabfc
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WTreeView.min.js
    @@ -0,0 +1,8 @@
    +WT_DECLARE_WT_MEMBER(1,"WTreeView",function(l,d,k,s,p){function o(c){var a=-1,b=null,f=false,h=false,g=null;for(c=e.target(c);c;){if(c.className.indexOf("c1 rh")==0){if(a==-1)a=0}else if(c.className.indexOf("Wt-tv-c")==0){if(c.className.indexOf("Wt-tv-c")==0)a=c.className.split(" ")[0].substring(7)*1;else if(a==-1)a=0;if(c.getAttribute("drop")==="true")h=true;g=c}else if(c.className=="Wt-tv-node"){b=c.id;break}if(c.className==="Wt-selected")f=true;c=c.parentNode;if(e.hasTag(c,"BODY"))break}return{columnId:a,
    +nodeId:b,selected:f,drop:h,el:g}}jQuery.data(d,"obj",this);var q=k.firstChild,j=s.firstChild,r=this,e=l.WT;this.click=function(c,a){var b=o(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=o(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){e.capture(null);var b=o(a);if(b.columnId!=-1){l.emit(d,{name:"itemEvent",eventObject:c,
    +event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=o(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){var b=c.parentNode.parentNode.className.split(" ")[0];if(b){var f=e.getCssRule("#"+d.id+" ."+b),h=e.pxself(f,"width");new e.SizeHandle(e,"h",c.offsetWidth,d.offsetHeight,-h,1E4,"Wt-hsh",function(g){g=h+g;var m=
    +b.substring(7)*1;f.style.width=g+"px";r.adjustColumns();l.emit(d,"columnResized",m,parseInt(g))},c,d,a,-2,-1)}};this.adjustColumns=function(){var c=q.firstChild,a=j.firstChild,b=0,f=0;f=j.lastChild.className.split(" ")[0];var h=e.getCssRule("#"+d.id+" ."+f);if(p)a=a.firstChild;if(!e.isHidden(d)){for(var g=0,m=a.childNodes.length;g<m;++g)if(a.childNodes[g].className){var i=a.childNodes[g].className.split(" ")[0];i=e.getCssRule("#"+d.id+" ."+i);if(i.style.display!="none")b+=e.pxself(i,"width")+7}if(!p)if(h.style.width)$(d).find(".Wt-headerdiv ."+
    +f).css("width",h.style.width);else h.style.width=j.offsetWidth-a.offsetWidth-8+"px";f=b+e.pxself(h,"width")+(e.isIE6?10:8);if(p){i=e.getCssRule("#"+d.id+" .Wt-tv-rowc");i.style.width=b+"px";$(d).find(".Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{j.style.width=c.style.width=f+"px";a.style.width=b+"px"}}};var n=null;d.handleDragDrop=function(c,a,b,f,h){if(n){n.className=n.classNameOrig;n=null}if(c!="end"){var g=o(b);if(!g.selected&&g.drop&&g.columnId!=
    +-1)if(c=="drop")l.emit(d,{name:"itemEvent",eventObject:a,event:b},g.nodeId,g.columnId,"drop",f,h);else{a.className="Wt-valid-drop";n=g.el;n.classNameOrig=n.className;n.className+=" Wt-drop-site"}else a.className=""}};this.autoJavaScript=function(){if(d.parentNode==null){d=k=s=q=j=null;this.autoJavaScript=function(){}}else if(!e.isHidden(d)){var c=$(d),a=c.innerWidth(),b,f=null,h=k.offsetWidth-k.clientWidth;a-=h;if(c.hasClass("column1")){b=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];
    +b=e.getCssRule("#"+d.id+" ."+b);f=e.pxself(b,"width")}if((!e.isIE||a>100)&&(a!=k.tw||f!=k.c0w||d.changed)){var g=!d.changed;k.tw=a;k.c0w=f;b=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];b=e.getCssRule("#"+d.id+" ."+b);var m=q.firstChild,i=e.getCssRule("#"+d.id+" .cwidth"),t=i.style.width==j.style.width,u=j.firstChild;i.style.width=a+"px";k.style.width=a+h+"px";j.style.width=m.offsetWidth+"px";if(f!=null){f=a-f-(e.isIE6?10:8);if(f>0){h=Math.min(f,e.pxself(e.getCssRule("#"+d.id+
    +" .Wt-tv-rowc"),"width"));a-=f-h;e.getCssRule("#"+d.id+" .Wt-tv-row").style.width=h+"px";c.find(" .Wt-tv-row").css("width",h+"px").css("width","");j.style.width=a+"px";m.style.width=a+"px"}}else if(t){j.style.width=i.style.width;m.style.width=i.style.width}if(!p)b.style.width=m.offsetWidth-u.offsetWidth-8+"px";d.changed=false;g&&r.adjustColumns()}}};r.adjustColumns()});
    diff --git a/wt-3.1.7a/src/js/WtGlMatrix.js b/wt-3.1.7a/src/js/WtGlMatrix.js
    new file mode 100755
    index 0000000..1194a8a
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WtGlMatrix.js
    @@ -0,0 +1,1725 @@
    +/* 
    + * glMatrix.js - High performance matrix and vector operations for WebGL
    + * version 0.9.5
    + *
    + * This is a MODIFIED copy of glMatrix.js for the purpose of integration
    + * with the Wt C++ toolkit. This is therefore not the original software.
    + *
    + * Copyright (c) 2010 Brandon Jones
    + *
    + * This software is provided 'as-is', without any express or implied
    + * warranty. In no event will the authors be held liable for any damages
    + * arising from the use of this software.
    + *
    + * Permission is granted to anyone to use this software for any purpose,
    + * including commercial applications, and to alter it and redistribute it
    + * freely, subject to the following restrictions:
    + *
    + *    1. The origin of this software must not be misrepresented; you must not
    + *    claim that you wrote the original software. If you use this software
    + *    in a product, an acknowledgment in the product documentation would be
    + *    appreciated but is not required.
    + *
    + *    2. Altered source versions must be plainly marked as such, and must not
    + *    be misrepresented as being the original software.
    + *
    + *    3. This notice may not be removed or altered from any source
    + *    distribution.
    + */
    +
    +WT_DECLARE_WT_MEMBER
    +(2, "glMatrix",
    +  function() {
    +/*
    + * vec3 - 3 Dimensional Vector
    + */
    +var vec3 = {};
    +
    +/*
    + * vec3.create
    + * Creates a new instance of a vec3 using the default array type
    + * Any javascript array containing at least 3 numeric elements can serve as a vec3
    + *
    + * Params:
    + * vec - Optional, vec3 containing values to initialize with
    + *
    + * Returns:
    + * New vec3
    + */
    +vec3.create = function(vec) {
    +	var dest = new Float32Array(3);
    +	
    +	if(vec) {
    +		dest[0] = vec[0];
    +		dest[1] = vec[1];
    +		dest[2] = vec[2];
    +	}
    +	
    +	return dest;
    +};
    +
    +/*
    + * vec3.set
    + * Copies the values of one vec3 to another
    + *
    + * Params:
    + * vec - vec3 containing values to copy
    + * dest - vec3 receiving copied values
    + *
    + * Returns:
    + * dest
    + */
    +vec3.set = function(vec, dest) {
    +	dest[0] = vec[0];
    +	dest[1] = vec[1];
    +	dest[2] = vec[2];
    +	
    +	return dest;
    +};
    +
    +/*
    + * vec3.add
    + * Performs a vector addition
    + *
    + * Params:
    + * vec - vec3, first operand
    + * vec2 - vec3, second operand
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.add = function(vec, vec2, dest) {
    +	if(!dest || vec == dest) {
    +		vec[0] += vec2[0];
    +		vec[1] += vec2[1];
    +		vec[2] += vec2[2];
    +		return vec;
    +	}
    +	
    +	dest[0] = vec[0] + vec2[0];
    +	dest[1] = vec[1] + vec2[1];
    +	dest[2] = vec[2] + vec2[2];
    +	return dest;
    +};
    +
    +/*
    + * vec3.subtract
    + * Performs a vector subtraction
    + *
    + * Params:
    + * vec - vec3, first operand
    + * vec2 - vec3, second operand
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.subtract = function(vec, vec2, dest) {
    +	if(!dest || vec == dest) {
    +		vec[0] -= vec2[0];
    +		vec[1] -= vec2[1];
    +		vec[2] -= vec2[2];
    +		return vec;
    +	}
    +	
    +	dest[0] = vec[0] - vec2[0];
    +	dest[1] = vec[1] - vec2[1];
    +	dest[2] = vec[2] - vec2[2];
    +	return dest;
    +};
    +
    +/*
    + * vec3.negate
    + * Negates the components of a vec3
    + *
    + * Params:
    + * vec - vec3 to negate
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.negate = function(vec, dest) {
    +	if(!dest) { dest = vec; }
    +	
    +	dest[0] = -vec[0];
    +	dest[1] = -vec[1];
    +	dest[2] = -vec[2];
    +	return dest;
    +};
    +
    +/*
    + * vec3.scale
    + * Multiplies the components of a vec3 by a scalar value
    + *
    + * Params:
    + * vec - vec3 to scale
    + * val - Numeric value to scale by
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.scale = function(vec, val, dest) {
    +	if(!dest || vec == dest) {
    +		vec[0] *= val;
    +		vec[1] *= val;
    +		vec[2] *= val;
    +		return vec;
    +	}
    +	
    +	dest[0] = vec[0]*val;
    +	dest[1] = vec[1]*val;
    +	dest[2] = vec[2]*val;
    +	return dest;
    +};
    +
    +/*
    + * vec3.normalize
    + * Generates a unit vector of the same direction as the provided vec3
    + * If vector length is 0, returns [0, 0, 0]
    + *
    + * Params:
    + * vec - vec3 to normalize
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.normalize = function(vec, dest) {
    +	if(!dest) { dest = vec; }
    +	
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	var len = Math.sqrt(x*x + y*y + z*z);
    +	
    +	if (!len) {
    +		dest[0] = 0;
    +		dest[1] = 0;
    +		dest[2] = 0;
    +		return dest;
    +	} else if (len == 1) {
    +		dest[0] = x;
    +		dest[1] = y;
    +		dest[2] = z;
    +		return dest;
    +	}
    +	
    +	len = 1 / len;
    +	dest[0] = x*len;
    +	dest[1] = y*len;
    +	dest[2] = z*len;
    +	return dest;
    +};
    +
    +/*
    + * vec3.cross
    + * Generates the cross product of two vec3s
    + *
    + * Params:
    + * vec - vec3, first operand
    + * vec2 - vec3, second operand
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.cross = function(vec, vec2, dest){
    +	if(!dest) { dest = vec; }
    +	
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	var x2 = vec2[0], y2 = vec2[1], z2 = vec2[2];
    +	
    +	dest[0] = y*z2 - z*y2;
    +	dest[1] = z*x2 - x*z2;
    +	dest[2] = x*y2 - y*x2;
    +	return dest;
    +};
    +
    +/*
    + * vec3.length
    + * Caclulates the length of a vec3
    + *
    + * Params:
    + * vec - vec3 to calculate length of
    + *
    + * Returns:
    + * Length of vec
    + */
    +vec3.length = function(vec){
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	return Math.sqrt(x*x + y*y + z*z);
    +};
    +
    +/*
    + * vec3.dot
    + * Caclulates the dot product of two vec3s
    + *
    + * Params:
    + * vec - vec3, first operand
    + * vec2 - vec3, second operand
    + *
    + * Returns:
    + * Dot product of vec and vec2
    + */
    +vec3.dot = function(vec, vec2){
    +	return vec[0]*vec2[0] + vec[1]*vec2[1] + vec[2]*vec2[2];
    +};
    +
    +/*
    + * vec3.direction
    + * Generates a unit vector pointing from one vector to another
    + *
    + * Params:
    + * vec - origin vec3
    + * vec2 - vec3 to point to
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +vec3.direction = function(vec, vec2, dest) {
    +	if(!dest) { dest = vec; }
    +	
    +	var x = vec[0] - vec2[0];
    +	var y = vec[1] - vec2[1];
    +	var z = vec[2] - vec2[2];
    +	
    +	var len = Math.sqrt(x*x + y*y + z*z);
    +	if (!len) { 
    +		dest[0] = 0; 
    +		dest[1] = 0; 
    +		dest[2] = 0;
    +		return dest; 
    +	}
    +	
    +	len = 1 / len;
    +	dest[0] = x * len; 
    +	dest[1] = y * len; 
    +	dest[2] = z * len;
    +	return dest; 
    +};
    +
    +/*
    + * vec3.str
    + * Returns a string representation of a vector
    + *
    + * Params:
    + * vec - vec3 to represent as a string
    + *
    + * Returns:
    + * string representation of vec
    + */
    +vec3.str = function(vec) {
    +	return '[' + vec[0] + ', ' + vec[1] + ', ' + vec[2] + ']'; 
    +};
    +
    +/*
    + * mat3 - 3x3 Matrix
    + */
    +var mat3 = {};
    +
    +/*
    + * mat3.create
    + * Creates a new instance of a mat3 using the default array type
    + * Any javascript array containing at least 9 numeric elements can serve as a mat3
    + *
    + * Params:
    + * mat - Optional, mat3 containing values to initialize with
    + *
    + * Returns:
    + * New mat3
    + */
    +mat3.create = function(mat) {
    +	var dest = new Float32Array(9);
    +	
    +	if(mat) {
    +		dest[0] = mat[0];
    +		dest[1] = mat[1];
    +		dest[2] = mat[2];
    +		dest[3] = mat[3];
    +		dest[4] = mat[4];
    +		dest[5] = mat[5];
    +		dest[6] = mat[6];
    +		dest[7] = mat[7];
    +		dest[8] = mat[8];
    +		dest[9] = mat[9];
    +	}
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat3.set
    + * Copies the values of one mat3 to another
    + *
    + * Params:
    + * mat - mat3 containing values to copy
    + * dest - mat3 receiving copied values
    + *
    + * Returns:
    + * dest
    + */
    +mat3.set = function(mat, dest) {
    +	dest[0] = mat[0];
    +	dest[1] = mat[1];
    +	dest[2] = mat[2];
    +	dest[3] = mat[3];
    +	dest[4] = mat[4];
    +	dest[5] = mat[5];
    +	dest[6] = mat[6];
    +	dest[7] = mat[7];
    +	dest[8] = mat[8];
    +	return dest;
    +};
    +
    +/*
    + * mat3.identity
    + * Sets a mat3 to an identity matrix
    + *
    + * Params:
    + * dest - mat3 to set
    + *
    + * Returns:
    + * dest
    + */
    +mat3.identity = function(dest) {
    +	dest[0] = 1;
    +	dest[1] = 0;
    +	dest[2] = 0;
    +	dest[3] = 0;
    +	dest[4] = 1;
    +	dest[5] = 0;
    +	dest[6] = 0;
    +	dest[7] = 0;
    +	dest[8] = 1;
    +	return dest;
    +};
    +
    +/*
    + * mat3.toMat4
    + * Copies the elements of a mat3 into the upper 3x3 elements of a mat4
    + *
    + * Params:
    + * mat - mat3 containing values to copy
    + * dest - Optional, mat4 receiving copied values
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +mat3.toMat4 = function(mat, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	
    +	dest[0] = mat[0];
    +	dest[1] = mat[1];
    +	dest[2] = mat[2];
    +	dest[3] = 0;
    +
    +	dest[4] = mat[3];
    +	dest[5] = mat[4];
    +	dest[6] = mat[5];
    +	dest[7] = 0;
    +
    +	dest[8] = mat[6];
    +	dest[9] = mat[7];
    +	dest[10] = mat[8];
    +	dest[11] = 0;
    +
    +	dest[12] = 0;
    +	dest[13] = 0;
    +	dest[14] = 0;
    +	dest[15] = 1;
    +	
    +	return dest;
    +}
    +
    +/*
    + * mat3.str
    + * Returns a string representation of a mat3
    + *
    + * Params:
    + * mat - mat3 to represent as a string
    + *
    + * Returns:
    + * string representation of mat
    + */
    +mat3.str = function(mat) {
    +	return '[' + mat[0] + ', ' + mat[1] + ', ' + mat[2] + 
    +		', ' + mat[3] + ', '+ mat[4] + ', ' + mat[5] + 
    +		', ' + mat[6] + ', ' + mat[7] + ', '+ mat[8] + ']';
    +};
    +
    +/*
    + * mat4 - 4x4 Matrix
    + */
    +var mat4 = {};
    +
    +/*
    + * mat4.create
    + * Creates a new instance of a mat4 using the default array type
    + * Any javascript array containing at least 16 numeric elements can serve as a mat4
    + *
    + * Params:
    + * mat - Optional, mat4 containing values to initialize with
    + *
    + * Returns:
    + * New mat4
    + */
    +mat4.create = function(mat) {
    +	var dest = new Float32Array(16);
    +	
    +	if(mat) {
    +		dest[0] = mat[0];
    +		dest[1] = mat[1];
    +		dest[2] = mat[2];
    +		dest[3] = mat[3];
    +		dest[4] = mat[4];
    +		dest[5] = mat[5];
    +		dest[6] = mat[6];
    +		dest[7] = mat[7];
    +		dest[8] = mat[8];
    +		dest[9] = mat[9];
    +		dest[10] = mat[10];
    +		dest[11] = mat[11];
    +		dest[12] = mat[12];
    +		dest[13] = mat[13];
    +		dest[14] = mat[14];
    +		dest[15] = mat[15];
    +	}
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.set
    + * Copies the values of one mat4 to another
    + *
    + * Params:
    + * mat - mat4 containing values to copy
    + * dest - mat4 receiving copied values
    + *
    + * Returns:
    + * dest
    + */
    +mat4.set = function(mat, dest) {
    +	dest[0] = mat[0];
    +	dest[1] = mat[1];
    +	dest[2] = mat[2];
    +	dest[3] = mat[3];
    +	dest[4] = mat[4];
    +	dest[5] = mat[5];
    +	dest[6] = mat[6];
    +	dest[7] = mat[7];
    +	dest[8] = mat[8];
    +	dest[9] = mat[9];
    +	dest[10] = mat[10];
    +	dest[11] = mat[11];
    +	dest[12] = mat[12];
    +	dest[13] = mat[13];
    +	dest[14] = mat[14];
    +	dest[15] = mat[15];
    +	return dest;
    +};
    +
    +/*
    + * mat4.identity
    + * Sets a mat4 to an identity matrix
    + *
    + * Params:
    + * dest - mat4 to set
    + *
    + * Returns:
    + * dest
    + */
    +mat4.identity = function(dest) {
    +	dest[0] = 1;
    +	dest[1] = 0;
    +	dest[2] = 0;
    +	dest[3] = 0;
    +	dest[4] = 0;
    +	dest[5] = 1;
    +	dest[6] = 0;
    +	dest[7] = 0;
    +	dest[8] = 0;
    +	dest[9] = 0;
    +	dest[10] = 1;
    +	dest[11] = 0;
    +	dest[12] = 0;
    +	dest[13] = 0;
    +	dest[14] = 0;
    +	dest[15] = 1;
    +	return dest;
    +};
    +
    +/*
    + * mat4.transpose
    + * Transposes a mat4 (flips the values over the diagonal)
    + *
    + * Params:
    + * mat - mat4 to transpose
    + * dest - Optional, mat4 receiving transposed values. If not specified result is written to mat
    + *
    + * Returns:
    + * dest is specified, mat otherwise
    + */
    +mat4.transpose = function(mat, dest) {
    +	// If we are transposing ourselves we can skip a few steps but have to cache some values
    +	if(!dest || mat == dest) { 
    +		var a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +		var a12 = mat[6], a13 = mat[7];
    +		var a23 = mat[11];
    +		
    +		mat[1] = mat[4];
    +		mat[2] = mat[8];
    +		mat[3] = mat[12];
    +		mat[4] = a01;
    +		mat[6] = mat[9];
    +		mat[7] = mat[13];
    +		mat[8] = a02;
    +		mat[9] = a12;
    +		mat[11] = mat[14];
    +		mat[12] = a03;
    +		mat[13] = a13;
    +		mat[14] = a23;
    +		return mat;
    +	}
    +	
    +	dest[0] = mat[0];
    +	dest[1] = mat[4];
    +	dest[2] = mat[8];
    +	dest[3] = mat[12];
    +	dest[4] = mat[1];
    +	dest[5] = mat[5];
    +	dest[6] = mat[9];
    +	dest[7] = mat[13];
    +	dest[8] = mat[2];
    +	dest[9] = mat[6];
    +	dest[10] = mat[10];
    +	dest[11] = mat[14];
    +	dest[12] = mat[3];
    +	dest[13] = mat[7];
    +	dest[14] = mat[11];
    +	dest[15] = mat[15];
    +	return dest;
    +};
    +
    +/*
    + * mat4.determinant
    + * Calculates the determinant of a mat4
    + *
    + * Params:
    + * mat - mat4 to calculate determinant of
    + *
    + * Returns:
    + * determinant of mat
    + */
    +mat4.determinant = function(mat) {
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	var a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15];
    +
    +	return	a30*a21*a12*a03 - a20*a31*a12*a03 - a30*a11*a22*a03 + a10*a31*a22*a03 +
    +			a20*a11*a32*a03 - a10*a21*a32*a03 - a30*a21*a02*a13 + a20*a31*a02*a13 +
    +			a30*a01*a22*a13 - a00*a31*a22*a13 - a20*a01*a32*a13 + a00*a21*a32*a13 +
    +			a30*a11*a02*a23 - a10*a31*a02*a23 - a30*a01*a12*a23 + a00*a31*a12*a23 +
    +			a10*a01*a32*a23 - a00*a11*a32*a23 - a20*a11*a02*a33 + a10*a21*a02*a33 +
    +			a20*a01*a12*a33 - a00*a21*a12*a33 - a10*a01*a22*a33 + a00*a11*a22*a33;
    +};
    +
    +/*
    + * mat4.inverse
    + * Calculates the inverse matrix of a mat4
    + *
    + * Params:
    + * mat - mat4 to calculate inverse of
    + * dest - Optional, mat4 receiving inverse matrix. If not specified result is written to mat
    + *
    + * Returns:
    + * dest is specified, mat otherwise
    + */
    +mat4.inverse = function(mat, dest) {
    +	if(!dest) { dest = mat; }
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	var a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15];
    +	
    +	var b00 = a00*a11 - a01*a10;
    +	var b01 = a00*a12 - a02*a10;
    +	var b02 = a00*a13 - a03*a10;
    +	var b03 = a01*a12 - a02*a11;
    +	var b04 = a01*a13 - a03*a11;
    +	var b05 = a02*a13 - a03*a12;
    +	var b06 = a20*a31 - a21*a30;
    +	var b07 = a20*a32 - a22*a30;
    +	var b08 = a20*a33 - a23*a30;
    +	var b09 = a21*a32 - a22*a31;
    +	var b10 = a21*a33 - a23*a31;
    +	var b11 = a22*a33 - a23*a32;
    +	
    +	// Calculate the determinant (inlined to avoid double-caching)
    +	var invDet = 1/(b00*b11 - b01*b10 + b02*b09 + b03*b08 - b04*b07 + b05*b06);
    +	
    +	dest[0] = (a11*b11 - a12*b10 + a13*b09)*invDet;
    +	dest[1] = (-a01*b11 + a02*b10 - a03*b09)*invDet;
    +	dest[2] = (a31*b05 - a32*b04 + a33*b03)*invDet;
    +	dest[3] = (-a21*b05 + a22*b04 - a23*b03)*invDet;
    +	dest[4] = (-a10*b11 + a12*b08 - a13*b07)*invDet;
    +	dest[5] = (a00*b11 - a02*b08 + a03*b07)*invDet;
    +	dest[6] = (-a30*b05 + a32*b02 - a33*b01)*invDet;
    +	dest[7] = (a20*b05 - a22*b02 + a23*b01)*invDet;
    +	dest[8] = (a10*b10 - a11*b08 + a13*b06)*invDet;
    +	dest[9] = (-a00*b10 + a01*b08 - a03*b06)*invDet;
    +	dest[10] = (a30*b04 - a31*b02 + a33*b00)*invDet;
    +	dest[11] = (-a20*b04 + a21*b02 - a23*b00)*invDet;
    +	dest[12] = (-a10*b09 + a11*b07 - a12*b06)*invDet;
    +	dest[13] = (a00*b09 - a01*b07 + a02*b06)*invDet;
    +	dest[14] = (-a30*b03 + a31*b01 - a32*b00)*invDet;
    +	dest[15] = (a20*b03 - a21*b01 + a22*b00)*invDet;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.toRotationMat
    + * Copies the upper 3x3 elements of a mat4 into another mat4
    + *
    + * Params:
    + * mat - mat4 containing values to copy
    + * dest - Optional, mat4 receiving copied values
    + *
    + * Returns:
    + * dest is specified, a new mat4 otherwise
    + */
    +mat4.toRotationMat = function(mat, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	
    +	dest[0] = mat[0];
    +	dest[1] = mat[1];
    +	dest[2] = mat[2];
    +	dest[3] = mat[3];
    +	dest[4] = mat[4];
    +	dest[5] = mat[5];
    +	dest[6] = mat[6];
    +	dest[7] = mat[7];
    +	dest[8] = mat[8];
    +	dest[9] = mat[9];
    +	dest[10] = mat[10];
    +	dest[11] = mat[11];
    +	dest[12] = 0;
    +	dest[13] = 0;
    +	dest[14] = 0;
    +	dest[15] = 1;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.toMat3
    + * Copies the upper 3x3 elements of a mat4 into a mat3
    + *
    + * Params:
    + * mat - mat4 containing values to copy
    + * dest - Optional, mat3 receiving copied values
    + *
    + * Returns:
    + * dest is specified, a new mat3 otherwise
    + */
    +mat4.toMat3 = function(mat, dest) {
    +	if(!dest) { dest = mat3.create(); }
    +	
    +	dest[0] = mat[0];
    +	dest[1] = mat[1];
    +	dest[2] = mat[2];
    +	dest[3] = mat[4];
    +	dest[4] = mat[5];
    +	dest[5] = mat[6];
    +	dest[6] = mat[8];
    +	dest[7] = mat[9];
    +	dest[8] = mat[10];
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.toInverseMat3
    + * Calculates the inverse of the upper 3x3 elements of a mat4 and copies the result into a mat3
    + * The resulting matrix is useful for calculating transformed normals
    + *
    + * Params:
    + * mat - mat4 containing values to invert and copy
    + * dest - Optional, mat3 receiving values
    + *
    + * Returns:
    + * dest is specified, a new mat3 otherwise
    + */
    +mat4.toInverseMat3 = function(mat, dest) {
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10];
    +	
    +	var b01 = a22*a11-a12*a21;
    +	var b11 = -a22*a10+a12*a20;
    +	var b21 = a21*a10-a11*a20;
    +		
    +	var d = a00*b01 + a01*b11 + a02*b21;
    +	if (!d) { return null; }
    +	var id = 1/d;
    +	
    +	if(!dest) { dest = mat3.create(); }
    +	
    +	dest[0] = b01*id;
    +	dest[1] = (-a22*a01 + a02*a21)*id;
    +	dest[2] = (a12*a01 - a02*a11)*id;
    +	dest[3] = b11*id;
    +	dest[4] = (a22*a00 - a02*a20)*id;
    +	dest[5] = (-a12*a00 + a02*a10)*id;
    +	dest[6] = b21*id;
    +	dest[7] = (-a21*a00 + a01*a20)*id;
    +	dest[8] = (a11*a00 - a01*a10)*id;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.multiply
    + * Performs a matrix multiplication
    + *
    + * Params:
    + * mat - mat4, first operand
    + * mat2 - mat4, second operand
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.multiply = function(mat, mat2, dest) {
    +	if(!dest) { dest = mat }
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	var a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15];
    +	
    +	var b00 = mat2[0], b01 = mat2[1], b02 = mat2[2], b03 = mat2[3];
    +	var b10 = mat2[4], b11 = mat2[5], b12 = mat2[6], b13 = mat2[7];
    +	var b20 = mat2[8], b21 = mat2[9], b22 = mat2[10], b23 = mat2[11];
    +	var b30 = mat2[12], b31 = mat2[13], b32 = mat2[14], b33 = mat2[15];
    +	
    +	dest[0] = b00*a00 + b01*a10 + b02*a20 + b03*a30;
    +	dest[1] = b00*a01 + b01*a11 + b02*a21 + b03*a31;
    +	dest[2] = b00*a02 + b01*a12 + b02*a22 + b03*a32;
    +	dest[3] = b00*a03 + b01*a13 + b02*a23 + b03*a33;
    +	dest[4] = b10*a00 + b11*a10 + b12*a20 + b13*a30;
    +	dest[5] = b10*a01 + b11*a11 + b12*a21 + b13*a31;
    +	dest[6] = b10*a02 + b11*a12 + b12*a22 + b13*a32;
    +	dest[7] = b10*a03 + b11*a13 + b12*a23 + b13*a33;
    +	dest[8] = b20*a00 + b21*a10 + b22*a20 + b23*a30;
    +	dest[9] = b20*a01 + b21*a11 + b22*a21 + b23*a31;
    +	dest[10] = b20*a02 + b21*a12 + b22*a22 + b23*a32;
    +	dest[11] = b20*a03 + b21*a13 + b22*a23 + b23*a33;
    +	dest[12] = b30*a00 + b31*a10 + b32*a20 + b33*a30;
    +	dest[13] = b30*a01 + b31*a11 + b32*a21 + b33*a31;
    +	dest[14] = b30*a02 + b31*a12 + b32*a22 + b33*a32;
    +	dest[15] = b30*a03 + b31*a13 + b32*a23 + b33*a33;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.multiplyVec3
    + * Transforms a vec3 with the given matrix
    + * 4th vector component is implicitly '1'
    + *
    + * Params:
    + * mat - mat4 to transform the vector with
    + * vec - vec3 to transform
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +mat4.multiplyVec3 = function(mat, vec, dest) {
    +	if(!dest) { dest = vec }
    +	
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	
    +	dest[0] = mat[0]*x + mat[4]*y + mat[8]*z + mat[12];
    +	dest[1] = mat[1]*x + mat[5]*y + mat[9]*z + mat[13];
    +	dest[2] = mat[2]*x + mat[6]*y + mat[10]*z + mat[14];
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.multiplyVec4
    + * Transforms a vec4 with the given matrix
    + *
    + * Params:
    + * mat - mat4 to transform the vector with
    + * vec - vec4 to transform
    + * dest - Optional, vec4 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +mat4.multiplyVec4 = function(mat, vec, dest) {
    +	if(!dest) { dest = vec }
    +	
    +	var x = vec[0], y = vec[1], z = vec[2], w = vec[3];
    +	
    +	dest[0] = mat[0]*x + mat[4]*y + mat[8]*z + mat[12]*w;
    +	dest[1] = mat[1]*x + mat[5]*y + mat[9]*z + mat[13]*w;
    +	dest[2] = mat[2]*x + mat[6]*y + mat[10]*z + mat[14]*w;
    +	dest[4] = mat[4]*x + mat[7]*y + mat[11]*z + mat[15]*w;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.translate
    + * Translates a matrix by the given vector
    + *
    + * Params:
    + * mat - mat4 to translate
    + * vec - vec3 specifying the translation
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.translate = function(mat, vec, dest) {
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	
    +	if(!dest || mat == dest) {
    +		mat[12] = mat[0]*x + mat[4]*y + mat[8]*z + mat[12];
    +		mat[13] = mat[1]*x + mat[5]*y + mat[9]*z + mat[13];
    +		mat[14] = mat[2]*x + mat[6]*y + mat[10]*z + mat[14];
    +		mat[15] = mat[3]*x + mat[7]*y + mat[11]*z + mat[15];
    +		return mat;
    +	}
    +	
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	
    +	dest[0] = a00;
    +	dest[1] = a01;
    +	dest[2] = a02;
    +	dest[3] = a03;
    +	dest[4] = a10;
    +	dest[5] = a11;
    +	dest[6] = a12;
    +	dest[7] = a13;
    +	dest[8] = a20;
    +	dest[9] = a21;
    +	dest[10] = a22;
    +	dest[11] = a23;
    +	
    +	dest[12] = a00*x + a10*y + a20*z + mat[12];
    +	dest[13] = a01*x + a11*y + a21*z + mat[13];
    +	dest[14] = a02*x + a12*y + a22*z + mat[14];
    +	dest[15] = a03*x + a13*y + a23*z + mat[15];
    +	return dest;
    +};
    +
    +/*
    + * mat4.scale
    + * Scales a matrix by the given vector
    + *
    + * Params:
    + * mat - mat4 to scale
    + * vec - vec3 specifying the scale for each axis
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.scale = function(mat, vec, dest) {
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	
    +	if(!dest || mat == dest) {
    +		mat[0] *= x;
    +		mat[1] *= x;
    +		mat[2] *= x;
    +		mat[3] *= x;
    +		mat[4] *= y;
    +		mat[5] *= y;
    +		mat[6] *= y;
    +		mat[7] *= y;
    +		mat[8] *= z;
    +		mat[9] *= z;
    +		mat[10] *= z;
    +		mat[11] *= z;
    +		return mat;
    +	}
    +	
    +	dest[0] = mat[0]*x;
    +	dest[1] = mat[1]*x;
    +	dest[2] = mat[2]*x;
    +	dest[3] = mat[3]*x;
    +	dest[4] = mat[4]*y;
    +	dest[5] = mat[5]*y;
    +	dest[6] = mat[6]*y;
    +	dest[7] = mat[7]*y;
    +	dest[8] = mat[8]*z;
    +	dest[9] = mat[9]*z;
    +	dest[10] = mat[10]*z;
    +	dest[11] = mat[11]*z;
    +	dest[12] = mat[12];
    +	dest[13] = mat[13];
    +	dest[14] = mat[14];
    +	dest[15] = mat[15];
    +	return dest;
    +};
    +
    +/*
    + * mat4.rotate
    + * Rotates a matrix by the given angle around the specified axis
    + * If rotating around a primary axis (X,Y,Z) one of the specialized rotation functions should be used instead for performance
    + *
    + * Params:
    + * mat - mat4 to rotate
    + * angle - angle (in radians) to rotate
    + * axis - vec3 representing the axis to rotate around 
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.rotate = function(mat, angle, axis, dest) {
    +	var x = axis[0], y = axis[1], z = axis[2];
    +	var len = Math.sqrt(x*x + y*y + z*z);
    +	if (!len) { return null; }
    +	if (len != 1) {
    +		len = 1 / len;
    +		x *= len; 
    +		y *= len; 
    +		z *= len;
    +	}
    +	
    +	var s = Math.sin(angle);
    +	var c = Math.cos(angle);
    +	var t = 1-c;
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	
    +	// Construct the elements of the rotation matrix
    +	var b00 = x*x*t + c, b01 = y*x*t + z*s, b02 = z*x*t - y*s;
    +	var b10 = x*y*t - z*s, b11 = y*y*t + c, b12 = z*y*t + x*s;
    +	var b20 = x*z*t + y*s, b21 = y*z*t - x*s, b22 = z*z*t + c;
    +	
    +	if(!dest) { 
    +		dest = mat 
    +	} else if(mat != dest) { // If the source and destination differ, copy the unchanged last row
    +		dest[12] = mat[12];
    +		dest[13] = mat[13];
    +		dest[14] = mat[14];
    +		dest[15] = mat[15];
    +	}
    +	
    +	// Perform rotation-specific matrix multiplication
    +	dest[0] = a00*b00 + a10*b01 + a20*b02;
    +	dest[1] = a01*b00 + a11*b01 + a21*b02;
    +	dest[2] = a02*b00 + a12*b01 + a22*b02;
    +	dest[3] = a03*b00 + a13*b01 + a23*b02;
    +	
    +	dest[4] = a00*b10 + a10*b11 + a20*b12;
    +	dest[5] = a01*b10 + a11*b11 + a21*b12;
    +	dest[6] = a02*b10 + a12*b11 + a22*b12;
    +	dest[7] = a03*b10 + a13*b11 + a23*b12;
    +	
    +	dest[8] = a00*b20 + a10*b21 + a20*b22;
    +	dest[9] = a01*b20 + a11*b21 + a21*b22;
    +	dest[10] = a02*b20 + a12*b21 + a22*b22;
    +	dest[11] = a03*b20 + a13*b21 + a23*b22;
    +	return dest;
    +};
    +
    +/*
    + * mat4.rotateX
    + * Rotates a matrix by the given angle around the X axis
    + *
    + * Params:
    + * mat - mat4 to rotate
    + * angle - angle (in radians) to rotate
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.rotateX = function(mat, angle, dest) {
    +	var s = Math.sin(angle);
    +	var c = Math.cos(angle);
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +
    +	if(!dest) { 
    +		dest = mat 
    +	} else if(mat != dest) { // If the source and destination differ, copy the unchanged rows
    +		dest[0] = mat[0];
    +		dest[1] = mat[1];
    +		dest[2] = mat[2];
    +		dest[3] = mat[3];
    +		
    +		dest[12] = mat[12];
    +		dest[13] = mat[13];
    +		dest[14] = mat[14];
    +		dest[15] = mat[15];
    +	}
    +	
    +	// Perform axis-specific matrix multiplication
    +	dest[4] = a10*c + a20*s;
    +	dest[5] = a11*c + a21*s;
    +	dest[6] = a12*c + a22*s;
    +	dest[7] = a13*c + a23*s;
    +	
    +	dest[8] = a10*-s + a20*c;
    +	dest[9] = a11*-s + a21*c;
    +	dest[10] = a12*-s + a22*c;
    +	dest[11] = a13*-s + a23*c;
    +	return dest;
    +};
    +
    +/*
    + * mat4.rotateY
    + * Rotates a matrix by the given angle around the Y axis
    + *
    + * Params:
    + * mat - mat4 to rotate
    + * angle - angle (in radians) to rotate
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.rotateY = function(mat, angle, dest) {
    +	var s = Math.sin(angle);
    +	var c = Math.cos(angle);
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11];
    +	
    +	if(!dest) { 
    +		dest = mat 
    +	} else if(mat != dest) { // If the source and destination differ, copy the unchanged rows
    +		dest[4] = mat[4];
    +		dest[5] = mat[5];
    +		dest[6] = mat[6];
    +		dest[7] = mat[7];
    +		
    +		dest[12] = mat[12];
    +		dest[13] = mat[13];
    +		dest[14] = mat[14];
    +		dest[15] = mat[15];
    +	}
    +	
    +	// Perform axis-specific matrix multiplication
    +	dest[0] = a00*c + a20*-s;
    +	dest[1] = a01*c + a21*-s;
    +	dest[2] = a02*c + a22*-s;
    +	dest[3] = a03*c + a23*-s;
    +	
    +	dest[8] = a00*s + a20*c;
    +	dest[9] = a01*s + a21*c;
    +	dest[10] = a02*s + a22*c;
    +	dest[11] = a03*s + a23*c;
    +	return dest;
    +};
    +
    +/*
    + * mat4.rotateZ
    + * Rotates a matrix by the given angle around the Z axis
    + *
    + * Params:
    + * mat - mat4 to rotate
    + * angle - angle (in radians) to rotate
    + * dest - Optional, mat4 receiving operation result. If not specified result is written to mat
    + *
    + * Returns:
    + * dest if specified, mat otherwise
    + */
    +mat4.rotateZ = function(mat, angle, dest) {
    +	var s = Math.sin(angle);
    +	var c = Math.cos(angle);
    +	
    +	// Cache the matrix values (makes for huge speed increases!)
    +	var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3];
    +	var a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7];
    +	
    +	if(!dest) { 
    +		dest = mat 
    +	} else if(mat != dest) { // If the source and destination differ, copy the unchanged last row
    +		dest[8] = mat[8];
    +		dest[9] = mat[9];
    +		dest[10] = mat[10];
    +		dest[11] = mat[11];
    +		
    +		dest[12] = mat[12];
    +		dest[13] = mat[13];
    +		dest[14] = mat[14];
    +		dest[15] = mat[15];
    +	}
    +	
    +	// Perform axis-specific matrix multiplication
    +	dest[0] = a00*c + a10*s;
    +	dest[1] = a01*c + a11*s;
    +	dest[2] = a02*c + a12*s;
    +	dest[3] = a03*c + a13*s;
    +	
    +	dest[4] = a00*-s + a10*c;
    +	dest[5] = a01*-s + a11*c;
    +	dest[6] = a02*-s + a12*c;
    +	dest[7] = a03*-s + a13*c;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.frustum
    + * Generates a frustum matrix with the given bounds
    + *
    + * Params:
    + * left, right - scalar, left and right bounds of the frustum
    + * bottom, top - scalar, bottom and top bounds of the frustum
    + * near, far - scalar, near and far bounds of the frustum
    + * dest - Optional, mat4 frustum matrix will be written into
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +mat4.frustum = function(left, right, bottom, top, near, far, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	var rl = (right - left);
    +	var tb = (top - bottom);
    +	var fn = (far - near);
    +	dest[0] = (near*2) / rl;
    +	dest[1] = 0;
    +	dest[2] = 0;
    +	dest[3] = 0;
    +	dest[4] = 0;
    +	dest[5] = (near*2) / tb;
    +	dest[6] = 0;
    +	dest[7] = 0;
    +	dest[8] = (right + left) / rl;
    +	dest[9] = (top + bottom) / tb;
    +	dest[10] = -(far + near) / fn;
    +	dest[11] = -1;
    +	dest[12] = 0;
    +	dest[13] = 0;
    +	dest[14] = -(far*near*2) / fn;
    +	dest[15] = 0;
    +	return dest;
    +};
    +
    +/*
    + * mat4.perspective
    + * Generates a perspective projection matrix with the given bounds
    + *
    + * Params:
    + * fovy - scalar, vertical field of view
    + * aspect - scalar, aspect ratio. typically viewport width/height
    + * near, far - scalar, near and far bounds of the frustum
    + * dest - Optional, mat4 frustum matrix will be written into
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +mat4.perspective = function(fovy, aspect, near, far, dest) {
    +	var top = near*Math.tan(fovy*Math.PI / 360.0);
    +	var right = top*aspect;
    +	return mat4.frustum(-right, right, -top, top, near, far, dest);
    +};
    +
    +/*
    + * mat4.ortho
    + * Generates a orthogonal projection matrix with the given bounds
    + *
    + * Params:
    + * left, right - scalar, left and right bounds of the frustum
    + * bottom, top - scalar, bottom and top bounds of the frustum
    + * near, far - scalar, near and far bounds of the frustum
    + * dest - Optional, mat4 frustum matrix will be written into
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +mat4.ortho = function(left, right, bottom, top, near, far, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	var rl = (right - left);
    +	var tb = (top - bottom);
    +	var fn = (far - near);
    +	dest[0] = 2 / rl;
    +	dest[1] = 0;
    +	dest[2] = 0;
    +	dest[3] = 0;
    +	dest[4] = 0;
    +	dest[5] = 2 / tb;
    +	dest[6] = 0;
    +	dest[7] = 0;
    +	dest[8] = 0;
    +	dest[9] = 0;
    +	dest[10] = -2 / fn;
    +	dest[11] = 0;
    +	dest[12] = -(left + right) / rl;
    +	dest[13] = -(top + bottom) / tb;
    +	dest[14] = -(far + near) / fn;
    +	dest[15] = 1;
    +	return dest;
    +};
    +
    +/*
    + * mat4.ortho
    + * Generates a look-at matrix with the given eye position, focal point, and up axis
    + *
    + * Params:
    + * eye - vec3, position of the viewer
    + * center - vec3, point the viewer is looking at
    + * up - vec3 pointing "up"
    + * dest - Optional, mat4 frustum matrix will be written into
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +mat4.lookAt = function(eye, center, up, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	
    +	var eyex = eye[0],
    +		eyey = eye[1],
    +		eyez = eye[2],
    +		upx = up[0],
    +		upy = up[1],
    +		upz = up[2],
    +		centerx = center[0],
    +		centery = center[1],
    +		centerz = center[2];
    +
    +	if (eyex == centerx && eyey == centery && eyez == centerz) {
    +		return mat4.identity(dest);
    +	}
    +	
    +	var z0,z1,z2,x0,x1,x2,y0,y1,y2,len;
    +	
    +	//vec3.direction(eye, center, z);
    +	z0 = eyex - center[0];
    +	z1 = eyey - center[1];
    +	z2 = eyez - center[2];
    +	
    +	// normalize (no check needed for 0 because of early return)
    +	len = 1/Math.sqrt(z0*z0 + z1*z1 + z2*z2);
    +	z0 *= len;
    +	z1 *= len;
    +	z2 *= len;
    +	
    +	//vec3.normalize(vec3.cross(up, z, x));
    +	x0 = upy*z2 - upz*z1;
    +	x1 = upz*z0 - upx*z2;
    +	x2 = upx*z1 - upy*z0;
    +	len = Math.sqrt(x0*x0 + x1*x1 + x2*x2);
    +	if (!len) {
    +		x0 = 0;
    +		x1 = 0;
    +		x2 = 0;
    +	} else {
    +		len = 1/len;
    +		x0 *= len;
    +		x1 *= len;
    +		x2 *= len;
    +	};
    +	
    +	//vec3.normalize(vec3.cross(z, x, y));
    +	y0 = z1*x2 - z2*x1;
    +	y1 = z2*x0 - z0*x2;
    +	y2 = z0*x1 - z1*x0;
    +	
    +	len = Math.sqrt(y0*y0 + y1*y1 + y2*y2);
    +	if (!len) {
    +		y0 = 0;
    +		y1 = 0;
    +		y2 = 0;
    +	} else {
    +		len = 1/len;
    +		y0 *= len;
    +		y1 *= len;
    +		y2 *= len;
    +	}
    +	
    +	dest[0] = x0;
    +	dest[1] = y0;
    +	dest[2] = z0;
    +	dest[3] = 0;
    +	dest[4] = x1;
    +	dest[5] = y1;
    +	dest[6] = z1;
    +	dest[7] = 0;
    +	dest[8] = x2;
    +	dest[9] = y2;
    +	dest[10] = z2;
    +	dest[11] = 0;
    +	dest[12] = -(x0*eyex + x1*eyey + x2*eyez);
    +	dest[13] = -(y0*eyex + y1*eyey + y2*eyez);
    +	dest[14] = -(z0*eyex + z1*eyey + z2*eyez);
    +	dest[15] = 1;
    +	
    +	return dest;
    +};
    +
    +/*
    + * mat4.str
    + * Returns a string representation of a mat4
    + *
    + * Params:
    + * mat - mat4 to represent as a string
    + *
    + * Returns:
    + * string representation of mat
    + */
    +mat4.str = function(mat) {
    +	return '[' + mat[0] + ', ' + mat[1] + ', ' + mat[2] + ', ' + mat[3] + 
    +		', '+ mat[4] + ', ' + mat[5] + ', ' + mat[6] + ', ' + mat[7] + 
    +		', '+ mat[8] + ', ' + mat[9] + ', ' + mat[10] + ', ' + mat[11] + 
    +		', '+ mat[12] + ', ' + mat[13] + ', ' + mat[14] + ', ' + mat[15] + ']';
    +};
    +
    +/*
    + * quat4 - Quaternions 
    + */
    +quat4 = {};
    +
    +/*
    + * quat4.create
    + * Creates a new instance of a quat4 using the default array type
    + * Any javascript array containing at least 4 numeric elements can serve as a quat4
    + *
    + * Params:
    + * quat - Optional, quat4 containing values to initialize with
    + *
    + * Returns:
    + * New quat4
    + */
    +quat4.create = function(quat) {
    +	var dest = new Float32Array(4);
    +	
    +	if(quat) {
    +		dest[0] = quat[0];
    +		dest[1] = quat[1];
    +		dest[2] = quat[2];
    +		dest[3] = quat[3];
    +	}
    +	
    +	return dest;
    +};
    +
    +/*
    + * quat4.set
    + * Copies the values of one quat4 to another
    + *
    + * Params:
    + * quat - quat4 containing values to copy
    + * dest - quat4 receiving copied values
    + *
    + * Returns:
    + * dest
    + */
    +quat4.set = function(quat, dest) {
    +	dest[0] = quat[0];
    +	dest[1] = quat[1];
    +	dest[2] = quat[2];
    +	dest[3] = quat[3];
    +	
    +	return dest;
    +};
    +
    +/*
    + * quat4.calculateW
    + * Calculates the W component of a quat4 from the X, Y, and Z components.
    + * Assumes that quaternion is 1 unit in length. 
    + * Any existing W component will be ignored. 
    + *
    + * Params:
    + * quat - quat4 to calculate W component of
    + * dest - Optional, quat4 receiving calculated values. If not specified result is written to quat
    + *
    + * Returns:
    + * dest if specified, quat otherwise
    + */
    +quat4.calculateW = function(quat, dest) {
    +	var x = quat[0], y = quat[1], z = quat[2];
    +
    +	if(!dest || quat == dest) {
    +		quat[3] = -Math.sqrt(Math.abs(1.0 - x*x - y*y - z*z));
    +		return quat;
    +	}
    +	dest[0] = x;
    +	dest[1] = y;
    +	dest[2] = z;
    +	dest[3] = -Math.sqrt(Math.abs(1.0 - x*x - y*y - z*z));
    +	return dest;
    +}
    +
    +/*
    + * quat4.inverse
    + * Calculates the inverse of a quat4
    + *
    + * Params:
    + * quat - quat4 to calculate inverse of
    + * dest - Optional, quat4 receiving inverse values. If not specified result is written to quat
    + *
    + * Returns:
    + * dest if specified, quat otherwise
    + */
    +quat4.inverse = function(quat, dest) {
    +	if(!dest || quat == dest) {
    +		quat[0] *= 1;
    +		quat[1] *= 1;
    +		quat[2] *= 1;
    +		return quat;
    +	}
    +	dest[0] = -quat[0];
    +	dest[1] = -quat[1];
    +	dest[2] = -quat[2];
    +	dest[3] = quat[3];
    +	return dest;
    +}
    +
    +/*
    + * quat4.length
    + * Calculates the length of a quat4
    + *
    + * Params:
    + * quat - quat4 to calculate length of
    + *
    + * Returns:
    + * Length of quat
    + */
    +quat4.length = function(quat) {
    +	var x = quat[0], y = quat[1], z = quat[2], w = quat[3];
    +	return Math.sqrt(x*x + y*y + z*z + w*w);
    +}
    +
    +/*
    + * quat4.normalize
    + * Generates a unit quaternion of the same direction as the provided quat4
    + * If quaternion length is 0, returns [0, 0, 0, 0]
    + *
    + * Params:
    + * quat - quat4 to normalize
    + * dest - Optional, quat4 receiving operation result. If not specified result is written to quat
    + *
    + * Returns:
    + * dest if specified, quat otherwise
    + */
    +quat4.normalize = function(quat, dest) {
    +	if(!dest) { dest = quat; }
    +	
    +	var x = quat[0], y = quat[1], z = quat[2], w = quat[3];
    +	var len = Math.sqrt(x*x + y*y + z*z + w*w);
    +	if(len == 0) {
    +		dest[0] = 0;
    +		dest[1] = 0;
    +		dest[2] = 0;
    +		dest[3] = 0;
    +		return dest;
    +	}
    +	len = 1/len;
    +	dest[0] = x * len;
    +	dest[1] = y * len;
    +	dest[2] = z * len;
    +	dest[3] = w * len;
    +	
    +	return dest;
    +}
    +
    +/*
    + * quat4.multiply
    + * Performs a quaternion multiplication
    + *
    + * Params:
    + * quat - quat4, first operand
    + * quat2 - quat4, second operand
    + * dest - Optional, quat4 receiving operation result. If not specified result is written to quat
    + *
    + * Returns:
    + * dest if specified, quat otherwise
    + */
    +quat4.multiply = function(quat, quat2, dest) {
    +	if(!dest) { dest = quat; }
    +	
    +	var qax = quat[0], qay = quat[1], qaz = quat[2], qaw = quat[3];
    +	var qbx = quat2[0], qby = quat2[1], qbz = quat2[2], qbw = quat2[3];
    +	
    +	dest[0] = qax*qbw + qaw*qbx + qay*qbz - qaz*qby;
    +	dest[1] = qay*qbw + qaw*qby + qaz*qbx - qax*qbz;
    +	dest[2] = qaz*qbw + qaw*qbz + qax*qby - qay*qbx;
    +	dest[3] = qaw*qbw - qax*qbx - qay*qby - qaz*qbz;
    +	
    +	return dest;
    +}
    +
    +/*
    + * quat4.multiplyVec3
    + * Transforms a vec3 with the given quaternion
    + *
    + * Params:
    + * quat - quat4 to transform the vector with
    + * vec - vec3 to transform
    + * dest - Optional, vec3 receiving operation result. If not specified result is written to vec
    + *
    + * Returns:
    + * dest if specified, vec otherwise
    + */
    +quat4.multiplyVec3 = function(quat, vec, dest) {
    +	if(!dest) { dest = vec; }
    +	
    +	var x = vec[0], y = vec[1], z = vec[2];
    +	var qx = quat[0], qy = quat[1], qz = quat[2], qw = quat[3];
    +
    +	// calculate quat * vec
    +	var ix = qw*x + qy*z - qz*y;
    +	var iy = qw*y + qz*x - qx*z;
    +	var iz = qw*z + qx*y - qy*x;
    +	var iw = -qx*x - qy*y - qz*z;
    +	
    +	// calculate result * inverse quat
    +	dest[0] = ix*qw + iw*-qx + iy*-qz - iz*-qy;
    +	dest[1] = iy*qw + iw*-qy + iz*-qx - ix*-qz;
    +	dest[2] = iz*qw + iw*-qz + ix*-qy - iy*-qx;
    +	
    +	return dest;
    +}
    +
    +/*
    + * quat4.toMat3
    + * Calculates a 3x3 matrix from the given quat4
    + *
    + * Params:
    + * quat - quat4 to create matrix from
    + * dest - Optional, mat3 receiving operation result
    + *
    + * Returns:
    + * dest if specified, a new mat3 otherwise
    + */
    +quat4.toMat3 = function(quat, dest) {
    +	if(!dest) { dest = mat3.create(); }
    +	
    +	var x = quat[0], y = quat[1], z = quat[2], w = quat[3];
    +
    +	var x2 = x + x;
    +	var y2 = y + y;
    +	var z2 = z + z;
    +
    +	var xx = x*x2;
    +	var xy = x*y2;
    +	var xz = x*z2;
    +
    +	var yy = y*y2;
    +	var yz = y*z2;
    +	var zz = z*z2;
    +
    +	var wx = w*x2;
    +	var wy = w*y2;
    +	var wz = w*z2;
    +
    +	dest[0] = 1 - (yy + zz);
    +	dest[1] = xy - wz;
    +	dest[2] = xz + wy;
    +
    +	dest[3] = xy + wz;
    +	dest[4] = 1 - (xx + zz);
    +	dest[5] = yz - wx;
    +
    +	dest[6] = xz - wy;
    +	dest[7] = yz + wx;
    +	dest[8] = 1 - (xx + yy);
    +	
    +	return dest;
    +}
    +
    +/*
    + * quat4.toMat4
    + * Calculates a 4x4 matrix from the given quat4
    + *
    + * Params:
    + * quat - quat4 to create matrix from
    + * dest - Optional, mat4 receiving operation result
    + *
    + * Returns:
    + * dest if specified, a new mat4 otherwise
    + */
    +quat4.toMat4 = function(quat, dest) {
    +	if(!dest) { dest = mat4.create(); }
    +	
    +	var x = quat[0], y = quat[1], z = quat[2], w = quat[3];
    +
    +	var x2 = x + x;
    +	var y2 = y + y;
    +	var z2 = z + z;
    +
    +	var xx = x*x2;
    +	var xy = x*y2;
    +	var xz = x*z2;
    +
    +	var yy = y*y2;
    +	var yz = y*z2;
    +	var zz = z*z2;
    +
    +	var wx = w*x2;
    +	var wy = w*y2;
    +	var wz = w*z2;
    +
    +	dest[0] = 1 - (yy + zz);
    +	dest[1] = xy - wz;
    +	dest[2] = xz + wy;
    +	dest[3] = 0;
    +
    +	dest[4] = xy + wz;
    +	dest[5] = 1 - (xx + zz);
    +	dest[6] = yz - wx;
    +	dest[7] = 0;
    +
    +	dest[8] = xz - wy;
    +	dest[9] = yz + wx;
    +	dest[10] = 1 - (xx + yy);
    +	dest[11] = 0;
    +
    +	dest[12] = 0;
    +	dest[13] = 0;
    +	dest[14] = 0;
    +	dest[15] = 1;
    +	
    +	return dest;
    +}
    +
    +/*
    + * quat4.str
    + * Returns a string representation of a quaternion
    + *
    + * Params:
    + * quat - quat4 to represent as a string
    + *
    + * Returns:
    + * string representation of quat
    + */
    +quat4.str = function(quat) {
    +	return '[' + quat[0] + ', ' + quat[1] + ', ' + quat[2] + ', ' + quat[3] + ']'; 
    +};
    +
    +  return {
    +    vec3: vec3,
    +    mat3: mat3,
    +    mat4: mat4
    +  };
    +}());
    +
    diff --git a/wt-3.1.7a/src/js/WtGlMatrix.min.js b/wt-3.1.7a/src/js/WtGlMatrix.min.js
    new file mode 100755
    index 0000000..6bcedad
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WtGlMatrix.min.js
    @@ -0,0 +1,24 @@
    +WT_DECLARE_WT_MEMBER(2,"glMatrix",function(){var D={};D.create=function(a){var b=new Float32Array(3);if(a){b[0]=a[0];b[1]=a[1];b[2]=a[2]}return b};D.set=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b};D.add=function(a,b,c){if(!c||a==c){a[0]+=b[0];a[1]+=b[1];a[2]+=b[2];return a}c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];return c};D.subtract=function(a,b,c){if(!c||a==c){a[0]-=b[0];a[1]-=b[1];a[2]-=b[2];return a}c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c};D.negate=function(a,b){b||
    +(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b};D.scale=function(a,b,c){if(!c||a==c){a[0]*=b;a[1]*=b;a[2]*=b;return a}c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c};D.normalize=function(a,b){b||(b=a);var c=a[0],d=a[1];a=a[2];var e=Math.sqrt(c*c+d*d+a*a);if(e){if(e==1){b[0]=c;b[1]=d;b[2]=a;return b}}else{b[0]=0;b[1]=0;b[2]=0;return b}e=1/e;b[0]=c*e;b[1]=d*e;b[2]=a*e;return b};D.cross=function(a,b,c){c||(c=a);var d=a[0],e=a[1];a=a[2];var g=b[0],f=b[1];b=b[2];c[0]=e*b-a*f;c[1]=a*g-d*b;c[2]=d*f-e*g;return c};
    +D.length=function(a){var b=a[0],c=a[1];a=a[2];return Math.sqrt(b*b+c*c+a*a)};D.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]};D.direction=function(a,b,c){c||(c=a);var d=a[0]-b[0],e=a[1]-b[1];a=a[2]-b[2];b=Math.sqrt(d*d+e*e+a*a);if(!b){c[0]=0;c[1]=0;c[2]=0;return c}b=1/b;c[0]=d*b;c[1]=e*b;c[2]=a*b;return c};D.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var G={};G.create=function(a){var b=new Float32Array(9);if(a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=
    +a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9]}return b};G.set=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return b};G.identity=function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a};G.toMat4=function(a,b){b||(b=o.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=0;b[4]=a[3];b[5]=a[4];b[6]=a[5];b[7]=0;b[8]=a[6];b[9]=a[7];b[10]=a[8];b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};G.str=function(a){return"["+a[0]+", "+a[1]+", "+
    +a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"};var o={};o.create=function(a){var b=new Float32Array(16);if(a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}return b};o.set=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=
    +a[15];return b};o.identity=function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};o.transpose=function(a,b){if(!b||a==b){b=a[1];var c=a[2],d=a[3],e=a[6],g=a[7],f=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=b;a[6]=a[9];a[7]=a[13];a[8]=c;a[9]=e;a[11]=a[14];a[12]=d;a[13]=g;a[14]=f;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]=a[10];b[11]=a[14];b[12]=
    +a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b};o.determinant=function(a){var b=a[0],c=a[1],d=a[2],e=a[3],g=a[4],f=a[5],h=a[6],i=a[7],j=a[8],k=a[9],m=a[10],n=a[11],l=a[12],p=a[13],q=a[14];a=a[15];return l*k*h*e-j*p*h*e-l*f*m*e+g*p*m*e+j*f*q*e-g*k*q*e-l*k*d*i+j*p*d*i+l*c*m*i-b*p*m*i-j*c*q*i+b*k*q*i+l*f*d*n-g*p*d*n-l*c*h*n+b*p*h*n+g*c*q*n-b*f*q*n-j*f*d*a+g*k*d*a+j*c*h*a-b*k*h*a-g*c*m*a+b*f*m*a};o.inverse=function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2],g=a[3],f=a[4],h=a[5],i=a[6],j=a[7],k=a[8],m=a[9],
    +n=a[10],l=a[11],p=a[12],q=a[13],s=a[14];a=a[15];var A=c*h-d*f,B=c*i-e*f,C=c*j-g*f,t=d*i-e*h,u=d*j-g*h,v=e*j-g*i,w=k*q-m*p,x=k*s-n*p,y=k*a-l*p,z=m*s-n*q,E=m*a-l*q,F=n*a-l*s,r=1/(A*F-B*E+C*z+t*y-u*x+v*w);b[0]=(h*F-i*E+j*z)*r;b[1]=(-d*F+e*E-g*z)*r;b[2]=(q*v-s*u+a*t)*r;b[3]=(-m*v+n*u-l*t)*r;b[4]=(-f*F+i*y-j*x)*r;b[5]=(c*F-e*y+g*x)*r;b[6]=(-p*v+s*C-a*B)*r;b[7]=(k*v-n*C+l*B)*r;b[8]=(f*E-h*y+j*w)*r;b[9]=(-c*E+d*y-g*w)*r;b[10]=(p*u-q*C+a*A)*r;b[11]=(-k*u+m*C-l*A)*r;b[12]=(-f*z+h*x-i*w)*r;b[13]=(c*z-d*x+e*
    +w)*r;b[14]=(-p*t+q*B-s*A)*r;b[15]=(k*t-m*B+n*A)*r;return b};o.toRotationMat=function(a,b){b||(b=o.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};o.toMat3=function(a,b){b||(b=G.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b};o.toInverseMat3=function(a,b){var c=a[0],d=a[1],e=a[2],g=a[4],f=a[5],h=a[6],i=a[8],j=
    +a[9];a=a[10];var k=a*f-h*j,m=-a*g+h*i,n=j*g-f*i,l=c*k+d*m+e*n;if(!l)return null;l=1/l;b||(b=G.create());b[0]=k*l;b[1]=(-a*d+e*j)*l;b[2]=(h*d-e*f)*l;b[3]=m*l;b[4]=(a*c-e*i)*l;b[5]=(-h*c+e*g)*l;b[6]=n*l;b[7]=(-j*c+d*i)*l;b[8]=(f*c-d*g)*l;return b};o.multiply=function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2],f=a[3],h=a[4],i=a[5],j=a[6],k=a[7],m=a[8],n=a[9],l=a[10],p=a[11],q=a[12],s=a[13],A=a[14];a=a[15];var B=b[0],C=b[1],t=b[2],u=b[3],v=b[4],w=b[5],x=b[6],y=b[7],z=b[8],E=b[9],F=b[10],r=b[11],H=b[12],
    +I=b[13],J=b[14];b=b[15];c[0]=B*d+C*h+t*m+u*q;c[1]=B*e+C*i+t*n+u*s;c[2]=B*g+C*j+t*l+u*A;c[3]=B*f+C*k+t*p+u*a;c[4]=v*d+w*h+x*m+y*q;c[5]=v*e+w*i+x*n+y*s;c[6]=v*g+w*j+x*l+y*A;c[7]=v*f+w*k+x*p+y*a;c[8]=z*d+E*h+F*m+r*q;c[9]=z*e+E*i+F*n+r*s;c[10]=z*g+E*j+F*l+r*A;c[11]=z*f+E*k+F*p+r*a;c[12]=H*d+I*h+J*m+b*q;c[13]=H*e+I*i+J*n+b*s;c[14]=H*g+I*j+J*l+b*A;c[15]=H*f+I*k+J*p+b*a;return c};o.multiplyVec3=function(a,b,c){c||(c=b);var d=b[0],e=b[1];b=b[2];c[0]=a[0]*d+a[4]*e+a[8]*b+a[12];c[1]=a[1]*d+a[5]*e+a[9]*b+a[13];
    +c[2]=a[2]*d+a[6]*e+a[10]*b+a[14];return c};o.multiplyVec4=function(a,b,c){c||(c=b);var d=b[0],e=b[1],g=b[2];b=b[3];c[0]=a[0]*d+a[4]*e+a[8]*g+a[12]*b;c[1]=a[1]*d+a[5]*e+a[9]*g+a[13]*b;c[2]=a[2]*d+a[6]*e+a[10]*g+a[14]*b;c[4]=a[4]*d+a[7]*e+a[11]*g+a[15]*b;return c};o.translate=function(a,b,c){var d=b[0],e=b[1];b=b[2];if(!c||a==c){a[12]=a[0]*d+a[4]*e+a[8]*b+a[12];a[13]=a[1]*d+a[5]*e+a[9]*b+a[13];a[14]=a[2]*d+a[6]*e+a[10]*b+a[14];a[15]=a[3]*d+a[7]*e+a[11]*b+a[15];return a}var g=a[0],f=a[1],h=a[2],i=a[3],
    +j=a[4],k=a[5],m=a[6],n=a[7],l=a[8],p=a[9],q=a[10],s=a[11];c[0]=g;c[1]=f;c[2]=h;c[3]=i;c[4]=j;c[5]=k;c[6]=m;c[7]=n;c[8]=l;c[9]=p;c[10]=q;c[11]=s;c[12]=g*d+j*e+l*b+a[12];c[13]=f*d+k*e+p*b+a[13];c[14]=h*d+m*e+q*b+a[14];c[15]=i*d+n*e+s*b+a[15];return c};o.scale=function(a,b,c){var d=b[0],e=b[1];b=b[2];if(!c||a==c){a[0]*=d;a[1]*=d;a[2]*=d;a[3]*=d;a[4]*=e;a[5]*=e;a[6]*=e;a[7]*=e;a[8]*=b;a[9]*=b;a[10]*=b;a[11]*=b;return a}c[0]=a[0]*d;c[1]=a[1]*d;c[2]=a[2]*d;c[3]=a[3]*d;c[4]=a[4]*e;c[5]=a[5]*e;c[6]=a[6]*
    +e;c[7]=a[7]*e;c[8]=a[8]*b;c[9]=a[9]*b;c[10]=a[10]*b;c[11]=a[11]*b;c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c};o.rotate=function(a,b,c,d){var e=c[0],g=c[1];c=c[2];var f=Math.sqrt(e*e+g*g+c*c);if(!f)return null;if(f!=1){f=1/f;e*=f;g*=f;c*=f}var h=Math.sin(b),i=Math.cos(b),j=1-i;b=a[0];f=a[1];var k=a[2],m=a[3],n=a[4],l=a[5],p=a[6],q=a[7],s=a[8],A=a[9],B=a[10],C=a[11],t=e*e*j+i,u=g*e*j+c*h,v=c*e*j-g*h,w=e*g*j-c*h,x=g*g*j+i,y=c*g*j+e*h,z=e*c*j+g*h;e=g*c*j-e*h;g=c*c*j+i;if(d){if(a!=d){d[12]=
    +a[12];d[13]=a[13];d[14]=a[14];d[15]=a[15]}}else d=a;d[0]=b*t+n*u+s*v;d[1]=f*t+l*u+A*v;d[2]=k*t+p*u+B*v;d[3]=m*t+q*u+C*v;d[4]=b*w+n*x+s*y;d[5]=f*w+l*x+A*y;d[6]=k*w+p*x+B*y;d[7]=m*w+q*x+C*y;d[8]=b*z+n*e+s*g;d[9]=f*z+l*e+A*g;d[10]=k*z+p*e+B*g;d[11]=m*z+q*e+C*g;return d};o.rotateX=function(a,b,c){var d=Math.sin(b);b=Math.cos(b);var e=a[4],g=a[5],f=a[6],h=a[7],i=a[8],j=a[9],k=a[10],m=a[11];if(c){if(a!=c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15]}}else c=a;
    +c[4]=e*b+i*d;c[5]=g*b+j*d;c[6]=f*b+k*d;c[7]=h*b+m*d;c[8]=e*-d+i*b;c[9]=g*-d+j*b;c[10]=f*-d+k*b;c[11]=h*-d+m*b;return c};o.rotateY=function(a,b,c){var d=Math.sin(b);b=Math.cos(b);var e=a[0],g=a[1],f=a[2],h=a[3],i=a[8],j=a[9],k=a[10],m=a[11];if(c){if(a!=c){c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15]}}else c=a;c[0]=e*b+i*-d;c[1]=g*b+j*-d;c[2]=f*b+k*-d;c[3]=h*b+m*-d;c[8]=e*d+i*b;c[9]=g*d+j*b;c[10]=f*d+k*b;c[11]=h*d+m*b;return c};o.rotateZ=function(a,b,c){var d=
    +Math.sin(b);b=Math.cos(b);var e=a[0],g=a[1],f=a[2],h=a[3],i=a[4],j=a[5],k=a[6],m=a[7];if(c){if(a!=c){c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15]}}else c=a;c[0]=e*b+i*d;c[1]=g*b+j*d;c[2]=f*b+k*d;c[3]=h*b+m*d;c[4]=e*-d+i*b;c[5]=g*-d+j*b;c[6]=f*-d+k*b;c[7]=h*-d+m*b;return c};o.frustum=function(a,b,c,d,e,g,f){f||(f=o.create());var h=b-a,i=d-c,j=g-e;f[0]=e*2/h;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=e*2/i;f[6]=0;f[7]=0;f[8]=(b+a)/h;f[9]=(d+c)/i;f[10]=-(g+e)/j;f[11]=
    +-1;f[12]=0;f[13]=0;f[14]=-(g*e*2)/j;f[15]=0;return f};o.perspective=function(a,b,c,d,e){a=c*Math.tan(a*Math.PI/360);b=a*b;return o.frustum(-b,b,-a,a,c,d,e)};o.ortho=function(a,b,c,d,e,g,f){f||(f=o.create());var h=b-a,i=d-c,j=g-e;f[0]=2/h;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=2/i;f[6]=0;f[7]=0;f[8]=0;f[9]=0;f[10]=-2/j;f[11]=0;f[12]=-(a+b)/h;f[13]=-(d+c)/i;f[14]=-(g+e)/j;f[15]=1;return f};o.lookAt=function(a,b,c,d){d||(d=o.create());var e=a[0],g=a[1];a=a[2];var f=c[0],h=c[1],i=c[2];c=b[1];var j=b[2];if(e==
    +b[0]&&g==c&&a==j)return o.identity(d);var k,m,n,l;c=e-b[0];j=g-b[1];b=a-b[2];l=1/Math.sqrt(c*c+j*j+b*b);c*=l;j*=l;b*=l;k=h*b-i*j;i=i*c-f*b;f=f*j-h*c;if(l=Math.sqrt(k*k+i*i+f*f)){l=1/l;k*=l;i*=l;f*=l}else f=i=k=0;h=j*f-b*i;m=b*k-c*f;n=c*i-j*k;if(l=Math.sqrt(h*h+m*m+n*n)){l=1/l;h*=l;m*=l;n*=l}else n=m=h=0;d[0]=k;d[1]=h;d[2]=c;d[3]=0;d[4]=i;d[5]=m;d[6]=j;d[7]=0;d[8]=f;d[9]=n;d[10]=b;d[11]=0;d[12]=-(k*e+i*g+f*a);d[13]=-(h*e+m*g+n*a);d[14]=-(c*e+j*g+b*a);d[15]=1;return d};o.str=function(a){return"["+a[0]+
    +", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"};quat4={};quat4.create=function(a){var b=new Float32Array(4);if(a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3]}return b};quat4.set=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b};quat4.calculateW=function(a,b){var c=a[0],d=a[1],e=a[2];if(!b||a==b){a[3]=-Math.sqrt(Math.abs(1-c*c-d*d-e*e));return a}b[0]=c;b[1]=d;b[2]=e;b[3]=-Math.sqrt(Math.abs(1-
    +c*c-d*d-e*e));return b};quat4.inverse=function(a,b){if(!b||a==b){a[0]*=1;a[1]*=1;a[2]*=1;return a}b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b};quat4.length=function(a){var b=a[0],c=a[1],d=a[2];a=a[3];return Math.sqrt(b*b+c*c+d*d+a*a)};quat4.normalize=function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2];a=a[3];var g=Math.sqrt(c*c+d*d+e*e+a*a);if(g==0){b[0]=0;b[1]=0;b[2]=0;b[3]=0;return b}g=1/g;b[0]=c*g;b[1]=d*g;b[2]=e*g;b[3]=a*g;return b};quat4.multiply=function(a,b,c){c||(c=a);var d=a[0],e=a[1],
    +g=a[2];a=a[3];var f=b[0],h=b[1],i=b[2];b=b[3];c[0]=d*b+a*f+e*i-g*h;c[1]=e*b+a*h+g*f-d*i;c[2]=g*b+a*i+d*h-e*f;c[3]=a*b-d*f-e*h-g*i;return c};quat4.multiplyVec3=function(a,b,c){c||(c=b);var d=b[0],e=b[1],g=b[2];b=a[0];var f=a[1],h=a[2];a=a[3];var i=a*d+f*g-h*e,j=a*e+h*d-b*g,k=a*g+b*e-f*d;d=-b*d-f*e-h*g;c[0]=i*a+d*-b+j*-h-k*-f;c[1]=j*a+d*-f+k*-b-i*-h;c[2]=k*a+d*-h+i*-f-j*-b;return c};quat4.toMat3=function(a,b){b||(b=G.create());var c=a[0],d=a[1],e=a[2],g=a[3],f=c+c,h=d+d,i=e+e;a=c*f;var j=c*h;c=c*i;
    +var k=d*h;d=d*i;e=e*i;f=g*f;h=g*h;g=g*i;b[0]=1-(k+e);b[1]=j-g;b[2]=c+h;b[3]=j+g;b[4]=1-(a+e);b[5]=d-f;b[6]=c-h;b[7]=d+f;b[8]=1-(a+k);return b};quat4.toMat4=function(a,b){b||(b=o.create());var c=a[0],d=a[1],e=a[2],g=a[3],f=c+c,h=d+d,i=e+e;a=c*f;var j=c*h;c=c*i;var k=d*h;d=d*i;e=e*i;f=g*f;h=g*h;g=g*i;b[0]=1-(k+e);b[1]=j-g;b[2]=c+h;b[3]=0;b[4]=j+g;b[5]=1-(a+e);b[6]=d-f;b[7]=0;b[8]=c-h;b[9]=d+f;b[10]=1-(a+k);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};quat4.str=function(a){return"["+a[0]+", "+a[1]+
    +", "+a[2]+", "+a[3]+"]"};return{vec3:D,mat3:G,mat4:o}}());
    diff --git a/wt-3.1.7a/src/js/WtResize.js b/wt-3.1.7a/src/js/WtResize.js
    new file mode 100644
    index 0000000..f928be0
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WtResize.js
    @@ -0,0 +1,25 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +/* Note: this is at the same time valid JavaScript and C++. */
    +
    +WT_DECLARE_WT_MEMBER
    +  (10, "ChildrenResize",
    +    function(self, w, h) {
    +      var j,jl,c;
    +      self.style.height = h + 'px';
    +      for (j=0, jl=self.childNodes.length; j < jl; ++j) {
    +	c=self.childNodes[j];
    +	if (c.nodeType == 1) {
    +	  if (c.wtResize)
    +	    c.wtResize(c, w, h);
    +          else
    +            if (c.style.height != self.style.height)
    +              c.style.height = self.style.height;
    +	}
    +      }
    +    }
    +  );
    diff --git a/wt-3.1.7a/src/js/WtResize.min.js b/wt-3.1.7a/src/js/WtResize.min.js
    new file mode 100644
    index 0000000..662e547
    --- /dev/null
    +++ b/wt-3.1.7a/src/js/WtResize.min.js
    @@ -0,0 +1 @@
    +WT_DECLARE_WT_MEMBER(10,"ChildrenResize",function(b,f,d){var c,e,a;b.style.height=d+"px";c=0;for(e=b.childNodes.length;c<e;++c){a=b.childNodes[c];if(a.nodeType==1)if(a.wtResize)a.wtResize(a,f,d);else if(a.style.height!=b.style.height)a.style.height=b.style.height}});
    diff --git a/wt-3.1.7a/src/rapidxml/license.txt b/wt-3.1.7a/src/rapidxml/license.txt
    new file mode 100644
    index 0000000..1409831
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/license.txt
    @@ -0,0 +1,52 @@
    +Use of this software is granted under one of the following two licenses,
    +to be chosen freely by the user.
    +
    +1. Boost Software License - Version 1.0 - August 17th, 2003
    +===============================================================================
    +
    +Copyright (c) 2006, 2007 Marcin Kalicinski
    +
    +Permission is hereby granted, free of charge, to any person or organization
    +obtaining a copy of the software and accompanying documentation covered by
    +this license (the "Software") to use, reproduce, display, distribute,
    +execute, and transmit the Software, and to prepare derivative works of the
    +Software, and to permit third-parties to whom the Software is furnished to
    +do so, all subject to the following:
    +
    +The copyright notices in the Software and this entire statement, including
    +the above license grant, this restriction and the following disclaimer,
    +must be included in all copies of the Software, in whole or in part, and
    +all derivative works of the Software, unless such copies or derivative
    +works are solely in the form of machine-executable object code generated by
    +a source language processor.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    +DEALINGS IN THE SOFTWARE.
    +
    +2. The MIT License
    +===============================================================================
    +
    +Copyright (c) 2006, 2007 Marcin Kalicinski
    +
    +Permission is hereby granted, free of charge, to any person obtaining a copy 
    +of this software and associated documentation files (the "Software"), to deal 
    +in the Software without restriction, including without limitation the rights 
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
    +of the Software, and to permit persons to whom the Software is furnished to do so, 
    +subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in all 
    +copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
    +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
    +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
    +IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/src/rapidxml/manual.html b/wt-3.1.7a/src/rapidxml/manual.html
    new file mode 100644
    index 0000000..2c42270
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/manual.html
    @@ -0,0 +1,406 @@
    +<html><head><style type="text/css">
    +
    +          body
    +          {
    +          font-family: sans-serif;
    +          font-size: 90%;
    +          margin: 8pt 8pt 8pt 8pt;
    +          text-align: justify;
    +          background-color: White;
    +          }
    +
    +          h1 { font-weight: bold; text-align: left;  }
    +          h2 { font: 140% sans-serif; font-weight: bold; text-align: left;  }
    +          h3 { font: 120% sans-serif; font-weight: bold; text-align: left;  }
    +          h4 { font: bold 100% sans-serif; font-weight: bold; text-align: left;  }
    +          h5 { font: italic 100% sans-serif; font-weight: bold; text-align: left;  }
    +          h6 { font: small-caps 100% sans-serif; font-weight: bold; text-align: left;  }
    +
    +          code
    +          {
    +          font-family: &quot;Courier New&quot;, Courier, mono;
    +          }
    +
    +          pre
    +          {
    +          border-top: gray 0.5pt solid;
    +          border-right: gray 0.5pt solid;
    +          border-left: gray 0.5pt solid;
    +          border-bottom: gray 0.5pt solid;
    +          padding-top: 2pt;
    +          padding-right: 2pt;
    +          padding-left: 2pt;
    +          padding-bottom: 2pt;
    +          display: block;
    +          font-family: &quot;courier new&quot;, courier, mono;
    +          background-color: #eeeeee;
    +          }
    +
    +          a
    +          {
    +          color: #000080;
    +          text-decoration: none;
    +          }
    +
    +          a:hover
    +          {
    +          text-decoration: underline;
    +          }
    +
    +          .reference-header
    +          {
    +          border-top: gray 0.5pt solid;
    +          border-right: gray 0.5pt solid;
    +          border-left: gray 0.5pt solid;
    +          border-bottom: gray 0.5pt solid;
    +          padding-top: 2pt;
    +          padding-right: 2pt;
    +          padding-left: 2pt;
    +          padding-bottom: 2pt;
    +          background-color: #dedede;
    +          }
    +
    +          .parameter-name
    +          {
    +          font-style: italic;
    +          }
    +
    +          .indented
    +          {
    +          margin-left: 0.5cm;
    +          }
    +
    +          a.toc1
    +          {
    +          margin-left: 0.0cm;
    +          }
    +
    +          a.toc2
    +          {
    +          margin-left: 0.75cm;
    +          }
    +
    +          a.toc3
    +          {
    +          margin-left: 1.5cm;
    +          }
    +
    +        </style></head><body><h1>RAPIDXML Manual</h1><h3>Version 1.13</h3><detaileddescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><para><i>Copyright (C) 2006, 2009 Marcin Kalicinski</i><br/><i>See accompanying file <a href="license.txt">license.txt</a> for license information.</i><hr/><h2 level="2">Table of Contents</h2></para><para><toc><toc-contents><a href="#namespacerapidxml_1what_is_rapidxml" class="toc1">1. What is RapidXml?</a><br/><a href="#namespacerapidxml_1dependencies_and_compatibility" class="toc2">1.1 Dependencies And Compatibility</a><br/><a href="#namespacerapidxml_1character_types_and_encodings" class="toc2">1.2 Character Types And Encodings</a><br/><a href="#namespacerapidxml_1error_handling" class="toc2">1.3 Error Handling</a><br/><a href="#namespacerapidxml_1memory_allocation" class="toc2">1.4 Memory Allocation</a><br/><a href="#namespacerapidxml_1w3c_compliance" class="toc2">1.5 W3C Compliance</a><br/><a href="#namespacerapidxml_1api_design" class="toc2">1.6 API Design</a><br/><a href="#namespacerapidxml_1reliability" class="toc2">1.7 Reliability</a><br/><a href="#namespacerapidxml_1acknowledgements" class="toc2">1.8 Acknowledgements</a><br/><a href="#namespacerapidxml_1two_minute_tutorial" class="toc1">2. Two Minute Tutorial</a><br/><a href="#namespacerapidxml_1parsing" class="toc2">2.1 Parsing</a><br/><a href="#namespacerapidxml_1accessing_dom_tree" class="toc2">2.2 Accessing The DOM Tree</a><br/><a href="#namespacerapidxml_1modifying_dom_tree" class="toc2">2.3 Modifying The DOM Tree</a><br/><a href="#namespacerapidxml_1printing" class="toc2">2.4 Printing XML</a><br/><a href="#namespacerapidxml_1differences" class="toc1">3. Differences From Regular XML Parsers</a><br/><a href="#namespacerapidxml_1lifetime_of_source_text" class="toc2">3.1 Lifetime Of Source Text</a><br/><a href="#namespacerapidxml_1ownership_of_strings" class="toc2">3.2 Ownership Of Strings</a><br/><a href="#namespacerapidxml_1destructive_non_destructive" class="toc2">3.3 Destructive Vs Non-Destructive Mode</a><br/><a href="#namespacerapidxml_1performance" class="toc1">4. Performance</a><br/><a href="#namespacerapidxml_1performance_charts" class="toc2">4.1 Comparison With Other Parsers</a><br/><a href="#namespacerapidxml_1reference" class="toc1">5. Reference</a><br/></toc-contents></toc><br/></para><sect1><h2 id="namespacerapidxml_1what_is_rapidxml">1. What is RapidXml?</h2><para><a href="http://rapidxml.sourceforge.net">RapidXml</a> is an attempt to create the fastest XML DOM parser possible, while retaining useability, portability and reasonable W3C compatibility. It is an in-situ parser written in C++, with parsing speed approaching that of <code>strlen()</code> function executed on the same data. <br/><br/>
    + Entire parser is contained in a single header file, so no building or linking is neccesary. To use it you just need to copy <code>rapidxml.hpp</code> file to a convenient place (such as your project directory), and include it where needed. You may also want to use printing functions contained in header <code>rapidxml_print.hpp</code>.</para><sect2><h3 id="namespacerapidxml_1dependencies_and_compatibility">1.1 Dependencies And Compatibility</h3><para>RapidXml has <i>no dependencies</i> other than a very small subset of standard C++ library (<code>&lt;cassert&gt;</code>, <code>&lt;cstdlib&gt;</code>, <code>&lt;new&gt;</code> and <code>&lt;exception&gt;</code>, unless exceptions are disabled). It should compile on any reasonably conformant compiler, and was tested on Visual C++ 2003, Visual C++ 2005, Visual C++ 2008, gcc 3, gcc 4, and Comeau 4.3.3. Care was taken that no warnings are produced on these compilers, even with highest warning levels enabled.</para></sect2><sect2><h3 id="namespacerapidxml_1character_types_and_encodings">1.2 Character Types And Encodings</h3><para>RapidXml is character type agnostic, and can work both with narrow and wide characters. Current version does not fully support UTF-16 or UTF-32, so use of wide characters is somewhat incapacitated. However, it should succesfully parse <code>wchar_t</code> strings containing UTF-16 or UTF-32 if endianness of the data matches that of the machine. UTF-8 is fully supported, including all numeric character references, which are expanded into appropriate UTF-8 byte sequences (unless you enable parse_no_utf8 flag). <br/><br/>
    + Note that RapidXml performs no decoding - strings returned by name() and value() functions will contain text encoded using the same encoding as source file. Rapidxml understands and expands the following character references: <code>&amp;apos; &amp;amp; &amp;quot; &amp;lt; &amp;gt; &amp;#...;</code> Other character references are not expanded.</para></sect2><sect2><h3 id="namespacerapidxml_1error_handling">1.3 Error Handling</h3><para>By default, RapidXml uses C++ exceptions to report errors. If this behaviour is undesirable, RAPIDXML_NO_EXCEPTIONS can be defined to suppress exception code. See <a href="#classrapidxml_1_1parse__error" kindref="compound">parse_error</a> class and <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1" kindref="member">parse_error_handler()</a> function for more information.</para></sect2><sect2><h3 id="namespacerapidxml_1memory_allocation">1.4 Memory Allocation</h3><para>RapidXml uses a special memory pool object to allocate nodes and attributes, because direct allocation using <code>new</code> operator would be far too slow. Underlying memory allocations performed by the pool can be customized by use of <a href="#classrapidxml_1_1memory__pool_c0a55a6ef0837dca67572e357100d78a_1c0a55a6ef0837dca67572e357100d78a" kindref="member">memory_pool::set_allocator()</a> function. See class <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> for more information.</para></sect2><sect2><h3 id="namespacerapidxml_1w3c_compliance">1.5 W3C Compliance</h3><para>RapidXml is not a W3C compliant parser, primarily because it ignores DOCTYPE declarations. There is a number of other, minor incompatibilities as well. Still, it can successfully parse and produce complete trees of all valid XML files in W3C conformance suite (over 1000 files specially designed to find flaws in XML processors). In destructive mode it performs whitespace normalization and character entity substitution for a small set of built-in entities.</para></sect2><sect2><h3 id="namespacerapidxml_1api_design">1.6 API Design</h3><para>RapidXml API is minimalistic, to reduce code size as much as possible, and facilitate use in embedded environments. Additional convenience functions are provided in separate headers: <code>rapidxml_utils.hpp</code> and <code><a href="#rapidxml__print_8hpp" kindref="compound">rapidxml_print.hpp</a></code>. Contents of these headers is not an essential part of the library, and is currently not documented (otherwise than with comments in code).</para></sect2><sect2><h3 id="namespacerapidxml_1reliability">1.7 Reliability</h3><para>RapidXml is very robust and comes with a large harness of unit tests. Special care has been taken to ensure stability of the parser no matter what source text is thrown at it. One of the unit tests produces 100,000 randomly corrupted variants of XML document, which (when uncorrupted) contains all constructs recognized by RapidXml. RapidXml passes this test when it correctly recognizes that errors have been introduced, and does not crash or loop indefinitely. <br/><br/>
    + Another unit test puts RapidXml head-to-head with another, well estabilished XML parser, and verifies that their outputs match across a wide variety of small and large documents. <br/><br/>
    + Yet another test feeds RapidXml with over 1000 test files from W3C compliance suite, and verifies that correct results are obtained. There are also additional tests that verify each API function separately, and test that various parsing modes work as expected.</para></sect2><sect2><h3 id="namespacerapidxml_1acknowledgements">1.8 Acknowledgements</h3><para>I would like to thank Arseny Kapoulkine for his work on <a href="http://code.google.com/p/pugixml">pugixml</a>, which was an inspiration for this project. Additional thanks go to Kristen Wegner for creating <a href="http://www.codeproject.com/soap/pugxml.asp">pugxml</a>, from which pugixml was derived. Janusz Wohlfeil kindly ran RapidXml speed tests on hardware that I did not have access to, allowing me to expand performance comparison table.</para></sect2></sect1><sect1><h2 id="namespacerapidxml_1two_minute_tutorial">2. Two Minute Tutorial</h2><sect2><h3 id="namespacerapidxml_1parsing">2.1 Parsing</h3><para>The following code causes RapidXml to parse a zero-terminated string named <code>text</code>: <pre>using namespace rapidxml;
    +xml_document&lt;&gt; doc;    // character type defaults to char
    +doc.parse&lt;0&gt;(text);    // 0 means default parse flags
    +</pre><code>doc</code> object is now a root of DOM tree containing representation of the parsed XML. Because all RapidXml interface is contained inside namespace <code>rapidxml</code>, users must either bring contents of this namespace into scope, or fully qualify all the names. Class <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a> represents a root of the DOM hierarchy. By means of public inheritance, it is also an <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a> and a <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a>. Template parameter of <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function is used to specify parsing flags, with which you can fine-tune behaviour of the parser. Note that flags must be a compile-time constant.</para></sect2><sect2><h3 id="namespacerapidxml_1accessing_dom_tree">2.2 Accessing The DOM Tree</h3><para>To access the DOM tree, use methods of <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a> and <a href="#classrapidxml_1_1xml__attribute" kindref="compound">xml_attribute</a> classes: <pre>cout &lt;&lt; &quot;Name of my first node is: &quot; &lt;&lt; doc.first_node()-&gt;name() &lt;&lt; &quot;\n&quot;;
    +xml_node&lt;&gt; *node = doc.first_node(&quot;foobar&quot;);
    +cout &lt;&lt; &quot;Node foobar has value &quot; &lt;&lt; node-&gt;value() &lt;&lt; &quot;\n&quot;;
    +for (xml_attribute&lt;&gt; *attr = node-&gt;first_attribute();
    +     attr; attr = attr-&gt;next_attribute())
    +{
    +    cout &lt;&lt; &quot;Node foobar has attribute &quot; &lt;&lt; attr-&gt;name() &lt;&lt; &quot; &quot;;
    +    cout &lt;&lt; &quot;with value &quot; &lt;&lt; attr-&gt;value() &lt;&lt; &quot;\n&quot;;
    +}
    +</pre></para></sect2><sect2><h3 id="namespacerapidxml_1modifying_dom_tree">2.3 Modifying The DOM Tree</h3><para>DOM tree produced by the parser is fully modifiable. Nodes and attributes can be added/removed, and their contents changed. The below example creates a HTML document, whose sole contents is a link to google.com website: <pre>xml_document&lt;&gt; doc;
    +xml_node&lt;&gt; *node = doc.allocate_node(node_element, &quot;a&quot;, &quot;Google&quot;);
    +doc.append_node(node);
    +xml_attribute&lt;&gt; *attr = doc.allocate_attribute(&quot;href&quot;, &quot;google.com&quot;);
    +node-&gt;append_attribute(attr);
    +</pre> One quirk is that nodes and attributes <i>do not own</i> the text of their names and values. This is because normally they only store pointers to the source text. So, when assigning a new name or value to the node, care must be taken to ensure proper lifetime of the string. The easiest way to achieve it is to allocate the string from the <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a> memory pool. In the above example this is not necessary, because we are only assigning character constants. But the code below uses <a href="#classrapidxml_1_1memory__pool_69729185bc59b0875192d667c47b8859_169729185bc59b0875192d667c47b8859" kindref="member">memory_pool::allocate_string()</a> function to allocate node name (which will have the same lifetime as the document), and assigns it to a new node: <pre>xml_document&lt;&gt; doc;
    +char *node_name = doc.allocate_string(name);        // Allocate string and copy name into it
    +xml_node&lt;&gt; *node = doc.allocate_node(node_element, node_name);  // Set node name to node_name
    +</pre> Check <a href="#namespacerapidxml_1reference" kindref="member">Reference</a>  section for description of the entire interface.</para></sect2><sect2><h3 id="namespacerapidxml_1printing">2.4 Printing XML</h3><para>You can print <code><a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a></code> and <code><a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a></code> objects into an XML string. Use <a href="#namespacerapidxml_b94d570fc4c4ab2423813cd0243326b1_1b94d570fc4c4ab2423813cd0243326b1" kindref="member">print()</a> function or operator &lt;&lt;, which are defined in <code><a href="#rapidxml__print_8hpp" kindref="compound">rapidxml_print.hpp</a></code> header. <pre>using namespace rapidxml;
    +xml_document&lt;&gt; doc;    // character type defaults to char
    +// ... some code to fill the document
    +
    +// Print to stream using operator &lt;&lt;
    +std::cout &lt;&lt; doc;   
    +
    +// Print to stream using print function, specifying printing flags
    +print(std::cout, doc, 0);   // 0 means default printing flags
    +
    +// Print to string using output iterator
    +std::string s;
    +print(std::back_inserter(s), doc, 0);
    +
    +// Print to memory buffer using output iterator
    +char buffer[4096];                      // You are responsible for making the buffer large enough!
    +char *end = print(buffer, doc, 0);      // end contains pointer to character after last printed character
    +*end = 0;                               // Add string terminator after XML
    +</pre></para></sect2></sect1><sect1><h2 id="namespacerapidxml_1differences">3. Differences From Regular XML Parsers</h2><para>RapidXml is an <i>in-situ parser</i>, which allows it to achieve very high parsing speed. In-situ means that parser does not make copies of strings. Instead, it places pointers to the <i>source text</i> in the DOM hierarchy.</para><sect2><h3 id="namespacerapidxml_1lifetime_of_source_text">3.1 Lifetime Of Source Text</h3><para>In-situ parsing requires that source text lives at least as long as the document object. If source text is destroyed, names and values of nodes in DOM tree will become destroyed as well. Additionally, whitespace processing, character entity translation, and zero-termination of strings require that source text be modified during parsing (but see non-destructive mode). This makes the text useless for further processing once it was parsed by RapidXml. <br/><br/>
    + In many cases however, these are not serious issues.</para></sect2><sect2><h3 id="namespacerapidxml_1ownership_of_strings">3.2 Ownership Of Strings</h3><para>Nodes and attributes produced by RapidXml do not own their name and value strings. They merely hold the pointers to them. This means you have to be careful when setting these values manually, by using <a href="#classrapidxml_1_1xml__base_e099c291e104a0d277307fe71f5e0f9e_1e099c291e104a0d277307fe71f5e0f9e" kindref="member">xml_base::name(const Ch *)</a> or <a href="#classrapidxml_1_1xml__base_18c7469acdca771de9b4f3054053029c_118c7469acdca771de9b4f3054053029c" kindref="member">xml_base::value(const Ch *)</a> functions. Care must be taken to ensure that lifetime of the string passed is at least as long as lifetime of the node/attribute. The easiest way to achieve it is to allocate the string from <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> owned by the document. Use <a href="#classrapidxml_1_1memory__pool_69729185bc59b0875192d667c47b8859_169729185bc59b0875192d667c47b8859" kindref="member">memory_pool::allocate_string()</a> function for this purpose.</para></sect2><sect2><h3 id="namespacerapidxml_1destructive_non_destructive">3.3 Destructive Vs Non-Destructive Mode</h3><para>By default, the parser modifies source text during the parsing process. This is required to achieve character entity translation, whitespace normalization, and zero-termination of strings. <br/><br/>
    + In some cases this behaviour may be undesirable, for example if source text resides in read only memory, or is mapped to memory directly from file. By using appropriate parser flags (parse_non_destructive), source text modifications can be disabled. However, because RapidXml does in-situ parsing, it obviously has the following side-effects:<ul><li><para>no whitespace normalization is done</para></li><li><para>no entity reference translation is done</para></li><li><para>names and values are not zero-terminated, you must use <a href="#classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c" kindref="member">xml_base::name_size()</a> and <a href="#classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db" kindref="member">xml_base::value_size()</a> functions to tell where they end</para></li></ul></para></sect2></sect1><sect1><h2 id="namespacerapidxml_1performance">4. Performance</h2><para>RapidXml achieves its speed through use of several techniques:<ul><li><para>In-situ parsing. When building DOM tree, RapidXml does not make copies of string data, such as node names and values. Instead, it stores pointers to interior of the source text.</para></li><li><para>Use of template metaprogramming techniques. This allows it to move much of the work to compile time. Through magic of the templates, C++ compiler generates a separate copy of parsing code for any combination of parser flags you use. In each copy, all possible decisions are made at compile time and all unused code is omitted.</para></li><li><para>Extensive use of lookup tables for parsing.</para></li><li><para>Hand-tuned C++ with profiling done on several most popular CPUs.</para></li></ul></para><para>This results in a very small and fast code: a parser which is custom tailored to exact needs with each invocation.</para><sect2><h3 id="namespacerapidxml_1performance_charts">4.1 Comparison With Other Parsers</h3><para>The table below compares speed of RapidXml to some other parsers, and to <code>strlen()</code> function executed on the same data. On a modern CPU (as of 2007), you can expect parsing throughput to be close to 1 GB/s. As a rule of thumb, parsing speed is about 50-100x faster than Xerces DOM, 30-60x faster than TinyXml, 3-12x faster than pugxml, and about 5% - 30% faster than pugixml, the fastest XML parser I know of.</para><para><ul><li><para>The test file is a real-world, 50kB large, moderately dense XML file. </para></li><li><para>All timing is done by using RDTSC instruction present in Pentium-compatible CPUs. </para></li><li><para>No profile-guided optimizations are used. </para></li><li><para>All parsers are running in their fastest modes. </para></li><li><para>The results are given in CPU cycles per character, so frequency of CPUs is irrelevant. </para></li><li><para>The results are minimum values from a large number of runs, to minimize effects of operating system activity, task switching, interrupt handling etc. </para></li><li><para>A single parse of the test file takes about 1/10th of a millisecond, so with large number of runs there is a good chance of hitting at least one no-interrupt streak, and obtaining undisturbed results. </para></li></ul><table rows="9" cols="7" border="1" cellpadding="3pt"><tr><th thead="yes"><para><center>Platform</center></para></th><th thead="yes"><para><center>Compiler</center></para></th><th thead="yes"><para>strlen() </para></th><th thead="yes"><para>RapidXml </para></th><th thead="yes"><para>pugixml 0.3 </para></th><th thead="yes"><para>pugxml </para></th><th thead="yes"><para>TinyXml  </para></th></tr><tr><td thead="no"><para><center>Pentium 4</center></para></td><td thead="no"><para><center>MSVC 8.0</center></para></td><td thead="no"><para><center>2.5</center></para></td><td thead="no"><para><center>5.4</center></para></td><td thead="no"><para><center>7.0</center></para></td><td thead="no"><para><center>61.7</center></para></td><td thead="no"><para><center>298.8</center></para></td></tr><tr><td thead="no"><para><center>Pentium 4</center></para></td><td thead="no"><para><center>gcc 4.1.1</center></para></td><td thead="no"><para><center>0.8</center></para></td><td thead="no"><para><center>6.1</center></para></td><td thead="no"><para><center>9.5</center></para></td><td thead="no"><para><center>67.0</center></para></td><td thead="no"><para><center>413.2</center></para></td></tr><tr><td thead="no"><para><center>Core 2</center></para></td><td thead="no"><para><center>MSVC 8.0</center></para></td><td thead="no"><para><center>1.0</center></para></td><td thead="no"><para><center>4.5</center></para></td><td thead="no"><para><center>5.0</center></para></td><td thead="no"><para><center>24.6</center></para></td><td thead="no"><para><center>154.8</center></para></td></tr><tr><td thead="no"><para><center>Core 2</center></para></td><td thead="no"><para><center>gcc 4.1.1</center></para></td><td thead="no"><para><center>0.6</center></para></td><td thead="no"><para><center>4.6</center></para></td><td thead="no"><para><center>5.4</center></para></td><td thead="no"><para><center>28.3</center></para></td><td thead="no"><para><center>229.3</center></para></td></tr><tr><td thead="no"><para><center>Athlon XP</center></para></td><td thead="no"><para><center>MSVC 8.0</center></para></td><td thead="no"><para><center>3.1</center></para></td><td thead="no"><para><center>7.7</center></para></td><td thead="no"><para><center>8.0</center></para></td><td thead="no"><para><center>25.5</center></para></td><td thead="no"><para><center>182.6</center></para></td></tr><tr><td thead="no"><para><center>Athlon XP</center></para></td><td thead="no"><para><center>gcc 4.1.1</center></para></td><td thead="no"><para><center>0.9</center></para></td><td thead="no"><para><center>8.2</center></para></td><td thead="no"><para><center>9.2</center></para></td><td thead="no"><para><center>33.7</center></para></td><td thead="no"><para><center>265.2</center></para></td></tr><tr><td thead="no"><para><center>Pentium 3</center></para></td><td thead="no"><para><center>MSVC 8.0</center></para></td><td thead="no"><para><center>2.0</center></para></td><td thead="no"><para><center>6.3</center></para></td><td thead="no"><para><center>7.0</center></para></td><td thead="no"><para><center>30.9</center></para></td><td thead="no"><para><center>211.9</center></para></td></tr><tr><td thead="no"><para><center>Pentium 3</center></para></td><td thead="no"><para><center>gcc 4.1.1</center></para></td><td thead="no"><para><center>1.0</center></para></td><td thead="no"><para><center>6.7</center></para></td><td thead="no"><para><center>8.9</center></para></td><td thead="no"><para><center>35.3</center></para></td><td thead="no"><para><center>316.0</center></para></td></tr></table><i>(*) All results are in CPU cycles per character of source text</i></para></sect2></sect1><sect1><h2 id="namespacerapidxml_1reference">5. Reference</h2><para>This section lists all classes, functions, constants etc. and describes them in detail. </para></sect1></detaileddescription><dl><dt>class
    +								  template
    +							   <a href="#classrapidxml_1_1memory__pool">rapidxml::memory_pool</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1memory__pool_f8fb3c8f1a564f8045c40bcd07a89866_1f8fb3c8f1a564f8045c40bcd07a89866">memory_pool()</a></dt><dt class="indented">
    +				destructor
    +			 <a href="#classrapidxml_1_1memory__pool_6f8c7990d9ec1ed2acf6558b238570eb_16f8c7990d9ec1ed2acf6558b238570eb">~memory_pool()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_750ba3c610b129ac057d817509d08f41_1750ba3c610b129ac057d817509d08f41">allocate_node(node_type type, const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_462de142669e0ff649e8e615b82bf457_1462de142669e0ff649e8e615b82bf457">allocate_attribute(const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_69729185bc59b0875192d667c47b8859_169729185bc59b0875192d667c47b8859">allocate_string(const Ch *source=0, std::size_t size=0)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_95c49fcb056e9103ec906a59e3e01d76_195c49fcb056e9103ec906a59e3e01d76">clone_node(const xml_node&lt; Ch &gt; *source, xml_node&lt; Ch &gt; *result=0)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_c8bb3912a3ce86b15842e79d0b421204_1c8bb3912a3ce86b15842e79d0b421204">clear()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1memory__pool_c0a55a6ef0837dca67572e357100d78a_1c0a55a6ef0837dca67572e357100d78a">set_allocator(alloc_func *af, free_func *ff)</a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><p/><p/><dt>class <a href="#classrapidxml_1_1parse__error">rapidxml::parse_error</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1parse__error_4dd8d1bdbd9221df4dcb90cafaee3332_14dd8d1bdbd9221df4dcb90cafaee3332">parse_error(const char *what, void *where)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1parse__error_ff06f49065b54a8a86e02e9a2441a8ba_1ff06f49065b54a8a86e02e9a2441a8ba">what() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1parse__error_377be7d201d95221c318682c35377aca_1377be7d201d95221c318682c35377aca">where() const </a></dt><dt class="indented"/><dt class="indented"/><p/><dt>class
    +								  template
    +							   <a href="#classrapidxml_1_1xml__attribute">rapidxml::xml_attribute</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1xml__attribute_d5464aadf08269a886b730993525db34_1d5464aadf08269a886b730993525db34">xml_attribute()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__attribute_77aea7d8d996ba4f6bd61cc478a4e72d_177aea7d8d996ba4f6bd61cc478a4e72d">document() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__attribute_5c4a98d2b75f9b41b12c110108fd55ab_15c4a98d2b75f9b41b12c110108fd55ab">previous_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__attribute_1b8a814d0d3a7165396b08433eee8a91_11b8a814d0d3a7165396b08433eee8a91">next_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><p/><dt>class
    +								  template
    +							   <a href="#classrapidxml_1_1xml__base">rapidxml::xml_base</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1xml__base_23630d2c130a9e0e3f3afa7584a9b218_123630d2c130a9e0e3f3afa7584a9b218">xml_base()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_622eade29fdf7806d3ef93ac4d90e707_1622eade29fdf7806d3ef93ac4d90e707">name() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c">name_size() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_c54fa4987fb503916a7b541eb15c9c7f_1c54fa4987fb503916a7b541eb15c9c7f">value() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db">value_size() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_4e7e23d06d48126c65b1f6266acfba5c_14e7e23d06d48126c65b1f6266acfba5c">name(const Ch *name, std::size_t size)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_e099c291e104a0d277307fe71f5e0f9e_1e099c291e104a0d277307fe71f5e0f9e">name(const Ch *name)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_d9640aa3f5374673cb72a5289b6c91eb_1d9640aa3f5374673cb72a5289b6c91eb">value(const Ch *value, std::size_t size)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_18c7469acdca771de9b4f3054053029c_118c7469acdca771de9b4f3054053029c">value(const Ch *value)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__base_798e8df7ea53ade4d9f0701017dce80e_1798e8df7ea53ade4d9f0701017dce80e">parent() const </a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><p/><dt>class
    +								  template
    +							   <a href="#classrapidxml_1_1xml__document">rapidxml::xml_document</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1xml__document_6ce266cc52d549c42abe3a3d5e8af9ba_16ce266cc52d549c42abe3a3d5e8af9ba">xml_document()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c">parse(Ch *text)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__document_c8bb3912a3ce86b15842e79d0b421204_1c8bb3912a3ce86b15842e79d0b421204">clear()</a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><p/><p/><p/><p/><p/><p/><p/><p/><p/><dt>class
    +								  template
    +							   <a href="#classrapidxml_1_1xml__node">rapidxml::xml_node</a></dt><dt class="indented">
    +				constructor
    +			 <a href="#classrapidxml_1_1xml__node_34c55af3504549a475e5b9dfcaa6adf5_134c55af3504549a475e5b9dfcaa6adf5">xml_node(node_type type)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_975e86937621ae4afe6a423219de30d0_1975e86937621ae4afe6a423219de30d0">type() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_77aea7d8d996ba4f6bd61cc478a4e72d_177aea7d8d996ba4f6bd61cc478a4e72d">document() const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_7823e36687669e59c2afdf66334ef35a_17823e36687669e59c2afdf66334ef35a">first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_fcb6e2209b591a36d2dadba20d2bc7cc_1fcb6e2209b591a36d2dadba20d2bc7cc">last_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_ac2f6886c0107e9d5f156e9542546df6_1ac2f6886c0107e9d5f156e9542546df6">previous_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_b3ead2cefecc03a813836203e3f6f38f_1b3ead2cefecc03a813836203e3f6f38f">next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_5810a09f82f8d53efbe9456286dcec83_15810a09f82f8d53efbe9456286dcec83">first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_16953d66751b5b949ee4ee2d9c0bc63a_116953d66751b5b949ee4ee2d9c0bc63a">last_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const </a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_a78759bfa429fa2ab6bc5fe617cfa3cf_1a78759bfa429fa2ab6bc5fe617cfa3cf">type(node_type type)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_0c39df6617e709eb2fba11300dea63f2_10c39df6617e709eb2fba11300dea63f2">prepend_node(xml_node&lt; Ch &gt; *child)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_86de2e22276826089b7baed2599f8dee_186de2e22276826089b7baed2599f8dee">append_node(xml_node&lt; Ch &gt; *child)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_780972a57fc447250ab47cc8f421b65e_1780972a57fc447250ab47cc8f421b65e">insert_node(xml_node&lt; Ch &gt; *where, xml_node&lt; Ch &gt; *child)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_9a31d861e1bddc710839c551a5d2b3a4_19a31d861e1bddc710839c551a5d2b3a4">remove_first_node()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_87addf2bc127ee31aa4b5295d3c9b530_187addf2bc127ee31aa4b5295d3c9b530">remove_last_node()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_9316463a2201631e7e2062b17729f9cd_19316463a2201631e7e2062b17729f9cd">remove_node(xml_node&lt; Ch &gt; *where)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_0218147d13e41d5fa60ced4e7a7e9726_10218147d13e41d5fa60ced4e7a7e9726">remove_all_nodes()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_f6dffa513da74cc0be71a7ba84f8265e_1f6dffa513da74cc0be71a7ba84f8265e">prepend_attribute(xml_attribute&lt; Ch &gt; *attribute)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_8fbd4f5ef7169d493da9f8d87ac04b77_18fbd4f5ef7169d493da9f8d87ac04b77">append_attribute(xml_attribute&lt; Ch &gt; *attribute)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_070d5888b0557fe06a5b24961de1b988_1070d5888b0557fe06a5b24961de1b988">insert_attribute(xml_attribute&lt; Ch &gt; *where, xml_attribute&lt; Ch &gt; *attribute)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_4eea4a7f6cb484ca9944f7eafe6e1843_14eea4a7f6cb484ca9944f7eafe6e1843">remove_first_attribute()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_37d87c4d5d89fa0cf05b72ee8d4cba3b_137d87c4d5d89fa0cf05b72ee8d4cba3b">remove_last_attribute()</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_c75154db2e768c0e5b541fc8cd0775ab_1c75154db2e768c0e5b541fc8cd0775ab">remove_attribute(xml_attribute&lt; Ch &gt; *where)</a></dt><dt class="indented">function <a href="#classrapidxml_1_1xml__node_59e6ad4cfd5e8096c052e71d79561eda_159e6ad4cfd5e8096c052e71d79561eda">remove_all_attributes()</a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><p/><dt>namespace <a href="#namespacerapidxml">rapidxml</a></dt><dt class="indented">enum <a href="#namespacerapidxml_6a276b85e2da28c5f9c3dbce61c55682_16a276b85e2da28c5f9c3dbce61c55682">node_type</a></dt><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented"/><dt class="indented">function <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1">parse_error_handler(const char *what, void *where)</a></dt><dt class="indented">function <a href="#namespacerapidxml_b94d570fc4c4ab2423813cd0243326b1_1b94d570fc4c4ab2423813cd0243326b1">print(OutIt out, const xml_node&lt; Ch &gt; &amp;node, int flags=0)</a></dt><dt class="indented">function <a href="#namespacerapidxml_13bc37d6d1047acb0efdbc1689221a5e_113bc37d6d1047acb0efdbc1689221a5e">print(std::basic_ostream&lt; Ch &gt; &amp;out, const xml_node&lt; Ch &gt; &amp;node, int flags=0)</a></dt><dt class="indented">function <a href="#namespacerapidxml_5619b38000d967fb223b2b0a8c17463a_15619b38000d967fb223b2b0a8c17463a">operator&lt;&lt;(std::basic_ostream&lt; Ch &gt; &amp;out, const xml_node&lt; Ch &gt; &amp;node)</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_87e8bbab53702cf3b438bd553c10b6b9_187e8bbab53702cf3b438bd553c10b6b9">parse_no_data_nodes</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_97e2c4fdc04fae17126f9971a4fc993e_197e2c4fdc04fae17126f9971a4fc993e">parse_no_element_values</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_9cae3801e70437cbc410c24bf6be691c_19cae3801e70437cbc410c24bf6be691c">parse_no_string_terminators</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_7223b7815c4fb8b42e6e4e77e1ea6b97_17223b7815c4fb8b42e6e4e77e1ea6b97">parse_no_entity_translation</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_ccde57f6054857ee4042a1b4d98c83b9_1ccde57f6054857ee4042a1b4d98c83b9">parse_no_utf8</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_52e2c934ad9c845a5f4cc49570470556_152e2c934ad9c845a5f4cc49570470556">parse_declaration_node</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_0f7479dacbc868456d07897a8c072784_10f7479dacbc868456d07897a8c072784">parse_comment_nodes</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_8e187746ba1ca04f107951ad32df962e_18e187746ba1ca04f107951ad32df962e">parse_doctype_node</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_1c20b2b2b75711cd76423e119c49f830_11c20b2b2b75711cd76423e119c49f830">parse_pi_nodes</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_a5daff9d61c7d4eaf98e4d42efe628ee_1a5daff9d61c7d4eaf98e4d42efe628ee">parse_validate_closing_tags</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_ac1f06b1afd47b812732fb521b146fd9_1ac1f06b1afd47b812732fb521b146fd9">parse_trim_whitespace</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_88f95d4e275ba01408fefde83078651b_188f95d4e275ba01408fefde83078651b">parse_normalize_whitespace</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_45751cf2f38fd6915f35b3122b46d5b6_145751cf2f38fd6915f35b3122b46d5b6">parse_default</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_a97ba1a0a79a6d66f4eef3612508d943_1a97ba1a0a79a6d66f4eef3612508d943">parse_non_destructive</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_398c5476e76102f8bd76c10bb0abbe10_1398c5476e76102f8bd76c10bb0abbe10">parse_fastest</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_b4f2515265facb42291570307924bd57_1b4f2515265facb42291570307924bd57">parse_full</a></dt><dt class="indented">
    +				constant
    +			 <a href="#namespacerapidxml_b08b8d4293c203b69ed6c5ae77ac1907_1b08b8d4293c203b69ed6c5ae77ac1907">print_no_indenting</a></dt><p/><p/><p/><p/></dl><hr/><h3 class="reference-header" id="classrapidxml_1_1memory__pool">class
    +									  template
    +								   rapidxml::memory_pool</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/>
    +								  Base class for
    +								  <a href="#classrapidxml_1_1xml__document">xml_document</a> <h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation. In most cases, you will not need to use this class directly. However, if you need to create nodes manually or modify names/values of nodes, you are encouraged to use <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> of relevant <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a> to allocate the memory. Not only is this faster than allocating them by using <code>new</code> operator, but also their lifetime will be tied to the lifetime of document, possibly simplyfing memory management. <br/><br/>
    + Call <a href="#classrapidxml_1_1memory__pool_750ba3c610b129ac057d817509d08f41_1750ba3c610b129ac057d817509d08f41" kindref="member">allocate_node()</a> or <a href="#classrapidxml_1_1memory__pool_462de142669e0ff649e8e615b82bf457_1462de142669e0ff649e8e615b82bf457" kindref="member">allocate_attribute()</a> functions to obtain new nodes or attributes from the pool. You can also call <a href="#classrapidxml_1_1memory__pool_69729185bc59b0875192d667c47b8859_169729185bc59b0875192d667c47b8859" kindref="member">allocate_string()</a> function to allocate strings. Such strings can then be used as names or values of nodes without worrying about their lifetime. Note that there is no <code>free()</code> function -- all allocations are freed at once when <a href="#classrapidxml_1_1memory__pool_c8bb3912a3ce86b15842e79d0b421204_1c8bb3912a3ce86b15842e79d0b421204" kindref="member">clear()</a> function is called, or when the pool is destroyed. <br/><br/>
    + It is also possible to create a standalone <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a>, and use it to allocate nodes, whose lifetime will not be tied to any document. <br/><br/>
    + Pool maintains <code>RAPIDXML_STATIC_POOL_SIZE</code> bytes of statically allocated memory. Until static memory is exhausted, no dynamic memory allocations are done. When static memory is exhausted, pool allocates additional blocks of memory of size <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> each, by using global <code>new[]</code> and <code>delete[]</code> operators. This behaviour can be changed by setting custom allocation routines. Use <a href="#classrapidxml_1_1memory__pool_c0a55a6ef0837dca67572e357100d78a_1c0a55a6ef0837dca67572e357100d78a" kindref="member">set_allocator()</a> function to set them. <br/><br/>
    + Allocations for nodes, attributes and strings are aligned at <code>RAPIDXML_ALIGNMENT</code> bytes. This value defaults to the size of pointer on target architecture. <br/><br/>
    + To obtain absolutely top performance from the parser, it is important that all nodes are allocated from a single, contiguous block of memory. Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably. If required, you can tweak <code>RAPIDXML_STATIC_POOL_SIZE</code>, <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> and <code>RAPIDXML_ALIGNMENT</code> to obtain best wasted memory to performance compromise. To do it, define their values before <a href="#rapidxml_8hpp" kindref="compound">rapidxml.hpp</a> file is included. </para><h4>Parameters</h4><dl><dt class="parameter-name">Ch</dt><dd>Character type of created nodes. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_f8fb3c8f1a564f8045c40bcd07a89866_1f8fb3c8f1a564f8045c40bcd07a89866">
    +				constructor
    +			 memory_pool::memory_pool</h3><h4>Synopsis</h4><code class="synopsis">memory_pool();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Constructs empty pool with default allocator functions. </para><p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_6f8c7990d9ec1ed2acf6558b238570eb_16f8c7990d9ec1ed2acf6558b238570eb">
    +				destructor
    +			 memory_pool::~memory_pool</h3><h4>Synopsis</h4><code class="synopsis">~memory_pool();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Destroys pool and frees all the memory. This causes memory occupied by nodes allocated by the pool to be freed. Nodes allocated from the pool are no longer valid. </para><p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_750ba3c610b129ac057d817509d08f41_1750ba3c610b129ac057d817509d08f41">function memory_pool::allocate_node</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* allocate_node(node_type type, const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Allocates a new node from the pool, and optionally assigns name and value to it. If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>. If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function will call <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1" kindref="member">rapidxml::parse_error_handler()</a> function. </para><h4>Parameters</h4><dl><dt class="parameter-name">type</dt><dd class="parameter-def">Type of node to create. </dd></dl><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name to assign to the node, or 0 to assign no name. </dd></dl><dl><dt class="parameter-name">value</dt><dd class="parameter-def">Value to assign to the node, or 0 to assign no value. </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name to assign, or 0 to automatically calculate size from name string. </dd></dl><dl><dt class="parameter-name">value_size</dt><dd class="parameter-def">Size of value to assign, or 0 to automatically calculate size from value string. </dd></dl><h4>Returns</h4>Pointer to allocated node. This pointer will never be NULL. <p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_462de142669e0ff649e8e615b82bf457_1462de142669e0ff649e8e615b82bf457">function memory_pool::allocate_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute&lt;Ch&gt;* allocate_attribute(const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Allocates a new attribute from the pool, and optionally assigns name and value to it. If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>. If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function will call <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1" kindref="member">rapidxml::parse_error_handler()</a> function. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name to assign to the attribute, or 0 to assign no name. </dd></dl><dl><dt class="parameter-name">value</dt><dd class="parameter-def">Value to assign to the attribute, or 0 to assign no value. </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name to assign, or 0 to automatically calculate size from name string. </dd></dl><dl><dt class="parameter-name">value_size</dt><dd class="parameter-def">Size of value to assign, or 0 to automatically calculate size from value string. </dd></dl><h4>Returns</h4>Pointer to allocated attribute. This pointer will never be NULL. <p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_69729185bc59b0875192d667c47b8859_169729185bc59b0875192d667c47b8859">function memory_pool::allocate_string</h3><h4>Synopsis</h4><code class="synopsis">Ch* allocate_string(const Ch *source=0, std::size_t size=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Allocates a char array of given size from the pool, and optionally copies a given string to it. If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>. If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function will call <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1" kindref="member">rapidxml::parse_error_handler()</a> function. </para><h4>Parameters</h4><dl><dt class="parameter-name">source</dt><dd class="parameter-def">String to initialize the allocated memory with, or 0 to not initialize it. </dd></dl><dl><dt class="parameter-name">size</dt><dd class="parameter-def">Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated. </dd></dl><h4>Returns</h4>Pointer to allocated char array. This pointer will never be NULL. <p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_95c49fcb056e9103ec906a59e3e01d76_195c49fcb056e9103ec906a59e3e01d76">function memory_pool::clone_node</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* clone_node(const xml_node&lt; Ch &gt; *source, xml_node&lt; Ch &gt; *result=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clones an <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a> and its hierarchy of child nodes and attributes. Nodes and attributes are allocated from this memory pool. Names and values are not cloned, they are shared between the clone and the source. Result node can be optionally specified as a second parameter, in which case its contents will be replaced with cloned source node. This is useful when you want to clone entire document. </para><h4>Parameters</h4><dl><dt class="parameter-name">source</dt><dd class="parameter-def">Node to clone. </dd></dl><dl><dt class="parameter-name">result</dt><dd class="parameter-def">Node to put results in, or 0 to automatically allocate result node </dd></dl><h4>Returns</h4>Pointer to cloned node. This pointer will never be NULL. <p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_c8bb3912a3ce86b15842e79d0b421204_1c8bb3912a3ce86b15842e79d0b421204">function memory_pool::clear</h3><h4>Synopsis</h4><code class="synopsis">void clear();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clears the pool. This causes memory occupied by nodes allocated by the pool to be freed. Any nodes or strings allocated from the pool will no longer be valid. </para><p/><h3 class="reference-header" id="classrapidxml_1_1memory__pool_c0a55a6ef0837dca67572e357100d78a_1c0a55a6ef0837dca67572e357100d78a">function memory_pool::set_allocator</h3><h4>Synopsis</h4><code class="synopsis">void set_allocator(alloc_func *af, free_func *ff);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets or resets the user-defined memory allocation functions for the pool. This can only be called when no memory is allocated from the pool yet, otherwise results are undefined. Allocation function must not return invalid pointer on failure. It should either throw, stop the program, or use <code>longjmp()</code> function to pass control to other place of program. If it returns invalid pointer, results are undefined. <br/><br/>
    + User defined allocation functions must have the following forms: <br/><code><br/>
    +void *allocate(std::size_t size); <br/>
    +void free(void *pointer); </code><br/></para><h4>Parameters</h4><dl><dt class="parameter-name">af</dt><dd class="parameter-def">Allocation function, or 0 to restore default function </dd></dl><dl><dt class="parameter-name">ff</dt><dd class="parameter-def">Free function, or 0 to restore default function </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1parse__error">class rapidxml::parse_error</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse error exception. This exception is thrown by the parser when an error occurs. Use <a href="#classrapidxml_1_1parse__error_ff06f49065b54a8a86e02e9a2441a8ba_1ff06f49065b54a8a86e02e9a2441a8ba" kindref="member">what()</a> function to get human-readable error message. Use <a href="#classrapidxml_1_1parse__error_377be7d201d95221c318682c35377aca_1377be7d201d95221c318682c35377aca" kindref="member">where()</a> function to get a pointer to position within source text where error was detected. <br/><br/>
    + If throwing exceptions by the parser is undesirable, it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before <a href="#rapidxml_8hpp" kindref="compound">rapidxml.hpp</a> is included. This will cause the parser to call <a href="#namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1" kindref="member">rapidxml::parse_error_handler()</a> function instead of throwing an exception. This function must be defined by the user. <br/><br/>
    + This class derives from <code>std::exception</code> class. </para><p/><h3 class="reference-header" id="classrapidxml_1_1parse__error_4dd8d1bdbd9221df4dcb90cafaee3332_14dd8d1bdbd9221df4dcb90cafaee3332">
    +				constructor
    +			 parse_error::parse_error</h3><h4>Synopsis</h4><code class="synopsis">parse_error(const char *what, void *where);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Constructs parse error. </para><p/><h3 class="reference-header" id="classrapidxml_1_1parse__error_ff06f49065b54a8a86e02e9a2441a8ba_1ff06f49065b54a8a86e02e9a2441a8ba">function parse_error::what</h3><h4>Synopsis</h4><code class="synopsis">virtual const char* what() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets human readable description of error. </para><h4>Returns</h4>Pointer to null terminated description of the error. <p/><h3 class="reference-header" id="classrapidxml_1_1parse__error_377be7d201d95221c318682c35377aca_1377be7d201d95221c318682c35377aca">function parse_error::where</h3><h4>Synopsis</h4><code class="synopsis">Ch* where() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets pointer to character data where error happened. Ch should be the same as char type of <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a> that produced the error. </para><h4>Returns</h4>Pointer to location within the parsed string where error occured. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__attribute">class
    +									  template
    +								   rapidxml::xml_attribute</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/>
    +								  Inherits from
    +								  <a href="#classrapidxml_1_1xml__base">xml_base</a> <br/><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Class representing attribute node of XML document. Each attribute has name and value strings, which are available through <a href="#classrapidxml_1_1xml__base_622eade29fdf7806d3ef93ac4d90e707_1622eade29fdf7806d3ef93ac4d90e707" kindref="member">name()</a> and <a href="#classrapidxml_1_1xml__base_c54fa4987fb503916a7b541eb15c9c7f_1c54fa4987fb503916a7b541eb15c9c7f" kindref="member">value()</a> functions (inherited from <a href="#classrapidxml_1_1xml__base" kindref="compound">xml_base</a>). Note that after parse, both name and value of attribute will point to interior of source text used for parsing. Thus, this text must persist in memory for the lifetime of attribute. </para><h4>Parameters</h4><dl><dt class="parameter-name">Ch</dt><dd>Character type to use. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__attribute_d5464aadf08269a886b730993525db34_1d5464aadf08269a886b730993525db34">
    +				constructor
    +			 xml_attribute::xml_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Constructs an empty attribute with the specified type. Consider using <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> of appropriate <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a> if allocating attributes manually. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__attribute_77aea7d8d996ba4f6bd61cc478a4e72d_177aea7d8d996ba4f6bd61cc478a4e72d">function xml_attribute::document</h3><h4>Synopsis</h4><code class="synopsis">xml_document&lt;Ch&gt;* document() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets document of which attribute is a child. </para><h4>Returns</h4>Pointer to document that contains this attribute, or 0 if there is no parent document. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__attribute_5c4a98d2b75f9b41b12c110108fd55ab_15c4a98d2b75f9b41b12c110108fd55ab">function xml_attribute::previous_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute&lt;Ch&gt;* previous_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets previous attribute, optionally matching attribute name. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found attribute, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__attribute_1b8a814d0d3a7165396b08433eee8a91_11b8a814d0d3a7165396b08433eee8a91">function xml_attribute::next_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute&lt;Ch&gt;* next_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets next attribute, optionally matching attribute name. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found attribute, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__base">class
    +									  template
    +								   rapidxml::xml_base</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/>
    +								  Base class for
    +								  <a href="#classrapidxml_1_1xml__attribute">xml_attribute</a> <a href="#classrapidxml_1_1xml__node">xml_node</a> <h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Base class for <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a> and <a href="#classrapidxml_1_1xml__attribute" kindref="compound">xml_attribute</a> implementing common functions: <a href="#classrapidxml_1_1xml__base_622eade29fdf7806d3ef93ac4d90e707_1622eade29fdf7806d3ef93ac4d90e707" kindref="member">name()</a>, <a href="#classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c" kindref="member">name_size()</a>, <a href="#classrapidxml_1_1xml__base_c54fa4987fb503916a7b541eb15c9c7f_1c54fa4987fb503916a7b541eb15c9c7f" kindref="member">value()</a>, <a href="#classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db" kindref="member">value_size()</a> and <a href="#classrapidxml_1_1xml__base_798e8df7ea53ade4d9f0701017dce80e_1798e8df7ea53ade4d9f0701017dce80e" kindref="member">parent()</a>. </para><h4>Parameters</h4><dl><dt class="parameter-name">Ch</dt><dd>Character type to use </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_23630d2c130a9e0e3f3afa7584a9b218_123630d2c130a9e0e3f3afa7584a9b218">
    +				constructor
    +			 xml_base::xml_base</h3><h4>Synopsis</h4><code class="synopsis">xml_base();
    +									  </code><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_622eade29fdf7806d3ef93ac4d90e707_1622eade29fdf7806d3ef93ac4d90e707">function xml_base::name</h3><h4>Synopsis</h4><code class="synopsis">Ch* name() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets name of the node. Interpretation of name depends on type of node. Note that name will not be zero-terminated if <a href="#namespacerapidxml_9cae3801e70437cbc410c24bf6be691c_19cae3801e70437cbc410c24bf6be691c" kindref="member">rapidxml::parse_no_string_terminators</a> option was selected during parse. <br/><br/>
    + Use <a href="#classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c" kindref="member">name_size()</a> function to determine length of the name. </para><h4>Returns</h4>Name of node, or empty string if node has no name. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c">function xml_base::name_size</h3><h4>Synopsis</h4><code class="synopsis">std::size_t name_size() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets size of node name, not including terminator character. This function works correctly irrespective of whether name is or is not zero terminated. </para><h4>Returns</h4>Size of node name, in characters. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_c54fa4987fb503916a7b541eb15c9c7f_1c54fa4987fb503916a7b541eb15c9c7f">function xml_base::value</h3><h4>Synopsis</h4><code class="synopsis">Ch* value() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets value of node. Interpretation of value depends on type of node. Note that value will not be zero-terminated if <a href="#namespacerapidxml_9cae3801e70437cbc410c24bf6be691c_19cae3801e70437cbc410c24bf6be691c" kindref="member">rapidxml::parse_no_string_terminators</a> option was selected during parse. <br/><br/>
    + Use <a href="#classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db" kindref="member">value_size()</a> function to determine length of the value. </para><h4>Returns</h4>Value of node, or empty string if node has no value. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db">function xml_base::value_size</h3><h4>Synopsis</h4><code class="synopsis">std::size_t value_size() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets size of node value, not including terminator character. This function works correctly irrespective of whether value is or is not zero terminated. </para><h4>Returns</h4>Size of node value, in characters. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_4e7e23d06d48126c65b1f6266acfba5c_14e7e23d06d48126c65b1f6266acfba5c">function xml_base::name</h3><h4>Synopsis</h4><code class="synopsis">void name(const Ch *name, std::size_t size);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets name of node to a non zero-terminated string. See <a href="#namespacerapidxml_1ownership_of_strings" kindref="member">Ownership Of Strings</a> . <br/><br/>
    + Note that node does not own its name or value, it only stores a pointer to it. It will not delete or otherwise free the pointer on destruction. It is reponsibility of the user to properly manage lifetime of the string. The easiest way to achieve it is to use <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> of the document to allocate the string - on destruction of the document the string will be automatically freed. <br/><br/>
    + Size of name must be specified separately, because name does not have to be zero terminated. Use <a href="#classrapidxml_1_1xml__base_e099c291e104a0d277307fe71f5e0f9e_1e099c291e104a0d277307fe71f5e0f9e" kindref="member">name(const Ch *)</a> function to have the length automatically calculated (string must be zero terminated). </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of node to set. Does not have to be zero terminated. </dd></dl><dl><dt class="parameter-name">size</dt><dd class="parameter-def">Size of name, in characters. This does not include zero terminator, if one is present. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_e099c291e104a0d277307fe71f5e0f9e_1e099c291e104a0d277307fe71f5e0f9e">function xml_base::name</h3><h4>Synopsis</h4><code class="synopsis">void name(const Ch *name);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets name of node to a zero-terminated string. See also <a href="#namespacerapidxml_1ownership_of_strings" kindref="member">Ownership Of Strings</a>  and <a href="#classrapidxml_1_1xml__base_4e7e23d06d48126c65b1f6266acfba5c_14e7e23d06d48126c65b1f6266acfba5c" kindref="member">xml_node::name(const Ch *, std::size_t)</a>. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of node to set. Must be zero terminated. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_d9640aa3f5374673cb72a5289b6c91eb_1d9640aa3f5374673cb72a5289b6c91eb">function xml_base::value</h3><h4>Synopsis</h4><code class="synopsis">void value(const Ch *value, std::size_t size);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets value of node to a non zero-terminated string. See <a href="#namespacerapidxml_1ownership_of_strings" kindref="member">Ownership Of Strings</a> . <br/><br/>
    + Note that node does not own its name or value, it only stores a pointer to it. It will not delete or otherwise free the pointer on destruction. It is reponsibility of the user to properly manage lifetime of the string. The easiest way to achieve it is to use <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> of the document to allocate the string - on destruction of the document the string will be automatically freed. <br/><br/>
    + Size of value must be specified separately, because it does not have to be zero terminated. Use <a href="#classrapidxml_1_1xml__base_18c7469acdca771de9b4f3054053029c_118c7469acdca771de9b4f3054053029c" kindref="member">value(const Ch *)</a> function to have the length automatically calculated (string must be zero terminated). <br/><br/>
    + If an element has a child node of type node_data, it will take precedence over element value when printing. If you want to manipulate data of elements using values, use parser flag <a href="#namespacerapidxml_87e8bbab53702cf3b438bd553c10b6b9_187e8bbab53702cf3b438bd553c10b6b9" kindref="member">rapidxml::parse_no_data_nodes</a> to prevent creation of data nodes by the parser. </para><h4>Parameters</h4><dl><dt class="parameter-name">value</dt><dd class="parameter-def">value of node to set. Does not have to be zero terminated. </dd></dl><dl><dt class="parameter-name">size</dt><dd class="parameter-def">Size of value, in characters. This does not include zero terminator, if one is present. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_18c7469acdca771de9b4f3054053029c_118c7469acdca771de9b4f3054053029c">function xml_base::value</h3><h4>Synopsis</h4><code class="synopsis">void value(const Ch *value);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets value of node to a zero-terminated string. See also <a href="#namespacerapidxml_1ownership_of_strings" kindref="member">Ownership Of Strings</a>  and <a href="#classrapidxml_1_1xml__base_d9640aa3f5374673cb72a5289b6c91eb_1d9640aa3f5374673cb72a5289b6c91eb" kindref="member">xml_node::value(const Ch *, std::size_t)</a>. </para><h4>Parameters</h4><dl><dt class="parameter-name">value</dt><dd class="parameter-def">Vame of node to set. Must be zero terminated. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__base_798e8df7ea53ade4d9f0701017dce80e_1798e8df7ea53ade4d9f0701017dce80e">function xml_base::parent</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* parent() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets node parent. </para><h4>Returns</h4>Pointer to parent node, or 0 if there is no parent. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__document">class
    +									  template
    +								   rapidxml::xml_document</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/>
    +								  Inherits from
    +								  <a href="#classrapidxml_1_1xml__node">xml_node</a> <a href="#classrapidxml_1_1memory__pool">memory_pool</a> <br/><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">This class represents root of the DOM hierarchy. It is also an <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a> and a <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> through public inheritance. Use <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">parse()</a> function to build a DOM tree from a zero-terminated XML text string. <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">parse()</a> function allocates memory for nodes and attributes by using functions of <a href="#classrapidxml_1_1xml__document" kindref="compound">xml_document</a>, which are inherited from <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a>. To access root node of the document, use the document itself, as if it was an <a href="#classrapidxml_1_1xml__node" kindref="compound">xml_node</a>. </para><h4>Parameters</h4><dl><dt class="parameter-name">Ch</dt><dd>Character type to use. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__document_6ce266cc52d549c42abe3a3d5e8af9ba_16ce266cc52d549c42abe3a3d5e8af9ba">
    +				constructor
    +			 xml_document::xml_document</h3><h4>Synopsis</h4><code class="synopsis">xml_document();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Constructs empty XML document. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c">function xml_document::parse</h3><h4>Synopsis</h4><code class="synopsis">void parse(Ch *text);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parses zero-terminated XML string according to given flags. Passed string will be modified by the parser, unless <a href="#namespacerapidxml_a97ba1a0a79a6d66f4eef3612508d943_1a97ba1a0a79a6d66f4eef3612508d943" kindref="member">rapidxml::parse_non_destructive</a> flag is used. The string must persist for the lifetime of the document. In case of error, <a href="#classrapidxml_1_1parse__error" kindref="compound">rapidxml::parse_error</a> exception will be thrown. <br/><br/>
    + If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. Make sure that data is zero-terminated. <br/><br/>
    + Document can be parsed into multiple times. Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. </para><h4>Parameters</h4><dl><dt class="parameter-name">text</dt><dd class="parameter-def">XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__document_c8bb3912a3ce86b15842e79d0b421204_1c8bb3912a3ce86b15842e79d0b421204">function xml_document::clear</h3><h4>Synopsis</h4><code class="synopsis">void clear();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clears the document by deleting all nodes and clearing the memory pool. All nodes owned by document pool are destroyed. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node">class
    +									  template
    +								   rapidxml::xml_node</h3>
    +
    +							  Defined in <a href="rapidxml.hpp">rapidxml.hpp</a><br/>
    +								  Inherits from
    +								  <a href="#classrapidxml_1_1xml__base">xml_base</a> <br/>
    +								  Base class for
    +								  <a href="#classrapidxml_1_1xml__document">xml_document</a> <h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Class representing a node of XML document. Each node may have associated name and value strings, which are available through <a href="#classrapidxml_1_1xml__base_622eade29fdf7806d3ef93ac4d90e707_1622eade29fdf7806d3ef93ac4d90e707" kindref="member">name()</a> and <a href="#classrapidxml_1_1xml__base_c54fa4987fb503916a7b541eb15c9c7f_1c54fa4987fb503916a7b541eb15c9c7f" kindref="member">value()</a> functions. Interpretation of name and value depends on type of the node. Type of node can be determined by using <a href="#classrapidxml_1_1xml__node_975e86937621ae4afe6a423219de30d0_1975e86937621ae4afe6a423219de30d0" kindref="member">type()</a> function. <br/><br/>
    + Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. Thus, this text must persist in the memory for the lifetime of node. </para><h4>Parameters</h4><dl><dt class="parameter-name">Ch</dt><dd>Character type to use. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_34c55af3504549a475e5b9dfcaa6adf5_134c55af3504549a475e5b9dfcaa6adf5">
    +				constructor
    +			 xml_node::xml_node</h3><h4>Synopsis</h4><code class="synopsis">xml_node(node_type type);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Constructs an empty node with the specified type. Consider using <a href="#classrapidxml_1_1memory__pool" kindref="compound">memory_pool</a> of appropriate document to allocate nodes manually. </para><h4>Parameters</h4><dl><dt class="parameter-name">type</dt><dd class="parameter-def">Type of node to construct. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_975e86937621ae4afe6a423219de30d0_1975e86937621ae4afe6a423219de30d0">function xml_node::type</h3><h4>Synopsis</h4><code class="synopsis">node_type type() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets type of node. </para><h4>Returns</h4>Type of node. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_77aea7d8d996ba4f6bd61cc478a4e72d_177aea7d8d996ba4f6bd61cc478a4e72d">function xml_node::document</h3><h4>Synopsis</h4><code class="synopsis">xml_document&lt;Ch&gt;* document() const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets document of which node is a child. </para><h4>Returns</h4>Pointer to document that contains this node, or 0 if there is no parent document. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_7823e36687669e59c2afdf66334ef35a_17823e36687669e59c2afdf66334ef35a">function xml_node::first_node</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets first child node, optionally matching node name. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of child to find, or 0 to return first child regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found child, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_fcb6e2209b591a36d2dadba20d2bc7cc_1fcb6e2209b591a36d2dadba20d2bc7cc">function xml_node::last_node</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* last_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets last child node, optionally matching node name. Behaviour is undefined if node has no children. Use <a href="#classrapidxml_1_1xml__node_7823e36687669e59c2afdf66334ef35a_17823e36687669e59c2afdf66334ef35a" kindref="member">first_node()</a> to test if node has children. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of child to find, or 0 to return last child regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found child, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_ac2f6886c0107e9d5f156e9542546df6_1ac2f6886c0107e9d5f156e9542546df6">function xml_node::previous_sibling</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* previous_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets previous sibling node, optionally matching node name. Behaviour is undefined if node has no parent. Use <a href="#classrapidxml_1_1xml__base_798e8df7ea53ade4d9f0701017dce80e_1798e8df7ea53ade4d9f0701017dce80e" kindref="member">parent()</a> to test if node has a parent. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found sibling, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_b3ead2cefecc03a813836203e3f6f38f_1b3ead2cefecc03a813836203e3f6f38f">function xml_node::next_sibling</h3><h4>Synopsis</h4><code class="synopsis">xml_node&lt;Ch&gt;* next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets next sibling node, optionally matching node name. Behaviour is undefined if node has no parent. Use <a href="#classrapidxml_1_1xml__base_798e8df7ea53ade4d9f0701017dce80e_1798e8df7ea53ade4d9f0701017dce80e" kindref="member">parent()</a> to test if node has a parent. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found sibling, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_5810a09f82f8d53efbe9456286dcec83_15810a09f82f8d53efbe9456286dcec83">function xml_node::first_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute&lt;Ch&gt;* first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets first attribute of node, optionally matching attribute name. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found attribute, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_16953d66751b5b949ee4ee2d9c0bc63a_116953d66751b5b949ee4ee2d9c0bc63a">function xml_node::last_attribute</h3><h4>Synopsis</h4><code class="synopsis">xml_attribute&lt;Ch&gt;* last_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Gets last attribute of node, optionally matching attribute name. </para><h4>Parameters</h4><dl><dt class="parameter-name">name</dt><dd class="parameter-def">Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn&apos;t have to be zero-terminated if name_size is non-zero </dd></dl><dl><dt class="parameter-name">name_size</dt><dd class="parameter-def">Size of name, in characters, or 0 to have size calculated automatically from string </dd></dl><dl><dt class="parameter-name">case_sensitive</dt><dd class="parameter-def">Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters </dd></dl><h4>Returns</h4>Pointer to found attribute, or 0 if not found. <p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_a78759bfa429fa2ab6bc5fe617cfa3cf_1a78759bfa429fa2ab6bc5fe617cfa3cf">function xml_node::type</h3><h4>Synopsis</h4><code class="synopsis">void type(node_type type);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Sets type of node. </para><h4>Parameters</h4><dl><dt class="parameter-name">type</dt><dd class="parameter-def">Type of node to set. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_0c39df6617e709eb2fba11300dea63f2_10c39df6617e709eb2fba11300dea63f2">function xml_node::prepend_node</h3><h4>Synopsis</h4><code class="synopsis">void prepend_node(xml_node&lt; Ch &gt; *child);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Prepends a new child node. The prepended child becomes the first child, and all existing children are moved one position back. </para><h4>Parameters</h4><dl><dt class="parameter-name">child</dt><dd class="parameter-def">Node to prepend. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_86de2e22276826089b7baed2599f8dee_186de2e22276826089b7baed2599f8dee">function xml_node::append_node</h3><h4>Synopsis</h4><code class="synopsis">void append_node(xml_node&lt; Ch &gt; *child);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Appends a new child node. The appended child becomes the last child. </para><h4>Parameters</h4><dl><dt class="parameter-name">child</dt><dd class="parameter-def">Node to append. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_780972a57fc447250ab47cc8f421b65e_1780972a57fc447250ab47cc8f421b65e">function xml_node::insert_node</h3><h4>Synopsis</h4><code class="synopsis">void insert_node(xml_node&lt; Ch &gt; *where, xml_node&lt; Ch &gt; *child);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Inserts a new child node at specified place inside the node. All children after and including the specified node are moved one position back. </para><h4>Parameters</h4><dl><dt class="parameter-name">where</dt><dd class="parameter-def">Place where to insert the child, or 0 to insert at the back. </dd></dl><dl><dt class="parameter-name">child</dt><dd class="parameter-def">Node to insert. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_9a31d861e1bddc710839c551a5d2b3a4_19a31d861e1bddc710839c551a5d2b3a4">function xml_node::remove_first_node</h3><h4>Synopsis</h4><code class="synopsis">void remove_first_node();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes first child node. If node has no children, behaviour is undefined. Use <a href="#classrapidxml_1_1xml__node_7823e36687669e59c2afdf66334ef35a_17823e36687669e59c2afdf66334ef35a" kindref="member">first_node()</a> to test if node has children. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_87addf2bc127ee31aa4b5295d3c9b530_187addf2bc127ee31aa4b5295d3c9b530">function xml_node::remove_last_node</h3><h4>Synopsis</h4><code class="synopsis">void remove_last_node();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes last child of the node. If node has no children, behaviour is undefined. Use <a href="#classrapidxml_1_1xml__node_7823e36687669e59c2afdf66334ef35a_17823e36687669e59c2afdf66334ef35a" kindref="member">first_node()</a> to test if node has children. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_9316463a2201631e7e2062b17729f9cd_19316463a2201631e7e2062b17729f9cd">function xml_node::remove_node</h3><h4>Synopsis</h4><code class="synopsis">void remove_node(xml_node&lt; Ch &gt; *where);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes specified child from the node. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_0218147d13e41d5fa60ced4e7a7e9726_10218147d13e41d5fa60ced4e7a7e9726">function xml_node::remove_all_nodes</h3><h4>Synopsis</h4><code class="synopsis">void remove_all_nodes();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes all child nodes (but not attributes). </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_f6dffa513da74cc0be71a7ba84f8265e_1f6dffa513da74cc0be71a7ba84f8265e">function xml_node::prepend_attribute</h3><h4>Synopsis</h4><code class="synopsis">void prepend_attribute(xml_attribute&lt; Ch &gt; *attribute);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Prepends a new attribute to the node. </para><h4>Parameters</h4><dl><dt class="parameter-name">attribute</dt><dd class="parameter-def">Attribute to prepend. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_8fbd4f5ef7169d493da9f8d87ac04b77_18fbd4f5ef7169d493da9f8d87ac04b77">function xml_node::append_attribute</h3><h4>Synopsis</h4><code class="synopsis">void append_attribute(xml_attribute&lt; Ch &gt; *attribute);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Appends a new attribute to the node. </para><h4>Parameters</h4><dl><dt class="parameter-name">attribute</dt><dd class="parameter-def">Attribute to append. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_070d5888b0557fe06a5b24961de1b988_1070d5888b0557fe06a5b24961de1b988">function xml_node::insert_attribute</h3><h4>Synopsis</h4><code class="synopsis">void insert_attribute(xml_attribute&lt; Ch &gt; *where, xml_attribute&lt; Ch &gt; *attribute);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Inserts a new attribute at specified place inside the node. All attributes after and including the specified attribute are moved one position back. </para><h4>Parameters</h4><dl><dt class="parameter-name">where</dt><dd class="parameter-def">Place where to insert the attribute, or 0 to insert at the back. </dd></dl><dl><dt class="parameter-name">attribute</dt><dd class="parameter-def">Attribute to insert. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_4eea4a7f6cb484ca9944f7eafe6e1843_14eea4a7f6cb484ca9944f7eafe6e1843">function xml_node::remove_first_attribute</h3><h4>Synopsis</h4><code class="synopsis">void remove_first_attribute();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes first attribute of the node. If node has no attributes, behaviour is undefined. Use <a href="#classrapidxml_1_1xml__node_5810a09f82f8d53efbe9456286dcec83_15810a09f82f8d53efbe9456286dcec83" kindref="member">first_attribute()</a> to test if node has attributes. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_37d87c4d5d89fa0cf05b72ee8d4cba3b_137d87c4d5d89fa0cf05b72ee8d4cba3b">function xml_node::remove_last_attribute</h3><h4>Synopsis</h4><code class="synopsis">void remove_last_attribute();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes last attribute of the node. If node has no attributes, behaviour is undefined. Use <a href="#classrapidxml_1_1xml__node_5810a09f82f8d53efbe9456286dcec83_15810a09f82f8d53efbe9456286dcec83" kindref="member">first_attribute()</a> to test if node has attributes. </para><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_c75154db2e768c0e5b541fc8cd0775ab_1c75154db2e768c0e5b541fc8cd0775ab">function xml_node::remove_attribute</h3><h4>Synopsis</h4><code class="synopsis">void remove_attribute(xml_attribute&lt; Ch &gt; *where);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes specified attribute from node. </para><h4>Parameters</h4><dl><dt class="parameter-name">where</dt><dd class="parameter-def">Pointer to attribute to be removed. </dd></dl><p/><h3 class="reference-header" id="classrapidxml_1_1xml__node_59e6ad4cfd5e8096c052e71d79561eda_159e6ad4cfd5e8096c052e71d79561eda">function xml_node::remove_all_attributes</h3><h4>Synopsis</h4><code class="synopsis">void remove_all_attributes();
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Removes all attributes of node. </para><p/><h3 class="reference-header" id="namespacerapidxml_6a276b85e2da28c5f9c3dbce61c55682_16a276b85e2da28c5f9c3dbce61c55682">enum node_type</h3><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Enumeration listing all node types produced by the parser. Use <a href="#classrapidxml_1_1xml__node_975e86937621ae4afe6a423219de30d0_1975e86937621ae4afe6a423219de30d0" kindref="member">xml_node::type()</a> function to query node type. </para><h4>Values</h4><dl><dt class="parameter-name">node_document</dt><dd class="parameter-def">A document node. Name and value are empty. </dd></dl><dl><dt class="parameter-name">node_element</dt><dd class="parameter-def">An element node. Name contains element name. Value contains text of first data node. </dd></dl><dl><dt class="parameter-name">node_data</dt><dd class="parameter-def">A data node. Name is empty. Value contains data text. </dd></dl><dl><dt class="parameter-name">node_cdata</dt><dd class="parameter-def">A CDATA node. Name is empty. Value contains data text. </dd></dl><dl><dt class="parameter-name">node_comment</dt><dd class="parameter-def">A comment node. Name is empty. Value contains comment text. </dd></dl><dl><dt class="parameter-name">node_declaration</dt><dd class="parameter-def">A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes. </dd></dl><dl><dt class="parameter-name">node_doctype</dt><dd class="parameter-def">A DOCTYPE node. Name is empty. Value contains DOCTYPE text. </dd></dl><dl><dt class="parameter-name">node_pi</dt><dd class="parameter-def">A PI node. Name contains target. Value contains instructions. </dd></dl><p/><h3 class="reference-header" id="namespacerapidxml_ff5d67f74437199d316d2b2660653ae1_1ff5d67f74437199d316d2b2660653ae1">function parse_error_handler</h3><h4>Synopsis</h4><code class="synopsis">void rapidxml::parse_error_handler(const char *what, void *where);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function is called to notify user about the error. It must be defined by the user. <br/><br/>
    + This function cannot return. If it does, the results are undefined. <br/><br/>
    + A very simple definition might look like that: <preformatted>
    +        void rapidxml::parse_error_handler(const char *what, void *where)
    +        {
    +            std::cout &lt;&lt; &quot;Parse error: &quot; &lt;&lt; what &lt;&lt; &quot;\n&quot;;
    +            std::abort();
    +        }
    +        </preformatted></para><h4>Parameters</h4><dl><dt class="parameter-name">what</dt><dd class="parameter-def">Human readable description of the error. </dd></dl><dl><dt class="parameter-name">where</dt><dd class="parameter-def">Pointer to character data where error was detected. </dd></dl><p/><h3 class="reference-header" id="namespacerapidxml_b94d570fc4c4ab2423813cd0243326b1_1b94d570fc4c4ab2423813cd0243326b1">function print</h3><h4>Synopsis</h4><code class="synopsis">OutIt rapidxml::print(OutIt out, const xml_node&lt; Ch &gt; &amp;node, int flags=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Prints XML to given output iterator. </para><h4>Parameters</h4><dl><dt class="parameter-name">out</dt><dd class="parameter-def">Output iterator to print to. </dd></dl><dl><dt class="parameter-name">node</dt><dd class="parameter-def">Node to be printed. Pass xml_document to print entire document. </dd></dl><dl><dt class="parameter-name">flags</dt><dd class="parameter-def">Flags controlling how XML is printed. </dd></dl><h4>Returns</h4>Output iterator pointing to position immediately after last character of printed text. <p/><h3 class="reference-header" id="namespacerapidxml_13bc37d6d1047acb0efdbc1689221a5e_113bc37d6d1047acb0efdbc1689221a5e">function print</h3><h4>Synopsis</h4><code class="synopsis">std::basic_ostream&lt;Ch&gt;&amp; rapidxml::print(std::basic_ostream&lt; Ch &gt; &amp;out, const xml_node&lt; Ch &gt; &amp;node, int flags=0);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Prints XML to given output stream. </para><h4>Parameters</h4><dl><dt class="parameter-name">out</dt><dd class="parameter-def">Output stream to print to. </dd></dl><dl><dt class="parameter-name">node</dt><dd class="parameter-def">Node to be printed. Pass xml_document to print entire document. </dd></dl><dl><dt class="parameter-name">flags</dt><dd class="parameter-def">Flags controlling how XML is printed. </dd></dl><h4>Returns</h4>Output stream. <p/><h3 class="reference-header" id="namespacerapidxml_5619b38000d967fb223b2b0a8c17463a_15619b38000d967fb223b2b0a8c17463a">function operator&lt;&lt;</h3><h4>Synopsis</h4><code class="synopsis">std::basic_ostream&lt;Ch&gt;&amp; rapidxml::operator&lt;&lt;(std::basic_ostream&lt; Ch &gt; &amp;out, const xml_node&lt; Ch &gt; &amp;node);
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Prints formatted XML to given output stream. Uses default printing flags. Use <a href="#namespacerapidxml_b94d570fc4c4ab2423813cd0243326b1_1b94d570fc4c4ab2423813cd0243326b1" kindref="member">print()</a> function to customize printing process. </para><h4>Parameters</h4><dl><dt class="parameter-name">out</dt><dd class="parameter-def">Output stream to print to. </dd></dl><dl><dt class="parameter-name">node</dt><dd class="parameter-def">Node to be printed. </dd></dl><h4>Returns</h4>Output stream. <p/><h3 class="reference-header" id="namespacerapidxml_87e8bbab53702cf3b438bd553c10b6b9_187e8bbab53702cf3b438bd553c10b6b9">
    +				constant
    +			 parse_no_data_nodes</h3><h4>Synopsis</h4><code class="synopsis">const int parse_no_data_nodes
    +											  = 0x1;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to not create data nodes. Text of first data node will still be placed in value of parent element, unless <a href="#namespacerapidxml_97e2c4fdc04fae17126f9971a4fc993e_197e2c4fdc04fae17126f9971a4fc993e" kindref="member">rapidxml::parse_no_element_values</a> flag is also specified. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_97e2c4fdc04fae17126f9971a4fc993e_197e2c4fdc04fae17126f9971a4fc993e">
    +				constant
    +			 parse_no_element_values</h3><h4>Synopsis</h4><code class="synopsis">const int parse_no_element_values
    +											  = 0x2;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to not use text of first data node as a value of parent element. Can be combined with other flags by use of | operator. Note that child data nodes of element node take precendence over its value when printing. That is, if element has one or more child data nodes <i>and</i> a value, the value will be ignored. Use <a href="#namespacerapidxml_87e8bbab53702cf3b438bd553c10b6b9_187e8bbab53702cf3b438bd553c10b6b9" kindref="member">rapidxml::parse_no_data_nodes</a> flag to prevent creation of data nodes if you want to manipulate data using values of elements. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_9cae3801e70437cbc410c24bf6be691c_19cae3801e70437cbc410c24bf6be691c">
    +				constant
    +			 parse_no_string_terminators</h3><h4>Synopsis</h4><code class="synopsis">const int parse_no_string_terminators
    +											  = 0x4;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to not place zero terminators after strings in the source text. By default zero terminators are placed, modifying source text. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_7223b7815c4fb8b42e6e4e77e1ea6b97_17223b7815c4fb8b42e6e4e77e1ea6b97">
    +				constant
    +			 parse_no_entity_translation</h3><h4>Synopsis</h4><code class="synopsis">const int parse_no_entity_translation
    +											  = 0x8;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to not translate entities in the source text. By default entities are translated, modifying source text. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_ccde57f6054857ee4042a1b4d98c83b9_1ccde57f6054857ee4042a1b4d98c83b9">
    +				constant
    +			 parse_no_utf8</h3><h4>Synopsis</h4><code class="synopsis">const int parse_no_utf8
    +											  = 0x10;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters. By default, UTF-8 handling is enabled. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_52e2c934ad9c845a5f4cc49570470556_152e2c934ad9c845a5f4cc49570470556">
    +				constant
    +			 parse_declaration_node</h3><h4>Synopsis</h4><code class="synopsis">const int parse_declaration_node
    +											  = 0x20;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to create XML declaration node. By default, declaration node is not created. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_0f7479dacbc868456d07897a8c072784_10f7479dacbc868456d07897a8c072784">
    +				constant
    +			 parse_comment_nodes</h3><h4>Synopsis</h4><code class="synopsis">const int parse_comment_nodes
    +											  = 0x40;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to create comments nodes. By default, comment nodes are not created. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_8e187746ba1ca04f107951ad32df962e_18e187746ba1ca04f107951ad32df962e">
    +				constant
    +			 parse_doctype_node</h3><h4>Synopsis</h4><code class="synopsis">const int parse_doctype_node
    +											  = 0x80;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to create DOCTYPE node. By default, doctype node is not created. Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_1c20b2b2b75711cd76423e119c49f830_11c20b2b2b75711cd76423e119c49f830">
    +				constant
    +			 parse_pi_nodes</h3><h4>Synopsis</h4><code class="synopsis">const int parse_pi_nodes
    +											  = 0x100;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to create PI nodes. By default, PI nodes are not created. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_a5daff9d61c7d4eaf98e4d42efe628ee_1a5daff9d61c7d4eaf98e4d42efe628ee">
    +				constant
    +			 parse_validate_closing_tags</h3><h4>Synopsis</h4><code class="synopsis">const int parse_validate_closing_tags
    +											  = 0x200;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to validate closing tag names. If not set, name inside closing tag is irrelevant to the parser. By default, closing tags are not validated. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_ac1f06b1afd47b812732fb521b146fd9_1ac1f06b1afd47b812732fb521b146fd9">
    +				constant
    +			 parse_trim_whitespace</h3><h4>Synopsis</h4><code class="synopsis">const int parse_trim_whitespace
    +											  = 0x400;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes. By default, whitespace is not trimmed. This flag does not cause the parser to modify source text. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_88f95d4e275ba01408fefde83078651b_188f95d4e275ba01408fefde83078651b">
    +				constant
    +			 parse_normalize_whitespace</h3><h4>Synopsis</h4><code class="synopsis">const int parse_normalize_whitespace
    +											  = 0x800;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character. Trimming of leading and trailing whitespace of data is controlled by <a href="#namespacerapidxml_ac1f06b1afd47b812732fb521b146fd9_1ac1f06b1afd47b812732fb521b146fd9" kindref="member">rapidxml::parse_trim_whitespace</a> flag. By default, whitespace is not normalized. If this flag is specified, source text will be modified. Can be combined with other flags by use of | operator. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_45751cf2f38fd6915f35b3122b46d5b6_145751cf2f38fd6915f35b3122b46d5b6">
    +				constant
    +			 parse_default</h3><h4>Synopsis</h4><code class="synopsis">const int parse_default
    +											  = 0;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Parse flags which represent default behaviour of the parser. This is always equal to 0, so that all other flags can be simply ored together. Normally there is no need to inconveniently disable flags by anding with their negated (~) values. This also means that meaning of each flag is a <i>negation</i> of the default setting. For example, if flag name is <a href="#namespacerapidxml_ccde57f6054857ee4042a1b4d98c83b9_1ccde57f6054857ee4042a1b4d98c83b9" kindref="member">rapidxml::parse_no_utf8</a>, it means that utf-8 is <i>enabled</i> by default, and using the flag will disable it. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_a97ba1a0a79a6d66f4eef3612508d943_1a97ba1a0a79a6d66f4eef3612508d943">
    +				constant
    +			 parse_non_destructive</h3><h4>Synopsis</h4><code class="synopsis">const int parse_non_destructive
    +											  = parse_no_string_terminators | parse_no_entity_translation;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">A combination of parse flags that forbids any modifications of the source text. This also results in faster parsing. However, note that the following will occur: <ul><li><para>names and values of nodes will not be zero terminated, you have to use <a href="#classrapidxml_1_1xml__base_0dae694c8f7e4d89f1003e2f3a15a43c_10dae694c8f7e4d89f1003e2f3a15a43c" kindref="member">xml_base::name_size()</a> and <a href="#classrapidxml_1_1xml__base_aed5ae791b7164c1ee5e649198cbb3db_1aed5ae791b7164c1ee5e649198cbb3db" kindref="member">xml_base::value_size()</a> functions to determine where name and value ends </para></li><li><para>entities will not be translated </para></li><li><para>whitespace will not be normalized </para></li></ul>
    +See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_398c5476e76102f8bd76c10bb0abbe10_1398c5476e76102f8bd76c10bb0abbe10">
    +				constant
    +			 parse_fastest</h3><h4>Synopsis</h4><code class="synopsis">const int parse_fastest
    +											  = parse_non_destructive | parse_no_data_nodes;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">A combination of parse flags resulting in fastest possible parsing, without sacrificing important data. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_b4f2515265facb42291570307924bd57_1b4f2515265facb42291570307924bd57">
    +				constant
    +			 parse_full</h3><h4>Synopsis</h4><code class="synopsis">const int parse_full
    +											  = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">A combination of parse flags resulting in largest amount of data being extracted. This usually results in slowest parsing. <br/><br/>
    + See <a href="#classrapidxml_1_1xml__document_8338ce6042e7b04d5a42144fb446b69c_18338ce6042e7b04d5a42144fb446b69c" kindref="member">xml_document::parse()</a> function. </para><p/><h3 class="reference-header" id="namespacerapidxml_b08b8d4293c203b69ed6c5ae77ac1907_1b08b8d4293c203b69ed6c5ae77ac1907">
    +				constant
    +			 print_no_indenting</h3><h4>Synopsis</h4><code class="synopsis">const int print_no_indenting
    +											  = 0x1;
    +									  </code><h4>Description</h4><para xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Printer flag instructing the printer to suppress indenting of XML. See <a href="#namespacerapidxml_b94d570fc4c4ab2423813cd0243326b1_1b94d570fc4c4ab2423813cd0243326b1" kindref="member">print()</a> function. </para><p/></body></html>
    \ No newline at end of file
    diff --git a/wt-3.1.7a/src/rapidxml/rapidxml.hpp b/wt-3.1.7a/src/rapidxml/rapidxml.hpp
    new file mode 100644
    index 0000000..2b4231f
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/rapidxml.hpp
    @@ -0,0 +1,2714 @@
    +#ifndef RAPIDXML_HPP_INCLUDED
    +#define RAPIDXML_HPP_INCLUDED
    +
    +#include "rapidxml_xhtml.hpp"
    +
    +// Copyright (C) 2006, 2009 Marcin Kalicinski
    +// Version 1.13
    +// Revision $DateTime: 2009/05/13 01:46:17 $
    +//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation
    +
    +// If standard library is disabled, user must provide implementations of required functions and typedefs
    +#if !defined(RAPIDXML_NO_STDLIB)
    +    #include <cstdlib>      // For std::size_t
    +    #include <cassert>      // For assert
    +    #include <new>          // For placement new
    +#endif
    +
    +#include <boost/lexical_cast.hpp>
    +
    +// On MSVC, disable "conditional expression is constant" warning (level 4). 
    +// This warning is almost impossible to avoid with certain types of templated code
    +#ifdef _MSC_VER
    +    #pragma warning(push)
    +    #pragma warning(disable:4127)   // Conditional expression is constant
    +#endif
    +
    +///////////////////////////////////////////////////////////////////////////
    +// RAPIDXML_PARSE_ERROR
    +    
    +#if defined(RAPIDXML_NO_EXCEPTIONS)
    +
    +#define RAPIDXML_PARSE_ERROR(what, where) { parse_error_handler(what, where); assert(0); }
    +
    +namespace rapidxml
    +{
    +    //! When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, 
    +    //! this function is called to notify user about the error.
    +    //! It must be defined by the user.
    +    //! <br><br>
    +    //! This function cannot return. If it does, the results are undefined.
    +    //! <br><br>
    +    //! A very simple definition might look like that:
    +    //! <pre>
    +    //! void %rapidxml::%parse_error_handler(const char *what, void *where)
    +    //! {
    +    //!     std::cout << "Parse error: " << what << "\n";
    +    //!     std::abort();
    +    //! }
    +    //! </pre>
    +    //! \param what Human readable description of the error.
    +    //! \param where Pointer to character data where error was detected.
    +    void parse_error_handler(const char *what, void *where);
    +}
    +
    +#else
    +    
    +#include <exception>    // For std::exception
    +
    +#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where)
    +
    +namespace rapidxml
    +{
    +
    +    //! Parse error exception. 
    +    //! This exception is thrown by the parser when an error occurs. 
    +    //! Use what() function to get human-readable error message. 
    +    //! Use where() function to get a pointer to position within source text where error was detected.
    +    //! <br><br>
    +    //! If throwing exceptions by the parser is undesirable, 
    +    //! it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included.
    +    //! This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception.
    +    //! This function must be defined by the user.
    +    //! <br><br>
    +    //! This class derives from <code>std::exception</code> class.
    +    class parse_error: public std::exception
    +    {
    +    
    +    public:
    +    
    +        //! Constructs parse error
    +        parse_error(const char *what, void *where)
    +            : m_what(what)
    +            , m_where(where)
    +        {
    +        }
    +
    +        //! Gets human readable description of error.
    +        //! \return Pointer to null terminated description of the error.
    +        virtual const char *what() const throw()
    +        {
    +            return m_what;
    +        }
    +
    +        //! Gets pointer to character data where error happened.
    +        //! Ch should be the same as char type of xml_document that produced the error.
    +        //! \return Pointer to location within the parsed string where error occured.
    +        template<class Ch>
    +        Ch *where() const
    +        {
    +            return reinterpret_cast<Ch *>(m_where);
    +        }
    +
    +    private:  
    +
    +        const char *m_what;
    +        void *m_where;
    +
    +    };
    +}
    +
    +#endif
    +
    +///////////////////////////////////////////////////////////////////////////
    +// Pool sizes
    +
    +#ifndef RAPIDXML_STATIC_POOL_SIZE
    +    // Size of static memory block of memory_pool.
    +    // Define RAPIDXML_STATIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value.
    +    // No dynamic memory allocations are performed by memory_pool until static memory is exhausted.
    +    #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024)
    +#endif
    +
    +#ifndef RAPIDXML_DYNAMIC_POOL_SIZE
    +    // Size of dynamic memory block of memory_pool.
    +    // Define RAPIDXML_DYNAMIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value.
    +    // After the static block is exhausted, dynamic blocks with approximately this size are allocated by memory_pool.
    +    #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024)
    +#endif
    +
    +#ifndef RAPIDXML_ALIGNMENT
    +    // Memory allocation alignment.
    +    // Define RAPIDXML_ALIGNMENT before including rapidxml.hpp if you want to override the default value, which is the size of pointer.
    +    // All memory allocations for nodes, attributes and strings will be aligned to this value.
    +    // This must be a power of 2 and at least 1, otherwise memory_pool will not work.
    +    #define RAPIDXML_ALIGNMENT sizeof(void *)
    +#endif
    +
    +namespace rapidxml
    +{
    +    // Forward declarations
    +    template<class Ch> class xml_node;
    +    template<class Ch> class xml_attribute;
    +    template<class Ch> class xml_document;
    +    
    +    //! Enumeration listing all node types produced by the parser.
    +    //! Use xml_node::type() function to query node type.
    +    enum node_type
    +    {
    +        node_document,      //!< A document node. Name and value are empty.
    +        node_element,       //!< An element node. Name contains element name. Value contains text of first data node.
    +        node_data,          //!< A data node. Name is empty. Value contains data text.
    +        node_cdata,         //!< A CDATA node. Name is empty. Value contains data text.
    +        node_comment,       //!< A comment node. Name is empty. Value contains comment text.
    +        node_declaration,   //!< A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes.
    +        node_doctype,       //!< A DOCTYPE node. Name is empty. Value contains DOCTYPE text.
    +        node_pi             //!< A PI node. Name contains target. Value contains instructions.
    +    };
    +
    +    ///////////////////////////////////////////////////////////////////////
    +    // Parsing flags
    +
    +    //! Parse flag instructing the parser to not create data nodes. 
    +    //! Text of first data node will still be placed in value of parent element, unless rapidxml::parse_no_element_values flag is also specified.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_no_data_nodes = 0x1;            
    +
    +    //! Parse flag instructing the parser to not use text of first data node as a value of parent element.
    +    //! Can be combined with other flags by use of | operator.
    +    //! Note that child data nodes of element node take precendence over its value when printing. 
    +    //! That is, if element has one or more child data nodes <em>and</em> a value, the value will be ignored.
    +    //! Use rapidxml::parse_no_data_nodes flag to prevent creation of data nodes if you want to manipulate data using values of elements.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_no_element_values = 0x2;
    +    
    +    //! Parse flag instructing the parser to not place zero terminators after strings in the source text.
    +    //! By default zero terminators are placed, modifying source text.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_no_string_terminators = 0x4;
    +    
    +    //! Parse flag instructing the parser to not translate entities in the source text.
    +    //! By default entities are translated, modifying source text.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_no_entity_translation = 0x8;
    +
    +    //! Parse flag instructing the parser to not only parse XML entities, but also (X)HTML and translate
    +    //! them to their corresponding UTF-8 sequence
    +    const int parse_xhtml_entity_translation = 0x1000;
    +    
    +    //! Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters.
    +    //! By default, UTF-8 handling is enabled.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_no_utf8 = 0x10;
    +
    +    //! Parse flag instructing the parser to validate the UTF-8 stream.
    +    const int parse_validate_utf8 = 0x2000;
    +    
    +    //! Parse flag instructing the parser to create XML declaration node.
    +    //! By default, declaration node is not created.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_declaration_node = 0x20;
    +    
    +    //! Parse flag instructing the parser to create comments nodes.
    +    //! By default, comment nodes are not created.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_comment_nodes = 0x40;
    +    
    +    //! Parse flag instructing the parser to create DOCTYPE node.
    +    //! By default, doctype node is not created.
    +    //! Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_doctype_node = 0x80;
    +    
    +    //! Parse flag instructing the parser to create PI nodes.
    +    //! By default, PI nodes are not created.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_pi_nodes = 0x100;
    +    
    +    //! Parse flag instructing the parser to validate closing tag names. 
    +    //! If not set, name inside closing tag is irrelevant to the parser.
    +    //! By default, closing tags are not validated.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_validate_closing_tags = 0x200;
    +    
    +    //! Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes.
    +    //! By default, whitespace is not trimmed. 
    +    //! This flag does not cause the parser to modify source text.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_trim_whitespace = 0x400;
    +
    +    //! Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character.
    +    //! Trimming of leading and trailing whitespace of data is controlled by rapidxml::parse_trim_whitespace flag.
    +    //! By default, whitespace is not normalized. 
    +    //! If this flag is specified, source text will be modified.
    +    //! Can be combined with other flags by use of | operator.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_normalize_whitespace = 0x800;
    +
    +    // Compound flags
    +    
    +    //! Parse flags which represent default behaviour of the parser. 
    +    //! This is always equal to 0, so that all other flags can be simply ored together.
    +    //! Normally there is no need to inconveniently disable flags by anding with their negated (~) values.
    +    //! This also means that meaning of each flag is a <i>negation</i> of the default setting. 
    +    //! For example, if flag name is rapidxml::parse_no_utf8, it means that utf-8 is <i>enabled</i> by default,
    +    //! and using the flag will disable it.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_default = 0;
    +    
    +    //! A combination of parse flags that forbids any modifications of the source text. 
    +    //! This also results in faster parsing. However, note that the following will occur:
    +    //! <ul>
    +    //! <li>names and values of nodes will not be zero terminated, you have to use xml_base::name_size() and xml_base::value_size() functions to determine where name and value ends</li>
    +    //! <li>entities will not be translated</li>
    +    //! <li>whitespace will not be normalized</li>
    +    //! </ul>
    +    //! See xml_document::parse() function.
    +    const int parse_non_destructive = parse_no_string_terminators | parse_no_entity_translation;
    +    
    +    //! A combination of parse flags resulting in fastest possible parsing, without sacrificing important data.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_fastest = parse_non_destructive | parse_no_data_nodes;
    +    
    +    //! A combination of parse flags resulting in largest amount of data being extracted. 
    +    //! This usually results in slowest parsing.
    +    //! <br><br>
    +    //! See xml_document::parse() function.
    +    const int parse_full = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags;
    +
    +    ///////////////////////////////////////////////////////////////////////
    +    // Internals
    +
    +    //! \cond internal
    +    namespace internal
    +    {
    +
    +        // Struct that contains lookup tables for the parser
    +        // It must be a template to allow correct linking (because it has static data members, which are defined in a header file).
    +        template<int Dummy>
    +        struct lookup_tables
    +        {
    +            static const unsigned char lookup_whitespace[256];              // Whitespace table
    +            static const unsigned char lookup_node_name[256];               // Node name table
    +            static const unsigned char lookup_text[256];                    // Text table
    +            static const unsigned char lookup_text_pure_no_ws[256];         // Text table
    +            static const unsigned char lookup_text_pure_with_ws[256];       // Text table
    +            static const unsigned char lookup_attribute_name[256];          // Attribute name table
    +            static const unsigned char lookup_attribute_data_1[256];        // Attribute data table with single quote
    +            static const unsigned char lookup_attribute_data_1_pure[256];   // Attribute data table with single quote
    +            static const unsigned char lookup_attribute_data_2[256];        // Attribute data table with double quotes
    +            static const unsigned char lookup_attribute_data_2_pure[256];   // Attribute data table with double quotes
    +            static const unsigned char lookup_digits[256];                  // Digits
    +            static const unsigned char lookup_upcase[256];                  // To uppercase conversion table for ASCII characters
    +        };
    +
    +        // Find length of the string
    +        template<class Ch>
    +        inline std::size_t measure(const Ch *p)
    +        {
    +            const Ch *tmp = p;
    +            while (*tmp) 
    +                ++tmp;
    +            return tmp - p;
    +        }
    +
    +        // Compare strings for equality
    +        template<class Ch>
    +        inline bool compare(const Ch *p1, std::size_t size1, const Ch *p2, std::size_t size2, bool case_sensitive)
    +        {
    +            if (size1 != size2)
    +                return false;
    +            if (case_sensitive)
    +            {
    +                for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
    +                    if (*p1 != *p2)
    +                        return false;
    +            }
    +            else
    +            {
    +                for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
    +                    if (lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p1)] != lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p2)])
    +                        return false;
    +            }
    +            return true;
    +        }
    +    }
    +    //! \endcond
    +
    +    ///////////////////////////////////////////////////////////////////////
    +    // Memory pool
    +    
    +    //! This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation.
    +    //! In most cases, you will not need to use this class directly. 
    +    //! However, if you need to create nodes manually or modify names/values of nodes, 
    +    //! you are encouraged to use memory_pool of relevant xml_document to allocate the memory. 
    +    //! Not only is this faster than allocating them by using <code>new</code> operator, 
    +    //! but also their lifetime will be tied to the lifetime of document, 
    +    //! possibly simplyfing memory management. 
    +    //! <br><br>
    +    //! Call allocate_node() or allocate_attribute() functions to obtain new nodes or attributes from the pool. 
    +    //! You can also call allocate_string() function to allocate strings.
    +    //! Such strings can then be used as names or values of nodes without worrying about their lifetime.
    +    //! Note that there is no <code>free()</code> function -- all allocations are freed at once when clear() function is called, 
    +    //! or when the pool is destroyed.
    +    //! <br><br>
    +    //! It is also possible to create a standalone memory_pool, and use it 
    +    //! to allocate nodes, whose lifetime will not be tied to any document.
    +    //! <br><br>
    +    //! Pool maintains <code>RAPIDXML_STATIC_POOL_SIZE</code> bytes of statically allocated memory. 
    +    //! Until static memory is exhausted, no dynamic memory allocations are done.
    +    //! When static memory is exhausted, pool allocates additional blocks of memory of size <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> each,
    +    //! by using global <code>new[]</code> and <code>delete[]</code> operators. 
    +    //! This behaviour can be changed by setting custom allocation routines. 
    +    //! Use set_allocator() function to set them.
    +    //! <br><br>
    +    //! Allocations for nodes, attributes and strings are aligned at <code>RAPIDXML_ALIGNMENT</code> bytes.
    +    //! This value defaults to the size of pointer on target architecture.
    +    //! <br><br>
    +    //! To obtain absolutely top performance from the parser,
    +    //! it is important that all nodes are allocated from a single, contiguous block of memory.
    +    //! Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably.
    +    //! If required, you can tweak <code>RAPIDXML_STATIC_POOL_SIZE</code>, <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> and <code>RAPIDXML_ALIGNMENT</code> 
    +    //! to obtain best wasted memory to performance compromise.
    +    //! To do it, define their values before rapidxml.hpp file is included.
    +    //! \param Ch Character type of created nodes. 
    +    template<class Ch = char>
    +    class memory_pool
    +    {
    +        
    +    public:
    +
    +        //! \cond internal
    +        typedef void *(alloc_func)(std::size_t);       // Type of user-defined function used to allocate memory
    +        typedef void (free_func)(void *);              // Type of user-defined function used to free memory
    +        //! \endcond
    +        
    +        //! Constructs empty pool with default allocator functions.
    +        memory_pool()
    +            : m_alloc_func(0)
    +            , m_free_func(0)
    +        {
    +            init();
    +        }
    +
    +        //! Destroys pool and frees all the memory. 
    +        //! This causes memory occupied by nodes allocated by the pool to be freed.
    +        //! Nodes allocated from the pool are no longer valid.
    +        ~memory_pool()
    +        {
    +            clear();
    +        }
    +
    +        //! Allocates a new node from the pool, and optionally assigns name and value to it. 
    +        //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
    +        //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
    +        //! will call rapidxml::parse_error_handler() function.
    +        //! \param type Type of node to create.
    +        //! \param name Name to assign to the node, or 0 to assign no name.
    +        //! \param value Value to assign to the node, or 0 to assign no value.
    +        //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string.
    +        //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string.
    +        //! \return Pointer to allocated node. This pointer will never be NULL.
    +        xml_node<Ch> *allocate_node(node_type type, 
    +                                    const Ch *name = 0, const Ch *value = 0, 
    +                                    std::size_t name_size = 0, std::size_t value_size = 0)
    +        {
    +            void *memory = allocate_aligned(sizeof(xml_node<Ch>));
    +            xml_node<Ch> *node = new(memory) xml_node<Ch>(type);
    +            if (name)
    +            {
    +                if (name_size > 0)
    +                    node->name(name, name_size);
    +                else
    +                    node->name(name);
    +            }
    +            if (value)
    +            {
    +                if (value_size > 0)
    +                    node->value(value, value_size);
    +                else
    +                    node->value(value);
    +            }
    +            return node;
    +        }
    +
    +        //! Allocates a new attribute from the pool, and optionally assigns name and value to it.
    +        //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
    +        //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
    +        //! will call rapidxml::parse_error_handler() function.
    +        //! \param name Name to assign to the attribute, or 0 to assign no name.
    +        //! \param value Value to assign to the attribute, or 0 to assign no value.
    +        //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string.
    +        //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string.
    +        //! \return Pointer to allocated attribute. This pointer will never be NULL.
    +        xml_attribute<Ch> *allocate_attribute(const Ch *name = 0, const Ch *value = 0, 
    +                                              std::size_t name_size = 0, std::size_t value_size = 0)
    +        {
    +            void *memory = allocate_aligned(sizeof(xml_attribute<Ch>));
    +            xml_attribute<Ch> *attribute = new(memory) xml_attribute<Ch>;
    +            if (name)
    +            {
    +                if (name_size > 0)
    +                    attribute->name(name, name_size);
    +                else
    +                    attribute->name(name);
    +            }
    +            if (value)
    +            {
    +                if (value_size > 0)
    +                    attribute->value(value, value_size);
    +                else
    +                    attribute->value(value);
    +            }
    +            return attribute;
    +        }
    +
    +        //! Allocates a char array of given size from the pool, and optionally copies a given string to it.
    +        //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
    +        //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
    +        //! will call rapidxml::parse_error_handler() function.
    +        //! \param source String to initialize the allocated memory with, or 0 to not initialize it.
    +        //! \param size Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated.
    +        //! \return Pointer to allocated char array. This pointer will never be NULL.
    +        Ch *allocate_string(const Ch *source = 0, std::size_t size = 0)
    +        {
    +            assert(source || size);     // Either source or size (or both) must be specified
    +            if (size == 0)
    +                size = internal::measure(source) + 1;
    +            Ch *result = static_cast<Ch *>(allocate_aligned(size * sizeof(Ch)));
    +            if (source)
    +                for (std::size_t i = 0; i < size; ++i)
    +                    result[i] = source[i];
    +            return result;
    +        }
    +
    +        //! Clones an xml_node and its hierarchy of child nodes and attributes.
    +        //! Nodes and attributes are allocated from this memory pool.
    +        //! Names and values are not cloned, they are shared between the clone and the source.
    +        //! Result node can be optionally specified as a second parameter, 
    +        //! in which case its contents will be replaced with cloned source node.
    +        //! This is useful when you want to clone entire document.
    +        //! \param source Node to clone.
    +        //! \param result Node to put results in, or 0 to automatically allocate result node
    +        //! \return Pointer to cloned node. This pointer will never be NULL.
    +        xml_node<Ch> *clone_node(const xml_node<Ch> *source, xml_node<Ch> *result = 0)
    +        {
    +            // Prepare result node
    +            if (result)
    +            {
    +                result->remove_all_attributes();
    +                result->remove_all_nodes();
    +                result->type(source->type());
    +            }
    +            else
    +                result = allocate_node(source->type());
    +
    +            // Clone name and value
    +            result->name(source->name(), source->name_size());
    +            result->value(source->value(), source->value_size());
    +
    +            // Clone child nodes and attributes
    +            for (xml_node<Ch> *child = source->first_node(); child; child = child->next_sibling())
    +                result->append_node(clone_node(child));
    +            for (xml_attribute<Ch> *attr = source->first_attribute(); attr; attr = attr->next_attribute())
    +                result->append_attribute(allocate_attribute(attr->name(), attr->value(), attr->name_size(), attr->value_size()));
    +
    +            return result;
    +        }
    +
    +        //! Clears the pool. 
    +        //! This causes memory occupied by nodes allocated by the pool to be freed.
    +        //! Any nodes or strings allocated from the pool will no longer be valid.
    +        void clear()
    +        {
    +            while (m_begin != m_static_memory)
    +            {
    +                char *previous_begin = reinterpret_cast<header *>(align(m_begin))->previous_begin;
    +                if (m_free_func)
    +                    m_free_func(m_begin);
    +                else
    +                    delete[] m_begin;
    +                m_begin = previous_begin;
    +            }
    +            init();
    +        }
    +
    +        //! Sets or resets the user-defined memory allocation functions for the pool.
    +        //! This can only be called when no memory is allocated from the pool yet, otherwise results are undefined.
    +        //! Allocation function must not return invalid pointer on failure. It should either throw,
    +        //! stop the program, or use <code>longjmp()</code> function to pass control to other place of program. 
    +        //! If it returns invalid pointer, results are undefined.
    +        //! <br><br>
    +        //! User defined allocation functions must have the following forms:
    +        //! <br><code>
    +        //! <br>void *allocate(std::size_t size);
    +        //! <br>void free(void *pointer);
    +        //! </code><br>
    +        //! \param af Allocation function, or 0 to restore default function
    +        //! \param ff Free function, or 0 to restore default function
    +        void set_allocator(alloc_func *af, free_func *ff)
    +        {
    +            assert(m_begin == m_static_memory && m_ptr == align(m_begin));    // Verify that no memory is allocated yet
    +            m_alloc_func = af;
    +            m_free_func = ff;
    +        }
    +
    +    private:
    +
    +        struct header
    +        {
    +            char *previous_begin;
    +        };
    +
    +        void init()
    +        {
    +            m_begin = m_static_memory;
    +            m_ptr = align(m_begin);
    +            m_end = m_static_memory + sizeof(m_static_memory);
    +        }
    +        
    +        char *align(char *ptr)
    +        {
    +            std::size_t alignment = ((RAPIDXML_ALIGNMENT - (std::size_t(ptr) & (RAPIDXML_ALIGNMENT - 1))) & (RAPIDXML_ALIGNMENT - 1));
    +            return ptr + alignment;
    +        }
    +        
    +        char *allocate_raw(std::size_t size)
    +        {
    +            // Allocate
    +            void *memory;   
    +            if (m_alloc_func)   // Allocate memory using either user-specified allocation function or global operator new[]
    +            {
    +                memory = m_alloc_func(size);
    +                assert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp
    +            }
    +            else
    +            {
    +                memory = new char[size];
    +#ifdef RAPIDXML_NO_EXCEPTIONS
    +                if (!memory)            // If exceptions are disabled, verify memory allocation, because new will not be able to throw bad_alloc
    +                    RAPIDXML_PARSE_ERROR("out of memory", 0);
    +#endif
    +            }
    +            return static_cast<char *>(memory);
    +        }
    +        
    +        void *allocate_aligned(std::size_t size)
    +        {
    +            // Calculate aligned pointer
    +            char *result = align(m_ptr);
    +
    +            // If not enough memory left in current pool, allocate a new pool
    +            if (result + size > m_end)
    +            {
    +                // Calculate required pool size (may be bigger than RAPIDXML_DYNAMIC_POOL_SIZE)
    +                std::size_t pool_size = RAPIDXML_DYNAMIC_POOL_SIZE;
    +                if (pool_size < size)
    +                    pool_size = size;
    +                
    +                // Allocate
    +                std::size_t alloc_size = sizeof(header) + (2 * RAPIDXML_ALIGNMENT - 2) + pool_size;     // 2 alignments required in worst case: one for header, one for actual allocation
    +                char *raw_memory = allocate_raw(alloc_size);
    +                    
    +                // Setup new pool in allocated memory
    +                char *pool = align(raw_memory);
    +                header *new_header = reinterpret_cast<header *>(pool);
    +                new_header->previous_begin = m_begin;
    +                m_begin = raw_memory;
    +                m_ptr = pool + sizeof(header);
    +                m_end = raw_memory + alloc_size;
    +
    +                // Calculate aligned pointer again using new pool
    +                result = align(m_ptr);
    +            }
    +
    +            // Update pool and return aligned pointer
    +            m_ptr = result + size;
    +            return result;
    +        }
    +
    +        char *m_begin;                                      // Start of raw memory making up current pool
    +        char *m_ptr;                                        // First free byte in current pool
    +        char *m_end;                                        // One past last available byte in current pool
    +        char m_static_memory[RAPIDXML_STATIC_POOL_SIZE];    // Static raw memory
    +        alloc_func *m_alloc_func;                           // Allocator function, or 0 if default is to be used
    +        free_func *m_free_func;                             // Free function, or 0 if default is to be used
    +    };
    +
    +    ///////////////////////////////////////////////////////////////////////////
    +    // XML base
    +
    +    //! Base class for xml_node and xml_attribute implementing common functions: 
    +    //! name(), name_size(), value(), value_size() and parent().
    +    //! \param Ch Character type to use
    +    template<class Ch = char>
    +    class xml_base
    +    {
    +
    +    public:
    +        
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Construction & destruction
    +    
    +        // Construct a base with empty name, value and parent
    +        xml_base()
    +            : m_name(0)
    +            , m_value(0)
    +            , m_parent(0)
    +        {
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Node data access
    +    
    +        //! Gets name of the node. 
    +        //! Interpretation of name depends on type of node.
    +        //! Note that name will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse.
    +        //! <br><br>
    +        //! Use name_size() function to determine length of the name.
    +        //! \return Name of node, or empty string if node has no name.
    +        Ch *name() const
    +        {
    +            return m_name ? m_name : nullstr();
    +        }
    +
    +        //! Gets size of node name, not including terminator character.
    +        //! This function works correctly irrespective of whether name is or is not zero terminated.
    +        //! \return Size of node name, in characters.
    +        std::size_t name_size() const
    +        {
    +            return m_name ? m_name_size : 0;
    +        }
    +
    +        //! Gets value of node. 
    +        //! Interpretation of value depends on type of node.
    +        //! Note that value will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse.
    +        //! <br><br>
    +        //! Use value_size() function to determine length of the value.
    +        //! \return Value of node, or empty string if node has no value.
    +        Ch *value() const
    +        {
    +            return m_value ? m_value : nullstr();
    +        }
    +
    +        //! Gets size of node value, not including terminator character.
    +        //! This function works correctly irrespective of whether value is or is not zero terminated.
    +        //! \return Size of node value, in characters.
    +        std::size_t value_size() const
    +        {
    +            return m_value ? m_value_size : 0;
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Node modification
    +    
    +        //! Sets name of node to a non zero-terminated string.
    +        //! See \ref ownership_of_strings.
    +        //! <br><br>
    +        //! Note that node does not own its name or value, it only stores a pointer to it. 
    +        //! It will not delete or otherwise free the pointer on destruction.
    +        //! It is reponsibility of the user to properly manage lifetime of the string.
    +        //! The easiest way to achieve it is to use memory_pool of the document to allocate the string -
    +        //! on destruction of the document the string will be automatically freed.
    +        //! <br><br>
    +        //! Size of name must be specified separately, because name does not have to be zero terminated.
    +        //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated).
    +        //! \param name Name of node to set. Does not have to be zero terminated.
    +        //! \param size Size of name, in characters. This does not include zero terminator, if one is present.
    +        void name(const Ch *name, std::size_t size)
    +        {
    +            m_name = const_cast<Ch *>(name);
    +            m_name_size = size;
    +        }
    +
    +        //! Sets name of node to a zero-terminated string.
    +        //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t).
    +        //! \param name Name of node to set. Must be zero terminated.
    +        void name(const Ch *name)
    +        {
    +            this->name(name, internal::measure(name));
    +        }
    +
    +        //! Sets value of node to a non zero-terminated string.
    +        //! See \ref ownership_of_strings.
    +        //! <br><br>
    +        //! Note that node does not own its name or value, it only stores a pointer to it. 
    +        //! It will not delete or otherwise free the pointer on destruction.
    +        //! It is reponsibility of the user to properly manage lifetime of the string.
    +        //! The easiest way to achieve it is to use memory_pool of the document to allocate the string -
    +        //! on destruction of the document the string will be automatically freed.
    +        //! <br><br>
    +        //! Size of value must be specified separately, because it does not have to be zero terminated.
    +        //! Use value(const Ch *) function to have the length automatically calculated (string must be zero terminated).
    +        //! <br><br>
    +        //! If an element has a child node of type node_data, it will take precedence over element value when printing.
    +        //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser.
    +        //! \param value value of node to set. Does not have to be zero terminated.
    +        //! \param size Size of value, in characters. This does not include zero terminator, if one is present.
    +        void value(const Ch *value, std::size_t size)
    +        {
    +            m_value = const_cast<Ch *>(value);
    +            m_value_size = size;
    +        }
    +
    +        //! Sets value of node to a zero-terminated string.
    +        //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t).
    +        //! \param value Vame of node to set. Must be zero terminated.
    +        void value(const Ch *value)
    +        {
    +            this->value(value, internal::measure(value));
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Related nodes access
    +    
    +        //! Gets node parent.
    +        //! \return Pointer to parent node, or 0 if there is no parent.
    +        xml_node<Ch> *parent() const
    +        {
    +            return m_parent;
    +        }
    +
    +    protected:
    +
    +        // Return empty string
    +        static Ch *nullstr()
    +        {
    +            static Ch zero = Ch('\0');
    +            return &zero;
    +        }
    +
    +        Ch *m_name;                         // Name of node, or 0 if no name
    +        Ch *m_value;                        // Value of node, or 0 if no value
    +        std::size_t m_name_size;            // Length of node name, or undefined of no name
    +        std::size_t m_value_size;           // Length of node value, or undefined if no value
    +        xml_node<Ch> *m_parent;             // Pointer to parent node, or 0 if none
    +
    +    };
    +
    +    //! Class representing attribute node of XML document. 
    +    //! Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base).
    +    //! Note that after parse, both name and value of attribute will point to interior of source text used for parsing. 
    +    //! Thus, this text must persist in memory for the lifetime of attribute.
    +    //! \param Ch Character type to use.
    +    template<class Ch = char>
    +    class xml_attribute: public xml_base<Ch>
    +    {
    +
    +        friend class xml_node<Ch>;
    +    
    +    public:
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Construction & destruction
    +    
    +        //! Constructs an empty attribute with the specified type. 
    +        //! Consider using memory_pool of appropriate xml_document if allocating attributes manually.
    +        xml_attribute()
    +        {
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Related nodes access
    +    
    +        //! Gets document of which attribute is a child.
    +        //! \return Pointer to document that contains this attribute, or 0 if there is no parent document.
    +        xml_document<Ch> *document() const
    +        {
    +            if (xml_node<Ch> *node = this->parent())
    +            {
    +                while (node->parent())
    +                    node = node->parent();
    +                return node->type() == node_document ? static_cast<xml_document<Ch> *>(node) : 0;
    +            }
    +            else
    +                return 0;
    +        }
    +
    +        //! Gets previous attribute, optionally matching attribute name. 
    +        //! \param name Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found attribute, or 0 if not found.
    +        xml_attribute<Ch> *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_attribute<Ch> *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute)
    +                    if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
    +                        return attribute;
    +                return 0;
    +            }
    +            else
    +                return this->m_parent ? m_prev_attribute : 0;
    +        }
    +
    +        //! Gets next attribute, optionally matching attribute name. 
    +        //! \param name Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found attribute, or 0 if not found.
    +        xml_attribute<Ch> *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_attribute<Ch> *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute)
    +                    if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
    +                        return attribute;
    +                return 0;
    +            }
    +            else
    +                return this->m_parent ? m_next_attribute : 0;
    +        }
    +
    +    private:
    +
    +        xml_attribute<Ch> *m_prev_attribute;        // Pointer to previous sibling of attribute, or 0 if none; only valid if parent is non-zero
    +        xml_attribute<Ch> *m_next_attribute;        // Pointer to next sibling of attribute, or 0 if none; only valid if parent is non-zero
    +    
    +    };
    +
    +    ///////////////////////////////////////////////////////////////////////////
    +    // XML node
    +
    +    //! Class representing a node of XML document. 
    +    //! Each node may have associated name and value strings, which are available through name() and value() functions. 
    +    //! Interpretation of name and value depends on type of the node.
    +    //! Type of node can be determined by using type() function.
    +    //! <br><br>
    +    //! Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. 
    +    //! Thus, this text must persist in the memory for the lifetime of node.
    +    //! \param Ch Character type to use.
    +    template<class Ch = char>
    +    class xml_node: public xml_base<Ch>
    +    {
    +
    +    public:
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Construction & destruction
    +    
    +        //! Constructs an empty node with the specified type. 
    +        //! Consider using memory_pool of appropriate document to allocate nodes manually.
    +        //! \param type Type of node to construct.
    +        xml_node(node_type type)
    +            : m_type(type)
    +            , m_first_node(0)
    +            , m_first_attribute(0)
    +        {
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Node data access
    +    
    +        //! Gets type of node.
    +        //! \return Type of node.
    +        node_type type() const
    +        {
    +            return m_type;
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Related nodes access
    +    
    +        //! Gets document of which node is a child.
    +        //! \return Pointer to document that contains this node, or 0 if there is no parent document.
    +        xml_document<Ch> *document() const
    +        {
    +            xml_node<Ch> *node = const_cast<xml_node<Ch> *>(this);
    +            while (node->parent())
    +                node = node->parent();
    +            return node->type() == node_document ? static_cast<xml_document<Ch> *>(node) : 0;
    +        }
    +
    +        //! Gets first child node, optionally matching node name.
    +        //! \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found child, or 0 if not found.
    +        xml_node<Ch> *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_node<Ch> *child = m_first_node; child; child = child->next_sibling())
    +                    if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive))
    +                        return child;
    +                return 0;
    +            }
    +            else
    +                return m_first_node;
    +        }
    +
    +        //! Gets last child node, optionally matching node name. 
    +        //! Behaviour is undefined if node has no children.
    +        //! Use first_node() to test if node has children.
    +        //! \param name Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found child, or 0 if not found.
    +        xml_node<Ch> *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            assert(m_first_node);  // Cannot query for last child if node has no children
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_node<Ch> *child = m_last_node; child; child = child->previous_sibling())
    +                    if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive))
    +                        return child;
    +                return 0;
    +            }
    +            else
    +                return m_last_node;
    +        }
    +
    +        //! Gets previous sibling node, optionally matching node name. 
    +        //! Behaviour is undefined if node has no parent.
    +        //! Use parent() to test if node has a parent.
    +        //! \param name Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found sibling, or 0 if not found.
    +        xml_node<Ch> *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            assert(this->m_parent);     // Cannot query for siblings if node has no parent
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_node<Ch> *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling)
    +                    if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive))
    +                        return sibling;
    +                return 0;
    +            }
    +            else
    +                return m_prev_sibling;
    +        }
    +
    +        //! Gets next sibling node, optionally matching node name. 
    +        //! Behaviour is undefined if node has no parent.
    +        //! Use parent() to test if node has a parent.
    +        //! \param name Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found sibling, or 0 if not found.
    +        xml_node<Ch> *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            assert(this->m_parent);     // Cannot query for siblings if node has no parent
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_node<Ch> *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling)
    +                    if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive))
    +                        return sibling;
    +                return 0;
    +            }
    +            else
    +                return m_next_sibling;
    +        }
    +
    +        //! Gets first attribute of node, optionally matching attribute name.
    +        //! \param name Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found attribute, or 0 if not found.
    +        xml_attribute<Ch> *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_attribute<Ch> *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute)
    +                    if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
    +                        return attribute;
    +                return 0;
    +            }
    +            else
    +                return m_first_attribute;
    +        }
    +
    +        //! Gets last attribute of node, optionally matching attribute name.
    +        //! \param name Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
    +        //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
    +        //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
    +        //! \return Pointer to found attribute, or 0 if not found.
    +        xml_attribute<Ch> *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
    +        {
    +            if (name)
    +            {
    +                if (name_size == 0)
    +                    name_size = internal::measure(name);
    +                for (xml_attribute<Ch> *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute)
    +                    if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
    +                        return attribute;
    +                return 0;
    +            }
    +            else
    +                return m_first_attribute ? m_last_attribute : 0;
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Node modification
    +    
    +        //! Sets type of node.
    +        //! \param type Type of node to set.
    +        void type(node_type type)
    +        {
    +            m_type = type;
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Node manipulation
    +
    +        //! Prepends a new child node.
    +        //! The prepended child becomes the first child, and all existing children are moved one position back.
    +        //! \param child Node to prepend.
    +        void prepend_node(xml_node<Ch> *child)
    +        {
    +            assert(child && !child->parent() && child->type() != node_document);
    +            if (first_node())
    +            {
    +                child->m_next_sibling = m_first_node;
    +                m_first_node->m_prev_sibling = child;
    +            }
    +            else
    +            {
    +                child->m_next_sibling = 0;
    +                m_last_node = child;
    +            }
    +            m_first_node = child;
    +            child->m_parent = this;
    +            child->m_prev_sibling = 0;
    +        }
    +
    +        //! Appends a new child node. 
    +        //! The appended child becomes the last child.
    +        //! \param child Node to append.
    +        void append_node(xml_node<Ch> *child)
    +        {
    +            assert(child && !child->parent() && child->type() != node_document);
    +            if (first_node())
    +            {
    +                child->m_prev_sibling = m_last_node;
    +                m_last_node->m_next_sibling = child;
    +            }
    +            else
    +            {
    +                child->m_prev_sibling = 0;
    +                m_first_node = child;
    +            }
    +            m_last_node = child;
    +            child->m_parent = this;
    +            child->m_next_sibling = 0;
    +        }
    +
    +        //! Inserts a new child node at specified place inside the node. 
    +        //! All children after and including the specified node are moved one position back.
    +        //! \param where Place where to insert the child, or 0 to insert at the back.
    +        //! \param child Node to insert.
    +        void insert_node(xml_node<Ch> *where, xml_node<Ch> *child)
    +        {
    +            assert(!where || where->parent() == this);
    +            assert(child && !child->parent() && child->type() != node_document);
    +            if (where == m_first_node)
    +                prepend_node(child);
    +            else if (where == 0)
    +                append_node(child);
    +            else
    +            {
    +                child->m_prev_sibling = where->m_prev_sibling;
    +                child->m_next_sibling = where;
    +                where->m_prev_sibling->m_next_sibling = child;
    +                where->m_prev_sibling = child;
    +                child->m_parent = this;
    +            }
    +        }
    +
    +        //! Removes first child node. 
    +        //! If node has no children, behaviour is undefined.
    +        //! Use first_node() to test if node has children.
    +        void remove_first_node()
    +        {
    +            assert(first_node());
    +            xml_node<Ch> *child = m_first_node;
    +            m_first_node = child->m_next_sibling;
    +            if (child->m_next_sibling)
    +                child->m_next_sibling->m_prev_sibling = 0;
    +            else
    +                m_last_node = 0;
    +            child->m_parent = 0;
    +        }
    +
    +        //! Removes last child of the node. 
    +        //! If node has no children, behaviour is undefined.
    +        //! Use first_node() to test if node has children.
    +        void remove_last_node()
    +        {
    +            assert(first_node());
    +            xml_node<Ch> *child = m_last_node;
    +            if (child->m_prev_sibling)
    +            {
    +                m_last_node = child->m_prev_sibling;
    +                child->m_prev_sibling->m_next_sibling = 0;
    +            }
    +            else
    +                m_first_node = 0;
    +            child->m_parent = 0;
    +        }
    +
    +        //! Removes specified child from the node
    +        // \param where Pointer to child to be removed.
    +        void remove_node(xml_node<Ch> *where)
    +        {
    +            assert(where && where->parent() == this);
    +            assert(first_node());
    +            if (where == m_first_node)
    +                remove_first_node();
    +            else if (where == m_last_node)
    +                remove_last_node();
    +            else
    +            {
    +                where->m_prev_sibling->m_next_sibling = where->m_next_sibling;
    +                where->m_next_sibling->m_prev_sibling = where->m_prev_sibling;
    +                where->m_parent = 0;
    +            }
    +        }
    +
    +        //! Removes all child nodes (but not attributes).
    +        void remove_all_nodes()
    +        {
    +            for (xml_node<Ch> *node = first_node(); node; node = node->m_next_sibling)
    +                node->m_parent = 0;
    +            m_first_node = 0;
    +        }
    +
    +        //! Prepends a new attribute to the node.
    +        //! \param attribute Attribute to prepend.
    +        void prepend_attribute(xml_attribute<Ch> *attribute)
    +        {
    +            assert(attribute && !attribute->parent());
    +            if (first_attribute())
    +            {
    +                attribute->m_next_attribute = m_first_attribute;
    +                m_first_attribute->m_prev_attribute = attribute;
    +            }
    +            else
    +            {
    +                attribute->m_next_attribute = 0;
    +                m_last_attribute = attribute;
    +            }
    +            m_first_attribute = attribute;
    +            attribute->m_parent = this;
    +            attribute->m_prev_attribute = 0;
    +        }
    +
    +        //! Appends a new attribute to the node.
    +        //! \param attribute Attribute to append.
    +        void append_attribute(xml_attribute<Ch> *attribute)
    +        {
    +            assert(attribute && !attribute->parent());
    +            if (first_attribute())
    +            {
    +                attribute->m_prev_attribute = m_last_attribute;
    +                m_last_attribute->m_next_attribute = attribute;
    +            }
    +            else
    +            {
    +                attribute->m_prev_attribute = 0;
    +                m_first_attribute = attribute;
    +            }
    +            m_last_attribute = attribute;
    +            attribute->m_parent = this;
    +            attribute->m_next_attribute = 0;
    +        }
    +
    +        //! Inserts a new attribute at specified place inside the node. 
    +        //! All attributes after and including the specified attribute are moved one position back.
    +        //! \param where Place where to insert the attribute, or 0 to insert at the back.
    +        //! \param attribute Attribute to insert.
    +        void insert_attribute(xml_attribute<Ch> *where, xml_attribute<Ch> *attribute)
    +        {
    +            assert(!where || where->parent() == this);
    +            assert(attribute && !attribute->parent());
    +            if (where == m_first_attribute)
    +                prepend_attribute(attribute);
    +            else if (where == 0)
    +                append_attribute(attribute);
    +            else
    +            {
    +                attribute->m_prev_attribute = where->m_prev_attribute;
    +                attribute->m_next_attribute = where;
    +                where->m_prev_attribute->m_next_attribute = attribute;
    +                where->m_prev_attribute = attribute;
    +                attribute->m_parent = this;
    +            }
    +        }
    +
    +        //! Removes first attribute of the node. 
    +        //! If node has no attributes, behaviour is undefined.
    +        //! Use first_attribute() to test if node has attributes.
    +        void remove_first_attribute()
    +        {
    +            assert(first_attribute());
    +            xml_attribute<Ch> *attribute = m_first_attribute;
    +            if (attribute->m_next_attribute)
    +            {
    +                attribute->m_next_attribute->m_prev_attribute = 0;
    +            }
    +            else
    +                m_last_attribute = 0;
    +            attribute->m_parent = 0;
    +            m_first_attribute = attribute->m_next_attribute;
    +        }
    +
    +        //! Removes last attribute of the node. 
    +        //! If node has no attributes, behaviour is undefined.
    +        //! Use first_attribute() to test if node has attributes.
    +        void remove_last_attribute()
    +        {
    +            assert(first_attribute());
    +            xml_attribute<Ch> *attribute = m_last_attribute;
    +            if (attribute->m_prev_attribute)
    +            {
    +                attribute->m_prev_attribute->m_next_attribute = 0;
    +                m_last_attribute = attribute->m_prev_attribute;
    +            }
    +            else
    +                m_first_attribute = 0;
    +            attribute->m_parent = 0;
    +        }
    +
    +        //! Removes specified attribute from node.
    +        //! \param where Pointer to attribute to be removed.
    +        void remove_attribute(xml_attribute<Ch> *where)
    +        {
    +            assert(first_attribute() && where->parent() == this);
    +            if (where == m_first_attribute)
    +                remove_first_attribute();
    +            else if (where == m_last_attribute)
    +                remove_last_attribute();
    +            else
    +            {
    +                where->m_prev_attribute->m_next_attribute = where->m_next_attribute;
    +                where->m_next_attribute->m_prev_attribute = where->m_prev_attribute;
    +                where->m_parent = 0;
    +            }
    +        }
    +
    +        //! Removes all attributes of node.
    +        void remove_all_attributes()
    +        {
    +            for (xml_attribute<Ch> *attribute = first_attribute(); attribute; attribute = attribute->m_next_attribute)
    +                attribute->m_parent = 0;
    +            m_first_attribute = 0;
    +        }
    +        
    +    private:
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Restrictions
    +
    +        // No copying
    +        xml_node(const xml_node &);
    +        void operator =(const xml_node &);
    +    
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Data members
    +    
    +        // Note that some of the pointers below have UNDEFINED values if certain other pointers are 0.
    +        // This is required for maximum performance, as it allows the parser to omit initialization of 
    +        // unneded/redundant values.
    +        //
    +        // The rules are as follows:
    +        // 1. first_node and first_attribute contain valid pointers, or 0 if node has no children/attributes respectively
    +        // 2. last_node and last_attribute are valid only if node has at least one child/attribute respectively, otherwise they contain garbage
    +        // 3. prev_sibling and next_sibling are valid only if node has a parent, otherwise they contain garbage
    +
    +        node_type m_type;                       // Type of node; always valid
    +        xml_node<Ch> *m_first_node;             // Pointer to first child node, or 0 if none; always valid
    +        xml_node<Ch> *m_last_node;              // Pointer to last child node, or 0 if none; this value is only valid if m_first_node is non-zero
    +        xml_attribute<Ch> *m_first_attribute;   // Pointer to first attribute of node, or 0 if none; always valid
    +        xml_attribute<Ch> *m_last_attribute;    // Pointer to last attribute of node, or 0 if none; this value is only valid if m_first_attribute is non-zero
    +        xml_node<Ch> *m_prev_sibling;           // Pointer to previous sibling of node, or 0 if none; this value is only valid if m_parent is non-zero
    +        xml_node<Ch> *m_next_sibling;           // Pointer to next sibling of node, or 0 if none; this value is only valid if m_parent is non-zero
    +
    +    };
    +
    +    ///////////////////////////////////////////////////////////////////////////
    +    // XML document
    +    
    +    //! This class represents root of the DOM hierarchy. 
    +    //! It is also an xml_node and a memory_pool through public inheritance.
    +    //! Use parse() function to build a DOM tree from a zero-terminated XML text string.
    +    //! parse() function allocates memory for nodes and attributes by using functions of xml_document, 
    +    //! which are inherited from memory_pool.
    +    //! To access root node of the document, use the document itself, as if it was an xml_node.
    +    //! \param Ch Character type to use.
    +    template<class Ch = char>
    +    class xml_document: public xml_node<Ch>, public memory_pool<Ch>
    +    {
    +    
    +    public:
    +
    +        //! Constructs empty XML document
    +        xml_document()
    +            : xml_node<Ch>(node_document)
    +        {
    +        }
    +
    +        //! Parses zero-terminated XML string according to given flags.
    +        //! Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used.
    +        //! The string must persist for the lifetime of the document.
    +        //! In case of error, rapidxml::parse_error exception will be thrown.
    +        //! <br><br>
    +        //! If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning.
    +        //! Make sure that data is zero-terminated.
    +        //! <br><br>
    +        //! Document can be parsed into multiple times. 
    +        //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool.
    +        //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser.
    +        template<int Flags>
    +        void parse(Ch *text)
    +        {
    +            assert(text);
    +            
    +            // Remove current contents
    +            this->remove_all_nodes();
    +            this->remove_all_attributes();
    +            
    +            // Parse BOM, if any
    +            parse_bom<Flags>(text);
    +            
    +            // Parse children
    +            while (1)
    +            {
    +                // Skip whitespace before node
    +                skip<whitespace_pred, Flags>(text);
    +                if (*text == 0)
    +                    break;
    +
    +                // Parse and append new child
    +                if (*text == Ch('<'))
    +                {
    +                    ++text;     // Skip '<'
    +                    if (xml_node<Ch> *node = parse_node<Flags>(text))
    +                        this->append_node(node);
    +                }
    +                else
    +                    RAPIDXML_PARSE_ERROR("expected <", text);
    +            }
    +
    +        }
    +
    +        //! Clears the document by deleting all nodes and clearing the memory pool.
    +        //! All nodes owned by document pool are destroyed.
    +        void clear()
    +        {
    +            this->remove_all_nodes();
    +            this->remove_all_attributes();
    +            memory_pool<Ch>::clear();
    +        }
    +        
    +    private:
    +
    +        ///////////////////////////////////////////////////////////////////////
    +        // Internal character utility functions
    +        
    +        // Detect whitespace character
    +        struct whitespace_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_whitespace[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect node name character
    +        struct node_name_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_node_name[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect attribute name character
    +        struct attribute_name_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_attribute_name[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect text character (PCDATA)
    +        struct text_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_text[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect text character (PCDATA) that does not require processing
    +        struct text_pure_no_ws_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_text_pure_no_ws[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect text character (PCDATA) that does not require processing
    +        struct text_pure_with_ws_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                return internal::lookup_tables<0>::lookup_text_pure_with_ws[static_cast<unsigned char>(ch)];
    +            }
    +        };
    +
    +        // Detect attribute value character
    +        template<Ch Quote>
    +        struct attribute_value_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                if (Quote == Ch('\''))
    +                    return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast<unsigned char>(ch)];
    +                if (Quote == Ch('\"'))
    +                    return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast<unsigned char>(ch)];
    +                return 0;       // Should never be executed, to avoid warnings on Comeau
    +            }
    +        };
    +
    +        // Detect attribute value character
    +        template<Ch Quote>
    +        struct attribute_value_pure_pred
    +        {
    +            static unsigned char test(Ch ch)
    +            {
    +                if (Quote == Ch('\''))
    +                    return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast<unsigned char>(ch)];
    +                if (Quote == Ch('\"'))
    +                    return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast<unsigned char>(ch)];
    +                return 0;       // Should never be executed, to avoid warnings on Comeau
    +            }
    +        };
    +
    +    public:
    +        // Insert coded character, using UTF8 or 8-bit ASCII
    +        template<int Flags>
    +        static void insert_coded_character(Ch *&text, unsigned long code)
    +        {
    +            if (Flags & parse_no_utf8)
    +            {
    +                // Insert 8-bit ASCII character
    +                // Todo: possibly verify that code is less than 256 and use replacement char otherwise?
    +                text[0] = static_cast<unsigned char>(code);
    +                text += 1;
    +            }
    +            else
    +            {
    +                // Insert UTF8 sequence
    +                if (code < 0x80)    // 1 byte sequence
    +                {
    +		    text[0] = static_cast<unsigned char>(code);
    +                    text += 1;
    +                }
    +                else if (code < 0x800)  // 2 byte sequence
    +                {
    +		    text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[0] = static_cast<unsigned char>(code | 0xC0);
    +                    text += 2;
    +                }
    +	            else if (code < 0x10000)    // 3 byte sequence
    +                {
    +		    text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[0] = static_cast<unsigned char>(code | 0xE0);
    +                    text += 3;
    +                }
    +	            else if (code < 0x110000)   // 4 byte sequence
    +                {
    +		    text[3] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF);
    +		    code >>= 6;
    +		    text[0] = static_cast<unsigned char>(code | 0xF0);
    +                    text += 4;
    +                }
    +                else    // Invalid, only codes up to 0x10FFFF are allowed in Unicode
    +                {
    +                    RAPIDXML_PARSE_ERROR
    +		      (("invalid numeric character entity: "
    +			+ boost::lexical_cast<std::string>(code)).c_str(), 0);
    +                }
    +            }
    +        }
    +
    +        static void copy_check_utf8(const Ch *& src, Ch *& dest)
    +        {
    +	    // skip entire UTF-8 encoded characters at once,
    +	    // checking their validity based on
    +	    // http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/character-encoding.html (5.9.4 column 3)
    +
    +	    unsigned length = 1;
    +	    bool legal = false;
    +	    if ((unsigned char)src[0] <= 0x7F) {
    +	      unsigned char c = src[0];
    +	      if (c == 0x09 || c == 0x0A || c == 0x0D || c >= 0x20)
    +		legal = true;
    +	    } else if ((unsigned char)src[0] >= 0xF0) {
    +	      length = 4;
    +
    +	      if ((
    +		   // F0 90-BF 80-BF 80-BF
    +		   (                                    (unsigned char)src[0] == 0xF0)
    +		   && (0x90 <= (unsigned char)src[1] && (unsigned char)src[1] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[2] && (unsigned char)src[2] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[3] && (unsigned char)src[3] <= 0xBF)
    +		   ) ||
    +		  (
    +		   // F1-F3 80-BF 80-BF 80-BF
    +		   (   0xF1 <= (unsigned char)src[0] && (unsigned char)src[0] <= 0xF3)
    +		   && (0x80 <= (unsigned char)src[1] && (unsigned char)src[1] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[2] && (unsigned char)src[2] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[3] && (unsigned char)src[3] <= 0xBF)
    +		   ))    
    +		legal = true;
    +
    +	    } else if ((unsigned char)src[0] >= 0xE0) {
    +	      length = 3;
    +	      
    +	      if ((
    +		   // E0 A0*-BF 80-BF
    +		   (                                    (unsigned char)src[0] == 0xE0)
    +		   && (0xA0 <= (unsigned char)src[1] && (unsigned char)src[1] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[2] && (unsigned char)src[2] <= 0xBF)
    +		   ) ||
    +		  (
    +		   // E1-EF 80-BF 80-BF
    +		   (   0xE1 <= (unsigned char)src[0] && (unsigned char)src[0] <= 0xF1)
    +		   && (0x80 <= (unsigned char)src[1] && (unsigned char)src[1] <= 0xBF)
    +		   && (0x80 <= (unsigned char)src[2] && (unsigned char)src[2] <= 0xBF)
    +		   ))
    +		legal = true;
    +
    +	    } else if ((unsigned char)src[0] >= 0xC0) {
    +	      length = 2;
    +
    +	      if (
    +		  // C2-DF 80-BF
    +		  (   0xC2 <= (unsigned char)src[0] && (unsigned char)src[0] <= 0xDF)
    +		  && (0x80 <= (unsigned char)src[1] && (unsigned char)src[1] <= 0xBF)
    +		  )
    +		legal = true;
    +	    }
    +
    +	    if (legal) {
    +	      if (dest)
    +		for (unsigned i = 0; i < length; ++i)
    +		  *dest++ = *src++;
    +	      else
    +		src += length;
    +	    } else {
    +	      if (dest)
    +		if (length >= 3) {
    +		  /* insert U+FFFD, the replacement character */
    +		  *dest++ = (Ch)0xef;
    +		  *dest++ = (Ch)0xbf;
    +		  *dest++ = (Ch)0xbd;
    +		  src += length;
    +		} else
    +		  for (unsigned i = 0; i < length; ++i) {
    +		    *dest++ = '?';
    +		    src++;
    +		  }
    +	      else
    +		RAPIDXML_PARSE_ERROR("Invalid UTF-8 sequence",
    +				     const_cast<Ch *>(src));
    +	    }
    +	}
    +
    +    private:
    +        template<int Flags>
    +	static void next_char(Ch *&text)
    +        {
    +	  if (Flags & parse_validate_utf8) {
    +	    Ch *dest = 0;
    +	    copy_check_utf8(const_cast<const Ch *&>(text), dest);
    +	  } else
    +	    ++text;
    +	}
    +       
    +        // Skip characters until predicate evaluates to true
    +        template<class StopPred, int Flags>
    +        static void skip(Ch *&text)
    +        {
    +            Ch *tmp = text;
    +            while (StopPred::test(*tmp))
    +	      next_char<Flags>(tmp);
    +
    +            text = tmp;
    +        }
    +
    +        // Skip characters until predicate evaluates to true while doing the following:
    +        // - replacing XML character entity references with proper characters (&apos; &amp; &quot; &lt; &gt; &#...;)
    +        // - condensing whitespace sequences to single space character
    +        template<class StopPred, class StopPredPure, int Flags>
    +        static Ch *skip_and_expand_character_refs(Ch *&text)
    +        {
    +            // If entity translation, whitespace condense and whitespace trimming is disabled, use plain skip
    +            if (Flags & parse_no_entity_translation && 
    +                !(Flags & parse_normalize_whitespace) &&
    +                !(Flags & parse_trim_whitespace))
    +            {
    +                skip<StopPred, Flags>(text);
    +                return text;
    +            }
    +            
    +            // Use simple skip until first modification is detected
    +            skip<StopPredPure, Flags>(text);
    +
    +            // Use translation skip
    +            Ch *src = text;
    +            Ch *dest = src;
    +            while (StopPred::test(*src))
    +            {
    +                // If entity translation is enabled    
    +                if (!(Flags & parse_no_entity_translation))
    +                {
    +                    // Test if replacement is needed
    +                    if (src[0] == Ch('&'))
    +                    {
    +                        switch (src[1])
    +                        {
    +
    +                        // &amp; &apos;
    +                        case Ch('a'): 
    +                            if (src[2] == Ch('m') && src[3] == Ch('p') && src[4] == Ch(';'))
    +                            {
    +                                *dest = Ch('&');
    +                                ++dest;
    +                                src += 5;
    +                                continue;
    +                            }
    +                            if (src[2] == Ch('p') && src[3] == Ch('o') && src[4] == Ch('s') && src[5] == Ch(';'))
    +                            {
    +                                *dest = Ch('\'');
    +                                ++dest;
    +                                src += 6;
    +                                continue;
    +                            }
    +                            break;
    +
    +                        // &quot;
    +                        case Ch('q'): 
    +                            if (src[2] == Ch('u') && src[3] == Ch('o') && src[4] == Ch('t') && src[5] == Ch(';'))
    +                            {
    +                                *dest = Ch('"');
    +                                ++dest;
    +                                src += 6;
    +                                continue;
    +                            }
    +                            break;
    +
    +                        // &gt;
    +                        case Ch('g'): 
    +                            if (src[2] == Ch('t') && src[3] == Ch(';'))
    +                            {
    +                                *dest = Ch('>');
    +                                ++dest;
    +                                src += 4;
    +                                continue;
    +                            }
    +                            break;
    +
    +                        // &lt;
    +                        case Ch('l'): 
    +                            if (src[2] == Ch('t') && src[3] == Ch(';'))
    +                            {
    +                                *dest = Ch('<');
    +                                ++dest;
    +                                src += 4;
    +                                continue;
    +                            }
    +                            break;
    +
    +                        // &#...; - assumes ASCII
    +                        case Ch('#'): 
    +                            if (src[2] == Ch('x'))
    +                            {
    +                                unsigned long code = 0;
    +                                src += 3;   // Skip &#x
    +                                while (1)
    +                                {
    +                                    unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast<unsigned char>(*src)];
    +                                    if (digit == 0xFF)
    +                                        break;
    +                                    code = code * 16 + digit;
    +                                    ++src;
    +                                }
    +                                insert_coded_character<Flags>(dest, code);    // Put character in output
    +                            }
    +                            else
    +                            {
    +                                unsigned long code = 0;
    +                                src += 2;   // Skip &#
    +                                while (1)
    +                                {
    +                                    unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast<unsigned char>(*src)];
    +                                    if (digit == 0xFF)
    +                                        break;
    +                                    code = code * 10 + digit;
    +                                    ++src;
    +                                }
    +                                insert_coded_character<Flags>(dest, code);    // Put character in output
    +                            }
    +                            if (*src == Ch(';'))
    +                                ++src;
    +                            else
    +                                RAPIDXML_PARSE_ERROR("expected ;", src);
    +                            continue;
    +			}
    +
    +                        // Something else
    +			if (Flags & parse_xhtml_entity_translation)
    +			  if (translate_xhtml_entity(src, dest))
    +			    continue;
    +                    }
    +                }
    +                
    +                // If whitespace condensing is enabled
    +                if (Flags & parse_normalize_whitespace)
    +                {
    +                    // Test if condensing is needed                 
    +                    if (whitespace_pred::test(*src))
    +                    {
    +                        *dest = Ch(' '); ++dest;    // Put single space in dest
    +                        ++src;                      // Skip first whitespace char
    +                        // Skip remaining whitespace chars
    +                        while (whitespace_pred::test(*src))
    +                            ++src;
    +                        continue;
    +                    }
    +                }
    +
    +                // No replacement, only copy character
    +		if (Flags & parse_validate_utf8)
    +		  copy_check_utf8(const_cast<const Ch *&>(src), dest);
    +		else
    +		  *dest++ = *src++;
    +            }
    +
    +            // Return new end
    +            text = src;
    +            return dest;
    +
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////
    +        // Internal parsing functions
    +        
    +        // Parse BOM, if any
    +        template<int Flags>
    +        void parse_bom(Ch *&text)
    +        {
    +            // UTF-8?
    +            if (static_cast<unsigned char>(text[0]) == 0xEF && 
    +                static_cast<unsigned char>(text[1]) == 0xBB && 
    +                static_cast<unsigned char>(text[2]) == 0xBF)
    +            {
    +                text += 3;      // Skup utf-8 bom
    +            }
    +        }
    +
    +        // Parse XML declaration (<?xml...)
    +        template<int Flags>
    +        xml_node<Ch> *parse_xml_declaration(Ch *&text)
    +        {
    +            // If parsing of declaration is disabled
    +            if (!(Flags & parse_declaration_node))
    +            {
    +                // Skip until end of declaration
    +                while (text[0] != Ch('?') || text[1] != Ch('>'))
    +                {
    +                    if (!text[0])
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                    ++text;
    +                }
    +                text += 2;    // Skip '?>'
    +                return 0;
    +            }
    +
    +            // Create declaration
    +            xml_node<Ch> *declaration = this->allocate_node(node_declaration);
    +
    +            // Skip whitespace before attributes or ?>
    +            skip<whitespace_pred, Flags>(text);
    +
    +            // Parse declaration attributes
    +            parse_node_attributes<Flags>(text, declaration);
    +            
    +            // Skip ?>
    +            if (text[0] != Ch('?') || text[1] != Ch('>'))
    +                RAPIDXML_PARSE_ERROR("expected ?>", text);
    +            text += 2;
    +            
    +            return declaration;
    +        }
    +
    +        // Parse XML comment (<!--...)
    +        template<int Flags>
    +        xml_node<Ch> *parse_comment(Ch *&text)
    +        {
    +            // If parsing of comments is disabled
    +            if (!(Flags & parse_comment_nodes))
    +            {
    +                // Skip until end of comment
    +                while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
    +                {
    +                    if (!text[0])
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                    ++text;
    +                }
    +                text += 3;     // Skip '-->'
    +                return 0;      // Do not produce comment node
    +            }
    +
    +            // Remember value start
    +            Ch *value = text;
    +
    +            // Skip until end of comment
    +            while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
    +            {
    +                if (!text[0])
    +                    RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                ++text;
    +            }
    +
    +            // Create comment node
    +            xml_node<Ch> *comment = this->allocate_node(node_comment);
    +            comment->value(value, text - value);
    +            
    +            // Place zero terminator after comment value
    +            if (!(Flags & parse_no_string_terminators))
    +                *text = Ch('\0');
    +            
    +            text += 3;     // Skip '-->'
    +            return comment;
    +        }
    +
    +        // Parse DOCTYPE
    +        template<int Flags>
    +        xml_node<Ch> *parse_doctype(Ch *&text)
    +        {
    +            // Remember value start
    +            Ch *value = text;
    +
    +            // Skip to >
    +            while (*text != Ch('>'))
    +            {
    +                // Determine character type
    +                switch (*text)
    +                {
    +                
    +                // If '[' encountered, scan for matching ending ']' using naive algorithm with depth
    +                // This works for all W3C test files except for 2 most wicked
    +                case Ch('['):
    +                {
    +                    ++text;     // Skip '['
    +                    int depth = 1;
    +                    while (depth > 0)
    +                    {
    +                        switch (*text)
    +                        {
    +                            case Ch('['): ++depth; break;
    +                            case Ch(']'): --depth; break;
    +                            case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                        }
    +                        ++text;
    +                    }
    +                    break;
    +                }
    +                
    +                // Error on end of text
    +                case Ch('\0'):
    +                    RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                
    +                // Other character, skip it
    +                default:
    +                    ++text;
    +
    +                }
    +            }
    +            
    +            // If DOCTYPE nodes enabled
    +            if (Flags & parse_doctype_node)
    +            {
    +                // Create a new doctype node
    +                xml_node<Ch> *doctype = this->allocate_node(node_doctype);
    +                doctype->value(value, text - value);
    +                
    +                // Place zero terminator after value
    +                if (!(Flags & parse_no_string_terminators))
    +                    *text = Ch('\0');
    +
    +                text += 1;      // skip '>'
    +                return doctype;
    +            }
    +            else
    +            {
    +                text += 1;      // skip '>'
    +                return 0;
    +            }
    +
    +        }
    +
    +        // Parse PI
    +        template<int Flags>
    +        xml_node<Ch> *parse_pi(Ch *&text)
    +        {
    +            // If creation of PI nodes is enabled
    +            if (Flags & parse_pi_nodes)
    +            {
    +                // Create pi node
    +                xml_node<Ch> *pi = this->allocate_node(node_pi);
    +
    +                // Extract PI target name
    +                Ch *name = text;
    +                skip<node_name_pred, Flags>(text);
    +                if (text == name)
    +                    RAPIDXML_PARSE_ERROR("expected PI target", text);
    +                pi->name(name, text - name);
    +                
    +                // Skip whitespace between pi target and pi
    +                skip<whitespace_pred, Flags>(text);
    +
    +                // Remember start of pi
    +                Ch *value = text;
    +                
    +                // Skip to '?>'
    +                while (text[0] != Ch('?') || text[1] != Ch('>'))
    +                {
    +                    if (*text == Ch('\0'))
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                    ++text;
    +                }
    +
    +                // Set pi value (verbatim, no entity expansion or whitespace normalization)
    +                pi->value(value, text - value);     
    +                
    +                // Place zero terminator after name and value
    +                if (!(Flags & parse_no_string_terminators))
    +                {
    +                    pi->name()[pi->name_size()] = Ch('\0');
    +                    pi->value()[pi->value_size()] = Ch('\0');
    +                }
    +                
    +                text += 2;                          // Skip '?>'
    +                return pi;
    +            }
    +            else
    +            {
    +                // Skip to '?>'
    +                while (text[0] != Ch('?') || text[1] != Ch('>'))
    +                {
    +                    if (*text == Ch('\0'))
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +                    ++text;
    +                }
    +                text += 2;    // Skip '?>'
    +                return 0;
    +            }
    +        }
    +
    +        // Parse and append data
    +        // Return character that ends data.
    +        // This is necessary because this character might have been overwritten by a terminating 0
    +        template<int Flags>
    +        Ch parse_and_append_data(xml_node<Ch> *node, Ch *&text, Ch *contents_start)
    +        {
    +            // Backup to contents start if whitespace trimming is disabled
    +            if (!(Flags & parse_trim_whitespace))
    +                text = contents_start;     
    +            
    +            // Skip until end of data
    +            Ch *value = text, *end;
    +            if (Flags & parse_normalize_whitespace)
    +                end = skip_and_expand_character_refs<text_pred, text_pure_with_ws_pred, Flags>(text);   
    +            else
    +                end = skip_and_expand_character_refs<text_pred, text_pure_no_ws_pred, Flags>(text);
    +
    +            // Trim trailing whitespace if flag is set; leading was already trimmed by whitespace skip after >
    +            if (Flags & parse_trim_whitespace)
    +            {
    +                if (Flags & parse_normalize_whitespace)
    +                {
    +                    // Whitespace is already condensed to single space characters by skipping function, so just trim 1 char off the end
    +                    if (*(end - 1) == Ch(' '))
    +                        --end;
    +                }
    +                else
    +                {
    +                    // Backup until non-whitespace character is found
    +                    while (whitespace_pred::test(*(end - 1)))
    +                        --end;
    +                }
    +            }
    +            
    +            // If characters are still left between end and value (this test is only necessary if normalization is enabled)
    +            // Create new data node
    +            if (!(Flags & parse_no_data_nodes))
    +            {
    +                xml_node<Ch> *data = this->allocate_node(node_data);
    +                data->value(value, end - value);
    +                node->append_node(data);
    +            }
    +
    +            // Add data to parent node if no data exists yet
    +            if (!(Flags & parse_no_element_values)) 
    +                if (*node->value() == Ch('\0'))
    +                    node->value(value, end - value);
    +
    +            // Place zero terminator after value
    +            if (!(Flags & parse_no_string_terminators))
    +            {
    +                Ch ch = *text;
    +                *end = Ch('\0');
    +                return ch;      // Return character that ends data; this is required because zero terminator overwritten it
    +            }
    +
    +            // Return character that ends data
    +            return *text;
    +        }
    +
    +        // Parse CDATA
    +        template<int Flags>
    +        xml_node<Ch> *parse_cdata(Ch *&text)
    +        {
    +            // If CDATA is disabled
    +            if (Flags & parse_no_data_nodes)
    +            {
    +                // Skip until end of cdata
    +                while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
    +                {
    +                    if (!text[0])
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +		    next_char<Flags>(text);
    +                }
    +                text += 3;      // Skip ]]>
    +                return 0;       // Do not produce CDATA node
    +            }
    +
    +            // Skip until end of cdata
    +            Ch *value = text;
    +            while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
    +            {
    +                if (!text[0])
    +                    RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +		next_char<Flags>(text);
    +            }
    +
    +            // Create new cdata node
    +            xml_node<Ch> *cdata = this->allocate_node(node_cdata);
    +            cdata->value(value, text - value);
    +
    +            // Place zero terminator after value
    +            if (!(Flags & parse_no_string_terminators))
    +                *text = Ch('\0');
    +
    +            text += 3;      // Skip ]]>
    +            return cdata;
    +        }
    +        
    +        // Parse element node
    +        template<int Flags>
    +        xml_node<Ch> *parse_element(Ch *&text)
    +        {
    +            // Create element node
    +            xml_node<Ch> *element = this->allocate_node(node_element);
    +
    +            // Extract element name
    +            Ch *name = text;
    +            skip<node_name_pred, Flags>(text);
    +            if (text == name)
    +                RAPIDXML_PARSE_ERROR("expected element name", text);
    +            element->name(name, text - name);
    +            
    +            // Skip whitespace between element name and attributes or >
    +            skip<whitespace_pred, Flags>(text);
    +
    +            // Parse attributes, if any
    +            parse_node_attributes<Flags>(text, element);
    +
    +            // Determine ending type
    +            if (*text == Ch('>'))
    +            {
    +                ++text;
    +                parse_node_contents<Flags>(text, element);
    +            }
    +            else if (*text == Ch('/'))
    +            {
    +                ++text;
    +                if (*text != Ch('>'))
    +                    RAPIDXML_PARSE_ERROR("expected >", text);
    +                ++text;
    +            }
    +            else
    +                RAPIDXML_PARSE_ERROR("expected >", text);
    +
    +            // Place zero terminator after name
    +            if (!(Flags & parse_no_string_terminators))
    +                element->name()[element->name_size()] = Ch('\0');
    +
    +            // Return parsed element
    +            return element;
    +        }
    +
    +        // Determine node type, and parse it
    +        template<int Flags>
    +        xml_node<Ch> *parse_node(Ch *&text)
    +        {
    +            // Parse proper node type
    +            switch (text[0])
    +            {
    +
    +            // <...
    +            default: 
    +                // Parse and append element node
    +                return parse_element<Flags>(text);
    +
    +            // <?...
    +            case Ch('?'): 
    +                ++text;     // Skip ?
    +                if ((text[0] == Ch('x') || text[0] == Ch('X')) &&
    +                    (text[1] == Ch('m') || text[1] == Ch('M')) && 
    +                    (text[2] == Ch('l') || text[2] == Ch('L')) &&
    +                    whitespace_pred::test(text[3]))
    +                {
    +                    // '<?xml ' - xml declaration
    +                    text += 4;      // Skip 'xml '
    +                    return parse_xml_declaration<Flags>(text);
    +                }
    +                else
    +                {
    +                    // Parse PI
    +                    return parse_pi<Flags>(text);
    +                }
    +            
    +            // <!...
    +            case Ch('!'): 
    +
    +                // Parse proper subset of <! node
    +                switch (text[1])    
    +                {
    +                
    +                // <!-
    +                case Ch('-'):
    +                    if (text[2] == Ch('-'))
    +                    {
    +                        // '<!--' - xml comment
    +                        text += 3;     // Skip '!--'
    +                        return parse_comment<Flags>(text);
    +                    }
    +                    break;
    +
    +                // <![
    +                case Ch('['):
    +                    if (text[2] == Ch('C') && text[3] == Ch('D') && text[4] == Ch('A') && 
    +                        text[5] == Ch('T') && text[6] == Ch('A') && text[7] == Ch('['))
    +                    {
    +                        // '<![CDATA[' - cdata
    +                        text += 8;     // Skip '![CDATA['
    +                        return parse_cdata<Flags>(text);
    +                    }
    +                    break;
    +
    +                // <!D
    +                case Ch('D'):
    +                    if (text[2] == Ch('O') && text[3] == Ch('C') && text[4] == Ch('T') && 
    +                        text[5] == Ch('Y') && text[6] == Ch('P') && text[7] == Ch('E') && 
    +                        whitespace_pred::test(text[8]))
    +                    {
    +                        // '<!DOCTYPE ' - doctype
    +                        text += 9;      // skip '!DOCTYPE '
    +                        return parse_doctype<Flags>(text);
    +                    }
    +
    +                }   // switch
    +
    +                // Attempt to skip other, unrecognized node types starting with <!
    +                ++text;     // Skip !
    +                while (*text != Ch('>'))
    +                {
    +                    if (*text == 0)
    +                        RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +		    next_char<Flags>(text);
    +                }
    +                ++text;     // Skip '>'
    +                return 0;   // No node recognized
    +
    +            }
    +        }
    +
    +        // Parse contents of the node - children, data etc.
    +        template<int Flags>
    +        void parse_node_contents(Ch *&text, xml_node<Ch> *node)
    +        {
    +            // For all children and text
    +            while (1)
    +            {
    +                // Skip whitespace between > and node contents
    +                Ch *contents_start = text;      // Store start of node contents before whitespace is skipped
    +		if (Flags & parse_normalize_whitespace)
    +		  skip<whitespace_pred, Flags>(text);
    +                Ch next_char = *text;
    +
    +            // After data nodes, instead of continuing the loop, control jumps here.
    +            // This is because zero termination inside parse_and_append_data() function
    +            // would wreak havoc with the above code.
    +            // Also, skipping whitespace after data nodes is unnecessary.
    +            after_data_node:    
    +                
    +                // Determine what comes next: node closing, child node, data node, or 0?
    +                switch (next_char)
    +                {
    +                
    +                // Node closing or child node
    +                case Ch('<'):
    +                    if (text[1] == Ch('/'))
    +                    {
    +                        // Node closing
    +                        text += 2;      // Skip '</'
    +                        if (Flags & parse_validate_closing_tags)
    +                        {
    +                            // Skip and validate closing tag name
    +                            Ch *closing_name = text;
    +                            skip<node_name_pred, Flags>(text);
    +                            if (!internal::compare(node->name(), node->name_size(), closing_name, text - closing_name, true))
    +                                RAPIDXML_PARSE_ERROR("invalid closing tag name", text);
    +                        }
    +                        else
    +                        {
    +                            // No validation, just skip name
    +                            skip<node_name_pred, Flags>(text);
    +                        }
    +                        // Skip remaining whitespace after node name
    +                        skip<whitespace_pred, Flags>(text);
    +                        if (*text != Ch('>'))
    +                            RAPIDXML_PARSE_ERROR("expected >", text);
    +                        ++text;     // Skip '>'
    +                        return;     // Node closed, finished parsing contents
    +                    }
    +                    else
    +                    {
    +                        // Child node
    +                        ++text;     // Skip '<'
    +                        if (xml_node<Ch> *child = parse_node<Flags>(text))
    +                            node->append_node(child);
    +                    }
    +                    break;
    +
    +                // End of data - error
    +                case Ch('\0'):
    +                    RAPIDXML_PARSE_ERROR("unexpected end of data", text);
    +
    +                // Data node
    +                default:
    +                    next_char = parse_and_append_data<Flags>(node, text, contents_start);
    +                    goto after_data_node;   // Bypass regular processing after data nodes
    +
    +                }
    +            }
    +        }
    +        
    +        // Parse XML attributes of the node
    +        template<int Flags>
    +        void parse_node_attributes(Ch *&text, xml_node<Ch> *node)
    +        {
    +            // For all attributes 
    +            while (attribute_name_pred::test(*text))
    +            {
    +                // Extract attribute name
    +                Ch *name = text;
    +                ++text;     // Skip first character of attribute name
    +                skip<attribute_name_pred, Flags>(text);
    +                if (text == name)
    +                    RAPIDXML_PARSE_ERROR("expected attribute name", name);
    +
    +                // Create new attribute
    +                xml_attribute<Ch> *attribute = this->allocate_attribute();
    +                attribute->name(name, text - name);
    +                node->append_attribute(attribute);
    +
    +                // Skip whitespace after attribute name
    +                skip<whitespace_pred, Flags>(text);
    +
    +                // Skip =
    +                if (*text != Ch('='))
    +                    RAPIDXML_PARSE_ERROR("expected =", text);
    +                ++text;
    +
    +                // Add terminating zero after name
    +                if (!(Flags & parse_no_string_terminators))
    +                    attribute->name()[attribute->name_size()] = 0;
    +
    +                // Skip whitespace after =
    +                skip<whitespace_pred, Flags>(text);
    +
    +                // Skip quote and remember if it was ' or "
    +                Ch quote = *text;
    +                if (quote != Ch('\'') && quote != Ch('"'))
    +                    RAPIDXML_PARSE_ERROR("expected ' or \"", text);
    +                ++text;
    +
    +                // Extract attribute value and expand char refs in it
    +                Ch *value = text, *end;
    +                const int AttFlags = Flags & ~parse_normalize_whitespace;   // No whitespace normalization in attributes
    +                if (quote == Ch('\''))
    +                    end = skip_and_expand_character_refs<attribute_value_pred<Ch('\'')>, attribute_value_pure_pred<Ch('\'')>, AttFlags>(text);
    +                else
    +                    end = skip_and_expand_character_refs<attribute_value_pred<Ch('"')>, attribute_value_pure_pred<Ch('"')>, AttFlags>(text);
    +                
    +                // Set attribute value
    +                attribute->value(value, end - value);
    +                
    +                // Make sure that end quote is present
    +                if (*text != quote)
    +                    RAPIDXML_PARSE_ERROR("expected ' or \"", text);
    +                ++text;     // Skip quote
    +
    +                // Add terminating zero after value
    +                if (!(Flags & parse_no_string_terminators))
    +                    attribute->value()[attribute->value_size()] = 0;
    +
    +                // Skip whitespace after attribute value
    +                skip<whitespace_pred, Flags>(text);
    +            }
    +        }
    +
    +    };
    +
    +    //! \cond internal
    +    namespace internal
    +    {
    +
    +        // Whitespace (space \n \r \t)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_whitespace[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  1,  0,  0,  // 0
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 1
    +             1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 2
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 3
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 4
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 5
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 6
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 7
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 8
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 9
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // A
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // B
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // C
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // D
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // E
    +             0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0   // F
    +        };
    +
    +        // Node name (anything but space \n \r \t / > ? \0)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_node_name[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  1,  1,  0,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Text (i.e. PCDATA) (anything but < \0)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_text[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Text (i.e. PCDATA) that does not require processing when ws normalization is disabled 
    +        // (anything but < \0 &)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_text_pure_no_ws[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Text (i.e. PCDATA) that does not require processing when ws normalizationis is enabled
    +        // (anything but < \0 & space \n \r \t)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_text_pure_with_ws[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  1,  1,  0,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             0,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Attribute name (anything but space \n \r \t / < > = ? ! \0)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_attribute_name[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  1,  1,  0,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Attribute data with single quote (anything but ' \0)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_attribute_data_1[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Attribute data with single quote that does not require processing (anything but ' \0 &)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_attribute_data_1_pure[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  1,  1,  1,  1,  0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Attribute data with double quote (anything but " \0)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_attribute_data_2[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Attribute data with double quote that does not require processing (anything but " \0 &)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_attribute_data_2_pure[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +             0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 0
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 1
    +             1,  1,  0,  1,  1,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 2
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 3
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 4
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 5
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 6
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 7
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 8
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // 9
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // A
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // B
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // C
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // D
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  // E
    +             1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1   // F
    +        };
    +
    +        // Digits (dec and hex, 255 denotes end of numeric character reference)
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_digits[256] = 
    +        {
    +          // 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 0
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 1
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 2
    +             0,  1,  2,  3,  4,  5,  6,  7,  8,  9,255,255,255,255,255,255,  // 3
    +           255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255,  // 4
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 5
    +           255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255,  // 6
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 7
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 8
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // 9
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // A
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // B
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // C
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // D
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  // E
    +           255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255   // F
    +        };
    +    
    +        // Upper case conversion
    +        template<int Dummy>
    +        const unsigned char lookup_tables<Dummy>::lookup_upcase[256] = 
    +        {
    +          // 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  A   B   C   D   E   F
    +           0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 15,   // 0
    +           16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,   // 1
    +           32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,   // 2
    +           48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,   // 3
    +           64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,   // 4
    +           80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,   // 5
    +           96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,   // 6
    +           80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127,  // 7
    +           128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,  // 8
    +           144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,  // 9
    +           160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,  // A
    +           176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,  // B
    +           192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,  // C
    +           208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,  // D
    +           224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,  // E
    +           240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255   // F
    +        };
    +    }
    +    //! \endcond
    +
    +}
    +
    +// Undefine internal macros
    +#undef RAPIDXML_PARSE_ERROR
    +
    +// On MSVC, restore warnings state
    +#ifdef _MSC_VER
    +    #pragma warning(pop)
    +#endif
    +
    +#endif
    diff --git a/wt-3.1.7a/src/rapidxml/rapidxml_iterators.hpp b/wt-3.1.7a/src/rapidxml/rapidxml_iterators.hpp
    new file mode 100644
    index 0000000..52ebc29
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/rapidxml_iterators.hpp
    @@ -0,0 +1,174 @@
    +#ifndef RAPIDXML_ITERATORS_HPP_INCLUDED
    +#define RAPIDXML_ITERATORS_HPP_INCLUDED
    +
    +// Copyright (C) 2006, 2009 Marcin Kalicinski
    +// Version 1.13
    +// Revision $DateTime: 2009/05/13 01:46:17 $
    +//! \file rapidxml_iterators.hpp This file contains rapidxml iterators
    +
    +#include "rapidxml.hpp"
    +
    +namespace rapidxml
    +{
    +
    +    //! Iterator of child nodes of xml_node
    +    template<class Ch>
    +    class node_iterator
    +    {
    +    
    +    public:
    +
    +        typedef typename xml_node<Ch> value_type;
    +        typedef typename xml_node<Ch> &reference;
    +        typedef typename xml_node<Ch> *pointer;
    +        typedef std::ptrdiff_t difference_type;
    +        typedef std::bidirectional_iterator_tag iterator_category;
    +        
    +        node_iterator()
    +            : m_node(0)
    +        {
    +        }
    +
    +        node_iterator(xml_node<Ch> *node)
    +            : m_node(node->first_node())
    +        {
    +        }
    +        
    +        reference operator *() const
    +        {
    +            assert(m_node);
    +            return *m_node;
    +        }
    +
    +        pointer operator->() const
    +        {
    +            assert(m_node);
    +            return m_node;
    +        }
    +
    +        node_iterator& operator++()
    +        {
    +            assert(m_node);
    +            m_node = m_node->next_sibling();
    +            return *this;
    +        }
    +
    +        node_iterator operator++(int)
    +        {
    +            node_iterator tmp = *this;
    +            ++this;
    +            return tmp;
    +        }
    +
    +        node_iterator& operator--()
    +        {
    +            assert(m_node && m_node->previous_sibling());
    +            m_node = m_node->previous_sibling();
    +            return *this;
    +        }
    +
    +        node_iterator operator--(int)
    +        {
    +            node_iterator tmp = *this;
    +            ++this;
    +            return tmp;
    +        }
    +
    +        bool operator ==(const node_iterator<Ch> &rhs)
    +        {
    +            return m_node == rhs.m_node;
    +        }
    +
    +        bool operator !=(const node_iterator<Ch> &rhs)
    +        {
    +            return m_node != rhs.m_node;
    +        }
    +
    +    private:
    +
    +        xml_node<Ch> *m_node;
    +
    +    };
    +
    +    //! Iterator of child attributes of xml_node
    +    template<class Ch>
    +    class attribute_iterator
    +    {
    +    
    +    public:
    +
    +        typedef typename xml_attribute<Ch> value_type;
    +        typedef typename xml_attribute<Ch> &reference;
    +        typedef typename xml_attribute<Ch> *pointer;
    +        typedef std::ptrdiff_t difference_type;
    +        typedef std::bidirectional_iterator_tag iterator_category;
    +        
    +        attribute_iterator()
    +            : m_attribute(0)
    +        {
    +        }
    +
    +        attribute_iterator(xml_node<Ch> *node)
    +            : m_attribute(node->first_attribute())
    +        {
    +        }
    +        
    +        reference operator *() const
    +        {
    +            assert(m_attribute);
    +            return *m_attribute;
    +        }
    +
    +        pointer operator->() const
    +        {
    +            assert(m_attribute);
    +            return m_attribute;
    +        }
    +
    +        attribute_iterator& operator++()
    +        {
    +            assert(m_attribute);
    +            m_attribute = m_attribute->next_attribute();
    +            return *this;
    +        }
    +
    +        attribute_iterator operator++(int)
    +        {
    +            attribute_iterator tmp = *this;
    +            ++this;
    +            return tmp;
    +        }
    +
    +        attribute_iterator& operator--()
    +        {
    +            assert(m_attribute && m_attribute->previous_attribute());
    +            m_attribute = m_attribute->previous_attribute();
    +            return *this;
    +        }
    +
    +        attribute_iterator operator--(int)
    +        {
    +            attribute_iterator tmp = *this;
    +            ++this;
    +            return tmp;
    +        }
    +
    +        bool operator ==(const attribute_iterator<Ch> &rhs)
    +        {
    +            return m_attribute == rhs.m_attribute;
    +        }
    +
    +        bool operator !=(const attribute_iterator<Ch> &rhs)
    +        {
    +            return m_attribute != rhs.m_attribute;
    +        }
    +
    +    private:
    +
    +        xml_attribute<Ch> *m_attribute;
    +
    +    };
    +
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/rapidxml/rapidxml_print.hpp b/wt-3.1.7a/src/rapidxml/rapidxml_print.hpp
    new file mode 100644
    index 0000000..3472ea0
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/rapidxml_print.hpp
    @@ -0,0 +1,451 @@
    +#ifndef RAPIDXML_PRINT_HPP_INCLUDED
    +#define RAPIDXML_PRINT_HPP_INCLUDED
    +
    +// Copyright (C) 2006, 2009 Marcin Kalicinski
    +// Version 1.13
    +// Revision $DateTime: 2009/05/13 01:46:17 $
    +//! \file rapidxml_print.hpp This file contains rapidxml printer implementation
    +
    +#include "rapidxml.hpp"
    +
    +// Only include streams if not disabled
    +#ifndef RAPIDXML_NO_STREAMS
    +    #include <ostream>
    +    #include <iterator>
    +#endif
    +
    +namespace rapidxml
    +{
    +
    +    ///////////////////////////////////////////////////////////////////////
    +    // Printing flags
    +
    +    const int print_no_indenting = 0x1;   //!< Printer flag instructing the printer to suppress indenting of XML. See print() function.
    +
    +    ///////////////////////////////////////////////////////////////////////
    +    // Internal
    +
    +    //! \cond internal
    +    namespace internal
    +    {
    +        
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Internal character operations
    +    
    +        // Copy characters from given range to given output iterator
    +        template<class OutIt, class Ch>
    +        inline OutIt copy_chars(const Ch *begin, const Ch *end, OutIt out)
    +        {
    +            while (begin != end)
    +                *out++ = *begin++;
    +            return out;
    +        }
    +
    +        // Copy characters from given range to given output iterator and expand
    +        // characters into references (&lt; &gt; &apos; &quot; &amp;)
    +        template<class OutIt, class Ch>
    +        inline OutIt copy_and_expand_chars(const Ch *begin, const Ch *end, Ch noexpand, OutIt out, bool quotesToo)
    +        {
    +            while (begin != end)
    +            {
    +                if (*begin == noexpand)
    +                {
    +                    *out++ = *begin;    // No expansion, copy character
    +                }
    +                else
    +                {
    +                    switch (*begin)
    +                    {
    +                    case Ch('<'):
    +                        *out++ = Ch('&'); *out++ = Ch('l'); *out++ = Ch('t'); *out++ = Ch(';');
    +                        break;
    +                    case Ch('>'): 
    +                        *out++ = Ch('&'); *out++ = Ch('g'); *out++ = Ch('t'); *out++ = Ch(';');
    +                        break;
    +                    case Ch('\''): 
    +		        if (quotesToo) {
    +			  *out++ = Ch('&'); *out++ = Ch('#'); *out++ = Ch('3'); *out++ = Ch('9'); *out++ = Ch(';');
    +			} else
    +			  *out++ = *begin;
    +                        break;
    +                    case Ch('"'): 
    +		        if (quotesToo) {
    +			  *out++ = Ch('&'); *out++ = Ch('q'); *out++ = Ch('u'); *out++ = Ch('o'); *out++ = Ch('t'); *out++ = Ch(';');
    +			} else
    +			  *out++ = *begin;
    +                        break;
    +                    case Ch('&'): 
    +                        *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('m'); *out++ = Ch('p'); *out++ = Ch(';'); 
    +                        break;
    +                    default:
    +                        *out++ = *begin;    // No expansion, copy character
    +                    }
    +                }
    +                ++begin;    // Step to next character
    +            }
    +            return out;
    +        }
    +
    +        // Fill given output iterator with repetitions of the same character
    +        template<class OutIt, class Ch>
    +        inline OutIt fill_chars(OutIt out, int n, Ch ch)
    +        {
    +            for (int i = 0; i < n; ++i)
    +                *out++ = ch;
    +            return out;
    +        }
    +
    +        // Find character
    +        template<class Ch, Ch ch>
    +        inline bool find_char(const Ch *begin, const Ch *end)
    +        {
    +            while (begin != end)
    +                if (*begin++ == ch)
    +                    return true;
    +            return false;
    +        }
    +
    +        ///////////////////////////////////////////////////////////////////////////
    +        // Internal printing operations
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_children(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_element_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_data_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +    
    +        template<class OutIt, class Ch>
    +        OutIt print_cdata_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_declaration_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_comment_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_doctype_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        template<class OutIt, class Ch>
    +        OutIt print_pi_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
    +
    +        // Print node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            // Print proper node type
    +            switch (node->type())
    +            {
    +
    +            // Document
    +            case node_document:
    +                out = print_children(out, node, flags, indent);
    +                break;
    +
    +            // Element
    +            case node_element:
    +                out = print_element_node(out, node, flags, indent);
    +                break;
    +            
    +            // Data
    +            case node_data:
    +                out = print_data_node(out, node, flags, indent);
    +                break;
    +            
    +            // CDATA
    +            case node_cdata:
    +                out = print_cdata_node(out, node, flags, indent);
    +                break;
    +
    +            // Declaration
    +            case node_declaration:
    +                out = print_declaration_node(out, node, flags, indent);
    +                break;
    +
    +            // Comment
    +            case node_comment:
    +                out = print_comment_node(out, node, flags, indent);
    +                break;
    +            
    +            // Doctype
    +            case node_doctype:
    +                out = print_doctype_node(out, node, flags, indent);
    +                break;
    +
    +            // Pi
    +            case node_pi:
    +                out = print_pi_node(out, node, flags, indent);
    +                break;
    +
    +                // Unknown
    +            default:
    +                assert(0);
    +                break;
    +            }
    +            
    +            // If indenting not disabled, add line break after node
    +            if (!(flags & print_no_indenting))
    +                *out = Ch('\n'), ++out;
    +
    +            // Return modified iterator
    +            return out;
    +        }
    +        
    +        // Print children of the node                               
    +        template<class OutIt, class Ch>
    +        inline OutIt print_children(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            for (xml_node<Ch> *child = node->first_node(); child; child = child->next_sibling())
    +                out = print_node(out, child, flags, indent);
    +            return out;
    +        }
    +
    +        // Print attributes of the node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_attributes(OutIt out, const xml_node<Ch> *node, int flags)
    +        {
    +            for (xml_attribute<Ch> *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute())
    +            {
    +                if (attribute->name() && attribute->value())
    +                {
    +                    // Print attribute name
    +                    *out = Ch(' '), ++out;
    +                    out = copy_chars(attribute->name(), attribute->name() + attribute->name_size(), out);
    +                    *out = Ch('='), ++out;
    +                    // Print attribute value using appropriate quote type
    +                    if (find_char<Ch, Ch('"')>(attribute->value(), attribute->value() + attribute->value_size()))
    +                    {
    +                        *out = Ch('\''), ++out;
    +                        out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('"'), out, true);
    +                        *out = Ch('\''), ++out;
    +                    }
    +                    else
    +                    {
    +                        *out = Ch('"'), ++out;
    +                        out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('\''), out, true);
    +                        *out = Ch('"'), ++out;
    +                    }
    +                }
    +            }
    +            return out;
    +        }
    +
    +        // Print data node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_data_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_data);
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out, false);
    +            return out;
    +        }
    +
    +        // Print data node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_cdata_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_cdata);
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'); ++out;
    +            *out = Ch('!'); ++out;
    +            *out = Ch('['); ++out;
    +            *out = Ch('C'); ++out;
    +            *out = Ch('D'); ++out;
    +            *out = Ch('A'); ++out;
    +            *out = Ch('T'); ++out;
    +            *out = Ch('A'); ++out;
    +            *out = Ch('['); ++out;
    +            out = copy_chars(node->value(), node->value() + node->value_size(), out);
    +            *out = Ch(']'); ++out;
    +            *out = Ch(']'); ++out;
    +            *out = Ch('>'); ++out;
    +            return out;
    +        }
    +
    +        // Print element node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_element_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_element);
    +
    +            // Print element name and attributes, if any
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'), ++out;
    +            out = copy_chars(node->name(), node->name() + node->name_size(), out);
    +            out = print_attributes(out, node, flags);
    +            
    +            // If node is childless
    +            if (node->value_size() == 0 && !node->first_node())
    +            {
    +                // Print childless node tag ending
    +                *out = Ch('/'), ++out;
    +                *out = Ch('>'), ++out;
    +            }
    +            else
    +            {
    +                // Print normal node tag ending
    +                *out = Ch('>'), ++out;
    +
    +                // Test if node contains a single data node only (and no other nodes)
    +                xml_node<Ch> *child = node->first_node();
    +                if (!child)
    +                {
    +                    // If node has no children, only print its value without indenting
    +		  out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out, false);
    +                }
    +                else if (child->next_sibling() == 0 && child->type() == node_data)
    +                {
    +                    // If node has a sole data child, only print its value without indenting
    +		  out = copy_and_expand_chars(child->value(), child->value() + child->value_size(), Ch(0), out, false);
    +                }
    +                else
    +                {
    +                    // Print all children with full indenting
    +                    if (!(flags & print_no_indenting))
    +                        *out = Ch('\n'), ++out;
    +                    out = print_children(out, node, flags, indent + 1);
    +                    if (!(flags & print_no_indenting))
    +                        out = fill_chars(out, indent, Ch('\t'));
    +                }
    +
    +                // Print node end
    +                *out = Ch('<'), ++out;
    +                *out = Ch('/'), ++out;
    +                out = copy_chars(node->name(), node->name() + node->name_size(), out);
    +                *out = Ch('>'), ++out;
    +            }
    +            return out;
    +        }
    +
    +        // Print declaration node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_declaration_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            // Print declaration start
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'), ++out;
    +            *out = Ch('?'), ++out;
    +            *out = Ch('x'), ++out;
    +            *out = Ch('m'), ++out;
    +            *out = Ch('l'), ++out;
    +
    +            // Print attributes
    +            out = print_attributes(out, node, flags);
    +            
    +            // Print declaration end
    +            *out = Ch('?'), ++out;
    +            *out = Ch('>'), ++out;
    +            
    +            return out;
    +        }
    +
    +        // Print comment node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_comment_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_comment);
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'), ++out;
    +            *out = Ch('!'), ++out;
    +            *out = Ch('-'), ++out;
    +            *out = Ch('-'), ++out;
    +            out = copy_chars(node->value(), node->value() + node->value_size(), out);
    +            *out = Ch('-'), ++out;
    +            *out = Ch('-'), ++out;
    +            *out = Ch('>'), ++out;
    +            return out;
    +        }
    +
    +        // Print doctype node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_doctype_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_doctype);
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'), ++out;
    +            *out = Ch('!'), ++out;
    +            *out = Ch('D'), ++out;
    +            *out = Ch('O'), ++out;
    +            *out = Ch('C'), ++out;
    +            *out = Ch('T'), ++out;
    +            *out = Ch('Y'), ++out;
    +            *out = Ch('P'), ++out;
    +            *out = Ch('E'), ++out;
    +            *out = Ch(' '), ++out;
    +            out = copy_chars(node->value(), node->value() + node->value_size(), out);
    +            *out = Ch('>'), ++out;
    +            return out;
    +        }
    +
    +        // Print pi node
    +        template<class OutIt, class Ch>
    +        inline OutIt print_pi_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)
    +        {
    +            assert(node->type() == node_pi);
    +            if (!(flags & print_no_indenting))
    +                out = fill_chars(out, indent, Ch('\t'));
    +            *out = Ch('<'), ++out;
    +            *out = Ch('?'), ++out;
    +            out = copy_chars(node->name(), node->name() + node->name_size(), out);
    +            *out = Ch(' '), ++out;
    +            out = copy_chars(node->value(), node->value() + node->value_size(), out);
    +            *out = Ch('?'), ++out;
    +            *out = Ch('>'), ++out;
    +            return out;
    +        }
    +
    +    }
    +    //! \endcond
    +
    +    ///////////////////////////////////////////////////////////////////////////
    +    // Printing
    +
    +    //! Prints XML to given output iterator.
    +    //! \param out Output iterator to print to.
    +    //! \param node Node to be printed. Pass xml_document to print entire document.
    +    //! \param flags Flags controlling how XML is printed.
    +    //! \return Output iterator pointing to position immediately after last character of printed text.
    +    template<class OutIt, class Ch> 
    +    inline OutIt print(OutIt out, const xml_node<Ch> &node, int flags = 0)
    +    {
    +        return internal::print_node(out, &node, flags, 0);
    +    }
    +
    +#ifndef RAPIDXML_NO_STREAMS
    +
    +    //! Prints XML to given output stream.
    +    //! \param out Output stream to print to.
    +    //! \param node Node to be printed. Pass xml_document to print entire document.
    +    //! \param flags Flags controlling how XML is printed.
    +    //! \return Output stream.
    +    template<class Ch> 
    +    inline std::basic_ostream<Ch> &print(std::basic_ostream<Ch> &out, const xml_node<Ch> &node, int flags = 0)
    +    {
    +        print(std::ostream_iterator<Ch>(out), node, flags);
    +        return out;
    +    }
    +
    +    //! Prints formatted XML to given output stream. Uses default printing flags. Use print() function to customize printing process.
    +    //! \param out Output stream to print to.
    +    //! \param node Node to be printed.
    +    //! \return Output stream.
    +    template<class Ch> 
    +    inline std::basic_ostream<Ch> &operator <<(std::basic_ostream<Ch> &out, const xml_node<Ch> &node)
    +    {
    +        return print(out, node);
    +    }
    +
    +#endif
    +
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/rapidxml/rapidxml_utils.hpp b/wt-3.1.7a/src/rapidxml/rapidxml_utils.hpp
    new file mode 100644
    index 0000000..37c2953
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/rapidxml_utils.hpp
    @@ -0,0 +1,122 @@
    +#ifndef RAPIDXML_UTILS_HPP_INCLUDED
    +#define RAPIDXML_UTILS_HPP_INCLUDED
    +
    +// Copyright (C) 2006, 2009 Marcin Kalicinski
    +// Version 1.13
    +// Revision $DateTime: 2009/05/13 01:46:17 $
    +//! \file rapidxml_utils.hpp This file contains high-level rapidxml utilities that can be useful
    +//! in certain simple scenarios. They should probably not be used if maximizing performance is the main objective.
    +
    +#include "rapidxml.hpp"
    +#include <vector>
    +#include <string>
    +#include <fstream>
    +#include <stdexcept>
    +
    +namespace rapidxml
    +{
    +
    +    //! Represents data loaded from a file
    +    template<class Ch = char>
    +    class file
    +    {
    +        
    +    public:
    +        
    +        //! Loads file into the memory. Data will be automatically destroyed by the destructor.
    +        //! \param filename Filename to load.
    +        file(const char *filename)
    +        {
    +            using namespace std;
    +
    +            // Open stream
    +            basic_ifstream<Ch> stream(filename, ios::binary);
    +            if (!stream)
    +                throw runtime_error(string("cannot open file ") + filename);
    +            stream.unsetf(ios::skipws);
    +            
    +            // Determine stream size
    +            stream.seekg(0, ios::end);
    +            size_t size = stream.tellg();
    +            stream.seekg(0);   
    +            
    +            // Load data and add terminating 0
    +            m_data.resize(size + 1);
    +            stream.read(&m_data.front(), static_cast<streamsize>(size));
    +            m_data[size] = 0;
    +        }
    +
    +        //! Loads file into the memory. Data will be automatically destroyed by the destructor
    +        //! \param stream Stream to load from
    +        file(std::basic_istream<Ch> &stream)
    +        {
    +            using namespace std;
    +
    +            // Load data and add terminating 0
    +            stream.unsetf(ios::skipws);
    +            m_data.assign(istreambuf_iterator<Ch>(stream), istreambuf_iterator<Ch>());
    +            if (stream.fail() || stream.bad())
    +                throw runtime_error("error reading stream");
    +            m_data.push_back(0);
    +        }
    +        
    +        //! Gets file data.
    +        //! \return Pointer to data of file.
    +        Ch *data()
    +        {
    +            return &m_data.front();
    +        }
    +
    +        //! Gets file data.
    +        //! \return Pointer to data of file.
    +        const Ch *data() const
    +        {
    +            return &m_data.front();
    +        }
    +
    +        //! Gets file data size.
    +        //! \return Size of file data, in characters.
    +        std::size_t size() const
    +        {
    +            return m_data.size();
    +        }
    +
    +    private:
    +
    +        std::vector<Ch> m_data;   // File data
    +
    +    };
    +
    +    //! Counts children of node. Time complexity is O(n).
    +    //! \return Number of children of node
    +    template<class Ch>
    +    inline std::size_t count_children(xml_node<Ch> *node)
    +    {
    +        xml_node<Ch> *child = node->first_node();
    +        std::size_t count = 0;
    +        while (child)
    +        {
    +            ++count;
    +            child = child->next_sibling();
    +        }
    +        return count;
    +    }
    +
    +    //! Counts attributes of node. Time complexity is O(n).
    +    //! \return Number of attributes of node
    +    template<class Ch>
    +    inline std::size_t count_attributes(xml_node<Ch> *node)
    +    {
    +        xml_attribute<Ch> *attr = node->first_attribute();
    +        std::size_t count = 0;
    +        while (attr)
    +        {
    +            ++count;
    +            attr = attr->next_attribute();
    +        }
    +        return count;
    +    }
    +
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/rapidxml/rapidxml_xhtml.hpp b/wt-3.1.7a/src/rapidxml/rapidxml_xhtml.hpp
    new file mode 100644
    index 0000000..bf47962
    --- /dev/null
    +++ b/wt-3.1.7a/src/rapidxml/rapidxml_xhtml.hpp
    @@ -0,0 +1,387 @@
    +// Use of this software is granted under one of the following two licenses,
    +// to be chosen freely by the user.
    +
    +// 1. Boost Software License - Version 1.0 - August 17th, 2003
    +// ===============================================================================
    +
    +// Copyright (c) 2010 Emweb bvba (Heverlee, Belgium)
    +
    +// Permission is hereby granted, free of charge, to any person or organization
    +// obtaining a copy of the software and accompanying documentation covered by
    +// this license (the "Software") to use, reproduce, display, distribute,
    +// execute, and transmit the Software, and to prepare derivative works of the
    +// Software, and to permit third-parties to whom the Software is furnished to
    +// do so, all subject to the following:
    +
    +// The copyright notices in the Software and this entire statement, including
    +// the above license grant, this restriction and the following disclaimer,
    +// must be included in all copies of the Software, in whole or in part, and
    +// all derivative works of the Software, unless such copies or derivative
    +// works are solely in the form of machine-executable object code generated by
    +// a source language processor.
    +
    +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    +// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    +// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    +// DEALINGS IN THE SOFTWARE.
    +
    +// 2. The MIT License
    +// ===============================================================================
    +
    +// Copyright (c) 2010 Emweb bvba (Heverlee, Belgium)
    +
    +// Permission is hereby granted, free of charge, to any person obtaining a copy 
    +// of this software and associated documentation files (the "Software"), to deal 
    +// in the Software without restriction, including without limitation the rights 
    +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
    +// of the Software, and to permit persons to whom the Software is furnished to do so, 
    +// subject to the following conditions:
    +
    +// The above copyright notice and this permission notice shall be included in all 
    +// copies or substantial portions of the Software.
    +
    +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
    +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
    +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
    +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
    +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
    +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
    +// IN THE SOFTWARE.
    +#ifndef RAPIDXML_XHTML_HPP_INCLUDED
    +#define RAPIDXML_XHTML_HPP_INCLUDED
    +
    +#include <cstddef>
    +#include <cstring>
    +
    +namespace rapidxml
    +{
    +    namespace internal
    +    {
    +        template<class Ch> inline std::size_t measure(const Ch *p);
    +    }
    +
    +    // returns true if the src could be interpreted as an xhtml entity reference and
    +    // decoded as utf8 into dest
    +
    +    template<class Ch>
    +    bool translate_xhtml_entity(Ch *& src, Ch *& dest)
    +    {
    +      // Caveat: assumes output encoding is UTF-8
    +
    +      const int entity_count = 257;
    +
    +      struct Entity {
    +	const char *name;
    +	const char *utf8;
    +      } entities[] = {
    +	{ "AElig", "\xc3\x86" },
    +	{ "Aacute", "\xc3\x81" },
    +	{ "Acirc", "\xc3\x82" },
    +	{ "Agrave", "\xc3\x80" },
    +	{ "Alpha", "\xce\x91" },
    +	{ "Aring", "\xc3\x85" },
    +	{ "Atilde", "\xc3\x83" },
    +	{ "Auml", "\xc3\x84" },
    +	{ "Beta", "\xce\x92" },
    +	{ "Ccedil", "\xc3\x87" },
    +	{ "Chi", "\xce\xa7" },
    +	{ "Dagger", "\xe2\x80\xa1" },
    +	{ "Delta", "\xce\x94" },
    +	{ "Dstrok", "\xc3\x90" },
    +	{ "ETH", "\xc3\x90" },
    +	{ "Eacute", "\xc3\x89" },
    +	{ "Ecirc", "\xc3\x8a" },
    +	{ "Egrave", "\xc3\x88" },
    +	{ "Epsilon", "\xce\x95" },
    +	{ "Eta", "\xce\x97" },
    +	{ "Euml", "\xc3\x8b" },
    +	{ "Gamma", "\xce\x93" },
    +	{ "Iacute", "\xc3\x8d" },
    +	{ "Icirc", "\xc3\x8e" },
    +	{ "Igrave", "\xc3\x8c" },
    +	{ "Iota", "\xce\x99" },
    +	{ "Iuml", "\xc3\x8f" },
    +	{ "Kappa", "\xce\x9a" },
    +	{ "Lambda", "\xce\x9b" },
    +	{ "Mu", "\xce\x9c" },
    +	{ "Ntilde", "\xc3\x91" },
    +	{ "Nu", "\xce\x9d" },
    +	{ "OElig", "\xc5\x92" },
    +	{ "Oacute", "\xc3\x93" },
    +	{ "Ocirc", "\xc3\x94" },
    +	{ "Ograve", "\xc3\x92" },
    +	{ "Omega", "\xce\xa9" },
    +	{ "Omicron", "\xce\x9f" },
    +	{ "Oslash", "\xc3\x98" },
    +	{ "Otilde", "\xc3\x95" },
    +	{ "Ouml", "\xc3\x96" },
    +	{ "Phi", "\xce\xa6" },
    +	{ "Pi", "\xce\xa0" },
    +	{ "Prime", "\xe2\x80\xb3" },
    +	{ "Psi", "\xce\xa8" },
    +	{ "Rho", "\xce\xa1" },
    +	{ "Scaron", "\xc5\xa0" },
    +	{ "Sigma", "\xce\xa3" },
    +	{ "THORN", "\xc3\x9e" },
    +	{ "Tau", "\xce\xa4" },
    +	{ "Theta", "\xce\x98" },
    +	{ "Uacute", "\xc3\x9a" },
    +	{ "Ucirc", "\xc3\x9b" },
    +	{ "Ugrave", "\xc3\x99" },
    +	{ "Upsilon", "\xce\xa5" },
    +	{ "Uuml", "\xc3\x9c" },
    +	{ "Xi", "\xce\x9e" },
    +	{ "Yacute", "\xc3\x9d" },
    +	{ "Yuml", "\xc5\xb8" },
    +	{ "Zeta", "\xce\x96" },
    +	{ "aacute", "\xc3\xa1" },
    +	{ "acirc", "\xc3\xa2" },
    +	{ "acute", "\xc2\xb4" },
    +	{ "aelig", "\xc3\xa6" },
    +	{ "agrave", "\xc3\xa0" },
    +	{ "alefsym", "\xe2\x84\xb5" },
    +	{ "alpha", "\xce\xb1" },
    +	{ "amp", "\x26" },
    +	{ "and", "\xe2\x88\xa7" },
    +	{ "ang", "\xe2\x88\xa0" },
    +	{ "apos", "\x27" },
    +	{ "aring", "\xc3\xa5" },
    +	{ "asymp", "\xe2\x89\x88" },
    +	{ "atilde", "\xc3\xa3" },
    +	{ "auml", "\xc3\xa4" },
    +	{ "bdquo", "\xe2\x80\x9e" },
    +	{ "beta", "\xce\xb2" },
    +	{ "brkbar", "\xc2\xa6" },
    +	{ "brvbar", "\xc2\xa6" },
    +	{ "bull", "\xe2\x80\xa2" },
    +	{ "cap", "\xe2\x88\xa9" },
    +	{ "ccedil", "\xc3\xa7" },
    +	{ "cedil", "\xc2\xb8" },
    +	{ "cent", "\xc2\xa2" },
    +	{ "chi", "\xcf\x87" },
    +	{ "circ", "\xcb\x86" },
    +	{ "clubs", "\xe2\x99\xa3" },
    +	{ "cong", "\xe2\x89\x85" },
    +	{ "copy", "\xc2\xa9" },
    +	{ "crarr", "\xe2\x86\xb5" },
    +	{ "cup", "\xe2\x88\xaa" },
    +	{ "curren", "\xc2\xa4" },
    +	{ "dArr", "\xe2\x87\x93" },
    +	{ "dagger", "\xe2\x80\xa0" },
    +	{ "darr", "\xe2\x86\x93" },
    +	{ "deg", "\xc2\xb0" },
    +	{ "delta", "\xce\xb4" },
    +	{ "diams", "\xe2\x99\xa6" },
    +	{ "die", "\xc2\xa8" },
    +	{ "divide", "\xc3\xb7" },
    +	{ "eacute", "\xc3\xa9" },
    +	{ "ecirc", "\xc3\xaa" },
    +	{ "egrave", "\xc3\xa8" },
    +	{ "empty", "\xe2\x88\x85" },
    +	{ "emsp", "\xe2\x80\x83" },
    +	{ "ensp", "\xe2\x80\x82" },
    +	{ "epsilon", "\xce\xb5" },
    +	{ "equiv", "\xe2\x89\xa1" },
    +	{ "eta", "\xce\xb7" },
    +	{ "eth", "\xc3\xb0" },
    +	{ "euml", "\xc3\xab" },
    +	{ "euro", "\xe2\x82\xac" },
    +	{ "exist", "\xe2\x88\x83" },
    +	{ "fnof", "\xc6\x92" },
    +	{ "forall", "\xe2\x88\x80" },
    +	{ "frac12", "\xc2\xbd" },
    +	{ "frac14", "\xc2\xbc" },
    +	{ "frac34", "\xc2\xbe" },
    +	{ "frasl", "\xe2\x81\x84" },
    +	{ "gamma", "\xce\xb3" },
    +	{ "ge", "\xe2\x89\xa5" },
    +	{ "gt", "\x3e" },
    +	{ "hArr", "\xe2\x87\x94" },
    +	{ "harr", "\xe2\x86\x94" },
    +	{ "hearts", "\xe2\x99\xa5" },
    +	{ "hellip", "\xe2\x80\xa6" },
    +	{ "hibar", "\xc2\xaf" },
    +	{ "iacute", "\xc3\xad" },
    +	{ "icirc", "\xc3\xae" },
    +	{ "iexcl", "\xc2\xa1" },
    +	{ "igrave", "\xc3\xac" },
    +	{ "image", "\xe2\x84\x91" },
    +	{ "infin", "\xe2\x88\x9e" },
    +	{ "int", "\xe2\x88\xab" },
    +	{ "iota", "\xce\xb9" },
    +	{ "iquest", "\xc2\xbf" },
    +	{ "isin", "\xe2\x88\x88" },
    +	{ "iuml", "\xc3\xaf" },
    +	{ "kappa", "\xce\xba" },
    +	{ "lArr", "\xe2\x87\x90" },
    +	{ "lambda", "\xce\xbb" },
    +	{ "lang", "\xe2\x8c\xa9" },
    +	{ "laquo", "\xc2\xab" },
    +	{ "larr", "\xe2\x86\x90" },
    +	{ "lceil", "\xe2\x8c\x88" },
    +	{ "ldquo", "\xe2\x80\x9c" },
    +	{ "le", "\xe2\x89\xa4" },
    +	{ "lfloor", "\xe2\x8c\x8a" },
    +	{ "lowast", "\xe2\x88\x97" },
    +	{ "loz", "\xe2\x97\x8a" },
    +	{ "lrm", "\xe2\x80\x8e" },
    +	{ "lsaquo", "\xe2\x80\xb9" },
    +	{ "lsquo", "\xe2\x80\x98" },
    +	{ "lt", "\x3c" },
    +	{ "macr", "\xc2\xaf" },
    +	{ "mdash", "\xe2\x80\x94" },
    +	{ "micro", "\xc2\xb5" },
    +	{ "middot", "\xc2\xb7" },
    +	{ "minus", "\xe2\x88\x92" },
    +	{ "mu", "\xce\xbc" },
    +	{ "nabla", "\xe2\x88\x87" },
    +	{ "nbsp", "\xc2\xa0" },
    +	{ "ndash", "\xe2\x80\x93" },
    +	{ "ne", "\xe2\x89\xa0" },
    +	{ "ni", "\xe2\x88\x8b" },
    +	{ "not", "\xc2\xac" },
    +	{ "notin", "\xe2\x88\x89" },
    +	{ "nsub", "\xe2\x8a\x84" },
    +	{ "ntilde", "\xc3\xb1" },
    +	{ "nu", "\xce\xbd" },
    +	{ "oacute", "\xc3\xb3" },
    +	{ "ocirc", "\xc3\xb4" },
    +	{ "oelig", "\xc5\x93" },
    +	{ "ograve", "\xc3\xb2" },
    +	{ "oline", "\xe2\x80\xbe" },
    +	{ "omega", "\xcf\x89" },
    +	{ "omicron", "\xce\xbf" },
    +	{ "oplus", "\xe2\x8a\x95" },
    +	{ "or", "\xe2\x88\xa8" },
    +	{ "ordf", "\xc2\xaa" },
    +	{ "ordm", "\xc2\xba" },
    +	{ "oslash", "\xc3\xb8" },
    +	{ "otilde", "\xc3\xb5" },
    +	{ "otimes", "\xe2\x8a\x97" },
    +	{ "ouml", "\xc3\xb6" },
    +	{ "para", "\xc2\xb6" },
    +	{ "part", "\xe2\x88\x82" },
    +	{ "permil", "\xe2\x80\xb0" },
    +	{ "perp", "\xe2\x8a\xa5" },
    +	{ "phi", "\xcf\x86" },
    +	{ "pi", "\xcf\x80" },
    +	{ "piv", "\xcf\x96" },
    +	{ "plusmn", "\xc2\xb1" },
    +	{ "pound", "\xc2\xa3" },
    +	{ "prime", "\xe2\x80\xb2" },
    +	{ "prod", "\xe2\x88\x8f" },
    +	{ "prop", "\xe2\x88\x9d" },
    +	{ "psi", "\xcf\x88" },
    +	{ "quot", "\x22" },
    +	{ "rArr", "\xe2\x87\x92" },
    +	{ "radic", "\xe2\x88\x9a" },
    +	{ "rang", "\xe2\x8c\xaa" },
    +	{ "raquo", "\xc2\xbb" },
    +	{ "rarr", "\xe2\x86\x92" },
    +	{ "rceil", "\xe2\x8c\x89" },
    +	{ "rdquo", "\xe2\x80\x9d" },
    +	{ "real", "\xe2\x84\x9c" },
    +	{ "reg", "\xc2\xae" },
    +	{ "rfloor", "\xe2\x8c\x8b" },
    +	{ "rho", "\xcf\x81" },
    +	{ "rlm", "\xe2\x80\x8f" },
    +	{ "rsaquo", "\xe2\x80\xba" },
    +	{ "rsquo", "\xe2\x80\x99" },
    +	{ "sbquo", "\xe2\x80\x9a" },
    +	{ "scaron", "\xc5\xa1" },
    +	{ "sdot", "\xe2\x8b\x85" },
    +	{ "sect", "\xc2\xa7" },
    +	{ "shy", "\xc2\xad" },
    +	{ "sigma", "\xcf\x83" },
    +	{ "sigmaf", "\xcf\x82" },
    +	{ "sim", "\xe2\x88\xbc" },
    +	{ "spades", "\xe2\x99\xa0" },
    +	{ "sub", "\xe2\x8a\x82" },
    +	{ "sube", "\xe2\x8a\x86" },
    +	{ "sum", "\xe2\x88\x91" },
    +	{ "sup", "\xe2\x8a\x83" },
    +	{ "sup1", "\xc2\xb9" },
    +	{ "sup2", "\xc2\xb2" },
    +	{ "sup3", "\xc2\xb3" },
    +	{ "supe", "\xe2\x8a\x87" },
    +	{ "szlig", "\xc3\x9f" },
    +	{ "tau", "\xcf\x84" },
    +	{ "there4", "\xe2\x88\xb4" },
    +	{ "theta", "\xce\xb8" },
    +	{ "thetasym", "\xcf\x91" },
    +	{ "thinsp", "\xe2\x80\x89" },
    +	{ "thorn", "\xc3\xbe" },
    +	{ "tilde", "\xcb\x9c" },
    +	{ "times", "\xc3\x97" },
    +	{ "trade", "\xe2\x84\xa2" },
    +	{ "uArr", "\xe2\x87\x91" },
    +	{ "uacute", "\xc3\xba" },
    +	{ "uarr", "\xe2\x86\x91" },
    +	{ "ucirc", "\xc3\xbb" },
    +	{ "ugrave", "\xc3\xb9" },
    +	{ "uml", "\xc2\xa8" },
    +	{ "upsih", "\xcf\x92" },
    +	{ "upsilon", "\xcf\x85" },
    +	{ "uuml", "\xc3\xbc" },
    +	{ "weierp", "\xe2\x84\x98" },
    +	{ "xi", "\xce\xbe" },
    +	{ "yacute", "\xc3\xbd" },
    +	{ "yen", "\xc2\xa5" },
    +	{ "yuml", "\xc3\xbf" },
    +	{ "zeta", "\xce\xb6" },
    +	{ "zwj", "\xe2\x80\x8d" },
    +	{ "zwnj", "\xe2\x80\x8c" }
    +      };
    +
    +      // first find ; longest char entity reference is 8 chars (thetasym)
    +      char entity[9];
    +      bool entity_ok = false;
    +      for (unsigned i = 0; i < 9; ++i)
    +	if (src[1 + i] == ';') {
    +	  entity[i] = 0;
    +	  entity_ok = true;
    +	  break;
    +	} else
    +	  entity[i] = src[1 + i];
    +
    +      if (!entity_ok)
    +	return false;
    +
    +      // do binary search for entity in our entity table
    +      int imin = 0; // inclusive
    +      int imax = entity_count; // exclusive
    +      int i;
    +
    +      for (;;) {
    +	if (imax - imin <= 1)
    +	  if (std::strcmp(entity, entities[imin].name) == 0) {
    +	    i = imin;
    +	    break;
    +	  } else
    +	    return false; // not found
    +	else {
    +	  i = (imin + imax) / 2;
    +	  int cmp = std::strcmp(entity, entities[i].name);
    +	  if (cmp == 0)
    +	    break;
    +	  else {
    +	    if (cmp < 0)
    +	      imax = i;
    +	    else
    +	      imin = i + 1;
    +	  }
    +	}
    +      }
    +
    +      src += internal::measure(entity) + 2; // + &;
    +      for (const Ch *c = entities[i].utf8; *c; ++c)
    +	*dest++ = *c;
    +
    +      return true;
    +    }
    +}
    +
    +#endif
    diff --git a/wt-3.1.7a/src/threadpool/COPYING b/wt-3.1.7a/src/threadpool/COPYING
    new file mode 100644
    index 0000000..69e789e
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/COPYING
    @@ -0,0 +1,5 @@
    +Copyright (c) 2005-2006 Philipp Henkel
    +
    +Use, modification, and distribution are  subject to the
    +Boost Software License, Version 1.0. (See accompanying  file
    +LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    \ No newline at end of file
    diff --git a/wt-3.1.7a/src/threadpool/LICENSE_1_0.txt b/wt-3.1.7a/src/threadpool/LICENSE_1_0.txt
    new file mode 100644
    index 0000000..36b7cd9
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/LICENSE_1_0.txt
    @@ -0,0 +1,23 @@
    +Boost Software License - Version 1.0 - August 17th, 2003
    +
    +Permission is hereby granted, free of charge, to any person or organization
    +obtaining a copy of the software and accompanying documentation covered by
    +this license (the "Software") to use, reproduce, display, distribute,
    +execute, and transmit the Software, and to prepare derivative works of the
    +Software, and to permit third-parties to whom the Software is furnished to
    +do so, all subject to the following:
    +
    +The copyright notices in the Software and this entire statement, including
    +the above license grant, this restriction and the following disclaimer,
    +must be included in all copies of the Software, in whole or in part, and
    +all derivative works of the Software, unless such copies or derivative
    +works are solely in the form of machine-executable object code generated by
    +a source language processor.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    +DEALINGS IN THE SOFTWARE.
    diff --git a/wt-3.1.7a/src/threadpool/README b/wt-3.1.7a/src/threadpool/README
    new file mode 100644
    index 0000000..19d6db2
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/README
    @@ -0,0 +1,10 @@
    +threadpool
    +
    +Copyright (c) 2005-2006 Philipp Henkel
    +
    +threadpool is a cross-platform C++ thread pool library and released under the Boost Software License. 
    +
    +See doc/index.html for information on:
    +  - API documentation and a tutorial
    +  - External dependencies
    +  - Using threadpool
    diff --git a/wt-3.1.7a/src/threadpool/threadpool.hpp b/wt-3.1.7a/src/threadpool/threadpool.hpp
    new file mode 100644
    index 0000000..3777adb
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool.hpp
    @@ -0,0 +1,28 @@
    +/*! \file
    +* \brief Main include.
    +*
    +* This is the only file you have to include in order to use the 
    +* complete threadpool library.
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +#ifndef THREADPOOL_HPP_INCLUDED
    +#define THREADPOOL_HPP_INCLUDED
    +
    +#include "threadpool/future.hpp"
    +#include "threadpool/pool.hpp"
    +
    +#include "threadpool/pool_adaptors.hpp"
    +#include "threadpool/task_adaptors.hpp"
    +
    +
    +#endif // THREADPOOL_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/detail/future.hpp b/wt-3.1.7a/src/threadpool/threadpool/detail/future.hpp
    new file mode 100644
    index 0000000..4e4b35b
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/detail/future.hpp
    @@ -0,0 +1,215 @@
    +/*! \file
    +* \brief TODO.
    +*
    +* TODO. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
    +#define THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
    +
    +
    +#include "locking_ptr.hpp"
    +
    +#include <boost/smart_ptr.hpp>
    +#include <boost/optional.hpp>
    +#include <boost/thread/mutex.hpp>
    +#include <boost/thread/condition.hpp>
    +#include <boost/thread/xtime.hpp>
    +#include <boost/utility/result_of.hpp>
    +#include <boost/static_assert.hpp>
    +#include <boost/type_traits.hpp>
    +
    +namespace boost { namespace threadpool { namespace detail 
    +{
    +
    +template<class Result> 
    +class future_impl
    +{
    +public:
    +  typedef Result const & result_type; //!< Indicates the functor's result type.
    +
    +  typedef Result future_result_type; //!< Indicates the future's result type.
    +  typedef future_impl<future_result_type> future_type;
    +
    +private:
    +    volatile bool m_ready;
    +    volatile future_result_type m_result;
    +
    +    mutable mutex m_monitor;
    +    mutable condition m_condition_ready;	
    +
    +    volatile bool m_is_cancelled;
    +    volatile bool m_executing;
    +
    +public:
    +
    +
    +public:
    +
    +  future_impl()
    +  : m_ready(false)
    +  , m_is_cancelled(false)
    +  {
    +  }
    +
    +  bool ready() const volatile
    +  {
    +    return m_ready; 
    +  }
    +
    +  void wait() const volatile
    +  {
    +    const future_type* self = const_cast<const future_type*>(this);
    +    mutex::scoped_lock lock(self->m_monitor);
    +
    +    while(!m_ready)
    +    {
    +      self->m_condition_ready.wait(lock);
    +    }
    +  }
    +
    +
    +  bool timed_wait(boost::xtime const & timestamp) const
    +  {
    +    const future_type* self = const_cast<const future_type*>(this);
    +    mutex::scoped_lock lock(self->m_monitor);
    +
    +    while(!m_ready)
    +    {
    +      if(!self->m_condition_ready.timed_wait(lock, timestamp)) return false;
    +    }
    +
    +    return true;
    +  }
    +
    +
    +  result_type operator()() const volatile
    +  {
    +    wait();
    +/*
    +    if( throw_exception_ != 0 )
    +    {
    +      throw_exception_( this );
    +    }
    +*/
    + 
    +    return *(const_cast<const future_result_type*>(&m_result));
    +  }
    +
    +
    +  void set_value(future_result_type const & r) volatile
    +  {
    +    locking_ptr<future_type, mutex> lockedThis(*this, m_monitor);
    +    if(!m_ready && !m_is_cancelled)
    +    {
    +      lockedThis->m_result = r;
    +      lockedThis->m_ready = true;
    +      lockedThis->m_condition_ready.notify_all();
    +    }
    +  }
    +/*
    +  template<class E> void set_exception() // throw()
    +  {
    +    m_impl->template set_exception<E>();
    +  }
    +
    +  template<class E> void set_exception( char const * what ) // throw()
    +  {
    +    m_impl->template set_exception<E>( what );
    +  }
    +  */
    +
    +
    +   bool cancel() volatile
    +   {
    +     if(!m_ready || m_executing)
    +     {
    +        m_is_cancelled = true;
    +        return true;
    +     }
    +     else
    +     {
    +       return false;
    +     }
    +   }
    +
    +
    +   bool is_cancelled() const volatile
    +   {
    +     return m_is_cancelled;
    +   }
    +
    +
    +   void set_execution_status(bool executing) volatile
    +   {
    +     m_executing = executing;
    +   }
    +};
    +
    +
    +template<
    +  template <typename> class Future,
    +  typename Function
    +>
    +class future_impl_task_func
    +{
    +
    +public:
    +  typedef void result_type;                         //!< Indicates the functor's result type.
    +
    +  typedef Function function_type;                   //!< Indicates the function's type.
    +  typedef typename result_of<function_type()>::type future_result_type; //!< Indicates the future's result type.
    +  typedef Future<future_result_type> future_type;   //!< Indicates the future's type.
    +
    +  // The task is required to be a nullary function.
    +  BOOST_STATIC_ASSERT(function_traits<function_type()>::arity == 0);
    +
    +  // The task function's result type is required not to be void.
    +  BOOST_STATIC_ASSERT(!is_void<future_result_type>::value);
    +
    +private:
    +  function_type             m_function;
    +  shared_ptr<future_type>   m_future;
    +
    +public:
    +  future_impl_task_func(function_type const & function, shared_ptr<future_type> const & future)
    +  : m_function(function)
    +  , m_future(future)
    +  {
    +  }
    +
    +  void operator()()
    +  {
    +    if(m_function)
    +    {
    +      m_future->set_execution_status(true);
    +      if(!m_future->is_cancelled())
    +      {
    +        // TODO future exeception handling 
    +        m_future->set_value(m_function());
    +      }
    +      m_future->set_execution_status(false); // TODO consider exceptions
    +    }
    +  }
    +
    +};
    +
    +
    +
    +
    +
    +} } } // namespace boost::threadpool::detail
    +
    +#endif // THREADPOOL_DETAIL_FUTURE_IMPL_HPP_INCLUDED
    +
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/detail/locking_ptr.hpp b/wt-3.1.7a/src/threadpool/threadpool/detail/locking_ptr.hpp
    new file mode 100644
    index 0000000..570c31e
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/detail/locking_ptr.hpp
    @@ -0,0 +1,102 @@
    +/*! \file
    +* \brief The locking_ptr is smart pointer with a scoped locking mechanism.
    +*
    +* The class is a wrapper for a volatile pointer. It enables synchronized access to the
    +* internal pointer by locking the passed mutex.
    +* locking_ptr is based on Andrei Alexandrescu's LockingPtr. For more information
    +* see article "volatile - Multithreaded Programmer's Best Friend" by A. Alexandrescu.
    +*
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
    +#define THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
    +
    +#include <boost/utility.hpp>
    +
    +// Support for old boost::thread
    +//**********************************************
    +#include <boost/thread/mutex.hpp>
    +#ifndef BOOST_THREAD_MUTEX_HPP
    +#include <boost/thread/detail/lock.hpp>
    +#endif
    +//**********************************************
    +
    +namespace boost { namespace threadpool { namespace detail 
    +{
    +
    +/*! \brief  Smart pointer with a scoped locking mechanism.
    + *
    + * This class is a wrapper for a volatile pointer. It enables synchronized access to the
    + * internal pointer by locking the passed mutex.
    + */
    +  template <typename T, typename Mutex>
    +  class locking_ptr 
    +  : private noncopyable
    +  {
    +    T* m_obj;                     //!< The instance pointer.
    +    Mutex & m_mutex;              //!< Mutex is used for scoped locking.
    +
    +  public:
    +    /// Constructor.
    +    locking_ptr(volatile T& obj, const volatile Mutex& mtx)
    +      : m_obj(const_cast<T*>(&obj))
    +      , m_mutex(*const_cast<Mutex*>(&mtx))
    +    {   
    +      // Lock mutex
    +
    +#ifndef BOOST_THREAD_MUTEX_HPP
    +      // Support for old boost::thread
    +      boost::detail::thread::lock_ops<Mutex>::lock(m_mutex);
    +#else
    +      m_mutex.lock();
    +#endif
    +    }
    +
    +
    +    /// Destructor.
    +    ~locking_ptr()
    +    { 
    +      // Unlock mutex
    +#ifndef BOOST_THREAD_MUTEX_HPP
    +      // Support for old boost::thread
    +      boost::detail::thread::lock_ops<Mutex>::unlock(m_mutex);
    +#else
    +      m_mutex.unlock();
    +#endif
    +    }
    +
    +
    +    /*! Returns a reference to the stored instance.
    +    * \return The instance's reference.
    +    */
    +    T& operator*() const
    +    {    
    +      return *m_obj;    
    +    }
    +
    +
    +    /*! Returns a pointer to the stored instance.
    +    * \return The instance's pointer.
    +    */
    +    T* operator->() const
    +    {   
    +      return m_obj;   
    +    }
    +  };
    +
    +
    +} } } // namespace boost::threadpool::detail
    +
    +
    +#endif // THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/detail/pool_core.hpp b/wt-3.1.7a/src/threadpool/threadpool/detail/pool_core.hpp
    new file mode 100644
    index 0000000..9602b43
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/detail/pool_core.hpp
    @@ -0,0 +1,453 @@
    +/*! \file
    +* \brief Thread pool core.
    +*
    +* This file contains the threadpool's core class: pool<Task, SchedulingPolicy>.
    +*
    +* Thread pools are a mechanism for asynchronous and parallel processing 
    +* within the same process. The pool class provides a convenient way 
    +* for dispatching asynchronous tasks as functions objects. The scheduling
    +* of these tasks can be easily controlled by using customized schedulers. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_POOL_CORE_HPP_INCLUDED
    +#define THREADPOOL_POOL_CORE_HPP_INCLUDED
    +
    +
    +
    +
    +#include "locking_ptr.hpp"
    +#include "worker_thread.hpp"
    +
    +#include "../task_adaptors.hpp"
    +
    +#include <boost/thread.hpp>
    +#include <boost/thread/exceptions.hpp>
    +#include <boost/thread/mutex.hpp>
    +#include <boost/thread/condition.hpp>
    +#include <boost/smart_ptr.hpp>
    +#include <boost/bind.hpp>
    +#include <boost/static_assert.hpp>
    +#include <boost/type_traits.hpp>
    +
    +#include <vector>
    +
    +
    +/// The namespace threadpool contains a thread pool and related utility classes.
    +namespace boost { namespace threadpool { namespace detail 
    +{
    +
    +  /*! \brief Thread pool. 
    +  *
    +  * Thread pools are a mechanism for asynchronous and parallel processing 
    +  * within the same process. The pool class provides a convenient way 
    +  * for dispatching asynchronous tasks as functions objects. The scheduling
    +  * of these tasks can be easily controlled by using customized schedulers. 
    +  * A task must not throw an exception.
    +  *
    +  * A pool_impl is DefaultConstructible and NonCopyable.
    +  *
    +  * \param Task A function object which implements the operator 'void operator() (void) const'. The operator () is called by the pool to execute the task. Exceptions are ignored.
    +  * \param Scheduler A task container which determines how tasks are scheduled. It is guaranteed that this container is accessed only by one thread at a time. The scheduler shall not throw exceptions.
    +  *
    +  * \remarks The pool class is thread-safe.
    +  * 
    +  * \see Tasks: task_func, prio_task_func
    +  * \see Scheduling policies: fifo_scheduler, lifo_scheduler, prio_scheduler
    +  */ 
    +  template <
    +    typename Task, 
    +
    +    template <typename> class SchedulingPolicy,
    +    template <typename> class SizePolicy,
    +    template <typename> class SizePolicyController,
    +    template <typename> class ShutdownPolicy
    +  > 
    +  class pool_core
    +  : public enable_shared_from_this< pool_core<Task, SchedulingPolicy, SizePolicy, SizePolicyController, ShutdownPolicy > > 
    +  , private noncopyable
    +  {
    +
    +  public: // Type definitions
    +    typedef Task task_type;                                 //!< Indicates the task's type.
    +    typedef SchedulingPolicy<task_type> scheduler_type;     //!< Indicates the scheduler's type.
    +    typedef pool_core<Task, 
    +                      SchedulingPolicy, 
    +                      SizePolicy,
    +                      SizePolicyController,
    +                      ShutdownPolicy > pool_type;           //!< Indicates the thread pool's type.
    +    typedef SizePolicy<pool_type> size_policy_type;         //!< Indicates the sizer's type.
    +    //typedef typename size_policy_type::size_controller size_controller_type;
    +
    +    typedef SizePolicyController<pool_type> size_controller_type;
    +
    +//    typedef SizePolicy<pool_type>::size_controller size_controller_type;
    +    typedef ShutdownPolicy<pool_type> shutdown_policy_type;//!< Indicates the shutdown policy's type.  
    +
    +    typedef worker_thread<pool_type> worker_type;
    +
    +    // The task is required to be a nullary function.
    +    BOOST_STATIC_ASSERT(function_traits<task_type()>::arity == 0);
    +
    +    // The task function's result type is required to be void.
    +    BOOST_STATIC_ASSERT(is_void<typename result_of<task_type()>::type >::value);
    +
    +
    +  private:  // Friends 
    +    friend class worker_thread<pool_type>;
    +
    +#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x590)  // Tested with CC: Sun C++ 5.8 Patch 121018-08 2006/12/06
    +   friend class SizePolicy;
    +   friend class ShutdownPolicy;
    +#else
    +   friend class SizePolicy<pool_type>;
    +   friend class ShutdownPolicy<pool_type>;
    +#endif
    +
    +  private: // The following members may be accessed by _multiple_ threads at the same time:
    +    volatile size_t m_worker_count;	
    +    volatile size_t m_target_worker_count;	
    +    volatile size_t m_active_worker_count;
    +
    +
    +
    +  private: // The following members are accessed only by _one_ thread at the same time:
    +    scheduler_type  m_scheduler;
    +    scoped_ptr<size_policy_type> m_size_policy; // is never null
    +
    +    bool  m_terminate_all_workers;								// Indicates if termination of all workers was triggered.
    +    std::vector<shared_ptr<worker_type> > m_terminated_workers; // List of workers which are terminated but not fully destructed.
    +    
    +  private: // The following members are implemented thread-safe:
    +    mutable recursive_mutex  m_monitor;
    +    mutable condition m_worker_idle_or_terminated_event;	// A worker is idle or was terminated.
    +    mutable condition m_task_or_terminate_workers_event;  // Task is available OR total worker count should be reduced.
    +
    +  public:
    +    /// Constructor.
    +    pool_core()
    +      : m_worker_count(0) 
    +      , m_target_worker_count(0)
    +      , m_active_worker_count(0)
    +      , m_terminate_all_workers(false)
    +    {
    +      pool_type volatile & self_ref = *this;
    +      m_size_policy.reset(new size_policy_type(self_ref));
    +
    +      m_scheduler.clear();
    +    }
    +
    +
    +    /// Destructor.
    +    ~pool_core()
    +    {
    +    }
    +
    +    /*! Gets the size controller which manages the number of threads in the pool. 
    +    * \return The size controller.
    +    * \see SizePolicy
    +    */
    +    size_controller_type size_controller()
    +    {
    +      return size_controller_type(*m_size_policy, this->shared_from_this());
    +    }
    +
    +    /*! Gets the number of threads in the pool.
    +    * \return The number of threads.
    +    */
    +    size_t size()	const volatile
    +    {
    +      return m_worker_count;
    +    }
    +
    +// TODO is only called once
    +    void shutdown()
    +    {
    +      ShutdownPolicy<pool_type>::shutdown(*this);
    +    }
    +
    +    /*! Schedules a task for asynchronous execution. The task will be executed once only.
    +    * \param task The task function object. It should not throw execeptions.
    +    * \return true, if the task could be scheduled and false otherwise. 
    +    */  
    +    bool schedule(task_type const & task) volatile
    +    {	
    +      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +      
    +      if(lockedThis->m_scheduler.push(task))
    +      {
    +        lockedThis->m_task_or_terminate_workers_event.notify_one();
    +        return true;
    +      }
    +      else
    +      {
    +        return false;
    +      }
    +    }	
    +
    +
    +    /*! Returns the number of tasks which are currently executed.
    +    * \return The number of active tasks. 
    +    */  
    +    size_t active() const volatile
    +    {
    +      return m_active_worker_count;
    +    }
    +
    +
    +    /*! Returns the number of tasks which are ready for execution.    
    +    * \return The number of pending tasks. 
    +    */  
    +    size_t pending() const volatile
    +    {
    +      locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +      return lockedThis->m_scheduler.size();
    +    }
    +
    +
    +    /*! Removes all pending tasks from the pool's scheduler.
    +    */  
    +    void clear() volatile
    +    { 
    +      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +      lockedThis->m_scheduler.clear();
    +    }    
    +
    +
    +    /*! Indicates that there are no tasks pending. 
    +    * \return true if there are no tasks ready for execution.	
    +    * \remarks This function is more efficient that the check 'pending() == 0'.
    +    */   
    +    bool empty() const volatile
    +    {
    +      locking_ptr<const pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +      return lockedThis->m_scheduler.empty();
    +    }	
    +
    +
    +    /*! The current thread of execution is blocked until the sum of all active
    +    *  and pending tasks is equal or less than a given threshold. 
    +    * \param task_threshold The maximum number of tasks in pool and scheduler.
    +    */     
    +    void wait(size_t const task_threshold = 0) const volatile
    +    {
    +      const pool_type* self = const_cast<const pool_type*>(this);
    +      recursive_mutex::scoped_lock lock(self->m_monitor);
    +
    +      if(0 == task_threshold)
    +      {
    +        while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
    +        { 
    +          self->m_worker_idle_or_terminated_event.wait(lock);
    +        }
    +      }
    +      else
    +      {
    +        while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
    +        { 
    +          self->m_worker_idle_or_terminated_event.wait(lock);
    +        }
    +      }
    +    }	
    +
    +    /*! The current thread of execution is blocked until the timestamp is met
    +    * or the sum of all active and pending tasks is equal or less 
    +    * than a given threshold.  
    +    * \param timestamp The time when function returns at the latest.
    +    * \param task_threshold The maximum number of tasks in pool and scheduler.
    +    * \return true if the task sum is equal or less than the threshold, false otherwise.
    +    */       
    +    bool wait(xtime const & timestamp, size_t const task_threshold = 0) const volatile
    +    {
    +      const pool_type* self = const_cast<const pool_type*>(this);
    +      recursive_mutex::scoped_lock lock(self->m_monitor);
    +
    +      if(0 == task_threshold)
    +      {
    +        while(0 != self->m_active_worker_count || !self->m_scheduler.empty())
    +        { 
    +          if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
    +        }
    +      }
    +      else
    +      {
    +        while(task_threshold < self->m_active_worker_count + self->m_scheduler.size())
    +        { 
    +          if(!self->m_worker_idle_or_terminated_event.timed_wait(lock, timestamp)) return false;
    +        }
    +      }
    +
    +      return true;
    +    }
    +
    +
    +  private:	
    +
    +
    +    void terminate_all_workers(bool const wait) volatile
    +    {
    +      pool_type* self = const_cast<pool_type*>(this);
    +      recursive_mutex::scoped_lock lock(self->m_monitor);
    +
    +      self->m_terminate_all_workers = true;
    +
    +      m_target_worker_count = 0;
    +      self->m_task_or_terminate_workers_event.notify_all();
    +
    +      if(wait)
    +      {
    +        while(m_worker_count > 0)
    +        {
    +          self->m_worker_idle_or_terminated_event.wait(lock);
    +        }
    +
    +        for(typename std::vector<shared_ptr<worker_type> >::iterator it = self->m_terminated_workers.begin();
    +          it != self->m_terminated_workers.end();
    +          ++it)
    +        {
    +          (*it)->join();
    +        }
    +        self->m_terminated_workers.clear();
    +      }
    +    }
    +
    +
    +    /*! Changes the number of worker threads in the pool. The resizing 
    +    *  is handled by the SizePolicy.
    +    * \param threads The new number of worker threads.
    +    * \return true, if pool will be resized and false if not. 
    +    */
    +    bool resize(size_t const worker_count) volatile
    +    {
    +      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +
    +      if(!m_terminate_all_workers)
    +      {
    +        m_target_worker_count = worker_count;
    +      }
    +      else
    +      {
    +        return false;
    +      }
    +
    +
    +      if(m_worker_count <= m_target_worker_count)
    +      { // increase worker count
    +        while(m_worker_count < m_target_worker_count)
    +        {
    +          try
    +          {
    +            worker_thread<pool_type>::create_and_attach(lockedThis->shared_from_this());
    +            m_worker_count++;
    +            m_active_worker_count++;	
    +          }
    +          catch(thread_resource_error)
    +          {
    +            return false;
    +          }
    +        }
    +      }
    +      else
    +      { // decrease worker count
    +        lockedThis->m_task_or_terminate_workers_event.notify_all();   // TODO: Optimize number of notified workers
    +      }
    +
    +      return true;
    +    }
    +
    +
    +    // worker died with unhandled exception
    +    void worker_died_unexpectedly(shared_ptr<worker_type> worker) volatile
    +    {
    +      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +
    +      m_worker_count--;
    +      m_active_worker_count--;
    +      lockedThis->m_worker_idle_or_terminated_event.notify_all();
    +
    +      if(m_terminate_all_workers)
    +      {
    +        lockedThis->m_terminated_workers.push_back(worker);
    +      }
    +      else
    +      {
    +        lockedThis->m_size_policy->worker_died_unexpectedly(m_worker_count);
    +      }
    +    }
    +
    +    void worker_destructed(shared_ptr<worker_type> worker) volatile
    +    {
    +      locking_ptr<pool_type, recursive_mutex> lockedThis(*this, m_monitor);
    +      m_worker_count--;
    +      m_active_worker_count--;
    +      lockedThis->m_worker_idle_or_terminated_event.notify_all();
    +
    +      if(m_terminate_all_workers)
    +      {
    +        lockedThis->m_terminated_workers.push_back(worker);
    +      }
    +    }
    +
    +
    +    bool execute_task() volatile
    +    {
    +      function0<void> task;
    +
    +      { // fetch task
    +        pool_type* lockedThis = const_cast<pool_type*>(this);
    +        recursive_mutex::scoped_lock lock(lockedThis->m_monitor);
    +
    +        // decrease number of threads if necessary
    +        if(m_worker_count > m_target_worker_count)
    +        {	
    +          return false;	// terminate worker
    +        }
    +
    +
    +        // wait for tasks
    +        while(lockedThis->m_scheduler.empty())
    +        {	
    +          // decrease number of workers if necessary
    +          if(m_worker_count > m_target_worker_count)
    +          {	
    +            return false;	// terminate worker
    +          }
    +          else
    +          {
    +            m_active_worker_count--;
    +            lockedThis->m_worker_idle_or_terminated_event.notify_all();
    +            lockedThis->m_task_or_terminate_workers_event.wait(lock);
    +            m_active_worker_count++;
    +          }
    +        }
    +
    +        task = lockedThis->m_scheduler.top();
    +        lockedThis->m_scheduler.pop();
    +      }
    +
    +      // call task function
    +      if(task)
    +      {
    +        task();
    +      }
    + 
    +      //guard->disable();
    +      return true;
    +    }
    +  };
    +
    +
    +
    +
    +} } } // namespace boost::threadpool::detail
    +
    +#endif // THREADPOOL_POOL_CORE_HPP_INCLUDED
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/detail/scope_guard.hpp b/wt-3.1.7a/src/threadpool/threadpool/detail/scope_guard.hpp
    new file mode 100644
    index 0000000..f13feb6
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/detail/scope_guard.hpp
    @@ -0,0 +1,65 @@
    +/*! \file
    +* \brief TODO.
    +*
    +* TODO.
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
    +#define THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
    +
    +
    +
    +#include <boost/function.hpp>
    +
    +
    +namespace boost { namespace threadpool { namespace detail
    +{
    +
    +// TODO documentation
    +class scope_guard
    +: private boost::noncopyable
    +{
    +	function0<void> const m_function;
    +	bool                  m_is_active;
    +
    +public:
    +	scope_guard(function0<void> const & call_on_exit)
    +	: m_function(call_on_exit)
    +	, m_is_active(true)
    +	{
    +	}
    +
    +	~scope_guard()
    +	{
    +		if(m_is_active && m_function)
    +		{
    +			m_function();
    +		}
    +	}
    +
    +	void disable()
    +	{
    +		m_is_active = false;
    +	}
    +};
    +
    +
    +
    +
    +
    +
    +} } } // namespace boost::threadpool::detail
    +
    +#endif // THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED
    +
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/detail/worker_thread.hpp b/wt-3.1.7a/src/threadpool/threadpool/detail/worker_thread.hpp
    new file mode 100644
    index 0000000..e3a70c9
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/detail/worker_thread.hpp
    @@ -0,0 +1,115 @@
    +/*! \file
    +* \brief Thread pool worker.
    +*
    +* The worker thread instance is attached to a pool 
    +* and executes tasks of this pool. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +#ifndef THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
    +#define THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
    +
    +
    +#include "scope_guard.hpp"
    +
    +#include <boost/smart_ptr.hpp>
    +#include <boost/thread.hpp>
    +#include <boost/thread/exceptions.hpp>
    +#include <boost/thread/mutex.hpp>
    +#include <boost/bind.hpp>
    +
    +
    +namespace boost { namespace threadpool { namespace detail 
    +{
    +
    +  /*! \brief Thread pool worker. 
    +  *
    +  * A worker_thread represents a thread of execution. The worker is attached to a 
    +  * thread pool and processes tasks of that pool. The lifetime of the worker and its 
    +  * internal boost::thread is managed automatically.
    +  *
    +  * This class is a helper class and cannot be constructed or accessed directly.
    +  * 
    +  * \see pool_core
    +  */ 
    +  template <typename Pool>
    +  class worker_thread
    +  : public enable_shared_from_this< worker_thread<Pool> >
    +  , private noncopyable
    +  {
    +  public:
    +    typedef Pool pool_type;         	   //!< Indicates the pool's type.
    +
    +  private:
    +    shared_ptr<pool_type>      m_pool;     //!< Pointer to the pool which created the worker.
    +    shared_ptr<boost::thread>  m_thread;   //!< Pointer to the thread which executes the run loop.
    +
    +    
    +    /*! Constructs a new worker. 
    +    * \param pool Pointer to it's parent pool.
    +    * \see function create_and_attach
    +    */
    +    worker_thread(shared_ptr<pool_type> const & pool)
    +    : m_pool(pool)
    +    {
    +      assert(pool);
    +    }
    +
    +
    +	/*! Notifies that an exception occurred in the run loop.
    +	*/
    +	void died_unexpectedly()
    +	{
    +		m_pool->worker_died_unexpectedly(this->shared_from_this());
    +	}
    +
    +
    +  public:
    +	  /*! Executes pool's tasks sequentially.
    +	  */
    +	  void run()
    +	  {
    +		  scope_guard notify_exception(bind(&worker_thread::died_unexpectedly, this));
    +
    +		  while(m_pool->execute_task()) {}
    +
    +		  notify_exception.disable();
    +		  m_pool->worker_destructed(this->shared_from_this());
    +	  }
    +
    +
    +	  /*! Joins the worker's thread.
    +	  */
    +	  void join()
    +	  {
    +		  m_thread->join();
    +	  }
    +
    +
    +	  /*! Constructs a new worker thread and attaches it to the pool.
    +	  * \param pool Pointer to the pool.
    +	  */
    +	  static void create_and_attach(shared_ptr<pool_type> const & pool)
    +	  {
    +		  shared_ptr<worker_thread> worker(new worker_thread(pool));
    +		  if(worker)
    +		  {
    +			  worker->m_thread.reset(new boost::thread(bind(&worker_thread::run, worker)));
    +		  }
    +	  }
    +
    +  };
    +
    +
    +} } } // namespace boost::threadpool::detail
    +
    +#endif // THREADPOOL_DETAIL_WORKER_THREAD_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/future.hpp b/wt-3.1.7a/src/threadpool/threadpool/future.hpp
    new file mode 100644
    index 0000000..57568ed
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/future.hpp
    @@ -0,0 +1,144 @@
    +/*! \file
    +* \brief TODO.
    +*
    +* TODO. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +#ifndef THREADPOOL_FUTURE_HPP_INCLUDED
    +#define THREADPOOL_FUTURE_HPP_INCLUDED
    +
    +
    +  
    +#include "detail/future.hpp"
    +#include <boost/utility/enable_if.hpp>
    +
    +//#include "pool.hpp"
    +//#include <boost/utility.hpp>
    +
    +//#include <boost/thread/mutex.hpp>
    +
    +
    +namespace boost { namespace threadpool
    +{
    +
    +  /*! \brief Experimental. Do not use in production code. TODO. 
    +  *
    +  * TODO Future
    +  *
    +  * \see TODO
    +  *
    +  */ 
    +
    +
    +template<class Result> 
    +class future
    +{
    +private:
    +  shared_ptr<detail::future_impl<Result> > m_impl;
    +
    +public:
    +    typedef Result const & result_type; //!< Indicates the functor's result type.
    +    typedef Result future_result_type; //!< Indicates the future's result type.
    +
    +
    +public:
    +
    +  future()
    +  : m_impl(new detail::future_impl<future_result_type>()) // TODO remove this
    +  {
    +  }
    +
    +  // only for internal usage
    +  future(shared_ptr<detail::future_impl<Result> > const & impl)
    +  : m_impl(impl)
    +  {
    +  }
    +
    +  bool ready() const
    +  {
    +    return m_impl->ready();
    +  }
    +
    +  void wait() const
    +  {
    +    m_impl->wait();
    +  }
    +
    +  bool timed_wait(boost::xtime const & timestamp) const
    +  {
    +    return m_impl->timed_wait(timestamp);
    +  }
    +
    +   result_type operator()() // throw( thread::cancelation_exception, ... )
    +   {
    +     return (*m_impl)();
    +   }
    +
    +   result_type get() // throw( thread::cancelation_exception, ... )
    +   {
    +     return (*m_impl)();
    +   }
    +
    +   bool cancel()
    +   {
    +     return m_impl->cancel();
    +   }
    +
    +   bool is_cancelled() const
    +   {
    +     return m_impl->is_cancelled();
    +   }
    +};
    +
    +
    +
    +
    +
    +template<class Pool, class Function>
    +typename disable_if < 
    +  is_void< typename result_of< Function() >::type >,
    +  future< typename result_of< Function() >::type >
    +>::type
    +schedule(Pool& pool, const Function& task)
    +{
    +  typedef typename result_of< Function() >::type future_result_type;
    +
    +  // create future impl and future
    +  shared_ptr<detail::future_impl<future_result_type> > impl(new detail::future_impl<future_result_type>);
    +  future <future_result_type> res(impl);
    +
    +  // schedule future impl
    +  pool.schedule(detail::future_impl_task_func<detail::future_impl, Function>(task, impl));
    +
    +  // return future
    +  return res;
    +
    +/*
    + TODO
    +  if(pool->schedule(bind(&Future::run, future)))
    +  {
    +    return future;
    +  }
    +  else
    +  {
    +    // construct empty future
    +    return error_future;
    +  }
    +  */
    +}
    +
    +
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_FUTURE_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/pool.hpp b/wt-3.1.7a/src/threadpool/threadpool/pool.hpp
    new file mode 100644
    index 0000000..12b8e19
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/pool.hpp
    @@ -0,0 +1,232 @@
    +/*! \file
    +* \brief Thread pool core.
    +*
    +* This file contains the threadpool's core class: pool<Task, SchedulingPolicy>.
    +*
    +* Thread pools are a mechanism for asynchronous and parallel processing 
    +* within the same process. The pool class provides a convenient way 
    +* for dispatching asynchronous tasks as functions objects. The scheduling
    +* of these tasks can be easily controlled by using customized schedulers. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_POOL_HPP_INCLUDED
    +#define THREADPOOL_POOL_HPP_INCLUDED
    +
    +#include <boost/ref.hpp>
    +
    +#include "detail/pool_core.hpp"
    +
    +#include "task_adaptors.hpp"
    +
    +#include "detail/locking_ptr.hpp"
    +
    +#include "scheduling_policies.hpp"
    +#include "size_policies.hpp"
    +#include "shutdown_policies.hpp"
    +
    +
    +
    +/// The namespace threadpool contains a thread pool and related utility classes.
    +namespace boost { namespace threadpool
    +{
    +
    +
    +
    +  /*! \brief Thread pool. 
    +  *
    +  * Thread pools are a mechanism for asynchronous and parallel processing 
    +  * within the same process. The pool class provides a convenient way 
    +  * for dispatching asynchronous tasks as functions objects. The scheduling
    +  * of these tasks can be easily controlled by using customized schedulers. 
    +  * A task must not throw an exception.
    +  *
    +  * A pool is DefaultConstructible, CopyConstructible and Assignable.
    +  * It has reference semantics; all copies of the same pool are equivalent and interchangeable. 
    +  * All operations on a pool except assignment are strongly thread safe or sequentially consistent; 
    +  * that is, the behavior of concurrent calls is as if the calls have been issued sequentially in an unspecified order.
    +  *
    +  * \param Task A function object which implements the operator 'void operator() (void) const'. The operator () is called by the pool to execute the task. Exceptions are ignored.
    +  * \param SchedulingPolicy A task container which determines how tasks are scheduled. It is guaranteed that this container is accessed only by one thread at a time. The scheduler shall not throw exceptions.
    +  *
    +  * \remarks The pool class is thread-safe.
    +  * 
    +  * \see Tasks: task_func, prio_task_func
    +  * \see Scheduling policies: fifo_scheduler, lifo_scheduler, prio_scheduler
    +  */ 
    +  template <
    +    typename Task                                   = task_func,
    +    template <typename> class SchedulingPolicy      = fifo_scheduler,
    +    template <typename> class SizePolicy            = static_size,
    +    template <typename> class SizePolicyController  = resize_controller,
    +    template <typename> class ShutdownPolicy        = wait_for_all_tasks
    +  > 
    +  class thread_pool 
    +  {
    +    typedef detail::pool_core<Task, 
    +                              SchedulingPolicy,
    +                              SizePolicy,
    +                              SizePolicyController,
    +                              ShutdownPolicy> pool_core_type;
    +    shared_ptr<pool_core_type>          m_core; // pimpl idiom
    +    shared_ptr<void>                    m_shutdown_controller; // If the last pool holding a pointer to the core is deleted the controller shuts the pool down.
    +
    +  public: // Type definitions
    +    typedef Task task_type;                                   //!< Indicates the task's type.
    +    typedef SchedulingPolicy<task_type> scheduler_type;       //!< Indicates the scheduler's type.
    + /*   typedef thread_pool<Task, 
    +                        SchedulingPolicy,
    +                        SizePolicy,
    +                        ShutdownPolicy > pool_type;          //!< Indicates the thread pool's type.
    + */
    +    typedef SizePolicy<pool_core_type> size_policy_type; 
    +    typedef SizePolicyController<pool_core_type> size_controller_type;
    +
    +
    +  public:
    +    /*! Constructor.
    +     * \param initial_threads The pool is immediately resized to set the specified number of threads. The pool's actual number threads depends on the SizePolicy.
    +     */
    +    thread_pool(size_t initial_threads = 0)
    +    : m_core(new pool_core_type)
    +    , m_shutdown_controller(static_cast<void*>(0), bind(&pool_core_type::shutdown, m_core))
    +    {
    +      size_policy_type::init(*m_core, initial_threads);
    +    }
    +
    +
    +    /*! Gets the size controller which manages the number of threads in the pool. 
    +    * \return The size controller.
    +    * \see SizePolicy
    +    */
    +    size_controller_type size_controller()
    +    {
    +      return m_core->size_controller();
    +    }
    +
    +
    +    /*! Gets the number of threads in the pool.
    +    * \return The number of threads.
    +    */
    +    size_t size()	const
    +    {
    +      return m_core->size();
    +    }
    +
    +
    +     /*! Schedules a task for asynchronous execution. The task will be executed once only.
    +     * \param task The task function object. It should not throw execeptions.
    +     * \return true, if the task could be scheduled and false otherwise. 
    +     */  
    +     bool schedule(task_type const & task)
    +     {	
    +       return m_core->schedule(task);
    +     }
    +
    +
    +    /*! Returns the number of tasks which are currently executed.
    +    * \return The number of active tasks. 
    +    */  
    +    size_t active() const
    +    {
    +      return m_core->active();
    +    }
    +
    +
    +    /*! Returns the number of tasks which are ready for execution.    
    +    * \return The number of pending tasks. 
    +    */  
    +    size_t pending() const
    +    {
    +      return m_core->pending();
    +    }
    +
    +
    +    /*! Removes all pending tasks from the pool's scheduler.
    +    */  
    +    void clear()
    +    { 
    +      m_core->clear();
    +    }    
    +
    +
    +    /*! Indicates that there are no tasks pending. 
    +    * \return true if there are no tasks ready for execution.	
    +    * \remarks This function is more efficient that the check 'pending() == 0'.
    +    */   
    +    bool empty() const
    +    {
    +      return m_core->empty();
    +    }	
    +
    +
    +    /*! The current thread of execution is blocked until the sum of all active
    +    *  and pending tasks is equal or less than a given threshold. 
    +    * \param task_threshold The maximum number of tasks in pool and scheduler.
    +    */     
    +    void wait(size_t task_threshold = 0) const
    +    {
    +      m_core->wait(task_threshold);
    +    }	
    +
    +
    +    /*! The current thread of execution is blocked until the timestamp is met
    +    * or the sum of all active and pending tasks is equal or less 
    +    * than a given threshold.  
    +    * \param timestamp The time when function returns at the latest.
    +    * \param task_threshold The maximum number of tasks in pool and scheduler.
    +    * \return true if the task sum is equal or less than the threshold, false otherwise.
    +    */       
    +    bool wait(xtime const & timestamp, size_t task_threshold = 0) const
    +    {
    +      return m_core->wait(timestamp, task_threshold);
    +    }
    +  };
    +
    +
    +
    +  /*! \brief Fifo pool.
    +  *
    +  * The pool's tasks are fifo scheduled task_func functors.
    +  *
    +  */ 
    +  typedef thread_pool<task_func, fifo_scheduler, static_size, resize_controller, wait_for_all_tasks> fifo_pool;
    +
    +
    +  /*! \brief Lifo pool.
    +  *
    +  * The pool's tasks are lifo scheduled task_func functors.
    +  *
    +  */ 
    +  typedef thread_pool<task_func, lifo_scheduler, static_size, resize_controller, wait_for_all_tasks> lifo_pool;
    +
    +
    +  /*! \brief Pool for prioritized task.
    +  *
    +  * The pool's tasks are prioritized prio_task_func functors.
    +  *
    +  */ 
    +  typedef thread_pool<prio_task_func, prio_scheduler, static_size, resize_controller, wait_for_all_tasks> prio_pool;
    +
    +
    +  /*! \brief A standard pool.
    +  *
    +  * The pool's tasks are fifo scheduled task_func functors.
    +  *
    +  */
    +  typedef fifo_pool pool;
    +
    +
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_POOL_HPP_INCLUDED
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/pool_adaptors.hpp b/wt-3.1.7a/src/threadpool/threadpool/pool_adaptors.hpp
    new file mode 100644
    index 0000000..7ec8360
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/pool_adaptors.hpp
    @@ -0,0 +1,70 @@
    +/*! \file
    +* \brief Pool adaptors.
    +*
    +* This file contains an easy-to-use adaptor similar to a smart 
    +* pointer for the pool class. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
    +#define THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
    +
    +#include <boost/smart_ptr.hpp>
    +
    +
    +namespace boost { namespace threadpool
    +{
    +
    +
    +// TODO convenience scheduling function
    +    /*! Schedules a Runnable for asynchronous execution. A Runnable is an arbitrary class with a run()
    +    * member function. This a convenience shorthand for pool->schedule(bind(&Runnable::run, task_object)).
    +    * \param 
    +    * \param obj The Runnable object. The member function run() will be exectued and should not throw execeptions.
    +    * \return true, if the task could be scheduled and false otherwise. 
    +    */  
    +    template<typename Pool, typename Runnable>
    +    bool schedule(Pool& pool, shared_ptr<Runnable> const & obj)
    +    {	
    +      return pool->schedule(bind(&Runnable::run, obj));
    +    }	
    +    
    +    /*! Schedules a task for asynchronous execution. The task will be executed once only.
    +    * \param task The task function object.
    +    */  
    +    template<typename Pool>
    +    typename enable_if < 
    +      is_void< typename result_of< typename Pool::task_type() >::type >,
    +      bool
    +    >::type
    +    schedule(Pool& pool, typename Pool::task_type const & task)
    +    {	
    +      return pool.schedule(task);
    +    }	
    +
    +
    +    template<typename Pool>
    +    typename enable_if <
    +      is_void< typename result_of< typename Pool::task_type() >::type >,
    +      bool
    +    >::type
    +    schedule(shared_ptr<Pool> const pool, typename Pool::task_type const & task)
    +    {
    +      return pool->schedule(task);
    +    }
    +
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED
    +
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/scheduling_policies.hpp b/wt-3.1.7a/src/threadpool/threadpool/scheduling_policies.hpp
    new file mode 100644
    index 0000000..2d6c7c1
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/scheduling_policies.hpp
    @@ -0,0 +1,262 @@
    +/*! \file
    +* \brief Task scheduling policies.
    +*
    +* This file contains some fundamental scheduling policies for the pool class. 
    +* A scheduling policy is realized by a task container which controls the access to
    +* the tasks. 	Fundamentally the container determines the order the tasks are processed
    +* by the thread pool. 
    +* The task containers need not to be thread-safe because they are used by the pool 
    +* in thread-safe way. 
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
    +#define THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
    +
    +
    +#include <queue>
    +#include <deque>
    +
    +#include "task_adaptors.hpp"
    +
    +namespace boost { namespace threadpool
    +{
    +
    +  /*! \brief SchedulingPolicy which implements FIFO ordering. 
    +  *
    +  * This container implements a FIFO scheduling policy.
    +  * The first task to be added to the scheduler will be the first to be removed.
    +  * The processing proceeds sequentially in the same order. 
    +  * FIFO stands for "first in, first out".
    +  *
    +  * \param Task A function object which implements the operator()(void).
    +  *
    +  */ 
    +  template <typename Task = task_func>  
    +  class fifo_scheduler
    +  {
    +  public:
    +    typedef Task task_type; //!< Indicates the scheduler's task type.
    +
    +  protected:
    +    std::deque<task_type> m_container;  //!< Internal task container.	
    +
    +
    +  public:
    +    /*! Adds a new task to the scheduler.
    +    * \param task The task object.
    +    * \return true, if the task could be scheduled and false otherwise. 
    +    */
    +    bool push(task_type const & task)
    +    {
    +      m_container.push_back(task);
    +      return true;
    +    }
    +
    +    /*! Removes the task which should be executed next.
    +    */
    +    void pop()
    +    {
    +      m_container.pop_front();
    +    }
    +
    +    /*! Gets the task which should be executed next.
    +    *  \return The task object to be executed.
    +    */
    +    task_type const & top() const
    +    {
    +      return m_container.front();
    +    }
    +
    +    /*! Gets the current number of tasks in the scheduler.
    +    *  \return The number of tasks.
    +    *  \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
    +    */
    +    size_t size() const
    +    {
    +      return m_container.size();
    +    }
    +
    +    /*! Checks if the scheduler is empty.
    +    *  \return true if the scheduler contains no tasks, false otherwise.
    +    *  \remarks Is more efficient than size() == 0. 
    +    */
    +    bool empty() const
    +    {
    +      return m_container.empty();
    +    }
    +
    +    /*! Removes all tasks from the scheduler.
    +    */  
    +    void clear()
    +    {   
    +      m_container.clear();
    +    } 
    +  };
    +
    +
    +
    +  /*! \brief SchedulingPolicy which implements LIFO ordering. 
    +  *
    +  * This container implements a LIFO scheduling policy.
    +  * The last task to be added to the scheduler will be the first to be removed.
    +  * LIFO stands for "last in, first out".
    +  *
    +  * \param Task A function object which implements the operator()(void).
    +  *
    +  */ 
    +  template <typename Task = task_func>  
    +  class lifo_scheduler
    +  {
    +  public:
    +    typedef Task task_type;  //!< Indicates the scheduler's task type.
    +
    +  protected:
    +    std::deque<task_type> m_container;  //!< Internal task container.	
    +
    +  public:
    +    /*! Adds a new task to the scheduler.
    +    * \param task The task object.
    +    * \return true, if the task could be scheduled and false otherwise. 
    +    */
    +    bool push(task_type const & task)
    +    {
    +      m_container.push_front(task);
    +      return true;
    +    }
    +
    +    /*! Removes the task which should be executed next.
    +    */
    +    void pop()
    +    {
    +      m_container.pop_front();
    +    }
    +
    +    /*! Gets the task which should be executed next.
    +    *  \return The task object to be executed.
    +    */
    +    task_type const & top() const
    +    {
    +      return m_container.front();
    +    }
    +
    +    /*! Gets the current number of tasks in the scheduler.
    +    *  \return The number of tasks.
    +    *  \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
    +    */
    +    size_t size() const
    +    {
    +      return m_container.size();
    +    }
    +
    +    /*! Checks if the scheduler is empty.
    +    *  \return true if the scheduler contains no tasks, false otherwise.
    +    *  \remarks Is more efficient than size() == 0. 
    +    */
    +    bool empty() const
    +    {
    +      return m_container.empty();
    +    }
    +
    +    /*! Removes all tasks from the scheduler.
    +    */  
    +    void clear()
    +    {    
    +      m_container.clear();
    +    } 
    +
    +  };
    +
    +
    +
    +  /*! \brief SchedulingPolicy which implements prioritized ordering. 
    +  *
    +  * This container implements a scheduling policy based on task priorities.
    +  * The task with highest priority will be the first to be removed.
    +  * It must be possible to compare two tasks using operator<. 
    +  *
    +  * \param Task A function object which implements the operator() and operator<. operator< must be a partial ordering.
    +  *
    +  * \see prio_thread_func
    +  *
    +  */ 
    +  template <typename Task = prio_task_func>  
    +  class prio_scheduler
    +  {
    +  public:
    +    typedef Task task_type; //!< Indicates the scheduler's task type.
    +
    +  protected:
    +    std::priority_queue<task_type> m_container;  //!< Internal task container.
    +
    +
    +  public:
    +    /*! Adds a new task to the scheduler.
    +    * \param task The task object.
    +    * \return true, if the task could be scheduled and false otherwise. 
    +    */
    +    bool push(task_type const & task)
    +    {
    +      m_container.push(task);
    +      return true;
    +    }
    +
    +    /*! Removes the task which should be executed next.
    +    */
    +    void pop()
    +    {
    +      m_container.pop();
    +    }
    +
    +    /*! Gets the task which should be executed next.
    +    *  \return The task object to be executed.
    +    */
    +    task_type const & top() const
    +    {
    +      return m_container.top();
    +    }
    +
    +    /*! Gets the current number of tasks in the scheduler.
    +    *  \return The number of tasks.
    +    *  \remarks Prefer empty() to size() == 0 to check if the scheduler is empty.
    +    */
    +    size_t size() const
    +    {
    +      return m_container.size();
    +    }
    +
    +    /*! Checks if the scheduler is empty.
    +    *  \return true if the scheduler contains no tasks, false otherwise.
    +    *  \remarks Is more efficient than size() == 0. 
    +    */
    +    bool empty() const
    +    {
    +      return m_container.empty();
    +    }
    +
    +    /*! Removes all tasks from the scheduler.
    +    */  
    +    void clear()
    +    {    
    +      while(!m_container.empty())
    +      {
    +        m_container.pop();
    +      }
    +    } 
    +  };
    +
    +
    +} } // namespace boost::threadpool
    +
    +
    +#endif // THREADPOOL_SCHEDULING_POLICIES_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/shutdown_policies.hpp b/wt-3.1.7a/src/threadpool/threadpool/shutdown_policies.hpp
    new file mode 100644
    index 0000000..8c661c1
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/shutdown_policies.hpp
    @@ -0,0 +1,83 @@
    +/*! \file
    +* \brief Shutdown policies.
    +*
    +* This file contains shutdown policies for thread_pool. 
    +* A shutdown policy controls the pool's behavior from the time
    +* when the pool is not referenced any longer.
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
    +#define THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
    +
    +
    +
    +/// The namespace threadpool contains a thread pool and related utility classes.
    +namespace boost { namespace threadpool
    +{
    +
    +
    +/*! \brief ShutdownPolicy which waits for the completion of all tasks
    +  *          and the worker termination afterwards.
    +    *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template<typename Pool>
    +  class wait_for_all_tasks
    +  {
    +  public:
    +    static void shutdown(Pool& pool)
    +    {
    +      pool.wait();
    +      pool.terminate_all_workers(true);
    +    }
    +  };
    +
    +
    +  /*! \brief ShutdownPolicy which waits for the completion of all active tasks
    +  *          and the worker termination afterwards.
    +  *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template<typename Pool>
    +  class wait_for_active_tasks
    +  {
    +  public:
    +    static void shutdown(Pool& pool)
    +    {
    +      pool.clear();
    +      pool.wait();
    +      pool.terminate_all_workers(true);
    +    }
    +  };
    +
    +
    +  /*! \brief ShutdownPolicy which does not wait for any tasks or worker termination.
    +  *
    +  * This policy does not wait for any tasks. Nevertheless all active tasks will be processed completely.
    +  *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template<typename Pool>
    +  class immediately
    +  {
    +  public:
    +    static void shutdown(Pool& pool)
    +    {
    +      pool.clear();
    +      pool.terminate_all_workers(false);
    +    }
    +  };
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/size_policies.hpp b/wt-3.1.7a/src/threadpool/threadpool/size_policies.hpp
    new file mode 100644
    index 0000000..e3c0803
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/size_policies.hpp
    @@ -0,0 +1,99 @@
    +/*! \file
    +* \brief Size policies.
    +*
    +* This file contains size policies for thread_pool. A size 
    +* policy controls the number of worker threads in the pool.
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
    +#define THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
    +
    +
    +
    +/// The namespace threadpool contains a thread pool and related utility classes.
    +namespace boost { namespace threadpool
    +{
    +
    +  /*! \brief SizePolicyController which provides no functionality.
    +  *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template<typename Pool>
    +  struct empty_controller
    +  {
    +    empty_controller(typename Pool::size_policy_type&, shared_ptr<Pool>) {}
    +  };
    +
    +
    +  /*! \brief SizePolicyController which allows resizing.
    +  *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template< typename Pool >
    +  class resize_controller
    +  {
    +    typedef typename Pool::size_policy_type size_policy_type;
    +    reference_wrapper<size_policy_type> m_policy;
    +    shared_ptr<Pool> m_pool;                           //!< to make sure that the pool is alive (the policy pointer is valid) as long as the controller exists
    +
    +  public:
    +    resize_controller(size_policy_type& policy, shared_ptr<Pool> pool)
    +      : m_policy(policy)
    +      , m_pool(pool)
    +    {
    +    }
    +
    +    bool resize(size_t worker_count)
    +    {
    +      return m_policy.get().resize(worker_count);
    +    }
    +  };
    +
    +
    +  /*! \brief SizePolicy which preserves the thread count.
    +  *
    +  * \param Pool The pool's core type.
    +  */ 
    +  template<typename Pool>
    +  class static_size
    +  {
    +    reference_wrapper<Pool volatile> m_pool;
    +
    +  public:
    +    static void init(Pool& pool, size_t const worker_count)
    +    {
    +      pool.resize(worker_count);
    +    }
    +
    +    static_size(Pool volatile & pool)
    +      : m_pool(pool)
    +    {}
    +
    +    bool resize(size_t const worker_count)
    +    {
    +      return m_pool.get().resize(worker_count);
    +    }
    +
    +    void worker_died_unexpectedly(size_t const new_worker_count)
    +    {
    +      m_pool.get().resize(new_worker_count + 1);
    +    }
    +
    +    // TODO this functions are not called yet
    +    void task_scheduled() {}
    +    void task_finished() {}
    +  };
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_SIZE_POLICIES_HPP_INCLUDED
    diff --git a/wt-3.1.7a/src/threadpool/threadpool/task_adaptors.hpp b/wt-3.1.7a/src/threadpool/threadpool/task_adaptors.hpp
    new file mode 100644
    index 0000000..6b874e3
    --- /dev/null
    +++ b/wt-3.1.7a/src/threadpool/threadpool/task_adaptors.hpp
    @@ -0,0 +1,168 @@
    +/*! \file
    +* \brief Task adaptors.
    +*
    +* This file contains adaptors for task function objects.
    +*
    +* Copyright (c) 2005-2007 Philipp Henkel
    +*
    +* Use, modification, and distribution are  subject to the
    +* Boost Software License, Version 1.0. (See accompanying  file
    +* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +*
    +* http://threadpool.sourceforge.net
    +*
    +*/
    +
    +
    +#ifndef THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
    +#define THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
    +
    +
    +#include <boost/smart_ptr.hpp>
    +#include <boost/function.hpp>
    +#include <boost/thread.hpp>
    +
    +
    +namespace boost { namespace threadpool
    +{
    +
    +  /*! \brief Standard task function object.
    +  *
    +  * This function object wraps a nullary function which returns void.
    +  * The wrapped function is invoked by calling the operator ().
    +  *
    +  * \see boost function library
    +  *
    +  */ 
    +  typedef function0<void> task_func;
    +
    +
    +
    +
    +  /*! \brief Prioritized task function object. 
    +  *
    +  * This function object wraps a task_func object and binds a priority to it.
    +  * prio_task_funcs can be compared using the operator < which realises a partial ordering.
    +  * The wrapped task function is invoked by calling the operator ().
    +  *
    +  * \see prio_scheduler
    +  *
    +  */ 
    +  class prio_task_func
    +  {
    +  private:
    +    unsigned int m_priority;  //!< The priority of the task's function.
    +    task_func m_function;     //!< The task's function.
    +
    +  public:
    +    typedef void result_type; //!< Indicates the functor's result type.
    +
    +  public:
    +    /*! Constructor.
    +    * \param priority The priority of the task.
    +    * \param function The task's function object.
    +    */
    +    prio_task_func(unsigned int const priority, task_func const & function)
    +      : m_priority(priority)
    +      , m_function(function)
    +    {
    +    }
    +
    +    /*! Executes the task function.
    +    */
    +    void operator() (void) const
    +    {
    +      if(m_function)
    +      {
    +        m_function();
    +      }
    +    }
    +
    +    /*! Comparison operator which realises a partial ordering based on priorities.
    +    * \param rhs The object to compare with.
    +    * \return true if the priority of *this is less than right hand side's priority, false otherwise.
    +    */
    +    bool operator< (const prio_task_func& rhs) const
    +    {
    +      return m_priority < rhs.m_priority; 
    +    }
    +
    +  };  // prio_task_func
    +
    +
    +
    + 
    +
    +
    +
    +
    +  /*! \brief Looped task function object. 
    +  *
    +  * This function object wraps a boolean thread function object.
    +  * The wrapped task function is invoked by calling the operator () and it is executed in regular 
    +  * time intervals until false is returned. The interval length may be zero.
    +  * Please note that a pool's thread is engaged as long as the task is looped.
    +  *
    +  */ 
    +  class looped_task_func
    +  {
    +  private:
    +    function0<bool> m_function;   //!< The task's function.
    +    unsigned int m_break_s;              //!< Duration of breaks in seconds.
    +    unsigned int m_break_ns;             //!< Duration of breaks in nano seconds.
    +
    +  public:
    +    typedef void result_type; //!< Indicates the functor's result type.
    +
    +  public:
    +    /*! Constructor.
    +    * \param function The task's function object which is looped until false is returned.
    +    * \param interval The minimum break time in milli seconds before the first execution of the task function and between the following ones.
    +    */
    +    looped_task_func(function0<bool> const & function, unsigned int const interval = 0)
    +      : m_function(function)
    +    {
    +      m_break_s  = interval / 1000;
    +      m_break_ns = (interval - m_break_s * 1000) * 1000 * 1000;
    +    }
    +
    +    /*! Executes the task function.
    +    */
    +    void operator() (void) const
    +    {
    +      if(m_function)
    +      {
    +        if(m_break_s > 0 || m_break_ns > 0)
    +        { // Sleep some time before first execution
    +          xtime xt;
    +          xtime_get(&xt, TIME_UTC);
    +          xt.nsec += m_break_ns;
    +          xt.sec += m_break_s;
    +          thread::sleep(xt); 
    +        }
    +
    +        while(m_function())
    +        {
    +          if(m_break_s > 0 || m_break_ns > 0)
    +          {
    +            xtime xt;
    +            xtime_get(&xt, TIME_UTC);
    +            xt.nsec += m_break_ns;
    +            xt.sec += m_break_s;
    +            thread::sleep(xt); 
    +          }
    +          else
    +          {
    +            thread::yield(); // Be fair to other threads
    +          }
    +        }
    +      }
    +    }
    +
    +  }; // looped_task_func
    +
    +
    +} } // namespace boost::threadpool
    +
    +#endif // THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED
    +
    diff --git a/wt-3.1.7a/src/web/CMakeLists.txt b/wt-3.1.7a/src/web/CMakeLists.txt
    new file mode 100644
    index 0000000..e69de29
    diff --git a/wt-3.1.7a/src/web/CgiParser.C b/wt-3.1.7a/src/web/CgiParser.C
    new file mode 100644
    index 0000000..b315c5e
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/CgiParser.C
    @@ -0,0 +1,458 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + * In addition to these terms, permission is also granted to use and
    + * modify these two files (CgiParser.C and CgiParser.h) so long as the
    + * copyright above is maintained, modifications are documented, and
    + * credit is given for any use of the library.
    + *
    + * CGI parser modelled after the PERL implementation cgi-lib.pl 2.18 by
    + * Steven E. Brenner with the following original copyright:
    +
    +# Perl Routines to Manipulate CGI input
    +# cgi-lib@pobox.com
    +#
    +# Copyright (c) 1993-1999 Steven E. Brenner  
    +# Unpublished work.
    +# Permission granted to use and modify this library so long as the
    +# copyright above is maintained, modifications are documented, and
    +# credit is given for any use of the library.
    +#
    +# Thanks are due to many people for reporting bugs and suggestions
    +
    +# For more information, see:
    +#     http://cgi-lib.stanford.edu/cgi-lib/  
    +
    + */
    +
    +//#define DEBUG
    +
    +#include <iostream>
    +#include <fstream>
    +#include <stdlib.h>
    +
    +#ifdef WT_HAVE_GNU_REGEX
    +#include <regex.h>
    +#else
    +#include <boost/regex.hpp>
    +#endif // WT_HAVE_GNU_REGEX
    +
    +#include <boost/tokenizer.hpp>
    +
    +#include "CgiParser.h"
    +#include "WebRequest.h"
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +using std::memmove;
    +using std::strcpy;
    +using std::strtol;
    +
    +namespace {
    +#ifndef WT_HAVE_GNU_REGEX
    +  const boost::regex boundary_e("\\bboundary=(?:(?:\"([^\"]+)\")|(\\S+))",
    +			       boost::regex::perl|boost::regex::icase);
    +  const boost::regex name_e("\\bname=(?:(?:\"([^\"]+)\")|([^\\s:;]+))",
    +			       boost::regex::perl|boost::regex::icase);
    +  const boost::regex filename_e("\\bfilename=(?:(?:\"([^\"]*)\")|([^\\s:;]+))",
    +			       boost::regex::perl|boost::regex::icase);
    +  const boost::regex content_e("^\\s*Content-type:"
    +			       "\\s*(?:(?:\"([^\"]+)\")|([^\\s:;]+))",
    +			       boost::regex::perl|boost::regex::icase);
    +  const boost::regex content_disposition_e("^\\s*Content-Disposition:",
    +			       boost::regex::perl|boost::regex::icase);
    +  const boost::regex content_type_e("^\\s*Content-Type:",
    +			       boost::regex::perl|boost::regex::icase);
    +
    +  bool fishValue(const std::string& text,
    +		 const boost::regex& e, std::string& result)
    +  {
    +    boost::smatch what;
    +
    +    if (boost::regex_search(text, what, e)) {
    +      result = what[1] + what[2];
    +      return true;
    +    } else
    +      return false;
    +  }
    +
    +  bool regexMatch(const std::string& text, const boost::regex& e)
    +  {
    +    return boost::regex_search(text, e);
    +  }
    +
    +#else
    +  regex_t boundary_e, name_e, filename_e, content_e,
    +    content_disposition_e, content_type_e;
    +
    +  const char *boundary_ep = "\\bboundary=((\"([^\"]*)\")|([^ \t]*))";
    +  const char *name_ep = "\\bname=((\"([^\"]*)\")|([^ \t:;]*))";
    +  const char *filename_ep = "\\bfilename=((\"([^\"]*)\")|([^ \t:;]*))";
    +  const char *content_ep = "^[ \t]*Content-type:"
    +    "[ \t]*((\"([^\"]*)\")|([^ \t:;]*))";
    +  const char *content_disposition_ep = "^[ \t]*Content-Disposition:";
    +  const char *content_type_ep = "^[ \t]*Content-Type:";
    +
    +  bool fishValue(const std::string& text,
    +		 regex_t& e1, std::string& result)
    +  {
    +    regmatch_t pmatch[5];
    +    int res = regexec(&e1, text.c_str(), 5, pmatch, 0);
    +
    +    if (res == 0) {      
    +      if (pmatch[3].rm_so != -1)
    +	result = text.substr(pmatch[3].rm_so,
    +			     pmatch[3].rm_eo - pmatch[3].rm_so);
    +      if (pmatch[4].rm_so != -1)
    +	result = text.substr(pmatch[4].rm_so,
    +			     pmatch[4].rm_eo - pmatch[4].rm_so);
    +
    +      return true;
    +    } else
    +      return false;
    +  }
    +
    +  bool regexMatch(const std::string& text, regex_t& e)
    +  {
    +    regmatch_t pmatch[1];
    +
    +    return regexec(&e, text.c_str(), 1, pmatch, 0) == 0;
    +  }
    +
    +  class RegInitializer {
    +  protected:
    +    static bool regInitialized_;
    +
    +  public:
    +    RegInitializer()
    +    {}
    +
    +    ~RegInitializer() {
    +      cleanup();
    +    }
    +
    +    static void setup() {
    +      if (!regInitialized_) {
    +	regcomp(&boundary_e, boundary_ep, REG_ICASE | REG_EXTENDED);
    +	regcomp(&name_e, name_ep, REG_ICASE | REG_EXTENDED);
    +	regcomp(&filename_e, filename_ep, REG_ICASE | REG_EXTENDED);
    +	regcomp(&content_e, content_ep, REG_ICASE | REG_EXTENDED);
    +	regcomp(&content_disposition_e, content_disposition_ep,
    +		REG_ICASE | REG_EXTENDED);
    +	regcomp(&content_type_e, content_type_ep, REG_ICASE | REG_EXTENDED);
    +	regInitialized_ = true;
    +      }
    +    }
    +
    +    static void cleanup() {
    +      if (regInitialized_) {
    +	regfree(&boundary_e);
    +	regfree(&name_e);
    +	regfree(&filename_e);
    +	regfree(&content_e);
    +	regfree(&content_disposition_e);
    +	regfree(&content_type_e);
    +	regInitialized_ = false;
    +      }
    +    }
    +  };
    +
    +  bool RegInitializer::regInitialized_ = false;
    +
    +  static RegInitializer regInitializer;
    +#endif
    +}
    +
    +namespace Wt {
    +
    +void CgiParser::init()
    +{
    +#ifdef WT_HAVE_GNU_REGEX
    +  RegInitializer::setup();
    +#endif
    +}
    +
    +char CgiParser::buf_[BUFSIZE + MAXBOUND];
    +
    +CgiParser::CgiParser(::int64_t maxPostData)
    +  : maxPostData_(maxPostData)
    +{ }
    +
    +void CgiParser::parse(WebRequest& request, bool readBody)
    +{
    +  request_ = &request;
    +
    +  ::int64_t len = request.contentLength();
    +  std::string type = request.contentType();
    +  std::string meth = request.requestMethod();
    +
    +  request.postDataExceeded_ = (len > maxPostData_ ? len : 0);
    +
    +  std::string queryString = request.queryString();
    +
    +  if (readBody && meth == "POST"
    +      && type.find("application/x-www-form-urlencoded") == 0) {
    +    char *buf = new char[len + 1];
    +
    +    request.in().read(buf, len);
    +    if (request.in().gcount() != (int)len) {
    +      delete[] buf;
    +      throw WtException("Unexpected short read.");
    +    }
    +    buf[len] = 0;
    +
    +    // This is a special Wt feature, I do not think it standard.
    +    // For POST, parameters in url-encoded URL are still parsed.
    +    if (!queryString.empty())
    +      queryString += '&';
    +
    +    queryString += buf;
    +    delete[] buf;
    +  }
    +
    +  // std::cerr << "queryString (len=" << len << "): " << queryString << std::endl;
    +
    +  if (!queryString.empty()) {
    +    typedef boost::tokenizer<boost::char_separator<char> > amp_tok;
    +    amp_tok tok(queryString, boost::char_separator<char>("&"));
    +
    +#ifdef DEBUG
    +    std::cerr << queryString << std::endl;
    +#endif // DEBUG
    +
    +    for (amp_tok::iterator i = tok.begin(); i != tok.end(); ++i) {
    +      std::string pair = *i;
    +
    +#ifdef DEBUG
    +      std::cerr << pair << std::endl;
    +#endif // DEBUG
    +
    +      // convert plus to space
    +      Wt::Utils::replace(pair, '+', " ");
    +
    +      // split into key and value
    +      std::string::size_type equalPos = pair.find('=');
    +      std::string key = pair.substr(0, equalPos);
    +      std::string value;
    +      value = (equalPos != std::string::npos && pair.size() > equalPos + 1)
    +	? pair.substr(equalPos + 1) : "";
    +
    +      // convert %XX from hex numbers to alphanumeric
    +      Wt::Utils::unescapeHexTokens(key);
    +      Wt::Utils::unescapeHexTokens(value);
    +
    +#ifdef DEBUG
    +      std::cerr << key << ": \"" << value << "\"" << std::endl;
    +#endif // DEBUG
    +
    +      request_->parameters_[key].push_back(value);
    +    }
    +  }
    +
    +  if (readBody && type.find("multipart/form-data") == 0) {
    +    if (meth != "POST") {
    +      throw WtException("Invalid method for multipart/form-data: " + meth);
    +    }
    +
    +    if (!request.postDataExceeded_)
    +      readMultipartData(request, type, len);
    +  }
    +}
    +
    +void CgiParser::readMultipartData(WebRequest& request,
    +				  const std::string type, ::int64_t len)
    +{
    +  std::string boundary;
    +    
    +  if (!fishValue(type, boundary_e, boundary))
    +    throw WtException("Could not find a boundary for multipart data.");
    +    
    +  boundary = "--" + boundary;
    +
    +  buflen_ = 0;
    +  left_ = len;
    +  spoolStream_ = 0;
    +  currentKey_.clear();
    +
    +  parseBody(request, boundary);
    +  for (;;) {
    +    if (!parseHead(request))
    +      break;
    +    if (!parseBody(request,boundary)) 
    +      break;
    +  }
    +}
    +
    +/*
    + * Read until finding the boundary, saving to resultString or
    + * resultFile. The boundary itself is not consumed.
    + *
    + * tossAtBoundary controls how many characters extra (<0)
    + * or few (>0) are saved at the start of the boundary in the result.
    + */
    +void CgiParser::readUntilBoundary(WebRequest& request,
    +				  const std::string boundary,
    +				  int tossAtBoundary,
    +				  std::string *resultString,
    +				  std::ostream *resultFile)
    +{
    +  int bpos;
    +
    +  while ((bpos = index(boundary)) == -1) {
    +    /*
    +     * If we couldn't find it. We need to wind the buffer, but only save
    +     * not including the boundary length.
    +     */
    +    if (left_ == 0)
    +      throw WtException("CgiParser: reached end of input while seeking end of "
    +			"headers or content. Format of CGI input is wrong");
    +
    +    /* save (up to) BUFSIZE from buffer to file or value string, but
    +     * mind the boundary length */
    +    int save = std::min((buflen_ - (int)boundary.length()), (int)BUFSIZE);
    +
    +    if (save > 0) {
    +      if (resultString)
    +	*resultString += std::string(buf_, save);
    +      if (resultFile) 
    +	resultFile->write(buf_, save);
    +
    +      /* wind buffer */
    +      windBuffer(save);
    +    }
    +
    +    unsigned amt = static_cast<unsigned>
    +      (std::min(left_,
    +		static_cast< ::int64_t >(BUFSIZE + MAXBOUND - buflen_)));
    +
    +    request.in().read(buf_ + buflen_, amt);    
    +    if (request.in().gcount() != (int)amt)
    +      throw WtException("CgiParser: short read");
    +
    +    left_ -= amt;
    +    buflen_ += amt;
    +  }
    +
    +  if (resultString)
    +    *resultString += std::string(buf_, bpos - tossAtBoundary);
    +  if (resultFile)
    +    resultFile->write(buf_, bpos - tossAtBoundary);
    +
    +  /* wind buffer */
    +  windBuffer(bpos);
    +}
    +
    +void CgiParser::windBuffer(int offset)
    +{
    +  if (offset < buflen_) {
    +    memmove(buf_, buf_ + offset, buflen_ - offset);
    +    buflen_ -= offset;
    +  } else
    +    buflen_ = 0;
    +}
    +
    +int CgiParser::index(const std::string search)
    +{
    +  std::string bufS = std::string(buf_, buflen_);
    +
    +  std::string::size_type i = bufS.find(search);
    +
    +  if (i == std::string::npos)
    +    return -1;
    +  else
    +    return i;
    +}
    +
    +bool CgiParser::parseHead(WebRequest& request)
    +{
    +  std::string head;
    +  readUntilBoundary(request, "\r\n\r\n", -2, &head, 0);
    +
    +  std::string name;
    +  std::string fn;
    +  std::string ctype;
    +
    +  for (unsigned current = 0; current < head.length();) {
    +    /* read line by line */
    +    std::string::size_type i = head.find("\r\n", current);
    +    const std::string text = head.substr(current, (i == std::string::npos
    +						   ? std::string::npos
    +						   : i - current));
    +
    +    if (regexMatch(text, content_disposition_e)) {
    +      fishValue(text, name_e, name);
    +      fishValue(text, filename_e, fn);
    +    }
    +
    +    if (regexMatch(text, content_type_e)) {
    +      fishValue(text, content_e, ctype);
    +    }
    +
    +    current = i + 2;
    +  }
    +
    +#ifdef DEBUG
    +  std::cerr << "name: " << name 
    +	    << " ct: " << ctype 
    +	    << " fn: " << fn << std::endl;
    +#endif
    +
    +  currentKey_ = name;
    +
    +  if (!fn.empty()) {
    +    if (!request.postDataExceeded_) {
    +      /*
    +       * It is not easy to create a std::ostream pointing to a
    +       * temporary file name.
    +       */
    +      std::string spool = Wt::Utils::createTempFileName();
    +
    +      spoolStream_ = new std::ofstream(spool.c_str(),
    +        std::ios::out | std::ios::binary);
    +
    +      request_->files_.insert
    +	(std::make_pair(name, Http::UploadedFile(spool, fn, ctype)));
    +    } else {
    +      spoolStream_ = 0;
    +      // Clear currentKey so that file we don't do harm by reading this
    +      // giant blob in memory
    +      currentKey_ = "";
    +    }
    +  }
    +
    +  windBuffer(4);
    +
    +  return true;
    +}
    +
    +bool CgiParser::parseBody(WebRequest& request, const std::string boundary)
    +{
    +  std::string value;
    +
    +  readUntilBoundary(request, boundary, 2,
    +		    spoolStream_ ? 0 : (!currentKey_.empty() ? &value : 0),
    +		    spoolStream_);
    +
    +  if (spoolStream_) {
    +    delete spoolStream_;
    +    spoolStream_ = 0;
    +  } else
    +    if (!currentKey_.empty()) {
    +#ifdef DEBUG
    +      std::cerr << "value: \"" << value << "\"" << std::endl;
    +#endif
    +      request_->parameters_[currentKey_].push_back(value);
    +    }
    +
    +  currentKey_.clear();
    +
    +  if (std::string(buf_ + boundary.length(), 2) == "--")
    +    return false;
    +
    +  windBuffer(boundary.length() + 2);
    +
    +  return true;
    +}
    +
    +} // namespace Wt
    diff --git a/wt-3.1.7a/src/web/CgiParser.h b/wt-3.1.7a/src/web/CgiParser.h
    new file mode 100644
    index 0000000..51f210a
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/CgiParser.h
    @@ -0,0 +1,67 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef CGI_PARSER_H_
    +#define CGI_PARSER_H_
    +
    +#include <string>
    +#include <map>
    +#include <iostream>
    +#include <vector>
    +#include <boost/cstdint.hpp>
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class CgiParser;
    +class WebRequest;
    +
    +/*
    + * Parses CGI in all its forms (get/post/file uploads).
    + */
    +class CgiParser
    +{
    +public:
    +  static void init();
    +
    +  CgiParser(::int64_t maxPostData);
    +
    +  /*
    +   * Reads in GET or POST data, converts it to unescaped text, and
    +   * creates Entry for each parameter entry. The request is annotated
    +   * with the parse results.
    +   */
    +  void parse(WebRequest& request, bool readBody = true);
    +
    +private:
    +  void readMultipartData(WebRequest& request, const std::string type,
    +			 ::int64_t len);
    +  bool parseBody(WebRequest& request, const std::string boundary);
    +  bool parseHead(WebRequest& request);
    +  ::int64_t maxPostData_, left_;
    +  std::ostream *spoolStream_;
    +  WebRequest *request_;
    +
    +  std::string currentKey_;
    +
    +  void readUntilBoundary(WebRequest& request, const std::string boundary,
    +			 int tossAtBoundary,
    +			 std::string *resultString,
    +			 std::ostream *resultFile);
    +  void windBuffer(int offset);
    +  int index(const std::string search);
    +
    +  enum {BUFSIZE = 8192};
    +  enum {MAXBOUND = 100};
    +
    +  int buflen_;
    +  static char buf_[BUFSIZE + MAXBOUND];
    +};
    +
    +}
    +
    +#endif // CGI_PARSER_H_
    diff --git a/wt-3.1.7a/src/web/Configuration.C b/wt-3.1.7a/src/web/Configuration.C
    new file mode 100644
    index 0000000..4ba5394
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/Configuration.C
    @@ -0,0 +1,591 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#include <Wt/WServer>
    +#include <Wt/WResource>
    +
    +#include "Configuration.h"
    +
    +#include <boost/algorithm/string.hpp>
    +#include <boost/lexical_cast.hpp>
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#include <fcntl.h>
    +#include <vector>
    +#include <iostream>
    +#include <fstream>
    +#include <stdlib.h>
    +
    +#include "rapidxml/rapidxml.hpp"
    +
    +#ifdef WIN32
    +#include <io.h>
    +#include <process.h>
    +#endif
    +
    +using namespace rapidxml;
    +
    +namespace {
    +
    +using namespace Wt;
    +
    +xml_node<> *singleChildElement(xml_node<> *element, const char* tagName)
    +{
    +  xml_node<> *result = element->first_node(tagName);
    +  if (result) {
    +    xml_node<> *next = result->next_sibling(tagName);
    +
    +    if (next) {
    +      throw WServer::Exception
    +	(std::string("Expected only one child <") + tagName
    +	 + "> in <" + element->name() + ">");
    +    }
    +  }
    +
    +  return result;
    +}
    +
    +bool attributeValue(xml_node<> *element, const char *attributeName,
    +		    std::string& result)
    +{
    +  xml_attribute<> *attr = element->first_attribute(attributeName);
    +
    +  if (attr) {
    +    result = attr->value();
    +
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +std::string elementValue(xml_node<> *element, const char *elementName)
    +{
    +  for (xml_node<> *e = element->first_node(); e; e = e->next_sibling())
    +    if (e->type() != node_data && e->type() != node_cdata)
    +      throw WServer::Exception(std::string("<")
    +			       + elementName
    +			       + "> should only contain text.");
    +
    +  return element->value();
    +}
    +
    +std::string singleChildElementValue(xml_node<> *element, const char* tagName,
    +				    const std::string& defaultValue)
    +{
    +  xml_node<> *child = singleChildElement(element, tagName);
    +
    +  if (!child)
    +    return defaultValue;
    +  else
    +    return elementValue(child, tagName);
    +}
    +
    +void setBoolean(xml_node<> *element, const char *tagName, bool& result)
    +{
    +  std::string v = singleChildElementValue(element, tagName, "");
    +
    +  if (!v.empty()) {
    +    if (v == "true")
    +      result = true;
    +    else if (v == "false")
    +      result = false;
    +    else
    +      throw WServer::Exception("<" + std::string(tagName)
    +			       + ">: expecting 'true' or 'false'");
    +  }
    +}
    +
    +std::vector<xml_node<> *> childElements(xml_node<> *element,
    +					const char *tagName)
    +{
    +  std::vector<xml_node<> *> result;
    +
    +  for (xml_node<> *r = element->first_node(tagName); r;
    +       r = r->next_sibling(tagName))
    +    result.push_back(r);
    +  
    +  return result;
    +}
    +
    +}
    +
    +namespace Wt {
    +
    +EntryPoint::EntryPoint(EntryPointType type, ApplicationCreator appCallback,
    +		       const std::string& path, const std::string& favicon)
    +  : type_(type),
    +    resource_(0),
    +    appCallback_(appCallback),
    +    path_(path),
    +    favicon_(favicon)
    +{ }
    +
    +EntryPoint::EntryPoint(WResource *resource, const std::string& path)
    +  : type_(StaticResource),
    +    resource_(resource),
    +    appCallback_(0),
    +    path_(path)
    +{ }
    +
    +EntryPoint::~EntryPoint()
    +{
    +}
    +
    +void EntryPoint::setPath(const std::string& path)
    +{
    +  path_ = path;
    +}
    +
    +Configuration::Configuration(const std::string& applicationPath,
    +                             const std::string& approot,
    +			     const std::string& configurationFile,
    +			     ServerType serverType,
    +			     const std::string& startupMessage)
    +  : applicationPath_(applicationPath),
    +    approot_(approot),
    +    serverType_(serverType),
    +    sessionPolicy_(SharedProcess),
    +    numProcesses_(1),
    +    numThreads_(serverType == WtHttpdServer ? 0 : 10),
    +    maxNumSessions_(100),
    +    maxRequestSize_(128 * 1024),
    +    isapiMaxMemoryRequestSize_(128 * 1024),
    +    sessionTracking_(URL),
    +    reloadIsNewSession_(true),
    +    sessionTimeout_(600),
    +    indicatorTimeout_(500),
    +    serverPushTimeout_(50),
    +    valgrindPath_(""),
    +    debug_(false),
    +    runDirectory_(RUNDIR),
    +    sessionIdLength_(16),
    +    xhtmlMimeType_(false),
    +    behindReverseProxy_(false),
    +    redirectMsg_("Load basic HTML"),
    +    serializedEvents_(false),
    +    webSockets_(false),
    +    inlineCss_(true),
    +    ajaxAgentWhiteList_(false),
    +    persistentSessions_(false),
    +    progressiveBoot_(false),
    +    pid_(getpid())
    +{
    +  char *value = 0;
    +
    +  if ((value = ::getenv("WT_APP_ROOT"))) {
    +    // Configuration file could be $WT_APP_ROOT/wt_config.xml
    +    approot_ = value;
    +  }
    +
    +  if (approot_ != "")
    +    properties_["appRoot"] = approot_;
    +
    +  logger_.addField("datetime", false);
    +  logger_.addField("app", false);
    +  logger_.addField("session", false);
    +  logger_.addField("type", false);
    +  logger_.addField("message", true);
    +
    +  setupLogger(std::string());
    +
    +  std::string configFile;
    +
    +  if (!configurationFile.empty())
    +    configFile = configurationFile;
    +  else if ((value = ::getenv("WT_CONFIG_XML")))
    +    configFile = value;
    +  else if (!approot_.empty()) {
    +    std::ifstream s((approot_ + "/wt_config.xml").c_str(),
    +		    std::ios::in | std::ios::binary);
    +    if (s)
    +      configFile = approot_ + "/wt_config.xml";
    +  }
    +
    +  if (configFile.empty())
    +    configFile = WT_CONFIG_XML;
    +
    +  std::cerr << "Reading: " << configFile << std::endl;
    +
    +  readConfiguration(configFile, startupMessage);
    +}
    +
    +void Configuration::setSessionIdPrefix(const std::string& prefix)
    +{
    +  sessionIdPrefix_ = prefix;
    +}
    +
    +void Configuration::setDefaultEntryPoint(const std::string& path)
    +{
    +  for (unsigned i = 0; i < entryPoints_.size(); ++i)
    +    if (entryPoints_[i].path().empty())
    +      entryPoints_[i].setPath(path);
    +}
    +
    +void Configuration::readApplicationSettings(xml_node<> *app)
    +{
    +  xml_node<> *sess = singleChildElement(app, "session-management");
    +
    +  if (sess) {
    +    xml_node<> *dedicated = singleChildElement(sess, "dedicated-process");
    +    xml_node<> *shared = singleChildElement(sess, "shared-process");
    +    std::string tracking = singleChildElementValue(sess, "tracking", "");
    +    std::string timeoutStr = singleChildElementValue(sess, "timeout", "");
    +    std::string serverPushTimeoutStr
    +      = singleChildElementValue(sess, "server-push-timeout", "");
    +
    +    if (dedicated && shared)
    +      throw WServer::Exception("<application-settings> requires either "
    +			       "<dedicated-process> or <shared-process>, "
    +			       "not both");
    +
    +    if (dedicated) {
    +      sessionPolicy_ = DedicatedProcess;
    +
    +      std::string maxnumStr
    +	= singleChildElementValue(dedicated, "max-num-sessions", "");
    +
    +      if (!maxnumStr.empty())
    +	maxNumSessions_ = boost::lexical_cast<int>(maxnumStr);
    +    }
    +
    +    if (shared) {
    +      sessionPolicy_ = SharedProcess;
    +
    +      std::string numProcessesStr
    +	= singleChildElementValue(shared, "num-processes", "");
    +
    +      if (!numProcessesStr.empty())
    +	numProcesses_ = boost::lexical_cast<int>(numProcessesStr);
    +    }
    +
    +    if (!tracking.empty()) {
    +      if (tracking == "Auto")
    +	sessionTracking_ = CookiesURL;
    +      else if (tracking == "URL")
    +	sessionTracking_ = URL;
    +      else
    +	throw WServer::Exception("<session-tracking>: expecting 'Auto' "
    +				 "or 'URL'");
    +    }
    +
    +    if (!timeoutStr.empty())
    +      sessionTimeout_ = boost::lexical_cast<int>(timeoutStr);
    +
    +    if (!serverPushTimeoutStr.empty())
    +      serverPushTimeout_ = boost::lexical_cast<int>(serverPushTimeoutStr);
    +
    +    setBoolean(sess, "reload-is-new-session", reloadIsNewSession_);
    +  }
    +
    +  std::string maxRequestStr
    +    = singleChildElementValue(app, "max-request-size", "");
    +
    +  if (!maxRequestStr.empty())
    +    maxRequestSize_ = boost::lexical_cast< ::int64_t >(maxRequestStr) * 1024;
    +
    +  setBoolean(app, "debug", debug_);
    +
    +  if (serverType_ == FcgiServer) {
    +    xml_node<> *fcgi = singleChildElement(app, "connector-fcgi");
    +    if (!fcgi)
    +      fcgi = app; // backward compatibility
    +
    +    valgrindPath_ = singleChildElementValue(fcgi, "valgrind-path", valgrindPath_);
    +    runDirectory_ = singleChildElementValue(fcgi, "run-directory", runDirectory_);
    +
    +    std::string numThreadsStr = singleChildElementValue(fcgi, "num-threads", "");
    +    if (!numThreadsStr.empty())
    +      numThreads_ = boost::lexical_cast<int>(numThreadsStr);
    +  }
    +  if (serverType_ == IsapiServer) {
    +    xml_node<> *isapi = singleChildElement(app, "connector-isapi");
    +    if (!isapi)
    +      isapi = app; // backward compatibility
    +
    +    std::string numThreadsStr = singleChildElementValue(isapi, "num-threads", "");
    +    if (!numThreadsStr.empty())
    +      numThreads_ = boost::lexical_cast<int>(numThreadsStr);
    +
    +    std::string maxMemoryRequestSizeStr =
    +      singleChildElementValue(isapi, "max-memory-request-size", "");
    +    if (!maxMemoryRequestSizeStr.empty()) {
    +      isapiMaxMemoryRequestSize_ = boost::lexical_cast< ::int64_t >(maxMemoryRequestSizeStr) * 1024;
    +    }
    +  }
    +
    +  std::string sessionIdLength
    +    = singleChildElementValue(app, "session-id-length", "");
    +  if (!sessionIdLength.empty())
    +    sessionIdLength_ = boost::lexical_cast<int>(sessionIdLength);
    +
    +  sessionIdPrefix_
    +    = singleChildElementValue(app,"session-id-prefix", sessionIdPrefix_);
    +
    +  setBoolean(app, "send-xhtml-mime-type", xhtmlMimeType_);
    +  redirectMsg_ = singleChildElementValue(app, "redirect-message", redirectMsg_);
    +
    +  setBoolean(app, "behind-reverse-proxy", behindReverseProxy_);
    +  setBoolean(app, "strict-event-serialization", serializedEvents_);
    +  setBoolean(app, "web-sockets", webSockets_);
    +
    +  if (webSockets_ && serverType_ != WtHttpdServer)
    +    throw WServer::Exception("<web-sockets> only supported by built-in "
    +			     "httpd connector.");
    +
    +  setBoolean(app, "inline-css", inlineCss_);
    +  setBoolean(app, "persistent-sessions", persistentSessions_);
    +  setBoolean(app, "progressive-bootstrap", progressiveBoot_);
    +
    +  std::string indicatorTimeoutStr
    +    = singleChildElementValue(app, "indicator-timeout", "");
    +
    +  if (!indicatorTimeoutStr.empty())
    +    indicatorTimeout_ = boost::lexical_cast<int>(indicatorTimeoutStr);
    +
    +  std::vector<xml_node<> *> userAgents = childElements(app, "user-agents");
    +
    +  for (unsigned i = 0; i < userAgents.size(); ++i) {
    +    xml_node<> *userAgentsList = userAgents[i];
    +
    +    std::string type;
    +    if (!attributeValue(userAgentsList, "type", type))
    +      throw WServer::Exception("<user-agents> requires attribute 'type'");
    +
    +    std::string mode;
    +    attributeValue(userAgentsList, "mode", mode);
    +    
    +    AgentList *list;
    +    if (type == "ajax") {
    +      list = &ajaxAgentList_;
    +      if (mode == "black-list")
    +	ajaxAgentWhiteList_ = false;
    +      else if (mode == "white-list")
    +	ajaxAgentWhiteList_ = true;
    +      else
    +	throw WServer::Exception
    +	  ("<user-agents type=\"ajax\" requires attribute 'mode' with value "
    +	   "\"white-list\" or \"black-list\"");
    +    } else if (type == "bot")
    +      list = &botList_;
    +    else
    +      throw WServer::Exception
    +	("<user-agents> requires attribute 'type' with value "
    +	 "\"ajax\" or \"bot\"");
    +
    +    std::vector<xml_node<> *> agents
    +      = childElements(userAgentsList, "user-agent");
    +
    +    for (unsigned j = 0; j < agents.size(); ++j)
    +      list->push_back(elementValue(agents[j], "user-agent"));
    +  }
    +
    +  xml_node<> *properties = singleChildElement(app, "properties");
    +
    +  if (properties) {
    +    std::vector<xml_node<> *> nodes = childElements(properties, "property");
    +
    +    for (unsigned i = 0; i < nodes.size(); ++i) {
    +      xml_node<> *property = nodes[i];
    +
    +      std::string name;
    +      if (!attributeValue(property, "name", name))
    +	throw WServer::Exception("<property> requires attribute 'name'");
    +
    +      std::string value = elementValue(property, "property");
    +
    +      if (name == "approot")
    +	name = "appRoot";
    +
    +      if (name == "appRoot" && approot_ != "") {
    +        log("warning") << "Ignoring configuration property 'appRoot' (" << value
    +          << ") because the connector has set it to " << approot_;
    +      } else {
    +        properties_[name] = value;
    +      }
    +    }
    +  }
    +}
    +
    +void Configuration::readConfiguration(const std::string& configurationFile,
    +				      const std::string& startupMessage)
    +{
    +  std::ifstream s(configurationFile.c_str(), std::ios::in | std::ios::binary);
    +  if (!s) {
    +    if (configurationFile != WT_CONFIG_XML)
    +      throw WServer::Exception("Error reading '"
    +			       + configurationFile + "': could not open file.");
    +    else
    +      return;
    +  }
    +
    +  s.seekg(0, std::ios::end);
    +  int length = s.tellg();
    +  s.seekg(0, std::ios::beg);
    +
    +  boost::scoped_array<char> text(new char[length + 1]);
    +  s.read(text.get(), length);
    +  s.close();
    +  text[length] = 0;
    +
    +  try {
    +    xml_document<> doc;
    +    doc.parse<parse_normalize_whitespace
    +      | parse_trim_whitespace
    +      | parse_validate_closing_tags>(text.get());
    +
    +    xml_node<> *root = doc.first_node();
    +
    +    if (!root)
    +      throw WServer::Exception("<server> expected.");
    +
    +    std::vector<xml_node<> *> applications
    +      = childElements(root, "application-settings");
    +
    +    /*
    +     * Scan the config file first to determine the logFile, in order
    +     * to setup logging before parsing the other settings.
    +     */
    +    std::string logFile;
    +    for (unsigned i = 0; i < applications.size(); ++i) {
    +      xml_node<> *app = applications[i];
    +
    +      std::string appLocation;
    +      if (!attributeValue(app, "location", appLocation))
    +	throw WServer::Exception("<application-settings> requires attribute "
    +				 "'location'");
    +
    +      if (appLocation == "*" || appLocation == applicationPath_)
    +	logFile = singleChildElementValue(app, "log-file", logFile);
    +    }
    +
    +    setupLogger(logFile);
    +
    +    if (!startupMessage.empty())
    +      log("notice") << startupMessage;
    +    log("notice") << "Reading Wt config file: " << configurationFile
    +		  << " (location = '" << applicationPath_ << "')";
    +
    +    /*
    +     * Now read application settings.
    +     */
    +    for (unsigned i = 0; i < applications.size(); ++i) {
    +      xml_node<> *app = applications[i];
    +
    +      std::string appLocation;
    +      attributeValue(app, "location", appLocation);
    +
    +      if (appLocation == "*" || appLocation == applicationPath_)
    +	readApplicationSettings(app);
    +    }
    +  } catch (std::exception& e) {
    +    throw WServer::Exception("Error reading: " + configurationFile + ": "
    +			     + e.what());
    +  } catch (...) {
    +    throw WServer::Exception("Exception of unknown type!\n");
    +  }
    +}
    +
    +void Configuration::setupLogger(const std::string& logFile)
    +{
    +  if (logFile.empty())
    +    logger_.setStream(std::cerr);
    +  else
    +    logger_.setFile(logFile);
    +}
    +
    +WLogEntry Configuration::log(const std::string& type) const
    +{
    +  WLogEntry e = logger_.entry();
    +
    +  e << WLogger::timestamp << WLogger::sep
    +    << pid_ << WLogger::sep
    +    << /* sessionId << */ WLogger::sep
    +    << '[' << type << ']' << WLogger::sep;
    +
    +  return e;
    +}
    +
    +void Configuration::addEntryPoint(const EntryPoint& ep)
    +{
    +  if (ep.type() == StaticResource)
    +    ep.resource()->currentUrl_ = ep.path();
    +
    +  entryPoints_.push_back(ep);
    +}
    +
    +std::string Configuration::generateSessionId()
    +{
    +  std::string sessionId = sessionIdPrefix();
    +
    +  for (int i = sessionId.length(); i < sessionIdLength(); ++i) {
    +    // use alphanumerical characters (big and small) and numbers
    +    int d = random_.rand() % (26 + 26 + 10);
    +
    +    char c = (d < 10 ? ('0' + d)
    +	      : (d < 36 ? ('A' + d - 10)
    +		 : 'a' + d - 36));
    +    sessionId.push_back(c);
    +  }
    +
    +  if (serverType_ == FcgiServer) {
    +    std::string socketPath = sessionSocketPath(sessionId);
    +
    +    struct stat finfo;
    +    if (stat(socketPath.c_str(), &finfo) != -1)
    +      // exists already -- try another one
    +      return generateSessionId();
    +  }
    +
    +  return sessionId;
    +}
    +
    +std::string Configuration::sessionSocketPath(const std::string& sessionId)
    +{
    +  return runDirectory_ + "/" + sessionId;
    +}
    +
    +const std::string* Configuration::property(const std::string& name) const 
    +{
    +  PropertyMap::const_iterator i = properties_.find(name);
    +
    +  if (i != properties_.end()) 
    +    return &i->second;
    +  else
    +    return 0;
    +}
    +
    +bool Configuration::readConfigurationProperty(const std::string& name,
    +                                              std::string& value) const
    +{
    +  const std::string* prop = property(name);
    +
    +  if (prop) {
    +    value = *prop;
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +std::string Configuration::appRoot() const
    +{
    +  std::string approot;
    +
    +  if (!readConfigurationProperty("appRoot", approot)) {
    +    return "";
    +  }
    +
    +  if (!approot.empty() && approot[approot.length() - 1] != '/'
    +#ifdef WIN32
    +      && approot[approot.length() - 1] != '\\'
    +#endif
    +     ) {
    +    approot += "/";
    +  }
    +
    +  return approot;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/Configuration.h b/wt-3.1.7a/src/web/Configuration.h
    new file mode 100644
    index 0000000..9673b8f
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/Configuration.h
    @@ -0,0 +1,198 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * All rights reserved.
    + */
    +
    +#ifndef CONFIGURATION_H
    +#define CONFIGURATION_H
    +
    +#include <exception>
    +#include <iostream>
    +#include <string>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +
    +#include "WebSession.h"
    +#include "WtRandom.h"
    +
    +namespace rapidxml {
    +  template<class Ch> class xml_node;
    +}
    +
    +namespace boost {
    +  namespace program_options {
    +    class variables_map;
    +  }
    +}
    +
    +namespace Wt {
    +
    +#ifndef WT_TARGET_JAVA
    +
    +class WT_API EntryPoint {
    + public:
    +  EntryPoint(EntryPointType type, ApplicationCreator appCallback,
    +	     const std::string& path, 
    +             const std::string& favicon);
    +  EntryPoint(WResource *resource, const std::string& path);
    +  ~EntryPoint();
    +
    +  void setPath(const std::string& path);
    +
    +  EntryPointType     type() const { return type_; }
    +  WResource         *resource() const { return resource_; }
    +  ApplicationCreator appCallback() const { return appCallback_; }
    +  const std::string& path() const { return path_; }
    +  const std::string& favicon() const { return favicon_; }
    +
    + private:
    +  EntryPointType     type_;
    +  WResource         *resource_;
    +  ApplicationCreator appCallback_;
    +  std::string        path_;
    +  std::string        favicon_;
    +};
    +
    +typedef std::vector<EntryPoint> EntryPointList;
    +
    +#endif // WT_TARGET_JAVA
    +
    +class WT_API Configuration
    +{
    +public:
    +  enum SessionPolicy {
    +    DedicatedProcess,
    +    SharedProcess
    +  };
    +  enum SessionTracking { 
    +    CookiesURL,
    +    URL
    +  };
    +  enum ServerType {
    +    WtHttpdServer,
    +    FcgiServer,
    +    IsapiServer
    +  };
    +
    +  typedef std::map<std::string, std::string> PropertyMap;
    +  typedef std::vector<std::string> AgentList;
    +
    +  Configuration(const std::string& applicationPath,
    +                const std::string& approot,
    +		const std::string& configurationFile,
    +		ServerType serverType,
    +		const std::string& startupMessage);
    +
    +  /*
    +   * Override the sessionIdPrefix setting in the config file
    +   */
    +  void               setSessionIdPrefix(const std::string& prefix);
    +
    +#ifndef WT_TARGET_JAVA
    +  void               addEntryPoint(const EntryPoint& entryPoint);
    +  void               setDefaultEntryPoint(const std::string& path);
    +  const EntryPointList& entryPoints() const { return entryPoints_; }
    +#endif // WT_TARGET_JAVA
    +
    +  SessionPolicy      sessionPolicy() const { return sessionPolicy_; }
    +  int                numProcesses() const { return numProcesses_; }
    +  int                numThreads() const { return numThreads_; }
    +  int                maxNumSessions() const { return maxNumSessions_; }
    +  ::int64_t          maxRequestSize() const { return maxRequestSize_; }
    +  ::int64_t          isapiMaxMemoryRequestSize() const { return isapiMaxMemoryRequestSize_; }
    +  SessionTracking    sessionTracking() const { return sessionTracking_; }
    +  bool               reloadIsNewSession() const { return reloadIsNewSession_; }
    +  int                sessionTimeout() const { return sessionTimeout_; }
    +  int		     indicatorTimeout() const { return indicatorTimeout_; }
    +  int                serverPushTimeout() const { return serverPushTimeout_; }
    +  std::string        valgrindPath() const { return valgrindPath_; }
    +  bool               debug() const { return debug_; }
    +  std::string        runDirectory() const { return runDirectory_; }
    +  ServerType         serverType() const { return serverType_; }
    +  int                sessionIdLength() const { return sessionIdLength_; }
    +  std::string        sessionIdPrefix() const { return sessionIdPrefix_; }
    +  const PropertyMap& properties() const { return properties_; }
    +  const std::string* property(const std::string& name) const;
    +  bool               readConfigurationProperty(const std::string& name,
    +					       std::string& value) const;
    +  std::string        appRoot() const;
    +  bool               sendXHTMLMimeType() const { return xhtmlMimeType_; }
    +  bool               behindReverseProxy() const { return behindReverseProxy_; }
    +  std::string        redirectMessage() const { return redirectMsg_; }
    +  bool               serializedEvents() const { return serializedEvents_; }
    +  bool               webSockets() const { return webSockets_; }
    +  bool               inlineCss() const { return inlineCss_; }
    +  bool               ajaxAgentWhiteList() const { return ajaxAgentWhiteList_; }
    +  const AgentList&   ajaxAgentList() const { return ajaxAgentList_; }
    +  const AgentList&   botList() const { return botList_; }
    +  bool               persistentSessions() const { return persistentSessions_; }
    +  bool               progressiveBoot() const { return progressiveBoot_; }
    +
    +  WLogger&           logger() { return logger_; }
    +  WLogEntry          log(const std::string& type) const;
    +
    +  int                pid() const { return pid_; }
    +
    +  /*
    +   * Generate a unique session Id.
    +   *
    +   * For a FastCGI server, this also creates a session file.
    +   */
    +  std::string generateSessionId();
    +
    +  std::string sessionSocketPath(const std::string& sessionId);
    +
    +private:
    +  std::string     applicationPath_;
    +  std::string     approot_;
    +
    +#ifndef WT_TARGET_JAVA
    +  EntryPointList     entryPoints_;
    +#endif // WT_TARGET_JAVA
    +
    +  ServerType      serverType_;
    +  SessionPolicy   sessionPolicy_;
    +  int             numProcesses_;
    +  int             numThreads_;
    +  int             maxNumSessions_;
    +  ::int64_t       maxRequestSize_;
    +  ::int64_t       isapiMaxMemoryRequestSize_;
    +  SessionTracking sessionTracking_;
    +  bool            reloadIsNewSession_;
    +  int             sessionTimeout_;
    +  int		  indicatorTimeout_;
    +  int             serverPushTimeout_;
    +  std::string     valgrindPath_;
    +  bool            debug_;
    +  std::string     runDirectory_;
    +  int             sessionIdLength_;
    +  std::string     sessionIdPrefix_;
    +  PropertyMap     properties_;
    +  bool            xhtmlMimeType_;
    +  bool            behindReverseProxy_;
    +  std::string     redirectMsg_;
    +  bool            serializedEvents_;
    +  bool		  webSockets_;
    +  bool            inlineCss_;
    +  AgentList       ajaxAgentList_, botList_;
    +  bool            ajaxAgentWhiteList_;
    +  bool            persistentSessions_;
    +  bool            progressiveBoot_;
    +
    +
    +  int		  pid_;
    +  WtRandom        random_;
    +  WLogger         logger_;
    +
    +  void readApplicationSettings(rapidxml::xml_node<char> *app);
    +  void readConfiguration(const std::string& configurationFile,
    +			 const std::string& startupMessage);
    +  void setupLogger(const std::string& logFile);
    +};
    +
    +}
    +
    +#endif // HTTP_CONFIGURATION_HPP
    diff --git a/wt-3.1.7a/src/web/DomElement.C b/wt-3.1.7a/src/web/DomElement.C
    new file mode 100644
    index 0000000..66dc0e8
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/DomElement.C
    @@ -0,0 +1,1507 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/lexical_cast.hpp>
    +#include <stdio.h>
    +#include <sstream>
    +
    +#include "Wt/WObject"
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WEnvironment"
    +
    +#include "DomElement.h"
    +#include "EscapeOStream.h"
    +#include "WebSession.h"
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace {
    +
    +const char *elementNames_[] =
    +  { "a", "br", "button", "col",
    +    "div", "fieldset", "form",
    +    "h1", "h2", "h3", "h4",
    +
    +    "h5", "h6", "iframe", "img",
    +    "input", "label", "legend", "li",
    +    "ol",
    +
    +    "option", "ul", "script", "select",
    +    "span", "table", "tbody", "thead",
    +    "th", "td", "textarea",
    +
    +    "tr", "p", "canvas",
    +    "map", "area",
    +
    +    "object", "param",
    +
    +    "audio", "video", "source"
    +  };
    +
    +bool defaultInline_[] =
    +  { true, true, true, false,
    +    false, false, false,
    +    true, false, false, false,
    +
    +    false, false, true, true,
    +    true, true, true, false,
    +    false,
    +
    +    true, false, false, true,
    +    true, false, false, false,
    +    false, false, true,
    +
    +    false, false, false,
    +    false, true,
    +
    +    false, false,
    +
    +    false, false, false
    +  };
    +
    +  static const std::string unsafeChars_ = "$&+,:;=?@'\"<>#%{}|\\^~[]`";
    +}
    +
    +namespace Wt {
    +
    +int DomElement::nextId_ = 0;
    +
    +DomElement *DomElement::createNew(DomElementType type)
    +{
    +  DomElement *e = new DomElement(ModeCreate, type);
    +  return e;
    +}
    +
    +DomElement *DomElement::getForUpdate(const std::string& id,
    +				     DomElementType type)
    +{
    +  if (id.empty())
    +    throw WtException("Cannot update widget without id");
    +
    +  DomElement *e = new DomElement(ModeUpdate, type);
    +  e->id_ = id;
    +
    +  return e;
    +}
    +
    +DomElement *DomElement::updateGiven(const std::string& var,
    +				    DomElementType type)
    +{
    +  DomElement *e = new DomElement(ModeUpdate, type);
    +  e->var_ = var;
    +
    +  return e;
    +}
    +
    +DomElement *DomElement::getForUpdate(const WObject *object,
    +				     DomElementType type)
    +{
    +  return getForUpdate(object->id(), type);
    +}
    +
    +DomElement::DomElement(Mode mode, DomElementType type)
    +  : mode_(mode),
    +    wasEmpty_(mode_ == ModeCreate),
    +    removeAllChildren_(-1),
    +    minMaxSizeProperties_(false),
    +    unstubbed_(false),
    +    unwrapped_(false),
    +    replaced_(0),
    +    insertBefore_(0),
    +    type_(type),
    +    numManipulations_(0),
    +    timeOut_(-1),
    +    discardWithParent_(true)
    +{ }
    +
    +DomElement::~DomElement()
    +{
    +  for (unsigned i = 0; i < childrenToAdd_.size(); ++i)
    +    delete childrenToAdd_[i].child;
    +
    +  delete replaced_;
    +  delete insertBefore_;
    +}
    +
    +std::string DomElement::urlEncodeS(const std::string& url)
    +{
    +  std::stringstream result;
    +
    +  for (unsigned i = 0; i < url.length(); ++i) {
    +    char c = url[i];
    +    if (c < 31 || c >= 127 || unsafeChars_.find(c) != std::string::npos) {
    +      result << '%';
    +#ifndef WT_CNOR
    +      result << std::hex << (int)c;
    +#else
    +      result << Utils::toHexString(c);
    +#endif // WT_CNOR
    +    } else
    +      result.put(c);
    +  }
    +
    +  return result.str();
    +}
    +
    +void DomElement::setType(DomElementType type)
    +{
    +  type_ = type;
    +}
    +
    +void DomElement::setWasEmpty(bool how)
    +{
    +  wasEmpty_ = how;
    +}
    +
    +void DomElement::updateInnerHtmlOnly()
    +{
    +  mode_ = ModeUpdate;
    +
    +  assert(replaced_ == 0);
    +  assert(insertBefore_ == 0);
    +
    +  attributes_.clear();
    +  eventHandlers_.clear();
    +
    +  for (PropertyMap::iterator i = properties_.begin(); i != properties_.end();) {
    +    if (   i->first == PropertyInnerHTML
    +	|| i->first == PropertyText
    +	|| i->first == PropertyTarget)
    +      ++i;
    +    else
    +      Utils::eraseAndNext(properties_, i);
    +  }
    +}
    +
    +void DomElement::addChild(DomElement *child)
    +{
    +  if (child->mode() == ModeCreate) {
    +    ++numManipulations_;
    +
    +    if (wasEmpty_ && canWriteInnerHTML(WApplication::instance())) {
    +      child->asHTML(childrenHtml_, javaScript_, timeouts_);
    +      delete child;
    +    } else {
    +      childrenToAdd_.push_back(ChildInsertion(-1, child));
    +    }
    +  } else
    +    updatedChildren_.push_back(child);
    +}
    +
    +void DomElement::saveChild(const std::string& id)
    +{
    +  childrenToSave_.push_back(id);
    +}
    +
    +void DomElement::setAttribute(const std::string& attribute,
    +			      const std::string& value)
    +{
    +  ++numManipulations_;
    +  attributes_[attribute] = value;
    +}
    +
    +std::string DomElement::getAttribute(const std::string& attribute) const
    +{
    +  AttributeMap::const_iterator i = attributes_.find(attribute);
    +  if (i != attributes_.end())
    +    return i->second;
    +  else
    +    return std::string();
    +}
    +
    +void DomElement::removeAttribute(const std::string& attribute)
    +{
    +  attributes_.erase(attribute);
    +}
    +
    +void DomElement::setEventSignal(const char *eventName,
    +				const EventSignalBase& signal)
    +{
    +  setEvent(eventName, signal.javaScript(),
    +	   signal.encodeCmd(), signal.isExposedSignal());
    +}
    +
    +void DomElement::setEvent(const char *eventName,
    +			  const std::string& jsCode,
    +			  const std::string& signalName,
    +			  bool isExposed)
    +{
    +  WApplication *app = WApplication::instance();
    +
    +  bool anchorClick = type() == DomElement_A
    +    && eventName == WInteractWidget::CLICK_SIGNAL;
    +
    +  SStream js;
    +  if (isExposed || anchorClick || !jsCode.empty()) {
    +    if (app->environment().agentIsIEMobile())
    +      js << "var e=window.event,";
    +    else
    +      js << "var e=event||window.event,";
    +    js << "o=this;";
    +
    +    if (anchorClick)
    +      js << "if(e.ctrlKey||e.metaKey)return true;else{";
    +
    +    if (isExposed)
    +      js << app->javaScriptClass() << "._p_.update(o,'"
    +	 << signalName << "',e,true);";
    +
    +    js << jsCode;
    +
    +    if (anchorClick)
    +      js << "}";
    +  }
    +
    +  ++numManipulations_;
    +  eventHandlers_[eventName] = EventHandler(js.str(), signalName);
    +}
    +
    +void DomElement::setEvent(const char *eventName,
    +			  const std::string& jsCode)
    +{
    +  eventHandlers_[eventName] = EventHandler(jsCode, std::string());
    +}
    +
    +void DomElement::setDiscardWithParent(bool discard)
    +{
    +  discardWithParent_ = discard;
    +}
    +
    +DomElement::EventAction::EventAction(const std::string& aJsCondition,
    +				     const std::string& aJsCode,
    +				     const std::string& anUpdateCmd,
    +				     bool anExposed)
    +  : jsCondition(aJsCondition),
    +    jsCode(aJsCode),
    +    updateCmd(anUpdateCmd),
    +    exposed(anExposed)
    +{ }
    +
    +void DomElement::setEvent(const char *eventName,
    +			  const std::vector<EventAction>& actions)
    +{
    +  std::string code;
    +
    +  for (unsigned i = 0; i < actions.size(); ++i) {
    +    if (!actions[i].jsCondition.empty())
    +      code += "if(" + actions[i].jsCondition + "){";
    +    if (actions[i].exposed)
    +      code += WApplication::instance()->javaScriptClass()
    +	+ "._p_.update(this,'" + actions[i].updateCmd + "',e,true);";
    +    code += actions[i].jsCode;
    +    if (!actions[i].jsCondition.empty())
    +      code += "}";
    +  }
    +
    +  setEvent(eventName, code, "");
    +}
    +
    +void DomElement::processProperties(WApplication *app) const
    +{
    +  if (minMaxSizeProperties_
    +      && app->environment().agent() == WEnvironment::IE6) {
    +    DomElement *self = const_cast<DomElement *>(this); 
    +
    +    PropertyMap::iterator w = self->properties_.find(PropertyStyleWidth);
    +    PropertyMap::iterator minw = self->properties_.find(PropertyStyleMinWidth);
    +    PropertyMap::iterator maxw = self->properties_.find(PropertyStyleMaxWidth);
    +
    +    if (minw != self->properties_.end() || maxw != self->properties_.end()) {
    +      if (w == self->properties_.end()) {
    +	SStream expr;
    +	expr << WT_CLASS ".IEwidth(this,";
    +	if (minw != self->properties_.end()) {
    +	  expr << '\'' << minw->second << '\'';
    +          self->properties_.erase(PropertyStyleMinWidth); // C++: could be minw
    +	} else
    +	  expr << "'0px'";
    +	expr << ',';
    +	if (maxw != self->properties_.end()) {
    +	  expr << '\''<< maxw->second << '\'';
    +	  self->properties_.erase(PropertyStyleMaxWidth); // C++: could be maxw
    +	} else
    +	  expr << "'100000px'";
    +	expr << ")";
    +
    +	self->properties_.erase(PropertyStyleWidth);
    +	self->properties_[PropertyStyleWidthExpression] = expr.str();
    +      }
    +    }
    +
    +    PropertyMap::iterator i = self->properties_.find(PropertyStyleMinHeight);
    +
    +    if (i != self->properties_.end()) {
    +      self->properties_[PropertyStyleHeight] = i->second;
    +      self->properties_.erase(PropertyStyleMinHeight); // C++: could be i
    +    }
    +  }
    +}
    +
    +void DomElement::processEvents(WApplication *app) const
    +{
    +  DomElement *self = const_cast<DomElement *>(this);
    +
    +  const char *S_keypress = WInteractWidget::KEYPRESS_SIGNAL;
    +
    +  EventHandlerMap::const_iterator keypress = eventHandlers_.find(S_keypress);
    +  if (keypress != eventHandlers_.end() && !keypress->second.jsCode.empty())
    +    Utils::access(self->eventHandlers_, S_keypress).jsCode
    +      = "if (" WT_CLASS ".isKeyPress(event)){"
    +      + Utils::access(self->eventHandlers_, S_keypress).jsCode
    +      + '}';
    +}
    +
    +void DomElement::setTimeout(int msec, bool jsRepeat)
    +{
    +  ++numManipulations_;
    +  timeOut_ = msec;
    +  timeOutJSRepeat_ = jsRepeat;
    +}
    +
    +void DomElement::callJavaScript(const std::string& jsCode,
    +				bool evenWhenDeleted)
    +{
    +  ++numManipulations_;
    +  if (!evenWhenDeleted)
    +    javaScript_ << jsCode;
    +  else
    +    javaScriptEvenWhenDeleted_ += jsCode;
    +}
    +
    +void DomElement::setProperties(const PropertyMap& properties)
    +{
    +  for (PropertyMap::const_iterator i = properties.begin();
    +       i != properties.end(); ++i)
    +    setProperty(i->first, i->second);
    +}
    +
    +void DomElement::clearProperties()
    +{
    +  numManipulations_ -= properties_.size();
    +  properties_.clear();
    +}
    +
    +void DomElement::setProperty(Property property, const std::string& value)
    +{
    +  ++numManipulations_;
    +  properties_[property] = value;
    +
    +  if (property >= PropertyStyleMinWidth && property <= PropertyStyleMaxHeight)
    +    minMaxSizeProperties_ = true;
    +}
    +
    +std::string DomElement::getProperty(Property property) const
    +{
    +  PropertyMap::const_iterator i = properties_.find(property);
    +  
    +  if (i != properties_.end())
    +    return i->second;
    +  else
    +    return std::string();
    +}
    +
    +void DomElement::removeProperty(Property property)
    +{
    +  properties_.erase(property);
    +}
    +
    +void DomElement::setId(const std::string& id)
    +{
    +  ++numManipulations_;
    +  id_ = id;
    +}
    +
    +void DomElement::setName(const std::string& name)
    +{
    +  ++numManipulations_;
    +  id_ = name;
    +  setAttribute("name", name);
    +}
    +
    +void DomElement::insertChildAt(DomElement *child, int pos)
    +{
    +  ++numManipulations_;
    +
    +  childrenToAdd_.push_back(ChildInsertion(pos, child));
    +}
    +
    +void DomElement::insertBefore(DomElement *sibling)
    +{
    +  ++numManipulations_;
    +  insertBefore_ = sibling;
    +}
    +
    +void DomElement::removeFromParent()
    +{
    +  callJavaScript(WT_CLASS ".remove('" + id() + "');", true);
    +}
    +
    +void DomElement::removeAllChildren(int firstChild)
    +{
    +  ++numManipulations_;
    +  removeAllChildren_ = firstChild;
    +  wasEmpty_ = firstChild == 0;
    +}
    +
    +void DomElement::replaceWith(DomElement *newElement)
    +{
    +  ++numManipulations_;
    +  replaced_ = newElement;
    +}
    +
    +void DomElement::unstubWith(DomElement *newElement, bool hideWithDisplay)
    +{
    +  replaceWith(newElement);
    +  unstubbed_ = true;
    +  hideWithDisplay_ = hideWithDisplay;
    +}
    +
    +void DomElement::unwrap()
    +{
    +  ++numManipulations_;
    +  unwrapped_ = true;
    +}
    +
    +void DomElement::callMethod(const std::string& method)
    +{
    +  ++numManipulations_;
    +  methodCalls_.push_back(method);
    +}
    +
    +void DomElement::jsStringLiteral(std::ostream& out, const std::string& s,
    +				 char delimiter)
    +{
    +  EscapeOStream sout(out);
    +  jsStringLiteral(sout, s, delimiter);
    +}
    +
    +void DomElement::htmlAttributeValue(std::ostream& out, const std::string& s)
    +{
    +  EscapeOStream sout(out);
    +  sout.pushEscape(EscapeOStream::HtmlAttribute);
    +  sout << s;
    +}
    +
    +void DomElement::fastJsStringLiteral(EscapeOStream& outRaw,
    +				     const EscapeOStream& outEscaped,
    +				     const std::string& s)
    +{
    +  outRaw << '\'';
    +  outRaw.append(s, outEscaped);
    +  outRaw << '\'';
    +}
    +
    +void DomElement::jsStringLiteral(EscapeOStream& out, const std::string& s,
    +				 char delimiter)
    +{
    +  out << delimiter;
    +
    +  out.pushEscape(delimiter == '\'' ?
    +		 EscapeOStream::JsStringLiteralSQuote :
    +		 EscapeOStream::JsStringLiteralDQuote);
    +  out << s;
    +  out.popEscape();
    +
    +  out << delimiter;
    +}
    +
    +void DomElement::fastHtmlAttributeValue(EscapeOStream& outRaw,
    +					const EscapeOStream& outEscaped,
    +					const std::string& s)
    +{
    +  outRaw << '"';
    +  outRaw.append(s, outEscaped);
    +  outRaw << '"';
    +}
    +
    +std::string DomElement::cssStyle() const
    +{
    +  if (properties_.empty())
    +    return std::string();
    +
    +  EscapeOStream style;
    +  const std::string *styleProperty = 0;
    +
    +  for (PropertyMap::const_iterator j = properties_.begin();
    +       j != properties_.end(); ++j) {
    +    if (j->first == PropertyStyle)
    +      styleProperty = &j->second;
    +    else if ((j->first >= PropertyStylePosition)
    +	&& (j->first <= PropertyStyleDisplay)) {
    +      static std::string cssNames[] =
    +	{ "position",
    +	  "z-index", "float", "clear",
    +	  "width", "height", "line-height",
    +	  "min-width", "min-height",
    +	  "max-width", "max-height",
    +	  "left", "right", "top", "bottom",
    +	  "vertical-align", "text-align",
    +	  "padding",
    +	  "padding-right", "padding-left",
    +	  "margin-top", "margin-right",
    +	  "margin-bottom", "margin-left", "cursor",
    +	  "border-top", "border-right",
    +	  "border-bottom", "border-left",
    +	  "color", "overflow", "overflow", // overflox-x/y not well supported
    +	  "opacity",
    +	  "font-family", "font-style", "font-variant",
    +	  "font-weight", "font-size",
    +	  "background-color", "background-image", "background-repeat",
    +	  "background-attachment", "background-position",
    +	  "text-decoration", "white-space", "table-layout", "border-spacing",
    +	  "zoom", "visibility", "display"};
    +
    +      if ((j->first == PropertyStyleCursor) && (j->second == "pointer")) {
    +	style << "cursor:pointer;cursor:hand;";	    
    +      } else {
    +	style << cssNames[j->first - PropertyStylePosition]
    +	      << ':' << j->second << ';';
    +      }
    +    } else if (j->first == PropertyStyleWidthExpression) {
    +      style << "width:expression(" << j->second << ");";
    +    }
    +  }
    +
    +  if (styleProperty)
    +    style << *styleProperty;
    +
    +  return style.c_str();
    +}
    +
    +void DomElement::setJavaScriptEvent(EscapeOStream& out,
    +				    const char *eventName,
    +				    const EventHandler& handler,
    +				    WApplication *app) const
    +{
    +  // events on the dom root container are events received by the whole
    +  // document when no element has focus
    +  bool globalUnfocused = (id_ == app->domRoot()->id());
    +  std::string extra1, extra2;
    +
    +  if (globalUnfocused) {
    +    extra1 = 
    +      "var g = event||window.event; "
    +      "var t = g.target||g.srcElement;"
    +      "if ((!t||" WT_CLASS ".hasTag(t,'DIV') "
    +      ""     "||" WT_CLASS ".hasTag(t,'BODY') "
    +      ""     "||" WT_CLASS ".hasTag(t,'HTML'))) { "; 
    +    extra2 =
    +      "}";
    +  }
    +
    +  int fid = nextId_++;
    +
    +  out << "function f" << fid
    +      << "(event){ " << extra1 << handler.jsCode << extra2 << "}\n";
    +
    +  if (globalUnfocused)
    +    out << "document";
    +  else {
    +    declare(out);
    +    out << var_;
    +  }
    +
    +  if (eventName == WInteractWidget::MOUSE_WHEEL_SIGNAL
    +      && app->environment().agentIsGecko())
    +    out << ".addEventListener('DOMMouseScroll', f" << fid << ", false);\n";
    +  else
    +    out << ".on" << eventName << "=f" << fid << ";\n";
    +}
    +
    +void DomElement::asHTML(EscapeOStream& out,
    +			EscapeOStream& javaScript,
    +			std::vector<TimeoutEvent>& timeouts,
    +			bool openingTagOnly) const
    +{
    +  if (mode_ != ModeCreate)
    +    throw WtException("DomElement::asHTML() called with ModeUpdate");
    +
    +  WApplication *app = WApplication::instance();
    +  processEvents(app);
    +  processProperties(app);
    +
    +  EventHandlerMap::const_iterator clickEvent
    +    = eventHandlers_.find(WInteractWidget::CLICK_SIGNAL);
    +
    +  bool needButtonWrap
    +    = (!(app->environment().ajax())
    +       && (clickEvent != eventHandlers_.end())
    +       && (!clickEvent->second.jsCode.empty())
    +       && (!app->environment().agentIsSpiderBot()));
    +
    +  bool isSubmit = needButtonWrap;
    +  DomElementType renderedType = type_;
    +
    +  if (needButtonWrap) {
    +    if (type_ == DomElement_BUTTON) {
    +      /*
    +       * We don't need to wrap a button: we can just modify the attributes
    +       * type name and value. This avoid layout problems.
    +       *
    +       * Note that IE posts the button text instead of the value. We fix
    +       * this by encoding the value into the name.
    +       *
    +       * IE6 hell: IE will post all submit buttons, not just the one clicked.
    +       * We should therefore really be using input
    +       */
    +      DomElement *self = const_cast<DomElement *>(this);
    +      self->setAttribute("type", "submit");
    +      self->setAttribute("name", "signal=" + clickEvent->second.signalName);
    +
    +      needButtonWrap = false;
    +    } else if (type_ == DomElement_IMG) {
    +      /*
    +       * We don't need to wrap an image: we can substitute it for an input
    +       * type image. This avoid layout problems.
    +       */
    +      renderedType = DomElement_INPUT;
    +
    +      DomElement *self = const_cast<DomElement *>(this);
    +      self->setAttribute("type", "image");
    +      self->setAttribute("name", "signal=" + clickEvent->second.signalName);
    +      needButtonWrap = false;
    +    }
    +  }
    +
    +  if (needButtonWrap) {
    +    PropertyMap::const_iterator i = properties_.find(PropertyStyleDisplay);
    +    if (i != properties_.end() && i->second == "none")
    +      return;
    +  }
    +
    +  /*
    +   * We also should not wrap anchors, map area elements and form elements.
    +   */
    +  if (needButtonWrap) {
    +    if (   type_ == DomElement_AREA
    +	|| type_ == DomElement_INPUT
    +	|| type_ == DomElement_SELECT)
    +      needButtonWrap = false;
    +
    +    if (type_ == DomElement_A) {
    +      std::string href = getAttribute("href");
    +
    +      /*
    +       * IE7 or higher does not allow <a> inside a button
    +       */
    +      if ((app->environment().agentIsIE()
    +	   && app->environment().agent() != WEnvironment::IE6)
    +	  || href != "#")
    +	needButtonWrap = false;
    +    }
    +  }
    +
    +  const bool isIEMobile = app->environment().agentIsIEMobile();
    +  const bool supportButton = !isIEMobile;
    +
    +  bool needAnchorWrap = false;
    +
    +  if (!needButtonWrap) {
    +    if (isIEMobile && app->environment().ajax()
    +	&& (clickEvent != eventHandlers_.end())
    +	&& (!clickEvent->second.jsCode.empty())
    +	&& (   type_ == DomElement_IMG
    +	    || type_ == DomElement_SPAN
    +	    || type_ == DomElement_DIV))
    +      needAnchorWrap = true;
    +  }
    +
    +  if (!supportButton && type_ == DomElement_BUTTON) {
    +    renderedType = DomElement_INPUT;
    +
    +    DomElement *self = const_cast<DomElement *>(this);
    +    if (!isSubmit)
    +      self->setAttribute("type", "button");
    +    self->setAttribute("value",
    +		       properties_.find(PropertyInnerHTML)->second);
    +    self->setProperty(PropertyInnerHTML, "");
    +  }
    +
    +#ifndef WT_TARGET_JAVA
    +  EscapeOStream attributeValues(out);
    +#else // WT_TARGET_JAVA
    +  EscapeOStream attributeValues = out.push();
    +#endif // WT_TARGET_JAVA
    +  attributeValues.pushEscape(EscapeOStream::HtmlAttribute);
    +
    +  std::string style;
    +
    +  if (needButtonWrap) {
    +    if (supportButton) {
    +      out << "<button type=\"submit\" name=\"signal=";
    +      out.append(clickEvent->second.signalName, attributeValues);
    +      out << "\" class=\"Wt-wrap ";
    +
    +      PropertyMap::const_iterator l = properties_.find(PropertyClass);
    +      if (l != properties_.end()) {
    +	out << l->second;
    +	PropertyMap& map = const_cast<PropertyMap&>(properties_);
    +	map.erase(PropertyClass);
    +      }
    +
    +      out << '"';
    +
    +      std::string wrapStyle = cssStyle();
    +      if (!isDefaultInline())
    +	wrapStyle += "display: block;";
    +
    +      if (!wrapStyle.empty()) {
    +	out << " style=";
    +	fastHtmlAttributeValue(out, attributeValues, wrapStyle);
    +      }
    +
    +      PropertyMap::const_iterator i = properties_.find(PropertyDisabled);
    +      if ((i != properties_.end()) && (i->second=="true"))
    +	out << " disabled=\"disabled\"";
    +
    +      if (app->environment().agent() != WEnvironment::Konqueror
    +	  && !app->environment().agentIsWebKit()
    +	  && !app->environment().agentIsIE())
    +	style = "margin: 0px -3px -2px -3px;";
    +
    +      out << "><" << elementNames_[renderedType];
    +    } else {
    +      if (type_ == DomElement_IMG)
    +	out << "<input type=\"image\"";
    +      else
    +	out << "<input type=\"submit\"";
    +
    +      out << " name=";
    +      fastHtmlAttributeValue(out, attributeValues,
    +			     "signal=" + clickEvent->second.signalName);
    +      out << " value=";
    +
    +      PropertyMap::const_iterator i = properties_.find(PropertyInnerHTML);
    +      if (i != properties_.end())
    +	fastHtmlAttributeValue(out, attributeValues, i->second);
    +      else
    +	out << "\"\"";
    +    }
    +  } else if (needAnchorWrap) {
    +    out << "<a href=\"#\" class=\"Wt-wrap\" onclick=";
    +    fastHtmlAttributeValue(out, attributeValues, clickEvent->second.jsCode);
    +    out << "><" << elementNames_[renderedType];
    +  } else
    +    out << "<" << elementNames_[renderedType];
    +
    +  if (!id_.empty()) {
    +    out << " id=";
    +    fastHtmlAttributeValue(out, attributeValues, id_);
    +  }
    +
    +  for (AttributeMap::const_iterator i = attributes_.begin();
    +       i != attributes_.end(); ++i)
    +    if (!app->environment().agentIsSpiderBot() || i->first != "name") {
    +      out << " " << i->first << "=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +    }
    +
    +  if (app->environment().ajax()) {
    +    for (EventHandlerMap::const_iterator i = eventHandlers_.begin();
    +	 i != eventHandlers_.end(); ++i) {
    +      if (!i->second.jsCode.empty()) {
    +	if (id_ == app->domRoot()->id()
    +	    || (i->first == WInteractWidget::MOUSE_WHEEL_SIGNAL
    +		&& app->environment().agentIsGecko()))
    +	  setJavaScriptEvent(javaScript, i->first, i->second, app);
    +	else {
    +	  out << " on" << i->first << "=";
    +	  fastHtmlAttributeValue(out, attributeValues, i->second.jsCode);
    +	}
    +      }
    +    }
    +  }
    +
    +  std::string innerHTML = "";
    +
    +  for (PropertyMap::const_iterator i = properties_.begin();
    +       i != properties_.end(); ++i) {
    +    switch (i->first) {
    +    case PropertyText:
    +    case PropertyInnerHTML:
    +      innerHTML += i->second; break;
    +    case PropertyScript:
    +      innerHTML += "/*<![CDATA[*/\n" + i->second + "\n/* ]]> */"; break;
    +    case PropertyDisabled:
    +      if (i->second == "true")
    +	out << " disabled=\"disabled\"";
    +      break;
    +    case PropertyReadOnly:
    +      if (i->second == "true")
    +	out << " readonly=\"readonly\"";
    +      break;
    +    case PropertyTabIndex:
    +      out << " tabindex=\"" << i->second << '"';
    +      break;
    +    case PropertyChecked:
    +      if (i->second == "true")
    +	out << " checked=\"checked\"";
    +      break;
    +    case PropertySelected:
    +      if (i->second == "true")
    +	out << " selected=\"selected\"";
    +      break;
    +    case PropertyMultiple:
    +      if (i->second == "true")
    +	out << " multiple=\"multiple\"";
    +      break;
    +    case PropertyTarget:
    +      out << " target=\"" << i->second << "\"";
    +      break;
    +    case PropertyIndeterminate:
    +      if (i->second == "true") {
    +	DomElement *self = const_cast<DomElement *>(this);
    +	self->methodCalls_.push_back("indeterminate=" + i->second);
    +      }
    +      break;
    +    case PropertyValue:
    +      out << " value=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +      break;
    +    case PropertySrc:
    +      out << " src=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +      break;
    +    case PropertyColSpan:
    +      out << " colspan=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +      break;
    +    case PropertyRowSpan:
    +      out << " rowspan=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +      break;
    +    case PropertyClass:
    +      out << " class=";
    +      fastHtmlAttributeValue(out, attributeValues, i->second);
    +      break;
    +    default:
    +      break;
    +    }
    +  }
    +
    +  if (!needButtonWrap)
    +    style += cssStyle();
    +
    +  if (!style.empty()) {
    +    out << " style=";
    +    fastHtmlAttributeValue(out, attributeValues, style);
    +  }
    +
    +  if (needButtonWrap && !supportButton)
    +    out << " />";
    +  else {
    +    if (openingTagOnly) {
    +      out << ">";
    +      if (!innerHTML.empty()) {
    +	DomElement *self = const_cast<DomElement *>(this);
    +	self->childrenHtml_ << innerHTML;
    +      }
    +      return;
    +    }
    +
    +    /*
    +     * http://www.w3.org/TR/html/#guidelines
    +     * XHTML recommendation, back-wards compatibility with HTML: C.2, C.3:
    +     * do not use minimized forms when content is empty like <p />, and use
    +     * minimized forms for certain elements like <br />
    +     */
    +    if (!isSelfClosingTag(renderedType)) {
    +      out << ">";
    +      for (unsigned i = 0; i < childrenToAdd_.size(); ++i)
    +	childrenToAdd_[i].child->asHTML(out, javaScript, timeouts);
    +
    +      out << innerHTML; // for WPushButton must be after childrenToAdd_
    +
    +      out << childrenHtml_.str();
    +
    +      // IE6 will incorrectly set the height of empty divs
    +      if (renderedType == DomElement_DIV
    +	  && app->environment().agent() == WEnvironment::IE6
    +	  && innerHTML.empty()
    +	  && childrenToAdd_.empty()
    +	  && childrenHtml_.empty())
    +	out << "&nbsp;";
    +
    +      out << "</" << elementNames_[renderedType] << ">";
    +    } else
    +      out << " />";
    +
    +    if (needButtonWrap && supportButton)
    +      out << "</button>";
    +    else if (needAnchorWrap)
    +      out << "</a>";
    +  }
    +
    +  javaScript << javaScriptEvenWhenDeleted_ << javaScript_;
    +
    +  for (unsigned i = 0; i < methodCalls_.size(); ++i)
    +    javaScript << "$('#" << id_ << "').get(0)." << methodCalls_[i] << ';';
    +
    +  if (timeOut_ != -1)
    +    timeouts.push_back(TimeoutEvent(timeOut_, id_, timeOutJSRepeat_));
    +
    +  Utils::insert(timeouts, timeouts_);
    +}
    +
    +std::string DomElement::createVar() const
    +{
    +#ifndef WT_TARGET_JAVA
    +  char buf[20];
    +  sprintf(buf, "j%d", nextId_++);
    +  var_ = buf;
    +#else // !WT_TARGET_JAVA
    +  var_ = "j" + boost::lexical_cast<std::string>(nextId_++);
    +#endif // !WT_TARGET_JAVA
    +
    +  return var_;
    +}
    +
    +void DomElement::declare(EscapeOStream& out) const
    +{
    +  if (var_.empty())
    +    out << "var " << createVar() << "=$('#" << id_ << "').get(0);\n";
    +}
    +
    +bool DomElement::canWriteInnerHTML(WApplication *app) const
    +{
    +  if (app->environment().agentIsIEMobile())
    +    return true;
    +
    +  /*
    +   * http://lists.apple.com/archives/web-dev/2004/Apr/msg00122.html
    +   * "The problem is not that innerHTML doesn't work (it works fine),
    +   *  but that Safari can't handle writing the innerHTML of a <tbody> tag.
    +   *  If you write the entire table (including <table> and <tbody>) in the
    +   *  innerHTML string it works fine.
    +   */
    +  /* http://msdn.microsoft.com/workshop/author/tables/buildtables.asp
    +   * Note When using Dynamic HTML (DHTML) to create a document, you can 
    +   * create objects and set the innerText or innerHTML property of the object.
    +   * However, because of the specific structure required by tables,
    +   * the innerText and innerHTML properties of the table and tr objects are
    +   * read-only.
    +   */
    +  /* http://support.microsoft.com/kb/276228
    +   * BUG: Internet Explorer Fails to Set the innerHTML Property of the
    +   * Select Object. Seems to affect at least up to IE6.0
    +   */
    +  if ((app->environment().agentIsIE()
    +       || app->environment().agent() == WEnvironment::Konqueror)
    +      && (   type_ == DomElement_TBODY
    +	  || type_ == DomElement_THEAD
    +	  || type_ == DomElement_TABLE
    +	  || type_ == DomElement_TR
    +	  || type_ == DomElement_SELECT
    +	  || type_ == DomElement_TD))
    +    return false;
    +
    +  return true;
    +}
    +
    +#if 0
    +bool DomElement::containsElement(DomElementType type) const
    +{
    +  for (unsigned i = 0; i < childrenToAdd_.size(); ++i) {
    +    if (childrenToAdd_[i].child->type_ == type)
    +      return true;
    +    if (childrenToAdd_[i].child->containsElement(type))
    +      return true;
    +  }
    +
    +  return false;
    +}
    +#endif
    +
    +void DomElement::asJavaScript(std::ostream& out)
    +{
    +  mode_ = ModeUpdate;
    +
    +  EscapeOStream eout(out);
    +
    +  declare(eout);
    +  eout << var_ << ".setAttribute('id', '" << id_ << "');\n";
    +
    +  mode_ = ModeCreate;
    +
    +  setJavaScriptProperties(eout, WApplication::instance());
    +  setJavaScriptAttributes(eout);
    +  asJavaScript(eout, Update);
    +}
    +
    +void DomElement::createTimeoutJs(std::ostream& out, const TimeoutList& timeouts,
    +				 WApplication *app)
    +{
    +  for (unsigned i = 0; i < timeouts.size(); ++i)
    +    out << app->javaScriptClass()
    +	<< "._p_.addTimerEvent('" << timeouts[i].event << "', " 
    +	<< timeouts[i].msec << ","
    +	<< (timeouts[i].repeat ? "true" : "false") << ");\n";
    +}
    +
    +void DomElement::createElement(std::ostream& out, WApplication *app,
    +			       const std::string& domInsertJS)
    +{
    +  EscapeOStream sout(out);
    +  createElement(sout, app, domInsertJS);
    +}
    +
    +void DomElement::createElement(EscapeOStream& out, WApplication *app,
    +			       const std::string& domInsertJS)
    +{
    +  if (var_.empty())
    +    createVar();
    +
    +  out << "var " << var_ << "=";
    +
    +  if (app->environment().agentIsIE()
    +      && app->environment().agent() <= WEnvironment::IE8) {
    +    /*
    +     * IE pre 9 can create the entire opening tag at once.
    +     * This rocks because it results in fewer JavaScript statements.
    +     * It also avoids problems with changing certain attributes not
    +     * working in IE.
    +     */
    +    out << "document.createElement('";
    +    out.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +    TimeoutList timeouts;
    +    EscapeOStream dummy;
    +    asHTML(out, dummy, timeouts, true);
    +    out.popEscape();
    +    out << "');";
    +    out << domInsertJS;
    +    renderInnerHtmlJS(out, app);
    +  } else {
    +    out << "document.createElement('" << elementNames_[type_] << "');";
    +    out << domInsertJS;
    +    asJavaScript(out, Create);
    +    asJavaScript(out, Update);
    +  }
    +}
    +
    +std::string DomElement::addToParent(std::ostream& out,
    +				    const std::string& parentVar,
    +				    int pos, WApplication *app)
    +{
    +  EscapeOStream sout(out);
    +  return addToParent(sout, parentVar, pos, app);
    +}
    +
    +std::string DomElement::addToParent(EscapeOStream& out,
    +				    const std::string& parentVar,
    +				    int pos, WApplication *app)
    +{
    +  createVar();
    +
    +  if (type_ == DomElement_TD || type_ == DomElement_TR) {
    +    out << "var " << var_ << "=";
    +
    +    if (type_ == DomElement_TD)
    +      out << parentVar << ".insertCell(" << pos << ");\n";
    +    else
    +      out << parentVar << ".insertRow(" << pos << ");\n";
    +
    +    asJavaScript(out, Create);
    +    asJavaScript(out, Update);
    +  } else {
    +    SStream insertJS;
    +    if (pos != -1)
    +      insertJS << WT_CLASS ".insertAt(" << parentVar << "," << var_
    +	       << "," << pos << ");";
    +    else
    +      insertJS << parentVar << ".appendChild(" << var_ << ");\n";
    +
    +    createElement(out, app, insertJS.str());
    +  }
    +
    +  return var_;
    +}
    +
    +std::string DomElement::asJavaScript(EscapeOStream& out,
    +				     Priority priority) const
    +{
    +  switch(priority) {
    +  case Delete:
    +    if (!javaScriptEvenWhenDeleted_.empty() || (removeAllChildren_ >= 0)) {
    +      out << javaScriptEvenWhenDeleted_;
    +      if (removeAllChildren_ >= 0) {
    +	declare(out);
    +	if (removeAllChildren_ == 0)
    +	  out << var_ << ".innerHTML='';\n";
    +	else {
    +	  out << "$(" << var_ << ").children(':gt(" << removeAllChildren_
    +	      << ")').remove();";
    +	}
    +      }
    +    }
    +
    +    return var_;
    +  case Create:
    +    if (mode_ == ModeCreate) {
    +      if (!id_.empty())
    +	out << var_ << ".setAttribute('id', '" << id_ << "');\n";
    +
    +      setJavaScriptAttributes(out);
    +      setJavaScriptProperties(out, WApplication::instance());
    +    }
    +
    +    return var_;
    +  case Update:
    +  {
    +    WApplication *app = WApplication::instance();
    +
    +    for (unsigned i = 0; i < updatedChildren_.size(); ++i) {
    +      DomElement *child = updatedChildren_[i];
    +      child->asJavaScript(out, Update);
    +      delete child;
    +    }
    +
    +    /*
    +     * short-cut for frequent short manipulations
    +     */
    +    if (mode_ == ModeUpdate && numManipulations_ == 1) {
    +      if (properties_.find(PropertyStyleDisplay) != properties_.end()) {
    +	std::string style = properties_.find(PropertyStyleDisplay)->second;
    +	if (style == "none") {
    +	  out << WT_CLASS ".hide('" << id_ << "');\n";
    +	  return var_;
    +	} else if (style.empty()) {
    +	  out << WT_CLASS ".show('" << id_ << "');\n";
    +	  return var_;
    +	} else if (style == "inline") {
    +	  out << WT_CLASS ".inline('" + id_ + "');\n";
    +	  return var_;
    +	} else if (style == "block") {
    +	  out << WT_CLASS ".block('" + id_ + "');\n";
    +	  return var_;
    +	}
    +      }
    +    }
    +
    +    if (unwrapped_)
    +      out << WT_CLASS ".unwrap('" << id_ << "');\n";      
    +
    +    processEvents(app);
    +    processProperties(app);
    +
    +    if (replaced_) {
    +      declare(out);
    +
    +      std::string varr = replaced_->createVar();
    +      SStream insertJs;
    +      insertJs << var_ << ".parentNode.replaceChild("
    +	       << varr << ',' << var_ << ");\n";
    +      replaced_->createElement(out, app, insertJs.str());
    +      if (unstubbed_)
    +	out << WT_CLASS ".unstub(" << var_ << ',' << varr << ','
    +	    << (hideWithDisplay_ ? 1 : 0) << ");\n";
    +
    +      return var_;
    +    } else if (insertBefore_) {
    +      declare(out);
    +
    +      std::string varr = insertBefore_->createVar();
    +      SStream insertJs;
    +      insertJs << var_ << ".parentNode.insertBefore(" << varr << ","
    +	       << var_ + ");\n";
    +      insertBefore_->createElement(out, app, insertJs.str());
    +
    +      return var_;
    +    }
    +
    +    // FIXME optimize with subselect
    +
    +    for (unsigned i = 0; i < childrenToSave_.size(); ++i) {
    +      declare(out);
    +
    +      out << "var c" << var_ << (int)i << '='
    +	  << "$('#" << childrenToSave_[i] << "')";
    +      // In IE, contents is deleted by setting innerHTML
    +      if (app->environment().agentIsIE())
    +	out << ".remove()";
    +      out << ";";
    +    }
    +
    +    if (mode_ != ModeCreate) {
    +      setJavaScriptProperties(out, app);
    +      setJavaScriptAttributes(out);
    +    }
    +
    +    for (EventHandlerMap::const_iterator i = eventHandlers_.begin();
    +	 i != eventHandlers_.end(); ++i)
    +      if ((mode_ == ModeUpdate) || !i->second.jsCode.empty())
    +	setJavaScriptEvent(out, i->first, i->second, app);
    +
    +    renderInnerHtmlJS(out, app);
    +
    +    for (unsigned i = 0; i < childrenToSave_.size(); ++i)
    +      out << "$('#" << childrenToSave_[i] << "').replaceWith(c"
    +	  << var_ << (int)i << ");";
    +
    +    return var_;
    +  }
    +  }
    +
    +  return var_;
    +}
    +
    +void DomElement::renderInnerHtmlJS(EscapeOStream& out, WApplication *app) const
    +{
    +  if (!childrenHtml_.empty() || (wasEmpty_ && canWriteInnerHTML(app))) {
    +    // IE6: write &nbsp; inside a empty <div></div>
    +    if ((type_ == DomElement_DIV
    +	 && app->environment().agent() == WEnvironment::IE6)
    +	|| !childrenToAdd_.empty() || !childrenHtml_.empty()) {
    +      declare(out);
    +
    +      out << WT_CLASS ".setHtml(" << var_ << ",'";
    +
    +      out.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +      out << childrenHtml_.str();
    +
    +      TimeoutList timeouts;
    +      EscapeOStream js;
    +
    +      for (unsigned i = 0; i < childrenToAdd_.size(); ++i)
    +	childrenToAdd_[i].child->asHTML(out, js, timeouts);
    +
    +      if (type_ == DomElement_DIV
    +	  && app->environment().agent() == WEnvironment::IE6
    +	  && childrenToAdd_.empty()
    +	  && childrenHtml_.empty())
    +	out << "&nbsp;";
    +
    +      out.popEscape();
    +
    +      out << "');\n";
    +
    +      Utils::insert(timeouts, timeouts_);
    +
    +      for (unsigned i = 0; i < timeouts.size(); ++i)
    +	out << app->javaScriptClass()
    +	    << "._p_.addTimerEvent('" << timeouts[i].event << "', " 
    +	    << timeouts[i].msec << ","
    +	    << (timeouts[i].repeat ? "true" : "false") << ");\n";
    +
    +      out << js;
    +    }
    +  } else {
    +    for (unsigned i = 0; i < childrenToAdd_.size(); ++i) {
    +      declare(out);
    +      DomElement *child = childrenToAdd_[i].child;
    +      child->addToParent(out, var_, childrenToAdd_[i].pos, app);
    +    }
    +  }
    +
    +  for (unsigned i = 0; i < methodCalls_.size(); ++i) {
    +    declare(out);
    +    out << var_ << "." << methodCalls_[i] << ';' << '\n';
    +  }
    +
    +  if (!javaScript_.empty()) {
    +    declare(out);
    +    out << javaScript_ << '\n';
    +  }
    +
    +  if (timeOut_ != -1)
    +    out << app->javaScriptClass() << "._p_.addTimerEvent('"
    +	<< id_ << "', " << timeOut_ << ","
    +	<< (timeOutJSRepeat_ ? "true" : "false") << ");\n";
    +}
    +
    +void DomElement::setJavaScriptProperties(EscapeOStream& out,
    +					 WApplication *app) const
    +{
    +#ifndef WT_TARGET_JAVA
    +  EscapeOStream escaped(out);
    +#else
    +  EscapeOStream escaped = out.push();
    +#endif // WT_TARGET_JAVA
    +
    +  bool pushed = false;
    +
    +  for (PropertyMap::const_iterator i = properties_.begin();
    +       i != properties_.end(); ++i) {
    +    declare(out);
    +
    +    switch(i->first) {
    +    case PropertyInnerHTML:
    +    case PropertyAddedInnerHTML:
    +      out << WT_CLASS ".setHtml(" << var_ << ',';
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped, i->second);
    +      out << (i->first == PropertyInnerHTML ? ",false" : ",true")
    +	  << ");";
    +      break;
    +    case PropertyScript:
    +      out << var_ << ".innerHTML=";
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped,
    +			  "/*<![CDATA[*/\n" + i->second + "\n/* ]]> */");
    +      out << ';';
    +      break;
    +    case PropertyValue:
    +      out << var_ << ".value=";
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped, i->second);
    +      out << ';';
    +      break;
    +    case PropertyTarget:
    +      out << var_ << ".target='" << i->second << "';";
    +      break;
    +    case PropertyIndeterminate:
    +      out << var_ << ".indeterminate=" << i->second << ";";
    +      break;
    +    case PropertyDisabled:
    +      out << var_ << ".disabled=" << i->second << ';';
    +      break;
    +    case PropertyReadOnly:
    +      out << var_ << ".readOnly=" << i->second << ';';
    +      break;
    +    case PropertyTabIndex:
    +      out << var_ << ".tabIndex=" << i->second << ';';
    +      break;
    +    case PropertyChecked:
    +      out << var_ << ".checked=" << i->second << ';';
    +      break;
    +    case PropertySelected:
    +      out << var_ << ".selected=" << i->second << ';';
    +      break;
    +    case PropertySelectedIndex:
    +      out << var_ << ".selectedIndex=" << i->second << ';';
    +      break;
    +    case PropertyMultiple:
    +      out << var_ << ".multiple=" << i->second << ';';
    +      break;
    +    case PropertySrc:
    +      out << var_ << ".src='" << i->second << "\';";
    +      break;
    +    case PropertyColSpan:
    +      out << var_ << ".colSpan=" << i->second << ";";
    +      break;
    +    case PropertyRowSpan:
    +      out << var_ << ".rowSpan=" << i->second << ";";
    +      break;
    +    case PropertyClass:
    +      out << var_ << ".className=";
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped, i->second);
    +      out << ';';
    +      break;
    +    case PropertyText:
    +      out << var_ << ".text=";
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped, i->second);
    +      out << ';';
    +      break;
    +    case PropertyStyleFloat:
    +      out << var_ << ".style."
    +	  << (app->environment().agentIsIE() ? "styleFloat" : "cssFloat")
    +	  << "=\'" << i->second << "\';";
    +      break;
    +    case Wt::PropertyStyleWidthExpression:
    +      out << var_ << ".style.setExpression('width',";
    +      if (!pushed) {
    +	escaped.pushEscape(EscapeOStream::JsStringLiteralSQuote);
    +	pushed = true;
    +      }
    +      fastJsStringLiteral(out, escaped, i->second);
    +      out << ");";
    +      break;
    +    default:
    +      if ((i->first >= PropertyStyle)
    +	  && (i->first <= PropertyStyleDisplay)) {
    +	static std::string cssCamelNames[] =
    +	  { "cssText", "width", "position",
    +	    "zIndex", "cssFloat", "clear",
    +	    "width", "height", "lineHeight",
    +	    "minWidth", "minHeight",
    +	    "maxWidth", "maxHeight",
    +	    "left", "right", "top", "bottom",
    +	    "verticalAlign", "textAlign",
    +	    "padding",
    +	    "paddingRight", "paddingLeft",
    +	    "marginTop", "marginRight",
    +	    "marginBottom", "marginLeft",
    +	    "cursor", 	    
    +	    "borderTop", "borderRight",
    +	    "borderBottom", "borderLeft",
    +	    "color", "overflow", "overflow",
    +	    "opacity",
    +	    "fontFamily", "fontStyle", "fontVariant",
    +	    "fontWeight", "fontSize",
    +	    "backgroundColor", "backgroundImage", "backgroundRepeat",
    +	    "backgroundAttachment", "backgroundPosition",
    +	    "textDecoration", "whiteSpace", "tableLayout", "borderSpacing",
    +	    "zoom", "visibility", "display" };
    +	out << var_ << ".style."
    +	    << cssCamelNames[i->first - PropertyStyle]
    +	    << "='" << i->second << "';";
    +      }
    +    }
    +
    +    out << '\n';
    +  }
    +}
    +
    +void DomElement::setJavaScriptAttributes(EscapeOStream& out) const
    +{
    +  for (AttributeMap::const_iterator i = attributes_.begin();
    +       i != attributes_.end(); ++i) {
    +    declare(out);
    +
    +    if (i->first == "style") {
    +      out << var_ << ".style.cssText = ";
    +      jsStringLiteral(out, i->second, '\'');
    +      out << ';' << '\n';
    +    } else {
    +      out << var_ << ".setAttribute('" << i->first << "',";
    +      jsStringLiteral(out, i->second, '\'');
    +      out << ");\n";
    +    }
    +  }
    +}
    +
    +bool DomElement::isDefaultInline() const
    +{
    +  return defaultInline_[type_];
    +}
    +
    +bool DomElement::isSelfClosingTag(const std::string& tag)
    +{
    +  return (   (tag == "br")
    +	  || (tag == "hr")
    +	  || (tag == "img")
    +	  || (tag == "area")
    +	  || (tag == "col")
    +	  || (tag == "input"));
    +}
    +
    +bool DomElement::isSelfClosingTag(DomElementType element)
    +{
    +  return ((   element == DomElement_BR)
    +       /* || (element == DomElement_HR) */
    +	  || (element == DomElement_IMG)
    +	  || (element == DomElement_AREA)
    +	  || (element == DomElement_COL)
    +	  || (element == DomElement_INPUT));
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/DomElement.h b/wt-3.1.7a/src/web/DomElement.h
    new file mode 100644
    index 0000000..0af3a0f
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/DomElement.h
    @@ -0,0 +1,286 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DOMELEMENT_H_
    +#define DOMELEMENT_H_
    +
    +#include <map>
    +#include <vector>
    +#include <sstream>
    +#include <string>
    +
    +#include "Wt/WWebWidget"
    +#include "EscapeOStream.h"
    +
    +namespace Wt {
    +
    +class WApplication;
    +class EscapeOStream;
    +class EventSignalBase;
    +class WObject;
    +
    +enum Property { PropertyInnerHTML, PropertyAddedInnerHTML,
    +		PropertyValue, PropertyDisabled,
    +		PropertyChecked, PropertySelected, PropertySelectedIndex,
    +		PropertyMultiple, PropertyTarget, PropertyIndeterminate,
    +		PropertySrc, PropertyText, PropertyScript,
    +		PropertyColSpan, PropertyRowSpan, PropertyReadOnly,
    +		PropertyTabIndex,
    +		PropertyClass,
    +		PropertyStyle,
    +		PropertyStyleWidthExpression,
    +		PropertyStylePosition,
    +		PropertyStyleZIndex, PropertyStyleFloat, PropertyStyleClear,
    +		PropertyStyleWidth, PropertyStyleHeight,
    +		PropertyStyleLineHeight,
    +		PropertyStyleMinWidth, PropertyStyleMinHeight,
    +		PropertyStyleMaxWidth, PropertyStyleMaxHeight,
    +		PropertyStyleLeft, PropertyStyleRight,
    +		PropertyStyleTop, PropertyStyleBottom,
    +		PropertyStyleVerticalAlign, PropertyStyleTextAlign,
    +		PropertyStylePadding,
    +		PropertyStylePaddingRight, PropertyStylePaddingLeft,
    +		PropertyStyleMarginTop, PropertyStyleMarginRight,
    +		PropertyStyleMarginBottom, PropertyStyleMarginLeft,
    +		PropertyStyleCursor, 
    +		PropertyStyleBorderTop, PropertyStyleBorderRight,
    +		PropertyStyleBorderBottom, PropertyStyleBorderLeft,
    +		PropertyStyleColor,
    +		PropertyStyleOverflowX,
    +		PropertyStyleOverflowY,
    +		PropertyStyleOpacity,
    +		PropertyStyleFontFamily,
    +		PropertyStyleFontStyle,
    +		PropertyStyleFontVariant,
    +		PropertyStyleFontWeight,
    +		PropertyStyleFontSize,
    +		PropertyStyleBackgroundColor,
    +		PropertyStyleBackgroundImage,
    +		PropertyStyleBackgroundRepeat,
    +		PropertyStyleBackgroundAttachment,
    +		PropertyStyleBackgroundPosition,
    +		PropertyStyleTextDecoration, PropertyStyleWhiteSpace,
    +		PropertyStyleTableLayout, PropertyStyleBorderSpacing,
    +		PropertyStyleZoom,
    +		PropertyStyleVisibility, PropertyStyleDisplay };
    +
    +class WT_API DomElement
    +{
    +public:
    +  enum Mode { ModeCreate, ModeUpdate };
    +  typedef std::map<Wt::Property, std::string> PropertyMap;
    +
    +  DomElement(Mode mode, DomElementType type);
    +  ~DomElement();
    +
    +  static std::string urlEncodeS(const std::string& url);
    +
    +  Mode mode() const { return mode_; }
    +
    +  void setType(DomElementType type);
    +  DomElementType type() const { return type_; }
    +
    +  static DomElement *createNew(DomElementType type);
    +  static DomElement *getForUpdate(const std::string& id, DomElementType type);
    +  static DomElement *getForUpdate(const WObject *object, DomElementType type);
    +  static DomElement *updateGiven(const std::string& el, DomElementType type);
    +
    +  std::string var() { return var_; }
    +
    +  /*
    +   * General methods (for both createnew and update modes)
    +   */
    +  void setWasEmpty(bool how); // allows optimisation of addChild()
    +  void addChild(DomElement *child);
    +  void insertChildAt(DomElement *child, int pos);
    +  void saveChild(const std::string& id);
    +
    +  void setAttribute(const std::string& attribute, const std::string& value);
    +
    +  std::string getAttribute(const std::string& attribute) const;
    +  void removeAttribute(const std::string& attribute);
    +
    +  void setProperty(Wt::Property property, const std::string& value);
    +  std::string getProperty(Wt::Property property) const;
    +  void removeProperty(Wt::Property property);
    +  void setProperties(const PropertyMap& properties);
    +  const PropertyMap& properties() const { return properties_; }
    +  void clearProperties();
    +
    +  void setEventSignal(const char *eventName, const EventSignalBase& signal);
    +
    +  void setEvent(const char *eventName,
    +		const std::string& jsCode,
    +		const std::string& signalName,
    +		bool isExposed = false);
    +  void setEvent(const char *eventName, const std::string& jsCode);
    +
    +  struct EventAction
    +  {
    +    std::string jsCondition;
    +    std::string jsCode;
    +    std::string updateCmd;
    +    bool        exposed;
    +
    +    EventAction(const std::string& jsCondition, const std::string& jsCode,
    +		const std::string& updateCmd, bool exposed);
    +  };
    +
    +  void setEvent(const char * eventName,
    +		const std::vector<EventAction>& actions);
    +
    +  void setId(const std::string& id);
    +  void setName(const std::string& name);
    +  void setTimeout(int msec, bool jsRepeat);
    +  void callMethod(const std::string& method);
    +  void callJavaScript(const std::string& javascript,
    +		      bool evenWhenDeleted = false);
    +
    +  const std::string& id() const { return id_; }
    +
    +  /*
    +   * only for ModeUpdate
    +   */
    +  void removeAllChildren(int firstChild = 0);
    +  void removeFromParent();
    +  void replaceWith(DomElement *newElement);
    +  void unstubWith(DomElement *newElement, bool hideWithDisplay);
    +  void insertBefore(DomElement *sibling);
    +  void unwrap();
    +
    +  void setDiscardWithParent(bool discard);
    +  bool discardWithParent() const { return discardWithParent_; }
    +
    +  enum Priority { Delete, Create, Update };
    +
    +  struct TimeoutEvent {
    +    int msec;
    +    std::string event;
    +    bool repeat;
    +
    +    TimeoutEvent() { }
    +    TimeoutEvent(int m, const std::string& e, bool r)
    +      : msec(m), event(e), repeat(r) { }
    +  };
    +
    +  typedef std::vector<TimeoutEvent> TimeoutList;
    +
    +  void asJavaScript(std::ostream& out);
    +  std::string asJavaScript(EscapeOStream& out, Priority priority) const;
    +
    +  void asHTML(EscapeOStream& out, EscapeOStream& javaScript,
    +	      TimeoutList& timeouts, bool openingTagOnly = false) const;
    +  static void createTimeoutJs(std::ostream& out, const TimeoutList& timeouts,
    +			      WApplication *app);
    +
    +  bool isDefaultInline() const;
    +  void declare(EscapeOStream& out) const;
    +
    +  std::string cssStyle() const;
    +
    +  static void fastJsStringLiteral(EscapeOStream& outRaw,
    +				  const EscapeOStream& outEscaped,
    +				  const std::string& s);
    +  static void jsStringLiteral(EscapeOStream& out, const std::string& s,
    +			      char delimiter);
    +  static void jsStringLiteral(std::ostream& out, const std::string& s,
    +			      char delimiter);
    +  static void fastHtmlAttributeValue(EscapeOStream& outRaw,
    +				     const EscapeOStream& outEscaped,
    +				     const std::string& s);
    +  static void htmlAttributeValue(std::ostream& out, const std::string& s);
    +  static bool isSelfClosingTag(const std::string& tag);
    +  static bool isSelfClosingTag(DomElementType element);
    +
    +  std::string javaScript() const { return javaScript_.str(); }
    +
    +  void updateInnerHtmlOnly();
    +
    +  std::string addToParent(std::ostream& out, const std::string& parentVar,
    +			  int pos, WApplication *app);
    +
    +  void createElement(std::ostream& out, WApplication *app,
    +		     const std::string& domInsertJS);
    +
    +  std::string createVar() const;
    +
    +private:
    +  struct EventHandler {
    +    std::string jsCode;
    +    std::string signalName;
    +
    +    EventHandler() { }
    +    EventHandler(const std::string& j, const std::string& sn)
    +      : jsCode(j), signalName(sn) { }
    +  };
    +
    +  typedef std::map<std::string, std::string> AttributeMap;
    +  typedef std::map<const char *, EventHandler> EventHandlerMap;
    +
    +  bool canWriteInnerHTML(WApplication *app) const;
    +  bool containsElement(DomElementType type) const;
    +  void processEvents(WApplication *app) const;
    +  void processProperties(WApplication *app) const;
    +  void setJavaScriptProperties(EscapeOStream& out, WApplication *app) const;
    +  void setJavaScriptAttributes(EscapeOStream& out) const;
    +  void setJavaScriptEvent(EscapeOStream& out, const char *eventName,
    +			  const EventHandler& handler, WApplication *app) const;
    +  void createElement(EscapeOStream& out, WApplication *app,
    +		     const std::string& domInsertJS);
    +  std::string addToParent(EscapeOStream& out, const std::string& parentVar,
    +			  int pos, WApplication *app);
    +  std::string createAsJavaScript(EscapeOStream& out,
    +				 const std::string& parentVar, int pos,
    +				 WApplication *app);
    +  void renderInnerHtmlJS(EscapeOStream& out, WApplication *app) const;
    +
    +  Mode         mode_;
    +  bool         wasEmpty_;
    +  int	       removeAllChildren_;
    +  bool         hideWithDisplay_;
    +  bool         minMaxSizeProperties_;
    +  bool         unstubbed_;
    +  bool         unwrapped_;
    +  DomElement  *replaced_;        // when replaceWith() is called
    +  DomElement  *insertBefore_;
    +  DomElementType type_;
    +  std::string  id_;
    +  int          numManipulations_;
    +  std::vector<std::string> methodCalls_;
    +  int          timeOut_;
    +  bool         timeOutJSRepeat_;
    +  EscapeOStream javaScript_;
    +  std::string  javaScriptEvenWhenDeleted_;
    +  mutable std::string var_;
    +
    +  AttributeMap    attributes_;
    +  PropertyMap     properties_;
    +  EventHandlerMap eventHandlers_;
    +
    +  struct ChildInsertion {
    +    int pos;
    +    DomElement *child;
    +
    +    ChildInsertion() : pos(0), child(0) { }
    +    ChildInsertion(int p, DomElement *c) : pos(p), child(c) { }
    +  };
    +
    +  std::vector<ChildInsertion> childrenToAdd_;
    +  std::vector<std::string> childrenToSave_;
    +  std::vector<DomElement *> updatedChildren_;
    +  EscapeOStream childrenHtml_;
    +  TimeoutList timeouts_;
    +
    +  bool discardWithParent_;
    +
    +  static int nextId_;
    +
    +  friend class WCssDecorationStyle;
    +};
    +
    +}
    +
    +#endif // DOMELEMENT_H_
    diff --git a/wt-3.1.7a/src/web/EscapeOStream.C b/wt-3.1.7a/src/web/EscapeOStream.C
    new file mode 100644
    index 0000000..f065201
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/EscapeOStream.C
    @@ -0,0 +1,408 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cstring>
    +#include <boost/lexical_cast.hpp>
    +#include "EscapeOStream.h"
    +#include "Utils.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +SStream::SStream()
    +  : sink_(0),
    +    buf_(static_buf_),
    +    buf_i_(0)
    +{ }
    +
    +SStream::SStream(std::ostream& sink)
    +  : sink_(&sink),
    +    buf_(static_buf_),
    +    buf_i_(0)
    +{ }
    +
    +SStream::~SStream()
    +{
    +  flushSink();
    +
    +  for (unsigned int i = 1; i < bufs_.size(); ++i)
    +    delete[] bufs_[i].first;
    +
    +  if (buf_ != static_buf_)
    +    delete[] buf_;
    +}
    +
    +void SStream::clear()
    +{
    +  buf_i_ = 0;
    +}
    +
    +bool SStream::empty() const
    +{
    +  return !sink_ && buf_ == static_buf_ && buf_i_ == 0;
    +}
    +
    +void SStream::flushSink()
    +{
    +  if (sink_) {
    +    sink_->write(buf_, buf_i_);
    +    buf_i_ = 0;
    +  }
    +}
    +
    +void SStream::pushBuf()
    +{
    +  if (sink_) {
    +    sink_->write(buf_, buf_i_);
    +    buf_i_ = 0;
    +  } else {
    +    bufs_.push_back(std::make_pair(buf_, buf_i_));
    +    buf_ = new char[D_LEN];
    +    buf_i_ = 0;
    +  }
    +}
    +
    +SStream& SStream::operator<< (char c)
    +{
    +  if (buf_i_ == buf_len())
    +    pushBuf();
    +
    +  buf_[buf_i_++] = c;
    +
    +  return *this;
    +}
    +
    +SStream& SStream::operator<< (const char *s)
    +{
    +  append(s, std::strlen(s));
    +
    +  return *this;
    +}
    +
    +SStream& SStream::operator<< (const std::string& s)
    +{
    +  append(s.data(), s.length());
    +
    +  return *this;
    +}
    +
    +SStream& SStream::operator<< (int v)
    +{
    +  char buf[20];
    +  Utils::itoa(v, buf);
    +  return *this << buf;
    +}
    +
    +void SStream::append(const char *s, int length)
    +{
    +  if (buf_i_ + length > buf_len()) {
    +    pushBuf();
    +
    +    if (length > buf_len()) {
    +      if (sink_) {
    +	sink_->write(s, length);
    +	return;
    +      } else {
    +	char *buf = new char[length];
    +	std::memcpy(buf, s, length);
    +	bufs_.push_back(std::make_pair(buf, length));
    +	return;
    +      }
    +    }
    +  }
    +
    +  std::memcpy(buf_ + buf_i_, s, length);
    +  buf_i_ += length;
    +}
    +
    +const char *SStream::c_str()
    +{
    +  if (bufs_.empty()) {
    +    buf_[buf_i_] = 0;
    +    return buf_;
    +  } else
    +    return 0;
    +}
    +
    +std::string SStream::str() const
    +{
    +  int length = buf_i_;
    +  for (unsigned int i = 0; i < bufs_.size(); ++i)
    +    length += bufs_[i].second;
    +
    +  std::string result;
    +  result.reserve(length);
    +
    +  for (unsigned int i = 0; i < bufs_.size(); ++i)
    +    result.append(bufs_[i].first, bufs_[i].second);
    +
    +  result.append(buf_, buf_i_);
    +
    +  return result;
    +}
    +
    +SStream::iterator SStream::back_inserter()
    +{
    +  return iterator(*this);
    +}
    +
    +SStream::iterator::iterator()
    +  : stream_(0)
    +{ }
    +
    +SStream::iterator::char_proxy SStream::iterator::operator * ()
    +{
    +  return char_proxy(*stream_);
    +}
    +
    +SStream::iterator& SStream::iterator::operator ++ ()
    +{
    +  return *this;
    +}
    +
    +SStream::iterator SStream::iterator::operator ++ (int)
    +{
    +  return *this;
    +}
    +
    +SStream::iterator::char_proxy&
    +SStream::iterator::char_proxy::operator= (char c)
    +{
    +  stream_ << c;
    +  return *this;
    +}
    +
    +SStream::iterator::char_proxy::char_proxy(SStream& stream)
    +  : stream_(stream)
    +{ }
    +
    +SStream::iterator::iterator(SStream& stream)
    +  : stream_(&stream)
    +{ }
    +
    +const EscapeOStream::Entry EscapeOStream::htmlAttributeEntries_[] = {
    +  { '&', "&amp;" },
    +  { '\"', "&#34;" },
    +  { '<', "&lt;" }
    +};
    +
    +const EscapeOStream::Entry EscapeOStream::plainTextEntries_[] = {
    +  { '&', "&amp;" },
    +  { '>', "&gt;" },
    +  { '<', "&lt;" }
    +};
    +
    +const EscapeOStream::Entry EscapeOStream::plainTextNewLinesEntries_[] = {
    +  { '&', "&amp;" },
    +  { '>', "&gt;" },
    +  { '<', "&lt;" },
    +  { '\n', "<br />" }
    +};
    +
    +const EscapeOStream::Entry EscapeOStream::jsStringLiteralSQuoteEntries_[] = {
    +  { '\\', "\\\\" },
    +  { '\n', "\\n" },
    +  { '\r', "\\r" },
    +  { '\t', "\\t" },
    +  { '\'', "\\'" },
    +};
    +
    +const EscapeOStream::Entry EscapeOStream::jsStringLiteralDQuoteEntries_[] = {
    +  { '\\', "\\\\" },
    +  { '\n', "\\n" },
    +  { '\r', "\\r" },
    +  { '\t', "\\t" },
    +  { '"', "\\\"" },
    +};
    +
    +const std::vector<EscapeOStream::Entry> EscapeOStream::standardSets_[] = { 
    +  std::vector<EscapeOStream::Entry>(),
    +  std::vector<EscapeOStream::Entry>(htmlAttributeEntries_,
    +				    htmlAttributeEntries_ + 3),
    +  std::vector<EscapeOStream::Entry>(jsStringLiteralSQuoteEntries_,
    +				    jsStringLiteralSQuoteEntries_ + 5),
    +  std::vector<EscapeOStream::Entry>(jsStringLiteralDQuoteEntries_,
    +				    jsStringLiteralDQuoteEntries_ + 5),
    +  std::vector<EscapeOStream::Entry>(plainTextEntries_,
    +				    plainTextEntries_ + 3),
    +  std::vector<EscapeOStream::Entry>(plainTextNewLinesEntries_,
    +				    plainTextNewLinesEntries_ + 4)
    +};
    +
    +const std::string EscapeOStream::standardSetsSpecial_[] = { 
    +  std::string(),
    +  std::string("&\"<"),
    +  std::string("\\\n\r\t'"),
    +  std::string("\\\n\r\t\""),
    +  std::string("&><"),
    +  std::string("&><\n")
    +};
    +
    +EscapeOStream::EscapeOStream()
    +  : c_special_(0)
    +{ }
    +
    +EscapeOStream::EscapeOStream(std::ostream& sink)
    +  : stream_(sink),
    +    c_special_(0)
    +{ }
    +
    +EscapeOStream::EscapeOStream(EscapeOStream& other)
    +  : mixed_(other.mixed_),
    +    special_(other.special_),
    +    c_special_(special_.empty() ? 0 : special_.c_str()),
    +    ruleSets_(other.ruleSets_)
    +{ }
    +
    +void EscapeOStream::mixRules()
    +{
    +  mixed_.clear();
    +  special_.clear();
    +
    +  const int ruleSetsSize = ruleSets_.size();
    +
    +  if (ruleSetsSize == 0) {
    +    c_special_ = 0;
    +  } else { 
    +    if (ruleSetsSize == 1) {
    +      mixed_ = standardSets_[ruleSets_[0]];
    +      special_ = standardSetsSpecial_[ruleSets_[0]];
    +    } else
    +      for (int i = ruleSetsSize - 1; i >= 0; --i) {
    +	const std::vector<Entry>& toMix = standardSets_[ruleSets_[i]];
    +
    +	for (unsigned j = 0; j < mixed_.size(); ++j)
    +	  for (unsigned k = 0; k < toMix.size(); ++k)
    +	    Wt::Utils::replace(mixed_[j].s, toMix[k].c, toMix[k].s);
    +
    +	mixed_.insert(mixed_.end(), toMix.begin(), toMix.end());
    +
    +	for (unsigned j = 0; j < toMix.size(); ++j)
    +	  special_.push_back(toMix[j].c);
    +      }
    +
    +    if (!special_.empty())
    +      c_special_ = special_.c_str();
    +    else
    +      c_special_ = 0;
    +  }
    +}
    +
    +void EscapeOStream::pushEscape(RuleSet rules)
    +{
    +  ruleSets_.push_back(rules);
    +  mixRules();
    +}
    +
    +void EscapeOStream::popEscape()
    +{
    +  ruleSets_.pop_back();
    +  mixRules();
    +}
    +
    +EscapeOStream& EscapeOStream::operator<< (char c)
    +{
    +  if (c_special_ == 0) {
    +    stream_ << c;
    +  } else {
    +    std::size_t i = special_.find(c);
    +
    +    if (i != std::string::npos)
    +      stream_ << mixed_[i].s;
    +    else
    +      stream_ << c;
    +  }
    +
    +  return *this;
    +}
    +
    +EscapeOStream& EscapeOStream::operator<< (const char *s)
    +{
    +  if (c_special_ == 0)
    +    stream_ << s;
    +  else
    +    put(s, *this);
    +
    +  return *this;
    +}
    +
    +void EscapeOStream::append(const std::string& s, const EscapeOStream& rules)
    +{
    +  if (rules.c_special_ == 0)
    +    stream_ << s;
    +  else
    +    put(s.data(), rules);
    +}
    +
    +EscapeOStream& EscapeOStream::operator<< (const std::string& s)
    +{
    +  append(s, *this);
    +
    +  return *this;
    +}
    +
    +void EscapeOStream::put(const char *s, const EscapeOStream& rules)
    +{
    +  for (;s;) {
    +    const char *f = std::strpbrk(s, rules.c_special_);
    +    if (f != 0) {
    +      stream_.append(s, static_cast<int>(f - s));
    +      
    +      unsigned i = 0;
    +      for (; i < rules.mixed_.size(); ++i)
    +	if (rules.mixed_[i].c == *f) {
    +	  stream_ << rules.mixed_[i].s;
    +	  break;
    +	}
    +
    +      if (i == rules.mixed_.size())
    +	stream_ << *f;
    +
    +      s = f + 1;
    +    } else {
    +      stream_ << s;
    +      s = 0;
    +    }
    +  }
    +}
    +
    +EscapeOStream& EscapeOStream::operator<< (int arg)
    +{
    +  stream_ << arg;
    +
    +  return *this;
    +}
    +
    +EscapeOStream& EscapeOStream::operator<< (const EscapeOStream& other)
    +{
    +  if (!other.empty())
    +    *this << other.str(); // FIXME could be optimized ?
    +
    +  return *this;
    +}
    +
    +const char *EscapeOStream::c_str()
    +{
    +  return stream_.c_str();
    +}
    +
    +std::string EscapeOStream::str() const
    +{
    +  return stream_.str();
    +}
    +
    +void EscapeOStream::clear()
    +{
    +  stream_.clear();
    +}
    +
    +bool EscapeOStream::empty() const
    +{
    +  return stream_.empty();
    +}
    +
    +
    +}
    diff --git a/wt-3.1.7a/src/web/EscapeOStream.h b/wt-3.1.7a/src/web/EscapeOStream.h
    new file mode 100644
    index 0000000..5d299b1
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/EscapeOStream.h
    @@ -0,0 +1,150 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef ESCAPE_OSTREAM_H_
    +#define ESCAPE_OSTREAM_H_
    +
    +#include <iostream>
    +#include <string>
    +#include <vector>
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +/*
    + * A faster stringstream than the standard library, probably because
    + * of no overhead w.r.t. localization
    + */
    +class WT_API SStream {
    +public:
    +  struct iterator {
    +    struct char_proxy {
    +      char_proxy& operator= (char c);
    +
    +    private:
    +      char_proxy(SStream& stream);
    +      SStream& stream_;
    +
    +      friend struct iterator;
    +    };
    +
    +    iterator();
    +
    +    char_proxy operator * ();
    +
    +    iterator& operator ++ ();
    +    iterator  operator ++ (int);
    +
    +  private:
    +    SStream *stream_;
    +    iterator(SStream& stream);
    +
    +    friend class SStream;
    +  };
    +
    +  SStream();
    +  SStream(std::ostream& sink);
    +  ~SStream();
    +
    +  void append(const char *s, int length);
    +
    +  SStream& operator<< (char);
    +  SStream& operator<< (const char *s);
    +  SStream& operator<< (const std::string& s);
    +  SStream& operator<< (int);
    +
    +  iterator back_inserter();
    +
    +  const char *c_str();
    +  std::string str() const;
    +
    +  bool empty() const;
    +  void clear();
    +
    +private:
    +  enum {S_LEN = 1024};
    +  enum {D_LEN = 2048};
    +
    +  std::ostream *sink_;
    +  char static_buf_[S_LEN + 1];
    +
    +  char *buf_;
    +  int buf_i_;
    +
    +  int buf_len() const { return buf_ == static_buf_
    +      ? static_cast<int>(S_LEN) : static_cast<int>(D_LEN); }
    +
    +  std::vector<std::pair<char *, int> > bufs_;
    +
    +  void flushSink();
    +  void pushBuf();
    +};
    +
    +class WT_API EscapeOStream
    +{
    +public:
    +  enum RuleSet { Empty = 0, HtmlAttribute = 1,
    +		 JsStringLiteralSQuote = 2, JsStringLiteralDQuote = 3, 
    +                 PlainText = 4, PlainTextNewLines = 5 };
    +
    +  EscapeOStream();
    +  EscapeOStream(std::ostream& sink);
    +  EscapeOStream(EscapeOStream& other);
    +
    +  void pushEscape(RuleSet rules);
    +  void popEscape();
    +
    +#ifdef WT_TARGET_JAVA
    +  EscapeOStream& push();
    +#endif // WT_TARGET_JAVA
    +
    +  void append(const std::string& s, const EscapeOStream& rules);
    +
    +  EscapeOStream& operator<< (char);
    +  EscapeOStream& operator<< (const char *s);
    +  EscapeOStream& operator<< (const std::string& s);
    +  EscapeOStream& operator<< (int);
    +  EscapeOStream& operator<< (const EscapeOStream& other);
    +
    +  const char *c_str(); // for default constructor, can return 0
    +  std::string str() const; // for default constructor
    +
    +  bool empty() const;
    +  void clear();
    +
    +private:
    +  SStream stream_;
    +
    +  struct Entry {
    +    char c;
    +    std::string s;
    +  };
    +  std::vector<Entry> mixed_;
    +  std::string special_;
    +  const char *c_special_;
    +
    +  void mixRules();
    +  void put(const char *s, const EscapeOStream& rules);
    +
    +  void sAppend(char c);
    +  void sAppend(const char *s, int length);
    +  void sAppend(const std::string& s);
    +
    +  std::vector<RuleSet> ruleSets_;
    +
    +  static const std::vector<Entry> standardSets_[6];
    +  static const std::string standardSetsSpecial_[6];
    +
    +  static const Entry htmlAttributeEntries_[3];
    +  static const Entry jsStringLiteralSQuoteEntries_[5];
    +  static const Entry jsStringLiteralDQuoteEntries_[5];
    +  static const Entry plainTextEntries_[3];
    +  static const Entry plainTextNewLinesEntries_[4];
    +};
    +
    +}
    +
    +#endif // ESCAPE_OSTREAM_H_
    diff --git a/wt-3.1.7a/src/web/FileServe.C b/wt-3.1.7a/src/web/FileServe.C
    new file mode 100644
    index 0000000..6f32ac7
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/FileServe.C
    @@ -0,0 +1,130 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <cassert>
    +#include <cstring>
    +#include <boost/lexical_cast.hpp>
    +
    +#include "FileServe.h"
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +FileServe::FileServe(const char *contents)
    +  : template_(contents),
    +    currentPos_(0)
    +{ }
    +
    +void FileServe::setCondition(const std::string& name, bool value)
    +{
    +  conditions_[name] = value;
    +}
    +
    +void FileServe::setVar(const std::string& name, const std::string& value)
    +{
    +  vars_[name] = value;
    +}
    +
    +void FileServe::setVar(const std::string& name, const char *value)
    +{
    +  vars_[name] = std::string(value);
    +}
    +
    +void FileServe::setVar(const std::string& name, bool value)
    +{
    +  setVar(name, value ? "true" : "false");
    +}
    +
    +void FileServe::setVar(const std::string& name, int value)
    +{
    +  setVar(name, boost::lexical_cast<std::string>(value));
    +}
    +
    +void FileServe::stream(std::ostream& out)
    +{
    +  streamUntil(out, std::string());
    +}
    +
    +void FileServe::streamUntil(std::ostream& out, const std::string& until)
    +{
    +  std::string currentVar;
    +  bool readingVar = false;
    +
    +  int start = currentPos_;
    +  int noMatchConditions = 0;
    +
    +  for (; template_[currentPos_]; ++currentPos_) {
    +    const char *s = template_ + currentPos_;
    +
    +    if (readingVar) {
    +      if (std::strncmp(s, "_$_", 3) == 0) {
    +	if (currentVar[0] == '$') {
    +	  std::size_t _pos = currentVar.find('_');
    +	  std::string fname = currentVar.substr(1, _pos - 1);
    +
    +	  currentPos_ += 2; // skip ()
    +
    +	  if (fname == "endif") {
    +	    if (noMatchConditions)
    +	      --noMatchConditions;
    +	  } else {
    +	    std::string farg = currentVar.substr(_pos + 1);
    +
    +	    std::map<std::string, bool>::const_iterator
    +	      i = conditions_.find(farg);
    +
    +	    if (i == conditions_.end())
    +	      throw WtException("Internal error: could not find condition: "
    +				+ farg);
    +	    bool c = i->second;
    +
    +	    if (fname == "if")
    +	      ;
    +	    else if (fname == "ifnot")
    +	      c = !c;
    +
    +	    if (!c || noMatchConditions)
    +	      ++noMatchConditions;
    +	  }
    +	} else {
    +	  if (currentVar == until) {
    +	    currentPos_ += 3;
    +	    return;
    +	  }
    +
    +	  std::map<std::string, std::string>::const_iterator i
    +	    = vars_.find(currentVar);
    +
    +	  if (i == vars_.end())
    +	    throw WtException("Internal error: could not find variable: "
    +			      + currentVar);
    +
    +	  if (!noMatchConditions)
    +	    out << i->second;
    +	}
    +
    +	readingVar = false;
    +	start = currentPos_ + 3;
    +	currentPos_ += 2;
    +      } else
    +	currentVar.push_back(*s);
    +    } else {
    +      if (std::strncmp(s, "_$_", 3) == 0) {
    +	if (!noMatchConditions && (currentPos_ - start > 0))
    +	  out.write(template_ + start, currentPos_ - start);
    +
    +	currentPos_ += 2;
    +	readingVar = true;
    +	currentVar.clear();
    +      }
    +    }
    +  }
    +
    +  if (!noMatchConditions && (currentPos_ - start > 0))
    +    out.write(template_ + start, currentPos_ - start);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/FileServe.h b/wt-3.1.7a/src/web/FileServe.h
    new file mode 100644
    index 0000000..68340bf
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/FileServe.h
    @@ -0,0 +1,52 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef FILE_SERVE_H_
    +#define FILE_SERVE_H_
    +
    +#include <string>
    +#include <iostream>
    +#include <map>
    +
    +namespace Wt {
    +
    +/*
    + * A simple template streaming class.
    + *
    + * It supports:
    + * - variables (_$_name_$_)
    + * - conditions:
    + *  _$_$if_condition_$_
    + *     ...
    + *  _$_$endif_$_
    + * and
    + *  _$_$ifnot_condition_$_;
    + *     ...
    + *  _$_$endif_$_;
    + */
    +class FileServe
    +{
    +public:
    +  FileServe(const char *contents);
    +
    +  void setVar(const std::string& name, const std::string& value);
    +  void setVar(const std::string& name, const char *value);
    +  void setVar(const std::string& name, bool value);
    +  void setVar(const std::string& name, int value);
    +  void setCondition(const std::string& name, bool value);
    +  void stream(std::ostream& out);
    +  void streamUntil(std::ostream& out, const std::string& until);
    +
    +private:
    +  const char *template_;
    +  int currentPos_;
    +  std::map<std::string, std::string> vars_;
    +  std::map<std::string, bool> conditions_;
    +};
    +
    +}
    +
    +#endif // FILE_SERVE_H_
    diff --git a/wt-3.1.7a/src/web/SocketNotifier.C b/wt-3.1.7a/src/web/SocketNotifier.C
    new file mode 100644
    index 0000000..ab65ebc
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/SocketNotifier.C
    @@ -0,0 +1,411 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "SocketNotifier.h"
    +#include "Configuration.h"
    +#include "WebController.h"
    +#include "Wt/WSocketNotifier"
    +#include <set>
    +
    +#if WIN32
    +#include <winsock2.h>
    +typedef int socklen_t;
    +#else
    +#include <sys/types.h>
    +#include <sys/socket.h>
    +#include <unistd.h>
    +#include <fcntl.h>
    +#include <arpa/inet.h>
    +#include <netinet/in.h>
    +#include <netinet/tcp.h>
    +#endif
    +
    +namespace Wt {
    +
    +
    +class SocketNotifierImpl
    +{
    +public:
    +  SocketNotifierImpl():
    +    terminate_(false),
    +    socket1_(-1),
    +    socket2_(-1),
    +    controller_(0),
    +    good_(false)
    +  {}
    +  boost::thread thread_;
    +  boost::mutex mutex_;
    +  boost::condition_variable interrupted_;
    +  bool terminate_;
    +
    +  int socket1_, socket2_;
    +  std::set<int> readFds_, writeFds_, exceptFds_;
    +
    +  WebController *controller_;
    +
    +  bool good_;
    +
    +  void reportError(const char *msg)
    +  {
    +    controller_->configuration().log("error")
    +      << "SocketNotifier: " << msg << ". Error code "
    +#ifdef WIN32
    +      << GetLastError();
    +#else
    +      << errno;
    +#endif
    +  }
    +};
    +
    +namespace {
    +  void Close(int s)
    +  {
    +#ifdef WIN32
    +    ::closesocket(s);
    +#else
    +    ::close(s);
    +#endif
    +  }
    +}
    +
    +SocketNotifier::SocketNotifier(WebController *controller):
    +  impl_(new SocketNotifierImpl)
    +{
    +  impl_->controller_ = controller;
    +  createSocketPair();
    +}
    +
    +SocketNotifier::~SocketNotifier()
    +{
    +  impl_->terminate_ = true;
    +  interruptThread();
    +  if (impl_->thread_.joinable())
    +    impl_->thread_.join();
    +  delete impl_;
    +}
    +
    +void SocketNotifier::createSocketPair()
    +{
    +  // create a socket
    +  int listenSocket = ::socket(PF_INET, SOCK_STREAM, 0);
    +  if (listenSocket < 0) {
    +    impl_->reportError("create listen socket failed");
    +    return;
    +  }
    +
    +  // set the nodelay option
    +  {
    +    int flag = 1;
    +    if (::setsockopt(listenSocket, IPPROTO_TCP, TCP_NODELAY,
    +          (char *)&flag, sizeof(int))) {
    +      // This is not fatal
    +      impl_->reportError("Configuring NODELAY failed");
    +    }
    +  }
    +
    +  unsigned long selfAddr = 0x7f000001; // 127.0.0.1, host order
    +  {
    +    struct sockaddr_in addr;
    +    addr.sin_family = AF_INET;
    +    addr.sin_port = 0;
    +    addr.sin_addr.s_addr = htonl(selfAddr);
    +    memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
    +    if (::bind(listenSocket, (struct sockaddr *)&addr, sizeof(addr))) {
    +      impl_->reportError("bind() listen socket failed");
    +      Close(listenSocket);
    +      return;
    +    }
    +  }
    +
    +  unsigned listenPort; // in host byte order
    +  {
    +    struct sockaddr_in addr;
    +    socklen_t addr_size = sizeof(addr);
    +    if (::getsockname(listenSocket, (struct sockaddr *)&addr, &addr_size)) {
    +      impl_->reportError("getsockname() listen socket failed");
    +      Close(listenSocket);
    +      return;
    +    } else {
    +      selfAddr = ntohl(addr.sin_addr.s_addr);
    +      listenPort = ntohs(addr.sin_port);
    +    }
    +  }
    +
    +  if (::listen(listenSocket, 5)) {
    +    impl_->reportError("listen() failed");
    +    Close(listenSocket);
    +    return;
    +  }
    +
    +  impl_->socket1_ = ::socket(PF_INET, SOCK_STREAM, 0);
    +  if (impl_->socket1_ < 0) {
    +    impl_->reportError("create socket1 failed");
    +    Close(listenSocket);
    +    return;
    +  }
    +
    +  // set the nodelay option
    +  {
    +    int flag = 1;
    +    if (::setsockopt(impl_->socket1_, IPPROTO_TCP, TCP_NODELAY,
    +          (char *)&flag, sizeof(int))) {
    +      impl_->reportError("NODELAY socket1 failed");
    +      // Not fatal
    +    }
    +  }
    +
    +  {
    +    struct sockaddr_in addr;
    +    addr.sin_family = AF_INET;
    +    addr.sin_port = htons(listenPort);
    +    addr.sin_addr.s_addr = htonl(selfAddr);
    +    memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
    +
    +    if (::connect(impl_->socket1_, (struct sockaddr *)&addr, sizeof(addr))) {
    +      impl_->reportError("connect socket1 failed");
    +      Close(listenSocket);
    +      Close(impl_->socket1_);
    +      return;
    +    }
    +  }
    +
    +  unsigned connectPort;
    +  {
    +    struct sockaddr_in addr;
    +    socklen_t addr_size = sizeof(addr);
    +    if (::getsockname(impl_->socket1_, (struct sockaddr *)&addr, &addr_size)) {
    +      impl_->reportError("getsockname socket1 failed");
    +      Close(listenSocket);
    +      Close(impl_->socket1_);
    +      return;
    +    } else {
    +      selfAddr = ntohl(addr.sin_addr.s_addr);
    +      connectPort = ntohs(addr.sin_port);
    +    }
    +  }
    +
    +  unsigned long peerAddr;
    +  unsigned peerPort;
    +  {
    +    struct sockaddr_in addr;
    +    socklen_t addr_size = sizeof addr;
    +    impl_->socket2_ =
    +      ::accept(listenSocket, (struct sockaddr *)&addr, &addr_size);
    +    if (impl_->socket2_ >= 0) {
    +      peerAddr = ntohl(addr.sin_addr.s_addr);
    +      peerPort = ntohs(addr.sin_port);
    +    } else {
    +      impl_->reportError("accept failed");
    +      Close(listenSocket);
    +      Close(impl_->socket1_);
    +      return;
    +    }
    +  }
    +  
    +  if (peerPort != connectPort) {
    +    // A hacker has hijacked our secret port!!
    +    impl_->reportError("socketpair: Accept from unexpected port");
    +    Close(listenSocket);
    +    Close(impl_->socket1_);
    +    Close(impl_->socket2_);
    +    return;
    +  }
    +
    +  Close(listenSocket);
    +
    +  // Set both sockets to non-blockin so that they won't be the cause
    +  // of deadlocks
    +#ifndef WIN32
    +  {
    +    int flags = ::fcntl(impl_->socket1_, F_GETFL, 0);
    +    flags |= O_NONBLOCK;
    +    ::fcntl(impl_->socket1_, F_SETFL, flags);
    +  }
    +  {
    +    int flags = ::fcntl(impl_->socket2_, F_GETFL, 0);
    +    flags |= O_NONBLOCK;
    +    ::fcntl(impl_->socket2_, F_SETFL, flags);
    +  }
    +#else
    +  {
    +    u_long enabled = 1;
    +    ::ioctlsocket(impl_->socket1_, FIONBIO, &enabled);
    +    ::ioctlsocket(impl_->socket2_, FIONBIO, &enabled);
    +  }
    +#endif
    +  impl_->good_ = true;
    +}
    +
    +void SocketNotifier::startThread()
    +{
    +  impl_->thread_ = boost::thread(&SocketNotifier::threadEntry, this).move();
    +}
    +
    +void SocketNotifier::interruptThread()
    +{
    +  if (!impl_->good_)
    +    return;
    +  if (impl_->thread_.joinable()) {
    +    char data = 0;
    +    sendto(impl_->socket1_, &data, 1, 0, 0, 0);
    +  } else {
    +    if (!impl_->terminate_) {
    +      // Just start the thread - there's no need for signaling
    +      startThread();
    +    }
    +  }
    +}
    +
    +void SocketNotifier::threadEntry()
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  while (!impl_->terminate_) {
    +    int maxFd = 0;
    +    fd_set read_fds, write_fds, except_fds;
    +
    +    FD_ZERO(&read_fds);
    +    FD_ZERO(&write_fds);
    +    FD_ZERO(&except_fds);
    +
    +    std::set<int> read_in = impl_->readFds_;
    +    std::set<int> write_in = impl_->writeFds_;
    +    std::set<int> except_in = impl_->exceptFds_;
    +
    +    FD_SET(impl_->socket2_, &read_fds);
    +    maxFd = (std::max)(maxFd, impl_->socket2_);
    +
    +    for (std::set<int>::const_iterator i = impl_->readFds_.begin();
    +         i != impl_->readFds_.end(); ++i) {
    +      FD_SET(*i, &read_fds);
    +      maxFd = (std::max)(maxFd, *i);
    +    }
    +
    +    for (std::set<int>::const_iterator i = impl_->writeFds_.begin();
    +         i != impl_->writeFds_.end(); ++i) {
    +      FD_SET(*i, &write_fds);
    +      maxFd = (std::max)(maxFd, *i);
    +    }
    +
    +    for (std::set<int>::const_iterator i = impl_->exceptFds_.begin();
    +         i != impl_->exceptFds_.end(); ++i) {
    +      FD_SET(*i, &except_fds);
    +      maxFd = (std::max)(maxFd, *i);
    +    }
    +
    +    lock.unlock();
    +    int result = ::select(maxFd + 1, &read_fds, &write_fds, &except_fds, 0);
    +    lock.lock();
    +    if (result > 0) {
    +      if (FD_ISSET(impl_->socket2_, &read_fds)) {
    +        // interruption of select() was requested. Read all data from
    +        // the interruption connection. Normally contains a single byte,
    +        // unless we were interrupted a couple of times already.
    +        char buf[128];
    +        ::recvfrom(impl_->socket2_, buf, sizeof(buf), 0, 0, 0);
    +        // Shortcut
    +        if (impl_->terminate_)
    +          return;
    +      }
    +
    +      // Callbacks to invoke
    +      std::vector<std::pair<int, WSocketNotifier::Type> > callbacks;
    +
    +      // The WebController will re-enable listening after processing the event
    +      for (std::set<int>::iterator i = read_in.begin();
    +           i != read_in.end(); ++i) {
    +        if (FD_ISSET(*i, &read_fds)) {
    +          if (impl_->readFds_.find(*i) != impl_->readFds_.end()) {
    +            impl_->readFds_.erase(*i);
    +            callbacks.push_back(std::make_pair((int)*i, WSocketNotifier::Read));
    +          }
    +        }
    +      }
    +
    +      for (std::set<int>::iterator i = write_in.begin();
    +           i != write_in.end(); ++i) {
    +        if (FD_ISSET(*i, &write_fds)) {
    +          if (impl_->writeFds_.find(*i) != impl_->writeFds_.end()) {
    +            impl_->writeFds_.erase(*i);
    +            callbacks.push_back(std::make_pair((int)*i, WSocketNotifier::Write));
    +          }
    +        }
    +      }
    +
    +      for (std::set<int>::iterator i = except_in.begin();
    +           i != except_in.end(); ++i) {
    +        if (FD_ISSET(*i, &except_fds)) {
    +          if (impl_->exceptFds_.find(*i) != impl_->exceptFds_.end()) {
    +            impl_->exceptFds_.erase(*i);
    +            callbacks.push_back(std::make_pair((int)*i,
    +                                WSocketNotifier::Exception));
    +          }
    +        }
    +      }
    +      impl_->interrupted_.notify_all();
    +      lock.unlock();
    +      // Invoke callbacks
    +      for (unsigned int i = 0; i < callbacks.size(); ++i) {
    +        impl_->controller_->socketSelected(callbacks[i].first,
    +                                           callbacks[i].second);
    +      }
    +      lock.lock();
    +    } else {
    +      // TODO: log
    +      impl_->controller_->configuration().log("error")
    +        << "SocketNotifier: select returned -1";
    +    }
    +  }
    +}
    +
    +void SocketNotifier::addReadSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->readFds_.insert(socket);
    +  interruptThread();
    +}
    +
    +void SocketNotifier::addWriteSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->writeFds_.insert(socket);
    +  interruptThread();
    +}
    +
    +void SocketNotifier::addExceptSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->exceptFds_.insert(socket);
    +  interruptThread();
    +}
    +
    +void SocketNotifier::removeReadSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->readFds_.erase(socket);
    +  interruptThread();
    +  // In order to avoid late event invocation (especially on socket id's
    +  // that were recycled by the OS), we must wait until the socket was
    +  // really removed from the 
    +  impl_->interrupted_.wait(lock);
    +}
    +
    +void SocketNotifier::removeWriteSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->readFds_.erase(socket);
    +  interruptThread();
    +  impl_->interrupted_.wait(lock);
    +}
    +
    +void SocketNotifier::removeExceptSocket(int socket)
    +{
    +  boost::mutex::scoped_lock lock(impl_->mutex_);
    +  impl_->readFds_.erase(socket);
    +  interruptThread();
    +  impl_->interrupted_.wait(lock);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/SocketNotifier.h b/wt-3.1.7a/src/web/SocketNotifier.h
    new file mode 100644
    index 0000000..b4403db
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/SocketNotifier.h
    @@ -0,0 +1,45 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Leuven, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef SOCKETNOTIFIER_H_
    +#define SOCKETNOTIFIER_H_
    +
    +namespace Wt {
    +class WebController;
    +class SocketNotifierImpl;
    +
    +/*
    + * Class that monitors sockets using select().
    + * This class invokes controller->socketSelected() when select
    + * returns with activity on the socket. When this callback is
    + * invoked, the socket is no longer monitored by this class
    + * and it must be re-added explicitly to be monitored again.
    + */
    +class SocketNotifier
    +{
    +public:
    +  SocketNotifier(WebController *controller);
    +  ~SocketNotifier();
    +
    +  void addReadSocket(int socket);
    +  void addWriteSocket(int socket);
    +  void addExceptSocket(int socket);
    +  void removeReadSocket(int socket);
    +  void removeWriteSocket(int socket);
    +  void removeExceptSocket(int socket);
    +
    +private:
    +  void startThread();
    +  void interruptThread();
    +  void threadEntry();
    +  void createSocketPair();
    +
    +  SocketNotifierImpl *impl_;
    +};
    +
    +}
    +
    +#endif // SOCKETNOTIFIER_H_
    diff --git a/wt-3.1.7a/src/web/SoundManager.C b/wt-3.1.7a/src/web/SoundManager.C
    new file mode 100644
    index 0000000..ece7f8f
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/SoundManager.C
    @@ -0,0 +1,146 @@
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "SoundManager.h"
    +#include "Wt/WSound"
    +#include "Wt/WApplication"
    +#include "Wt/WFlashObject"
    +
    +namespace Wt {
    +
    +SoundManager::SoundManager(WApplication *app)
    +  : WObject(app),
    +    wApp_(app)
    +{
    +  WFlashObject *player_
    +    = new WFlashObject(WApplication::resourcesUrl() + "WtSoundManager.swf",
    +		       wApp_->domRoot());
    +  player_->setAlternativeContent(0);
    +
    +  player_->resize(100, 100);
    +  player_->setPositionScheme(Wt::Absolute);
    +  player_->setOffsets(-900, Wt::Left | Wt::Top);
    +  player_->setFlashParameter("allowScriptAccess", "always");
    +  player_->setFlashParameter("quality", "high");
    +  player_->setFlashParameter("bgcolor", "#aaaaaa");
    +  player_->setFlashParameter("wmode", "");
    +
    +  wApp_->doJavaScript(
    +    """WtSoundManager = {};"
    +    """WtSoundManager.initialized = false;"
    +    """WtSoundManager.queue = new Array();"
    +    """WtSoundManager.player = null;"
    +    """WtSoundManager.flashInitializedCB = function() {"
    +    ""  "WtSoundManager.initialized = true;"
    +    ""  "WtSoundManager.player = " + player_->jsFlashRef() + ";"
    +    ""  "var i, il;"
    +    ""  "for (i = 0, il = WtSoundManager.queue.length; i < il; i++) {"
    +    ""    "var action = WtSoundManager.queue[i].action;"
    +    ""    "if (action == 'add') {"
    +    ""      "WtSoundManager.add(WtSoundManager.queue[i].id, "
    +    ""                       "WtSoundManager.queue[i].url);"
    +    ""    "} else if (action == 'remove') {"
    +    ""      "WtSoundManager.remove(WtSoundManager.queue[i].id);"
    +    ""    "} else if (action == 'play') {"
    +    ""      "WtSoundManager.doPlay(WtSoundManager.queue[i].id, "
    +    ""                          "WtSoundManager.queue[i].loops);"
    +    ""    "} else if (action == 'stop') {"
    +    ""      "WtSoundManager.doStop(WtSoundManager.queue[i].id);"
    +    ""    "} else {"
    +    ""      "alert('WWtSoundManager internal error: action not found: ' "
    +    ""            "+ action);"
    +    ""    "}"
    +    ""  "}"
    +    """};"
    +    """WtSoundManager.onerror = function() {"
    +    ""  "alert('WtSoundManager failed to start');"
    +    """};"
    +    """WtSoundManager.add = function(id, url) {"
    +    ""  "if(WtSoundManager.initialized) {"
    +    ""    "try {"
    +    ""      "WtSoundManager.player.WtAdd(id, url);"
    +    ""    "} catch (e) {}"
    +    ""  "} else {"
    +    ""    "WtSoundManager.queue.push({action: 'add', id: id, url: url});"
    +    ""  "}"
    +    """};"
    +    """WtSoundManager.remove = function(id) {"
    +    ""  "if (WtSoundManager.initialized) {"
    +    ""    "try {"
    +    ""      "WtSoundManager.player.WtRemove(id);"
    +    ""    "} catch (e) {}"
    +    ""  "} else {"
    +    ""    "WtSoundManager.queue.push({action: 'remove', id: id});"
    +    ""  "}"
    +    """};\n"
    +    """WtSoundManager.doPlay = function(id, loops) {\n"
    +    ""  "if (WtSoundManager.initialized) {\n"
    +    ""    "try {"
    +    ""      "WtSoundManager.player.WtPlay(id, loops);\n"
    +    ""    "} catch (e) {}"
    +    ""  "} else {\n"
    +    ""    "WtSoundManager.queue.push({action: 'play', id: id, loops: loops});\n"
    +    ""  "}\n"
    +    """};\n"
    +    """WtSoundManager.doStop = function(id) {"
    +    ""  "if (WtSoundManager.initialized) {"
    +    ""    "try {"
    +    ""      "WtSoundManager.player.WtStop(id);"
    +    ""    "} catch (e) {}"
    +    ""  "} else {"
    +    ""    "WtSoundManager.queue.push({action: 'stop', id: id});"
    +    ""  "}"
    +    """};",
    +    false
    +  );
    +
    +}
    +
    +SoundManager::~SoundManager()
    +{
    +}
    +
    +void SoundManager::add(WSound *sound)
    +{
    +  std::stringstream ss;
    +  ss << "WtSoundManager.add(\"" << sound->id() << "\", \""
    +    << sound->url() << "\");";
    +  wApp_->doJavaScript(ss.str());
    +}
    +
    +void SoundManager::remove(WSound *sound)
    +{
    +  std::stringstream ss;
    +  ss << "WtSoundManager.remove(\"" << sound->id() << "\", \""
    +    << sound->url() << "\");";
    +  wApp_->doJavaScript(ss.str());
    +}
    +
    +void SoundManager::play(WSound *sound, int loops)
    +{
    +  std::stringstream ss;
    +  ss << "WtSoundManager.doPlay(\"" << sound->id() << "\", "
    +    << sound->loops() << ");";
    +  wApp_->doJavaScript(ss.str());
    +}
    +
    +void SoundManager::stop(WSound *sound)
    +{
    +  std::stringstream ss;
    +  ss << "WtSoundManager.doStop(\"" << sound->id() << "\");";
    +  wApp_->doJavaScript(ss.str());
    +}
    +
    +bool SoundManager::isFinished(WSound *sound) const
    +{
    +  return true; // FIXME!
    +}
    +
    +int SoundManager::loopsRemaining(WSound *sound) const
    +{
    +  return 0; // FIXME!
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/SoundManager.h b/wt-3.1.7a/src/web/SoundManager.h
    new file mode 100644
    index 0000000..e1a98e3
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/SoundManager.h
    @@ -0,0 +1,40 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef SOUNDMANAGER_H_
    +#define SOUNDMANAGER_H_
    +
    +#include <Wt/WObject>
    +
    +namespace Wt {
    +
    +class WApplication;
    +class WSound;
    +
    +class SoundManager : public WObject
    +{
    +public:
    +  SoundManager(WApplication *app);
    +  ~SoundManager();
    +
    +  void add(WSound *sound);
    +  void remove(WSound *sound);
    +
    +  void play(WSound *sound, int loops);
    +  void stop(WSound *sound);
    +
    +  bool isFinished(WSound *sound) const;
    +
    +  int loopsRemaining(WSound *sound) const;
    +
    +private:
    +  WApplication *wApp_;
    +};
    +
    +}
    +
    +#endif // SOUNDMANAGER_H_
    +
    diff --git a/wt-3.1.7a/src/web/TimeUtil.C b/wt-3.1.7a/src/web/TimeUtil.C
    new file mode 100644
    index 0000000..fbada4a
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/TimeUtil.C
    @@ -0,0 +1,81 @@
    +#include "TimeUtil.h"
    +
    +#ifdef _MSC_VER
    +#include "Winsock2.h"
    +#pragma comment (lib, "winmm.lib")
    +namespace {
    +#include <windows.h>
    +  int gettimeofday(struct timeval* tp, void* tzp)
    +  {
    +    DWORD t;
    +    t = timeGetTime();
    +    tp->tv_sec = t / 1000;
    +    tp->tv_usec = t % 1000;
    +    return 0;
    +  }
    +// Next line is to make std::max operational again after loading windows.h
    +#undef max
    +}
    +#else
    +#include <sys/time.h>
    +#include <string.h>
    +#endif
    +
    +namespace Wt {
    +
    +Time::Time()
    +{
    +  t_ = new timeval;
    +  gettimeofday(t_, 0);
    +}
    +
    +Time::Time(const Time &other)
    +{
    +   t_ = new timeval;
    +   memcpy(t_, other.t_, sizeof(timeval));
    +}
    +
    +Time::~Time()
    +{
    +  delete t_;
    +  t_ = 0;
    +}
    +
    +Time& Time::operator+= (int msec)
    +{
    +  t_->tv_sec += (msec / 1000);
    +  msec %= 1000;
    +  t_->tv_usec += (msec * 1000);
    +  t_->tv_sec += (t_->tv_usec / 1000000);
    +  t_->tv_usec %= 1000000;
    +  return *this;
    +}
    +
    +Time& Time::operator= (const Time &other)
    +{
    +  if(&other != this) {
    +    memcpy(t_, other.t_, sizeof(timeval));
    +  }
    +  return *this;
    +}
    +
    +Time Time::operator+ (int msec) const
    +{
    +  Time result(*this);
    +  result += msec;
    +  return result;
    +}
    +
    +int Time::operator- (const Time& other) const
    +{
    +  int diffsec = t_->tv_sec - other.t_->tv_sec;
    +  int diffmsec = (t_->tv_usec - other.t_->tv_usec) / 1000;
    +  if (diffmsec < 0) {
    +    diffsec -= 1;
    +    diffmsec += 1000;
    +  }
    +
    +  return diffsec * 1000 + diffmsec;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/TimeUtil.h b/wt-3.1.7a/src/web/TimeUtil.h
    new file mode 100644
    index 0000000..ddbbb47
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/TimeUtil.h
    @@ -0,0 +1,36 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef TIMEUTIL_H_
    +#define TIMEUTIL_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +struct timeval;
    +
    +namespace Wt {
    +
    +class WT_API Time
    +{
    +public:
    +  Time(); // now
    +  ~Time(); // now
    +  Time(const Time &other);
    +
    +  Time operator+ (int msec) const;
    +  Time& operator+= (int msec);
    +  Time& operator= (const Time &other);
    +
    +  int operator- (const Time& other) const;
    +
    +private:
    +  // Pointer to avoid inclusion of windows header files in wt
    +  struct timeval *t_;
    +};
    +
    +}
    +
    +#endif // TIMEUTIL_H_
    diff --git a/wt-3.1.7a/src/web/Utils.C b/wt-3.1.7a/src/web/Utils.C
    new file mode 100644
    index 0000000..b59c60a
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/Utils.C
    @@ -0,0 +1,224 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "Utils.h"
    +#include "DomElement.h"
    +#include "rapidxml/rapidxml.hpp"
    +#include "Wt/WString"
    +
    +#include <boost/algorithm/string.hpp>
    +
    +#include <cstdlib>
    +#include <sstream>
    +
    +#ifdef WIN32
    +#include <windows.h>
    +#else
    +#include <stdlib.h>
    +#endif // WIN32
    +
    +namespace Wt {
    +
    +  namespace Utils {
    +
    +extern std::string createTempFileName()
    +{
    +#ifdef WIN32
    +  char tmpDir[MAX_PATH];
    +  char tmpName[MAX_PATH];
    +
    +  if(GetTempPathA(sizeof(tmpDir), tmpDir) == 0
    +      || GetTempFileNameA(tmpDir, "wt-", 0, tmpName) == 0)
    +  {
    +    return "";
    +  }
    +
    +  return tmpName;
    +
    +#else
    +  char spool[20];
    +  strcpy(spool, "/tmp/wtXXXXXX");
    +
    +  int i = mkstemp(spool);
    +  close(i);
    +
    +  return spool;
    +#endif
    +}
    +
    +std::string terminate(const std::string& s, char c)
    +{
    +  if (s.empty() || s[s.length() - 1] != c)
    +    return s + c;
    +  else
    +    return s;
    +}
    +
    +std::string& replace(std::string& s, char c, const std::string& r)
    +{
    +  std::string::size_type p = 0;
    +
    +  while ((p = s.find(c, p)) != std::string::npos) {
    +    s.replace(p, 1, r);
    +    p += r.length();
    +  }
    +
    +  return s;
    +}
    +
    +std::string& replace(std::string& s, const std::string& k, const std::string& r)
    +{
    +  std::string::size_type p = 0;
    +
    +  while ((p = s.find(k, p)) != std::string::npos) {
    +    s.replace(p, k.length(), r);
    +    p += r.length();
    +  }
    +
    +  return s;
    +}
    +
    +void sanitizeUnicode(EscapeOStream& sout, const std::string& text)
    +{
    +  char buf[4];
    +
    +  for (const char *c = text.c_str(); *c;) {
    +    char *b = buf;
    +    // but copy_check_utf8() does not declare the following ranges illegal:
    +    //  U+D800-U+DFFF
    +    //  U+FFFE-U+FFFF
    +    rapidxml::xml_document<>::copy_check_utf8(c, b);
    +    for (char *i = buf; i < b; ++i)
    +      sout << *i;
    +  }
    +}
    +
    +std::string eraseWord(const std::string& s, const std::string& w)
    +{
    +  std::string ss = s;
    +  std::string::size_type p;
    +
    +  if ((p = ss.find(w)) != std::string::npos) {
    +    ss.erase(ss.begin() + p, ss.begin() + p + w.length());
    +    if (p > 1) {
    +      if (ss[p-1] == ' ')
    +	ss.erase(ss.begin() + (p - 1));
    +    } else
    +      if (p < ss.length() && ss[p] == ' ')
    +	ss.erase(ss.begin() + p);
    +  }
    +
    +  return ss;
    +}
    +
    +std::string addWord(const std::string& s, const std::string& w)
    +{
    +  if (s.empty())
    +    return w;
    +  else
    +    return s + ' ' + w;
    +}
    +
    +char *itoa(int value, char *result, int base) {
    +  char* out = result;
    +  int quotient = value;
    +
    +  do {
    +    *out = "0123456789abcdef"[ std::abs( quotient % base ) ];
    +    ++out;
    +    quotient /= base;
    +  } while (quotient);
    +
    +  if (value < 0 && base == 10) *out++ = '-';
    +  std::reverse(result, out);
    +  *out = 0;
    +  return result;
    +}
    +
    +char *pad_itoa(int value, int length, char *result) {
    +  static const int exp[] = { 1, 10, 100, 1000, 10000, 100000, 100000 };
    +
    +  result[length] = 0;
    +
    +  for (int i = 0; i < length; ++i) {
    +    int b = exp[length - i - 1];
    +    if (value >= b)
    +      result[i] = '0' + (value / b) % 10;
    +    else
    +      result[i] = '0';
    +  }
    +
    +  return result;
    +}
    +
    +char *round_str(double d, int digits, char *buf) {
    +  static const int exp[] = { 1, 10, 100, 1000, 10000, 100000, 1000000 };
    +
    +  int i = static_cast<int>(d * exp[digits] + (d > 0 ? 0.49 : -0.49));
    +  itoa(i, buf);
    +  char *num = buf;
    +
    +  if (num[0] == '-')
    +    ++num;
    +  int len = std::strlen(num);
    +
    +  if (len <= digits) {
    +    int shift = digits + 1 - len;
    +    for (int i = digits + 1; i >= 0; --i) {
    +      if (i >= shift)
    +	num[i] = num[i - shift];
    +      else
    +	num[i] = '0';
    +    }
    +    len = digits + 1;
    +  }
    +  int dotPos = (std::max)(len - digits, 0);
    +  for (int i = digits + 1; i >= 0; --i)
    +    num[dotPos + i + 1] = num[dotPos + i];
    +  num[dotPos] = '.';
    +
    +  return buf;
    +}
    +
    +void unescapeHexTokens(std::string& v)
    +{
    +  for (unsigned i = 0; i < (unsigned)(std::max)(0, (int)v.length() - 2); ++i) {
    +    if (v[i] == '%') {
    +      std::string h = v.substr(i + 1, 2);
    +      char *e = 0;
    +      int hval = std::strtol(h.c_str(), &e, 16);
    +
    +      if (*e != 0)
    +        continue; // not a proper %XX with XX hexadecimal format
    +
    +      v.replace(i, 3, 1, (char)hval);
    +    }
    +  }
    +}
    +
    +void urlDecode(std::string &s)
    +{
    +  replace(s, '+', " ");
    +  unescapeHexTokens(s);
    +}
    +
    +std::string urlEncode(const std::string& url)
    +{
    +  return DomElement::urlEncodeS(url);
    +}
    +
    +void split(std::set<std::string>& tokens,
    +	   const std::string &in, const char *sep,
    +	   bool compress_adjacent_tokens)
    +{
    +    boost::split(tokens, in, boost::is_any_of(sep),
    +		 compress_adjacent_tokens?
    +		 boost::algorithm::token_compress_on:
    +		 boost::algorithm::token_compress_off);
    +}
    +
    +  }
    +}
    diff --git a/wt-3.1.7a/src/web/Utils.h b/wt-3.1.7a/src/web/Utils.h
    new file mode 100644
    index 0000000..105133e
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/Utils.h
    @@ -0,0 +1,247 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef UTILS_H_
    +#define UTILS_H_
    +
    +#include <algorithm>
    +#include <cstring>
    +#include <map>
    +#include <set>
    +#include <string>
    +#include <sstream>
    +#include <vector>
    +
    +#include <Wt/WDllDefs.h>
    +
    +#ifdef _MSC_VER
    +#include <float.h>
    +#endif
    +
    +namespace Wt {
    +
    +  class WString;
    +  class EscapeOStream;
    +
    +  namespace Utils {
    +
    +// Returns a filename that can be used as temporary file
    +extern WT_API std::string createTempFileName();
    +
    +// appends the character to the string if it does not end with it
    +extern std::string terminate(const std::string& s, char c);
    +
    +// in-place replace functions
    +extern std::string& replace(std::string& s, char c, const std::string& r);
    +extern std::string& replace(std::string& s, const std::string& c,
    +			    const std::string& r);
    +
    +// sanitize unicode 
    +extern void sanitizeUnicode(EscapeOStream& sout, const std::string& text);
    +
    +// word manipulation (for style class editing)
    +extern std::string eraseWord(const std::string& s, const std::string& w);
    +extern std::string addWord(const std::string& s, const std::string& w);
    +
    +// Fast integer to string in given buffer
    +extern char *itoa(int value, char *result, int base = 10);
    +
    +// Fast integer to string in given buffer, zero padded to length
    +extern char *pad_itoa(int value, int length, char *result);
    +
    +// Fast (unsafe) comparison of first n characters
    +inline bool startsWith(const char *a, const char *b, int n) {
    +  return std::memcmp(a, b, n) == 0;
    +}
    +
    +inline int length(const std::stringstream& s) {
    +#ifndef WT_CNOR
    +  return (int)s.rdbuf()->in_avail();
    +#else
    +  return 0;
    +#endif
    +}
    +
    +// Finds an element in a vector. Returns the first reference to the
    +// element, or -1 if the element is not found.
    +template<typename T>
    +inline int indexOf(const std::vector<T>& v, const T& value)
    +{
    +  typename std::vector<T>::const_iterator i
    +    = std::find(v.begin(), v.end(), value);
    +
    +  if (i == v.end())
    +    return -1;
    +  else
    +    return static_cast<int>(i - v.begin());
    +}
    +
    +template<typename T>
    +inline bool erase(std::vector<T>& v, const T& value)
    +{
    +  typename std::vector<T>::iterator i = std::find(v.begin(), v.end(), value);
    +
    +  if (i != v.end()) {
    +    v.erase(i);
    +    return true;
    +  } else
    +    return false;
    +}
    +
    +template<typename K, typename V>
    +void eraseAndNext(std::map<K, V>& m, typename std::map<K, V>::iterator& i)
    +{
    +#ifndef WT_TARGET_JAVA
    +  m.erase(i++);
    +#endif // WT_TARGET_JAVA
    +}
    +
    +template<typename T>
    +inline void insert(std::vector<T>& result, const std::vector<T>& elements)
    +{
    +#ifndef WT_CNOR
    +  result.insert(result.end(), elements.begin(), elements.end());
    +#endif // WT_CNOR
    +}
    +
    +template<typename T>
    +inline void sort(std::vector<T>& result)
    +{
    +  std::sort(result.begin(), result.end());
    +}
    +
    +template<typename T, typename Compare>
    +inline void sort(std::vector<T>& result, const Compare& compare)
    +{
    +  std::sort(result.begin(), result.end(), compare);
    +}
    +
    +template<typename T>
    +inline void stable_sort(std::vector<T>& result)
    +{
    +  std::stable_sort(result.begin(), result.end());
    +}
    +
    +template<typename T, typename Compare>
    +inline void stable_sort(std::vector<T>& result, const Compare& compare)
    +{
    +  std::stable_sort(result.begin(), result.end(), compare);
    +}
    +
    +template <typename T, typename Compare>
    +inline unsigned insertion_point(const std::vector<T>& v, const T& item,
    +				Compare compare)
    +{
    +  return static_cast<unsigned>(
    +    std::lower_bound(v.begin(), v.end(), item, compare) - v.begin());
    +}
    +
    +template <typename T>
    +inline unsigned lower_bound(const std::vector<T>& v, const T& item)
    +{
    +  return static_cast<unsigned>(
    +    std::lower_bound(v.begin(), v.end(), item) - v.begin());
    +}
    +
    +template <typename T>
    +inline unsigned upper_bound(const std::vector<T>& v, const T& item)
    +{
    +  return static_cast<unsigned>(
    +    std::upper_bound(v.begin(), v.end(), item) - v.begin());
    +}
    +
    +template <typename K, typename V, typename T>
    +inline V& access(std::map<K, V>& m, const T& key)
    +{
    +  return m[key];
    +}
    +
    +template <typename K, typename V>
    +inline void insert(std::map<K, V>& m, const K& key, const V& value)
    +{
    +#ifndef WT_TARGET_JAVA
    +  m.insert(std::make_pair(key, value));
    +#endif // WT_TARGET_JAVA
    +}
    +
    +template <typename T>
    +inline const T& first(const std::set<T>& s)
    +{
    +  return *s.begin();
    +}
    +
    +template <typename T>
    +inline const T& last(const std::set<T>& s)
    +{
    +  return *s.rbegin();
    +}
    +
    +// Fast round and format to string routine
    +extern char *round_str(double d, int digits, char *buf);
    +
    +// Only for Java target
    +extern std::string toHexString(int i);
    +
    +// Splits a string in a set of strings, on every given token
    +extern void split(std::set<std::string>& tokens,
    +		  const std::string &in, const char *sep,
    +		  bool compress_adjacent_tokens);
    +
    +// Replace all occurences of the 'from' char to the 'to' char in 'v'
    +extern void replaceAll(std::string& v, char from, char to);
    +
    +extern void unescapeHexTokens(std::string& v);
    +
    +extern void urlDecode(std::string &s);
    +
    +extern std::string urlEncode(const std::string& url);
    +
    +inline bool isNaN(double d) {
    +#ifdef _MSC_VER
    +  // received bug reports that on 64 bit windows, MSVC2005
    +  // generates wrong code for d != d.
    +  return _isnan(d) != 0;
    +#else
    +  return !(d == d);  
    +#endif
    +}
    +
    +/*
    + * These are workarounds for typ mismatches between Java and C++ port:
    + * in C++ vector<string>, in Java string[]
    + */
    +template<typename T> inline bool isEmpty(const T& vector) {
    +#ifndef WT_TARGET_JAVA
    +  return vector.empty();
    +#else
    +  return false;
    +#endif // WT_TARGET_JAVA
    +}
    +
    +template<typename T> inline int size(const T& vector) {
    +#ifndef WT_TARGET_JAVA
    +  return vector.size();
    +#else
    +  return 0;
    +#endif // WT_TARGET_JAVA
    +}
    +
    +template<typename Map, typename K, typename V> 
    +inline void find(const Map& map, const K& key, V& result)
    +{
    +  #ifndef WT_TARGET_JAVA
    +  std::pair<typename Map::const_iterator, typename Map::const_iterator> range 
    +    = map.equal_range(key);
    +  
    +  for (typename Map::const_iterator i = range.first; i != range.second; ++i)
    +    result.push_back(i->second);
    +  #endif
    +}
    +
    +  }
    +}
    +
    +#endif // UTILS_H_
    diff --git a/wt-3.1.7a/src/web/WebController.C b/wt-3.1.7a/src/web/WebController.C
    new file mode 100644
    index 0000000..e07a489
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebController.C
    @@ -0,0 +1,719 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <fstream>
    +#include <sstream>
    +
    +#ifdef WT_HAVE_GNU_REGEX
    +#include <regex.h>
    +#else
    +#include <boost/regex.hpp>
    +#endif // WT_HAVE_GNU_REGEX
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/algorithm/string.hpp>
    +
    +#ifdef WT_THREADED
    +#include <boost/bind.hpp>
    +#endif // WT_THREADED
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEvent"
    +#include "Wt/WResource"
    +#include "Wt/WServer"
    +#include "Wt/WSocketNotifier"
    +#include "Wt/WStringUtil"
    +
    +#include "Configuration.h"
    +#include "CgiParser.h"
    +#include "WebController.h"
    +#include "WebRequest.h"
    +#include "WebSession.h"
    +#include "WebStream.h"
    +#include "WtException.h"
    +#include "TimeUtil.h"
    +#include "Utils.h"
    +
    +#ifdef HAVE_RASTER_IMAGE
    +#include <magick/api.h>
    +#endif
    +
    +namespace Wt {
    +
    +WebController::WebController(Configuration& configuration,
    +			     WAbstractServer *server, WebStream *stream,
    +			     std::string singleSessionId)
    +  : server_(server),
    +    conf_(configuration),
    +    stream_(stream),
    +    singleSessionId_(singleSessionId),
    +    running_(false),
    +    shutdown_(false)
    +#ifdef WT_THREADED
    +  , socketNotifier_(this),
    +    threadPool_(conf_.serverType() == Configuration::WtHttpdServer
    +		? 0 : conf_.numThreads())
    +#endif // WT_THREADED
    +{
    +  CgiParser::init();
    +
    +#ifdef HAVE_RASTER_IMAGE
    +  InitializeMagick(0);
    +#endif
    +}
    +
    +WebController::~WebController()
    +{
    +#ifdef HAVE_RASTER_IMAGE
    +  DestroyMagick();
    +#endif
    +}
    +
    +void WebController::forceShutdown()
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  conf_.log("notice") << "Shutdown: stopping sessions.";
    +
    +  shutdown_ = true;
    +
    +  for (SessionMap::iterator i = sessions_.begin(); i != sessions_.end();) {
    +    boost::shared_ptr<WebSession> session = i->second;
    +    WebSession::Handler handler(session, true);
    +    session->expire();
    +    sessions_.erase(i++);
    +  }
    +
    +  sessions_.clear();
    +}
    +
    +Configuration& WebController::configuration()
    +{
    +  return conf_;
    +}
    +
    +int WebController::sessionCount() const
    +{
    +  return sessions_.size();
    +}
    +
    +void WebController::run()
    +{
    +  running_ = true;
    +
    +  WebRequest *request = stream_->getNextRequest(10);
    +
    +  if (request)
    +    server_->handleRequest(request);
    +  else
    +    if (!singleSessionId_.empty()) {
    +      running_ = false;
    +      conf_.log("error") << "No initial request ?";
    +      return;
    +    }
    +
    +  for (;;) {
    +    bool haveMoreSessions = expireSessions();
    +
    +    if (!haveMoreSessions && !singleSessionId_.empty()) {
    +      conf_.log("notice") << "Dedicated session process exiting cleanly.";
    +      break;
    +    }
    +
    +    WebRequest *request = stream_->getNextRequest(5);
    +
    +    if (shutdown_) {
    +      conf_.log("notice") << "Shared session server exiting cleanly.";
    +#ifndef WIN32 // Not used in win32 anyway, fastcgi is not available
    +      sleep(1000);
    +#endif
    +      break;
    +    }
    +
    +    if (request)
    +      handleRequestThreaded(request);
    +  }
    +
    +  running_ = false;  
    +}
    +
    +bool WebController::expireSessions()
    +{
    +  std::vector<boost::shared_ptr<WebSession> > toKill;
    +
    +  bool result;
    +  {
    +    Time now;
    +
    +#ifdef WT_THREADED
    +    boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +    for (SessionMap::iterator i = sessions_.begin(); i != sessions_.end();) {
    +      boost::shared_ptr<WebSession> session = i->second;
    +
    +      if (!session->dead()) {
    +	int diff = session->expireTime() - now;
    +
    +	if (diff < 1000) {
    +	  if (session->shouldDisconnect()) {
    +	    if (session->app()->connected_) {
    +	      session->app()->connected_ = false;
    +	      session->log("notice") << "Timeout: disconnected";
    +	    }
    +	    ++i;
    +	  } else {
    +	    i->second->log("notice") << "Timeout: expiring";
    +	    WebSession::Handler handler(session, true);
    +	    session->expire();
    +	    toKill.push_back(session);
    +	    sessions_.erase(i++);
    +	  }
    +	} else
    +	  ++i;
    +      } else
    +	++i;
    +    }
    +
    +    result = !sessions_.empty();
    +  }
    +
    +  toKill.clear();
    +
    +  return result;
    +}
    +
    +void WebController::removeSession(const std::string& sessionId)
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +  SessionMap::iterator i = sessions_.find(sessionId);
    +  if (i != sessions_.end())
    +    sessions_.erase(i);
    +}
    +
    +std::string WebController::appSessionCookie(std::string url)
    +{
    +  return Utils::urlEncode(url);
    +}
    +
    +void WebController::handleRequestThreaded(WebRequest *request)
    +{
    +#ifdef WT_THREADED
    +  if (stream_->multiThreaded()) {
    +    threadPool_.schedule
    +      (boost::bind(&WAbstractServer::handleRequest, server_, request));
    +  } else
    +    server_->handleRequest(request);
    +#else
    +    server_->handleRequest(request);
    +#endif // WT_THREADED
    +}
    +
    +std::string WebController::sessionFromCookie(std::string cookies,
    +					     std::string scriptName,
    +					     int sessionIdLength)
    +{
    +  std::string cookieName = appSessionCookie(scriptName);
    +
    +#ifndef WT_HAVE_GNU_REGEX
    +  boost::regex
    +    cookieSession_e(".*\\Q" + cookieName
    +		    + "\\E=\"?([a-zA-Z0-9]{"
    +		    + boost::lexical_cast<std::string>(sessionIdLength)
    +		    + "})\"?.*");
    +
    +  boost::smatch what;
    +
    +  if (boost::regex_match(cookies, what, cookieSession_e))
    +    return what[1];
    +  else
    +    return std::string();
    +#else
    +  std::string cookieSession_ep
    +    = cookieName + "=\"\\?\\([a-zA-Z0-9]\\{"
    +    + boost::lexical_cast<std::string>(sessionIdLength) + "\\}\\)\"\\?";
    +  regex_t cookieSession_e;
    +  regcomp(&cookieSession_e, cookieSession_ep.c_str(), 0);
    +  regmatch_t pmatch[2];
    +  int res = regexec(&cookieSession_e, cookies.c_str(), 2, pmatch, 0);
    +  regfree(&cookieSession_e);
    +
    +  if (res == 0) {
    +    return cookies.substr(pmatch[1].rm_so,
    +			  pmatch[1].rm_eo - pmatch[1].rm_so);
    +  } else
    +    return std::string();
    +#endif
    +}
    +
    +#ifdef WT_THREADED
    +WebController::SocketNotifierMap& 
    +WebController::socketNotifiers(WSocketNotifier::Type type)
    +{
    +  switch (type) {
    +  case WSocketNotifier::Read:
    +    return socketNotifiersRead_;
    +  case WSocketNotifier::Write:
    +    return socketNotifiersWrite_;
    +  case WSocketNotifier::Exception:
    +  default: // to avoid return warning
    +    return socketNotifiersExcept_;
    +  }
    +}
    +#endif // WT_THREADED
    +
    +void WebController::socketSelected(int descriptor, WSocketNotifier::Type type)
    +{
    +#ifdef WT_THREADED
    +  /*
    +   * Find notifier, extract session Id
    +   */
    +  std::string sessionId;
    +  {
    +    boost::recursive_mutex::scoped_lock lock(notifierMutex_);
    +
    +    SocketNotifierMap &notifiers = socketNotifiers(type);
    +    SocketNotifierMap::iterator k = notifiers.find(descriptor);
    +
    +    if (k == notifiers.end()) {
    +      conf_.log("error") << "WebController::socketSelected(): socket notifier"
    +	" should have been cancelled?";
    +
    +      return;
    +    } else {
    +      sessionId = k->second->sessionId();
    +    }
    +  }
    +
    +  /*
    +   * Find session
    +   */
    +  boost::shared_ptr<WebSession> session;
    +  {
    +    boost::recursive_mutex::scoped_lock lock(mutex_);
    +
    +    SessionMap::iterator i = sessions_.find(sessionId);
    +
    +    if (i == sessions_.end() || i->second->dead()) {
    +      conf_.log("error")
    +	<< "WebController::socketSelected(): socket notification"
    +	" for expired session " << sessionId << ". Leaking memory?";
    +
    +      return;
    +    } else {
    +      session = i->second;
    +    }
    +  }
    +
    +  /*
    +   * Take session lock and notify
    +   */
    +  {
    +    WebSession::Handler handler(session, true);
    +
    +    if (!session->dead()) {
    +      WSocketNotifier *notifier = 0;
    +      {
    +	boost::recursive_mutex::scoped_lock lock(notifierMutex_);
    +	SocketNotifierMap &notifiers = socketNotifiers(type);
    +	SocketNotifierMap::iterator k = notifiers.find(descriptor);	
    +	if (k != notifiers.end()) {
    +	  notifier = k->second;
    +	  notifiers.erase(k);
    +	}
    +      }
    +
    +      session->app()->modifiedWithoutEvent_ = true;
    +      if (notifier)
    +	notifier->notify();
    +      session->app()->modifiedWithoutEvent_ = false;
    +    }
    +  }
    +#endif // WT_THREADED
    +}
    +
    +void WebController::addSocketNotifier(WSocketNotifier *notifier)
    +{
    +#ifdef WT_THREADED
    +  {
    +    boost::recursive_mutex::scoped_lock lock(notifierMutex_);
    +    socketNotifiers(notifier->type())[notifier->socket()] = notifier;
    +  }
    +
    +  switch (notifier->type()) {
    +  case WSocketNotifier::Read:
    +    socketNotifier_.addReadSocket(notifier->socket());
    +    break;
    +  case WSocketNotifier::Write:
    +    socketNotifier_.addWriteSocket(notifier->socket());
    +    break;
    +  case WSocketNotifier::Exception:
    +    socketNotifier_.addExceptSocket(notifier->socket());
    +    break;
    +  }
    +#endif // WT_THREADED
    +}
    +
    +void WebController::removeSocketNotifier(WSocketNotifier *notifier)
    +{
    +#ifdef WT_THREADED
    +  switch (notifier->type()) {
    +  case WSocketNotifier::Read:
    +    socketNotifier_.removeReadSocket(notifier->socket());
    +    break;
    +  case WSocketNotifier::Write:
    +    socketNotifier_.removeWriteSocket(notifier->socket());
    +    break;
    +  case WSocketNotifier::Exception:
    +    socketNotifier_.removeExceptSocket(notifier->socket());
    +    break;
    +  }
    +
    +  boost::recursive_mutex::scoped_lock lock(notifierMutex_);
    +
    +  SocketNotifierMap &notifiers = socketNotifiers(notifier->type());
    +  SocketNotifierMap::iterator i = notifiers.find(notifier->socket());
    +  if (i != notifiers.end())
    +    notifiers.erase(i);
    +#endif // WT_THREADED
    +}
    +
    +bool WebController::requestDataReceived(WebRequest *request,
    +					boost::uintmax_t current,
    +					boost::uintmax_t total)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(uploadProgressUrlsMutex_);
    +#endif // WT_THREADED
    +
    +  if (uploadProgressUrls_.find(request->queryString())
    +      != uploadProgressUrls_.end()) {
    +#ifdef WT_THREADED
    +    lock.unlock();
    +#endif // WT_THREADED
    +
    +    CgiParser cgi(conf_.maxRequestSize());
    +
    +    try {
    +      cgi.parse(*request, false);
    +    } catch (std::exception& e) {
    +      conf_.log("error") << "Could not parse request: " << e.what();
    +      return false;
    +    }
    +
    +    const std::string *wtdE = request->getParameter("wtd");
    +    if (!wtdE)
    +      return false;
    +
    +    std::string sessionId = *wtdE;
    +
    +    boost::shared_ptr<WebSession> session;
    +    {
    +#ifdef WT_THREADED
    +      boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +      SessionMap::iterator i = sessions_.find(sessionId);
    +
    +      if (i == sessions_.end() || i->second->dead())
    +	return false;
    +      else
    +	session = i->second;
    +    }
    +
    +    if (session) {
    +      WebSession::Handler handler(session, *request, *(WebResponse *)request);
    +
    +      if (!session->dead() && session->app()) {
    +	const std::string *requestE = request->getParameter("request");
    +
    +	WResource *resource = 0;
    +	if (!requestE && !request->pathInfo().empty())
    +	  resource
    +	    = session->app()->decodeExposedResource
    +	    ("/path/" + request->pathInfo());
    +
    +	if (!resource) {
    +	  const std::string *resourceE = request->getParameter("resource");
    +	  resource = session->app()->decodeExposedResource(*resourceE);
    +	}
    +
    +	if (resource) {
    +	  // FIXME, we should do this within app()->notify()
    +	  session->app()->modifiedWithoutEvent_ = true;
    +	  resource->dataReceived().emit(current, total);
    +	  session->app()->modifiedWithoutEvent_ = false;
    +	}
    +      }
    +    }
    +
    +    return !request->postDataExceeded();
    +  }
    +
    +  return true;
    +}
    +
    +void WebController::addUploadProgressUrl(const std::string& url)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(uploadProgressUrlsMutex_);
    +#endif // WT_THREADED
    +
    +  uploadProgressUrls_.insert(url.substr(url.find("?") + 1));
    +}
    +
    +void WebController::removeUploadProgressUrl(const std::string& url)
    +{
    +#ifdef WT_THREADED
    +  boost::mutex::scoped_lock lock(uploadProgressUrlsMutex_);
    +#endif // WT_THREADED
    +
    +  uploadProgressUrls_.erase(url.substr(url.find("?") + 1));
    +}
    +
    +void WebController::handleRequest(WebRequest *request)
    +{
    +  handleAsyncRequest(request);
    +}
    +
    +void WebController::handleAsyncRequest(WebRequest *request)
    +{
    +  if (!request->entryPoint_)
    +    request->entryPoint_ = getEntryPoint(request);
    +
    +  CgiParser cgi(conf_.maxRequestSize());
    +
    +  try {
    +    cgi.parse(*request);
    +  } catch (std::exception& e) {
    +    conf_.log("error") << "Could not parse request: " << e.what();
    +
    +    request->setContentType("text/html");
    +    request->out()
    +      << "<title>Error occurred.</title>"
    +      << "<h2>Error occurred.</h2>"
    +         "Error parsing CGI request: " << e.what() << std::endl;
    +
    +    request->flush(WebResponse::ResponseDone);
    +    return;
    +  }
    +
    +  if (request->entryPoint_->type() == StaticResource) {
    +    request->entryPoint_->resource()->handle(request, (WebResponse *)request);
    +    return;
    +  }
    +
    +  std::string sessionId;
    +
    +  /*
    +   * Get session from request.
    +   */
    +  const std::string *wtdE = request->getParameter("wtd");
    +
    +  if (conf_.sessionTracking() == Configuration::CookiesURL
    +      && !conf_.reloadIsNewSession())
    +    sessionId = sessionFromCookie(request->headerValue("Cookie"),
    +				  request->scriptName(),
    +				  conf_.sessionIdLength());
    +
    +  if (sessionId.empty() && wtdE)
    +    sessionId = *wtdE;
    +
    +  boost::shared_ptr<WebSession> session;
    +  {
    +#ifdef WT_THREADED
    +    boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED
    +
    +    if (!singleSessionId_.empty() && sessionId != singleSessionId_) {
    +      if (conf_.persistentSessions()) {
    +	// This may be because of a race condition in the filesystem:
    +	// the session file is renamed in generateNewSessionId() but
    +	// still a request for an old session may have arrived here
    +	// while this was happening.
    +	//
    +	// If it is from the old app, We should be sent a reload signal,
    +	// this is what will be done by a new session (which does not create
    +	// an application).
    +	//
    +	// If it is another request to take over the persistent session,
    +	// it should be handled by the persistent session. We can distinguish
    +	// using the type of the request
    +	conf_.log("info") 
    +	  << "Persistent session requested Id: " << sessionId << ", "
    +	  << "persistent Id: " << singleSessionId_;
    +	if (sessions_.empty() || request->requestMethod() == "GET")
    +	  sessionId = singleSessionId_;
    +      } else
    +	sessionId = singleSessionId_;
    +    }
    +
    +    SessionMap::iterator i = sessions_.find(sessionId);
    +
    +    if (i == sessions_.end() || i->second->dead()) {
    +      try {
    +	if (singleSessionId_.empty()) {
    +	  sessionId = conf_.generateSessionId();
    +
    +	  if (conf_.serverType() == Configuration::FcgiServer
    +	      && conf_.sessionPolicy() == Configuration::SharedProcess) {
    +	    std::string socketPath = conf_.sessionSocketPath(sessionId);
    +	    std::ofstream f(socketPath.c_str());
    +	    f << conf_.pid() << std::endl;
    +	    f.flush();
    +	  }
    +	}
    +
    +	std::string favicon = request->entryPoint_->favicon();
    +	if (favicon.empty()) {
    +	  const std::string *confFavicon = conf_.property("favicon");
    +	  if (confFavicon)
    +	    favicon = *confFavicon;
    +	}
    +
    +	session.reset(new WebSession(this, sessionId,
    +				     request->entryPoint_->type(),
    +				     favicon, request));
    +
    +	if (configuration().sessionTracking() == Configuration::CookiesURL)
    +	  request->addHeader("Set-Cookie",
    +			     appSessionCookie(request->scriptName())
    +			     + "=" + sessionId + "; Version=1;");
    +
    +	sessions_[sessionId] = session;
    +      } catch (std::exception& e) {
    +	configuration().log("error")
    +	  << "Could not create new session: " << e.what();
    +	request->flush(WebResponse::ResponseDone);
    +	return;
    +      }
    +    } else {
    +      session = i->second;
    +    }
    +  }
    +
    +  bool handled = false;
    +  {
    +    WebSession::Handler handler(session, *request, *(WebResponse *)request);
    +
    +    if (!session->dead()) {
    +      handled = true;
    +      session->handleRequest(handler);
    +    }
    +  }
    +
    +  if (session->dead())
    +    removeSession(sessionId);
    +
    +  session.reset();
    +
    +  if (!running_)
    +    expireSessions();
    +
    +#if defined(WT_THREADED) && defined(NOTHREADPOOL)
    +  if (running_) {
    +
    +    boost::thread self;
    +    boost::mutex::scoped_lock lock(threadsMutex_);
    +
    +    for (unsigned i = 0; i < threads_.size(); ++i) {
    +      if (*threads_[i] == self) {
    +	delete threads_[i];
    +	threads_.erase(threads_.begin() + i);
    +	break;
    +      }
    +    }
    +  }
    +#endif // WT_THREADED && NOTHREADPOOL
    +
    +  if (!handled)
    +    handleAsyncRequest(request);
    +}
    +
    +WApplication *WebController::doCreateApplication(WebSession *session)
    +{
    +  const EntryPoint *ep 
    +    = WebSession::Handler::instance()->request()->entryPoint_;
    +
    +  return (*ep->appCallback())(session->env());
    +}
    +
    +const EntryPoint *
    +WebController::getEntryPoint(WebRequest *request)
    +{
    +  std::string scriptName = request->scriptName();
    +  std::string pathInfo = request->pathInfo();
    +
    +  // Only one default entry point.
    +  if (conf_.entryPoints().size() == 1
    +      && conf_.entryPoints()[0].path().empty())
    +    return &conf_.entryPoints()[0];
    +
    +  // Multiple entry points.
    +  // This case probably only happens with built-in http
    +  for (unsigned i = 0; i < conf_.entryPoints().size(); ++i) {
    +    const Wt::EntryPoint& ep = conf_.entryPoints()[i];
    +    if (scriptName==ep.path())
    +      return &ep;
    +  }
    +
    +  // Multiple entry points: also recognized when prefixed with
    +  // scriptName. For HTTP/ISAPI connectors, we only receive URLs
    +  // that are subdirs of the scriptname.
    +  for (unsigned i = 0; i < conf_.entryPoints().size(); ++i) {
    +    const Wt::EntryPoint& ep = conf_.entryPoints()[i];
    +    if (boost::starts_with(pathInfo, ep.path())) {
    +      if (pathInfo.length() > ep.path().length()) {
    +        char next = pathInfo[ep.path().length()];
    +        if (next == '/') {
    +          return &ep;
    +        }
    +      } else {
    +        return &ep;
    +      }
    +    }
    +  }
    +
    +  conf_.log("error") << "No entry point configured for: '" << scriptName
    +		     << "', using first entry point ('"
    +		     << conf_.entryPoints()[0].path() << "'):";
    +
    +  return &conf_.entryPoints()[0];
    +}
    +
    +std::string
    +WebController::generateNewSessionId(boost::shared_ptr<WebSession> session)
    +{
    +#ifdef WT_THREADED
    +  boost::recursive_mutex::scoped_lock lock(mutex_);
    +#endif // WT_THREADED  
    +
    +  std::string newSessionId = conf_.generateSessionId();
    +
    +  if (conf_.serverType() == Configuration::FcgiServer) {
    +    std::string oldSocketPath = conf_.sessionSocketPath(session->sessionId());
    +    std::string newSocketPath = conf_.sessionSocketPath(newSessionId);
    +
    +    rename(oldSocketPath.c_str(), newSocketPath.c_str());
    +  }
    +
    +  sessions_[newSessionId] = session;
    +
    +  SessionMap::iterator i = sessions_.find(session->sessionId());
    +  sessions_.erase(i);
    +
    +  if (!singleSessionId_.empty())
    +    singleSessionId_ = newSessionId;
    +
    +  return newSessionId;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebController.h b/wt-3.1.7a/src/web/WebController.h
    new file mode 100644
    index 0000000..0143007
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebController.h
    @@ -0,0 +1,169 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEBCONTROLLER_H_
    +#define WEBCONTROLLER_H_
    +
    +#include <string>
    +#include <vector>
    +#include <set>
    +#include <map>
    +
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WSocketNotifier>
    +
    +#include "SocketNotifier.h"
    +
    +#if defined(WT_THREADED) && !defined(WT_TARGET_JAVA)
    +#include <boost/thread.hpp>
    +#include "threadpool/threadpool.hpp"
    +#endif
    +
    +namespace Wt {
    +
    +class CgiParser;
    +class Configuration;
    +class EntryPoint;
    +
    +class WebRequest;
    +class WebSession;
    +class WebStream;
    +
    +class WApplication;
    +class WWidget;
    +class WObject;
    +class WResource;
    +class WStatelessSlot;
    +class WWebWidget;
    +class WAbstractServer;
    +
    +/*
    + * The controller is a singleton class
    + *
    + * It either listens for incoming requests from a webstream, using run(),
    + * or it may be used to handle an incoming request, using handleRequest().
    + * In the latter case, sessions will only expire with a delay -- at the
    + * next request. Seems harmless to me.
    + *
    + * There is a method forceShutDown() to quit the controller.
    + *
    + * It has the following tasks:
    + *  - handle session life-cycle: create new sessions, delete quit()ed
    + *    sessions, expire sessions on timeout
    + *  - forward the request to the proper session
    + *  - manage concurrency
    + */
    +class WT_API WebController
    +{
    +public:
    +  WApplication *doCreateApplication(WebSession *session);
    +  Configuration& configuration();
    +
    +  void removeSession(const std::string& sessionId);
    +
    +#ifndef WT_TARGET_JAVA
    +  /*
    +   * Construct the WebController and let it read requests from the given
    +   * streams.
    +   */
    +  WebController(Configuration& configuration, WAbstractServer *server,
    +		WebStream *stream, std::string singleSessionId = std::string());
    +
    +  ~WebController();
    +
    +  void run();
    +  int sessionCount() const;
    +
    +  /*
    +   * Returns whether we should continue receiving data.
    +   */
    +  bool requestDataReceived(WebRequest *request, boost::uintmax_t current,
    +			   boost::uintmax_t total);
    +  void handleRequest(WebRequest *request);
    +
    +  bool expireSessions();
    +
    +  void forceShutdown();
    +
    +  static std::string appSessionCookie(std::string url);
    +  static std::string sessionFromCookie(std::string cookies,
    +				       std::string scriptName,
    +				       int sessionIdLength);
    +
    +  typedef std::map<int, WSocketNotifier *> SocketNotifierMap;
    +
    +  void addSocketNotifier(WSocketNotifier *notifier);
    +  void removeSocketNotifier(WSocketNotifier *notifier);
    +
    +  void addUploadProgressUrl(const std::string& url);
    +  void removeUploadProgressUrl(const std::string& url);
    +
    +  // returns false if removeSocketNotifier was called while processing
    +  void socketSelected(int descriptor, WSocketNotifier::Type type);
    +
    +  std::string switchSession(WebSession *session,
    +			    const std::string& newSessionId);
    +
    +  std::string generateNewSessionId(boost::shared_ptr<WebSession> session);
    +
    +  WAbstractServer *server_;
    +
    +private:
    +  Configuration&   conf_;
    +  WebStream       *stream_;
    +  std::string      singleSessionId_;
    +  bool             running_;
    +
    +#ifdef WT_THREADED
    +  boost::mutex uploadProgressUrlsMutex_;
    +#endif // WT_THREADED
    +  std::set<std::string> uploadProgressUrls_;
    +
    +  typedef std::map<std::string, boost::shared_ptr<WebSession> > SessionMap;
    +  SessionMap sessions_;
    +
    +  bool shutdown_;
    +
    +#ifdef WT_THREADED
    +  SocketNotifier socketNotifier_;
    +  // mutex to protect access to notifier maps. This cannot be protected
    +  // by mutex_ as this lock is grabbed while the application lock is
    +  // being held, which would potentially deadlock if we took mutex_.
    +  boost::recursive_mutex notifierMutex_;
    +  SocketNotifierMap socketNotifiersRead_;
    +  SocketNotifierMap socketNotifiersWrite_;
    +  SocketNotifierMap socketNotifiersExcept_;
    +  // assumes that you did grab the notifierMutex_
    +  SocketNotifierMap& socketNotifiers(WSocketNotifier::Type type);
    +
    +  // mutex to protect access to the sessions map.
    +  boost::recursive_mutex mutex_;
    +
    +  boost::threadpool::pool threadPool_;
    +#endif
    +
    +  void handleAsyncRequest(WebRequest *request);
    +  void handleRequestThreaded(WebRequest *request);
    +
    +  const EntryPoint *getEntryPoint(WebRequest *request);
    +
    +  static void mxml_error_cb(const char *message);
    +
    +#endif // WT_TARGET_JAVA
    +
    +#ifdef WT_TARGET_JAVA
    +  static bool isAsyncSupported() {
    +    return false;
    +  }
    +#endif //WT_TARGET_JAVA
    +};
    +
    +extern void WebStreamAddSocketNotifier(WSocketNotifier *notifier);
    +extern void WebStreamRemoveSocketNotifier(WSocketNotifier *notifier);
    +
    +}
    +
    +#endif // WEBCONTROLLER_H_
    diff --git a/wt-3.1.7a/src/web/WebRenderer.C b/wt-3.1.7a/src/web/WebRenderer.C
    new file mode 100644
    index 0000000..5cc599b
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebRenderer.C
    @@ -0,0 +1,1331 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +#include <map>
    +#include <stdexcept>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WLoadingIndicator"
    +#include "Wt/WWebWidget"
    +#include "Wt/WStringUtil"
    +
    +#include "DomElement.h"
    +#include "WebController.h"
    +#include "Configuration.h"
    +#include "WebRenderer.h"
    +#include "WebRequest.h"
    +#include "WebSession.h"
    +#include "FileServe.h"
    +#include "Utils.h"
    +#include "WtRandom.h"
    +#include "EscapeOStream.h"
    +#ifdef WIN32
    +#include <process.h> // for getpid()
    +#ifdef min
    +#undef min
    +#endif
    +#endif
    +
    +//#define DEBUG_JS
    +//#define DEBUG_RENDER
    +
    +namespace skeletons {
    +  extern const char *Boot_html;
    +  extern const char *Plain_html;
    +  extern const char *Hybrid_html;
    +  extern const char *Wt_js;
    +  extern const char *CommAjax_js;
    +  extern const char *CommScript_js;
    +  extern const char *JQuery_js;
    +}
    +
    +namespace Wt {
    +
    +const int MESSAGE_COUNTER_SIZE = 5;
    +
    +WebRenderer::WebRenderer(WebSession& session)
    +  : session_(session),
    +    visibleOnly_(true),
    +    rendered_(false),
    +    twoPhaseThreshold_(5000),
    +    expectedAckId_(0),
    +    learning_(false)
    +{ }
    +
    +void WebRenderer::setTwoPhaseThreshold(int bytes)
    +{
    +  twoPhaseThreshold_ = bytes;
    +}
    +
    +void WebRenderer::needUpdate(WWidget *w, bool laterOnly)
    +{
    +#ifdef DEBUG_RENDER
    +  std::cerr << "needUpdate: " << w->id() << " (" << typeid(*w).name()
    +	    << ")" << std::endl;
    +#endif //DEBUG_RENDER
    +  updateMap_.insert(w);
    +
    +  if (!laterOnly)
    +    moreUpdates_ = true;
    +}
    +
    +void WebRenderer::doneUpdate(WWidget *w)
    +{
    +#ifdef DEBUG_RENDER
    +  std::cerr << "doneUpdate: " << w->id() << " (" << typeid(*w).name()
    +	    << ")" << std::endl;
    +#endif //DEBUG_RENDER
    +  updateMap_.erase(w);
    +}
    +
    +bool WebRenderer::isDirty() const
    +{
    +  return !updateMap_.empty()
    +    || !session_.app()->afterLoadJavaScript_.empty()
    +    || Utils::length(collectedJS1_) > 0
    +    || Utils::length(collectedJS2_) > 0
    +    || Utils::length(invisibleJS_) > 0;
    +}
    +
    +const WebRenderer::FormObjectsMap& WebRenderer::formObjects() const
    +{
    +  return currentFormObjects_;
    +}
    +
    +void WebRenderer::saveChanges()
    +{
    +  collectJS(&collectedJS1_);
    +}
    +
    +void WebRenderer::discardChanges()
    +{
    +  collectJS(0);
    +}
    +
    +void WebRenderer::ackUpdate(int updateId)
    +{
    +  /*
    +   * If we are using an unreliable transport, then we remember
    +   * JavaScript updates until they are ack'ed. This works because
    +   * requests are not pipelined.
    +   *
    +   * WebSocket requests are pipelined so this simple mechanism will
    +   * not work. When switching from web sockets to AJAX or vice-versa ?
    +   * 
    +   * If normal AJAX request -> web socket closes. We assume everything
    +   * got delivered and start doing ack updates again.
    +   *
    +   * If web socket request -> we assume last AJAX request got
    +   * delivered ?
    +   */
    +  if (updateId == expectedAckId_) {
    +    setJSSynced(false);
    +    ++expectedAckId_;
    +  }
    +}
    +
    +void WebRenderer::letReloadJS(WebResponse& response, bool newSession,
    +			      bool embedded)
    +{
    +  if (!embedded)
    +    setHeaders(response, "text/javascript; charset=UTF-8");
    +
    +  response.out() << "window.location.reload(true);";
    +}
    +
    +void WebRenderer::letReloadHTML(WebResponse& response, bool newSession)
    +{
    +  setHeaders(response, "text/html; charset=UTF-8");
    +  response.out() << "<html><script type=\"text/javascript\">";
    +  letReloadJS(response, newSession, true);
    +  response.out() << "</script><body></body></html>";
    +}
    +
    +void WebRenderer::streamRedirectJS(std::ostream& out,
    +				   const std::string& redirect)
    +{
    +  if (session_.app())
    +    out << "if (window." << session_.app()->javaScriptClass() << ") "
    +	<< session_.app()->javaScriptClass()
    +	<< "._p_.setHash('" << session_.app()->internalPath() << ".');\n";
    +  out <<
    +    "if (window.location.replace)"
    +    " window.location.replace('" << redirect << "');"
    +    "else"
    +    " window.location.href='" << redirect << "';\n";
    +}
    +
    +void WebRenderer::serveResponse(WebResponse& response)
    +{
    +  switch (response.responseType()) {
    +  case WebResponse::Update:
    +    serveJavaScriptUpdate(response);
    +    break;
    +  case WebResponse::Page:
    +    if (session_.app())
    +      serveMainpage(response);
    +    else
    +      serveBootstrap(response);
    +    break;
    +  case WebResponse::Script:
    +    serveMainscript(response);
    +    break;
    +  }
    +}
    +
    +void WebRenderer::setPageVars(FileServe& page)
    +{
    +  bool xhtml = session_.env().contentType() == WEnvironment::XHTML1;
    +  WApplication *app = session_.app();
    +
    +  page.setVar("DOCTYPE", session_.docType());
    +
    +  std::string htmlAttr;
    +  if (app && !app->htmlClass_.empty())
    +    htmlAttr = " class=\"" + app->htmlClass_ + "\"";
    +
    +  if (xhtml) {
    +    page.setVar("HTMLATTRIBUTES",
    +		"xmlns=\"http://www.w3.org/1999/xhtml\"" + htmlAttr);
    +    page.setVar("METACLOSE", "/>");
    +  } else {
    +    if (session_.env().agentIsIE())
    +      page.setVar("HTMLATTRIBUTES",
    +		  "xmlns:v=\"urn:schemas-microsoft-com:vml\""
    +		  " lang=\"en\" dir=\"ltr\"" + htmlAttr);
    +    else
    +      page.setVar("HTMLATTRIBUTES", "lang=\"en\" dir=\"ltr\"" + htmlAttr);
    +    page.setVar("METACLOSE", ">");
    +  }
    +
    +  page.setVar("BODYATTRIBUTES", (!app || app->bodyClass_.empty())
    +	      ? "" : " class=\"" + app->bodyClass_ + "\"");
    +
    +  page.setVar("HEADDECLARATIONS", headDeclarations());
    +
    +  page.setCondition("FORM", !session_.env().agentIsSpiderBot()
    +		    && !session_.env().ajax());
    +}
    +
    +void WebRenderer::setBootVars(WebResponse& response,
    +			      FileServe& boot)
    +{
    +  Configuration& conf = session_.controller()->configuration();
    +
    +  boot.setVar("BLANK_HTML",
    +	      session_.bootstrapUrl(response, WebSession::ClearInternalPath)
    +	      + "&amp;request=resource&amp;resource=blank");
    +  boot.setVar("SELF_URL",
    +	      safeJsStringLiteral
    +	      (session_.bootstrapUrl(response, WebSession::KeepInternalPath)));
    +  boot.setVar("SESSION_ID", session_.sessionId());
    +  boot.setVar("RANDOMSEED",
    +	      boost::lexical_cast<std::string>(WtRandom::getUnsigned()
    +					       + getpid()));
    +  boot.setVar("RELOAD_IS_NEWSESSION", conf.reloadIsNewSession());
    +  boot.setVar("USE_COOKIES",
    +	      conf.sessionTracking() == Configuration::CookiesURL);
    +
    +  boot.setVar("AJAX_CANONICAL_URL",
    +	      safeJsStringLiteral(session_.ajaxCanonicalUrl(response)));
    +}
    +
    +void WebRenderer::serveBootstrap(WebResponse& response)
    +{
    +  bool xhtml = session_.env().contentType() == WEnvironment::XHTML1;
    +  Configuration& conf = session_.controller()->configuration();
    +
    +  FileServe boot(skeletons::Boot_html);
    +  setPageVars(boot);
    +  setBootVars(response, boot);
    +
    +  std::stringstream noJsRedirectUrl;
    +  DomElement::htmlAttributeValue
    +    (noJsRedirectUrl,
    +     session_.bootstrapUrl(response, WebSession::KeepInternalPath) + "&js=no");
    +
    +  if (xhtml) {
    +    boot.setVar("AUTO_REDIRECT", "");
    +    boot.setVar("NOSCRIPT_TEXT", conf.redirectMessage());
    +  } else {
    +    boot.setVar("AUTO_REDIRECT",
    +		"<noscript><meta http-equiv=\"refresh\" content=\"0;url="
    +		+ noJsRedirectUrl.str() + "\"></noscript>");
    +    boot.setVar("NOSCRIPT_TEXT", conf.redirectMessage());
    +  }
    +  boot.setVar("REDIRECT_URL", noJsRedirectUrl.str());
    +
    +  response.addHeader("Cache-Control", "no-cache, no-store");
    +  response.addHeader("Expires", "-1");
    +
    +  std::string contentType = xhtml ? "application/xhtml+xml" : "text/html";
    +  contentType += "; charset=UTF-8";
    +
    +  setHeaders(response, contentType);
    +
    +  boot.stream(response.out());
    +
    +  rendered_ = false;
    +}
    +
    +void WebRenderer::serveError(WebResponse& response, const std::string& message)
    +{
    +  bool js = response.responseType() != WebResponse::Page;
    +
    +  WApplication *app = session_.app();
    +  if (!js || !app) {
    +    response.setContentType("text/html");
    +    response.out()
    +      << "<title>Error occurred.</title>"
    +      << "<h2>Error occurred.</h2>"
    +      << WWebWidget::escapeText(WString(message), true).toUTF8()
    +      << std::endl;    
    +  } else {
    +    response.out() <<
    +      app->javaScriptClass() << "._p_.quit();"
    +      "document.title = 'Error occurred.';"
    +      "document.body.innerHtml='<h2>Error occurred.</h2>' +";
    +    DomElement::jsStringLiteral(response.out(), message, '\'');
    +    response.out() << ";";
    +  }
    +}
    +
    +void WebRenderer::setCookie(const std::string name, const std::string value,
    +			    int maxAge, const std::string domain,
    +			    const std::string path)
    +{
    +  cookiesToSet_.push_back(Cookie(name, value, path, domain, maxAge));
    +}
    +
    +void WebRenderer::setHeaders(WebResponse& response, const std::string mimeType)
    +{
    +
    +  for (unsigned i = 0; i < cookiesToSet_.size(); ++i) {
    +    std::string cookies;
    +    std::string value = cookiesToSet_[i].value;
    +
    +    cookies += Utils::urlEncode(cookiesToSet_[i].name)
    +      + "=" + Utils::urlEncode(value) + "; Version=1;";
    +    if (cookiesToSet_[i].maxAge != -1)
    +      cookies += " Max-Age="
    +	+ boost::lexical_cast<std::string>(cookiesToSet_[i].maxAge) + ";";
    +    if (!cookiesToSet_[i].domain.empty())
    +      cookies += " Domain=" + cookiesToSet_[i].domain + ";";
    +    if (!cookiesToSet_[i].path.empty())
    +      cookies += " Path=" + cookiesToSet_[i].path + ";";
    +
    +    if (!cookies.empty())
    +      response.addHeader("Set-Cookie", cookies);
    +  }
    +  cookiesToSet_.clear();
    +
    +  response.setContentType(mimeType);
    +}
    +
    +void WebRenderer::serveJavaScriptUpdate(WebResponse& response)
    +{
    +  rendered_ = true;
    +
    +  setHeaders(response, "text/javascript; charset=UTF-8");
    +
    +  collectJavaScript();
    +
    +#ifdef DEBUG_JS
    +  std::cerr << collectedJS1_.str() << collectedJS2_.str() << std::endl;
    +#endif // DEBUG_JS
    +
    +  /*
    +   * Passing the expectedAckId_ within the collectedJS1_ +
    +   * collectedJS2_ risks of inflating responses when a script loading
    +   * is blocked. The purpose of the ackId is to detect what has been
    +   * succesfully transmitted (mostly in the presence of server push
    +   * which can cancel ajax requests. Therefore we chose here to use
    +   * the ackIds_ only to signal proper ajax transfers, and thus at the
    +   * end of the request transfer.
    +   *
    +   * It does present us with another probem: what if e.g. an ExtJS
    +   * library is still loading and we already update one of its widgets
    +   * assuming it has been rendered ? This should be handled
    +   * client-side: only when libraries have been loaded, the application can
    +   * continue. TO BE DONE.
    +   */
    +  response.out()
    +    << collectedJS1_.str()
    +    << collectedJS2_.str()
    +    << session_.app()->javaScriptClass()
    +    << "._p_.response(" << expectedAckId_ << ");";
    +
    +  if (response.isWebSocketRequest()
    +      || response.isWebSocketMessage())
    +    setJSSynced(false);
    +}
    +
    +void WebRenderer::collectJavaScript()
    +{
    +  WApplication *app = session_.app();
    +  Configuration& conf = session_.controller()->configuration();
    +
    +  /*
    +   * Pending invisible changes are also collected into JS1.
    +   * This is also done in ackUpdate(), but just in case an update was not
    +   * acknowledged:
    +   */
    +  collectedJS1_ << invisibleJS_.str();
    +  invisibleJS_.str("");
    +
    +  if (conf.inlineCss())
    +    app->styleSheet().javaScriptUpdate(app, collectedJS1_, false);
    +
    +  loadStyleSheets(collectedJS1_, app);
    +
    +  if (app->bodyHtmlClassChanged_) {
    +    collectedJS1_ << "document.body.parentNode.className='"
    +		  << app->htmlClass_ << "';"
    +		  << "document.body.className='" << app->bodyClass_ << "';";
    +    app->bodyHtmlClassChanged_ = false;
    +  }
    +
    +  /*
    +   * This opens scopes, waiting for new libraries to be loaded.
    +   */
    +  loadScriptLibraries(collectedJS1_, app, true);
    +
    +  /*
    +   * This closes the same scopes.
    +   */
    +  loadScriptLibraries(collectedJS2_, app, false);
    +
    +  /*
    +   * Everything else happens inside JS1: after libraries have been loaded.
    +   */
    +  collectedJS1_ << app->newBeforeLoadJavaScript();
    +
    +  if (app->domRoot2_)
    +    app->domRoot2_->rootAsJavaScript(app, collectedJS1_, false);
    +
    +  collectJavaScriptUpdate(collectedJS1_);
    +
    +  if (visibleOnly_) {
    +    bool needFetchInvisible = false;
    +
    +    if (!updateMap_.empty()) {
    +      needFetchInvisible = true;
    +
    +      if (twoPhaseThreshold_ > 0) {
    +	/*
    +	 * See how large the invisible changes are, perhaps we can
    +	 * send them along
    +	 */
    +	visibleOnly_ = false;
    +
    +	collectJavaScriptUpdate(invisibleJS_);
    +
    +	if (Utils::length(invisibleJS_) < (int)twoPhaseThreshold_) {
    +	  collectedJS1_ << invisibleJS_.str();
    +	  invisibleJS_.str("");
    +	  needFetchInvisible = false;
    +	}
    +
    +	visibleOnly_ = true;
    +      }
    +    }
    +
    +    if (needFetchInvisible)
    +      collectedJS1_ << app->javaScriptClass()
    +		    << "._p_.update(null, 'none', null, false);";
    +  }
    +
    +  if (app->autoJavaScriptChanged_) {
    +    collectedJS1_ << app->javaScriptClass()
    +		  << "._p_.autoJavaScript=function(){"
    +		  << app->autoJavaScript_ << "};";
    +    app->autoJavaScriptChanged_ = false;
    +  }
    +
    +  visibleOnly_ = true;
    +
    +  app->domRoot_->doneRerender();
    +  if (app->domRoot2_)
    +    app->domRoot2_->doneRerender();
    +
    +  std::string redirect = session_.getRedirect();
    +  if (!redirect.empty())
    +    streamRedirectJS(collectedJS1_, redirect);
    +}
    +
    +void WebRenderer::streamCommJs(WApplication *app, std::ostream& out)
    +{
    +  Configuration& conf = session_.controller()->configuration();
    +
    +  FileServe js(app->ajaxMethod() == WApplication::XMLHttpRequest
    +	       ? skeletons::CommAjax_js
    +	       : skeletons::CommScript_js);
    +
    +  js.setVar("APP_CLASS", app->javaScriptClass());
    +  js.setVar("WT_CLASS", WT_CLASS);
    +
    +  /*
    +   * FIXME: is this still required?
    +   * Mozilla Bugzilla #246651
    +   */
    +  js.setVar("CLOSE_CONNECTION",
    +	    (conf.serverType() == Configuration::WtHttpdServer)
    +	    && session_.env().agentIsGecko()
    +	    && session_.env().agent() < WEnvironment::Firefox3_0);
    +  
    +  js.stream(out);
    +}
    +
    +void WebRenderer::serveMainscript(WebResponse& response)
    +{
    +  /*
    +   * Serving a script is using a GET request, which can be replayed.
    +   * Therefore we need to either be able to reconstruct the response
    +   * (possible if !rendered_), or we need to save the response in
    +   * collectedJS variables.
    +   */
    +
    +  Configuration& conf = session_.controller()->configuration();
    +  bool widgetset = session_.type() == WidgetSet;
    +
    +  setHeaders(response, "text/javascript; charset=UTF-8");
    +
    +  if (!widgetset) {
    +    // FIXME: this cannot be replayed
    +    std::string redirect = session_.getRedirect();
    +
    +    if (!redirect.empty()) {
    +      streamRedirectJS(response.out(), redirect);
    +      return;
    +    }
    +  }
    +
    +  WApplication *app = session_.app();
    +
    +  /*
    +   * Opera and Safari cannot use innerHTML in XHTML documents.
    +   */
    +  const bool xhtml = app->environment().contentType() == WEnvironment::XHTML1;
    +  const bool innerHtml = !xhtml || app->environment().agentIsGecko();
    +
    +  formObjectsChanged_ = true;
    +  currentFormObjectsList_ = createFormObjectsList(app);
    +
    +  FileServe jquery(skeletons::JQuery_js);
    +  jquery.stream(response.out());
    +
    +  FileServe script(skeletons::Wt_js);
    +  script.setCondition("DEBUG", conf.debug());
    +
    +#ifdef WT_DEBUG_JS
    +  script.setCondition("DYNAMIC_JS", true);
    +#else
    +  script.setCondition("DYNAMIC_JS", false);
    +#endif // WT_DEBUG_JS
    +
    +  script.setVar("WT_CLASS", WT_CLASS);
    +  script.setVar("APP_CLASS", app->javaScriptClass());
    +  script.setVar("AUTO_JAVASCRIPT",
    +		"(function(){" + app->autoJavaScript_ + "})");
    +  script.setCondition("STRICTLY_SERIALIZED_EVENTS", conf.serializedEvents());
    +  script.setCondition("WEB_SOCKETS", conf.webSockets());
    +  script.setVar("INNER_HTML", innerHtml);
    +  script.setVar("FORM_OBJECTS", '[' + currentFormObjectsList_ + ']');
    +
    +  script.setVar("RELATIVE_URL", WWebWidget::jsStringLiteral
    +		(session_.bootstrapUrl(response,
    +				       WebSession::ClearInternalPath)));
    +  script.setVar("KEEP_ALIVE",
    +		boost::lexical_cast<std::string>(conf.sessionTimeout() / 2));
    +  script.setVar("INITIAL_HASH",
    +		WWebWidget::jsStringLiteral(app->internalPath()));
    +  script.setVar("INDICATOR_TIMEOUT", conf.indicatorTimeout());
    +  script.setVar("SERVER_PUSH_TIMEOUT", conf.serverPushTimeout() * 1000);
    +  script.setVar("ONLOAD",
    +		std::string("(function() {")
    +		+ (widgetset ? "" : "window.loadWidgetTree();") + "})");
    +  script.stream(response.out());
    +
    +  app->autoJavaScriptChanged_ = false;
    +
    +  streamCommJs(app, response.out());
    +
    +  if (!rendered_)
    +    serveMainAjax(response);
    +  else {
    +    if (app->enableAjax_) {
    +      // Before-load JavaScript of libraries that were loaded directly
    +      // in HTML
    +      collectedJS1_ << beforeLoadJS_.str();
    +      beforeLoadJS_.str("");
    +
    +      collectedJS1_
    +	<< "var domRoot = " << app->domRoot_->jsRef() << ";"
    +	"var form = " WT_CLASS ".getElement('Wt-form');"
    +	"domRoot.style.display = form.style.display;"
    +	"document.body.replaceChild(domRoot, form);";
    +
    +      // Load JavaScript libraries that were added during enableAjax()
    +      loadScriptLibraries(collectedJS1_, app, true); 
    +
    +      collectedJS1_ << app->newBeforeLoadJavaScript();
    +	
    +      collectedJS2_
    +	<< "domRoot.style.visibility = 'visible';"
    +	<< app->javaScriptClass() << "._p_.autoJavaScript();";
    +
    +      loadScriptLibraries(collectedJS2_, app, false);
    +
    +      app->enableAjax_ = false;
    +    }
    +
    +    response.out() << "window.loadWidgetTree = function(){\n";
    +
    +    visibleOnly_ = false;
    +
    +    collectJavaScript();
    +    updateLoadIndicator(collectedJS1_, app, true);
    +
    +#ifdef DEBUG_JS
    +    std::cerr << collectedJS1_.str() << collectedJS2_.str() << std::endl;
    +#endif // DEBUG_JS
    +
    +    response.out()
    +      << collectedJS1_.str()
    +      << app->javaScriptClass()
    +      << "._p_.response(" << expectedAckId_ << ");";
    +
    +    response.out()
    +	<< app->javaScriptClass()
    +	<< "._p_.update(null, 'load', null, false);"
    +	<< collectedJS2_.str()
    +	<< "};" // loadWidgetTree = function() { ... }
    +	<< app->javaScriptClass()
    +	<< "._p_.setServerPush("
    +	<< (app->updatesEnabled() ? "true" : "false") << ");"
    +	<< "window.WtScriptLoaded = true;"
    +	<< "if (window.isLoaded) onLoad();\n";
    +  }
    +}
    +
    +void WebRenderer::serveMainAjax(WebResponse& response)
    +{
    +  Configuration& conf = session_.controller()->configuration();
    +  bool widgetset = session_.type() == WidgetSet;
    +  WApplication *app = session_.app();
    +
    +  WWebWidget *mainWebWidget = app->domRoot_;
    +
    +  visibleOnly_ = true;
    +
    +  /*
    +   * Render root widgets (domRoot_, and for widget set, also children of
    +   * domRoot2_). This automatically creates loading stubs for
    +   * invisible widgets.
    +   */
    +  app->loadingIndicatorWidget_->show();
    +  DomElement *mainElement = mainWebWidget->createSDomElement(app);
    +  app->loadingIndicatorWidget_->hide();
    +
    +  /*
    +   * Need to do this after createSDomElement, since additional CSS/JS
    +   * may be made during rendering, e.g. from WViewWidget::render()
    +   */
    +  if (conf.inlineCss())
    +    app->styleSheet().javaScriptUpdate(app, response.out(), true);
    +
    +  if (!app->cssTheme().empty()) {
    +    response.out() << WT_CLASS << ".addStyleSheet('"
    +		   << WApplication::resourcesUrl() << "/themes/"
    +		   << app->cssTheme() << "/wt.css', 'all');";
    +    if (app->environment().agentIsIE())
    +      response.out() << WT_CLASS << ".addStyleSheet('"
    +		     << WApplication::resourcesUrl() << "/themes/"
    +		     << app->cssTheme() << "/wt_ie.css', 'all');";
    +    if (app->environment().agent() == WEnvironment::IE6)
    +      response.out() << WT_CLASS << ".addStyleSheet('"
    +		     << WApplication::resourcesUrl() << "/themes/"
    +		     << app->cssTheme() << "/wt_ie6.css', 'all');";
    +  }
    +
    +  app->styleSheetsAdded_ = app->styleSheets_.size();
    +  loadStyleSheets(response.out(), app);
    +
    +  app->scriptLibrariesAdded_ = app->scriptLibraries_.size();
    +  loadScriptLibraries(response.out(), app, true);
    +
    +  response.out() << std::endl << app->beforeLoadJavaScript();
    +
    +  if (!widgetset)
    +    response.out() << "window.loadWidgetTree = function(){\n";
    +
    +  if (app->bodyHtmlClassChanged_) {
    +    response.out() << "document.body.parentNode.className='"
    +		   << app->htmlClass_ << "';"
    +		   << "document.body.className='" << app->bodyClass_ << "';";
    +    app->bodyHtmlClassChanged_ = false;
    +  }
    +
    +#ifdef DEBUG_JS
    +  std::stringstream s;
    +#else
    +  std::ostream& s = response.out();
    +#endif // DEBUG_JS
    +
    +  mainElement->addToParent(s, "document.body", widgetset ? 0 : -1, app);
    +  delete mainElement;
    +
    +  if (app->isQuited())
    +    s << app->javaScriptClass() << "._p_.quit();";
    +
    +  if (widgetset)
    +    app->domRoot2_->rootAsJavaScript(app, s, true);
    +
    +#ifdef DEBUG_JS
    +  std::cerr << s.str();
    +  response.out() << s.str();
    +#endif // DEBUG_JS
    +
    +  setJSSynced(true);
    +
    +  preLearnStateless(app, collectedJS1_);
    +
    +#ifdef DEBUG_JS
    +  std::cerr << collectedJS1_.str();
    +#endif // DEBUG_JS
    +
    +  response.out() << collectedJS1_.str();
    +  collectedJS1_.str("");  
    +
    +  updateLoadIndicator(response.out(), app, true);
    +
    +  if (widgetset) {
    +    const std::string *historyE = app->environment().getParameter("Wt-history");
    +    if (historyE) {
    +      response.out() << WT_CLASS << ".history.initialize('"
    +		     << (*historyE)[0] << "-field', '"
    +		     << (*historyE)[0] << "-iframe');\n";
    +    }
    +  }
    +
    +  response.out() << app->afterLoadJavaScript()
    +		 << "{var o=null,e=null;"
    +		 << app->hideLoadingIndicator_.javaScript()
    +		 << "}";
    +
    +  if (widgetset)
    +    response.out() << app->javaScriptClass() << "._p_.load();\n";
    +
    +  if (!app->isQuited())
    +    response.out() << session_.app()->javaScriptClass()
    +		   << "._p_.update(null, 'load', null, false);\n";
    +
    +  if (!widgetset) {
    +    response.out() << "};\n";
    +
    +    response.out() << app->javaScriptClass()
    +		   << "._p_.setServerPush("
    +		   << (app->updatesEnabled() ? "true" : "false") << ");";
    +
    +    response.out() << "window.WtScriptLoaded = true;"
    +                      "if (window.isLoaded) onLoad();\n";
    +  }
    +
    +  loadScriptLibraries(response.out(), app, false);
    +}
    +
    +void WebRenderer::setJSSynced(bool invisibleToo)
    +{
    +  collectedJS1_.str("");
    +  collectedJS2_.str("");
    +
    +  if (!invisibleToo)
    +    collectedJS1_ << invisibleJS_.str();
    +
    +  invisibleJS_.str("");
    +}
    +
    +std::string WebRenderer::safeJsStringLiteral(const std::string& value)
    +{
    +  std::string s = WWebWidget::jsStringLiteral(value);
    +  return Wt::Utils::replace(s, "<", "<'+'");
    +}
    +
    +void WebRenderer::updateLoadIndicator(std::ostream& out, WApplication *app,
    +				      bool all)
    +{
    +  if (app->showLoadingIndicator_.needsUpdate(all)) {
    +    out << "showLoadingIndicator = function() {var o=null,e=null;\n"
    +	<< app->showLoadingIndicator_.javaScript() << "};\n";
    +    app->showLoadingIndicator_.updateOk();
    +  }
    +
    +  if (app->hideLoadingIndicator_.needsUpdate(all)) {
    +    out << "hideLoadingIndicator = function() {var o=null,e=null;\n"
    +	<< app->hideLoadingIndicator_.javaScript() << "};\n";
    +    app->hideLoadingIndicator_.updateOk();
    +  }
    +}
    +
    +/*
    + * Serves the Plain or Hybrid HTML page.
    + *
    + * Requires that the application has been started.
    + *
    + * The Hybrid page is served when a progressive bootstrap is indicated
    + * or when we are in an ajax session. We need to remember that in the next
    + * serveMainscript() we only need to serve an update, not render the whole
    + * interface.
    + */
    +void WebRenderer::serveMainpage(WebResponse& response)
    +{
    +  Configuration& conf = session_.controller()->configuration();
    +
    +  WApplication *app = session_.app();
    +
    +  /*
    +   * This implements the redirect for Post-Redirect-Get, or when the
    +   * internal path changed.
    +   *
    +   * Post-Redirect-Get does not work properly though: refresh() may misbehave
    +   * and have unintended side effects ?
    +   */
    +  if (!app->environment().ajax()
    +      && (/*response.requestMethod() == "POST"
    +	  || */(app->internalPathIsChanged_
    +		&& app->oldInternalPath_ != app->newInternalPath_))) {
    +    app->oldInternalPath_ = app->newInternalPath_;
    +    session_.redirect(app->bookmarkUrl(app->newInternalPath_));
    +  }
    +
    +  std::string redirect = session_.getRedirect();
    +
    +  if (!redirect.empty()) {
    +    response.setStatus(302); // Should be 303 in fact ?
    +    response.setRedirect(redirect);
    +    return;
    +  }
    +
    +  WWebWidget *mainWebWidget = app->domRoot_;
    +
    +  visibleOnly_ = true;
    +
    +  /*
    +   * The element to render. This automatically creates loading stubs
    +   * for invisible widgets, which is also what we want for
    +   * non-JavaScript versions.
    +   */
    +  DomElement *mainElement = mainWebWidget->createSDomElement(app);
    +  rendered_ = true;
    +
    +  setJSSynced(true);
    +
    +  const bool xhtml = app->environment().contentType() == WEnvironment::XHTML1;
    +
    +  std::string styleSheets;
    +
    +  if (!app->cssTheme().empty()) {
    +    styleSheets += "<link href=\""
    +      + WApplication::resourcesUrl() + "/themes/" + app->cssTheme()
    +      + "/wt.css\" rel=\"stylesheet\" type=\"text/css\""
    +      + (xhtml ? "/>" : ">") + "\n";
    +
    +    if (app->environment().agentIsIE())
    +      styleSheets += "<link href=\""
    +	+ WApplication::resourcesUrl() + "/themes/" + app->cssTheme()
    +	+ "/wt_ie.css\" rel=\"stylesheet\" type=\"text/css\""
    +	+ (xhtml ? "/>" : ">") + "\n";
    +
    +    if (app->environment().agent() == WEnvironment::IE6)
    +      styleSheets += "<link href=\""
    +	+ WApplication::resourcesUrl() + "/themes/" + app->cssTheme()
    +	+ "/wt_ie6.css\" rel=\"stylesheet\" type=\"text/css\""
    +	+ (xhtml ? "/>" : ">") + "\n";
    +  }
    +
    +  for (unsigned i = 0; i < app->styleSheets_.size(); ++i) {
    +    std::string url = app->styleSheets_[i].uri;
    +    url = Wt::Utils::replace(url, '&', "&amp;");
    +    styleSheets += "<link href=\""
    +      + app->fixRelativeUrl(url) + "\" rel=\"stylesheet\" type=\"text/css\"";
    +
    +    if (!app->styleSheets_[i].media.empty()
    +	&& app->styleSheets_[i].media != "all")
    +      styleSheets += " media=\"" + app->styleSheets_[i].media + '"';
    +
    +    styleSheets += xhtml ? "/>" : ">";
    +    styleSheets += "\n";
    +  }
    +  app->styleSheetsAdded_ = 0;
    +
    +  beforeLoadJS_.str("");
    +  for (unsigned i = 0; i < app->scriptLibraries_.size(); ++i) {
    +    std::string url = app->scriptLibraries_[i].uri;
    +    url = Wt::Utils::replace(url, '&', "&amp;");
    +    styleSheets += "<script src='" + app->fixRelativeUrl(url) + "'></script>\n";
    +
    +    beforeLoadJS_ << app->scriptLibraries_[i].beforeLoadJS;
    +  }
    +  app->scriptLibrariesAdded_ = 0;
    +
    +  app->newBeforeLoadJavaScript_ = app->beforeLoadJavaScript_;
    +
    +  bool hybridPage = session_.progressiveBoot() || session_.env().ajax();
    +  FileServe page(hybridPage ? skeletons::Hybrid_html : skeletons::Plain_html);
    +
    +  setPageVars(page);
    +  page.setVar("SESSION_ID", session_.sessionId());
    +
    +  if (hybridPage) {
    +    setBootVars(response, page);
    +    page.setVar("INTERNAL_PATH", safeJsStringLiteral(app->internalPath()));
    +  }
    +
    +  std::string url
    +    = (app->environment().agentIsSpiderBot()
    +       || (conf.sessionTracking() == Configuration::CookiesURL
    +	   && session_.env().supportsCookies()))
    +    ? session_.bookmarkUrl(app->newInternalPath_)
    +    : session_.mostRelativeUrl(app->newInternalPath_);
    +
    +  url = app->fixRelativeUrl(url);
    +
    +  url = Wt::Utils::replace(url, '&', "&amp;");
    +  page.setVar("RELATIVE_URL", url);
    +
    +  if (conf.inlineCss())
    +    page.setVar("STYLESHEET", app->styleSheet().cssText(true));
    +  else
    +    page.setVar("STYLESHEET", "");
    +
    +  page.setVar("STYLESHEETS", styleSheets);
    +
    +  page.setVar("TITLE", WWebWidget::escapeText(app->title()).toUTF8());
    +
    +  app->titleChanged_ = false;
    +
    +  if (hybridPage) {
    +    response.addHeader("Cache-Control", "no-cache, no-store");
    +    response.addHeader("Expires", "-1");
    +  }
    +
    +  std::string contentType = xhtml ? "application/xhtml+xml" : "text/html";
    +
    +  contentType += "; charset=UTF-8";
    +
    +  setHeaders(response, contentType);
    +
    +  formObjectsChanged_ = true;
    +  currentFormObjectsList_ = createFormObjectsList(app);
    +
    +  page.streamUntil(response.out(), "HTML");
    +
    +  DomElement::TimeoutList timeouts;
    +  {
    +    EscapeOStream js;
    +    EscapeOStream out(response.out());
    +    mainElement->asHTML(out, js, timeouts);
    +    app->afterLoadJavaScript_ = js.str() + app->afterLoadJavaScript_;
    +    delete mainElement;
    +  }
    +
    +  int refresh;
    +  if (app->environment().ajax()) {
    +    std::stringstream str;
    +    DomElement::createTimeoutJs(str, timeouts, app);
    +    app->doJavaScript(str.str());
    +
    +    refresh = 1000000;
    +  } else {
    +    if (app->isQuited())
    +      refresh = 1000000;
    +    else {
    +      refresh = conf.sessionTimeout() / 3;
    +      for (unsigned i = 0; i < timeouts.size(); ++i)
    +	refresh = std::min(refresh, 1 + timeouts[i].msec/1000);
    +    }
    +  }
    +  page.setVar("REFRESH", boost::lexical_cast<std::string>(refresh));
    +
    +  page.stream(response.out());
    +
    +  app->internalPathIsChanged_ = false;
    +}
    +
    +void WebRenderer::loadScriptLibraries(std::ostream& out,
    +				      WApplication *app, bool start)
    +{
    +  int first = app->scriptLibraries_.size() - app->scriptLibrariesAdded_;
    +
    +  if (start) {
    +    for (unsigned i = first; i < app->scriptLibraries_.size(); ++i) {
    +      std::string uri = app->fixRelativeUrl(app->scriptLibraries_[i].uri);
    +
    +      out << app->scriptLibraries_[i].beforeLoadJS
    +	  << app->javaScriptClass() << "._p_.loadScript('" << uri << "',";
    +      DomElement::jsStringLiteral(out, app->scriptLibraries_[i].symbol, '\'');
    +      out << ");\n";
    +      out << app->javaScriptClass() << "._p_.onJsLoad(\""
    +	  << uri << "\",function() {\n";
    +    }
    +  } else {
    +    if (app->scriptLibraries_.size() - first > 0)
    +      out << app->javaScriptClass() << "._p_.autoJavaScript();";
    +    for (unsigned i = first; i < app->scriptLibraries_.size(); ++i)
    +      out << "});";
    +    app->scriptLibrariesAdded_ = 0;
    +  }
    +}
    +
    +void WebRenderer::loadStyleSheets(std::ostream& out, WApplication *app)
    +{
    +  int first = app->styleSheets_.size() - app->styleSheetsAdded_;
    +
    +  for (unsigned i = first; i < app->styleSheets_.size(); ++i) {
    +    out << WT_CLASS << ".addStyleSheet('"
    +	<< app->fixRelativeUrl(app->styleSheets_[i].uri) << "', '"
    +	<< app->styleSheets_[i].media << "');\n";
    +  }
    +
    +  app->styleSheetsAdded_ = 0;
    +}
    +
    +void WebRenderer::collectChanges(std::vector<DomElement *>& changes)
    +{
    +  WApplication *app = session_.app();
    +
    +  do {
    +    moreUpdates_ = false;
    +
    +    std::multimap<int, WWidget *> depthOrder;
    +
    +    for (UpdateMap::const_iterator i = updateMap_.begin();
    +	 i != updateMap_.end(); ++i) {
    +      int depth = 1;
    +
    +      WWidget *ww = *i;
    +      WWidget *w = ww;
    +      for (; w->parent(); ++depth)
    +	w = w->parent();
    +
    +      if (w != app->domRoot_ && w != app->domRoot2_) {
    +#ifdef DEBUG_RENDER
    +	std::cerr << "ignoring: " << (*i)->id()
    +		  << " (" << typeid(**i).name()
    +		  << ") " << w->id()
    +		  << " (" << typeid(*w).name()
    +		  << ")" << std::endl;
    +#endif // DEBUG_RENDER
    +	// not in displayed widgets: will be removed from the update list
    +	depth = 0;
    +      }
    +
    +#ifndef WT_TARGET_JAVA
    +      depthOrder.insert(std::make_pair(depth, ww));
    +#else
    +      depthOrder.insert(depth, ww);
    +#endif // WT_TARGET_JAVA
    +    }
    +
    +    for (std::multimap<int, WWidget *>::const_iterator i = depthOrder.begin();
    +	 i != depthOrder.end(); ++i) {
    +      UpdateMap::iterator j = updateMap_.find(i->second);
    +      if (j != updateMap_.end()) {
    +	WWidget *w = i->second;
    +
    +	// depth == 0: remove it from the update list
    +	if (i->first == 0) {
    +	  w->webWidget()->propagateRenderOk();
    +	  continue;
    +	}
    +
    +	//std::cerr << learning_ << " " << loading_ 
    +	//          << " updating: " << w->id() << std::endl;
    +
    +#ifdef DEBUG_RENDER
    +	std::cerr << "updating: " << w->id()
    +		  << " (" << typeid(*w).name() << ")" << std::endl;
    +#endif
    +
    +	if (!learning_ && visibleOnly_) {
    +	  if (w->isRendered()) {
    +	    w->getSDomChanges(changes, app);
    +
    +	    /* if (!w->isVisible()) {
    +	      // We should postpone rendering the changes -- but
    +	      // at the same time need to propageRenderOk() now for stateless
    +	      // slot learning to work properly.
    +	      w->getSDomChanges(changes, app);
    +	    } else
    +	      w->getSDomChanges(changes, app); */
    +	  } else
    +#ifdef DEBUG_RENDER
    +	    std::cerr << "Ignoring: " << w->id() << std::endl;
    +#else
    +	  ;
    +#endif // DEBUG_RENDER
    +	} else {
    +	  w->getSDomChanges(changes, app);
    +	}
    +      }
    +    }
    +  } while (!learning_ && moreUpdates_);
    +}
    +
    +void WebRenderer::collectJavaScriptUpdate(std::ostream& out)
    +{
    +  WApplication *app = session_.app();
    +
    +  out << '{';
    +
    +  collectJS(&out);
    +
    +  /*
    +   * Now, as we have cleared and recorded all JavaScript changes that were
    +   * caused by the actual code, we can learn stateless code and collect
    +   * changes that result.
    +   */
    +
    +  preLearnStateless(app, out);
    +
    +  if (formObjectsChanged_) {
    +    std::string formObjectsList = createFormObjectsList(app);
    +    if (formObjectsList != currentFormObjectsList_) {
    +      currentFormObjectsList_ = formObjectsList;
    +      out << app->javaScriptClass()
    +	  << "._p_.setFormObjects([" << currentFormObjectsList_ << "]);";
    +    }
    +  }
    +
    +  out << app->afterLoadJavaScript();
    +
    +  if (app->isQuited())
    +    out << app->javaScriptClass() << "._p_.quit();";
    +
    +  updateLoadIndicator(out, app, false);
    +
    +  out << '}';
    +}
    +
    +void WebRenderer::updateFormObjects(WWebWidget *source, bool checkDescendants)
    +{
    +  formObjectsChanged_ = true;
    +}
    +
    +void WebRenderer::updateFormObjectsList(WApplication *app)
    +{
    +  if (formObjectsChanged_) {
    +    currentFormObjects_.clear();
    +
    +    app->domRoot_->getFormObjects(currentFormObjects_);
    +    if (app->domRoot2_)
    +      app->domRoot2_->getFormObjects(currentFormObjects_);
    +  }
    +}
    +
    +std::string WebRenderer::createFormObjectsList(WApplication *app)
    +{
    +  updateFormObjectsList(app);
    +
    +  std::string result;
    +
    +  for (FormObjectsMap::const_iterator i = currentFormObjects_.begin();
    +       i != currentFormObjects_.end(); ++i) {
    +    if (!result.empty())
    +      result += ',';
    +
    +    result += "'" + i->first + "'";
    +  }
    +
    +  formObjectsChanged_ = false;
    +
    +  return result;
    +}
    +
    +void WebRenderer::collectJS(std::ostream* js)
    +{
    +  std::vector<DomElement *> changes;
    +
    +  collectChanges(changes);
    +
    +  WApplication *app = session_.app();
    +
    +  if (js) {
    +    *js << app->newBeforeLoadJavaScript();
    +
    +    EscapeOStream sout(*js);
    +
    +    for (unsigned i = 0; i < changes.size(); ++i)
    +      changes[i]->asJavaScript(sout, DomElement::Delete);
    +
    +    for (unsigned i = 0; i < changes.size(); ++i) {
    +      changes[i]->asJavaScript(sout, DomElement::Update);
    +      delete changes[i];
    +    }
    +  } else {
    +    for (unsigned i = 0; i < changes.size(); ++i)
    +      delete changes[i];
    +  }
    +
    +  if (js) { 
    +    if (app->titleChanged_) {
    +      *js << app->javaScriptClass()
    +	  << "._p_.setTitle(" << app->title().jsStringLiteral() << ");\n";
    +    }
    +
    +    if (app->closeMessageChanged_) {
    +      *js << app->javaScriptClass()
    +	  << "._p_.setCloseMessage(" << app->closeMessage().jsStringLiteral()
    +	  << ");\n";
    +    }
    +  }
    +
    +  app->titleChanged_ = false;
    +  app->closeMessageChanged_ = false;
    +
    +  if (js) {
    +    if (app->internalPathIsChanged_)
    +      *js << app->javaScriptClass()
    +	  << "._p_.setHash('" << app->newInternalPath_ << "');\n";
    +
    +    *js << app->afterLoadJavaScript();
    +  } else
    +    app->afterLoadJavaScript();
    +
    +  app->internalPathIsChanged_ = false;
    +}
    +
    +void WebRenderer::preLearnStateless(WApplication *app, std::ostream& out)
    +{
    +  bool isIEMobile = app->environment().agentIsIEMobile();
    +
    +  if (isIEMobile || !session_.env().ajax())
    +    return;
    +
    +  collectJS(&out);
    +
    +  WApplication::SignalMap& ss = session_.app()->exposedSignals();
    +
    +  for (WApplication::SignalMap::iterator i = ss.begin();
    +       i != ss.end(); ) {
    +
    +#ifdef WT_TARGET_JAVA
    +    Wt::EventSignalBase *s = i->second.get();
    +    if (!s) {
    +      Utils::eraseAndNext(ss, i);
    +      continue;
    +    }
    +#else
    +    Wt::EventSignalBase* s = i->second;
    +#endif // WT_TARGET_JAVA
    +
    +    if (s->sender() == app)
    +      s->processPreLearnStateless(this);
    +
    +    WWidget *ww = dynamic_cast<WWidget *>(s->sender());
    +
    +    if (ww && ww->isRendered())
    +      s->processPreLearnStateless(this);
    +
    +    ++i;
    +  }
    +
    +  out << statelessJS_.str();
    +  statelessJS_.str("");
    +}
    +
    +std::string WebRenderer::learn(WStatelessSlot* slot)
    +{
    +  if (slot->type() == WStatelessSlot::PreLearnStateless)
    +    learning_ = true;
    +
    +  learningIncomplete_ = false;
    +
    +  slot->trigger();
    +
    +  std::stringstream js;
    +
    +  collectJS(&js);
    +
    +  std::string result = js.str();
    +
    +  if (slot->type() == WStatelessSlot::PreLearnStateless) {
    +    slot->undoTrigger();
    +    collectJS(0);
    +
    +    learning_ = false;
    +  } else { // AutoLearnStateless
    +    statelessJS_ << result;
    +  }
    +
    +  if (!learningIncomplete_)
    +    slot->setJavaScript(result);
    +
    +  collectJS(&statelessJS_);
    +
    +  return result;
    +}
    +
    +void WebRenderer::learningIncomplete()
    +{
    +  learningIncomplete_ = true;
    +}
    +
    +std::string WebRenderer::headDeclarations() const
    +{
    +  const bool xhtml = session_.env().contentType() == WEnvironment::XHTML1;
    +
    +  EscapeOStream result;
    +
    +  if (session_.app()) {
    +    for (unsigned i = 0; i < session_.app()->metaHeaders_.size(); ++i) {
    +      const WApplication::MetaHeader& m = session_.app()->metaHeaders_[i];
    +
    +      result << "<meta";
    +
    +      if (!m.name.empty()) {
    +	if (m.type == MetaName)
    +	  result << " name=\"";
    +	else
    +	  result << " http-equiv=\"";
    +	result.pushEscape(EscapeOStream::HtmlAttribute);
    +	result << m.name;
    +	result.popEscape();
    +	result << '"';
    +      }
    +
    +      if (!m.lang.empty()) {
    +	result << " lang=\"";
    +	result.pushEscape(EscapeOStream::HtmlAttribute);
    +	result << m.lang;
    +	result.popEscape();
    +	result << '"';
    +      }
    +
    +      result << " content=\"";
    +      result.pushEscape(EscapeOStream::HtmlAttribute);
    +      result << m.content.toUTF8();
    +      result.popEscape();
    +      result << (xhtml ? "\"/>" : "\">");
    +    }
    +  } else
    +    if (session_.env().agentIsIE()
    +	&& session_.env().agent() <= WEnvironment::IE8)
    +      result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7"
    +	     << (xhtml ? "\"/>" : "\">") << '\n';
    +
    +  if (!session_.favicon().empty())
    +    result <<
    +      "<link rel=\"icon\" "
    +      "type=\"image/vnd.microsoft.icon\" "
    +      "href=\"" << session_.favicon() << (xhtml ? "\"/>" : "\">");
    +
    +  return result.str();
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebRenderer.h b/wt-3.1.7a/src/web/WebRenderer.h
    new file mode 100644
    index 0000000..2302f8e
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebRenderer.h
    @@ -0,0 +1,144 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEBRENDERER_H_
    +#define WEBRENDERER_H_
    +
    +#include <string>
    +#include <sstream>
    +#include <vector>
    +#include <set>
    +#include "Wt/WEnvironment"
    +#include "Wt/WStatelessSlot"
    +
    +namespace Wt {
    +
    +class WebRequest;
    +class WebResponse;
    +class WebStream;
    +class DomElement;
    +class FileServe;
    +
    +class WApplication;
    +class WWidget;
    +class WWebWidget;
    +class WObject;
    +class WResource;
    +class WStatelessSlot;
    +class WWidget;
    +
    +class WT_API WebRenderer : public Wt::SlotLearnerInterface
    +{
    +public:
    +  typedef std::map<std::string, WObject *> FormObjectsMap;
    +
    +  WebRenderer(WebSession& session);
    +
    +  void setTwoPhaseThreshold(int bytes);
    +
    +  bool visibleOnly() const { return visibleOnly_; }
    +  void setVisibleOnly(bool how) { visibleOnly_ = how; }
    +
    +  void needUpdate(WWidget *w, bool laterOnly);
    +  void doneUpdate(WWidget *w);
    +  void updateFormObjects(WWebWidget *w, bool checkDescendants);
    +
    +  void updateFormObjectsList(WApplication *app);
    +  const FormObjectsMap& formObjects() const;
    +
    +  void saveChanges();
    +  void discardChanges();
    +  void letReloadJS(WebResponse& request, bool newSession,
    +		   bool embedded = false);
    +  void letReloadHTML(WebResponse& request, bool newSession);
    +
    +  bool isDirty() const;
    +
    +  void serveResponse(WebResponse& request);
    +  void serveError(WebResponse& request, const std::exception& error);
    +  void serveError(WebResponse& request, const std::string& message);
    +
    +  void setCookie(const std::string name, const std::string value,
    +		 int maxAge, const std::string domain,
    +		 const std::string path);
    +
    +  bool preLearning() const { return learning_; }
    +  void learningIncomplete();
    +
    +  void ackUpdate(int updateId);
    +
    +  void streamRedirectJS(std::ostream& out, const std::string& redirect);
    +
    +private:
    +  struct Cookie {
    +    std::string name;
    +    std::string value;
    +    std::string path;
    +    std::string domain;
    +    int maxAge;
    +
    +    Cookie(std::string n, std::string v, std::string p, std::string d, int m)
    +      : name(n), value(v), path(p), domain(d), maxAge(m) { }
    +  };
    +
    +  WebSession& session_;
    +  bool        visibleOnly_, rendered_;
    +  int         twoPhaseThreshold_;
    +  int         expectedAckId_;
    +
    +  std::vector<Cookie> cookiesToSet_;
    +
    +  FormObjectsMap currentFormObjects_;
    +  std::string	 currentFormObjectsList_;
    +  bool           formObjectsChanged_;
    +
    +  void setHeaders(WebResponse& request, const std::string mimeType);
    +
    +  void serveJavaScriptUpdate(WebResponse& response);
    +  void serveMainscript(WebResponse& response);
    +  void serveBootstrap(WebResponse& request);
    +  void serveMainpage(WebResponse& response);
    +  void serveMainAjax(WebResponse& response);
    +  void serveWidgetSet(WebResponse& request);
    +  void streamCommJs(WApplication *app, std::ostream& out);
    +  void collectJavaScript();
    +
    +  void collectChanges(std::vector<DomElement *>& changes);
    +
    +  void collectJavaScriptUpdate(std::ostream& out);
    +  void loadStyleSheets(std::ostream& out, WApplication *app);
    +  void loadScriptLibraries(std::ostream& out, WApplication *app, bool start);
    +  void updateLoadIndicator(std::ostream& out, WApplication *app, bool all);
    +  void setJSSynced(bool invisibleToo);
    +
    +  std::string createFormObjectsList(WApplication *app);
    +
    +  void              preLearnStateless(WApplication *app, std::ostream& out);
    +  std::stringstream collectedJS1_, collectedJS2_, invisibleJS_, statelessJS_,
    +                    beforeLoadJS_;
    +  void              collectJS(std::ostream *js);
    +
    +  void setPageVars(FileServe& page);
    +  void setBootVars(WebResponse& response, FileServe& boot);
    +
    +  std::string headDeclarations() const;
    +
    +  typedef std::set<WWidget *> UpdateMap;
    +  UpdateMap updateMap_;
    +  bool      learning_, learningIncomplete_;
    +  bool      moreUpdates_;
    +
    +  std::string safeJsStringLiteral(const std::string& value);
    +
    +public:
    +  std::string       learn(WStatelessSlot* slot);
    +
    +  friend class WApplication;
    +};
    +
    +}
    +
    +#endif // WEBRENDERER_H_
    diff --git a/wt-3.1.7a/src/web/WebRequest.C b/wt-3.1.7a/src/web/WebRequest.C
    new file mode 100644
    index 0000000..cd24d41
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebRequest.C
    @@ -0,0 +1,265 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "WebRequest.h"
    +#include "WtException.h"
    +
    +#include <cstdlib>
    +
    +#ifndef WT_NO_SPIRIT
    +
    +#include <boost/version.hpp>
    +
    +#if BOOST_VERSION < 103600
    +#include <boost/spirit.hpp>
    +#else
    +#include <boost/spirit/include/classic.hpp>
    +#endif
    +
    +#include <boost/bind.hpp>
    +
    +#endif // WT_NO_SPIRIT
    +
    +using std::atoi;
    +
    +namespace Wt {
    +
    +Http::ParameterValues WebRequest::emptyValues_;
    +
    +WebRequest::WebRequest()
    +  : entryPoint_(0),
    +    doingAsyncCallbacks_(false)
    +{ }
    +
    +WebRequest::~WebRequest()
    +{ }
    +
    +void WebRequest::readWebSocketMessage(CallbackFunction callback)
    +{ 
    +  throw WtException("should not get here");
    +}
    +
    +bool WebRequest::webSocketMessagePending() const
    +{
    +  throw WtException("should not get here");
    +}
    +
    +std::string WebRequest::userAgent() const
    +{
    +  return headerValue("User-Agent");
    +}
    +
    +std::string WebRequest::referer() const
    +{
    +  return headerValue("Referer");
    +}
    +
    +std::string WebRequest::contentType() const
    +{
    +  return envValue("CONTENT_TYPE");
    +}
    +
    +int WebRequest::contentLength() const
    +{
    +  std::string lenstr = envValue("CONTENT_LENGTH");
    +
    +  if (lenstr.empty())
    +    return 0;
    +  else
    +    return atoi(lenstr.c_str());
    +}
    +
    +const std::string *WebRequest::getParameter(const std::string& name) const
    +{
    +  const Http::ParameterValues& values = getParameterValues(name);
    +
    +  return !values.empty() ? &values[0] : 0;
    +}
    +
    +const Http::ParameterValues&
    +WebRequest::getParameterValues(const std::string& name) const
    +{
    +  Http::ParameterMap::const_iterator i = parameters_.find(name);
    +  if (i != parameters_.end())
    +    return i->second;
    +  else
    +    return emptyValues_;
    +}
    +
    +#ifndef WT_NO_SPIRIT
    +namespace {
    +#if BOOST_VERSION < 103600
    +  using namespace boost::spirit;
    +#else
    +  using namespace boost::spirit::classic;
    +#endif
    +
    +  using namespace boost;
    +
    +  /*
    +   * My first spirit parser -- spirit is nifty !
    +   *
    +   * Parses things like:
    +   *  nl-be,en-us;q=0.7,en;q=0.3
    +   *  ISO-8859-1,utf-8;q=0.7,*;q=0.7
    +   *
    +   * And store the values with indicated qualities.
    +   */
    +  class ValueListParser : public grammar<ValueListParser>
    +  {
    +  public:
    +    struct Value {
    +      std::string value;
    +      double quality;
    +
    +      Value(std::string v, double q) : value(v), quality(q) { }
    +    };
    +
    +    ValueListParser(std::vector<Value>& values)
    +      : values_(values)
    +    { }
    +
    +  private:
    +    std::vector<Value>& values_;
    +
    +    void setQuality(double v) const {
    +      values_.back().quality = v;
    +    }
    +
    +    void addValue(char const* str, char const* end) const {
    +      values_.push_back(Value(std::string(str, end), 1.));
    +    }
    +
    +    typedef ValueListParser self_t;
    +
    +  public:
    +    template <typename ScannerT>
    +    struct definition
    +    {
    +      definition(ValueListParser const& self)
    +      {
    +	option 
    +	  = ((ch_p('q') | ch_p('Q'))
    +	     >> '=' 
    +	     >> ureal_p
    +	        [
    +		  bind(&self_t::setQuality, self, _1)
    +		]
    +	     )
    +	  | (+alpha_p >> '=' >> +alnum_p)
    +	  ;
    +
    +	value
    +	  = lexeme_d[(alpha_p >> +(alpha_p | '-')) | '*']
    +	    [
    +	       bind(&self_t::addValue, self, _1, _2)
    +	    ]
    +	    >> !( ';' >> option )
    +	  ;
    +
    +	valuelist
    +	  = !(value  >> *(',' >> value )) >> end_p
    +	  ;
    +      }
    +
    +      rule<ScannerT> option, value, valuelist;
    +
    +      rule<ScannerT> const&
    +      start() const { return valuelist; }
    +    };
    +  };
    +};
    +
    +WT_LOCALE WebRequest::parsePreferredAcceptValue(const std::string& str) const
    +{
    +  std::vector<ValueListParser::Value> values;
    +
    +  ValueListParser valueListParser(values);
    +
    +  parse_info<> info = parse(str.c_str(), valueListParser, space_p);
    +
    +  if (info.full) {
    +    unsigned best = 0;
    +    for (unsigned i = 1; i < values.size(); ++i) {
    +      if (values[i].quality > values[best].quality)
    +	best = i;
    +    }
    +
    +    if (best < values.size())
    +      return values[best].value;
    +    else
    +      return "";
    +  } else {
    +    // wApp is not yet initialized here
    +    std::cerr << "Could not parse 'Accept-Language: "
    +	      << str << "', stopped at: '" << info.stop 
    +	      << '\'' << std::endl;
    +    return "";
    +  }
    +}
    +
    +#else
    +WT_LOCALE WebRequest::parsePreferredAcceptValue(const std::string& str) const
    +{
    +  return std::string();
    +}
    +#endif // WT_NO_SPIRIT
    +
    +WT_LOCALE WebRequest::parseLocale() const
    +{
    +  return parsePreferredAcceptValue(headerValue("Accept-Language"));
    +}
    +
    +void WebRequest::setAsyncCallback(boost::function<void(void)> cb)
    +{
    +  asyncCallback_ = cb;
    +}
    +
    +boost::function<void(void)> WebRequest::getAsyncCallback()
    +{
    +  return asyncCallback_;
    +}
    +
    +void WebRequest::emulateAsync(ResponseState state)
    +{
    +  /*
    +   * This prevents stack build-up while emulating asynchronous callbacks
    +   * for a synchronous connector.
    +   */
    +
    +  if (state == ResponseFlush) {
    +    if (doingAsyncCallbacks_) {
    +      // Do nothing. emulateAsync() was already called on this stack frame.
    +      // Unwind the stack and let the toplevel emulateAsync() call the cb.
    +    } else {
    +      doingAsyncCallbacks_ = true;
    +
    +      while (asyncCallback_) {
    +	boost::function<void(void)> fn = asyncCallback_;
    +	asyncCallback_.clear();
    +	fn();
    +      };
    +
    +      doingAsyncCallbacks_ = false;
    +
    +      delete this;
    +    }
    +  } else {
    +    if (!doingAsyncCallbacks_)
    +      delete this;
    +    else {
    +      // we should in fact signal that we can delete after stopping the
    +      // asynccallbacks (e.g. by setting doingAsyncCallbacks_ = false
    +    }
    +  }
    +}
    +
    +void WebRequest::setResponseType(ResponseType responseType)
    +{
    +  responseType_ = responseType;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebRequest.h b/wt-3.1.7a/src/web/WebRequest.h
    new file mode 100644
    index 0000000..b3e3c15
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebRequest.h
    @@ -0,0 +1,220 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEB_REQUEST_H_
    +#define WEB_REQUEST_H_
    +
    +#include <iostream>
    +#include <Wt/WDllDefs.h>
    +#include <Wt/WGlobal>
    +#include <Wt/Http/Request>
    +
    +#include <boost/cstdint.hpp>
    +#include <boost/function.hpp>
    +
    +namespace Wt {
    +
    +class EntryPoint;
    +
    +/*
    + * A single, raw, HTTP request/response, which conveys all of the http-related
    + * information to the application and gathers the response.
    + */
    +class WT_API WebRequest
    +{
    +public:
    +  WebRequest();
    +
    +  enum ResponseState {
    +    ResponseDone,
    +    ResponseFlush
    +  };
    +
    +  enum ResponseType {
    +    Page,
    +    Script,
    +    Update
    +  };
    +
    +  typedef boost::function<void(void)> CallbackFunction;
    +
    +  void startAsync() { }
    +
    +  /*
    +   * Signal that the response should be flushed.
    +   *
    +   * ResponseDone: flush & close
    +   *
    +   * ResponseFlush: flush what we have so far, do not close
    +   *  - callback must be specified for ResponseFlush, and is called
    +   *    if more data can be written. Until then, you cannot do new
    +   *    writes.
    +   */
    +  virtual void flush(ResponseState state = ResponseDone,
    +		     CallbackFunction callback = CallbackFunction()) = 0;
    +
    +  /*
    +   * For a web socket request (isWebSocketRequest()), read a message
    +   * and call the given callback function when done.
    +   *
    +   * The new message is available in in() and has length contentLength()
    +   */
    +  virtual void readWebSocketMessage(CallbackFunction callback);
    +
    +  /*
    +   * For a web socket request (isWebSocketRequest()), returns whether
    +   * more data is available. This is used to defer a response but wait
    +   * for more incoming events.
    +   */
    +  virtual bool webSocketMessagePending() const;
    +
    +  /*
    +   * Access the stream that contains the request body (HTTP) or a
    +   * single message (WS)
    +   */
    +  virtual std::istream& in() = 0;
    +
    +  /*
    +   * Access the stream to submit the response.
    +   *
    +   * This is either the entire response body (HTTP), or a single response
    +   * message (WS)
    +   */
    +  virtual std::ostream& out() = 0;
    +
    +  WT_BOSTREAM& bout() { return out(); }
    +
    +  /*
    +   * (Not used)
    +   */
    +  virtual std::ostream& err() = 0;
    +
    +  /*
    +   * Sets the redirect (instead of anything else).
    +   */
    +  virtual void setRedirect(const std::string& url) = 0;
    +
    +  /*
    +   * Sets the status
    +   */
    +  virtual void setStatus(int status) = 0;
    +
    +  /*
    +   * Sets the content-type for a normal response.
    +   */
    +  virtual void setContentType(const std::string& value) = 0;
    +
    +  /*
    +   * Sets the content-length for a normal response.
    +   */
    +  virtual void setContentLength(::int64_t length) = 0;
    +
    +  /*
    +   * Adds a header for a normal response.
    +   */
    +  virtual void addHeader(const std::string& name, const std::string& value) = 0;
    +
    +  /*
    +   * Returns request information, which are not http headers.
    +   */
    +  virtual std::string envValue(const std::string& name) const = 0;
    +
    +  virtual std::string serverName() const = 0;
    +  virtual std::string serverPort() const = 0;
    +  virtual std::string scriptName() const = 0;
    +  virtual std::string requestMethod() const = 0;
    +  virtual std::string queryString() const = 0;
    +  virtual std::string pathInfo() const = 0;
    +  virtual std::string remoteAddr() const = 0;
    +
    +  virtual std::string urlScheme() const = 0;
    +
    +  virtual bool isWebSocketMessage() const {
    +    return false;
    +  }
    +
    +  bool isWebSocketRequest() const {
    +    std::string s = urlScheme();
    +    return s == "ws" || s == "wss";
    +  }
    +
    +  /*
    +   * Accesses to cgi environment variables and headers -- rfc2616 name 
    +   */
    +  virtual std::string headerValue(const std::string& name) const = 0;
    +
    +  /*
    +   * Accesses to specific header fields (calls headerValue()).
    +   */
    +  std::string userAgent() const;
    +  std::string referer() const;
    +
    +  /*
    +   * Accesses to specific information, which are not http headers
    +   * (calls envValue())
    +   */
    +  std::string contentType() const;
    +  int         contentLength() const;
    +
    +#ifdef WT_TARGET_JAVA
    +  /*
    +   * In J2E, the servlet determines how session tracking is encoded in
    +   * the URL.
    +   */
    +  std::string encodeURL(const std::string& url) const;
    +#endif // WT_TARGET_JAVA
    +
    +  const std::string *getParameter(const std::string& name) const;
    +  const Http::ParameterValues& getParameterValues(const std::string& name) const;
    +  const Http::ParameterMap& getParameterMap() const { return parameters_; }
    +  const Http::UploadedFileMap& uploadedFiles() const { return files_; }
    +  ::int64_t postDataExceeded() const { return postDataExceeded_; }
    +
    +  WT_LOCALE parseLocale() const;
    +
    +  void setResponseType(ResponseType responseType);
    +  ResponseType responseType() const { return responseType_; }
    +
    +protected:
    +  const EntryPoint *entryPoint_;
    +  bool doingAsyncCallbacks_;
    +
    +  void emulateAsync(ResponseState state);
    +
    +  virtual ~WebRequest();
    +
    +#ifndef WT_CNOR
    +  void setAsyncCallback(boost::function<void(void)> cb);
    +  boost::function<void(void)> getAsyncCallback();
    +#endif // WT_CNOR
    +
    +private:
    +  std::string parsePreferredAcceptValue(const std::string& value) const;
    +
    +  ::int64_t             postDataExceeded_;
    +  Http::ParameterMap    parameters_;
    +  Http::UploadedFileMap files_;
    +  ResponseType          responseType_;
    +
    +  static Http::ParameterValues emptyValues_;
    +
    +#ifndef WT_CNOR
    +  boost::function<void(void)> asyncCallback_;
    +#endif // WT_CNOR
    +
    +  friend class CgiParser;
    +  friend class Http::Request;
    +  friend class WEnvironment;
    +  friend class WebController;
    +};
    +
    +class WebResponse : public WebRequest
    +{
    +};
    +
    +}
    +
    +#endif // WEB_REQUEST_H_
    diff --git a/wt-3.1.7a/src/web/WebSession.C b/wt-3.1.7a/src/web/WebSession.C
    new file mode 100644
    index 0000000..992fefc
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebSession.C
    @@ -0,0 +1,1772 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <algorithm>
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "Wt/WApplication"
    +#include "Wt/WCombinedLocalizedStrings"
    +#include "Wt/WContainerWidget"
    +#include "Wt/WFormWidget"
    +#include "Wt/WResource"
    +#include "Wt/WTimerWidget"
    +#include "Wt/Http/Request"
    +#include "Wt/Http/Response"
    +
    +#include "CgiParser.h"
    +#include "Configuration.h"
    +#include "DomElement.h"
    +#include "Utils.h"
    +#include "WebController.h"
    +#include "WebRequest.h"
    +#include "WebSession.h"
    +#include "WebSocketMessage.h"
    +#include "WtException.h"
    +
    +#include <boost/algorithm/string.hpp>
    +#ifndef _MSC_VER
    +#include <unistd.h>
    +#endif
    +
    +#ifdef WT_TARGET_JAVA
    +#define RETHROW(e) throw e
    +#else
    +#define RETHROW(e) throw
    +#endif
    +
    +namespace {
    +  #ifdef WT_TARGET_JAVA
    +  static Wt::Http::UploadedFile* uf;
    +  #endif
    +}
    +
    +namespace Wt {
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +boost::thread_specific_ptr<WebSession::Handler> WebSession::threadHandler_;
    +#else
    +WebSession::Handler * WebSession::threadHandler_;
    +#endif
    +
    +WebSession::WebSession(WebController *controller,
    +		       const std::string& sessionId,
    +		       EntryPointType type,
    +		       const std::string& favicon,
    +                       const WebRequest *request,
    +		       WEnvironment *env)
    +  : type_(type),
    +    favicon_(favicon),
    +    state_(JustCreated),
    +    sessionId_(sessionId),
    +    controller_(controller),
    +    renderer_(*this),
    +    asyncResponse_(0),
    +    updatesPending_(false),
    +    canWriteAsyncResponse_(false),
    +    embeddedEnv_(this),
    +    app_(0),
    +    debug_(controller_->configuration().debug()),
    +    recursiveEventLoop_(0)
    +#if defined(WT_TARGET_JAVA)
    +  ,
    +    recursiveEvent_(mutex_.newCondition())
    +#endif
    +{
    +#ifdef WT_THREADED
    +  syncLocks_.lastId_ = syncLocks_.lockedId_ = 0;
    +#endif // WT_THREADED
    +
    +  env_ = env ? env : &embeddedEnv_;
    +
    +  /*
    +   * Obtain the applicationName_ as soon as possible for log().
    +   */
    +  if (request)
    +    deploymentPath_ = request->scriptName();
    +  else
    +    deploymentPath_ = "/";
    +
    +  applicationUrl_ = deploymentPath_;
    +
    +  applicationName_ = applicationUrl_;
    +  baseUrl_ = applicationUrl_;
    +
    +  std::string::size_type slashpos = applicationName_.rfind('/');
    +  if (slashpos != std::string::npos) {
    +    applicationName_ = applicationName_.substr(slashpos + 1);
    +    baseUrl_ = baseUrl_.substr(0, slashpos+1);
    +  }
    +
    +#ifndef WT_TARGET_JAVA
    +  log("notice") << "Session created (#sessions = "
    +		<< (controller_->sessionCount() + 1)
    +		<< ")";
    +
    +  expire_ = Time() + 60*1000;
    +#else  // WT_TARGET_JAVA
    +  log("notice") << "Session created";
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WebSession::setApplication(WApplication *app)
    +{
    +  app_ = app;
    +}
    +
    +WLogEntry WebSession::log(const std::string& type)
    +{
    +  Configuration& conf = controller_->configuration();
    +  WLogEntry e = conf.logger().entry();
    +
    +#ifndef WT_TARGET_JAVA
    +  e << WLogger::timestamp << WLogger::sep
    +    << conf.pid() << WLogger::sep
    +    << '[' << baseUrl_ << applicationName_ << ' ' << sessionId()
    +    << ']' << WLogger::sep
    +    << '[' << type << ']' << WLogger::sep;
    +#endif // WT_TARGET_JAVA
    +
    +  return e;
    +}
    +
    +WebSession::~WebSession()
    +{
    +  /*
    +   * From here on, we cannot create a shared_ptr to this session. Therefore,
    +   * app_ uses a weak_ptr to this session for which lock() returns an empty
    +   * shared pointer.
    +   */
    +#ifndef WT_TARGET_JAVA
    +  Handler handler(this);
    +
    +  if (app_)
    +    app_->notify(WEvent());
    +
    +  delete app_;
    +#endif // WT_TARGET_JAVA
    +
    +  if (asyncResponse_) {
    +    asyncResponse_->flush();
    +    asyncResponse_ = 0;
    +  }
    +
    +#ifndef WT_TARGET_JAVA
    +  unlink(controller_->configuration().sessionSocketPath(sessionId_).c_str());
    +
    +  log("notice") << "Session destroyed (#sessions = "
    +		<< controller_->sessionCount() << ")";
    +#else // WT_TARGET_JAVA
    +  log("notice") << "Session destroyed";
    +#endif // WT_TARGET_JAVA
    +
    +}
    +
    +std::string WebSession::docType() const
    +{
    +  const bool xhtml = env_->contentType() == WEnvironment::XHTML1;
    +
    +  if (xhtml)
    +    /*
    +     * This would be what we want, but it is too strict (does not
    +     * validate iframe's and target attribute for links):
    +     
    +     "\"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN\" "
    +     "\"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\">"
    +     * so instead we use transitional xhtml -- it will fail to
    +     * validate properly when we have svg !
    +     */ 
    +    return "<!DOCTYPE html PUBLIC "
    +      "\"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
    +      "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
    +  else
    +    return "<!DOCTYPE html PUBLIC "
    +      "\"-//W3C//DTD HTML 4.01 Transitional//EN\" "
    +      "\"http://www.w3.org/TR/html4/loose.dtd\">";
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +bool WebSession::shouldDisconnect() const
    +{
    +  return state_ == Loaded && controller_->configuration().persistentSessions();
    +}
    +#endif // WT_TARGET_JAVA
    +
    +void WebSession::setLoaded()
    +{
    +  setState(Loaded, controller_->configuration().sessionTimeout());
    +}
    +
    +void WebSession::setState(State state, int timeout)
    +{
    +#ifdef WT_THREADED
    +  // this assertion is not true for when we are working from an attached
    +  // thread: that thread does not have an associated handler, but its contract
    +  // dictates that it should work on behalf of a thread that has the lock.
    +  //assert(WebSession::Handler::instance()->lock().owns_lock());
    +#endif // WT_THREADED
    +
    +  if (state_ != Dead) {
    +    state_ = state;
    +
    +#ifndef WT_TARGET_JAVA
    +    expire_ = Time() + timeout*1000;
    +#endif // WT_TARGET_JAVA
    +  }
    +}
    +
    +std::string WebSession::sessionQuery() const
    +{
    +  // the session query is used for all requests (except for reload if the
    +  // session is not in the main url), to prevent CSRF.
    +
    +  return "?wtd=" + sessionId_;
    +}
    +
    +void WebSession::init(const WebRequest& request)
    +{
    +  env_->init(request);
    +
    +  const std::string *hashE = request.getParameter("_");
    +
    +  absoluteBaseUrl_ = env_->urlScheme() + "://" + env_->hostName() + baseUrl_;
    +
    +  bookmarkUrl_ = applicationName_;
    +
    +  if (applicationName_.empty())
    +    bookmarkUrl_ = applicationUrl_;
    +
    +  if (type() == WidgetSet) {
    +    /*
    +     * We are embedded in another website: we only use absolute URLs.
    +     */
    +    applicationUrl_ = env_->urlScheme() + "://" + env_->hostName()
    +      + applicationUrl_;
    +
    +    bookmarkUrl_ = applicationUrl_;
    +  }
    +
    +  std::string path = request.pathInfo();
    +  if (path.empty() && hashE)
    +    path = *hashE;
    +  env_->setInternalPath(path);
    +}
    +
    +std::string WebSession::bootstrapUrl(const WebResponse& response,
    +				     BootstrapOption option) const
    +{
    +  switch (option) {
    +  case KeepInternalPath: {
    +    std::string url, internalPath;
    +
    +    if (applicationName_.empty()) {
    +      internalPath = app_ ? app_->internalPath() : env_->internalPath();
    +
    +      if (internalPath.length() > 1)
    +	url = "?_=" + Utils::urlEncode(internalPath);
    +
    +      if (type() == WidgetSet)
    +	url = applicationUrl_ + url;
    +    } else {
    +      internalPath = WebSession::Handler::instance()->request()->pathInfo();
    +
    +      if (type() != WidgetSet) {
    +	/*
    +	 * Java application servers use ";jsessionid=..." which generates
    +	 * URLs relative to the current directory, not current filename
    +	 * (unlike '?=...')
    +	 *
    +	 * Therefore we start with the current 'filename', this does no harm
    +	 * for C++ well behaving servers either.
    +	 */
    +	if (internalPath.length() > 1) {
    +	  std::string lastPart
    +	    = internalPath.substr(internalPath.rfind('/') + 1);
    +
    +	  url = lastPart;
    +	} else
    +	  url = applicationName_;
    +      } else
    +	url = applicationUrl_ + internalPath;
    +    }
    +
    +    return appendSessionQuery(url);
    +  }
    +  case ClearInternalPath: {
    +    if (type() != WidgetSet) {
    +      if (WebSession::Handler::instance()->request()->pathInfo().length() > 1)
    +	return appendSessionQuery(baseUrl_ + applicationName_);
    +      else
    +	return appendSessionQuery(applicationName_);
    +    } else {
    +      return appendSessionQuery(applicationUrl_);
    +    }
    +  }
    +  default:
    +    assert(false);
    +  }
    +
    +  return std::string();
    +}
    +
    +std::string WebSession::mostRelativeUrl(const std::string& internalPath) const
    +{
    +  return appendSessionQuery(bookmarkUrl(internalPath));
    +}
    +
    +std::string WebSession::appendSessionQuery(const std::string& url) const
    +{
    +  std::string result = url;
    +  
    +  if (env_->agentIsSpiderBot())
    +    return result;
    +
    +  std::size_t questionPos = result.find('?');
    +
    +  if (questionPos == std::string::npos)
    +    result += sessionQuery();
    +  else if (questionPos == result.length() - 1)
    +    result += sessionQuery().substr(1);
    +  else
    +    result += '&' + sessionQuery().substr(1);
    +
    +#ifndef WT_TARGET_JAVA
    +  return result;
    +#else
    +  if (boost::starts_with(result, "?"))
    +    result = applicationUrl_ + result;
    +  
    +  if (WebSession::Handler::instance()->response())
    +    return WebSession::Handler::instance()->response()->encodeURL(result);
    +  
    +return url;
    +#endif // WT_TARGET_JAVA
    +}
    +
    +std::string WebSession::bookmarkUrl() const
    +{
    +  if (app_)
    +    return bookmarkUrl(app_->internalPath());
    +  else
    +    return bookmarkUrl(env_->internalPath());
    +}
    +
    +std::string WebSession::bookmarkUrl(const std::string& internalPath) const
    +{
    +  std::string result = bookmarkUrl_;
    +
    +  // Without Ajax, we either should use an absolute URL, or a relative
    +  // url that takes into account the internal path of the current request.
    +  //
    +  // For now, we make an absolute URL, and will fix this in Wt 3.0 since
    +  // there we always know the current request (?)
    +  if (!env_->ajax() && result.find("://") == std::string::npos
    +      && (env_->internalPath().length() > 1 || internalPath.length() > 1))
    +    result = baseUrl_ + applicationName_;
    +
    +  return appendInternalPath(result, internalPath);
    +}
    +
    +std::string WebSession::appendInternalPath(const std::string& baseUrl,
    +					   const std::string& internalPath)
    +  const
    +{
    +  if (internalPath.empty() || internalPath == "/")
    +    if (baseUrl.empty())
    +      return "?";
    +    else
    +      return baseUrl;
    +  else {
    +    if (applicationName_.empty())
    +      return baseUrl + "?_=" + Utils::urlEncode(internalPath);
    +    else
    +      return baseUrl + Utils::urlEncode(internalPath);
    +  }
    +}
    +
    +bool WebSession::start()
    +{
    +  try {
    +    app_ = controller_->doCreateApplication(this);
    +  } catch (std::exception& e) {
    +    app_ = 0;
    +
    +    kill();
    +    RETHROW(e);
    +  } catch (...) {
    +    app_ = 0;
    +
    +    kill();
    +    throw;
    +  }
    +
    +  return app_;
    +}
    +
    +std::string WebSession::getCgiValue(const std::string& varName) const
    +{
    +  WebRequest *request = WebSession::Handler::instance()->request();
    +  if (request)
    +    return request->envValue(varName);
    +  else
    +    return std::string();
    +}
    +
    +std::string WebSession::getCgiHeader(const std::string& headerName) const
    +{
    +  WebRequest *request = WebSession::Handler::instance()->request();
    +  if (request)
    +    return request->headerValue(headerName);
    +  else
    +    return std::string();
    +}
    +
    +void WebSession::kill()
    +{
    +  state_ = Dead;
    +
    +  /*
    +   * Unlock the recursive eventloop that may be pending.
    +   */
    +  unlockRecursiveEventLoop();
    +}
    +
    +void WebSession::checkTimers()
    +{
    +  WContainerWidget *timers = app_->timerRoot();
    +
    +  const std::vector<WWidget *>& timerWidgets = timers->children();
    +
    +  std::vector<WTimerWidget *> expired;
    +
    +  for (unsigned i = 0; i < timerWidgets.size(); ++i) {
    +    WTimerWidget *wti = dynamic_cast<WTimerWidget *>(timerWidgets[i]);
    +
    +    if (wti->timerExpired())
    +      expired.push_back(wti);
    +  }
    +
    +  WMouseEvent dummy;
    +
    +  for (unsigned i = 0; i < expired.size(); ++i)
    +    expired[i]->clicked().emit(dummy);
    +}
    +
    +void WebSession::redirect(const std::string& url)
    +{
    +  redirect_ = url;
    +  if (redirect_.empty())
    +    redirect_ = "?";
    +}
    +
    +std::string WebSession::getRedirect()
    +{
    +  std::string result = redirect_;
    +  redirect_.clear();
    +  return result;
    +}
    +
    +WebSession::Handler::Handler()
    +  : 
    +    prevHandler_(0),
    +    session_(0),
    +    request_(0),
    +    response_(0)
    +{
    +#ifdef WT_TARGET_JAVA
    +  locked_ = true;
    +#endif // WT_TARGET_JAVA
    +
    +  init();
    +}
    +
    +WebSession::Handler::Handler(boost::shared_ptr<WebSession> session,
    +			     bool takeLock)
    +  : 
    +#ifdef WT_THREADED
    +    lock_(session->mutex_, boost::defer_lock),
    +#endif // WT_THREADED
    +    prevHandler_(0),
    +    session_(session.get()),
    +#ifndef WT_TARGET_JAVA
    +    sessionPtr_(session),
    +#endif // WT_TARGET_JAVA
    +    request_(0),
    +    response_(0)
    +{
    +#ifdef WT_THREADED
    +  if (takeLock)
    +    lock_.lock();
    +#endif
    +#ifdef WT_TARGET_JAVA
    +  if (takeLock) {
    +    session->mutex().lock();
    +    locked_ = true;
    +  }
    +#endif // WT_TARGET_JAVA
    +
    +  init();
    +}
    +
    +WebSession::Handler::Handler(WebSession *session)
    +  : prevHandler_(0),
    +    session_(session),
    +    request_(0),
    +    response_(0)
    +{
    +  init();
    +}
    +
    +WebSession::Handler::Handler(boost::shared_ptr<WebSession> session,
    +			     WebRequest& request, WebResponse& response)
    +  :
    +#ifdef WT_THREADED
    +    lock_(session->mutex_),
    +#endif // WT_THREADED
    +    prevHandler_(0),
    +    session_(session.get()),
    +#ifndef WT_TARGET_JAVA
    +    sessionPtr_(session),
    +#endif // WT_TARGET_JAVA
    +    request_(&request),
    +    response_(&response)
    +{
    +#ifdef WT_TARGET_JAVA
    +  session->mutex().lock();
    +  locked_ = true;
    +#endif
    +
    +  init();
    +}
    +
    +WebSession::Handler *WebSession::Handler::instance()
    +{
    +#if defined(WT_TARGET_JAVA) || defined(WT_THREADED)
    +  return threadHandler_.get();
    +#else
    +  return threadHandler_;
    +#endif // WT_TARGET_JAVA || WT_THREADED
    +}
    +
    +bool WebSession::Handler::haveLock() const
    +{
    +#ifdef WT_THREADED
    +  return lock_.owns_lock();
    +#else
    +#ifdef WT_TARGET_JAVA
    +  return locked_;
    +#else
    +  return false;
    +#endif
    +#endif // WT_THREADED
    +}
    +
    +void WebSession::Handler::init()
    +{
    +  prevHandler_ = attachThreadToHandler(this);
    +
    +#ifndef WT_TARGET_JAVA
    +  if (request_)
    +    session_->handlers_.push_back(this);
    +#endif
    +}
    +
    +WebSession::Handler *
    +WebSession::Handler::attachThreadToHandler(Handler *handler)
    +{
    +  WebSession::Handler *result;
    +
    +#if defined(WT_TARGET_JAVA) || defined(WT_THREADED)
    +  result = threadHandler_.release();
    +  threadHandler_.reset(handler);
    +#else
    +  result = threadHandler_;
    +  threadHandler_ = handler;
    +#endif
    +
    +  return result;
    +}
    +
    +void WebSession
    +::Handler::attachThreadToSession(boost::shared_ptr<WebSession> session)
    +{
    +  attachThreadToHandler(0);
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  if (!session.get())
    +    return;
    +
    +  /*
    +   * It may be that we still need to attach to a session while it is being
    +   * destroyed ?
    +   */
    +  if (session->state_ == Dead) {
    +    session->log("warn") << "Attaching to dead session?";
    +    attachThreadToHandler(new Handler(session, false));
    +    return;
    +  }
    +
    +  /*
    +   * We assume that another handler has already locked this session for us.
    +   * We just need to find it.
    +   */
    +  for (unsigned i = 0; i < session->handlers_.size(); ++i)
    +    if (session->handlers_[i]->haveLock()) {
    +      attachThreadToHandler(session->handlers_[i]);
    +      return;
    +    }
    +
    +  session->log("error") << "WApplication::attachThread(): "
    +			<< "no thread is holding this application's lock ?";
    +#else
    +  session->log("error") << "WApplication::attachThread(): "
    +			<< "needs Wt built with threading enabled";
    +#endif // WT_THREADED || WT_TARGET_JAVA
    +}
    +
    +#ifdef WT_TARGET_JAVA
    +void WebSession::Handler::release()
    +{
    +  if (locked_)
    +    session_->mutex().unlock();
    +
    +  attachThreadToHandler(prevHandler_);
    +}
    +#endif
    +
    +WebSession::Handler::~Handler()
    +{
    +#ifndef WT_TARGET_JAVA
    +  Utils::erase(session_->handlers_, this);
    +
    +  if (session_->handlers_.empty())
    +    session_->hibernate();
    +
    +  attachThreadToHandler(prevHandler_);
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WebSession::Handler::setRequest(WebRequest *request,
    +				     WebResponse *response)
    +{
    +  request_ = request;
    +  response_ = response;
    +}
    +
    +void WebSession::hibernate()
    +{
    +  if (app_ && app_->localizedStrings_)
    +    app_->localizedStrings_->hibernate();
    +}
    +
    +EventSignalBase *WebSession::decodeSignal(const std::string& signalId)
    +{
    +  EventSignalBase *result = app_->decodeExposedSignal(signalId);
    +
    +  if (result)
    +    return result;
    +  else {
    +    log("error") << "decodeSignal(): signal '"
    +		 << signalId << "' not exposed";
    +    return 0;
    +  }
    +}
    +
    +EventSignalBase *WebSession::decodeSignal(const std::string& objectId,
    +					  const std::string& name)
    +{
    +  EventSignalBase *result = app_->decodeExposedSignal(objectId, name);
    +
    +  if (result)
    +    return result;
    +  else {
    +    log("error") << "decodeSignal(): signal '"
    +		 << objectId << '.' << name << "' not exposed";
    +    return 0;
    +  }
    +}
    +
    +WebSession *WebSession::instance()
    +{
    +  Handler *handler = WebSession::Handler::instance();
    +  return handler ? handler->session() : 0;
    +}
    +
    +void WebSession::pushEmitStack(WObject *o)
    +{
    +  emitStack_.push_back(o);
    +}
    +
    +void WebSession::popEmitStack()
    +{
    +  emitStack_.pop_back();
    +}
    +
    +WObject *WebSession::emitStackTop()
    +{
    +  if (!emitStack_.empty())
    +    return emitStack_.back();
    +  else
    +    return 0;
    +}
    +
    +void WebSession::doRecursiveEventLoop()
    +{
    +#if !defined(WT_THREADED) && !defined(WT_TARGET_JAVA)
    +  log("error") << "Cannot do recursive event loop without threads";
    +#else // WT_THREADED
    +
    +#ifdef WT_TARGET_JAVA
    +  if (!WebController::isAsyncSupported())
    +    throw WtException("Recursive event loop requires a Servlet 3.0 API.");
    +#endif
    +  
    +  /*
    +   * Finish the request that is being handled
    +   */
    +  Handler *handler = WebSession::Handler::instance();
    +
    +  /*
    +   * It could be that handler does not have a request/respone:
    +   *  if it is actually a long polling server push request.
    +   *  if we are somehow recursing recursive event loops (can anyone explain
    +   *  that ?)
    +   *
    +   * In that case, we do not need to finish it.
    +   */
    +  if (handler->request())
    +    handler->session()->notifySignal(WEvent(*handler));
    +
    +  if (handler->response())
    +    handler->session()->render(*handler);
    +
    +  /*
    +   * Register that we are doing a recursive event loop, this is used in
    +   * handleRequest() to let the recursive event loop do the actual
    +   * notification.
    +   */
    +  recursiveEventLoop_ = handler;
    +  newRecursiveEvent_ = false;
    +
    +  /*
    +   * Release session mutex lock, wait for recursive event, and retake
    +   * the session mutex lock.
    +   */
    +#ifndef WT_TARGET_JAVA
    +  if (asyncResponse_ && asyncResponse_->isWebSocketRequest())
    +    asyncResponse_->readWebSocketMessage
    +     (boost::bind(&WebSession::handleWebSocketMessage, shared_from_this()));
    +
    +  while (!newRecursiveEvent_)
    +    recursiveEvent_.wait(handler->lock());
    +#else
    +  while (!newRecursiveEvent_)
    +    recursiveEvent_.wait();
    +#endif
    +
    +  if (state_ == Dead) {
    +    recursiveEventLoop_ = 0;
    +    throw WtException("doRecursiveEventLoop(): session was killed");
    +  }
    +
    +  /*
    +   * We use recursiveEventLoop_ != null to postpone rendering: we only want
    +   * the event handling part.
    +   */
    +  app_->notify(WEvent(*handler));
    +
    +  recursiveEventLoop_ = 0;
    +#endif // !WT_THREADED && !WT_TARGET_JAVA
    +}
    +
    +void WebSession::expire()
    +{
    +  kill();
    +}
    +
    +bool WebSession::unlockRecursiveEventLoop()
    +{
    +  if (!recursiveEventLoop_)
    +    return false;
    +
    +  /*
    +   * Locate both the current and previous event loop handler.
    +   */
    +  Handler *handler = WebSession::Handler::instance();
    +
    +  recursiveEventLoop_->setRequest(handler->request(), handler->response());
    +  // handler->response()->startAsync();
    +  handler->setRequest(0, 0);
    +
    +  newRecursiveEvent_ = true;
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  recursiveEvent_.notify_one();
    +#endif // WT_THREADED
    +
    +  return true;
    +}
    +
    +void WebSession::handleRequest(Handler& handler)
    +{
    +  WebRequest& request = *handler.request();
    +
    +  if (request.isWebSocketRequest()) {
    +    handleWebSocketRequest(handler);
    +    return;
    +  }
    +
    +  Configuration& conf = controller_->configuration();
    +
    +  const std::string *wtdE = request.getParameter("wtd");
    +  const std::string *requestE = request.getParameter("request");
    +
    +  handler.response()->setResponseType(WebResponse::Page);
    +
    +  /*
    +   * Only handle GET and POST requests, unless a resource is
    +   * listening.
    +   */
    +  if (!((requestE && *requestE == "resource")
    +	|| request.requestMethod() == "POST"
    +	|| request.requestMethod() == "GET"))
    +    handler.response()->setStatus(400); // Bad Request
    +
    +  /*
    +   * Under what circumstances do we allow a request which does not have
    +   * a the session ID (i.e. who as it only through a cookie?)
    +   *
    +   *  - when a new session is created
    +   *  - when reloading the page (we document in the API that you should not
    +   *    run business logic when doing that)
    +   *
    +   * in other cases: silenty discard the request
    +   */
    +  else if ((!wtdE || (*wtdE != sessionId_))
    +	   && state_ != JustCreated
    +	   && (requestE && (*requestE == "jsupdate" ||
    +			    *requestE == "resource"))) {
    +    handler.response()->setContentType("text/html");
    +    handler.response()->out()
    +      << "<html><head></head><body>CSRF prevention</body></html>";
    +  } else
    +    try {
    +      /*
    +       * If we have just created a new session, we need to take care:
    +       * - requests from a dead session -> reload
    +       * - otherwise: serve Boot.html, Hybrid.html or Plain.html
    +       *
    +       * Otherwise, we are Loaded: we need to react to:
    +       * - when missing a request: rerender (Plain or Hybrid)
    +       * - if request for 'script':
    +       *   (if appropriate, upgrade to Ajax)
    +       *     serve script
    +       * - if signal ...
    +       * - if resource ...
    +       */
    +      switch (state_) {
    +      case JustCreated: {
    +	switch (type_) {
    +	case Application: {
    +	  init(request); // env, url/internalpath
    +
    +	  // Handle requests from dead sessions:
    +	  //
    +	  // We need to send JS to reload the page when we get
    +	  // 'request' == 'updatejs' or 'request' == "script"
    +	  // We ignore 'request' == 'resource'
    +	  //
    +	  // In other cases we can simply start
    +
    +	  if (requestE) {
    +	    if (*requestE == "jsupdate" || *requestE == "script") {
    +	      handler.response()->setResponseType(WebResponse::Update);
    +	      log("notice") << "Signal from dead session, sending reload.";
    +	      renderer_.letReloadJS(*handler.response(), true);
    +
    +	      kill();
    +	      break;
    +	    } else if (*requestE == "resource") {
    +	      log("notice") << "Not serving bootstrap for resource.";
    +	      handler.response()->setContentType("text/html");
    +	      handler.response()->out()
    +		<< "<html><head></head><body></body></html>";
    +
    +	      kill();
    +	      break;
    +	    }
    +	  }
    +
    +	  /*
    +	   * We can simply bootstrap.
    +	   */
    +	  bool forcePlain
    +	    = env_->agentIsSpiderBot() || !env_->agentSupportsAjax();
    +
    +	  progressiveBoot_ = !forcePlain && conf.progressiveBoot();
    +
    +	  if (forcePlain || progressiveBoot_) {
    +	    /*
    +	     * First start the application
    +	     */
    +	    env_->doesAjax_ = false;
    +	    env_->doesCookies_ = false;
    +
    +	    try {
    +	      std::string internalPath = env_->getCookie("WtInternalPath");
    +	      env_->setInternalPath(internalPath);
    +	    } catch (std::exception& e) {
    +	    }
    +
    +	    if (!start())
    +	      throw WtException("Could not start application.");
    +
    +	    app_->notify(WEvent(handler));
    +	    setLoaded();
    +
    +	    if (env_->agentIsSpiderBot())
    +	      kill();
    +	  } else {
    +	    /*
    +	     * Delay application start
    +	     */
    +	    serveResponse(handler);
    +	    setState(Loaded, 10);
    +	  }
    +	  break; }
    +	case WidgetSet:
    +	  handler.response()->setResponseType(WebResponse::Script);
    +
    +	  init(request); // env, url/internalpath
    +	  env_->doesAjax_ = true;
    +
    +	  if (!start())
    +	    throw WtException("Could not start application.");
    +
    +	  app_->notify(WEvent(handler));
    +
    +	  setLoaded();
    +
    +	  break;
    +	default:
    +	  assert(false); // StaticResource
    +	}
    +
    +	break;
    +      }
    +      case Loaded: {
    +	if (requestE) {
    +	  if (*requestE == "jsupdate")
    +	    handler.response()->setResponseType(WebResponse::Update);
    +	  else if (*requestE == "script")
    +	    handler.response()->setResponseType(WebResponse::Script);
    +	}
    +
    +	if (!app_) {
    +	  const std::string *resourceE = request.getParameter("resource");
    +
    +	  if (handler.response()->responseType() == WebResponse::Script) {
    +	    const std::string *hashE = request.getParameter("_");
    +	    const std::string *scaleE = request.getParameter("scale");
    +
    +	    env_->doesAjax_ = true;
    +	    env_->doesCookies_ = !request.headerValue("Cookie").empty();
    +
    +	    try {
    +	      env_->dpiScale_
    +		= scaleE ? boost::lexical_cast<double>(*scaleE) : 1;
    +	    } catch (boost::bad_lexical_cast &e) {
    +	      env_->dpiScale_ = 1;
    +	    }
    +
    +	    // the internal path, when present as an anchor (#), is only
    +	    // conveyed in the second request
    +	    if (hashE)
    +	      env_->setInternalPath(*hashE);
    +
    +	    if (!start())
    +	      throw WtException("Could not start application.");
    +
    +	  } else if (requestE && *requestE == "resource"
    +		     && resourceE && *resourceE == "blank") {
    +	    handler.response()->setContentType("text/html");
    +	    handler.response()->out() <<
    +	      "<html><head><title>bhm</title></head>"
    +	      "<body>&#160;</body></html>";
    +
    +	    break;
    +	  } else {
    +	    const std::string *jsE = request.getParameter("js");
    +
    +	    if (jsE && *jsE == "no") {
    +	      if (!start())
    +		throw WtException("Could not start application.");
    +	    } else {
    +	      // This could be because the session Id was not as
    +	      // expected. At least, it should be correct now.
    +	      if (!conf.reloadIsNewSession() && wtdE && *wtdE == sessionId_) {
    +		serveResponse(handler);
    +		setState(Loaded, 10);
    +	      } else {
    +		handler.response()->setContentType("text/html");
    +		handler.response()->out() <<
    +		  "<html><body><h1>Refusing to respond.</h1></body></html>";
    +	      }
    +
    +	      break;
    +	    }
    +	  }
    +	}
    +
    +	bool requestForResource = requestE && *requestE == "resource";
    +
    +	if (requestForResource || !unlockRecursiveEventLoop())
    +	  {
    +	    app_->notify(WEvent(handler));
    +	    if (handler.response() && !requestForResource)
    +	      /*
    +	       * This may be when an error was thrown during event
    +	       * propagation: then we want to render the error message.
    +	       */
    +	      app_->notify(WEvent(handler, true));
    +	  }
    +
    +	setLoaded();
    +	break;
    +      }
    +      case Dead:
    +	throw WtException("Internal error: WebSession is dead?");
    +      }
    +
    +    } catch (WtException& e) {
    +      log("fatal") << e.what();
    +
    +#ifdef WT_TARGET_JAVA
    +      e.printStackTrace();
    +#endif // WT_TARGET_JAVA
    +
    +      kill();
    +
    +      if (handler.response())
    +	serveError(handler, e.what());
    +
    +    } catch (std::exception& e) {
    +      log("fatal") << e.what();
    +
    +#ifdef WT_TARGET_JAVA
    +      e.printStackTrace();
    +#endif // WT_TARGET_JAVA
    +
    +      kill();
    +
    +      if (handler.response())
    +	serveError(handler, e.what());
    +    } catch (...) {
    +      log("fatal") << "Unknown exception.";
    +
    +      kill();
    +
    +      if (handler.response())
    +	serveError(handler, "Unknown exception");
    +    }
    +
    +  if (handler.response())
    +    handler.response()->flush();
    +}
    +
    +void WebSession::handleWebSocketRequest(Handler& handler)
    +{
    +#ifndef WT_TARGET_JAVA
    +  if (state_ != Loaded) {
    +    handler.response()->flush(WebRequest::ResponseDone);
    +    return;
    +  }
    +
    +  if (asyncResponse_) {
    +    asyncResponse_->flush();
    +    asyncResponse_ = 0;
    +  }
    +
    +  asyncResponse_ = handler.response();
    +
    +  char buf[16];
    +  handler.request()->in().read(buf, 16);
    +  handler.response()->out().write(buf, 16);
    +
    +  asyncResponse_->flush
    +    (WebRequest::ResponseFlush,
    +     boost::bind(&WebSession::webSocketReady,				    
    +		 boost::weak_ptr<WebSession>(shared_from_this())));
    +  canWriteAsyncResponse_ = false;
    +
    +  asyncResponse_->readWebSocketMessage
    +    (boost::bind(&WebSession::handleWebSocketMessage,
    +		 boost::weak_ptr<WebSession>(shared_from_this())));
    +
    +
    +  handler.setRequest(0, 0);
    +#endif // WT_TARGET_JAVA
    +}
    +
    +void WebSession::handleWebSocketMessage(boost::weak_ptr<WebSession> session)
    +{
    +#ifndef WT_TARGET_JAVA
    +  boost::shared_ptr<WebSession> lock = session.lock();
    +  if (lock) {
    +    WebSocketMessage *message = new WebSocketMessage(lock.get());
    +    
    +    if (message->contentLength() == 0)
    +      return;
    +
    +    CgiParser cgi(lock->controller_->configuration().maxRequestSize());
    +    try {
    +      cgi.parse(*message);
    +    } catch (std::exception& e) {
    +      std::cerr << "Could not parse request: " << e.what();
    +
    +      delete message;
    +      lock->asyncResponse_->flush();
    +      lock->asyncResponse_ = 0;
    +      return;
    +    }
    +
    +    {
    +      Handler handler(lock, *message, (WebResponse &)(*message));
    +
    +      lock->handleRequest(handler);
    +    }
    +
    +    lock->asyncResponse_->readWebSocketMessage
    +      (boost::bind(&WebSession::handleWebSocketMessage, session));
    +  }
    +#endif // WT_TARGET_JAVA
    +}
    +
    +std::string WebSession::ajaxCanonicalUrl(const WebResponse& request) const
    +{
    +  const std::string *hashE = 0;
    +  if (applicationName_.empty())
    +    hashE = request.getParameter("_");
    +
    +  if (!request.pathInfo().empty() || (hashE && hashE->length() > 1)) {
    +    std::string url;
    +    if (!request.pathInfo().empty()) {
    +      std::string pi = request.pathInfo();
    +      for (std::size_t t = pi.find('/'); t != std::string::npos;
    +	   t = pi.find('/', t+1)) {
    +	url += "../";
    +      }
    +      url += applicationName();
    +    } else
    +      url = baseUrl() + applicationName();
    +
    +    bool firstParameter = true;
    +    for (Http::ParameterMap::const_iterator i
    +	   = request.getParameterMap().begin();
    +	 i != request.getParameterMap().end(); ++i) {
    +      if (i->first != "_") {
    +	url += (firstParameter ? '?' : '&')
    +	  + Utils::urlEncode(i->first) + '='
    +	  + Utils::urlEncode(i->second[0]);
    +	firstParameter = false;
    +      }
    +    }
    +
    +    url += '#' + (app_ ? app_->internalPath() : env_->internalPath());
    +
    +    return url;
    +  } else
    +    return std::string();
    +}
    +
    +void WebSession::pushUpdates()
    +{
    +  if (!renderer_.isDirty())
    +    return;
    +
    +  updatesPending_ = true;
    +
    +  if (canWriteAsyncResponse_) {
    +    if (asyncResponse_->isWebSocketRequest()
    +	&& asyncResponse_->webSocketMessagePending())
    +      return;
    +
    +    asyncResponse_->setResponseType(WebResponse::Update);
    +    renderer_.serveResponse(*asyncResponse_);
    +    updatesPending_ = false;
    +
    +    if (!asyncResponse_->isWebSocketRequest()) {
    +      asyncResponse_->flush();
    +      asyncResponse_ = 0;
    +      canWriteAsyncResponse_ = false;
    +    } else {
    +#ifndef WT_TARGET_JAVA
    +      canWriteAsyncResponse_ = false;
    +      asyncResponse_->flush
    +	(WebRequest::ResponseFlush,
    +	 boost::bind(&WebSession::webSocketReady,
    +		     boost::weak_ptr<WebSession>(shared_from_this())));
    +#endif // WT_TARGET_JAVA
    +    }
    +  }
    +}
    +
    +void WebSession::webSocketReady(boost::weak_ptr<WebSession> session)
    +{
    +#ifndef WT_TARGET_JAVA
    +  boost::shared_ptr<WebSession> lock = session.lock();
    +  if (lock) {
    +    Handler handler(lock, true);
    +
    +    lock->canWriteAsyncResponse_ = true;
    +
    +    if (lock->updatesPending_)
    +      lock->pushUpdates();
    +  }
    +#endif // WT_TARGET_JAVA
    +}
    +
    +const std::string *WebSession::getSignal(const WebRequest& request,
    +					 const std::string& se)
    +{
    +  const std::string *signalE = request.getParameter(se + "signal");
    +
    +  if (!signalE) {
    +    const int signalLength = 7 + se.length();
    +
    +    const Http::ParameterMap& entries = request.getParameterMap();
    +
    +    for (Http::ParameterMap::const_iterator i = entries.begin();
    +	 i != entries.end(); ++i) {
    +      if (i->first.length() > static_cast<unsigned>(signalLength)
    +	  && i->first.substr(0, signalLength) == se + "signal=") {
    +	signalE = &i->second[0];
    +
    +	std::string v = i->first.substr(signalLength);
    +	if (v.length() >= 2) {
    +	  std::string e = v.substr(v.length() - 2);
    +	  if (e == ".x" || e == ".y")
    +	    v = v.substr(0, v.length() - 2);
    +	}
    +
    +	*(const_cast<std::string *>(signalE)) = v;
    +	break;
    +      }
    +    }
    +  }
    +
    +  return signalE;
    +}
    +
    +void WebSession::notify(const WEvent& event)
    +{
    +#ifndef WT_TARGET_JAVA
    +  if (event.handler == 0) {
    +    app_->finalize();
    +    return;
    +  }
    +#endif // WT_TARGET_JAVA
    +
    +  Handler& handler = *event.handler;
    +  WebRequest& request = *handler.request();
    +  WebResponse& response = *handler.response();
    +
    +  if (WebSession::Handler::instance() != &handler)
    +    // We will want to set these right before doing anything !
    +    WebSession::Handler::instance()->setRequest(&request, &response);
    +
    +  if (event.renderOnly) {
    +    render(handler);
    +    return;
    +  }
    +
    +  const std::string *requestE = request.getParameter("request");
    +
    +  if (!app_->initialized_) {
    +    app_->initialize();
    +    app_->initialized_ = true;
    +  }
    +
    +  switch (state_) {
    +  case WebSession::JustCreated:
    +
    +#ifdef WT_WITH_OLD_INTERNALPATH_API
    +    if (app_->oldInternalPathAPI() && env_->internalPath() != "/") {
    +      app_->setInternalPath("/");
    +      app_->changeInternalPath(env_->internalPath());
    +    }
    +#endif // WT_WITH_OLD_INTERNALPATH_API
    +
    +    render(handler);
    +
    +    break;
    +  case WebSession::Loaded:
    +    if (handler.response()->responseType() == WebResponse::Script) {
    +      if (!env_->doesAjax_) {
    +	// upgrade to AJAX -> this becomes a first update we may need
    +	// to replay this, so we cannot commit these changes until
    +	// we have received an ack for this.
    +
    +	const std::string *hashE = request.getParameter("_");
    +	const std::string *scaleE = request.getParameter("scale");
    +
    +	env_->doesAjax_ = true;
    +	env_->doesCookies_ = !request.headerValue("Cookie").empty();
    +
    +	try {
    +	  env_->dpiScale_ = scaleE ? boost::lexical_cast<double>(*scaleE)
    +	    : 1;
    +	} catch (boost::bad_lexical_cast &e) {
    +	  env_->dpiScale_ = 1;
    +	}
    +
    +	if (hashE)
    +	  env_->setInternalPath(*hashE);
    +
    +	app_->enableAjax();
    +	if (env_->internalPath().length() > 1)
    +	  app_->changeInternalPath(env_->internalPath());
    +      }
    +
    +      render(handler);
    +    } else {
    +      // a normal request to a loaded application
    +      try {
    +	if (request.postDataExceeded())
    +	  app_->requestTooLarge().emit(request.postDataExceeded());
    +      } catch (std::exception& e) {
    +	log("error") << "Exception in WApplication::requestTooLarge"
    +		     << e.what();
    +	RETHROW(e);
    +      } catch (...) {
    +	log("error") << "Exception in WApplication::requestTooLarge";
    +	throw;
    +      }
    +
    +      WResource *resource = 0;
    +      if (!requestE && !request.pathInfo().empty())
    +	resource = app_->decodeExposedResource("/path/" + request.pathInfo());
    +
    +      const std::string *resourceE = request.getParameter("resource");
    +      const std::string *signalE = getSignal(request, "");
    +
    +      if (signalE)
    +	progressiveBoot_ = false; 
    +
    +      if (resource || (requestE && *requestE == "resource" && resourceE)) {
    +	if (resourceE && *resourceE == "blank") {
    +	  handler.response()->setContentType("text/html");
    +	  handler.response()->out() <<
    +	    "<html><head><title>bhm</title></head>"
    +	    "<body>&#160;</body></html>";
    +	  handler.response()->flush();
    +	  handler.setRequest(0, 0);
    +	} else {
    +	  if (!resource)
    +	    resource = app_->decodeExposedResource(*resourceE);
    +
    +	  if (resource) {
    +	    try {
    +	      resource->handle(&request, &response);
    +	      handler.setRequest(0, 0);
    +#ifdef WT_THREADED
    +	      if (!handler.lock().owns_lock())
    +		handler.lock().lock();
    +#endif // WT_THREADED
    +	    } catch (std::exception& e) {
    +	      log("error") << "Exception while streaming resource" << e.what();
    +	      RETHROW(e);
    +	    } catch (...) {
    +	      log("error") << "Exception while streaming resource";
    +	      throw;
    +	    }
    +	  } else {
    +	    log("error") << "decodeResource(): resource '"
    +			 << *resourceE << "' not exposed";
    +	    handler.response()->setContentType("text/html");
    +	    handler.response()->out() <<
    +	      "<html><body><h1>Nothing to say about that.</h1></body></html>";
    +	    handler.response()->flush();
    +	    handler.setRequest(0, 0);
    +	  }
    +	}
    +      } else {
    +	env_->urlScheme_ = request.urlScheme();
    +
    +	if (signalE) {
    +	  const std::string *ackIdE = request.getParameter("ackId");
    +	  try {
    +	    if (ackIdE)
    +	      renderer_.ackUpdate(boost::lexical_cast<int>(*ackIdE));
    +	  } catch (const boost::bad_lexical_cast& e) {
    +	    log("error") << "Could not parse ackId: " << *ackIdE;
    +	  }
    +
    +	  /*
    +	   * In case we are not using websocket but long polling, the client
    +	   * aborts the previous poll request to indicate a client-side event.
    +	   *
    +	   * So we also discard the previous asyncResponse_ server-side.
    +	   */
    +	  if (asyncResponse_ && !asyncResponse_->isWebSocketRequest()) {
    +
    +	    /* Not sure of this is still relevant? */
    +	    if (*signalE == "poll")
    +	      renderer_.letReloadJS(*asyncResponse_, true);
    +
    +#ifndef WT_TARGET_JAVA
    +	    asyncResponse_->flush();
    +#endif
    +	    asyncResponse_ = 0;
    +	    canWriteAsyncResponse_ = false;
    +	  }
    +
    +	  if (*signalE != "res" && *signalE != "poll") {
    +	    //std::cerr << "signal: " << *signalE << std::endl;
    +
    +	    /*
    +	     * Special signal values:
    +	     * 'poll' : long poll
    +	     * 'none' : no event, but perhaps a synchronization
    +	     * 'load' : load invisible content
    +	     * 'res'  : after a resource received data
    +	     */
    +
    +	    try {
    +	      handler.nextSignal = -1;
    +	      notifySignal(event);
    +	    } catch (std::exception& e) {
    +	      log("error") << "Error during event handling: " << e.what();
    +	      RETHROW(e);
    +	    } catch (...) {
    +	      log("error") << "Error during event handling: ";
    +	      throw;
    +	    }
    +	  } else if (*signalE == "poll" && !updatesPending_) {
    +	    if (!asyncResponse_) {
    +	      asyncResponse_ = handler.response();
    +	      canWriteAsyncResponse_ = true;
    +	      handler.setRequest(0, 0);
    +            } else {
    +	      std::cerr << "Poll after web socket connect. Ignoring" << std::endl;
    +            }
    +	  }
    +	} else {
    +	  log("notice") << "Refreshing session";
    +
    +	  if (handler.response()->responseType() == WebResponse::Page) {
    +	    const std::string *hashE = request.getParameter("_");
    +	    if (hashE)
    +	      app_->changeInternalPath(*hashE);
    +	    else if (!request.pathInfo().empty())
    +	      app_->changeInternalPath(request.pathInfo());
    +	    else
    +	      app_->changeInternalPath("");
    +	  }
    +
    +#ifndef WT_TARGET_JAVA
    +	  // if we are persisting sessions, then we should make sure we
    +	  // are listening to only one browser at a time: do this by
    +	  // generating a new session id when a new browser connects
    +	  if (controller_->configuration().persistentSessions()) {
    +	    log("info") << "Refresh for persistent session";
    +	    WEnvironment oldEnv = *env_;
    +	    env_->init(request);
    +	    env_->parameters_ = handler.request()->getParameterMap();
    +
    +	    try {
    +	      app_->refresh();
    +
    +	      app_->connected_ = true;
    +	    } catch (std::exception& e) {
    +	      *env_ = oldEnv;
    +
    +	      log("info") << "Bad refresh attempt: " << e.what();
    +	      handler.response()->setContentType("text/html");
    +	      handler.response()->out() <<
    +		"<html><body><h1>Are you trying some shenanigans?"
    +		"</h1></body></html>";
    +	      handler.response()->flush();
    +	      handler.setRequest(0, 0);    
    +	    }
    +	  } else {
    +#endif // WT_TARGET_JAVA
    +	    env_->parameters_ = handler.request()->getParameterMap();
    +	    app_->refresh();
    +#ifndef WT_TARGET_JAVA
    +	  }
    +#endif // WT_TARGET_JAVA
    +	}
    +
    +	if (handler.response() && !recursiveEventLoop_)
    +	  render(handler);
    +      }
    +    }
    +  case Dead:
    +    break;
    +  }
    +}
    +
    +void WebSession::render(Handler& handler)
    +{
    +  /*
    +   * In any case, render() will flush the response, even if an error
    +   * occurred. Since we are already rendering the response, we can no longer
    +   * show a nice error message.
    +   */
    +
    +  try {
    +    if (!env_->doesAjax_)
    +      try {
    +	checkTimers();
    +      } catch (std::exception& e) {
    +	log("error") << "Exception while triggering timers" << e.what();
    +	RETHROW(e);
    +      } catch (...) {
    +	log("error") << "Exception while triggering timers";
    +	throw;
    +      }
    +
    +    if (app_->isQuited())
    +      kill();
    +
    +    serveResponse(handler);
    +  } catch (std::exception& e) {
    +    handler.response()->flush();
    +    handler.setRequest(0, 0);
    +
    +    RETHROW(e);
    +  } catch (...) {
    +    handler.response()->flush();
    +    handler.setRequest(0, 0);
    +
    +    throw;
    +  }
    +
    +  updatesPending_ = false;
    +}
    +
    +void WebSession::serveError(Handler& handler, const std::string& e)
    +{
    +  renderer_.serveError(*handler.response(), e);
    +  handler.response()->flush();
    +  handler.setRequest(0, 0);
    +}
    +
    +void WebSession::serveResponse(Handler& handler)
    +{
    +  /*
    +   * If the request is a web socket message, then we should not actually
    +   * render -- there may be more messages following.
    +   */
    +  if (!handler.request()->isWebSocketMessage())
    +    renderer_.serveResponse(*handler.response());
    +
    +  handler.response()->flush();
    +  handler.setRequest(0, 0);
    +}
    +
    +void WebSession::propagateFormValues(const WEvent& e, const std::string& se)
    +{
    +  const WebRequest& request = *e.handler->request();
    +
    +  renderer_.updateFormObjectsList(app_);
    +  WebRenderer::FormObjectsMap formObjects = renderer_.formObjects();
    +
    +  const std::string *focus = request.getParameter(se + "focus");
    +  if (focus) {
    +    int selectionStart = -1, selectionEnd = -1;
    +    try {
    +      const std::string *selStart = request.getParameter(se + "selstart");
    +      if (selStart)
    +	selectionStart = boost::lexical_cast<int>(*selStart);
    +
    +      const std::string *selEnd = request.getParameter(se + "selend");
    +      if (selEnd)
    +	selectionEnd = boost::lexical_cast<int>(*selEnd);
    +    } catch (boost::bad_lexical_cast& ee) {
    +      log("error") << "Could not lexical cast selection range";
    +    }
    +
    +    app_->setFocus(*focus, selectionStart, selectionEnd);
    +  } else
    +    app_->setFocus(std::string(), -1, -1);
    +
    +  for (WebRenderer::FormObjectsMap::const_iterator i = formObjects.begin();
    +       i != formObjects.end(); ++i) {
    +    std::string formName = i->first;
    +    WObject *obj = i->second;
    +
    +    if (!request.postDataExceeded())
    +      obj->setFormData(getFormData(request, se + formName));
    +    else
    +      obj->setRequestTooLarge(request.postDataExceeded());
    +  }
    +}
    +
    +WObject::FormData WebSession::getFormData(const WebRequest& request,
    +					  const std::string& name)
    +{
    +  std::vector<Http::UploadedFile> files;
    +  Utils::find(request.uploadedFiles(), name, files);
    +
    +  return WObject::FormData(request.getParameterValues(name), files);
    +}
    +
    +std::vector<unsigned int> WebSession::getSignalProcessingOrder(const WEvent& e)
    +{
    +  // Rush 'onChange' events. Reason: if a user edits a text area and
    +  // a subsequent click on another element deletes the text area, we
    +  // have seen situations (at least on firefox) where the clicked event
    +  // is processed before the changed event, causing the changed event
    +  // to fail because the event target was deleted.
    +  WebSession::Handler& handler = *e.handler;
    +
    +  std::vector<unsigned int> highPriority;
    +  std::vector<unsigned int> normalPriority;
    +
    +  for (unsigned i = 0;; ++i) {
    +    const WebRequest& request = *handler.request();
    +
    +    std::string se = i > 0
    +      ? 'e' + boost::lexical_cast<std::string>(i) : std::string();
    +    const std::string *signalE = getSignal(request, se);
    +    if (!signalE) {
    +      break;
    +    }
    +    if (*signalE != "user" &&
    +        *signalE != "hash" &&
    +        *signalE != "res" &&
    +        *signalE != "none" &&
    +        *signalE != "load") {
    +      EventSignalBase *signal = decodeSignal(*signalE);
    +      if (!signal) {
    +        // Signal was not exposed, do nothing
    +      } else if (signal->name() == WFormWidget::CHANGE_SIGNAL) {
    +        // compare by pointer in the condition above is ok
    +        highPriority.push_back(i);
    +      } else {
    +        normalPriority.push_back(i);
    +      }
    +    } else {
    +      normalPriority.push_back(i);
    +    }
    +  }
    +
    +  Utils::insert(highPriority, normalPriority);
    +
    +  return highPriority;
    +}
    +
    +void WebSession::notifySignal(const WEvent& e)
    +{
    +  WebSession::Handler& handler = *e.handler;
    +
    +  // Reorder signals, as browsers sometimes generate them in a strange order
    +  if (handler.nextSignal == -1) {
    +    handler.signalOrder = getSignalProcessingOrder(e);
    +    handler.nextSignal = 0;
    +  }
    +
    +  for (unsigned i = handler.nextSignal; i < handler.signalOrder.size(); ++i) {
    +    if (!handler.request())
    +      return;
    +
    +    const WebRequest& request = *handler.request();
    +
    +    int signalI = handler.signalOrder[i];
    +    std::string se = signalI > 0
    +      ? 'e' + boost::lexical_cast<std::string>(signalI) : std::string();
    +    const std::string *signalE = getSignal(request, se);
    +
    +    if (!signalE)
    +      return;
    +
    +    // Save pending changes (e.g. from resource completion)
    +    if (i == 0)
    +      renderer_.saveChanges();
    +
    +    propagateFormValues(e, se);
    +
    +    handler.nextSignal = i + 1;
    +
    +    if (*signalE == "hash") {
    +      const std::string *hashE = request.getParameter(se + "_");
    +      if (hashE) {
    +	app_->changeInternalPath(*hashE);
    +	app_->doJavaScript(WT_CLASS ".scrollIntoView('" + *hashE + "');");
    +      }
    +    } else if (*signalE == "none" || *signalE == "load") {
    +      // We will want invisible changes now too.
    +      renderer_.setVisibleOnly(false);
    +    } else {
    +      if (*signalE != "res") {
    +	for (unsigned k = 0; k < 3; ++k) {
    +	  SignalKind kind = (SignalKind)k;
    +
    +	  if (kind == AutoLearnStateless && request.postDataExceeded())
    +	    break;
    +
    +	  if (*signalE == "user") {
    +	    const std::string *idE = request.getParameter(se + "id");
    +	    const std::string *nameE = request.getParameter(se + "name");
    +
    +	    if (!idE || !nameE)
    +	      break;
    +
    +	    processSignal(decodeSignal(*idE, *nameE), se, request, kind);
    +	  } else
    +	    processSignal(decodeSignal(*signalE), se, request, kind);
    +
    +	  if (kind == LearnedStateless && i == 0)
    +	    renderer_.discardChanges();
    +	}
    +      }
    +    }
    +  }
    +}
    +
    +void WebSession::processSignal(EventSignalBase *s, const std::string& se,
    +			       const WebRequest& request, SignalKind kind)
    +{
    +  if (!s)
    +    return;
    +
    +  switch (kind) {
    +  case LearnedStateless:
    +    s->processLearnedStateless();
    +    break;
    +  case AutoLearnStateless:
    +    s->processAutoLearnStateless(&renderer_);
    +    break;
    +  case Dynamic:
    +    JavaScriptEvent jsEvent;
    +    jsEvent.get(request, se);
    +    s->processDynamic(jsEvent);
    +
    +    // ! handler.request() may be 0 now, if there was a
    +    // ! recursive call.
    +    // ! what with other slots triggered after the one that
    +    // ! did the recursive call ? That's very bad ??
    +  }
    +}
    +
    +#ifndef WT_TARGET_JAVA
    +void WebSession::generateNewSessionId()
    +{
    +  std::string oldId = sessionId_;
    +  sessionId_ = controller_->generateNewSessionId(shared_from_this());
    +  log("notice") << "New session id for " << oldId;
    +
    +  if (controller_->configuration().sessionTracking()
    +      == Configuration::CookiesURL) {
    +    std::string cookieName = env_->deploymentPath();
    +    renderer().setCookie(cookieName, sessionId_, -1, "", "");
    +  }
    +}
    +#endif // WT_TARGET_JAVA
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebSession.h b/wt-3.1.7a/src/web/WebSession.h
    new file mode 100644
    index 0000000..06c1076
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebSession.h
    @@ -0,0 +1,349 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEBSESSION_H_
    +#define WEBSESSION_H_
    +
    +#include <string>
    +#include <vector>
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +#include <boost/thread.hpp>
    +#include <boost/thread/condition.hpp>
    +#endif // WT_THREADED || WT_TARGET_JAVA
    +
    +#include <boost/shared_ptr.hpp>
    +#include <boost/enable_shared_from_this.hpp>
    +
    +#include "TimeUtil.h"
    +#include "WebRenderer.h"
    +
    +#include "Wt/WApplication"
    +#include "Wt/WEnvironment"
    +#include "Wt/WLogger"
    +
    +namespace Wt {
    +
    +class WebController;
    +class WebRequest;
    +class WebResponse;
    +class WApplication;
    +
    +/*
    + * The WebSession stores the state for one session.
    + *
    + * It also handles the following tasks:
    + *  - propagate events
    + *  - determine what needs to be served
    + *    (a web page, a resource or a javascript update).
    + */
    +class WT_API WebSession
    +#ifndef WT_TARGET_JAVA
    +  : public boost::enable_shared_from_this<WebSession>
    +#endif
    +{
    +public:
    +  enum State {
    +    JustCreated,
    +    Loaded,
    +    Dead
    +  };
    +
    +  WebSession(WebController *controller, const std::string& sessionId,
    +	     EntryPointType type, const std::string& favicon,
    +	     const WebRequest *request, WEnvironment *env = 0);
    +  ~WebSession();
    +
    +  static WebSession *instance();
    +
    +  EntryPointType type() const { return type_; }
    +  std::string favicon() const { return favicon_; }
    +  std::string docType() const;
    +
    +  std::string sessionId() const { return sessionId_; }
    +
    +  WebController *controller() const { return controller_; }
    +  WEnvironment&  env() { return *env_; }
    +  WApplication  *app() { return app_; }
    +  WebRenderer&   renderer() { return renderer_; }
    +
    +  bool debug() const { return debug_; }
    +
    +  void redirect(const std::string& url);
    +  std::string getRedirect();
    +
    +  void setApplication(WApplication *app);
    +
    +  WLogEntry log(const std::string& type);
    +
    +  void notify(const WEvent& e);
    +  void pushUpdates();
    +
    +  void doRecursiveEventLoop();
    +
    +  void expire();
    +  bool unlockRecursiveEventLoop();
    +
    +  void pushEmitStack(WObject *obj);
    +  void popEmitStack();
    +  WObject *emitStackTop();
    +
    +#ifndef WT_TARGET_JAVA
    +  const Time& expireTime() const { return expire_; }
    +  bool shouldDisconnect() const;
    +#endif // WT_TARGET_JAVA
    +
    +  bool dead() { return state_ == Dead; }
    +  State state() const { return state_; }
    +  void kill();
    +
    +  bool progressiveBoot() const { return progressiveBoot_; }
    +
    +  /*
    +   * URL stuff
    +   */
    +
    +  const std::string& applicationName() const { return applicationName_; }
    +
    +  // (http://www.bigapp.com) /myapp/app.wt?wtd=ABCD
    +  const std::string applicationUrl() const { return applicationUrl_ + sessionQuery(); }
    +
    +  const std::string& deploymentPath() const { return deploymentPath_; }
    +
    +  //    (http://www.bigapp.com/myapp/app.wt) ?wtd=ABCD
    +  // or (http://www.bigapp.com/myapp/) app.wt/path?wtd=ABCD
    +  std::string mostRelativeUrl(const std::string& internalPath = std::string())
    +    const;
    +
    +  std::string appendInternalPath(const std::string& url,
    +				 const std::string& internalPath) const;
    +
    +  std::string appendSessionQuery(const std::string& url) const;
    +
    +  std::string ajaxCanonicalUrl(const WebResponse& request) const;
    +
    +  enum BootstrapOption {
    +    ClearInternalPath,
    +    KeepInternalPath
    +  };
    +
    +  std::string bootstrapUrl(const WebResponse& response, BootstrapOption option)
    +    const;
    +
    +  // (http://www.bigapp.com/myapp/) app.wt/internal_path
    +  std::string bookmarkUrl(const std::string& internalPath) const;
    +
    +  // tries to figure out the current bookmark url (from the app or otherwise)
    +  std::string bookmarkUrl() const;
    +
    +  // http://www.bigapp.com:1234/myapp/
    +  const std::string& absoluteBaseUrl() const { return absoluteBaseUrl_; }
    +
    +  const std::string& baseUrl() const { return baseUrl_; }
    +
    +  std::string getCgiValue(const std::string& varName) const;
    +  std::string getCgiHeader(const std::string& headerName) const;
    +
    +  class Handler {
    +  public:
    +    Handler();
    +    Handler(boost::shared_ptr<WebSession> session,
    +	    WebRequest& request, WebResponse& response);
    +    Handler(boost::shared_ptr<WebSession> session, bool takeLock);
    +    Handler(WebSession *session);
    +    ~Handler();
    +
    +#ifdef WT_TARGET_JAVA
    +    void release();
    +#endif // WT_TARGET_JAVA
    +
    +    static Handler *instance();
    +
    +    bool haveLock() const;
    +
    +    WebResponse *response() { return response_; }
    +    WebRequest *request() { return request_; }
    +    WebSession *session() const { return session_; }
    +
    +    int nextSignal;
    +    std::vector<unsigned int> signalOrder;
    +
    +#ifdef WT_THREADED
    +    boost::mutex::scoped_lock& lock() { return lock_; }
    +#endif
    +
    +    static void attachThreadToSession(boost::shared_ptr<WebSession> session);
    +    static Handler *attachThreadToHandler(Handler *handler);
    +
    +  private:
    +    void init();
    +
    +    void setRequest(WebRequest *request, WebResponse *response);
    +
    +#ifdef WT_THREADED
    +    boost::mutex::scoped_lock lock_;
    +
    +    Handler(const Handler&);
    +#endif // WT_THREADED
    +#ifdef WT_TARGET_JAVA
    +    bool locked_;
    +#endif
    +
    +    Handler *prevHandler_;
    +
    +    WebSession *session_;
    +#ifndef WT_TARGET_JAVA
    +    boost::shared_ptr<WebSession> sessionPtr_;
    +#endif // WT_TARGET_JAVA
    +
    +    WebRequest  *request_;
    +    WebResponse *response_;
    +    bool         killed_;
    +
    +    friend class WApplication;
    +    friend class WResource;
    +    friend class WebSession;
    +    friend class WFileUploadResource;
    +  };
    +
    +  void handleRequest(Handler& handler);
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  boost::mutex& mutex() { return mutex_; }
    +#endif // WT_THREADED || WT_TARGET_JAVA
    +
    +  void setLoaded();
    +
    +  void generateNewSessionId();
    +
    +#if defined(WT_THREADED)
    +  /*
    +   * SyncLocks
    +   */
    +  struct SyncLocks {
    +    boost::mutex state_;
    +    boost::condition unlock_;
    +    int lastId_;
    +    int lockedId_;
    +  } syncLocks_;
    +#endif // WT_THREADED
    +
    +private:
    +  void handleWebSocketRequest(Handler& handler);
    +  static void handleWebSocketMessage(boost::weak_ptr<WebSession> session);
    +  static void webSocketReady(boost::weak_ptr<WebSession> session);
    +
    +  void checkTimers();
    +  void hibernate();
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  boost::mutex mutex_;
    +  static boost::thread_specific_ptr<Handler> threadHandler_;
    +#else
    +  static Handler *threadHandler_;
    +#endif // WT_TARGET_JAVA
    +
    +  EntryPointType type_;
    +  std::string    favicon_;
    +  State          state_;
    +
    +  std::string   sessionId_;
    +
    +  WebController *controller_;
    +  WebRenderer   renderer_;
    +  std::string   applicationName_;
    +  std::string   bookmarkUrl_, baseUrl_, absoluteBaseUrl_;
    +  std::string   applicationUrl_, deploymentPath_;
    +  std::string   redirect_;
    +  WebResponse  *asyncResponse_;
    +  bool          updatesPending_, canWriteAsyncResponse_;
    +  bool          progressiveBoot_;
    +
    +#ifndef WT_TARGET_JAVA
    +  Time             expire_;
    +#endif // WT_TARGET_JAVA
    +
    +#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
    +  boost::condition recursiveEvent_;
    +#endif // WT_THREADED
    +  bool             newRecursiveEvent_;
    +
    +  WEnvironment  embeddedEnv_;
    +  WEnvironment *env_;
    +  WApplication *app_;
    +  bool          debug_;
    +
    +  std::vector<Handler *> handlers_;
    +  std::vector<WObject *> emitStack_;
    +
    +  Handler *recursiveEventLoop_;
    +
    +  WResource *decodeResource(const std::string& resourceId);
    +  EventSignalBase *decodeSignal(const std::string& signalId);
    +  EventSignalBase *decodeSignal(const std::string& objectId,
    +				const std::string& signalName);
    +
    +  static WObject::FormData getFormData(const WebRequest& request,
    +				       const std::string& name);
    +
    +  void render(Handler& handler);
    +  void serveError(Handler& handler, const std::string& exception);
    +  void serveResponse(Handler& handler);
    +
    +  enum SignalKind { LearnedStateless = 0, AutoLearnStateless = 1,
    +		    Dynamic = 2 };
    +  void processSignal(EventSignalBase *s, const std::string& se,
    +		     const WebRequest& request, SignalKind kind);
    +
    +  std::vector<unsigned int> getSignalProcessingOrder(const WEvent& e);
    +  void notifySignal(const WEvent& e);
    +  void propagateFormValues(const WEvent& e, const std::string& se);
    +
    +  const std::string *getSignal(const WebRequest& request,
    +			       const std::string& se);
    +
    +  void setState(State state, int timeout);
    +
    +  void init(const WebRequest& request);
    +  bool start();
    +
    +  std::string sessionQuery() const;
    +
    +  friend class WebSocketMessage;
    +};
    +
    +/*! \class WEvent
    + *  \brief An internal session event.
    + *
    + * The request controller notifies the application to react to a request
    + * using WApplication::notify().
    + */
    +class WT_API WEvent {
    +private:
    +  WEvent()
    +    : handler(0),
    +      renderOnly(false)
    +  { }
    +
    +  WEvent(WebSession::Handler& aHandler, bool doRenderOnly)
    +    : handler(&aHandler),
    +      renderOnly(doRenderOnly)
    +  { }
    +
    +  WEvent(WebSession::Handler& aHandler)
    +    : handler(&aHandler),
    +      renderOnly(false)
    +  { }
    +
    +  WebSession::Handler *handler;
    +  bool renderOnly;
    +
    +  friend class WebSession;
    +};
    +
    +}
    +
    +#endif // WEBSESSION_H_
    diff --git a/wt-3.1.7a/src/web/WebSocketMessage.C b/wt-3.1.7a/src/web/WebSocketMessage.C
    new file mode 100644
    index 0000000..99ec562
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebSocketMessage.C
    @@ -0,0 +1,153 @@
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/lexical_cast.hpp>
    +
    +#include "WebSession.h"
    +#include "WebSocketMessage.h"
    +#include "WtException.h"
    +#include "Utils.h"
    +
    +namespace Wt {
    +
    +WebSocketMessage::WebSocketMessage(WebSession *session)
    +  : session_(session)
    +{ }
    +
    +void WebSocketMessage::flush(ResponseState state,
    +			     CallbackFunction callback)
    +{
    +  if (state != ResponseDone)
    +    error("flush(" + boost::lexical_cast<std::string>(state) + ") expected");
    +
    +  session_->pushUpdates();
    +
    +  delete this;
    +}
    +
    +void WebSocketMessage::setWebSocketMessageCallback(CallbackFunction callback)
    +{
    +  error("setWebSocketMessageCallback() not supported");
    +}
    +
    +bool WebSocketMessage::webSocketMessagePending() const
    +{
    +  error("webSocketMessagePending() not supported");
    +  return false;
    +}
    +
    +std::istream& WebSocketMessage::in()
    +{
    +  return webSocket()->in();
    +}
    +
    +std::ostream& WebSocketMessage::out()
    +{
    +  return webSocket()->out();
    +}
    +
    +std::ostream& WebSocketMessage::err()
    +{
    +  return webSocket()->err();
    +}
    +
    +void WebSocketMessage::setRedirect(const std::string& url)
    +{
    +  error("setRedirect() not supported");
    +}
    +
    +void WebSocketMessage::setStatus(int status)
    +{
    +  error("setStatus() not supported");
    +}
    +
    +void WebSocketMessage::setContentType(const std::string& value)
    +{
    +  if (value != "text/javascript; charset=UTF-8")
    +    error("setContentType(): text/javascript expected");
    +}
    +
    +void WebSocketMessage::setContentLength(::int64_t length)
    +{
    +  // We have no use for it, web socket messages are framed
    +}
    +
    +void WebSocketMessage::addHeader(const std::string& name,
    +				 const std::string& value)
    +{
    +  if (name == "Set-Cookie")
    +    out() << "document.cookie=" << WWebWidget::jsStringLiteral(value) << ";";
    +}
    +
    +std::string WebSocketMessage::envValue(const std::string& name) const
    +{
    +  if (name == "CONTENT_LENGTH") {
    +    webSocket()->in().seekg(0, std::ios::end);
    +    int length = webSocket()->in().tellg();
    +    webSocket()->in().seekg(0, std::ios::beg);
    +    return boost::lexical_cast<std::string>(length);
    +  } else if (name == "CONTENT_TYPE")
    +    return "application/x-www-form-urlencoded";
    +  else  
    +    return webSocket()->envValue(name);
    +}
    +
    +std::string WebSocketMessage::serverName() const
    +{
    +  return webSocket()->serverName();
    +}
    +
    +std::string WebSocketMessage::serverPort() const
    +{
    +  return webSocket()->serverPort();
    +}
    +
    +std::string WebSocketMessage::scriptName() const
    +{
    +  return webSocket()->scriptName();
    +}
    +
    +std::string WebSocketMessage::requestMethod() const
    +{
    +  return "POST";
    +}
    +
    +std::string WebSocketMessage::queryString() const
    +{
    +  return webSocket()->queryString() + "&request=jsupdate";
    +}
    +
    +std::string WebSocketMessage::pathInfo() const
    +{
    +  return webSocket()->pathInfo();
    +}
    +
    +std::string WebSocketMessage::remoteAddr() const
    +{
    +  return webSocket()->remoteAddr();
    +}
    +
    +std::string WebSocketMessage::urlScheme() const
    +{
    +  return "http";
    +}
    +
    +std::string WebSocketMessage::headerValue(const std::string& name) const
    +{
    +  return webSocket()->headerValue(name);
    +}
    +
    +void WebSocketMessage::error(const std::string& msg) const
    +{
    +  throw WtException("WebSocketMessage error: " + msg);
    +}
    +
    +WebRequest *WebSocketMessage::webSocket() const
    +{
    +  return session_->asyncResponse_;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebSocketMessage.h b/wt-3.1.7a/src/web/WebSocketMessage.h
    new file mode 100644
    index 0000000..91c34d3
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebSocketMessage.h
    @@ -0,0 +1,64 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEB_SOCKET_MESSAGE_H_
    +#define WEB_SOCKET_MESSAGE_H_
    +
    +#include "WebRequest.h"
    +
    +namespace Wt {
    +
    +/*
    + * Wraps a WebSocket message as a web request.
    + */
    +class WT_API WebSocketMessage : public WebRequest
    +{
    +public:
    +  WebSocketMessage(WebSession *session);
    +
    +  virtual void flush(ResponseState state = ResponseDone,
    +		     CallbackFunction callback = CallbackFunction());
    +
    +  virtual void setWebSocketMessageCallback(CallbackFunction callback);
    +  virtual bool webSocketMessagePending() const;
    +
    +  virtual std::istream& in();
    +  virtual std::ostream& out();
    +  virtual std::ostream& err();
    +
    +  virtual void setRedirect(const std::string& url);
    +  virtual void setStatus(int status);
    +  virtual void setContentType(const std::string& value);
    +  virtual void setContentLength(::int64_t length);
    +
    +  virtual void addHeader(const std::string& name, const std::string& value);
    +  virtual std::string envValue(const std::string& name) const;
    +
    +  virtual std::string serverName() const;
    +  virtual std::string serverPort() const;
    +  virtual std::string scriptName() const;
    +  virtual std::string requestMethod() const;
    +  virtual std::string queryString() const;
    +  virtual std::string pathInfo() const;
    +  virtual std::string remoteAddr() const;
    +  virtual std::string urlScheme() const;
    +
    +  virtual std::string headerValue(const std::string& name) const;
    +
    +  virtual bool isWebSocketMessage() const {
    +    return true;
    +  }
    +
    +private:
    +  WebSession *session_;
    +
    +  WebRequest *webSocket() const;
    +  void error(const std::string& msg) const;
    +};
    +
    +}
    +
    +#endif // WEB_SOCKET_MESSAGE_H_
    diff --git a/wt-3.1.7a/src/web/WebStream.C b/wt-3.1.7a/src/web/WebStream.C
    new file mode 100644
    index 0000000..feb80f6
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebStream.C
    @@ -0,0 +1,18 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "WebStream.h"
    +
    +namespace Wt {
    +
    +WebStream::WebStream(bool multithreaded)
    +  : multiThreaded_(multithreaded)
    +{ }
    +
    +WebStream::~WebStream()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WebStream.h b/wt-3.1.7a/src/web/WebStream.h
    new file mode 100644
    index 0000000..882a8c7
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WebStream.h
    @@ -0,0 +1,48 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WEB_STREAM_H_
    +#define WEB_STREAM_H_
    +
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WebRequest;
    +class WSocketNotifier;
    +
    +/*
    + * Class that implements a stream of (http)-requests.
    + *
    + * An instance may be passed to the WebController, which will call the
    + * method getNextRequest() to get the next request.
    + */
    +class WT_API WebStream
    +{
    +public:
    +  WebStream(bool multiThreaded);
    +
    +  virtual ~WebStream();
    +
    +  /*
    +   * Can we get a new WebRequest before the previous one
    +   * has been deleted ?
    +   */
    +  bool multiThreaded() const { return multiThreaded_; }
    +
    +  /*
    +   * Get the next request, return 0 when a timeout occurs.
    +   * Otherwise throws an exception.
    +   */
    +  virtual WebRequest *getNextRequest(int timeoutsec) = 0;
    +
    +private:
    +  bool multiThreaded_;
    +};
    +
    +}
    +
    +#endif // WEB_STREAM_H_
    diff --git a/wt-3.1.7a/src/web/WtException.C b/wt-3.1.7a/src/web/WtException.C
    new file mode 100644
    index 0000000..1d883f5
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WtException.C
    @@ -0,0 +1,23 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "WtException.h"
    +
    +namespace Wt {
    +
    +WtException::WtException(const std::string what)
    +  : what_(what)
    +{ }
    +
    +WtException::WtException(const std::string what,
    +			 const std::exception& wrapped)
    +  : what_(what + "\nCaused by exception:" + wrapped.what())
    +{ }
    +
    +WtException::~WtException() throw()
    +{ }
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WtException.h b/wt-3.1.7a/src/web/WtException.h
    new file mode 100644
    index 0000000..2c02bab
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WtException.h
    @@ -0,0 +1,30 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WT_EXCEPTION_H_
    +#define WT_EXCEPTION_H_
    +
    +#include <string>
    +#include <Wt/WDllDefs.h>
    +
    +namespace Wt {
    +
    +class WT_API WtException : public std::exception
    +{
    +public:
    +  WtException(const std::string what);
    +  WtException(const std::string what, const std::exception& wrapped);
    +  ~WtException() throw();
    +
    +  const char *what() const throw() { return what_.c_str(); }
    +
    +private:
    +  std::string what_;
    +};
    +
    +}
    +
    +#endif // WT_EXCEPTION_H_
    diff --git a/wt-3.1.7a/src/web/WtRandom.C b/wt-3.1.7a/src/web/WtRandom.C
    new file mode 100644
    index 0000000..5e70e55
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WtRandom.C
    @@ -0,0 +1,81 @@
    +#include "WtRandom.h"
    +
    +#if WIN32
    +// Don't link to boost_random
    +#define BOOST_RANDOM_NO_LIB
    +// And when compiling, don't add declspec to the classnames.
    +// We have our own implementation of random_device.cpp (older boosts
    +// didn't support windows well)
    +#ifdef BOOST_ALL_DYN_LINK
    +#undef BOOST_ALL_DYN_LINK
    +#endif
    +#ifdef BOOST_RANDOM_DYN_LINK
    +#undef BOOST_RANDOM_DYN_LINK
    +#endif
    +#endif
    +
    +#include <boost/nondet_random.hpp>
    +
    +#ifdef __linux__
    +#if 0
    +/*
    + * We get errors from the destructor...
    + */
    +#define __use_random_device__
    +#endif
    +#endif
    +#if defined(WIN32) || defined(__CYGWIN__)
    +#define __use_random_device__
    +#include <process.h> // for getpid()
    +#include <stdlib.h>
    +#include <windows.h>
    +#endif
    +
    +namespace{
    +  // Random number generator instantiation for the static methods of WtRandom
    +  Wt::WtRandom wtRandom;
    +}
    +
    +namespace Wt {
    +
    +class WtRandom::Private
    +{
    +public:
    +#ifdef __use_random_device__
    +  boost::random_device rnd_;
    +#endif
    +};
    +
    +WtRandom::WtRandom():
    +_p(new WtRandom::Private)
    +{ 
    +#ifndef __use_random_device__
    +  srand48(getpid());
    +#endif // __use_random_device__
    +}
    +
    +WtRandom::~WtRandom()
    +{
    +  delete _p;
    +}
    +
    +unsigned int WtRandom::rand()
    +{
    +#ifdef __use_random_device__
    +  return _p->rnd_();
    +#else
    +  return lrand48();
    +#endif // __use_random_device__
    +}
    +
    +unsigned int WtRandom::getUnsigned()
    +{
    +  return wtRandom.rand();
    +}
    +
    +double WtRandom::getDouble()
    +{
    +  return ((double)wtRandom.rand())/(RAND_MAX);
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/WtRandom.h b/wt-3.1.7a/src/web/WtRandom.h
    new file mode 100644
    index 0000000..7c25c6e
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/WtRandom.h
    @@ -0,0 +1,43 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + * $Id: WtRandom.h,v 1.7 2008/07/15 06:25:58 kdf Exp $
    + */
    +
    +#ifndef WTRANDOM_H_
    +#define WTRANDOM_H_
    +
    +#include <Wt/WDllDefs.h>
    +#include <stdlib.h>
    +
    +namespace Wt {
    +
    +class WtRandom_Private;
    +
    +class WT_API WtRandom
    +{
    +public:
    +  /* Create and seed a new random number generator. */
    +  WtRandom();
    +
    +  ~WtRandom();
    +
    +  /* Get a next random number */
    +  unsigned int rand();
    +
    +  /* Get a next random number, static version*/
    +  static unsigned int getUnsigned();
    +
    +  /* Get a next random number, static version*/
    +  static double getDouble();
    +
    +private:
    +  class Private;
    +  WtRandom::Private *_p;
    +};
    +
    +}
    +
    +#endif // IFNDEF WTRANDOM_H_
    diff --git a/wt-3.1.7a/src/web/XSSFilter.C b/wt-3.1.7a/src/web/XSSFilter.C
    new file mode 100644
    index 0000000..bd0772e
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/XSSFilter.C
    @@ -0,0 +1,98 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include "Wt/WApplication"
    +#include "Wt/WLogger"
    +#include "Wt/WString"
    +
    +#include "DomElement.h"
    +#include "XSSUtils.h"
    +#include "EscapeOStream.h"
    +
    +#include <stdio.h>
    +#include <string.h>
    +#include <iomanip>
    +#include "Wt/WStringUtil"
    +#include "rapidxml/rapidxml.hpp"
    +#include "rapidxml/rapidxml_print.hpp"
    +
    +using namespace rapidxml;
    +
    +namespace Wt {
    +
    +void XSSSanitize(xml_node<> *x_node)
    +{
    +  for (xml_attribute<> *x_attr = x_node->first_attribute(); x_attr;) {
    +
    +    xml_attribute<> *x_next_attr = x_attr->next_attribute();
    +    if (Wt::XSS::isBadAttribute(x_attr->name())
    +	|| Wt::XSS::isBadAttributeValue(x_attr->name(), x_attr->value())) {
    +      wApp->log("warn") << "(XSS) discarding invalid attribute: "
    +			<< x_attr->name() << ": " << x_attr->value();
    +      x_node->remove_attribute(x_attr);
    +    }
    +
    +    x_attr = x_next_attr;
    +  }
    +
    +  for (xml_node<> *x_child = x_node->first_node(); x_child;) {
    +    xml_node<> *x_next_child = x_child->next_sibling();
    +
    +    if (Wt::XSS::isBadTag(x_child->name())) {
    +      wApp->log("warn") << "(XSS) discarding invalid tag: " << x_child->name();
    +      x_node->remove_node(x_child);
    +    } else
    +      XSSSanitize(x_child);
    +
    +    x_child = x_next_child;
    +  }
    +
    +  if (!x_node->first_node()
    +      && x_node->value_size() == 0
    +      && !DomElement::isSelfClosingTag(x_node->name())) {
    +    // We need to add an emtpy data node since <div /> is illegal HTML
    +    // (but valid XML / XHTML)
    +    xml_node<> *empty
    +      = x_node->document()->allocate_node(node_data, 0, 0, 0, 0);
    +    x_node->append_node(empty);
    +  }
    +}
    +
    +bool XSSFilterRemoveScript(WString& text)
    +{
    +  if (text.empty())
    +    return true;
    +
    +  std::string result = "<span>" + text.toUTF8() + "</span>";
    +  char *ctext = const_cast<char *>(result.c_str()); // Shhht it's okay !
    +
    +  try {
    +    xml_document<> doc;
    +    doc.parse<parse_comment_nodes
    +      | parse_validate_closing_tags
    +      | parse_validate_utf8
    +      | parse_xhtml_entity_translation>(ctext);
    +
    +    XSSSanitize(doc.first_node());
    +
    +    SStream out;
    +    print(out.back_inserter(), *doc.first_node(), print_no_indenting);
    +    result = out.str();
    +  } catch (parse_error& e) {
    +    wApp->log("error") << "Error reading XHTML string: " << e.what();
    +    return false;
    +  }
    +
    +  if (result.length() < 13)
    +    result.clear();
    +  else
    +    result = result.substr(6, result.length() - 13);
    +
    +  text = WString::fromUTF8(result);
    +
    +  return true;
    +}
    +
    +}
    diff --git a/wt-3.1.7a/src/web/XSSFilter.h b/wt-3.1.7a/src/web/XSSFilter.h
    new file mode 100644
    index 0000000..5b78650
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/XSSFilter.h
    @@ -0,0 +1,18 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef XSS_FILTER_H
    +#define XSS_FILTER_H_
    +
    +namespace Wt {
    +
    +  class WString;
    +
    +extern bool XSSFilterRemoveScript(WString& text);
    +
    +}
    +
    +#endif // XSS_FILTER_H_
    diff --git a/wt-3.1.7a/src/web/XSSUtils.C b/wt-3.1.7a/src/web/XSSUtils.C
    new file mode 100644
    index 0000000..23cc8fa
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/XSSUtils.C
    @@ -0,0 +1,107 @@
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "XSSUtils.h"
    +
    +#include <boost/algorithm/string.hpp>
    +
    +namespace Wt {
    +  namespace XSS {
    +
    +#ifdef WT_TARGET_JAVA	
    +    class XSSUtils {
    +    };
    +#endif //WT_TARGET_JAVA
    +
    +    bool isBadTag(const std::string& name)
    +    {
    +      return (boost::iequals(name, "script")
    +	      || boost::iequals(name, "applet")
    +	      || boost::iequals(name, "object")
    +	      || boost::iequals(name, "iframe")
    +	      || boost::iequals(name, "frame")
    +	      || boost::iequals(name, "layer")
    +	      || boost::iequals(name, "ilayer")
    +	      || boost::iequals(name, "frameset")
    +	      || boost::iequals(name, "link")
    +	      || boost::iequals(name, "meta")
    +	      || boost::iequals(name, "title")
    +	      || boost::iequals(name, "base")
    +	      || boost::iequals(name, "basefont")
    +	      || boost::iequals(name, "bgsound")
    +	      || boost::iequals(name, "head")
    +	      || boost::iequals(name, "body")
    +	      || boost::iequals(name, "embed")
    +	      || boost::iequals(name, "style")
    +              || boost::iequals(name, "comment")
    +	      || boost::iequals(name, "blink"));
    +    }
    +  
    +    bool isBadAttribute(const std::string& name)
    +    {
    +      return (boost::istarts_with(name, "on")
    +	      || boost::istarts_with(name, "data")
    +	      || boost::iequals(name, "dynsrc")
    +	      || boost::iequals(name, "id")
    +	      || boost::iequals(name, "autofocus")
    +              || boost::iequals(name, "name")
    +              // avoid repeat-based client DoS
    +              || boost::iequals(name, "repeat-start")
    +              || boost::iequals(name, "repeat-end")
    +              || boost::iequals(name, "repeat")
    +              // Some opera crashes on bad patterns
    +              || boost::iequals(name, "pattern")
    +	      );
    +    }
    +
    +    bool isBadAttributeValue(const std::string& name, const std::string& value)
    +    {
    +      if (boost::iequals(name, "action")
    +	  || boost::iequals(name, "background")
    +	  || boost::iequals(name, "codebase")
    +	  || boost::iequals(name, "dynsrc")
    +	  || boost::iequals(name, "href")
    +	  || boost::iequals(name, "formaction")
    +	  || boost::iequals(name, "poster")
    +	  || boost::iequals(name, "src"))
    +	return (boost::istarts_with(value, "javascript:")
    +		|| boost::istarts_with(value, "vbscript:")
    +		|| boost::istarts_with(value, "about:")
    +		|| boost::istarts_with(value, "chrome:")
    +		|| boost::istarts_with(value, "data:")
    +		|| boost::istarts_with(value, "disk:")
    +		|| boost::istarts_with(value, "hcp:")
    +		|| boost::istarts_with(value, "help:")
    +		|| boost::istarts_with(value, "livescript")
    +		|| boost::istarts_with(value, "lynxcgi:")
    +		|| boost::istarts_with(value, "lynxexec:")
    +		|| boost::istarts_with(value, "ms-help:")
    +		|| boost::istarts_with(value, "ms-its:")
    +		|| boost::istarts_with(value, "mhtml:")
    +		|| boost::istarts_with(value, "mocha:")
    +		|| boost::istarts_with(value, "opera:")
    +		|| boost::istarts_with(value, "res:")
    +		|| boost::istarts_with(value, "resource:")
    +		|| boost::istarts_with(value, "shell:")
    +		|| boost::istarts_with(value, "view-source:")
    +		|| boost::istarts_with(value, "vnd.ms.radio:")
    +		|| boost::istarts_with(value, "wysiwyg:"));
    +      else
    +	if (boost::iequals(name, "style"))
    +	  return boost::icontains(value, "absolute")
    +	    || boost::icontains(value, "behaviour")
    +	    || boost::icontains(value, "behavior")
    +	    || boost::icontains(value, "content")
    +	    || boost::icontains(value, "expression")
    +	    || boost::icontains(value, "fixed")
    +	    || boost::icontains(value, "include-source")
    +	    || boost::icontains(value, "moz-binding")
    +	    || boost::icontains(value, "javascript");
    +	else
    +	  return false;
    +    } 
    +  }
    +}
    diff --git a/wt-3.1.7a/src/web/XSSUtils.h b/wt-3.1.7a/src/web/XSSUtils.h
    new file mode 100644
    index 0000000..f80d100
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/XSSUtils.h
    @@ -0,0 +1,20 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef XSSUTILS_H_
    +#define XSSUTILS_H_
    +
    +#include <string>
    +
    +namespace Wt {
    +  namespace XSS {
    +    bool isBadTag(const std::string& name);
    +    bool isBadAttribute(const std::string& name);
    +    bool isBadAttributeValue(const std::string& name, const std::string& value);
    +  }
    +}
    +
    +#endif // XSSUTILS_H_
    diff --git a/wt-3.1.7a/src/web/random_device.cpp b/wt-3.1.7a/src/web/random_device.cpp
    new file mode 100644
    index 0000000..1228d2b
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/random_device.cpp
    @@ -0,0 +1,180 @@
    +/* boost random_device.cpp implementation
    + *
    + * Copyright Jens Maurer 2000
    + * Distributed under the Boost Software License, Version 1.0. (See
    + * accompanying file LICENSE_1_0.txt or copy at
    + * http://www.boost.org/LICENSE_1_0.txt)
    + *
    + * $Id: random_device.cpp,v 1.4 2008/05/14 09:34:04 kdf Exp $
    + *
    + */
    +
    +#if WIN32
    +// Don't link to boost_random
    +#define BOOST_RANDOM_NO_LIB
    +// And when compiling, don't add declspec to the classnames.
    +// We have our own implementation of random_device.cpp (older boosts
    +// didn't support windows well)
    +#ifdef BOOST_ALL_DYN_LINK
    +#undef BOOST_ALL_DYN_LINK
    +#endif
    +#ifdef BOOST_RANDOM_DYN_LINK
    +#undef BOOST_RANDOM_DYN_LINK
    +#endif
    +#endif
    +
    +#include <boost/lexical_cast.hpp>
    +#include <boost/nondet_random.hpp>
    +#include <string>
    +#include <cassert>
    +
    +#ifndef WIN32
    +#  ifndef __CYGWIN__
    +#    define USE_URANDOM
    +#  endif
    +#endif
    +
    +#if defined(WIN32) || defined(__CYGWIN__)
    +#  define USE_WIN32_CRYPT
    +#endif
    +
    +#ifdef USE_URANDOM
    +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
    +//  A definition is required even for integral static constants
    +const bool boost::random_device::has_fixed_range;
    +const boost::random_device::result_type boost::random_device::min_value;
    +const boost::random_device::result_type boost::random_device::max_value;
    +#endif
    +
    +// the default is the unlimited capacity device, using some secure hash
    +// try "/dev/random" for blocking when the entropy pool has drained
    +const char * const boost::random_device::default_token = "/dev/urandom";
    +
    +/*
    + * This uses the POSIX interface for unbuffered reading.
    + * Using buffered std::istream would consume entropy which may
    + * not actually be used.  Entropy is a precious good we avoid
    + * wasting.
    + */
    +
    +#if defined(__GNUC__) && defined(_CXXRT_STD_NAME)
    +// I have severe difficulty to get the POSIX includes to work with
    +// -fhonor-std and Dietmar Kühl's standard C++ library.  Hack around that
    +// problem for now.
    +extern "C" {
    +static const int O_RDONLY = 0;
    +extern int open(const char *__file, int __oflag, ...);
    +extern int read(int __fd, __ptr_t __buf, size_t __nbytes);
    +extern int close(int __fd);
    +}
    +#else
    +#include <sys/types.h>
    +#include <sys/stat.h>
    +#include <fcntl.h>    // open
    +#include <unistd.h>   // read, close
    +#endif
    +
    +#include <errno.h>    // errno
    +#include <string.h>   // strerror
    +#include <stdexcept>  // std::invalid_argument
    +
    +
    +class boost::random_device::impl
    +{
    +public:
    +  impl(const std::string & token) : path(token) {
    +    fd = open(token.c_str(), O_RDONLY);
    +    if(fd < 0)
    +      error("cannot open");
    +  }
    +
    +  ~impl() { if(close(fd) < 0) error("could not close"); }
    +
    +  unsigned int next() {
    +    unsigned int result;
    +    long sz = read(fd, reinterpret_cast<char *>(&result), sizeof(result));
    +    if(sz == -1)
    +      error("error while reading");
    +    else if(sz != sizeof(result)) {
    +      errno = 0;
    +      error("EOF while reading");
    +    }
    +    return result;
    +  }
    +
    +private:
    +  void error(const std::string & msg) {
    +    throw std::invalid_argument("boost::random_device: " + msg + 
    +                                " random-number pseudo-device " + path + 
    +                                ": " + strerror(errno));
    +  }
    +  const std::string path;
    +  int fd;
    +};
    +
    +#endif
    +
    +#ifdef USE_WIN32_CRYPT
    +
    +#include <windows.h>
    +#include <wincrypt.h>
    +#include <stdexcept>
    +const char * const boost::random_device::default_token = "";
    +
    +// Note about thread-safety: according to my reading of the MSDN page 
    +// 'Threading Issues with Cryptographic Service Providers', both the
    +// CryptAcquireContext and CryptGenRandom functions are thread-safe,
    +// as we specify CRYPT_VERIFYCONTEXT (IO operations will not be performed
    +// and aparently those are the only ones causing threading problems)
    +
    +class boost::random_device::impl
    +{
    +public:
    +  impl(const std::string & ) {
    +     InitOk_ = CryptAcquireContext(&hProv_, 0, 0,
    +         PROV_RSA_FULL, CRYPT_VERIFYCONTEXT|CRYPT_SILENT) ? true : false;
    +     if (!InitOk_) error("error while initializing crypt random context");
    +  }
    +
    +  ~impl() { if (InitOk_) CryptReleaseContext(hProv_, 0); }
    +
    +  unsigned int next() {
    +    unsigned int result = 0;
    +    if((!InitOk_) ||
    +       (!CryptGenRandom(hProv_, sizeof(result), (BYTE*)&result))) {
    +      error("error while generating random number");
    +    }
    +    return result % RAND_MAX;
    +  }
    +
    +private:
    +  void error(const std::string & msg) {
    +     throw std::invalid_argument(msg + " ; error code " + boost::lexical_cast<std::string>(GetLastError()));
    +  }
    +  bool InitOk_;
    +  HCRYPTPROV hProv_;
    +};
    +#endif
    +
    +boost::random_device::random_device(const std::string& token)
    +  : pimpl(new impl(token))
    +{
    +  assert((std::numeric_limits<result_type>::max)() == max_value);
    +}
    +
    +boost::random_device::~random_device()
    +{
    +  // the complete class impl is now visible, so we're safe
    +  // (see comment in random.hpp)
    +  delete pimpl;
    +}
    +
    +double boost::random_device::entropy() const
    +{
    +  return 10;
    +}
    +
    +unsigned int boost::random_device::operator()()
    +{
    +  return pimpl->next();
    +}
    diff --git a/wt-3.1.7a/src/web/skeleton/Boot.html b/wt-3.1.7a/src/web/skeleton/Boot.html
    new file mode 100644
    index 0000000..424b89d
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/Boot.html
    @@ -0,0 +1,160 @@
    +_$_DOCTYPE_$_
    +<html _$_HTMLATTRIBUTES_$_>
    +<head>
    +_$_HEADDECLARATIONS_$_
    +<title></title>
    +<!--[if gte IE 6]>
    +<style type="text/css">
    +v\:* { behavior: url(#default#VML);position:absolute }
    +</style>
    +<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
    +<script id="ie-deferred-loader" defer="defer" src="//:"></script>
    +<![endif]-->
    +<style type="text/css" id="Wt-inline-css">
    +</style>
    +<script type="text/javascript">
    +/*<![CDATA[*/
    +
    +function loadScript(url, callback) {
    +  var s = document.createElement('script');
    +
    +  if (callback) {
    +    if (s.readyState) {
    +      s.onreadystatechange = function() {
    +        if (s.readyState == "loaded" || s.readyState == "complete") {
    +          s.onreadystatechange = null;
    +          callback();
    +        }
    +      };
    +    } else {
    +      s.onload = function() {
    +        callback();
    +      };
    +    }
    +  }
    +
    +  s.setAttribute('src', url);
    +  var h = document.getElementsByTagName('head')[0];
    +  h.appendChild(s);
    +}
    +
    +(function() {
    +
    +try {
    +  document.execCommand("BackgroundImageCache", false, true);
    +} catch (err) { }
    +
    +function rand() {
    +  return Math.round(Math.random()*1000000) + _$_RANDOMSEED_$_;
    +}
    +
    +function setUrl(url) {
    +  if (window.location.replace)
    +    window.location.replace(url);
    +  else
    +    window.location.href=url;
    +}
    +
    +if (window.opera)
    +  window.opera.setOverrideHistoryNavigationMode("compatible");
    +
    +// ajax support
    +var ajax = (window.XMLHttpRequest || window.ActiveXObject);
    +
    +// client-side cookie support
    +var testcookie='jscookietest=valid';
    +document.cookie=testcookie;
    +var no_replace = _$_RELOAD_IS_NEWSESSION_$_
    +  || (_$_USE_COOKIES_$_ && document.cookie.indexOf(testcookie) != -1);
    +document.cookie=testcookie+';expires=Thu, 01 Jan 1970 00:00:00 GMT';
    +
    +// server-side cookie support
    +var inOneSecond = new Date();
    +inOneSecond.setTime(inOneSecond.getTime() + 1000);
    +document.cookie='WtTestCookie=ok;path=/;expires=' + inOneSecond.toGMTString();
    +
    +// hash to query
    +var hash = window.location.hash;
    +if (hash.length > 0)
    +  hash = hash.substr(1);
    +var qstart = hash.indexOf('?');
    +if (qstart != -1)
    +  hash = hash.substr(0, qstart);
    +
    +var ua = navigator.userAgent.toLowerCase();
    +if ((ua.indexOf("gecko") == -1) || (ua.indexOf("webkit") != -1))
    +  hash = unescape(hash);
    +
    +// scale (VML)
    +if (screen.deviceXDPI != screen.logicalXDPI)
    +  scaleInfo = "&scale=" + screen.deviceXDPI / screen.logicalXDPI;
    +else
    +  scaleInfo = "";
    +
    +// determine url
    +var selfUrl=_$_SELF_URL_$_;
    +
    +var needSessionInUrl = !no_replace || !ajax;
    +
    +if (needSessionInUrl) {
    +  function getSessionFromUrl() {
    +    var url, idx, i, queryString, params, tokens;
    +    url = top.location.href;
    +    idx = url.indexOf('?');
    +    queryString = idx >= 0 ? url.substr(idx + 1) : url;
    +    idx = queryString.lastIndexOf("#");
    +    queryString = idx >= 0 ? queryString.substr(0, idx) : queryString;
    +    params = queryString.split("&");
    +
    +    for (i = 0, len = params.length; i < len; i++) {
    +      tokens = params[i].split("=");
    +      if (tokens.length >= 2)
    +        if (tokens[0] === "wtd")
    +          return unescape(tokens[1]);
    +    }
    +
    +    return null;
    +  }
    +
    +  if (getSessionFromUrl() === '_$_SESSION_ID_$_')
    +    needSessionInUrl = false;
    +}
    +
    +if (needSessionInUrl) {
    +  if (hash.length > 0)
    +    selfUrl += '#' + hash;
    +  setUrl(selfUrl);
    +} else if (ajax) {
    +  var canonicalUrl = _$_AJAX_CANONICAL_URL_$_;
    +  if (canonicalUrl.length > 1)
    +    setUrl(canonicalUrl);
    +  else {
    +    if (hash.length > 1 && hash.charAt(0) == '/')
    +      selfUrl += '&_=' + encodeURIComponent(hash);
    +
    +    loadScript(selfUrl + scaleInfo + '&request=script&rand=' + rand(), null);
    +  }
    +}
    +
    +})();
    +
    +window.isLoaded = false;
    +
    +function onLoad() { window.isLoaded = true; }
    +
    +/* ]]> */
    +</script>
    +_$_AUTO_REDIRECT_$_
    +</head>
    +<body onload="onLoad();">
    +<!--[if gte IE 6]>
    +<iframe id="Wt-history-iframe" src="_$_BLANK_HTML_$_"
    + style="position:absolute;top:0;left:0;width:1px;height:1px;visibility:hidden;">
    +</iframe> 
    +<![endif]-->
    +<input id="Wt-history-field" type="hidden"/>
    +<noscript>
    +  <a href="_$_REDIRECT_URL_$_">_$_NOSCRIPT_TEXT_$_</a>
    +</noscript>
    +</body>
    +</html>
    diff --git a/wt-3.1.7a/src/web/skeleton/CommAjax.js b/wt-3.1.7a/src/web/skeleton/CommAjax.js
    new file mode 100644
    index 0000000..3ce9933
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/CommAjax.js
    @@ -0,0 +1,87 @@
    +/*
    + * Workaround non equivalence in short circuit evaluation of google minifier
    + * for IE
    + */
    +_$_WT_CLASS_$_.condCall = function(o, f, a) {
    +  if (o[f])
    +    o[f](a);
    +};
    +
    +_$_APP_CLASS_$_._p_.comm = new (function(handleResponse) {
    +    var handler = handleResponse;
    +
    +    function Request(url, data, userData, id, timeout) {
    +      var request = false;
    +      var timer = null;
    +      var handled = false;
    +
    +      function recvCallback() {
    +	if (request.readyState == 4) {
    +	  if (handled)
    +	    return;
    +
    +	  // console.log("recvCallback " + request.status);
    +	  clearTimeout(timer);
    +
    +	  if (request.status == 200
    +	      && request.getResponseHeader("Content-Type")
    +	      && request.getResponseHeader("Content-Type")
    +	      .indexOf("text/javascript") == 0)
    +	    handler(0, request.responseText, userData);
    +	  else
    +	    handler(1, null, userData);
    +
    +	  request.onreadystatechange = new Function;
    +	  request = null;
    +
    +	  handled = true;
    +	}
    +      }
    +
    +      function handleTimeout() {
    +	request.onreadystatechange = new Function;
    +	request = null;
    +	handled = true;
    +	handler(2, null, userData);
    +      };
    +
    +      this.abort = function() {
    +	request.onreadystatechange = new Function;
    +	handled = true;
    +	request.abort();
    +	request = null;
    +      };
    +
    +      if (window.XMLHttpRequest)
    +	request = new XMLHttpRequest();
    +      else if (window.ActiveXObject)
    +	try {
    +	  request = new ActiveXObject("Msxml2.XMLHTTP");
    +	} catch (err) {
    +	  try {
    +	    request = new ActiveXObject("Microsoft.XMLHTTP");
    +	  } catch (err2) {
    +	  }
    +	}
    +
    +      if (!request)
    +	return;
    +
    +      request.open('POST', url, true);
    +      request.setRequestHeader("Content-type",
    +			       "application/x-www-form-urlencoded;");
    +      if (_$_CLOSE_CONNECTION_$_)
    +	request.setRequestHeader("Connection","close");
    +
    +      if (timeout > 0)
    +	timer = setTimeout(handleTimeout, timeout);
    +      request.onreadystatechange = recvCallback;
    +      request.send(data);
    +    }
    +
    +    this.responseReceived = function(updateId) { };
    +
    +    this.sendUpdate = function(url, data, userData, id, timeout) {
    +      return new Request(url, data, userData, id, timeout);
    +    };
    +  })(_$_APP_CLASS_$_._p_.handleResponse);
    diff --git a/wt-3.1.7a/src/web/skeleton/CommScript.js b/wt-3.1.7a/src/web/skeleton/CommScript.js
    new file mode 100644
    index 0000000..adfce5f
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/CommScript.js
    @@ -0,0 +1,56 @@
    +/*
    + * Workaround non equivalence in short circuit evaluation of google minifier
    + * for IE
    + */
    +_$_WT_CLASS_$_.condCall = function(o, f, a) {
    +  if (o[f])
    +    o[f](a);
    +}
    +
    +_$_APP_CLASS_$_._p_.comm = new (function(handleResponse) {
    +    var Wt = _$_WT_CLASS_$_;
    +
    +    var handler = handleResponse;
    +    var lastId = 0;
    +    var requests = new Array();
    +
    +    function Request(url, data, userData, id, timeout) {
    +      var self = this;
    +
    +      this.script = document.createElement('SCRIPT');
    +      this.script.id = "script" + id;
    +      this.script.src = url + '&' + data;
    +      this.script.type = 'text/javascript';
    +
    +      var h = document.getElementsByTagName('HEAD')[0];
    +      h.appendChild(this.script);
    +
    +      this.userData = userData;
    +
    +      this.abort = function() {
    +	self.script.parentNode.removeChild(script);
    +      }
    +    }
    +
    +    this.responseReceived = function(updateId) {
    +      for (i = lastId; i < updateId; ++i) {
    +	var request = requests[i];
    +
    +	if (request) {
    +	  handler(0, "", request.userData);
    +	  request.script.parentNode.removeChild(request.script);
    +	}
    +
    +	Wt.arrayRemove(requests, i);
    +      }
    +
    +      lastId = updateId;
    +    };
    +
    +    this.sendUpdate = function(url, data, userData, id, timeout) {
    +      var request = new Request(url, data, userData, id, timeout);
    +      requests[id] = request;
    +      return request;
    +    };
    +
    +  })(_$_APP_CLASS_$_._p_.handleResponse);
    diff --git a/wt-3.1.7a/src/web/skeleton/Hybrid.html b/wt-3.1.7a/src/web/skeleton/Hybrid.html
    new file mode 100644
    index 0000000..df27706
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/Hybrid.html
    @@ -0,0 +1,191 @@
    +_$_DOCTYPE_$_
    +<html _$_HTMLATTRIBUTES_$_>
    +<head>
    +_$_HEADDECLARATIONS_$_
    +<title>_$_TITLE_$_</title>
    +<!--[if gte IE 6]>
    +<style type="text/css">
    +v\:* { behavior: url(#default#VML);position:absolute }
    +</style>
    +<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
    +<script id="ie-deferred-loader" defer="defer" src="//:"></script>
    +<![endif]-->
    +<style type="text/css" id="Wt-inline-css">
    +/*<![CDATA[*/
    +_$_STYLESHEET_$_
    +* ]]> */
    +</style>
    +_$_STYLESHEETS_$_
    +<script type="text/javascript">
    +/*<![CDATA[*/
    +
    +function loadScript(url, callback) {
    +  var s = document.createElement('script');
    +
    +  if (callback) {
    +    if (s.readyState){  //IE
    +      s.onreadystatechange = function() {
    +        if (s.readyState == "loaded" ||
    +            s.readyState == "complete"){
    +          s.onreadystatechange = null;
    +          callback();
    +        }
    +      };
    +    } else {  //Others
    +      s.onload = function(){
    +        callback();
    +      };
    +    }
    +  }
    +
    +  s.setAttribute('src', url);
    +  var h = document.getElementsByTagName('head')[0];
    +  h.appendChild(s);
    +}
    +
    +(function() {
    +
    +try {
    +  document.execCommand("BackgroundImageCache", false, true);
    +} catch (err) { }
    +
    +function rand() {
    +  return Math.round(Math.random()*1000000) + _$_RANDOMSEED_$_;
    +}
    +
    +function setUrl(url) {
    +  if (window.location.replace)
    +    window.location.replace(url);
    +  else
    +    window.location.href=url;
    +}
    +
    +function hideForm() {
    +  var f = document.getElementById('Wt-form');
    +  if (f != null)
    +    f.style.visibility='hidden';
    +  else
    +    setTimeout(hideForm, 10);
    +}
    +
    +if (window.opera)
    +  window.opera.setOverrideHistoryNavigationMode("compatible");
    +
    +// ajax support
    +var ajax = (window.XMLHttpRequest || window.ActiveXObject);
    +
    +// client-side cookie support
    +var testcookie='jscookietest=valid';
    +document.cookie=testcookie;
    +var no_replace = _$_RELOAD_IS_NEWSESSION_$_
    +  || (_$_USE_COOKIES_$_ && document.cookie.indexOf(testcookie) != -1);
    +document.cookie=testcookie+';expires=Thu, 01 Jan 1970 00:00:00 GMT';
    +
    +// server-side cookie support
    +var inOneSecond = new Date();
    +inOneSecond.setTime(inOneSecond.getTime() + 1000);
    +document.cookie='WtTestCookie=ok;path=/;expires=' + inOneSecond.toGMTString();
    +
    +// hash to query
    +var hash = window.location.hash;
    +if (hash.length > 0)
    +  hash = hash.substr(1);
    +var qstart = hash.indexOf('?');
    +if (qstart != -1)
    +  hash = hash.substr(0, qstart);
    +
    +var ua = navigator.userAgent.toLowerCase();
    +if ((ua.indexOf("gecko") == -1) || (ua.indexOf("webkit") != -1))
    +  hash = unescape(hash);
    +
    +// scale (VML)
    +if (screen.deviceXDPI != screen.logicalXDPI)
    +  scaleInfo = "&scale=" + screen.deviceXDPI / screen.logicalXDPI;
    +else
    +  scaleInfo = "";
    +
    +// determine url
    +var selfUrl=_$_SELF_URL_$_;
    +
    +var needSessionInUrl = !no_replace || !ajax;
    +
    +if (needSessionInUrl) {
    +  function getSessionFromUrl() {
    +    var url, idx, i, queryString, params, tokens;
    +    url = top.location.href;
    +    idx = url.indexOf('?');
    +    queryString = idx >= 0 ? url.substr(idx + 1) : url;
    +    idx = queryString.lastIndexOf("#");
    +    queryString = idx >= 0 ? queryString.substr(0, idx) : queryString;
    +    params = queryString.split("&");
    +
    +    for (i = 0, len = params.length; i < len; i++) {
    +      tokens = params[i].split("=");
    +      if (tokens.length >= 2)
    +        if (tokens[0] === "wtd")
    +          return unescape(tokens[1]);
    +    }
    +
    +    return null;
    +  }
    +
    +  if (getSessionFromUrl() === '_$_SESSION_ID_$_')
    +    needSessionInUrl = false;
    +}
    +
    +if (needSessionInUrl) {
    +  if (hash.length > 0)
    +    selfUrl += '#' + hash;
    +  setUrl(selfUrl);
    +} else if (ajax) {
    +  var canonicalUrl = _$_AJAX_CANONICAL_URL_$_;
    +  if (canonicalUrl.length > 1) {
    +    var inOneSecond = new Date();
    +    inOneSecond.setTime(inOneSecond.getTime() + 1000);
    +    var pathcookie='WtInternalPath=' + escape(_$_INTERNAL_PATH_$_)
    +      + ';path=/;expires=' + inOneSecond.toGMTString();
    +    document.cookie=pathcookie;
    +    setUrl(canonicalUrl);
    +  } else {
    +    if (hash.length > 1 && hash.charAt(0) == '/') {
    +      selfUrl += '&_=' + encodeURIComponent(hash);
    +      if (hash != _$_INTERNAL_PATH_$_)
    +        setTimeout(hideForm, 10);
    +    }
    +
    +    loadScript(selfUrl + scaleInfo + '&request=script&rand=' + rand(), null);
    +  }
    +}
    +
    +})();
    +
    +window.isLoaded = false;
    +
    +function onLoad() { window.isLoaded = true; }
    +
    +/* ]]> */
    +</script>
    +</head>
    +<body _$_BODYATTRIBUTES_$_ onload="onLoad();">
    +<!--[if gte IE 6]>
    +<iframe id="Wt-history-iframe" src="_$_BLANK_HTML_$_"
    + style="position:absolute;top:0;left:0;width:1px;height:1px;visibility:hidden;">
    +</iframe> 
    +<![endif]-->
    +<div>
    +  <input id="Wt-history-field" type="hidden"/>
    +</div>
    +_$_$if_FORM_$_()
    +<form method='post' action='_$_RELATIVE_URL_$_' id='Wt-form'
    +      enctype='multipart/form-data' style='width:100%;height:100%;margin:0px;'>
    +  <div>
    +    <input name='request' id='request' type='hidden' value='page' />
    +    <input name='wtd' id='wtd' type='hidden' value='_$_SESSION_ID_$_' />
    +  </div>
    +_$_$endif_$_()
    +  _$_HTML_$_
    +_$_$if_FORM_$_()
    +</form>
    +_$_$endif_$_()
    +</body>
    +</html>
    diff --git a/wt-3.1.7a/src/web/skeleton/Plain.html b/wt-3.1.7a/src/web/skeleton/Plain.html
    new file mode 100644
    index 0000000..e8863f9
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/Plain.html
    @@ -0,0 +1,32 @@
    +_$_DOCTYPE_$_
    +<html _$_HTMLATTRIBUTES_$_>
    +<head>
    +_$_HEADDECLARATIONS_$_
    +<title>_$_TITLE_$_</title>
    +<!--[if gte IE 6]>
    +<style type="text/css">
    +v\:* { behavior: url(#default#VML);position:absolute }
    +</style>
    +<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
    +<![endif]-->
    +<style type="text/css">
    +/*<![CDATA[*/
    +_$_STYLESHEET_$_
    +* ]]> */
    +</style>
    +_$_STYLESHEETS_$_
    +</head>
    +<body _$_BODYATTRIBUTES_$_>
    +_$_$if_FORM_$_()
    +<form method='post' action='_$_RELATIVE_URL_$_' id='form'
    +      enctype='multipart/form-data' style='width:100%;height:100%;margin:0px;'>
    +  <input name='request' id='request' type='hidden' value='page' />
    +  <input name='wtd' id='wtd' type='hidden' value='_$_SESSION_ID_$_' />
    +_$_$endif_$_()
    +  _$_HTML_$_
    +_$_$if_FORM_$_()
    +</form>
    +<meta http-equiv='refresh' content='_$_REFRESH_$_' />
    +_$_$endif_$_()
    +</body>
    +</html>
    diff --git a/wt-3.1.7a/src/web/skeleton/Wt.js b/wt-3.1.7a/src/web/skeleton/Wt.js
    new file mode 100644
    index 0000000..add89fe
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/Wt.js
    @@ -0,0 +1,2061 @@
    +/**
    + * @preserve Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * For terms of use, see LICENSE.
    + */
    +_$_$if_DYNAMIC_JS_$_();
    +window.WT_DECLARE_WT_MEMBER = function(i, name, fn)
    +{
    +  var proto = name.indexOf('.prototype');
    +  if (proto == -1)
    +    _$_WT_CLASS_$_[name] = fn;
    +  else
    +    _$_WT_CLASS_$_[name.substr(0, proto)]
    +      .prototype[name.substr(proto + '.prototype.'.length)] = fn;
    +};
    +
    +window.WT_DECLARE_APP_MEMBER = function(i, name, fn)
    +{
    +  var proto = name.indexOf('.prototype');
    +  if (proto == -1)
    +    _$_APP_CLASS_$_[name] = fn;
    +  else
    +    _$_APP_CLASS_$_[name.substr(0, proto)]
    +      .prototype[name.substr(proto + '.prototype.'.length)] = fn;
    +};
    +
    +_$_$endif_$_();
    +
    +window._$_WT_CLASS_$_ = new (function()
    +{
    +var WT = this;
    +
    +// buttons currently down
    +this.buttons = 0;
    +
    +this.mouseDown = function(e) {
    +  WT.buttons |= WT.button(e);
    +};
    +
    +this.mouseUp = function(e) {
    +  WT.buttons ^= WT.button(e);
    +};
    +
    +/**
    + * @preserve Includes Array Remove - By John Resig (MIT Licensed)
    + */
    +this.arrayRemove = function(a, from, to) {
    +  var rest = a.slice((to || from) + 1 || a.length);
    +  a.length = from < 0 ? a.length + from : from;
    +  return a.push.apply(a, rest);
    +};
    +
    +this.addAll = function(a1, a2) {
    +  for (var i = 0, il = a2.length; i < il; ++i)
    +    a1.push(a2[i]);
    +}
    +
    +var ie = (function(){
    +    var undef,
    +        v = 3,
    +        div = document.createElement('div'),
    +        all = div.getElementsByTagName('i');
    +
    +    while (
    +        div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
    +        all[0]
    +    ) {}
    +
    +    return v > 4 ? v : undef;
    +}());
    +
    +this.isIE = ie !== undefined;
    +this.isIE6 = ie === 6;
    +this.isIElt9 = ie < 9;
    +this.isGecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
    +this.isIEMobile = navigator.userAgent.toLowerCase().indexOf("msie 4") != -1
    +  || navigator.userAgent.toLowerCase().indexOf("msie 5") != -1;
    +this.isOpera = typeof window.opera !== 'undefined';
    +this.updateDelay = this.isIE ? 10 : 51;
    +
    +this.setHtml = function (el, html, add) {
    +  function myImportNode(e, deep) {
    +    var newNode, i, il;
    +    switch (e.nodeType) {
    +    case 1: // element
    +      if (e.namespaceURI == null)
    +	newNode = document.createElement(e.nodeName);
    +      else
    +	newNode = document.createElementNS(e.namespaceURI, e.nodeName);
    +      if (e.attributes && e.attributes.length > 0)
    +	for (i = 0, il = e.attributes.length; i < il;)
    +	  newNode.setAttribute(e.attributes[i].nodeName,
    +			       e.getAttribute(e.attributes[i++].nodeName));
    +      if (deep && e.childNodes.length > 0)
    +	for (i = 0, il = e.childNodes.length; i < il;) {
    +	  var c = myImportNode(e.childNodes[i++], deep);
    +	  if (c)
    +	    newNode.appendChild(c);
    +	}
    +      return newNode;
    +      break;
    +    case 3: // text
    +    case 4: // cdata
    +    case 5: // comment
    +      return document.createTextNode(e.nodeValue);
    +      break;
    +    }
    +
    +    return null;
    +  }
    +
    +  if (WT.isIE || (_$_INNER_HTML_$_ && !add)) {
    +    if (add)
    +      el.innerHTML += html;
    +    else
    +      el.innerHTML = html;
    +  } else {
    +    var d, b;
    +    d = new DOMParser();
    +    b = d.parseFromString('<div>'+html+'<\/div>','application/xhtml+xml');
    +    d = b.documentElement;
    +    if (d.nodeType != 1) // element
    +      d = d.nextSibling;
    +
    +    if (!add)
    +      el.innerHTML = '';
    +
    +    for (var i = 0, il = d.childNodes.length; i < il;)
    +      el.appendChild(myImportNode(d.childNodes[i++], true));
    +  }
    +};
    +
    +this.hasTag = function(e, s) {
    +  return e.nodeType == 1 && e.tagName.toUpperCase() === s;
    +};
    +
    +this.insertAt = function(p, c, i) {
    +  if (p.childNodes.length == 0)
    +    p.appendChild(c);
    +  else
    +    p.insertBefore(c, p.childNodes[i]);
    +};
    +
    +this.remove = function(id)
    +{
    +  var e = WT.getElement(id);
    +  if (e)
    +    e.parentNode.removeChild(e);
    +};
    +
    +this.contains = function(w1, w2) {
    +  var p = w2.parentNode;
    +
    +  while (p != null && p.tagName.toLowerCase() != "body") {
    +    if (p == w1)
    +      return true;
    +    p = p.parentNode;
    +  }
    +
    +  return false;
    +}
    +
    +this.unstub = function(from, to, methodDisplay) {
    +  if (methodDisplay == 1) {
    +    if (from.style.display != 'none')
    +      to.style.display = from.style.display;
    +  } else {
    +    to.style.position = from.style.position;
    +    to.style.left = from.style.left;
    +    to.style.visibility = from.style.visibility;
    +  }
    +
    +  if (from.style.height)
    +    to.style.height = from.style.height;
    +  if (from.style.width)
    +    to.style.width = from.style.width;
    +};
    +
    +this.unwrap = function(e) {
    +  e = WT.getElement(e);
    +  if (e.parentNode.className.indexOf('Wt-wrap') == 0) {
    +    var wrapped = e;
    +    e = e.parentNode;
    +    if (e.className.length >= 8)
    +      wrapped.className = e.className.substring(8);
    +    if (WT.isIE)
    +      wrapped.style.setAttribute('cssText', e.getAttribute('style'));
    +    else
    +      wrapped.setAttribute('style', e.getAttribute('style'));
    +    e.parentNode.replaceChild(wrapped, e);
    +  } else {
    +    if (e.getAttribute('type') == 'submit') {
    +      e.setAttribute('type', 'button');
    +      e.removeAttribute('name');
    +    } if (WT.hasTag(e, 'INPUT') && e.getAttribute('type') == 'image') {
    +      // change <input> to <image>
    +      var img = document.createElement('img');
    +      if (img.mergeAttributes) {
    +	img.mergeAttributes(e, false);
    +	img.src = e.src;
    +      } else {
    +	if (e.attributes && e.attributes.length > 0) {
    +	  var i, il;
    +	  for (i = 0, il = e.attributes.length; i < il; i++) {
    +	    var n = e.attributes[i].nodeName;
    +	    if (n != 'type' && n != 'name')
    +	      img.setAttribute(n, e.getAttribute(n));
    +	  }
    +	}
    +      }
    +      e.parentNode.replaceChild(img, e);
    +    }
    +  }
    +};
    +
    +var delegating = false;
    +
    +this.CancelPropagate = 0x1;
    +this.CancelDefaultAction = 0x2;
    +this.CancelAll = 0x3;
    +
    +this.cancelEvent = function(e, cancelType) {
    +  if (delegating)
    +    return;
    +
    +  var ct = cancelType === undefined ? WT.CancelAll : cancelType;
    +
    +  if (ct & WT.CancelDefaultAction)
    +    if (e.preventDefault)
    +      e.preventDefault();
    +    else
    +      e.returnValue=false;
    +
    +  if (ct & WT.CancelPropagate) {
    +    if (e.stopPropagation)
    +      e.stopPropagation();
    +    else
    +      e.cancelBubble=true;
    +
    +    try {
    +      if (document.activeElement && document.activeElement.blur)
    +	if (WT.hasTag(document.activeElement, "TEXTAREA"))
    +	  document.activeElement.blur();
    +    } catch(e) { }
    +  }
    +};
    +
    +this.getElement = function(id) {
    +  var el = document.getElementById(id);
    +  if (!el)
    +    for (var i = 0; i < window.frames.length; ++i) {
    +      try {
    +        el = window.frames[i].document.getElementById(id);
    +        if (el)
    +          return el;
    +      } catch (e) {
    +      }
    +    }
    +  return el;
    +};
    +
    +// Get coordinates of element relative to page origin.
    +this.widgetPageCoordinates = function(obj) {
    +  var objX = 0, objY = 0, op;
    +
    +  // bug in safari, according to W3C, offsetParent for an area element should
    +  // be the map element, but safari returns null.
    +  if (WT.hasTag(obj, "AREA"))
    +    obj = obj.parentNode.nextSibling; // img after map
    +
    +  while (obj) {
    +    objX += obj.offsetLeft;
    +    objY += obj.offsetTop;
    +
    +    var f = css(obj, 'position');
    +    if (f == 'fixed') {
    +      objX += document.body.scrollLeft
    +	+ document.documentElement.scrollLeft;
    +      objY += document.body.scrollTop
    +	+ document.documentElement.scrollTop;
    +      break;
    +    }
    +
    +    op = obj.offsetParent;
    +
    +    if (op == null)
    +      obj = null;
    +    else {
    +      do {
    +	obj = obj.parentNode;
    +	if (WT.hasTag(obj, "DIV")) {
    +	  objX -= obj.scrollLeft;
    +	  objY -= obj.scrollTop;
    +	}
    +      } while (obj != null && obj != op);
    +    }
    +  }
    +
    +  return { x: objX, y: objY };
    +};
    +
    +// Get coordinates of (mouse) event relative to a element.
    +this.widgetCoordinates = function(obj, e) {
    +  var p = WT.pageCoordinates(e);
    +  var w = WT.widgetPageCoordinates(obj);
    +  return { x: p.x - w.x, y: p.y - w.y };
    +};
    +
    +// Get coordinates of (mouse) event relative to page origin.
    +this.pageCoordinates = function(e) {
    +  if (!e) e = window.event;
    +  var posX = 0, posY = 0;
    +  if (e.pageX || e.pageY) {
    +    posX = e.pageX; posY = e.pageY;
    +  } else if (e.clientX || e.clientY) {
    +    posX = e.clientX + document.body.scrollLeft
    +      + document.documentElement.scrollLeft;
    +    posY = e.clientY + document.body.scrollTop
    +      + document.documentElement.scrollTop;
    +  }
    +
    +  return { x: posX, y: posY };
    +};
    +
    +this.windowCoordinates = function(e) {
    +  var p = WT.pageCoordinates(e);
    +  var cx = p.x - document.body.scrollLeft - document.documentElement.scrollLeft;
    +  var cy = p.y - document.body.scrollTop - document.documentElement.scrollTop;
    +
    +  return { x: cx, y: cy };
    +};
    +
    +this.wheelDelta = function(e) {
    +  var delta = 0;
    +  if (e.wheelDelta) { /* IE/Opera. */
    +    delta = e.wheelDelta > 0 ? 1 : -1;
    +    /* if (window.opera)
    +       delta = -delta; */
    +  } else if (e.detail) {
    +    delta = e.detail < 0 ? 1 : -1;
    +  }
    +  return delta;
    +};
    +
    +this.scrollIntoView = function(id) {
    +  var obj = document.getElementById(id);
    +  if (obj && obj.scrollIntoView)
    +    obj.scrollIntoView(true);
    +};
    +
    +this.getSelectionRange = function(elem) {
    +  if (document.selection) { // IE
    +    if (WT.hasTag(elem, 'TEXTAREA')) {
    +      var sel = document.selection.createRange();
    +      var sel2 = sel.duplicate();
    +      sel2.moveToElementText(elem);
    +
    +      var pos = 0;
    +      if(sel.text.length > 1) {
    +	pos = pos - sel.text.length;
    +	if(pos < 0) {
    +	  pos = 0;
    +	}
    +      }
    +
    +      var caretPos = -1 + pos;
    +      sel2.moveStart('character', pos);
    +
    +      while (sel2.inRange(sel)) {
    +	sel2.moveStart('character');
    +	caretPos++;
    +      }
    +
    +      var selStr = sel.text.replace(/\r/g, "");
    +
    +      return {start: caretPos, end: selStr.length + caretPos};
    +    } else {
    +      var start, end;
    +      var val = $(elem).val();
    +      var range = document.selection.createRange().duplicate();
    +      range.moveEnd("character", val.length);
    +      start = (range.text == "" ? val.length : val.lastIndexOf(range.text));
    +
    +      range = document.selection.createRange().duplicate();
    +      range.moveStart("character", -val.length);
    +      end = range.text.length;
    +
    +      return {start: start, end: end};
    +    }
    +  } else if (elem.selectionStart || elem.selectionStart == 0) {
    +    return {start: elem.selectionStart, end: elem.selectionEnd};
    +  } else
    +    return {start: -1, end: -1};
    +};
    +
    +this.setSelectionRange = function(elem, start, end) {
    +  /**
    +   * @preserve Includes jQuery Caret Range plugin
    +   * Copyright (c) 2009 Matt Zabriskie
    +   * Released under the MIT and GPL licenses.
    +   */
    +  var val = $(elem).val();
    +
    +  if (typeof start != "number") start = -1;
    +  if (typeof end != "number") end = -1;
    +  if (start < 0) start = 0;
    +  if (end > val.length) end = val.length;
    +  if (end < start) end = start;
    +  if (start > end) start = end;
    +
    +  elem.focus();
    +
    +  if (typeof elem.selectionStart !== 'undefined') {
    +    elem.selectionStart = start;
    +    elem.selectionEnd = end;
    +  }
    +  else if (document.selection) {
    +    var range = elem.createTextRange();
    +    range.collapse(true);
    +    range.moveStart("character", start);
    +    range.moveEnd("character", end - start);
    +    range.select();
    +  }
    +};
    +
    +this.isKeyPress = function(e) {
    +  if (!e) e = window.event;
    +
    +  if (e.altKey || e.ctrlKey || e.metaKey)
    +    return false;
    +
    +  var charCode = (typeof e.charCode !== 'undefined') ? e.charCode : 0;
    +
    +  if (charCode > 0 || WT.isIE)
    +    return true;
    +  else {
    +    if (WT.isOpera)
    +      return (e.keyCode == 13 || e.keyCode == 27
    +	      || (e.keyCode >= 32 && e.keyCode < 125));
    +    else
    +      return (e.keyCode == 13 || e.keyCode == 27 || e.keyCode == 32
    +	      || (e.keyCode > 46 && e.keyCode < 112));
    +
    +  }
    +};
    +
    +function css(c, s) {
    +  if (c.style[s])
    +    return c.style[s];
    +  else if (document.defaultView && document.defaultView.getComputedStyle)
    +    return document.defaultView.getComputedStyle(c, null)[s];
    +  else if (c.currentStyle)
    +    return c.currentStyle[s];
    +  else
    +    return null;
    +}
    +
    +function parseCss(value, regex, defaultvalue) {
    +  if (value == 'auto' || value == null)
    +    return defaultvalue;
    +  var m = regex.exec(value),
    +      v = m && m.length == 2 ? m[1] : null;
    +  return v ? parseFloat(v) : defaultvalue;
    +}
    +
    +function parsePx(v) {
    +  return parseCss(v, /^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i, 0);
    +}
    +
    +function parsePct(v, defaultValue) {
    +  return parseCss(v, /^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i, defaultValue);
    +}
    +
    +// Get an element metric in pixels
    +this.px = function(c, s) {
    +  return parsePx(css(c, s));
    +};
    +
    +// Get a widget style in pixels, when set directly
    +this.pxself = function(c, s) {
    +  return parsePx(c.style[s]);
    +};
    +
    +this.pctself = function(c, s) {
    +  return parsePct(c.style[s], 0);
    +};
    +
    +// Return if an element (or one of its ancestors) is hidden
    +this.isHidden = function(w) {
    +  if (w.style.display == 'none')
    +    return true;
    +  else {
    +    w = w.parentNode;
    +    if (w != null && w.tagName.toLowerCase() != "body")
    +      return WT.isHidden(w);
    +    else
    +      return false;
    +  }
    +};
    +
    +this.IEwidth = function(c, min, max) {
    +  if (c.parentNode) {
    +    var r = c.parentNode.clientWidth
    +    - WT.px(c, 'marginLeft')
    +    - WT.px(c, 'marginRight')
    +    - WT.px(c, 'borderLeftWidth')
    +    - WT.px(c, 'borderRightWidth')
    +    - WT.px(c.parentNode, 'paddingLeft')
    +    - WT.px(c.parentNode, 'paddingRight');
    +
    +    min = parsePct(min, 0);
    +    max = parsePct(max, 100000);
    +
    +    if (r < min)
    +      return min-1;
    +    else if (r > max)
    +      return max+1;
    +    else if (c.style["styleFloat"] != "")
    +      return min-1;
    +    else
    +      return "auto";
    +  } else
    +    return "auto";
    +};
    +
    +this.hide = function(o) { WT.getElement(o).style.display = 'none'; };
    +this.inline = function(o) { WT.getElement(o).style.display = 'inline'; };
    +this.block = function(o) { WT.getElement(o).style.display = 'block'; };
    +this.show = function(o) { WT.getElement(o).style.display = ''; };
    +
    +var captureElement = null;
    +this.firedTarget = null;
    +
    +this.target = function(event) {
    +  return WT.firedTarget || event.target || event.srcElement;
    +};
    +
    +function delegateCapture(e) {
    +  if (captureElement == null)
    +    return null;
    +
    +  if (!e) e = window.event;
    +
    +  if (e) {
    +    var t = WT.target(e), p = t;
    +
    +    while (p && p != captureElement)
    +      p = p.parentNode;
    +
    +    /*
    +     * We don't need to capture	the event when the event falls inside the
    +     * capture element. In this way, more specific widgets inside may still
    +     * handle (and cancel) the event if they want.
    +     *
    +     * On IE this means that we need to delegate the event to the event
    +     * target; on other browsers we can just rely on event bubbling.
    +     */
    +    if (p == captureElement)
    +      return WT.isIElt9 ? t : null;
    +    else
    +      return captureElement;
    +  } else
    +    return captureElement;
    +}
    +
    +function mouseMove(e) {
    +  var d = delegateCapture(e);
    +
    +  if (d && !delegating) {
    +    if (!e) e = window.event;
    +    delegating = true;
    +    if (WT.isIElt9) {
    +      WT.firedTarget = e.srcElement || d;
    +      d.fireEvent('onmousemove', e);
    +      WT.firedTarget = null;
    +    } else
    +      WT.condCall(d, 'onmousemove', e);
    +    delegating = false;
    +    return false;
    +  } else
    +    return true;
    +}
    +
    +function mouseUp(e) {
    +  var d = delegateCapture(e);
    +  WT.capture(null);
    +
    +  if (d) {
    +    if (!e) e = window.event;
    +
    +    if (WT.isIElt9) {
    +      WT.firedTarget = e.srcElement || d;
    +      d.fireEvent('onmouseup', e);
    +      WT.firedTarget = null;
    +    } else
    +      WT.condCall(d, 'onmouseup', e);
    +
    +    WT.cancelEvent(e, WT.CancelPropagate);
    +
    +    return false;
    +  } else
    +    return true;
    +}
    +
    +var captureInitialized = false;
    +
    +function initCapture() {
    +  if (captureInitialized)
    +    return;
    +
    +  captureInitialized = true;
    +
    +  if (document.body.addEventListener) {
    +    var db = document.body;
    +    db.addEventListener('mousemove', mouseMove, true);
    +    db.addEventListener('mouseup', mouseUp, true);
    +
    +    if (WT.isGecko) {
    +      window.addEventListener('mouseout', function(e) {
    +				if (!e.relatedTarget
    +				    && WT.hasTag(e.target, "HTML"))
    +				  mouseUp(e);
    +			      }, true);
    +    }
    +  } else {
    +    var db = document.body;
    +    db.attachEvent('onmousemove', mouseMove);
    +    db.attachEvent('onmouseup', mouseUp);
    +  }
    +}
    +
    +this.capture = function(obj) {
    +  initCapture();
    +
    +  if (captureElement && obj)
    +    return;
    +
    +  captureElement = obj;
    +
    +  var db = document.body;
    +  if (db.setCapture)
    +    if (obj != null)
    +      db.setCapture();
    +    else
    +      db.releaseCapture();
    +
    +  if (obj != null) {
    +    $(db).addClass('unselectable');
    +    db.setAttribute('unselectable', 'on');
    +    db.onselectstart = 'return false;';
    +  } else {
    +    $(db).removeClass('unselectable');
    +    db.setAttribute('unselectable', 'off');
    +    db.onselectstart = '';
    +  }
    +};
    +
    +this.checkReleaseCapture = function(obj, e) {
    +  if (captureElement && (obj == captureElement) && e.type == "mouseup")
    +    this.capture(null);
    +};
    +
    +this.getElementsByClassName = function(className, parentElement) {
    +  if (document.getElementsByClassName) {
    +    return parentElement.getElementsByClassName(className);
    +  } else {
    +    var cc = parentElement.getElementsByTagName('*');
    +    var els = [], c;
    +    for (var i = 0, length = cc.length; i < length; i++) {
    +      c = cc[i];
    +      if (c.className.indexOf(className) != -1)
    +	els.push(c);
    +    }
    +    return els;
    +  }
    +};
    +
    +this.addCss = function(selector, style) {
    +  var s = document.styleSheets[0];
    +  s.insertRule(selector + ' { ' + style + ' }', s.cssRules.length);
    +};
    +
    +this.addCssText = function(cssText) {
    +  var s = document.getElementById('Wt-inline-css');
    +
    +  if (!s) {
    +    s = document.createElement('style');
    +    document.getElementsByTagName('head')[0].appendChild(s);
    +  }
    +
    +  if (!s.styleSheet) { // Konqueror
    +    var t = document.createTextNode(cssText);
    +    s.appendChild(t);
    +  } else {
    +    var ss = document.createElement('style');
    +    if (s)
    +      s.parentNode.insertBefore(ss, s);
    +    else {
    +      ss.id = 'Wt-inline-css';
    +      document.getElementsByTagName('head')[0].appendChild(ss);
    +    }
    +    ss.styleSheet.cssText = cssText;
    +  }
    +};
    +
    +// from: http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript
    +this.getCssRule = function(selector, deleteFlag) {
    +  selector=selector.toLowerCase();
    +
    +  if (document.styleSheets) {
    +    for (var i=0; i<document.styleSheets.length; i++) {
    +      var styleSheet = document.styleSheets[i];
    +      var ii = 0;
    +      var cssRule;
    +      do {
    +	cssRule = null;
    +	if (styleSheet.cssRules)
    +	  cssRule = styleSheet.cssRules[ii];
    +	else if (styleSheet.rules)
    +	  cssRule = styleSheet.rules[ii];
    +	if (cssRule && cssRule.selectorText) {
    +	  if (cssRule.selectorText.toLowerCase()==selector) {
    +	    if (deleteFlag == 'delete') {
    +	      if (styleSheet.cssRules)
    +		styleSheet.deleteRule(ii);
    +	      else
    +		styleSheet.removeRule(ii);
    +	      return true;
    +	    } else
    +	      return cssRule;
    +	  }
    +	}
    +	++ii;
    +      } while (cssRule);
    +    }
    +  }
    +
    +  return false;
    +};
    +
    +this.removeCssRule = function(selector) {
    +  return WT.getCssRule(selector, 'delete');
    +};
    +
    +this.addStyleSheet = function(uri, media) {
    +  if (document.createStyleSheet) {
    +    setTimeout(function() { document.createStyleSheet(uri); }, 15);
    +  } else {
    +    var s = document.createElement('link');
    +    s.setAttribute('type', 'text/css');
    +    s.setAttribute('href', uri);
    +    s.setAttribute('type','text/css');
    +    s.setAttribute('rel','stylesheet');
    +    if (media != '' && media != 'all')
    +      s.setAttribute('media', media);
    +    var h = document.getElementsByTagName('head')[0];
    +    h.appendChild(s);
    +  }
    +};
    +
    +this.windowSize = function() {
    +  var x, y;
    +
    +  if (typeof (window.innerWidth) === 'number') {
    +    x = window.innerWidth;
    +    y = window.innerHeight;
    +  } else {
    +    x = document.documentElement.clientWidth;
    +    y = document.documentElement.clientHeight;
    +  }
    +
    +  return { x: x, y: y};
    +};
    +
    +/*
    + * position right to (x) or left from (rightx) and
    + * bottom of (y) or top from (bottomy)
    + */
    +this.fitToWindow = function(e, x, y, rightx, bottomy) {
    +  var ws = WT.windowSize();
    +
    +  var wx = document.body.scrollLeft + document.documentElement.scrollLeft;
    +  var wy = document.body.scrollTop + document.documentElement.scrollTop;
    +
    +  var ow = WT.widgetPageCoordinates(e.offsetParent);
    +
    +  var hsides = [ 'left', 'right' ],
    +      vsides = ['top', 'bottom' ],
    +      ew = WT.px(e, 'maxWidth') || e.offsetWidth,
    +      eh = WT.px(e, 'maxHeight') || e.offsetHeight,
    +      hside, vside;
    +
    +  if (x + ew > wx + ws.x) { // too far right, chose other side
    +    rightx -= ow.x;
    +    x = e.offsetParent.offsetWidth - (rightx + WT.px(e, 'marginRight'));
    +    hside = 1;
    +  } else {
    +    x -= ow.x;
    +    x = x - WT.px(e, 'marginLeft');
    +    hside = 0;
    +  }
    +
    +  if (y + eh > wy + ws.y) { // too far below, chose other side
    +    if (bottomy > wy + ws.y)
    +      bottomy = wy + ws.y;
    +    bottomy -= ow.y;
    +    y = e.offsetParent.offsetHeight - (bottomy + WT.px(e, 'marginBottom'));
    +    vside = 1;
    +  } else {
    +    y -= ow.y;
    +    y = y - WT.px(e, 'marginTop');
    +    vside = 0;
    +  }
    +
    +  /*
    +  if (x < wx)
    +    x = wx + ws.x - e.offsetWidth - 3;
    +  if (y < wy)
    +    y = wy + ws.y - e.offsetHeight - 3;
    +  */
    +
    +  e.style[hsides[hside]] = x + 'px';
    +  e.style[hsides[1 - hside]] = '';
    +  e.style[vsides[vside]] = y + 'px';
    +  e.style[vsides[1 - vside]] = '';
    +};
    +
    +this.positionXY = function(id, x, y) {
    +  var w = WT.getElement(id);
    +
    +  if (!WT.isHidden(w))
    +    WT.fitToWindow(w, x, y, x, y);
    +};
    +
    +this.Horizontal = 0x1;
    +this.Vertical = 0x2;
    +
    +this.positionAtWidget = function(id, atId, orientation, parentInRoot) {
    +  var w = WT.getElement(id),
    +    atw = WT.getElement(atId),
    +    xy = WT.widgetPageCoordinates(atw),
    +    x, y, rightx, bottomy;
    +
    +  if (parentInRoot) {
    +    w.parentNode.removeChild(w);
    +    $('.Wt-domRoot').get(0).appendChild(w);
    +  }
    +
    +  w.style.position='absolute';
    +  w.style.display='block';
    +
    +  if (orientation == WT.Horizontal) {
    +    x = xy.x + atw.offsetWidth;
    +    y = xy.y;
    +    rightx = xy.x,
    +    bottomy = xy.y + atw.offsetHeight;
    +  } else {
    +    x = xy.x;
    +    y = xy.y + atw.offsetHeight;
    +    rightx = xy.x + atw.offsetWidth;
    +    bottomy = xy.y;
    +  }
    +
    +  WT.fitToWindow(w, x, y, rightx, bottomy);
    +
    +  w.style.visibility='';
    +};
    +
    +this.hasFocus = function(el) {
    +  return el == document.activeElement;
    +};
    +
    +this.history = (function()
    +{
    +  /**
    +   * @preserve
    +   * Includes Yahoo History Frameowork
    +   * Copyright (c) 2008, Yahoo! Inc. All rights reserved.
    +   * Code licensed under the BSD License:
    +   * http://developer.yahoo.net/yui/license.txt
    +   * version: 2.5.2
    +   */
    +  var _UAwebkit = false;
    +  var _UAie = WT.isIElt9;
    +  var _UAopera = false;
    +  var _onLoadFn = null;
    +  var _histFrame = null;
    +  var _stateField = null;
    +  var _initialized = false;
    +  var _interval = null;
    +  var _fqstates = [];
    +  var _initialState, _currentState;
    +  var _onStateChange = function(){};
    +  function _getHash() {
    +    var i, href;
    +    href = location.href;
    +    i = href.indexOf("#");
    +    return i >= 0 ? href.substr(i + 1) : null;
    +  }
    +  function _storeStates() {
    +    _stateField.value = _initialState + "|" + _currentState;
    +    if (_UAwebkit) {
    +      _stateField.value += "|" + _fqstates.join(",");
    +    }
    +  }
    +  function _handleFQStateChange(fqstate) {
    +    var currentState;
    +    if (!fqstate) {
    +      _currentState = _initialState;
    +      _onStateChange(unescape(_currentState));
    +      return;
    +    }
    +    currentState = fqstate;
    +    if (!currentState || _currentState !== currentState) {
    +      _currentState = currentState || _initialState;
    +      _onStateChange(unescape(_currentState));
    +    }
    +  }
    +  function _updateIFrame (fqstate) {
    +    var html, doc;
    +    html = '<html><body><div id="state">' + fqstate
    +      + '</div></body></html>';
    +    try {
    +      doc = _histFrame.contentWindow.document;
    +      doc.open();
    +      doc.write(html);
    +      doc.close();
    +      return true;
    +    } catch (e) {
    +      return false;
    +    }
    +  }
    +  function _checkIframeLoaded() {
    +    var doc, elem, fqstate, hash;
    +    if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) {
    +      setTimeout(_checkIframeLoaded, 10);
    +      return;
    +    }
    +    doc = _histFrame.contentWindow.document;
    +    elem = doc.getElementById("state");
    +    fqstate = elem ? elem.innerText : null;
    +    hash = _getHash();
    +    setInterval(function () {
    +	var newfqstate, newHash;
    +	doc = _histFrame.contentWindow.document;
    +	elem = doc.getElementById("state");
    +	newfqstate = elem ? elem.innerText : null;
    +	newHash = _getHash();
    +	if (newfqstate !== fqstate) {
    +	  fqstate = newfqstate;
    +	  _handleFQStateChange(fqstate);
    +	  if (!fqstate) {
    +	    newHash = _initialState;
    +	  } else {
    +	    newHash = fqstate;
    +	  }
    +	  location.hash = newHash;
    +	  hash = newHash;
    +	  _storeStates();
    +	} else if (newHash !== hash) {
    +	  hash = newHash;
    +	  _updateIFrame(newHash);
    +	}
    +      }, 50);
    +    _initialized = true;
    +    if (_onLoadFn != null)
    +      _onLoadFn();
    +  }
    +
    +  function _initTimeout() {
    +    if (_UAie)
    +      return;
    +
    +    var hash = _getHash(), counter = history.length;
    +
    +    if (_interval)
    +      clearInterval(_interval);
    +    _interval = setInterval(function () {
    +	var state, newHash, newCounter;
    +	newHash = _getHash();
    +	newCounter = history.length;
    +	if (newHash !== hash) {
    +	  hash = newHash;
    +	  counter = newCounter;
    +	  _handleFQStateChange(hash);
    +	  _storeStates();
    +	} else if (newCounter !== counter && _UAwebkit) {
    +	  hash = newHash;
    +	  counter = newCounter;
    +	  state = _fqstates[counter - 1];
    +	  _handleFQStateChange(state);
    +	  _storeStates();
    +	}
    +      }, 50);
    +  }
    +
    +  function _initialize() {
    +    var parts;
    +    parts = _stateField.value.split("|");
    +    if (parts.length > 1) {
    +      _initialState = parts[0];
    +      _currentState = parts[1];
    +    }
    +    if (parts.length > 2) {
    +      _fqstates = parts[2].split(",");
    +    }
    +    if (_UAie) {
    +      _checkIframeLoaded();
    +    } else {
    +      _initTimeout();
    +      _initialized = true;
    +      if (_onLoadFn != null)
    +	_onLoadFn();
    +    }
    +  }
    +  return {
    +  onReady: function (fn) {
    +    if (_initialized) {
    +      setTimeout(function () { fn(); }, 0);
    +    } else {
    +      _onLoadFn = fn;
    +    }
    +  },
    +  _initialize: function() {
    +    if (_stateField != null)
    +      _initialize();
    +  },
    +  _initTimeout: function() {
    +      _initTimeout();
    +  },
    +  register: function (initialState, onStateChange) {
    +    if (_initialized) {
    +      return;
    +    }
    +    _initialState = escape(initialState);
    +    _currentState = _initialState;
    +    _onStateChange = onStateChange;
    +  },
    +  initialize: function (stateField, histFrame) {
    +    if (_initialized) {
    +      return;
    +    }
    +    var vendor = navigator.vendor || "";
    +    if (vendor === "KDE") {
    +    } else if (typeof window.opera !== "undefined")
    +      _UAopera = true;
    +    else if (!_UAie && vendor.indexOf("Apple Computer, Inc.") > -1)
    +      _UAwebkit = true;
    +
    +    /*
    +    if (_UAopera && typeof history.navigationMode !== "undefined")
    +      history.navigationMode = "compatible";
    +    */
    +
    +    if (typeof stateField === "string")
    +      stateField = document.getElementById(stateField);
    +    if (!stateField ||
    +	stateField.tagName.toUpperCase() !== "TEXTAREA" &&
    +	(stateField.tagName.toUpperCase() !== "INPUT" ||
    +	 stateField.type !== "hidden" &&
    +	 stateField.type !== "text")) {
    +      return;
    +    }
    +    _stateField = stateField;
    +    if (_UAie) {
    +      if (typeof histFrame === "string") {
    +	histFrame = document.getElementById(histFrame);
    +      }
    +      if (!histFrame || histFrame.tagName.toUpperCase() !== "IFRAME") {
    +	return;
    +      }
    +      _histFrame = histFrame;
    +    }
    +  },
    +  navigate: function (state) {
    +    if (!_initialized) {
    +      return;
    +    }
    +    fqstate = state;
    +    if (_UAie) {
    +      _updateIFrame(fqstate);
    +      return;
    +    } else {
    +      location.hash = fqstate;
    +      if (_UAwebkit) {
    +	_fqstates[history.length] = fqstate;
    +	_storeStates();
    +      }
    +      return;
    +    }
    +  },
    +  getCurrentState: function () {
    +    if (!_initialized) {
    +      return "";
    +    }
    +    return _currentState;
    +  }
    +  };
    +})();
    +
    +})();
    +
    +window._$_APP_CLASS_$_ = new (function() {
    +
    +var self = this;
    +var WT = _$_WT_CLASS_$_;
    +
    +var downX = 0;
    +var downY = 0;
    +
    +function saveDownPos(e) {
    +  var coords = WT.pageCoordinates(e);
    +  downX = coords.x;
    +  downY = coords.y;
    +};
    +
    +var currentHash = null;
    +
    +function onHashChange() {
    +  var newLocation = WT.history.getCurrentState();
    +  if (currentHash == newLocation) {
    +    return;
    +  } else {
    +    currentHash = newLocation;
    +    setTimeout(function() { update(null, 'hash', null, true); }, 1);
    +  }
    +};
    +
    +function setHash(newLocation) {
    +  if (currentHash != newLocation) {
    +    currentHash = newLocation;
    +    WT.history.navigate(escape(newLocation));
    +  }
    +};
    +
    +var dragState = {
    +  object: null,
    +  sourceId: null,
    +  mimeType: null,
    +  dropOffsetX: null,
    +  dragOffsetY: null,
    +  dropTarget: null,
    +  objectPrevStyle: null,
    +  xy: null
    +};
    +
    +function initDragDrop() {
    +  window.onresize=function() { doJavaScript(); };
    +
    +  document.body.ondragstart=function() {
    +    return false;
    +  };
    +}
    +
    +function dragStart(obj, e) {
    +  // drag element attributes:
    +  //   dwid = dragWidgetId
    +  //   dsid = dragSourceId
    +  //   dmt = dragMimeType
    +  // drop element attributes:
    +  //   amts = acceptMimeTypes
    +  //   ds = dropSignal
    +
    +  var ds = dragState;
    +
    +  ds.object = WT.getElement(obj.getAttribute("dwid"));
    +  if (ds.object == null)
    +    return true;
    +
    +  ds.sourceId = obj.getAttribute("dsid");
    +  ds.objectPrevStyle = {
    +    position: ds.object.style["position"],
    +    display: ds.object.style["display"],
    +    left: ds.object.style["left"],
    +    top: ds.object.style["top"],
    +    className: ds.object.className
    +  };
    +
    +  ds.object.parentNode.removeChild(ds.object);
    +  ds.object.style["position"] = 'absolute';
    +  ds.object.className = '';
    +  document.body.appendChild(ds.object);
    +
    +  WT.capture(null);
    +  WT.capture(ds.object);
    +  ds.object.onmousemove = dragDrag;
    +  ds.object.onmouseup = dragEnd;
    +
    +  ds.offsetX = -4;
    +  ds.offsetY = -4;
    +  ds.dropTarget = null;
    +  ds.mimeType = obj.getAttribute("dmt");
    +  ds.xy = WT.pageCoordinates(e);
    +
    +  WT.cancelEvent(e);
    +
    +  return false;
    +};
    +
    +function dragDrag(e) {
    +  if (dragState.object != null) {
    +    var ds = dragState;
    +    var xy = WT.pageCoordinates(e);
    +
    +    if (ds.object.style["display"] != '' && ds.xy.x != xy.x && ds.xy.y != xy.y)
    +      ds.object.style["display"] = '';
    +
    +    ds.object.style["left"] = (xy.x - ds.offsetX) + 'px';
    +    ds.object.style["top"] = (xy.y - ds.offsetY) + 'px';
    +
    +    var prevDropTarget = ds.dropTarget;
    +    var t = WT.target(e);
    +    var mimeType = "{" + ds.mimeType + ":";
    +    var amts = null;
    +
    +    ds.dropTarget = null;
    +    while (t) {
    +      amts = t.getAttribute("amts");
    +      if ((amts != null) && (amts.indexOf(mimeType) != -1)) {
    +	ds.dropTarget = t;
    +	break;
    +      }
    +      t = t.parentNode;
    +      if (!t.tagName || WT.hasTag(t, "HTML"))
    +	break;
    +    }
    +
    +    if (ds.dropTarget != prevDropTarget) {
    +      if (ds.dropTarget) {
    +        var s = amts.indexOf(mimeType) + mimeType.length;
    +	var se = amts.indexOf("}", s);
    +	var style = amts.substring(s, se);
    +	if (style.length != 0) {
    +          ds.dropTarget.setAttribute("dos", ds.dropTarget.className);
    +	  ds.dropTarget.className = ds.dropTarget.className + " " + style;
    +        }
    +      } else {
    +        ds.object.styleClass = '';
    +      }
    +
    +      if (prevDropTarget != null) {
    +	if (prevDropTarget.handleDragDrop)
    +	  prevDropTarget.handleDragDrop('end', ds.object, e, '', mimeType);
    +	var dos = prevDropTarget.getAttribute("dos");
    +        if (dos != null)
    +	  prevDropTarget.className = dos;
    +      }
    +    }
    +
    +    if (ds.dropTarget) {
    +      if (ds.dropTarget.handleDragDrop)
    +	ds.dropTarget.handleDragDrop('drag', ds.object, e, '', mimeType);
    +      else
    +	ds.object.className = 'Wt-valid-drop';
    +    }
    +
    +    return false;
    +  }
    +
    +  return true;
    +};
    +
    +function dragEnd(e) {
    +  WT.capture(null);
    +
    +  var ds = dragState;
    +
    +  if (ds.object) {
    +    if (ds.dropTarget) {
    +      var dos = ds.dropTarget.getAttribute("dos");
    +      if (dos != null)
    +	  ds.dropTarget.className = dos;
    +      if (ds.dropTarget.handleDragDrop)
    +	ds.dropTarget.handleDragDrop('drop', ds.object, e,
    +				     ds.sourceId, ds.mimeType);
    +      else
    +	emit(ds.dropTarget, {name: "_drop", eventObject: ds.dropTarget,
    +	      event: e}, ds.sourceId, ds.mimeType);
    +    } else {
    +      // could not be dropped, animate it floating back ?
    +    }
    +
    +    ds.object.style["position"] = ds.objectPrevStyle.position;
    +    ds.object.style["display"] = ds.objectPrevStyle.display;
    +    ds.object.style["left"] = ds.objectPrevStyle.left;
    +    ds.object.style["top"] = ds.objectPrevStyle.top;
    +    ds.object.className = ds.objectPrevStyle.className;
    +
    +    ds.object = null;
    +  }
    +};
    +
    +function encodeTouches(s, touches, widgetCoords) {
    +  var i, il, result;
    +
    +  result = s + "=";
    +  for (i = 0, il = touches.length; i < il; ++i) {
    +    var t = touches[i];
    +    result += [ t.identifier,
    +		t.clientX, t.clientY,
    +		t.pageX, t.pageY,
    +		t.screenX, t.screenY,
    +		t.pageX - widgetCoords.x, t.pageY - widgetCoords.y ].join(';');
    +  }
    +
    +  return result;
    +}
    +
    +var formObjects = _$_FORM_OBJECTS_$_;
    +
    +function encodeEvent(event, i) {
    +  var se, result, e;
    +
    +  e = event.event;
    +  se = i > 0 ? '&e' + i : '&';
    +  result = se + 'signal=' + event.signal;
    +
    +  if (event.id) {
    +    result += se + 'id=' + event.id
    +        + se + 'name=' + encodeURIComponent(event.name)
    +        + se + 'an=' + event.args.length;
    +
    +    for (var j = 0; j < event.args.length; ++j)
    +      result += se + 'a' + j + '=' + encodeURIComponent(event.args[j]);
    +  }
    +
    +  for (var x = 0; x < formObjects.length; ++x) {
    +    var el = WT.getElement(formObjects[x]), v = null, j, jl;
    +
    +    if (el == null)
    +      continue;
    +
    +    if (el.type == 'select-multiple') {
    +      for (j = 0, jl = el.options.length; j < jl; j++)
    +	if (el.options[j].selected) {
    +	  result += se + formObjects[x] + '='
    +	    + encodeURIComponent(el.options[j].value);
    +	}
    +    } else if (el.type == 'checkbox' || el.type == 'radio') {
    +      if (el.indeterminate || el.style.opacity == '0.5')
    +	v = 'i';
    +      else if (el.checked)
    +	v = el.value;
    +    } else if (WT.hasTag(el, "VIDEO") || WT.hasTag(el, "AUDIO")) {
    +      v = '' + el.volume + ';' + el.currentTime + ';' + el.duration + ';' + (el.paused?'1':'0') + ';' + (el.ended?'1':'0');
    +    } else if (el.type != 'file') {
    +      if ($(el).hasClass('Wt-edit-emptyText'))
    +	v = '';
    +      else
    +	v = '' + el.value;
    +
    +      if (WT.hasFocus(el)) {
    +	var range = WT.getSelectionRange(el);
    +	result += se + "selstart=" + range.start
    +	  + se + "selend=" + range.end;
    +      }
    +    }
    +
    +    if (v != null)
    +      result += se + formObjects[x] + '=' + encodeURIComponent(v);
    +  }
    +
    +
    +  try {
    +    if (document.activeElement)
    +      result += se + "focus=" + document.activeElement.id;
    +  } catch (e) { }
    +
    +  if (currentHash != null)
    +    result += se + '_=' + encodeURIComponent(unescape(currentHash));
    +
    +  if (!e) {
    +    event.data = result;
    +    return event;
    +  }
    +
    +  var t = WT.target(e);
    +  while (!t.id && t.parentNode)
    +    t = t.parentNode;
    +  if (t.id)
    +    result += se + 'tid=' + t.id;
    +
    +  try {
    +    result += se + 'type=' + e.type;
    +  } catch (e) {
    +  }
    +
    +  if (e.clientX || e.clientY)
    +    result += se + 'clientX=' + e.clientX + se + 'clientY=' + e.clientY;
    +
    +  var pageCoords = WT.pageCoordinates(e);
    +  var posX = pageCoords.x;
    +  var posY = pageCoords.y;
    +
    +  if (posX || posY) {
    +    result += se + 'documentX=' + posX + se + 'documentY=' + posY;
    +    result += se + 'dragdX=' + (posX - downX) + se + 'dragdY=' + (posY - downY);
    +
    +    var delta = WT.wheelDelta(e);
    +    result += se + 'wheel=' + delta;
    +  }
    +
    +  if (e.screenX || e.screenY)
    +    result += se + 'screenX=' + e.screenX + se + 'screenY=' + e.screenY;
    +
    +  var widgetCoords = { x: 0, y: 0 };
    +  if (event.object && event.object.nodeType != 9) {
    +    widgetCoords = WT.widgetPageCoordinates(event.object);
    +    var objX = widgetCoords.x;
    +    var objY = widgetCoords.y;
    +
    +    result += se + 'scrollX=' + event.object.scrollLeft
    +      + se + 'scrollY=' + event.object.scrollTop
    +      + se + 'width=' + event.object.clientWidth
    +      + se + 'height=' + event.object.clientHeight
    +      + se + 'widgetX=' + (posX - objX) + se + 'widgetY=' + (posY - objY);
    +  }
    +
    +  var button = WT.button(e);
    +  if (!button) {
    +    if (WT.buttons & 1)
    +      button = 1;
    +    else if (WT.buttons & 2)
    +      button = 2;
    +    else if (WT.buttons & 4)
    +      button = 4;
    +  }
    +  result += se + 'button=' + button;
    +
    +  if (typeof e.keyCode !== 'undefined')
    +    result += se + 'keyCode=' + e.keyCode;
    +
    +  if (typeof e.charCode !== 'undefined')
    +    result += se + 'charCode=' + e.charCode;
    +
    +  if (e.altKey)
    +    result += se + 'altKey=1';
    +  if (e.ctrlKey)
    +    result += se + 'ctrlKey=1';
    +  if (e.metaKey)
    +    result += se + 'metaKey=1';
    +  if (e.shiftKey)
    +    result += se + 'shiftKey=1';
    +
    +  if (typeof e.touches !== 'undefined')
    +    result += encodeTouches(se + "touches", e.touches, widgetCoords);
    +  if (typeof e.targetTouches !== 'undefined')
    +    result += encodeTouches(se + "ttouches", e.targetTouches, widgetCoords);
    +  if (typeof e.changedTouches !== 'undefined')
    +    result += encodeTouches(se + "ctouches", e.changedTouches, widgetCoords);
    +
    +  if (e.scale)
    +    result += se + "scale=" + e.scale;
    +  if (e.rotation)
    +    result += se + "rotation=" + e.rotation;
    +
    +  event.data = result;
    +  return event;
    +};
    +
    +// returns the button associated with the event (0 if none)
    +WT.button = function(e)
    +{
    +  if (e.which) {
    +    if (e.which == 3)
    +      return 4;
    +    else if (e.which == 2)
    +      return 2;
    +    else
    +      return 1;
    +  } else if (WT.isIE && typeof e.button != 'undefined') {
    +    if (e.button == 2)
    +      return 4;
    +    else if (e.button == 4)
    +      return 2;
    +    else
    +      return 1;
    +  } else if (typeof e.button != 'undefined') {
    +    if (e.button == 2)
    +      return 4;
    +    else if (e.button == 1)
    +      return 2;
    +    else
    +      return 1;
    +  } else {
    +    return 0;
    +  }
    +};
    +
    +var sentEvents = [], pendingEvents = [];
    +
    +function encodePendingEvents() {
    +  var result = '', feedback = false;
    +
    +  for (var i = 0; i < pendingEvents.length; ++i) {
    +    feedback = feedback || pendingEvents[i].feedback;
    +    result += pendingEvents[i].data;
    +  }
    +
    +  sentEvents = pendingEvents;
    +  pendingEvents = [];
    +
    +  return { feedback: feedback, result: result };
    +}
    +
    +var url = _$_RELATIVE_URL_$_,
    +  quited = false,
    +  norestart = false,
    +  loaded = false,
    +  responsePending = null,
    +  pollTimer = null,
    +  keepAliveTimer = null,
    +  commErrors = 0,
    +  serverPush = false,
    +  updateTimeout = null;
    +
    +function quit() {
    +  quited = true;
    +  if (keepAliveTimer) {
    +    clearTimeout(keepAliveTimer);
    +    keepAliveTimer = null;
    +  }
    +  var tr = $('#Wt-timers');
    +  if (tr.size() > 0)
    +    WT.setHtml(tr.get(0), '', false);
    +};
    +
    +function doKeepAlive() {
    +  WT.history._initTimeout();
    +  if (commErrors == 0)
    +    update(null, 'none', null, false);
    +  keepAliveTimer = setTimeout(doKeepAlive, _$_KEEP_ALIVE_$_000);
    +};
    +
    +function debug(s) {
    +  document.body.innerHTML += s;
    +};
    +
    +function setTitle(title) {
    +  if (WT.isIEMobile) return;
    +  document.title = title;
    +};
    +
    +function load() {
    +  if (!document.activeElement) {
    +    function trackActiveElement(evt) {
    +      if (evt && evt.target) {
    +	document.activeElement = evt.target == document ? null : evt.target;
    +      }
    +    }
    +
    +    function trackActiveElementLost(evt) {
    +      document.activeElement = null;
    +    }
    +
    +    document.addEventListener("focus", trackActiveElement, true);
    +    document.addEventListener("blur", trackActiveElementLost, true);
    +  }
    +
    +  WT.history._initialize();
    +  initDragDrop();
    +  if (!loaded) {
    +    loaded = true;
    +    _$_ONLOAD_$_();
    +    if (!quited)
    +      keepAliveTimer = setTimeout(doKeepAlive, _$_KEEP_ALIVE_$_000);
    +  }
    +};
    +
    +var currentHideLoadingIndicator = null;
    +
    +function cancelFeedback(t) {
    +  clearTimeout(t);
    +  document.body.style.cursor = 'auto';
    +
    +  if (currentHideLoadingIndicator != null) {
    +    try {
    +      currentHideLoadingIndicator();
    +    } catch (e) {
    +    }
    +    currentHideLoadingIndicator = null;
    +  }
    +};
    +
    +function waitFeedback() {
    +  document.body.style.cursor = 'wait';
    +  currentHideLoadingIndicator = hideLoadingIndicator;
    +  showLoadingIndicator();
    +};
    +
    +/** @const */ var WebSocketsUnknown = 0;
    +/** @const */ var WebSocketsWorking = 1;
    +/** @const */ var WebSocketsUnavailable = 2;
    +
    +var websocket = {
    +  state: WebSocketsUnknown,
    +  socket: null
    +};
    +
    +function setServerPush(how) {
    +  serverPush = how;
    +}
    +
    +function doJavaScript(js) {
    +  if (js) {
    +    js = "(function() {" + js + "})();";
    +    if (window.execScript)
    +      window.execScript(js);
    +    else
    +      window.eval(js);
    +  }
    +
    +  self._p_.autoJavaScript();
    +}
    +
    +function handleResponse(status, msg, timer) {
    +  if (quited)
    +    return;
    +
    +  if (status == 0) {
    +_$_$ifnot_DEBUG_$_();
    +    try {
    +_$_$endif_$_();
    +      doJavaScript(msg);
    +_$_$ifnot_DEBUG_$_();
    +    } catch (e) {
    +      alert("Wt internal error: " + e + ", code: " +  e.code
    +	    + ", description: " + e.description /* + ":" + msg */);
    +    }
    +_$_$endif_$_();
    +
    +    if (timer)
    +      cancelFeedback(timer);
    +  } else {
    +    pendingEvents = sentEvents.concat(pendingEvents);
    +  }
    +
    +  sentEvents = [];
    +
    +  if (pollTimer) {
    +    clearTimeout(pollTimer);
    +    pollTimer = null;
    +  }
    +
    +  responsePending = null;
    +
    +  if (status > 0)
    +    ++commErrors;
    +  else
    +    commErrors = 0;
    +
    +  if (quited)
    +    return;
    +
    +  if (serverPush || pendingEvents.length > 0) {
    +    if (status == 1) {
    +      var ms = Math.min(120000, Math.exp(commErrors) * 500);
    +      updateTimeout = setTimeout(function() { sendUpdate(); }, ms);
    +    } else
    +      sendUpdate();
    +  }
    +};
    +
    +var randomSeed = new Date().getTime();
    +
    +function doPollTimeout() {
    +  responsePending.abort();
    +  responsePending = null;
    +  pollTimer = null;
    +
    +  if (!quited)
    +    sendUpdate();
    +}
    +
    +function update(el, signalName, e, feedback) {
    +  WT.checkReleaseCapture(el, e);
    +
    +  _$_$if_STRICTLY_SERIALIZED_EVENTS_$_();
    +  if (!responsePending) {
    +  _$_$endif_$_();
    +
    +  var pendingEvent = new Object(), i = pendingEvents.length;
    +  pendingEvent.object = el;
    +  pendingEvent.signal = signalName;
    +  pendingEvent.event = e;
    +  pendingEvent.feedback = feedback;
    +
    +  pendingEvents[i] = encodeEvent(pendingEvent, i);
    +
    +  scheduleUpdate();
    +
    +  doJavaScript();
    +
    +  _$_$if_STRICTLY_SERIALIZED_EVENTS_$_();
    +  }
    +  _$_$endif_$_();
    +}
    +
    +var updateTimeoutStart;
    +
    +function scheduleUpdate() {
    +  _$_$if_WEB_SOCKETS_$_();
    +  if (websocket.state != WebSocketsUnavailable) {
    +    if (typeof window.WebSocket === 'undefined')
    +      websocket.state = WebSocketsUnavailable;
    +    else {
    +      var ws = websocket.socket;
    +
    +      if ((ws == null || ws.readyState > 1)) {
    +	if (ws != null && websocket.state == WebSocketsUnknown)
    +	  websocket.state = WebSocketsUnavailable;
    +	else {
    +	  var query = url.substr(url.indexOf('?'));
    +	  var wsurl = "ws" + location.protocol.substr(4)
    +	    + "//" + location.hostname + ":"
    +	    + location.port + location.pathname + query;
    +	  websocket.socket = ws = new WebSocket(wsurl);
    +
    +	  ws.onmessage = function(event) {
    +	    websocket.state = WebSocketsWorking;
    +	    handleResponse(0, event.data, null);
    +	  };
    +	}
    +      }
    +
    +      if (ws.readyState == 1) {
    +	sendUpdate();
    +	return;
    +      }
    +    }
    +  }
    +  _$_$endif_$_();
    +
    +  if (responsePending != null && pollTimer != null) {
    +    clearTimeout(pollTimer);
    +    responsePending.abort();
    +    responsePending = null;
    +  }
    +
    +  if (responsePending == null) {
    +    if (updateTimeout == null) {
    +      updateTimeout = setTimeout(function() { sendUpdate(); }, WT.updateDelay);
    +      updateTimeoutStart = (new Date).getTime();
    +    } else if (commErrors) {
    +      clearTimeout(updateTimeout);
    +      sendUpdate();
    +    } else {
    +      var diff = (new Date).getTime() - updateTimeoutStart;
    +      if (diff > WT.updateDelay) {
    +	clearTimeout(updateTimeout);
    +	sendUpdate();
    +      }
    +    }
    +  }
    +}
    +
    +var ackUpdateId = 0;
    +
    +function responseReceived(updateId) {
    +  ackUpdateId = updateId;
    +  self._p_.comm.responseReceived(updateId);
    +}
    +
    +function sendUpdate() {
    +  if (responsePending)
    +    return;
    +
    +  updateTimeout = null;
    +  var feedback;
    +
    +  if (WT.isIEMobile) feedback = false;
    +
    +  if (quited) {
    +    if (norestart)
    +      return;
    +    if (confirm("The application was quited, do you want to restart?")) {
    +      document.location = document.location;
    +      norestart = true;
    +      return;
    +    } else {
    +      norestart = true;
    +      return;
    +    }
    +  }
    +
    +  var data, tm, poll,
    +    query = '&rand=' + Math.round(Math.random(randomSeed) * 100000);
    +
    +  if (pendingEvents.length > 0) {
    +    data = encodePendingEvents();
    +    tm = data.feedback ? setTimeout(waitFeedback, _$_INDICATOR_TIMEOUT_$_)
    +      : null;
    +    poll = false;
    +  } else {
    +    data = {result: '&signal=poll' };
    +    tm = null;
    +    poll = true;
    +  }
    +
    +  if (websocket.socket != null && websocket.socket.readyState == 1) {
    +    responsePending = null;
    +
    +    if (tm != null) {
    +      clearTimeout(tm);
    +      tm = null;
    +    }
    +
    +    if (!poll) {
    +      websocket.socket.send(data.result + '&ackId=' + ackUpdateId);
    +    }
    +  } else {
    +    responsePending = self._p_.comm.sendUpdate
    +      (url + query,
    +       'request=jsupdate' + data.result + '&ackId=' + ackUpdateId,
    +       tm, ackUpdateId, -1);
    +
    +    pollTimer
    +     = poll ? setTimeout(doPollTimeout, _$_SERVER_PUSH_TIMEOUT_$_) : null;
    +  }
    +}
    +
    +function emit(object, config) {
    +  var userEvent = new Object(), ei = pendingEvents.length;
    +  userEvent.signal = "user";
    +
    +  if (typeof object === "string")
    +    userEvent.id = object;
    +  else if (object == self)
    +    userEvent.id = "app";
    +  else
    +    userEvent.id = object.id;
    +
    +  if (typeof config === "object") {
    +    userEvent.name = config.name;
    +    userEvent.object = config.eventObject;
    +    userEvent.event = config.event;
    +  } else {
    +    userEvent.name = config;
    +    userEvent.object = userEvent.event = null;
    +  }
    +
    +  userEvent.args = [];
    +  for (var i = 2; i < arguments.length; ++i) {
    +    var a = arguments[i], r;
    +    if (a === false)
    +      r = 0;
    +    else if (a === true)
    +      r = 1;
    +    else if (a.toDateString)
    +      r = a.toDateString();
    +    else
    +      r = a;
    +    userEvent.args[i-2] = r;
    +  }
    +  userEvent.feedback = true;
    +
    +  pendingEvents[ei] = encodeEvent(userEvent, ei);
    +
    +  scheduleUpdate();
    +}
    +
    +function addTimerEvent(timerid, msec, repeat) {
    +  var tm = function() {
    +    var obj = WT.getElement(timerid);
    +    if (obj) {
    +      if (repeat)
    +	obj.timer = setTimeout(obj.tm, msec);
    +      else {
    +	obj.timer = null;
    +	obj.tm = null;
    +      }
    +      if (obj.onclick)
    +	obj.onclick();
    +    }
    +  };
    +
    +  var obj = WT.getElement(timerid);
    +  obj.timer = setTimeout(tm, msec);
    +  obj.tm = tm;
    +}
    +
    +var jsLibsLoaded = {};
    +
    +function onJsLoad(path, f) {
    +  // setTimeout needed for Opera
    +  setTimeout(function() {
    +    if (jsLibsLoaded[path] === true) {
    +      f();
    +    } else
    +      jsLibsLoaded[path] = f;
    +    }, 20);
    +};
    +
    +function jsLoaded(path)
    +{
    +  if (jsLibsLoaded[path] === true)
    +    return;
    +  else {
    +    if (typeof jsLibsLoaded[path] !== 'undefined')
    +      jsLibsLoaded[path]();
    +    jsLibsLoaded[path] = true;
    +  }
    +};
    +
    +function loadScript(uri, symbol, tries)
    +{
    +  function onerror() {
    +    var t = tries === undefined ? 2 : tries;
    +    if (t > 1) {
    +      loadScript(uri, symbol, t - 1);
    +    } else {
    +      alert('Fatal error: failed loading ' + uri);
    +      quit();
    +    }
    +  }
    +
    +  var loaded = false;
    +  if (symbol != "") {
    +    try {
    +      loaded = !eval("typeof " + symbol + " === 'undefined'");
    +    } catch (e) {
    +      loaded = false;
    +    }
    +  }
    +
    +  if (!loaded) {
    +    var s = document.createElement('script');
    +    s.setAttribute('src', uri);
    +    s.onload = function() { jsLoaded(uri); };
    +    s.onerror = onerror;
    +    s.onreadystatechange = function() {
    +      var rs = s.readyState;
    +      if (rs == 'loaded') {
    +	if (WT.isOpera) {
    +	  jsLoaded(uri);
    +	} else
    +	  onerror();
    +      } else if (rs == 'complete') {
    +	jsLoaded(uri);
    +      }
    +    };
    +    var h = document.getElementsByTagName('head')[0];
    +    h.appendChild(s);
    +  } else
    +    jsLoaded(uri);
    +};
    +
    +function ImagePreloader(uris, callback) {
    +  this.callback = callback;
    +  this.work = uris.length;
    +  this.images = [];
    +
    +  if (uris.length == 0)
    +    callback(this.images);
    +  else
    +    for (var i = 0; i < uris.length; i++)
    +      this.preload(uris[i]);
    +};
    +
    +ImagePreloader.prototype.preload = function(uri) {
    +  var image = new Image;
    +  this.images.push(image);
    +  image.onload = ImagePreloader.prototype.onload;
    +  image.onerror = ImagePreloader.prototype.onload;
    +  image.onabort = ImagePreloader.prototype.onload;
    +  image.imagePreloader = this;
    +
    +  image.src = uri;
    +};
    +
    +ImagePreloader.prototype.onload = function() {
    +  var preloader = this.imagePreloader;
    +  if (--preloader.work == 0)
    +    preloader.callback(preloader.images);
    +};
    +
    +WT.history.register(_$_INITIAL_HASH_$_, onHashChange);
    +
    +// For use in FlashObject.js. In IE7, the alternative content is
    +// not inserted in the DOM and when it is, it cannot contain JavaScript.
    +// Through a hack in the style attribute, we do execute JS, but what we
    +// can do there is limited. Hence this helper method.
    +function ieAlternative(d)
    +{
    +  if (d.ieAlternativeExecuted) return '0';
    +  self.emit(d.parentNode, 'IeAltnernative');
    +  d.style.width = '';
    +  d.ieAlternativeExecuted = true;
    +  return '0';
    +}
    +
    +window.onunload = function()
    +{
    +  if (!quited) {
    +    self.emit(self, "Wt-unload");
    +    sendUpdate();
    +  }
    +};
    +
    +function setCloseMessage(m)
    +{
    +  if (m && m != '') {
    +    window.onbeforeunload = function(event) {
    +      var e = event || window.event;
    +
    +      if (e)
    +	e.returnValue = m;
    +
    +      return m;
    +    };
    +  } else
    +    window.onbeforeunload = null;
    +};
    +
    +this._p_ = {
    +  ieAlternative : ieAlternative,
    +  loadScript : loadScript,
    +  onJsLoad : onJsLoad,
    +  setTitle : setTitle,
    +  update : update,
    +  quit : quit,
    +  setFormObjects : function(o) { formObjects = o; },
    +  saveDownPos : saveDownPos,
    +  addTimerEvent : addTimerEvent,
    +  load : load,
    +  handleResponse : handleResponse,
    +  setServerPush : setServerPush,
    +
    +  dragStart : dragStart,
    +  dragDrag : dragDrag,
    +  dragEnd : dragEnd,
    +  capture : WT.capture,
    +
    +  onHashChange : onHashChange,
    +  setHash : setHash,
    +  ImagePreloader : ImagePreloader,
    +
    +  autoJavaScript : function() {  _$_AUTO_JAVASCRIPT_$_(); },
    +
    +  response : responseReceived,
    +  setCloseMessage : setCloseMessage
    +};
    +
    +this.WT = _$_WT_CLASS_$_;
    +this.emit = emit;
    +
    +})();
    +
    +window.WtSignalEmit = _$_APP_CLASS_$_.emit;
    +
    +window.WtScriptLoaded = false;
    +
    +window.onLoad = function() {
    +  if (!window.WtScriptLoaded) {
    +    window.isLoaded = true;
    +    return;
    +  }
    +
    +  _$_WT_CLASS_$_.history.initialize("Wt-history-field", "Wt-history-iframe");
    +  _$_APP_CLASS_$_._p_.load();
    +};
    diff --git a/wt-3.1.7a/src/web/skeleton/Wt.min.js b/wt-3.1.7a/src/web/skeleton/Wt.min.js
    new file mode 100644
    index 0000000..3b577f3
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/Wt.min.js
    @@ -0,0 +1,68 @@
    +/*
    + Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    +
    + For terms of use, see LICENSE.
    + Includes Array Remove - By John Resig (MIT Licensed)
    + Includes jQuery Caret Range plugin
    + Copyright (c) 2009 Matt Zabriskie
    + Released under the MIT and GPL licenses.
    +
    + Includes Yahoo History Frameowork
    + Copyright (c) 2008, Yahoo! Inc. All rights reserved.
    + Code licensed under the BSD License:
    + http://developer.yahoo.net/yui/license.txt
    + version: 2.5.2
    +*/
    +_$_$if_DYNAMIC_JS_$_();window.WT_DECLARE_WT_MEMBER=function(w,v,G){w=v.indexOf(".prototype");if(w==-1)_$_WT_CLASS_$_[v]=G;else _$_WT_CLASS_$_[v.substr(0,w)].prototype[v.substr(w+11)]=G};window.WT_DECLARE_APP_MEMBER=function(w,v,G){w=v.indexOf(".prototype");if(w==-1)_$_APP_CLASS_$_[v]=G;else _$_APP_CLASS_$_[v.substr(0,w)].prototype[v.substr(w+11)]=G};_$_$endif_$_();
    +window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,e){if(a=="auto"||a==null)return e;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):e}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;
    +if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!N){if(!a)a=window.event;N=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return N=false}else return true}function R(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,
    +"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",R,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&R(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",R)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=
    +g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};this.addAll=function(a,b){for(var e=0,k=b.length;e<k;++e)a.push(b[e])};var X=function(){for(var a,b=3,e=document.createElement("div"),k=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",k[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=
    +-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,e){function k(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,
    +o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=k(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!e)if(e)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!e)a.innerHTML="";b=0;for(e=n.childNodes.length;b<
    +e;)a.appendChild(k(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,e){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.contains=function(a,b){for(b=b.parentNode;b!=null&&b.tagName.toLowerCase()!="body";){if(b==a)return true;b=b.parentNode}return false};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=
    +a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,
    +a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var n=a.attributes[e].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=
    +1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!N){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(e){}}}};this.getElement=function(a){var b=document.getElementById(a);
    +if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,
    +"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.windowCoordinates=
    +function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),
    +e=b.duplicate();e.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(e.moveStart("character",k);e.inRange(b);){e.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{e=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",e.length);b=a.text==""?e.length:e.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-e.length);return{start:b,end:a.text.length}}else return a.selectionStart||
    +a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=
    +window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=
    +null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,e){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);e=U(e,1E5);return k<b?b-1:k>e?e+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display=
    +"inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");
    +b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var e=[],k,n=0,o=b.length;n<o;n++){k=b[n];k.className.indexOf(a)!=-1&&e.push(k)}return e}};this.addCss=function(a,b){var e=document.styleSheets[0];e.insertRule(a+" { "+b+" }",e.cssRules.length)};this.addCssText=
    +function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var e=document.createElement("style");if(b)b.parentNode.insertBefore(e,b);else{e.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(e)}e.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=
    +document.styleSheets[e],n=0,o;do{o=null;if(k.cssRules)o=k.cssRules[n];else if(k.rules)o=k.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(n):k.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type",
    +"text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,k,n){var o=g.windowSize(),L=document.body.scrollLeft+
    +document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){k-=q.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=q.x;b-=g.px(a,"marginLeft");k=0}if(e+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;e=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{e-=q.y;e-=g.px(a,"marginTop");
    +n=0}a.style[B[k]]=b+"px";a.style[B[1-k]]="";a.style[r[n]]=e+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,e){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,e,b,e)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,e,k){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(e==g.Horizontal){e=n.x+b.offsetWidth;k=n.y;o=n.x;b=n.y+
    +b.offsetHeight}else{e=n.x;k=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,e,k,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,h;h=location.href;l=h.indexOf("#");return l>=0?h.substr(l+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+O.join(",")}function e(l){if(l){if(!l||D!==l){D=l||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function k(l){var h;l='<html><body><div id="state">'+l+"</div></body></html>";
    +try{h=C.contentWindow.document;h.open();h.write(l);h.close();return true}catch(s){return false}}function n(){var l,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{l=C.contentWindow.document;s=(h=l.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;l=C.contentWindow.document;H=(h=l.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;e(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;k(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var l=
    +a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==l){l=s;h=A;e(l);b()}else if(A!==h&&u){l=s;h=A;s=O[h-1];e(s);b()}},50)}}function L(){var l;l=J.value.split("|");if(l.length>1){x=l[0];D=l[1]}if(l.length>2)O=l[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=g.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,O=[],x,D,Y=function(){};return{onReady:function(l){if(K)setTimeout(function(){l()},0);else r=l},_initialize:function(){J!=
    +null&&L()},_initTimeout:function(){o()},register:function(l,h){if(!K){D=x=escape(l);Y=h}},initialize:function(l,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){J=l;if(q){if(typeof h==="string")h=document.getElementById(h);!h||
    +h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(l){if(K){fqstate=l;if(q)k(fqstate);else{location.hash=fqstate;if(u){O[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()});
    +window._$_APP_CLASS_$_=new (function(){function w(c){c=h.pageCoordinates(c);s=c.x;A=c.y}function v(){var c=h.history.getCurrentState();if(H!=c){H=c;setTimeout(function(){u(null,"hash",null,true)},1)}}function G(c){if(H!=c){H=c;h.history.navigate(escape(c))}}function U(){window.onresize=function(){n()};document.body.ondragstart=function(){return false}}function ca(c,d){var f=E;f.object=h.getElement(c.getAttribute("dwid"));if(f.object==null)return true;f.sourceId=c.getAttribute("dsid");f.objectPrevStyle=
    +{position:f.object.style.position,display:f.object.style.display,left:f.object.style.left,top:f.object.style.top,className:f.object.className};f.object.parentNode.removeChild(f.object);f.object.style.position="absolute";f.object.className="";document.body.appendChild(f.object);h.capture(null);h.capture(f.object);f.object.onmousemove=V;f.object.onmouseup=R;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=c.getAttribute("dmt");f.xy=h.pageCoordinates(d);h.cancelEvent(d);return false}function V(c){if(E.object!=
    +null){var d=E,f=h.pageCoordinates(c);if(d.object.style.display!=""&&d.xy.x!=f.x&&d.xy.y!=f.y)d.object.style.display="";d.object.style.left=f.x-d.offsetX+"px";d.object.style.top=f.y-d.offsetY+"px";f=d.dropTarget;var j=h.target(c),m="{"+d.mimeType+":",i=null;for(d.dropTarget=null;j;){i=j.getAttribute("amts");if(i!=null&&i.indexOf(m)!=-1){d.dropTarget=j;break}j=j.parentNode;if(!j.tagName||h.hasTag(j,"HTML"))break}if(d.dropTarget!=f){if(d.dropTarget){j=i.indexOf(m)+m.length;var p=i.indexOf("}",j);i=i.substring(j,
    +p);if(i.length!=0){d.dropTarget.setAttribute("dos",d.dropTarget.className);d.dropTarget.className=d.dropTarget.className+" "+i}}else d.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",d.object,c,"",m);i=f.getAttribute("dos");if(i!=null)f.className=i}}if(d.dropTarget)if(d.dropTarget.handleDragDrop)d.dropTarget.handleDragDrop("drag",d.object,c,"",m);else d.object.className="Wt-valid-drop";return false}return true}function R(c){h.capture(null);var d=E;if(d.object){if(d.dropTarget){var f=
    +d.dropTarget.getAttribute("dos");if(f!=null)d.dropTarget.className=f;d.dropTarget.handleDragDrop?d.dropTarget.handleDragDrop("drop",d.object,c,d.sourceId,d.mimeType):C(d.dropTarget,{name:"_drop",eventObject:d.dropTarget,event:c},d.sourceId,d.mimeType)}d.object.style.position=d.objectPrevStyle.position;d.object.style.display=d.objectPrevStyle.display;d.object.style.left=d.objectPrevStyle.left;d.object.style.top=d.objectPrevStyle.top;d.object.className=d.objectPrevStyle.className;d.object=null}}function W(c,
    +d,f){var j,m;m=c+"=";c=0;for(j=d.length;c<j;++c){var i=d[c];m+=[i.identifier,i.clientX,i.clientY,i.pageX,i.pageY,i.screenX,i.screenY,i.pageX-f.x,i.pageY-f.y].join(";")}return m}function g(c,d){var f,j;j=c.event;d=d>0?"&e"+d:"&";f=d+"signal="+c.signal;if(c.id){f+=d+"id="+c.id+d+"name="+encodeURIComponent(c.name)+d+"an="+c.args.length;for(var m=0;m<c.args.length;++m)f+=d+"a"+m+"="+encodeURIComponent(c.args[m])}for(var i=0;i<Z.length;++i){var p=h.getElement(Z[i]),t=null,ia;if(p!=null){if(p.type=="select-multiple"){m=
    +0;for(ia=p.options.length;m<ia;m++)if(p.options[m].selected)f+=d+Z[i]+"="+encodeURIComponent(p.options[m].value)}else if(p.type=="checkbox"||p.type=="radio")if(p.indeterminate||p.style.opacity=="0.5")t="i";else{if(p.checked)t=p.value}else if(h.hasTag(p,"VIDEO")||h.hasTag(p,"AUDIO"))t=""+p.volume+";"+p.currentTime+";"+p.duration+";"+(p.paused?"1":"0")+";"+(p.ended?"1":"0");else if(p.type!="file"){t=$(p).hasClass("Wt-edit-emptyText")?"":""+p.value;if(h.hasFocus(p)){m=h.getSelectionRange(p);f+=d+"selstart="+
    +m.start+d+"selend="+m.end}}if(t!=null)f+=d+Z[i]+"="+encodeURIComponent(t)}}try{if(document.activeElement)f+=d+"focus="+document.activeElement.id}catch(oa){}if(H!=null)f+=d+"_="+encodeURIComponent(unescape(H));if(!j){c.data=f;return c}for(i=h.target(j);!i.id&&i.parentNode;)i=i.parentNode;if(i.id)f+=d+"tid="+i.id;try{f+=d+"type="+j.type}catch(pa){}if(j.clientX||j.clientY)f+=d+"clientX="+j.clientX+d+"clientY="+j.clientY;t=h.pageCoordinates(j);i=t.x;t=t.y;if(i||t){f+=d+"documentX="+i+d+"documentY="+t;
    +f+=d+"dragdX="+(i-s)+d+"dragdY="+(t-A);m=h.wheelDelta(j);f+=d+"wheel="+m}if(j.screenX||j.screenY)f+=d+"screenX="+j.screenX+d+"screenY="+j.screenY;m={x:0,y:0};if(c.object&&c.object.nodeType!=9){m=h.widgetPageCoordinates(c.object);f+=d+"scrollX="+c.object.scrollLeft+d+"scrollY="+c.object.scrollTop+d+"width="+c.object.clientWidth+d+"height="+c.object.clientHeight+d+"widgetX="+(i-m.x)+d+"widgetY="+(t-m.y)}i=h.button(j);if(!i)if(h.buttons&1)i=1;else if(h.buttons&2)i=2;else if(h.buttons&4)i=4;f+=d+"button="+
    +i;if(typeof j.keyCode!=="undefined")f+=d+"keyCode="+j.keyCode;if(typeof j.charCode!=="undefined")f+=d+"charCode="+j.charCode;if(j.altKey)f+=d+"altKey=1";if(j.ctrlKey)f+=d+"ctrlKey=1";if(j.metaKey)f+=d+"metaKey=1";if(j.shiftKey)f+=d+"shiftKey=1";if(typeof j.touches!=="undefined")f+=W(d+"touches",j.touches,m);if(typeof j.targetTouches!=="undefined")f+=W(d+"ttouches",j.targetTouches,m);if(typeof j.changedTouches!=="undefined")f+=W(d+"ctouches",j.changedTouches,m);if(j.scale)f+=d+"scale="+j.scale;if(j.rotation)f+=
    +d+"rotation="+j.rotation;c.data=f;return c}function X(){for(var c="",d=false,f=0;f<y.length;++f){d=d||y[f].feedback;c+=y[f].data}ga=y;y=[];return{feedback:d,result:c}}function N(){P=true;if(aa){clearTimeout(aa);aa=null}var c=$("#Wt-timers");c.size()>0&&h.setHtml(c.get(0),"",false)}function z(){h.history._initTimeout();ba==0&&u(null,"none",null,false);aa=setTimeout(z,_$_KEEP_ALIVE_$_000)}function da(c){if(!h.isIEMobile)document.title=c}function a(){if(!document.activeElement){function c(f){if(f&&f.target)document.activeElement=
    +f.target==document?null:f.target}function d(){document.activeElement=null}document.addEventListener("focus",c,true);document.addEventListener("blur",d,true)}h.history._initialize();U();if(!ja){ja=true;_$_ONLOAD_$_();P||(aa=setTimeout(z,_$_KEEP_ALIVE_$_000))}}function b(c){clearTimeout(c);document.body.style.cursor="auto";if(ea!=null){try{ea()}catch(d){}ea=null}}function e(){document.body.style.cursor="wait";ea=hideLoadingIndicator;showLoadingIndicator()}function k(c){ka=c}function n(c){if(c){c="(function() {"+
    +c+"})();";window.execScript?window.execScript(c):window.eval(c)}l._p_.autoJavaScript()}function o(c,d,f){if(!P){if(c==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();n(d);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();f&&b(f)}else y=ga.concat(y);ga=[];if(Q){clearTimeout(Q);Q=null}F=null;if(c>0)++ba;else ba=0;if(!P)if(ka||y.length>0)if(c==1){c=Math.min(12E4,Math.exp(ba)*500);S=setTimeout(function(){r()},c)}else r()}}function L(){F.abort();
    +Q=F=null;P||r()}function u(c,d,f,j){h.checkReleaseCapture(c,f);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!F){_$_$endif_$_();var m={},i=y.length;m.object=c;m.signal=d;m.event=f;m.feedback=j;y[i]=g(m,i);q();n();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function q(){_$_$if_WEB_SOCKETS_$_();if(I.state!=2)if(typeof window.WebSocket==="undefined")I.state=2;else{var c=I.socket;if(c==null||c.readyState>1)if(c!=null&&I.state==0)I.state=2;else{c=ha.substr(ha.indexOf("?"));c="ws"+location.protocol.substr(4)+
    +"//"+location.hostname+":"+location.port+location.pathname+c;I.socket=c=new WebSocket(c);c.onmessage=function(d){I.state=1;o(0,d.data,null)}}if(c.readyState==1){r();return}}_$_$endif_$_();if(F!=null&&Q!=null){clearTimeout(Q);F.abort();F=null}if(F==null)if(S==null){S=setTimeout(function(){r()},h.updateDelay);la=(new Date).getTime()}else if(ba){clearTimeout(S);r()}else if((new Date).getTime()-la>h.updateDelay){clearTimeout(S);r()}}function B(c){fa=c;l._p_.comm.responseReceived(c)}function r(){if(!F){S=
    +null;if(P){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ma=true}}else{var c,d,f,j="&rand="+Math.round(Math.random(na)*1E5);if(y.length>0){c=X();d=c.feedback?setTimeout(e,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{c={result:"&signal=poll"};d=null;f=true}if(I.socket!=null&&I.socket.readyState==1){F=null;d!=null&&clearTimeout(d);f||I.socket.send(c.result+"&ackId="+fa)}else{F=l._p_.comm.sendUpdate(ha+j,"request=jsupdate"+c.result+"&ackId="+
    +fa,d,fa,-1);Q=f?setTimeout(L,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function C(c,d){var f={},j=y.length;f.signal="user";f.id=typeof c==="string"?c:c==l?"app":c.id;if(typeof d==="object"){f.name=d.name;f.object=d.eventObject;f.event=d.event}else{f.name=d;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;f.args[m-2]=i}f.feedback=true;y[j]=g(f,j);q()}function J(c,d,f){var j=function(){var i=h.getElement(c);if(i){if(f)i.timer=
    +setTimeout(i.tm,d);else{i.timer=null;i.tm=null}i.onclick&&i.onclick()}},m=h.getElement(c);m.timer=setTimeout(j,d);m.tm=j}function K(c,d){setTimeout(function(){if(T[c]===true)d();else T[c]=d},20)}function M(c){if(T[c]!==true){typeof T[c]!=="undefined"&&T[c]();T[c]=true}}function O(c,d,f){function j(){var t=f===undefined?2:f;if(t>1)O(c,d,t-1);else{alert("Fatal error: failed loading "+c);N()}}var m=false;if(d!="")try{m=!eval("typeof "+d+" === 'undefined'")}catch(i){m=false}if(m)M(c);else{var p=document.createElement("script");
    +p.setAttribute("src",c);p.onload=function(){M(c)};p.onerror=j;p.onreadystatechange=function(){var t=p.readyState;if(t=="loaded")h.isOpera?M(c):j();else t=="complete"&&M(c)};document.getElementsByTagName("head")[0].appendChild(p)}}function x(c,d){this.callback=d;this.work=c.length;this.images=[];if(c.length==0)d(this.images);else for(d=0;d<c.length;d++)this.preload(c[d])}function D(c){if(c.ieAlternativeExecuted)return"0";l.emit(c.parentNode,"IeAltnernative");c.style.width="";c.ieAlternativeExecuted=
    +true;return"0"}function Y(c){window.onbeforeunload=c&&c!=""?function(d){if(d=d||window.event)d.returnValue=c;return c}:null}var l=this,h=_$_WT_CLASS_$_,s=0,A=0,H=null,E={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},Z=_$_FORM_OBJECTS_$_;h.button=function(c){return c.which?c.which==3?4:c.which==2?2:1:h.isIE&&typeof c.button!="undefined"?c.button==2?4:c.button==4?2:1:typeof c.button!="undefined"?c.button==2?4:c.button==1?2:1:
    +0};var ga=[],y=[],ha=_$_RELATIVE_URL_$_,P=false,ma=false,ja=false,F=null,Q=null,aa=null,ba=0,ka=false,S=null,ea=null,I={state:0,socket:null},na=(new Date).getTime(),la,fa=0,T={};x.prototype.preload=function(c){var d=new Image;this.images.push(d);d.onload=x.prototype.onload;d.onerror=x.prototype.onload;d.onabort=x.prototype.onload;d.imagePreloader=this;d.src=c};x.prototype.onload=function(){var c=this.imagePreloader;--c.work==0&&c.callback(c.images)};h.history.register(_$_INITIAL_HASH_$_,v);window.onunload=
    +function(){if(!P){l.emit(l,"Wt-unload");r()}};this._p_={ieAlternative:D,loadScript:O,onJsLoad:K,setTitle:da,update:u,quit:N,setFormObjects:function(c){Z=c},saveDownPos:w,addTimerEvent:J,load:a,handleResponse:o,setServerPush:k,dragStart:ca,dragDrag:V,dragEnd:R,capture:h.capture,onHashChange:v,setHash:G,ImagePreloader:x,autoJavaScript:function(){_$_AUTO_JAVASCRIPT_$_()},response:B,setCloseMessage:Y};this.WT=_$_WT_CLASS_$_;this.emit=C});window.WtSignalEmit=_$_APP_CLASS_$_.emit;
    +window.WtScriptLoaded=false;window.onLoad=function(){if(window.WtScriptLoaded){_$_WT_CLASS_$_.history.initialize("Wt-history-field","Wt-history-iframe");_$_APP_CLASS_$_._p_.load()}else window.isLoaded=true};
    diff --git a/wt-3.1.7a/src/web/skeleton/jquery.min.js b/wt-3.1.7a/src/web/skeleton/jquery.min.js
    new file mode 100644
    index 0000000..8adf12f
    --- /dev/null
    +++ b/wt-3.1.7a/src/web/skeleton/jquery.min.js
    @@ -0,0 +1,125 @@
    +/*!
    + * jQuery JavaScript Library v1.4b1pre
    + * http://jquery.com/
    + *
    + * Copyright 2010, John Resig
    + * Dual licensed under the MIT or GPL Version 2 licenses.
    + * http://docs.jquery.com/License
    + *
    + * Includes Sizzle.js
    + * http://sizzlejs.com/
    + * Copyright 2010, The Dojo Foundation
    + * Released under the MIT, BSD, and GPL Licenses.
    + *
    + * Date: Thu Jan 7 14:26:06 2010 -0500
    + */
    +(function(y,w){function ea(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ea,1);return}c.ready()}}function Da(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function U(a,b,d,f,g,i){var k=a.length;if(typeof b==="object"){for(var o in b)U(a,o,b[o],f,g,d);return a}if(d!==w){f=f&&c.isFunction(d);for(o=0;o<k;o++)g(a[o],b,f?d.call(a[o],o,g(a[o],b)):d,i);return a}return k?
    +g(a[0],b):null}function V(){return(new Date).getTime()}function W(){return false}function X(){return true}function fa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function ga(a){var b=true,d=[],f=[],g=arguments,i,k,o,p,n,v=c.extend({},c.data(this,"events").live);for(p in v){k=v[p];if(k.live===a.type||k.altLive&&c.inArray(a.type,k.altLive)>-1){i=k.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(k.selector)}else delete v[p]}i=c(a.target).closest(f,a.currentTarget);
    +n=0;for(l=i.length;n<l;n++)for(p in v){k=v[p];o=i[n].elem;f=null;if(i[n].selector===k.selector){if(k.live==="mouseenter"||k.live==="mouseleave")f=c(a.relatedTarget).closest(k.selector)[0];if(!f||f!==o)d.push({elem:o,fn:k})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,g)===false){b=false;break}}return b}function ha(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function ia(a,b){var d=0;b.each(function(){if(this.nodeName===
    +(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),g=c.data(this,f);if(f=f&&f.events){delete g.handle;g.events={};for(var i in f)for(var k in f[i])c.event.add(this,i,f[i][k],f[i][k].data)}}})}function ja(a,b,d){var f,g,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){g=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(g)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:g}}function N(a){for(var b=
    +0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[C]))delete c.cache[f]}function ka(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ea=y.jQuery,Fa=y.$,s=y.document,O,Ga=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ha=/^.[^:#\[\.,]*$/,Ia=/\S/,Ja=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ka=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,I=navigator.userAgent,la=false,J=[],G,Y=Object.prototype.toString,Z=Object.prototype.hasOwnProperty,
    +$=Array.prototype.push,K=Array.prototype.slice,P=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Ga.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Ka.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ja([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=
    +s.getElementById(d[2])){if(b.id!==d[2])return O.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||O).find(a):c(b).find(a);else if(c.isFunction(a))return O.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4b1pre",length:0,size:function(){return this.length},
    +toArray:function(){return K.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;$.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else J&&J.push(a);
    +return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(K.apply(this,arguments),"slice",K.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:$,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},
    +b=1,d=arguments.length,f=false,g,i,k,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((g=arguments[b])!=null)for(i in g){k=a[i];o=g[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){k=k&&(c.isPlainObject(k)||c.isArray(k))?k:c.isArray(o)?[]:{};a[i]=c.extend(f,k,o)}else if(o!==w)a[i]=o}return a};c.extend({noConflict:function(a){y.$=Fa;if(a)y.jQuery=Ea;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,
    +13);c.isReady=true;if(J){for(var a,b=0;a=J[b++];)a.call(s,c);J=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!la){la=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",G,false);y.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",G);y.attachEvent("onload",c.ready);var a=false;try{a=y.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ea()}}},isFunction:function(a){return Y.call(a)===
    +"[object Function]"},isArray:function(a){return Y.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||Y.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!Z.call(a,"constructor")&&!Z.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||Z.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Ia.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,
    +d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,g=0,i=a.length,k=i===w||c.isFunction(a);if(d)if(k)for(f in a){if(b.apply(a[f],d)===false)break}else for(;g<i;){if(b.apply(a[g++],d)===false)break}else if(k)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=
    +a[0];g<i&&b.call(d,g,d)!==false;d=a[++g]);return a},trim:function(a){return(a||"").replace(Ja,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?$.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var g=b.length;f<g;f++)a[d++]=b[f];else for(;b[f]!==
    +w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],g=0,i=a.length;g<i;g++)!d!==!b(a[g],g)&&f.push(a[g]);return f},map:function(a,b,d){for(var f=[],g,i=0,k=a.length;i<k;i++){g=b(a[i],i,d);if(g!=null)f[f.length]=g}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
    +uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});I=c.uaMatch(I);if(I.browser){c.browser[I.browser]=true;c.browser.version=
    +I.version}if(c.browser.webkit)c.browser.safari=true;if(P)c.inArray=function(a,b){return P.call(b,a)};O=c(s);if(s.addEventListener)G=function(){s.removeEventListener("DOMContentLoaded",G,false);c.ready()};else if(s.attachEvent)G=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",G);c.ready()}};if(P)c.inArray=function(a,b){return P.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+V();d.style.display=
    +"none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var g=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!g||!g.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),
    +cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(k){}a.insertBefore(b,a.firstChild);if(y[f]){c.support.scriptEval=true;delete y[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;
    +d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=g=i=null}})();c.props=
    +{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");
    +f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||
    +"fx",[])}});var La=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==y&&!a.frameElement)a=y;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var g=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),k;if(!i){k=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(k.elem,arguments):w};i=c.data(a,"handle",k)}i.elem=a;b=b.split(/\s+/);for(var o,
    +p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var v=g[o],z=this.special[o]||{};if(!v){v=g[o]={};if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,v))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}v[d.guid]=d;this.global[o]=true}a=null}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),g,i,k;if(f){if(b===
    +w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,v=c.map(p.slice(0).sort(),La);v=new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){k=f[i][d.guid];delete f[i][d.guid]}else for(var D in f[i])if(n||v.test(f[i][D].type))delete f[i][D];z.remove&&z.remove.call(a,p,k);for(g in f[i])break;if(!g){if(!z.teardown||
    +z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));g=null;delete f[i]}}}}for(g in f)break;if(!g){if(D=c.data(a,"handle"))D.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var g=a.type||a;if(!f){a=typeof a==="object"?a[C]?a:c.extend(c.Event(g),a):c.Event(g);if(g.indexOf("!")>=0){a.type=g=g.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();
    +this.global[g]&&c.each(c.cache,function(){this.events&&this.events[g]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var k,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){k=d[g];o=d["on"+g]}}catch(p){}i=c.nodeName(d,"a")&&g==="click";if(!f&&k&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[g]()}catch(n){}}else if(o&&d["on"+g].apply(d,
    +b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||y.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var g in d){var i=d[g];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);
    +if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[C])return a;
    +var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||
    +d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,ga,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,
    +"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],ga)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=V();this[C]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=
    +X;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=X;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=X;this.stopPropagation()},isDefaultPrevented:W,isPropagationStopped:W,isImmediatePropagationStopped:W};var ma=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==
    +this){a.type=a.data;c.event.handle.apply(this,arguments)}},na=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?na:ma,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?na:ma)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,
    +function(f){var g=f.target,i=g.type;if((i==="submit"||i==="image")&&c(g).closest("form").length)return fa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var g=f.target,i=g.type;if((i==="text"||i==="password")&&c(g).closest("form").length&&f.keyCode===13)return fa("submit",this,arguments)})}},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var aa=
    +/textarea|input|select/i;function oa(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ba(a,b){var d=a.target,f,g;if(!(!aa.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");g=oa(d);if(g!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",g);if(d.type!=="select"&&(f!=
    +null||g)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ba,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ba.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ba.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()===
    +"input"&&a.type==="radio"&&c.data(a,"_change_data",oa(a))}},setup:function(a,b,d){for(var f in Q)c.event.add(this,f+".specialChange."+d.guid,Q[f]);return aa.test(this.nodeName)},remove:function(a,b){for(var d in Q)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),Q[d]);return aa.test(this.nodeName)}};var Q=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]=
    +{setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,g){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],g);return this}if(c.isFunction(f)){thisObject=g;g=f;f=w}var k=b==="one"?c.proxy(g,function(o){c(this).unbind(o,k);return g.apply(this,arguments)}):g;d==="unload"&&b!=="one"?this.one(d,f,g,thisObject):(!this.selector&&!this.context?c(s):this).each(function(){c.event.add(this,
    +d,k,f)});return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}(!this.selector&&!this.context?c(s):this).each(function(){c.event.remove(this,a,b)});return this},trigger:function(a,b){(!this.selector&&!this.context?c(s):this).each(function(){c.event.trigger(a,b,this)});return this},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
    +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var g=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,g+1);f.preventDefault();return b[g].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ha(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ha(a,
    +this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.fnAttr)c.fnAttr[b]=true});y.attachEvent&&!y.addEventListener&&y.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
    +var C="jQuery"+V(),Ma=0,pa={},Na={};c.extend({cache:{},expando:C,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==y?pa:a;var f=a[C],g=c.cache;if(!b&&!f)return null;f||(f=++Ma);if(typeof b==="object"){a[C]=f;g=g[f]=c.extend(true,{},b)}else g=g[f]?g[f]:typeof d==="undefined"?Na:(g[f]={});if(d!==w){a[C]=f;g[b]=d}return typeof b==="string"?g[b]:g}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=
    +a==y?pa:a;var d=a[C],f=c.cache,g=f[d];if(b){if(g){delete g[b];c.isEmptyObject(g)&&c.removeData(a)}}else{try{delete a[C]}catch(i){a.removeAttribute&&a.removeAttribute(C)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===
    +w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});(function(){function a(e){for(var h="",j,m=0;e[m];m++){j=e[m];if(j.nodeType===3||j.nodeType===4)h+=j.nodeValue;else if(j.nodeType!==8)h+=a(j.childNodes)}return h}function b(e,h,j,m,r,q){r=0;for(var u=m.length;r<u;r++){var t=m[r];if(t){t=t[e];for(var x=false;t;){if(t.sizcache===j){x=m[t.sizset];break}if(t.nodeType===
    +1&&!q){t.sizcache=j;t.sizset=r}if(t.nodeName.toLowerCase()===h){x=t;break}t=t[e]}m[r]=x}}}function d(e,h,j,m,r,q){r=0;for(var u=m.length;r<u;r++){var t=m[r];if(t){t=t[e];for(var x=false;t;){if(t.sizcache===j){x=m[t.sizset];break}if(t.nodeType===1){if(!q){t.sizcache=j;t.sizset=r}if(typeof h!=="string"){if(t===h){x=true;break}}else if(p.filter(h,[t]).length>0){x=t;break}}t=t[e]}m[r]=x}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
    +g=0,i=Object.prototype.toString,k=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(e,h,j,m){j=j||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!e||typeof e!=="string")return j;for(var q=[],u,t,x,L,E=true,H=R(h),F=e;(f.exec(""),u=f.exec(F))!==null;){F=u[3];q.push(u[1]);if(u[2]){L=u[3];break}}if(q.length>1&&v.exec(e))if(q.length===2&&n.relative[q[0]])t=qa(q[0]+q[1],h);else for(t=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){e=q.shift();if(n.relative[e])e+=q.shift();
    +t=qa(e,t)}else{if(!m&&q.length>1&&h.nodeType===9&&!H&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){u=p.find(q.shift(),h,H);h=u.expr?p.filter(u.expr,u.set)[0]:u.set[0]}if(h){u=m?{expr:q.pop(),set:D(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,H);t=u.expr?p.filter(u.expr,u.set):u.set;if(q.length>0)x=D(t);else E=false;for(;q.length;){var A=q.pop();u=A;if(n.relative[A])u=q.pop();else A="";if(u==null)u=h;n.relative[A](x,u,H)}}else x=[]}x||(x=t);x||p.error(A||
    +e);if(i.call(x)==="[object Array]")if(E)if(h&&h.nodeType===1)for(e=0;x[e]!=null;e++){if(x[e]&&(x[e]===true||x[e].nodeType===1&&ra(h,x[e])))j.push(t[e])}else for(e=0;x[e]!=null;e++)x[e]&&x[e].nodeType===1&&j.push(t[e]);else j.push.apply(j,x);else D(x,j);if(L){p(L,r,j,m);p.uniqueSort(j)}return j};p.uniqueSort=function(e){if(M){k=o;e.sort(M);if(k)for(var h=1;h<e.length;h++)e[h]===e[h-1]&&e.splice(h--,1)}return e};p.matches=function(e,h){return p(e,null,null,h)};p.find=function(e,h,j){var m,r;if(!e)return[];
    +for(var q=0,u=n.order.length;q<u;q++){var t=n.order[q];if(r=n.leftMatch[t].exec(e)){var x=r[1];r.splice(1,1);if(x.substr(x.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[t](r,h,j);if(m!=null){e=e.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:e}};p.filter=function(e,h,j,m){for(var r=e,q=[],u=h,t,x,L=h&&h[0]&&R(h[0]);e&&h.length;){for(var E in n.filter)if((t=n.leftMatch[E].exec(e))!=null&&t[2]){var H=n.filter[E],F,A;A=t[1];x=false;t.splice(1,1);if(A.substr(A.length-
    +1)!=="\\"){if(u===q)q=[];if(n.preFilter[E])if(t=n.preFilter[E](t,u,j,q,m,L)){if(t===true)continue}else x=F=true;if(t)for(var S=0;(A=u[S])!=null;S++)if(A){F=H(A,t,S,u);var sa=m^!!F;if(j&&F!=null)if(sa)x=true;else u[S]=false;else if(sa){q.push(A);x=true}}if(F!==w){j||(u=q);e=e.replace(n.match[E],"");if(!x)return[];break}}}if(e===r)if(x==null)p.error(e);else break;r=e}return u};p.error=function(e){throw"Syntax error, unrecognized expression: "+e;};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
    +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},
    +relative:{"+":function(e,h){var j=typeof h==="string",m=j&&!/\W/.test(h);j=j&&!m;if(m)h=h.toLowerCase();m=0;for(var r=e.length,q;m<r;m++)if(q=e[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);e[m]=j||q&&q.nodeName.toLowerCase()===h?q||false:q===h}j&&p.filter(h,e,true)},">":function(e,h){var j=typeof h==="string";if(j&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=e.length;m<r;m++){var q=e[m];if(q){j=q.parentNode;e[m]=j.nodeName.toLowerCase()===h?j:false}}}else{m=0;for(r=e.length;m<r;m++)if(q=e[m])e[m]=
    +j?q.parentNode:q.parentNode===h;j&&p.filter(h,e,true)}},"":function(e,h,j){var m=g++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,e,q,j)},"~":function(e,h,j){var m=g++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,e,q,j)}},find:{ID:function(e,h,j){if(typeof h.getElementById!=="undefined"&&!j)return(e=h.getElementById(e[1]))?[e]:[]},NAME:function(e,h){if(typeof h.getElementsByName!=="undefined"){var j=[];
    +h=h.getElementsByName(e[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===e[1]&&j.push(h[m]);return j.length===0?null:j}},TAG:function(e,h){return h.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,h,j,m,r,q){e=" "+e[1].replace(/\\/g,"")+" ";if(q)return e;q=0;for(var u;(u=h[q])!=null;q++)if(u)if(r^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(e)>=0))j||m.push(u);else if(j)h[q]=false;return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(e){return e[1].toLowerCase()},
    +CHILD:function(e){if(e[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=h[1]+(h[2]||1)-0;e[3]=h[3]-0}e[0]=g++;return e},ATTR:function(e,h,j,m,r,q){h=e[1].replace(/\\/g,"");if(!q&&n.attrMap[h])e[1]=n.attrMap[h];if(e[2]==="~=")e[4]=" "+e[4]+" ";return e},PSEUDO:function(e,h,j,m,r){if(e[1]==="not")if((f.exec(e[3])||"").length>1||/^\w/.test(e[3]))e[3]=p(e[3],null,null,h);else{e=p.filter(e[3],h,j,true^r);j||m.push.apply(m,
    +e);return false}else if(n.match.POS.test(e[0])||n.match.CHILD.test(e[0]))return true;return e},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){return e.selected===true},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,h,j){return!!p(j[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},
    +text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},
    +setFilters:{first:function(e,h){return h===0},last:function(e,h,j,m){return h===m.length-1},even:function(e,h){return h%2===0},odd:function(e,h){return h%2===1},lt:function(e,h,j){return h<j[3]-0},gt:function(e,h,j){return h>j[3]-0},nth:function(e,h,j){return j[3]-0===h},eq:function(e,h,j){return j[3]-0===h}},filter:{PSEUDO:function(e,h,j,m){var r=h[1],q=n.filters[r];if(q)return q(e,j,h,m);else if(r==="contains")return(e.textContent||e.innerText||a([e])||"").indexOf(h[3])>=0;else if(r==="not"){h=
    +h[3];j=0;for(m=h.length;j<m;j++)if(h[j]===e)return false;return true}else p.error("Syntax error, unrecognized expression: "+r)},CHILD:function(e,h){var j=h[1],m=e;switch(j){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(j==="first")return true;m=e;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":j=h[2];var r=h[3];if(j===1&&r===0)return true;h=h[0];var q=e.parentNode;if(q&&(q.sizcache!==h||!e.nodeIndex)){var u=0;for(m=q.firstChild;m;m=
    +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++u;q.sizcache=h}e=e.nodeIndex-r;return j===0?e===0:e%j===0&&e/j>=0}},ID:function(e,h){return e.nodeType===1&&e.getAttribute("id")===h},TAG:function(e,h){return h==="*"&&e.nodeType===1||e.nodeName.toLowerCase()===h},CLASS:function(e,h){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(e,h){var j=h[1];e=n.attrHandle[j]?n.attrHandle[j](e):e[j]!=null?e[j]:e.getAttribute(j);j=e+"";var m=h[2];h=h[4];return e==null?m==="!=":m===
    +"="?j===h:m==="*="?j.indexOf(h)>=0:m==="~="?(" "+j+" ").indexOf(h)>=0:!h?j&&e!==false:m==="!="?j!==h:m==="^="?j.indexOf(h)===0:m==="$="?j.substr(j.length-h.length)===h:m==="|="?j===h||j.substr(0,h.length+1)===h+"-":false},POS:function(e,h,j,m){var r=n.setFilters[h[2]];if(r)return r(e,j,h,m)}}},v=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(e,
    +h){return"\\"+(h-0+1)}))}var D=function(e,h){e=Array.prototype.slice.call(e,0);if(h){h.push.apply(h,e);return h}return e};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(ib){D=function(e,h){h=h||[];if(i.call(e)==="[object Array]")Array.prototype.push.apply(h,e);else if(typeof e.length==="number")for(var j=0,m=e.length;j<m;j++)h.push(e[j]);else for(j=0;e[j];j++)h.push(e[j]);return h}}var M;if(s.documentElement.compareDocumentPosition)M=function(e,h){if(!e.compareDocumentPosition||
    +!h.compareDocumentPosition){if(e==h)k=true;return e.compareDocumentPosition?-1:1}e=e.compareDocumentPosition(h)&4?-1:e===h?0:1;if(e===0)k=true;return e};else if("sourceIndex"in s.documentElement)M=function(e,h){if(!e.sourceIndex||!h.sourceIndex){if(e==h)k=true;return e.sourceIndex?-1:1}e=e.sourceIndex-h.sourceIndex;if(e===0)k=true;return e};else if(s.createRange)M=function(e,h){if(!e.ownerDocument||!h.ownerDocument){if(e==h)k=true;return e.ownerDocument?-1:1}var j=e.ownerDocument.createRange(),m=
    +h.ownerDocument.createRange();j.setStart(e,0);j.setEnd(e,0);m.setStart(h,0);m.setEnd(h,0);e=j.compareBoundaryPoints(Range.START_TO_END,m);if(e===0)k=true;return e};(function(){var e=s.createElement("div"),h="script"+(new Date).getTime();e.innerHTML="<a name='"+h+"'/>";var j=s.documentElement;j.insertBefore(e,j.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
    +r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}j.removeChild(e);j=e=null})();(function(){var e=s.createElement("div");e.appendChild(s.createComment(""));if(e.getElementsByTagName("*").length>0)n.find.TAG=function(h,j){j=j.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;j[m];m++)j[m].nodeType===1&&h.push(j[m]);j=h}return j};e.innerHTML="<a href='#'></a>";
    +if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};e=null})();s.querySelectorAll&&function(){var e=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,u){r=r||s;if(!u&&r.nodeType===9&&!R(r))try{return D(r.querySelectorAll(m),q)}catch(t){}return e(m,r,q,u)};for(var j in e)p[j]=e[j];h=null}}();
    +(function(){var e=s.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!e.getElementsByClassName||e.getElementsByClassName("e").length===0)){e.lastChild.className="e";if(e.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,j,m){if(typeof j.getElementsByClassName!=="undefined"&&!m)return j.getElementsByClassName(h[1])};e=null}}})();var ra=s.compareDocumentPosition?function(e,h){return!!(e.compareDocumentPosition(h)&16)}:
    +function(e,h){return e!==h&&(e.contains?e.contains(h):true)},R=function(e){return(e=(e?e.ownerDocument||e:0).documentElement)?e.nodeName!=="HTML":false},qa=function(e,h){var j=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(e);){m+=r[0];e=e.replace(n.match.PSEUDO,"")}e=n.relative[e]?e+"*":e;r=0;for(var q=h.length;r<q;r++)p(e,h[r],j);return p.filter(m,j)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=R;c.contains=ra})();var Oa=/Until$/,Pa=
    +/^(?:parents|prevUntil|prevAll)/,Qa=/,/;K=Array.prototype.slice;var ta=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(g,i){return!!b.call(g,i,g)===d});else if(b.nodeType)return c.grep(a,function(g){return g===b===d});else if(typeof b==="string"){var f=c.grep(a,function(g){return g.nodeType===1});if(Ha.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(g){return c.inArray(g,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,
    +f=0,g=this.length;f<g;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var k=0;k<d;k++)if(b[k]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ta(this,a,false),"not",a)},filter:function(a){return this.pushStack(ta(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=
    +[],f=this[0],g,i={},k;if(f&&a.length){g=0;for(var o=a.length;g<o;g++){k=a[g];i[k]||(i[k]=c.expr.match.POS.test(k)?c(k,b||this.context):k)}for(;f&&f.ownerDocument&&f!==b;){for(k in i){g=i[k];if(g.jquery?g.index(f)>-1:c(f).is(g)){d.push({selector:k,elem:f});delete i[k]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,v){for(;v&&v.ownerDocument&&v!==b;){if(p?p.index(v)>-1:c(v).is(a))return v;v=v.parentNode}return null})},index:function(a){if(!a||
    +typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(a[0]&&(a[0].setInterval||a[0].nodeType===9||a[0].parentNode&&a[0].parentNode.nodeType!==11)?c.unique(b):b)},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,
    +"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},
    +contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var g=c.map(this,b,d);Oa.test(a)||(f=d);if(f&&typeof f==="string")g=c.filter(f,g);g=this.length>1?c.unique(g):g;if((this.length>1||Qa.test(f))&&Pa.test(a))g=g.reverse();return this.pushStack(g,a,K.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=
    +a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var ua=/[\n\t]/g,ca=/\s+/,Ra=/\r/g,Sa=/href|src|style/,Ta=/(button|input)/i,Ua=/(button|input|object|select|textarea)/i,Va=/^(a|area)$/i,va=/radio|checkbox/;c.fn.extend({attr:function(a,b){return U(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,
    +a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var g=this[d];if(g.nodeType===1)if(g.className)for(var i=" "+g.className+" ",k=0,o=b.length;k<o;k++){if(i.indexOf(" "+b[k]+" ")<0)g.className+=" "+b[k]}else g.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=
    +c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){for(var i=(" "+g.className+" ").replace(ua," "),k=0,o=b.length;k<o;k++)i=i.replace(" "+b[k]+" "," ");g.className=i.substring(1,i.length-1)}else g.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(g){var i=c(this);i.toggleClass(a.call(this,
    +g,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var g,i=0,k=c(this),o=b,p=a.split(ca);g=p[i++];){o=f?o:!k.hasClass(g);k[o?"addClass":"removeClass"](g)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ua," ").indexOf(a)>-1)return true;return false},
    +val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],g=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:g.length;i<d;i++){var k=g[i];if(k.selected){a=c(k).val();if(b)return a;f.push(a)}}return f}if(va.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Ra,"")}return w}var o=c.isFunction(a);
    +return this.each(function(p){var n=c(this),v=a;if(this.nodeType===1){if(o)v=a.call(this,p,n.val());if(typeof v==="number")v+="";if(c.isArray(v)&&va.test(this.type))this.checked=c.inArray(n.val(),v)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(v);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,
    +b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var g=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Sa.test(b);if(b in a&&f&&!i){if(g){if(b==="type"&&Ta.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ua.test(a.nodeName)||Va.test(a.nodeName)&&
    +a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(g)a.style.cssText=""+d;return a.style.cssText}g&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var wa=/ jQuery\d+="(?:\d+|null)"/g,T=/^\s+/,Wa=/(<([\w:]+)[^>]*?)\/>/g,Xa=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,xa=/<([\w:]+)/,Ya=/<tbody/i,Za=/<|&\w+;/,$a=function(a,b,d){return Xa.test(d)?a:b+"></"+d+">"},B={option:[1,"<select multiple='multiple'>",
    +"</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};B.optgroup=B.option;B.tbody=B.tfoot=B.colgroup=B.caption=B.thead;B.th=B.td;if(!c.support.htmlSerialize)B._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
    +c(this);return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
    +wrapInner:function(a){return this.each(function(){c(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},
    +before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());
    +return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(wa,"").replace(T,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ia(this,b);ia(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(wa,""):null;else if(typeof a==="string"&&
    +!/<script/i.test(a)&&(c.support.leadingWhitespace||!T.test(a))&&!B[(xa.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){N(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(g){var i=c(this),k=i.html();i.empty().append(function(){return a.call(this,g,k)})}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?this.each(function(){var b=
    +this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)}):this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(v){return c.nodeName(v,"table")?v.getElementsByTagName("tbody")[0]||v.appendChild(v.ownerDocument.createElement("tbody")):v}var g,i,k=a[0],o=[];if(c.isFunction(k))return this.each(function(v){var z=c(this);a[0]=k.call(this,v,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){g=
    +a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ja(a,this,o);if(i=g.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],g.cacheable||this.length>1||p>0?g.fragment.cloneNode(true):g.fragment)}o&&c.each(o,Da)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var g=0,
    +i=d.length;g<i;g++){var k=(g>0?this.clone(true):this).get();c.fn[b].apply(c(d[g]),k);f=f.concat(k)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){N(this.getElementsByTagName("*"));N([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&N(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,
    +arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var g=[];c.each(a,function(i,k){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!Za.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(Wa,$a);var o=(xa.exec(k)||["",""])[1].toLowerCase(),p=B[o]||B._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+k+p[2];n--;)i=i.lastChild;if(!c.support.tbody){n=Ya.test(k);o=o==="table"&&
    +!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&T.test(k)&&i.insertBefore(b.createTextNode(T.exec(k)[0]),i.firstChild);k=c.makeArray(i.childNodes)}if(k.nodeType)g.push(k);else g=c.merge(g,k)}});if(d)for(a=0;g[a];a++)if(f&&c.nodeName(g[a],"script")&&(!g[a].type||g[a].type.toLowerCase()==="text/javascript"))f.push(g[a].parentNode?
    +g[a].parentNode.removeChild(g[a]):g[a]);else{g[a].nodeType===1&&g.splice.apply(g,[a+1,0].concat(c.makeArray(g[a].getElementsByTagName("script"))));d.appendChild(g[a])}return g}});var ab=/z-?index|font-?weight|opacity|zoom|line-?height/i,ya=/alpha\([^)]*\)/,za=/opacity=([^)]*)/,da=/float/i,Aa=/-([a-z])/ig,bb=/([A-Z])/g,cb=/^-?\d+(?:px)?$/i,db=/^-?\d/,eb={position:"absolute",visibility:"hidden",display:"block"},fb=["Left","Right"],gb=["Top","Bottom"],hb=s.defaultView&&s.defaultView.getComputedStyle,
    +Ba=c.support.cssFloat?"cssFloat":"styleFloat",Ca=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return U(this,a,b,true,function(d,f,g){if(g===w)return c.curCSS(d,f);if(typeof g==="number"&&!ab.test(f))g+="px";c.style(d,f,g)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,g=d!==w;if(!c.support.opacity&&b==="opacity"){if(g){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+
    +")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=ya.test(a)?a.replace(ya,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(za.exec(f.filter)[1])/100+"":""}if(da.test(b))b=Ba;b=b.replace(Aa,Ca);if(g)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var g,i=b==="width"?fb:gb;function k(){g=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(g-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")g+=parseFloat(c.curCSS(a,"margin"+
    +this,true))||0;else g-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?k():c.swap(a,eb,k);return Math.max(0,Math.round(g))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,g=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=za.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(da.test(b))b=Ba;if(!d&&g&&g[b])f=g[b];else if(hb){if(da.test(b))b="float";b=b.replace(bb,"-$1").toLowerCase();g=a.ownerDocument.defaultView;if(!g)return null;
    +if(a=g.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(Aa,Ca);f=a.currentStyle[b]||a.currentStyle[d];if(!cb.test(f)&&db.test(f)){b=g.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;g.left=d==="fontSize"?"1em":f||0;f=g.pixelLeft+"px";g.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var g in b){f[g]=a.style[g];a.style[g]=b[g]}d.call(a);for(g in b)a.style[g]=f[g]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=
    +function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(g){c.offset.setOffset(this,a,g)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
    +f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(v){c.offset.setOffset(this,a,v)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
    +b,g=b.ownerDocument,i,k=g.documentElement,o=g.body;f=(g=g.defaultView)?g.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==k;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=g?g.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
    +0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(k.scrollTop,o.scrollTop);n+=Math.max(k.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
    +d,f,g,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
    +d=b.firstChild;f=d.firstChild;g=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=g.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
    +bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),g=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,k=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,g);d={top:b.top-g.top+i,left:b.left-
    +g.left+k};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
    +this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var g=this[0],i;if(!g)return null;if(f!==w)return this.each(function(){if(i=ka(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ka(g))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:g[d]}});
    +c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var g=this[0];if(!g)return f==null?null:this;return"scrollTo"in g&&g.document?g.document.compatMode==="CSS1Compat"&&g.document.documentElement["client"+b]||g.document.body["client"+b]:g.nodeType===9?Math.max(g.documentElement["client"+b],g.body["scroll"+
    +b],g.documentElement["scroll"+b],g.body["offset"+b],g.documentElement["offset"+b]):f===w?c.css(g,d):this.css(d,typeof f==="string"?f:f+"px")}});y.jQuery=y.$=c})(window);
    diff --git a/wt-3.1.7a/src/xml/wt.xml b/wt-3.1.7a/src/xml/wt.xml
    new file mode 100644
    index 0000000..a707219
    --- /dev/null
    +++ b/wt-3.1.7a/src/xml/wt.xml
    @@ -0,0 +1,95 @@
    +<?xml version="1.0" encoding="UTF8"?>
    +<messages>
    +  <message id="Wt.WAbstractItemView.PageIOfN"><b>{1}</b> of <b>{2}</b></message>
    +  <message id="Wt.WAbstractItemView.PageBar.First">&#x00ab; First</message>
    +  <message id="Wt.WAbstractItemView.PageBar.Previous">&#x2039; Previous</message>
    +  <message id="Wt.WAbstractItemView.PageBar.Next">Next &#x203a;</message>
    +  <message id="Wt.WAbstractItemView.PageBar.Last">Last &#x00bb;</message>
    +  <message id="Wt.WCalendar.PrevMonth">&#x00ab;</message>
    +  <message id="Wt.WCalendar.NextMonth">&#x00bb;</message>
    +  <message id="Wt.WDate.Mon">Mon</message>
    +  <message id="Wt.WDate.Tue">Tue</message>
    +  <message id="Wt.WDate.Wed">Wed</message>
    +  <message id="Wt.WDate.Thu">Thu</message>
    +  <message id="Wt.WDate.Fri">Fri</message>
    +  <message id="Wt.WDate.Sat">Sat</message>
    +  <message id="Wt.WDate.Sun">Sun</message>
    +  <message id="Wt.WDate.Monday">Monday</message>
    +  <message id="Wt.WDate.Tuesday">Tuesday</message>
    +  <message id="Wt.WDate.Wednesday">Wednesday</message>
    +  <message id="Wt.WDate.Thursday">Thursday</message>
    +  <message id="Wt.WDate.Friday">Friday</message>
    +  <message id="Wt.WDate.Saturday">Saturday</message>
    +  <message id="Wt.WDate.Sunday">Sunday</message>
    +  <message id="Wt.WDate.Jan">Jan</message>
    +  <message id="Wt.WDate.Feb">Feb</message>
    +  <message id="Wt.WDate.Mar">Mar</message>
    +  <message id="Wt.WDate.Apr">Apr</message>
    +  <message id="Wt.WDate.May">May</message>
    +  <message id="Wt.WDate.Jun">Jun</message>
    +  <message id="Wt.WDate.Jul">Jul</message>
    +  <message id="Wt.WDate.Aug">Aug</message>
    +  <message id="Wt.WDate.Sep">Sep</message>
    +  <message id="Wt.WDate.Oct">Oct</message>
    +  <message id="Wt.WDate.Nov">Nov</message>
    +  <message id="Wt.WDate.Dec">Dec</message>
    +  <message id="Wt.WDate.January">January</message>
    +  <message id="Wt.WDate.February">February</message>
    +  <message id="Wt.WDate.March">March</message>
    +  <message id="Wt.WDate.April">April</message>
    +  <message id="Wt.WDate.May">May</message>
    +  <message id="Wt.WDate.June">June</message>
    +  <message id="Wt.WDate.July">July</message>
    +  <message id="Wt.WDate.August">August</message>
    +  <message id="Wt.WDate.September">September</message>
    +  <message id="Wt.WDate.October">October</message>
    +  <message id="Wt.WDate.November">November</message>
    +  <message id="Wt.WDate.December">December</message>
    +  <message id="Wt.WDatePicker.Close">Close</message>
    +  <message id="Wt.WDateTime.LessThanASecond">less than a second</message>
    +  <message id="Wt.WDateTime.second">one second</message>
    +  <message id="Wt.WDateTime.seconds">{1} seconds</message>
    +  <message id="Wt.WDateTime.minute">one minute</message>
    +  <message id="Wt.WDateTime.minutes">{1} minutes</message>
    +  <message id="Wt.WDateTime.hour">one hour</message>
    +  <message id="Wt.WDateTime.hours">{1} hours</message>
    +  <message id="Wt.WDateTime.day">one day</message>
    +  <message id="Wt.WDateTime.days">{1} days</message>
    +  <message id="Wt.WDateTime.week">one week</message>
    +  <message id="Wt.WDateTime.weeks">{1} weeks</message>
    +  <message id="Wt.WDateTime.month">one month</message>
    +  <message id="Wt.WDateTime.months">{1} months</message>
    +  <message id="Wt.WDateTime.year">one year</message>
    +  <message id="Wt.WDateTime.years">{1} years</message>
    +  <message id="Wt.WDateTime.null">Null</message>
    +  <message id="Wt.WDateValidator.DateTooEarly">The date must be after {1}</message>
    +  <message id="Wt.WDateValidator.DateTooLate">The date must be before {1}</message>
    +  <message id="Wt.WDateValidator.WrongDateRange">The date must be between {1} and {2}</message>
    +  <message id="Wt.WDateValidator.WrongFormat">Must be a date in the format '{1}'</message>
    +  <message id="Wt.WDefaultLoadingIndicator.Loading">Loading...</message>
    +  <message id="Wt.WDoubleValidator.NotANumber">Must be a number</message>
    +  <message id="Wt.WDoubleValidator.TooSmall">The number must be larger than {1}</message>
    +  <message id="Wt.WDoubleValidator.BadRange">The number must be in the range {1} to {2}</message>
    +  <message id="Wt.WDoubleValidator.TooLarge">The number must be smaller than {1}</message>
    +  <message id="Wt.WInPlaceEdit.Save">Save</message>
    +  <message id="Wt.WInPlaceEdit.Cancel">Cancel</message>
    +  <message id="Wt.WIntValidator.NotAnInteger">Must be an integer number</message>
    +  <message id="Wt.WIntValidator.TooSmall">The number must be larger than {1}</message>
    +  <message id="Wt.WIntValidator.BadRange">The number must be in the range {1} to {2}</message>
    +  <message id="Wt.WIntValidator.TooLarge">The number must be smaller than {1}</message>
    +  <message id="Wt.WLengthValidator.TooShort">The input must be at least {1} characters</message>
    +  <message id="Wt.WLengthValidator.BadRange">The input must have a length between {1} and {2} characters</message>
    +  <message id="Wt.WLengthValidator.TooLong">The input must be no more than {1} characters</message>
    +  <message id="Wt.WMessageBox.Abort">Abort</message>
    +  <message id="Wt.WMessageBox.Cancel">Cancel</message>
    +  <message id="Wt.WMessageBox.Ignore">Ignore</message>
    +  <message id="Wt.WMessageBox.No">No</message>
    +  <message id="Wt.WMessageBox.NoToAll">No to All</message>
    +  <message id="Wt.WMessageBox.Ok">Ok</message>
    +  <message id="Wt.WMessageBox.Retry">Retry</message>
    +  <message id="Wt.WMessageBox.Yes">Yes</message>
    +  <message id="Wt.WMessageBox.YesToAll">Yes to All</message>
    +  <message id="Wt.WOverlayLoadingIndicator.Loading">Loading...</message>
    +  <message id="Wt.WRegExpValidator.Invalid">Invalid input</message>
    +  <message id="Wt.WValidator.Invalid">This field cannot be empty</message>
    +</messages>
    diff --git a/wt-3.1.7a/test/CMakeLists.txt b/wt-3.1.7a/test/CMakeLists.txt
    new file mode 100644
    index 0000000..d453a59
    --- /dev/null
    +++ b/wt-3.1.7a/test/CMakeLists.txt
    @@ -0,0 +1,41 @@
    +SET(TEST_SOURCES
    +  test.C
    +  chart/WChartTest.C
    +  models/WBatchEditProxyModelTest.C
    +  private/HttpTest.C
    +  utf8/Utf8Test.C
    +  utf8/XmlTest.C
    +  wdatetime/WDateTimeTest.C
    +)
    +
    +# HAVE_SQLITE does not work: why ?
    +IF(ENABLE_SQLITE)
    +  ADD_DEFINITIONS(-DWTDBO)
    +
    +  SET(TEST_SOURCES ${TEST_SOURCES}
    +    dbo/DboTest.C
    +    dbo/DboTest2.C
    +    private/DboImplTest.C
    +  )
    +
    +  # SQLITE3 test
    +  SET(TEST_LIBS wtdbo wtdbosqlite3)
    +  ADD_DEFINITIONS(-DSQLITE3)
    +
    +  # POSTGRES test
    +  #SET(TEST_LIBS wtdbo wtdbopostgres)
    +  #ADD_DEFINITIONS(-DPOSTGRES)
    +
    +ENDIF(ENABLE_SQLITE)
    +
    +ADD_EXECUTABLE(test
    +  ${TEST_SOURCES}
    +)
    +
    +TARGET_LINK_LIBRARIES(test wt ${TEST_LIBS})
    +
    +INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
    +
    +IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/interactive)
    +  SUBDIRS(interactive)
    +ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/interactive)
    diff --git a/wt-3.1.7a/test/chart/WChartTest.C b/wt-3.1.7a/test/chart/WChartTest.C
    new file mode 100644
    index 0000000..e41a35e
    --- /dev/null
    +++ b/wt-3.1.7a/test/chart/WChartTest.C
    @@ -0,0 +1,196 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    +
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include <iostream>
    +#include <fstream>
    +
    +#include <Wt/Chart/WCartesianChart>
    +#include <Wt/Chart/WDataSeries>
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WSvgImage>
    +#include <Wt/WPainter>
    +#include <Wt/WDate>
    +#include <Wt/WDateTime>
    +#include <Wt/WTime>
    +
    +#include "WChartTest.h"
    +
    +using namespace Wt;
    +using namespace Wt::Chart;
    +
    +void WChartTest::test_WDateTimeChartMinutes()
    +{
    +  WStandardItemModel* model = new WStandardItemModel();
    +
    +  WDate d(2009, 10, 1);
    +  WDateTime start(d, WTime(1, 0, 0));
    +  WDateTime end(d, WTime(2, 0, 0));
    +
    +  WDateTime dt = start;
    +  int row = 0;
    +  model->insertColumns(0, 2);
    +  while (dt < end) {
    +    model->insertRow(model->rowCount());
    +    model->setData(row, 0, boost::any(dt));
    +    model->setData(row, 1, boost::any(row * 10));
    +    dt = dt.addSecs(60);
    +    row++;
    +  }
    +
    +  plotTimeSeriesChart(model, "minutes.svg", DateTimeScale);
    +
    +  delete model;
    +}
    +  
    +void WChartTest::test_WDateTimeChartHours()
    +{ 
    +  WStandardItemModel* model = new WStandardItemModel();
    +
    +  WDate d(2009, 10, 1);
    +  WDateTime start(d, WTime(0, 0, 0));
    +  WDateTime end(d, WTime(23, 30, 0));
    +
    +  WDateTime dt = start;
    +  int row = 0;
    +  model->insertColumns(0, 2);
    +  while (dt < end) {
    +    model->insertRow(model->rowCount());
    +    model->setData(row, 0, boost::any(dt));
    +    model->setData(row, 1, boost::any(row * 10));
    +    dt = dt.addSecs(60 * 60);
    +    row++;
    +  }
    +
    +  plotTimeSeriesChart(model, "hours.svg", DateTimeScale);
    +
    +  delete model;
    +}
    +
    +void WChartTest::test_WDateTimeChartDays()
    +{
    +  WStandardItemModel* model = new WStandardItemModel();
    +  
    +  WDate start(2009, 10, 1);
    +  WDate end(2009, 11, 1);
    +
    +  WDate d = start;
    +  int row = 0;
    +  model->insertColumns(0, 2);
    +  while (d < end) {
    +    model->insertRow(model->rowCount());
    +    model->setData(row, 0, boost::any(d));
    +    model->setData(row, 1, boost::any(row * 10));
    +    d = d.addDays(1);
    +    row++;
    +  }
    +
    +  plotTimeSeriesChart(model, "days.svg", DateScale);
    +
    +  delete model;
    +}
    +  
    +void WChartTest::test_WDateTimeChartWeeks()
    +{
    +  WStandardItemModel* model = new WStandardItemModel();
    +
    +  WDate start(2009, 10, 1);
    +  WDate end(2009, 11, 1);
    +
    +  WDate d = start;
    +  int row = 0;
    +  model->insertColumns(0, 2);
    +  while (d < end) {
    +    model->insertRow(model->rowCount());
    +    model->setData(row, 0, boost::any(d));
    +    model->setData(row, 1, boost::any(row * 10));
    +    d = d.addDays(7);
    +    row++;
    +  }
    +
    +  plotTimeSeriesChart(model, "weeks.svg", DateScale);
    +
    +  delete model;
    +}
    +  
    +void WChartTest::test_WDateTimeChartMonths()
    +{
    +  WStandardItemModel* model = new WStandardItemModel();
    +
    +  WDate start(2008, 4, 1);
    +  WDate end(2008, 8, 1);
    +  
    +  WDate d = start;
    +  int row = 0;
    +  model->insertColumns(0, 2);
    +  while (d < end) {
    +    model->insertRow(model->rowCount());
    +    model->setData(row, 0, boost::any(d));
    +    model->setData(row, 1, boost::any(row * 10));
    +    d = d.addMonths(1);
    +    row++;
    +  }
    +
    +  plotTimeSeriesChart(model, "months.svg", DateScale);
    +
    +  delete model;
    +}
    +
    +void WChartTest::plotTimeSeriesChart(WStandardItemModel* model, 
    +				     std::string fileName,
    +				     AxisScale xScale) 
    +{
    +  WCartesianChart *chart = new WCartesianChart();
    +  chart->setModel(model);
    +  chart->setXSeriesColumn(0);
    +  chart->setLegendEnabled(true);
    +
    +  chart->setType(ScatterPlot);
    +  chart->axis(XAxis).setScale(xScale);
    +
    +  chart->setPlotAreaPadding(100, Left);
    +  chart->setPlotAreaPadding(50, Top | Bottom);
    +
    +  for (int i = 1; i < model->columnCount(); ++i) {
    +    WDataSeries s(i, LineSeries);
    +    chart->addSeries(s);
    +  }
    +
    +  chart->setMargin(10, Top | Bottom);
    +  chart->setMargin(WLength::Auto, Left | Right);
    +
    +  {
    +    WSvgImage image(400, 300);
    +    WPainter painter(&image);
    +
    +    chart->paint(painter);
    +
    +    painter.end();
    +    std::ofstream f(fileName.c_str());
    +    image.write(f);
    +    f.close();
    +  }
    +
    +  delete chart;
    +}
    +
    +WChartTest::WChartTest()
    +  : test_suite("wchart_test_suite")
    +{
    +  add(BOOST_TEST_CASE
    +      (boost::bind(&WChartTest::test_WDateTimeChartMinutes, this)));
    +  add(BOOST_TEST_CASE
    +      (boost::bind(&WChartTest::test_WDateTimeChartHours, this)));
    +  add(BOOST_TEST_CASE
    +      (boost::bind(&WChartTest::test_WDateTimeChartDays, this)));
    +  add(BOOST_TEST_CASE
    +      (boost::bind(&WChartTest::test_WDateTimeChartWeeks, this)));
    +  add(BOOST_TEST_CASE
    +      (boost::bind(&WChartTest::test_WDateTimeChartMonths, this)));
    +}
    diff --git a/wt-3.1.7a/test/chart/WChartTest.h b/wt-3.1.7a/test/chart/WChartTest.h
    new file mode 100644
    index 0000000..dde6781
    --- /dev/null
    +++ b/wt-3.1.7a/test/chart/WChartTest.h
    @@ -0,0 +1,36 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WCHART_TEST_H_
    +#define WCHART_TEST_H_
    +
    +namespace Wt {
    +  class WStandardItemModel;
    +}
    +
    +#include <Wt/Chart/WAxis>
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class WChartTest : public test_suite
    +{
    +  void plotTimeSeriesChart(Wt::WStandardItemModel* model, 
    +			   std::string fileName,
    +			   Wt::Chart::AxisScale xScale);
    +public:
    +  void test_WDateTimeChartMinutes();
    +  void test_WDateTimeChartHours();
    +  void test_WDateTimeChartDays();
    +  void test_WDateTimeChartWeeks();
    +  void test_WDateTimeChartMonths();
    +
    +  WChartTest();
    +};
    +
    +#endif // WCHART_TEST_H_
    diff --git a/wt-3.1.7a/test/dbo/DboTest.C b/wt-3.1.7a/test/dbo/DboTest.C
    new file mode 100644
    index 0000000..8ffc8cd
    --- /dev/null
    +++ b/wt-3.1.7a/test/dbo/DboTest.C
    @@ -0,0 +1,1060 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Postgres>
    +#include <Wt/Dbo/backend/Sqlite3>
    +#include <Wt/Dbo/FixedSqlConnectionPool>
    +#include <Wt/WDate>
    +#include <Wt/WDateTime>
    +#include <Wt/WTime>
    +#include <Wt/Dbo/WtSqlTraits>
    +#include <Wt/Dbo/ptr_tuple>
    +#include <Wt/Dbo/QueryModel>
    +
    +#include "DboTest.h"
    +
    +//#define SCHEMA "test."
    +#define SCHEMA ""
    +
    +namespace dbo = Wt::Dbo;
    +
    +class A;
    +class B;
    +class C;
    +class D;
    +
    +struct Coordinate {
    +  int x, y;
    +
    +  Coordinate()
    +    : x(-1), y(-1) { }
    +
    +  Coordinate(int an_x, int an_y)
    +    : x(an_x), y(an_y) { }
    +
    +  bool operator== (const Coordinate& other) const {
    +    return x == other.x && y == other.y;
    +  }
    +
    +  bool operator< (const Coordinate& other) const {
    +    if (x < other.x)
    +      return true;
    +    else if (x == other.x)
    +      return y < other.y;
    +    else
    +      return false;
    +  }
    +};
    +
    +std::ostream& operator<< (std::ostream& o, const Coordinate& c)
    +{
    +  return o << "(" << c.x << ", " << c.y << ")";
    +}
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +    template <class Action>
    +    void field(Action& action, Coordinate& coordinate, const std::string& name,
    +	       int size = -1)
    +    {
    +      field(action, coordinate.x, name + "_x");
    +      field(action, coordinate.y, name + "_y");
    +    }
    +  }
    +}
    +
    +namespace Wt {
    +  namespace Dbo {
    +
    +template<>
    +struct dbo_traits<D> : public dbo_default_traits
    +{
    +  typedef Coordinate IdType;
    +  static IdType invalidId() { return Coordinate(); }
    +  static const char *surrogateIdField() { return 0; }
    +  static const char *versionField() { return 0; }
    +};
    +
    +  }
    +}
    +
    +typedef dbo::collection<dbo::ptr<A> > As;
    +typedef dbo::collection<dbo::ptr<B> > Bs;
    +typedef dbo::collection<dbo::ptr<C> > Cs;
    +typedef dbo::collection<dbo::ptr<D> > Ds;
    +
    +class A : public dbo::Dbo<A> {
    +public:
    +  dbo::ptr<B> b;
    +  dbo::ptr<D> dthing;
    +  dbo::ptr<A> parent;
    +
    +  std::vector<unsigned char> binary;
    +  Wt::WDate date;
    +  Wt::WTime time;
    +  Wt::WDateTime datetime;
    +  Wt::WString wstring;
    +  std::string string;
    +  int i;
    +  float f;
    +  double d;
    +
    +  bool operator== (const A& other) const {
    +    if (binary.size() != other.binary.size())
    +      return false;
    +
    +    for (unsigned j = 0; j < binary.size(); ++j)
    +      if (binary[j] != other.binary[j])
    +	return false;
    +
    +    return date == other.date
    +      && time == other.time
    +      && datetime == other.datetime
    +      && wstring == other.wstring
    +      && string == other.string
    +      && i == other.i
    +      && b == other.b
    +      && f == other.f
    +      && d == other.d
    +      && dthing == other.dthing
    +      && parent == other.parent;
    +  }
    +
    +  As             asManyToOne;
    +
    +  template <class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, date, "date");
    +    dbo::field(a, time, "time");
    +    dbo::field(a, binary, "binary");
    +    dbo::field(a, datetime, "datetime");
    +    dbo::field(a, wstring, "wstring");
    +    dbo::field(a, string, "string", 50);
    +    dbo::field(a, i, "i");
    +    dbo::field(a, f, "f");
    +    dbo::field(a, d, "d");
    +
    +    dbo::belongsTo(a, b, "b");
    +    dbo::belongsTo(a, dthing, "d");
    +
    +    dbo::belongsTo(a, parent, "a_parent");
    +    dbo::hasMany(a, asManyToOne, dbo::ManyToOne, "a_parent");
    +  }
    +};
    +
    +class B {
    +public:
    +  enum State {
    +    State1 = 0,
    +    State2 = 1
    +  };
    +
    +  std::string name;
    +  State state;
    +
    +  As    asManyToOne;
    +  Cs    csManyToMany;
    +
    +  B() { }
    +
    +  B(const std::string& aName, State aState)
    +    : name(aName), state(aState)
    +  { }
    +
    +  bool operator== (const B& other) const {
    +    return name == other.name
    +      && state == other.state;
    +  }
    +
    +  template <class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, state, "state");
    +    dbo::field(a, name, "name");
    +
    +    dbo::hasMany(a, asManyToOne, dbo::ManyToOne, "b");
    +    dbo::hasMany(a, csManyToMany, dbo::ManyToMany, SCHEMA "b_c", "the_b");
    +  }
    +};
    +
    +class C {
    +public:
    +  std::string name;
    +  
    +  Bs    bsManyToMany;
    +  Ds    dsManyToMany;
    +
    +  C() { }
    +
    +  C(const std::string& aName)
    +    : name(aName)
    +  { }
    +
    +  bool operator== (const C& other) const {
    +    return name == other.name;
    +  }
    +
    +  template <class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name, "name");
    +
    +    dbo::hasMany(a, bsManyToMany, dbo::ManyToMany, SCHEMA "b_c", "the_c");
    +    dbo::hasMany(a, dsManyToMany, dbo::ManyToMany, SCHEMA "c_d");
    +  }
    +};
    +
    +class D {
    +public:
    +  Coordinate id;
    +  std::string name;
    +
    +  As    asManyToOne;
    +  Cs    csManyToMany;
    +
    +  D() { }
    +  D(const Coordinate& anId, const std::string& aName)
    +    : id(anId),
    +      name(aName)
    +  { }
    +
    +  template <class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::id(a, id, "id");
    +    dbo::field(a, name, "name");
    +
    +    dbo::hasMany(a, asManyToOne, dbo::ManyToOne, "d");
    +    dbo::hasMany(a, csManyToMany, dbo::ManyToMany, SCHEMA "c_d");
    +  }
    +};
    +
    +void DboTest::setup()
    +{
    +  dbo::SqlConnection *connection;
    +
    +#ifdef SQLITE3
    +  dbo::backend::Sqlite3 *sqlite3 = new dbo::backend::Sqlite3(":memory:");
    +  sqlite3->setDateTimeStorage(dbo::SqlDate,
    +  			      dbo::backend::Sqlite3::JulianDaysAsReal);
    +  connection = sqlite3;
    +#endif // SQLITE3
    +
    +#ifdef POSTGRES
    +  connection = new dbo::backend::Postgres
    +   ("host=127.0.0.1 user=test password=test port=5432 dbname=test");
    +#endif // POSTGRES
    +
    +  connection->setProperty("show-queries", "true");
    +
    +  connectionPool_ = new dbo::FixedSqlConnectionPool(connection, 5);
    +
    +  session_ = new dbo::Session();
    +  session_->setConnectionPool(*connectionPool_);
    +
    +  session_->mapClass<A>(SCHEMA "table_a");
    +  session_->mapClass<B>(SCHEMA "table_b");
    +  session_->mapClass<C>(SCHEMA "table_c");
    +  session_->mapClass<D>(SCHEMA "table_d");
    +
    +  session_->createTables();
    +
    +  Wt::registerType<Coordinate>();
    +}
    +
    +void DboTest::teardown()
    +{
    +  session_->dropTables();
    +
    +  delete session_;
    +  delete connectionPool_;
    +}
    +
    +void DboTest::test1()
    +{
    +  setup();
    +
    +  try {
    +    A a1;
    +    a1.datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1), Wt::WTime(12, 11, 31));
    +    for (unsigned i = 0; i < 255; ++i)
    +      a1.binary.push_back(i);
    +    a1.date = Wt::WDate(1976, 6, 14);
    +    a1.time = Wt::WTime(13, 14, 15, 102);
    +    a1.wstring = "Hello";
    +    a1.string = "There";
    +    a1.i = 42;
    +    a1.f = (float)42.42;
    +    a1.d = 42.424242;
    +
    +    /* Create an A, check that it is found during the same transaction  */
    +    {
    +      dbo::Transaction t(*session_);
    +      dbo::ptr<A> ptrA = session_->add(new A(a1));
    +
    +      BOOST_REQUIRE(ptrA->session() == session_);
    +
    +      As allAs = session_->find<A>();
    +      BOOST_REQUIRE(allAs.size() == 1);
    +      dbo::ptr<A> a2 = *allAs.begin();
    +      BOOST_REQUIRE(*a2 == a1);
    +
    +      t.commit();
    +
    +    }
    +
    +    /* Check that A is found during other transaction */
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      As allAs = session_->find<A>();
    +      BOOST_REQUIRE(allAs.size() == 1);
    +      dbo::ptr<A> a2 = *allAs.begin();
    +      BOOST_REQUIRE(*a2 == a1);
    +
    +      t.commit();
    +    }
    +
    +    /* Remove the A, check it is no longer found during the same transaction */
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      {
    +	As allAs = session_->find<A>();
    +	BOOST_REQUIRE(allAs.size() == 1);
    +	dbo::ptr<A> a2 = *allAs.begin();
    +
    +	a2.remove();
    +      }
    +
    +      {
    +	As allAs = session_->find<A>();
    +	BOOST_REQUIRE(allAs.size() == 0);
    +      }
    +
    +      t.commit();
    +    }
    +
    +    /* Check it is no longer found during other transaction */
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      As allAs = session_->find<A>();
    +      BOOST_REQUIRE(allAs.size() == 0);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test2()
    +{
    +  setup();
    +
    +  try {
    +    A a1;
    +    a1.datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1), Wt::WTime(12, 11, 31));
    +    a1.date = Wt::WDate(1980, 12, 4);
    +    a1.time = Wt::WTime(12, 13, 14, 123);
    +    a1.wstring = "Hello";
    +    a1.string = "There";
    +    a1.i = 42;
    +    a1.f = (float)42.42;
    +    a1.d = 42.424242;
    +
    +    B b1;
    +    b1.name = "b1";
    +    b1.state = B::State1;
    +
    +    /* Create an A + B  */
    +    {
    +      dbo::Transaction t(*session_);
    +      a1.b = session_->add(new B(b1));
    +      dbo::ptr<A> a = session_->add(new A(a1));
    +
    +      As allAs = session_->find<A>();
    +      BOOST_REQUIRE(allAs.size() == 1);
    +      dbo::ptr<A> a2 = *allAs.begin();
    +      BOOST_REQUIRE(*a2 == a1);
    +
    +      t.commit();
    +    }
    +
    +    /* Check that A + B are found in other transaction */
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      As allAs = session_->find<A>();
    +      BOOST_REQUIRE(allAs.size() == 1);
    +      dbo::ptr<A> a2 = *allAs.begin();
    +      BOOST_REQUIRE(*a2 == a1);
    +      BOOST_REQUIRE(*a2->b == b1);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test3()
    +{
    +  setup();
    +
    +  try {
    +    /* Create B's many-to-many C's  */
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<B> b1 = session_->add(new B("b1", B::State1));
    +      dbo::ptr<B> b2 = session_->add(new B("b2", B::State2));
    +      dbo::ptr<B> b3 = session_->add(new B("b3", B::State1));
    +
    +      dbo::ptr<C> c1 = session_->add(new C("c1"));
    +      dbo::ptr<C> c2 = session_->add(new C("c2"));
    +      dbo::ptr<C> c3 = session_->add(new C("c3"));
    +
    +      b1.modify()->csManyToMany.insert(c1);
    +
    +      BOOST_REQUIRE(b1->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->bsManyToMany.size() == 1);
    +
    +      b1.modify()->csManyToMany.insert(c2);
    +
    +      BOOST_REQUIRE(b1->csManyToMany.size() == 2);
    +      BOOST_REQUIRE(c1->bsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->bsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c3->bsManyToMany.size() == 0);
    +
    +      b1.modify()->csManyToMany.erase(c2);
    +
    +      BOOST_REQUIRE(b1->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->bsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->bsManyToMany.size() == 0);
    +      BOOST_REQUIRE(c3->bsManyToMany.size() == 0);
    +
    +      b1.modify()->csManyToMany.insert(c2);
    +      b1.modify()->csManyToMany.erase(c2);
    +
    +      BOOST_REQUIRE(b1->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->bsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->bsManyToMany.size() == 0);
    +      BOOST_REQUIRE(c3->bsManyToMany.size() == 0);
    +
    +      t.commit();
    +    }
    +
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<B> b1 = session_->query< dbo::ptr<B> >
    +	("select distinct B from table_b B ").where("B.name = ?").bind("b1");
    +
    +      std::size_t count = session_->query< dbo::ptr<B> >
    +	("select distinct B from table_b B ").where("B.name = ?").bind("b1")
    +	.resultList().size();
    +
    +      dbo::ptr<C> c1 = session_->find<C>().where("name = ?").bind("c1");
    +
    +      BOOST_REQUIRE(count == 1);
    +      BOOST_REQUIRE(b1->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->bsManyToMany.size() == 1);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test4()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a1(new A());
    +      a1.modify()->datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1),
    +					    Wt::WTime(12, 11, 31));
    +      a1.modify()->date = Wt::WDate(1980, 12, 4);
    +      a1.modify()->wstring = "Hello";
    +      a1.modify()->string = "There";
    +      a1.modify()->i = 42;
    +      a1.modify()->f = (float)42.42;
    +      a1.modify()->d = 42.424242;
    +
    +      dbo::ptr<A> a2(new A(*a1));
    +      a2.modify()->wstring = "Oh my god";
    +      a2.modify()->i = 142;
    +
    +      dbo::ptr<B> b(new B());
    +      b.modify()->name = "b";
    +      b.modify()->state = B::State1;
    +
    +      a1.modify()->b = b;
    +      a2.modify()->b = b;
    +
    +      session_->add(a1);
    +      session_->add(a2);
    +      session_->add(b);
    +
    +      typedef dbo::ptr_tuple<B, A>::type BA;
    +      typedef dbo::collection<BA> BAs;
    +
    +      BAs bas = session_->query<BA>
    +	("select B, A from table_b B join table_a A on A.b_id = B.id")
    +	.orderBy("A.i");
    +
    +      BOOST_REQUIRE(bas.size() == 2);
    +
    +      int ii = 0;
    +      for (BAs::const_iterator i = bas.begin(); i != bas.end(); ++i) {
    +	dbo::ptr<A> a_result;
    +	dbo::ptr<B> b_result;
    +	boost::tie(b_result, a_result) = *i;
    +
    +	if (ii == 0) {
    +	  BOOST_REQUIRE(a_result == a1);
    +	  BOOST_REQUIRE(b_result == b);
    +	} else if (ii == 1) {
    +	  BOOST_REQUIRE(a_result == a2);
    +	  BOOST_REQUIRE(b_result == b);
    +	}
    +
    +	++ii;
    +      }
    +
    +      BOOST_REQUIRE(ii == 2);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test5()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a1(new A());
    +      a1.modify()->datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1),
    +					    Wt::WTime(12, 11, 31));
    +      a1.modify()->date = Wt::WDate(1976, 11, 1);
    +      a1.modify()->wstring = "Hello";
    +      a1.modify()->string = "There";
    +      a1.modify()->i = 42;
    +      a1.modify()->f = (float)42.42;
    +      a1.modify()->d = 42.424242;
    +
    +      dbo::ptr<A> a2(new A(*a1));
    +      a2.modify()->wstring = "Oh my god";
    +      a2.modify()->i = 142;
    +
    +      dbo::ptr<B> b(new B());
    +      b.modify()->name = "b";
    +      b.modify()->state = B::State1;
    +
    +      a1.modify()->b = b;
    +      a2.modify()->b = b;
    +
    +      session_->add(a1);
    +      session_->add(a2);
    +      session_->add(b);
    +
    +      session_->flush();
    +
    +      t.rollback();
    +
    +      a1.remove();
    +      a2.remove();
    +      b.remove();
    +    }
    +
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test6()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a1(new A());
    +      a1.modify()->datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1),
    +					    Wt::WTime(12, 11, 31));
    +      a1.modify()->date = Wt::WDate(1980, 1, 1);
    +      a1.modify()->wstring = "Hello";
    +      a1.modify()->string = "There";
    +      a1.modify()->i = 42;
    +      a1.modify()->f = (float)42.42;
    +      a1.modify()->d = 42.424242;
    +
    +      session_->add(a1);
    +
    +      t.commit();
    +    }
    +
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a1 = session_->find<A>();
    +      a1.modify()->i = 41;
    +      a1.flush();
    +      t.rollback();
    +
    +      session_->rereadAll();
    +
    +      dbo::Transaction t2(*session_);
    +
    +      dbo::ptr<A> a2 = session_->find<A>();
    +
    +      BOOST_REQUIRE(a1 == a2);
    +      BOOST_REQUIRE(a1->i == 42);
    +
    +      t2.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test7()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      std::string result = session_->query<std::string>("select 'dima '' ? '");
    +      BOOST_REQUIRE(result == "dima ' ? ");
    +
    +      t.commit();
    +    }
    +
    +    int aId = -1;
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a1(new A());
    +      a1.modify()->datetime = Wt::WDateTime(Wt::WDate(2009, 10, 1),
    +					    Wt::WTime(12, 11, 31));
    +      a1.modify()->date = Wt::WDate(1980, 1, 1);
    +      a1.modify()->wstring = "Hello";
    +      a1.modify()->string = "There";
    +      a1.modify()->i = 42;
    +      a1.modify()->f = (float)42.42;
    +      a1.modify()->d = 42.424242;
    +
    +      session_->add(a1);
    +      a1.flush();
    +
    +      aId = (int)a1.id();
    +
    +      t.commit();
    +    }
    +
    +    {
    +      dbo::Transaction t(*session_);
    +      int id1, id2;
    +
    +      boost::tie(id1, id2) = session_->query<boost::tuple<int, int> >
    +	("select id, id from table_a").resultValue();
    +
    +      BOOST_REQUIRE(id1 == aId);
    +      BOOST_REQUIRE(id2 == aId);
    +
    +#ifdef POSTGRES
    +      dbo::ptr<A> a;
    +      int id;
    +      boost::tie(a, id) = session_->query<boost::tuple<dbo::ptr<A>, int> >
    +	("select (a), a.id from table_a a").resultValue();
    +
    +      BOOST_REQUIRE(id == aId);
    +      BOOST_REQUIRE(a.id() == aId);
    +#endif
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test8()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      session_->execute("delete from table_a");
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test9()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<A> a(new A());
    +
    +      typedef dbo::query_result_traits< dbo::ptr<A> > A_traits;
    +
    +      std::vector<boost::any> values;
    +      A_traits::getValues(a, values);
    +
    +      std::cerr << values.size() << std::endl;
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test10()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<D> d(new D());
    +
    +      BOOST_REQUIRE(Wt::asString(boost::any(Coordinate(10, 4)))
    +		    == "(10, 4)");
    +
    +      d.modify()->id = Coordinate(42, 43);
    +      d.modify()->name = "Object @ (42, 43)";
    +
    +      session_->add(d);
    +
    +      t.commit();
    +
    +      // No transaction, but should just fetch it from the session.
    +      // This checks that saving the dbo sets the id properly
    +      BOOST_REQUIRE(session_->load<D>(Coordinate(42, 43)) == d);
    +    }
    +
    +    {
    +      dbo::Transaction t2(*session_);
    +
    +      try {
    +	session_->load<D>(Coordinate(10, 11));
    +	BOOST_REQUIRE(false); // Expected an exception
    +      } catch (const dbo::ObjectNotFoundException&) {
    +      }
    +
    +      dbo::ptr<D> d2 = session_->load<D>(Coordinate(42, 43));
    + 
    +      BOOST_REQUIRE(d2 && d2.id() == Coordinate(42, 43));
    +     
    +      dbo::ptr<C> c1 = session_->add(new C("c1"));
    +      dbo::ptr<C> c2 = session_->add(new C("c2"));
    +      dbo::ptr<C> c3 = session_->add(new C("c3"));
    +
    +      d2.modify()->csManyToMany.insert(c1);
    +
    +      BOOST_REQUIRE(d2->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->dsManyToMany.size() == 1);
    +
    +      d2.modify()->csManyToMany.insert(c2);
    +
    +      BOOST_REQUIRE(d2->csManyToMany.size() == 2);
    +      BOOST_REQUIRE(c1->dsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->dsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c3->dsManyToMany.size() == 0);
    +
    +      d2.modify()->csManyToMany.erase(c2);
    +
    +      BOOST_REQUIRE(d2->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->dsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->dsManyToMany.size() == 0);
    +      BOOST_REQUIRE(c3->dsManyToMany.size() == 0);
    +
    +      d2.modify()->csManyToMany.insert(c2);
    +      d2.modify()->csManyToMany.erase(c2);
    +
    +      BOOST_REQUIRE(d2->csManyToMany.size() == 1);
    +      BOOST_REQUIRE(c1->dsManyToMany.size() == 1);
    +      BOOST_REQUIRE(c2->dsManyToMany.size() == 0);
    +      BOOST_REQUIRE(c3->dsManyToMany.size() == 0);
    +
    +      t2.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test11()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      session_->add(new C("c1"));
    +
    +      dbo::Query< dbo::ptr<C> > query = session_->find<C>();
    +      dbo::QueryModel< dbo::ptr<C> > *model
    +	= new dbo::QueryModel< dbo::ptr<C> >();
    +
    +      model->setQuery(query);
    +
    +      t.commit();
    +
    +      boost::any d;
    +
    +      model->addAllFieldsAsColumns();
    +
    +      BOOST_REQUIRE(model->columnCount() == 3);
    +      BOOST_REQUIRE(model->rowCount() == 1);
    +
    +      BOOST_REQUIRE(Wt::asString(model->headerData(0)) == "id");
    +      BOOST_REQUIRE(Wt::asString(model->headerData(1)) == "version");
    +      BOOST_REQUIRE(Wt::asString(model->headerData(2)) == "name");
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "c1");
    +
    +      model->setData(0, 2, std::string("changed"));
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "changed");
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "changed");
    +
    +      {
    +	dbo::Transaction t2(*session_);
    +	dbo::ptr<C> c = session_->find<C>();
    +	BOOST_REQUIRE(c->name == "changed");
    +	t2.commit();
    +      }
    +
    +      model->insertRow(1);
    +      model->setData(1, 2, std::string("new C"));
    +
    +      {
    +	dbo::Transaction t2(*session_);
    +	BOOST_REQUIRE(session_->find<C>().resultList().size() == 2);
    +	t2.commit();
    +      }
    +
    +      model->removeRows(0, 2);
    +
    +      {
    +	dbo::Transaction t2(*session_);
    +	BOOST_REQUIRE(session_->find<C>().resultList().size() == 0);
    +	t2.commit();
    +      }
    +
    +      delete model;
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test12()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      session_->add(new D(Coordinate(5, 6), "yes"));
    +      dbo::ptr<D> d1 = session_->find<D>();
    +
    +      BOOST_REQUIRE(d1->name == "yes");
    +      BOOST_REQUIRE(d1->id == Coordinate(5, 6));
    +
    +      session_->add(new C("c1"));
    +
    +      dbo::Query< dbo::ptr<C> > query = session_->find<C>();
    +      dbo::QueryModel< dbo::ptr<C> > *model
    +	= new dbo::QueryModel< dbo::ptr<C> >();
    +
    +      model->setQuery(query);
    +
    +      boost::any d;
    +
    +      model->addAllFieldsAsColumns();
    +
    +      BOOST_REQUIRE(model->columnCount() == 3);
    +      BOOST_REQUIRE(model->rowCount() == 1);
    +
    +      BOOST_REQUIRE(Wt::asString(model->headerData(0)) == "id");
    +      BOOST_REQUIRE(Wt::asString(model->headerData(1)) == "version");
    +      BOOST_REQUIRE(Wt::asString(model->headerData(2)) == "name");
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "c1");
    +
    +      model->setData(0, 2, std::string("changed"));
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "changed");
    +
    +      {
    +	dbo::ptr<C> c = session_->find<C>();
    +	BOOST_REQUIRE(c->name == "changed");
    +      }
    +
    +      model->insertRow(1);
    +      model->setData(1, 2, std::string("new C"));
    +
    +      BOOST_REQUIRE(session_->find<C>().resultList().size() == 2);
    +
    +      model->removeRow(0);
    +
    +      BOOST_REQUIRE(model->rowCount() == 1);
    +
    +      model->setData(0, 2, std::string("changed again"));
    +
    +      BOOST_REQUIRE(Wt::asString(model->data(0, 2)) == "changed again");
    +
    +      BOOST_REQUIRE(session_->find<C>().resultList().size() == 1);
    +
    +      {
    +	dbo::ptr<C> c = session_->find<C>();
    +	BOOST_REQUIRE(c->name == "changed again");
    +      }
    +
    +      t.commit();
    +
    +      delete model;
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +void DboTest::test13()
    +{
    +  setup();
    +
    +  try {
    +    {
    +      dbo::Transaction t(*session_);
    +
    +      dbo::ptr<B> b1 = session_->add(new B("b1", B::State1));
    +      dbo::ptr<B> b2 = session_->add(new B("b2", B::State2));
    +      dbo::ptr<B> b3 = session_->add(new B("b3", B::State1));
    +
    +
    +      {
    +	dbo::collection<dbo::ptr<B> > c = session_->query< dbo::ptr<B> >
    +	  ("select B from table_b B ")
    +	  .where("B.state = ?").orderBy("B.name")
    +	  .limit(1).bind(0);
    +
    +	BOOST_REQUIRE(c.size() == 1);
    +      }
    +
    +      dbo::ptr<B> d = session_->query< dbo::ptr<B> >
    +	("select B from table_b B ")
    +	.where("B.state = ?").orderBy("B.name")
    +	.limit(1).bind(0);
    +
    +      BOOST_REQUIRE(d == b1 || d == b3);
    +
    +      t.commit();
    +    }
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +DboTest::DboTest()
    +  : test_suite("dbotest_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test1, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test2, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test3, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test4, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test5, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test6, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test7, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test8, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test9, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test10, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test11, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test12, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest::test13, this)));
    +}
    diff --git a/wt-3.1.7a/test/dbo/DboTest.h b/wt-3.1.7a/test/dbo/DboTest.h
    new file mode 100644
    index 0000000..f799d3a
    --- /dev/null
    +++ b/wt-3.1.7a/test/dbo/DboTest.h
    @@ -0,0 +1,51 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef DBO_TEST_H
    +#define DBO_TEST_H
    +
    +#include <boost/test/unit_test.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    class SqlConnectionPool;
    +    class Session;
    +  }
    +}
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class DboTest : public test_suite
    +{
    +public:
    +  DboTest();
    +
    +private:
    +  Wt::Dbo::SqlConnectionPool *connectionPool_;
    +  Wt::Dbo::Session *session_;
    +
    +  void setup();
    +  void teardown();
    +
    +  void testQueryParser();
    +  void test1();
    +  void test2();
    +  void test3();
    +  void test4();
    +  void test5();
    +  void test6();
    +  void test7();
    +  void test8();
    +  void test9();
    +  void test10();
    +  void test11();
    +  void test12();
    +  void test13();
    +};
    +
    +#endif // DBO_TEST_H
    diff --git a/wt-3.1.7a/test/dbo/DboTest2.C b/wt-3.1.7a/test/dbo/DboTest2.C
    new file mode 100644
    index 0000000..f626e23
    --- /dev/null
    +++ b/wt-3.1.7a/test/dbo/DboTest2.C
    @@ -0,0 +1,215 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include <Wt/Dbo/Dbo>
    +#include <Wt/Dbo/backend/Postgres>
    +#include <Wt/Dbo/backend/Sqlite3>
    +#include <Wt/WDate>
    +#include <Wt/WDateTime>
    +#include <Wt/WTime>
    +#include <Wt/Dbo/WtSqlTraits>
    +#include <Wt/Dbo/ptr_tuple>
    +
    +#include "DboTest2.h"
    +
    +namespace dbo = Wt::Dbo;
    +
    +class Post;
    +typedef dbo::collection< dbo::ptr<Post> > Posts;
    +
    +class User {
    +public:
    +  enum Role {
    +    Visitor = 0,
    +    Admin = 1,
    +    Alien = 42
    +  };
    +
    +  std::string name;
    +  std::string password;
    +  Role        role;
    +  int         karma;
    +
    +  Posts       posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name,     "name");
    +    dbo::field(a, password, "password");
    +    dbo::field(a, role,     "role");
    +    dbo::field(a, karma,    "karma");
    +
    +    dbo::hasMany(a, posts, dbo::ManyToOne, "user");
    +  }
    +};
    +
    +class Tag;
    +
    +class Post {
    +public:
    +  std::string title;
    +  std::string contents;
    +
    +  dbo::ptr<User> user;
    +
    +  dbo::collection< dbo::ptr<Tag> > tags;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, title, "title");
    +    dbo::field(a, contents, "contents");
    +
    +    dbo::belongsTo(a, user, "user");
    +    dbo::hasMany(a, tags, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +class Tag {
    +public:
    +  std::string name;
    +
    +  dbo::collection< dbo::ptr<Post> > posts;
    +
    +  template<class Action>
    +  void persist(Action& a)
    +  {
    +    dbo::field(a, name, "name");
    +
    +    dbo::hasMany(a, posts, dbo::ManyToMany, "post_tags");
    +  }
    +};
    +
    +void DboTest2::setup()
    +{
    +#ifdef SQLITE3
    +  connection_ = new dbo::backend::Sqlite3(":memory:");
    +#endif // SQLITE3
    +
    +#ifdef POSTGRES
    +  connection_ = new dbo::backend::Postgres
    +    ("host=127.0.0.1 user=test password=test port=5432 dbname=test");
    +#endif // POSTGRES
    +
    +  connection_->setProperty("show-queries", "true");
    +
    +  session_ = new dbo::Session();
    +  session_->setConnection(*connection_);
    +
    +  session_->mapClass<User>("user");
    +  session_->mapClass<Post>("post");
    +  session_->mapClass<Tag>("tag");
    +
    +  session_->createTables();
    +}
    +
    +void DboTest2::teardown()
    +{
    +  session_->dropTables();
    +
    +  delete session_;
    +  delete connection_;
    +}
    +
    +void DboTest2::test1()
    +{
    +  setup();
    +  dbo::Session& session = *session_;
    +
    +  try {
    +    dbo::Transaction transaction(session);
    +
    +    User *user = new User();
    +    user->name = "Joe";
    +    user->password = "Secret";
    +    user->role = User::Visitor;
    +    user->karma = 13;
    +
    +    dbo::ptr<User> userPtr = session.add(user);
    +
    +    User *user2 = new User();
    +    user2->name = "Daisy";
    +    user2->password = "Secret2";
    +    user2->role = User::Visitor;
    +    user2->karma = 12;
    +
    +    session.add(user2);
    +
    +    // simple queries: session.find()
    +    dbo::ptr<User> joe = session.find<User>("where name = ?").bind("Joe");
    +    std::cerr << "Joe has karma: " << joe->karma << std::endl;
    +
    +    // any queries: session.query()
    +    dbo::ptr<User> joe2 = session.query< dbo::ptr<User> >
    +      ("select u from \"user\" u where name = ?").bind("Joe");
    +    std::cerr << "Indeed, Joe has karma: " << joe2->karma << std::endl;
    +
    +    std::cerr << "Joe == Joe: " << (joe == joe2) << std::endl;
    +
    +    // session.query() can return anything
    +    int count = session.query<int>
    +      ("select count(*) from \"user\" where name = ?").bind("Joe");
    +    std::cerr << "There is only " << count << " Joe." << std::endl;
    +
    +    BOOST_REQUIRE(count == 1);
    +
    +    // session.query() and session.find() can return a collection
    +    typedef dbo::collection< dbo::ptr<User> > Users;
    +
    +    Users users = session.find<User>();
    +    std::cerr << "We have " << users.size() << " users:" << std::endl;
    +    for (Users::const_iterator i = users.begin(); i != users.end(); ++i)
    +      std::cerr << " user " << (*i)->name
    +		<< " with karma of " << (*i)->karma << std::endl;
    +
    +    joe = session.find<User>("where name = ?").bind("Joe");    
    +    joe.modify()->karma++;
    +    joe.modify()->password = "public";
    +
    +    dbo::ptr<User> silly = session.add(new User());
    +    silly.remove();
    +
    +    dbo::ptr<Post> post = session.add(new Post());
    +    post.modify()->user = joe;
    +
    +#if 0
    +    {
    +      dbo::ptr<Post> p;
    +      std::string msg;
    +
    +      boost::tie(p, msg)
    +        = session.query<boost::tuple<dbo::ptr<Post>, std::string> >
    +        ("SELECT (doc), msg FROM db_function('Howdy!')").resultValue();
    +    }
    +#endif
    +
    +    std::cerr << "Joe has " << joe->posts.size() << " posts." << std::endl;
    +
    +    dbo::ptr<Tag> cooking = session.add(new Tag());
    +    cooking.modify()->name = "Cooking";
    +
    +    post.modify()->tags.insert(cooking);
    +    std::cerr << cooking->posts.size() << " post(s) tagged with Cooking."
    +	      << std::endl;
    +
    +    transaction.commit();
    +
    +    teardown();
    +  } catch (std::exception&) {
    +    teardown();
    +    throw;
    +  }
    +}
    +
    +DboTest2::DboTest2()
    +  : test_suite("dbotest2_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&DboTest2::test1, this)));
    +}
    diff --git a/wt-3.1.7a/test/dbo/DboTest2.h b/wt-3.1.7a/test/dbo/DboTest2.h
    new file mode 100644
    index 0000000..cede275
    --- /dev/null
    +++ b/wt-3.1.7a/test/dbo/DboTest2.h
    @@ -0,0 +1,37 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef DBO_TEST2_H
    +#define DBO_TEST2_H
    +
    +#include <boost/test/unit_test.hpp>
    +
    +namespace Wt {
    +  namespace Dbo {
    +    class SqlConnection;
    +    class Session;
    +  }
    +}
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class DboTest2 : public test_suite
    +{
    +private:
    +  Wt::Dbo::SqlConnection *connection_;
    +  Wt::Dbo::Session *session_;
    +
    +  void setup();
    +  void teardown();
    +
    +public:
    +  void test1();
    +
    +  DboTest2();
    +};
    +
    +#endif // DBO_TEST2_H
    diff --git a/wt-3.1.7a/test/models/WBatchEditProxyModelTest.C b/wt-3.1.7a/test/models/WBatchEditProxyModelTest.C
    new file mode 100644
    index 0000000..de37c23
    --- /dev/null
    +++ b/wt-3.1.7a/test/models/WBatchEditProxyModelTest.C
    @@ -0,0 +1,226 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include <Wt/WStandardItemModel>
    +#include <Wt/WStandardItem>
    +#include <Wt/WBatchEditProxyModel>
    +
    +#include "WBatchEditProxyModelTest.h"
    +
    +using namespace Wt;
    +
    +namespace {
    +  std::string d(WAbstractItemModel *model, int row, int column,
    +		const WModelIndex& parent = WModelIndex())
    +  {
    +    return boost::any_cast<std::string>
    +      (model->data(row, column, DisplayRole, parent));
    +  }
    +}
    +
    +
    +void WBatchEditProxyModelTest::test()
    +{
    +  setup();
    +
    +  WAbstractItemModel *sm = sourceModel_;
    +  WAbstractItemModel *pm = proxyModel_;
    +
    +  BOOST_REQUIRE(sm->columnCount() == 4);
    +  BOOST_REQUIRE(pm->columnCount() == 4);
    +
    +  BOOST_REQUIRE(sm->rowCount() == 0);
    +  BOOST_REQUIRE(pm->rowCount() == 0);
    +
    +  pm->insertRows(0, 2);
    +
    +  BOOST_REQUIRE(modelEvents_[SourceModel].size() == 0);
    +  BOOST_REQUIRE(modelEvents_[ProxyModel].size() == 1);
    +
    +  BOOST_REQUIRE(sm->rowCount() == 0);
    +  BOOST_REQUIRE(pm->rowCount() == 2);
    +
    +  clearEvents();
    +
    +  BOOST_REQUIRE(d(pm, 0, 0) == "New column 0");
    +  BOOST_REQUIRE(d(pm, 0, 1) == "New column 1");
    +  BOOST_REQUIRE(d(pm, 0, 2) == "New column 2");
    +  BOOST_REQUIRE(d(pm, 0, 3) == "New column 3");
    +
    +  pm->setData(1, 0, std::string("Column 0"), DisplayRole);
    +  pm->setData(1, 1, std::string("Column 1"), DisplayRole);
    +  pm->setData(1, 2, std::string("Column 2"), DisplayRole);
    +  pm->setData(1, 3, std::string("Column 3"), DisplayRole);
    +
    +  BOOST_REQUIRE(d(pm, 1, 0) == "Column 0");
    +  BOOST_REQUIRE(d(pm, 1, 1) == "Column 1");
    +  BOOST_REQUIRE(d(pm, 1, 2) == "Column 2");
    +  BOOST_REQUIRE(d(pm, 1, 3) == "Column 3");
    +
    +  pm->removeRow(1);
    +
    +  BOOST_REQUIRE(modelEvents_[SourceModel].size() == 0);
    +  BOOST_REQUIRE(modelEvents_[ProxyModel].size() == 1);
    +
    +  BOOST_REQUIRE(sm->rowCount() == 0);
    +  BOOST_REQUIRE(pm->rowCount() == 1);
    +
    +  clearEvents();
    +
    +  proxyModel_->commitAll();
    +
    +  BOOST_REQUIRE(modelEvents_[SourceModel].size() == 1);
    +  BOOST_REQUIRE(modelEvents_[ProxyModel].size() == 0);
    +
    +  BOOST_REQUIRE(sm->rowCount() == 1);
    +  BOOST_REQUIRE(pm->rowCount() == 1);
    +
    +  clearEvents();
    +
    +  sm->insertRows(1, 3);
    +
    +  BOOST_REQUIRE(modelEvents_[SourceModel].size() == 1);
    +  BOOST_REQUIRE(modelEvents_[ProxyModel].size() == 3);
    +
    +  BOOST_REQUIRE(sm->rowCount() == 4);
    +  BOOST_REQUIRE(pm->rowCount() == 4);
    +
    +  clearEvents();
    +
    +  pm->removeRow(2);
    +  pm->removeRow(1);
    +
    +  BOOST_REQUIRE(pm->rowCount() == 2);
    +
    +  BOOST_REQUIRE(modelEvents_[SourceModel].size() == 0);
    +  BOOST_REQUIRE(modelEvents_[ProxyModel].size() == 2);
    +
    +  clearEvents();
    +
    +  pm->setData(1, 0, std::string("sm(1, 0)"), EditRole);
    +  BOOST_REQUIRE(d(pm, 1, 0) == "sm(1, 0)");
    +
    +  proxyModel_->commitAll();
    +
    +  BOOST_REQUIRE(sm->rowCount() == 2);
    +
    +  BOOST_REQUIRE(d(pm, 1, 0) == "sm(1, 0)");
    +  BOOST_REQUIRE(d(sm, 1, 0) == "sm(1, 0)");
    +
    +  WModelIndex p = pm->index(1, 0);
    +  pm->insertColumns(0, 4, p);
    +  BOOST_REQUIRE(pm->columnCount(p) == 4);
    +  pm->insertRow(0, p);
    +  BOOST_REQUIRE(pm->rowCount(p) == 1);
    +
    +  proxyModel_->commitAll();
    +
    +  BOOST_REQUIRE(sm->rowCount(sm->index(1, 0)) == 1);
    +  BOOST_REQUIRE(sm->columnCount(sm->index(1, 0)) == 4);
    +
    +  teardown();
    +}
    +
    +void WBatchEditProxyModelTest::setup()
    +{
    +  sourceModel_ = new WStandardItemModel(0, 4);
    +  proxyModel_ = new WBatchEditProxyModel();
    +  proxyModel_->setSourceModel(sourceModel_);
    +
    +  proxyModel_->setNewRowData(0, std::string("New column 0"));
    +  proxyModel_->setNewRowData(1, std::string("New column 1"));
    +  proxyModel_->setNewRowData(2, std::string("New column 2"));
    +  proxyModel_->setNewRowData(3, std::string("New column 3"));
    +
    +  connectEvents(sourceModel_, SourceModel);
    +  connectEvents(proxyModel_, ProxyModel);
    +}
    +
    +void WBatchEditProxyModelTest::connectEvents(WAbstractItemModel *model,
    +					     ModelType modelType)
    +{
    +  typedef WBatchEditProxyModelTest This;
    +
    +  model->rowsAboutToBeInserted().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, RowsInserted, false));
    +  model->rowsInserted().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, RowsInserted, true));
    +
    +  model->rowsAboutToBeRemoved().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, RowsRemoved, false));
    +  model->rowsRemoved().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, RowsRemoved, true));
    +
    +  model->columnsAboutToBeInserted().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, ColumnsInserted, false));
    +  model->columnsInserted().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, ColumnsInserted, true));
    +
    +  model->columnsAboutToBeRemoved().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, ColumnsRemoved, false));
    +  model->columnsRemoved().connect
    +    (boost::bind(&This::geometryChanged, this, _1, _2, _3,
    +		 modelType, ColumnsRemoved, true));
    +}
    +
    +void WBatchEditProxyModelTest::clearEvents()
    +{
    +  modelEvents_[0].clear();
    +  modelEvents_[1].clear();
    +}
    +
    +void WBatchEditProxyModelTest::geometryChanged(const WModelIndex& parent,
    +					       int start, int end,
    +					       ModelType model, EventType type,
    +					       bool ended)
    +{
    +  if (!ended) {
    +    ModelEvent event;
    +    event.index = parent;
    +    event.start = start;
    +    event.end = end;
    +    event.type = type;
    +    event.ended = false;
    +
    +    modelEvents_[model].push_back(event);
    +  } else {
    +    for (int i = (int)(modelEvents_[model].size()) - 1; i >= 0; --i) {
    +      ModelEvent& e = modelEvents_[model][i];
    +      if (e.type == type
    +	  && e.index == parent
    +	  && e.start == start
    +	  && e.end == end
    +	  && !e.ended) {
    +	e.ended = true;
    +	return;
    +      }
    +    }
    +
    +    BOOST_FAIL("Non-matched geometry ending event");
    +  }
    +}
    +
    +void WBatchEditProxyModelTest::teardown()
    +{
    +  delete proxyModel_;
    +  delete sourceModel_;
    +}
    +  
    +WBatchEditProxyModelTest::WBatchEditProxyModelTest()
    +  : test_suite("WBatchEditProxyModel")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&WBatchEditProxyModelTest::test, this)));
    +}
    diff --git a/wt-3.1.7a/test/models/WBatchEditProxyModelTest.h b/wt-3.1.7a/test/models/WBatchEditProxyModelTest.h
    new file mode 100644
    index 0000000..e71035f
    --- /dev/null
    +++ b/wt-3.1.7a/test/models/WBatchEditProxyModelTest.h
    @@ -0,0 +1,66 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WBATCH_EDIT_PROXY_MODEL_TEST_H_
    +#define WBATCH_EDIT_PROXY_MODEL_TEST_H_
    +
    +#include <Wt/WGlobal>
    +#include <Wt/WModelIndex>
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class WBatchEditProxyModelTest : public test_suite
    +{
    +public:
    +  WBatchEditProxyModelTest();
    +
    +private:
    +  Wt::WStandardItemModel *sourceModel_;
    +  Wt::WBatchEditProxyModel *proxyModel_;
    +
    +  enum EventType { 
    +    RowsInserted,
    +    ColumnsInserted,
    +    RowsRemoved,
    +    ColumnsRemoved,
    +    DataChanged
    +  };
    +
    +  struct ModelEvent {
    +    Wt::WModelIndex index;
    +    int start, end;
    +    bool ended;
    +    EventType type;
    +  };
    +
    +  std::vector<ModelEvent> modelEvents_[2];
    +
    +  enum ModelType { SourceModel, ProxyModel };
    +
    +  void geometryChanged(const Wt::WModelIndex& parent,
    +		       int start, int end, ModelType model, EventType type,
    +		       bool ended);
    +
    +  void dataChanged(const Wt::WModelIndex& topLeft,
    +		   const Wt::WModelIndex& bottomRight, ModelType modelType);
    +
    +  void headerDataChanged(Wt::Orientation orientation, int start, int end);
    +
    +  void layoutAboutToBeChanged();
    +  void layoutChanged();
    +
    +  void setup();
    +  void teardown();
    +  void connectEvents(Wt::WAbstractItemModel *model, ModelType modelType);
    +  void clearEvents();
    +
    +  void test();
    +};
    +
    +#endif // WBATCH_EDIT_PROXY_MODEL_TEST_H_
    diff --git a/wt-3.1.7a/test/private/DboImplTest.C b/wt-3.1.7a/test/private/DboImplTest.C
    new file mode 100644
    index 0000000..5c05c98
    --- /dev/null
    +++ b/wt-3.1.7a/test/private/DboImplTest.C
    @@ -0,0 +1,97 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include <Wt/Dbo/Dbo>
    +#include "DboImplTest.h"
    +
    +namespace dbo = Wt::Dbo;
    +
    +#define SQL(...) #__VA_ARGS__
    +
    +void DboImplTest::parseSql(const std::string& sql,
    +			   int listsCount,
    +			   int fieldsCount,
    +			   bool simpleSelect)
    +{
    +  dbo::Impl::SelectFieldLists result;
    +  bool simpleSelectCount;
    +
    +  dbo::Impl::parseSql(sql, result, simpleSelectCount);
    +
    +  BOOST_REQUIRE(result.size() == listsCount);
    +
    +  int fields = 0;
    +  for (unsigned i = 0; i < result.size(); ++i) {
    +    fields += static_cast<int>(result[i].size());
    +    for (unsigned j = 0; j < result[i].size(); ++j) {
    +      dbo::Impl::SelectField& f = result[i][j];
    +      std::cerr << "Field: '" << sql.substr(f.begin, f.end - f.begin)
    +		<< "'" << std::endl;
    +    }
    +  }
    +
    +  BOOST_REQUIRE(fields == fieldsCount);
    +  BOOST_REQUIRE(simpleSelect == simpleSelectCount);
    +}
    +
    +void DboImplTest::test1()
    +{
    +  parseSql("select 1", 1, 1, true);
    +  parseSql("select a, b from foo", 1, 2, true);
    +  parseSql("select distinct a, b from foo", 1, 2, false);
    +  parseSql("select '1'", 1, 1, true);
    +  parseSql("select distinct '1'", 1, 1, false);
    +  parseSql("select 'Barts'' car'", 1, 1, true);
    +
    +#if BOOST_VERSION >= 104100
    +  // These ones only work correctly with our new spirit-based parser
    +
    +  parseSql("select 'Barts'', car', bike from depot", 1, 2, true);
    +
    +  parseSql
    +    (SQL
    +     (WITH
    +      regional_sales AS 
    +      (
    +       SELECT region, SUM(amount) AS total_sales 
    +       FROM orders 
    +       GROUP BY region 
    +       ),
    +      top_regions AS
    +      ( 
    +       SELECT region 
    +       FROM regional_sales 
    +       WHERE total_sales > (SELECT SUM(total_sales)/10 FROM 
    +			    regional_sales)
    +      )
    +      SELECT region,
    +             product,
    +             SUM(quantity) AS product_units,
    +             SUM(amount) AS product_sales 
    +      FROM orders 
    +      WHERE region IN (SELECT region FROM top_regions)
    +      GROUP BY region, product, result, simpleSelectCount
    +      ),
    +     1, 4, false
    +     );
    +
    +  parseSql
    +    (SQL
    +     (select a from foo
    +      intersect
    +      select b, c from bar),
    +     2, 3, false);
    +#endif // BOOST_VERSION
    +}
    +
    +DboImplTest::DboImplTest()
    +  : test_suite("dboimpltest_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&DboImplTest::test1, this)));
    +}
    diff --git a/wt-3.1.7a/test/private/DboImplTest.h b/wt-3.1.7a/test/private/DboImplTest.h
    new file mode 100644
    index 0000000..604f988
    --- /dev/null
    +++ b/wt-3.1.7a/test/private/DboImplTest.h
    @@ -0,0 +1,30 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef DBO_IMPL_TEST_H
    +#define DBO_IMPL_TEST_H
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class DboImplTest : public test_suite
    +{
    +public:
    +  DboImplTest();
    +
    +private:
    +  void test1();
    +
    +  void parseSql(const std::string& sql,
    +		int listsCount,
    +		int fieldsCount,
    +		bool simpleSelect);
    +};
    +
    +#endif // DBO_IMPL_TEST_H
    diff --git a/wt-3.1.7a/test/private/HttpTest.C b/wt-3.1.7a/test/private/HttpTest.C
    new file mode 100644
    index 0000000..c39dc9c
    --- /dev/null
    +++ b/wt-3.1.7a/test/private/HttpTest.C
    @@ -0,0 +1,245 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include "HttpTest.h"
    +#include <boost/bind.hpp>
    +
    +#include "Wt/Http/Request"
    +
    +using namespace Wt::Http;
    +
    +void HttpTest::setup()
    +{
    +}
    +
    +void HttpTest::teardown()
    +{
    +}
    +
    +void HttpTest::rangeTest1()
    +{
    +  // These are all tests wo filesize
    +  Request::ByteRangeSpecifier ranges;
    +  
    +  // Basic tests
    +  ranges = Request::getRanges("bytes=0-24", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 24);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=1-2, 15-18, 600-900", -1);
    +  BOOST_REQUIRE(ranges.size() == 3);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 1);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 2);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 15);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 18);
    +  BOOST_REQUIRE(ranges[2].firstByte() == 600);
    +  BOOST_REQUIRE(ranges[2].lastByte() == 900);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // Till end-of-file...
    +  ranges = Request::getRanges("bytes=100-", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 100);
    +  BOOST_REQUIRE(ranges[0].lastByte() == std::numeric_limits< ::uint64_t>::max());
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // suffix-byte-range-spec. When filesize is unknown, this does
    +  // not make sense
    +  ranges = Request::getRanges("bytes=-100", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // examples from the RFC
    +  ranges = Request::getRanges("bytes=0-499", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 499);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-999", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-500", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=9500-", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 9500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == std::numeric_limits< ::uint64_t>::max());
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=0-0,-1", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-600,601-999", -1);
    +  BOOST_REQUIRE(ranges.size() == 2);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 600);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 601);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-700,601-999", -1);
    +  BOOST_REQUIRE(ranges.size() == 2);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 700);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 601);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +
    +
    +  // Whitespace test
    +  ranges = Request::getRanges(" bytes = 0 - 2 ", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 2);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("\tbytes\t=\t0\t-\t2\t", -1);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 2);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +
    +  // 'Syntax error' tests
    +  // Starting with some obvious ones
    +  ranges = Request::getRanges("bytes==1,2", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("1-2=bytes", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=1-2;", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=1-2-3", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=1,2,3", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("octets=1-2", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=0-1,a-b", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // Explicitly mentioned in the RFC as 'syntactically invalid'
    +  ranges = Request::getRanges("bytes=2-0", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // One invalid range = ignore the complete Range header
    +  ranges = Request::getRanges("bytes=1-2,2-0", -1);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +
    +}
    +
    +void HttpTest::rangeTest2()
    +{
    +  Request::ByteRangeSpecifier ranges;
    +
    +  // Queries past end of file
    +  ranges = Request::getRanges("bytes=10-2000", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 10);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=999-2000", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 999);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  // To the end of file
    +  ranges = Request::getRanges("bytes=100-", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 100);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  //cornercase queries
    +  ranges = Request::getRanges("bytes=10-999", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 10);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-1000", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +
    +  // suffix-byte-range-spec. When filesize is unknown, this does
    +  // not make sense
    +  ranges = Request::getRanges("bytes=-100", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 900);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-2000", 1000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-2000", 0);
    +  BOOST_REQUIRE(ranges.size() == 0); //??
    +  BOOST_REQUIRE(!ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-0", 0);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(!ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-0", 100);
    +  BOOST_REQUIRE(ranges.size() == 0);
    +  BOOST_REQUIRE(!ranges.isSatisfiable());
    +
    +  // examples from the RFC
    +  ranges = Request::getRanges("bytes=0-499", 10000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 499);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-999", 10000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=-500", 10000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 9500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 9999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=9500-", 10000);
    +  BOOST_REQUIRE(ranges.size() == 1);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 9500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 9999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=0-0,-1", 10000);
    +  BOOST_REQUIRE(ranges.size() == 2);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 0);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 0);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 9999);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 9999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-600,601-999", 10000);
    +  BOOST_REQUIRE(ranges.size() == 2);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 600);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 601);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +  ranges = Request::getRanges("bytes=500-700,601-999", 10000);
    +  BOOST_REQUIRE(ranges.size() == 2);
    +  BOOST_REQUIRE(ranges[0].firstByte() == 500);
    +  BOOST_REQUIRE(ranges[0].lastByte() == 700);
    +  BOOST_REQUIRE(ranges[1].firstByte() == 601);
    +  BOOST_REQUIRE(ranges[1].lastByte() == 999);
    +  BOOST_REQUIRE(ranges.isSatisfiable());
    +}
    +
    +HttpTest::HttpTest()
    +  : test_suite("http_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&HttpTest::rangeTest1, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&HttpTest::rangeTest2, this)));
    +}
    diff --git a/wt-3.1.7a/test/private/HttpTest.h b/wt-3.1.7a/test/private/HttpTest.h
    new file mode 100644
    index 0000000..d3a1fc5
    --- /dev/null
    +++ b/wt-3.1.7a/test/private/HttpTest.h
    @@ -0,0 +1,29 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#ifndef HTTP_TEST_H
    +#define HTTP_TEST_H
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class HttpTest : public test_suite
    +{
    +public:
    +  HttpTest();
    +
    +private:
    +  void setup();
    +  void teardown();
    +
    +  void rangeTest1();
    +  void rangeTest2();
    +};
    +
    +#endif // HTTP_TEST_H
    diff --git a/wt-3.1.7a/test/test.C b/wt-3.1.7a/test/test.C
    new file mode 100644
    index 0000000..299f66b
    --- /dev/null
    +++ b/wt-3.1.7a/test/test.C
    @@ -0,0 +1,36 @@
    +#include <boost/test/unit_test.hpp>
    +#include <boost/test/included/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +
    +#include "chart/WChartTest.h"
    +#ifdef WTDBO
    +#include "dbo/DboTest.h"
    +#include "dbo/DboTest2.h"
    +#include "private/DboImplTest.h"
    +#endif // WTDBO
    +#include "private/HttpTest.h"
    +#include "models/WBatchEditProxyModelTest.h"
    +#include "utf8/Utf8Test.h"
    +#include "utf8/XmlTest.h"
    +#include "wdatetime/WDateTimeTest.h"
    +
    +boost::unit_test::test_suite* init_unit_test_suite(int, char** const)
    +{
    +  test_suite *tests = BOOST_TEST_SUITE("Wt test suite");
    +
    +  tests->add(new HttpTest());
    +#ifdef WTDBO
    +  tests->add(new DboImplTest());
    +  tests->add(new DboTest());
    +  tests->add(new DboTest2());
    +#endif // WTDBO
    +  tests->add(new WBatchEditProxyModelTest());
    +  tests->add(new WChartTest());
    +  tests->add(new Utf8Test());
    +  tests->add(new XmlTest());
    +  tests->add(new WDateTimeTest());
    +
    +  return tests;
    +}
    +
    diff --git a/wt-3.1.7a/test/utf8/Utf8Test.C b/wt-3.1.7a/test/utf8/Utf8Test.C
    new file mode 100644
    index 0000000..6577c32
    --- /dev/null
    +++ b/wt-3.1.7a/test/utf8/Utf8Test.C
    @@ -0,0 +1,111 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include "Utf8Test.h"
    +
    +#include <Wt/WString>
    +#include <Wt/WStringUtil>
    +#include <iostream>
    +
    +void Utf8Test::test()
    +{
    +#ifndef WT_NO_STD_WSTRING
    +#ifndef WIN32
    +  std::wstring w = L"This costs 100\x20AC (greek \x0194 special \x103A7)";
    +  Wt::WString ws = w;
    +  // std::cerr << ws.toUTF8() << std::endl;
    +  BOOST_REQUIRE(ws.value() == w);
    +  BOOST_REQUIRE(ws.toUTF8().length() == w.length() + 2 + 1 + 3);
    +#else
    +  std::wstring w = L"This costs 100\x20AC (greek \x0194)";
    +  Wt::WString ws = w;
    +  // std::cerr << ws.toUTF8() << std::endl;
    +  BOOST_REQUIRE(ws.value() == w);
    +  BOOST_REQUIRE(ws.toUTF8().length() == w.length() + 2 + 1);
    +#endif
    +#endif
    +}
    +
    +void Utf8Test::test2()
    +{
    +#ifndef WT_NO_STD_WSTRING
    +  std::wstring w = L"This costs 100\x20AC (greek \x0194)";
    +
    +  Wt::WString ws = w;
    +  std::string s = ws.narrow();
    +
    +  // The following will work only if locale is classic (not UTF8)
    +  BOOST_REQUIRE(s == "This costs 100? (greek ?)");
    +#endif
    +}
    +
    +void Utf8Test::test3()
    +{
    +  /*
    +   * This is broken on MacOSX 10.6, std::locale("") throws runtime_exception
    +   */
    +#if 0
    +  std::wstring w = L"\x20AC\x20AC\x20AC\x20AC (greek \x0194)";
    +
    +  Wt::WString ws = w;
    +
    +  std::locale l(std::locale("C"), std::locale(""),
    +		std::locale::collate | std::locale::ctype);
    +
    +  std::string s = ws.narrow(l);
    +
    +  BOOST_REQUIRE(s == ws.toUTF8());
    +#endif
    +}
    + 
    +void Utf8Test::test4()
    +{
    +  std::string u8 = "euro\xe2\x82\xac greek \xc6\x94 special \xf0\x90\x8e\xa7)";
    +  std::string u8a = "euro\xe2\x82\xac gree";
    +  std::string u8b = "euro\xe2\x82\xac greek \xc6\x94";
    +  std::string u8c = "euro\xe2\x82\xac greek \xc6\x94 special \xf0\x90\x8e\xa7";
    +  std::string u8d = "k \xc6\x94 special \xf0\x90\x8e\xa7)";
    +  std::string u8e = "special \xf0\x90\x8e\xa7";
    +  std::string u8f = ")";
    +  std::string ss;
    +  // Check if UTF8substr works as advertised
    +  ss = Wt::UTF8Substr(u8, 0, -1);
    +  BOOST_REQUIRE(ss == u8);
    +
    +  ss = Wt::UTF8Substr(u8, 0, 24);
    +  BOOST_REQUIRE(ss == u8);
    +
    +  ss = Wt::UTF8Substr(u8, 0, 23);
    +  BOOST_REQUIRE(ss == u8c);
    +
    +  ss = Wt::UTF8Substr(u8, 0, 10);
    +  BOOST_REQUIRE(ss == u8a);
    +
    +  ss = Wt::UTF8Substr(u8, 0, 13);
    +  BOOST_REQUIRE(ss == u8b);
    +
    +  ss = Wt::UTF8Substr(u8, 10, -1);
    +  BOOST_REQUIRE(ss == u8d);
    +
    +  ss = Wt::UTF8Substr(u8, 14, 9);
    +  BOOST_REQUIRE(ss == u8e);
    +
    +  ss = Wt::UTF8Substr(u8, 23, 9);
    +  BOOST_REQUIRE(ss == u8f);
    +
    +}
    +
    +Utf8Test::Utf8Test()
    +  : test_suite("utf8_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&Utf8Test::test, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&Utf8Test::test2, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&Utf8Test::test3, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&Utf8Test::test4, this)));
    +}
    diff --git a/wt-3.1.7a/test/utf8/Utf8Test.h b/wt-3.1.7a/test/utf8/Utf8Test.h
    new file mode 100644
    index 0000000..becf56f
    --- /dev/null
    +++ b/wt-3.1.7a/test/utf8/Utf8Test.h
    @@ -0,0 +1,26 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef UTF8_TEST_H_
    +#define UTF8_TEST_H_
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class Utf8Test : public test_suite
    +{
    +public:
    +  void test();
    +  void test2();
    +  void test3();
    +  void test4();
    +
    +  Utf8Test();
    +};
    +
    +#endif // UTF8_TEST_H_
    diff --git a/wt-3.1.7a/test/utf8/XmlTest.C b/wt-3.1.7a/test/utf8/XmlTest.C
    new file mode 100644
    index 0000000..603f785
    --- /dev/null
    +++ b/wt-3.1.7a/test/utf8/XmlTest.C
    @@ -0,0 +1,34 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#include <boost/bind.hpp>
    +#include <iostream>
    +#include <Wt/WMessageResourceBundle>
    +
    +#include "XmlTest.h"
    +
    +void XmlTest::test()
    +{
    +  Wt::WMessageResourceBundle bundle;
    +  bundle.use("test");
    +
    +  std::string result;
    +
    +  if (!bundle.resolveKey("test1", result))
    +    return; // test.xml file not found
    +
    +  BOOST_REQUIRE(bundle.resolveKey("test1", result));
    +  BOOST_REQUIRE(result == "<br/>");
    +
    +  BOOST_REQUIRE(bundle.resolveKey("test2", result));
    +  BOOST_REQUIRE(result == "<div></div>");
    +}
    +
    +XmlTest::XmlTest()
    +  : test_suite("xml_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&XmlTest::test, this)));
    +}
    diff --git a/wt-3.1.7a/test/utf8/XmlTest.h b/wt-3.1.7a/test/utf8/XmlTest.h
    new file mode 100644
    index 0000000..e8a09af
    --- /dev/null
    +++ b/wt-3.1.7a/test/utf8/XmlTest.h
    @@ -0,0 +1,23 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef XML_TEST_H_
    +#define XML_TEST_H_
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class XmlTest : public test_suite
    +{
    +public:
    +  void test();
    +
    +  XmlTest();
    +};
    +
    +#endif // XML_TEST_H_
    diff --git a/wt-3.1.7a/test/wdatetime/WDateTimeTest.C b/wt-3.1.7a/test/wdatetime/WDateTimeTest.C
    new file mode 100644
    index 0000000..dae0bdf
    --- /dev/null
    +++ b/wt-3.1.7a/test/wdatetime/WDateTimeTest.C
    @@ -0,0 +1,134 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +
    +#include <boost/bind.hpp>
    +
    +#include "WDateTimeTest.h"
    +
    +#include <Wt/WDate>
    +#include <Wt/WTime>
    +#include <Wt/WDateTime>
    +
    +void WDateTimeTest::test_WDate()
    +{
    +  Wt::WDate wd(2009, 10, 1);
    +  BOOST_REQUIRE(wd.toString() == "Thu Oct 1 2009");
    +}
    +
    +void WDateTimeTest::test_WTime()
    +{
    +  Wt::WTime wt(12, 11, 31);
    +  BOOST_REQUIRE(wt.toString() == "12:11:31");
    +}
    +
    +void WDateTimeTest::test_WDateTime()
    +{
    +  Wt::WDate wd(2009, 10, 1);
    +  Wt::WTime wt(12, 11, 31, 499);
    +  Wt::WDateTime wdt(wd, wt);
    +
    +  BOOST_REQUIRE(wdt.toString() == "Thu Oct 1 12:11:31 2009");
    +  BOOST_REQUIRE(wdt.toString("ddd MMM d HH:mm:ss:zzz yyyy")
    +		== "Thu Oct 1 12:11:31:499 2009");
    +  BOOST_REQUIRE(wdt.time().msec() == 499);
    +
    +  Wt::WDateTime wdt2 = wdt.addMSecs(1600);
    +  BOOST_REQUIRE(wdt.toString("ddd MMM d HH:mm:ss:zzz yyyy")
    +		== "Thu Oct 1 12:11:31:499 2009");
    +  BOOST_REQUIRE(wdt2.toString("ddd MMM d HH:mm:ss:zzz yyyy")
    +		== "Thu Oct 1 12:11:33:099 2009");
    +
    +  Wt::WDateTime d = Wt::WDateTime::fromString("2000-06-14 13:05:12",
    +					      "yyyy-MM-dd hh:mm:ss");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 13);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 13:05:12",
    +				"yyyy-MM-dd HH:mm:ss");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 13);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 1:05:12 AM",
    +				"yyyy-MM-dd h:mm:ss AP");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 1);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 1:05:12 pm",
    +				"yyyy-MM-dd h:mm:ss ap");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 13);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 1:05:12 PM",
    +				"yyyy-MM-dd h:mm:ss a");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 13);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 1:05:12 AM",
    +				"yyyy-MM-dd h:mm:ss a");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 1);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 1:05:12",
    +				"yyyy-MM-dd h:mm:ss");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 1);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  d = Wt::WDateTime::fromString("2000-06-14 13:05:12",
    +				"yyyy-MM-dd h:mm:ss");
    +
    +  BOOST_REQUIRE(d.date().year() == 2000);
    +  BOOST_REQUIRE(d.date().month() == 6);
    +  BOOST_REQUIRE(d.date().day() == 14);
    +  BOOST_REQUIRE(d.time().hour() == 13);
    +  BOOST_REQUIRE(d.time().minute() == 05);
    +  BOOST_REQUIRE(d.time().second() == 12);
    +
    +  BOOST_REQUIRE(Wt::WDateTime::fromString(d.toString()) == d);
    +}
    +
    +WDateTimeTest::WDateTimeTest()
    +  : test_suite("wdatetime_test_suite")
    +{
    +  add(BOOST_TEST_CASE(boost::bind(&WDateTimeTest::test_WDate, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&WDateTimeTest::test_WTime, this)));
    +  add(BOOST_TEST_CASE(boost::bind(&WDateTimeTest::test_WDateTime, this)));
    +}
    diff --git a/wt-3.1.7a/test/wdatetime/WDateTimeTest.h b/wt-3.1.7a/test/wdatetime/WDateTimeTest.h
    new file mode 100644
    index 0000000..6a5715d
    --- /dev/null
    +++ b/wt-3.1.7a/test/wdatetime/WDateTimeTest.h
    @@ -0,0 +1,25 @@
    +// This may look like C code, but it's really -*- C++ -*-
    +/*
    + * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
    + *
    + * See the LICENSE file for terms of use.
    + */
    +#ifndef WDATE_TIME_TEST_H_
    +#define WDATE_TIME_TEST_H_
    +
    +#include <boost/test/unit_test.hpp>
    +
    +using boost::unit_test_framework::test_suite;
    +using boost::unit_test_framework::test_case;
    +
    +class WDateTimeTest : public test_suite
    +{
    +public:
    +  void test_WDate();
    +  void test_WTime();
    +  void test_WDateTime();
    +
    +  WDateTimeTest();
    +};
    +
    +#endif // WDATE_TIME_TEST_H_
    diff --git a/wt-3.1.7a/wt.tags b/wt-3.1.7a/wt.tags
    new file mode 100644
    index 0000000..6bb130b
    --- /dev/null
    +++ b/wt-3.1.7a/wt.tags
    @@ -0,0 +1,32536 @@
    +<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
    +<tagfile>
    +  <compound kind="page">
    +    <name>index</name>
    +    <title>Wt documentation.</title>
    +    <filename>index</filename>
    +  </compound>
    +  <compound kind="page">
    +    <name>overview</name>
    +    <title>Library overview</title>
    +    <filename>overview</filename>
    +    <docanchor file="overview">error_sec</docanchor>
    +    <docanchor file="overview">config_session</docanchor>
    +    <docanchor file="overview">containers</docanchor>
    +    <docanchor file="overview">sec_painting</docanchor>
    +    <docanchor file="overview">urls_sec</docanchor>
    +    <docanchor file="overview">config_wthttpd</docanchor>
    +    <docanchor file="overview">contents</docanchor>
    +    <docanchor file="overview">wthttpd</docanchor>
    +    <docanchor file="overview">eventhandling</docanchor>
    +    <docanchor file="overview">config_general</docanchor>
    +    <docanchor file="overview">internationalization_sec</docanchor>
    +    <docanchor file="overview">signal_slot</docanchor>
    +    <docanchor file="overview">wwidget_sec</docanchor>
    +    <docanchor file="overview">config_fastcgi</docanchor>
    +    <docanchor file="overview">deployment</docanchor>
    +    <docanchor file="overview">config_isapi</docanchor>
    +    <docanchor file="overview">wtisapi</docanchor>
    +    <docanchor file="overview">fastcgi</docanchor>
    +    <docanchor file="overview">application_sec</docanchor>
    +    <docanchor file="overview">style</docanchor>
    +    <docanchor file="overview">default_bootstrap</docanchor>
    +    <docanchor file="overview">layout</docanchor>
    +    <docanchor file="overview">bootstrap</docanchor>
    +    <docanchor file="overview">configuration_sec</docanchor>
    +    <docanchor file="overview">progressive_bootstrap</docanchor>
    +  </compound>
    +  <compound kind="page">
    +    <name>example</name>
    +    <title>Treelist example</title>
    +    <filename>example</filename>
    +    <docanchor file="example">treenode_sec</docanchor>
    +    <docanchor file="example">stateicon_sec</docanchor>
    +  </compound>
    +  <compound kind="page">
    +    <name>InstallationUnix</name>
    +    <title>Installation: Unix-like platforms</title>
    +    <filename>InstallationUnix</filename>
    +  </compound>
    +  <compound kind="page">
    +    <name>InstallationWindows</name>
    +    <title>Installation: Windows</title>
    +    <filename>InstallationWindows</filename>
    +  </compound>
    +  <compound kind="page">
    +    <name>Releasenotes</name>
    +    <title>Release notes</title>
    +    <filename>Releasenotes</filename>
    +  </compound>
    +  <compound kind="group">
    +    <name>charts</name>
    +    <title>Charts</title>
    +    <filename>group__charts.html</filename>
    +    <class kind="class">Wt::Chart::WAbstractChart</class>
    +    <class kind="class">Wt::Chart::WAxis</class>
    +    <class kind="class">Wt::Chart::WCartesianChart</class>
    +    <class kind="class">Wt::Chart::SeriesIterator</class>
    +    <class kind="class">Wt::Chart::WChart2DRenderer</class>
    +    <class kind="class">Wt::Chart::WChartPalette</class>
    +    <class kind="class">Wt::Chart::WDataSeries</class>
    +    <class kind="class">Wt::Chart::WPieChart</class>
    +    <class kind="class">Wt::Chart::WStandardPalette</class>
    +    <member kind="enumeration">
    +      <name>Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gaddb678f67fbd9f374fcee0922f158c9f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa2a592919e6cbd94bf09e1259559499b5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>YAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa2e1017fdef77b4663715c3d7663a4db4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Y1Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa4905c14eb8a164e00e48b41cfaf6f070</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Y2Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fadbfcf55c246aa3a385974a185f4220e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OrdinateAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fae8797459bbc3e1eaba438ab4d10c0352</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AxisValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga77eb6d0cefa4a012950ea972b471b849</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MinimumValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849ada8601e8f3630aec7d16b6d4177d4986</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MaximumValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849af9110e09430355ab81d579be51ac73cb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ZeroValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849af2e58ce3483a5ec496f65fb808ce72b9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AxisScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gadfcaed8cd6ff52f5747f7df48f2eeab6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CategoryScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6aa9b1356757a7b0935c3302c32798ef14</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LinearScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6ad1c254fd10596e2565b32fd6f5967094</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LogScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6afba90921c9efb6c5131cdb1590bfa406</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DateScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6aaa627030efa552170a889d7a80a65a12</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DateTimeScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6a97f80bcc82b9bf9299b61de12732da5c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SeriesType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga44d64e4a9d08c7ef69648f4a9c3e4053</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PointSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a6a8b53e7bfdec77f9df5e82aaf0061e8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LineSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a2582c20d00d806d8a175e2f5c0207591</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CurveSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a805880e23c0292fb7a66b2cda2a2f5bf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BarSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a6751dbd7ed4600a4befa967107a6dde8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>MarkerType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga9f38f3460fb2575d5f4f1a1ac51a7db6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6aaab531f4ceaaa1893f854f4b1262636d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SquareMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a4250deb876978d5f5c3be4cc6aad8267</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CircleMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6ac14cc4eaec28c9ab096fbf7efead2660</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CrossMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a003214a00943a828becc1beb54956e80</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XCrossMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a4a718fdd73e4bcdc700495eb549dc386</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TriangleMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6ae7ee432c7bf8189deaa453af4d14182b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>FillRangeType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga7236e5b04bdb6f393162842982b4d1a0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0ad0c1c31f7f41394c2fd5444edc340972</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MinimumValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0a1eb3ca7c63430bd56544b9e3b962c6cf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MaximumValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0aa321337f9f9a4d56fb1d2cafe0f359b6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ZeroValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0a50b16db97a187f9acccdbeecf8732ff0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ChartType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga8d63464f873580c77508e1c0c26cbfea</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CategoryChart</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga8d63464f873580c77508e1c0c26cbfeaaebfd9bd11d1126f2db7ff891c04c29f9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ScatterPlot</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga8d63464f873580c77508e1c0c26cbfeaa6ddab43d32242eb28831938a1e469a1f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>LabelOption</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga9345394a8eeda6800d8a24c5df44d983</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoLabels</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a866d745e727785c20e31d5ea76bb58a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Inside</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983aeb92488c13b0ccc46cddbb3445007443</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Outside</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a88861128e109b6a63e76a311dc57e408</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TextLabel</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a60df9add81425373c20fafe8c4e40b0e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TextPercentage</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a307741727c5ef5e33efcd347a0853e50</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="group">
    +    <name>dbo</name>
    +    <title>Database Objects (Dbo)</title>
    +    <filename>group__dbo.html</filename>
    +    <class kind="struct">Wt::Dbo::ptr_tuple</class>
    +    <class kind="class">Wt::Dbo::SqlStatement</class>
    +    <class kind="class">Wt::Dbo::backend::Postgres</class>
    +    <class kind="class">Wt::Dbo::backend::Sqlite3</class>
    +    <class kind="class">Wt::Dbo::collection</class>
    +    <class kind="class">Wt::Dbo::Exception</class>
    +    <class kind="class">Wt::Dbo::StaleObjectException</class>
    +    <class kind="class">Wt::Dbo::ObjectNotFoundException</class>
    +    <class kind="class">Wt::Dbo::NoUniqueResultException</class>
    +    <class kind="class">Wt::Dbo::FixedSqlConnectionPool</class>
    +    <class kind="class">Wt::Dbo::dbo_default_traits</class>
    +    <class kind="class">Wt::Dbo::dbo_traits</class>
    +    <class kind="class">Wt::Dbo::Dbo</class>
    +    <class kind="class">Wt::Dbo::ptr</class>
    +    <class kind="class">Wt::Dbo::Query</class>
    +    <class kind="class">Wt::Dbo::QueryModel</class>
    +    <class kind="class">Wt::Dbo::Session</class>
    +    <class kind="class">Wt::Dbo::SqlConnection</class>
    +    <class kind="class">Wt::Dbo::SqlConnectionPool</class>
    +    <class kind="class">Wt::Dbo::sql_value_traits</class>
    +    <class kind="class">Wt::Dbo::FieldInfo</class>
    +    <class kind="class">Wt::Dbo::query_result_traits</class>
    +    <class kind="class">Wt::Dbo::Transaction</class>
    +    <member kind="enumeration">
    +      <name>RelationType</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga1d0ec6819b1bf5b7a88ad030b91ca564</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ManyToOne</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gga1d0ec6819b1bf5b7a88ad030b91ca564a32d7393c325724244671b18be53058fa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ManyToMany</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gga1d0ec6819b1bf5b7a88ad030b91ca564ad0bd477ec215a878e0758cce8494af24</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>id</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gac98c1f90b00ed9ce243c6412da3ac489</anchor>
    +      <arglist>(Action &amp;action, V &amp;value, const std::string &amp;name=&quot;id&quot;, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>field</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga8a2b653ff57f1459dfa2e556badd71d6</anchor>
    +      <arglist>(Action &amp;action, V &amp;value, const std::string &amp;name, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>belongsTo</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gaf1a3f4231d2064b86eb3903003527ddd</anchor>
    +      <arglist>(Action &amp;action, ptr&lt; C &gt; &amp;value, const std::string &amp;name, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hasMany</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga1a086b583fb150dbd4c5b4ba92bc177f</anchor>
    +      <arglist>(Action &amp;action, collection&lt; ptr&lt; C &gt; &gt; &amp;value, RelationType type, const std::string &amp;joinName, const std::string &amp;joinId=&quot;&quot;)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="group">
    +    <name>ext</name>
    +    <title>Ext widgets</title>
    +    <filename>group__ext.html</filename>
    +    <class kind="class">Wt::Ext::AbstractButton</class>
    +    <class kind="class">Wt::Ext::AbstractToggleButton</class>
    +    <class kind="class">Wt::Ext::Button</class>
    +    <class kind="class">Wt::Ext::Calendar</class>
    +    <class kind="class">Wt::Ext::CheckBox</class>
    +    <class kind="class">Wt::Ext::ComboBox</class>
    +    <class kind="class">Wt::Ext::Component</class>
    +    <class kind="class">Wt::Ext::DataStore</class>
    +    <class kind="class">Wt::Ext::DateField</class>
    +    <class kind="class">Wt::Ext::Dialog</class>
    +    <class kind="class">Wt::Ext::FormField</class>
    +    <class kind="class">Wt::Ext::LineEdit</class>
    +    <class kind="class">Wt::Ext::Menu</class>
    +    <class kind="class">Wt::Ext::MenuItem</class>
    +    <class kind="class">Wt::Ext::MessageBox</class>
    +    <class kind="class">Wt::Ext::NumberField</class>
    +    <class kind="class">Wt::Ext::PagingToolBar</class>
    +    <class kind="class">Wt::Ext::Panel</class>
    +    <class kind="class">Wt::Ext::ProgressDialog</class>
    +    <class kind="class">Wt::Ext::RadioButton</class>
    +    <class kind="class">Wt::Ext::Splitter</class>
    +    <class kind="class">Wt::Ext::SplitterHandle</class>
    +    <class kind="class">Wt::Ext::TableView</class>
    +    <class kind="class">Wt::Ext::TabWidget</class>
    +    <class kind="class">Wt::Ext::TextEdit</class>
    +    <class kind="class">Wt::Ext::ToolBar</class>
    +    <class kind="class">Wt::Ext::ToolTipConfig</class>
    +    <class kind="class">Wt::Ext::Widget</class>
    +    <member kind="enumeration">
    +      <name>DataLocation</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>ga5bc908c6e6aa90646cca1276d68cb2b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ClientSide</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>gga5bc908c6e6aa90646cca1276d68cb2b2a19099959db2ef813b3d1a1e2f3e04675</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ServerSide</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>gga5bc908c6e6aa90646cca1276d68cb2b2a1ae210985e4d5795a6aa21ed8871dfe7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <docanchor file="group__ext">moh</docanchor>
    +    <docanchor file="group__ext">bla</docanchor>
    +  </compound>
    +  <compound kind="group">
    +    <name>style</name>
    +    <title>Style classes</title>
    +    <filename>group__style.html</filename>
    +    <class kind="class">Wt::WBorder</class>
    +    <class kind="class">Wt::WColor</class>
    +    <class kind="class">Wt::WCssDecorationStyle</class>
    +    <class kind="class">Wt::WCssRule</class>
    +    <class kind="class">Wt::WCssTemplateRule</class>
    +    <class kind="class">Wt::WCssTextRule</class>
    +    <class kind="class">Wt::WCssStyleSheet</class>
    +    <class kind="class">Wt::WFont</class>
    +    <member kind="enumeration">
    +      <name>GlobalColor</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>ga9686ea88ce4db2c0a12ea84452f60133</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>white</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133aa8fbe7a33681fc09e0231d6dfbd90d66</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>black</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133acf5dee884803e93b444f8bd222956bd6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>red</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a57462cb05392ee7e39d27e5f66252c42</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkRed</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a9a39ff0e1a5aa34a2e69407f8895eb4c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>green</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a9de61f6576b0207b4d5c988cbeee1b8c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkGreen</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a75712f6d7896b12273323acd21b28d7e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>blue</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a0cb88ce2189a8986f24a4409498e490e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkBlue</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a8d8dd4dab4ab7688946bfcdfcb468b8c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>cyan</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a52646bf8927d2018adec6814a2f903b8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkCyan</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133afb298721c24d10cd3d47c5c8efec0042</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>magenta</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a434a521950245ccd5041ef2d74b04fe8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkMagenta</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ab18a96d57e7cdcf8a986c4f112f5d18d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>yellow</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ae0950d4b5d4c4c9b98e3aa7334bda80a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkYellow</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a7621702d04fd8d039e1a3230a8e7b2e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>gray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a2ae20330b5a9eb890119be5074615858</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkGray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133aefe4fd296d57518c9566b524215f66ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>lightGray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ae3718148b44536034789bc88ba71564c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>transparent</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a6975fc5993d75cf4e71f097b548927a9</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="group">
    +    <name>modelview</name>
    +    <title>Model/view system</title>
    +    <filename>group__modelview.html</filename>
    +    <class kind="struct">Wt::boost_any_traits</class>
    +    <class kind="class">Wt::Chart::WAbstractChart</class>
    +    <class kind="class">Wt::Chart::WCartesianChart</class>
    +    <class kind="class">Wt::Chart::WPieChart</class>
    +    <class kind="class">Wt::Dbo::QueryModel</class>
    +    <class kind="class">Wt::Ext::ComboBox</class>
    +    <class kind="class">Wt::WAbstractItemDelegate</class>
    +    <class kind="class">Wt::WAbstractItemModel</class>
    +    <class kind="class">Wt::WAbstractItemView</class>
    +    <class kind="class">Wt::WAbstractListModel</class>
    +    <class kind="class">Wt::WAbstractProxyModel</class>
    +    <class kind="class">Wt::WAbstractTableModel</class>
    +    <class kind="class">Wt::WAggregateProxyModel</class>
    +    <class kind="class">Wt::WBatchEditProxyModel</class>
    +    <class kind="class">Wt::WComboBox</class>
    +    <class kind="class">Wt::WItemDelegate</class>
    +    <class kind="class">Wt::WItemSelectionModel</class>
    +    <class kind="class">Wt::WModelIndex</class>
    +    <class kind="class">Wt::WSelectionBox</class>
    +    <class kind="class">Wt::WSortFilterProxyModel</class>
    +    <class kind="class">Wt::WStandardItem</class>
    +    <class kind="class">Wt::WStandardItemModel</class>
    +    <class kind="class">Wt::WStringListModel</class>
    +    <class kind="class">Wt::WSuggestionPopup</class>
    +    <class kind="class">Wt::WTableView</class>
    +    <class kind="class">Wt::WTreeView</class>
    +    <member kind="enumeration">
    +      <name>MatchFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gaad8dd5072a40c11a34ee548bfb20b2ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchExactly</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa7b0e63f3888f29b33a722dade0f2bfe8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchStringExactly</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baac2dc009d041fc6e24084ed6be94a9747</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchStartsWith</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baaaf45aa78ff6ae362f112fa1988104730</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchEndsWith</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa0b444585cace7576dda80036805d93bf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchRegExp</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa801be4d30b88ade43408a788cef7b6ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchWildCard</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baae7967680e21f7dae7b603a1f1c5bf44a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchCaseSensitive</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa72ef48ecccae23d56c8a5bbeb400568d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchWrap</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa2e90a2f383a7da7e73e8f498e3f2faf5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>HeaderFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gafb18b4339442f1327c2a65850f3d8a53</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsCollapsed</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53a55020edcd8019b7fd0b330283b194929</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsExpandedLeft</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53adb54e2a704ae37581af6cc33828fef71</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsExpandedRight</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53ab8f2b2845555220afc9c3c24c43194cd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ItemDataRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga0ae864e12320f9f89172735e075ed068</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DisplayRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a5ed17aded8a0e3b712698cf85a218f1f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DecorationRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068aab6678fc176854f7990d6cff4eed779e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>EditRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a6bc0da3ea683a06ee293a5a15f903cde</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>StyleClassRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a776934b313f273b8e5e602e7eee9f73b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CheckStateRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068aad55e3ad8d7b76279adfc160bcb74940</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ToolTipRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068abde5f65c6b5cab667d11d1ceb87e4606</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>InternalPathRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a2f954b164f69cf17133993d15f25f8e5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UrlRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a37c19d2357fb1de30464a0fde4cb5395</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LevelRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a4b121c4303b1ab17f6347e950af65c21</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MarkerPenColorRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a80b9aeddc46a50e7f71b7fd3b3dc2d7d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MarkerBrushColorRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068ae77c18ea017e985b9c029f56c2417ddd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UserRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ItemFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga1d77c4de293aebfacbdde124de06b8b0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsSelectable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a77f858c86a06358abdcc64e4f9d03e40</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsEditable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a8664c482d721bbcb73539a924c7a9fab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsUserCheckable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0af309bd7d1183d934c73aefb2830e591c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDragEnabled</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a2b0edddfd15d67a84723c9043479ced1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDropEnabled</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a95d23063251001545d4bfab1308879a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsTristate</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0aacc3aa45a6c6197687337399315826b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsXHTMLText</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a8ce71c5a5f185d9097b4bd596c71315e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDirty</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a95a89bce0ba3417d61392eccc09995ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SortOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga4173856040cf108a9c7360927a43ebac</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AscendingOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga4173856040cf108a9c7360927a43ebacac2e51e9fbb9a1250c908443700e03d3e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DescendingOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga4173856040cf108a9c7360927a43ebacaaca46a90a3bf0912bf035a380722c9f3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>DropAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gaca801bdfb957c360c5f8709cc46949aa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CopyAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaca801bdfb957c360c5f8709cc46949aaa153a9813fd5eb77e31695657ac9cfb68</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MoveAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaca801bdfb957c360c5f8709cc46949aaa3f0ed7a05e822a2623d65f15e573bc73</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>asString</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga57b5cadd177847f51eaeb0cee23782c1</anchor>
    +      <arglist>(const boost::any &amp;v, const WString &amp;formatString=WString())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>asNumber</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga2494f8093b2b8f2f9c0aa7699e7bfc2a</anchor>
    +      <arglist>(const boost::any &amp;v)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>registerType</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga91842a84102ee15d41102ccf0745f4e4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="group">
    +    <name>painting</name>
    +    <title>Painting system</title>
    +    <filename>group__painting.html</filename>
    +    <class kind="class">Wt::WBrush</class>
    +    <class kind="class">Wt::WCanvasPaintDevice</class>
    +    <class kind="class">Wt::WColor</class>
    +    <class kind="class">Wt::WFont</class>
    +    <class kind="class">Wt::WLineF</class>
    +    <class kind="class">Wt::WPaintDevice</class>
    +    <class kind="class">Wt::WPaintedWidget</class>
    +    <class kind="class">Wt::WPainter</class>
    +    <class kind="class">Wt::WPainterPath</class>
    +    <class kind="class">Wt::WPdfImage</class>
    +    <class kind="class">Wt::WPen</class>
    +    <class kind="class">Wt::WPointF</class>
    +    <class kind="class">Wt::WRasterImage</class>
    +    <class kind="class">Wt::WRectF</class>
    +    <class kind="class">Wt::WShadow</class>
    +    <class kind="class">Wt::WSvgImage</class>
    +    <class kind="class">Wt::WTransform</class>
    +    <class kind="class">Wt::WVectorImage</class>
    +    <class kind="class">Wt::WVmlImage</class>
    +    <member kind="enumeration">
    +      <name>PenStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gab70170afb6347d18ff9dac17e05e133e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoPen</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eaa8125e799a1289cd6dd0b2595a496a82</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eac1888b9cee513c2bf98c6fb9f4e307ab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea7667698a6fb5adbf8f128519cbb93af8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea26ade9ba6072abfcef185cca70227d15</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea45cac3164febb16cf7028403e01077a0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea758c17a422e91d2e497f15054123e302</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenCapStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ga819ef9a03fb79c9834508b79eac604f2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FlatCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a394700c2ab47fe2b23564ced1c1e129a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SquareCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a39a378820d5058a3677f9852c5783783</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a3d1c8a630cb15cec7b33434d9564182a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenJoinStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaaf495faaba3ae03366a1646a4b5526be</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MiterJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bead2f7df311a138e580c95d728b0128004</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BevelJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea9550acce5f4da6e134f34392d7b072ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea3be2fdf749560b7229b3472d8ff6ad12</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>WBrushStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaffe43936b1bbb1ca2b308572fcdeb157</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoBrush</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157aa6f513232fadbbcaf8a576b7aaefc67a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidPattern</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157a574469ed16523a26c683e83c8fee3ed6</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="group">
    +    <name>signalslot</name>
    +    <title>Signal/slot system</title>
    +    <filename>group__signalslot.html</filename>
    +    <class kind="class">Wt::SignalBase</class>
    +    <class kind="class">Wt::EventSignalBase</class>
    +    <class kind="class">Wt::WMouseEvent</class>
    +    <class kind="class">Wt::WKeyEvent</class>
    +    <class kind="class">Wt::WDropEvent</class>
    +    <class kind="class">Wt::WScrollEvent</class>
    +    <class kind="class">Wt::WTouchEvent</class>
    +    <class kind="class">Wt::WGestureEvent</class>
    +    <class kind="class">Wt::JSignal</class>
    +    <class kind="class">Wt::JSlot</class>
    +    <class kind="class">Wt::WObject</class>
    +    <class kind="class">Wt::Signal</class>
    +    <class kind="class">Wt::EventSignal</class>
    +    <class kind="class">Wt::WSignalMapper</class>
    +    <member kind="enumeration">
    +      <name>KeyboardModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>ga50f91169486bada5931f3adc3a623091</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a7c97a6a0da658c8b189acea1f4c0e252</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ShiftModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a206924f86e7455d5d88c30a1d61899b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ControlModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091ada8f2dab72c395e56d897b769f6d0050</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AltModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091af3044546ac4679d9259be8332cca0dd7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MetaModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a73abfeaa5bbd55ab4f28fabf3d134720</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Key</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>ga34e65660d30e69c56aa636a8856aa52d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_unknown</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da3b769e7e817ab438b6341fb15598aa2c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Enter</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dab3c8e06184697e8b55705ec6e92ef57a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Tab</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da15a17a0b9c7794f1e212bb209f9a6b1d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Backspace</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da9b6c475089ff4ecea25ba729d4c6a771</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Shift</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4daba0b20a0d45ae1265acf9233bf9b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Control</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da7faac129eabb364618c2f147775dddd8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Alt</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da78df9bb6a131c160d5d7850aebbe2399</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_PageUp</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dab5764176c1fbc5b3058e545708bc2c7c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_PageDown</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da67fdcf0a21fa225f138ae7eff5dc5d02</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_End</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da52f767d967e30a4ef2b87375b58c3758</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Home</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da77efa77ae9e1a0d0da90a6da05978f3c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Left</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae67dc2b36f94673c36614c36a22c86a6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Up</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da292b7bad0c08eca53003b16887dbbfa4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Right</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da36408ed64c87279baf6752a718f1d867</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Down</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da81ce19fbff7cd5e33d311df5dc036b7a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Insert</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da1b9d45e03463b8ce85e77072ee3ca7aa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Delete</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da0974cc95023b3b3fcc89bed74ec4b820</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Escape</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da6fdfa052fee9a0ecad21a8ef29fc4a5a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F1</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da2efc2110e512a5001b8ce6d58d940f3e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F2</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da7014a077073ead5bde183b3cbf4e8193</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F3</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da45c3287676adbc30f53facff89fd5001</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F4</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da444fd761aef07334c7bfbb59c1eb49a7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F5</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da8ba749e5623684d7f908b5516eb474f1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F6</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dacc96e9d1ed8d5e11bac5d68623151694</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F7</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da124e3d34f1a696e33027fe48c003055e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F8</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4e8fafdcba3de0933febe02c13e81a71</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F9</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae8d582832595b29a69a0a26a19b3cf53</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F10</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da971d948e3abff0d42f8aa9409de16531</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F11</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4dfdaa48520aa89b9f9b9caf7e31e9a4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F12</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da9e048d50a8cc62e258572f8abe8d2412</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Space</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da5ec86a768d9ba285b2143df9977b5239</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_A</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da8eed1379a2c85aa3132f7f3170f95ea8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_B</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da069dbddc7a4b464624bba14f13c2084a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_C</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dafddfb22114bd3d90f0ddb1c65feb3516</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_D</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae1a302cbded84b1202a5107c808ed740</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_E</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae454998d6c5ac2d5f7f6c91f0df2c71b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da098250f2140b5e2fb5b46e0ce5f10af5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_G</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da41e1288722f2b2f160aa81c28eccc4f1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_H</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da716d8d1ef8dfd3aac7dbcead493127b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_I</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dad927cec36329c7d65d751a8f031a249f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_J</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da59bef2a0589454049c2565648a6693ff</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_K</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daefbef7cec0c75b7fc2a53f573894b109</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_L</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da1e4f578cb8fb4a9319525b7a6af32eee</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_M</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da88915645dbc4db17dfe3308fb65e9127</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_N</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da27d96fcd466dd0bdc867348ef07c0460</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_O</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da835039108055255d92e72f6ea9eca896</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_P</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daf681b38469fcc9b26a2866db5007fb46</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Q</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da19771f87de22387fb76a417ae9b3ce89</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_R</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da3ae47d7bd97b735e27c873c17d08e740</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_S</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da386061206cf7e0886720025eb2d152de</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_T</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da468cd3a60da863a3e5c80c739c3ff789</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_U</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da65cc1a8b2bd95606398560bab5309e7e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_V</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daf64151895196cf7907e5274d297bd65a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_W</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae4d913efd09ed5ba93e8e73d636e350a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_X</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da606e38f4f386d7bafd43c04d0d6a8d6a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Y</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da80f28601fb3b74843eb22f9f0381f076</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Z</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da2b51e784d1e7228464fde06b4d37f6ad</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="namespace">
    +    <name>Wt</name>
    +    <filename>namespaceWt.html</filename>
    +    <namespace>Wt::Chart</namespace>
    +    <namespace>Wt::Dbo</namespace>
    +    <namespace>Wt::Ext</namespace>
    +    <namespace>Wt::Http</namespace>
    +    <class kind="class">Wt::SyncLock</class>
    +    <class kind="class">Wt::WAbstractArea</class>
    +    <class kind="class">Wt::WAbstractItemDelegate</class>
    +    <class kind="class">Wt::WAbstractItemModel</class>
    +    <class kind="class">Wt::WAbstractItemView</class>
    +    <class kind="class">Wt::WAbstractListModel</class>
    +    <class kind="class">Wt::WAbstractProxyModel</class>
    +    <class kind="class">Wt::WAbstractTableModel</class>
    +    <class kind="class">Wt::WAbstractToggleButton</class>
    +    <class kind="class">Wt::WAccordionLayout</class>
    +    <class kind="class">Wt::WAggregateProxyModel</class>
    +    <class kind="class">Wt::WAnchor</class>
    +    <class kind="class">Wt::WApplication</class>
    +    <class kind="class">Wt::WBatchEditProxyModel</class>
    +    <class kind="struct">Wt::boost_any_traits</class>
    +    <class kind="class">Wt::WBorder</class>
    +    <class kind="class">Wt::WBorderLayout</class>
    +    <class kind="class">Wt::WBoxLayout</class>
    +    <class kind="class">Wt::WBreak</class>
    +    <class kind="class">Wt::WBrush</class>
    +    <class kind="class">Wt::WButtonGroup</class>
    +    <class kind="class">Wt::WCalendar</class>
    +    <class kind="class">Wt::WCanvasPaintDevice</class>
    +    <class kind="class">Wt::WCheckBox</class>
    +    <class kind="class">Wt::WCircleArea</class>
    +    <class kind="class">Wt::WColor</class>
    +    <class kind="class">Wt::WCombinedLocalizedStrings</class>
    +    <class kind="class">Wt::WComboBox</class>
    +    <class kind="class">Wt::WCompositeWidget</class>
    +    <class kind="class">Wt::WContainerWidget</class>
    +    <class kind="class">Wt::WCssDecorationStyle</class>
    +    <class kind="class">Wt::WCssRule</class>
    +    <class kind="class">Wt::WCssTemplateRule</class>
    +    <class kind="class">Wt::WCssTextRule</class>
    +    <class kind="class">Wt::WCssStyleSheet</class>
    +    <class kind="class">Wt::InvalidDateException</class>
    +    <class kind="class">Wt::WDate</class>
    +    <class kind="class">Wt::WDatePicker</class>
    +    <class kind="class">Wt::InvalidDateTimeException</class>
    +    <class kind="class">Wt::WDateTime</class>
    +    <class kind="class">Wt::WDateValidator</class>
    +    <class kind="class">Wt::WDefaultLayout</class>
    +    <class kind="class">Wt::WDefaultLoadingIndicator</class>
    +    <class kind="class">Wt::WDialog</class>
    +    <class kind="class">Wt::WDoubleValidator</class>
    +    <class kind="class">Wt::WEnvironment</class>
    +    <class kind="struct">Wt::Coordinates</class>
    +    <class kind="class">Wt::Touch</class>
    +    <class kind="class">Wt::WMouseEvent</class>
    +    <class kind="class">Wt::WKeyEvent</class>
    +    <class kind="class">Wt::WDropEvent</class>
    +    <class kind="class">Wt::WScrollEvent</class>
    +    <class kind="class">Wt::WTouchEvent</class>
    +    <class kind="class">Wt::WGestureEvent</class>
    +    <class kind="class">Wt::WFileResource</class>
    +    <class kind="class">Wt::WFileUpload</class>
    +    <class kind="class">Wt::WFitLayout</class>
    +    <class kind="class">Wt::WFlashObject</class>
    +    <class kind="class">Wt::WFont</class>
    +    <class kind="class">Wt::WFormWidget</class>
    +    <class kind="class">Wt::WGenericMatrix</class>
    +    <class kind="class">Wt::WGLWidget</class>
    +    <class kind="class">Wt::WGoogleMap</class>
    +    <class kind="class">Wt::WGridLayout</class>
    +    <class kind="class">Wt::WGroupBox</class>
    +    <class kind="class">Wt::WHBoxLayout</class>
    +    <class kind="class">Wt::WHTML5Audio</class>
    +    <class kind="class">Wt::WHTML5Media</class>
    +    <class kind="class">Wt::WHTML5Video</class>
    +    <class kind="class">Wt::WIconPair</class>
    +    <class kind="class">Wt::WImage</class>
    +    <class kind="class">Wt::WInPlaceEdit</class>
    +    <class kind="class">Wt::WInteractWidget</class>
    +    <class kind="class">Wt::WIntValidator</class>
    +    <class kind="class">Wt::WItemDelegate</class>
    +    <class kind="class">Wt::WItemSelectionModel</class>
    +    <class kind="class">Wt::JSignal</class>
    +    <class kind="class">Wt::JSlot</class>
    +    <class kind="class">Wt::WLabel</class>
    +    <class kind="class">Wt::WLayout</class>
    +    <class kind="class">Wt::WLayoutItem</class>
    +    <class kind="class">Wt::WLayoutItemImpl</class>
    +    <class kind="class">Wt::WLength</class>
    +    <class kind="class">Wt::WLengthValidator</class>
    +    <class kind="class">Wt::WLineEdit</class>
    +    <class kind="class">Wt::WLineF</class>
    +    <class kind="class">Wt::WLoadingIndicator</class>
    +    <class kind="class">Wt::WLocalizedStrings</class>
    +    <class kind="class">Wt::WLogger</class>
    +    <class kind="class">Wt::WLogEntry</class>
    +    <class kind="class">Wt::WMatrix4x4</class>
    +    <class kind="class">Wt::WMemoryResource</class>
    +    <class kind="class">Wt::WMenu</class>
    +    <class kind="class">Wt::WMenuItem</class>
    +    <class kind="class">Wt::WMessageBox</class>
    +    <class kind="class">Wt::WMessageResourceBundle</class>
    +    <class kind="class">Wt::WModelIndex</class>
    +    <class kind="class">Wt::WObject</class>
    +    <class kind="class">Wt::WOverlayLoadingIndicator</class>
    +    <class kind="class">Wt::WPaintDevice</class>
    +    <class kind="class">Wt::WPaintedWidget</class>
    +    <class kind="class">Wt::WPainter</class>
    +    <class kind="class">Wt::WPainterPath</class>
    +    <class kind="class">Wt::WPanel</class>
    +    <class kind="class">Wt::WPdfImage</class>
    +    <class kind="class">Wt::WPen</class>
    +    <class kind="class">Wt::WPoint</class>
    +    <class kind="class">Wt::WPointF</class>
    +    <class kind="class">Wt::WPolygonArea</class>
    +    <class kind="class">Wt::WPopupMenu</class>
    +    <class kind="class">Wt::WPopupMenuItem</class>
    +    <class kind="class">Wt::WProgressBar</class>
    +    <class kind="class">Wt::WPushButton</class>
    +    <class kind="class">Wt::WRadioButton</class>
    +    <class kind="class">Wt::WRasterImage</class>
    +    <class kind="class">Wt::WRectArea</class>
    +    <class kind="class">Wt::WRectF</class>
    +    <class kind="class">Wt::WRegExpValidator</class>
    +    <class kind="class">Wt::WResource</class>
    +    <class kind="class">Wt::WScrollArea</class>
    +    <class kind="class">Wt::WScrollBar</class>
    +    <class kind="class">Wt::WSelectionBox</class>
    +    <class kind="class">Wt::WServer</class>
    +    <class kind="class">Wt::WShadow</class>
    +    <class kind="class">Wt::SignalBase</class>
    +    <class kind="class">Wt::Signal</class>
    +    <class kind="class">Wt::EventSignalBase</class>
    +    <class kind="class">Wt::EventSignal</class>
    +    <class kind="class">Wt::WSignalMapper</class>
    +    <class kind="class">Wt::WSlider</class>
    +    <class kind="class">Wt::WSocketNotifier</class>
    +    <class kind="class">Wt::WSortFilterProxyModel</class>
    +    <class kind="class">Wt::WSound</class>
    +    <class kind="class">Wt::WSpinBox</class>
    +    <class kind="class">Wt::WStackedWidget</class>
    +    <class kind="class">Wt::WStandardItem</class>
    +    <class kind="class">Wt::WStandardItemModel</class>
    +    <class kind="class">Wt::WString</class>
    +    <class kind="class">Wt::WStringListModel</class>
    +    <class kind="class">Wt::WSubMenuItem</class>
    +    <class kind="class">Wt::WSuggestionPopup</class>
    +    <class kind="class">Wt::WSvgImage</class>
    +    <class kind="class">Wt::WTable</class>
    +    <class kind="class">Wt::WTableCell</class>
    +    <class kind="class">Wt::WTableColumn</class>
    +    <class kind="class">Wt::WTableRow</class>
    +    <class kind="class">Wt::WTableView</class>
    +    <class kind="class">Wt::WTabWidget</class>
    +    <class kind="class">Wt::WTemplate</class>
    +    <class kind="class">Wt::WText</class>
    +    <class kind="class">Wt::WTextArea</class>
    +    <class kind="class">Wt::WTextEdit</class>
    +    <class kind="class">Wt::InvalidTimeException</class>
    +    <class kind="class">Wt::WTime</class>
    +    <class kind="class">Wt::WTimer</class>
    +    <class kind="class">Wt::WTransform</class>
    +    <class kind="class">Wt::WTree</class>
    +    <class kind="class">Wt::WTreeNode</class>
    +    <class kind="class">Wt::WTreeTable</class>
    +    <class kind="class">Wt::WTreeTableNode</class>
    +    <class kind="class">Wt::WTreeView</class>
    +    <class kind="class">Wt::WValidationStatus</class>
    +    <class kind="class">Wt::WValidator</class>
    +    <class kind="class">Wt::WVBoxLayout</class>
    +    <class kind="class">Wt::WVectorImage</class>
    +    <class kind="class">Wt::WViewWidget</class>
    +    <class kind="class">Wt::WStaticModelView</class>
    +    <class kind="class">Wt::WVirtualImage</class>
    +    <class kind="class">Wt::WVmlImage</class>
    +    <class kind="class">Wt::WWebWidget</class>
    +    <class kind="class">Wt::WWidget</class>
    +    <class kind="class">Wt::WWidgetItem</class>
    +    <member kind="enumeration">
    +      <name>ViewItemRenderFlag</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8df2183a957c453839f3382e3db167d6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RenderSelected</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8df2183a957c453839f3382e3db167d6a12bf604f4d939e0cca796847cda4b484</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RenderEditing</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8df2183a957c453839f3382e3db167d6a30a82a0b553e55ed6cdab23a8fdadc8b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RenderFocused</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8df2183a957c453839f3382e3db167d6ab33ff2e9b3f5374810e9875eb2e61f59</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RenderInvalid</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8df2183a957c453839f3382e3db167d6a5c6783973310fc52839117498e0fd604</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Orientation</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2a8d45559e16a0185bf61bfad0a67912</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Horizontal</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2a8d45559e16a0185bf61bfad0a67912ac2ebf22b096a22b18eef23e736aa2e28</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Vertical</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2a8d45559e16a0185bf61bfad0a67912af916b7ec24727db2d972f0770170c7f5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>StandardButton</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoButton</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062aaa5455299757b4f679b36da038a56262</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Ok</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062af92b793210df9123b9be1ee11dd0d36d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Cancel</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062ac31abea0685e68a0e116038d0ad48ca8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Yes</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062a5bf8c24f48fc404ccfea9ae2248a989c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>No</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062a4ca128eca84d1965d7ac1bb8a6936e58</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Abort</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062aa30d8b78fa024381f9807fd878e0eddd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Retry</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062af060b3db6c76d047f1682753fc138f01</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Ignore</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062ac1485cc8119800b35353d5f39231eab2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>YesAll</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062a62bd8313eeee1e2ca5076315b5158d88</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoAll</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a270a5e1af09979a6559f0f39e3d93062a0edc88532d04470aaefe72ee8f09d26b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Icon</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoIcon</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5fa2ad77ae37661ce098ec3134ae56af58d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Information</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5fad16cfa38c4fc25f8a8f893f98a020dd0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Warning</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5fad0ce1bf7328e5a588f9c72c1093589aa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Critical</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5faf62c8ff8ae07c8f988d1c472d68420c1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Question</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aaa26ad9f143951595691fbd604567f5fab79ccb6836e6a346a95ed11497a7247c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SelectionMode</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a74b3f7eb1689a3cbf0ea514ffd20bccc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoSelection</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a74b3f7eb1689a3cbf0ea514ffd20bcccab681964d34d71d850361461bafc46891</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SingleSelection</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a74b3f7eb1689a3cbf0ea514ffd20bccca4fd3c5ba6ce5289a1e732d85f002882a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ExtendedSelection</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a74b3f7eb1689a3cbf0ea514ffd20bccca7784d55577e92022399052c3d4d69954</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SelectionBehavior</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a04aecd34ae0810219e82208a9890de13</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SelectItems</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a04aecd34ae0810219e82208a9890de13afcf79c96af1f3bd64b7b143fd1ec1126</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SelectRows</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a04aecd34ae0810219e82208a9890de13af392e7f86ea1d0807e54de5739011239</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SelectionFlag</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a1ec974261fb0e2b80498473dcb6c91ed</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Select</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a1ec974261fb0e2b80498473dcb6c91eda5317beeb399a97e111e7c99dee9161d5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Deselect</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a1ec974261fb0e2b80498473dcb6c91eda9e3f37e4a5cbd8dd26814bb8354492e2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ToggleSelect</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a1ec974261fb0e2b80498473dcb6c91eda2e9e054e722c4058ec5c04b544be7724</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ClearAndSelect</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a1ec974261fb0e2b80498473dcb6c91eda8813152836bebb1721c97b8d0d6443c2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Side</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Top</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3a68b058364f8c2380c1d369a321f22f92</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Bottom</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3a87ae7d3cb692a5a4e8f18a7fea93a8a8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Left</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3a6568fecac7c7d7223afaed240bcfdd9e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Right</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3acf431c3ce5eb6f14c0390feb14a68004</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CenterX</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3a85c5bceaa27f26663a1f82d20dbb29b7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CenterY</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a6f4636bcc6ab3c075165d249b3a5a3a0a5872f3e46be874591b8390a4d1200f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AlignmentFlag</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignLeft</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fad033ef69b45d0b75633be34168c9b606</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignRight</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fab250310385383f0b2f68d4e0ad5567e1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignCenter</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa121104cdbb5db77c7d038813a93998e5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignJustify</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa18cdf9d975a5a41afa182aabfde0de88</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignBaseline</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa81ebe44f54e9c4ef2c3724fda9c3283c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignSub</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa81309664fff5d8406dab45c323d9f6fc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignSuper</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143faa19e58feec8b10ac71c857149a905051</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignTop</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa58fe5182bd266132c59718c6d30945a9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignTextTop</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa843f362e4ccfcc195ffe96b79abf1339</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignMiddle</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa2ed90f01dbf74049f428d33769d48e3f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignBottom</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa4f2aa4abba8500e25651bf8db5f0c162</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AlignTextBottom</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab8f772c69bc8180c31f9e4f4593b143fa40acabc492a1f8a5a0ed98881b1128cd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PositionScheme</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2551043da5512cfe7b857c5db6e5ae40</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Static</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2551043da5512cfe7b857c5db6e5ae40aab8d71e0c30250d77e05b6c1708e020f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Relative</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2551043da5512cfe7b857c5db6e5ae40acceb16577ef89ec5d7dec10507e3142a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Absolute</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2551043da5512cfe7b857c5db6e5ae40af924d8e24cb9e55dbeac9284c5640c69</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Fixed</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a2551043da5512cfe7b857c5db6e5ae40a2e157222a2018e8665c15c1ba56df530</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Cursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ArrowCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6ab8be050ebabfd528fce3c8b4ce972088</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AutoCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6a9cd0118f12b79f6894086fa07777f0a5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CrossCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6a069ee2c69ffe75cc06bff8c6c946f21e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PointingHandCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6af860d39b9a2ba8f7d7359453bf15a37c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OpenHandCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6ab8033fd03ad261e11583fe7c4200b0a1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>WaitCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6a41173c71ae3df9016a1057a24f01f20b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IBeamCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6ae10e6e6970e8a042483ccaf1f66c7e44</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>WhatsThisCursor</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6dc0346a6ae888d6d4ab44f022e61eb6a4adb56b89e435dedd82aac10a7cbb5ac</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>CharEncoding</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LocalEncoding</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52ae31c944a7e88c44611f9317e7c1223e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52a92c04a55980fec5344377e55b271cfd0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gab70170afb6347d18ff9dac17e05e133e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoPen</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eaa8125e799a1289cd6dd0b2595a496a82</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eac1888b9cee513c2bf98c6fb9f4e307ab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea7667698a6fb5adbf8f128519cbb93af8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea26ade9ba6072abfcef185cca70227d15</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea45cac3164febb16cf7028403e01077a0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea758c17a422e91d2e497f15054123e302</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenCapStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ga819ef9a03fb79c9834508b79eac604f2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FlatCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a394700c2ab47fe2b23564ced1c1e129a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SquareCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a39a378820d5058a3677f9852c5783783</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a3d1c8a630cb15cec7b33434d9564182a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenJoinStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaaf495faaba3ae03366a1646a4b5526be</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MiterJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bead2f7df311a138e580c95d728b0128004</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BevelJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea9550acce5f4da6e134f34392d7b072ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea3be2fdf749560b7229b3472d8ff6ad12</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>WBrushStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaffe43936b1bbb1ca2b308572fcdeb157</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoBrush</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157aa6f513232fadbbcaf8a576b7aaefc67a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidPattern</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157a574469ed16523a26c683e83c8fee3ed6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AnchorTarget</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6c93a6e97016801a310275457e43f333</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TargetSelf</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6c93a6e97016801a310275457e43f333ae976883723836b4423d81ecf590bde0c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TargetThisWindow</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6c93a6e97016801a310275457e43f333ad4da0533d8114dc867406f18fef5bcce</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TargetNewWindow</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6c93a6e97016801a310275457e43f333a95e5b4e8a2eed99252fc0eb2bb483cd8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>TextFormat</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a140dea437d52d3d7c438ea3bd16a1480</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XHTMLText</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XHTMLUnsafeText</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a140dea437d52d3d7c438ea3bd16a1480aeff9ccfd4130ea9922c46d94f82119b7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PlainText</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>GlobalColor</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>ga9686ea88ce4db2c0a12ea84452f60133</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>white</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133aa8fbe7a33681fc09e0231d6dfbd90d66</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>black</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133acf5dee884803e93b444f8bd222956bd6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>red</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a57462cb05392ee7e39d27e5f66252c42</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkRed</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a9a39ff0e1a5aa34a2e69407f8895eb4c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>green</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a9de61f6576b0207b4d5c988cbeee1b8c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkGreen</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a75712f6d7896b12273323acd21b28d7e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>blue</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a0cb88ce2189a8986f24a4409498e490e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkBlue</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a8d8dd4dab4ab7688946bfcdfcb468b8c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>cyan</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a52646bf8927d2018adec6814a2f903b8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkCyan</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133afb298721c24d10cd3d47c5c8efec0042</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>magenta</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a434a521950245ccd5041ef2d74b04fe8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkMagenta</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ab18a96d57e7cdcf8a986c4f112f5d18d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>yellow</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ae0950d4b5d4c4c9b98e3aa7334bda80a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkYellow</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a7621702d04fd8d039e1a3230a8e7b2e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>gray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a2ae20330b5a9eb890119be5074615858</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>darkGray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133aefe4fd296d57518c9566b524215f66ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>lightGray</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133ae3718148b44536034789bc88ba71564c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>transparent</name>
    +      <anchorfile>group__style.html</anchorfile>
    +      <anchor>gga9686ea88ce4db2c0a12ea84452f60133a6975fc5993d75cf4e71f097b548927a9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>KeyboardModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>ga50f91169486bada5931f3adc3a623091</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a7c97a6a0da658c8b189acea1f4c0e252</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ShiftModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a206924f86e7455d5d88c30a1d61899b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ControlModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091ada8f2dab72c395e56d897b769f6d0050</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AltModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091af3044546ac4679d9259be8332cca0dd7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MetaModifier</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga50f91169486bada5931f3adc3a623091a73abfeaa5bbd55ab4f28fabf3d134720</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Key</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>ga34e65660d30e69c56aa636a8856aa52d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_unknown</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da3b769e7e817ab438b6341fb15598aa2c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Enter</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dab3c8e06184697e8b55705ec6e92ef57a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Tab</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da15a17a0b9c7794f1e212bb209f9a6b1d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Backspace</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da9b6c475089ff4ecea25ba729d4c6a771</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Shift</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4daba0b20a0d45ae1265acf9233bf9b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Control</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da7faac129eabb364618c2f147775dddd8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Alt</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da78df9bb6a131c160d5d7850aebbe2399</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_PageUp</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dab5764176c1fbc5b3058e545708bc2c7c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_PageDown</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da67fdcf0a21fa225f138ae7eff5dc5d02</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_End</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da52f767d967e30a4ef2b87375b58c3758</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Home</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da77efa77ae9e1a0d0da90a6da05978f3c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Left</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae67dc2b36f94673c36614c36a22c86a6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Up</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da292b7bad0c08eca53003b16887dbbfa4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Right</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da36408ed64c87279baf6752a718f1d867</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Down</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da81ce19fbff7cd5e33d311df5dc036b7a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Insert</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da1b9d45e03463b8ce85e77072ee3ca7aa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Delete</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da0974cc95023b3b3fcc89bed74ec4b820</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Escape</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da6fdfa052fee9a0ecad21a8ef29fc4a5a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F1</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da2efc2110e512a5001b8ce6d58d940f3e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F2</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da7014a077073ead5bde183b3cbf4e8193</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F3</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da45c3287676adbc30f53facff89fd5001</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F4</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da444fd761aef07334c7bfbb59c1eb49a7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F5</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da8ba749e5623684d7f908b5516eb474f1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F6</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dacc96e9d1ed8d5e11bac5d68623151694</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F7</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da124e3d34f1a696e33027fe48c003055e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F8</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4e8fafdcba3de0933febe02c13e81a71</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F9</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae8d582832595b29a69a0a26a19b3cf53</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F10</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da971d948e3abff0d42f8aa9409de16531</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F11</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da4dfdaa48520aa89b9f9b9caf7e31e9a4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F12</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da9e048d50a8cc62e258572f8abe8d2412</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Space</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da5ec86a768d9ba285b2143df9977b5239</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_A</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da8eed1379a2c85aa3132f7f3170f95ea8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_B</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da069dbddc7a4b464624bba14f13c2084a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_C</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dafddfb22114bd3d90f0ddb1c65feb3516</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_D</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae1a302cbded84b1202a5107c808ed740</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_E</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae454998d6c5ac2d5f7f6c91f0df2c71b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_F</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da098250f2140b5e2fb5b46e0ce5f10af5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_G</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da41e1288722f2b2f160aa81c28eccc4f1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_H</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da716d8d1ef8dfd3aac7dbcead493127b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_I</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dad927cec36329c7d65d751a8f031a249f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_J</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da59bef2a0589454049c2565648a6693ff</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_K</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daefbef7cec0c75b7fc2a53f573894b109</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_L</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da1e4f578cb8fb4a9319525b7a6af32eee</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_M</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da88915645dbc4db17dfe3308fb65e9127</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_N</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da27d96fcd466dd0bdc867348ef07c0460</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_O</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da835039108055255d92e72f6ea9eca896</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_P</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daf681b38469fcc9b26a2866db5007fb46</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Q</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da19771f87de22387fb76a417ae9b3ce89</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_R</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da3ae47d7bd97b735e27c873c17d08e740</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_S</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da386061206cf7e0886720025eb2d152de</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_T</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da468cd3a60da863a3e5c80c739c3ff789</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_U</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da65cc1a8b2bd95606398560bab5309e7e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_V</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52daf64151895196cf7907e5274d297bd65a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_W</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52dae4d913efd09ed5ba93e8e73d636e350a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_X</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da606e38f4f386d7bafd43c04d0d6a8d6a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Y</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da80f28601fb3b74843eb22f9f0381f076</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Key_Z</name>
    +      <anchorfile>group__signalslot.html</anchorfile>
    +      <anchor>gga34e65660d30e69c56aa636a8856aa52da2b51e784d1e7228464fde06b4d37f6ad</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>CheckState</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a59dae4dad2967d1d0f9b765f468442fb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Unchecked</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a59dae4dad2967d1d0f9b765f468442fbad5dca88ed5fa2185a98cc1f4c686cd9c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PartiallyChecked</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a59dae4dad2967d1d0f9b765f468442fba276bb5f9da28be5fc0685d7a5cc2296b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Checked</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a59dae4dad2967d1d0f9b765f468442fbabc1a90642e7fc65241f70c11e9f90210</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PaintFlag</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a23a1002020ee93ed4679d351b7350de3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PaintUpdate</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a23a1002020ee93ed4679d351b7350de3a0be7215fd7c15723ada0968fceae0259</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>RegExpFlag</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6bde75e90de6c0a1611951ae632e2ca2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchCaseInsensitive</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6bde75e90de6c0a1611951ae632e2ca2a2d1c5d56629dba26cf69a10604814765</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>EntryPointType</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>af4b6ed5fd28b4f5fa141b153c1107349</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Application</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>af4b6ed5fd28b4f5fa141b153c1107349a6688bf68bd3aeee4cca7e75a68dee7f1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>WidgetSet</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>af4b6ed5fd28b4f5fa141b153c1107349a932eaa79ae0d1f31e3cb240cf5ff0826</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>StaticResource</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>af4b6ed5fd28b4f5fa141b153c1107349a48135d5cd84f8b382b4c9a5c1b90234a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>MatchFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gaad8dd5072a40c11a34ee548bfb20b2ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchExactly</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa7b0e63f3888f29b33a722dade0f2bfe8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchStringExactly</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baac2dc009d041fc6e24084ed6be94a9747</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchStartsWith</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baaaf45aa78ff6ae362f112fa1988104730</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchEndsWith</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa0b444585cace7576dda80036805d93bf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchRegExp</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa801be4d30b88ade43408a788cef7b6ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchWildCard</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baae7967680e21f7dae7b603a1f1c5bf44a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchCaseSensitive</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa72ef48ecccae23d56c8a5bbeb400568d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MatchWrap</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaad8dd5072a40c11a34ee548bfb20b2baa2e90a2f383a7da7e73e8f498e3f2faf5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>HeaderFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gafb18b4339442f1327c2a65850f3d8a53</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsCollapsed</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53a55020edcd8019b7fd0b330283b194929</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsExpandedLeft</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53adb54e2a704ae37581af6cc33828fef71</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ColumnIsExpandedRight</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggafb18b4339442f1327c2a65850f3d8a53ab8f2b2845555220afc9c3c24c43194cd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>MetaHeaderType</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a9d76d7ac3eb4b1005a35fdc1500c0dcb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MetaName</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a9d76d7ac3eb4b1005a35fdc1500c0dcba91a1c3672cd2dd1f7695da99425b9c75</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MetaHttpHeader</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a9d76d7ac3eb4b1005a35fdc1500c0dcbac1676cae99ab86e4e864108dc84191b1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ItemDataRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga0ae864e12320f9f89172735e075ed068</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DisplayRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a5ed17aded8a0e3b712698cf85a218f1f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DecorationRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068aab6678fc176854f7990d6cff4eed779e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>EditRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a6bc0da3ea683a06ee293a5a15f903cde</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>StyleClassRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a776934b313f273b8e5e602e7eee9f73b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CheckStateRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068aad55e3ad8d7b76279adfc160bcb74940</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ToolTipRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068abde5f65c6b5cab667d11d1ceb87e4606</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>InternalPathRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a2f954b164f69cf17133993d15f25f8e5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UrlRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a37c19d2357fb1de30464a0fde4cb5395</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LevelRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a4b121c4303b1ab17f6347e950af65c21</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MarkerPenColorRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a80b9aeddc46a50e7f71b7fd3b3dc2d7d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MarkerBrushColorRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068ae77c18ea017e985b9c029f56c2417ddd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UserRole</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ItemFlag</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga1d77c4de293aebfacbdde124de06b8b0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsSelectable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a77f858c86a06358abdcc64e4f9d03e40</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsEditable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a8664c482d721bbcb73539a924c7a9fab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsUserCheckable</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0af309bd7d1183d934c73aefb2830e591c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDragEnabled</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a2b0edddfd15d67a84723c9043479ced1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDropEnabled</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a95d23063251001545d4bfab1308879a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsTristate</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0aacc3aa45a6c6197687337399315826b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsXHTMLText</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a8ce71c5a5f185d9097b4bd596c71315e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ItemIsDirty</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga1d77c4de293aebfacbdde124de06b8b0a95a89bce0ba3417d61392eccc09995ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SortOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga4173856040cf108a9c7360927a43ebac</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>AscendingOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga4173856040cf108a9c7360927a43ebacac2e51e9fbb9a1250c908443700e03d3e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DescendingOrder</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gga4173856040cf108a9c7360927a43ebacaaca46a90a3bf0912bf035a380722c9f3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>DropAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>gaca801bdfb957c360c5f8709cc46949aa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CopyAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaca801bdfb957c360c5f8709cc46949aaa153a9813fd5eb77e31695657ac9cfb68</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MoveAction</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ggaca801bdfb957c360c5f8709cc46949aaa3f0ed7a05e822a2623d65f15e573bc73</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>asString</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga57b5cadd177847f51eaeb0cee23782c1</anchor>
    +      <arglist>(const boost::any &amp;v, const WString &amp;formatString=WString())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>asNumber</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga2494f8093b2b8f2f9c0aa7699e7bfc2a</anchor>
    +      <arglist>(const boost::any &amp;v)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>registerType</name>
    +      <anchorfile>group__modelview.html</anchorfile>
    +      <anchor>ga91842a84102ee15d41102ccf0745f4e4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, A, C &gt;</type>
    +      <name>operator*</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a23f30d5fe6f187545e465fac80127ebd</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, A, B &gt; &amp;l, const WGenericMatrix&lt; T, B, C &gt; &amp;r)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::ostream &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aff7b11fc755a2e56520fb101583dc221</anchor>
    +      <arglist>(std::ostream &amp;os, const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator*</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ad54d791ed612cf1778624dbf2a246184</anchor>
    +      <arglist>(const T &amp;factor, const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator*</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a29a7903618855cb6476731ed733c8616</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;m, const T &amp;factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator/</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ac12de4dad09fb739a507c56ab1566e8e</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;m, const T &amp;factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator+</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>aecbad6d74e4047f4216425f51405fafc</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;l, const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;r)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator-</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a104f464c7d86e10837d0aff3da773645</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;l, const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;r)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt;</type>
    +      <name>operator-</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a8ee18a66b3018b6b8bf19513d2cf1810</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; Side &gt;</type>
    +      <name>None</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a6181c1f1a8c81efbcf9ebe03fab48a3f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; Side &gt;</type>
    +      <name>CenterXY</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a5a0074dd261548173d62b082e3daf3bf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; Side &gt;</type>
    +      <name>Horizontals</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a41197ab52b0093b4e148a910d9d1342c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; Side &gt;</type>
    +      <name>Verticals</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>af6661575a0ba1c14062617adef2c0dcd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; Side &gt;</type>
    +      <name>All</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>a3358b8309fdb63a402efcb1a577855e8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; AlignmentFlag &gt;</type>
    +      <name>AlignHorizontalMask</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>acf15143d8188dfb0bced5e5032400b16</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; AlignmentFlag &gt;</type>
    +      <name>AlignVerticalMask</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ab1b563b1c886c2928690f55b821be9f3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WFlags&lt; MatchFlag &gt;</type>
    +      <name>MatchTypeMask</name>
    +      <anchorfile>namespaceWt.html</anchorfile>
    +      <anchor>ac1a13c4f81c39de4d4e39ba0eb1ecae6</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::SyncLock</name>
    +    <filename>classWt_1_1SyncLock.html</filename>
    +    <templarg></templarg>
    +    <member kind="function">
    +      <type></type>
    +      <name>SyncLock</name>
    +      <anchorfile>classWt_1_1SyncLock.html</anchorfile>
    +      <anchor>a8d5e0c8461760c1eeafc8c14bcfb9684</anchor>
    +      <arglist>(Mutex &amp;mutex)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>SyncLock</name>
    +      <anchorfile>classWt_1_1SyncLock.html</anchorfile>
    +      <anchor>afcf841c1b57a78e1664d448b03840297</anchor>
    +      <arglist>(Mutex &amp;mutex, boost::defer_lock_t)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>lock</name>
    +      <anchorfile>classWt_1_1SyncLock.html</anchorfile>
    +      <anchor>a191047ad7895339eecde9eb230be25ea</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractArea</name>
    +    <filename>classWt_1_1WAbstractArea.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WAbstractArea</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a2ca3fe7cc0229dffe137d2cd4edf7c50</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHole</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>af3c8461b36ec142326d0204e16c9bb34</anchor>
    +      <arglist>(bool hole)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isHole</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a5cf67f536eaecba3c2165fc927c76707</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRef</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a4c3350282fd3563886c093257ecd3119</anchor>
    +      <arglist>(const std::string &amp;ref)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>ref</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a34cbb1334be3c8813ed1f8b401028544</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResource</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>af33f85a8505629ea9ded1ec1b962c359</anchor>
    +      <arglist>(WResource *resource)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WResource *</type>
    +      <name>resource</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>aed1e5e63fee2a9f7d2a58974902d4145</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTarget</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a4b1d968e9681eefe588916c8a2ae944b</anchor>
    +      <arglist>(AnchorTarget target)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AnchorTarget</type>
    +      <name>target</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>ab43a761767de10f92b00dcae6b8adff4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternateText</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a0119bf73439f81f83b754906785746bf</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>alternateText</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>aa4902223227eded25c34c556edb17b2f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a310e8e1d6360d22bf8bf0e484a52b8f9</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a05cd3a6e69b3dd98f10aeac4e4355e23</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a93454d8fbd260de0319ac6e81e025a82</anchor>
    +      <arglist>(const WString &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a8a0a2263fd7a2c27aaedd9dd2a6519c8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addStyleClass</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a21e4667870ca5d036d4f284407c5bd1c</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeStyleClass</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a3042ae12df27fa37b4371c61e63feb52</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCursor</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a818e8fae698db20d7cc6e5788891c04c</anchor>
    +      <arglist>(Cursor cursor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Cursor</type>
    +      <name>cursor</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a312cca5512a261011dab5014574f1af5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentDown</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a36ccd6ca70e5ae98f6257034d294ba7e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyPressed</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>ae4053ad9c11e54135c43f2b667aeb859</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentUp</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a42b2613337cec7ea05d3c9f0cb679ee3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>enterPressed</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a3fc50b2d0632bc6b02fd3c1c350042fd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>escapePressed</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a0527bbfdfdee7bdf24e6860a22ff3dff</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>acc47a02510ddcc77db551fa51e1479bf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>doubleClicked</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a82ece2a2dcb5b292c997a4c2f2a5b5b9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentDown</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>ae37e2b91aee383e8a19ce6b507f2a98d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentUp</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a5b4531eae4eaa76257809b229d0aea4d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentOut</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>acdfc86cb6fbbc48686a8157ae5d164cd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentOver</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a24aeff45daab0cea72d38fdaf35019aa</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseMoved</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a574e2e0de96f0fc4a31a4fb5a21e2262</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseDragged</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a79496c197ea3f3c35c853eaab18bf432</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWheel</name>
    +      <anchorfile>classWt_1_1WAbstractArea.html</anchorfile>
    +      <anchor>a3dbe39c26769a63e4bf63020e31e9f22</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractItemDelegate</name>
    +    <filename>classWt_1_1WAbstractItemDelegate.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAbstractItemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>a9187627f08a21042eb10443ff7b8d27f</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WAbstractItemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>a1503db9b186ba0f21bde4852f1bcbf8a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>adc95cc43b119f4e8ebeb36a39c015fa4</anchor>
    +      <arglist>(WWidget *widget, const WModelIndex &amp;index, WFlags&lt; ViewItemRenderFlag &gt; flags)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>updateModelIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>ac5aefa0246f0fed2dcbf9493a98205c5</anchor>
    +      <arglist>(WWidget *widget, const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>editState</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>aa54d70f669bd6cb7b8f90dca1f2c8c82</anchor>
    +      <arglist>(WWidget *widget) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setEditState</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>aeb49d13eed388ceed70943b5c6d4cd05</anchor>
    +      <arglist>(WWidget *widget, const boost::any &amp;value) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>a7c8d7a61e57c0478bc3ec6f66f931aad</anchor>
    +      <arglist>(const WModelIndex &amp;index, const boost::any &amp;editState) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModelData</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>a2b4b7bc9c3782190b5b0f91f0cf83c18</anchor>
    +      <arglist>(const boost::any &amp;editState, WAbstractItemModel *model, const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WWidget *, bool &gt; &amp;</type>
    +      <name>closeEditor</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>a02e957cf6c1f1e9a98c6de7dbe33ff07</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const Signal&lt; WWidget *, bool &gt; &amp;</type>
    +      <name>closeEditor</name>
    +      <anchorfile>classWt_1_1WAbstractItemDelegate.html</anchorfile>
    +      <anchor>adca0c953fa34ea4c998ec6a22865f05f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractItemModel</name>
    +    <filename>classWt_1_1WAbstractItemModel.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="typedef">
    +      <type>std::map&lt; int, boost::any &gt;</type>
    +      <name>DataMap</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a2e3827f2fab4fb171077dcfced9078b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAbstractItemModel</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>aceb39c2027dc4dc464ac5942798e62e6</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>abcf7912a95a0a60f8e9b1c37d30b8383</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ab0709a8f71fd5df882f29bb29fd055f0</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ab5e60f81be797c0553a010eff5b9a592</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; HeaderFlag &gt;</type>
    +      <name>headerFlags</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a6bb2a7e70f816606351be4a23c453a49</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>hasChildren</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>af26d7dc00f8c1bc15fe3d5d4b64bb371</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ada454d45706ca0c1a0921dedd351c48c</anchor>
    +      <arglist>(const WModelIndex &amp;index) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a9112b74d160f916ef75fb6c1c09dd8fe</anchor>
    +      <arglist>(const WModelIndex &amp;index, int role=DisplayRole) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual DataMap</type>
    +      <name>itemData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a74055362d502d80375c6599f6f8ea1cf</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>headerData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a86bbab7c809fce4de9b5cb543b2fb124</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a83f37bf04b8574b328c139b02523b8cb</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndexList</type>
    +      <name>match</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a3da35dbccda1599067d1358458f2d48c</anchor>
    +      <arglist>(const WModelIndex &amp;start, int role, const boost::any &amp;value, int hits=-1, WFlags&lt; MatchFlag &gt; flags=WFlags&lt; MatchFlag &gt;(MatchStartsWith|MatchWrap)) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a0301a303654b113f7f11686dff277228</anchor>
    +      <arglist>(int row, int column, int role=DisplayRole, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>hasIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>af8453f8f06427e598a35000723c5b86c</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a1eded9eb68b9247ae2ff371f74a5e5f2</anchor>
    +      <arglist>(int column, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>abcafc38dc24fd9edf70eafe834ca411d</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a27428d1a02830336ec9db69c6d0b0762</anchor>
    +      <arglist>(int column, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a29cf3003ee8f97b2b5de9c52af27361a</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a70856db8c322be8c7f397a932165a943</anchor>
    +      <arglist>(const WModelIndex &amp;index, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setItemData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ac60d1042bf1bcea9c262d3de30c520fd</anchor>
    +      <arglist>(const WModelIndex &amp;index, const DataMap &amp;values)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setHeaderData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a57f5d417f933440db0d38ece7dd370f4</anchor>
    +      <arglist>(int section, Orientation orientation, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setHeaderData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>afad1dffa150e21c73f71802d9784279f</anchor>
    +      <arglist>(int section, const boost::any &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a133931424d4daa8422bcdea911cda713</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>expandColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ad7da483e201a6a0d717438049ce1f1d1</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>collapseColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>accd1f651c0b01ae897a52b9ad4b0f553</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void *</type>
    +      <name>toRawIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a5c4db8b3265c914f77efead35450f6dc</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>fromRawIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a85beaaea2e8609556543019618fd2a89</anchor>
    +      <arglist>(void *rawIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>mimeType</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a4c62d2cc18d133d7926a91b4f2eebe62</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::vector&lt; std::string &gt;</type>
    +      <name>acceptDropMimeTypes</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a9e92a29b30e3d4de1f6df9f505e952c2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>dropEvent</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>af9142a0328922a1b6872f0186164b066</anchor>
    +      <arglist>(const WDropEvent &amp;e, DropAction action, int row, int column, const WModelIndex &amp;parent)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>insertColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ad0e634e9fb1276703e41438e8aa50cca</anchor>
    +      <arglist>(int column, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>af4a389e8544fc887a24099c506c8bd7b</anchor>
    +      <arglist>(int row, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>removeColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a7b46c63a32eb9ca9838a1a7cd5853552</anchor>
    +      <arglist>(int column, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>removeRow</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ada64c5f4d4eba6cecab2c1e443372cb3</anchor>
    +      <arglist>(int row, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>adf3aee29503da7f4a78bafeb96956195</anchor>
    +      <arglist>(int row, int column, const boost::any &amp;value, int role=EditRole, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>columnsAboutToBeInserted</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a750a7bcd42edf3475de6dc5bf7f1ef03</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>columnsAboutToBeRemoved</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ab7c59263c680974b9b226cacb612b107</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>columnsInserted</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ac56221d07f5ef246f10dccc93756cb3c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>columnsRemoved</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a2aecbfc4363903aed6d3ce4d176c82d0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>rowsAboutToBeInserted</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a8c0a94560a23519cac3e7cfb983af525</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>rowsAboutToBeRemoved</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a530ab7bb31240fafe0a3c88c9f4efc4f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>rowsInserted</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a54c971088bb9b424f97fe31c17f8f12f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, int, int &gt; &amp;</type>
    +      <name>rowsRemoved</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a0f73bbfb08f2739ac12881f62a61bc7f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; WModelIndex, WModelIndex &gt; &amp;</type>
    +      <name>dataChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>aa074e5bc55394252a609ef17d071b563</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal&lt; Orientation, int, int &gt; &amp;</type>
    +      <name>headerDataChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ade8f3edbd36f170c6e1199222802de0d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal &amp;</type>
    +      <name>layoutAboutToBeChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ab377ac2fcb9de9d191bd1353665d1389</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal &amp;</type>
    +      <name>layoutChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>afe7cb1d5186881f83aa8f0e452aaef66</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Signal &amp;</type>
    +      <name>modelReset</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ae28a4ba2ce1dd93e7479dfa152a65efc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>reset</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ae5ef6b96132d87e8310dcb22deedcd48</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WModelIndex</type>
    +      <name>createIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ac837a73fe423255035ffb076946de122</anchor>
    +      <arglist>(int row, int column, void *ptr) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WModelIndex</type>
    +      <name>createIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a3202723691a65252add937768c326361</anchor>
    +      <arglist>(int row, int column,::uint64_t id) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>beginInsertColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a1b0c2b404763032e48637a2a3615b2b6</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int first, int last)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>beginInsertRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a91e52898a805996aee496877cd090eb4</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int first, int last)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>beginRemoveColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a8dbef6f3633812d2df7289cb7cfb192b</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int first, int last)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>beginRemoveRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a5286cc70219c8d8d720abc255b0183f5</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int first, int last)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>endInsertColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a2422779ff8af9d19c6bfd3e169c84422</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>endInsertRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>ace03c0bc5b0b57b6add882aaf444b62f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>endRemoveColumns</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>a840b32221ade669cb4e987f86203d1d3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>endRemoveRows</name>
    +      <anchorfile>classWt_1_1WAbstractItemModel.html</anchorfile>
    +      <anchor>afceaf639f2a5088f45c00f03d550f262</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractItemView</name>
    +    <filename>classWt_1_1WAbstractItemView.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>EditTrigger</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac87a6b323815ff48d7f85c84e465515e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoEditTrigger</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac87a6b323815ff48d7f85c84e465515eae85d0887bc1c584abba0e93affcaded7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SingleClicked</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac87a6b323815ff48d7f85c84e465515ea2d2935d52b141dd975e6f027605fd7e2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DoubleClicked</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac87a6b323815ff48d7f85c84e465515ea10e41f136319c7435b1f11c09ecae20e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SelectedClicked</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac87a6b323815ff48d7f85c84e465515ea0d25ca40e97882c6a48be5a35453f428</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>EditOption</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6fe37e13c7dc680f4cb609155d00d3f8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SingleEditor</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6fe37e13c7dc680f4cb609155d00d3f8ad77e21c49cf9401fb62b42eab735825c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MultipleEditors</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6fe37e13c7dc680f4cb609155d00d3f8a2c5935ac68521a8105d10db49f777d64</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SaveWhenClosed</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6fe37e13c7dc680f4cb609155d00d3f8a1253248853319ea8f6811b2fbd5712f4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LeaveEditorsOpen</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6fe37e13c7dc680f4cb609155d00d3f8a672f0ea9e8cb648af5b0a502c2eb1c02</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ab6a137595a1c6ddb9406d328a3cbf261</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>abd583faed8e2fc3936d1b5545c4bbf84</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRootIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a3f8ecef3dac343faa00efc801e4e4c1f</anchor>
    +      <arglist>(const WModelIndex &amp;rootIndex)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WModelIndex &amp;</type>
    +      <name>rootIndex</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a436c8406d9f7c925516873b25d2499aa</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a2954ce5999e6ca683fef576777973496</anchor>
    +      <arglist>(WAbstractItemDelegate *delegate)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemDelegate *</type>
    +      <name>itemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a1aa47fbbe30066c5891b4dc2362b9278</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemDelegateForColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a574bc36ec752012ba4a613e0e11e064e</anchor>
    +      <arglist>(int column, WAbstractItemDelegate *delegate)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemDelegate *</type>
    +      <name>itemDelegateForColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a8d3d37b13cc684248e06700c40dd7672</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemDelegate *</type>
    +      <name>itemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>aca7a64338eb788e4f25b8098c546d4c7</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemDelegate *</type>
    +      <name>itemDelegate</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a410dd5f165b86719e0541ab21f2602f6</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnAlignment</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>aafd2a6edd366b620c71d9b3a89ed6590</anchor>
    +      <arglist>(int column, AlignmentFlag alignment)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHeaderAlignment</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ae0a47295b90d60ee4415b5d3e49b30e7</anchor>
    +      <arglist>(int column, AlignmentFlag alignment)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual AlignmentFlag</type>
    +      <name>columnAlignment</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a2cc9fc6b51516ca55cb2fc8ac4849fc7</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual AlignmentFlag</type>
    +      <name>headerAlignment</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>aed0c9ffbd4d94847fe9b18e40499e02d</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setAlternatingRowColors</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a9d22f8c92ddf7259f32496f55d9d50ec</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>alternatingRowColors</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>af22bebcd2d22cee6e522ea8ca35ea251</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>sortByColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>af782069e7307d3a4ce2395336f338c4e</anchor>
    +      <arglist>(int column, SortOrder order)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>sortColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac150b261da45861496ac193d739c632c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SortOrder</type>
    +      <name>sortOrder</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a8053406e21d5004a362c6a44c804fb48</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSortingEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ae1c86a0f37f97f63aed3b00fd8ffad7c</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSortingEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a62b873ab83a8ab64dd873c368daad387</anchor>
    +      <arglist>(int column, bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSortingEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a3a99c2e2b3fc0a903013e071850d7c0a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSortingEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ae105934bf906ce198e2487c02cdf5e06</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnResizeEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a4fe24c3ed80cc59f6bed2ed7795bc127</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isColumnResizeEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6342821d3d30d84fe2af6129278801c0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionBehavior</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ad59b47cf9a1c5a65c5adc3e1900ceb5c</anchor>
    +      <arglist>(SelectionBehavior behavior)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionBehavior</type>
    +      <name>selectionBehavior</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>aef2ea7e1f47b2305acb0193338f15f3b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionMode</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>af6fcd9761e2f7a3b497d3563c849d320</anchor>
    +      <arglist>(SelectionMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionMode</type>
    +      <name>selectionMode</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a55fa51c47216026d7bef4ab5a8c1e963</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WItemSelectionModel *</type>
    +      <name>selectionModel</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a9df52fd9b921355e85e21d93731e2216</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectedIndexes</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a67c4b49e04db1f19a7788c4580dfc25b</anchor>
    +      <arglist>(const WModelIndexSet &amp;indexes)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a4423d5412ff1b4bc67f0a8f443f12136</anchor>
    +      <arglist>(const WModelIndex &amp;index, SelectionFlag option=Select)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSelected</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a413bb7cc395201066236bbe69df38b0d</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndexSet</type>
    +      <name>selectedIndexes</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>afde08bb75862592d81dc93f30ed7dcd6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDragEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a0ca99b835708d990b90000917045738e</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDropsEnabled</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a1eda46c8e9a21af7f6281e7096af8fbe</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setRowHeight</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a7ffe86a3f0b58272125abc2a20b997ad</anchor>
    +      <arglist>(const WLength &amp;rowHeight)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WLength &amp;</type>
    +      <name>rowHeight</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a7c17d90017faeae88ad2674242e95082</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setColumnWidth</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>aa80794ca5438e2b9971e8f85919353fd</anchor>
    +      <arglist>(int column, const WLength &amp;width)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>columnWidth</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a123471a17688391890ddc4e6f34c9a51</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnHidden</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a120156dc59eaf3608916b679d937c5b8</anchor>
    +      <arglist>(int column, bool hide)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isColumnHidden</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac7cd89d9f08ab3fa6493cae2b9f596fc</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hideColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>af3755e7f96e969dc608c6cfd3325c09e</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>showColumn</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a2cbbe932d872baf103d88c6186e9b52a</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setColumnBorder</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a6b58e9040dfbe9547cb737c7d5e71e0f</anchor>
    +      <arglist>(const WColor &amp;color)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHeaderHeight</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a5a530ce3f51a1e674360b1c106fcf261</anchor>
    +      <arglist>(const WLength &amp;height, bool multiLine=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WLength &amp;</type>
    +      <name>headerHeight</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ab1019ff4cbcd9a22d5c52203c300decb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>pageCount</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a370beb06a2e6c82659756ba63a516b14</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>pageSize</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a2cc5d8f54c95a4d8d45c86ea85b428e9</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>currentPage</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a66b3bd22b9d57d9c466280a2f96b44c3</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setCurrentPage</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a71585006c31128c3d606cc976b865008</anchor>
    +      <arglist>(int page)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEditTriggers</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a93d2efc8642a6b9c55b35b7665a13da5</anchor>
    +      <arglist>(WFlags&lt; EditTrigger &gt; editTriggers)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; EditTrigger &gt;</type>
    +      <name>editTriggers</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a82321e1e09c6501515ec060364ed827c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEditOptions</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a9a5506e031a514696c4050ccc1521b6c</anchor>
    +      <arglist>(WFlags&lt; EditOption &gt; options)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; EditOption &gt;</type>
    +      <name>editOptions</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a82654b2aace8d7f51a9b5e30959fd266</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>edit</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a0793bef9c9d7d3d3b0b3f6d2585d5647</anchor>
    +      <arglist>(const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>closeEditor</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a51c80c5c2d505c987047a489c960205b</anchor>
    +      <arglist>(const WModelIndex &amp;index, bool saveData=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>closeEditors</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a81aaaff9476d331f82c7875c0b46d6a4</anchor>
    +      <arglist>(bool saveData=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator::State</type>
    +      <name>validateEditor</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ac06d7149118646c1bbcccabadac6b053</anchor>
    +      <arglist>(const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator::State</type>
    +      <name>validateEditors</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>abbdd09d433c24e093e6f6fb6cc7b7f60</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isEditing</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a809cc4bfab04b111f3c0dad20a7337b0</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isValid</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ad3c112f8f8a1ea7c8eed724653ac5dec</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex, WMouseEvent &gt; &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a3b72d5f8e5b0afdea83e224354d3e91b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex, WMouseEvent &gt; &amp;</type>
    +      <name>doubleClicked</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a14ac099f58621d66834aa5674ea8ecb5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex, WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentDown</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a633d617978adc32d93c427c9f27000db</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex, WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentUp</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a0231396a3e026781c600645c24fff616</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>selectionChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ada37ffbe2d470dd227c8714645f150f0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>pageChanged</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a419257bb553d44423d4d4d5325d61ec7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int, WLength &gt; &amp;</type>
    +      <name>columnResized</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ad5ca828bca252012794ae85f580e96d1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WAbstractItemView</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a3f3d88762036fe2e9e2b2d2fba97b73d</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>dropEvent</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>ae80a4371f19e9c0c14f1cc961da17b87</anchor>
    +      <arglist>(const WDropEvent &amp;event, const WModelIndex &amp;target)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>createExtraHeaderWidget</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a7c939b13f4d2f8da77abe4345be41737</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WWidget *</type>
    +      <name>extraHeaderWidget</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a5ec3d106602a4364caf924756a504df2</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>createPageNavigationBar</name>
    +      <anchorfile>classWt_1_1WAbstractItemView.html</anchorfile>
    +      <anchor>a22303f489d5081d70b5bb8e8ff059948</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractListModel</name>
    +    <filename>classWt_1_1WAbstractListModel.html</filename>
    +    <base>Wt::WAbstractItemModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAbstractListModel</name>
    +      <anchorfile>classWt_1_1WAbstractListModel.html</anchorfile>
    +      <anchor>ac74d8359ff0806b4efe10ec34c8e1d4a</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WAbstractListModel</name>
    +      <anchorfile>classWt_1_1WAbstractListModel.html</anchorfile>
    +      <anchor>a1476c92cf08ce4548a08858f45007746</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WAbstractListModel.html</anchorfile>
    +      <anchor>ab5d047d66626660447a76f17109aef2e</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WAbstractListModel.html</anchorfile>
    +      <anchor>a256e0cbdd9e62e1eef61063bd350d492</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WAbstractListModel.html</anchorfile>
    +      <anchor>ac1067d3ba070038275690deb2e9a40f4</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractProxyModel</name>
    +    <filename>classWt_1_1WAbstractProxyModel.html</filename>
    +    <base>Wt::WAbstractItemModel</base>
    +    <class kind="struct">Wt::WAbstractProxyModel::BaseItem</class>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAbstractProxyModel</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>ab59d85e0a005539ead29d3b5e730807c</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WModelIndex</type>
    +      <name>mapFromSource</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a856d190cc66edcf05462e2476f43b01d</anchor>
    +      <arglist>(const WModelIndex &amp;sourceIndex) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WModelIndex</type>
    +      <name>mapToSource</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>ac36b0ee3110073578da8b999d1882bf7</anchor>
    +      <arglist>(const WModelIndex &amp;proxyIndex) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSourceModel</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a2e21723dd84569f7e42f118efd7eecce</anchor>
    +      <arglist>(WAbstractItemModel *sourceModel)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>sourceModel</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a553fbfaa929ade5275a57186eaf7f2bf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="typedef" protection="protected">
    +      <type>std::map&lt; WModelIndex, BaseItem * &gt;</type>
    +      <name>ItemMap</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a272b9667c732a6d2e11e1b6d5d211697</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WModelIndex</type>
    +      <name>createSourceIndex</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a0144ccc35308b2c0fd6a8b018bd6a3e7</anchor>
    +      <arglist>(int row, int column, void *ptr) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>shiftModelIndexes</name>
    +      <anchorfile>classWt_1_1WAbstractProxyModel.html</anchorfile>
    +      <anchor>a61c68b0635320c41b78290d10523105a</anchor>
    +      <arglist>(const WModelIndex &amp;sourceParent, int start, int count, ItemMap &amp;items)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WAbstractProxyModel::BaseItem</name>
    +    <filename>structWt_1_1WAbstractProxyModel_1_1BaseItem.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>BaseItem</name>
    +      <anchorfile>structWt_1_1WAbstractProxyModel_1_1BaseItem.html</anchorfile>
    +      <anchor>aafa7dca61e51d29f3f8d3ae0c89e60a9</anchor>
    +      <arglist>(const WModelIndex &amp;sourceIndex)</arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>WModelIndex</type>
    +      <name>sourceIndex_</name>
    +      <anchorfile>structWt_1_1WAbstractProxyModel_1_1BaseItem.html</anchorfile>
    +      <anchor>a135d8a4d32a468703e29bf60cbdcadfd</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractTableModel</name>
    +    <filename>classWt_1_1WAbstractTableModel.html</filename>
    +    <base>Wt::WAbstractItemModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAbstractTableModel</name>
    +      <anchorfile>classWt_1_1WAbstractTableModel.html</anchorfile>
    +      <anchor>a551379320897d45f339a981819a401c6</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WAbstractTableModel</name>
    +      <anchorfile>classWt_1_1WAbstractTableModel.html</anchorfile>
    +      <anchor>a64cd2524d094f0f47222c40ccf1c4adf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WAbstractTableModel.html</anchorfile>
    +      <anchor>a44b9b329d82283646deeae136d83f656</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WAbstractTableModel.html</anchorfile>
    +      <anchor>a4f025afd9303676b1789dd336dfcbe7c</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAbstractToggleButton</name>
    +    <filename>classWt_1_1WAbstractToggleButton.html</filename>
    +    <base>Wt::WFormWidget</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WAbstractToggleButton</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a24f8ea0ae98c36503202140f24d23a72</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a7a75e3b2585124eefdea57c9bf9a7696</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a3ef9682b5fe66d802380ccd6c698725d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isChecked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>abd40ce7a6c4b4e924c9097015f4971ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a6838c9a37f3e9e3c466e9f48bde55e62</anchor>
    +      <arglist>(bool checked)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a2b4ab0746beb381276ff7fcf0bde93c8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setUnChecked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>ab772a43209d2b042f5ac74ae078f1045</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>checked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>ae80ceb3226d548d66a58bb26d258ec79</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>unChecked</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>ae203379ba84c01935f68cd293f2a3eeb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WAbstractToggleButton</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a8dafae860bd28e00e707d567d124ea4e</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WAbstractToggleButton</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a0d8e9ead61c0ab655f472a240bef86f5</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WStatelessSlot *</type>
    +      <name>getStateless</name>
    +      <anchorfile>classWt_1_1WAbstractToggleButton.html</anchorfile>
    +      <anchor>a7f686a8fc96dbecac79b58271c7dbb00</anchor>
    +      <arglist>(Method method)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAccordionLayout</name>
    +    <filename>classWt_1_1WAccordionLayout.html</filename>
    +    <base>Wt::WDefaultLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAccordionLayout</name>
    +      <anchorfile>classWt_1_1WAccordionLayout.html</anchorfile>
    +      <anchor>a876fa763ec385acba2da576138fed13e</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAggregateProxyModel</name>
    +    <filename>classWt_1_1WAggregateProxyModel.html</filename>
    +    <base>Wt::WAbstractProxyModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAggregateProxyModel</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>a6c7afd5908bad7f007f30f100b991c78</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WAggregateProxyModel</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>acecfb768c8cd2fbb0ba7c2aeb90418d0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addAggregate</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>add590f7e0789812c73874ab2bd4161bf</anchor>
    +      <arglist>(int parentColumn, int firstColumn, int lastColumn)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapFromSource</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>abd53119f51f426bbf3e332227a7c140f</anchor>
    +      <arglist>(const WModelIndex &amp;sourceIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapToSource</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>a219cfab137c4e6b5fcdcfdaa00f2c652</anchor>
    +      <arglist>(const WModelIndex &amp;proxyIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSourceModel</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>adcd5632ba87b439d87b2470bf028cf28</anchor>
    +      <arglist>(WAbstractItemModel *sourceModel)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>expandColumn</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>accddd20f3e9110bb7a1797ec9ed84085</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>collapseColumn</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>a44082771ca19bdcd648e4cb6c4cf08be</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>aafec39e7801f9c4b19d6df601a130445</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>abef979ff954c636e6a2b5b3d429a06a0</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; HeaderFlag &gt;</type>
    +      <name>headerFlags</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>aad873c5eeb40d473bb7127cfc2022658</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setHeaderData</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>ae70467185337c5ef4fd1a14a2f1397f8</anchor>
    +      <arglist>(int section, Orientation orientation, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>headerData</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>accb1c7428e090aa881a30eefa15141c1</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>abe70985414fe0634927f72dbfb8f5341</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>a7733a1eacce2d55230776d6b472cf14c</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WAggregateProxyModel.html</anchorfile>
    +      <anchor>aa5fc80d856911d48ed0bd2efd5c376e2</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WAnchor</name>
    +    <filename>classWt_1_1WAnchor.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a0416606719711d768ba21ceacc5bf496</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ac2187f2f49e6f25f1d537203558432f2</anchor>
    +      <arglist>(const std::string &amp;url, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a667242ca0bbb3690a434ba9ffbb5b5e9</anchor>
    +      <arglist>(WResource *resource, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a7a1283860b03fa23e4b777971e9b8f00</anchor>
    +      <arglist>(const std::string &amp;url, const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a1fabbd73453d9462e0fd20a9d4161bf9</anchor>
    +      <arglist>(WResource *resource, const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ab816a891dde296d19fe7a8a2351597e2</anchor>
    +      <arglist>(const std::string &amp;ref, WImage *image, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WAnchor</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a94e54cb64ea12090170f526fd8d6ae55</anchor>
    +      <arglist>(WResource *resource, WImage *image, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRef</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>acf0206a2ac91ea67d68ba10e3a951ba3</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRefInternalPath</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ae3ea26646f135bf133871564f5d6798d</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>ref</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ac188644d6b10201ea99714f073c5b20f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResource</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>af4b130e223525c4b6084eb2fb8797738</anchor>
    +      <arglist>(WResource *resource)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WResource *</type>
    +      <name>resource</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ae95cf2ea27a8b04e74334e0e78e46bad</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a8379cfef23023ac070d2b7dcedacdac8</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>aa29b29327d79b2e15ac74904e8b79cac</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWordWrap</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>abe96ca40734d6af4a901d5fb2a9c8c59</anchor>
    +      <arglist>(bool wordWrap)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>wordWrap</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>af31ca59038f6b696b90c79fc1232ea64</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setImage</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>ad9fc10558d724684b1fd9314aa5ea8e7</anchor>
    +      <arglist>(WImage *image)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WImage *</type>
    +      <name>image</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a144d76630a616ea8fb7b268240c6f7ff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTarget</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a169c32b60dcb5d4511a3cbdd4979c941</anchor>
    +      <arglist>(AnchorTarget target)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AnchorTarget</type>
    +      <name>target</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a75c557c92118cf0cdaaad437f8d91ad5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WAnchor.html</anchorfile>
    +      <anchor>a188c6f7fa64408e9214c08292974834d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WApplication</name>
    +    <filename>classWt_1_1WApplication.html</filename>
    +    <base>Wt::WObject</base>
    +    <class kind="class">Wt::WApplication::UpdateLock</class>
    +    <member kind="enumeration">
    +      <name>AjaxMethod</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a102e3adfb4eb058288861c06dfd6a12a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XMLHttpRequest</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a102e3adfb4eb058288861c06dfd6a12aa9dc5b270e2b5c180556fb688cd8f06c2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DynamicScriptTag</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a102e3adfb4eb058288861c06dfd6a12aa66ad42375422870da68e3666a1712d39</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>Wt::ApplicationCreator</type>
    +      <name>ApplicationCreator</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a28b5dd3d1272f46fbacbfb21a0846d07</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WApplication</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ae29a843f4d50159b17abfa9503c389db</anchor>
    +      <arglist>(const WEnvironment &amp;environment)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WApplication</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ad0d9408ddc0fda917235d8416da3777f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WEnvironment &amp;</type>
    +      <name>environment</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a19f3b913f4bc2f69761d9a3738bf142b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WContainerWidget *</type>
    +      <name>root</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a17e118a04d962459484a12989a80bc05</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a71a3f7da5abb9a76df94fab69ba61670</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a86aefff2a3438fecdfde3e0e7dd6e5da</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>closeMessage</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>af6e54918b88587438327464c98eecf5c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLocalizedStrings *</type>
    +      <name>localizedStrings</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>abcbace5a9e38947bf036ae86fb3438c0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLocalizedStrings</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a1039775b5a73ff2efc34a482ebd112a8</anchor>
    +      <arglist>(WLocalizedStrings *stringResolver)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMessageResourceBundle &amp;</type>
    +      <name>messageResourceBundle</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a5386565e35a58c94ccbbfab48f2212a4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLocale</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a5c9cc1350019d69f154a2b44cdaf2596</anchor>
    +      <arglist>(const std::string &amp;locale)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>locale</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a6e782f1f38a6f56e2024aab1a917a80b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a02b9d8aa1b6c2d0dc9edc1b9c63f86dc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindWidget</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aba49e1b9e696ac7244f5e2b63ca07de5</anchor>
    +      <arglist>(WWidget *widget, const std::string &amp;domId)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>sessionId</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ab55c625a3197fec416544be8ad1529af</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>processEvents</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a48ceb7972ef7ec0e557adf441f660f2f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAjaxMethod</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>af2b590f865a4a6a6b144c45682b4bc1a</anchor>
    +      <arglist>(AjaxMethod method)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AjaxMethod</type>
    +      <name>ajaxMethod</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a10cd5e55a610b7f6587c881a2c35188c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>initialize</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a42fc7f65116073d4032573f1e42c1173</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>finalize</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a10317a8a50dc95db9b27ad54409ab39f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTwoPhaseRenderingThreshold</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a63d991e268c9af8898329217a1242563</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCookie</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a0aa2703da36531cf1773d3e756791bf6</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value, int maxAge, const std::string &amp;domain=&quot;&quot;, const std::string &amp;path=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addMetaHeader</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>abb9103bc749dac6942649ea693dc9a3d</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;content, const std::string &amp;lang=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addMetaHeader</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a149412d829d104621c445bc10604be53</anchor>
    +      <arglist>(MetaHeaderType type, const std::string &amp;name, const WString &amp;content, const std::string &amp;lang=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry</type>
    +      <name>log</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a75067771ba8fcc56e174f2e741ce278f</anchor>
    +      <arglist>(const std::string &amp;type) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLoadingIndicator</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a080d01aa8e92ae57ef9c9491d33a7fca</anchor>
    +      <arglist>(WLoadingIndicator *indicator)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLoadingIndicator *</type>
    +      <name>loadingIndicator</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a435c81aaee5f9d0993b329d2541ee21a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>quit</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a5231d54ed34982f4366058eb6440c8f7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isQuited</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aca61c7262e83de25c276021b26b53074</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>maximumRequestSize</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aa6a98202fb6d4aa1214ab3dbe7784416</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>requestTooLarge</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aef3a8fa2a7825ed7439707d8a90b08aa</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setConfirmCloseMessage</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a506978cfb884af4bc6ffd5a5bc8476d6</anchor>
    +      <arglist>(const WString &amp;message)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssStyleSheet &amp;</type>
    +      <name>styleSheet</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a6a9a20d65ce9e7c2f62b27387c94e10d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>useStyleSheet</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>af377d541443b4bcea5fcc40be7c70173</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>useStyleSheet</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a4a72348400d52ca0cf09b57a24577838</anchor>
    +      <arglist>(const std::string &amp;url, const std::string &amp;condition, const std::string &amp;media=&quot;all&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCssTheme</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aa316b2b30a6191085f265974b66e55bb</anchor>
    +      <arglist>(const std::string &amp;theme)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>cssTheme</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a0e09381079f67501e38652087232969d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBodyClass</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aa8fe83406981a556da61a843bb691674</anchor>
    +      <arglist>(const std::string &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>bodyClass</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a4e87d8f55211eb7f2fcea01ad956ea63</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHtmlClass</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a28867ea48711f9290de496c2ed42fdbf</anchor>
    +      <arglist>(const std::string &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>htmlClass</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a1324d7dd9b83e075d78a65ca8cde8c9b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>url</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a455fe732c1dd087ed507bc5975420828</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>makeAbsoluteUrl</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a1f31a52f8c8e4f250b5515c02bf9ee55</anchor>
    +      <arglist>(const std::string &amp;url) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>bookmarkUrl</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a37b4cf44f393688785ed3b34f53fead1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>bookmarkUrl</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ac99ee110fd00d89de51e6e90ad166626</anchor>
    +      <arglist>(const std::string &amp;internalPath) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPath</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a2c1a10aadc0d7ed877b5715b42ca4911</anchor>
    +      <arglist>(const std::string &amp;path, bool emitChange=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>internalPath</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aab6320ecdd0e8e4026e9ef1aca710ca5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>internalPathNextPart</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a95e6b5e4dc9084d45e166264b10b3c46</anchor>
    +      <arglist>(const std::string &amp;path) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>internalPathMatches</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aed54bd83339bc80b3cffba9067ab1e39</anchor>
    +      <arglist>(const std::string &amp;path) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; std::string &gt; &amp;</type>
    +      <name>internalPathChanged</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a3e68c4b6bb387f27a614e7962e11967b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>redirect</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a4dcbf69c8b09c301577b5b6aa8a4da18</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableUpdates</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ad9631ca64e68d30d40cb49c90e55223d</anchor>
    +      <arglist>(bool enabled=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>updatesEnabled</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a5a8e6970e9123fb1c23aa43711093135</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>triggerUpdate</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a51f50e0641a6d702a7c6ab7f8dd5946a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>UpdateLock</type>
    +      <name>getUpdateLock</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ac7582c37defc49b5e8d6ccbda3b68d45</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>attachThread</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a8b03a693a8277b7d5e0775a9b9581803</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>doJavaScript</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a2a92457b9212cef4057cb54e56183967</anchor>
    +      <arglist>(const std::string &amp;javascript, bool afterLoaded=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addAutoJavaScript</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a412bcf9c269b097e7c372515e27b88ba</anchor>
    +      <arglist>(const std::string &amp;javascript)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>declareJavaScriptFunction</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a3456e2bd2eec561abb90ae19ae42be02</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;function)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>require</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ae88546224ed32cade783da188b145138</anchor>
    +      <arglist>(const std::string &amp;url, const std::string &amp;symbol=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>javaScriptClass</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a6e0963307eb9367a3a4a3f4e35ae3abe</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>globalKeyWentDown</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a0a9652fc0d0cbebca7966f98454b078a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>globalKeyPressed</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a7d8f807eee7191ae6b7f6f7fe2ab2fae</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>globalKeyWentUp</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aa2a569eabc35162f4b2a72c36a24cd80</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>globalEnterPressed</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a60c1defb57949f6f78c6c1373a18e74e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>globalEscapePressed</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ab4d42f698c48bf84fcc807cb597a0509</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WApplication *</type>
    +      <name>instance</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a38d922da0a0d83395519f3eaab85d0f6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>resourcesUrl</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ac0fa2857a600cc34b3443a04d9ed5c5c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>appRoot</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a88b082dadadd3fb7dbe10887e7d89c91</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static bool</type>
    +      <name>readConfigurationProperty</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>ac0f5599ed35eb159fa6912aa0ff3c75c</anchor>
    +      <arglist>(const std::string &amp;name, std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>notify</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a4a6f167bea94aefa8ba24f914c2fbee5</anchor>
    +      <arglist>(const WEvent &amp;e)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isExposed</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a17e25e84fab304664baab5b0c748b802</anchor>
    +      <arglist>(WWidget *w) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a78016406c4746c56b2c2ffce7c5e181f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>unload</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>a9a4048e01b69a536e35f47eb2a59a69b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>WApplication *(*</type>
    +      <name>ApplicationCreator</name>
    +      <anchorfile>classWt_1_1WApplication.html</anchorfile>
    +      <anchor>aaa9f20bdeb8ebcbb3ec5d633b010511f</anchor>
    +      <arglist>)(const WEnvironment &amp;env)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WApplication::UpdateLock</name>
    +    <filename>classWt_1_1WApplication_1_1UpdateLock.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>UpdateLock</name>
    +      <anchorfile>classWt_1_1WApplication_1_1UpdateLock.html</anchorfile>
    +      <anchor>a117c05cee4d0e9c825155d0e77ca0c16</anchor>
    +      <arglist>(WApplication *app)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>UpdateLock</name>
    +      <anchorfile>classWt_1_1WApplication_1_1UpdateLock.html</anchorfile>
    +      <anchor>a3c3b5a14188d11f8023fb8eb88d843a4</anchor>
    +      <arglist>(const UpdateLock &amp;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>operator bool</name>
    +      <anchorfile>classWt_1_1WApplication_1_1UpdateLock.html</anchorfile>
    +      <anchor>a9141ee900b30fd0a6c62f76658024df9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~UpdateLock</name>
    +      <anchorfile>classWt_1_1WApplication_1_1UpdateLock.html</anchorfile>
    +      <anchor>a7d9898c9d19bd54675c7d178746659c0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBatchEditProxyModel</name>
    +    <filename>classWt_1_1WBatchEditProxyModel.html</filename>
    +    <base>Wt::WAbstractProxyModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBatchEditProxyModel</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>ae539ae8f225640678caa8d865ef59cc9</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WBatchEditProxyModel</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a9cc01e5215c752842bb8eaa7c03449f3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isDirty</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a0ef68c2ae28426d5cfad4872615b4153</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>commitAll</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a54c22faab062ba9fed79409f4cacdbe9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>revertAll</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a0ec1198073cb711cce9505c9fe4b3a3f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setNewRowData</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>acb59a1c7f66ceb7620c6d2dd171517a6</anchor>
    +      <arglist>(int column, const boost::any &amp;data, int role=DisplayRole)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setNewRowFlags</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a8dd7cfe1c12f4dc8f61106d63e9fe0e7</anchor>
    +      <arglist>(int column, WFlags&lt; ItemFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDirtyIndication</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a36e0d17cc682e1e178154b1ba4a2f323</anchor>
    +      <arglist>(int role, const boost::any &amp;data)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapFromSource</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a8cd40d43e336f2760596fa35659ee6e7</anchor>
    +      <arglist>(const WModelIndex &amp;sourceIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapToSource</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a2dba9cae628236227a85a5f2852fe3c1</anchor>
    +      <arglist>(const WModelIndex &amp;proxyIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSourceModel</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a367daece652869f3d62efb45883a50a5</anchor>
    +      <arglist>(WAbstractItemModel *sourceModel)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>ac1a6ef93b2702200a687e6b4fdc1c831</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>ac1691a899a5fba66cbcfabd518b3348c</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>aa8811ff3b1dd5991b2b9db8064e05b0b</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a7f0f0e95b4ba9667e4f06e34a7a5551c</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>afd7a319765dcdeaab299f3b800d15674</anchor>
    +      <arglist>(const WModelIndex &amp;index, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>af192deaa2b48479bdc594d5cc4b4caee</anchor>
    +      <arglist>(const WModelIndex &amp;index, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>aae2b4164dd1520000828fde77f4b3801</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>headerData</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a2135855bcc45b5d2826cea48baa56bd0</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a97785c5e723bf08412f229b5aa83f5f2</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>aa1d5a9dd393f237a001bc6497b85af66</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertColumns</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a63a4d93bd9cdd8afd53842577b1e1e6c</anchor>
    +      <arglist>(int column, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeColumns</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>aef5564b6f26a69adbe70db0e5282ca6f</anchor>
    +      <arglist>(int column, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WBatchEditProxyModel.html</anchorfile>
    +      <anchor>a4a4a4cba01f2efd30b5af8ae8de7e14c</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::boost_any_traits</name>
    +    <filename>structWt_1_1boost__any__traits.html</filename>
    +    <templarg></templarg>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>asString</name>
    +      <anchorfile>structWt_1_1boost__any__traits.html</anchorfile>
    +      <anchor>aa9746e57608889b491fe29a22b0a77e6</anchor>
    +      <arglist>(const Type &amp;value, const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static double</type>
    +      <name>asNumber</name>
    +      <anchorfile>structWt_1_1boost__any__traits.html</anchorfile>
    +      <anchor>ae64c24bc95485379a81410eb025f376e</anchor>
    +      <arglist>(const Type &amp;v)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static int</type>
    +      <name>compare</name>
    +      <anchorfile>structWt_1_1boost__any__traits.html</anchorfile>
    +      <anchor>ad8c7fbf1e2c414828a595eea76d7bf00</anchor>
    +      <arglist>(const Type &amp;v1, const Type &amp;v2)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBorder</name>
    +    <filename>classWt_1_1WBorder.html</filename>
    +    <member kind="enumeration">
    +      <name>Width</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a057b146bbbdda832d91909b75aac7474</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Thin</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a057b146bbbdda832d91909b75aac7474a3026a5104645b5d86aa903cc6de423c3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Medium</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a057b146bbbdda832d91909b75aac7474ab0f5a6808e8f9e4487651cb99f697210</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Thick</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a057b146bbbdda832d91909b75aac7474ab7b099599322af02c9bf7b1dcbfdde2f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Explicit</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a057b146bbbdda832d91909b75aac7474ab1b357c35b95138f9ac67426f4e9b00b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Style</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>None</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba5e191ab41e2db89bcd8af7cba37b2c8a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Hidden</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba739de5d3fcfcdd56059478b44dc078c3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Dotted</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba664ba009c1db9768b880a97a7ad7751b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Dashed</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba8acfc02263e192726d4d1983cc9871fb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Solid</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba4b4d9319fbd6f910ded24458411eab9c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Double</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6baf1b73b785fcaec95aa6e76b137a0cc4e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Groove</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba5289417986aa8f9be7780ec6499a4a59</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Ridge</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba4406fe085c60b80c760f207c30ebd33a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Inset</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba68163490fc47f2fe1ab6712c2ac133ff</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Outset</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a298e90bd177b66c5cf84c5eaa60eff6ba7861b0b4d708939521f0a6313e90e1bd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBorder</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>acc8471953ee905e5bc363184bf37a8df</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBorder</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a735182fbb1f2e119de06952bc3460660</anchor>
    +      <arglist>(Style style, Width=Medium, WColor color=WColor())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBorder</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a81c4210c470038ffacd8ceff211f0ff1</anchor>
    +      <arglist>(Style style, const WLength &amp;width, WColor color=WColor())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a8f40f4e2ec2371a5c7e3452f3ab3ecae</anchor>
    +      <arglist>(const WBorder &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a791d126be2248fb6915051252a420e6b</anchor>
    +      <arglist>(const WBorder &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidth</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a9758f4ae235447c98a1b1c13814f7df6</anchor>
    +      <arglist>(Width width, const WLength &amp;explicitWidth=WLength::Auto)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColor</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a8336b810e01de7acc051644c75a74ac0</anchor>
    +      <arglist>(WColor color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyle</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>ad02585c81144d4af539dfe123f0e2efb</anchor>
    +      <arglist>(Style style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Width</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a599c605367bae4e63e99890130d066b7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>explicitWidth</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a68f59399c4cb2a384ee2c8952b872a33</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WColor</type>
    +      <name>color</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>a117d64f8d50d5a9fb90cdc52ec1edc9e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Style</type>
    +      <name>style</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>af566f4e98887008cfb23f3c5d2115814</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>cssText</name>
    +      <anchorfile>classWt_1_1WBorder.html</anchorfile>
    +      <anchor>adef6a404d7ba30d801903a4e5d2413c7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBorderLayout</name>
    +    <filename>classWt_1_1WBorderLayout.html</filename>
    +    <base>Wt::WLayout</base>
    +    <member kind="enumeration">
    +      <name>Position</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>North</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0eaf2e38a6995be9664803dbb76be808cf2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>East</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0ea8a84892f4ad01b663668150ea5a1a120</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>South</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0ea22e18e93ad91e56d4d58a74593212257</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>West</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0ea083d8ef2c7e8cea026f902dca9b519cc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Center</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a342b3134ad39ee14d6129c4dc35e0f0ea6f0ad0bd2eb8d3c4f86ecd568e33ebe8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBorderLayout</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>acbf879399f66c7d82695b0e6bee881ec</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WBorderLayout</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a0dedcf9a1a5ed39adee1efad66ca27ff</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSpacing</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a353057bcf43bd82c579db80f3e38cee4</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>spacing</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a63dccee7ef6351a40535df377722f081</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a5f9a17668850dfbd4566b4351334ab48</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a1d6703aaefe8924d71ad48dbd4b7dcab</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>acd496ae37d97427d2234fb3147a2f500</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a1a29297adea327f48c1235022125f069</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>af7667b3d486dc649a7ed0c56f8c06206</anchor>
    +      <arglist>(WWidget *widget, Position position)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>afbf14676206fad724c6eb725d4650842</anchor>
    +      <arglist>(WLayoutItem *item, Position position)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>widgetAt</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>aac75ab996385ab95fa5c774a12eb68a5</anchor>
    +      <arglist>(Position position) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>ab241699474232f2562a5f2b5c4474879</anchor>
    +      <arglist>(Position position) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Position</type>
    +      <name>position</name>
    +      <anchorfile>classWt_1_1WBorderLayout.html</anchorfile>
    +      <anchor>a322f2277abc4904bd92b4016bb5e27b8</anchor>
    +      <arglist>(WLayoutItem *item) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBoxLayout</name>
    +    <filename>classWt_1_1WBoxLayout.html</filename>
    +    <base>Wt::WLayout</base>
    +    <member kind="enumeration">
    +      <name>Direction</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>addc4cd1f8b1158dcf16eb10d429803ec</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LeftToRight</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>addc4cd1f8b1158dcf16eb10d429803eca174fcc4fd0b807e60c838385be19e1f9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RightToLeft</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>addc4cd1f8b1158dcf16eb10d429803ecaa4a4afece8c59ddaf384c08b276aa70f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TopToBottom</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>addc4cd1f8b1158dcf16eb10d429803ecaf705eddcc1a4639aeb1908f1c7acface</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BottomToTop</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>addc4cd1f8b1158dcf16eb10d429803ecaf25be1e7bbefae032ceb333e67bda5f2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBoxLayout</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a9472dd446911a6a6d33b019a34a0c4fc</anchor>
    +      <arglist>(Direction dir, WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a2932a804ac01e0b314408bf4d366385d</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>aa01f05c0f40fa89e418b802f78f2870c</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>aad2ec4be48cb11a7802b3e6d7cb8f0fd</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a961fe311fd07adbf7b60b571ef7a8278</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDirection</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>af669ef9fbcdb8954d1cfa7bb9e47b90f</anchor>
    +      <arglist>(Direction direction)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Direction</type>
    +      <name>direction</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>aa101f33971e037bed0e4bfea164cf0dc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSpacing</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a34d544a1a2bd8beffa6b8e5e84fbc19b</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>spacing</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>aa9d0d7ef4ea1753f898d6d71ad8e9b22</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a7c1ec58e25d0b7add93f5f4342844db6</anchor>
    +      <arglist>(WWidget *widget, int stretch=0, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addLayout</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a062d26b432841995a0be7b7d7aac6413</anchor>
    +      <arglist>(WLayout *layout, int stretch=0, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSpacing</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a3cbd78251252e724d01937e2f6cc803d</anchor>
    +      <arglist>(const WLength &amp;size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addStretch</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a811708ce9336d753c20aaedc14b00d5f</anchor>
    +      <arglist>(int stretch=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertWidget</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a9ebc82bb4cc8f0bbb4e272df6ab4c02f</anchor>
    +      <arglist>(int index, WWidget *widget, int stretch=0, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertLayout</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a8ab8fd1d8b5f3634eac9b559605e4ced</anchor>
    +      <arglist>(int index, WLayout *layout, int stretch=0, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertSpacing</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a0d5d6a9e408c6bc7e25020f8c85cb4cf</anchor>
    +      <arglist>(int index, const WLength &amp;size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertStretch</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a0174de2ae36e2992b7209cf789d85271</anchor>
    +      <arglist>(int index, int stretch=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setStretchFactor</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a47182ea3c459afdadb3cc03232a8d110</anchor>
    +      <arglist>(WLayout *layout, int stretch)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setStretchFactor</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>af5ce73d289874c80e88ed6fd9934bb39</anchor>
    +      <arglist>(WWidget *widget, int stretch)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResizable</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a00bdfb4d442bd8e8ad9c33b72692763f</anchor>
    +      <arglist>(int index, bool enabled=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isResizable</name>
    +      <anchorfile>classWt_1_1WBoxLayout.html</anchorfile>
    +      <anchor>a07a62537e92ad4ff14305dc2e1e8dd9c</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBreak</name>
    +    <filename>classWt_1_1WBreak.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBreak</name>
    +      <anchorfile>classWt_1_1WBreak.html</anchorfile>
    +      <anchor>aad7ecf140e87a6dd8f4dc5c8229c3695</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WBrush</name>
    +    <filename>classWt_1_1WBrush.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBrush</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>ab650511b8300044e2c62b209d8b5ada2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBrush</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>ae7725eeec8605983235ba8bb6b05695b</anchor>
    +      <arglist>(WBrushStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBrush</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>a1cd32bceb74be7792cf1b89d5df862a6</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WBrush</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>ac8529901dfbd7804fa10f8ee91c3bf77</anchor>
    +      <arglist>(GlobalColor color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>a77eaae76488f6febfaba2a5b0b94e7bb</anchor>
    +      <arglist>(const WBrush &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>ac3a156efe8eb36d25680e391a9540b71</anchor>
    +      <arglist>(const WBrush &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyle</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>ab52dc087359100109e5db040af72ea9c</anchor>
    +      <arglist>(WBrushStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WBrushStyle</type>
    +      <name>style</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>a01a01f9b48e940122c6485ddd078fce2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColor</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>a9b6a446a81d6c3089a2cf37010fc5743</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WColor &amp;</type>
    +      <name>color</name>
    +      <anchorfile>classWt_1_1WBrush.html</anchorfile>
    +      <anchor>aaf854f81f54f87eab71c0d550e4f6156</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>WBrushStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaffe43936b1bbb1ca2b308572fcdeb157</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoBrush</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157aa6f513232fadbbcaf8a576b7aaefc67a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidPattern</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaffe43936b1bbb1ca2b308572fcdeb157a574469ed16523a26c683e83c8fee3ed6</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WButtonGroup</name>
    +    <filename>classWt_1_1WButtonGroup.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WButtonGroup</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a2e29884c479c910861aa6f023d324210</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WButtonGroup</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a0f1876538ca9400a0afc7e2d2831e7a9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>abbe8605c1e57e75316731af9124bacca</anchor>
    +      <arglist>(WRadioButton *button, int id=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a3a6b317dc22600acd1344de9e6a05987</anchor>
    +      <arglist>(Ext::RadioButton *button, int id=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>ade4ea1cf5ac08b17e0f92153c98204d3</anchor>
    +      <arglist>(WRadioButton *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a9b2c7ea25d0e83d9ae894c2f0ce9bd67</anchor>
    +      <arglist>(Ext::RadioButton *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRadioButton *</type>
    +      <name>button</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>ad77d4e097182bea774d3d5d34c548145</anchor>
    +      <arglist>(int id) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a3afa1365a54718ace10b42f2e3a345bc</anchor>
    +      <arglist>(WRadioButton *button) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>abadc2ee3d7c98c6d4f7f0dcf3384d3be</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; WRadioButton * &gt;</type>
    +      <name>buttons</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a92ad438da83c631b10b69096a6d3b653</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>aff9a2079d4fffaf4d2aa5c816bd37abf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>checkedId</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a00f6285ab6326a6fef8b9ca7c7646948</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckedButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>ac67ce8ffc614cb7319efa4657c57f25a</anchor>
    +      <arglist>(WRadioButton *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRadioButton *</type>
    +      <name>checkedButton</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a92ed2843d2fdf9dfacc9d3e27b5ac994</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectedButtonIndex</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a968222f7cba72561b1712c90efc30d46</anchor>
    +      <arglist>(int idx)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>selectedButtonIndex</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>a44aa1dc058bbfbc698289d56ba0424ee</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WRadioButton * &gt; &amp;</type>
    +      <name>checkedChanged</name>
    +      <anchorfile>classWt_1_1WButtonGroup.html</anchorfile>
    +      <anchor>ad5661cc6137de244819f47f492b42687</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCalendar</name>
    +    <filename>classWt_1_1WCalendar.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>HorizontalHeaderFormat</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a1e3120d5177a5f29412f55cd7c65b1d4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SingleLetterDayNames</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a1e3120d5177a5f29412f55cd7c65b1d4a6738f5146a720e0df6138950213245eb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ShortDayNames</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a1e3120d5177a5f29412f55cd7c65b1d4a58ae7bf27446ad315f2c18f494ef46ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LongDayNames</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a1e3120d5177a5f29412f55cd7c65b1d4a481f2bc7524b368484f44d0ba6d74e72</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCalendar</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a62a4817cfb3da910bee0b0c7a27dfd73</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionMode</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a42e800f304acd0e6ed55258149354b9d</anchor>
    +      <arglist>(SelectionMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>browseToPreviousYear</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>aa60744e2ecaeda40a2a9b0a401010470</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>browseToPreviousMonth</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a99c57c17f6afab4a0aa3a74ee9b19289</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>browseToNextYear</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>abe866003ddb73b9fed91f35b7383e8ee</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>browseToNextMonth</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a4e77a4335ac8891a4d51441ce0f9e626</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>browseTo</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a59949bcc20f604fd96a73aa342157b8d</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentMonth</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a28bf4605a51c67258ee8e9182a1e27a9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentYear</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a95a1fdb04b8b21bfb473dcf509e5d864</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSelection</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>aff46e84192787483ec4f00c5b1410a8d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>ab3b72e0e5a76f3e365d94d056465453f</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>aa128787a7b96264b5e755712e720f928</anchor>
    +      <arglist>(const std::set&lt; WDate &gt; &amp;dates)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHorizontalHeaderFormat</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a3475efa36daca79a4ce976202dd9a1fc</anchor>
    +      <arglist>(HorizontalHeaderFormat format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>HorizontalHeaderFormat</type>
    +      <name>horizontalHeaderFormat</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>afde4624cf1ff320b547e68691b4d4d46</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFirstDayOfWeek</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a741e177dd86d834956a65343fefd14d0</anchor>
    +      <arglist>(int dayOfWeek)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::set&lt; WDate &gt; &amp;</type>
    +      <name>selection</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>ade00a32163a903b22bd441179c95d9d3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>selectionChanged</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a317d3018608bbeed934e1823969a3a7f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WDate &gt; &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a8675afd38f2b773d0945af207d7639f9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WDate &gt; &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a51ad8160985f49f5ff0e726df8103921</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int, int &gt; &amp;</type>
    +      <name>currentPageChanged</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a5dc6d29c25661c665e0110dd0dcaaca6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMultipleSelection</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a075e2a4c5c39f8b6144865cfd0ae07f0</anchor>
    +      <arglist>(bool multiple)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WDate &gt; &amp;</type>
    +      <name>selected</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>aab0005ad0c245d06895848a5b12d6050</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSingleClickSelect</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>ad33dba722cbddf4b9feff69d4ca744f2</anchor>
    +      <arglist>(bool single)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDayOfWeekLength</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>aae58d984894182574f60f17645e3533f</anchor>
    +      <arglist>(int chars)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottom</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a5d5237e806862564ba9a8c9f5b8f5272</anchor>
    +      <arglist>(const WDate &amp;bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WDate &amp;</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>abf97eba163e425c000b8d260bd1285ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTop</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a6a45200e082a7178d7060bdb9f960a17</anchor>
    +      <arglist>(const WDate &amp;top)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WDate &amp;</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a6293a873cab2d27413b05c98546d8f26</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>renderCell</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>a3513147b88fa57ac287ab2546d00dd96</anchor>
    +      <arglist>(WWidget *widget, const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>bool</type>
    +      <name>isSelected</name>
    +      <anchorfile>classWt_1_1WCalendar.html</anchorfile>
    +      <anchor>acea26f984bfced2b060abd119e42d547</anchor>
    +      <arglist>(const WDate &amp;date) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCanvasPaintDevice</name>
    +    <filename>classWt_1_1WCanvasPaintDevice.html</filename>
    +    <base>Wt::WObject</base>
    +    <base>Wt::WPaintDevice</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCanvasPaintDevice</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a74c2268a9de31d083ca10db9db2d8145</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>ae4e57cdf94ce6f26b95650bd6170d540</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a5ce1b5b6b4c2607c0d461c4347e1f373</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a011ff1caec6097d318a05c7153c3440b</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imgUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>ae10a371dd76345d825fc4d48fc85a4fd</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a79b27f0948676ac4045ecbabf4f9e9c1</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a97b170b6d53540bc2e27e5b91da8bb30</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>abf398b5c8a8ae39af1368c647d58d37c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>af5d71bb7c6dd867a94ecf5f4b745998d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>ac8d01132ac5c9f4c64199f9090198bb3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>ac4842f320acd9eaf7b6335e95b41e8d7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a7ff7e0a42f773b43f7160f3c7abbee6f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a3ab402eb63ef076141bf6e84a7bccffe</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>a559e86f20b9da220625db77a829b1fd0</anchor>
    +      <arglist>(WPainter *painter)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WCanvasPaintDevice.html</anchorfile>
    +      <anchor>afb8ab21be9302f9451aa8438083c6dcb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCheckBox</name>
    +    <filename>classWt_1_1WCheckBox.html</filename>
    +    <base>Wt::WAbstractToggleButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCheckBox</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>a6277263fb7405d39bd6d6124e56fbb5c</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCheckBox</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>a16025c975c9586c89e548875df811c6a</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTristate</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>aaa80606e36bfd34a73f6b58dc6cac926</anchor>
    +      <arglist>(bool tristate=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTristate</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>ae7c6da01de803c9fd88564e3ef2cbf13</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckState</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>a293d15f49d36587b55a04216322083d8</anchor>
    +      <arglist>(CheckState state)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>CheckState</type>
    +      <name>checkState</name>
    +      <anchorfile>classWt_1_1WCheckBox.html</anchorfile>
    +      <anchor>aeae048fe7066d5c69a5dfa6498231132</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCircleArea</name>
    +    <filename>classWt_1_1WCircleArea.html</filename>
    +    <base>Wt::WAbstractArea</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCircleArea</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a60514d5a3a2da148a684b0a0b3a5b235</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCircleArea</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>ae2d43a04099e8d29a317700570828365</anchor>
    +      <arglist>(int x, int y, int radius)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCenter</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a10932e173eef6c9531c8086324b7ced8</anchor>
    +      <arglist>(const WPoint &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCenter</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a604bd32d585d03c2ea509b57f71412f3</anchor>
    +      <arglist>(const WPointF &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCenter</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a939c6645039059067b6924466a477c6c</anchor>
    +      <arglist>(int x, int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>centerX</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a34a758fe81f9f9705e2bd1c9c4d46c41</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>centerY</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a044104f691997c0238b3abfb95217ee2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRadius</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>a69d4391565a8cb7c707d951362fe22bf</anchor>
    +      <arglist>(int radius)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>radius</name>
    +      <anchorfile>classWt_1_1WCircleArea.html</anchorfile>
    +      <anchor>afe7fed59edd0636ca23771400a63d7f4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WColor</name>
    +    <filename>classWt_1_1WColor.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WColor</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a0aca175990842e4be3d944236e27cda3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WColor</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a5e0102afbdf3ece70a200c1379ad3522</anchor>
    +      <arglist>(int red, int green, int blue, int alpha=255)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WColor</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a00336e4511fb1fd68f3c66d58c30a4c1</anchor>
    +      <arglist>(const WString &amp;name)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WColor</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a12eeb92c9177d1033e2dbd72e799ddcc</anchor>
    +      <arglist>(GlobalColor name)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRgb</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>ab3e459365133f983d702a310dd600772</anchor>
    +      <arglist>(int red, int green, int blue, int alpha=255)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setName</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>aea520f8d33c730809176bd555463e33a</anchor>
    +      <arglist>(const WString &amp;name)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isDefault</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a1aa64740fc2dcfd7b30dfddfe2de8000</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>red</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a1f176a8557b9ebe2a9260b49acae3c3e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>green</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>ac4fa50432b68fd0f1134e80cda0754c5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>blue</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a1126ef11c5211e2b0ec29020ea930f36</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>alpha</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a7fe483df7025fbb2bcb13764bffd9fd1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>name</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a4812291da745a35b8e505848c27bedcd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>ad26120c40c96c29c58a22cae5a92d0a5</anchor>
    +      <arglist>(const WColor &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WColor.html</anchorfile>
    +      <anchor>a9e457a4ece07294a1eb16fc6dbc22d95</anchor>
    +      <arglist>(const WColor &amp;other) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCombinedLocalizedStrings</name>
    +    <filename>classWt_1_1WCombinedLocalizedStrings.html</filename>
    +    <base>Wt::WLocalizedStrings</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCombinedLocalizedStrings</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>a0e421a2f2ff41d7c1e52584db1088b23</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>a57d46941001a9840c0c37343de705c7a</anchor>
    +      <arglist>(WLocalizedStrings *stringResolver)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WLocalizedStrings * &gt; &amp;</type>
    +      <name>items</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>aa590712551f20519174bf24e4fd2aee3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>aad27735fdadc6e0deb52f55e8ca77d17</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>hibernate</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>abf4a64defdd472751aab40d561dddd1d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>resolveKey</name>
    +      <anchorfile>classWt_1_1WCombinedLocalizedStrings.html</anchorfile>
    +      <anchor>acbe64134b2d1c13abf98ed8b1b039f00</anchor>
    +      <arglist>(const std::string &amp;key, std::string &amp;result)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WComboBox</name>
    +    <filename>classWt_1_1WComboBox.html</filename>
    +    <base>Wt::WFormWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WComboBox</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a0403b5ef9b90f4868a3177245f0bbb62</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a9b2308a7d962ceb17c1ee32627b106d4</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a58fff2a9bd76213f107cbc776e15112e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a94b6a87121adab0abbf23562d35a716e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertItem</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a2092c15c7c0c2f77342d0abdc393ca6b</anchor>
    +      <arglist>(int index, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a95db6ec7468a1eabbf95f7eba3012a54</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentIndex</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a903e2d98c6860fe09198bdb43f0566bd</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemText</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a8eafbaa6e87ca46a411b904b78b12db6</anchor>
    +      <arglist>(int index, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>currentText</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>aec0856e1bacf24fded9621054a0c357c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>itemText</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>af787aa7aa37e2ce2eddb499c15db52a4</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a3d10438b053fe43dcd05e66b7ca78826</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModelColumn</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a5d33b665d2fa12b349fa2783ba4d2033</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a20b54b2271b0219c2375775538d454a3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>findText</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a98d44c32191d2cc80be14da1bf6acb3a</anchor>
    +      <arglist>(const WString &amp;text, WFlags&lt; MatchFlag &gt; flags=MatchExactly|MatchCaseSensitive)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a36ca680db19aac3ac847a422bb821b6e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>aea94ab9c31cd5030906d73a8134e6e00</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a0ed207e9616b51089d97030cc767409d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>ac39b46ccd8134a5397b4cbd87dc9f01f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WString &gt; &amp;</type>
    +      <name>sactivated</name>
    +      <anchorfile>classWt_1_1WComboBox.html</anchorfile>
    +      <anchor>a06401499734540c65db26fceb60bfdbf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCompositeWidget</name>
    +    <filename>classWt_1_1WCompositeWidget.html</filename>
    +    <base>Wt::WWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCompositeWidget</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a43fc53dd07a7568cb153822c439c4c65</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCompositeWidget</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a202b654d8150d61358a8dd284636abb4</anchor>
    +      <arglist>(WWidget *implementation, WContainerWidget *parent)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a0557ba9778c04c33eab0be399cc84c02</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPositionScheme</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a332ea77de7e6adb5b0ac25cc1b417ef8</anchor>
    +      <arglist>(PositionScheme scheme)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual PositionScheme</type>
    +      <name>positionScheme</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ae7e478fe175f9af64e0de726494bbab6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setOffsets</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ade05ff99765584997aaa4e1d94522f49</anchor>
    +      <arglist>(const WLength &amp;offset, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>offset</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a55d5b1a5d852863ed29dbea622e67efc</anchor>
    +      <arglist>(Side s) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a976e94e38c7a9cc0f212e13a9792912e</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a3358bb9a93e5c7999c4f6d39d9880c8f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ab20c559ba960c80be16572293df7fd96</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMinimumSize</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>acf95c795e47eee85425c98509aa8e57a</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>minimumWidth</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ab14d3fa5b63d36c1df1148f49b62e92a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>minimumHeight</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a3289852d4a8a268fc8ee2c4c474bce15</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMaximumSize</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a7ba5622622b118e72b9a407d10df7ece</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>maximumWidth</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a24acfbaf36c581e0d1bd07d2c477decb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>maximumHeight</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a2b37e2f64cd18ec77b0fdcd5e2adf791</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setLineHeight</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a37135f5af75e17fa920d73aee823b3e8</anchor>
    +      <arglist>(const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>lineHeight</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a2132b8941b1f5d7febfea902f9625d39</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setFloatSide</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aafed7408935752c6b0c8195ac49f2e9c</anchor>
    +      <arglist>(Side s)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Side</type>
    +      <name>floatSide</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a26b73581331aebc3f50036442aa5e107</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setClearSides</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a08b3487d9af9606fc3c6243adb7bf7ff</anchor>
    +      <arglist>(WFlags&lt; Side &gt; sides)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; Side &gt;</type>
    +      <name>clearSides</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>abcd53cd6a4b27ef01576ea2525fd6a92</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMargin</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>addf49ace29b76331067c86bc4ae6ac38</anchor>
    +      <arglist>(const WLength &amp;margin, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>margin</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a06555482bd1410ce970165c71a8e22e8</anchor>
    +      <arglist>(Side side) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a870eeab54f7591c7a1ec9da90561f326</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>hiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ae2f77711839f8dfe9dcc378ced66099b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aff347ab5d4d5cdbfb0a07aad1636f2d5</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ac22140fb020018e0d855ad524c6effff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isVisible</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a1ae4501ce5807c22b71532d9fd564337</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>abca811e17066c225404419d0ee5249a1</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isDisabled</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a9f814b5ca1939d1e43a4f4c8b00bfbf2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a8dd8bb72da33fd11072acb25ed585c2b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPopup</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a247b586fcafc027db2ba6f1ffa37dc0b</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isPopup</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a6b2ad79236863c701e08553146987045</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setInline</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aed7eec7b9a562b84fdb97f68f37ce694</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isInline</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aa82c263fd93dda5dd21baa74b979441f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDecorationStyle</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>abf72fb5ef4b107be2d986ba144047372</anchor>
    +      <arglist>(const WCssDecorationStyle &amp;style)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WCssDecorationStyle &amp;</type>
    +      <name>decorationStyle</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ad1eb3d24f374cb311ef88e43b3036503</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>af9a8abf4e8b5be186a31cd951e60bdc6</anchor>
    +      <arglist>(const WString &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>add2437d41d367251cbfa98fa18dedba8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addStyleClass</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a8726dac662b5dc9c14bed0c6c182895d</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeStyleClass</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ada75b0a78ebad024ddd3ed2226b5e53f</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setVerticalAlignment</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>af548a47d09382c9413a688c0eb65df14</anchor>
    +      <arglist>(AlignmentFlag alignment, const WLength &amp;length=WLength::Auto)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual AlignmentFlag</type>
    +      <name>verticalAlignment</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a078108fab89c90dc540bc7bbd47a85f1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>verticalAlignmentLength</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a9f45784318e94541bb490979d418a968</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aa18741866255b277604b97a04730b86b</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a5230e4ddc72e1fca9046e4f1166d34a9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a2c7709c1b62475863600551a10728ef1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setAttributeValue</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a874b7a77d0785623f5059ad4dfe93266</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>attributeValue</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ae4917baf01b575063686110c54726773</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ad0263a7415b2219566a193ff4b9fe10b</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>javaScriptMember</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a138b2c77df870d0c294416a44bcf99f9</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>callJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a1e46b28cb1c06e7ffe2acf0eac474fe2</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;args)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>adab4431e472ee5398e6c97420003ffdb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>loaded</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a23066e3ab76634bef5ed39396603f56c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setTabIndex</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a10b26fff7188b259669700c676031f82</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>tabIndex</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a07ba1eb6802336dbd060fdba935d2730</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setId</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ac348ec52af6565bf37c6d52b7bae2ef2</anchor>
    +      <arglist>(const std::string &amp;id)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>find</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a7afbf99afdb3fca030b01ac0b958f42d</anchor>
    +      <arglist>(const std::string &amp;name)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSelectable</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a1cf4a59e433df7c28e7917a5e03fdac1</anchor>
    +      <arglist>(bool selectable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>ac19a8fef93bf9540d3ab42797186aa90</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a90e07c1bb6c48732ed4b5d98f91cfda0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>setImplementation</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aa5a3e93a551fd41b180c6b28fa169946</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WWidget *</type>
    +      <name>implementation</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a8fe3e478986808ff0ddbcbbddcd66072</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxPadding</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>a2f8fa4fb1ac7bd056ad9801f9b4cbd6c</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxBorder</name>
    +      <anchorfile>classWt_1_1WCompositeWidget.html</anchorfile>
    +      <anchor>aba02aeb3e18700f8e530021b0131b5ef</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WContainerWidget</name>
    +    <filename>classWt_1_1WContainerWidget.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="enumeration">
    +      <name>Overflow</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcc1911965f1669b94bd3f8fbf86a2d6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OverflowVisible</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcc1911965f1669b94bd3f8fbf86a2d6aa195ca15f69167c8f3087e5bc3e24f68</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OverflowAuto</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcc1911965f1669b94bd3f8fbf86a2d6ac8fcc7d215f329753187326459cf5856</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OverflowHidden</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcc1911965f1669b94bd3f8fbf86a2d6ac5ba5a20547ae53b1caef3f05d0c3241</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OverflowScroll</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcc1911965f1669b94bd3f8fbf86a2d6a3c51faeacd0f1d2c6fa287f5e9932be9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WContainerWidget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a520ba6e52a36a7f2efbef1a31a69e898</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WContainerWidget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>abcdb141e27e673f10c8e0e693307bf94</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLayout</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a1c84e0ffe330d4798f0ce217f75be08c</anchor>
    +      <arglist>(WLayout *layout)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLayout</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>aff9884c8efdf90974077e96bcb1701db</anchor>
    +      <arglist>(WLayout *layout, WFlags&lt; AlignmentFlag &gt; alignment)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLayout *</type>
    +      <name>layout</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>afaba82a27836f4a82bab48e8b26ccca2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a2cfe66d9b62940f889e99538a9f478d2</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertBefore</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a1439877a32c4b082f312fee81d139665</anchor>
    +      <arglist>(WWidget *widget, WWidget *before)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertWidget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a15ffcecaf10e6f04ec5667d2b3f0d919</anchor>
    +      <arglist>(int index, WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeWidget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a4292867b1872bd31c7d0c3346d988470</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a608f748cbdda763f1a11556ddad9fbe1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a7cf9f4f1c261080bce30b6a6ea19014e</anchor>
    +      <arglist>(WWidget *widget) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a53c79a7311ffe3c132b50bdbb830856d</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a85abd4d928575717052ff7fa04c3c2c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setContentAlignment</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>aba13c9e62c74bcba53519ee9cf41f40a</anchor>
    +      <arglist>(WFlags&lt; AlignmentFlag &gt; contentAlignment)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPadding</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>afa5f6800e2170ae2f4586a25c72f8c34</anchor>
    +      <arglist>(const WLength &amp;padding, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>padding</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a326a0c9d7e4307dfd9c6979a2c441a96</anchor>
    +      <arglist>(Side side) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; AlignmentFlag &gt;</type>
    +      <name>contentAlignment</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a042dbe790f34279f1978bc87610933df</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOverflow</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>ae269f870992c5843d3097a63795b10d6</anchor>
    +      <arglist>(Overflow overflow, WFlags&lt; Orientation &gt; orientation=(Horizontal|Vertical))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setList</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a4b1857ba8e8a677887cd20aa657fb77f</anchor>
    +      <arglist>(bool list, bool ordered=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isList</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a2ba1ccbc634a57f21608c410d28bbff5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isUnorderedList</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>ae0db17987ae260b71d860b8f670c0c8a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isOrderedList</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>af7c9ba23a66d27cb7442557284464f3f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WScrollEvent &gt; &amp;</type>
    +      <name>scrolled</name>
    +      <anchorfile>classWt_1_1WContainerWidget.html</anchorfile>
    +      <anchor>a64b97ae076fc6d678305fcdf77738a31</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCssDecorationStyle</name>
    +    <filename>classWt_1_1WCssDecorationStyle.html</filename>
    +    <member kind="enumeration">
    +      <name>Repeat</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a6110934e7bf757aa4b2235137027b23a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RepeatXY</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a6110934e7bf757aa4b2235137027b23aaabbf4cda2d8db7c076a1fcc15d5519b9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RepeatX</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a6110934e7bf757aa4b2235137027b23aaabb992f24c718545ae57cd5ee111bdb0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RepeatY</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a6110934e7bf757aa4b2235137027b23aa0aeb307a9966be9867e8cfb44dadeff6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoRepeat</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a6110934e7bf757aa4b2235137027b23aa40aeeeb48d51ff0c73eb495791a1fece</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>TextDecoration</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2028d60151aa68cca6d0d41b446b47bc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Underline</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2028d60151aa68cca6d0d41b446b47bca72c16a3d5fcc40f2c354840200f66b09</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Overline</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2028d60151aa68cca6d0d41b446b47bca5793fed852e0810c308563a99869ce26</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LineThrough</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2028d60151aa68cca6d0d41b446b47bcace9662dc82350134b5b840665f98ac2a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Blink</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2028d60151aa68cca6d0d41b446b47bca7791a60b982e799bb595b3a8970634f2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCssDecorationStyle</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>ab7eebc38d1b857016e2b4e521edda0d9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssDecorationStyle &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a7076ca4b870ba4c59c83cb8326af6e37</anchor>
    +      <arglist>(const WCssDecorationStyle &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCursor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>afa12d38e05ad171e9ec718e7ae0d7b70</anchor>
    +      <arglist>(Cursor c)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Cursor</type>
    +      <name>cursor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a9a5b967e8fca0ea878e856538ca15213</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCursor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a61135de86e52963c826e76d98fa2b275</anchor>
    +      <arglist>(std::string cursorImage, Cursor fallback=ArrowCursor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>cursorImage</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>afb772ac9426bfd273485251185537b19</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBackgroundColor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>ac6bd2a8b86c8092fc437329dac09b302</anchor>
    +      <arglist>(WColor color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WColor</type>
    +      <name>backgroundColor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a973c0007344280910c63589d468a72bb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBackgroundImage</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>acde968f183dfd9d6446546c96ca1f43a</anchor>
    +      <arglist>(const std::string &amp;imageHRef, Repeat repeat=RepeatXY, WFlags&lt; Side &gt; sides=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBackgroundImage</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a814fdc9a6652e7b77a21bfc8e9e1a4cf</anchor>
    +      <arglist>(WResource *resource, Repeat repeat=RepeatXY, WFlags&lt; Side &gt; sides=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>backgroundImage</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a94deb7cf496f241d0d39f9eb7d099350</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Repeat</type>
    +      <name>backgroundImageRepeat</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a84b82fe0eeec3e09a1d0a24c79fefa6f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setForegroundColor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a986681e0391d09bdf7f82d0cf283ae86</anchor>
    +      <arglist>(WColor color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WColor</type>
    +      <name>foregroundColor</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a269ea8ed4d7bf54ff4d11db611f581c2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBorder</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a2902bf35e3eb676bb34d1a6b4ea2b42a</anchor>
    +      <arglist>(WBorder border, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WBorder</type>
    +      <name>border</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a35c4ef3dc9cbd213bba8abf5ef307e83</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFont</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a876f3f4a081622b0500d02032b56b659</anchor>
    +      <arglist>(const WFont &amp;font)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFont &amp;</type>
    +      <name>font</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>a5e552350f0955212ea237994a98638dc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTextDecoration</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>ae30cbd3f4306be25434c89f269551904</anchor>
    +      <arglist>(WFlags&lt; TextDecoration &gt; decoration)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; TextDecoration &gt;</type>
    +      <name>textDecoration</name>
    +      <anchorfile>classWt_1_1WCssDecorationStyle.html</anchorfile>
    +      <anchor>ae8345994773cfcd490383535908ab9fa</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCssRule</name>
    +    <filename>classWt_1_1WCssRule.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WCssRule</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>afcb8249f4038c7185eb37fcecaca6675</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>selector</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>a10b8706772e9a7616db278a73fe82096</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssStyleSheet *</type>
    +      <name>sheet</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>a3740e3360c7185ff2a3838c606d34cd9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>modified</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>a15ca55980b693ac64e70ca5f0d8cbf5d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual const std::string</type>
    +      <name>declarations</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>abe99bca6582d1ec43b7135f3a28956b4</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WCssRule</name>
    +      <anchorfile>classWt_1_1WCssRule.html</anchorfile>
    +      <anchor>adc9c4088ba70dae3f82175a370677ee9</anchor>
    +      <arglist>(const std::string &amp;selector)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCssTemplateRule</name>
    +    <filename>classWt_1_1WCssTemplateRule.html</filename>
    +    <base>Wt::WCssRule</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCssTemplateRule</name>
    +      <anchorfile>classWt_1_1WCssTemplateRule.html</anchorfile>
    +      <anchor>ae05ee2d960f007cda1db3fa3bc2db60d</anchor>
    +      <arglist>(const std::string &amp;selector)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>templateWidget</name>
    +      <anchorfile>classWt_1_1WCssTemplateRule.html</anchorfile>
    +      <anchor>aebf91a4bcb9c9b737e20ce6177624553</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>declarations</name>
    +      <anchorfile>classWt_1_1WCssTemplateRule.html</anchorfile>
    +      <anchor>ab10a2ebfc6f80cf3357c963716868598</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCssTextRule</name>
    +    <filename>classWt_1_1WCssTextRule.html</filename>
    +    <base>Wt::WCssRule</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCssTextRule</name>
    +      <anchorfile>classWt_1_1WCssTextRule.html</anchorfile>
    +      <anchor>a437f6c4f45fd1388728ed37d6aa214c4</anchor>
    +      <arglist>(const std::string &amp;selector, const WString &amp;declarations)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>declarations</name>
    +      <anchorfile>classWt_1_1WCssTextRule.html</anchorfile>
    +      <anchor>a5950660406de9b1e3d17082116718649</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WCssStyleSheet</name>
    +    <filename>classWt_1_1WCssStyleSheet.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCssStyleSheet</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>ae94dfb465a5d4f7eb405842dfda08d32</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WCssStyleSheet</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>aaa08125ae86aa489b65edf98ffa984f1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssTextRule *</type>
    +      <name>addRule</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>ad2c989b38a7ee084a7c9b681e16e8a8c</anchor>
    +      <arglist>(const std::string &amp;selector, const WString &amp;declarations, const std::string &amp;ruleName=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssTemplateRule *</type>
    +      <name>addRule</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>a3ecf53815b4044ea0337db6ce90fb5c9</anchor>
    +      <arglist>(const std::string &amp;selector, const WCssDecorationStyle &amp;style, const std::string &amp;ruleName=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCssRule *</type>
    +      <name>addRule</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>afba6dc2162b71ee0271545739e374427</anchor>
    +      <arglist>(WCssRule *rule, const std::string &amp;ruleName=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isDefined</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>ae4a8dc5e77f2d90f7ca51af0194e8b0c</anchor>
    +      <arglist>(const std::string &amp;ruleName) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeRule</name>
    +      <anchorfile>classWt_1_1WCssStyleSheet.html</anchorfile>
    +      <anchor>aac9a375cdf712c604977d2e39ab16bb3</anchor>
    +      <arglist>(WCssRule *rule)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::InvalidDateException</name>
    +    <filename>classWt_1_1InvalidDateException.html</filename>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>what</name>
    +      <anchorfile>classWt_1_1InvalidDateException.html</anchorfile>
    +      <anchor>a615608cd6869cf70c1027e2654f8b84e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDate</name>
    +    <filename>classWt_1_1WDate.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDate</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a88823f7de1cc16e9211015733f15eac3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDate</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>ae88e64cff5fa3f28283f26fa7c8e4b99</anchor>
    +      <arglist>(int year, int month, int day)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDate</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>ad9f497db41a525c9955aa6c45fa9a692</anchor>
    +      <arglist>(int year, int month, int day)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>addDays</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a55c4709c6cec54f8dd3e69355381630f</anchor>
    +      <arglist>(int ndays) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>addMonths</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>ad85d82a3aa5c2613550e9cf52983d66b</anchor>
    +      <arglist>(int nmonths) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>addYears</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a60915b6de93a109dccbcaa589890370e</anchor>
    +      <arglist>(int nyears) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isNull</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>aa2d504303dfd4768b6f1ce942fb348be</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isValid</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a6e7f68474aa2fd9570cede81c85f6e3a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>year</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a69b9c1a505490006774614a3b5a402f0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>month</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a9eb0594dde9b3c92ecf66d399558dd81</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>day</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a7e0d6855b08d7293e55c9929ec7737ca</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>dayOfWeek</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a933d7b11edbbc207dfe0baaabeeceb57</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>daysTo</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a122bd295f40ad30d63b3a00e4817f0b9</anchor>
    +      <arglist>(const WDate &amp;date) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>toJulianDay</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>acee5169b63142a6543dc0bb709303769</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>aaa48849f8e1cd2bb6dacd5a675fc8bb9</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;=</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a29ab4d83fc8e27fa37e64c2ba8ad1d96</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>ab450e46b3da2f0662c946f8952d0b187</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;=</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a26f44d313ed4a8ba899879375020dbd8</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>aef3b62770bdbcb7335fd16871d0651f1</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>abf0fc8e2ec380e2bbf96467283877cf6</anchor>
    +      <arglist>(const WDate &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a1d9b6450f5f6126722f07c971ea9e4c0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a2be436babc9c5cb836901f4b2805f7ff</anchor>
    +      <arglist>(const WString &amp;format) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDate</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a86383757788870ff2f22bd29536336b7</anchor>
    +      <arglist>(const WString &amp;s)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDate</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a25e1f637674f18ebb4fa528d107b3d46</anchor>
    +      <arglist>(const WString &amp;s, const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDate</type>
    +      <name>currentDate</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a6221e680cd7b1f7d324f1f1932e4a3db</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDate</type>
    +      <name>currentServerDate</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a57a614e3408f39c70605027fe3e3f3f5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>shortDayName</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a01ad704115e2018a53ede745324d4086</anchor>
    +      <arglist>(int weekday)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>shortMonthName</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a54d59b0ffe528151de60a6880f728fa9</anchor>
    +      <arglist>(int month)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>longDayName</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>a40a03ad1d529da1708b47a9f2d472061</anchor>
    +      <arglist>(int weekday)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>longMonthName</name>
    +      <anchorfile>classWt_1_1WDate.html</anchorfile>
    +      <anchor>af33b02874b9b683239def4d9e7f37e9e</anchor>
    +      <arglist>(int month)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDatePicker</name>
    +    <filename>classWt_1_1WDatePicker.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDatePicker</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>ae8d610a63de150c34d1eedef47611d06</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDatePicker</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a51951906fd4f6b2925059ec9828ae440</anchor>
    +      <arglist>(WInteractWidget *displayWidget, WLineEdit *forEdit, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WDatePicker</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>aca2558c09355ec7902b1da352385e912</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFormat</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a4eea10671eea698aea906802b7f67fde</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>adeaf91b8f2319a28f0090d0a4a07cd68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCalendar *</type>
    +      <name>calendar</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a6fb5e37c7b81d104c21f2c0f587fe6aa</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLineEdit *</type>
    +      <name>lineEdit</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a50e3f4c7c700e0628fccebe0cb5d8268</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WInteractWidget *</type>
    +      <name>displayWidget</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>af91c0bb2fb868faf669380275eb8c667</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>date</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>abfeb0d23dece4cf7fa7e9b65c0376f73</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDate</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>adc47d5a1b0faf43dfed193f22f93c559</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnabled</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a3f18fb47c77a16d8e1772593eaef6d23</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a1c632c278617c650b5cafcbc3b4e6d91</anchor>
    +      <arglist>(bool disabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>aa559e3b283aff87cdcbfd48d3edb78c7</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottom</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a00d263440d85d63ad19cfc48482b2f1a</anchor>
    +      <arglist>(const WDate &amp;bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a2591db4e8902f2997b050b75bfa47899</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTop</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a772dd0063197bcea023be869dc550496</anchor>
    +      <arglist>(const WDate &amp;top)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a256df5500fd57b0d4c059b492d40aac9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>changed</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>acda30d9035692895a2bb94090babc073</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setGlobalPopup</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a5ee66d7aafd8fc11fa0ece87af6b76aa</anchor>
    +      <arglist>(bool global)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPopupVisible</name>
    +      <anchorfile>classWt_1_1WDatePicker.html</anchorfile>
    +      <anchor>a6fb616d7418b8af4ea70699630e8c733</anchor>
    +      <arglist>(bool visible)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::InvalidDateTimeException</name>
    +    <filename>classWt_1_1InvalidDateTimeException.html</filename>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>what</name>
    +      <anchorfile>classWt_1_1InvalidDateTimeException.html</anchorfile>
    +      <anchor>a90e3af354cf0450f79debb40ecb624ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDateTime</name>
    +    <filename>classWt_1_1WDateTime.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a29901946960d23153fcf1467ee24a971</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a3e4c80c57d9830aef554176d66ca5132</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a88851754ee49eb44b3971191e6499c5f</anchor>
    +      <arglist>(const WDate &amp;date, const WTime &amp;time)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTime_t</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a791a4236d61e1787caf071040e7c6689</anchor>
    +      <arglist>(std::time_t time)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPosixTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>aedfface981120ce328a968815ee7439f</anchor>
    +      <arglist>(const boost::posix_time::ptime &amp;time)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDateTime</type>
    +      <name>addMSecs</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a6c8ae3448bb8844644f10d880fc5c5ae</anchor>
    +      <arglist>(int ms) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDateTime</type>
    +      <name>addSecs</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>afbeb4251ff1d5a7a3938b723dc0c6418</anchor>
    +      <arglist>(int s) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDateTime</type>
    +      <name>addDays</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>abfd5e46c640dcc133aae00b8a2040518</anchor>
    +      <arglist>(int ndays) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDateTime</type>
    +      <name>addMonths</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ad0a641ebdeed28686d5a8c818136b92d</anchor>
    +      <arglist>(int nmonths) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDateTime</type>
    +      <name>addYears</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ab3aadeeff2d81f430999b847449cf338</anchor>
    +      <arglist>(int nyears) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isNull</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a2c9df5b3b55cea3cfcdb861ff3fcae29</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isValid</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a7987f4190180b556fef65e14026daf92</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDate</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a5059023135c5c8f2964e4944b38bfe61</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>date</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a19937219bdc0cf5d99a4baf0d80de647</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a8846e7a9987797b2fff6e6e22ea7fea3</anchor>
    +      <arglist>(const WTime &amp;time)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTime</type>
    +      <name>time</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>adef683fd4fb85354fe30b20c69fee15f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::time_t</type>
    +      <name>toTime_t</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>aa8f4b59cddc562f9902e554d888c9b90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::posix_time::ptime</type>
    +      <name>toPosixTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a0d7f04bacc6ea6534bc61ec7305a8262</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>secsTo</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>af7f9824464a5c2b3cd3a3aad84a2faf1</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>daysTo</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a366cff27e96d4cc86e5b6be8879e25fb</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>timeTo</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a1893f9b41a6ab51e587b68f5030eadf9</anchor>
    +      <arglist>(const WDateTime &amp;other, int minValue=1) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ac72286a44beb5ceff568677a4bcc8e59</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;=</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a870e03386cb76213ca8cf8d605d5acf6</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a6f7eecc8e7290178321d2b92a6c56918</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;=</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a4d974dc42fa9e2dacff1cf36c11759af</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ae2da173387f965e1a7cfb734e12b570b</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a02a886eb6d9572d34080ab6a74fb0e96</anchor>
    +      <arglist>(const WDateTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>abb73b8df39ef05dbab3e0e7d7281c7d1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>a9c6a96b8d94d4190de5ddb735b05bd86</anchor>
    +      <arglist>(const WString &amp;format) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDateTime</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>abbce10071edbed23ed425d73b46ad65a</anchor>
    +      <arglist>(const WString &amp;s)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDateTime</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ae6025f1099ca81feae4288708b4130b3</anchor>
    +      <arglist>(const WString &amp;s, const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDateTime</type>
    +      <name>currentDateTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>accc1d6a4815dab7c5e5332b494130178</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDateTime</type>
    +      <name>fromTime_t</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>ab8fb88773f890b78b82f903b43e981b9</anchor>
    +      <arglist>(std::time_t seconds)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDateTime</type>
    +      <name>fromPosixTime</name>
    +      <anchorfile>classWt_1_1WDateTime.html</anchorfile>
    +      <anchor>aeb5f093554829688b36640f0977da541</anchor>
    +      <arglist>(const boost::posix_time::ptime &amp;datetime)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDateValidator</name>
    +    <filename>classWt_1_1WDateValidator.html</filename>
    +    <base>Wt::WValidator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateValidator</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ad1df00f1fc29681bd8722952bac6da50</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateValidator</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a652b313001a1544bfaecdada2464d26b</anchor>
    +      <arglist>(const WDate &amp;bottom, const WDate &amp;top, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateValidator</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>af6c20524605414a8bb242acb718da6f1</anchor>
    +      <arglist>(const WString &amp;format, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDateValidator</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a77b6801a9e597d4ddc08547a185364ae</anchor>
    +      <arglist>(const WString &amp;format, const WDate &amp;bottom, const WDate &amp;top, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottom</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a65ef611c859119da8eb71f2020599077</anchor>
    +      <arglist>(const WDate &amp;bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WDate &amp;</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a7452061f89fcc542cd38acbc05f8fa6d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTop</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ae6354b791d536a6de2d8f619f51e560f</anchor>
    +      <arglist>(const WDate &amp;top)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WDate &amp;</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a07374f374ac117bcd42b8e741ed565d2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFormat</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>acee1f3949840c056c60bf38e78b911e4</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a72c952300e99cd9384c713b92ddfcc07</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFormats</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ab92f432fe9b9f63679df120d7f9838f1</anchor>
    +      <arglist>(const std::vector&lt; WString &gt; &amp;formats)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WString &gt; &amp;</type>
    +      <name>formats</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>af915dd8a2aadea7cf6f2a2a7611dce54</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>afa833f63a53d7d13aecdf2f79dab75d9</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>aedca72a61fc33a310ec7a655aef7877a</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidNotADateText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a73be0b02ae9d2532a0b951ea51e4f053</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidNotADateText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ab56b3eb0258272cbfba1df195d582011</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooEarlyText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ad1ffa06a037d203da6f7c6e121a066be</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooEarlyText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>adc07d7402224e7d6f65a3e1e5a60e59c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooLateText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a16559b0e658bf4211d9dc797455c930e</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooLateText</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>a373d5577bcd4bef7e144ff6c68783f68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WDate</type>
    +      <name>parse</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>abd99f0290618c49cd31344dbf86731a5</anchor>
    +      <arglist>(const WString &amp;input)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WDateValidator.html</anchorfile>
    +      <anchor>ade82d221d04556f2d219d1b9b80bce45</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDefaultLayout</name>
    +    <filename>classWt_1_1WDefaultLayout.html</filename>
    +    <base>Wt::WLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDefaultLayout</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>a01f835b2194ad6c57abbbd76bbe9ef6f</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WDefaultLayout</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>acecb272acef4ae61ab28f023950b70a3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>a281200191e8568c0dd8f7f355640cfbf</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>a2172639feddcd11fd319eb481a5d20a6</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>a865e47b372c73f913f5a1c7d7124bd1e</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>ab07de0e688076a6d722c2558a5675337</anchor>
    +      <arglist>(WLayoutItem *item) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WDefaultLayout.html</anchorfile>
    +      <anchor>a2c662db2763510aa0e47a84c098dcc62</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDefaultLoadingIndicator</name>
    +    <filename>classWt_1_1WDefaultLoadingIndicator.html</filename>
    +    <base>Wt::WText</base>
    +    <base>Wt::WLoadingIndicator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDefaultLoadingIndicator</name>
    +      <anchorfile>classWt_1_1WDefaultLoadingIndicator.html</anchorfile>
    +      <anchor>a667089dada9be1ac765e0daa676f5e45</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WDefaultLoadingIndicator.html</anchorfile>
    +      <anchor>a0c0ad40f2d0638cc6d51dbc5e97fac4a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMessage</name>
    +      <anchorfile>classWt_1_1WDefaultLoadingIndicator.html</anchorfile>
    +      <anchor>a0b4731e54dc060bf0451b9429a973678</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDialog</name>
    +    <filename>classWt_1_1WDialog.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>DialogCode</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a6f4bab24bf9e39be422bb6d9637268e6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Rejected</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a6f4bab24bf9e39be422bb6d9637268e6a8279eafdc9665e6c91d98d2b512a962c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Accepted</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a6f4bab24bf9e39be422bb6d9637268e6ad4852d715c07070ca1b117cb7e263840</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDialog</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>ab31907fa4f641192b2720ba735226d58</anchor>
    +      <arglist>(const WString &amp;windowTitle=WString())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WDialog</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a97fa6bfc8c31a3bf98284ad66b2df738</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWindowTitle</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>ae0923afc12895002f30b8ee12ab91aae</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>windowTitle</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>acf71bbc665dff57a7af201b4f32f59f8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCaption</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a626d5109624e7442f9a96310b6919a5a</anchor>
    +      <arglist>(const WString &amp;caption)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>caption</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>af56bc5d90c6da742faa454ddfed4ce00</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitleBarEnabled</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>ab8ae8763648de12a67ada4b8237154a9</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTitleBarEnabled</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>aa23c6db155044c4f2c49269a874dd5cb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WContainerWidget *</type>
    +      <name>titleBar</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a77351279e0927eb204ffebbc95d0cd79</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WContainerWidget *</type>
    +      <name>contents</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a10f2f5df7ee5762845bf7ba334f170ae</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>DialogCode</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>ae56cf798aba9f09a8869df50d3f334a6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a8d0a8725d03e5d7d144ef015983a8d08</anchor>
    +      <arglist>(DialogCode r)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>accept</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>afab6f75ebb2d2970ebe0bbf1cf19f288</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>reject</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>afcff2ea14c4ae79b2fc7bac1a86b0062</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>rejectWhenEscapePressed</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a7db347dd52c9d487a5e007ebaa664285</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; DialogCode &gt; &amp;</type>
    +      <name>finished</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>ae7f3991e5adf17ec4e9e93fd8a3a2f79</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>DialogCode</type>
    +      <name>result</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a469ba179a2d620e2f7f6e0142f891c27</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModal</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>acc8c9734f33b405bf0a706fe2f6e4e05</anchor>
    +      <arglist>(bool modal)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isModal</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>a3ded330bb27133ac59ec8d8f0e7a1bcf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WDialog.html</anchorfile>
    +      <anchor>aa3c85e704c0d7825bd342713f50b35f9</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDoubleValidator</name>
    +    <filename>classWt_1_1WDoubleValidator.html</filename>
    +    <base>Wt::WValidator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDoubleValidator</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a60ac6a9c4da70a17daa84a41d04b87dd</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDoubleValidator</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a3a7b569012485ce6a217c47ffb26af24</anchor>
    +      <arglist>(double minimum, double maximum, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>aa1f6b0952651e5503e6ff6657bd09180</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottom</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a520fe2f7859670b0c30144dbc4990e98</anchor>
    +      <arglist>(double bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a708124404d7088f51f458bee1641288d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTop</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a931cc4c5d0409093f4a6fd8ab023ee73</anchor>
    +      <arglist>(double top)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a160f579d7884d02786a1cc36ec3ecca1</anchor>
    +      <arglist>(double bottom, double top)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a66e68bb1d7f9698f3d515b1de884a33a</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a497f1ef7ea1b403665b9f1b7685954d4</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidNotANumberText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a86e8f0e07b6c861af2e656575a329d47</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidNotANumberText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a474314e509e47d2a577a26841fe4a752</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooSmallText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a119b5f1c2396f8d595c2607e76d27b1a</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooSmallText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a13fb51475bab73ea71405f6fa9158c6d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooLargeText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a6c3fa94752583d7e2de640cf6b91cef7</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooLargeText</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>aa0cf3c02568e85e24105c073d8ee319b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WDoubleValidator.html</anchorfile>
    +      <anchor>a590267f8600a399b07133da5cec299b4</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WEnvironment</name>
    +    <filename>classWt_1_1WEnvironment.html</filename>
    +    <member kind="enumeration">
    +      <name>UserAgent</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Unknown</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda4cb2c346551f5270f14b2e6a854a5b29</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IEMobile</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda2823feda697be9f188400d7f481e9aae</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IE6</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda737c9af8220cbd65cdfe9b0789e87f9d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IE7</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda7badfc0c8db4cb19c42dedad648c9e55</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IE8</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda7d42e94541784f88d22215d1926bd3d1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>IE9</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda3a25dce6ae2767dc71b816c1677cd8e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Opera</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda18c1a4be49c088c9241119e6c4465de6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>WebKit</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda45bd0a2565de3bec1a9405956d385e89</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Safari</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda1196785434e07b92754e35b08d807626</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Safari3</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdaf9a72317865b4e8c43dec948f3c9581f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Safari4</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda58379ce1ee25778d28d4404ddc7f5048</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome0</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdad818ce77035a393fdbad28799589ba41</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome1</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdad65c49f421b84b08a9ad24ccc904ef35</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome2</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda35a02d67c3d48cb2ef84d5410eb16783</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome3</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda326e7fe860a3d5f395e126207928d53e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome4</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda075c8e89487220456b545be5786ae8ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Chrome5</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda643b3c9cb3447cffa5128b870e412f4b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Arora</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda4d85e3f91e8baf595066d32f1e469cbf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MobileWebKit</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda0f79ccf97841f36026e7b568601687a2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MobileWebKitiPhone</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdae6e1b867b336d35a3b8828842dc79098</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MobileWebKitAndroid</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdab7d94421427961c72d2af8879abede89</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Konqueror</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda79971897bce9804d647e1bbcf23ab099</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Gecko</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda3f0c504f2120c3409dbc315ed3ee00ee</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda54ad950d64156edc780c1208764a952e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox3_0</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda75cd4043148d59c681a5de4bb74d3662</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox3_1</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdaa6d072b5c7080ad5705421104352e74f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox3_1b</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda2b3d965b83e31a421a4ff80f800322d0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox3_5</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fdad70e2c58f8992fe0447f5df72d5d5948</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Firefox3_6</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda000338f20477244113024cf8e7ac7495</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BotAgent</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a412018893e570badb4b95056c4c934fda49f1a47dc2ade4078772d770c1824a4a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ContentType</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ab293698bb21313768c279dbe3a9803b6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XHTML1</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ab293698bb21313768c279dbe3a9803b6a2088cf5865710d6b46092a96b8505288</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>HTML4</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ab293698bb21313768c279dbe3a9803b6a5370f3c22a92a80c345c545d902dc6c5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>std::map&lt; std::string, std::string &gt;</type>
    +      <name>CookieMap</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a163671f35f1080badcb791a826f5fadd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const Http::ParameterMap &amp;</type>
    +      <name>getParameterMap</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ac333df7571b921b4f22492c2bb95bcd4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const Http::ParameterValues &amp;</type>
    +      <name>getParameterValues</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a0c2ff76f4db12bc9ab390f7673af9b91</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string *</type>
    +      <name>getParameter</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a3f87915f10f39b18eac28bac65c0cd46</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const CookieMap &amp;</type>
    +      <name>cookies</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a30810ecfa507bc6f655c38a6f218dc92</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>getCookie</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>af39745ca2c6c6fc00c0f78bc7d064e3a</anchor>
    +      <arglist>(const std::string &amp;cookieNname) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>headerValue</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a43f59c8aced914ac4b51690e8ee90285</anchor>
    +      <arglist>(const std::string &amp;field) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>supportsCookies</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>abf06c6d85be1b482c037f80e63890f3a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>javaScript</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a9ad466ecabd71a039cbfbee137867849</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>ajax</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>af39702064f91a549514f28de713b7cd2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>dpiScale</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a06c074249363d4ef4b90bc9cbae96261</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>locale</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a42b10cde31c3df634dc753b5dbd1e800</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>hostName</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ad798f03cb67b859cc42ed2e1ced82fcd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>urlScheme</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a5dd3ea667a61c3bbc2c6e1e3a879dc2f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>userAgent</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a3ac010296af1ee9dbcbfecad96dc5a0f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>referer</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>aa68ac8744d2dc060d6c66ab22fbadbe1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>accept</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a9160e82a73d21aa1a0a76bf5eeeac886</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsSpiderBot</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>abe062ba13bf3df36e06d611e04b66603</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>serverSignature</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a8d2c52cbf0c79d315088e56c8e5fe224</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>serverSoftware</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ad0d4a99a818ca7cb851ef43187c9ade7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>serverAdmin</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>aa407aa90c7a3ab9ecb46de0ed9451797</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>clientAddress</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a3cd4cc541b27cfe4f937d2b945f5ff6a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>pathInfo</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>adb17bb1f17c56f78418e06872d531c24</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>internalPath</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>acb2ba1f1f88e9cd6b7a57a2e51518ec6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>deploymentPath</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>aa6c6f66f82b2c6f08317366882d9b827</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>libraryVersion</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>abf911f096b978f4e842596c7401052de</anchor>
    +      <arglist>(int &amp;series, int &amp;major, int &amp;minor) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>sessionId</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a41d6fa0197d24e92cc463cc9d5815f10</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>getCgiValue</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a3aa8ecc5ee3b7c7298ac33c43b65ec1a</anchor>
    +      <arglist>(const std::string &amp;varName) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ContentType</type>
    +      <name>contentType</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a375dfdc05e69eb22b8b644d2fada4d41</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>UserAgent</type>
    +      <name>agent</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>afd8726dfa8cabcb49895df4a6112ef48</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsIE</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a481240e2bd08b1f01ff7dce417c1476c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsIElt</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ad0a9e4b64f21ddb5269a3b5454f5219d</anchor>
    +      <arglist>(int version) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsIEMobile</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a65888110662122c6b7a05d12060119f8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsOpera</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a48d50e20b390708cdf506240a70b1b70</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsWebKit</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a7e93d6a17e128a6a714a96f5faaef351</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsMobileWebKit</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>accc83794f9d7b250dc30e3bd17c11508</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsSafari</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a316fedb63906347ca23242a26919e19a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsChrome</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a598f54d7199f2ef3b07d3c37dc2a41dd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>agentIsGecko</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>ab810be7b203ea6c8c4c9b9f279efe667</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractServer *</type>
    +      <name>server</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>afb1c2e414d043396f4c1ad0b5e4704d4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>libraryVersion</name>
    +      <anchorfile>classWt_1_1WEnvironment.html</anchorfile>
    +      <anchor>a8d55627d202b6d8866c7703a6e9dddf1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::Coordinates</name>
    +    <filename>structWt_1_1Coordinates.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Coordinates</name>
    +      <anchorfile>structWt_1_1Coordinates.html</anchorfile>
    +      <anchor>a416b99925a4a45bde5f64024bf1a60eb</anchor>
    +      <arglist>(int X, int Y)</arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>x</name>
    +      <anchorfile>structWt_1_1Coordinates.html</anchorfile>
    +      <anchor>ac815a7cef6b961e1bc2a0c8dfb4e203c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>y</name>
    +      <anchorfile>structWt_1_1Coordinates.html</anchorfile>
    +      <anchor>a8a66b0bce898256585044d213758b399</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Touch</name>
    +    <filename>classWt_1_1Touch.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Touch</name>
    +      <anchorfile>classWt_1_1Touch.html</anchorfile>
    +      <anchor>a4c3d89b499562061382a8b1d83c99ab9</anchor>
    +      <arglist>(int identifier, int clientX, int clientY, int documentX, int documentY, int screenX, int screenY, int widgetX, int widgetY)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>document</name>
    +      <anchorfile>classWt_1_1Touch.html</anchorfile>
    +      <anchor>a4eefd5ddca76caabdd788bf240624186</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>window</name>
    +      <anchorfile>classWt_1_1Touch.html</anchorfile>
    +      <anchor>aa8e1c489d4fe2910bb2a5053bf7d05d4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>screen</name>
    +      <anchorfile>classWt_1_1Touch.html</anchorfile>
    +      <anchor>a9740630a871dec96707ca95085fe2c89</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1Touch.html</anchorfile>
    +      <anchor>a503701081a16a9daa1bdc33ceaf3ea8f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMouseEvent</name>
    +    <filename>classWt_1_1WMouseEvent.html</filename>
    +    <member kind="enumeration">
    +      <name>Button</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a67958762760e6aa6973109a7b3d46210</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoButton</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a67958762760e6aa6973109a7b3d46210a3f70178895b26ccf8f0a2e27cff95cbc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LeftButton</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a67958762760e6aa6973109a7b3d46210afbce5dfa6d97366c49bd9a7aa1c2b7ce</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MiddleButton</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a67958762760e6aa6973109a7b3d46210ab4d71def93cd1b2482a748e576949758</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RightButton</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a67958762760e6aa6973109a7b3d46210a3680e4c90e452cb6b29a7d4df8c41c69</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>Wt::Coordinates</type>
    +      <name>Coordinates</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a958d03f5470457b0437cf129655c51c1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMouseEvent</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>ad99367bf6494aea5f92869d32aaecf1d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button</type>
    +      <name>button</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a3cb45d106522eaa8b597b2e274053e90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; KeyboardModifier &gt;</type>
    +      <name>modifiers</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>ac84d28364a178e547d2bc417e3eb2423</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>document</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a76d0dffbee01451f043ff603eb133334</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>window</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>aeac308aadc18ee38d80e49d9357bdcea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>screen</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a3a6f116184b391a58bbf7bd2fccbacd0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>af875dd9a33e6a5dd7cf6aa9dd927e8ef</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Coordinates</type>
    +      <name>dragDelta</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>abc8cd49bcbf8244ee6f92a16eca7561b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>wheelDelta</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a4354738e0bce7e57764a465f5e19895d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>altKey</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a322292eed48c4d640f172648c660ef49</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>metaKey</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>afca8f1bed7ec531f0b7b4c01173eb1cd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>ctrlKey</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a8a25240a3b4a7b296d5c333c03a1fb75</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>shiftKey</name>
    +      <anchorfile>classWt_1_1WMouseEvent.html</anchorfile>
    +      <anchor>a53962bfb61abd94b0a96568ed322a68d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WKeyEvent</name>
    +    <filename>classWt_1_1WKeyEvent.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WKeyEvent</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a93efdf1091659752a18f107f2c7612e8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Key</type>
    +      <name>key</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a1a1dd4cf1ac3cc427505c2660cbf069d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; KeyboardModifier &gt;</type>
    +      <name>modifiers</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a56601dff9d7ed5ff5ff294f7025a6908</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>charCode</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>abe057e50123becd86400abeaea8b5e9e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>aef6d350c375bd06e7df8aae0898aa744</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>keyCode</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a313eda54335c00c80827b39cdae15ef2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>altKey</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a7d382409feb5545edb8bb0561a144006</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>metaKey</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>afb60842e8e3797a8d0079cf774b81496</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>ctrlKey</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>a334af6e260dda1c17e5876de7405851a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>shiftKey</name>
    +      <anchorfile>classWt_1_1WKeyEvent.html</anchorfile>
    +      <anchor>aef80abe3417494c7ef95066859bbf4f3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WDropEvent</name>
    +    <filename>classWt_1_1WDropEvent.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDropEvent</name>
    +      <anchorfile>classWt_1_1WDropEvent.html</anchorfile>
    +      <anchor>a392415b39dbff17302e63ba344894ff3</anchor>
    +      <arglist>(WObject *source, const std::string &amp;mimeType, const WMouseEvent &amp;mouseEvent)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WObject *</type>
    +      <name>source</name>
    +      <anchorfile>classWt_1_1WDropEvent.html</anchorfile>
    +      <anchor>adfe27a00e34b7322a52bc7dc73d4d5af</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>mimeType</name>
    +      <anchorfile>classWt_1_1WDropEvent.html</anchorfile>
    +      <anchor>a14e3c3a1cb956319cefe63bddc29a0de</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WMouseEvent &amp;</type>
    +      <name>mouseEvent</name>
    +      <anchorfile>classWt_1_1WDropEvent.html</anchorfile>
    +      <anchor>a8c4ed93cd012f2dbf9b9041c4bb926ab</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WScrollEvent</name>
    +    <filename>classWt_1_1WScrollEvent.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WScrollEvent</name>
    +      <anchorfile>classWt_1_1WScrollEvent.html</anchorfile>
    +      <anchor>a1b1dc654c40ecdfd742936e663728610</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>scrollX</name>
    +      <anchorfile>classWt_1_1WScrollEvent.html</anchorfile>
    +      <anchor>af4f336af6117589e8a6a43642b9c70d4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>scrollY</name>
    +      <anchorfile>classWt_1_1WScrollEvent.html</anchorfile>
    +      <anchor>a093916a7dcca58334c8c290f7d783ccf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>viewportWidth</name>
    +      <anchorfile>classWt_1_1WScrollEvent.html</anchorfile>
    +      <anchor>afee0cf410002fb82cc1f8b60e2a83911</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>viewportHeight</name>
    +      <anchorfile>classWt_1_1WScrollEvent.html</anchorfile>
    +      <anchor>a90a726129be2e70944cea3d605eadead</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTouchEvent</name>
    +    <filename>classWt_1_1WTouchEvent.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTouchEvent</name>
    +      <anchorfile>classWt_1_1WTouchEvent.html</anchorfile>
    +      <anchor>a7afa4ca1ec20f4dee50ae232913a7ff3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Touch &gt; &amp;</type>
    +      <name>touches</name>
    +      <anchorfile>classWt_1_1WTouchEvent.html</anchorfile>
    +      <anchor>a0ae0cd46fdd1bc63fe79377f2ac91b09</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Touch &gt; &amp;</type>
    +      <name>targetTouches</name>
    +      <anchorfile>classWt_1_1WTouchEvent.html</anchorfile>
    +      <anchor>a398d890eb259022d8e556019b0b268df</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Touch &gt; &amp;</type>
    +      <name>changedTouches</name>
    +      <anchorfile>classWt_1_1WTouchEvent.html</anchorfile>
    +      <anchor>ad8701e2d84c37a91e32844a07b00040e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGestureEvent</name>
    +    <filename>classWt_1_1WGestureEvent.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGestureEvent</name>
    +      <anchorfile>classWt_1_1WGestureEvent.html</anchorfile>
    +      <anchor>ad2b17234b1545a852353281f9d82572a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WGestureEvent.html</anchorfile>
    +      <anchor>a3593b0e1fe5b243c67c69f907449261c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>rotation</name>
    +      <anchorfile>classWt_1_1WGestureEvent.html</anchorfile>
    +      <anchor>a07e145dae0c12c6c4e2577c44143d106</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFileResource</name>
    +    <filename>classWt_1_1WFileResource.html</filename>
    +    <base>Wt::WResource</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFileResource</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a61cd3c164de338e8c750a4e852c85109</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFileResource</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a3ba8b11f98f8404f41f2721f94ef9260</anchor>
    +      <arglist>(const std::string &amp;fileName, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFileResource</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>ab756e5ea65534bfa89dccfc1bd1ce06d</anchor>
    +      <arglist>(const std::string &amp;mimeType, const std::string &amp;fileName, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WFileResource</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a60bcdd2873274df4143c79444d178004</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFileName</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a02a899ebef188895c4f1707e529c0ef3</anchor>
    +      <arglist>(const std::string &amp;fileName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>fileName</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>aeec71fb64b2a1bef2ebb7f61f30639e3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMimeType</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a72db1d052a130e22a99e60e064e30006</anchor>
    +      <arglist>(const std::string &amp;mimeType)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>mimeType</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>ab01b1ad9dea02d17a87d44c6dcae4c1c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBufferSize</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a8f1eb8202a696db4e80e082d5d84a692</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>bufferSize</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>ac1fa1a9e6bc1f3ee726d3850a27e12b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WFileResource.html</anchorfile>
    +      <anchor>a7a801fa115d455a2b8cc29938a29fe85</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFileUpload</name>
    +    <filename>classWt_1_1WFileUpload.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFileUpload</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a71fa85fc383df6e36c2bcf4d877b63ec</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMultiple</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a17f8e368c2ffc9836c65e470b311de9d</anchor>
    +      <arglist>(bool multiple)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>multiple</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a61784c68272e562e023a356fb1d3d55a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFileTextSize</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>ac7ad1324c86d378da9da9740a631a662</anchor>
    +      <arglist>(int chars)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>fileTextSize</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a39a9998018c87f25d7d884a3a0418cf4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>spoolFileName</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>ac0897be7484b668e6cc940c7673b1ca9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>clientFileName</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a17c00f860b120e0c70d8599d781cbf58</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>contentDescription</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a7933d0052ba63d938870dde50b9aabda</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stealSpooledFile</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a541d634e9f9e546f59417682811f01ef</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>empty</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a51c7d5c96d671374ac9651d4fc3c9f08</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>emptyFileName</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a4207ca5ea74962583d146409301c3416</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Http::UploadedFile &gt; &amp;</type>
    +      <name>uploadedFiles</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>ab1ffd4c3c203e6772f4a1b2e235888e3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>canUpload</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a66376fb4668a037760a91abad9f83f8a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isUploaded</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>aba40acced8b3ab758f53d17f15afcf38</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>uploaded</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>aacb4622c8cd83d1635a8c0db13c8c0fe</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>fileTooLarge</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a29dc78a0162c676f7b72904d595440d8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>changed</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a3abaf94bdba04e7833aa18bc7e8d0f40</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>upload</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>ac17094f2fd6ae8cac1035161f7d80b9c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setProgressBar</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a6600c5a1232057418b3fe63d5db1c004</anchor>
    +      <arglist>(WProgressBar *progressBar)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WProgressBar *</type>
    +      <name>progressBar</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>a6ba92fc8abf219fd42972dfe8fa5081e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; ::uint64_t,::uint64_t &gt; &amp;</type>
    +      <name>dataReceived</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>af7e87df88e456f3472bcda2dc07dae4c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WFileUpload.html</anchorfile>
    +      <anchor>ad23982f1823db145b0da23508a7aa7fa</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFitLayout</name>
    +    <filename>classWt_1_1WFitLayout.html</filename>
    +    <base>Wt::WLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFitLayout</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>a6d164d46d0d57581b175cd424fd14a02</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>ac961be1e914193e5f46992ef326d0939</anchor>
    +      <arglist>(WLayoutItem *)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>afd4c47377c0aa0a3a55db13a0ff2bae2</anchor>
    +      <arglist>(WLayoutItem *)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>a9a058c59e6fc3d7526d1d3c57c940049</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>a68002f0345e96fdfec1ccaa823c52a3e</anchor>
    +      <arglist>(WLayoutItem *item) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WFitLayout.html</anchorfile>
    +      <anchor>af8f23224493fcb1958fa676fd079b5e7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFlashObject</name>
    +    <filename>classWt_1_1WFlashObject.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFlashObject</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>a1ba25b0dc80aaea9bf6bebddb4566297</anchor>
    +      <arglist>(const std::string &amp;url, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WFlashObject</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>ab171e2e30fe09b82db7e97b9b9589265</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>ad4cb831ed24e824d7feeb2426994e2e3</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFlashParameter</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>af5b66c371c595a6c749535280c2823e7</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFlashVariable</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>a00d24cf3b700d448f504279b4c3f2501</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsFlashRef</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>afca00f0fe23c516684b7505bbbf8af62</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternativeContent</name>
    +      <anchorfile>classWt_1_1WFlashObject.html</anchorfile>
    +      <anchor>a00676cbb898bc23f09548c332121a67a</anchor>
    +      <arglist>(WWidget *alternative)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFont</name>
    +    <filename>classWt_1_1WFont.html</filename>
    +    <member kind="enumeration">
    +      <name>GenericFamily</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Default</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4adbffc4d9f5fa5f34900aebcd0b15bde4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Serif</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4a76dafddb4003414cd9c5581a2d0cfde8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SansSerif</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4a2f4002af014819d1eb4843d40d0dc22d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Cursive</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4a34fccfcaa60090f00390d9d0b8959c86</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Fantasy</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4a24fd87a4f64979b28c42bbb9b73f2042</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Monospace</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a29dc2c43365227caeb3d151dc849f9f4adbcd306de435d5aecc6f80255d8924f7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Style</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aed1f6f3ed136085227e54c74f3bcbcbd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NormalStyle</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aed1f6f3ed136085227e54c74f3bcbcbda8332fa5755d4809540bcc57c86b55b0c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Italic</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aed1f6f3ed136085227e54c74f3bcbcbdaa807084ea3007cb08b98a2593002f5fc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Oblique</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aed1f6f3ed136085227e54c74f3bcbcbda92c065dd7e86795818dceb6db5fdb96b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Variant</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a64cb5e27be68b9f210d5302e23f0b8c7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NormalVariant</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a64cb5e27be68b9f210d5302e23f0b8c7a98a079ddb687a3d916c6cfd94360302b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SmallCaps</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a64cb5e27be68b9f210d5302e23f0b8c7a6d9be1f2c12a2e1b4ce13537505f427c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Weight</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NormalWeight</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2fa4d5997214d1f422668a289ecaaa7392e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Bold</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2fabcc33bf83e80792439727f8989258fec</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Bolder</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2fa8cb7f0f4ce9e4a02d1afc05856558bcf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Lighter</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2fa5d62f7b71f48269896532ec567701353</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Value</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a87c97b2df78c225a081b916178138a2fad24130ba55c0c97f126c9640c457bb81</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>Size</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XXSmall</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146faa6439821f56d3b2f609f5af6cd506570</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XSmall</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fab152ee83d3060fef7504981ea753d272</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Small</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fa15bccc177a5d27332e245d5a0d298eaa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Medium</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fad7898454d7c34adf5ca205639a77c892</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Large</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fa1fbdeb7721717c1098f918f232cc96b3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XLarge</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fa7361b98849128d4eade8f16375ef150c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XXLarge</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fac0dbf95df3f79bb4780841669d776f3c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Smaller</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fa33310a2d66ef90bcce466920b0884538</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Larger</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146facf27ef48ceb695bee7e8b6087825e159</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FixedSize</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4d90d27f5888987091261e7ac227146fab8fde835312f7e4aa67998564f292f10</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFont</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a9839e47278aa3da5b613d29d6643e106</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a4146081cd9ae22a540400e4a69255d97</anchor>
    +      <arglist>(const WFont &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFamily</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>adf4922a79463304dedc2114049c054c1</anchor>
    +      <arglist>(GenericFamily genericFamily, const WString &amp;specificFamilies=WString())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>GenericFamily</type>
    +      <name>genericFamily</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a27f8c5ebedfef28401f6c047da3794e4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>specificFamilies</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a3da83e0629520dc11a8c6701ac6aa324</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyle</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a1a13d9f8bfe72ebc6e9a5c08be58d881</anchor>
    +      <arglist>(Style style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Style</type>
    +      <name>style</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aad6e63a8b1983de676d3490c9f370e11</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setVariant</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a2d4e225bebbc447727cd271d3c2c227d</anchor>
    +      <arglist>(Variant variant)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Variant</type>
    +      <name>variant</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>ae4890c91c42f93ff8ea517e59960245d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWeight</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>ac27d9f5d3a23115e3881a2d0ac9cb771</anchor>
    +      <arglist>(Weight weight, int value=400)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Weight</type>
    +      <name>weight</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a59074e98ba2d7bfb8a88b14126f7a545</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>weightValue</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a9fb38299d26f63e5915f50e42a4e2996</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSize</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>ad449c8c5c3b78e66d51fe6db0c0b9d58</anchor>
    +      <arglist>(Size size, const WLength &amp;fixedSize=WLength::Auto)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Size</type>
    +      <name>size</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>a27bf3326d9829276598808bcbefb63e5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>fixedSize</name>
    +      <anchorfile>classWt_1_1WFont.html</anchorfile>
    +      <anchor>aa93cf00e45120cc6a6ccbb6334e913d0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WFormWidget</name>
    +    <filename>classWt_1_1WFormWidget.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WFormWidget</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a63194da5d63a46188b38bbda2936cf61</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WFormWidget</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>af9027662449d08a70e361611f6fcf4c7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLabel *</type>
    +      <name>label</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a82f0eaf7fb35132644b429e2b3b8930f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>af7db6da14a0530408a7b68668d0d11ff</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValidator</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>aa773d16013d6959149ce5081e84b259c</anchor>
    +      <arglist>(WValidator *validator)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator *</type>
    +      <name>validator</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a4643be79e2c92bc448ce46e7d314335b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a7960606393d6158abb4a2d8c9d8fd2ef</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnabled</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>ad26d15f452d47832a4467608977f03f5</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFocus</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>afe33f5c3658ddbd08fec9f6c203c578b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFocus</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>ac424175d810c406d25efa64774d184c9</anchor>
    +      <arglist>(bool focus)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasFocus</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a5a2234b9417267c7a932571654e58679</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setTabIndex</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>abfd96a78d98db8572c51c9b18ab3ec88</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>tabIndex</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>ad7d39967608f2ef1582a313eb9d08a07</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setReadOnly</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a353ae79a10748c870f1fa2ce1f174eaa</anchor>
    +      <arglist>(bool readOnly)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isReadOnly</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a06ffc301c0cfb7f9da4c74deb469282a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEmptyText</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a92de7a4d9ca6796607dc9fd26f608436</anchor>
    +      <arglist>(const WString &amp;emptyText)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>emptyText</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a0f9f7ac3c423521f9ab0df855704eb71</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>changed</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a5216ba1594b5dc525cc47cad593c7ba8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>selected</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a4f7fcabf3e2f51b884230c179ee52137</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>blurred</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a5158413489fa4721d4689cc4639c914e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>focussed</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>afe56345bd7225852e2f8ef92bc048f6a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>a503448cefdd06c5fe18bf13e911e8bb8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WStatelessSlot *</type>
    +      <name>getStateless</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>ae6f44795e053299e31a3ab3e433c7deb</anchor>
    +      <arglist>(Method method)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WFormWidget.html</anchorfile>
    +      <anchor>aff5d72ac52040b97a77c21b0b38d44c8</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGenericMatrix</name>
    +    <filename>classWt_1_1WGenericMatrix.html</filename>
    +    <templarg>T</templarg>
    +    <templarg>Rows</templarg>
    +    <templarg>Cols</templarg>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGenericMatrix</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a5fc110fa4b41c04fd76318d8d30ce2f2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGenericMatrix</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>ae63c07b13313cb5035e725e251d2be31</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGenericMatrix</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a8752490de727d5ce6dd3120da518f49d</anchor>
    +      <arglist>(const T *elements)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const ArrayType &amp;</type>
    +      <name>constData</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a4b288803d1799dbcf6312f8ce0fdc283</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>copyDataTo</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>ade63e535a39caa2560a60dd7c969098d</anchor>
    +      <arglist>(T *data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ArrayType &amp;</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a4e9300685974b67610b9f6ad437a5ab4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const ArrayType &amp;</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a5c1080432c41e410199703af7c307aa3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>fill</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>aaf623a4a2a09bc9c853774c77daca3b4</anchor>
    +      <arglist>(T value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isIdentity</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a12186aa1e3c4c483f4f28c8a1f7a4e40</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setToIdentity</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a665f5d9bb6ed06aabfacadbf27e9e8be</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Cols, Rows &gt;</type>
    +      <name>transposed</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a259f772b9ff66a343e359127f4829090</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a82563312760fe55b669dce9ecee195cc</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a8ce22371debe5dbc5f9fcac8f926ac6b</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const T &amp;</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>af98a51740a0fe89f62c19005b8c03858</anchor>
    +      <arglist>(int row, int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>T &amp;</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a475533c4b5f89995053f2954557bde0b</anchor>
    +      <arglist>(int row, int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt; &amp;</type>
    +      <name>operator*=</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>acb15e0a9486e0986e3572e5fb5ce6f9f</anchor>
    +      <arglist>(const T &amp;factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt; &amp;</type>
    +      <name>operator/=</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>a23bd0e7f286f42c83a4c47cf6e857b57</anchor>
    +      <arglist>(const T &amp;factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt; &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>ab91384a67a371d98ba2b39abdefa5b03</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WGenericMatrix&lt; T, Rows, Cols &gt; &amp;</type>
    +      <name>operator-=</name>
    +      <anchorfile>classWt_1_1WGenericMatrix.html</anchorfile>
    +      <anchor>ace9cd1cfb0da44619c9a60abd5979b37</anchor>
    +      <arglist>(const WGenericMatrix&lt; T, Rows, Cols &gt; &amp;rhs)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGLWidget</name>
    +    <filename>classWt_1_1WGLWidget.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <class kind="class">Wt::WGLWidget::JavaScriptMatrix4x4</class>
    +    <member kind="enumeration">
    +      <name>ClientSideRenderer</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a5d3425efa2e26e226a67935d096826db</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PAINT_GL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a5d3425efa2e26e226a67935d096826dba3026bf815fbdf1e1f6049c6e8653e0be</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RESIZE_GL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a5d3425efa2e26e226a67935d096826dba49d7a736e09d5579fa52b840b56efcf8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UPDATE_GL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a5d3425efa2e26e226a67935d096826dba4819fd831280292fd1a9d861132434b8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>GLenum</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ae94560816975bedd91b9d63fc4b710a8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGLWidget</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa6d4034bfecbcbca2190ba1cbdb53fd8</anchor>
    +      <arglist>(WContainerWidget *parent)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WGLWidget</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a61a742adcc8fc1f5c71ea679ff276522</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>initializeGL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a173846477e42933b8cfd342db5de116e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resizeGL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a81c3bc38f708aec828ea1d1cf698633a</anchor>
    +      <arglist>(int width, int height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>paintGL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a867c0405122daeb78dad8a013c91f004</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>updateGL</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aac1505244222b8425bbd2f0a36c67545</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ab6e91b16dfa5e22a6c02cf12c1bbe799</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setClientSideLookAtHandler</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ae6a073cc4e88ddf5599270b14acb0133</anchor>
    +      <arglist>(const JavaScriptMatrix4x4 &amp;m, double lX, double lY, double lZ, double uX, double uY, double uZ, double pitchRate, double yawRate)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setClientSideWalkHandler</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a990af8ca034e1f496b3e9f7acaf5c6c4</anchor>
    +      <arglist>(const JavaScriptMatrix4x4 &amp;m, double frontStep, double rotStep)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternativeContent</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>acf46ce2f59e3a57831b1c452d972fce5</anchor>
    +      <arglist>(WWidget *alternative)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSlot &amp;</type>
    +      <name>repaintSlot</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ab44c8692c63dd82a2b5bcf70961319c5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>activeTexture</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a3adf76ce67f434d6966c639c98953998</anchor>
    +      <arglist>(GLenum texture)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>attachShader</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>abc8754b8435b1b9ff9e4628574682e88</anchor>
    +      <arglist>(Program program, Shader shader)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindAttribLocation</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a618261b8a88a6ec63e4e825dc86ba859</anchor>
    +      <arglist>(Program program, unsigned index, const std::string &amp;name)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindBuffer</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af19725ea4e17cb73015f1fe017daab16</anchor>
    +      <arglist>(GLenum target, Buffer buffer)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindTexture</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af5b7790e850fb70d4e2236f3e2368d1a</anchor>
    +      <arglist>(GLenum target, Texture texture)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>blendColor</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>abfe0430556af2b69b1974ed05cfe6ac3</anchor>
    +      <arglist>(double red, double green, double blue, double alpha)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>blendEquation</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a72ba397b13e4a1ea7a8cf3f392153237</anchor>
    +      <arglist>(GLenum mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>blendEquationSeparate</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ad6a0b90c3639981fb97f8f8a2f421e41</anchor>
    +      <arglist>(GLenum modeRGB, GLenum modeAlpha)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>blendFunc</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ade3074a25a1c74dfbbcac27dbd461b42</anchor>
    +      <arglist>(GLenum sfactor, GLenum dfactor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>blendFuncSeparate</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ac3047e378ef26ed04b355c91721c8f6d</anchor>
    +      <arglist>(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bufferDatafv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a800f42f541b3576eeb80019a7cf4c6c6</anchor>
    +      <arglist>(GLenum target, const Iterator begin, const Iterator end, GLenum usage)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bufferDataiv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a8f91c6352be703a0257bfd0afc8f56be</anchor>
    +      <arglist>(GLenum target, const Iterator begin, const Iterator end, GLenum usage, GLenum type)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bufferSubDatafv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a542d941618c30f90bdd02016dd6e3749</anchor>
    +      <arglist>(GLenum target, unsigned offset, const Iterator begin, const Iterator end)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bufferSubDataiv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a0ae2e097a8b4e5c4fdec22019f73fff7</anchor>
    +      <arglist>(GLenum target, unsigned offset, const Iterator begin, Iterator end, GLenum type)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>addcc25de08105c363cc43e442cf52d99</anchor>
    +      <arglist>(WFlags&lt; GLenum &gt; mask)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearColor</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a4e80c72c4b3f05a199ea9bf2037d28bf</anchor>
    +      <arglist>(double r, double g, double b, double a)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearDepth</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ad81ab5cdaa1ce285bcc694ef9276129c</anchor>
    +      <arglist>(double depth)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearStencil</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a4ceeb658e93f6a31deb3fb095218b114</anchor>
    +      <arglist>(int s)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>colorMask</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a980c3d63dae9852cb520464be428bf1b</anchor>
    +      <arglist>(bool red, bool green, bool blue, bool alpha)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>compileShader</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a96a9e906dc1da6636e6eb4a8c7f441af</anchor>
    +      <arglist>(Shader shader)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>copyTexImage2D</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a17179814d71e5f295056795f9c498970</anchor>
    +      <arglist>(GLenum target, int level, GLenum internalformat, int x, int y, unsigned width, unsigned height, int border)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>copyTexSubImage2D</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a235cb115e3874b5a6a8ffd2becc8a449</anchor>
    +      <arglist>(GLenum target, int level, int xoffset, int yoffset, int x, int y, unsigned width, unsigned height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Buffer</type>
    +      <name>createBuffer</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a4840bc58bf91af2cd7ad2457e1909ca1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Program</type>
    +      <name>createProgram</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a02b50faf2228b119fe22b4d282bef5f8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Shader</type>
    +      <name>createShader</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>afddbf886d2cc79a0ed4050a1cfe1af3e</anchor>
    +      <arglist>(GLenum shader)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Texture</type>
    +      <name>createTexture</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a1312b2a2ed7810709c98bc2adf72046a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Texture</type>
    +      <name>createTextureAndLoad</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a8830082d2a0a7c44eafb519e5392dd24</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>cullFace</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ae3a06231ee36de34f76553bdebb01cca</anchor>
    +      <arglist>(GLenum mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteBuffer</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>adecaf38ce4889c723ec739d550ad1e63</anchor>
    +      <arglist>(Buffer buffer)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteProgram</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af547d2c344045beb68cc1b9042f48ce0</anchor>
    +      <arglist>(Program program)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteShader</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a3bfbe2e8f5004a01e04718520eab65ce</anchor>
    +      <arglist>(Shader shader)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteTexture</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a3486aaa9626e524f5293118c01e81c1f</anchor>
    +      <arglist>(Texture texture)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>depthFunc</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ac209744ac0ece438b8b7ffe380799b8a</anchor>
    +      <arglist>(GLenum func)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>depthMask</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a0226f1a5f96d52d27cdd94a5994c7315</anchor>
    +      <arglist>(bool flag)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>depthRange</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aff57f61a4f563882e9460c11fde14c68</anchor>
    +      <arglist>(double zNear, double zFar)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>detachShader</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a1087bacbf24f0c7a82ae69ead7a944cd</anchor>
    +      <arglist>(Program program, Shader shader)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disable</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a5a41276a341fa2e3ca86cc10ba1cc4ee</anchor>
    +      <arglist>(GLenum cap)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawArrays</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa32b9c73b58e1e33699f4c27cd90cf22</anchor>
    +      <arglist>(GLenum mode, int first, unsigned count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawElements</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aaabb0fe26ffdda39fa0381a5e32fcc50</anchor>
    +      <arglist>(GLenum mode, unsigned count, GLenum type, unsigned offset)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enable</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aaf3453e58ec98f21349c78dc35f35169</anchor>
    +      <arglist>(GLenum cap)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableVertexAttribArray</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a70614ccf90c76fef8162580905dd6a7b</anchor>
    +      <arglist>(AttribLocation index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>finish</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a6bc0c8c32f70a72bde9f109106fa3b19</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>flush</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ad89c117d6a540bec3fb0b1a6fdab6021</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>frontFace</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a8d6173ea13f95b6212ee165790e31258</anchor>
    +      <arglist>(GLenum mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>generateMipmap</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a9fc7c929fb4bbed2a2ffe6e82f7c9f2e</anchor>
    +      <arglist>(GLenum target)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AttribLocation</type>
    +      <name>getAttribLocation</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a6ceed270b1a7a7b306e047fe6a11003d</anchor>
    +      <arglist>(Program program, const std::string &amp;attrib)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>UniformLocation</type>
    +      <name>getUniformLocation</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a0efd916e56562f9721faa3fae4f318ef</anchor>
    +      <arglist>(Program program, const std::string location)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hint</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a60500634c2080fe460fbb7b900b43869</anchor>
    +      <arglist>(GLenum target, GLenum mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>lineWidth</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a8263d1194622588549f886d6bd286017</anchor>
    +      <arglist>(double width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>linkProgram</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a3f2d536b3a2efd7cacf492f37a655f5f</anchor>
    +      <arglist>(Program program)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>pixelStorei</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a665757917d17c385bf140d05c278e7ba</anchor>
    +      <arglist>(GLenum pname, int param)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>polygonOffset</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a92f0f539294b4e071883a4abb572b1be</anchor>
    +      <arglist>(double factor, double units)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>sampleCoverage</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a637af34795420250680f9785e86c1044</anchor>
    +      <arglist>(double value, bool invert)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scissor</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a67aa948fdf124ad035a58740b58a6df9</anchor>
    +      <arglist>(int x, int y, unsigned width, unsigned height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>shaderSource</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a2d37dd24f16b6b21fdd00da3795725a6</anchor>
    +      <arglist>(Shader shader, const std::string &amp;src)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilFunc</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa409e924469752c92e843a7ea699c4c6</anchor>
    +      <arglist>(GLenum func, int ref, unsigned mask)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilFuncSeparate</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a20a9b0307f1fe56ebaf15bb2633b52cb</anchor>
    +      <arglist>(GLenum face, GLenum func, int ref, unsigned mask)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilMask</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa8c3c09a8369e13516ca7ab0ffb02e79</anchor>
    +      <arglist>(unsigned mask)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilMaskSeparate</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a764074c6a0c12fe196e5ec8de6663142</anchor>
    +      <arglist>(GLenum face, unsigned mask)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilOp</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af323ad020c915d44166a483b22d9341e</anchor>
    +      <arglist>(GLenum fail, GLenum zfail, GLenum zpass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stencilOpSeparate</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aae0e891dcc8b9ed56385d7fb4ab34263</anchor>
    +      <arglist>(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>texImage2D</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa9ee76bfbb937818824ba434acceacdf</anchor>
    +      <arglist>(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WImage *image)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>texImage2D</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a083bff48d16b0af87274623fb7c31ff5</anchor>
    +      <arglist>(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, WHTML5Video *video)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>texImage2D</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a8e38cabff05317c99a71ba8eb96469a5</anchor>
    +      <arglist>(GLenum target, int level, GLenum internalformat, GLenum format, GLenum type, Texture texture)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>texParameteri</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>abac768779ed44759d762a942f1d3c1c1</anchor>
    +      <arglist>(GLenum target, GLenum pname, GLenum param)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform1f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a6b02c6a2aaa1aaf6802f42ced843cef4</anchor>
    +      <arglist>(const UniformLocation &amp;location, double x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform1fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a7c58ef915c0f0dfd681d23ab6fdbea86</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform1i</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a16adc3005430e229621e80b20d8bd3b8</anchor>
    +      <arglist>(const UniformLocation &amp;location, int x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform1iv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a122014822bc7b2e457ad8dc74709ade3</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform2f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a0e99527c91dcb5b580e7eaa22113011f</anchor>
    +      <arglist>(const UniformLocation &amp;location, double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform2fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ac56fbf95fc1f0070c84bd1d24af7e409</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform2i</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ac05c454c7f4ce41e3aed8495f27ee322</anchor>
    +      <arglist>(const UniformLocation &amp;location, int x, int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform2iv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ab876c0f45f4ca7b12c539a5e6389c13f</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform3f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a4f6a054f4902cd574b357944fa4205af</anchor>
    +      <arglist>(const UniformLocation &amp;location, double x, double y, double z)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform3fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ab8c6d8893a5042f0bd210e8e4a3c1ef0</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform3i</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af389d5e9bcd3e0c7af205e6fa4e5c96c</anchor>
    +      <arglist>(const UniformLocation &amp;location, int x, int y, int z)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform3iv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af143d0086fa329f1be91f5b94cd23137</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform4f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a7ba3292d9578808b90c11ff8bb5d6d4e</anchor>
    +      <arglist>(const UniformLocation &amp;location, double x, double y, double z, double w)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform4fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a85b8eb858697b66c94f9fcde64b2ecfa</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform4i</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ad201c7a916796921e52b74c79a19f43e</anchor>
    +      <arglist>(const UniformLocation &amp;location, int x, int y, int z, int w)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniform4iv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>abe0fd6375d820e9d00f291ee3dd99e21</anchor>
    +      <arglist>(const UniformLocation &amp;location, const Array *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix2fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a23f88a4c2f0018c1f28882ca87737c2c</anchor>
    +      <arglist>(const UniformLocation &amp;location, bool transpose, const MatrixType *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix2</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a6f8eff162f76c7f8235701f19aad9b07</anchor>
    +      <arglist>(const UniformLocation &amp;location, const WGenericMatrix&lt; T, 2, 2 &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix3fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a810a75144569105dad79a9d6d7bcec83</anchor>
    +      <arglist>(const UniformLocation &amp;location, bool transpose, const MatrixType *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix3</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a04320c5230e859976031169cb5790285</anchor>
    +      <arglist>(const UniformLocation &amp;location, const WGenericMatrix&lt; T, 3, 3 &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix4fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a2705b583d7025ca84679df556d8c0d49</anchor>
    +      <arglist>(const UniformLocation &amp;location, bool transpose, const MatrixType *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix4</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a45ab6ecc3c905584142062bc52a7c805</anchor>
    +      <arglist>(const UniformLocation &amp;location, const WGenericMatrix&lt; T, 4, 4 &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>uniformMatrix4</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aa63161958fe1fb5ab60d22b84bec09f5</anchor>
    +      <arglist>(const UniformLocation &amp;location, const JavaScriptMatrix4x4 &amp;m)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>useProgram</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a4f29ecdc7c2fd1935ec29d5d953116f0</anchor>
    +      <arglist>(Program program)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>validateProgram</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ad2153bce90cddf7fc459fe4f1329e8fa</anchor>
    +      <arglist>(Program program)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib1f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>abe8a985b723658b7a3ab145b27dea772</anchor>
    +      <arglist>(AttribLocation location, double x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib1fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>adb01338e3d34a2c9b98d7224c138f245</anchor>
    +      <arglist>(AttribLocation location, const Array *values)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib2f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af987f03a08db04a7ba2592a3d11d4d9b</anchor>
    +      <arglist>(AttribLocation location, double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib2fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a81a4e08dad61fd54f8ce218cc874e63e</anchor>
    +      <arglist>(AttribLocation location, const Array *values)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib3f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>ac9ce062f8afa522c395946e18b08cfd4</anchor>
    +      <arglist>(AttribLocation location, double x, double y, double z)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib3fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aaf8a572df5f3df22e60de2273ea01334</anchor>
    +      <arglist>(AttribLocation location, const Array *values)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib4f</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>af0de2acadf10f24274e1c1fb91b09857</anchor>
    +      <arglist>(AttribLocation location, double x, double y, double z, double w)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttrib4fv</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a0fc9a0a1d8f114c2203fb06b9bb276d2</anchor>
    +      <arglist>(AttribLocation location, const Array *values)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>vertexAttribPointer</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aee176b126361862324108eaf2fa8f189</anchor>
    +      <arglist>(AttribLocation location, int size, GLenum type, bool normalized, unsigned stride, unsigned offset)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>viewport</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a507e325d11e91fda58285388adf49d81</anchor>
    +      <arglist>(int x, int y, unsigned width, unsigned height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JavaScriptMatrix4x4</type>
    +      <name>createJavaScriptMatrix4</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a6f729efd3e92fa137684cabbfb469ef8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setJavaScriptMatrix4</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>aae864d04f6379fae87312ab4dd7f157d</anchor>
    +      <arglist>(const JavaScriptMatrix4x4 &amp;jsm, const WGenericMatrix&lt; T, 4, 4 &gt; &amp;m)</arglist>
    +    </member>
    +    <member kind="function" protection="private">
    +      <type>void</type>
    +      <name>layoutSizeChanged</name>
    +      <anchorfile>classWt_1_1WGLWidget.html</anchorfile>
    +      <anchor>a596e6780d7390138d440c2f37bca288f</anchor>
    +      <arglist>(int width, int height)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGLWidget::JavaScriptMatrix4x4</name>
    +    <filename>classWt_1_1WGLWidget_1_1JavaScriptMatrix4x4.html</filename>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGoogleMap</name>
    +    <filename>classWt_1_1WGoogleMap.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <class kind="class">Wt::WGoogleMap::Coordinate</class>
    +    <member kind="enumeration">
    +      <name>MapTypeControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a302ab44e934f301001c3acf79ddc0d0c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a302ab44e934f301001c3acf79ddc0d0cab4888bbfce9abc7e1bf9fd52e9c4279f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DefaultControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a302ab44e934f301001c3acf79ddc0d0cae4a7ffd51ec10ca611336505dad09837</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MenuControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a302ab44e934f301001c3acf79ddc0d0cac428b71c3898abd67ca433a41bae7024</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>HierarchicalControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a302ab44e934f301001c3acf79ddc0d0caa31736b7a72e1f243ba17cdd25989594</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGoogleMap</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>aa3161e65e7327f093995ba2ca783cd9e</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WGoogleMap</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ad7b54de74f2db00d4b71be6071af0be3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addMarker</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ad80935926cc2a08f6dff26de3480dcc6</anchor>
    +      <arglist>(const Coordinate &amp;pos)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPolyline</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a7ed22111f2c65851d7b4f5f2e43230e5</anchor>
    +      <arglist>(const std::vector&lt; Coordinate &gt; &amp;points, const WColor &amp;color=red, int width=2, double opacity=1.0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearOverlays</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a77204daba9840d892e3621b129e742d4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>openInfoWindow</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a90b58b02052aa788efcf0b9d92335112</anchor>
    +      <arglist>(const Coordinate &amp;pos, const Wt::WString &amp;myHtml)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCenter</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>aa9f62ed546a090cc9dbcf3d10769bc80</anchor>
    +      <arglist>(const Coordinate &amp;center)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCenter</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a34df0d680b54a956342d2e095229f9fe</anchor>
    +      <arglist>(const Coordinate &amp;center, int zoom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>panTo</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ac1d54272ff541cc54b29ed4fee288931</anchor>
    +      <arglist>(const Coordinate &amp;center)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>zoomWindow</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a6b08ef4a408d75d10d71d005d3c65783</anchor>
    +      <arglist>(const std::pair&lt; Coordinate, Coordinate &gt; &amp;bbox)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>zoomWindow</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a66cf38a3c31b97c08321c5ac9bf71270</anchor>
    +      <arglist>(const Coordinate &amp;topLeft, const Coordinate &amp;bottomRight)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setZoom</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a9b4583c4557d756ba1cecab1ab00bf9b</anchor>
    +      <arglist>(int level)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>zoomIn</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>afbd9cf2dc56673f4870aa91a71c3301c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>zoomOut</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a74363a089b5b1dcbbd644ab810c94464</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>savePosition</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>af6addd98268d64aa33834280b8819d65</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>returnToSavedPosition</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ae6abfd1d0942d0559e511caa5f2f5c97</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>checkResize</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a75c3d2a4e9c4acdf786750a10f7691a6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableDragging</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a83be42bcd7f4be38e04fbaec72a95b8e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disableDragging</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a9b8b0c3f121f498e4cf5256390880ae6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableDoubleClickZoom</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ae4993bd2e7baf017183a4ff3b554c53b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disableDoubleClickZoom</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a5cfa10ca7087f3a7f032bdbdcc422e67</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableGoogleBar</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>aed48586350d3e4908459a47ce0822348</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disableGoogleBar</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a3982558cba9768c4815e7fbb6c23d92f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableScrollWheelZoom</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a39dc1da1fe51f1c285dac04e565fdfa5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disableScrollWheelZoom</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a90462279e5092088aba4e79c2f4eaab9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMapTypeControl</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>ad5b1aabd260b3b05e9888718264c40e2</anchor>
    +      <arglist>(MapTypeControl type)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; Coordinate &gt; &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>a3b1b5e513502222e89d8fbcfb79a9198</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; Coordinate &gt; &amp;</type>
    +      <name>doubleClicked</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>aa81efcc86e7ab1b6a6701e97d9e3fb02</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; Coordinate &gt; &amp;</type>
    +      <name>mouseMoved</name>
    +      <anchorfile>classWt_1_1WGoogleMap.html</anchorfile>
    +      <anchor>adfdd221d9ea430870f052a2180028f73</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGoogleMap::Coordinate</name>
    +    <filename>classWt_1_1WGoogleMap_1_1Coordinate.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Coordinate</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>a4c9df44997cafefdbab28fe680901930</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Coordinate</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>abbb42d1557e16098bbae3da50d99a9d3</anchor>
    +      <arglist>(double latitude, double longitude)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLatitude</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>aedbf38dfae561e239c102e482f0780c6</anchor>
    +      <arglist>(double latitude)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLongitude</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>ab3c170ef039993e331448f2ea5d63daf</anchor>
    +      <arglist>(double longitude)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>latitude</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>ae53fbf51fbdefe0607557ca3fbe9d93c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>longitude</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>a5a3de1da170a93a81f3bcda1b372dc17</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>distanceTo</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>a4d69943233187fc9fea559e347879015</anchor>
    +      <arglist>(const Coordinate &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::pair&lt; double, double &gt;</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1WGoogleMap_1_1Coordinate.html</anchorfile>
    +      <anchor>a4496fee048f0ea03d2533b787e3273a8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGridLayout</name>
    +    <filename>classWt_1_1WGridLayout.html</filename>
    +    <base>Wt::WLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGridLayout</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>ad6dc690b71e636f9d99f1ab6bf257002</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a82fb0e2743d9081893b83003d5263dbd</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a35a10fd71fa00cad962bd0980d9cdc00</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>adfbab1a8c0090423f24371bb5281fcb7</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a95300e5b406b82d9e1993bd96c80cab7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a2dd5c84a8054c1bcb602cb72cb27f898</anchor>
    +      <arglist>(WLayoutItem *item, int row, int column, int rowSpan=1, int columnSpan=1, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addLayout</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a8e0ae47aa0e7283ce3d4be05249c05eb</anchor>
    +      <arglist>(WLayout *layout, int row, int column, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addLayout</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>ab6e0f9aaecfed4dc978a3c0534f844ba</anchor>
    +      <arglist>(WLayout *layout, int row, int column, int rowSpan, int columnSpan, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a6e64afee237de5665fcd014f407130b2</anchor>
    +      <arglist>(WWidget *widget, int row, int column, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>add85db41b29855aa620adbcef7e19dae</anchor>
    +      <arglist>(WWidget *widget, int row, int column, int rowSpan, int columnSpan, WFlags&lt; AlignmentFlag &gt; alignment=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHorizontalSpacing</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a60713a99ab98907fe5c9f99417fb6493</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>horizontalSpacing</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a4fe774ed02137f1834f79e9214d93fc9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setVerticalSpacing</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>ad2a2188bece8a47628dae340108962ae</anchor>
    +      <arglist>(int size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>verticalSpacing</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a455f8a42d2339a3485a34a9bb4f140cf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a540aa44a75a66fe61d5bae8e37ced84b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a7958b26122eb898572bf3117974de00b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnStretch</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a4605de0523f5613096b6cbd983123c8b</anchor>
    +      <arglist>(int column, int stretch)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnStretch</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a33099b99582099b9ea4fadcc5b4b9f91</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRowStretch</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>ad8d1199b57063fb7286be6dab13c998c</anchor>
    +      <arglist>(int row, int stretch)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowStretch</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a118a1d8599100e6b9ee96618eff91637</anchor>
    +      <arglist>(int row) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnResizable</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a180c33a8f9e21a7b58f12e055fdb469e</anchor>
    +      <arglist>(int column, bool enabled=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>columnIsResizable</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a1fe8bc99a587181d85a73465ab20d022</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRowResizable</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>a6028853eb5a66d868323d0e034b69390</anchor>
    +      <arglist>(int row, bool enabled=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>rowIsResizable</name>
    +      <anchorfile>classWt_1_1WGridLayout.html</anchorfile>
    +      <anchor>ab60cbaf413636b09b09d3b6b43875286</anchor>
    +      <arglist>(int row) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WGroupBox</name>
    +    <filename>classWt_1_1WGroupBox.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGroupBox</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>a9b12382d30cb1aecbe6be0374a0a8dc8</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WGroupBox</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>af6ba26c8f1d3b8fcd5bcfbc9dfcb993f</anchor>
    +      <arglist>(const WString &amp;title, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>afc668f60e7b6cbeb609c2cb355538d68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>a369081aa62b840875cac9ee5d24bd64e</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>a44bbe83b4a9af80c5d50e5671c2d2df6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WGroupBox.html</anchorfile>
    +      <anchor>a2ac619eeb41a1c4a9da2404922fc861b</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WHBoxLayout</name>
    +    <filename>classWt_1_1WHBoxLayout.html</filename>
    +    <base>Wt::WBoxLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WHBoxLayout</name>
    +      <anchorfile>classWt_1_1WHBoxLayout.html</anchorfile>
    +      <anchor>acca9faa9fd4fd7c0be8816b8bd68ad98</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WHTML5Audio</name>
    +    <filename>classWt_1_1WHTML5Audio.html</filename>
    +    <base>Wt::WHTML5Media</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WHTML5Audio</name>
    +      <anchorfile>classWt_1_1WHTML5Audio.html</anchorfile>
    +      <anchor>aea5306ece0966777559ee120a2127cb2</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsAudioRef</name>
    +      <anchorfile>classWt_1_1WHTML5Audio.html</anchorfile>
    +      <anchor>a47f8875cff3af7b3714200b8b484b5f1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WHTML5Media</name>
    +    <filename>classWt_1_1WHTML5Media.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="enumeration">
    +      <name>Options</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a5e3e4388b65cf7d9acd01306ee9e10e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Autoplay</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a5e3e4388b65cf7d9acd01306ee9e10e3a1c0932603bbc72bc35090cf7481098d8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Loop</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a5e3e4388b65cf7d9acd01306ee9e10e3afadbbd02ce6b418ac0477a8e9c4d1b4c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Controls</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a5e3e4388b65cf7d9acd01306ee9e10e3a7565510984d0f4640cbeb727ab175a28</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PreloadMode</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a4b0dcdd59b42e2937b98c3dae081eed6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreloadNone</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a4b0dcdd59b42e2937b98c3dae081eed6aa72922385a730be7faae603c2eacb914</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreloadAuto</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a4b0dcdd59b42e2937b98c3dae081eed6ab4f7157dd2af00b7468b22ff8de8b991</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreloadMetadata</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a4b0dcdd59b42e2937b98c3dae081eed6a8a5412d64ee9059f9651a3e75c22e1a4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WHTML5Media</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a21024629c8aa7deb29869abf32a6a5f2</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOptions</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>af85822a204001fb1de970738743820fc</anchor>
    +      <arglist>(const WFlags&lt; Options &gt; &amp;flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; Options &gt;</type>
    +      <name>getOptions</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>aae699facbd5f3599c920911bfd7d53c7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPreloadMode</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a610d5cc91715adb27eb270eb1ce2eff0</anchor>
    +      <arglist>(PreloadMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>PreloadMode</type>
    +      <name>preloadMode</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>ad0db107003cada25e082d27197c8ecbc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSources</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>ac3e0aae629eef92b0777d4c8ea9cb8a7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSource</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>ad9722ff6302a3e83f7a50abdb38cb43e</anchor>
    +      <arglist>(const std::string &amp;url, const std::string &amp;type=&quot;&quot;, const std::string &amp;media=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSource</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>accedf7641b95c0cba351fa56ad0353a8</anchor>
    +      <arglist>(WResource *resource, const std::string &amp;type=&quot;&quot;, const std::string &amp;media=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternativeContent</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>aa936f26ee6ee7fc3a4a240c078af1ec3</anchor>
    +      <arglist>(WWidget *alternative)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>play</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a0b701d940f23a054200913c90e59a398</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>pause</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a700fd0f7096b9d5a10480020b1ac56ac</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>playing</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>aec1267856ddb72a82e0d872e42bd3163</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>playbackStarted</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a631ea59e60821c90fa18f7ee7659ccc0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>playbackPaused</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a3aef2dd6d73dfd827f1827641eb99fa0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>ended</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a4617c95b120eedc0cb4e90d9aea98e53</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>timeUpdated</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>ac22a695f76473d14bbf0cb0c084ff64d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>volumeChanged</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>ad51258fe57a9bd455cd08226057ef791</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsMediaRef</name>
    +      <anchorfile>classWt_1_1WHTML5Media.html</anchorfile>
    +      <anchor>a8440736283c86a450dc72b2f27272047</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WHTML5Video</name>
    +    <filename>classWt_1_1WHTML5Video.html</filename>
    +    <base>Wt::WHTML5Media</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WHTML5Video</name>
    +      <anchorfile>classWt_1_1WHTML5Video.html</anchorfile>
    +      <anchor>af6e20e2f527a81db4fd3d55e46a88ec0</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPoster</name>
    +      <anchorfile>classWt_1_1WHTML5Video.html</anchorfile>
    +      <anchor>abb0c3e2be39815b4bc6d53908f6f3596</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsVideoRef</name>
    +      <anchorfile>classWt_1_1WHTML5Video.html</anchorfile>
    +      <anchor>ae197ff7dd2ee6e14dc5b41a0061a3672</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WHTML5Video.html</anchorfile>
    +      <anchor>a808cb87ff2296ed4ff84fc0eea9c8972</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WIconPair</name>
    +    <filename>classWt_1_1WIconPair.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WIconPair</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>abcba8fda209d3dae4869fa8d82d5ba36</anchor>
    +      <arglist>(const std::string &amp;icon1URL, const std::string &amp;icon2URL, bool clickIsSwitch=true, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setState</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a84029cf28869da70946b078841518e54</anchor>
    +      <arglist>(int num)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>state</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a538584ae901a6d69b7808e326cda09c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WImage *</type>
    +      <name>icon1</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>ad6eed0ffbd0915da07e0365eb07ec515</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WImage *</type>
    +      <name>icon2</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a4b9167325de2f95cce47714d2531dfc1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>showIcon1</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a97187962ca2272b1665aa2ca267c6d7f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>showIcon2</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a774952e5c30f47d0b1d213e01448325d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>icon1Clicked</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>ab5bbb66929dfbdf8918c7ddbf70639eb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>icon2Clicked</name>
    +      <anchorfile>classWt_1_1WIconPair.html</anchorfile>
    +      <anchor>a9dabd7d16e62298ebab6a95054e50321</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WImage</name>
    +    <filename>classWt_1_1WImage.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WImage</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>aa3566a1fb818f5a57c4cc0d298cc71c7</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WImage</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a42eea962cef07ec071ebae0518d1b48d</anchor>
    +      <arglist>(const std::string &amp;imageRef, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WImage</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a3482c9d00484accd1c81fb715c767f6f</anchor>
    +      <arglist>(const std::string &amp;imageRef, const WString &amp;altText, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WImage</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>abf4394e0350e28074875dcbd3ce30ff6</anchor>
    +      <arglist>(WResource *resource, const WString &amp;altText, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternateText</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>afa619104c48e0152f5847d72a5397fc3</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>alternateText</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>afb3144944ad2203d35d08c29bab7111a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setImageRef</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>acea9ce518f4eec6b19fd4bacc44a52e8</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>imageRef</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>ae3a7a79cd15e7aa7e4e7c3a72873bc68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResource</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a509a0636d08916dc14bc1d6eefa79c58</anchor>
    +      <arglist>(WResource *resource)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WResource *</type>
    +      <name>resource</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a2ae66c010a7c8c0fffc772c8dd36f91c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addArea</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>aa5737b44a5161b8494b2691c20315417</anchor>
    +      <arglist>(WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertArea</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a32baad2b361ff4660a8354a98e998535</anchor>
    +      <arglist>(int index, WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeArea</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a79b9dedd023e423b1b2575588ed7ff51</anchor>
    +      <arglist>(WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractArea *</type>
    +      <name>area</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>ad1900179902128ddd3d26922c33a3b97</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WAbstractArea * &gt;</type>
    +      <name>areas</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>ae2dca02b06799eacebc7474569c234b5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>imageLoaded</name>
    +      <anchorfile>classWt_1_1WImage.html</anchorfile>
    +      <anchor>a54258a16b4ff221694fd79701ce8cd98</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WInPlaceEdit</name>
    +    <filename>classWt_1_1WInPlaceEdit.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WInPlaceEdit</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>ad1b55ac6fa3b62c38e3e112fd0a088a9</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>a92e099fb0bd5952b57bea38701635d00</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>ac45af87bce6ad792a9f9aa3d3b829701</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEmptyText</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>a2d0d57ceb95526cf5e26f783dbb57a23</anchor>
    +      <arglist>(const WString &amp;emptyText)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>emptyText</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>ab2730eb661ac03214ae446d48b35bd4b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLineEdit *</type>
    +      <name>lineEdit</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>a9c2c7f27fae36c6fe373ac9e5b92961b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPushButton *</type>
    +      <name>saveButton</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>a4c617cd4e05e50ff03b20de1c0aa26d2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPushButton *</type>
    +      <name>cancelButton</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>afa1a731ca5151ba8f6052fe6f516d345</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WString &gt; &amp;</type>
    +      <name>valueChanged</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>a9c060014e820680fa242e051ebb77595</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setButtonsEnabled</name>
    +      <anchorfile>classWt_1_1WInPlaceEdit.html</anchorfile>
    +      <anchor>aac994b226bc2c33ecb36032b8f488933</anchor>
    +      <arglist>(bool enabled=true)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WInteractWidget</name>
    +    <filename>classWt_1_1WInteractWidget.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WInteractWidget</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a76de423b005efb0d216fd6e7204abbc1</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentDown</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a8669f2d35aad5091837b97bd00f25223</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyPressed</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a6d4c957a92eb6ffec59a638dd384c6c9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentUp</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a7602bfbe38090d4acca674afc02f15c8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>enterPressed</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a38f06d1ad95e7599b055f49931236c10</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>escapePressed</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ab581bba7f0ce02380e9339198bac2f78</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ae11e050cce0d4a8f742afa3ef92bfe8c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>doubleClicked</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a8865f4bb679e5c3ff2c946ef83248e19</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentDown</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ad29946ac46183ca238229327479084ca</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentUp</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a318d761e35388a52eeb3406e6717b28f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentOut</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a0511484098ce87ed0038b2881ab316bd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWentOver</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a89a46ebf7fbcea5a494c4dac13f1dc15</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseMoved</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a40c3643603fa861b1ec797eec794aa4c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseDragged</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a1ea435a0495d652f36d84f3656cbb8b3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>mouseWheel</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a656a0e4d5af72af0190d84dedf0093c6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WTouchEvent &gt; &amp;</type>
    +      <name>touchStarted</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ac7d10a6cae1e23a791b44c0682a3c627</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WTouchEvent &gt; &amp;</type>
    +      <name>touchEnded</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ad378d76c2d222e1ad72f8967b7c2d1a5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WTouchEvent &gt; &amp;</type>
    +      <name>touchMoved</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ac1ea20c5d68b3219612af9d1171b9252</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WGestureEvent &gt; &amp;</type>
    +      <name>gestureStarted</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a3c568c747c955aba9967e41aac8ddb9b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WGestureEvent &gt; &amp;</type>
    +      <name>gestureChanged</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a700a49b63018898968ac59aeba50a691</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WGestureEvent &gt; &amp;</type>
    +      <name>gestureEnded</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a0e4cba113eacf8d1047977c407e7dfad</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDraggable</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a556c14d02388720b1d95b2149be2e867</anchor>
    +      <arglist>(const std::string &amp;mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ae7ded9ad52a90fce9d54e8d1c299fd72</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>a6400f1359677b000c182b945d5705629</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WInteractWidget.html</anchorfile>
    +      <anchor>ac331a4996af95f7a60264f67d51a74d2</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WIntValidator</name>
    +    <filename>classWt_1_1WIntValidator.html</filename>
    +    <base>Wt::WValidator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WIntValidator</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a89d08b52740d6791ce4741c1cc74cd5b</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WIntValidator</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>af81e1d2d1a0fce7e92fdf3b8b67bfbe1</anchor>
    +      <arglist>(int minimum, int maximum, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a58ab417ac57782691b6ad6987ad7b8dd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottom</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a365500d492560d016b3ba7f263ce282c</anchor>
    +      <arglist>(int bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a9534fc0b7b7864e71a80b77dcfbff5ec</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTop</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a8a804c3ea0811b5c32de974592a1c88c</anchor>
    +      <arglist>(int top)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>afe180f56f061c98fcc9de6be20effe38</anchor>
    +      <arglist>(int bottom, int top)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a15807b522c601992d5275a729ed69285</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>af956eb115e0b77053c33cf6872ace2e9</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidNotANumberText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a9bc399a9536652c9ab52301669909b6a</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidNotANumberText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>ac799cd9012ceebded234968a8975f9a8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooSmallText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a680b57bde8dacfe52e8e65d4abbcf4c6</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooSmallText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>aed9ac49dea2069f723dd1f95a5f02744</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooLargeText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a2e474c6f5ffecff9c8d7cc27810b211f</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooLargeText</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a873f37b94a25ab9e1102c48f8bd3c7b1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>a61217a65efb5d2e06262e3710224ea46</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>inputFilter</name>
    +      <anchorfile>classWt_1_1WIntValidator.html</anchorfile>
    +      <anchor>aaa26351e1a00502da10a9d67a7eea817</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WItemDelegate</name>
    +    <filename>classWt_1_1WItemDelegate.html</filename>
    +    <base>Wt::WAbstractItemDelegate</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WItemDelegate</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>ac016d3abb5a129df3a4a690fa9094bd0</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a2cbc2240449a1000650f3c3b5e64bc8f</anchor>
    +      <arglist>(WWidget *widget, const WModelIndex &amp;index, WFlags&lt; ViewItemRenderFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>updateModelIndex</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a8d97be988b846205f61b646c3a424040</anchor>
    +      <arglist>(WWidget *widget, const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTextFormat</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>ad886d265dc00b95d9fb90c022a6322f9</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>textFormat</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a378af3d59a2765edca259cd2fb75dc90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModelData</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a7f5f6ee8d506749f9e16463c5502f0f2</anchor>
    +      <arglist>(const boost::any &amp;editState, WAbstractItemModel *model, const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>editState</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a4efa5822211a5791df55d2d464a5cd4e</anchor>
    +      <arglist>(WWidget *editor) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setEditState</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>afacb5ea1866c2212ad3cf0a616c78857</anchor>
    +      <arglist>(WWidget *editor, const boost::any &amp;value) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>createEditor</name>
    +      <anchorfile>classWt_1_1WItemDelegate.html</anchorfile>
    +      <anchor>a832398b35176a47de56dce8fc89e58dd</anchor>
    +      <arglist>(const WModelIndex &amp;index, WFlags&lt; ViewItemRenderFlag &gt; flags) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WItemSelectionModel</name>
    +    <filename>classWt_1_1WItemSelectionModel.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WItemSelectionModel.html</anchorfile>
    +      <anchor>a42fb83302389cc2942cc09a198c0ee00</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndexSet</type>
    +      <name>selectedIndexes</name>
    +      <anchorfile>classWt_1_1WItemSelectionModel.html</anchorfile>
    +      <anchor>a4c366757fa7e6b5b6519d34e3c2ac084</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSelected</name>
    +      <anchorfile>classWt_1_1WItemSelectionModel.html</anchorfile>
    +      <anchor>a96e391104f8846557ed95f5a93f4f452</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionBehavior</name>
    +      <anchorfile>classWt_1_1WItemSelectionModel.html</anchorfile>
    +      <anchor>acbf2a0659f9b5f04becbf5dd02aff9b3</anchor>
    +      <arglist>(SelectionBehavior behavior)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionBehavior</type>
    +      <name>selectionBehavior</name>
    +      <anchorfile>classWt_1_1WItemSelectionModel.html</anchorfile>
    +      <anchor>a7bddf47881159cdd36651891954f3a39</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::JSignal</name>
    +    <filename>classWt_1_1JSignal.html</filename>
    +    <templarg>A1</templarg>
    +    <templarg>A2</templarg>
    +    <templarg>A3</templarg>
    +    <templarg>A4</templarg>
    +    <templarg>A5</templarg>
    +    <templarg>A6</templarg>
    +    <base>Wt::EventSignalBase</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>JSignal</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a3100e4e460f900ce97b1de554bae1108</anchor>
    +      <arglist>(WObject *object, const std::string &amp;name, bool collectSlotJavaScript=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~JSignal</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a6f1d8251daf0abf670c7a654b778d81f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>name</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>aba4f375bcfd61c8938ceeafedd1b79b9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>createCall</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a449dbc079722b0ed9a9fd5df43e359f0</anchor>
    +      <arglist>(const std::string &amp;arg1=std::string(), const std::string &amp;arg2=std::string(), const std::string &amp;arg3=std::string(), const std::string &amp;arg4=std::string(), const std::string &amp;arg5=std::string(), const std::string &amp;arg6=std::string()) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>createEventCall</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>afc04a6ee10c4ac0effe04b406feeb998</anchor>
    +      <arglist>(const std::string &amp;jsObject, const std::string &amp;jsEvent, const std::string &amp;arg1=std::string(), const std::string &amp;arg2=std::string(), const std::string &amp;arg3=std::string(), const std::string &amp;arg4=std::string(), const std::string &amp;arg5=std::string()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isConnected</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a401ed9f5d5e0611b6dbd6eb28022f65f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>ad39bf916e97103eb678bf2246373d22f</anchor>
    +      <arglist>(const F &amp;function)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>ae3d48968885531f8d64f05d8b024b817</anchor>
    +      <arglist>(T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a362028c525116906c2dfce28b2566318</anchor>
    +      <arglist>(T *target, void(V::*method)(A1))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>aabe4c91b7d3fdf44f4f047b69b4cf3d1</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>aa2eeacaf71554d7cd8288478d76cf11b</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a16d978f531a0b816837bd2f244efa3d8</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a8de959fa99c06c11953b0ac02dcac7e8</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4, A5))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a9da2fb64bf9cdd9e0a7a1fd4341a2745</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a66ef05cc8d6f98bfbd5c7402c3997627</anchor>
    +      <arglist>(JSlot &amp;slot)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>emit</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a75643865204ab65b538f4ff80ed8f309</anchor>
    +      <arglist>(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1JSignal.html</anchorfile>
    +      <anchor>a8bcaf238774e3b0efd9c31c903550fee</anchor>
    +      <arglist>(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::JSlot</name>
    +    <filename>classWt_1_1JSlot.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>JSlot</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>a0d7d51d1bfe2c1fe86fd0da1aa6100a2</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>JSlot</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>a5a029953497443c38ba50514194a7925</anchor>
    +      <arglist>(const std::string &amp;javaScript, WWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~JSlot</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>ade213c06a4ee987a4ec39446e6954e21</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setJavaScript</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>a4e28a8ef6d2965aeaac0c5dcf587bbbb</anchor>
    +      <arglist>(const std::string &amp;javaScript)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>a3d65b00a8015e556580527b52750ef87</anchor>
    +      <arglist>(const std::string &amp;object=&quot;null&quot;, const std::string &amp;event=&quot;null&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>execJs</name>
    +      <anchorfile>classWt_1_1JSlot.html</anchorfile>
    +      <anchor>a520731f1245cb9a757675a93372c761c</anchor>
    +      <arglist>(const std::string &amp;object=&quot;null&quot;, const std::string &amp;event=&quot;null&quot;)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLabel</name>
    +    <filename>classWt_1_1WLabel.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLabel</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>aca64fdaa3c35e2127ce3903781584c24</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLabel</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>a2d42bd4a25a5a8fc9ad4896e078f64d4</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLabel</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>aa52eaf9dc8abb5f538cec01bb617c1d1</anchor>
    +      <arglist>(WImage *image, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFormWidget *</type>
    +      <name>buddy</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>a9bc62e3dad89cc51108bbaadaa47407f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBuddy</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>af468c613eab7d184c68fd6ae20978de5</anchor>
    +      <arglist>(WFormWidget *buddy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBuddy</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>ad01592a750814678ef198b8aecd87ae4</anchor>
    +      <arglist>(Ext::FormField *buddy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>aad258cec78e988d24cb457500de2b8a4</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>a8d8d0acd3bac7808415de310328dd8ee</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setImage</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>ab77dd95cd3a13e19c916bb803f28a520</anchor>
    +      <arglist>(WImage *image, Side side=Left)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WImage *</type>
    +      <name>image</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>ad664977a4924cecface67bce34551ad1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWordWrap</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>a50e413fa171f301129b39a4d4ed6d2fd</anchor>
    +      <arglist>(bool wordWrap)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>wordWrap</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>af1cbfcf44cd42532b81de8ed754a64da</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WLabel.html</anchorfile>
    +      <anchor>afafb4849c9498834e9c8aeef19b5dcb7</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLayout</name>
    +    <filename>classWt_1_1WLayout.html</filename>
    +    <base>Wt::WLayoutItem</base>
    +    <base>Wt::WObject</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WLayout</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>afee1a345112b107158765695fc6837eb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>ad4a778298c01d290692afc77e441c629</anchor>
    +      <arglist>(WLayoutItem *item)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a886d2ec4b6b97524ba3dff93252e6540</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a8c8d94070a51e669f8077249b67742ae</anchor>
    +      <arglist>(WLayoutItem *item)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>removeWidget</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a3f5e0f62a0deb8f2473e52c5270128d5</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a799b3cce5c1717b18e54c14471e84033</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLayoutItem *</type>
    +      <name>itemAt</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a3d48e5e4f56ad5d1b0e60180ebc91442</anchor>
    +      <arglist>(int index) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>afecba709ae19b93ef9bbe167650dbc5c</anchor>
    +      <arglist>(WLayoutItem *item) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidgetItem *</type>
    +      <name>findWidgetItem</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>aaf26f397f48824ed1e359d6a603eebe8</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLayoutHint</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>ac8fa1927e7c9b15e3e673cbf6a473c34</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>ada2f5beaa8a0153451ba55581ea9bbf8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayout *</type>
    +      <name>layout</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a82078a08c5a21aa67bd5a83c377d437d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayout *</type>
    +      <name>parentLayout</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>af0448e22813516009edc5555572a2043</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLayoutItemImpl *</type>
    +      <name>impl</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>aeb31f2caad3ed9b1ab2b06327cc92bb2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setContentsMargins</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>af18bae8c743c9f9a5cabee58826ffb45</anchor>
    +      <arglist>(int left, int top, int right, int bottom)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>getContentsMargins</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a90756cc8765259a26f8d54fd4531c7b3</anchor>
    +      <arglist>(int *left, int *top, int *right, int *bottom) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WLayout</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a7ea1c353ac9d38a94ad08fc0cb8d6c25</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>aa1549c20751b9a50cbc47d3a47adcb21</anchor>
    +      <arglist>(WLayoutItem *item=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>updateAddItem</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a8cf7d6517ab800c975a25dfc6682c58f</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>updateRemoveItem</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a31c7495263f67a4fbc8b384784af628d</anchor>
    +      <arglist>(WLayoutItem *item)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>setLayoutInParent</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>af196e38edc970646d765f003a6cc352e</anchor>
    +      <arglist>(WWidget *parent)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setParentWidget</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a0c3ceda2095c8414c6f10cc4c632f2bd</anchor>
    +      <arglist>(WWidget *parent)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setParentLayout</name>
    +      <anchorfile>classWt_1_1WLayout.html</anchorfile>
    +      <anchor>a15f0f5f75cc008b12619d643153889da</anchor>
    +      <arglist>(WLayout *parentLayout)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLayoutItem</name>
    +    <filename>classWt_1_1WLayoutItem.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WLayoutItem</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a40dd93ac8deba8535e0e5e6645f64ad4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidgetItem *</type>
    +      <name>findWidgetItem</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a95f14880009c9121d2f2d06cdf3204f0</anchor>
    +      <arglist>(WWidget *widget)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLayout *</type>
    +      <name>layout</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a3f81b4d198401ae493276a61be6784cf</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a06b127060eaf8a0b87a994b483d493e1</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLayout *</type>
    +      <name>parentLayout</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a05a18a6a59ef9e36bcb5d47199b18ba1</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLayoutItemImpl *</type>
    +      <name>impl</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>ab2f17122cf9589657bc0e6fa5e3ea560</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setParentWidget</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>a4d2c60ec55048746b9f197d9b5de2a0f</anchor>
    +      <arglist>(WWidget *parent)=0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setParentLayout</name>
    +      <anchorfile>classWt_1_1WLayoutItem.html</anchorfile>
    +      <anchor>ad810fbebeb2dce998e538eb31c060430</anchor>
    +      <arglist>(WLayout *parentLayout)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLayoutItemImpl</name>
    +    <filename>classWt_1_1WLayoutItemImpl.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WLayoutItemImpl</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>ad558805de90c6edc63aa7603f64d4c68</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>updateAddItem</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>a17f642513739083112ab2a69a05ca0a4</anchor>
    +      <arglist>(WLayoutItem *item)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>updateRemoveItem</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>a34f32973eaa21e827dabdec5a797e2b6</anchor>
    +      <arglist>(WLayoutItem *item)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>a8ea165afae63f97652bdb6854f2300f7</anchor>
    +      <arglist>(WLayoutItem *item)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>parentWidget</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>aecaf3ff1b598f7aa99730b337e5ef2f6</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setHint</name>
    +      <anchorfile>classWt_1_1WLayoutItemImpl.html</anchorfile>
    +      <anchor>a2ea7b787edada76fc0c9b7908caf673a</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLength</name>
    +    <filename>classWt_1_1WLength.html</filename>
    +    <member kind="enumeration">
    +      <name>Unit</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FontEm</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a3c8be5b087b150df97498adf7a69342f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FontEx</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0adcb9f05790b02548f1185fbceac6bd81</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Pixel</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a0b1fa4c1bd7adb92e1a04d62b96d30ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Inch</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a7e715eece268ff7455eb7f80e049c839</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Centimeter</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a92c81cba9e5ac72dd65295572da618c3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Millimeter</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a160938d7f938d245ee31f5e34be0f6a2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Point</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0aaf7ad2af268eb2197f6ebd323a8a3ac4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Pica</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0affd121933f44c8231c523747efa64a06</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Percentage</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a908caf5d6be7e244e24598e6d22cd4c0a304d9ef07db638690997830a7b348db1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLength</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>ad2a8e7901084735819bc1b29fdb9a930</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLength</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a1c06a75adecaa2dc0097e82f61a20e9a</anchor>
    +      <arglist>(double value, Unit unit=Pixel)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isAuto</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>ab4c9733029342fdbc1dee34a523ee40d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>ac4063de548d24148fda45a7bced29ef8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Unit</type>
    +      <name>unit</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a37b71e44633dd09a63b8a1ebb06e9a27</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>cssText</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a0a25adc9027a39ead32e06a201ffc00f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a45e8d143f73d728cac9c68b537edd2b4</anchor>
    +      <arglist>(const WLength &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a42fb15b07a6ba7ab12c688f2f05209bc</anchor>
    +      <arglist>(const WLength &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>toPixels</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a3f4a8633434fd5190a60dd693f4a2021</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static WLength</type>
    +      <name>Auto</name>
    +      <anchorfile>classWt_1_1WLength.html</anchorfile>
    +      <anchor>a0cf39ca4225776879d56ade60320c31a</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLengthValidator</name>
    +    <filename>classWt_1_1WLengthValidator.html</filename>
    +    <base>Wt::WValidator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLengthValidator</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>ad6ced22261c4dd0f249011a872c1ecbe</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLengthValidator</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>aee3614e5244c8bdbd226a781e014d82d</anchor>
    +      <arglist>(int minLength, int maxLength, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimumLength</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a6a772dfac01805c714374fd290ff6e6d</anchor>
    +      <arglist>(int minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>minimumLength</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a68dede1a5faa6d83f9347d8dde68f6d1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximumLength</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a1f1742e015228319a10dd42a38ef79f4</anchor>
    +      <arglist>(int maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>maximumLength</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a829f8c83606ed31a982e99fcd63b15fc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>ade2cb48af62ad35c7d7e50155fbf0e45</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a398750e14a071a4a7aff0d46d2266aaf</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooShortText</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a61299b45c89e93a8d7aa7f2570242286</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooShortText</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a39f2dd4516c2b53c84343d5adfe2f384</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidTooLongText</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>aa24dd0a946f937e0dde081003bf30fec</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidTooLongText</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a5ba8fb18ad613678b7f744b05dda55cc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WLengthValidator.html</anchorfile>
    +      <anchor>a2e8143bc9dedb9d4f7f77f3048bf5ff9</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLineEdit</name>
    +    <filename>classWt_1_1WLineEdit.html</filename>
    +    <base>Wt::WFormWidget</base>
    +    <member kind="enumeration">
    +      <name>EchoMode</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a2654d590e41b758cca16739d4bf0159c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Normal</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a2654d590e41b758cca16739d4bf0159ca4ebd4885d3cb474d78a43c414d71181d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Password</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a2654d590e41b758cca16739d4bf0159cad8804194006eac81d4072805a0d74666</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLineEdit</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a287f11cd278eccfd293c7cc715f72b65</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLineEdit</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a40fe6e402a904911e7389e4e16498b05</anchor>
    +      <arglist>(const WString &amp;content, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTextSize</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a4c6c5a52deefa5a246e0638f1572d0d8</anchor>
    +      <arglist>(int chars)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>textSize</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>af2886f31812bd56dea9897606546f5f6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>addb99c6ab5483836adf44a2706a410af</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>ac74b58779cb635898cac13e81d8b0c7a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaxLength</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>aaeca334d8a47be029b6a44912b01ed5d</anchor>
    +      <arglist>(int length)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>maxLength</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a0f5d01ba6e862a856b283d600e65e6ff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEchoMode</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a27c9bc232bea0ab76ee266be3325a10e</anchor>
    +      <arglist>(EchoMode echoMode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EchoMode</type>
    +      <name>echoMode</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a7454516e7195cecf2f990af35b1470d7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>selectionStart</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>adb99191dd8589416f75060e73799eddb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>selectedText</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a838b9d03e94a86be02476bb32044fc75</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasSelectedText</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a2376aae9311b5e658e44e52b1ffe38fd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>cursorPosition</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a5b6904686629a61be78396dc47dcfe05</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a7eb722b7f1657a8714280533d8f25b0c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxPadding</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>af347d0ad651b76abea5ee5dcae295db1</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxBorder</name>
    +      <anchorfile>classWt_1_1WLineEdit.html</anchorfile>
    +      <anchor>a337dcba8f79f886b86c0d9bf7b721c75</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLineF</name>
    +    <filename>classWt_1_1WLineF.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLineF</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>ab533503505006e748bf0681e7f673ec4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLineF</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>af5c42eaf0f3bf07d59be34c5c1a8d3cc</anchor>
    +      <arglist>(const WPointF &amp;p1, const WPointF &amp;p2)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLineF</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>a76ec4074899bddcd5f5f7c98b325aa9e</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>x1</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>ae77953fa42db1dfa3ca31ea724b9fa2e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>y1</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>a3cd53cb1c953a0eb8d46d6093c4fd464</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>x2</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>ab35731a2fb8572145cf44ddaead5cbb1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>y2</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>a266e3d68414a37bdd4e594796e70b51b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>p1</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>a26d62a64bdc03ec0c89d081c3542becf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>p2</name>
    +      <anchorfile>classWt_1_1WLineF.html</anchorfile>
    +      <anchor>a4775a8b23cc30daf2917ac938711706f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLoadingIndicator</name>
    +    <filename>classWt_1_1WLoadingIndicator.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WLoadingIndicator</name>
    +      <anchorfile>classWt_1_1WLoadingIndicator.html</anchorfile>
    +      <anchor>a760be320d6a5ca3d8035606d0803ed36</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WLoadingIndicator.html</anchorfile>
    +      <anchor>a0ccda9318560b1c16086899504842ad4</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setMessage</name>
    +      <anchorfile>classWt_1_1WLoadingIndicator.html</anchorfile>
    +      <anchor>a33f6df2d9f56e8431874b2a0efc70ab0</anchor>
    +      <arglist>(const WString &amp;text)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLocalizedStrings</name>
    +    <filename>classWt_1_1WLocalizedStrings.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WLocalizedStrings</name>
    +      <anchorfile>classWt_1_1WLocalizedStrings.html</anchorfile>
    +      <anchor>a04d2e40e52b9827bb5eb4759b9928f66</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WLocalizedStrings.html</anchorfile>
    +      <anchor>a71b2ca0b40eed56ee1acba8f865e7220</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>hibernate</name>
    +      <anchorfile>classWt_1_1WLocalizedStrings.html</anchorfile>
    +      <anchor>a2ea29ba180ed9af25cf561f0df6a995d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>resolveKey</name>
    +      <anchorfile>classWt_1_1WLocalizedStrings.html</anchorfile>
    +      <anchor>a05666a0ae917e4fd6deafdd2f4b98ba2</anchor>
    +      <arglist>(const std::string &amp;key, std::string &amp;result)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLogger</name>
    +    <filename>classWt_1_1WLogger.html</filename>
    +    <class kind="class">Wt::WLogger::Field</class>
    +    <class kind="struct">Wt::WLogger::Sep</class>
    +    <class kind="struct">Wt::WLogger::TimeStamp</class>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLogger</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>aa2eef50d172fa9766e3500675c814535</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WLogger</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>acb96bbbeede82e03a9489f0fb1c43e38</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStream</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>ae851860f76c299bca96321b7d867a503</anchor>
    +      <arglist>(std::ostream &amp;o)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFile</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>a6d8a07bc92824fe32a123094e7516544</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addField</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>a8287b40a0699797f63de2fe5deaaae9a</anchor>
    +      <arglist>(const std::string &amp;name, bool isString)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Field &gt; &amp;</type>
    +      <name>fields</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>afbbcb96569a0296566d50c0cf1333c2c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry</type>
    +      <name>entry</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>a38d62bf3508e191c214c26d1959e9988</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const Sep</type>
    +      <name>sep</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>ac368dcce6c4605855bce2807aad0d267</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const TimeStamp</type>
    +      <name>timestamp</name>
    +      <anchorfile>classWt_1_1WLogger.html</anchorfile>
    +      <anchor>a96559cbf73a0d3647aeeac6d45bcc6b0</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLogger::Field</name>
    +    <filename>classWt_1_1WLogger_1_1Field.html</filename>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>name</name>
    +      <anchorfile>classWt_1_1WLogger_1_1Field.html</anchorfile>
    +      <anchor>a0abefe7874986ba1fb424c63c13870a6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isString</name>
    +      <anchorfile>classWt_1_1WLogger_1_1Field.html</anchorfile>
    +      <anchor>a6d4db14999409ed24e3cdfcb81830e0d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WLogger::Sep</name>
    +    <filename>structWt_1_1WLogger_1_1Sep.html</filename>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WLogger::TimeStamp</name>
    +    <filename>structWt_1_1WLogger_1_1TimeStamp.html</filename>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WLogEntry</name>
    +    <filename>classWt_1_1WLogEntry.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WLogEntry</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>ac3c172c5fa69234cb4f720b67656eb6d</anchor>
    +      <arglist>(const WLogEntry &amp;from)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WLogEntry</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>ac67d1795817f894bdc6f27d07083f37e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>af8046b0ecb69a59ae7beb9c45996f2a3</anchor>
    +      <arglist>(const WLogger::Sep &amp;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>aba127b67d182be2f88d292dd65706faf</anchor>
    +      <arglist>(const WLogger::TimeStamp &amp;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>acee453e6fa56712d4930cf4a172eaff8</anchor>
    +      <arglist>(const char *)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>a90e49944bd11d007e86adaf7391450cb</anchor>
    +      <arglist>(const std::string &amp;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLogEntry &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WLogEntry.html</anchorfile>
    +      <anchor>a2e998923dc2ec6d908372c91e3aefedb</anchor>
    +      <arglist>(T t)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMatrix4x4</name>
    +    <filename>classWt_1_1WMatrix4x4.html</filename>
    +    <base>WGenericMatrix&lt; double, 4, 4 &gt;</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMatrix4x4</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a04573deca065c719da5933a5370e2d91</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMatrix4x4</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a1a85e8ec8c8f80ea1643b0bc72006c63</anchor>
    +      <arglist>(const WMatrix4x4 &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMatrix4x4</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a179ae2bb8dcf43871511e2386e920465</anchor>
    +      <arglist>(const WGenericMatrix&lt; double, 4, 4 &gt; &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMatrix4x4</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>ae7bb65db266e934915fe8b1ce126eff8</anchor>
    +      <arglist>(double *d)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMatrix4x4</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a3e09a062ad58e4ea5a153baddec50621</anchor>
    +      <arglist>(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>determinant</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>adad3c97a21999be0826bc244193ec0c7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>flipCoordinates</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a271c40069f274452261ca0f0e328700a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>frustum</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>ac55add720d259f8d601401bc87ba9b71</anchor>
    +      <arglist>(double left, double right, double bottom, double top, double near, double far)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMatrix4x4</type>
    +      <name>inverted</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>ad9803d00b3214247229c2e61948a3e3b</anchor>
    +      <arglist>(bool *invertible=0) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>lookAt</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>acc42a660a8a642498c5e88581238767a</anchor>
    +      <arglist>(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>perspective</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a82082588cf44d60636cd934a598743d4</anchor>
    +      <arglist>(double angle, double aspect, double nearPlane, double farPlane)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>rotate</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a018751f0f4359ccf43fe3e4ca53f20eb</anchor>
    +      <arglist>(double angle, double x, double y, double z)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a2cd4dd1510fd69374b8a6bdf4cdffebd</anchor>
    +      <arglist>(double xFactor, double yFactor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a8074ced26218dd52541abd094faf9815</anchor>
    +      <arglist>(double x, double y, double z)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>adba26fe582056591d246e8cbea8cdba7</anchor>
    +      <arglist>(double factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>translate</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a65cea270b294bcf2db233d1f6113cdd0</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>translate</name>
    +      <anchorfile>classWt_1_1WMatrix4x4.html</anchorfile>
    +      <anchor>a598fe5520127436df6fdfdf833b8b869</anchor>
    +      <arglist>(double x, double y, double z)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMemoryResource</name>
    +    <filename>classWt_1_1WMemoryResource.html</filename>
    +    <base>Wt::WResource</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMemoryResource</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a70c4b30cfef23b4a1ae692a4c90ead2b</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMemoryResource</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a8e72d3dae82e6c1a417bdc8a0439ab34</anchor>
    +      <arglist>(const std::string &amp;mimeType, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMemoryResource</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a2060c05ef2cb27ef6d7a5cf204a053f5</anchor>
    +      <arglist>(const std::string &amp;mimeType, const std::vector&lt; unsigned char &gt; &amp;data, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a330bf924bd2d01de7dfce15778b56d48</anchor>
    +      <arglist>(const std::vector&lt; unsigned char &gt; &amp;data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a9ad4324110014390132405e941c9c87c</anchor>
    +      <arglist>(const unsigned char *data, int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>mimeType</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a00b0908ba8be1c51ba964a31d6d43712</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMimeType</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a057ea5ac18daacf2894c28e5bfbbde60</anchor>
    +      <arglist>(const std::string &amp;mimeType)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WMemoryResource.html</anchorfile>
    +      <anchor>a7800a19988ddf5af4e4ffe0f323316ae</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMenu</name>
    +    <filename>classWt_1_1WMenu.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMenu</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a9a67c54e9bfe9b2f594a54dd18a9d8a4</anchor>
    +      <arglist>(Orientation orientation, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMenu</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>aedc7dcfb468fedd82eb6e01ddcdd3f77</anchor>
    +      <arglist>(WStackedWidget *contentsStack, Orientation orientation, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WMenu</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a7e2fef60ee49edaa9056b3284964576e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ad7840197cc0caf0430792b9f4a0df60d</anchor>
    +      <arglist>(const WString &amp;name, WWidget *contents, WMenuItem::LoadPolicy policy=WMenuItem::LazyLoading)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>acbccfeebf2c93244516dec81dcc56fda</anchor>
    +      <arglist>(WMenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a63819cb0a445ab7ad364f5b0e241b67d</anchor>
    +      <arglist>(WMenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a7bafc33564cb06d980d75e2f4d89f28d</anchor>
    +      <arglist>(WMenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>aec1801d047dc0f150d1cc12b801aa6c2</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WMenuItem * &gt; &amp;</type>
    +      <name>itemSelected</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a0303879705bcdd8dbffc2d1528670d20</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WMenuItem * &gt; &amp;</type>
    +      <name>itemSelectRendered</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a8737f262f99d0db0a0f4b7aeb01cfe2e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>close</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a97c9be1df48cb0d27e2e4b904b51e184</anchor>
    +      <arglist>(WMenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>close</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a1040233afcd0372468faff230c685825</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WMenuItem * &gt; &amp;</type>
    +      <name>items</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>abb90d70d722ce95e748b3ed0b88168b5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WMenuItem * &gt; &amp;</type>
    +      <name>itemClosed</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ab9fa68e381972fb5385478b1e9eb6c78</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemHidden</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ab3d880e2b089bb084d5634130d61f4d7</anchor>
    +      <arglist>(WMenuItem *item, bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemHidden</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a20e921974ecea341bdcfd5df9596ed53</anchor>
    +      <arglist>(int index, bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isItemHidden</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a39e27cd34e0031206e4d0baecf4c9d0a</anchor>
    +      <arglist>(WMenuItem *item) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isItemHidden</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a207ebaad9bb29b1c936b28068e28a96a</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemDisabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a294d53469b71cb5d35fa59865c3b75cb</anchor>
    +      <arglist>(WMenuItem *item, bool disabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemDisabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ac647478bd0bf0086a52a9e572755b3a2</anchor>
    +      <arglist>(int index, bool disabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isItemDisabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>add9599868dd2d679c532e15ce42ef424</anchor>
    +      <arglist>(WMenuItem *item) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isItemDisabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>acec9860582f2f043fd3dbf42649dbce8</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenuItem *</type>
    +      <name>currentItem</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a4e94081f83aee45db0ffd43073f2b8ca</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a467ab0da55b4584f1b46abe931354f3d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Orientation</type>
    +      <name>orientation</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a8f241ce7b48d30c0c5f60abcd8e38a90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRenderAsList</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a8bc28b9d703b93569846441213877d4f</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>renderAsList</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a8cc3a34a38722aa07ad8e5e183ed6af3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPathEnabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ae1807eba0b1002808dbec779d00a79dc</anchor>
    +      <arglist>(const std::string &amp;basePath=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>internalPathEnabled</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>aa8e47ce1b3e21eb64202e6ab1b5e48b5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalBasePath</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>aa5cf3b5b9919d2f130c8acd156447132</anchor>
    +      <arglist>(const std::string &amp;basePath)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>internalBasePath</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a8cdf2f75f67efa0c10c6fb25fd1cd4da</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStackedWidget *</type>
    +      <name>contentsStack</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a76785bc6b3ca3f99835bd8a75e6c69d7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>aea92a8e3abe2ac6130eb93acec605ec9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>internalPathChanged</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>a1b4eb0bd90bb2b9a0661fd04ec35224a</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>nextAfterHide</name>
    +      <anchorfile>classWt_1_1WMenu.html</anchorfile>
    +      <anchor>ae7e3b026c0275dcb0ea62d4449e36468</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMenuItem</name>
    +    <filename>classWt_1_1WMenuItem.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="enumeration">
    +      <name>LoadPolicy</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5e276ed0505694a7b89a1dd0c62aa55a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LazyLoading</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5e276ed0505694a7b89a1dd0c62aa55aa58296165dae031cb608e3d198ed0dee0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreLoading</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5e276ed0505694a7b89a1dd0c62aa55aa7917744540a0fbf7f6822014550f990b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMenuItem</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a772f165f3dc02138c28d74f1f42d1a45</anchor>
    +      <arglist>(const WString &amp;text, WWidget *contents, LoadPolicy policy=LazyLoading)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ae9f4792069fcf2f3410c002fdab2d2f1</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a2061c3c242e98e53c820bfa500db492c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPathComponent</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a4291756303dbf128b718679cdb907a5a</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>pathComponent</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5ab0b5430b9fb852a45886deb0ff01b1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCloseable</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a59b6dee6c95ae958f0c3b76d5ef7272d</anchor>
    +      <arglist>(bool closeable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCloseable</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ae03b46148932c131c587309d467e8726</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>close</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a9da31eaf6a40078207bbf484d21b9285</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a0b58d771300d77ca4469cb3c593fc5a7</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ae1f847ff58f4cc42074d17533b6d630f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hide</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a0adfa71810c98c38de6e320fc055fef0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>show</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ae3d9bf7a2961a00164fea173e21b8506</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a68e76f69ea40e66b9f478a84a06e44a8</anchor>
    +      <arglist>(bool disabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isDisabled</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>af0516fd47f049e1ffc571bccfa45c65e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enable</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>aa45b04a291e4d07d704bab6fd0341794</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disable</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a777dd93e35f1eb7d91e6f6f2795918da</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ab762c297976419ee419884572b7e7506</anchor>
    +      <arglist>(const WString &amp;tip)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>ac3cb0dce81168657669e9574950618dd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenu *</type>
    +      <name>menu</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a768d7928949e1d54c0e85dba488e3ea6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>contents</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a961bb119e2231aa47d31d829178899d6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>itemWidget</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a185b334943c3e07d63d3e45a17e960f7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a9acd8465249e221093f87d9a726c33af</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>createItemWidget</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5dd1286e97b110b621e00e02e58a15d2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>updateItemWidget</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>adf18031f469001bdd5333cff0a66a9a4</anchor>
    +      <arglist>(WWidget *itemWidget)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderSelected</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a3af62f2a97827c844e021ad2dd3f6085</anchor>
    +      <arglist>(bool selected)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderHidden</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a42439ed877132ef8da02b6215bd441ab</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual SignalBase &amp;</type>
    +      <name>activateSignal</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5f1d03e160011fcd39759b681f8bc063</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual SignalBase &amp;</type>
    +      <name>closeSignal</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a41f18df878ec8f23247c4c1e9d2ee5e1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WMenuItem.html</anchorfile>
    +      <anchor>a5a000f3fe0b005bec22153f44a50bd12</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMessageBox</name>
    +    <filename>classWt_1_1WMessageBox.html</filename>
    +    <base>Wt::WDialog</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMessageBox</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a02fe68c3f577dad4438c85564418292f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMessageBox</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>aa77b55235ca91e331c8574171caabfbb</anchor>
    +      <arglist>(const WString &amp;caption, const WString &amp;text, Icon icon, WFlags&lt; StandardButton &gt; buttons)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>aef66b54dc12ec478e218d561880254e8</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a1e1dffabe0d91e84f6f504ffb600c4a0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WText *</type>
    +      <name>textWidget</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>ada70275e7f0d9fc067cd5a1c553a031f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a194dc23e212770e494d459f2426f9ae8</anchor>
    +      <arglist>(Icon icon)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Icon</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a0ff9580eedf4a3e6b74f27eae71e23ff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPushButton *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a9d07bb99d17c38128c79f9c7ecd42963</anchor>
    +      <arglist>(const WString &amp;text, StandardButton result)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setButtons</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a1757ee241b2df0045623a6bcad707dc6</anchor>
    +      <arglist>(WFlags&lt; StandardButton &gt; buttons)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; StandardButton &gt;</type>
    +      <name>buttons</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a71c9a2cce4be7c3a5e33718c8ec924c1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPushButton *</type>
    +      <name>button</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a0e95f906d321b5c5cb574abc25716aec</anchor>
    +      <arglist>(StandardButton b)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>StandardButton</type>
    +      <name>buttonResult</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>ac07ce4dd360c8305cdc1e08642e32a7c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; StandardButton &gt; &amp;</type>
    +      <name>buttonClicked</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>ae9d2caaa82244b2b195e9d3e011bc740</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static StandardButton</type>
    +      <name>show</name>
    +      <anchorfile>classWt_1_1WMessageBox.html</anchorfile>
    +      <anchor>a18abecfdc7233991563e5b08c3200aba</anchor>
    +      <arglist>(const WString &amp;caption, const WString &amp;text, WFlags&lt; StandardButton &gt; buttons)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WMessageResourceBundle</name>
    +    <filename>classWt_1_1WMessageResourceBundle.html</filename>
    +    <base>Wt::WLocalizedStrings</base>
    +    <member kind="enumeration">
    +      <name>Scope</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>a384dd7fde994d5419c87b069b3c3226d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WMessageResourceBundle</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>aecfe527e2123bf7793d926f71dc2ed23</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>use</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>a01368946b2a2aaceab3a64cddb1cb1e2</anchor>
    +      <arglist>(const std::string &amp;path, bool loadInMemory=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::set&lt; std::string &gt;</type>
    +      <name>keys</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>aef1673743006fac449c095690aeff413</anchor>
    +      <arglist>(WFlags&lt; Scope &gt; scope) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>a8dd275eff8f823ee58a1e673a79b71e7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>hibernate</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>a5e6c391a95229691fcae8c058c637b7b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>resolveKey</name>
    +      <anchorfile>classWt_1_1WMessageResourceBundle.html</anchorfile>
    +      <anchor>a22878a466da85139384133f01c7fec77</anchor>
    +      <arglist>(const std::string &amp;key, std::string &amp;result)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WModelIndex</name>
    +    <filename>classWt_1_1WModelIndex.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WModelIndex</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a29431c83f8ed71654e213ec4aae21813</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>column</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a0e6568dd7113662c3c378e2084729581</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>row</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>aa4f1385223391c46ee200a57672f6046</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void *</type>
    +      <name>internalPointer</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a44aabe692bba87ba144c1ab9a7f98eb3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::uint64_t</type>
    +      <name>internalId</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a7ae49c4d0edaf9a520e6f5e8a62c3904</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndex</type>
    +      <name>child</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a2c01a7ea6cbb423eec3f4d12f26324c7</anchor>
    +      <arglist>(int row, int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a0e6380caae0e785fdea9e30e0a95eec9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a7f05920329ca4b7fdbb10931afdb634e</anchor>
    +      <arglist>(int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a04877832f757772b8dc7e6b30fb3638c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isValid</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a1d4b05ee51c5c6961d6123565fd77c82</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a9fe91b75030a8a7373e3262fbbc6cad6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a6bb6b3624c4d75e3a495860e46c04f9e</anchor>
    +      <arglist>(const WModelIndex &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>ace2743acada845b3d4912e70c9787eac</anchor>
    +      <arglist>(const WModelIndex &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a29a0a0ab3e961b8087d95b7c62555cd1</anchor>
    +      <arglist>(const WModelIndex &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>encodeAsRawIndex</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a93c11e136a0fdc596eb745cc7fce7033</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndex</type>
    +      <name>decodeFromRawIndex</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a084da8a1b7f4de1f1c126aeb721425e9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>encodeAsRawIndexes</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a7626f089fcd0440dff3f91a4b3ecb04e</anchor>
    +      <arglist>(WModelIndexSet &amp;indexes)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WModelIndexSet</type>
    +      <name>decodeFromRawIndexes</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>a14760130fe8b1abb354c6bba3d60f07b</anchor>
    +      <arglist>(const WModelIndexSet &amp;encodedIndexes)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static bool</type>
    +      <name>isAncestor</name>
    +      <anchorfile>classWt_1_1WModelIndex.html</anchorfile>
    +      <anchor>abe65ea47581a12a7db6caa9c0b2f8bec</anchor>
    +      <arglist>(const Wt::WModelIndex &amp;i1, const Wt::WModelIndex &amp;i2)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WObject</name>
    +    <filename>classWt_1_1WObject.html</filename>
    +    <member kind="typedef">
    +      <type>void(WObject::*</type>
    +      <name>Method</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a6ef714d6ef0060b78c039e729b913aa9</anchor>
    +      <arglist>)()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WObject</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a1da12f5d82488adcca912c596b9398ea</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WObject</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a45d6c07b134db69687bd1b49025799c3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a5c5cc1d7aada99baf97d0dc203e42154</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setObjectName</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a64ce31cadb378c4eba81224f43bf493d</anchor>
    +      <arglist>(const std::string &amp;name)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>objectName</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a5cad0cc3f73402de1422747653ece18f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resetLearnedSlots</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a92d8b00edc79b7a60d41d7c088f50436</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resetLearnedSlot</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>ae06fa3064a80f857b3b05123ef412bb2</anchor>
    +      <arglist>(void(T::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStatelessSlot *</type>
    +      <name>implementStateless</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>ac00d775170f47e715894b24de6b869da</anchor>
    +      <arglist>(void(T::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStatelessSlot *</type>
    +      <name>implementStateless</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a18c9870a4944cf1e802c9b94fc2a55a6</anchor>
    +      <arglist>(void(T::*method)(), void(T::*undoMethod)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStatelessSlot *</type>
    +      <name>implementJavaScript</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a6b6619da758adfc3c0c8cd4a06d9a4c9</anchor>
    +      <arglist>(void(T::*method)(), const std::string &amp;jsCode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addChild</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a945f972be4331bfe46221263e04ae9ed</anchor>
    +      <arglist>(WObject *child)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeChild</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a1f811eeb5f0aa37b5b1931497cd9f163</anchor>
    +      <arglist>(WObject *child)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WObject * &gt; &amp;</type>
    +      <name>children</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a66c8da3f967545ceb585ed574f68b8cf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WObject *</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a2af8f7ec8d3807d434e1f70d1245c6b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WStatelessSlot *</type>
    +      <name>getStateless</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>aae1e4d3444723814adfc9717e14b693a</anchor>
    +      <arglist>(Method method)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" static="yes">
    +      <type>static WObject *</type>
    +      <name>sender</name>
    +      <anchorfile>classWt_1_1WObject.html</anchorfile>
    +      <anchor>a413deb54de40ee278dd554e4960d58ca</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WOverlayLoadingIndicator</name>
    +    <filename>classWt_1_1WOverlayLoadingIndicator.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <base>Wt::WLoadingIndicator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WOverlayLoadingIndicator</name>
    +      <anchorfile>classWt_1_1WOverlayLoadingIndicator.html</anchorfile>
    +      <anchor>a1070617b610083d12d150d5a7c3f37a3</anchor>
    +      <arglist>(const WString &amp;styleClass=WString(), const WString &amp;backgroundStyleClass=WString(), const WString &amp;textStyleClass=WString())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WOverlayLoadingIndicator.html</anchorfile>
    +      <anchor>aa2e776a3e592a0426aec553446819e83</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMessage</name>
    +      <anchorfile>classWt_1_1WOverlayLoadingIndicator.html</anchorfile>
    +      <anchor>a14abae6e7193229ad71d7804c6e7467b</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPaintDevice</name>
    +    <filename>classWt_1_1WPaintDevice.html</filename>
    +    <member kind="enumeration">
    +      <name>ChangeFlag</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Pen</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1a5115beca6c99c7926b34aa1497ee7ccb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Brush</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1a794b5f529f07d07aeda7d3efcf0d2a3c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Font</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1a6fbbb5b0f6fd27292f8c9f6205551a03</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Hints</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1aedd545e238e65eb64dd635e04a964876</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Transform</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1a9e4822cf50f25dac9f08bbc6c87ed794</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Clipping</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1a5c823e2787166e516c3def8821a42936</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Shadow</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a1a2feafa01212eba9ad6c7b484ad8da1afb1b79f7df6cc8b064a3ff29833215e2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WPaintDevice</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a239035e9459e17407da0c8e2d28715bd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a9a0d38acb408d4520d0dd520c93d47e0</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a24c7e1363440e6994b44381ebf443157</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>ab3a4c9799e46ab66c0f6cb4182e9cb72</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a605316797b1aa4be60c24d95fc5a1ab4</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>af92ff3c6d2f5c351c6931306d9cc1162</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imageUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>abd267ca3adb6c394079042810864ac9a</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>ab3c368b79fef8bc53681821610dd2077</anchor>
    +      <arglist>(const WPainterPath &amp;path)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a65ffa97ccee3d4960a132646eca9a6eb</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a04d6f9e0653a9785662c1e987b597cc6</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a75827be2076716985533dbc75dfdc512</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a7dc74a2c7c98e38c7851277313d313f6</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>ae1c75c6bc0e5a2d6322b176f6f13403c</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a8ac85385056ee15548f50f0ba4f94837</anchor>
    +      <arglist>(WPainter *painter)=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WPaintDevice.html</anchorfile>
    +      <anchor>a04c9ccfb802ce41a41b5b128c16d0709</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPaintedWidget</name>
    +    <filename>classWt_1_1WPaintedWidget.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="enumeration">
    +      <name>Method</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>afa5ee04c391e6ac67d58740fc80c6923</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>InlineSvgVml</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>afa5ee04c391e6ac67d58740fc80c6923aeea4494d5f2a458fbdacea02d1e009a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>HtmlCanvas</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>afa5ee04c391e6ac67d58740fc80c6923ace6fa43830fac95b0f042cd1438e41df</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PngImage</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>afa5ee04c391e6ac67d58740fc80c6923a21638ccefa8f41adf2fde2986a8e02ec</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPaintedWidget</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>afdb2dbe95de7b97d77a1778724395db6</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WPaintedWidget</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a3e28c52034a50cb9c2c2e7a9e979a90c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPreferredMethod</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a2a3a3be8b9a8c6d56fad4b64b370fdd4</anchor>
    +      <arglist>(Method method)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Method</type>
    +      <name>preferredMethod</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a701e81be3104d98a02f4cf7da9ec3a7f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a3d4b42ac400fb9ba56c6b02aa4615775</anchor>
    +      <arglist>(WFlags&lt; PaintFlag &gt; flags=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>aa57b940110d240951d0e3a6d03390319</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addArea</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>ac4c031c7ab47e85f27aac09b7fc37bea</anchor>
    +      <arglist>(WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertArea</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>af11281366adb6c4d7966b3b19651ea0f</anchor>
    +      <arglist>(int index, WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeArea</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a0147ad94c849d437be8bfde14df579a5</anchor>
    +      <arglist>(WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractArea *</type>
    +      <name>area</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a38786c86ffb7c62ee13b18f0874cb262</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WAbstractArea * &gt;</type>
    +      <name>areas</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>ae3cfb09afc47aa57c1ca9fda0e3cbb5e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>layoutSizeChanged</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a0c4a7fd06c6e3092283dedc02214f64e</anchor>
    +      <arglist>(int width, int height)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>paintEvent</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>ad8ce22eff41754c8616f45851f57fb1a</anchor>
    +      <arglist>(WPaintDevice *paintDevice)=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WPaintedWidget.html</anchorfile>
    +      <anchor>a15c48f15b7b920ab2577caade798a2fd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPainter</name>
    +    <filename>classWt_1_1WPainter.html</filename>
    +    <class kind="class">Wt::WPainter::Image</class>
    +    <member kind="enumeration">
    +      <name>RenderHint</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a605a81a1712a0dd0189044fc598fd5ff</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Antialiasing</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a605a81a1712a0dd0189044fc598fd5ffaadc2e7f25121334e55c3f569173ec5bb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LowQualityShadows</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a605a81a1712a0dd0189044fc598fd5ffab9625abcca35b8cb964fdb52a4dbf3d3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPainter</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a420b1e54536d4815534f31208a825b54</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPainter</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aa9e93aac4be32b5c0943360d9cf8c1cc</anchor>
    +      <arglist>(WPaintDevice *device)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WPainter</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a611557a8722bc49df70a1a2dd79628c7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>begin</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a6b81663b5599f0736ae5099ac7325d44</anchor>
    +      <arglist>(WPaintDevice *device)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isActive</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a7a748d6ee49034a0996f9404eac9c2d1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>end</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a50beb0c8cb77c12e2dee807e4fe4bcb4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPaintDevice *</type>
    +      <name>device</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a9d2e545f5506fd743a286618351c9b51</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRenderHint</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>af859825a00ff428e773c2abeb328f078</anchor>
    +      <arglist>(RenderHint hint, bool on=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>renderHints</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a6be5dd738e97d35b91aaaea1d086b4b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aa79220ed9456f67a393009e5c5eea27e</anchor>
    +      <arglist>(const WRectF &amp;rectangle, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a96c03e411d46cd720f454504f53491bd</anchor>
    +      <arglist>(double x, double y, double width, double height, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawChord</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aa34b0972745692d55bc03ff1c57f1f4c</anchor>
    +      <arglist>(const WRectF &amp;rectangle, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawChord</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ac8735155d03ab0332a66880e251b0fc2</anchor>
    +      <arglist>(double x, double y, double width, double height, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawEllipse</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a5a1969356a8edae0cdd3abfc141082a7</anchor>
    +      <arglist>(const WRectF &amp;rectangle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawEllipse</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ac46f725e54280bd6ace0e941eced790c</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ae36e5ce0c6a324ec83ebbc397a513202</anchor>
    +      <arglist>(const WPointF &amp;point, const Image &amp;image)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ad69c06dbcb10d8f12bce1c369ae34c31</anchor>
    +      <arglist>(const WPointF &amp;point, const Image &amp;image, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aaf6ea6a37b0fd8244d1b7afa3c24b55c</anchor>
    +      <arglist>(const WRectF &amp;rect, const Image &amp;image)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a58a14d4610582eed6c76e0bda6117e3d</anchor>
    +      <arglist>(const WRectF &amp;rect, const Image &amp;image, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a508b7828bbbf5805838a30a830c34f36</anchor>
    +      <arglist>(double x, double y, const Image &amp;image, double sx=0, double sy=0, double sw=-1, double sh=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a259601487cb2ec23a2f6f3d64c0c5913</anchor>
    +      <arglist>(const WLineF &amp;line)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a1c9ad3f225f7ca93800431adfc5731f0</anchor>
    +      <arglist>(const WPointF &amp;p1, const WPointF &amp;p2)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ab596b1cfa230d37e9c429adde84d5985</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLines</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a3b25c4144914fe09ca3b3cb63979bd69</anchor>
    +      <arglist>(const WLineF *lines, int lineCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLines</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ae1ac3c9c64907e53817ca5a28ead70d2</anchor>
    +      <arglist>(const WPointF *pointPairs, int lineCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLines</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aebfb0fc62a58789f7b21650485ef9985</anchor>
    +      <arglist>(const std::vector&lt; WLineF &gt; &amp;lines)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawLines</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a762442b01f5603492e9673cb84081596</anchor>
    +      <arglist>(const std::vector&lt; WPointF &gt; &amp;pointPairs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a2ef57868d6fbf99a901cbe1f29723b50</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPie</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a5c46ed008445a80feb258774a3af3b62</anchor>
    +      <arglist>(const WRectF &amp;rectangle, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPie</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a3d8bc8608db5dad5e8d499b0fed58b85</anchor>
    +      <arglist>(double x, double y, double width, double height, int startAngle, int spanAngle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPoint</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aca2e989c3cd9bc635e6d13786cc73119</anchor>
    +      <arglist>(const WPointF &amp;position)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPoint</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a9159b8ae72494b4973642143296daa96</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPoints</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>abe40c21da61567a23b04c81c9ea038b2</anchor>
    +      <arglist>(const WPointF *points, int pointCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPolygon</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a82600053c72a0f939eb37ab45f2c1f3e</anchor>
    +      <arglist>(const WPointF *points, int pointCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawPolyline</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>abbc6b39bef49d5fc67e09953fbcd4faa</anchor>
    +      <arglist>(const WPointF *points, int pointCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawRect</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ad1fcb68312327194b3dccc67adc3bd33</anchor>
    +      <arglist>(const WRectF &amp;rectangle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawRect</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a368289c57968343089d82c26acc62ca6</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawRects</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a14fa5d0d5f3a05f8279bb0b4a06a8671</anchor>
    +      <arglist>(const WRectF *rectangles, int rectCount)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawRects</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a36818dd1aea0c8f50dc0385dca39a6b8</anchor>
    +      <arglist>(const std::vector&lt; WRectF &gt; &amp;rectangles)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a8565a90a75207b318a2ff608e19df806</anchor>
    +      <arglist>(const WRectF &amp;rectangle, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ae2a04838933687fd0791e1187b28fdca</anchor>
    +      <arglist>(double x, double y, double width, double height, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>fillPath</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a761f8f85d14fe171fcc91823bc4dab5c</anchor>
    +      <arglist>(const WPainterPath &amp;path, const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>fillRect</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a4b9ce79b5abd8584fd2cf85876ab140f</anchor>
    +      <arglist>(const WRectF &amp;rectangle, const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>fillRect</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ac99ee3d64df9742e167c01d750c899be</anchor>
    +      <arglist>(double x, double y, double width, double height, const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>strokePath</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a93cb3a37591c6dde4f006e8eada2d1f8</anchor>
    +      <arglist>(const WPainterPath &amp;path, const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setShadow</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a9c727b82879ab055f3fcf4c9cdfc1f8d</anchor>
    +      <arglist>(const WShadow &amp;shadow)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WShadow &amp;</type>
    +      <name>shadow</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>af34ea21a473d776dc659d25efa63a593</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBrush</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ad63f01349e9163992d440e9aa85f916b</anchor>
    +      <arglist>(const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFont</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ad9cac6c8eaba94226f54343cde9676ea</anchor>
    +      <arglist>(const WFont &amp;font)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPen</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a159ebf24df790e409d4060f7bd4aa725</anchor>
    +      <arglist>(const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WBrush &amp;</type>
    +      <name>brush</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ade2b538d5028082f3aba87625634184c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WFont &amp;</type>
    +      <name>font</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ab218488ea091c9ae543142bdca4da9bb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WPen &amp;</type>
    +      <name>pen</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a1b60e758e7eb1865369a061cf07bf54c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setClipping</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a4163898f999d4ecafec52c3f8890f380</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasClipping</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aa99949d6a71d44f1240db64c32b6d803</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setClipPath</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a65be44d995c5f06f065f68d15c8889a5</anchor>
    +      <arglist>(const WPainterPath &amp;clipPath)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPainterPath</type>
    +      <name>clipPath</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a601eba54f63b581080531100f5b5db78</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resetTransform</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ac0cc4dedd2cf8801e12d7550bce2a2c1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>rotate</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ab6d68d362e43f8e8df7e4400e2324d8e</anchor>
    +      <arglist>(double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a0167a7c8c8d72ee0cca6f735b65a7938</anchor>
    +      <arglist>(double sx, double sy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>translate</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aaf5755eca15cb6e73fc24edf3bbd5758</anchor>
    +      <arglist>(const WPointF &amp;offset)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>translate</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>aef98cc3b4fa2da57efc9721a8bd2a6e5</anchor>
    +      <arglist>(double dx, double dy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWorldTransform</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>ac0aa03db16f695b9bec3ef38588a5f3e</anchor>
    +      <arglist>(const WTransform &amp;matrix, bool combine=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WTransform &amp;</type>
    +      <name>worldTransform</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a6fb5733c524d07b679c4af6526d0c032</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>save</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a0262e162bb4be43f800c6c7b784c8d7a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>restore</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a3fd8699e88d695cfd10043d18a666991</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setViewPort</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a70dcfbed2b7bdeb39ddbc7f213b5a9ce</anchor>
    +      <arglist>(const WRectF &amp;viewPort)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setViewPort</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>afd9272b6a583b273a64105e88fb65e42</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>viewPort</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a7838d09f494223b51a5e22b73a71740b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWindow</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>af223eea7db8164e404f6725705569fa6</anchor>
    +      <arglist>(const WRectF &amp;window)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWindow</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a7d56a3fb66457c02584aa4bed8ce6023</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>window</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a0bcac25d9328887ed15669b4a4ae52de</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform</type>
    +      <name>combinedTransform</name>
    +      <anchorfile>classWt_1_1WPainter.html</anchorfile>
    +      <anchor>a8d8e9616413abf58f949cd47c3bf1381</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPainter::Image</name>
    +    <filename>classWt_1_1WPainter_1_1Image.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Image</name>
    +      <anchorfile>classWt_1_1WPainter_1_1Image.html</anchorfile>
    +      <anchor>ac951720ffbbd0702fa760582217ca4b1</anchor>
    +      <arglist>(const std::string &amp;uri, int width, int height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Image</name>
    +      <anchorfile>classWt_1_1WPainter_1_1Image.html</anchorfile>
    +      <anchor>abbf1888512763e7f4b604d33dd3b2f0e</anchor>
    +      <arglist>(const std::string &amp;uri, const std::string &amp;file)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>uri</name>
    +      <anchorfile>classWt_1_1WPainter_1_1Image.html</anchorfile>
    +      <anchor>aa20ed1f5a8a75f02588d0536d59311db</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WPainter_1_1Image.html</anchorfile>
    +      <anchor>aeca25023755c950910b54638547a36cb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WPainter_1_1Image.html</anchorfile>
    +      <anchor>aeb3a311eb466a2e7ea8af148b03a4d5d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPainterPath</name>
    +    <filename>classWt_1_1WPainterPath.html</filename>
    +    <class kind="class">Wt::WPainterPath::Segment</class>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPainterPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ace0add71a1ebc8b45a821aa8d70d3e3f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPainterPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a364b46c7a45bcb18e235ec0b41268a15</anchor>
    +      <arglist>(const WPointF &amp;startPoint)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPainterPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>abea96512cd12bc8630f81b2ed91deb80</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPainterPath &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ab9efa54a1626d775bc208bf3caef10db</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>currentPosition</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a7022e9937045d3da2b5e54a875b33003</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isEmpty</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>adffb5d532acabefc8f885da5d531907b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a52e236ff7c41d05e1b29b0dcb2b1059c</anchor>
    +      <arglist>(const WPainterPath &amp;path) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>accbaa725ccfc0291695b4f47b5b58923</anchor>
    +      <arglist>(const WPainterPath &amp;path) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>closeSubPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a9db15664f1cea3f12a2c7ab1337a343b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>moveTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a9801a3988b2a57c412ba175142d2e3ff</anchor>
    +      <arglist>(const WPointF &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>moveTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a2cdd1952ade53cc4b2f2a0146fc8c00f</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>lineTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ac52bacd9bb3b07043e56be2af56f7f66</anchor>
    +      <arglist>(const WPointF &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>lineTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>aafdba97cf01c017fa9e8f18169c7a205</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>cubicTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ac5a13ec3faf642cd05a57988366e005f</anchor>
    +      <arglist>(const WPointF &amp;c1, const WPointF &amp;c2, const WPointF &amp;endPoint)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>cubicTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ad751c7f66795ecdbe1fc7098dc11977b</anchor>
    +      <arglist>(double c1x, double c1y, double c2x, double c2y, double endPointx, double endPointy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>arcTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a3b1188816772497c5ae7a627a77e1d09</anchor>
    +      <arglist>(double cx, double cy, double radius, double startAngle, double sweepLength)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>arcMoveTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a6e4d29695685a08198be2c2dff53e49c</anchor>
    +      <arglist>(double cx, double cy, double radius, double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>arcMoveTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a366810aa107d35409f9fbd33b8e91dbb</anchor>
    +      <arglist>(double x, double y, double width, double height, double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>quadTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a5cf7125271a74e15a52db05876b8c878</anchor>
    +      <arglist>(const WPointF &amp;c, const WPointF &amp;endPoint)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>quadTo</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a2eaf3d30b6cf1590a3f368b8b94d49ca</anchor>
    +      <arglist>(double cx, double cy, double endPointx, double endPointy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addEllipse</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ae8783aad1c538e0180b2323a3a926999</anchor>
    +      <arglist>(const WRectF &amp;boundingRectangle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addEllipse</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a3dadfaa8235becb01221431d1f1a97d6</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addRect</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a52f1c2008c15cd133e8fb405d8b0466b</anchor>
    +      <arglist>(const WRectF &amp;rectangle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addRect</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>ab5b658698acf7a87948e7c0adf6c1151</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a8f2e9933f699b967fe5776c98080a410</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>connectPath</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a7a5d7f8d62eda600ab05926c8f8014be</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>controlPointRect</name>
    +      <anchorfile>classWt_1_1WPainterPath.html</anchorfile>
    +      <anchor>a2662ae29dce3cafd3a44cded9ef3112f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPainterPath::Segment</name>
    +    <filename>classWt_1_1WPainterPath_1_1Segment.html</filename>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPanel</name>
    +    <filename>classWt_1_1WPanel.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPanel</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a4c05851cf3ea39b796974b84eebd68bd</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a3e2feec27482003f4abd921c22b1b0c3</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a56ed246e0065e1ed78e639c1adc32adc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitleBar</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a9671893042605eb936c7301f6de09d3f</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>titleBar</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a310ea9e57d6ed4c10cbaf865063486d6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WContainerWidget *</type>
    +      <name>titleBarWidget</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a7986e7f194f029f8356b07b6909a66a0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCollapsible</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>ace945a192f671220a5a2cda671dc37ca</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCollapsible</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>aad805b67215219f72d8f3b849c898860</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCollapsed</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>acbb49b380277b5b78b18902a671abcb4</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCollapsed</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a9d9d4cced04f55464b20744ab88aa145</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>collapse</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>aefd66ff6dd8e2a1108e70efec4eab1b5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>expand</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a2ac9a05172675559b6f988083a4fd666</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCentralWidget</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a74f87b8eacf87d9df2704fc97ce9c37f</anchor>
    +      <arglist>(WWidget *)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>centralWidget</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>a699291066eef6f3dccad30cb592ad97c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>collapsed</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>ac0926907f1ce9da82dcdc114aeda6e6c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>expanded</name>
    +      <anchorfile>classWt_1_1WPanel.html</anchorfile>
    +      <anchor>ac5c430375eae4b14e46214fd8a103062</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPdfImage</name>
    +    <filename>classWt_1_1WPdfImage.html</filename>
    +    <base>Wt::WResource</base>
    +    <base>Wt::WPaintDevice</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPdfImage</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a79e69ca31a1b8fd1629a9d9b751b9171</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPdfImage</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a7280381d516142fd3db54fb376d17726</anchor>
    +      <arglist>(HPDF_Doc pdf, HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WPdfImage</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a86fde83dd116371ab099f79b83199145</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a6d17905ce2d0d0930d6597f7c5ab050e</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a478e01406f34497731a24a5f173be340</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>ac3bc4dd8a8085c2d85113a90a59a1774</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imgUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a4d350a7e2c59500222cdf782f3bb4042</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>adca51e1ebd4dc3b2a2acbe40b439caa7</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a65b1b5e12bbbc0325ea1f912672abc35</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a0ff5e4c7ce2c9baea108d4f728099672</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a0b90c88a78d6b5aca5bcae704564a1bd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a289544df08b2d7164a4d968e9804bc89</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a3f035d8dbf510e084bf68e49d8e73bff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a172fc6977e598044e9bbc263b6599c81</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a358347b05123b87af1ced8d038b34f38</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a0ccbbad3ceaad9c0cfd9abcb32ee0b64</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a672d635742591046bf7799c3b033b5fd</anchor>
    +      <arglist>(WPainter *painter)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WPdfImage.html</anchorfile>
    +      <anchor>a768cfc5e797651b9186a5adeb66565a0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPen</name>
    +    <filename>classWt_1_1WPen.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPen</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ab83dc2d8e9289a528b1ea53c3dbd0a16</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPen</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ab7d789ec2c036b9e9f2dc79a93bb2102</anchor>
    +      <arglist>(PenStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPen</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>aef30d1dd75f1e36ee96838d669c6d465</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPen</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a5ef68d49214e848b42aaa7f2a3e1160c</anchor>
    +      <arglist>(GlobalColor color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a322f0678855f2be570120505d84b1f28</anchor>
    +      <arglist>(const WPen &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a7ea4d349a8fa4cf2a3c6c0fcc4121167</anchor>
    +      <arglist>(const WPen &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyle</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>aa8e1366df77b346d0250878d64ae81a5</anchor>
    +      <arglist>(PenStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>PenStyle</type>
    +      <name>style</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ae14d2397498286da5c9f544061071fd5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCapStyle</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ab4f231f9c2ca03455d59457fe4e564c5</anchor>
    +      <arglist>(PenCapStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>PenCapStyle</type>
    +      <name>capStyle</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ad61121a36aed6777b4d2145375d6e93d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setJoinStyle</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a11848f3d7c2c73bc630c2c7da83f3671</anchor>
    +      <arglist>(PenJoinStyle style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>PenJoinStyle</type>
    +      <name>joinStyle</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a436008672a646c0346cecc7729185dcf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidth</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a8d175a6438c8251c2c5440f9cd085954</anchor>
    +      <arglist>(const WLength &amp;width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WLength &amp;</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>ae29a27dbdb0473a41a2a0586bf9906af</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColor</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>a4296a360d3853c46e68e20a574c1f8b6</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WColor &amp;</type>
    +      <name>color</name>
    +      <anchorfile>classWt_1_1WPen.html</anchorfile>
    +      <anchor>aa6e63fd317dd56b0cd9cc76f59d3d069</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gab70170afb6347d18ff9dac17e05e133e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoPen</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eaa8125e799a1289cd6dd0b2595a496a82</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SolidLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133eac1888b9cee513c2bf98c6fb9f4e307ab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea7667698a6fb5adbf8f128519cbb93af8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea26ade9ba6072abfcef185cca70227d15</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea45cac3164febb16cf7028403e01077a0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DashDotDotLine</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggab70170afb6347d18ff9dac17e05e133ea758c17a422e91d2e497f15054123e302</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenCapStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ga819ef9a03fb79c9834508b79eac604f2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FlatCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a394700c2ab47fe2b23564ced1c1e129a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SquareCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a39a378820d5058a3677f9852c5783783</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundCap</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gga819ef9a03fb79c9834508b79eac604f2a3d1c8a630cb15cec7b33434d9564182a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>PenJoinStyle</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>gaaf495faaba3ae03366a1646a4b5526be</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MiterJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bead2f7df311a138e580c95d728b0128004</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BevelJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea9550acce5f4da6e134f34392d7b072ba</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>RoundJoin</name>
    +      <anchorfile>group__painting.html</anchorfile>
    +      <anchor>ggaaf495faaba3ae03366a1646a4b5526bea3be2fdf749560b7229b3472d8ff6ad12</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPoint</name>
    +    <filename>classWt_1_1WPoint.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPoint</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>aef6bc93627e0db21cc0729716b6f06d1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPoint</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>ac38958b7d00843fdc9983f149d0511f9</anchor>
    +      <arglist>(int x, int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setX</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a4f78a5aa9dd51cc346e8cfeb077c9716</anchor>
    +      <arglist>(int x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setY</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a663e99c2f8f021aec35ad8392c375731</anchor>
    +      <arglist>(int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>x</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a801c846b8debcb6eb93e2dad30990a76</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>y</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a20a3f0ac58b3e5b00e2bea9fcb314c20</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a45cb53a528919e8897a1bd91decd6e76</anchor>
    +      <arglist>(const WPoint &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WPoint.html</anchorfile>
    +      <anchor>a721a1e0a065ab6d945dd850c3e9ad039</anchor>
    +      <arglist>(const WPoint &amp;other) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPointF</name>
    +    <filename>classWt_1_1WPointF.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPointF</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>acb4536b133ba1a6ec010a7d489ba9d52</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPointF</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a5287bb6bfa0fa598be6433aca25cbd5e</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPointF</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>accedc0584f923309397c08691094ac26</anchor>
    +      <arglist>(const WPointF &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPointF</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a45202fe46ac4cc4383dc2fd2ed184aa2</anchor>
    +      <arglist>(const WMouseEvent::Coordinates &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setX</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a07f37f26155b5b1d7c44cb4f7c572064</anchor>
    +      <arglist>(double x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setY</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>aa7910f613cfe0b89caed7b6991ae1e9c</anchor>
    +      <arglist>(double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>x</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a27c5b399724d9e6575d14fa189039c7b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>y</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a707fac2acb24215c90783fb5d1781e80</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>acf34a0e5f35c76c61109fc5d4268fde8</anchor>
    +      <arglist>(const WPointF &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WPointF.html</anchorfile>
    +      <anchor>a2469e492ddad621c6e8856f8ae9e4069</anchor>
    +      <arglist>(const WPointF &amp;other) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPolygonArea</name>
    +    <filename>classWt_1_1WPolygonArea.html</filename>
    +    <base>Wt::WAbstractArea</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPolygonArea</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>afa52a76e46a98a1fcec1d5bdfa816d6d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPolygonArea</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a27b4a6851ec95b3716084d745e04b383</anchor>
    +      <arglist>(const std::vector&lt; WPoint &gt; &amp;points)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPolygonArea</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a1d32a9af6194e2b3ecf357816e2d90c7</anchor>
    +      <arglist>(const std::vector&lt; WPointF &gt; &amp;points)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPoint</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>af6876fcbc964c2322008bc40eb1542ce</anchor>
    +      <arglist>(int x, int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPoint</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a870b19dc309ab6386a91d2742463088a</anchor>
    +      <arglist>(double x, double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPoint</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a42ec8b148f31ddd30ea2df8da1456d94</anchor>
    +      <arglist>(const WPoint &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addPoint</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a73d7505c0ceb966de94b1f7cd2a1491f</anchor>
    +      <arglist>(const WPointF &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPoints</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>af69651570f280e4f647a32108712940c</anchor>
    +      <arglist>(const std::vector&lt; WPoint &gt; &amp;points)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPoints</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a9e036986557cab012105947f07cf5d13</anchor>
    +      <arglist>(const std::vector&lt; WPointF &gt; &amp;points)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WPoint &gt; &amp;</type>
    +      <name>points</name>
    +      <anchorfile>classWt_1_1WPolygonArea.html</anchorfile>
    +      <anchor>a3ba6dfe5e328421904816f94915303f2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPopupMenu</name>
    +    <filename>classWt_1_1WPopupMenu.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPopupMenu</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>acbb4d1eb7c4c9c22732db1f8d326755d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a6109cb59b9a36024e9691efe15392770</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>aa17fe5a8c7c687f5073ff67e0e207b27</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a92bfbdaba4957d7aa7ab074ddf6c7901</anchor>
    +      <arglist>(const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a496f42a6d5a83e6dd3ae81fce13721e7</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addMenu</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a50eaba20dd39974f03e891bd2a74c4fd</anchor>
    +      <arglist>(const WString &amp;text, WPopupMenu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>addMenu</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a192321f03e32aec24dafa9eedb67db08</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, WPopupMenu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a7dde07454b4b7557f87b480dc9911569</anchor>
    +      <arglist>(WPopupMenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSeparator</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a8f4135e800cafc0366aab88fd31848e8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>popup</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a9da2dff4c6de6845a5a15b1a7c22572c</anchor>
    +      <arglist>(const WPoint &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>popup</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a8b63c8824aa820d8d3669e563b6f57f4</anchor>
    +      <arglist>(const WMouseEvent &amp;event)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>popup</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a83f2a98f8ef6a107dff0d9df61e4d92e</anchor>
    +      <arglist>(WWidget *location, Orientation orientation=Vertical)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>aa46285d2d5698ffc27551e8bb3b35d46</anchor>
    +      <arglist>(const WPoint &amp;point)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>ae7d3aad5856e9ef376519201a07273aa</anchor>
    +      <arglist>(const WMouseEvent &amp;event)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a7e5609129a21ed9adf212516526eb663</anchor>
    +      <arglist>(WWidget *location, Orientation orientation=Vertical)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenuItem *</type>
    +      <name>result</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a9cc90b57b1e6bf95c64b0bd542b372e8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>ac4cb24c44b31cec44008396f202d432c</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>aboutToHide</name>
    +      <anchorfile>classWt_1_1WPopupMenu.html</anchorfile>
    +      <anchor>a6e8aadc13b909ea3bad826515560d504</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPopupMenuItem</name>
    +    <filename>classWt_1_1WPopupMenuItem.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPopupMenuItem</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a9b2bfe15b548815e43613beebe38aa7b</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPopupMenuItem</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a454f4abbbda784c874a51ea8d22acb5e</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WPopupMenuItem</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a566df86714a068d75045e87a51999faf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a183a8134d58c76f62bd84d405f904654</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a3c450003749c0d1f933c12dd202c111e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a7a5dade11f634972fddd4e7c7e84bffa</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a42b266f00f46f4b7eb9a3f636f2d6c22</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckable</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a8f1b98cf1c4362bcda671bbf833cbb7b</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCheckable</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a891cd208357fc5d4402acc12f951b338</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPopupMenu</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a4d73ac894229ea7ad28e900a7f59b7d3</anchor>
    +      <arglist>(WPopupMenu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPopupMenu *</type>
    +      <name>popupMenu</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a81aa0047544facf555292a0a0efd86f8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a1cb91298582f9404d22c268c3bba034f</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isChecked</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a06ece0c0b2d50ef0ac624dca2fcd2047</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a981f24ef341a504ff6c529fd5f52dd01</anchor>
    +      <arglist>(void *data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void *</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>add3e4ef46b78735e27053d4b816f6442</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>triggered</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>af193b89a72881939e4f02c3d6139ff12</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>ac5bc72416b24de408e5a8c61362e6230</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WPopupMenuItem.html</anchorfile>
    +      <anchor>a9ade078579b04bed7d66aea9dcce5668</anchor>
    +      <arglist>(bool disabled)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WProgressBar</name>
    +    <filename>classWt_1_1WProgressBar.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WProgressBar</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>af11f55059b78f4f40cc88ab5eae8f849</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimum</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>aff1c1c21642bc4f2d3f9405fc2491ce9</anchor>
    +      <arglist>(double minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>minimum</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ab436c64554ab4adc3a780a7ad6da6500</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximum</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>a1925aa3e7aed457e7b80dd91f728afe1</anchor>
    +      <arglist>(double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>maximum</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ab78f72af41689214a92a0f23ec668235</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ab16ba89c58804410f4080bcc76f8d4aa</anchor>
    +      <arglist>(double minimum, double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ac0cf5ad1588716d0ef9501fddc421b8c</anchor>
    +      <arglist>(double value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>af27e4dde74755a6eeae59b81c8ae7ca6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFormat</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>a6fb308103fbdad5d58c90450c657678a</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ad327e01413b06eb86f38f0ff38796572</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>add10d474c0ebfca950260ae2fcea876a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; double &gt; &amp;</type>
    +      <name>valueChanged</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>aa95aa9075fbffc7bcc2ef13407e6a8db</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>progressCompleted</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>a4a0b07947134a74df39df42e076a6130</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WProgressBar.html</anchorfile>
    +      <anchor>ab3a6a25af643a68683e0da40989590c8</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WPushButton</name>
    +    <filename>classWt_1_1WPushButton.html</filename>
    +    <base>Wt::WFormWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPushButton</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>abd74d092403f1cbe17f8ea3529c0528f</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPushButton</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>a6525ba8c05bb27ad80c4a0a0ff32cf71</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>ae76e2ad608c2acb0686dee57649a596d</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>ac9eeba268762744f72158d9ec8de26fb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>aeb5668bdbe96e460047de04ed5759af9</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>af0f52faf4a50b1d80d03d6a32f3c7a28</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRef</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>aa5830a2118836423f0c16d12bbfd57a0</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>ref</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>ab8cbbcd9fd3051a490e9b71ee3416037</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResource</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>adbade65e5201991aa9e7dd131cf66fc9</anchor>
    +      <arglist>(WResource *resource)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WResource *</type>
    +      <name>resource</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>aca1303c5fa3c4efeab3003cfcaa65947</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WPushButton.html</anchorfile>
    +      <anchor>a57084964c8ecf099bcf3e4767a5cca68</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WRadioButton</name>
    +    <filename>classWt_1_1WRadioButton.html</filename>
    +    <base>Wt::WAbstractToggleButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRadioButton</name>
    +      <anchorfile>classWt_1_1WRadioButton.html</anchorfile>
    +      <anchor>af2a014f58ee5e9105e409c7e7b0219ff</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRadioButton</name>
    +      <anchorfile>classWt_1_1WRadioButton.html</anchorfile>
    +      <anchor>a1b05a25ac8803ad9cb96b441f0c09eee</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WRadioButton</name>
    +      <anchorfile>classWt_1_1WRadioButton.html</anchorfile>
    +      <anchor>a234ed5e2d0e698b80d4e7c8b65f027c2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WButtonGroup *</type>
    +      <name>group</name>
    +      <anchorfile>classWt_1_1WRadioButton.html</anchorfile>
    +      <anchor>a908574da36efe50c70fc6a9d77f045cd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WRasterImage</name>
    +    <filename>classWt_1_1WRasterImage.html</filename>
    +    <base>Wt::WResource</base>
    +    <base>Wt::WPaintDevice</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRasterImage</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a5849a1646b9739c75e01d3bdb17b7773</anchor>
    +      <arglist>(const std::string &amp;type, const WLength &amp;width, const WLength &amp;height, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WRasterImage</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a660f5904f28a7f10861afa014e8df882</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a7d61c2108242fc61ecdc14c42a50443f</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>af3663ee7373f3be11fdcb5a991bfdad8</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a4d87e6c8d6132a9b4a077d171b8bdeb4</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imgUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a6ae45a8f4d44be9d935a9ae4b9c7ec3a</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>ad90e19e0dd8ead44c0a43c136b8b5a47</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>aff63adfbd50d736260018c2d0c5bbba2</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a8b04b69af81e9f8e6294ac52612aa2e0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a9b460b1dbf35675a4a43c377682f4989</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>acf75d51af5965dfa9f06c8bdab084c5a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a007f7f513d23ffe9c24947462780dcc5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>aa04944c08a0995ff2eaa42c5bd431de6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a636543ffb0fffeb7a9e0dd8a166d3167</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPixel</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a96888a696b1f98c2d36fda556595ab08</anchor>
    +      <arglist>(int x, int y, const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a626f46e6b7cac223224c72bf3684b61d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>a1e6ce062a5b45b1bb7d8c65d17c1315d</anchor>
    +      <arglist>(WPainter *painter)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WRasterImage.html</anchorfile>
    +      <anchor>af4e9da55569320bdc3168749ba66d3c0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WRectArea</name>
    +    <filename>classWt_1_1WRectArea.html</filename>
    +    <base>Wt::WAbstractArea</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectArea</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a56e72183f3e07a8161bd2795baaa9fc2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectArea</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>ad0eaa4bb51b94b7f695fddde8df3adee</anchor>
    +      <arglist>(int x, int y, int width, int height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectArea</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>ae27e82fa1034ffb2855ab142ce8d19d3</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectArea</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a44f5f1b92b79e2355998a54cea5257c1</anchor>
    +      <arglist>(const WRectF &amp;rect)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setX</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a14c6788e518a2db3a3128110763695b8</anchor>
    +      <arglist>(int x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>x</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a47b5e476e13e51c1c98c9d72017e9d56</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setY</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a0e19203a36ccf624d85be131f3b1ac30</anchor>
    +      <arglist>(int y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>y</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a020c4bd1576ca7a5c138f5ecccaa0592</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidth</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a07614d6f30cbe7ae69b8aa562ebe0922</anchor>
    +      <arglist>(int width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a930186d9bf4721d3b65b4a64032c7c74</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHeight</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a6ed26185f1c92c5fc9e3f80f2a7733b2</anchor>
    +      <arglist>(int height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WRectArea.html</anchorfile>
    +      <anchor>a7dba50020eb443edbf16c0389c99bdf0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WRectF</name>
    +    <filename>classWt_1_1WRectF.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectF</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a7676cc3fde735f0eabc02df2ecb636c7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectF</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a3d26d539fec651826796afb2a5b87a83</anchor>
    +      <arglist>(double x, double y, double width, double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRectF</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a23619ae019639c2057975535cd55c05c</anchor>
    +      <arglist>(const WPointF &amp;topLeft, const WPointF &amp;bottomRight)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a0a62dd7b49290cbc39e5fba781a583a3</anchor>
    +      <arglist>(const WRectF &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isNull</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a249ad5fd8e9f8944c4766d46b6f14e0b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isEmpty</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a7f162f054257cad98c19e6a75c789710</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setX</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a6e3421e306699075d52111f60da2d057</anchor>
    +      <arglist>(double x)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setY</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a95ac1538d8f47afee7fa031dccf8a9bf</anchor>
    +      <arglist>(double y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidth</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>af297f3a2020d409fa148f3e12e28097c</anchor>
    +      <arglist>(double width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHeight</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ac035c1a098d61f09b746ec63d338ff9f</anchor>
    +      <arglist>(double height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>x</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a45bc90a0a76945e0dcd8c38a12194dd6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>y</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ae1e0121826ab777d95f43fde599db13f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>aa753427e56e604c9731ed230d3040003</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a294cb52820c4c50d64c0af0da9af7c08</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>left</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ad7ee063d60ea848ae3b37cf662b5827a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>top</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a81a752c33b1fdb0988d81d3d411ea894</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>right</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ad7d9f3b2208430ef38aa96a7d6592108</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>bottom</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a577ea0708a4a4bb6f10febc9c1b8e567</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>topLeft</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a584b65722cf37b9ebcdb906b55c0d6dd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>topRight</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ac596407f8db4cb1d57f55404a97e7845</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>center</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a152c145b940ce78d0e2071ea06b8e9ba</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>bottomLeft</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>aa567de202e36f066e90a020e44a3763a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>bottomRight</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ad84efe11dde39872210dd03133ae6585</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>contains</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a90cc7f1034d1b298e6793e35023af281</anchor>
    +      <arglist>(const WPointF &amp;p) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>contains</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>ad686bb2322ed6e2d2e9c73d59bbf6ea0</anchor>
    +      <arglist>(double x, double y) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>intersects</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a2efed036fc6fe7be636788893be65d5f</anchor>
    +      <arglist>(const WRectF &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>united</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a86a64a17d5a11e2ea9b44fc9d2360ef6</anchor>
    +      <arglist>(const WRectF &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>normalized</name>
    +      <anchorfile>classWt_1_1WRectF.html</anchorfile>
    +      <anchor>a8f0e63244aed0c98c2a2a63899408f05</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WRegExpValidator</name>
    +    <filename>classWt_1_1WRegExpValidator.html</filename>
    +    <base>Wt::WValidator</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRegExpValidator</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>ac73905fa4427ee0ab0ee83e6eeac0373</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WRegExpValidator</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a7536b67e2bedd2dfdb5b89c9dd56602b</anchor>
    +      <arglist>(const WString &amp;pattern, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WRegExpValidator</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>aa3a0d2b4c2bec81325eebfab1530d3dc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRegExp</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a71190cef122cc6000be16d9703393cd9</anchor>
    +      <arglist>(const WString &amp;pattern)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>regExp</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>ad4af69a61c23bf59db1b7c6bedf56311</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFlags</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a461e39a6e009efe786d3189f5ca91584</anchor>
    +      <arglist>(WFlags&lt; RegExpFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; RegExpFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a50d1c191711ad6d900b274547dd069ef</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>acd0bc1ff9dc23f4f34c6840e3d0d5edc</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a6ca44df82213538b13026d27f721669c</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setNoMatchText</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a41fdea26cc852b40a1f1c16c09624f01</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidNoMatchText</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a41b52e1428a6561c5be695702e20318a</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidNoMatchText</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>a144ed2ffa928a0f6f28e456880126397</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WRegExpValidator.html</anchorfile>
    +      <anchor>aae5e8bce20a76f654cd007b8b85cba0d</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WResource</name>
    +    <filename>classWt_1_1WResource.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WResource</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>ab4a2f71811a597a3603b039968dcb6d7</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WResource</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a776c19c9bbc95330941744cd129bc01a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>suggestFileName</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a8f2c3c2aa013cebecd73398dadc3d6d0</anchor>
    +      <arglist>(const std::string &amp;name)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>suggestedFileName</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a966ece2e5a3e39d861e156ed0151402e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a9394f6c2ff6cadf8d1076ec52c5e909a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPath</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a06bb9dbe3ae195c320cfed7b062d448a</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>internalPath</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>aca0470f44682d5b785045269235a23b0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>generateUrl</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a5060efcabde5f793c9d44c5ca557417d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>url</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a11169bf885f297f6f2ebbc1789aeded2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>dataChanged</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a1527418354a584790c372e86a40c6027</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setUploadProgress</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>ae0b96cdd80b982c74adb9a762c77d479</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; ::uint64_t,::uint64_t &gt; &amp;</type>
    +      <name>dataReceived</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a37f002b4919486e057469b92d70c755d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>write</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>ad8bbe65a888cc43e0d356f18509b9a0f</anchor>
    +      <arglist>(std::ostream &amp;out, const Http::ParameterMap &amp;parameters=Http::ParameterMap(), const Http::UploadedFileMap &amp;files=Http::UploadedFileMap())</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a3a740f8cc29e2e6e4e58defc9c88b8b6</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>beingDeleted</name>
    +      <anchorfile>classWt_1_1WResource.html</anchorfile>
    +      <anchor>a24f65859427f54012fef2fa9da14870d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WScrollArea</name>
    +    <filename>classWt_1_1WScrollArea.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="enumeration">
    +      <name>ScrollBarPolicy</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a266104fe2b2f25b8f908de58e21ebbf7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ScrollBarAsNeeded</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a266104fe2b2f25b8f908de58e21ebbf7ac387af3baf5e109899bdddbf72586aaf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ScrollBarAlwaysOff</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a266104fe2b2f25b8f908de58e21ebbf7a8c3f17ce7b5a537f91f6926e98dc3aa3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ScrollBarAlwaysOn</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a266104fe2b2f25b8f908de58e21ebbf7a18cdc324ca6e869655208c8d02274a5d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WScrollArea</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a2114c3abfc3b2aa78677f1d65dde9402</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidget</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>ac313ec45cd9aa9382fc5b540ad9008ae</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>takeWidget</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>abef337f8179db15f4448bd60980ff371</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a76426cecd85e75ed4add6b26853a0bb3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WScrollBar *</type>
    +      <name>horizontalScrollBar</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a5d25cb403fd03c5a4bc0116ab6278135</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WScrollBar *</type>
    +      <name>verticalScrollBar</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a6f3aca1de426f4a256997e3a780bc251</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setScrollBarPolicy</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a7870ea2ccdbd40d62cd3633d58ba5b0e</anchor>
    +      <arglist>(ScrollBarPolicy scrollBarPolicy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHorizontalScrollBarPolicy</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>a61394643cb1195d2e40d0189fe8f3dc4</anchor>
    +      <arglist>(ScrollBarPolicy scrollBarPolicy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setVerticalScrollBarPolicy</name>
    +      <anchorfile>classWt_1_1WScrollArea.html</anchorfile>
    +      <anchor>af94d4c195ed2f0fa8114277c42cd59e2</anchor>
    +      <arglist>(ScrollBarPolicy scrollBarPolicy)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WScrollBar</name>
    +    <filename>classWt_1_1WScrollBar.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type>Orientation</type>
    +      <name>orientation</name>
    +      <anchorfile>classWt_1_1WScrollBar.html</anchorfile>
    +      <anchor>abad5971aa318817e38fb85eaf33e8f1c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1WScrollBar.html</anchorfile>
    +      <anchor>aad9b9a1d141c02edc2853176135a052d</anchor>
    +      <arglist>(int value)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>tie</name>
    +      <anchorfile>classWt_1_1WScrollBar.html</anchorfile>
    +      <anchor>a6eb5c19029a90ae5b748411dc0dd4c89</anchor>
    +      <arglist>(WScrollBar *one, WScrollBar *two)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>unTie</name>
    +      <anchorfile>classWt_1_1WScrollBar.html</anchorfile>
    +      <anchor>a9d78abc2a0c36b6dfb707ca8d427e017</anchor>
    +      <arglist>(WScrollBar *one, WScrollBar *two)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSelectionBox</name>
    +    <filename>classWt_1_1WSelectionBox.html</filename>
    +    <base>Wt::WComboBox</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSelectionBox</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a079089ad7d220d5fd2b17d342fd65375</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>verticalSize</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a0aa28564501cd4c2653fdc45c4fd1a20</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setVerticalSize</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a90bcf3611a6f54e0358b7f208b0cb478</anchor>
    +      <arglist>(int items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionMode</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>aa3119417024e25b7b24e66cab17edb31</anchor>
    +      <arglist>(SelectionMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionMode</type>
    +      <name>selectionMode</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a22a94e26ce301d967efa0893093f73c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::set&lt; int &gt; &amp;</type>
    +      <name>selectedIndexes</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>ae27b849b2eeef1bf35ddbaca3659e539</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectedIndexes</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a4fcb25c6d7c00f5659959180df9a337c</anchor>
    +      <arglist>(const std::set&lt; int &gt; &amp;selection)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSelection</name>
    +      <anchorfile>classWt_1_1WSelectionBox.html</anchorfile>
    +      <anchor>a2925ed26e7e56d8ce7bca40dc338f5e0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WServer</name>
    +    <filename>classWt_1_1WServer.html</filename>
    +    <class kind="class">Wt::WServer::Exception</class>
    +    <member kind="function">
    +      <type></type>
    +      <name>WServer</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a4e347c4f853f527999c8c46c62d16f6b</anchor>
    +      <arglist>(const std::string &amp;wtApplicationPath=std::string(), const std::string &amp;wtConfigurationFile=std::string())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WServer</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>aa8eb08f58abb174af9e10d0fc4ee0b9e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setServerConfiguration</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a0f3ced6ffd8b8c53d8e34cf27a5e2d94</anchor>
    +      <arglist>(int argc, char *argv[], const std::string &amp;serverConfigurationFile=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addEntryPoint</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a84f84652ccb139850adcf5ea75f50fa5</anchor>
    +      <arglist>(EntryPointType type, ApplicationCreator callback, const std::string &amp;path=std::string(), const std::string &amp;favicon=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addResource</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a7b78b5e35d2dc3086faa54f82124cf38</anchor>
    +      <arglist>(WResource *resource, const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>start</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>af1699e7cee79223e6d35c1c5eae0aa5a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stop</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>ada0ea6f20704b1255f5c28764c776f2c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isRunning</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a493c35784e8f0ba28281483415eed7e6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>httpPort</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>acf48af4046dbb1ad353e54de480dd0c4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>appRoot</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a6b0f98b3c7fcac1dd21bdf929e3b8428</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>readConfigurationProperty</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a11cf397651bd2b470c65aa43b2a60271</anchor>
    +      <arglist>(const std::string &amp;name, std::string &amp;value) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static int</type>
    +      <name>waitForShutdown</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>ada2b943932a470be299594c7e896e275</anchor>
    +      <arglist>(const char *restartWatchFile=0)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>restart</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>a5d514ec2756c5c4ffe44b10e0b03c5a4</anchor>
    +      <arglist>(int argc, char **argv, char **envp)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>WRun</name>
    +      <anchorfile>classWt_1_1WServer.html</anchorfile>
    +      <anchor>abca6890dab44d87bd3af64705ac072d3</anchor>
    +      <arglist>(int argc, char **argv, ApplicationCreator createApplication=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WServer::Exception</name>
    +    <filename>classWt_1_1WServer_1_1Exception.html</filename>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>what</name>
    +      <anchorfile>classWt_1_1WServer_1_1Exception.html</anchorfile>
    +      <anchor>aab549bbb4c5cb7b9827b65aa0dd218df</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WShadow</name>
    +    <filename>classWt_1_1WShadow.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WShadow</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>aeedaae98b1623a1c99b939baaad08e84</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WShadow</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>af265324ab60682594748eb555c00af6d</anchor>
    +      <arglist>(double dx, double dy, const WColor &amp;color, double blur)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a454f7ea63fb64088cd4ef12e4cc34595</anchor>
    +      <arglist>(const WShadow &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a911369f486a8210ad446bf06b70bb2f4</anchor>
    +      <arglist>(const WShadow &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>none</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>ace38cb8714d1aaae21d50bef8dcc6b7e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOffsets</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>af9dd7c26509053e501de5ce0965b14a4</anchor>
    +      <arglist>(double dx, double dy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>offsetX</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a12ad0e7cc7f2e781c351c5d475bd87db</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>offsetY</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a11aba63f01a65e742026e4bb8e1703c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColor</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a6e9b6616a273f18bd1356d41b15b8030</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WColor &amp;</type>
    +      <name>color</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>a5ef06b2d2327e943b5211b5480f3c29e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBlur</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>ace7c00e0277344fe481d8e7b8815d1bc</anchor>
    +      <arglist>(double blur)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>blur</name>
    +      <anchorfile>classWt_1_1WShadow.html</anchorfile>
    +      <anchor>ad48adb3264123006ad9e649b849366bc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::SignalBase</name>
    +    <filename>classWt_1_1SignalBase.html</filename>
    +    <member kind="function">
    +      <type>WObject *</type>
    +      <name>sender</name>
    +      <anchorfile>classWt_1_1SignalBase.html</anchorfile>
    +      <anchor>ab1020c5c3b431a74d9ab3d2b1d24932c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isConnected</name>
    +      <anchorfile>classWt_1_1SignalBase.html</anchorfile>
    +      <anchor>a13a3106be8949b273edc74aa61be14ce</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1SignalBase.html</anchorfile>
    +      <anchor>a5161bdd49ba2dee3ddfa085c51e68bdb</anchor>
    +      <arglist>(WObject *target, WObject::Method method)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1SignalBase.html</anchorfile>
    +      <anchor>a462d1a3c0a7db6a5ad03cee69e6e8c28</anchor>
    +      <arglist>(T *target, void(V::*method)())</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Signal</name>
    +    <filename>classWt_1_1Signal.html</filename>
    +    <templarg>A1</templarg>
    +    <templarg>A2</templarg>
    +    <templarg>A3</templarg>
    +    <templarg>A4</templarg>
    +    <templarg>A5</templarg>
    +    <templarg>A6</templarg>
    +    <base>Wt::SignalBase</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Signal</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>aa481062b581f9d2f071bf07b421d87ca</anchor>
    +      <arglist>(WObject *sender=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Signal</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>ae665a336ae3e576bcb372f16c306d4d1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a15d1150af031537b492674ee651bf4a3</anchor>
    +      <arglist>(WObject *target, WObject::Method method)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a04c1f708f726035cac24a8f5726e4b74</anchor>
    +      <arglist>(const F &amp;function)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>ae6b9bffa47c0ffdd1667e8f13e8dab74</anchor>
    +      <arglist>(T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a7f296d5965c03785c7a635431f7f6a79</anchor>
    +      <arglist>(T *target, void(V::*method)(A1))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>aa1a8436d769d11f5cb0c1febafd1e27d</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a239b63678084087ba15fd17f6ab1a312</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a976facef99c1a6a53871bd7118c7e1bc</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a906499f6b97c28d1da8b5c615aee41dc</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4, A5))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>ad5eaf26f300335ccbf37ed71026ff1b7</anchor>
    +      <arglist>(T *target, void(V::*method)(A1, A2, A3, A4, A5, A6))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>emit</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a8d9cf8a1e83634462fe2b492b3beb1c5</anchor>
    +      <arglist>(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a10c70ce5cafb6170e56e8df36bbb9a7a</anchor>
    +      <arglist>(A1 a1=NoClass::none, A2 a2=NoClass::none, A3 a3=NoClass::none, A4 a4=NoClass::none, A5 a5=NoClass::none, A6 a6=NoClass::none) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isConnected</name>
    +      <anchorfile>classWt_1_1Signal.html</anchorfile>
    +      <anchor>a4a65919846e7d1cedabd0e9acc65563a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::EventSignalBase</name>
    +    <filename>classWt_1_1EventSignalBase.html</filename>
    +    <base>Wt::SignalBase</base>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>name</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>a1ef1b9ac79778e98e703ec3a2de30a1f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isConnected</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>a9abebc3c61cade46272159698960e214</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>preventDefaultAction</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>afd8983929683ffc4c6dda8a91a7bda7b</anchor>
    +      <arglist>(bool prevent=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>defaultActionPrevented</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>ac840555229d96847ffb11960958e0fff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>preventPropagation</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>a63f088978e6dd375b3a329f458f9db3f</anchor>
    +      <arglist>(bool prevent=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>propagationPrevented</name>
    +      <anchorfile>classWt_1_1EventSignalBase.html</anchorfile>
    +      <anchor>a0660648ca23b59a30ddc3226ad4a55b3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::EventSignal</name>
    +    <filename>classWt_1_1EventSignal.html</filename>
    +    <templarg></templarg>
    +    <base>Wt::EventSignalBase</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isConnected</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>aba826d0b0c74751fed4ab8eb9b05732b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a6efcb92576b5aa846a3354dd26918a9f</anchor>
    +      <arglist>(const F &amp;function)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a79396e66db668bd56de65943f83dacd2</anchor>
    +      <arglist>(T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a60c4413956cb5484be2670982721202c</anchor>
    +      <arglist>(T *target, void(V::*method)(E))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a9d1fd7a2f0b8421e170d5423b0df5c59</anchor>
    +      <arglist>(T *target, void(V::*method)(const E &amp;))</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a3508b7434fbbaec9369c9fc489f10085</anchor>
    +      <arglist>(const std::string &amp;function)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>ae026eaa8a8d978d83f46526ff58c6abc</anchor>
    +      <arglist>(JSlot &amp;slot)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>emit</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>ac75c46b1f601b482d62feefad593638f</anchor>
    +      <arglist>(E e=NoClass::none) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>operator()</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>aba7df462ab43f885c1a4edfa7962eb02</anchor>
    +      <arglist>(E e) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::signals::connection</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1EventSignal.html</anchorfile>
    +      <anchor>a1f2db23ff04515852f82eece414e7f3c</anchor>
    +      <arglist>(WObject *target, WObject::Method method)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSignalMapper</name>
    +    <filename>classWt_1_1WSignalMapper.html</filename>
    +    <templarg>T</templarg>
    +    <templarg>A1</templarg>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSignalMapper</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>a5c23094be042e549bb54a09c14fd5bd2</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMapping</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>a89ccb4bde41e6e326072077214756ccc</anchor>
    +      <arglist>(WObject *sender, const T &amp;data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>mapConnect</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>a1d2c6572bf0b8dbd21e2f0d0b19dfc30</anchor>
    +      <arglist>(SignalBase &amp;signal, const T &amp;data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::signals::connection</type>
    +      <name>mapConnect1</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>ab5ecc06f3bbd26be127027b058bfbadf</anchor>
    +      <arglist>(S &amp;signal, const T &amp;data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; T, A1 &gt; &amp;</type>
    +      <name>mapped</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>abd2fae2a26c9f89928d32f6e209671eb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>map</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>af4bc239e4f47ae25e6544be3dd1676de</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>map1</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>a236a9f2bfa71fd1f990f04e105782976</anchor>
    +      <arglist>(A1 a)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeMapping</name>
    +      <anchorfile>classWt_1_1WSignalMapper.html</anchorfile>
    +      <anchor>a395e321c3c545225a3669608044b2454</anchor>
    +      <arglist>(WObject *sender)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSlider</name>
    +    <filename>classWt_1_1WSlider.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>TickPosition</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a393f2ee54ef0816e7fb774db7b449cf4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TicksAbove</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a393f2ee54ef0816e7fb774db7b449cf4ad2ff66b50fd871c8087f5d5ab3a96a0b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TicksBelow</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a393f2ee54ef0816e7fb774db7b449cf4a7f3790c208f56c1ba4104839c750e159</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TicksLeft</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a393f2ee54ef0816e7fb774db7b449cf4aa3643c713a52ea96d4a4d4102732cbb2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TicksRight</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a393f2ee54ef0816e7fb774db7b449cf4ac9e3b1846ed47193c0f42cda600b8073</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSlider</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a339c6e8b9a32f232039a51270a36c8e3</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSlider</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a062f657c1dcfc53224aacb97374513b1</anchor>
    +      <arglist>(Orientation orientation, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WSlider</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a86b98ee70f4d0d4f5e3fe23b3939a8e7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOrientation</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>abbb9b8059f3a19cd36ffbfda00467016</anchor>
    +      <arglist>(Wt::Orientation orientation)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Orientation</type>
    +      <name>orientation</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>afdb2cf9f61821fdf8ca376ab11f78453</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTickInterval</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a3497303ace2820b3bd457119cec35411</anchor>
    +      <arglist>(int tickInterval)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>tickInterval</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a9ddb7b0dd68ca38051ff302f4c02ed5f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTickPosition</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a58e4a2a02c31b47040d35d646ad2ec0b</anchor>
    +      <arglist>(WFlags&lt; TickPosition &gt; tickPosition)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; TickPosition &gt;</type>
    +      <name>tickPosition</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a2ec5814fd492f1b4057bae0965bd546b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>afc41362dafd1f53f4d0d52385c04d40c</anchor>
    +      <arglist>(int value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a0b701be67d81634d95f4ecb9f1ff372b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximum</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>ae1fcddb363795d572da2ae68362771e5</anchor>
    +      <arglist>(int maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>maximum</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>ae77592e0f0514cb23dfc7e060fcf37e2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimum</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>aea0dad399f79f2014dbd3f06d7cdd6d0</anchor>
    +      <arglist>(int minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>minimum</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a5b000d3d26cc6e08c84de252477137ca</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a2031dbb839f0da2ade7e8e88d32079e4</anchor>
    +      <arglist>(int minimum, int maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>valueChanged</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a26548e39f70fbbd0383eecf302ddb73c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; int &gt; &amp;</type>
    +      <name>sliderMoved</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>ac7257988652fc39910b1088cf02ecc5a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>ab2c74e01222219a65b799cd78800a114</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const Wt::WFlags&lt; TickPosition &gt;</type>
    +      <name>NoTicks</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a4eea09fd0af7a1e252940f3e8b141f9c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const Wt::WFlags&lt; TickPosition &gt;</type>
    +      <name>TicksBothSides</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>adb2b7b683aa56fee39a4b62b17b37fef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>layoutSizeChanged</name>
    +      <anchorfile>classWt_1_1WSlider.html</anchorfile>
    +      <anchor>a250baa8de6f9dc769dd0b1cbd4c05fe9</anchor>
    +      <arglist>(int width, int height)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSocketNotifier</name>
    +    <filename>classWt_1_1WSocketNotifier.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="enumeration">
    +      <name>Type</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a5be2fe0fe94d449a0d6b1ac77f7b548c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Read</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a5be2fe0fe94d449a0d6b1ac77f7b548ca057d53943ca8e7e9381526747c689d1c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Write</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a5be2fe0fe94d449a0d6b1ac77f7b548ca85abb8bd7445d145faa84c8545b1d5f4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Exception</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a5be2fe0fe94d449a0d6b1ac77f7b548ca17c50ed02a1f9aa67ece3d5e71b66141</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSocketNotifier</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>ae60a2f36b909f50404bfb15864562347</anchor>
    +      <arglist>(int socket, Type type, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WSocketNotifier</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>aff88999b1c55254f8b129193a53ee485</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>socket</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a3a1bde7ddf5a3bdde74906343027e355</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Type</type>
    +      <name>type</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a42d21d0c22cdf3b3ed7ee10dbdc82aed</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnabled</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a9cb21fa4b5827a205b21f9b656baca6d</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>a893c8fcee0191bb2ae56df27697f8f7c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1WSocketNotifier.html</anchorfile>
    +      <anchor>acf78fc846ca6f915111533575dcc9401</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSortFilterProxyModel</name>
    +    <filename>classWt_1_1WSortFilterProxyModel.html</filename>
    +    <base>Wt::WAbstractProxyModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSortFilterProxyModel</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>aec8bd731a505369b12695beeecc1fd19</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WSortFilterProxyModel</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>acf3b4890f299bb548b0351f6e68610b4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapFromSource</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>ab32e734793e3a6e657b3b5655831885e</anchor>
    +      <arglist>(const WModelIndex &amp;sourceIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>mapToSource</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a290351f93612a5180c055328e2ff3663</anchor>
    +      <arglist>(const WModelIndex &amp;proxyIndex) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSourceModel</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a805bcc6964e8c0194638c05f30d2a8cb</anchor>
    +      <arglist>(WAbstractItemModel *sourceModel)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterKeyColumn</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>aaf272fe23196b67a409e7d0de03fd8d5</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>filterKeyColumn</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a9c1714947d1910e049ec26067e0cf4d0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterRegExp</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a1c9dce68769668570bb5bccc3e0a9969</anchor>
    +      <arglist>(const WString &amp;pattern)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>filterRegExp</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a2e5b064ec7ebf4e738b7e423a7449ed3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterFlags</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a0e907bc557a0d657cbd38493babbfc05</anchor>
    +      <arglist>(WFlags&lt; RegExpFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; RegExpFlag &gt;</type>
    +      <name>filterFlags</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>aadefa2d17ddeb4c19a7327c2e115962a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterRole</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a0ca42014aa2f383154409032c9a3c8d3</anchor>
    +      <arglist>(int role)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>filterRole</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>acbbbb4a3a95a61ea1289036d4069f0bc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSortRole</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a63686e0718a623c6507f61195e020917</anchor>
    +      <arglist>(int role)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>sortRole</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a35cfadde9afc4495dfab93234e5e169b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDynamicSortFilter</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a4dfdc62d591249454cbb38e5099f19b4</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>dynamicSortFilter</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a1d977245afeec04711241c70bff84c5d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>ad295e3835ffd9f5e602b3dbb29f93f22</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>aa4d6d01a9ec7bbdb1d77f31fbd332791</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a6ad76d2a537d2f8e3f6f084a10e493a3</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a018f06cc89846655bd0db3c7a9eebfcb</anchor>
    +      <arglist>(int row, int column, const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setHeaderData</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a54eea17b2e88ebebcdba479f2f2ffc9c</anchor>
    +      <arglist>(int section, Orientation orientation, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>headerData</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>abd144908bf36785333b43c48b437dbdd</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a0a65e908c140bc48c5e0a5fb3ada12b8</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>ac05897acd82abbe355dc57c79a2d01be</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a119a5cdf51974371db37ae6972e5955b</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>filterAcceptRow</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>acabfd24268c9b37e6dc296557423e5a5</anchor>
    +      <arglist>(int sourceRow, const WModelIndex &amp;sourceParent) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>lessThan</name>
    +      <anchorfile>classWt_1_1WSortFilterProxyModel.html</anchorfile>
    +      <anchor>a5fc984dd492c02e47de2d87df6816d17</anchor>
    +      <arglist>(const WModelIndex &amp;lhs, const WModelIndex &amp;rhs) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSound</name>
    +    <filename>classWt_1_1WSound.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSound</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>ae26e36590aaf75d0a5a346ac59594afc</anchor>
    +      <arglist>(const std::string &amp;url, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WSound</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>ad2b9aa6ce656708845c21aff965e02ea</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>url</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>a1cf98567462319d880ddf3459bc8c8cb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>loops</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>a47126fa920874bfccf12c65ace9c9473</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLoops</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>a6cf72578210c7a6ff345372afa85d198</anchor>
    +      <arglist>(int number)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>play</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>a6ca6b48ebc9e49ee6745228961df3817</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stop</name>
    +      <anchorfile>classWt_1_1WSound.html</anchorfile>
    +      <anchor>a7c3ce5dc7204f5c156bffd71487e3f72</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSpinBox</name>
    +    <filename>classWt_1_1WSpinBox.html</filename>
    +    <base>Wt::WLineEdit</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSpinBox</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a6c5011835f73ca3bd0ea84042023dcf4</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimum</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>ab238b68b3a4b5b5228bdcec5718fada8</anchor>
    +      <arglist>(double minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>minimum</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a0e03c840ca852bd1b2868b1b8f702691</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximum</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a9d8bb92b4ee1723459b0da8c9f9f5ae9</anchor>
    +      <arglist>(double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>maximum</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a8478eb93136c9d775bb5bb3492e0eb61</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a2067110adfa9c070a2075beee6e0e2a0</anchor>
    +      <arglist>(double minimum, double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSingleStep</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a48f42656f848c2b8fc1e554aaed0e7b5</anchor>
    +      <arglist>(double step)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>singleStep</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a6c99873b0a0e05b4d7ee2931b609b3da</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a8e86dbc1b1f11545f35b7f69cd0e6720</anchor>
    +      <arglist>(double value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a552d928e6918c4d4b1998fd88bfffebd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; double &gt; &amp;</type>
    +      <name>valueChanged</name>
    +      <anchorfile>classWt_1_1WSpinBox.html</anchorfile>
    +      <anchor>a3bd5685d184893af09ac1ecff20fa912</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WStackedWidget</name>
    +    <filename>classWt_1_1WStackedWidget.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStackedWidget</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a32b77a6dded133822098ac759d108bbe</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>affaa67bed3b16d9cca3c83a1d9386918</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a47fd91b7a51f57f341fde82b611cc1a1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>currentWidget</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a82b399a7a80f64617b1e8995999476d2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertWidget</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a7a199e9cf57bee54333880534070767c</anchor>
    +      <arglist>(int index, WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentIndex</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a4a2f79cf685ade6ad529e0673e22e6b0</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentWidget</name>
    +      <anchorfile>classWt_1_1WStackedWidget.html</anchorfile>
    +      <anchor>a460ba17f219b8cc75748735417b04828</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WStandardItem</name>
    +    <filename>classWt_1_1WStandardItem.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItem</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>abe5aebe20c0c5309be95928996e3acf1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItem</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a599f5dd0b5f6ca0a4bf8025e81be4ad1</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItem</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a1cce25693284be45efd3a8a13e9f10ee</anchor>
    +      <arglist>(const std::string &amp;iconUri, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItem</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a302d98cd8d22708e14cbe171b4864d42</anchor>
    +      <arglist>(int rows, int columns=1)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WStandardItem</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ab8f7298a52e2884445b5bb7b68e451e2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a7922bbfa1b9236f2c3f20ed8082bc2e3</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a5cd26b1515b25d32b2872210918d7e68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a6ef82d367150a352795bdb2f780db14a</anchor>
    +      <arglist>(const std::string &amp;uri)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a8589c64bc69cd96b77487341a681e251</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a760bedb0ba3b5f33b0ea8bfa22e5961e</anchor>
    +      <arglist>(const WString &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>acb892e03bc947f0d8a88362ffed90f54</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a76442b01365d83b068da168e08b63290</anchor>
    +      <arglist>(const WString &amp;toolTip)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>adc6f732a90772386087c83d723abb01c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPath</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>af84903204e2b648662a88bfb1c1f1b27</anchor>
    +      <arglist>(const std::string &amp;internalpath)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>internalPath</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a0a91034168e95924077ec66e1a2d45de</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setUrl</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>af17035241a875c0c453d01f48db0a3eb</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>url</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a92e9bd9515807142c644a728576ff9c8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>abbbeb294638fa8a226268084eb9de07d</anchor>
    +      <arglist>(bool checked)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isChecked</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a3ec85da5d9a6c62fbe420cb002cb18d3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckState</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a6cb0c54ca4ef5dd9edba40600c5b6bef</anchor>
    +      <arglist>(CheckState checked)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>CheckState</type>
    +      <name>checkState</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad29e472a0ebe23901593c0d0a1abf89b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFlags</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>aedf80dfed644a525e5d726a4b6e74b94</anchor>
    +      <arglist>(WFlags&lt; ItemFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a81bc3d55f8117f5c80edcb3c9c6b871a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckable</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a5de5f61ac9b8b57c09da2f55c3a248e1</anchor>
    +      <arglist>(bool checkable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCheckable</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a197e297e6ba98d3b3d4853c7b5a5db32</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTristate</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a10320a132e0ffaa3690df4e4d44f4c7b</anchor>
    +      <arglist>(bool tristate)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTristate</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>af228b01baec73491dd845016dba539a5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>afbe54e68e576c4902c9085f8966c93ef</anchor>
    +      <arglist>(const boost::any &amp;data, int role=UserRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a5b94df87dd78d97534e016f24234f787</anchor>
    +      <arglist>(int role=UserRole) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasChildren</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad28fd8e888080cb173b2d876a77786c6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRowCount</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>af93e0c455c2272dd950dce0644504b15</anchor>
    +      <arglist>(int rows)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a0b025885afc1500285359821f52bb531</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnCount</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a221176a45599230e03d04e4c08f04499</anchor>
    +      <arglist>(int columns)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ae157a0e2b44598cb25803a25d0d8bfe4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendColumn</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>aae8a2684f85098c41aa34895920a6c84</anchor>
    +      <arglist>(const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertColumn</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a60bcb4a8bd91aecf585c8318ef705f14</anchor>
    +      <arglist>(int column, const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>abd54c7797f40c036b38300ba9cdf69b5</anchor>
    +      <arglist>(const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a095602cce3f0c659454be852d9a94a0b</anchor>
    +      <arglist>(int row, const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertColumns</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a2bf1d1d17e5a62ffcb665a0809fe0299</anchor>
    +      <arglist>(int column, int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>aa3633c2a26d7a267f7f433e134b219dd</anchor>
    +      <arglist>(int row, int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ab0f932bb7dcad18eae1cdf80c0be6d4e</anchor>
    +      <arglist>(WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a6990f40f13a6104eebc22776e58c06fd</anchor>
    +      <arglist>(int row, WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendRows</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad8fedcff08c109dd84a84d7af33cda41</anchor>
    +      <arglist>(const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad7f4b1f298f31e8ebe6954ca91e613f0</anchor>
    +      <arglist>(int row, const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChild</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>af1f8742b169e098f3ad9fb47a39dabcc</anchor>
    +      <arglist>(int row, int column, WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChild</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a91493ed3198e1f9adec44a43c9612a7b</anchor>
    +      <arglist>(int row, WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>child</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a874247b52596f31126882ee8ea53d3ca</anchor>
    +      <arglist>(int row, int column=0) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>takeChild</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a0f0fdd581ce3cb5e36e454c5723f21eb</anchor>
    +      <arglist>(int row, int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; WStandardItem * &gt;</type>
    +      <name>takeColumn</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a7707f797f7c9a726a4cafea31718f3dd</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; WStandardItem * &gt;</type>
    +      <name>takeRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a837d95bdff4d66b5b8420a93e78a292d</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeColumn</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad2bdf52c5e251eca480a438db233f7b6</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeColumns</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>acd189fbf5324542ad05cfdf0d6376f97</anchor>
    +      <arglist>(int column, int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeRow</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad3e49ceafa130f6b537983b8c186b609</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a114deac9facd4b6c2f47b64a6e90abfe</anchor>
    +      <arglist>(int row, int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndex</type>
    +      <name>index</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a8afc6170ff2544d385823795b4dded37</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ad629764e5e03409974d161153a134d4a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a3077685cc81d575a56ca30199b505c71</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>row</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>abbf8d957d714eb536135d62dc70a2d22</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>column</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a578238226092665edc6b20be1a1a9cfb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WStandardItem *</type>
    +      <name>clone</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a56aabcd49c74a1a3570a55883639acd2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>ac7753533f27c5e142d6e92ded1f0f683</anchor>
    +      <arglist>(const WStandardItem &amp;other) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sortChildren</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a0d3540cac93582ab50d111032f4b9b44</anchor>
    +      <arglist>(int column, SortOrder order)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a3dd6eac751e2181e9c48d8c2ee443a6a</anchor>
    +      <arglist>(WStandardItemModel *model)</arglist>
    +    </member>
    +    <member kind="function" protection="private">
    +      <type>int</type>
    +      <name>compare</name>
    +      <anchorfile>classWt_1_1WStandardItem.html</anchorfile>
    +      <anchor>a9056b7fc97af6b294fd105aa5ec18656</anchor>
    +      <arglist>(const WStandardItem &amp;other) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WStandardItemModel</name>
    +    <filename>classWt_1_1WStandardItemModel.html</filename>
    +    <base>Wt::WAbstractItemModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItemModel</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>ac196f72fe7716da075fd07733b1c1b6f</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardItemModel</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>aef7ec1979605acf6a508989a3f93a05c</anchor>
    +      <arglist>(int rows, int columns, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WStandardItemModel</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>af361083dead5e486bafacf68165df7ac</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>aa07712b2aa72937a9736150fa85f55be</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>invisibleRootItem</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a5fdc79e8100020d98a77ad3543019477</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WModelIndex</type>
    +      <name>indexFromItem</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>af12ec42f5800fce941b755e78ad12c9d</anchor>
    +      <arglist>(const WStandardItem *item) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>itemFromIndex</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a145e32a4cbc3972eb96a4021710a8c3c</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendColumn</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a2fe535fb71106a3627f71b82b6f5baaa</anchor>
    +      <arglist>(const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertColumn</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>ae556b6aa88a3643e74cec7772901d28e</anchor>
    +      <arglist>(int column, const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendRow</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a96216a68e34ebba32606a51c53054bf9</anchor>
    +      <arglist>(const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a78fd43e608a944d6133d605a6093a9cf</anchor>
    +      <arglist>(int row, const std::vector&lt; WStandardItem * &gt; &amp;items)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>appendRow</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a29b3e2f5a3f034b2c2e3ad912bfde2f3</anchor>
    +      <arglist>(WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a0d06fe8a64f5f2afe3250e449293a8d3</anchor>
    +      <arglist>(int row, WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>item</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a32d755ace793c2110b0fa5d650a0d577</anchor>
    +      <arglist>(int row, int column=0) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItem</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a70852fa43e28b529193e9f9ffbf466b7</anchor>
    +      <arglist>(int row, int column, WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>itemPrototype</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a382fe331f22553bdd3e8ea80c8e6c4b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemPrototype</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a3acfcbe5f75c2b2f41d503056c12f734</anchor>
    +      <arglist>(WStandardItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; WStandardItem * &gt;</type>
    +      <name>takeColumn</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>aa611e8b36fb94233795e1b5dfa1010a7</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; WStandardItem * &gt;</type>
    +      <name>takeRow</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a06ede866383dd1ffd08c329ab8213788</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStandardItem *</type>
    +      <name>takeItem</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a78fec4e8611ae29d8ad729590169be2e</anchor>
    +      <arglist>(int row, int column=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSortRole</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a3aa1f52a3ae23611267e049130cb472c</anchor>
    +      <arglist>(int role)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>sortRole</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a9bd7204c237e9fd602ad4b6d046f3ac5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a884ad9c56cee759be868b3db5c520ee2</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WStandardItem * &gt; &amp;</type>
    +      <name>itemChanged</name>
    +      <anchorfile>classWt_1_1WStandardItemModel.html</anchorfile>
    +      <anchor>a4a8ab0eea450c93b040aac6f76c1346f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WString</name>
    +    <filename>classWt_1_1WString.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ab1118313feb49fd2a1f7eab40f7f7a56</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a1259e1f8285f3e04ef62fb59e6c83f4e</anchor>
    +      <arglist>(const wchar_t *value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a22fb311a713484d978b52b6787910da7</anchor>
    +      <arglist>(const WString &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a217c6be8205e02d3e2580b6c59357bb6</anchor>
    +      <arglist>(const std::wstring &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aa1e577f4cf6352a3a657fde3f7d3034e</anchor>
    +      <arglist>(const char *value, CharEncoding encoding=LocalEncoding)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ad2b612d535553feb1e4d08347f5475b1</anchor>
    +      <arglist>(const char *value, const std::locale &amp;loc)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a65df74efecfae4e46c68fe3ff28ff81d</anchor>
    +      <arglist>(const std::string &amp;value, CharEncoding encoding=LocalEncoding)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a5aaf5904a4293de24d79ec953cf0d3b6</anchor>
    +      <arglist>(const std::string &amp;value, const std::locale &amp;loc)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WString</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ad3e7e1481f31514ecf58a6a344ec6ca6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>afbd9254fb159d682ed4a2227a7ec69b7</anchor>
    +      <arglist>(const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a5a1bf5761127553e8189a278525af71c</anchor>
    +      <arglist>(const WString &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>accc7df36ce3febb1b2e1c297b30fafd2</anchor>
    +      <arglist>(const WString &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a111e77b8cf401664d191eaf3f85867b1</anchor>
    +      <arglist>(const WString &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>abb46a3098a1a185a3498fbcf4c714c7b</anchor>
    +      <arglist>(const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a0c455e324e5e756c456cd662f829373c</anchor>
    +      <arglist>(const std::wstring &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a64bbf435dfe82342ce43faf9c48ee28f</anchor>
    +      <arglist>(const wchar_t *rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a36d097b2ed9a2e921ad2d6a79bc3dd25</anchor>
    +      <arglist>(const std::string &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>operator+=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>acac4b0bc682e0789edc2976883ed7a5a</anchor>
    +      <arglist>(const char *rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>empty</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a87a90e69ab25d62ba029e10ea244abaf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>toUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a159d088da6e8f2be1035b2341889254c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::wstring</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ab76d45947986f8aa20763cf99267ec23</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>narrow</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a0b90340ac2dbacb9b4d81e92d9070066</anchor>
    +      <arglist>(const std::locale &amp;loc=std::locale()) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>operator std::wstring</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aaf8a69faf2551af5afb4757fd02f631b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>literal</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a61a714a97bb6d70d60be6f9a1997e636</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string</type>
    +      <name>key</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a18807776c41bdaebd7264bbabdd2282a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>arg</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a1c3d0d7790282777ce13edececfe0095</anchor>
    +      <arglist>(const std::wstring &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>arg</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a7da2111a8ca361ccd7d77df0232b3986</anchor>
    +      <arglist>(const std::string &amp;value, CharEncoding=LocalEncoding)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>arg</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a4761af728bf3cc5bca4ae3770243883e</anchor>
    +      <arglist>(const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>arg</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a167d99295d497bc37c11893c175e7e02</anchor>
    +      <arglist>(int value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString &amp;</type>
    +      <name>arg</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aadfe619a23256dab80fd238c6e4ad7d7</anchor>
    +      <arglist>(double value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; std::string &gt; &amp;</type>
    +      <name>args</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a59dcc59bd1bc95984f2add4e32e914c0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a545b18b7e07b4596281970ca1599430b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsStringLiteral</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>abcdf277c20807ab963effd7e54732fa8</anchor>
    +      <arglist>(char delimiter= &apos;\&apos;&apos;) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ae4b373b58ce67056080286a6ceca59b1</anchor>
    +      <arglist>(const WString &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>fromUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a17afc7c43b5b7a710047be4a2c639575</anchor>
    +      <arglist>(const std::string &amp;value, bool checkValid=false)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>fromUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a4fbd5cdc92e39411de45acb680b1206b</anchor>
    +      <arglist>(const char *value, bool checkValid=false)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>tr</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a0afc7dc0f9897456d71b569a86ca26c1</anchor>
    +      <arglist>(const char *key)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>tr</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a42a4aad50b5a1633b1cfef4c0ffa044a</anchor>
    +      <arglist>(const std::string &amp;key)</arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const WString</type>
    +      <name>Empty</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a511a12bce677dc733bd7b6b9415bff73</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>CharEncoding</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LocalEncoding</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52ae31c944a7e88c44611f9317e7c1223e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a55b820090cc9d15753301df90e35fd52a92c04a55980fec5344377e55b271cfd0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>WString</type>
    +      <name>WMessage</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a552bc8e01a4bc1c6ba53607c414a82b7</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a8e74a971d0d341af51ffcc77fc4c5f29</anchor>
    +      <arglist>(const WString &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a20e373795a949c805d82cd7793ce0847</anchor>
    +      <arglist>(const WString &amp;lhs, const std::wstring &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a29b92c396a6bdc6703a38c2da0822065</anchor>
    +      <arglist>(const WString &amp;lhs, const wchar_t *rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>abf52ea1a14eff4dc0f19fc089c499b58</anchor>
    +      <arglist>(const WString &amp;lhs, const std::string &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a8358446c46d0433f3f080698e271b91f</anchor>
    +      <arglist>(const WString &amp;lhs, const char *rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ac5c8dce7d5d1e3a9abe13a9d9093fbb2</anchor>
    +      <arglist>(const std::wstring &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aec7aea6adc509be52d4852cdad577aa7</anchor>
    +      <arglist>(const wchar_t *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>ade2e90e8c1b589d5c7cde214e05953bb</anchor>
    +      <arglist>(const std::string &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API WString</type>
    +      <name>operator+</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a21c7b1899a0c1fefb22cad296605c66b</anchor>
    +      <arglist>(const char *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a902005eafdaa7adc292dfb384feed65f</anchor>
    +      <arglist>(const char *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a8b3b3574ae5e0eb9d8a74663a7ef52ad</anchor>
    +      <arglist>(const wchar_t *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aafe1405efe5edabdb5fa11a2f0891899</anchor>
    +      <arglist>(const std::string &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a18fa1117aac536af9a3eeaf4a06d33e6</anchor>
    +      <arglist>(const std::wstring &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a5be68db1207e42e9cb78584aada52b7e</anchor>
    +      <arglist>(const char *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>add2140b578bed246c41705506987ce8d</anchor>
    +      <arglist>(const wchar_t *lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a39afb0dc0c18f1c4ae9a1c36fd061722</anchor>
    +      <arglist>(const std::string &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a4bbceb2c54d45a3b0b6bc55d15a17dba</anchor>
    +      <arglist>(const std::wstring &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::wostream &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a82f539b8c205675c9c9f4d5d42cc9c57</anchor>
    +      <arglist>(std::wostream &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::ostream &amp;</type>
    +      <name>operator&lt;&lt;</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a5175831fb21a4e6245bfde54c5aaa3d2</anchor>
    +      <arglist>(std::ostream &amp;lhs, const WString &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::wstring</type>
    +      <name>widen</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a0de7f8ee205f8a3368d6428e4b474f11</anchor>
    +      <arglist>(const std::string &amp;s, const std::locale &amp;loc=std::locale())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::string</type>
    +      <name>narrow</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a2986eba78638de302685abc4f8e694d0</anchor>
    +      <arglist>(const std::wstring &amp;s, const std::locale &amp;loc=std::locale())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::wstring</type>
    +      <name>fromUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>aa5e236feac365794b288fd04a461406b</anchor>
    +      <arglist>(const std::string &amp;s)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::string</type>
    +      <name>fromUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a302015c198cc14fb1705c99797253b48</anchor>
    +      <arglist>(const std::string &amp;s, const std::locale &amp;loc)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::string</type>
    +      <name>toUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a32dae81c17e873b041a85a8509c905a5</anchor>
    +      <arglist>(const std::wstring &amp;s)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WT_API std::string</type>
    +      <name>toUTF8</name>
    +      <anchorfile>classWt_1_1WString.html</anchorfile>
    +      <anchor>a402d7dbb582ee830e5718b50b53e971a</anchor>
    +      <arglist>(const std::string &amp;s, const std::locale &amp;loc=std::locale())</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WStringListModel</name>
    +    <filename>classWt_1_1WStringListModel.html</filename>
    +    <base>Wt::WAbstractListModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStringListModel</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a8473bc475b42b0d2bbb171ab22f498fd</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStringListModel</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a730e0b9b2fd0922d274b4ab7278420e5</anchor>
    +      <arglist>(const std::vector&lt; WString &gt; &amp;strings, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WStringListModel</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>afa9abc72565103ebedc8efa26dad427a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStringList</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a605688afa2a1810e1a01b3ef3d335bda</anchor>
    +      <arglist>(const std::vector&lt; WString &gt; &amp;strings)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertString</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a3bf0b8d2e110cbd518a57f74e8f9e4c6</anchor>
    +      <arglist>(int row, const WString &amp;string)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addString</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a11d42c5242caafbdc6cb21d56f7e8a8b</anchor>
    +      <arglist>(const WString &amp;string)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WString &gt; &amp;</type>
    +      <name>stringList</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>ad51da40b9c4267fffbb439bdc0ef718b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a5ee1ba3f7d36612e3a78fdc132b5b327</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a9a650aa1d48d5e634573c930a5f62b45</anchor>
    +      <arglist>(const WModelIndex &amp;index, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>aa953d435f25052df7b2c09a6f180c606</anchor>
    +      <arglist>(const WModelIndex &amp;index, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a81138b8b606df663cc7163265a9b0644</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a0c22294fa02436654cde45e34a84a228</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a5d73ec0b7b622a4117afaebea3d4ce6b</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1WStringListModel.html</anchorfile>
    +      <anchor>a3cc26548b0301db88afc8a52a59e8f55</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSubMenuItem</name>
    +    <filename>classWt_1_1WSubMenuItem.html</filename>
    +    <base>Wt::WMenuItem</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSubMenuItem</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>a0c56dcd20f9d6afaaf289d2270e3b296</anchor>
    +      <arglist>(const WString &amp;text, WWidget *contents, LoadPolicy policy=LazyLoading)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSubMenu</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>a33eccd31a4aa8436cf66effa2cecf94b</anchor>
    +      <arglist>(WMenu *subMenu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenu *</type>
    +      <name>subMenu</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>aa30469d72bfdec0c85181f012e269e9f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>pathComponent</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>af774d49f24f2ee362cc28eb688cb9eef</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>createItemWidget</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>a3883ce17fd7d04553510700189fbc7af</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>updateItemWidget</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>a44820d1555db0e1f6593dd80d1c0b34e</anchor>
    +      <arglist>(WWidget *itemWidget)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderSelected</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>ad3096bef2abbc291cb2560cd16d92458</anchor>
    +      <arglist>(bool selected)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual SignalBase &amp;</type>
    +      <name>activateSignal</name>
    +      <anchorfile>classWt_1_1WSubMenuItem.html</anchorfile>
    +      <anchor>a38d7a0fa3581f34aa72c9fd4d1a6eaeb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSuggestionPopup</name>
    +    <filename>classWt_1_1WSuggestionPopup.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <class kind="struct">Wt::WSuggestionPopup::Options</class>
    +    <member kind="enumeration">
    +      <name>PopupTrigger</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a7cad80c92d68c8396d82670be1a4bc69</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Editing</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a7cad80c92d68c8396d82670be1a4bc69a21a91e46a3a341cfa7c6883a77c7c272</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DropDownIcon</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a7cad80c92d68c8396d82670be1a4bc69a3eb6dd8408d1213104f8b4720b6e6836</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSuggestionPopup</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a854886c83fd73cdb5f3c338cc0baf6a5</anchor>
    +      <arglist>(const Options &amp;options, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSuggestionPopup</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a2ddf4c97fa85c77de4c76cbca24951bb</anchor>
    +      <arglist>(const std::string &amp;matcherJS, const std::string &amp;replacerJS, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>forEdit</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a56813832a386cdc93a0e70b0d0aa5f92</anchor>
    +      <arglist>(WFormWidget *edit, WFlags&lt; PopupTrigger &gt; popupTriggers=Editing)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeEdit</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>ad8e85625b9309639222ed1893c57713a</anchor>
    +      <arglist>(WFormWidget *edit)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSuggestions</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a0beae292354fa79c2bbe68e9b11c8f01</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSuggestion</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>aff509867327911ed93445c56231680fb</anchor>
    +      <arglist>(const WString &amp;suggestionText, const WString &amp;suggestionValue)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a4b4e3dcc77433195c5439ab86ac5d95c</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a7fa2fe71e41607f45feffa8f14697db4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModelColumn</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a6616d230bad6511bc40d3bf2c1e4ec84</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDefaultIndex</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a9ebf63d4048a9662c3e05ae6be162993</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>defaultIndex</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a9533638edb1114a703fe0617cbe67921</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterLength</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a8a77e3397fa98db0639fca3b1c94a8a2</anchor>
    +      <arglist>(int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>filterLength</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a6f06ad67c94d06f1ef7d73ec2c51de39</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WString &gt; &amp;</type>
    +      <name>filterModel</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a4c7f8529e7d49fca2a10e95bdbbd9815</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int, WFormWidget * &gt; &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a63f0db2301510404922d7ed1572b92cc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setGlobalPopup</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a20846bf7fb64c992a2f98904b482b1c4</anchor>
    +      <arglist>(bool global)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMaximumSize</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>abd7500d03679e0190307a753d78085ec</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMinimumSize</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a7db92809f8e5d3751d2a9bf446549497</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>generateMatcherJS</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a415162037c68f38e4141264022b02489</anchor>
    +      <arglist>(const Options &amp;options)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>generateReplacerJS</name>
    +      <anchorfile>classWt_1_1WSuggestionPopup.html</anchorfile>
    +      <anchor>a58e9fd0c214cdc80170c42933af206aa</anchor>
    +      <arglist>(const Options &amp;options)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WSuggestionPopup::Options</name>
    +    <filename>structWt_1_1WSuggestionPopup_1_1Options.html</filename>
    +    <member kind="variable">
    +      <type>std::string</type>
    +      <name>highlightBeginTag</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>a641575cedc6544eee08473482de42b3d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>std::string</type>
    +      <name>highlightEndTag</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>af26bd646168b1fd0bc442015464188fd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>char</type>
    +      <name>listSeparator</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>a4711cf874a36b2a64010ad669b3b68ab</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>std::string</type>
    +      <name>whitespace</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>aef3e98b66b4cc136e2c726079d6681de</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>std::string</type>
    +      <name>wordSeparators</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>a3e29211108f2b156a0b983a5a15ecece</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>std::string</type>
    +      <name>appendReplacedText</name>
    +      <anchorfile>structWt_1_1WSuggestionPopup_1_1Options.html</anchorfile>
    +      <anchor>a800a6cda2637ce1fe3bbc8fe981dd1ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WSvgImage</name>
    +    <filename>classWt_1_1WSvgImage.html</filename>
    +    <base>Wt::WResource</base>
    +    <base>Wt::WVectorImage</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WSvgImage</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a06fdb6d6f125cd23f53e40ef63970a87</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WSvgImage</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>adae0510faa27fb9ae5d3e199de3cd5d9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a9716e255c443f13d4845799f2ddadf67</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>afd7b970580c7433fe58ec157d273d824</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a856da1392335f90675d3d110c90a8e02</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imgUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>adaeba36845c9772efc195a88a53584a6</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a7f76614002d01f2fce87b9fd5097009e</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a91666089c7882eedf1cafde09db6a400</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>ad0333d7b9933ced6929d1482f8320fb5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a9dac09bd538e107a2808effbdd42a0c2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>aeadc4934d16507d660ad8b95e4ad407a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>rendered</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a11bb431a8cec09c1e38c710e50407043</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>aee03b670ef9fb624e4393a9ef55005d3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>af8655b3ac955b1e87e64a4db7912a03b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>ae79007c08cab7b4c9f24f0e0210c02e1</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a674990e3990d86462436b2ac01df6baf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a1da329a749b8b699ec599cc711a16870</anchor>
    +      <arglist>(WPainter *painter)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WSvgImage.html</anchorfile>
    +      <anchor>a4e2760d99101aaf5f87f92616f3d4b2d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTable</name>
    +    <filename>classWt_1_1WTable.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTable</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>aa5c23e5c08d11315063e7714c85a8364</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WTable</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a342361febd4e025a71d4ccf3990b9c7c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTableCell *</type>
    +      <name>elementAt</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>ac4b59af9a44e185edb14e7f1f439d6c4</anchor>
    +      <arglist>(int row, int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTableRow *</type>
    +      <name>rowAt</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>aff46a40881a7d0967d7435d8d479bedb</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTableColumn *</type>
    +      <name>columnAt</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a37dc3995a309d32a0e4bf857596df00e</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeCell</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a5c45c882a0b3af6d0c0ed13b6217c078</anchor>
    +      <arglist>(WTableCell *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeCell</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a46b216d395d19f3f9a71d1f168ca4f16</anchor>
    +      <arglist>(int row, int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTableRow *</type>
    +      <name>insertRow</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a53a8121130504141346ec8f355f6d691</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteRow</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a1e0910054f11ebdc8ae3a5cd7b03975c</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTableColumn *</type>
    +      <name>insertColumn</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>acfc99f211e1bbf2ad5c5898347a412a4</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>deleteColumn</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a5cb1b9e4cc08ff62f203eab0894e0756</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a431d6a3da63ab9696e084ad7c2438afb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a79d5dfe40ee5e67c5007ee370e8cd2f3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>a4d062330d1c9b3f202985b92dcb59d4f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHeaderCount</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>ae5e4e17ae51492b26e1930332d2f5bae</anchor>
    +      <arglist>(int count, Orientation orientation=Horizontal)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>headerCount</name>
    +      <anchorfile>classWt_1_1WTable.html</anchorfile>
    +      <anchor>ab742cd4fbda9d0692aad3165c34e0e84</anchor>
    +      <arglist>(Orientation orientation=Horizontal)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTableCell</name>
    +    <filename>classWt_1_1WTableCell.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRowSpan</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>ae14b338d8395de33d93f7a28ef2b3edd</anchor>
    +      <arglist>(int rowSpan)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowSpan</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>ad2a5d47f9ae33fc3a0bcba6bd84ddd7b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnSpan</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>a0f4912b4c023b78e6de41561e2e0a62a</anchor>
    +      <arglist>(int colSpan)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnSpan</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>a885083e7e30a3d76f33c39847dc3a6bb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>row</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>a50e770e21680477b17057056cf94d10b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>column</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>a2c1860eb33dbb70381eef117790862fa</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTable *</type>
    +      <name>table</name>
    +      <anchorfile>classWt_1_1WTableCell.html</anchorfile>
    +      <anchor>aee883c3bb465b97551f00947adb05a77</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTableColumn</name>
    +    <filename>classWt_1_1WTableColumn.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type>WTable *</type>
    +      <name>table</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>aec83d3ab2ad075209fed09e5ee80df64</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnNum</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>a75bdc9289edad19c01e7698414db6147</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWidth</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>a5c5c0bb9110387e389e5151cbeaab81e</anchor>
    +      <arglist>(const WLength &amp;width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>a4a527b0b4294c5a9b367eb5b6b653812</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>aae7b55f11d53043c2512536144eab42d</anchor>
    +      <arglist>(const WString &amp;style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>ada5fb02b5164ebf3cd7f0e5abe98cc53</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setId</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>a319304807e13d2a15ea40384f9080033</anchor>
    +      <arglist>(const std::string &amp;id)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WTableColumn.html</anchorfile>
    +      <anchor>abd8af1a254554ad9bc465bccb4411b02</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTableRow</name>
    +    <filename>classWt_1_1WTableRow.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type>WTable *</type>
    +      <name>table</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>af06f80cc7f5fc9bdc36cdefa691433d7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rowNum</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a67848b510b4803a2ba3be800de89b7bd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHeight</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>aac0b7d156d2f4d3897802b7e9771c1de</anchor>
    +      <arglist>(const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a71719040fa936136f48a43301301f46e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a5ccc6742f7b5e1aa1284fb6f5f62540e</anchor>
    +      <arglist>(const WString &amp;style)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a74e64af29ed20db6a6b5cd84e3eb05a3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>ac9d66838aceb059dfb0b43c250caa6ec</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a9f39b7412ea915eec131fef374d8a5e4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hide</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a99b3fcea3f7dec12b34d2e0222699010</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>show</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>a189bb29f29777795bd0910468e697c4e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setId</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>ad7dbf026ef77f8204a7d49d805fdbb10</anchor>
    +      <arglist>(const std::string &amp;id)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WTableRow.html</anchorfile>
    +      <anchor>ac16b8e1246aa646e7dca93c13685a392</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTableView</name>
    +    <filename>classWt_1_1WTableView.html</filename>
    +    <base>Wt::WAbstractItemView</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTableView</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>ae48531f45c05a632f0998fc569827e66</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a2e3629fbaee86da21c77c4583efb79ed</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnWidth</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>af37d27044e96919e2fa6af4e25f3ef67</anchor>
    +      <arglist>(int column, const WLength &amp;width)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setAlternatingRowColors</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>afbc128d312f1d5aa75c65352cb43e4ca</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setRowHeight</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>ab17c45b65e38c22c0230062696c36e61</anchor>
    +      <arglist>(const WLength &amp;rowHeight)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHeaderHeight</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a3d54d6a256ae21fc01df08de377395c4</anchor>
    +      <arglist>(const WLength &amp;height, bool multiLine=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnBorder</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>ab04b345ed42cca116230b8492872a833</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a921a3a6c489b584b261c6b7c7bf720d8</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnHidden</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a1e27074ef479dbc2e35c957c3baea36f</anchor>
    +      <arglist>(int column, bool hidden)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>pageCount</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a36d7e6c66548e8bd39036a878853e0ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>pageSize</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a974c354a344dd0225dc81e6e0da94195</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>currentPage</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>ab07c6b2dfb77dcb785147de0c6ad4875</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setCurrentPage</name>
    +      <anchorfile>classWt_1_1WTableView.html</anchorfile>
    +      <anchor>a4efddbc531cafc180bc620b15d0420aa</anchor>
    +      <arglist>(int page)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTabWidget</name>
    +    <filename>classWt_1_1WTabWidget.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>LoadPolicy</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aef0d42df57c2dfdc73f7ba3791d76af3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LazyLoading</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aef0d42df57c2dfdc73f7ba3791d76af3a97ed17a08a1a30a76f5f3bae0322bc0b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreLoading</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aef0d42df57c2dfdc73f7ba3791d76af3a6fdba6f7dbf6fb2721351f08eec9cd12</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTabWidget</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a754d002238ce54b0006230dfb466f3b1</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTabWidget</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>af00ff86a7f5f3a082a9cce5cb051bbcf</anchor>
    +      <arglist>(WFlags&lt; AlignmentFlag &gt; layoutAlignment, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WMenuItem *</type>
    +      <name>addTab</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a8f5bea792ccb3487fb2f3a9258463b3f</anchor>
    +      <arglist>(WWidget *child, const WString &amp;label, LoadPolicy=LazyLoading)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeTab</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>af6aa9e6978aa17609130ff88ae5d31a2</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a2982283dca1b7698cf687e16e4d2b72f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a1d591772cbc00b17c606f6d112fd5ace</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>acced5598138727b6e0f8a8cb72aa11ed</anchor>
    +      <arglist>(WWidget *widget) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentIndex</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a55ae29857e27019af4daea64131148d6</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a7cb494fc869a67ad6d9a4031682411a3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentWidget</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>ae5f9a6ab4847f9c3ccc62606a19e1871</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>currentWidget</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aef94b79d7b26972b3c3587483f8527bf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabEnabled</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>afd7bd7a9ae110bfcec42ebe0be1c0c3f</anchor>
    +      <arglist>(int index, bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTabEnabled</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a08c8caaf857857497128a80d20f444c7</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabHidden</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aa672a2e2bb5ee5f3fa260b8c0abe3032</anchor>
    +      <arglist>(int index, bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTabHidden</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>ae20623f2150e1d7e01926d6acae63801</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabCloseable</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a3cca019ee3ad730633d4341542985dba</anchor>
    +      <arglist>(int index, bool closeable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTabCloseable</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a594e9376c27382be684742c2c78b72a4</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabText</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a2f941cb6a5bb6092cad3f438acd2de14</anchor>
    +      <arglist>(int index, const WString &amp;label)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>tabText</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a65f1f96d293b575aefe99c2feeee6c1f</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabToolTip</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>abc7e97d8921ae9f3ebfb7fd5911fcea9</anchor>
    +      <arglist>(int index, const WString &amp;tip)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>tabToolTip</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a080f7cf0bfa0abbca950828b905b92b5</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPathEnabled</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a855b45897b00f82137cd0eb9e0d40dfd</anchor>
    +      <arglist>(const std::string &amp;basePath=&quot;&quot;)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>internalPathEnabled</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a983a1adff54fa47a9a2fd9fea36f11a3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalBasePath</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a42c7d6ad6bfc8e821e3e667467865902</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>internalBasePath</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a5259f4ba319e909685c95fe92f8ddd84</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>currentChanged</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>a5447e1149d6c854f25d6fb6792eef513</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>closeTab</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>aefe8917e89b0db34c63634b3092a045b</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>tabClosed</name>
    +      <anchorfile>classWt_1_1WTabWidget.html</anchorfile>
    +      <anchor>ae71ac8fa905d0fd0a703589d375ce5f4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTemplate</name>
    +    <filename>classWt_1_1WTemplate.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTemplate</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a74a622a38ba317fcf3f8dc0ae4d43895</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTemplate</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>acf69702efa16a728e135958e0fec6622</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>templateText</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a6976f0561b036c6e4980a9991e8b4d38</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTemplateText</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a51db0813cc62cac123aaaa9a21c4eaa8</anchor>
    +      <arglist>(const WString &amp;text, TextFormat textFormat=XHTMLText)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindWidget</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a49b2e1de86726ef96875a347a8d02203</anchor>
    +      <arglist>(const std::string &amp;varName, WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindString</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a4be1babfa3a79b08ce73ca7fcca0324b</anchor>
    +      <arglist>(const std::string &amp;varName, const WString &amp;value, TextFormat textFormat=XHTMLText)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindInt</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a89426dcac3371befc127f7d5b04bb5ed</anchor>
    +      <arglist>(const std::string &amp;varName, int value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resolveString</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>aaf3655dc6954a7fab1158fd3b50d03e4</anchor>
    +      <arglist>(const std::string &amp;varName, const std::vector&lt; WString &gt; &amp;args, std::ostream &amp;result)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleUnresolvedVariable</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>ad5233b12314148d97dfaabdd2406b485</anchor>
    +      <arglist>(const std::string &amp;varName, const std::vector&lt; WString &gt; &amp;args, std::ostream &amp;result)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>resolveWidget</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>aef922e8441694954e14523a368c6cca3</anchor>
    +      <arglist>(const std::string &amp;varName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>T</type>
    +      <name>resolve</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a14e91697f026557a0bd287392f849302</anchor>
    +      <arglist>(const std::string &amp;varName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a155b52d94ebf495873daa848db105224</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a74f07dc026d40156769ef6d858e21538</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderTemplate</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a98baf277a7dd3144a38edb77cbb3d284</anchor>
    +      <arglist>(std::ostream &amp;result)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a35d7844ee2f2bbbcde8eeff6683194bd</anchor>
    +      <arglist>(std::ostream &amp;result, const std::string &amp;s, TextFormat textFormat=PlainText)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>a8c0ed114c0e3710be3ccd75155253fa9</anchor>
    +      <arglist>(std::ostream &amp;result, const WString &amp;s, TextFormat textFormat=PlainText)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WTemplate.html</anchorfile>
    +      <anchor>aafe27c3c2f89359a5c02112da3b155ab</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WText</name>
    +    <filename>classWt_1_1WText.html</filename>
    +    <base>Wt::WInteractWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WText</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a49bf5785263785717834a9d1a7a52399</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WText</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>abd144b9486708726fbb535c3f5b144c2</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WText</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a49fd6775622dd40cd3676f0945723d98</anchor>
    +      <arglist>(const WString &amp;text, TextFormat textFormat, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WText</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>aec8b48682cf39eba9516c9d5053f8323</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a1081f42ae498fa8d23656cec207a4a76</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a2f788aa524d51b3962642c9f565e66e6</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setTextFormat</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>af22c64c4c5fed3d2aef0915a7e5c5866</anchor>
    +      <arglist>(TextFormat format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>TextFormat</type>
    +      <name>textFormat</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>ac0976c36c5181a534f161ca3724d4296</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWordWrap</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a06fd47b48126caf4881b027d35ba066b</anchor>
    +      <arglist>(bool wordWrap)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>wordWrap</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>ab2259537310561d9352f63d566b63fd6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPadding</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a57c9dc7dbc3958fab19763bfb50a8286</anchor>
    +      <arglist>(const WLength &amp;padding, WFlags&lt; Side &gt; sides=Left|Right)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>padding</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a7de80cae510d43cd917dd1f4baa20b09</anchor>
    +      <arglist>(Side side) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WText.html</anchorfile>
    +      <anchor>a465517b955bf7bbe086401b57d888552</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTextArea</name>
    +    <filename>classWt_1_1WTextArea.html</filename>
    +    <base>Wt::WFormWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTextArea</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>ad083421ca4fe15da882440d506cab05b</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTextArea</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a8c2aa87526952d2645cec139f4ad26bb</anchor>
    +      <arglist>(const WString &amp;content, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumns</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>af429ed3a2b6011c97b4f9ea7f910e079</anchor>
    +      <arglist>(int cols)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRows</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>ade46b47350f427f45c9b53ac7e41c5b2</anchor>
    +      <arglist>(int rows)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columns</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>afa438b99f8ebf858e3202c262b29a3ae</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>rows</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>abe1a4daf466365557cfd3fbbe8bc9dd7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>ad8b89ce30df2b02894c53b6ed71fe4a6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a1f05060c037d13c2c6c26f51f1fb9640</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>selectionStart</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a81bb8d7f0206cb3a4d907580e274c315</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>selectedText</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>ac44ffcd0c2d1e4d1530529962f809d3b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasSelectedText</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a29c5b4df5c37101c82f8c8bdddf695fd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>cursorPosition</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a778d626bbf7af043759237764b91f017</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a480530c1847f32f8b94101881484287b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxPadding</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a83a327ce1d6408a99991cd6b5ddc74e4</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxBorder</name>
    +      <anchorfile>classWt_1_1WTextArea.html</anchorfile>
    +      <anchor>a3379006d7dbe832b617303b72924019c</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTextEdit</name>
    +    <filename>classWt_1_1WTextEdit.html</filename>
    +    <base>Wt::WTextArea</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTextEdit</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a451adca0c258c17b37bc544e3684952b</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTextEdit</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a644d69fc03aca222c38044578e5a181b</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WTextEdit</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a3e43187a1a3ad8386cb7c2271cb250ee</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a8023b2dbe675a22f30a563704d9ae475</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStyleSheet</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a7b6df4e80ea878c1c6d57d1c85f60b04</anchor>
    +      <arglist>(const std::string &amp;uri)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>styleSheet</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>ab3656ebc2b7d8856701377697c42067a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setExtraPlugins</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a106e80b7ae54d21a7307f3d4c125d098</anchor>
    +      <arglist>(const std::string &amp;plugins)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>extraPlugins</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>a66163ef0fc23df64e976c7c7d99b2d71</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setToolBar</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>ab569b96e871c547b1f992b727c00c902</anchor>
    +      <arglist>(int i, const std::string &amp;config)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>toolBar</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>aeb2451ef6b617267a0b88cd9d4b6dcd6</anchor>
    +      <arglist>(int i)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>ac9f80e652fc361512aa2587c54f4ecb5</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxPadding</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>ab268ab5bfd2edda2bf64dad5cd068abe</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxBorder</name>
    +      <anchorfile>classWt_1_1WTextEdit.html</anchorfile>
    +      <anchor>ac946e268b85e49d1155c656f354f00cb</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::InvalidTimeException</name>
    +    <filename>classWt_1_1InvalidTimeException.html</filename>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>what</name>
    +      <anchorfile>classWt_1_1InvalidTimeException.html</anchorfile>
    +      <anchor>aeed96c6aa8932b695039f49b7c369f5a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTime</name>
    +    <filename>classWt_1_1WTime.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTime</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>af45b86652752e63c00baee8662d793e3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTime</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a529d211c58a37ad4568745414c4a25c8</anchor>
    +      <arglist>(int h, int m, int s=0, int ms=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>setHMS</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ae506c60945d8c2a452233ade046fa9ac</anchor>
    +      <arglist>(int h, int m, int s, int ms=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTime</type>
    +      <name>addSecs</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a2779ca22acb1f51ad93320956501b251</anchor>
    +      <arglist>(int s) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTime</type>
    +      <name>addMSecs</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a534f180014e634562dc808bc1e36e215</anchor>
    +      <arglist>(int ms) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isNull</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>acfff1a1b2a4c38af39649491c15d516e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isValid</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>aa8e2713bf2844daeaf97820224a941ac</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>hour</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a2c7b13602f9da6c8f962ab732ece2c37</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>minute</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ae9d6e852ce86333537bef1fc133d7942</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>second</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ae009d5f15e86a6976cb2519efa3bdfee</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>msec</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a9eb15777053a11ed7212a44978f07f0f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>secsTo</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a53bc25995b5c3cd1bcffd2e0d562e08d</anchor>
    +      <arglist>(const WTime &amp;t) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>msecsTo</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a425254ca9b7cd851cbb2f0ed281b41d5</anchor>
    +      <arglist>(const WTime &amp;t) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ae8f4ea5cd7d712e13b2f48c9e734ce6b</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;=</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ad494013fd2bf5ad1d3d2360c5e2ba008</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a25c68de5cdd312a79096423e47d87008</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&gt;=</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>ae444c1b237d3d47bccf3b4acd8bc0456</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a260e9fc5c00732f3d2a8a0984339114c</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a838f4a55e5a114b04af0d6285f016531</anchor>
    +      <arglist>(const WTime &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a34367d6f97d872d7598c1ba88b4fc95c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>toString</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a02bf6eabd472474e73ef017414052751</anchor>
    +      <arglist>(const WString &amp;format) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WTime</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a4937c5baf2c39affad90eace5e8178c5</anchor>
    +      <arglist>(const WString &amp;s)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WTime</type>
    +      <name>fromString</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a9be98d6095a48d81e4eeb7315403f5df</anchor>
    +      <arglist>(const WString &amp;s, const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WTime</type>
    +      <name>currentServerTime</name>
    +      <anchorfile>classWt_1_1WTime.html</anchorfile>
    +      <anchor>a271bd124707e50cc15872e263ffa71f2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTimer</name>
    +    <filename>classWt_1_1WTimer.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTimer</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a1fb659aac40b49b3ec7631d558884847</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WTimer</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a6b983b4aa0a3594cad4a236f5a4acd0b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>interval</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a3aedc0ad65a5d57bea4b805a92d7736d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInterval</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a3a4070540a6b0e10bf1ee7bd607334fc</anchor>
    +      <arglist>(int msec)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isActive</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>aeabde106e48ea67e10c4043609b85493</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSingleShot</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a61dd8a5ac6fc6d9bd995e08ff7fae83c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSingleShot</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a92ae68d15de600174afdd2e443397604</anchor>
    +      <arglist>(bool singleShot)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>start</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>ae167fbd3eb981a2fce52e9a4b3b6e0af</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stop</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a73c5d1b882af4835384ccdc07a650e34</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>timeout</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a2a66c6a51df2b0ab42258abf2ebd0399</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>singleShot</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a47340f28a1c9d284f8b085ee4ed5924a</anchor>
    +      <arglist>(int msec, T *receiver, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>singleShot</name>
    +      <anchorfile>classWt_1_1WTimer.html</anchorfile>
    +      <anchor>a822b5fd4d575896b88a9539ef60612a7</anchor>
    +      <arglist>(int msec, const F &amp;f)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTransform</name>
    +    <filename>classWt_1_1WTransform.html</filename>
    +    <class kind="struct">Wt::WTransform::TRSRDecomposition</class>
    +    <class kind="struct">Wt::WTransform::TRSSDecomposition</class>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTransform</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>aa83f5dc582b77c4ac706cfb6b097a6e3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTransform</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a7af529e947eefac16dbce9d4ecdf374b</anchor>
    +      <arglist>(double m11, double m12, double m21, double m22, double dx, double dy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a5b316f9ab4b128fac20ddc193e9a531f</anchor>
    +      <arglist>(const WTransform &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a8d67ff2dd96e1b7a046a81dba72b8358</anchor>
    +      <arglist>(const WTransform &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>ab8279e66b2fced0710869593f1b7f89d</anchor>
    +      <arglist>(const WTransform &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isIdentity</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a2886f3ac1a3e60f90aae2505db3a6631</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m11</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a1887ee83c3b274284c323ef836529ab5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m12</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>aa5818883ee9a0d4f2ccede54fe4aae75</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m13</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a54c72247dc6c537b2af6c051acdf6364</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m21</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a50b1309a9ba5a28fda585ff2645955e5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m22</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>ace965ba306019e1eb77e2e19004fe26b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m23</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>ac4e9f7cbdf20f929e566cb1f94f3073a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m31</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a8b0d30f356852c84482864009c959f83</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m32</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a4c3829751f5f1e48b9cc9cd43c22edb8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>m33</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>adc52fe2393cb3183c5e76ada10fa1013</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>dx</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>afd36c0961fe1cc7ff476824f3dfc9cea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>dy</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a6828e36286b2fe38ec56446b007b1d41</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>map</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a201cba0a65a466383c48eb6d73b2f281</anchor>
    +      <arglist>(const WPointF &amp;p) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>map</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>affc1cb0071a86302318255fd867d08a1</anchor>
    +      <arglist>(double x, double y, double *tx, double *ty) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>reset</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a36e8423634a12878a6a7262bd749fe6b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>rotate</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a4f494c6f886c1b8b15c635e2dc81cc0e</anchor>
    +      <arglist>(double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>rotateRadians</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a72f394181e722cd890c06bb37e36e7db</anchor>
    +      <arglist>(double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>ac9cf750c7ce44b4ecfcae59d4dd964ac</anchor>
    +      <arglist>(double sx, double sy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>shear</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a94e146a18a35ec1a9f70cf09c2df8349</anchor>
    +      <arglist>(double sh, double sv)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>translate</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>ad4cd675b5072c25b0545167ba41586d8</anchor>
    +      <arglist>(double dx, double dy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform &amp;</type>
    +      <name>operator*=</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a8363fe6e026aa50b876f0adf195b422b</anchor>
    +      <arglist>(const WTransform &amp;rhs)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform</type>
    +      <name>operator*</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a3c87fbc872245469f325737360ada659</anchor>
    +      <arglist>(const WTransform &amp;rhs) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>determinant</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a1f5205bf60740327910dc93b057b2a08</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform</type>
    +      <name>adjoint</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a8fabda162bf70c144f58524708ade180</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTransform</type>
    +      <name>inverted</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a9747188f5900f5785ac15ffa3838533b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>decomposeTranslateRotateScaleSkew</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a1ff5716f31b5c2f2031e93bfcdc834cb</anchor>
    +      <arglist>(TRSSDecomposition &amp;result) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>decomposeTranslateRotateScaleRotate</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>af5d4d93e4efed30f10aef73e44fff719</anchor>
    +      <arglist>(TRSRDecomposition &amp;result) const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static double</type>
    +      <name>degreesToRadians</name>
    +      <anchorfile>classWt_1_1WTransform.html</anchorfile>
    +      <anchor>a425668a0cfd60a40f344f47d1a4cec92</anchor>
    +      <arglist>(double angle)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WTransform::TRSRDecomposition</name>
    +    <filename>structWt_1_1WTransform_1_1TRSRDecomposition.html</filename>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>dx</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>ab8439c2aa98232a58a31e629c3a6bfda</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>dy</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>a7a7838a113ae6d9d503d61ec1e834b9e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>alpha1</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>a32b755359b0bc486b377ab23e914b499</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>sx</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>a1dd3fcd36e7fa13b599688a2367fb5b9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>sy</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>a28cbe0f83bd66609d8f446bdc6d6a32d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>alpha2</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSRDecomposition.html</anchorfile>
    +      <anchor>ab351fba1317a61465b9b3833b59b90c5</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::WTransform::TRSSDecomposition</name>
    +    <filename>structWt_1_1WTransform_1_1TRSSDecomposition.html</filename>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>dx</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a3a83987c2214adab86987689db699285</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>dy</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a12d16f1a19223c83ee0715759d2dbc65</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>alpha</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a7719633bfa269511de91fe323d08b471</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>sx</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a465c59998f6c07d80f67faa9aac566cf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>sy</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a4be597e68e03aa5d613203ad9830028a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>double</type>
    +      <name>sh</name>
    +      <anchorfile>structWt_1_1WTransform_1_1TRSSDecomposition.html</anchorfile>
    +      <anchor>a3482d6a7b3a711eb6e1d516690b07a12</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTree</name>
    +    <filename>classWt_1_1WTree.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="typedef">
    +      <type>std::set&lt; WTreeNode * &gt;</type>
    +      <name>WTreeNodeSet</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a2308f07ae7dfb959360ad1bdcf394e44</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTree</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a0814258c8147d68000402468016f9817</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTreeRoot</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a040f5fa4df57cbfb586d686ffe1326d0</anchor>
    +      <arglist>(WTreeNode *root)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTreeNode *</type>
    +      <name>treeRoot</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a54de80f955e54acbab38a344546ce0bf</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionMode</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a7270f705ad5f9be1e2bee06a73348a9a</anchor>
    +      <arglist>(SelectionMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionMode</type>
    +      <name>selectionMode</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>afcc60067220a91ce69dde46ea413afc5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WTreeNodeSet &amp;</type>
    +      <name>selectedNodes</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a7d415764d1fce3d4c9d33713892c0ef9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a9e09dff326743004dc9f2bf27408551a</anchor>
    +      <arglist>(const WTreeNodeSet &amp;nodes)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a52c770a65ac3f4c2493f714271a5133a</anchor>
    +      <arglist>(WTreeNode *node, bool selected=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSelected</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a3969fd0bab17347bb32727dba2ff9682</anchor>
    +      <arglist>(WTreeNode *node) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSelection</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a14a781edeb90b3040a5e09238290514e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>itemSelectionChanged</name>
    +      <anchorfile>classWt_1_1WTree.html</anchorfile>
    +      <anchor>a103603f639e07f83d1a75e293b70966d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTreeNode</name>
    +    <filename>classWt_1_1WTreeNode.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="enumeration">
    +      <name>LoadPolicy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a51c02b42c069e61a269fde598b9a1bff</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LazyLoading</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a51c02b42c069e61a269fde598b9a1bffa4a962a514c531fb52c5958f61950ff3e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PreLoading</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a51c02b42c069e61a269fde598b9a1bffaf771c90906d73ed5eb1e6728366241e1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NextLevelLoading</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a51c02b42c069e61a269fde598b9a1bffa387323cbdc8efd12ef6bf8553876c011</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ChildCountPolicy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a0deb92963922074b6262f71e9fccd24a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Disabled</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a0deb92963922074b6262f71e9fccd24aa3b31c2b770a9acffa43daedf402df6cd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Enabled</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a0deb92963922074b6262f71e9fccd24aaebbfd35e39c920c5f2dbe74380e3abce</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Lazy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a0deb92963922074b6262f71e9fccd24aa256625b6187b3107b1eb201c1758a793</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTreeNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a169f429e0f0e1fe6d0874f9db72d041a</anchor>
    +      <arglist>(const WString &amp;labelText, WIconPair *labelIcon=0, WTreeNode *parentNode=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WTreeNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a1ec9b14cd8388631acbb3e82649d0d67</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WText *</type>
    +      <name>label</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a32c24104359b595cbaf914e35accb3b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WIconPair *</type>
    +      <name>labelIcon</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a2095a273249da81688699ff9750ea2a4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelIcon</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a906d6afe249fbebd9735dc9c9ca11166</anchor>
    +      <arglist>(WIconPair *labelIcon)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertChildNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a460f47f625133c99c622c71309bdc373</anchor>
    +      <arglist>(int index, WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addChildNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>adeb2bd7c946ef9c7bb5b72b3f88453a6</anchor>
    +      <arglist>(WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeChildNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a6513443612d2456a69610e744bc629f4</anchor>
    +      <arglist>(WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WTreeNode * &gt; &amp;</type>
    +      <name>childNodes</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>aa0f780835958f27b08fed66c1e4461e7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>displayedChildCount</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a1a2bec02861430af0a8b80dd9e84324e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChildCountPolicy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a5a625b5a94386386dabd36277d5f7c1b</anchor>
    +      <arglist>(ChildCountPolicy policy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ChildCountPolicy</type>
    +      <name>childCountPolicy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a970b7d1e5df403888e7c44750bf4b149</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setImagePack</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>aff37a6152a8195dd9b2a80e593d94298</anchor>
    +      <arglist>(const std::string &amp;url)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLoadPolicy</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>aaf3d613cc461f4d9d39a71cd45bd155e</anchor>
    +      <arglist>(LoadPolicy loadPolicy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isExpanded</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a948dd8443c0228268c1d75b825e66327</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectable</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a60428cfc48b2a39550efc308b38406b2</anchor>
    +      <arglist>(bool selectable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isSelectable</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a413239e83c39e46fbb7d9525ac615241</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTreeNode *</type>
    +      <name>parentNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>abebb8dd92b2470901a3c9fb36e315c62</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setNodeVisible</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a63d37fa9bb5a3ba8ea178b5f3737626d</anchor>
    +      <arglist>(bool visible)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChildrenDecorated</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a5594488be1f49052915b4ecc840f44ce</anchor>
    +      <arglist>(bool decorated)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInteractive</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a85e7232623373ad75a5b5bbdbbf734ca</anchor>
    +      <arglist>(bool interactive)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>expand</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a10e99f9db96ec2fc500927a5d50caafe</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>collapse</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a43ed4fd057fac436d93bda4a6d1de7dd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>expanded</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>adecb58d1334ac18d7e78e6e4d8e2e0e4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WMouseEvent &gt; &amp;</type>
    +      <name>collapsed</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a27b27bfa04d5414e058427ecfdc82309</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; bool &gt; &amp;</type>
    +      <name>selected</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a23a35eefeeda38afbca4cf59404c4806</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WTreeNode</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a3e414fb2edce78eab5431db82aefed15</anchor>
    +      <arglist>(WTreeNode *parentNode=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WTableCell *</type>
    +      <name>labelArea</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>ae87e7590a98a4ccdbec6aeb49fd14025</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>populate</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a9ab70c6020dbd9ea3204c625029a7a1b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>bool</type>
    +      <name>populated</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>aee388605958559d124616ce9dbfc7df5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>expandable</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a4f19826594b5b080b0a436c474c31f61</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderSelected</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>ae4bb84bf91002f80941d2e890cab12cd</anchor>
    +      <arglist>(bool selected)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>std::string</type>
    +      <name>imagePack</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>ab79f1baedef8134c2d25b22a988f5c80</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>descendantRemoved</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>aea7b6b2ba3d170fa57dfb7451f878a5d</anchor>
    +      <arglist>(WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>descendantAdded</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>abfa02369517d2cc7cd3ee1d3839740e3</anchor>
    +      <arglist>(WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>doExpand</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a7cf5f24e57d19df0b8e01638c75c4bf7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>doCollapse</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a98cc68ceed98e3e98145fe5a8129c066</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>undoDoExpand</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>ac0d0cbdfb0c8c0d493e70a6b40b40fc2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>undoDoCollapse</name>
    +      <anchorfile>classWt_1_1WTreeNode.html</anchorfile>
    +      <anchor>a67cd4a5c8169919e1e1feadc1cab7ae3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTreeTable</name>
    +    <filename>classWt_1_1WTreeTable.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTreeTable</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>ab6224d3b98077147c7c6ce96d167e407</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addColumn</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>a2ec7655241ad65f99c114d6ed37b49a1</anchor>
    +      <arglist>(const WString &amp;header, const WLength &amp;width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>abcc40b31b73d964c025e2891224e081f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTreeRoot</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>a1a9de525c82f7f6aadb9842f2bcf46a0</anchor>
    +      <arglist>(WTreeTableNode *root, const WString &amp;header)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTreeTableNode *</type>
    +      <name>treeRoot</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>ad2df80ef5a3243b7b695946f5fbd8614</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTree</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>a7a886c66febb9c32c0b044b6f5cffb0a</anchor>
    +      <arglist>(WTree *tree, const WString &amp;header)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WTree *</type>
    +      <name>tree</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>a4c9a1d8257e8f24d164708f3c2738de3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLength</type>
    +      <name>columnWidth</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>afdb33da75ddd2eb71272a11b445ed346</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WText *</type>
    +      <name>header</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>af20309bf1c221d907a72823595766af8</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>headerWidget</name>
    +      <anchorfile>classWt_1_1WTreeTable.html</anchorfile>
    +      <anchor>afa8204f217f77725f7e243ece08e5ddb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTreeTableNode</name>
    +    <filename>classWt_1_1WTreeTableNode.html</filename>
    +    <base>Wt::WTreeNode</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTreeTableNode</name>
    +      <anchorfile>classWt_1_1WTreeTableNode.html</anchorfile>
    +      <anchor>ad5c6c8ff8d8d83d386271594444a2691</anchor>
    +      <arglist>(const WString &amp;labelText, WIconPair *labelIcon=0, WTreeTableNode *parentNode=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnWidget</name>
    +      <anchorfile>classWt_1_1WTreeTableNode.html</anchorfile>
    +      <anchor>a136a48e8cda5e0abbfd0e0d8cf008b36</anchor>
    +      <arglist>(int column, WWidget *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>columnWidget</name>
    +      <anchorfile>classWt_1_1WTreeTableNode.html</anchorfile>
    +      <anchor>a5e9f7b5afb4d92175a3d6307727eee81</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertChildNode</name>
    +      <anchorfile>classWt_1_1WTreeTableNode.html</anchorfile>
    +      <anchor>a7766f176f956e4fede258d86e208c6cd</anchor>
    +      <arglist>(int index, WTreeNode *node)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setTable</name>
    +      <anchorfile>classWt_1_1WTreeTableNode.html</anchorfile>
    +      <anchor>aafe8ea0231f569644ee9e7a54deb13a9</anchor>
    +      <arglist>(WTreeTable *table)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WTreeView</name>
    +    <filename>classWt_1_1WTreeView.html</filename>
    +    <base>Wt::WAbstractItemView</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTreeView</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>aa6555aa2d53557340824faa314b318f2</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnFormat</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a8b8bfc22f30f0edfe8fe2de37a5fefc4</anchor>
    +      <arglist>(int column, const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>columnFormat</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>aab731f1046a7c0b602678171af9dc33e</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setExpanded</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a49566dd5cc8d1d0d95bad4783dd4e11a</anchor>
    +      <arglist>(const WModelIndex &amp;, bool expanded)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isExpanded</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a48eac450ec46ac1eea41822bfd227e9b</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>collapse</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>abe1b839fc999634806df030301422411</anchor>
    +      <arglist>(const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>expand</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a03cd862e9c5dbbfbc126ac627b48592a</anchor>
    +      <arglist>(const WModelIndex &amp;index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>expandToDepth</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>add40d3e05352ae094f6fe2b9c879c2c7</anchor>
    +      <arglist>(int depth)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRootIsDecorated</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>aef8576ebdf2089edc259362a15e2f750</anchor>
    +      <arglist>(bool show)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>rootIsDecorated</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>ac6e70d3de6623882f70219934d5f8253</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumn1Fixed</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>ac6d50ab57d086e67a2463f8a6a43e605</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>column1Fixed</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a403dade7876fdd7e44600738660e17f8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a482314306c8404d7ed941fd986e32623</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex &gt; &amp;</type>
    +      <name>collapsed</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a8d014f2cd6637f5f842d7fe2fff00418</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; WModelIndex &gt; &amp;</type>
    +      <name>expanded</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a96586671660b0e81cc2ae99fff284909</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a390300f766472476e6a0df5aefaa2ef0</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnWidth</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a33ba5111945bc0ec4745a536d52adec5</anchor>
    +      <arglist>(int column, const WLength &amp;width)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setAlternatingRowColors</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a48f74194ae6bd63c08a6ff76ecb3e39c</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setRowHeight</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a849f805206bd1bc83e6bc411f208031d</anchor>
    +      <arglist>(const WLength &amp;rowHeight)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHeaderHeight</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a2367f47b0c80ec909d8e4d7626955a83</anchor>
    +      <arglist>(const WLength &amp;height, bool multiLine=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnBorder</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>adba2dc39faa8d427e8adb241b067ebf2</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setColumnHidden</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a3c9e6152cb98150b6be007b3bf4d829b</anchor>
    +      <arglist>(int column, bool hidden)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>pageCount</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a807eeda7ff799fb5b711e52acd93b6bd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>pageSize</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>abc0ec2c9c5a82d0389900c3a3082ac91</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>currentPage</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a9a62d0d6e27692c9231165ae9599c85b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setCurrentPage</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a09a5d3d9e37fd502e56edbb0c387d21c</anchor>
    +      <arglist>(int page)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WTreeView.html</anchorfile>
    +      <anchor>a11f8eb2390ce4585b99344e540fef8b1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WValidationStatus</name>
    +    <filename>classWt_1_1WValidationStatus.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WValidationStatus</name>
    +      <anchorfile>classWt_1_1WValidationStatus.html</anchorfile>
    +      <anchor>aa40ae47e0987dc7e1f0261372ca43ca5</anchor>
    +      <arglist>(WFormWidget *field, WWidget *validStateWidget=0, WWidget *invalidStateWidget=0, WWidget *invalidEmptyStateWidget=0, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>valid</name>
    +      <anchorfile>classWt_1_1WValidationStatus.html</anchorfile>
    +      <anchor>a66ee198ccdd2eb5d0de620fc6326c2e2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; bool &gt; &amp;</type>
    +      <name>validated</name>
    +      <anchorfile>classWt_1_1WValidationStatus.html</anchorfile>
    +      <anchor>a463b399e7c6d20d7bed88d60290d1fd0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WValidator</name>
    +    <filename>classWt_1_1WValidator.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="enumeration">
    +      <name>State</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a638a1feefca259ea2f806a8add2d18a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Invalid</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a638a1feefca259ea2f806a8add2d18a3aa5bf750faac5f1ca6fb58c8de97bac51</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>InvalidEmpty</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a638a1feefca259ea2f806a8add2d18a3a5e6ab5b841b3066a2d228b9ce7f4f447</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Valid</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a638a1feefca259ea2f806a8add2d18a3a1bc2acb7589ab9e3050867ebfc32dda3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WValidator</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a81e355ed7c38c9e5de934d3994b3905c</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WValidator</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a4c4a0b7bcb4c543812b1500c748ab99b</anchor>
    +      <arglist>(bool mandatory, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WValidator</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>ad7f5599879175c310dac4b76331d7ff6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMandatory</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a6f7993c51a0088b927d7c9aa516efabb</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isMandatory</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a8de913a10b24231264de5cc082c0d2fd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInvalidBlankText</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>abafa7c49159d5475a8ec6eff1fef8c17</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WString</type>
    +      <name>invalidBlankText</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a3518bfa063c9155c99e5ca3990465d35</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>fixup</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a8766794c9600455d35cafb1bd9af1eb9</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>afce53cf7c8fa1692234df0538163b4e0</anchor>
    +      <arglist>(WString &amp;input) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>createExtConfig</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>acabfaf05f2346019f3f18f6c299bb384</anchor>
    +      <arglist>(std::ostream &amp;config) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>javaScriptValidate</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a5141a6c178329e6d26faad71e7bf26aa</anchor>
    +      <arglist>(const std::string &amp;jsRef) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>inputFilter</name>
    +      <anchorfile>classWt_1_1WValidator.html</anchorfile>
    +      <anchor>a1ca29b7eaabf4c1655200ec382a84554</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WVBoxLayout</name>
    +    <filename>classWt_1_1WVBoxLayout.html</filename>
    +    <base>Wt::WBoxLayout</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WVBoxLayout</name>
    +      <anchorfile>classWt_1_1WVBoxLayout.html</anchorfile>
    +      <anchor>a5ef82f7bc3fdaa19498a38245117dd93</anchor>
    +      <arglist>(WWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WVectorImage</name>
    +    <filename>classWt_1_1WVectorImage.html</filename>
    +    <base>Wt::WPaintDevice</base>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>rendered</name>
    +      <anchorfile>classWt_1_1WVectorImage.html</anchorfile>
    +      <anchor>aaef996920d0cad986a35780811a2121e</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WViewWidget</name>
    +    <filename>classWt_1_1WViewWidget.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WViewWidget</name>
    +      <anchorfile>classWt_1_1WViewWidget.html</anchorfile>
    +      <anchor>a3537a36594d1a8135d63027d6679f279</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>update</name>
    +      <anchorfile>classWt_1_1WViewWidget.html</anchorfile>
    +      <anchor>a7dcbc05eb15c4d4168141871d5908e37</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WViewWidget.html</anchorfile>
    +      <anchor>aa7865b89645f229c4dbfc6eb9ddf46d4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WViewWidget.html</anchorfile>
    +      <anchor>a3481f6ab6f0db72c4489f31216b40c8b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>renderView</name>
    +      <anchorfile>classWt_1_1WViewWidget.html</anchorfile>
    +      <anchor>af7df983ff1ca6e1368579f254b85fcd6</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WStaticModelView</name>
    +    <filename>classWt_1_1WStaticModelView.html</filename>
    +    <templarg></templarg>
    +    <base>Wt::WViewWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStaticModelView</name>
    +      <anchorfile>classWt_1_1WStaticModelView.html</anchorfile>
    +      <anchor>af3f267902e8d9693b819fa87966edb12</anchor>
    +      <arglist>(Renderer f, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>WWidget *</type>
    +      <name>renderView</name>
    +      <anchorfile>classWt_1_1WStaticModelView.html</anchorfile>
    +      <anchor>a07efb77007dc9311e47ee15244770426</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WStaticModelView&lt; Renderer &gt; *</type>
    +      <name>makeStaticModel</name>
    +      <anchorfile>classWt_1_1WStaticModelView.html</anchorfile>
    +      <anchor>aa2d5588b502ceb66b37ffee8a564cbaa</anchor>
    +      <arglist>(Renderer f, WContainerWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WVirtualImage</name>
    +    <filename>classWt_1_1WVirtualImage.html</filename>
    +    <base>Wt::WCompositeWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WVirtualImage</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a5e4388b3757e5466fee84779dc8eddde</anchor>
    +      <arglist>(int viewPortWidth, int viewPortHeight,::int64_t imageWidth,::int64_t imageHeight, int gridImageSize=256, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WVirtualImage</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>ae579c6380dddbc8a6390344e21c5e8bd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>redrawAll</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>ac77880df77641e2778667d89135bd8c5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableDragging</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a967961b3744ce70b0dcfffd2dd4e5582</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scroll</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a7dd6ab6e23b244782bb0fbd5901ac60c</anchor>
    +      <arglist>(::int64_t dx,::int64_t dy)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>scrollTo</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a46e5cbf991d6859b5599d8c8f3cea416</anchor>
    +      <arglist>(::int64_t x,::int64_t y)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>imageWidth</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a9b8314a512c044710c4af57b58213988</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>imageHeight</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a272537cd717654a5c85eb6607fee801f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resizeImage</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a1fb1f0da2c5ddcf6ae332d7cd4ad2cee</anchor>
    +      <arglist>(::int64_t w,::int64_t h)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>viewPortWidth</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>ab2820de18d8a323c53b1cc7a7cf09486</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>viewPortHeight</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a31e6291cbafcd176aa55e43d5b9fa9c6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>gridImageSize</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a4a222f67c8e0b285f4a0f5fb646ef09a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>currentTopLeftX</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>aaef04959b8dc6ca5231ee7c287ec94c3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>currentTopLeftY</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a9901120973d8aa95f18a00a605355c47</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>currentBottomRightX</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a54c2781f8f2164ab2b594a047f3a9889</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::int64_t</type>
    +      <name>currentBottomRightY</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a020cfedaa6a56f7f6d53a552c6a278cc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; ::int64_t,::int64_t &gt; &amp;</type>
    +      <name>viewPortChanged</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a5b5850535038ea4a505d55cadc6a8446</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const ::int64_t</type>
    +      <name>Infinite</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>ac2657f31a609a69b48631d26e0bd0b81</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WImage *</type>
    +      <name>createImage</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>a716ef0af4754b64e4e3fe2e45a4deb63</anchor>
    +      <arglist>(::int64_t x,::int64_t y, int width, int height)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WResource *</type>
    +      <name>render</name>
    +      <anchorfile>classWt_1_1WVirtualImage.html</anchorfile>
    +      <anchor>af95a08b61b3f400f3b04d80ac99fb3f7</anchor>
    +      <arglist>(::int64_t x,::int64_t y, int width, int height)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WVmlImage</name>
    +    <filename>classWt_1_1WVmlImage.html</filename>
    +    <base>Wt::WVectorImage</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WVmlImage</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a547c5fdbf7f930bd009c5c9914f6d621</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChanged</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>aa8c6031722369b629abaed4833640960</anchor>
    +      <arglist>(WFlags&lt; ChangeFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawArc</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>ab05d4750a70245abd57e8445ba60be87</anchor>
    +      <arglist>(const WRectF &amp;rect, double startAngle, double spanAngle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawImage</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>aa39e9778fd0fa5590cf260a2c05f2bc1</anchor>
    +      <arglist>(const WRectF &amp;rect, const std::string &amp;imgUri, int imgWidth, int imgHeight, const WRectF &amp;sourceRect)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawLine</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a5b9e6dd443df585739e592d9c44c33a7</anchor>
    +      <arglist>(double x1, double y1, double x2, double y2)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawPath</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>abac40c8efa9451f316dbb8833ccd4fe6</anchor>
    +      <arglist>(const WPainterPath &amp;path)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawText</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>abefca902cbbe4c12c68e4b695b373458</anchor>
    +      <arglist>(const WRectF &amp;rect, WFlags&lt; AlignmentFlag &gt; flags, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>init</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>aeac96ec7f8cc39297a742f6ec27cdcbc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>aca56f985764bb1329194fca36fe7d9d7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>paintActive</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a0dd0860fb63b4595d29a6762bf6b9495</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>rendered</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a23ce9cb35d2b31996499580bfe4a3cbd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>ab0f915f7ee84ab54ddbaba46988195ed</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a22c372a363aaa329cf27c55fcc45ce5f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WPainter *</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>abc195c5bedbfda6102c4c894dce4b506</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPainter</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>a6d77e2234e53de70423d0c3be077154f</anchor>
    +      <arglist>(WPainter *painter)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1WVmlImage.html</anchorfile>
    +      <anchor>ac6d73edf2f6ada53bd9220295c317b45</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WWebWidget</name>
    +    <filename>classWt_1_1WWebWidget.html</filename>
    +    <base>Wt::WWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WWebWidget</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a83a1f4f3ec578e63ac12be555657d665</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPositionScheme</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ad4258f03ed3dcadc71b4f2217f4fc76a</anchor>
    +      <arglist>(PositionScheme scheme)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual PositionScheme</type>
    +      <name>positionScheme</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a088c12ff7345acb1e028192c399f072c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setOffsets</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ab0cd0d77586b275af9bbab2cd5e41c0e</anchor>
    +      <arglist>(const WLength &amp;offset, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>offset</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ab1f5e123a5c110da277cbe91645cb7ee</anchor>
    +      <arglist>(Side s) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ae1b84e31581405358b6d57ec14505234</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a4187ef41415521e545106c970c2679f2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a7321103dca90574bbc3ac6ea9a91ccff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMinimumSize</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a19abf65cadc0b761b9405157e4b3dfc1</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>minimumWidth</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af7bcbca473c81fdba308d0f230bb30ad</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>minimumHeight</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>afc7317102a63be41ffa390ee5ed5f964</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMaximumSize</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>aefc1760ce369631bb332b244a4ec8503</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>maximumWidth</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>abe3382f250f11a12f76782991ac5b6d1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>maximumHeight</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>adb6f0acea854671ef901c070ca632678</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setLineHeight</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a3e21ba603bd2b577512938a90d222c13</anchor>
    +      <arglist>(const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>lineHeight</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>aeb2aa5ba892f8a17bee435312d04777d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setFloatSide</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a98310fe1bfd94010bd5c613f28778fca</anchor>
    +      <arglist>(Side s)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Side</type>
    +      <name>floatSide</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>adbacc8da47aa64cc177b4d2aac0c41be</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setClearSides</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af6e241a53dba62acf2eebaee1a040ddf</anchor>
    +      <arglist>(WFlags&lt; Side &gt; sides)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; Side &gt;</type>
    +      <name>clearSides</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a09c1246a2d6b7137b6ac5042ace97157</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setMargin</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a07719d06da0dd17af2381c663e8fb0b7</anchor>
    +      <arglist>(const WLength &amp;margin, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>margin</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a2c0381fd3e59c8d84da23fe6af564725</anchor>
    +      <arglist>(Side side) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ad49fd69557c2889905878e1ecfd72a3f</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>hiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a0ba2f0668948e568a5c737e10c215af0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>abf00d84015803f7553c9e6650dc10bd4</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a594cbc1789cb8e2123bc5d968aa320ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isVisible</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a5d78412910dc5c876db09371d8a423e8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a0d73f278ece864ab5322e92ff5f6de6c</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isDisabled</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a811c383ceedd1ea956f4085761b97628</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a2deb694af3f3ab8f65b91e40b89342ce</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setPopup</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a783f46384456e792ead27a613f63a900</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isPopup</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af81cf5fbd4bd92ba81ffcad303355d2c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setInline</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a73c0244d363cd2f8bd4814fe1ebee2b1</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>isInline</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a00435f54c71b074785ee25fa955fbf27</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setDecorationStyle</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a0c22f849e8e6ab8b1e9b9353e5868294</anchor>
    +      <arglist>(const WCssDecorationStyle &amp;style)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WCssDecorationStyle &amp;</type>
    +      <name>decorationStyle</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>aee0157eb927635094425c6f91cc7bd16</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a6fd43dced1a62f7e79bc3522eeb16216</anchor>
    +      <arglist>(const WString &amp;styleClass)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ae867729c36e0976e5e5ee295f1c40d48</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addStyleClass</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a013767da45b8996b3d52bf98ee9d4aae</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>removeStyleClass</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a75378e5d43822dc93eb1d6a23f91bdcd</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setVerticalAlignment</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a4b69458117dbeed309fc3109e4789125</anchor>
    +      <arglist>(AlignmentFlag alignment, const WLength &amp;length=WLength())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual AlignmentFlag</type>
    +      <name>verticalAlignment</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ad345daea37cc9abc5cb2cbb1b554bc26</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLength</type>
    +      <name>verticalAlignmentLength</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>aeda559ae51111ba51a70be86c6c4fdfe</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a4d676bbb5d54bd5bf5ba1edff996800d</anchor>
    +      <arglist>(const WString &amp;toolTip)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a7b851debbfba51f0b9a011ca42b08c8c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a8d0b7883f2f77a0c24b8fb911a8086a8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setAttributeValue</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af105d1bda14a0b85d486fa9ffb77f445</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WString</type>
    +      <name>attributeValue</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a036ebd10e69ad7daf2c1d1533d3ef8bf</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>afa530ff48b788bb6cd6ed24ee2f445d4</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>javaScriptMember</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ae4fcc0c1a9842f7658f2725b9a3f67ad</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>callJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ac71ff33efc989bbcc0e92bb8b95138a9</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;args)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a9204a57ea6fb213be5845c01007bb944</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>loaded</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a31fa118eaced94d9ea8de9f9f407db40</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setTabIndex</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ab77c624abc340f904e34b343dcc719ca</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>tabIndex</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a68a561600cdc65adf189c1ffef45f26b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setId</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a7e7bbac438e2535359085880144b0456</anchor>
    +      <arglist>(const std::string &amp;id)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>find</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a21435f5f3fa9f70c3948a05046f90b92</anchor>
    +      <arglist>(const std::string &amp;name)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setSelectable</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a5975750206b667b0fe84a803889e0771</anchor>
    +      <arglist>(bool selectable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const std::string</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ad15b688428389cfd4b1b67e574ff0aa1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLoadLaterWhenInvisible</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a76640728285560f894c1235968c139f2</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WWidget * &gt; &amp;</type>
    +      <name>children</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a6f32718bcdfa546f012c795f80f319e3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isRendered</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af08f5d8edb83b73aef3a93ef446d3231</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>escapeText</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a94abba3bda8fc934ae86db54c577b428</anchor>
    +      <arglist>(const WString &amp;text, bool newlinesToo=false)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string &amp;</type>
    +      <name>escapeText</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a3c76a9fa4dee8088e16f07506146fc29</anchor>
    +      <arglist>(std::string &amp;text, bool newlinestoo=false)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static bool</type>
    +      <name>removeScript</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a6192d820e2df2e27b2878976dac4161d</anchor>
    +      <arglist>(WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>jsStringLiteral</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>af9dc9dcb0eb0ba2d740645c9908694d0</anchor>
    +      <arglist>(const std::string &amp;v, char delimiter= &apos;\&apos;&apos;)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>aa9655ae1c50b9c979b6fe93f9d0064d3</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>a2893433f4aa1d6775875f1ebddd7c5ba</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>doJavaScript</name>
    +      <anchorfile>classWt_1_1WWebWidget.html</anchorfile>
    +      <anchor>ac3792281716514123befa662274dc008</anchor>
    +      <arglist>(const std::string &amp;javascript)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WWidget</name>
    +    <filename>classWt_1_1WWidget.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WWidget</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>acbe32dd454131720fa9712bc866efb4b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>parent</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a3461e31818c4d2f516641bdaf508312a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setPositionScheme</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ae15ffe92fdc5c394013d61b5bebb2f11</anchor>
    +      <arglist>(PositionScheme scheme)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual PositionScheme</type>
    +      <name>positionScheme</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aea3a7c21d936d34f28b42143aba4edd5</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setOffsets</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a0b60b3e6d868689071fe3f828d550ae2</anchor>
    +      <arglist>(const WLength &amp;offset, WFlags&lt; Side &gt; sides=All)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>offset</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a08e07b6d0ca355a3fe2c7dead3dde228</anchor>
    +      <arglist>(Side side) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a5bebad8f1582b8bebf01a9ed0ee11972</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a3f423e20a9b0792c1bc3d52899065e82</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a9454454144fe3729378c87c3b90372b4</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setMinimumSize</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a092c7d1ecfde7f004ef120389d91775d</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>minimumWidth</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>af5847c8028f501b51d74184107ccdde6</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>minimumHeight</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a411b6bbac918eeb19946d65c4352beb1</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setMaximumSize</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>af023064cf8007bda6baeb5277d79bbd9</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>maximumWidth</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a733c78b3d54dc355adf6ee05c69bf219</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>maximumHeight</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>af2f6d29c4e5a88bdd12a180e125490cd</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>positionAt</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aef120ad789aec5ee406c2e312efeb4b5</anchor>
    +      <arglist>(const WWidget *widget, Orientation orientation=Vertical)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setLineHeight</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a0763f0e672e5cf673141405dc8e796bb</anchor>
    +      <arglist>(const WLength &amp;height)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>lineHeight</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a162f32ce7482e7c3121d18585555909a</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setFloatSide</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a2915d313e6934173c087bf8212024289</anchor>
    +      <arglist>(Side s)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual Side</type>
    +      <name>floatSide</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a78041b1bcd9b811fa4771d19005a585a</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setClearSides</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a1919e2e3628bb4e4b74517605b5062c5</anchor>
    +      <arglist>(WFlags&lt; Side &gt; sides)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WFlags&lt; Side &gt;</type>
    +      <name>clearSides</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a7657fb67f7ec42b7374b7f64f85e6030</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setMargin</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aa4f27573eae7875d0fc538e37bc191a0</anchor>
    +      <arglist>(const WLength &amp;margin, WFlags&lt; Side &gt; sides=All)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>margin</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a8b7c40b966518e22543d290229fbd29f</anchor>
    +      <arglist>(Side side) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setHiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a8cd985ab1dfcee828c7b6189a7e052a5</anchor>
    +      <arglist>(bool enabled)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>hiddenKeepsGeometry</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac556bf0e3087b238a98f25b77b9d529c</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a11bd299d9afd0d83f17ac454c85c43a2</anchor>
    +      <arglist>(bool hidden)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a76a29fd7fa9fa9a6e15e3a450f24a381</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isVisible</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a450f94dc5a28737625cdb6bde3fdc788</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setDisabled</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ae29fe35b633ec166f922419cd3ca9d96</anchor>
    +      <arglist>(bool disabled)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isDisabled</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a8c806a873adad31035122a3b465d3da2</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ae091783ebd393c04f026133069b874d3</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setPopup</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a3890a2ef04571b6d36e7468583457091</anchor>
    +      <arglist>(bool popup)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isPopup</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a29f3361a8c518dabc1251892da55dd6d</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setInline</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac78e3af143883334c82031790c87416e</anchor>
    +      <arglist>(bool inlined)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>isInline</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>afa7a21fbd173d6ee83c2aa9cc11e2ac1</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setDecorationStyle</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a091e1fb88d9bbd8818d061af43c618b4</anchor>
    +      <arglist>(const WCssDecorationStyle &amp;style)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WCssDecorationStyle &amp;</type>
    +      <name>decorationStyle</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac1833c7c01599b3733712ab0bf3c3a0a</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setStyleClass</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a4be23ecf48d5968efb5d926e38e01708</anchor>
    +      <arglist>(const WString &amp;styleClass)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WString</type>
    +      <name>styleClass</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ad5a84cacbaa1e4da97f7ba68de060330</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>addStyleClass</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>abb5949e98f47edb7db98d7b6df07a31c</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>removeStyleClass</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a3b8a35e37ef06c408f346c63a5f1aa8e</anchor>
    +      <arglist>(const WString &amp;styleClass, bool force=false)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setVerticalAlignment</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a4f911e2f62cf35c34cb603eaca0d9a3f</anchor>
    +      <arglist>(AlignmentFlag alignment, const WLength &amp;length=WLength::Auto)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual AlignmentFlag</type>
    +      <name>verticalAlignment</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a0ae4522f15e80ff00d246a19604f6c7f</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WLength</type>
    +      <name>verticalAlignmentLength</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a9faaa6c2b46c0adf6606ad1496c4e52b</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setToolTip</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a7a7d40a35444c397b17d831996720557</anchor>
    +      <arglist>(const WString &amp;text)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WString</type>
    +      <name>toolTip</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ae67a8d8c573e44f02ab165fe80b2eec6</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a15e1efb1c2e1030a3ad9565ef7fb0e15</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>jsRef</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aa2b7078b3b43d53a85e5244b45d504f7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setAttributeValue</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ad629ef6b7b9bc84999ff31dc0f2f3a12</anchor>
    +      <arglist>(const std::string &amp;name, const WString &amp;value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WString</type>
    +      <name>attributeValue</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a44679c4df92658912866d5a0469bbe95</anchor>
    +      <arglist>(const std::string &amp;name) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ab876fc1b7d2e4e5dfc631e380d406ae2</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>javaScriptMember</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a78a539cfd49a8927a196de66362c37e9</anchor>
    +      <arglist>(const std::string &amp;name) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>callJavaScriptMember</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac9839a243ba5f98e7962d1c0dfc20813</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;args)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a1ee433705523b2b79c4c3539e0852c92</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>loaded</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a1aa5c2496715bb582a584ebcdd97a6d0</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setTabIndex</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aeca7e1e9852d83067b3834078378f22d</anchor>
    +      <arglist>(int index)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>tabIndex</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac8e874a86853e3e230e2cee1a7a153c4</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>acceptDrops</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aebee4b24e8128c08ae4aa3682adf6d8f</anchor>
    +      <arglist>(const std::string &amp;mimeType, const WString &amp;hoverStyleClass=WString())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>stopAcceptDrops</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a89e4d70592dd34c277923cb793f73b66</anchor>
    +      <arglist>(const std::string &amp;mimeType)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setId</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a93ff9d1ca04e733cd54cd40a06775f7e</anchor>
    +      <arglist>(const std::string &amp;id)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WWidget *</type>
    +      <name>find</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a96e9c88d9ed79acccf3edf2bb00c0126</anchor>
    +      <arglist>(const std::string &amp;name)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>htmlText</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aaae07190fb97d856149226ea315a75d0</anchor>
    +      <arglist>(std::ostream &amp;out)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>setSelectable</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a3ccd308793bbf124aa2aeebfb1b4f42e</anchor>
    +      <arglist>(bool selectable)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isRendered</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a20624c7c7cdd8b0dd3c3b51ed36c3bb1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hide</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a0825c3ccbd4999afc1a88fafa6aa6fc7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>show</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a52dcef5a385ddfa0a8c3e6c20000f181</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enable</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ae6935d8baca9d37dd1d080b4383da87c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disable</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a5f68ea0ab29adfb8e559153fca281e03</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>layoutSizeAware</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a4b2f59f14feb7ce5e7d8d83d48ed5f35</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static WString</type>
    +      <name>tr</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>aa651f107ec7cf080faef6c435705fc44</anchor>
    +      <arglist>(const char *key)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>setLayoutSizeAware</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a4f83592912a7f8fa4fd35dadde78ee74</anchor>
    +      <arglist>(bool sizeAware)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>layoutSizeChanged</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>af432588db3d599f89b54121f2ede8d63</anchor>
    +      <arglist>(int width, int height)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>WWidget</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a95c22589beb69717356b859bbfd20479</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>dropEvent</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac436c4b99710b9199a9df3a8b4151a69</anchor>
    +      <arglist>(WDropEvent dropEvent)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>enableAjax</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a919a4eaf68ff52f06f6a726d55dfb768</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxPadding</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ab4cfd6bd5bea1a6182731ec79a78792c</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>boxBorder</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a6bd6a9d01afbc4f96c4ec7dd48db9126</anchor>
    +      <arglist>(Orientation orientation) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>propagateSetEnabled</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>a2ac5699f1624b16d8ce6caf8086d6d31</anchor>
    +      <arglist>(bool enabled)=0</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WStatelessSlot *</type>
    +      <name>getStateless</name>
    +      <anchorfile>classWt_1_1WWidget.html</anchorfile>
    +      <anchor>ac7b367f664ab2b12ef79003123a17a0e</anchor>
    +      <arglist>(Method method)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::WWidgetItem</name>
    +    <filename>classWt_1_1WWidgetItem.html</filename>
    +    <base>Wt::WLayoutItem</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WWidgetItem</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>afac1f02e9f79bcc2d3584dbe0a80df77</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>a5f1319ce853b78703399d6d80748ef52</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayout *</type>
    +      <name>layout</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>aeec342fa9330656ade0094be78d5fa34</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WLayout *</type>
    +      <name>parentLayout</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>a33a7815c88694af6c9c5b214725f0c4e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WWidgetItem *</type>
    +      <name>findWidgetItem</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>a997b036f16e7667db3f8c59e310ad98c</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLayoutItemImpl *</type>
    +      <name>impl</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>ad17fab03e099007600e9d39dd017b9b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setParentWidget</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>a24ecf01aff4bc52ac0482c1c202a9bc8</anchor>
    +      <arglist>(WWidget *parent)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setParentLayout</name>
    +      <anchorfile>classWt_1_1WWidgetItem.html</anchorfile>
    +      <anchor>a5054aa92fe5d6ec40057e4d6662ae5e2</anchor>
    +      <arglist>(WLayout *layout)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="namespace">
    +    <name>Wt::Chart</name>
    +    <filename>namespaceWt_1_1Chart.html</filename>
    +    <class kind="class">Wt::Chart::WAbstractChart</class>
    +    <class kind="class">Wt::Chart::WAxis</class>
    +    <class kind="class">Wt::Chart::WCartesianChart</class>
    +    <class kind="class">Wt::Chart::SeriesIterator</class>
    +    <class kind="class">Wt::Chart::WChart2DRenderer</class>
    +    <class kind="class">Wt::Chart::WChartPalette</class>
    +    <class kind="class">Wt::Chart::WDataSeries</class>
    +    <class kind="class">Wt::Chart::WPieChart</class>
    +    <class kind="class">Wt::Chart::WStandardPalette</class>
    +    <member kind="enumeration">
    +      <name>Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gaddb678f67fbd9f374fcee0922f158c9f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa2a592919e6cbd94bf09e1259559499b5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>YAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa2e1017fdef77b4663715c3d7663a4db4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Y1Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fa4905c14eb8a164e00e48b41cfaf6f070</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Y2Axis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fadbfcf55c246aa3a385974a185f4220e3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>OrdinateAxis</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggaddb678f67fbd9f374fcee0922f158c9fae8797459bbc3e1eaba438ab4d10c0352</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AxisValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga77eb6d0cefa4a012950ea972b471b849</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MinimumValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849ada8601e8f3630aec7d16b6d4177d4986</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MaximumValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849af9110e09430355ab81d579be51ac73cb</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ZeroValue</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga77eb6d0cefa4a012950ea972b471b849af2e58ce3483a5ec496f65fb808ce72b9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>AxisScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gadfcaed8cd6ff52f5747f7df48f2eeab6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CategoryScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6aa9b1356757a7b0935c3302c32798ef14</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LinearScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6ad1c254fd10596e2565b32fd6f5967094</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LogScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6afba90921c9efb6c5131cdb1590bfa406</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DateScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6aaa627030efa552170a889d7a80a65a12</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>DateTimeScale</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ggadfcaed8cd6ff52f5747f7df48f2eeab6a97f80bcc82b9bf9299b61de12732da5c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SeriesType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga44d64e4a9d08c7ef69648f4a9c3e4053</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PointSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a6a8b53e7bfdec77f9df5e82aaf0061e8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>LineSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a2582c20d00d806d8a175e2f5c0207591</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CurveSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a805880e23c0292fb7a66b2cda2a2f5bf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>BarSeries</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga44d64e4a9d08c7ef69648f4a9c3e4053a6751dbd7ed4600a4befa967107a6dde8</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>MarkerType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga9f38f3460fb2575d5f4f1a1ac51a7db6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6aaab531f4ceaaa1893f854f4b1262636d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SquareMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a4250deb876978d5f5c3be4cc6aad8267</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CircleMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6ac14cc4eaec28c9ab096fbf7efead2660</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CrossMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a003214a00943a828becc1beb54956e80</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>XCrossMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6a4a718fdd73e4bcdc700495eb549dc386</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TriangleMarker</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9f38f3460fb2575d5f4f1a1ac51a7db6ae7ee432c7bf8189deaa453af4d14182b</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>FillRangeType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga7236e5b04bdb6f393162842982b4d1a0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0ad0c1c31f7f41394c2fd5444edc340972</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MinimumValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0a1eb3ca7c63430bd56544b9e3b962c6cf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>MaximumValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0aa321337f9f9a4d56fb1d2cafe0f359b6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ZeroValueFill</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga7236e5b04bdb6f393162842982b4d1a0a50b16db97a187f9acccdbeecf8732ff0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>ChartType</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga8d63464f873580c77508e1c0c26cbfea</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CategoryChart</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga8d63464f873580c77508e1c0c26cbfeaaebfd9bd11d1126f2db7ff891c04c29f9</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ScatterPlot</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga8d63464f873580c77508e1c0c26cbfeaa6ddab43d32242eb28831938a1e469a1f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>LabelOption</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>ga9345394a8eeda6800d8a24c5df44d983</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NoLabels</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a866d745e727785c20e31d5ea76bb58a3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Inside</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983aeb92488c13b0ccc46cddbb3445007443</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Outside</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a88861128e109b6a63e76a311dc57e408</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TextLabel</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a60df9add81425373c20fafe8c4e40b0e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>TextPercentage</name>
    +      <anchorfile>group__charts.html</anchorfile>
    +      <anchor>gga9345394a8eeda6800d8a24c5df44d983a307741727c5ef5e33efcd347a0853e50</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WAbstractChart</name>
    +    <filename>classWt_1_1Chart_1_1WAbstractChart.html</filename>
    +    <base>Wt::WPaintedWidget</base>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WAbstractChart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a7301de2a5328282d736070f2304a7e90</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>aa23d116689e939301470398df8ad5c8b</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a93ddf394943b312b3b2dc786ac5c8c72</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBackground</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>ab306a6cfecf32fd9af3785fed75bd3ab</anchor>
    +      <arglist>(const WBrush &amp;background)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WBrush &amp;</type>
    +      <name>background</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a0230d674b7112331eec05bbbff4fc87a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPalette</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a044936e6358c8efc55699effc4b946d8</anchor>
    +      <arglist>(WChartPalette *palette)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WChartPalette *</type>
    +      <name>palette</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a29320100617c0a195904c89874fcc7f3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPlotAreaPadding</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>ace6ea85014f731c7034e4215710a8a48</anchor>
    +      <arglist>(int padding, WFlags&lt; Side &gt; sides=All)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>plotAreaPadding</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a8e38496e6d583a9002d78ac782d94fd6</anchor>
    +      <arglist>(Side side) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a9ec4aba5d7c57110b7dddad8720e3aa0</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>abc4d1fac60f356360bcc5c6d51d42a69</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitleFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a908247e8c84092cd74ae50af33745f95</anchor>
    +      <arglist>(const WFont &amp;titleFont)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WFont &amp;</type>
    +      <name>titleFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>acbbd80a59c755003efdf07cb6478fece</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>paint</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>af642c65474e95ec0969906d8d31e2862</anchor>
    +      <arglist>(WPainter &amp;painter, const WRectF &amp;rectangle=WRectF()) const =0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a9e3df17843eedb5f32dc1407f115fca4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelReset</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>abf2d10492352754f92dc11cea27625cb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>modelColumnsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a12430c6057fb5d65458c4f8c9c42a034</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)=0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>modelColumnsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>ad235f839f2e46152ff41fda54a29cea7</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)=0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>modelRowsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a69ef1dd5294dbd1de8f6ada34d96af45</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)=0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>modelRowsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>a1857420ee055502380caa45446e5c0c4</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)=0</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>modelDataChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAbstractChart.html</anchorfile>
    +      <anchor>aec6e96688e308aec05cdf3bf085837e2</anchor>
    +      <arglist>(const WModelIndex &amp;topLeft, const WModelIndex &amp;bottomRight)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WAxis</name>
    +    <filename>classWt_1_1Chart_1_1WAxis.html</filename>
    +    <member kind="function">
    +      <type>Axis</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aca500256c7ec397512f872bd44e93b8d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setVisible</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a59fd4c6a79f6e3ea75f21aa44c4acfa8</anchor>
    +      <arglist>(bool visible)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isVisible</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a9ea4f463f2bd03202a7e3d7c239fd094</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLocation</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a6dab2f46117b85a4a6f439e4f194ee82</anchor>
    +      <arglist>(AxisValue value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AxisValue</type>
    +      <name>location</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ae63bf025a630b3df414322e075eb9e39</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setScale</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ab067037b83d1d663535250968a1776d8</anchor>
    +      <arglist>(AxisScale scale)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AxisScale</type>
    +      <name>scale</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ae6261e1f13aa00ebae9ea674a9001fd6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimum</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a878e20a87f7f6c5b4693bb81699c9f5b</anchor>
    +      <arglist>(double minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>minimum</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a4b0e996cd16efd42b9f5dc1a041a9819</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximum</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a64152da3f00fdeb6824d6a06e33ab346</anchor>
    +      <arglist>(double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>maximum</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a2c00b5c1acbd3fe822703983c1e0ae55</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aae563fd94b81a03cfe2662dbde2ae548</anchor>
    +      <arglist>(double minimum, double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAutoLimits</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a26b0b1b9a61fa3355a0ec224a7ff1caa</anchor>
    +      <arglist>(WFlags&lt; AxisValue &gt; locations)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; AxisValue &gt;</type>
    +      <name>autoLimits</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a04a624951a56a62987dc1671d6ec8b0e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBreak</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a159f74342b4800e5c5be11eb1b2a351b</anchor>
    +      <arglist>(double minimum, double maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelInterval</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a68b1f798fd0d9a713fac29f9d761e2a8</anchor>
    +      <arglist>(double labelInterval)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>labelInterval</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aa9ff8f73b1abb438078ab22873671659</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelFormat</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a7c37c241825af404b36916dcae9ae87b</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>labelFormat</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a7b12bfbec790d98f750cdc8d2c2f9fe2</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelAngle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>afd850eefc2beb7dffa5a637987cb1c6c</anchor>
    +      <arglist>(double angle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>labelAngle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a4876475bdfa8c5b43e02d2a1a09b20ff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setGridLinesEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a79d70190d984c7f956e44b79de0af527</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isGridLinesEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aaea983cd54dbd98bc8a8a705ccfd7768</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ab1b9dcb9e23e01ec18994712fa5e11d1</anchor>
    +      <arglist>(const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WPen &amp;</type>
    +      <name>pen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a315b1e60f44d6d736c0903eb372d5019</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setGridLinesPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aa97db5c1f1bff788382ef48b8a6d1cc2</anchor>
    +      <arglist>(const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WPen &amp;</type>
    +      <name>gridLinesPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a79345a863d57e5d4ba9682e128fbce96</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMargin</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a61a297a8d3c99e74b07e9def9ebe88a5</anchor>
    +      <arglist>(int pixels)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>margin</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>acfe54778dbcacf77818f75e2fb87ecf1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ae85436297049bd4c60a75a9cc5313e4a</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>aa2e1f143e0ee835d54ec8a0218eaac83</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitleFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ad977d82494e5922ccf6882f1378c4db6</anchor>
    +      <arglist>(const WFont &amp;titleFont)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WFont &amp;</type>
    +      <name>titleFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a15db289e565f3764b88253a92832c604</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ae9f02413691b40e95e6b7284d41dfba3</anchor>
    +      <arglist>(const WFont &amp;labelFont)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WFont &amp;</type>
    +      <name>labelFont</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>addf99b6e9c180699fb0a9370094c9f25</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCartesianChart *</type>
    +      <name>chart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>a726d6c73a28960ed0231ea4ed57e5be9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const double</type>
    +      <name>AUTO_MINIMUM</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>ad0c60f190b30ddfec321e750248c6579</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable" static="yes">
    +      <type>static const double</type>
    +      <name>AUTO_MAXIMUM</name>
    +      <anchorfile>classWt_1_1Chart_1_1WAxis.html</anchorfile>
    +      <anchor>af506429983c72703d8fadbc03a1e67d4</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WCartesianChart</name>
    +    <filename>classWt_1_1Chart_1_1WCartesianChart.html</filename>
    +    <base>Wt::Chart::WAbstractChart</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCartesianChart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>aa2c011ac373f1644b76932a81dc3b624</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WCartesianChart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ab0ebde0bbb0ff228185ae767bfd7e788</anchor>
    +      <arglist>(ChartType type, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setType</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a02775290965d59ffba03da574925e387</anchor>
    +      <arglist>(ChartType type)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ChartType</type>
    +      <name>type</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a8885469f81160cac5c1ed51fc1166265</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOrientation</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ac8638a7ae6b0d1141794d9c07336e500</anchor>
    +      <arglist>(Orientation orientation)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Orientation</type>
    +      <name>orientation</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a4d08c4528b9819bd058dd7c34daca645</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setXSeriesColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a6c954fa4ed6d73f00ee973bfe3af5ed0</anchor>
    +      <arglist>(int modelColumn)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>XSeriesColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a378a1ece6bf9acfb291cc6978c473acb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>afa4ac6588e6e2e0dd93320c3a0541d46</anchor>
    +      <arglist>(const WDataSeries &amp;series)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a23ee6f5136dc540a7968f17c15524c10</anchor>
    +      <arglist>(int modelColumn)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a5733d8d999095b6d4279f289a37eef98</anchor>
    +      <arglist>(const std::vector&lt; WDataSeries &gt; &amp;series)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDataSeries &amp;</type>
    +      <name>series</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a96cf7387ebbe867dcbdd6aad9f48e72c</anchor>
    +      <arglist>(int modelColumn)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WDataSeries &amp;</type>
    +      <name>series</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a08d7f0e90c0190496dd499609b606bc5</anchor>
    +      <arglist>(int modelColumn) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WDataSeries &gt; &amp;</type>
    +      <name>series</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a6123ce798788b747eec94c5399113a8d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAxis &amp;</type>
    +      <name>axis</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>af966d6ee6b2e43e6b26e794459005375</anchor>
    +      <arglist>(Axis axis)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WAxis &amp;</type>
    +      <name>axis</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a0ce614843d5fc81a0e262aea89a48ee1</anchor>
    +      <arglist>(Axis axis) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBarMargin</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a5419bad74246b5cb94cd224e915bfe0f</anchor>
    +      <arglist>(double margin)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>barMargin</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ae6b73b06624ce73153b64683f18f0892</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLegendEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a26c3d97f4884da079e01e7b50447a915</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isLegendEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a3b5d000b17bad325e210cbf78a28c460</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>paint</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a6fb2219936b721b8829dc7093dcb5c16</anchor>
    +      <arglist>(WPainter &amp;painter, const WRectF &amp;rectangle=WRectF()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>drawMarker</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a96ca116a1d653e582867eb8a6f7343d3</anchor>
    +      <arglist>(const WDataSeries &amp;series, WPainterPath &amp;result) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderLegendIcon</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a85b2ac77b71b9ba814ddc4c92c15ba67</anchor>
    +      <arglist>(WPainter &amp;painter, const WPointF &amp;pos, const WDataSeries &amp;series) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderLegendItem</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a3344582f6cca423f86d45375368b6d7f</anchor>
    +      <arglist>(WPainter &amp;painter, const WPointF &amp;pos, const WDataSeries &amp;series) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>mapFromDevice</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>acea610620a72eb855ff05de1665eb0fd</anchor>
    +      <arglist>(const WPointF &amp;point, Axis ordinateAxis=OrdinateAxis) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>mapToDevice</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ac040606ce4e3c4093f10d3fe65353c89</anchor>
    +      <arglist>(const boost::any &amp;xValue, const boost::any &amp;yValue, Axis axis=OrdinateAxis, int xSegment=0, int ySegment=0) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>initLayout</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a8a6ef9a21d0ea1b96ba35eeca3759426</anchor>
    +      <arglist>(const WRectF &amp;rectangle=WRectF())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>createLegendItemWidget</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a18087559767dd82ff0ff51af5e418f19</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addDataPointArea</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a7246bc96e5a29837f60bf51437c0449a</anchor>
    +      <arglist>(const WDataSeries &amp;series, const WModelIndex &amp;xIndex, WAbstractArea *area)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>paintEvent</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a3c9c7e5fd246fd0d3e0efa0cd29dd997</anchor>
    +      <arglist>(WPaintDevice *paintDevice)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual WChart2DRenderer *</type>
    +      <name>createRenderer</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a7d76b83f395ee967bf7ca1339ca1c176</anchor>
    +      <arglist>(WPainter &amp;painter, const WRectF &amp;rectangle) const </arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelColumnsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ad619b499d3bfec79614de38c682af118</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelColumnsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a7f654939c038cface6128dc2b1826f33</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelRowsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>aa2176777ed4c810101cd666cbf470699</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelRowsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a7221676a4216f5c194a7e8626543db82</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelDataChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>aeaf121941edbd310ca3d3a5d6dc4067e</anchor>
    +      <arglist>(const WModelIndex &amp;topLeft, const WModelIndex &amp;bottomRight)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>ac1c54af8fac90284c76cda536ca7f6f3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelReset</name>
    +      <anchorfile>classWt_1_1Chart_1_1WCartesianChart.html</anchorfile>
    +      <anchor>a9e2366f3bef4824c45c4bf71cf16a087</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::SeriesIterator</name>
    +    <filename>classWt_1_1Chart_1_1SeriesIterator.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~SeriesIterator</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>ac4ad700f8ef3b9b7423cd51aa4e753e5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>startSegment</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>a3770ca1184657ea89fe0ef8d3e5a63e2</anchor>
    +      <arglist>(int currentXSegment, int currentYSegment, const WRectF &amp;currentSegmentArea)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>endSegment</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>a5846a9aba05403f3d699f983be268ef4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>startSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>a3d5181f724905decd4055001968c73bd</anchor>
    +      <arglist>(const WDataSeries &amp;series, double groupWidth, int numBarGroups, int currentBarGroup)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>endSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>ab0f753351dbcde0fb4ad88f34efc5a5f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>newValue</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>a72bbbcfd1bac947d79d1ae8eb0bd3f5d</anchor>
    +      <arglist>(const WDataSeries &amp;series, double x, double y, double stackY, const WModelIndex &amp;xIndex, const WModelIndex &amp;yIndex)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentXSegment</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>abd909a460bfb6a381034d70965f7cf91</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentYSegment</name>
    +      <anchorfile>classWt_1_1Chart_1_1SeriesIterator.html</anchorfile>
    +      <anchor>a0c9b0c88e92e6431b471f014c8dec2ab</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WChart2DRenderer</name>
    +    <filename>classWt_1_1Chart_1_1WChart2DRenderer.html</filename>
    +    <member kind="enumeration">
    +      <name>AxisProperty</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a5500dea567dd1a4467fb64f4454d46cf</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Grid</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a5500dea567dd1a4467fb64f4454d46cfa2c55eeaddb8391817d196f128fee490e</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Line</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a5500dea567dd1a4467fb64f4454d46cfab7a8ec52bd2d248b48ee18352df455d6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WChart2DRenderer</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a8575df9ead3b1f7f0784efb0526c914d</anchor>
    +      <arglist>(WCartesianChart *chart, WPainter &amp;painter, const WRectF &amp;rectangle)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WChart2DRenderer</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a7ef6014443b958ebe4c7c6cb8d323512</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WCartesianChart *</type>
    +      <name>chart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>ad37b266236fce1a1e7d9b4aec2ee19b5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPainter &amp;</type>
    +      <name>painter</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a97749f8fbe5096d04f81867052f5d776</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>chartArea</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a47cee09602cdaecba45d93d54e2aeb15</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>calcChartArea</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a828a1837fd4f77058542d3c539502286</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>initLayout</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a9c5c12c08d0861f0b273a2cf1bed0e29</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>render</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a58010c9bb22a11d14e0e86f98b1ae8cb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WPointF</type>
    +      <name>map</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a6f44a9d770b6373dec092ca74d467db5</anchor>
    +      <arglist>(double xValue, double yValue, Axis axis=OrdinateAxis, int currentXSegment=0, int currentYSegment=0) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>renderLabel</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a2a102f1c1933f3a947bd5d7b83ed0ee3</anchor>
    +      <arglist>(const WString &amp;text, const WPointF &amp;pos, const WColor &amp;color, WFlags&lt; AlignmentFlag &gt; flags, double angle, int margin)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>hv</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>adb16e77f67d1894a0b9c01a8855d20eb</anchor>
    +      <arglist>(double x, double y) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>hv</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a627ffa37b530d91b986abfc005b0d97b</anchor>
    +      <arglist>(const WPointF &amp;f) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>hv</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a2185a0ad44386c4ce833a35cc11cac89</anchor>
    +      <arglist>(const WRectF &amp;f) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WRectF</type>
    +      <name>chartSegmentArea</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a07d00ec7d22d1aeac7e062a312b7831c</anchor>
    +      <arglist>(WAxis yAxis, int xSegment, int ySegment) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>prepareAxes</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a6562e97aba00b6f0cc840ec597ca30d5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderBackground</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a79d2965d652d9a97db2f599d882d4233</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderAxes</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a0d8d99805ac3cd609762ba1f569103ab</anchor>
    +      <arglist>(WFlags&lt; AxisProperty &gt; properties)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>ab9da127a1888d076ad9b448cb366be99</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>renderLegend</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>adda2794cc47b536501060170c3fb2d80</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>int</type>
    +      <name>width</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>af72fa40cd75abef0e0e3f4c2b1274dcc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>int</type>
    +      <name>height</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a4a8095308e813968f60a0373cfc0a190</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>int</type>
    +      <name>segmentMargin</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a194a5d8162047cf6a19bd0c80f392d76</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>renderAxis</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a6952edcba753fa7326fc74fa8c4a1f1d</anchor>
    +      <arglist>(const WAxis &amp;axis, WFlags&lt; AxisProperty &gt; properties)</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>int</type>
    +      <name>calcNumBarGroups</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a80d16620055def5cffa7fd059fe75344</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>iterateSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a4a2c1a148f5eb2533beb3372b08b0efe</anchor>
    +      <arglist>(SeriesIterator *iterator, bool reverseStacked=false)</arglist>
    +    </member>
    +    <member kind="variable" protection="protected">
    +      <type>AxisValue</type>
    +      <name>location_</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChart2DRenderer.html</anchorfile>
    +      <anchor>a68cd10a56eacd42c3a335589dfeabdc3</anchor>
    +      <arglist>[3]</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WChartPalette</name>
    +    <filename>classWt_1_1Chart_1_1WChartPalette.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~WChartPalette</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChartPalette.html</anchorfile>
    +      <anchor>a72e713c7e44024ebc5044bd2c67a3812</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WBrush</type>
    +      <name>brush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChartPalette.html</anchorfile>
    +      <anchor>aa7e88bb175f4f83b245076150e658e99</anchor>
    +      <arglist>(int index) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WPen</type>
    +      <name>borderPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChartPalette.html</anchorfile>
    +      <anchor>a770025513b0e83146d54011743950726</anchor>
    +      <arglist>(int index) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WPen</type>
    +      <name>strokePen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChartPalette.html</anchorfile>
    +      <anchor>ab395b91af20d3171c0cbb0abca85d967</anchor>
    +      <arglist>(int index) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual WColor</type>
    +      <name>fontColor</name>
    +      <anchorfile>classWt_1_1Chart_1_1WChartPalette.html</anchorfile>
    +      <anchor>a4968d1f875e0aedac02d7dbc312d085f</anchor>
    +      <arglist>(int index) const =0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WDataSeries</name>
    +    <filename>classWt_1_1Chart_1_1WDataSeries.html</filename>
    +    <member kind="enumeration">
    +      <name>CustomFlag</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4ad</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CustomPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4ada6682a4dea1b67172b683fc473d59a21f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CustomBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4adad8b3f8ae89163692df6439ae42ceb4ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CustomMarkerPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4adab0122c13d61736ed63c47e3ba3199eb6</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CustomMarkerBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4ada7110f833485ba6a00128c88c8d863729</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>CustomLabelColor</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aedbaa47aea3f854c7940a33052dec4adab5b6a23ce57cdeae93cb686ddf629068</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WDataSeries</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a8942e6e28fc0be6da5c1b90209f1750f</anchor>
    +      <arglist>(int modelColumn, SeriesType seriesType=PointSeries, Axis axis=Y1Axis)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBarWidth</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a05e7458bcdfbf762010c075456eea03c</anchor>
    +      <arglist>(const double width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>barWidth</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aa218a7b469ea51119802a58e7019bbf3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setType</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a8db1e060f64d2b4f44c21f96a071ff38</anchor>
    +      <arglist>(SeriesType t)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SeriesType</type>
    +      <name>type</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a1a2687abc58a59d5112ab477705262fb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModelColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aa78e8b438d3b232d2d01afbe1b8be557</anchor>
    +      <arglist>(int modelColumn)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>modelColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a4879d1bca9363faa4318236cdbcdcca0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStacked</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a14ce75bdb16de5158291f391a0c35f9b</anchor>
    +      <arglist>(bool stacked)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isStacked</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>af130953cbd981398fe5b68014e9b0476</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>bindToAxis</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a2c7bf4f065a4f2be24603cbdad3f24b6</anchor>
    +      <arglist>(Axis axis)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Axis</type>
    +      <name>axis</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>afd09e3edfa394f8d777c3dbbb4e4e6bb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCustomFlags</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>adad2a2ef9304287900207028b5255a73</anchor>
    +      <arglist>(WFlags&lt; CustomFlag &gt; customFlags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; CustomFlag &gt;</type>
    +      <name>curstomFlags</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a01dae4dea96c4716f225e7e2fd69db43</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>aac0f9d064024241b16685c196bd04818</anchor>
    +      <arglist>(const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPen</type>
    +      <name>pen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>ad59f3eab01ec14f6372768a9db40aa72</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a9271ca3b3f70822ae6582b7e28363b2e</anchor>
    +      <arglist>(const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WBrush</type>
    +      <name>brush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a10dc0b98acc9e6361a3c1c4acafc1061</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setShadow</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a683e2c2d0d4b94631be803600b519e9a</anchor>
    +      <arglist>(const WShadow &amp;shadow)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WShadow &amp;</type>
    +      <name>shadow</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a2858b618ff6fc35ec554e50d4afe3bb5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFillRange</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a9b5ea5691c650d567e26b2a7ea762462</anchor>
    +      <arglist>(FillRangeType fillRange)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>FillRangeType</type>
    +      <name>fillRange</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a4f7ef2a2113261b37a2dd90db26734ea</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMarker</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>ac8f4ae7c878df76662d92fd48e57d17d</anchor>
    +      <arglist>(MarkerType marker)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MarkerType</type>
    +      <name>marker</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>af17f1d512e9fc5b34d5ea798202fcf89</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMarkerSize</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a750caa710c08a1550059e90c32b61487</anchor>
    +      <arglist>(double size)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>markerSize</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a40847da8909c9a3c18d5804e754afdc3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMarkerPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a00efc7980ccbf435dadab50f09bbb90c</anchor>
    +      <arglist>(const WPen &amp;pen)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPen</type>
    +      <name>markerPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a82205532cfa956c14b2533c179fed581</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMarkerBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a5226ee065d0594b997916fb1f89c9113</anchor>
    +      <arglist>(const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WBrush</type>
    +      <name>markerBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a6aa5f74208d9f16b47cb5d6c912424fe</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLegendEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>adbddd50fc4ccd1608987900f0231bd50</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isLegendEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a6e4373d17cf866dcf565fa32f6ca1f6b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelsEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a0b3425ac94c831ffa6b46bb1fb354f2f</anchor>
    +      <arglist>(Axis axis, bool enabled=true)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isLabelsEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>ad3ecc17a7626d20fc03e4fa797e40028</anchor>
    +      <arglist>(Axis axis) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelColor</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a7d1ed652c7a689ecf3988fb7ee66b2cd</anchor>
    +      <arglist>(const WColor &amp;color)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WColor</type>
    +      <name>labelColor</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a828e8486bc8cfd79523dd65286b7db34</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>ac10d08d0f84d2d6c4a32311d923a3df8</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isHidden</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a1d1dbf332e11ba1c1e1aabb515039e66</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>mapFromDevice</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>ab7f746afb31c8dc138261c5113a9b937</anchor>
    +      <arglist>(const WPointF &amp;deviceCoordinates) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WPointF</type>
    +      <name>mapToDevice</name>
    +      <anchorfile>classWt_1_1Chart_1_1WDataSeries.html</anchorfile>
    +      <anchor>a2a517451b7a94600a44bf2bfc7031210</anchor>
    +      <arglist>(const boost::any &amp;xValue, const boost::any &amp;yValue, int segment=0) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WPieChart</name>
    +    <filename>classWt_1_1Chart_1_1WPieChart.html</filename>
    +    <base>Wt::Chart::WAbstractChart</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WPieChart</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>afec3ff85d3997e588acadbc2b844943a</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLabelsColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>aa40bfd3f2095106f8081596b235de4c6</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>labelsColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a9029c0a18c84558da2b36089dfb7fa3d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDataColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a3692ea22a1417e599e9358b0ed5a723d</anchor>
    +      <arglist>(int modelColumn)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>dataColumn</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a5d88b01950313351cfb38821d8c8bc2c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBrush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>af0fc06d47e2b717f1faeae80926d068c</anchor>
    +      <arglist>(int modelRow, const WBrush &amp;brush)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WBrush</type>
    +      <name>brush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a6063464c0a664943d747b344e8383b5c</anchor>
    +      <arglist>(int modelRow) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setExplode</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a4a2bfe0c147b5433d340d49351b5032c</anchor>
    +      <arglist>(int modelRow, double factor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>explode</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>ae4873101c6d49b858e665f88182b0361</anchor>
    +      <arglist>(int modelRow) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPerspectiveEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>ae36d57f4c2801cb8599a1bc99e340a24</anchor>
    +      <arglist>(bool enabled, double height=1.0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isPerspectiveEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a448d52119f7422ec0893261980e7e880</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setShadowEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a74b91c0514247ba9ea91b53fbae795f7</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isShadowEnabled</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a1738f01efbd4c3b34956d2e42096580f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStartAngle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a407707a2ab0b2c56500e35da85e619a5</anchor>
    +      <arglist>(double degrees)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>startAngle</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>af2d62e836a60f28755218921fc0e4b90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDisplayLabels</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a89324f6159e5893e1ddd368718d00e5d</anchor>
    +      <arglist>(WFlags&lt; LabelOption &gt; options)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; LabelOption &gt;</type>
    +      <name>displayLabels</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a448e016c20ffc0c15d707cf69081f5d4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>createLegendItemWidget</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>ac4e58ff2d6c698bfa4a52f6347dff654</anchor>
    +      <arglist>(int index, WFlags&lt; LabelOption &gt; options)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addDataPointArea</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a566d64a04ee31771c99e399c4cf15c4e</anchor>
    +      <arglist>(const WModelIndex &amp;index, WAbstractArea *area) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>paint</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a3929b0fc7d0b71f06809207b3d34df08</anchor>
    +      <arglist>(WPainter &amp;painter, const WRectF &amp;rectangle=WRectF()) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type>void</type>
    +      <name>paintEvent</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>ab1653eea26f873b295a7350bd0dbb9ac</anchor>
    +      <arglist>(Wt::WPaintDevice *paintDevice)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a9d29685403eb2948a01acbda7787ad5c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelReset</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a171e964386bbb9db15d0eba58ce57b68</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelColumnsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a2e84917071b1a77361375713e424c2d8</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelColumnsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a8c7417d6962e60c3d18da332a67149ba</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelRowsInserted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a7d189d82d85c24be23bac4d8ab21223a</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelRowsRemoved</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>a8c9668712e4b19567a3959227ae0f8ae</anchor>
    +      <arglist>(const WModelIndex &amp;parent, int start, int end)</arglist>
    +    </member>
    +    <member kind="function" protection="private" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>modelDataChanged</name>
    +      <anchorfile>classWt_1_1Chart_1_1WPieChart.html</anchorfile>
    +      <anchor>abf017e24778b35d2e5d4d1054147ed8b</anchor>
    +      <arglist>(const WModelIndex &amp;topLeft, const WModelIndex &amp;bottomRight)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Chart::WStandardPalette</name>
    +    <filename>classWt_1_1Chart_1_1WStandardPalette.html</filename>
    +    <base>Wt::Chart::WChartPalette</base>
    +    <member kind="enumeration">
    +      <name>Flavour</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a8df0df93e58ff3fb70f81139d3d6cec4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Neutral</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a8df0df93e58ff3fb70f81139d3d6cec4a5132fbb2958a6f5423a545381f7b8b3f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Bold</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a8df0df93e58ff3fb70f81139d3d6cec4ae7f2bdf0cd049e37a3f73bba52d89945</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Muted</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a8df0df93e58ff3fb70f81139d3d6cec4a83909df5d484323e196ad6cbaeb821b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>GrayScale</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a8df0df93e58ff3fb70f81139d3d6cec4ab5cd5ed83bb92e9c04fd0f9d513d6af0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>WStandardPalette</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>ac0b5421fc3e23365f594b3758fc33efd</anchor>
    +      <arglist>(Flavour flavour)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WBrush</type>
    +      <name>brush</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a43791f6f18e2986809d9ae8f062fc76e</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WPen</type>
    +      <name>borderPen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a94ea33302229bc7ae115567ffb9acee4</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WPen</type>
    +      <name>strokePen</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>ae8465be7c23762aef801707a48df862e</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WColor</type>
    +      <name>fontColor</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a980f085213550e9ae1365416cd385061</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WColor</type>
    +      <name>color</name>
    +      <anchorfile>classWt_1_1Chart_1_1WStandardPalette.html</anchorfile>
    +      <anchor>a76c4792de71f8a155a5108a7460b7caa</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="namespace">
    +    <name>Wt::Dbo</name>
    +    <filename>namespaceWt_1_1Dbo.html</filename>
    +    <class kind="class">Wt::Dbo::Call</class>
    +    <class kind="class">Wt::Dbo::collection</class>
    +    <class kind="class">Wt::Dbo::Exception</class>
    +    <class kind="class">Wt::Dbo::StaleObjectException</class>
    +    <class kind="class">Wt::Dbo::ObjectNotFoundException</class>
    +    <class kind="class">Wt::Dbo::NoUniqueResultException</class>
    +    <class kind="class">Wt::Dbo::FixedSqlConnectionPool</class>
    +    <class kind="class">Wt::Dbo::dbo_default_traits</class>
    +    <class kind="class">Wt::Dbo::dbo_traits</class>
    +    <class kind="class">Wt::Dbo::Dbo</class>
    +    <class kind="class">Wt::Dbo::ptr</class>
    +    <class kind="struct">Wt::Dbo::ptr_tuple</class>
    +    <class kind="class">Wt::Dbo::DirectBinding</class>
    +    <class kind="class">Wt::Dbo::DynamicBinding</class>
    +    <class kind="class">Wt::Dbo::Query</class>
    +    <class kind="class">Wt::Dbo::QueryModel</class>
    +    <class kind="class">Wt::Dbo::Session</class>
    +    <class kind="class">Wt::Dbo::SqlConnection</class>
    +    <class kind="class">Wt::Dbo::SqlConnectionPool</class>
    +    <class kind="class">Wt::Dbo::SqlStatement</class>
    +    <class kind="class">Wt::Dbo::sql_value_traits</class>
    +    <class kind="class">Wt::Dbo::FieldInfo</class>
    +    <class kind="class">Wt::Dbo::query_result_traits</class>
    +    <class kind="class">Wt::Dbo::Transaction</class>
    +    <member kind="enumeration">
    +      <name>RelationType</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga1d0ec6819b1bf5b7a88ad030b91ca564</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ManyToOne</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gga1d0ec6819b1bf5b7a88ad030b91ca564a32d7393c325724244671b18be53058fa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ManyToMany</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gga1d0ec6819b1bf5b7a88ad030b91ca564ad0bd477ec215a878e0758cce8494af24</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumeration">
    +      <name>SqlDateTimeType</name>
    +      <anchorfile>namespaceWt_1_1Dbo.html</anchorfile>
    +      <anchor>af213c090c1ccddc36d70d56e0804047f</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SqlDate</name>
    +      <anchorfile>namespaceWt_1_1Dbo.html</anchorfile>
    +      <anchor>af213c090c1ccddc36d70d56e0804047fa4ab45fdabb649cdca45c41496f7b9d19</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SqlDateTime</name>
    +      <anchorfile>namespaceWt_1_1Dbo.html</anchorfile>
    +      <anchor>af213c090c1ccddc36d70d56e0804047fae8521662683cc300eeb403a9658f9a45</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SqlTime</name>
    +      <anchorfile>namespaceWt_1_1Dbo.html</anchorfile>
    +      <anchor>af213c090c1ccddc36d70d56e0804047fab8343042a993efa1c34f906c2e3c8bfd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>id</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gac98c1f90b00ed9ce243c6412da3ac489</anchor>
    +      <arglist>(Action &amp;action, V &amp;value, const std::string &amp;name=&quot;id&quot;, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>field</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga8a2b653ff57f1459dfa2e556badd71d6</anchor>
    +      <arglist>(Action &amp;action, V &amp;value, const std::string &amp;name, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>belongsTo</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>gaf1a3f4231d2064b86eb3903003527ddd</anchor>
    +      <arglist>(Action &amp;action, ptr&lt; C &gt; &amp;value, const std::string &amp;name, int size=-1)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hasMany</name>
    +      <anchorfile>group__dbo.html</anchorfile>
    +      <anchor>ga1a086b583fb150dbd4c5b4ba92bc177f</anchor>
    +      <arglist>(Action &amp;action, collection&lt; ptr&lt; C &gt; &gt; &amp;value, RelationType type, const std::string &amp;joinName, const std::string &amp;joinId=&quot;&quot;)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Call</name>
    +    <filename>classWt_1_1Dbo_1_1Call.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Call</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Call.html</anchorfile>
    +      <anchor>a67665c4c93b3a01cb8cb526618e68e99</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Call</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Call.html</anchorfile>
    +      <anchor>ace6fa91750481408ad768a908a33a73d</anchor>
    +      <arglist>(const Call &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Call &amp;</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Call.html</anchorfile>
    +      <anchor>a2a09a231c005f06f74309ffbf97c45d6</anchor>
    +      <arglist>(const T &amp;value)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::collection</name>
    +    <filename>classWt_1_1Dbo_1_1collection.html</filename>
    +    <templarg>C</templarg>
    +    <class kind="class">Wt::Dbo::collection::const_iterator</class>
    +    <class kind="class">Wt::Dbo::collection::iterator</class>
    +    <member kind="typedef">
    +      <type>C</type>
    +      <name>value_type</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a49af50adc6d43f473f2bb45e57a77e0d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>collection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>affe4c75e050ce2a5980a10498bc5fccb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~collection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>abd01cbfac7573fafa8cc69bf58cd8cd4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>iterator</type>
    +      <name>begin</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a34580ef0194da3b8366182fbbc3b4c49</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>iterator</type>
    +      <name>end</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a4a6f1178ce470936900f269a9ccf97de</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator</type>
    +      <name>begin</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>afa7065c73dfcc8df48a89b0f7d98395e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator</type>
    +      <name>end</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a4fff6804cb98618a4709e4e7e84a13d6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>size_type</type>
    +      <name>size</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a82fd36791d677487a1c2986de0b72150</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insert</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a7b497add0d6ac2b1e098820f9ee64c93</anchor>
    +      <arglist>(C c)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>erase</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a35d046e991b3fec59af85d501fd49e51</anchor>
    +      <arglist>(C c)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Session *</type>
    +      <name>session</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>aedac567b3edd05532d53de7c0b1d7366</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; C, DynamicBinding &gt;</type>
    +      <name>find</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection.html</anchorfile>
    +      <anchor>a6b8aa118fad63539958ea8532ae37d68</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::collection::const_iterator</name>
    +    <filename>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>const_iterator</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>a6c93b191d6e60994018c6db50a6927e9</anchor>
    +      <arglist>(const const_iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>const_iterator</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>ae7ef6ea9eeeeedd4c9d98da200c069e8</anchor>
    +      <arglist>(const typename collection&lt; C &gt;::iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>af81865bea2595d6d8ce23d5f9f2f15e9</anchor>
    +      <arglist>(const const_iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>a3a3caae866c474c4ab814a0d005a23e8</anchor>
    +      <arglist>(const iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const C &amp;</type>
    +      <name>operator*</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>a40fecd3f2f3f6210e89ea0a0ee57cdba</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const C *</type>
    +      <name>operator-&gt;</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>ae79babb91d587a163c1e0645dfefd6c3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>ad14071ebbe0059c085b347fb4002f633</anchor>
    +      <arglist>(const const_iterator &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>ac21f64c65aac3c7cd223b17bd4c0ff7f</anchor>
    +      <arglist>(const const_iterator &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator &amp;</type>
    +      <name>operator++</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>a9bbb34e3847103f449fe11298372670b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const_iterator</type>
    +      <name>operator++</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1const__iterator.html</anchorfile>
    +      <anchor>a05b9118effe01b8ec5ec4778578060de</anchor>
    +      <arglist>(int)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::collection::iterator</name>
    +    <filename>classWt_1_1Dbo_1_1collection_1_1iterator.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>iterator</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a2a1fc326dc3e9fd2481474265684cd96</anchor>
    +      <arglist>(const iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~iterator</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a38e29354a59f37c21fc9256eac448ccf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>iterator &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a1721d43a4942b8d299fe339cb7998e73</anchor>
    +      <arglist>(const iterator &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>C &amp;</type>
    +      <name>operator*</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a25017c318c5ffdb74572c55b6e828b23</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>C *</type>
    +      <name>operator-&gt;</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>af857e37a583737b0c3f4688e3dbd9cc9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>ab2da9fae0c3328f405cabbe825772fa8</anchor>
    +      <arglist>(const iterator &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator!=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a1b8099919fab1947bf0d51308c016371</anchor>
    +      <arglist>(const iterator &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>iterator &amp;</type>
    +      <name>operator++</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>acc0bf632de3ea3c77d498e05c775c519</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>iterator</type>
    +      <name>operator++</name>
    +      <anchorfile>classWt_1_1Dbo_1_1collection_1_1iterator.html</anchorfile>
    +      <anchor>a7ec894ba3e75c7d69ab6545da67bf7bc</anchor>
    +      <arglist>(int)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Exception</name>
    +    <filename>classWt_1_1Dbo_1_1Exception.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Exception</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Exception.html</anchorfile>
    +      <anchor>a4c649eaf8945d2ede1fefdb871ab79cf</anchor>
    +      <arglist>(const std::string &amp;error)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::StaleObjectException</name>
    +    <filename>classWt_1_1Dbo_1_1StaleObjectException.html</filename>
    +    <base>Wt::Dbo::Exception</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>StaleObjectException</name>
    +      <anchorfile>classWt_1_1Dbo_1_1StaleObjectException.html</anchorfile>
    +      <anchor>ae8087127c860dbe411d66f8cf37049ae</anchor>
    +      <arglist>(const std::string &amp;id, int version)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::ObjectNotFoundException</name>
    +    <filename>classWt_1_1Dbo_1_1ObjectNotFoundException.html</filename>
    +    <base>Wt::Dbo::Exception</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>ObjectNotFoundException</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ObjectNotFoundException.html</anchorfile>
    +      <anchor>abc4fd1c1f513f3bc088109877490fe9d</anchor>
    +      <arglist>(const std::string &amp;id)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::NoUniqueResultException</name>
    +    <filename>classWt_1_1Dbo_1_1NoUniqueResultException.html</filename>
    +    <base>Wt::Dbo::Exception</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>NoUniqueResultException</name>
    +      <anchorfile>classWt_1_1Dbo_1_1NoUniqueResultException.html</anchorfile>
    +      <anchor>ad89a102eab9ef0d5d0d36975a6c958ab</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::FixedSqlConnectionPool</name>
    +    <filename>classWt_1_1Dbo_1_1FixedSqlConnectionPool.html</filename>
    +    <base>Wt::Dbo::SqlConnectionPool</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>FixedSqlConnectionPool</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FixedSqlConnectionPool.html</anchorfile>
    +      <anchor>a098f0ef385e4910a15bcfbaf3efc2023</anchor>
    +      <arglist>(SqlConnection *connection, int size)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual SqlConnection *</type>
    +      <name>getConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FixedSqlConnectionPool.html</anchorfile>
    +      <anchor>a31c8b46293e6779cb2f891c332d329bb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>returnConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FixedSqlConnectionPool.html</anchorfile>
    +      <anchor>a50a31bdd5d46ac676c25164653214d7e</anchor>
    +      <arglist>(SqlConnection *)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::dbo_default_traits</name>
    +    <filename>structWt_1_1Dbo_1_1dbo__default__traits.html</filename>
    +    <member kind="typedef">
    +      <type>long long</type>
    +      <name>IdType</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__default__traits.html</anchorfile>
    +      <anchor>a89170e677a75348ef6913d9f4ba496ae</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static IdType</type>
    +      <name>invalidId</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__default__traits.html</anchorfile>
    +      <anchor>a6bb01d0dc6a5bbd25481fa16b642b996</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static const char *</type>
    +      <name>surrogateIdField</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__default__traits.html</anchorfile>
    +      <anchor>a0c092c6b045f77d4fc04b5360b762b7f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static const char *</type>
    +      <name>versionField</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__default__traits.html</anchorfile>
    +      <anchor>af4da1fde75771c5f2e707827e2a885c4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::dbo_traits</name>
    +    <filename>structWt_1_1Dbo_1_1dbo__traits.html</filename>
    +    <templarg>C</templarg>
    +    <base>Wt::Dbo::dbo_default_traits</base>
    +    <member kind="typedef">
    +      <type>YourIdType</type>
    +      <name>IdType</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__traits.html</anchorfile>
    +      <anchor>afb62c3f28967b0b14b13360d47cd37dc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static IdType</type>
    +      <name>invalidId</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__traits.html</anchorfile>
    +      <anchor>aae2a13a4ca038f5bad337fbc2d70d37c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static const char *</type>
    +      <name>surrogateIdField</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__traits.html</anchorfile>
    +      <anchor>a44c5455df89390fae082aadf7cf1bc13</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static const char *</type>
    +      <name>versionField</name>
    +      <anchorfile>structWt_1_1Dbo_1_1dbo__traits.html</anchorfile>
    +      <anchor>a701b53b0401836a7c966c619f3c9656d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Dbo</name>
    +    <filename>classWt_1_1Dbo_1_1Dbo.html</filename>
    +    <templarg></templarg>
    +    <member kind="function">
    +      <type></type>
    +      <name>Dbo</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Dbo.html</anchorfile>
    +      <anchor>a8f4aadc99b20bfccbeb446ae0eac312f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>dbo_traits&lt; C &gt;::IdType</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Dbo.html</anchorfile>
    +      <anchor>ae1f77ea4a99f84e0e7561001c5e6d1fb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Session *</type>
    +      <name>session</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Dbo.html</anchorfile>
    +      <anchor>aa8ad4b9425c131f82dc257ed7ec9643e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::ptr</name>
    +    <filename>classWt_1_1Dbo_1_1ptr.html</filename>
    +    <templarg>C</templarg>
    +    <member kind="function">
    +      <type></type>
    +      <name>ptr</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a55cf9170cd012a15df206ac54178da3a</anchor>
    +      <arglist>(C *obj=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>ptr</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>ae8cdf1ba27d9b31cb03c37d16ded0776</anchor>
    +      <arglist>(const ptr&lt; C &gt; &amp;other)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~ptr</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a8ba24bdad5f3536eabe1a378d3d2bdec</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>reset</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>aa93933be1dde5b88f8220fd578e0714e</anchor>
    +      <arglist>(C *obj=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ptr&lt; C &gt; &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>af8ea4ded2103a4ec31306549cbbf74f5</anchor>
    +      <arglist>(const ptr&lt; C &gt; &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const C *</type>
    +      <name>operator-&gt;</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>afe3605c8c5d46ddd078775275fb0cbc9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const C &amp;</type>
    +      <name>operator*</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a6cabfa29875c40ce04e57c71df406e9a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>C *</type>
    +      <name>modify</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a8f9f4ec6ed2bd8febe8b62525c9576da</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator==</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a6992f0c852b65dfe6be35a88dc880e45</anchor>
    +      <arglist>(const ptr&lt; C &gt; &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>operator&lt;</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a4c283ff5e8d099e92d1ed0fcdeaecf16</anchor>
    +      <arglist>(const ptr&lt; C &gt; &amp;other) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>operator bool</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>aa8c343715b6fafc63d34f2af7419f267</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>flush</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>aaf91f5ef8bcdabfafcd9abb4182625bd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>remove</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>af4b26afebd56abc42005ef9f954d8fee</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>reread</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>abb1db71ef910748437d69bf11a04eb6e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>purge</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a7330a5220e3e926b5c084444116499a4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>dbo_traits&lt; C &gt;::IdType</type>
    +      <name>id</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a71d848cf0e8eaa1a4e01b11ae2f1e865</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>version</name>
    +      <anchorfile>classWt_1_1Dbo_1_1ptr.html</anchorfile>
    +      <anchor>a5c907971ba36fa3c5145b683abc76c76</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="struct">
    +    <name>Wt::Dbo::ptr_tuple</name>
    +    <filename>structWt_1_1Dbo_1_1ptr__tuple.html</filename>
    +    <templarg></templarg>
    +    <templarg></templarg>
    +    <templarg></templarg>
    +    <templarg></templarg>
    +    <member kind="typedef">
    +      <type>boost::tuple&lt; ptr&lt; T0 &gt;, ptr&lt; T1 &gt;,..., ptr&lt; T9 &gt; &gt;</type>
    +      <name>type</name>
    +      <anchorfile>structWt_1_1Dbo_1_1ptr__tuple.html</anchorfile>
    +      <anchor>ac3169fedc8bd6c7511501061ed099329</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::DirectBinding</name>
    +    <filename>structWt_1_1Dbo_1_1DirectBinding.html</filename>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::DynamicBinding</name>
    +    <filename>structWt_1_1Dbo_1_1DynamicBinding.html</filename>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Query</name>
    +    <filename>classWt_1_1Dbo_1_1Query.html</filename>
    +    <templarg>Result</templarg>
    +    <templarg>BindStrategy</templarg>
    +    <member kind="function">
    +      <type></type>
    +      <name>Query</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a305ffb1d93ac34cbf8d8896d29bf0eac</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Query</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a619494451d11e0e2b995a556f2599afa</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Query</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a81ef00bea19257cf6537c40af35963a9</anchor>
    +      <arglist>(const Query &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query &amp;</type>
    +      <name>operator=</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a7db5edf6192931aec96179a94adec2c9</anchor>
    +      <arglist>(const Query &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::vector&lt; FieldInfo &gt;</type>
    +      <name>fields</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a9b08b4f6aa7b59ff2fe0282eb1f07192</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>abe3f72ee7e005c62e4428c399b57d6c5</anchor>
    +      <arglist>(const T &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Result</type>
    +      <name>resultValue</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>ade63c5a681e84def0fc4d5b47c946493</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>collection&lt; Result &gt;</type>
    +      <name>resultList</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a2cf4c4bba273994e0f95839aba3201b4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>operator Result</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>abfa8d61dd48e1450daddf52be243ea5d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>operator collection&lt; Result &gt;</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a2964ddefd13eb5cb5e7a07b311dd29c3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>where</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a52b2e4305d7d48f28b1d72bd69da57e4</anchor>
    +      <arglist>(const std::string &amp;condition)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>orderBy</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a411e77f4aad2447f067b4c20153fa1ad</anchor>
    +      <arglist>(const std::string &amp;fieldName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>groupBy</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a07d81e1a0d504eca1b428b04f7855c3d</anchor>
    +      <arglist>(const std::string &amp;fields)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>offset</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a53b6b6f8181d6f75d37725bba69c33ad</anchor>
    +      <arglist>(int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt; &amp;</type>
    +      <name>limit</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Query.html</anchorfile>
    +      <anchor>a26a00ff4b0ed1e7a322966f7b9b13201</anchor>
    +      <arglist>(int count)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::QueryModel</name>
    +    <filename>classWt_1_1Dbo_1_1QueryModel.html</filename>
    +    <templarg></templarg>
    +    <base>Wt::WAbstractTableModel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>QueryModel</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a5257f4e831c2d37b826c251faf2f6e9f</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setQuery</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a9453700573e37d02a69a77ac6f57dfa5</anchor>
    +      <arglist>(const Query&lt; Result &gt; &amp;query, bool keepColumns=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const Query&lt; Result &gt; &amp;</type>
    +      <name>query</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a13e498b0e58709939dbb301316d0b163</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>addColumn</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>ad0e8bde05d5a73800d91d9d83021a4b7</anchor>
    +      <arglist>(const std::string &amp;field, const WString &amp;header, WFlags&lt; ItemFlag &gt; flags=ItemIsSelectable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>addColumn</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a1bc893df2791f0b3c063c43c373b37d8</anchor>
    +      <arglist>(const std::string &amp;field, WFlags&lt; ItemFlag &gt; flags=ItemIsSelectable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnFlags</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a6448c762a7e8e28051d21d58b600e5ca</anchor>
    +      <arglist>(int column, WFlags&lt; ItemFlag &gt; flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; ItemFlag &gt;</type>
    +      <name>columnFlags</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>aecc1fdd499c6b994829e0f7f24ead164</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addAllFieldsAsColumns</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>afa1bbf12d2b58ae91481f6d09c1dd8db</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const Result &amp;</type>
    +      <name>resultRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a70c60d0d81d1c41c1b8f29de0172935a</anchor>
    +      <arglist>(int row) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Result &amp;</type>
    +      <name>resultRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a08c73dc6b9e382a46e7bda2ffe01376a</anchor>
    +      <arglist>(int row)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>reload</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>ade0f8644e13de16e326b7d679f87add1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBatchSize</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a6871c2e7be184bfd2339320812387f81</anchor>
    +      <arglist>(int count)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>batchSize</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a6a887454166e332f401e9d9b16ff3bb7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; FieldInfo &gt; &amp;</type>
    +      <name>fields</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>aced97c84f2ecee0e1c535b6b1e132b62</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const FieldInfo &amp;</type>
    +      <name>fieldInfo</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a3b0abfbf73ae349d11f91b14d27493d4</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>fieldName</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a7dc3610b48f02f0dbbb6fadb0dee6239</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>columnCount</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>adb59d34c46c47a5aeb7606af8b882ee1</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual int</type>
    +      <name>rowCount</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>aef02f2ff4377322475c25a8c2dfaffb1</anchor>
    +      <arglist>(const WModelIndex &amp;parent=WModelIndex()) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WFlags&lt; ItemFlag &gt;</type>
    +      <name>flags</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a5d2504dad0a417346a8229faa4fa1182</anchor>
    +      <arglist>(const WModelIndex &amp;index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a459f6560b1345dc27d2d037a10e46cfe</anchor>
    +      <arglist>(const WModelIndex &amp;index, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a1ea1331951d8bcef98caec5ac291a945</anchor>
    +      <arglist>(const WModelIndex &amp;index, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>sort</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a7fcf4f35898f3808fdc650427173bf96</anchor>
    +      <arglist>(int column, SortOrder order=AscendingOrder)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>insertRows</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a1fa3a689470e89d103ae4eadd2c88ae9</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>removeRows</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>aedeb2af32798348d92ee0f7e9ec7daf8</anchor>
    +      <arglist>(int row, int count, const WModelIndex &amp;parent=WModelIndex())</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual bool</type>
    +      <name>setHeaderData</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a3dbc22ccd31427afbcb69a7fe85254ab</anchor>
    +      <arglist>(int column, Orientation orientation, const boost::any &amp;value, int role=EditRole)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual boost::any</type>
    +      <name>headerData</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>ae1db722a013d021eed3f71cb8e1995f6</anchor>
    +      <arglist>(int section, Orientation orientation=Horizontal, int role=DisplayRole) const </arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual Result</type>
    +      <name>createRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a122165a0eaad6573172181d5eeefcbe0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a76080f5f01a7404d525259b352e7829b</anchor>
    +      <arglist>(Result &amp;result)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>deleteRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1QueryModel.html</anchorfile>
    +      <anchor>a4a6c45d5b17f382f2e0927490107208b</anchor>
    +      <arglist>(Result &amp;result)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Session</name>
    +    <filename>classWt_1_1Dbo_1_1Session.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Session</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a55c41a33e862729b80837347da199b20</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Session</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>aac2f9332076fff93cde45ba1c8d15fa3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>aedcc21944ce9c2bbb2fe2b5ef1860776</anchor>
    +      <arglist>(SqlConnection &amp;connection)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setConnectionPool</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a63ab17e16c9b721c94e6e9f67c5c255d</anchor>
    +      <arglist>(SqlConnectionPool &amp;pool)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>mapClass</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a5886d450c052ae0ee15ab3c91e439229</anchor>
    +      <arglist>(const char *tableName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const char *</type>
    +      <name>tableName</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>aa2455d5d0eb1b70b5a48b15ab4f9dd36</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ptr&lt; C &gt;</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a1ffa672cd86ff1ce6d59837b05081946</anchor>
    +      <arglist>(ptr&lt; C &gt; &amp;ptr)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ptr&lt; C &gt;</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>ae255e99ca81e9642f52f20adc6fb752c</anchor>
    +      <arglist>(C *obj)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ptr&lt; C &gt;</type>
    +      <name>load</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a857714c785108435d082bcad10158e68</anchor>
    +      <arglist>(const typename dbo_traits&lt; C &gt;::IdType &amp;id)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; ptr&lt; C &gt;, BindStrategy &gt;</type>
    +      <name>find</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a637d1031ffddd4bd7bbb55a616192ac7</anchor>
    +      <arglist>(const std::string &amp;condition=std::string())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Query&lt; Result, BindStrategy &gt;</type>
    +      <name>query</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a8712ff0d59f7bb6a4d2986ad9637cc9e</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Call</type>
    +      <name>execute</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a42b1d61b66e996eff474d677a10d5b8f</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>createTables</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>aba79d84c7c91faae06f954e6d3d390ab</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>dropTables</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>a4c1fedb21e4e1cc44b182a34e8ebb4ef</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>flush</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>ab896d119f1e0fb79adffe2282b92ef17</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>rereadAll</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Session.html</anchorfile>
    +      <anchor>ad59da4e078a4e6532da698425193bbdb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::SqlConnection</name>
    +    <filename>classWt_1_1Dbo_1_1SqlConnection.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~SqlConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a23fffafcf577071d2db5c2d98ecfe60c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual SqlConnection *</type>
    +      <name>clone</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a60168581b0fdeb4a6404358455a2ac8d</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>executeSql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a2c45628057f538e8a706eff6d4d9f559</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>startTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>abcddbb27f50192113d14c66a5ca10731</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>commitTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a38ed9ab4831a0bfd8694f250813803bf</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>rollbackTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>aee5a42b2f3b452d32360a1c31f59f22d</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual SqlStatement *</type>
    +      <name>getStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>aedb8c49c71db9e7c60f6cc44a568e3ed</anchor>
    +      <arglist>(const std::string &amp;id) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>saveStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a1c0c4efecf0b2360c54e46edf1cf5f64</anchor>
    +      <arglist>(const std::string &amp;id, SqlStatement *statement)</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual SqlStatement *</type>
    +      <name>prepareStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>afbebcc0007aef36f6aa02b61f514b853</anchor>
    +      <arglist>(const std::string &amp;sql)=0</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setProperty</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a7c2b5415d52fa69321d031b65980209d</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>property</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>ace6e451d52c7c8e88daf3af8f5b578dc</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>autoincrementSql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a8c00fd64eb82999880cc813ef3866f5d</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>autoincrementType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>aff293ff5ad586e15143729eb38300ad6</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>autoincrementInsertSuffix</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>aec6a5227e676cf373f842e4d1ac75f12</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual const char *</type>
    +      <name>dateTimeType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>af1f3290a984288175c6d82d088d0636c</anchor>
    +      <arglist>(SqlDateTimeType type) const =0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual const char *</type>
    +      <name>blobType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnection.html</anchorfile>
    +      <anchor>a68a272eaafeef5e04912914f0662da39</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::SqlConnectionPool</name>
    +    <filename>classWt_1_1Dbo_1_1SqlConnectionPool.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~SqlConnectionPool</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnectionPool.html</anchorfile>
    +      <anchor>aa47e9da173d8235c5ede15d88ef21307</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual SqlConnection *</type>
    +      <name>getConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnectionPool.html</anchorfile>
    +      <anchor>abb43b5dd2db568f8433a8bc43ff6d3fc</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>returnConnection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlConnectionPool.html</anchorfile>
    +      <anchor>a8699f7ccc487b4578e64ab5e237a77be</anchor>
    +      <arglist>(SqlConnection *)=0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::SqlStatement</name>
    +    <filename>classWt_1_1Dbo_1_1SqlStatement.html</filename>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~SqlStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a15969dbb9c24b0901c3a784ea4807273</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>use</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a9b894eddd589cb481b21217b7ecad462</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a98e67c18e7a5c3da2aa9a1c02f6ba3be</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>reset</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>aa373b68969bcfa8e5c41113576b823fd</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ad8b53ca87bdef11ceceb96ab05c260b9</anchor>
    +      <arglist>(int column, const std::string &amp;value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ae05c21f97335e6ff3a8c59bf5e0727ed</anchor>
    +      <arglist>(int column, short value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>aa6b3c0525a43d0016116f8e7adad9d50</anchor>
    +      <arglist>(int column, int value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>aaf3c0b71e7af23dddac2aaae7d698f26</anchor>
    +      <arglist>(int column, long long value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a44b457f74cea0f4685af49022cb53d60</anchor>
    +      <arglist>(int column, float value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>afe5d6c654dc5f35fb5bd743d801c8cbd</anchor>
    +      <arglist>(int column, double value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a94c43852e586bbcba7077352588fe1a2</anchor>
    +      <arglist>(int column, const boost::posix_time::ptime &amp;value, SqlDateTimeType type)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a95a55b30b2411053aea47d238dbdb9ac</anchor>
    +      <arglist>(int column, const boost::posix_time::time_duration &amp;value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bind</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ae2bbddef8fd8c11687d23187920dc4da</anchor>
    +      <arglist>(int column, const std::vector&lt; unsigned char &gt; &amp;value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>bindNull</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>affff3fa371c416b6c984082d8f5dc050</anchor>
    +      <arglist>(int column)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual void</type>
    +      <name>execute</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ab8b5af1a2f9cd87e8c2aac883a3d805f</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual long long</type>
    +      <name>insertedId</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a88ab03b6ac501ce5b424746d42b2b882</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual int</type>
    +      <name>affectedRowCount</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a4a0eedff10a29eb511ebf66762b13e72</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>nextRow</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a5da3f872f0dfb742dd4c1608ad1dd550</anchor>
    +      <arglist>()=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>afca829eb43f0977b2af6ea7e0b66aad1</anchor>
    +      <arglist>(int column, std::string *value, int size)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ab531e2336cac4d92abf4af926dffbe36</anchor>
    +      <arglist>(int column, short *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a8512932928f07c81917c67ec86551685</anchor>
    +      <arglist>(int column, int *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a2d286430babae4a15f7a64ffb8b7f463</anchor>
    +      <arglist>(int column, long long *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>af22bf78fd30fb12b502a2c49251c3808</anchor>
    +      <arglist>(int column, float *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>af55759bcb42119292bf2e05308a50db8</anchor>
    +      <arglist>(int column, double *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>a82e3b42520fa813a1ad32d718fc74b3c</anchor>
    +      <arglist>(int column, boost::posix_time::ptime *value, SqlDateTimeType type)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ac34540c06e6bbe8cc29b87542e8dc726</anchor>
    +      <arglist>(int column, boost::posix_time::time_duration *value)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual bool</type>
    +      <name>getResult</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>afa7b64d1c949c39e1cddd16f8e343b42</anchor>
    +      <arglist>(int column, std::vector&lt; unsigned char &gt; *value, int size)=0</arglist>
    +    </member>
    +    <member kind="function" virtualness="pure">
    +      <type>virtual std::string</type>
    +      <name>sql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1SqlStatement.html</anchorfile>
    +      <anchor>ac1a8b9037b9f106135150a547626b826</anchor>
    +      <arglist>() const =0</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::sql_value_traits</name>
    +    <filename>structWt_1_1Dbo_1_1sql__value__traits.html</filename>
    +    <templarg>V</templarg>
    +    <templarg>Enable</templarg>
    +    <member kind="function" static="yes">
    +      <type>static const char *</type>
    +      <name>type</name>
    +      <anchorfile>structWt_1_1Dbo_1_1sql__value__traits.html</anchorfile>
    +      <anchor>a938ffa7506a84bf46fa6e9a4d3c69253</anchor>
    +      <arglist>(SqlConnection *connection, int size)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>bind</name>
    +      <anchorfile>structWt_1_1Dbo_1_1sql__value__traits.html</anchorfile>
    +      <anchor>aeed1a933f3d83555b5d39ac76b929170</anchor>
    +      <arglist>(const V &amp;v, SqlStatement *statement, int index, int size)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static bool</type>
    +      <name>read</name>
    +      <anchorfile>structWt_1_1Dbo_1_1sql__value__traits.html</anchorfile>
    +      <anchor>ab3c8e4555b710451a3793059734fc751</anchor>
    +      <arglist>(V &amp;v, SqlStatement *statement, int column, int size)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::FieldInfo</name>
    +    <filename>classWt_1_1Dbo_1_1FieldInfo.html</filename>
    +    <member kind="enumeration">
    +      <name>Flags</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SurrogateId</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74abd29aed6e83cfe4f2c9aca8f46052930</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NaturalId</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74aa95fc942e42250a677339c2efc7e62dc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Version</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74a39166c38abd9ccbd99e2d2f88906d814</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Mutable</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74a5d34fad0e176750e3851bc76151075d1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>NeedsQuotes</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74a90f8c5e95d174ba0837a42c43a23ac39</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ForeignKey</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>abbf8a1584332b33920b8e74f8f07ed74afa28af86726e73177e8ed03e5fdaa9d5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>FieldInfo</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a2ac38659a204f772c8dd4bffa6550c2b</anchor>
    +      <arglist>(const std::string &amp;name, const std::type_info *type, const std::string &amp;sqlType, int flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>FieldInfo</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a3f4ed316af49d60c58b51e35043bdc60</anchor>
    +      <arglist>(const std::string &amp;name, const std::type_info *type, const std::string &amp;sqlType, const std::string &amp;foreignKeyTable, const std::string &amp;foreignKeyName, int flags)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setQualifier</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a1c9b9be3aeb53d07c98d7199fc97e965</anchor>
    +      <arglist>(const std::string &amp;qualifier, bool firstQualified=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>name</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a641378ec94a44b31dc269003b6e3c1b8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>sqlType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>ad70e6a952ee5482fef69f2f715fc80c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>qualifier</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a4ca5488b2fc88986d678ab8981184c28</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::type_info *</type>
    +      <name>type</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>aee2d002fe01db8d9a2417bfd256e19b7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isIdField</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>aae3e1485bb497489a0b82252ba290042</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isNaturalIdField</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a64e890f80b63b40fcdbf581eec4bdf54</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSurrogateIdField</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>ac52d9c1f1bf71b8d30d7050bc2379732</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isVersionField</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>a04f79cb89127236fc1aab798c5dff75a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isMutable</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>ae1fb411e5e5f2391832016b5d3e07d3b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>needsQuotes</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>ae6cee958dab8c234954d6f418aec1979</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isForeignKey</name>
    +      <anchorfile>classWt_1_1Dbo_1_1FieldInfo.html</anchorfile>
    +      <anchor>aee0ef9bf2e28793ba414d03b3912fd81</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::query_result_traits</name>
    +    <filename>structWt_1_1Dbo_1_1query__result__traits.html</filename>
    +    <templarg></templarg>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>getFields</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>a15021d5b70cb03ee08b39f0c45b02572</anchor>
    +      <arglist>(Session &amp;session, std::vector&lt; std::string &gt; *aliases, std::vector&lt; FieldInfo &gt; &amp;result)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static Result</type>
    +      <name>load</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>a24228c4fbd6fd851a44c7aaf3416d0b3</anchor>
    +      <arglist>(Session &amp;session, SqlStatement &amp;statement, int &amp;column)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>getValues</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>a62ad66f0b19a9afa554cbe6f8fa24ea5</anchor>
    +      <arglist>(const Result &amp;result, std::vector&lt; boost::any &gt; &amp;values)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>setValue</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>a31f67f41ac5ac491d59e911a46fe4238</anchor>
    +      <arglist>(Result &amp;result, int &amp;index, const boost::any &amp;value)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static Result</type>
    +      <name>create</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>ad5ff66197006a5daef3ce806ad29ddf7</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>add</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>af54fbd95d2319077cacbb718d6f33f1b</anchor>
    +      <arglist>(Session &amp;session, Result &amp;result)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>remove</name>
    +      <anchorfile>structWt_1_1Dbo_1_1query__result__traits.html</anchorfile>
    +      <anchor>ae60de38f7bbffad41f60bd80df2ad8ca</anchor>
    +      <arglist>(Result &amp;result)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::Transaction</name>
    +    <filename>classWt_1_1Dbo_1_1Transaction.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>Transaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Transaction.html</anchorfile>
    +      <anchor>ad617b2cb23bc0778ad2c534e2482f74c</anchor>
    +      <arglist>(Session &amp;session)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Transaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Transaction.html</anchorfile>
    +      <anchor>a5451291c5485081d047e723f9414fe88</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isActive</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Transaction.html</anchorfile>
    +      <anchor>ac1c956890b27b36a7e8ce664606e2af9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>commit</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Transaction.html</anchorfile>
    +      <anchor>a76e109abb03f00cf3ba5a5c6d84529a5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>rollback</name>
    +      <anchorfile>classWt_1_1Dbo_1_1Transaction.html</anchorfile>
    +      <anchor>a071848320ad21e06890fb30d4b6b46e9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::backend::Postgres</name>
    +    <filename>classWt_1_1Dbo_1_1backend_1_1Postgres.html</filename>
    +    <base>Wt::Dbo::SqlConnection</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Postgres</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a5699b228685c11aaf3293e1ec6243f35</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Postgres</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a3fd006b93f9eb7d8c88d9f01d339606d</anchor>
    +      <arglist>(const std::string &amp;db)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Postgres</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>ae032939fe1a5e5007179d5c52e9074c1</anchor>
    +      <arglist>(const Postgres &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Postgres</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a6b7dbc604df8610791e6cfdc57b55443</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Postgres *</type>
    +      <name>clone</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>ae905567f9ed51f9b200222a995c4894f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>connect</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a003ae8b797aea816669d4f02a34c6806</anchor>
    +      <arglist>(const std::string &amp;db)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>PGconn *</type>
    +      <name>connection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a025dd7452d7f25cdca2088999d37e238</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>executeSql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a9eaa769e442138ed02a0caed39cfd7f6</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>startTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>ac1148a180204342f6ca910d106b58b00</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>commitTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a81966e0110e7d3c2076cf27a7e08e236</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>rollbackTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>aea0742af53f3306a3302647014a8e3e2</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual SqlStatement *</type>
    +      <name>prepareStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>aa899b3109ba4400bf348384744a31e8f</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementSql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a92adbae7113272038f0ceb6ca6a93ccc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a5671d18ab68b492d590485458cca5122</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementInsertSuffix</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>af05af24a4bd0c20a090387056d724745</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const char *</type>
    +      <name>dateTimeType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a1e978200ba52918f2e2fd26a32dad456</anchor>
    +      <arglist>(SqlDateTimeType type) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const char *</type>
    +      <name>blobType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Postgres.html</anchorfile>
    +      <anchor>a81acebb9e839ed7f976602396ae6ed0a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Dbo::backend::Sqlite3</name>
    +    <filename>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</filename>
    +    <base>Wt::Dbo::SqlConnection</base>
    +    <member kind="enumeration">
    +      <name>DateTimeStorage</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ae6e6142ccb1da626677b05ef8852fdaa</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ISO8601AsText</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ae6e6142ccb1da626677b05ef8852fdaaaad8bd1d664eb10133d13264263665e74</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>JulianDaysAsReal</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ae6e6142ccb1da626677b05ef8852fdaaa83b21617ea295e7fceb7f6bc916a9b8a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>UnixTimeAsInteger</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ae6e6142ccb1da626677b05ef8852fdaaa9f021d0996b88c6b5cea9facf3e52651</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Sqlite3</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ad392317a2278c700364f6096fcf12e67</anchor>
    +      <arglist>(const std::string &amp;db)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Sqlite3</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a292580940953e8fea523144db1087766</anchor>
    +      <arglist>(const Sqlite3 &amp;other)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Sqlite3</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a8cdca9bc5d744a76663d14d1255af483</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual Sqlite3 *</type>
    +      <name>clone</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a85e4a7bf082eff1264f4b7290edd6f8f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>sqlite3 *</type>
    +      <name>connection</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a89c9fd929b5e051d187dabfb2f238ffc</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDateTimeStorage</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a571f4019950aafc2b855d46d4e7072d5</anchor>
    +      <arglist>(SqlDateTimeType type, DateTimeStorage format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>DateTimeStorage</type>
    +      <name>dateTimeStorage</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a975659c1b4349467a5f667323fc0f134</anchor>
    +      <arglist>(SqlDateTimeType type) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>startTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a20a6959d6b8e0d14f2ccf764361954f6</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>commitTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a0bb773ea028a7e0a1dc10f94fcc90b4d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>rollbackTransaction</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>aade642c39d87b4f796c196415ec5b16a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual SqlStatement *</type>
    +      <name>prepareStatement</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>ac254f423eb352ed08f63a11e7d9508a1</anchor>
    +      <arglist>(const std::string &amp;sql)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementSql</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a85f442f34549768a96fefa7548045c41</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a969dbaea3af070592bc8630425326e99</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual std::string</type>
    +      <name>autoincrementInsertSuffix</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a597ce9d1ff2702ac08e5dd6a0dcb9a98</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const char *</type>
    +      <name>dateTimeType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a4e4ecfd24b47a820974dc868a66d1eb5</anchor>
    +      <arglist>(SqlDateTimeType type) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual const char *</type>
    +      <name>blobType</name>
    +      <anchorfile>classWt_1_1Dbo_1_1backend_1_1Sqlite3.html</anchorfile>
    +      <anchor>a8e9060b7b68a93adb12e407c7658b24f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="namespace">
    +    <name>Wt::Ext</name>
    +    <filename>namespaceWt_1_1Ext.html</filename>
    +    <class kind="class">Wt::Ext::AbstractButton</class>
    +    <class kind="class">Wt::Ext::AbstractToggleButton</class>
    +    <class kind="class">Wt::Ext::Button</class>
    +    <class kind="class">Wt::Ext::Calendar</class>
    +    <class kind="class">Wt::Ext::CheckBox</class>
    +    <class kind="class">Wt::Ext::ComboBox</class>
    +    <class kind="class">Wt::Ext::Component</class>
    +    <class kind="class">Wt::Ext::Container</class>
    +    <class kind="class">Wt::Ext::DataStore</class>
    +    <class kind="class">Wt::Ext::DateField</class>
    +    <class kind="class">Wt::Ext::Dialog</class>
    +    <class kind="class">Wt::Ext::FormField</class>
    +    <class kind="class">Wt::Ext::LineEdit</class>
    +    <class kind="class">Wt::Ext::Menu</class>
    +    <class kind="class">Wt::Ext::MenuItem</class>
    +    <class kind="class">Wt::Ext::MessageBox</class>
    +    <class kind="class">Wt::Ext::NumberField</class>
    +    <class kind="class">Wt::Ext::PagingToolBar</class>
    +    <class kind="class">Wt::Ext::Panel</class>
    +    <class kind="class">Wt::Ext::ProgressDialog</class>
    +    <class kind="class">Wt::Ext::RadioButton</class>
    +    <class kind="class">Wt::Ext::Splitter</class>
    +    <class kind="class">Wt::Ext::SplitterHandle</class>
    +    <class kind="class">Wt::Ext::TableView</class>
    +    <class kind="class">Wt::Ext::TabWidget</class>
    +    <class kind="class">Wt::Ext::TextEdit</class>
    +    <class kind="class">Wt::Ext::ToolBar</class>
    +    <class kind="class">Wt::Ext::ToolTipConfig</class>
    +    <class kind="class">Wt::Ext::Widget</class>
    +    <member kind="enumeration">
    +      <name>DataLocation</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>ga5bc908c6e6aa90646cca1276d68cb2b2</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ClientSide</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>gga5bc908c6e6aa90646cca1276d68cb2b2a19099959db2ef813b3d1a1e2f3e04675</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>ServerSide</name>
    +      <anchorfile>group__ext.html</anchorfile>
    +      <anchor>gga5bc908c6e6aa90646cca1276d68cb2b2a1ae210985e4d5795a6aa21ed8871dfe7</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::AbstractButton</name>
    +    <filename>classWt_1_1Ext_1_1AbstractButton.html</filename>
    +    <base>Wt::Ext::Component</base>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>ae4a53837bb690bc1426a8b8da336bcea</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a7adfdba80922236853b08502a4881a72</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>ab484de8e4b543aa36ef5bfd1c8b70548</anchor>
    +      <arglist>(const std::string &amp;path)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>aa3b00f75eba7eb933b3cd809746cb8a1</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCheckable</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>afe7d30546234065316df73026558fc79</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCheckable</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a3fa242a4f266453da5ef8112cadc59e9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMenu</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>aadbc30ae480d99a6e4ca19a070e02d81</anchor>
    +      <arglist>(Menu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a79b1606d4b674dc13c5e92239be85700</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>aa637f0902da104ab323131cb237c3556</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>configureToolTip</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>afc7e2bc9c426bbbfb9beb9e18e9a0845</anchor>
    +      <arglist>(ToolTipConfig *config)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a43a839bb8e46df6c06ef2df65ae277c9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; bool &gt; &amp;</type>
    +      <name>toggled</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a4492f5bd82c0c33c0282c955bafce9d4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractButton.html</anchorfile>
    +      <anchor>a2cab98fae87f87209c9999e086253fb0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::AbstractToggleButton</name>
    +    <filename>classWt_1_1Ext_1_1AbstractToggleButton.html</filename>
    +    <base>Wt::Ext::FormField</base>
    +    <member kind="slot">
    +      <type>void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a9132c42402232810427d96d700e4cc61</anchor>
    +      <arglist>(bool)</arglist>
    +    </member>
    +    <member kind="slot" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a9aa7198153fcca043f267d337fcfd168</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="slot" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setUnChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a56f4470889ff56155dc6598751eef47e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a73635f45799c76d017c4924cb133997f</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>aa0b4bbe46c7ee9a61267016a3530d136</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a32fe2a8e20c828f15f08440bae17ef4d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>checked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>a42534aedfc08e6b2cb816d792a9ca749</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>unChecked</name>
    +      <anchorfile>classWt_1_1Ext_1_1AbstractToggleButton.html</anchorfile>
    +      <anchor>aad745c27aae18a80f159091c7e01fe10</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Button</name>
    +    <filename>classWt_1_1Ext_1_1Button.html</filename>
    +    <base>Wt::Ext::AbstractButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Button</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>aa65a7bd6f3f9ad2be15d7553fb41e786</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Button</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>a0f31acbe76188e841e5e132f8111f725</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Button</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>a6f3cc145f4a8eedd7f65532187836586</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDefault</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>a2ed225799c373580940b99312bfa0b79</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isDefault</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>aba951a81109feb3fcf1823e0dd8d8fcd</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal &amp;</type>
    +      <name>clicked</name>
    +      <anchorfile>classWt_1_1Ext_1_1Button.html</anchorfile>
    +      <anchor>acdb897f4b6d0ca38764966017ecceaff</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Calendar</name>
    +    <filename>classWt_1_1Ext_1_1Calendar.html</filename>
    +    <base>Wt::Ext::Component</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Calendar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Calendar.html</anchorfile>
    +      <anchor>a2d4f71ffe544bb03fc5851b2c3b371bb</anchor>
    +      <arglist>(bool i18n=false, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>select</name>
    +      <anchorfile>classWt_1_1Ext_1_1Calendar.html</anchorfile>
    +      <anchor>aa9100d67bf50b81ee6ce1313b4d5b216</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::set&lt; WDate &gt; &amp;</type>
    +      <name>selection</name>
    +      <anchorfile>classWt_1_1Ext_1_1Calendar.html</anchorfile>
    +      <anchor>a8dc46727fc4d990f101b47adf52c67b8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; void &gt; &amp;</type>
    +      <name>selectionChanged</name>
    +      <anchorfile>classWt_1_1Ext_1_1Calendar.html</anchorfile>
    +      <anchor>ab46d39379ddd1faeea1eb95aa403eda1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; void &gt; &amp;</type>
    +      <name>selected</name>
    +      <anchorfile>classWt_1_1Ext_1_1Calendar.html</anchorfile>
    +      <anchor>a6b1c98ac0a89db6281ff0903a0bd90e5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::CheckBox</name>
    +    <filename>classWt_1_1Ext_1_1CheckBox.html</filename>
    +    <base>Wt::Ext::AbstractToggleButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>CheckBox</name>
    +      <anchorfile>classWt_1_1Ext_1_1CheckBox.html</anchorfile>
    +      <anchor>abef8e54213398a637d8e68e70902ec44</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>CheckBox</name>
    +      <anchorfile>classWt_1_1Ext_1_1CheckBox.html</anchorfile>
    +      <anchor>aa9e44e6317783b036b6a14307da692f3</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::ComboBox</name>
    +    <filename>classWt_1_1Ext_1_1ComboBox.html</filename>
    +    <base>Wt::Ext::LineEdit</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>ComboBox</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a8183ecd2ee82149a57121dc6cce94538</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a282ddb37ddc6d8606e2385a742a60452</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a388ebac95d30babbd8cc494837932587</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>aabc76822524dbe503909472ea2aac8db</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insertItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a6e9f541c754551c1ecbcdeb9337ecfb3</anchor>
    +      <arglist>(int index, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>ab17f27bcbd7d93db4f0147699bbdb5a0</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentIndex</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a1c9f4f4be0dd147954e8b21931511cdd</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setItemText</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a808bf7caa59a88c172124fe73090a964</anchor>
    +      <arglist>(int index, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>currentText</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>aa0a811e97424b7980f4da77c3711c72a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>itemText</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a59faa0b8b2cb3a2b25a4b47eb82ecb8b</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a54d18b5dde4bd46b830c2b2ecd6d0765</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModelColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a46e2c9ac50d405d5e4ad8215ce5bb885</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEditable</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a0c150137b5ad059ba66ee8f0b85b3585</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setQueryDelay</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a8310599aaa5efc0ae08cf9323f321a7f</anchor>
    +      <arglist>(int milliSeconds)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinQueryLength</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a181b1185f0ae607c61c62e900cbe479c</anchor>
    +      <arglist>(int numChars)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPageSize</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a7e723bcbf36890f51805d8c373198ded</anchor>
    +      <arglist>(int pageSize)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDataLocation</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a8cbea60f93ad91387200a3e49e33eaf0</anchor>
    +      <arglist>(DataLocation dataLocation)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a48b20b2d00b523a28e2c1bd0a1a9bfcd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clear</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>af91ec32bf3c21c1ccb34d0cd4ad5f8bf</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal&lt; int &gt; &amp;</type>
    +      <name>activated</name>
    +      <anchorfile>classWt_1_1Ext_1_1ComboBox.html</anchorfile>
    +      <anchor>a9cde6eed9970ddf8523ecb35c717c1b5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Component</name>
    +    <filename>classWt_1_1Ext_1_1Component.html</filename>
    +    <base>Wt::Ext::Widget</base>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1Component.html</anchorfile>
    +      <anchor>ac561b86893de33ed03c6f3874b500722</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enable</name>
    +      <anchorfile>classWt_1_1Ext_1_1Component.html</anchorfile>
    +      <anchor>a9f1bbc312ef663d05191b777f1bc9052</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>disable</name>
    +      <anchorfile>classWt_1_1Ext_1_1Component.html</anchorfile>
    +      <anchor>a70cd13699ca9e39c41b774b77d8c0c3d</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1Component.html</anchorfile>
    +      <anchor>a04b4d592da0721773de0bf6740c6d1de</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Container</name>
    +    <filename>classWt_1_1Ext_1_1Container.html</filename>
    +    <base>Wt::Ext::Component</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Container</name>
    +      <anchorfile>classWt_1_1Ext_1_1Container.html</anchorfile>
    +      <anchor>ab45339fc546e1e596af9585c0c375060</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual</type>
    +      <name>~Container</name>
    +      <anchorfile>classWt_1_1Ext_1_1Container.html</anchorfile>
    +      <anchor>abdcc8cc41922ea2b4d42e57a97d189e1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLayout</name>
    +      <anchorfile>classWt_1_1Ext_1_1Container.html</anchorfile>
    +      <anchor>a0707be012bd5e627e6c9d7e2b6f98afe</anchor>
    +      <arglist>(WLayout *layout)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLayout *</type>
    +      <name>layout</name>
    +      <anchorfile>classWt_1_1Ext_1_1Container.html</anchorfile>
    +      <anchor>ae479ebb74773cb1f4efcc7b28806e285</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::DataStore</name>
    +    <filename>classWt_1_1Ext_1_1DataStore.html</filename>
    +    <base>Wt::WResource</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>DataStore</name>
    +      <anchorfile>classWt_1_1Ext_1_1DataStore.html</anchorfile>
    +      <anchor>a9d88086e22ca1f48b8378494fe9222f9</anchor>
    +      <arglist>(WAbstractItemModel *model, DataLocation dataLocation, WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~DataStore</name>
    +      <anchorfile>classWt_1_1Ext_1_1DataStore.html</anchorfile>
    +      <anchor>a4b2c3c030c6557aa6e3beadb50bf1643</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1DataStore.html</anchorfile>
    +      <anchor>a6fbd9be0f07bc864bc2921769d64a51e</anchor>
    +      <arglist>(int columnIndex, const std::string &amp;jsonName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFilterColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1DataStore.html</anchorfile>
    +      <anchor>ad4e923221657f57281d76c02b3a4d803</anchor>
    +      <arglist>(int columnIndex)</arglist>
    +    </member>
    +    <member kind="function" protection="protected" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>handleRequest</name>
    +      <anchorfile>classWt_1_1Ext_1_1DataStore.html</anchorfile>
    +      <anchor>a95828fc3362ef58ff821790180bf9834</anchor>
    +      <arglist>(const Http::Request &amp;request, Http::Response &amp;response)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::DateField</name>
    +    <filename>classWt_1_1Ext_1_1DateField.html</filename>
    +    <base>Wt::Ext::LineEdit</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>DateField</name>
    +      <anchorfile>classWt_1_1Ext_1_1DateField.html</anchorfile>
    +      <anchor>ac259dff707f9ada0bbe209567ad25d84</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFormat</name>
    +      <anchorfile>classWt_1_1Ext_1_1DateField.html</anchorfile>
    +      <anchor>abaa98fa2fff51505bd086dcedcea1f8b</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>format</name>
    +      <anchorfile>classWt_1_1Ext_1_1DateField.html</anchorfile>
    +      <anchor>af9a05108f7589cda4f503a564a46e3be</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDate</name>
    +      <anchorfile>classWt_1_1Ext_1_1DateField.html</anchorfile>
    +      <anchor>a67e836de556370818508e4f70da5dc41</anchor>
    +      <arglist>(const WDate &amp;date)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WDate</type>
    +      <name>date</name>
    +      <anchorfile>classWt_1_1Ext_1_1DateField.html</anchorfile>
    +      <anchor>a590576fafea26af48e5e3a72f8bff4b3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Dialog</name>
    +    <filename>classWt_1_1Ext_1_1Dialog.html</filename>
    +    <base>Wt::Ext::Panel</base>
    +    <member kind="enumeration">
    +      <name>DialogCode</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a173316655f09bbf63e79691b17d3c8d5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Rejected</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a173316655f09bbf63e79691b17d3c8d5a1de44c73e14f7eac0884bc26721b2d30</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Accepted</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a173316655f09bbf63e79691b17d3c8d5a9c3465568e73c4e4fd83021536be4ab0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Dialog</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a76a00b2d5493cdb2f5ed7b340b1e3c6d</anchor>
    +      <arglist>(const WString &amp;windowTitle=WString())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Dialog</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>ab2fc4339c9e2d8befafce8a28233f628</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setWindowTitle</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>ab6a5820f54f9663a592efd112097939a</anchor>
    +      <arglist>(const WString &amp;windowTitle)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>windowTitle</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a64577792a7c2a48eefc56ff223b9514a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WContainerWidget *</type>
    +      <name>contents</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>ab41ccccc3b96e42da6977829c0161073</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>DialogCode</type>
    +      <name>exec</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a1dbf3f23fde44807110abe3cf43f7944</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>done</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a934c0a3801fda4cac6f6d95c8ea2fa22</anchor>
    +      <arglist>(DialogCode r)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>accept</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>aadf699cc3ecaebd6ae093fa2c0e02fda</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>reject</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a4db5e6b09bb2faf5501662c518c79fb5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; DialogCode &gt; &amp;</type>
    +      <name>finished</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a62547a1ae13e2cdee0b383bdb79eef15</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>DialogCode</type>
    +      <name>result</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a43bc83386c56a59afc7edbc7253eb6eb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a720b01d56ab479fad6b749e27bbd444c</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>ad9f19a8ff62e3520544f2ea10a7647ce</anchor>
    +      <arglist>(Button *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a89e0ff2766151d3f52b9a6d37286a7d4</anchor>
    +      <arglist>(Button *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Button * &gt; &amp;</type>
    +      <name>buttons</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a9c1b9d1f950294d122f8148ec992c1a5</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDefaultButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>aa68ac801a657f8ec69134e15bf5d765d</anchor>
    +      <arglist>(Button *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>defaultButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a4ffc5198bd395cf95b92ef769b99f393</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSizeGripEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>aaaba1c432c8803814426daa276708d63</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSizeGripEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1Dialog.html</anchorfile>
    +      <anchor>a129cb8e3bd17c0531dd975f13e585a65</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::FormField</name>
    +    <filename>classWt_1_1Ext_1_1FormField.html</filename>
    +    <base>Wt::Ext::Component</base>
    +    <member kind="enumeration">
    +      <name>MessageLocation</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2dc53fb554d2dcbbcb199535ddeed92d</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>FancyToolTip</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2dc53fb554d2dcbbcb199535ddeed92da197077fec9c7cdff5b4043913d6f09cc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>PlainToolTip</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2dc53fb554d2dcbbcb199535ddeed92da437412fc30c12e23f63dfc1f54a01472</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Below</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2dc53fb554d2dcbbcb199535ddeed92da1e38a33c74bae6b1ae1a47409317affc</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Besides</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2dc53fb554d2dcbbcb199535ddeed92dab45061b8c7da544c9c26d98c119867f0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setErrorMessageLocation</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a83bc30d48a0c4b15021d27e6446829ae</anchor>
    +      <arglist>(MessageLocation location)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValidator</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>ac62a3a3fa7d3ae3d3263267a413c5cb4</anchor>
    +      <arglist>(WValidator *validator)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WValidator *</type>
    +      <name>validator</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a382f034a76e000eb4f8b513382916f08</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a1c67b28fef3177ba5e82cac1f5387687</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WLabel *</type>
    +      <name>label</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>aeed85e4a038bb4fd6c339716fb3d3a8e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setFocus</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a6d7fc497d6816a420ff5a576631ee50b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a0ac56f725de8a68fd7931b9319286485</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>changed</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a4d610435f726887b0ab33411ceff2750</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>blurred</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a3f4bdfc096299231fb5bd630507f639e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>focussed</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a444c9cbf1461dc168b6d930a438fbc3a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" protection="protected">
    +      <type></type>
    +      <name>FormField</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>a2e98c3cc2edc738a9626ce3f0deef7be</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="friend">
    +      <type>friend class</type>
    +      <name>Wt::WLabel</name>
    +      <anchorfile>classWt_1_1Ext_1_1FormField.html</anchorfile>
    +      <anchor>af60df3b331659c426f79d24d991da7ed</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::LineEdit</name>
    +    <filename>classWt_1_1Ext_1_1LineEdit.html</filename>
    +    <base>Wt::Ext::FormField</base>
    +    <member kind="enumeration">
    +      <name>EchoMode</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ac3469352f6a1073ac5015202e6f3e2e1</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Normal</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ac3469352f6a1073ac5015202e6f3e2e1ad095e17353838d86f57d1a7601a57332</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>Password</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ac3469352f6a1073ac5015202e6f3e2e1ae84e09a5c6446aff5ba5053acb7904b4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>LineEdit</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a71715b99ff1aba4f38af23e86056e074</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>LineEdit</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ae0a247bcb43fd119bfffb29a3b1d7319</anchor>
    +      <arglist>(const WString &amp;content, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTextSize</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a4f47849711e93d6760f86a38eeca418a</anchor>
    +      <arglist>(int chars)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>textSize</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ab87c5c0f13c068383ffa402863d44e6e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>aa0f77652f6a47a27a17bc2d9a46e6fd3</anchor>
    +      <arglist>(const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a8ba4c9a22661c192bd28b4a28a8ca943</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaxLength</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ab17143af0d6fef0467a7a9aead17d091</anchor>
    +      <arglist>(int length)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>maxLength</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>acb99fb14b98c8cd8640deb8706130118</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEchoMode</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ab2ef8ad240cfeda9b5dc5f2ccf6a5fd8</anchor>
    +      <arglist>(EchoMode echoMode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EchoMode</type>
    +      <name>echoMode</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ab2d9d91c96ec140d7fdd76b57e37150d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>aee32a5451b7e73568b39215f18d2d98c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentDown</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a3876ad8ff416a6020db30b57ab165dbe</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyPressed</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>ad2d94e3020a39759bd885d46600b0bb8</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal&lt; WKeyEvent &gt; &amp;</type>
    +      <name>keyWentUp</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a62383a836f5fb357a3824ea86006b44b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>EventSignal &amp;</type>
    +      <name>enterPressed</name>
    +      <anchorfile>classWt_1_1Ext_1_1LineEdit.html</anchorfile>
    +      <anchor>a8550f018e75b6104978d510b5eced941</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Menu</name>
    +    <filename>classWt_1_1Ext_1_1Menu.html</filename>
    +    <base>Wt::Ext::Widget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Menu</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a9833d8fa63f51601d71ef0af0f16a219</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a985e64794c5fb23e3ee81f5d6009b6dd</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a0f9d979d2015c35a968c95dc681c4197</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a83906015f609ddcd9c2a5798e189f3ae</anchor>
    +      <arglist>(const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a609ad8b1d9724c0c30ce3cf7ca381ada</anchor>
    +      <arglist>(const WString &amp;text, const F &amp;f)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a0c4523cd43ebc8c1626ef67dd9dbeef6</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a204f0e0e0f2568ce6c7307bff7cba915</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, const F &amp;f)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addMenu</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a11202776073812bdd6dc1849f917bd78</anchor>
    +      <arglist>(const WString &amp;text, Menu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>MenuItem *</type>
    +      <name>addMenu</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>ae92e182aa488c59865c1fae538ea609b</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, Menu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a72f3b8ebd29b14c9b5c6732c524d7e30</anchor>
    +      <arglist>(MenuItem *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>a17cde965e914a6a774e1ec202db3786d</anchor>
    +      <arglist>(WWidget *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSeparator</name>
    +      <anchorfile>classWt_1_1Ext_1_1Menu.html</anchorfile>
    +      <anchor>aca9bddc38f80c06383a223c01df79a80</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::MenuItem</name>
    +    <filename>classWt_1_1Ext_1_1MenuItem.html</filename>
    +    <base>Wt::Ext::AbstractButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>MenuItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1MenuItem.html</anchorfile>
    +      <anchor>a7881281b800bf5e2ab7ad4f1409cfe31</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>MenuItem</name>
    +      <anchorfile>classWt_1_1Ext_1_1MenuItem.html</anchorfile>
    +      <anchor>ae5e37c8c73ef646c21c18560a1a1396c</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::MessageBox</name>
    +    <filename>classWt_1_1Ext_1_1MessageBox.html</filename>
    +    <base>Wt::Ext::Dialog</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>MessageBox</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a6477c87e2b02a742065272a019cacf30</anchor>
    +      <arglist>(bool i18n=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>MessageBox</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a7af93ad6ef0588e3539f2d726ac07d92</anchor>
    +      <arglist>(const WString &amp;caption, const WString &amp;text, Icon icon, WFlags&lt; StandardButton &gt; buttons, bool i18n=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>ac318d28fa19abc4e496b497aea557d39</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>aad99693851dd7c95ddb4ca463e69f5c9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setIcon</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a85e914a68d10813bb0624c19eb679ca0</anchor>
    +      <arglist>(Icon icon)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Icon</type>
    +      <name>icon</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a08dc6e5e7e1dfd07d0fbf41213c8e30e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setButtons</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a2c03238ea19691e14bb915b10a9279f1</anchor>
    +      <arglist>(WFlags&lt; StandardButton &gt; buttons)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WFlags&lt; StandardButton &gt;</type>
    +      <name>buttons</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a0ea9c67635ba8acadd3843c281dd3f66</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>StandardButton</type>
    +      <name>result</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a1ca14b375ae42488916e23d97e42d5f9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enablePrompt</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a4c551e90aea08438544ddbf2f3197133</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasPrompt</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>af6626137daa8af5a4d615bdc8c59f5b9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableTextArea</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>ade8dec9c2364c85ed42fc0cdb3bbae53</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>hasTextArea</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a353ac2d752cc9921505d3a61f495388c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a88fa134817d0afc348df856b7c4236fe</anchor>
    +      <arglist>(const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>ab1debb3cb5c60e399c396eb0585c4b79</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; StandardButton &gt; &amp;</type>
    +      <name>buttonClicked</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a7b95867c4a86a79fdf317f7926a87667</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a1886eef5b4b8e903b6f1455f3a864045</anchor>
    +      <arglist>(bool hidden)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>aba9efcb3903259caa0981f5ecc0cb7cb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static StandardButton</type>
    +      <name>show</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>af3eacdd064461cd826b2224f919190aa</anchor>
    +      <arglist>(const WString &amp;caption, const WString &amp;text, WFlags&lt; StandardButton &gt; buttons, bool i18n=false)</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static StandardButton</type>
    +      <name>prompt</name>
    +      <anchorfile>classWt_1_1Ext_1_1MessageBox.html</anchorfile>
    +      <anchor>a987211d96f9128716c5dab353a16ad84</anchor>
    +      <arglist>(const WString &amp;caption, const WString &amp;text, WString &amp;value, bool multiLine=false, bool i18n=false)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::NumberField</name>
    +    <filename>classWt_1_1Ext_1_1NumberField.html</filename>
    +    <base>Wt::Ext::LineEdit</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>NumberField</name>
    +      <anchorfile>classWt_1_1Ext_1_1NumberField.html</anchorfile>
    +      <anchor>ae8ff897bc2b3669a87cc2d87a699ba11</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1Ext_1_1NumberField.html</anchorfile>
    +      <anchor>ad811261baec4e8550b3849b53f984456</anchor>
    +      <arglist>(double value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>double</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1Ext_1_1NumberField.html</anchorfile>
    +      <anchor>a8ea09d6db15fd8938a2cd88daf9ad9f0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDecimalPrecision</name>
    +      <anchorfile>classWt_1_1Ext_1_1NumberField.html</anchorfile>
    +      <anchor>a4bc56ee6f80a561c7424c00185847a3a</anchor>
    +      <arglist>(int decimals)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>decimalPrecision</name>
    +      <anchorfile>classWt_1_1Ext_1_1NumberField.html</anchorfile>
    +      <anchor>a623ef7f586b670715df46f411a9315a8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::PagingToolBar</name>
    +    <filename>classWt_1_1Ext_1_1PagingToolBar.html</filename>
    +    <base>Wt::Ext::ToolBar</base>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Panel</name>
    +    <filename>classWt_1_1Ext_1_1Panel.html</filename>
    +    <base>Wt::Ext::Container</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Panel</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a047d152d0247aca78ec607bb3b665338</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Panel</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a71bf14e814da2118c3859d8d682c7c7b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTopToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a16b203f3b26cc5ffb82e036e6419e60f</anchor>
    +      <arglist>(ToolBar *toolBar)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ToolBar *</type>
    +      <name>topToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a618824abfc31c3ddfcff6c550adc88b6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBottomToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a9436b9da7ee336136027fe4914a5a381</anchor>
    +      <arglist>(ToolBar *bottomBar)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ToolBar *</type>
    +      <name>bottomToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a20eb46f218c8d2e1ead77fb0f4d1634a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addFooterButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>aee162a984a883afe8bffbda643159b44</anchor>
    +      <arglist>(Button *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeFooterButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a7d66822b2f4dd23165215e9dbd8bb31e</anchor>
    +      <arglist>(Button *button)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; Button * &gt; &amp;</type>
    +      <name>footerButtons</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a2330c0b1b31990bcc07e8a0aeebcfb4d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitle</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a46a86bb4a39637b06f0b20a9f915b72c</anchor>
    +      <arglist>(const WString &amp;title)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>title</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a130b5e84969fc0deb8c4ff28e9f966cc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTitleBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a6675d56afd2546fe05a7e3e2135069f9</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>titleBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>adf6238554373cecbc791b5476ad07c90</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAnimate</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a8887d2c32b79f119ce2c26cfddfef77c</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>animate</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>af862e9ffba0568ce5d72051996d5b2c4</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAutoScrollBars</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a04d48634c116f7d0858918d9a0f63613</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>autoScrollBars</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a89dd67d1143d8116d1d45561f56a0542</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setBorder</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a962eb64c3c069812fccc73487a5e2065</anchor>
    +      <arglist>(bool show)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>border</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a4da431e41b0d23956ff820907d640a06</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCollapsed</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>addfe3891408758ea3e8c68ad8a41543e</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>collapse</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a2fa2ede9184fa7e2dc90cac51c12e537</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>expand</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>aecb0389b8adaaf887538741b368e773c</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCollapsed</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>ac10c12d39e08cceeaa179bd75464219c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCollapsible</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a85299483077d467a4e4f3baa36cfa758</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isCollapsible</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>ab5a94a9659c2c08ee32f686a62b59ed9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setResizable</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a1f3c32c2bba7c57206d4fa4d1b0f5521</anchor>
    +      <arglist>(bool on)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isResizable</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a2cd9b1e6e2a931d5770a16355ae4d72f</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal &amp;</type>
    +      <name>collapsed</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a7dfc66c0c3021f05e8bb9e59d675b629</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>JSignal &amp;</type>
    +      <name>expanded</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>af6d2e4bb7dc0d3ab806335130bd6a7cd</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1Panel.html</anchorfile>
    +      <anchor>a960a266d0c5427a2786cc45a4b05ffa1</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::ProgressDialog</name>
    +    <filename>classWt_1_1Ext_1_1ProgressDialog.html</filename>
    +    <base>Wt::Ext::MessageBox</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>ProgressDialog</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a8dcabafaf4235c88cd7eee441448c615</anchor>
    +      <arglist>(bool i18n=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>ProgressDialog</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>aa56cda8b6be0140160ef7f3f0a333358</anchor>
    +      <arglist>(const WString &amp;text, const WString &amp;cancelButtonText, int minimum, int maximum, bool i18n=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMinimum</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a74d408dba39fce5fe2561218e5775f23</anchor>
    +      <arglist>(int minimum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>minimum</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a3e0e589ccd418b358840af358afab74e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMaximum</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>affbc5da9aaeff04433201c1fb0a9c942</anchor>
    +      <arglist>(int maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>maximum</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a8961b393b191d9a52d2e006a80ab3fce</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRange</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>aec47127780061076a85cb867c1669c9b</anchor>
    +      <arglist>(int minimum, int maximum)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>cancel</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a5d1e7ade20a3a89b52477ce9846d89c5</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>reset</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a2c9b02eb5d639ec5d4c1214ad47cc2d9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCancelButtonText</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a9f57021b85bcc1dc7c1e9d820b8999d3</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setValue</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>a002c659c327ab7bab26aaa424daf4e2c</anchor>
    +      <arglist>(int progress)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>value</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>aec354c2676e811e2c354ce22f02ef1c7</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>wasCanceled</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>ae728af17b42f24fef38014d2b6cefc97</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>canceled</name>
    +      <anchorfile>classWt_1_1Ext_1_1ProgressDialog.html</anchorfile>
    +      <anchor>ac13c421f889ac475a025baed7739ea97</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::RadioButton</name>
    +    <filename>classWt_1_1Ext_1_1RadioButton.html</filename>
    +    <base>Wt::Ext::AbstractToggleButton</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>RadioButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1RadioButton.html</anchorfile>
    +      <anchor>a8bab74785dd1cb44aba2964725ad6985</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>RadioButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1RadioButton.html</anchorfile>
    +      <anchor>a204b66ea73579a8f7c62d163139a41ae</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Splitter</name>
    +    <filename>classWt_1_1Ext_1_1Splitter.html</filename>
    +    <base>Wt::WContainerWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>Splitter</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a535dfe78024536478b2372a3e9680172</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>Splitter</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a982eb1ec72d98f3c7a1dd1d50b5806c7</anchor>
    +      <arglist>(Orientation orientation, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setOrientation</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>ab2ac583c831b2b4d96d8c47cd59dc051</anchor>
    +      <arglist>(Orientation orientation)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Orientation</type>
    +      <name>orientation</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a67e40b48d24dc405ec9873700b8e73ce</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHandleWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>ad253324efbe507459f1b9753e299e870</anchor>
    +      <arglist>(int width)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>handleWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>ad15e9a76781f6b9b0f6842d79473310b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SplitterHandle *</type>
    +      <name>handle</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a9a1963027cc762d7a6565311ddb74ed1</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>addWidget</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a3f776ab5a6c84ebfa1d4896b475fec7a</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertWidget</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a4495c1d701edd2181dbc1bf071442363</anchor>
    +      <arglist>(int index, WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>insertBefore</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>ad156963c4ad3d725e0d8b4bd2969b2f7</anchor>
    +      <arglist>(WWidget *widget, WWidget *before)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; WWidget * &gt; &amp;</type>
    +      <name>children</name>
    +      <anchorfile>classWt_1_1Ext_1_1Splitter.html</anchorfile>
    +      <anchor>a88f67b1fa84e213c5e527beff8ed6225</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::SplitterHandle</name>
    +    <filename>classWt_1_1Ext_1_1SplitterHandle.html</filename>
    +    <base>Wt::Ext::Widget</base>
    +    <member kind="function">
    +      <type>Splitter *</type>
    +      <name>splitter</name>
    +      <anchorfile>classWt_1_1Ext_1_1SplitterHandle.html</anchorfile>
    +      <anchor>ac41d0b1d8d008081ff044e1e25cdb497</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::TableView</name>
    +    <filename>classWt_1_1Ext_1_1TableView.html</filename>
    +    <base>Wt::Ext::Panel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>TableView</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>af982555ad58c7e846dbe829f10a5e09b</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setModel</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ae749720b6992ecf62a900bbc45a5607d</anchor>
    +      <arglist>(WAbstractItemModel *model)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WAbstractItemModel *</type>
    +      <name>model</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>aa28bbad6fef68f903fed1aa01303c3ce</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>resizeColumnsToContents</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a300cede33cdf30af4f7543de794e72f2</anchor>
    +      <arglist>(bool onResize=false)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAutoExpandColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a88f1de406a741b47533311d249a168dc</anchor>
    +      <arglist>(int column, int minWidth=50, int maxWidth=1000)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>autoExpandColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a4616220e3e1153b6825e1a7d5cd8b374</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDataLocation</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a11f1507b4db23da74cf54741a4b40b00</anchor>
    +      <arglist>(DataLocation dataLocation)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnsMovable</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ad8527a57c1004097937befe83633d998</anchor>
    +      <arglist>(bool movable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>columnsMovable</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>aab8ed89a0c658fffad2f3e4cb575450d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAlternatingRowColors</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>aeca778394c0c4165cb890624e7f26f68</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>alternatingRowColors</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a36e7290ea7fb21f7785ce4825e4c6222</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHighlightMouseOver</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a82aa7b9fd7931c064a85624167777dde</anchor>
    +      <arglist>(bool highlight)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>highlightMouseOver</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>abbf14ebf04eba309570653f22a6ff22e</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ae6f70012b68f37b8acaa16042f805178</anchor>
    +      <arglist>(int column, bool hide)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isColumnHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>aee2e7e8094023cd8c001b01cf520d7d2</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>hideColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a1c9f10b2affca162eca145d624d0f49e</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>showColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a6fba01c5bc5bf18b2d28a5ea394292b7</anchor>
    +      <arglist>(int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a0618d71520e5c0c5da46beb30100e634</anchor>
    +      <arglist>(int column, int pixels)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>columnWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ae3892620e188e2b95cec6af949fa3a07</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnAlignment</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ac4dfbc43791653d6aa4fa1e7517d7523</anchor>
    +      <arglist>(int column, AlignmentFlag alignment)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>AlignmentFlag</type>
    +      <name>columnAlignment</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a44ad9387f03c949018642effbc444146</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setColumnSortable</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>abb2e0f5c6576335c86141183a10029ec</anchor>
    +      <arglist>(int column, bool sortable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isColumnSortable</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a20d295f97b290e9afb4568e026e4c965</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>enableColumnHiding</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>acc3f7c2dbae0a063eed5fad7892c77a2</anchor>
    +      <arglist>(int column, bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isColumnHidingEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a5b6670edddd105298c67d37167d330fd</anchor>
    +      <arglist>(int column) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEditor</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a8fce08c9e2b06463377342e03f2970d2</anchor>
    +      <arglist>(int column, FormField *editor)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setRenderer</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>acd1c2e98bd5420e398053ab6b6d4e7f0</anchor>
    +      <arglist>(int column, const std::string &amp;rendererJS)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setPageSize</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a9b8be64acea3d9df598fd418d0b0e55a</anchor>
    +      <arglist>(int pageSize)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>pageSize</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a71bcd2818831c21a68202fe4e53552ab</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ToolBar *</type>
    +      <name>createPagingToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a0e09b1cd5b493f577f5a89c4b4916c44</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a925ffae0caed4dff0e0bb9da0440e20a</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentCell</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a51279c7d091a0060bde4f26845202a33</anchor>
    +      <arglist>(int row, int column)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentRow</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>acedafc837958034d15616eb14992b374</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentColumn</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ae19b1700dbf51bf26f06a14865b2486a</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::vector&lt; int &gt; &amp;</type>
    +      <name>selectedRows</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a0fb09470c5ee23ee95e07fdfda027590</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>clearSelection</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a6988a1b768e8f0ec59b1a9ea06c6afd0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionMode</type>
    +      <name>selectionMode</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a630019b3fcfdfdb109cb9c89168b554c</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionMode</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>afd0f8697b8f4e3e0a63d6a3bb236e4da</anchor>
    +      <arglist>(SelectionMode mode)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSelectionBehavior</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a2cccbab98d2639aea94a041bd144d3aa</anchor>
    +      <arglist>(SelectionBehavior behavior)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>SelectionBehavior</type>
    +      <name>selectionBehavior</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a4eece626861dd19a6b4ec903a46f5062</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int, int &gt; &amp;</type>
    +      <name>cellClicked</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>abc2bed9a030c38f6545c904dd14872eb</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int, int, int, int &gt; &amp;</type>
    +      <name>currentCellChanged</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a95fc2f78d5f4d8f2befc3af41e777c3b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal &amp;</type>
    +      <name>itemSelectionChanged</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>ae35765d2483d419d5cb2df06247d44de</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static std::string</type>
    +      <name>dateRenderer</name>
    +      <anchorfile>classWt_1_1Ext_1_1TableView.html</anchorfile>
    +      <anchor>a4be5b4bb37a248e695a0b6398abb7e53</anchor>
    +      <arglist>(const WString &amp;format)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::TabWidget</name>
    +    <filename>classWt_1_1Ext_1_1TabWidget.html</filename>
    +    <base>Wt::Ext::Panel</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>TabWidget</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a49313cc53c928d22a4c381c0f584a092</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addTab</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a11a3c125032c6cbd70b2c5223a06ffd5</anchor>
    +      <arglist>(WWidget *child, const WString &amp;label)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addTab</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a84f5a17b5f099d3931520be868a7e865</anchor>
    +      <arglist>(Panel *panel)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>removeTab</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a234bc743a67ec2e6bd0a3b453b57fdfd</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>count</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a57d00db0c37712a966bfa77515a3ad5b</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Panel *</type>
    +      <name>panel</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a203b27ce2263bd023e7a3653ebcf9ce4</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>widget</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a491749c6c4e908dd1a48cce13e06a660</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>indexOf</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>afbbb750cb8af68db75c40ceb19420bef</anchor>
    +      <arglist>(WWidget *widget) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentIndex</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>abcb66b827643e63614a611dce1788f23</anchor>
    +      <arglist>(int index)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>currentIndex</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a136b2410445066a014daad3dfd38adf8</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCurrentWidget</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a9bf1385e1ce3e1cfc623ce4ad01d586d</anchor>
    +      <arglist>(WWidget *widget)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WWidget *</type>
    +      <name>currentWidget</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a3568aafde3a35c7e70ff0dc720cf00c6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a066ce5aa0bf77b8d2d7a7a923739c447</anchor>
    +      <arglist>(int index, bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTabEnabled</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>ab5bbadc1deac716888489e1306dad5e5</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a07506a9ca766e111c24dcd5f341a6407</anchor>
    +      <arglist>(int index, bool hidden)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isTabHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a2f76632ba42e876878e066ee88098eda</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabText</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a72fa2a9c84fd5fbab716b66250a24612</anchor>
    +      <arglist>(int index, const WString &amp;label)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>tabText</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a912419147b58c95782ab308c162827a2</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setTabToolTip</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>af68ca221117e897ca1e021b32315ce6f</anchor>
    +      <arglist>(int index, const WString &amp;tip)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString</type>
    +      <name>tabToolTip</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>aecb111036cf8ee9c6aa2d2870a6d6743</anchor>
    +      <arglist>(int index) const </arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>refresh</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a030f39b4e70def47d3379bdd505aa5e0</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Signal&lt; int &gt; &amp;</type>
    +      <name>currentChanged</name>
    +      <anchorfile>classWt_1_1Ext_1_1TabWidget.html</anchorfile>
    +      <anchor>a7d911045734277276dfe85d0eb91339e</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::TextEdit</name>
    +    <filename>classWt_1_1Ext_1_1TextEdit.html</filename>
    +    <base>Wt::Ext::FormField</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>TextEdit</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>adf9ef68f84862d0fd808579ac6a906c0</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>TextEdit</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>aefcf4176730025e4f9e32422f168b516</anchor>
    +      <arglist>(const WString &amp;text, WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setText</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>ae9dfae7a11e100a9ee568bcba8c005ee</anchor>
    +      <arglist>(const WString &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const WString &amp;</type>
    +      <name>text</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>ac36dc63a4e978e2b57ba62b76053bb52</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLinkDefault</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a5343edc5d04bc51ab904ee202570a185</anchor>
    +      <arglist>(const WString &amp;text, const WString &amp;location)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableAlignments</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a19870edbfe95e90c0817790813f1dcc3</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableColors</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a0aabef1ee733ba8a5d02e40b09af47f7</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableFont</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a30305f468671ffc230c38b40f46b02cb</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableFormat</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a4102bee7b0c4793f0d6e4dfe32a15432</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableLinks</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a9f10568be040eb2f20126f1e348dc964</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableLists</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>a5fe4e9f80d420a98bff6b36557f1b1b0</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setEnableSourceEdit</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>ae222f0186821a315f9f9803114577c9a</anchor>
    +      <arglist>(bool enable)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>resize</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>ad558bceb9ebca8c1ef8c937ce92786e9</anchor>
    +      <arglist>(const WLength &amp;width, const WLength &amp;height)</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual WValidator::State</type>
    +      <name>validate</name>
    +      <anchorfile>classWt_1_1Ext_1_1TextEdit.html</anchorfile>
    +      <anchor>ae8e02fd395eb356981781a46e3ddac67</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::ToolBar</name>
    +    <filename>classWt_1_1Ext_1_1ToolBar.html</filename>
    +    <base>Wt::Ext::Widget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>ToolBar</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a2f92bf512fd660fecdb404ac7b6ff860</anchor>
    +      <arglist>(WContainerWidget *parent=0)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>aa0384abdeff4e404676bfbd872599d48</anchor>
    +      <arglist>(const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>adc62d49915efdcce46836052d1c4ceb6</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>ab0b26e4417df169385f1ec0ee9484bc8</anchor>
    +      <arglist>(const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a582fa415aca609419df7a9db342299de</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, T *target, void(V::*method)())</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a03381960ed0efbc33e8a948b624b5edb</anchor>
    +      <arglist>(const WString &amp;text, Menu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>Button *</type>
    +      <name>addButton</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a53403001a2f4a283e75290589631205e</anchor>
    +      <arglist>(const std::string &amp;iconPath, const WString &amp;text, Menu *menu)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a2574961d85b1308658444369c395b4f2</anchor>
    +      <arglist>(Button *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>add</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>aa7c3e74b0940f99d24a55b17c165a71f</anchor>
    +      <arglist>(WWidget *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insert</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a931b9b3e5d4cbbdee5394a841752c849</anchor>
    +      <arglist>(int index, Button *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>insert</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>accdb33e659665f38fe1c38a8f51da78a</anchor>
    +      <arglist>(int index, WWidget *item)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addSeparator</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a1b7ed20a6d1f445df529df64aa0e0e8f</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addStretch</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolBar.html</anchorfile>
    +      <anchor>a03e144feecf56c16084fd88c230ea8d4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::ToolTipConfig</name>
    +    <filename>classWt_1_1Ext_1_1ToolTipConfig.html</filename>
    +    <base>Wt::WObject</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>ToolTipConfig</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a60a4ade15a8da2d01661594cbb225fff</anchor>
    +      <arglist>(WObject *parent=0)</arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>bool</type>
    +      <name>autoDismiss</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a9444db3004fa2947e1b603d78c66c116</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>bool</type>
    +      <name>autoHide</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>ab994b2f02febf0d04c562d44162aa6b0</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>dismissDelay</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a8372920aabcefb2733e00ecab5c75ef3</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>hideDelay</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a46688d3b3188aba95d3eb5ff1cd0bd32</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>showDelay</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a13105c4b727e4d72dec31a5009e0b53c</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>bool</type>
    +      <name>animate</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a344f9b39975b03df7cbcbc1b652e2d36</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>bool</type>
    +      <name>hideOnClick</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a0574169d747b7f6f19691a3e287fece4</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>maxWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>ab1e8b83b5355ff790de358c47dc896b5</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>int</type>
    +      <name>minWidth</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a66a3dc5922a0ead7c0a8740e7d4ffd95</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="variable">
    +      <type>bool</type>
    +      <name>trackMouse</name>
    +      <anchorfile>classWt_1_1Ext_1_1ToolTipConfig.html</anchorfile>
    +      <anchor>a2ff0b5a2797dd3d2598dd582ebc75d51</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Ext::Widget</name>
    +    <filename>classWt_1_1Ext_1_1Widget.html</filename>
    +    <base>Wt::WWebWidget</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>~Widget</name>
    +      <anchorfile>classWt_1_1Ext_1_1Widget.html</anchorfile>
    +      <anchor>a6156640ace2e219ed459461a755a7860</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function" virtualness="virtual">
    +      <type>virtual void</type>
    +      <name>setHidden</name>
    +      <anchorfile>classWt_1_1Ext_1_1Widget.html</anchorfile>
    +      <anchor>a3102617fe37dd91e053317f268aa2f63</anchor>
    +      <arglist>(bool how)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="namespace">
    +    <name>Wt::Http</name>
    +    <filename>namespaceWt_1_1Http.html</filename>
    +    <class kind="class">Wt::Http::Client</class>
    +    <class kind="class">Wt::Http::UploadedFile</class>
    +    <class kind="class">Wt::Http::Request</class>
    +    <class kind="class">Wt::Http::Response</class>
    +    <class kind="class">Wt::Http::ResponseContinuation</class>
    +    <member kind="typedef">
    +      <type>std::vector&lt; std::string &gt;</type>
    +      <name>ParameterValues</name>
    +      <anchorfile>namespaceWt_1_1Http.html</anchorfile>
    +      <anchor>ae1470e15e15eab123a19e4204f624598</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>std::map&lt; std::string, ParameterValues &gt;</type>
    +      <name>ParameterMap</name>
    +      <anchorfile>namespaceWt_1_1Http.html</anchorfile>
    +      <anchor>a3420f95c8bfecf3d46e65920c765345a</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="typedef">
    +      <type>std::multimap&lt; std::string, UploadedFile &gt;</type>
    +      <name>UploadedFileMap</name>
    +      <anchorfile>namespaceWt_1_1Http.html</anchorfile>
    +      <anchor>a90602329029048d738daae9ba63e059a</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::Client</name>
    +    <filename>classWt_1_1Http_1_1Client.html</filename>
    +    <member kind="enumeration">
    +      <name>ClientOption</name>
    +      <anchorfile>classWt_1_1Http_1_1Client.html</anchorfile>
    +      <anchor>a66729a402596f1f7bb7ca0581e4d50ef</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="enumvalue">
    +      <name>SupportsAjax</name>
    +      <anchorfile>classWt_1_1Http_1_1Client.html</anchorfile>
    +      <anchor>a66729a402596f1f7bb7ca0581e4d50efafe42fa8300bb8004fadf080aec00a9cd</anchor>
    +      <arglist></arglist>
    +    </member>
    +    <member kind="function" static="yes">
    +      <type>static void</type>
    +      <name>startWtSession</name>
    +      <anchorfile>classWt_1_1Http_1_1Client.html</anchorfile>
    +      <anchor>a579207474fa28b9f84c040c524f565d0</anchor>
    +      <arglist>(const std::string &amp;host, const std::string &amp;port, const std::string &amp;path, const std::string &amp;query=std::string(), WFlags&lt; ClientOption &gt; flags=SupportsAjax)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::UploadedFile</name>
    +    <filename>classWt_1_1Http_1_1UploadedFile.html</filename>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>spoolFileName</name>
    +      <anchorfile>classWt_1_1Http_1_1UploadedFile.html</anchorfile>
    +      <anchor>a80453ce8dc7a06e12b5c1f622c027320</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>clientFileName</name>
    +      <anchorfile>classWt_1_1Http_1_1UploadedFile.html</anchorfile>
    +      <anchor>a6548081a259f55d572bf049d576bb2a3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string &amp;</type>
    +      <name>contentType</name>
    +      <anchorfile>classWt_1_1Http_1_1UploadedFile.html</anchorfile>
    +      <anchor>a165bc88288a19a1134ecdf3922f86f25</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>stealSpoolFile</name>
    +      <anchorfile>classWt_1_1Http_1_1UploadedFile.html</anchorfile>
    +      <anchor>ab8cdd14724b871e71d3ec7d9530f9e29</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::Request</name>
    +    <filename>classWt_1_1Http_1_1Request.html</filename>
    +    <class kind="class">Wt::Http::Request::ByteRange</class>
    +    <class kind="class">Wt::Http::Request::ByteRangeSpecifier</class>
    +    <member kind="function">
    +      <type>const ParameterMap &amp;</type>
    +      <name>getParameterMap</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a25edf133c23a26cc166ab912e0b60b79</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const UploadedFileMap &amp;</type>
    +      <name>uploadedFiles</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a3b4aaa1bf2debdf29306e7bb63d192fb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const ParameterValues &amp;</type>
    +      <name>getParameterValues</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a2820b2165bdcc337e05129d2c884bbdb</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const std::string *</type>
    +      <name>getParameter</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a9d2e071561f59e6be4a11ab22732b5a8</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>const UploadedFile *</type>
    +      <name>getUploadedFile</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>af8f7b873e8d953cd5a1372fa3bddf52d</anchor>
    +      <arglist>(const std::string &amp;name) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>tooLarge</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a54eff8bb1b30d3b5283753f0e6a21c64</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ResponseContinuation *</type>
    +      <name>continuation</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a2d4f88961a222be846460a8238823ae0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>serverName</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a3ba38b20a0b3f7b985f7d3a3178f080d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>serverPort</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a050ad797f0c9586113e654a9c8d27eb6</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>path</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a5e3962130a69fd22828f2bed3bc341a9</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>pathInfo</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a38bbd6c56cd07bdf3abe254d17d83bff</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>queryString</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>adef477ec6cf7b7f3e82254ab3338f3be</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>urlScheme</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a495633b89f99cd02cda65d3aad16eacc</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::istream &amp;</type>
    +      <name>in</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a768a65ceb3c0bf013b57c3de04b19041</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>contentType</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a588848625d3a7a968fec1a10cb435af3</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>int</type>
    +      <name>contentLength</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>aa32f4e54c287098f5829fc49e6e71e31</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>userAgent</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a0201edb776325c8c30b86695561b5681</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>clientAddress</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>aa9b24a6312b5e8598b54f1d98bf050eb</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>headerValue</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>ade2596aa6802a63e21460094ea30a4d9</anchor>
    +      <arglist>(const std::string &amp;field) const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::string</type>
    +      <name>method</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>ae76664f93462d9311ee671c93607e5ca</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ByteRangeSpecifier</type>
    +      <name>getRanges</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>a0683f0a3d87ae10d7c947391fe60629a</anchor>
    +      <arglist>(::int64_t filesize) const </arglist>
    +    </member>
    +    <member kind="friend">
    +      <type>friend class</type>
    +      <name>Wt::WResource</name>
    +      <anchorfile>classWt_1_1Http_1_1Request.html</anchorfile>
    +      <anchor>ac331572ec8a235b3ebf1030c5614cdec</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::Request::ByteRange</name>
    +    <filename>classWt_1_1Http_1_1Request_1_1ByteRange.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>ByteRange</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRange.html</anchorfile>
    +      <anchor>aceb2856a1d7b4a188979a540d30da5d3</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>ByteRange</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRange.html</anchorfile>
    +      <anchor>a2f1619a8326d673406495cc5593c8c85</anchor>
    +      <arglist>(::uint64_t first,::uint64_t last)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::uint64_t</type>
    +      <name>firstByte</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRange.html</anchorfile>
    +      <anchor>af6ce446fc54623145b41e0987c547c17</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>::uint64_t</type>
    +      <name>lastByte</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRange.html</anchorfile>
    +      <anchor>a1946993f79e409352b1186ecb4bc8e7d</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::Request::ByteRangeSpecifier</name>
    +    <filename>classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html</filename>
    +    <member kind="function">
    +      <type></type>
    +      <name>ByteRangeSpecifier</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html</anchorfile>
    +      <anchor>ac4fc38d1759336f50099de17d4c22af4</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>bool</type>
    +      <name>isSatisfiable</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html</anchorfile>
    +      <anchor>a8ef2be6043819c6f8fb427df74a7ff82</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSatisfiable</name>
    +      <anchorfile>classWt_1_1Http_1_1Request_1_1ByteRangeSpecifier.html</anchorfile>
    +      <anchor>afc7043d292dbf9fa16dcde9ff30b813a</anchor>
    +      <arglist>(bool satisfiable)</arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::Response</name>
    +    <filename>classWt_1_1Http_1_1Response.html</filename>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setStatus</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>a7c14ba3ab34ff14461df3a4369118443</anchor>
    +      <arglist>(int status)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setContentLength</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>aea93d6918a90e8c9b0010499771a1c87</anchor>
    +      <arglist>(::uint64_t length)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setMimeType</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>a20dd49d512ffc0cf407f9dd39db30341</anchor>
    +      <arglist>(const std::string &amp;mimeType)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>addHeader</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>a5827dd04629251d0c7ff3cc9062afb7d</anchor>
    +      <arglist>(const std::string &amp;name, const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ResponseContinuation *</type>
    +      <name>createContinuation</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>a5cb0800718188328fec17d3b84c85aab</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>ResponseContinuation *</type>
    +      <name>continuation</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>ad29d222d15779421a840f8974f07b304</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="function">
    +      <type>std::ostream &amp;</type>
    +      <name>out</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>ae74ee0009e9ec4aa3d3f35e680a745de</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="friend">
    +      <type>friend class</type>
    +      <name>Wt::WResource</name>
    +      <anchorfile>classWt_1_1Http_1_1Response.html</anchorfile>
    +      <anchor>ac331572ec8a235b3ebf1030c5614cdec</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Http::ResponseContinuation</name>
    +    <filename>classWt_1_1Http_1_1ResponseContinuation.html</filename>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setData</name>
    +      <anchorfile>classWt_1_1Http_1_1ResponseContinuation.html</anchorfile>
    +      <anchor>a72fa6895f798e1270aa6e6a44222a9eb</anchor>
    +      <arglist>(const boost::any &amp;data)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>boost::any</type>
    +      <name>data</name>
    +      <anchorfile>classWt_1_1Http_1_1ResponseContinuation.html</anchorfile>
    +      <anchor>a92a3eb825c3df18ba5a6788315b8757b</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>WResource *</type>
    +      <name>resource</name>
    +      <anchorfile>classWt_1_1Http_1_1ResponseContinuation.html</anchorfile>
    +      <anchor>a0d8a5bebd58915b47c97bc6afc8050e0</anchor>
    +      <arglist>() const </arglist>
    +    </member>
    +    <member kind="friend">
    +      <type>friend class</type>
    +      <name>Wt::WResource</name>
    +      <anchorfile>classWt_1_1Http_1_1ResponseContinuation.html</anchorfile>
    +      <anchor>ac331572ec8a235b3ebf1030c5614cdec</anchor>
    +      <arglist></arglist>
    +    </member>
    +  </compound>
    +  <compound kind="class">
    +    <name>Wt::Test::WTestEnvironment</name>
    +    <filename>classWt_1_1Test_1_1WTestEnvironment.html</filename>
    +    <base>Wt::WEnvironment</base>
    +    <member kind="function">
    +      <type></type>
    +      <name>WTestEnvironment</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>af194aa75c8027150907de581a692da7e</anchor>
    +      <arglist>(const std::string &amp;applicationPath=&quot;/&quot;, const std::string &amp;configurationFile=&quot;&quot;, EntryPointType type=Application)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type></type>
    +      <name>~WTestEnvironment</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a0731bffca88279f3ea581b5d73c8afe9</anchor>
    +      <arglist>()</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setParameterMap</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a07ad68d340246eddc979951f96c7fd76</anchor>
    +      <arglist>(const Http::ParameterMap &amp;parameters)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setCookies</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>aa80a019dc055b5ae98c35956ba524c60</anchor>
    +      <arglist>(const CookieMap &amp;cookies)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHeaderValue</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>aef3602fd6c1b8e15adcbc40bc1b7c6c4</anchor>
    +      <arglist>(const std::string &amp;value)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setSupportsCookies</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a48f865810ad560cc9df88b7adf17b591</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAjax</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>aaaf6e252105cbd4b1bfaad14f0c47fa8</anchor>
    +      <arglist>(bool enabled)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setDpiScale</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>ab2fd0942e9c5722948fdc98db92fe83a</anchor>
    +      <arglist>(double dpiScale)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setLocale</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a58f53c406a0a697d2c3d6d5ffe4f08cf</anchor>
    +      <arglist>(const std::string &amp;locale)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setHostName</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a5deabdbe1d1d0546882047a5820e070c</anchor>
    +      <arglist>(const std::string &amp;hostName)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setUrlScheme</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>adf16dd87cb333f3ef8e690fcd1a924c6</anchor>
    +      <arglist>(const std::string &amp;scheme)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setUserAgent</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>acfdde9c75469004a8308393b86b5ddce</anchor>
    +      <arglist>(const std::string &amp;userAgent)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setReferer</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a6109afee2818835a96de8d6c9e5e48c2</anchor>
    +      <arglist>(const std::string &amp;referer)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setAccept</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a9aeb155e7b624d0a130fb2f609b4945f</anchor>
    +      <arglist>(const std::string &amp;accept)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setServerSignature</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a2addf62069b391b6a94c9acd07c314aa</anchor>
    +      <arglist>(const std::string &amp;signature)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setServerSoftware</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a41c449aed002dcb98d1ac5535966407c</anchor>
    +      <arglist>(const std::string &amp;software)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setServerAdmin</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a3b4866badc5e66113d846699fa3fa1e3</anchor>
    +      <arglist>(const std::string &amp;serverAdmin)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setClientAddress</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a0745f61072135090923bb492e0d19774</anchor>
    +      <arglist>(const std::string &amp;clientAddress)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setInternalPath</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a3fe9fffe6069c96d959ef499087c3fc8</anchor>
    +      <arglist>(const std::string &amp;internalPath)</arglist>
    +    </member>
    +    <member kind="function">
    +      <type>void</type>
    +      <name>setContentType</name>
    +      <anchorfile>classWt_1_1Test_1_1WTestEnvironment.html</anchorfile>
    +      <anchor>a42d0159129b9174ff1e03376408f7f47</anchor>
    +      <arglist>(ContentType contentType)</arglist>
    +    </member>
    +  </compound>
    +</tagfile>
    diff --git a/wt-3.1.7a/wt_config.xml.in b/wt-3.1.7a/wt_config.xml.in
    new file mode 100644
    index 0000000..0be29e4
    --- /dev/null
    +++ b/wt-3.1.7a/wt_config.xml.in
    @@ -0,0 +1,453 @@
    +<!--
    +    Wt Configuration File.
    +
    +    The Wt configuration file manages, for every Wt application, settings
    +    for session management, debugging, directory for runtime information
    +    such as session sockets, and some security settings.
    +
    +    Settings may be specified globally, or for a single application path.
    +
    +    The path should be as configured in the Wt build process, where it
    +    defaults to /etc/wt/wt_config.xml. It can be overridden in the environment
    +    variable WT_CONFIG_XML, or with the -c startup option of wthttpd.
    +
    +    The values listed here are the default values, which are used when the
    +    declaration is missing or no configuration file is used.
    +  -->
    +
    +<server>
    +
    +    <!-- Default application settings
    +
    +      The special location "*" always matches. See below for an example
    +      of settings specific to a single application.
    +      -->
    +    <application-settings location="*">
    +
    +        <!-- Session management. -->
    +	<session-management>
    +            <!-- Every session runs within a dedicated process.
    +
    +	       This mode guarantees kernel-level session privacy, but as every
    +	       session requires a seperate process, it is also an easy target
    +	       for DoS attacks if not shielded by access control.
    +
    +               It is also a convenient mode during development, as it is easy
    +	       to enable disable debugging using valgrind, and it always starts
    +	       the latest deployed executable for a new session.
    +	   
    +	       Note: currently only supported using the FastCGI connector
    +              -->
    +
    +	    <!--
    +	       <dedicated-process>
    +		 <max-num-sessions>100</max-num-sessions>
    +	       </dedicated-process>
    +	      -->
    +
    +	    <!-- Multiple sessions within one process.
    +
    +	       This mode spawns a number of processes, and sessions are
    +	       allocated randomly to one of these processes (you should not
    +	       use this for dynamic FCGI servers, but only in conjunction
    +	       with a fixed number of static FCGI servers.
    +
    +	       This requires careful programming, as memory corruption in one
    +	       session will kill all of the sessions in the same process. You
    +	       should debug extensively using valgrind. Also, it is your
    +	       responsibility to keep session state not interfering and
    +	       seperated.
    +
    +	       On the other hand, sessions are inexpensive, and this mode
    +	       suffers far less from DoS attacks than dedicated-process mode.
    +	       Use it for non-critical and well-debugged web applications.
    +
    +	       Note: wthttpd always uses exactly one process
    +              -->
    +	    <shared-process>
    +	        <num-processes>1</num-processes>
    +	    </shared-process>
    +
    +	    <!-- Session tracking strategy.
    +
    +	       Possible values:
    +		 Auto: cookies is available, otherwise URL rewriting
    +		 URL:  only URL rewriting
    +	      -->
    +	    <tracking>URL</tracking>
    +
    +	    <!-- How reload should be handled.
    +
    +	       When reload should (or rather, may) spawn a new session, then
    +	       even in the case cookies are not used for session management,
    +	       the URL will not be cluttered with a sessionid.
    +	       However, WApplication::refresh() will never be called.
    +	      -->
    +	    <reload-is-new-session>true</reload-is-new-session>
    +
    +	    <!-- Session timeout (seconds).
    +
    +	       When a session remains inactive for this amount of time, it is
    +	       cleaned up.
    +	      -->
    +	    <timeout>600</timeout>
    +
    +	    <!-- Server push timeout (seconds).
    +
    +               When using server-initiated updates, the client uses
    +               long-polling requests. Proxies (including reverse
    +               proxies) are notorious for silently closing idle
    +               requests; the client therefore cancels the request
    +               periodically and issues a new one. This timeout sets
    +               the frequency.
    +	      -->
    +	    <server-push-timeout>50</server-push-timeout>
    +	</session-management>
    +
    +	<!-- Settings that apply only to the FastCGI connector.
    +
    +	   To configure the wthttpd connector, use command line options, or
    +	   configure default options in /etc/wt/wthttpd
    +	  -->
    +	<connector-fcgi>
    +	    <!-- Valgrind path
    +
    +               If debugging is enabled and this path is not empty, then valgrind
    +	       will be started for every shared process, or for every session
    +	       which has ?debug appended to the command line.
    +
    +	       The variable is slighly misnamed. Not only a path can be set,
    +	       but also options, like for example:
    +
    +                 /usr/bin/valgrind - -leak-check=full
    +             -->
    +	    <valgrind-path></valgrind-path>
    +
    +	    <!-- Run directory
    +
    +               Path used by Wt to do session management.
    +	      -->
    +	    <run-directory>${RUNDIR}</run-directory>
    +
    +	    <!-- Number of threads per process
    +
    +               This configures the size of the thread pool. You may
    +               want to change this value if you would like to support
    +               reentrant event loops, where you block one event loop
    +               using WDialog::exec() or related static
    +               methods. Everytime you enter such an event loop, one
    +               thread is blocked, and therefore the total number of
    +               sessions that reliably can do this is limited to the
    +               number of thread you have (minus one to unblock).
    +
    +	       For the built-in http connector, there is a similar
    +	       config option that is specified in the whttpd config
    +	       file or on the command line (-t).
    +
    +               The default value is 1.
    +	      -->
    +	    <num-threads>1</num-threads>
    +
    +	</connector-fcgi>
    +
    +	<!-- Settings that apply only to the MS IIS ISAPI connector.
    +
    +	   To configure the wthttpd connector, use command line options, or
    +	   configure default options in /etc/wt/wthttpd
    +	  -->
    +	<connector-isapi>
    +	    <!-- Number of threads per process
    +
    +               This configures the number of threads that will be used
    +               to handle Wt requests. The IIS internal threads are never
    +               used to do any processing; all requests are forwarded to
    +               be handled in this threadpool. Rather than to configure a
    +               so-called 'web-garden' in IIS, increase this number. The
    +               ISAPI connector will not work correctly when a web-garden
    +               is configured.
    +
    +               You may want to change this value if you would like to
    +               support more reentrant event loops, where you block one
    +               event loop using WDialog::exec() or related static
    +               methods. Everytime you enter such an event loop, one
    +               thread is blocked, and therefore the total number of
    +               sessions that reliably can do this is limited to the
    +               number of thread you have (minus one to unblock).
    +
    +               You may also want to increase this number if your Wt
    +               application is regularly waiting for IO (databases, network,
    +               files, ...). If this number is too low, all threads could
    +               be waiting for IO operations to complete while your CPU
    +               is idle. Increasing the number of threads may help.
    +
    +               Computing intensive applications may also increase this number,
    +               even though it is better to offload computations to a helper
    +               thread and user server push or a WTimer to check for
    +               completion of the task in order to keep your GUI responsive
    +               during the computations.
    +
    +               The default value is 10.
    +	      -->
    +	    <num-threads>10</num-threads>
    +
    +	    <!-- Maximum Request Size spooled in memory (Kb)
    +        
    +               Normally, Wt keeps incoming requests (POST data) in memory.
    +               However, malicious users could send a big POST and as such
    +               use up all memory of your HTTP server. With this parameter,
    +               you tune how big a request can be before Wt spools it in a
    +               file before processing it. Legitimate big POST messages may
    +               occur when users are expected to upload files.
    +
    +               See also max-request-size.
    +
    +               The default value is 128K, which is more than enough for
    +               any interactive Wt event.
    +	      -->
    +	    <max-memory-request-size>128</max-memory-request-size>
    +	</connector-isapi>
    +
    +        <!-- Enable debug
    +
    +	     When enabled,
    +	     - JavaScript errors are not caught to display an error message.
    +	  -->
    +	<debug>false</debug>
    +
    +	<!-- Log file
    +
    +	   When the log file is empty, or omitted, logging is done to
    +	   stderr. This may end up in the web server error log file
    +	   (e.g. for apache + fastcgi module), or on stderr (e.g. for
    +	   the built-in httpd).
    +         -->
    +	<log-file></log-file>
    +
    +	<!-- Maximum HTTP request size (Kb)
    +
    +           Maximum size of an incoming POST request. This value must be
    +           increased when the user is allowed to upload files.
    +         -->
    +	<max-request-size>128</max-request-size>
    +
    +	<!-- Session id length (number of characters) -->
    +	<session-id-length>16</session-id-length>
    +
    +	<!-- Send the XHTML mime type when appropriate
    +
    +	   Wt renders XHTML1 (XML variant of HTML) that is backward-compatible
    +	   with HTML. Using XHTML, Wt is capable of supporting XHTML-only
    +	   features such as embedded SVG or MathML.
    +
    +	   When enabled, JWt sets an XHTML mime-type
    +	   (application/xhtml+xml) when the browser reports support
    +	   for it. Most notably, Internet Explorer does not support
    +	   it.  Because XHTML and HTML are slightly different with
    +	   respect to default CSS rules, you may want to disable
    +	   sending the XHTML mime-type alltogether, at least if you
    +	   are not using SVG (used by the WPaintedWidget).  -->
    +	<send-xhtml-mime-type>false</send-xhtml-mime-type>
    +
    +	<!-- Do strict serialization of events.
    +
    +	   By default events are queued at the client-side, and
    +	   transmitted to the server so that at any time only one
    +	   request/response is pending. This scheme has a quality that
    +	   resembles TCP: on a low-latency link you allow the
    +	   transmission of many smaller requests, while on a high
    +	   latency link, events will be propagated less often, but in
    +	   batches.
    +
    +	   In any case, this scheme does not drop events, no matter
    +	   how quickly they are generated.
    +
    +	   In rare cases, the scheme may result in unwanted behaviour,
    +	   because the client-side is allowed to be slighly out of
    +	   sync at the time an event is recorded with the server-side
    +	   (and more so on high-latency links). The drastic
    +	   alternative is to discard events while a response is
    +	   pending, and can be configured by setting this option to
    +	   true.
    +	  -->
    +	<strict-event-serialization>false</strict-event-serialization>
    +
    +	<!-- Enables web socket.
    +
    +	   By default AJAX and long polling are used to communicate
    +	   between server and browser.
    +
    +           By enabling web socket support, if the browser supports
    +           WebSockets, then WebSocket is the protocol used for
    +           communication between client and server. WebSockets are
    +           currently only supported by the built-in httpd Connector,
    +	   which acts as both an HTTP and WebSocket server. The WebSocket
    +	   protocol is intentionally not compatible with HTTP, through 
    +	   a special hand-shake mechanism, and requires
    +           that all (reverse) proxy servers also have explicit support
    +           for this protocol.
    +
    +           This feature is still experimental: the Web Sockets RFC is
    +           still a draft with ongoing changes to the framing protocol,
    +	   and the current implementation is based on
    +	   http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00
    +	  -->
    +	<web-sockets>false</web-sockets>
    +
    +	<!-- Redirect message shown for browsers without JavaScript support
    +
    +	   By default, Wt will use an automatic redirect to start the
    +	   application when the browser does not support
    +	   JavaScript. However, browsers are not required to follow
    +	   the redirection, and in some situations (when using XHTML),
    +	   such automatic redirection is not supported.
    +
    +	   This configures the text that is shown in the anchor which
    +	   the user may click to be redirected to a basic HTML version
    +	   of your application.
    +          -->
    +	<redirect-message>Load basic HTML</redirect-message>
    +
    +	<!-- Whether we are sitting behind a reverse proxy 
    +
    +	   When deployed behind a reverse proxy (such as Apache or Squid),
    +	   the server location is not read from the "Host" header,
    +	   but from the X-Forwarded-For header, if present.
    +	  -->
    +	<behind-reverse-proxy>false</behind-reverse-proxy>
    +
    +	<!-- Whether inline CSS is allowed.
    +
    +           Some Wt widgets will insert CSS rules in the the inline
    +           stylesheet when first used. This can be disabled using this
    +	   configuration option.
    +
    +           Note: some widgets, such as WTreeView and WTableView,
    +           dynamically manipulate rules in this stylesheet, and will
    +           no longer work properly when inline-css is disabled.
    +	  -->
    +	<inline-css>true</inline-css>
    +
    +	<!-- The timeout before showing the loading indicator.
    +
    +	   The value is specified in ms.
    +          -->
    +	<indicator-timeout>500</indicator-timeout>
    +
    +	<!-- Ajax user agent list
    +
    +           Wt considers three types of sessions:
    +	   - AJAX sessions: use AJAX and JavaScript
    +	   - plain HTML sessions: use plain old server GETs and POSTs
    +	   - bots: have clean internal paths and no persistent sessions
    +
    +           By default, Wt does a browser detection to distinguish between
    +	   the first two: if a browser supports JavaScript (and has it
    +	   enabled), and has an AJAX DOM API, then AJAX sessions are chosen,
    +	   otherwise plain HTML sessions.
    +
    +           Here, you may indicate which user agents should or should
    +           not receive an AJAX session regardless of what they report as
    +	   capabilities.
    +
    +           Possible values for 'mode' or "white-list" or "black-list". A
    +	   white-list will only treat the listed agents as supporting AJAX,
    +	   all other agents will be served plain HTML sessions. A black-list
    +	   will always server plain HTML sessions to listed agents and
    +	   otherwise rely on browser capability detection.
    +
    +           Each <user-agent> is a regular expression.
    +	  -->
    +	<user-agents type="ajax" mode="black-list">
    +	  <!-- <user-agent>.*Crappy browser.*</user-agent> -->
    +	</user-agents>
    +
    +	<!-- Bot user agent list
    +
    +           Here, you can specify user agents that should be should be
    +           treated as bots.
    +
    +           Each <user-agent> is a regular expression.
    +	  -->
    +	<user-agents type="bot">
    +	  <user-agent>.*Googlebot.*</user-agent>
    +	  <user-agent>.*msnbot.*</user-agent>
    +	  <user-agent>.*Slurp.*</user-agent>
    +	  <user-agent>.*Crawler.*</user-agent>
    +	  <user-agent>.*Bot.*</user-agent>
    +	  <user-agent>.*ia_archiver.*</user-agent>
    +	  <user-agent>.*Twiceler.*</user-agent>
    +	</user-agents>
    +
    +	<!-- Whether the progressive bootstrap is used.
    +
    +	   The default bootstrap method first senses whether there is AJAX
    +	   support, and only then creates the application.
    +
    +	   The progressive bootstrap method first renders a plain HTML
    +	   version and later upgrades to an AJAX version.
    +	  -->
    +	<progressive-bootstrap>false</progressive-bootstrap>
    +
    +	<!-- Runtime Properties
    +     
    +           These properties may be used to adapt applications to their
    +	   deployment environment. Typical use is for paths to resources
    +	   that may or may not be shared between several applications.
    +	  -->
    +	<properties>
    +            <!-- resourcesURL property
    +
    +	       The URL at which the resources/ folder is deploeyd that
    +	       comes distributed with Wt and contains auxiliary files
    +	       used to primarily for styles and themes.
    +
    +	       The default value is 'resources/'
    +              -->
    +	    <property name="resourcesURL">resources/</property>
    +
    +	    <!-- extBaseURL property
    +
    +               Used in conjunction with Ext:: widgets, and points to the
    +	       URL of Ext JavaScript and resource files (css, images).
    +	       See the documentation for the Ext namespace for details.
    +
    +	       The default value is 'ext/'
    +              -->
    +	    <property name="extBaseURL">ext/</property>
    +
    +	    <!-- favicon property
    +
    +	       By default, a browser will try to fetch a /favicon.ico icon
    +	       from the root of your web server which is used as an icon
    +	       for your application. You can specify an alternative location
    +	       by setting this property, or for an individual application
    +	       entry point by passing a location to WServer::addEntryPoint().
    +	      -->
    +	    <!-- <property name="favicon">images/favicon.ico</property> -->
    +
    +	    <!-- oldInternalPathAPI property
    +
    +	       Since wt 2.99.3, the internal path API has been simplified.
    +	       The API functions are still the same, but the semantics have
    +	       changed. To keep using the old semantics (which are deprecated
    +	       but still implemented) you can set this property.
    +	      -->
    +	    <!-- <property name="oldInternalPathAPI">true</property> -->
    +	</properties>
    +
    +    </application-settings>
    +
    +
    +    <!-- Override settings for specific applications.
    +
    +       Location refers to physical filesystem location of the
    +       application. The application prints this location (which
    +       corresponds to argv[0]) to the log file on startup, and this
    +       should match exactly.
    +      -->
    +    <!--
    +    <application-settings
    +       location="/var/www/localhost/wt-examples/hello.wt">
    +    </application-settings>
    +    -->
    +</server>